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
23,400
mariadb_reconnect
eloqsql/libmariadb/libmariadb/mariadb_lib.c
my_bool STDCALL mariadb_reconnect(MYSQL *mysql) { MYSQL tmp_mysql; struct my_hook_data hook_data; struct mysql_async_context *ctxt= NULL; LIST *li_stmt= mysql->stmts; /* check if connection handler is active */ if (IS_CONNHDLR_ACTIVE(mysql)) { if (mysql->extension->conn_hdlr->plugin && mysql->extension->conn_hdlr->plugin->reconnect) return(mysql->extension->conn_hdlr->plugin->reconnect(mysql)); } if (!mysql->options.reconnect || (mysql->server_status & SERVER_STATUS_IN_TRANS) || !mysql->host_info) { /* Allow reconnect next time */ mysql->server_status&= ~SERVER_STATUS_IN_TRANS; my_set_error(mysql, CR_SERVER_GONE_ERROR, SQLSTATE_UNKNOWN, 0); return(1); } mysql_init(&tmp_mysql); tmp_mysql.free_me= 0; tmp_mysql.options=mysql->options; if (mysql->extension->conn_hdlr) { tmp_mysql.extension->conn_hdlr= mysql->extension->conn_hdlr; mysql->extension->conn_hdlr= 0; } /* don't reread options from configuration files */ tmp_mysql.options.my_cnf_group= tmp_mysql.options.my_cnf_file= NULL; if (IS_MYSQL_ASYNC_ACTIVE(mysql)) { ctxt= mysql->options.extension->async_context; hook_data.orig_mysql= mysql; hook_data.new_mysql= &tmp_mysql; hook_data.orig_pvio= mysql->net.pvio; my_context_install_suspend_resume_hook(ctxt, my_suspend_hook, &hook_data); } if (!mysql_real_connect(&tmp_mysql,mysql->host,mysql->user,mysql->passwd, mysql->db, mysql->port, mysql->unix_socket, mysql->client_flag | CLIENT_REMEMBER_OPTIONS) || mysql_set_character_set(&tmp_mysql, mysql->charset->csname)) { if (ctxt) my_context_install_suspend_resume_hook(ctxt, NULL, NULL); /* don't free options (CONC-118) */ memset(&tmp_mysql.options, 0, sizeof(struct st_mysql_options)); my_set_error(mysql, tmp_mysql.net.last_errno, tmp_mysql.net.sqlstate, tmp_mysql.net.last_error); mysql_close(&tmp_mysql); return(1); } for (;li_stmt;li_stmt= li_stmt->next) { MYSQL_STMT *stmt= (MYSQL_STMT *)li_stmt->data; if (stmt->state != MYSQL_STMT_INITTED) { stmt->state= MYSQL_STMT_INITTED; SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0); } } tmp_mysql.free_me= mysql->free_me; tmp_mysql.stmts= mysql->stmts; mysql->stmts= NULL; if (ctxt) my_context_install_suspend_resume_hook(ctxt, NULL, NULL); /* Don't free options, we moved them to tmp_mysql */ memset(&mysql->options, 0, sizeof(mysql->options)); mysql->free_me=0; mysql_close(mysql); *mysql=tmp_mysql; mysql->net.pvio->mysql= mysql; #ifdef HAVE_TLS /* CONC-604: Set new connection handle */ if (mysql_get_ssl_cipher(mysql)) ma_pvio_tls_set_connection(mysql); #endif ma_net_clear(&mysql->net); mysql->affected_rows= ~(unsigned long long) 0; mysql->info= 0; return(0); }
O3
c
mariadb_reconnect: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x528, %rsp # imm = 0x528 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq 0x4c8(%rdi), %r14 movq 0x4f0(%rdi), %rax testq %rax, %rax je 0x73345 movq (%rax), %rax testq %rax, %rax je 0x73345 movq (%rax), %rax testq %rax, %rax je 0x73345 movq 0x78(%rax), %rax testq %rax, %rax je 0x73345 movq %fs:0x28, %rcx cmpq -0x30(%rbp), %rcx jne 0x7365e movq %rbx, %rdi addq $0x528, %rsp # imm = 0x528 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmpq *%rax cmpb $0x0, 0x43b(%rbx) setne %cl movl 0x380(%rbx), %eax testb $0x1, %al sete %dl andb %cl, %dl cmpb $0x1, %dl jne 0x73416 cmpq $0x0, 0x2d8(%rbx) je 0x73416 leaq 0x390(%rbx), %r15 leaq -0x528(%rbp), %r12 movq %r12, %rdi callq 0x75861 movb $0x0, 0x48c(%r12) leaq -0x198(%rbp), %rdi movl $0xf8, %edx movq %r15, %rsi callq 0x5f0e0 movq 0x4f0(%rbx), %rax movq (%rax), %rax testq %rax, %rax je 0x733ca movq -0x38(%rbp), %rcx movq %rax, (%rcx) movq 0x4f0(%rbx), %rax movq $0x0, (%rax) xorps %xmm0, %xmm0 movups %xmm0, -0x148(%rbp) movq 0x480(%rbx), %rax testq %rax, %rax je 0x7343f movq 0x28(%rax), %r13 testq %r13, %r13 je 0x7343f cmpb $0x0, 0x14(%r13) je 0x7343f leaq -0x550(%rbp), %rdx movq %rbx, (%rdx) movq %r12, 0x8(%rdx) movq (%rbx), %rax movq %rax, 0x10(%rdx) leaq 0x408f(%rip), %rsi # 0x7749b movq %r13, %rdi callq 0x86018 jmp 0x73442 andl $-0x2, %eax movl %eax, 0x380(%rbx) leaq 0x371afa(%rip), %rax # 0x3e4f20 movq (%rax), %rdx movq %rbx, %rdi movl $0x7d6, %esi # imm = 0x7D6 xorl %ecx, %ecx xorl %eax, %eax callq 0x72dd1 jmp 0x734f6 xorl %r13d, %r13d movq 0x2b0(%rbx), %rsi movq 0x2b8(%rbx), %rdx movq 0x2c0(%rbx), %rcx movq 0x2e8(%rbx), %r8 movl 0x360(%rbx), %r9d movl $0x80000000, %eax # imm = 0x80000000 orq 0x368(%rbx), %rax leaq -0x528(%rbp), %rdi pushq %rax pushq 0x2c8(%rbx) callq 0x75b9a addq $0x10, %rsp testq %rax, %rax je 0x734a8 movq 0x2f0(%rbx), %rax movq 0x8(%rax), %rsi leaq -0x528(%rbp), %rdi callq 0x774c3 testl %eax, %eax je 0x7351d testq %r13, %r13 je 0x734b9 movq %r13, %rdi xorl %esi, %esi xorl %edx, %edx callq 0x86018 movl $0xf8, %edx leaq -0x198(%rbp), %rdi xorl %esi, %esi callq 0x5f370 leaq -0x291(%rbp), %rdx movl -0x207(%rdx), %esi leaq -0x491(%rbp), %rcx movq %rbx, %rdi xorl %eax, %eax callq 0x72dd1 leaq -0x528(%rbp), %rdi callq 0x775b8 movb $0x1, %al movq %fs:0x28, %rcx cmpq -0x30(%rbp), %rcx jne 0x7365e addq $0x528, %rsp # imm = 0x528 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r13, -0x530(%rbp) movq %r15, -0x538(%rbp) testq %r14, %r14 je 0x735a2 leaq 0x3719e9(%rip), %rax # 0x3e4f20 movq (%rax), %r12 xorl %r13d, %r13d movq 0x10(%r14), %r15 cmpl $0x0, 0x50(%r15) je 0x73599 movl $0x0, 0x50(%r15) movl $0x7dd, 0x108(%r15) # imm = 0x7DD leaq 0x30d(%r15), %rdi movl $0x5, %edx movq %r12, %rsi callq 0x5f180 movb %r13b, 0x312(%r15) leaq 0x10c(%r15), %rdi leaq 0x3719ac(%rip), %rax # 0x3e4f30 movq 0x68(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x5f180 movb %r13b, 0x30b(%r15) movq 0x8(%r14), %r14 testq %r14, %r14 jne 0x7353d movb 0x48c(%rbx), %al movb %al, -0x9c(%rbp) movq 0x4c8(%rbx), %rax movq %rax, -0x60(%rbp) movq $0x0, 0x4c8(%rbx) movq -0x530(%rbp), %rdi testq %rdi, %rdi je 0x735d9 xorl %esi, %esi xorl %edx, %edx callq 0x86018 movl $0xf8, %edx movq -0x538(%rbp), %rdi xorl %esi, %esi callq 0x5f370 movb $0x0, 0x48c(%rbx) movq %rbx, %rdi callq 0x775b8 leaq -0x528(%rbp), %rsi movl $0x4f8, %edx # imm = 0x4F8 movq %rbx, %rdi callq 0x5f0e0 movq (%rbx), %rax movq %rbx, 0x40(%rax) movq (%rbx), %rax testq %rax, %rax je 0x73639 movq 0x38(%rax), %rdi testq %rdi, %rdi je 0x73639 callq 0x7b03a testq %rax, %rax je 0x73639 movq %rbx, %rdi callq 0x7b2f6 movq %rbx, %rdi callq 0x8e7d4 movq $-0x1, 0x338(%rbx) movq $0x0, 0x2e0(%rbx) xorl %eax, %eax jmp 0x734f8 callq 0x5f320
mariadb_reconnect: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 528h mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax mov r14, [rdi+4C8h] mov rax, [rdi+4F0h] test rax, rax jz short loc_73345 mov rax, [rax] test rax, rax jz short loc_73345 mov rax, [rax] test rax, rax jz short loc_73345 mov rax, [rax+78h] test rax, rax jz short loc_73345 mov rcx, fs:28h cmp rcx, [rbp+var_30] jnz loc_7365E mov rdi, rbx add rsp, 528h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp rax loc_73345: cmp byte ptr [rbx+43Bh], 0 setnz cl mov eax, [rbx+380h] test al, 1 setz dl and dl, cl cmp dl, 1 jnz loc_73416 cmp qword ptr [rbx+2D8h], 0 jz loc_73416 lea r15, [rbx+390h] lea r12, [rbp+var_528] mov rdi, r12 call mysql_init mov byte ptr [r12+48Ch], 0 lea rdi, [rbp+var_198] mov edx, 0F8h mov rsi, r15 call _memcpy mov rax, [rbx+4F0h] mov rax, [rax] test rax, rax jz short loc_733CA mov rcx, [rbp+var_38] mov [rcx], rax mov rax, [rbx+4F0h] mov qword ptr [rax], 0 loc_733CA: xorps xmm0, xmm0 movups [rbp+var_148], xmm0 mov rax, [rbx+480h] test rax, rax jz short loc_7343F mov r13, [rax+28h] test r13, r13 jz short loc_7343F cmp byte ptr [r13+14h], 0 jz short loc_7343F lea rdx, [rbp+var_550] mov [rdx], rbx mov [rdx+8], r12 mov rax, [rbx] mov [rdx+10h], rax lea rsi, my_suspend_hook mov rdi, r13 call my_context_install_suspend_resume_hook jmp short loc_73442 loc_73416: and eax, 0FFFFFFFEh mov [rbx+380h], eax lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] mov rdi, rbx mov esi, 7D6h xor ecx, ecx xor eax, eax call my_set_error jmp loc_734F6 loc_7343F: xor r13d, r13d loc_73442: mov rsi, [rbx+2B0h] mov rdx, [rbx+2B8h] mov rcx, [rbx+2C0h] mov r8, [rbx+2E8h] mov r9d, [rbx+360h] mov eax, 80000000h or rax, [rbx+368h] lea rdi, [rbp+var_528] push rax push qword ptr [rbx+2C8h] call mysql_real_connect add rsp, 10h test rax, rax jz short loc_734A8 mov rax, [rbx+2F0h] mov rsi, [rax+8] lea rdi, [rbp+var_528] call mysql_set_character_set test eax, eax jz short loc_7351D loc_734A8: test r13, r13 jz short loc_734B9 mov rdi, r13 xor esi, esi xor edx, edx call my_context_install_suspend_resume_hook loc_734B9: mov edx, 0F8h lea rdi, [rbp+var_198] xor esi, esi call _memset lea rdx, [rbp+var_291] mov esi, [rdx-207h] lea rcx, [rbp+var_491] mov rdi, rbx xor eax, eax call my_set_error lea rdi, [rbp+var_528] call mysql_close loc_734F6: mov al, 1 loc_734F8: mov rcx, fs:28h cmp rcx, [rbp+var_30] jnz loc_7365E add rsp, 528h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7351D: mov [rbp+var_530], r13 mov [rbp+var_538], r15 test r14, r14 jz short loc_735A2 lea rax, SQLSTATE_UNKNOWN mov r12, [rax] xor r13d, r13d loc_7353D: mov r15, [r14+10h] cmp dword ptr [r15+50h], 0 jz short loc_73599 mov dword ptr [r15+50h], 0 mov dword ptr [r15+108h], 7DDh lea rdi, [r15+30Dh] mov edx, 5 mov rsi, r12 call _strncpy mov [r15+312h], r13b lea rdi, [r15+10Ch] lea rax, client_errors mov rsi, [rax+68h] mov edx, 200h call _strncpy mov [r15+30Bh], r13b loc_73599: mov r14, [r14+8] test r14, r14 jnz short loc_7353D loc_735A2: mov al, [rbx+48Ch] mov [rbp+var_9C], al mov rax, [rbx+4C8h] mov [rbp+var_60], rax mov qword ptr [rbx+4C8h], 0 mov rdi, [rbp+var_530] test rdi, rdi jz short loc_735D9 xor esi, esi xor edx, edx call my_context_install_suspend_resume_hook loc_735D9: mov edx, 0F8h mov rdi, [rbp+var_538] xor esi, esi call _memset mov byte ptr [rbx+48Ch], 0 mov rdi, rbx call mysql_close lea rsi, [rbp+var_528] mov edx, 4F8h mov rdi, rbx call _memcpy mov rax, [rbx] mov [rax+40h], rbx mov rax, [rbx] test rax, rax jz short loc_73639 mov rdi, [rax+38h] test rdi, rdi jz short loc_73639 call ma_pvio_tls_cipher test rax, rax jz short loc_73639 mov rdi, rbx call ma_pvio_tls_set_connection loc_73639: mov rdi, rbx call ma_net_clear mov qword ptr [rbx+338h], 0FFFFFFFFFFFFFFFFh mov qword ptr [rbx+2E0h], 0 xor eax, eax jmp loc_734F8 loc_7365E: call ___stack_chk_fail
char mariadb_reconnect(_QWORD *a1, long long a2, long long a3) { long long v3; // r14 long long **v4; // rax long long *v5; // rax long long v6; // rax long long ( *v7)(_QWORD *, long long, long long, unsigned long long); // rax int v9; // eax long long v10; // rax long long v11; // rax long long v12; // r13 long long v13; // rcx long long v14; // r8 long long v15; // r9 char *v16; // r12 long long v17; // r15 _QWORD *v18; // [rsp+0h] [rbp-550h] _BYTE *v19; // [rsp+8h] [rbp-548h] long long v20; // [rsp+10h] [rbp-540h] _BYTE v21[144]; // [rsp+28h] [rbp-528h] BYREF int v22; // [rsp+B8h] [rbp-498h] char v23[512]; // [rsp+BFh] [rbp-491h] BYREF _BYTE v24[249]; // [rsp+2BFh] [rbp-291h] BYREF _BYTE v25[80]; // [rsp+3B8h] [rbp-198h] BYREF __int128 v26; // [rsp+408h] [rbp-148h] char v27; // [rsp+4B4h] [rbp-9Ch] long long v28; // [rsp+4F0h] [rbp-60h] _QWORD *v29; // [rsp+518h] [rbp-38h] unsigned long long v30; // [rsp+520h] [rbp-30h] v30 = __readfsqword(0x28u); v3 = a1[153]; v4 = (long long **)a1[158]; if ( v4 ) { v5 = *v4; if ( v5 ) { v6 = *v5; if ( v6 ) { v7 = *(long long ( **)(_QWORD *, long long, long long, unsigned long long))(v6 + 120); if ( v7 ) return v7(a1, a2, a3, __readfsqword(0x28u)); } } } v9 = *((_DWORD *)a1 + 224); if ( *((_BYTE *)a1 + 1083) == 0 || (v9 & 1) != 0 || !a1[91] ) { *((_DWORD *)a1 + 224) = v9 & 0xFFFFFFFE; my_set_error((long long)a1, 2006, (long long)SQLSTATE_UNKNOWN, 0LL); return 1; } mysql_init(v21); v27 = 0; memcpy(v25, a1 + 114, 248LL); v10 = *(_QWORD *)a1[158]; if ( v10 ) { *v29 = v10; *(_QWORD *)a1[158] = 0LL; } v26 = 0LL; v11 = a1[144]; if ( v11 && (v12 = *(_QWORD *)(v11 + 40)) != 0 && *(_BYTE *)(v12 + 20) ) { v18 = a1; v19 = v21; v20 = *a1; ((void ( *)(long long, long long ( *)()))my_context_install_suspend_resume_hook)( v12, my_suspend_hook); } else { v12 = 0LL; } if ( !mysql_real_connect( (unsigned int)v21, a1[86], a1[87], a1[88], a1[93], *((_DWORD *)a1 + 216), a1[89], a1[109] | 0x80000000LL) || (unsigned int)mysql_set_character_set(v21, *(_QWORD *)(a1[94] + 8LL)) ) { if ( v12 ) my_context_install_suspend_resume_hook(v12, 0LL, 0LL, v13, v14, v15, v18, v19, v20); memset(v25, 0LL, 248LL); my_set_error((long long)a1, v22, (long long)v24, v23); mysql_close(v21); return 1; } if ( v3 ) { v16 = SQLSTATE_UNKNOWN; do { v17 = *(_QWORD *)(v3 + 16); if ( *(_DWORD *)(v17 + 80) ) { *(_DWORD *)(v17 + 80) = 0; *(_DWORD *)(v17 + 264) = 2013; strncpy(v17 + 781, v16, 5LL); *(_BYTE *)(v17 + 786) = 0; strncpy(v17 + 268, client_errors[13], 512LL); *(_BYTE *)(v17 + 779) = 0; } v3 = *(_QWORD *)(v3 + 8); } while ( v3 ); } v27 = *((_BYTE *)a1 + 1164); v28 = a1[153]; a1[153] = 0LL; if ( v12 ) my_context_install_suspend_resume_hook(v12, 0LL, 0LL, v13, v14, v15, v18, v19, v20); memset(a1 + 114, 0LL, 248LL); *((_BYTE *)a1 + 1164) = 0; mysql_close(a1); memcpy(a1, v21, 1272LL); *(_QWORD *)(*a1 + 64LL) = a1; if ( *a1 && *(_QWORD *)(*a1 + 56LL) && ma_pvio_tls_cipher() ) ma_pvio_tls_set_connection(a1); ma_net_clear(a1); a1[103] = -1LL; a1[92] = 0LL; return 0; }
mariadb_reconnect: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x528 MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV R14,qword ptr [RDI + 0x4c8] MOV RAX,qword ptr [RDI + 0x4f0] TEST RAX,RAX JZ 0x00173345 MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x00173345 MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x00173345 MOV RAX,qword ptr [RAX + 0x78] TEST RAX,RAX JZ 0x00173345 MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x30] JNZ 0x0017365e MOV RDI,RBX ADD RSP,0x528 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP RAX LAB_00173345: CMP byte ptr [RBX + 0x43b],0x0 SETNZ CL MOV EAX,dword ptr [RBX + 0x380] TEST AL,0x1 SETZ DL AND DL,CL CMP DL,0x1 JNZ 0x00173416 CMP qword ptr [RBX + 0x2d8],0x0 JZ 0x00173416 LEA R15,[RBX + 0x390] LEA R12,[RBP + -0x528] MOV RDI,R12 CALL 0x00175861 MOV byte ptr [R12 + 0x48c],0x0 LEA RDI,[RBP + -0x198] MOV EDX,0xf8 MOV RSI,R15 CALL 0x0015f0e0 MOV RAX,qword ptr [RBX + 0x4f0] MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x001733ca MOV RCX,qword ptr [RBP + -0x38] MOV qword ptr [RCX],RAX MOV RAX,qword ptr [RBX + 0x4f0] MOV qword ptr [RAX],0x0 LAB_001733ca: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBP + -0x148],XMM0 MOV RAX,qword ptr [RBX + 0x480] TEST RAX,RAX JZ 0x0017343f MOV R13,qword ptr [RAX + 0x28] TEST R13,R13 JZ 0x0017343f CMP byte ptr [R13 + 0x14],0x0 JZ 0x0017343f LEA RDX,[RBP + -0x550] MOV qword ptr [RDX],RBX MOV qword ptr [RDX + 0x8],R12 MOV RAX,qword ptr [RBX] MOV qword ptr [RDX + 0x10],RAX LEA RSI,[0x17749b] MOV RDI,R13 CALL 0x00186018 JMP 0x00173442 LAB_00173416: AND EAX,0xfffffffe MOV dword ptr [RBX + 0x380],EAX LEA RAX,[0x4e4f20] MOV RDX,qword ptr [RAX] MOV RDI,RBX MOV ESI,0x7d6 XOR ECX,ECX XOR EAX,EAX CALL 0x00172dd1 JMP 0x001734f6 LAB_0017343f: XOR R13D,R13D LAB_00173442: MOV RSI,qword ptr [RBX + 0x2b0] MOV RDX,qword ptr [RBX + 0x2b8] MOV RCX,qword ptr [RBX + 0x2c0] MOV R8,qword ptr [RBX + 0x2e8] MOV R9D,dword ptr [RBX + 0x360] MOV EAX,0x80000000 OR RAX,qword ptr [RBX + 0x368] LEA RDI,[RBP + -0x528] PUSH RAX PUSH qword ptr [RBX + 0x2c8] CALL 0x00175b9a ADD RSP,0x10 TEST RAX,RAX JZ 0x001734a8 MOV RAX,qword ptr [RBX + 0x2f0] MOV RSI,qword ptr [RAX + 0x8] LEA RDI,[RBP + -0x528] CALL 0x001774c3 TEST EAX,EAX JZ 0x0017351d LAB_001734a8: TEST R13,R13 JZ 0x001734b9 MOV RDI,R13 XOR ESI,ESI XOR EDX,EDX CALL 0x00186018 LAB_001734b9: MOV EDX,0xf8 LEA RDI,[RBP + -0x198] XOR ESI,ESI CALL 0x0015f370 LEA RDX,[RBP + -0x291] MOV ESI,dword ptr [RDX + -0x207] LEA RCX,[RBP + -0x491] MOV RDI,RBX XOR EAX,EAX CALL 0x00172dd1 LEA RDI,[RBP + -0x528] CALL 0x001775b8 LAB_001734f6: MOV AL,0x1 LAB_001734f8: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x30] JNZ 0x0017365e ADD RSP,0x528 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0017351d: MOV qword ptr [RBP + -0x530],R13 MOV qword ptr [RBP + -0x538],R15 TEST R14,R14 JZ 0x001735a2 LEA RAX,[0x4e4f20] MOV R12,qword ptr [RAX] XOR R13D,R13D LAB_0017353d: MOV R15,qword ptr [R14 + 0x10] CMP dword ptr [R15 + 0x50],0x0 JZ 0x00173599 MOV dword ptr [R15 + 0x50],0x0 MOV dword ptr [R15 + 0x108],0x7dd LEA RDI,[R15 + 0x30d] MOV EDX,0x5 MOV RSI,R12 CALL 0x0015f180 MOV byte ptr [R15 + 0x312],R13B LEA RDI,[R15 + 0x10c] LEA RAX,[0x4e4f30] MOV RSI,qword ptr [RAX + 0x68] MOV EDX,0x200 CALL 0x0015f180 MOV byte ptr [R15 + 0x30b],R13B LAB_00173599: MOV R14,qword ptr [R14 + 0x8] TEST R14,R14 JNZ 0x0017353d LAB_001735a2: MOV AL,byte ptr [RBX + 0x48c] MOV byte ptr [RBP + -0x9c],AL MOV RAX,qword ptr [RBX + 0x4c8] MOV qword ptr [RBP + -0x60],RAX MOV qword ptr [RBX + 0x4c8],0x0 MOV RDI,qword ptr [RBP + -0x530] TEST RDI,RDI JZ 0x001735d9 XOR ESI,ESI XOR EDX,EDX CALL 0x00186018 LAB_001735d9: MOV EDX,0xf8 MOV RDI,qword ptr [RBP + -0x538] XOR ESI,ESI CALL 0x0015f370 MOV byte ptr [RBX + 0x48c],0x0 MOV RDI,RBX CALL 0x001775b8 LEA RSI,[RBP + -0x528] MOV EDX,0x4f8 MOV RDI,RBX CALL 0x0015f0e0 MOV RAX,qword ptr [RBX] MOV qword ptr [RAX + 0x40],RBX MOV RAX,qword ptr [RBX] TEST RAX,RAX JZ 0x00173639 MOV RDI,qword ptr [RAX + 0x38] TEST RDI,RDI JZ 0x00173639 CALL 0x0017b03a TEST RAX,RAX JZ 0x00173639 MOV RDI,RBX CALL 0x0017b2f6 LAB_00173639: MOV RDI,RBX CALL 0x0018e7d4 MOV qword ptr [RBX + 0x338],-0x1 MOV qword ptr [RBX + 0x2e0],0x0 XOR EAX,EAX JMP 0x001734f8 LAB_0017365e: CALL 0x0015f320
int8 mariadb_reconnect(long *param_1) { long *plVar1; code *UNRECOVERED_JUMPTABLE; int *__src; int iVar2; int8 uVar3; long lVar4; long lVar5; long lVar6; long in_FS_OFFSET; int1 local_530 [144]; int4 local_4a0; int1 local_499 [512]; int1 local_299 [249]; int1 local_1a0 [80]; int8 local_150; int8 uStack_148; int1 local_a4; long local_68; long *local_40; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); lVar5 = param_1[0x99]; if (((((long *)param_1[0x9e] != (long *)0x0) && (plVar1 = *(long **)param_1[0x9e], plVar1 != (long *)0x0)) && (lVar6 = *plVar1, lVar6 != 0)) && (UNRECOVERED_JUMPTABLE = *(code **)(lVar6 + 0x78), UNRECOVERED_JUMPTABLE != (code *)0x0)) { if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { /* WARNING: Could not recover jumptable at 0x00173343. Too many branches */ /* WARNING: Treating indirect jump as call */ uVar3 = (*UNRECOVERED_JUMPTABLE)(param_1); return uVar3; } goto LAB_0017365e; } if (((*(uint *)(param_1 + 0x70) & 1) == 0 && *(char *)((long)param_1 + 0x43b) != '\0') && (param_1[0x5b] != 0)) { mysql_init(local_530); local_a4 = 0; memcpy(local_1a0,param_1 + 0x72,0xf8); if (*(long *)param_1[0x9e] != 0) { *local_40 = *(long *)param_1[0x9e]; *(int8 *)param_1[0x9e] = 0; } local_150 = 0; uStack_148 = 0; if (((param_1[0x90] == 0) || (lVar6 = *(long *)(param_1[0x90] + 0x28), lVar6 == 0)) || (*(char *)(lVar6 + 0x14) == '\0')) { lVar6 = 0; } else { my_context_install_suspend_resume_hook(lVar6,my_suspend_hook); } lVar4 = mysql_real_connect(local_530,param_1[0x56],param_1[0x57],param_1[0x58],param_1[0x5d], (int)param_1[0x6c],param_1[0x59],param_1[0x6d] | 0x80000000); if ((lVar4 == 0) || (iVar2 = mysql_set_character_set(local_530), __src = SQLSTATE_UNKNOWN, iVar2 != 0)) { if (lVar6 != 0) { my_context_install_suspend_resume_hook(lVar6,0,0); } memset(local_1a0,0,0xf8); my_set_error(param_1,local_4a0,local_299,local_499); mysql_close(local_530); goto LAB_001734f6; } for (; lVar5 != 0; lVar5 = *(long *)(lVar5 + 8)) { lVar4 = *(long *)(lVar5 + 0x10); if (*(int *)(lVar4 + 0x50) != 0) { *(int4 *)(lVar4 + 0x50) = 0; *(int4 *)(lVar4 + 0x108) = 0x7dd; strncpy((char *)(lVar4 + 0x30d),__src,5); *(int1 *)(lVar4 + 0x312) = 0; strncpy((char *)(lVar4 + 0x10c),PTR_s_Lost_connection_to_server_during_004e4f98,0x200); *(int1 *)(lVar4 + 0x30b) = 0; } } local_a4 = *(int1 *)((long)param_1 + 0x48c); local_68 = param_1[0x99]; param_1[0x99] = 0; if (lVar6 != 0) { my_context_install_suspend_resume_hook(lVar6,0,0); } memset(param_1 + 0x72,0,0xf8); *(int1 *)((long)param_1 + 0x48c) = 0; mysql_close(param_1); memcpy(param_1,local_530,0x4f8); *(long **)(*param_1 + 0x40) = param_1; if (((*param_1 != 0) && (*(long *)(*param_1 + 0x38) != 0)) && (lVar5 = ma_pvio_tls_cipher(), lVar5 != 0)) { ma_pvio_tls_set_connection(param_1); } ma_net_clear(param_1); param_1[0x67] = -1; param_1[0x5c] = 0; uVar3 = 0; } else { *(uint *)(param_1 + 0x70) = *(uint *)(param_1 + 0x70) & 0xfffffffe; my_set_error(param_1,0x7d6,SQLSTATE_UNKNOWN,0); LAB_001734f6: uVar3 = 1; } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return uVar3; } LAB_0017365e: /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
23,401
minja::html_escape(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/minja.hpp
static std::string html_escape(const std::string & s) { std::string result; result.reserve(s.size()); for (const auto & c : s) { switch (c) { case '&': result += "&amp;"; break; case '<': result += "&lt;"; break; case '>': result += "&gt;"; break; case '"': result += "&#34;"; break; case '\'': result += "&apos;"; break; default: result += c; break; } } return result; }
O0
cpp
minja::html_escape(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): subq $0x68, %rsp movq %rdi, 0x18(%rsp) movq %rdi, %rax movq %rax, 0x10(%rsp) movq %rdi, 0x60(%rsp) movq %rsi, 0x58(%rsp) movb $0x0, 0x57(%rsp) callq 0x5a610 movq 0x58(%rsp), %rdi callq 0x5a520 movq 0x18(%rsp), %rdi movq %rax, %rsi callq 0x5af20 jmp 0xf9f1e movq 0x58(%rsp), %rax movq %rax, 0x38(%rsp) movq 0x38(%rsp), %rdi callq 0x5a390 movq %rax, 0x30(%rsp) movq 0x38(%rsp), %rdi callq 0x5b320 movq %rax, 0x28(%rsp) leaq 0x30(%rsp), %rdi leaq 0x28(%rsp), %rsi callq 0xa9450 testb $0x1, %al jne 0xf9f5e jmp 0xfa04a leaq 0x30(%rsp), %rdi callq 0xa94a0 movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rax movsbl (%rax), %eax addl $-0x22, %eax movl %eax, %ecx movq %rcx, 0x8(%rsp) subl $0x1c, %eax ja 0xfa023 movq 0x8(%rsp), %rax leaq 0x1191fc(%rip), %rcx # 0x213190 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x18(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x48(%rsp) movl %eax, 0x44(%rsp) callq 0x5b648 jmp 0xfa06a movq 0x18(%rsp), %rdi leaq 0x11c0b7(%rip), %rsi # 0x21607d callq 0x5a220 jmp 0xf9fcd jmp 0xfa039 movq 0x18(%rsp), %rdi leaq 0x11c0a8(%rip), %rsi # 0x216083 callq 0x5a220 jmp 0xf9fe2 jmp 0xfa039 movq 0x18(%rsp), %rdi leaq 0x11c098(%rip), %rsi # 0x216088 callq 0x5a220 jmp 0xf9ff7 jmp 0xfa039 movq 0x18(%rsp), %rdi leaq 0x11c088(%rip), %rsi # 0x21608d callq 0x5a220 jmp 0xfa00c jmp 0xfa039 movq 0x18(%rsp), %rdi leaq 0x11c079(%rip), %rsi # 0x216093 callq 0x5a220 jmp 0xfa021 jmp 0xfa039 movq 0x18(%rsp), %rdi movq 0x20(%rsp), %rax movsbl (%rax), %esi callq 0x5acf0 jmp 0xfa037 jmp 0xfa039 jmp 0xfa03b leaq 0x30(%rsp), %rdi callq 0xa9550 jmp 0xf9f46 movb $0x1, 0x57(%rsp) testb $0x1, 0x57(%rsp) jne 0xfa060 movq 0x18(%rsp), %rdi callq 0x5b648 movq 0x10(%rsp), %rax addq $0x68, %rsp retq movq 0x48(%rsp), %rdi callq 0x5ac00 nopw %cs:(%rax,%rax)
_ZN5minjaL11html_escapeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: sub rsp, 68h mov [rsp+68h+var_50], rdi mov rax, rdi mov [rsp+68h+var_58], rax mov [rsp+68h+var_8], rdi mov [rsp+68h+var_10], rsi mov [rsp+68h+var_11], 0 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void) mov rdi, [rsp+68h+var_10] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void) mov rdi, [rsp+68h+var_50] mov rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) jmp short $+2 loc_F9F1E: mov rax, [rsp+68h+var_10] mov [rsp+68h+var_30], rax mov rdi, [rsp+68h+var_30] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv; std::string::begin(void) mov [rsp+68h+var_38], rax mov rdi, [rsp+68h+var_30] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv; std::string::end(void) mov [rsp+68h+var_40], rax loc_F9F46: lea rdi, [rsp+68h+var_38] lea rsi, [rsp+68h+var_40] call _ZN9__gnu_cxxneIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_; __gnu_cxx::operator!=<char const*,std::string>(__gnu_cxx::__normal_iterator<char const*,std::string> const&,__gnu_cxx::__normal_iterator<char const*,std::string> const&) test al, 1 jnz short loc_F9F5E jmp loc_FA04A loc_F9F5E: lea rdi, [rsp+68h+var_38] call _ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator*(void) mov [rsp+68h+var_48], rax mov rax, [rsp+68h+var_48] movsx eax, byte ptr [rax] add eax, 0FFFFFFDEh; switch 29 cases mov ecx, eax mov [rsp+68h+var_60], rcx sub eax, 1Ch ja def_F9F9B; jumptable 00000000000F9F9B default case, cases 35-37,40-59,61 mov rax, [rsp+68h+var_60] lea rcx, jpt_F9F9B movsxd rax, ds:(jpt_F9F9B - 213190h)[rcx+rax*4] add rax, rcx jmp rax; switch jump mov rdi, [rsp+arg_10]; void * mov rcx, rax mov eax, edx mov [rsp+arg_40], rcx mov [rsp+arg_3C], eax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_FA06A loc_F9FBA: mov rdi, [rsp+68h+var_50]; jumptable 00000000000F9F9B case 38 lea rsi, aAmp; "&amp;" call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*) jmp short $+2 loc_F9FCD: jmp short loc_FA039 loc_F9FCF: mov rdi, [rsp+68h+var_50]; jumptable 00000000000F9F9B case 60 lea rsi, aLt; "&lt;" call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*) jmp short $+2 loc_F9FE2: jmp short loc_FA039 loc_F9FE4: mov rdi, [rsp+68h+var_50]; jumptable 00000000000F9F9B case 62 lea rsi, aGt; "&gt;" call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*) jmp short $+2 loc_F9FF7: jmp short loc_FA039 loc_F9FF9: mov rdi, [rsp+68h+var_50]; jumptable 00000000000F9F9B case 34 lea rsi, a34; "&#34;" call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*) jmp short $+2 loc_FA00C: jmp short loc_FA039 loc_FA00E: mov rdi, [rsp+68h+var_50]; jumptable 00000000000F9F9B case 39 lea rsi, aApos; "&apos;" call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*) jmp short $+2 loc_FA021: jmp short loc_FA039 def_F9F9B: mov rdi, [rsp+68h+var_50]; jumptable 00000000000F9F9B default case, cases 35-37,40-59,61 mov rax, [rsp+68h+var_48] movsx esi, byte ptr [rax] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc; std::string::operator+=(char) jmp short $+2 loc_FA037: jmp short $+2 loc_FA039: jmp short $+2 loc_FA03B: lea rdi, [rsp+68h+var_38] call _ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator++(void) jmp loc_F9F46 loc_FA04A: mov [rsp+68h+var_11], 1 test [rsp+68h+var_11], 1 jnz short loc_FA060 mov rdi, [rsp+68h+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_FA060: mov rax, [rsp+68h+var_58] add rsp, 68h retn loc_FA06A: mov rdi, [rsp+arg_40] call __Unwind_Resume
long long minja::html_escape(long long a1, long long a2) { long long v2; // rax _BYTE *v4; // [rsp+20h] [rbp-48h] long long v5; // [rsp+28h] [rbp-40h] BYREF _QWORD v6[4]; // [rsp+30h] [rbp-38h] BYREF char v7; // [rsp+57h] [rbp-11h] long long v8; // [rsp+58h] [rbp-10h] long long v9; // [rsp+60h] [rbp-8h] v9 = a1; v8 = a2; v7 = 0; std::string::basic_string(a1); v2 = std::string::size(a2); std::string::reserve(a1, v2); v6[1] = a2; v6[0] = std::string::begin(a2); v5 = std::string::end(a2); while ( __gnu_cxx::operator!=<char const*,std::string>((long long)v6, (long long)&v5) ) { v4 = (_BYTE *)__gnu_cxx::__normal_iterator<char const*,std::string>::operator*((long long)v6); switch ( *v4 ) { case '"': std::string::operator+=(a1, "&#34;"); break; case '&': std::string::operator+=(a1, "&amp;"); break; case '\'': std::string::operator+=(a1, "&apos;"); break; case '<': std::string::operator+=(a1, "&lt;"); break; case '>': std::string::operator+=(a1, "&gt;"); break; default: std::string::operator+=(a1, (unsigned int)(char)*v4); break; } __gnu_cxx::__normal_iterator<char const*,std::string>::operator++(v6); } return a1; }
html_escape: SUB RSP,0x68 MOV qword ptr [RSP + 0x18],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x60],RDI MOV qword ptr [RSP + 0x58],RSI MOV byte ptr [RSP + 0x57],0x0 CALL 0x0015a610 MOV RDI,qword ptr [RSP + 0x58] CALL 0x0015a520 MOV RDI,qword ptr [RSP + 0x18] MOV RSI,RAX LAB_001f9f17: CALL 0x0015af20 JMP 0x001f9f1e LAB_001f9f1e: MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x38],RAX MOV RDI,qword ptr [RSP + 0x38] CALL 0x0015a390 MOV qword ptr [RSP + 0x30],RAX MOV RDI,qword ptr [RSP + 0x38] CALL 0x0015b320 MOV qword ptr [RSP + 0x28],RAX LAB_001f9f46: LEA RDI,[RSP + 0x30] LEA RSI,[RSP + 0x28] CALL 0x001a9450 TEST AL,0x1 JNZ 0x001f9f5e JMP 0x001fa04a LAB_001f9f5e: LEA RDI,[RSP + 0x30] CALL 0x001a94a0 MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x20] MOVSX EAX,byte ptr [RAX] ADD EAX,-0x22 MOV ECX,EAX MOV qword ptr [RSP + 0x8],RCX SUB EAX,0x1c JA 0x001fa023 MOV RAX,qword ptr [RSP + 0x8] LEA RCX,[0x313190] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_26: MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[0x31607d] CALL 0x0015a220 JMP 0x001f9fcd LAB_001f9fcd: JMP 0x001fa039 caseD_3c: MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[0x316083] CALL 0x0015a220 JMP 0x001f9fe2 LAB_001f9fe2: JMP 0x001fa039 caseD_3e: MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[0x316088] CALL 0x0015a220 JMP 0x001f9ff7 LAB_001f9ff7: JMP 0x001fa039 caseD_22: MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[0x31608d] CALL 0x0015a220 JMP 0x001fa00c LAB_001fa00c: JMP 0x001fa039 caseD_27: MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[0x316093] CALL 0x0015a220 JMP 0x001fa021 LAB_001fa021: JMP 0x001fa039 caseD_23: MOV RDI,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x20] MOVSX ESI,byte ptr [RAX] CALL 0x0015acf0 LAB_001fa035: JMP 0x001fa037 LAB_001fa037: JMP 0x001fa039 LAB_001fa039: JMP 0x001fa03b LAB_001fa03b: LEA RDI,[RSP + 0x30] CALL 0x001a9550 JMP 0x001f9f46 LAB_001fa04a: MOV byte ptr [RSP + 0x57],0x1 TEST byte ptr [RSP + 0x57],0x1 JNZ 0x001fa060 MOV RDI,qword ptr [RSP + 0x18] CALL 0x0015b648 LAB_001fa060: MOV RAX,qword ptr [RSP + 0x10] ADD RSP,0x68 RET
/* WARNING: Removing unreachable block (ram,0x001fa056) */ /* minja::html_escape(std::__cxx11::string const&) */ minja * __thiscall minja::html_escape(minja *this,string *param_1) { bool bVar1; char *pcVar2; int8 local_40; int8 local_38; string *local_30; int1 local_11; string *local_10; minja *local_8; local_11 = 0; local_10 = param_1; local_8 = this; std::__cxx11::string::string((string *)this); std::__cxx11::string::size(); /* try { // try from 001f9f17 to 001fa034 has its CatchHandler @ 001f9f9d */ std::__cxx11::string::reserve((ulong)this); local_30 = local_10; local_38 = std::__cxx11::string::begin(); local_40 = std::__cxx11::string::end(); while (bVar1 = __gnu_cxx::operator!= ((__normal_iterator *)&local_38,(__normal_iterator *)&local_40), bVar1) { pcVar2 = (char *)__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::operator* ((__normal_iterator<char_const*,std::__cxx11::string> *)&local_38); switch(*pcVar2) { case '\"': std::__cxx11::string::operator+=((string *)this,"&#34;"); break; default: std::__cxx11::string::operator+=((string *)this,*pcVar2); break; case '&': std::__cxx11::string::operator+=((string *)this,"&amp;"); break; case '\'': std::__cxx11::string::operator+=((string *)this,"&apos;"); break; case '<': std::__cxx11::string::operator+=((string *)this,"&lt;"); break; case '>': std::__cxx11::string::operator+=((string *)this,"&gt;"); } __gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::operator++ ((__normal_iterator<char_const*,std::__cxx11::string> *)&local_38); } return this; }
23,402
my_b_flush_io_cache
eloqsql/mysys/mf_iocache.c
int my_b_flush_io_cache(IO_CACHE *info, int need_append_buffer_lock) { size_t length; my_bool append_cache= (info->type == SEQ_READ_APPEND); DBUG_ENTER("my_b_flush_io_cache"); DBUG_PRINT("enter", ("cache: %p", info)); if (!append_cache) need_append_buffer_lock= 0; if (info->type == WRITE_CACHE || append_cache) { if (info->file == -1) { if (real_open_cached_file(info)) DBUG_RETURN((info->error= -1)); } LOCK_APPEND_BUFFER; if ((length=(size_t) (info->write_pos - info->write_buffer))) { if (append_cache) { if (mysql_file_write(info->file, info->write_buffer, length, info->myflags | MY_NABP)) { info->error= -1; DBUG_RETURN(-1); } info->end_of_file+= info->write_pos - info->append_read_pos; info->append_read_pos= info->write_buffer; DBUG_ASSERT(info->end_of_file == mysql_file_tell(info->file, MYF(0))); } else { int res= info->write_function(info, info->write_buffer, length); if (res) DBUG_RETURN(res); set_if_bigger(info->end_of_file, info->pos_in_file); } info->write_end= (info->write_buffer + info->buffer_length - ((info->pos_in_file + length) & (IO_SIZE - 1))); info->write_pos= info->write_buffer; ++info->disk_writes; UNLOCK_APPEND_BUFFER; DBUG_RETURN(info->error); } } UNLOCK_APPEND_BUFFER; DBUG_RETURN(0); }
O0
c
my_b_flush_io_cache: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq -0x10(%rbp), %rax cmpl $0x3, 0xb0(%rax) sete %al andb $0x1, %al movzbl %al, %eax movb %al, -0x21(%rbp) jmp 0xafdc7 cmpb $0x0, -0x21(%rbp) jne 0xafdd4 movl $0x0, -0x14(%rbp) movq -0x10(%rbp), %rax cmpl $0x2, 0xb0(%rax) je 0xafdee movsbl -0x21(%rbp), %eax cmpl $0x0, %eax je 0xaffd3 movq -0x10(%rbp), %rax cmpl $-0x1, 0xd4(%rax) jne 0xafe26 movq -0x10(%rbp), %rdi callq 0xcdc30 cmpb $0x0, %al je 0xafe24 jmp 0xafe0a movq -0x10(%rbp), %rax movl $0xffffffff, 0xe4(%rax) # imm = 0xFFFFFFFF movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xaffef jmp 0xafe26 cmpl $0x0, -0x14(%rbp) je 0xafe45 movq -0x10(%rbp), %rdi addq $0x50, %rdi leaq 0x70b75(%rip), %rsi # 0x1209b0 movl $0x6ad, %edx # imm = 0x6AD callq 0xb0980 movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movq -0x10(%rbp), %rcx movq 0x30(%rcx), %rcx subq %rcx, %rax movq %rax, -0x20(%rbp) cmpq $0x0, %rax je 0xaffd1 cmpb $0x0, -0x21(%rbp) je 0xafef9 movq -0x10(%rbp), %rax movl 0xd4(%rax), %edx movq -0x10(%rbp), %rax movq 0x30(%rax), %rcx movq -0x20(%rbp), %r8 movq -0x10(%rbp), %rax movq 0xf8(%rax), %r9 orq $0x4, %r9 leaq 0x70b14(%rip), %rdi # 0x1209b0 movl $0x6b4, %esi # imm = 0x6B4 callq 0xb0dd0 cmpq $0x0, %rax je 0xafec6 movq -0x10(%rbp), %rax movl $0xffffffff, 0xe4(%rax) # imm = 0xFFFFFFFF movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xaffef movq -0x10(%rbp), %rax movq 0x40(%rax), %rcx movq -0x10(%rbp), %rax movq 0x38(%rax), %rax subq %rax, %rcx movq -0x10(%rbp), %rax addq 0x8(%rax), %rcx movq %rcx, 0x8(%rax) movq -0x10(%rbp), %rax movq 0x30(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x38(%rax) jmp 0xafef7 jmp 0xaff52 movq -0x10(%rbp), %rax movq 0xa8(%rax), %rax movq -0x10(%rbp), %rdi movq -0x10(%rbp), %rcx movq 0x30(%rcx), %rsi movq -0x20(%rbp), %rdx callq *%rax movl %eax, -0x28(%rbp) cmpl $0x0, -0x28(%rbp) je 0xaff2c jmp 0xaff21 movl -0x28(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0xaffef jmp 0xaff2e movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq -0x10(%rbp), %rcx cmpq (%rcx), %rax jae 0xaff4e movq -0x10(%rbp), %rax movq (%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) jmp 0xaff50 jmp 0xaff52 movq -0x10(%rbp), %rax movq 0x30(%rax), %rcx movq -0x10(%rbp), %rax addq 0xe8(%rax), %rcx movq -0x10(%rbp), %rax movq (%rax), %rdx addq -0x20(%rbp), %rdx andq $0xfff, %rdx # imm = 0xFFF xorl %eax, %eax subq %rdx, %rax addq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x48(%rax) movq -0x10(%rbp), %rax movq 0x30(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x40(%rax) movq -0x10(%rbp), %rax movq 0xb8(%rax), %rcx addq $0x1, %rcx movq %rcx, 0xb8(%rax) cmpl $0x0, -0x14(%rbp) je 0xaffc0 movq -0x10(%rbp), %rdi addq $0x50, %rdi callq 0xb0ab0 jmp 0xaffc2 movq -0x10(%rbp), %rax movl 0xe4(%rax), %eax movl %eax, -0x4(%rbp) jmp 0xaffef jmp 0xaffd3 cmpl $0x0, -0x14(%rbp) je 0xaffe6 movq -0x10(%rbp), %rdi addq $0x50, %rdi callq 0xb0ab0 jmp 0xaffe8 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
my_b_flush_io_cache: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov rax, [rbp+var_10] cmp dword ptr [rax+0B0h], 3 setz al and al, 1 movzx eax, al mov [rbp+var_21], al jmp short $+2 loc_AFDC7: cmp [rbp+var_21], 0 jnz short loc_AFDD4 mov [rbp+var_14], 0 loc_AFDD4: mov rax, [rbp+var_10] cmp dword ptr [rax+0B0h], 2 jz short loc_AFDEE movsx eax, [rbp+var_21] cmp eax, 0 jz loc_AFFD3 loc_AFDEE: mov rax, [rbp+var_10] cmp dword ptr [rax+0D4h], 0FFFFFFFFh jnz short loc_AFE26 mov rdi, [rbp+var_10] call real_open_cached_file cmp al, 0 jz short loc_AFE24 jmp short $+2 loc_AFE0A: mov rax, [rbp+var_10] mov dword ptr [rax+0E4h], 0FFFFFFFFh mov [rbp+var_4], 0FFFFFFFFh jmp loc_AFFEF loc_AFE24: jmp short $+2 loc_AFE26: cmp [rbp+var_14], 0 jz short loc_AFE45 mov rdi, [rbp+var_10] add rdi, 50h ; 'P' lea rsi, aWorkspaceLlm4b_27; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 6ADh call inline_mysql_mutex_lock_16 loc_AFE45: mov rax, [rbp+var_10] mov rax, [rax+40h] mov rcx, [rbp+var_10] mov rcx, [rcx+30h] sub rax, rcx mov [rbp+var_20], rax cmp rax, 0 jz loc_AFFD1 cmp [rbp+var_21], 0 jz loc_AFEF9 mov rax, [rbp+var_10] mov edx, [rax+0D4h] mov rax, [rbp+var_10] mov rcx, [rax+30h] mov r8, [rbp+var_20] mov rax, [rbp+var_10] mov r9, [rax+0F8h] or r9, 4 lea rdi, aWorkspaceLlm4b_27; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 6B4h call inline_mysql_file_write_1 cmp rax, 0 jz short loc_AFEC6 mov rax, [rbp+var_10] mov dword ptr [rax+0E4h], 0FFFFFFFFh mov [rbp+var_4], 0FFFFFFFFh jmp loc_AFFEF loc_AFEC6: mov rax, [rbp+var_10] mov rcx, [rax+40h] mov rax, [rbp+var_10] mov rax, [rax+38h] sub rcx, rax mov rax, [rbp+var_10] add rcx, [rax+8] mov [rax+8], rcx mov rax, [rbp+var_10] mov rcx, [rax+30h] mov rax, [rbp+var_10] mov [rax+38h], rcx jmp short $+2 loc_AFEF7: jmp short loc_AFF52 loc_AFEF9: mov rax, [rbp+var_10] mov rax, [rax+0A8h] mov rdi, [rbp+var_10] mov rcx, [rbp+var_10] mov rsi, [rcx+30h] mov rdx, [rbp+var_20] call rax mov [rbp+var_28], eax cmp [rbp+var_28], 0 jz short loc_AFF2C jmp short $+2 loc_AFF21: mov eax, [rbp+var_28] mov [rbp+var_4], eax jmp loc_AFFEF loc_AFF2C: jmp short $+2 loc_AFF2E: mov rax, [rbp+var_10] mov rax, [rax+8] mov rcx, [rbp+var_10] cmp rax, [rcx] jnb short loc_AFF4E mov rax, [rbp+var_10] mov rcx, [rax] mov rax, [rbp+var_10] mov [rax+8], rcx loc_AFF4E: jmp short $+2 loc_AFF50: jmp short $+2 loc_AFF52: mov rax, [rbp+var_10] mov rcx, [rax+30h] mov rax, [rbp+var_10] add rcx, [rax+0E8h] mov rax, [rbp+var_10] mov rdx, [rax] add rdx, [rbp+var_20] and rdx, 0FFFh xor eax, eax sub rax, rdx add rcx, rax mov rax, [rbp+var_10] mov [rax+48h], rcx mov rax, [rbp+var_10] mov rcx, [rax+30h] mov rax, [rbp+var_10] mov [rax+40h], rcx mov rax, [rbp+var_10] mov rcx, [rax+0B8h] add rcx, 1 mov [rax+0B8h], rcx cmp [rbp+var_14], 0 jz short loc_AFFC0 mov rdi, [rbp+var_10] add rdi, 50h ; 'P' call inline_mysql_mutex_unlock_17 loc_AFFC0: jmp short $+2 loc_AFFC2: mov rax, [rbp+var_10] mov eax, [rax+0E4h] mov [rbp+var_4], eax jmp short loc_AFFEF loc_AFFD1: jmp short $+2 loc_AFFD3: cmp [rbp+var_14], 0 jz short loc_AFFE6 mov rdi, [rbp+var_10] add rdi, 50h ; 'P' call inline_mysql_mutex_unlock_17 loc_AFFE6: jmp short $+2 loc_AFFE8: mov [rbp+var_4], 0 loc_AFFEF: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long my_b_flush_io_cache(long long a1, int a2) { unsigned int v3; // [rsp+8h] [rbp-28h] bool v4; // [rsp+Fh] [rbp-21h] long long v5; // [rsp+10h] [rbp-20h] v4 = *(_DWORD *)(a1 + 176) == 3; if ( *(_DWORD *)(a1 + 176) != 3 ) a2 = 0; if ( *(_DWORD *)(a1 + 176) != 2 && *(_DWORD *)(a1 + 176) != 3 ) goto LABEL_22; if ( *(_DWORD *)(a1 + 212) == -1 && (unsigned __int8)real_open_cached_file(a1) ) { *(_DWORD *)(a1 + 228) = -1; return (unsigned int)-1; } if ( a2 ) inline_mysql_mutex_lock_16(a1 + 80, "/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 1709LL); v5 = *(_QWORD *)(a1 + 64) - *(_QWORD *)(a1 + 48); if ( v5 ) { if ( v4 ) { if ( inline_mysql_file_write_1( "/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 1716LL, *(unsigned int *)(a1 + 212), *(_QWORD *)(a1 + 48), v5, *(_QWORD *)(a1 + 248) | 4LL) ) { *(_DWORD *)(a1 + 228) = -1; return (unsigned int)-1; } *(_QWORD *)(a1 + 8) += *(_QWORD *)(a1 + 64) - *(_QWORD *)(a1 + 56); *(_QWORD *)(a1 + 56) = *(_QWORD *)(a1 + 48); } else { v3 = (*(long long ( **)(long long, _QWORD, long long))(a1 + 168))(a1, *(_QWORD *)(a1 + 48), v5); if ( v3 ) return v3; if ( *(_QWORD *)(a1 + 8) < *(_QWORD *)a1 ) *(_QWORD *)(a1 + 8) = *(_QWORD *)a1; } *(_QWORD *)(a1 + 72) = *(_QWORD *)(a1 + 232) + *(_QWORD *)(a1 + 48) - (((_WORD)v5 + (unsigned __int16)*(_QWORD *)a1) & 0xFFF); *(_QWORD *)(a1 + 64) = *(_QWORD *)(a1 + 48); ++*(_QWORD *)(a1 + 184); if ( a2 ) inline_mysql_mutex_unlock_17(a1 + 80); return *(unsigned int *)(a1 + 228); } else { LABEL_22: if ( a2 ) inline_mysql_mutex_unlock_17(a1 + 80); return 0; } }
my_b_flush_io_cache: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0xb0],0x3 SETZ AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x21],AL JMP 0x001afdc7 LAB_001afdc7: CMP byte ptr [RBP + -0x21],0x0 JNZ 0x001afdd4 MOV dword ptr [RBP + -0x14],0x0 LAB_001afdd4: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0xb0],0x2 JZ 0x001afdee MOVSX EAX,byte ptr [RBP + -0x21] CMP EAX,0x0 JZ 0x001affd3 LAB_001afdee: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0xd4],-0x1 JNZ 0x001afe26 MOV RDI,qword ptr [RBP + -0x10] CALL 0x001cdc30 CMP AL,0x0 JZ 0x001afe24 JMP 0x001afe0a LAB_001afe0a: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xe4],0xffffffff MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001affef LAB_001afe24: JMP 0x001afe26 LAB_001afe26: CMP dword ptr [RBP + -0x14],0x0 JZ 0x001afe45 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x50 LEA RSI,[0x2209b0] MOV EDX,0x6ad CALL 0x001b0980 LAB_001afe45: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x30] SUB RAX,RCX MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JZ 0x001affd1 CMP byte ptr [RBP + -0x21],0x0 JZ 0x001afef9 MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0xd4] MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x30] MOV R8,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV R9,qword ptr [RAX + 0xf8] OR R9,0x4 LEA RDI,[0x2209b0] MOV ESI,0x6b4 CALL 0x001b0dd0 CMP RAX,0x0 JZ 0x001afec6 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xe4],0xffffffff MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001affef LAB_001afec6: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x40] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] SUB RCX,RAX MOV RAX,qword ptr [RBP + -0x10] ADD RCX,qword ptr [RAX + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x30] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x38],RCX JMP 0x001afef7 LAB_001afef7: JMP 0x001aff52 LAB_001afef9: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xa8] MOV RDI,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RCX + 0x30] MOV RDX,qword ptr [RBP + -0x20] CALL RAX MOV dword ptr [RBP + -0x28],EAX CMP dword ptr [RBP + -0x28],0x0 JZ 0x001aff2c JMP 0x001aff21 LAB_001aff21: MOV EAX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x4],EAX JMP 0x001affef LAB_001aff2c: JMP 0x001aff2e LAB_001aff2e: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX] JNC 0x001aff4e MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX LAB_001aff4e: JMP 0x001aff50 LAB_001aff50: JMP 0x001aff52 LAB_001aff52: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x30] MOV RAX,qword ptr [RBP + -0x10] ADD RCX,qword ptr [RAX + 0xe8] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX] ADD RDX,qword ptr [RBP + -0x20] AND RDX,0xfff XOR EAX,EAX SUB RAX,RDX ADD RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x48],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x30] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x40],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0xb8] ADD RCX,0x1 MOV qword ptr [RAX + 0xb8],RCX CMP dword ptr [RBP + -0x14],0x0 JZ 0x001affc0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x50 CALL 0x001b0ab0 LAB_001affc0: JMP 0x001affc2 LAB_001affc2: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0xe4] MOV dword ptr [RBP + -0x4],EAX JMP 0x001affef LAB_001affd1: JMP 0x001affd3 LAB_001affd3: CMP dword ptr [RBP + -0x14],0x0 JZ 0x001affe6 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x50 CALL 0x001b0ab0 LAB_001affe6: JMP 0x001affe8 LAB_001affe8: MOV dword ptr [RBP + -0x4],0x0 LAB_001affef: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int my_b_flush_io_cache(ulong *param_1,int param_2) { char cVar1; int iVar2; long lVar3; long lVar4; bool bVar5; int local_1c; bVar5 = (int)param_1[0x16] == 3; local_1c = param_2; if (!bVar5) { local_1c = 0; } if (((int)param_1[0x16] == 2) || (bVar5)) { if ((*(int *)((long)param_1 + 0xd4) == -1) && (cVar1 = real_open_cached_file(param_1), cVar1 != '\0')) { *(int4 *)((long)param_1 + 0xe4) = 0xffffffff; return -1; } if (local_1c != 0) { inline_mysql_mutex_lock (param_1 + 10,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x6ad); } lVar3 = param_1[8] - param_1[6]; if (lVar3 != 0) { if (bVar5) { lVar4 = inline_mysql_file_write ("/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x6b4, *(int4 *)((long)param_1 + 0xd4),param_1[6],lVar3,param_1[0x1f] | 4) ; if (lVar4 != 0) { *(int4 *)((long)param_1 + 0xe4) = 0xffffffff; return -1; } param_1[1] = (param_1[8] - param_1[7]) + param_1[1]; param_1[7] = param_1[6]; } else { iVar2 = (*(code *)param_1[0x15])(param_1,param_1[6],lVar3); if (iVar2 != 0) { return iVar2; } if (param_1[1] < *param_1) { param_1[1] = *param_1; } } param_1[9] = (param_1[6] + param_1[0x1d]) - (*param_1 + lVar3 & 0xfff); param_1[8] = param_1[6]; param_1[0x17] = param_1[0x17] + 1; if (local_1c != 0) { inline_mysql_mutex_unlock(param_1 + 10); } return *(int *)((long)param_1 + 0xe4); } } if (local_1c != 0) { inline_mysql_mutex_unlock(param_1 + 10); } return 0; }
23,403
OpenGL_Init_4_0
SDL3Lite/dependencies/OpenGL.h
void OpenGL_Init_4_0() { glMinSampleShading = (PFNGLMINSAMPLESHADINGPROC)OpenGL_Load("glMinSampleShading"); glBlendEquationi = (PFNGLBLENDEQUATIONIPROC)OpenGL_Load("glBlendEquationi"); glBlendEquationSeparatei = (PFNGLBLENDEQUATIONSEPARATEIPROC)OpenGL_Load("glBlendEquationSeparatei"); glBlendFunci = (PFNGLBLENDFUNCIPROC)OpenGL_Load("glBlendFunci"); glBlendFuncSeparatei = (PFNGLBLENDFUNCSEPARATEIPROC)OpenGL_Load("glBlendFuncSeparatei"); glDrawArraysIndirect = (PFNGLDRAWARRAYSINDIRECTPROC)OpenGL_Load("glDrawArraysIndirect"); glDrawElementsIndirect = (PFNGLDRAWELEMENTSINDIRECTPROC)OpenGL_Load("glDrawElementsIndirect"); glUniform1d = (PFNGLUNIFORM1DPROC)OpenGL_Load("glUniform1d"); glUniform2d = (PFNGLUNIFORM2DPROC)OpenGL_Load("glUniform2d"); glUniform3d = (PFNGLUNIFORM3DPROC)OpenGL_Load("glUniform3d"); glUniform4d = (PFNGLUNIFORM4DPROC)OpenGL_Load("glUniform4d"); glUniform1dv = (PFNGLUNIFORM1DVPROC)OpenGL_Load("glUniform1dv"); glUniform2dv = (PFNGLUNIFORM2DVPROC)OpenGL_Load("glUniform2dv"); glUniform3dv = (PFNGLUNIFORM3DVPROC)OpenGL_Load("glUniform3dv"); glUniform4dv = (PFNGLUNIFORM4DVPROC)OpenGL_Load("glUniform4dv"); glUniformMatrix2dv = (PFNGLUNIFORMMATRIX2DVPROC)OpenGL_Load("glUniformMatrix2dv"); glUniformMatrix3dv = (PFNGLUNIFORMMATRIX3DVPROC)OpenGL_Load("glUniformMatrix3dv"); glUniformMatrix4dv = (PFNGLUNIFORMMATRIX4DVPROC)OpenGL_Load("glUniformMatrix4dv"); glUniformMatrix2x3dv = (PFNGLUNIFORMMATRIX2X3DVPROC)OpenGL_Load("glUniformMatrix2x3dv"); glUniformMatrix2x4dv = (PFNGLUNIFORMMATRIX2X4DVPROC)OpenGL_Load("glUniformMatrix2x4dv"); glUniformMatrix3x2dv = (PFNGLUNIFORMMATRIX3X2DVPROC)OpenGL_Load("glUniformMatrix3x2dv"); glUniformMatrix3x4dv = (PFNGLUNIFORMMATRIX3X4DVPROC)OpenGL_Load("glUniformMatrix3x4dv"); glUniformMatrix4x2dv = (PFNGLUNIFORMMATRIX4X2DVPROC)OpenGL_Load("glUniformMatrix4x2dv"); glUniformMatrix4x3dv = (PFNGLUNIFORMMATRIX4X3DVPROC)OpenGL_Load("glUniformMatrix4x3dv"); glGetUniformdv = (PFNGLGETUNIFORMDVPROC)OpenGL_Load("glGetUniformdv"); glGetSubroutineUniformLocation = (PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC)OpenGL_Load("glGetSubroutineUniformLocation"); glGetSubroutineIndex = (PFNGLGETSUBROUTINEINDEXPROC)OpenGL_Load("glGetSubroutineIndex"); glGetActiveSubroutineUniformiv = (PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC)OpenGL_Load("glGetActiveSubroutineUniformiv"); glGetActiveSubroutineUniformName = (PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC)OpenGL_Load("glGetActiveSubroutineUniformName"); glGetActiveSubroutineName = (PFNGLGETACTIVESUBROUTINENAMEPROC)OpenGL_Load("glGetActiveSubroutineName"); glUniformSubroutinesuiv = (PFNGLUNIFORMSUBROUTINESUIVPROC)OpenGL_Load("glUniformSubroutinesuiv"); glGetUniformSubroutineuiv = (PFNGLGETUNIFORMSUBROUTINEUIVPROC)OpenGL_Load("glGetUniformSubroutineuiv"); glGetProgramStageiv = (PFNGLGETPROGRAMSTAGEIVPROC)OpenGL_Load("glGetProgramStageiv"); glPatchParameteri = (PFNGLPATCHPARAMETERIPROC)OpenGL_Load("glPatchParameteri"); glPatchParameterfv = (PFNGLPATCHPARAMETERFVPROC)OpenGL_Load("glPatchParameterfv"); glBindTransformFeedback = (PFNGLBINDTRANSFORMFEEDBACKPROC)OpenGL_Load("glBindTransformFeedback"); glDeleteTransformFeedbacks = (PFNGLDELETETRANSFORMFEEDBACKSPROC)OpenGL_Load("glDeleteTransformFeedbacks"); glGenTransformFeedbacks = (PFNGLGENTRANSFORMFEEDBACKSPROC)OpenGL_Load("glGenTransformFeedbacks"); glIsTransformFeedback = (PFNGLISTRANSFORMFEEDBACKPROC)OpenGL_Load("glIsTransformFeedback"); glPauseTransformFeedback = (PFNGLPAUSETRANSFORMFEEDBACKPROC)OpenGL_Load("glPauseTransformFeedback"); glResumeTransformFeedback = (PFNGLRESUMETRANSFORMFEEDBACKPROC)OpenGL_Load("glResumeTransformFeedback"); glDrawTransformFeedback = (PFNGLDRAWTRANSFORMFEEDBACKPROC)OpenGL_Load("glDrawTransformFeedback"); glDrawTransformFeedbackStream = (PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC)OpenGL_Load("glDrawTransformFeedbackStream"); glBeginQueryIndexed = (PFNGLBEGINQUERYINDEXEDPROC)OpenGL_Load("glBeginQueryIndexed"); glEndQueryIndexed = (PFNGLENDQUERYINDEXEDPROC)OpenGL_Load("glEndQueryIndexed"); glGetQueryIndexediv = (PFNGLGETQUERYINDEXEDIVPROC)OpenGL_Load("glGetQueryIndexediv"); }
O3
c
OpenGL_Init_4_0: pushq %rax leaq 0x1098a(%rip), %rdi # 0x32b22 callq 0x1eb10 movq %rax, 0x1a834(%rip) # 0x3c9d8 leaq 0x1098a(%rip), %rdi # 0x32b35 callq 0x1eb10 movq %rax, 0x1a829(%rip) # 0x3c9e0 leaq 0x10988(%rip), %rdi # 0x32b46 callq 0x1eb10 movq %rax, 0x1a81e(%rip) # 0x3c9e8 leaq 0x1098e(%rip), %rdi # 0x32b5f callq 0x1eb10 movq %rax, 0x1a813(%rip) # 0x3c9f0 leaq 0x10988(%rip), %rdi # 0x32b6c callq 0x1eb10 movq %rax, 0x1a808(%rip) # 0x3c9f8 leaq 0x1098a(%rip), %rdi # 0x32b81 callq 0x1eb10 movq %rax, 0x1a7fd(%rip) # 0x3ca00 leaq 0x1098c(%rip), %rdi # 0x32b96 callq 0x1eb10 movq %rax, 0x1a7f2(%rip) # 0x3ca08 leaq 0x10990(%rip), %rdi # 0x32bad callq 0x1eb10 movq %rax, 0x1a7e7(%rip) # 0x3ca10 leaq 0x10989(%rip), %rdi # 0x32bb9 callq 0x1eb10 movq %rax, 0x1a7dc(%rip) # 0x3ca18 leaq 0x10982(%rip), %rdi # 0x32bc5 callq 0x1eb10 movq %rax, 0x1a7d1(%rip) # 0x3ca20 leaq 0x1097b(%rip), %rdi # 0x32bd1 callq 0x1eb10 movq %rax, 0x1a7c6(%rip) # 0x3ca28 leaq 0x10974(%rip), %rdi # 0x32bdd callq 0x1eb10 movq %rax, 0x1a7bb(%rip) # 0x3ca30 leaq 0x1096e(%rip), %rdi # 0x32bea callq 0x1eb10 movq %rax, 0x1a7b0(%rip) # 0x3ca38 leaq 0x10968(%rip), %rdi # 0x32bf7 callq 0x1eb10 movq %rax, 0x1a7a5(%rip) # 0x3ca40 leaq 0x10962(%rip), %rdi # 0x32c04 callq 0x1eb10 movq %rax, 0x1a79a(%rip) # 0x3ca48 leaq 0x1095c(%rip), %rdi # 0x32c11 callq 0x1eb10 movq %rax, 0x1a78f(%rip) # 0x3ca50 leaq 0x1095c(%rip), %rdi # 0x32c24 callq 0x1eb10 movq %rax, 0x1a784(%rip) # 0x3ca58 leaq 0x1095c(%rip), %rdi # 0x32c37 callq 0x1eb10 movq %rax, 0x1a779(%rip) # 0x3ca60 leaq 0x1095c(%rip), %rdi # 0x32c4a callq 0x1eb10 movq %rax, 0x1a76e(%rip) # 0x3ca68 leaq 0x1095e(%rip), %rdi # 0x32c5f callq 0x1eb10 movq %rax, 0x1a763(%rip) # 0x3ca70 leaq 0x10960(%rip), %rdi # 0x32c74 callq 0x1eb10 movq %rax, 0x1a758(%rip) # 0x3ca78 leaq 0x10962(%rip), %rdi # 0x32c89 callq 0x1eb10 movq %rax, 0x1a74d(%rip) # 0x3ca80 leaq 0x10964(%rip), %rdi # 0x32c9e callq 0x1eb10 movq %rax, 0x1a742(%rip) # 0x3ca88 leaq 0x10966(%rip), %rdi # 0x32cb3 callq 0x1eb10 movq %rax, 0x1a737(%rip) # 0x3ca90 leaq 0x10968(%rip), %rdi # 0x32cc8 callq 0x1eb10 movq %rax, 0x1a72c(%rip) # 0x3ca98 leaq 0x10964(%rip), %rdi # 0x32cd7 callq 0x1eb10 movq %rax, 0x1a721(%rip) # 0x3caa0 leaq 0x10970(%rip), %rdi # 0x32cf6 callq 0x1eb10 movq %rax, 0x1a716(%rip) # 0x3caa8 leaq 0x10972(%rip), %rdi # 0x32d0b callq 0x1eb10 movq %rax, 0x1a70b(%rip) # 0x3cab0 leaq 0x1097e(%rip), %rdi # 0x32d2a callq 0x1eb10 movq %rax, 0x1a700(%rip) # 0x3cab8 leaq 0x1098c(%rip), %rdi # 0x32d4b callq 0x1eb10 movq %rax, 0x1a6f5(%rip) # 0x3cac0 leaq 0x10993(%rip), %rdi # 0x32d65 callq 0x1eb10 movq %rax, 0x1a6ea(%rip) # 0x3cac8 leaq 0x10998(%rip), %rdi # 0x32d7d callq 0x1eb10 movq %rax, 0x1a6df(%rip) # 0x3cad0 leaq 0x1099f(%rip), %rdi # 0x32d97 callq 0x1eb10 movq %rax, 0x1a6d4(%rip) # 0x3cad8 leaq 0x109a0(%rip), %rdi # 0x32dab callq 0x1eb10 movq %rax, 0x1a6c9(%rip) # 0x3cae0 leaq 0x1099f(%rip), %rdi # 0x32dbd callq 0x1eb10 movq %rax, 0x1a6be(%rip) # 0x3cae8 leaq 0x1099f(%rip), %rdi # 0x32dd0 callq 0x1eb10 movq %rax, 0x1a6b3(%rip) # 0x3caf0 leaq 0x109a4(%rip), %rdi # 0x32de8 callq 0x1eb10 movq %rax, 0x1a6a8(%rip) # 0x3caf8 leaq 0x109ac(%rip), %rdi # 0x32e03 callq 0x1eb10 movq %rax, 0x1a69d(%rip) # 0x3cb00 leaq 0x109b1(%rip), %rdi # 0x32e1b callq 0x1eb10 movq %rax, 0x1a692(%rip) # 0x3cb08 leaq 0x109b4(%rip), %rdi # 0x32e31 callq 0x1eb10 movq %rax, 0x1a687(%rip) # 0x3cb10 leaq 0x109ba(%rip), %rdi # 0x32e4a callq 0x1eb10 movq %rax, 0x1a67c(%rip) # 0x3cb18 leaq 0x109c1(%rip), %rdi # 0x32e64 callq 0x1eb10 movq %rax, 0x1a671(%rip) # 0x3cb20 leaq 0x109c6(%rip), %rdi # 0x32e7c callq 0x1eb10 movq %rax, 0x1a666(%rip) # 0x3cb28 leaq 0x109d1(%rip), %rdi # 0x32e9a callq 0x1eb10 movq %rax, 0x1a65b(%rip) # 0x3cb30 leaq 0x109d2(%rip), %rdi # 0x32eae callq 0x1eb10 movq %rax, 0x1a650(%rip) # 0x3cb38 leaq 0x109d1(%rip), %rdi # 0x32ec0 callq 0x1eb10 movq %rax, 0x1a645(%rip) # 0x3cb40 popq %rax retq nopl (%rax)
OpenGL_Init_4_0: push rax lea rdi, aGlminsamplesha_0; "glMinSampleShading" call OpenGL_Load mov cs:glMinSampleShading, rax lea rdi, aGlblendequatio_5; "glBlendEquationi" call OpenGL_Load mov cs:glBlendEquationi, rax lea rdi, aGlblendequatio_6; "glBlendEquationSeparatei" call OpenGL_Load mov cs:glBlendEquationSeparatei, rax lea rdi, aGlblendfunci_0; "glBlendFunci" call OpenGL_Load mov cs:glBlendFunci, rax lea rdi, aGlblendfuncsep_2; "glBlendFuncSeparatei" call OpenGL_Load mov cs:glBlendFuncSeparatei, rax lea rdi, aGldrawarraysin_3; "glDrawArraysIndirect" call OpenGL_Load mov cs:glDrawArraysIndirect, rax lea rdi, aGldrawelements_10; "glDrawElementsIndirect" call OpenGL_Load mov cs:glDrawElementsIndirect, rax lea rdi, aGluniform1d_0; "glUniform1d" call OpenGL_Load mov cs:glUniform1d, rax lea rdi, aGluniform2d_0; "glUniform2d" call OpenGL_Load mov cs:glUniform2d, rax lea rdi, aGluniform3d_0; "glUniform3d" call OpenGL_Load mov cs:glUniform3d, rax lea rdi, aGluniform4d_0; "glUniform4d" call OpenGL_Load mov cs:glUniform4d, rax lea rdi, aGluniform1dv_0; "glUniform1dv" call OpenGL_Load mov cs:glUniform1dv, rax lea rdi, aGluniform2dv_0; "glUniform2dv" call OpenGL_Load mov cs:glUniform2dv, rax lea rdi, aGluniform3dv_0; "glUniform3dv" call OpenGL_Load mov cs:glUniform3dv, rax lea rdi, aGluniform4dv_0; "glUniform4dv" call OpenGL_Load mov cs:glUniform4dv, rax lea rdi, aGluniformmatri_26; "glUniformMatrix2dv" call OpenGL_Load mov cs:glUniformMatrix2dv, rax lea rdi, aGluniformmatri_27; "glUniformMatrix3dv" call OpenGL_Load mov cs:glUniformMatrix3dv, rax lea rdi, aGluniformmatri_28; "glUniformMatrix4dv" call OpenGL_Load mov cs:glUniformMatrix4dv, rax lea rdi, aGluniformmatri_29; "glUniformMatrix2x3dv" call OpenGL_Load mov cs:glUniformMatrix2x3dv, rax lea rdi, aGluniformmatri_30; "glUniformMatrix2x4dv" call OpenGL_Load mov cs:glUniformMatrix2x4dv, rax lea rdi, aGluniformmatri_31; "glUniformMatrix3x2dv" call OpenGL_Load mov cs:glUniformMatrix3x2dv, rax lea rdi, aGluniformmatri_32; "glUniformMatrix3x4dv" call OpenGL_Load mov cs:glUniformMatrix3x4dv, rax lea rdi, aGluniformmatri_33; "glUniformMatrix4x2dv" call OpenGL_Load mov cs:glUniformMatrix4x2dv, rax lea rdi, aGluniformmatri_34; "glUniformMatrix4x3dv" call OpenGL_Load mov cs:glUniformMatrix4x3dv, rax lea rdi, aGlgetuniformdv_0; "glGetUniformdv" call OpenGL_Load mov cs:glGetUniformdv, rax lea rdi, aGlgetsubroutin_1; "glGetSubroutineUniformLocation" call OpenGL_Load mov cs:glGetSubroutineUniformLocation, rax lea rdi, aGlgetsubroutin_2; "glGetSubroutineIndex" call OpenGL_Load mov cs:glGetSubroutineIndex, rax lea rdi, aGlgetactivesub_2; "glGetActiveSubroutineUniformiv" call OpenGL_Load mov cs:glGetActiveSubroutineUniformiv, rax lea rdi, aGlgetactivesub_3; "glGetActiveSubroutineUniformName" call OpenGL_Load mov cs:glGetActiveSubroutineUniformName, rax lea rdi, aGlgetactivesub_4; "glGetActiveSubroutineName" call OpenGL_Load mov cs:glGetActiveSubroutineName, rax lea rdi, aGluniformsubro_0; "glUniformSubroutinesuiv" call OpenGL_Load mov cs:glUniformSubroutinesuiv, rax lea rdi, aGlgetuniformsu_0; "glGetUniformSubroutineuiv" call OpenGL_Load mov cs:glGetUniformSubroutineuiv, rax lea rdi, aGlgetprogramst_0; "glGetProgramStageiv" call OpenGL_Load mov cs:glGetProgramStageiv, rax lea rdi, aGlpatchparamet_1; "glPatchParameteri" call OpenGL_Load mov cs:glPatchParameteri, rax lea rdi, aGlpatchparamet_2; "glPatchParameterfv" call OpenGL_Load mov cs:glPatchParameterfv, rax lea rdi, aGlbindtransfor_0; "glBindTransformFeedback" call OpenGL_Load mov cs:glBindTransformFeedback, rax lea rdi, aGldeletetransf_0; "glDeleteTransformFeedbacks" call OpenGL_Load mov cs:glDeleteTransformFeedbacks, rax lea rdi, aGlgentransform_0; "glGenTransformFeedbacks" call OpenGL_Load mov cs:glGenTransformFeedbacks, rax lea rdi, aGlistransformf_0; "glIsTransformFeedback" call OpenGL_Load mov cs:glIsTransformFeedback, rax lea rdi, aGlpausetransfo_0; "glPauseTransformFeedback" call OpenGL_Load mov cs:glPauseTransformFeedback, rax lea rdi, aGlresumetransf_0; "glResumeTransformFeedback" call OpenGL_Load mov cs:glResumeTransformFeedback, rax lea rdi, aGldrawtransfor_3; "glDrawTransformFeedback" call OpenGL_Load mov cs:glDrawTransformFeedback, rax lea rdi, aGldrawtransfor_4; "glDrawTransformFeedbackStream" call OpenGL_Load mov cs:glDrawTransformFeedbackStream, rax lea rdi, aGlbeginqueryin_0; "glBeginQueryIndexed" call OpenGL_Load mov cs:glBeginQueryIndexed, rax lea rdi, aGlendqueryinde_0; "glEndQueryIndexed" call OpenGL_Load mov cs:glEndQueryIndexed, rax lea rdi, aGlgetqueryinde_0; "glGetQueryIndexediv" call OpenGL_Load mov cs:glGetQueryIndexediv, rax pop rax retn
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> OpenGL_Init_4_0() { glMinSampleShading = OpenGL_Load("glMinSampleShading"); glBlendEquationi = OpenGL_Load("glBlendEquationi"); glBlendEquationSeparatei = OpenGL_Load("glBlendEquationSeparatei"); glBlendFunci = OpenGL_Load("glBlendFunci"); glBlendFuncSeparatei = OpenGL_Load("glBlendFuncSeparatei"); glDrawArraysIndirect = OpenGL_Load("glDrawArraysIndirect"); glDrawElementsIndirect = OpenGL_Load("glDrawElementsIndirect"); glUniform1d = OpenGL_Load("glUniform1d"); glUniform2d = OpenGL_Load("glUniform2d"); glUniform3d = OpenGL_Load("glUniform3d"); glUniform4d = OpenGL_Load("glUniform4d"); glUniform1dv = OpenGL_Load("glUniform1dv"); glUniform2dv = OpenGL_Load("glUniform2dv"); glUniform3dv = OpenGL_Load("glUniform3dv"); glUniform4dv = OpenGL_Load("glUniform4dv"); glUniformMatrix2dv = OpenGL_Load("glUniformMatrix2dv"); glUniformMatrix3dv = OpenGL_Load("glUniformMatrix3dv"); glUniformMatrix4dv = OpenGL_Load("glUniformMatrix4dv"); glUniformMatrix2x3dv = OpenGL_Load("glUniformMatrix2x3dv"); glUniformMatrix2x4dv = OpenGL_Load("glUniformMatrix2x4dv"); glUniformMatrix3x2dv = OpenGL_Load("glUniformMatrix3x2dv"); glUniformMatrix3x4dv = OpenGL_Load("glUniformMatrix3x4dv"); glUniformMatrix4x2dv = OpenGL_Load("glUniformMatrix4x2dv"); glUniformMatrix4x3dv = OpenGL_Load("glUniformMatrix4x3dv"); glGetUniformdv = OpenGL_Load("glGetUniformdv"); glGetSubroutineUniformLocation = OpenGL_Load("glGetSubroutineUniformLocation"); glGetSubroutineIndex = OpenGL_Load("glGetSubroutineIndex"); glGetActiveSubroutineUniformiv = OpenGL_Load("glGetActiveSubroutineUniformiv"); glGetActiveSubroutineUniformName = OpenGL_Load("glGetActiveSubroutineUniformName"); glGetActiveSubroutineName = OpenGL_Load("glGetActiveSubroutineName"); glUniformSubroutinesuiv = OpenGL_Load("glUniformSubroutinesuiv"); glGetUniformSubroutineuiv = OpenGL_Load("glGetUniformSubroutineuiv"); glGetProgramStageiv = OpenGL_Load("glGetProgramStageiv"); glPatchParameteri = OpenGL_Load("glPatchParameteri"); glPatchParameterfv = OpenGL_Load("glPatchParameterfv"); glBindTransformFeedback = OpenGL_Load("glBindTransformFeedback"); glDeleteTransformFeedbacks = OpenGL_Load("glDeleteTransformFeedbacks"); glGenTransformFeedbacks = OpenGL_Load("glGenTransformFeedbacks"); glIsTransformFeedback = OpenGL_Load("glIsTransformFeedback"); glPauseTransformFeedback = OpenGL_Load("glPauseTransformFeedback"); glResumeTransformFeedback = OpenGL_Load("glResumeTransformFeedback"); glDrawTransformFeedback = OpenGL_Load("glDrawTransformFeedback"); glDrawTransformFeedbackStream = OpenGL_Load("glDrawTransformFeedbackStream"); glBeginQueryIndexed = OpenGL_Load("glBeginQueryIndexed"); glEndQueryIndexed = OpenGL_Load("glEndQueryIndexed"); glGetQueryIndexediv = OpenGL_Load("glGetQueryIndexediv"); }
OpenGL_Init_4_0: PUSH RAX LEA RDI,[0x132b22] CALL 0x0011eb10 MOV qword ptr [0x0013c9d8],RAX LEA RDI,[0x132b35] CALL 0x0011eb10 MOV qword ptr [0x0013c9e0],RAX LEA RDI,[0x132b46] CALL 0x0011eb10 MOV qword ptr [0x0013c9e8],RAX LEA RDI,[0x132b5f] CALL 0x0011eb10 MOV qword ptr [0x0013c9f0],RAX LEA RDI,[0x132b6c] CALL 0x0011eb10 MOV qword ptr [0x0013c9f8],RAX LEA RDI,[0x132b81] CALL 0x0011eb10 MOV qword ptr [0x0013ca00],RAX LEA RDI,[0x132b96] CALL 0x0011eb10 MOV qword ptr [0x0013ca08],RAX LEA RDI,[0x132bad] CALL 0x0011eb10 MOV qword ptr [0x0013ca10],RAX LEA RDI,[0x132bb9] CALL 0x0011eb10 MOV qword ptr [0x0013ca18],RAX LEA RDI,[0x132bc5] CALL 0x0011eb10 MOV qword ptr [0x0013ca20],RAX LEA RDI,[0x132bd1] CALL 0x0011eb10 MOV qword ptr [0x0013ca28],RAX LEA RDI,[0x132bdd] CALL 0x0011eb10 MOV qword ptr [0x0013ca30],RAX LEA RDI,[0x132bea] CALL 0x0011eb10 MOV qword ptr [0x0013ca38],RAX LEA RDI,[0x132bf7] CALL 0x0011eb10 MOV qword ptr [0x0013ca40],RAX LEA RDI,[0x132c04] CALL 0x0011eb10 MOV qword ptr [0x0013ca48],RAX LEA RDI,[0x132c11] CALL 0x0011eb10 MOV qword ptr [0x0013ca50],RAX LEA RDI,[0x132c24] CALL 0x0011eb10 MOV qword ptr [0x0013ca58],RAX LEA RDI,[0x132c37] CALL 0x0011eb10 MOV qword ptr [0x0013ca60],RAX LEA RDI,[0x132c4a] CALL 0x0011eb10 MOV qword ptr [0x0013ca68],RAX LEA RDI,[0x132c5f] CALL 0x0011eb10 MOV qword ptr [0x0013ca70],RAX LEA RDI,[0x132c74] CALL 0x0011eb10 MOV qword ptr [0x0013ca78],RAX LEA RDI,[0x132c89] CALL 0x0011eb10 MOV qword ptr [0x0013ca80],RAX LEA RDI,[0x132c9e] CALL 0x0011eb10 MOV qword ptr [0x0013ca88],RAX LEA RDI,[0x132cb3] CALL 0x0011eb10 MOV qword ptr [0x0013ca90],RAX LEA RDI,[0x132cc8] CALL 0x0011eb10 MOV qword ptr [0x0013ca98],RAX LEA RDI,[0x132cd7] CALL 0x0011eb10 MOV qword ptr [0x0013caa0],RAX LEA RDI,[0x132cf6] CALL 0x0011eb10 MOV qword ptr [0x0013caa8],RAX LEA RDI,[0x132d0b] CALL 0x0011eb10 MOV qword ptr [0x0013cab0],RAX LEA RDI,[0x132d2a] CALL 0x0011eb10 MOV qword ptr [0x0013cab8],RAX LEA RDI,[0x132d4b] CALL 0x0011eb10 MOV qword ptr [0x0013cac0],RAX LEA RDI,[0x132d65] CALL 0x0011eb10 MOV qword ptr [0x0013cac8],RAX LEA RDI,[0x132d7d] CALL 0x0011eb10 MOV qword ptr [0x0013cad0],RAX LEA RDI,[0x132d97] CALL 0x0011eb10 MOV qword ptr [0x0013cad8],RAX LEA RDI,[0x132dab] CALL 0x0011eb10 MOV qword ptr [0x0013cae0],RAX LEA RDI,[0x132dbd] CALL 0x0011eb10 MOV qword ptr [0x0013cae8],RAX LEA RDI,[0x132dd0] CALL 0x0011eb10 MOV qword ptr [0x0013caf0],RAX LEA RDI,[0x132de8] CALL 0x0011eb10 MOV qword ptr [0x0013caf8],RAX LEA RDI,[0x132e03] CALL 0x0011eb10 MOV qword ptr [0x0013cb00],RAX LEA RDI,[0x132e1b] CALL 0x0011eb10 MOV qword ptr [0x0013cb08],RAX LEA RDI,[0x132e31] CALL 0x0011eb10 MOV qword ptr [0x0013cb10],RAX LEA RDI,[0x132e4a] CALL 0x0011eb10 MOV qword ptr [0x0013cb18],RAX LEA RDI,[0x132e64] CALL 0x0011eb10 MOV qword ptr [0x0013cb20],RAX LEA RDI,[0x132e7c] CALL 0x0011eb10 MOV qword ptr [0x0013cb28],RAX LEA RDI,[0x132e9a] CALL 0x0011eb10 MOV qword ptr [0x0013cb30],RAX LEA RDI,[0x132eae] CALL 0x0011eb10 MOV qword ptr [0x0013cb38],RAX LEA RDI,[0x132ec0] CALL 0x0011eb10 MOV qword ptr [0x0013cb40],RAX POP RAX RET
int8 OpenGL_Init_4_0(void) { int8 in_RAX; glMinSampleShading = OpenGL_Load("glMinSampleShading"); glBlendEquationi = OpenGL_Load("glBlendEquationi"); glBlendEquationSeparatei = OpenGL_Load("glBlendEquationSeparatei"); glBlendFunci = OpenGL_Load("glBlendFunci"); glBlendFuncSeparatei = OpenGL_Load("glBlendFuncSeparatei"); glDrawArraysIndirect = OpenGL_Load("glDrawArraysIndirect"); glDrawElementsIndirect = OpenGL_Load("glDrawElementsIndirect"); glUniform1d = OpenGL_Load("glUniform1d"); glUniform2d = OpenGL_Load("glUniform2d"); glUniform3d = OpenGL_Load("glUniform3d"); glUniform4d = OpenGL_Load("glUniform4d"); glUniform1dv = OpenGL_Load("glUniform1dv"); glUniform2dv = OpenGL_Load("glUniform2dv"); glUniform3dv = OpenGL_Load("glUniform3dv"); glUniform4dv = OpenGL_Load("glUniform4dv"); glUniformMatrix2dv = OpenGL_Load("glUniformMatrix2dv"); glUniformMatrix3dv = OpenGL_Load("glUniformMatrix3dv"); glUniformMatrix4dv = OpenGL_Load("glUniformMatrix4dv"); glUniformMatrix2x3dv = OpenGL_Load("glUniformMatrix2x3dv"); glUniformMatrix2x4dv = OpenGL_Load("glUniformMatrix2x4dv"); glUniformMatrix3x2dv = OpenGL_Load("glUniformMatrix3x2dv"); glUniformMatrix3x4dv = OpenGL_Load("glUniformMatrix3x4dv"); glUniformMatrix4x2dv = OpenGL_Load("glUniformMatrix4x2dv"); glUniformMatrix4x3dv = OpenGL_Load("glUniformMatrix4x3dv"); glGetUniformdv = OpenGL_Load("glGetUniformdv"); glGetSubroutineUniformLocation = OpenGL_Load("glGetSubroutineUniformLocation"); glGetSubroutineIndex = OpenGL_Load("glGetSubroutineIndex"); glGetActiveSubroutineUniformiv = OpenGL_Load("glGetActiveSubroutineUniformiv"); glGetActiveSubroutineUniformName = OpenGL_Load("glGetActiveSubroutineUniformName"); glGetActiveSubroutineName = OpenGL_Load("glGetActiveSubroutineName"); glUniformSubroutinesuiv = OpenGL_Load("glUniformSubroutinesuiv"); glGetUniformSubroutineuiv = OpenGL_Load("glGetUniformSubroutineuiv"); glGetProgramStageiv = OpenGL_Load("glGetProgramStageiv"); glPatchParameteri = OpenGL_Load("glPatchParameteri"); glPatchParameterfv = OpenGL_Load("glPatchParameterfv"); glBindTransformFeedback = OpenGL_Load("glBindTransformFeedback"); glDeleteTransformFeedbacks = OpenGL_Load("glDeleteTransformFeedbacks"); glGenTransformFeedbacks = OpenGL_Load("glGenTransformFeedbacks"); glIsTransformFeedback = OpenGL_Load("glIsTransformFeedback"); glPauseTransformFeedback = OpenGL_Load("glPauseTransformFeedback"); glResumeTransformFeedback = OpenGL_Load("glResumeTransformFeedback"); glDrawTransformFeedback = OpenGL_Load("glDrawTransformFeedback"); glDrawTransformFeedbackStream = OpenGL_Load("glDrawTransformFeedbackStream"); glBeginQueryIndexed = OpenGL_Load("glBeginQueryIndexed"); glEndQueryIndexed = OpenGL_Load("glEndQueryIndexed"); glGetQueryIndexediv = OpenGL_Load("glGetQueryIndexediv"); return in_RAX; }
23,404
ggml_graph_get_parent
monkey531[P]llama/ggml/src/ggml.c
static struct ggml_tensor * ggml_graph_get_parent(const struct ggml_cgraph * cgraph, const struct ggml_tensor * node) { for (int i = 0; i < cgraph->n_nodes; i++) { struct ggml_tensor * parent = cgraph->nodes[i]; struct ggml_tensor * grad = ggml_graph_get_grad(cgraph, parent); if (grad == node) { return parent; } } return NULL; }
O0
c
ggml_graph_get_parent: subq $0x38, %rsp movq %rdi, 0x28(%rsp) movq %rsi, 0x20(%rsp) movl $0x0, 0x1c(%rsp) movl 0x1c(%rsp), %eax movq 0x28(%rsp), %rcx cmpl 0x4(%rcx), %eax jge 0x58f96 movq 0x28(%rsp), %rax movq 0x10(%rax), %rax movslq 0x1c(%rsp), %rcx movq (%rax,%rcx,8), %rax movq %rax, 0x10(%rsp) movq 0x28(%rsp), %rdi movq 0x10(%rsp), %rsi callq 0x423b0 movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rax cmpq 0x20(%rsp), %rax jne 0x58f87 movq 0x10(%rsp), %rax movq %rax, 0x30(%rsp) jmp 0x58f9f jmp 0x58f89 movl 0x1c(%rsp), %eax addl $0x1, %eax movl %eax, 0x1c(%rsp) jmp 0x58f36 movq $0x0, 0x30(%rsp) movq 0x30(%rsp), %rax addq $0x38, %rsp retq nopl (%rax)
ggml_graph_get_parent: sub rsp, 38h mov [rsp+38h+var_10], rdi mov [rsp+38h+var_18], rsi mov [rsp+38h+var_1C], 0 loc_58F36: mov eax, [rsp+38h+var_1C] mov rcx, [rsp+38h+var_10] cmp eax, [rcx+4] jge short loc_58F96 mov rax, [rsp+38h+var_10] mov rax, [rax+10h] movsxd rcx, [rsp+38h+var_1C] mov rax, [rax+rcx*8] mov [rsp+38h+var_28], rax mov rdi, [rsp+38h+var_10] mov rsi, [rsp+38h+var_28] call _ggml_graph_get_grad mov [rsp+38h+var_30], rax mov rax, [rsp+38h+var_30] cmp rax, [rsp+38h+var_18] jnz short loc_58F87 mov rax, [rsp+38h+var_28] mov [rsp+38h+var_8], rax jmp short loc_58F9F loc_58F87: jmp short $+2 loc_58F89: mov eax, [rsp+38h+var_1C] add eax, 1 mov [rsp+38h+var_1C], eax jmp short loc_58F36 loc_58F96: mov [rsp+38h+var_8], 0 loc_58F9F: mov rax, [rsp+38h+var_8] add rsp, 38h retn
long long ggml_graph_get_parent(long long a1, long long a2) { long long v3; // [rsp+10h] [rbp-28h] int i; // [rsp+1Ch] [rbp-1Ch] for ( i = 0; i < *(_DWORD *)(a1 + 4); ++i ) { v3 = *(_QWORD *)(*(_QWORD *)(a1 + 16) + 8LL * i); if ( ggml_graph_get_grad(a1, v3) == a2 ) return v3; } return 0LL; }
ggml_graph_get_parent: SUB RSP,0x38 MOV qword ptr [RSP + 0x28],RDI MOV qword ptr [RSP + 0x20],RSI MOV dword ptr [RSP + 0x1c],0x0 LAB_00158f36: MOV EAX,dword ptr [RSP + 0x1c] MOV RCX,qword ptr [RSP + 0x28] CMP EAX,dword ptr [RCX + 0x4] JGE 0x00158f96 MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x10] MOVSXD RCX,dword ptr [RSP + 0x1c] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP + 0x10],RAX MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x10] CALL 0x001423b0 MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x8] CMP RAX,qword ptr [RSP + 0x20] JNZ 0x00158f87 MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x30],RAX JMP 0x00158f9f LAB_00158f87: JMP 0x00158f89 LAB_00158f89: MOV EAX,dword ptr [RSP + 0x1c] ADD EAX,0x1 MOV dword ptr [RSP + 0x1c],EAX JMP 0x00158f36 LAB_00158f96: MOV qword ptr [RSP + 0x30],0x0 LAB_00158f9f: MOV RAX,qword ptr [RSP + 0x30] ADD RSP,0x38 RET
int8 ggml_graph_get_parent(long param_1,long param_2) { int8 uVar1; long lVar2; int local_1c; local_1c = 0; while( true ) { if (*(int *)(param_1 + 4) <= local_1c) { return 0; } uVar1 = *(int8 *)(*(long *)(param_1 + 0x10) + (long)local_1c * 8); lVar2 = ggml_graph_get_grad(param_1,uVar1); if (lVar2 == param_2) break; local_1c = local_1c + 1; } return uVar1; }
23,405
UpdateAudioStreamInLockedState
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raudio.c
static void UpdateAudioStreamInLockedState(AudioStream stream, const void *data, int frameCount) { if (stream.buffer != NULL) { if (stream.buffer->isSubBufferProcessed[0] || stream.buffer->isSubBufferProcessed[1]) { ma_uint32 subBufferToUpdate = 0; if (stream.buffer->isSubBufferProcessed[0] && stream.buffer->isSubBufferProcessed[1]) { // Both buffers are available for updating // Update the first one and make sure the cursor is moved back to the front subBufferToUpdate = 0; stream.buffer->frameCursorPos = 0; } else { // Just update whichever sub-buffer is processed subBufferToUpdate = (stream.buffer->isSubBufferProcessed[0])? 0 : 1; } ma_uint32 subBufferSizeInFrames = stream.buffer->sizeInFrames/2; unsigned char *subBuffer = stream.buffer->data + ((subBufferSizeInFrames*stream.channels*(stream.sampleSize/8))*subBufferToUpdate); // Total frames processed in buffer is always the complete size, filled with 0 if required stream.buffer->framesProcessed += subBufferSizeInFrames; // Does this API expect a whole buffer to be updated in one go? // Assuming so, but if not will need to change this logic if (subBufferSizeInFrames >= (ma_uint32)frameCount) { ma_uint32 framesToWrite = (ma_uint32)frameCount; ma_uint32 bytesToWrite = framesToWrite*stream.channels*(stream.sampleSize/8); memcpy(subBuffer, data, bytesToWrite); // Any leftover frames should be filled with zeros ma_uint32 leftoverFrameCount = subBufferSizeInFrames - framesToWrite; if (leftoverFrameCount > 0) memset(subBuffer + bytesToWrite, 0, leftoverFrameCount*stream.channels*(stream.sampleSize/8)); stream.buffer->isSubBufferProcessed[subBufferToUpdate] = false; } else TRACELOG(LOG_WARNING, "STREAM: Attempting to write too many frames to buffer"); } else TRACELOG(LOG_WARNING, "STREAM: Buffer not available for updating"); } }
O0
c
UpdateAudioStreamInLockedState: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp leaq 0x10(%rbp), %rax movq %rax, -0x38(%rbp) movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) cmpq $0x0, (%rax) je 0x7d7fb movq -0x38(%rbp), %rax movq (%rax), %rax testb $0x1, 0x15c(%rax) jne 0x7d6a5 movq -0x38(%rbp), %rax movq (%rax), %rax testb $0x1, 0x15d(%rax) je 0x7d7e6 movq -0x38(%rbp), %rax movl $0x0, -0x10(%rbp) movq (%rax), %rax testb $0x1, 0x15c(%rax) je 0x7d6e6 movq -0x38(%rbp), %rax movq (%rax), %rax testb $0x1, 0x15d(%rax) je 0x7d6e6 movq -0x38(%rbp), %rax movl $0x0, -0x10(%rbp) movq (%rax), %rax movl $0x0, 0x164(%rax) jmp 0x7d703 movq -0x38(%rbp), %rax movq (%rax), %rax movb 0x15c(%rax), %dl movl $0x1, %eax xorl %ecx, %ecx testb $0x1, %dl cmovnel %ecx, %eax movl %eax, -0x10(%rbp) movq -0x38(%rbp), %rax movq (%rax), %rcx movl 0x160(%rcx), %ecx shrl %ecx movl %ecx, -0x14(%rbp) movq (%rax), %rcx movq 0x170(%rcx), %rcx movl -0x14(%rbp), %edx imull 0x18(%rax), %edx movl 0x14(%rax), %esi shrl $0x3, %esi imull %esi, %edx imull -0x10(%rbp), %edx movl %edx, %edx addq %rdx, %rcx movq %rcx, -0x20(%rbp) movl -0x14(%rbp), %ecx movq (%rax), %rax addl 0x168(%rax), %ecx movl %ecx, 0x168(%rax) movl -0x14(%rbp), %eax cmpl -0xc(%rbp), %eax jb 0x7d7d1 movq -0x38(%rbp), %rcx movl -0xc(%rbp), %eax movl %eax, -0x24(%rbp) movl -0x24(%rbp), %eax imull 0x18(%rcx), %eax movl 0x14(%rcx), %ecx shrl $0x3, %ecx imull %ecx, %eax movl %eax, -0x28(%rbp) movq -0x20(%rbp), %rdi movq -0x8(%rbp), %rsi movl -0x28(%rbp), %eax movl %eax, %edx callq 0xa400 movl -0x14(%rbp), %eax subl -0x24(%rbp), %eax movl %eax, -0x2c(%rbp) cmpl $0x0, -0x2c(%rbp) jbe 0x7d7bd movq -0x38(%rbp), %rcx movq -0x20(%rbp), %rdi movl -0x28(%rbp), %eax addq %rax, %rdi movl -0x2c(%rbp), %eax imull 0x18(%rcx), %eax movl 0x14(%rcx), %ecx shrl $0x3, %ecx imull %ecx, %eax movl %eax, %eax movl %eax, %edx xorl %esi, %esi callq 0xa2d0 movq -0x38(%rbp), %rax movq (%rax), %rax movl -0x10(%rbp), %ecx movb $0x0, 0x15c(%rax,%rcx) jmp 0x7d7e4 movl $0x4, %edi leaq 0x135acd(%rip), %rsi # 0x1b32aa movb $0x0, %al callq 0x182c40 jmp 0x7d7f9 movl $0x4, %edi leaq 0x135aee(%rip), %rsi # 0x1b32e0 movb $0x0, %al callq 0x182c40 jmp 0x7d7fb addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
UpdateAudioStreamInLockedState: push rbp mov rbp, rsp sub rsp, 40h lea rax, [rbp+arg_0] mov [rbp+var_38], rax mov [rbp+var_8], rdi mov [rbp+var_C], esi cmp qword ptr [rax], 0 jz loc_7D7FB mov rax, [rbp+var_38] mov rax, [rax] test byte ptr [rax+15Ch], 1 jnz short loc_7D6A5 mov rax, [rbp+var_38] mov rax, [rax] test byte ptr [rax+15Dh], 1 jz loc_7D7E6 loc_7D6A5: mov rax, [rbp+var_38] mov [rbp+var_10], 0 mov rax, [rax] test byte ptr [rax+15Ch], 1 jz short loc_7D6E6 mov rax, [rbp+var_38] mov rax, [rax] test byte ptr [rax+15Dh], 1 jz short loc_7D6E6 mov rax, [rbp+var_38] mov [rbp+var_10], 0 mov rax, [rax] mov dword ptr [rax+164h], 0 jmp short loc_7D703 loc_7D6E6: mov rax, [rbp+var_38] mov rax, [rax] mov dl, [rax+15Ch] mov eax, 1 xor ecx, ecx test dl, 1 cmovnz eax, ecx mov [rbp+var_10], eax loc_7D703: mov rax, [rbp+var_38] mov rcx, [rax] mov ecx, [rcx+160h] shr ecx, 1 mov [rbp+var_14], ecx mov rcx, [rax] mov rcx, [rcx+170h] mov edx, [rbp+var_14] imul edx, [rax+18h] mov esi, [rax+14h] shr esi, 3 imul edx, esi imul edx, [rbp+var_10] mov edx, edx add rcx, rdx mov [rbp+var_20], rcx mov ecx, [rbp+var_14] mov rax, [rax] add ecx, [rax+168h] mov [rax+168h], ecx mov eax, [rbp+var_14] cmp eax, [rbp+var_C] jb short loc_7D7D1 mov rcx, [rbp+var_38] mov eax, [rbp+var_C] mov [rbp+var_24], eax mov eax, [rbp+var_24] imul eax, [rcx+18h] mov ecx, [rcx+14h] shr ecx, 3 imul eax, ecx mov [rbp+var_28], eax mov rdi, [rbp+var_20] mov rsi, [rbp+var_8] mov eax, [rbp+var_28] mov edx, eax call _memcpy mov eax, [rbp+var_14] sub eax, [rbp+var_24] mov [rbp+var_2C], eax cmp [rbp+var_2C], 0 jbe short loc_7D7BD mov rcx, [rbp+var_38] mov rdi, [rbp+var_20] mov eax, [rbp+var_28] add rdi, rax mov eax, [rbp+var_2C] imul eax, [rcx+18h] mov ecx, [rcx+14h] shr ecx, 3 imul eax, ecx mov eax, eax mov edx, eax xor esi, esi call _memset loc_7D7BD: mov rax, [rbp+var_38] mov rax, [rax] mov ecx, [rbp+var_10] mov byte ptr [rax+rcx+15Ch], 0 jmp short loc_7D7E4 loc_7D7D1: mov edi, 4 lea rsi, aStreamAttempti; "STREAM: Attempting to write too many fr"... mov al, 0 call TraceLog loc_7D7E4: jmp short loc_7D7F9 loc_7D7E6: mov edi, 4 lea rsi, aStreamBufferNo; "STREAM: Buffer not available for updati"... mov al, 0 call TraceLog loc_7D7F9: jmp short $+2 loc_7D7FB: add rsp, 40h pop rbp retn
long long * UpdateAudioStreamInLockedState( long long a1, unsigned int a2, int a3, int a4, int a5, int a6, long long a7, long long a8, long long a9, int a10) { long long *result; // rax long long v11; // rdx unsigned int v12; // ecx unsigned int v13; // [rsp+18h] [rbp-28h] long long v14; // [rsp+20h] [rbp-20h] unsigned int v15; // [rsp+2Ch] [rbp-14h] BOOL v16; // [rsp+30h] [rbp-10h] result = &a7; if ( a7 ) { if ( (*(_BYTE *)(a7 + 348) & 1) != 0 || (*(_BYTE *)(a7 + 349) & 1) != 0 ) { if ( (*(_BYTE *)(a7 + 348) & 1) != 0 && (*(_BYTE *)(a7 + 349) & 1) != 0 ) { v16 = 0; *(_DWORD *)(a7 + 356) = 0; } else { v16 = (*(_BYTE *)(a7 + 348) & 1) == 0; } v15 = *(_DWORD *)(a7 + 352) >> 1; v11 = v16 * (HIDWORD(a9) >> 3) * a10 * v15; v14 = v11 + *(_QWORD *)(a7 + 368); v12 = *(_DWORD *)(a7 + 360) + v15; *(_DWORD *)(a7 + 360) = v12; if ( v15 < a2 ) { return (long long *)TraceLog( 4, (unsigned int)"STREAM: Attempting to write too many frames to buffer", v11, v12, a5, a6); } else { v13 = (HIDWORD(a9) >> 3) * a10 * a2; memcpy(v14, a1, v13); if ( v15 != a2 ) memset(v13 + v14, 0LL, (HIDWORD(a9) >> 3) * a10 * (v15 - a2)); result = (long long *)a7; *(_BYTE *)(a7 + v16 + 348) = 0; } } else { return (long long *)TraceLog(4, (unsigned int)"STREAM: Buffer not available for updating", a3, a4, a5, a6); } } return result; }
UpdateAudioStreamInLockedState: PUSH RBP MOV RBP,RSP SUB RSP,0x40 LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0x38],RAX MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI CMP qword ptr [RAX],0x0 JZ 0x0017d7fb MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX] TEST byte ptr [RAX + 0x15c],0x1 JNZ 0x0017d6a5 MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX] TEST byte ptr [RAX + 0x15d],0x1 JZ 0x0017d7e6 LAB_0017d6a5: MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RBP + -0x10],0x0 MOV RAX,qword ptr [RAX] TEST byte ptr [RAX + 0x15c],0x1 JZ 0x0017d6e6 MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX] TEST byte ptr [RAX + 0x15d],0x1 JZ 0x0017d6e6 MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RBP + -0x10],0x0 MOV RAX,qword ptr [RAX] MOV dword ptr [RAX + 0x164],0x0 JMP 0x0017d703 LAB_0017d6e6: MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX] MOV DL,byte ptr [RAX + 0x15c] MOV EAX,0x1 XOR ECX,ECX TEST DL,0x1 CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x10],EAX LAB_0017d703: MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RAX] MOV ECX,dword ptr [RCX + 0x160] SHR ECX,0x1 MOV dword ptr [RBP + -0x14],ECX MOV RCX,qword ptr [RAX] MOV RCX,qword ptr [RCX + 0x170] MOV EDX,dword ptr [RBP + -0x14] IMUL EDX,dword ptr [RAX + 0x18] MOV ESI,dword ptr [RAX + 0x14] SHR ESI,0x3 IMUL EDX,ESI IMUL EDX,dword ptr [RBP + -0x10] MOV EDX,EDX ADD RCX,RDX MOV qword ptr [RBP + -0x20],RCX MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RAX] ADD ECX,dword ptr [RAX + 0x168] MOV dword ptr [RAX + 0x168],ECX MOV EAX,dword ptr [RBP + -0x14] CMP EAX,dword ptr [RBP + -0xc] JC 0x0017d7d1 MOV RCX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x24],EAX MOV EAX,dword ptr [RBP + -0x24] IMUL EAX,dword ptr [RCX + 0x18] MOV ECX,dword ptr [RCX + 0x14] SHR ECX,0x3 IMUL EAX,ECX MOV dword ptr [RBP + -0x28],EAX MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RBP + -0x28] MOV EDX,EAX CALL 0x0010a400 MOV EAX,dword ptr [RBP + -0x14] SUB EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x2c],EAX CMP dword ptr [RBP + -0x2c],0x0 JBE 0x0017d7bd MOV RCX,qword ptr [RBP + -0x38] MOV RDI,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RBP + -0x28] ADD RDI,RAX MOV EAX,dword ptr [RBP + -0x2c] IMUL EAX,dword ptr [RCX + 0x18] MOV ECX,dword ptr [RCX + 0x14] SHR ECX,0x3 IMUL EAX,ECX MOV EAX,EAX MOV EDX,EAX XOR ESI,ESI CALL 0x0010a2d0 LAB_0017d7bd: MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x10] MOV byte ptr [RAX + RCX*0x1 + 0x15c],0x0 JMP 0x0017d7e4 LAB_0017d7d1: MOV EDI,0x4 LEA RSI,[0x2b32aa] MOV AL,0x0 CALL 0x00282c40 LAB_0017d7e4: JMP 0x0017d7f9 LAB_0017d7e6: MOV EDI,0x4 LEA RSI,[0x2b32e0] MOV AL,0x0 CALL 0x00282c40 LAB_0017d7f9: JMP 0x0017d7fb LAB_0017d7fb: ADD RSP,0x40 POP RBP RET
/* WARNING: Restarted to delay deadcode elimination for space: stack */ void UpdateAudioStreamInLockedState(void *param_1,uint param_2) { uint uVar1; uint uVar2; void *__dest; long in_stack_00000008; int8 in_stack_00000018; int in_stack_00000020; uint local_18; if (in_stack_00000008 != 0) { if (((*(byte *)(in_stack_00000008 + 0x15c) & 1) == 0) && ((*(byte *)(in_stack_00000008 + 0x15d) & 1) == 0)) { TraceLog(4,"STREAM: Buffer not available for updating"); } else { if (((*(byte *)(in_stack_00000008 + 0x15c) & 1) == 0) || ((*(byte *)(in_stack_00000008 + 0x15d) & 1) == 0)) { local_18 = (uint)((*(byte *)(in_stack_00000008 + 0x15c) & 1) == 0); } else { local_18 = 0; *(int4 *)(in_stack_00000008 + 0x164) = 0; } uVar2 = *(uint *)(in_stack_00000008 + 0x160) >> 1; __dest = (void *)(*(long *)(in_stack_00000008 + 0x170) + (ulong)(uVar2 * in_stack_00000020 * (in_stack_00000018._4_4_ >> 3) * local_18 )); *(uint *)(in_stack_00000008 + 0x168) = uVar2 + *(int *)(in_stack_00000008 + 0x168); if (uVar2 < param_2) { TraceLog(4,"STREAM: Attempting to write too many frames to buffer"); } else { uVar1 = param_2 * in_stack_00000020 * (in_stack_00000018._4_4_ >> 3); memcpy(__dest,param_1,(ulong)uVar1); if (uVar2 - param_2 != 0) { memset((void *)((long)__dest + (ulong)uVar1),0, (ulong)((uVar2 - param_2) * in_stack_00000020 * (in_stack_00000018._4_4_ >> 3))); } *(int1 *)(in_stack_00000008 + 0x15c + (ulong)local_18) = 0; } } } return; }
23,406
UpdateAudioStreamInLockedState
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raudio.c
static void UpdateAudioStreamInLockedState(AudioStream stream, const void *data, int frameCount) { if (stream.buffer != NULL) { if (stream.buffer->isSubBufferProcessed[0] || stream.buffer->isSubBufferProcessed[1]) { ma_uint32 subBufferToUpdate = 0; if (stream.buffer->isSubBufferProcessed[0] && stream.buffer->isSubBufferProcessed[1]) { // Both buffers are available for updating // Update the first one and make sure the cursor is moved back to the front subBufferToUpdate = 0; stream.buffer->frameCursorPos = 0; } else { // Just update whichever sub-buffer is processed subBufferToUpdate = (stream.buffer->isSubBufferProcessed[0])? 0 : 1; } ma_uint32 subBufferSizeInFrames = stream.buffer->sizeInFrames/2; unsigned char *subBuffer = stream.buffer->data + ((subBufferSizeInFrames*stream.channels*(stream.sampleSize/8))*subBufferToUpdate); // Total frames processed in buffer is always the complete size, filled with 0 if required stream.buffer->framesProcessed += subBufferSizeInFrames; // Does this API expect a whole buffer to be updated in one go? // Assuming so, but if not will need to change this logic if (subBufferSizeInFrames >= (ma_uint32)frameCount) { ma_uint32 framesToWrite = (ma_uint32)frameCount; ma_uint32 bytesToWrite = framesToWrite*stream.channels*(stream.sampleSize/8); memcpy(subBuffer, data, bytesToWrite); // Any leftover frames should be filled with zeros ma_uint32 leftoverFrameCount = subBufferSizeInFrames - framesToWrite; if (leftoverFrameCount > 0) memset(subBuffer + bytesToWrite, 0, leftoverFrameCount*stream.channels*(stream.sampleSize/8)); stream.buffer->isSubBufferProcessed[subBufferToUpdate] = false; } else TRACELOG(LOG_WARNING, "STREAM: Attempting to write too many frames to buffer"); } else TRACELOG(LOG_WARNING, "STREAM: Buffer not available for updating"); } }
O1
c
UpdateAudioStreamInLockedState: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq 0x40(%rsp), %r13 testq %r13, %r13 je 0x45697 movl %esi, %ecx movq %rdi, %rsi movzbl 0x15c(%r13), %ebp testl %ebp, %ebp je 0x45606 cmpb $0x1, 0x15d(%r13) jne 0x45618 movl $0x0, 0x164(%r13) xorl %ebp, %ebp jmp 0x4561b cmpb $0x1, 0x15d(%r13) jne 0x456a6 testl %ebp, %ebp jne 0x455ed xorl $0x1, %ebp leaq 0x40(%rsp), %rax movl 0x160(%r13), %r14d shrl %r14d movl 0x14(%rax), %ebx shrl $0x3, %ebx imull 0x18(%rax), %ebx movl %ebx, %r15d imull %ebp, %r15d imull %r14d, %r15d addq 0x170(%r13), %r15 addl %r14d, 0x168(%r13) cmpl %ecx, %r14d jae 0x4565b leaq 0x9dc21(%rip), %rsi # 0xe327a jmp 0x456ad movl %ebx, %r12d imull %ecx, %r12d movq %r15, %rdi movq %r12, %rdx movl %ecx, 0x4(%rsp) callq 0x9410 subl 0x4(%rsp), %r14d je 0x4568c addq %r12, %r15 imull %ebx, %r14d movq %r15, %rdi xorl %esi, %esi movq %r14, %rdx callq 0x92d0 movl %ebp, %eax movb $0x0, 0x15c(%r13,%rax) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x9dc03(%rip), %rsi # 0xe32b0 movl $0x4, %edi xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0xbfa73
UpdateAudioStreamInLockedState: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r13, [rsp+38h+arg_0] test r13, r13 jz loc_45697 mov ecx, esi mov rsi, rdi movzx ebp, byte ptr [r13+15Ch] test ebp, ebp jz short loc_45606 loc_455ED: cmp byte ptr [r13+15Dh], 1 jnz short loc_45618 mov dword ptr [r13+164h], 0 xor ebp, ebp jmp short loc_4561B loc_45606: cmp byte ptr [r13+15Dh], 1 jnz loc_456A6 test ebp, ebp jnz short loc_455ED loc_45618: xor ebp, 1 loc_4561B: lea rax, [rsp+38h+arg_0] mov r14d, [r13+160h] shr r14d, 1 mov ebx, [rax+14h] shr ebx, 3 imul ebx, [rax+18h] mov r15d, ebx imul r15d, ebp imul r15d, r14d add r15, [r13+170h] add [r13+168h], r14d cmp r14d, ecx jnb short loc_4565B lea rsi, aStreamAttempti; "STREAM: Attempting to write too many fr"... jmp short loc_456AD loc_4565B: mov r12d, ebx imul r12d, ecx mov rdi, r15 mov rdx, r12 mov [rsp+38h+var_34], ecx call _memcpy sub r14d, [rsp+38h+var_34] jz short loc_4568C add r15, r12 imul r14d, ebx mov rdi, r15 xor esi, esi mov rdx, r14 call _memset loc_4568C: mov eax, ebp mov byte ptr [r13+rax+15Ch], 0 loc_45697: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_456A6: lea rsi, aStreamBufferNo; "STREAM: Buffer not available for updati"... loc_456AD: mov edi, 4 xor eax, eax add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp TraceLog
long long UpdateAudioStreamInLockedState( long long a1, unsigned int a2, int a3, long long a4, int a5, int a6, long long a7, long long a8, long long a9, int a10) { unsigned int v11; // ebp unsigned int v12; // r14d long long v13; // r15 const char *v14; // rsi unsigned int v15; // r14d long long result; // rax if ( a7 ) { if ( !*(_BYTE *)(a7 + 348) ) { if ( *(_BYTE *)(a7 + 349) != 1 ) { v14 = "STREAM: Buffer not available for updating"; return TraceLog(4, (_DWORD)v14, a3, a2, a5, a6); } if ( !*(_BYTE *)(a7 + 348) ) goto LABEL_7; } if ( *(_BYTE *)(a7 + 349) == 1 ) { *(_DWORD *)(a7 + 356) = 0; v11 = 0; } else { LABEL_7: v11 = *(unsigned __int8 *)(a7 + 348) ^ 1; } v12 = *(_DWORD *)(a7 + 352) >> 1; v13 = *(_QWORD *)(a7 + 368) + v12 * v11 * a10 * (HIDWORD(a9) >> 3); *(_DWORD *)(a7 + 360) += v12; if ( v12 < a2 ) { v14 = "STREAM: Attempting to write too many frames to buffer"; return TraceLog(4, (_DWORD)v14, a3, a2, a5, a6); } memcpy(v13); v15 = v12 - a2; if ( v15 ) memset(a2 * a10 * (HIDWORD(a9) >> 3) + v13, 0LL, a10 * (HIDWORD(a9) >> 3) * v15); result = v11; *(_BYTE *)(a7 + v11 + 348) = 0; } return result; }
UpdateAudioStreamInLockedState: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R13,qword ptr [RSP + 0x40] TEST R13,R13 JZ 0x00145697 MOV ECX,ESI MOV RSI,RDI MOVZX EBP,byte ptr [R13 + 0x15c] TEST EBP,EBP JZ 0x00145606 LAB_001455ed: CMP byte ptr [R13 + 0x15d],0x1 JNZ 0x00145618 MOV dword ptr [R13 + 0x164],0x0 XOR EBP,EBP JMP 0x0014561b LAB_00145606: CMP byte ptr [R13 + 0x15d],0x1 JNZ 0x001456a6 TEST EBP,EBP JNZ 0x001455ed LAB_00145618: XOR EBP,0x1 LAB_0014561b: LEA RAX,[RSP + 0x40] MOV R14D,dword ptr [R13 + 0x160] SHR R14D,0x1 MOV EBX,dword ptr [RAX + 0x14] SHR EBX,0x3 IMUL EBX,dword ptr [RAX + 0x18] MOV R15D,EBX IMUL R15D,EBP IMUL R15D,R14D ADD R15,qword ptr [R13 + 0x170] ADD dword ptr [R13 + 0x168],R14D CMP R14D,ECX JNC 0x0014565b LEA RSI,[0x1e327a] JMP 0x001456ad LAB_0014565b: MOV R12D,EBX IMUL R12D,ECX MOV RDI,R15 MOV RDX,R12 MOV dword ptr [RSP + 0x4],ECX CALL 0x00109410 SUB R14D,dword ptr [RSP + 0x4] JZ 0x0014568c ADD R15,R12 IMUL R14D,EBX MOV RDI,R15 XOR ESI,ESI MOV RDX,R14 CALL 0x001092d0 LAB_0014568c: MOV EAX,EBP MOV byte ptr [R13 + RAX*0x1 + 0x15c],0x0 LAB_00145697: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001456a6: LEA RSI,[0x1e32b0] LAB_001456ad: MOV EDI,0x4 XOR EAX,EAX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001bfa73
void UpdateAudioStreamInLockedState(void *param_1,uint param_2) { byte bVar1; uint uVar2; char *pcVar3; uint uVar4; void *__dest; long in_stack_00000008; int8 in_stack_00000018; int in_stack_00000020; if (in_stack_00000008 == 0) { return; } bVar1 = *(byte *)(in_stack_00000008 + 0x15c); if (bVar1 == 0) { if (*(char *)(in_stack_00000008 + 0x15d) != '\x01') { pcVar3 = "STREAM: Buffer not available for updating"; goto LAB_001456ad; } if (bVar1 != 0) goto LAB_001455ed; LAB_00145618: uVar2 = bVar1 ^ 1; } else { LAB_001455ed: if (*(char *)(in_stack_00000008 + 0x15d) != '\x01') goto LAB_00145618; *(int4 *)(in_stack_00000008 + 0x164) = 0; uVar2 = 0; } uVar4 = *(uint *)(in_stack_00000008 + 0x160) >> 1; in_stack_00000020 = (in_stack_00000018._4_4_ >> 3) * in_stack_00000020; __dest = (void *)((ulong)(in_stack_00000020 * uVar2 * uVar4) + *(long *)(in_stack_00000008 + 0x170)); *(int *)(in_stack_00000008 + 0x168) = *(int *)(in_stack_00000008 + 0x168) + uVar4; if (param_2 <= uVar4) { memcpy(__dest,param_1,(ulong)(in_stack_00000020 * param_2)); if (uVar4 - param_2 != 0) { memset((void *)((long)__dest + (ulong)(in_stack_00000020 * param_2)),0, (ulong)((uVar4 - param_2) * in_stack_00000020)); } *(int1 *)(in_stack_00000008 + 0x15c + (ulong)uVar2) = 0; return; } pcVar3 = "STREAM: Attempting to write too many frames to buffer"; LAB_001456ad: TraceLog(4,pcVar3); return; }
23,407
UpdateAudioStreamInLockedState
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raudio.c
static void UpdateAudioStreamInLockedState(AudioStream stream, const void *data, int frameCount) { if (stream.buffer != NULL) { if (stream.buffer->isSubBufferProcessed[0] || stream.buffer->isSubBufferProcessed[1]) { ma_uint32 subBufferToUpdate = 0; if (stream.buffer->isSubBufferProcessed[0] && stream.buffer->isSubBufferProcessed[1]) { // Both buffers are available for updating // Update the first one and make sure the cursor is moved back to the front subBufferToUpdate = 0; stream.buffer->frameCursorPos = 0; } else { // Just update whichever sub-buffer is processed subBufferToUpdate = (stream.buffer->isSubBufferProcessed[0])? 0 : 1; } ma_uint32 subBufferSizeInFrames = stream.buffer->sizeInFrames/2; unsigned char *subBuffer = stream.buffer->data + ((subBufferSizeInFrames*stream.channels*(stream.sampleSize/8))*subBufferToUpdate); // Total frames processed in buffer is always the complete size, filled with 0 if required stream.buffer->framesProcessed += subBufferSizeInFrames; // Does this API expect a whole buffer to be updated in one go? // Assuming so, but if not will need to change this logic if (subBufferSizeInFrames >= (ma_uint32)frameCount) { ma_uint32 framesToWrite = (ma_uint32)frameCount; ma_uint32 bytesToWrite = framesToWrite*stream.channels*(stream.sampleSize/8); memcpy(subBuffer, data, bytesToWrite); // Any leftover frames should be filled with zeros ma_uint32 leftoverFrameCount = subBufferSizeInFrames - framesToWrite; if (leftoverFrameCount > 0) memset(subBuffer + bytesToWrite, 0, leftoverFrameCount*stream.channels*(stream.sampleSize/8)); stream.buffer->isSubBufferProcessed[subBufferToUpdate] = false; } else TRACELOG(LOG_WARNING, "STREAM: Attempting to write too many frames to buffer"); } else TRACELOG(LOG_WARNING, "STREAM: Buffer not available for updating"); } }
O2
c
UpdateAudioStreamInLockedState: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq 0x40(%rsp), %r13 testq %r13, %r13 je 0x3cb7c movl %esi, %ecx movq %rdi, %rsi movzbl 0x15c(%r13), %ebp movb 0x15d(%r13), %al testl %ebp, %ebp je 0x3caf5 testb %al, %al je 0x3cafd andl $0x0, 0x164(%r13) xorl %ebp, %ebp jmp 0x3cb00 testb %al, %al je 0x3cb8b xorl $0x1, %ebp leaq 0x40(%rsp), %rax movl 0x160(%r13), %r14d shrl %r14d movl 0x14(%rax), %ebx shrl $0x3, %ebx imull 0x18(%rax), %ebx movl %ebx, %r15d imull %ebp, %r15d imull %r14d, %r15d addq 0x170(%r13), %r15 addl %r14d, 0x168(%r13) cmpl %ecx, %r14d jae 0x3cb40 leaq 0x868cb(%rip), %rsi # 0xc3409 jmp 0x3cb92 movl %ebx, %r12d imull %ecx, %r12d movq %r15, %rdi movq %r12, %rdx movl %ecx, 0x4(%rsp) callq 0x9400 subl 0x4(%rsp), %r14d je 0x3cb71 addq %r12, %r15 imull %ebx, %r14d movq %r15, %rdi xorl %esi, %esi movq %r14, %rdx callq 0x92c0 movl %ebp, %eax movb $0x0, 0x15c(%r13,%rax) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x868ad(%rip), %rsi # 0xc343f pushq $0x4 popq %rdi xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0xa128b
UpdateAudioStreamInLockedState: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r13, [rsp+38h+arg_0] test r13, r13 jz loc_3CB7C mov ecx, esi mov rsi, rdi movzx ebp, byte ptr [r13+15Ch] mov al, [r13+15Dh] test ebp, ebp jz short loc_3CAF5 test al, al jz short loc_3CAFD and dword ptr [r13+164h], 0 xor ebp, ebp jmp short loc_3CB00 loc_3CAF5: test al, al jz loc_3CB8B loc_3CAFD: xor ebp, 1 loc_3CB00: lea rax, [rsp+38h+arg_0] mov r14d, [r13+160h] shr r14d, 1 mov ebx, [rax+14h] shr ebx, 3 imul ebx, [rax+18h] mov r15d, ebx imul r15d, ebp imul r15d, r14d add r15, [r13+170h] add [r13+168h], r14d cmp r14d, ecx jnb short loc_3CB40 lea rsi, aStreamAttempti; "STREAM: Attempting to write too many fr"... jmp short loc_3CB92 loc_3CB40: mov r12d, ebx imul r12d, ecx mov rdi, r15 mov rdx, r12 mov [rsp+38h+var_34], ecx call _memcpy sub r14d, [rsp+38h+var_34] jz short loc_3CB71 add r15, r12 imul r14d, ebx mov rdi, r15 xor esi, esi mov rdx, r14 call _memset loc_3CB71: mov eax, ebp mov byte ptr [r13+rax+15Ch], 0 loc_3CB7C: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3CB8B: lea rsi, aStreamBufferNo; "STREAM: Buffer not available for updati"... loc_3CB92: push 4 pop rdi xor eax, eax add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp TraceLog
long long UpdateAudioStreamInLockedState( long long a1, unsigned int a2, int a3, long long a4, int a5, int a6, long long a7, long long a8, long long a9, int a10) { long long result; // rax char v12; // al unsigned int v13; // ebp unsigned int v14; // r14d int v15; // ebx long long v16; // r15 const char *v17; // rsi unsigned int v18; // r14d if ( !a7 ) return result; v12 = *(_BYTE *)(a7 + 349); if ( !*(_BYTE *)(a7 + 348) ) { if ( !v12 ) { v17 = "STREAM: Buffer not available for updating"; return TraceLog(4, (_DWORD)v17, a3, a2, a5, a6); } goto LABEL_6; } if ( !v12 ) { LABEL_6: v13 = *(unsigned __int8 *)(a7 + 348) ^ 1; goto LABEL_7; } *(_DWORD *)(a7 + 356) = 0; v13 = 0; LABEL_7: v14 = *(_DWORD *)(a7 + 352) >> 1; v15 = a10 * (HIDWORD(a9) >> 3); v16 = *(_QWORD *)(a7 + 368) + v14 * v13 * v15; *(_DWORD *)(a7 + 360) += v14; if ( v14 < a2 ) { v17 = "STREAM: Attempting to write too many frames to buffer"; return TraceLog(4, (_DWORD)v17, a3, a2, a5, a6); } memcpy(v16, a1, a2 * v15); v18 = v14 - a2; if ( v18 ) memset(a2 * v15 + v16, 0LL, v15 * v18); result = v13; *(_BYTE *)(a7 + v13 + 348) = 0; return result; }
UpdateAudioStreamInLockedState: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R13,qword ptr [RSP + 0x40] TEST R13,R13 JZ 0x0013cb7c MOV ECX,ESI MOV RSI,RDI MOVZX EBP,byte ptr [R13 + 0x15c] MOV AL,byte ptr [R13 + 0x15d] TEST EBP,EBP JZ 0x0013caf5 TEST AL,AL JZ 0x0013cafd AND dword ptr [R13 + 0x164],0x0 XOR EBP,EBP JMP 0x0013cb00 LAB_0013caf5: TEST AL,AL JZ 0x0013cb8b LAB_0013cafd: XOR EBP,0x1 LAB_0013cb00: LEA RAX,[RSP + 0x40] MOV R14D,dword ptr [R13 + 0x160] SHR R14D,0x1 MOV EBX,dword ptr [RAX + 0x14] SHR EBX,0x3 IMUL EBX,dword ptr [RAX + 0x18] MOV R15D,EBX IMUL R15D,EBP IMUL R15D,R14D ADD R15,qword ptr [R13 + 0x170] ADD dword ptr [R13 + 0x168],R14D CMP R14D,ECX JNC 0x0013cb40 LEA RSI,[0x1c3409] JMP 0x0013cb92 LAB_0013cb40: MOV R12D,EBX IMUL R12D,ECX MOV RDI,R15 MOV RDX,R12 MOV dword ptr [RSP + 0x4],ECX CALL 0x00109400 SUB R14D,dword ptr [RSP + 0x4] JZ 0x0013cb71 ADD R15,R12 IMUL R14D,EBX MOV RDI,R15 XOR ESI,ESI MOV RDX,R14 CALL 0x001092c0 LAB_0013cb71: MOV EAX,EBP MOV byte ptr [R13 + RAX*0x1 + 0x15c],0x0 LAB_0013cb7c: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013cb8b: LEA RSI,[0x1c343f] LAB_0013cb92: PUSH 0x4 POP RDI XOR EAX,EAX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001a128b
void UpdateAudioStreamInLockedState(void *param_1,uint param_2) { uint uVar1; char *pcVar2; uint uVar3; void *__dest; long in_stack_00000008; int8 in_stack_00000018; int in_stack_00000020; if (in_stack_00000008 == 0) { return; } if (*(byte *)(in_stack_00000008 + 0x15c) == 0) { if (*(char *)(in_stack_00000008 + 0x15d) == '\0') { pcVar2 = "STREAM: Buffer not available for updating"; goto LAB_0013cb92; } LAB_0013cafd: uVar1 = *(byte *)(in_stack_00000008 + 0x15c) ^ 1; } else { if (*(char *)(in_stack_00000008 + 0x15d) == '\0') goto LAB_0013cafd; *(int4 *)(in_stack_00000008 + 0x164) = 0; uVar1 = 0; } uVar3 = *(uint *)(in_stack_00000008 + 0x160) >> 1; in_stack_00000020 = (in_stack_00000018._4_4_ >> 3) * in_stack_00000020; __dest = (void *)((ulong)(in_stack_00000020 * uVar1 * uVar3) + *(long *)(in_stack_00000008 + 0x170)); *(int *)(in_stack_00000008 + 0x168) = *(int *)(in_stack_00000008 + 0x168) + uVar3; if (param_2 <= uVar3) { memcpy(__dest,param_1,(ulong)(in_stack_00000020 * param_2)); if (uVar3 - param_2 != 0) { memset((void *)((long)__dest + (ulong)(in_stack_00000020 * param_2)),0, (ulong)((uVar3 - param_2) * in_stack_00000020)); } *(int1 *)(in_stack_00000008 + 0x15c + (ulong)uVar1) = 0; return; } pcVar2 = "STREAM: Attempting to write too many frames to buffer"; LAB_0013cb92: TraceLog(4,pcVar2); return; }
23,408
UpdateAudioStreamInLockedState
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raudio.c
static void UpdateAudioStreamInLockedState(AudioStream stream, const void *data, int frameCount) { if (stream.buffer != NULL) { if (stream.buffer->isSubBufferProcessed[0] || stream.buffer->isSubBufferProcessed[1]) { ma_uint32 subBufferToUpdate = 0; if (stream.buffer->isSubBufferProcessed[0] && stream.buffer->isSubBufferProcessed[1]) { // Both buffers are available for updating // Update the first one and make sure the cursor is moved back to the front subBufferToUpdate = 0; stream.buffer->frameCursorPos = 0; } else { // Just update whichever sub-buffer is processed subBufferToUpdate = (stream.buffer->isSubBufferProcessed[0])? 0 : 1; } ma_uint32 subBufferSizeInFrames = stream.buffer->sizeInFrames/2; unsigned char *subBuffer = stream.buffer->data + ((subBufferSizeInFrames*stream.channels*(stream.sampleSize/8))*subBufferToUpdate); // Total frames processed in buffer is always the complete size, filled with 0 if required stream.buffer->framesProcessed += subBufferSizeInFrames; // Does this API expect a whole buffer to be updated in one go? // Assuming so, but if not will need to change this logic if (subBufferSizeInFrames >= (ma_uint32)frameCount) { ma_uint32 framesToWrite = (ma_uint32)frameCount; ma_uint32 bytesToWrite = framesToWrite*stream.channels*(stream.sampleSize/8); memcpy(subBuffer, data, bytesToWrite); // Any leftover frames should be filled with zeros ma_uint32 leftoverFrameCount = subBufferSizeInFrames - framesToWrite; if (leftoverFrameCount > 0) memset(subBuffer + bytesToWrite, 0, leftoverFrameCount*stream.channels*(stream.sampleSize/8)); stream.buffer->isSubBufferProcessed[subBufferToUpdate] = false; } else TRACELOG(LOG_WARNING, "STREAM: Attempting to write too many frames to buffer"); } else TRACELOG(LOG_WARNING, "STREAM: Buffer not available for updating"); } }
O3
c
UpdateAudioStreamInLockedState: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq 0x40(%rsp), %r13 testq %r13, %r13 je 0x44f02 movl %esi, %ecx movq %rdi, %rsi movzbl 0x15c(%r13), %ebp movb 0x15d(%r13), %al testl %ebp, %ebp je 0x44e7b testb %al, %al je 0x44e83 movl $0x0, 0x164(%r13) xorl %ebp, %ebp jmp 0x44e86 testb %al, %al je 0x44f11 xorl $0x1, %ebp leaq 0x40(%rsp), %rax movl 0x160(%r13), %r14d shrl %r14d movl 0x14(%rax), %ebx shrl $0x3, %ebx imull 0x18(%rax), %ebx movl %ebx, %r15d imull %ebp, %r15d imull %r14d, %r15d addq 0x170(%r13), %r15 addl %r14d, 0x168(%r13) cmpl %ecx, %r14d jae 0x44ec6 leaq 0x98340(%rip), %rsi # 0xdd204 jmp 0x44f18 movl %ebx, %r12d imull %ecx, %r12d movq %r15, %rdi movq %r12, %rdx movl %ecx, 0x4(%rsp) callq 0xa410 subl 0x4(%rsp), %r14d je 0x44ef7 addq %r12, %r15 imull %ebx, %r14d movq %r15, %rdi xorl %esi, %esi movq %r14, %rdx callq 0xa2d0 movl %ebp, %eax movb $0x0, 0x15c(%r13,%rax) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x98322(%rip), %rsi # 0xdd23a movl $0x4, %edi xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0xb9db7
UpdateAudioStreamInLockedState: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r13, [rsp+38h+arg_0] test r13, r13 jz loc_44F02 mov ecx, esi mov rsi, rdi movzx ebp, byte ptr [r13+15Ch] mov al, [r13+15Dh] test ebp, ebp jz short loc_44E7B test al, al jz short loc_44E83 mov dword ptr [r13+164h], 0 xor ebp, ebp jmp short loc_44E86 loc_44E7B: test al, al jz loc_44F11 loc_44E83: xor ebp, 1 loc_44E86: lea rax, [rsp+38h+arg_0] mov r14d, [r13+160h] shr r14d, 1 mov ebx, [rax+14h] shr ebx, 3 imul ebx, [rax+18h] mov r15d, ebx imul r15d, ebp imul r15d, r14d add r15, [r13+170h] add [r13+168h], r14d cmp r14d, ecx jnb short loc_44EC6 lea rsi, aStreamAttempti; "STREAM: Attempting to write too many fr"... jmp short loc_44F18 loc_44EC6: mov r12d, ebx imul r12d, ecx mov rdi, r15 mov rdx, r12 mov [rsp+38h+var_34], ecx call _memcpy sub r14d, [rsp+38h+var_34] jz short loc_44EF7 add r15, r12 imul r14d, ebx mov rdi, r15 xor esi, esi mov rdx, r14 call _memset loc_44EF7: mov eax, ebp mov byte ptr [r13+rax+15Ch], 0 loc_44F02: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_44F11: lea rsi, aStreamBufferNo; "STREAM: Buffer not available for updati"... loc_44F18: mov edi, 4 xor eax, eax add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp TraceLog
long long UpdateAudioStreamInLockedState( long long a1, unsigned int a2, int a3, long long a4, int a5, int a6, long long a7, long long a8, long long a9, int a10) { long long result; // rax char v12; // al unsigned int v13; // ebp unsigned int v14; // r14d long long v15; // r15 const char *v16; // rsi unsigned int v17; // r14d if ( !a7 ) return result; v12 = *(_BYTE *)(a7 + 349); if ( !*(_BYTE *)(a7 + 348) ) { if ( !v12 ) { v16 = "STREAM: Buffer not available for updating"; return TraceLog(4, (_DWORD)v16, a3, a2, a5, a6); } goto LABEL_6; } if ( !v12 ) { LABEL_6: v13 = *(unsigned __int8 *)(a7 + 348) ^ 1; goto LABEL_7; } *(_DWORD *)(a7 + 356) = 0; v13 = 0; LABEL_7: v14 = *(_DWORD *)(a7 + 352) >> 1; v15 = *(_QWORD *)(a7 + 368) + v14 * v13 * a10 * (HIDWORD(a9) >> 3); *(_DWORD *)(a7 + 360) += v14; if ( v14 < a2 ) { v16 = "STREAM: Attempting to write too many frames to buffer"; return TraceLog(4, (_DWORD)v16, a3, a2, a5, a6); } memcpy(v15); v17 = v14 - a2; if ( v17 ) memset(a2 * a10 * (HIDWORD(a9) >> 3) + v15, 0LL, a10 * (HIDWORD(a9) >> 3) * v17); result = v13; *(_BYTE *)(a7 + v13 + 348) = 0; return result; }
UpdateAudioStreamInLockedState: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R13,qword ptr [RSP + 0x40] TEST R13,R13 JZ 0x00144f02 MOV ECX,ESI MOV RSI,RDI MOVZX EBP,byte ptr [R13 + 0x15c] MOV AL,byte ptr [R13 + 0x15d] TEST EBP,EBP JZ 0x00144e7b TEST AL,AL JZ 0x00144e83 MOV dword ptr [R13 + 0x164],0x0 XOR EBP,EBP JMP 0x00144e86 LAB_00144e7b: TEST AL,AL JZ 0x00144f11 LAB_00144e83: XOR EBP,0x1 LAB_00144e86: LEA RAX,[RSP + 0x40] MOV R14D,dword ptr [R13 + 0x160] SHR R14D,0x1 MOV EBX,dword ptr [RAX + 0x14] SHR EBX,0x3 IMUL EBX,dword ptr [RAX + 0x18] MOV R15D,EBX IMUL R15D,EBP IMUL R15D,R14D ADD R15,qword ptr [R13 + 0x170] ADD dword ptr [R13 + 0x168],R14D CMP R14D,ECX JNC 0x00144ec6 LEA RSI,[0x1dd204] JMP 0x00144f18 LAB_00144ec6: MOV R12D,EBX IMUL R12D,ECX MOV RDI,R15 MOV RDX,R12 MOV dword ptr [RSP + 0x4],ECX CALL 0x0010a410 SUB R14D,dword ptr [RSP + 0x4] JZ 0x00144ef7 ADD R15,R12 IMUL R14D,EBX MOV RDI,R15 XOR ESI,ESI MOV RDX,R14 CALL 0x0010a2d0 LAB_00144ef7: MOV EAX,EBP MOV byte ptr [R13 + RAX*0x1 + 0x15c],0x0 LAB_00144f02: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00144f11: LEA RSI,[0x1dd23a] LAB_00144f18: MOV EDI,0x4 XOR EAX,EAX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001b9db7
void UpdateAudioStreamInLockedState(void *param_1,uint param_2) { uint uVar1; char *pcVar2; uint uVar3; void *__dest; long in_stack_00000008; int8 in_stack_00000018; int in_stack_00000020; if (in_stack_00000008 == 0) { return; } if (*(byte *)(in_stack_00000008 + 0x15c) == 0) { if (*(char *)(in_stack_00000008 + 0x15d) == '\0') { pcVar2 = "STREAM: Buffer not available for updating"; goto LAB_00144f18; } LAB_00144e83: uVar1 = *(byte *)(in_stack_00000008 + 0x15c) ^ 1; } else { if (*(char *)(in_stack_00000008 + 0x15d) == '\0') goto LAB_00144e83; *(int4 *)(in_stack_00000008 + 0x164) = 0; uVar1 = 0; } uVar3 = *(uint *)(in_stack_00000008 + 0x160) >> 1; in_stack_00000020 = (in_stack_00000018._4_4_ >> 3) * in_stack_00000020; __dest = (void *)((ulong)(in_stack_00000020 * uVar1 * uVar3) + *(long *)(in_stack_00000008 + 0x170)); *(int *)(in_stack_00000008 + 0x168) = *(int *)(in_stack_00000008 + 0x168) + uVar3; if (param_2 <= uVar3) { memcpy(__dest,param_1,(ulong)(in_stack_00000020 * param_2)); if (uVar3 - param_2 != 0) { memset((void *)((long)__dest + (ulong)(in_stack_00000020 * param_2)),0, (ulong)((uVar3 - param_2) * in_stack_00000020)); } *(int1 *)(in_stack_00000008 + 0x15c + (ulong)uVar1) = 0; return; } pcVar2 = "STREAM: Attempting to write too many frames to buffer"; LAB_00144f18: TraceLog(4,pcVar2); return; }
23,409
js_promise_resolve_function_call
bluesky950520[P]quickjs/quickjs.c
static JSValue js_promise_resolve_function_call(JSContext *ctx, JSValue func_obj, JSValue this_val, int argc, JSValue *argv, int flags) { JSObject *p = JS_VALUE_GET_OBJ(func_obj); JSPromiseFunctionData *s; JSValue resolution, args[3]; JSValue then; BOOL is_reject; s = p->u.promise_function_data; if (!s || s->presolved->already_resolved) return JS_UNDEFINED; s->presolved->already_resolved = TRUE; is_reject = p->class_id - JS_CLASS_PROMISE_RESOLVE_FUNCTION; if (argc > 0) resolution = argv[0]; else resolution = JS_UNDEFINED; #ifdef DUMP_PROMISE if (check_dump_flag(ctx->rt, DUMP_PROMISE)) { printf("js_promise_resolving_function_call: is_reject=%d resolution=", is_reject); JS_DumpValue(ctx->rt, resolution); printf("\n"); } #endif if (is_reject || !JS_IsObject(resolution)) { goto done; } else if (js_same_value(ctx, resolution, s->promise)) { JS_ThrowTypeError(ctx, "promise self resolution"); goto fail_reject; } then = JS_GetProperty(ctx, resolution, JS_ATOM_then); if (JS_IsException(then)) { JSValue error; fail_reject: error = JS_GetException(ctx); reject_promise(ctx, s->promise, error); JS_FreeValue(ctx, error); } else if (!JS_IsFunction(ctx, then)) { JS_FreeValue(ctx, then); done: fulfill_or_reject_promise(ctx, s->promise, resolution, is_reject); } else { args[0] = s->promise; args[1] = resolution; args[2] = then; JS_EnqueueJob(ctx, js_promise_resolve_thenable_job, 3, args); JS_FreeValue(ctx, then); } return JS_UNDEFINED; }
O1
c
js_promise_resolve_function_call: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq 0x30(%rsi), %r13 testq %r13, %r13 je 0x359c9 movq 0x10(%r13), %rax cmpl $0x0, 0x4(%rax) jne 0x359c9 movq %rdi, %rbx movl $0x1, 0x4(%rax) movzwl 0x6(%rsi), %ebp addl $-0x32, %ebp testl %r9d, %r9d jle 0x358a8 movq 0x90(%rsp), %rax movq (%rax), %rcx movq 0x8(%rax), %r14 movabsq $-0x100000000, %r15 # imm = 0xFFFFFFFF00000000 andq %rcx, %r15 movl %ecx, %eax jmp 0x358b3 movl $0x3, %r14d xorl %eax, %eax xorl %r15d, %r15d testl %ebp, %ebp jne 0x359ad cmpl $-0x1, %r14d jne 0x359ad movq %r15, %r12 orq %rax, %r12 movq (%r13), %rcx movq 0x8(%r13), %r8 movq %rbx, %rdi movq %r12, %rsi movq %r14, %rdx movq %rax, 0x18(%rsp) callq 0x2584d testl %eax, %eax je 0x358fd leaq 0x6930d(%rip), %rsi # 0x9ebfe movq %rbx, %rdi xorl %eax, %eax callq 0x21953 jmp 0x3592c movq %rbx, %rdi movq %r12, %rsi movq %r14, %rdx movl $0x80, %ecx movq %r12, 0x10(%rsp) movq %r12, %r8 movq %r14, %r9 pushq $0x0 pushq $0x0 callq 0x2238f addq $0x10, %rsp movq %rdx, %r12 cmpl $0x6, %r12d jne 0x35980 movq 0x18(%rbx), %rax movq 0xf0(%rax), %r14 movq 0xf8(%rax), %r15 movl $0x0, 0xf0(%rax) movq $0x4, 0xf8(%rax) movq (%r13), %rsi movq 0x8(%r13), %rdx movq %rbx, %rdi movq %r14, %rcx movq %r15, %r8 movl $0x1, %r9d callq 0x520ee movq 0x18(%rbx), %rdi movq %r14, %rsi movq %r15, %rdx callq 0x1ccb2 jmp 0x359c9 movq %rbx, %rdi movq %rax, 0x8(%rsp) movq %rax, %rsi movq %r12, %rdx callq 0x221aa testl %eax, %eax jne 0x359df movq 0x18(%rbx), %rdi movq 0x8(%rsp), %rsi movq %r12, %rdx callq 0x1ccb2 movq 0x18(%rsp), %rax movq (%r13), %rsi movq 0x8(%r13), %rdx orq %rax, %r15 movq %rbx, %rdi movq %r15, %rcx movq %r14, %r8 movl %ebp, %r9d callq 0x520ee movl $0x3, %edx xorl %eax, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movups (%r13), %xmm0 leaq 0x20(%rsp), %rcx movaps %xmm0, (%rcx) movq 0x10(%rsp), %rax movq %rax, 0x10(%rcx) movq %r14, 0x18(%rcx) movq 0x8(%rsp), %r14 movq %r14, 0x20(%rcx) movq %r12, 0x28(%rcx) leaq 0x1c8ba(%rip), %rsi # 0x522c7 movq %rbx, %rdi movl $0x3, %edx callq 0xef93 movq 0x18(%rbx), %rdi movq %r14, %rsi movq %r12, %rdx jmp 0x35979
js_promise_resolve_function_call: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r13, [rsi+30h] test r13, r13 jz loc_359C9 mov rax, [r13+10h] cmp dword ptr [rax+4], 0 jnz loc_359C9 mov rbx, rdi mov dword ptr [rax+4], 1 movzx ebp, word ptr [rsi+6] add ebp, 0FFFFFFCEh test r9d, r9d jle short loc_358A8 mov rax, [rsp+88h+arg_0] mov rcx, [rax] mov r14, [rax+8] mov r15, 0FFFFFFFF00000000h and r15, rcx mov eax, ecx jmp short loc_358B3 loc_358A8: mov r14d, 3 xor eax, eax xor r15d, r15d loc_358B3: test ebp, ebp jnz loc_359AD cmp r14d, 0FFFFFFFFh jnz loc_359AD mov r12, r15 or r12, rax mov rcx, [r13+0] mov r8, [r13+8] mov rdi, rbx mov rsi, r12 mov rdx, r14 mov [rsp+88h+var_70], rax call js_same_value test eax, eax jz short loc_358FD lea rsi, aPromiseSelfRes; "promise self resolution" mov rdi, rbx xor eax, eax call JS_ThrowTypeError jmp short loc_3592C loc_358FD: mov rdi, rbx mov rsi, r12 mov rdx, r14 mov ecx, 80h mov [rsp+88h+var_78], r12 mov r8, r12 mov r9, r14 push 0 push 0 call JS_GetPropertyInternal2 add rsp, 10h mov r12, rdx cmp r12d, 6 jnz short loc_35980 loc_3592C: mov rax, [rbx+18h] mov r14, [rax+0F0h] mov r15, [rax+0F8h] mov dword ptr [rax+0F0h], 0 mov qword ptr [rax+0F8h], 4 mov rsi, [r13+0] mov rdx, [r13+8] mov rdi, rbx mov rcx, r14 mov r8, r15 mov r9d, 1 call fulfill_or_reject_promise mov rdi, [rbx+18h] mov rsi, r14 mov rdx, r15 loc_35979: call JS_FreeValueRT jmp short loc_359C9 loc_35980: mov rdi, rbx mov [rsp+88h+var_80], rax mov rsi, rax mov rdx, r12 call JS_IsFunction test eax, eax jnz short loc_359DF mov rdi, [rbx+18h] mov rsi, [rsp+88h+var_80] mov rdx, r12 call JS_FreeValueRT mov rax, [rsp+88h+var_70] loc_359AD: mov rsi, [r13+0] mov rdx, [r13+8] or r15, rax mov rdi, rbx mov rcx, r15 mov r8, r14 mov r9d, ebp call fulfill_or_reject_promise loc_359C9: mov edx, 3 xor eax, eax add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_359DF: movups xmm0, xmmword ptr [r13+0] lea rcx, [rsp+88h+var_68] movaps xmmword ptr [rcx], xmm0 mov rax, [rsp+88h+var_78] mov [rcx+10h], rax mov [rcx+18h], r14 mov r14, [rsp+88h+var_80] mov [rcx+20h], r14 mov [rcx+28h], r12 lea rsi, js_promise_resolve_thenable_job mov rdi, rbx mov edx, 3 call JS_EnqueueJob mov rdi, [rbx+18h] mov rsi, r14 mov rdx, r12 jmp loc_35979
long long js_promise_resolve_function_call( long long a1, long long a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, double a7, double a8, __m128 a9, __m128 a10, long long a11, long long a12, long long a13, int a14, _QWORD *a15) { _QWORD *v15; // r13 long long v16; // rax unsigned int v17; // ebp long long v18; // r14 unsigned long long v19; // r15 long long v20; // rax long long v21; // r12 long long v22; // rdx long long v23; // rcx long long v24; // r8 long long v25; // r9 __m128 v26; // xmm4 __m128 v27; // xmm5 unsigned long long PropertyInternal2; // rax long long v29; // rdx long long v30; // r12 long long v31; // rax _DWORD *v32; // r14 long long v33; // r15 long long v34; // rdi _DWORD *v35; // rsi long long v36; // rdx char v38; // [rsp+0h] [rbp-88h] _DWORD *v39; // [rsp+8h] [rbp-80h] long long v40; // [rsp+10h] [rbp-78h] long long v41; // [rsp+18h] [rbp-70h] __int128 v42; // [rsp+20h] [rbp-68h] BYREF long long v43; // [rsp+30h] [rbp-58h] long long v44; // [rsp+38h] [rbp-50h] _DWORD *v45; // [rsp+40h] [rbp-48h] long long v46; // [rsp+48h] [rbp-40h] v15 = *(_QWORD **)(a2 + 48); if ( v15 ) { v16 = v15[2]; if ( !*(_DWORD *)(v16 + 4) ) { *(_DWORD *)(v16 + 4) = 1; v17 = *(unsigned __int16 *)(a2 + 6) - 50; if ( a14 <= 0 ) { v18 = 3LL; v20 = 0LL; v19 = 0LL; } else { v18 = a15[1]; v19 = *a15 & 0xFFFFFFFF00000000LL; v20 = (unsigned int)*a15; } if ( *(_WORD *)(a2 + 6) == 50 && (_DWORD)v18 == -1 ) { v21 = v20 | v19; v41 = v20; if ( (unsigned int)js_same_value(a1, (_DWORD *)(v20 | v19), v18, (_DWORD *)*v15, v15[1]) ) { JS_ThrowTypeError( a1, (long long)"promise self resolution", v22, v23, v24, v25, a3, a4, a5, a6, v26, v27, a9, a10, v38); LABEL_11: v31 = *(_QWORD *)(a1 + 24); v32 = *(_DWORD **)(v31 + 240); v33 = *(_QWORD *)(v31 + 248); *(_DWORD *)(v31 + 240) = 0; *(_QWORD *)(v31 + 248) = 4LL; fulfill_or_reject_promise(a1, *v15, v15[1], v32, v33, 1LL); v34 = *(_QWORD *)(a1 + 24); v35 = v32; v36 = v33; LABEL_12: JS_FreeValueRT(v34, v35, v36); return 0LL; } v40 = v21; PropertyInternal2 = JS_GetPropertyInternal2(a1, v21, v18, 0x80u, v21, v18, 0LL, 0); v30 = v29; if ( (_DWORD)v29 == 6 ) goto LABEL_11; v39 = (_DWORD *)PropertyInternal2; if ( (unsigned int)JS_IsFunction(a1, PropertyInternal2, v29) ) { v42 = *(_OWORD *)v15; v43 = v40; v44 = v18; v45 = v39; v46 = v30; JS_EnqueueJob(a1, (long long)js_promise_resolve_thenable_job, 3, (long long)&v42); v34 = *(_QWORD *)(a1 + 24); v35 = v39; v36 = v30; goto LABEL_12; } JS_FreeValueRT(*(_QWORD *)(a1 + 24), v39, v30); v20 = v41; } fulfill_or_reject_promise(a1, *v15, v15[1], v20 | v19, v18, v17); } } return 0LL; }
js_promise_resolve_function_call: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R13,qword ptr [RSI + 0x30] TEST R13,R13 JZ 0x001359c9 MOV RAX,qword ptr [R13 + 0x10] CMP dword ptr [RAX + 0x4],0x0 JNZ 0x001359c9 MOV RBX,RDI MOV dword ptr [RAX + 0x4],0x1 MOVZX EBP,word ptr [RSI + 0x6] ADD EBP,-0x32 TEST R9D,R9D JLE 0x001358a8 MOV RAX,qword ptr [RSP + 0x90] MOV RCX,qword ptr [RAX] MOV R14,qword ptr [RAX + 0x8] MOV R15,-0x100000000 AND R15,RCX MOV EAX,ECX JMP 0x001358b3 LAB_001358a8: MOV R14D,0x3 XOR EAX,EAX XOR R15D,R15D LAB_001358b3: TEST EBP,EBP JNZ 0x001359ad CMP R14D,-0x1 JNZ 0x001359ad MOV R12,R15 OR R12,RAX MOV RCX,qword ptr [R13] MOV R8,qword ptr [R13 + 0x8] MOV RDI,RBX MOV RSI,R12 MOV RDX,R14 MOV qword ptr [RSP + 0x18],RAX CALL 0x0012584d TEST EAX,EAX JZ 0x001358fd LEA RSI,[0x19ebfe] MOV RDI,RBX XOR EAX,EAX CALL 0x00121953 JMP 0x0013592c LAB_001358fd: MOV RDI,RBX MOV RSI,R12 MOV RDX,R14 MOV ECX,0x80 MOV qword ptr [RSP + 0x10],R12 MOV R8,R12 MOV R9,R14 PUSH 0x0 PUSH 0x0 CALL 0x0012238f ADD RSP,0x10 MOV R12,RDX CMP R12D,0x6 JNZ 0x00135980 LAB_0013592c: MOV RAX,qword ptr [RBX + 0x18] MOV R14,qword ptr [RAX + 0xf0] MOV R15,qword ptr [RAX + 0xf8] MOV dword ptr [RAX + 0xf0],0x0 MOV qword ptr [RAX + 0xf8],0x4 MOV RSI,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] MOV RDI,RBX MOV RCX,R14 MOV R8,R15 MOV R9D,0x1 CALL 0x001520ee MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R14 MOV RDX,R15 LAB_00135979: CALL 0x0011ccb2 JMP 0x001359c9 LAB_00135980: MOV RDI,RBX MOV qword ptr [RSP + 0x8],RAX MOV RSI,RAX MOV RDX,R12 CALL 0x001221aa TEST EAX,EAX JNZ 0x001359df MOV RDI,qword ptr [RBX + 0x18] MOV RSI,qword ptr [RSP + 0x8] MOV RDX,R12 CALL 0x0011ccb2 MOV RAX,qword ptr [RSP + 0x18] LAB_001359ad: MOV RSI,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] OR R15,RAX MOV RDI,RBX MOV RCX,R15 MOV R8,R14 MOV R9D,EBP CALL 0x001520ee LAB_001359c9: MOV EDX,0x3 XOR EAX,EAX ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001359df: MOVUPS XMM0,xmmword ptr [R13] LEA RCX,[RSP + 0x20] MOVAPS xmmword ptr [RCX],XMM0 MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RCX + 0x10],RAX MOV qword ptr [RCX + 0x18],R14 MOV R14,qword ptr [RSP + 0x8] MOV qword ptr [RCX + 0x20],R14 MOV qword ptr [RCX + 0x28],R12 LEA RSI,[0x1522c7] MOV RDI,RBX MOV EDX,0x3 CALL 0x0010ef93 MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R14 MOV RDX,R12 JMP 0x00135979
int1 [16] js_promise_resolve_function_call(long param_1,long param_2) { int8 *puVar1; long lVar2; int8 uVar3; int iVar4; ulong uVar5; int iVar6; int8 uVar7; int in_R9D; ulong uVar8; ulong uVar9; ulong uVar10; int1 auVar11 [16]; ulong *in_stack_00000008; puVar1 = *(int8 **)(param_2 + 0x30); if ((puVar1 == (int8 *)0x0) || (*(int *)(puVar1[2] + 4) != 0)) goto LAB_001359c9; *(int4 *)(puVar1[2] + 4) = 1; iVar6 = *(ushort *)(param_2 + 6) - 0x32; if (in_R9D < 1) { uVar9 = 3; uVar5 = 0; uVar10 = 0; } else { uVar9 = in_stack_00000008[1]; uVar10 = *in_stack_00000008 & 0xffffffff00000000; uVar5 = *in_stack_00000008 & 0xffffffff; } if ((iVar6 != 0) || ((int)uVar9 != -1)) { LAB_001359ad: fulfill_or_reject_promise(param_1,*puVar1,puVar1[1],uVar10 | uVar5,uVar9,iVar6); goto LAB_001359c9; } uVar8 = uVar10 | uVar5; iVar4 = js_same_value(param_1,uVar8,uVar9,*puVar1,puVar1[1]); if (iVar4 == 0) { auVar11 = JS_GetPropertyInternal2(param_1,uVar8,uVar9,0x80,uVar8,uVar9,0,0); if (auVar11._8_4_ == 6) goto LAB_0013592c; iVar4 = JS_IsFunction(param_1,auVar11._0_8_,auVar11._8_8_); if (iVar4 == 0) { JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar11._0_8_,auVar11._8_8_); goto LAB_001359ad; } JS_EnqueueJob(param_1,js_promise_resolve_thenable_job,3); uVar7 = *(int8 *)(param_1 + 0x18); } else { JS_ThrowTypeError(param_1,"promise self resolution"); LAB_0013592c: lVar2 = *(long *)(param_1 + 0x18); uVar7 = *(int8 *)*(int1 (*) [16])(lVar2 + 0xf0); uVar3 = *(int8 *)(lVar2 + 0xf8); auVar11 = *(int1 (*) [16])(lVar2 + 0xf0); *(int4 *)(lVar2 + 0xf0) = 0; *(int8 *)(lVar2 + 0xf8) = 4; fulfill_or_reject_promise(param_1,*puVar1,puVar1[1],uVar7,uVar3,1); uVar7 = *(int8 *)(param_1 + 0x18); } JS_FreeValueRT(uVar7,auVar11._0_8_,auVar11._8_8_); LAB_001359c9: return ZEXT816(3) << 0x40; }
23,410
js_promise_resolve_function_call
bluesky950520[P]quickjs/quickjs.c
static JSValue js_promise_resolve_function_call(JSContext *ctx, JSValue func_obj, JSValue this_val, int argc, JSValue *argv, int flags) { JSObject *p = JS_VALUE_GET_OBJ(func_obj); JSPromiseFunctionData *s; JSValue resolution, args[3]; JSValue then; BOOL is_reject; s = p->u.promise_function_data; if (!s || s->presolved->already_resolved) return JS_UNDEFINED; s->presolved->already_resolved = TRUE; is_reject = p->class_id - JS_CLASS_PROMISE_RESOLVE_FUNCTION; if (argc > 0) resolution = argv[0]; else resolution = JS_UNDEFINED; #ifdef DUMP_PROMISE if (check_dump_flag(ctx->rt, DUMP_PROMISE)) { printf("js_promise_resolving_function_call: is_reject=%d resolution=", is_reject); JS_DumpValue(ctx->rt, resolution); printf("\n"); } #endif if (is_reject || !JS_IsObject(resolution)) { goto done; } else if (js_same_value(ctx, resolution, s->promise)) { JS_ThrowTypeError(ctx, "promise self resolution"); goto fail_reject; } then = JS_GetProperty(ctx, resolution, JS_ATOM_then); if (JS_IsException(then)) { JSValue error; fail_reject: error = JS_GetException(ctx); reject_promise(ctx, s->promise, error); JS_FreeValue(ctx, error); } else if (!JS_IsFunction(ctx, then)) { JS_FreeValue(ctx, then); done: fulfill_or_reject_promise(ctx, s->promise, resolution, is_reject); } else { args[0] = s->promise; args[1] = resolution; args[2] = then; JS_EnqueueJob(ctx, js_promise_resolve_thenable_job, 3, args); JS_FreeValue(ctx, then); } return JS_UNDEFINED; }
O2
c
js_promise_resolve_function_call: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq 0x30(%rsi), %r13 testq %r13, %r13 je 0x2f10c movq 0x10(%r13), %rax cmpl $0x0, 0x4(%rax) jne 0x2f10c movq %rdi, %rbx movl $0x1, 0x4(%rax) movzwl 0x6(%rsi), %ebp addl $-0x32, %ebp testl %r9d, %r9d jle 0x2efe2 movq 0x80(%rsp), %rax movq (%rax), %r15 movq 0x8(%rax), %r14 jmp 0x2efe9 pushq $0x3 popq %r14 xorl %r15d, %r15d movl %r14d, %eax notl %eax orl %ebp, %eax jne 0x2f0f3 movq (%r13), %rcx movq 0x8(%r13), %r8 movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x1f3b6 testl %eax, %eax je 0x2f023 leaq 0x56b31(%rip), %rsi # 0x85b48 movq %rbx, %rdi xorl %eax, %eax callq 0x1bad1 jmp 0x2f03f movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx movl $0x80, %ecx callq 0x1a4c7 movq %rdx, %r12 cmpl $0x6, %r12d jne 0x2f08d movq 0x18(%rbx), %rax movq 0xf0(%rax), %r14 movq 0xf8(%rax), %r15 andl $0x0, 0xf0(%rax) movq $0x4, 0xf8(%rax) movq (%r13), %rsi movq 0x8(%r13), %rdx pushq $0x1 popq %r9 movq %rbx, %rdi movq %r14, %rcx movq %r15, %r8 callq 0x464f6 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x174a2 jmp 0x2f10c movq %rbx, %rdi movq %rax, 0x8(%rsp) movq %rax, %rsi movq %r12, %rdx callq 0x1c301 testl %eax, %eax je 0x2f0e3 movups (%r13), %xmm0 leaq 0x10(%rsp), %rcx movaps %xmm0, (%rcx) movq %r15, 0x10(%rcx) movq %r14, 0x18(%rcx) movq 0x8(%rsp), %r14 movq %r14, 0x20(%rcx) movq %r12, 0x28(%rcx) leaq 0x175ed(%rip), %rsi # 0x466ba pushq $0x3 popq %rdx movq %rbx, %rdi callq 0x1732d movq %rbx, %rdi movq %r14, %rsi movq %r12, %rdx jmp 0x2f086 movq %rbx, %rdi movq 0x8(%rsp), %rsi movq %r12, %rdx callq 0x174a2 movq (%r13), %rsi movq 0x8(%r13), %rdx movq %rbx, %rdi movq %r15, %rcx movq %r14, %r8 movl %ebp, %r9d callq 0x464f6 pushq $0x3 popq %rdx xorl %eax, %eax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_promise_resolve_function_call: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r13, [rsi+30h] test r13, r13 jz loc_2F10C mov rax, [r13+10h] cmp dword ptr [rax+4], 0 jnz loc_2F10C mov rbx, rdi mov dword ptr [rax+4], 1 movzx ebp, word ptr [rsi+6] add ebp, 0FFFFFFCEh test r9d, r9d jle short loc_2EFE2 mov rax, [rsp+78h+arg_0] mov r15, [rax] mov r14, [rax+8] jmp short loc_2EFE9 loc_2EFE2: push 3 pop r14 xor r15d, r15d loc_2EFE9: mov eax, r14d not eax or eax, ebp jnz loc_2F0F3 mov rcx, [r13+0] mov r8, [r13+8] mov rdi, rbx mov rsi, r15 mov rdx, r14 call js_same_value test eax, eax jz short loc_2F023 lea rsi, aPromiseSelfRes; "promise self resolution" mov rdi, rbx xor eax, eax call JS_ThrowTypeError jmp short loc_2F03F loc_2F023: mov rdi, rbx mov rsi, r15 mov rdx, r14 mov ecx, 80h call JS_GetProperty mov r12, rdx cmp r12d, 6 jnz short loc_2F08D loc_2F03F: mov rax, [rbx+18h] mov r14, [rax+0F0h] mov r15, [rax+0F8h] and dword ptr [rax+0F0h], 0 mov qword ptr [rax+0F8h], 4 mov rsi, [r13+0] mov rdx, [r13+8] push 1 pop r9 mov rdi, rbx mov rcx, r14 mov r8, r15 call fulfill_or_reject_promise mov rdi, rbx mov rsi, r14 mov rdx, r15 loc_2F086: call JS_FreeValue jmp short loc_2F10C loc_2F08D: mov rdi, rbx mov [rsp+78h+var_70], rax mov rsi, rax mov rdx, r12 call JS_IsFunction test eax, eax jz short loc_2F0E3 movups xmm0, xmmword ptr [r13+0] lea rcx, [rsp+78h+var_68] movaps xmmword ptr [rcx], xmm0 mov [rcx+10h], r15 mov [rcx+18h], r14 mov r14, [rsp+78h+var_70] mov [rcx+20h], r14 mov [rcx+28h], r12 lea rsi, js_promise_resolve_thenable_job push 3 pop rdx mov rdi, rbx call JS_EnqueueJob mov rdi, rbx mov rsi, r14 mov rdx, r12 jmp short loc_2F086 loc_2F0E3: mov rdi, rbx mov rsi, [rsp+78h+var_70] mov rdx, r12 call JS_FreeValue loc_2F0F3: mov rsi, [r13+0] mov rdx, [r13+8] mov rdi, rbx mov rcx, r15 mov r8, r14 mov r9d, ebp call fulfill_or_reject_promise loc_2F10C: push 3 pop rdx xor eax, eax add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long js_promise_resolve_function_call( long long a1, long long a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, double a7, double a8, __m128 a9, __m128 a10, long long a11, long long a12, long long a13, int a14, long long a15) { _QWORD *v15; // r13 long long v16; // rax unsigned int v17; // ebp _DWORD *v18; // r15 long long v19; // r14 long long v20; // rdx long long v21; // rcx long long v22; // r8 long long v23; // r9 __m128 v24; // xmm4 __m128 v25; // xmm5 long long Property; // rax long long v27; // rdx long long v28; // r12 long long v29; // rax long long v30; // r14 long long v31; // r15 long long v32; // rsi long long v33; // rdx char v35; // [rsp+0h] [rbp-78h] long long v36; // [rsp+8h] [rbp-70h] __int128 v37; // [rsp+10h] [rbp-68h] BYREF _DWORD *v38; // [rsp+20h] [rbp-58h] long long v39; // [rsp+28h] [rbp-50h] long long v40; // [rsp+30h] [rbp-48h] long long v41; // [rsp+38h] [rbp-40h] v15 = *(_QWORD **)(a2 + 48); if ( v15 ) { v16 = v15[2]; if ( !*(_DWORD *)(v16 + 4) ) { *(_DWORD *)(v16 + 4) = 1; v17 = *(unsigned __int16 *)(a2 + 6) - 50; if ( a14 <= 0 ) { v19 = 3LL; v18 = 0LL; } else { v18 = *(_DWORD **)a15; v19 = *(_QWORD *)(a15 + 8); } if ( !(v17 | ~(_DWORD)v19) ) { if ( (unsigned int)js_same_value(a1, v18, v19, (_DWORD *)*v15, v15[1]) ) { JS_ThrowTypeError( a1, (long long)"promise self resolution", v20, v21, v22, v23, a3, a4, a5, a6, v24, v25, a9, a10, v35); LABEL_10: v29 = *(_QWORD *)(a1 + 24); v30 = *(_QWORD *)(v29 + 240); v31 = *(_QWORD *)(v29 + 248); *(_DWORD *)(v29 + 240) = 0; *(_QWORD *)(v29 + 248) = 4LL; fulfill_or_reject_promise(a1, *v15, v15[1], v30, v31, 1LL); v32 = v30; v33 = v31; LABEL_11: JS_FreeValue(a1, v32, v33); return 0LL; } Property = JS_GetProperty(a1, (int)v18, v19, 128); v28 = v27; if ( (_DWORD)v27 == 6 ) goto LABEL_10; v36 = Property; if ( (unsigned int)JS_IsFunction(a1, Property, v27) ) { v37 = *(_OWORD *)v15; v38 = v18; v39 = v19; v40 = v36; v41 = v28; JS_EnqueueJob(a1, (long long)js_promise_resolve_thenable_job, 3u, (long long)&v37); v32 = v36; v33 = v28; goto LABEL_11; } JS_FreeValue(a1, v36, v28); } fulfill_or_reject_promise(a1, *v15, v15[1], v18, v19, v17); } } return 0LL; }
js_promise_resolve_function_call: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R13,qword ptr [RSI + 0x30] TEST R13,R13 JZ 0x0012f10c MOV RAX,qword ptr [R13 + 0x10] CMP dword ptr [RAX + 0x4],0x0 JNZ 0x0012f10c MOV RBX,RDI MOV dword ptr [RAX + 0x4],0x1 MOVZX EBP,word ptr [RSI + 0x6] ADD EBP,-0x32 TEST R9D,R9D JLE 0x0012efe2 MOV RAX,qword ptr [RSP + 0x80] MOV R15,qword ptr [RAX] MOV R14,qword ptr [RAX + 0x8] JMP 0x0012efe9 LAB_0012efe2: PUSH 0x3 POP R14 XOR R15D,R15D LAB_0012efe9: MOV EAX,R14D NOT EAX OR EAX,EBP JNZ 0x0012f0f3 MOV RCX,qword ptr [R13] MOV R8,qword ptr [R13 + 0x8] MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 CALL 0x0011f3b6 TEST EAX,EAX JZ 0x0012f023 LEA RSI,[0x185b48] MOV RDI,RBX XOR EAX,EAX CALL 0x0011bad1 JMP 0x0012f03f LAB_0012f023: MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 MOV ECX,0x80 CALL 0x0011a4c7 MOV R12,RDX CMP R12D,0x6 JNZ 0x0012f08d LAB_0012f03f: MOV RAX,qword ptr [RBX + 0x18] MOV R14,qword ptr [RAX + 0xf0] MOV R15,qword ptr [RAX + 0xf8] AND dword ptr [RAX + 0xf0],0x0 MOV qword ptr [RAX + 0xf8],0x4 MOV RSI,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] PUSH 0x1 POP R9 MOV RDI,RBX MOV RCX,R14 MOV R8,R15 CALL 0x001464f6 MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 LAB_0012f086: CALL 0x001174a2 JMP 0x0012f10c LAB_0012f08d: MOV RDI,RBX MOV qword ptr [RSP + 0x8],RAX MOV RSI,RAX MOV RDX,R12 CALL 0x0011c301 TEST EAX,EAX JZ 0x0012f0e3 MOVUPS XMM0,xmmword ptr [R13] LEA RCX,[RSP + 0x10] MOVAPS xmmword ptr [RCX],XMM0 MOV qword ptr [RCX + 0x10],R15 MOV qword ptr [RCX + 0x18],R14 MOV R14,qword ptr [RSP + 0x8] MOV qword ptr [RCX + 0x20],R14 MOV qword ptr [RCX + 0x28],R12 LEA RSI,[0x1466ba] PUSH 0x3 POP RDX MOV RDI,RBX CALL 0x0011732d MOV RDI,RBX MOV RSI,R14 MOV RDX,R12 JMP 0x0012f086 LAB_0012f0e3: MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x8] MOV RDX,R12 CALL 0x001174a2 LAB_0012f0f3: MOV RSI,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] MOV RDI,RBX MOV RCX,R15 MOV R8,R14 MOV R9D,EBP CALL 0x001464f6 LAB_0012f10c: PUSH 0x3 POP RDX XOR EAX,EAX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] js_promise_resolve_function_call(long param_1,long param_2) { int8 *puVar1; long lVar2; int iVar3; int iVar4; int in_R9D; int8 uVar5; int8 uVar6; int1 auVar7 [16]; int8 *in_stack_00000008; puVar1 = *(int8 **)(param_2 + 0x30); if ((puVar1 == (int8 *)0x0) || (*(int *)(puVar1[2] + 4) != 0)) goto LAB_0012f10c; *(int4 *)(puVar1[2] + 4) = 1; iVar4 = *(ushort *)(param_2 + 6) - 0x32; if (in_R9D < 1) { uVar5 = 3; uVar6 = 0; } else { uVar6 = *in_stack_00000008; uVar5 = in_stack_00000008[1]; } if ((int)uVar5 != -1 || iVar4 != 0) { LAB_0012f0f3: fulfill_or_reject_promise(param_1,*puVar1,puVar1[1],uVar6,uVar5,iVar4); goto LAB_0012f10c; } iVar3 = js_same_value(param_1,uVar6,uVar5,*puVar1,puVar1[1]); if (iVar3 == 0) { auVar7 = JS_GetProperty(param_1,uVar6,uVar5,0x80); if (auVar7._8_4_ == 6) goto LAB_0012f03f; iVar3 = JS_IsFunction(param_1,auVar7._0_8_,auVar7._8_8_); if (iVar3 == 0) { JS_FreeValue(param_1,auVar7._0_8_,auVar7._8_8_); goto LAB_0012f0f3; } JS_EnqueueJob(param_1,js_promise_resolve_thenable_job,3); } else { JS_ThrowTypeError(param_1,"promise self resolution"); LAB_0012f03f: lVar2 = *(long *)(param_1 + 0x18); uVar6 = *(int8 *)*(int1 (*) [16])(lVar2 + 0xf0); uVar5 = *(int8 *)(lVar2 + 0xf8); auVar7 = *(int1 (*) [16])(lVar2 + 0xf0); *(int4 *)(lVar2 + 0xf0) = 0; *(int8 *)(lVar2 + 0xf8) = 4; fulfill_or_reject_promise(param_1,*puVar1,puVar1[1],uVar6,uVar5,1); } JS_FreeValue(param_1,auVar7._0_8_,auVar7._8_8_); LAB_0012f10c: return ZEXT816(3) << 0x40; }
23,411
js_promise_resolve_function_call
bluesky950520[P]quickjs/quickjs.c
static JSValue js_promise_resolve_function_call(JSContext *ctx, JSValue func_obj, JSValue this_val, int argc, JSValue *argv, int flags) { JSObject *p = JS_VALUE_GET_OBJ(func_obj); JSPromiseFunctionData *s; JSValue resolution, args[3]; JSValue then; BOOL is_reject; s = p->u.promise_function_data; if (!s || s->presolved->already_resolved) return JS_UNDEFINED; s->presolved->already_resolved = TRUE; is_reject = p->class_id - JS_CLASS_PROMISE_RESOLVE_FUNCTION; if (argc > 0) resolution = argv[0]; else resolution = JS_UNDEFINED; #ifdef DUMP_PROMISE if (check_dump_flag(ctx->rt, DUMP_PROMISE)) { printf("js_promise_resolving_function_call: is_reject=%d resolution=", is_reject); JS_DumpValue(ctx->rt, resolution); printf("\n"); } #endif if (is_reject || !JS_IsObject(resolution)) { goto done; } else if (js_same_value(ctx, resolution, s->promise)) { JS_ThrowTypeError(ctx, "promise self resolution"); goto fail_reject; } then = JS_GetProperty(ctx, resolution, JS_ATOM_then); if (JS_IsException(then)) { JSValue error; fail_reject: error = JS_GetException(ctx); reject_promise(ctx, s->promise, error); JS_FreeValue(ctx, error); } else if (!JS_IsFunction(ctx, then)) { JS_FreeValue(ctx, then); done: fulfill_or_reject_promise(ctx, s->promise, resolution, is_reject); } else { args[0] = s->promise; args[1] = resolution; args[2] = then; JS_EnqueueJob(ctx, js_promise_resolve_thenable_job, 3, args); JS_FreeValue(ctx, then); } return JS_UNDEFINED; }
O3
c
js_promise_resolve_function_call: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq 0x30(%rsi), %r13 testq %r13, %r13 je 0x36c17 movq 0x10(%r13), %rax cmpl $0x0, 0x4(%rax) jne 0x36c17 movq %rdi, %rbx movl $0x1, 0x4(%rax) movzwl 0x6(%rsi), %ebp addl $-0x32, %ebp testl %r9d, %r9d jle 0x36ac6 movq 0x70(%rsp), %rax movq (%rax), %r15 movq 0x8(%rax), %r14 jmp 0x36acf movl $0x3, %r14d xorl %r15d, %r15d movl %r14d, %eax notl %eax orl %ebp, %eax jne 0x36bfe movq (%r13), %rcx movq 0x8(%r13), %r8 movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x25ea9 testl %eax, %eax je 0x36b09 leaq 0x6b0bb(%rip), %rsi # 0xa1bb8 movq %rbx, %rdi xorl %eax, %eax callq 0x2214f jmp 0x36b39 movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx movl $0x80, %ecx movq %r15, %r8 movq %r14, %r9 pushq $0x0 pushq $0x0 callq 0x22c0f addq $0x10, %rsp movq %rax, %rsi movq %rdx, %r12 movl %r12d, %eax cmpq $0x6, %rax jne 0x36ba5 movq 0x18(%rbx), %rax movq 0xf0(%rax), %r14 movq 0xf8(%rax), %r15 movl $0x0, 0xf0(%rax) movq $0x4, 0xf8(%rax) movq (%r13), %rsi movq 0x8(%r13), %rdx movq %rbx, %rdi movq %r14, %rcx movq %r15, %r8 movl $0x1, %r9d callq 0x54b6c cmpl $-0x9, %r15d jb 0x36c17 movq 0x18(%rbx), %rdi movl (%r14), %eax leal -0x1(%rax), %ecx movl %ecx, (%r14) cmpl $0x1, %eax jg 0x36c17 movq %r14, %rsi movq %r15, %rdx callq 0x20d90 jmp 0x36c17 cmpl $-0x1, %eax jne 0x36be0 movzwl 0x6(%rsi), %eax cmpl $0x30, %eax je 0x36bd4 cmpl $0xd, %eax je 0x36c2d movq 0x18(%rbx), %rcx movq 0x80(%rcx), %rcx leaq (%rax,%rax,4), %rdx xorl %eax, %eax cmpq $0x0, 0x18(%rcx,%rdx,8) setne %al jmp 0x36bdc movq 0x30(%rsi), %rax movzbl 0x20(%rax), %eax testl %eax, %eax jne 0x36c2d cmpl $-0x9, %r12d jb 0x36bfe movq 0x18(%rbx), %rdi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x36bfe movq %r12, %rdx callq 0x20d90 movq (%r13), %rsi movq 0x8(%r13), %rdx movq %rbx, %rdi movq %r15, %rcx movq %r14, %r8 movl %ebp, %r9d callq 0x54b6c movl $0x3, %edx xorl %eax, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movups (%r13), %xmm0 movq %rsp, %rcx movaps %xmm0, (%rcx) movq %r15, 0x10(%rcx) movq %r14, 0x18(%rcx) movq %rsi, 0x20(%rcx) movq %r12, 0x28(%rcx) movq %rsi, %r14 leaq 0x1e0fc(%rip), %rsi # 0x54d4e movq %rbx, %rdi movl $0x3, %edx callq 0xf001 movq 0x18(%rbx), %rdi movl (%r14), %eax leal -0x1(%rax), %ecx movl %ecx, (%r14) cmpl $0x1, %eax jg 0x36c17 movq %r14, %rsi movq %r12, %rdx jmp 0x36b9e
js_promise_resolve_function_call: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r13, [rsi+30h] test r13, r13 jz loc_36C17 mov rax, [r13+10h] cmp dword ptr [rax+4], 0 jnz loc_36C17 mov rbx, rdi mov dword ptr [rax+4], 1 movzx ebp, word ptr [rsi+6] add ebp, 0FFFFFFCEh test r9d, r9d jle short loc_36AC6 mov rax, [rsp+68h+arg_0] mov r15, [rax] mov r14, [rax+8] jmp short loc_36ACF loc_36AC6: mov r14d, 3 xor r15d, r15d loc_36ACF: mov eax, r14d not eax or eax, ebp jnz loc_36BFE mov rcx, [r13+0] mov r8, [r13+8] mov rdi, rbx mov rsi, r15 mov rdx, r14 call js_same_value test eax, eax jz short loc_36B09 lea rsi, aPromiseSelfRes; "promise self resolution" mov rdi, rbx xor eax, eax call JS_ThrowTypeError jmp short loc_36B39 loc_36B09: mov rdi, rbx mov rsi, r15 mov rdx, r14 mov ecx, 80h mov r8, r15 mov r9, r14 push 0 push 0 call JS_GetPropertyInternal2 add rsp, 10h mov rsi, rax mov r12, rdx mov eax, r12d cmp rax, 6 jnz short loc_36BA5 loc_36B39: mov rax, [rbx+18h] mov r14, [rax+0F0h] mov r15, [rax+0F8h] mov dword ptr [rax+0F0h], 0 mov qword ptr [rax+0F8h], 4 mov rsi, [r13+0] mov rdx, [r13+8] mov rdi, rbx mov rcx, r14 mov r8, r15 mov r9d, 1 call fulfill_or_reject_promise cmp r15d, 0FFFFFFF7h jb loc_36C17 mov rdi, [rbx+18h] mov eax, [r14] lea ecx, [rax-1] mov [r14], ecx cmp eax, 1 jg short loc_36C17 mov rsi, r14 mov rdx, r15 loc_36B9E: call js_free_value_rt jmp short loc_36C17 loc_36BA5: cmp eax, 0FFFFFFFFh jnz short loc_36BE0 movzx eax, word ptr [rsi+6] cmp eax, 30h ; '0' jz short loc_36BD4 cmp eax, 0Dh jz short loc_36C2D mov rcx, [rbx+18h] mov rcx, [rcx+80h] lea rdx, [rax+rax*4] xor eax, eax cmp qword ptr [rcx+rdx*8+18h], 0 setnz al jmp short loc_36BDC loc_36BD4: mov rax, [rsi+30h] movzx eax, byte ptr [rax+20h] loc_36BDC: test eax, eax jnz short loc_36C2D loc_36BE0: cmp r12d, 0FFFFFFF7h jb short loc_36BFE mov rdi, [rbx+18h] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short loc_36BFE mov rdx, r12 call js_free_value_rt loc_36BFE: mov rsi, [r13+0] mov rdx, [r13+8] mov rdi, rbx mov rcx, r15 mov r8, r14 mov r9d, ebp call fulfill_or_reject_promise loc_36C17: mov edx, 3 xor eax, eax add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_36C2D: movups xmm0, xmmword ptr [r13+0] mov rcx, rsp movaps xmmword ptr [rcx], xmm0 mov [rcx+10h], r15 mov [rcx+18h], r14 mov [rcx+20h], rsi mov [rcx+28h], r12 mov r14, rsi lea rsi, js_promise_resolve_thenable_job mov rdi, rbx mov edx, 3 call JS_EnqueueJob mov rdi, [rbx+18h] mov eax, [r14] lea ecx, [rax-1] mov [r14], ecx cmp eax, 1 jg short loc_36C17 mov rsi, r14 mov rdx, r12 jmp loc_36B9E
long long js_promise_resolve_function_call( long long a1, long long a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, double a7, double a8, __m128 a9, __m128 a10, long long a11, long long a12, long long a13, int a14, long long a15) { _QWORD *v15; // r13 long long v16; // rax unsigned int v18; // ebp _DWORD *v19; // r15 long long v20; // r14 long long v21; // rdx long long v22; // rcx long long v23; // r8 long long v24; // r9 __m128 v25; // xmm4 __m128 v26; // xmm5 long long v27; // rdx unsigned long long PropertyInternal2; // rsi long long v29; // r8 long long v30; // r9 long long v31; // r12 long long v32; // rax int *v33; // r14 long long v34; // r15 long long v35; // r8 long long v36; // r9 long long v37; // rdi int v38; // eax long long v39; // rcx long long v40; // rdx long long v41; // rax int v42; // eax long long v43; // rdi int v44; // eax long long v45; // rcx int v47; // eax __int128 v48; // [rsp+0h] [rbp-68h] BYREF _DWORD *v49; // [rsp+10h] [rbp-58h] long long v50; // [rsp+18h] [rbp-50h] unsigned long long v51; // [rsp+20h] [rbp-48h] long long v52; // [rsp+28h] [rbp-40h] v15 = *(_QWORD **)(a2 + 48); if ( !v15 ) return 0LL; v16 = v15[2]; if ( *(_DWORD *)(v16 + 4) ) return 0LL; *(_DWORD *)(v16 + 4) = 1; v18 = *(unsigned __int16 *)(a2 + 6) - 50; if ( a14 <= 0 ) { v20 = 3LL; v19 = 0LL; } else { v19 = *(_DWORD **)a15; v20 = *(_QWORD *)(a15 + 8); } if ( v18 | ~(_DWORD)v20 ) { LABEL_23: fulfill_or_reject_promise(a1, *v15, v15[1], v19, v20, v18); return 0LL; } if ( !(unsigned int)js_same_value(a1, v19, v20, (_DWORD *)*v15, v15[1]) ) { PropertyInternal2 = JS_GetPropertyInternal2(a1, (long long)v19, v20, 0x80u, (long long)v19, v20, 0LL, 0); v31 = v27; if ( (unsigned int)v27 == 6LL ) goto LABEL_10; if ( (_DWORD)v27 != -1 ) goto LABEL_20; v41 = *(unsigned __int16 *)(PropertyInternal2 + 6); if ( (_DWORD)v41 == 48 ) { v42 = *(unsigned __int8 *)(*(_QWORD *)(PropertyInternal2 + 48) + 32LL); } else { if ( (_DWORD)v41 == 13 ) goto LABEL_25; v42 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 128LL) + 40 * v41 + 24) != 0LL; } if ( !v42 ) { LABEL_20: if ( (unsigned int)v27 >= 0xFFFFFFF7 ) { v43 = *(_QWORD *)(a1 + 24); v44 = *(_DWORD *)PropertyInternal2; v45 = (unsigned int)(*(_DWORD *)PropertyInternal2 - 1); *(_DWORD *)PropertyInternal2 = v45; if ( v44 <= 1 ) js_free_value_rt(v43, (_QWORD *)PropertyInternal2, v27, v45, v29, v30); } goto LABEL_23; } LABEL_25: v48 = *(_OWORD *)v15; v49 = v19; v50 = v20; v51 = PropertyInternal2; v52 = v27; JS_EnqueueJob(a1, (long long)js_promise_resolve_thenable_job, 3, (long long)&v48); v37 = *(_QWORD *)(a1 + 24); v47 = *(_DWORD *)PropertyInternal2; v39 = (unsigned int)(*(_DWORD *)PropertyInternal2 - 1); *(_DWORD *)PropertyInternal2 = v39; if ( v47 > 1 ) return 0LL; v40 = v31; goto LABEL_13; } JS_ThrowTypeError(a1, (long long)"promise self resolution", v21, v22, v23, v24, a3, a4, a5, a6, v25, v26, a9, a10, v48); LABEL_10: v32 = *(_QWORD *)(a1 + 24); v33 = *(int **)(v32 + 240); v34 = *(_QWORD *)(v32 + 248); *(_DWORD *)(v32 + 240) = 0; *(_QWORD *)(v32 + 248) = 4LL; fulfill_or_reject_promise(a1, *v15, v15[1], v33, v34, 1LL); if ( (unsigned int)v34 >= 0xFFFFFFF7 ) { v37 = *(_QWORD *)(a1 + 24); v38 = *v33; v39 = (unsigned int)(*v33 - 1); *v33 = v39; if ( v38 <= 1 ) { PropertyInternal2 = (unsigned long long)v33; v40 = v34; LABEL_13: js_free_value_rt(v37, (_QWORD *)PropertyInternal2, v40, v39, v35, v36); } } return 0LL; }
js_promise_resolve_function_call: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R13,qword ptr [RSI + 0x30] TEST R13,R13 JZ 0x00136c17 MOV RAX,qword ptr [R13 + 0x10] CMP dword ptr [RAX + 0x4],0x0 JNZ 0x00136c17 MOV RBX,RDI MOV dword ptr [RAX + 0x4],0x1 MOVZX EBP,word ptr [RSI + 0x6] ADD EBP,-0x32 TEST R9D,R9D JLE 0x00136ac6 MOV RAX,qword ptr [RSP + 0x70] MOV R15,qword ptr [RAX] MOV R14,qword ptr [RAX + 0x8] JMP 0x00136acf LAB_00136ac6: MOV R14D,0x3 XOR R15D,R15D LAB_00136acf: MOV EAX,R14D NOT EAX OR EAX,EBP JNZ 0x00136bfe MOV RCX,qword ptr [R13] MOV R8,qword ptr [R13 + 0x8] MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 CALL 0x00125ea9 TEST EAX,EAX JZ 0x00136b09 LEA RSI,[0x1a1bb8] MOV RDI,RBX XOR EAX,EAX CALL 0x0012214f JMP 0x00136b39 LAB_00136b09: MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 MOV ECX,0x80 MOV R8,R15 MOV R9,R14 PUSH 0x0 PUSH 0x0 CALL 0x00122c0f ADD RSP,0x10 MOV RSI,RAX MOV R12,RDX MOV EAX,R12D CMP RAX,0x6 JNZ 0x00136ba5 LAB_00136b39: MOV RAX,qword ptr [RBX + 0x18] MOV R14,qword ptr [RAX + 0xf0] MOV R15,qword ptr [RAX + 0xf8] MOV dword ptr [RAX + 0xf0],0x0 MOV qword ptr [RAX + 0xf8],0x4 MOV RSI,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] MOV RDI,RBX MOV RCX,R14 MOV R8,R15 MOV R9D,0x1 CALL 0x00154b6c CMP R15D,-0x9 JC 0x00136c17 MOV RDI,qword ptr [RBX + 0x18] MOV EAX,dword ptr [R14] LEA ECX,[RAX + -0x1] MOV dword ptr [R14],ECX CMP EAX,0x1 JG 0x00136c17 MOV RSI,R14 MOV RDX,R15 LAB_00136b9e: CALL 0x00120d90 JMP 0x00136c17 LAB_00136ba5: CMP EAX,-0x1 JNZ 0x00136be0 MOVZX EAX,word ptr [RSI + 0x6] CMP EAX,0x30 JZ 0x00136bd4 CMP EAX,0xd JZ 0x00136c2d MOV RCX,qword ptr [RBX + 0x18] MOV RCX,qword ptr [RCX + 0x80] LEA RDX,[RAX + RAX*0x4] XOR EAX,EAX CMP qword ptr [RCX + RDX*0x8 + 0x18],0x0 SETNZ AL JMP 0x00136bdc LAB_00136bd4: MOV RAX,qword ptr [RSI + 0x30] MOVZX EAX,byte ptr [RAX + 0x20] LAB_00136bdc: TEST EAX,EAX JNZ 0x00136c2d LAB_00136be0: CMP R12D,-0x9 JC 0x00136bfe MOV RDI,qword ptr [RBX + 0x18] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x00136bfe MOV RDX,R12 CALL 0x00120d90 LAB_00136bfe: MOV RSI,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] MOV RDI,RBX MOV RCX,R15 MOV R8,R14 MOV R9D,EBP CALL 0x00154b6c LAB_00136c17: MOV EDX,0x3 XOR EAX,EAX ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00136c2d: MOVUPS XMM0,xmmword ptr [R13] MOV RCX,RSP MOVAPS xmmword ptr [RCX],XMM0 MOV qword ptr [RCX + 0x10],R15 MOV qword ptr [RCX + 0x18],R14 MOV qword ptr [RCX + 0x20],RSI MOV qword ptr [RCX + 0x28],R12 MOV R14,RSI LEA RSI,[0x154d4e] MOV RDI,RBX MOV EDX,0x3 CALL 0x0010f001 MOV RDI,qword ptr [RBX + 0x18] MOV EAX,dword ptr [R14] LEA ECX,[RAX + -0x1] MOV dword ptr [R14],ECX CMP EAX,0x1 JG 0x00136c17 MOV RSI,R14 MOV RDX,R12 JMP 0x00136b9e
int1 [16] js_promise_resolve_function_call(long param_1,long param_2) { ushort uVar1; int8 *puVar2; long lVar3; int8 uVar4; int iVar5; int *piVar6; int iVar7; int in_R9D; int8 uVar8; int8 uVar9; char cVar10; int1 auVar11 [16]; int8 *in_stack_00000008; puVar2 = *(int8 **)(param_2 + 0x30); if ((puVar2 == (int8 *)0x0) || (*(int *)(puVar2[2] + 4) != 0)) goto LAB_00136c17; *(int4 *)(puVar2[2] + 4) = 1; iVar7 = *(ushort *)(param_2 + 6) - 0x32; if (in_R9D < 1) { uVar8 = 3; uVar9 = 0; } else { uVar9 = *in_stack_00000008; uVar8 = in_stack_00000008[1]; } if ((int)uVar8 != -1 || iVar7 != 0) { LAB_00136bfe: fulfill_or_reject_promise(param_1,*puVar2,puVar2[1],uVar9,uVar8,iVar7); goto LAB_00136c17; } iVar5 = js_same_value(param_1,uVar9,uVar8,*puVar2,puVar2[1]); if (iVar5 == 0) { auVar11 = JS_GetPropertyInternal2(param_1,uVar9,uVar8,0x80,uVar9,uVar8,0,0); piVar6 = auVar11._0_8_; if ((auVar11._8_8_ & 0xffffffff) == 6) goto LAB_00136b39; if (auVar11._8_4_ != 0xffffffff) { LAB_00136be0: if (0xfffffff6 < auVar11._8_4_) { uVar4 = *(int8 *)(param_1 + 0x18); iVar5 = *piVar6; *piVar6 = iVar5 + -1; if (iVar5 < 2) { js_free_value_rt(uVar4,piVar6,auVar11._8_8_); } } goto LAB_00136bfe; } uVar1 = *(ushort *)((long)piVar6 + 6); if (uVar1 == 0x30) { cVar10 = *(char *)(*(long *)(piVar6 + 0xc) + 0x20); LAB_00136bdc: if (cVar10 == '\0') goto LAB_00136be0; } else if (uVar1 != 0xd) { cVar10 = *(long *)(*(long *)(*(long *)(param_1 + 0x18) + 0x80) + 0x18 + (ulong)uVar1 * 0x28) != 0; goto LAB_00136bdc; } JS_EnqueueJob(param_1,js_promise_resolve_thenable_job,3); uVar9 = *(int8 *)(param_1 + 0x18); iVar7 = *piVar6; *piVar6 = iVar7 + -1; } else { JS_ThrowTypeError(param_1,"promise self resolution"); LAB_00136b39: lVar3 = *(long *)(param_1 + 0x18); piVar6 = *(int **)*(int1 (*) [16])(lVar3 + 0xf0); uVar9 = *(int8 *)(lVar3 + 0xf8); auVar11 = *(int1 (*) [16])(lVar3 + 0xf0); *(int4 *)(lVar3 + 0xf0) = 0; *(int8 *)(lVar3 + 0xf8) = 4; fulfill_or_reject_promise(param_1,*puVar2,puVar2[1],piVar6,uVar9,1); if ((uint)uVar9 < 0xfffffff7) goto LAB_00136c17; uVar9 = *(int8 *)(param_1 + 0x18); iVar7 = *piVar6; *piVar6 = iVar7 + -1; } if (iVar7 < 2) { js_free_value_rt(uVar9,auVar11._0_8_,auVar11._8_8_); } LAB_00136c17: return ZEXT816(3) << 0x40; }
23,412
Catch::TextFlow::Spacer(unsigned long)
AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp
Column Spacer( size_t spaceWidth ) { Column ret{ "" }; ret.width( spaceWidth ); return ret; }
O3
cpp
Catch::TextFlow::Spacer(unsigned long): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rsi, %rbx movq %rdi, %r14 leaq 0x18(%rsp), %r12 movq %r12, -0x10(%r12) leaq 0x8365c(%rip), %rdx # 0xde588 leaq 0x8(%rsp), %r15 movq %r15, %rdi movq %rdx, %rsi callq 0x37312 leaq 0x10(%r14), %rax movq %rax, (%r14) movq (%r15), %rsi movq 0x8(%r15), %rdx addq %rsi, %rdx movq %r14, %rdi callq 0x251d8 movq $0x4f, 0x20(%r14) movq $0x0, 0x28(%r14) movq $-0x1, 0x30(%r14) movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x5af84 movq 0x18(%rsp), %rsi incq %rsi callq 0x17150 movq %rbx, 0x20(%r14) movq %r14, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x5afb1 movq 0x18(%rsp), %rsi incq %rsi callq 0x17150 movq %rbx, %rdi callq 0x17740 nop
_ZN5Catch8TextFlow6SpacerEm: push r15 push r14 push r12 push rbx sub rsp, 28h mov rbx, rsi mov r14, rdi lea r12, [rsp+48h+var_30] mov [r12-10h], r12 lea rdx, aWithExpansion_0+11h; "" lea r15, [rsp+48h+var_40] mov rdi, r15 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) lea rax, [r14+10h] mov [r14], rax mov rsi, [r15] mov rdx, [r15+8] add rdx, rsi 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) mov qword ptr [r14+20h], 4Fh ; 'O' mov qword ptr [r14+28h], 0 mov qword ptr [r14+30h], 0FFFFFFFFFFFFFFFFh mov rdi, [rsp+48h+var_40]; void * cmp rdi, r12 jz short loc_5AF84 mov rsi, [rsp+48h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5AF84: mov [r14+20h], rbx mov rax, r14 add rsp, 28h pop rbx pop r12 pop r14 pop r15 retn mov rbx, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r12 jz short loc_5AFB1 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5AFB1: mov rdi, rbx call __Unwind_Resume
Catch::TextFlow * Catch::TextFlow::Spacer(Catch::TextFlow *this, long long a2) { void *v3[2]; // [rsp+8h] [rbp-40h] BYREF _QWORD v4[6]; // [rsp+18h] [rbp-30h] BYREF v3[0] = v4; std::string::_M_construct<char const*>(v3, "", (long long)""); *(_QWORD *)this = (char *)this + 16; std::string::_M_construct<char *>(this, (_BYTE *)v3[0], (long long)v3[0] + (unsigned long long)v3[1]); *((_QWORD *)this + 4) = 79LL; *((_QWORD *)this + 5) = 0LL; *((_QWORD *)this + 6) = -1LL; if ( v3[0] != v4 ) operator delete(v3[0], v4[0] + 1LL); *((_QWORD *)this + 4) = a2; return this; }
Spacer: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBX,RSI MOV R14,RDI LEA R12,[RSP + 0x18] MOV qword ptr [R12 + -0x10],R12 LEA RDX,[0x1de588] LEA R15,[RSP + 0x8] MOV RDI,R15 MOV RSI,RDX CALL 0x00137312 LEA RAX,[R14 + 0x10] MOV qword ptr [R14],RAX MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] ADD RDX,RSI LAB_0015af4d: MOV RDI,R14 CALL 0x001251d8 LAB_0015af55: MOV qword ptr [R14 + 0x20],0x4f MOV qword ptr [R14 + 0x28],0x0 MOV qword ptr [R14 + 0x30],-0x1 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R12 JZ 0x0015af84 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00117150 LAB_0015af84: MOV qword ptr [R14 + 0x20],RBX MOV RAX,R14 ADD RSP,0x28 POP RBX POP R12 POP R14 POP R15 RET
/* Catch::TextFlow::Spacer(unsigned long) */ TextFlow * __thiscall Catch::TextFlow::Spacer(TextFlow *this,ulong param_1) { long *local_40; long local_38; long local_30 [2]; local_40 = local_30; std::__cxx11::string::_M_construct<char_const*>(&local_40,""); *(TextFlow **)this = this + 0x10; /* try { // try from 0015af4d to 0015af54 has its CatchHandler @ 0015af97 */ std::__cxx11::string::_M_construct<char*>(this,local_40,local_38 + (long)local_40); *(int8 *)(this + 0x20) = 0x4f; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0xffffffffffffffff; if (local_40 != local_30) { operator_delete(local_40,local_30[0] + 1); } *(ulong *)(this + 0x20) = param_1; return this; }
23,413
DecodeDataBase64
csit-sgu[P]mit-game-2025-team-tyler/Libraries/raylib/src/rcore.c
unsigned char *DecodeDataBase64(const unsigned char *data, int *outputSize) { static const unsigned char base64decodeTable[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 0, 0, 0, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0, 0, 0, 0, 0, 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51 }; // Get output size of Base64 input data int outSize = 0; for (int i = 0; data[4*i] != 0; i++) { if (data[4*i + 3] == '=') { if (data[4*i + 2] == '=') outSize += 1; else outSize += 2; } else outSize += 3; } // Allocate memory to store decoded Base64 data unsigned char *decodedData = (unsigned char *)RL_MALLOC(outSize); for (int i = 0; i < outSize/3; i++) { unsigned char a = base64decodeTable[(int)data[4*i]]; unsigned char b = base64decodeTable[(int)data[4*i + 1]]; unsigned char c = base64decodeTable[(int)data[4*i + 2]]; unsigned char d = base64decodeTable[(int)data[4*i + 3]]; decodedData[3*i] = (a << 2) | (b >> 4); decodedData[3*i + 1] = (b << 4) | (c >> 2); decodedData[3*i + 2] = (c << 6) | d; } if (outSize%3 == 1) { int n = outSize/3; unsigned char a = base64decodeTable[(int)data[4*n]]; unsigned char b = base64decodeTable[(int)data[4*n + 1]]; decodedData[outSize - 1] = (a << 2) | (b >> 4); } else if (outSize%3 == 2) { int n = outSize/3; unsigned char a = base64decodeTable[(int)data[4*n]]; unsigned char b = base64decodeTable[(int)data[4*n + 1]]; unsigned char c = base64decodeTable[(int)data[4*n + 2]]; decodedData[outSize - 2] = (a << 2) | (b >> 4); decodedData[outSize - 1] = (b << 4) | (c >> 2); } *outputSize = outSize; return decodedData; }
O0
c
DecodeDataBase64: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl $0x0, -0x14(%rbp) movl $0x0, -0x18(%rbp) movq -0x8(%rbp), %rax movl -0x18(%rbp), %ecx shll $0x2, %ecx movslq %ecx, %rcx movzbl (%rax,%rcx), %eax cmpl $0x0, %eax je 0xd29f2 movq -0x8(%rbp), %rax movl -0x18(%rbp), %ecx shll $0x2, %ecx addl $0x3, %ecx movslq %ecx, %rcx movzbl (%rax,%rcx), %eax cmpl $0x3d, %eax jne 0xd29dc movq -0x8(%rbp), %rax movl -0x18(%rbp), %ecx shll $0x2, %ecx addl $0x2, %ecx movslq %ecx, %rcx movzbl (%rax,%rcx), %eax cmpl $0x3d, %eax jne 0xd29d1 movl -0x14(%rbp), %eax addl $0x1, %eax movl %eax, -0x14(%rbp) jmp 0xd29da movl -0x14(%rbp), %eax addl $0x2, %eax movl %eax, -0x14(%rbp) jmp 0xd29e5 movl -0x14(%rbp), %eax addl $0x3, %eax movl %eax, -0x14(%rbp) jmp 0xd29e7 movl -0x18(%rbp), %eax addl $0x1, %eax movl %eax, -0x18(%rbp) jmp 0xd297e movslq -0x14(%rbp), %rdi callq 0xa6e0 movq %rax, -0x20(%rbp) movl $0x0, -0x24(%rbp) movl -0x24(%rbp), %eax movl %eax, -0x3c(%rbp) movl -0x14(%rbp), %eax movl $0x3, %ecx cltd idivl %ecx movl %eax, %ecx movl -0x3c(%rbp), %eax cmpl %ecx, %eax jge 0xd2b22 movq -0x8(%rbp), %rax movl -0x24(%rbp), %ecx shll $0x2, %ecx movslq %ecx, %rcx movzbl (%rax,%rcx), %eax movslq %eax, %rcx leaq 0xe1131(%rip), %rax # 0x1b3b70 movb (%rax,%rcx), %al movb %al, -0x25(%rbp) movq -0x8(%rbp), %rax movl -0x24(%rbp), %ecx shll $0x2, %ecx addl $0x1, %ecx movslq %ecx, %rcx movzbl (%rax,%rcx), %eax movslq %eax, %rcx leaq 0xe110d(%rip), %rax # 0x1b3b70 movb (%rax,%rcx), %al movb %al, -0x26(%rbp) movq -0x8(%rbp), %rax movl -0x24(%rbp), %ecx shll $0x2, %ecx addl $0x2, %ecx movslq %ecx, %rcx movzbl (%rax,%rcx), %eax movslq %eax, %rcx leaq 0xe10e9(%rip), %rax # 0x1b3b70 movb (%rax,%rcx), %al movb %al, -0x27(%rbp) movq -0x8(%rbp), %rax movl -0x24(%rbp), %ecx shll $0x2, %ecx addl $0x3, %ecx movslq %ecx, %rcx movzbl (%rax,%rcx), %eax movslq %eax, %rcx leaq 0xe10c5(%rip), %rax # 0x1b3b70 movb (%rax,%rcx), %al movb %al, -0x28(%rbp) movzbl -0x25(%rbp), %eax shll $0x2, %eax movzbl -0x26(%rbp), %ecx sarl $0x4, %ecx orl %ecx, %eax movb %al, %dl movq -0x20(%rbp), %rax imull $0x3, -0x24(%rbp), %ecx movslq %ecx, %rcx movb %dl, (%rax,%rcx) movzbl -0x26(%rbp), %eax shll $0x4, %eax movzbl -0x27(%rbp), %ecx sarl $0x2, %ecx orl %ecx, %eax movb %al, %dl movq -0x20(%rbp), %rax imull $0x3, -0x24(%rbp), %ecx addl $0x1, %ecx movslq %ecx, %rcx movb %dl, (%rax,%rcx) movzbl -0x27(%rbp), %eax shll $0x6, %eax movzbl -0x28(%rbp), %ecx orl %ecx, %eax movb %al, %dl movq -0x20(%rbp), %rax imull $0x3, -0x24(%rbp), %ecx addl $0x2, %ecx movslq %ecx, %rcx movb %dl, (%rax,%rcx) movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) jmp 0xd2a06 movl -0x14(%rbp), %eax movl $0x3, %ecx cltd idivl %ecx cmpl $0x1, %edx jne 0xd2bac movl -0x14(%rbp), %eax movl $0x3, %ecx cltd idivl %ecx movl %eax, -0x2c(%rbp) movq -0x8(%rbp), %rax movl -0x2c(%rbp), %ecx shll $0x2, %ecx movslq %ecx, %rcx movzbl (%rax,%rcx), %eax movslq %eax, %rcx leaq 0xe1015(%rip), %rax # 0x1b3b70 movb (%rax,%rcx), %al movb %al, -0x2d(%rbp) movq -0x8(%rbp), %rax movl -0x2c(%rbp), %ecx shll $0x2, %ecx addl $0x1, %ecx movslq %ecx, %rcx movzbl (%rax,%rcx), %eax movslq %eax, %rcx leaq 0xe0ff1(%rip), %rax # 0x1b3b70 movb (%rax,%rcx), %al movb %al, -0x2e(%rbp) movzbl -0x2d(%rbp), %eax shll $0x2, %eax movzbl -0x2e(%rbp), %ecx sarl $0x4, %ecx orl %ecx, %eax movb %al, %dl movq -0x20(%rbp), %rax movl -0x14(%rbp), %ecx subl $0x1, %ecx movslq %ecx, %rcx movb %dl, (%rax,%rcx) jmp 0xd2c7d movl -0x14(%rbp), %eax movl $0x3, %ecx cltd idivl %ecx cmpl $0x2, %edx jne 0xd2c7b movl -0x14(%rbp), %eax movl $0x3, %ecx cltd idivl %ecx movl %eax, -0x34(%rbp) movq -0x8(%rbp), %rax movl -0x34(%rbp), %ecx shll $0x2, %ecx movslq %ecx, %rcx movzbl (%rax,%rcx), %eax movslq %eax, %rcx leaq 0xe0f87(%rip), %rax # 0x1b3b70 movb (%rax,%rcx), %al movb %al, -0x35(%rbp) movq -0x8(%rbp), %rax movl -0x34(%rbp), %ecx shll $0x2, %ecx addl $0x1, %ecx movslq %ecx, %rcx movzbl (%rax,%rcx), %eax movslq %eax, %rcx leaq 0xe0f63(%rip), %rax # 0x1b3b70 movb (%rax,%rcx), %al movb %al, -0x36(%rbp) movq -0x8(%rbp), %rax movl -0x34(%rbp), %ecx shll $0x2, %ecx addl $0x2, %ecx movslq %ecx, %rcx movzbl (%rax,%rcx), %eax movslq %eax, %rcx leaq 0xe0f3f(%rip), %rax # 0x1b3b70 movb (%rax,%rcx), %al movb %al, -0x37(%rbp) movzbl -0x35(%rbp), %eax shll $0x2, %eax movzbl -0x36(%rbp), %ecx sarl $0x4, %ecx orl %ecx, %eax movb %al, %dl movq -0x20(%rbp), %rax movl -0x14(%rbp), %ecx subl $0x2, %ecx movslq %ecx, %rcx movb %dl, (%rax,%rcx) movzbl -0x36(%rbp), %eax shll $0x4, %eax movzbl -0x37(%rbp), %ecx sarl $0x2, %ecx orl %ecx, %eax movb %al, %dl movq -0x20(%rbp), %rax movl -0x14(%rbp), %ecx subl $0x1, %ecx movslq %ecx, %rcx movb %dl, (%rax,%rcx) jmp 0xd2c7d movl -0x14(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movq -0x20(%rbp), %rax addq $0x40, %rsp popq %rbp retq
DecodeDataBase64: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], 0 mov [rbp+var_18], 0 loc_D297E: mov rax, [rbp+var_8] mov ecx, [rbp+var_18] shl ecx, 2 movsxd rcx, ecx movzx eax, byte ptr [rax+rcx] cmp eax, 0 jz short loc_D29F2 mov rax, [rbp+var_8] mov ecx, [rbp+var_18] shl ecx, 2 add ecx, 3 movsxd rcx, ecx movzx eax, byte ptr [rax+rcx] cmp eax, 3Dh ; '=' jnz short loc_D29DC mov rax, [rbp+var_8] mov ecx, [rbp+var_18] shl ecx, 2 add ecx, 2 movsxd rcx, ecx movzx eax, byte ptr [rax+rcx] cmp eax, 3Dh ; '=' jnz short loc_D29D1 mov eax, [rbp+var_14] add eax, 1 mov [rbp+var_14], eax jmp short loc_D29DA loc_D29D1: mov eax, [rbp+var_14] add eax, 2 mov [rbp+var_14], eax loc_D29DA: jmp short loc_D29E5 loc_D29DC: mov eax, [rbp+var_14] add eax, 3 mov [rbp+var_14], eax loc_D29E5: jmp short $+2 loc_D29E7: mov eax, [rbp+var_18] add eax, 1 mov [rbp+var_18], eax jmp short loc_D297E loc_D29F2: movsxd rdi, [rbp+var_14] call _malloc mov [rbp+var_20], rax mov [rbp+var_24], 0 loc_D2A06: mov eax, [rbp+var_24] mov [rbp+var_3C], eax mov eax, [rbp+var_14] mov ecx, 3 cdq idiv ecx mov ecx, eax mov eax, [rbp+var_3C] cmp eax, ecx jge loc_D2B22 mov rax, [rbp+var_8] mov ecx, [rbp+var_24] shl ecx, 2 movsxd rcx, ecx movzx eax, byte ptr [rax+rcx] movsxd rcx, eax lea rax, DecodeDataBase64_base64decodeTable mov al, [rax+rcx] mov [rbp+var_25], al mov rax, [rbp+var_8] mov ecx, [rbp+var_24] shl ecx, 2 add ecx, 1 movsxd rcx, ecx movzx eax, byte ptr [rax+rcx] movsxd rcx, eax lea rax, DecodeDataBase64_base64decodeTable mov al, [rax+rcx] mov [rbp+var_26], al mov rax, [rbp+var_8] mov ecx, [rbp+var_24] shl ecx, 2 add ecx, 2 movsxd rcx, ecx movzx eax, byte ptr [rax+rcx] movsxd rcx, eax lea rax, DecodeDataBase64_base64decodeTable mov al, [rax+rcx] mov [rbp+var_27], al mov rax, [rbp+var_8] mov ecx, [rbp+var_24] shl ecx, 2 add ecx, 3 movsxd rcx, ecx movzx eax, byte ptr [rax+rcx] movsxd rcx, eax lea rax, DecodeDataBase64_base64decodeTable mov al, [rax+rcx] mov [rbp+var_28], al movzx eax, [rbp+var_25] shl eax, 2 movzx ecx, [rbp+var_26] sar ecx, 4 or eax, ecx mov dl, al mov rax, [rbp+var_20] imul ecx, [rbp+var_24], 3 movsxd rcx, ecx mov [rax+rcx], dl movzx eax, [rbp+var_26] shl eax, 4 movzx ecx, [rbp+var_27] sar ecx, 2 or eax, ecx mov dl, al mov rax, [rbp+var_20] imul ecx, [rbp+var_24], 3 add ecx, 1 movsxd rcx, ecx mov [rax+rcx], dl movzx eax, [rbp+var_27] shl eax, 6 movzx ecx, [rbp+var_28] or eax, ecx mov dl, al mov rax, [rbp+var_20] imul ecx, [rbp+var_24], 3 add ecx, 2 movsxd rcx, ecx mov [rax+rcx], dl mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax jmp loc_D2A06 loc_D2B22: mov eax, [rbp+var_14] mov ecx, 3 cdq idiv ecx cmp edx, 1 jnz short loc_D2BAC mov eax, [rbp+var_14] mov ecx, 3 cdq idiv ecx mov [rbp+var_2C], eax mov rax, [rbp+var_8] mov ecx, [rbp+var_2C] shl ecx, 2 movsxd rcx, ecx movzx eax, byte ptr [rax+rcx] movsxd rcx, eax lea rax, DecodeDataBase64_base64decodeTable mov al, [rax+rcx] mov [rbp+var_2D], al mov rax, [rbp+var_8] mov ecx, [rbp+var_2C] shl ecx, 2 add ecx, 1 movsxd rcx, ecx movzx eax, byte ptr [rax+rcx] movsxd rcx, eax lea rax, DecodeDataBase64_base64decodeTable mov al, [rax+rcx] mov [rbp+var_2E], al movzx eax, [rbp+var_2D] shl eax, 2 movzx ecx, [rbp+var_2E] sar ecx, 4 or eax, ecx mov dl, al mov rax, [rbp+var_20] mov ecx, [rbp+var_14] sub ecx, 1 movsxd rcx, ecx mov [rax+rcx], dl jmp loc_D2C7D loc_D2BAC: mov eax, [rbp+var_14] mov ecx, 3 cdq idiv ecx cmp edx, 2 jnz loc_D2C7B mov eax, [rbp+var_14] mov ecx, 3 cdq idiv ecx mov [rbp+var_34], eax mov rax, [rbp+var_8] mov ecx, [rbp+var_34] shl ecx, 2 movsxd rcx, ecx movzx eax, byte ptr [rax+rcx] movsxd rcx, eax lea rax, DecodeDataBase64_base64decodeTable mov al, [rax+rcx] mov [rbp+var_35], al mov rax, [rbp+var_8] mov ecx, [rbp+var_34] shl ecx, 2 add ecx, 1 movsxd rcx, ecx movzx eax, byte ptr [rax+rcx] movsxd rcx, eax lea rax, DecodeDataBase64_base64decodeTable mov al, [rax+rcx] mov [rbp+var_36], al mov rax, [rbp+var_8] mov ecx, [rbp+var_34] shl ecx, 2 add ecx, 2 movsxd rcx, ecx movzx eax, byte ptr [rax+rcx] movsxd rcx, eax lea rax, DecodeDataBase64_base64decodeTable mov al, [rax+rcx] mov [rbp+var_37], al movzx eax, [rbp+var_35] shl eax, 2 movzx ecx, [rbp+var_36] sar ecx, 4 or eax, ecx mov dl, al mov rax, [rbp+var_20] mov ecx, [rbp+var_14] sub ecx, 2 movsxd rcx, ecx mov [rax+rcx], dl movzx eax, [rbp+var_36] shl eax, 4 movzx ecx, [rbp+var_37] sar ecx, 2 or eax, ecx mov dl, al mov rax, [rbp+var_20] mov ecx, [rbp+var_14] sub ecx, 1 movsxd rcx, ecx mov [rax+rcx], dl loc_D2C7B: jmp short $+2 loc_D2C7D: mov ecx, [rbp+var_14] mov rax, [rbp+var_10] mov [rax], ecx mov rax, [rbp+var_20] add rsp, 40h pop rbp retn
long long DecodeDataBase64(long long a1, _DWORD *a2) { unsigned __int8 v3; // [rsp+9h] [rbp-37h] unsigned __int8 v4; // [rsp+Ah] [rbp-36h] unsigned __int8 v5; // [rsp+18h] [rbp-28h] unsigned __int8 v6; // [rsp+19h] [rbp-27h] unsigned __int8 v7; // [rsp+1Ah] [rbp-26h] int j; // [rsp+1Ch] [rbp-24h] long long v9; // [rsp+20h] [rbp-20h] int i; // [rsp+28h] [rbp-18h] int v11; // [rsp+2Ch] [rbp-14h] v11 = 0; for ( i = 0; *(_BYTE *)(a1 + 4 * i); ++i ) { if ( *(_BYTE *)(a1 + 4 * i + 3) == 61 ) { if ( *(_BYTE *)(a1 + 4 * i + 2) == 61 ) ++v11; else v11 += 2; } else { v11 += 3; } } v9 = malloc(v11); for ( j = 0; j < v11 / 3; ++j ) { v7 = DecodeDataBase64_base64decodeTable[*(unsigned __int8 *)(a1 + 4 * j + 1)]; v6 = DecodeDataBase64_base64decodeTable[*(unsigned __int8 *)(a1 + 4 * j + 2)]; v5 = DecodeDataBase64_base64decodeTable[*(unsigned __int8 *)(a1 + 4 * j + 3)]; *(_BYTE *)(v9 + 3 * j) = ((int)v7 >> 4) | (4 * DecodeDataBase64_base64decodeTable[*(unsigned __int8 *)(a1 + 4 * j)]); *(_BYTE *)(v9 + 3 * j + 1) = ((int)v6 >> 2) | (16 * v7); *(_BYTE *)(v9 + 3 * j + 2) = v5 | (v6 << 6); } if ( v11 % 3 == 1 ) { *(_BYTE *)(v9 + v11 - 1) = ((int)DecodeDataBase64_base64decodeTable[*(unsigned __int8 *)(a1 + 4 * (v11 / 3) + 1)] >> 4) | (4 * DecodeDataBase64_base64decodeTable[*(unsigned __int8 *)(a1 + 4 * (v11 / 3))]); } else if ( v11 % 3 == 2 ) { v4 = DecodeDataBase64_base64decodeTable[*(unsigned __int8 *)(a1 + 4 * (v11 / 3) + 1)]; v3 = DecodeDataBase64_base64decodeTable[*(unsigned __int8 *)(a1 + 4 * (v11 / 3) + 2)]; *(_BYTE *)(v9 + v11 - 2) = ((int)v4 >> 4) | (4 * DecodeDataBase64_base64decodeTable[*(unsigned __int8 *)(a1 + 4 * (v11 / 3))]); *(_BYTE *)(v9 + v11 - 1) = ((int)v3 >> 2) | (16 * v4); } *a2 = v11; return v9; }
DecodeDataBase64: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],0x0 MOV dword ptr [RBP + -0x18],0x0 LAB_001d297e: MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0x18] SHL ECX,0x2 MOVSXD RCX,ECX MOVZX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x0 JZ 0x001d29f2 MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0x18] SHL ECX,0x2 ADD ECX,0x3 MOVSXD RCX,ECX MOVZX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x3d JNZ 0x001d29dc MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0x18] SHL ECX,0x2 ADD ECX,0x2 MOVSXD RCX,ECX MOVZX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x3d JNZ 0x001d29d1 MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x1 MOV dword ptr [RBP + -0x14],EAX JMP 0x001d29da LAB_001d29d1: MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x2 MOV dword ptr [RBP + -0x14],EAX LAB_001d29da: JMP 0x001d29e5 LAB_001d29dc: MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x3 MOV dword ptr [RBP + -0x14],EAX LAB_001d29e5: JMP 0x001d29e7 LAB_001d29e7: MOV EAX,dword ptr [RBP + -0x18] ADD EAX,0x1 MOV dword ptr [RBP + -0x18],EAX JMP 0x001d297e LAB_001d29f2: MOVSXD RDI,dword ptr [RBP + -0x14] CALL 0x0010a6e0 MOV qword ptr [RBP + -0x20],RAX MOV dword ptr [RBP + -0x24],0x0 LAB_001d2a06: MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x3c],EAX MOV EAX,dword ptr [RBP + -0x14] MOV ECX,0x3 CDQ IDIV ECX MOV ECX,EAX MOV EAX,dword ptr [RBP + -0x3c] CMP EAX,ECX JGE 0x001d2b22 MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0x24] SHL ECX,0x2 MOVSXD RCX,ECX MOVZX EAX,byte ptr [RAX + RCX*0x1] MOVSXD RCX,EAX LEA RAX,[0x2b3b70] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x25],AL MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0x24] SHL ECX,0x2 ADD ECX,0x1 MOVSXD RCX,ECX MOVZX EAX,byte ptr [RAX + RCX*0x1] MOVSXD RCX,EAX LEA RAX,[0x2b3b70] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x26],AL MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0x24] SHL ECX,0x2 ADD ECX,0x2 MOVSXD RCX,ECX MOVZX EAX,byte ptr [RAX + RCX*0x1] MOVSXD RCX,EAX LEA RAX,[0x2b3b70] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x27],AL MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0x24] SHL ECX,0x2 ADD ECX,0x3 MOVSXD RCX,ECX MOVZX EAX,byte ptr [RAX + RCX*0x1] MOVSXD RCX,EAX LEA RAX,[0x2b3b70] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x28],AL MOVZX EAX,byte ptr [RBP + -0x25] SHL EAX,0x2 MOVZX ECX,byte ptr [RBP + -0x26] SAR ECX,0x4 OR EAX,ECX MOV DL,AL MOV RAX,qword ptr [RBP + -0x20] IMUL ECX,dword ptr [RBP + -0x24],0x3 MOVSXD RCX,ECX MOV byte ptr [RAX + RCX*0x1],DL MOVZX EAX,byte ptr [RBP + -0x26] SHL EAX,0x4 MOVZX ECX,byte ptr [RBP + -0x27] SAR ECX,0x2 OR EAX,ECX MOV DL,AL MOV RAX,qword ptr [RBP + -0x20] IMUL ECX,dword ptr [RBP + -0x24],0x3 ADD ECX,0x1 MOVSXD RCX,ECX MOV byte ptr [RAX + RCX*0x1],DL MOVZX EAX,byte ptr [RBP + -0x27] SHL EAX,0x6 MOVZX ECX,byte ptr [RBP + -0x28] OR EAX,ECX MOV DL,AL MOV RAX,qword ptr [RBP + -0x20] IMUL ECX,dword ptr [RBP + -0x24],0x3 ADD ECX,0x2 MOVSXD RCX,ECX MOV byte ptr [RAX + RCX*0x1],DL MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOV dword ptr [RBP + -0x24],EAX JMP 0x001d2a06 LAB_001d2b22: MOV EAX,dword ptr [RBP + -0x14] MOV ECX,0x3 CDQ IDIV ECX CMP EDX,0x1 JNZ 0x001d2bac MOV EAX,dword ptr [RBP + -0x14] MOV ECX,0x3 CDQ IDIV ECX MOV dword ptr [RBP + -0x2c],EAX MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0x2c] SHL ECX,0x2 MOVSXD RCX,ECX MOVZX EAX,byte ptr [RAX + RCX*0x1] MOVSXD RCX,EAX LEA RAX,[0x2b3b70] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x2d],AL MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0x2c] SHL ECX,0x2 ADD ECX,0x1 MOVSXD RCX,ECX MOVZX EAX,byte ptr [RAX + RCX*0x1] MOVSXD RCX,EAX LEA RAX,[0x2b3b70] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x2e],AL MOVZX EAX,byte ptr [RBP + -0x2d] SHL EAX,0x2 MOVZX ECX,byte ptr [RBP + -0x2e] SAR ECX,0x4 OR EAX,ECX MOV DL,AL MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x14] SUB ECX,0x1 MOVSXD RCX,ECX MOV byte ptr [RAX + RCX*0x1],DL JMP 0x001d2c7d LAB_001d2bac: MOV EAX,dword ptr [RBP + -0x14] MOV ECX,0x3 CDQ IDIV ECX CMP EDX,0x2 JNZ 0x001d2c7b MOV EAX,dword ptr [RBP + -0x14] MOV ECX,0x3 CDQ IDIV ECX MOV dword ptr [RBP + -0x34],EAX MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0x34] SHL ECX,0x2 MOVSXD RCX,ECX MOVZX EAX,byte ptr [RAX + RCX*0x1] MOVSXD RCX,EAX LEA RAX,[0x2b3b70] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x35],AL MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0x34] SHL ECX,0x2 ADD ECX,0x1 MOVSXD RCX,ECX MOVZX EAX,byte ptr [RAX + RCX*0x1] MOVSXD RCX,EAX LEA RAX,[0x2b3b70] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x36],AL MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0x34] SHL ECX,0x2 ADD ECX,0x2 MOVSXD RCX,ECX MOVZX EAX,byte ptr [RAX + RCX*0x1] MOVSXD RCX,EAX LEA RAX,[0x2b3b70] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x37],AL MOVZX EAX,byte ptr [RBP + -0x35] SHL EAX,0x2 MOVZX ECX,byte ptr [RBP + -0x36] SAR ECX,0x4 OR EAX,ECX MOV DL,AL MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x14] SUB ECX,0x2 MOVSXD RCX,ECX MOV byte ptr [RAX + RCX*0x1],DL MOVZX EAX,byte ptr [RBP + -0x36] SHL EAX,0x4 MOVZX ECX,byte ptr [RBP + -0x37] SAR ECX,0x2 OR EAX,ECX MOV DL,AL MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x14] SUB ECX,0x1 MOVSXD RCX,ECX MOV byte ptr [RAX + RCX*0x1],DL LAB_001d2c7b: JMP 0x001d2c7d LAB_001d2c7d: MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x20] ADD RSP,0x40 POP RBP RET
void * DecodeDataBase64(long param_1,int *param_2) { byte bVar1; byte bVar2; byte bVar3; int iVar4; void *pvVar5; int local_2c; int local_20; int local_1c; local_1c = 0; local_20 = 0; while (*(char *)(param_1 + (local_20 << 2)) != '\0') { if (*(char *)(param_1 + (local_20 * 4 + 3)) == '=') { if (*(char *)(param_1 + (local_20 * 4 + 2)) == '=') { local_1c = local_1c + 1; } else { local_1c = local_1c + 2; } } else { local_1c = local_1c + 3; } local_20 = local_20 + 1; } pvVar5 = malloc((long)local_1c); for (local_2c = 0; local_2c < local_1c / 3; local_2c = local_2c + 1) { bVar1 = DecodeDataBase64_base64decodeTable[(int)(uint)*(byte *)(param_1 + (local_2c * 4 + 1))]; bVar2 = DecodeDataBase64_base64decodeTable[(int)(uint)*(byte *)(param_1 + (local_2c * 4 + 2))]; bVar3 = DecodeDataBase64_base64decodeTable[(int)(uint)*(byte *)(param_1 + (local_2c * 4 + 3))]; *(byte *)((long)pvVar5 + (long)(local_2c * 3)) = DecodeDataBase64_base64decodeTable[(int)(uint)*(byte *)(param_1 + (local_2c << 2))] << 2 | (byte)((int)(uint)bVar1 >> 4); *(byte *)((long)pvVar5 + (long)(local_2c * 3 + 1)) = bVar1 << 4 | (byte)((int)(uint)bVar2 >> 2); *(byte *)((long)pvVar5 + (long)(local_2c * 3 + 2)) = bVar2 << 6 | bVar3; } if (local_1c % 3 == 1) { *(byte *)((long)pvVar5 + (long)(local_1c + -1)) = DecodeDataBase64_base64decodeTable[(int)(uint)*(byte *)(param_1 + (local_1c / 3 << 2))] << 2 | (byte)((int)(uint)(byte)DecodeDataBase64_base64decodeTable [(int)(uint)*(byte *)(param_1 + ((local_1c / 3) * 4 + 1))] >> 4 ); } else if (local_1c % 3 == 2) { iVar4 = local_1c / 3; bVar1 = DecodeDataBase64_base64decodeTable[(int)(uint)*(byte *)(param_1 + (iVar4 * 4 + 1))]; bVar2 = DecodeDataBase64_base64decodeTable[(int)(uint)*(byte *)(param_1 + (iVar4 * 4 + 2))]; *(byte *)((long)pvVar5 + (long)(local_1c + -2)) = DecodeDataBase64_base64decodeTable[(int)(uint)*(byte *)(param_1 + (iVar4 << 2))] << 2 | (byte)((int)(uint)bVar1 >> 4); *(byte *)((long)pvVar5 + (long)(local_1c + -1)) = bVar1 << 4 | (byte)((int)(uint)bVar2 >> 2); } *param_2 = local_1c; return pvVar5; }
23,414
PFS_buffer_scalable_container<PFS_host, 128, 128, PFS_host_array, PFS_host_allocator>::sanitize(PFS_host*)
eloqsql/storage/perfschema/pfs_buffer_container.h
value_type *sanitize(value_type *unsafe) { intptr offset; uint i; array_type *page; value_type *pfs; value_type *pfs_last; for (i=0 ; i < PFS_PAGE_COUNT; i++) { page= m_pages[i]; if (page != NULL) { pfs= page->get_first(); pfs_last= page->get_last(); if ((pfs <= unsafe) && (unsafe < pfs_last)) { offset= ((intptr) unsafe - (intptr) pfs) % sizeof(value_type); if (offset == 0) return unsafe; } } } return NULL; }
O0
c
PFS_buffer_scalable_container<PFS_host, 128, 128, PFS_host_array, PFS_host_allocator>::sanitize(PFS_host*): pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x48(%rbp) movl $0x0, -0x24(%rbp) cmpl $0x400, -0x24(%rbp) # imm = 0x400 jae 0x4c00c movq -0x48(%rbp), %rax movl -0x24(%rbp), %ecx movq 0xa8(%rax,%rcx,8), %rax movq %rax, -0x30(%rbp) cmpq $0x0, -0x30(%rbp) je 0x4bffc movq -0x30(%rbp), %rdi callq 0x4c020 movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rdi callq 0x4c040 movq %rax, -0x40(%rbp) movq -0x38(%rbp), %rax cmpq -0x18(%rbp), %rax ja 0x4bffa movq -0x18(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0x4bffa movq -0x18(%rbp), %rax movq -0x38(%rbp), %rcx subq %rcx, %rax andq $0x7f, %rax movq %rax, -0x20(%rbp) cmpq $0x0, -0x20(%rbp) jne 0x4bff8 movq -0x18(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x4c014 jmp 0x4bffa jmp 0x4bffc jmp 0x4bffe movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) jmp 0x4bf7f movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x50, %rsp popq %rbp retq nop
_ZN29PFS_buffer_scalable_containerI9PFS_mutexLi1024ELi1024E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE8sanitizeEPS0_: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] mov [rbp+var_48], rax mov [rbp+var_24], 0 loc_4BF7F: cmp [rbp+var_24], 400h jnb loc_4C00C mov rax, [rbp+var_48] mov ecx, [rbp+var_24] mov rax, [rax+rcx*8+0A8h] mov [rbp+var_30], rax cmp [rbp+var_30], 0 jz short loc_4BFFC mov rdi, [rbp+var_30] call _ZN24PFS_buffer_default_arrayI9PFS_mutexE9get_firstEv; PFS_buffer_default_array<PFS_mutex>::get_first(void) mov [rbp+var_38], rax mov rdi, [rbp+var_30] call _ZN24PFS_buffer_default_arrayI9PFS_mutexE8get_lastEv; PFS_buffer_default_array<PFS_mutex>::get_last(void) mov [rbp+var_40], rax mov rax, [rbp+var_38] cmp rax, [rbp+var_18] ja short loc_4BFFA mov rax, [rbp+var_18] cmp rax, [rbp+var_40] jnb short loc_4BFFA mov rax, [rbp+var_18] mov rcx, [rbp+var_38] sub rax, rcx and rax, 7Fh mov [rbp+var_20], rax cmp [rbp+var_20], 0 jnz short loc_4BFF8 mov rax, [rbp+var_18] mov [rbp+var_8], rax jmp short loc_4C014 loc_4BFF8: jmp short $+2 loc_4BFFA: jmp short $+2 loc_4BFFC: jmp short $+2 loc_4BFFE: mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax jmp loc_4BF7F loc_4C00C: mov [rbp+var_8], 0 loc_4C014: mov rax, [rbp+var_8] add rsp, 50h pop rbp retn
unsigned long long PFS_buffer_scalable_container<PFS_mutex,1024,1024,PFS_buffer_default_array<PFS_mutex>,PFS_buffer_default_allocator<PFS_mutex>>::sanitize( long long a1, unsigned long long a2) { unsigned long long last; // [rsp+10h] [rbp-40h] unsigned long long first; // [rsp+18h] [rbp-38h] long long v5; // [rsp+20h] [rbp-30h] unsigned int i; // [rsp+2Ch] [rbp-24h] for ( i = 0; i < 0x400; ++i ) { v5 = *(_QWORD *)(a1 + 8LL * i + 168); if ( v5 ) { first = PFS_buffer_default_array<PFS_mutex>::get_first(v5); last = PFS_buffer_default_array<PFS_mutex>::get_last(v5); if ( first <= a2 && a2 < last && (((_BYTE)a2 - (_BYTE)first) & 0x7F) == 0 ) return a2; } } return 0LL; }
sanitize: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x48],RAX MOV dword ptr [RBP + -0x24],0x0 LAB_0014bf7f: CMP dword ptr [RBP + -0x24],0x400 JNC 0x0014c00c MOV RAX,qword ptr [RBP + -0x48] MOV ECX,dword ptr [RBP + -0x24] MOV RAX,qword ptr [RAX + RCX*0x8 + 0xa8] MOV qword ptr [RBP + -0x30],RAX CMP qword ptr [RBP + -0x30],0x0 JZ 0x0014bffc MOV RDI,qword ptr [RBP + -0x30] CALL 0x0014c020 MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x30] CALL 0x0014c040 MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x18] JA 0x0014bffa MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x40] JNC 0x0014bffa MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x38] SUB RAX,RCX AND RAX,0x7f MOV qword ptr [RBP + -0x20],RAX CMP qword ptr [RBP + -0x20],0x0 JNZ 0x0014bff8 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x8],RAX JMP 0x0014c014 LAB_0014bff8: JMP 0x0014bffa LAB_0014bffa: JMP 0x0014bffc LAB_0014bffc: JMP 0x0014bffe LAB_0014bffe: MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOV dword ptr [RBP + -0x24],EAX JMP 0x0014bf7f LAB_0014c00c: MOV qword ptr [RBP + -0x8],0x0 LAB_0014c014: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x50 POP RBP RET
/* PFS_buffer_scalable_container<PFS_mutex, 1024, 1024, PFS_buffer_default_array<PFS_mutex>, PFS_buffer_default_allocator<PFS_mutex> >::sanitize(PFS_mutex*) */ PFS_mutex * __thiscall PFS_buffer_scalable_container<PFS_mutex,1024,1024,PFS_buffer_default_array<PFS_mutex>,PFS_buffer_default_allocator<PFS_mutex>> ::sanitize(PFS_buffer_scalable_container<PFS_mutex,1024,1024,PFS_buffer_default_array<PFS_mutex>,PFS_buffer_default_allocator<PFS_mutex>> *this,PFS_mutex *param_1) { PFS_buffer_default_array<PFS_mutex> *this_00; PFS_mutex *pPVar1; PFS_mutex *pPVar2; uint local_2c; local_2c = 0; do { if (0x3ff < local_2c) { return (PFS_mutex *)0x0; } this_00 = *(PFS_buffer_default_array<PFS_mutex> **)(this + (ulong)local_2c * 8 + 0xa8); if (this_00 != (PFS_buffer_default_array<PFS_mutex> *)0x0) { pPVar1 = (PFS_mutex *)PFS_buffer_default_array<PFS_mutex>::get_first(this_00); pPVar2 = (PFS_mutex *)PFS_buffer_default_array<PFS_mutex>::get_last(this_00); if (((pPVar1 <= param_1) && (param_1 < pPVar2)) && (((long)param_1 - (long)pPVar1 & 0x7fU) == 0)) { return param_1; } } local_2c = local_2c + 1; } while( true ); }
23,415
TensorStorage::TensorStorage()
7CodeWizard[P]stablediffusion/model.h
TensorStorage() = default;
O0
c
TensorStorage::TensorStorage(): subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq 0x10(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0xba90 movq 0x8(%rsp), %rax movl $0x0, 0x20(%rax) movb $0x0, 0x24(%rax) movq 0xbde29(%rip), %rcx # 0x1822b8 movq %rcx, 0x28(%rax) movq 0xbde26(%rip), %rcx # 0x1822c0 movq %rcx, 0x30(%rax) movq 0xbde23(%rip), %rcx # 0x1822c8 movq %rcx, 0x38(%rax) movq 0xbde20(%rip), %rcx # 0x1822d0 movq %rcx, 0x40(%rax) movl $0x0, 0x48(%rax) movq $0x0, 0x50(%rax) movl $0xffffffff, 0x58(%rax) # imm = 0xFFFFFFFF movq $0x0, 0x60(%rax) addq $0x18, %rsp retq nopw (%rax,%rax)
_ZN13TensorStorageC2Ev: sub rsp, 18h mov [rsp+18h+var_8], rdi mov rdi, [rsp+18h+var_8] mov [rsp+18h+var_10], rdi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void) mov rax, [rsp+18h+var_10] mov dword ptr [rax+20h], 0 mov byte ptr [rax+24h], 0 mov rcx, cs:qword_1822B8 mov [rax+28h], rcx mov rcx, cs:qword_1822C0 mov [rax+30h], rcx mov rcx, cs:qword_1822C8 mov [rax+38h], rcx mov rcx, cs:qword_1822D0 mov [rax+40h], rcx mov dword ptr [rax+48h], 0 mov qword ptr [rax+50h], 0 mov dword ptr [rax+58h], 0FFFFFFFFh mov qword ptr [rax+60h], 0 add rsp, 18h retn
void TensorStorage::TensorStorage(TensorStorage *this) { std::string::basic_string(this); *((_DWORD *)this + 8) = 0; *((_BYTE *)this + 36) = 0; *((_QWORD *)this + 5) = 1LL; *((_QWORD *)this + 6) = 1LL; *((_QWORD *)this + 7) = 1LL; *((_QWORD *)this + 8) = 1LL; *((_DWORD *)this + 18) = 0; *((_QWORD *)this + 10) = 0LL; *((_DWORD *)this + 22) = -1; *((_QWORD *)this + 12) = 0LL; }
TensorStorage: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV RDI,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x8],RDI CALL 0x0010ba90 MOV RAX,qword ptr [RSP + 0x8] MOV dword ptr [RAX + 0x20],0x0 MOV byte ptr [RAX + 0x24],0x0 MOV RCX,qword ptr [0x002822b8] MOV qword ptr [RAX + 0x28],RCX MOV RCX,qword ptr [0x002822c0] MOV qword ptr [RAX + 0x30],RCX MOV RCX,qword ptr [0x002822c8] MOV qword ptr [RAX + 0x38],RCX MOV RCX,qword ptr [0x002822d0] MOV qword ptr [RAX + 0x40],RCX MOV dword ptr [RAX + 0x48],0x0 MOV qword ptr [RAX + 0x50],0x0 MOV dword ptr [RAX + 0x58],0xffffffff MOV qword ptr [RAX + 0x60],0x0 ADD RSP,0x18 RET
/* TensorStorage::TensorStorage() */ void __thiscall TensorStorage::TensorStorage(TensorStorage *this) { std::__cxx11::string::string((string *)this); *(int4 *)(this + 0x20) = 0; this[0x24] = (TensorStorage)0x0; *(int8 *)(this + 0x28) = DAT_002822b8; *(int8 *)(this + 0x30) = DAT_002822c0; *(int8 *)(this + 0x38) = DAT_002822c8; *(int8 *)(this + 0x40) = DAT_002822d0; *(int4 *)(this + 0x48) = 0; *(int8 *)(this + 0x50) = 0; *(int4 *)(this + 0x58) = 0xffffffff; *(int8 *)(this + 0x60) = 0; return; }
23,416
my_dirend
eloqsql/mysys/my_lib.c
void my_dirend(MY_DIR *dir) { MY_DIR_HANDLE *dirh= (MY_DIR_HANDLE*) dir; DBUG_ENTER("my_dirend"); if (dirh) { delete_dynamic(&dirh->array); free_root(&dirh->root, MYF(0)); my_free(dirh); } DBUG_VOID_RETURN; }
O3
c
my_dirend: testq %rdi, %rdi je 0x60974 pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx addq $0x10, %rdi callq 0x58c5c leaq 0x38(%rbx), %rdi xorl %esi, %esi callq 0x5d37b movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %rbp jmp 0x60f52 retq
my_dirend: test rdi, rdi jz short locret_60974 push rbp mov rbp, rsp push rbx push rax mov rbx, rdi add rdi, 10h call delete_dynamic lea rdi, [rbx+38h] xor esi, esi call free_root mov rdi, rbx add rsp, 8 pop rbx pop rbp jmp my_free locret_60974: retn
long long my_dirend(long long a1) { long long result; // rax if ( a1 ) { delete_dynamic((long long *)(a1 + 16)); free_root((_QWORD *)(a1 + 56), 0); return my_free(a1); } return result; }
my_dirend: TEST RDI,RDI JZ 0x00160974 PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI ADD RDI,0x10 CALL 0x00158c5c LEA RDI,[RBX + 0x38] XOR ESI,ESI CALL 0x0015d37b MOV RDI,RBX ADD RSP,0x8 POP RBX POP RBP JMP 0x00160f52 LAB_00160974: RET
void my_dirend(long param_1) { if (param_1 != 0) { delete_dynamic(param_1 + 0x10); free_root(param_1 + 0x38,0); my_free(param_1); return; } return; }
23,417
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [5], 0>(char const (&) [5])
monkey531[P]llama/common/json.hpp
reference at(KeyType && key) { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return set_parent(it->second); }
O2
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [5], 0>(char const (&) [5]): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rdi, %r14 cmpb $0x1, (%rdi) jne 0x7ac11 movq %rsi, %r15 movq 0x8(%r14), %rdi callq 0x7ea54 movq 0x8(%r14), %rcx cmpq 0x8(%rcx), %rax je 0x7ac6f addq $0x20, %rax addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq pushq $0x20 popq %rdi callq 0x23460 movq %rax, %rbx movq %r14, %rdi callq 0x43be8 leaq 0x28(%rsp), %rdx movq %rax, (%rdx) leaq 0x3aa5f(%rip), %rsi # 0xb5692 leaq 0x8(%rsp), %rdi callq 0x7e4b5 movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0x130, %esi # imm = 0x130 movq %r14, %rcx callq 0x43a9c xorl %ebp, %ebp leaq 0x812ea(%rip), %rsi # 0xfbf48 leaq -0x3a4ed(%rip), %rdx # 0x40778 movq %rbx, %rdi callq 0x23f30 jmp 0x7acd9 pushq $0x20 popq %rdi callq 0x23460 movq %rax, %rbx leaq 0x28(%rsp), %rdi leaq 0x7(%rsp), %rdx movq %r15, %rsi callq 0x26cb4 leaq 0x3aa2f(%rip), %rsi # 0xb56c2 leaq 0x3aa2e(%rip), %rcx # 0xb56c8 leaq 0x8(%rsp), %rdi leaq 0x28(%rsp), %rdx callq 0x7eabf movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0x193, %esi # imm = 0x193 movq %r14, %rcx callq 0x42348 xorl %ebp, %ebp leaq 0x811fe(%rip), %rsi # 0xfbec8 leaq -0x3a559(%rip), %rdx # 0x40778 movq %rbx, %rdi callq 0x23f30 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x24208 jmp 0x7acee movq %rax, %r14 movb $0x1, %bpl leaq 0x28(%rsp), %rdi jmp 0x7acff jmp 0x7ad0b movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x24208 testb %bpl, %bpl jne 0x7ad0e jmp 0x7ad16 movq %rax, %r14 movq %rbx, %rdi callq 0x236a0 movq %r14, %rdi callq 0x23fc0
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_: push rbp; char push r15; int push r14; int push rbx; int sub rsp, 48h mov r14, rdi cmp byte ptr [rdi], 1 jnz short loc_7AC11 mov r15, rsi mov rdi, [r14+8] call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA5_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_ mov rcx, [r14+8] cmp rax, [rcx+8] jz short loc_7AC6F add rax, 20h ; ' ' add rsp, 48h pop rbx pop r14 pop r15 pop rbp retn loc_7AC11: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+68h+var_40] mov [rdx], rax lea rsi, aCannotUseAtWit; "cannot use at() with " lea rdi, [rsp+68h+var_60] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) mov bpl, 1 lea rdx, [rsp+68h+var_60] mov rdi, rbx; this mov esi, 130h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_7ACD9 loc_7AC6F: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+68h+var_40] lea rdx, [rsp+68h+var_61] mov rsi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rsi, aKey; "key '" lea rcx, aNotFound; "' not found" lea rdi, [rsp+68h+var_60] lea rdx, [rsp+68h+var_40] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) mov bpl, 1 lea rdx, [rsp+68h+var_60] mov rdi, rbx; this mov esi, 193h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_7ACD9: mov r14, rax lea rdi, [rsp+68h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_7ACEE mov r14, rax mov bpl, 1 loc_7ACEE: lea rdi, [rsp+68h+var_40] jmp short loc_7ACFF jmp short loc_7AD0B mov r14, rax lea rdi, [rsp+68h+var_60]; void * loc_7ACFF: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_7AD0E jmp short loc_7AD16 loc_7AD0B: mov r14, rax loc_7AD0E: mov rdi, rbx; void * call ___cxa_free_exception loc_7AD16: mov rdi, r14 call __Unwind_Resume
long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_( long long a1, long long a2) { long long v2; // rax nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx nlohmann::json_abi_v3_11_3::detail::out_of_range *v5; // rbx _BYTE v6[32]; // [rsp+8h] [rbp-60h] BYREF _QWORD v7[8]; // [rsp+28h] [rbp-40h] BYREF if ( *(_BYTE *)a1 != 1 ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); v7[0] = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(v6, "cannot use at() with "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 304, (long long)v6); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } v2 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA5_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_(*(_QWORD *)(a1 + 8)); if ( v2 == *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) ) { v5 = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL); std::string::basic_string<std::allocator<char>>(v7, a2); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>( v6, "key '", v7, "' not found"); ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( v5, 403, (long long)v6, a1); __cxa_throw( v5, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return v2 + 32; }
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV R14,RDI CMP byte ptr [RDI],0x1 JNZ 0x0017ac11 MOV R15,RSI MOV RDI,qword ptr [R14 + 0x8] CALL 0x0017ea54 MOV RCX,qword ptr [R14 + 0x8] CMP RAX,qword ptr [RCX + 0x8] JZ 0x0017ac6f ADD RAX,0x20 ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP RET LAB_0017ac11: PUSH 0x20 POP RDI CALL 0x00123460 MOV RBX,RAX MOV RDI,R14 CALL 0x00143be8 LEA RDX,[RSP + 0x28] MOV qword ptr [RDX],RAX LAB_0017ac2c: LEA RSI,[0x1b5692] LEA RDI,[RSP + 0x8] CALL 0x0017e4b5 MOV BPL,0x1 LAB_0017ac40: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0x130 MOV RCX,R14 CALL 0x00143a9c XOR EBP,EBP LEA RSI,[0x1fbf48] LEA RDX,[0x140778] MOV RDI,RBX CALL 0x00123f30 LAB_0017ac6f: PUSH 0x20 POP RDI CALL 0x00123460 MOV RBX,RAX LAB_0017ac7a: LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x7] MOV RSI,R15 CALL 0x00126cb4 LAB_0017ac8c: LEA RSI,[0x1b56c2] LEA RCX,[0x1b56c8] LEA RDI,[RSP + 0x8] LEA RDX,[RSP + 0x28] CALL 0x0017eabf MOV BPL,0x1 LAB_0017acac: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0x193 MOV RCX,R14 CALL 0x00142348 XOR EBP,EBP LEA RSI,[0x1fbec8] LEA RDX,[0x140778] MOV RDI,RBX CALL 0x00123f30
long _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_ (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *param_1,char *param_2) { long lVar1; int8 uVar2; allocator local_61; detail local_60 [32]; char *local_40 [4]; if (*param_1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar2 = __cxa_allocate_exception(0x20); local_40[0] = (char *)nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::type_name(param_1); /* try { // try from 0017ac2c to 0017ac3c has its CatchHandler @ 0017ad0b */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*> (local_60,"cannot use at() with ",local_40); /* try { // try from 0017ac40 to 0017ac6c has its CatchHandler @ 0017acf7 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar2,0x130,local_60,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } lVar1 = _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA5_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_ (*(int8 *)(param_1 + 8)); if (lVar1 != *(long *)(*(long *)(param_1 + 8) + 8)) { return lVar1 + 0x20; } uVar2 = __cxa_allocate_exception(0x20); /* try { // try from 0017ac7a to 0017ac8b has its CatchHandler @ 0017acf5 */ std::__cxx11::string::string<std::allocator<char>>((string *)local_40,param_2,&local_61); /* try { // try from 0017ac8c to 0017aca8 has its CatchHandler @ 0017ace8 */ nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]> (local_60,"key \'",(string *)local_40,"\' not found"); /* try { // try from 0017acac to 0017acd8 has its CatchHandler @ 0017acd9 */ _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar2,0x193,local_60,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); }
23,418
mi_enlarge_root
eloqsql/storage/myisam/mi_write.c
int _mi_enlarge_root(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key, my_off_t *root) { uint t_length,nod_flag; MI_KEY_PARAM s_temp; MYISAM_SHARE *share=info->s; DBUG_ENTER("_mi_enlarge_root"); nod_flag= (*root != HA_OFFSET_ERROR) ? share->base.key_reflength : 0; _mi_kpointer(info,info->buff+2,*root); /* if nod */ t_length=(*keyinfo->pack_key)(keyinfo,nod_flag,(uchar*) 0, (uchar*) 0, (uchar*) 0, key,&s_temp); mi_putint(info->buff,t_length+2+nod_flag,nod_flag); (*keyinfo->store_key)(keyinfo,info->buff+2+nod_flag,&s_temp); info->buff_used=info->page_changed=1; /* info->buff is used */ if ((*root= _mi_new(info,keyinfo,DFLT_INIT_HITS)) == HA_OFFSET_ERROR || _mi_write_keypage(info,keyinfo,*root,DFLT_INIT_HITS,info->buff)) DBUG_RETURN(-1); DBUG_RETURN(0); }
O0
c
mi_enlarge_root: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x78(%rbp) movq -0x28(%rbp), %rax cmpq $-0x1, (%rax) je 0xc6642 movq -0x78(%rbp), %rax movl 0x17c(%rax), %eax movl %eax, -0x84(%rbp) jmp 0xc664c xorl %eax, %eax movl %eax, -0x84(%rbp) jmp 0xc664c movl -0x84(%rbp), %eax movl %eax, -0x30(%rbp) movq -0x10(%rbp), %rdi movq -0x10(%rbp), %rax movq 0x100(%rax), %rsi addq $0x2, %rsi movq -0x28(%rbp), %rax movq (%rax), %rdx callq 0xc0600 movq -0x18(%rbp), %rax movq 0x50(%rax), %rax movq -0x18(%rbp), %rdi movl -0x30(%rbp), %esi movq -0x20(%rbp), %r9 xorl %ecx, %ecx movl %ecx, %r8d leaq -0x70(%rbp), %r10 movq %r8, %rdx movq %r8, %rcx movq %r10, (%rsp) callq *%rax movl %eax, -0x2c(%rbp) movl -0x30(%rbp), %edx xorl %eax, %eax movl $0x8000, %ecx # imm = 0x8000 cmpl $0x0, %edx cmovnel %ecx, %eax movl -0x2c(%rbp), %ecx addl $0x2, %ecx addl -0x30(%rbp), %ecx movzwl %cx, %ecx addl %ecx, %eax movw %ax, -0x7a(%rbp) movzwl -0x7a(%rbp), %eax movl %eax, -0x80(%rbp) movl -0x80(%rbp), %eax movb %al, %cl movq -0x10(%rbp), %rax movq 0x100(%rax), %rax movb %cl, 0x1(%rax) movl -0x80(%rbp), %eax shrl $0x8, %eax movb %al, %cl movq -0x10(%rbp), %rax movq 0x100(%rax), %rax movb %cl, (%rax) movq -0x18(%rbp), %rax movq 0x58(%rax), %rax movq -0x18(%rbp), %rdi movq -0x10(%rbp), %rcx movq 0x100(%rcx), %rsi addq $0x2, %rsi movl -0x30(%rbp), %ecx addq %rcx, %rsi leaq -0x70(%rbp), %rdx callq *%rax movq -0x10(%rbp), %rax movb $0x1, 0x33c(%rax) movq -0x10(%rbp), %rax movb $0x1, 0x33d(%rax) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movl $0x3, %edx callq 0xbe4d0 movq -0x28(%rbp), %rcx movq %rax, (%rcx) cmpq $-0x1, %rax je 0xc6775 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x28(%rbp), %rax movq (%rax), %rdx movq -0x10(%rbp), %rax movq 0x100(%rax), %r8 movl $0x3, %ecx callq 0xbe1a0 cmpl $0x0, %eax je 0xc6780 jmp 0xc6777 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xc6789 jmp 0xc6782 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x90, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_mi_enlarge_root: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_78], rax mov rax, [rbp+var_28] cmp qword ptr [rax], 0FFFFFFFFFFFFFFFFh jz short loc_C6642 mov rax, [rbp+var_78] mov eax, [rax+17Ch] mov [rbp+var_84], eax jmp short loc_C664C loc_C6642: xor eax, eax mov [rbp+var_84], eax jmp short $+2 loc_C664C: mov eax, [rbp+var_84] mov [rbp+var_30], eax mov rdi, [rbp+var_10] mov rax, [rbp+var_10] mov rsi, [rax+100h] add rsi, 2 mov rax, [rbp+var_28] mov rdx, [rax] call _mi_kpointer mov rax, [rbp+var_18] mov rax, [rax+50h] mov rdi, [rbp+var_18] mov esi, [rbp+var_30] mov r9, [rbp+var_20] xor ecx, ecx mov r8d, ecx lea r10, [rbp+var_70] mov rdx, r8 mov rcx, r8 mov [rsp+90h+var_90], r10 call rax mov [rbp+var_2C], eax mov edx, [rbp+var_30] xor eax, eax mov ecx, 8000h cmp edx, 0 cmovnz eax, ecx mov ecx, [rbp+var_2C] add ecx, 2 add ecx, [rbp+var_30] movzx ecx, cx add eax, ecx mov [rbp+var_7A], ax movzx eax, [rbp+var_7A] mov [rbp+var_80], eax mov eax, [rbp+var_80] mov cl, al mov rax, [rbp+var_10] mov rax, [rax+100h] mov [rax+1], cl mov eax, [rbp+var_80] shr eax, 8 mov cl, al mov rax, [rbp+var_10] mov rax, [rax+100h] mov [rax], cl mov rax, [rbp+var_18] mov rax, [rax+58h] mov rdi, [rbp+var_18] mov rcx, [rbp+var_10] mov rsi, [rcx+100h] add rsi, 2 mov ecx, [rbp+var_30] add rsi, rcx lea rdx, [rbp+var_70] call rax mov rax, [rbp+var_10] mov byte ptr [rax+33Ch], 1 mov rax, [rbp+var_10] mov byte ptr [rax+33Dh], 1 mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov edx, 3 call _mi_new mov rcx, [rbp+var_28] mov [rcx], rax cmp rax, 0FFFFFFFFFFFFFFFFh jz short loc_C6775 mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rax, [rbp+var_28] mov rdx, [rax] mov rax, [rbp+var_10] mov r8, [rax+100h] mov ecx, 3 call _mi_write_keypage cmp eax, 0 jz short loc_C6780 loc_C6775: jmp short $+2 loc_C6777: mov [rbp+var_4], 0FFFFFFFFh jmp short loc_C6789 loc_C6780: jmp short $+2 loc_C6782: mov [rbp+var_4], 0 loc_C6789: mov eax, [rbp+var_4] add rsp, 90h pop rbp retn
long long mi_enlarge_root(_QWORD *a1, long long a2, long long a3, unsigned long long *a4) { __int16 v4; // ax long long v5; // rax unsigned int v7; // [rsp+Ch] [rbp-84h] __int16 v8; // [rsp+16h] [rbp-7Ah] _BYTE v9[64]; // [rsp+20h] [rbp-70h] BYREF unsigned int v10; // [rsp+60h] [rbp-30h] int v11; // [rsp+64h] [rbp-2Ch] unsigned long long *v12; // [rsp+68h] [rbp-28h] long long v13; // [rsp+70h] [rbp-20h] long long v14; // [rsp+78h] [rbp-18h] _QWORD *v15; // [rsp+80h] [rbp-10h] v15 = a1; v14 = a2; v13 = a3; v12 = a4; if ( *a4 == -1LL ) v7 = 0; else v7 = *(_DWORD *)(*a1 + 380LL); v10 = v7; mi_kpointer((long long)v15, (_BYTE *)(v15[32] + 2LL), *v12); v11 = (*(long long ( **)(long long, _QWORD, _QWORD, _QWORD, _QWORD, long long, _BYTE *))(v14 + 80))( v14, v7, 0LL, 0LL, 0LL, v13, v9); v4 = 0; if ( v10 ) v4 = 0x8000; v8 = v10 + v11 + 2 + v4; *(_BYTE *)(v15[32] + 1LL) = v10 + v11 + 2 + v4; *(_BYTE *)v15[32] = HIBYTE(v8); (*(void ( **)(long long, long long, _BYTE *))(v14 + 88))(v14, v10 + v15[32] + 2LL, v9); *((_BYTE *)v15 + 828) = 1; *((_BYTE *)v15 + 829) = 1; v5 = mi_new(v15, v14, 3); *v12 = v5; if ( v5 == -1 || (unsigned int)mi_write_keypage(v15, v14, *v12, 3, (unsigned __int16 *)v15[32]) ) return (unsigned int)-1; else return 0; }
_mi_enlarge_root: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x28] CMP qword ptr [RAX],-0x1 JZ 0x001c6642 MOV RAX,qword ptr [RBP + -0x78] MOV EAX,dword ptr [RAX + 0x17c] MOV dword ptr [RBP + -0x84],EAX JMP 0x001c664c LAB_001c6642: XOR EAX,EAX MOV dword ptr [RBP + -0x84],EAX JMP 0x001c664c LAB_001c664c: MOV EAX,dword ptr [RBP + -0x84] MOV dword ptr [RBP + -0x30],EAX MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x100] ADD RSI,0x2 MOV RAX,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RAX] CALL 0x001c0600 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x50] MOV RDI,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RBP + -0x30] MOV R9,qword ptr [RBP + -0x20] XOR ECX,ECX MOV R8D,ECX LEA R10,[RBP + -0x70] MOV RDX,R8 MOV RCX,R8 MOV qword ptr [RSP],R10 CALL RAX MOV dword ptr [RBP + -0x2c],EAX MOV EDX,dword ptr [RBP + -0x30] XOR EAX,EAX MOV ECX,0x8000 CMP EDX,0x0 CMOVNZ EAX,ECX MOV ECX,dword ptr [RBP + -0x2c] ADD ECX,0x2 ADD ECX,dword ptr [RBP + -0x30] MOVZX ECX,CX ADD EAX,ECX MOV word ptr [RBP + -0x7a],AX MOVZX EAX,word ptr [RBP + -0x7a] MOV dword ptr [RBP + -0x80],EAX MOV EAX,dword ptr [RBP + -0x80] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x100] MOV byte ptr [RAX + 0x1],CL MOV EAX,dword ptr [RBP + -0x80] SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x100] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x58] MOV RDI,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RCX + 0x100] ADD RSI,0x2 MOV ECX,dword ptr [RBP + -0x30] ADD RSI,RCX LEA RDX,[RBP + -0x70] CALL RAX MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x33c],0x1 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x33d],0x1 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,0x3 CALL 0x001be4d0 MOV RCX,qword ptr [RBP + -0x28] MOV qword ptr [RCX],RAX CMP RAX,-0x1 JZ 0x001c6775 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV R8,qword ptr [RAX + 0x100] MOV ECX,0x3 CALL 0x001be1a0 CMP EAX,0x0 JZ 0x001c6780 LAB_001c6775: JMP 0x001c6777 LAB_001c6777: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001c6789 LAB_001c6780: JMP 0x001c6782 LAB_001c6782: MOV dword ptr [RBP + -0x4],0x0 LAB_001c6789: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x90 POP RBP RET
int4 _mi_enlarge_root(long *param_1,long param_2,int8 param_3,long *param_4) { short sVar1; int iVar2; long lVar3; uint local_8c; int1 local_78 [64]; uint local_38; int4 local_34; long *local_30; int8 local_28; long local_20; long *local_18; if (*param_4 == -1) { local_8c = 0; } else { local_8c = *(uint *)(*param_1 + 0x17c); } local_38 = local_8c; local_30 = param_4; local_28 = param_3; local_20 = param_2; local_18 = param_1; _mi_kpointer(param_1,param_1[0x20] + 2,*param_4); local_34 = (**(code **)(local_20 + 0x50))(local_20,local_38,0,0,0,local_28,local_78); sVar1 = 0; if (local_38 != 0) { sVar1 = -0x8000; } sVar1 = sVar1 + (short)local_34 + 2 + (short)local_38; *(char *)(local_18[0x20] + 1) = (char)sVar1; *(char *)local_18[0x20] = (char)((ushort)sVar1 >> 8); (**(code **)(local_20 + 0x58))(local_20,local_18[0x20] + 2 + (ulong)local_38,local_78); *(int1 *)((long)local_18 + 0x33c) = 1; *(int1 *)((long)local_18 + 0x33d) = 1; lVar3 = _mi_new(local_18,local_20,3); *local_30 = lVar3; if ((lVar3 != -1) && (iVar2 = _mi_write_keypage(local_18,local_20,*local_30,3,local_18[0x20]), iVar2 == 0)) { return 0; } return 0xffffffff; }
23,419
google::protobuf::compiler::csharp::WrapperFieldGenerator::GenerateCodecCode(google::protobuf::io::Printer*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc
void WrapperFieldGenerator::GenerateCodecCode(io::Printer* printer) { if (is_value_type) { printer->Print( variables_, "pb::FieldCodec.ForStructWrapper<$nonnullable_type_name$>($tag$)"); } else { printer->Print( variables_, "pb::FieldCodec.ForClassWrapper<$type_name$>($tag$)"); } }
O0
cpp
google::protobuf::compiler::csharp::WrapperFieldGenerator::GenerateCodecCode(google::protobuf::io::Printer*): subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq %rsi, 0x8(%rsp) movq 0x10(%rsp), %rax movq %rax, (%rsp) testb $0x1, 0x50(%rax) je 0x71018 movq (%rsp), %rsi movq 0x8(%rsp), %rdi addq $0x20, %rsi leaq 0x33e371(%rip), %rdx # 0x3af382 callq 0x3235f0 jmp 0x71031 movq (%rsp), %rsi movq 0x8(%rsp), %rdi addq $0x20, %rsi leaq 0x33e396(%rip), %rdx # 0x3af3c2 callq 0x3235f0 addq $0x18, %rsp retq nopw %cs:(%rax,%rax)
_ZN6google8protobuf8compiler6csharp21WrapperFieldGenerator17GenerateCodecCodeEPNS0_2io7PrinterE: sub rsp, 18h mov [rsp+18h+var_8], rdi mov [rsp+18h+var_10], rsi mov rax, [rsp+18h+var_8] mov [rsp+18h+var_18], rax test byte ptr [rax+50h], 1 jz short loc_71018 mov rsi, [rsp+18h+var_18] mov rdi, [rsp+18h+var_10] add rsi, 20h ; ' ' lea rdx, aPbFieldcodecFo_2; "pb::FieldCodec.ForStructWrapper<$nonnul"... call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) jmp short loc_71031 loc_71018: mov rsi, [rsp+18h+var_18] mov rdi, [rsp+18h+var_10] add rsi, 20h ; ' ' lea rdx, aPbFieldcodecFo_3; "pb::FieldCodec.ForClassWrapper<$type_na"... call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) loc_71031: add rsp, 18h retn
GenerateCodecCode: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV qword ptr [RSP + 0x8],RSI MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP],RAX TEST byte ptr [RAX + 0x50],0x1 JZ 0x00171018 MOV RSI,qword ptr [RSP] MOV RDI,qword ptr [RSP + 0x8] ADD RSI,0x20 LEA RDX,[0x4af382] CALL 0x004235f0 JMP 0x00171031 LAB_00171018: MOV RSI,qword ptr [RSP] MOV RDI,qword ptr [RSP + 0x8] ADD RSI,0x20 LEA RDX,[0x4af3c2] CALL 0x004235f0 LAB_00171031: ADD RSP,0x18 RET
/* google::protobuf::compiler::csharp::WrapperFieldGenerator::GenerateCodecCode(google::protobuf::io::Printer*) */ void __thiscall google::protobuf::compiler::csharp::WrapperFieldGenerator::GenerateCodecCode (WrapperFieldGenerator *this,Printer *param_1) { if (((byte)this[0x50] & 1) == 0) { io::Printer::Print(param_1,(map *)(this + 0x20), "pb::FieldCodec.ForClassWrapper<$type_name$>($tag$)"); } else { io::Printer::Print(param_1,(map *)(this + 0x20), "pb::FieldCodec.ForStructWrapper<$nonnullable_type_name$>($tag$)"); } return; }
23,420
google::protobuf::compiler::csharp::WrapperFieldGenerator::GenerateCodecCode(google::protobuf::io::Printer*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc
void WrapperFieldGenerator::GenerateCodecCode(io::Printer* printer) { if (is_value_type) { printer->Print( variables_, "pb::FieldCodec.ForStructWrapper<$nonnullable_type_name$>($tag$)"); } else { printer->Print( variables_, "pb::FieldCodec.ForClassWrapper<$type_name$>($tag$)"); } }
O3
cpp
google::protobuf::compiler::csharp::WrapperFieldGenerator::GenerateCodecCode(google::protobuf::io::Printer*): movq %rsi, %rax leaq 0x15f067(%rip), %rcx # 0x1a120d leaq 0x15f0a0(%rip), %rdx # 0x1a124d cmpb $0x0, 0x50(%rdi) cmovneq %rcx, %rdx leaq 0x20(%rdi), %rsi movq %rax, %rdi jmp 0x16cd32 nop
_ZN6google8protobuf8compiler6csharp21WrapperFieldGenerator17GenerateCodecCodeEPNS0_2io7PrinterE: mov rax, rsi lea rcx, aPbFieldcodecFo_2; "pb::FieldCodec.ForStructWrapper<$nonnul"... lea rdx, aPbFieldcodecFo_3; "pb::FieldCodec.ForClassWrapper<$type_na"... cmp byte ptr [rdi+50h], 0 cmovnz rdx, rcx lea rsi, [rdi+20h] mov rdi, rax; this jmp _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
long long google::protobuf::compiler::csharp::WrapperFieldGenerator::GenerateCodecCode( google::protobuf::compiler::csharp::WrapperFieldGenerator *this, google::protobuf::io::Printer *a2, long long a3, long long a4, long long a5, long long a6, void *a7, int a8, char a9, int a10, int a11, int a12, int a13, int a14, int a15, void *a16, int a17, char a18) { return google::protobuf::io::Printer::Print(a2, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
GenerateCodecCode: MOV RAX,RSI LEA RCX,[0x2a120d] LEA RDX,[0x2a124d] CMP byte ptr [RDI + 0x50],0x0 CMOVNZ RDX,RCX LEA RSI,[RDI + 0x20] MOV RDI,RAX JMP 0x0026cd32
/* google::protobuf::compiler::csharp::WrapperFieldGenerator::GenerateCodecCode(google::protobuf::io::Printer*) */ void __thiscall google::protobuf::compiler::csharp::WrapperFieldGenerator::GenerateCodecCode (WrapperFieldGenerator *this,Printer *param_1) { char *pcVar1; pcVar1 = "pb::FieldCodec.ForClassWrapper<$type_name$>($tag$)"; if (this[0x50] != (WrapperFieldGenerator)0x0) { pcVar1 = "pb::FieldCodec.ForStructWrapper<$nonnullable_type_name$>($tag$)"; } io::Printer::Print(param_1,(map *)(this + 0x20),pcVar1); return; }
23,421
uf_endspace_selected
eloqsql/storage/myisam/mi_packrec.c
static void uf_endspace_selected(MI_COLUMNDEF *rec, MI_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; } if (to+spaces != end) decode_bytes(rec,bit_buff,to,end-spaces); bfill((uchar*) end-spaces,spaces,' '); } else decode_bytes(rec,bit_buff,to,end); }
O0
c
uf_endspace_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 0xbe9ca 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 0xbe9f2 jmp 0xbeabf movq -0x10(%rbp), %rdi callq 0xbdad0 movq -0x10(%rbp), %rax movl $0x1f, 0x4(%rax) movq -0x10(%rbp), %rax movl (%rax), %eax andl $0x80000000, %eax # imm = 0x80000000 cmpl $0x0, %eax je 0xbeabf movq -0x10(%rbp), %rax movl 0x4(%rax), %eax movq -0x8(%rbp), %rcx cmpl 0x1c(%rcx), %eax jb 0xbea35 movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x8(%rbp), %rcx movl 0x1c(%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 0x1c(%rcx), %ecx movl %ecx, %edx leaq 0x202d93(%rip), %rcx # 0x2c17c0 andl (%rcx,%rdx,4), %eax movl %eax, -0x28(%rbp) jmp 0xbea48 movq -0x10(%rbp), %rdi movq -0x8(%rbp), %rax movl 0x1c(%rax), %esi callq 0xbc280 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 0xbea6a movq -0x10(%rbp), %rax movl $0x1, 0x28(%rax) jmp 0xbead4 movq -0x18(%rbp), %rax movl -0x24(%rbp), %ecx addq %rcx, %rax cmpq -0x20(%rbp), %rax je 0xbea9d movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx movl -0x24(%rbp), %eax movl %eax, %r8d xorl %eax, %eax subq %r8, %rax addq %rax, %rcx callq 0xbe1e0 movq -0x20(%rbp), %rdi movl -0x24(%rbp), %eax movl %eax, %ecx xorl %eax, %eax subq %rcx, %rax addq %rax, %rdi movl -0x24(%rbp), %eax movl %eax, %edx movl $0x20, %esi callq 0x2a2a0 jmp 0xbead4 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx callq 0xbe1e0 addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
uf_endspace_selected_0: 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_BE9CA 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_BE9F2 jmp loc_BEABF loc_BE9CA: mov rdi, [rbp+var_10] call fill_buffer_0 mov rax, [rbp+var_10] mov dword ptr [rax+4], 1Fh mov rax, [rbp+var_10] mov eax, [rax] and eax, 80000000h cmp eax, 0 jz loc_BEABF loc_BE9F2: mov rax, [rbp+var_10] mov eax, [rax+4] mov rcx, [rbp+var_8] cmp eax, [rcx+1Ch] jb short loc_BEA35 mov rax, [rbp+var_10] mov eax, [rax] mov rcx, [rbp+var_8] mov esi, [rcx+1Ch] 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+1Ch] mov edx, ecx lea rcx, mask_0 and eax, [rcx+rdx*4] mov [rbp+var_28], eax jmp short loc_BEA48 loc_BEA35: mov rdi, [rbp+var_10] mov rax, [rbp+var_8] mov esi, [rax+1Ch] call fill_and_get_bits_0 mov [rbp+var_28], eax loc_BEA48: 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_BEA6A mov rax, [rbp+var_10] mov dword ptr [rax+28h], 1 jmp short loc_BEAD4 loc_BEA6A: mov rax, [rbp+var_18] mov ecx, [rbp+var_24] add rax, rcx cmp rax, [rbp+var_20] jz short loc_BEA9D mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] mov eax, [rbp+var_24] mov r8d, eax xor eax, eax sub rax, r8 add rcx, rax call decode_bytes_0 loc_BEA9D: mov rdi, [rbp+var_20] mov eax, [rbp+var_24] mov ecx, eax xor eax, eax sub rax, rcx add rdi, rax mov eax, [rbp+var_24] mov edx, eax mov esi, 20h ; ' ' call _memset jmp short loc_BEAD4 loc_BEABF: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] call decode_bytes_0 loc_BEAD4: add rsp, 30h pop rbp retn
long long uf_endspace_selected_0(long long a1, int *a2, _BYTE *a3, _BYTE *a4) { int v4; // eax int v5; // ecx unsigned int v6; // eax int v7; // ecx long long result; // rax unsigned int bits_0; // [rsp+8h] [rbp-28h] if ( a2[1] ) { v4 = *a2; v5 = a2[1] - 1; a2[1] = v5; if ( ((1 << v5) & v4) == 0 ) return decode_bytes_0(a1, (long long)a2, a3, a4); } else { fill_buffer_0((long long)a2); a2[1] = 31; if ( *a2 >= 0 ) return decode_bytes_0(a1, (long long)a2, a3, a4); } if ( (unsigned int)a2[1] < *(_DWORD *)(a1 + 28) ) { bits_0 = fill_and_get_bits_0(a2, *(_DWORD *)(a1 + 28)); } else { v6 = *a2; v7 = a2[1] - *(_DWORD *)(a1 + 28); a2[1] = v7; bits_0 = mask_0[*(unsigned int *)(a1 + 28)] & (v6 >> v7); } if ( &a3[bits_0] <= a4 ) { if ( &a3[bits_0] != a4 ) decode_bytes_0(a1, (long long)a2, a3, &a4[-bits_0]); return memset(&a4[-bits_0], 32LL, bits_0); } else { result = (long long)a2; a2[10] = 1; } return result; }
uf_endspace_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 0x001be9ca 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 0x001be9f2 JMP 0x001beabf LAB_001be9ca: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001bdad0 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 0x001beabf LAB_001be9f2: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x4] MOV RCX,qword ptr [RBP + -0x8] CMP EAX,dword ptr [RCX + 0x1c] JC 0x001bea35 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RCX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RCX + 0x1c] 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 + 0x1c] MOV EDX,ECX LEA RCX,[0x3c17c0] AND EAX,dword ptr [RCX + RDX*0x4] MOV dword ptr [RBP + -0x28],EAX JMP 0x001bea48 LAB_001bea35: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RAX + 0x1c] CALL 0x001bc280 MOV dword ptr [RBP + -0x28],EAX LAB_001bea48: 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 0x001bea6a MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x28],0x1 JMP 0x001bead4 LAB_001bea6a: MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x24] ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x20] JZ 0x001bea9d MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RBP + -0x24] MOV R8D,EAX XOR EAX,EAX SUB RAX,R8 ADD RCX,RAX CALL 0x001be1e0 LAB_001bea9d: MOV RDI,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RBP + -0x24] MOV ECX,EAX XOR EAX,EAX SUB RAX,RCX ADD RDI,RAX MOV EAX,dword ptr [RBP + -0x24] MOV EDX,EAX MOV ESI,0x20 CALL 0x0012a2a0 JMP 0x001bead4 LAB_001beabf: 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 0x001be1e0 LAB_001bead4: ADD RSP,0x30 POP RBP RET
void uf_endspace_selected(long param_1,uint *param_2,long 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) { decode_bytes(param_1,param_2,param_3,param_4); } else { if (param_2[1] < *(uint *)(param_1 + 0x1c)) { local_30 = fill_and_get_bits(param_2,*(int4 *)(param_1 + 0x1c)); } else { uVar1 = param_2[1] - *(int *)(param_1 + 0x1c); param_2[1] = uVar1; local_30 = *param_2 >> ((byte)uVar1 & 0x1f) & *(uint *)(mask + (ulong)*(uint *)(param_1 + 0x1c) * 4); } if (param_4 < param_3 + (ulong)local_30) { param_2[10] = 1; } else { if (param_3 + (ulong)local_30 != param_4) { decode_bytes(param_1,param_2,param_3,param_4 - local_30); } memset((void *)(param_4 - local_30),0x20,(ulong)local_30); } } return; }
23,422
common_arg::common_arg(std::initializer_list<char const*> const&, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&, int))
llama.cpp/common/arg.h
common_arg( const std::initializer_list<const char *> & args, const char * value_hint, const std::string & help, void (*handler)(common_params & params, int) ) : args(args), value_hint(value_hint), help(help), handler_int(handler) {}
O3
c
common_arg::common_arg(std::initializer_list<char const*> const&, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&, int)): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, %r14 movq %rcx, %r15 movq %rdx, %r12 movq %rsi, %rbp movq %rdi, %rbx leaq 0x4(%rsp), %rsi movl $0x0, (%rsi) leaq 0x3(%rsp), %rcx leaq 0x2(%rsp), %r8 movl $0x1, %edx callq 0xf2bb8 leaq 0x38(%rbx), %rax xorl %ecx, %ecx movq %rcx, 0x40(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x30(%rbx) movq %rax, 0x48(%rbx) movq %rax, 0x50(%rbx) movq %rcx, 0x58(%rbx) leaq 0x60(%rbx), %r13 movq (%rbp), %rsi movq 0x8(%rbp), %rdx leaq 0x1(%rsp), %rcx movq %r13, %rdi callq 0xf2c3a movq %r12, 0x78(%rbx) leaq 0x90(%rbx), %rdi leaq 0xa0(%rbx), %rax xorps %xmm0, %xmm0 movups %xmm0, 0x80(%rbx) movq %rax, 0x90(%rbx) movq (%r15), %rsi movq 0x8(%r15), %rdx addq %rsi, %rdx callq 0x53486 movb $0x0, 0xb0(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0xb8(%rbx) movq $0x0, 0xc8(%rbx) movq %r14, 0xd0(%rbx) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 movq (%r13), %rdi testq %rdi, %rdi je 0xe503e movq 0x70(%rbx), %rsi subq %rdi, %rsi callq 0x251b0 jmp 0xe503e movq %rax, %r14 leaq 0x30(%rbx), %rdi callq 0xf2c80 movq %rbx, %rdi callq 0xf2c80 movq %r14, %rdi callq 0x25ca0 nop
_ZN10common_argC2ERKSt16initializer_listIPKcES2_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPFvR13common_paramsiE: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14, r8 mov r15, rcx mov r12, rdx mov rbp, rsi mov rbx, rdi lea rsi, [rsp+38h+var_34] mov dword ptr [rsi], 0 lea rcx, [rsp+38h+var_35] lea r8, [rsp+38h+var_36] mov edx, 1 call _ZNSt3setI13llama_exampleSt4lessIS0_ESaIS0_EEC2ESt16initializer_listIS0_ERKS2_RKS3_; std::set<llama_example>::set(std::initializer_list<llama_example>,std::less<llama_example> const&,std::allocator<llama_example> const&) lea rax, [rbx+38h] xor ecx, ecx mov [rbx+40h], rcx xorps xmm0, xmm0 movups xmmword ptr [rbx+30h], xmm0 mov [rbx+48h], rax mov [rbx+50h], rax mov [rbx+58h], rcx lea r13, [rbx+60h] mov rsi, [rbp+0] mov rdx, [rbp+8] lea rcx, [rsp+38h+var_37] mov rdi, r13 call _ZNSt6vectorIPKcSaIS1_EEC2ESt16initializer_listIS1_ERKS2_; std::vector<char const*>::vector(std::initializer_list<char const*>,std::allocator<char const*> const&) mov [rbx+78h], r12 lea rdi, [rbx+90h] lea rax, [rbx+0A0h] xorps xmm0, xmm0 movups xmmword ptr [rbx+80h], xmm0 mov [rbx+90h], rax mov rsi, [r15] mov rdx, [r15+8] add rdx, rsi call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov byte ptr [rbx+0B0h], 0 xorps xmm0, xmm0 movups xmmword ptr [rbx+0B8h], xmm0 mov qword ptr [rbx+0C8h], 0 mov [rbx+0D0h], r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax mov rdi, [r13+0]; void * test rdi, rdi jz short loc_E503E mov rsi, [rbx+70h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_E503E mov r14, rax loc_E503E: lea rdi, [rbx+30h] call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree() mov rdi, rbx call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree() mov rdi, r14 call __Unwind_Resume
long long common_arg::common_arg(long long a1, _QWORD *a2, long long a3, long long a4, long long a5) { int v5; // eax long long result; // rax int v10; // [rsp+0h] [rbp-38h] BYREF _DWORD v11[13]; // [rsp+4h] [rbp-34h] BYREF v10 = v5; v11[0] = 0; std::set<llama_example>::set(a1, v11, 1LL, (char *)&v10 + 3, (char *)&v10 + 2); *(_QWORD *)(a1 + 64) = 0LL; *(_OWORD *)(a1 + 48) = 0LL; *(_QWORD *)(a1 + 72) = a1 + 56; *(_QWORD *)(a1 + 80) = a1 + 56; *(_QWORD *)(a1 + 88) = 0LL; std::vector<char const*>::vector(a1 + 96, *a2, a2[1], (char *)&v10 + 1); *(_QWORD *)(a1 + 120) = a3; *(_OWORD *)(a1 + 128) = 0LL; *(_QWORD *)(a1 + 144) = a1 + 160; result = std::string::_M_construct<char *>(a1 + 144, *(_BYTE **)a4, *(_QWORD *)a4 + *(_QWORD *)(a4 + 8)); *(_BYTE *)(a1 + 176) = 0; *(_OWORD *)(a1 + 184) = 0LL; *(_QWORD *)(a1 + 200) = 0LL; *(_QWORD *)(a1 + 208) = a5; return result; }
common_arg: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,R8 MOV R15,RCX MOV R12,RDX MOV RBP,RSI MOV RBX,RDI LEA RSI,[RSP + 0x4] MOV dword ptr [RSI],0x0 LEA RCX,[RSP + 0x3] LEA R8,[RSP + 0x2] MOV EDX,0x1 CALL 0x001f2bb8 LEA RAX,[RBX + 0x38] XOR ECX,ECX MOV qword ptr [RBX + 0x40],RCX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOV qword ptr [RBX + 0x48],RAX MOV qword ptr [RBX + 0x50],RAX MOV qword ptr [RBX + 0x58],RCX LEA R13,[RBX + 0x60] MOV RSI,qword ptr [RBP] MOV RDX,qword ptr [RBP + 0x8] LAB_001e4fb0: LEA RCX,[RSP + 0x1] MOV RDI,R13 CALL 0x001f2c3a MOV qword ptr [RBX + 0x78],R12 LEA RDI,[RBX + 0x90] LEA RAX,[RBX + 0xa0] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x80],XMM0 MOV qword ptr [RBX + 0x90],RAX MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] ADD RDX,RSI LAB_001e4fea: CALL 0x00153486 LAB_001e4fef: MOV byte ptr [RBX + 0xb0],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0xb8],XMM0 MOV qword ptr [RBX + 0xc8],0x0 MOV qword ptr [RBX + 0xd0],R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_arg::common_arg(std::initializer_list<char const*> const&, char const*, std::__cxx11::string const&, void (*)(common_params&, int)) */ void __thiscall common_arg::common_arg (common_arg *this,initializer_list *param_1,char *param_2,string *param_3, _func_void_common_params_ptr_int *param_4) { int4 in_EAX; int8 in_R9; std::set<llama_example,std::less<llama_example>,std::allocator<llama_example>>::set (this,&stack0xffffffffffffffcc,1,&stack0xffffffffffffffcb,&stack0xffffffffffffffca,in_R9 ,in_EAX); *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(common_arg **)(this + 0x48) = this + 0x38; *(common_arg **)(this + 0x50) = this + 0x38; *(int8 *)(this + 0x58) = 0; /* try { // try from 001e4fb0 to 001e4fbc has its CatchHandler @ 001e503b */ std::vector<char_const*,std::allocator<char_const*>>::vector ((vector<char_const*,std::allocator<char_const*>> *)(this + 0x60),*(int8 *)param_1 ,*(int8 *)(param_1 + 8),&stack0xffffffffffffffc9); *(char **)(this + 0x78) = param_2; *(int8 *)(this + 0x80) = 0; *(int8 *)(this + 0x88) = 0; *(common_arg **)(this + 0x90) = this + 0xa0; /* try { // try from 001e4fea to 001e4fee has its CatchHandler @ 001e5021 */ std::__cxx11::string::_M_construct<char*> (this + 0x90,*(long *)param_3,*(long *)(param_3 + 8) + *(long *)param_3); this[0xb0] = (common_arg)0x0; *(int8 *)(this + 0xb8) = 0; *(int8 *)(this + 0xc0) = 0; *(int8 *)(this + 200) = 0; *(_func_void_common_params_ptr_int **)(this + 0xd0) = param_4; return; }
23,423
Item_cache_wrapper::check_cache()
eloqsql/sql/item.cc
Item *Item_cache_wrapper::check_cache() { DBUG_ENTER("Item_cache_wrapper::check_cache"); if (expr_cache) { Expression_cache_tmptable::result res; Item *cached_value; init_on_demand(); res= expr_cache->check_value(&cached_value); if (res == Expression_cache_tmptable::HIT) DBUG_RETURN(cached_value); } DBUG_RETURN(NULL); }
O0
cpp
Item_cache_wrapper::check_cache(): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x28(%rbp) cmpq $0x0, 0x78(%rax) je 0xd3620d movq -0x28(%rbp), %rdi callq 0xd35ec0 movq -0x28(%rbp), %rax movq 0x78(%rax), %rdi movq (%rdi), %rax leaq -0x20(%rbp), %rsi callq *0x10(%rax) movl %eax, -0x14(%rbp) cmpl $0x1, -0x14(%rbp) jne 0xd3620b jmp 0xd36201 movq -0x20(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0xd36217 jmp 0xd3620d jmp 0xd3620f movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN18Item_cache_wrapper11check_cacheEv: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov [rbp+var_28], rax cmp qword ptr [rax+78h], 0 jz short loc_D3620D mov rdi, [rbp+var_28]; this call _ZN18Item_cache_wrapper14init_on_demandEv; Item_cache_wrapper::init_on_demand(void) mov rax, [rbp+var_28] mov rdi, [rax+78h] mov rax, [rdi] lea rsi, [rbp+var_20] call qword ptr [rax+10h] mov [rbp+var_14], eax cmp [rbp+var_14], 1 jnz short loc_D3620B jmp short $+2 loc_D36201: mov rax, [rbp+var_20] mov [rbp+var_8], rax jmp short loc_D36217 loc_D3620B: jmp short $+2 loc_D3620D: jmp short $+2 loc_D3620F: mov [rbp+var_8], 0 loc_D36217: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
long long Item_cache_wrapper::check_cache(Item_cache_wrapper *this) { long long v2; // [rsp+10h] [rbp-20h] BYREF int v3; // [rsp+1Ch] [rbp-14h] Item_cache_wrapper *v4; // [rsp+20h] [rbp-10h] v4 = this; if ( *((_QWORD *)this + 15) && (Item_cache_wrapper::init_on_demand(this), v3 = (*(long long ( **)(_QWORD, long long *))(**((_QWORD **)this + 15) + 16LL))( *((_QWORD *)this + 15), &v2), v3 == 1) ) { return v2; } else { return 0LL; } }
keys_to_use_for_scanning: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI LEA RAX,[0x1e48fe0] POP RBP RET
/* handler::keys_to_use_for_scanning() */ int8 * handler::keys_to_use_for_scanning(void) { return &key_map_empty; }
23,424
ma_bitmap_flush
eloqsql/storage/maria/ma_bitmap.c
my_bool _ma_bitmap_flush(MARIA_SHARE *share) { my_bool res= 0; DBUG_ENTER("_ma_bitmap_flush"); if (share->bitmap.changed) { mysql_mutex_lock(&share->bitmap.bitmap_lock); if (share->bitmap.changed) { /* We have to mark the file changed here, as otherwise the following write to pagecache may force a page out from this file, which would cause _ma_mark_file_changed() to be called with bitmaplock hold! */ _ma_bitmap_mark_file_changed(share, 1); res= write_changed_bitmap(share, &share->bitmap); share->bitmap.changed= 0; } mysql_mutex_unlock(&share->bitmap.bitmap_lock); } DBUG_RETURN(res); }
O3
c
ma_bitmap_flush: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp cmpb $0x0, 0xa30(%rdi) je 0x52836 movq %rdi, %r14 leaq 0xa98(%rdi), %rbx cmpq $0x0, 0xad8(%rdi) jne 0x528c5 movq %rbx, %rdi callq 0x29200 leaq 0xad8(%r14), %r15 cmpb $0x0, 0xa30(%r14) je 0x5283b cmpb $0x0, 0x7df(%r14) jne 0x527b4 testb $0x1, 0x170(%r14) jne 0x528f0 movb $0x1, 0xa31(%r14) cmpl $0x0, 0xa48(%r14) je 0x52840 movq 0x600(%r14), %rdi leaq 0xa50(%r14), %rsi movq 0xa20(%r14), %rdx movq 0xa18(%r14), %r8 movl 0x80(%rdi), %eax subq $0x8, %rsp movq %r15, -0x30(%rbp) xorl %r15d, %r15d leaq -0x48(%rbp), %r13 xorl %ecx, %ecx movl $0x1, %r9d pushq %rax pushq %r15 pushq $0x0 pushq %r13 pushq %r15 pushq $0x2 pushq %r15 callq 0x3c662 addq $0x40, %rsp movl %eax, %r12d movl %r15d, 0x8(%r13) movq -0x30(%rbp), %r15 movb $0x1, 0x10(%r13) leaq 0xb50(%r14), %rdi movq %r13, %rsi callq 0x91b0e jmp 0x5289b xorl %r12d, %r12d jmp 0x528b3 xorl %r12d, %r12d jmp 0x528a3 movq 0x600(%r14), %rdi leaq 0xa50(%r14), %rsi movq 0xa20(%r14), %rdx movq 0xa18(%r14), %r8 movl 0x80(%rdi), %eax subq $0x40, %rsp movl %eax, 0x30(%rsp) xorl %eax, %eax movl %eax, 0x28(%rsp) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%rsp) movl %eax, 0x10(%rsp) movl %eax, (%rsp) movl $0x1, 0x8(%rsp) xorl %ecx, %ecx movl $0x1, %r9d callq 0x3c662 addq $0x40, %rsp movl %eax, %r12d movb $0x0, 0xa30(%r14) movq (%r15), %rdi testq %rdi, %rdi jne 0x528de movq %rbx, %rdi callq 0x291c0 movl %r12d, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x87ced(%rip), %rsi # 0xda5b9 movq %rbx, %rdi movl $0x1a9, %edx # imm = 0x1A9 callq 0x2eb6f jmp 0x52787 leaq 0x33372b(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x528ab movq %r15, %rdi movq %rbx, %rsi movq %r14, %rdx callq 0x2c68b jmp 0x527b4
_ma_bitmap_flush: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h cmp byte ptr [rdi+0A30h], 0 jz loc_52836 mov r14, rdi lea rbx, [rdi+0A98h] cmp qword ptr [rdi+0AD8h], 0 jnz loc_528C5 mov rdi, rbx call _pthread_mutex_lock loc_52787: lea r15, [r14+0AD8h] cmp byte ptr [r14+0A30h], 0 jz loc_5283B cmp byte ptr [r14+7DFh], 0 jnz short loc_527B4 test byte ptr [r14+170h], 1 jnz loc_528F0 loc_527B4: mov byte ptr [r14+0A31h], 1 cmp dword ptr [r14+0A48h], 0 jz short loc_52840 mov rdi, [r14+600h] lea rsi, [r14+0A50h] mov rdx, [r14+0A20h] mov r8, [r14+0A18h] mov eax, [rdi+80h] sub rsp, 8 mov [rbp+var_30], r15 xor r15d, r15d lea r13, [rbp+var_48] xor ecx, ecx mov r9d, 1 push rax push r15 push 0 push r13 push r15 push 2 push r15 call pagecache_write_part add rsp, 40h mov r12d, eax mov [r13+8], r15d mov r15, [rbp+var_30] mov byte ptr [r13+10h], 1 lea rdi, [r14+0B50h] mov rsi, r13 call insert_dynamic jmp short loc_5289B loc_52836: xor r12d, r12d jmp short loc_528B3 loc_5283B: xor r12d, r12d jmp short loc_528A3 loc_52840: mov rdi, [r14+600h] lea rsi, [r14+0A50h] mov rdx, [r14+0A20h] mov r8, [r14+0A18h] mov eax, [rdi+80h] sub rsp, 40h mov [rsp+90h+var_60], eax xor eax, eax mov [rsp+90h+var_68], eax xorps xmm0, xmm0 movups [rsp+90h+var_78], xmm0 mov [rsp+90h+var_80], eax mov [rsp+90h+var_90], eax mov [rsp+90h+var_88], 1 xor ecx, ecx mov r9d, 1 call pagecache_write_part add rsp, 40h mov r12d, eax loc_5289B: mov byte ptr [r14+0A30h], 0 loc_528A3: mov rdi, [r15] test rdi, rdi jnz short loc_528DE loc_528AB: mov rdi, rbx call _pthread_mutex_unlock loc_528B3: mov eax, r12d add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_528C5: lea rsi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, rbx mov edx, 1A9h call psi_mutex_lock jmp loc_52787 loc_528DE: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_528AB loc_528F0: mov rdi, r15 mov rsi, rbx mov rdx, r14 call _ma_bitmap_flush_cold_1 jmp loc_527B4
long long ma_bitmap_flush(long long a1) { long long v2; // rbx _QWORD *v3; // r15 __m128i *v4; // rdi long long v5; // rdx char *v6; // r8 unsigned __int32 v7; // eax unsigned int v8; // r12d long long v10; // [rsp+48h] [rbp-48h] BYREF int v11; // [rsp+50h] [rbp-40h] char v12; // [rsp+58h] [rbp-38h] _QWORD *v13; // [rsp+60h] [rbp-30h] if ( *(_BYTE *)(a1 + 2608) ) { v2 = a1 + 2712; if ( *(_QWORD *)(a1 + 2776) ) psi_mutex_lock(a1 + 2712, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c", 0x1A9u); else pthread_mutex_lock(a1 + 2712); v3 = (_QWORD *)(a1 + 2776); if ( *(_BYTE *)(a1 + 2608) ) { if ( !*(_BYTE *)(a1 + 2015) && (*(_BYTE *)(a1 + 368) & 1) != 0 ) ma_bitmap_flush_cold_1((_QWORD *)(a1 + 2776), v2, a1); *(_BYTE *)(a1 + 2609) = 1; if ( *(_DWORD *)(a1 + 2632) ) { v4 = *(__m128i **)(a1 + 1536); v5 = *(_QWORD *)(a1 + 2592); v6 = *(char **)(a1 + 2584); v7 = v4[8].m128i_u32[0]; v13 = (_QWORD *)(a1 + 2776); v8 = pagecache_write_part(v4, (char *)(a1 + 2640), v5, 0, v6, 1, 0, 2u, 0, &v10, 0LL, 0, v7); v11 = 0; v3 = v13; v12 = 1; insert_dynamic(a1 + 2896, &v10); } else { v8 = pagecache_write_part( *(__m128i **)(a1 + 1536), (char *)(a1 + 2640), *(_QWORD *)(a1 + 2592), 0, *(char **)(a1 + 2584), 1, 0, 1u, 0, 0LL, 0LL, 0, *(_DWORD *)(*(_QWORD *)(a1 + 1536) + 128LL)); } *(_BYTE *)(a1 + 2608) = 0; } else { v8 = 0; } if ( *v3 ) PSI_server[44](); pthread_mutex_unlock(v2); } else { return 0; } return v8; }
_ma_bitmap_flush: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 CMP byte ptr [RDI + 0xa30],0x0 JZ 0x00152836 MOV R14,RDI LEA RBX,[RDI + 0xa98] CMP qword ptr [RDI + 0xad8],0x0 JNZ 0x001528c5 MOV RDI,RBX CALL 0x00129200 LAB_00152787: LEA R15,[R14 + 0xad8] CMP byte ptr [R14 + 0xa30],0x0 JZ 0x0015283b CMP byte ptr [R14 + 0x7df],0x0 JNZ 0x001527b4 TEST byte ptr [R14 + 0x170],0x1 JNZ 0x001528f0 LAB_001527b4: MOV byte ptr [R14 + 0xa31],0x1 CMP dword ptr [R14 + 0xa48],0x0 JZ 0x00152840 MOV RDI,qword ptr [R14 + 0x600] LEA RSI,[R14 + 0xa50] MOV RDX,qword ptr [R14 + 0xa20] MOV R8,qword ptr [R14 + 0xa18] MOV EAX,dword ptr [RDI + 0x80] SUB RSP,0x8 MOV qword ptr [RBP + -0x30],R15 XOR R15D,R15D LEA R13,[RBP + -0x48] XOR ECX,ECX MOV R9D,0x1 PUSH RAX PUSH R15 PUSH 0x0 PUSH R13 PUSH R15 PUSH 0x2 PUSH R15 CALL 0x0013c662 ADD RSP,0x40 MOV R12D,EAX MOV dword ptr [R13 + 0x8],R15D MOV R15,qword ptr [RBP + -0x30] MOV byte ptr [R13 + 0x10],0x1 LEA RDI,[R14 + 0xb50] MOV RSI,R13 CALL 0x00191b0e JMP 0x0015289b LAB_00152836: XOR R12D,R12D JMP 0x001528b3 LAB_0015283b: XOR R12D,R12D JMP 0x001528a3 LAB_00152840: MOV RDI,qword ptr [R14 + 0x600] LEA RSI,[R14 + 0xa50] MOV RDX,qword ptr [R14 + 0xa20] MOV R8,qword ptr [R14 + 0xa18] MOV EAX,dword ptr [RDI + 0x80] SUB RSP,0x40 MOV dword ptr [RSP + 0x30],EAX XOR EAX,EAX MOV dword ptr [RSP + 0x28],EAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x18],XMM0 MOV dword ptr [RSP + 0x10],EAX MOV dword ptr [RSP],EAX MOV dword ptr [RSP + 0x8],0x1 XOR ECX,ECX MOV R9D,0x1 CALL 0x0013c662 ADD RSP,0x40 MOV R12D,EAX LAB_0015289b: MOV byte ptr [R14 + 0xa30],0x0 LAB_001528a3: MOV RDI,qword ptr [R15] TEST RDI,RDI JNZ 0x001528de LAB_001528ab: MOV RDI,RBX CALL 0x001291c0 LAB_001528b3: MOV EAX,R12D ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001528c5: LEA RSI,[0x1da5b9] MOV RDI,RBX MOV EDX,0x1a9 CALL 0x0012eb6f JMP 0x00152787 LAB_001528de: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x001528ab LAB_001528f0: MOV RDI,R15 MOV RSI,RBX MOV RDX,R14 CALL 0x0012c68b JMP 0x001527b4
int4 _ma_bitmap_flush(long param_1) { pthread_mutex_t *__mutex; int4 uVar1; long *plVar2; ulong in_stack_ffffffffffffff68; ulong in_stack_ffffffffffffff78; ulong in_stack_ffffffffffffff90; int1 local_50 [8]; int4 local_48; int1 local_40; long *local_38; if (*(char *)(param_1 + 0xa30) == '\0') { uVar1 = 0; } else { __mutex = (pthread_mutex_t *)(param_1 + 0xa98); if (*(long *)(param_1 + 0xad8) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c", 0x1a9); } plVar2 = (long *)(param_1 + 0xad8); if (*(char *)(param_1 + 0xa30) == '\0') { uVar1 = 0; } else { if ((*(char *)(param_1 + 0x7df) == '\0') && ((*(byte *)(param_1 + 0x170) & 1) != 0)) { _ma_bitmap_flush_cold_1(plVar2,__mutex,param_1); } *(int1 *)(param_1 + 0xa31) = 1; if (*(int *)(param_1 + 0xa48) == 0) { uVar1 = pagecache_write_part (*(long *)(param_1 + 0x600),param_1 + 0xa50, *(int8 *)(param_1 + 0xa20),0,*(int8 *)(param_1 + 0xa18),1, in_stack_ffffffffffffff68 & 0xffffffff00000000,1, in_stack_ffffffffffffff78 & 0xffffffff00000000,0,0, in_stack_ffffffffffffff90 & 0xffffffff00000000, *(int4 *)(*(long *)(param_1 + 0x600) + 0x80)); } else { local_38 = plVar2; uVar1 = pagecache_write_part (*(long *)(param_1 + 0x600),param_1 + 0xa50, *(int8 *)(param_1 + 0xa20),0,*(int8 *)(param_1 + 0xa18),1,0,2 ,0,local_50,0,0,*(int4 *)(*(long *)(param_1 + 0x600) + 0x80)); plVar2 = local_38; local_48 = 0; local_40 = 1; insert_dynamic(param_1 + 0xb50,local_50); } *(int1 *)(param_1 + 0xa30) = 0; } if (*plVar2 != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); } return uVar1; }
23,425
bf_sincos
bluesky950520[P]quickjs/libbf.c
static int bf_sincos(bf_t *s, bf_t *c, const bf_t *a, limb_t prec) { bf_context_t *s1 = a->ctx; bf_t T_s, *T = &T_s; bf_t U_s, *U = &U_s; bf_t r_s, *r = &r_s; slimb_t K, prec1, i, l, mod, prec2; int is_neg; assert(c != a && s != a); bf_init(s1, T); bf_init(s1, U); bf_init(s1, r); /* XXX: precision analysis */ K = bf_isqrt(prec / 2); l = prec / (2 * K) + 1; prec1 = prec + 2 * K + l + 8; /* after the modulo reduction, -pi/4 <= T <= pi/4 */ if (a->expn <= -1) { /* abs(a) <= 0.25: no modulo reduction needed */ bf_set(T, a); mod = 0; } else { slimb_t cancel; cancel = 0; for(;;) { prec2 = prec1 + a->expn + cancel; bf_const_pi(U, prec2, BF_RNDF); bf_mul_2exp(U, -1, BF_PREC_INF, BF_RNDZ); bf_remquo(&mod, T, a, U, prec2, BF_RNDN, BF_RNDN); // printf("T.expn=%ld prec2=%ld\n", T->expn, prec2); if (mod == 0 || (T->expn != BF_EXP_ZERO && (T->expn + prec2) >= (prec1 - 1))) break; /* increase the number of bits until the precision is good enough */ cancel = bf_max(-T->expn, (cancel + 1) * 3 / 2); } mod &= 3; } is_neg = T->sign; /* compute cosm1(x) = cos(x) - 1 */ bf_mul(T, T, T, prec1, BF_RNDN); bf_mul_2exp(T, -2 * K, BF_PREC_INF, BF_RNDZ); /* Taylor expansion: -x^2/2 + x^4/4! - x^6/6! + ... */ bf_set_ui(r, 1); for(i = l ; i >= 1; i--) { bf_set_ui(U, 2 * i - 1); bf_mul_ui(U, U, 2 * i, BF_PREC_INF, BF_RNDZ); bf_div(U, T, U, prec1, BF_RNDN); bf_mul(r, r, U, prec1, BF_RNDN); bf_neg(r); if (i != 1) bf_add_si(r, r, 1, prec1, BF_RNDN); } bf_delete(U); /* undo argument reduction: cosm1(2*x)= 2*(2*cosm1(x)+cosm1(x)^2) */ for(i = 0; i < K; i++) { bf_mul(T, r, r, prec1, BF_RNDN); bf_mul_2exp(r, 1, BF_PREC_INF, BF_RNDZ); bf_add(r, r, T, prec1, BF_RNDN); bf_mul_2exp(r, 1, BF_PREC_INF, BF_RNDZ); } bf_delete(T); if (c) { if ((mod & 1) == 0) { bf_add_si(c, r, 1, prec1, BF_RNDN); } else { bf_sqrt_sin(c, r, prec1); c->sign = is_neg ^ 1; } c->sign ^= mod >> 1; } if (s) { if ((mod & 1) == 0) { bf_sqrt_sin(s, r, prec1); s->sign = is_neg; } else { bf_add_si(s, r, 1, prec1, BF_RNDN); } s->sign ^= mod >> 1; } bf_delete(r); return BF_ST_INEXACT; }
O0
c
bf_sincos: subq $0x108, %rsp # imm = 0x108 movq %rdi, 0x100(%rsp) movq %rsi, 0xf8(%rsp) movq %rdx, 0xf0(%rsp) movq %rcx, 0xe8(%rsp) movq 0xf0(%rsp), %rax movq (%rax), %rax movq %rax, 0xe0(%rsp) leaq 0xb8(%rsp), %rax movq %rax, 0xb0(%rsp) leaq 0x88(%rsp), %rax movq %rax, 0x80(%rsp) leaq 0x58(%rsp), %rax movq %rax, 0x50(%rsp) movq 0xe0(%rsp), %rdi movq 0xb0(%rsp), %rsi callq 0xec260 movq 0xe0(%rsp), %rdi movq 0x80(%rsp), %rsi callq 0xec260 movq 0xe0(%rsp), %rdi movq 0x50(%rsp), %rsi callq 0xec260 movq 0xe8(%rsp), %rdi shrq %rdi callq 0xef7e0 movq %rax, 0x48(%rsp) movq 0xe8(%rsp), %rax movq 0x48(%rsp), %rcx shlq %rcx xorl %edx, %edx divq %rcx addq $0x1, %rax movq %rax, 0x30(%rsp) movq 0xe8(%rsp), %rax movq 0x48(%rsp), %rcx shlq %rcx addq %rcx, %rax addq 0x30(%rsp), %rax addq $0x8, %rax movq %rax, 0x40(%rsp) movq 0xf0(%rsp), %rax cmpq $-0x1, 0x10(%rax) jg 0xff756 movq 0xb0(%rsp), %rdi movq 0xf0(%rsp), %rsi callq 0xec5b0 movq $0x0, 0x28(%rsp) jmp 0xff86d movq $0x0, 0x10(%rsp) movq 0x40(%rsp), %rax movq 0xf0(%rsp), %rcx addq 0x10(%rcx), %rax addq 0x10(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x80(%rsp), %rdi movq 0x20(%rsp), %rsi movl $0x6, %edx callq 0xf4140 movq 0x80(%rsp), %rdi movq $-0x1, %rsi movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF movl $0x1, %ecx callq 0xeee00 movq 0xb0(%rsp), %rsi movq 0xf0(%rsp), %rdx movq 0x80(%rsp), %rcx movq 0x20(%rsp), %r8 leaq 0x28(%rsp), %rdi xorl %r9d, %r9d movl $0x0, (%rsp) callq 0xef710 cmpq $0x0, 0x28(%rsp) je 0xff824 movq 0xb0(%rsp), %rax movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 cmpq %rcx, 0x10(%rax) je 0xff826 movq 0xb0(%rsp), %rax movq 0x10(%rax), %rax addq 0x20(%rsp), %rax movq 0x40(%rsp), %rcx subq $0x1, %rcx cmpq %rcx, %rax jl 0xff826 jmp 0xff85f movq 0xb0(%rsp), %rax xorl %ecx, %ecx movl %ecx, %edi subq 0x10(%rax), %rdi movq 0x10(%rsp), %rax addq $0x1, %rax imulq $0x3, %rax, %rax movl $0x2, %ecx cqto idivq %rcx movq %rax, %rsi callq 0xed350 movq %rax, 0x10(%rsp) jmp 0xff75f movq 0x28(%rsp), %rax andq $0x3, %rax movq %rax, 0x28(%rsp) movq 0xb0(%rsp), %rax movl 0x8(%rax), %eax movl %eax, 0x1c(%rsp) movq 0xb0(%rsp), %rdi movq 0xb0(%rsp), %rsi movq 0xb0(%rsp), %rdx movq 0x40(%rsp), %rcx xorl %r8d, %r8d callq 0xee970 movq 0xb0(%rsp), %rdi imulq $-0x2, 0x48(%rsp), %rsi movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF movl $0x1, %ecx callq 0xeee00 movq 0x50(%rsp), %rdi movl $0x1, %esi callq 0xec390 movq 0x30(%rsp), %rax movq %rax, 0x38(%rsp) cmpq $0x1, 0x38(%rsp) jl 0xff9b5 movq 0x80(%rsp), %rdi movq 0x38(%rsp), %rsi shlq %rsi subq $0x1, %rsi callq 0xec390 movq 0x80(%rsp), %rdi movq 0x80(%rsp), %rsi movq 0x38(%rsp), %rdx shlq %rdx movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF movl $0x1, %r8d callq 0xf0ad0 movq 0x80(%rsp), %rdi movq 0xb0(%rsp), %rsi movq 0x80(%rsp), %rdx movq 0x40(%rsp), %rcx xorl %r8d, %r8d callq 0xf06c0 movq 0x50(%rsp), %rdi movq 0x50(%rsp), %rsi movq 0x80(%rsp), %rdx movq 0x40(%rsp), %rcx xorl %r8d, %r8d callq 0xee970 movq 0x50(%rsp), %rdi callq 0xf0440 cmpq $0x1, 0x38(%rsp) je 0xff9a0 movq 0x50(%rsp), %rdi movq 0x50(%rsp), %rsi movq 0x40(%rsp), %rcx movl $0x1, %edx xorl %r8d, %r8d callq 0xef570 jmp 0xff9a2 movq 0x38(%rsp), %rax addq $-0x1, %rax movq %rax, 0x38(%rsp) jmp 0xff8dc movq 0x80(%rsp), %rdi callq 0xef6c0 movq $0x0, 0x38(%rsp) movq 0x38(%rsp), %rax cmpq 0x48(%rsp), %rax jge 0xffa68 movq 0xb0(%rsp), %rdi movq 0x50(%rsp), %rsi movq 0x50(%rsp), %rdx movq 0x40(%rsp), %rcx xorl %r8d, %r8d callq 0xee970 movq 0x50(%rsp), %rdi movl $0x1, %esi movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF movl $0x1, %ecx callq 0xeee00 movq 0x50(%rsp), %rdi movq 0x50(%rsp), %rsi movq 0xb0(%rsp), %rdx movq 0x40(%rsp), %rcx xorl %r8d, %r8d callq 0xf0460 movq 0x50(%rsp), %rdi movl $0x1, %esi movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF movl $0x1, %ecx callq 0xeee00 movq 0x38(%rsp), %rax addq $0x1, %rax movq %rax, 0x38(%rsp) jmp 0xff9cb movq 0xb0(%rsp), %rdi callq 0xef6c0 cmpq $0x0, 0xf8(%rsp) je 0xffaf3 movq 0x28(%rsp), %rax andq $0x1, %rax cmpq $0x0, %rax jne 0xffab0 movq 0xf8(%rsp), %rdi movq 0x50(%rsp), %rsi movq 0x40(%rsp), %rcx movl $0x1, %edx xorl %r8d, %r8d callq 0xef570 jmp 0xffad9 movq 0xf8(%rsp), %rdi movq 0x50(%rsp), %rsi movq 0x40(%rsp), %rdx callq 0xffb90 movl 0x1c(%rsp), %ecx xorl $0x1, %ecx movq 0xf8(%rsp), %rax movl %ecx, 0x8(%rax) movq 0x28(%rsp), %rdx sarq %rdx movq 0xf8(%rsp), %rax movslq 0x8(%rax), %rcx xorq %rdx, %rcx movl %ecx, 0x8(%rax) cmpq $0x0, 0x100(%rsp) je 0xffb6e movq 0x28(%rsp), %rax andq $0x1, %rax cmpq $0x0, %rax jne 0xffb35 movq 0x100(%rsp), %rdi movq 0x50(%rsp), %rsi movq 0x40(%rsp), %rdx callq 0xffb90 movl 0x1c(%rsp), %ecx movq 0x100(%rsp), %rax movl %ecx, 0x8(%rax) jmp 0xffb54 movq 0x100(%rsp), %rdi movq 0x50(%rsp), %rsi movq 0x40(%rsp), %rcx movl $0x1, %edx xorl %r8d, %r8d callq 0xef570 movq 0x28(%rsp), %rdx sarq %rdx movq 0x100(%rsp), %rax movslq 0x8(%rax), %rcx xorq %rdx, %rcx movl %ecx, 0x8(%rax) movq 0x50(%rsp), %rdi callq 0xef6c0 movl $0x10, %eax addq $0x108, %rsp # imm = 0x108 retq nopw %cs:(%rax,%rax)
bf_sincos: sub rsp, 108h mov [rsp+108h+var_8], rdi mov [rsp+108h+var_10], rsi mov [rsp+108h+var_18], rdx mov [rsp+108h+var_20], rcx mov rax, [rsp+108h+var_18] mov rax, [rax] mov [rsp+108h+var_28], rax lea rax, [rsp+108h+var_50] mov [rsp+108h+var_58], rax lea rax, [rsp+108h+var_80] mov [rsp+108h+var_88], rax lea rax, [rsp+108h+var_B0] mov [rsp+108h+var_B8], rax mov rdi, [rsp+108h+var_28] mov rsi, [rsp+108h+var_58] call bf_init mov rdi, [rsp+108h+var_28] mov rsi, [rsp+108h+var_88] call bf_init mov rdi, [rsp+108h+var_28] mov rsi, [rsp+108h+var_B8] call bf_init mov rdi, [rsp+108h+var_20] shr rdi, 1 call bf_isqrt mov [rsp+108h+var_C0], rax mov rax, [rsp+108h+var_20] mov rcx, [rsp+108h+var_C0] shl rcx, 1 xor edx, edx div rcx add rax, 1 mov [rsp+108h+var_D8], rax mov rax, [rsp+108h+var_20] mov rcx, [rsp+108h+var_C0] shl rcx, 1 add rax, rcx add rax, [rsp+108h+var_D8] add rax, 8 mov [rsp+108h+var_C8], rax mov rax, [rsp+108h+var_18] cmp qword ptr [rax+10h], 0FFFFFFFFFFFFFFFFh jg short loc_FF756 mov rdi, [rsp+108h+var_58] mov rsi, [rsp+108h+var_18] call bf_set mov [rsp+108h+var_E0], 0 jmp loc_FF86D loc_FF756: mov [rsp+108h+var_F8], 0 loc_FF75F: mov rax, [rsp+108h+var_C8] mov rcx, [rsp+108h+var_18] add rax, [rcx+10h] add rax, [rsp+108h+var_F8] mov [rsp+108h+var_E8], rax mov rdi, [rsp+108h+var_88] mov rsi, [rsp+108h+var_E8] mov edx, 6 call bf_const_pi mov rdi, [rsp+108h+var_88] mov rsi, 0FFFFFFFFFFFFFFFFh mov rdx, 3FFFFFFFFFFFFFFFh mov ecx, 1 call bf_mul_2exp mov rsi, [rsp+108h+var_58] mov rdx, [rsp+108h+var_18] mov rcx, [rsp+108h+var_88] mov r8, [rsp+108h+var_E8] lea rdi, [rsp+108h+var_E0] xor r9d, r9d mov [rsp+108h+var_108], 0 call bf_remquo cmp [rsp+108h+var_E0], 0 jz short loc_FF824 mov rax, [rsp+108h+var_58] mov rcx, 8000000000000000h cmp [rax+10h], rcx jz short loc_FF826 mov rax, [rsp+108h+var_58] mov rax, [rax+10h] add rax, [rsp+108h+var_E8] mov rcx, [rsp+108h+var_C8] sub rcx, 1 cmp rax, rcx jl short loc_FF826 loc_FF824: jmp short loc_FF85F loc_FF826: mov rax, [rsp+108h+var_58] xor ecx, ecx mov edi, ecx sub rdi, [rax+10h] mov rax, [rsp+108h+var_F8] add rax, 1 imul rax, 3 mov ecx, 2 cqo idiv rcx mov rsi, rax call bf_max mov [rsp+108h+var_F8], rax jmp loc_FF75F loc_FF85F: mov rax, [rsp+108h+var_E0] and rax, 3 mov [rsp+108h+var_E0], rax loc_FF86D: mov rax, [rsp+108h+var_58] mov eax, [rax+8] mov [rsp+108h+var_EC], eax mov rdi, [rsp+108h+var_58] mov rsi, [rsp+108h+var_58] mov rdx, [rsp+108h+var_58] mov rcx, [rsp+108h+var_C8] xor r8d, r8d call bf_mul mov rdi, [rsp+108h+var_58] imul rsi, [rsp+108h+var_C0], -2 mov rdx, 3FFFFFFFFFFFFFFFh mov ecx, 1 call bf_mul_2exp mov rdi, [rsp+108h+var_B8] mov esi, 1 call bf_set_ui mov rax, [rsp+108h+var_D8] mov [rsp+108h+var_D0], rax loc_FF8DC: cmp [rsp+108h+var_D0], 1 jl loc_FF9B5 mov rdi, [rsp+108h+var_88] mov rsi, [rsp+108h+var_D0] shl rsi, 1 sub rsi, 1 call bf_set_ui mov rdi, [rsp+108h+var_88] mov rsi, [rsp+108h+var_88] mov rdx, [rsp+108h+var_D0] shl rdx, 1 mov rcx, 3FFFFFFFFFFFFFFFh mov r8d, 1 call bf_mul_ui mov rdi, [rsp+108h+var_88] mov rsi, [rsp+108h+var_58] mov rdx, [rsp+108h+var_88] mov rcx, [rsp+108h+var_C8] xor r8d, r8d call bf_div mov rdi, [rsp+108h+var_B8] mov rsi, [rsp+108h+var_B8] mov rdx, [rsp+108h+var_88] mov rcx, [rsp+108h+var_C8] xor r8d, r8d call bf_mul mov rdi, [rsp+108h+var_B8] call bf_neg_0 cmp [rsp+108h+var_D0], 1 jz short loc_FF9A0 mov rdi, [rsp+108h+var_B8] mov rsi, [rsp+108h+var_B8] mov rcx, [rsp+108h+var_C8] mov edx, 1 xor r8d, r8d call bf_add_si loc_FF9A0: jmp short $+2 loc_FF9A2: mov rax, [rsp+108h+var_D0] add rax, 0FFFFFFFFFFFFFFFFh mov [rsp+108h+var_D0], rax jmp loc_FF8DC loc_FF9B5: mov rdi, [rsp+108h+var_88] call bf_delete_0 mov [rsp+108h+var_D0], 0 loc_FF9CB: mov rax, [rsp+108h+var_D0] cmp rax, [rsp+108h+var_C0] jge loc_FFA68 mov rdi, [rsp+108h+var_58] mov rsi, [rsp+108h+var_B8] mov rdx, [rsp+108h+var_B8] mov rcx, [rsp+108h+var_C8] xor r8d, r8d call bf_mul mov rdi, [rsp+108h+var_B8] mov esi, 1 mov rdx, 3FFFFFFFFFFFFFFFh mov ecx, 1 call bf_mul_2exp mov rdi, [rsp+108h+var_B8] mov rsi, [rsp+108h+var_B8] mov rdx, [rsp+108h+var_58] mov rcx, [rsp+108h+var_C8] xor r8d, r8d call bf_add mov rdi, [rsp+108h+var_B8] mov esi, 1 mov rdx, 3FFFFFFFFFFFFFFFh mov ecx, 1 call bf_mul_2exp mov rax, [rsp+108h+var_D0] add rax, 1 mov [rsp+108h+var_D0], rax jmp loc_FF9CB loc_FFA68: mov rdi, [rsp+108h+var_58] call bf_delete_0 cmp [rsp+108h+var_10], 0 jz short loc_FFAF3 mov rax, [rsp+108h+var_E0] and rax, 1 cmp rax, 0 jnz short loc_FFAB0 mov rdi, [rsp+108h+var_10] mov rsi, [rsp+108h+var_B8] mov rcx, [rsp+108h+var_C8] mov edx, 1 xor r8d, r8d call bf_add_si jmp short loc_FFAD9 loc_FFAB0: mov rdi, [rsp+108h+var_10] mov rsi, [rsp+108h+var_B8] mov rdx, [rsp+108h+var_C8] call bf_sqrt_sin mov ecx, [rsp+108h+var_EC] xor ecx, 1 mov rax, [rsp+108h+var_10] mov [rax+8], ecx loc_FFAD9: mov rdx, [rsp+108h+var_E0] sar rdx, 1 mov rax, [rsp+108h+var_10] movsxd rcx, dword ptr [rax+8] xor rcx, rdx mov [rax+8], ecx loc_FFAF3: cmp [rsp+108h+var_8], 0 jz short loc_FFB6E mov rax, [rsp+108h+var_E0] and rax, 1 cmp rax, 0 jnz short loc_FFB35 mov rdi, [rsp+108h+var_8] mov rsi, [rsp+108h+var_B8] mov rdx, [rsp+108h+var_C8] call bf_sqrt_sin mov ecx, [rsp+108h+var_EC] mov rax, [rsp+108h+var_8] mov [rax+8], ecx jmp short loc_FFB54 loc_FFB35: mov rdi, [rsp+108h+var_8] mov rsi, [rsp+108h+var_B8] mov rcx, [rsp+108h+var_C8] mov edx, 1 xor r8d, r8d call bf_add_si loc_FFB54: mov rdx, [rsp+108h+var_E0] sar rdx, 1 mov rax, [rsp+108h+var_8] movsxd rcx, dword ptr [rax+8] xor rcx, rdx mov [rax+8], ecx loc_FFB6E: mov rdi, [rsp+108h+var_B8] call bf_delete_0 mov eax, 10h add rsp, 108h retn
long long bf_sincos(long long *a1, long long *a2, long long *a3, unsigned long long a4) { long long *v4; // rsi long long v5; // rdx long long v6; // rcx long long v7; // r8 long long v8; // r9 long long v9; // rdx long long v10; // rcx long long v11; // r8 long long v12; // r9 long long v13; // rdx long long v14; // rcx long long v15; // r8 long long v16; // r9 long long i; // [rsp+10h] [rbp-F8h] int v19; // [rsp+1Ch] [rbp-ECh] long long v20; // [rsp+20h] [rbp-E8h] long long v21; // [rsp+28h] [rbp-E0h] BYREF unsigned long long v22; // [rsp+30h] [rbp-D8h] long long j; // [rsp+38h] [rbp-D0h] long long v24; // [rsp+40h] [rbp-C8h] signed long long v25; // [rsp+48h] [rbp-C0h] long long *v26; // [rsp+50h] [rbp-B8h] _BYTE v27[40]; // [rsp+58h] [rbp-B0h] BYREF long long *v28; // [rsp+80h] [rbp-88h] char v29; // [rsp+88h] [rbp-80h] BYREF long long *v30; // [rsp+B0h] [rbp-58h] _BYTE v31[40]; // [rsp+B8h] [rbp-50h] BYREF long long v32; // [rsp+E0h] [rbp-28h] unsigned long long v33; // [rsp+E8h] [rbp-20h] long long *v34; // [rsp+F0h] [rbp-18h] long long *v35; // [rsp+F8h] [rbp-10h] long long *v36; // [rsp+100h] [rbp-8h] v36 = a1; v35 = a2; v34 = a3; v33 = a4; v32 = *a3; v30 = (long long *)v31; v28 = (long long *)&v29; v26 = (long long *)v27; bf_init(v32, (long long)v31); bf_init(v32, (long long)v28); bf_init(v32, (long long)v27); v25 = bf_isqrt(v33 >> 1); v22 = v33 / (2 * v25) + 1; v24 = v22 + 2 * v25 + v33 + 8; if ( v34[2] > -1 ) { for ( i = 0LL; ; i = bf_max(-v30[2], 3 * (i + 1) / 2) ) { v20 = i + v34[2] + v24; bf_const_pi((long long)v28, v20, 6u); bf_mul_2exp(v28, -1LL, 0x3FFFFFFFFFFFFFFFLL, 1u); bf_remquo((long long)&v21, v30, (long long)v34, (long long)v28, v20, 0, 0); if ( !v21 || v30[2] != 0x8000000000000000LL && v20 + v30[2] >= v24 - 1 ) break; } v21 &= 3u; } else { bf_set((long long)v30, (long long)v34); v21 = 0LL; } v19 = *((_DWORD *)v30 + 2); bf_mul(v30, (long long)v30, (long long)v30, v24, 0); bf_mul_2exp(v30, -2 * v25, 0x3FFFFFFFFFFFFFFFLL, 1u); v4 = (_QWORD *)(&dword_0 + 1); bf_set_ui((long long)v26, 1LL); for ( j = v22; j >= 1; --j ) { bf_set_ui((long long)v28, 2 * j - 1); bf_mul_ui(v28, (long long)v28, 2 * j, 0x3FFFFFFFFFFFFFFFLL, 1u); bf_div(v28, v30, v28, v24, 0); v4 = v26; bf_mul(v26, (long long)v26, (long long)v28, v24, 0); bf_neg_0((long long)v26); if ( j != 1 ) { v4 = v26; bf_add_si(v26, (long long)v26, 1LL, v24, 0); } } bf_delete_0(v28, (long long)v4, v5, v6, v7, v8); for ( j = 0LL; j < v25; ++j ) { bf_mul(v30, (long long)v26, (long long)v26, v24, 0); bf_mul_2exp(v26, 1LL, 0x3FFFFFFFFFFFFFFFLL, 1u); bf_add((long long)v26, (long long)v26, (long long)v30, v24, 0); v4 = (_QWORD *)(&dword_0 + 1); bf_mul_2exp(v26, 1LL, 0x3FFFFFFFFFFFFFFFLL, 1u); } bf_delete_0(v30, (long long)v4, v9, v10, v11, v12); if ( v35 ) { v4 = v26; if ( (v21 & 1) != 0 ) { bf_sqrt_sin(v35, v26, v24); *((_DWORD *)v35 + 2) = v19 ^ 1; } else { bf_add_si(v35, (long long)v26, 1LL, v24, 0); } v13 = v21 >> 1; v14 = (v21 >> 1) ^ *((int *)v35 + 2); *((_DWORD *)v35 + 2) = v14; } if ( v36 ) { v4 = v26; if ( (v21 & 1) != 0 ) { bf_add_si(v36, (long long)v26, 1LL, v24, 0); } else { bf_sqrt_sin(v36, v26, v24); *((_DWORD *)v36 + 2) = v19; } v13 = v21 >> 1; v14 = (v21 >> 1) ^ *((int *)v36 + 2); *((_DWORD *)v36 + 2) = v14; } bf_delete_0(v26, (long long)v4, v13, v14, v15, v16); return 16LL; }
bf_sincos: SUB RSP,0x108 MOV qword ptr [RSP + 0x100],RDI MOV qword ptr [RSP + 0xf8],RSI MOV qword ptr [RSP + 0xf0],RDX MOV qword ptr [RSP + 0xe8],RCX MOV RAX,qword ptr [RSP + 0xf0] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0xe0],RAX LEA RAX,[RSP + 0xb8] MOV qword ptr [RSP + 0xb0],RAX LEA RAX,[RSP + 0x88] MOV qword ptr [RSP + 0x80],RAX LEA RAX,[RSP + 0x58] MOV qword ptr [RSP + 0x50],RAX MOV RDI,qword ptr [RSP + 0xe0] MOV RSI,qword ptr [RSP + 0xb0] CALL 0x001ec260 MOV RDI,qword ptr [RSP + 0xe0] MOV RSI,qword ptr [RSP + 0x80] CALL 0x001ec260 MOV RDI,qword ptr [RSP + 0xe0] MOV RSI,qword ptr [RSP + 0x50] CALL 0x001ec260 MOV RDI,qword ptr [RSP + 0xe8] SHR RDI,0x1 CALL 0x001ef7e0 MOV qword ptr [RSP + 0x48],RAX MOV RAX,qword ptr [RSP + 0xe8] MOV RCX,qword ptr [RSP + 0x48] SHL RCX,0x1 XOR EDX,EDX DIV RCX ADD RAX,0x1 MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RSP + 0xe8] MOV RCX,qword ptr [RSP + 0x48] SHL RCX,0x1 ADD RAX,RCX ADD RAX,qword ptr [RSP + 0x30] ADD RAX,0x8 MOV qword ptr [RSP + 0x40],RAX MOV RAX,qword ptr [RSP + 0xf0] CMP qword ptr [RAX + 0x10],-0x1 JG 0x001ff756 MOV RDI,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0xf0] CALL 0x001ec5b0 MOV qword ptr [RSP + 0x28],0x0 JMP 0x001ff86d LAB_001ff756: MOV qword ptr [RSP + 0x10],0x0 LAB_001ff75f: MOV RAX,qword ptr [RSP + 0x40] MOV RCX,qword ptr [RSP + 0xf0] ADD RAX,qword ptr [RCX + 0x10] ADD RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x20],RAX MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0x20] MOV EDX,0x6 CALL 0x001f4140 MOV RDI,qword ptr [RSP + 0x80] MOV RSI,-0x1 MOV RDX,0x3fffffffffffffff MOV ECX,0x1 CALL 0x001eee00 MOV RSI,qword ptr [RSP + 0xb0] MOV RDX,qword ptr [RSP + 0xf0] MOV RCX,qword ptr [RSP + 0x80] MOV R8,qword ptr [RSP + 0x20] LEA RDI,[RSP + 0x28] XOR R9D,R9D MOV dword ptr [RSP],0x0 CALL 0x001ef710 CMP qword ptr [RSP + 0x28],0x0 JZ 0x001ff824 MOV RAX,qword ptr [RSP + 0xb0] MOV RCX,-0x8000000000000000 CMP qword ptr [RAX + 0x10],RCX JZ 0x001ff826 MOV RAX,qword ptr [RSP + 0xb0] MOV RAX,qword ptr [RAX + 0x10] ADD RAX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x40] SUB RCX,0x1 CMP RAX,RCX JL 0x001ff826 LAB_001ff824: JMP 0x001ff85f LAB_001ff826: MOV RAX,qword ptr [RSP + 0xb0] XOR ECX,ECX MOV EDI,ECX SUB RDI,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RSP + 0x10] ADD RAX,0x1 IMUL RAX,RAX,0x3 MOV ECX,0x2 CQO IDIV RCX MOV RSI,RAX CALL 0x001ed350 MOV qword ptr [RSP + 0x10],RAX JMP 0x001ff75f LAB_001ff85f: MOV RAX,qword ptr [RSP + 0x28] AND RAX,0x3 MOV qword ptr [RSP + 0x28],RAX LAB_001ff86d: MOV RAX,qword ptr [RSP + 0xb0] MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RSP + 0x1c],EAX MOV RDI,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0xb0] MOV RDX,qword ptr [RSP + 0xb0] MOV RCX,qword ptr [RSP + 0x40] XOR R8D,R8D CALL 0x001ee970 MOV RDI,qword ptr [RSP + 0xb0] IMUL RSI,qword ptr [RSP + 0x48],-0x2 MOV RDX,0x3fffffffffffffff MOV ECX,0x1 CALL 0x001eee00 MOV RDI,qword ptr [RSP + 0x50] MOV ESI,0x1 CALL 0x001ec390 MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x38],RAX LAB_001ff8dc: CMP qword ptr [RSP + 0x38],0x1 JL 0x001ff9b5 MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0x38] SHL RSI,0x1 SUB RSI,0x1 CALL 0x001ec390 MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RSP + 0x38] SHL RDX,0x1 MOV RCX,0x3fffffffffffffff MOV R8D,0x1 CALL 0x001f0ad0 MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0xb0] MOV RDX,qword ptr [RSP + 0x80] MOV RCX,qword ptr [RSP + 0x40] XOR R8D,R8D CALL 0x001f06c0 MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x50] MOV RDX,qword ptr [RSP + 0x80] MOV RCX,qword ptr [RSP + 0x40] XOR R8D,R8D CALL 0x001ee970 MOV RDI,qword ptr [RSP + 0x50] CALL 0x001f0440 CMP qword ptr [RSP + 0x38],0x1 JZ 0x001ff9a0 MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x50] MOV RCX,qword ptr [RSP + 0x40] MOV EDX,0x1 XOR R8D,R8D CALL 0x001ef570 LAB_001ff9a0: JMP 0x001ff9a2 LAB_001ff9a2: MOV RAX,qword ptr [RSP + 0x38] ADD RAX,-0x1 MOV qword ptr [RSP + 0x38],RAX JMP 0x001ff8dc LAB_001ff9b5: MOV RDI,qword ptr [RSP + 0x80] CALL 0x001ef6c0 MOV qword ptr [RSP + 0x38],0x0 LAB_001ff9cb: MOV RAX,qword ptr [RSP + 0x38] CMP RAX,qword ptr [RSP + 0x48] JGE 0x001ffa68 MOV RDI,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0x50] MOV RDX,qword ptr [RSP + 0x50] MOV RCX,qword ptr [RSP + 0x40] XOR R8D,R8D CALL 0x001ee970 MOV RDI,qword ptr [RSP + 0x50] MOV ESI,0x1 MOV RDX,0x3fffffffffffffff MOV ECX,0x1 CALL 0x001eee00 MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x50] MOV RDX,qword ptr [RSP + 0xb0] MOV RCX,qword ptr [RSP + 0x40] XOR R8D,R8D CALL 0x001f0460 MOV RDI,qword ptr [RSP + 0x50] MOV ESI,0x1 MOV RDX,0x3fffffffffffffff MOV ECX,0x1 CALL 0x001eee00 MOV RAX,qword ptr [RSP + 0x38] ADD RAX,0x1 MOV qword ptr [RSP + 0x38],RAX JMP 0x001ff9cb LAB_001ffa68: MOV RDI,qword ptr [RSP + 0xb0] CALL 0x001ef6c0 CMP qword ptr [RSP + 0xf8],0x0 JZ 0x001ffaf3 MOV RAX,qword ptr [RSP + 0x28] AND RAX,0x1 CMP RAX,0x0 JNZ 0x001ffab0 MOV RDI,qword ptr [RSP + 0xf8] MOV RSI,qword ptr [RSP + 0x50] MOV RCX,qword ptr [RSP + 0x40] MOV EDX,0x1 XOR R8D,R8D CALL 0x001ef570 JMP 0x001ffad9 LAB_001ffab0: MOV RDI,qword ptr [RSP + 0xf8] MOV RSI,qword ptr [RSP + 0x50] MOV RDX,qword ptr [RSP + 0x40] CALL 0x001ffb90 MOV ECX,dword ptr [RSP + 0x1c] XOR ECX,0x1 MOV RAX,qword ptr [RSP + 0xf8] MOV dword ptr [RAX + 0x8],ECX LAB_001ffad9: MOV RDX,qword ptr [RSP + 0x28] SAR RDX,0x1 MOV RAX,qword ptr [RSP + 0xf8] MOVSXD RCX,dword ptr [RAX + 0x8] XOR RCX,RDX MOV dword ptr [RAX + 0x8],ECX LAB_001ffaf3: CMP qword ptr [RSP + 0x100],0x0 JZ 0x001ffb6e MOV RAX,qword ptr [RSP + 0x28] AND RAX,0x1 CMP RAX,0x0 JNZ 0x001ffb35 MOV RDI,qword ptr [RSP + 0x100] MOV RSI,qword ptr [RSP + 0x50] MOV RDX,qword ptr [RSP + 0x40] CALL 0x001ffb90 MOV ECX,dword ptr [RSP + 0x1c] MOV RAX,qword ptr [RSP + 0x100] MOV dword ptr [RAX + 0x8],ECX JMP 0x001ffb54 LAB_001ffb35: MOV RDI,qword ptr [RSP + 0x100] MOV RSI,qword ptr [RSP + 0x50] MOV RCX,qword ptr [RSP + 0x40] MOV EDX,0x1 XOR R8D,R8D CALL 0x001ef570 LAB_001ffb54: MOV RDX,qword ptr [RSP + 0x28] SAR RDX,0x1 MOV RAX,qword ptr [RSP + 0x100] MOVSXD RCX,dword ptr [RAX + 0x8] XOR RCX,RDX MOV dword ptr [RAX + 0x8],ECX LAB_001ffb6e: MOV RDI,qword ptr [RSP + 0x50] CALL 0x001ef6c0 MOV EAX,0x10 ADD RSP,0x108 RET
int8 bf_sincos(long param_1,long param_2,int8 *param_3,ulong param_4) { uint uVar1; long lVar2; long local_f8; ulong local_e0; long local_d8; long local_d0; long local_c8; long local_c0; int1 *local_b8; int1 local_b0 [40]; int1 *local_88; int1 local_80 [40]; int1 *local_58; int1 local_50 [40]; int8 local_28; ulong local_20; int8 *local_18; long local_10; long local_8; local_28 = *param_3; local_58 = local_50; local_88 = local_80; local_b8 = local_b0; local_20 = param_4; local_18 = param_3; local_10 = param_2; local_8 = param_1; bf_init(local_28,local_58); bf_init(local_28,local_88); bf_init(local_28,local_b8); local_c0 = bf_isqrt(local_20 >> 1); local_d8 = local_20 / (ulong)(local_c0 << 1) + 1; local_c8 = local_20 + local_c0 * 2 + local_d8 + 8; if ((ulong)local_18[2] < 0x8000000000000000) { local_f8 = 0; while( true ) { lVar2 = local_c8 + local_18[2] + local_f8; bf_const_pi(local_88,lVar2,6); bf_mul_2exp(local_88,0xffffffffffffffff,0x3fffffffffffffff,1); bf_remquo(&local_e0,local_58,local_18,local_88,lVar2,0,0); if ((local_e0 == 0) || ((*(long *)(local_58 + 0x10) != -0x8000000000000000 && (local_c8 + -1 <= *(long *)(local_58 + 0x10) + lVar2)))) break; lVar2 = (local_f8 + 1) * 3; local_f8 = bf_max(-*(long *)(local_58 + 0x10),lVar2 / 2,lVar2 % 2); } local_e0 = local_e0 & 3; } else { bf_set(local_58,local_18,local_20 % (ulong)(local_c0 << 1)); local_e0 = 0; } uVar1 = *(uint *)(local_58 + 8); bf_mul(local_58,local_58,local_58,local_c8,0); bf_mul_2exp(local_58,local_c0 * -2,0x3fffffffffffffff,1); bf_set_ui(local_b8,1); for (local_d0 = local_d8; 0 < local_d0; local_d0 = local_d0 + -1) { bf_set_ui(local_88,local_d0 * 2 + -1); bf_mul_ui(local_88,local_88,local_d0 << 1,0x3fffffffffffffff); bf_div(local_88,local_58,local_88,local_c8); bf_mul(local_b8,local_b8,local_88,local_c8); bf_neg(local_b8); if (local_d0 != 1) { bf_add_si(local_b8,local_b8,1,local_c8,0); } } bf_delete(local_88); for (local_d0 = 0; local_d0 < local_c0; local_d0 = local_d0 + 1) { bf_mul(local_58,local_b8,local_b8,local_c8); bf_mul_2exp(local_b8,1,0x3fffffffffffffff,1); bf_add(local_b8,local_b8,local_58,local_c8); bf_mul_2exp(local_b8,1,0x3fffffffffffffff,1); } bf_delete(local_58); if (local_10 != 0) { if ((local_e0 & 1) == 0) { bf_add_si(local_10,local_b8,1,local_c8,0); } else { bf_sqrt_sin(local_10,local_b8,local_c8); *(uint *)(local_10 + 8) = uVar1 ^ 1; } *(uint *)(local_10 + 8) = *(uint *)(local_10 + 8) ^ (uint)((long)local_e0 >> 1); } if (local_8 != 0) { if ((local_e0 & 1) == 0) { bf_sqrt_sin(local_8,local_b8,local_c8); *(uint *)(local_8 + 8) = uVar1; } else { bf_add_si(local_8,local_b8,1,local_c8,0); } *(uint *)(local_8 + 8) = *(uint *)(local_8 + 8) ^ (uint)((long)local_e0 >> 1); } bf_delete(local_b8); return 0x10; }
23,426
bf_sincos
bluesky950520[P]quickjs/libbf.c
static int bf_sincos(bf_t *s, bf_t *c, const bf_t *a, limb_t prec) { bf_context_t *s1 = a->ctx; bf_t T_s, *T = &T_s; bf_t U_s, *U = &U_s; bf_t r_s, *r = &r_s; slimb_t K, prec1, i, l, mod, prec2; int is_neg; assert(c != a && s != a); bf_init(s1, T); bf_init(s1, U); bf_init(s1, r); /* XXX: precision analysis */ K = bf_isqrt(prec / 2); l = prec / (2 * K) + 1; prec1 = prec + 2 * K + l + 8; /* after the modulo reduction, -pi/4 <= T <= pi/4 */ if (a->expn <= -1) { /* abs(a) <= 0.25: no modulo reduction needed */ bf_set(T, a); mod = 0; } else { slimb_t cancel; cancel = 0; for(;;) { prec2 = prec1 + a->expn + cancel; bf_const_pi(U, prec2, BF_RNDF); bf_mul_2exp(U, -1, BF_PREC_INF, BF_RNDZ); bf_remquo(&mod, T, a, U, prec2, BF_RNDN, BF_RNDN); // printf("T.expn=%ld prec2=%ld\n", T->expn, prec2); if (mod == 0 || (T->expn != BF_EXP_ZERO && (T->expn + prec2) >= (prec1 - 1))) break; /* increase the number of bits until the precision is good enough */ cancel = bf_max(-T->expn, (cancel + 1) * 3 / 2); } mod &= 3; } is_neg = T->sign; /* compute cosm1(x) = cos(x) - 1 */ bf_mul(T, T, T, prec1, BF_RNDN); bf_mul_2exp(T, -2 * K, BF_PREC_INF, BF_RNDZ); /* Taylor expansion: -x^2/2 + x^4/4! - x^6/6! + ... */ bf_set_ui(r, 1); for(i = l ; i >= 1; i--) { bf_set_ui(U, 2 * i - 1); bf_mul_ui(U, U, 2 * i, BF_PREC_INF, BF_RNDZ); bf_div(U, T, U, prec1, BF_RNDN); bf_mul(r, r, U, prec1, BF_RNDN); bf_neg(r); if (i != 1) bf_add_si(r, r, 1, prec1, BF_RNDN); } bf_delete(U); /* undo argument reduction: cosm1(2*x)= 2*(2*cosm1(x)+cosm1(x)^2) */ for(i = 0; i < K; i++) { bf_mul(T, r, r, prec1, BF_RNDN); bf_mul_2exp(r, 1, BF_PREC_INF, BF_RNDZ); bf_add(r, r, T, prec1, BF_RNDN); bf_mul_2exp(r, 1, BF_PREC_INF, BF_RNDZ); } bf_delete(T); if (c) { if ((mod & 1) == 0) { bf_add_si(c, r, 1, prec1, BF_RNDN); } else { bf_sqrt_sin(c, r, prec1); c->sign = is_neg ^ 1; } c->sign ^= mod >> 1; } if (s) { if ((mod & 1) == 0) { bf_sqrt_sin(s, r, prec1); s->sign = is_neg; } else { bf_add_si(s, r, 1, prec1, BF_RNDN); } s->sign ^= mod >> 1; } bf_delete(r); return BF_ST_INEXACT; }
O2
c
bf_sincos: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xb8, %rsp movq %rcx, %rbx movq %rdx, %r12 movq %rsi, 0x78(%rsp) movq %rdi, 0x80(%rsp) movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 movq (%rdx), %rax movq %rax, 0x48(%rsp) andl $0x0, 0x50(%rsp) movq %rcx, 0x58(%rsp) movq %rax, 0x90(%rsp) andl $0x0, 0x98(%rsp) xorps %xmm0, %xmm0 movups %xmm0, 0x60(%rsp) movq %rcx, 0xa0(%rsp) movups %xmm0, 0xa8(%rsp) movq %rax, 0x20(%rsp) andl $0x0, 0x28(%rsp) movq %rcx, 0x30(%rsp) movups %xmm0, 0x38(%rsp) movq %rbx, %rdi shrq %rdi callq 0x7508e movq %rax, %r13 leaq (%rax,%rax), %r15 movq %rbx, %rax xorl %edx, %edx divq %r15 movq %rax, %rbp leaq (%rbx,%r13,2), %rax leaq (%rax,%rbp), %rcx addq $0x9, %rcx movq %rcx, 0x8(%rsp) movq 0x10(%r12), %r14 testq %r14, %r14 js 0x7db9b movq %r15, 0x70(%rsp) addq %rbp, %rax incq %rax addq $0x7, %rax movq %rax, 0x18(%rsp) movq %r12, %rbx xorl %ecx, %ecx movq 0x8(%rsp), %rax movq %rcx, 0x10(%rsp) addq %rcx, %rax addq %rax, %r14 leaq 0x90(%rsp), %r15 movq %r15, %rdi movq %r14, %rsi pushq $0x6 popq %rdx callq 0x77ca8 movq %r15, %rdi pushq $-0x1 popq %rsi movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF pushq $0x1 popq %rcx callq 0x74b92 andl $0x0, (%rsp) leaq 0x88(%rsp), %rdi leaq 0x48(%rsp), %rsi movq %rbx, %r12 movq %rbx, %rdx movq %r15, %rcx movq %r14, %r8 xorl %r9d, %r9d callq 0x7502b movq 0x88(%rsp), %rax testq %rax, %rax je 0x7db8c movq 0x58(%rsp), %rcx movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000 cmpq %rdx, %rcx je 0x7db60 addq %rcx, %r14 cmpq 0x18(%rsp), %r14 jge 0x7db8c negq %rcx movq 0x10(%rsp), %rax leaq (%rax,%rax,2), %rax addq $0x3, %rax cqto pushq $0x2 popq %rsi idivq %rsi cmpq %rax, %rcx cmovleq %rax, %rcx movq %r12, %rbx movq 0x10(%r12), %r14 jmp 0x7dad2 andl $0x3, %eax movq %rax, 0x10(%rsp) movq 0x70(%rsp), %r15 jmp 0x7dbb1 leaq 0x48(%rsp), %rdi movq %r12, %rsi callq 0x73216 movq $0x0, 0x10(%rsp) incq %rbp leaq 0x48(%rsp), %rbx movl 0x8(%rbx), %eax movl %eax, 0x18(%rsp) movq %rbx, %rdi movq %rbx, %rsi movq %rbx, %rdx movq 0x8(%rsp), %rcx xorl %r8d, %r8d callq 0x74959 negq %r15 pushq $0x1 popq %rcx movq %rbx, %rdi movq %r15, %rsi movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF callq 0x74b92 leaq 0x20(%rsp), %r14 pushq $0x1 popq %rsi movq %r14, %rdi callq 0x73106 leaq 0x90(%rsp), %rbx movq 0x8(%rsp), %r15 testq %rbp, %rbp jle 0x7dc9e leaq (,%rbp,2), %r12 leaq -0x1(,%rbp,2), %rsi movq %rbx, %rdi callq 0x73106 movq %rbx, %rdi movq %rbx, %rsi movq %r12, %rdx movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF pushq $0x1 popq %r8 callq 0x75ada movq %rbx, %rdi leaq 0x48(%rsp), %rsi movq %rbx, %rdx movq %r15, %rcx xorl %r8d, %r8d callq 0x758a2 movq %r14, %rdi movq %r14, %rsi movq %rbx, %rdx movq %r15, %rcx xorl %r8d, %r8d callq 0x74959 xorb $0x1, 0x28(%rsp) cmpq $0x1, %rbp je 0x7dc96 movq %r14, %rdi movq %r14, %rsi pushq $0x1 popq %rdx movq 0x8(%rsp), %rcx xorl %r8d, %r8d callq 0x74f2a decq %rbp jmp 0x7dc0e leaq 0x90(%rsp), %rdi callq 0x7500e xorl %eax, %eax testq %r13, %r13 cmovleq %rax, %r13 leaq 0x20(%rsp), %r14 movq 0x8(%rsp), %rbx pushq $0x1 popq %r12 movabsq $0x3fffffffffffffff, %r15 # imm = 0x3FFFFFFFFFFFFFFF leaq 0x48(%rsp), %rdi subq $0x1, %r13 jb 0x7dd2c movq %r14, %rsi movq %r14, %rdx movq %rbx, %rcx xorl %r8d, %r8d callq 0x74959 movq %r14, %rdi movq %r12, %rsi movq %r15, %rdx movq %r13, %rbp pushq $0x1 popq %r13 movl %r13d, %ecx callq 0x74b92 movq %r14, %rdi movq %r14, %rsi leaq 0x48(%rsp), %rdx movq %rbx, %rcx xorl %r8d, %r8d callq 0x757f9 movq %r14, %rdi movq %r12, %rsi movq %r15, %rdx movl %r13d, %ecx movq %rbp, %r13 callq 0x74b92 jmp 0x7dccc callq 0x7500e movq 0x78(%rsp), %r14 testq %r14, %r14 movq 0x80(%rsp), %rbx movq 0x10(%rsp), %rdx je 0x7dd8e leaq 0x20(%rsp), %rsi testb $0x1, %dl jne 0x7dd6b pushq $0x1 popq %rdx movq %r14, %rdi movq 0x8(%rsp), %rcx xorl %r8d, %r8d callq 0x74f2a movl 0x8(%r14), %eax jmp 0x7dd7f movq %r14, %rdi movq 0x8(%rsp), %rdx callq 0x7ddee movl 0x18(%rsp), %eax xorl $0x1, %eax movq 0x10(%rsp), %rdx movl %edx, %ecx shrl %ecx xorl %eax, %ecx movl %ecx, 0x8(%r14) testq %rbx, %rbx je 0x7ddd2 leaq 0x20(%rsp), %rsi testb $0x1, %dl jne 0x7ddb0 movq %rbx, %rdi movq 0x8(%rsp), %rdx callq 0x7ddee movl 0x18(%rsp), %ecx jmp 0x7ddc6 pushq $0x1 popq %rdx movq %rbx, %rdi movq 0x8(%rsp), %rcx xorl %r8d, %r8d callq 0x74f2a movl 0x8(%rbx), %ecx movq 0x10(%rsp), %rax shrl %eax xorl %ecx, %eax movl %eax, 0x8(%rbx) leaq 0x20(%rsp), %rdi callq 0x7500e addq $0xb8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
bf_sincos: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0B8h mov rbx, rcx mov r12, rdx mov [rsp+0E8h+var_70], rsi mov [rsp+0E8h+var_68], rdi mov rcx, 8000000000000000h mov rax, [rdx] mov [rsp+0E8h+var_A0], rax and [rsp+0E8h+var_98], 0 mov [rsp+0E8h+var_90], rcx mov [rsp+0E8h+var_58], rax and [rsp+0E8h+var_50], 0 xorps xmm0, xmm0 movups [rsp+0E8h+var_88], xmm0 mov [rsp+0E8h+var_48], rcx movups [rsp+0E8h+var_40], xmm0 mov [rsp+0E8h+var_C8], rax and [rsp+0E8h+var_C0], 0 mov [rsp+0E8h+var_B8], rcx movups [rsp+0E8h+var_B0], xmm0 mov rdi, rbx shr rdi, 1 call bf_isqrt mov r13, rax lea r15, [rax+rax] mov rax, rbx xor edx, edx div r15 mov rbp, rax lea rax, [rbx+r13*2] lea rcx, [rax+rbp] add rcx, 9 mov [rsp+0E8h+var_E0], rcx mov r14, [r12+10h] test r14, r14 js loc_7DB9B mov [rsp+0E8h+var_78], r15 add rax, rbp inc rax add rax, 7 mov [rsp+0E8h+var_D0], rax mov rbx, r12 xor ecx, ecx loc_7DAD2: mov rax, [rsp+0E8h+var_E0] mov [rsp+0E8h+var_D8], rcx add rax, rcx add r14, rax lea r15, [rsp+0E8h+var_58] mov rdi, r15 mov rsi, r14 push 6 pop rdx call bf_const_pi mov rdi, r15 push 0FFFFFFFFFFFFFFFFh pop rsi mov rdx, 3FFFFFFFFFFFFFFFh push 1 pop rcx call bf_mul_2exp and [rsp+0E8h+var_E8], 0 lea rdi, [rsp+0E8h+var_60] lea rsi, [rsp+0E8h+var_A0] mov r12, rbx mov rdx, rbx mov rcx, r15 mov r8, r14 xor r9d, r9d call bf_remquo mov rax, [rsp+0E8h+var_60] test rax, rax jz short loc_7DB8C mov rcx, [rsp+0E8h+var_90] mov rdx, 8000000000000000h cmp rcx, rdx jz short loc_7DB60 add r14, rcx cmp r14, [rsp+0E8h+var_D0] jge short loc_7DB8C loc_7DB60: neg rcx mov rax, [rsp+0E8h+var_D8] lea rax, [rax+rax*2] add rax, 3 cqo push 2 pop rsi idiv rsi cmp rcx, rax cmovle rcx, rax mov rbx, r12 mov r14, [r12+10h] jmp loc_7DAD2 loc_7DB8C: and eax, 3 mov [rsp+0E8h+var_D8], rax mov r15, [rsp+0E8h+var_78] jmp short loc_7DBB1 loc_7DB9B: lea rdi, [rsp+0E8h+var_A0] mov rsi, r12 call bf_set mov [rsp+0E8h+var_D8], 0 loc_7DBB1: inc rbp lea rbx, [rsp+0E8h+var_A0] mov eax, [rbx+8] mov dword ptr [rsp+0E8h+var_D0], eax mov rdi, rbx mov rsi, rbx mov rdx, rbx mov rcx, [rsp+0E8h+var_E0] xor r8d, r8d call bf_mul neg r15 push 1 pop rcx mov rdi, rbx mov rsi, r15 mov rdx, 3FFFFFFFFFFFFFFFh call bf_mul_2exp lea r14, [rsp+0E8h+var_C8] push 1 pop rsi mov rdi, r14 call bf_set_ui lea rbx, [rsp+0E8h+var_58] mov r15, [rsp+0E8h+var_E0] loc_7DC0E: test rbp, rbp jle loc_7DC9E lea r12, ds:0[rbp*2] lea rsi, ds:0FFFFFFFFFFFFFFFFh[rbp*2] mov rdi, rbx call bf_set_ui mov rdi, rbx mov rsi, rbx mov rdx, r12 mov rcx, 3FFFFFFFFFFFFFFFh push 1 pop r8 call bf_mul_ui mov rdi, rbx lea rsi, [rsp+0E8h+var_A0] mov rdx, rbx mov rcx, r15 xor r8d, r8d call bf_div mov rdi, r14 mov rsi, r14 mov rdx, rbx mov rcx, r15 xor r8d, r8d call bf_mul xor byte ptr [rsp+0E8h+var_C0], 1 cmp rbp, 1 jz short loc_7DC96 mov rdi, r14 mov rsi, r14 push 1 pop rdx mov rcx, [rsp+0E8h+var_E0] xor r8d, r8d call bf_add_si loc_7DC96: dec rbp jmp loc_7DC0E loc_7DC9E: lea rdi, [rsp+0E8h+var_58] call bf_delete_0 xor eax, eax test r13, r13 cmovle r13, rax lea r14, [rsp+0E8h+var_C8] mov rbx, [rsp+0E8h+var_E0] push 1 pop r12 mov r15, 3FFFFFFFFFFFFFFFh loc_7DCCC: lea rdi, [rsp+0E8h+var_A0] sub r13, 1 jb short loc_7DD2C mov rsi, r14 mov rdx, r14 mov rcx, rbx xor r8d, r8d call bf_mul mov rdi, r14 mov rsi, r12 mov rdx, r15 mov rbp, r13 push 1 pop r13 mov ecx, r13d call bf_mul_2exp mov rdi, r14 mov rsi, r14 lea rdx, [rsp+0E8h+var_A0] mov rcx, rbx xor r8d, r8d call bf_add mov rdi, r14 mov rsi, r12 mov rdx, r15 mov ecx, r13d mov r13, rbp call bf_mul_2exp jmp short loc_7DCCC loc_7DD2C: call bf_delete_0 mov r14, [rsp+0E8h+var_70] test r14, r14 mov rbx, [rsp+0E8h+var_68] mov rdx, [rsp+0E8h+var_D8] jz short loc_7DD8E lea rsi, [rsp+0E8h+var_C8] test dl, 1 jnz short loc_7DD6B push 1 pop rdx mov rdi, r14 mov rcx, [rsp+0E8h+var_E0] xor r8d, r8d call bf_add_si mov eax, [r14+8] jmp short loc_7DD7F loc_7DD6B: mov rdi, r14 mov rdx, [rsp+0E8h+var_E0] call bf_sqrt_sin mov eax, dword ptr [rsp+0E8h+var_D0] xor eax, 1 loc_7DD7F: mov rdx, [rsp+0E8h+var_D8] mov ecx, edx shr ecx, 1 xor ecx, eax mov [r14+8], ecx loc_7DD8E: test rbx, rbx jz short loc_7DDD2 lea rsi, [rsp+0E8h+var_C8] test dl, 1 jnz short loc_7DDB0 mov rdi, rbx mov rdx, [rsp+0E8h+var_E0] call bf_sqrt_sin mov ecx, dword ptr [rsp+0E8h+var_D0] jmp short loc_7DDC6 loc_7DDB0: push 1 pop rdx mov rdi, rbx mov rcx, [rsp+0E8h+var_E0] xor r8d, r8d call bf_add_si mov ecx, [rbx+8] loc_7DDC6: mov rax, [rsp+0E8h+var_D8] shr eax, 1 xor eax, ecx mov [rbx+8], eax loc_7DDD2: lea rdi, [rsp+0E8h+var_C8] call bf_delete_0 add rsp, 0B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long bf_sincos(long long a1, long long *a2, _QWORD *a3, unsigned long long a4) { signed long long v6; // r13 long long v7; // r15 unsigned long long v8; // rbp unsigned long long v9; // rax long long v10; // r14 long long v11; // rcx long long v12; // r14 long long v13; // rbp long long *v15; // r14 long long v16; // rbx char v17; // dl int v18; // eax int v19; // ecx long long v21; // [rsp+8h] [rbp-E0h] long long v22; // [rsp+10h] [rbp-D8h] unsigned int v23; // [rsp+10h] [rbp-D8h] long long v24; // [rsp+18h] [rbp-D0h] int v25; // [rsp+18h] [rbp-D0h] long long v26; // [rsp+20h] [rbp-C8h] BYREF int v27; // [rsp+28h] [rbp-C0h] unsigned long long v28; // [rsp+30h] [rbp-B8h] __int128 v29; // [rsp+38h] [rbp-B0h] __int128 v30; // [rsp+48h] [rbp-A0h] BYREF unsigned long long v31; // [rsp+58h] [rbp-90h] __int128 v32; // [rsp+60h] [rbp-88h] long long v33; // [rsp+70h] [rbp-78h] long long *v34; // [rsp+78h] [rbp-70h] long long v35; // [rsp+80h] [rbp-68h] long long v36; // [rsp+88h] [rbp-60h] BYREF __int128 v37; // [rsp+90h] [rbp-58h] BYREF unsigned long long v38; // [rsp+A0h] [rbp-48h] __int128 v39; // [rsp+A8h] [rbp-40h] v34 = a2; v35 = a1; *(_QWORD *)&v30 = *a3; DWORD2(v30) = 0; v31 = 0x8000000000000000LL; *(_QWORD *)&v37 = v30; DWORD2(v37) = 0; v32 = 0LL; v38 = 0x8000000000000000LL; v39 = 0LL; v26 = v30; v27 = 0; v28 = 0x8000000000000000LL; v29 = 0LL; v6 = bf_isqrt(a4 >> 1); v7 = 2 * v6; v8 = a4 / (2 * v6); v9 = a4 + 2 * v6; v21 = v9 + v8 + 9; v10 = a3[2]; if ( v10 < 0 ) { bf_set((long long)&v30, (long long)a3); v23 = 0; } else { v33 = 2 * v6; v24 = v8 + v9 + 8; v11 = 0LL; while ( 1 ) { v22 = v11; v12 = v11 + v21 + v10; bf_const_pi((long long)&v37, v12, 6u); bf_mul_2exp((long long)&v37, -1LL, 0x3FFFFFFFFFFFFFFFLL, 1u); bf_remquo((long long)&v36, (long long *)&v30, (long long)a3, (long long)&v37, v12, 0, 0); if ( !v36 || v31 != 0x8000000000000000LL && (long long)(v31 + v12) >= v24 ) break; v11 = -(long long)v31; if ( -(long long)v31 <= (3 * v22 + 3) / 2 ) v11 = (3 * v22 + 3) / 2; v10 = a3[2]; } v23 = v36 & 3; v7 = v33; } v13 = v8 + 1; v25 = DWORD2(v30); bf_mul((long long *)&v30, (long long *)&v30, (long long *)&v30, v21, 0); bf_mul_2exp((long long)&v30, -v7, 0x3FFFFFFFFFFFFFFFLL, 1u); bf_set_ui((long long)&v26, 1uLL); while ( v13 > 0 ) { bf_set_ui((long long)&v37, 2 * v13 - 1); bf_mul_ui((long long *)&v37, (long long *)&v37, 2 * v13, 0x3FFFFFFFFFFFFFFFLL, 1u); bf_div(&v37, &v30, &v37, v21, 0LL); bf_mul(&v26, &v26, (long long *)&v37, v21, 0); LOBYTE(v27) = v27 ^ 1; if ( v13 != 1 ) bf_add_si(&v26, (long long)&v26, 1LL, v21, 0); --v13; } bf_delete_0((long long *)&v37); if ( v6 <= 0 ) v6 = 0LL; while ( v6-- != 0 ) { bf_mul((long long *)&v30, &v26, &v26, v21, 0); bf_mul_2exp((long long)&v26, 1LL, 0x3FFFFFFFFFFFFFFFLL, 1u); bf_add((long long)&v26, (long long)&v26, (long long)&v30, v21, 0LL); bf_mul_2exp((long long)&v26, 1LL, 0x3FFFFFFFFFFFFFFFLL, 1u); } bf_delete_0((long long *)&v30); v15 = v34; v16 = v35; v17 = v23; if ( v34 ) { if ( (v23 & 1) != 0 ) { bf_sqrt_sin(v34, &v26, v21); v18 = v25 ^ 1; } else { bf_add_si(v34, (long long)&v26, 1LL, v21, 0); v18 = *((_DWORD *)v15 + 2); } v17 = v23; *((_DWORD *)v15 + 2) = v18 ^ (v23 >> 1); } if ( v16 ) { if ( (v17 & 1) != 0 ) { bf_add_si((long long *)v16, (long long)&v26, 1LL, v21, 0); v19 = *(_DWORD *)(v16 + 8); } else { bf_sqrt_sin(v16, &v26, v21); v19 = v25; } *(_DWORD *)(v16 + 8) = v19 ^ (v23 >> 1); } return bf_delete_0(&v26); }
bf_sincos: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xb8 MOV RBX,RCX MOV R12,RDX MOV qword ptr [RSP + 0x78],RSI MOV qword ptr [RSP + 0x80],RDI MOV RCX,-0x8000000000000000 MOV RAX,qword ptr [RDX] MOV qword ptr [RSP + 0x48],RAX AND dword ptr [RSP + 0x50],0x0 MOV qword ptr [RSP + 0x58],RCX MOV qword ptr [RSP + 0x90],RAX AND dword ptr [RSP + 0x98],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x60],XMM0 MOV qword ptr [RSP + 0xa0],RCX MOVUPS xmmword ptr [RSP + 0xa8],XMM0 MOV qword ptr [RSP + 0x20],RAX AND dword ptr [RSP + 0x28],0x0 MOV qword ptr [RSP + 0x30],RCX MOVUPS xmmword ptr [RSP + 0x38],XMM0 MOV RDI,RBX SHR RDI,0x1 CALL 0x0017508e MOV R13,RAX LEA R15,[RAX + RAX*0x1] MOV RAX,RBX XOR EDX,EDX DIV R15 MOV RBP,RAX LEA RAX,[RBX + R13*0x2] LEA RCX,[RAX + RBP*0x1] ADD RCX,0x9 MOV qword ptr [RSP + 0x8],RCX MOV R14,qword ptr [R12 + 0x10] TEST R14,R14 JS 0x0017db9b MOV qword ptr [RSP + 0x70],R15 ADD RAX,RBP INC RAX ADD RAX,0x7 MOV qword ptr [RSP + 0x18],RAX MOV RBX,R12 XOR ECX,ECX LAB_0017dad2: MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x10],RCX ADD RAX,RCX ADD R14,RAX LEA R15,[RSP + 0x90] MOV RDI,R15 MOV RSI,R14 PUSH 0x6 POP RDX CALL 0x00177ca8 MOV RDI,R15 PUSH -0x1 POP RSI MOV RDX,0x3fffffffffffffff PUSH 0x1 POP RCX CALL 0x00174b92 AND dword ptr [RSP],0x0 LEA RDI,[RSP + 0x88] LEA RSI,[RSP + 0x48] MOV R12,RBX MOV RDX,RBX MOV RCX,R15 MOV R8,R14 XOR R9D,R9D CALL 0x0017502b MOV RAX,qword ptr [RSP + 0x88] TEST RAX,RAX JZ 0x0017db8c MOV RCX,qword ptr [RSP + 0x58] MOV RDX,-0x8000000000000000 CMP RCX,RDX JZ 0x0017db60 ADD R14,RCX CMP R14,qword ptr [RSP + 0x18] JGE 0x0017db8c LAB_0017db60: NEG RCX MOV RAX,qword ptr [RSP + 0x10] LEA RAX,[RAX + RAX*0x2] ADD RAX,0x3 CQO PUSH 0x2 POP RSI IDIV RSI CMP RCX,RAX CMOVLE RCX,RAX MOV RBX,R12 MOV R14,qword ptr [R12 + 0x10] JMP 0x0017dad2 LAB_0017db8c: AND EAX,0x3 MOV qword ptr [RSP + 0x10],RAX MOV R15,qword ptr [RSP + 0x70] JMP 0x0017dbb1 LAB_0017db9b: LEA RDI,[RSP + 0x48] MOV RSI,R12 CALL 0x00173216 MOV qword ptr [RSP + 0x10],0x0 LAB_0017dbb1: INC RBP LEA RBX,[RSP + 0x48] MOV EAX,dword ptr [RBX + 0x8] MOV dword ptr [RSP + 0x18],EAX MOV RDI,RBX MOV RSI,RBX MOV RDX,RBX MOV RCX,qword ptr [RSP + 0x8] XOR R8D,R8D CALL 0x00174959 NEG R15 PUSH 0x1 POP RCX MOV RDI,RBX MOV RSI,R15 MOV RDX,0x3fffffffffffffff CALL 0x00174b92 LEA R14,[RSP + 0x20] PUSH 0x1 POP RSI MOV RDI,R14 CALL 0x00173106 LEA RBX,[RSP + 0x90] MOV R15,qword ptr [RSP + 0x8] LAB_0017dc0e: TEST RBP,RBP JLE 0x0017dc9e LEA R12,[RBP*0x2] LEA RSI,[-0x1 + RBP*0x2] MOV RDI,RBX CALL 0x00173106 MOV RDI,RBX MOV RSI,RBX MOV RDX,R12 MOV RCX,0x3fffffffffffffff PUSH 0x1 POP R8 CALL 0x00175ada MOV RDI,RBX LEA RSI,[RSP + 0x48] MOV RDX,RBX MOV RCX,R15 XOR R8D,R8D CALL 0x001758a2 MOV RDI,R14 MOV RSI,R14 MOV RDX,RBX MOV RCX,R15 XOR R8D,R8D CALL 0x00174959 XOR byte ptr [RSP + 0x28],0x1 CMP RBP,0x1 JZ 0x0017dc96 MOV RDI,R14 MOV RSI,R14 PUSH 0x1 POP RDX MOV RCX,qword ptr [RSP + 0x8] XOR R8D,R8D CALL 0x00174f2a LAB_0017dc96: DEC RBP JMP 0x0017dc0e LAB_0017dc9e: LEA RDI,[RSP + 0x90] CALL 0x0017500e XOR EAX,EAX TEST R13,R13 CMOVLE R13,RAX LEA R14,[RSP + 0x20] MOV RBX,qword ptr [RSP + 0x8] PUSH 0x1 POP R12 MOV R15,0x3fffffffffffffff LAB_0017dccc: LEA RDI,[RSP + 0x48] SUB R13,0x1 JC 0x0017dd2c MOV RSI,R14 MOV RDX,R14 MOV RCX,RBX XOR R8D,R8D CALL 0x00174959 MOV RDI,R14 MOV RSI,R12 MOV RDX,R15 MOV RBP,R13 PUSH 0x1 POP R13 MOV ECX,R13D CALL 0x00174b92 MOV RDI,R14 MOV RSI,R14 LEA RDX,[RSP + 0x48] MOV RCX,RBX XOR R8D,R8D CALL 0x001757f9 MOV RDI,R14 MOV RSI,R12 MOV RDX,R15 MOV ECX,R13D MOV R13,RBP CALL 0x00174b92 JMP 0x0017dccc LAB_0017dd2c: CALL 0x0017500e MOV R14,qword ptr [RSP + 0x78] TEST R14,R14 MOV RBX,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RSP + 0x10] JZ 0x0017dd8e LEA RSI,[RSP + 0x20] TEST DL,0x1 JNZ 0x0017dd6b PUSH 0x1 POP RDX MOV RDI,R14 MOV RCX,qword ptr [RSP + 0x8] XOR R8D,R8D CALL 0x00174f2a MOV EAX,dword ptr [R14 + 0x8] JMP 0x0017dd7f LAB_0017dd6b: MOV RDI,R14 MOV RDX,qword ptr [RSP + 0x8] CALL 0x0017ddee MOV EAX,dword ptr [RSP + 0x18] XOR EAX,0x1 LAB_0017dd7f: MOV RDX,qword ptr [RSP + 0x10] MOV ECX,EDX SHR ECX,0x1 XOR ECX,EAX MOV dword ptr [R14 + 0x8],ECX LAB_0017dd8e: TEST RBX,RBX JZ 0x0017ddd2 LEA RSI,[RSP + 0x20] TEST DL,0x1 JNZ 0x0017ddb0 MOV RDI,RBX MOV RDX,qword ptr [RSP + 0x8] CALL 0x0017ddee MOV ECX,dword ptr [RSP + 0x18] JMP 0x0017ddc6 LAB_0017ddb0: PUSH 0x1 POP RDX MOV RDI,RBX MOV RCX,qword ptr [RSP + 0x8] XOR R8D,R8D CALL 0x00174f2a MOV ECX,dword ptr [RBX + 0x8] LAB_0017ddc6: MOV RAX,qword ptr [RSP + 0x10] SHR EAX,0x1 XOR EAX,ECX MOV dword ptr [RBX + 0x8],EAX LAB_0017ddd2: LEA RDI,[RSP + 0x20] CALL 0x0017500e ADD RSP,0xb8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void bf_sincos(long param_1,long param_2,int8 *param_3,ulong param_4) { uint uVar1; long lVar2; ulong uVar3; uint uVar4; long lVar5; long lVar6; long lVar7; long lVar8; ulong uVar9; bool bVar10; ulong local_d8; int8 local_c8; uint local_c0; int8 local_b8; int8 local_b0; int8 uStack_a8; int8 local_a0; uint local_98; long local_90; int8 local_88; int8 uStack_80; ulong local_78; long local_70; long local_68; long local_60; int8 local_58; int4 local_50; int8 local_48; int8 local_40; int8 uStack_38; local_c8 = *param_3; local_98 = 0; local_90 = -0x8000000000000000; local_50 = 0; local_88 = 0; uStack_80 = 0; local_48 = 0x8000000000000000; local_40 = 0; uStack_38 = 0; local_c0 = 0; local_b8 = 0x8000000000000000; local_b0 = 0; uStack_a8 = 0; local_a0 = local_c8; local_70 = param_2; local_68 = param_1; local_58 = local_c8; lVar2 = bf_isqrt(param_4 >> 1); uVar9 = lVar2 * 2; uVar3 = param_4 / uVar9; lVar7 = param_4 + lVar2 * 2; lVar5 = lVar7 + uVar3 + 9; lVar8 = param_3[2]; if (lVar8 < 0) { bf_set(&local_a0,param_3,param_4 % uVar9); local_d8 = 0; } else { lVar6 = 0; local_78 = uVar9; while( true ) { lVar8 = lVar8 + lVar5 + lVar6; bf_const_pi(&local_58,lVar8,6); bf_mul_2exp(&local_58,0xffffffffffffffff,0x3fffffffffffffff,1); bf_remquo(&local_60,&local_a0,param_3,&local_58,lVar8,0,0); if ((local_60 == 0) || ((local_90 != -0x8000000000000000 && ((long)(lVar7 + uVar3 + 8) <= lVar8 + local_90)))) break; lVar8 = (lVar6 * 3 + 3) / 2; lVar6 = -local_90; if (-lVar8 == local_90 || -local_90 < lVar8) { lVar6 = lVar8; } lVar8 = param_3[2]; } local_d8 = (ulong)((uint)local_60 & 3); uVar9 = local_78; } uVar4 = local_98; bf_mul(&local_a0,&local_a0,&local_a0,lVar5,0); bf_mul_2exp(&local_a0,-uVar9,0x3fffffffffffffff,1); bf_set_ui(&local_c8,1); for (lVar7 = uVar3 + 1; 0 < lVar7; lVar7 = lVar7 + -1) { bf_set_ui(&local_58,lVar7 * 2 + -1); bf_mul_ui(&local_58,&local_58,lVar7 * 2,0x3fffffffffffffff); bf_div(&local_58,&local_a0,&local_58,lVar5); bf_mul(&local_c8,&local_c8,&local_58,lVar5); local_c0 = local_c0 ^ 1; if (lVar7 != 1) { bf_add_si(&local_c8,&local_c8,1,lVar5,0); } } bf_delete(&local_58); if (lVar2 < 1) { lVar2 = 0; } while( true ) { bVar10 = lVar2 == 0; lVar2 = lVar2 + -1; if (bVar10) break; bf_mul(&local_a0,&local_c8,&local_c8,lVar5); bf_mul_2exp(&local_c8,1,0x3fffffffffffffff,1); bf_add(&local_c8,&local_c8,&local_a0,lVar5); bf_mul_2exp(&local_c8,1,0x3fffffffffffffff,1); } bf_delete(&local_a0); lVar8 = local_68; lVar7 = local_70; if (local_70 != 0) { if ((local_d8 & 1) == 0) { bf_add_si(local_70,&local_c8,1,lVar5,0); uVar1 = *(uint *)(lVar7 + 8); } else { bf_sqrt_sin(local_70,&local_c8,lVar5); uVar1 = uVar4 ^ 1; } *(uint *)(lVar7 + 8) = (uint)(local_d8 >> 1) ^ uVar1; } if (lVar8 != 0) { if ((local_d8 & 1) == 0) { bf_sqrt_sin(lVar8,&local_c8,lVar5); } else { bf_add_si(lVar8,&local_c8,1,lVar5,0); uVar4 = *(uint *)(lVar8 + 8); } *(uint *)(lVar8 + 8) = (uint)(local_d8 >> 1) ^ uVar4; } bf_delete(&local_c8); return; }
23,427
bf_sincos
bluesky950520[P]quickjs/libbf.c
static int bf_sincos(bf_t *s, bf_t *c, const bf_t *a, limb_t prec) { bf_context_t *s1 = a->ctx; bf_t T_s, *T = &T_s; bf_t U_s, *U = &U_s; bf_t r_s, *r = &r_s; slimb_t K, prec1, i, l, mod, prec2; int is_neg; assert(c != a && s != a); bf_init(s1, T); bf_init(s1, U); bf_init(s1, r); /* XXX: precision analysis */ K = bf_isqrt(prec / 2); l = prec / (2 * K) + 1; prec1 = prec + 2 * K + l + 8; /* after the modulo reduction, -pi/4 <= T <= pi/4 */ if (a->expn <= -1) { /* abs(a) <= 0.25: no modulo reduction needed */ bf_set(T, a); mod = 0; } else { slimb_t cancel; cancel = 0; for(;;) { prec2 = prec1 + a->expn + cancel; bf_const_pi(U, prec2, BF_RNDF); bf_mul_2exp(U, -1, BF_PREC_INF, BF_RNDZ); bf_remquo(&mod, T, a, U, prec2, BF_RNDN, BF_RNDN); // printf("T.expn=%ld prec2=%ld\n", T->expn, prec2); if (mod == 0 || (T->expn != BF_EXP_ZERO && (T->expn + prec2) >= (prec1 - 1))) break; /* increase the number of bits until the precision is good enough */ cancel = bf_max(-T->expn, (cancel + 1) * 3 / 2); } mod &= 3; } is_neg = T->sign; /* compute cosm1(x) = cos(x) - 1 */ bf_mul(T, T, T, prec1, BF_RNDN); bf_mul_2exp(T, -2 * K, BF_PREC_INF, BF_RNDZ); /* Taylor expansion: -x^2/2 + x^4/4! - x^6/6! + ... */ bf_set_ui(r, 1); for(i = l ; i >= 1; i--) { bf_set_ui(U, 2 * i - 1); bf_mul_ui(U, U, 2 * i, BF_PREC_INF, BF_RNDZ); bf_div(U, T, U, prec1, BF_RNDN); bf_mul(r, r, U, prec1, BF_RNDN); bf_neg(r); if (i != 1) bf_add_si(r, r, 1, prec1, BF_RNDN); } bf_delete(U); /* undo argument reduction: cosm1(2*x)= 2*(2*cosm1(x)+cosm1(x)^2) */ for(i = 0; i < K; i++) { bf_mul(T, r, r, prec1, BF_RNDN); bf_mul_2exp(r, 1, BF_PREC_INF, BF_RNDZ); bf_add(r, r, T, prec1, BF_RNDN); bf_mul_2exp(r, 1, BF_PREC_INF, BF_RNDZ); } bf_delete(T); if (c) { if ((mod & 1) == 0) { bf_add_si(c, r, 1, prec1, BF_RNDN); } else { bf_sqrt_sin(c, r, prec1); c->sign = is_neg ^ 1; } c->sign ^= mod >> 1; } if (s) { if ((mod & 1) == 0) { bf_sqrt_sin(s, r, prec1); s->sign = is_neg; } else { bf_add_si(s, r, 1, prec1, BF_RNDN); } s->sign ^= mod >> 1; } bf_delete(r); return BF_ST_INEXACT; }
O3
c
bf_sincos: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xc8, %rsp movq %rcx, %rbx movq %rsi, 0xb0(%rsp) movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 movq %rdx, 0x18(%rsp) movq (%rdx), %r14 movq %r14, 0x50(%rsp) xorl %r12d, %r12d movl %r12d, 0x58(%rsp) movq %rax, 0x60(%rsp) xorps %xmm0, %xmm0 movups %xmm0, 0x68(%rsp) movq %r14, 0x78(%rsp) movl %r12d, 0x80(%rsp) movq %rax, 0x88(%rsp) movups %xmm0, 0x90(%rsp) movq %r14, 0x20(%rsp) movl %r12d, 0x28(%rsp) movq %rax, 0x30(%rsp) movups %xmm0, 0x38(%rsp) cmpq $0x2, %rcx movq %rdi, 0xb8(%rsp) jb 0x98ff0 movq %rbx, %rsi shrq %rsi bsrq %rsi, %r15 xorq $0x3f, %r15 movl %r15d, %ecx andb $0x3e, %cl shlq %cl, %rsi leaq 0x48(%rsp), %rdi callq 0x8dbb0 movq %rax, %r12 shrl %r15d movl %r15d, %ecx shrq %cl, %r12 leaq (%r12,%r12), %r13 movq %rbx, %rax xorl %edx, %edx divq %r13 movq %rax, %rbp leaq (%rbx,%r12,2), %rax leaq (%rax,%rbp), %r15 addq $0x9, %r15 movq 0x18(%rsp), %rsi movq 0x10(%rsi), %rbx testq %rbx, %rbx js 0x99156 movq %r15, 0x10(%rsp) movq %r13, 0xa8(%rsp) movq %rbp, 0xa0(%rsp) addq %rbp, %rax incq %rax addq $0x7, %rax movq %rax, 0xc0(%rsp) xorl %r13d, %r13d leaq 0x78(%rsp), %r15 movq 0x10(%rsp), %rax addq %r13, %rax addq %rax, %rbx addq $0x40, %r14 movq %r15, %rdi movq %rbx, %rsi movl $0x6, %edx movq %r14, %rcx leaq -0x68f(%rip), %r8 # 0x989e1 xorl %r9d, %r9d callq 0x910e4 movq 0x90(%rsp), %rcx testq %rcx, %rcx je 0x990a7 decq 0x88(%rsp) movq %r15, %rdi movabsq $0x3fffffffffffffff, %rsi # imm = 0x3FFFFFFFFFFFFFFF movl $0x1, %edx xorl %r8d, %r8d callq 0x8b88b movl $0x0, (%rsp) leaq 0x48(%rsp), %rdi leaq 0x50(%rsp), %rsi movq 0x18(%rsp), %r14 movq %r14, %rdx movq %r15, %rbp movq %r15, %rcx movq %rbx, %r8 xorl %r9d, %r9d callq 0x8dafd movq 0x48(%rsp), %rcx testq %rcx, %rcx je 0x9913c movq 0x60(%rsp), %rax movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000 cmpq %rdx, %rax je 0x990fc addq %rax, %rbx cmpq 0xc0(%rsp), %rbx jge 0x9913c negq %rax leaq (,%r13,2), %rcx addq %r13, %rcx leaq 0x3(,%r13,2), %rdx addq %r13, %rdx shrq $0x3f, %rdx leaq (%rdx,%rcx), %r13 addq $0x3, %r13 sarq %r13 cmpq %r13, %rax cmovgq %rax, %r13 movq 0x10(%r14), %rbx movq 0x78(%rsp), %r14 movq %rbp, %r15 jmp 0x9904c andl $0x3, %ecx movq 0xa8(%rsp), %r13 movq 0x10(%rsp), %r15 movq 0xa0(%rsp), %rbp jmp 0x99162 leaq 0x50(%rsp), %rdi callq 0x8b6e2 xorl %ecx, %ecx movq %rcx, 0x18(%rsp) leaq 0x50(%rsp), %rbx movl 0x8(%rbx), %eax movl %eax, 0x10(%rsp) movq %rbx, %rdi movq %rbx, %rsi movq %rbx, %rdx movq %r15, %rcx xorl %r8d, %r8d callq 0x8d184 movq 0x18(%rbx), %rcx testq %rcx, %rcx je 0x991cb negq %r13 movabsq $-0x3fffffffffffffff, %rax # imm = 0xC000000000000001 cmpq %rax, %r13 cmovleq %rax, %r13 movabsq $0x3fffffffffffffff, %rsi # imm = 0x3FFFFFFFFFFFFFFF cmpq %rsi, %r13 cmovgeq %rsi, %r13 leaq 0x50(%rsp), %rdi addq %r13, 0x10(%rdi) movl $0x1, %edx xorl %r8d, %r8d callq 0x8b88b leaq 0x20(%rsp), %rdi movl $0x1, %esi callq 0x8b510 movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 decq %rax cmpq %rax, %rbp jae 0x9928d incq %rbp leaq 0x78(%rsp), %rbx leaq 0x20(%rsp), %r14 leaq (,%rbp,2), %r13 leaq -0x1(,%rbp,2), %rsi movq %rbx, %rdi callq 0x8b510 movq %rbx, %rdi movq %rbx, %rsi movq %r13, %rdx movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF movl $0x1, %r8d callq 0x8ea4d movq %rbx, %rdi leaq 0x50(%rsp), %rsi movq %rbx, %rdx movq %r15, %rcx xorl %r8d, %r8d leaq -0xab4d(%rip), %r9 # 0x8e6fe callq 0x8e645 movq %r14, %rdi movq %r14, %rsi movq %rbx, %rdx movq %r15, %rcx xorl %r8d, %r8d callq 0x8d184 xorb $0x1, 0x28(%rsp) cmpq $0x1, %rbp je 0x9928d movl $0x1, %edx movq %r14, %rdi movq %r14, %rsi movq %r15, %rcx xorl %r8d, %r8d callq 0x8d9e3 decq %rbp jmp 0x991fd movq 0x78(%rsp), %rax testq %rax, %rax je 0x992ac movq 0x98(%rsp), %rsi testq %rsi, %rsi je 0x992ac movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) testq %r12, %r12 movq 0xb8(%rsp), %rbp jle 0x99354 leaq 0x50(%rsp), %rbx leaq 0x20(%rsp), %r14 leaq -0xabef(%rip), %r13 # 0x8e6df movq %rbx, %rdi movq %r14, %rsi movq %r14, %rdx movq %r15, %rcx xorl %r8d, %r8d callq 0x8d184 movq 0x38(%rsp), %rcx testq %rcx, %rcx je 0x9930b incq 0x30(%rsp) movq %r14, %rdi movabsq $0x3fffffffffffffff, %rsi # imm = 0x3FFFFFFFFFFFFFFF movl $0x1, %edx xorl %r8d, %r8d callq 0x8b88b movq %r14, %rdi movq %r14, %rsi movq %rbx, %rdx movq %r15, %rcx xorl %r8d, %r8d movq %r13, %r9 callq 0x8e645 movq 0x38(%rsp), %rcx testq %rcx, %rcx je 0x9934b incq 0x30(%rsp) movq %r14, %rdi movabsq $0x3fffffffffffffff, %rsi # imm = 0x3FFFFFFFFFFFFFFF movl $0x1, %edx xorl %r8d, %r8d callq 0x8b88b decq %r12 jne 0x992ce movq 0x50(%rsp), %rax testq %rax, %rax je 0x99370 movq 0x70(%rsp), %rsi testq %rsi, %rsi je 0x99370 movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq 0xb0(%rsp), %rbx testq %rbx, %rbx movq 0x18(%rsp), %r14 je 0x993c1 leaq 0x20(%rsp), %rsi testb $0x1, %r14b jne 0x993a5 movl $0x1, %edx movq %rbx, %rdi movq %r15, %rcx xorl %r8d, %r8d callq 0x8d9e3 movl 0x8(%rbx), %eax jmp 0x993b7 movq %rbx, %rdi movq %r15, %rdx callq 0x99430 movl 0x10(%rsp), %eax xorl $0x1, %eax movl %r14d, %ecx shrl %ecx xorl %eax, %ecx movl %ecx, 0x8(%rbx) testq %rbp, %rbp je 0x99402 leaq 0x20(%rsp), %rsi testb $0x1, %r14b jne 0x993e2 movq %rbp, %rdi movq %r15, %rdx callq 0x99430 movl 0x10(%rsp), %eax jmp 0x993f8 movl $0x1, %edx movq %rbp, %rdi movq %r15, %rcx xorl %r8d, %r8d callq 0x8d9e3 movl 0x8(%rbp), %eax shrl %r14d xorl %eax, %r14d movl %r14d, 0x8(%rbp) movq 0x20(%rsp), %rax testq %rax, %rax je 0x9941e movq 0x40(%rsp), %rsi testq %rsi, %rsi je 0x9941e movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) addq $0xc8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
bf_sincos: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0C8h mov rbx, rcx mov [rsp+0F8h+var_48], rsi mov rax, 8000000000000000h mov [rsp+0F8h+var_E0], rdx mov r14, [rdx] mov [rsp+0F8h+var_A8], r14 xor r12d, r12d mov [rsp+0F8h+var_A0], r12d mov [rsp+0F8h+var_98], rax xorps xmm0, xmm0 movups [rsp+0F8h+var_90], xmm0 mov [rsp+0F8h+var_80], r14 mov [rsp+0F8h+var_78], r12d mov [rsp+0F8h+var_70], rax movups [rsp+0F8h+var_68], xmm0 mov [rsp+0F8h+var_D8], r14 mov [rsp+0F8h+var_D0], r12d mov [rsp+0F8h+var_C8], rax movups [rsp+0F8h+var_C0], xmm0 cmp rcx, 2 mov [rsp+0F8h+var_40], rdi jb short loc_98FF0 mov rsi, rbx shr rsi, 1 bsr r15, rsi xor r15, 3Fh mov ecx, r15d and cl, 3Eh shl rsi, cl lea rdi, [rsp+0F8h+var_B0] call mp_sqrtrem1 mov r12, rax shr r15d, 1 mov ecx, r15d shr r12, cl loc_98FF0: lea r13, [r12+r12] mov rax, rbx xor edx, edx div r13 mov rbp, rax lea rax, [rbx+r12*2] lea r15, [rax+rbp] add r15, 9 mov rsi, [rsp+0F8h+var_E0] mov rbx, [rsi+10h] test rbx, rbx js loc_99156 mov [rsp+0F8h+var_E8], r15 mov [rsp+0F8h+var_50], r13 mov [rsp+0F8h+var_58], rbp add rax, rbp inc rax add rax, 7 mov [rsp+0F8h+var_38], rax xor r13d, r13d lea r15, [rsp+0F8h+var_80] loc_9904C: mov rax, [rsp+0F8h+var_E8] add rax, r13 add rbx, rax add r14, 40h ; '@' mov rdi, r15 mov rsi, rbx mov edx, 6 mov rcx, r14 lea r8, bf_const_pi_internal xor r9d, r9d call bf_const_get mov rcx, qword ptr [rsp+0F8h+var_68] test rcx, rcx jz short loc_990A7 dec [rsp+0F8h+var_70] mov rdi, r15 mov rsi, 3FFFFFFFFFFFFFFFh mov edx, 1 xor r8d, r8d call __bf_round loc_990A7: mov [rsp+0F8h+var_F8], 0 lea rdi, [rsp+0F8h+var_B0] lea rsi, [rsp+0F8h+var_A8] mov r14, [rsp+0F8h+var_E0] mov rdx, r14 mov rbp, r15 mov rcx, r15 mov r8, rbx xor r9d, r9d call bf_remquo mov rcx, [rsp+0F8h+var_B0] test rcx, rcx jz short loc_9913C mov rax, [rsp+0F8h+var_98] mov rdx, 8000000000000000h cmp rax, rdx jz short loc_990FC add rbx, rax cmp rbx, [rsp+0F8h+var_38] jge short loc_9913C loc_990FC: neg rax lea rcx, ds:0[r13*2] add rcx, r13 lea rdx, ds:3[r13*2] add rdx, r13 shr rdx, 3Fh lea r13, [rdx+rcx] add r13, 3 sar r13, 1 cmp rax, r13 cmovg r13, rax mov rbx, [r14+10h] mov r14, [rsp+0F8h+var_80] mov r15, rbp jmp loc_9904C loc_9913C: and ecx, 3 mov r13, [rsp+0F8h+var_50] mov r15, [rsp+0F8h+var_E8] mov rbp, [rsp+0F8h+var_58] jmp short loc_99162 loc_99156: lea rdi, [rsp+0F8h+var_A8] call bf_set xor ecx, ecx loc_99162: mov [rsp+0F8h+var_E0], rcx lea rbx, [rsp+0F8h+var_A8] mov eax, [rbx+8] mov dword ptr [rsp+0F8h+var_E8], eax mov rdi, rbx mov rsi, rbx mov rdx, rbx mov rcx, r15 xor r8d, r8d call bf_mul mov rcx, [rbx+18h] test rcx, rcx jz short loc_991CB neg r13 mov rax, 0C000000000000001h cmp r13, rax cmovle r13, rax mov rsi, 3FFFFFFFFFFFFFFFh cmp r13, rsi cmovge r13, rsi lea rdi, [rsp+0F8h+var_A8] add [rdi+10h], r13 mov edx, 1 xor r8d, r8d call __bf_round loc_991CB: lea rdi, [rsp+0F8h+var_D8] mov esi, 1 call bf_set_ui mov rax, 8000000000000000h dec rax cmp rbp, rax jnb loc_9928D inc rbp lea rbx, [rsp+0F8h+var_80] lea r14, [rsp+0F8h+var_D8] loc_991FD: lea r13, ds:0[rbp*2] lea rsi, ds:0FFFFFFFFFFFFFFFFh[rbp*2] mov rdi, rbx call bf_set_ui mov rdi, rbx mov rsi, rbx mov rdx, r13 mov rcx, 3FFFFFFFFFFFFFFFh mov r8d, 1 call bf_mul_ui mov rdi, rbx lea rsi, [rsp+0F8h+var_A8] mov rdx, rbx mov rcx, r15 xor r8d, r8d lea r9, __bf_div call bf_op2 mov rdi, r14 mov rsi, r14 mov rdx, rbx mov rcx, r15 xor r8d, r8d call bf_mul xor byte ptr [rsp+0F8h+var_D0], 1 cmp rbp, 1 jz short loc_9928D mov edx, 1 mov rdi, r14 mov rsi, r14 mov rcx, r15 xor r8d, r8d call bf_add_si dec rbp jmp loc_991FD loc_9928D: mov rax, [rsp+0F8h+var_80] test rax, rax jz short loc_992AC mov rsi, qword ptr [rsp+0F8h+var_68+8] test rsi, rsi jz short loc_992AC mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_992AC: test r12, r12 mov rbp, [rsp+0F8h+var_40] jle loc_99354 lea rbx, [rsp+0F8h+var_A8] lea r14, [rsp+0F8h+var_D8] lea r13, __bf_add loc_992CE: mov rdi, rbx mov rsi, r14 mov rdx, r14 mov rcx, r15 xor r8d, r8d call bf_mul mov rcx, qword ptr [rsp+0F8h+var_C0] test rcx, rcx jz short loc_9930B inc [rsp+0F8h+var_C8] mov rdi, r14 mov rsi, 3FFFFFFFFFFFFFFFh mov edx, 1 xor r8d, r8d call __bf_round loc_9930B: mov rdi, r14 mov rsi, r14 mov rdx, rbx mov rcx, r15 xor r8d, r8d mov r9, r13 call bf_op2 mov rcx, qword ptr [rsp+0F8h+var_C0] test rcx, rcx jz short loc_9934B inc [rsp+0F8h+var_C8] mov rdi, r14 mov rsi, 3FFFFFFFFFFFFFFFh mov edx, 1 xor r8d, r8d call __bf_round loc_9934B: dec r12 jnz loc_992CE loc_99354: mov rax, [rsp+0F8h+var_A8] test rax, rax jz short loc_99370 mov rsi, qword ptr [rsp+0F8h+var_90+8] test rsi, rsi jz short loc_99370 mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_99370: mov rbx, [rsp+0F8h+var_48] test rbx, rbx mov r14, [rsp+0F8h+var_E0] jz short loc_993C1 lea rsi, [rsp+0F8h+var_D8] test r14b, 1 jnz short loc_993A5 mov edx, 1 mov rdi, rbx mov rcx, r15 xor r8d, r8d call bf_add_si mov eax, [rbx+8] jmp short loc_993B7 loc_993A5: mov rdi, rbx mov rdx, r15 call bf_sqrt_sin mov eax, dword ptr [rsp+0F8h+var_E8] xor eax, 1 loc_993B7: mov ecx, r14d shr ecx, 1 xor ecx, eax mov [rbx+8], ecx loc_993C1: test rbp, rbp jz short loc_99402 lea rsi, [rsp+0F8h+var_D8] test r14b, 1 jnz short loc_993E2 mov rdi, rbp mov rdx, r15 call bf_sqrt_sin mov eax, dword ptr [rsp+0F8h+var_E8] jmp short loc_993F8 loc_993E2: mov edx, 1 mov rdi, rbp mov rcx, r15 xor r8d, r8d call bf_add_si mov eax, [rbp+8] loc_993F8: shr r14d, 1 xor r14d, eax mov [rbp+8], r14d loc_99402: mov rax, [rsp+0F8h+var_D8] test rax, rax jz short loc_9941E mov rsi, qword ptr [rsp+0F8h+var_C0+8] test rsi, rsi jz short loc_9941E mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_9941E: add rsp, 0C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long bf_sincos(long long a1, long long *a2, long long *a3, unsigned long long a4) { long long v5; // r14 signed long long v6; // r12 unsigned long long v7; // r15 long long v8; // r13 unsigned long long v9; // rbp unsigned long long v10; // rax long long v11; // r15 long long v12; // rbx long long v13; // r13 long long v14; // rbx unsigned int v15; // ecx long long v16; // r13 unsigned long long i; // rbp long long v18; // rbp long long *v19; // rbx int v20; // eax int v21; // eax long long result; // rax long long v23; // [rsp+10h] [rbp-E8h] int v24; // [rsp+10h] [rbp-E8h] unsigned int v26; // [rsp+18h] [rbp-E0h] __int128 v27; // [rsp+20h] [rbp-D8h] BYREF unsigned long long v28; // [rsp+30h] [rbp-C8h] __int128 v29; // [rsp+38h] [rbp-C0h] long long v30; // [rsp+48h] [rbp-B0h] BYREF __int128 v31; // [rsp+50h] [rbp-A8h] BYREF unsigned long long v32; // [rsp+60h] [rbp-98h] __int128 v33; // [rsp+68h] [rbp-90h] __int128 v34; // [rsp+78h] [rbp-80h] BYREF unsigned long long v35; // [rsp+88h] [rbp-70h] __int128 v36; // [rsp+90h] [rbp-68h] unsigned long long v37; // [rsp+A0h] [rbp-58h] long long v38; // [rsp+A8h] [rbp-50h] long long *v39; // [rsp+B0h] [rbp-48h] long long v40; // [rsp+B8h] [rbp-40h] long long v41; // [rsp+C0h] [rbp-38h] v39 = a2; v5 = *a3; *(_QWORD *)&v31 = v5; v6 = 0LL; DWORD2(v31) = 0; v32 = 0x8000000000000000LL; v33 = 0LL; *(_QWORD *)&v34 = v5; DWORD2(v34) = 0; v35 = 0x8000000000000000LL; v36 = 0LL; *(_QWORD *)&v27 = v5; DWORD2(v27) = 0; v28 = 0x8000000000000000LL; v29 = 0LL; v40 = a1; if ( a4 >= 2 ) { _BitScanReverse64(&v7, a4 >> 1); v6 = mp_sqrtrem1(&v30, a4 >> 1 << ((v7 ^ 0x3F) & 0x3E)) >> (((unsigned int)v7 ^ 0x3F) >> 1); } v8 = 2 * v6; v9 = a4 / (2 * v6); v10 = a4 + 2 * v6; v11 = v10 + v9 + 9; v12 = a3[2]; if ( v12 < 0 ) { bf_set(&v31, (long long)a3); v15 = 0; } else { v23 = v10 + v9 + 9; v38 = 2 * v6; v37 = v9; v41 = v9 + v10 + 8; v13 = 0LL; while ( 1 ) { v14 = v13 + v23 + v12; bf_const_get( (long long)&v34, v14, 6u, v5 + 64, (void ( *)(long long, unsigned long long))bf_const_pi_internal, 0); if ( (_QWORD)v36 ) { --v35; _bf_round((_QWORD **)&v34, 0x3FFFFFFFFFFFFFFFLL, 1u, v36, 0); } bf_remquo((long long)&v30, &v31, (long long)a3, (long long)&v34, v14, 0, 0); if ( !v30 || v32 != 0x8000000000000000LL && (long long)(v32 + v14) >= v41 ) break; v13 = (long long)(((unsigned long long)(v13 + 2 * v13 + 3) >> 63) + 3 * v13 + 3) >> 1; if ( -(long long)v32 > v13 ) v13 = -(long long)v32; v12 = a3[2]; v5 = v34; } v15 = v30 & 3; v8 = v38; v11 = v23; v9 = v37; } v26 = v15; v24 = DWORD2(v31); bf_mul(&v31, (long long)&v31, (long long)&v31, v11, 0); if ( (_QWORD)v33 ) { v16 = -v8; if ( v16 <= (long long)0xC000000000000001LL ) v16 = 0xC000000000000001LL; if ( v16 >= 0x3FFFFFFFFFFFFFFFLL ) v16 = 0x3FFFFFFFFFFFFFFFLL; v32 += v16; _bf_round((_QWORD **)&v31, 0x3FFFFFFFFFFFFFFFLL, 1u, v33, 0); } bf_set_ui((_QWORD **)&v27, 1uLL); if ( v9 < 0x7FFFFFFFFFFFFFFFLL ) { for ( i = v9 + 1; ; --i ) { bf_set_ui((_QWORD **)&v34, 2 * i - 1); bf_mul_ui(&v34, (long long)&v34, 2 * i, 0x3FFFFFFFFFFFFFFFLL, 1u); bf_op2(&v34, &v31, &v34, v11, 0LL, (long long ( *)(__int128 *))_bf_div); bf_mul(&v27, (long long)&v27, (long long)&v34, v11, 0); BYTE8(v27) ^= 1u; if ( i == 1 ) break; bf_add_si((long long *)&v27, (long long)&v27, 1LL, v11, 0); } } if ( (_QWORD)v34 && *((_QWORD *)&v36 + 1) ) (*(void ( **)(_QWORD, _QWORD, _QWORD))(v34 + 8))(*(_QWORD *)v34, *((_QWORD *)&v36 + 1), 0LL); v18 = v40; if ( v6 > 0 ) { do { bf_mul(&v31, (long long)&v27, (long long)&v27, v11, 0); if ( (_QWORD)v29 ) { ++v28; _bf_round((_QWORD **)&v27, 0x3FFFFFFFFFFFFFFFLL, 1u, v29, 0); } bf_op2(&v27, &v27, &v31, v11, 0LL, (long long ( *)(__int128 *))_bf_add); if ( (_QWORD)v29 ) { ++v28; _bf_round((_QWORD **)&v27, 0x3FFFFFFFFFFFFFFFLL, 1u, v29, 0); } --v6; } while ( v6 ); } if ( (_QWORD)v31 && *((_QWORD *)&v33 + 1) ) (*(void ( **)(_QWORD, _QWORD, _QWORD))(v31 + 8))(*(_QWORD *)v31, *((_QWORD *)&v33 + 1), 0LL); v19 = v39; if ( v39 ) { if ( (v26 & 1) != 0 ) { bf_sqrt_sin(v39, &v27, v11); v20 = v24 ^ 1; } else { bf_add_si(v39, (long long)&v27, 1LL, v11, 0); v20 = *((_DWORD *)v19 + 2); } *((_DWORD *)v19 + 2) = v20 ^ (v26 >> 1); } if ( v18 ) { if ( (v26 & 1) != 0 ) { bf_add_si((long long *)v18, (long long)&v27, 1LL, v11, 0); v21 = *(_DWORD *)(v18 + 8); } else { bf_sqrt_sin(v18, &v27, v11); v21 = v24; } *(_DWORD *)(v18 + 8) = v21 ^ (v26 >> 1); } result = v27; if ( (_QWORD)v27 && *((_QWORD *)&v29 + 1) ) return (*(long long ( **)(_QWORD, _QWORD, _QWORD))(v27 + 8))(*(_QWORD *)v27, *((_QWORD *)&v29 + 1), 0LL); return result; }
bf_sincos: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xc8 MOV RBX,RCX MOV qword ptr [RSP + 0xb0],RSI MOV RAX,-0x8000000000000000 MOV qword ptr [RSP + 0x18],RDX MOV R14,qword ptr [RDX] MOV qword ptr [RSP + 0x50],R14 XOR R12D,R12D MOV dword ptr [RSP + 0x58],R12D MOV qword ptr [RSP + 0x60],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x68],XMM0 MOV qword ptr [RSP + 0x78],R14 MOV dword ptr [RSP + 0x80],R12D MOV qword ptr [RSP + 0x88],RAX MOVUPS xmmword ptr [RSP + 0x90],XMM0 MOV qword ptr [RSP + 0x20],R14 MOV dword ptr [RSP + 0x28],R12D MOV qword ptr [RSP + 0x30],RAX MOVUPS xmmword ptr [RSP + 0x38],XMM0 CMP RCX,0x2 MOV qword ptr [RSP + 0xb8],RDI JC 0x00198ff0 MOV RSI,RBX SHR RSI,0x1 BSR R15,RSI XOR R15,0x3f MOV ECX,R15D AND CL,0x3e SHL RSI,CL LEA RDI,[RSP + 0x48] CALL 0x0018dbb0 MOV R12,RAX SHR R15D,0x1 MOV ECX,R15D SHR R12,CL LAB_00198ff0: LEA R13,[R12 + R12*0x1] MOV RAX,RBX XOR EDX,EDX DIV R13 MOV RBP,RAX LEA RAX,[RBX + R12*0x2] LEA R15,[RAX + RBP*0x1] ADD R15,0x9 MOV RSI,qword ptr [RSP + 0x18] MOV RBX,qword ptr [RSI + 0x10] TEST RBX,RBX JS 0x00199156 MOV qword ptr [RSP + 0x10],R15 MOV qword ptr [RSP + 0xa8],R13 MOV qword ptr [RSP + 0xa0],RBP ADD RAX,RBP INC RAX ADD RAX,0x7 MOV qword ptr [RSP + 0xc0],RAX XOR R13D,R13D LEA R15,[RSP + 0x78] LAB_0019904c: MOV RAX,qword ptr [RSP + 0x10] ADD RAX,R13 ADD RBX,RAX ADD R14,0x40 MOV RDI,R15 MOV RSI,RBX MOV EDX,0x6 MOV RCX,R14 LEA R8,[0x1989e1] XOR R9D,R9D CALL 0x001910e4 MOV RCX,qword ptr [RSP + 0x90] TEST RCX,RCX JZ 0x001990a7 DEC qword ptr [RSP + 0x88] MOV RDI,R15 MOV RSI,0x3fffffffffffffff MOV EDX,0x1 XOR R8D,R8D CALL 0x0018b88b LAB_001990a7: MOV dword ptr [RSP],0x0 LEA RDI,[RSP + 0x48] LEA RSI,[RSP + 0x50] MOV R14,qword ptr [RSP + 0x18] MOV RDX,R14 MOV RBP,R15 MOV RCX,R15 MOV R8,RBX XOR R9D,R9D CALL 0x0018dafd MOV RCX,qword ptr [RSP + 0x48] TEST RCX,RCX JZ 0x0019913c MOV RAX,qword ptr [RSP + 0x60] MOV RDX,-0x8000000000000000 CMP RAX,RDX JZ 0x001990fc ADD RBX,RAX CMP RBX,qword ptr [RSP + 0xc0] JGE 0x0019913c LAB_001990fc: NEG RAX LEA RCX,[R13*0x2] ADD RCX,R13 LEA RDX,[0x3 + R13*0x2] ADD RDX,R13 SHR RDX,0x3f LEA R13,[RDX + RCX*0x1] ADD R13,0x3 SAR R13,0x1 CMP RAX,R13 CMOVG R13,RAX MOV RBX,qword ptr [R14 + 0x10] MOV R14,qword ptr [RSP + 0x78] MOV R15,RBP JMP 0x0019904c LAB_0019913c: AND ECX,0x3 MOV R13,qword ptr [RSP + 0xa8] MOV R15,qword ptr [RSP + 0x10] MOV RBP,qword ptr [RSP + 0xa0] JMP 0x00199162 LAB_00199156: LEA RDI,[RSP + 0x50] CALL 0x0018b6e2 XOR ECX,ECX LAB_00199162: MOV qword ptr [RSP + 0x18],RCX LEA RBX,[RSP + 0x50] MOV EAX,dword ptr [RBX + 0x8] MOV dword ptr [RSP + 0x10],EAX MOV RDI,RBX MOV RSI,RBX MOV RDX,RBX MOV RCX,R15 XOR R8D,R8D CALL 0x0018d184 MOV RCX,qword ptr [RBX + 0x18] TEST RCX,RCX JZ 0x001991cb NEG R13 MOV RAX,-0x3fffffffffffffff CMP R13,RAX CMOVLE R13,RAX MOV RSI,0x3fffffffffffffff CMP R13,RSI CMOVGE R13,RSI LEA RDI,[RSP + 0x50] ADD qword ptr [RDI + 0x10],R13 MOV EDX,0x1 XOR R8D,R8D CALL 0x0018b88b LAB_001991cb: LEA RDI,[RSP + 0x20] MOV ESI,0x1 CALL 0x0018b510 MOV RAX,-0x8000000000000000 DEC RAX CMP RBP,RAX JNC 0x0019928d INC RBP LEA RBX,[RSP + 0x78] LEA R14,[RSP + 0x20] LAB_001991fd: LEA R13,[RBP*0x2] LEA RSI,[-0x1 + RBP*0x2] MOV RDI,RBX CALL 0x0018b510 MOV RDI,RBX MOV RSI,RBX MOV RDX,R13 MOV RCX,0x3fffffffffffffff MOV R8D,0x1 CALL 0x0018ea4d MOV RDI,RBX LEA RSI,[RSP + 0x50] MOV RDX,RBX MOV RCX,R15 XOR R8D,R8D LEA R9,[0x18e6fe] CALL 0x0018e645 MOV RDI,R14 MOV RSI,R14 MOV RDX,RBX MOV RCX,R15 XOR R8D,R8D CALL 0x0018d184 XOR byte ptr [RSP + 0x28],0x1 CMP RBP,0x1 JZ 0x0019928d MOV EDX,0x1 MOV RDI,R14 MOV RSI,R14 MOV RCX,R15 XOR R8D,R8D CALL 0x0018d9e3 DEC RBP JMP 0x001991fd LAB_0019928d: MOV RAX,qword ptr [RSP + 0x78] TEST RAX,RAX JZ 0x001992ac MOV RSI,qword ptr [RSP + 0x98] TEST RSI,RSI JZ 0x001992ac MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_001992ac: TEST R12,R12 MOV RBP,qword ptr [RSP + 0xb8] JLE 0x00199354 LEA RBX,[RSP + 0x50] LEA R14,[RSP + 0x20] LEA R13,[0x18e6df] LAB_001992ce: MOV RDI,RBX MOV RSI,R14 MOV RDX,R14 MOV RCX,R15 XOR R8D,R8D CALL 0x0018d184 MOV RCX,qword ptr [RSP + 0x38] TEST RCX,RCX JZ 0x0019930b INC qword ptr [RSP + 0x30] MOV RDI,R14 MOV RSI,0x3fffffffffffffff MOV EDX,0x1 XOR R8D,R8D CALL 0x0018b88b LAB_0019930b: MOV RDI,R14 MOV RSI,R14 MOV RDX,RBX MOV RCX,R15 XOR R8D,R8D MOV R9,R13 CALL 0x0018e645 MOV RCX,qword ptr [RSP + 0x38] TEST RCX,RCX JZ 0x0019934b INC qword ptr [RSP + 0x30] MOV RDI,R14 MOV RSI,0x3fffffffffffffff MOV EDX,0x1 XOR R8D,R8D CALL 0x0018b88b LAB_0019934b: DEC R12 JNZ 0x001992ce LAB_00199354: MOV RAX,qword ptr [RSP + 0x50] TEST RAX,RAX JZ 0x00199370 MOV RSI,qword ptr [RSP + 0x70] TEST RSI,RSI JZ 0x00199370 MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_00199370: MOV RBX,qword ptr [RSP + 0xb0] TEST RBX,RBX MOV R14,qword ptr [RSP + 0x18] JZ 0x001993c1 LEA RSI,[RSP + 0x20] TEST R14B,0x1 JNZ 0x001993a5 MOV EDX,0x1 MOV RDI,RBX MOV RCX,R15 XOR R8D,R8D CALL 0x0018d9e3 MOV EAX,dword ptr [RBX + 0x8] JMP 0x001993b7 LAB_001993a5: MOV RDI,RBX MOV RDX,R15 CALL 0x00199430 MOV EAX,dword ptr [RSP + 0x10] XOR EAX,0x1 LAB_001993b7: MOV ECX,R14D SHR ECX,0x1 XOR ECX,EAX MOV dword ptr [RBX + 0x8],ECX LAB_001993c1: TEST RBP,RBP JZ 0x00199402 LEA RSI,[RSP + 0x20] TEST R14B,0x1 JNZ 0x001993e2 MOV RDI,RBP MOV RDX,R15 CALL 0x00199430 MOV EAX,dword ptr [RSP + 0x10] JMP 0x001993f8 LAB_001993e2: MOV EDX,0x1 MOV RDI,RBP MOV RCX,R15 XOR R8D,R8D CALL 0x0018d9e3 MOV EAX,dword ptr [RBP + 0x8] LAB_001993f8: SHR R14D,0x1 XOR R14D,EAX MOV dword ptr [RBP + 0x8],R14D LAB_00199402: MOV RAX,qword ptr [RSP + 0x20] TEST RAX,RAX JZ 0x0019941e MOV RSI,qword ptr [RSP + 0x40] TEST RSI,RSI JZ 0x0019941e MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_0019941e: ADD RSP,0xc8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void bf_sincos(long param_1,long param_2,int8 *param_3,ulong param_4) { uint uVar1; uint uVar2; ulong uVar3; ulong uVar4; long lVar5; ulong uVar6; long lVar7; ulong uVar8; int8 *puVar9; long lVar10; int8 *local_d8; uint local_d0; long local_c8; long local_c0; long lStack_b8; long lStack_b0; int8 *local_a8; uint local_a0; long local_98; long local_90; long lStack_88; int8 *local_80; int4 local_78; long local_70; long local_68; long lStack_60; ulong uStack_58; ulong uStack_50; long local_48; long local_40; long lStack_38; puVar9 = (int8 *)*param_3; uVar6 = 0; local_a0 = 0; local_98 = -0x8000000000000000; local_90 = 0; lStack_88 = 0; local_78 = 0; local_70 = -0x8000000000000000; local_68 = 0; lStack_60 = 0; local_d0 = 0; local_c8 = -0x8000000000000000; local_c0 = 0; lStack_b8 = 0; local_d8 = puVar9; local_a8 = puVar9; local_80 = puVar9; local_48 = param_2; local_40 = param_1; if (1 < param_4) { uVar6 = param_4 >> 1; uVar8 = 0x3f; if (uVar6 != 0) { for (; uVar6 >> uVar8 == 0; uVar8 = uVar8 - 1) { } } uVar6 = mp_sqrtrem1(&lStack_b0,uVar6 << ((byte)(uVar8 ^ 0x3f) & 0x3e)); uVar6 = uVar6 >> ((byte)((uint)(uVar8 ^ 0x3f) >> 1) & 0x3f); } uVar8 = uVar6 * 2; uVar3 = param_4 / uVar8; lVar7 = param_4 + uVar6 * 2; lVar10 = lVar7 + uVar3 + 9; lVar5 = param_3[2]; if (lVar5 < 0) { bf_set(&local_a8,param_3,param_4 % uVar8); uVar4 = 0; } else { lStack_38 = lVar7 + uVar3 + 8; lVar7 = 0; uStack_58 = uVar3; uStack_50 = uVar8; while( true ) { lVar5 = lVar5 + lVar10 + lVar7; bf_const_get(&local_80,lVar5,6,puVar9 + 8,bf_const_pi_internal,0); if (local_68 != 0) { local_70 = local_70 + -1; __bf_round(&local_80,0x3fffffffffffffff,1,local_68,0); } bf_remquo(&lStack_b0,&local_a8,param_3,&local_80,lVar5,0,0); if ((lStack_b0 == 0) || ((local_98 != -0x8000000000000000 && (lStack_38 <= lVar5 + local_98))) ) break; lVar7 = (lVar7 * 3 - (lVar7 * 3 + 3 >> 0x3f)) + 3 >> 1; if (-lVar7 != local_98 && lVar7 <= -local_98) { lVar7 = -local_98; } lVar5 = param_3[2]; puVar9 = local_80; } uVar4 = (ulong)((uint)lStack_b0 & 3); uVar3 = uStack_58; uVar8 = uStack_50; } uVar2 = local_a0; bf_mul(&local_a8,&local_a8,&local_a8,lVar10,0); if (local_90 != 0) { lVar7 = -uVar8; if (uVar8 == 0x3fffffffffffffff || lVar7 < -0x3fffffffffffffff) { lVar7 = -0x3fffffffffffffff; } if (0x3ffffffffffffffe < lVar7) { lVar7 = 0x3fffffffffffffff; } local_98 = local_98 + lVar7; __bf_round(&local_a8,0x3fffffffffffffff,1,local_90,0); } bf_set_ui(&local_d8,1); if (uVar3 < 0x7fffffffffffffff) { lVar7 = uVar3 + 1; while( true ) { bf_set_ui(&local_80,lVar7 * 2 + -1); bf_mul_ui(&local_80,&local_80,lVar7 * 2,0x3fffffffffffffff,1); bf_op2(&local_80,&local_a8,&local_80,lVar10,0,__bf_div); bf_mul(&local_d8,&local_d8,&local_80,lVar10,0); local_d0 = local_d0 ^ 1; if (lVar7 == 1) break; bf_add_si(&local_d8,&local_d8,1,lVar10,0); lVar7 = lVar7 + -1; } } if ((local_80 != (int8 *)0x0) && (lStack_60 != 0)) { (*(code *)local_80[1])(*local_80,lStack_60,0); } lVar7 = local_40; if (0 < (long)uVar6) { do { bf_mul(&local_a8,&local_d8,&local_d8,lVar10,0); if (local_c0 != 0) { local_c8 = local_c8 + 1; __bf_round(&local_d8,0x3fffffffffffffff,1); } bf_op2(&local_d8,&local_d8,&local_a8,lVar10,0,__bf_add); if (local_c0 != 0) { local_c8 = local_c8 + 1; __bf_round(&local_d8,0x3fffffffffffffff,1); } uVar6 = uVar6 - 1; } while (uVar6 != 0); } if ((local_a8 != (int8 *)0x0) && (lStack_88 != 0)) { (*(code *)local_a8[1])(*local_a8,lStack_88,0); } lVar5 = local_48; if (local_48 != 0) { if ((uVar4 & 1) == 0) { bf_add_si(local_48,&local_d8,1,lVar10,0); uVar1 = *(uint *)(lVar5 + 8); } else { bf_sqrt_sin(local_48,&local_d8,lVar10); uVar1 = uVar2 ^ 1; } *(uint *)(lVar5 + 8) = (uint)(uVar4 >> 1) ^ uVar1; } if (lVar7 != 0) { if ((uVar4 & 1) == 0) { bf_sqrt_sin(lVar7,&local_d8,lVar10); } else { bf_add_si(lVar7,&local_d8,1,lVar10,0); uVar2 = *(uint *)(lVar7 + 8); } *(uint *)(lVar7 + 8) = (uint)uVar4 >> 1 ^ uVar2; } if ((local_d8 != (int8 *)0x0) && (lStack_b8 != 0)) { (*(code *)local_d8[1])(*local_d8,lStack_b8,0); } return; }
23,428
sha256_init
eloqsql/storage/maria/libmarias3/src/sha256-internal.c
void sha256_init(struct sha256_state *md) { md->curlen = 0; md->length = 0; md->state[0] = 0x6A09E667UL; md->state[1] = 0xBB67AE85UL; md->state[2] = 0x3C6EF372UL; md->state[3] = 0xA54FF53AUL; md->state[4] = 0x510E527FUL; md->state[5] = 0x9B05688CUL; md->state[6] = 0x1F83D9ABUL; md->state[7] = 0x5BE0CD19UL; }
O3
c
sha256_init: pushq %rbp movq %rsp, %rbp movl $0x0, 0x28(%rdi) movq $0x0, (%rdi) movaps 0x917fe(%rip), %xmm0 # 0xc5b20 movups %xmm0, 0x8(%rdi) movaps 0x91803(%rip), %xmm0 # 0xc5b30 movups %xmm0, 0x18(%rdi) popq %rbp retq
sha256_init: push rbp mov rbp, rsp mov dword ptr [rdi+28h], 0 mov qword ptr [rdi], 0 movaps xmm0, cs:xmmword_C5B20 movups xmmword ptr [rdi+8], xmm0 movaps xmm0, cs:xmmword_C5B30 movups xmmword ptr [rdi+18h], xmm0 pop rbp retn
void sha256_init(long long a1) { *(_DWORD *)(a1 + 40) = 0; *(_QWORD *)a1 = 0LL; *(_OWORD *)(a1 + 8) = xmmword_C5B20; *(_OWORD *)(a1 + 24) = xmmword_C5B30; }
sha256_init: PUSH RBP MOV RBP,RSP MOV dword ptr [RDI + 0x28],0x0 MOV qword ptr [RDI],0x0 MOVAPS XMM0,xmmword ptr [0x001c5b20] MOVUPS xmmword ptr [RDI + 0x8],XMM0 MOVAPS XMM0,xmmword ptr [0x001c5b30] MOVUPS xmmword ptr [RDI + 0x18],XMM0 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void sha256_init(int8 *param_1) { int8 uVar1; *(int4 *)(param_1 + 5) = 0; *param_1 = 0; uVar1 = _UNK_001c5b28; param_1[1] = _DAT_001c5b20; param_1[2] = uVar1; uVar1 = _UNK_001c5b38; param_1[3] = _DAT_001c5b30; param_1[4] = uVar1; return; }
23,429
common_arg::common_arg(std::initializer_list<char const*> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&))
llama.cpp/common/arg.h
common_arg( const std::initializer_list<const char *> & args, const std::string & help, void (*handler)(common_params & params) ) : args(args), help(help), handler_void(handler) {}
O3
c
common_arg::common_arg(std::initializer_list<char const*> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&)): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rcx, %r14 movq %rdx, %r15 movq %rsi, %r13 movq %rdi, %rbx leaq 0xc(%rsp), %rsi movl $0x0, (%rsi) leaq 0xb(%rsp), %rcx leaq 0xa(%rsp), %r8 movl $0x1, %edx callq 0x87978 leaq 0x38(%rbx), %rax xorl %ecx, %ecx movq %rcx, 0x40(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x30(%rbx) movq %rax, 0x48(%rbx) movq %rax, 0x50(%rbx) movq %rcx, 0x58(%rbx) leaq 0x60(%rbx), %r12 movq (%r13), %rsi movq 0x8(%r13), %rdx leaq 0x9(%rsp), %rcx movq %r12, %rdi callq 0x879fa leaq 0x90(%rbx), %rdi leaq 0xa0(%rbx), %rax xorps %xmm0, %xmm0 movups %xmm0, 0x78(%rbx) movq $0x0, 0x88(%rbx) movq %rax, 0x90(%rbx) movq (%r15), %rsi movq 0x8(%r15), %rdx addq %rsi, %rdx callq 0x2c98c movb $0x0, 0xb0(%rbx) movq %r14, 0xb8(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0xc0(%rbx) movq $0x0, 0xd0(%rbx) addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %r14 movq (%r12), %rdi testq %rdi, %rdi je 0x6901a movq 0x70(%rbx), %rsi subq %rdi, %rsi callq 0x20180 jmp 0x6901a movq %rax, %r14 leaq 0x30(%rbx), %rdi callq 0x87a40 movq %rbx, %rdi callq 0x87a40 movq %r14, %rdi callq 0x20b50 nop
_ZN10common_argC2ERKSt16initializer_listIPKcERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPFvR13common_paramsE: push r15 push r14 push r13 push r12 push rbx sub rsp, 10h mov r14, rcx mov r15, rdx mov r13, rsi mov rbx, rdi lea rsi, [rsp+38h+var_2C] mov dword ptr [rsi], 0 lea rcx, [rsp+38h+var_2D] lea r8, [rsp+38h+var_2E] mov edx, 1 call _ZNSt3setI13llama_exampleSt4lessIS0_ESaIS0_EEC2ESt16initializer_listIS0_ERKS2_RKS3_; std::set<llama_example>::set(std::initializer_list<llama_example>,std::less<llama_example> const&,std::allocator<llama_example> const&) lea rax, [rbx+38h] xor ecx, ecx mov [rbx+40h], rcx xorps xmm0, xmm0 movups xmmword ptr [rbx+30h], xmm0 mov [rbx+48h], rax mov [rbx+50h], rax mov [rbx+58h], rcx lea r12, [rbx+60h] mov rsi, [r13+0] mov rdx, [r13+8] lea rcx, [rsp+38h+var_2F] mov rdi, r12 call _ZNSt6vectorIPKcSaIS1_EEC2ESt16initializer_listIS1_ERKS2_; std::vector<char const*>::vector(std::initializer_list<char const*>,std::allocator<char const*> const&) lea rdi, [rbx+90h] lea rax, [rbx+0A0h] xorps xmm0, xmm0 movups xmmword ptr [rbx+78h], xmm0 mov qword ptr [rbx+88h], 0 mov [rbx+90h], rax mov rsi, [r15] mov rdx, [r15+8] add rdx, rsi call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov byte ptr [rbx+0B0h], 0 mov [rbx+0B8h], r14 xorps xmm0, xmm0 movups xmmword ptr [rbx+0C0h], xmm0 mov qword ptr [rbx+0D0h], 0 add rsp, 10h pop rbx pop r12 pop r13 pop r14 pop r15 retn mov r14, rax mov rdi, [r12]; void * test rdi, rdi jz short loc_6901A mov rsi, [rbx+70h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_6901A mov r14, rax loc_6901A: lea rdi, [rbx+30h] call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree() mov rdi, rbx call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree() mov rdi, r14 call __Unwind_Resume
long long common_arg::common_arg(long long a1, _QWORD *a2, long long a3, long long a4) { long long result; // rax char v7; // [rsp+9h] [rbp-2Fh] BYREF char v8; // [rsp+Ah] [rbp-2Eh] BYREF char v9; // [rsp+Bh] [rbp-2Dh] BYREF _DWORD v10[11]; // [rsp+Ch] [rbp-2Ch] BYREF v10[0] = 0; std::set<llama_example>::set(a1, v10, 1LL, &v9, &v8); *(_QWORD *)(a1 + 64) = 0LL; *(_OWORD *)(a1 + 48) = 0LL; *(_QWORD *)(a1 + 72) = a1 + 56; *(_QWORD *)(a1 + 80) = a1 + 56; *(_QWORD *)(a1 + 88) = 0LL; std::vector<char const*>::vector(a1 + 96, *a2, a2[1], &v7); *(_OWORD *)(a1 + 120) = 0LL; *(_QWORD *)(a1 + 136) = 0LL; *(_QWORD *)(a1 + 144) = a1 + 160; result = std::string::_M_construct<char *>(a1 + 144, *(_BYTE **)a3, *(_QWORD *)a3 + *(_QWORD *)(a3 + 8)); *(_BYTE *)(a1 + 176) = 0; *(_QWORD *)(a1 + 184) = a4; *(_OWORD *)(a1 + 192) = 0LL; *(_QWORD *)(a1 + 208) = 0LL; return result; }
common_arg: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x10 MOV R14,RCX MOV R15,RDX MOV R13,RSI MOV RBX,RDI LEA RSI,[RSP + 0xc] MOV dword ptr [RSI],0x0 LEA RCX,[RSP + 0xb] LEA R8,[RSP + 0xa] MOV EDX,0x1 CALL 0x00187978 LEA RAX,[RBX + 0x38] XOR ECX,ECX MOV qword ptr [RBX + 0x40],RCX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOV qword ptr [RBX + 0x48],RAX MOV qword ptr [RBX + 0x50],RAX MOV qword ptr [RBX + 0x58],RCX LEA R12,[RBX + 0x60] MOV RSI,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] LAB_00168f89: LEA RCX,[RSP + 0x9] MOV RDI,R12 CALL 0x001879fa LEA RDI,[RBX + 0x90] LEA RAX,[RBX + 0xa0] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x78],XMM0 MOV qword ptr [RBX + 0x88],0x0 MOV qword ptr [RBX + 0x90],RAX MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] ADD RDX,RSI LAB_00168fc7: CALL 0x0012c98c LAB_00168fcc: MOV byte ptr [RBX + 0xb0],0x0 MOV qword ptr [RBX + 0xb8],R14 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0xc0],XMM0 MOV qword ptr [RBX + 0xd0],0x0 ADD RSP,0x10 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* common_arg::common_arg(std::initializer_list<char const*> const&, std::__cxx11::string const&, void (*)(common_params&)) */ void __thiscall common_arg::common_arg (common_arg *this,initializer_list *param_1,string *param_2, _func_void_common_params_ptr *param_3) { int1 local_2f; int1 local_2e; int1 local_2d; int4 local_2c; local_2c = 0; std::set<llama_example,std::less<llama_example>,std::allocator<llama_example>>::set (this,&local_2c,1,&local_2d,&local_2e); *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(common_arg **)(this + 0x48) = this + 0x38; *(common_arg **)(this + 0x50) = this + 0x38; *(int8 *)(this + 0x58) = 0; /* try { // try from 00168f89 to 00168f95 has its CatchHandler @ 00169017 */ std::vector<char_const*,std::allocator<char_const*>>::vector ((vector<char_const*,std::allocator<char_const*>> *)(this + 0x60),*(int8 *)param_1 ,*(int8 *)(param_1 + 8),&local_2f); *(int8 *)(this + 0x78) = 0; *(int8 *)(this + 0x80) = 0; *(int8 *)(this + 0x88) = 0; *(common_arg **)(this + 0x90) = this + 0xa0; /* try { // try from 00168fc7 to 00168fcb has its CatchHandler @ 00168ffd */ std::__cxx11::string::_M_construct<char*> (this + 0x90,*(long *)param_2,*(long *)(param_2 + 8) + *(long *)param_2); this[0xb0] = (common_arg)0x0; *(_func_void_common_params_ptr **)(this + 0xb8) = param_3; *(int8 *)(this + 0xc0) = 0; *(int8 *)(this + 200) = 0; *(int8 *)(this + 0xd0) = 0; return; }
23,430
set_database_and_table_from_path
eloqsql/storage/maria/s3_func.c
my_bool set_database_and_table_from_path(S3_INFO *s3, const char *path) { size_t org_length= dirname_length(path); size_t length= 0; if (!org_length) return 1; s3->table.str= path+org_length; s3->table.length= strlen(s3->table.str); for (length= --org_length; length > 0 ; length --) { if (path[length-1] == FN_LIBCHAR || path[length-1] == '/') break; #ifdef FN_DEVCHAR if (path[length-1] == FN_DEVCHAR) break; #endif } if (length && (path[length] != FN_CURLIB || org_length - length != 1)) { s3->database.str= path + length; s3->database.length= org_length - length; return 0; } return 1; /* Can't find database */ }
O0
c
set_database_and_table_from_path: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x18(%rbp), %rdi callq 0xae700 movq %rax, -0x20(%rbp) movq $0x0, -0x28(%rbp) cmpq $0x0, -0x20(%rbp) jne 0x2b845 movb $0x1, -0x1(%rbp) jmp 0x2b910 movq -0x18(%rbp), %rcx addq -0x20(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x68(%rax) movq -0x10(%rbp), %rax movq 0x68(%rax), %rdi callq 0x273b0 movq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x70(%rax) movq -0x20(%rbp), %rax addq $-0x1, %rax movq %rax, -0x20(%rbp) movq %rax, -0x28(%rbp) cmpq $0x0, -0x28(%rbp) jbe 0x2b8c0 movq -0x18(%rbp), %rax movq -0x28(%rbp), %rcx subq $0x1, %rcx movsbl (%rax,%rcx), %eax cmpl $0x2f, %eax je 0x2b8ae movq -0x18(%rbp), %rax movq -0x28(%rbp), %rcx subq $0x1, %rcx movsbl (%rax,%rcx), %eax cmpl $0x2f, %eax jne 0x2b8b0 jmp 0x2b8c0 jmp 0x2b8b2 movq -0x28(%rbp), %rax addq $-0x1, %rax movq %rax, -0x28(%rbp) jmp 0x2b87d cmpq $0x0, -0x28(%rbp) je 0x2b90c movq -0x18(%rbp), %rax movq -0x28(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $0x2e, %eax jne 0x2b8e6 movq -0x20(%rbp), %rax subq -0x28(%rbp), %rax cmpq $0x1, %rax je 0x2b90c movq -0x18(%rbp), %rcx addq -0x28(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x58(%rax) movq -0x20(%rbp), %rcx subq -0x28(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x60(%rax) movb $0x0, -0x1(%rbp) jmp 0x2b910 movb $0x1, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nopl (%rax)
set_database_and_table_from_path: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rdi, [rbp+var_18] call dirname_length mov [rbp+var_20], rax mov [rbp+var_28], 0 cmp [rbp+var_20], 0 jnz short loc_2B845 mov [rbp+var_1], 1 jmp loc_2B910 loc_2B845: mov rcx, [rbp+var_18] add rcx, [rbp+var_20] mov rax, [rbp+var_10] mov [rax+68h], rcx mov rax, [rbp+var_10] mov rdi, [rax+68h] call _strlen mov rcx, rax mov rax, [rbp+var_10] mov [rax+70h], rcx mov rax, [rbp+var_20] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_20], rax mov [rbp+var_28], rax loc_2B87D: cmp [rbp+var_28], 0 jbe short loc_2B8C0 mov rax, [rbp+var_18] mov rcx, [rbp+var_28] sub rcx, 1 movsx eax, byte ptr [rax+rcx] cmp eax, 2Fh ; '/' jz short loc_2B8AE mov rax, [rbp+var_18] mov rcx, [rbp+var_28] sub rcx, 1 movsx eax, byte ptr [rax+rcx] cmp eax, 2Fh ; '/' jnz short loc_2B8B0 loc_2B8AE: jmp short loc_2B8C0 loc_2B8B0: jmp short $+2 loc_2B8B2: mov rax, [rbp+var_28] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_28], rax jmp short loc_2B87D loc_2B8C0: cmp [rbp+var_28], 0 jz short loc_2B90C mov rax, [rbp+var_18] mov rcx, [rbp+var_28] movsx eax, byte ptr [rax+rcx] cmp eax, 2Eh ; '.' jnz short loc_2B8E6 mov rax, [rbp+var_20] sub rax, [rbp+var_28] cmp rax, 1 jz short loc_2B90C loc_2B8E6: mov rcx, [rbp+var_18] add rcx, [rbp+var_28] mov rax, [rbp+var_10] mov [rax+58h], rcx mov rcx, [rbp+var_20] sub rcx, [rbp+var_28] mov rax, [rbp+var_10] mov [rax+60h], rcx mov [rbp+var_1], 0 jmp short loc_2B910 loc_2B90C: mov [rbp+var_1], 1 loc_2B910: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char set_database_and_table_from_path(_QWORD *a1, long long a2) { long long i; // [rsp+8h] [rbp-28h] long long v4; // [rsp+10h] [rbp-20h] long long v5; // [rsp+10h] [rbp-20h] v4 = dirname_length(a2); if ( !v4 ) return 1; a1[13] = v4 + a2; a1[14] = strlen(a1[13]); v5 = v4 - 1; for ( i = v5; i && *(_BYTE *)(a2 + i - 1) != 47; --i ) ; if ( !i || *(_BYTE *)(a2 + i) == 46 && v5 - i == 1 ) return 1; a1[11] = i + a2; a1[12] = v5 - i; return 0; }
set_database_and_table_from_path: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RDI,qword ptr [RBP + -0x18] CALL 0x001ae700 MOV qword ptr [RBP + -0x20],RAX MOV qword ptr [RBP + -0x28],0x0 CMP qword ptr [RBP + -0x20],0x0 JNZ 0x0012b845 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0012b910 LAB_0012b845: MOV RCX,qword ptr [RBP + -0x18] ADD RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x68],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x68] CALL 0x001273b0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x70],RCX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,-0x1 MOV qword ptr [RBP + -0x20],RAX MOV qword ptr [RBP + -0x28],RAX LAB_0012b87d: CMP qword ptr [RBP + -0x28],0x0 JBE 0x0012b8c0 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x28] SUB RCX,0x1 MOVSX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x2f JZ 0x0012b8ae MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x28] SUB RCX,0x1 MOVSX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x2f JNZ 0x0012b8b0 LAB_0012b8ae: JMP 0x0012b8c0 LAB_0012b8b0: JMP 0x0012b8b2 LAB_0012b8b2: MOV RAX,qword ptr [RBP + -0x28] ADD RAX,-0x1 MOV qword ptr [RBP + -0x28],RAX JMP 0x0012b87d LAB_0012b8c0: CMP qword ptr [RBP + -0x28],0x0 JZ 0x0012b90c MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x2e JNZ 0x0012b8e6 MOV RAX,qword ptr [RBP + -0x20] SUB RAX,qword ptr [RBP + -0x28] CMP RAX,0x1 JZ 0x0012b90c LAB_0012b8e6: MOV RCX,qword ptr [RBP + -0x18] ADD RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x58],RCX MOV RCX,qword ptr [RBP + -0x20] SUB RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x60],RCX MOV byte ptr [RBP + -0x1],0x0 JMP 0x0012b910 LAB_0012b90c: MOV byte ptr [RBP + -0x1],0x1 LAB_0012b910: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int1 set_database_and_table_from_path(long param_1,long param_2) { long lVar1; size_t sVar2; long lVar3; int1 local_9; lVar1 = dirname_length(param_2); if (lVar1 == 0) { local_9 = 1; } else { *(long *)(param_1 + 0x68) = param_2 + lVar1; sVar2 = strlen(*(char **)(param_1 + 0x68)); *(size_t *)(param_1 + 0x70) = sVar2; lVar1 = lVar1 + -1; for (lVar3 = lVar1; ((lVar3 != 0 && (*(char *)(param_2 + lVar3 + -1) != '/')) && (*(char *)(param_2 + lVar3 + -1) != '/')); lVar3 = lVar3 + -1) { } if ((lVar3 == 0) || ((*(char *)(param_2 + lVar3) == '.' && (lVar1 - lVar3 == 1)))) { local_9 = 1; } else { *(long *)(param_1 + 0x58) = param_2 + lVar3; *(long *)(param_1 + 0x60) = lVar1 - lVar3; local_9 = 0; } } return local_9; }
23,431
list_walk
eloqsql/libmariadb/libmariadb/ma_list.c
int list_walk(LIST *list, list_walk_action action, gptr argument) { int error=0; while (list) { if ((error = (*action)(list->data,argument))) return error; list= list_rest(list); } return 0; }
O0
c
list_walk: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl $0x0, -0x24(%rbp) cmpq $0x0, -0x10(%rbp) je 0x87a02 movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx movq 0x10(%rcx), %rdi movq -0x20(%rbp), %rsi callq *%rax movl %eax, -0x24(%rbp) cmpl $0x0, %eax je 0x879f4 movl -0x24(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x87a09 movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x10(%rbp) jmp 0x879cb movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
list_walk: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_24], 0 loc_879CB: cmp [rbp+var_10], 0 jz short loc_87A02 mov rax, [rbp+var_18] mov rcx, [rbp+var_10] mov rdi, [rcx+10h] mov rsi, [rbp+var_20] call rax mov [rbp+var_24], eax cmp eax, 0 jz short loc_879F4 mov eax, [rbp+var_24] mov [rbp+var_4], eax jmp short loc_87A09 loc_879F4: mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_10], rax jmp short loc_879CB loc_87A02: mov [rbp+var_4], 0 loc_87A09: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long list_walk(long long a1, long long ( *a2)(_QWORD, long long), long long a3) { unsigned int v4; // [rsp+Ch] [rbp-24h] while ( a1 ) { v4 = a2(*(_QWORD *)(a1 + 16), a3); if ( v4 ) return v4; a1 = *(_QWORD *)(a1 + 8); } return 0; }
list_walk: 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 dword ptr [RBP + -0x24],0x0 LAB_001879cb: CMP qword ptr [RBP + -0x10],0x0 JZ 0x00187a02 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RCX + 0x10] MOV RSI,qword ptr [RBP + -0x20] CALL RAX MOV dword ptr [RBP + -0x24],EAX CMP EAX,0x0 JZ 0x001879f4 MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x4],EAX JMP 0x00187a09 LAB_001879f4: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x10],RAX JMP 0x001879cb LAB_00187a02: MOV dword ptr [RBP + -0x4],0x0 LAB_00187a09: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int list_walk(long param_1,code *param_2,int8 param_3) { int iVar1; long local_18; local_18 = param_1; while( true ) { if (local_18 == 0) { return 0; } iVar1 = (*param_2)(*(int8 *)(local_18 + 0x10),param_3); if (iVar1 != 0) break; local_18 = *(long *)(local_18 + 8); } return iVar1; }
23,432
mysys_namespace::crc32c::crc32c_sse42(unsigned int, char const*, unsigned long)
eloqsql/mysys/crc32/crc32c.cc
USE_SSE42 static uint32_t crc32c_sse42(uint32_t crc, const char* buf, size_t size) { const uint8_t *p = reinterpret_cast<const uint8_t *>(buf); const uint8_t *e = p + size; uint64_t l = crc ^ 0xffffffffu; // Point x at first 16-byte aligned byte in string. This might be // just past the end of the string. const uintptr_t pval = reinterpret_cast<uintptr_t>(p); const uint8_t* x = reinterpret_cast<const uint8_t*>(ALIGN(pval, 4)); if (x <= e) // Process bytes until finished or p is 16-byte aligned while (p != x) STEP1; // Process bytes 16 at a time while ((e-p) >= 16) { Fast_CRC32(&l, &p); Fast_CRC32(&l, &p); } // Process bytes 8 at a time while ((e-p) >= 8) Fast_CRC32(&l, &p); // Process the last few bytes while (p != e) STEP1; return static_cast<uint32_t>(l ^ 0xffffffffu); }
O3
cpp
mysys_namespace::crc32c::crc32c_sse42(unsigned int, char const*, unsigned long): pushq %rbp movq %rsp, %rbp movl %edi, %eax addq %rsi, %rdx notl %eax leaq 0xf(%rsi), %rcx andq $-0x10, %rcx cmpq %rcx, %rdx setb %r8b movq %rcx, %rdi subq %rsi, %rdi sete %r9b orb %r8b, %r9b je 0xb1ff9 movq %rsi, %rcx jmp 0xb2024 leaq 0x39160(%rip), %r8 # 0xeb160 movq %rsi, %r9 movzbl %al, %r10d movzbl (%r9), %r11d incq %r9 xorl %r10d, %r11d movl (%r8,%r11,4), %r10d shrq $0x8, %rax xorq %r10, %rax cmpq %rcx, %r9 jne 0xb2003 addq %rdi, %rsi movq %rdx, %rdi subq %rcx, %rdi cmpq $0x10, %rdi jl 0xb2051 movq %rdx, %rdi subq %rsi, %rdi crc32q (%rsi), %rax crc32q 0x8(%rsi), %rax addq $0x10, %rsi addq $-0x10, %rdi cmpq $0xf, %rdi jg 0xb2036 cmpq $0x8, %rdi jl 0xb2071 movq %rdx, %rcx subq %rsi, %rcx crc32q (%rsi), %rax addq $0x8, %rsi addq $-0x8, %rcx cmpq $0x7, %rcx jg 0xb205d cmpq %rdx, %rsi je 0xb209a leaq 0x390e3(%rip), %rcx # 0xeb160 movzbl %al, %edi movzbl (%rsi), %r8d incq %rsi xorl %edi, %r8d movl (%rcx,%r8,4), %edi shrq $0x8, %rax xorq %rdi, %rax cmpq %rdx, %rsi jne 0xb207d notl %eax popq %rbp retq
_ZN15mysys_namespace6crc32cL12crc32c_sse42EjPKcm: push rbp mov rbp, rsp mov eax, edi add rdx, rsi not eax lea rcx, [rsi+0Fh] and rcx, 0FFFFFFFFFFFFFFF0h cmp rdx, rcx setb r8b mov rdi, rcx sub rdi, rsi setz r9b or r9b, r8b jz short loc_B1FF9 mov rcx, rsi jmp short loc_B2024 loc_B1FF9: lea r8, _ZN15mysys_namespace6crc32cL7table0_E; mysys_namespace::crc32c::table0_ mov r9, rsi loc_B2003: movzx r10d, al movzx r11d, byte ptr [r9] inc r9 xor r11d, r10d mov r10d, [r8+r11*4] shr rax, 8 xor rax, r10 cmp r9, rcx jnz short loc_B2003 add rsi, rdi loc_B2024: mov rdi, rdx sub rdi, rcx cmp rdi, 10h jl short loc_B2051 mov rdi, rdx sub rdi, rsi loc_B2036: crc32 rax, qword ptr [rsi] crc32 rax, qword ptr [rsi+8] add rsi, 10h add rdi, 0FFFFFFFFFFFFFFF0h cmp rdi, 0Fh jg short loc_B2036 loc_B2051: cmp rdi, 8 jl short loc_B2071 mov rcx, rdx sub rcx, rsi loc_B205D: crc32 rax, qword ptr [rsi] add rsi, 8 add rcx, 0FFFFFFFFFFFFFFF8h cmp rcx, 7 jg short loc_B205D loc_B2071: cmp rsi, rdx jz short loc_B209A lea rcx, _ZN15mysys_namespace6crc32cL7table0_E; mysys_namespace::crc32c::table0_ loc_B207D: movzx edi, al movzx r8d, byte ptr [rsi] inc rsi xor r8d, edi mov edi, [rcx+r8*4] shr rax, 8 xor rax, rdi cmp rsi, rdx jnz short loc_B207D loc_B209A: not eax pop rbp retn
long long mysys_namespace::crc32c::crc32c_sse42( mysys_namespace::crc32c *this, unsigned long long a2, const char *a3) { const char *v3; // rdx unsigned long long v4; // rax unsigned long long v5; // rcx unsigned __int8 *v6; // r9 int v7; // r11d long long v8; // rdi long long v9; // rcx int v10; // r8d v3 = &a3[a2]; v4 = (unsigned int)~(_DWORD)this; v5 = (a2 + 15) & 0xFFFFFFFFFFFFFFF0LL; if ( (unsigned long long)v3 < v5 || v5 == a2 ) { v5 = a2; } else { v6 = (unsigned __int8 *)a2; do { v7 = *v6++; v4 = mysys_namespace::crc32c::table0_[(unsigned __int8)v4 ^ v7] ^ (v4 >> 8); } while ( v6 != (unsigned __int8 *)v5 ); a2 = (a2 + 15) & 0xFFFFFFFFFFFFFFF0LL; } v8 = (long long)&v3[-v5]; if ( (long long)&v3[-v5] >= 16 ) { v8 = (long long)&v3[-a2]; do { v4 = _mm_crc32_u64(_mm_crc32_u64(v4, *(_QWORD *)a2), *(_QWORD *)(a2 + 8)); a2 += 16LL; v8 -= 16LL; } while ( v8 > 15 ); } if ( v8 >= 8 ) { v9 = (long long)&v3[-a2]; do { v4 = _mm_crc32_u64(v4, *(_QWORD *)a2); a2 += 8LL; v9 -= 8LL; } while ( v9 > 7 ); } for ( ; (const char *)a2 != v3; v4 = mysys_namespace::crc32c::table0_[(unsigned __int8)v4 ^ v10] ^ (v4 >> 8) ) v10 = *(unsigned __int8 *)a2++; return (unsigned int)~(_DWORD)v4; }
crc32c_sse42: PUSH RBP MOV RBP,RSP MOV EAX,EDI ADD RDX,RSI NOT EAX LEA RCX,[RSI + 0xf] AND RCX,-0x10 CMP RDX,RCX SETC R8B MOV RDI,RCX SUB RDI,RSI SETZ R9B OR R9B,R8B JZ 0x001b1ff9 MOV RCX,RSI JMP 0x001b2024 LAB_001b1ff9: LEA R8,[0x1eb160] MOV R9,RSI LAB_001b2003: MOVZX R10D,AL MOVZX R11D,byte ptr [R9] INC R9 XOR R11D,R10D MOV R10D,dword ptr [R8 + R11*0x4] SHR RAX,0x8 XOR RAX,R10 CMP R9,RCX JNZ 0x001b2003 ADD RSI,RDI LAB_001b2024: MOV RDI,RDX SUB RDI,RCX CMP RDI,0x10 JL 0x001b2051 MOV RDI,RDX SUB RDI,RSI LAB_001b2036: CRC32 RAX,qword ptr [RSI] CRC32 RAX,qword ptr [RSI + 0x8] ADD RSI,0x10 ADD RDI,-0x10 CMP RDI,0xf JG 0x001b2036 LAB_001b2051: CMP RDI,0x8 JL 0x001b2071 MOV RCX,RDX SUB RCX,RSI LAB_001b205d: CRC32 RAX,qword ptr [RSI] ADD RSI,0x8 ADD RCX,-0x8 CMP RCX,0x7 JG 0x001b205d LAB_001b2071: CMP RSI,RDX JZ 0x001b209a LEA RCX,[0x1eb160] LAB_001b207d: MOVZX EDI,AL MOVZX R8D,byte ptr [RSI] INC RSI XOR R8D,EDI MOV EDI,dword ptr [RCX + R8*0x4] SHR RAX,0x8 XOR RAX,RDI CMP RSI,RDX JNZ 0x001b207d LAB_001b209a: NOT EAX POP RBP RET
/* mysys_namespace::crc32c::crc32c_sse42(unsigned int, char const*, unsigned long) */ uint __thiscall mysys_namespace::crc32c::crc32c_sse42(crc32c *this,uint param_1,char *param_2,ulong param_3) { int8 uVar1; ulong uVar2; byte *pbVar3; byte *pbVar4; byte *pbVar5; int4 in_register_00000034; byte *pbVar6; long lVar7; byte *pbVar8; pbVar4 = (byte *)CONCAT44(in_register_00000034,param_1); pbVar5 = (byte *)(param_2 + (long)pbVar4); uVar2 = (ulong)~(uint)this; pbVar3 = (byte *)((ulong)(pbVar4 + 0xf) & 0xfffffffffffffff0); pbVar6 = pbVar4; if ((long)pbVar3 - (long)pbVar4 != 0 && pbVar3 <= pbVar5) { do { pbVar8 = pbVar6 + 1; uVar2 = uVar2 >> 8 ^ (ulong)*(uint *)(table0_ + (ulong)((uint)*pbVar6 ^ (uint)uVar2 & 0xff) * 4); pbVar6 = pbVar8; } while (pbVar8 != pbVar3); pbVar6 = pbVar4 + ((long)pbVar3 - (long)pbVar4); pbVar4 = pbVar3; } lVar7 = (long)pbVar5 - (long)pbVar4; if (0xf < lVar7) { lVar7 = (long)pbVar5 - (long)pbVar6; do { uVar1 = crc32(uVar2,*(int8 *)pbVar6); uVar2 = crc32(uVar1,*(int8 *)(pbVar6 + 8)); pbVar6 = pbVar6 + 0x10; lVar7 = lVar7 + -0x10; } while (0xf < lVar7); } if (7 < lVar7) { lVar7 = (long)pbVar5 - (long)pbVar6; do { uVar2 = crc32(uVar2,*(int8 *)pbVar6); pbVar6 = pbVar6 + 8; lVar7 = lVar7 + -8; } while (7 < lVar7); } for (; pbVar6 != pbVar5; pbVar6 = pbVar6 + 1) { uVar2 = uVar2 >> 8 ^ (ulong)*(uint *)(table0_ + (ulong)((uint)*pbVar6 ^ (uint)uVar2 & 0xff) * 4) ; } return ~(uint)uVar2; }
23,433
unicode_prop_ops
bluesky950520[P]quickjs/libunicode.c
static int unicode_prop_ops(CharRange *cr, ...) { va_list ap; CharRange stack[POP_STACK_LEN_MAX]; int stack_len, op, ret, i; uint32_t a; va_start(ap, cr); stack_len = 0; for(;;) { op = va_arg(ap, int); switch(op) { case POP_GC: assert(stack_len < POP_STACK_LEN_MAX); a = va_arg(ap, int); cr_init(&stack[stack_len++], cr->mem_opaque, cr->realloc_func); if (unicode_general_category1(&stack[stack_len - 1], a)) goto fail; break; case POP_PROP: assert(stack_len < POP_STACK_LEN_MAX); a = va_arg(ap, int); cr_init(&stack[stack_len++], cr->mem_opaque, cr->realloc_func); if (unicode_prop1(&stack[stack_len - 1], a)) goto fail; break; case POP_CASE: assert(stack_len < POP_STACK_LEN_MAX); a = va_arg(ap, int); cr_init(&stack[stack_len++], cr->mem_opaque, cr->realloc_func); if (unicode_case1(&stack[stack_len - 1], a)) goto fail; break; case POP_UNION: case POP_INTER: case POP_XOR: { CharRange *cr1, *cr2, *cr3; assert(stack_len >= 2); assert(stack_len < POP_STACK_LEN_MAX); cr1 = &stack[stack_len - 2]; cr2 = &stack[stack_len - 1]; cr3 = &stack[stack_len++]; cr_init(cr3, cr->mem_opaque, cr->realloc_func); if (cr_op(cr3, cr1->points, cr1->len, cr2->points, cr2->len, op - POP_UNION + CR_OP_UNION)) goto fail; cr_free(cr1); cr_free(cr2); *cr1 = *cr3; stack_len -= 2; } break; case POP_INVERT: assert(stack_len >= 1); if (cr_invert(&stack[stack_len - 1])) goto fail; break; case POP_END: goto done; default: abort(); } } done: assert(stack_len == 1); ret = cr_copy(cr, &stack[0]); cr_free(&stack[0]); return ret; fail: for(i = 0; i < stack_len; i++) cr_free(&stack[i]); return -1; }
O2
c
unicode_prop_ops: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x158, %rsp # imm = 0x158 movq %rdi, %rbx leaq 0xa0(%rsp), %rdi movq %rsi, 0x8(%rdi) movq %rdx, 0x10(%rdi) movq %rcx, 0x18(%rdi) movq %r8, 0x20(%rdi) movq %r9, 0x28(%rdi) testb %al, %al je 0x809dd movaps %xmm0, 0xd0(%rsp) movaps %xmm1, 0xe0(%rsp) movaps %xmm2, 0xf0(%rsp) movaps %xmm3, 0x100(%rsp) movaps %xmm4, 0x110(%rsp) movaps %xmm5, 0x120(%rsp) movaps %xmm6, 0x130(%rsp) movaps %xmm7, 0x140(%rsp) movabsq $0x3000000008, %rax # imm = 0x3000000008 movq %rax, (%rsp) leaq 0x190(%rsp), %rax movq %rax, 0x8(%rsp) movq %rdi, 0x10(%rsp) xorl %r15d, %r15d leaq 0x20(%rsp), %r12 leaq 0x9c9c(%rip), %r13 # 0x8a6a8 movslq %r15d, %rbp shlq $0x5, %rbp leaq (%r12,%rbp), %r14 addq $-0x20, %r14 movl (%rsp), %eax cmpq $0x28, %rax ja 0x80a34 movq %rax, %rcx addq 0x10(%rsp), %rcx addl $0x8, %eax movl %eax, (%rsp) jmp 0x80a42 movq 0x8(%rsp), %rcx leaq 0x8(%rcx), %rdx movq %rdx, 0x8(%rsp) movl (%rcx), %r9d cmpq $0x7, %r9 ja 0x80c75 movslq (%r13,%r9,4), %rdx addq %r13, %rdx movl %eax, %ecx jmpq *%rdx movq %r14, %rdi callq 0x7f6a0 testl %eax, %eax je 0x80a1b jmp 0x80c48 leaq (%rsp,%rbp), %r14 addq $0x20, %r14 movq 0x10(%rbx), %rax movq 0x18(%rbx), %rcx xorps %xmm0, %xmm0 movaps %xmm0, (%r14) movq %rax, 0x10(%r14) testq %rcx, %rcx leaq -0x1680(%rip), %rax # 0x7f411 cmoveq %rax, %rcx movq %rcx, 0x18(%r14) movq -0x38(%r14), %rsi movl -0x40(%r14), %edx movq -0x18(%r14), %rcx movl -0x20(%r14), %r8d addl $-0x3, %r9d movq %r14, %rdi callq 0x7f4b5 testl %eax, %eax jne 0x80c45 addq %rsp, %rbp addq $-0x20, %rbp decl %r15d movq 0x8(%rbp), %rsi movq 0x10(%rbp), %rdi xorl %edx, %edx callq *0x18(%rbp) movq 0x28(%rbp), %rsi movq 0x30(%rbp), %rdi xorl %edx, %edx callq *0x38(%rbp) movaps (%r14), %xmm0 movaps 0x10(%r14), %xmm1 movaps %xmm0, (%rbp) movaps %xmm1, 0x10(%rbp) jmp 0x80a0c cmpl $0x28, %eax ja 0x80b34 addq 0x10(%rsp), %rcx addl $0x8, %eax movl %eax, (%rsp) jmp 0x80b42 cmpl $0x28, %eax ja 0x80b7d addq 0x10(%rsp), %rcx addl $0x8, %eax movl %eax, (%rsp) jmp 0x80b8b cmpl $0x28, %eax ja 0x80bc3 addq 0x10(%rsp), %rcx addl $0x8, %eax movl %eax, (%rsp) jmp 0x80bd1 movq 0x8(%rsp), %rcx leaq 0x8(%rcx), %rax movq %rax, 0x8(%rsp) movl (%rcx), %esi incl %r15d leaq (%rsp,%rbp), %rdi addq $0x20, %rdi movq 0x10(%rbx), %rax movq 0x18(%rbx), %rcx xorps %xmm0, %xmm0 movaps %xmm0, (%rdi) movq %rax, 0x10(%rdi) testq %rcx, %rcx leaq -0x175a(%rip), %rax # 0x7f411 cmoveq %rax, %rcx movq %rcx, 0x18(%rdi) callq 0x80441 jmp 0x80c07 movq 0x8(%rsp), %rcx leaq 0x8(%rcx), %rax movq %rax, 0x8(%rsp) movl (%rcx), %esi incl %r15d leaq (%rsp,%rbp), %rdi addq $0x20, %rdi movq 0x10(%rbx), %rax movq 0x18(%rbx), %rcx xorps %xmm0, %xmm0 movaps %xmm0, (%rdi) movq %rax, 0x10(%rdi) testq %rcx, %rcx leaq -0x17a3(%rip), %rax # 0x7f411 cmoveq %rax, %rcx movq %rcx, 0x18(%rdi) callq 0x805c6 jmp 0x80c07 movq 0x8(%rsp), %rcx leaq 0x8(%rcx), %rax movq %rax, 0x8(%rsp) movl (%rcx), %esi incl %r15d leaq (%rsp,%rbp), %rdi addq $0x20, %rdi movq 0x10(%rbx), %rax movq 0x18(%rbx), %rcx xorps %xmm0, %xmm0 movaps %xmm0, (%rdi) movq %rax, 0x10(%rdi) testq %rcx, %rcx leaq -0x17e9(%rip), %rax # 0x7f411 cmoveq %rax, %rcx movq %rcx, 0x18(%rdi) callq 0x80c7a testl %eax, %eax je 0x80a0c jmp 0x80c48 leaq 0x20(%rsp), %r14 movq %rbx, %rdi movq %r14, %rsi callq 0x7f478 movl %eax, %ebx movq 0x8(%r14), %rsi movq 0x10(%r14), %rdi xorl %edx, %edx callq *0x18(%r14) movl %ebx, %eax addq $0x158, %rsp # imm = 0x158 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq incl %r15d xorl %r14d, %r14d testl %r15d, %r15d cmovlel %r14d, %r15d shlq $0x5, %r15 pushq $-0x1 popq %rbx cmpq %r14, %r15 je 0x80c31 movq 0x28(%rsp,%r14), %rsi movq 0x30(%rsp,%r14), %rdi xorl %edx, %edx callq *0x38(%rsp,%r14) addq $0x20, %r14 jmp 0x80c59 callq 0xe090
unicode_prop_ops: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 158h mov rbx, rdi lea rdi, [rsp+188h+var_E8] mov [rdi+8], rsi mov [rdi+10h], rdx mov [rdi+18h], rcx mov [rdi+20h], r8 mov [rdi+28h], r9 test al, al jz short loc_809DD movaps [rsp+188h+var_B8], xmm0 movaps [rsp+188h+var_A8], xmm1 movaps [rsp+188h+var_98], xmm2 movaps [rsp+188h+var_88], xmm3 movaps [rsp+188h+var_78], xmm4 movaps [rsp+188h+var_68], xmm5 movaps [rsp+188h+var_58], xmm6 movaps [rsp+188h+var_48], xmm7 loc_809DD: mov rax, 3000000008h mov [rsp+188h+var_188], rax lea rax, [rsp+188h+arg_0] mov [rsp+188h+var_180], rax mov [rsp+188h+var_178], rdi xor r15d, r15d lea r12, [rsp+188h+var_168] lea r13, jpt_80A59 loc_80A0C: movsxd rbp, r15d shl rbp, 5 lea r14, [r12+rbp] add r14, 0FFFFFFFFFFFFFFE0h loc_80A1B: mov eax, dword ptr [rsp+188h+var_188] cmp rax, 28h ; '(' ja short loc_80A34 mov rcx, rax add rcx, [rsp+188h+var_178] add eax, 8 mov dword ptr [rsp+188h+var_188], eax jmp short loc_80A42 loc_80A34: mov rcx, [rsp+188h+var_180] lea rdx, [rcx+8] mov [rsp+188h+var_180], rdx loc_80A42: mov r9d, [rcx] cmp r9, 7; switch 8 cases ja def_80A59; jumptable 0000000000080A59 default case movsxd rdx, ds:(jpt_80A59 - 8A6A8h)[r13+r9*4] add rdx, r13 mov ecx, eax jmp rdx; switch jump loc_80A5B: mov rdi, r14; jumptable 0000000000080A59 case 6 call cr_invert test eax, eax jz short loc_80A1B jmp loc_80C48 loc_80A6C: lea r14, [rsp+rbp+188h+var_188]; jumptable 0000000000080A59 cases 3-5 add r14, 20h ; ' ' mov rax, [rbx+10h] mov rcx, [rbx+18h] xorps xmm0, xmm0 movaps xmmword ptr [r14], xmm0 mov [r14+10h], rax test rcx, rcx lea rax, cr_default_realloc cmovz rcx, rax mov [r14+18h], rcx mov rsi, [r14-38h] mov edx, [r14-40h] mov rcx, [r14-18h] mov r8d, [r14-20h] add r9d, 0FFFFFFFDh mov rdi, r14 call cr_op test eax, eax jnz loc_80C45 add rbp, rsp add rbp, 0FFFFFFFFFFFFFFE0h dec r15d mov rsi, [rbp+8] mov rdi, [rbp+10h] xor edx, edx call qword ptr [rbp+18h] mov rsi, [rbp+28h] mov rdi, [rbp+30h] xor edx, edx call qword ptr [rbp+38h] movaps xmm0, xmmword ptr [r14] movaps xmm1, xmmword ptr [r14+10h] movaps xmmword ptr [rbp+0], xmm0 movaps xmmword ptr [rbp+10h], xmm1 jmp loc_80A0C loc_80AF7: cmp eax, 28h ; '('; jumptable 0000000000080A59 case 2 ja short loc_80B34 add rcx, [rsp+188h+var_178] add eax, 8 mov dword ptr [rsp+188h+var_188], eax jmp short loc_80B42 loc_80B09: cmp eax, 28h ; '('; jumptable 0000000000080A59 case 0 ja short loc_80B7D add rcx, [rsp+188h+var_178] add eax, 8 mov dword ptr [rsp+188h+var_188], eax jmp short loc_80B8B loc_80B1B: cmp eax, 28h ; '('; jumptable 0000000000080A59 case 1 ja loc_80BC3 add rcx, [rsp+188h+var_178] add eax, 8 mov dword ptr [rsp+188h+var_188], eax jmp loc_80BD1 loc_80B34: mov rcx, [rsp+188h+var_180] lea rax, [rcx+8] mov [rsp+188h+var_180], rax loc_80B42: mov esi, [rcx] inc r15d lea rdi, [rsp+rbp+188h+var_188] add rdi, 20h ; ' ' mov rax, [rbx+10h] mov rcx, [rbx+18h] xorps xmm0, xmm0 movaps xmmword ptr [rdi], xmm0 mov [rdi+10h], rax test rcx, rcx lea rax, cr_default_realloc cmovz rcx, rax mov [rdi+18h], rcx call unicode_case1 jmp loc_80C07 loc_80B7D: mov rcx, [rsp+188h+var_180] lea rax, [rcx+8] mov [rsp+188h+var_180], rax loc_80B8B: mov esi, [rcx] inc r15d lea rdi, [rsp+rbp+188h+var_188] add rdi, 20h ; ' ' mov rax, [rbx+10h] mov rcx, [rbx+18h] xorps xmm0, xmm0 movaps xmmword ptr [rdi], xmm0 mov [rdi+10h], rax test rcx, rcx lea rax, cr_default_realloc cmovz rcx, rax mov [rdi+18h], rcx call unicode_general_category1 jmp short loc_80C07 loc_80BC3: mov rcx, [rsp+188h+var_180] lea rax, [rcx+8] mov [rsp+188h+var_180], rax loc_80BD1: mov esi, [rcx] inc r15d lea rdi, [rsp+rbp+188h+var_188] add rdi, 20h ; ' ' mov rax, [rbx+10h] mov rcx, [rbx+18h] xorps xmm0, xmm0 movaps xmmword ptr [rdi], xmm0 mov [rdi+10h], rax test rcx, rcx lea rax, cr_default_realloc cmovz rcx, rax mov [rdi+18h], rcx call unicode_prop1 loc_80C07: test eax, eax jz loc_80A0C jmp short loc_80C48 loc_80C11: lea r14, [rsp+188h+var_168]; jumptable 0000000000080A59 case 7 mov rdi, rbx mov rsi, r14 call cr_copy mov ebx, eax mov rsi, [r14+8] mov rdi, [r14+10h] xor edx, edx call qword ptr [r14+18h] loc_80C31: mov eax, ebx add rsp, 158h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_80C45: inc r15d loc_80C48: xor r14d, r14d test r15d, r15d cmovle r15d, r14d shl r15, 5 push 0FFFFFFFFFFFFFFFFh pop rbx loc_80C59: cmp r15, r14 jz short loc_80C31 mov rsi, [rsp+r14+188h+var_160] mov rdi, [rsp+r14+188h+var_158] xor edx, edx call [rsp+r14+188h+var_150] add r14, 20h ; ' ' jmp short loc_80C59 def_80A59: call _abort; jumptable 0000000000080A59 default case
long long unicode_prop_ops( long long a1, long long a2, _BYTE *a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, char a15) { int *v16; // rdi long long v17; // r15 long long v18; // rbp unsigned int v19; // eax int *v20; // rcx int v21; // r9d int *v22; // r14 long long v23; // rax long long ( *v24)(long long, long long, long long); // rcx char *v25; // rbp __int128 v26; // xmm1 char *v27; // rcx char *v28; // rcx char *v29; // rcx long long v30; // rax long long ( *v31)(long long, long long, long long); // rcx int v32; // eax long long v33; // rax long long ( *v34)(long long, long long, long long); // rcx long long v35; // rax long long ( *v36)(long long, long long, long long); // rcx unsigned int v37; // ebx unsigned long long v39; // r14 long long v40; // r15 long long v41; // [rsp+0h] [rbp-188h] BYREF char *v42; // [rsp+8h] [rbp-180h] char *v43; // [rsp+10h] [rbp-178h] int v44[2]; // [rsp+20h] [rbp-168h] BYREF long long v45; // [rsp+28h] [rbp-160h] long long v46; // [rsp+30h] [rbp-158h] _QWORD v47[13]; // [rsp+38h] [rbp-150h] char v48; // [rsp+A0h] [rbp-E8h] BYREF long long v49; // [rsp+A8h] [rbp-E0h] _BYTE *v50; // [rsp+B0h] [rbp-D8h] long long v51; // [rsp+B8h] [rbp-D0h] long long v52; // [rsp+C0h] [rbp-C8h] long long v53; // [rsp+C8h] [rbp-C0h] __m128 v54; // [rsp+D0h] [rbp-B8h] __m128 v55; // [rsp+E0h] [rbp-A8h] __m128 v56; // [rsp+F0h] [rbp-98h] __m128 v57; // [rsp+100h] [rbp-88h] __m128 v58; // [rsp+110h] [rbp-78h] __m128 v59; // [rsp+120h] [rbp-68h] __m128 v60; // [rsp+130h] [rbp-58h] __m128 v61; // [rsp+140h] [rbp-48h] v54 = a7; v55 = a8; v56 = a9; v57 = a10; v58 = a11; v59 = a12; v60 = a13; v61 = a14; v16 = (int *)&v48; v49 = a2; v50 = a3; v51 = a4; v52 = a5; v53 = a6; v41 = 0x3000000008LL; v42 = &a15; v43 = &v48; v17 = 0LL; while ( 2 ) { v18 = 8LL * (int)v17; LABEL_3: v19 = v41; if ( (unsigned int)v41 > 0x28uLL ) { v20 = (int *)v42; a3 = v42 + 8; v42 += 8; } else { v20 = (int *)&v43[(unsigned int)v41]; v19 = v41 + 8; LODWORD(v41) = v41 + 8; } v21 = *v20; switch ( *v20 ) { case 0: if ( v19 > 0x28 ) { v28 = v42; v42 += 8; } else { v28 = &v43[v19]; LODWORD(v41) = v19 + 8; } a2 = *(unsigned int *)v28; v17 = (unsigned int)(v17 + 1); v16 = &v44[v18]; v33 = *(_QWORD *)(a1 + 16); v34 = *(long long ( **)(long long, long long, long long))(a1 + 24); *(_OWORD *)v16 = 0LL; *((_QWORD *)v16 + 2) = v33; if ( !v34 ) v34 = cr_default_realloc; *((_QWORD *)v16 + 3) = v34; v32 = unicode_general_category1(v16, a2); goto LABEL_31; case 1: if ( v19 > 0x28 ) { v29 = v42; v42 += 8; } else { v29 = &v43[v19]; LODWORD(v41) = v19 + 8; } a2 = *(unsigned int *)v29; v17 = (unsigned int)(v17 + 1); v16 = &v44[v18]; v35 = *(_QWORD *)(a1 + 16); v36 = *(long long ( **)(long long, long long, long long))(a1 + 24); *(_OWORD *)v16 = 0LL; *((_QWORD *)v16 + 2) = v35; if ( !v36 ) v36 = cr_default_realloc; *((_QWORD *)v16 + 3) = v36; v32 = unicode_prop1(v16, a2); goto LABEL_31; case 2: if ( v19 > 0x28 ) { v27 = v42; v42 += 8; } else { v27 = &v43[v19]; LODWORD(v41) = v19 + 8; } a2 = *(unsigned int *)v27; v17 = (unsigned int)(v17 + 1); v16 = &v44[v18]; v30 = *(_QWORD *)(a1 + 16); v31 = *(long long ( **)(long long, long long, long long))(a1 + 24); *(_OWORD *)v16 = 0LL; *((_QWORD *)v16 + 2) = v30; if ( !v31 ) v31 = cr_default_realloc; *((_QWORD *)v16 + 3) = v31; v32 = unicode_case1(v16, a2); LABEL_31: if ( v32 ) goto LABEL_36; continue; case 3: case 4: case 5: v22 = &v44[v18]; v23 = *(_QWORD *)(a1 + 16); v24 = *(long long ( **)(long long, long long, long long))(a1 + 24); *(_OWORD *)v22 = 0LL; *((_QWORD *)v22 + 2) = v23; if ( !v24 ) v24 = cr_default_realloc; *((_QWORD *)v22 + 3) = v24; if ( !(unsigned int)cr_op( (const char *)&v44[v18], *((_QWORD *)v22 - 7), *(v22 - 16), *((_QWORD *)v22 - 3), *(v22 - 8), v21 - 3) ) { v25 = (char *)&v41 + v18 * 4 - 32; v17 = (unsigned int)(v17 - 1); (*((void ( **)(_QWORD, _QWORD, _QWORD))v25 + 3))(*((_QWORD *)v25 + 2), *((_QWORD *)v25 + 1), 0LL); a2 = *((_QWORD *)v25 + 5); v16 = (int *)*((_QWORD *)v25 + 6); (*((void ( **)(int *, long long, _QWORD))v25 + 7))(v16, a2, 0LL); v26 = *((_OWORD *)v22 + 1); *(_OWORD *)v25 = *(_OWORD *)v22; *((_OWORD *)v25 + 1) = v26; continue; } v17 = (unsigned int)(v17 + 1); LABEL_36: v39 = 0LL; if ( (int)v17 <= 0 ) v17 = 0LL; v40 = 32 * v17; v37 = -1; while ( v40 != v39 ) { ((void ( *)(_QWORD, _QWORD, _QWORD))v47[v39 / 8])( v47[v39 / 8 - 1], *(long long *)((char *)&v45 + v39), 0LL); v39 += 32LL; } return v37; case 6: v16 = (int *)((char *)&v41 + v18 * 4); if ( (unsigned int)cr_invert((int *)((char *)&v41 + v18 * 4)) ) goto LABEL_36; goto LABEL_3; case 7: v37 = cr_copy(a1, v44); ((void ( *)(long long, long long, _QWORD))v47[0])(v46, v45, 0LL); return v37; default: abort((const char *)v16, a2, a3, v19); } } }
unicode_prop_ops: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x158 MOV RBX,RDI LEA RDI,[RSP + 0xa0] MOV qword ptr [RDI + 0x8],RSI MOV qword ptr [RDI + 0x10],RDX MOV qword ptr [RDI + 0x18],RCX MOV qword ptr [RDI + 0x20],R8 MOV qword ptr [RDI + 0x28],R9 TEST AL,AL JZ 0x001809dd MOVAPS xmmword ptr [RSP + 0xd0],XMM0 MOVAPS xmmword ptr [RSP + 0xe0],XMM1 MOVAPS xmmword ptr [RSP + 0xf0],XMM2 MOVAPS xmmword ptr [RSP + 0x100],XMM3 MOVAPS xmmword ptr [RSP + 0x110],XMM4 MOVAPS xmmword ptr [RSP + 0x120],XMM5 MOVAPS xmmword ptr [RSP + 0x130],XMM6 MOVAPS xmmword ptr [RSP + 0x140],XMM7 LAB_001809dd: MOV RAX,0x3000000008 MOV qword ptr [RSP],RAX LEA RAX,[RSP + 0x190] MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],RDI XOR R15D,R15D LEA R12,[RSP + 0x20] LEA R13,[0x18a6a8] LAB_00180a0c: MOVSXD RBP,R15D SHL RBP,0x5 LEA R14,[R12 + RBP*0x1] ADD R14,-0x20 LAB_00180a1b: MOV EAX,dword ptr [RSP] CMP RAX,0x28 JA 0x00180a34 MOV RCX,RAX ADD RCX,qword ptr [RSP + 0x10] ADD EAX,0x8 MOV dword ptr [RSP],EAX JMP 0x00180a42 LAB_00180a34: MOV RCX,qword ptr [RSP + 0x8] LEA RDX,[RCX + 0x8] MOV qword ptr [RSP + 0x8],RDX LAB_00180a42: MOV R9D,dword ptr [RCX] CMP R9,0x7 JA 0x00180c75 MOVSXD RDX,dword ptr [R13 + R9*0x4] ADD RDX,R13 MOV ECX,EAX switchD: JMP RDX caseD_6: MOV RDI,R14 CALL 0x0017f6a0 TEST EAX,EAX JZ 0x00180a1b JMP 0x00180c48 caseD_3: LEA R14,[RSP + RBP*0x1] ADD R14,0x20 MOV RAX,qword ptr [RBX + 0x10] MOV RCX,qword ptr [RBX + 0x18] XORPS XMM0,XMM0 MOVAPS xmmword ptr [R14],XMM0 MOV qword ptr [R14 + 0x10],RAX TEST RCX,RCX LEA RAX,[0x17f411] CMOVZ RCX,RAX MOV qword ptr [R14 + 0x18],RCX MOV RSI,qword ptr [R14 + -0x38] MOV EDX,dword ptr [R14 + -0x40] MOV RCX,qword ptr [R14 + -0x18] MOV R8D,dword ptr [R14 + -0x20] ADD R9D,-0x3 MOV RDI,R14 CALL 0x0017f4b5
/* WARNING: Type propagation algorithm not settling */ ulong unicode_prop_ops(int4 param_1,int4 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, long param_9,int8 param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { code *pcVar1; int4 uVar2; int4 uVar3; int4 uVar4; char in_AL; uint uVar5; int iVar6; uint uVar7; ulong uVar8; int *piVar9; code *pcVar10; long lVar11; long lVar12; int8 *puVar13; ulong uVar14; ulong uVar15; int4 local_1a8 [2]; int8 local_1a0; code *pcStack_198; ulong uStack_190; ulong local_188; int *local_180 [3]; int8 local_168; int8 uStack_160; code *local_158 [14]; int1 local_e8 [8]; int8 local_e0; int8 local_d8; int8 local_d0; int8 local_c8; int8 local_c0; int4 local_b8; int4 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; local_e0 = param_10; local_d8 = param_11; local_d0 = param_12; local_c8 = param_13; local_c0 = param_14; if (in_AL != '\0') { local_b8 = param_1; local_a8 = param_2; local_98 = param_3; local_88 = param_4; local_78 = param_5; local_68 = param_6; local_58 = param_7; local_48 = param_8; } local_188 = 0x3000000008; local_180[0] = (int *)&stack0x00000008; local_180[1] = (int *)local_e8; uVar7 = 0; LAB_00180a0c: lVar11 = (long)(int)uVar7; lVar12 = lVar11 * 0x20; do { piVar9 = local_180[0]; uVar8 = local_188 & 0xffffffff; if (uVar8 < 0x29) { piVar9 = (int *)((long)local_180[1] + uVar8); uVar8 = (ulong)((int)local_188 + 8U); local_188 = CONCAT44(local_188._4_4_,(int)local_188 + 8U); } else { local_180[0] = local_180[0] + 2; } iVar6 = *piVar9; uVar5 = (uint)uVar8; switch(iVar6) { case 0: goto switchD_00180a59_caseD_0; case 1: if (uVar5 < 0x29) { local_188 = CONCAT44(local_188._4_4_,uVar5 + 8); piVar9 = (int *)((long)local_180[1] + uVar8); } else { piVar9 = local_180[0]; local_180[0] = local_180[0] + 2; } iVar6 = *piVar9; pcVar1 = *(code **)(param_9 + 0x10); pcVar10 = *(code **)(param_9 + 0x18); *(int8 *)((long)&local_168 + lVar11 * 0x20) = 0; (&uStack_160)[lVar11 * 4] = 0; local_158[lVar11 * 4] = pcVar1; if (pcVar10 == (code *)0x0) { pcVar10 = cr_default_realloc; } local_158[lVar11 * 4 + 1] = pcVar10; uStack_190 = 0x180c07; iVar6 = unicode_prop1((int8 *)((long)&local_168 + lVar11 * 0x20),iVar6); goto LAB_00180c07; case 2: if (uVar5 < 0x29) { local_188 = CONCAT44(local_188._4_4_,uVar5 + 8); piVar9 = (int *)((long)local_180[1] + uVar8); } else { piVar9 = local_180[0]; local_180[0] = local_180[0] + 2; } iVar6 = *piVar9; pcVar1 = *(code **)(param_9 + 0x10); pcVar10 = *(code **)(param_9 + 0x18); *(int8 *)((long)&local_168 + lVar11 * 0x20) = 0; (&uStack_160)[lVar11 * 4] = 0; local_158[lVar11 * 4] = pcVar1; if (pcVar10 == (code *)0x0) { pcVar10 = cr_default_realloc; } local_158[lVar11 * 4 + 1] = pcVar10; uStack_190 = 0x180b78; iVar6 = unicode_case1((int8 *)((long)&local_168 + lVar11 * 0x20),iVar6); goto LAB_00180c07; case 3: case 4: case 5: puVar13 = (int8 *)((long)&local_168 + lVar11 * 0x20); pcVar1 = *(code **)(param_9 + 0x10); pcVar10 = *(code **)(param_9 + 0x18); *puVar13 = 0; (&uStack_160)[lVar11 * 4] = 0; local_158[lVar11 * 4] = pcVar1; if (pcVar10 == (code *)0x0) { pcVar10 = cr_default_realloc; } local_158[lVar11 * 4 + 1] = pcVar10; uStack_190 = (ulong)FUN_00180ab5; iVar6 = cr_op(puVar13,(&local_1a0)[lVar11 * 4],local_1a8[lVar11 * 8],local_180[lVar11 * 4], (int)(&local_188)[lVar11 * 4],iVar6 + -3); if (iVar6 != 0) { uVar7 = uVar7 + 1; goto LAB_00180c48; } uVar7 = uVar7 - 1; uStack_190 = 0x180ad4; (*(code *)(&uStack_190)[lVar11 * 4])((&pcStack_198)[lVar11 * 4],(&local_1a0)[lVar11 * 4],0); uStack_190 = 0x180ae1; (*(code *)local_180[lVar11 * 4 + 2])(local_180[lVar11 * 4 + 1],local_180[lVar11 * 4],0); uVar2 = *(int4 *)((long)&local_168 + lVar12 + 4U); uVar3 = *(int4 *)(&uStack_160 + lVar11 * 4); uVar4 = *(int4 *)((long)&uStack_160 + lVar12 + 4); pcVar1 = local_158[lVar11 * 4]; pcVar10 = local_158[lVar11 * 4 + 1]; local_1a8[lVar11 * 8] = *(int4 *)puVar13; local_1a8[lVar11 * 8 + 1] = uVar2; *(int4 *)(&local_1a0 + lVar11 * 4) = uVar3; *(int4 *)((long)&local_1a0 + lVar12 + 4) = uVar4; (&pcStack_198)[lVar11 * 4] = pcVar1; (&uStack_190)[lVar11 * 4] = (ulong)pcVar10; goto LAB_00180a0c; case 6: uStack_190 = 0x180a63; iVar6 = cr_invert(&local_188 + lVar11 * 4); if (iVar6 != 0) goto LAB_00180c48; break; case 7: uStack_190 = 0x180c21; uVar7 = cr_copy(param_9,&local_168); uVar8 = (ulong)uVar7; uStack_190 = 0x180c31; (*local_158[1])(local_158[0],uStack_160,0); goto LAB_00180c31; default: /* WARNING: Subroutine does not return */ uStack_190 = (ulong)unicode_prop1; abort(); } } while( true ); switchD_00180a59_caseD_0: if (uVar5 < 0x29) { local_188 = CONCAT44(local_188._4_4_,uVar5 + 8); piVar9 = (int *)((long)local_180[1] + uVar8); } else { piVar9 = local_180[0]; local_180[0] = local_180[0] + 2; } iVar6 = *piVar9; pcVar1 = *(code **)(param_9 + 0x10); pcVar10 = *(code **)(param_9 + 0x18); *(int8 *)((long)&local_168 + lVar11 * 0x20) = 0; (&uStack_160)[lVar11 * 4] = 0; local_158[lVar11 * 4] = pcVar1; if (pcVar10 == (code *)0x0) { pcVar10 = cr_default_realloc; } local_158[lVar11 * 4 + 1] = pcVar10; uStack_190 = 0x180bc1; iVar6 = unicode_general_category1((int8 *)((long)&local_168 + lVar11 * 0x20),iVar6); LAB_00180c07: uVar7 = uVar7 + 1; if (iVar6 != 0) { LAB_00180c48: uVar14 = 0; uVar15 = (ulong)uVar7; if ((int)uVar7 < 1) { uVar15 = uVar14; } uStack_190 = 0xffffffffffffffff; uVar8 = uStack_190; for (; uVar15 * 0x20 != uVar14; uVar14 = uVar14 + 0x20) { uStack_190 = 0x180c6f; (**(code **)((long)local_158 + uVar14 + 8)) (*(int8 *)((long)local_158 + uVar14), *(int8 *)((long)&uStack_160 + uVar14),0); } LAB_00180c31: return uVar8 & 0xffffffff; } goto LAB_00180a0c; }
23,434
js_callsite_getfield
bluesky950520[P]quickjs/quickjs.c
static JSValue js_callsite_getfield(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { JSCallSiteData *csd = JS_GetOpaque2(ctx, this_val, JS_CLASS_CALL_SITE); if (!csd) return JS_EXCEPTION; JSValue *field = (void *)((char *)csd + magic); return js_dup(*field); }
O1
c
js_callsite_getfield: pushq %rbx subq $0x10, %rsp movl %r9d, %ebx movl $0x3c, %ecx callq 0x275b5 testq %rax, %rax je 0x848f4 movq %rax, %rcx movslq %ebx, %rdx movq (%rax,%rdx), %rax movq 0x8(%rcx,%rdx), %rdx movq %rax, 0x8(%rsp) cmpl $-0x9, %edx jb 0x848fb movq 0x8(%rsp), %rcx incl (%rcx) jmp 0x848fb movl $0x6, %edx xorl %eax, %eax addq $0x10, %rsp popq %rbx retq
js_callsite_getfield: push rbx sub rsp, 10h mov ebx, r9d mov ecx, 3Ch ; '<' call JS_GetOpaque2 test rax, rax jz short loc_848F4 mov rcx, rax movsxd rdx, ebx mov rax, [rax+rdx] mov rdx, [rcx+rdx+8] mov [rsp+18h+var_10], rax cmp edx, 0FFFFFFF7h jb short loc_848FB mov rcx, [rsp+18h+var_10] inc dword ptr [rcx] jmp short loc_848FB loc_848F4: mov edx, 6 xor eax, eax loc_848FB: add rsp, 10h pop rbx retn
_DWORD * js_callsite_getfield(long long a1, long long a2, int a3, long long a4, long long a5, int a6) { long long Opaque2; // rax long long v8; // rcx _DWORD *result; // rax Opaque2 = JS_GetOpaque2(a1, a2, a3, 0x3Cu); if ( !Opaque2 ) return 0LL; v8 = Opaque2; result = *(_DWORD **)(Opaque2 + a6); if ( (unsigned int)*(_QWORD *)(v8 + a6 + 8) >= 0xFFFFFFF7 ) ++*result; return result; }
js_callsite_getfield: PUSH RBX SUB RSP,0x10 MOV EBX,R9D MOV ECX,0x3c CALL 0x001275b5 TEST RAX,RAX JZ 0x001848f4 MOV RCX,RAX MOVSXD RDX,EBX MOV RAX,qword ptr [RAX + RDX*0x1] MOV RDX,qword ptr [RCX + RDX*0x1 + 0x8] MOV qword ptr [RSP + 0x8],RAX CMP EDX,-0x9 JC 0x001848fb MOV RCX,qword ptr [RSP + 0x8] INC dword ptr [RCX] JMP 0x001848fb LAB_001848f4: MOV EDX,0x6 XOR EAX,EAX LAB_001848fb: ADD RSP,0x10 POP RBX RET
int1 [16] js_callsite_getfield(void) { long lVar1; int *piVar2; int8 uVar3; int in_R9D; int1 auVar4 [16]; lVar1 = JS_GetOpaque2(); if (lVar1 == 0) { uVar3 = 6; piVar2 = (int *)0x0; } else { piVar2 = *(int **)(lVar1 + in_R9D); uVar3 = *(int8 *)(lVar1 + 8 + (long)in_R9D); if (0xfffffff6 < (uint)uVar3) { *piVar2 = *piVar2 + 1; } } auVar4._8_8_ = uVar3; auVar4._0_8_ = piVar2; return auVar4; }
23,435
js_callsite_getfield
bluesky950520[P]quickjs/quickjs.c
static JSValue js_callsite_getfield(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { JSCallSiteData *csd = JS_GetOpaque2(ctx, this_val, JS_CLASS_CALL_SITE); if (!csd) return JS_EXCEPTION; JSValue *field = (void *)((char *)csd + magic); return js_dup(*field); }
O2
c
js_callsite_getfield: pushq %rbx movl %r9d, %ebx pushq $0x3c popq %rcx callq 0x21207 testq %rax, %rax je 0x6f3ec movq %rax, %rcx movslq %ebx, %rdx movq (%rax,%rdx), %rax movq 0x8(%rcx,%rdx), %rdx cmpl $-0x9, %edx jb 0x6f3f1 incl (%rax) jmp 0x6f3f1 pushq $0x6 popq %rdx xorl %eax, %eax popq %rbx retq
js_callsite_getfield: push rbx mov ebx, r9d push 3Ch ; '<' pop rcx call JS_GetOpaque2 test rax, rax jz short loc_6F3EC mov rcx, rax movsxd rdx, ebx mov rax, [rax+rdx] mov rdx, [rcx+rdx+8] cmp edx, 0FFFFFFF7h jb short loc_6F3F1 inc dword ptr [rax] jmp short loc_6F3F1 loc_6F3EC: push 6 pop rdx xor eax, eax loc_6F3F1: pop rbx retn
_DWORD * js_callsite_getfield(long long a1, long long a2, int a3, long long a4, long long a5, int a6) { long long Opaque2; // rax long long v8; // rcx _DWORD *result; // rax Opaque2 = JS_GetOpaque2(a1, a2, a3, 0x3Cu); if ( !Opaque2 ) return 0LL; v8 = Opaque2; result = *(_DWORD **)(Opaque2 + a6); if ( (unsigned int)*(_QWORD *)(v8 + a6 + 8) >= 0xFFFFFFF7 ) ++*result; return result; }
js_callsite_getfield: PUSH RBX MOV EBX,R9D PUSH 0x3c POP RCX CALL 0x00121207 TEST RAX,RAX JZ 0x0016f3ec MOV RCX,RAX MOVSXD RDX,EBX MOV RAX,qword ptr [RAX + RDX*0x1] MOV RDX,qword ptr [RCX + RDX*0x1 + 0x8] CMP EDX,-0x9 JC 0x0016f3f1 INC dword ptr [RAX] JMP 0x0016f3f1 LAB_0016f3ec: PUSH 0x6 POP RDX XOR EAX,EAX LAB_0016f3f1: POP RBX RET
int1 [16] js_callsite_getfield(void) { long lVar1; int *piVar2; int8 uVar3; int in_R9D; int1 auVar4 [16]; lVar1 = JS_GetOpaque2(); if (lVar1 == 0) { uVar3 = 6; piVar2 = (int *)0x0; } else { piVar2 = *(int **)(lVar1 + in_R9D); uVar3 = *(int8 *)(lVar1 + 8 + (long)in_R9D); if (0xfffffff6 < (uint)uVar3) { *piVar2 = *piVar2 + 1; } } auVar4._8_8_ = uVar3; auVar4._0_8_ = piVar2; return auVar4; }
23,436
unsigned long fmt::v10::detail::write_padded<(fmt::v10::align::type)2, fmt::v10::appender, char, fmt::v10::appender fmt::v10::detail::write_int<fmt::v10::appender, unsigned long, char>(fmt::v10::appender, unsigned long, unsigned int, fmt::v10::format_specs<char> const&, fmt::v10::detail::digit_grouping<char> const&)::'lambda'(fmt::v10::appender)>(unsigned long, fmt::v10::format_specs<char> const&, unsigned long, unsigned long, fmt::v10::appender fmt::v10::detail::write_int<fmt::v10::appender, unsigned long, char>(fmt::v10::appender, unsigned long, unsigned int, fmt::v10::format_specs<char> const&, fmt::v10::detail::digit_grouping<char> const&)::'lambda'(fmt::v10::appender)&&)
aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h
FMT_CONSTEXPR auto write_padded(OutputIt out, const format_specs<Char>& specs, size_t size, size_t width, F&& f) -> OutputIt { static_assert(align == align::left || align == align::right, ""); unsigned spec_width = to_unsigned(specs.width); size_t padding = spec_width > width ? spec_width - width : 0; // Shifts are encoded as string literals because static constexpr is not // supported in constexpr functions. auto* shifts = align == align::left ? "\x1f\x1f\x00\x01" : "\x00\x1f\x00\x01"; size_t left_padding = padding >> shifts[specs.align]; size_t right_padding = padding - left_padding; auto it = reserve(out, size + padding * specs.fill.size()); if (left_padding != 0) it = fill(it, left_padding, specs.fill); it = f(it); if (right_padding != 0) it = fill(it, right_padding, specs.fill); return base_iterator(out, it); }
O0
c
unsigned long fmt::v10::detail::write_padded<(fmt::v10::align::type)2, fmt::v10::appender, char, fmt::v10::appender fmt::v10::detail::write_int<fmt::v10::appender, unsigned long, char>(fmt::v10::appender, unsigned long, unsigned int, fmt::v10::format_specs<char> const&, fmt::v10::detail::digit_grouping<char> const&)::'lambda'(fmt::v10::appender)>(unsigned long, fmt::v10::format_specs<char> const&, unsigned long, unsigned long, fmt::v10::appender fmt::v10::detail::write_int<fmt::v10::appender, unsigned long, char>(fmt::v10::appender, unsigned long, unsigned int, fmt::v10::format_specs<char> const&, fmt::v10::detail::digit_grouping<char> const&)::'lambda'(fmt::v10::appender)&&): subq $0xb8, %rsp movq %rdi, 0xa8(%rsp) movq %rsi, 0xa0(%rsp) movq %rdx, 0x98(%rsp) movq %rcx, 0x90(%rsp) movq %r8, 0x88(%rsp) movq 0xa0(%rsp), %rax movl (%rax), %edi callq 0x1e9130 movl %eax, 0x84(%rsp) movl 0x84(%rsp), %eax cmpq 0x90(%rsp), %rax jbe 0x2063dc movl 0x84(%rsp), %eax subq 0x90(%rsp), %rax movq %rax, 0x10(%rsp) jmp 0x2063e5 xorl %eax, %eax movq %rax, 0x10(%rsp) jmp 0x2063e5 movq 0x10(%rsp), %rax movq %rax, 0x78(%rsp) leaq 0x4fe7ef(%rip), %rax # 0x704be5 movq %rax, 0x70(%rsp) movq 0x78(%rsp), %rax movq 0x70(%rsp), %rcx movq 0xa0(%rsp), %rdx movw 0x9(%rdx), %dx andw $0xf, %dx movzbl %dl, %edx movsbl (%rcx,%rdx), %ecx movl %ecx, %ecx shrq %cl, %rax movq %rax, 0x68(%rsp) movq 0x78(%rsp), %rax subq 0x68(%rsp), %rax movq %rax, 0x60(%rsp) movq 0x98(%rsp), %rax movq %rax, (%rsp) movq 0x78(%rsp), %rax movq %rax, 0x8(%rsp) movq 0xa0(%rsp), %rdi addq $0xb, %rdi callq 0x1e9900 movq (%rsp), %rsi movq %rax, %rcx movq 0x8(%rsp), %rax imulq %rcx, %rax addq %rax, %rsi leaq 0xa8(%rsp), %rdi callq 0x1e3ae0 movq (%rax), %rax movq %rax, 0x58(%rsp) cmpq $0x0, 0x68(%rsp) je 0x2064c0 movq 0x58(%rsp), %rax movq %rax, 0x48(%rsp) movq 0x68(%rsp), %rsi movq 0xa0(%rsp), %rdx addq $0xb, %rdx movq 0x48(%rsp), %rdi callq 0x1e9910 movq %rax, 0x50(%rsp) movq 0x50(%rsp), %rax movq %rax, 0x58(%rsp) movq 0x88(%rsp), %rdi movq 0x58(%rsp), %rax movq %rax, 0x38(%rsp) movq 0x38(%rsp), %rsi callq 0x206570 movq %rax, 0x40(%rsp) movq 0x40(%rsp), %rax movq %rax, 0x58(%rsp) cmpq $0x0, 0x60(%rsp) je 0x206527 movq 0x58(%rsp), %rax movq %rax, 0x28(%rsp) movq 0x60(%rsp), %rsi movq 0xa0(%rsp), %rdx addq $0xb, %rdx movq 0x28(%rsp), %rdi callq 0x1e9910 movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x58(%rsp) movq 0xa8(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x58(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x1e3de0 movq %rax, 0xb0(%rsp) movq 0xb0(%rsp), %rax addq $0xb8, %rsp retq nopw %cs:(%rax,%rax) nop
_ZN3fmt3v106detail12write_paddedILNS0_5align4typeE2ENS0_8appenderEcRZNS1_9write_intIS5_cZNS1_9write_intIcS5_oEET0_S8_NS1_13write_int_argIT1_EERKNS0_12format_specsIT_EENS1_10locale_refEEUlS5_E2_EESD_SD_ijRKNSC_IS8_EESA_EUlS5_E_EES8_S8_RKNSC_ISA_EEmmOT2_: sub rsp, 0B8h mov [rsp+0B8h+var_10], rdi mov [rsp+0B8h+var_18], rsi mov [rsp+0B8h+var_20], rdx mov [rsp+0B8h+var_28], rcx mov [rsp+0B8h+var_30], r8 mov rax, [rsp+0B8h+var_18] mov edi, [rax] call _ZN3fmt3v106detail11to_unsignedIiEENSt13make_unsignedIT_E4typeES4_; fmt::v10::detail::to_unsigned<int>(int) mov [rsp+0B8h+var_34], eax mov eax, [rsp+0B8h+var_34] cmp rax, [rsp+0B8h+var_28] jbe short loc_2063DC mov eax, [rsp+0B8h+var_34] sub rax, [rsp+0B8h+var_28] mov [rsp+0B8h+var_A8], rax jmp short loc_2063E5 loc_2063DC: xor eax, eax mov [rsp+0B8h+var_A8], rax jmp short $+2 loc_2063E5: mov rax, [rsp+0B8h+var_A8] mov [rsp+0B8h+var_40], rax lea rax, byte_704BE5 mov [rsp+0B8h+var_48], rax mov rax, [rsp+0B8h+var_40] mov rcx, [rsp+0B8h+var_48] mov rdx, [rsp+0B8h+var_18] mov dx, [rdx+9] and dx, 0Fh movzx edx, dl movsx ecx, byte ptr [rcx+rdx] mov ecx, ecx shr rax, cl mov [rsp+0B8h+var_50], rax mov rax, [rsp+0B8h+var_40] sub rax, [rsp+0B8h+var_50] mov [rsp+0B8h+var_58], rax mov rax, [rsp+0B8h+var_20] mov [rsp+0B8h+var_B8], rax mov rax, [rsp+0B8h+var_40] mov [rsp+0B8h+var_B0], rax mov rdi, [rsp+0B8h+var_18] add rdi, 0Bh call _ZNK3fmt3v106detail6fill_tIcE4sizeEv; fmt::v10::detail::fill_t<char>::size(void) mov rsi, [rsp+0B8h+var_B8] mov rcx, rax mov rax, [rsp+0B8h+var_B0] imul rax, rcx add rsi, rax lea rdi, [rsp+0B8h+var_10] call _ZN3fmt3v106detail7reserveINS0_8appenderEEERT_S5_m; fmt::v10::detail::reserve<fmt::v10::appender>(fmt::v10::appender &,ulong) mov rax, [rax] mov [rsp+0B8h+var_60], rax cmp [rsp+0B8h+var_50], 0 jz short loc_2064C0 mov rax, [rsp+0B8h+var_60] mov [rsp+0B8h+var_70], rax mov rsi, [rsp+0B8h+var_50] mov rdx, [rsp+0B8h+var_18] add rdx, 0Bh mov rdi, [rsp+0B8h+var_70] call _ZN3fmt3v106detail4fillINS0_8appenderEcEET_S4_mRKNS1_6fill_tIT0_EE; fmt::v10::detail::fill<fmt::v10::appender,char>(fmt::v10::appender,ulong,fmt::v10::detail::fill_t<char> const&) mov [rsp+0B8h+var_68], rax mov rax, [rsp+0B8h+var_68] mov [rsp+0B8h+var_60], rax loc_2064C0: mov rdi, [rsp+0B8h+var_30] mov rax, [rsp+0B8h+var_60] mov [rsp+0B8h+var_80], rax mov rsi, [rsp+0B8h+var_80] call _ZZN3fmt3v106detail9write_intINS0_8appenderEcZNS1_9write_intIcS3_oEET0_S5_NS1_13write_int_argIT1_EERKNS0_12format_specsIT_EENS1_10locale_refEEUlS3_E2_EESA_SA_ijRKNS9_IS5_EES7_ENKUlS3_E_clES3_; fmt::v10::detail::write_int<fmt::v10::appender,char,fmt::v10::detail::write_int<char,fmt::v10::appender,unsigned __int128>(fmt::v10::appender,fmt::v10::detail::write_int_arg<unsigned __int128>,fmt::v10::format_specs<char> const&,fmt::v10::detail::locale_ref)::{lambda(fmt::v10::appender)#4}>(char,int,uint,fmt::v10::format_specs<fmt::v10::appender> const&,unsigned __int128)::{lambda(fmt::v10::appender)#1}::operator()(fmt::v10::appender) mov [rsp+0B8h+var_78], rax mov rax, [rsp+0B8h+var_78] mov [rsp+0B8h+var_60], rax cmp [rsp+0B8h+var_58], 0 jz short loc_206527 mov rax, [rsp+0B8h+var_60] mov [rsp+0B8h+var_90], rax mov rsi, [rsp+0B8h+var_58] mov rdx, [rsp+0B8h+var_18] add rdx, 0Bh mov rdi, [rsp+0B8h+var_90] call _ZN3fmt3v106detail4fillINS0_8appenderEcEET_S4_mRKNS1_6fill_tIT0_EE; fmt::v10::detail::fill<fmt::v10::appender,char>(fmt::v10::appender,ulong,fmt::v10::detail::fill_t<char> const&) mov [rsp+0B8h+var_88], rax mov rax, [rsp+0B8h+var_88] mov [rsp+0B8h+var_60], rax loc_206527: mov rax, [rsp+0B8h+var_10] mov [rsp+0B8h+var_98], rax mov rax, [rsp+0B8h+var_60] mov [rsp+0B8h+var_A0], rax mov rdi, [rsp+0B8h+var_98] mov rsi, [rsp+0B8h+var_A0] call _ZN3fmt3v106detail13base_iteratorINS0_8appenderEEET_S4_S4_; fmt::v10::detail::base_iterator<fmt::v10::appender>(fmt::v10::appender,fmt::v10::appender) mov [rsp+0B8h+var_8], rax mov rax, [rsp+0B8h+var_8] add rsp, 0B8h retn
long long fmt::v10::detail::write_padded<(fmt::v10::align::type)2,fmt::v10::appender,char,char fmt::v10::detail::write_int<fmt::v10::appender,char,fmt::v10::appender fmt::v10::detail::write_int<char,fmt::v10::appender,unsigned __int128>(fmt::v10::appender,fmt::v10::detail::write_int_arg<unsigned __int128>,fmt::v10::format_specs<char> const&,fmt::v10::detail::locale_ref)::{lambda(fmt::v10::appender)#4}>(char,int,unsigned int,fmt::v10::format_specs<fmt::v10::appender> const&,unsigned __int128)::{lambda(fmt::v10::appender)#1} &>( long long a1, long long a2, long long a3, unsigned long long a4, long long a5) { unsigned long long v6; // [rsp+10h] [rbp-A8h] long long v7; // [rsp+58h] [rbp-60h] long long v8; // [rsp+58h] [rbp-60h] unsigned long long v9; // [rsp+60h] [rbp-58h] unsigned long long v10; // [rsp+68h] [rbp-50h] unsigned int v11; // [rsp+84h] [rbp-34h] long long v14; // [rsp+A8h] [rbp-10h] BYREF v14 = a1; v11 = fmt::v10::detail::to_unsigned<int>(*(_DWORD *)a2); if ( v11 <= a4 ) v6 = 0LL; else v6 = v11 - a4; v10 = v6 >> byte_704BE5[*(_WORD *)(a2 + 9) & 0xF]; v9 = v6 - v10; fmt::v10::detail::fill_t<char>::size(a2 + 11); v7 = *(_QWORD *)fmt::v10::detail::reserve<fmt::v10::appender>((long long)&v14); if ( v10 ) v7 = fmt::v10::detail::fill<fmt::v10::appender,char>(v7, v10, a2 + 11); v8 = fmt::v10::detail::write_int<fmt::v10::appender,char,fmt::v10::appender fmt::v10::detail::write_int<char,fmt::v10::appender,unsigned __int128>(fmt::v10::appender,fmt::v10::detail::write_int_arg<unsigned __int128>,fmt::v10::format_specs<char> const&,fmt::v10::detail::locale_ref)::{lambda(fmt::v10::appender)#4}>(char,int,unsigned int,fmt::v10::format_specs<fmt::v10::appender> const&,unsigned __int128)::{lambda(fmt::v10::appender)#1}::operator()( a5, v7); if ( v9 ) v8 = fmt::v10::detail::fill<fmt::v10::appender,char>(v8, v9, a2 + 11); return fmt::v10::detail::base_iterator<fmt::v10::appender>(v14, v8); }
23,437
unsigned long fmt::v10::detail::write_padded<(fmt::v10::align::type)2, fmt::v10::appender, char, fmt::v10::appender fmt::v10::detail::write_int<fmt::v10::appender, unsigned long, char>(fmt::v10::appender, unsigned long, unsigned int, fmt::v10::format_specs<char> const&, fmt::v10::detail::digit_grouping<char> const&)::'lambda'(fmt::v10::appender)>(unsigned long, fmt::v10::format_specs<char> const&, unsigned long, unsigned long, fmt::v10::appender fmt::v10::detail::write_int<fmt::v10::appender, unsigned long, char>(fmt::v10::appender, unsigned long, unsigned int, fmt::v10::format_specs<char> const&, fmt::v10::detail::digit_grouping<char> const&)::'lambda'(fmt::v10::appender)&&)
aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h
FMT_CONSTEXPR auto write_padded(OutputIt out, const format_specs<Char>& specs, size_t size, size_t width, F&& f) -> OutputIt { static_assert(align == align::left || align == align::right, ""); unsigned spec_width = to_unsigned(specs.width); size_t padding = spec_width > width ? spec_width - width : 0; // Shifts are encoded as string literals because static constexpr is not // supported in constexpr functions. auto* shifts = align == align::left ? "\x1f\x1f\x00\x01" : "\x00\x1f\x00\x01"; size_t left_padding = padding >> shifts[specs.align]; size_t right_padding = padding - left_padding; auto it = reserve(out, size + padding * specs.fill.size()); if (left_padding != 0) it = fill(it, left_padding, specs.fill); it = f(it); if (right_padding != 0) it = fill(it, right_padding, specs.fill); return base_iterator(out, it); }
O3
c
unsigned long fmt::v10::detail::write_padded<(fmt::v10::align::type)2, fmt::v10::appender, char, fmt::v10::appender fmt::v10::detail::write_int<fmt::v10::appender, unsigned long, char>(fmt::v10::appender, unsigned long, unsigned int, fmt::v10::format_specs<char> const&, fmt::v10::detail::digit_grouping<char> const&)::'lambda'(fmt::v10::appender)>(unsigned long, fmt::v10::format_specs<char> const&, unsigned long, unsigned long, fmt::v10::appender fmt::v10::detail::write_int<fmt::v10::appender, unsigned long, char>(fmt::v10::appender, unsigned long, unsigned int, fmt::v10::format_specs<char> const&, fmt::v10::detail::digit_grouping<char> const&)::'lambda'(fmt::v10::appender)&&): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rsi, %rbx movl (%rsi), %eax xorl %r14d, %r14d subq %rcx, %rax cmovaeq %rax, %r14 movzwl 0x9(%rsi), %eax andl $0xf, %eax leaq 0x183d25(%rip), %rcx # 0x22ab70 movb (%rax,%rcx), %cl movq %r14, %r15 shrq %cl, %r15 movq %r8, %r13 movq %rdi, %r12 addq $0xb, %rbx testq %r15, %r15 je 0xa6e74 movq %r12, %rdi movq %r15, %rsi movq %rbx, %rdx callq 0x9b940 movq %rax, %r12 cmpb $0x1, (%r13) jne 0xa6e90 movq 0x8(%r13), %rsi movq 0x10(%r13), %rdx movq %r12, %rdi callq 0xa78ca movq %rax, %r12 jmp 0xa6ea3 movq 0x18(%r13), %rsi movq 0x20(%r13), %rdx addq %rsi, %rdx movq %r12, %rdi callq 0x99336 cmpq %r15, %r14 jne 0xa6eb5 movq %r12, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq subq %r15, %r14 movq %r12, %rdi movq %r14, %rsi movq %rbx, %rdx popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 jmp 0x9b940
_ZN3fmt3v106detail12write_paddedILNS0_5align4typeE1ENS0_8appenderEcZNS1_5writeIcS5_EET0_S7_NS0_17basic_string_viewIT_EERKNS0_12format_specsIS9_EEEUlS5_E_EES7_S7_RKNSB_IT1_EEmmOT2_: push r15 push r14 push r13 push r12 push rbx mov rbx, rsi mov eax, [rsi] xor r14d, r14d sub rax, rcx cmovnb r14, rax movzx eax, word ptr [rsi+9] and eax, 0Fh lea rcx, byte_22AB70 mov cl, [rax+rcx] mov r15, r14 shr r15, cl mov r13, r8 mov r12, rdi add rbx, 0Bh test r15, r15 jz short loc_A6E74 mov rdi, r12 mov rsi, r15 mov rdx, rbx call _ZN3fmt3v106detail4fillINS0_8appenderEcEET_S4_mRKNS1_6fill_tIT0_EE; fmt::v10::detail::fill<fmt::v10::appender,char>(fmt::v10::appender,ulong,fmt::v10::detail::fill_t<char> const&) mov r12, rax loc_A6E74: cmp byte ptr [r13+0], 1 jnz short loc_A6E90 mov rsi, [r13+8] mov rdx, [r13+10h] mov rdi, r12 call _ZN3fmt3v106detail20write_escaped_stringIcNS0_8appenderEEET0_S4_NS0_17basic_string_viewIT_EE; fmt::v10::detail::write_escaped_string<char,fmt::v10::appender>(fmt::v10::appender,fmt::v10::basic_string_view<char>) mov r12, rax jmp short loc_A6EA3 loc_A6E90: mov rsi, [r13+18h] mov rdx, [r13+20h] add rdx, rsi mov rdi, r12 call _ZN3fmt3v106detail6bufferIcE6appendIcEEvPKT_S7_; fmt::v10::detail::buffer<char>::append<char>(char const*,char const*) loc_A6EA3: cmp r14, r15 jnz short loc_A6EB5 mov rax, r12 pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_A6EB5: sub r14, r15 mov rdi, r12 mov rsi, r14 mov rdx, rbx pop rbx pop r12 pop r13 pop r14 pop r15 jmp _ZN3fmt3v106detail4fillINS0_8appenderEcEET_S4_mRKNS1_6fill_tIT0_EE; fmt::v10::detail::fill<fmt::v10::appender,char>(fmt::v10::appender,ulong,fmt::v10::detail::fill_t<char> const&)
long long fmt::v10::detail::write_padded<(fmt::v10::align::type)1,fmt::v10::appender,char,fmt::v10::appender fmt::v10::detail::write<char,fmt::v10::appender>(fmt::v10::appender,fmt::v10::basic_string_view<char>,fmt::v10::format_specs<char> const&)::{lambda(fmt::v10::appender)#1}>( long long a1, unsigned int *a2, long long a3, unsigned long long a4, long long a5) { unsigned long long v5; // rax unsigned long long v6; // r14 bool v7; // cf unsigned long long v8; // rax char v9; // cl unsigned long long v10; // r15 long long v12; // r12 long long v13; // rbx v5 = *a2; v6 = 0LL; v7 = v5 < a4; v8 = v5 - a4; if ( !v7 ) v6 = v8; v9 = byte_22AB70[*(_WORD *)((_BYTE *)a2 + 9) & 0xF]; v10 = v6 >> v9; v12 = a1; v13 = (long long)a2 + 11; if ( v6 >> v9 ) v12 = fmt::v10::detail::fill<fmt::v10::appender,char>(a1, v6 >> v9, v13); if ( *(_BYTE *)a5 == 1 ) v12 = fmt::v10::detail::write_escaped_string<char,fmt::v10::appender>( v12, *(_QWORD *)(a5 + 8), *(_QWORD *)(a5 + 16)); else fmt::v10::detail::buffer<char>::append<char>(v12, *(_QWORD *)(a5 + 24), *(_QWORD *)(a5 + 24) + *(_QWORD *)(a5 + 32)); if ( v6 == v10 ) return v12; else return fmt::v10::detail::fill<fmt::v10::appender,char>(v12, v6 - v10, v13); }
write_padded<(fmt::v10::align::type)1,fmt::v10::appender,char,fmt::v10::detail::write<char,fmt::v10::appender>(fmt::v10::appender,fmt::v10::basic_string_view<char>,fmt::v10::format_specs<char>const&)::{lambda(fmt::v10::appender)#1}>: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV RBX,RSI MOV EAX,dword ptr [RSI] XOR R14D,R14D SUB RAX,RCX CMOVNC R14,RAX MOVZX EAX,word ptr [RSI + 0x9] AND EAX,0xf LEA RCX,[0x32ab70] MOV CL,byte ptr [RAX + RCX*0x1] MOV R15,R14 SHR R15,CL MOV R13,R8 MOV R12,RDI ADD RBX,0xb TEST R15,R15 JZ 0x001a6e74 MOV RDI,R12 MOV RSI,R15 MOV RDX,RBX CALL 0x0019b940 MOV R12,RAX LAB_001a6e74: CMP byte ptr [R13],0x1 JNZ 0x001a6e90 MOV RSI,qword ptr [R13 + 0x8] MOV RDX,qword ptr [R13 + 0x10] MOV RDI,R12 CALL 0x001a78ca MOV R12,RAX JMP 0x001a6ea3 LAB_001a6e90: MOV RSI,qword ptr [R13 + 0x18] MOV RDX,qword ptr [R13 + 0x20] ADD RDX,RSI MOV RDI,R12 CALL 0x00199336 LAB_001a6ea3: CMP R14,R15 JNZ 0x001a6eb5 MOV RAX,R12 POP RBX POP R12 POP R13 POP R14 POP R15 RET LAB_001a6eb5: SUB R14,R15 MOV RDI,R12 MOV RSI,R14 MOV RDX,RBX POP RBX POP R12 POP R13 POP R14 POP R15 JMP 0x0019b940
/* fmt::v10::appender fmt::v10::detail::write_padded<(fmt::v10::align::type)1, fmt::v10::appender, char, fmt::v10::detail::write<char, fmt::v10::appender>(fmt::v10::appender, fmt::v10::basic_string_view<char>, fmt::v10::format_specs<char> const&)::{lambda(fmt::v10::appender)#1}>(fmt::v10::appender, fmt::v10::format_specs<char> const&, unsigned long, unsigned long, fmt::v10::detail::write<char, fmt::v10::appender>(fmt::v10::appender, fmt::v10::basic_string_view<char>, fmt::v10::format_specs<char> const&)::{lambda(fmt::v10::appender)#1}&&) */ buffer<char> * fmt::v10::detail:: write_padded<(fmt::v10::align::type)1,fmt::v10::appender,char,fmt::v10::detail::write<char,fmt::v10::appender>(fmt::v10::appender,fmt::v10::basic_string_view<char>,fmt::v10::format_specs<char>const&)::_lambda(fmt::v10::appender)_1_> (buffer<char> *param_1,uint *param_2,int8 param_3,ulong param_4,char *param_5) { buffer<char> *pbVar1; ulong uVar2; ulong uVar3; uVar2 = 0; if (param_4 <= *param_2) { uVar2 = *param_2 - param_4; } uVar3 = uVar2 >> ((&DAT_0032ab70)[*(ushort *)((long)param_2 + 9) & 0xf] & 0x3f); if (uVar3 != 0) { param_1 = (buffer<char> *)fill<fmt::v10::appender,char>(param_1,uVar3,(long)param_2 + 0xb); } if (*param_5 == '\x01') { param_1 = (buffer<char> *) write_escaped_string<char,fmt::v10::appender> ((detail *)param_1,*(int8 *)(param_5 + 8), *(int8 *)(param_5 + 0x10)); } else { buffer<char>::append<char> (param_1,*(char **)(param_5 + 0x18), *(char **)(param_5 + 0x18) + *(long *)(param_5 + 0x20)); } if (uVar2 == uVar3) { return param_1; } pbVar1 = (buffer<char> *)fill<fmt::v10::appender,char>(param_1,uVar2 - uVar3,(long)param_2 + 0xb); return pbVar1; }
23,438
minja::Parser::consumeToken(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, minja::SpaceHandling)
monkey531[P]llama/common/minja.hpp
std::string consumeToken(const std::regex & regex, SpaceHandling space_handling = SpaceHandling::Strip) { auto start = it; consumeSpaces(space_handling); std::smatch match; if (std::regex_search(it, end, match, regex) && match.position() == 0) { it += match[0].length(); return match[0].str(); } it = start; return ""; }
O2
cpp
minja::Parser::consumeToken(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, minja::SpaceHandling): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx movq 0x20(%rsi), %r12 movq %rsi, %rdi movl %ecx, %esi callq 0x65be4 xorps %xmm0, %xmm0 leaq 0x10(%rsp), %rdx movaps %xmm0, 0x10(%rdx) movaps %xmm0, (%rdx) movq 0x18(%r14), %rsi movq 0x20(%r14), %rdi movq %r15, %rcx xorl %r8d, %r8d callq 0x541b2 testb %al, %al je 0x64d33 leaq 0x10(%rsp), %rdi xorl %esi, %esi callq 0x65b6c testq %rax, %rax je 0x64d64 movq %r12, 0x20(%r14) leaq 0x4f3e1(%rip), %rsi # 0xb411f leaq 0xf(%rsp), %rdx movq %rbx, %rdi callq 0x28f3a leaq 0x10(%rsp), %rdi callq 0x546e0 movq %rbx, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq 0x10(%rsp), %rax movq 0x18(%rsp), %rcx movq %rcx, %rdx subq %rax, %rdx leaq -0x48(%rcx), %rdi cmpq $0x48, %rdx movq %rax, %rsi cmoveq %rdi, %rsi cmpq %rax, %rcx cmoveq %rdi, %rsi movq 0x8(%rsi), %rax subq (%rsi), %rax xorl %ecx, %ecx cmpb $0x0, 0x10(%rsi) cmovneq %rax, %rcx addq %rcx, 0x20(%r14) movq %rbx, %rdi callq 0x56bea jmp 0x64d4b jmp 0x64dab movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x546e0 movq %rbx, %rdi callq 0x25020
_ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE: push r15 push r14 push r12 push rbx sub rsp, 38h mov r15, rdx mov r14, rsi mov rbx, rdi mov r12, [rsi+20h] mov rdi, rsi mov esi, ecx call _ZN5minja6Parser13consumeSpacesENS_13SpaceHandlingE; minja::Parser::consumeSpaces(minja::SpaceHandling) xorps xmm0, xmm0 lea rdx, [rsp+58h+var_48] movaps xmmword ptr [rdx+10h], xmm0 movaps xmmword ptr [rdx], xmm0 mov rsi, [r14+18h] mov rdi, [r14+20h] mov rcx, r15 xor r8d, r8d call _ZNSt8__detail17__regex_algo_implIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS5_9sub_matchISB_EEEcNS5_12regex_traitsIcEELNS_20_RegexExecutorPolicyE0ELb0EEEbT_SI_RNS5_13match_resultsISI_T0_EERKNS5_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeE; std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type) test al, al jz short loc_64D33 lea rdi, [rsp+58h+var_48] xor esi, esi call _ZNKSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEE8positionEm; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::position(ulong) test rax, rax jz short loc_64D64 loc_64D33: mov [r14+20h], r12 lea rsi, aErrorWhileHand_0+34h; "" lea rdx, [rsp+58h+var_49] mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) loc_64D4B: lea rdi, [rsp+58h+var_48] call _ZNSt12_Vector_baseINSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS0_12basic_stringIcSt11char_traitsIcESaIcEEEEEEESaISC_EED2Ev; std::_Vector_base<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~_Vector_base() mov rax, rbx add rsp, 38h pop rbx pop r12 pop r14 pop r15 retn loc_64D64: mov rax, [rsp+58h+var_48] mov rcx, [rsp+58h+var_40] mov rdx, rcx sub rdx, rax lea rdi, [rcx-48h] cmp rdx, 48h ; 'H' mov rsi, rax cmovz rsi, rdi cmp rcx, rax cmovz rsi, rdi mov rax, [rsi+8] sub rax, [rsi] xor ecx, ecx cmp byte ptr [rsi+10h], 0 cmovnz rcx, rax add [r14+20h], rcx mov rdi, rbx call _ZNKSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEEE3strEv; std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>::str(void) jmp short loc_64D4B jmp short $+2 loc_64DAB: mov rbx, rax lea rdi, [rsp+arg_8] call _ZNSt12_Vector_baseINSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS0_12basic_stringIcSt11char_traitsIcESaIcEEEEEEESaISC_EED2Ev; std::_Vector_base<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~_Vector_base() mov rdi, rbx call __Unwind_Resume
_QWORD * minja::Parser::consumeToken(_QWORD *a1, long long a2, long long a3, unsigned int a4) { long long v6; // r12 long long *v8; // rsi long long v9; // rcx long long *v10[9]; // [rsp+10h] [rbp-48h] BYREF v6 = *(_QWORD *)(a2 + 32); minja::Parser::consumeSpaces(a2, a4); memset(v10, 0, 32); if ( std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false>( *(long long **)(a2 + 32), *(_QWORD *)(a2 + 24), v10, a3, 0) && !std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::position(v10, 0LL) ) { v8 = v10[0]; if ( (long long *)((char *)v10[1] - (char *)v10[0]) == &qword_48 ) v8 = v10[1] - 9; if ( v10[1] == v10[0] ) v8 = v10[1] - 9; v9 = 0LL; if ( *((_BYTE *)v8 + 16) ) v9 = v8[1] - *v8; *(_QWORD *)(a2 + 32) += v9; std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>::str((long long)a1, v8); } else { *(_QWORD *)(a2 + 32) = v6; std::string::basic_string<std::allocator<char>>(a1, (long long)""); } std::_Vector_base<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~_Vector_base(v10); return a1; }
consumeToken: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R15,RDX MOV R14,RSI MOV RBX,RDI MOV R12,qword ptr [RSI + 0x20] MOV RDI,RSI MOV ESI,ECX CALL 0x00165be4 XORPS XMM0,XMM0 LEA RDX,[RSP + 0x10] MOVAPS xmmword ptr [RDX + 0x10],XMM0 MOVAPS xmmword ptr [RDX],XMM0 MOV RSI,qword ptr [R14 + 0x18] MOV RDI,qword ptr [R14 + 0x20] LAB_00164d13: MOV RCX,R15 XOR R8D,R8D CALL 0x001541b2 TEST AL,AL JZ 0x00164d33 LEA RDI,[RSP + 0x10] XOR ESI,ESI CALL 0x00165b6c TEST RAX,RAX JZ 0x00164d64 LAB_00164d33: MOV qword ptr [R14 + 0x20],R12 LAB_00164d37: LEA RSI,[0x1b411f] LEA RDX,[RSP + 0xf] MOV RDI,RBX CALL 0x00128f3a LAB_00164d4b: LEA RDI,[RSP + 0x10] CALL 0x001546e0 MOV RAX,RBX ADD RSP,0x38 POP RBX POP R12 POP R14 POP R15 RET LAB_00164d64: MOV RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x18] MOV RDX,RCX SUB RDX,RAX LEA RDI,[RCX + -0x48] CMP RDX,0x48 MOV RSI,RAX CMOVZ RSI,RDI CMP RCX,RAX CMOVZ RSI,RDI MOV RAX,qword ptr [RSI + 0x8] SUB RAX,qword ptr [RSI] XOR ECX,ECX CMP byte ptr [RSI + 0x10],0x0 CMOVNZ RCX,RAX ADD qword ptr [R14 + 0x20],RCX LAB_00164d9f: MOV RDI,RBX CALL 0x00156bea LAB_00164da7: JMP 0x00164d4b
/* minja::Parser::consumeToken(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char> > const&, minja::SpaceHandling) */ string * minja::Parser::consumeToken (string *param_1,Parser *param_2,int8 param_3,int4 param_4) { int8 uVar1; bool bVar2; long lVar3; long *plVar4; allocator local_49; long *local_48; long *plStack_40; int8 local_38; int8 uStack_30; uVar1 = *(int8 *)(param_2 + 0x20); consumeSpaces(param_2,param_4); local_38 = 0; uStack_30 = 0; local_48 = (long *)0x0; plStack_40 = (long *)0x0; /* try { // try from 00164d13 to 00164d2d has its CatchHandler @ 00164dab */ bVar2 = std::__detail:: __regex_algo_impl<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>,char,std::__cxx11::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false> (*(int8 *)(param_2 + 0x20),*(int8 *)(param_2 + 0x18),&local_48, param_3,0); if (bVar2) { lVar3 = std::__cxx11:: match_results<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>> ::position((match_results<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>> *)&local_48,0); if (lVar3 == 0) { plVar4 = local_48; if ((long)plStack_40 - (long)local_48 == 0x48) { plVar4 = plStack_40 + -9; } if (plStack_40 == local_48) { plVar4 = plStack_40 + -9; } lVar3 = 0; if ((char)plVar4[2] != '\0') { lVar3 = plVar4[1] - *plVar4; } *(long *)(param_2 + 0x20) = *(long *)(param_2 + 0x20) + lVar3; /* try { // try from 00164d9f to 00164da6 has its CatchHandler @ 00164dab */ std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>::str() ; goto LAB_00164d4b; } } *(int8 *)(param_2 + 0x20) = uVar1; /* try { // try from 00164d37 to 00164d4a has its CatchHandler @ 00164da9 */ std::__cxx11::string::string<std::allocator<char>>(param_1,"",&local_49); LAB_00164d4b: std:: _Vector_base<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>> ::~_Vector_base((_Vector_base<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>> *)&local_48); return param_1; }
23,439
get_tensor(ggml_context*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/examples/llava/clip.cpp
static struct ggml_tensor * get_tensor(struct ggml_context * ctx, const std::string & name) { struct ggml_tensor * cur = ggml_get_tensor(ctx, name.c_str()); if (!cur) { throw std::runtime_error(format("%s: unable to find tensor %s\n", __func__, name.c_str())); } return cur; }
O0
cpp
get_tensor(ggml_context*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): subq $0x58, %rsp movq %rdi, 0x50(%rsp) movq %rsi, 0x48(%rsp) movq 0x50(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x48(%rsp), %rdi callq 0x61230 movq 0x8(%rsp), %rdi movq %rax, %rsi callq 0x61840 movq %rax, 0x40(%rsp) cmpq $0x0, 0x40(%rsp) jne 0x81a26 movb $0x1, 0x13(%rsp) movl $0x10, %edi callq 0x618c0 movq %rax, (%rsp) movq 0x48(%rsp), %rdi callq 0x61230 movq %rax, %rcx leaq 0x1cfde3(%rip), %rsi # 0x25178a leaq 0x1cfdfa(%rip), %rdx # 0x2517a8 xorl %eax, %eax leaq 0x20(%rsp), %rdi callq 0x80b50 jmp 0x819bc movq (%rsp), %rdi leaq 0x20(%rsp), %rsi callq 0x61620 jmp 0x819cc movq (%rsp), %rdi movb $0x0, 0x13(%rsp) movq 0x2755d4(%rip), %rsi # 0x2f6fb0 movq 0x275595(%rip), %rdx # 0x2f6f78 callq 0x61ef0 jmp 0x81a3a movq %rax, %rcx movl %edx, %eax movq %rcx, 0x18(%rsp) movl %eax, 0x14(%rsp) jmp 0x81a12 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x18(%rsp) movl %eax, 0x14(%rsp) leaq 0x20(%rsp), %rdi callq 0x62cf8 testb $0x1, 0x13(%rsp) jne 0x81a1b jmp 0x81a24 movq (%rsp), %rdi callq 0x62500 jmp 0x81a30 movq 0x40(%rsp), %rax addq $0x58, %rsp retq movq 0x18(%rsp), %rdi callq 0x61ff0 nopw (%rax,%rax)
_ZL10get_tensorP12ggml_contextRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: sub rsp, 58h mov [rsp+58h+var_8], rdi mov [rsp+58h+var_10], rsi mov rax, [rsp+58h+var_8] mov [rsp+58h+var_50], rax mov rdi, [rsp+58h+var_10] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov rdi, [rsp+58h+var_50] mov rsi, rax call _ggml_get_tensor mov [rsp+58h+var_18], rax cmp [rsp+58h+var_18], 0 jnz loc_81A26 mov [rsp+58h+var_45], 1 mov edi, 10h; thrown_size call ___cxa_allocate_exception mov [rsp+58h+var_58], rax mov rdi, [rsp+58h+var_10] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov rcx, rax lea rsi, aSUnableToFindT; "%s: unable to find tensor %s\n" lea rdx, aGetTensor; "get_tensor" xor eax, eax lea rdi, [rsp+58h+var_38] call _ZL6formatB5cxx11PKcz; format(char const*,...) jmp short $+2 loc_819BC: mov rdi, [rsp+58h+var_58] lea rsi, [rsp+58h+var_38] call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) jmp short $+2 loc_819CC: mov rdi, [rsp+58h+var_58]; void * mov [rsp+58h+var_45], 0 mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) call ___cxa_throw jmp short loc_81A3A mov rcx, rax mov eax, edx mov [rsp+arg_10], rcx mov [rsp+arg_C], eax jmp short loc_81A12 mov rcx, rax mov eax, edx mov [rsp+arg_10], rcx mov [rsp+arg_C], eax lea rdi, [rsp+arg_18]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_81A12: test [rsp+arg_B], 1 jnz short loc_81A1B jmp short loc_81A24 loc_81A1B: mov rdi, [rsp+0]; void * call ___cxa_free_exception loc_81A24: jmp short loc_81A30 loc_81A26: mov rax, [rsp+58h+var_18] add rsp, 58h retn loc_81A30: mov rdi, [rsp+arg_10] call __Unwind_Resume loc_81A3A: nop word ptr [rax+rax+00h]
long long get_tensor( long long a1, long long a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, double a7, double a8, __m128 a9, __m128 a10) { long long v10; // rax long long v11; // rax long long v12; // r8 long long v13; // r9 __m128 v14; // xmm4 __m128 v15; // xmm5 char exception; // [rsp+0h] [rbp-58h] void *v18; // [rsp+0h] [rbp-58h] _BYTE v19[32]; // [rsp+20h] [rbp-38h] BYREF long long tensor; // [rsp+40h] [rbp-18h] long long v21; // [rsp+48h] [rbp-10h] long long v22; // [rsp+50h] [rbp-8h] v22 = a1; v21 = a2; v10 = std::string::c_str(a2); tensor = ggml_get_tensor(a1, v10); if ( !tensor ) { exception = (unsigned __int8)__cxa_allocate_exception(0x10uLL); v11 = std::string::c_str(v21); format[abi:cxx11]( (long long)v19, (long long)"%s: unable to find tensor %s\n", (long long)"get_tensor", v11, v12, v13, a3, a4, a5, a6, v14, v15, a9, a10, exception); std::runtime_error::runtime_error(v18, v19); __cxa_throw( v18, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } return tensor; }
get_tensor: SUB RSP,0x58 MOV qword ptr [RSP + 0x50],RDI MOV qword ptr [RSP + 0x48],RSI MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x48] CALL 0x00161230 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,RAX CALL 0x00161840 MOV qword ptr [RSP + 0x40],RAX CMP qword ptr [RSP + 0x40],0x0 JNZ 0x00181a26 MOV byte ptr [RSP + 0x13],0x1 MOV EDI,0x10 CALL 0x001618c0 MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RSP + 0x48] CALL 0x00161230 MOV RCX,RAX LAB_001819a0: LEA RSI,[0x35178a] LEA RDX,[0x3517a8] XOR EAX,EAX LEA RDI,[RSP + 0x20] CALL 0x00180b50 JMP 0x001819bc LAB_001819bc: MOV RDI,qword ptr [RSP] LEA RSI,[RSP + 0x20] CALL 0x00161620 JMP 0x001819cc LAB_001819cc: MOV RDI,qword ptr [RSP] MOV byte ptr [RSP + 0x13],0x0 MOV RSI,qword ptr [0x003f6fb0] MOV RDX,qword ptr [0x003f6f78] CALL 0x00161ef0 LAB_00181a26: MOV RAX,qword ptr [RSP + 0x40] ADD RSP,0x58 RET
/* get_tensor(ggml_context*, std::__cxx11::string const&) */ long get_tensor(ggml_context *param_1,string *param_2) { int8 uVar1; runtime_error *this; string local_38 [32]; long local_18; string *local_10; ggml_context *local_8; local_10 = param_2; local_8 = param_1; uVar1 = std::__cxx11::string::c_str(); local_18 = ggml_get_tensor(param_1,uVar1); if (local_18 == 0) { this = (runtime_error *)__cxa_allocate_exception(0x10); uVar1 = std::__cxx11::string::c_str(); /* try { // try from 001819a0 to 001819b9 has its CatchHandler @ 001819ea */ format_abi_cxx11_((char *)local_38,"%s: unable to find tensor %s\n","get_tensor",uVar1); /* try { // try from 001819bc to 001819e7 has its CatchHandler @ 001819fa */ std::runtime_error::runtime_error(this,local_38); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_003f6fb0,PTR__runtime_error_003f6f78); } return local_18; }
23,440
get_tensor(ggml_context*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/examples/llava/clip.cpp
static struct ggml_tensor * get_tensor(struct ggml_context * ctx, const std::string & name) { struct ggml_tensor * cur = ggml_get_tensor(ctx, name.c_str()); if (!cur) { throw std::runtime_error(format("%s: unable to find tensor %s\n", __func__, name.c_str())); } return cur; }
O3
cpp
get_tensor(ggml_context*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r14 pushq %rbx subq $0x20, %rsp movq %rsi, %r14 movq (%rsi), %rsi callq 0x1e0c0 testq %rax, %rax je 0x2fc67 addq $0x20, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x10, %edi callq 0x1d5b0 movq %rax, %rbx movq (%r14), %rcx leaq 0xdbe58(%rip), %rsi # 0x10bad6 leaq 0xdbe6f(%rip), %rdx # 0x10baf4 movq %rsp, %rdi xorl %eax, %eax callq 0x2f849 movb $0x1, %bpl movq %rsp, %rsi movq %rbx, %rdi callq 0x1e430 xorl %ebp, %ebp movq 0x126342(%rip), %rsi # 0x155fe8 movq 0x1262ab(%rip), %rdx # 0x155f58 movq %rbx, %rdi callq 0x1e5b0 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x2fcd3 movq 0x10(%rsp), %rsi incq %rsi callq 0x1dc50 testb %bpl, %bpl jne 0x2fcdd jmp 0x2fce5 movq %rax, %r14 movq %rbx, %rdi callq 0x1d8c0 movq %r14, %rdi callq 0x1e660
_ZL10get_tensorP12ggml_contextRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r14 push rbx sub rsp, 20h mov r14, rsi mov rsi, [rsi] call _ggml_get_tensor test rax, rax jz short loc_2FC67 add rsp, 20h pop rbx pop r14 pop rbp retn loc_2FC67: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rcx, [r14] lea rsi, aSUnableToFindT; "%s: unable to find tensor %s\n" lea rdx, aGetTensor; "get_tensor" mov rdi, rsp xor eax, eax call _ZL6formatB5cxx11PKcz; format(char const*,...) mov bpl, 1 mov rsi, rsp mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+38h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_2FCD3 mov rsi, [rsp+38h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2FCD3: test bpl, bpl jnz short loc_2FCDD jmp short loc_2FCE5 mov r14, rax loc_2FCDD: mov rdi, rbx; void * call ___cxa_free_exception loc_2FCE5: mov rdi, r14 call __Unwind_Resume
long long get_tensor( long long a1, long long *a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, double a7, double a8, __m128 a9, __m128 a10) { long long result; // rax void *exception; // rbx long long v12; // r8 long long v13; // r9 __m128 v14; // xmm4 __m128 v15; // xmm5 _QWORD v16[2]; // [rsp+0h] [rbp-38h] BYREF result = ggml_get_tensor(a1, *a2); if ( !result ) { exception = __cxa_allocate_exception(0x10uLL); format[abi:cxx11]( v16, (long long)"%s: unable to find tensor %s\n", (long long)"get_tensor", *a2, v12, v13, a3, a4, a5, a6, v14, v15, a9, a10, v16[0]); std::runtime_error::runtime_error(exception, v16); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } return result; }
get_tensor: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x20 MOV R14,RSI MOV RSI,qword ptr [RSI] CALL 0x0011e0c0 TEST RAX,RAX JZ 0x0012fc67 ADD RSP,0x20 POP RBX POP R14 POP RBP RET LAB_0012fc67: MOV EDI,0x10 CALL 0x0011d5b0 MOV RBX,RAX MOV RCX,qword ptr [R14] LAB_0012fc77: LEA RSI,[0x20bad6] LEA RDX,[0x20baf4] MOV RDI,RSP XOR EAX,EAX CALL 0x0012f849 MOV BPL,0x1 LAB_0012fc92: MOV RSI,RSP MOV RDI,RBX CALL 0x0011e430 XOR EBP,EBP MOV RSI,qword ptr [0x00255fe8] MOV RDX,qword ptr [0x00255f58] MOV RDI,RBX CALL 0x0011e5b0
/* get_tensor(ggml_context*, std::__cxx11::string const&) */ void get_tensor(ggml_context *param_1,string *param_2) { long lVar1; runtime_error *this; string asStack_38 [32]; lVar1 = ggml_get_tensor(param_1,*(int8 *)param_2); if (lVar1 != 0) { return; } this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0012fc77 to 0012fc8e has its CatchHandler @ 0012fcda */ format_abi_cxx11_((char *)asStack_38,"%s: unable to find tensor %s\n","get_tensor", *(int8 *)param_2); /* try { // try from 0012fc92 to 0012fcb4 has its CatchHandler @ 0012fcb5 */ std::runtime_error::runtime_error(this,asStack_38); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_00255fe8,PTR__runtime_error_00255f58); }
23,441
common_arg::to_string[abi:cxx11]()
monkey531[P]llama/common/arg.cpp
std::string common_arg::to_string() { // params for printing to console const static int n_leading_spaces = 40; const static int n_char_per_line_help = 70; // TODO: detect this based on current console std::string leading_spaces(n_leading_spaces, ' '); std::ostringstream ss; for (const auto arg : args) { if (arg == args.front()) { if (args.size() == 1) { ss << arg; } else { // first arg is usually abbreviation, we need padding to make it more beautiful auto tmp = std::string(arg) + ", "; auto spaces = std::string(std::max(0, 7 - (int)tmp.size()), ' '); ss << tmp << spaces; } } else { ss << arg << (arg != args.back() ? ", " : ""); } } if (value_hint) ss << " " << value_hint; if (value_hint_2) ss << " " << value_hint_2; if (ss.tellp() > n_leading_spaces - 3) { // current line is too long, add new line ss << "\n" << leading_spaces; } else { // padding between arg and help, same line ss << std::string(leading_spaces.size() - ss.tellp(), ' '); } const auto help_lines = break_str_into_lines(help, n_char_per_line_help); for (const auto & line : help_lines) { ss << (&line == &help_lines.front() ? "" : leading_spaces) << line << "\n"; } return ss.str(); }
O2
cpp
common_arg::to_string[abi:cxx11](): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x558, %rsp # imm = 0x558 movq %rsi, %r14 movq %rdi, 0x18(%rsp) leaq 0x50(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x40(%rsp), %rdi pushq $0x28 popq %rsi pushq $0x20 popq %rdx callq 0x23a20 leaq 0x260(%rsp), %rdi callq 0x23ba0 movq 0x60(%r14), %r15 movq 0x68(%r14), %r13 leaq 0x260(%rsp), %rbx leaq 0x3d8(%rsp), %rbp cmpq %r13, %r15 je 0x28040 movq (%r15), %r12 movq 0x60(%r14), %rax cmpq (%rax), %r12 je 0x27f8a movq %rbx, %rdi movq %r12, %rsi callq 0x238a0 movq 0x68(%r14), %rcx cmpq -0x8(%rcx), %r12 leaq 0x8a731(%rip), %rsi # 0xb26a3 leaq 0x86ba0(%rip), %rcx # 0xaeb19 cmoveq %rcx, %rsi movq %rax, %rdi callq 0x238a0 jmp 0x28037 movq 0x68(%r14), %rcx subq %rax, %rcx cmpq $0x8, %rcx jne 0x27fa7 movq %rbx, %rdi movq %r12, %rsi callq 0x238a0 jmp 0x28037 movq %rbp, %rdi movq %r12, %rsi leaq 0x20(%rsp), %rdx callq 0x2746a leaq 0xe0(%rsp), %rdi movq %rbp, %rsi leaq 0x8a6da(%rip), %rdx # 0xb26a3 callq 0x380bc movq %rbp, %rdi callq 0x241b8 pushq $0x7 popq %rax movl %eax, %esi subl 0xe8(%rsp), %esi testl %esi, %esi movl $0x0, %eax cmovlel %eax, %esi leaq 0x3e8(%rsp), %rax movq %rax, 0x3d8(%rsp) movq %rbp, %rdi pushq $0x20 popq %rdx callq 0x23a20 movq %rbx, %rdi leaq 0xe0(%rsp), %rsi callq 0x237c0 movq %rax, %rdi movq %rbp, %rsi callq 0x237c0 movq %rbp, %rdi callq 0x241b8 leaq 0xe0(%rsp), %rdi callq 0x241b8 addq $0x8, %r15 jmp 0x27f43 cmpq $0x0, 0x78(%r14) je 0x28067 leaq 0x8a4ff(%rip), %rsi # 0xb254d leaq 0x260(%rsp), %rdi callq 0x238a0 movq 0x78(%r14), %rsi movq %rax, %rdi callq 0x238a0 cmpq $0x0, 0x80(%r14) je 0x28094 leaq 0x8a4d5(%rip), %rsi # 0xb254d leaq 0x260(%rsp), %rdi callq 0x238a0 movq 0x80(%r14), %rsi movq %rax, %rdi callq 0x238a0 leaq 0x260(%rsp), %rdi callq 0x23750 cmpq $0x26, %rax jl 0x280ca leaq 0x86a6a(%rip), %rsi # 0xaeb18 leaq 0x260(%rsp), %rdi callq 0x238a0 leaq 0x40(%rsp), %rsi movq %rax, %rdi callq 0x237c0 jmp 0x28120 movq 0x48(%rsp), %rbx leaq 0x260(%rsp), %rdi callq 0x23750 subq %rax, %rbx leaq 0xf0(%rsp), %rax movq %rax, -0x10(%rax) leaq 0xe0(%rsp), %rdi pushq $0x20 popq %rdx movq %rbx, %rsi callq 0x23a20 leaq 0x260(%rsp), %rdi leaq 0xe0(%rsp), %rsi callq 0x237c0 leaq 0xe0(%rsp), %rdi callq 0x241b8 addq $0x90, %r14 leaq 0xa0(%rsp), %rdi movq %r14, %rsi callq 0x23c00 xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) andq $0x0, 0x10(%rsp) leaq 0x3d8(%rsp), %rdi leaq 0xa0(%rsp), %rsi pushq $0x8 popq %rdx callq 0x23eb0 leaq 0x70(%rsp), %rax movq %rax, -0x10(%rax) andq $0x0, -0x8(%rax) movb $0x0, (%rax) leaq 0xe0(%rsp), %r12 leaq 0x20(%rsp), %r13 movq %rsp, %rbx leaq 0x80(%rsp), %rbp leaq 0x8a3c1(%rip), %r15 # 0xb254d leaq 0xc0(%rsp), %r14 leaq 0x3d8(%rsp), %rdi leaq 0x60(%rsp), %rsi callq 0x23140 movq (%rax), %rcx movq -0x18(%rcx), %rcx testb $0x5, 0x20(%rax,%rcx) jne 0x282ce cmpq $0x46, 0x68(%rsp) jbe 0x2828f movq %r12, %rdi leaq 0x60(%rsp), %rsi pushq $0x8 popq %rdx callq 0x23eb0 leaq 0x30(%rsp), %rax movq %rax, 0x20(%rsp) andq $0x0, 0x28(%rsp) xorl %ecx, %ecx movb %cl, 0x30(%rsp) leaq 0x90(%rsp), %rax movq %rax, 0x80(%rsp) andq $0x0, 0x88(%rsp) movb %cl, 0x90(%rsp) movq %r12, %rdi movq %r13, %rsi callq 0x23b20 movq (%rax), %rcx movq -0x18(%rcx), %rcx testb $0x5, 0x20(%rax,%rcx) movq 0x88(%rsp), %rax jne 0x282a1 cmpq $0x1, %rax movq %rax, %rcx sbbq $-0x1, %rcx addq 0x28(%rsp), %rcx cmpq $0x47, %rcx jb 0x2825e testq %rax, %rax je 0x28251 movq %rbx, %rdi movq %rbp, %rsi callq 0x392ec movq %rbp, %rdi movq %r13, %rsi callq 0x234c0 jmp 0x2820a testq %rax, %rax leaq 0x868b1(%rip), %rsi # 0xaeb19 cmovneq %r15, %rsi movq %r14, %rdi movq %r13, %rdx callq 0x39318 movq %rbp, %rdi movq %r14, %rsi callq 0x24120 movq %r14, %rdi callq 0x241b8 jmp 0x2820a movq %rbx, %rdi leaq 0x60(%rsp), %rsi callq 0x392ec jmp 0x28194 testq %rax, %rax je 0x282b1 movq %rbx, %rdi movq %rbp, %rsi callq 0x392ec movq %rbp, %rdi callq 0x241b8 movq %r13, %rdi callq 0x241b8 movq %r12, %rdi callq 0x23420 jmp 0x28194 leaq 0x60(%rsp), %rdi callq 0x241b8 leaq 0x3d8(%rsp), %rdi callq 0x23420 leaq 0xa0(%rsp), %rdi callq 0x241b8 movq (%rsp), %r14 movq 0x8(%rsp), %r15 leaq 0xe0(%rsp), %r12 leaq 0x260(%rsp), %r13 leaq 0x86806(%rip), %rbp # 0xaeb18 cmpq %r15, %r14 je 0x28378 movq (%rsp), %rbx cmpq %rbx, %r14 je 0x2832f movq %r12, %rdi leaq 0x40(%rsp), %rsi callq 0x23c00 jmp 0x28346 movq %r12, %rdi leaq 0x867e0(%rip), %rsi # 0xaeb19 leaq 0x3d8(%rsp), %rdx callq 0x2746a movq %r13, %rdi movq %r12, %rsi callq 0x237c0 movq %rax, %rdi movq %r14, %rsi callq 0x237c0 movq %rax, %rdi movq %rbp, %rsi callq 0x238a0 movq %r12, %rdi callq 0x241b8 cmpq %rbx, %r14 addq $0x20, %r14 jmp 0x28312 leaq 0x268(%rsp), %rsi movq 0x18(%rsp), %rbx movq %rbx, %rdi callq 0x23da0 movq %rsp, %rdi callq 0x26e4a leaq 0x260(%rsp), %rdi callq 0x231e0 leaq 0x40(%rsp), %rdi callq 0x241b8 movq %rbx, %rax addq $0x558, %rsp # imm = 0x558 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x283e2 jmp 0x2841d jmp 0x2841d movq %rax, %r15 jmp 0x2843d movq %rax, %r15 jmp 0x28499 jmp 0x2841d jmp 0x2841d movq %rax, %r15 jmp 0x284bb jmp 0x2841d movq %rax, %r15 jmp 0x2840b movq %rax, %r15 leaq 0x3d8(%rsp), %rdi jmp 0x284a9 jmp 0x2841d jmp 0x2845b movq %rax, %r15 leaq 0x3d8(%rsp), %rdi callq 0x241b8 leaq 0xe0(%rsp), %rdi jmp 0x284a9 movq %rax, %r15 jmp 0x2843a movq %rax, %r15 jmp 0x284ae movq %rax, %r15 jmp 0x28482 movq %rax, %r15 leaq 0xe0(%rsp), %rdi callq 0x241b8 cmpq %rbx, %r14 movq %rsp, %rdi callq 0x26e4a jmp 0x284ae movq %rax, %r15 leaq 0xc0(%rsp), %rdi callq 0x241b8 jmp 0x2845e jmp 0x2845b movq %rax, %r15 leaq 0x80(%rsp), %rdi callq 0x241b8 leaq 0x20(%rsp), %rdi callq 0x241b8 leaq 0xe0(%rsp), %rdi callq 0x23420 leaq 0x60(%rsp), %rdi callq 0x241b8 leaq 0x3d8(%rsp), %rdi callq 0x23420 movq %rsp, %rdi callq 0x26e4a leaq 0xa0(%rsp), %rdi callq 0x241b8 leaq 0x260(%rsp), %rdi callq 0x231e0 leaq 0x40(%rsp), %rdi callq 0x241b8 movq %r15, %rdi callq 0x23f80
_ZN10common_arg9to_stringB5cxx11Ev: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 558h mov r14, rsi mov [rsp+588h+var_570], rdi lea rax, [rsp+588h+var_538] mov [rax-10h], rax lea rdi, [rsp+588h+var_548] push 28h ; '(' pop rsi push 20h ; ' ' pop rdx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) lea rdi, [rsp+588h+var_328] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void) mov r15, [r14+60h] mov r13, [r14+68h] lea rbx, [rsp+588h+var_328] lea rbp, [rsp+588h+var_1B0] loc_27F43: cmp r15, r13 jz loc_28040 mov r12, [r15] mov rax, [r14+60h] cmp r12, [rax] jz short loc_27F8A mov rdi, rbx mov rsi, r12 call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rcx, [r14+68h] cmp r12, [rcx-8] lea rsi, aZuD+6; ", " lea rcx, aErrorWhileHand_0+34h; "" cmovz rsi, rcx mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp loc_28037 loc_27F8A: mov rcx, [r14+68h] sub rcx, rax cmp rcx, 8 jnz short loc_27FA7 mov rdi, rbx mov rsi, r12 call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp loc_28037 loc_27FA7: mov rdi, rbp mov rsi, r12 lea rdx, [rsp+588h+var_568] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+588h+var_4A8] mov rsi, rbp lea rdx, aZuD+6; ", " call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) mov rdi, rbp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() push 7 pop rax mov esi, eax sub esi, [rsp+588h+var_4A0] test esi, esi mov eax, 0 cmovle esi, eax lea rax, [rsp+588h+var_1A0] mov [rsp+588h+var_1B0], rax mov rdi, rbp push 20h ; ' ' pop rdx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) mov rdi, rbx lea rsi, [rsp+588h+var_4A8] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov rdi, rax mov rsi, rbp call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov rdi, rbp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+588h+var_4A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_28037: add r15, 8 jmp loc_27F43 loc_28040: cmp qword ptr [r14+78h], 0 jz short loc_28067 lea rsi, aForMessageInMe+144h; " " lea rdi, [rsp+588h+var_328] call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rsi, [r14+78h] mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) loc_28067: cmp qword ptr [r14+80h], 0 jz short loc_28094 lea rsi, aForMessageInMe+144h; " " lea rdi, [rsp+588h+var_328] call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rsi, [r14+80h] mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) loc_28094: lea rdi, [rsp+588h+var_328]; this call __ZNSo5tellpEv; std::ostream::tellp(void) cmp rax, 26h ; '&' jl short loc_280CA lea rsi, aErrorWhileHand_0+33h; "\n" lea rdi, [rsp+588h+var_328] call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) lea rsi, [rsp+588h+var_548] mov rdi, rax call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) jmp short loc_28120 loc_280CA: mov rbx, [rsp+588h+var_540] lea rdi, [rsp+588h+var_328]; this call __ZNSo5tellpEv; std::ostream::tellp(void) sub rbx, rax lea rax, [rsp+588h+var_498] mov [rax-10h], rax lea rdi, [rsp+588h+var_4A8] push 20h ; ' ' pop rdx mov rsi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) lea rdi, [rsp+588h+var_328] lea rsi, [rsp+588h+var_4A8] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) lea rdi, [rsp+588h+var_4A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_28120: add r14, 90h lea rdi, [rsp+588h+var_4E8] mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) xorps xmm0, xmm0 movaps [rsp+588h+var_588], xmm0 and [rsp+588h+var_578], 0 lea rdi, [rsp+588h+var_1B0] lea rsi, [rsp+588h+var_4E8] push 8 pop rdx call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode) lea rax, [rsp+588h+var_518] mov [rax-10h], rax and qword ptr [rax-8], 0 mov byte ptr [rax], 0 lea r12, [rsp+588h+var_4A8] lea r13, [rsp+588h+var_568] mov rbx, rsp lea rbp, [rsp+588h+var_508] lea r15, aForMessageInMe+144h; " " lea r14, [rsp+588h+var_4C8] loc_28194: lea rdi, [rsp+588h+var_1B0] lea rsi, [rsp+588h+var_528] call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &) mov rcx, [rax] mov rcx, [rcx-18h] test byte ptr [rax+rcx+20h], 5 jnz loc_282CE cmp [rsp+588h+var_520], 46h ; 'F' jbe loc_2828F mov rdi, r12 lea rsi, [rsp+588h+var_528] push 8 pop rdx call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode) lea rax, [rsp+588h+var_558] mov [rsp+588h+var_568], rax and [rsp+588h+var_560], 0 xor ecx, ecx mov [rsp+588h+var_558], cl lea rax, [rsp+588h+var_4F8] mov [rsp+588h+var_508], rax and [rsp+588h+var_500], 0 mov [rsp+588h+var_4F8], cl loc_2820A: mov rdi, r12 mov rsi, r13 call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &) mov rcx, [rax] mov rcx, [rcx-18h] test byte ptr [rax+rcx+20h], 5 mov rax, [rsp+588h+var_500] jnz short loc_282A1 cmp rax, 1 mov rcx, rax sbb rcx, 0FFFFFFFFFFFFFFFFh add rcx, [rsp+588h+var_560] cmp rcx, 47h ; 'G' jb short loc_2825E test rax, rax jz short loc_28251 mov rdi, rbx mov rsi, rbp call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_; std::vector<std::string>::push_back(std::string const&) loc_28251: mov rdi, rbp mov rsi, r13 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) jmp short loc_2820A loc_2825E: test rax, rax lea rsi, aErrorWhileHand_0+34h; "" cmovnz rsi, r15 mov rdi, r14 mov rdx, r13 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) mov rdi, rbp mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&) mov rdi, r14; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp loc_2820A loc_2828F: mov rdi, rbx lea rsi, [rsp+588h+var_528] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_; std::vector<std::string>::push_back(std::string const&) jmp loc_28194 loc_282A1: test rax, rax jz short loc_282B1 mov rdi, rbx mov rsi, rbp call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_; std::vector<std::string>::push_back(std::string const&) loc_282B1: mov rdi, rbp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r13; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r12 call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream() jmp loc_28194 loc_282CE: lea rdi, [rsp+588h+var_528]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+588h+var_1B0] call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream() lea rdi, [rsp+588h+var_4E8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov r14, qword ptr [rsp+588h+var_588] mov r15, qword ptr [rsp+588h+var_588+8] lea r12, [rsp+588h+var_4A8] lea r13, [rsp+588h+var_328] lea rbp, aErrorWhileHand_0+33h; "\n" loc_28312: cmp r14, r15 jz short loc_28378 mov rbx, qword ptr [rsp+588h+var_588] cmp r14, rbx jz short loc_2832F mov rdi, r12 lea rsi, [rsp+588h+var_548] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) jmp short loc_28346 loc_2832F: mov rdi, r12 lea rsi, aErrorWhileHand_0+34h; "" lea rdx, [rsp+588h+var_1B0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) loc_28346: mov rdi, r13 mov rsi, r12 call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov rdi, rax mov rsi, r14 call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov rdi, rax mov rsi, rbp call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rdi, r12; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() cmp r14, rbx add r14, 20h ; ' ' jmp short loc_28312 loc_28378: lea rsi, [rsp+588h+var_320] mov rbx, [rsp+588h+var_570] mov rdi, rbx call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov rdi, rsp call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea rdi, [rsp+588h+var_328] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+588h+var_548]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, rbx add rsp, 558h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_283E2 jmp short loc_2841D jmp short loc_2841D mov r15, rax jmp short loc_2843D mov r15, rax jmp loc_28499 jmp short loc_2841D jmp short loc_2841D mov r15, rax jmp loc_284BB jmp short loc_2841D loc_283E2: mov r15, rax jmp short loc_2840B mov r15, rax lea rdi, [rsp+arg_3D0] jmp loc_284A9 jmp short loc_2841D jmp short loc_2845B mov r15, rax lea rdi, [rsp+arg_3D0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_2840B: lea rdi, [rsp+arg_D8] jmp loc_284A9 mov r15, rax jmp short loc_2843A loc_2841D: mov r15, rax jmp loc_284AE mov r15, rax jmp short loc_28482 mov r15, rax lea rdi, [rsp+arg_D8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_2843A: cmp r14, rbx loc_2843D: mov rdi, rsp call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() jmp short loc_284AE mov r15, rax lea rdi, [rsp+arg_B8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_2845E jmp short $+2 loc_2845B: mov r15, rax loc_2845E: lea rdi, [rsp+arg_78]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+arg_18]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+arg_D8] call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream() loc_28482: lea rdi, [rsp+arg_58]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+arg_3D0] call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream() loc_28499: mov rdi, rsp call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea rdi, [rsp+arg_98]; void * loc_284A9: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_284AE: lea rdi, [rsp+arg_258] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream() loc_284BB: lea rdi, [rsp+arg_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r15 call __Unwind_Resume
long long common_arg::to_string[abi:cxx11](long long a1, _QWORD *a2) { long long *v3; // r15 long long *v4; // r13 long long v5; // r12 _QWORD *v6; // rax long long v7; // rax char *v8; // rsi long long v9; // rsi long long v10; // rax long long v11; // rax long long v12; // rax long long v13; // rax long long v14; // rbx long long v15; // rax _QWORD *v16; // rax _QWORD *v17; // rax char *v18; // rsi long long i; // r14 long long v20; // r15 long long v21; // rax long long v22; // rax long long v23; // rbx __int128 v25; // [rsp+0h] [rbp-588h] BYREF long long v26; // [rsp+10h] [rbp-578h] long long v27; // [rsp+18h] [rbp-570h] char *v28; // [rsp+20h] [rbp-568h] BYREF long long v29; // [rsp+28h] [rbp-560h] char v30; // [rsp+30h] [rbp-558h] BYREF _QWORD v31[2]; // [rsp+40h] [rbp-548h] BYREF char v32; // [rsp+50h] [rbp-538h] BYREF char *v33; // [rsp+60h] [rbp-528h] BYREF unsigned long long v34; // [rsp+68h] [rbp-520h] char v35; // [rsp+70h] [rbp-518h] BYREF char *v36; // [rsp+80h] [rbp-508h] BYREF long long v37; // [rsp+88h] [rbp-500h] char v38; // [rsp+90h] [rbp-4F8h] BYREF _BYTE v39[32]; // [rsp+A0h] [rbp-4E8h] BYREF _BYTE v40[32]; // [rsp+C0h] [rbp-4C8h] BYREF char *v41; // [rsp+E0h] [rbp-4A8h] BYREF int v42; // [rsp+E8h] [rbp-4A0h] char v43; // [rsp+F0h] [rbp-498h] BYREF _BYTE v44[8]; // [rsp+260h] [rbp-328h] BYREF _BYTE v45[368]; // [rsp+268h] [rbp-320h] BYREF _QWORD v46[2]; // [rsp+3D8h] [rbp-1B0h] BYREF char v47; // [rsp+3E8h] [rbp-1A0h] BYREF v27 = a1; v31[0] = &v32; std::string::_M_construct(v31, 40LL, 32LL); std::ostringstream::basic_ostringstream(v44); v3 = (long long *)a2[12]; v4 = (long long *)a2[13]; while ( v3 != v4 ) { v5 = *v3; v6 = (_QWORD *)a2[12]; if ( *v3 == *v6 ) { if ( a2[13] - (_QWORD)v6 == 8LL ) { std::operator<<<std::char_traits<char>>(v44, *v3); } else { std::string::basic_string<std::allocator<char>>(v46, *v3); std::operator+<char>(&v41, v46, ", "); std::string::~string(v46); v9 = (unsigned int)(7 - v42); if ( 7 - v42 <= 0 ) v9 = 0LL; v46[0] = &v47; std::string::_M_construct(v46, v9, 32LL); v10 = std::operator<<<char>(v44, &v41); std::operator<<<char>(v10, v46); std::string::~string(v46); std::string::~string(&v41); } } else { v7 = std::operator<<<std::char_traits<char>>(v44, *v3); v8 = ", "; if ( v5 == *(_QWORD *)(a2[13] - 8LL) ) v8 = ""; std::operator<<<std::char_traits<char>>(v7, v8); } ++v3; } if ( a2[15] ) { v11 = std::operator<<<std::char_traits<char>>(v44, " "); std::operator<<<std::char_traits<char>>(v11, a2[15]); } if ( a2[16] ) { v12 = std::operator<<<std::char_traits<char>>(v44, " "); std::operator<<<std::char_traits<char>>(v12, a2[16]); } if ( (long long)std::ostream::tellp((std::ostream *)v44) < 38 ) { v14 = v31[1]; v15 = std::ostream::tellp((std::ostream *)v44); v41 = &v43; std::string::_M_construct(&v41, v14 - v15, 32LL); std::operator<<<char>(v44, &v41); std::string::~string(&v41); } else { v13 = std::operator<<<std::char_traits<char>>(v44, "\n"); std::operator<<<char>(v13, v31); } std::string::basic_string(v39, a2 + 18); v25 = 0LL; v26 = 0LL; std::istringstream::basic_istringstream(v46, v39, 8LL); v33 = &v35; v34 = 0LL; v35 = 0; while ( 1 ) { v16 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(v46, &v33); if ( (*((_BYTE *)v16 + *(_QWORD *)(*v16 - 24LL) + 32) & 5) != 0 ) break; if ( v34 <= 0x46 ) { std::vector<std::string>::push_back(&v25, &v33); } else { std::istringstream::basic_istringstream(&v41, &v33, 8LL); v28 = &v30; v29 = 0LL; v30 = 0; v36 = &v38; v37 = 0LL; v38 = 0; while ( 1 ) { v17 = (_QWORD *)std::operator>><char>(&v41, &v28); if ( (*((_BYTE *)v17 + *(_QWORD *)(*v17 - 24LL) + 32) & 5) != 0 ) break; if ( v29 + v37 - ((unsigned long long)(v37 == 0) - 1) < 0x47 ) { v18 = ""; if ( v37 ) v18 = " "; std::operator+<char>(v40, v18, &v28); std::string::append(&v36, v40); std::string::~string(v40); } else { if ( v37 ) std::vector<std::string>::push_back(&v25, &v36); std::string::_M_assign(&v36, &v28); } } if ( v37 ) std::vector<std::string>::push_back(&v25, &v36); std::string::~string(&v36); std::string::~string(&v28); std::istringstream::~istringstream(&v41); } } std::string::~string(&v33); std::istringstream::~istringstream(v46); std::string::~string(v39); v20 = *((_QWORD *)&v25 + 1); for ( i = v25; i != v20; i += 32LL ) { if ( i == (_QWORD)v25 ) std::string::basic_string<std::allocator<char>>(&v41, (long long)""); else std::string::basic_string(&v41, v31); v21 = std::operator<<<char>(v44, &v41); v22 = std::operator<<<char>(v21, i); std::operator<<<std::char_traits<char>>(v22, "\n"); std::string::~string(&v41); } v23 = v27; std::stringbuf::str(v27, v45); std::vector<std::string>::~vector((long long)&v25); std::ostringstream::~ostringstream(v44); std::string::~string(v31); return v23; }
to_string[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x558 MOV R14,RSI MOV qword ptr [RSP + 0x18],RDI LEA RAX,[RSP + 0x50] MOV qword ptr [RAX + -0x10],RAX LEA RDI,[RSP + 0x40] PUSH 0x28 POP RSI PUSH 0x20 POP RDX CALL 0x00123a20 LAB_00127f1e: LEA RDI,[RSP + 0x260] CALL 0x00123ba0 MOV R15,qword ptr [R14 + 0x60] MOV R13,qword ptr [R14 + 0x68] LEA RBX,[RSP + 0x260] LEA RBP,[RSP + 0x3d8] LAB_00127f43: CMP R15,R13 JZ 0x00128040 MOV R12,qword ptr [R15] MOV RAX,qword ptr [R14 + 0x60] CMP R12,qword ptr [RAX] JZ 0x00127f8a LAB_00127f58: MOV RDI,RBX MOV RSI,R12 CALL 0x001238a0 MOV RCX,qword ptr [R14 + 0x68] CMP R12,qword ptr [RCX + -0x8] LEA RSI,[0x1b26a3] LEA RCX,[0x1aeb19] CMOVZ RSI,RCX MOV RDI,RAX CALL 0x001238a0 JMP 0x00128037 LAB_00127f8a: MOV RCX,qword ptr [R14 + 0x68] SUB RCX,RAX CMP RCX,0x8 JNZ 0x00127fa7 MOV RDI,RBX MOV RSI,R12 CALL 0x001238a0 JMP 0x00128037 LAB_00127fa7: MOV RDI,RBP MOV RSI,R12 LEA RDX,[RSP + 0x20] CALL 0x0012746a LAB_00127fb7: LEA RDI,[RSP + 0xe0] MOV RSI,RBP LEA RDX,[0x1b26a3] CALL 0x001380bc MOV RDI,RBP CALL 0x001241b8 PUSH 0x7 POP RAX MOV ESI,EAX SUB ESI,dword ptr [RSP + 0xe8] TEST ESI,ESI MOV EAX,0x0 CMOVLE ESI,EAX LEA RAX,[RSP + 0x3e8] MOV qword ptr [RSP + 0x3d8],RAX LAB_00127ffc: MOV RDI,RBP PUSH 0x20 POP RDX CALL 0x00123a20 LAB_00128007: MOV RDI,RBX LEA RSI,[RSP + 0xe0] CALL 0x001237c0 MOV RDI,RAX MOV RSI,RBP CALL 0x001237c0 MOV RDI,RBP CALL 0x001241b8 LEA RDI,[RSP + 0xe0] CALL 0x001241b8 LAB_00128037: ADD R15,0x8 JMP 0x00127f43 LAB_00128040: CMP qword ptr [R14 + 0x78],0x0 JZ 0x00128067 LAB_00128047: LEA RSI,[0x1b254d] LEA RDI,[RSP + 0x260] CALL 0x001238a0 MOV RSI,qword ptr [R14 + 0x78] MOV RDI,RAX CALL 0x001238a0 LAB_00128067: CMP qword ptr [R14 + 0x80],0x0 JZ 0x00128094 LEA RSI,[0x1b254d] LEA RDI,[RSP + 0x260] CALL 0x001238a0 MOV RSI,qword ptr [R14 + 0x80] MOV RDI,RAX CALL 0x001238a0 LAB_00128094: LEA RDI,[RSP + 0x260] CALL 0x00123750 CMP RAX,0x26 JL 0x001280ca LAB_001280a7: LEA RSI,[0x1aeb18] LEA RDI,[RSP + 0x260] CALL 0x001238a0 LEA RSI,[RSP + 0x40] MOV RDI,RAX CALL 0x001237c0 JMP 0x00128120 LAB_001280ca: MOV RBX,qword ptr [RSP + 0x48] LAB_001280cf: LEA RDI,[RSP + 0x260] CALL 0x00123750 SUB RBX,RAX LEA RAX,[RSP + 0xf0] MOV qword ptr [RAX + -0x10],RAX LAB_001280eb: LEA RDI,[RSP + 0xe0] PUSH 0x20 POP RDX MOV RSI,RBX CALL 0x00123a20 LAB_001280fe: LEA RDI,[RSP + 0x260] LEA RSI,[RSP + 0xe0] CALL 0x001237c0 LEA RDI,[RSP + 0xe0] CALL 0x001241b8 LAB_00128120: ADD R14,0x90 LAB_00128127: LEA RDI,[RSP + 0xa0] MOV RSI,R14 CALL 0x00123c00 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 AND qword ptr [RSP + 0x10],0x0 LAB_00128144: LEA RDI,[RSP + 0x3d8] LEA RSI,[RSP + 0xa0] PUSH 0x8 POP RDX CALL 0x00123eb0 LEA RAX,[RSP + 0x70] MOV qword ptr [RAX + -0x10],RAX AND qword ptr [RAX + -0x8],0x0 MOV byte ptr [RAX],0x0 LEA R12,[RSP + 0xe0] LEA R13,[RSP + 0x20] MOV RBX,RSP LEA RBP,[RSP + 0x80] LEA R15,[0x1b254d] LEA R14,[RSP + 0xc0] LAB_00128194: LEA RDI,[RSP + 0x3d8] LEA RSI,[RSP + 0x60] CALL 0x00123140 MOV RCX,qword ptr [RAX] MOV RCX,qword ptr [RCX + -0x18] TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5 JNZ 0x001282ce CMP qword ptr [RSP + 0x68],0x46 JBE 0x0012828f MOV RDI,R12 LEA RSI,[RSP + 0x60] PUSH 0x8 POP RDX CALL 0x00123eb0 LEA RAX,[RSP + 0x30] MOV qword ptr [RSP + 0x20],RAX AND qword ptr [RSP + 0x28],0x0 XOR ECX,ECX MOV byte ptr [RSP + 0x30],CL LEA RAX,[RSP + 0x90] MOV qword ptr [RSP + 0x80],RAX AND qword ptr [RSP + 0x88],0x0 MOV byte ptr [RSP + 0x90],CL LAB_0012820a: MOV RDI,R12 MOV RSI,R13 CALL 0x00123b20 MOV RCX,qword ptr [RAX] MOV RCX,qword ptr [RCX + -0x18] TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5 MOV RAX,qword ptr [RSP + 0x88] JNZ 0x001282a1 CMP RAX,0x1 MOV RCX,RAX SBB RCX,-0x1 ADD RCX,qword ptr [RSP + 0x28] CMP RCX,0x47 JC 0x0012825e TEST RAX,RAX JZ 0x00128251 MOV RDI,RBX MOV RSI,RBP CALL 0x001392ec LAB_00128251: MOV RDI,RBP MOV RSI,R13 CALL 0x001234c0 JMP 0x0012820a LAB_0012825e: TEST RAX,RAX LEA RSI,[0x1aeb19] CMOVNZ RSI,R15 LAB_0012826c: MOV RDI,R14 MOV RDX,R13 CALL 0x00139318 LAB_00128277: MOV RDI,RBP MOV RSI,R14 CALL 0x00124120 MOV RDI,R14 CALL 0x001241b8 JMP 0x0012820a LAB_0012828f: MOV RDI,RBX LEA RSI,[RSP + 0x60] CALL 0x001392ec JMP 0x00128194 LAB_001282a1: TEST RAX,RAX JZ 0x001282b1 LAB_001282a6: MOV RDI,RBX MOV RSI,RBP CALL 0x001392ec LAB_001282b1: MOV RDI,RBP CALL 0x001241b8 MOV RDI,R13 CALL 0x001241b8 MOV RDI,R12 CALL 0x00123420 JMP 0x00128194 LAB_001282ce: LEA RDI,[RSP + 0x60] CALL 0x001241b8 LEA RDI,[RSP + 0x3d8] CALL 0x00123420 LEA RDI,[RSP + 0xa0] CALL 0x001241b8 MOV R14,qword ptr [RSP] MOV R15,qword ptr [RSP + 0x8] LEA R12,[RSP + 0xe0] LEA R13,[RSP + 0x260] LEA RBP,[0x1aeb18] LAB_00128312: CMP R14,R15 JZ 0x00128378 MOV RBX,qword ptr [RSP] CMP R14,RBX JZ 0x0012832f LAB_00128320: MOV RDI,R12 LEA RSI,[RSP + 0x40] CALL 0x00123c00 JMP 0x00128346 LAB_0012832f: MOV RDI,R12 LEA RSI,[0x1aeb19] LEA RDX,[RSP + 0x3d8] CALL 0x0012746a LAB_00128346: MOV RDI,R13 MOV RSI,R12 CALL 0x001237c0 MOV RDI,RAX MOV RSI,R14 CALL 0x001237c0 MOV RDI,RAX MOV RSI,RBP CALL 0x001238a0 MOV RDI,R12 CALL 0x001241b8 CMP R14,RBX ADD R14,0x20 JMP 0x00128312 LAB_00128378: LEA RSI,[RSP + 0x268] LAB_00128380: MOV RBX,qword ptr [RSP + 0x18] MOV RDI,RBX CALL 0x00123da0 LAB_0012838d: MOV RDI,RSP CALL 0x00126e4a LEA RDI,[RSP + 0x260] CALL 0x001231e0 LEA RDI,[RSP + 0x40] CALL 0x001241b8 MOV RAX,RBX ADD RSP,0x558 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_arg::to_string[abi:cxx11]() */ int8 common_arg::to_string_abi_cxx11_(void) { int8 *puVar1; char *pcVar2; int iVar3; char cVar4; ostream *poVar5; long lVar6; istream *piVar7; long in_RSI; char *pcVar8; string *psVar9; int8 in_RDI; string *psVar10; int8 *puVar11; string *local_588; string *psStack_580; int8 local_578; int8 local_570; int1 *local_568; long local_560; int1 local_558 [16]; int1 *local_548; char local_540; int1 local_538 [16]; int1 *local_528; ulong local_520; int1 local_518 [16]; int1 *local_508; long local_500; int1 local_4f8 [16]; string local_4e8 [32]; string local_4c8 [32]; int1 *local_4a8; int local_4a0; int1 local_498 [368]; ostringstream local_328 [376]; int1 *local_1b0 [2]; int1 local_1a0 [368]; local_548 = local_538; local_570 = in_RDI; std::__cxx11::string::_M_construct((ulong)&local_548,'('); /* try { // try from 00127f1e to 00127f2a has its CatchHandler @ 001283d8 */ std::__cxx11::ostringstream::ostringstream(local_328); puVar1 = *(int8 **)(in_RSI + 0x68); for (puVar11 = *(int8 **)(in_RSI + 0x60); puVar11 != puVar1; puVar11 = puVar11 + 1) { pcVar2 = (char *)*puVar11; if (pcVar2 == (char *)**(int8 **)(in_RSI + 0x60)) { if (*(long *)(in_RSI + 0x68) - (long)*(int8 **)(in_RSI + 0x60) == 8) { std::operator<<((ostream *)local_328,pcVar2); } else { /* try { // try from 00127fa7 to 00127fb6 has its CatchHandler @ 001283f7 */ std::__cxx11::string::string<std::allocator<char>> ((string *)local_1b0,pcVar2,(allocator *)&local_568); /* try { // try from 00127fb7 to 00127fcd has its CatchHandler @ 001283e7 */ std::operator+((string *)&local_4a8,(char *)local_1b0); std::__cxx11::string::~string((string *)local_1b0); iVar3 = 7 - local_4a0; if (7 - local_4a0 < 1) { iVar3 = 0; } local_1b0[0] = local_1a0; /* try { // try from 00127ffc to 00128006 has its CatchHandler @ 001283e2 */ std::__cxx11::string::_M_construct((ulong)local_1b0,(char)iVar3); /* try { // try from 00128007 to 00128021 has its CatchHandler @ 001283fb */ poVar5 = std::operator<<((ostream *)local_328,(string *)&local_4a8); std::operator<<(poVar5,(string *)local_1b0); std::__cxx11::string::~string((string *)local_1b0); std::__cxx11::string::~string((string *)&local_4a8); } } else { /* try { // try from 00127f58 to 00127fa1 has its CatchHandler @ 0012841d */ poVar5 = std::operator<<((ostream *)local_328,pcVar2); pcVar8 = ", "; if (pcVar2 == *(char **)(*(long *)(in_RSI + 0x68) + -8)) { pcVar8 = ""; } std::operator<<(poVar5,pcVar8); } } if (*(long *)(in_RSI + 0x78) != 0) { /* try { // try from 00128047 to 00128093 has its CatchHandler @ 001283e0 */ poVar5 = std::operator<<((ostream *)local_328," "); std::operator<<(poVar5,*(char **)(in_RSI + 0x78)); } if (*(long *)(in_RSI + 0x80) != 0) { poVar5 = std::operator<<((ostream *)local_328," "); std::operator<<(poVar5,*(char **)(in_RSI + 0x80)); } /* try { // try from 00128094 to 001280a0 has its CatchHandler @ 001283d6 */ lVar6 = std::ostream::tellp(); if (lVar6 < 0x26) { /* try { // try from 001280cf to 001280db has its CatchHandler @ 001283c5 */ cVar4 = std::ostream::tellp(); local_4a8 = local_498; /* try { // try from 001280eb to 001280fd has its CatchHandler @ 001283c3 */ std::__cxx11::string::_M_construct((ulong)&local_4a8,local_540 - cVar4); /* try { // try from 001280fe to 00128112 has its CatchHandler @ 001283c1 */ std::operator<<((ostream *)local_328,(string *)&local_4a8); std::__cxx11::string::~string((string *)&local_4a8); } else { /* try { // try from 001280a7 to 001280c7 has its CatchHandler @ 001283e0 */ poVar5 = std::operator<<((ostream *)local_328,"\n"); std::operator<<(poVar5,(string *)&local_548); } /* try { // try from 00128127 to 00128136 has its CatchHandler @ 001283d4 */ std::__cxx11::string::string(local_4e8,(string *)(in_RSI + 0x90)); local_588 = (string *)0x0; psStack_580 = (string *)0x0; local_578 = 0; /* try { // try from 00128144 to 0012815b has its CatchHandler @ 001283cc */ std::__cxx11::istringstream::istringstream((istringstream *)local_1b0,local_4e8,8); local_528 = local_518; local_520 = 0; local_518[0] = 0; while( true ) { /* try { // try from 00128194 to 001281d3 has its CatchHandler @ 00128425 */ piVar7 = std::getline<char,std::char_traits<char>,std::allocator<char>> ((istream *)local_1b0,(string *)&local_528); if (((byte)piVar7[*(long *)(*(long *)piVar7 + -0x18) + 0x20] & 5) != 0) break; if (local_520 < 0x47) { /* try { // try from 0012828f to 0012829b has its CatchHandler @ 00128425 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::push_back ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_588, (string *)&local_528); } else { std::__cxx11::istringstream::istringstream((istringstream *)&local_4a8,&local_528,8); local_568 = local_558; local_560 = 0; local_558[0] = 0; local_508 = local_4f8; local_500 = 0; local_4f8[0] = 0; while( true ) { /* try { // try from 0012820a to 0012825b has its CatchHandler @ 0012845b */ piVar7 = std::operator>>((istream *)&local_4a8,(string *)&local_568); if (((byte)piVar7[*(long *)(*(long *)piVar7 + -0x18) + 0x20] & 5) != 0) break; if (((local_500 + 1) - (ulong)(local_500 == 0)) + local_560 < 0x47) { psVar9 = (string *)0x1aeb19; if (local_500 != 0) { psVar9 = (string *)0x1b254d; } /* try { // try from 0012826c to 00128276 has its CatchHandler @ 00128459 */ std::operator+((char *)local_4c8,psVar9); /* try { // try from 00128277 to 00128281 has its CatchHandler @ 00128447 */ std::__cxx11::string::append((string *)&local_508); std::__cxx11::string::~string(local_4c8); } else { if (local_500 != 0) { std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::push_back ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *) &local_588,(string *)&local_508); } std::__cxx11::string::_M_assign((string *)&local_508); } } if (local_500 != 0) { /* try { // try from 001282a6 to 001282b0 has its CatchHandler @ 001283f9 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::push_back ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_588, (string *)&local_508); } std::__cxx11::string::~string((string *)&local_508); std::__cxx11::string::~string((string *)&local_568); std::__cxx11::istringstream::~istringstream((istringstream *)&local_4a8); } } std::__cxx11::string::~string((string *)&local_528); std::__cxx11::istringstream::~istringstream((istringstream *)local_1b0); std::__cxx11::string::~string(local_4e8); psVar9 = psStack_580; for (psVar10 = local_588; psVar10 != psVar9; psVar10 = psVar10 + 0x20) { if (psVar10 == local_588) { std::__cxx11::string::string<std::allocator<char>> ((string *)&local_4a8,"",(allocator *)local_1b0); } else { /* try { // try from 00128320 to 00128345 has its CatchHandler @ 00128418 */ std::__cxx11::string::string((string *)&local_4a8,(string *)&local_548); } /* try { // try from 00128346 to 00128366 has its CatchHandler @ 0012842a */ poVar5 = std::operator<<((ostream *)local_328,(string *)&local_4a8); poVar5 = std::operator<<(poVar5,psVar10); std::operator<<(poVar5,"\n"); std::__cxx11::string::~string((string *)&local_4a8); } /* try { // try from 00128380 to 0012838c has its CatchHandler @ 001283c7 */ std::__cxx11::stringbuf::str(); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_588); std::__cxx11::ostringstream::~ostringstream(local_328); std::__cxx11::string::~string((string *)&local_548); return local_570; }
23,442
ImPlot::GetLocationPos(ImRect const&, ImVec2 const&, int, ImVec2 const&)
zkingston[P]unknot/build_O1/_deps/implot-src/implot.cpp
ImVec2 GetLocationPos(const ImRect& outer_rect, const ImVec2& inner_size, ImPlotLocation loc, const ImVec2& pad) { ImVec2 pos; if (ImHasFlag(loc, ImPlotLocation_West) && !ImHasFlag(loc, ImPlotLocation_East)) pos.x = outer_rect.Min.x + pad.x; else if (!ImHasFlag(loc, ImPlotLocation_West) && ImHasFlag(loc, ImPlotLocation_East)) pos.x = outer_rect.Max.x - pad.x - inner_size.x; else pos.x = outer_rect.GetCenter().x - inner_size.x * 0.5f; // legend reference point y if (ImHasFlag(loc, ImPlotLocation_North) && !ImHasFlag(loc, ImPlotLocation_South)) pos.y = outer_rect.Min.y + pad.y; else if (!ImHasFlag(loc, ImPlotLocation_North) && ImHasFlag(loc, ImPlotLocation_South)) pos.y = outer_rect.Max.y - pad.y - inner_size.y; else pos.y = outer_rect.GetCenter().y - inner_size.y * 0.5f; pos.x = IM_ROUND(pos.x); pos.y = IM_ROUND(pos.y); return pos; }
O1
cpp
ImPlot::GetLocationPos(ImRect const&, ImVec2 const&, int, ImVec2 const&): movl %edx, %eax andl $0xc, %eax cmpl $0x4, %eax jne 0xae25d movss (%rdi), %xmm0 addss (%rcx), %xmm0 jmp 0xae28e cmpl $0x8, %eax jne 0xae271 movss 0x8(%rdi), %xmm0 subss (%rcx), %xmm0 subss (%rsi), %xmm0 jmp 0xae28e movss (%rdi), %xmm0 addss 0x8(%rdi), %xmm0 movss 0x1e0d9e(%rip), %xmm1 # 0x28f020 mulss %xmm1, %xmm0 mulss (%rsi), %xmm1 subss %xmm1, %xmm0 andl $0x3, %edx cmpl $0x1, %edx jne 0xae2a2 movss 0x4(%rdi), %xmm1 addss 0x4(%rcx), %xmm1 jmp 0xae2d7 cmpl $0x2, %edx jne 0xae2b8 movss 0xc(%rdi), %xmm1 subss 0x4(%rcx), %xmm1 subss 0x4(%rsi), %xmm1 jmp 0xae2d7 movss 0x4(%rdi), %xmm1 addss 0xc(%rdi), %xmm1 movss 0x1e0d56(%rip), %xmm2 # 0x28f020 mulss %xmm2, %xmm1 mulss 0x4(%rsi), %xmm2 subss %xmm2, %xmm1 unpcklps %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1] addps 0x1e610f(%rip), %xmm0 # 0x2943f0 cvttps2dq %xmm0, %xmm0 cvtdq2ps %xmm0, %xmm0 retq
_ZN6ImPlot14GetLocationPosERK6ImRectRK6ImVec2iS5_: mov eax, edx and eax, 0Ch cmp eax, 4 jnz short loc_AE25D movss xmm0, dword ptr [rdi] addss xmm0, dword ptr [rcx] jmp short loc_AE28E loc_AE25D: cmp eax, 8 jnz short loc_AE271 movss xmm0, dword ptr [rdi+8] subss xmm0, dword ptr [rcx] subss xmm0, dword ptr [rsi] jmp short loc_AE28E loc_AE271: movss xmm0, dword ptr [rdi] addss xmm0, dword ptr [rdi+8] movss xmm1, dword ptr cs:xmmword_28F020 mulss xmm0, xmm1 mulss xmm1, dword ptr [rsi] subss xmm0, xmm1 loc_AE28E: and edx, 3 cmp edx, 1 jnz short loc_AE2A2 movss xmm1, dword ptr [rdi+4] addss xmm1, dword ptr [rcx+4] jmp short loc_AE2D7 loc_AE2A2: cmp edx, 2 jnz short loc_AE2B8 movss xmm1, dword ptr [rdi+0Ch] subss xmm1, dword ptr [rcx+4] subss xmm1, dword ptr [rsi+4] jmp short loc_AE2D7 loc_AE2B8: movss xmm1, dword ptr [rdi+4] addss xmm1, dword ptr [rdi+0Ch] movss xmm2, dword ptr cs:xmmword_28F020 mulss xmm1, xmm2 mulss xmm2, dword ptr [rsi+4] subss xmm1, xmm2 loc_AE2D7: unpcklps xmm0, xmm1 addps xmm0, cs:xmmword_2943F0 cvttps2dq xmm0, xmm0 cvtdq2ps xmm0, xmm0 retn
__m128 ImPlot::GetLocationPos(unsigned int *a1, float *a2, char a3, float *a4) { int v4; // eax __m128 v5; // xmm0 int v6; // edx __m128 v7; // xmm1 v4 = a3 & 0xC; if ( v4 == 4 ) { v5 = (__m128)*a1; v5.m128_f32[0] = v5.m128_f32[0] + *a4; } else if ( v4 == 8 ) { v5 = (__m128)a1[2]; v5.m128_f32[0] = (float)(v5.m128_f32[0] - *a4) - *a2; } else { v5 = (__m128)*a1; v5.m128_f32[0] = (float)((float)(v5.m128_f32[0] + *((float *)a1 + 2)) * 0.5) - (float)(0.5 * *a2); } v6 = a3 & 3; if ( v6 == 1 ) { v7 = (__m128)a1[1]; v7.m128_f32[0] = v7.m128_f32[0] + a4[1]; } else if ( v6 == 2 ) { v7 = (__m128)a1[3]; v7.m128_f32[0] = (float)(v7.m128_f32[0] - a4[1]) - a2[1]; } else { v7 = (__m128)a1[1]; v7.m128_f32[0] = (float)((float)(v7.m128_f32[0] + *((float *)a1 + 3)) * 0.5) - (float)(0.5 * a2[1]); } return _mm_cvtepi32_ps(_mm_cvttps_epi32(_mm_add_ps(_mm_unpacklo_ps(v5, v7), (__m128)xmmword_2943F0))); }
GetLocationPos: MOV EAX,EDX AND EAX,0xc CMP EAX,0x4 JNZ 0x001ae25d MOVSS XMM0,dword ptr [RDI] ADDSS XMM0,dword ptr [RCX] JMP 0x001ae28e LAB_001ae25d: CMP EAX,0x8 JNZ 0x001ae271 MOVSS XMM0,dword ptr [RDI + 0x8] SUBSS XMM0,dword ptr [RCX] SUBSS XMM0,dword ptr [RSI] JMP 0x001ae28e LAB_001ae271: MOVSS XMM0,dword ptr [RDI] ADDSS XMM0,dword ptr [RDI + 0x8] MOVSS XMM1,dword ptr [0x0038f020] MULSS XMM0,XMM1 MULSS XMM1,dword ptr [RSI] SUBSS XMM0,XMM1 LAB_001ae28e: AND EDX,0x3 CMP EDX,0x1 JNZ 0x001ae2a2 MOVSS XMM1,dword ptr [RDI + 0x4] ADDSS XMM1,dword ptr [RCX + 0x4] JMP 0x001ae2d7 LAB_001ae2a2: CMP EDX,0x2 JNZ 0x001ae2b8 MOVSS XMM1,dword ptr [RDI + 0xc] SUBSS XMM1,dword ptr [RCX + 0x4] SUBSS XMM1,dword ptr [RSI + 0x4] JMP 0x001ae2d7 LAB_001ae2b8: MOVSS XMM1,dword ptr [RDI + 0x4] ADDSS XMM1,dword ptr [RDI + 0xc] MOVSS XMM2,dword ptr [0x0038f020] MULSS XMM1,XMM2 MULSS XMM2,dword ptr [RSI + 0x4] SUBSS XMM1,XMM2 LAB_001ae2d7: UNPCKLPS XMM0,XMM1 ADDPS XMM0,xmmword ptr [0x003943f0] CVTTPS2DQ XMM0,XMM0 CVTDQ2PS XMM0,XMM0 RET
/* ImPlot::GetLocationPos(ImRect const&, ImVec2 const&, int, ImVec2 const&) */ int8 ImPlot::GetLocationPos(ImRect *param_1,ImVec2 *param_2,int param_3,ImVec2 *param_4) { float fVar1; float fVar2; if ((param_3 & 0xcU) == 4) { fVar1 = *(float *)param_1 + *(float *)param_4; } else if ((param_3 & 0xcU) == 8) { fVar1 = (*(float *)(param_1 + 8) - *(float *)param_4) - *(float *)param_2; } else { fVar1 = (*(float *)param_1 + *(float *)(param_1 + 8)) * DAT_0038f020 - DAT_0038f020 * *(float *)param_2; } if ((param_3 & 3U) == 1) { fVar2 = *(float *)(param_1 + 4) + *(float *)(param_4 + 4); } else if ((param_3 & 3U) == 2) { fVar2 = (*(float *)(param_1 + 0xc) - *(float *)(param_4 + 4)) - *(float *)(param_2 + 4); } else { fVar2 = (*(float *)(param_1 + 4) + *(float *)(param_1 + 0xc)) * DAT_0038f020 - DAT_0038f020 * *(float *)(param_2 + 4); } return CONCAT44((float)(int)(fVar2 + DAT_003943f0._4_4_),(float)(int)(fVar1 + (float)DAT_003943f0) ); }
23,443
Binary_string::qs_append_hex(char const*, unsigned int)
eloqsql/sql/sql_string.cc
void Binary_string::qs_append_hex(const char *str, uint32 len) { ASSERT_LENGTH(len*2); const char *str_end= str + len; for (char *to= Ptr + str_length ; str < str_end; str++) APPEND_HEX(to, (uchar) *str); str_length+= len * 2; }
O0
cpp
Binary_string::qs_append_hex(char const*, unsigned int): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x30(%rbp) jmp 0x2742d movq -0x30(%rbp), %rcx movq -0x10(%rbp), %rax movl -0x14(%rbp), %edx addq %rdx, %rax movq %rax, -0x20(%rbp) movq (%rcx), %rax movl 0x8(%rcx), %ecx addq %rcx, %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0x27474 movq -0x10(%rbp), %rax leaq -0x28(%rbp), %rdi movzbl (%rax), %esi callq 0x27490 movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0x2744c movq -0x30(%rbp), %rax movl -0x14(%rbp), %ecx shll %ecx addl 0x8(%rax), %ecx movl %ecx, 0x8(%rax) addq $0x30, %rsp popq %rbp retq nopl (%rax)
_ZN13Binary_string13qs_append_hexEPKcj: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov rax, [rbp+var_8] mov [rbp+var_30], rax jmp short $+2 loc_2742D: mov rcx, [rbp+var_30] mov rax, [rbp+var_10] mov edx, [rbp+var_14] add rax, rdx mov [rbp+var_20], rax mov rax, [rcx] mov ecx, [rcx+8] add rax, rcx mov [rbp+var_28], rax loc_2744C: mov rax, [rbp+var_10] cmp rax, [rbp+var_20] jnb short loc_27474 mov rax, [rbp+var_10] lea rdi, [rbp+var_28]; char ** movzx esi, byte ptr [rax]; unsigned __int8 call _ZL10APPEND_HEXRPch; APPEND_HEX(char *&,uchar) mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp short loc_2744C loc_27474: mov rax, [rbp+var_30] mov ecx, [rbp+var_14] shl ecx, 1 add ecx, [rax+8] mov [rax+8], ecx add rsp, 30h pop rbp retn
Binary_string * Binary_string::qs_append_hex(Binary_string *this, char *a2, int a3) { Binary_string *result; // rax char *v4; // [rsp+8h] [rbp-28h] BYREF const char *v5; // [rsp+10h] [rbp-20h] int v6; // [rsp+1Ch] [rbp-14h] unsigned __int8 *v7; // [rsp+20h] [rbp-10h] Binary_string *v8; // [rsp+28h] [rbp-8h] v8 = this; v7 = (unsigned __int8 *)a2; v6 = a3; v5 = &a2[a3]; v4 = (char *)(*((unsigned int *)this + 2) + *(_QWORD *)this); while ( v7 < (unsigned __int8 *)v5 ) APPEND_HEX(&v4, *v7++); result = this; *((_DWORD *)this + 2) += 2 * v6; return result; }
qs_append_hex: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x30],RAX JMP 0x0012742d LAB_0012742d: MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x14] ADD RAX,RDX MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RCX] MOV ECX,dword ptr [RCX + 0x8] ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX LAB_0012744c: MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x20] JNC 0x00127474 MOV RAX,qword ptr [RBP + -0x10] LEA RDI,[RBP + -0x28] MOVZX ESI,byte ptr [RAX] CALL 0x00127490 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX JMP 0x0012744c LAB_00127474: MOV RAX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RBP + -0x14] SHL ECX,0x1 ADD ECX,dword ptr [RAX + 0x8] MOV dword ptr [RAX + 0x8],ECX ADD RSP,0x30 POP RBP RET
/* Binary_string::qs_append_hex(char const*, unsigned int) */ void __thiscall Binary_string::qs_append_hex(Binary_string *this,char *param_1,uint param_2) { char *local_30; uchar *local_28; uint local_1c; uchar *local_18; Binary_string *local_10; local_28 = (uchar *)(param_1 + param_2); local_30 = (char *)(*(long *)this + (ulong)*(uint *)(this + 8)); local_1c = param_2; local_10 = this; for (local_18 = (uchar *)param_1; local_18 < local_28; local_18 = local_18 + 1) { APPEND_HEX(&local_30,*local_18); } *(uint *)(this + 8) = local_1c * 2 + *(int *)(this + 8); return; }
23,444
minja::IfNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/minja.hpp
void do_render(std::ostringstream & out, const std::shared_ptr<Context> & context) const override { for (const auto& branch : cascade) { auto enter_branch = true; if (branch.first) { enter_branch = branch.first->evaluate(context).to_bool(); } if (enter_branch) { if (!branch.second) throw std::runtime_error("IfNode.cascade.second is null"); branch.second->render(out, context); return; } } }
O2
cpp
minja::IfNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rdx, %rbx movq %rsi, %r14 movq 0x20(%rdi), %r12 movq 0x28(%rdi), %r13 leaq 0x8(%rsp), %r15 cmpq %r13, %r12 je 0x72e70 movq (%r12), %rsi testq %rsi, %rsi je 0x72e5b movq %r15, %rdi movq %rbx, %rdx callq 0x62a82 movq %r15, %rdi callq 0x62c58 movl %eax, %ebp movq %r15, %rdi callq 0x62d12 testb %bpl, %bpl jne 0x72e5b addq $0x20, %r12 jmp 0x72e25 movq 0x10(%r12), %rdi testq %rdi, %rdi je 0x72e7f movq %r14, %rsi movq %rbx, %rdx callq 0x72f0e addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq pushq $0x10 popq %rdi callq 0x23480 movq %rax, %rbx leaq 0x41c43(%rip), %rsi # 0xb4ad4 movq %rax, %rdi callq 0x23340 movq 0x8b150(%rip), %rsi # 0xfdff0 movq 0x8b0b1(%rip), %rdx # 0xfdf58 movq %rbx, %rdi callq 0x23f30 movq %rax, %r14 movq %rbx, %rdi callq 0x236b0 jmp 0x72ec9 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x62d12 movq %r14, %rdi callq 0x23fd0 nop
_ZNK5minja6IfNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov rbx, rdx mov r14, rsi mov r12, [rdi+20h] mov r13, [rdi+28h] lea r15, [rsp+88h+var_80] loc_72E25: cmp r12, r13 jz short loc_72E70 mov rsi, [r12] test rsi, rsi jz short loc_72E5B mov rdi, r15 mov rdx, rbx call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) mov rdi, r15; this call _ZNK5minja5Value7to_boolEv; minja::Value::to_bool(void) mov ebp, eax mov rdi, r15; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() test bpl, bpl jnz short loc_72E5B add r12, 20h ; ' ' jmp short loc_72E25 loc_72E5B: mov rdi, [r12+10h] test rdi, rdi jz short loc_72E7F mov rsi, r14 mov rdx, rbx call _ZNK5minja12TemplateNode6renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE; minja::TemplateNode::render(std::ostringstream &,std::shared_ptr<minja::Context> const&) loc_72E70: add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_72E7F: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aIfnodeCascadeS; "IfNode.cascade.second is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax mov rdi, rbx; void * call ___cxa_free_exception jmp short loc_72EC9 mov r14, rax lea rdi, [rsp+88h+var_80]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_72EC9: mov rdi, r14 call __Unwind_Resume
void minja::IfNode::do_render(long long a1, int a2, int a3, int a4, int a5, int a6) { long long v7; // r12 long long v8; // r13 char v9; // bp long long v10; // rdi std::runtime_error *exception; // rbx _BYTE v12[128]; // [rsp+8h] [rbp-80h] BYREF v7 = *(_QWORD *)(a1 + 32); v8 = *(_QWORD *)(a1 + 40); while ( v7 != v8 ) { if ( !*(_QWORD *)v7 || (minja::Expression::evaluate((long long)v12, *(void (****)(void))v7), v9 = minja::Value::to_bool((minja::Value *)v12), minja::Value::~Value((minja::Value *)v12), v9) ) { v10 = *(_QWORD *)(v7 + 16); if ( !v10 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "IfNode.cascade.second is null"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::TemplateNode::render(v10, a2, a3, a4, a5, a6); return; } v7 += 32LL; } }
do_render: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV RBX,RDX MOV R14,RSI MOV R12,qword ptr [RDI + 0x20] MOV R13,qword ptr [RDI + 0x28] LEA R15,[RSP + 0x8] LAB_00172e25: CMP R12,R13 JZ 0x00172e70 MOV RSI,qword ptr [R12] TEST RSI,RSI JZ 0x00172e5b MOV RDI,R15 MOV RDX,RBX CALL 0x00162a82 LAB_00172e3e: MOV RDI,R15 CALL 0x00162c58 LAB_00172e46: MOV EBP,EAX MOV RDI,R15 CALL 0x00162d12 TEST BPL,BPL JNZ 0x00172e5b ADD R12,0x20 JMP 0x00172e25 LAB_00172e5b: MOV RDI,qword ptr [R12 + 0x10] TEST RDI,RDI JZ 0x00172e7f MOV RSI,R14 MOV RDX,RBX CALL 0x00172f0e LAB_00172e70: ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00172e7f: PUSH 0x10 POP RDI CALL 0x00123480 MOV RBX,RAX LAB_00172e8a: LEA RSI,[0x1b4ad4] MOV RDI,RAX CALL 0x00123340 LAB_00172e99: MOV RSI,qword ptr [0x001fdff0] MOV RDX,qword ptr [0x001fdf58] MOV RDI,RBX CALL 0x00123f30
/* minja::IfNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&) const */ void minja::IfNode::do_render(ostringstream *param_1,shared_ptr *param_2) { int8 *puVar1; char cVar2; runtime_error *this; int8 *puVar3; Expression local_80 [80]; puVar3 = *(int8 **)(param_1 + 0x20); puVar1 = *(int8 **)(param_1 + 0x28); while( true ) { if (puVar3 == puVar1) { return; } if ((shared_ptr *)*puVar3 == (shared_ptr *)0x0) break; Expression::evaluate(local_80,(shared_ptr *)*puVar3); /* try { // try from 00172e3e to 00172e45 has its CatchHandler @ 00172ebc */ cVar2 = Value::to_bool((Value *)local_80); Value::~Value((Value *)local_80); if (cVar2 != '\0') break; puVar3 = puVar3 + 4; } if ((ostringstream *)puVar3[2] != (ostringstream *)0x0) { TemplateNode::render((ostringstream *)puVar3[2],param_2); return; } this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00172e8a to 00172e98 has its CatchHandler @ 00172eaf */ std::runtime_error::runtime_error(this,"IfNode.cascade.second is null"); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58); }
23,445
my_caseup_utf16
eloqsql/strings/ctype-ucs2.c
static size_t my_caseup_utf16(CHARSET_INFO *cs, const char *src, size_t srclen, char *dst, size_t dstlen) { my_wc_t wc; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; my_charset_conv_wc_mb wc_mb= cs->cset->wc_mb; int res; const char *srcend= src + srclen; char *dstend= dst + dstlen; MY_UNICASE_INFO *uni_plane= cs->caseinfo; DBUG_ASSERT(srclen <= dstlen); while ((src < srcend) && (res= mb_wc(cs, &wc, (uchar *) src, (uchar *) srcend)) > 0) { my_toupper_utf16(uni_plane, &wc); if (res != wc_mb(cs, wc, (uchar *) dst, (uchar *) dstend)) break; src+= res; dst+= res; } return srclen; }
O3
c
my_caseup_utf16: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r8, -0x38(%rbp) movq %rdx, -0x30(%rbp) testq %rdx, %rdx jle 0x69191 movq %rcx, %r15 movq %rsi, %r12 movq %rdi, %r13 movq 0x78(%rdi), %rax movq %rax, -0x50(%rbp) movq 0xb8(%rdi), %rax movq 0x28(%rax), %rcx movq %rcx, -0x58(%rbp) movq 0x30(%rax), %rax movq %rax, -0x48(%rbp) movq -0x30(%rbp), %rax leaq (%rsi,%rax), %r14 addq %r15, -0x38(%rbp) movq %r13, %rdi leaq -0x40(%rbp), %rsi movq %r12, %rdx movq %r14, %rcx callq *-0x58(%rbp) testl %eax, %eax jle 0x69191 movl %eax, %ebx movq -0x40(%rbp), %rsi movq -0x50(%rbp), %rax cmpq (%rax), %rsi ja 0x69173 movq 0x8(%rax), %rax movq %rsi, %rcx shrq $0x8, %rcx movq (%rax,%rcx,8), %rax testq %rax, %rax je 0x69173 movzbl %sil, %ecx leaq (%rcx,%rcx,2), %rcx movl (%rax,%rcx,4), %esi movq %rsi, -0x40(%rbp) movq %r13, %rdi movq %r15, %rdx movq -0x38(%rbp), %rcx callq *-0x48(%rbp) cmpl %eax, %ebx jne 0x69191 movl %ebx, %eax addq %rax, %r12 addq %rax, %r15 cmpq %r14, %r12 jb 0x6912d movq -0x30(%rbp), %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_caseup_utf16: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov [rbp+var_38], r8 mov [rbp+var_30], rdx test rdx, rdx jle loc_69191 mov r15, rcx mov r12, rsi mov r13, rdi mov rax, [rdi+78h] mov [rbp+var_50], rax mov rax, [rdi+0B8h] mov rcx, [rax+28h] mov [rbp+var_58], rcx mov rax, [rax+30h] mov [rbp+var_48], rax mov rax, [rbp+var_30] lea r14, [rsi+rax] add [rbp+var_38], r15 loc_6912D: mov rdi, r13 lea rsi, [rbp+var_40] mov rdx, r12 mov rcx, r14 call [rbp+var_58] test eax, eax jle short loc_69191 mov ebx, eax mov rsi, [rbp+var_40] mov rax, [rbp+var_50] cmp rsi, [rax] ja short loc_69173 mov rax, [rax+8] mov rcx, rsi shr rcx, 8 mov rax, [rax+rcx*8] test rax, rax jz short loc_69173 movzx ecx, sil lea rcx, [rcx+rcx*2] mov esi, [rax+rcx*4] mov [rbp+var_40], rsi loc_69173: mov rdi, r13 mov rdx, r15 mov rcx, [rbp+var_38] call [rbp+var_48] cmp ebx, eax jnz short loc_69191 mov eax, ebx add r12, rax add r15, rax cmp r12, r14 jb short loc_6912D loc_69191: mov rax, [rbp+var_30] add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_caseup_utf16(long long a1, unsigned long long a2, long long a3, long long a4, long long a5) { long long v5; // r15 unsigned long long v6; // r12 long long v7; // rax unsigned long long v8; // r14 int v9; // eax unsigned int v10; // ebx unsigned long long v11; // rsi long long v12; // rax long long ( *v14)(long long, unsigned long long *, unsigned long long, unsigned long long); // [rsp+8h] [rbp-58h] unsigned long long *v15; // [rsp+10h] [rbp-50h] unsigned int ( *v16)(long long, unsigned long long, long long, long long); // [rsp+18h] [rbp-48h] unsigned long long v17; // [rsp+20h] [rbp-40h] BYREF long long v18; // [rsp+28h] [rbp-38h] long long v19; // [rsp+30h] [rbp-30h] v18 = a5; v19 = a3; if ( a3 > 0 ) { v5 = a4; v6 = a2; v15 = *(unsigned long long **)(a1 + 120); v7 = *(_QWORD *)(a1 + 184); v14 = *(long long ( **)(long long, unsigned long long *, unsigned long long, unsigned long long))(v7 + 40); v16 = *(unsigned int ( **)(long long, unsigned long long, long long, long long))(v7 + 48); v8 = a2 + v19; v18 += a4; do { v9 = v14(a1, &v17, v6, v8); if ( v9 <= 0 ) break; v10 = v9; v11 = v17; if ( v17 <= *v15 ) { v12 = *(_QWORD *)(v15[1] + 8 * (v17 >> 8)); if ( v12 ) { v11 = *(unsigned int *)(v12 + 12LL * (unsigned __int8)v17); v17 = v11; } } if ( v10 != v16(a1, v11, v5, v18) ) break; v6 += v10; v5 += v10; } while ( v6 < v8 ); } return v19; }
my_caseup_utf16: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV qword ptr [RBP + -0x38],R8 MOV qword ptr [RBP + -0x30],RDX TEST RDX,RDX JLE 0x00169191 MOV R15,RCX MOV R12,RSI MOV R13,RDI MOV RAX,qword ptr [RDI + 0x78] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RDI + 0xb8] MOV RCX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x58],RCX MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x30] LEA R14,[RSI + RAX*0x1] ADD qword ptr [RBP + -0x38],R15 LAB_0016912d: MOV RDI,R13 LEA RSI,[RBP + -0x40] MOV RDX,R12 MOV RCX,R14 CALL qword ptr [RBP + -0x58] TEST EAX,EAX JLE 0x00169191 MOV EBX,EAX MOV RSI,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x50] CMP RSI,qword ptr [RAX] JA 0x00169173 MOV RAX,qword ptr [RAX + 0x8] MOV RCX,RSI SHR RCX,0x8 MOV RAX,qword ptr [RAX + RCX*0x8] TEST RAX,RAX JZ 0x00169173 MOVZX ECX,SIL LEA RCX,[RCX + RCX*0x2] MOV ESI,dword ptr [RAX + RCX*0x4] MOV qword ptr [RBP + -0x40],RSI LAB_00169173: MOV RDI,R13 MOV RDX,R15 MOV RCX,qword ptr [RBP + -0x38] CALL qword ptr [RBP + -0x48] CMP EBX,EAX JNZ 0x00169191 MOV EAX,EBX ADD R12,RAX ADD R15,RAX CMP R12,R14 JC 0x0016912d LAB_00169191: MOV RAX,qword ptr [RBP + -0x30] ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_caseup_utf16(long param_1,ulong param_2,long param_3,long param_4,long param_5) { ulong uVar1; ulong *puVar2; code *pcVar3; code *pcVar4; long lVar5; uint uVar6; uint uVar7; ulong local_48; long local_40; long local_38; local_38 = param_3; if (0 < param_3) { puVar2 = *(ulong **)(param_1 + 0x78); pcVar3 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); pcVar4 = *(code **)(*(long *)(param_1 + 0xb8) + 0x30); uVar1 = param_2 + param_3; local_40 = param_5 + param_4; do { uVar6 = (*pcVar3)(param_1,&local_48,param_2,uVar1); if ((int)uVar6 < 1) { return local_38; } if ((local_48 <= *puVar2) && (lVar5 = *(long *)(puVar2[1] + (local_48 >> 8) * 8), lVar5 != 0)) { local_48 = (ulong)*(uint *)(lVar5 + (local_48 & 0xff) * 0xc); } uVar7 = (*pcVar4)(param_1,local_48,param_4,local_40); if (uVar6 != uVar7) { return local_38; } param_2 = param_2 + uVar6; param_4 = param_4 + (ulong)uVar6; } while (param_2 < uVar1); } return local_38; }
23,446
ftxui::ScreenInteractive::ScreenInteractive(int, int, ftxui::ScreenInteractive::Dimension, bool)
Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/component/screen_interactive.cpp
ScreenInteractive::ScreenInteractive(int dimx, int dimy, Dimension dimension, bool use_alternative_screen) : Screen(dimx, dimy), dimension_(dimension), use_alternative_screen_(use_alternative_screen) { task_receiver_ = MakeReceiver<Task>(); }
O2
cpp
ftxui::ScreenInteractive::ScreenInteractive(int, int, ftxui::ScreenInteractive::Dimension, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %r8d, %ebp movl %ecx, %r14d movq %rdi, %rbx callq 0x2fe02 andq $0x0, 0x58(%rbx) movl %r14d, 0x60(%rbx) movb %bpl, 0x64(%rbx) movb $0x1, 0x65(%rbx) leaq 0x68(%rbx), %r14 leaq 0x88(%rbx), %rax xorps %xmm0, %xmm0 movups %xmm0, 0x68(%rbx) movq %rax, 0x78(%rbx) andq $0x0, 0x80(%rbx) leaq 0x70(%rbx), %r15 xorl %eax, %eax movb %al, 0x88(%rbx) leaq 0xa8(%rbx), %rcx movq %rcx, 0x98(%rbx) andq $0x0, 0xa0(%rbx) leaq 0x78(%rbx), %r12 leaq 0x98(%rbx), %r13 movb %al, 0xa8(%rbx) movb %al, 0xb8(%rbx) leaq 0xc0(%rbx), %rbp andq $0x0, 0xd8(%rbx) movups %xmm0, 0xc0(%rbx) movb %al, 0xd0(%rbx) movabsq $0x100000001, %rcx # imm = 0x100000001 movq %rcx, 0xe0(%rbx) andw $0x0, 0xe8(%rbx) movb %al, 0xea(%rbx) leaq 0x10(%rsp), %rdi callq 0x29e55 leaq 0x10(%rsp), %rbx movq (%rbx), %rsi andq $0x0, (%rbx) movq %r15, %rdi callq 0x29476 movq %rbx, %rdi callq 0x134dc addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, 0x8(%rsp) leaq 0xc8(%rbx), %rdi callq 0x134ce movq %rbp, %rdi callq 0x134ce movq %r13, %rdi callq 0xc8c8 movq %r12, %rdi callq 0xc8c8 movq %r15, %rdi callq 0x134dc movq %r14, %rdi callq 0x134f6 movq %rbx, %rdi callq 0x13510 movq 0x8(%rsp), %rdi callq 0xc7f0 nop
_ZN5ftxui17ScreenInteractiveC2EiiNS0_9DimensionEb: push rbp; Alternative name is 'ftxui::ScreenInteractive::ScreenInteractive(int, int, ftxui::ScreenInteractive::Dimension, bool)' push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov ebp, r8d mov r14d, ecx mov rbx, rdi call _ZN5ftxui6ScreenC2Eii; ftxui::Screen::Screen(int,int) and qword ptr [rbx+58h], 0 mov [rbx+60h], r14d mov [rbx+64h], bpl mov byte ptr [rbx+65h], 1 lea r14, [rbx+68h] lea rax, [rbx+88h] xorps xmm0, xmm0 movups xmmword ptr [rbx+68h], xmm0 mov [rbx+78h], rax and qword ptr [rbx+80h], 0 lea r15, [rbx+70h] xor eax, eax mov [rbx+88h], al lea rcx, [rbx+0A8h] mov [rbx+98h], rcx and qword ptr [rbx+0A0h], 0 lea r12, [rbx+78h] lea r13, [rbx+98h] mov [rbx+0A8h], al mov [rbx+0B8h], al lea rbp, [rbx+0C0h] and qword ptr [rbx+0D8h], 0 movups xmmword ptr [rbx+0C0h], xmm0 mov [rbx+0D0h], al mov rcx, 100000001h mov [rbx+0E0h], rcx and word ptr [rbx+0E8h], 0 mov [rbx+0EAh], al lea rdi, [rsp+48h+var_38] call _ZSt11make_uniqueIN5ftxui12ReceiverImplISt7variantIJNS0_5EventESt8functionIFvvEENS0_13AnimationTaskEEEEEJEENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<ftxui::ReceiverImpl<std::variant<ftxui::Event,std::function<void ()(void)>,ftxui::AnimationTask>>>() lea rbx, [rsp+48h+var_38] mov rsi, [rbx] and qword ptr [rbx], 0 mov rdi, r15 call _ZNSt15__uniq_ptr_implIN5ftxui12ReceiverImplISt7variantIJNS0_5EventESt8functionIFvvEENS0_13AnimationTaskEEEEESt14default_deleteIS9_EE5resetEPS9_; std::__uniq_ptr_impl<ftxui::ReceiverImpl<std::variant<ftxui::Event,std::function<void ()(void)>,ftxui::AnimationTask>>,std::default_delete<ftxui::ReceiverImpl<std::variant<ftxui::Event,std::function<void ()(void)>,ftxui::AnimationTask>>>>::reset(ftxui::ReceiverImpl<std::variant<ftxui::Event,std::function<void ()(void)>,ftxui::AnimationTask>>*) mov rdi, rbx call _ZNSt10unique_ptrIN5ftxui12ReceiverImplISt7variantIJNS0_5EventESt8functionIFvvEENS0_13AnimationTaskEEEEESt14default_deleteIS9_EED2Ev; std::unique_ptr<ftxui::ReceiverImpl<std::variant<ftxui::Event,std::function<void ()(void)>,ftxui::AnimationTask>>>::~unique_ptr() add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov [rsp+arg_0], rax lea rdi, [rbx+0C8h]; this call _ZNSt6threadD2Ev; std::thread::~thread() mov rdi, rbp; this call _ZNSt6threadD2Ev; std::thread::~thread() mov rdi, r13; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r12; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r15 call _ZNSt10unique_ptrIN5ftxui12ReceiverImplISt7variantIJNS0_5EventESt8functionIFvvEENS0_13AnimationTaskEEEEESt14default_deleteIS9_EED2Ev; std::unique_ptr<ftxui::ReceiverImpl<std::variant<ftxui::Event,std::function<void ()(void)>,ftxui::AnimationTask>>>::~unique_ptr() mov rdi, r14 call _ZNSt10unique_ptrIN5ftxui10SenderImplISt7variantIJNS0_5EventESt8functionIFvvEENS0_13AnimationTaskEEEEESt14default_deleteIS9_EED2Ev; std::unique_ptr<ftxui::SenderImpl<std::variant<ftxui::Event,std::function<void ()(void)>,ftxui::AnimationTask>>>::~unique_ptr() mov rdi, rbx; this call _ZN5ftxui6ScreenD2Ev; ftxui::Screen::~Screen() mov rdi, [rsp+arg_0] call __Unwind_Resume
long long ftxui::ScreenInteractive::ScreenInteractive(long long a1, int a2, int a3, int a4, char a5) { long long v7; // rsi _QWORD v9[7]; // [rsp+10h] [rbp-38h] BYREF ftxui::Screen::Screen((ftxui::Screen *)a1, a2, a3); *(_QWORD *)(a1 + 88) = 0LL; *(_DWORD *)(a1 + 96) = a4; *(_BYTE *)(a1 + 100) = a5; *(_BYTE *)(a1 + 101) = 1; *(_OWORD *)(a1 + 104) = 0LL; *(_QWORD *)(a1 + 120) = a1 + 136; *(_QWORD *)(a1 + 128) = 0LL; *(_BYTE *)(a1 + 136) = 0; *(_QWORD *)(a1 + 152) = a1 + 168; *(_QWORD *)(a1 + 160) = 0LL; *(_BYTE *)(a1 + 168) = 0; *(_BYTE *)(a1 + 184) = 0; *(_QWORD *)(a1 + 216) = 0LL; *(_OWORD *)(a1 + 192) = 0LL; *(_BYTE *)(a1 + 208) = 0; *(_QWORD *)(a1 + 224) = 0x100000001LL; *(_WORD *)(a1 + 232) = 0; *(_BYTE *)(a1 + 234) = 0; std::make_unique<ftxui::ReceiverImpl<std::variant<ftxui::Event,std::function<void ()(void)>,ftxui::AnimationTask>>>(v9); v7 = v9[0]; v9[0] = 0LL; std::__uniq_ptr_impl<ftxui::ReceiverImpl<std::variant<ftxui::Event,std::function<void ()(void)>,ftxui::AnimationTask>>,std::default_delete<ftxui::ReceiverImpl<std::variant<ftxui::Event,std::function<void ()(void)>,ftxui::AnimationTask>>>>::reset( a1 + 112, v7); return std::unique_ptr<ftxui::ReceiverImpl<std::variant<ftxui::Event,std::function<void ()(void)>,ftxui::AnimationTask>>>::~unique_ptr(v9); }
ScreenInteractive: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV EBP,R8D MOV R14D,ECX MOV RBX,RDI CALL 0x0012fe02 AND qword ptr [RBX + 0x58],0x0 MOV dword ptr [RBX + 0x60],R14D MOV byte ptr [RBX + 0x64],BPL MOV byte ptr [RBX + 0x65],0x1 LEA R14,[RBX + 0x68] LEA RAX,[RBX + 0x88] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x68],XMM0 MOV qword ptr [RBX + 0x78],RAX AND qword ptr [RBX + 0x80],0x0 LEA R15,[RBX + 0x70] XOR EAX,EAX MOV byte ptr [RBX + 0x88],AL LEA RCX,[RBX + 0xa8] MOV qword ptr [RBX + 0x98],RCX AND qword ptr [RBX + 0xa0],0x0 LEA R12,[RBX + 0x78] LEA R13,[RBX + 0x98] MOV byte ptr [RBX + 0xa8],AL MOV byte ptr [RBX + 0xb8],AL LEA RBP,[RBX + 0xc0] AND qword ptr [RBX + 0xd8],0x0 MOVUPS xmmword ptr [RBX + 0xc0],XMM0 MOV byte ptr [RBX + 0xd0],AL MOV RCX,0x100000001 MOV qword ptr [RBX + 0xe0],RCX AND word ptr [RBX + 0xe8],0x0 MOV byte ptr [RBX + 0xea],AL LAB_00126f17: LEA RDI,[RSP + 0x10] CALL 0x00129e55 LAB_00126f21: LEA RBX,[RSP + 0x10] MOV RSI,qword ptr [RBX] AND qword ptr [RBX],0x0 MOV RDI,R15 CALL 0x00129476 MOV RDI,RBX CALL 0x001134dc ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* ftxui::ScreenInteractive::ScreenInteractive(int, int, ftxui::ScreenInteractive::Dimension, bool) */ void __thiscall ftxui::ScreenInteractive::ScreenInteractive (ScreenInteractive *this,int param_1,int param_2,int4 param_4, ScreenInteractive param_5) { ReceiverImpl *pRVar1; ReceiverImpl *local_38; Screen::Screen((Screen *)this,param_1,param_2); *(int8 *)(this + 0x58) = 0; *(int4 *)(this + 0x60) = param_4; this[100] = param_5; this[0x65] = (ScreenInteractive)0x1; *(int8 *)(this + 0x68) = 0; *(int8 *)(this + 0x70) = 0; *(ScreenInteractive **)(this + 0x78) = this + 0x88; *(int8 *)(this + 0x80) = 0; this[0x88] = (ScreenInteractive)0x0; *(ScreenInteractive **)(this + 0x98) = this + 0xa8; *(int8 *)(this + 0xa0) = 0; this[0xa8] = (ScreenInteractive)0x0; this[0xb8] = (ScreenInteractive)0x0; *(int8 *)(this + 0xd8) = 0; *(int8 *)(this + 0xc0) = 0; *(int8 *)(this + 200) = 0; this[0xd0] = (ScreenInteractive)0x0; *(int8 *)(this + 0xe0) = 0x100000001; *(int2 *)(this + 0xe8) = 0; this[0xea] = (ScreenInteractive)0x0; /* try { // try from 00126f17 to 00126f20 has its CatchHandler @ 00126f4c */ std:: make_unique<ftxui::ReceiverImpl<std::variant<ftxui::Event,std::function<void()>,ftxui::AnimationTask>>> (); pRVar1 = local_38; local_38 = (ReceiverImpl *)0x0; std:: __uniq_ptr_impl<ftxui::ReceiverImpl<std::variant<ftxui::Event,std::function<void()>,ftxui::AnimationTask>>,std::default_delete<ftxui::ReceiverImpl<std::variant<ftxui::Event,std::function<void()>,ftxui::AnimationTask>>>> ::reset((__uniq_ptr_impl<ftxui::ReceiverImpl<std::variant<ftxui::Event,std::function<void()>,ftxui::AnimationTask>>,std::default_delete<ftxui::ReceiverImpl<std::variant<ftxui::Event,std::function<void()>,ftxui::AnimationTask>>>> *)(this + 0x70),pRVar1); std:: unique_ptr<ftxui::ReceiverImpl<std::variant<ftxui::Event,std::function<void()>,ftxui::AnimationTask>>,std::default_delete<ftxui::ReceiverImpl<std::variant<ftxui::Event,std::function<void()>,ftxui::AnimationTask>>>> ::~unique_ptr((unique_ptr<ftxui::ReceiverImpl<std::variant<ftxui::Event,std::function<void()>,ftxui::AnimationTask>>,std::default_delete<ftxui::ReceiverImpl<std::variant<ftxui::Event,std::function<void()>,ftxui::AnimationTask>>>> *)&local_38); return; }
23,447
Cache::getAddr(Cache::Block&)
DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/Cache.cpp
uint32_t Cache::getAddr(Cache::Block &b) { uint32_t offsetBits = log2i(policy.blockSize); uint32_t idBits = log2i(policy.blockNum / policy.associativity); return (b.tag << (offsetBits + idBits)) | (b.id << offsetBits); }
O1
cpp
Cache::getAddr(Cache::Block&): movl 0x3c(%rdi), %eax movl $0xffffffff, %ecx # imm = 0xFFFFFFFF movl $0xffffffff, %r8d # imm = 0xFFFFFFFF testl %eax, %eax je 0x4274 xorl %r8d, %r8d cmpl $0x1, %eax je 0x4274 cmpl $0x2, %eax jb 0x4274 xorl %r8d, %r8d movl %eax, %edx shrl %edx incl %r8d cmpl $0x3, %eax movl %edx, %eax ja 0x4268 movl 0x40(%rdi), %eax xorl %edx, %edx divl 0x44(%rdi) testl %eax, %eax je 0x429b xorl %ecx, %ecx cmpl $0x1, %eax je 0x429b cmpl $0x2, %eax jb 0x429b xorl %ecx, %ecx movl %eax, %edx shrl %edx incl %ecx cmpl $0x3, %eax movl %edx, %eax ja 0x4290 addl %r8d, %ecx movl 0x4(%rsi), %edx movl 0x8(%rsi), %eax shll %cl, %edx movl %r8d, %ecx shll %cl, %eax orl %edx, %eax retq
_ZN5Cache7getAddrERNS_5BlockE: mov eax, [rdi+3Ch] mov ecx, 0FFFFFFFFh mov r8d, 0FFFFFFFFh test eax, eax jz short loc_4274 xor r8d, r8d cmp eax, 1 jz short loc_4274 cmp eax, 2 jb short loc_4274 xor r8d, r8d mov edx, eax loc_4268: shr edx, 1 inc r8d cmp eax, 3 mov eax, edx ja short loc_4268 loc_4274: mov eax, [rdi+40h] xor edx, edx div dword ptr [rdi+44h] test eax, eax jz short loc_429B xor ecx, ecx cmp eax, 1 jz short loc_429B cmp eax, 2 jb short loc_429B xor ecx, ecx mov edx, eax loc_4290: shr edx, 1 inc ecx cmp eax, 3 mov eax, edx ja short loc_4290 loc_429B: add ecx, r8d mov edx, [rsi+4] mov eax, [rsi+8] shl edx, cl mov ecx, r8d shl eax, cl or eax, edx retn
long long Cache::getAddr(_DWORD *a1, long long a2) { unsigned int v2; // eax char v3; // cl char v4; // r8 unsigned int v5; // edx bool v6; // cc unsigned int v7; // eax unsigned int v8; // edx v2 = a1[15]; v3 = -1; v4 = -1; if ( v2 ) { v4 = 0; if ( v2 != 1 ) { v4 = 0; v5 = a1[15]; do { v5 >>= 1; ++v4; v6 = v2 <= 3; v2 = v5; } while ( !v6 ); } } v7 = a1[16] / a1[17]; if ( v7 ) { v3 = 0; if ( v7 != 1 ) { v3 = 0; v8 = a1[16] / a1[17]; do { v8 >>= 1; ++v3; v6 = v7 <= 3; v7 = v8; } while ( !v6 ); } } return (unsigned int)((*(_DWORD *)(a2 + 4) << (v4 + v3)) | (*(_DWORD *)(a2 + 8) << v4)); }
getAddr: MOV EAX,dword ptr [RDI + 0x3c] MOV ECX,0xffffffff MOV R8D,0xffffffff TEST EAX,EAX JZ 0x00104274 XOR R8D,R8D CMP EAX,0x1 JZ 0x00104274 CMP EAX,0x2 JC 0x00104274 XOR R8D,R8D MOV EDX,EAX LAB_00104268: SHR EDX,0x1 INC R8D CMP EAX,0x3 MOV EAX,EDX JA 0x00104268 LAB_00104274: MOV EAX,dword ptr [RDI + 0x40] XOR EDX,EDX DIV dword ptr [RDI + 0x44] TEST EAX,EAX JZ 0x0010429b XOR ECX,ECX CMP EAX,0x1 JZ 0x0010429b CMP EAX,0x2 JC 0x0010429b XOR ECX,ECX MOV EDX,EAX LAB_00104290: SHR EDX,0x1 INC ECX CMP EAX,0x3 MOV EAX,EDX JA 0x00104290 LAB_0010429b: ADD ECX,R8D MOV EDX,dword ptr [RSI + 0x4] MOV EAX,dword ptr [RSI + 0x8] SHL EDX,CL MOV ECX,R8D SHL EAX,CL OR EAX,EDX RET
/* Cache::getAddr(Cache::Block&) */ uint __thiscall Cache::getAddr(Cache *this,Block *param_1) { bool bVar1; uint uVar2; char cVar3; ulong uVar4; byte bVar5; uVar2 = *(uint *)(this + 0x3c); bVar5 = 0xff; if (uVar2 != 0) { bVar5 = 0; if ((uVar2 != 1) && (bVar5 = 0, 1 < uVar2)) { bVar5 = 0; do { bVar5 = bVar5 + 1; bVar1 = 3 < uVar2; uVar2 = uVar2 >> 1; } while (bVar1); } } uVar2 = (uint)((ulong)*(uint *)(this + 0x40) / (ulong)*(uint *)(this + 0x44)); cVar3 = -1; if (uVar2 != 0) { cVar3 = '\0'; if ((uVar2 != 1) && (cVar3 = '\0', 1 < uVar2)) { cVar3 = '\0'; uVar4 = (ulong)*(uint *)(this + 0x40) / (ulong)*(uint *)(this + 0x44); do { cVar3 = cVar3 + '\x01'; uVar2 = (uint)uVar4; uVar4 = uVar4 >> 1; } while (3 < uVar2); } } return *(int *)(param_1 + 8) << (bVar5 & 0x1f) | *(int *)(param_1 + 4) << (cVar3 + bVar5 & 0x1f); }
23,448
Cache::getAddr(Cache::Block&)
DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/Cache.cpp
uint32_t Cache::getAddr(Cache::Block &b) { uint32_t offsetBits = log2i(policy.blockSize); uint32_t idBits = log2i(policy.blockNum / policy.associativity); return (b.tag << (offsetBits + idBits)) | (b.id << offsetBits); }
O3
cpp
Cache::getAddr(Cache::Block&): movl 0x3c(%rdi), %eax movl $0xffffffff, %ecx # imm = 0xFFFFFFFF movl $0xffffffff, %r8d # imm = 0xFFFFFFFF testl %eax, %eax je 0x411e xorl %r8d, %r8d cmpl $0x1, %eax je 0x411e movl %eax, %edx shrl %edx incl %r8d cmpl $0x3, %eax movl %edx, %eax ja 0x4112 movl 0x40(%rdi), %eax xorl %edx, %edx divl 0x44(%rdi) testl %eax, %eax je 0x413e xorl %ecx, %ecx cmpl $0x1, %eax je 0x413e movl %eax, %edx shrl %edx incl %ecx cmpl $0x3, %eax movl %edx, %eax ja 0x4133 addl %r8d, %ecx movl 0x4(%rsi), %edx movl 0x8(%rsi), %eax shll %cl, %edx movl %r8d, %ecx shll %cl, %eax orl %edx, %eax retq nop
_ZN5Cache7getAddrERNS_5BlockE: mov eax, [rdi+3Ch] mov ecx, 0FFFFFFFFh mov r8d, 0FFFFFFFFh test eax, eax jz short loc_411E xor r8d, r8d cmp eax, 1 jz short loc_411E mov edx, eax loc_4112: shr edx, 1 inc r8d cmp eax, 3 mov eax, edx ja short loc_4112 loc_411E: mov eax, [rdi+40h] xor edx, edx div dword ptr [rdi+44h] test eax, eax jz short loc_413E xor ecx, ecx cmp eax, 1 jz short loc_413E mov edx, eax loc_4133: shr edx, 1 inc ecx cmp eax, 3 mov eax, edx ja short loc_4133 loc_413E: add ecx, r8d mov edx, [rsi+4] mov eax, [rsi+8] shl edx, cl mov ecx, r8d shl eax, cl or eax, edx retn
long long Cache::getAddr(_DWORD *a1, long long a2) { unsigned int v2; // eax char v3; // cl char v4; // r8 unsigned int v5; // edx bool v6; // cc unsigned int v7; // eax unsigned int v8; // edx v2 = a1[15]; v3 = -1; v4 = -1; if ( v2 ) { v4 = 0; if ( v2 != 1 ) { v5 = a1[15]; do { v5 >>= 1; ++v4; v6 = v2 <= 3; v2 = v5; } while ( !v6 ); } } v7 = a1[16] / a1[17]; if ( v7 ) { v3 = 0; if ( v7 != 1 ) { v8 = a1[16] / a1[17]; do { v8 >>= 1; ++v3; v6 = v7 <= 3; v7 = v8; } while ( !v6 ); } } return (unsigned int)((*(_DWORD *)(a2 + 4) << (v4 + v3)) | (*(_DWORD *)(a2 + 8) << v4)); }
getAddr: MOV EAX,dword ptr [RDI + 0x3c] MOV ECX,0xffffffff MOV R8D,0xffffffff TEST EAX,EAX JZ 0x0010411e XOR R8D,R8D CMP EAX,0x1 JZ 0x0010411e MOV EDX,EAX LAB_00104112: SHR EDX,0x1 INC R8D CMP EAX,0x3 MOV EAX,EDX JA 0x00104112 LAB_0010411e: MOV EAX,dword ptr [RDI + 0x40] XOR EDX,EDX DIV dword ptr [RDI + 0x44] TEST EAX,EAX JZ 0x0010413e XOR ECX,ECX CMP EAX,0x1 JZ 0x0010413e MOV EDX,EAX LAB_00104133: SHR EDX,0x1 INC ECX CMP EAX,0x3 MOV EAX,EDX JA 0x00104133 LAB_0010413e: ADD ECX,R8D MOV EDX,dword ptr [RSI + 0x4] MOV EAX,dword ptr [RSI + 0x8] SHL EDX,CL MOV ECX,R8D SHL EAX,CL OR EAX,EDX RET
/* Cache::getAddr(Cache::Block&) */ uint __thiscall Cache::getAddr(Cache *this,Block *param_1) { bool bVar1; uint uVar2; char cVar3; char cVar4; ulong uVar5; byte bVar6; byte bVar7; uVar2 = *(uint *)(this + 0x3c); cVar3 = -1; bVar6 = 0xff; if (uVar2 != 0) { bVar7 = 0; bVar6 = 0; if (uVar2 != 1) { do { bVar6 = bVar7 + 1; bVar1 = 3 < uVar2; uVar2 = uVar2 >> 1; bVar7 = bVar6; } while (bVar1); } } uVar5 = (ulong)*(uint *)(this + 0x40) / (ulong)*(uint *)(this + 0x44); if ((int)uVar5 != 0) { cVar4 = '\0'; cVar3 = '\0'; if ((int)uVar5 != 1) { do { cVar3 = cVar4 + '\x01'; uVar2 = (uint)uVar5; uVar5 = uVar5 >> 1; cVar4 = cVar3; } while (3 < uVar2); } } return *(int *)(param_1 + 8) << (bVar6 & 0x1f) | *(int *)(param_1 + 4) << (cVar3 + bVar6 & 0x1f); }
23,449
uf_space_prespace
eloqsql/storage/myisam/mi_packrec.c
static void uf_space_prespace(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, uchar *to, uchar *end) { uint spaces; if (get_bit(bit_buff)) bfill((uchar*) to,(end-to),' '); else { if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end) { bit_buff->error=1; return; } bfill((uchar*) to,spaces,' '); if (to+spaces != end) decode_bytes(rec,bit_buff,to+spaces,end); } }
O3
c
uf_space_prespace: 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 0x8a343 movl (%r14), %r15d decl %eax movl %eax, 0x4(%r14) btl %eax, %r15d jae 0x8a360 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 0x2a2a0 movq %r14, %rdi callq 0x891c5 movl $0x1f, 0x4(%r14) movl (%r14), %r15d movl $0x1f, %eax testl %r15d, %r15d js 0x8a322 movq %r13, %rdx movl 0x1c(%r13), %r13d movl %eax, %ecx subl %r13d, %ecx movq %rdx, -0x30(%rbp) jae 0x8a3ac subl %eax, %r13d movl %eax, %eax leaq 0x63072(%rip), %rcx # 0xed3f0 andl (%rcx,%rax,4), %r15d movl %r13d, %ecx shll %cl, %r15d movq %r14, %rdi callq 0x891c5 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 0x8a3c1 movl %ecx, 0x4(%r14) shrl %cl, %r15d movl 0x1c(%rdx), %eax leaq 0x63033(%rip), %rcx # 0xed3f0 andl (%rcx,%rax,4), %r15d movl %r15d, %edx leaq (%r12,%rdx), %r13 cmpq %rbx, %r13 jbe 0x8a3d7 movl $0x1, 0x28(%r14) jmp 0x8a409 movq %r12, %rdi movl $0x20, %esi callq 0x2a2a0 cmpq %rbx, %r13 je 0x8a409 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 0x89ab6 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
uf_space_prespace_0: 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_8A343 mov r15d, [r14] dec eax mov [r14+4], eax bt r15d, eax jnb short loc_8A360 loc_8A322: 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_8A343: mov rdi, r14 call fill_buffer_0 mov dword ptr [r14+4], 1Fh mov r15d, [r14] mov eax, 1Fh test r15d, r15d js short loc_8A322 loc_8A360: mov rdx, r13 mov r13d, [r13+1Ch] mov ecx, eax sub ecx, r13d mov [rbp+var_30], rdx jnb short loc_8A3AC sub r13d, eax mov eax, eax lea rcx, mask_0 and r15d, [rcx+rax*4] mov ecx, r13d shl r15d, cl mov rdi, r14 call fill_buffer_0 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_8A3C1 loc_8A3AC: mov [r14+4], ecx shr r15d, cl mov eax, [rdx+1Ch] lea rcx, mask_0 and r15d, [rcx+rax*4] loc_8A3C1: mov edx, r15d lea r13, [r12+rdx] cmp r13, rbx jbe short loc_8A3D7 mov dword ptr [r14+28h], 1 jmp short loc_8A409 loc_8A3D7: mov rdi, r12 mov esi, 20h ; ' ' call _memset cmp r13, rbx jz short loc_8A409 mov rdi, [rbp+var_30] mov rsi, r14 mov rdx, r13 mov rcx, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp decode_bytes_0 loc_8A409: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long uf_space_prespace_0(long long a1, unsigned int *a2, long long a3, _BYTE *a4) { unsigned int v6; // eax unsigned int v7; // r15d unsigned int v8; // eax long long result; // rax unsigned int v10; // r13d unsigned int v11; // ecx int v12; // r13d int v13; // r15d unsigned int v14; // r15d _BYTE *v15; // r13 v6 = a2[1]; if ( v6 ) { v7 = *a2; v8 = v6 - 1; a2[1] = v8; if ( _bittest((const int *)&v7, v8) ) return memset(a3, 32LL, &a4[-a3]); } else { fill_buffer_0((long long)a2); a2[1] = 31; v7 = *a2; v8 = 31; if ( (*a2 & 0x80000000) != 0 ) return memset(a3, 32LL, &a4[-a3]); } v10 = *(_DWORD *)(a1 + 28); v11 = v8 - v10; if ( v8 >= v10 ) { a2[1] = v11; result = *(unsigned int *)(a1 + 28); v14 = mask_0[result] & (v7 >> v11); } else { v12 = v10 - v8; v13 = (mask_0[v8] & v7) << v12; fill_buffer_0((long long)a2); a2[1] = 32 - v12; result = *a2 >> -(char)v12; v14 = result + v13; } v15 = (_BYTE *)(a3 + v14); if ( v15 <= a4 ) { result = memset(a3, 32LL, v14); if ( v15 != a4 ) return (long long)decode_bytes_0(a1, (long long)a2, (_BYTE *)(a3 + v14), a4); } else { a2[10] = 1; } return result; }
uf_space_prespace: 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 0x0018a343 MOV R15D,dword ptr [R14] DEC EAX MOV dword ptr [R14 + 0x4],EAX BT R15D,EAX JNC 0x0018a360 LAB_0018a322: 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 0x0012a2a0 LAB_0018a343: MOV RDI,R14 CALL 0x001891c5 MOV dword ptr [R14 + 0x4],0x1f MOV R15D,dword ptr [R14] MOV EAX,0x1f TEST R15D,R15D JS 0x0018a322 LAB_0018a360: MOV RDX,R13 MOV R13D,dword ptr [R13 + 0x1c] MOV ECX,EAX SUB ECX,R13D MOV qword ptr [RBP + -0x30],RDX JNC 0x0018a3ac SUB R13D,EAX MOV EAX,EAX LEA RCX,[0x1ed3f0] AND R15D,dword ptr [RCX + RAX*0x4] MOV ECX,R13D SHL R15D,CL MOV RDI,R14 CALL 0x001891c5 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 0x0018a3c1 LAB_0018a3ac: MOV dword ptr [R14 + 0x4],ECX SHR R15D,CL MOV EAX,dword ptr [RDX + 0x1c] LEA RCX,[0x1ed3f0] AND R15D,dword ptr [RCX + RAX*0x4] LAB_0018a3c1: MOV EDX,R15D LEA R13,[R12 + RDX*0x1] CMP R13,RBX JBE 0x0018a3d7 MOV dword ptr [R14 + 0x28],0x1 JMP 0x0018a409 LAB_0018a3d7: MOV RDI,R12 MOV ESI,0x20 CALL 0x0012a2a0 CMP R13,RBX JZ 0x0018a409 MOV RDI,qword ptr [RBP + -0x30] MOV RSI,R14 MOV RDX,R13 MOV RCX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00189ab6 LAB_0018a409: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void uf_space_prespace(long param_1,uint *param_2,void *param_3,ulong param_4) { ulong uVar1; 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; uVar4 = 0x1f; if (-1 < (int)uVar6) goto LAB_0018a360; } else { uVar6 = *param_2; uVar4 = param_2[1] - 1; param_2[1] = uVar4; if ((uVar6 >> (uVar4 & 0x1f) & 1) == 0) { LAB_0018a360: uVar2 = *(uint *)(param_1 + 0x1c); 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 + 0x1c)]; } uVar1 = (long)param_3 + (ulong)uVar6; if (param_4 < uVar1) { param_2[10] = 1; } else { memset(param_3,0x20,(ulong)uVar6); if (uVar1 != param_4) { decode_bytes(param_1,param_2,uVar1,param_4); return; } } return; } } memset(param_3,0x20,param_4 - (long)param_3); return; }
23,450
inline_mysql_file_seek
eloqsql/include/mysql/psi/mysql_file.h
static inline my_off_t inline_mysql_file_seek( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif File file, my_off_t pos, int whence, myf flags) { my_off_t result; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_SEEK); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); result= my_seek(file, pos, whence, flags); PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0); return result; } #endif result= my_seek(file, pos, whence, flags); return result; }
O0
c
inline_mysql_file_seek: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movl %r8d, -0x24(%rbp) movq %r9, -0x30(%rbp) leaq 0x213bb0(%rip), %rax # 0x2c1238 movq (%rax), %rax movq 0x158(%rax), %rax movl -0x18(%rbp), %esi leaq -0x88(%rbp), %rdi movl $0x8, %edx callq *%rax movq %rax, -0x40(%rbp) cmpq $0x0, -0x40(%rbp) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0xad723 leaq 0x213b6a(%rip), %rax # 0x2c1238 movq (%rax), %rax movq 0x210(%rax), %rax movq -0x40(%rbp), %rdi movq -0x10(%rbp), %rdx movl -0x14(%rbp), %ecx xorl %esi, %esi callq *%rax movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movl -0x24(%rbp), %edx movq -0x30(%rbp), %rcx callq 0xf5b50 movq %rax, -0x38(%rbp) leaq 0x213b33(%rip), %rax # 0x2c1238 movq (%rax), %rax movq 0x218(%rax), %rax movq -0x40(%rbp), %rdi xorl %ecx, %ecx movl %ecx, %esi callq *%rax movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0xad742 movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movl -0x24(%rbp), %edx movq -0x30(%rbp), %rcx callq 0xf5b50 movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x90, %rsp popq %rbp retq nop
inline_mysql_file_seek_3: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov [rbp+var_20], rcx mov [rbp+var_24], r8d mov [rbp+var_30], r9 lea rax, PSI_server mov rax, [rax] mov rax, [rax+158h] mov esi, [rbp+var_18] lea rdi, [rbp+var_88] mov edx, 8 call rax mov [rbp+var_40], rax cmp [rbp+var_40], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_AD723 lea rax, PSI_server mov rax, [rax] mov rax, [rax+210h] mov rdi, [rbp+var_40] mov rdx, [rbp+var_10] mov ecx, [rbp+var_14] xor esi, esi call rax mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov edx, [rbp+var_24] mov rcx, [rbp+var_30] call my_seek mov [rbp+var_38], rax lea rax, PSI_server mov rax, [rax] mov rax, [rax+218h] mov rdi, [rbp+var_40] xor ecx, ecx mov esi, ecx call rax mov rax, [rbp+var_38] mov [rbp+var_8], rax jmp short loc_AD742 loc_AD723: mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov edx, [rbp+var_24] mov rcx, [rbp+var_30] call my_seek mov [rbp+var_38], rax mov rax, [rbp+var_38] mov [rbp+var_8], rax loc_AD742: mov rax, [rbp+var_8] add rsp, 90h pop rbp retn
long long inline_mysql_file_seek_3( long long a1, unsigned int a2, unsigned int a3, long long a4, unsigned int a5, long long a6) { _BYTE v7[72]; // [rsp+8h] [rbp-88h] BYREF long long v8; // [rsp+50h] [rbp-40h] long long v9; // [rsp+58h] [rbp-38h] long long v10; // [rsp+60h] [rbp-30h] unsigned int v11; // [rsp+6Ch] [rbp-24h] long long v12; // [rsp+70h] [rbp-20h] unsigned int v13; // [rsp+78h] [rbp-18h] unsigned int v14; // [rsp+7Ch] [rbp-14h] long long v15; // [rsp+80h] [rbp-10h] v15 = a1; v14 = a2; v13 = a3; v12 = a4; v11 = a5; v10 = a6; v8 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v7, a3, 8LL); if ( !v8 ) return my_seek(v13, v12, v11, v10); ((void ( *)(long long, _QWORD, long long, _QWORD))PSI_server[66])(v8, 0LL, v15, v14); v9 = my_seek(v13, v12, v11, v10); ((void ( *)(long long, _QWORD))PSI_server[67])(v8, 0LL); return v9; }
inline_mysql_file_seek: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV qword ptr [RBP + -0x20],RCX MOV dword ptr [RBP + -0x24],R8D MOV qword ptr [RBP + -0x30],R9 LEA RAX,[0x3c1238] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x158] MOV ESI,dword ptr [RBP + -0x18] LEA RDI,[RBP + -0x88] MOV EDX,0x8 CALL RAX MOV qword ptr [RBP + -0x40],RAX CMP qword ptr [RBP + -0x40],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x001ad723 LEA RAX,[0x3c1238] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x210] MOV RDI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x14] XOR ESI,ESI CALL RAX MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV EDX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x30] CALL 0x001f5b50 MOV qword ptr [RBP + -0x38],RAX LEA RAX,[0x3c1238] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV RDI,qword ptr [RBP + -0x40] XOR ECX,ECX MOV ESI,ECX CALL RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX JMP 0x001ad742 LAB_001ad723: MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV EDX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x30] CALL 0x001f5b50 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX LAB_001ad742: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x90 POP RBP RET
int8 inline_mysql_file_seek (int8 param_1,int4 param_2,int4 param_3,int8 param_4, int4 param_5,int8 param_6) { int1 local_90 [72]; long local_48; int8 local_40; int8 local_38; int4 local_2c; int8 local_28; int4 local_20; int4 local_1c; int8 local_18; int8 local_10; local_38 = param_6; local_2c = param_5; local_28 = param_4; local_20 = param_3; local_1c = param_2; local_18 = param_1; local_48 = (**(code **)(PSI_server + 0x158))(local_90,param_3,8); if (local_48 == 0) { local_10 = my_seek(local_20,local_28,local_2c,local_38); } else { (**(code **)(PSI_server + 0x210))(local_48,0,local_18,local_1c); local_40 = my_seek(local_20,local_28,local_2c,local_38); (**(code **)(PSI_server + 0x218))(local_48,0); local_10 = local_40; } return local_10; }
23,451
inline_mysql_file_seek
eloqsql/include/mysql/psi/mysql_file.h
static inline my_off_t inline_mysql_file_seek( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif File file, my_off_t pos, int whence, myf flags) { my_off_t result; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_SEEK); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); result= my_seek(file, pos, whence, flags); PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0); return result; } #endif result= my_seek(file, pos, whence, flags); return result; }
O3
c
inline_mysql_file_seek: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x58, %rsp movl %esi, %ebx movl %edi, %r14d leaq 0x351cd3(%rip), %rax # 0x386010 movq (%rax), %rax leaq -0x68(%rbp), %rdi movl $0x8, %edx callq *0x158(%rax) testq %rax, %rax jne 0x3436f movl %ebx, %edi xorl %esi, %esi movl $0x2, %edx xorl %ecx, %ecx callq 0xa1490 addq $0x58, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq -0x20(%rbp), %r15 movq %rax, %rdi movl %r14d, %esi movl %ebx, %edx movq %r15, %rcx callq 0x2b979 movq (%r15), %rax jmp 0x34364
inline_mysql_file_seek: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 58h mov ebx, esi mov r14d, edi lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_68] mov edx, 8 call qword ptr [rax+158h] test rax, rax jnz short loc_3436F mov edi, ebx xor esi, esi mov edx, 2 xor ecx, ecx call my_seek loc_34364: add rsp, 58h pop rbx pop r14 pop r15 pop rbp retn loc_3436F: lea r15, [rbp+var_20] mov rdi, rax mov esi, r14d mov edx, ebx mov rcx, r15 call inline_mysql_file_seek_cold_1 mov rax, [r15] jmp short loc_34364
long long inline_mysql_file_seek(unsigned int a1, long long a2) { long long v2; // rax _BYTE v4[72]; // [rsp+8h] [rbp-68h] BYREF _QWORD v5[4]; // [rsp+50h] [rbp-20h] BYREF v2 = ((long long ( *)(_BYTE *, long long, long long))PSI_server[43])(v4, a2, 8LL); if ( !v2 ) return my_seek((unsigned int)a2, 0LL, 2LL, 0LL); inline_mysql_file_seek_cold_1(v2, a1, a2, v5); return v5[0]; }
inline_mysql_file_seek: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x58 MOV EBX,ESI MOV R14D,EDI LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x68] MOV EDX,0x8 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0013436f MOV EDI,EBX XOR ESI,ESI MOV EDX,0x2 XOR ECX,ECX CALL 0x001a1490 LAB_00134364: ADD RSP,0x58 POP RBX POP R14 POP R15 POP RBP RET LAB_0013436f: LEA R15,[RBP + -0x20] MOV RDI,RAX MOV ESI,R14D MOV EDX,EBX MOV RCX,R15 CALL 0x0012b979 MOV RAX,qword ptr [R15] JMP 0x00134364
int8 inline_mysql_file_seek(int4 param_1,ulong param_2) { long lVar1; int1 local_70 [72]; int8 local_28; lVar1 = (**(code **)(PSI_server + 0x158))(local_70,param_2,8); if (lVar1 == 0) { local_28 = my_seek(param_2 & 0xffffffff,0,2,0); } else { inline_mysql_file_seek_cold_1(lVar1,param_1,param_2 & 0xffffffff,&local_28); } return local_28; }
23,452
mi_nommap_pread
eloqsql/storage/myisam/mi_dynrec.c
size_t mi_nommap_pread(MI_INFO *info, uchar *Buffer, size_t Count, my_off_t offset, myf MyFlags) { return mysql_file_pread(info->dfile, Buffer, Count, offset, MyFlags); }
O3
c
mi_nommap_pread: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %r8, -0x30(%rbp) movq %rcx, %r12 movq %rdx, %r14 movq %rsi, %r13 movl 0x1c0(%rdi), %ebx leaq 0x30f309(%rip), %rax # 0x386010 movq (%rax), %rax leaq -0x78(%rbp), %rdi movl %ebx, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax jne 0x76d49 movl %ebx, %edi movq %r13, %rsi movq %r14, %rdx movq %r12, %rcx movq -0x30(%rbp), %r8 callq 0xa0600 movq %rax, %rbx movq %rbx, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r15 leaq 0x30f2bd(%rip), %rax # 0x386010 movq (%rax), %rax leaq 0x64c83(%rip), %rdx # 0xdb9e0 movq %r15, %rdi movq %r14, %rsi movl $0xca, %ecx callq *0x210(%rax) movl %ebx, %edi movq %r13, %rsi movq %r14, %rdx movq %r12, %rcx movq -0x30(%rbp), %r12 movq %r12, %r8 callq 0xa0600 movq %rax, %rbx xorl %esi, %esi testq %rax, %rax cmovneq %rsi, %r14 cmpq $-0x1, %rax cmovneq %rax, %rsi testb $0x6, %r12b cmovneq %r14, %rsi leaq 0x30f268(%rip), %rax # 0x386010 movq (%rax), %rax movq %r15, %rdi callq *0x218(%rax) jmp 0x76d37
mi_nommap_pread: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov [rbp+var_30], r8 mov r12, rcx mov r14, rdx mov r13, rsi mov ebx, [rdi+1C0h] lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_78] mov esi, ebx mov edx, 6 call qword ptr [rax+158h] test rax, rax jnz short loc_76D49 mov edi, ebx mov rsi, r13 mov rdx, r14 mov rcx, r12 mov r8, [rbp+var_30] call my_pread mov rbx, rax loc_76D37: mov rax, rbx add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_76D49: mov r15, rax lea rax, PSI_server mov rax, [rax] lea rdx, aWorkspaceLlm4b_12; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r15 mov rsi, r14 mov ecx, 0CAh call qword ptr [rax+210h] mov edi, ebx mov rsi, r13 mov rdx, r14 mov rcx, r12 mov r12, [rbp+var_30] mov r8, r12 call my_pread mov rbx, rax xor esi, esi test rax, rax cmovnz r14, rsi cmp rax, 0FFFFFFFFFFFFFFFFh cmovnz rsi, rax test r12b, 6 cmovnz rsi, r14 lea rax, PSI_server mov rax, [rax] mov rdi, r15 call qword ptr [rax+218h] jmp short loc_76D37
long long mi_nommap_pread(long long a1, long long a2, long long a3, long long a4, long long a5) { unsigned int v7; // ebx long long v8; // rax long long v9; // rbx long long v11; // r15 _BYTE v12[72]; // [rsp+8h] [rbp-78h] BYREF long long v13; // [rsp+50h] [rbp-30h] v13 = a5; v7 = *(_DWORD *)(a1 + 448); v8 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v12, v7, 6LL); if ( !v8 ) return my_pread(v7, a2, a3, a4, v13); v11 = v8; ((void ( *)(long long, long long, const char *, long long))PSI_server[66])( v8, a3, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c", 202LL); v9 = my_pread(v7, a2, a3, a4, v13); ((void ( *)(long long))PSI_server[67])(v11); return v9; }
mi_nommap_pread: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV qword ptr [RBP + -0x30],R8 MOV R12,RCX MOV R14,RDX MOV R13,RSI MOV EBX,dword ptr [RDI + 0x1c0] LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x78] MOV ESI,EBX MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x00176d49 MOV EDI,EBX MOV RSI,R13 MOV RDX,R14 MOV RCX,R12 MOV R8,qword ptr [RBP + -0x30] CALL 0x001a0600 MOV RBX,RAX LAB_00176d37: MOV RAX,RBX ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00176d49: MOV R15,RAX LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDX,[0x1db9e0] MOV RDI,R15 MOV RSI,R14 MOV ECX,0xca CALL qword ptr [RAX + 0x210] MOV EDI,EBX MOV RSI,R13 MOV RDX,R14 MOV RCX,R12 MOV R12,qword ptr [RBP + -0x30] MOV R8,R12 CALL 0x001a0600 MOV RBX,RAX XOR ESI,ESI TEST RAX,RAX CMOVNZ R14,RSI CMP RAX,-0x1 CMOVNZ RSI,RAX TEST R12B,0x6 CMOVNZ RSI,R14 LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] MOV RDI,R15 CALL qword ptr [RAX + 0x218] JMP 0x00176d37
long mi_nommap_pread(long param_1,int8 param_2,long param_3,int8 param_4,ulong param_5) { int4 uVar1; ulong uVar2; long lVar3; long lVar4; long lVar5; int1 local_80 [72]; ulong local_38; uVar1 = *(int4 *)(param_1 + 0x1c0); local_38 = param_5; lVar3 = (**(code **)(PSI_server + 0x158))(local_80,uVar1,6); if (lVar3 == 0) { lVar4 = my_pread(uVar1,param_2,param_3,param_4,local_38); } else { (**(code **)(PSI_server + 0x210)) (lVar3,param_3,"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c", 0xca); uVar2 = local_38; lVar4 = my_pread(uVar1,param_2,param_3,param_4,local_38); if (lVar4 != 0) { param_3 = 0; } lVar5 = 0; if (lVar4 != -1) { lVar5 = lVar4; } if ((uVar2 & 6) != 0) { lVar5 = param_3; } (**(code **)(PSI_server + 0x218))(lVar3,lVar5); } return lVar4; }
23,453
JS_DefinePropertyDesc
bluesky950520[P]quickjs/quickjs.c
static __exception int JS_DefinePropertyDesc(JSContext *ctx, JSValue obj, JSAtom prop, JSValue desc, int flags) { JSPropertyDescriptor d; int ret; if (js_obj_to_desc(ctx, &d, desc) < 0) return -1; ret = JS_DefineProperty(ctx, obj, prop, d.value, d.getter, d.setter, d.flags | flags); js_free_desc(ctx, &d); return ret; }
O1
c
JS_DefinePropertyDesc: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x60, %rsp movl %ecx, %ebp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0x28(%rsp), %rsi movq %r8, %rdx movq %r9, %rcx callq 0x4e868 testl %eax, %eax js 0x706da movl 0x90(%rsp), %eax leaq 0x28(%rsp), %r12 orl (%r12), %eax movq 0x8(%r12), %r8 movq 0x10(%r12), %r9 movups 0x18(%r12), %xmm0 movups 0x28(%r12), %xmm1 movups %xmm1, 0x10(%rsp) movups %xmm0, (%rsp) movl %eax, 0x20(%rsp) movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx movl %ebp, %ecx callq 0x248a5 movl %eax, %ebp movq %rbx, %rdi movq %r12, %rsi callq 0x3ccaf movl %ebp, %eax jmp 0x706df movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x60, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
JS_DefinePropertyDesc: push rbp push r15 push r14 push r12 push rbx sub rsp, 60h mov ebp, ecx mov r14, rdx mov r15, rsi mov rbx, rdi lea rsi, [rsp+88h+var_60] mov rdx, r8 mov rcx, r9 call js_obj_to_desc test eax, eax js short loc_706DA mov eax, [rsp+88h+arg_0] lea r12, [rsp+88h+var_60] or eax, [r12] mov r8, [r12+8] mov r9, [r12+10h] movups xmm0, xmmword ptr [r12+18h] movups xmm1, xmmword ptr [r12+28h] movups [rsp+88h+var_78], xmm1 movups [rsp+88h+var_88], xmm0 mov [rsp+88h+var_68], eax mov rdi, rbx mov rsi, r15 mov rdx, r14 mov ecx, ebp call JS_DefineProperty mov ebp, eax mov rdi, rbx mov rsi, r12 call js_free_desc mov eax, ebp jmp short loc_706DF loc_706DA: mov eax, 0FFFFFFFFh loc_706DF: add rsp, 60h pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long JS_DefinePropertyDesc( long long a1, unsigned long long a2, long long a3, unsigned int a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, unsigned int a15) { __m128 v17; // xmm4 __m128 v18; // xmm5 unsigned int v19; // ebp int v21; // [rsp+28h] [rbp-60h] BYREF long long v22; // [rsp+30h] [rbp-58h] long long v23; // [rsp+38h] [rbp-50h] __m128 v24; // [rsp+40h] [rbp-48h] __m128 v25; // [rsp+50h] [rbp-38h] if ( (int)js_obj_to_desc(a1, (long long)&v21, a5, a6, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) < 0 ) return 0xFFFFFFFFLL; v19 = JS_DefineProperty( a1, a2, a3, a4, v22, v23, v24, v25, a9, a10, v17, v18, a13, a14, v24.m128_u64[0], v24.m128_i64[1], v25.m128_u64[0], v25.m128_i64[1], v21 | a15); js_free_desc(a1, (long long)&v21); return v19; }
JS_DefinePropertyDesc: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x60 MOV EBP,ECX MOV R14,RDX MOV R15,RSI MOV RBX,RDI LEA RSI,[RSP + 0x28] MOV RDX,R8 MOV RCX,R9 CALL 0x0014e868 TEST EAX,EAX JS 0x001706da MOV EAX,dword ptr [RSP + 0x90] LEA R12,[RSP + 0x28] OR EAX,dword ptr [R12] MOV R8,qword ptr [R12 + 0x8] MOV R9,qword ptr [R12 + 0x10] MOVUPS XMM0,xmmword ptr [R12 + 0x18] MOVUPS XMM1,xmmword ptr [R12 + 0x28] MOVUPS xmmword ptr [RSP + 0x10],XMM1 MOVUPS xmmword ptr [RSP],XMM0 MOV dword ptr [RSP + 0x20],EAX MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 MOV ECX,EBP CALL 0x001248a5 MOV EBP,EAX MOV RDI,RBX MOV RSI,R12 CALL 0x0013ccaf MOV EAX,EBP JMP 0x001706df LAB_001706da: MOV EAX,0xffffffff LAB_001706df: ADD RSP,0x60 POP RBX POP R12 POP R14 POP R15 POP RBP RET
int4 JS_DefinePropertyDesc (int8 param_1,int8 param_2,int8 param_3,int4 param_4, int8 param_5,int8 param_6,uint param_7) { int iVar1; int4 uVar2; uint local_60 [2]; int8 local_58; int8 local_50; int4 local_48; int4 uStack_40; int4 local_38; int4 uStack_30; iVar1 = js_obj_to_desc(param_1,local_60,param_5,param_6); if (iVar1 < 0) { uVar2 = 0xffffffff; } else { uVar2 = JS_DefineProperty(param_1,param_2,param_3,param_4,local_58,local_50,local_48,uStack_40, local_38,uStack_30,param_7 | local_60[0]); js_free_desc(param_1,local_60); } return uVar2; }
23,454
JS_DefinePropertyDesc
bluesky950520[P]quickjs/quickjs.c
static __exception int JS_DefinePropertyDesc(JSContext *ctx, JSValue obj, JSAtom prop, JSValue desc, int flags) { JSPropertyDescriptor d; int ret; if (js_obj_to_desc(ctx, &d, desc) < 0) return -1; ret = JS_DefineProperty(ctx, obj, prop, d.value, d.getter, d.setter, d.flags | flags); js_free_desc(ctx, &d); return ret; }
O3
c
JS_DefinePropertyDesc: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x60, %rsp movl %ecx, %ebp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0x28(%rsp), %rsi movq %r8, %rdx movq %r9, %rcx callq 0x50ab3 testl %eax, %eax js 0x72c6f movl 0x90(%rsp), %eax leaq 0x28(%rsp), %r12 orl (%r12), %eax movq 0x8(%r12), %r8 movq 0x10(%r12), %r9 movups 0x18(%r12), %xmm0 movups 0x28(%r12), %xmm1 movups %xmm1, 0x10(%rsp) movups %xmm0, (%rsp) movl %eax, 0x20(%rsp) movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx movl %ebp, %ecx callq 0x24e8c movl %eax, %ebp movq %rbx, %rdi movq %r12, %rsi callq 0x3e21f movl %ebp, %eax jmp 0x72c74 movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x60, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
JS_DefinePropertyDesc: push rbp push r15 push r14 push r12 push rbx sub rsp, 60h mov ebp, ecx mov r14, rdx mov r15, rsi mov rbx, rdi lea rsi, [rsp+88h+var_60] mov rdx, r8 mov rcx, r9 call js_obj_to_desc test eax, eax js short loc_72C6F mov eax, [rsp+88h+arg_0] lea r12, [rsp+88h+var_60] or eax, [r12] mov r8, [r12+8] mov r9, [r12+10h] movups xmm0, xmmword ptr [r12+18h] movups xmm1, xmmword ptr [r12+28h] movups [rsp+88h+var_78], xmm1 movups [rsp+88h+var_88], xmm0 mov [rsp+88h+var_68], eax mov rdi, rbx mov rsi, r15 mov rdx, r14 mov ecx, ebp call JS_DefineProperty mov ebp, eax mov rdi, rbx mov rsi, r12 call js_free_desc mov eax, ebp jmp short loc_72C74 loc_72C6F: mov eax, 0FFFFFFFFh loc_72C74: add rsp, 60h pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long JS_DefinePropertyDesc( long long a1, long long a2, long long a3, unsigned int a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, unsigned int a15) { __m128 v17; // xmm4 __m128 v18; // xmm5 unsigned int v19; // ebp long long v20; // rdx long long v21; // rcx long long v22; // r8 long long v23; // r9 _QWORD v25[3]; // [rsp+28h] [rbp-60h] BYREF __m128 v26; // [rsp+40h] [rbp-48h] __m128 v27; // [rsp+50h] [rbp-38h] if ( (int)js_obj_to_desc(a1, (long long)v25, a5, a6, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) < 0 ) return 0xFFFFFFFFLL; v19 = JS_DefineProperty( a1, a2, a3, a4, (_DWORD *)v25[1], v25[2], v26, v27, a9, a10, v17, v18, a13, a14, *(double *)v26.m128_u64, v26.m128_i64[1], v27.m128_i64[0], v27.m128_i64[1], LODWORD(v25[0]) | a15); js_free_desc(a1, v25, v20, v21, v22, v23); return v19; }
JS_DefinePropertyDesc: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x60 MOV EBP,ECX MOV R14,RDX MOV R15,RSI MOV RBX,RDI LEA RSI,[RSP + 0x28] MOV RDX,R8 MOV RCX,R9 CALL 0x00150ab3 TEST EAX,EAX JS 0x00172c6f MOV EAX,dword ptr [RSP + 0x90] LEA R12,[RSP + 0x28] OR EAX,dword ptr [R12] MOV R8,qword ptr [R12 + 0x8] MOV R9,qword ptr [R12 + 0x10] MOVUPS XMM0,xmmword ptr [R12 + 0x18] MOVUPS XMM1,xmmword ptr [R12 + 0x28] MOVUPS xmmword ptr [RSP + 0x10],XMM1 MOVUPS xmmword ptr [RSP],XMM0 MOV dword ptr [RSP + 0x20],EAX MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 MOV ECX,EBP CALL 0x00124e8c MOV EBP,EAX MOV RDI,RBX MOV RSI,R12 CALL 0x0013e21f MOV EAX,EBP JMP 0x00172c74 LAB_00172c6f: MOV EAX,0xffffffff LAB_00172c74: ADD RSP,0x60 POP RBX POP R12 POP R14 POP R15 POP RBP RET
int4 JS_DefinePropertyDesc (int8 param_1,int8 param_2,int8 param_3,int4 param_4, int8 param_5,int8 param_6,uint param_7) { int iVar1; int4 uVar2; uint local_60 [2]; int8 local_58; int8 local_50; int4 local_48; int4 uStack_40; int4 local_38; int4 uStack_30; iVar1 = js_obj_to_desc(param_1,local_60,param_5,param_6); if (iVar1 < 0) { uVar2 = 0xffffffff; } else { uVar2 = JS_DefineProperty(param_1,param_2,param_3,param_4,local_58,local_50,local_48,uStack_40, local_38,uStack_30,param_7 | local_60[0]); js_free_desc(param_1,local_60); } return uVar2; }
23,455
ma_keyseg_read
eloqsql/storage/maria/ma_open.c
uchar *_ma_keyseg_read(uchar *ptr, HA_KEYSEG *keyseg) { keyseg->type = *ptr++; keyseg->language = *ptr++; keyseg->null_bit = *ptr++; keyseg->bit_start = *ptr++; keyseg->language += ((uint16) (*ptr++)) << 8; keyseg->bit_length = *ptr++; keyseg->flag = mi_uint2korr(ptr); ptr+= 2; keyseg->length = mi_uint2korr(ptr); ptr+= 2; keyseg->start = mi_uint4korr(ptr); ptr+= 4; keyseg->null_pos = mi_uint4korr(ptr); ptr+= 4; keyseg->charset=0; /* Will be filled in later */ if (keyseg->null_bit) keyseg->bit_pos= (uint16)(keyseg->null_pos + (keyseg->null_bit == 7)); else { keyseg->bit_pos= (uint16)keyseg->null_pos; keyseg->null_pos= 0; } return ptr; }
O3
c
ma_keyseg_read: pushq %rbp movq %rsp, %rbp movq %rdi, %rax movb (%rdi), %cl movb %cl, 0x18(%rsi) movzbl 0x1(%rdi), %edx movw %dx, 0x16(%rsi) movb 0x2(%rdi), %cl movb %cl, 0x19(%rsi) movb 0x3(%rdi), %dil movb %dil, 0x1a(%rsi) movzbl 0x4(%rax), %edi shll $0x8, %edi orl %edx, %edi movw %di, 0x16(%rsi) movb 0x5(%rax), %dl movb %dl, 0x1b(%rsi) movzwl 0x6(%rax), %edx rolw $0x8, %dx movw %dx, 0x12(%rsi) movzwl 0x8(%rax), %edx rolw $0x8, %dx movw %dx, 0x14(%rsi) movl 0xa(%rax), %edx bswapl %edx movl %edx, 0x8(%rsi) movzwl 0x10(%rax), %edx rolw $0x8, %dx movzwl %dx, %edx movzbl 0xf(%rax), %edi shll $0x10, %edi movzbl 0xe(%rax), %r8d shll $0x18, %r8d orl %edi, %r8d orl %edx, %r8d movl %r8d, 0xc(%rsi) movq $0x0, (%rsi) testb %cl, %cl je 0x365a8 xorl %edi, %edi cmpb $0x7, %cl sete %dil addl %edi, %edx jmp 0x365af movl $0x0, 0xc(%rsi) movw %dx, 0x10(%rsi) addq $0x12, %rax popq %rbp retq
_ma_keyseg_read: push rbp mov rbp, rsp mov rax, rdi mov cl, [rdi] mov [rsi+18h], cl movzx edx, byte ptr [rdi+1] mov [rsi+16h], dx mov cl, [rdi+2] mov [rsi+19h], cl mov dil, [rdi+3] mov [rsi+1Ah], dil movzx edi, byte ptr [rax+4] shl edi, 8 or edi, edx mov [rsi+16h], di mov dl, [rax+5] mov [rsi+1Bh], dl movzx edx, word ptr [rax+6] rol dx, 8 mov [rsi+12h], dx movzx edx, word ptr [rax+8] rol dx, 8 mov [rsi+14h], dx mov edx, [rax+0Ah] bswap edx mov [rsi+8], edx movzx edx, word ptr [rax+10h] rol dx, 8 movzx edx, dx movzx edi, byte ptr [rax+0Fh] shl edi, 10h movzx r8d, byte ptr [rax+0Eh] shl r8d, 18h or r8d, edi or r8d, edx mov [rsi+0Ch], r8d mov qword ptr [rsi], 0 test cl, cl jz short loc_365A8 xor edi, edi cmp cl, 7 setz dil add edx, edi jmp short loc_365AF loc_365A8: mov dword ptr [rsi+0Ch], 0 loc_365AF: mov [rsi+10h], dx add rax, 12h pop rbp retn
long long ma_keyseg_read(long long a1, long long a2) { __int16 v2; // dx char v3; // cl unsigned __int16 v4; // dx *(_BYTE *)(a2 + 24) = *(_BYTE *)a1; v2 = *(unsigned __int8 *)(a1 + 1); *(_WORD *)(a2 + 22) = v2; v3 = *(_BYTE *)(a1 + 2); *(_BYTE *)(a2 + 25) = v3; *(_BYTE *)(a2 + 26) = *(_BYTE *)(a1 + 3); *(_WORD *)(a2 + 22) = v2 | (*(unsigned __int8 *)(a1 + 4) << 8); *(_BYTE *)(a2 + 27) = *(_BYTE *)(a1 + 5); *(_WORD *)(a2 + 18) = __ROL2__(*(_WORD *)(a1 + 6), 8); *(_WORD *)(a2 + 20) = __ROL2__(*(_WORD *)(a1 + 8), 8); *(_DWORD *)(a2 + 8) = _byteswap_ulong(*(_DWORD *)(a1 + 10)); v4 = __ROL2__(*(_WORD *)(a1 + 16), 8); *(_DWORD *)(a2 + 12) = v4 | (*(unsigned __int8 *)(a1 + 15) << 16) | (*(unsigned __int8 *)(a1 + 14) << 24); *(_QWORD *)a2 = 0LL; if ( v3 ) v4 += v3 == 7; else *(_DWORD *)(a2 + 12) = 0; *(_WORD *)(a2 + 16) = v4; return a1 + 18; }
_ma_keyseg_read: PUSH RBP MOV RBP,RSP MOV RAX,RDI MOV CL,byte ptr [RDI] MOV byte ptr [RSI + 0x18],CL MOVZX EDX,byte ptr [RDI + 0x1] MOV word ptr [RSI + 0x16],DX MOV CL,byte ptr [RDI + 0x2] MOV byte ptr [RSI + 0x19],CL MOV DIL,byte ptr [RDI + 0x3] MOV byte ptr [RSI + 0x1a],DIL MOVZX EDI,byte ptr [RAX + 0x4] SHL EDI,0x8 OR EDI,EDX MOV word ptr [RSI + 0x16],DI MOV DL,byte ptr [RAX + 0x5] MOV byte ptr [RSI + 0x1b],DL MOVZX EDX,word ptr [RAX + 0x6] ROL DX,0x8 MOV word ptr [RSI + 0x12],DX MOVZX EDX,word ptr [RAX + 0x8] ROL DX,0x8 MOV word ptr [RSI + 0x14],DX MOV EDX,dword ptr [RAX + 0xa] BSWAP EDX MOV dword ptr [RSI + 0x8],EDX MOVZX EDX,word ptr [RAX + 0x10] ROL DX,0x8 MOVZX EDX,DX MOVZX EDI,byte ptr [RAX + 0xf] SHL EDI,0x10 MOVZX R8D,byte ptr [RAX + 0xe] SHL R8D,0x18 OR R8D,EDI OR R8D,EDX MOV dword ptr [RSI + 0xc],R8D MOV qword ptr [RSI],0x0 TEST CL,CL JZ 0x001365a8 XOR EDI,EDI CMP CL,0x7 SETZ DIL ADD EDX,EDI JMP 0x001365af LAB_001365a8: MOV dword ptr [RSI + 0xc],0x0 LAB_001365af: MOV word ptr [RSI + 0x10],DX ADD RAX,0x12 POP RBP RET
int1 * _ma_keyseg_read(int1 *param_1,int8 *param_2) { char cVar1; byte bVar2; uint uVar3; ushort uVar4; *(int1 *)(param_2 + 3) = *param_1; bVar2 = param_1[1]; *(ushort *)((long)param_2 + 0x16) = (ushort)bVar2; cVar1 = param_1[2]; *(char *)((long)param_2 + 0x19) = cVar1; *(int1 *)((long)param_2 + 0x1a) = param_1[3]; *(ushort *)((long)param_2 + 0x16) = CONCAT11(param_1[4],bVar2); *(int1 *)((long)param_2 + 0x1b) = param_1[5]; *(ushort *)((long)param_2 + 0x12) = *(ushort *)(param_1 + 6) << 8 | *(ushort *)(param_1 + 6) >> 8; *(ushort *)((long)param_2 + 0x14) = *(ushort *)(param_1 + 8) << 8 | *(ushort *)(param_1 + 8) >> 8; uVar3 = *(uint *)(param_1 + 10); *(uint *)(param_2 + 1) = uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18; uVar4 = *(ushort *)(param_1 + 0x10) << 8 | *(ushort *)(param_1 + 0x10) >> 8; *(uint *)((long)param_2 + 0xc) = (uint)(byte)param_1[0xe] << 0x18 | (uint)(byte)param_1[0xf] << 0x10 | (uint)uVar4; *param_2 = 0; if (cVar1 == '\0') { *(int4 *)((long)param_2 + 0xc) = 0; } else { uVar4 = uVar4 + (cVar1 == '\a'); } *(ushort *)(param_2 + 2) = uVar4; return param_1 + 0x12; }
23,456
update_dynamic_record
eloqsql/storage/maria/ma_dynrec.c
static my_bool update_dynamic_record(MARIA_HA *info, MARIA_RECORD_POS filepos, uchar *record, ulong reclength) { int flag; uint error; ulong length; MARIA_BLOCK_INFO block_info; DBUG_ENTER("update_dynamic_record"); flag=block_info.second_read=0; /* Check if we have enough room for the record. First we do simplified check to make usual case faster. Then we do more precise check for the space left. Though it still is not absolutely precise, as we always use MARIA_MAX_DYN_BLOCK_HEADER while it can be less in the most of the cases. */ /* compare with just the reclength as we're going to get some space from the old replaced record */ if (unlikely(info->s->base.max_data_file_length - info->state->data_file_length < reclength)) { /* If new record isn't longer, we can go on safely */ if (info->cur_row.total_length < reclength) { if (info->s->base.max_data_file_length - info->state->data_file_length + info->state->empty - info->state->del * MARIA_MAX_DYN_BLOCK_HEADER < reclength - info->cur_row.total_length + MARIA_MAX_DYN_BLOCK_HEADER) { my_errno=HA_ERR_RECORD_FILE_FULL; goto err; } } } /* Remember length for updated row if it's updated again */ info->cur_row.total_length= reclength; while (reclength > 0) { if (filepos != info->s->state.dellink) { block_info.next_filepos= HA_OFFSET_ERROR; if ((error= _ma_get_block_info(info, &block_info, info->dfile.file, filepos)) & (BLOCK_DELETED | BLOCK_ERROR | BLOCK_SYNC_ERROR | BLOCK_FATAL_ERROR)) { DBUG_PRINT("error",("Got wrong block info")); if (!(error & BLOCK_FATAL_ERROR)) _ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); goto err; } length=(ulong) (block_info.filepos-filepos) + block_info.block_len; if (length < reclength) { uint tmp=MY_ALIGN(reclength - length + 3 + MY_TEST(reclength >= 65520L), MARIA_DYN_ALIGN_SIZE); /* Don't create a block bigger than MARIA_MAX_BLOCK_LENGTH */ tmp= MY_MIN(length+tmp, MARIA_MAX_BLOCK_LENGTH)-length; /* Check if we can extend this block */ if (block_info.filepos + block_info.block_len == info->state->data_file_length && info->state->data_file_length < info->s->base.max_data_file_length-tmp) { /* extend file */ DBUG_PRINT("info",("Extending file with %d bytes",tmp)); if (info->cur_row.nextpos == info->state->data_file_length) info->cur_row.nextpos+= tmp; info->state->data_file_length+= tmp; info->update|= HA_STATE_WRITE_AT_END | HA_STATE_EXTEND_BLOCK; length+=tmp; } else if (length < MARIA_MAX_BLOCK_LENGTH - MARIA_MIN_BLOCK_LENGTH) { /* Check if next block is a deleted block Above we have MARIA_MIN_BLOCK_LENGTH to avoid the problem where the next block is so small it can't be splited which could casue problems */ MARIA_BLOCK_INFO del_block; del_block.second_read=0; if (_ma_get_block_info(info, &del_block, info->dfile.file, block_info.filepos + block_info.block_len) & BLOCK_DELETED) { /* Use; Unlink it and extend the current block */ DBUG_PRINT("info",("Extending current block")); if (unlink_deleted_block(info,&del_block)) goto err; if ((length+=del_block.block_len) > MARIA_MAX_BLOCK_LENGTH) { /* New block was too big, link overflow part back to delete list */ my_off_t next_pos; ulong rest_length= length-MARIA_MAX_BLOCK_LENGTH; set_if_bigger(rest_length, MARIA_MIN_BLOCK_LENGTH); next_pos= del_block.filepos+ del_block.block_len - rest_length; if (update_backward_delete_link(info, info->s->state.dellink, next_pos)) DBUG_RETURN(1); /* create delete link for data that didn't fit into the page */ del_block.header[0]=0; mi_int3store(del_block.header+1, rest_length); mi_sizestore(del_block.header+4,info->s->state.dellink); bfill(del_block.header+12,8,255); if (info->s->file_write(info, del_block.header, 20, next_pos, MYF(MY_NABP))) DBUG_RETURN(1); info->s->state.dellink= next_pos; info->s->state.split++; info->state->del++; info->state->empty+= rest_length; length-= rest_length; } } } } } else { if (_ma_find_writepos(info,reclength,&filepos,&length)) goto err; } if (_ma_write_part_record(info,filepos,length,block_info.next_filepos, &record,&reclength,&flag)) goto err; if ((filepos=block_info.next_filepos) == HA_OFFSET_ERROR) { /* Start writing data on deleted blocks */ filepos=info->s->state.dellink; } } if (block_info.next_filepos != HA_OFFSET_ERROR) if (delete_dynamic_record(info,block_info.next_filepos,1)) goto err; DBUG_RETURN(0); err: DBUG_RETURN(1); }
O3
c
update_dynamic_record: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xf8, %rsp movq %rcx, %r13 movq %rsi, %r14 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq %rsi, -0xf0(%rbp) movq %rdx, -0x110(%rbp) movq %rcx, -0x108(%rbp) xorl %eax, %eax movl %eax, -0x38(%rbp) movl %eax, -0xf4(%rbp) movq (%rdi), %rax movq 0x20(%rdi), %rcx movq 0x368(%rax), %rax subq 0x28(%rcx), %rax cmpq %r13, %rax jb 0x48659 movq %r13, 0x110(%rbx) leaq -0x108(%rbp), %r15 movq (%rbx), %rax cmpq 0xc8(%rax), %r14 jne 0x4835d movq %rbx, %rdi movq %r13, %rsi leaq -0xf0(%rbp), %rdx leaq -0xe8(%rbp), %rcx callq 0x4add9 testl %eax, %eax jne 0x48636 movq -0xf0(%rbp), %r14 movq -0xe8(%rbp), %r12 jmp 0x485ae movq $-0x1, -0x48(%rbp) movl 0x480(%rbx), %edx movq %rbx, %rdi leaq -0x88(%rbp), %rsi movq %r14, %rcx callq 0x49240 cmpl $0x4, %eax jae 0x48629 movq -0x60(%rbp), %rcx movq -0x50(%rbp), %rax movq %rax, %r12 subq %r14, %r12 addq %rcx, %r12 movq %r12, -0xe8(%rbp) cmpq %r13, %r12 jae 0x485ae addq %rax, %rcx movq 0x20(%rbx), %rax cmpq 0x28(%rax), %rcx leaq -0xe0(%rbp), %rsi jne 0x48422 cmpq $0xfff0, %r13 # imm = 0xFFF0 sbbl $-0x1, %r13d subl %r12d, %r13d addl $0x6, %r13d andl $-0x4, %r13d addq %r12, %r13 movl $0xfffffc, %edx # imm = 0xFFFFFC cmpq %rdx, %r13 cmovaeq %rdx, %r13 subl %r12d, %r13d movq (%rbx), %rdx movq 0x368(%rdx), %rdx subq %r13, %rdx cmpq %rdx, %rcx jae 0x48422 cmpq %rcx, 0xa0(%rbx) jne 0x4840c addq %r13, %rcx movq %rcx, 0xa0(%rbx) movq 0x28(%rax), %rcx addq %r13, %rcx movq %rcx, 0x28(%rax) orb $0x9, 0x625(%rbx) addq %r13, %r12 jmp 0x485a7 cmpq $0xffffe7, %r12 # imm = 0xFFFFE7 ja 0x485ae movl $0x0, -0x90(%rbp) movl 0x480(%rbx), %edx movq %rbx, %rdi movq %rsi, %r13 callq 0x49240 testb $0x4, %al je 0x485ae movq %rbx, %rdi movq %r13, %rsi callq 0x4964f testb %al, %al jne 0x48636 movq -0xb8(%rbp), %r13 addq %r13, %r12 movq %r12, -0xe8(%rbp) cmpq $0xfffffd, %r12 # imm = 0xFFFFFD jb 0x485ae leaq -0xfffffc(%r12), %rcx cmpq $0x15, %rcx movl $0x14, %eax cmovbq %rax, %rcx movq %rcx, -0x100(%rbp) subq %rcx, %r13 addq -0xa8(%rbp), %r13 movq (%rbx), %rax movq 0xc8(%rax), %rsi movq %rbx, %rdi movq %r13, %rdx callq 0x4978f testb %al, %al jne 0x48636 movb $0x0, -0xe0(%rbp) movq -0x100(%rbp), %rax movb %al, -0xdd(%rbp) movb %ah, -0xde(%rbp) shrl $0x10, %eax movb %al, -0xdf(%rbp) movq (%rbx), %rax movq 0xc8(%rax), %rcx movq %rcx, %rdx shrq $0x20, %rdx movb %dl, -0xd9(%rbp) movq %rcx, %rdx shrq $0x28, %rdx movb %dl, -0xda(%rbp) movq %rcx, %rdx shrq $0x30, %rdx movb %dl, -0xdb(%rbp) movq %rcx, %rdx shrq $0x38, %rdx movb %dl, -0xdc(%rbp) movb %cl, -0xd5(%rbp) movb %ch, -0xd6(%rbp) movl %ecx, %edx shrl $0x10, %edx movb %dl, -0xd7(%rbp) shrl $0x18, %ecx movb %cl, -0xd8(%rbp) movq $-0x1, -0xd4(%rbp) movl $0x14, %edx movl $0x4, %r8d movq %rbx, %rdi leaq -0xe0(%rbp), %rsi movq %r13, %rcx callq *0x6e8(%rax) testq %rax, %rax jne 0x48636 movq (%rbx), %rax movq %r13, 0xc8(%rax) movq (%rbx), %rax incq 0xc0(%rax) movq 0x20(%rbx), %rax incq 0x8(%rax) movq 0x20(%rbx), %rax movq -0x100(%rbp), %rcx addq %rcx, 0x10(%rax) subq %rcx, %r12 movq %r12, -0xe8(%rbp) movq -0x48(%rbp), %rcx leaq -0xf4(%rbp), %rax movq %rax, (%rsp) movq %rbx, %rdi movq %r14, %rsi movq %r12, %rdx leaq -0x110(%rbp), %r8 movq %r15, %r9 callq 0x48b3e testl %eax, %eax jne 0x48636 movq -0x48(%rbp), %rsi movq %rsi, -0xf0(%rbp) movq %rsi, %r14 cmpq $-0x1, %rsi jne 0x485fe movq (%rbx), %rax movq 0xc8(%rax), %r14 movq %r14, -0xf0(%rbp) movq -0x108(%rbp), %r13 testq %r13, %r13 jne 0x4831d cmpq $-0x1, %rsi je 0x48625 movq %rbx, %rdi movl $0x1, %edx callq 0x48951 testb %al, %al jne 0x48636 xorl %eax, %eax jmp 0x48638 movq %rbx, %rdi movl $0x7f, %esi callq 0x3c86c movb $0x1, %al movq %fs:0x28, %rcx cmpq -0x30(%rbp), %rcx jne 0x4869c addq $0xf8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x110(%rbx), %rdx cmpq %r13, %rdx jae 0x4830f addq 0x10(%rcx), %rax movq 0x8(%rcx), %rcx shlq $0x2, %rcx leaq (%rcx,%rcx,4), %rcx subq %rcx, %rax movq %r13, %rcx subq %rdx, %rcx addq $0x14, %rcx cmpq %rcx, %rax jae 0x4830f callq 0xac2be movl $0x87, (%rax) jmp 0x48636 callq 0x2a250
update_dynamic_record: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0F8h mov r13, rcx mov r14, rsi mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax mov [rbp+var_F0], rsi mov [rbp+var_110], rdx mov [rbp+var_108], rcx xor eax, eax mov [rbp+var_38], eax mov [rbp+var_F4], eax mov rax, [rdi] mov rcx, [rdi+20h] mov rax, [rax+368h] sub rax, [rcx+28h] cmp rax, r13 jb loc_48659 loc_4830F: mov [rbx+110h], r13 lea r15, [rbp+var_108] loc_4831D: mov rax, [rbx] cmp r14, [rax+0C8h] jnz short loc_4835D mov rdi, rbx mov rsi, r13 lea rdx, [rbp+var_F0] lea rcx, [rbp+var_E8] call _ma_find_writepos test eax, eax jnz loc_48636 mov r14, [rbp+var_F0] mov r12, [rbp+var_E8] jmp loc_485AE loc_4835D: mov [rbp+var_48], 0FFFFFFFFFFFFFFFFh mov edx, [rbx+480h] mov rdi, rbx lea rsi, [rbp+var_88] mov rcx, r14 call _ma_get_block_info cmp eax, 4 jnb loc_48629 mov rcx, [rbp+var_60] mov rax, [rbp+var_50] mov r12, rax sub r12, r14 add r12, rcx mov [rbp+var_E8], r12 cmp r12, r13 jnb loc_485AE add rcx, rax mov rax, [rbx+20h] cmp rcx, [rax+28h] lea rsi, [rbp+var_E0] jnz short loc_48422 cmp r13, 0FFF0h sbb r13d, 0FFFFFFFFh sub r13d, r12d add r13d, 6 and r13d, 0FFFFFFFCh add r13, r12 mov edx, 0FFFFFCh cmp r13, rdx cmovnb r13, rdx sub r13d, r12d mov rdx, [rbx] mov rdx, [rdx+368h] sub rdx, r13 cmp rcx, rdx jnb short loc_48422 cmp [rbx+0A0h], rcx jnz short loc_4840C add rcx, r13 mov [rbx+0A0h], rcx mov rcx, [rax+28h] loc_4840C: add rcx, r13 mov [rax+28h], rcx or byte ptr [rbx+625h], 9 add r12, r13 jmp loc_485A7 loc_48422: cmp r12, 0FFFFE7h ja loc_485AE mov [rbp+var_90], 0 mov edx, [rbx+480h] mov rdi, rbx mov r13, rsi call _ma_get_block_info test al, 4 jz loc_485AE mov rdi, rbx mov rsi, r13 call unlink_deleted_block test al, al jnz loc_48636 mov r13, [rbp+var_B8] add r12, r13 mov [rbp+var_E8], r12 cmp r12, 0FFFFFDh jb loc_485AE lea rcx, [r12-0FFFFFCh] cmp rcx, 15h mov eax, 14h cmovb rcx, rax mov [rbp+var_100], rcx sub r13, rcx add r13, [rbp+var_A8] mov rax, [rbx] mov rsi, [rax+0C8h] mov rdi, rbx mov rdx, r13 call update_backward_delete_link test al, al jnz loc_48636 mov [rbp+var_E0], 0 mov rax, [rbp+var_100] mov [rbp+var_DD], al mov [rbp+var_DE], ah shr eax, 10h mov [rbp+var_DF], al mov rax, [rbx] mov rcx, [rax+0C8h] mov rdx, rcx shr rdx, 20h mov [rbp+var_D9], dl mov rdx, rcx shr rdx, 28h mov [rbp+var_DA], dl mov rdx, rcx shr rdx, 30h mov [rbp+var_DB], dl mov rdx, rcx shr rdx, 38h mov [rbp+var_DC], dl mov [rbp+var_D5], cl mov [rbp+var_D6], ch mov edx, ecx shr edx, 10h mov [rbp+var_D7], dl shr ecx, 18h mov [rbp+var_D8], cl mov [rbp+var_D4], 0FFFFFFFFFFFFFFFFh mov edx, 14h mov r8d, 4 mov rdi, rbx lea rsi, [rbp+var_E0] mov rcx, r13 call qword ptr [rax+6E8h] test rax, rax jnz loc_48636 mov rax, [rbx] mov [rax+0C8h], r13 mov rax, [rbx] inc qword ptr [rax+0C0h] mov rax, [rbx+20h] inc qword ptr [rax+8] mov rax, [rbx+20h] mov rcx, [rbp+var_100] add [rax+10h], rcx sub r12, rcx loc_485A7: mov [rbp+var_E8], r12 loc_485AE: mov rcx, [rbp+var_48] lea rax, [rbp+var_F4] mov [rsp+120h+var_120], rax mov rdi, rbx mov rsi, r14 mov rdx, r12 lea r8, [rbp+var_110] mov r9, r15 call _ma_write_part_record test eax, eax jnz short loc_48636 mov rsi, [rbp+var_48] mov [rbp+var_F0], rsi mov r14, rsi cmp rsi, 0FFFFFFFFFFFFFFFFh jnz short loc_485FE mov rax, [rbx] mov r14, [rax+0C8h] mov [rbp+var_F0], r14 loc_485FE: mov r13, [rbp+var_108] test r13, r13 jnz loc_4831D cmp rsi, 0FFFFFFFFFFFFFFFFh jz short loc_48625 mov rdi, rbx mov edx, 1 call delete_dynamic_record test al, al jnz short loc_48636 loc_48625: xor eax, eax jmp short loc_48638 loc_48629: mov rdi, rbx mov esi, 7Fh call _ma_set_fatal_error loc_48636: mov al, 1 loc_48638: mov rcx, fs:28h cmp rcx, [rbp+var_30] jnz short loc_4869C add rsp, 0F8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_48659: mov rdx, [rbx+110h] cmp rdx, r13 jnb loc_4830F add rax, [rcx+10h] mov rcx, [rcx+8] shl rcx, 2 lea rcx, [rcx+rcx*4] sub rax, rcx mov rcx, r13 sub rcx, rdx add rcx, 14h cmp rax, rcx jnb loc_4830F call _my_thread_var mov dword ptr [rax], 87h jmp short loc_48636 loc_4869C: call ___stack_chk_fail
bool update_dynamic_record(_QWORD *a1, long long a2, long long a3, unsigned long long a4) { unsigned long long v4; // r13 long long v5; // r14 _QWORD *v6; // rcx unsigned long long v7; // rax unsigned long long v8; // r12 long long v9; // rdx long long v10; // rcx long long v11; // r8 int v12; // r9d unsigned long long v13; // rcx long long v14; // rax unsigned long long v15; // r13 long long v16; // r13 long long v17; // rcx long long v18; // r13 long long v19; // rax long long v20; // rcx long long v21; // rcx unsigned long long v23; // rdx long long v24; // [rsp+10h] [rbp-110h] BYREF unsigned long long v25; // [rsp+18h] [rbp-108h] BYREF long long v26; // [rsp+20h] [rbp-100h] int v27; // [rsp+2Ch] [rbp-F4h] BYREF long long v28; // [rsp+30h] [rbp-F0h] BYREF unsigned long long v29; // [rsp+38h] [rbp-E8h] BYREF _BYTE v30[12]; // [rsp+40h] [rbp-E0h] BYREF long long v31; // [rsp+4Ch] [rbp-D4h] long long v32; // [rsp+68h] [rbp-B8h] long long v33; // [rsp+78h] [rbp-A8h] int v34; // [rsp+90h] [rbp-90h] char v35[40]; // [rsp+98h] [rbp-88h] BYREF long long v36; // [rsp+C0h] [rbp-60h] long long v37; // [rsp+D0h] [rbp-50h] long long v38; // [rsp+D8h] [rbp-48h] int v39; // [rsp+E8h] [rbp-38h] unsigned long long v40; // [rsp+F0h] [rbp-30h] v4 = a4; v5 = a2; v40 = __readfsqword(0x28u); v28 = a2; v24 = a3; v25 = a4; v39 = 0; v27 = 0; v6 = (_QWORD *)a1[4]; v7 = *(_QWORD *)(*a1 + 872LL) - v6[5]; if ( v7 < v4 ) { v23 = a1[34]; if ( v23 < v4 && v6[2] + v7 - 20LL * v6[1] < v4 - v23 + 20 ) { *(_DWORD *)my_thread_var(a1) = 135; return 1; } } a1[34] = v4; do { if ( v5 == *(_QWORD *)(*a1 + 200LL) ) { if ( (unsigned int)ma_find_writepos(a1, v4, &v28, &v29) ) return 1; LODWORD(v5) = v28; LODWORD(v8) = v29; goto LABEL_25; } v38 = -1LL; if ( (unsigned int)ma_get_block_info(a1, v35, *((unsigned int *)a1 + 288), v5) >= 4 ) { ma_set_fatal_error(a1, 127, v9, v10, v11, v12); return 1; } v8 = v36 + v37 - v5; v29 = v8; if ( v8 < v4 ) { v13 = v37 + v36; v14 = a1[4]; if ( v37 + v36 == *(_QWORD *)(v14 + 40) ) { v15 = v8 + (((_DWORD)v4 - ((v4 < 0xFFF0) - 1) - (_DWORD)v8 + 6) & 0xFFFFFFFC); if ( v15 >= 0xFFFFFC ) LODWORD(v15) = 16777212; v16 = (unsigned int)(v15 - v8); if ( v13 < *(_QWORD *)(*a1 + 872LL) - v16 ) { if ( a1[20] == v13 ) { a1[20] = v16 + v13; v13 = *(_QWORD *)(v14 + 40); } *(_QWORD *)(v14 + 40) = v16 + v13; *((_BYTE *)a1 + 1573) |= 9u; v8 += v16; LABEL_24: v29 = v8; goto LABEL_25; } } if ( v8 <= 0xFFFFE7 ) { v34 = 0; if ( (ma_get_block_info(a1, v30, *((unsigned int *)a1 + 288), v13) & 4) != 0 ) { if ( (unsigned __int8)unlink_deleted_block(a1, v30) ) return 1; v8 += v32; v29 = v8; if ( v8 >= 0xFFFFFD ) { v17 = v8 - 16777212; if ( v8 - 16777212 < 0x15 ) v17 = 20LL; v26 = v17; v18 = v33 + v32 - v17; if ( (unsigned __int8)update_backward_delete_link(a1, *(_QWORD *)(*a1 + 200LL), v18) ) return 1; v30[0] = 0; v30[2] = BYTE1(v26); v30[3] = v26; v30[1] = BYTE2(v26); v19 = *a1; v20 = *(_QWORD *)(*a1 + 200LL); v30[7] = BYTE4(v20); v30[6] = BYTE5(v20); v30[5] = BYTE6(v20); v30[4] = HIBYTE(v20); v30[10] = BYTE1(v20); v30[11] = v20; v30[9] = BYTE2(v20); v30[8] = BYTE3(v20); v31 = -1LL; if ( (*(long long ( **)(_QWORD *, _BYTE *, long long, long long, long long))(v19 + 1768))( a1, v30, 20LL, v18, 4LL) ) { return 1; } *(_QWORD *)(*a1 + 200LL) = v18; ++*(_QWORD *)(*a1 + 192LL); ++*(_QWORD *)(a1[4] + 8LL); v21 = v26; *(_QWORD *)(a1[4] + 16LL) += v26; v8 -= v21; goto LABEL_24; } } } } LABEL_25: if ( (unsigned int)ma_write_part_record( (_DWORD)a1, v5, v8, v38, (unsigned int)&v24, (unsigned int)&v25, (long long)&v27) ) return 1; v28 = v38; v5 = v38; if ( v38 == -1 ) { v5 = *(_QWORD *)(*a1 + 200LL); v28 = v5; } v4 = v25; } while ( v25 ); return v38 != -1 && (unsigned __int8)delete_dynamic_record(a1, v38, 1LL); }
update_dynamic_record: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xf8 MOV R13,RCX MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV qword ptr [RBP + -0xf0],RSI MOV qword ptr [RBP + -0x110],RDX MOV qword ptr [RBP + -0x108],RCX XOR EAX,EAX MOV dword ptr [RBP + -0x38],EAX MOV dword ptr [RBP + -0xf4],EAX MOV RAX,qword ptr [RDI] MOV RCX,qword ptr [RDI + 0x20] MOV RAX,qword ptr [RAX + 0x368] SUB RAX,qword ptr [RCX + 0x28] CMP RAX,R13 JC 0x00148659 LAB_0014830f: MOV qword ptr [RBX + 0x110],R13 LEA R15,[RBP + -0x108] LAB_0014831d: MOV RAX,qword ptr [RBX] CMP R14,qword ptr [RAX + 0xc8] JNZ 0x0014835d MOV RDI,RBX MOV RSI,R13 LEA RDX,[RBP + -0xf0] LEA RCX,[RBP + -0xe8] CALL 0x0014add9 TEST EAX,EAX JNZ 0x00148636 MOV R14,qword ptr [RBP + -0xf0] MOV R12,qword ptr [RBP + -0xe8] JMP 0x001485ae LAB_0014835d: MOV qword ptr [RBP + -0x48],-0x1 MOV EDX,dword ptr [RBX + 0x480] MOV RDI,RBX LEA RSI,[RBP + -0x88] MOV RCX,R14 CALL 0x00149240 CMP EAX,0x4 JNC 0x00148629 MOV RCX,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RBP + -0x50] MOV R12,RAX SUB R12,R14 ADD R12,RCX MOV qword ptr [RBP + -0xe8],R12 CMP R12,R13 JNC 0x001485ae ADD RCX,RAX MOV RAX,qword ptr [RBX + 0x20] CMP RCX,qword ptr [RAX + 0x28] LEA RSI,[RBP + -0xe0] JNZ 0x00148422 CMP R13,0xfff0 SBB R13D,-0x1 SUB R13D,R12D ADD R13D,0x6 AND R13D,0xfffffffc ADD R13,R12 MOV EDX,0xfffffc CMP R13,RDX CMOVNC R13,RDX SUB R13D,R12D MOV RDX,qword ptr [RBX] MOV RDX,qword ptr [RDX + 0x368] SUB RDX,R13 CMP RCX,RDX JNC 0x00148422 CMP qword ptr [RBX + 0xa0],RCX JNZ 0x0014840c ADD RCX,R13 MOV qword ptr [RBX + 0xa0],RCX MOV RCX,qword ptr [RAX + 0x28] LAB_0014840c: ADD RCX,R13 MOV qword ptr [RAX + 0x28],RCX OR byte ptr [RBX + 0x625],0x9 ADD R12,R13 JMP 0x001485a7 LAB_00148422: CMP R12,0xffffe7 JA 0x001485ae MOV dword ptr [RBP + -0x90],0x0 MOV EDX,dword ptr [RBX + 0x480] MOV RDI,RBX MOV R13,RSI CALL 0x00149240 TEST AL,0x4 JZ 0x001485ae MOV RDI,RBX MOV RSI,R13 CALL 0x0014964f TEST AL,AL JNZ 0x00148636 MOV R13,qword ptr [RBP + -0xb8] ADD R12,R13 MOV qword ptr [RBP + -0xe8],R12 CMP R12,0xfffffd JC 0x001485ae LEA RCX,[R12 + -0xfffffc] CMP RCX,0x15 MOV EAX,0x14 CMOVC RCX,RAX MOV qword ptr [RBP + -0x100],RCX SUB R13,RCX ADD R13,qword ptr [RBP + -0xa8] MOV RAX,qword ptr [RBX] MOV RSI,qword ptr [RAX + 0xc8] MOV RDI,RBX MOV RDX,R13 CALL 0x0014978f TEST AL,AL JNZ 0x00148636 MOV byte ptr [RBP + -0xe0],0x0 MOV RAX,qword ptr [RBP + -0x100] MOV byte ptr [RBP + -0xdd],AL MOV byte ptr [RBP + -0xde],AH SHR EAX,0x10 MOV byte ptr [RBP + -0xdf],AL MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RAX + 0xc8] MOV RDX,RCX SHR RDX,0x20 MOV byte ptr [RBP + -0xd9],DL MOV RDX,RCX SHR RDX,0x28 MOV byte ptr [RBP + -0xda],DL MOV RDX,RCX SHR RDX,0x30 MOV byte ptr [RBP + -0xdb],DL MOV RDX,RCX SHR RDX,0x38 MOV byte ptr [RBP + -0xdc],DL MOV byte ptr [RBP + -0xd5],CL MOV byte ptr [RBP + -0xd6],CH MOV EDX,ECX SHR EDX,0x10 MOV byte ptr [RBP + -0xd7],DL SHR ECX,0x18 MOV byte ptr [RBP + -0xd8],CL MOV qword ptr [RBP + -0xd4],-0x1 MOV EDX,0x14 MOV R8D,0x4 MOV RDI,RBX LEA RSI,[RBP + -0xe0] MOV RCX,R13 CALL qword ptr [RAX + 0x6e8] TEST RAX,RAX JNZ 0x00148636 MOV RAX,qword ptr [RBX] MOV qword ptr [RAX + 0xc8],R13 MOV RAX,qword ptr [RBX] INC qword ptr [RAX + 0xc0] MOV RAX,qword ptr [RBX + 0x20] INC qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBX + 0x20] MOV RCX,qword ptr [RBP + -0x100] ADD qword ptr [RAX + 0x10],RCX SUB R12,RCX LAB_001485a7: MOV qword ptr [RBP + -0xe8],R12 LAB_001485ae: MOV RCX,qword ptr [RBP + -0x48] LEA RAX,[RBP + -0xf4] MOV qword ptr [RSP],RAX MOV RDI,RBX MOV RSI,R14 MOV RDX,R12 LEA R8,[RBP + -0x110] MOV R9,R15 CALL 0x00148b3e TEST EAX,EAX JNZ 0x00148636 MOV RSI,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0xf0],RSI MOV R14,RSI CMP RSI,-0x1 JNZ 0x001485fe MOV RAX,qword ptr [RBX] MOV R14,qword ptr [RAX + 0xc8] MOV qword ptr [RBP + -0xf0],R14 LAB_001485fe: MOV R13,qword ptr [RBP + -0x108] TEST R13,R13 JNZ 0x0014831d CMP RSI,-0x1 JZ 0x00148625 MOV RDI,RBX MOV EDX,0x1 CALL 0x00148951 TEST AL,AL JNZ 0x00148636 LAB_00148625: XOR EAX,EAX JMP 0x00148638 LAB_00148629: MOV RDI,RBX MOV ESI,0x7f CALL 0x0013c86c LAB_00148636: MOV AL,0x1 LAB_00148638: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x30] JNZ 0x0014869c ADD RSP,0xf8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00148659: MOV RDX,qword ptr [RBX + 0x110] CMP RDX,R13 JNC 0x0014830f ADD RAX,qword ptr [RCX + 0x10] MOV RCX,qword ptr [RCX + 0x8] SHL RCX,0x2 LEA RCX,[RCX + RCX*0x4] SUB RAX,RCX MOV RCX,R13 SUB RCX,RDX ADD RCX,0x14 CMP RAX,RCX JNC 0x0014830f CALL 0x001ac2be MOV dword ptr [RAX],0x87 JMP 0x00148636 LAB_0014869c: CALL 0x0012a250
int8 update_dynamic_record(long *param_1,long param_2,int8 param_3,ulong param_4) { char cVar1; int iVar2; uint uVar3; ulong uVar4; long lVar5; int8 uVar6; int4 *puVar7; ulong uVar8; ulong uVar9; long lVar10; long lVar11; long in_FS_OFFSET; int8 local_118; ulong local_110; ulong local_108; int4 local_fc; long local_f8; ulong local_f0; int1 local_e8; int1 local_e7; int1 local_e6; int1 local_e5; int1 local_e4; int1 local_e3; int1 local_e2; int1 local_e1; int1 local_e0; int1 local_df; int1 local_de; int1 local_dd; int8 local_dc; long local_c0; long local_b0; int4 local_98; int1 local_90 [40]; long local_68; long local_58; long local_50; int4 local_40; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); local_40 = 0; local_fc = 0; lVar11 = param_1[4]; uVar4 = *(long *)(*param_1 + 0x368) - *(long *)(lVar11 + 0x28); local_f8 = param_2; local_118 = param_3; local_110 = param_4; if (((uVar4 < param_4) && ((ulong)param_1[0x22] < param_4)) && (uVar4 + *(long *)(lVar11 + 0x10) + *(long *)(lVar11 + 8) * -0x14 < (param_4 - param_1[0x22]) + 0x14)) { puVar7 = (int4 *)_my_thread_var(); *puVar7 = 0x87; } else { param_1[0x22] = param_4; do { lVar11 = local_f8; uVar4 = local_110; if (local_f8 == *(long *)(*param_1 + 200)) { iVar2 = _ma_find_writepos(param_1,local_110,&local_f8,&local_f0); uVar9 = local_f0; lVar11 = local_f8; if (iVar2 != 0) goto LAB_00148636; } else { local_50 = -1; uVar3 = _ma_get_block_info(param_1,local_90,(int)param_1[0x90],local_f8); if (3 < uVar3) { _ma_set_fatal_error(param_1,0x7f); goto LAB_00148636; } uVar9 = (local_58 - lVar11) + local_68; local_f0 = uVar9; if (uVar9 < uVar4) { uVar8 = local_68 + local_58; lVar10 = param_1[4]; if (uVar8 == *(ulong *)(lVar10 + 0x28)) { uVar4 = ((((int)uVar4 - (uint)(uVar4 < 0xfff0)) - (int)uVar9) + 7 & 0xfffffffc) + uVar9; if (0xfffffb < uVar4) { uVar4 = 0xfffffc; } uVar4 = (ulong)(uint)((int)uVar4 - (int)uVar9); if (uVar8 < *(long *)(*param_1 + 0x368) - uVar4) { if (param_1[0x14] == uVar8) { param_1[0x14] = uVar8 + uVar4; uVar8 = *(ulong *)(lVar10 + 0x28); } *(ulong *)(lVar10 + 0x28) = uVar8 + uVar4; *(byte *)((long)param_1 + 0x625) = *(byte *)((long)param_1 + 0x625) | 9; local_f0 = uVar9 + uVar4; uVar9 = local_f0; goto LAB_001485ae; } } if (uVar9 < 0xffffe8) { local_98 = 0; uVar4 = _ma_get_block_info(param_1,&local_e8,(int)param_1[0x90]); if ((uVar4 & 4) != 0) { cVar1 = unlink_deleted_block(param_1,&local_e8); if (cVar1 != '\0') goto LAB_00148636; uVar9 = uVar9 + local_c0; local_f0 = uVar9; if (0xfffffc < uVar9) { local_108 = uVar9 - 0xfffffc; if (local_108 < 0x15) { local_108 = 0x14; } lVar10 = (local_c0 - local_108) + local_b0; cVar1 = update_backward_delete_link(param_1,*(int8 *)(*param_1 + 200),lVar10); if (cVar1 != '\0') goto LAB_00148636; local_e8 = 0; local_e5 = (int1)local_108; local_e6 = (int1)(local_108 >> 8); local_e7 = (int1)(local_108 >> 0x10); uVar6 = *(int8 *)(*param_1 + 200); local_e1 = (int1)((ulong)uVar6 >> 0x20); local_e2 = (int1)((ulong)uVar6 >> 0x28); local_e3 = (int1)((ulong)uVar6 >> 0x30); local_e4 = (int1)((ulong)uVar6 >> 0x38); local_dd = (int1)uVar6; local_de = (int1)((ulong)uVar6 >> 8); local_df = (int1)((ulong)uVar6 >> 0x10); local_e0 = (int1)((ulong)uVar6 >> 0x18); local_dc = 0xffffffffffffffff; lVar5 = (**(code **)(*param_1 + 0x6e8))(param_1,&local_e8,0x14,lVar10,4); if (lVar5 != 0) goto LAB_00148636; *(long *)(*param_1 + 200) = lVar10; *(long *)(*param_1 + 0xc0) = *(long *)(*param_1 + 0xc0) + 1; *(long *)(param_1[4] + 8) = *(long *)(param_1[4] + 8) + 1; *(long *)(param_1[4] + 0x10) = *(long *)(param_1[4] + 0x10) + local_108; local_f0 = uVar9 - local_108; uVar9 = local_f0; } } } } } LAB_001485ae: iVar2 = _ma_write_part_record(param_1,lVar11,uVar9,local_50,&local_118,&local_110,&local_fc); if (iVar2 != 0) goto LAB_00148636; local_f8 = local_50; if (local_50 == -1) { local_f8 = *(long *)(*param_1 + 200); } } while (local_110 != 0); if ((local_50 == -1) || (cVar1 = delete_dynamic_record(param_1,local_50,1), cVar1 == '\0')) { uVar6 = 0; goto LAB_00148638; } } LAB_00148636: uVar6 = 1; LAB_00148638: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return uVar6; }
23,457
nglog::ColoredWriteToStderrOrStdout(_IO_FILE*, nglog::LogSeverity, char const*, unsigned long)
ng-log[P]ng-log/src/logging.cc
static void ColoredWriteToStderrOrStdout(FILE* output, LogSeverity severity, const char* message, size_t len) { bool is_stdout = (output == stdout); const GLogColor color = (LogDestination::terminal_supports_color() && ((!is_stdout && FLAGS_colorlogtostderr) || (is_stdout && FLAGS_colorlogtostdout))) ? SeverityToColor(severity) : COLOR_DEFAULT; // Avoid using cerr from this module since we may get called during // exit code, and cerr may be partially or fully destroyed by then. if (COLOR_DEFAULT == color) { fwrite(message, len, 1, output); return; } #ifdef NGLOG_OS_WINDOWS const HANDLE output_handle = GetStdHandle(is_stdout ? STD_OUTPUT_HANDLE : STD_ERROR_HANDLE); // Gets the current text color. CONSOLE_SCREEN_BUFFER_INFO buffer_info; GetConsoleScreenBufferInfo(output_handle, &buffer_info); const WORD old_color_attrs = buffer_info.wAttributes; // We need to flush the stream buffers into the console before each // SetConsoleTextAttribute call lest it affect the text that is already // printed but has not yet reached the console. fflush(output); SetConsoleTextAttribute(output_handle, GetColorAttribute(color) | FOREGROUND_INTENSITY); fwrite(message, len, 1, output); fflush(output); // Restores the text color. SetConsoleTextAttribute(output_handle, old_color_attrs); #else fprintf(output, "\033[0;3%sm", GetAnsiColorCode(color)); fwrite(message, len, 1, output); fprintf(output, "\033[m"); // Resets the terminal to default. #endif // NGLOG_OS_WINDOWS }
O1
cpp
nglog::ColoredWriteToStderrOrStdout(_IO_FILE*, nglog::LogSeverity, char const*, unsigned long): pushq %r15 pushq %r14 pushq %rbx movq %rcx, %r14 movq %rdx, %r15 movq %rdi, %rbx xorl %eax, %eax cmpb $0x1, 0x205e8(%rip) # 0x31c80 jne 0x116d5 movq 0x1f85f(%rip), %rcx # 0x30f00 cmpq %rbx, (%rcx) je 0x116b4 leaq 0x203d1(%rip), %rcx # 0x31a7e cmpb $0x0, (%rcx) jne 0x116c0 jmp 0x116d5 leaq 0x203c5(%rip), %rcx # 0x31a80 cmpb $0x1, (%rcx) jne 0x116d5 cmpl $0x4, %esi jae 0x1174f movl %esi, %eax leaq 0x1203e(%rip), %rcx # 0x23710 movl (%rcx,%rax,4), %eax movl %eax, %eax leaq 0x12042(%rip), %rcx # 0x23720 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movl $0x1, %edx movq %r15, %rdi movq %r14, %rsi jmp 0x11742 leaq 0x123ea(%rip), %rdx # 0x23ae5 jmp 0x1170d leaq 0x12e81(%rip), %rdx # 0x24585 jmp 0x1170d leaq 0x123c8(%rip), %rdx # 0x23ad5 leaq 0x12706(%rip), %rsi # 0x23e1a movq %rbx, %rdi xorl %eax, %eax callq 0x7800 movl $0x1, %edx movq %r15, %rdi movq %r14, %rsi movq %rbx, %rcx callq 0x7a50 leaq 0x126eb(%rip), %rdi # 0x23e23 movl $0x3, %esi movl $0x1, %edx movq %rbx, %rcx popq %rbx popq %r14 popq %r15 jmp 0x7a50 leaq 0x126d1(%rip), %rdi # 0x23e27 leaq 0x12195(%rip), %rsi # 0x238f2 leaq 0x126c9(%rip), %rcx # 0x23e2d movl $0xeb, %edx callq 0x7330
_ZN5nglogL28ColoredWriteToStderrOrStdoutEP8_IO_FILENS_11LogSeverityEPKcm: push r15 push r14 push rbx mov r14, rcx mov r15, rdx mov rbx, rdi xor eax, eax cmp cs:_ZN5nglog14LogDestination24terminal_supports_color_E, 1; nglog::LogDestination::terminal_supports_color_ jnz short loc_116D5 mov rcx, cs:stdout_ptr cmp [rcx], rbx jz short loc_116B4 lea rcx, _ZN3fLB22FLAGS_colorlogtostderrE; fLB::FLAGS_colorlogtostderr cmp byte ptr [rcx], 0 jnz short loc_116C0 jmp short loc_116D5 loc_116B4: lea rcx, _ZN3fLB22FLAGS_colorlogtostdoutE; fLB::FLAGS_colorlogtostdout cmp byte ptr [rcx], 1 jnz short loc_116D5 loc_116C0: cmp esi, 4 jnb loc_1174F mov eax, esi lea rcx, unk_23710 mov eax, [rcx+rax*4] loc_116D5: mov eax, eax lea rcx, jpt_116E5 movsxd rax, ds:(jpt_116E5 - 23720h)[rcx+rax*4]; switch 4 cases add rax, rcx jmp rax; switch jump loc_116E7: mov edx, 1; jumptable 00000000000116E5 case 0 mov rdi, r15 mov rsi, r14 jmp short loc_11742 loc_116F4: lea rdx, aProcSelfFd2+0Eh; jumptable 00000000000116E5 case 2 jmp short loc_1170D loc_116FD: lea rdx, aDc3+2; jumptable 00000000000116E5 case 3 jmp short loc_1170D loc_11706: lea rdx, aProcSelfFd1+0Eh; jumptable 00000000000116E5 case 1 loc_1170D: lea rsi, a03Sm; "\x1B[0;3%sm" mov rdi, rbx xor eax, eax call _fprintf mov edx, 1 mov rdi, r15 mov rsi, r14 mov rcx, rbx call _fwrite lea rdi, aM; "\x1B[m" mov esi, 3 mov edx, 1 loc_11742: mov rcx, rbx pop rbx pop r14 pop r15 jmp _fwrite loc_1174F: lea rdi, aFalse; "false" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rcx, aGlogcolorNglog; "GLogColor nglog::SeverityToColor(LogSev"... mov edx, 0EBh call ___assert_fail
long long nglog::ColoredWriteToStderrOrStdout(long long a1, unsigned int a2, const char *a3, long long a4) { int v7; // eax const char *v8; // rdi long long v9; // rsi const char *v10; // rdx v7 = 0; if ( nglog::LogDestination::terminal_supports_color_ != 1 ) goto LABEL_8; if ( stdout == a1 ) { if ( fLB::FLAGS_colorlogtostdout != 1 ) goto LABEL_8; } else if ( !fLB::FLAGS_colorlogtostderr ) { goto LABEL_8; } if ( a2 >= 4 ) __assert_fail( "false", "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc", 235LL, "GLogColor nglog::SeverityToColor(LogSeverity)"); v7 = dword_23710[a2]; LABEL_8: switch ( v7 ) { case 0: v8 = a3; v9 = a4; return fwrite(v8, v9, 1LL, a1); case 1: v10 = "1"; goto LABEL_13; case 2: v10 = "2"; goto LABEL_13; case 3: v10 = "3"; LABEL_13: fprintf(a1, "\x1B[0;3%sm", v10); fwrite(a3, a4, 1LL, a1); v8 = "\x1B[m"; v9 = 3LL; return fwrite(v8, v9, 1LL, a1); } }
ColoredWriteToStderrOrStdout: PUSH R15 PUSH R14 PUSH RBX MOV R14,RCX MOV R15,RDX MOV RBX,RDI XOR EAX,EAX CMP byte ptr [0x00131c80],0x1 JNZ 0x001116d5 MOV RCX,qword ptr [0x00130f00] CMP qword ptr [RCX],RBX JZ 0x001116b4 LEA RCX,[0x131a7e] CMP byte ptr [RCX],0x0 JNZ 0x001116c0 JMP 0x001116d5 LAB_001116b4: LEA RCX,[0x131a80] CMP byte ptr [RCX],0x1 JNZ 0x001116d5 LAB_001116c0: CMP ESI,0x4 JNC 0x0011174f MOV EAX,ESI LEA RCX,[0x123710] MOV EAX,dword ptr [RCX + RAX*0x4] LAB_001116d5: MOV EAX,EAX LEA RCX,[0x123720] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX JMP RAX LAB_0011174f: LEA RDI,[0x123e27] LEA RSI,[0x1238f2] LEA RCX,[0x123e2d] MOV EDX,0xeb CALL 0x00107330
/* nglog::ColoredWriteToStderrOrStdout(_IO_FILE*, nglog::LogSeverity, char const*, unsigned long) */ void nglog::ColoredWriteToStderrOrStdout(long param_1,uint param_2) { uint uVar1; uVar1 = 0; if (LogDestination::terminal_supports_color_ == '\x01') { uVar1 = 0; if (*(long *)PTR_stdout_00130f00 == param_1) { if (fLB::FLAGS_colorlogtostdout != '\x01') goto LAB_001116d5; } else if (fLB::FLAGS_colorlogtostderr == '\0') goto LAB_001116d5; if (3 < param_2) { /* WARNING: Subroutine does not return */ __assert_fail("false","/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc" ,0xeb,"GLogColor nglog::SeverityToColor(LogSeverity)"); } uVar1 = *(uint *)(&DAT_00123710 + (ulong)param_2 * 4); } LAB_001116d5: /* WARNING: Could not recover jumptable at 0x001116e5. Too many branches */ /* WARNING: Treating indirect jump as call */ (*(code *)((long)&DAT_00123720 + (long)(int)(&DAT_00123720)[uVar1]))(); return; }
23,458
nglog::ColoredWriteToStderrOrStdout(_IO_FILE*, nglog::LogSeverity, char const*, unsigned long)
ng-log[P]ng-log/src/logging.cc
static void ColoredWriteToStderrOrStdout(FILE* output, LogSeverity severity, const char* message, size_t len) { bool is_stdout = (output == stdout); const GLogColor color = (LogDestination::terminal_supports_color() && ((!is_stdout && FLAGS_colorlogtostderr) || (is_stdout && FLAGS_colorlogtostdout))) ? SeverityToColor(severity) : COLOR_DEFAULT; // Avoid using cerr from this module since we may get called during // exit code, and cerr may be partially or fully destroyed by then. if (COLOR_DEFAULT == color) { fwrite(message, len, 1, output); return; } #ifdef NGLOG_OS_WINDOWS const HANDLE output_handle = GetStdHandle(is_stdout ? STD_OUTPUT_HANDLE : STD_ERROR_HANDLE); // Gets the current text color. CONSOLE_SCREEN_BUFFER_INFO buffer_info; GetConsoleScreenBufferInfo(output_handle, &buffer_info); const WORD old_color_attrs = buffer_info.wAttributes; // We need to flush the stream buffers into the console before each // SetConsoleTextAttribute call lest it affect the text that is already // printed but has not yet reached the console. fflush(output); SetConsoleTextAttribute(output_handle, GetColorAttribute(color) | FOREGROUND_INTENSITY); fwrite(message, len, 1, output); fflush(output); // Restores the text color. SetConsoleTextAttribute(output_handle, old_color_attrs); #else fprintf(output, "\033[0;3%sm", GetAnsiColorCode(color)); fwrite(message, len, 1, output); fprintf(output, "\033[m"); // Resets the terminal to default. #endif // NGLOG_OS_WINDOWS }
O3
cpp
nglog::ColoredWriteToStderrOrStdout(_IO_FILE*, nglog::LogSeverity, char const*, unsigned long): pushq %r15 pushq %r14 pushq %rbx movq %rcx, %r14 movq %rdx, %r15 movq %rdi, %rbx cmpb $0x1, 0x208e3(%rip) # 0x31c80 jne 0x113df movq 0x1fb5a(%rip), %rax # 0x30f00 cmpq %rbx, (%rax) je 0x113b9 leaq 0x206cc(%rip), %rax # 0x31a7e cmpb $0x0, (%rax) jne 0x113c5 jmp 0x113df leaq 0x206c0(%rip), %rax # 0x31a80 cmpb $0x1, (%rax) jne 0x113df leal -0x2(%rsi), %eax cmpl $0x2, %eax jb 0x113f7 testl %esi, %esi je 0x113df cmpl $0x1, %esi jne 0x11435 leaq 0x1318d(%rip), %rdx # 0x2456a jmp 0x113fe movl $0x1, %edx movq %r15, %rdi movq %r14, %rsi movq %rbx, %rcx popq %rbx popq %r14 popq %r15 jmp 0x7a50 leaq 0x126bf(%rip), %rdx # 0x23abd leaq 0x129fa(%rip), %rsi # 0x23dff movq %rbx, %rdi xorl %eax, %eax callq 0x7800 movl $0x1, %edx movq %r15, %rdi movq %r14, %rsi movq %rbx, %rcx callq 0x7a50 leaq 0x129df(%rip), %rdi # 0x23e08 movl $0x3, %esi movl $0x1, %edx jmp 0x113ea leaq 0x129d0(%rip), %rdi # 0x23e0c leaq 0x12497(%rip), %rsi # 0x238da leaq 0x129c8(%rip), %rcx # 0x23e12 movl $0xeb, %edx callq 0x7330
_ZN5nglogL28ColoredWriteToStderrOrStdoutEP8_IO_FILENS_11LogSeverityEPKcm: push r15 push r14 push rbx mov r14, rcx mov r15, rdx mov rbx, rdi cmp cs:_ZN5nglog14LogDestination24terminal_supports_color_E, 1; nglog::LogDestination::terminal_supports_color_ jnz short loc_113DF mov rax, cs:stdout_ptr cmp [rax], rbx jz short loc_113B9 lea rax, _ZN3fLB22FLAGS_colorlogtostderrE; fLB::FLAGS_colorlogtostderr cmp byte ptr [rax], 0 jnz short loc_113C5 jmp short loc_113DF loc_113B9: lea rax, _ZN3fLB22FLAGS_colorlogtostdoutE; fLB::FLAGS_colorlogtostdout cmp byte ptr [rax], 1 jnz short loc_113DF loc_113C5: lea eax, [rsi-2] cmp eax, 2 jb short loc_113F7 test esi, esi jz short loc_113DF cmp esi, 1 jnz short loc_11435 lea rdx, aDc3+2; "3" jmp short loc_113FE loc_113DF: mov edx, 1 mov rdi, r15 mov rsi, r14 loc_113EA: mov rcx, rbx pop rbx pop r14 pop r15 jmp _fwrite loc_113F7: lea rdx, aProcSelfFd1+0Eh; "1" loc_113FE: lea rsi, a03Sm; "\x1B[0;3%sm" mov rdi, rbx xor eax, eax call _fprintf mov edx, 1 mov rdi, r15 mov rsi, r14 mov rcx, rbx call _fwrite lea rdi, aM; "\x1B[m" mov esi, 3 mov edx, 1 jmp short loc_113EA loc_11435: lea rdi, aFalse; "false" lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rcx, aGlogcolorNglog; "GLogColor nglog::SeverityToColor(LogSev"... mov edx, 0EBh call ___assert_fail
long long nglog::ColoredWriteToStderrOrStdout(long long a1, int a2, const char *a3, long long a4) { const char *v7; // rdx const char *v8; // rdi long long v9; // rsi if ( nglog::LogDestination::terminal_supports_color_ != 1 ) goto LABEL_10; if ( stdout == a1 ) { if ( fLB::FLAGS_colorlogtostdout != 1 ) goto LABEL_10; } else if ( !fLB::FLAGS_colorlogtostderr ) { goto LABEL_10; } if ( (unsigned int)(a2 - 2) < 2 ) { v7 = "1"; LABEL_13: fprintf(a1, "\x1B[0;3%sm", v7); fwrite(a3, a4, 1LL, a1); v8 = "\x1B[m"; v9 = 3LL; return fwrite(v8, v9, 1LL, a1); } if ( a2 ) { if ( a2 != 1 ) __assert_fail( "false", "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc", 235LL, "GLogColor nglog::SeverityToColor(LogSeverity)"); v7 = "3"; goto LABEL_13; } LABEL_10: v8 = a3; v9 = a4; return fwrite(v8, v9, 1LL, a1); }
ColoredWriteToStderrOrStdout: PUSH R15 PUSH R14 PUSH RBX MOV R14,RCX MOV R15,RDX MOV RBX,RDI CMP byte ptr [0x00131c80],0x1 JNZ 0x001113df MOV RAX,qword ptr [0x00130f00] CMP qword ptr [RAX],RBX JZ 0x001113b9 LEA RAX,[0x131a7e] CMP byte ptr [RAX],0x0 JNZ 0x001113c5 JMP 0x001113df LAB_001113b9: LEA RAX,[0x131a80] CMP byte ptr [RAX],0x1 JNZ 0x001113df LAB_001113c5: LEA EAX,[RSI + -0x2] CMP EAX,0x2 JC 0x001113f7 TEST ESI,ESI JZ 0x001113df CMP ESI,0x1 JNZ 0x00111435 LEA RDX,[0x12456a] JMP 0x001113fe LAB_001113df: MOV EDX,0x1 MOV RDI,R15 MOV RSI,R14 LAB_001113ea: MOV RCX,RBX POP RBX POP R14 POP R15 JMP 0x00107a50 LAB_001113f7: LEA RDX,[0x123abd] LAB_001113fe: LEA RSI,[0x123dff] MOV RDI,RBX XOR EAX,EAX CALL 0x00107800 MOV EDX,0x1 MOV RDI,R15 MOV RSI,R14 MOV RCX,RBX CALL 0x00107a50 LEA RDI,[0x123e08] MOV ESI,0x3 MOV EDX,0x1 JMP 0x001113ea LAB_00111435: LEA RDI,[0x123e0c] LEA RSI,[0x1238da] LEA RCX,[0x123e12] MOV EDX,0xeb CALL 0x00107330
/* nglog::ColoredWriteToStderrOrStdout(_IO_FILE*, nglog::LogSeverity, char const*, unsigned long) */ void nglog::ColoredWriteToStderrOrStdout (FILE *param_1,int param_2,int *param_3,size_t param_4) { char *pcVar1; if (LogDestination::terminal_supports_color_ == '\x01') { if (*(FILE **)PTR_stdout_00130f00 == param_1) { if (fLB::FLAGS_colorlogtostdout != '\x01') goto LAB_001113ea; } else if (fLB::FLAGS_colorlogtostderr == '\0') goto LAB_001113ea; if (param_2 - 2U < 2) { pcVar1 = "1"; } else { if (param_2 == 0) goto LAB_001113ea; if (param_2 != 1) { /* WARNING: Subroutine does not return */ __assert_fail("false", "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",0xeb, "GLogColor nglog::SeverityToColor(LogSeverity)"); } pcVar1 = "3"; } fprintf(param_1,"\x1b[0;3%sm",pcVar1); fwrite(param_3,param_4,1,param_1); param_3 = &DAT_00123e08; param_4 = 3; } LAB_001113ea: fwrite(param_3,param_4,1,param_1); return; }
23,459
reset_simple_key_cache_counters
eloqsql/mysys/mf_keycache.c
static int reset_simple_key_cache_counters(const char *name __attribute__((unused)), SIMPLE_KEY_CACHE_CB *keycache) { DBUG_ENTER("reset_simple_key_cache_counters"); if (!keycache->key_cache_inited) { DBUG_PRINT("info", ("Key cache %s not initialized.", name)); DBUG_RETURN(0); } DBUG_PRINT("info", ("Resetting counters for key cache %s.", name)); keycache->global_blocks_changed= 0; /* Key_blocks_not_flushed */ keycache->global_cache_r_requests= 0; /* Key_read_requests */ keycache->global_cache_read= 0; /* Key_reads */ keycache->global_cache_w_requests= 0; /* Key_write_requests */ keycache->global_cache_write= 0; /* Key_writes */ DBUG_RETURN(0); }
O3
c
reset_simple_key_cache_counters: pushq %rbp movq %rsp, %rbp cmpb $0x0, (%rsi) je 0x996b6 xorps %xmm0, %xmm0 movups %xmm0, 0x148(%rsi) movups %xmm0, 0x138(%rsi) movq $0x0, 0x158(%rsi) xorl %eax, %eax popq %rbp retq
reset_simple_key_cache_counters: push rbp mov rbp, rsp cmp byte ptr [rsi], 0 jz short loc_996B6 xorps xmm0, xmm0 movups xmmword ptr [rsi+148h], xmm0 movups xmmword ptr [rsi+138h], xmm0 mov qword ptr [rsi+158h], 0 loc_996B6: xor eax, eax pop rbp retn
long long reset_simple_key_cache_counters(long long a1, long long a2) { if ( *(_BYTE *)a2 ) { *(_OWORD *)(a2 + 328) = 0LL; *(_OWORD *)(a2 + 312) = 0LL; *(_QWORD *)(a2 + 344) = 0LL; } return 0LL; }
reset_simple_key_cache_counters: PUSH RBP MOV RBP,RSP CMP byte ptr [RSI],0x0 JZ 0x001996b6 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSI + 0x148],XMM0 MOVUPS xmmword ptr [RSI + 0x138],XMM0 MOV qword ptr [RSI + 0x158],0x0 LAB_001996b6: XOR EAX,EAX POP RBP RET
int8 reset_simple_key_cache_counters(int8 param_1,char *param_2) { if (*param_2 != '\0') { param_2[0x148] = '\0'; param_2[0x149] = '\0'; param_2[0x14a] = '\0'; param_2[0x14b] = '\0'; param_2[0x14c] = '\0'; param_2[0x14d] = '\0'; param_2[0x14e] = '\0'; param_2[0x14f] = '\0'; param_2[0x150] = '\0'; param_2[0x151] = '\0'; param_2[0x152] = '\0'; param_2[0x153] = '\0'; param_2[0x154] = '\0'; param_2[0x155] = '\0'; param_2[0x156] = '\0'; param_2[0x157] = '\0'; param_2[0x138] = '\0'; param_2[0x139] = '\0'; param_2[0x13a] = '\0'; param_2[0x13b] = '\0'; param_2[0x13c] = '\0'; param_2[0x13d] = '\0'; param_2[0x13e] = '\0'; param_2[0x13f] = '\0'; param_2[0x140] = '\0'; param_2[0x141] = '\0'; param_2[0x142] = '\0'; param_2[0x143] = '\0'; param_2[0x144] = '\0'; param_2[0x145] = '\0'; param_2[0x146] = '\0'; param_2[0x147] = '\0'; param_2[0x158] = '\0'; param_2[0x159] = '\0'; param_2[0x15a] = '\0'; param_2[0x15b] = '\0'; param_2[0x15c] = '\0'; param_2[0x15d] = '\0'; param_2[0x15e] = '\0'; param_2[0x15f] = '\0'; } return 0; }
23,460
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::skip_bom()
hkr04[P]cpp-mcp/common/json.hpp
bool skip_bom() { if (get() == 0xEF) { // check if we completely parse the BOM return get() == 0xBB && get() == 0xBF; } // the first character is not the beginning of the BOM; unget it to // process is later unget(); return true; }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::skip_bom(): pushq %rbx movq %rdi, %rbx callq 0x2fe20 cmpl $0xef, %eax jne 0x2f68f movq %rbx, %rdi callq 0x2fe20 cmpl $0xbb, %eax jne 0x2f69b movq %rbx, %rdi callq 0x2fe20 cmpl $0xbf, %eax sete %al jmp 0x2f69d movq %rbx, %rdi callq 0x2fe96 movb $0x1, %al jmp 0x2f69d xorl %eax, %eax popq %rbx retq nop
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE8skip_bomEv: push rbx mov rbx, rdi call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) cmp eax, 0EFh jnz short loc_2F68F mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) cmp eax, 0BBh jnz short loc_2F69B mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) cmp eax, 0BFh setz al jmp short loc_2F69D loc_2F68F: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(void) mov al, 1 jmp short loc_2F69D loc_2F69B: xor eax, eax loc_2F69D: pop rbx retn
bool nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::skip_bom( long long a1) { if ( (unsigned int)((long long (*)(void))nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get)() == 239 ) return (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) == 187 && (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) == 191; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(a1); return 1; }
skip_bom: PUSH RBX MOV RBX,RDI CALL 0x0012fe20 CMP EAX,0xef JNZ 0x0012f68f MOV RDI,RBX CALL 0x0012fe20 CMP EAX,0xbb JNZ 0x0012f69b MOV RDI,RBX CALL 0x0012fe20 CMP EAX,0xbf SETZ AL JMP 0x0012f69d LAB_0012f68f: MOV RDI,RBX CALL 0x0012fe96 MOV AL,0x1 JMP 0x0012f69d LAB_0012f69b: XOR EAX,EAX LAB_0012f69d: POP RBX RET
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::skip_bom() */ bool __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::skip_bom(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *this) { int iVar1; bool bVar2; iVar1 = get(this); if (iVar1 == 0xef) { iVar1 = get(this); if (iVar1 == 0xbb) { iVar1 = get(this); bVar2 = iVar1 == 0xbf; } else { bVar2 = false; } } else { unget(this); bVar2 = true; } return bVar2; }
23,461
flux::parser::Parser::postfix()
kvthweatt[P]FluxLang/src/parser/parser.cpp
std::unique_ptr<Expr> Parser::postfix() { auto expr = call(); if (match({ lexer::TokenType::PLUS_PLUS, lexer::TokenType::MINUS_MINUS, })) { auto op = previous_; return std::make_unique<UnaryExpr>( op, std::move(expr), false, // postfix makeRange(op, previous_) ); } return expr; }
O2
cpp
flux::parser::Parser::postfix(): pushq %r14 pushq %rbx subq $0xa8, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x10(%rsp), %rdi callq 0x1daf8 movabsq $0x3800000037, %rax # imm = 0x3800000037 leaq 0x20(%rsp), %rsi movq %rax, (%rsi) pushq $0x2 popq %rdx movq %r14, %rdi callq 0x12edc testb %al, %al je 0x1dab6 leaq 0x68(%r14), %rsi leaq 0x20(%rsp), %rdi callq 0xa5ae leaq 0xf(%rsp), %rcx movb $0x0, (%rcx) leaq 0x20(%rsp), %rsi movups 0x18(%rsi), %xmm0 leaq 0x80(%rsp), %r8 movaps %xmm0, (%r8) movups 0x90(%r14), %xmm0 movaps %xmm0, 0x10(%r8) leaq 0x18(%rsp), %rdi leaq 0x10(%rsp), %rdx callq 0x20d57 movq 0x18(%rsp), %rax movq %rax, (%rbx) leaq 0x60(%rsp), %rdi callq 0x60e0 movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x1dabe movq (%rdi), %rax callq *0x8(%rax) jmp 0x1dabe movq 0x10(%rsp), %rax movq %rax, (%rbx) movq %rbx, %rax addq $0xa8, %rsp popq %rbx popq %r14 retq movq %rax, %rbx leaq 0x60(%rsp), %rdi callq 0x60e0 jmp 0x1dae0 jmp 0x1dadd movq %rax, %rbx movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x1daf0 movq (%rdi), %rax callq *0x8(%rax) movq %rbx, %rdi callq 0x63e0
_ZN4flux6parser6Parser7postfixEv: push r14 push rbx sub rsp, 0A8h mov r14, rsi mov rbx, rdi lea rdi, [rsp+0B8h+var_A8]; this call _ZN4flux6parser6Parser4callEv; flux::parser::Parser::call(void) mov rax, 3800000037h lea rsi, [rsp+0B8h+var_98] mov [rsi], rax push 2 pop rdx mov rdi, r14 call _ZN4flux6parser6Parser5matchESt16initializer_listINS_5lexer9TokenTypeEE; flux::parser::Parser::match(std::initializer_list<flux::lexer::TokenType>) test al, al jz short loc_1DAB6 lea rsi, [r14+68h]; flux::lexer::Token * lea rdi, [rsp+0B8h+var_98]; this call _ZN4flux5lexer5TokenC2ERKS1_; flux::lexer::Token::Token(flux::lexer::Token const&) lea rcx, [rsp+0B8h+var_A9] mov byte ptr [rcx], 0 lea rsi, [rsp+0B8h+var_98] movups xmm0, xmmword ptr [rsi+18h] lea r8, [rsp+0B8h+var_38] movaps xmmword ptr [r8], xmm0 movups xmm0, xmmword ptr [r14+90h] movaps xmmword ptr [r8+10h], xmm0 lea rdi, [rsp+0B8h+var_A0] lea rdx, [rsp+0B8h+var_A8] call _ZSt11make_uniqueIN4flux6parser9UnaryExprEJRNS0_5lexer5TokenESt10unique_ptrINS1_4ExprESt14default_deleteIS7_EEbNS0_6common11SourceRangeEEENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<flux::parser::UnaryExpr,flux::lexer::Token &,std::unique_ptr<flux::parser::Expr>,bool,flux::common::SourceRange>(flux::lexer::Token &,std::unique_ptr<flux::parser::Expr>,bool,flux::common::SourceRange &&) mov rax, [rsp+0B8h+var_A0] mov [rbx], rax lea rdi, [rsp+0B8h+var_58] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, [rsp+0B8h+var_A8] test rdi, rdi jz short loc_1DABE mov rax, [rdi] call qword ptr [rax+8] jmp short loc_1DABE loc_1DAB6: mov rax, [rsp+0B8h+var_A8] mov [rbx], rax loc_1DABE: mov rax, rbx add rsp, 0A8h pop rbx pop r14 retn mov rbx, rax lea rdi, [rsp+arg_58] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_1DAE0 jmp short $+2 loc_1DADD: mov rbx, rax loc_1DAE0: mov rdi, [rsp+arg_8] test rdi, rdi jz short loc_1DAF0 mov rax, [rdi] call qword ptr [rax+8] loc_1DAF0: mov rdi, rbx call __Unwind_Resume
flux::parser::Parser * flux::parser::Parser::postfix(flux::parser::Parser *this, long long a2) { char v3; // [rsp+Fh] [rbp-A9h] BYREF long long v4; // [rsp+10h] [rbp-A8h] BYREF long long v5; // [rsp+18h] [rbp-A0h] BYREF _QWORD v6[3]; // [rsp+20h] [rbp-98h] BYREF __int128 v7; // [rsp+38h] [rbp-80h] _BYTE v8[32]; // [rsp+60h] [rbp-58h] BYREF __int128 v9; // [rsp+80h] [rbp-38h] __int128 v10; // [rsp+90h] [rbp-28h] flux::parser::Parser::call((flux::parser::Parser *)&v4); v6[0] = 0x3800000037LL; if ( flux::parser::Parser::match(a2, (long long)v6, 2LL) ) { flux::lexer::Token::Token((flux::lexer::Token *)v6, (const flux::lexer::Token *)(a2 + 104)); v3 = 0; v9 = v7; v10 = *(_OWORD *)(a2 + 144); std::make_unique<flux::parser::UnaryExpr,flux::lexer::Token &,std::unique_ptr<flux::parser::Expr>,bool,flux::common::SourceRange>( &v5, v6, &v4, &v3); *(_QWORD *)this = v5; std::string::~string(v8); if ( v4 ) (*(void ( **)(long long))(*(_QWORD *)v4 + 8LL))(v4); } else { *(_QWORD *)this = v4; } return this; }
postfix: PUSH R14 PUSH RBX SUB RSP,0xa8 MOV R14,RSI MOV RBX,RDI LEA RDI,[RSP + 0x10] CALL 0x0011daf8 MOV RAX,0x3800000037 LEA RSI,[RSP + 0x20] MOV qword ptr [RSI],RAX LAB_0011da3c: PUSH 0x2 POP RDX MOV RDI,R14 CALL 0x00112edc TEST AL,AL JZ 0x0011dab6 LEA RSI,[R14 + 0x68] LAB_0011da4f: LEA RDI,[RSP + 0x20] CALL 0x0010a5ae LEA RCX,[RSP + 0xf] MOV byte ptr [RCX],0x0 LEA RSI,[RSP + 0x20] MOVUPS XMM0,xmmword ptr [RSI + 0x18] LEA R8,[RSP + 0x80] MOVAPS xmmword ptr [R8],XMM0 MOVUPS XMM0,xmmword ptr [R14 + 0x90] MOVAPS xmmword ptr [R8 + 0x10],XMM0 LAB_0011da83: LEA RDI,[RSP + 0x18] LEA RDX,[RSP + 0x10] CALL 0x00120d57 LAB_0011da92: MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RBX],RAX LEA RDI,[RSP + 0x60] CALL 0x001060e0 MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x0011dabe MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] JMP 0x0011dabe LAB_0011dab6: MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RBX],RAX LAB_0011dabe: MOV RAX,RBX ADD RSP,0xa8 POP RBX POP R14 RET
/* flux::parser::Parser::postfix() */ void flux::parser::Parser::postfix(void) { char cVar1; long in_RSI; int8 *in_RDI; SourceRange local_a9; long *local_a8; int8 local_a0; int8 local_98 [3]; int8 local_80; int8 uStack_78; string local_58 [32]; int8 local_38; int8 uStack_30; int8 local_28; int8 uStack_20; call(); local_98[0] = 0x3800000037; /* try { // try from 0011da3c to 0011da46 has its CatchHandler @ 0011dadd */ cVar1 = match(); if (cVar1 == '\0') { *in_RDI = local_a8; } else { /* try { // try from 0011da4f to 0011da58 has its CatchHandler @ 0011dadb */ lexer::Token::Token((Token *)local_98,(Token *)(in_RSI + 0x68)); local_a9 = (SourceRange)0x0; local_38 = local_80; uStack_30 = uStack_78; local_28 = *(int8 *)(in_RSI + 0x90); uStack_20 = *(int8 *)(in_RSI + 0x98); /* try { // try from 0011da83 to 0011da91 has its CatchHandler @ 0011dacc */ std:: make_unique<flux::parser::UnaryExpr,flux::lexer::Token&,std::unique_ptr<flux::parser::Expr,std::default_delete<flux::parser::Expr>>,bool,flux::common::SourceRange> ((Token *)&local_a0,(unique_ptr *)local_98,(bool *)&local_a8,&local_a9); *in_RDI = local_a0; std::__cxx11::string::~string(local_58); if (local_a8 != (long *)0x0) { (**(code **)(*local_a8 + 8))(); } } return; }
23,462
version_command::version_command()
msxemulator/build_O3/_deps/picotool-src/main.cpp
version_command() : cmd("version") {}
O3
cpp
version_command::version_command(): pushq %r15 pushq %r14 pushq %rbx subq $0x20, %rsp movq %rdi, %rbx leaq 0x10(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x7e507(%rip), %rsi # 0xb6c01 leaq 0x7e507(%rip), %rdx # 0xb6c08 movq %rsp, %r14 movq %r14, %rdi callq 0x5c00c leaq 0x18(%rbx), %rax movq %rax, 0x8(%rbx) movq (%r14), %rcx cmpq %r15, %rcx je 0x3872b movq %rcx, 0x8(%rbx) movq 0x10(%rsp), %rax movq %rax, 0x18(%rbx) jmp 0x38732 movups (%r15), %xmm0 movups %xmm0, (%rax) movq 0x8(%rsp), %rax movq %rax, 0x10(%rbx) leaq 0xa7e4e(%rip), %rax # 0xe0590 movq %rax, (%rbx) addq $0x20, %rsp popq %rbx popq %r14 popq %r15 retq nop
_ZN15version_commandC2Ev: push r15 push r14 push rbx sub rsp, 20h mov rbx, rdi lea r15, [rsp+38h+var_28] mov [r15-10h], r15 lea rsi, aUnrecognizedEl+11h; "version" lea rdx, aUnrecognizedEl+18h; "" mov r14, rsp mov rdi, r14 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 rax, [rbx+18h] mov [rbx+8], rax mov rcx, [r14] cmp rcx, r15 jz short loc_3872B mov [rbx+8], rcx mov rax, [rsp+38h+var_28] mov [rbx+18h], rax jmp short loc_38732 loc_3872B: movups xmm0, xmmword ptr [r15] movups xmmword ptr [rax], xmm0 loc_38732: mov rax, [rsp+38h+var_30] mov [rbx+10h], rax lea rax, off_E0590 mov [rbx], rax add rsp, 20h pop rbx pop r14 pop r15 retn
void version_command::version_command(version_command *this) { _QWORD v1[2]; // [rsp+0h] [rbp-38h] BYREF _OWORD v2[2]; // [rsp+10h] [rbp-28h] BYREF v1[0] = v2; std::string::_M_construct<char const*>(v1, "version", ""); *((_QWORD *)this + 1) = (char *)this + 24; if ( (_OWORD *)v1[0] == v2 ) { *(_OWORD *)((char *)this + 24) = v2[0]; } else { *((_QWORD *)this + 1) = v1[0]; *((_QWORD *)this + 3) = *(_QWORD *)&v2[0]; } *((_QWORD *)this + 2) = v1[1]; *(_QWORD *)this = off_E0590; }
version_command: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x20 MOV RBX,RDI LEA R15,[RSP + 0x10] MOV qword ptr [R15 + -0x10],R15 LEA RSI,[0x1b6c01] LEA RDX,[0x1b6c08] MOV R14,RSP MOV RDI,R14 CALL 0x0015c00c LEA RAX,[RBX + 0x18] MOV qword ptr [RBX + 0x8],RAX MOV RCX,qword ptr [R14] CMP RCX,R15 JZ 0x0013872b MOV qword ptr [RBX + 0x8],RCX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RBX + 0x18],RAX JMP 0x00138732 LAB_0013872b: MOVUPS XMM0,xmmword ptr [R15] MOVUPS xmmword ptr [RAX],XMM0 LAB_00138732: MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RBX + 0x10],RAX LEA RAX,[0x1e0590] MOV qword ptr [RBX],RAX ADD RSP,0x20 POP RBX POP R14 POP R15 RET
/* version_command::version_command() */ void __thiscall version_command::version_command(version_command *this) { int8 *local_38; int8 local_30; int8 local_28; int8 uStack_20; local_38 = &local_28; std::__cxx11::string::_M_construct<char_const*>((string *)&local_38,"version",""); *(version_command **)(this + 8) = this + 0x18; if (local_38 == &local_28) { *(int8 *)(this + 0x18) = local_28; *(int8 *)(this + 0x20) = uStack_20; } else { *(int8 **)(this + 8) = local_38; *(int8 *)(this + 0x18) = local_28; } *(int8 *)(this + 0x10) = local_30; *(int ***)this = &PTR__cmd_001e0590; return; }
23,463
Config::load_cmdline()
untodesu[P]voxelius/core/config.cc
void Config::load_cmdline(void) { for(auto it : m_values) { if(auto value = cmdline::get(it.first.c_str())) { it.second->set(value); } } }
O1
cpp
Config::load_cmdline(): pushq %r15 pushq %r14 pushq %rbx subq $0x30, %rsp movq 0x18(%rdi), %r15 testq %r15, %r15 je 0x51767 leaq 0x18(%rsp), %r14 leaq 0x8(%rsp), %rbx movq %r14, 0x8(%rsp) movq 0x8(%r15), %rsi movq 0x10(%r15), %rdx addq %rsi, %rdx movq %rbx, %rdi callq 0x1e832 movq 0x28(%r15), %rax movq %rax, 0x28(%rsp) movq 0x8(%rsp), %rdi xorl %esi, %esi callq 0x50468 testq %rax, %rax je 0x51748 movq 0x28(%rsp), %rdi movq (%rdi), %rcx movq %rax, %rsi callq *0x10(%rcx) movq 0x8(%rsp), %rdi cmpq %r14, %rdi je 0x5175f movq 0x18(%rsp), %rsi incq %rsi callq 0x176b0 movq (%r15), %r15 testq %r15, %r15 jne 0x51708 addq $0x30, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r14, %rdi je 0x5178b movq 0x18(%rsp), %rsi incq %rsi callq 0x176b0 movq %rbx, %rdi callq 0x17c80 nop
_ZN6Config12load_cmdlineEv: push r15 push r14 push rbx sub rsp, 30h mov r15, [rdi+18h] test r15, r15 jz short loc_51767 lea r14, [rsp+48h+var_30] lea rbx, [rsp+48h+var_40] loc_51708: mov [rsp+48h+var_40], r14 mov rsi, [r15+8] mov rdx, [r15+10h] add rdx, rsi mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov rax, [r15+28h] mov [rsp+48h+var_20], rax mov rdi, [rsp+48h+var_40]; this xor esi, esi; char * call _ZN7cmdline3getEPKcS1_; cmdline::get(char const*,char const*) test rax, rax jz short loc_51748 mov rdi, [rsp+48h+var_20] mov rcx, [rdi] mov rsi, rax call qword ptr [rcx+10h] loc_51748: mov rdi, [rsp+48h+var_40]; void * cmp rdi, r14 jz short loc_5175F mov rsi, [rsp+48h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5175F: mov r15, [r15] test r15, r15 jnz short loc_51708 loc_51767: add rsp, 30h pop rbx pop r14 pop r15 retn mov rbx, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r14 jz short loc_5178B mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5178B: mov rdi, rbx call __Unwind_Resume
void Config::load_cmdline(Config *this) { long long **i; // r15 const char *v2; // rdx const char *v3; // rax cmdline *v4; // [rsp+8h] [rbp-40h] BYREF _QWORD v5[2]; // [rsp+18h] [rbp-30h] BYREF long long *v6; // [rsp+28h] [rbp-20h] for ( i = (long long **)*((_QWORD *)this + 3); i; i = (long long **)*i ) { v4 = (cmdline *)v5; std::string::_M_construct<char *>(&v4, i[1], (long long)i[2] + (_QWORD)i[1]); v6 = i[5]; v3 = cmdline::get(v4, 0LL, v2); if ( v3 ) (*(void ( **)(long long *, const char *))(*v6 + 16))(v6, v3); if ( v4 != (cmdline *)v5 ) operator delete(v4, v5[0] + 1LL); } }
load_cmdline: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x30 MOV R15,qword ptr [RDI + 0x18] TEST R15,R15 JZ 0x00151767 LEA R14,[RSP + 0x18] LEA RBX,[RSP + 0x8] LAB_00151708: MOV qword ptr [RSP + 0x8],R14 MOV RSI,qword ptr [R15 + 0x8] MOV RDX,qword ptr [R15 + 0x10] ADD RDX,RSI MOV RDI,RBX CALL 0x0011e832 MOV RAX,qword ptr [R15 + 0x28] MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x8] LAB_0015172e: XOR ESI,ESI CALL 0x00150468 TEST RAX,RAX JZ 0x00151748 MOV RDI,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RDI] MOV RSI,RAX CALL qword ptr [RCX + 0x10] LAB_00151748: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R14 JZ 0x0015175f MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001176b0 LAB_0015175f: MOV R15,qword ptr [R15] TEST R15,R15 JNZ 0x00151708 LAB_00151767: ADD RSP,0x30 POP RBX POP R14 POP R15 RET
/* Config::load_cmdline() */ void __thiscall Config::load_cmdline(Config *this) { long lVar1; long *plVar2; long *local_40 [2]; long local_30 [2]; long *local_20; plVar2 = *(long **)(this + 0x18); if (plVar2 != (long *)0x0) { do { local_40[0] = local_30; std::__cxx11::string::_M_construct<char*>(local_40,plVar2[1],plVar2[2] + plVar2[1]); local_20 = (long *)plVar2[5]; /* try { // try from 0015172e to 00151747 has its CatchHandler @ 00151771 */ lVar1 = cmdline::get((char *)local_40[0],(char *)0x0); if (lVar1 != 0) { (**(code **)(*local_20 + 0x10))(local_20,lVar1); } if (local_40[0] != local_30) { operator_delete(local_40[0],local_30[0] + 1); } plVar2 = (long *)*plVar2; } while (plVar2 != (long *)0x0); } return; }
23,464
my_b_cache_read_r
eloqsql/mysys/mf_iocache.c
static int _my_b_cache_read_r(IO_CACHE *cache, uchar *Buffer, size_t Count) { my_off_t pos_in_file; size_t length, diff_length, left_length= 0; IO_CACHE_SHARE *cshare= cache->share; DBUG_ENTER("_my_b_cache_read_r"); DBUG_ASSERT(!(cache->myflags & MY_ENCRYPT)); while (Count) { size_t cnt, len; pos_in_file= cache->pos_in_file + (cache->read_end - cache->buffer); diff_length= (size_t) (pos_in_file & (IO_SIZE-1)); length=IO_ROUND_UP(Count+diff_length)-diff_length; length= ((length <= cache->read_length) ? length + IO_ROUND_DN(cache->read_length - length) : length - IO_ROUND_UP(length - cache->read_length)); if (cache->type != READ_FIFO && (length > (cache->end_of_file - pos_in_file))) length= (size_t) (cache->end_of_file - pos_in_file); if (length == 0) { cache->error= (int) left_length; DBUG_RETURN(1); } if (lock_io_cache(cache, pos_in_file)) { /* With a synchronized write/read cache we won't come here... */ DBUG_ASSERT(!cshare->source_cache); /* ... unless the writer has gone before this thread entered the lock. Simulate EOF in this case. It can be distinguished by cache->file. */ if (cache->file < 0) len= 0; else { /* Whenever a function which operates on IO_CACHE flushes/writes some part of the IO_CACHE to disk it will set the property "seek_not_done" to indicate this to other functions operating on the IO_CACHE. */ if (cache->seek_not_done) { if (mysql_file_seek(cache->file, pos_in_file, MY_SEEK_SET, MYF(0)) == MY_FILEPOS_ERROR) { cache->error= -1; unlock_io_cache(cache); DBUG_RETURN(1); } } len= mysql_file_read(cache->file, cache->buffer, length, cache->myflags); } DBUG_PRINT("io_cache_share", ("read %lu bytes", (ulong) len)); cache->read_end= cache->buffer + (len == (size_t) -1 ? 0 : len); cache->error= (len == length ? 0 : (int) len); cache->pos_in_file= pos_in_file; /* Copy important values to the share. */ cshare->error= cache->error; cshare->read_end= cache->read_end; cshare->pos_in_file= pos_in_file; /* Mark all threads as running and wake them. */ unlock_io_cache(cache); } else { /* With a synchronized write/read cache readers always come here. Copy important values from the share. */ cache->error= cshare->error; cache->read_end= cshare->read_end; cache->pos_in_file= cshare->pos_in_file; len= ((cache->error == -1) ? (size_t) -1 : (size_t) (cache->read_end - cache->buffer)); } cache->read_pos= cache->buffer; cache->seek_not_done= 0; if (len == 0 || len == (size_t) -1) { DBUG_PRINT("io_cache_share", ("reader error. len %lu left %lu", (ulong) len, (ulong) left_length)); cache->error= (int) left_length; DBUG_RETURN(1); } cnt= (len > Count) ? Count : len; if (cnt) memcpy(Buffer, cache->read_pos, cnt); Count -= cnt; Buffer+= cnt; left_length+= cnt; cache->read_pos+= cnt; } DBUG_RETURN(0); }
O0
c
my_b_cache_read_r: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq $0x0, -0x40(%rbp) movq -0x10(%rbp), %rax movq 0x98(%rax), %rax movq %rax, -0x48(%rbp) jmp 0xe8d60 jmp 0xe8d62 cmpq $0x0, -0x20(%rbp) je 0xe9143 movq -0x10(%rbp), %rax movq (%rax), %rax movq -0x10(%rbp), %rcx movq 0x18(%rcx), %rcx movq -0x10(%rbp), %rdx movq 0x20(%rdx), %rdx subq %rdx, %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax andq $0xfff, %rax # imm = 0xFFF movq %rax, -0x38(%rbp) movq -0x20(%rbp), %rax addq -0x38(%rbp), %rax addq $0x1000, %rax # imm = 0x1000 subq $0x1, %rax movabsq $0xfffff000, %rcx # imm = 0xFFFFF000 andq %rcx, %rax subq -0x38(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movq -0x10(%rbp), %rcx cmpq 0xf0(%rcx), %rax ja 0xe8dfd movq -0x30(%rbp), %rax movq -0x10(%rbp), %rcx movq 0xf0(%rcx), %rcx subq -0x30(%rbp), %rcx movabsq $0xfffff000, %rdx # imm = 0xFFFFF000 andq %rdx, %rcx addq %rcx, %rax movq %rax, -0x60(%rbp) jmp 0xe8e2f movq -0x30(%rbp), %rax movq -0x30(%rbp), %rcx movq -0x10(%rbp), %rdx subq 0xf0(%rdx), %rcx addq $0x1000, %rcx # imm = 0x1000 subq $0x1, %rcx movabsq $0xfffff000, %rdx # imm = 0xFFFFF000 andq %rdx, %rcx subq %rcx, %rax movq %rax, -0x60(%rbp) movq -0x60(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax cmpl $0x4, 0xb0(%rax) je 0xe8e69 movq -0x30(%rbp), %rax movq -0x10(%rbp), %rcx movq 0x8(%rcx), %rcx subq -0x28(%rbp), %rcx cmpq %rcx, %rax jbe 0xe8e69 movq -0x10(%rbp), %rax movq 0x8(%rax), %rax subq -0x28(%rbp), %rax movq %rax, -0x30(%rbp) cmpq $0x0, -0x30(%rbp) jne 0xe8e8c movq -0x40(%rbp), %rax movl %eax, %ecx movq -0x10(%rbp), %rax movl %ecx, 0xe4(%rax) movl $0x1, -0x4(%rbp) jmp 0xe914c movq -0x10(%rbp), %rdi movq -0x28(%rbp), %rsi callq 0xea910 cmpl $0x0, %eax je 0xe9000 jmp 0xe8ea4 jmp 0xe8ea6 movq -0x10(%rbp), %rax cmpl $0x0, 0xd4(%rax) jge 0xe8ec0 movq $0x0, -0x58(%rbp) jmp 0xe8f55 movq -0x10(%rbp), %rax cmpl $0x0, 0xe0(%rax) je 0xe8f1f movq -0x10(%rbp), %rax movl 0xd4(%rax), %edx movq -0x28(%rbp), %rcx leaq 0x7318c(%rip), %rdi # 0x15c06e movl $0x4cb, %esi # imm = 0x4CB xorl %r8d, %r8d xorl %eax, %eax movl %eax, %r9d callq 0xe7d90 cmpq $-0x1, %rax jne 0xe8f1d movq -0x10(%rbp), %rax movl $0xffffffff, 0xe4(%rax) # imm = 0xFFFFFFFF movq -0x10(%rbp), %rdi callq 0xeab70 movl $0x1, -0x4(%rbp) jmp 0xe914c jmp 0xe8f1f movq -0x10(%rbp), %rax movl 0xd4(%rax), %edx movq -0x10(%rbp), %rax movq 0x20(%rax), %rcx movq -0x30(%rbp), %r8 movq -0x10(%rbp), %rax movq 0xf8(%rax), %r9 leaq 0x73127(%rip), %rdi # 0x15c06e movl $0x4d3, %esi # imm = 0x4D3 callq 0xea7a0 movq %rax, -0x58(%rbp) jmp 0xe8f57 jmp 0xe8f59 movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movq %rax, -0x68(%rbp) cmpq $-0x1, -0x58(%rbp) jne 0xe8f74 xorl %eax, %eax movq %rax, -0x70(%rbp) jmp 0xe8f7c movq -0x58(%rbp), %rax movq %rax, -0x70(%rbp) movq -0x68(%rbp), %rcx movq -0x70(%rbp), %rax addq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x18(%rax) movq -0x58(%rbp), %rax cmpq -0x30(%rbp), %rax jne 0xe8fa0 xorl %eax, %eax movl %eax, -0x74(%rbp) jmp 0xe8fa7 movq -0x58(%rbp), %rax movl %eax, -0x74(%rbp) movl -0x74(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0xe4(%rax) movq -0x28(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rax movl 0xe4(%rax), %ecx movq -0x48(%rbp), %rax movl %ecx, 0xe0(%rax) movq -0x10(%rbp), %rax movq 0x18(%rax), %rcx movq -0x48(%rbp), %rax movq %rcx, 0xd0(%rax) movq -0x28(%rbp), %rcx movq -0x48(%rbp), %rax movq %rcx, 0xb8(%rax) movq -0x10(%rbp), %rdi callq 0xeab70 jmp 0xe9072 movq -0x48(%rbp), %rax movl 0xe0(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0xe4(%rax) movq -0x48(%rbp), %rax movq 0xd0(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x18(%rax) movq -0x48(%rbp), %rax movq 0xb8(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rax cmpl $-0x1, 0xe4(%rax) jne 0xe9053 movq $-0x1, %rax movq %rax, -0x80(%rbp) jmp 0xe906a movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movq -0x10(%rbp), %rcx movq 0x20(%rcx), %rcx subq %rcx, %rax movq %rax, -0x80(%rbp) movq -0x80(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x10(%rbp), %rax movq 0x20(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x10(%rbp), %rax movl $0x0, 0xe0(%rax) cmpq $0x0, -0x58(%rbp) je 0xe909e cmpq $-0x1, -0x58(%rbp) jne 0xe90be jmp 0xe90a0 jmp 0xe90a2 movq -0x40(%rbp), %rax movl %eax, %ecx movq -0x10(%rbp), %rax movl %ecx, 0xe4(%rax) movl $0x1, -0x4(%rbp) jmp 0xe914c movq -0x58(%rbp), %rax cmpq -0x20(%rbp), %rax jbe 0xe90d5 movq -0x20(%rbp), %rax movq %rax, -0x88(%rbp) jmp 0xe90e0 movq -0x58(%rbp), %rax movq %rax, -0x88(%rbp) movq -0x88(%rbp), %rax movq %rax, -0x50(%rbp) cmpq $0x0, -0x50(%rbp) je 0xe9107 movq -0x18(%rbp), %rdi movq -0x10(%rbp), %rax movq 0x10(%rax), %rsi movq -0x50(%rbp), %rdx callq 0x29090 movq -0x50(%rbp), %rcx movq -0x20(%rbp), %rax subq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x50(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x50(%rbp), %rax addq -0x40(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x50(%rbp), %rcx movq -0x10(%rbp), %rax addq 0x10(%rax), %rcx movq %rcx, 0x10(%rax) jmp 0xe8d62 jmp 0xe9145 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x90, %rsp popq %rbp retq nopl (%rax,%rax)
_my_b_cache_read_r: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_40], 0 mov rax, [rbp+var_10] mov rax, [rax+98h] mov [rbp+var_48], rax jmp short $+2 loc_E8D60: jmp short $+2 loc_E8D62: cmp [rbp+var_20], 0 jz loc_E9143 mov rax, [rbp+var_10] mov rax, [rax] mov rcx, [rbp+var_10] mov rcx, [rcx+18h] mov rdx, [rbp+var_10] mov rdx, [rdx+20h] sub rcx, rdx add rax, rcx mov [rbp+var_28], rax mov rax, [rbp+var_28] and rax, 0FFFh mov [rbp+var_38], rax mov rax, [rbp+var_20] add rax, [rbp+var_38] add rax, 1000h sub rax, 1 mov rcx, 0FFFFF000h and rax, rcx sub rax, [rbp+var_38] mov [rbp+var_30], rax mov rax, [rbp+var_30] mov rcx, [rbp+var_10] cmp rax, [rcx+0F0h] ja short loc_E8DFD mov rax, [rbp+var_30] mov rcx, [rbp+var_10] mov rcx, [rcx+0F0h] sub rcx, [rbp+var_30] mov rdx, 0FFFFF000h and rcx, rdx add rax, rcx mov [rbp+var_60], rax jmp short loc_E8E2F loc_E8DFD: mov rax, [rbp+var_30] mov rcx, [rbp+var_30] mov rdx, [rbp+var_10] sub rcx, [rdx+0F0h] add rcx, 1000h sub rcx, 1 mov rdx, 0FFFFF000h and rcx, rdx sub rax, rcx mov [rbp+var_60], rax loc_E8E2F: mov rax, [rbp+var_60] mov [rbp+var_30], rax mov rax, [rbp+var_10] cmp dword ptr [rax+0B0h], 4 jz short loc_E8E69 mov rax, [rbp+var_30] mov rcx, [rbp+var_10] mov rcx, [rcx+8] sub rcx, [rbp+var_28] cmp rax, rcx jbe short loc_E8E69 mov rax, [rbp+var_10] mov rax, [rax+8] sub rax, [rbp+var_28] mov [rbp+var_30], rax loc_E8E69: cmp [rbp+var_30], 0 jnz short loc_E8E8C mov rax, [rbp+var_40] mov ecx, eax mov rax, [rbp+var_10] mov [rax+0E4h], ecx mov [rbp+var_4], 1 jmp loc_E914C loc_E8E8C: mov rdi, [rbp+var_10] mov rsi, [rbp+var_28] call lock_io_cache cmp eax, 0 jz loc_E9000 jmp short $+2 loc_E8EA4: jmp short $+2 loc_E8EA6: mov rax, [rbp+var_10] cmp dword ptr [rax+0D4h], 0 jge short loc_E8EC0 mov [rbp+var_58], 0 jmp loc_E8F55 loc_E8EC0: mov rax, [rbp+var_10] cmp dword ptr [rax+0E0h], 0 jz short loc_E8F1F mov rax, [rbp+var_10] mov edx, [rax+0D4h] mov rcx, [rbp+var_28] lea rdi, aWorkspaceLlm4b_44; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 4CBh xor r8d, r8d xor eax, eax mov r9d, eax call inline_mysql_file_seek_6 cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_E8F1D mov rax, [rbp+var_10] mov dword ptr [rax+0E4h], 0FFFFFFFFh mov rdi, [rbp+var_10] call unlock_io_cache mov [rbp+var_4], 1 jmp loc_E914C loc_E8F1D: jmp short $+2 loc_E8F1F: mov rax, [rbp+var_10] mov edx, [rax+0D4h] mov rax, [rbp+var_10] mov rcx, [rax+20h] mov r8, [rbp+var_30] mov rax, [rbp+var_10] mov r9, [rax+0F8h] lea rdi, aWorkspaceLlm4b_44; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 4D3h call inline_mysql_file_read_5 mov [rbp+var_58], rax loc_E8F55: jmp short $+2 loc_E8F57: jmp short $+2 loc_E8F59: mov rax, [rbp+var_10] mov rax, [rax+20h] mov [rbp+var_68], rax cmp [rbp+var_58], 0FFFFFFFFFFFFFFFFh jnz short loc_E8F74 xor eax, eax mov [rbp+var_70], rax jmp short loc_E8F7C loc_E8F74: mov rax, [rbp+var_58] mov [rbp+var_70], rax loc_E8F7C: mov rcx, [rbp+var_68] mov rax, [rbp+var_70] add rcx, rax mov rax, [rbp+var_10] mov [rax+18h], rcx mov rax, [rbp+var_58] cmp rax, [rbp+var_30] jnz short loc_E8FA0 xor eax, eax mov [rbp+var_74], eax jmp short loc_E8FA7 loc_E8FA0: mov rax, [rbp+var_58] mov [rbp+var_74], eax loc_E8FA7: mov ecx, [rbp+var_74] mov rax, [rbp+var_10] mov [rax+0E4h], ecx mov rcx, [rbp+var_28] mov rax, [rbp+var_10] mov [rax], rcx mov rax, [rbp+var_10] mov ecx, [rax+0E4h] mov rax, [rbp+var_48] mov [rax+0E0h], ecx mov rax, [rbp+var_10] mov rcx, [rax+18h] mov rax, [rbp+var_48] mov [rax+0D0h], rcx mov rcx, [rbp+var_28] mov rax, [rbp+var_48] mov [rax+0B8h], rcx mov rdi, [rbp+var_10] call unlock_io_cache jmp short loc_E9072 loc_E9000: mov rax, [rbp+var_48] mov ecx, [rax+0E0h] mov rax, [rbp+var_10] mov [rax+0E4h], ecx mov rax, [rbp+var_48] mov rcx, [rax+0D0h] mov rax, [rbp+var_10] mov [rax+18h], rcx mov rax, [rbp+var_48] mov rcx, [rax+0B8h] mov rax, [rbp+var_10] mov [rax], rcx mov rax, [rbp+var_10] cmp dword ptr [rax+0E4h], 0FFFFFFFFh jnz short loc_E9053 mov rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_80], rax jmp short loc_E906A loc_E9053: mov rax, [rbp+var_10] mov rax, [rax+18h] mov rcx, [rbp+var_10] mov rcx, [rcx+20h] sub rax, rcx mov [rbp+var_80], rax loc_E906A: mov rax, [rbp+var_80] mov [rbp+var_58], rax loc_E9072: mov rax, [rbp+var_10] mov rcx, [rax+20h] mov rax, [rbp+var_10] mov [rax+10h], rcx mov rax, [rbp+var_10] mov dword ptr [rax+0E0h], 0 cmp [rbp+var_58], 0 jz short loc_E909E cmp [rbp+var_58], 0FFFFFFFFFFFFFFFFh jnz short loc_E90BE loc_E909E: jmp short $+2 loc_E90A0: jmp short $+2 loc_E90A2: mov rax, [rbp+var_40] mov ecx, eax mov rax, [rbp+var_10] mov [rax+0E4h], ecx mov [rbp+var_4], 1 jmp loc_E914C loc_E90BE: mov rax, [rbp+var_58] cmp rax, [rbp+var_20] jbe short loc_E90D5 mov rax, [rbp+var_20] mov [rbp+var_88], rax jmp short loc_E90E0 loc_E90D5: mov rax, [rbp+var_58] mov [rbp+var_88], rax loc_E90E0: mov rax, [rbp+var_88] mov [rbp+var_50], rax cmp [rbp+var_50], 0 jz short loc_E9107 mov rdi, [rbp+var_18] mov rax, [rbp+var_10] mov rsi, [rax+10h] mov rdx, [rbp+var_50] call _memcpy loc_E9107: mov rcx, [rbp+var_50] mov rax, [rbp+var_20] sub rax, rcx mov [rbp+var_20], rax mov rax, [rbp+var_50] add rax, [rbp+var_18] mov [rbp+var_18], rax mov rax, [rbp+var_50] add rax, [rbp+var_40] mov [rbp+var_40], rax mov rcx, [rbp+var_50] mov rax, [rbp+var_10] add rcx, [rax+10h] mov [rax+10h], rcx jmp loc_E8D62 loc_E9143: jmp short $+2 loc_E9145: mov [rbp+var_4], 0 loc_E914C: mov eax, [rbp+var_4] add rsp, 90h pop rbp retn
long long my_b_cache_read_r(long long a1, long long a2, unsigned long long a3) { unsigned long long v4; // [rsp+8h] [rbp-88h] long long v5; // [rsp+10h] [rbp-80h] int v6; // [rsp+1Ch] [rbp-74h] unsigned long long v7; // [rsp+20h] [rbp-70h] unsigned long long v8; // [rsp+30h] [rbp-60h] unsigned long long v9; // [rsp+38h] [rbp-58h] long long v10; // [rsp+48h] [rbp-48h] int v11; // [rsp+50h] [rbp-40h] unsigned long long v12; // [rsp+60h] [rbp-30h] long long v13; // [rsp+60h] [rbp-30h] long long v14; // [rsp+68h] [rbp-28h] v11 = 0; v10 = *(_QWORD *)(a1 + 152); while ( a3 ) { v14 = *(_QWORD *)(a1 + 24) - *(_QWORD *)(a1 + 32) + *(_QWORD *)a1; v12 = (((v14 & 0xFFF) + a3 + 4095) & 0xFFFFF000) - (v14 & 0xFFF); if ( v12 > *(_QWORD *)(a1 + 240) ) v8 = v12 - ((v12 - *(_QWORD *)(a1 + 240) + 4095) & 0xFFFFF000); else v8 = ((*(_QWORD *)(a1 + 240) - v12) & 0xFFFFF000) + v12; v13 = v8; if ( *(_DWORD *)(a1 + 176) != 4 && v8 > *(_QWORD *)(a1 + 8) - v14 ) v13 = *(_QWORD *)(a1 + 8) - v14; if ( !v13 ) { *(_DWORD *)(a1 + 228) = v11; return 1; } if ( (unsigned int)lock_io_cache(a1, v14) ) { if ( *(int *)(a1 + 212) >= 0 ) { if ( *(_DWORD *)(a1 + 224) && inline_mysql_file_seek_6( (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 0x4CBu, *(_DWORD *)(a1 + 212), v14, 0, 0LL) == -1 ) { *(_DWORD *)(a1 + 228) = -1; unlock_io_cache(a1); return 1; } v9 = inline_mysql_file_read_5( "/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 1235LL, *(unsigned int *)(a1 + 212), *(_QWORD *)(a1 + 32), v13, *(_QWORD *)(a1 + 248)); } else { v9 = 0LL; } if ( v9 == -1LL ) v7 = 0LL; else v7 = v9; *(_QWORD *)(a1 + 24) = v7 + *(_QWORD *)(a1 + 32); if ( v9 == v13 ) v6 = 0; else v6 = v9; *(_DWORD *)(a1 + 228) = v6; *(_QWORD *)a1 = v14; *(_DWORD *)(v10 + 224) = *(_DWORD *)(a1 + 228); *(_QWORD *)(v10 + 208) = *(_QWORD *)(a1 + 24); *(_QWORD *)(v10 + 184) = v14; unlock_io_cache(a1); } else { *(_DWORD *)(a1 + 228) = *(_DWORD *)(v10 + 224); *(_QWORD *)(a1 + 24) = *(_QWORD *)(v10 + 208); *(_QWORD *)a1 = *(_QWORD *)(v10 + 184); if ( *(_DWORD *)(a1 + 228) == -1 ) v5 = -1LL; else v5 = *(_QWORD *)(a1 + 24) - *(_QWORD *)(a1 + 32); v9 = v5; } *(_QWORD *)(a1 + 16) = *(_QWORD *)(a1 + 32); *(_DWORD *)(a1 + 224) = 0; if ( !v9 || v9 == -1LL ) { *(_DWORD *)(a1 + 228) = v11; return 1; } if ( v9 <= a3 ) v4 = v9; else v4 = a3; memcpy(a2, *(_QWORD *)(a1 + 16), v4); a3 -= v4; a2 += v4; v11 += v4; *(_QWORD *)(a1 + 16) += v4; } return 0; }
_my_b_cache_read_r: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x40],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x98] MOV qword ptr [RBP + -0x48],RAX JMP 0x001e8d60 LAB_001e8d60: JMP 0x001e8d62 LAB_001e8d62: CMP qword ptr [RBP + -0x20],0x0 JZ 0x001e9143 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x18] MOV RDX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RDX + 0x20] SUB RCX,RDX ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] AND RAX,0xfff MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,qword ptr [RBP + -0x38] ADD RAX,0x1000 SUB RAX,0x1 MOV RCX,0xfffff000 AND RAX,RCX SUB RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0xf0] JA 0x001e8dfd MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0xf0] SUB RCX,qword ptr [RBP + -0x30] MOV RDX,0xfffff000 AND RCX,RDX ADD RAX,RCX MOV qword ptr [RBP + -0x60],RAX JMP 0x001e8e2f LAB_001e8dfd: MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x10] SUB RCX,qword ptr [RDX + 0xf0] ADD RCX,0x1000 SUB RCX,0x1 MOV RDX,0xfffff000 AND RCX,RDX SUB RAX,RCX MOV qword ptr [RBP + -0x60],RAX LAB_001e8e2f: MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0xb0],0x4 JZ 0x001e8e69 MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x8] SUB RCX,qword ptr [RBP + -0x28] CMP RAX,RCX JBE 0x001e8e69 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] SUB RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x30],RAX LAB_001e8e69: CMP qword ptr [RBP + -0x30],0x0 JNZ 0x001e8e8c MOV RAX,qword ptr [RBP + -0x40] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xe4],ECX MOV dword ptr [RBP + -0x4],0x1 JMP 0x001e914c LAB_001e8e8c: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x28] CALL 0x001ea910 CMP EAX,0x0 JZ 0x001e9000 JMP 0x001e8ea4 LAB_001e8ea4: JMP 0x001e8ea6 LAB_001e8ea6: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0xd4],0x0 JGE 0x001e8ec0 MOV qword ptr [RBP + -0x58],0x0 JMP 0x001e8f55 LAB_001e8ec0: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0xe0],0x0 JZ 0x001e8f1f MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0xd4] MOV RCX,qword ptr [RBP + -0x28] LEA RDI,[0x25c06e] MOV ESI,0x4cb XOR R8D,R8D XOR EAX,EAX MOV R9D,EAX CALL 0x001e7d90 CMP RAX,-0x1 JNZ 0x001e8f1d MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xe4],0xffffffff MOV RDI,qword ptr [RBP + -0x10] CALL 0x001eab70 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001e914c LAB_001e8f1d: JMP 0x001e8f1f LAB_001e8f1f: MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0xd4] MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x20] MOV R8,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x10] MOV R9,qword ptr [RAX + 0xf8] LEA RDI,[0x25c06e] MOV ESI,0x4d3 CALL 0x001ea7a0 MOV qword ptr [RBP + -0x58],RAX LAB_001e8f55: JMP 0x001e8f57 LAB_001e8f57: JMP 0x001e8f59 LAB_001e8f59: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RBP + -0x68],RAX CMP qword ptr [RBP + -0x58],-0x1 JNZ 0x001e8f74 XOR EAX,EAX MOV qword ptr [RBP + -0x70],RAX JMP 0x001e8f7c LAB_001e8f74: MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x70],RAX LAB_001e8f7c: MOV RCX,qword ptr [RBP + -0x68] MOV RAX,qword ptr [RBP + -0x70] ADD RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x58] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001e8fa0 XOR EAX,EAX MOV dword ptr [RBP + -0x74],EAX JMP 0x001e8fa7 LAB_001e8fa0: MOV RAX,qword ptr [RBP + -0x58] MOV dword ptr [RBP + -0x74],EAX LAB_001e8fa7: MOV ECX,dword ptr [RBP + -0x74] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xe4],ECX MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0xe4] MOV RAX,qword ptr [RBP + -0x48] MOV dword ptr [RAX + 0xe0],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RAX + 0xd0],RCX MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RAX + 0xb8],RCX MOV RDI,qword ptr [RBP + -0x10] CALL 0x001eab70 JMP 0x001e9072 LAB_001e9000: MOV RAX,qword ptr [RBP + -0x48] MOV ECX,dword ptr [RAX + 0xe0] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xe4],ECX MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RAX + 0xd0] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0xe4],-0x1 JNZ 0x001e9053 MOV RAX,-0x1 MOV qword ptr [RBP + -0x80],RAX JMP 0x001e906a LAB_001e9053: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x20] SUB RAX,RCX MOV qword ptr [RBP + -0x80],RAX LAB_001e906a: MOV RAX,qword ptr [RBP + -0x80] MOV qword ptr [RBP + -0x58],RAX LAB_001e9072: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x20] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xe0],0x0 CMP qword ptr [RBP + -0x58],0x0 JZ 0x001e909e CMP qword ptr [RBP + -0x58],-0x1 JNZ 0x001e90be LAB_001e909e: JMP 0x001e90a0 LAB_001e90a0: JMP 0x001e90a2 LAB_001e90a2: MOV RAX,qword ptr [RBP + -0x40] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xe4],ECX MOV dword ptr [RBP + -0x4],0x1 JMP 0x001e914c LAB_001e90be: MOV RAX,qword ptr [RBP + -0x58] CMP RAX,qword ptr [RBP + -0x20] JBE 0x001e90d5 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x88],RAX JMP 0x001e90e0 LAB_001e90d5: MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x88],RAX LAB_001e90e0: MOV RAX,qword ptr [RBP + -0x88] MOV qword ptr [RBP + -0x50],RAX CMP qword ptr [RBP + -0x50],0x0 JZ 0x001e9107 MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RBP + -0x50] CALL 0x00129090 LAB_001e9107: MOV RCX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x20] SUB RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x50] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x50] ADD RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x40],RAX MOV RCX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x10] ADD RCX,qword ptr [RAX + 0x10] MOV qword ptr [RAX + 0x10],RCX JMP 0x001e8d62 LAB_001e9143: JMP 0x001e9145 LAB_001e9145: MOV dword ptr [RBP + -0x4],0x0 LAB_001e914c: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x90 POP RBP RET
int4 _my_b_cache_read_r(ulong *param_1,void *param_2,ulong param_3) { ulong uVar1; int iVar2; ulong uVar3; long lVar4; ulong uVar5; size_t local_90; ulong local_88; int4 local_7c; ulong local_78; ulong local_68; ulong local_60; long local_48; ulong local_38; ulong local_28; void *local_20; local_48 = 0; uVar1 = param_1[0x13]; local_28 = param_3; local_20 = param_2; while( true ) { if (local_28 == 0) { return 0; } uVar3 = *param_1 + (param_1[3] - param_1[4]); local_68 = (local_28 + (uVar3 & 0xfff) + 0xfff & 0xfffff000) - (uVar3 & 0xfff); if (param_1[0x1e] < local_68) { uVar5 = -((local_68 - param_1[0x1e]) + 0xfff & 0xfffff000); } else { uVar5 = param_1[0x1e] - local_68 & 0xfffff000; } local_68 = local_68 + uVar5; local_38 = local_68; if (((int)param_1[0x16] != 4) && (param_1[1] - uVar3 < local_68)) { local_38 = param_1[1] - uVar3; } if (local_38 == 0) { *(int *)((long)param_1 + 0xe4) = (int)local_48; return 1; } iVar2 = lock_io_cache(param_1,uVar3); if (iVar2 == 0) { *(int4 *)((long)param_1 + 0xe4) = *(int4 *)(uVar1 + 0xe0); param_1[3] = *(ulong *)(uVar1 + 0xd0); *param_1 = *(ulong *)(uVar1 + 0xb8); if (*(int *)((long)param_1 + 0xe4) == -1) { local_88 = 0xffffffffffffffff; } else { local_88 = param_1[3] - param_1[4]; } local_60 = local_88; } else { if (*(int *)((long)param_1 + 0xd4) < 0) { local_60 = 0; } else { if (((int)param_1[0x1c] != 0) && (lVar4 = inline_mysql_file_seek ("/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x4cb, *(int4 *)((long)param_1 + 0xd4),uVar3,0,0), lVar4 == -1)) { *(int4 *)((long)param_1 + 0xe4) = 0xffffffff; unlock_io_cache(param_1); return 1; } local_60 = inline_mysql_file_read ("/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x4d3, *(int4 *)((long)param_1 + 0xd4),param_1[4],local_38, param_1[0x1f]); } if (local_60 == 0xffffffffffffffff) { local_78 = 0; } else { local_78 = local_60; } param_1[3] = param_1[4] + local_78; if (local_60 == local_38) { local_7c = 0; } else { local_7c = (int4)local_60; } *(int4 *)((long)param_1 + 0xe4) = local_7c; *param_1 = uVar3; *(int4 *)(uVar1 + 0xe0) = *(int4 *)((long)param_1 + 0xe4); *(ulong *)(uVar1 + 0xd0) = param_1[3]; *(ulong *)(uVar1 + 0xb8) = uVar3; unlock_io_cache(param_1); } param_1[2] = param_1[4]; *(int4 *)(param_1 + 0x1c) = 0; if ((local_60 == 0) || (local_60 == 0xffffffffffffffff)) break; if (local_28 < local_60) { local_90 = local_28; } else { local_90 = local_60; } if (local_90 != 0) { memcpy(local_20,(void *)param_1[2],local_90); } local_28 = local_28 - local_90; local_20 = (void *)(local_90 + (long)local_20); local_48 = local_90 + local_48; param_1[2] = local_90 + param_1[2]; } *(int *)((long)param_1 + 0xe4) = (int)local_48; return 1; }
23,465
get_internal_charset
eloqsql/mysys/charset.c
static CHARSET_INFO * get_internal_charset(MY_CHARSET_LOADER *loader, uint cs_number, myf flags) { char buf[FN_REFLEN]; struct charset_info_st *cs; DBUG_ASSERT(cs_number < array_elements(all_charsets)); if ((cs= (struct charset_info_st*) all_charsets[cs_number])) { if (cs->state & MY_CS_READY) /* if CS is already initialized */ { my_collation_statistics_inc_use_count(cs_number); return cs; } /* To make things thread safe we are not allowing other threads to interfere while we may changing the cs_info_table */ mysql_mutex_lock(&THR_LOCK_charset); if (!(cs->state & (MY_CS_COMPILED|MY_CS_LOADED))) /* if CS is not in memory */ { MY_CHARSET_LOADER loader; strxmov(get_charsets_dir(buf), cs->cs_name.str, ".xml", NullS); my_charset_loader_init_mysys(&loader); my_read_charset_file(&loader, buf, flags); } if (cs->state & MY_CS_AVAILABLE) { if (!(cs->state & MY_CS_READY)) { if (!simple_8bit_charset_data_is_full(cs)) { CHARSET_INFO *refcs= find_charset_data_inheritance_source(cs); if (refcs) inherit_charset_data(cs, refcs); } if (!simple_8bit_collation_data_is_full(cs)) { CHARSET_INFO *refcl= find_collation_data_inheritance_source(cs, flags); if (refcl) inherit_collation_data(cs, refcl); } if (my_ci_init_charset(cs, loader) || my_ci_init_collation(cs, loader)) { cs= NULL; } else cs->state|= MY_CS_READY; } my_collation_statistics_inc_use_count(cs_number); } else cs= NULL; mysql_mutex_unlock(&THR_LOCK_charset); } return cs; }
O0
c
get_internal_charset: pushq %rbp movq %rsp, %rbp subq $0x300, %rsp # imm = 0x300 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x2d0(%rbp) movl %esi, -0x2d4(%rbp) movq %rdx, -0x2e0(%rbp) jmp 0x293be movl -0x2d4(%rbp), %eax movl %eax, %ecx leaq 0x35d1e3(%rip), %rax # 0x3865b0 movq (%rax,%rcx,8), %rax movq %rax, -0x2e8(%rbp) cmpq $0x0, %rax je 0x295c7 movq -0x2e8(%rbp), %rax movl 0xc(%rax), %eax andl $0x100, %eax # imm = 0x100 cmpl $0x0, %eax je 0x29414 movl -0x2d4(%rbp), %edi callq 0x2ad20 movq -0x2e8(%rbp), %rax movq %rax, -0x2c8(%rbp) jmp 0x295d5 leaq 0x35d04d(%rip), %rdi # 0x386468 leaq 0x501bf(%rip), %rsi # 0x795e1 movl $0x36b, %edx # imm = 0x36B callq 0x2ad50 movq -0x2e8(%rbp), %rax movl 0xc(%rax), %eax andl $0x9, %eax cmpl $0x0, %eax jne 0x29490 leaq -0x210(%rbp), %rdi callq 0x28a00 movq %rax, %rdi movq -0x2e8(%rbp), %rax movq 0x10(%rax), %rsi leaq 0x50165(%rip), %rdx # 0x795c4 xorl %eax, %eax movl %eax, %ecx movb $0x0, %al callq 0x76860 leaq -0x2c0(%rbp), %rdi callq 0x28360 leaq -0x210(%rbp), %rsi movq -0x2e0(%rbp), %rdx leaq -0x2c0(%rbp), %rdi callq 0x2a8a0 movq -0x2e8(%rbp), %rax movl 0xc(%rax), %eax andl $0x200, %eax # imm = 0x200 cmpl $0x0, %eax je 0x295b0 movq -0x2e8(%rbp), %rax movl 0xc(%rax), %eax andl $0x100, %eax # imm = 0x100 cmpl $0x0, %eax jne 0x295a3 movq -0x2e8(%rbp), %rdi callq 0x2a7c0 cmpb $0x0, %al jne 0x29502 movq -0x2e8(%rbp), %rdi callq 0x2adc0 movq %rax, -0x2f0(%rbp) cmpq $0x0, -0x2f0(%rbp) je 0x29500 movq -0x2e8(%rbp), %rdi movq -0x2f0(%rbp), %rsi callq 0x2ae00 jmp 0x29502 movq -0x2e8(%rbp), %rdi callq 0x2a820 cmpb $0x0, %al jne 0x2954b movq -0x2e8(%rbp), %rdi movq -0x2e0(%rbp), %rsi callq 0x2ae80 movq %rax, -0x2f8(%rbp) cmpq $0x0, -0x2f8(%rbp) je 0x29549 movq -0x2e8(%rbp), %rdi movq -0x2f8(%rbp), %rsi callq 0x2af90 jmp 0x2954b movq -0x2e8(%rbp), %rdi movq -0x2d0(%rbp), %rsi callq 0x2afd0 movsbl %al, %eax cmpl $0x0, %eax jne 0x29581 movq -0x2e8(%rbp), %rdi movq -0x2d0(%rbp), %rsi callq 0x2b020 movsbl %al, %eax cmpl $0x0, %eax je 0x2958e movq $0x0, -0x2e8(%rbp) jmp 0x295a1 movq -0x2e8(%rbp), %rax movl 0xc(%rax), %ecx orl $0x100, %ecx # imm = 0x100 movl %ecx, 0xc(%rax) jmp 0x295a3 movl -0x2d4(%rbp), %edi callq 0x2ad20 jmp 0x295bb movq $0x0, -0x2e8(%rbp) leaq 0x35cea6(%rip), %rdi # 0x386468 callq 0x2b070 movq -0x2e8(%rbp), %rax movq %rax, -0x2c8(%rbp) movq -0x2c8(%rbp), %rax movq %rax, -0x300(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x29605 movq -0x300(%rbp), %rax addq $0x300, %rsp # imm = 0x300 popq %rbp retq callq 0x242d0 nopw (%rax,%rax)
get_internal_charset: push rbp mov rbp, rsp sub rsp, 300h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_2D0], rdi mov [rbp+var_2D4], esi mov [rbp+var_2E0], rdx jmp short $+2 loc_293BE: mov eax, [rbp+var_2D4] mov ecx, eax lea rax, all_charsets mov rax, [rax+rcx*8] mov [rbp+var_2E8], rax cmp rax, 0 jz loc_295C7 mov rax, [rbp+var_2E8] mov eax, [rax+0Ch] and eax, 100h cmp eax, 0 jz short loc_29414 mov edi, [rbp+var_2D4] call my_collation_statistics_inc_use_count mov rax, [rbp+var_2E8] mov [rbp+var_2C8], rax jmp loc_295D5 loc_29414: lea rdi, THR_LOCK_charset lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 36Bh call inline_mysql_mutex_lock_0 mov rax, [rbp+var_2E8] mov eax, [rax+0Ch] and eax, 9 cmp eax, 0 jnz short loc_29490 lea rdi, [rbp+var_210] call get_charsets_dir mov rdi, rax mov rax, [rbp+var_2E8] mov rsi, [rax+10h] lea rdx, aIndexXml+5; ".xml" xor eax, eax mov ecx, eax mov al, 0 call strxmov lea rdi, [rbp+var_2C0] call my_charset_loader_init_mysys lea rsi, [rbp+var_210] mov rdx, [rbp+var_2E0] lea rdi, [rbp+var_2C0] call my_read_charset_file loc_29490: mov rax, [rbp+var_2E8] mov eax, [rax+0Ch] and eax, 200h cmp eax, 0 jz loc_295B0 mov rax, [rbp+var_2E8] mov eax, [rax+0Ch] and eax, 100h cmp eax, 0 jnz loc_295A3 mov rdi, [rbp+var_2E8] call simple_8bit_charset_data_is_full cmp al, 0 jnz short loc_29502 mov rdi, [rbp+var_2E8] call find_charset_data_inheritance_source mov [rbp+var_2F0], rax cmp [rbp+var_2F0], 0 jz short loc_29500 mov rdi, [rbp+var_2E8] mov rsi, [rbp+var_2F0] call inherit_charset_data loc_29500: jmp short $+2 loc_29502: mov rdi, [rbp+var_2E8] call simple_8bit_collation_data_is_full cmp al, 0 jnz short loc_2954B mov rdi, [rbp+var_2E8] mov rsi, [rbp+var_2E0] call find_collation_data_inheritance_source mov [rbp+var_2F8], rax cmp [rbp+var_2F8], 0 jz short loc_29549 mov rdi, [rbp+var_2E8] mov rsi, [rbp+var_2F8] call inherit_collation_data loc_29549: jmp short $+2 loc_2954B: mov rdi, [rbp+var_2E8] mov rsi, [rbp+var_2D0] call my_ci_init_charset movsx eax, al cmp eax, 0 jnz short loc_29581 mov rdi, [rbp+var_2E8] mov rsi, [rbp+var_2D0] call my_ci_init_collation movsx eax, al cmp eax, 0 jz short loc_2958E loc_29581: mov [rbp+var_2E8], 0 jmp short loc_295A1 loc_2958E: mov rax, [rbp+var_2E8] mov ecx, [rax+0Ch] or ecx, 100h mov [rax+0Ch], ecx loc_295A1: jmp short $+2 loc_295A3: mov edi, [rbp+var_2D4] call my_collation_statistics_inc_use_count jmp short loc_295BB loc_295B0: mov [rbp+var_2E8], 0 loc_295BB: lea rdi, THR_LOCK_charset call inline_mysql_mutex_unlock_0 loc_295C7: mov rax, [rbp+var_2E8] mov [rbp+var_2C8], rax loc_295D5: mov rax, [rbp+var_2C8] mov [rbp+var_300], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_29605 mov rax, [rbp+var_300] add rsp, 300h pop rbp retn loc_29605: call ___stack_chk_fail
long long get_internal_charset(long long a1, unsigned int a2, long long a3) { int charsets_dir; // eax int v4; // r8d int v5; // r9d long long collation_data_inheritance_source; // [rsp+8h] [rbp-2F8h] long long charset_data_inheritance_source; // [rsp+10h] [rbp-2F0h] long long v9; // [rsp+18h] [rbp-2E8h] _BYTE v12[176]; // [rsp+40h] [rbp-2C0h] BYREF _BYTE v13[520]; // [rsp+F0h] [rbp-210h] BYREF unsigned long long v14; // [rsp+2F8h] [rbp-8h] v14 = __readfsqword(0x28u); v9 = all_charsets[a2]; if ( !v9 ) return v9; if ( (*(_DWORD *)(v9 + 12) & 0x100) == 0 ) { inline_mysql_mutex_lock_0(&THR_LOCK_charset, "/workspace/llm4binary/github2025/eloqsql/mysys/charset.c", 875LL); if ( (*(_DWORD *)(v9 + 12) & 9) == 0 ) { charsets_dir = get_charsets_dir((long long)v13); strxmov(charsets_dir, *(_QWORD *)(v9 + 16), (unsigned int)".xml", 0, v4, v5); my_charset_loader_init_mysys((long long)v12); my_read_charset_file(v12, v13, a3); } if ( (*(_DWORD *)(v9 + 12) & 0x200) != 0 ) { if ( (*(_DWORD *)(v9 + 12) & 0x100) == 0 ) { if ( !(unsigned __int8)simple_8bit_charset_data_is_full(v9) ) { charset_data_inheritance_source = find_charset_data_inheritance_source(v9); if ( charset_data_inheritance_source ) inherit_charset_data(v9, charset_data_inheritance_source); } if ( !(unsigned __int8)simple_8bit_collation_data_is_full(v9) ) { collation_data_inheritance_source = find_collation_data_inheritance_source(v9, a3); if ( collation_data_inheritance_source ) inherit_collation_data(v9, collation_data_inheritance_source); } if ( (unsigned __int8)my_ci_init_charset(v9, a1) || (unsigned __int8)my_ci_init_collation(v9, a1) ) v9 = 0LL; else *(_DWORD *)(v9 + 12) |= 0x100u; } my_collation_statistics_inc_use_count(a2); } else { v9 = 0LL; } inline_mysql_mutex_unlock_0(&THR_LOCK_charset); return v9; } my_collation_statistics_inc_use_count(a2); return v9; }
get_internal_charset: PUSH RBP MOV RBP,RSP SUB RSP,0x300 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x2d0],RDI MOV dword ptr [RBP + -0x2d4],ESI MOV qword ptr [RBP + -0x2e0],RDX JMP 0x001293be LAB_001293be: MOV EAX,dword ptr [RBP + -0x2d4] MOV ECX,EAX LEA RAX,[0x4865b0] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x2e8],RAX CMP RAX,0x0 JZ 0x001295c7 MOV RAX,qword ptr [RBP + -0x2e8] MOV EAX,dword ptr [RAX + 0xc] AND EAX,0x100 CMP EAX,0x0 JZ 0x00129414 MOV EDI,dword ptr [RBP + -0x2d4] CALL 0x0012ad20 MOV RAX,qword ptr [RBP + -0x2e8] MOV qword ptr [RBP + -0x2c8],RAX JMP 0x001295d5 LAB_00129414: LEA RDI,[0x486468] LEA RSI,[0x1795e1] MOV EDX,0x36b CALL 0x0012ad50 MOV RAX,qword ptr [RBP + -0x2e8] MOV EAX,dword ptr [RAX + 0xc] AND EAX,0x9 CMP EAX,0x0 JNZ 0x00129490 LEA RDI,[RBP + -0x210] CALL 0x00128a00 MOV RDI,RAX MOV RAX,qword ptr [RBP + -0x2e8] MOV RSI,qword ptr [RAX + 0x10] LEA RDX,[0x1795c4] XOR EAX,EAX MOV ECX,EAX MOV AL,0x0 CALL 0x00176860 LEA RDI,[RBP + -0x2c0] CALL 0x00128360 LEA RSI,[RBP + -0x210] MOV RDX,qword ptr [RBP + -0x2e0] LEA RDI,[RBP + -0x2c0] CALL 0x0012a8a0 LAB_00129490: MOV RAX,qword ptr [RBP + -0x2e8] MOV EAX,dword ptr [RAX + 0xc] AND EAX,0x200 CMP EAX,0x0 JZ 0x001295b0 MOV RAX,qword ptr [RBP + -0x2e8] MOV EAX,dword ptr [RAX + 0xc] AND EAX,0x100 CMP EAX,0x0 JNZ 0x001295a3 MOV RDI,qword ptr [RBP + -0x2e8] CALL 0x0012a7c0 CMP AL,0x0 JNZ 0x00129502 MOV RDI,qword ptr [RBP + -0x2e8] CALL 0x0012adc0 MOV qword ptr [RBP + -0x2f0],RAX CMP qword ptr [RBP + -0x2f0],0x0 JZ 0x00129500 MOV RDI,qword ptr [RBP + -0x2e8] MOV RSI,qword ptr [RBP + -0x2f0] CALL 0x0012ae00 LAB_00129500: JMP 0x00129502 LAB_00129502: MOV RDI,qword ptr [RBP + -0x2e8] CALL 0x0012a820 CMP AL,0x0 JNZ 0x0012954b MOV RDI,qword ptr [RBP + -0x2e8] MOV RSI,qword ptr [RBP + -0x2e0] CALL 0x0012ae80 MOV qword ptr [RBP + -0x2f8],RAX CMP qword ptr [RBP + -0x2f8],0x0 JZ 0x00129549 MOV RDI,qword ptr [RBP + -0x2e8] MOV RSI,qword ptr [RBP + -0x2f8] CALL 0x0012af90 LAB_00129549: JMP 0x0012954b LAB_0012954b: MOV RDI,qword ptr [RBP + -0x2e8] MOV RSI,qword ptr [RBP + -0x2d0] CALL 0x0012afd0 MOVSX EAX,AL CMP EAX,0x0 JNZ 0x00129581 MOV RDI,qword ptr [RBP + -0x2e8] MOV RSI,qword ptr [RBP + -0x2d0] CALL 0x0012b020 MOVSX EAX,AL CMP EAX,0x0 JZ 0x0012958e LAB_00129581: MOV qword ptr [RBP + -0x2e8],0x0 JMP 0x001295a1 LAB_0012958e: MOV RAX,qword ptr [RBP + -0x2e8] MOV ECX,dword ptr [RAX + 0xc] OR ECX,0x100 MOV dword ptr [RAX + 0xc],ECX LAB_001295a1: JMP 0x001295a3 LAB_001295a3: MOV EDI,dword ptr [RBP + -0x2d4] CALL 0x0012ad20 JMP 0x001295bb LAB_001295b0: MOV qword ptr [RBP + -0x2e8],0x0 LAB_001295bb: LEA RDI,[0x486468] CALL 0x0012b070 LAB_001295c7: MOV RAX,qword ptr [RBP + -0x2e8] MOV qword ptr [RBP + -0x2c8],RAX LAB_001295d5: MOV RAX,qword ptr [RBP + -0x2c8] MOV qword ptr [RBP + -0x300],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00129605 MOV RAX,qword ptr [RBP + -0x300] ADD RSP,0x300 POP RBP RET LAB_00129605: CALL 0x001242d0
long get_internal_charset(int8 param_1,uint param_2,int8 param_3) { char cVar1; int8 uVar2; long lVar3; long in_FS_OFFSET; long local_2f0; int1 local_2c8 [176]; int1 local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_2f0 = (&all_charsets)[param_2]; if (local_2f0 != 0) { if ((*(uint *)(local_2f0 + 0xc) & 0x100) == 0) { inline_mysql_mutex_lock (THR_LOCK_charset,"/workspace/llm4binary/github2025/eloqsql/mysys/charset.c",0x36b); if ((*(uint *)(local_2f0 + 0xc) & 9) == 0) { uVar2 = get_charsets_dir(local_218); strxmov(uVar2,*(int8 *)(local_2f0 + 0x10),".xml",0); my_charset_loader_init_mysys(local_2c8); my_read_charset_file(local_2c8,local_218,param_3); } if ((*(uint *)(local_2f0 + 0xc) & 0x200) == 0) { local_2f0 = 0; } else { if ((*(uint *)(local_2f0 + 0xc) & 0x100) == 0) { cVar1 = simple_8bit_charset_data_is_full(local_2f0); if ((cVar1 == '\0') && (lVar3 = find_charset_data_inheritance_source(local_2f0), lVar3 != 0)) { inherit_charset_data(local_2f0,lVar3); } cVar1 = simple_8bit_collation_data_is_full(local_2f0); if ((cVar1 == '\0') && (lVar3 = find_collation_data_inheritance_source(local_2f0,param_3), lVar3 != 0)) { inherit_collation_data(local_2f0,lVar3); } cVar1 = my_ci_init_charset(local_2f0,param_1); if ((cVar1 == '\0') && (cVar1 = my_ci_init_collation(local_2f0,param_1), cVar1 == '\0')) { *(uint *)(local_2f0 + 0xc) = *(uint *)(local_2f0 + 0xc) | 0x100; } else { local_2f0 = 0; } } my_collation_statistics_inc_use_count(param_2); } inline_mysql_mutex_unlock(THR_LOCK_charset); } else { my_collation_statistics_inc_use_count(param_2); } } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_2f0; }
23,466
rtree_add_key
eloqsql/storage/myisam/rt_key.c
int rtree_add_key(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key, uint key_length, uchar *page_buf, my_off_t *new_page) { uint page_size = mi_getint(page_buf); uint nod_flag = mi_test_if_nod(page_buf); DBUG_ENTER("rtree_add_key"); if (page_size + key_length + info->s->base.rec_reflength <= keyinfo->block_length) { /* split won't be necessary */ if (nod_flag) { /* save key */ DBUG_ASSERT(_mi_kpos(nod_flag, key) < info->state->key_file_length); memcpy(rt_PAGE_END(page_buf), key - nod_flag, key_length + nod_flag); page_size += key_length + nod_flag; } else { /* save key */ DBUG_ASSERT(_mi_dpos(info, nod_flag, key + key_length + info->s->base.rec_reflength) < info->state->data_file_length + info->s->base.pack_reclength); memcpy(rt_PAGE_END(page_buf), key, key_length + info->s->base.rec_reflength); page_size += key_length + info->s->base.rec_reflength; } mi_putint(page_buf, page_size, nod_flag); DBUG_RETURN(0); } DBUG_RETURN((rtree_split_page(info, keyinfo, page_buf, key, key_length, new_page) ? -1 : 1)); }
O3
c
rtree_add_key: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %r8, %rbx movl %ecx, %r14d movq %rdx, %rcx movq %rdi, %r15 movzbl 0x1(%r8), %eax movzbl (%r8), %edi movl %edi, %r12d andl $0x7f, %r12d shll $0x8, %r12d orl %eax, %r12d movq (%r15), %r8 testb %dil, %dil js 0x8c253 leal (%r12,%r14), %r10d movl 0x178(%r8), %edx addl %edx, %r10d movzwl 0xe(%rsi), %r8d cmpl %r8d, %r10d ja 0x8c26b andl $0x7f, %edi shll $0x8, %edi orq %rax, %rdi addq %rbx, %rdi addl %r14d, %edx movq %rcx, %rsi callq 0x29080 movq (%r15), %rax addl 0x178(%rax), %r14d xorl %eax, %eax jmp 0x8c2b4 movl 0x178(%r8), %edx leal (%r12,%r14), %r10d addl %edx, %r10d movzwl 0xe(%rsi), %r11d cmpl %r11d, %r10d jbe 0x8c286 movq %r15, %rdi movq %rbx, %rdx movl %r14d, %r8d callq 0x8f1bc movl %eax, %ecx xorl %eax, %eax negl %ecx sbbl %eax, %eax orl $0x1, %eax jmp 0x8c2c2 movl 0x17c(%r8), %esi testq %rsi, %rsi je 0x8c22e andl $0x7f, %edi shll $0x8, %edi orq %rax, %rdi addq %rbx, %rdi subq %rsi, %rcx addl %esi, %r14d movq %rcx, %rsi movq %r14, %rdx callq 0x29080 movl $0x8000, %eax # imm = 0x8000 addl %r12d, %r14d addl %r14d, %eax movb %r14b, 0x1(%rbx) movb %ah, (%rbx) xorl %eax, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
rtree_add_key: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, r8 mov r14d, ecx mov rcx, rdx mov r15, rdi movzx eax, byte ptr [r8+1] movzx edi, byte ptr [r8] mov r12d, edi and r12d, 7Fh shl r12d, 8 or r12d, eax mov r8, [r15] test dil, dil js short loc_8C253 lea r10d, [r12+r14] mov edx, [r8+178h] add r10d, edx movzx r8d, word ptr [rsi+0Eh] cmp r10d, r8d ja short loc_8C26B loc_8C22E: and edi, 7Fh shl edi, 8 or rdi, rax add rdi, rbx add edx, r14d mov rsi, rcx call _memcpy mov rax, [r15] add r14d, [rax+178h] xor eax, eax jmp short loc_8C2B4 loc_8C253: mov edx, [r8+178h] lea r10d, [r12+r14] add r10d, edx movzx r11d, word ptr [rsi+0Eh] cmp r10d, r11d jbe short loc_8C286 loc_8C26B: mov rdi, r15 mov rdx, rbx mov r8d, r14d call rtree_split_page mov ecx, eax xor eax, eax neg ecx sbb eax, eax or eax, 1 jmp short loc_8C2C2 loc_8C286: mov esi, [r8+17Ch] test rsi, rsi jz short loc_8C22E and edi, 7Fh shl edi, 8 or rdi, rax add rdi, rbx sub rcx, rsi add r14d, esi mov rsi, rcx mov rdx, r14 call _memcpy mov eax, 8000h loc_8C2B4: add r14d, r12d add eax, r14d mov [rbx+1], r14b mov [rbx], ah xor eax, eax loc_8C2C2: pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long rtree_add_key(long long *a1, long long a2, long long a3, unsigned int a4, char *a5) { long long v9; // rax char v10; // di int v11; // r12d long long v12; // r8 int v13; // edx long long v14; // r14 __int16 v15; // ax long long v17; // rsi __int16 v18; // r14 v9 = (unsigned __int8)a5[1]; v10 = *a5; v11 = v9 | ((*a5 & 0x7F) << 8); v12 = *a1; if ( v10 >= 0 ) { v13 = *(_DWORD *)(v12 + 376); if ( v13 + v11 + a4 <= *(unsigned __int16 *)(a2 + 14) ) goto LABEL_3; return (unsigned int)rtree_split_page(a1, a2, a5, a3, a4) != 0 ? -1 : 1; } v13 = *(_DWORD *)(v12 + 376); if ( v13 + v11 + a4 > *(unsigned __int16 *)(a2 + 14) ) return (unsigned int)rtree_split_page(a1, a2, a5, a3, a4) != 0 ? -1 : 1; v17 = *(unsigned int *)(v12 + 380); if ( *(_DWORD *)(v12 + 380) ) { v14 = (unsigned int)v17 + a4; memcpy(&a5[v9 | ((unsigned __int8)(v10 & 0x7F) << 8)], a3 - v17, v14); v15 = 0x8000; goto LABEL_8; } LABEL_3: memcpy(&a5[v9 | ((unsigned __int8)(v10 & 0x7F) << 8)], a3, a4 + v13); LODWORD(v14) = *(_DWORD *)(*a1 + 376) + a4; v15 = 0; LABEL_8: v18 = v11 + v14; a5[1] = v18; *a5 = (unsigned __int16)(v18 + v15) >> 8; return 0LL; }
rtree_add_key: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,R8 MOV R14D,ECX MOV RCX,RDX MOV R15,RDI MOVZX EAX,byte ptr [R8 + 0x1] MOVZX EDI,byte ptr [R8] MOV R12D,EDI AND R12D,0x7f SHL R12D,0x8 OR R12D,EAX MOV R8,qword ptr [R15] TEST DIL,DIL JS 0x0018c253 LEA R10D,[R12 + R14*0x1] MOV EDX,dword ptr [R8 + 0x178] ADD R10D,EDX MOVZX R8D,word ptr [RSI + 0xe] CMP R10D,R8D JA 0x0018c26b LAB_0018c22e: AND EDI,0x7f SHL EDI,0x8 OR RDI,RAX ADD RDI,RBX ADD EDX,R14D MOV RSI,RCX CALL 0x00129080 MOV RAX,qword ptr [R15] ADD R14D,dword ptr [RAX + 0x178] XOR EAX,EAX JMP 0x0018c2b4 LAB_0018c253: MOV EDX,dword ptr [R8 + 0x178] LEA R10D,[R12 + R14*0x1] ADD R10D,EDX MOVZX R11D,word ptr [RSI + 0xe] CMP R10D,R11D JBE 0x0018c286 LAB_0018c26b: MOV RDI,R15 MOV RDX,RBX MOV R8D,R14D CALL 0x0018f1bc MOV ECX,EAX XOR EAX,EAX NEG ECX SBB EAX,EAX OR EAX,0x1 JMP 0x0018c2c2 LAB_0018c286: MOV ESI,dword ptr [R8 + 0x17c] TEST RSI,RSI JZ 0x0018c22e AND EDI,0x7f SHL EDI,0x8 OR RDI,RAX ADD RDI,RBX SUB RCX,RSI ADD R14D,ESI MOV RSI,RCX MOV RDX,R14 CALL 0x00129080 MOV EAX,0x8000 LAB_0018c2b4: ADD R14D,R12D ADD EAX,R14D MOV byte ptr [RBX + 0x1],R14B MOV byte ptr [RBX],AH XOR EAX,EAX LAB_0018c2c2: POP RBX POP R12 POP R14 POP R15 POP RBP RET
uint rtree_add_key(long *param_1,long param_2,void *param_3,int param_4,byte *param_5) { byte bVar1; byte bVar2; uint uVar3; long lVar4; int iVar5; uint uVar6; uint uVar7; bVar1 = param_5[1]; bVar2 = *param_5; uVar6 = (bVar2 & 0x7f) << 8 | (uint)bVar1; lVar4 = *param_1; if ((char)bVar2 < '\0') { iVar5 = *(int *)(lVar4 + 0x178); if ((uint)*(ushort *)(param_2 + 0xe) < uVar6 + param_4 + iVar5) goto LAB_0018c26b; uVar3 = *(uint *)(lVar4 + 0x17c); if ((ulong)uVar3 != 0) { uVar7 = param_4 + uVar3; memcpy(param_5 + ((ulong)((bVar2 & 0x7f) << 8) | (ulong)bVar1), (void *)((long)param_3 - (ulong)uVar3),(ulong)uVar7); iVar5 = 0x8000; goto LAB_0018c2b4; } } else { iVar5 = *(int *)(lVar4 + 0x178); if ((uint)*(ushort *)(param_2 + 0xe) < uVar6 + param_4 + iVar5) { LAB_0018c26b: iVar5 = rtree_split_page(param_1,param_2,param_5,param_3,param_4); return -(uint)(iVar5 != 0) | 1; } } memcpy(param_5 + ((ulong)((bVar2 & 0x7f) << 8) | (ulong)bVar1),param_3, (ulong)(uint)(iVar5 + param_4)); uVar7 = param_4 + *(int *)(*param_1 + 0x178); iVar5 = 0; LAB_0018c2b4: param_5[1] = (byte)(uVar7 + uVar6); *param_5 = (byte)(iVar5 + uVar7 + uVar6 >> 8); return 0; }
23,467
my_rw_tryrdlock
eloqsql/mysys/thr_rwlock.c
int my_rw_tryrdlock(my_rw_lock_t *rwp) { int res; pthread_mutex_lock(&rwp->lock); if ((rwp->state < 0 ) || rwp->waiters) res= EBUSY; /* Can't get lock */ else { res=0; rwp->state++; } pthread_mutex_unlock(&rwp->lock); return(res); }
O3
c
my_rw_tryrdlock: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdi, %rbx callq 0x264d0 movl 0x88(%rbx), %eax movl $0x10, %r14d testl %eax, %eax js 0x49cfd cmpl $0x0, 0x8c(%rbx) jne 0x49cfd incl %eax movl %eax, 0x88(%rbx) xorl %r14d, %r14d movq %rbx, %rdi callq 0x26250 movl %r14d, %eax popq %rbx popq %r14 popq %rbp retq
my_rw_tryrdlock: push rbp mov rbp, rsp push r14 push rbx mov rbx, rdi call _pthread_mutex_lock mov eax, [rbx+88h] mov r14d, 10h test eax, eax js short loc_49CFD cmp dword ptr [rbx+8Ch], 0 jnz short loc_49CFD inc eax mov [rbx+88h], eax xor r14d, r14d loc_49CFD: mov rdi, rbx call _pthread_mutex_unlock mov eax, r14d pop rbx pop r14 pop rbp retn
long long my_rw_tryrdlock(long long a1) { int v1; // eax unsigned int v2; // r14d pthread_mutex_lock(a1); v1 = *(_DWORD *)(a1 + 136); v2 = 16; if ( v1 >= 0 && !*(_DWORD *)(a1 + 140) ) { *(_DWORD *)(a1 + 136) = v1 + 1; v2 = 0; } pthread_mutex_unlock(a1); return v2; }
my_rw_tryrdlock: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RDI CALL 0x001264d0 MOV EAX,dword ptr [RBX + 0x88] MOV R14D,0x10 TEST EAX,EAX JS 0x00149cfd CMP dword ptr [RBX + 0x8c],0x0 JNZ 0x00149cfd INC EAX MOV dword ptr [RBX + 0x88],EAX XOR R14D,R14D LAB_00149cfd: MOV RDI,RBX CALL 0x00126250 MOV EAX,R14D POP RBX POP R14 POP RBP RET
int8 my_rw_tryrdlock(pthread_mutex_t *param_1) { int8 uVar1; pthread_mutex_lock(param_1); uVar1 = 0x10; if ((-1 < *(int *)((long)param_1 + 0x88)) && (*(int *)((long)param_1 + 0x8c) == 0)) { *(int *)((long)param_1 + 0x88) = *(int *)((long)param_1 + 0x88) + 1; uVar1 = 0; } pthread_mutex_unlock(param_1); return uVar1; }
23,468
set_changed_storage
corpus-core[P]colibri-stateless/src/chains/eth/verifier/call_ctx.h
static void set_changed_storage(evmone_context_t* ctx, const address_t addr, const bytes32_t key, const bytes32_t value, bool* account_created, bool* storage_created) { changed_storage_t* storage = get_changed_storage(ctx, addr, key); if (storage) { memcpy(storage->value, value, 32); *account_created = false; *storage_created = false; } else { changed_account_t* account = create_changed_account(ctx, addr, account_created); *storage_created = true; changed_storage_t* storage = safe_calloc(1, sizeof(changed_storage_t)); memcpy(storage->key, key, 32); memcpy(storage->value, value, 32); storage->next = account->storage; account->storage = storage; } }
O0
c
set_changed_storage: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x2be30 movq %rax, -0x38(%rbp) cmpq $0x0, -0x38(%rbp) je 0x2c0e6 movq -0x38(%rbp), %rax movq -0x20(%rbp), %rcx movq (%rcx), %rdx movq %rdx, 0x20(%rax) movq 0x8(%rcx), %rdx movq %rdx, 0x28(%rax) movq 0x10(%rcx), %rdx movq %rdx, 0x30(%rax) movq 0x18(%rcx), %rcx movq %rcx, 0x38(%rax) movq -0x28(%rbp), %rax movb $0x0, (%rax) movq -0x30(%rbp), %rax movb $0x0, (%rax) jmp 0x2c17e movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x28(%rbp), %rdx callq 0x2c190 movq %rax, -0x40(%rbp) movq -0x30(%rbp), %rax movb $0x1, (%rax) movl $0x1, %edi movl $0x48, %esi callq 0x9c480 movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movq -0x18(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rdx movq %rdx, 0x8(%rax) movq 0x10(%rcx), %rdx movq %rdx, 0x10(%rax) movq 0x18(%rcx), %rcx movq %rcx, 0x18(%rax) movq -0x48(%rbp), %rax movq -0x20(%rbp), %rcx movq (%rcx), %rdx movq %rdx, 0x20(%rax) movq 0x8(%rcx), %rdx movq %rdx, 0x28(%rax) movq 0x10(%rcx), %rdx movq %rdx, 0x30(%rax) movq 0x18(%rcx), %rcx movq %rcx, 0x38(%rax) movq -0x40(%rbp), %rax movq 0x50(%rax), %rcx movq -0x48(%rbp), %rax movq %rcx, 0x40(%rax) movq -0x48(%rbp), %rcx movq -0x40(%rbp), %rax movq %rcx, 0x50(%rax) addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
set_changed_storage: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_30], r9 mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] call get_changed_storage mov [rbp+var_38], rax cmp [rbp+var_38], 0 jz short loc_2C0E6 mov rax, [rbp+var_38] mov rcx, [rbp+var_20] mov rdx, [rcx] mov [rax+20h], rdx mov rdx, [rcx+8] mov [rax+28h], rdx mov rdx, [rcx+10h] mov [rax+30h], rdx mov rcx, [rcx+18h] mov [rax+38h], rcx mov rax, [rbp+var_28] mov byte ptr [rax], 0 mov rax, [rbp+var_30] mov byte ptr [rax], 0 jmp loc_2C17E loc_2C0E6: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_28] call create_changed_account mov [rbp+var_40], rax mov rax, [rbp+var_30] mov byte ptr [rax], 1 mov edi, 1 mov esi, 48h ; 'H' call safe_calloc mov [rbp+var_48], rax mov rax, [rbp+var_48] mov rcx, [rbp+var_18] mov rdx, [rcx] mov [rax], rdx mov rdx, [rcx+8] mov [rax+8], rdx mov rdx, [rcx+10h] mov [rax+10h], rdx mov rcx, [rcx+18h] mov [rax+18h], rcx mov rax, [rbp+var_48] mov rcx, [rbp+var_20] mov rdx, [rcx] mov [rax+20h], rdx mov rdx, [rcx+8] mov [rax+28h], rdx mov rdx, [rcx+10h] mov [rax+30h], rdx mov rcx, [rcx+18h] mov [rax+38h], rcx mov rax, [rbp+var_40] mov rcx, [rax+50h] mov rax, [rbp+var_48] mov [rax+40h], rcx mov rcx, [rbp+var_48] mov rax, [rbp+var_40] mov [rax+50h], rcx loc_2C17E: add rsp, 50h pop rbp retn
_BYTE * set_changed_storage(long long a1, long long a2, _QWORD *a3, _QWORD *a4, _BYTE *a5, _BYTE *a6) { _BYTE *result; // rax _QWORD *v7; // [rsp+8h] [rbp-48h] long long changed_account; // [rsp+10h] [rbp-40h] _QWORD *changed_storage; // [rsp+18h] [rbp-38h] changed_storage = (_QWORD *)get_changed_storage(a1, a2, (long long)a3); if ( changed_storage ) { changed_storage[4] = *a4; changed_storage[5] = a4[1]; changed_storage[6] = a4[2]; changed_storage[7] = a4[3]; *a5 = 0; result = a6; *a6 = 0; } else { changed_account = create_changed_account(a1, a2, a5); *a6 = 1; v7 = (_QWORD *)safe_calloc(1LL, 72LL); *v7 = *a3; v7[1] = a3[1]; v7[2] = a3[2]; v7[3] = a3[3]; v7[4] = *a4; v7[5] = a4[1]; v7[6] = a4[2]; v7[7] = a4[3]; v7[8] = *(_QWORD *)(changed_account + 80); result = (_BYTE *)changed_account; *(_QWORD *)(changed_account + 80) = v7; } return result; }
set_changed_storage: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] CALL 0x0012be30 MOV qword ptr [RBP + -0x38],RAX CMP qword ptr [RBP + -0x38],0x0 JZ 0x0012c0e6 MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX + 0x20],RDX MOV RDX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x28],RDX MOV RDX,qword ptr [RCX + 0x10] MOV qword ptr [RAX + 0x30],RDX MOV RCX,qword ptr [RCX + 0x18] MOV qword ptr [RAX + 0x38],RCX MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX],0x0 JMP 0x0012c17e LAB_0012c0e6: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x28] CALL 0x0012c190 MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX],0x1 MOV EDI,0x1 MOV ESI,0x48 CALL 0x0019c480 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RDX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RDX MOV RDX,qword ptr [RCX + 0x10] MOV qword ptr [RAX + 0x10],RDX MOV RCX,qword ptr [RCX + 0x18] MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX + 0x20],RDX MOV RDX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x28],RDX MOV RDX,qword ptr [RCX + 0x10] MOV qword ptr [RAX + 0x30],RDX MOV RCX,qword ptr [RCX + 0x18] MOV qword ptr [RAX + 0x38],RCX MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RAX + 0x50] MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RAX + 0x40],RCX MOV RCX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RAX + 0x50],RCX LAB_0012c17e: ADD RSP,0x50 POP RBP RET
void set_changed_storage(int8 param_1,int8 param_2,int8 *param_3, int8 *param_4,int1 *param_5,int1 *param_6) { long lVar1; int8 *puVar2; lVar1 = get_changed_storage(param_1,param_2,param_3); if (lVar1 == 0) { lVar1 = create_changed_account(param_1,param_2,param_5); *param_6 = 1; puVar2 = (int8 *)safe_calloc(1,0x48); *puVar2 = *param_3; puVar2[1] = param_3[1]; puVar2[2] = param_3[2]; puVar2[3] = param_3[3]; puVar2[4] = *param_4; puVar2[5] = param_4[1]; puVar2[6] = param_4[2]; puVar2[7] = param_4[3]; puVar2[8] = *(int8 *)(lVar1 + 0x50); *(int8 **)(lVar1 + 0x50) = puVar2; } else { *(int8 *)(lVar1 + 0x20) = *param_4; *(int8 *)(lVar1 + 0x28) = param_4[1]; *(int8 *)(lVar1 + 0x30) = param_4[2]; *(int8 *)(lVar1 + 0x38) = param_4[3]; *param_5 = 0; *param_6 = 0; } return; }
23,469
set_changed_storage
corpus-core[P]colibri-stateless/src/chains/eth/verifier/call_ctx.h
static void set_changed_storage(evmone_context_t* ctx, const address_t addr, const bytes32_t key, const bytes32_t value, bool* account_created, bool* storage_created) { changed_storage_t* storage = get_changed_storage(ctx, addr, key); if (storage) { memcpy(storage->value, value, 32); *account_created = false; *storage_created = false; } else { changed_account_t* account = create_changed_account(ctx, addr, account_created); *storage_created = true; changed_storage_t* storage = safe_calloc(1, sizeof(changed_storage_t)); memcpy(storage->key, key, 32); memcpy(storage->value, value, 32); storage->next = account->storage; account->storage = storage; } }
O3
c
set_changed_storage: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r9, %r14 movq %r8, %r12 movq %rcx, %rbx movq %rdx, %r15 movq %rsi, %r13 movq %rdi, %rbp callq 0x27e66 testq %rax, %rax je 0x27ef5 movups (%rbx), %xmm0 movups 0x10(%rbx), %xmm1 movups %xmm1, 0x30(%rax) movups %xmm0, 0x20(%rax) xorl %eax, %eax movb %al, (%r12) movb %al, (%r14) jmp 0x27f46 movq %rbp, %rdi movq %r13, %rsi movq %r12, %rdx callq 0x27f55 movq %rax, %r12 movb $0x1, (%r14) movl $0x1, %edi movl $0x48, %esi callq 0x50eef movups (%r15), %xmm0 movups 0x10(%r15), %xmm1 movups %xmm1, 0x10(%rax) movups %xmm0, (%rax) movups (%rbx), %xmm0 movups 0x10(%rbx), %xmm1 movups %xmm0, 0x20(%rax) movups %xmm1, 0x30(%rax) movq 0x50(%r12), %rcx movq %rcx, 0x40(%rax) movq %rax, 0x50(%r12) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
set_changed_storage: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14, r9 mov r12, r8 mov rbx, rcx mov r15, rdx mov r13, rsi mov rbp, rdi call get_changed_storage test rax, rax jz short loc_27EF5 movups xmm0, xmmword ptr [rbx] movups xmm1, xmmword ptr [rbx+10h] movups xmmword ptr [rax+30h], xmm1 movups xmmword ptr [rax+20h], xmm0 xor eax, eax mov [r12], al mov [r14], al jmp short loc_27F46 loc_27EF5: mov rdi, rbp mov rsi, r13 mov rdx, r12 call create_changed_account mov r12, rax mov byte ptr [r14], 1 mov edi, 1 mov esi, 48h ; 'H' call safe_calloc movups xmm0, xmmword ptr [r15] movups xmm1, xmmword ptr [r15+10h] movups xmmword ptr [rax+10h], xmm1 movups xmmword ptr [rax], xmm0 movups xmm0, xmmword ptr [rbx] movups xmm1, xmmword ptr [rbx+10h] movups xmmword ptr [rax+20h], xmm0 movups xmmword ptr [rax+30h], xmm1 mov rcx, [r12+50h] mov [rax+40h], rcx mov [r12+50h], rax loc_27F46: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long set_changed_storage( long long a1, const __m128i *a2, long long a3, const __m128i *a4, _BYTE *a5, _BYTE *a6) { const __m128i *changed_storage; // rax __m128i v11; // xmm0 long long result; // rax long long changed_account; // r12 __m128i v14; // xmm0 __m128i v15; // xmm1 changed_storage = get_changed_storage(a1, a2, (const __m128i *)a3); if ( changed_storage ) { v11 = *a4; changed_storage[3] = a4[1]; changed_storage[2] = v11; result = 0LL; *a5 = 0; *a6 = 0; } else { changed_account = create_changed_account(a1, a2, a5); *a6 = 1; result = safe_calloc(1LL, 72LL); v14 = *(__m128i *)a3; *(_OWORD *)(result + 16) = *(_OWORD *)(a3 + 16); *(__m128i *)result = v14; v15 = a4[1]; *(__m128i *)(result + 32) = *a4; *(__m128i *)(result + 48) = v15; *(_QWORD *)(result + 64) = *(_QWORD *)(changed_account + 80); *(_QWORD *)(changed_account + 80) = result; } return result; }
set_changed_storage: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,R9 MOV R12,R8 MOV RBX,RCX MOV R15,RDX MOV R13,RSI MOV RBP,RDI CALL 0x00127e66 TEST RAX,RAX JZ 0x00127ef5 MOVUPS XMM0,xmmword ptr [RBX] MOVUPS XMM1,xmmword ptr [RBX + 0x10] MOVUPS xmmword ptr [RAX + 0x30],XMM1 MOVUPS xmmword ptr [RAX + 0x20],XMM0 XOR EAX,EAX MOV byte ptr [R12],AL MOV byte ptr [R14],AL JMP 0x00127f46 LAB_00127ef5: MOV RDI,RBP MOV RSI,R13 MOV RDX,R12 CALL 0x00127f55 MOV R12,RAX MOV byte ptr [R14],0x1 MOV EDI,0x1 MOV ESI,0x48 CALL 0x00150eef MOVUPS XMM0,xmmword ptr [R15] MOVUPS XMM1,xmmword ptr [R15 + 0x10] MOVUPS xmmword ptr [RAX + 0x10],XMM1 MOVUPS xmmword ptr [RAX],XMM0 MOVUPS XMM0,xmmword ptr [RBX] MOVUPS XMM1,xmmword ptr [RBX + 0x10] MOVUPS xmmword ptr [RAX + 0x20],XMM0 MOVUPS xmmword ptr [RAX + 0x30],XMM1 MOV RCX,qword ptr [R12 + 0x50] MOV qword ptr [RAX + 0x40],RCX MOV qword ptr [R12 + 0x50],RAX LAB_00127f46: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void set_changed_storage(int8 param_1,int8 param_2,int8 *param_3, int8 *param_4,int1 *param_5,int1 *param_6) { int8 uVar1; int8 uVar2; int8 uVar3; long lVar4; int8 *puVar5; lVar4 = get_changed_storage(); if (lVar4 == 0) { lVar4 = create_changed_account(param_1,param_2,param_5); *param_6 = 1; puVar5 = (int8 *)safe_calloc(1,0x48); uVar1 = *param_3; uVar2 = param_3[1]; uVar3 = param_3[3]; puVar5[2] = param_3[2]; puVar5[3] = uVar3; *puVar5 = uVar1; puVar5[1] = uVar2; uVar1 = param_4[1]; uVar2 = param_4[2]; uVar3 = param_4[3]; puVar5[4] = *param_4; puVar5[5] = uVar1; puVar5[6] = uVar2; puVar5[7] = uVar3; puVar5[8] = *(int8 *)(lVar4 + 0x50); *(int8 **)(lVar4 + 0x50) = puVar5; } else { uVar1 = *param_4; uVar2 = param_4[1]; uVar3 = param_4[3]; *(int8 *)(lVar4 + 0x30) = param_4[2]; *(int8 *)(lVar4 + 0x38) = uVar3; *(int8 *)(lVar4 + 0x20) = uVar1; *(int8 *)(lVar4 + 0x28) = uVar2; *param_5 = 0; *param_6 = 0; } return; }
23,470
js_async_generator_mark
bluesky950520[P]quickjs/quickjs.c
static void js_async_generator_mark(JSRuntime *rt, JSValue val, JS_MarkFunc *mark_func) { JSAsyncGeneratorData *s = JS_GetOpaque(val, JS_CLASS_ASYNC_GENERATOR); struct list_head *el; JSAsyncGeneratorRequest *req; if (s) { list_for_each(el, &s->queue) { req = list_entry(el, JSAsyncGeneratorRequest, link); JS_MarkValue(rt, req->result, mark_func); JS_MarkValue(rt, req->promise, mark_func); JS_MarkValue(rt, req->resolving_funcs[0], mark_func); JS_MarkValue(rt, req->resolving_funcs[1], mark_func); } if (s->state != JS_ASYNC_GENERATOR_STATE_COMPLETED && s->state != JS_ASYNC_GENERATOR_STATE_AWAITING_RETURN) { async_func_mark(rt, &s->func_state, mark_func); } } }
O2
c
js_async_generator_mark: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax cmpl $-0x1, %edx jne 0x46f27 cmpw $0x39, 0x6(%rsi) jne 0x46f27 movq 0x30(%rsi), %r15 testq %r15, %r15 je 0x46f27 movq %rcx, %rbx movq %rdi, %r14 movl $0xfffffffe, %r12d # imm = 0xFFFFFFFE leaq 0x78(%r15), %r13 leaq 0x80(%r15), %rbp movq (%rbp), %rbp cmpq %r13, %rbp je 0x46f1b movl 0x20(%rbp), %eax andl $-0x2, %eax cmpl %r12d, %eax jne 0x46ed9 movq 0x18(%rbp), %rsi movq %r14, %rdi callq *%rbx movl 0x30(%rbp), %eax andl $-0x2, %eax cmpl %r12d, %eax jne 0x46eed movq 0x28(%rbp), %rsi movq %r14, %rdi callq *%rbx movl 0x40(%rbp), %eax andl $-0x2, %eax cmpl %r12d, %eax jne 0x46f01 movq 0x38(%rbp), %rsi movq %r14, %rdi callq *%rbx movl 0x50(%rbp), %eax andl $-0x2, %eax cmpl %r12d, %eax jne 0x46f15 movq 0x48(%rbp), %rsi movq %r14, %rdi callq *%rbx addq $0x8, %rbp jmp 0x46ebc movl 0x8(%r15), %eax andl $-0x2, %eax cmpl $0x4, %eax jne 0x46f36 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq addq $0x10, %r15 movq %r14, %rdi movq %r15, %rsi movq %rbx, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x3435e
js_async_generator_mark: push rbp push r15 push r14 push r13 push r12 push rbx push rax cmp edx, 0FFFFFFFFh jnz loc_46F27 cmp word ptr [rsi+6], 39h ; '9' jnz loc_46F27 mov r15, [rsi+30h] test r15, r15 jz loc_46F27 mov rbx, rcx mov r14, rdi mov r12d, 0FFFFFFFEh lea r13, [r15+78h] lea rbp, [r15+80h] loc_46EBC: mov rbp, [rbp+0] cmp rbp, r13 jz short loc_46F1B mov eax, [rbp+20h] and eax, 0FFFFFFFEh cmp eax, r12d jnz short loc_46ED9 mov rsi, [rbp+18h] mov rdi, r14 call rbx loc_46ED9: mov eax, [rbp+30h] and eax, 0FFFFFFFEh cmp eax, r12d jnz short loc_46EED mov rsi, [rbp+28h] mov rdi, r14 call rbx loc_46EED: mov eax, [rbp+40h] and eax, 0FFFFFFFEh cmp eax, r12d jnz short loc_46F01 mov rsi, [rbp+38h] mov rdi, r14 call rbx loc_46F01: mov eax, [rbp+50h] and eax, 0FFFFFFFEh cmp eax, r12d jnz short loc_46F15 mov rsi, [rbp+48h] mov rdi, r14 call rbx loc_46F15: add rbp, 8 jmp short loc_46EBC loc_46F1B: mov eax, [r15+8] and eax, 0FFFFFFFEh cmp eax, 4 jnz short loc_46F36 loc_46F27: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_46F36: add r15, 10h mov rdi, r14 mov rsi, r15 mov rdx, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp async_func_mark
unsigned long long js_async_generator_mark( long long a1, long long a2, int a3, void ( *a4)(long long, _QWORD)) { long long v4; // r15 long long *i; // rbp long long v7; // rbp unsigned long long result; // rax if ( a3 == -1 && *(_WORD *)(a2 + 6) == 57 ) { v4 = *(_QWORD *)(a2 + 48); if ( v4 ) { for ( i = (long long *)(v4 + 128); ; i = (long long *)(v7 + 8) ) { v7 = *i; if ( v7 == v4 + 120 ) break; if ( (*(_DWORD *)(v7 + 32) & 0xFFFFFFFE) == 0xFFFFFFFE ) a4(a1, *(_QWORD *)(v7 + 24)); if ( (*(_DWORD *)(v7 + 48) & 0xFFFFFFFE) == 0xFFFFFFFE ) a4(a1, *(_QWORD *)(v7 + 40)); if ( (*(_DWORD *)(v7 + 64) & 0xFFFFFFFE) == 0xFFFFFFFE ) a4(a1, *(_QWORD *)(v7 + 56)); if ( (*(_DWORD *)(v7 + 80) & 0xFFFFFFFE) == 0xFFFFFFFE ) a4(a1, *(_QWORD *)(v7 + 72)); } result = *(_DWORD *)(v4 + 8) & 0xFFFFFFFE; if ( (_DWORD)result != 4 ) return async_func_mark(a1, v4 + 16, a4); } } return result; }
js_async_generator_mark: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX CMP EDX,-0x1 JNZ 0x00146f27 CMP word ptr [RSI + 0x6],0x39 JNZ 0x00146f27 MOV R15,qword ptr [RSI + 0x30] TEST R15,R15 JZ 0x00146f27 MOV RBX,RCX MOV R14,RDI MOV R12D,0xfffffffe LEA R13,[R15 + 0x78] LEA RBP,[R15 + 0x80] LAB_00146ebc: MOV RBP,qword ptr [RBP] CMP RBP,R13 JZ 0x00146f1b MOV EAX,dword ptr [RBP + 0x20] AND EAX,0xfffffffe CMP EAX,R12D JNZ 0x00146ed9 MOV RSI,qword ptr [RBP + 0x18] MOV RDI,R14 CALL RBX LAB_00146ed9: MOV EAX,dword ptr [RBP + 0x30] AND EAX,0xfffffffe CMP EAX,R12D JNZ 0x00146eed MOV RSI,qword ptr [RBP + 0x28] MOV RDI,R14 CALL RBX LAB_00146eed: MOV EAX,dword ptr [RBP + 0x40] AND EAX,0xfffffffe CMP EAX,R12D JNZ 0x00146f01 MOV RSI,qword ptr [RBP + 0x38] MOV RDI,R14 CALL RBX LAB_00146f01: MOV EAX,dword ptr [RBP + 0x50] AND EAX,0xfffffffe CMP EAX,R12D JNZ 0x00146f15 MOV RSI,qword ptr [RBP + 0x48] MOV RDI,R14 CALL RBX LAB_00146f15: ADD RBP,0x8 JMP 0x00146ebc LAB_00146f1b: MOV EAX,dword ptr [R15 + 0x8] AND EAX,0xfffffffe CMP EAX,0x4 JNZ 0x00146f36 LAB_00146f27: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00146f36: ADD R15,0x10 MOV RDI,R14 MOV RSI,R15 MOV RDX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0013435e
void js_async_generator_mark(int8 param_1,long param_2,int param_3,code *param_4) { long lVar1; long lVar2; long *plVar3; if (((param_3 == -1) && (*(short *)(param_2 + 6) == 0x39)) && (lVar1 = *(long *)(param_2 + 0x30), lVar1 != 0)) { plVar3 = (long *)(lVar1 + 0x80); while (lVar2 = *plVar3, lVar2 != lVar1 + 0x78) { if ((*(uint *)(lVar2 + 0x20) & 0xfffffffe) == 0xfffffffe) { (*param_4)(param_1,*(int8 *)(lVar2 + 0x18)); } if ((*(uint *)(lVar2 + 0x30) & 0xfffffffe) == 0xfffffffe) { (*param_4)(param_1,*(int8 *)(lVar2 + 0x28)); } if ((*(uint *)(lVar2 + 0x40) & 0xfffffffe) == 0xfffffffe) { (*param_4)(param_1,*(int8 *)(lVar2 + 0x38)); } if ((*(uint *)(lVar2 + 0x50) & 0xfffffffe) == 0xfffffffe) { (*param_4)(param_1,*(int8 *)(lVar2 + 0x48)); } plVar3 = (long *)(lVar2 + 8); } if ((*(uint *)(lVar1 + 8) & 0xfffffffe) != 4) { async_func_mark(param_1,lVar1 + 0x10,param_4); return; } } return; }
23,471
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/json.hpp
std::string exception_message(const token_type expected, const std::string& context) { std::string error_msg = "syntax error "; if (!context.empty()) { error_msg += concat("while parsing ", context, ' '); } error_msg += "- "; if (last_token == token_type::parse_error) { error_msg += concat(m_lexer.get_error_message(), "; last read: '", m_lexer.get_token_string(), '\''); } else { error_msg += concat("unexpected ", lexer_t::token_type_name(last_token)); } if (expected != token_type::uninitialized) { error_msg += concat("; expected ", lexer_t::token_type_name(expected)); } return error_msg; }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x58, %rsp movq %rcx, %r15 movl %edx, %ebp movq %rsi, %r14 movq %rdi, %rbx leaq 0x4be43(%rip), %rsi # 0x90e29 leaq 0x10(%rsp), %rdx callq 0x2336c cmpq $0x0, 0x8(%r15) je 0x4502a leaq 0x38(%rsp), %rcx movb $0x20, (%rcx) leaq 0x4be31(%rip), %rsi # 0x90e37 leaq 0x10(%rsp), %rdi movq %r15, %rdx callq 0x49319 leaq 0x10(%rsp), %rsi movq %rbx, %rdi callq 0x20d70 leaq 0x10(%rsp), %rdi callq 0x20de8 leaq 0x4be15(%rip), %rsi # 0x90e46 movq %rbx, %rdi callq 0x20d20 movl 0x20(%r14), %edi cmpl $0xe, %edi jne 0x450a1 movq 0x98(%r14), %rax addq $0x28, %r14 movq %rax, 0x30(%rsp) leaq 0x38(%rsp), %rdi movq %r14, %rsi callq 0x44dec leaq 0xf(%rsp), %r8 movb $0x27, (%r8) leaq 0x4bdda(%rip), %rdx # 0x90e49 leaq 0x10(%rsp), %rdi leaq 0x30(%rsp), %rsi leaq 0x38(%rsp), %rcx callq 0x49389 leaq 0x10(%rsp), %rsi movq %rbx, %rdi callq 0x20d70 leaq 0x10(%rsp), %rdi callq 0x20de8 leaq 0x38(%rsp), %rdi jmp 0x450d1 callq 0x49460 leaq 0x38(%rsp), %rdx movq %rax, (%rdx) leaq 0x4bda3(%rip), %rsi # 0x90e58 leaq 0x10(%rsp), %rdi callq 0x49401 leaq 0x10(%rsp), %rsi movq %rbx, %rdi callq 0x20d70 leaq 0x10(%rsp), %rdi callq 0x20de8 testl %ebp, %ebp je 0x45111 movl %ebp, %edi callq 0x49460 leaq 0x38(%rsp), %rdx movq %rax, (%rdx) leaq 0x4bd74(%rip), %rsi # 0x90e64 leaq 0x10(%rsp), %rdi callq 0x49401 leaq 0x10(%rsp), %rsi movq %rbx, %rdi callq 0x20d70 leaq 0x10(%rsp), %rdi callq 0x20de8 movq %rbx, %rax addq $0x58, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x20de8 jmp 0x45133 jmp 0x45142 movq %rax, %r14 leaq 0x38(%rsp), %rdi jmp 0x4514a jmp 0x45153 jmp 0x45153 jmp 0x45142 jmp 0x45153 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x20de8 jmp 0x45156 jmp 0x45153 movq %rax, %r14 movq %rbx, %rdi callq 0x20de8 movq %r14, %rdi callq 0x20bf0
_ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE17exception_messageENS1_10lexer_baseISF_E10token_typeERKSB_: push rbp push r15 push r14 push rbx sub rsp, 58h mov r15, rcx mov ebp, edx mov r14, rsi mov rbx, rdi lea rsi, aSyntaxError; "syntax error " lea rdx, [rsp+78h+var_68] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) cmp qword ptr [r15+8], 0 jz short loc_4502A lea rcx, [rsp+78h+var_40] mov byte ptr [rcx], 20h ; ' ' lea rsi, aWhileParsing; "while parsing " lea rdi, [rsp+78h+var_68] mov rdx, r15 call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA15_KcRKS8_cEEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[15],std::string const&,char>(char const(&)[15],std::string const&,char &&) lea rsi, [rsp+78h+var_68] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&) lea rdi, [rsp+78h+var_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_4502A: lea rsi, asc_90E46; "- " mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov edi, [r14+20h] cmp edi, 0Eh jnz short loc_450A1 mov rax, [r14+98h] add r14, 28h ; '(' mov [rsp+78h+var_48], rax lea rdi, [rsp+78h+var_40] mov rsi, r14 call _ZNK8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE16get_token_stringEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_token_string(void) lea r8, [rsp+78h+var_69] mov byte ptr [r8], 27h ; ''' lea rdx, aLastRead; "; last read: '" lea rdi, [rsp+78h+var_68] lea rsi, [rsp+78h+var_48] lea rcx, [rsp+78h+var_40] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKcRA15_S9_S8_cEEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const*,char const(&)[15],std::string,char>(char const*,char const(&)[15],std::string,char &&) lea rsi, [rsp+78h+var_68] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&) lea rdi, [rsp+78h+var_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+78h+var_40] jmp short loc_450D1 loc_450A1: call _ZN8nlohmann16json_abi_v3_11_36detail10lexer_baseINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15token_type_nameENSG_10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type) lea rdx, [rsp+78h+var_40] mov [rdx], rax lea rsi, aUnexpected; "unexpected " lea rdi, [rsp+78h+var_68] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA12_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>(char const(&)[12],char const* &&) lea rsi, [rsp+78h+var_68] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&) lea rdi, [rsp+78h+var_68]; void * loc_450D1: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test ebp, ebp jz short loc_45111 mov edi, ebp call _ZN8nlohmann16json_abi_v3_11_36detail10lexer_baseINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15token_type_nameENSG_10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type) lea rdx, [rsp+78h+var_40] mov [rdx], rax lea rsi, aExpected; "; expected " lea rdi, [rsp+78h+var_68] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA12_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>(char const(&)[12],char const* &&) lea rsi, [rsp+78h+var_68] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&) lea rdi, [rsp+78h+var_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_45111: mov rax, rbx add rsp, 58h pop rbx pop r14 pop r15 pop rbp retn mov r14, rax lea rdi, [rsp+arg_8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_45133 jmp short loc_45142 mov r14, rax loc_45133: lea rdi, [rsp+arg_30] jmp short loc_4514A jmp short loc_45153 jmp short loc_45153 jmp short loc_45142 jmp short loc_45153 loc_45142: mov r14, rax lea rdi, [rsp+arg_8]; void * loc_4514A: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_45156 jmp short $+2 loc_45153: mov r14, rax loc_45156: mov rdi, rbx; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r14 call __Unwind_Resume
_QWORD * nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::exception_message( _QWORD *a1, long long a2, unsigned int a3, long long a4) { _BYTE *v7; // rdi char v9; // [rsp+Fh] [rbp-69h] BYREF _BYTE v10[32]; // [rsp+10h] [rbp-68h] BYREF long long v11; // [rsp+30h] [rbp-48h] BYREF _QWORD v12[8]; // [rsp+38h] [rbp-40h] BYREF std::string::basic_string<std::allocator<char>>(a1, (long long)"syntax error "); if ( *(_QWORD *)(a4 + 8) ) { LOBYTE(v12[0]) = 32; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[15],std::string const&,char>( v10, "while parsing ", a4, v12); std::string::append(a1, v10); std::string::~string(v10); } std::string::append(a1, "- "); if ( *(_DWORD *)(a2 + 32) == 14 ) { v11 = *(_QWORD *)(a2 + 152); nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_token_string( (long long)v12, a2 + 40); v9 = 39; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const*,char const(&)[15],std::string,char>( v10, &v11, "; last read: '", v12, &v9); std::string::append(a1, v10); std::string::~string(v10); v7 = v12; } else { v12[0] = ((long long (*)(void))nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type_name)(); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>(v10, "unexpected "); std::string::append(a1, v10); v7 = v10; } std::string::~string(v7); if ( a3 ) { v12[0] = nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type_name(a3); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>(v10, "; expected "); std::string::append(a1, v10); std::string::~string(v10); } return a1; }
exception_message: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x58 MOV R15,RCX MOV EBP,EDX MOV R14,RSI MOV RBX,RDI LEA RSI,[0x190e29] LEA RDX,[RSP + 0x10] CALL 0x0012336c CMP qword ptr [R15 + 0x8],0x0 JZ 0x0014502a LEA RCX,[RSP + 0x38] MOV byte ptr [RCX],0x20 LAB_00144fff: LEA RSI,[0x190e37] LEA RDI,[RSP + 0x10] MOV RDX,R15 CALL 0x00149319 LAB_00145013: LEA RSI,[RSP + 0x10] MOV RDI,RBX CALL 0x00120d70 LEA RDI,[RSP + 0x10] CALL 0x00120de8 LAB_0014502a: LEA RSI,[0x190e46] MOV RDI,RBX CALL 0x00120d20 MOV EDI,dword ptr [R14 + 0x20] CMP EDI,0xe JNZ 0x001450a1 MOV RAX,qword ptr [R14 + 0x98] ADD R14,0x28 MOV qword ptr [RSP + 0x30],RAX LAB_00145052: LEA RDI,[RSP + 0x38] MOV RSI,R14 CALL 0x00144dec LEA R8,[RSP + 0xf] MOV byte ptr [R8],0x27 LAB_00145068: LEA RDX,[0x190e49] LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x30] LEA RCX,[RSP + 0x38] CALL 0x00149389 LAB_00145083: LEA RSI,[RSP + 0x10] MOV RDI,RBX CALL 0x00120d70 LEA RDI,[RSP + 0x10] CALL 0x00120de8 LEA RDI,[RSP + 0x38] JMP 0x001450d1 LAB_001450a1: CALL 0x00149460 LEA RDX,[RSP + 0x38] MOV qword ptr [RDX],RAX LAB_001450ae: LEA RSI,[0x190e58] LEA RDI,[RSP + 0x10] CALL 0x00149401 LAB_001450bf: LEA RSI,[RSP + 0x10] MOV RDI,RBX CALL 0x00120d70 LEA RDI,[RSP + 0x10] LAB_001450d1: CALL 0x00120de8 TEST EBP,EBP JZ 0x00145111 MOV EDI,EBP CALL 0x00149460 LEA RDX,[RSP + 0x38] MOV qword ptr [RDX],RAX LAB_001450e9: LEA RSI,[0x190e64] LEA RDI,[RSP + 0x10] CALL 0x00149401 LAB_001450fa: LEA RSI,[RSP + 0x10] MOV RDI,RBX CALL 0x00120d70 LAB_00145107: LEA RDI,[RSP + 0x10] CALL 0x00120de8 LAB_00145111: MOV RAX,RBX ADD RSP,0x58 POP RBX POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<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> >::token_type, std::__cxx11::string const&) */ string * nlohmann::json_abi_v3_11_3::detail:: parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::exception_message(string *param_1,long param_2,int param_3,string *param_4) { string *this; char local_69; allocator local_68 [32]; char *local_48; char *local_40 [4]; std::__cxx11::string::string<std::allocator<char>>(param_1,"syntax error ",local_68); if (*(long *)(param_4 + 8) != 0) { local_40[0] = (char *)CONCAT71(local_40[0]._1_7_,0x20); /* try { // try from 00144fff to 00145012 has its CatchHandler @ 00145151 */ concat<std::__cxx11::string,char_const(&)[15],std::__cxx11::string_const&,char> ((detail *)local_68,"while parsing ",param_4,(char *)local_40); /* try { // try from 00145013 to 0014501f has its CatchHandler @ 00145142 */ std::__cxx11::string::append(param_1); std::__cxx11::string::~string((string *)local_68); } /* try { // try from 0014502a to 00145038 has its CatchHandler @ 00145153 */ std::__cxx11::string::append((char *)param_1); if (*(int *)(param_2 + 0x20) == 0xe) { local_48 = *(char **)(param_2 + 0x98); /* try { // try from 00145052 to 0014505e has its CatchHandler @ 0014513c */ lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::get_token_string(); local_69 = '\''; /* try { // try from 00145068 to 00145082 has its CatchHandler @ 00145130 */ concat<std::__cxx11::string,char_const*,char_const(&)[15],std::__cxx11::string,char> ((detail *)local_68,&local_48,"; last read: \'",(string *)local_40,&local_69); /* try { // try from 00145083 to 0014508f has its CatchHandler @ 0014511f */ std::__cxx11::string::append(param_1); std::__cxx11::string::~string((string *)local_68); this = (string *)local_40; } else { local_40[0] = (char *)lexer_base<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>> ::token_type_name(); /* try { // try from 001450ae to 001450be has its CatchHandler @ 0014513a */ concat<std::__cxx11::string,char_const(&)[12],char_const*> ((detail *)local_68,"unexpected ",local_40); /* try { // try from 001450bf to 001450cb has its CatchHandler @ 0014512e */ std::__cxx11::string::append(param_1); this = (string *)local_68; } std::__cxx11::string::~string(this); if (param_3 != 0) { local_40[0] = (char *)lexer_base<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>> ::token_type_name(param_3); /* try { // try from 001450e9 to 001450f9 has its CatchHandler @ 00145140 */ concat<std::__cxx11::string,char_const(&)[12],char_const*> ((detail *)local_68,"; expected ",local_40); /* try { // try from 001450fa to 00145106 has its CatchHandler @ 0014513e */ std::__cxx11::string::append(param_1); std::__cxx11::string::~string((string *)local_68); } return param_1; }
23,472
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/json.hpp
std::string exception_message(const token_type expected, const std::string& context) { std::string error_msg = "syntax error "; if (!context.empty()) { error_msg += concat("while parsing ", context, ' '); } error_msg += "- "; if (last_token == token_type::parse_error) { error_msg += concat(m_lexer.get_error_message(), "; last read: '", m_lexer.get_token_string(), '\''); } else { error_msg += concat("unexpected ", lexer_t::token_type_name(last_token)); } if (expected != token_type::uninitialized) { error_msg += concat("; expected ", lexer_t::token_type_name(expected)); } return error_msg; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type, 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 $0x58, %rsp movq %rcx, %r15 movl %edx, %ebp movq %rsi, %r14 movq %rdi, %rbx leaq 0x10(%rdi), %r12 movq %r12, (%rdi) leaq 0x63f37(%rip), %rsi # 0xabe4a leaq 0x63f3d(%rip), %rdx # 0xabe57 callq 0x1ded4 movq 0x8(%r15), %rsi testq %rsi, %rsi je 0x47fa6 leaq 0x18(%rsp), %r13 movq %r13, -0x10(%r13) movq $0x0, -0x8(%r13) movb $0x0, (%r13) addq $0xf, %rsi leaq 0x8(%rsp), %rdi callq 0x18a50 leaq 0x63f05(%rip), %rsi # 0xabe58 leaq 0x8(%rsp), %rdi callq 0x18ce0 movq (%r15), %rsi movq 0x8(%r15), %rdx leaq 0x8(%rsp), %rdi callq 0x181d0 leaq 0x8(%rsp), %rdi movl $0x20, %esi callq 0x18590 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq %rbx, %rdi callq 0x181d0 movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x47fa6 movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 leaq 0x63eba(%rip), %rsi # 0xabe67 movq %rbx, %rdi callq 0x18ce0 movl 0x20(%r14), %edi cmpl $0xe, %edi jne 0x48049 movq 0x98(%r14), %rax addq $0x28, %r14 movq %rax, 0x30(%rsp) leaq 0x38(%rsp), %rdi movq %r14, %rsi callq 0x47c30 leaq 0x2f(%rsp), %r8 movb $0x27, (%r8) leaq 0x63e7b(%rip), %rdx # 0xabe6a leaq 0x8(%rsp), %rdi leaq 0x30(%rsp), %rsi leaq 0x38(%rsp), %rcx callq 0x4d4ca movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq %rbx, %rdi callq 0x181d0 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x48030 movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 leaq 0x48(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x480c3 movq 0x48(%rsp), %rsi jmp 0x480bb callq 0x4d58c movq %rax, %r14 leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) movq $0x0, -0x8(%r15) movb $0x0, (%r15) movq %rax, %rdi callq 0x18300 leaq 0xb(%rax), %rsi leaq 0x8(%rsp), %rdi callq 0x18a50 leaq 0x63df6(%rip), %rsi # 0xabe79 leaq 0x8(%rsp), %rdi callq 0x18ce0 leaq 0x8(%rsp), %rdi movq %r14, %rsi callq 0x18ce0 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq %rbx, %rdi callq 0x181d0 movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x480c3 movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 testl %ebp, %ebp je 0x48143 movl %ebp, %edi callq 0x4d58c movq %rax, %r14 leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) movq $0x0, -0x8(%r15) movb $0x0, (%r15) movq %rax, %rdi callq 0x18300 leaq 0xb(%rax), %rsi leaq 0x8(%rsp), %rdi callq 0x18a50 leaq 0x63d82(%rip), %rsi # 0xabe85 leaq 0x8(%rsp), %rdi callq 0x18ce0 leaq 0x8(%rsp), %rdi movq %r14, %rsi callq 0x18ce0 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq %rbx, %rdi callq 0x181d0 movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x48143 movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 movq %rbx, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x4819c movq %rax, %r14 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x4817a movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x4817a movq %rax, %r14 leaq 0x48(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x481c5 movq 0x48(%rsp), %rsi jmp 0x481bd jmp 0x48195 jmp 0x4819c jmp 0x481ab movq %rax, %r14 jmp 0x481c5 jmp 0x4819c movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r15, %rdi jne 0x481b8 jmp 0x481c5 movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x481c5 movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 movq (%rbx), %rdi cmpq %r12, %rdi je 0x481d9 movq (%r12), %rsi incq %rsi callq 0x186a0 movq %r14, %rdi callq 0x18bc0 nop
_ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE17exception_messageENS1_10lexer_baseISF_E10token_typeERKSB_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r15, rcx mov ebp, edx mov r14, rsi mov rbx, rdi lea r12, [rdi+10h] mov [rdi], r12 lea rsi, aSyntaxError; "syntax error " lea rdx, aSyntaxError+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) mov rsi, [r15+8] test rsi, rsi jz short loc_47FA6 lea r13, [rsp+88h+var_70] mov [r13-10h], r13 mov qword ptr [r13-8], 0 mov byte ptr [r13+0], 0 add rsi, 0Fh lea rdi, [rsp+88h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) lea rsi, aWhileParsing; "while parsing " lea rdi, [rsp+88h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [r15] mov rdx, [r15+8] lea rdi, [rsp+88h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) lea rdi, [rsp+88h+var_80] mov esi, 20h ; ' ' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rsi, [rsp+88h+var_80] mov rdx, [rsp+88h+var_78] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rdi, [rsp+88h+var_80]; void * cmp rdi, r13 jz short loc_47FA6 mov rsi, [rsp+88h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_47FA6: lea rsi, asc_ABE67; "- " mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov edi, [r14+20h] cmp edi, 0Eh jnz loc_48049 mov rax, [r14+98h] add r14, 28h ; '(' mov [rsp+88h+var_58], rax lea rdi, [rsp+88h+var_50] mov rsi, r14 call _ZNK8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE16get_token_stringEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_token_string(void) lea r8, [rsp+88h+var_59] mov byte ptr [r8], 27h ; ''' lea rdx, aLastRead; "; last read: '" lea rdi, [rsp+88h+var_80] lea rsi, [rsp+88h+var_58] lea rcx, [rsp+88h+var_50] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKcRA15_S9_S8_cEEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const*,char const(&)[15],std::string,char>(char const*,char const(&)[15],std::string,char &&) mov rsi, [rsp+88h+var_80] mov rdx, [rsp+88h+var_78] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) lea rax, [rsp+88h+var_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_48030 mov rsi, [rsp+88h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_48030: lea rax, [rsp+88h+var_40] mov rdi, [rax-10h] cmp rdi, rax jz loc_480C3 mov rsi, [rsp+88h+var_40] jmp short loc_480BB loc_48049: call _ZN8nlohmann16json_abi_v3_11_36detail10lexer_baseINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15token_type_nameENSG_10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type) mov r14, rax lea r15, [rsp+88h+var_70] mov [r15-10h], r15 mov qword ptr [r15-8], 0 mov byte ptr [r15], 0 mov rdi, rax call _strlen lea rsi, [rax+0Bh] lea rdi, [rsp+88h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) lea rsi, aUnexpected; "unexpected " lea rdi, [rsp+88h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rdi, [rsp+88h+var_80] mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [rsp+88h+var_80] mov rdx, [rsp+88h+var_78] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rdi, [rsp+88h+var_80]; void * cmp rdi, r15 jz short loc_480C3 mov rsi, [rsp+88h+var_70] loc_480BB: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_480C3: test ebp, ebp jz short loc_48143 mov edi, ebp call _ZN8nlohmann16json_abi_v3_11_36detail10lexer_baseINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15token_type_nameENSG_10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type) mov r14, rax lea r15, [rsp+88h+var_70] mov [r15-10h], r15 mov qword ptr [r15-8], 0 mov byte ptr [r15], 0 mov rdi, rax call _strlen lea rsi, [rax+0Bh] lea rdi, [rsp+88h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) lea rsi, aExpected; "; expected " lea rdi, [rsp+88h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rdi, [rsp+88h+var_80] mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [rsp+88h+var_80] mov rdx, [rsp+88h+var_78] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rdi, [rsp+88h+var_80]; void * cmp rdi, r15 jz short loc_48143 mov rsi, [rsp+88h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_48143: mov rax, rbx add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_4819C mov r14, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_4817A mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_4817A mov r14, rax loc_4817A: lea rax, [rsp+arg_40] mov rdi, [rax-10h] cmp rdi, rax jz short loc_481C5 mov rsi, [rsp+arg_40] jmp short loc_481BD jmp short loc_48195 jmp short loc_4819C jmp short loc_481AB loc_48195: mov r14, rax jmp short loc_481C5 jmp short $+2 loc_4819C: mov r14, rax mov rdi, [rsp+arg_0] cmp rdi, r15 jnz short loc_481B8 jmp short loc_481C5 loc_481AB: mov r14, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r13 jz short loc_481C5 loc_481B8: mov rsi, [rsp+arg_10] loc_481BD: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_481C5: mov rdi, [rbx]; void * cmp rdi, r12 jz short loc_481D9 mov rsi, [r12] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_481D9: mov rdi, r14 call __Unwind_Resume
_QWORD * nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::exception_message( _QWORD *a1, long long a2, unsigned int a3, _QWORD *a4) { long long v8; // rsi void *v9; // rdi long long v10; // rsi long long v11; // r14 long long v12; // rax long long v13; // r14 long long v14; // rax void *v16; // [rsp+8h] [rbp-80h] BYREF long long v17; // [rsp+10h] [rbp-78h] _QWORD v18[2]; // [rsp+18h] [rbp-70h] BYREF char v19; // [rsp+2Fh] [rbp-59h] BYREF long long v20; // [rsp+30h] [rbp-58h] BYREF _QWORD v21[2]; // [rsp+38h] [rbp-50h] BYREF long long v22; // [rsp+48h] [rbp-40h] BYREF *a1 = a1 + 2; std::string::_M_construct<char const*>((long long)a1, "syntax error ", (long long)""); v8 = a4[1]; if ( v8 ) { v16 = v18; v17 = 0LL; LOBYTE(v18[0]) = 0; std::string::reserve(&v16, v8 + 15); std::string::append(&v16, "while parsing "); std::string::_M_append(&v16, *a4); std::string::push_back(&v16, 32LL); std::string::_M_append(a1, v16); if ( v16 != v18 ) operator delete(v16, v18[0] + 1LL); } std::string::append(a1, "- "); if ( *(_DWORD *)(a2 + 32) == 14 ) { v20 = *(_QWORD *)(a2 + 152); nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_token_string( (long long)v21, a2 + 40); v19 = 39; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const*,char const(&)[15],std::string,char>( &v16, &v20, "; last read: '", v21, &v19); std::string::_M_append(a1, v16); if ( v16 != v18 ) operator delete(v16, v18[0] + 1LL); v9 = (void *)v21[0]; if ( (long long *)v21[0] != &v22 ) { v10 = v22; LABEL_11: operator delete(v9, v10 + 1); } } else { v11 = ((long long (*)(void))nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type_name)(); v16 = v18; v17 = 0LL; LOBYTE(v18[0]) = 0; v12 = strlen(v11); std::string::reserve(&v16, v12 + 11); std::string::append(&v16, "unexpected "); std::string::append(&v16, v11); std::string::_M_append(a1, v16); v9 = v16; if ( v16 != v18 ) { v10 = v18[0]; goto LABEL_11; } } if ( a3 ) { v13 = nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type_name(a3); v16 = v18; v17 = 0LL; LOBYTE(v18[0]) = 0; v14 = strlen(v13); std::string::reserve(&v16, v14 + 11); std::string::append(&v16, "; expected "); std::string::append(&v16, v13); std::string::_M_append(a1, v16); if ( v16 != v18 ) operator delete(v16, v18[0] + 1LL); } return a1; }
exception_message: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R15,RCX MOV EBP,EDX MOV R14,RSI MOV RBX,RDI LEA R12,[RDI + 0x10] MOV qword ptr [RDI],R12 LEA RSI,[0x1abe4a] LEA RDX,[0x1abe57] CALL 0x0011ded4 MOV RSI,qword ptr [R15 + 0x8] TEST RSI,RSI JZ 0x00147fa6 LEA R13,[RSP + 0x18] MOV qword ptr [R13 + -0x10],R13 MOV qword ptr [R13 + -0x8],0x0 MOV byte ptr [R13],0x0 ADD RSI,0xf LAB_00147f42: LEA RDI,[RSP + 0x8] CALL 0x00118a50 LEA RSI,[0x1abe58] LEA RDI,[RSP + 0x8] CALL 0x00118ce0 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] LEA RDI,[RSP + 0x8] CALL 0x001181d0 LEA RDI,[RSP + 0x8] MOV ESI,0x20 CALL 0x00118590 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_00147f87: MOV RDI,RBX CALL 0x001181d0 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R13 JZ 0x00147fa6 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001186a0 LAB_00147fa6: LEA RSI,[0x1abe67] MOV RDI,RBX CALL 0x00118ce0 MOV EDI,dword ptr [R14 + 0x20] CMP EDI,0xe JNZ 0x00148049 MOV RAX,qword ptr [R14 + 0x98] ADD R14,0x28 MOV qword ptr [RSP + 0x30],RAX LAB_00147fd2: LEA RDI,[RSP + 0x38] MOV RSI,R14 CALL 0x00147c30 LEA R8,[RSP + 0x2f] MOV byte ptr [R8],0x27 LAB_00147fe8: LEA RDX,[0x1abe6a] LEA RDI,[RSP + 0x8] LEA RSI,[RSP + 0x30] LEA RCX,[RSP + 0x38] CALL 0x0014d4ca MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_0014800d: MOV RDI,RBX CALL 0x001181d0 LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00148030 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001186a0 LAB_00148030: LEA RAX,[RSP + 0x48] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001480c3 MOV RSI,qword ptr [RSP + 0x48] JMP 0x001480bb LAB_00148049: CALL 0x0014d58c MOV R14,RAX LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 MOV qword ptr [R15 + -0x8],0x0 MOV byte ptr [R15],0x0 MOV RDI,RAX CALL 0x00118300 LEA RSI,[RAX + 0xb] LAB_00148072: LEA RDI,[RSP + 0x8] CALL 0x00118a50 LEA RSI,[0x1abe79] LEA RDI,[RSP + 0x8] CALL 0x00118ce0 LEA RDI,[RSP + 0x8] MOV RSI,R14 CALL 0x00118ce0 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_001480a4: MOV RDI,RBX CALL 0x001181d0 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R15 JZ 0x001480c3 MOV RSI,qword ptr [RSP + 0x18] LAB_001480bb: INC RSI CALL 0x001186a0 LAB_001480c3: TEST EBP,EBP JZ 0x00148143 MOV EDI,EBP CALL 0x0014d58c MOV R14,RAX LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 MOV qword ptr [R15 + -0x8],0x0 MOV byte ptr [R15],0x0 MOV RDI,RAX CALL 0x00118300 LEA RSI,[RAX + 0xb] LAB_001480f2: LEA RDI,[RSP + 0x8] CALL 0x00118a50 LEA RSI,[0x1abe85] LEA RDI,[RSP + 0x8] CALL 0x00118ce0 LEA RDI,[RSP + 0x8] MOV RSI,R14 CALL 0x00118ce0 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_00148124: MOV RDI,RBX CALL 0x001181d0 LAB_0014812c: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R15 JZ 0x00148143 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001186a0 LAB_00148143: MOV RAX,RBX ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<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> >::token_type, std::__cxx11::string const&) */ long * nlohmann::json_abi_v3_11_3::detail:: parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::exception_message(long *param_1,long param_2,int param_3,ulong *param_4) { char *pcVar1; long *local_80; int8 local_78; int1 local_70; int7 uStack_6f; int1 local_59; int8 local_58; long *local_50 [2]; long local_40 [2]; *param_1 = (long)(param_1 + 2); std::__cxx11::string::_M_construct<char_const*>(param_1,"syntax error ",""); if (param_4[1] != 0) { local_78 = 0; local_70 = 0; /* try { // try from 00147f42 to 00147f7c has its CatchHandler @ 001481ab */ local_80 = (long *)&local_70; std::__cxx11::string::reserve((ulong)&local_80); std::__cxx11::string::append((char *)&local_80); std::__cxx11::string::_M_append((char *)&local_80,*param_4); std::__cxx11::string::push_back((char)&local_80); /* try { // try from 00147f87 to 00147f8e has its CatchHandler @ 00148193 */ std::__cxx11::string::_M_append((char *)param_1,(ulong)local_80); if (local_80 != (long *)&local_70) { operator_delete(local_80,CONCAT71(uStack_6f,local_70) + 1); } } /* try { // try from 00147fa6 to 00147fb4 has its CatchHandler @ 00148195 */ std::__cxx11::string::append((char *)param_1); if (*(int *)(param_2 + 0x20) == 0xe) { local_58 = *(int8 *)(param_2 + 0x98); /* try { // try from 00147fd2 to 00147fde has its CatchHandler @ 0014818f */ lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::get_token_string(); local_59 = 0x27; /* try { // try from 00147fe8 to 00148002 has its CatchHandler @ 00148177 */ concat<std::__cxx11::string,char_const*,char_const(&)[15],std::__cxx11::string,char> ((char **)&local_80,(char *)&local_58,(string *)"; last read: \'",(char *)local_50); /* try { // try from 0014800d to 00148014 has its CatchHandler @ 00148157 */ std::__cxx11::string::_M_append((char *)param_1,(ulong)local_80); if (local_80 != (long *)&local_70) { operator_delete(local_80,CONCAT71(uStack_6f,local_70) + 1); } if (local_50[0] == local_40) goto LAB_001480c3; } else { pcVar1 = (char *)lexer_base<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>> ::token_type_name(); local_78 = 0; local_70 = 0; local_80 = (long *)&local_70; strlen(pcVar1); /* try { // try from 00148072 to 00148099 has its CatchHandler @ 0014819a */ std::__cxx11::string::reserve((ulong)&local_80); std::__cxx11::string::append((char *)&local_80); std::__cxx11::string::append((char *)&local_80); /* try { // try from 001480a4 to 001480ab has its CatchHandler @ 00148155 */ std::__cxx11::string::_M_append((char *)param_1,(ulong)local_80); if (local_80 == (long *)&local_70) goto LAB_001480c3; local_40[0] = CONCAT71(uStack_6f,local_70); local_50[0] = local_80; } operator_delete(local_50[0],local_40[0] + 1); LAB_001480c3: if (param_3 != 0) { pcVar1 = (char *)lexer_base<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>> ::token_type_name(param_3); local_78 = 0; local_70 = 0; local_80 = (long *)&local_70; strlen(pcVar1); /* try { // try from 001480f2 to 00148119 has its CatchHandler @ 0014819c */ std::__cxx11::string::reserve((ulong)&local_80); std::__cxx11::string::append((char *)&local_80); std::__cxx11::string::append((char *)&local_80); /* try { // try from 00148124 to 0014812b has its CatchHandler @ 00148191 */ std::__cxx11::string::_M_append((char *)param_1,(ulong)local_80); if (local_80 != (long *)&local_70) { operator_delete(local_80,CONCAT71(uStack_6f,local_70) + 1); } } return param_1; }
23,473
mi_update_blob_record
eloqsql/storage/myisam/mi_dynrec.c
int _mi_update_blob_record(MI_INFO *info, my_off_t pos, const uchar *record) { uchar *rec_buff; int error; ulong reclength,extra; extra= (ALIGN_SIZE(MI_MAX_DYN_BLOCK_HEADER)+MI_SPLIT_LENGTH+ MI_DYN_DELETE_BLOCK_HEADER); reclength= (info->s->base.pack_reclength+ _mi_calc_total_blob_length(info,record)+ extra); if (!(rec_buff=(uchar*) my_alloca(reclength))) { my_errno= HA_ERR_OUT_OF_MEM; /* purecov: inspected */ return(-1); } reclength=_mi_rec_pack(info,rec_buff+ALIGN_SIZE(MI_MAX_DYN_BLOCK_HEADER), record); error=update_dynamic_record(info,pos, rec_buff+ALIGN_SIZE(MI_MAX_DYN_BLOCK_HEADER), reclength); my_afree(rec_buff); return(error); }
O0
c
mi_update_blob_record: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq $0x5c, -0x40(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x148(%rax), %rax movq %rax, -0x48(%rbp) movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0xad820 movq %rax, %rcx movq -0x48(%rbp), %rax addq %rcx, %rax addq -0x40(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rsi xorl %edi, %edi xorl %eax, %eax movl %eax, %edx callq 0xfc090 movq %rax, -0x28(%rbp) cmpq $0x0, %rax jne 0xad93a callq 0xfea30 movl $0x80, (%rax) movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xad980 movq -0x10(%rbp), %rdi movq -0x28(%rbp), %rsi addq $0x18, %rsi movq -0x20(%rbp), %rdx callq 0xac890 movl %eax, %eax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x28(%rbp), %rdx addq $0x18, %rdx movq -0x38(%rbp), %rcx callq 0xacfc0 movl %eax, -0x2c(%rbp) movq -0x28(%rbp), %rdi callq 0xfc410 movl -0x2c(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopl (%rax)
_mi_update_blob_record: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_40], 5Ch ; '\' mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+148h] mov [rbp+var_48], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] call _mi_calc_total_blob_length mov rcx, rax mov rax, [rbp+var_48] add rax, rcx add rax, [rbp+var_40] mov [rbp+var_38], rax mov rsi, [rbp+var_38] xor edi, edi xor eax, eax mov edx, eax call my_malloc mov [rbp+var_28], rax cmp rax, 0 jnz short loc_AD93A call _my_thread_var mov dword ptr [rax], 80h mov [rbp+var_4], 0FFFFFFFFh jmp short loc_AD980 loc_AD93A: mov rdi, [rbp+var_10] mov rsi, [rbp+var_28] add rsi, 18h mov rdx, [rbp+var_20] call _mi_rec_pack mov eax, eax mov [rbp+var_38], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_28] add rdx, 18h mov rcx, [rbp+var_38] call update_dynamic_record_0 mov [rbp+var_2C], eax mov rdi, [rbp+var_28] call my_free mov eax, [rbp+var_2C] mov [rbp+var_4], eax loc_AD980: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long mi_update_blob_record(_QWORD *a1, long long a2, _BYTE *a3) { const char *v3; // rsi long long v5; // [rsp+8h] [rbp-48h] unsigned long long v6; // [rsp+18h] [rbp-38h] unsigned int updated; // [rsp+24h] [rbp-2Ch] long long v8; // [rsp+28h] [rbp-28h] v5 = *(_QWORD *)(*a1 + 328LL); v3 = (const char *)(mi_calc_total_blob_length(a1, (long long)a3) + v5 + 92); v8 = my_malloc(0LL, v3, 0LL); if ( v8 ) { v6 = (unsigned int)mi_rec_pack(a1, (_BYTE *)(v8 + 24), a3); updated = update_dynamic_record_0(a1, a2, v8 + 24, v6); my_free(v8); return updated; } else { *(_DWORD *)my_thread_var(0LL, v3) = 128; return (unsigned int)-1; } }
_mi_update_blob_record: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x40],0x5c MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x148] MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] CALL 0x001ad820 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x48] ADD RAX,RCX ADD RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x38],RAX MOV RSI,qword ptr [RBP + -0x38] XOR EDI,EDI XOR EAX,EAX MOV EDX,EAX CALL 0x001fc090 MOV qword ptr [RBP + -0x28],RAX CMP RAX,0x0 JNZ 0x001ad93a CALL 0x001fea30 MOV dword ptr [RAX],0x80 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001ad980 LAB_001ad93a: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x28] ADD RSI,0x18 MOV RDX,qword ptr [RBP + -0x20] CALL 0x001ac890 MOV EAX,EAX MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x28] ADD RDX,0x18 MOV RCX,qword ptr [RBP + -0x38] CALL 0x001acfc0 MOV dword ptr [RBP + -0x2c],EAX MOV RDI,qword ptr [RBP + -0x28] CALL 0x001fc410 MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x4],EAX LAB_001ad980: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
int4 _mi_update_blob_record(long *param_1,int8 param_2,int8 param_3) { int4 uVar1; long lVar2; long lVar3; int4 *puVar4; int4 local_c; lVar3 = *(long *)(*param_1 + 0x148); lVar2 = _mi_calc_total_blob_length(param_1,param_3); lVar3 = my_malloc(0,lVar3 + lVar2 + 0x5c,0); if (lVar3 == 0) { puVar4 = (int4 *)_my_thread_var(); *puVar4 = 0x80; local_c = 0xffffffff; } else { uVar1 = _mi_rec_pack(param_1,lVar3 + 0x18,param_3); local_c = update_dynamic_record(param_1,param_2,lVar3 + 0x18,uVar1); my_free(lVar3); } return local_c; }
23,474
testing::internal::GTestFlagSaver::GTestFlagSaver()
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest-internal-inl.h
GTestFlagSaver() { also_run_disabled_tests_ = GTEST_FLAG_GET(also_run_disabled_tests); break_on_failure_ = GTEST_FLAG_GET(break_on_failure); catch_exceptions_ = GTEST_FLAG_GET(catch_exceptions); color_ = GTEST_FLAG_GET(color); death_test_style_ = GTEST_FLAG_GET(death_test_style); death_test_use_fork_ = GTEST_FLAG_GET(death_test_use_fork); fail_fast_ = GTEST_FLAG_GET(fail_fast); filter_ = GTEST_FLAG_GET(filter); internal_run_death_test_ = GTEST_FLAG_GET(internal_run_death_test); list_tests_ = GTEST_FLAG_GET(list_tests); output_ = GTEST_FLAG_GET(output); brief_ = GTEST_FLAG_GET(brief); print_time_ = GTEST_FLAG_GET(print_time); print_utf8_ = GTEST_FLAG_GET(print_utf8); random_seed_ = GTEST_FLAG_GET(random_seed); repeat_ = GTEST_FLAG_GET(repeat); recreate_environments_when_repeating_ = GTEST_FLAG_GET(recreate_environments_when_repeating); shuffle_ = GTEST_FLAG_GET(shuffle); stack_trace_depth_ = GTEST_FLAG_GET(stack_trace_depth); stream_result_to_ = GTEST_FLAG_GET(stream_result_to); throw_on_failure_ = GTEST_FLAG_GET(throw_on_failure); }
O1
c
testing::internal::GTestFlagSaver::GTestFlagSaver(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdi, %r13 addq $0x8, %rdi leaq 0x18(%r13), %rax movq %rax, 0x18(%rsp) movq %rax, 0x8(%r13) xorl %eax, %eax movq %rax, 0x10(%r13) movb %al, 0x18(%r13) leaq 0x28(%r13), %rcx movq %rcx, 0x28(%rsp) leaq 0x38(%r13), %rcx movq %rcx, 0x10(%rsp) movq %rcx, 0x28(%r13) movq %rax, 0x30(%r13) movb %al, 0x38(%r13) leaq 0x50(%r13), %rcx movq %rcx, 0x20(%rsp) leaq 0x60(%r13), %rcx movq %rcx, 0x8(%rsp) movq %rcx, 0x50(%r13) movq %rax, 0x58(%r13) movb %al, 0x60(%r13) leaq 0x70(%r13), %r12 leaq 0x80(%r13), %rcx movq %rcx, (%rsp) movq %rcx, 0x70(%r13) movq %rax, 0x78(%r13) movb %al, 0x80(%r13) leaq 0x98(%r13), %rbp leaq 0xa8(%r13), %r15 movq %r15, 0x98(%r13) movq %rax, 0xa0(%r13) movb %al, 0xa8(%r13) leaq 0xd0(%r13), %rbx leaq 0xe0(%r13), %r14 movq %r14, 0xd0(%r13) movq %rax, 0xd8(%r13) movb %al, 0xe0(%r13) movb 0x25459(%rip), %al # 0x59683 movb %al, (%r13) movb 0x25450(%rip), %al # 0x59684 movb %al, 0x1(%r13) movb 0x25447(%rip), %al # 0x59685 movb %al, 0x2(%r13) leaq 0x2543f(%rip), %rsi # 0x59688 movq %rdi, 0x30(%rsp) callq 0x8290 leaq 0x2539e(%rip), %rsi # 0x595f8 movq 0x28(%rsp), %rdi callq 0x8290 movb 0x253ae(%rip), %al # 0x59618 movb %al, 0x48(%r13) movb 0x2540e(%rip), %al # 0x59682 movb %al, 0x49(%r13) leaq 0x25429(%rip), %rsi # 0x596a8 movq 0x20(%rsp), %rdi callq 0x8290 leaq 0x25390(%rip), %rsi # 0x59620 movq %r12, %rdi callq 0x8290 movb 0x2542b(%rip), %al # 0x596c9 movb %al, 0x90(%r13) leaq 0x25424(%rip), %rsi # 0x596d0 movq %rbp, %rdi callq 0x8290 movb 0x25436(%rip), %al # 0x596f0 movb %al, 0xb8(%r13) movb 0x2542a(%rip), %al # 0x596f1 movb %al, 0xb9(%r13) movb 0x253ac(%rip), %al # 0x59680 movb %al, 0xba(%r13) movl 0x25413(%rip), %eax # 0x596f4 movl %eax, 0xbc(%r13) movl 0x2540a(%rip), %eax # 0x596f8 movl %eax, 0xc0(%r13) movb 0x25401(%rip), %al # 0x596fc movb %al, 0xc4(%r13) movb 0x253f6(%rip), %al # 0x596fe movb %al, 0xc5(%r13) movl 0x253eb(%rip), %eax # 0x59700 movl %eax, 0xc8(%r13) leaq 0x253e5(%rip), %rsi # 0x59708 movq %rbx, %rdi callq 0x8290 movb 0x253f7(%rip), %al # 0x59728 movb %al, 0xf0(%r13) addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r13 movq (%rbx), %rdi cmpq %r14, %rdi je 0x3435d movq (%r14), %rsi incq %rsi callq 0x84e0 movq (%rbp), %rdi cmpq %r15, %rdi je 0x34371 movq (%r15), %rsi incq %rsi callq 0x84e0 movq (%r12), %rdi cmpq (%rsp), %rdi je 0x3438a movq (%rsp), %rax movq (%rax), %rsi incq %rsi callq 0x84e0 movq 0x20(%rsp), %rax movq (%rax), %rdi cmpq 0x8(%rsp), %rdi je 0x343a9 movq 0x8(%rsp), %rax movq (%rax), %rsi incq %rsi callq 0x84e0 movq 0x28(%rsp), %rax movq (%rax), %rdi cmpq 0x10(%rsp), %rdi je 0x343c8 movq 0x10(%rsp), %rax movq (%rax), %rsi incq %rsi callq 0x84e0 movq 0x30(%rsp), %rax movq (%rax), %rdi cmpq 0x18(%rsp), %rdi je 0x343e7 movq 0x18(%rsp), %rax movq (%rax), %rsi incq %rsi callq 0x84e0 movq %r13, %rdi callq 0x8990 nop
_ZN7testing8internal14GTestFlagSaverC2Ev: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r13, rdi add rdi, 8 lea rax, [r13+18h] mov [rsp+68h+var_50], rax mov [r13+8], rax xor eax, eax mov [r13+10h], rax mov [r13+18h], al lea rcx, [r13+28h] mov [rsp+68h+var_40], rcx lea rcx, [r13+38h] mov [rsp+68h+var_58], rcx mov [r13+28h], rcx mov [r13+30h], rax mov [r13+38h], al lea rcx, [r13+50h] mov [rsp+68h+var_48], rcx lea rcx, [r13+60h] mov [rsp+68h+var_60], rcx mov [r13+50h], rcx mov [r13+58h], rax mov [r13+60h], al lea r12, [r13+70h] lea rcx, [r13+80h] mov [rsp+68h+var_68], rcx mov [r13+70h], rcx mov [r13+78h], rax mov [r13+80h], al lea rbp, [r13+98h] lea r15, [r13+0A8h] mov [r13+98h], r15 mov [r13+0A0h], rax mov [r13+0A8h], al lea rbx, [r13+0D0h] lea r14, [r13+0E0h] mov [r13+0D0h], r14 mov [r13+0D8h], rax mov [r13+0E0h], al mov al, cs:_ZN7testing35FLAGS_gtest_also_run_disabled_testsE; testing::FLAGS_gtest_also_run_disabled_tests mov [r13+0], al mov al, cs:_ZN7testing28FLAGS_gtest_break_on_failureE; testing::FLAGS_gtest_break_on_failure mov [r13+1], al mov al, cs:_ZN7testing28FLAGS_gtest_catch_exceptionsE; testing::FLAGS_gtest_catch_exceptions mov [r13+2], al lea rsi, _ZN7testing17FLAGS_gtest_colorB5cxx11E; testing::FLAGS_gtest_color mov [rsp+68h+var_38], rdi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) lea rsi, _ZN7testing28FLAGS_gtest_death_test_styleB5cxx11E; testing::FLAGS_gtest_death_test_style mov rdi, [rsp+68h+var_40] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) mov al, cs:_ZN7testing31FLAGS_gtest_death_test_use_forkE; testing::FLAGS_gtest_death_test_use_fork mov [r13+48h], al mov al, cs:_ZN7testing21FLAGS_gtest_fail_fastE; testing::FLAGS_gtest_fail_fast mov [r13+49h], al lea rsi, _ZN7testing18FLAGS_gtest_filterB5cxx11E; testing::FLAGS_gtest_filter mov rdi, [rsp+68h+var_48] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) lea rsi, _ZN7testing35FLAGS_gtest_internal_run_death_testB5cxx11E; testing::FLAGS_gtest_internal_run_death_test mov rdi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) mov al, cs:_ZN7testing22FLAGS_gtest_list_testsE; testing::FLAGS_gtest_list_tests mov [r13+90h], al lea rsi, _ZN7testing18FLAGS_gtest_outputB5cxx11E; testing::FLAGS_gtest_output mov rdi, rbp call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) mov al, cs:_ZN7testing17FLAGS_gtest_briefE; testing::FLAGS_gtest_brief mov [r13+0B8h], al mov al, cs:_ZN7testing22FLAGS_gtest_print_timeE; testing::FLAGS_gtest_print_time mov [r13+0B9h], al mov al, cs:_ZN7testing22FLAGS_gtest_print_utf8E; testing::FLAGS_gtest_print_utf8 mov [r13+0BAh], al mov eax, cs:_ZN7testing23FLAGS_gtest_random_seedE; testing::FLAGS_gtest_random_seed mov [r13+0BCh], eax mov eax, cs:_ZN7testing18FLAGS_gtest_repeatE; testing::FLAGS_gtest_repeat mov [r13+0C0h], eax mov al, cs:_ZN7testing48FLAGS_gtest_recreate_environments_when_repeatingE; testing::FLAGS_gtest_recreate_environments_when_repeating mov [r13+0C4h], al mov al, cs:_ZN7testing19FLAGS_gtest_shuffleE; testing::FLAGS_gtest_shuffle mov [r13+0C5h], al mov eax, cs:_ZN7testing29FLAGS_gtest_stack_trace_depthE; testing::FLAGS_gtest_stack_trace_depth mov [r13+0C8h], eax lea rsi, _ZN7testing28FLAGS_gtest_stream_result_toB5cxx11E; testing::FLAGS_gtest_stream_result_to mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) mov al, cs:_ZN7testing28FLAGS_gtest_throw_on_failureE; testing::FLAGS_gtest_throw_on_failure mov [r13+0F0h], al add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r13, rax mov rdi, [rbx]; void * cmp rdi, r14 jz short loc_3435D mov rsi, [r14] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3435D: mov rdi, [rbp+0]; void * cmp rdi, r15 jz short loc_34371 mov rsi, [r15] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_34371: mov rdi, [r12]; void * cmp rdi, [rsp+0] jz short loc_3438A mov rax, [rsp+0] mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3438A: mov rax, [rsp+arg_18] mov rdi, [rax]; void * cmp rdi, [rsp+arg_0] jz short loc_343A9 mov rax, [rsp+arg_0] mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_343A9: mov rax, [rsp+arg_20] mov rdi, [rax]; void * cmp rdi, [rsp+arg_8] jz short loc_343C8 mov rax, [rsp+arg_8] mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_343C8: mov rax, [rsp+arg_28] mov rdi, [rax]; void * cmp rdi, [rsp+arg_10] jz short loc_343E7 mov rax, [rsp+arg_10] mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_343E7: mov rdi, r13 call __Unwind_Resume
char testing::internal::GTestFlagSaver::GTestFlagSaver(testing::internal::GTestFlagSaver *this) { char result; // al *((_QWORD *)this + 1) = (char *)this + 24; *((_QWORD *)this + 2) = 0LL; *((_BYTE *)this + 24) = 0; *((_QWORD *)this + 5) = (char *)this + 56; *((_QWORD *)this + 6) = 0LL; *((_BYTE *)this + 56) = 0; *((_QWORD *)this + 10) = (char *)this + 96; *((_QWORD *)this + 11) = 0LL; *((_BYTE *)this + 96) = 0; *((_QWORD *)this + 14) = (char *)this + 128; *((_QWORD *)this + 15) = 0LL; *((_BYTE *)this + 128) = 0; *((_QWORD *)this + 19) = (char *)this + 168; *((_QWORD *)this + 20) = 0LL; *((_BYTE *)this + 168) = 0; *((_QWORD *)this + 26) = (char *)this + 224; *((_QWORD *)this + 27) = 0LL; *((_BYTE *)this + 224) = 0; *(_BYTE *)this = testing::FLAGS_gtest_also_run_disabled_tests; *((_BYTE *)this + 1) = testing::FLAGS_gtest_break_on_failure; *((_BYTE *)this + 2) = testing::FLAGS_gtest_catch_exceptions; std::string::_M_assign((char *)this + 8, &testing::FLAGS_gtest_color[abi:cxx11]); std::string::_M_assign((char *)this + 40, &testing::FLAGS_gtest_death_test_style[abi:cxx11]); *((_BYTE *)this + 72) = testing::FLAGS_gtest_death_test_use_fork; *((_BYTE *)this + 73) = testing::FLAGS_gtest_fail_fast; std::string::_M_assign((char *)this + 80, &testing::FLAGS_gtest_filter[abi:cxx11]); std::string::_M_assign((char *)this + 112, &testing::FLAGS_gtest_internal_run_death_test[abi:cxx11]); *((_BYTE *)this + 144) = testing::FLAGS_gtest_list_tests; std::string::_M_assign((char *)this + 152, &testing::FLAGS_gtest_output[abi:cxx11]); *((_BYTE *)this + 184) = testing::FLAGS_gtest_brief; *((_BYTE *)this + 185) = testing::FLAGS_gtest_print_time; *((_BYTE *)this + 186) = testing::FLAGS_gtest_print_utf8; *((_DWORD *)this + 47) = testing::FLAGS_gtest_random_seed; *((_DWORD *)this + 48) = testing::FLAGS_gtest_repeat; *((_BYTE *)this + 196) = testing::FLAGS_gtest_recreate_environments_when_repeating; *((_BYTE *)this + 197) = testing::FLAGS_gtest_shuffle; *((_DWORD *)this + 50) = testing::FLAGS_gtest_stack_trace_depth; std::string::_M_assign((char *)this + 208, &testing::FLAGS_gtest_stream_result_to[abi:cxx11]); result = testing::FLAGS_gtest_throw_on_failure; *((_BYTE *)this + 240) = testing::FLAGS_gtest_throw_on_failure; return result; }
GTestFlagSaver: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R13,RDI ADD RDI,0x8 LEA RAX,[R13 + 0x18] MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [R13 + 0x8],RAX XOR EAX,EAX MOV qword ptr [R13 + 0x10],RAX MOV byte ptr [R13 + 0x18],AL LEA RCX,[R13 + 0x28] MOV qword ptr [RSP + 0x28],RCX LEA RCX,[R13 + 0x38] MOV qword ptr [RSP + 0x10],RCX MOV qword ptr [R13 + 0x28],RCX MOV qword ptr [R13 + 0x30],RAX MOV byte ptr [R13 + 0x38],AL LEA RCX,[R13 + 0x50] MOV qword ptr [RSP + 0x20],RCX LEA RCX,[R13 + 0x60] MOV qword ptr [RSP + 0x8],RCX MOV qword ptr [R13 + 0x50],RCX MOV qword ptr [R13 + 0x58],RAX MOV byte ptr [R13 + 0x60],AL LEA R12,[R13 + 0x70] LEA RCX,[R13 + 0x80] MOV qword ptr [RSP],RCX MOV qword ptr [R13 + 0x70],RCX MOV qword ptr [R13 + 0x78],RAX MOV byte ptr [R13 + 0x80],AL LEA RBP,[R13 + 0x98] LEA R15,[R13 + 0xa8] MOV qword ptr [R13 + 0x98],R15 MOV qword ptr [R13 + 0xa0],RAX MOV byte ptr [R13 + 0xa8],AL LEA RBX,[R13 + 0xd0] LEA R14,[R13 + 0xe0] MOV qword ptr [R13 + 0xd0],R14 MOV qword ptr [R13 + 0xd8],RAX MOV byte ptr [R13 + 0xe0],AL MOV AL,byte ptr [0x00159683] MOV byte ptr [R13],AL MOV AL,byte ptr [0x00159684] MOV byte ptr [R13 + 0x1],AL MOV AL,byte ptr [0x00159685] MOV byte ptr [R13 + 0x2],AL LAB_00134242: LEA RSI,[0x159688] MOV qword ptr [RSP + 0x30],RDI CALL 0x00108290 LEA RSI,[0x1595f8] MOV RDI,qword ptr [RSP + 0x28] CALL 0x00108290 MOV AL,byte ptr [0x00159618] MOV byte ptr [R13 + 0x48],AL MOV AL,byte ptr [0x00159682] MOV byte ptr [R13 + 0x49],AL LEA RSI,[0x1596a8] MOV RDI,qword ptr [RSP + 0x20] CALL 0x00108290 LEA RSI,[0x159620] MOV RDI,R12 CALL 0x00108290 MOV AL,byte ptr [0x001596c9] MOV byte ptr [R13 + 0x90],AL LEA RSI,[0x1596d0] MOV RDI,RBP CALL 0x00108290 MOV AL,byte ptr [0x001596f0] MOV byte ptr [R13 + 0xb8],AL MOV AL,byte ptr [0x001596f1] MOV byte ptr [R13 + 0xb9],AL MOV AL,byte ptr [0x00159680] MOV byte ptr [R13 + 0xba],AL MOV EAX,dword ptr [0x001596f4] MOV dword ptr [R13 + 0xbc],EAX MOV EAX,dword ptr [0x001596f8] MOV dword ptr [R13 + 0xc0],EAX MOV AL,byte ptr [0x001596fc] MOV byte ptr [R13 + 0xc4],AL MOV AL,byte ptr [0x001596fe] MOV byte ptr [R13 + 0xc5],AL MOV EAX,dword ptr [0x00159700] MOV dword ptr [R13 + 0xc8],EAX LEA RSI,[0x159708] MOV RDI,RBX CALL 0x00108290 LAB_0013432b: MOV AL,byte ptr [0x00159728] MOV byte ptr [R13 + 0xf0],AL ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* testing::internal::GTestFlagSaver::GTestFlagSaver() */ void __thiscall testing::internal::GTestFlagSaver::GTestFlagSaver(GTestFlagSaver *this) { *(GTestFlagSaver **)(this + 8) = this + 0x18; *(int8 *)(this + 0x10) = 0; this[0x18] = (GTestFlagSaver)0x0; *(GTestFlagSaver **)(this + 0x28) = this + 0x38; *(int8 *)(this + 0x30) = 0; this[0x38] = (GTestFlagSaver)0x0; *(GTestFlagSaver **)(this + 0x50) = this + 0x60; *(int8 *)(this + 0x58) = 0; this[0x60] = (GTestFlagSaver)0x0; *(GTestFlagSaver **)(this + 0x70) = this + 0x80; *(int8 *)(this + 0x78) = 0; this[0x80] = (GTestFlagSaver)0x0; *(GTestFlagSaver **)(this + 0x98) = this + 0xa8; *(int8 *)(this + 0xa0) = 0; this[0xa8] = (GTestFlagSaver)0x0; *(GTestFlagSaver **)(this + 0xd0) = this + 0xe0; *(int8 *)(this + 0xd8) = 0; this[0xe0] = (GTestFlagSaver)0x0; *this = FLAGS_gtest_also_run_disabled_tests; this[1] = FLAGS_gtest_break_on_failure; this[2] = FLAGS_gtest_catch_exceptions; /* try { // try from 00134242 to 0013432a has its CatchHandler @ 00134347 */ std::__cxx11::string::_M_assign((string *)(this + 8)); std::__cxx11::string::_M_assign((string *)(this + 0x28)); this[0x48] = FLAGS_gtest_death_test_use_fork; this[0x49] = FLAGS_gtest_fail_fast; std::__cxx11::string::_M_assign((string *)(this + 0x50)); std::__cxx11::string::_M_assign((string *)(this + 0x70)); this[0x90] = FLAGS_gtest_list_tests; std::__cxx11::string::_M_assign((string *)(this + 0x98)); this[0xb8] = FLAGS_gtest_brief; this[0xb9] = FLAGS_gtest_print_time; this[0xba] = FLAGS_gtest_print_utf8; *(int4 *)(this + 0xbc) = FLAGS_gtest_random_seed; *(int4 *)(this + 0xc0) = FLAGS_gtest_repeat; this[0xc4] = FLAGS_gtest_recreate_environments_when_repeating; this[0xc5] = FLAGS_gtest_shuffle; *(int4 *)(this + 200) = FLAGS_gtest_stack_trace_depth; std::__cxx11::string::_M_assign((string *)(this + 0xd0)); this[0xf0] = FLAGS_gtest_throw_on_failure; return; }
23,475
google::protobuf::compiler::java::ImmutableEnumFieldLiteGenerator::GenerateBuilderMembers(google::protobuf::io::Printer*) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/enum_field_lite.cc
void ImmutableEnumFieldLiteGenerator::GenerateBuilderMembers( io::Printer* printer) const { if (HasHazzer(descriptor_)) { WriteFieldAccessorDocComment(printer, descriptor_, HAZZER); printer->Print( variables_, "@java.lang.Override\n" "$deprecation$public boolean ${$has$capitalized_name$$}$() {\n" " return instance.has$capitalized_name$();\n" "}\n"); printer->Annotate("{", "}", descriptor_); } if (SupportUnknownEnumValue(descriptor_->file())) { WriteFieldEnumValueAccessorDocComment(printer, descriptor_, GETTER); printer->Print( variables_, "@java.lang.Override\n" "$deprecation$public int ${$get$capitalized_name$Value$}$() {\n" " return instance.get$capitalized_name$Value();\n" "}\n"); printer->Annotate("{", "}", descriptor_); WriteFieldAccessorDocComment(printer, descriptor_, SETTER, /* builder */ true); printer->Print(variables_, "$deprecation$public Builder " "${$set$capitalized_name$Value$}$(int value) {\n" " copyOnWrite();\n" " instance.set$capitalized_name$Value(value);\n" " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); } WriteFieldAccessorDocComment(printer, descriptor_, GETTER); printer->Print(variables_, "@java.lang.Override\n" "$deprecation$public $type$ ${$get$capitalized_name$$}$() {\n" " return instance.get$capitalized_name$();\n" "}\n"); printer->Annotate("{", "}", descriptor_); WriteFieldEnumValueAccessorDocComment(printer, descriptor_, SETTER, /* builder */ true); printer->Print(variables_, "$deprecation$public Builder " "${$set$capitalized_name$$}$($type$ value) {\n" " copyOnWrite();\n" " instance.set$capitalized_name$(value);\n" " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); WriteFieldAccessorDocComment(printer, descriptor_, CLEARER, /* builder */ true); printer->Print( variables_, "$deprecation$public Builder ${$clear$capitalized_name$$}$() {\n" " copyOnWrite();\n" " instance.clear$capitalized_name$();\n" " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); }
O3
cpp
google::protobuf::compiler::java::ImmutableEnumFieldLiteGenerator::GenerateBuilderMembers(google::protobuf::io::Printer*) const: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 movq 0x8(%rdi), %r15 movb 0x1(%r15), %al notb %al testb $0x60, %al je 0xf6e5f movq %r15, %rdi callq 0x11d7ce testq %rax, %rax jne 0xf6e22 movb 0x1(%r15), %al testb $0x2, %al jne 0xf6e22 movq 0x10(%r15), %rcx cmpb $0x2, 0x3(%rcx) jne 0xf6fb6 movq 0x8(%r14), %rsi movq %rbx, %rdi xorl %edx, %edx xorl %ecx, %ecx callq 0xcff9a leaq 0x10(%r14), %rsi leaq 0xe6987(%rip), %rdx # 0x1dd7c4 movq %rbx, %rdi callq 0x16cd32 movq 0x8(%r14), %rcx leaq 0xf9289(%rip), %rsi # 0x1f00d9 leaq 0xe9876(%rip), %rdx # 0x1e06cd movq %rbx, %rdi callq 0xafc7e movq 0x8(%r14), %rsi movq 0x10(%rsi), %rax cmpb $0x3, 0x3(%rax) jne 0xf6ef4 movq %rbx, %rdi movl $0x1, %edx xorl %ecx, %ecx callq 0xd0175 leaq 0x10(%r14), %r15 leaq 0xf3790(%rip), %rdx # 0x1ea61b movq %rbx, %rdi movq %r15, %rsi callq 0x16cd32 movq 0x8(%r14), %rcx leaq 0xf9238(%rip), %r12 # 0x1f00d9 leaq 0xe9825(%rip), %r13 # 0x1e06cd movq %rbx, %rdi movq %r12, %rsi movq %r13, %rdx callq 0xafc7e movq 0x8(%r14), %rsi movq %rbx, %rdi movl $0x2, %edx movl $0x1, %ecx callq 0xcff9a leaq 0xf37cc(%rip), %rdx # 0x1ea69f movq %rbx, %rdi movq %r15, %rsi callq 0x16cd32 movq 0x8(%r14), %rcx movq %rbx, %rdi movq %r12, %rsi movq %r13, %rdx callq 0xafc7e movq 0x8(%r14), %rsi movq %rbx, %rdi movl $0x1, %edx xorl %ecx, %ecx callq 0xcff9a leaq 0x10(%r14), %r15 leaq 0xe6934(%rip), %rdx # 0x1dd842 movq %rbx, %rdi movq %r15, %rsi callq 0x16cd32 movq 0x8(%r14), %rcx leaq 0xf91b5(%rip), %r12 # 0x1f00d9 leaq 0xe97a2(%rip), %r13 # 0x1e06cd movq %rbx, %rdi movq %r12, %rsi movq %r13, %rdx callq 0xafc7e movq 0x8(%r14), %rsi movq %rbx, %rdi movl $0x2, %edx movl $0x1, %ecx callq 0xd0175 leaq 0xe6e53(%rip), %rdx # 0x1ddda9 movq %rbx, %rdi movq %r15, %rsi callq 0x16cd32 movq 0x8(%r14), %rcx movq %rbx, %rdi movq %r12, %rsi movq %r13, %rdx callq 0xafc7e movq 0x8(%r14), %rsi movq %rbx, %rdi movl $0x3, %edx movl $0x1, %ecx callq 0xcff9a leaq 0xe6ead(%rip), %rdx # 0x1dde3d movq %rbx, %rdi movq %r15, %rsi callq 0x16cd32 movq 0x8(%r14), %rcx movq %rbx, %rdi movq %r12, %rsi movq %r13, %rdx popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 jmp 0xafc7e testb $0x10, %al sete %cl movq 0x28(%r15), %rax testq %rax, %rax sete %dl orb %cl, %dl jne 0xf6e5f cmpl $0x1, 0x4(%rax) jne 0xf6e22 movq 0x20(%rax), %rax testb $0x2, 0x1(%rax) je 0xf6e22 jmp 0xf6e5f
_ZNK6google8protobuf8compiler4java31ImmutableEnumFieldLiteGenerator22GenerateBuilderMembersEPNS0_2io7PrinterE: push r15; int push r14; int push r13; char push r12; int push rbx; void * mov rbx, rsi mov r14, rdi mov r15, [rdi+8] mov al, [r15+1] not al test al, 60h jz short loc_F6E5F mov rdi, r15; this call _ZNK6google8protobuf15FieldDescriptor12message_typeEv; google::protobuf::FieldDescriptor::message_type(void) test rax, rax jnz short loc_F6E22 mov al, [r15+1] test al, 2 jnz short loc_F6E22 mov rcx, [r15+10h] cmp byte ptr [rcx+3], 2 jnz loc_F6FB6 loc_F6E22: mov rsi, [r14+8]; google::protobuf::FieldDescriptor * mov rdi, rbx; this xor edx, edx xor ecx, ecx call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool) lea rsi, [r14+10h] lea rdx, aJavaLangOverri_71; "@java.lang.Override\n$deprecation$publi"... mov rdi, rbx; this call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) mov rcx, [r14+8] lea rsi, a0oneof1+0Bh; "{" lea rdx, aKotlinJvmJvmsy_32+0E3h; "}" mov rdi, rbx call _ZN6google8protobuf2io7Printer8AnnotateINS0_15FieldDescriptorEEEvPKcS6_PKT_; google::protobuf::io::Printer::Annotate<google::protobuf::FieldDescriptor>(char const*,char const*,google::protobuf::FieldDescriptor const*) loc_F6E5F: mov rsi, [r14+8]; google::protobuf::FieldDescriptor * mov rax, [rsi+10h] cmp byte ptr [rax+3], 3 jnz loc_F6EF4 mov rdi, rbx; this mov edx, 1 xor ecx, ecx call _ZN6google8protobuf8compiler4java37WriteFieldEnumValueAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldEnumValueAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool) lea r15, [r14+10h] lea rdx, aJavaLangOverri_111; "@java.lang.Override\n$deprecation$publi"... mov rdi, rbx; this mov rsi, r15 call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) mov rcx, [r14+8] lea r12, a0oneof1+0Bh; "{" lea r13, aKotlinJvmJvmsy_32+0E3h; "}" mov rdi, rbx mov rsi, r12 mov rdx, r13 call _ZN6google8protobuf2io7Printer8AnnotateINS0_15FieldDescriptorEEEvPKcS6_PKT_; google::protobuf::io::Printer::Annotate<google::protobuf::FieldDescriptor>(char const*,char const*,google::protobuf::FieldDescriptor const*) mov rsi, [r14+8]; google::protobuf::FieldDescriptor * mov rdi, rbx; this mov edx, 2 mov ecx, 1 call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool) lea rdx, aDeprecationPub_112; "$deprecation$public Builder ${$set$capi"... mov rdi, rbx; this mov rsi, r15 call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) mov rcx, [r14+8] mov rdi, rbx mov rsi, r12 mov rdx, r13 call _ZN6google8protobuf2io7Printer8AnnotateINS0_15FieldDescriptorEEEvPKcS6_PKT_; google::protobuf::io::Printer::Annotate<google::protobuf::FieldDescriptor>(char const*,char const*,google::protobuf::FieldDescriptor const*) mov rsi, [r14+8]; google::protobuf::FieldDescriptor * loc_F6EF4: mov rdi, rbx; this mov edx, 1 xor ecx, ecx call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool) lea r15, [r14+10h] lea rdx, aJavaLangOverri_72; "@java.lang.Override\n$deprecation$publi"... mov rdi, rbx; this mov rsi, r15 call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) mov rcx, [r14+8] lea r12, a0oneof1+0Bh; "{" lea r13, aKotlinJvmJvmsy_32+0E3h; "}" mov rdi, rbx mov rsi, r12 mov rdx, r13 call _ZN6google8protobuf2io7Printer8AnnotateINS0_15FieldDescriptorEEEvPKcS6_PKT_; google::protobuf::io::Printer::Annotate<google::protobuf::FieldDescriptor>(char const*,char const*,google::protobuf::FieldDescriptor const*) mov rsi, [r14+8]; google::protobuf::FieldDescriptor * mov rdi, rbx; this mov edx, 2 mov ecx, 1 call _ZN6google8protobuf8compiler4java37WriteFieldEnumValueAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldEnumValueAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool) lea rdx, aDeprecationPub_57; "$deprecation$public Builder ${$set$capi"... mov rdi, rbx; this mov rsi, r15 call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) mov rcx, [r14+8] mov rdi, rbx mov rsi, r12 mov rdx, r13 call _ZN6google8protobuf2io7Printer8AnnotateINS0_15FieldDescriptorEEEvPKcS6_PKT_; google::protobuf::io::Printer::Annotate<google::protobuf::FieldDescriptor>(char const*,char const*,google::protobuf::FieldDescriptor const*) mov rsi, [r14+8]; google::protobuf::FieldDescriptor * mov rdi, rbx; this mov edx, 3 mov ecx, 1 call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool) lea rdx, aDeprecationPub_58; "$deprecation$public Builder ${$clear$ca"... mov rdi, rbx; this mov rsi, r15 call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) mov rcx, [r14+8] mov rdi, rbx mov rsi, r12 mov rdx, r13 pop rbx pop r12 pop r13 pop r14 pop r15 jmp _ZN6google8protobuf2io7Printer8AnnotateINS0_15FieldDescriptorEEEvPKcS6_PKT_; google::protobuf::io::Printer::Annotate<google::protobuf::FieldDescriptor>(char const*,char const*,google::protobuf::FieldDescriptor const*) loc_F6FB6: test al, 10h setz cl mov rax, [r15+28h] test rax, rax setz dl or dl, cl jnz loc_F6E5F cmp dword ptr [rax+4], 1 jnz loc_F6E22 mov rax, [rax+20h] test byte ptr [rax+1], 2 jz loc_F6E22 jmp loc_F6E5F
GenerateBuilderMembers: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV RBX,RSI MOV R14,RDI MOV R15,qword ptr [RDI + 0x8] MOV AL,byte ptr [R15 + 0x1] NOT AL TEST AL,0x60 JZ 0x001f6e5f MOV RDI,R15 CALL 0x0021d7ce TEST RAX,RAX JNZ 0x001f6e22 MOV AL,byte ptr [R15 + 0x1] TEST AL,0x2 JNZ 0x001f6e22 MOV RCX,qword ptr [R15 + 0x10] CMP byte ptr [RCX + 0x3],0x2 JNZ 0x001f6fb6 LAB_001f6e22: MOV RSI,qword ptr [R14 + 0x8] MOV RDI,RBX XOR EDX,EDX XOR ECX,ECX CALL 0x001cff9a LEA RSI,[R14 + 0x10] LEA RDX,[0x2dd7c4] MOV RDI,RBX CALL 0x0026cd32 MOV RCX,qword ptr [R14 + 0x8] LEA RSI,[0x2f00d9] LEA RDX,[0x2e06cd] MOV RDI,RBX CALL 0x001afc7e LAB_001f6e5f: MOV RSI,qword ptr [R14 + 0x8] MOV RAX,qword ptr [RSI + 0x10] CMP byte ptr [RAX + 0x3],0x3 JNZ 0x001f6ef4 MOV RDI,RBX MOV EDX,0x1 XOR ECX,ECX CALL 0x001d0175 LEA R15,[R14 + 0x10] LEA RDX,[0x2ea61b] MOV RDI,RBX MOV RSI,R15 CALL 0x0026cd32 MOV RCX,qword ptr [R14 + 0x8] LEA R12,[0x2f00d9] LEA R13,[0x2e06cd] MOV RDI,RBX MOV RSI,R12 MOV RDX,R13 CALL 0x001afc7e MOV RSI,qword ptr [R14 + 0x8] MOV RDI,RBX MOV EDX,0x2 MOV ECX,0x1 CALL 0x001cff9a LEA RDX,[0x2ea69f] MOV RDI,RBX MOV RSI,R15 CALL 0x0026cd32 MOV RCX,qword ptr [R14 + 0x8] MOV RDI,RBX MOV RSI,R12 MOV RDX,R13 CALL 0x001afc7e MOV RSI,qword ptr [R14 + 0x8] LAB_001f6ef4: MOV RDI,RBX MOV EDX,0x1 XOR ECX,ECX CALL 0x001cff9a LEA R15,[R14 + 0x10] LEA RDX,[0x2dd842] MOV RDI,RBX MOV RSI,R15 CALL 0x0026cd32 MOV RCX,qword ptr [R14 + 0x8] LEA R12,[0x2f00d9] LEA R13,[0x2e06cd] MOV RDI,RBX MOV RSI,R12 MOV RDX,R13 CALL 0x001afc7e MOV RSI,qword ptr [R14 + 0x8] MOV RDI,RBX MOV EDX,0x2 MOV ECX,0x1 CALL 0x001d0175 LEA RDX,[0x2ddda9] MOV RDI,RBX MOV RSI,R15 CALL 0x0026cd32 MOV RCX,qword ptr [R14 + 0x8] MOV RDI,RBX MOV RSI,R12 MOV RDX,R13 CALL 0x001afc7e MOV RSI,qword ptr [R14 + 0x8] MOV RDI,RBX MOV EDX,0x3 MOV ECX,0x1 CALL 0x001cff9a LEA RDX,[0x2dde3d] MOV RDI,RBX MOV RSI,R15 CALL 0x0026cd32 MOV RCX,qword ptr [R14 + 0x8] MOV RDI,RBX MOV RSI,R12 MOV RDX,R13 POP RBX POP R12 POP R13 POP R14 POP R15 JMP 0x001afc7e LAB_001f6fb6: TEST AL,0x10 SETZ CL MOV RAX,qword ptr [R15 + 0x28] TEST RAX,RAX SETZ DL OR DL,CL JNZ 0x001f6e5f CMP dword ptr [RAX + 0x4],0x1 JNZ 0x001f6e22 MOV RAX,qword ptr [RAX + 0x20] TEST byte ptr [RAX + 0x1],0x2 JZ 0x001f6e22 JMP 0x001f6e5f
/* google::protobuf::compiler::java::ImmutableEnumFieldLiteGenerator::GenerateBuilderMembers(google::protobuf::io::Printer*) const */ void __thiscall google::protobuf::compiler::java::ImmutableEnumFieldLiteGenerator::GenerateBuilderMembers (ImmutableEnumFieldLiteGenerator *this,Printer *param_1) { map *pmVar1; FieldDescriptor *this_00; long lVar2; this_00 = *(FieldDescriptor **)(this + 8); if (((~(byte)this_00[1] & 0x60) != 0) && ((((lVar2 = FieldDescriptor::message_type(this_00), lVar2 != 0 || (((byte)this_00[1] & 2) != 0) ) || (*(char *)(*(long *)(this_00 + 0x10) + 3) == '\x02')) || ((lVar2 = *(long *)(this_00 + 0x28), lVar2 != 0 && ((byte)this_00[1] & 0x10) != 0 && ((*(int *)(lVar2 + 4) != 1 || ((*(byte *)(*(long *)(lVar2 + 0x20) + 1) & 2) == 0)))))))) { WriteFieldAccessorDocComment(param_1,*(int8 *)(this + 8),0,0); io::Printer::Print(param_1,(map *)(this + 0x10), "@java.lang.Override\n$deprecation$public boolean ${$has$capitalized_name$$}$() {\n return instance.has$capitalized_name$();\n}\n" ); io::Printer::Annotate<google::protobuf::FieldDescriptor> (param_1,"{","}",*(FieldDescriptor **)(this + 8)); } lVar2 = *(long *)(this + 8); if (*(char *)(*(long *)(lVar2 + 0x10) + 3) == '\x03') { WriteFieldEnumValueAccessorDocComment(param_1,lVar2,1,0); io::Printer::Print(param_1,(map *)(this + 0x10), "@java.lang.Override\n$deprecation$public int ${$get$capitalized_name$Value$}$() {\n return instance.get$capitalized_name$Value();\n}\n" ); io::Printer::Annotate<google::protobuf::FieldDescriptor> (param_1,"{","}",*(FieldDescriptor **)(this + 8)); WriteFieldAccessorDocComment(param_1,*(int8 *)(this + 8),2,1); io::Printer::Print(param_1,(map *)(this + 0x10), "$deprecation$public Builder ${$set$capitalized_name$Value$}$(int value) {\n copyOnWrite();\n instance.set$capitalized_name$Value(value);\n return this;\n}\n" ); io::Printer::Annotate<google::protobuf::FieldDescriptor> (param_1,"{","}",*(FieldDescriptor **)(this + 8)); lVar2 = *(long *)(this + 8); } WriteFieldAccessorDocComment(param_1,lVar2,1,0); pmVar1 = (map *)(this + 0x10); io::Printer::Print(param_1,pmVar1, "@java.lang.Override\n$deprecation$public $type$ ${$get$capitalized_name$$}$() {\n return instance.get$capitalized_name$();\n}\n" ); io::Printer::Annotate<google::protobuf::FieldDescriptor> (param_1,"{","}",*(FieldDescriptor **)(this + 8)); WriteFieldEnumValueAccessorDocComment(param_1,*(int8 *)(this + 8),2,1); io::Printer::Print(param_1,pmVar1, "$deprecation$public Builder ${$set$capitalized_name$$}$($type$ value) {\n copyOnWrite();\n instance.set$capitalized_name$(value);\n return this;\n}\n" ); io::Printer::Annotate<google::protobuf::FieldDescriptor> (param_1,"{","}",*(FieldDescriptor **)(this + 8)); WriteFieldAccessorDocComment(param_1,*(int8 *)(this + 8),3,1); io::Printer::Print(param_1,pmVar1, "$deprecation$public Builder ${$clear$capitalized_name$$}$() {\n copyOnWrite();\n instance.clear$capitalized_name$();\n return this;\n}\n" ); io::Printer::Annotate<google::protobuf::FieldDescriptor> (param_1,"{","}",*(FieldDescriptor **)(this + 8)); return; }
23,476
postprocess_cpu_params(cpu_params&, cpu_params const*)
monkey531[P]llama/common/common.cpp
void postprocess_cpu_params(cpu_params& cpuparams, const cpu_params* role_model) { int32_t n_set = 0; if (cpuparams.n_threads < 0) { // Assuming everything about cpuparams is invalid if (role_model != nullptr) { cpuparams = *role_model; } else { cpuparams.n_threads = cpu_get_num_math(); } } for (int32_t i = 0; i < GGML_MAX_N_THREADS; i++) { if (cpuparams.cpumask[i]) { n_set++; } } if (n_set && n_set < cpuparams.n_threads) { // Not enough set bits, may experience performance issues. LOG_WRN("Not enough set bits in CPU mask (%d) to satisfy requested thread count: %d\n", n_set, cpuparams.n_threads); } }
O3
cpp
postprocess_cpu_params(cpu_params&, cpu_params const*): pushq %rbp pushq %rbx pushq %rax movq %rdi, %rbx cmpl $0x0, (%rdi) jns 0x9588a testq %rsi, %rsi je 0x95883 movl $0x214, %edx # imm = 0x214 movq %rbx, %rdi callq 0x1d9e0 jmp 0x9588a callq 0x95676 movl %eax, (%rbx) pxor %xmm1, %xmm1 movl $0x4, %eax pxor %xmm0, %xmm0 movd (%rbx,%rax), %xmm2 punpcklbw %xmm1, %xmm2 # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1],xmm2[2],xmm1[2],xmm2[3],xmm1[3],xmm2[4],xmm1[4],xmm2[5],xmm1[5],xmm2[6],xmm1[6],xmm2[7],xmm1[7] punpcklwd %xmm1, %xmm2 # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1],xmm2[2],xmm1[2],xmm2[3],xmm1[3] paddd %xmm2, %xmm0 addq $0x4, %rax cmpq $0x204, %rax # imm = 0x204 jne 0x95897 pshufd $0xee, %xmm0, %xmm1 # xmm1 = xmm0[2,3,2,3] paddd %xmm0, %xmm1 pshufd $0x55, %xmm1, %xmm0 # xmm0 = xmm1[1,1,1,1] paddd %xmm1, %xmm0 movd %xmm0, %ebp testl %ebp, %ebp je 0x95904 cmpl (%rbx), %ebp jge 0x95904 leaq 0xc1fcf(%rip), %rax # 0x1578a8 cmpl $0x0, (%rax) js 0x95904 callq 0xefaeb movl (%rbx), %r8d leaq 0x7e832(%rip), %rdx # 0x11411f movq %rax, %rdi movl $0x3, %esi movl %ebp, %ecx xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %rbp jmp 0xefb88 addq $0x8, %rsp popq %rbx popq %rbp retq
_Z22postprocess_cpu_paramsR10cpu_paramsPKS_: push rbp push rbx push rax mov rbx, rdi cmp dword ptr [rdi], 0 jns short loc_9588A test rsi, rsi jz short loc_95883 mov edx, 214h mov rdi, rbx call _memcpy jmp short loc_9588A loc_95883: call _Z16cpu_get_num_mathv; cpu_get_num_math(void) mov [rbx], eax loc_9588A: pxor xmm1, xmm1 mov eax, 4 pxor xmm0, xmm0 loc_95897: movd xmm2, dword ptr [rbx+rax] punpcklbw xmm2, xmm1 punpcklwd xmm2, xmm1 paddd xmm0, xmm2 add rax, 4 cmp rax, 204h jnz short loc_95897 pshufd xmm1, xmm0, 0EEh paddd xmm1, xmm0 pshufd xmm0, xmm1, 55h ; 'U' paddd xmm0, xmm1 movd ebp, xmm0 test ebp, ebp jz short loc_95904 cmp ebp, [rbx] jge short loc_95904 lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js short loc_95904 call _Z15common_log_mainv; common_log_main(void) mov r8d, [rbx] lea rdx, aNotEnoughSetBi; "Not enough set bits in CPU mask (%d) to"... mov rdi, rax mov esi, 3 mov ecx, ebp xor eax, eax add rsp, 8 pop rbx pop rbp jmp _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) loc_95904: add rsp, 8 pop rbx pop rbp retn
int * postprocess_cpu_params(int *a1, long long a2) { int *result; // rax __m128i v3; // xmm0 __m128i v4; // xmm1 int v5; // ebp int v6; // eax int v7; // r9d if ( *a1 < 0 ) { if ( a2 ) memcpy(a1, a2, 532LL); else *a1 = cpu_get_num_math(); } result = (_DWORD *)&byte_4; v3 = 0LL; do v3 = _mm_add_epi32( v3, _mm_unpacklo_epi16( _mm_unpacklo_epi8(_mm_cvtsi32_si128(*(int *)((char *)result++ + (_QWORD)a1)), (__m128i)0LL), (__m128i)0LL)); while ( result != &dword_204 ); v4 = _mm_add_epi32(_mm_shuffle_epi32(v3, 238), v3); v5 = _mm_cvtsi128_si32(_mm_add_epi32(_mm_shuffle_epi32(v4, 85), v4)); if ( v5 && v5 < *a1 ) { result = (int *)&common_log_verbosity_thold; if ( common_log_verbosity_thold >= 0 ) { v6 = common_log_main(); return (int *)common_log_add( v6, 3, (unsigned int)"Not enough set bits in CPU mask (%d) to satisfy requested thread count: %d\n", v5, *a1, v7); } } return result; }
postprocess_cpu_params: PUSH RBP PUSH RBX PUSH RAX MOV RBX,RDI CMP dword ptr [RDI],0x0 JNS 0x0019588a TEST RSI,RSI JZ 0x00195883 MOV EDX,0x214 MOV RDI,RBX CALL 0x0011d9e0 JMP 0x0019588a LAB_00195883: CALL 0x00195676 MOV dword ptr [RBX],EAX LAB_0019588a: PXOR XMM1,XMM1 MOV EAX,0x4 PXOR XMM0,XMM0 LAB_00195897: MOVD XMM2,dword ptr [RBX + RAX*0x1] PUNPCKLBW XMM2,XMM1 PUNPCKLWD XMM2,XMM1 PADDD XMM0,XMM2 ADD RAX,0x4 CMP RAX,0x204 JNZ 0x00195897 PSHUFD XMM1,XMM0,0xee PADDD XMM1,XMM0 PSHUFD XMM0,XMM1,0x55 PADDD XMM0,XMM1 MOVD EBP,XMM0 TEST EBP,EBP JZ 0x00195904 CMP EBP,dword ptr [RBX] JGE 0x00195904 LEA RAX,[0x2578a8] CMP dword ptr [RAX],0x0 JS 0x00195904 CALL 0x001efaeb MOV R8D,dword ptr [RBX] LEA RDX,[0x21411f] MOV RDI,RAX MOV ESI,0x3 MOV ECX,EBP XOR EAX,EAX ADD RSP,0x8 POP RBX POP RBP JMP 0x001efb88 LAB_00195904: ADD RSP,0x8 POP RBX POP RBP RET
/* postprocess_cpu_params(cpu_params&, cpu_params const*) */ void postprocess_cpu_params(cpu_params *param_1,cpu_params *param_2) { int1 auVar1 [13]; int1 auVar2 [13]; int1 auVar3 [13]; ulong uVar4; int1 auVar5 [13]; int4 uVar6; long lVar7; int8 uVar8; int iVar9; int iVar10; int iVar11; int iVar12; if (*(int *)param_1 < 0) { if (param_2 == (cpu_params *)0x0) { uVar6 = cpu_get_num_math(); *(int4 *)param_1 = uVar6; } else { memcpy(param_1,param_2,0x214); } } lVar7 = 4; iVar9 = 0; iVar10 = 0; iVar11 = 0; iVar12 = 0; do { uVar6 = *(int4 *)(param_1 + lVar7); uVar4 = (ulong)(ushort)uVar6 & 0xffffffffffff00ff; auVar1._8_4_ = 0; auVar1._0_8_ = uVar4; auVar1[0xc] = (char)((uint)uVar6 >> 0x18); auVar2[8] = (char)((uint)uVar6 >> 0x10); auVar2._0_8_ = uVar4; auVar2[9] = 0; auVar2._10_3_ = auVar1._10_3_; auVar5._5_8_ = 0; auVar5._0_5_ = auVar2._8_5_; auVar3[4] = (char)((uint)uVar6 >> 8); auVar3._0_4_ = (int)uVar4; auVar3[5] = 0; auVar3._6_7_ = SUB137(auVar5 << 0x40,6); iVar9 = iVar9 + (int)uVar4; iVar10 = iVar10 + auVar3._4_4_; iVar11 = iVar11 + auVar2._8_4_; iVar12 = iVar12 + (uint)(uint3)(auVar1._10_3_ >> 0x10); lVar7 = lVar7 + 4; } while (lVar7 != 0x204); iVar9 = iVar12 + iVar10 + iVar11 + iVar9; if (((iVar9 != 0) && (iVar9 < *(int *)param_1)) && (-1 < common_log_verbosity_thold)) { uVar8 = common_log_main(); common_log_add(uVar8,3, "Not enough set bits in CPU mask (%d) to satisfy requested thread count: %d\n", iVar9,*(int4 *)param_1); return; } return; }
23,477
codegen_generate_vector_literal
eshkol/src/backend/codegen/literals.c
bool codegen_generate_vector_literal(CodegenContext* context, const AstNode* node) { assert(context != NULL); assert(node != NULL); assert(node->type == AST_LITERAL_VECTOR); // Get output file FILE* output = codegen_context_get_output(context); // Get type context TypeInferenceContext* type_context = codegen_context_get_type_context(context); // Get vector type Type* vector_type = type_inference_get_type(type_context, node); if (!vector_type) { DiagnosticContext* diagnostics = codegen_context_get_diagnostics(context); diagnostic_error(diagnostics, node->line, node->column, "Vector literal has no type"); return false; } // Get element type Type* element_type = NULL; if (vector_type->kind == TYPE_VECTOR) { element_type = vector_type->vector.element_type; } if (!element_type) { DiagnosticContext* diagnostics = codegen_context_get_diagnostics(context); diagnostic_error(diagnostics, node->line, node->column, "Vector type has no element type"); return false; } // Get element type string const char* element_type_str = codegen_type_to_c_type(element_type); // Generate code fprintf(output, "vector_%s_create_from_array(arena, (", element_type_str); fprintf(output, "%s[]){", element_type_str); // Generate elements for (size_t i = 0; i < node->as.vector.count; i++) { if (i > 0) { fprintf(output, ", "); } // Generate element if (!codegen_generate_expression(context, node->as.vector.elements[i])) { return false; } } // Close vector fprintf(output, "}, %zu)", node->as.vector.count); return true; }
O3
c
codegen_generate_vector_literal: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax testq %rdi, %rdi je 0x5ddf movq %rsi, %rbx testq %rsi, %rsi je 0x5dfe cmpl $0x4, (%rbx) jne 0x5e1d movq %rdi, %r14 callq 0x3c55 movq %rax, %r15 movq %r14, %rdi callq 0x3c28 movq %rax, %rdi movq %rbx, %rsi callq 0x37f1 testq %rax, %rax je 0x5db1 cmpl $0x8, (%rax) jne 0x5d9a movq 0x8(%rax), %rdi testq %rdi, %rdi je 0x5d9a callq 0x9320 movq %rax, %r12 leaq 0xac0d(%rip), %rsi # 0x10923 xorl %r13d, %r13d movq %r15, %rdi movq %rax, %rdx xorl %eax, %eax callq 0x1190 leaq 0xac1b(%rip), %rsi # 0x10948 movq %r15, %rdi movq %r12, %rdx xorl %eax, %eax callq 0x1190 cmpq $0x0, 0x50(%rbx) je 0x5d82 xorl %r12d, %r12d testq %r12, %r12 je 0x5d62 movl $0x2, %esi movl $0x1, %edx leaq 0xb11d(%rip), %rdi # 0x10e77 movq %r15, %rcx callq 0x1220 movq 0x48(%rbx), %rax movq (%rax,%r12,8), %rsi movq %r14, %rdi callq 0x56c0 testb %al, %al je 0x5dce incq %r12 movq 0x50(%rbx), %r13 cmpq %r13, %r12 jb 0x5d44 leaq 0xabc6(%rip), %rsi # 0x1094f movq %r15, %rdi movq %r13, %rdx xorl %eax, %eax callq 0x1190 movb $0x1, %al jmp 0x5dd0 movq %r14, %rdi callq 0x3bfb movl 0x8(%rbx), %esi movl 0x10(%rbx), %edx leaq 0xab54(%rip), %rcx # 0x10903 jmp 0x5dc6 movq %r14, %rdi callq 0x3bfb movl 0x8(%rbx), %esi movl 0x10(%rbx), %edx leaq 0xab22(%rip), %rcx # 0x108e8 movq %rax, %rdi callq 0x29be xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x82b3(%rip), %rdi # 0xe099 leaq 0xa887(%rip), %rsi # 0x10674 leaq 0xaa8a(%rip), %rcx # 0x1087e movl $0x56, %edx callq 0x1130 leaq 0x9007(%rip), %rdi # 0xee0c leaq 0xa868(%rip), %rsi # 0x10674 leaq 0xaa6b(%rip), %rcx # 0x1087e movl $0x57, %edx callq 0x1130 leaq 0xaaa3(%rip), %rdi # 0x108c7 leaq 0xa849(%rip), %rsi # 0x10674 leaq 0xaa4c(%rip), %rcx # 0x1087e movl $0x58, %edx callq 0x1130
codegen_generate_vector_literal: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax test rdi, rdi jz loc_5DDF mov rbx, rsi test rsi, rsi jz loc_5DFE cmp dword ptr [rbx], 4 jnz loc_5E1D mov r14, rdi call codegen_context_get_output mov r15, rax mov rdi, r14 call codegen_context_get_type_context mov rdi, rax mov rsi, rbx call type_inference_get_type test rax, rax jz loc_5DB1 cmp dword ptr [rax], 8 jnz loc_5D9A mov rdi, [rax+8] test rdi, rdi jz loc_5D9A call codegen_type_to_c_type mov r12, rax lea rsi, aVectorSCreateF; "vector_%s_create_from_array(arena, (" xor r13d, r13d mov rdi, r15 mov rdx, rax xor eax, eax call _fprintf lea rsi, aS_2; "%s[]){" mov rdi, r15 mov rdx, r12 xor eax, eax call _fprintf cmp qword ptr [rbx+50h], 0 jz short loc_5D82 xor r12d, r12d loc_5D44: test r12, r12 jz short loc_5D62 mov esi, 2 mov edx, 1 lea rdi, aCharBuffer64Sn+3Ah; ", " mov rcx, r15 call _fwrite loc_5D62: mov rax, [rbx+48h] mov rsi, [rax+r12*8] mov rdi, r14 call codegen_generate_expression test al, al jz short loc_5DCE inc r12 mov r13, [rbx+50h] cmp r12, r13 jb short loc_5D44 loc_5D82: lea rsi, aZu; "}, %zu)" mov rdi, r15 mov rdx, r13 xor eax, eax call _fprintf mov al, 1 jmp short loc_5DD0 loc_5D9A: mov rdi, r14 call codegen_context_get_diagnostics mov esi, [rbx+8] mov edx, [rbx+10h] lea rcx, aVectorTypeHasN; "Vector type has no element type" jmp short loc_5DC6 loc_5DB1: mov rdi, r14 call codegen_context_get_diagnostics mov esi, [rbx+8] mov edx, [rbx+10h] lea rcx, aVectorLiteralH; "Vector literal has no type" loc_5DC6: mov rdi, rax call diagnostic_error loc_5DCE: xor eax, eax loc_5DD0: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_5DDF: lea rdi, aTypeContextNul+5; "context != NULL" lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eshkol"... lea rcx, aBoolCodegenGen_9; "_Bool codegen_generate_vector_literal(C"... mov edx, 56h ; 'V' call ___assert_fail loc_5DFE: lea rdi, aNodeNull; "node != NULL" lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eshkol"... lea rcx, aBoolCodegenGen_9; "_Bool codegen_generate_vector_literal(C"... mov edx, 57h ; 'W' call ___assert_fail loc_5E1D: lea rdi, aNodeTypeAstLit_3; "node->type == AST_LITERAL_VECTOR" lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eshkol"... lea rcx, aBoolCodegenGen_9; "_Bool codegen_generate_vector_literal(C"... mov edx, 58h ; 'X' call ___assert_fail
char codegen_generate_vector_literal(long long a1, long long a2) { long long output; // r15 _QWORD *type_context; // rax long long type; // rax long long v7; // rdx long long v8; // rdi const char *v9; // r12 unsigned long long v10; // r13 unsigned long long v11; // r12 long long *diagnostics; // rax long long v14; // r8 long long v15; // r9 unsigned int v16; // esi unsigned int v17; // edx const char *v18; // rcx if ( !a1 ) __assert_fail( "context != NULL", "/workspace/llm4binary/github2025/eshkol/src/backend/codegen/literals.c", 86LL, "_Bool codegen_generate_vector_literal(CodegenContext *, const AstNode *)"); if ( !a2 ) __assert_fail( "node != NULL", "/workspace/llm4binary/github2025/eshkol/src/backend/codegen/literals.c", 87LL, "_Bool codegen_generate_vector_literal(CodegenContext *, const AstNode *)"); if ( *(_DWORD *)a2 != 4 ) __assert_fail( "node->type == AST_LITERAL_VECTOR", "/workspace/llm4binary/github2025/eshkol/src/backend/codegen/literals.c", 88LL, "_Bool codegen_generate_vector_literal(CodegenContext *, const AstNode *)"); output = codegen_context_get_output(a1); type_context = (_QWORD *)codegen_context_get_type_context(a1); type = type_inference_get_type(type_context, a2); if ( !type ) { diagnostics = (long long *)codegen_context_get_diagnostics(a1); v16 = *(_DWORD *)(a2 + 8); v17 = *(_DWORD *)(a2 + 16); v18 = "Vector literal has no type"; goto LABEL_16; } if ( *(_DWORD *)type != 8 || (v8 = *(_QWORD *)(type + 8)) == 0 ) { diagnostics = (long long *)codegen_context_get_diagnostics(a1); v16 = *(_DWORD *)(a2 + 8); v17 = *(_DWORD *)(a2 + 16); v18 = "Vector type has no element type"; LABEL_16: diagnostic_error(diagnostics, v16, v17, (long long)v18, v14, v15); return 0; } v9 = (const char *)codegen_type_to_c_type(v8, a2, v7); v10 = 0LL; fprintf(output, "vector_%s_create_from_array(arena, (", v9); fprintf(output, "%s[]){", v9); if ( !*(_QWORD *)(a2 + 80) ) { LABEL_13: fprintf(output, "}, %zu)", v10); return 1; } v11 = 0LL; while ( 1 ) { if ( v11 ) fwrite(", ", 2LL, 1LL, output); if ( !(unsigned __int8)codegen_generate_expression(a1, *(_DWORD **)(*(_QWORD *)(a2 + 72) + 8 * v11)) ) return 0; ++v11; v10 = *(_QWORD *)(a2 + 80); if ( v11 >= v10 ) goto LABEL_13; } }
codegen_generate_vector_literal: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX TEST RDI,RDI JZ 0x00105ddf MOV RBX,RSI TEST RSI,RSI JZ 0x00105dfe CMP dword ptr [RBX],0x4 JNZ 0x00105e1d MOV R14,RDI CALL 0x00103c55 MOV R15,RAX MOV RDI,R14 CALL 0x00103c28 MOV RDI,RAX MOV RSI,RBX CALL 0x001037f1 TEST RAX,RAX JZ 0x00105db1 CMP dword ptr [RAX],0x8 JNZ 0x00105d9a MOV RDI,qword ptr [RAX + 0x8] TEST RDI,RDI JZ 0x00105d9a CALL 0x00109320 MOV R12,RAX LEA RSI,[0x110923] XOR R13D,R13D MOV RDI,R15 MOV RDX,RAX XOR EAX,EAX CALL 0x00101190 LEA RSI,[0x110948] MOV RDI,R15 MOV RDX,R12 XOR EAX,EAX CALL 0x00101190 CMP qword ptr [RBX + 0x50],0x0 JZ 0x00105d82 XOR R12D,R12D LAB_00105d44: TEST R12,R12 JZ 0x00105d62 MOV ESI,0x2 MOV EDX,0x1 LEA RDI,[0x110e77] MOV RCX,R15 CALL 0x00101220 LAB_00105d62: MOV RAX,qword ptr [RBX + 0x48] MOV RSI,qword ptr [RAX + R12*0x8] MOV RDI,R14 CALL 0x001056c0 TEST AL,AL JZ 0x00105dce INC R12 MOV R13,qword ptr [RBX + 0x50] CMP R12,R13 JC 0x00105d44 LAB_00105d82: LEA RSI,[0x11094f] MOV RDI,R15 MOV RDX,R13 XOR EAX,EAX CALL 0x00101190 MOV AL,0x1 JMP 0x00105dd0 LAB_00105d9a: MOV RDI,R14 CALL 0x00103bfb MOV ESI,dword ptr [RBX + 0x8] MOV EDX,dword ptr [RBX + 0x10] LEA RCX,[0x110903] JMP 0x00105dc6 LAB_00105db1: MOV RDI,R14 CALL 0x00103bfb MOV ESI,dword ptr [RBX + 0x8] MOV EDX,dword ptr [RBX + 0x10] LEA RCX,[0x1108e8] LAB_00105dc6: MOV RDI,RAX CALL 0x001029be LAB_00105dce: XOR EAX,EAX LAB_00105dd0: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00105ddf: LEA RDI,[0x10e099] LEA RSI,[0x110674] LEA RCX,[0x11087e] MOV EDX,0x56 CALL 0x00101130 LAB_00105dfe: LEA RDI,[0x10ee0c] LEA RSI,[0x110674] LEA RCX,[0x11087e] MOV EDX,0x57 CALL 0x00101130 LAB_00105e1d: LEA RDI,[0x1108c7] LEA RSI,[0x110674] LEA RCX,[0x11087e] MOV EDX,0x58 CALL 0x00101130
int8 codegen_generate_vector_literal(long param_1,int *param_2) { int iVar1; char cVar2; int iVar3; FILE *__stream; int8 uVar4; int *piVar5; int4 extraout_var; char *pcVar6; ulong uVar7; ulong uVar8; if (param_1 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("context != NULL", "/workspace/llm4binary/github2025/eshkol/src/backend/codegen/literals.c",0x56, "_Bool codegen_generate_vector_literal(CodegenContext *, const AstNode *)"); } if (param_2 != (int *)0x0) { if (*param_2 != 4) { /* WARNING: Subroutine does not return */ __assert_fail("node->type == AST_LITERAL_VECTOR", "/workspace/llm4binary/github2025/eshkol/src/backend/codegen/literals.c",0x58, "_Bool codegen_generate_vector_literal(CodegenContext *, const AstNode *)"); } __stream = (FILE *)codegen_context_get_output(); uVar4 = codegen_context_get_type_context(param_1); piVar5 = (int *)type_inference_get_type(uVar4,param_2); if (piVar5 == (int *)0x0) { uVar4 = codegen_context_get_diagnostics(param_1); iVar3 = param_2[2]; iVar1 = param_2[4]; pcVar6 = "Vector literal has no type"; } else { if ((*piVar5 == 8) && (*(long *)(piVar5 + 2) != 0)) { uVar4 = codegen_type_to_c_type(); uVar8 = 0; fprintf(__stream,"vector_%s_create_from_array(arena, (",uVar4); fprintf(__stream,"%s[]){",uVar4); if (*(long *)(param_2 + 0x14) != 0) { uVar7 = 0; do { if (uVar7 != 0) { fwrite(", ",2,1,__stream); } cVar2 = codegen_generate_expression (param_1,*(int8 *)(*(long *)(param_2 + 0x12) + uVar7 * 8)); if (cVar2 == '\0') { return 0; } uVar7 = uVar7 + 1; uVar8 = *(ulong *)(param_2 + 0x14); } while (uVar7 < uVar8); } iVar3 = fprintf(__stream,"}, %zu)",uVar8); return CONCAT71((int7)(CONCAT44(extraout_var,iVar3) >> 8),1); } uVar4 = codegen_context_get_diagnostics(param_1); iVar3 = param_2[2]; iVar1 = param_2[4]; pcVar6 = "Vector type has no element type"; } diagnostic_error(uVar4,iVar3,iVar1,pcVar6); return 0; } /* WARNING: Subroutine does not return */ __assert_fail("node != NULL", "/workspace/llm4binary/github2025/eshkol/src/backend/codegen/literals.c",0x57, "_Bool codegen_generate_vector_literal(CodegenContext *, const AstNode *)"); }
23,478
testing::internal::OsStackTraceGetter::CurrentStackTrace[abi:cxx11](int, int)
giladroyz[P]FindPeaks/build_O0/_deps/googletest-src/googletest/src/gtest.cc
GTEST_LOCK_EXCLUDED_(mutex_) { #ifdef GTEST_HAS_ABSL std::string result; if (max_depth <= 0) { return result; } max_depth = std::min(max_depth, kMaxStackTraceDepth); std::vector<void*> raw_stack(max_depth); // Skips the frames requested by the caller, plus this function. const int raw_stack_size = absl::GetStackTrace(&raw_stack[0], max_depth, skip_count + 1); void* caller_frame = nullptr; { MutexLock lock(&mutex_); caller_frame = caller_frame_; } for (int i = 0; i < raw_stack_size; ++i) { if (raw_stack[i] == caller_frame && !GTEST_FLAG_GET(show_internal_stack_frames)) { // Add a marker to the trace and stop adding frames. absl::StrAppend(&result, kElidedFramesMarker, "\n"); break; } char tmp[1024]; const char* symbol = "(unknown)"; if (absl::Symbolize(raw_stack[i], tmp, sizeof(tmp))) { symbol = tmp; } char line[1024]; snprintf(line, sizeof(line), " %p: %s\n", raw_stack[i], symbol); result += line; } return result; #else // !GTEST_HAS_ABSL static_cast<void>(max_depth); static_cast<void>(skip_count); return ""; #endif // GTEST_HAS_ABSL }
O0
cpp
testing::internal::OsStackTraceGetter::CurrentStackTrace[abi:cxx11](int, int): pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x40(%rbp) movq %rdi, %rax movq %rax, -0x48(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movl %ecx, -0x18(%rbp) leaq -0x19(%rbp), %rdi movq %rdi, -0x38(%rbp) callq 0xac10 movq -0x40(%rbp), %rdi movq -0x38(%rbp), %rdx leaq 0x3fd3a(%rip), %rsi # 0x7b947 callq 0xa9c0 jmp 0x3bc14 leaq -0x19(%rbp), %rdi callq 0xa6e0 movq -0x48(%rbp), %rax addq $0x50, %rsp popq %rbp retq movq %rax, %rcx movl %edx, %eax movq %rcx, -0x28(%rbp) movl %eax, -0x2c(%rbp) leaq -0x19(%rbp), %rdi callq 0xa6e0 movq -0x28(%rbp), %rdi callq 0xac00 nopw %cs:(%rax,%rax)
_ZN7testing8internal18OsStackTraceGetter17CurrentStackTraceB5cxx11Eii: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_40], rdi mov rax, rdi mov [rbp+var_48], rax mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_18], ecx lea rdi, [rbp+var_19] mov [rbp+var_38], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdi, [rbp+var_40] mov rdx, [rbp+var_38] lea rsi, aSFromSSMsTotal+1Ah; "" call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&) jmp short $+2 loc_3BC14: lea rdi, [rbp+var_19] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rax, [rbp+var_48] add rsp, 50h pop rbp retn mov rcx, rax mov eax, edx mov [rbp+var_28], rcx mov [rbp+var_2C], eax lea rdi, [rbp+var_19] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rdi, [rbp+var_28] call __Unwind_Resume
long long testing::internal::OsStackTraceGetter::CurrentStackTrace[abi:cxx11]( long long a1, long long a2, long long a3, int a4) { char v5; // [rsp+37h] [rbp-19h] BYREF int v6; // [rsp+38h] [rbp-18h] int v7; // [rsp+3Ch] [rbp-14h] long long v8; // [rsp+40h] [rbp-10h] long long v9; // [rsp+48h] [rbp-8h] v9 = a1; v8 = a2; v7 = a3; v6 = a4; std::allocator<char>::allocator(&v5, a2, a3); std::string::basic_string(a1, "", &v5); std::allocator<char>::~allocator(&v5); return a1; }
CurrentStackTrace[abi:cxx11]: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x40],RDI MOV RAX,RDI MOV qword ptr [RBP + -0x48],RAX MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV dword ptr [RBP + -0x18],ECX LEA RDI,[RBP + -0x19] MOV qword ptr [RBP + -0x38],RDI CALL 0x0010ac10 MOV RDI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x38] LAB_0013bc06: LEA RSI,[0x17b947] CALL 0x0010a9c0 LAB_0013bc12: JMP 0x0013bc14 LAB_0013bc14: LEA RDI,[RBP + -0x19] CALL 0x0010a6e0 MOV RAX,qword ptr [RBP + -0x48] ADD RSP,0x50 POP RBP RET
/* testing::internal::OsStackTraceGetter::CurrentStackTrace[abi:cxx11](int, int) */ string * testing::internal::OsStackTraceGetter::CurrentStackTrace_abi_cxx11_ (int param_1,int param_2) { int4 in_register_00000034; int4 in_register_0000003c; string *this; allocator local_21 [9]; int8 local_18; string *local_10; this = (string *)CONCAT44(in_register_0000003c,param_1); local_18 = CONCAT44(in_register_00000034,param_2); local_10 = this; std::allocator<char>::allocator(); /* try { // try from 0013bc06 to 0013bc11 has its CatchHandler @ 0013bc27 */ std::__cxx11::string::string(this,"",local_21); std::allocator<char>::~allocator((allocator<char> *)local_21); return this; }
23,479
js_build_mapped_arguments
bluesky950520[P]quickjs/quickjs.c
static JSValue js_build_mapped_arguments(JSContext *ctx, int argc, JSValue *argv, JSStackFrame *sf, int arg_count) { JSValue val; JSProperty *pr; JSObject *p; int i; val = JS_NewObjectProtoClass(ctx, ctx->class_proto[JS_CLASS_OBJECT], JS_CLASS_MAPPED_ARGUMENTS); if (JS_IsException(val)) return val; p = JS_VALUE_GET_OBJ(val); /* add the length field (cannot fail) */ pr = add_property(ctx, p, JS_ATOM_length, JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE); if (!pr) goto fail; pr->u.value = js_int32(argc); for(i = 0; i < arg_count; i++) { JSVarRef *var_ref; var_ref = get_var_ref(ctx, sf, i, TRUE); if (!var_ref) goto fail; pr = add_property(ctx, p, __JS_AtomFromUInt32(i), JS_PROP_C_W_E | JS_PROP_VARREF); if (!pr) { free_var_ref(ctx->rt, var_ref); goto fail; } pr->u.var_ref = var_ref; } /* the arguments not mapped to the arguments of the function can be normal properties */ for(i = arg_count; i < argc; i++) { if (JS_DefinePropertyValueUint32(ctx, val, i, js_dup(argv[i]), JS_PROP_C_W_E) < 0) goto fail; } JS_DefinePropertyValue(ctx, val, JS_ATOM_Symbol_iterator, js_dup(ctx->array_proto_values), JS_PROP_CONFIGURABLE | JS_PROP_WRITABLE); /* callee returns this function in non strict mode */ JS_DefinePropertyValue(ctx, val, JS_ATOM_callee, js_dup(ctx->rt->current_stack_frame->cur_func), JS_PROP_CONFIGURABLE | JS_PROP_WRITABLE); return val; fail: JS_FreeValue(ctx, val); return JS_EXCEPTION; }
O0
c
js_build_mapped_arguments: subq $0xf8, %rsp movq %rdi, 0xe0(%rsp) movl %esi, 0xdc(%rsp) movq %rdx, 0xd0(%rsp) movq %rcx, 0xc8(%rsp) movl %r8d, 0xc4(%rsp) movq 0xe0(%rsp), %rdi movq 0xe0(%rsp), %rax movq 0x40(%rax), %rax movq 0x10(%rax), %rsi movq 0x18(%rax), %rdx movl $0x9, %ecx callq 0x30190 movq %rax, 0x88(%rsp) movq %rdx, 0x90(%rsp) movq 0x88(%rsp), %rax movq %rax, 0xb0(%rsp) movq 0x90(%rsp), %rax movq %rax, 0xb8(%rsp) movq 0xb0(%rsp), %rdi movq 0xb8(%rsp), %rsi callq 0x29fb0 cmpl $0x0, %eax je 0x6aaa3 movq 0xb0(%rsp), %rax movq %rax, 0xe8(%rsp) movq 0xb8(%rsp), %rax movq %rax, 0xf0(%rsp) jmp 0x6ade5 movq 0xb0(%rsp), %rax movq %rax, 0xa0(%rsp) movq 0xe0(%rsp), %rdi movq 0xa0(%rsp), %rsi movl $0x32, %edx movl $0x3, %ecx callq 0x64030 movq %rax, 0xa8(%rsp) cmpq $0x0, 0xa8(%rsp) jne 0x6aaea jmp 0x6adb1 movq 0xa8(%rsp), %rax movq %rax, 0x38(%rsp) movl 0xdc(%rsp), %edi callq 0x39fb0 movq %rax, %rcx movq 0x38(%rsp), %rax movq %rcx, 0x78(%rsp) movq %rdx, 0x80(%rsp) movq 0x78(%rsp), %rcx movq %rcx, (%rax) movq 0x80(%rsp), %rcx movq %rcx, 0x8(%rax) movl $0x0, 0x9c(%rsp) movl 0x9c(%rsp), %eax cmpl 0xc4(%rsp), %eax jge 0x6ac0e movq 0xe0(%rsp), %rdi movq 0xc8(%rsp), %rsi movl 0x9c(%rsp), %edx movl $0x1, %ecx callq 0x6d560 movq %rax, 0x70(%rsp) cmpq $0x0, 0x70(%rsp) jne 0x6ab7e jmp 0x6adb1 movq 0xe0(%rsp), %rax movq %rax, 0x28(%rsp) movq 0xa0(%rsp), %rax movq %rax, 0x30(%rsp) movl 0x9c(%rsp), %edi callq 0x2e8a0 movq 0x28(%rsp), %rdi movq 0x30(%rsp), %rsi movl %eax, %edx movl $0x27, %ecx callq 0x64030 movq %rax, 0xa8(%rsp) cmpq $0x0, 0xa8(%rsp) jne 0x6abe8 movq 0xe0(%rsp), %rax movq 0x18(%rax), %rdi movq 0x70(%rsp), %rsi callq 0x3bd80 jmp 0x6adb1 movq 0x70(%rsp), %rcx movq 0xa8(%rsp), %rax movq %rcx, (%rax) movl 0x9c(%rsp), %eax addl $0x1, %eax movl %eax, 0x9c(%rsp) jmp 0x6ab37 movl 0xc4(%rsp), %eax movl %eax, 0x9c(%rsp) movl 0x9c(%rsp), %eax cmpl 0xdc(%rsp), %eax jge 0x6acc6 movq 0xe0(%rsp), %rax movq %rax, 0x18(%rsp) movl 0x9c(%rsp), %eax movl %eax, 0x24(%rsp) movq 0xd0(%rsp), %rax movslq 0x9c(%rsp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq (%rax), %rdi movq 0x8(%rax), %rsi callq 0x279c0 movq 0x18(%rsp), %rdi movl 0x24(%rsp), %ecx movq %rax, 0x60(%rsp) movq %rdx, 0x68(%rsp) movq 0xb0(%rsp), %rsi movq 0xb8(%rsp), %rdx movq 0x60(%rsp), %r8 movq 0x68(%rsp), %r9 movl $0x7, (%rsp) callq 0x3d660 cmpl $0x0, %eax jge 0x6acae jmp 0x6adb1 jmp 0x6acb0 movl 0x9c(%rsp), %eax addl $0x1, %eax movl %eax, 0x9c(%rsp) jmp 0x6ac1c movq 0xe0(%rsp), %rax movq %rax, 0x8(%rsp) movq 0xe0(%rsp), %rax movq 0x170(%rax), %rdi movq 0x178(%rax), %rsi callq 0x279c0 movq 0x8(%rsp), %rdi movq %rax, 0x50(%rsp) movq %rdx, 0x58(%rsp) movq 0xb0(%rsp), %rsi movq 0xb8(%rsp), %rdx movq 0x50(%rsp), %r8 movq 0x58(%rsp), %r9 movl $0xd4, %ecx movl $0x3, (%rsp) callq 0x3d4a0 movq 0xe0(%rsp), %rax movq %rax, 0x10(%rsp) movq 0xe0(%rsp), %rax movq 0x18(%rax), %rax movq 0x108(%rax), %rax movq 0x8(%rax), %rdi movq 0x10(%rax), %rsi callq 0x279c0 movq 0x10(%rsp), %rdi movq %rax, 0x40(%rsp) movq %rdx, 0x48(%rsp) movq 0xb0(%rsp), %rsi movq 0xb8(%rsp), %rdx movq 0x40(%rsp), %r8 movq 0x48(%rsp), %r9 movl $0x4f, %ecx movl $0x3, (%rsp) callq 0x3d4a0 movq 0xb0(%rsp), %rax movq %rax, 0xe8(%rsp) movq 0xb8(%rsp), %rax movq %rax, 0xf0(%rsp) jmp 0x6ade5 movq 0xe0(%rsp), %rdi movq 0xb0(%rsp), %rsi movq 0xb8(%rsp), %rdx callq 0x29f80 movl $0x0, 0xe8(%rsp) movq $0x6, 0xf0(%rsp) movq 0xe8(%rsp), %rax movq 0xf0(%rsp), %rdx addq $0xf8, %rsp retq nopl (%rax)
js_build_mapped_arguments: sub rsp, 0F8h mov [rsp+0F8h+var_18], rdi mov [rsp+0F8h+var_1C], esi mov [rsp+0F8h+var_28], rdx mov [rsp+0F8h+var_30], rcx mov [rsp+0F8h+var_34], r8d mov rdi, [rsp+0F8h+var_18] mov rax, [rsp+0F8h+var_18] mov rax, [rax+40h] mov rsi, [rax+10h] mov rdx, [rax+18h] mov ecx, 9 call JS_NewObjectProtoClass mov [rsp+0F8h+var_70], rax mov [rsp+0F8h+var_68], rdx mov rax, [rsp+0F8h+var_70] mov [rsp+0F8h+var_48], rax mov rax, [rsp+0F8h+var_68] mov [rsp+0F8h+var_40], rax mov rdi, [rsp+0F8h+var_48] mov rsi, [rsp+0F8h+var_40] call JS_IsException_1 cmp eax, 0 jz short loc_6AAA3 mov rax, [rsp+0F8h+var_48] mov [rsp+0F8h+var_10], rax mov rax, [rsp+0F8h+var_40] mov [rsp+0F8h+var_8], rax jmp loc_6ADE5 loc_6AAA3: mov rax, [rsp+0F8h+var_48] mov [rsp+0F8h+var_58], rax mov rdi, [rsp+0F8h+var_18] mov rsi, [rsp+0F8h+var_58] mov edx, 32h ; '2' mov ecx, 3 call add_property mov [rsp+0F8h+var_50], rax cmp [rsp+0F8h+var_50], 0 jnz short loc_6AAEA jmp loc_6ADB1 loc_6AAEA: mov rax, [rsp+0F8h+var_50] mov [rsp+0F8h+var_C0], rax mov edi, [rsp+0F8h+var_1C] call js_int32 mov rcx, rax mov rax, [rsp+0F8h+var_C0] mov [rsp+0F8h+var_80], rcx mov [rsp+0F8h+var_78], rdx mov rcx, [rsp+0F8h+var_80] mov [rax], rcx mov rcx, [rsp+0F8h+var_78] mov [rax+8], rcx mov [rsp+0F8h+var_5C], 0 loc_6AB37: mov eax, [rsp+0F8h+var_5C] cmp eax, [rsp+0F8h+var_34] jge loc_6AC0E mov rdi, [rsp+0F8h+var_18] mov rsi, [rsp+0F8h+var_30] mov edx, [rsp+0F8h+var_5C] mov ecx, 1 call get_var_ref mov [rsp+0F8h+var_88], rax cmp [rsp+0F8h+var_88], 0 jnz short loc_6AB7E jmp loc_6ADB1 loc_6AB7E: mov rax, [rsp+0F8h+var_18] mov [rsp+0F8h+var_D0], rax mov rax, [rsp+0F8h+var_58] mov [rsp+0F8h+var_C8], rax mov edi, [rsp+0F8h+var_5C] call __JS_AtomFromUInt32 mov rdi, [rsp+0F8h+var_D0] mov rsi, [rsp+0F8h+var_C8] mov edx, eax mov ecx, 27h ; ''' call add_property mov [rsp+0F8h+var_50], rax cmp [rsp+0F8h+var_50], 0 jnz short loc_6ABE8 mov rax, [rsp+0F8h+var_18] mov rdi, [rax+18h] mov rsi, [rsp+0F8h+var_88] call free_var_ref jmp loc_6ADB1 loc_6ABE8: mov rcx, [rsp+0F8h+var_88] mov rax, [rsp+0F8h+var_50] mov [rax], rcx mov eax, [rsp+0F8h+var_5C] add eax, 1 mov [rsp+0F8h+var_5C], eax jmp loc_6AB37 loc_6AC0E: mov eax, [rsp+0F8h+var_34] mov [rsp+0F8h+var_5C], eax loc_6AC1C: mov eax, [rsp+0F8h+var_5C] cmp eax, [rsp+0F8h+var_1C] jge loc_6ACC6 mov rax, [rsp+0F8h+var_18] mov [rsp+0F8h+var_E0], rax mov eax, [rsp+0F8h+var_5C] mov [rsp+0F8h+var_D4], eax mov rax, [rsp+0F8h+var_28] movsxd rcx, [rsp+0F8h+var_5C] shl rcx, 4 add rax, rcx mov rdi, [rax] mov rsi, [rax+8] call js_dup mov rdi, [rsp+0F8h+var_E0] mov ecx, [rsp+0F8h+var_D4] mov [rsp+0F8h+var_98], rax mov [rsp+0F8h+var_90], rdx mov rsi, [rsp+0F8h+var_48] mov rdx, [rsp+0F8h+var_40] mov r8, [rsp+0F8h+var_98] mov r9, [rsp+0F8h+var_90] mov [rsp+0F8h+var_F8], 7 call JS_DefinePropertyValueUint32 cmp eax, 0 jge short loc_6ACAE jmp loc_6ADB1 loc_6ACAE: jmp short $+2 loc_6ACB0: mov eax, [rsp+0F8h+var_5C] add eax, 1 mov [rsp+0F8h+var_5C], eax jmp loc_6AC1C loc_6ACC6: mov rax, [rsp+0F8h+var_18] mov [rsp+0F8h+var_F0], rax mov rax, [rsp+0F8h+var_18] mov rdi, [rax+170h] mov rsi, [rax+178h] call js_dup mov rdi, [rsp+0F8h+var_F0] mov [rsp+0F8h+var_A8], rax mov [rsp+0F8h+var_A0], rdx mov rsi, [rsp+0F8h+var_48] mov rdx, [rsp+0F8h+var_40] mov r8, [rsp+0F8h+var_A8] mov r9, [rsp+0F8h+var_A0] mov ecx, 0D4h mov [rsp+0F8h+var_F8], 3 call JS_DefinePropertyValue mov rax, [rsp+0F8h+var_18] mov [rsp+0F8h+var_E8], rax mov rax, [rsp+0F8h+var_18] mov rax, [rax+18h] mov rax, [rax+108h] mov rdi, [rax+8] mov rsi, [rax+10h] call js_dup mov rdi, [rsp+0F8h+var_E8] mov [rsp+0F8h+var_B8], rax mov [rsp+0F8h+var_B0], rdx mov rsi, [rsp+0F8h+var_48] mov rdx, [rsp+0F8h+var_40] mov r8, [rsp+0F8h+var_B8] mov r9, [rsp+0F8h+var_B0] mov ecx, 4Fh ; 'O' mov [rsp+0F8h+var_F8], 3 call JS_DefinePropertyValue mov rax, [rsp+0F8h+var_48] mov [rsp+0F8h+var_10], rax mov rax, [rsp+0F8h+var_40] mov [rsp+0F8h+var_8], rax jmp short loc_6ADE5 loc_6ADB1: mov rdi, [rsp+0F8h+var_18] mov rsi, [rsp+0F8h+var_48] mov rdx, [rsp+0F8h+var_40] call JS_FreeValue mov dword ptr [rsp+0F8h+var_10], 0 mov [rsp+0F8h+var_8], 6 loc_6ADE5: mov rax, [rsp+0F8h+var_10] mov rdx, [rsp+0F8h+var_8] add rsp, 0F8h retn
long long js_build_mapped_arguments( long long a1, int a2, long long a3, long long a4, signed int a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, double a10, double a11, __m128 a12, __m128 a13) { long long v13; // rdx long long v14; // rdx unsigned int v15; // eax long long v16; // rdx double v17; // xmm4_8 double v18; // xmm5_8 long long v19; // rdx __m128 v20; // xmm4 __m128 v21; // xmm5 long long v22; // rdx __m128 v23; // xmm4 __m128 v24; // xmm5 _DWORD *v26; // [rsp+40h] [rbp-B8h] _DWORD *v27; // [rsp+50h] [rbp-A8h] _DWORD *v28; // [rsp+60h] [rbp-98h] long long var_ref; // [rsp+70h] [rbp-88h] long long v30; // [rsp+88h] [rbp-70h] int i; // [rsp+9Ch] [rbp-5Ch] signed int j; // [rsp+9Ch] [rbp-5Ch] _QWORD *v33; // [rsp+A8h] [rbp-50h] _QWORD *v34; // [rsp+A8h] [rbp-50h] long long v35; // [rsp+B8h] [rbp-40h] long long v39; // [rsp+E8h] [rbp-10h] v30 = JS_NewObjectProtoClass( a1, *(_QWORD *)(*(_QWORD *)(a1 + 64) + 16LL), *(_QWORD *)(*(_QWORD *)(a1 + 64) + 24LL), 9u); v35 = v13; if ( JS_IsException_1(v30, v13) ) return v30; v33 = (_QWORD *)add_property(a1, v30, 0x32u, 3u); if ( v33 ) { *v33 = js_int32(a2); v33[1] = v14; for ( i = 0; i < a5; ++i ) { var_ref = get_var_ref(a1, a4, (unsigned int)i, 1LL); if ( !var_ref ) goto LABEL_15; v15 = _JS_AtomFromUInt32(i); v34 = (_QWORD *)add_property(a1, v30, v15, 0x27u); if ( !v34 ) { free_var_ref(*(_QWORD *)(a1 + 24), var_ref); goto LABEL_15; } *v34 = var_ref; } for ( j = a5; j < a2; ++j ) { v28 = js_dup(*(_DWORD **)(16LL * j + a3), *(_QWORD *)(16LL * j + a3 + 8)); if ( (int)JS_DefinePropertyValueUint32(a1, v30, v35, j, v28, v16, a6, a7, a8, a9, v17, v18, a12, a13, 7) < 0 ) goto LABEL_15; } v27 = js_dup(*(_DWORD **)(a1 + 368), *(_QWORD *)(a1 + 376)); JS_DefinePropertyValue(a1, v30, v35, 0xD4u, v27, v19, a6, a7, a8, a9, v20, v21, a12, a13, 3); v26 = js_dup( *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 264LL) + 8LL), *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 264LL) + 16LL)); JS_DefinePropertyValue(a1, v30, v35, 0x4Fu, v26, v22, a6, a7, a8, a9, v23, v24, a12, a13, 3); return v30; } else { LABEL_15: JS_FreeValue(a1, v30, v35); LODWORD(v39) = 0; } return v39; }
js_build_mapped_arguments: SUB RSP,0xf8 MOV qword ptr [RSP + 0xe0],RDI MOV dword ptr [RSP + 0xdc],ESI MOV qword ptr [RSP + 0xd0],RDX MOV qword ptr [RSP + 0xc8],RCX MOV dword ptr [RSP + 0xc4],R8D MOV RDI,qword ptr [RSP + 0xe0] MOV RAX,qword ptr [RSP + 0xe0] MOV RAX,qword ptr [RAX + 0x40] MOV RSI,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RAX + 0x18] MOV ECX,0x9 CALL 0x00130190 MOV qword ptr [RSP + 0x88],RAX MOV qword ptr [RSP + 0x90],RDX MOV RAX,qword ptr [RSP + 0x88] MOV qword ptr [RSP + 0xb0],RAX MOV RAX,qword ptr [RSP + 0x90] MOV qword ptr [RSP + 0xb8],RAX MOV RDI,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0xb8] CALL 0x00129fb0 CMP EAX,0x0 JZ 0x0016aaa3 MOV RAX,qword ptr [RSP + 0xb0] MOV qword ptr [RSP + 0xe8],RAX MOV RAX,qword ptr [RSP + 0xb8] MOV qword ptr [RSP + 0xf0],RAX JMP 0x0016ade5 LAB_0016aaa3: MOV RAX,qword ptr [RSP + 0xb0] MOV qword ptr [RSP + 0xa0],RAX MOV RDI,qword ptr [RSP + 0xe0] MOV RSI,qword ptr [RSP + 0xa0] MOV EDX,0x32 MOV ECX,0x3 CALL 0x00164030 MOV qword ptr [RSP + 0xa8],RAX CMP qword ptr [RSP + 0xa8],0x0 JNZ 0x0016aaea JMP 0x0016adb1 LAB_0016aaea: MOV RAX,qword ptr [RSP + 0xa8] MOV qword ptr [RSP + 0x38],RAX MOV EDI,dword ptr [RSP + 0xdc] CALL 0x00139fb0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x78],RCX MOV qword ptr [RSP + 0x80],RDX MOV RCX,qword ptr [RSP + 0x78] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RSP + 0x80] MOV qword ptr [RAX + 0x8],RCX MOV dword ptr [RSP + 0x9c],0x0 LAB_0016ab37: MOV EAX,dword ptr [RSP + 0x9c] CMP EAX,dword ptr [RSP + 0xc4] JGE 0x0016ac0e MOV RDI,qword ptr [RSP + 0xe0] MOV RSI,qword ptr [RSP + 0xc8] MOV EDX,dword ptr [RSP + 0x9c] MOV ECX,0x1 CALL 0x0016d560 MOV qword ptr [RSP + 0x70],RAX CMP qword ptr [RSP + 0x70],0x0 JNZ 0x0016ab7e JMP 0x0016adb1 LAB_0016ab7e: MOV RAX,qword ptr [RSP + 0xe0] MOV qword ptr [RSP + 0x28],RAX MOV RAX,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0x30],RAX MOV EDI,dword ptr [RSP + 0x9c] CALL 0x0012e8a0 MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x30] MOV EDX,EAX MOV ECX,0x27 CALL 0x00164030 MOV qword ptr [RSP + 0xa8],RAX CMP qword ptr [RSP + 0xa8],0x0 JNZ 0x0016abe8 MOV RAX,qword ptr [RSP + 0xe0] MOV RDI,qword ptr [RAX + 0x18] MOV RSI,qword ptr [RSP + 0x70] CALL 0x0013bd80 JMP 0x0016adb1 LAB_0016abe8: MOV RCX,qword ptr [RSP + 0x70] MOV RAX,qword ptr [RSP + 0xa8] MOV qword ptr [RAX],RCX MOV EAX,dword ptr [RSP + 0x9c] ADD EAX,0x1 MOV dword ptr [RSP + 0x9c],EAX JMP 0x0016ab37 LAB_0016ac0e: MOV EAX,dword ptr [RSP + 0xc4] MOV dword ptr [RSP + 0x9c],EAX LAB_0016ac1c: MOV EAX,dword ptr [RSP + 0x9c] CMP EAX,dword ptr [RSP + 0xdc] JGE 0x0016acc6 MOV RAX,qword ptr [RSP + 0xe0] MOV qword ptr [RSP + 0x18],RAX MOV EAX,dword ptr [RSP + 0x9c] MOV dword ptr [RSP + 0x24],EAX MOV RAX,qword ptr [RSP + 0xd0] MOVSXD RCX,dword ptr [RSP + 0x9c] SHL RCX,0x4 ADD RAX,RCX MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x8] CALL 0x001279c0 MOV RDI,qword ptr [RSP + 0x18] MOV ECX,dword ptr [RSP + 0x24] MOV qword ptr [RSP + 0x60],RAX MOV qword ptr [RSP + 0x68],RDX MOV RSI,qword ptr [RSP + 0xb0] MOV RDX,qword ptr [RSP + 0xb8] MOV R8,qword ptr [RSP + 0x60] MOV R9,qword ptr [RSP + 0x68] MOV dword ptr [RSP],0x7 CALL 0x0013d660 CMP EAX,0x0 JGE 0x0016acae JMP 0x0016adb1 LAB_0016acae: JMP 0x0016acb0 LAB_0016acb0: MOV EAX,dword ptr [RSP + 0x9c] ADD EAX,0x1 MOV dword ptr [RSP + 0x9c],EAX JMP 0x0016ac1c LAB_0016acc6: MOV RAX,qword ptr [RSP + 0xe0] MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0xe0] MOV RDI,qword ptr [RAX + 0x170] MOV RSI,qword ptr [RAX + 0x178] CALL 0x001279c0 MOV RDI,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x50],RAX MOV qword ptr [RSP + 0x58],RDX MOV RSI,qword ptr [RSP + 0xb0] MOV RDX,qword ptr [RSP + 0xb8] MOV R8,qword ptr [RSP + 0x50] MOV R9,qword ptr [RSP + 0x58] MOV ECX,0xd4 MOV dword ptr [RSP],0x3 CALL 0x0013d4a0 MOV RAX,qword ptr [RSP + 0xe0] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0xe0] MOV RAX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RAX + 0x108] MOV RDI,qword ptr [RAX + 0x8] MOV RSI,qword ptr [RAX + 0x10] CALL 0x001279c0 MOV RDI,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x40],RAX MOV qword ptr [RSP + 0x48],RDX MOV RSI,qword ptr [RSP + 0xb0] MOV RDX,qword ptr [RSP + 0xb8] MOV R8,qword ptr [RSP + 0x40] MOV R9,qword ptr [RSP + 0x48] MOV ECX,0x4f MOV dword ptr [RSP],0x3 CALL 0x0013d4a0 MOV RAX,qword ptr [RSP + 0xb0] MOV qword ptr [RSP + 0xe8],RAX MOV RAX,qword ptr [RSP + 0xb8] MOV qword ptr [RSP + 0xf0],RAX JMP 0x0016ade5 LAB_0016adb1: MOV RDI,qword ptr [RSP + 0xe0] MOV RSI,qword ptr [RSP + 0xb0] MOV RDX,qword ptr [RSP + 0xb8] CALL 0x00129f80 MOV dword ptr [RSP + 0xe8],0x0 MOV qword ptr [RSP + 0xf0],0x6 LAB_0016ade5: MOV RAX,qword ptr [RSP + 0xe8] MOV RDX,qword ptr [RSP + 0xf0] ADD RSP,0xf8 RET
int1 [16] js_build_mapped_arguments(long param_1,int param_2,long param_3,int8 param_4,int param_5) { int4 uVar1; int iVar2; int4 uVar3; int1 (*pauVar5) [16]; long lVar6; long *plVar7; int8 *puVar8; int1 auVar9 [16]; int local_5c; int4 local_10; int4 uStack_c; int8 local_8; int8 uVar4; uVar1 = uStack_c; auVar9 = JS_NewObjectProtoClass (param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x10), *(int8 *)(*(long *)(param_1 + 0x40) + 0x18),9); local_8 = auVar9._8_8_; uVar4 = auVar9._0_8_; iVar2 = JS_IsException(uVar4,local_8); local_10 = auVar9._0_4_; uStack_c = auVar9._4_4_; if (iVar2 == 0) { pauVar5 = (int1 (*) [16])add_property(param_1,uVar4,0x32,3); if (pauVar5 == (int1 (*) [16])0x0) { LAB_0016adb1: JS_FreeValue(param_1,uVar4,local_8); local_10 = 0; local_8 = 6; uStack_c = uVar1; } else { auVar9 = js_int32(param_2); *pauVar5 = auVar9; for (local_5c = 0; iVar2 = param_5, local_5c < param_5; local_5c = local_5c + 1) { lVar6 = get_var_ref(param_1,param_4,local_5c,1); if (lVar6 == 0) goto LAB_0016adb1; uVar3 = __JS_AtomFromUInt32(local_5c); plVar7 = (long *)add_property(param_1,uVar4,uVar3,0x27); if (plVar7 == (long *)0x0) { free_var_ref(*(int8 *)(param_1 + 0x18),lVar6); goto LAB_0016adb1; } *plVar7 = lVar6; } while (local_5c = iVar2, local_5c < param_2) { puVar8 = (int8 *)(param_3 + (long)local_5c * 0x10); auVar9 = js_dup(*puVar8,puVar8[1]); iVar2 = JS_DefinePropertyValueUint32 (param_1,uVar4,local_8,local_5c,auVar9._0_8_,auVar9._8_8_,7); if (iVar2 < 0) goto LAB_0016adb1; iVar2 = local_5c + 1; } auVar9 = js_dup(*(int8 *)(param_1 + 0x170),*(int8 *)(param_1 + 0x178)); JS_DefinePropertyValue(param_1,uVar4,local_8,0xd4,auVar9._0_8_,auVar9._8_8_,3); lVar6 = *(long *)(*(long *)(param_1 + 0x18) + 0x108); auVar9 = js_dup(*(int8 *)(lVar6 + 8),*(int8 *)(lVar6 + 0x10)); JS_DefinePropertyValue(param_1,uVar4,local_8,0x4f,auVar9._0_8_,auVar9._8_8_,3); } } auVar9._4_4_ = uStack_c; auVar9._0_4_ = local_10; auVar9._8_8_ = local_8; return auVar9; }
23,480
JS_ReadBigInt
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_ReadBigInt(BCReaderState *s) { JSValue obj; uint8_t v8; int32_t e; uint32_t len; limb_t l, i, n; limb_t v; bf_t *a; obj = JS_NewBigInt(s->ctx); if (JS_IsException(obj)) goto fail; /* sign + exponent */ if (bc_get_sleb128(s, &e)) goto fail; a = JS_GetBigInt(obj); a->sign = e & 1; e >>= 1; if (e == 0) a->expn = BF_EXP_ZERO; else if (e == 1) a->expn = BF_EXP_INF; else if (e == 2) a->expn = BF_EXP_NAN; else if (e >= 3) a->expn = e - 3; else a->expn = e; /* mantissa */ if (a->expn != BF_EXP_ZERO && a->expn != BF_EXP_INF && a->expn != BF_EXP_NAN) { if (bc_get_leb128(s, &len)) goto fail; bc_read_trace(s, "len=%" PRId64 "\n", (int64_t)len); if (len == 0) { JS_ThrowRangeError(s->ctx, "maximum BigInt size exceeded"); goto fail; } l = (len + sizeof(limb_t) - 1) / sizeof(limb_t); if (bf_resize(a, l)) { JS_ThrowOutOfMemory(s->ctx); goto fail; } n = len & (sizeof(limb_t) - 1); if (n != 0) { v = 0; for(i = 0; i < n; i++) { if (bc_get_u8(s, &v8)) goto fail; v |= (limb_t)v8 << ((sizeof(limb_t) - n + i) * 8); } a->tab[0] = v; i = 1; } else { i = 0; } for(; i < l; i++) { #if LIMB_BITS == 32 if (bc_get_u32(s, &v)) goto fail; #else if (bc_get_u64(s, &v)) goto fail; #endif a->tab[i] = v; } } return obj; fail: JS_FreeValue(s->ctx, obj); return JS_EXCEPTION; }
O1
c
JS_ReadBigInt: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdi, %r15 movq (%rdi), %rdi callq 0xfecd movq %rax, %r14 movq %rdx, %rbx cmpl $0x6, %ebx jne 0x11458 movq (%r15), %rax movq 0x18(%rax), %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x1d8c6 pushq $0x6 popq %rbx xorl %r14d, %r14d movq %r14, %rax movq %rbx, %rdx addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0xc(%rsp), %rsi movq %r15, %rdi callq 0x1126d testl %eax, %eax jne 0x1142b movabsq $0x7ffffffffffffffe, %rax # imm = 0x7FFFFFFFFFFFFFFE movl 0xc(%rsp), %edx movl %edx, %ecx andl $0x1, %ecx movl %ecx, 0x10(%r14) movl %edx, %ecx sarl %ecx movl %ecx, 0xc(%rsp) cmpl $0x2, %edx jae 0x11493 leaq 0x2(%rax), %rdx jmp 0x114b3 movq %rax, %rdx cmpl $0x1, %ecx je 0x114b3 cmpl $0x2, %ecx jne 0x114a6 leaq 0x1(%rax), %rdx jmp 0x114b3 jle 0x114b0 addl $-0x3, %ecx movq %rcx, %rdx jmp 0x114b3 movslq %ecx, %rdx movq %rdx, 0x18(%r14) addq %rdx, %rax addq $0x4, %rax cmpq $0x3, %rax jb 0x11443 leaq 0x1c(%rsp), %rsi movq %r15, %rdi callq 0x45a75 testl %eax, %eax jne 0x1142b movl 0x1c(%rsp), %ebp testq %rbp, %rbp je 0x1150e movq %r14, %rdi addq $0x8, %rdi leaq 0x7(%rbp), %r12 shrq $0x3, %r12 movq %r12, %rsi callq 0x84a70 testl %eax, %eax je 0x11524 movq (%r15), %rdi callq 0x1cb63 jmp 0x1142b movq (%r15), %rdi leaq 0x8e3a6(%rip), %rsi # 0x9f8be xorl %eax, %eax callq 0x20add jmp 0x1142b movq %r12, 0x20(%rsp) andl $0x7, %ebp je 0x1157f andq $0x0, 0x10(%rsp) leal (,%rbp,8), %eax pushq $0x40 popq %r13 subq %rax, %r13 xorl %r12d, %r12d movq %r15, %rdi leaq 0xb(%rsp), %rsi callq 0x45a3d testl %eax, %eax jne 0x115c2 movzbl 0xb(%rsp), %eax movl %r13d, %ecx shlq %cl, %rax orq %rax, %r12 addq $0x8, %r13 decq %rbp jne 0x11545 movq %r12, 0x10(%rsp) movq 0x28(%r14), %rax movq %r12, (%rax) pushq $0x1 popq %r12 jmp 0x11582 xorl %r12d, %r12d movq 0x20(%rsp), %rbp cmpl %ebp, %r12d jae 0x11443 leaq 0x10(%rsp), %r13 movq %r15, %rdi movq %r13, %rsi callq 0x45c22 testl %eax, %eax jne 0x1142b movq 0x10(%rsp), %rax movq 0x28(%r14), %rcx movq %rax, (%rcx,%r12,8) incq %r12 cmpq %r12, %rbp jne 0x11595 jmp 0x11443 movq %r12, 0x10(%rsp) jmp 0x1142b
JS_ReadBigInt: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r15, rdi mov rdi, [rdi] call JS_NewBigInt mov r14, rax mov rbx, rdx cmp ebx, 6 jnz short loc_11458 loc_1142B: mov rax, [r15] mov rdi, [rax+18h] mov rsi, r14 mov rdx, rbx call JS_FreeValueRT push 6 pop rbx xor r14d, r14d loc_11443: mov rax, r14 mov rdx, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_11458: lea rsi, [rsp+58h+var_4C] mov rdi, r15 call bc_get_sleb128 test eax, eax jnz short loc_1142B mov rax, 7FFFFFFFFFFFFFFEh mov edx, [rsp+58h+var_4C] mov ecx, edx and ecx, 1 mov [r14+10h], ecx mov ecx, edx sar ecx, 1 mov [rsp+58h+var_4C], ecx cmp edx, 2 jnb short loc_11493 lea rdx, [rax+2] jmp short loc_114B3 loc_11493: mov rdx, rax cmp ecx, 1 jz short loc_114B3 cmp ecx, 2 jnz short loc_114A6 lea rdx, [rax+1] jmp short loc_114B3 loc_114A6: jle short loc_114B0 add ecx, 0FFFFFFFDh mov rdx, rcx jmp short loc_114B3 loc_114B0: movsxd rdx, ecx loc_114B3: mov [r14+18h], rdx add rax, rdx add rax, 4 cmp rax, 3 jb loc_11443 lea rsi, [rsp+58h+var_3C] mov rdi, r15 call bc_get_leb128 test eax, eax jnz loc_1142B mov ebp, [rsp+58h+var_3C] test rbp, rbp jz short loc_1150E mov rdi, r14 add rdi, 8 lea r12, [rbp+7] shr r12, 3 mov rsi, r12 call bf_resize test eax, eax jz short loc_11524 mov rdi, [r15] call JS_ThrowOutOfMemory jmp loc_1142B loc_1150E: mov rdi, [r15] lea rsi, aMaximumBigintS; "maximum BigInt size exceeded" xor eax, eax call JS_ThrowRangeError jmp loc_1142B loc_11524: mov [rsp+58h+var_38], r12 and ebp, 7 jz short loc_1157F and [rsp+58h+var_48], 0 lea eax, ds:0[rbp*8] push 40h ; '@' pop r13 sub r13, rax xor r12d, r12d loc_11545: mov rdi, r15 lea rsi, [rsp+58h+var_4D] call bc_get_u8 test eax, eax jnz short loc_115C2 movzx eax, [rsp+58h+var_4D] mov ecx, r13d shl rax, cl or r12, rax add r13, 8 dec rbp jnz short loc_11545 mov [rsp+58h+var_48], r12 mov rax, [r14+28h] mov [rax], r12 push 1 pop r12 jmp short loc_11582 loc_1157F: xor r12d, r12d loc_11582: mov rbp, [rsp+58h+var_38] cmp r12d, ebp jnb loc_11443 lea r13, [rsp+58h+var_48] loc_11595: mov rdi, r15 mov rsi, r13 call bc_get_u64 test eax, eax jnz loc_1142B mov rax, [rsp+58h+var_48] mov rcx, [r14+28h] mov [rcx+r12*8], rax inc r12 cmp rbp, r12 jnz short loc_11595 jmp loc_11443 loc_115C2: mov [rsp+58h+var_48], r12 jmp loc_1142B
_DWORD * JS_ReadBigInt(long long *a1) { _DWORD *v1; // r14 int v2; // edx int v4; // edx int v5; // ecx unsigned long long v6; // rdx int v7; // edx int v8; // ecx int v9; // r8d int v10; // r9d long long v11; // rbp long long v12; // rbp long long v13; // r13 long long v14; // r12 long long v15; // r12 unsigned long long v16; // rbp unsigned __int8 v17; // [rsp+Bh] [rbp-4Dh] BYREF int v18; // [rsp+Ch] [rbp-4Ch] BYREF long long v19; // [rsp+10h] [rbp-48h] BYREF unsigned int v20; // [rsp+1Ch] [rbp-3Ch] BYREF unsigned long long v21; // [rsp+20h] [rbp-38h] v1 = JS_NewBigInt(*a1); if ( v2 == 6 || (unsigned int)bc_get_sleb128((long long)a1, &v18) ) goto LABEL_2; v4 = v18; v1[4] = v18 & 1; v5 = v4 >> 1; v18 = v4 >> 1; if ( (unsigned int)v4 >= 2 ) { v6 = 0x7FFFFFFFFFFFFFFELL; if ( v5 != 1 ) { if ( v5 == 2 ) { v6 = 0x7FFFFFFFFFFFFFFFLL; } else if ( v5 <= 2 ) { v6 = v5; } else { v6 = (unsigned int)(v5 - 3); } } } else { v6 = 0x8000000000000000LL; } *((_QWORD *)v1 + 3) = v6; if ( v6 - 0x7FFFFFFFFFFFFFFELL >= 3 ) { if ( (unsigned int)bc_get_leb128(a1, &v20) ) { LABEL_2: JS_FreeValueRT(*(_QWORD *)(*a1 + 24), v1); return 0LL; } v11 = v20; if ( !v20 ) { JS_ThrowRangeError(*a1, (unsigned int)"maximum BigInt size exceeded", v7, v8, v9, v10); goto LABEL_2; } if ( (unsigned int)bf_resize(v1 + 2, ((unsigned long long)v20 + 7) >> 3) ) { JS_ThrowOutOfMemory(*a1); goto LABEL_2; } v21 = (unsigned long long)(v11 + 7) >> 3; v12 = v11 & 7; if ( (_DWORD)v12 ) { v19 = 0LL; v13 = 64LL - (unsigned int)(8 * v12); v14 = 0LL; while ( !(unsigned int)bc_get_u8(a1, &v17) ) { v14 |= (unsigned long long)v17 << v13; v13 += 8LL; if ( !--v12 ) { v19 = v14; **((_QWORD **)v1 + 5) = v14; v15 = 1LL; goto LABEL_25; } } v19 = v14; goto LABEL_2; } v15 = 0LL; LABEL_25: v16 = v21; if ( (unsigned int)v15 < (unsigned int)v21 ) { while ( !(unsigned int)bc_get_u64(a1, &v19) ) { *(_QWORD *)(*((_QWORD *)v1 + 5) + 8 * v15++) = v19; if ( v16 == v15 ) return v1; } goto LABEL_2; } } return v1; }
JS_ReadBigInt: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R15,RDI MOV RDI,qword ptr [RDI] CALL 0x0010fecd MOV R14,RAX MOV RBX,RDX CMP EBX,0x6 JNZ 0x00111458 LAB_0011142b: MOV RAX,qword ptr [R15] MOV RDI,qword ptr [RAX + 0x18] MOV RSI,R14 MOV RDX,RBX CALL 0x0011d8c6 PUSH 0x6 POP RBX XOR R14D,R14D LAB_00111443: MOV RAX,R14 MOV RDX,RBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00111458: LEA RSI,[RSP + 0xc] MOV RDI,R15 CALL 0x0011126d TEST EAX,EAX JNZ 0x0011142b MOV RAX,0x7ffffffffffffffe MOV EDX,dword ptr [RSP + 0xc] MOV ECX,EDX AND ECX,0x1 MOV dword ptr [R14 + 0x10],ECX MOV ECX,EDX SAR ECX,0x1 MOV dword ptr [RSP + 0xc],ECX CMP EDX,0x2 JNC 0x00111493 LEA RDX,[RAX + 0x2] JMP 0x001114b3 LAB_00111493: MOV RDX,RAX CMP ECX,0x1 JZ 0x001114b3 CMP ECX,0x2 JNZ 0x001114a6 LEA RDX,[RAX + 0x1] JMP 0x001114b3 LAB_001114a6: JLE 0x001114b0 ADD ECX,-0x3 MOV RDX,RCX JMP 0x001114b3 LAB_001114b0: MOVSXD RDX,ECX LAB_001114b3: MOV qword ptr [R14 + 0x18],RDX ADD RAX,RDX ADD RAX,0x4 CMP RAX,0x3 JC 0x00111443 LEA RSI,[RSP + 0x1c] MOV RDI,R15 CALL 0x00145a75 TEST EAX,EAX JNZ 0x0011142b MOV EBP,dword ptr [RSP + 0x1c] TEST RBP,RBP JZ 0x0011150e MOV RDI,R14 ADD RDI,0x8 LEA R12,[RBP + 0x7] SHR R12,0x3 MOV RSI,R12 CALL 0x00184a70 TEST EAX,EAX JZ 0x00111524 MOV RDI,qword ptr [R15] CALL 0x0011cb63 JMP 0x0011142b LAB_0011150e: MOV RDI,qword ptr [R15] LEA RSI,[0x19f8be] XOR EAX,EAX CALL 0x00120add JMP 0x0011142b LAB_00111524: MOV qword ptr [RSP + 0x20],R12 AND EBP,0x7 JZ 0x0011157f AND qword ptr [RSP + 0x10],0x0 LEA EAX,[RBP*0x8] PUSH 0x40 POP R13 SUB R13,RAX XOR R12D,R12D LAB_00111545: MOV RDI,R15 LEA RSI,[RSP + 0xb] CALL 0x00145a3d TEST EAX,EAX JNZ 0x001115c2 MOVZX EAX,byte ptr [RSP + 0xb] MOV ECX,R13D SHL RAX,CL OR R12,RAX ADD R13,0x8 DEC RBP JNZ 0x00111545 MOV qword ptr [RSP + 0x10],R12 MOV RAX,qword ptr [R14 + 0x28] MOV qword ptr [RAX],R12 PUSH 0x1 POP R12 JMP 0x00111582 LAB_0011157f: XOR R12D,R12D LAB_00111582: MOV RBP,qword ptr [RSP + 0x20] CMP R12D,EBP JNC 0x00111443 LEA R13,[RSP + 0x10] LAB_00111595: MOV RDI,R15 MOV RSI,R13 CALL 0x00145c22 TEST EAX,EAX JNZ 0x0011142b MOV RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [R14 + 0x28] MOV qword ptr [RCX + R12*0x8],RAX INC R12 CMP RBP,R12 JNZ 0x00111595 JMP 0x00111443 LAB_001115c2: MOV qword ptr [RSP + 0x10],R12 JMP 0x0011142b
int1 [16] JS_ReadBigInt(long *param_1) { ulong uVar1; int iVar2; int iVar3; long lVar4; uint uVar5; ulong uVar6; ulong uVar7; int1 auVar8 [16]; byte local_4d; uint local_4c; ulong local_48; uint local_3c; ulong local_38; auVar8 = JS_NewBigInt(*param_1); lVar4 = auVar8._0_8_; uVar7 = local_48; if ((auVar8._8_4_ != 6) && (iVar2 = bc_get_sleb128(param_1,&local_4c), uVar7 = local_48, iVar2 == 0)) { *(uint *)(lVar4 + 0x10) = local_4c & 1; uVar5 = (int)local_4c >> 1; if (local_4c < 2) { uVar7 = 0x8000000000000000; } else { uVar7 = 0x7ffffffffffffffe; if (uVar5 != 1) { if (uVar5 == 2) { uVar7 = 0x7fffffffffffffff; } else if ((int)uVar5 < 3) { uVar7 = (ulong)(int)uVar5; } else { uVar7 = (ulong)(uVar5 - 3); } } } *(ulong *)(lVar4 + 0x18) = uVar7; if (uVar7 + 0x8000000000000002 < 3) { return auVar8; } local_4c = uVar5; iVar2 = bc_get_leb128(param_1,&local_3c); uVar7 = local_48; if (iVar2 == 0) { if ((ulong)local_3c == 0) { JS_ThrowRangeError(*param_1,"maximum BigInt size exceeded"); uVar7 = local_48; } else { uVar7 = (ulong)local_3c + 7 >> 3; iVar2 = bf_resize(lVar4 + 8,uVar7); if (iVar2 == 0) { local_3c = local_3c & 7; uVar6 = (ulong)local_3c; local_38 = uVar7; if (local_3c == 0) { uVar6 = 0; } else { local_48 = 0; iVar2 = local_3c * -8 + 0x40; uVar7 = 0; do { iVar3 = bc_get_u8(param_1,&local_4d); if (iVar3 != 0) goto LAB_0011142b; uVar7 = uVar7 | (ulong)local_4d << ((byte)iVar2 & 0x3f); iVar2 = iVar2 + 8; uVar6 = uVar6 - 1; } while (uVar6 != 0); **(ulong **)(lVar4 + 0x28) = uVar7; uVar6 = 1; local_48 = uVar7; } uVar1 = local_38; if ((uint)local_38 <= (uint)uVar6) { return auVar8; } while (iVar2 = bc_get_u64(param_1,&local_48), uVar7 = local_48, iVar2 == 0) { *(ulong *)(*(long *)(lVar4 + 0x28) + uVar6 * 8) = local_48; uVar6 = uVar6 + 1; if (uVar1 == uVar6) { return auVar8; } } } else { JS_ThrowOutOfMemory(*param_1); uVar7 = local_48; } } } } LAB_0011142b: local_48 = uVar7; JS_FreeValueRT(*(int8 *)(*param_1 + 0x18),lVar4,auVar8._8_8_); return ZEXT816(6) << 0x40; }
23,481
ma_test_if_reopen
eloqsql/storage/maria/ma_open.c
MARIA_HA *_ma_test_if_reopen(const char *filename) { LIST *pos; for (pos=maria_open_list ; pos ; pos=pos->next) { MARIA_HA *info=(MARIA_HA*) pos->data; MARIA_SHARE *share= info->s; if (!strcmp(share->unique_file_name.str,filename) && share->last_version) return info; } return 0; }
O3
c
ma_test_if_reopen: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx leaq 0x3cd426(%rip), %rax # 0x3fea70 movq (%rax), %r15 testq %r15, %r15 je 0x31684 movq %rdi, %rbx movq 0x10(%r15), %r14 movq (%r14), %r12 movq 0x5b0(%r12), %rdi movq %rbx, %rsi callq 0x29610 testl %eax, %eax jne 0x3167b cmpq $0x0, 0x718(%r12) jne 0x31687 movq 0x8(%r15), %r15 testq %r15, %r15 jne 0x31655 xorl %r14d, %r14d movq %r14, %rax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
_ma_test_if_reopen: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx lea rax, maria_open_list mov r15, [rax] test r15, r15 jz short loc_31684 mov rbx, rdi loc_31655: mov r14, [r15+10h] mov r12, [r14] mov rdi, [r12+5B0h] mov rsi, rbx call _strcmp test eax, eax jnz short loc_3167B cmp qword ptr [r12+718h], 0 jnz short loc_31687 loc_3167B: mov r15, [r15+8] test r15, r15 jnz short loc_31655 loc_31684: xor r14d, r14d loc_31687: mov rax, r14 pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long * ma_test_if_reopen(long long a1) { long long v1; // r15 long long *v2; // r14 long long v3; // r12 v1 = maria_open_list; if ( !maria_open_list ) return 0LL; while ( 1 ) { v2 = *(long long **)(v1 + 16); v3 = *v2; if ( !(unsigned int)strcmp(*(_QWORD *)(*v2 + 1456), a1) ) { if ( *(_QWORD *)(v3 + 1816) ) break; } v1 = *(_QWORD *)(v1 + 8); if ( !v1 ) return 0LL; } return v2; }
_ma_test_if_reopen: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX LEA RAX,[0x4fea70] MOV R15,qword ptr [RAX] TEST R15,R15 JZ 0x00131684 MOV RBX,RDI LAB_00131655: MOV R14,qword ptr [R15 + 0x10] MOV R12,qword ptr [R14] MOV RDI,qword ptr [R12 + 0x5b0] MOV RSI,RBX CALL 0x00129610 TEST EAX,EAX JNZ 0x0013167b CMP qword ptr [R12 + 0x718],0x0 JNZ 0x00131687 LAB_0013167b: MOV R15,qword ptr [R15 + 0x8] TEST R15,R15 JNZ 0x00131655 LAB_00131684: XOR R14D,R14D LAB_00131687: MOV RAX,R14 POP RBX POP R12 POP R14 POP R15 POP RBP RET
long * _ma_test_if_reopen(char *param_1) { long *plVar1; long lVar2; int iVar3; long lVar4; lVar4 = maria_open_list; if (maria_open_list != 0) { do { plVar1 = *(long **)(lVar4 + 0x10); lVar2 = *plVar1; iVar3 = strcmp(*(char **)(lVar2 + 0x5b0),param_1); if ((iVar3 == 0) && (*(long *)(lVar2 + 0x718) != 0)) { return plVar1; } plVar1 = (long *)(lVar4 + 8); lVar4 = *plVar1; } while (*plVar1 != 0); } return (long *)0x0; }
23,482
Load_log_processor::grab_fname(unsigned int)
eloqsql/client/mysqlbinlog.cc
char *grab_fname(uint file_id) { File_name_record *ptr; char *res= 0; if (file_id >= file_names.elements) return 0; ptr= dynamic_element(&file_names, file_id, File_name_record*); if (!ptr->event) { res= ptr->fname; bzero((char *)ptr, sizeof(File_name_record)); } return res; }
O0
cpp
Load_log_processor::grab_fname(unsigned int): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq -0x10(%rbp), %rcx movq %rcx, -0x30(%rbp) movq $0x0, -0x28(%rbp) movl -0x14(%rbp), %eax cmpl 0x210(%rcx), %eax jb 0x65644 movq $0x0, -0x8(%rbp) jmp 0x6568b movq -0x30(%rbp), %rax movq 0x208(%rax), %rax movl -0x14(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax cmpq $0x0, 0x8(%rax) jne 0x65683 movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rdi xorl %esi, %esi movl $0x10, %edx callq 0x3b390 movq -0x28(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nop
_ZN18Load_log_processor10grab_fnameEj: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov rcx, [rbp+var_10] mov [rbp+var_30], rcx mov [rbp+var_28], 0 mov eax, [rbp+var_14] cmp eax, [rcx+210h] jb short loc_65644 mov [rbp+var_8], 0 jmp short loc_6568B loc_65644: mov rax, [rbp+var_30] mov rax, [rax+208h] mov ecx, [rbp+var_14] shl rcx, 4 add rax, rcx mov [rbp+var_20], rax mov rax, [rbp+var_20] cmp qword ptr [rax+8], 0 jnz short loc_65683 mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_28], rax mov rdi, [rbp+var_20] xor esi, esi mov edx, 10h call _memset loc_65683: mov rax, [rbp+var_28] mov [rbp+var_8], rax loc_6568B: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
long long Load_log_processor::grab_fname(Load_log_processor *this, unsigned int a2) { long long v3; // [rsp+8h] [rbp-28h] long long *v4; // [rsp+10h] [rbp-20h] v3 = 0LL; if ( a2 >= *((_DWORD *)this + 132) ) return 0LL; v4 = (long long *)(16LL * a2 + *((_QWORD *)this + 65)); if ( !v4[1] ) { v3 = *v4; memset(v4, 0LL, 16LL); } return v3; }
grab_fname: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x30],RCX MOV qword ptr [RBP + -0x28],0x0 MOV EAX,dword ptr [RBP + -0x14] CMP EAX,dword ptr [RCX + 0x210] JC 0x00165644 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0016568b LAB_00165644: MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x208] MOV ECX,dword ptr [RBP + -0x14] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX + 0x8],0x0 JNZ 0x00165683 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x20] XOR ESI,ESI MOV EDX,0x10 CALL 0x0013b390 LAB_00165683: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x8],RAX LAB_0016568b: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
/* Load_log_processor::grab_fname(unsigned int) */ int8 __thiscall Load_log_processor::grab_fname(Load_log_processor *this,uint param_1) { int8 *__s; int8 local_30; int8 local_10; local_30 = 0; if (param_1 < *(uint *)(this + 0x210)) { __s = (int8 *)(*(long *)(this + 0x208) + (ulong)param_1 * 0x10); if (__s[1] == 0) { local_30 = *__s; memset(__s,0,0x10); } local_10 = local_30; } else { local_10 = 0; } return local_10; }
23,483
mysql_refresh_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_refresh_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_refresh, (parms->mysql, parms->refresh_options), parms->mysql, int, r_int) }
O0
c
mysql_refresh_start_internal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x10(%rbp), %rax movl 0x8(%rax), %esi callq 0x24bb0 movl %eax, -0x14(%rbp) movl -0x14(%rbp), %ecx movq -0x20(%rbp), %rax movl %ecx, 0x8(%rax) movq -0x20(%rbp), %rax movl $0x0, (%rax) addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
mysql_refresh_start_internal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rdi, [rax] mov rax, [rbp+var_10] mov esi, [rax+8] call mysql_refresh mov [rbp+var_14], eax mov ecx, [rbp+var_14] mov rax, [rbp+var_20] mov [rax+8], ecx mov rax, [rbp+var_20] mov dword ptr [rax], 0 add rsp, 20h pop rbp retn
_DWORD * mysql_refresh_start_internal(long long a1) { _DWORD *result; // rax _DWORD *v2; // [rsp+0h] [rbp-20h] v2 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)a1 + 1152LL) + 40LL); v2[2] = mysql_refresh(*(_QWORD *)a1, *(_DWORD *)(a1 + 8)); result = v2; *v2 = 0; return result; }
mysql_refresh_start_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RAX + 0x8] CALL 0x00124bb0 MOV dword ptr [RBP + -0x14],EAX MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x8],ECX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],0x0 ADD RSP,0x20 POP RBP RET
void mysql_refresh_start_internal(long *param_1) { int4 *puVar1; int4 uVar2; puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28); uVar2 = mysql_refresh(*param_1,(int)param_1[1]); puVar1[2] = uVar2; *puVar1 = 0; return; }
23,484
ggml_easy::ctx::ctx(ggml_easy::ctx_params const&)
ngxson[P]ggml-easy/ggml-easy.h
ctx(const ctx_params & params) : log_level(params.log_level), max_nodes(params.max_nodes) { ggml_log_set(log_cb, &log_level); backend_cpu = ggml_backend_init_by_type(GGML_BACKEND_DEVICE_TYPE_CPU, nullptr); backend = params.use_gpu ? ggml_backend_init_by_type(GGML_BACKEND_DEVICE_TYPE_GPU, nullptr) : nullptr; if (backend) { log(GGML_LOG_LEVEL_INFO, "%s: using %s backend\n", __func__, ggml_backend_name(backend)); backend_ptrs.push_back(backend); backend_buft.push_back(ggml_backend_get_default_buffer_type(backend)); } else { backend = backend_cpu; log(GGML_LOG_LEVEL_INFO, "%s: using CPU backend\n", __func__); } backend_ptrs.push_back(backend_cpu); backend_buft.push_back(ggml_backend_get_default_buffer_type(backend_cpu)); sched.reset( ggml_backend_sched_new(backend_ptrs.data(), backend_buft.data(), backend_ptrs.size(), max_nodes, false) ); buf_compute_meta.resize(max_nodes * ggml_tensor_overhead() + ggml_graph_overhead()); }
O0
c
ggml_easy::ctx::ctx(ggml_easy::ctx_params const&): subq $0x108, %rsp # imm = 0x108 movq %rdi, 0x100(%rsp) movq %rsi, 0xf8(%rsp) movq 0x100(%rsp), %rdi movq %rdi, 0xd0(%rsp) movq 0xf8(%rsp), %rax movl 0x8(%rax), %eax movl %eax, (%rdi) addq $0x8, %rdi movq %rdi, 0x98(%rsp) callq 0xd2c0 movq 0xd0(%rsp), %rdi movq $0x0, 0x40(%rdi) movq $0x0, 0x48(%rdi) addq $0x50, %rdi movq %rdi, 0xa0(%rsp) callq 0xd2d0 movq 0xd0(%rsp), %rdi movq 0xf8(%rsp), %rax movl 0x4(%rax), %eax movl %eax, 0x68(%rdi) addq $0x70, %rdi movq %rdi, 0xa8(%rsp) callq 0xd2e0 movq 0xd0(%rsp), %rdi addq $0x88, %rdi movq %rdi, 0xb0(%rsp) callq 0xd2f0 movq 0xd0(%rsp), %rdi movq $0x0, 0xa0(%rdi) movq $0x0, 0xa8(%rdi) movq $0x0, 0xb0(%rdi) addq $0xb8, %rdi movq %rdi, 0xb8(%rsp) callq 0xd300 movq 0xd0(%rsp), %rdi addq $0xc0, %rdi movq %rdi, 0xc0(%rsp) callq 0xd330 movq 0xd0(%rsp), %rdi addq $0xd8, %rdi movq %rdi, 0xc8(%rsp) callq 0xd340 movq 0xd0(%rsp), %rsi leaq -0x3035(%rip), %rdi # 0x8810 callq 0x8610 jmp 0xb84c xorl %edi, %edi movl %edi, %esi callq 0x8340 movq %rax, 0x90(%rsp) jmp 0xb85f movq 0xd0(%rsp), %rax movq 0x90(%rsp), %rcx movq %rcx, 0xa8(%rax) movq 0xf8(%rsp), %rax testb $0x1, (%rax) je 0xb8ad xorl %eax, %eax movl %eax, %esi movl $0x1, %edi callq 0x8340 movq %rax, 0x88(%rsp) jmp 0xb89b movq 0x88(%rsp), %rax movq %rax, 0x80(%rsp) jmp 0xb8b9 xorl %eax, %eax movq %rax, 0x80(%rsp) jmp 0xb8b9 movq 0xd0(%rsp), %rax movq 0x80(%rsp), %rcx movq %rcx, 0xa0(%rax) cmpq $0x0, 0xa0(%rax) je 0xba03 movq 0xd0(%rsp), %rax movq 0xa0(%rax), %rdi callq 0x8500 movq %rax, 0x78(%rsp) jmp 0xb8f9 movq 0x78(%rsp), %r8 movq 0xd0(%rsp), %rdi leaq 0x89ec(%rip), %rdx # 0x142f9 leaq 0x89fb(%rip), %rcx # 0x1430f xorl %eax, %eax movl $0x2, %esi callq 0xd350 jmp 0xb922 movq 0xd0(%rsp), %rsi movq %rsi, %rdi addq $0x70, %rdi addq $0xa0, %rsi callq 0xd410 jmp 0xb93f movq 0xd0(%rsp), %rax movq %rax, %rcx addq $0x88, %rcx movq %rcx, 0x68(%rsp) movq 0xa0(%rax), %rdi callq 0x8660 movq %rax, 0x70(%rsp) jmp 0xb969 movq 0x68(%rsp), %rdi movq 0x70(%rsp), %rax movq %rax, 0xe0(%rsp) leaq 0xe0(%rsp), %rsi callq 0xd480 jmp 0xb98a jmp 0xba37 movq 0xc8(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) callq 0xd5e0 movq 0xc0(%rsp), %rdi callq 0xd640 movq 0xb8(%rsp), %rdi callq 0xd6a0 movq 0xb0(%rsp), %rdi callq 0xd700 movq 0xa8(%rsp), %rdi callq 0xd760 movq 0xa0(%rsp), %rdi callq 0xd7c0 movq 0x98(%rsp), %rdi callq 0xd820 jmp 0xbb8d movq 0xd0(%rsp), %rdi movq 0xa8(%rdi), %rax movq %rax, 0xa0(%rdi) leaq 0x88f3(%rip), %rdx # 0x14313 leaq 0x88e8(%rip), %rcx # 0x1430f xorl %eax, %eax movl $0x2, %esi callq 0xd350 jmp 0xba35 jmp 0xba37 movq 0xd0(%rsp), %rsi movq %rsi, %rdi addq $0x70, %rdi addq $0xa8, %rsi callq 0xd410 jmp 0xba54 movq 0xd0(%rsp), %rax movq %rax, %rcx addq $0x88, %rcx movq %rcx, 0x58(%rsp) movq 0xa8(%rax), %rdi callq 0x8660 movq %rax, 0x60(%rsp) jmp 0xba7e movq 0x58(%rsp), %rdi movq 0x60(%rsp), %rax movq %rax, 0xd8(%rsp) leaq 0xd8(%rsp), %rsi callq 0xd480 jmp 0xba9f movq 0xd0(%rsp), %rdi movq %rdi, %rax addq $0xb8, %rax movq %rax, 0x30(%rsp) addq $0x70, %rdi movq %rdi, 0x38(%rsp) callq 0xd4e0 movq 0xd0(%rsp), %rdi movq %rax, 0x40(%rsp) addq $0x88, %rdi callq 0xd500 movq 0x38(%rsp), %rdi movq %rax, 0x48(%rsp) callq 0xd520 movq 0x40(%rsp), %rdi movq 0x48(%rsp), %rsi movq %rax, %rcx movq 0xd0(%rsp), %rax movl %ecx, %edx movslq 0x68(%rax), %rcx xorl %r8d, %r8d callq 0x86c0 movq %rax, 0x50(%rsp) jmp 0xbb15 movq 0x50(%rsp), %rsi movq 0x30(%rsp), %rdi callq 0xd4b0 movq 0xd0(%rsp), %rax movq %rax, %rcx addq $0x50, %rcx movq %rcx, 0x18(%rsp) movslq 0x68(%rax), %rax movq %rax, 0x20(%rsp) callq 0x85b0 movq %rax, 0x28(%rsp) jmp 0xbb4d movq 0x28(%rsp), %rcx movq 0x20(%rsp), %rax imulq %rcx, %rax movq %rax, 0x8(%rsp) callq 0x8190 movq %rax, 0x10(%rsp) jmp 0xbb6c movq 0x18(%rsp), %rdi movq 0x10(%rsp), %rax movq 0x8(%rsp), %rsi addq %rax, %rsi callq 0xd540 jmp 0xbb85 addq $0x108, %rsp # imm = 0x108 retq movq 0xf0(%rsp), %rdi callq 0x8620 nopw (%rax,%rax)
_ZN9ggml_easy3ctxC2ERKNS_10ctx_paramsE: sub rsp, 108h mov [rsp+108h+var_8], rdi mov [rsp+108h+var_10], rsi mov rdi, [rsp+108h+var_8] mov [rsp+108h+var_38], rdi mov rax, [rsp+108h+var_10] mov eax, [rax+8] mov [rdi], eax add rdi, 8 mov [rsp+108h+var_70], rdi call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S7_EEEC2Ev; std::unordered_map<std::string,ggml_tensor *>::unordered_map(void) mov rdi, [rsp+108h+var_38] mov qword ptr [rdi+40h], 0 mov qword ptr [rdi+48h], 0 add rdi, 50h ; 'P' mov [rsp+108h+var_68], rdi call _ZNSt6vectorIhSaIhEEC2Ev; std::vector<uchar>::vector(void) mov rdi, [rsp+108h+var_38] mov rax, [rsp+108h+var_10] mov eax, [rax+4] mov [rdi+68h], eax add rdi, 70h ; 'p' mov [rsp+108h+var_60], rdi call _ZNSt6vectorIP12ggml_backendSaIS1_EEC2Ev; std::vector<ggml_backend *>::vector(void) mov rdi, [rsp+108h+var_38] add rdi, 88h mov [rsp+108h+var_58], rdi call _ZNSt6vectorIP24ggml_backend_buffer_typeSaIS1_EEC2Ev; std::vector<ggml_backend_buffer_type *>::vector(void) mov rdi, [rsp+108h+var_38] mov qword ptr [rdi+0A0h], 0 mov qword ptr [rdi+0A8h], 0 mov qword ptr [rdi+0B0h], 0 add rdi, 0B8h mov [rsp+108h+var_50], rdi call _ZNSt10unique_ptrI18ggml_backend_sched26ggml_backend_sched_deleterEC2IS1_vEEv; std::unique_ptr<ggml_backend_sched,ggml_backend_sched_deleter>::unique_ptr<ggml_backend_sched_deleter,void>(void) mov rdi, [rsp+108h+var_38] add rdi, 0C0h mov [rsp+108h+var_48], rdi call _ZNSt6vectorIN9ggml_easy3ctx11loaded_ggufESaIS2_EEC2Ev; std::vector<ggml_easy::ctx::loaded_gguf>::vector(void) mov rdi, [rsp+108h+var_38] add rdi, 0D8h mov [rsp+108h+var_40], rdi call _ZNSt6vectorIN9ggml_easy3ctx14printed_tensorESaIS2_EEC2Ev; std::vector<ggml_easy::ctx::printed_tensor>::vector(void) mov rsi, [rsp+108h+var_38] lea rdi, _ZN9ggml_easy6log_cbE14ggml_log_levelPKcPv; ggml_easy::log_cb(ggml_log_level,char const*,void *) call _ggml_log_set jmp short $+2 loc_B84C: xor edi, edi mov esi, edi call _ggml_backend_init_by_type mov [rsp+108h+var_78], rax jmp short $+2 loc_B85F: mov rax, [rsp+108h+var_38] mov rcx, [rsp+108h+var_78] mov [rax+0A8h], rcx mov rax, [rsp+108h+var_10] test byte ptr [rax], 1 jz short loc_B8AD xor eax, eax mov esi, eax mov edi, 1 call _ggml_backend_init_by_type mov [rsp+108h+var_80], rax jmp short $+2 loc_B89B: mov rax, [rsp+108h+var_80] mov [rsp+108h+var_88], rax jmp short loc_B8B9 loc_B8AD: xor eax, eax mov [rsp+108h+var_88], rax jmp short $+2 loc_B8B9: mov rax, [rsp+108h+var_38] mov rcx, [rsp+108h+var_88] mov [rax+0A0h], rcx cmp qword ptr [rax+0A0h], 0 jz loc_BA03 mov rax, [rsp+108h+var_38] mov rdi, [rax+0A0h] call _ggml_backend_name mov [rsp+108h+var_90], rax jmp short $+2 loc_B8F9: mov r8, [rsp+108h+var_90] mov rdi, [rsp+108h+var_38] lea rdx, aSUsingSBackend; "%s: using %s backend\n" lea rcx, aCtx; "ctx" xor eax, eax mov esi, 2 call _ZN9ggml_easy3ctx3logE14ggml_log_levelPKcz; ggml_easy::ctx::log(ggml_log_level,char const*,...) jmp short $+2 loc_B922: mov rsi, [rsp+108h+var_38] mov rdi, rsi add rdi, 70h ; 'p' add rsi, 0A0h call _ZNSt6vectorIP12ggml_backendSaIS1_EE9push_backERKS1_; std::vector<ggml_backend *>::push_back(ggml_backend * const&) jmp short $+2 loc_B93F: mov rax, [rsp+108h+var_38] mov rcx, rax add rcx, 88h mov [rsp+108h+var_A0], rcx mov rdi, [rax+0A0h] call _ggml_backend_get_default_buffer_type mov [rsp+108h+var_98], rax jmp short $+2 loc_B969: mov rdi, [rsp+108h+var_A0] mov rax, [rsp+108h+var_98] mov [rsp+108h+var_28], rax lea rsi, [rsp+108h+var_28] call _ZNSt6vectorIP24ggml_backend_buffer_typeSaIS1_EE9push_backEOS1_; std::vector<ggml_backend_buffer_type *>::push_back(ggml_backend_buffer_type *&&) jmp short $+2 loc_B98A: jmp loc_BA37 mov rdi, [rsp+arg_C0] mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax call _ZNSt6vectorIN9ggml_easy3ctx14printed_tensorESaIS2_EED2Ev; std::vector<ggml_easy::ctx::printed_tensor>::~vector() mov rdi, [rsp+arg_B8] call _ZNSt6vectorIN9ggml_easy3ctx11loaded_ggufESaIS2_EED2Ev; std::vector<ggml_easy::ctx::loaded_gguf>::~vector() mov rdi, [rsp+arg_B0] call _ZNSt10unique_ptrI18ggml_backend_sched26ggml_backend_sched_deleterED2Ev; std::unique_ptr<ggml_backend_sched,ggml_backend_sched_deleter>::~unique_ptr() mov rdi, [rsp+arg_A8] call _ZNSt6vectorIP24ggml_backend_buffer_typeSaIS1_EED2Ev; std::vector<ggml_backend_buffer_type *>::~vector() mov rdi, [rsp+arg_A0] call _ZNSt6vectorIP12ggml_backendSaIS1_EED2Ev; std::vector<ggml_backend *>::~vector() mov rdi, [rsp+arg_98] call _ZNSt6vectorIhSaIhEED2Ev; std::vector<uchar>::~vector() mov rdi, [rsp+arg_90] call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S7_EEED2Ev; std::unordered_map<std::string,ggml_tensor *>::~unordered_map() jmp loc_BB8D loc_BA03: mov rdi, [rsp+108h+var_38] mov rax, [rdi+0A8h] mov [rdi+0A0h], rax lea rdx, aSUsingCpuBacke; "%s: using CPU backend\n" lea rcx, aCtx; "ctx" xor eax, eax mov esi, 2 call _ZN9ggml_easy3ctx3logE14ggml_log_levelPKcz; ggml_easy::ctx::log(ggml_log_level,char const*,...) jmp short $+2 loc_BA35: jmp short $+2 loc_BA37: mov rsi, [rsp+108h+var_38] mov rdi, rsi add rdi, 70h ; 'p' add rsi, 0A8h call _ZNSt6vectorIP12ggml_backendSaIS1_EE9push_backERKS1_; std::vector<ggml_backend *>::push_back(ggml_backend * const&) jmp short $+2 loc_BA54: mov rax, [rsp+108h+var_38] mov rcx, rax add rcx, 88h mov [rsp+108h+var_B0], rcx mov rdi, [rax+0A8h] call _ggml_backend_get_default_buffer_type mov [rsp+108h+var_A8], rax jmp short $+2 loc_BA7E: mov rdi, [rsp+108h+var_B0] mov rax, [rsp+108h+var_A8] mov [rsp+108h+var_30], rax lea rsi, [rsp+108h+var_30] call _ZNSt6vectorIP24ggml_backend_buffer_typeSaIS1_EE9push_backEOS1_; std::vector<ggml_backend_buffer_type *>::push_back(ggml_backend_buffer_type *&&) jmp short $+2 loc_BA9F: mov rdi, [rsp+108h+var_38] mov rax, rdi add rax, 0B8h mov [rsp+108h+var_D8], rax add rdi, 70h ; 'p' mov [rsp+108h+var_D0], rdi call _ZNSt6vectorIP12ggml_backendSaIS1_EE4dataEv; std::vector<ggml_backend *>::data(void) mov rdi, [rsp+108h+var_38] mov [rsp+108h+var_C8], rax add rdi, 88h call _ZNSt6vectorIP24ggml_backend_buffer_typeSaIS1_EE4dataEv; std::vector<ggml_backend_buffer_type *>::data(void) mov rdi, [rsp+108h+var_D0] mov [rsp+108h+var_C0], rax call _ZNKSt6vectorIP12ggml_backendSaIS1_EE4sizeEv; std::vector<ggml_backend *>::size(void) mov rdi, [rsp+108h+var_C8] mov rsi, [rsp+108h+var_C0] mov rcx, rax mov rax, [rsp+108h+var_38] mov edx, ecx movsxd rcx, dword ptr [rax+68h] xor r8d, r8d call _ggml_backend_sched_new mov [rsp+108h+var_B8], rax jmp short $+2 loc_BB15: mov rsi, [rsp+108h+var_B8] mov rdi, [rsp+108h+var_D8] call _ZNSt10unique_ptrI18ggml_backend_sched26ggml_backend_sched_deleterE5resetEPS0_; std::unique_ptr<ggml_backend_sched,ggml_backend_sched_deleter>::reset(ggml_backend_sched*) mov rax, [rsp+108h+var_38] mov rcx, rax add rcx, 50h ; 'P' mov [rsp+108h+var_F0], rcx movsxd rax, dword ptr [rax+68h] mov [rsp+108h+var_E8], rax call _ggml_tensor_overhead mov [rsp+108h+var_E0], rax jmp short $+2 loc_BB4D: mov rcx, [rsp+108h+var_E0] mov rax, [rsp+108h+var_E8] imul rax, rcx mov [rsp+108h+var_100], rax call _ggml_graph_overhead mov [rsp+108h+var_F8], rax jmp short $+2 loc_BB6C: mov rdi, [rsp+108h+var_F0] mov rax, [rsp+108h+var_F8] mov rsi, [rsp+108h+var_100] add rsi, rax call _ZNSt6vectorIhSaIhEE6resizeEm; std::vector<uchar>::resize(ulong) jmp short $+2 loc_BB85: add rsp, 108h retn loc_BB8D: mov rdi, [rsp+arg_E8] call __Unwind_Resume
long long ggml_easy::ctx::ctx(ggml_easy::ctx *this, const ggml_easy::ctx_params *a2) { int v2; // r8d int v3; // r9d int v4; // r9d unsigned int v5; // eax long long v6; // rsi long long v8; // [rsp+8h] [rbp-100h] long long v9; // [rsp+10h] [rbp-F8h] long long v10; // [rsp+20h] [rbp-E8h] long long v11; // [rsp+40h] [rbp-C8h] long long v12; // [rsp+48h] [rbp-C0h] int v13; // [rsp+78h] [rbp-90h] long long v14; // [rsp+80h] [rbp-88h] long long default_buffer_type; // [rsp+D8h] [rbp-30h] BYREF long long v16[3]; // [rsp+E0h] [rbp-28h] BYREF const ggml_easy::ctx_params *v17; // [rsp+F8h] [rbp-10h] ggml_easy::ctx *v18; // [rsp+100h] [rbp-8h] v18 = this; v17 = a2; *(_DWORD *)this = *((_DWORD *)a2 + 2); std::unordered_map<std::string,ggml_tensor *>::unordered_map(); *((_QWORD *)this + 8) = 0LL; *((_QWORD *)this + 9) = 0LL; std::vector<unsigned char>::vector(); *((_DWORD *)this + 26) = *((_DWORD *)v17 + 1); std::vector<ggml_backend *>::vector(); std::vector<ggml_backend_buffer_type *>::vector(); *((_QWORD *)this + 20) = 0LL; *((_QWORD *)this + 21) = 0LL; *((_QWORD *)this + 22) = 0LL; std::unique_ptr<ggml_backend_sched,ggml_backend_sched_deleter>::unique_ptr<ggml_backend_sched_deleter,void>(); std::vector<ggml_easy::ctx::loaded_gguf>::vector(); std::vector<ggml_easy::ctx::printed_tensor>::vector(); ggml_log_set(ggml_easy::log_cb, this); *((_QWORD *)this + 21) = ggml_backend_init_by_type(0LL, 0LL); if ( (*(_BYTE *)v17 & 1) != 0 ) v14 = ggml_backend_init_by_type(1LL, 0LL); else v14 = 0LL; *((_QWORD *)this + 20) = v14; if ( *((_QWORD *)this + 20) ) { v13 = ggml_backend_name(*((_QWORD *)this + 20)); ggml_easy::ctx::log((_DWORD)this, 2, (unsigned int)"%s: using %s backend\n", (unsigned int)"ctx", v13, v4); std::vector<ggml_backend *>::push_back((char *)this + 112, (char *)this + 160); v16[0] = ggml_backend_get_default_buffer_type(*((_QWORD *)this + 20), (char *)this + 160); std::vector<ggml_backend_buffer_type *>::push_back((char *)this + 136, v16); } else { *((_QWORD *)this + 20) = *((_QWORD *)this + 21); ggml_easy::ctx::log((_DWORD)this, 2, (unsigned int)"%s: using CPU backend\n", (unsigned int)"ctx", v2, v3); } std::vector<ggml_backend *>::push_back((char *)this + 112, (char *)this + 168); default_buffer_type = ggml_backend_get_default_buffer_type(*((_QWORD *)this + 21), (char *)this + 168); std::vector<ggml_backend_buffer_type *>::push_back((char *)this + 136, &default_buffer_type); v11 = std::vector<ggml_backend *>::data(); v12 = std::vector<ggml_backend_buffer_type *>::data((char *)this + 136); v5 = std::vector<ggml_backend *>::size((char *)this + 112, &default_buffer_type); v6 = ggml_backend_sched_new(v11, v12, v5, *((int *)this + 26), 0LL); std::unique_ptr<ggml_backend_sched,ggml_backend_sched_deleter>::reset((char *)this + 184, v6); v10 = *((int *)this + 26); v8 = ggml_tensor_overhead() * v10; v9 = ggml_graph_overhead(); return std::vector<unsigned char>::resize((char *)this + 80, v9 + v8); }
ctx: SUB RSP,0x108 MOV qword ptr [RSP + 0x100],RDI MOV qword ptr [RSP + 0xf8],RSI MOV RDI,qword ptr [RSP + 0x100] MOV qword ptr [RSP + 0xd0],RDI MOV RAX,qword ptr [RSP + 0xf8] MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RDI],EAX ADD RDI,0x8 MOV qword ptr [RSP + 0x98],RDI CALL 0x0010d2c0 MOV RDI,qword ptr [RSP + 0xd0] MOV qword ptr [RDI + 0x40],0x0 MOV qword ptr [RDI + 0x48],0x0 ADD RDI,0x50 MOV qword ptr [RSP + 0xa0],RDI CALL 0x0010d2d0 MOV RDI,qword ptr [RSP + 0xd0] MOV RAX,qword ptr [RSP + 0xf8] MOV EAX,dword ptr [RAX + 0x4] MOV dword ptr [RDI + 0x68],EAX ADD RDI,0x70 MOV qword ptr [RSP + 0xa8],RDI CALL 0x0010d2e0 MOV RDI,qword ptr [RSP + 0xd0] ADD RDI,0x88 MOV qword ptr [RSP + 0xb0],RDI CALL 0x0010d2f0 MOV RDI,qword ptr [RSP + 0xd0] MOV qword ptr [RDI + 0xa0],0x0 MOV qword ptr [RDI + 0xa8],0x0 MOV qword ptr [RDI + 0xb0],0x0 ADD RDI,0xb8 MOV qword ptr [RSP + 0xb8],RDI CALL 0x0010d300 MOV RDI,qword ptr [RSP + 0xd0] ADD RDI,0xc0 MOV qword ptr [RSP + 0xc0],RDI CALL 0x0010d330 MOV RDI,qword ptr [RSP + 0xd0] ADD RDI,0xd8 MOV qword ptr [RSP + 0xc8],RDI CALL 0x0010d340 MOV RSI,qword ptr [RSP + 0xd0] LAB_0010b83e: LEA RDI,[0x108810] CALL 0x00108610 JMP 0x0010b84c LAB_0010b84c: XOR EDI,EDI MOV ESI,EDI CALL 0x00108340 MOV qword ptr [RSP + 0x90],RAX JMP 0x0010b85f LAB_0010b85f: MOV RAX,qword ptr [RSP + 0xd0] MOV RCX,qword ptr [RSP + 0x90] MOV qword ptr [RAX + 0xa8],RCX MOV RAX,qword ptr [RSP + 0xf8] TEST byte ptr [RAX],0x1 JZ 0x0010b8ad XOR EAX,EAX MOV ESI,EAX MOV EDI,0x1 CALL 0x00108340 MOV qword ptr [RSP + 0x88],RAX JMP 0x0010b89b LAB_0010b89b: MOV RAX,qword ptr [RSP + 0x88] MOV qword ptr [RSP + 0x80],RAX JMP 0x0010b8b9 LAB_0010b8ad: XOR EAX,EAX MOV qword ptr [RSP + 0x80],RAX JMP 0x0010b8b9 LAB_0010b8b9: MOV RAX,qword ptr [RSP + 0xd0] MOV RCX,qword ptr [RSP + 0x80] MOV qword ptr [RAX + 0xa0],RCX CMP qword ptr [RAX + 0xa0],0x0 JZ 0x0010ba03 MOV RAX,qword ptr [RSP + 0xd0] MOV RDI,qword ptr [RAX + 0xa0] CALL 0x00108500 MOV qword ptr [RSP + 0x78],RAX JMP 0x0010b8f9 LAB_0010b8f9: MOV R8,qword ptr [RSP + 0x78] MOV RDI,qword ptr [RSP + 0xd0] LEA RDX,[0x1142f9] LEA RCX,[0x11430f] XOR EAX,EAX MOV ESI,0x2 CALL 0x0010d350 JMP 0x0010b922 LAB_0010b922: MOV RSI,qword ptr [RSP + 0xd0] MOV RDI,RSI ADD RDI,0x70 ADD RSI,0xa0 CALL 0x0010d410 JMP 0x0010b93f LAB_0010b93f: MOV RAX,qword ptr [RSP + 0xd0] MOV RCX,RAX ADD RCX,0x88 MOV qword ptr [RSP + 0x68],RCX MOV RDI,qword ptr [RAX + 0xa0] CALL 0x00108660 MOV qword ptr [RSP + 0x70],RAX JMP 0x0010b969 LAB_0010b969: MOV RDI,qword ptr [RSP + 0x68] MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0xe0],RAX LEA RSI,[RSP + 0xe0] CALL 0x0010d480 JMP 0x0010b98a LAB_0010b98a: JMP 0x0010ba37 LAB_0010ba03: MOV RDI,qword ptr [RSP + 0xd0] MOV RAX,qword ptr [RDI + 0xa8] MOV qword ptr [RDI + 0xa0],RAX LEA RDX,[0x114313] LEA RCX,[0x11430f] XOR EAX,EAX MOV ESI,0x2 CALL 0x0010d350 JMP 0x0010ba35 LAB_0010ba35: JMP 0x0010ba37 LAB_0010ba37: MOV RSI,qword ptr [RSP + 0xd0] MOV RDI,RSI ADD RDI,0x70 ADD RSI,0xa8 CALL 0x0010d410 JMP 0x0010ba54 LAB_0010ba54: MOV RAX,qword ptr [RSP + 0xd0] MOV RCX,RAX ADD RCX,0x88 MOV qword ptr [RSP + 0x58],RCX MOV RDI,qword ptr [RAX + 0xa8] CALL 0x00108660 MOV qword ptr [RSP + 0x60],RAX JMP 0x0010ba7e LAB_0010ba7e: MOV RDI,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0xd8],RAX LEA RSI,[RSP + 0xd8] CALL 0x0010d480 JMP 0x0010ba9f LAB_0010ba9f: MOV RDI,qword ptr [RSP + 0xd0] MOV RAX,RDI ADD RAX,0xb8 MOV qword ptr [RSP + 0x30],RAX ADD RDI,0x70 MOV qword ptr [RSP + 0x38],RDI CALL 0x0010d4e0 MOV RDI,qword ptr [RSP + 0xd0] MOV qword ptr [RSP + 0x40],RAX ADD RDI,0x88 CALL 0x0010d500 MOV RDI,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x48],RAX CALL 0x0010d520 MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x48] MOV RCX,RAX MOV RAX,qword ptr [RSP + 0xd0] MOV EDX,ECX MOVSXD RCX,dword ptr [RAX + 0x68] XOR R8D,R8D CALL 0x001086c0 MOV qword ptr [RSP + 0x50],RAX JMP 0x0010bb15 LAB_0010bb15: MOV RSI,qword ptr [RSP + 0x50] MOV RDI,qword ptr [RSP + 0x30] CALL 0x0010d4b0 MOV RAX,qword ptr [RSP + 0xd0] MOV RCX,RAX ADD RCX,0x50 MOV qword ptr [RSP + 0x18],RCX MOVSXD RAX,dword ptr [RAX + 0x68] MOV qword ptr [RSP + 0x20],RAX CALL 0x001085b0 MOV qword ptr [RSP + 0x28],RAX JMP 0x0010bb4d LAB_0010bb4d: MOV RCX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x20] IMUL RAX,RCX MOV qword ptr [RSP + 0x8],RAX CALL 0x00108190 MOV qword ptr [RSP + 0x10],RAX JMP 0x0010bb6c LAB_0010bb6c: MOV RDI,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x8] ADD RSI,RAX CALL 0x0010d540 LAB_0010bb83: JMP 0x0010bb85 LAB_0010bb85: ADD RSP,0x108 RET
/* ggml_easy::ctx::ctx(ggml_easy::ctx_params const&) */ void __thiscall ggml_easy::ctx::ctx(ctx *this,ctx_params *param_1) { int iVar1; int4 uVar2; int8 uVar3; int8 uVar4; ggml_backend_sched *pgVar5; long lVar6; long lVar7; int8 local_88; ggml_backend_buffer_type *local_30; ggml_backend_buffer_type *local_28 [3]; ctx_params *local_10; ctx *local_8; *(int4 *)this = *(int4 *)(param_1 + 8); local_10 = param_1; local_8 = this; std:: unordered_map<std::__cxx11::string,ggml_tensor*,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>> ::unordered_map((unordered_map<std::__cxx11::string,ggml_tensor*,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>> *)(this + 8)); *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; std::vector<unsigned_char,std::allocator<unsigned_char>>::vector ((vector<unsigned_char,std::allocator<unsigned_char>> *)(this + 0x50)); *(int4 *)(this + 0x68) = *(int4 *)(local_10 + 4); std::vector<ggml_backend*,std::allocator<ggml_backend*>>::vector ((vector<ggml_backend*,std::allocator<ggml_backend*>> *)(this + 0x70)); std::vector<ggml_backend_buffer_type*,std::allocator<ggml_backend_buffer_type*>>::vector ((vector<ggml_backend_buffer_type*,std::allocator<ggml_backend_buffer_type*>> *) (this + 0x88)); *(int8 *)(this + 0xa0) = 0; *(int8 *)(this + 0xa8) = 0; *(int8 *)(this + 0xb0) = 0; std::unique_ptr<ggml_backend_sched,ggml_backend_sched_deleter>:: unique_ptr<ggml_backend_sched_deleter,void> ((unique_ptr<ggml_backend_sched,ggml_backend_sched_deleter> *)(this + 0xb8)); std::vector<ggml_easy::ctx::loaded_gguf,std::allocator<ggml_easy::ctx::loaded_gguf>>::vector ((vector<ggml_easy::ctx::loaded_gguf,std::allocator<ggml_easy::ctx::loaded_gguf>> *) (this + 0xc0)); std::vector<ggml_easy::ctx::printed_tensor,std::allocator<ggml_easy::ctx::printed_tensor>>::vector ((vector<ggml_easy::ctx::printed_tensor,std::allocator<ggml_easy::ctx::printed_tensor>> *)(this + 0xd8)); /* try { // try from 0010b83e to 0010bb82 has its CatchHandler @ 0010b98f */ ggml_log_set(log_cb,this); uVar3 = ggml_backend_init_by_type(0,0); *(int8 *)(this + 0xa8) = uVar3; if (((byte)*local_10 & 1) == 0) { local_88 = 0; } else { local_88 = ggml_backend_init_by_type(1,0); } *(int8 *)(this + 0xa0) = local_88; if (*(long *)(this + 0xa0) == 0) { *(int8 *)(this + 0xa0) = *(int8 *)(this + 0xa8); log(this,2,"%s: using CPU backend\n",&DAT_0011430f); } else { uVar3 = ggml_backend_name(*(int8 *)(this + 0xa0)); log(this,2,"%s: using %s backend\n",&DAT_0011430f,uVar3); std::vector<ggml_backend*,std::allocator<ggml_backend*>>::push_back ((vector<ggml_backend*,std::allocator<ggml_backend*>> *)(this + 0x70), (ggml_backend **)(this + 0xa0)); local_28[0] = (ggml_backend_buffer_type *) ggml_backend_get_default_buffer_type(*(int8 *)(this + 0xa0)); std::vector<ggml_backend_buffer_type*,std::allocator<ggml_backend_buffer_type*>>::push_back ((vector<ggml_backend_buffer_type*,std::allocator<ggml_backend_buffer_type*>> *) (this + 0x88),local_28); } std::vector<ggml_backend*,std::allocator<ggml_backend*>>::push_back ((vector<ggml_backend*,std::allocator<ggml_backend*>> *)(this + 0x70), (ggml_backend **)(this + 0xa8)); local_30 = (ggml_backend_buffer_type *) ggml_backend_get_default_buffer_type(*(int8 *)(this + 0xa8)); std::vector<ggml_backend_buffer_type*,std::allocator<ggml_backend_buffer_type*>>::push_back ((vector<ggml_backend_buffer_type*,std::allocator<ggml_backend_buffer_type*>> *) (this + 0x88),&local_30); uVar3 = std::vector<ggml_backend*,std::allocator<ggml_backend*>>::data ((vector<ggml_backend*,std::allocator<ggml_backend*>> *)(this + 0x70)); uVar4 = std::vector<ggml_backend_buffer_type*,std::allocator<ggml_backend_buffer_type*>>::data ((vector<ggml_backend_buffer_type*,std::allocator<ggml_backend_buffer_type*>> *) (this + 0x88)); uVar2 = std::vector<ggml_backend*,std::allocator<ggml_backend*>>::size ((vector<ggml_backend*,std::allocator<ggml_backend*>> *)(this + 0x70)); pgVar5 = (ggml_backend_sched *) ggml_backend_sched_new(uVar3,uVar4,uVar2,(long)*(int *)(this + 0x68),0); std::unique_ptr<ggml_backend_sched,ggml_backend_sched_deleter>::reset ((unique_ptr<ggml_backend_sched,ggml_backend_sched_deleter> *)(this + 0xb8),pgVar5); iVar1 = *(int *)(this + 0x68); lVar6 = ggml_tensor_overhead(); lVar7 = ggml_graph_overhead(); std::vector<unsigned_char,std::allocator<unsigned_char>>::resize ((vector<unsigned_char,std::allocator<unsigned_char>> *)(this + 0x50), iVar1 * lVar6 + lVar7); return; }
23,485
wake_up_waiters
eloqsql/mysys/thr_lock.c
static void wake_up_waiters(THR_LOCK *lock) { THR_LOCK_DATA *data; enum thr_lock_type lock_type; DBUG_ENTER("wake_up_waiters"); check_locks(lock, "before waking up waiters", TL_UNLOCK, 1); if (!lock->write.data) /* If no active write locks */ { data=lock->write_wait.data; if (!lock->read.data) /* If no more locks in use */ { /* Release write-locks with TL_WRITE or TL_WRITE_ONLY priority first */ if (data && (data->type != TL_WRITE_LOW_PRIORITY || !lock->read_wait.data || lock->read_wait.data->type < TL_READ_HIGH_PRIORITY)) { if (lock->write_lock_count++ > max_write_lock_count) { /* Too many write locks in a row; Release all waiting read locks */ lock->write_lock_count=0; if (lock->read_wait.data) { DBUG_PRINT("info",("Freeing all read_locks because of max_write_lock_count")); free_all_read_locks(lock,0); goto end; } } for (;;) { if (((*data->prev)=data->next)) /* remove from wait-list */ data->next->prev= data->prev; else lock->write_wait.last=data->prev; (*lock->write.last)=data; /* Put in execute list */ data->prev=lock->write.last; data->next=0; lock->write.last= &data->next; if (data->type == TL_WRITE_CONCURRENT_INSERT && (*lock->check_status)(data->status_param)) data->type=TL_WRITE; /* Upgrade lock */ /* purecov: begin inspected */ DBUG_PRINT("lock",("giving write lock of type %d to thread: %lu", data->type, (ulong) data->owner->thread_id)); /* purecov: end */ { mysql_cond_t *cond= data->cond; data->cond=0; /* Mark thread free */ mysql_cond_signal(cond); /* Start waiting thread */ } if (data->type != TL_WRITE_ALLOW_WRITE || !lock->write_wait.data || lock->write_wait.data->type != TL_WRITE_ALLOW_WRITE) break; data=lock->write_wait.data; /* Free this too */ } if (data->type >= TL_WRITE_LOW_PRIORITY) goto end; /* Release possible read locks together with the write lock */ } if (lock->read_wait.data) free_all_read_locks(lock, data && (data->type == TL_WRITE_CONCURRENT_INSERT || data->type == TL_WRITE_ALLOW_WRITE)); else { DBUG_PRINT("lock",("No waiting read locks to free")); } } else if (data && (lock_type=data->type) <= TL_WRITE_DELAYED && ((lock_type != TL_WRITE_CONCURRENT_INSERT && lock_type != TL_WRITE_ALLOW_WRITE) || !lock->read_no_write_count)) { /* For DELAYED, ALLOW_READ, WRITE_ALLOW_WRITE or CONCURRENT_INSERT locks start WRITE locks together with the READ locks */ if (lock_type == TL_WRITE_CONCURRENT_INSERT && (*lock->check_status)(data->status_param)) { data->type=TL_WRITE; /* Upgrade lock */ if (lock->read_wait.data) free_all_read_locks(lock,0); goto end; } do { mysql_cond_t *cond= data->cond; if (((*data->prev)=data->next)) /* remove from wait-list */ data->next->prev= data->prev; else lock->write_wait.last=data->prev; (*lock->write.last)=data; /* Put in execute list */ data->prev=lock->write.last; lock->write.last= &data->next; data->next=0; /* Only one write lock */ data->cond=0; /* Mark thread free */ mysql_cond_signal(cond); /* Start waiting thread */ } while (lock_type == TL_WRITE_ALLOW_WRITE && (data=lock->write_wait.data) && data->type == TL_WRITE_ALLOW_WRITE); if (lock->read_wait.data) free_all_read_locks(lock, (lock_type == TL_WRITE_CONCURRENT_INSERT || lock_type == TL_WRITE_ALLOW_WRITE)); } else if (!data && lock->read_wait.data) free_all_read_locks(lock,0); } end: check_locks(lock, "after waking up waiters", TL_UNLOCK, 0); DBUG_VOID_RETURN; }
O3
c
wake_up_waiters: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax cmpq $0x0, 0x90(%rdi) je 0xa5808 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rdi, %rbx movq 0x80(%rdi), %r15 cmpq $0x0, 0x70(%rdi) je 0xa5882 testq %r15, %r15 je 0xa5952 movl 0x40(%r15), %r13d cmpl $0x9, %r13d jg 0xa57f9 leal -0x9(%r13), %r14d cmpl $-0x2, %r14d jb 0xa583f cmpl $0x0, 0xa8(%rbx) jne 0xa57f9 cmpl $0x8, %r13d jne 0xa5aad movq 0x28(%r15), %rdi callq *0xd8(%rbx) testb %al, %al je 0xa5aad movl $0xd, 0x40(%r15) cmpq $0x0, 0x60(%rbx) je 0xa57f9 movq %rbx, %rdi xorl %esi, %esi addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0xa6e24 testq %r15, %r15 je 0xa59c9 cmpl $0xb, 0x40(%r15) jne 0xa58aa movq 0x60(%rbx), %rcx testq %rcx, %rcx je 0xa58aa movl $0xb, %eax cmpl $0x3, 0x40(%rcx) jg 0xa5c04 movq 0xa0(%rbx), %rax leaq 0x1(%rax), %rcx movq %rcx, 0xa0(%rbx) leaq 0x2e3335(%rip), %rcx # 0x388bf8 cmpq (%rcx), %rax jbe 0xa59e2 movq $0x0, 0xa0(%rbx) movq 0x60(%rbx), %r12 testq %r12, %r12 je 0xa59e2 leaq 0x60(%rbx), %rax movq 0x78(%rbx), %rcx movq %r12, (%rcx) movq 0x78(%rbx), %rcx movq %rcx, 0x10(%r12) movq 0x68(%rbx), %rcx movq %rcx, 0x78(%rbx) movq %rax, 0x68(%rbx) leaq 0x2e3745(%rip), %r15 # 0x389050 movq 0x20(%r12), %r14 cmpl $0x5, 0x40(%r12) jne 0xa591e incl 0xa8(%rbx) movq $0x0, 0x20(%r12) movq 0x30(%r14), %rdi testq %rdi, %rdi jne 0xa5947 movq %r14, %rdi callq 0x29540 movq 0x8(%r12), %r12 testq %r12, %r12 jne 0xa590b jmp 0xa5cc0 movq (%r15), %rax callq *0x170(%rax) jmp 0xa5930 movq 0x60(%rbx), %r15 testq %r15, %r15 je 0xa57f9 leaq 0x60(%rbx), %rax movq 0x78(%rbx), %rcx movq %r15, (%rcx) movq 0x78(%rbx), %rcx movq %rcx, 0x10(%r15) movq 0x68(%rbx), %rcx movq %rcx, 0x78(%rbx) movq %rax, 0x68(%rbx) leaq 0x2e36cb(%rip), %r12 # 0x389050 movq 0x20(%r15), %r14 cmpl $0x5, 0x40(%r15) jne 0xa5996 incl 0xa8(%rbx) movq $0x0, 0x20(%r15) movq 0x30(%r14), %rdi testq %rdi, %rdi jne 0xa59bd movq %r14, %rdi callq 0x29540 movq 0x8(%r15), %r15 testq %r15, %r15 jne 0xa5985 jmp 0xa5cc0 movq (%r12), %rax callq *0x170(%rax) jmp 0xa59a7 movq 0x60(%rbx), %r15 testq %r15, %r15 je 0xa57f9 leaq 0x60(%rbx), %rcx movb $0x1, %r12b jmp 0xa5c1f leaq 0x88(%rbx), %r12 leaq 0x2e3660(%rip), %r13 # 0x389050 leaq 0x8(%r15), %rax movq 0x8(%r15), %rcx movq 0x10(%r15), %rdx movq %rcx, (%rdx) leaq 0x10(%rcx), %rdx testq %rcx, %rcx movq 0x10(%r15), %rcx cmoveq %r12, %rdx movq %rcx, (%rdx) movq 0x98(%rbx), %rcx movq %r15, (%rcx) movq 0x98(%rbx), %rcx movq %rcx, 0x10(%r15) movq $0x0, 0x8(%r15) movq %rax, 0x98(%rbx) cmpl $0x8, 0x40(%r15) jne 0xa5a52 movq 0x28(%r15), %rdi callq *0xd8(%rbx) testb %al, %al je 0xa5a52 movl $0xd, 0x40(%r15) movq 0x20(%r15), %r14 movq $0x0, 0x20(%r15) movq 0x30(%r14), %rdi testq %rdi, %rdi jne 0xa5aa1 movq %r14, %rdi callq 0x29540 movl 0x40(%r15), %eax cmpl $0x7, %eax jne 0xa5bfb movq 0x80(%rbx), %r15 movl $0x7, %eax testq %r15, %r15 je 0xa5c04 cmpl $0x7, 0x40(%r15) je 0xa59f0 jmp 0xa5c04 movq (%r13), %rax callq *0x170(%rax) jmp 0xa5a67 movl %r14d, -0x2c(%rbp) leaq 0x88(%rbx), %r12 movq 0x20(%r15), %r14 leaq 0x8(%r15), %rax movq 0x8(%r15), %rcx movq 0x10(%r15), %rdx movq %rcx, (%rdx) leaq 0x10(%rcx), %rdx testq %rcx, %rcx movq 0x10(%r15), %rcx cmoveq %r12, %rdx movq %rcx, (%rdx) movq 0x98(%rbx), %rcx movq %r15, (%rcx) movq 0x98(%rbx), %rcx movq %rcx, 0x10(%r15) movq %rax, 0x98(%rbx) xorl %eax, %eax movq %rax, 0x8(%r15) movq %rax, 0x20(%r15) movq 0x30(%r14), %rdi testq %rdi, %rdi jne 0xa5b2f movq %r14, %rdi callq 0x29540 cmpl $0x7, %r13d jne 0xa5b41 movq 0x80(%rbx), %r15 testq %r15, %r15 je 0xa5b41 cmpl $0x7, 0x40(%r15) je 0xa5ab8 jmp 0xa5b41 leaq 0x2e351a(%rip), %rax # 0x389050 movq (%rax), %rax callq *0x170(%rax) jmp 0xa5b0c movq 0x60(%rbx), %r15 testq %r15, %r15 movl -0x2c(%rbp), %r12d je 0xa57f9 leaq 0x60(%rbx), %rax leaq 0x78(%rbx), %r13 movq 0x78(%rbx), %rcx movq %r15, (%rcx) movq 0x78(%rbx), %rcx movq %rcx, 0x10(%r15) movq 0x68(%rbx), %rcx movq %rcx, 0x78(%rbx) movq %rax, 0x68(%rbx) movq 0x20(%r15), %r14 cmpl $0x5, 0x40(%r15) jne 0xa5b8c cmpl $-0x2, %r12d jae 0xa5ba7 incl 0xa8(%rbx) movq $0x0, 0x20(%r15) movq 0x30(%r14), %rdi testq %rdi, %rdi jne 0xa5be9 movq %r14, %rdi callq 0x29540 jmp 0xa5bdb leaq 0x8(%r15), %rax movq 0x8(%r15), %rcx movq 0x10(%r15), %rdx movq %rcx, (%rdx) leaq 0x10(%rcx), %rdx testq %rcx, %rcx movq 0x10(%r15), %rcx cmoveq %r13, %rdx movq %rcx, (%rdx) movq 0x68(%rbx), %rcx movq %r15, (%rcx) movq 0x68(%rbx), %rcx movq %rcx, 0x10(%r15) movq %rax, 0x68(%rbx) movq 0x8(%r15), %r15 testq %r15, %r15 jne 0xa5b75 jmp 0xa5cc0 leaq 0x2e3460(%rip), %rax # 0x389050 movq (%rax), %rax callq *0x170(%rax) jmp 0xa5b9d cmpl $0xa, %eax jg 0xa57f9 movq 0x60(%rbx), %r15 testq %r15, %r15 je 0xa57f9 leaq 0x60(%rbx), %rcx addl $-0x9, %eax cmpl $-0x2, %eax setb %r12b leaq 0x78(%rbx), %r13 movq 0x78(%rbx), %rax movq %r15, (%rax) movq 0x78(%rbx), %rax movq %rax, 0x10(%r15) movq 0x68(%rbx), %rax movq %rax, 0x78(%rbx) movq %rcx, 0x68(%rbx) movq 0x20(%r15), %r14 cmpl $0x5, 0x40(%r15) jne 0xa5c54 testb %r12b, %r12b je 0xa5c6f incl 0xa8(%rbx) movq $0x0, 0x20(%r15) movq 0x30(%r14), %rdi testq %rdi, %rdi jne 0xa5cae movq %r14, %rdi callq 0x29540 jmp 0xa5ca3 leaq 0x8(%r15), %rax movq 0x8(%r15), %rcx movq 0x10(%r15), %rdx movq %rcx, (%rdx) leaq 0x10(%rcx), %rdx testq %rcx, %rcx movq 0x10(%r15), %rcx cmoveq %r13, %rdx movq %rcx, (%rdx) movq 0x68(%rbx), %rcx movq %r15, (%rcx) movq 0x68(%rbx), %rcx movq %rcx, 0x10(%r15) movq %rax, 0x68(%rbx) movq 0x8(%r15), %r15 testq %r15, %r15 jne 0xa5c3e jmp 0xa5cc0 leaq 0x2e339b(%rip), %rax # 0x389050 movq (%rax), %rax callq *0x170(%rax) jmp 0xa5c65 movq 0x68(%rbx), %rax movq $0x0, (%rax) cmpq $0x0, 0x60(%rbx) jne 0xa57f9 movq $0x0, 0xa0(%rbx) jmp 0xa57f9
wake_up_waiters: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax cmp qword ptr [rdi+90h], 0 jz short loc_A5808 loc_A57F9: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_A5808: mov rbx, rdi mov r15, [rdi+80h] cmp qword ptr [rdi+70h], 0 jz short loc_A5882 test r15, r15 jz loc_A5952 mov r13d, [r15+40h] cmp r13d, 9 jg short loc_A57F9 lea r14d, [r13-9] cmp r14d, 0FFFFFFFEh jb short loc_A583F cmp dword ptr [rbx+0A8h], 0 jnz short loc_A57F9 loc_A583F: cmp r13d, 8 jnz loc_A5AAD mov rdi, [r15+28h] call qword ptr [rbx+0D8h] test al, al jz loc_A5AAD mov dword ptr [r15+40h], 0Dh cmp qword ptr [rbx+60h], 0 jz short loc_A57F9 mov rdi, rbx xor esi, esi add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp free_all_read_locks loc_A5882: test r15, r15 jz loc_A59C9 cmp dword ptr [r15+40h], 0Bh jnz short loc_A58AA mov rcx, [rbx+60h] test rcx, rcx jz short loc_A58AA mov eax, 0Bh cmp dword ptr [rcx+40h], 3 jg loc_A5C04 loc_A58AA: mov rax, [rbx+0A0h] lea rcx, [rax+1] mov [rbx+0A0h], rcx lea rcx, max_write_lock_count cmp rax, [rcx] jbe loc_A59E2 mov qword ptr [rbx+0A0h], 0 mov r12, [rbx+60h] test r12, r12 jz loc_A59E2 lea rax, [rbx+60h] mov rcx, [rbx+78h] mov [rcx], r12 mov rcx, [rbx+78h] mov [r12+10h], rcx mov rcx, [rbx+68h] mov [rbx+78h], rcx mov [rbx+68h], rax lea r15, PSI_server loc_A590B: mov r14, [r12+20h] cmp dword ptr [r12+40h], 5 jnz short loc_A591E inc dword ptr [rbx+0A8h] loc_A591E: mov qword ptr [r12+20h], 0 mov rdi, [r14+30h] test rdi, rdi jnz short loc_A5947 loc_A5930: mov rdi, r14 call _pthread_cond_signal mov r12, [r12+8] test r12, r12 jnz short loc_A590B jmp loc_A5CC0 loc_A5947: mov rax, [r15] call qword ptr [rax+170h] jmp short loc_A5930 loc_A5952: mov r15, [rbx+60h] test r15, r15 jz loc_A57F9 lea rax, [rbx+60h] mov rcx, [rbx+78h] mov [rcx], r15 mov rcx, [rbx+78h] mov [r15+10h], rcx mov rcx, [rbx+68h] mov [rbx+78h], rcx mov [rbx+68h], rax lea r12, PSI_server loc_A5985: mov r14, [r15+20h] cmp dword ptr [r15+40h], 5 jnz short loc_A5996 inc dword ptr [rbx+0A8h] loc_A5996: mov qword ptr [r15+20h], 0 mov rdi, [r14+30h] test rdi, rdi jnz short loc_A59BD loc_A59A7: mov rdi, r14 call _pthread_cond_signal mov r15, [r15+8] test r15, r15 jnz short loc_A5985 jmp loc_A5CC0 loc_A59BD: mov rax, [r12] call qword ptr [rax+170h] jmp short loc_A59A7 loc_A59C9: mov r15, [rbx+60h] test r15, r15 jz loc_A57F9 lea rcx, [rbx+60h] mov r12b, 1 jmp loc_A5C1F loc_A59E2: lea r12, [rbx+88h] lea r13, PSI_server loc_A59F0: lea rax, [r15+8] mov rcx, [r15+8] mov rdx, [r15+10h] mov [rdx], rcx lea rdx, [rcx+10h] test rcx, rcx mov rcx, [r15+10h] cmovz rdx, r12 mov [rdx], rcx mov rcx, [rbx+98h] mov [rcx], r15 mov rcx, [rbx+98h] mov [r15+10h], rcx mov qword ptr [r15+8], 0 mov [rbx+98h], rax cmp dword ptr [r15+40h], 8 jnz short loc_A5A52 mov rdi, [r15+28h] call qword ptr [rbx+0D8h] test al, al jz short loc_A5A52 mov dword ptr [r15+40h], 0Dh loc_A5A52: mov r14, [r15+20h] mov qword ptr [r15+20h], 0 mov rdi, [r14+30h] test rdi, rdi jnz short loc_A5AA1 loc_A5A67: mov rdi, r14 call _pthread_cond_signal mov eax, [r15+40h] cmp eax, 7 jnz loc_A5BFB mov r15, [rbx+80h] mov eax, 7 test r15, r15 jz loc_A5C04 cmp dword ptr [r15+40h], 7 jz loc_A59F0 jmp loc_A5C04 loc_A5AA1: mov rax, [r13+0] call qword ptr [rax+170h] jmp short loc_A5A67 loc_A5AAD: mov [rbp+var_2C], r14d lea r12, [rbx+88h] loc_A5AB8: mov r14, [r15+20h] lea rax, [r15+8] mov rcx, [r15+8] mov rdx, [r15+10h] mov [rdx], rcx lea rdx, [rcx+10h] test rcx, rcx mov rcx, [r15+10h] cmovz rdx, r12 mov [rdx], rcx mov rcx, [rbx+98h] mov [rcx], r15 mov rcx, [rbx+98h] mov [r15+10h], rcx mov [rbx+98h], rax xor eax, eax mov [r15+8], rax mov [r15+20h], rax mov rdi, [r14+30h] test rdi, rdi jnz short loc_A5B2F loc_A5B0C: mov rdi, r14 call _pthread_cond_signal cmp r13d, 7 jnz short loc_A5B41 mov r15, [rbx+80h] test r15, r15 jz short loc_A5B41 cmp dword ptr [r15+40h], 7 jz short loc_A5AB8 jmp short loc_A5B41 loc_A5B2F: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+170h] jmp short loc_A5B0C loc_A5B41: mov r15, [rbx+60h] test r15, r15 mov r12d, [rbp+var_2C] jz loc_A57F9 lea rax, [rbx+60h] lea r13, [rbx+78h] mov rcx, [rbx+78h] mov [rcx], r15 mov rcx, [rbx+78h] mov [r15+10h], rcx mov rcx, [rbx+68h] mov [rbx+78h], rcx mov [rbx+68h], rax loc_A5B75: mov r14, [r15+20h] cmp dword ptr [r15+40h], 5 jnz short loc_A5B8C cmp r12d, 0FFFFFFFEh jnb short loc_A5BA7 inc dword ptr [rbx+0A8h] loc_A5B8C: mov qword ptr [r15+20h], 0 mov rdi, [r14+30h] test rdi, rdi jnz short loc_A5BE9 loc_A5B9D: mov rdi, r14 call _pthread_cond_signal jmp short loc_A5BDB loc_A5BA7: lea rax, [r15+8] mov rcx, [r15+8] mov rdx, [r15+10h] mov [rdx], rcx lea rdx, [rcx+10h] test rcx, rcx mov rcx, [r15+10h] cmovz rdx, r13 mov [rdx], rcx mov rcx, [rbx+68h] mov [rcx], r15 mov rcx, [rbx+68h] mov [r15+10h], rcx mov [rbx+68h], rax loc_A5BDB: mov r15, [r15+8] test r15, r15 jnz short loc_A5B75 jmp loc_A5CC0 loc_A5BE9: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+170h] jmp short loc_A5B9D loc_A5BFB: cmp eax, 0Ah jg loc_A57F9 loc_A5C04: mov r15, [rbx+60h] test r15, r15 jz loc_A57F9 lea rcx, [rbx+60h] add eax, 0FFFFFFF7h cmp eax, 0FFFFFFFEh setb r12b loc_A5C1F: lea r13, [rbx+78h] mov rax, [rbx+78h] mov [rax], r15 mov rax, [rbx+78h] mov [r15+10h], rax mov rax, [rbx+68h] mov [rbx+78h], rax mov [rbx+68h], rcx loc_A5C3E: mov r14, [r15+20h] cmp dword ptr [r15+40h], 5 jnz short loc_A5C54 test r12b, r12b jz short loc_A5C6F inc dword ptr [rbx+0A8h] loc_A5C54: mov qword ptr [r15+20h], 0 mov rdi, [r14+30h] test rdi, rdi jnz short loc_A5CAE loc_A5C65: mov rdi, r14 call _pthread_cond_signal jmp short loc_A5CA3 loc_A5C6F: lea rax, [r15+8] mov rcx, [r15+8] mov rdx, [r15+10h] mov [rdx], rcx lea rdx, [rcx+10h] test rcx, rcx mov rcx, [r15+10h] cmovz rdx, r13 mov [rdx], rcx mov rcx, [rbx+68h] mov [rcx], r15 mov rcx, [rbx+68h] mov [r15+10h], rcx mov [rbx+68h], rax loc_A5CA3: mov r15, [r15+8] test r15, r15 jnz short loc_A5C3E jmp short loc_A5CC0 loc_A5CAE: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+170h] jmp short loc_A5C65 loc_A5CC0: mov rax, [rbx+68h] mov qword ptr [rax], 0 cmp qword ptr [rbx+60h], 0 jnz loc_A57F9 mov qword ptr [rbx+0A0h], 0 jmp loc_A57F9
long long wake_up_waiters(long long a1) { long long result; // rax long long v3; // r15 int v4; // r13d long long v5; // rcx unsigned long long v6; // rax long long v7; // r12 long long v8; // r14 long long v9; // rdi long long v10; // r15 long long v11; // r14 long long v12; // rdi long long v13; // r15 long long v14; // rcx bool v15; // r12 long long v16; // rcx _QWORD *v17; // rdx long long v18; // r14 long long v19; // rdi long long v20; // r14 long long v21; // rcx _QWORD *v22; // rdx long long v23; // rdi long long v24; // r15 long long v25; // r14 long long v26; // rdi long long v27; // rcx _QWORD *v28; // rdx long long v29; // r14 long long v30; // rdi long long v31; // rcx _QWORD *v32; // rdx if ( *(_QWORD *)(a1 + 144) ) return result; v3 = *(_QWORD *)(a1 + 128); if ( !*(_QWORD *)(a1 + 112) ) { if ( v3 ) { if ( *(_DWORD *)(v3 + 64) != 11 || (v5 = *(_QWORD *)(a1 + 96)) == 0 || (result = 11LL, *(int *)(v5 + 64) <= 3) ) { v6 = *(_QWORD *)(a1 + 160); *(_QWORD *)(a1 + 160) = v6 + 1; if ( v6 > max_write_lock_count ) { *(_QWORD *)(a1 + 160) = 0LL; v7 = *(_QWORD *)(a1 + 96); if ( v7 ) { **(_QWORD **)(a1 + 120) = v7; *(_QWORD *)(v7 + 16) = *(_QWORD *)(a1 + 120); *(_QWORD *)(a1 + 120) = *(_QWORD *)(a1 + 104); *(_QWORD *)(a1 + 104) = a1 + 96; do { v8 = *(_QWORD *)(v7 + 32); if ( *(_DWORD *)(v7 + 64) == 5 ) ++*(_DWORD *)(a1 + 168); *(_QWORD *)(v7 + 32) = 0LL; v9 = *(_QWORD *)(v8 + 48); if ( v9 ) ((void ( *)(long long))PSI_server[46])(v9); pthread_cond_signal(v8); v7 = *(_QWORD *)(v7 + 8); } while ( v7 ); LABEL_80: result = *(_QWORD *)(a1 + 104); *(_QWORD *)result = 0LL; if ( !*(_QWORD *)(a1 + 96) ) *(_QWORD *)(a1 + 160) = 0LL; return result; } } while ( 1 ) { v16 = *(_QWORD *)(v3 + 8); **(_QWORD **)(v3 + 16) = v16; v17 = (_QWORD *)(v16 + 16); if ( !v16 ) v17 = (_QWORD *)(a1 + 136); *v17 = *(_QWORD *)(v3 + 16); **(_QWORD **)(a1 + 152) = v3; *(_QWORD *)(v3 + 16) = *(_QWORD *)(a1 + 152); *(_QWORD *)(v3 + 8) = 0LL; *(_QWORD *)(a1 + 152) = v3 + 8; if ( *(_DWORD *)(v3 + 64) == 8 && (*(unsigned __int8 ( **)(_QWORD))(a1 + 216))(*(_QWORD *)(v3 + 40)) ) *(_DWORD *)(v3 + 64) = 13; v18 = *(_QWORD *)(v3 + 32); *(_QWORD *)(v3 + 32) = 0LL; v19 = *(_QWORD *)(v18 + 48); if ( v19 ) ((void ( *)(long long))PSI_server[46])(v19); pthread_cond_signal(v18); result = *(unsigned int *)(v3 + 64); if ( (_DWORD)result != 7 ) break; v3 = *(_QWORD *)(a1 + 128); result = 7LL; if ( !v3 || *(_DWORD *)(v3 + 64) != 7 ) goto LABEL_67; } if ( (int)result > 10 ) return result; } LABEL_67: v13 = *(_QWORD *)(a1 + 96); if ( !v13 ) return result; v14 = a1 + 96; v15 = (unsigned int)(result - 9) < 0xFFFFFFFE; } else { v13 = *(_QWORD *)(a1 + 96); if ( !v13 ) return result; v14 = a1 + 96; v15 = 1; } **(_QWORD **)(a1 + 120) = v13; *(_QWORD *)(v13 + 16) = *(_QWORD *)(a1 + 120); *(_QWORD *)(a1 + 120) = *(_QWORD *)(a1 + 104); *(_QWORD *)(a1 + 104) = v14; while ( 1 ) { v29 = *(_QWORD *)(v13 + 32); if ( *(_DWORD *)(v13 + 64) == 5 ) { if ( !v15 ) { v31 = *(_QWORD *)(v13 + 8); **(_QWORD **)(v13 + 16) = v31; v32 = (_QWORD *)(v31 + 16); if ( !v31 ) v32 = (_QWORD *)(a1 + 120); *v32 = *(_QWORD *)(v13 + 16); **(_QWORD **)(a1 + 104) = v13; *(_QWORD *)(v13 + 16) = *(_QWORD *)(a1 + 104); *(_QWORD *)(a1 + 104) = v13 + 8; goto LABEL_79; } ++*(_DWORD *)(a1 + 168); } *(_QWORD *)(v13 + 32) = 0LL; v30 = *(_QWORD *)(v29 + 48); if ( v30 ) ((void ( *)(long long))PSI_server[46])(v30); pthread_cond_signal(v29); LABEL_79: v13 = *(_QWORD *)(v13 + 8); if ( !v13 ) goto LABEL_80; } } if ( !v3 ) { v10 = *(_QWORD *)(a1 + 96); if ( !v10 ) return result; **(_QWORD **)(a1 + 120) = v10; *(_QWORD *)(v10 + 16) = *(_QWORD *)(a1 + 120); *(_QWORD *)(a1 + 120) = *(_QWORD *)(a1 + 104); *(_QWORD *)(a1 + 104) = a1 + 96; do { v11 = *(_QWORD *)(v10 + 32); if ( *(_DWORD *)(v10 + 64) == 5 ) ++*(_DWORD *)(a1 + 168); *(_QWORD *)(v10 + 32) = 0LL; v12 = *(_QWORD *)(v11 + 48); if ( v12 ) ((void ( *)(long long))PSI_server[46])(v12); pthread_cond_signal(v11); v10 = *(_QWORD *)(v10 + 8); } while ( v10 ); goto LABEL_80; } v4 = *(_DWORD *)(v3 + 64); if ( v4 <= 9 && ((unsigned int)(v4 - 9) < 0xFFFFFFFE || !*(_DWORD *)(a1 + 168)) ) { if ( v4 == 8 ) { result = (*(long long ( **)(_QWORD))(a1 + 216))(*(_QWORD *)(v3 + 40)); if ( (_BYTE)result ) { *(_DWORD *)(v3 + 64) = 13; if ( *(_QWORD *)(a1 + 96) ) return free_all_read_locks(a1, 0LL); return result; } } do { v20 = *(_QWORD *)(v3 + 32); v21 = *(_QWORD *)(v3 + 8); **(_QWORD **)(v3 + 16) = v21; v22 = (_QWORD *)(v21 + 16); if ( !v21 ) v22 = (_QWORD *)(a1 + 136); *v22 = *(_QWORD *)(v3 + 16); **(_QWORD **)(a1 + 152) = v3; *(_QWORD *)(v3 + 16) = *(_QWORD *)(a1 + 152); *(_QWORD *)(a1 + 152) = v3 + 8; *(_QWORD *)(v3 + 8) = 0LL; *(_QWORD *)(v3 + 32) = 0LL; v23 = *(_QWORD *)(v20 + 48); if ( v23 ) ((void ( *)(long long))PSI_server[46])(v23); result = pthread_cond_signal(v20); if ( v4 != 7 ) break; v3 = *(_QWORD *)(a1 + 128); if ( !v3 ) break; } while ( *(_DWORD *)(v3 + 64) == 7 ); v24 = *(_QWORD *)(a1 + 96); if ( v24 ) { **(_QWORD **)(a1 + 120) = v24; *(_QWORD *)(v24 + 16) = *(_QWORD *)(a1 + 120); *(_QWORD *)(a1 + 120) = *(_QWORD *)(a1 + 104); *(_QWORD *)(a1 + 104) = a1 + 96; while ( 1 ) { v25 = *(_QWORD *)(v24 + 32); if ( *(_DWORD *)(v24 + 64) == 5 ) { if ( (unsigned int)(v4 - 9) >= 0xFFFFFFFE ) { v27 = *(_QWORD *)(v24 + 8); **(_QWORD **)(v24 + 16) = v27; v28 = (_QWORD *)(v27 + 16); if ( !v27 ) v28 = (_QWORD *)(a1 + 120); *v28 = *(_QWORD *)(v24 + 16); **(_QWORD **)(a1 + 104) = v24; *(_QWORD *)(v24 + 16) = *(_QWORD *)(a1 + 104); *(_QWORD *)(a1 + 104) = v24 + 8; goto LABEL_64; } ++*(_DWORD *)(a1 + 168); } *(_QWORD *)(v24 + 32) = 0LL; v26 = *(_QWORD *)(v25 + 48); if ( v26 ) ((void ( *)(long long))PSI_server[46])(v26); pthread_cond_signal(v25); LABEL_64: v24 = *(_QWORD *)(v24 + 8); if ( !v24 ) goto LABEL_80; } } } return result; }
wake_up_waiters: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX CMP qword ptr [RDI + 0x90],0x0 JZ 0x001a5808 LAB_001a57f9: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001a5808: MOV RBX,RDI MOV R15,qword ptr [RDI + 0x80] CMP qword ptr [RDI + 0x70],0x0 JZ 0x001a5882 TEST R15,R15 JZ 0x001a5952 MOV R13D,dword ptr [R15 + 0x40] CMP R13D,0x9 JG 0x001a57f9 LEA R14D,[R13 + -0x9] CMP R14D,-0x2 JC 0x001a583f CMP dword ptr [RBX + 0xa8],0x0 JNZ 0x001a57f9 LAB_001a583f: CMP R13D,0x8 JNZ 0x001a5aad MOV RDI,qword ptr [R15 + 0x28] CALL qword ptr [RBX + 0xd8] TEST AL,AL JZ 0x001a5aad MOV dword ptr [R15 + 0x40],0xd CMP qword ptr [RBX + 0x60],0x0 JZ 0x001a57f9 MOV RDI,RBX XOR ESI,ESI ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001a6e24 LAB_001a5882: TEST R15,R15 JZ 0x001a59c9 CMP dword ptr [R15 + 0x40],0xb JNZ 0x001a58aa MOV RCX,qword ptr [RBX + 0x60] TEST RCX,RCX JZ 0x001a58aa MOV EAX,0xb CMP dword ptr [RCX + 0x40],0x3 JG 0x001a5c04 LAB_001a58aa: MOV RAX,qword ptr [RBX + 0xa0] LEA RCX,[RAX + 0x1] MOV qword ptr [RBX + 0xa0],RCX LEA RCX,[0x488bf8] CMP RAX,qword ptr [RCX] JBE 0x001a59e2 MOV qword ptr [RBX + 0xa0],0x0 MOV R12,qword ptr [RBX + 0x60] TEST R12,R12 JZ 0x001a59e2 LEA RAX,[RBX + 0x60] MOV RCX,qword ptr [RBX + 0x78] MOV qword ptr [RCX],R12 MOV RCX,qword ptr [RBX + 0x78] MOV qword ptr [R12 + 0x10],RCX MOV RCX,qword ptr [RBX + 0x68] MOV qword ptr [RBX + 0x78],RCX MOV qword ptr [RBX + 0x68],RAX LEA R15,[0x489050] LAB_001a590b: MOV R14,qword ptr [R12 + 0x20] CMP dword ptr [R12 + 0x40],0x5 JNZ 0x001a591e INC dword ptr [RBX + 0xa8] LAB_001a591e: MOV qword ptr [R12 + 0x20],0x0 MOV RDI,qword ptr [R14 + 0x30] TEST RDI,RDI JNZ 0x001a5947 LAB_001a5930: MOV RDI,R14 CALL 0x00129540 MOV R12,qword ptr [R12 + 0x8] TEST R12,R12 JNZ 0x001a590b JMP 0x001a5cc0 LAB_001a5947: MOV RAX,qword ptr [R15] CALL qword ptr [RAX + 0x170] JMP 0x001a5930 LAB_001a5952: MOV R15,qword ptr [RBX + 0x60] TEST R15,R15 JZ 0x001a57f9 LEA RAX,[RBX + 0x60] MOV RCX,qword ptr [RBX + 0x78] MOV qword ptr [RCX],R15 MOV RCX,qword ptr [RBX + 0x78] MOV qword ptr [R15 + 0x10],RCX MOV RCX,qword ptr [RBX + 0x68] MOV qword ptr [RBX + 0x78],RCX MOV qword ptr [RBX + 0x68],RAX LEA R12,[0x489050] LAB_001a5985: MOV R14,qword ptr [R15 + 0x20] CMP dword ptr [R15 + 0x40],0x5 JNZ 0x001a5996 INC dword ptr [RBX + 0xa8] LAB_001a5996: MOV qword ptr [R15 + 0x20],0x0 MOV RDI,qword ptr [R14 + 0x30] TEST RDI,RDI JNZ 0x001a59bd LAB_001a59a7: MOV RDI,R14 CALL 0x00129540 MOV R15,qword ptr [R15 + 0x8] TEST R15,R15 JNZ 0x001a5985 JMP 0x001a5cc0 LAB_001a59bd: MOV RAX,qword ptr [R12] CALL qword ptr [RAX + 0x170] JMP 0x001a59a7 LAB_001a59c9: MOV R15,qword ptr [RBX + 0x60] TEST R15,R15 JZ 0x001a57f9 LEA RCX,[RBX + 0x60] MOV R12B,0x1 JMP 0x001a5c1f LAB_001a59e2: LEA R12,[RBX + 0x88] LEA R13,[0x489050] LAB_001a59f0: LEA RAX,[R15 + 0x8] MOV RCX,qword ptr [R15 + 0x8] MOV RDX,qword ptr [R15 + 0x10] MOV qword ptr [RDX],RCX LEA RDX,[RCX + 0x10] TEST RCX,RCX MOV RCX,qword ptr [R15 + 0x10] CMOVZ RDX,R12 MOV qword ptr [RDX],RCX MOV RCX,qword ptr [RBX + 0x98] MOV qword ptr [RCX],R15 MOV RCX,qword ptr [RBX + 0x98] MOV qword ptr [R15 + 0x10],RCX MOV qword ptr [R15 + 0x8],0x0 MOV qword ptr [RBX + 0x98],RAX CMP dword ptr [R15 + 0x40],0x8 JNZ 0x001a5a52 MOV RDI,qword ptr [R15 + 0x28] CALL qword ptr [RBX + 0xd8] TEST AL,AL JZ 0x001a5a52 MOV dword ptr [R15 + 0x40],0xd LAB_001a5a52: MOV R14,qword ptr [R15 + 0x20] MOV qword ptr [R15 + 0x20],0x0 MOV RDI,qword ptr [R14 + 0x30] TEST RDI,RDI JNZ 0x001a5aa1 LAB_001a5a67: MOV RDI,R14 CALL 0x00129540 MOV EAX,dword ptr [R15 + 0x40] CMP EAX,0x7 JNZ 0x001a5bfb MOV R15,qword ptr [RBX + 0x80] MOV EAX,0x7 TEST R15,R15 JZ 0x001a5c04 CMP dword ptr [R15 + 0x40],0x7 JZ 0x001a59f0 JMP 0x001a5c04 LAB_001a5aa1: MOV RAX,qword ptr [R13] CALL qword ptr [RAX + 0x170] JMP 0x001a5a67 LAB_001a5aad: MOV dword ptr [RBP + -0x2c],R14D LEA R12,[RBX + 0x88] LAB_001a5ab8: MOV R14,qword ptr [R15 + 0x20] LEA RAX,[R15 + 0x8] MOV RCX,qword ptr [R15 + 0x8] MOV RDX,qword ptr [R15 + 0x10] MOV qword ptr [RDX],RCX LEA RDX,[RCX + 0x10] TEST RCX,RCX MOV RCX,qword ptr [R15 + 0x10] CMOVZ RDX,R12 MOV qword ptr [RDX],RCX MOV RCX,qword ptr [RBX + 0x98] MOV qword ptr [RCX],R15 MOV RCX,qword ptr [RBX + 0x98] MOV qword ptr [R15 + 0x10],RCX MOV qword ptr [RBX + 0x98],RAX XOR EAX,EAX MOV qword ptr [R15 + 0x8],RAX MOV qword ptr [R15 + 0x20],RAX MOV RDI,qword ptr [R14 + 0x30] TEST RDI,RDI JNZ 0x001a5b2f LAB_001a5b0c: MOV RDI,R14 CALL 0x00129540 CMP R13D,0x7 JNZ 0x001a5b41 MOV R15,qword ptr [RBX + 0x80] TEST R15,R15 JZ 0x001a5b41 CMP dword ptr [R15 + 0x40],0x7 JZ 0x001a5ab8 JMP 0x001a5b41 LAB_001a5b2f: LEA RAX,[0x489050] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x170] JMP 0x001a5b0c LAB_001a5b41: MOV R15,qword ptr [RBX + 0x60] TEST R15,R15 MOV R12D,dword ptr [RBP + -0x2c] JZ 0x001a57f9 LEA RAX,[RBX + 0x60] LEA R13,[RBX + 0x78] MOV RCX,qword ptr [RBX + 0x78] MOV qword ptr [RCX],R15 MOV RCX,qword ptr [RBX + 0x78] MOV qword ptr [R15 + 0x10],RCX MOV RCX,qword ptr [RBX + 0x68] MOV qword ptr [RBX + 0x78],RCX MOV qword ptr [RBX + 0x68],RAX LAB_001a5b75: MOV R14,qword ptr [R15 + 0x20] CMP dword ptr [R15 + 0x40],0x5 JNZ 0x001a5b8c CMP R12D,-0x2 JNC 0x001a5ba7 INC dword ptr [RBX + 0xa8] LAB_001a5b8c: MOV qword ptr [R15 + 0x20],0x0 MOV RDI,qword ptr [R14 + 0x30] TEST RDI,RDI JNZ 0x001a5be9 LAB_001a5b9d: MOV RDI,R14 CALL 0x00129540 JMP 0x001a5bdb LAB_001a5ba7: LEA RAX,[R15 + 0x8] MOV RCX,qword ptr [R15 + 0x8] MOV RDX,qword ptr [R15 + 0x10] MOV qword ptr [RDX],RCX LEA RDX,[RCX + 0x10] TEST RCX,RCX MOV RCX,qword ptr [R15 + 0x10] CMOVZ RDX,R13 MOV qword ptr [RDX],RCX MOV RCX,qword ptr [RBX + 0x68] MOV qword ptr [RCX],R15 MOV RCX,qword ptr [RBX + 0x68] MOV qword ptr [R15 + 0x10],RCX MOV qword ptr [RBX + 0x68],RAX LAB_001a5bdb: MOV R15,qword ptr [R15 + 0x8] TEST R15,R15 JNZ 0x001a5b75 JMP 0x001a5cc0 LAB_001a5be9: LEA RAX,[0x489050] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x170] JMP 0x001a5b9d LAB_001a5bfb: CMP EAX,0xa JG 0x001a57f9 LAB_001a5c04: MOV R15,qword ptr [RBX + 0x60] TEST R15,R15 JZ 0x001a57f9 LEA RCX,[RBX + 0x60] ADD EAX,-0x9 CMP EAX,-0x2 SETC R12B LAB_001a5c1f: LEA R13,[RBX + 0x78] MOV RAX,qword ptr [RBX + 0x78] MOV qword ptr [RAX],R15 MOV RAX,qword ptr [RBX + 0x78] MOV qword ptr [R15 + 0x10],RAX MOV RAX,qword ptr [RBX + 0x68] MOV qword ptr [RBX + 0x78],RAX MOV qword ptr [RBX + 0x68],RCX LAB_001a5c3e: MOV R14,qword ptr [R15 + 0x20] CMP dword ptr [R15 + 0x40],0x5 JNZ 0x001a5c54 TEST R12B,R12B JZ 0x001a5c6f INC dword ptr [RBX + 0xa8] LAB_001a5c54: MOV qword ptr [R15 + 0x20],0x0 MOV RDI,qword ptr [R14 + 0x30] TEST RDI,RDI JNZ 0x001a5cae LAB_001a5c65: MOV RDI,R14 CALL 0x00129540 JMP 0x001a5ca3 LAB_001a5c6f: LEA RAX,[R15 + 0x8] MOV RCX,qword ptr [R15 + 0x8] MOV RDX,qword ptr [R15 + 0x10] MOV qword ptr [RDX],RCX LEA RDX,[RCX + 0x10] TEST RCX,RCX MOV RCX,qword ptr [R15 + 0x10] CMOVZ RDX,R13 MOV qword ptr [RDX],RCX MOV RCX,qword ptr [RBX + 0x68] MOV qword ptr [RCX],R15 MOV RCX,qword ptr [RBX + 0x68] MOV qword ptr [R15 + 0x10],RCX MOV qword ptr [RBX + 0x68],RAX LAB_001a5ca3: MOV R15,qword ptr [R15 + 0x8] TEST R15,R15 JNZ 0x001a5c3e JMP 0x001a5cc0 LAB_001a5cae: LEA RAX,[0x489050] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x170] JMP 0x001a5c65 LAB_001a5cc0: MOV RAX,qword ptr [RBX + 0x68] MOV qword ptr [RAX],0x0 CMP qword ptr [RBX + 0x60],0x0 JNZ 0x001a57f9 MOV qword ptr [RBX + 0xa0],0x0 JMP 0x001a57f9
void wake_up_waiters(long param_1) { ulong uVar1; pthread_cond_t *ppVar2; char cVar3; int iVar4; int8 *puVar5; long lVar6; long lVar7; bool bVar8; if (*(long *)(param_1 + 0x90) != 0) { return; } lVar7 = *(long *)(param_1 + 0x80); if (*(long *)(param_1 + 0x70) == 0) { if (lVar7 == 0) { lVar7 = *(long *)(param_1 + 0x60); if (lVar7 == 0) { return; } bVar8 = true; } else { if (((*(int *)(lVar7 + 0x40) != 0xb) || (*(long *)(param_1 + 0x60) == 0)) || (iVar4 = 0xb, *(int *)(*(long *)(param_1 + 0x60) + 0x40) < 4)) { uVar1 = *(ulong *)(param_1 + 0xa0); *(ulong *)(param_1 + 0xa0) = uVar1 + 1; if (max_write_lock_count < uVar1) { *(int8 *)(param_1 + 0xa0) = 0; lVar6 = *(long *)(param_1 + 0x60); if (lVar6 != 0) { **(long **)(param_1 + 0x78) = lVar6; *(int8 *)(lVar6 + 0x10) = *(int8 *)(param_1 + 0x78); *(int8 *)(param_1 + 0x78) = *(int8 *)(param_1 + 0x68); *(long *)(param_1 + 0x68) = param_1 + 0x60; do { ppVar2 = *(pthread_cond_t **)(lVar6 + 0x20); if (*(int *)(lVar6 + 0x40) == 5) { *(int *)(param_1 + 0xa8) = *(int *)(param_1 + 0xa8) + 1; } *(int8 *)(lVar6 + 0x20) = 0; if (ppVar2[1].__align != 0) { (**(code **)(PSI_server + 0x170))(); } pthread_cond_signal(ppVar2); lVar6 = *(long *)(lVar6 + 8); } while (lVar6 != 0); goto LAB_001a5cc0; } } while( true ) { lVar6 = *(long *)(lVar7 + 8); **(long **)(lVar7 + 0x10) = lVar6; puVar5 = (int8 *)(lVar6 + 0x10); if (lVar6 == 0) { puVar5 = (int8 *)(param_1 + 0x88); } *puVar5 = *(int8 *)(lVar7 + 0x10); **(long **)(param_1 + 0x98) = lVar7; *(int8 *)(lVar7 + 0x10) = *(int8 *)(param_1 + 0x98); *(int8 *)(lVar7 + 8) = 0; *(long *)(param_1 + 0x98) = lVar7 + 8; if ((*(int *)(lVar7 + 0x40) == 8) && (cVar3 = (**(code **)(param_1 + 0xd8))(*(int8 *)(lVar7 + 0x28)), cVar3 != '\0')) { *(int4 *)(lVar7 + 0x40) = 0xd; } ppVar2 = *(pthread_cond_t **)(lVar7 + 0x20); *(int8 *)(lVar7 + 0x20) = 0; if (ppVar2[1].__align != 0) { (**(code **)(PSI_server + 0x170))(); } pthread_cond_signal(ppVar2); iVar4 = *(int *)(lVar7 + 0x40); if (iVar4 != 7) break; lVar7 = *(long *)(param_1 + 0x80); iVar4 = 7; if ((lVar7 == 0) || (*(int *)(lVar7 + 0x40) != 7)) goto LAB_001a5c04; } if (10 < iVar4) { return; } } LAB_001a5c04: lVar7 = *(long *)(param_1 + 0x60); if (lVar7 == 0) { return; } bVar8 = iVar4 - 9U < 0xfffffffe; } **(long **)(param_1 + 0x78) = lVar7; *(int8 *)(lVar7 + 0x10) = *(int8 *)(param_1 + 0x78); *(int8 *)(param_1 + 0x78) = *(int8 *)(param_1 + 0x68); *(long *)(param_1 + 0x68) = param_1 + 0x60; do { ppVar2 = *(pthread_cond_t **)(lVar7 + 0x20); if (*(int *)(lVar7 + 0x40) == 5) { if (bVar8) { *(int *)(param_1 + 0xa8) = *(int *)(param_1 + 0xa8) + 1; goto LAB_001a5c54; } lVar6 = *(long *)(lVar7 + 8); **(long **)(lVar7 + 0x10) = lVar6; puVar5 = (int8 *)(lVar6 + 0x10); if (lVar6 == 0) { puVar5 = (int8 *)(param_1 + 0x78); } *puVar5 = *(int8 *)(lVar7 + 0x10); **(long **)(param_1 + 0x68) = lVar7; *(int8 *)(lVar7 + 0x10) = *(int8 *)(param_1 + 0x68); *(long *)(param_1 + 0x68) = lVar7 + 8; } else { LAB_001a5c54: *(int8 *)(lVar7 + 0x20) = 0; if (ppVar2[1].__align != 0) { (**(code **)(PSI_server + 0x170))(); } pthread_cond_signal(ppVar2); } lVar7 = *(long *)(lVar7 + 8); } while (lVar7 != 0); } else if (lVar7 == 0) { lVar7 = *(long *)(param_1 + 0x60); if (lVar7 == 0) { return; } **(long **)(param_1 + 0x78) = lVar7; *(int8 *)(lVar7 + 0x10) = *(int8 *)(param_1 + 0x78); *(int8 *)(param_1 + 0x78) = *(int8 *)(param_1 + 0x68); *(long *)(param_1 + 0x68) = param_1 + 0x60; do { ppVar2 = *(pthread_cond_t **)(lVar7 + 0x20); if (*(int *)(lVar7 + 0x40) == 5) { *(int *)(param_1 + 0xa8) = *(int *)(param_1 + 0xa8) + 1; } *(int8 *)(lVar7 + 0x20) = 0; if (ppVar2[1].__align != 0) { (**(code **)(PSI_server + 0x170))(); } pthread_cond_signal(ppVar2); lVar7 = *(long *)(lVar7 + 8); } while (lVar7 != 0); } else { iVar4 = *(int *)(lVar7 + 0x40); if (9 < iVar4) { return; } if ((0xfffffffd < iVar4 - 9U) && (*(int *)(param_1 + 0xa8) != 0)) { return; } if ((iVar4 == 8) && (cVar3 = (**(code **)(param_1 + 0xd8))(*(int8 *)(lVar7 + 0x28)), cVar3 != '\0')) { *(int4 *)(lVar7 + 0x40) = 0xd; if (*(long *)(param_1 + 0x60) == 0) { return; } free_all_read_locks(param_1,0); return; } do { ppVar2 = *(pthread_cond_t **)(lVar7 + 0x20); lVar6 = *(long *)(lVar7 + 8); **(long **)(lVar7 + 0x10) = lVar6; puVar5 = (int8 *)(lVar6 + 0x10); if (lVar6 == 0) { puVar5 = (int8 *)(param_1 + 0x88); } *puVar5 = *(int8 *)(lVar7 + 0x10); **(long **)(param_1 + 0x98) = lVar7; *(int8 *)(lVar7 + 0x10) = *(int8 *)(param_1 + 0x98); *(long *)(param_1 + 0x98) = lVar7 + 8; *(int8 *)(lVar7 + 8) = 0; *(int8 *)(lVar7 + 0x20) = 0; if (ppVar2[1].__align != 0) { (**(code **)(PSI_server + 0x170))(); } pthread_cond_signal(ppVar2); } while (((iVar4 == 7) && (lVar7 = *(long *)(param_1 + 0x80), lVar7 != 0)) && (*(int *)(lVar7 + 0x40) == 7)); lVar7 = *(long *)(param_1 + 0x60); if (lVar7 == 0) { return; } **(long **)(param_1 + 0x78) = lVar7; *(int8 *)(lVar7 + 0x10) = *(int8 *)(param_1 + 0x78); *(int8 *)(param_1 + 0x78) = *(int8 *)(param_1 + 0x68); *(long *)(param_1 + 0x68) = param_1 + 0x60; do { ppVar2 = *(pthread_cond_t **)(lVar7 + 0x20); if (*(int *)(lVar7 + 0x40) == 5) { if (iVar4 - 9U < 0xfffffffe) { *(int *)(param_1 + 0xa8) = *(int *)(param_1 + 0xa8) + 1; goto LAB_001a5b8c; } lVar6 = *(long *)(lVar7 + 8); **(long **)(lVar7 + 0x10) = lVar6; puVar5 = (int8 *)(lVar6 + 0x10); if (lVar6 == 0) { puVar5 = (int8 *)(param_1 + 0x78); } *puVar5 = *(int8 *)(lVar7 + 0x10); **(long **)(param_1 + 0x68) = lVar7; *(int8 *)(lVar7 + 0x10) = *(int8 *)(param_1 + 0x68); *(long *)(param_1 + 0x68) = lVar7 + 8; } else { LAB_001a5b8c: *(int8 *)(lVar7 + 0x20) = 0; if (ppVar2[1].__align != 0) { (**(code **)(PSI_server + 0x170))(); } pthread_cond_signal(ppVar2); } lVar7 = *(long *)(lVar7 + 8); } while (lVar7 != 0); } LAB_001a5cc0: **(int8 **)(param_1 + 0x68) = 0; if (*(long *)(param_1 + 0x60) == 0) { *(int8 *)(param_1 + 0xa0) = 0; } return; }
23,486
minja::Parser::parseExpansion()
monkey531[P]llama/common/minja.hpp
std::shared_ptr<Expression> parseExpansion() { static std::regex expansion_tok(R"(\*\*?)"); auto op_str = consumeToken(expansion_tok); auto expr = parseValueExpression(); if (op_str.empty()) return expr; if (!expr) throw std::runtime_error("Expected expr of 'expansion' expression"); return std::make_shared<UnaryOpExpr>(get_location(), std::move(expr), op_str == "*" ? UnaryOpExpr::Op::Expansion : UnaryOpExpr::Op::ExpansionDict); }
O2
cpp
minja::Parser::parseExpansion(): pushq %r14 pushq %rbx subq $0x68, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x9b0be(%rip), %rax # 0x103308 movb (%rax), %al testb %al, %al je 0x68326 leaq 0x9b08d(%rip), %rdx # 0x1032e8 leaq 0x30(%rsp), %rdi pushq $0x1 popq %rcx movq %r14, %rsi callq 0x63d7c movq %rsp, %rdi movq %r14, %rsi callq 0x68422 cmpq $0x0, 0x38(%rsp) movq (%rsp), %rax je 0x682f0 testq %rax, %rax je 0x6837b leaq 0x18(%rsp), %rdi movq %r14, %rsi callq 0x63958 leaq 0x5591d(%rip), %rsi # 0xbdbbc leaq 0x30(%rsp), %rdi callq 0x2b7fb movzbl %al, %eax pushq $0x4 popq %rdx subl %eax, %edx leaq 0x14(%rsp), %rcx movl %edx, (%rcx) leaq 0x50(%rsp), %rdi leaq 0x18(%rsp), %rsi movq %rsp, %rdx callq 0x68c0e leaq 0x58(%rsp), %rdi movaps -0x8(%rdi), %xmm0 andq $0x0, (%rdi) movups %xmm0, (%rbx) andq $0x0, -0x8(%rdi) callq 0x52fe0 leaq 0x20(%rsp), %rdi callq 0x52fe0 jmp 0x68307 movq %rax, (%rbx) movq 0x8(%rsp), %rax andq $0x0, 0x8(%rsp) movq %rax, 0x8(%rbx) andq $0x0, (%rsp) leaq 0x8(%rsp), %rdi callq 0x52fe0 leaq 0x30(%rsp), %rdi callq 0x254d8 movq %rbx, %rax addq $0x68, %rsp popq %rbx popq %r14 retq leaq 0x9afdb(%rip), %rdi # 0x103308 callq 0x252e0 testl %eax, %eax je 0x68254 leaq 0x9afa7(%rip), %rdi # 0x1032e8 leaq 0x4f099(%rip), %rsi # 0xb73e1 pushq $0x10 popq %rdx callq 0x49b32 leaq -0x1e5ff(%rip), %rdi # 0x49d58 leaq 0x9af8a(%rip), %rsi # 0x1032e8 leaq 0x9a713(%rip), %rdx # 0x102a78 callq 0x24900 leaq 0x9af97(%rip), %rdi # 0x103308 callq 0x246d0 jmp 0x68254 pushq $0x10 popq %rdi callq 0x244f0 movq %rax, %r14 leaq 0x4f05a(%rip), %rsi # 0xb73e7 movq %rax, %rdi callq 0x24370 movq 0x99c4c(%rip), %rsi # 0x101fe8 movq 0x99ba5(%rip), %rdx # 0x101f48 movq %r14, %rdi callq 0x251c0 movq %rax, %rbx leaq 0x9af53(%rip), %rdi # 0x103308 callq 0x246c0 jmp 0x683f6 jmp 0x683da movq %rax, %rbx movq %r14, %rdi callq 0x24780 jmp 0x683dd movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x52fe0 jmp 0x683dd movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x52fe0 jmp 0x683ec movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x254d8 movq %rbx, %rdi callq 0x25250
_ZN5minja6Parser14parseExpansionEv: push r14 push rbx sub rsp, 68h mov r14, rsi mov rbx, rdi lea rax, _ZGVZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; `guard variable for'minja::Parser::parseExpansion(void)::expansion_tok mov al, [rax] test al, al jz loc_68326 loc_68254: lea rdx, _ZZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; minja::Parser::parseExpansion(void)::expansion_tok lea rdi, [rsp+78h+var_48] push 1 pop rcx mov rsi, r14 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling) mov rdi, rsp; this mov rsi, r14 call _ZN5minja6Parser20parseValueExpressionEv; minja::Parser::parseValueExpression(void) cmp [rsp+78h+var_40], 0 mov rax, [rsp+78h+var_78] jz short loc_682F0 test rax, rax jz loc_6837B lea rdi, [rsp+78h+var_60]; this mov rsi, r14 call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void) lea rsi, asc_BDBBB+1; "*" lea rdi, [rsp+78h+var_48] call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) movzx eax, al push 4 pop rdx sub edx, eax lea rcx, [rsp+78h+var_64] mov [rcx], edx lea rdi, [rsp+78h+var_28] lea rsi, [rsp+78h+var_60] mov rdx, rsp call _ZSt11make_sharedIN5minja11UnaryOpExprEJNS0_8LocationESt10shared_ptrINS0_10ExpressionEENS1_2OpEEES3_IT_EDpOT0_; std::make_shared<minja::UnaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>(minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &&) lea rdi, [rsp+78h+var_20] movaps xmm0, xmmword ptr [rdi-8] and qword ptr [rdi], 0 movups xmmword ptr [rbx], xmm0 and qword ptr [rdi-8], 0 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+78h+var_58] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp short loc_68307 loc_682F0: mov [rbx], rax mov rax, [rsp+78h+var_70] and [rsp+78h+var_70], 0 mov [rbx+8], rax and [rsp+78h+var_78], 0 loc_68307: lea rdi, [rsp+78h+var_70] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+78h+var_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, rbx add rsp, 68h pop rbx pop r14 retn loc_68326: lea rdi, _ZGVZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_68254 lea rdi, _ZZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; minja::Parser::parseExpansion(void)::expansion_tok lea rsi, asc_B73E1; "\\*\\*?" push 10h pop rdx call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc lea rsi, _ZZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; __guard * call ___cxa_guard_release jmp loc_68254 loc_6837B: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aExpectedExprOf_0; "Expected expr of 'expansion' expression" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw mov rbx, rax lea rdi, _ZGVZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; __guard * call ___cxa_guard_abort jmp short loc_683F6 jmp short loc_683DA mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_683DD mov rbx, rax lea rdi, [rsp+78h+var_58] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp short loc_683DD loc_683DA: mov rbx, rax loc_683DD: lea rdi, [rsp+78h+var_70] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp short loc_683EC mov rbx, rax loc_683EC: lea rdi, [rsp+78h+var_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_683F6: mov rdi, rbx call __Unwind_Resume
minja::Parser * minja::Parser::parseExpansion(minja::Parser *this, _QWORD *a2) { __int128 v2; // xmm0 long long v3; // rax std::runtime_error *exception; // r14 long long v6; // [rsp+0h] [rbp-78h] BYREF long long v7; // [rsp+8h] [rbp-70h] BYREF int v8; // [rsp+14h] [rbp-64h] _BYTE v9[8]; // [rsp+18h] [rbp-60h] BYREF long long v10; // [rsp+20h] [rbp-58h] BYREF _QWORD v11[4]; // [rsp+30h] [rbp-48h] BYREF _OWORD v12[2]; // [rsp+50h] [rbp-28h] BYREF if ( !(_BYTE)`guard variable for'minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11], (long long)"\\*\\*?", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11]); } minja::Parser::consumeToken( v11, (long long)a2, (long long)&minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11], 1u); minja::Parser::parseValueExpression((minja::Parser *)&v6); if ( v11[1] ) { if ( !v6 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected expr of 'expansion' expression"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Parser::get_location((minja::Parser *)v9, a2); v8 = 4 - std::operator==<char>((long long)v11); std::make_shared<minja::UnaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>( v12, v9, &v6); v2 = v12[0]; *((_QWORD *)&v12[0] + 1) = 0LL; *(_OWORD *)this = v2; *(_QWORD *)&v12[0] = 0LL; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)v12 + 1); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v10); } else { *(_QWORD *)this = v6; v3 = v7; v7 = 0LL; *((_QWORD *)this + 1) = v3; v6 = 0LL; } std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v7); std::string::~string(v11); return this; }
parseExpansion: PUSH R14 PUSH RBX SUB RSP,0x68 MOV R14,RSI MOV RBX,RDI LEA RAX,[0x203308] MOV AL,byte ptr [RAX] TEST AL,AL JZ 0x00168326 LAB_00168254: LEA RDX,[0x2032e8] LEA RDI,[RSP + 0x30] PUSH 0x1 POP RCX MOV RSI,R14 CALL 0x00163d7c LAB_0016826b: MOV RDI,RSP MOV RSI,R14 CALL 0x00168422 CMP qword ptr [RSP + 0x38],0x0 MOV RAX,qword ptr [RSP] JZ 0x001682f0 TEST RAX,RAX JZ 0x0016837b LAB_0016828b: LEA RDI,[RSP + 0x18] MOV RSI,R14 CALL 0x00163958 LEA RSI,[0x1bdbbc] LEA RDI,[RSP + 0x30] CALL 0x0012b7fb MOVZX EAX,AL PUSH 0x4 POP RDX SUB EDX,EAX LEA RCX,[RSP + 0x14] MOV dword ptr [RCX],EDX LAB_001682b8: LEA RDI,[RSP + 0x50] LEA RSI,[RSP + 0x18] MOV RDX,RSP CALL 0x00168c0e LEA RDI,[RSP + 0x58] MOVAPS XMM0,xmmword ptr [RDI + -0x8] AND qword ptr [RDI],0x0 MOVUPS xmmword ptr [RBX],XMM0 AND qword ptr [RDI + -0x8],0x0 CALL 0x00152fe0 LEA RDI,[RSP + 0x20] CALL 0x00152fe0 JMP 0x00168307 LAB_001682f0: MOV qword ptr [RBX],RAX MOV RAX,qword ptr [RSP + 0x8] AND qword ptr [RSP + 0x8],0x0 MOV qword ptr [RBX + 0x8],RAX AND qword ptr [RSP],0x0 LAB_00168307: LEA RDI,[RSP + 0x8] CALL 0x00152fe0 LEA RDI,[RSP + 0x30] CALL 0x001254d8 MOV RAX,RBX ADD RSP,0x68 POP RBX POP R14 RET LAB_00168326: LEA RDI,[0x203308] CALL 0x001252e0 TEST EAX,EAX JZ 0x00168254 LAB_0016833a: LEA RDI,[0x2032e8] LEA RSI,[0x1b73e1] PUSH 0x10 POP RDX CALL 0x00149b32 LAB_00168350: LEA RDI,[0x149d58] LEA RSI,[0x2032e8] LEA RDX,[0x202a78] CALL 0x00124900 LEA RDI,[0x203308] CALL 0x001246d0 JMP 0x00168254 LAB_0016837b: PUSH 0x10 POP RDI CALL 0x001244f0 MOV R14,RAX LAB_00168386: LEA RSI,[0x1b73e7] MOV RDI,RAX CALL 0x00124370 LAB_00168395: MOV RSI,qword ptr [0x00201fe8] MOV RDX,qword ptr [0x00201f48] MOV RDI,R14 CALL 0x001251c0
/* minja::Parser::parseExpansion() */ void minja::Parser::parseExpansion(void) { long lVar1; bool bVar2; int iVar3; runtime_error *this; long *in_RDI; long local_78; long local_70; int local_64; shared_ptr local_60 [8]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_58 [16]; string local_48 [8]; long local_40; long local_28; long alStack_20 [2]; if (parseExpansion()::expansion_tok_abi_cxx11_ == '\0') { iVar3 = __cxa_guard_acquire(&parseExpansion()::expansion_tok_abi_cxx11_); if (iVar3 != 0) { /* try { // try from 0016833a to 0016834f has its CatchHandler @ 001683ab */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex ((basic_regex<char,std::__cxx11::regex_traits<char>> *) parseExpansion()::expansion_tok_abi_cxx11_,"\\*\\*?",0x10); __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, parseExpansion()::expansion_tok_abi_cxx11_,&__dso_handle); __cxa_guard_release(&parseExpansion()::expansion_tok_abi_cxx11_); } } consumeToken(local_48); /* try { // try from 0016826b to 00168275 has its CatchHandler @ 001683e9 */ parseValueExpression(); lVar1 = local_70; if (local_40 == 0) { *in_RDI = local_78; local_70 = 0; in_RDI[1] = lVar1; local_78 = 0; } else { if (local_78 == 0) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00168386 to 00168394 has its CatchHandler @ 001683be */ std::runtime_error::runtime_error(this,"Expected expr of \'expansion\' expression"); /* try { // try from 00168395 to 001683aa has its CatchHandler @ 001683bc */ /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_00201fe8,PTR__runtime_error_00201f48); } /* try { // try from 0016828b to 00168297 has its CatchHandler @ 001683da */ get_location(); bVar2 = std::operator==(local_48,"*"); local_64 = 4 - (uint)bVar2; /* try { // try from 001682b8 to 001682c9 has its CatchHandler @ 001683cb */ std:: make_shared<minja::UnaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op> ((Location *)&local_28,local_60,(Op *)&local_78); lVar1 = alStack_20[0]; alStack_20[0] = 0; *in_RDI = local_28; in_RDI[1] = lVar1; local_28 = 0; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)alStack_20); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_58); } std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_70); std::__cxx11::string::~string(local_48); return; }
23,487
minja::Parser::parseExpansion()
monkey531[P]llama/common/minja.hpp
std::shared_ptr<Expression> parseExpansion() { static std::regex expansion_tok(R"(\*\*?)"); auto op_str = consumeToken(expansion_tok); auto expr = parseValueExpression(); if (op_str.empty()) return expr; if (!expr) throw std::runtime_error("Expected expr of 'expansion' expression"); return std::make_shared<UnaryOpExpr>(get_location(), std::move(expr), op_str == "*" ? UnaryOpExpr::Op::Expansion : UnaryOpExpr::Op::ExpansionDict); }
O3
cpp
minja::Parser::parseExpansion(): pushq %r14 pushq %rbx subq $0x78, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0xa4ed6(%rip), %rax # 0x1312d8 movb (%rax), %al testb %al, %al je 0x8c535 leaq 0xa4ea5(%rip), %rdx # 0x1312b8 leaq 0x40(%rsp), %rdi movq %r14, %rsi movl $0x1, %ecx callq 0x87566 leaq 0x10(%rsp), %rdi movq %r14, %rsi callq 0x8c62a cmpq $0x0, 0x48(%rsp) movq 0x10(%rsp), %rax je 0x8c46f testq %rax, %rax je 0x8c58c movq (%r14), %rax movq %rax, 0x60(%rsp) movq 0x8(%r14), %rax movq %rax, 0x68(%rsp) testq %rax, %rax je 0x8c484 movq 0xa3b13(%rip), %rcx # 0x12ff78 cmpb $0x0, (%rcx) je 0x8c480 incl 0x8(%rax) jmp 0x8c484 movq %rax, (%rbx) movq 0x18(%rsp), %rax movq %rax, 0x8(%rbx) jmp 0x8c50f lock incl 0x8(%rax) movq 0x20(%r14), %rax subq 0x10(%r14), %rax leaq 0x60(%rsp), %r14 movq %rax, 0x10(%r14) leaq 0x6d724(%rip), %rsi # 0xf9bc0 leaq 0x40(%rsp), %rdi callq 0x1b250 cmpl $0x1, %eax movl $0x4, %eax sbbl $0x0, %eax leaq 0x3c(%rsp), %r9 movl %eax, (%r9) leaq 0x28(%rsp), %rdi movq $0x0, -0x8(%rdi) leaq 0x20(%rsp), %rsi leaq 0xf(%rsp), %rdx leaq 0x10(%rsp), %r8 movq %r14, %rcx callq 0x98c88 movaps 0x20(%rsp), %xmm0 xorl %eax, %eax movq %rax, 0x28(%rsp) movups %xmm0, (%rbx) movq %rax, 0x20(%rsp) movq 0x68(%rsp), %rdi testq %rdi, %rdi je 0x8c500 callq 0x7140a movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x8c50f callq 0x7140a leaq 0x50(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x8c52a movq 0x50(%rsp), %rsi incq %rsi callq 0x1ba60 movq %rbx, %rax addq $0x78, %rsp popq %rbx popq %r14 retq leaq 0xa4d9c(%rip), %rdi # 0x1312d8 callq 0x1c2d0 testl %eax, %eax je 0x8c40c leaq 0xa4d68(%rip), %rdi # 0x1312b8 leaq 0x66e7a(%rip), %rsi # 0xf33d1 movl $0x10, %edx callq 0x66398 leaq -0x25ecc(%rip), %rdi # 0x6669c leaq 0xa4d49(%rip), %rsi # 0x1312b8 leaq 0xa44d2(%rip), %rdx # 0x130a48 callq 0x1b8d0 leaq 0xa4d56(%rip), %rdi # 0x1312d8 callq 0x1b6a0 jmp 0x8c40c movl $0x10, %edi callq 0x1b4d0 movq %rax, %r14 leaq 0x66e37(%rip), %rsi # 0xf33d7 movq %rax, %rdi callq 0x1b370 movq 0xa3a39(%rip), %rsi # 0x12ffe8 movq 0xa399a(%rip), %rdx # 0x12ff50 movq %r14, %rdi callq 0x1c1c0 movq %rax, %rbx leaq 0xa4d10(%rip), %rdi # 0x1312d8 callq 0x1b690 jmp 0x8c622 movq %rax, %rbx jmp 0x8c5f3 movq %rax, %rbx movq %r14, %rdi callq 0x1b760 jmp 0x8c5f3 movq %rax, %rbx movq 0x68(%rsp), %rdi testq %rdi, %rdi je 0x8c5f3 callq 0x7140a movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x8c607 callq 0x7140a jmp 0x8c607 movq %rax, %rbx leaq 0x50(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x8c622 movq 0x50(%rsp), %rsi incq %rsi callq 0x1ba60 movq %rbx, %rdi callq 0x1c250
_ZN5minja6Parser14parseExpansionEv: push r14 push rbx sub rsp, 78h mov r14, rsi mov rbx, rdi lea rax, _ZGVZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; `guard variable for'minja::Parser::parseExpansion(void)::expansion_tok mov al, [rax] test al, al jz loc_8C535 loc_8C40C: lea rdx, _ZZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; minja::Parser::parseExpansion(void)::expansion_tok lea rdi, [rsp+88h+var_48] mov rsi, r14 mov ecx, 1 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling) lea rdi, [rsp+88h+var_78]; this mov rsi, r14 call _ZN5minja6Parser20parseValueExpressionEv; minja::Parser::parseValueExpression(void) cmp [rsp+88h+var_40], 0 mov rax, [rsp+88h+var_78] jz short loc_8C46F test rax, rax jz loc_8C58C mov rax, [r14] mov [rsp+88h+var_28], rax mov rax, [r14+8] mov [rsp+88h+var_20], rax test rax, rax jz short loc_8C484 mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_8C480 inc dword ptr [rax+8] jmp short loc_8C484 loc_8C46F: mov [rbx], rax mov rax, [rsp+88h+var_70] mov [rbx+8], rax jmp loc_8C50F loc_8C480: lock inc dword ptr [rax+8] loc_8C484: mov rax, [r14+20h] sub rax, [r14+10h] lea r14, [rsp+88h+var_28] mov [r14+10h], rax lea rsi, asc_F9BBF+1; "*" lea rdi, [rsp+88h+var_48] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) cmp eax, 1 mov eax, 4 sbb eax, 0 lea r9, [rsp+88h+var_4C] mov [r9], eax lea rdi, [rsp+88h+var_68+8] mov qword ptr [rdi-8], 0 lea rsi, [rsp+88h+var_68] lea rdx, [rsp+88h+var_79] lea r8, [rsp+88h+var_78] mov rcx, r14 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN5minja11UnaryOpExprESaIS5_EJNS4_8LocationESt10shared_ptrINS4_10ExpressionEENS5_2OpEEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::UnaryOpExpr,std::allocator<minja::UnaryOpExpr>,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>(minja::UnaryOpExpr *&,std::_Sp_alloc_shared_tag<std::allocator<minja::UnaryOpExpr>>,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &&) movaps xmm0, [rsp+88h+var_68] xor eax, eax mov qword ptr [rsp+88h+var_68+8], rax movups xmmword ptr [rbx], xmm0 mov qword ptr [rsp+88h+var_68], rax mov rdi, [rsp+88h+var_20] test rdi, rdi jz short loc_8C500 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_8C500: mov rdi, [rsp+88h+var_70] test rdi, rdi jz short loc_8C50F call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_8C50F: lea rax, [rsp+88h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_8C52A mov rsi, [rsp+88h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8C52A: mov rax, rbx add rsp, 78h pop rbx pop r14 retn loc_8C535: lea rdi, _ZGVZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_8C40C lea rdi, _ZZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; minja::Parser::parseExpansion(void)::expansion_tok lea rsi, asc_F33D1; "\\*\\*?" mov edx, 10h call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc lea rsi, _ZZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; __guard * call ___cxa_guard_release jmp loc_8C40C loc_8C58C: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aExpectedExprOf_0; "Expected expr of 'expansion' expression" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r14; void * call ___cxa_throw mov rbx, rax lea rdi, _ZGVZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; __guard * call ___cxa_guard_abort jmp short loc_8C622 mov rbx, rax jmp short loc_8C5F3 mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_8C5F3 mov rbx, rax mov rdi, [rsp+88h+var_20] test rdi, rdi jz short loc_8C5F3 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_8C5F3: mov rdi, [rsp+88h+var_70] test rdi, rdi jz short loc_8C607 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) jmp short loc_8C607 mov rbx, rax loc_8C607: lea rax, [rsp+88h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_8C622 mov rsi, [rsp+88h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8C622: mov rdi, rbx call __Unwind_Resume
minja::Parser * minja::Parser::parseExpansion(minja::Parser *this, long long *a2) { volatile signed __int32 *v2; // rax __int128 v3; // xmm0 std::runtime_error *exception; // r14 char v6; // [rsp+Fh] [rbp-79h] BYREF long long v7; // [rsp+10h] [rbp-78h] BYREF volatile signed __int32 *v8; // [rsp+18h] [rbp-70h] __int128 v9; // [rsp+20h] [rbp-68h] BYREF int v10; // [rsp+3Ch] [rbp-4Ch] void *v11[2]; // [rsp+40h] [rbp-48h] BYREF long long v12; // [rsp+50h] [rbp-38h] BYREF long long v13; // [rsp+60h] [rbp-28h] BYREF volatile signed __int32 *v14; // [rsp+68h] [rbp-20h] long long v15; // [rsp+70h] [rbp-18h] if ( !(_BYTE)`guard variable for'minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11], (long long)"\\*\\*?", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11]); } minja::Parser::consumeToken( (long long)v11, (long long)a2, (long long)&minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11], 1u); minja::Parser::parseValueExpression((minja::Parser *)&v7); if ( v11[1] ) { if ( !v7 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected expr of 'expansion' expression"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v13 = *a2; v2 = (volatile signed __int32 *)a2[1]; v14 = v2; if ( v2 ) { if ( _libc_single_threaded ) ++*((_DWORD *)v2 + 2); else _InterlockedIncrement(v2 + 2); } v15 = a2[4] - a2[2]; v10 = 4 - ((unsigned int)std::string::compare(v11, "*") == 0); *(_QWORD *)&v9 = 0LL; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::UnaryOpExpr,std::allocator<minja::UnaryOpExpr>,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>( (char *)&v9 + 8, &v9, &v6, &v13, &v7); v3 = v9; *((_QWORD *)&v9 + 1) = 0LL; *(_OWORD *)this = v3; *(_QWORD *)&v9 = 0LL; if ( v14 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v14); if ( v8 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v8); } else { *(_QWORD *)this = v7; *((_QWORD *)this + 1) = v8; } if ( v11[0] != &v12 ) operator delete(v11[0], v12 + 1); return this; }
parseExpansion: PUSH R14 PUSH RBX SUB RSP,0x78 MOV R14,RSI MOV RBX,RDI LEA RAX,[0x2312d8] MOV AL,byte ptr [RAX] TEST AL,AL JZ 0x0018c535 LAB_0018c40c: LEA RDX,[0x2312b8] LEA RDI,[RSP + 0x40] MOV RSI,R14 MOV ECX,0x1 CALL 0x00187566 LAB_0018c425: LEA RDI,[RSP + 0x10] MOV RSI,R14 CALL 0x0018c62a CMP qword ptr [RSP + 0x48],0x0 MOV RAX,qword ptr [RSP + 0x10] JZ 0x0018c46f TEST RAX,RAX JZ 0x0018c58c MOV RAX,qword ptr [R14] MOV qword ptr [RSP + 0x60],RAX MOV RAX,qword ptr [R14 + 0x8] MOV qword ptr [RSP + 0x68],RAX TEST RAX,RAX JZ 0x0018c484 MOV RCX,qword ptr [0x0022ff78] CMP byte ptr [RCX],0x0 JZ 0x0018c480 INC dword ptr [RAX + 0x8] JMP 0x0018c484 LAB_0018c46f: MOV qword ptr [RBX],RAX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RBX + 0x8],RAX JMP 0x0018c50f LAB_0018c480: INC.LOCK dword ptr [RAX + 0x8] LAB_0018c484: MOV RAX,qword ptr [R14 + 0x20] SUB RAX,qword ptr [R14 + 0x10] LEA R14,[RSP + 0x60] MOV qword ptr [R14 + 0x10],RAX LEA RSI,[0x1f9bc0] LEA RDI,[RSP + 0x40] CALL 0x0011b250 CMP EAX,0x1 MOV EAX,0x4 SBB EAX,0x0 LEA R9,[RSP + 0x3c] MOV dword ptr [R9],EAX LEA RDI,[RSP + 0x28] MOV qword ptr [RDI + -0x8],0x0 LAB_0018c4c6: LEA RSI,[RSP + 0x20] LEA RDX,[RSP + 0xf] LEA R8,[RSP + 0x10] MOV RCX,R14 CALL 0x00198c88 MOVAPS XMM0,xmmword ptr [RSP + 0x20] XOR EAX,EAX MOV qword ptr [RSP + 0x28],RAX MOVUPS xmmword ptr [RBX],XMM0 MOV qword ptr [RSP + 0x20],RAX MOV RDI,qword ptr [RSP + 0x68] TEST RDI,RDI JZ 0x0018c500 CALL 0x0017140a LAB_0018c500: MOV RDI,qword ptr [RSP + 0x18] TEST RDI,RDI JZ 0x0018c50f CALL 0x0017140a LAB_0018c50f: LEA RAX,[RSP + 0x50] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0018c52a MOV RSI,qword ptr [RSP + 0x50] INC RSI CALL 0x0011ba60 LAB_0018c52a: MOV RAX,RBX ADD RSP,0x78 POP RBX POP R14 RET LAB_0018c535: LEA RDI,[0x2312d8] CALL 0x0011c2d0 TEST EAX,EAX JZ 0x0018c40c LAB_0018c549: LEA RDI,[0x2312b8] LEA RSI,[0x1f33d1] MOV EDX,0x10 CALL 0x00166398 LAB_0018c561: LEA RDI,[0x16669c] LEA RSI,[0x2312b8] LEA RDX,[0x230a48] CALL 0x0011b8d0 LEA RDI,[0x2312d8] CALL 0x0011b6a0 JMP 0x0018c40c LAB_0018c58c: MOV EDI,0x10 CALL 0x0011b4d0 MOV R14,RAX LAB_0018c599: LEA RSI,[0x1f33d7] MOV RDI,RAX CALL 0x0011b370 LAB_0018c5a8: MOV RSI,qword ptr [0x0022ffe8] MOV RDX,qword ptr [0x0022ff50] MOV RDI,R14 CALL 0x0011c1c0
/* minja::Parser::parseExpansion() */ void minja::Parser::parseExpansion(void) { long lVar1; int iVar2; runtime_error *this; int8 *in_RSI; long *in_RDI; int1 local_79; long local_78; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_70; long local_68; long alStack_60 [2]; int local_4c; long *local_48; long local_40; long local_38 [2]; int8 local_28; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_20; long local_18; if (parseExpansion()::expansion_tok_abi_cxx11_ == '\0') { iVar2 = __cxa_guard_acquire(&parseExpansion()::expansion_tok_abi_cxx11_); if (iVar2 != 0) { /* try { // try from 0018c549 to 0018c560 has its CatchHandler @ 0018c5be */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex ((basic_regex<char,std::__cxx11::regex_traits<char>> *) parseExpansion()::expansion_tok_abi_cxx11_,"\\*\\*?",0x10); __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, parseExpansion()::expansion_tok_abi_cxx11_,&__dso_handle); __cxa_guard_release(&parseExpansion()::expansion_tok_abi_cxx11_); } } consumeToken(&local_48); /* try { // try from 0018c425 to 0018c431 has its CatchHandler @ 0018c604 */ parseValueExpression(); if (local_40 == 0) { *in_RDI = local_78; in_RDI[1] = (long)local_70; } else { if (local_78 == 0) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0018c599 to 0018c5a7 has its CatchHandler @ 0018c5d4 */ std::runtime_error::runtime_error(this,"Expected expr of \'expansion\' expression"); /* try { // try from 0018c5a8 to 0018c5bd has its CatchHandler @ 0018c5cf */ /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_0022ffe8,PTR__runtime_error_0022ff50); } local_28 = *in_RSI; local_20 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1]; if (local_20 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_0022ff78 == '\0') { LOCK(); *(int *)(local_20 + 8) = *(int *)(local_20 + 8) + 1; UNLOCK(); } else { *(int *)(local_20 + 8) = *(int *)(local_20 + 8) + 1; } } local_18 = in_RSI[4] - in_RSI[2]; iVar2 = std::__cxx11::string::compare((char *)&local_48); local_4c = 4 - (uint)(iVar2 == 0); local_68 = 0; /* try { // try from 0018c4c6 to 0018c4dc has its CatchHandler @ 0018c5e1 */ std::__shared_count<(__gnu_cxx::_Lock_policy)2>:: __shared_count<minja::UnaryOpExpr,std::allocator<minja::UnaryOpExpr>,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op> ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)alStack_60,&local_68,&local_79, &local_28,&local_78); lVar1 = alStack_60[0]; alStack_60[0] = 0; *in_RDI = local_68; in_RDI[1] = lVar1; local_68 = 0; if (local_20 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_20); } if (local_70 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_70); } } if (local_48 != local_38) { operator_delete(local_48,local_38[0] + 1); } return; }
23,488
ggml_permute
monkey531[P]llama/ggml/src/ggml.c
struct ggml_tensor * ggml_permute( struct ggml_context * ctx, struct ggml_tensor * a, int axis0, int axis1, int axis2, int axis3) { GGML_ASSERT(axis0 >= 0 && axis0 < GGML_MAX_DIMS); GGML_ASSERT(axis1 >= 0 && axis1 < GGML_MAX_DIMS); GGML_ASSERT(axis2 >= 0 && axis2 < GGML_MAX_DIMS); GGML_ASSERT(axis3 >= 0 && axis3 < GGML_MAX_DIMS); GGML_ASSERT(axis0 != axis1); GGML_ASSERT(axis0 != axis2); GGML_ASSERT(axis0 != axis3); GGML_ASSERT(axis1 != axis2); GGML_ASSERT(axis1 != axis3); GGML_ASSERT(axis2 != axis3); struct ggml_tensor * result = ggml_view_tensor(ctx, a); ggml_format_name(result, "%s (permuted)", a->name); int ne[GGML_MAX_DIMS]; int nb[GGML_MAX_DIMS]; ne[axis0] = a->ne[0]; ne[axis1] = a->ne[1]; ne[axis2] = a->ne[2]; ne[axis3] = a->ne[3]; nb[axis0] = a->nb[0]; nb[axis1] = a->nb[1]; nb[axis2] = a->nb[2]; nb[axis3] = a->nb[3]; result->ne[0] = ne[0]; result->ne[1] = ne[1]; result->ne[2] = ne[2]; result->ne[3] = ne[3]; result->nb[0] = nb[0]; result->nb[1] = nb[1]; result->nb[2] = nb[2]; result->nb[3] = nb[3]; result->op = GGML_OP_PERMUTE; result->src[0] = a; int32_t params[] = { axis0, axis1, axis2, axis3 }; ggml_set_op_params(result, params, sizeof(params)); return result; }
O0
c
ggml_permute: subq $0x58, %rsp movq %rdi, 0x50(%rsp) movq %rsi, 0x48(%rsp) movl %edx, 0x44(%rsp) movl %ecx, 0x40(%rsp) movl %r8d, 0x3c(%rsp) movl %r9d, 0x38(%rsp) cmpl $0x0, 0x44(%rsp) jl 0x4e1de cmpl $0x4, 0x44(%rsp) jl 0x4e1ff leaq 0x663d2(%rip), %rdi # 0xb45b7 movl $0xc89, %esi # imm = 0xC89 leaq 0x66410(%rip), %rdx # 0xb4601 leaq 0x667ef(%rip), %rcx # 0xb49e7 movb $0x0, %al callq 0x46770 cmpl $0x0, 0x40(%rsp) jl 0x4e20d cmpl $0x4, 0x40(%rsp) jl 0x4e22e leaq 0x663a3(%rip), %rdi # 0xb45b7 movl $0xc8a, %esi # imm = 0xC8A leaq 0x663e1(%rip), %rdx # 0xb4601 leaq 0x667e4(%rip), %rcx # 0xb4a0b movb $0x0, %al callq 0x46770 cmpl $0x0, 0x3c(%rsp) jl 0x4e23c cmpl $0x4, 0x3c(%rsp) jl 0x4e25d leaq 0x66374(%rip), %rdi # 0xb45b7 movl $0xc8b, %esi # imm = 0xC8B leaq 0x663b2(%rip), %rdx # 0xb4601 leaq 0x667d9(%rip), %rcx # 0xb4a2f movb $0x0, %al callq 0x46770 cmpl $0x0, 0x38(%rsp) jl 0x4e26b cmpl $0x4, 0x38(%rsp) jl 0x4e28c leaq 0x66345(%rip), %rdi # 0xb45b7 movl $0xc8c, %esi # imm = 0xC8C leaq 0x66383(%rip), %rdx # 0xb4601 leaq 0x667ce(%rip), %rcx # 0xb4a53 movb $0x0, %al callq 0x46770 movl 0x44(%rsp), %eax cmpl 0x40(%rsp), %eax jne 0x4e2b7 leaq 0x6631a(%rip), %rdi # 0xb45b7 movl $0xc8e, %esi # imm = 0xC8E leaq 0x66358(%rip), %rdx # 0xb4601 leaq 0x667c7(%rip), %rcx # 0xb4a77 movb $0x0, %al callq 0x46770 movl 0x44(%rsp), %eax cmpl 0x3c(%rsp), %eax jne 0x4e2e2 leaq 0x662ef(%rip), %rdi # 0xb45b7 movl $0xc8f, %esi # imm = 0xC8F leaq 0x6632d(%rip), %rdx # 0xb4601 leaq 0x667ab(%rip), %rcx # 0xb4a86 movb $0x0, %al callq 0x46770 movl 0x44(%rsp), %eax cmpl 0x38(%rsp), %eax jne 0x4e30d leaq 0x662c4(%rip), %rdi # 0xb45b7 movl $0xc90, %esi # imm = 0xC90 leaq 0x66302(%rip), %rdx # 0xb4601 leaq 0x6678f(%rip), %rcx # 0xb4a95 movb $0x0, %al callq 0x46770 movl 0x40(%rsp), %eax cmpl 0x3c(%rsp), %eax jne 0x4e338 leaq 0x66299(%rip), %rdi # 0xb45b7 movl $0xc91, %esi # imm = 0xC91 leaq 0x662d7(%rip), %rdx # 0xb4601 leaq 0x66773(%rip), %rcx # 0xb4aa4 movb $0x0, %al callq 0x46770 movl 0x40(%rsp), %eax cmpl 0x38(%rsp), %eax jne 0x4e363 leaq 0x6626e(%rip), %rdi # 0xb45b7 movl $0xc92, %esi # imm = 0xC92 leaq 0x662ac(%rip), %rdx # 0xb4601 leaq 0x66757(%rip), %rcx # 0xb4ab3 movb $0x0, %al callq 0x46770 movl 0x3c(%rsp), %eax cmpl 0x38(%rsp), %eax jne 0x4e38e leaq 0x66243(%rip), %rdi # 0xb45b7 movl $0xc93, %esi # imm = 0xC93 leaq 0x66281(%rip), %rdx # 0xb4601 leaq 0x6673b(%rip), %rcx # 0xb4ac2 movb $0x0, %al callq 0x46770 movq 0x50(%rsp), %rdi movq 0x48(%rsp), %rsi callq 0x408e0 movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rdi movq 0x48(%rsp), %rdx addq $0x100, %rdx # imm = 0x100 leaq 0x66717(%rip), %rsi # 0xb4ad1 movb $0x0, %al callq 0x45f40 movq 0x48(%rsp), %rax movq 0x10(%rax), %rax movl %eax, %ecx movslq 0x44(%rsp), %rax movl %ecx, 0x20(%rsp,%rax,4) movq 0x48(%rsp), %rax movq 0x18(%rax), %rax movl %eax, %ecx movslq 0x40(%rsp), %rax movl %ecx, 0x20(%rsp,%rax,4) movq 0x48(%rsp), %rax movq 0x20(%rax), %rax movl %eax, %ecx movslq 0x3c(%rsp), %rax movl %ecx, 0x20(%rsp,%rax,4) movq 0x48(%rsp), %rax movq 0x28(%rax), %rax movl %eax, %ecx movslq 0x38(%rsp), %rax movl %ecx, 0x20(%rsp,%rax,4) movq 0x48(%rsp), %rax movq 0x30(%rax), %rax movl %eax, %ecx movslq 0x44(%rsp), %rax movl %ecx, 0x10(%rsp,%rax,4) movq 0x48(%rsp), %rax movq 0x38(%rax), %rax movl %eax, %ecx movslq 0x40(%rsp), %rax movl %ecx, 0x10(%rsp,%rax,4) movq 0x48(%rsp), %rax movq 0x40(%rax), %rax movl %eax, %ecx movslq 0x3c(%rsp), %rax movl %ecx, 0x10(%rsp,%rax,4) movq 0x48(%rsp), %rax movq 0x48(%rax), %rax movl %eax, %ecx movslq 0x38(%rsp), %rax movl %ecx, 0x10(%rsp,%rax,4) movslq 0x20(%rsp), %rcx movq 0x30(%rsp), %rax movq %rcx, 0x10(%rax) movslq 0x24(%rsp), %rcx movq 0x30(%rsp), %rax movq %rcx, 0x18(%rax) movslq 0x28(%rsp), %rcx movq 0x30(%rsp), %rax movq %rcx, 0x20(%rax) movslq 0x2c(%rsp), %rcx movq 0x30(%rsp), %rax movq %rcx, 0x28(%rax) movslq 0x10(%rsp), %rcx movq 0x30(%rsp), %rax movq %rcx, 0x30(%rax) movslq 0x14(%rsp), %rcx movq 0x30(%rsp), %rax movq %rcx, 0x38(%rax) movslq 0x18(%rsp), %rcx movq 0x30(%rsp), %rax movq %rcx, 0x40(%rax) movslq 0x1c(%rsp), %rcx movq 0x30(%rsp), %rax movq %rcx, 0x48(%rax) movq 0x30(%rsp), %rax movl $0x23, 0x50(%rax) movq 0x48(%rsp), %rcx movq 0x30(%rsp), %rax movq %rcx, 0x98(%rax) movl 0x44(%rsp), %eax movl %eax, (%rsp) movl 0x40(%rsp), %eax movl %eax, 0x4(%rsp) movl 0x3c(%rsp), %eax movl %eax, 0x8(%rsp) movl 0x38(%rsp), %eax movl %eax, 0xc(%rsp) movq 0x30(%rsp), %rdi movq %rsp, %rsi movl $0x10, %edx callq 0x4c3d0 movq 0x30(%rsp), %rax addq $0x58, %rsp retq nopl (%rax)
ggml_permute: sub rsp, 58h mov [rsp+58h+var_8], rdi mov [rsp+58h+var_10], rsi mov [rsp+58h+var_14], edx mov [rsp+58h+var_18], ecx mov [rsp+58h+var_1C], r8d mov [rsp+58h+var_20], r9d cmp [rsp+58h+var_14], 0 jl short loc_4E1DE cmp [rsp+58h+var_14], 4 jl short loc_4E1FF loc_4E1DE: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 0C89h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAxis00Axis0Ggm; "axis0 >= 0 && axis0 < GGML_MAX_DIMS" mov al, 0 call _ggml_abort loc_4E1FF: cmp [rsp+58h+var_18], 0 jl short loc_4E20D cmp [rsp+58h+var_18], 4 jl short loc_4E22E loc_4E20D: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 0C8Ah lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAxis10Axis1Ggm; "axis1 >= 0 && axis1 < GGML_MAX_DIMS" mov al, 0 call _ggml_abort loc_4E22E: cmp [rsp+58h+var_1C], 0 jl short loc_4E23C cmp [rsp+58h+var_1C], 4 jl short loc_4E25D loc_4E23C: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 0C8Bh lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAxis20Axis2Ggm; "axis2 >= 0 && axis2 < GGML_MAX_DIMS" mov al, 0 call _ggml_abort loc_4E25D: cmp [rsp+58h+var_20], 0 jl short loc_4E26B cmp [rsp+58h+var_20], 4 jl short loc_4E28C loc_4E26B: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 0C8Ch lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAxis30Axis3Ggm; "axis3 >= 0 && axis3 < GGML_MAX_DIMS" mov al, 0 call _ggml_abort loc_4E28C: mov eax, [rsp+58h+var_14] cmp eax, [rsp+58h+var_18] jnz short loc_4E2B7 lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 0C8Eh lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAxis0Axis1; "axis0 != axis1" mov al, 0 call _ggml_abort loc_4E2B7: mov eax, [rsp+58h+var_14] cmp eax, [rsp+58h+var_1C] jnz short loc_4E2E2 lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 0C8Fh lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAxis0Axis2; "axis0 != axis2" mov al, 0 call _ggml_abort loc_4E2E2: mov eax, [rsp+58h+var_14] cmp eax, [rsp+58h+var_20] jnz short loc_4E30D lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 0C90h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAxis0Axis3; "axis0 != axis3" mov al, 0 call _ggml_abort loc_4E30D: mov eax, [rsp+58h+var_18] cmp eax, [rsp+58h+var_1C] jnz short loc_4E338 lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 0C91h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAxis1Axis2; "axis1 != axis2" mov al, 0 call _ggml_abort loc_4E338: mov eax, [rsp+58h+var_18] cmp eax, [rsp+58h+var_20] jnz short loc_4E363 lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 0C92h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAxis1Axis3; "axis1 != axis3" mov al, 0 call _ggml_abort loc_4E363: mov eax, [rsp+58h+var_1C] cmp eax, [rsp+58h+var_20] jnz short loc_4E38E lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 0C93h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAxis2Axis3; "axis2 != axis3" mov al, 0 call _ggml_abort loc_4E38E: mov rdi, [rsp+58h+var_8] mov rsi, [rsp+58h+var_10] call _ggml_view_tensor mov [rsp+58h+var_28], rax mov rdi, [rsp+58h+var_28] mov rdx, [rsp+58h+var_10] add rdx, 100h lea rsi, aSPermuted; "%s (permuted)" mov al, 0 call _ggml_format_name mov rax, [rsp+58h+var_10] mov rax, [rax+10h] mov ecx, eax movsxd rax, [rsp+58h+var_14] mov [rsp+rax*4+58h+var_38], ecx mov rax, [rsp+58h+var_10] mov rax, [rax+18h] mov ecx, eax movsxd rax, [rsp+58h+var_18] mov [rsp+rax*4+58h+var_38], ecx mov rax, [rsp+58h+var_10] mov rax, [rax+20h] mov ecx, eax movsxd rax, [rsp+58h+var_1C] mov [rsp+rax*4+58h+var_38], ecx mov rax, [rsp+58h+var_10] mov rax, [rax+28h] mov ecx, eax movsxd rax, [rsp+58h+var_20] mov [rsp+rax*4+58h+var_38], ecx mov rax, [rsp+58h+var_10] mov rax, [rax+30h] mov ecx, eax movsxd rax, [rsp+58h+var_14] mov [rsp+rax*4+58h+var_48], ecx mov rax, [rsp+58h+var_10] mov rax, [rax+38h] mov ecx, eax movsxd rax, [rsp+58h+var_18] mov [rsp+rax*4+58h+var_48], ecx mov rax, [rsp+58h+var_10] mov rax, [rax+40h] mov ecx, eax movsxd rax, [rsp+58h+var_1C] mov [rsp+rax*4+58h+var_48], ecx mov rax, [rsp+58h+var_10] mov rax, [rax+48h] mov ecx, eax movsxd rax, [rsp+58h+var_20] mov [rsp+rax*4+58h+var_48], ecx movsxd rcx, [rsp+58h+var_38] mov rax, [rsp+58h+var_28] mov [rax+10h], rcx movsxd rcx, [rsp+58h+var_34] mov rax, [rsp+58h+var_28] mov [rax+18h], rcx movsxd rcx, [rsp+58h+var_30] mov rax, [rsp+58h+var_28] mov [rax+20h], rcx movsxd rcx, [rsp+58h+var_2C] mov rax, [rsp+58h+var_28] mov [rax+28h], rcx movsxd rcx, [rsp+58h+var_48] mov rax, [rsp+58h+var_28] mov [rax+30h], rcx movsxd rcx, [rsp+58h+var_44] mov rax, [rsp+58h+var_28] mov [rax+38h], rcx movsxd rcx, [rsp+58h+var_40] mov rax, [rsp+58h+var_28] mov [rax+40h], rcx movsxd rcx, [rsp+58h+var_3C] mov rax, [rsp+58h+var_28] mov [rax+48h], rcx mov rax, [rsp+58h+var_28] mov dword ptr [rax+50h], 23h ; '#' mov rcx, [rsp+58h+var_10] mov rax, [rsp+58h+var_28] mov [rax+98h], rcx mov eax, [rsp+58h+var_14] mov [rsp+58h+var_58], eax mov eax, [rsp+58h+var_18] mov [rsp+58h+var_54], eax mov eax, [rsp+58h+var_1C] mov [rsp+58h+var_50], eax mov eax, [rsp+58h+var_20] mov [rsp+58h+var_4C], eax mov rdi, [rsp+58h+var_28] mov rsi, rsp mov edx, 10h call ggml_set_op_params mov rax, [rsp+58h+var_28] add rsp, 58h retn
_QWORD * ggml_permute( long long a1, _QWORD *a2, int a3, unsigned int a4, unsigned int a5, unsigned int a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14) { long long v14; // rcx long long v15; // r8 long long v16; // r9 __m128 v17; // xmm4 __m128 v18; // xmm5 _DWORD v20[4]; // [rsp+0h] [rbp-58h] BYREF _DWORD v21[4]; // [rsp+10h] [rbp-48h] _DWORD v22[4]; // [rsp+20h] [rbp-38h] _QWORD *v23; // [rsp+30h] [rbp-28h] unsigned int v24; // [rsp+38h] [rbp-20h] unsigned int v25; // [rsp+3Ch] [rbp-1Ch] unsigned int v26; // [rsp+40h] [rbp-18h] int v27; // [rsp+44h] [rbp-14h] _QWORD *v28; // [rsp+48h] [rbp-10h] long long v29; // [rsp+50h] [rbp-8h] v29 = a1; v28 = a2; v27 = a3; v26 = a4; v25 = a5; v24 = a6; if ( a3 < 0 || v27 >= 4 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c", 3209, (long long)"GGML_ASSERT(%s) failed", "axis0 >= 0 && axis0 < GGML_MAX_DIMS"); if ( v26 >= 4 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c", 3210, (long long)"GGML_ASSERT(%s) failed", "axis1 >= 0 && axis1 < GGML_MAX_DIMS"); if ( v25 >= 4 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c", 3211, (long long)"GGML_ASSERT(%s) failed", "axis2 >= 0 && axis2 < GGML_MAX_DIMS"); if ( v24 >= 4 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c", 3212, (long long)"GGML_ASSERT(%s) failed", "axis3 >= 0 && axis3 < GGML_MAX_DIMS"); if ( v27 == v26 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c", 3214, (long long)"GGML_ASSERT(%s) failed", "axis0 != axis1"); if ( v27 == v25 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c", 3215, (long long)"GGML_ASSERT(%s) failed", "axis0 != axis2"); if ( v27 == v24 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c", 3216, (long long)"GGML_ASSERT(%s) failed", "axis0 != axis3"); if ( v26 == v25 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c", 3217, (long long)"GGML_ASSERT(%s) failed", "axis1 != axis2"); if ( v26 == v24 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c", 3218, (long long)"GGML_ASSERT(%s) failed", "axis1 != axis3"); if ( v25 == v24 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c", 3219, (long long)"GGML_ASSERT(%s) failed", "axis2 != axis3"); v23 = ggml_view_tensor(v29, (long long)v28, a7, a8, a9, a10, a11, a12, a13, a14); ggml_format_name( (long long)v23, (long long)"%s (permuted)", (long long)(v28 + 32), v14, v15, v16, a7, a8, a9, a10, v17, v18, a13, a14, v20[0]); v22[v27] = v28[2]; v22[v26] = v28[3]; v22[v25] = v28[4]; v22[v24] = v28[5]; v21[v27] = v28[6]; v21[v26] = v28[7]; v21[v25] = v28[8]; v21[v24] = v28[9]; v23[2] = v22[0]; v23[3] = v22[1]; v23[4] = v22[2]; v23[5] = v22[3]; v23[6] = v21[0]; v23[7] = v21[1]; v23[8] = v21[2]; v23[9] = v21[3]; *((_DWORD *)v23 + 20) = 35; v23[19] = v28; v20[0] = v27; v20[1] = v26; v20[2] = v25; v20[3] = v24; ggml_set_op_params((long long)v23, (long long)v20, 16LL); return v23; }
ggml_permute: SUB RSP,0x58 MOV qword ptr [RSP + 0x50],RDI MOV qword ptr [RSP + 0x48],RSI MOV dword ptr [RSP + 0x44],EDX MOV dword ptr [RSP + 0x40],ECX MOV dword ptr [RSP + 0x3c],R8D MOV dword ptr [RSP + 0x38],R9D CMP dword ptr [RSP + 0x44],0x0 JL 0x0014e1de CMP dword ptr [RSP + 0x44],0x4 JL 0x0014e1ff LAB_0014e1de: LEA RDI,[0x1b45b7] MOV ESI,0xc89 LEA RDX,[0x1b4601] LEA RCX,[0x1b49e7] MOV AL,0x0 CALL 0x00146770 LAB_0014e1ff: CMP dword ptr [RSP + 0x40],0x0 JL 0x0014e20d CMP dword ptr [RSP + 0x40],0x4 JL 0x0014e22e LAB_0014e20d: LEA RDI,[0x1b45b7] MOV ESI,0xc8a LEA RDX,[0x1b4601] LEA RCX,[0x1b4a0b] MOV AL,0x0 CALL 0x00146770 LAB_0014e22e: CMP dword ptr [RSP + 0x3c],0x0 JL 0x0014e23c CMP dword ptr [RSP + 0x3c],0x4 JL 0x0014e25d LAB_0014e23c: LEA RDI,[0x1b45b7] MOV ESI,0xc8b LEA RDX,[0x1b4601] LEA RCX,[0x1b4a2f] MOV AL,0x0 CALL 0x00146770 LAB_0014e25d: CMP dword ptr [RSP + 0x38],0x0 JL 0x0014e26b CMP dword ptr [RSP + 0x38],0x4 JL 0x0014e28c LAB_0014e26b: LEA RDI,[0x1b45b7] MOV ESI,0xc8c LEA RDX,[0x1b4601] LEA RCX,[0x1b4a53] MOV AL,0x0 CALL 0x00146770 LAB_0014e28c: MOV EAX,dword ptr [RSP + 0x44] CMP EAX,dword ptr [RSP + 0x40] JNZ 0x0014e2b7 LEA RDI,[0x1b45b7] MOV ESI,0xc8e LEA RDX,[0x1b4601] LEA RCX,[0x1b4a77] MOV AL,0x0 CALL 0x00146770 LAB_0014e2b7: MOV EAX,dword ptr [RSP + 0x44] CMP EAX,dword ptr [RSP + 0x3c] JNZ 0x0014e2e2 LEA RDI,[0x1b45b7] MOV ESI,0xc8f LEA RDX,[0x1b4601] LEA RCX,[0x1b4a86] MOV AL,0x0 CALL 0x00146770 LAB_0014e2e2: MOV EAX,dword ptr [RSP + 0x44] CMP EAX,dword ptr [RSP + 0x38] JNZ 0x0014e30d LEA RDI,[0x1b45b7] MOV ESI,0xc90 LEA RDX,[0x1b4601] LEA RCX,[0x1b4a95] MOV AL,0x0 CALL 0x00146770 LAB_0014e30d: MOV EAX,dword ptr [RSP + 0x40] CMP EAX,dword ptr [RSP + 0x3c] JNZ 0x0014e338 LEA RDI,[0x1b45b7] MOV ESI,0xc91 LEA RDX,[0x1b4601] LEA RCX,[0x1b4aa4] MOV AL,0x0 CALL 0x00146770 LAB_0014e338: MOV EAX,dword ptr [RSP + 0x40] CMP EAX,dword ptr [RSP + 0x38] JNZ 0x0014e363 LEA RDI,[0x1b45b7] MOV ESI,0xc92 LEA RDX,[0x1b4601] LEA RCX,[0x1b4ab3] MOV AL,0x0 CALL 0x00146770 LAB_0014e363: MOV EAX,dword ptr [RSP + 0x3c] CMP EAX,dword ptr [RSP + 0x38] JNZ 0x0014e38e LEA RDI,[0x1b45b7] MOV ESI,0xc93 LEA RDX,[0x1b4601] LEA RCX,[0x1b4ac2] MOV AL,0x0 CALL 0x00146770 LAB_0014e38e: MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x48] CALL 0x001408e0 MOV qword ptr [RSP + 0x30],RAX MOV RDI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x48] ADD RDX,0x100 LEA RSI,[0x1b4ad1] MOV AL,0x0 CALL 0x00145f40 MOV RAX,qword ptr [RSP + 0x48] MOV RAX,qword ptr [RAX + 0x10] MOV ECX,EAX MOVSXD RAX,dword ptr [RSP + 0x44] MOV dword ptr [RSP + RAX*0x4 + 0x20],ECX MOV RAX,qword ptr [RSP + 0x48] MOV RAX,qword ptr [RAX + 0x18] MOV ECX,EAX MOVSXD RAX,dword ptr [RSP + 0x40] MOV dword ptr [RSP + RAX*0x4 + 0x20],ECX MOV RAX,qword ptr [RSP + 0x48] MOV RAX,qword ptr [RAX + 0x20] MOV ECX,EAX MOVSXD RAX,dword ptr [RSP + 0x3c] MOV dword ptr [RSP + RAX*0x4 + 0x20],ECX MOV RAX,qword ptr [RSP + 0x48] MOV RAX,qword ptr [RAX + 0x28] MOV ECX,EAX MOVSXD RAX,dword ptr [RSP + 0x38] MOV dword ptr [RSP + RAX*0x4 + 0x20],ECX MOV RAX,qword ptr [RSP + 0x48] MOV RAX,qword ptr [RAX + 0x30] MOV ECX,EAX MOVSXD RAX,dword ptr [RSP + 0x44] MOV dword ptr [RSP + RAX*0x4 + 0x10],ECX MOV RAX,qword ptr [RSP + 0x48] MOV RAX,qword ptr [RAX + 0x38] MOV ECX,EAX MOVSXD RAX,dword ptr [RSP + 0x40] MOV dword ptr [RSP + RAX*0x4 + 0x10],ECX MOV RAX,qword ptr [RSP + 0x48] MOV RAX,qword ptr [RAX + 0x40] MOV ECX,EAX MOVSXD RAX,dword ptr [RSP + 0x3c] MOV dword ptr [RSP + RAX*0x4 + 0x10],ECX MOV RAX,qword ptr [RSP + 0x48] MOV RAX,qword ptr [RAX + 0x48] MOV ECX,EAX MOVSXD RAX,dword ptr [RSP + 0x38] MOV dword ptr [RSP + RAX*0x4 + 0x10],ECX MOVSXD RCX,dword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RAX + 0x10],RCX MOVSXD RCX,dword ptr [RSP + 0x24] MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RAX + 0x18],RCX MOVSXD RCX,dword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RAX + 0x20],RCX MOVSXD RCX,dword ptr [RSP + 0x2c] MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RAX + 0x28],RCX MOVSXD RCX,dword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RAX + 0x30],RCX MOVSXD RCX,dword ptr [RSP + 0x14] MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RAX + 0x38],RCX MOVSXD RCX,dword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RAX + 0x40],RCX MOVSXD RCX,dword ptr [RSP + 0x1c] MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RAX + 0x48],RCX MOV RAX,qword ptr [RSP + 0x30] MOV dword ptr [RAX + 0x50],0x23 MOV RCX,qword ptr [RSP + 0x48] MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RAX + 0x98],RCX MOV EAX,dword ptr [RSP + 0x44] MOV dword ptr [RSP],EAX MOV EAX,dword ptr [RSP + 0x40] MOV dword ptr [RSP + 0x4],EAX MOV EAX,dword ptr [RSP + 0x3c] MOV dword ptr [RSP + 0x8],EAX MOV EAX,dword ptr [RSP + 0x38] MOV dword ptr [RSP + 0xc],EAX MOV RDI,qword ptr [RSP + 0x30] MOV RSI,RSP MOV EDX,0x10 CALL 0x0014c3d0 MOV RAX,qword ptr [RSP + 0x30] ADD RSP,0x58 RET
long ggml_permute(int8 param_1,long param_2,int param_3,int param_4,int param_5,int param_6) { int local_58; int local_54; int local_50; int local_4c; int local_48 [4]; int local_38 [4]; long local_28; int local_20; int local_1c; int local_18; int local_14; long local_10; int8 local_8; local_20 = param_6; local_1c = param_5; local_18 = param_4; local_14 = param_3; local_10 = param_2; local_8 = param_1; if ((param_3 < 0) || (3 < param_3)) { ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",0xc89, "GGML_ASSERT(%s) failed","axis0 >= 0 && axis0 < GGML_MAX_DIMS"); } if ((local_18 < 0) || (3 < local_18)) { ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",0xc8a, "GGML_ASSERT(%s) failed","axis1 >= 0 && axis1 < GGML_MAX_DIMS"); } if ((local_1c < 0) || (3 < local_1c)) { ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",0xc8b, "GGML_ASSERT(%s) failed","axis2 >= 0 && axis2 < GGML_MAX_DIMS"); } if ((local_20 < 0) || (3 < local_20)) { ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",0xc8c, "GGML_ASSERT(%s) failed","axis3 >= 0 && axis3 < GGML_MAX_DIMS"); } if (local_14 == local_18) { ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",0xc8e, "GGML_ASSERT(%s) failed","axis0 != axis1"); } if (local_14 == local_1c) { ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",0xc8f, "GGML_ASSERT(%s) failed","axis0 != axis2"); } if (local_14 == local_20) { ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",0xc90, "GGML_ASSERT(%s) failed","axis0 != axis3"); } if (local_18 == local_1c) { ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",0xc91, "GGML_ASSERT(%s) failed","axis1 != axis2"); } if (local_18 == local_20) { ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",0xc92, "GGML_ASSERT(%s) failed","axis1 != axis3"); } if (local_1c == local_20) { ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",0xc93, "GGML_ASSERT(%s) failed","axis2 != axis3"); } local_28 = ggml_view_tensor(local_8,local_10); ggml_format_name(local_28,"%s (permuted)",local_10 + 0x100); local_38[local_14] = (int)*(int8 *)(local_10 + 0x10); local_38[local_18] = (int)*(int8 *)(local_10 + 0x18); local_38[local_1c] = (int)*(int8 *)(local_10 + 0x20); local_38[local_20] = (int)*(int8 *)(local_10 + 0x28); local_48[local_14] = (int)*(int8 *)(local_10 + 0x30); local_48[local_18] = (int)*(int8 *)(local_10 + 0x38); local_48[local_1c] = (int)*(int8 *)(local_10 + 0x40); local_48[local_20] = (int)*(int8 *)(local_10 + 0x48); *(long *)(local_28 + 0x10) = (long)local_38[0]; *(long *)(local_28 + 0x18) = (long)local_38[1]; *(long *)(local_28 + 0x20) = (long)local_38[2]; *(long *)(local_28 + 0x28) = (long)local_38[3]; *(long *)(local_28 + 0x30) = (long)local_48[0]; *(long *)(local_28 + 0x38) = (long)local_48[1]; *(long *)(local_28 + 0x40) = (long)local_48[2]; *(long *)(local_28 + 0x48) = (long)local_48[3]; *(int4 *)(local_28 + 0x50) = 0x23; *(long *)(local_28 + 0x98) = local_10; local_58 = local_14; local_54 = local_18; local_50 = local_1c; local_4c = local_20; ggml_set_op_params(local_28,&local_58,0x10); return local_28; }
23,489
my_hash_delete
eloqsql/mysys/hash.c
my_bool my_hash_delete(HASH *hash, uchar *record) { uint pos2,idx,empty_index; my_hash_value_type pos_hashnr, lastpos_hashnr; size_t blength; HASH_LINK *data,*lastpos,*gpos,*pos,*pos3,*empty; DBUG_ENTER("my_hash_delete"); if (!hash->records) DBUG_RETURN(1); blength=hash->blength; data=dynamic_element(&hash->array,0,HASH_LINK*); /* Search after record with key */ pos= data + my_hash_mask(rec_hashnr(hash, record), blength, hash->records); gpos = 0; while (pos->data != record) { gpos=pos; if (pos->next == NO_RECORD) DBUG_RETURN(1); /* Key not found */ pos=data+pos->next; } if ( --(hash->records) < hash->blength >> 1) hash->blength>>=1; lastpos=data+hash->records; /* Remove link to record */ empty=pos; empty_index=(uint) (empty-data); if (gpos) gpos->next=pos->next; /* unlink current ptr */ else if (pos->next != NO_RECORD) { empty=data+(empty_index=pos->next); pos[0]= empty[0]; } if (empty == lastpos) /* last key at wrong pos or no next link */ goto exit; /* Move the last key (lastpos) */ lastpos_hashnr= lastpos->hash_nr; /* pos is where lastpos should be */ pos= data + my_hash_mask(lastpos_hashnr, hash->blength, hash->records); if (pos == empty) /* Move to empty position. */ { empty[0]=lastpos[0]; goto exit; } pos_hashnr= pos->hash_nr; /* pos3 is where the pos should be */ pos3= data + my_hash_mask(pos_hashnr, hash->blength, hash->records); if (pos != pos3) { /* pos is on wrong posit */ empty[0]=pos[0]; /* Save it here */ pos[0]=lastpos[0]; /* This should be here */ movelink(data,(uint) (pos-data),(uint) (pos3-data),empty_index); goto exit; } pos2= my_hash_mask(lastpos_hashnr, blength, hash->records + 1); if (pos2 == my_hash_mask(pos_hashnr, blength, hash->records + 1)) { /* Identical key-positions */ if (pos2 != hash->records) { empty[0]=lastpos[0]; movelink(data,(uint) (lastpos-data),(uint) (pos-data),empty_index); goto exit; } idx= (uint) (pos-data); /* Link pos->next after lastpos */ } else idx= NO_RECORD; /* Different positions merge */ empty[0]=lastpos[0]; movelink(data,idx,empty_index,pos->next); pos->next=empty_index; exit: (void) pop_dynamic(&hash->array); if (hash->free) (*hash->free)((uchar*) record); DBUG_RETURN(0); }
O0
c
my_hash_delete: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x18(%rax) jne 0x62ac9 jmp 0x62ac0 movb $0x1, -0x1(%rbp) jmp 0x62e42 movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax movq 0x28(%rax), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq %rax, -0x70(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x62e50 movl %eax, %edi movq -0x38(%rbp), %rsi movq -0x10(%rbp), %rax movq 0x18(%rax), %rdx callq 0x622d0 movl %eax, %ecx movq -0x70(%rbp), %rax movl %ecx, %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x58(%rbp) movq $0x0, -0x50(%rbp) movq -0x58(%rbp), %rax movq 0x8(%rax), %rax cmpq -0x18(%rbp), %rax je 0x62b65 movq -0x58(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x58(%rbp), %rax cmpl $-0x1, (%rax) jne 0x62b4e jmp 0x62b45 movb $0x1, -0x1(%rbp) jmp 0x62e42 movq -0x40(%rbp), %rax movq -0x58(%rbp), %rcx movl (%rcx), %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x58(%rbp) jmp 0x62b24 movq -0x10(%rbp), %rcx movq 0x18(%rcx), %rax addq $-0x1, %rax movq %rax, 0x18(%rcx) movq -0x10(%rbp), %rcx movq 0x10(%rcx), %rcx shrq %rcx cmpq %rcx, %rax jae 0x62b94 movq -0x10(%rbp), %rax movq 0x10(%rax), %rcx shrq %rcx movq %rcx, 0x10(%rax) movq -0x40(%rbp), %rax movq -0x10(%rbp), %rcx movq 0x18(%rcx), %rcx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x48(%rbp) movq -0x58(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x68(%rbp), %rax movq -0x40(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, -0x24(%rbp) cmpq $0x0, -0x50(%rbp) je 0x62bda movq -0x58(%rbp), %rax movl (%rax), %ecx movq -0x50(%rbp), %rax movl %ecx, (%rax) jmp 0x62c15 movq -0x58(%rbp), %rax cmpl $-0x1, (%rax) je 0x62c13 movq -0x40(%rbp), %rax movq -0x58(%rbp), %rcx movl (%rcx), %ecx movl %ecx, -0x24(%rbp) movl %ecx, %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x68(%rbp) movq -0x58(%rbp), %rax movq -0x68(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) jmp 0x62c15 movq -0x68(%rbp), %rax cmpq -0x48(%rbp), %rax jne 0x62c24 jmp 0x62e16 movq -0x48(%rbp), %rax movl 0x4(%rax), %eax movl %eax, -0x2c(%rbp) movq -0x40(%rbp), %rax movq %rax, -0x78(%rbp) movl -0x2c(%rbp), %edi movq -0x10(%rbp), %rax movq 0x10(%rax), %rsi movq -0x10(%rbp), %rax movq 0x18(%rax), %rdx callq 0x622d0 movl %eax, %ecx movq -0x78(%rbp), %rax movl %ecx, %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rax cmpq -0x68(%rbp), %rax jne 0x62c86 movq -0x68(%rbp), %rax movq -0x48(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) jmp 0x62e16 movq -0x58(%rbp), %rax movl 0x4(%rax), %eax movl %eax, -0x28(%rbp) movq -0x40(%rbp), %rax movq %rax, -0x80(%rbp) movl -0x28(%rbp), %edi movq -0x10(%rbp), %rax movq 0x10(%rax), %rsi movq -0x10(%rbp), %rax movq 0x18(%rax), %rdx callq 0x622d0 movl %eax, %ecx movq -0x80(%rbp), %rax movl %ecx, %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x60(%rbp) movq -0x58(%rbp), %rax cmpq -0x60(%rbp), %rax je 0x62d2c movq -0x68(%rbp), %rax movq -0x58(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) movq -0x58(%rbp), %rax movq -0x48(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) movq -0x40(%rbp), %rdi movq -0x58(%rbp), %rax movq -0x40(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, %esi movq -0x60(%rbp), %rax movq -0x40(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, %edx movl -0x24(%rbp), %ecx callq 0x62a60 jmp 0x62e16 movl -0x2c(%rbp), %edi movq -0x38(%rbp), %rsi movq -0x10(%rbp), %rax movq 0x18(%rax), %rdx addq $0x1, %rdx callq 0x622d0 movl %eax, -0x1c(%rbp) movl -0x1c(%rbp), %eax movl %eax, -0x84(%rbp) movl -0x28(%rbp), %edi movq -0x38(%rbp), %rsi movq -0x10(%rbp), %rax movq 0x18(%rax), %rdx addq $0x1, %rdx callq 0x622d0 movl %eax, %ecx movl -0x84(%rbp), %eax cmpl %ecx, %eax jne 0x62ddb movl -0x1c(%rbp), %eax movq -0x10(%rbp), %rcx cmpq 0x18(%rcx), %rax je 0x62dc7 movq -0x68(%rbp), %rax movq -0x48(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) movq -0x40(%rbp), %rdi movq -0x48(%rbp), %rax movq -0x40(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, %esi movq -0x58(%rbp), %rax movq -0x40(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, %edx movl -0x24(%rbp), %ecx callq 0x62a60 jmp 0x62e16 movq -0x58(%rbp), %rax movq -0x40(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, -0x20(%rbp) jmp 0x62de2 movl $0xffffffff, -0x20(%rbp) # imm = 0xFFFFFFFF movq -0x68(%rbp), %rax movq -0x48(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) movq -0x40(%rbp), %rdi movl -0x20(%rbp), %esi movl -0x24(%rbp), %edx movq -0x58(%rbp), %rax movl (%rax), %ecx callq 0x62a60 movl -0x24(%rbp), %ecx movq -0x58(%rbp), %rax movl %ecx, (%rax) movq -0x10(%rbp), %rdi addq $0x28, %rdi callq 0x65f10 movq -0x10(%rbp), %rax cmpq $0x0, 0x60(%rax) je 0x62e3c movq -0x10(%rbp), %rax movq 0x60(%rax), %rax movq -0x18(%rbp), %rdi callq *%rax jmp 0x62e3e movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x90, %rsp popq %rbp retq nop
my_hash_delete: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] cmp qword ptr [rax+18h], 0 jnz short loc_62AC9 jmp short $+2 loc_62AC0: mov [rbp+var_1], 1 jmp loc_62E42 loc_62AC9: mov rax, [rbp+var_10] mov rax, [rax+10h] mov [rbp+var_38], rax mov rax, [rbp+var_10] mov rax, [rax+28h] mov [rbp+var_40], rax mov rax, [rbp+var_40] mov [rbp+var_70], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call rec_hashnr mov edi, eax mov rsi, [rbp+var_38] mov rax, [rbp+var_10] mov rdx, [rax+18h] call my_hash_mask mov ecx, eax mov rax, [rbp+var_70] mov ecx, ecx shl rcx, 4 add rax, rcx mov [rbp+var_58], rax mov [rbp+var_50], 0 loc_62B24: mov rax, [rbp+var_58] mov rax, [rax+8] cmp rax, [rbp+var_18] jz short loc_62B65 mov rax, [rbp+var_58] mov [rbp+var_50], rax mov rax, [rbp+var_58] cmp dword ptr [rax], 0FFFFFFFFh jnz short loc_62B4E jmp short $+2 loc_62B45: mov [rbp+var_1], 1 jmp loc_62E42 loc_62B4E: mov rax, [rbp+var_40] mov rcx, [rbp+var_58] mov ecx, [rcx] shl rcx, 4 add rax, rcx mov [rbp+var_58], rax jmp short loc_62B24 loc_62B65: mov rcx, [rbp+var_10] mov rax, [rcx+18h] add rax, 0FFFFFFFFFFFFFFFFh mov [rcx+18h], rax mov rcx, [rbp+var_10] mov rcx, [rcx+10h] shr rcx, 1 cmp rax, rcx jnb short loc_62B94 mov rax, [rbp+var_10] mov rcx, [rax+10h] shr rcx, 1 mov [rax+10h], rcx loc_62B94: mov rax, [rbp+var_40] mov rcx, [rbp+var_10] mov rcx, [rcx+18h] shl rcx, 4 add rax, rcx mov [rbp+var_48], rax mov rax, [rbp+var_58] mov [rbp+var_68], rax mov rax, [rbp+var_68] mov rcx, [rbp+var_40] sub rax, rcx sar rax, 4 mov [rbp+var_24], eax cmp [rbp+var_50], 0 jz short loc_62BDA mov rax, [rbp+var_58] mov ecx, [rax] mov rax, [rbp+var_50] mov [rax], ecx jmp short loc_62C15 loc_62BDA: mov rax, [rbp+var_58] cmp dword ptr [rax], 0FFFFFFFFh jz short loc_62C13 mov rax, [rbp+var_40] mov rcx, [rbp+var_58] mov ecx, [rcx] mov [rbp+var_24], ecx mov ecx, ecx shl rcx, 4 add rax, rcx mov [rbp+var_68], rax mov rax, [rbp+var_58] mov rcx, [rbp+var_68] mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx loc_62C13: jmp short $+2 loc_62C15: mov rax, [rbp+var_68] cmp rax, [rbp+var_48] jnz short loc_62C24 jmp loc_62E16 loc_62C24: mov rax, [rbp+var_48] mov eax, [rax+4] mov [rbp+var_2C], eax mov rax, [rbp+var_40] mov [rbp+var_78], rax mov edi, [rbp+var_2C] mov rax, [rbp+var_10] mov rsi, [rax+10h] mov rax, [rbp+var_10] mov rdx, [rax+18h] call my_hash_mask mov ecx, eax mov rax, [rbp+var_78] mov ecx, ecx shl rcx, 4 add rax, rcx mov [rbp+var_58], rax mov rax, [rbp+var_58] cmp rax, [rbp+var_68] jnz short loc_62C86 mov rax, [rbp+var_68] mov rcx, [rbp+var_48] mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx jmp loc_62E16 loc_62C86: mov rax, [rbp+var_58] mov eax, [rax+4] mov [rbp+var_28], eax mov rax, [rbp+var_40] mov [rbp+var_80], rax mov edi, [rbp+var_28] mov rax, [rbp+var_10] mov rsi, [rax+10h] mov rax, [rbp+var_10] mov rdx, [rax+18h] call my_hash_mask mov ecx, eax mov rax, [rbp+var_80] mov ecx, ecx shl rcx, 4 add rax, rcx mov [rbp+var_60], rax mov rax, [rbp+var_58] cmp rax, [rbp+var_60] jz short loc_62D2C mov rax, [rbp+var_68] mov rcx, [rbp+var_58] mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx mov rax, [rbp+var_58] mov rcx, [rbp+var_48] mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx mov rdi, [rbp+var_40] mov rax, [rbp+var_58] mov rcx, [rbp+var_40] sub rax, rcx sar rax, 4 mov esi, eax mov rax, [rbp+var_60] mov rcx, [rbp+var_40] sub rax, rcx sar rax, 4 mov edx, eax mov ecx, [rbp+var_24] call movelink jmp loc_62E16 loc_62D2C: mov edi, [rbp+var_2C] mov rsi, [rbp+var_38] mov rax, [rbp+var_10] mov rdx, [rax+18h] add rdx, 1 call my_hash_mask mov [rbp+var_1C], eax mov eax, [rbp+var_1C] mov [rbp+var_84], eax mov edi, [rbp+var_28] mov rsi, [rbp+var_38] mov rax, [rbp+var_10] mov rdx, [rax+18h] add rdx, 1 call my_hash_mask mov ecx, eax mov eax, [rbp+var_84] cmp eax, ecx jnz short loc_62DDB mov eax, [rbp+var_1C] mov rcx, [rbp+var_10] cmp rax, [rcx+18h] jz short loc_62DC7 mov rax, [rbp+var_68] mov rcx, [rbp+var_48] mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx mov rdi, [rbp+var_40] mov rax, [rbp+var_48] mov rcx, [rbp+var_40] sub rax, rcx sar rax, 4 mov esi, eax mov rax, [rbp+var_58] mov rcx, [rbp+var_40] sub rax, rcx sar rax, 4 mov edx, eax mov ecx, [rbp+var_24] call movelink jmp short loc_62E16 loc_62DC7: mov rax, [rbp+var_58] mov rcx, [rbp+var_40] sub rax, rcx sar rax, 4 mov [rbp+var_20], eax jmp short loc_62DE2 loc_62DDB: mov [rbp+var_20], 0FFFFFFFFh loc_62DE2: mov rax, [rbp+var_68] mov rcx, [rbp+var_48] mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx mov rdi, [rbp+var_40] mov esi, [rbp+var_20] mov edx, [rbp+var_24] mov rax, [rbp+var_58] mov ecx, [rax] call movelink mov ecx, [rbp+var_24] mov rax, [rbp+var_58] mov [rax], ecx loc_62E16: mov rdi, [rbp+var_10] add rdi, 28h ; '(' call pop_dynamic mov rax, [rbp+var_10] cmp qword ptr [rax+60h], 0 jz short loc_62E3C mov rax, [rbp+var_10] mov rax, [rax+60h] mov rdi, [rbp+var_18] call rax loc_62E3C: jmp short $+2 loc_62E3E: mov [rbp+var_1], 0 loc_62E42: mov al, [rbp+var_1] add rsp, 90h pop rbp retn
char my_hash_delete(long long a1, long long a2) { unsigned int v2; // eax unsigned long long v3; // rax _QWORD *v5; // [rsp+28h] [rbp-68h] long long v6; // [rsp+30h] [rbp-60h] unsigned int *v7; // [rsp+38h] [rbp-58h] long long v8; // [rsp+38h] [rbp-58h] _DWORD *v9; // [rsp+40h] [rbp-50h] long long v10; // [rsp+48h] [rbp-48h] long long v11; // [rsp+50h] [rbp-40h] unsigned long long v12; // [rsp+58h] [rbp-38h] unsigned int v13; // [rsp+64h] [rbp-2Ch] unsigned int v14; // [rsp+68h] [rbp-28h] unsigned int v15; // [rsp+6Ch] [rbp-24h] int v16; // [rsp+70h] [rbp-20h] int v17; // [rsp+74h] [rbp-1Ch] if ( !*(_QWORD *)(a1 + 24) ) return 1; v12 = *(_QWORD *)(a1 + 16); v11 = *(_QWORD *)(a1 + 40); v2 = rec_hashnr(a1, a2); v7 = (unsigned int *)(16LL * (unsigned int)my_hash_mask(v2, v12, *(_QWORD *)(a1 + 24)) + v11); v9 = 0LL; while ( *((_QWORD *)v7 + 1) != a2 ) { v9 = v7; if ( *v7 == -1 ) return 1; v7 = (unsigned int *)(16LL * *v7 + v11); } v3 = *(_QWORD *)(a1 + 24) - 1LL; *(_QWORD *)(a1 + 24) = v3; if ( v3 < *(_QWORD *)(a1 + 16) >> 1 ) *(_QWORD *)(a1 + 16) >>= 1; v10 = 16LL * *(_QWORD *)(a1 + 24) + v11; v5 = v7; v15 = ((long long)v7 - v11) >> 4; if ( v9 ) { *v9 = *v7; } else if ( *v7 != -1 ) { v15 = *v7; v5 = (_QWORD *)(16LL * *v7 + v11); *(_QWORD *)v7 = *v5; *((_QWORD *)v7 + 1) = v5[1]; } if ( v5 != (_QWORD *)v10 ) { v13 = *(_DWORD *)(v10 + 4); v8 = 16LL * (unsigned int)my_hash_mask(v13, *(_QWORD *)(a1 + 16), *(_QWORD *)(a1 + 24)) + v11; if ( (_QWORD *)v8 == v5 ) { *v5 = *(_QWORD *)v10; v5[1] = *(_QWORD *)(v10 + 8); } else { v14 = *(_DWORD *)(v8 + 4); v6 = 16LL * (unsigned int)my_hash_mask(v14, *(_QWORD *)(a1 + 16), *(_QWORD *)(a1 + 24)) + v11; if ( v8 == v6 ) { v17 = my_hash_mask(v13, v12, *(_QWORD *)(a1 + 24) + 1LL); if ( v17 == (unsigned int)my_hash_mask(v14, v12, *(_QWORD *)(a1 + 24) + 1LL) ) { if ( v17 != *(_QWORD *)(a1 + 24) ) { *v5 = *(_QWORD *)v10; v5[1] = *(_QWORD *)(v10 + 8); movelink(v11, (v10 - v11) >> 4, (v8 - v11) >> 4, v15); goto LABEL_25; } v16 = (v8 - v11) >> 4; } else { v16 = -1; } *v5 = *(_QWORD *)v10; v5[1] = *(_QWORD *)(v10 + 8); movelink(v11, v16, v15, *(_DWORD *)v8); *(_DWORD *)v8 = v15; goto LABEL_25; } *v5 = *(_QWORD *)v8; v5[1] = *(_QWORD *)(v8 + 8); *(_QWORD *)v8 = *(_QWORD *)v10; *(_QWORD *)(v8 + 8) = *(_QWORD *)(v10 + 8); movelink(v11, (v8 - v11) >> 4, (v6 - v11) >> 4, v15); } } LABEL_25: pop_dynamic(a1 + 40); if ( *(_QWORD *)(a1 + 96) ) (*(void ( **)(long long))(a1 + 96))(a2); return 0; }
my_hash_delete: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x18],0x0 JNZ 0x00162ac9 JMP 0x00162ac0 LAB_00162ac0: MOV byte ptr [RBP + -0x1],0x1 JMP 0x00162e42 LAB_00162ac9: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x70],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00162e50 MOV EDI,EAX MOV RSI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x18] CALL 0x001622d0 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x70] MOV ECX,ECX SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x58],RAX MOV qword ptr [RBP + -0x50],0x0 LAB_00162b24: MOV RAX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RAX + 0x8] CMP RAX,qword ptr [RBP + -0x18] JZ 0x00162b65 MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x58] CMP dword ptr [RAX],-0x1 JNZ 0x00162b4e JMP 0x00162b45 LAB_00162b45: MOV byte ptr [RBP + -0x1],0x1 JMP 0x00162e42 LAB_00162b4e: MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x58] MOV ECX,dword ptr [RCX] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x58],RAX JMP 0x00162b24 LAB_00162b65: MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RCX + 0x18] ADD RAX,-0x1 MOV qword ptr [RCX + 0x18],RAX MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x10] SHR RCX,0x1 CMP RAX,RCX JNC 0x00162b94 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x10] SHR RCX,0x1 MOV qword ptr [RAX + 0x10],RCX LAB_00162b94: MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x18] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x68] MOV RCX,qword ptr [RBP + -0x40] SUB RAX,RCX SAR RAX,0x4 MOV dword ptr [RBP + -0x24],EAX CMP qword ptr [RBP + -0x50],0x0 JZ 0x00162bda MOV RAX,qword ptr [RBP + -0x58] MOV ECX,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],ECX JMP 0x00162c15 LAB_00162bda: MOV RAX,qword ptr [RBP + -0x58] CMP dword ptr [RAX],-0x1 JZ 0x00162c13 MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x58] MOV ECX,dword ptr [RCX] MOV dword ptr [RBP + -0x24],ECX MOV ECX,ECX SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x68] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX LAB_00162c13: JMP 0x00162c15 LAB_00162c15: MOV RAX,qword ptr [RBP + -0x68] CMP RAX,qword ptr [RBP + -0x48] JNZ 0x00162c24 JMP 0x00162e16 LAB_00162c24: MOV RAX,qword ptr [RBP + -0x48] MOV EAX,dword ptr [RAX + 0x4] MOV dword ptr [RBP + -0x2c],EAX MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x78],RAX MOV EDI,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x18] CALL 0x001622d0 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x78] MOV ECX,ECX SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x58] CMP RAX,qword ptr [RBP + -0x68] JNZ 0x00162c86 MOV RAX,qword ptr [RBP + -0x68] MOV RCX,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX JMP 0x00162e16 LAB_00162c86: MOV RAX,qword ptr [RBP + -0x58] MOV EAX,dword ptr [RAX + 0x4] MOV dword ptr [RBP + -0x28],EAX MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x80],RAX MOV EDI,dword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x18] CALL 0x001622d0 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x80] MOV ECX,ECX SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x58] CMP RAX,qword ptr [RBP + -0x60] JZ 0x00162d2c MOV RAX,qword ptr [RBP + -0x68] MOV RCX,qword ptr [RBP + -0x58] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV RDI,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x40] SUB RAX,RCX SAR RAX,0x4 MOV ESI,EAX MOV RAX,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RBP + -0x40] SUB RAX,RCX SAR RAX,0x4 MOV EDX,EAX MOV ECX,dword ptr [RBP + -0x24] CALL 0x00162a60 JMP 0x00162e16 LAB_00162d2c: MOV EDI,dword ptr [RBP + -0x2c] MOV RSI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x18] ADD RDX,0x1 CALL 0x001622d0 MOV dword ptr [RBP + -0x1c],EAX MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x84],EAX MOV EDI,dword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x18] ADD RDX,0x1 CALL 0x001622d0 MOV ECX,EAX MOV EAX,dword ptr [RBP + -0x84] CMP EAX,ECX JNZ 0x00162ddb MOV EAX,dword ptr [RBP + -0x1c] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x18] JZ 0x00162dc7 MOV RAX,qword ptr [RBP + -0x68] MOV RCX,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV RDI,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x40] SUB RAX,RCX SAR RAX,0x4 MOV ESI,EAX MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x40] SUB RAX,RCX SAR RAX,0x4 MOV EDX,EAX MOV ECX,dword ptr [RBP + -0x24] CALL 0x00162a60 JMP 0x00162e16 LAB_00162dc7: MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x40] SUB RAX,RCX SAR RAX,0x4 MOV dword ptr [RBP + -0x20],EAX JMP 0x00162de2 LAB_00162ddb: MOV dword ptr [RBP + -0x20],0xffffffff LAB_00162de2: MOV RAX,qword ptr [RBP + -0x68] MOV RCX,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV RDI,qword ptr [RBP + -0x40] MOV ESI,dword ptr [RBP + -0x20] MOV EDX,dword ptr [RBP + -0x24] MOV RAX,qword ptr [RBP + -0x58] MOV ECX,dword ptr [RAX] CALL 0x00162a60 MOV ECX,dword ptr [RBP + -0x24] MOV RAX,qword ptr [RBP + -0x58] MOV dword ptr [RAX],ECX LAB_00162e16: MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x28 CALL 0x00165f10 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x60],0x0 JZ 0x00162e3c MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x60] MOV RDI,qword ptr [RBP + -0x18] CALL RAX LAB_00162e3c: JMP 0x00162e3e LAB_00162e3e: MOV byte ptr [RBP + -0x1],0x0 LAB_00162e42: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x90 POP RBP RET
int1 my_hash_delete(long param_1,long param_2) { int8 uVar1; long lVar2; int4 uVar3; uint uVar4; uint uVar5; uint uVar6; ulong uVar7; uint *puVar8; uint *puVar9; uint *puVar10; uint *local_70; uint *local_60; uint *local_58; uint local_2c; int4 local_28; if (*(long *)(param_1 + 0x18) == 0) { return 1; } uVar1 = *(int8 *)(param_1 + 0x10); lVar2 = *(long *)(param_1 + 0x28); uVar3 = rec_hashnr(param_1,param_2); uVar4 = my_hash_mask(uVar3,uVar1,*(int8 *)(param_1 + 0x18)); local_58 = (uint *)0x0; while (local_60 = (uint *)(lVar2 + (ulong)uVar4 * 0x10), *(long *)(local_60 + 2) != param_2) { local_58 = local_60; if (*local_60 == 0xffffffff) { return 1; } uVar4 = *local_60; } uVar7 = *(long *)(param_1 + 0x18) - 1; *(ulong *)(param_1 + 0x18) = uVar7; if (uVar7 < *(ulong *)(param_1 + 0x10) >> 1) { *(ulong *)(param_1 + 0x10) = *(ulong *)(param_1 + 0x10) >> 1; } puVar8 = (uint *)(lVar2 + *(long *)(param_1 + 0x18) * 0x10); local_70 = local_60; local_2c = (uint)((long)local_60 - lVar2 >> 4); if (local_58 == (uint *)0x0) { if (*local_60 != 0xffffffff) { local_2c = *local_60; local_70 = (uint *)(lVar2 + (ulong)local_2c * 0x10); *(int8 *)local_60 = *(int8 *)local_70; *(int8 *)(local_60 + 2) = *(int8 *)(local_70 + 2); } } else { *local_58 = *local_60; } if (local_70 != puVar8) { uVar4 = puVar8[1]; uVar5 = my_hash_mask(uVar4,*(int8 *)(param_1 + 0x10),*(int8 *)(param_1 + 0x18)); puVar9 = (uint *)(lVar2 + (ulong)uVar5 * 0x10); if (puVar9 == local_70) { *(int8 *)local_70 = *(int8 *)puVar8; *(int8 *)(local_70 + 2) = *(int8 *)(puVar8 + 2); } else { uVar5 = puVar9[1]; uVar6 = my_hash_mask(uVar5,*(int8 *)(param_1 + 0x10),*(int8 *)(param_1 + 0x18)); puVar10 = (uint *)(lVar2 + (ulong)uVar6 * 0x10); if (puVar9 == puVar10) { uVar4 = my_hash_mask(uVar4,uVar1,*(long *)(param_1 + 0x18) + 1); uVar5 = my_hash_mask(uVar5,uVar1,*(long *)(param_1 + 0x18) + 1); if (uVar4 == uVar5) { if ((ulong)uVar4 != *(ulong *)(param_1 + 0x18)) { *(int8 *)local_70 = *(int8 *)puVar8; *(int8 *)(local_70 + 2) = *(int8 *)(puVar8 + 2); movelink(lVar2,(long)puVar8 - lVar2 >> 4 & 0xffffffff, (long)puVar9 - lVar2 >> 4 & 0xffffffff,local_2c); goto LAB_00162e16; } local_28 = (int4)((long)puVar9 - lVar2 >> 4); } else { local_28 = 0xffffffff; } *(int8 *)local_70 = *(int8 *)puVar8; *(int8 *)(local_70 + 2) = *(int8 *)(puVar8 + 2); movelink(lVar2,local_28,local_2c,*puVar9); *puVar9 = local_2c; } else { *(int8 *)local_70 = *(int8 *)puVar9; *(int8 *)(local_70 + 2) = *(int8 *)(puVar9 + 2); *(int8 *)puVar9 = *(int8 *)puVar8; *(int8 *)(puVar9 + 2) = *(int8 *)(puVar8 + 2); movelink(lVar2,(long)puVar9 - lVar2 >> 4 & 0xffffffff, (long)puVar10 - lVar2 >> 4 & 0xffffffff,local_2c); } } } LAB_00162e16: pop_dynamic(param_1 + 0x28); if (*(long *)(param_1 + 0x60) != 0) { (**(code **)(param_1 + 0x60))(param_2); } return 0; }
23,490
handler::is_fatal_error(int, unsigned int)
eloqsql/sql/handler.h
virtual bool is_fatal_error(int error, uint flags) { if (!error || ((flags & HA_CHECK_DUP_KEY) && (error == HA_ERR_FOUND_DUPP_KEY || error == HA_ERR_FOUND_DUPP_UNIQUE)) || error == HA_ERR_AUTOINC_ERANGE || ((flags & HA_CHECK_FK_ERROR) && (error == HA_ERR_ROW_IS_REFERENCED || error == HA_ERR_NO_REFERENCED_ROW))) return FALSE; return TRUE; }
O3
c
handler::is_fatal_error(int, unsigned int): pushq %rbp movq %rsp, %rbp testl %esi, %esi je 0xbfd5 testb $0x1, %dl jne 0xbfbd cmpl $0xa7, %esi je 0xbfd5 testb $0x4, %dl sete %cl addl $0xffffff67, %esi # imm = 0xFFFFFF67 cmpl $-0x2, %esi setb %al orb %cl, %al jmp 0xbfd7 leal -0x79(%rsi), %eax cmpl $0x2e, %eax ja 0xbfa7 movabsq $0x400000100001, %rcx # imm = 0x400000100001 btq %rax, %rcx jae 0xbfa7 xorl %eax, %eax popq %rbp retq nop
_ZN7handler14is_fatal_errorEij: push rbp mov rbp, rsp test esi, esi jz short loc_BFD5 test dl, 1 jnz short loc_BFBD cmp esi, 0A7h jz short loc_BFD5 loc_BFA7: test dl, 4 setz cl add esi, 0FFFFFF67h cmp esi, 0FFFFFFFEh setb al or al, cl jmp short loc_BFD7 loc_BFBD: lea eax, [rsi-79h] cmp eax, 2Eh ; '.' ja short loc_BFA7 mov rcx, 400000100001h bt rcx, rax jnb short loc_BFA7 loc_BFD5: xor eax, eax loc_BFD7: pop rbp retn
bool handler::is_fatal_error(handler *this, int a2, char a3) { unsigned long long v4; // rax long long v5; // rcx if ( a2 ) { if ( (a3 & 1) != 0 ) { v4 = (unsigned int)(a2 - 121); if ( (unsigned int)v4 > 0x2E ) return (a3 & 4) == 0 || (unsigned int)(a2 - 153) < 0xFFFFFFFE; v5 = 0x400000100001LL; if ( !_bittest64(&v5, v4) ) return (a3 & 4) == 0 || (unsigned int)(a2 - 153) < 0xFFFFFFFE; } else if ( a2 != 167 ) { return (a3 & 4) == 0 || (unsigned int)(a2 - 153) < 0xFFFFFFFE; } } return 0; }
is_fatal_error: PUSH RBP MOV RBP,RSP TEST ESI,ESI JZ 0x0010bfd5 TEST DL,0x1 JNZ 0x0010bfbd CMP ESI,0xa7 JZ 0x0010bfd5 LAB_0010bfa7: TEST DL,0x4 SETZ CL ADD ESI,0xffffff67 CMP ESI,-0x2 SETC AL OR AL,CL JMP 0x0010bfd7 LAB_0010bfbd: LEA EAX,[RSI + -0x79] CMP EAX,0x2e JA 0x0010bfa7 MOV RCX,0x400000100001 BT RCX,RAX JNC 0x0010bfa7 LAB_0010bfd5: XOR EAX,EAX LAB_0010bfd7: POP RBP RET
/* handler::is_fatal_error(int, unsigned int) */ bool __thiscall handler::is_fatal_error(handler *this,int param_1,uint param_2) { bool bVar1; if (param_1 == 0) { LAB_0010bfd5: bVar1 = false; } else { if ((param_2 & 1) == 0) { if (param_1 == 0xa7) goto LAB_0010bfd5; } else if ((param_1 - 0x79U < 0x2f) && ((0x400000100001U >> ((ulong)(param_1 - 0x79U) & 0x3f) & 1) != 0)) goto LAB_0010bfd5; bVar1 = param_1 - 0x99U < 0xfffffffe || (param_2 & 4) == 0; } return bVar1; }
23,491
read_pack_length
eloqsql/storage/myisam/mi_packrec.c
static uint read_pack_length(uint version, const uchar *buf, ulong *length) { if (buf[0] < 254) { *length= buf[0]; return 1; } else if (buf[0] == 254) { *length= uint2korr(buf + 1); return 3; } if (version == 1) /* old format */ { *length= uint3korr(buf + 1); return 4; } else { *length= uint4korr(buf + 1); return 5; } }
O0
c
read_pack_length: pushq %rbp movq %rsp, %rbp movl %edi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x10(%rbp), %rax movzbl (%rax), %eax cmpl $0xfe, %eax jge 0xbcf46 movq -0x10(%rbp), %rax movzbl (%rax), %eax movl %eax, %ecx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x1, -0x4(%rbp) jmp 0xbcfc3 movq -0x10(%rbp), %rax movzbl (%rax), %eax cmpl $0xfe, %eax jne 0xbcf6e movq -0x10(%rbp), %rax movzwl 0x1(%rax), %eax movl %eax, %ecx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x3, -0x4(%rbp) jmp 0xbcfc3 jmp 0xbcf70 cmpl $0x1, -0x8(%rbp) jne 0xbcfac movq -0x10(%rbp), %rax movzbl 0x1(%rax), %eax movq -0x10(%rbp), %rcx movzbl 0x2(%rcx), %ecx shll $0x8, %ecx orl %ecx, %eax movq -0x10(%rbp), %rcx movzbl 0x3(%rcx), %ecx shll $0x10, %ecx orl %ecx, %eax movl %eax, %eax movl %eax, %ecx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x4, -0x4(%rbp) jmp 0xbcfc3 movq -0x10(%rbp), %rax movl 0x1(%rax), %eax movl %eax, %ecx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x5, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax,%rax)
read_pack_length_0: push rbp mov rbp, rsp mov [rbp+var_8], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_10] movzx eax, byte ptr [rax] cmp eax, 0FEh jge short loc_BCF46 mov rax, [rbp+var_10] movzx eax, byte ptr [rax] mov ecx, eax mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 1 jmp short loc_BCFC3 loc_BCF46: mov rax, [rbp+var_10] movzx eax, byte ptr [rax] cmp eax, 0FEh jnz short loc_BCF6E mov rax, [rbp+var_10] movzx eax, word ptr [rax+1] mov ecx, eax mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 3 jmp short loc_BCFC3 loc_BCF6E: jmp short $+2 loc_BCF70: cmp [rbp+var_8], 1 jnz short loc_BCFAC mov rax, [rbp+var_10] movzx eax, byte ptr [rax+1] mov rcx, [rbp+var_10] movzx ecx, byte ptr [rcx+2] shl ecx, 8 or eax, ecx mov rcx, [rbp+var_10] movzx ecx, byte ptr [rcx+3] shl ecx, 10h or eax, ecx mov eax, eax mov ecx, eax mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 4 jmp short loc_BCFC3 loc_BCFAC: mov rax, [rbp+var_10] mov eax, [rax+1] mov ecx, eax mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 5 loc_BCFC3: mov eax, [rbp+var_4] pop rbp retn
long long read_pack_length_0(int a1, unsigned __int8 *a2, _QWORD *a3) { if ( *a2 >= 0xFEu ) { if ( *a2 == 254 ) { *a3 = *(unsigned __int16 *)(a2 + 1); return 3; } else if ( a1 == 1 ) { *a3 = (a2[3] << 16) | (unsigned int)*(unsigned __int16 *)(a2 + 1); return 4; } else { *a3 = *(unsigned int *)(a2 + 1); return 5; } } else { *a3 = *a2; return 1; } }
read_pack_length: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x8],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX] CMP EAX,0xfe JGE 0x001bcf46 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x1 JMP 0x001bcfc3 LAB_001bcf46: MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX] CMP EAX,0xfe JNZ 0x001bcf6e MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX + 0x1] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x3 JMP 0x001bcfc3 LAB_001bcf6e: JMP 0x001bcf70 LAB_001bcf70: CMP dword ptr [RBP + -0x8],0x1 JNZ 0x001bcfac MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x1] MOV RCX,qword ptr [RBP + -0x10] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x10] MOVZX ECX,byte ptr [RCX + 0x3] SHL ECX,0x10 OR EAX,ECX MOV EAX,EAX MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x4 JMP 0x001bcfc3 LAB_001bcfac: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x1] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x5 LAB_001bcfc3: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 read_pack_length(int param_1,byte *param_2,ulong *param_3) { int4 local_c; if (*param_2 < 0xfe) { *param_3 = (ulong)*param_2; local_c = 1; } else if (*param_2 == 0xfe) { *param_3 = (ulong)*(ushort *)(param_2 + 1); local_c = 3; } else if (param_1 == 1) { *param_3 = (ulong)*(uint3 *)(param_2 + 1); local_c = 4; } else { *param_3 = (ulong)*(uint *)(param_2 + 1); local_c = 5; } return local_c; }
23,492
ch2x
eloqsql/strings/ctype-uca.c
static int ch2x(int ch) { if (ch >= '0' && ch <= '9') return ch - '0'; if (ch >= 'a' && ch <= 'f') return 10 + ch - 'a'; if (ch >= 'A' && ch <= 'F') return 10 + ch - 'A'; return -1; }
O0
c
ch2x: pushq %rbp movq %rsp, %rbp movl %edi, -0x8(%rbp) cmpl $0x30, -0x8(%rbp) jl 0xad49e cmpl $0x39, -0x8(%rbp) jg 0xad49e movl -0x8(%rbp), %eax subl $0x30, %eax movl %eax, -0x4(%rbp) jmp 0xad4d9 cmpl $0x61, -0x8(%rbp) jl 0xad4b8 cmpl $0x66, -0x8(%rbp) jg 0xad4b8 movl -0x8(%rbp), %eax addl $0xa, %eax subl $0x61, %eax movl %eax, -0x4(%rbp) jmp 0xad4d9 cmpl $0x41, -0x8(%rbp) jl 0xad4d2 cmpl $0x46, -0x8(%rbp) jg 0xad4d2 movl -0x8(%rbp), %eax addl $0xa, %eax subl $0x41, %eax movl %eax, -0x4(%rbp) jmp 0xad4d9 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF movl -0x4(%rbp), %eax popq %rbp retq nop
ch2x: push rbp mov rbp, rsp mov [rbp+var_8], edi cmp [rbp+var_8], 30h ; '0' jl short loc_AD49E cmp [rbp+var_8], 39h ; '9' jg short loc_AD49E mov eax, [rbp+var_8] sub eax, 30h ; '0' mov [rbp+var_4], eax jmp short loc_AD4D9 loc_AD49E: cmp [rbp+var_8], 61h ; 'a' jl short loc_AD4B8 cmp [rbp+var_8], 66h ; 'f' jg short loc_AD4B8 mov eax, [rbp+var_8] add eax, 0Ah sub eax, 61h ; 'a' mov [rbp+var_4], eax jmp short loc_AD4D9 loc_AD4B8: cmp [rbp+var_8], 41h ; 'A' jl short loc_AD4D2 cmp [rbp+var_8], 46h ; 'F' jg short loc_AD4D2 mov eax, [rbp+var_8] add eax, 0Ah sub eax, 41h ; 'A' mov [rbp+var_4], eax jmp short loc_AD4D9 loc_AD4D2: mov [rbp+var_4], 0FFFFFFFFh loc_AD4D9: mov eax, [rbp+var_4] pop rbp retn
long long ch2x(int a1) { if ( a1 < 48 || a1 > 57 ) { if ( a1 < 97 || a1 > 102 ) { if ( a1 < 65 || a1 > 70 ) return (unsigned int)-1; else return (unsigned int)(a1 - 55); } else { return (unsigned int)(a1 - 87); } } else { return (unsigned int)(a1 - 48); } }
ch2x: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x8],EDI CMP dword ptr [RBP + -0x8],0x30 JL 0x001ad49e CMP dword ptr [RBP + -0x8],0x39 JG 0x001ad49e MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x30 MOV dword ptr [RBP + -0x4],EAX JMP 0x001ad4d9 LAB_001ad49e: CMP dword ptr [RBP + -0x8],0x61 JL 0x001ad4b8 CMP dword ptr [RBP + -0x8],0x66 JG 0x001ad4b8 MOV EAX,dword ptr [RBP + -0x8] ADD EAX,0xa SUB EAX,0x61 MOV dword ptr [RBP + -0x4],EAX JMP 0x001ad4d9 LAB_001ad4b8: CMP dword ptr [RBP + -0x8],0x41 JL 0x001ad4d2 CMP dword ptr [RBP + -0x8],0x46 JG 0x001ad4d2 MOV EAX,dword ptr [RBP + -0x8] ADD EAX,0xa SUB EAX,0x41 MOV dword ptr [RBP + -0x4],EAX JMP 0x001ad4d9 LAB_001ad4d2: MOV dword ptr [RBP + -0x4],0xffffffff LAB_001ad4d9: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int ch2x(int param_1) { int4 local_c; if ((param_1 < 0x30) || (0x39 < param_1)) { if ((param_1 < 0x61) || (0x66 < param_1)) { if ((param_1 < 0x41) || (0x46 < param_1)) { local_c = -1; } else { local_c = param_1 + -0x37; } } else { local_c = param_1 + -0x57; } } else { local_c = param_1 + -0x30; } return local_c; }
23,493
inheritance_source_by_id
eloqsql/mysys/charset.c
static CHARSET_INFO *inheritance_source_by_id(CHARSET_INFO *cs, uint refid) { CHARSET_INFO *refcs; return refid && refid != cs->number && (refcs= all_charsets[refid]) && (refcs->state & MY_CS_AVAILABLE) ? refcs : NULL; }
O0
c
inheritance_source_by_id: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) cmpl $0x0, -0xc(%rbp) je 0x356d1 movl -0xc(%rbp), %eax movq -0x8(%rbp), %rcx cmpl (%rcx), %eax je 0x356d1 movl -0xc(%rbp), %eax movl %eax, %ecx leaq 0x35c768(%rip), %rax # 0x391e10 movq (%rax,%rcx,8), %rax movq %rax, -0x18(%rbp) cmpq $0x0, %rax je 0x356d1 movq -0x18(%rbp), %rax movl 0xc(%rax), %eax andl $0x200, %eax # imm = 0x200 cmpl $0x0, %eax je 0x356d1 movq -0x18(%rbp), %rax movq %rax, -0x20(%rbp) jmp 0x356d9 xorl %eax, %eax movq %rax, -0x20(%rbp) jmp 0x356d9 movq -0x20(%rbp), %rax popq %rbp retq nop
inheritance_source_by_id: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_C], esi cmp [rbp+var_C], 0 jz short loc_356D1 mov eax, [rbp+var_C] mov rcx, [rbp+var_8] cmp eax, [rcx] jz short loc_356D1 mov eax, [rbp+var_C] mov ecx, eax lea rax, all_charsets mov rax, [rax+rcx*8] mov [rbp+var_18], rax cmp rax, 0 jz short loc_356D1 mov rax, [rbp+var_18] mov eax, [rax+0Ch] and eax, 200h cmp eax, 0 jz short loc_356D1 mov rax, [rbp+var_18] mov [rbp+var_20], rax jmp short loc_356D9 loc_356D1: xor eax, eax mov [rbp+var_20], rax jmp short $+2 loc_356D9: mov rax, [rbp+var_20] pop rbp retn
long long inheritance_source_by_id(_DWORD *a1, int a2) { long long v4; // [rsp+8h] [rbp-18h] if ( a2 && a2 != *a1 && (v4 = all_charsets[a2]) != 0 && (*(_DWORD *)(v4 + 12) & 0x200) != 0 ) return all_charsets[a2]; else return 0LL; }
inheritance_source_by_id: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI CMP dword ptr [RBP + -0xc],0x0 JZ 0x001356d1 MOV EAX,dword ptr [RBP + -0xc] MOV RCX,qword ptr [RBP + -0x8] CMP EAX,dword ptr [RCX] JZ 0x001356d1 MOV EAX,dword ptr [RBP + -0xc] MOV ECX,EAX LEA RAX,[0x491e10] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JZ 0x001356d1 MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0xc] AND EAX,0x200 CMP EAX,0x0 JZ 0x001356d1 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x20],RAX JMP 0x001356d9 LAB_001356d1: XOR EAX,EAX MOV qword ptr [RBP + -0x20],RAX JMP 0x001356d9 LAB_001356d9: MOV RAX,qword ptr [RBP + -0x20] POP RBP RET
long inheritance_source_by_id(uint *param_1,uint param_2) { long local_28; if ((((param_2 == 0) || (param_2 == *param_1)) || (local_28 = (&all_charsets)[param_2], local_28 == 0)) || ((*(uint *)(local_28 + 0xc) & 0x200) == 0)) { local_28 = 0; } return local_28; }
23,494
inherit_charset_data
eloqsql/mysys/charset.c
static void inherit_charset_data(struct charset_info_st *cs, CHARSET_INFO *refcs) { if (!cs->to_upper) cs->to_upper= refcs->to_upper; if (!cs->to_lower) cs->to_lower= refcs->to_lower; if (!cs->m_ctype) cs->m_ctype= refcs->m_ctype; if (!cs->tab_to_uni) cs->tab_to_uni= refcs->tab_to_uni; }
O3
c
inherit_charset_data: pushq %rbp movq %rsp, %rbp cmpq $0x0, 0x50(%rdi) jne 0x2effc movq 0x50(%rsi), %rax movq %rax, 0x50(%rdi) cmpq $0x0, 0x48(%rdi) jne 0x2f00b movq 0x48(%rsi), %rax movq %rax, 0x48(%rdi) cmpq $0x0, 0x40(%rdi) jne 0x2f01a movq 0x40(%rsi), %rax movq %rax, 0x40(%rdi) cmpq $0x0, 0x68(%rdi) jne 0x2f029 movq 0x68(%rsi), %rax movq %rax, 0x68(%rdi) popq %rbp retq nop
inherit_charset_data: push rbp mov rbp, rsp cmp qword ptr [rdi+50h], 0 jnz short loc_2EFFC mov rax, [rsi+50h] mov [rdi+50h], rax loc_2EFFC: cmp qword ptr [rdi+48h], 0 jnz short loc_2F00B mov rax, [rsi+48h] mov [rdi+48h], rax loc_2F00B: cmp qword ptr [rdi+40h], 0 jnz short loc_2F01A mov rax, [rsi+40h] mov [rdi+40h], rax loc_2F01A: cmp qword ptr [rdi+68h], 0 jnz short loc_2F029 mov rax, [rsi+68h] mov [rdi+68h], rax loc_2F029: pop rbp retn
long long inherit_charset_data(_QWORD *a1, _QWORD *a2) { long long result; // rax if ( !a1[10] ) { result = a2[10]; a1[10] = result; } if ( !a1[9] ) { result = a2[9]; a1[9] = result; } if ( !a1[8] ) { result = a2[8]; a1[8] = result; } if ( !a1[13] ) { result = a2[13]; a1[13] = result; } return result; }
inherit_charset_data: PUSH RBP MOV RBP,RSP CMP qword ptr [RDI + 0x50],0x0 JNZ 0x0012effc MOV RAX,qword ptr [RSI + 0x50] MOV qword ptr [RDI + 0x50],RAX LAB_0012effc: CMP qword ptr [RDI + 0x48],0x0 JNZ 0x0012f00b MOV RAX,qword ptr [RSI + 0x48] MOV qword ptr [RDI + 0x48],RAX LAB_0012f00b: CMP qword ptr [RDI + 0x40],0x0 JNZ 0x0012f01a MOV RAX,qword ptr [RSI + 0x40] MOV qword ptr [RDI + 0x40],RAX LAB_0012f01a: CMP qword ptr [RDI + 0x68],0x0 JNZ 0x0012f029 MOV RAX,qword ptr [RSI + 0x68] MOV qword ptr [RDI + 0x68],RAX LAB_0012f029: POP RBP RET
void inherit_charset_data(long param_1,long param_2) { if (*(long *)(param_1 + 0x50) == 0) { *(int8 *)(param_1 + 0x50) = *(int8 *)(param_2 + 0x50); } if (*(long *)(param_1 + 0x48) == 0) { *(int8 *)(param_1 + 0x48) = *(int8 *)(param_2 + 0x48); } if (*(long *)(param_1 + 0x40) == 0) { *(int8 *)(param_1 + 0x40) = *(int8 *)(param_2 + 0x40); } if (*(long *)(param_1 + 0x68) == 0) { *(int8 *)(param_1 + 0x68) = *(int8 *)(param_2 + 0x68); } return; }
23,495
ftxui::(anonymous namespace)::InputBase::HandleArrowUp()
Andrewchistyakov[P]flashcards_lyc/build_O0/_deps/ftxui-src/src/ftxui/component/input.cpp
bool HandleArrowUp() { if (cursor_position() == 0) { return false; } const size_t columns = CursorColumn(); // Move cursor at the beginning of 2 lines above. while (true) { if (cursor_position() == 0) { return true; } const size_t previous = GlyphPrevious(content(), cursor_position()); if (content()[previous] == '\n') { break; } cursor_position() = previous; } cursor_position() = GlyphPrevious(content(), cursor_position()); while (true) { if (cursor_position() == 0) { break; } const size_t previous = GlyphPrevious(content(), cursor_position()); if (content()[previous] == '\n') { break; } cursor_position() = previous; } MoveCursorColumn(columns); return true; }
O0
cpp
ftxui::(anonymous namespace)::InputBase::HandleArrowUp(): pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rdi movq %rdi, -0x30(%rbp) addq $0x28, %rdi addq $0xd0, %rdi callq 0x5d970 cmpl $0x0, (%rax) jne 0x5b3a2 movb $0x0, -0x1(%rbp) jmp 0x5b546 movq -0x30(%rbp), %rdi callq 0x5bb60 movq %rax, -0x18(%rbp) movq -0x30(%rbp), %rdi addq $0x28, %rdi addq $0xd0, %rdi callq 0x5d970 cmpl $0x0, (%rax) jne 0x5b3d1 movb $0x1, -0x1(%rbp) jmp 0x5b546 movq -0x30(%rbp), %rdi addq $0x28, %rdi callq 0x5d850 movq -0x30(%rbp), %rdi movq %rax, -0x38(%rbp) addq $0x28, %rdi addq $0xd0, %rdi callq 0x5d970 movq -0x38(%rbp), %rdi movslq (%rax), %rsi callq 0x8dab0 movq -0x30(%rbp), %rdi movq %rax, -0x20(%rbp) addq $0x28, %rdi callq 0x5d850 movq %rax, %rdi movq -0x20(%rbp), %rsi callq 0xdb90 movsbl (%rax), %eax cmpl $0xa, %eax jne 0x5b429 jmp 0x5b44e movq -0x30(%rbp), %rdi movq -0x20(%rbp), %rax movl %eax, -0x3c(%rbp) addq $0x28, %rdi addq $0xd0, %rdi callq 0x5d970 movl -0x3c(%rbp), %ecx movl %ecx, (%rax) jmp 0x5b3af movq -0x30(%rbp), %rdi addq $0x28, %rdi callq 0x5d850 movq -0x30(%rbp), %rdi movq %rax, -0x48(%rbp) addq $0x28, %rdi addq $0xd0, %rdi callq 0x5d970 movq -0x48(%rbp), %rdi movslq (%rax), %rsi callq 0x8dab0 movq -0x30(%rbp), %rdi movl %eax, -0x40(%rbp) addq $0x28, %rdi addq $0xd0, %rdi callq 0x5d970 movl -0x40(%rbp), %ecx movl %ecx, (%rax) movq -0x30(%rbp), %rdi addq $0x28, %rdi addq $0xd0, %rdi callq 0x5d970 cmpl $0x0, (%rax) jne 0x5b4b6 jmp 0x5b533 movq -0x30(%rbp), %rdi addq $0x28, %rdi callq 0x5d850 movq -0x30(%rbp), %rdi movq %rax, -0x50(%rbp) addq $0x28, %rdi addq $0xd0, %rdi callq 0x5d970 movq -0x50(%rbp), %rdi movslq (%rax), %rsi callq 0x8dab0 movq -0x30(%rbp), %rdi movq %rax, -0x28(%rbp) addq $0x28, %rdi callq 0x5d850 movq %rax, %rdi movq -0x28(%rbp), %rsi callq 0xdb90 movsbl (%rax), %eax cmpl $0xa, %eax jne 0x5b50e jmp 0x5b533 movq -0x30(%rbp), %rdi movq -0x28(%rbp), %rax movl %eax, -0x54(%rbp) addq $0x28, %rdi addq $0xd0, %rdi callq 0x5d970 movl -0x54(%rbp), %ecx movl %ecx, (%rax) jmp 0x5b49b movq -0x30(%rbp), %rdi movq -0x18(%rbp), %rax movl %eax, %esi callq 0x5bc10 movb $0x1, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN5ftxui12_GLOBAL__N_19InputBase13HandleArrowUpEv: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rdi mov rdi, [rbp+var_10] mov [rbp+var_30], rdi add rdi, 28h ; '(' add rdi, 0D0h call _ZN5ftxui3RefIiEclEv; ftxui::Ref<int>::operator()(void) cmp dword ptr [rax], 0 jnz short loc_5B3A2 mov [rbp+var_1], 0 jmp loc_5B546 loc_5B3A2: mov rdi, [rbp+var_30]; this call _ZN5ftxui12_GLOBAL__N_19InputBase12CursorColumnEv; ftxui::`anonymous namespace'::InputBase::CursorColumn(void) mov qword ptr [rbp+var_18], rax loc_5B3AF: mov rdi, [rbp+var_30] add rdi, 28h ; '(' add rdi, 0D0h call _ZN5ftxui3RefIiEclEv; ftxui::Ref<int>::operator()(void) cmp dword ptr [rax], 0 jnz short loc_5B3D1 mov [rbp+var_1], 1 jmp loc_5B546 loc_5B3D1: mov rdi, [rbp+var_30] add rdi, 28h ; '(' call _ZN5ftxui3RefINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEv; ftxui::Ref<std::string>::operator()(void) mov rdi, [rbp+var_30] mov [rbp+var_38], rax add rdi, 28h ; '(' add rdi, 0D0h call _ZN5ftxui3RefIiEclEv; ftxui::Ref<int>::operator()(void) mov rdi, [rbp+var_38] movsxd rsi, dword ptr [rax] call _ZN5ftxui13GlyphPreviousERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; ftxui::GlyphPrevious(std::string const&,ulong) mov rdi, [rbp+var_30] mov [rbp+var_20], rax add rdi, 28h ; '(' call _ZN5ftxui3RefINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEv; ftxui::Ref<std::string>::operator()(void) mov rdi, rax mov rsi, [rbp+var_20] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) movsx eax, byte ptr [rax] cmp eax, 0Ah jnz short loc_5B429 jmp short loc_5B44E loc_5B429: mov rdi, [rbp+var_30] mov rax, [rbp+var_20] mov [rbp+var_3C], eax add rdi, 28h ; '(' add rdi, 0D0h call _ZN5ftxui3RefIiEclEv; ftxui::Ref<int>::operator()(void) mov ecx, [rbp+var_3C] mov [rax], ecx jmp loc_5B3AF loc_5B44E: mov rdi, [rbp+var_30] add rdi, 28h ; '(' call _ZN5ftxui3RefINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEv; ftxui::Ref<std::string>::operator()(void) mov rdi, [rbp+var_30] mov [rbp+var_48], rax add rdi, 28h ; '(' add rdi, 0D0h call _ZN5ftxui3RefIiEclEv; ftxui::Ref<int>::operator()(void) mov rdi, [rbp+var_48] movsxd rsi, dword ptr [rax] call _ZN5ftxui13GlyphPreviousERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; ftxui::GlyphPrevious(std::string const&,ulong) mov rdi, [rbp+var_30] mov [rbp+var_40], eax add rdi, 28h ; '(' add rdi, 0D0h call _ZN5ftxui3RefIiEclEv; ftxui::Ref<int>::operator()(void) mov ecx, [rbp+var_40] mov [rax], ecx loc_5B49B: mov rdi, [rbp+var_30] add rdi, 28h ; '(' add rdi, 0D0h call _ZN5ftxui3RefIiEclEv; ftxui::Ref<int>::operator()(void) cmp dword ptr [rax], 0 jnz short loc_5B4B6 jmp short loc_5B533 loc_5B4B6: mov rdi, [rbp+var_30] add rdi, 28h ; '(' call _ZN5ftxui3RefINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEv; ftxui::Ref<std::string>::operator()(void) mov rdi, [rbp+var_30] mov [rbp+var_50], rax add rdi, 28h ; '(' add rdi, 0D0h call _ZN5ftxui3RefIiEclEv; ftxui::Ref<int>::operator()(void) mov rdi, [rbp+var_50] movsxd rsi, dword ptr [rax] call _ZN5ftxui13GlyphPreviousERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; ftxui::GlyphPrevious(std::string const&,ulong) mov rdi, [rbp+var_30] mov [rbp+var_28], rax add rdi, 28h ; '(' call _ZN5ftxui3RefINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEv; ftxui::Ref<std::string>::operator()(void) mov rdi, rax mov rsi, [rbp+var_28] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) movsx eax, byte ptr [rax] cmp eax, 0Ah jnz short loc_5B50E jmp short loc_5B533 loc_5B50E: mov rdi, [rbp+var_30] mov rax, [rbp+var_28] mov [rbp+var_54], eax add rdi, 28h ; '(' add rdi, 0D0h call _ZN5ftxui3RefIiEclEv; ftxui::Ref<int>::operator()(void) mov ecx, [rbp+var_54] mov [rax], ecx jmp loc_5B49B loc_5B533: mov rdi, [rbp+var_30]; this mov rax, qword ptr [rbp+var_18] mov esi, eax; int call _ZN5ftxui12_GLOBAL__N_19InputBase16MoveCursorColumnEi; ftxui::`anonymous namespace'::InputBase::MoveCursorColumn(int) mov [rbp+var_1], 1 loc_5B546: mov al, [rbp+var_1] and al, 1 add rsp, 60h pop rbp retn
char ftxui::`anonymous namespace'::InputBase::HandleArrowUp(ftxui::_anonymous_namespace_::InputBase *this) { int *v1; // rax long long v2; // rax int *v3; // rax int *v4; // rax long long v5; // rax long long v7; // [rsp+10h] [rbp-50h] long long v8; // [rsp+18h] [rbp-48h] int v9; // [rsp+20h] [rbp-40h] long long v10; // [rsp+28h] [rbp-38h] long long v11; // [rsp+38h] [rbp-28h] long long v12; // [rsp+40h] [rbp-20h] int v13; // [rsp+48h] [rbp-18h] if ( !*(_DWORD *)ftxui::Ref<int>::operator()((char *)this + 248) ) return 0; v13 = ftxui::`anonymous namespace'::InputBase::CursorColumn(this); while ( 1 ) { if ( !*(_DWORD *)ftxui::Ref<int>::operator()((char *)this + 248) ) return 1; v10 = ftxui::Ref<std::string>::operator()((char *)this + 40); v1 = (int *)ftxui::Ref<int>::operator()((char *)this + 248); v12 = ftxui::GlyphPrevious(v10, *v1); v2 = ftxui::Ref<std::string>::operator()((char *)this + 40); if ( *(_BYTE *)std::string::operator[](v2, v12) == 10 ) break; *(_DWORD *)ftxui::Ref<int>::operator()((char *)this + 248) = v12; } v8 = ftxui::Ref<std::string>::operator()((char *)this + 40); v3 = (int *)ftxui::Ref<int>::operator()((char *)this + 248); v9 = ftxui::GlyphPrevious(v8, *v3); for ( *(_DWORD *)ftxui::Ref<int>::operator()((char *)this + 248) = v9; *(_DWORD *)ftxui::Ref<int>::operator()((char *)this + 248); *(_DWORD *)ftxui::Ref<int>::operator()((char *)this + 248) = v11 ) { v7 = ftxui::Ref<std::string>::operator()((char *)this + 40); v4 = (int *)ftxui::Ref<int>::operator()((char *)this + 248); v11 = ftxui::GlyphPrevious(v7, *v4); v5 = ftxui::Ref<std::string>::operator()((char *)this + 40); if ( *(_BYTE *)std::string::operator[](v5, v11) == 10 ) break; } ftxui::`anonymous namespace'::InputBase::MoveCursorColumn(this, v13); return 1; }
HandleArrowUp: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x10],RDI MOV RDI,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x30],RDI ADD RDI,0x28 ADD RDI,0xd0 CALL 0x0015d970 CMP dword ptr [RAX],0x0 JNZ 0x0015b3a2 MOV byte ptr [RBP + -0x1],0x0 JMP 0x0015b546 LAB_0015b3a2: MOV RDI,qword ptr [RBP + -0x30] CALL 0x0015bb60 MOV qword ptr [RBP + -0x18],RAX LAB_0015b3af: MOV RDI,qword ptr [RBP + -0x30] ADD RDI,0x28 ADD RDI,0xd0 CALL 0x0015d970 CMP dword ptr [RAX],0x0 JNZ 0x0015b3d1 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0015b546 LAB_0015b3d1: MOV RDI,qword ptr [RBP + -0x30] ADD RDI,0x28 CALL 0x0015d850 MOV RDI,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x38],RAX ADD RDI,0x28 ADD RDI,0xd0 CALL 0x0015d970 MOV RDI,qword ptr [RBP + -0x38] MOVSXD RSI,dword ptr [RAX] CALL 0x0018dab0 MOV RDI,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x20],RAX ADD RDI,0x28 CALL 0x0015d850 MOV RDI,RAX MOV RSI,qword ptr [RBP + -0x20] CALL 0x0010db90 MOVSX EAX,byte ptr [RAX] CMP EAX,0xa JNZ 0x0015b429 JMP 0x0015b44e LAB_0015b429: MOV RDI,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RBP + -0x3c],EAX ADD RDI,0x28 ADD RDI,0xd0 CALL 0x0015d970 MOV ECX,dword ptr [RBP + -0x3c] MOV dword ptr [RAX],ECX JMP 0x0015b3af LAB_0015b44e: MOV RDI,qword ptr [RBP + -0x30] ADD RDI,0x28 CALL 0x0015d850 MOV RDI,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x48],RAX ADD RDI,0x28 ADD RDI,0xd0 CALL 0x0015d970 MOV RDI,qword ptr [RBP + -0x48] MOVSXD RSI,dword ptr [RAX] CALL 0x0018dab0 MOV RDI,qword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x40],EAX ADD RDI,0x28 ADD RDI,0xd0 CALL 0x0015d970 MOV ECX,dword ptr [RBP + -0x40] MOV dword ptr [RAX],ECX LAB_0015b49b: MOV RDI,qword ptr [RBP + -0x30] ADD RDI,0x28 ADD RDI,0xd0 CALL 0x0015d970 CMP dword ptr [RAX],0x0 JNZ 0x0015b4b6 JMP 0x0015b533 LAB_0015b4b6: MOV RDI,qword ptr [RBP + -0x30] ADD RDI,0x28 CALL 0x0015d850 MOV RDI,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x50],RAX ADD RDI,0x28 ADD RDI,0xd0 CALL 0x0015d970 MOV RDI,qword ptr [RBP + -0x50] MOVSXD RSI,dword ptr [RAX] CALL 0x0018dab0 MOV RDI,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x28],RAX ADD RDI,0x28 CALL 0x0015d850 MOV RDI,RAX MOV RSI,qword ptr [RBP + -0x28] CALL 0x0010db90 MOVSX EAX,byte ptr [RAX] CMP EAX,0xa JNZ 0x0015b50e JMP 0x0015b533 LAB_0015b50e: MOV RDI,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x54],EAX ADD RDI,0x28 ADD RDI,0xd0 CALL 0x0015d970 MOV ECX,dword ptr [RBP + -0x54] MOV dword ptr [RAX],ECX JMP 0x0015b49b LAB_0015b533: MOV RDI,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x18] MOV ESI,EAX CALL 0x0015bc10 MOV byte ptr [RBP + -0x1],0x1 LAB_0015b546: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x60 POP RBP RET
/* ftxui::(anonymous namespace)::InputBase::HandleArrowUp() */ int1 __thiscall ftxui::(anonymous_namespace)::InputBase::HandleArrowUp(InputBase *this) { int iVar1; int4 uVar2; int *piVar3; string *psVar4; ulong uVar5; char *pcVar6; int4 *puVar7; int1 local_9; piVar3 = (int *)Ref<int>::operator()((Ref<int> *)(this + 0xf8)); if (*piVar3 == 0) { local_9 = 0; } else { iVar1 = CursorColumn(this); while (piVar3 = (int *)Ref<int>::operator()((Ref<int> *)(this + 0xf8)), *piVar3 != 0) { psVar4 = (string *) Ref<std::__cxx11::string>::operator()((Ref<std::__cxx11::string> *)(this + 0x28)); piVar3 = (int *)Ref<int>::operator()((Ref<int> *)(this + 0xf8)); uVar2 = GlyphPrevious(psVar4,(long)*piVar3); uVar5 = Ref<std::__cxx11::string>::operator()((Ref<std::__cxx11::string> *)(this + 0x28)); pcVar6 = (char *)std::__cxx11::string::operator[](uVar5); if (*pcVar6 == '\n') { psVar4 = (string *) Ref<std::__cxx11::string>::operator()((Ref<std::__cxx11::string> *)(this + 0x28)); piVar3 = (int *)Ref<int>::operator()((Ref<int> *)(this + 0xf8)); uVar2 = GlyphPrevious(psVar4,(long)*piVar3); puVar7 = (int4 *)Ref<int>::operator()((Ref<int> *)(this + 0xf8)); *puVar7 = uVar2; goto LAB_0015b49b; } puVar7 = (int4 *)Ref<int>::operator()((Ref<int> *)(this + 0xf8)); *puVar7 = uVar2; } local_9 = 1; } return local_9; LAB_0015b49b: piVar3 = (int *)Ref<int>::operator()((Ref<int> *)(this + 0xf8)); if (*piVar3 == 0) { LAB_0015b533: MoveCursorColumn(this,iVar1); return 1; } psVar4 = (string *) Ref<std::__cxx11::string>::operator()((Ref<std::__cxx11::string> *)(this + 0x28)); piVar3 = (int *)Ref<int>::operator()((Ref<int> *)(this + 0xf8)); uVar2 = GlyphPrevious(psVar4,(long)*piVar3); uVar5 = Ref<std::__cxx11::string>::operator()((Ref<std::__cxx11::string> *)(this + 0x28)); pcVar6 = (char *)std::__cxx11::string::operator[](uVar5); if (*pcVar6 == '\n') goto LAB_0015b533; puVar7 = (int4 *)Ref<int>::operator()((Ref<int> *)(this + 0xf8)); *puVar7 = uVar2; goto LAB_0015b49b; }
23,496
my_casedn_utf16
eloqsql/strings/ctype-ucs2.c
static size_t my_casedn_utf16(CHARSET_INFO *cs, const char *src, size_t srclen, char *dst, size_t dstlen) { my_wc_t wc; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; my_charset_conv_wc_mb wc_mb= cs->cset->wc_mb; int res; const char *srcend= src + srclen; char *dstend= dst + dstlen; MY_UNICASE_INFO *uni_plane= cs->caseinfo; DBUG_ASSERT(srclen <= dstlen); while ((src < srcend) && (res= mb_wc(cs, &wc, (uchar *) src, (uchar *) srcend)) > 0) { my_tolower_utf16(uni_plane, &wc); if (res != wc_mb(cs, wc, (uchar *) dst, (uchar *) dstend)) break; src+= res; dst+= res; } return srclen; }
O3
c
my_casedn_utf16: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r8, -0x38(%rbp) movq %rdx, -0x30(%rbp) testq %rdx, %rdx jle 0xc7f7b movq %rcx, %r15 movq %rsi, %r12 movq %rdi, %r13 movq 0x78(%rdi), %rax movq %rax, -0x50(%rbp) movq 0xb8(%rdi), %rax movq 0x28(%rax), %rcx movq %rcx, -0x58(%rbp) movq 0x30(%rax), %rax movq %rax, -0x48(%rbp) movq -0x30(%rbp), %rax leaq (%rsi,%rax), %r14 addq %r15, -0x38(%rbp) movq %r13, %rdi leaq -0x40(%rbp), %rsi movq %r12, %rdx movq %r14, %rcx callq *-0x58(%rbp) testl %eax, %eax jle 0xc7f7b movl %eax, %ebx movq -0x40(%rbp), %rsi movq -0x50(%rbp), %rax cmpq (%rax), %rsi ja 0xc7f5d movq 0x8(%rax), %rax movq %rsi, %rcx shrq $0x8, %rcx movq (%rax,%rcx,8), %rax testq %rax, %rax je 0xc7f5d movzbl %sil, %ecx leaq (%rcx,%rcx,2), %rcx movl 0x4(%rax,%rcx,4), %esi movq %rsi, -0x40(%rbp) movq %r13, %rdi movq %r15, %rdx movq -0x38(%rbp), %rcx callq *-0x48(%rbp) cmpl %eax, %ebx jne 0xc7f7b movl %ebx, %eax addq %rax, %r12 addq %rax, %r15 cmpq %r14, %r12 jb 0xc7f16 movq -0x30(%rbp), %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_casedn_utf16: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov [rbp+var_38], r8 mov [rbp+var_30], rdx test rdx, rdx jle loc_C7F7B mov r15, rcx mov r12, rsi mov r13, rdi mov rax, [rdi+78h] mov [rbp+var_50], rax mov rax, [rdi+0B8h] mov rcx, [rax+28h] mov [rbp+var_58], rcx mov rax, [rax+30h] mov [rbp+var_48], rax mov rax, [rbp+var_30] lea r14, [rsi+rax] add [rbp+var_38], r15 loc_C7F16: mov rdi, r13 lea rsi, [rbp+var_40] mov rdx, r12 mov rcx, r14 call [rbp+var_58] test eax, eax jle short loc_C7F7B mov ebx, eax mov rsi, [rbp+var_40] mov rax, [rbp+var_50] cmp rsi, [rax] ja short loc_C7F5D mov rax, [rax+8] mov rcx, rsi shr rcx, 8 mov rax, [rax+rcx*8] test rax, rax jz short loc_C7F5D movzx ecx, sil lea rcx, [rcx+rcx*2] mov esi, [rax+rcx*4+4] mov [rbp+var_40], rsi loc_C7F5D: mov rdi, r13 mov rdx, r15 mov rcx, [rbp+var_38] call [rbp+var_48] cmp ebx, eax jnz short loc_C7F7B mov eax, ebx add r12, rax add r15, rax cmp r12, r14 jb short loc_C7F16 loc_C7F7B: mov rax, [rbp+var_30] add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_casedn_utf16(long long a1, unsigned long long a2, long long a3, long long a4, long long a5) { long long v5; // r15 unsigned long long v6; // r12 long long v7; // rax unsigned long long v8; // r14 int v9; // eax unsigned int v10; // ebx unsigned long long v11; // rsi long long v12; // rax long long ( *v14)(long long, unsigned long long *, unsigned long long, unsigned long long); // [rsp+8h] [rbp-58h] unsigned long long *v15; // [rsp+10h] [rbp-50h] unsigned int ( *v16)(long long, unsigned long long, long long, long long); // [rsp+18h] [rbp-48h] unsigned long long v17; // [rsp+20h] [rbp-40h] BYREF long long v18; // [rsp+28h] [rbp-38h] long long v19; // [rsp+30h] [rbp-30h] v18 = a5; v19 = a3; if ( a3 > 0 ) { v5 = a4; v6 = a2; v15 = *(unsigned long long **)(a1 + 120); v7 = *(_QWORD *)(a1 + 184); v14 = *(long long ( **)(long long, unsigned long long *, unsigned long long, unsigned long long))(v7 + 40); v16 = *(unsigned int ( **)(long long, unsigned long long, long long, long long))(v7 + 48); v8 = a2 + v19; v18 += a4; do { v9 = v14(a1, &v17, v6, v8); if ( v9 <= 0 ) break; v10 = v9; v11 = v17; if ( v17 <= *v15 ) { v12 = *(_QWORD *)(v15[1] + 8 * (v17 >> 8)); if ( v12 ) { v11 = *(unsigned int *)(v12 + 12LL * (unsigned __int8)v17 + 4); v17 = v11; } } if ( v10 != v16(a1, v11, v5, v18) ) break; v6 += v10; v5 += v10; } while ( v6 < v8 ); } return v19; }
my_casedn_utf16: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV qword ptr [RBP + -0x38],R8 MOV qword ptr [RBP + -0x30],RDX TEST RDX,RDX JLE 0x001c7f7b MOV R15,RCX MOV R12,RSI MOV R13,RDI MOV RAX,qword ptr [RDI + 0x78] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RDI + 0xb8] MOV RCX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x58],RCX MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x30] LEA R14,[RSI + RAX*0x1] ADD qword ptr [RBP + -0x38],R15 LAB_001c7f16: MOV RDI,R13 LEA RSI,[RBP + -0x40] MOV RDX,R12 MOV RCX,R14 CALL qword ptr [RBP + -0x58] TEST EAX,EAX JLE 0x001c7f7b MOV EBX,EAX MOV RSI,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x50] CMP RSI,qword ptr [RAX] JA 0x001c7f5d MOV RAX,qword ptr [RAX + 0x8] MOV RCX,RSI SHR RCX,0x8 MOV RAX,qword ptr [RAX + RCX*0x8] TEST RAX,RAX JZ 0x001c7f5d MOVZX ECX,SIL LEA RCX,[RCX + RCX*0x2] MOV ESI,dword ptr [RAX + RCX*0x4 + 0x4] MOV qword ptr [RBP + -0x40],RSI LAB_001c7f5d: MOV RDI,R13 MOV RDX,R15 MOV RCX,qword ptr [RBP + -0x38] CALL qword ptr [RBP + -0x48] CMP EBX,EAX JNZ 0x001c7f7b MOV EAX,EBX ADD R12,RAX ADD R15,RAX CMP R12,R14 JC 0x001c7f16 LAB_001c7f7b: MOV RAX,qword ptr [RBP + -0x30] ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_casedn_utf16(long param_1,ulong param_2,long param_3,long param_4,long param_5) { ulong uVar1; ulong *puVar2; code *pcVar3; code *pcVar4; long lVar5; uint uVar6; uint uVar7; ulong local_48; long local_40; long local_38; local_38 = param_3; if (0 < param_3) { puVar2 = *(ulong **)(param_1 + 0x78); pcVar3 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); pcVar4 = *(code **)(*(long *)(param_1 + 0xb8) + 0x30); uVar1 = param_2 + param_3; local_40 = param_5 + param_4; do { uVar6 = (*pcVar3)(param_1,&local_48,param_2,uVar1); if ((int)uVar6 < 1) { return local_38; } if ((local_48 <= *puVar2) && (lVar5 = *(long *)(puVar2[1] + (local_48 >> 8) * 8), lVar5 != 0)) { local_48 = (ulong)*(uint *)(lVar5 + 4 + (local_48 & 0xff) * 0xc); } uVar7 = (*pcVar4)(param_1,local_48,param_4,local_40); if (uVar6 != uVar7) { return local_38; } param_2 = param_2 + uVar6; param_4 = param_4 + (ulong)uVar6; } while (param_2 < uVar1); } return local_38; }
23,497
gguf_get_tensor_type
Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp
enum ggml_type gguf_get_tensor_type(const struct gguf_context * ctx, int64_t tensor_id) { GGML_ASSERT(tensor_id >= 0 && tensor_id < gguf_get_n_tensors(ctx)); return ctx->info[tensor_id].t.type; }
O1
cpp
gguf_get_tensor_type: pushq %rax testq %rsi, %rsi js 0x3f760 movq 0x20(%rdi), %rax movq 0x28(%rdi), %rdx subq %rax, %rdx sarq $0x3, %rdx movabsq $-0x7d05f417d05f417d, %rcx # imm = 0x82FA0BE82FA0BE83 imulq %rcx, %rdx cmpq %rsi, %rdx jle 0x3f760 movq 0x28(%rdi), %rdx subq %rax, %rdx sarq $0x3, %rdx imulq %rcx, %rdx cmpq %rsi, %rdx jbe 0x3f75b imulq $0x158, %rsi, %rcx # imm = 0x158 movl (%rax,%rcx), %eax popq %rcx retq callq 0x19e51 leaq 0x1d886(%rip), %rdi # 0x5cfed leaq 0xce53(%rip), %rdx # 0x4c5c1 leaq 0x1dddb(%rip), %rcx # 0x5d550 movl $0x38c, %esi # imm = 0x38C xorl %eax, %eax callq 0x18ce0
gguf_get_tensor_type: push rax test rsi, rsi js short loc_3F760 mov rax, [rdi+20h] mov rdx, [rdi+28h] sub rdx, rax sar rdx, 3 mov rcx, 82FA0BE82FA0BE83h imul rdx, rcx cmp rdx, rsi jle short loc_3F760 mov rdx, [rdi+28h] sub rdx, rax sar rdx, 3 imul rdx, rcx cmp rdx, rsi jbe short loc_3F75B imul rcx, rsi, 158h mov eax, [rax+rcx] pop rcx retn loc_3F75B: call gguf_get_tensor_type_cold_1 loc_3F760: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTensorId0Tenso; "tensor_id >= 0 && tensor_id < gguf_get_"... mov esi, 38Ch xor eax, eax call _ggml_abort
long long gguf_get_tensor_type(long long a1, signed long long a2, long long a3, long long a4, int a5, int a6) { long long v6; // rax if ( a2 < 0 || (v6 = *(_QWORD *)(a1 + 32), (long long)(0x82FA0BE82FA0BE83LL * ((*(_QWORD *)(a1 + 40) - v6) >> 3)) <= a2) ) ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp", 908, (unsigned int)"GGML_ASSERT(%s) failed", (unsigned int)"tensor_id >= 0 && tensor_id < gguf_get_n_tensors(ctx)", a5, a6); if ( 0x82FA0BE82FA0BE83LL * ((*(_QWORD *)(a1 + 40) - v6) >> 3) <= a2 ) gguf_get_tensor_type_cold_1(a1); return *(unsigned int *)(v6 + 344 * a2); }
gguf_get_tensor_type: PUSH RAX TEST RSI,RSI JS 0x0013f760 MOV RAX,qword ptr [RDI + 0x20] MOV RDX,qword ptr [RDI + 0x28] SUB RDX,RAX SAR RDX,0x3 MOV RCX,-0x7d05f417d05f417d IMUL RDX,RCX CMP RDX,RSI JLE 0x0013f760 MOV RDX,qword ptr [RDI + 0x28] SUB RDX,RAX SAR RDX,0x3 IMUL RDX,RCX CMP RDX,RSI JBE 0x0013f75b IMUL RCX,RSI,0x158 MOV EAX,dword ptr [RAX + RCX*0x1] POP RCX RET LAB_0013f75b: CALL 0x00119e51 LAB_0013f760: LEA RDI,[0x15cfed] LEA RDX,[0x14c5c1] LEA RCX,[0x15d550] MOV ESI,0x38c XOR EAX,EAX CALL 0x00118ce0
int4 gguf_get_tensor_type(long param_1,ulong param_2) { long lVar1; long lVar2; ulong uVar3; if ((-1 < (long)param_2) && (lVar1 = *(long *)(param_1 + 0x20), lVar2 = (*(long *)(param_1 + 0x28) - lVar1 >> 3) * -0x7d05f417d05f417d, lVar2 - param_2 != 0 && (long)param_2 <= lVar2)) { uVar3 = (*(long *)(param_1 + 0x28) - lVar1 >> 3) * -0x7d05f417d05f417d; if (param_2 <= uVar3 && uVar3 - param_2 != 0) { return *(int4 *)(lVar1 + param_2 * 0x158); } gguf_get_tensor_type_cold_1(); } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp", 0x38c,"GGML_ASSERT(%s) failed","tensor_id >= 0 && tensor_id < gguf_get_n_tensors(ctx)") ; }
23,498
mysql_stmt_close_start
eloqsql/libmariadb/libmariadb/mariadb_async.c
int STDCALL mysql_stmt_close_start(my_bool *ret, MYSQL_STMT *stmt) { MK_ASYNC_START_BODY( mysql_stmt_close, stmt->mysql, { WIN_SET_NONBLOCKING(stmt->mysql) parms.stmt= stmt; }, TRUE, r_my_bool, /* If stmt->mysql==NULL then we will not block so can call directly. */ if (!stmt->mysql) { *ret= mysql_stmt_close(stmt); return 0; }) }
O3
c
mysql_stmt_close_start: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movq 0x38(%rsi), %rax testq %rax, %rax je 0x2c4e7 movq 0x480(%rax), %rax movq 0x28(%rax), %r15 leaq -0x20(%rbp), %rdx movq %r14, (%rdx) movb $0x1, 0x14(%r15) leaq 0x38(%r15), %rdi leaq 0x9f(%rip), %rsi # 0x2c56c callq 0x2d7b0 movw $0x0, 0x14(%r15) testl %eax, %eax jle 0x2c4f1 movb $0x1, 0x15(%r15) movl (%r15), %eax jmp 0x2c561 movq %r14, %rdi callq 0x20521 jmp 0x2c55d js 0x2c4f9 movb 0x8(%r15), %al jmp 0x2c55d movq 0x38(%r14), %rax movl $0x7d8, 0x90(%rax) # imm = 0x7D8 movl $0x297, %edi # imm = 0x297 addq 0x38(%r14), %rdi leaq 0x1c4b9(%rip), %rax # 0x489d0 movq (%rax), %rsi movl $0x5, %edx callq 0x13220 movq 0x38(%r14), %rax xorl %r15d, %r15d movb %r15b, 0x29c(%rax) movl $0x97, %edi addq 0x38(%r14), %rdi leaq 0x1c49e(%rip), %rax # 0x489e0 movq 0x40(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x13220 movq 0x38(%r14), %rax movb %r15b, 0x296(%rax) movb $0x1, %al movb %al, (%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
mysql_stmt_close_start: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14, rsi mov rbx, rdi mov rax, [rsi+38h] test rax, rax jz short loc_2C4E7 mov rax, [rax+480h] mov r15, [rax+28h] lea rdx, [rbp+var_20] mov [rdx], r14 mov byte ptr [r15+14h], 1 lea rdi, [r15+38h] lea rsi, mysql_stmt_close_start_internal call my_context_spawn mov word ptr [r15+14h], 0 test eax, eax jle short loc_2C4F1 mov byte ptr [r15+15h], 1 mov eax, [r15] jmp short loc_2C561 loc_2C4E7: mov rdi, r14 call mysql_stmt_close jmp short loc_2C55D loc_2C4F1: js short loc_2C4F9 mov al, [r15+8] jmp short loc_2C55D loc_2C4F9: mov rax, [r14+38h] mov dword ptr [rax+90h], 7D8h mov edi, 297h add rdi, [r14+38h] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [r14+38h] xor r15d, r15d mov [rax+29Ch], r15b mov edi, 97h add rdi, [r14+38h] lea rax, client_errors mov rsi, [rax+40h] mov edx, 1FFh call _strncpy mov rax, [r14+38h] mov [rax+296h], r15b mov al, 1 loc_2C55D: mov [rbx], al xor eax, eax loc_2C561: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long mysql_stmt_close_start(char *a1, long long a2) { long long v2; // rax long long v3; // rax _BYTE *v4; // r15 int v5; // eax char v7; // al long long v8[4]; // [rsp+0h] [rbp-20h] BYREF v8[0] = v2; v3 = *(_QWORD *)(a2 + 56); if ( v3 ) { v4 = *(_BYTE **)(*(_QWORD *)(v3 + 1152) + 40LL); v8[0] = a2; v4[20] = 1; v5 = my_context_spawn(v4 + 56, mysql_stmt_close_start_internal, v8); *((_WORD *)v4 + 10) = 0; if ( v5 > 0 ) { v4[21] = 1; return *(unsigned int *)v4; } if ( v5 < 0 ) { *(_DWORD *)(*(_QWORD *)(a2 + 56) + 144LL) = 2008; strncpy(*(_QWORD *)(a2 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(*(_QWORD *)(a2 + 56) + 668LL) = 0; strncpy(*(_QWORD *)(a2 + 56) + 151LL, client_errors[8], 511LL); *(_BYTE *)(*(_QWORD *)(a2 + 56) + 662LL) = 0; v7 = 1; } else { v7 = v4[8]; } } else { v7 = mysql_stmt_close(a2); } *a1 = v7; return 0LL; }
mysql_stmt_close_start: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr [RSI + 0x38] TEST RAX,RAX JZ 0x0012c4e7 MOV RAX,qword ptr [RAX + 0x480] MOV R15,qword ptr [RAX + 0x28] LEA RDX,[RBP + -0x20] MOV qword ptr [RDX],R14 MOV byte ptr [R15 + 0x14],0x1 LEA RDI,[R15 + 0x38] LEA RSI,[0x12c56c] CALL 0x0012d7b0 MOV word ptr [R15 + 0x14],0x0 TEST EAX,EAX JLE 0x0012c4f1 MOV byte ptr [R15 + 0x15],0x1 MOV EAX,dword ptr [R15] JMP 0x0012c561 LAB_0012c4e7: MOV RDI,R14 CALL 0x00120521 JMP 0x0012c55d LAB_0012c4f1: JS 0x0012c4f9 MOV AL,byte ptr [R15 + 0x8] JMP 0x0012c55d LAB_0012c4f9: MOV RAX,qword ptr [R14 + 0x38] MOV dword ptr [RAX + 0x90],0x7d8 MOV EDI,0x297 ADD RDI,qword ptr [R14 + 0x38] LEA RAX,[0x1489d0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113220 MOV RAX,qword ptr [R14 + 0x38] XOR R15D,R15D MOV byte ptr [RAX + 0x29c],R15B MOV EDI,0x97 ADD RDI,qword ptr [R14 + 0x38] LEA RAX,[0x1489e0] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1ff CALL 0x00113220 MOV RAX,qword ptr [R14 + 0x38] MOV byte ptr [RAX + 0x296],R15B MOV AL,0x1 LAB_0012c55d: MOV byte ptr [RBX],AL XOR EAX,EAX LAB_0012c561: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int4 mysql_stmt_close_start(int1 *param_1,long param_2) { int4 *puVar1; int1 uVar2; int iVar3; if (*(long *)(param_2 + 0x38) == 0) { uVar2 = mysql_stmt_close(param_2); } else { puVar1 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28); *(int1 *)(puVar1 + 5) = 1; iVar3 = my_context_spawn(puVar1 + 0xe,mysql_stmt_close_start_internal); *(int2 *)(puVar1 + 5) = 0; if (0 < iVar3) { *(int1 *)((long)puVar1 + 0x15) = 1; return *puVar1; } if (iVar3 < 0) { *(int4 *)(*(long *)(param_2 + 0x38) + 0x90) = 0x7d8; strncpy((char *)(*(long *)(param_2 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(*(long *)(param_2 + 0x38) + 0x29c) = 0; strncpy((char *)(*(long *)(param_2 + 0x38) + 0x97),PTR_s_Client_run_out_of_memory_00148a20, 0x1ff); *(int1 *)(*(long *)(param_2 + 0x38) + 0x296) = 0; uVar2 = 1; } else { uVar2 = *(int1 *)(puVar1 + 2); } } *param_1 = uVar2; return 0; }
23,499
fts_get_token_size(charset_info_st const*, char const*, unsigned long)
eloqsql/storage/innobase/fts/fts0fts.cc
ulint fts_get_token_size( /*===============*/ const CHARSET_INFO* cs, /*!< in: Character set */ const char* token, /*!< in: token */ ulint len) /*!< in: token length */ { char* start; char* end; ulint size = 0; /* const_cast is for reinterpret_cast below, or it will fail. */ start = const_cast<char*>(token); end = start + len; while (start < end) { int ctype; int mbl; mbl = cs->ctype( &ctype, reinterpret_cast<uchar*>(start), reinterpret_cast<uchar*>(end)); size++; start += mbl > 0 ? mbl : (mbl < 0 ? -mbl : 1); } return(size); }
O0
cpp
fts_get_token_size(charset_info_st const*, char const*, unsigned long): pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq $0x0, -0x30(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jae 0x1203f4f movq -0x8(%rbp), %rdi movq -0x20(%rbp), %rdx movq -0x28(%rbp), %rcx leaq -0x34(%rbp), %rsi callq 0xde2070 movl %eax, -0x38(%rbp) movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) cmpl $0x0, -0x38(%rbp) jle 0x1203f1c movl -0x38(%rbp), %eax movl %eax, -0x3c(%rbp) jmp 0x1203f3c cmpl $0x0, -0x38(%rbp) jge 0x1203f2c xorl %eax, %eax subl -0x38(%rbp), %eax movl %eax, -0x40(%rbp) jmp 0x1203f36 movl $0x1, %eax movl %eax, -0x40(%rbp) jmp 0x1203f36 movl -0x40(%rbp), %eax movl %eax, -0x3c(%rbp) movl -0x3c(%rbp), %ecx movq -0x20(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) jmp 0x1203ee0 movq -0x30(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopl (%rax)
_Z18fts_get_token_sizePK15charset_info_stPKcm: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_30], 0 mov rax, [rbp+var_10] mov [rbp+var_20], rax mov rax, [rbp+var_20] add rax, [rbp+var_18] mov [rbp+var_28], rax loc_1203EE0: mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jnb short loc_1203F4F mov rdi, [rbp+var_8]; this mov rdx, [rbp+var_20]; unsigned __int8 * mov rcx, [rbp+var_28]; unsigned __int8 * lea rsi, [rbp+var_34]; int * call _ZNK15charset_info_st5ctypeEPiPKhS2_; charset_info_st::ctype(int *,uchar const*,uchar const*) mov [rbp+var_38], eax mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax cmp [rbp+var_38], 0 jle short loc_1203F1C mov eax, [rbp+var_38] mov [rbp+var_3C], eax jmp short loc_1203F3C loc_1203F1C: cmp [rbp+var_38], 0 jge short loc_1203F2C xor eax, eax sub eax, [rbp+var_38] mov [rbp+var_40], eax jmp short loc_1203F36 loc_1203F2C: mov eax, 1 mov [rbp+var_40], eax jmp short $+2 loc_1203F36: mov eax, [rbp+var_40] mov [rbp+var_3C], eax loc_1203F3C: mov ecx, [rbp+var_3C] mov rax, [rbp+var_20] movsxd rcx, ecx add rax, rcx mov [rbp+var_20], rax jmp short loc_1203EE0 loc_1203F4F: mov rax, [rbp+var_30] add rsp, 40h pop rbp retn
long long fts_get_token_size( const charset_info_st *a1, char *a2, long long a3, long long a4, long long a5, long long a6) { int v7; // [rsp+0h] [rbp-40h] int v8; // [rsp+4h] [rbp-3Ch] int v9; // [rsp+8h] [rbp-38h] int v10; // [rsp+Ch] [rbp-34h] BYREF long long v11; // [rsp+10h] [rbp-30h] unsigned __int8 *v12; // [rsp+18h] [rbp-28h] unsigned __int8 *v13; // [rsp+20h] [rbp-20h] long long v14; // [rsp+28h] [rbp-18h] char *v15; // [rsp+30h] [rbp-10h] charset_info_st *v16; // [rsp+38h] [rbp-8h] v16 = a1; v15 = a2; v14 = a3; v11 = 0LL; v13 = (unsigned __int8 *)a2; v12 = (unsigned __int8 *)&a2[a3]; while ( v13 < v12 ) { v9 = charset_info_st::ctype(v16, &v10, v13, v12, a5, a6); ++v11; if ( v9 <= 0 ) { if ( v9 >= 0 ) v7 = 1; else v7 = -v9; v8 = v7; } else { v8 = v9; } v13 += v8; } return v11; }
~_List_impl: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x8],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x01203fb0 ADD RSP,0x10 POP RBP RET
/* std::__cxx11::_List_base<THD*, std::allocator<THD*> >::_List_impl::~_List_impl() */ void __thiscall std::__cxx11::_List_base<THD*,std::allocator<THD*>>::_List_impl::~_List_impl(_List_impl *this) { __new_allocator<std::_List_node<THD*>>::~__new_allocator ((__new_allocator<std::_List_node<THD*>> *)this); return; }