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
19,200
gguf_set_val_f64
Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp
void gguf_set_val_f64(struct gguf_context * ctx, const char * key, double val) { gguf_check_reserved_keys(key, val); gguf_remove_key(ctx, key); ctx->kv.emplace_back(key, val); }
O3
cpp
gguf_set_val_f64: pushq %r15 pushq %r14 pushq %rbx subq $0x40, %rsp movq %rsi, %r14 movq %rdi, %rbx movq %rsi, 0x18(%rsp) movsd %xmm0, 0x10(%rsp) leaq 0x20(%rsp), %r15 leaq 0xf(%rsp), %rdx movq %r15, %rdi callq 0x17d60 leaq 0x1df4b(%rip), %rsi # 0x5d551 movq %r15, %rdi callq 0x17210 testl %eax, %eax je 0x3f658 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x3f62d movq 0x30(%rsp), %rsi incq %rsi callq 0x170d0 movq %rbx, %rdi movq %r14, %rsi callq 0x176b0 addq $0x8, %rbx leaq 0x18(%rsp), %rsi leaq 0x10(%rsp), %rdx movq %rbx, %rdi callq 0x16660 addq $0x40, %rsp popq %rbx popq %r14 popq %r15 retq leaq 0x1de7e(%rip), %rdi # 0x5d4dd leaq 0x1e980(%rip), %rdx # 0x5dfe6 movl $0x3a3, %esi # imm = 0x3A3 xorl %eax, %eax callq 0x17cd0 movq %rax, %rbx leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x3f690 movq 0x30(%rsp), %rsi incq %rsi callq 0x170d0 movq %rbx, %rdi callq 0x17e90
gguf_set_val_f64: push r15 push r14 push rbx sub rsp, 40h mov r14, rsi mov rbx, rdi mov [rsp+58h+var_40], rsi movsd [rsp+58h+var_48], xmm0 lea r15, [rsp+58h+var_38] lea rdx, [rsp+58h+var_49] mov rdi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rsi, aGeneralAlignme; "general.alignment" mov rdi, r15 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_3F658 lea rax, [rsp+58h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_3F62D mov rsi, [rsp+58h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3F62D: mov rdi, rbx mov rsi, r14 call _gguf_remove_key add rbx, 8 lea rsi, [rsp+58h+var_40] lea rdx, [rsp+58h+var_48] mov rdi, rbx call __ZNSt6vectorI7gguf_kvSaIS0_EE12emplace_backIJRPKcRdEEERS0_DpOT_; std::vector<gguf_kv>::emplace_back<char const*&,double &>(char const*&,double &) add rsp, 40h pop rbx pop r14 pop r15 retn loc_3F658: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGeneralAlignme_0; "general.alignment must be type u32" mov esi, 3A3h xor eax, eax call _ggml_abort mov rbx, rax lea rax, [rsp+58h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_3F690 mov rsi, [rsp+58h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3F690: mov rdi, rbx call __Unwind_Resume
long long gguf_set_val_f64(long long a1, long long a2, double a3) { int v3; // ecx int v4; // r8d int v5; // r9d char v7; // [rsp+Fh] [rbp-49h] BYREF double v8; // [rsp+10h] [rbp-48h] BYREF long long v9; // [rsp+18h] [rbp-40h] BYREF void *v10[2]; // [rsp+20h] [rbp-38h] BYREF long long v11; // [rsp+30h] [rbp-28h] BYREF v9 = a2; v8 = a3; std::string::basic_string<std::allocator<char>>(v10, a2, &v7); if ( !(unsigned int)std::string::compare(v10, "general.alignment") ) ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp", 931, (unsigned int)"general.alignment must be type u32", v3, v4, v5); if ( v10[0] != &v11 ) operator delete(v10[0], v11 + 1); gguf_remove_key(a1, a2); return std::vector<gguf_kv>::emplace_back<char const*&,double &>(a1 + 8, &v9, &v8); }
gguf_set_val_f64: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x40 MOV R14,RSI MOV RBX,RDI MOV qword ptr [RSP + 0x18],RSI MOVSD qword ptr [RSP + 0x10],XMM0 LEA R15,[RSP + 0x20] LEA RDX,[RSP + 0xf] MOV RDI,R15 CALL 0x00117d60 LEA RSI,[0x15d551] MOV RDI,R15 CALL 0x00117210 TEST EAX,EAX JZ 0x0013f658 LEA RAX,[RSP + 0x30] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0013f62d MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x001170d0 LAB_0013f62d: MOV RDI,RBX MOV RSI,R14 CALL 0x001176b0 ADD RBX,0x8 LEA RSI,[RSP + 0x18] LEA RDX,[RSP + 0x10] MOV RDI,RBX CALL 0x00116660 ADD RSP,0x40 POP RBX POP R14 POP R15 RET LAB_0013f658: LEA RDI,[0x15d4dd] LEA RDX,[0x15dfe6] MOV ESI,0x3a3 XOR EAX,EAX CALL 0x00117cd0
void gguf_set_val_f64(double param_1,long param_2,char *param_3) { int iVar1; allocator local_49; double local_48; char *local_40; long *local_38 [2]; long local_28 [2]; local_48 = param_1; local_40 = param_3; std::__cxx11::string::string<std::allocator<char>>((string *)local_38,param_3,&local_49); iVar1 = std::__cxx11::string::compare((string *)local_38,"general.alignment"); if (iVar1 != 0) { if (local_38[0] != local_28) { operator_delete(local_38[0],local_28[0] + 1); } gguf_remove_key(param_2,param_3); std::vector<gguf_kv,std::allocator<gguf_kv>>::emplace_back<char_const*&,double&> ((vector<gguf_kv,std::allocator<gguf_kv>> *)(param_2 + 8),&local_40,&local_48); return; } /* try { // try from 0013f658 to 0013f671 has its CatchHandler @ 0013f672 */ /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp", 0x3a3,"general.alignment must be type u32"); }
19,201
codegen_generate_function_def
tsotchke[P]eshkol/src/backend/codegen/definitions.c
bool codegen_generate_function_def(CodegenContext* context, const AstNode* node) { assert(context != NULL); assert(node != NULL); assert(node->type == AST_DEFINE || node->type == AST_FUNCTION_DEF); // Get output file FILE* output = codegen_context_get_output(context); // Get type context TypeInferenceContext* type_context = codegen_context_get_type_context(context); // Get diagnostics context DiagnosticContext* diagnostics = codegen_context_get_diagnostics(context); // Debug message char debug_msg[256]; snprintf(debug_msg, sizeof(debug_msg), "Generating function definition for node type %d", node->type); diagnostic_debug(diagnostics, 0, 0, debug_msg); // Variables to hold function information const AstNode* name_node = NULL; const AstNode* body_node = NULL; size_t param_count = 0; Parameter** params = NULL; // Get function information based on node type if (node->type == AST_DEFINE) { // Define node with lambda value if (node->as.define.value->type != AST_LAMBDA) { diagnostic_error(diagnostics, node->line, node->column, "Expected lambda in function definition"); return false; } name_node = node->as.define.name; body_node = node->as.define.value->as.lambda.body; param_count = node->as.define.value->as.lambda.param_count; params = node->as.define.value->as.lambda.params; } else if (node->type == AST_FUNCTION_DEF) { // Function definition node name_node = node->as.function_def.name; body_node = node->as.function_def.body; param_count = node->as.function_def.param_count; params = node->as.function_def.params; } else { diagnostic_error(diagnostics, node->line, node->column, "Invalid node type for function definition"); return false; } // Debug message if (name_node && name_node->type == AST_IDENTIFIER) { snprintf(debug_msg, sizeof(debug_msg), "Function name: %s", name_node->as.identifier.name); diagnostic_debug(diagnostics, 0, 0, debug_msg); } // Get function type Type* func_type = type_inference_get_type(type_context, node); // Get return type Type* return_type = NULL; if (func_type && func_type->kind == TYPE_FUNCTION) { return_type = func_type->function.return_type; } // Generate return type if (return_type) { fprintf(output, "%s ", codegen_type_to_c_type(return_type)); } else { fprintf(output, "int "); } // Generate function name if (name_node && name_node->type == AST_IDENTIFIER) { // Replace hyphens with underscores in function names char* function_name = strdup(name_node->as.identifier.name); if (function_name) { for (char* p = function_name; *p; p++) { if (*p == '-') { *p = '_'; } } fprintf(output, "%s(", function_name); free(function_name); } else { fprintf(output, "%s(", name_node->as.identifier.name); } } else { fprintf(output, "_func_%zu_%zu(", node->line, node->column); } // Generate parameters for (size_t i = 0; i < param_count; i++) { if (i > 0) { fprintf(output, ", "); } // Get parameter Parameter* param = params[i]; // Get parameter type Type* param_type = NULL; if (func_type && func_type->kind == TYPE_FUNCTION && i < func_type->function.param_count) { param_type = func_type->function.params[i]; } // Generate parameter type if (param_type) { fprintf(output, "%s ", codegen_type_to_c_type(param_type)); } else { fprintf(output, "int "); } // Generate parameter name fprintf(output, "%s", param->name); } // Close parameter list fprintf(output, ") "); // Generate function body fprintf(output, "{\n"); // Add a loop for tail call optimization fprintf(output, " // Tail call optimization loop\n"); fprintf(output, " while (1) {\n"); // Check if the body is a begin block (multiple statements) if (body_node && body_node->type == AST_BEGIN) { // Generate each statement in the begin block for (size_t i = 0; i < body_node->as.begin.expr_count - 1; i++) { fprintf(output, " "); if (!codegen_generate_expression(context, body_node->as.begin.exprs[i])) { return false; } fprintf(output, ";\n"); } // Generate the last statement with a return if (body_node->as.begin.expr_count > 0) { fprintf(output, " return "); if (!codegen_generate_expression(context, body_node->as.begin.exprs[body_node->as.begin.expr_count - 1])) { return false; } fprintf(output, ";\n"); } } else if (body_node) { // Single statement body fprintf(output, " return "); if (!codegen_generate_expression(context, body_node)) { return false; } fprintf(output, ";\n"); } else { // No body fprintf(output, " return 0;\n"); } // Close the loop fprintf(output, " }\n"); fprintf(output, "}"); return true; }
O3
c
codegen_generate_function_def: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x128, %rsp # imm = 0x128 testq %rdi, %rdi je 0x148a3 movq %rsi, %r13 testq %rsi, %rsi je 0x148c2 movq %rdi, %r14 movl (%r13), %eax cmpl $0x7, %eax je 0x14475 cmpl $0x1b, %eax jne 0x148e1 movq %r14, %rdi callq 0xb394 movq %rax, %rbx movq %r14, %rdi callq 0xb36a movq %rax, %r12 movq %r14, 0x8(%rsp) movq %r14, %rdi callq 0xb340 movq %rax, %rbp movl (%r13), %ecx leaq 0xc925(%rip), %rdx # 0x20dcb leaq 0x20(%rsp), %r15 movl $0x100, %esi # imm = 0x100 movq %r15, %rdi xorl %eax, %eax callq 0x2160 movq %rbp, %rdi xorl %esi, %esi xorl %edx, %edx movq %r15, %rcx callq 0x3f78 movl (%r13), %eax cmpl $0x1b, %eax je 0x144f6 cmpl $0x7, %eax jne 0x145f9 movq 0x50(%r13), %rax cmpl $0x8, (%rax) jne 0x1460a leaq 0x48(%rax), %rcx leaq 0x60(%rax), %rdx addq $0x50, %rax jmp 0x14502 leaq 0x70(%r13), %rdx leaq 0x60(%r13), %rax leaq 0x50(%r13), %rcx movq 0x48(%r13), %r15 movq (%rdx), %rdx movq %rdx, 0x10(%rsp) movq (%rcx), %rcx movq %rcx, 0x18(%rsp) movq (%rax), %r14 testq %r15, %r15 je 0x14551 cmpl $0x6, (%r15) jne 0x14551 movq 0x48(%r15), %rcx leaq 0xc91d(%rip), %rdx # 0x20e4c leaq 0x20(%rsp), %rdi movl $0x100, %esi # imm = 0x100 xorl %eax, %eax callq 0x2160 movq %rbp, %rdi xorl %esi, %esi xorl %edx, %edx leaq 0x20(%rsp), %rcx callq 0x3f78 movq %r12, %rdi movq %r13, %rsi callq 0x8c5e movq %rax, %r12 testq %rax, %rax je 0x14590 cmpl $0x9, (%r12) jne 0x14590 movq 0x18(%r12), %rdi testq %rdi, %rdi je 0x14590 callq 0x14cec leaq 0x91ea(%rip), %rsi # 0x1d76b movq %rbx, %rdi movq %rax, %rdx xorl %eax, %eax callq 0x2200 jmp 0x145a9 leaq 0xc53e(%rip), %rdi # 0x20ad5 movl $0x4, %esi movl $0x1, %edx movq %rbx, %rcx callq 0x22c0 testq %r15, %r15 je 0x145de cmpl $0x6, (%r15) jne 0x145de movq 0x48(%r15), %rbp movq %rbp, %rdi callq 0x22d0 testq %rax, %rax je 0x14644 movq %rax, %r13 movzbl (%rax), %ecx cmpl $0x2d, %ecx je 0x145d6 testl %ecx, %ecx jne 0x145d9 jmp 0x14626 movb $0x5f, (%rax) incq %rax jmp 0x145c8 movq 0x8(%r13), %rdx movq 0x10(%r13), %rcx leaq 0xc875(%rip), %rsi # 0x20e62 movq %rbx, %rdi xorl %eax, %eax callq 0x2200 jmp 0x14658 movl 0x8(%r13), %esi movl 0x10(%r13), %edx leaq 0xc81a(%rip), %rcx # 0x20e22 jmp 0x14619 movl 0x8(%r13), %esi movl 0x10(%r13), %edx leaq 0xc7e2(%rip), %rcx # 0x20dfb movq %rbp, %rdi callq 0x3e0b jmp 0x1488f leaq 0xc831(%rip), %rsi # 0x20e5e movq %rbx, %rdi movq %r13, %rdx xorl %eax, %eax callq 0x2200 movq %r13, %rdi callq 0x2030 jmp 0x14658 leaq 0xc813(%rip), %rsi # 0x20e5e movq %rbx, %rdi movq %rbp, %rdx xorl %eax, %eax callq 0x2200 testq %r14, %r14 je 0x146f9 leaq 0xc46d(%rip), %r13 # 0x20ad5 xorl %ebp, %ebp testq %rbp, %rbp je 0x14688 movl $0x2, %esi movl $0x1, %edx leaq 0xbd9c(%rip), %rdi # 0x2041c movq %rbx, %rcx callq 0x22c0 movq 0x18(%rsp), %rax movq (%rax,%rbp,8), %r15 testq %r12, %r12 je 0x146cd cmpl $0x9, (%r12) jne 0x146cd cmpq 0x8(%r12), %rbp jae 0x146cd movq 0x10(%r12), %rax movq (%rax,%rbp,8), %rdi testq %rdi, %rdi je 0x146cd callq 0x14cec movq %rbx, %rdi leaq 0x90aa(%rip), %rsi # 0x1d76b movq %rax, %rdx xorl %eax, %eax callq 0x2200 jmp 0x146e2 movl $0x4, %esi movl $0x1, %edx movq %r13, %rdi movq %rbx, %rcx callq 0x22c0 movq (%r15), %rdi movq %rbx, %rsi callq 0x2190 incq %rbp cmpq %rbp, %r14 jne 0x1466a leaq 0xc771(%rip), %rdi # 0x20e71 movl $0x2, %esi movl $0x1, %edx movq %rbx, %rcx callq 0x22c0 leaq 0x932c(%rip), %rdi # 0x1da45 movl $0x2, %esi movl $0x1, %edx movq %rbx, %rcx callq 0x22c0 leaq 0xa23f(%rip), %rdi # 0x1e971 movl $0x23, %esi movl $0x1, %edx movq %rbx, %rcx callq 0x22c0 leaq 0xa24a(%rip), %rdi # 0x1e995 movl $0x10, %esi movl $0x1, %edx movq %rbx, %rcx callq 0x22c0 movq 0x10(%rsp), %rbp testq %rbp, %rbp je 0x14814 cmpl $0xa, (%rbp) jne 0x14822 cmpq $0x1, 0x50(%rbp) movq 0x8(%rsp), %r15 je 0x147e9 xorl %r14d, %r14d leaq 0xc6e9(%rip), %r12 # 0x20e74 leaq 0x9138(%rip), %r13 # 0x1d8ca movl $0x8, %esi movl $0x1, %edx movq %r12, %rdi movq %rbx, %rcx callq 0x22c0 movq 0x48(%rbp), %rax movq (%rax,%r14,8), %rsi movq %r15, %rdi callq 0x10f0c testb %al, %al je 0x1488f movl $0x2, %esi movl $0x1, %edx movq %r13, %rdi movq %rbx, %rcx callq 0x22c0 incq %r14 movq 0x50(%rbp), %rax leaq -0x1(%rax), %rcx cmpq %rcx, %r14 jb 0x14792 testq %rax, %rax je 0x14865 leaq 0xa6a9(%rip), %rdi # 0x1ee99 movl $0xf, %esi movl $0x1, %edx movq %rbx, %rcx callq 0x22c0 movq 0x48(%rbp), %rax movq 0x50(%rbp), %rcx movq -0x8(%rax,%rcx,8), %rsi movq %r15, %rdi jmp 0x14843 leaq 0xc662(%rip), %rdi # 0x20e7d movl $0x12, %esi jmp 0x14858 leaq 0xa670(%rip), %rdi # 0x1ee99 movl $0xf, %esi movl $0x1, %edx movq %rbx, %rcx callq 0x22c0 movq 0x8(%rsp), %rdi movq %rbp, %rsi callq 0x10f0c testb %al, %al je 0x1488f leaq 0x9077(%rip), %rdi # 0x1d8ca movl $0x2, %esi movl $0x1, %edx movq %rbx, %rcx callq 0x22c0 leaq 0xa2db(%rip), %rdi # 0x1eb47 movl $0x6, %esi movl $0x1, %edx movq %rbx, %rcx callq 0x22c0 movl $0x7d, %edi movq %rbx, %rsi callq 0x21c0 movb $0x1, %al jmp 0x14891 xorl %eax, %eax addq $0x128, %rsp # imm = 0x128 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x54b5(%rip), %rdi # 0x19d5f leaq 0xc3e2(%rip), %rsi # 0x20c93 leaq 0xc491(%rip), %rcx # 0x20d49 movl $0x26, %edx callq 0x2180 leaq 0x7006(%rip), %rdi # 0x1b8cf leaq 0xc3c3(%rip), %rsi # 0x20c93 leaq 0xc472(%rip), %rcx # 0x20d49 movl $0x27, %edx callq 0x2180 leaq 0xc4a8(%rip), %rdi # 0x20d90 leaq 0xc3a4(%rip), %rsi # 0x20c93 leaq 0xc453(%rip), %rcx # 0x20d49 movl $0x28, %edx callq 0x2180
codegen_generate_function_def: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 128h test rdi, rdi jz loc_148A3 mov r13, rsi test rsi, rsi jz loc_148C2 mov r14, rdi mov eax, [r13+0] cmp eax, 7 jz short loc_14475 cmp eax, 1Bh jnz loc_148E1 loc_14475: mov rdi, r14 call codegen_context_get_output mov rbx, rax mov rdi, r14 call codegen_context_get_type_context mov r12, rax mov [rsp+158h+var_150], r14 mov rdi, r14 call codegen_context_get_diagnostics mov rbp, rax mov ecx, [r13+0] lea rdx, aGeneratingFunc; "Generating function definition for node"... lea r15, [rsp+158h+var_138] mov esi, 100h mov rdi, r15 xor eax, eax call _snprintf mov rdi, rbp xor esi, esi xor edx, edx mov rcx, r15 call diagnostic_debug mov eax, [r13+0] cmp eax, 1Bh jz short loc_144F6 cmp eax, 7 jnz loc_145F9 mov rax, [r13+50h] cmp dword ptr [rax], 8 jnz loc_1460A lea rcx, [rax+48h] lea rdx, [rax+60h] add rax, 50h ; 'P' jmp short loc_14502 loc_144F6: lea rdx, [r13+70h] lea rax, [r13+60h] lea rcx, [r13+50h] loc_14502: mov r15, [r13+48h] mov rdx, [rdx] mov [rsp+158h+var_148], rdx mov rcx, [rcx] mov [rsp+158h+var_140], rcx mov r14, [rax] test r15, r15 jz short loc_14551 cmp dword ptr [r15], 6 jnz short loc_14551 mov rcx, [r15+48h] lea rdx, aFunctionNameS; "Function name: %s" lea rdi, [rsp+158h+var_138] mov esi, 100h xor eax, eax call _snprintf mov rdi, rbp xor esi, esi xor edx, edx lea rcx, [rsp+158h+var_138] call diagnostic_debug loc_14551: mov rdi, r12 mov rsi, r13 call type_inference_get_type mov r12, rax test rax, rax jz short loc_14590 cmp dword ptr [r12], 9 jnz short loc_14590 mov rdi, [r12+18h] test rdi, rdi jz short loc_14590 call codegen_type_to_c_type lea rsi, aS_1; "%s " mov rdi, rbx mov rdx, rax xor eax, eax call _fprintf jmp short loc_145A9 loc_14590: lea rdi, aInt_0; "int " mov esi, 4 mov edx, 1 mov rcx, rbx call _fwrite loc_145A9: test r15, r15 jz short loc_145DE cmp dword ptr [r15], 6 jnz short loc_145DE mov rbp, [r15+48h] mov rdi, rbp call _strdup test rax, rax jz short loc_14644 mov r13, rax loc_145C8: movzx ecx, byte ptr [rax] cmp ecx, 2Dh ; '-' jz short loc_145D6 test ecx, ecx jnz short loc_145D9 jmp short loc_14626 loc_145D6: mov byte ptr [rax], 5Fh ; '_' loc_145D9: inc rax jmp short loc_145C8 loc_145DE: mov rdx, [r13+8] mov rcx, [r13+10h] lea rsi, aFuncZuZu_0; "_func_%zu_%zu(" mov rdi, rbx xor eax, eax call _fprintf jmp short loc_14658 loc_145F9: mov esi, [r13+8] mov edx, [r13+10h] lea rcx, aInvalidNodeTyp; "Invalid node type for function definiti"... jmp short loc_14619 loc_1460A: mov esi, [r13+8] mov edx, [r13+10h] lea rcx, aExpectedLambda; "Expected lambda in function definition" loc_14619: mov rdi, rbp call diagnostic_error jmp loc_1488F loc_14626: lea rsi, aS_5; "%s(" mov rdi, rbx mov rdx, r13 xor eax, eax call _fprintf mov rdi, r13 call _free jmp short loc_14658 loc_14644: lea rsi, aS_5; "%s(" mov rdi, rbx mov rdx, rbp xor eax, eax call _fprintf loc_14658: test r14, r14 jz loc_146F9 lea r13, aInt_0; "int " xor ebp, ebp loc_1466A: test rbp, rbp jz short loc_14688 mov esi, 2 mov edx, 1 lea rdi, aCharBuffer64Sn+3Ah; ", " mov rcx, rbx call _fwrite loc_14688: mov rax, [rsp+158h+var_140] mov r15, [rax+rbp*8] test r12, r12 jz short loc_146CD cmp dword ptr [r12], 9 jnz short loc_146CD cmp rbp, [r12+8] jnb short loc_146CD mov rax, [r12+10h] mov rdi, [rax+rbp*8] test rdi, rdi jz short loc_146CD call codegen_type_to_c_type mov rdi, rbx lea rsi, aS_1; "%s " mov rdx, rax xor eax, eax call _fprintf jmp short loc_146E2 loc_146CD: mov esi, 4 mov edx, 1 mov rdi, r13 mov rcx, rbx call _fwrite loc_146E2: mov rdi, [r15] mov rsi, rbx call _fputs inc rbp cmp r14, rbp jnz loc_1466A loc_146F9: lea rdi, asc_20E71; ") " mov esi, 2 mov edx, 1 mov rcx, rbx call _fwrite lea rdi, aStaticVoidAttr_0+38h; "{\n" mov esi, 2 mov edx, 1 mov rcx, rbx call _fwrite lea rdi, aTailCallOptimi_1; " // Tail call optimization loop\n" mov esi, 23h ; '#' mov edx, 1 mov rcx, rbx call _fwrite lea rdi, aWhile1; " while (1) {\n" mov esi, 10h mov edx, 1 mov rcx, rbx call _fwrite mov rbp, [rsp+158h+var_148] test rbp, rbp jz loc_14814 cmp dword ptr [rbp+0], 0Ah jnz loc_14822 cmp qword ptr [rbp+50h], 1 mov r15, [rsp+158h+var_150] jz short loc_147E9 xor r14d, r14d lea r12, asc_20E74; " " lea r13, aFprintfStderrF+3Ah; ";\n" loc_14792: mov esi, 8 mov edx, 1 mov rdi, r12 mov rcx, rbx call _fwrite mov rax, [rbp+48h] mov rsi, [rax+r14*8] mov rdi, r15 call codegen_generate_expression test al, al jz loc_1488F mov esi, 2 mov edx, 1 mov rdi, r13 mov rcx, rbx call _fwrite inc r14 mov rax, [rbp+50h] lea rcx, [rax-1] cmp r14, rcx jb short loc_14792 test rax, rax jz short loc_14865 loc_147E9: lea rdi, aReturn; " return " mov esi, 0Fh mov edx, 1 mov rcx, rbx call _fwrite mov rax, [rbp+48h] mov rcx, [rbp+50h] mov rsi, [rax+rcx*8-8] mov rdi, r15 jmp short loc_14843 loc_14814: lea rdi, aReturn0; " return 0;\n" mov esi, 12h jmp short loc_14858 loc_14822: lea rdi, aReturn; " return " mov esi, 0Fh mov edx, 1 mov rcx, rbx call _fwrite mov rdi, [rsp+158h+var_150] mov rsi, rbp loc_14843: call codegen_generate_expression test al, al jz short loc_1488F lea rdi, aFprintfStderrF+3Ah; ";\n" mov esi, 2 loc_14858: mov edx, 1 mov rcx, rbx call _fwrite loc_14865: lea rdi, asc_1EB43+4; " }\n" mov esi, 6 mov edx, 1 mov rcx, rbx call _fwrite mov edi, 7Dh ; '}' mov rsi, rbx call _fputc mov al, 1 jmp short loc_14891 loc_1488F: xor eax, eax loc_14891: add rsp, 128h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_148A3: lea rdi, aContextNull; "context != NULL" lea rsi, aWorkspaceLlm4b_21; "/workspace/llm4binary/github/2025_star3"... lea rcx, aBoolCodegenGen_28; "_Bool codegen_generate_function_def(Cod"... mov edx, 26h ; '&' call ___assert_fail loc_148C2: lea rdi, aNodeNull; "node != NULL" lea rsi, aWorkspaceLlm4b_21; "/workspace/llm4binary/github/2025_star3"... lea rcx, aBoolCodegenGen_28; "_Bool codegen_generate_function_def(Cod"... mov edx, 27h ; ''' call ___assert_fail loc_148E1: lea rdi, aNodeTypeAstDef_0; "node->type == AST_DEFINE || node->type "... lea rsi, aWorkspaceLlm4b_21; "/workspace/llm4binary/github/2025_star3"... lea rcx, aBoolCodegenGen_28; "_Bool codegen_generate_function_def(Cod"... mov edx, 28h ; '(' call ___assert_fail
char codegen_generate_function_def(long long a1, long long a2) { long long output; // rbx _QWORD *type_context; // r12 long long *diagnostics; // rbp long long v6; // r8 long long v7; // r9 long long v8; // r8 long long v9; // r9 long long *v10; // rax long long *v11; // rcx long long *v12; // rdx long long *v13; // rax long long v14; // r15 long long v15; // r14 long long v16; // r8 long long v17; // r9 long long type; // rax long long v19; // rdx long long v20; // r12 long long v21; // rdi const char *v22; // rax const char *v23; // rbp char *v24; // rax const char *v25; // r13 unsigned int v26; // esi unsigned int v27; // edx const char *v28; // rcx const char *v29; // rsi long long v30; // rdx unsigned long long i; // rbp _QWORD *v32; // r15 long long v33; // rdi const char *v34; // rax unsigned long long v35; // r14 long long v36; // rax _DWORD *v37; // rsi long long v38; // rdi char *v39; // rdi long long v40; // rsi long long v43; // [rsp+10h] [rbp-148h] long long v44; // [rsp+18h] [rbp-140h] _BYTE v45[312]; // [rsp+20h] [rbp-138h] BYREF if ( !a1 ) __assert_fail( "context != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/definitions.c", 38LL, "_Bool codegen_generate_function_def(CodegenContext *, const AstNode *)"); if ( !a2 ) __assert_fail( "node != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/definitions.c", 39LL, "_Bool codegen_generate_function_def(CodegenContext *, const AstNode *)"); if ( *(_DWORD *)a2 != 7 && *(_DWORD *)a2 != 27 ) __assert_fail( "node->type == AST_DEFINE || node->type == AST_FUNCTION_DEF", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/definitions.c", 40LL, "_Bool codegen_generate_function_def(CodegenContext *, const AstNode *)"); output = codegen_context_get_output(a1); type_context = (_QWORD *)codegen_context_get_type_context(a1); diagnostics = (long long *)codegen_context_get_diagnostics(a1); snprintf(v45, 256LL, "Generating function definition for node type %d", *(_DWORD *)a2); diagnostic_debug((long long)diagnostics, 0, 0, (long long)v45, v6, v7); if ( *(_DWORD *)a2 == 27 ) { v12 = (long long *)(a2 + 112); v13 = (long long *)(a2 + 96); v11 = (long long *)(a2 + 80); goto LABEL_10; } if ( *(_DWORD *)a2 != 7 ) { v26 = *(_DWORD *)(a2 + 8); v27 = *(_DWORD *)(a2 + 16); v28 = "Invalid node type for function definition"; LABEL_30: diagnostic_error(diagnostics, v26, v27, (long long)v28, v8, v9); return 0; } v10 = *(long long **)(a2 + 80); if ( *(_DWORD *)v10 != 8 ) { v26 = *(_DWORD *)(a2 + 8); v27 = *(_DWORD *)(a2 + 16); v28 = "Expected lambda in function definition"; goto LABEL_30; } v11 = v10 + 9; v12 = v10 + 12; v13 = v10 + 10; LABEL_10: v14 = *(_QWORD *)(a2 + 72); v43 = *v12; v44 = *v11; v15 = *v13; if ( v14 && *(_DWORD *)v14 == 6 ) { snprintf(v45, 256LL, "Function name: %s", *(const char **)(v14 + 72)); diagnostic_debug((long long)diagnostics, 0, 0, (long long)v45, v16, v17); } type = type_inference_get_type(type_context, a2); v20 = type; if ( type && *(_DWORD *)type == 9 && (v21 = *(_QWORD *)(type + 24)) != 0 ) { v22 = (const char *)codegen_type_to_c_type(v21, a2, v19); fprintf(output, "%s ", v22); } else { fwrite("int ", 4LL, 1LL, output); } if ( v14 && *(_DWORD *)v14 == 6 ) { v23 = *(const char **)(v14 + 72); v24 = (char *)strdup(v23); if ( v24 ) { v25 = v24; while ( 1 ) { if ( *v24 == 45 ) { *v24 = 95; } else if ( !*v24 ) { v29 = "%s("; fprintf(output, "%s(", v25); free(v25); goto LABEL_32; } ++v24; } } v29 = "%s("; fprintf(output, "%s(", v23); } else { v29 = "_func_%zu_%zu("; fprintf(output, "_func_%zu_%zu(", *(_QWORD *)(a2 + 8), *(_QWORD *)(a2 + 16)); } LABEL_32: if ( v15 ) { for ( i = 0LL; i != v15; ++i ) { if ( i ) { v29 = (_BYTE *)(&dword_0 + 2); fwrite(", ", 2LL, 1LL, output); } v32 = *(_QWORD **)(v44 + 8 * i); if ( v20 && *(_DWORD *)v20 == 9 && i < *(_QWORD *)(v20 + 8) && (v33 = *(_QWORD *)(*(_QWORD *)(v20 + 16) + 8 * i)) != 0 ) { v34 = (const char *)codegen_type_to_c_type(v33, v29, v30); fprintf(output, "%s ", v34); } else { fwrite("int ", 4LL, 1LL, output); } v29 = (const char *)output; fputs(*v32, output); } } fwrite(") ", 2LL, 1LL, output); fwrite("{\n", 2LL, 1LL, output); fwrite(" // Tail call optimization loop\n", 35LL, 1LL, output); fwrite(" while (1) {\n", 16LL, 1LL, output); if ( !v43 ) { v39 = " return 0;\n"; v40 = 18LL; goto LABEL_55; } if ( *(_DWORD *)v43 == 10 ) { if ( *(_QWORD *)(v43 + 80) != 1LL ) { v35 = 0LL; while ( 1 ) { fwrite(" ", 8LL, 1LL, output); if ( !(unsigned __int8)codegen_generate_expression(a1, *(_DWORD **)(*(_QWORD *)(v43 + 72) + 8 * v35)) ) return 0; fwrite(";\n", 2LL, 1LL, output); ++v35; v36 = *(_QWORD *)(v43 + 80); if ( v35 >= v36 - 1 ) { if ( !v36 ) goto LABEL_56; break; } } } fwrite(" return ", 15LL, 1LL, output); v37 = *(_DWORD **)(*(_QWORD *)(v43 + 72) + 8LL * *(_QWORD *)(v43 + 80) - 8); v38 = a1; } else { fwrite(" return ", 15LL, 1LL, output); v38 = a1; v37 = (_DWORD *)v43; } if ( !(unsigned __int8)codegen_generate_expression(v38, v37) ) return 0; v39 = ";\n"; v40 = 2LL; LABEL_55: fwrite(v39, v40, 1LL, output); LABEL_56: fwrite(" }\n", 6LL, 1LL, output); fputc(125LL, output); return 1; }
codegen_generate_function_def: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x128 TEST RDI,RDI JZ 0x001148a3 MOV R13,RSI TEST RSI,RSI JZ 0x001148c2 MOV R14,RDI MOV EAX,dword ptr [R13] CMP EAX,0x7 JZ 0x00114475 CMP EAX,0x1b JNZ 0x001148e1 LAB_00114475: MOV RDI,R14 CALL 0x0010b394 MOV RBX,RAX MOV RDI,R14 CALL 0x0010b36a MOV R12,RAX MOV qword ptr [RSP + 0x8],R14 MOV RDI,R14 CALL 0x0010b340 MOV RBP,RAX MOV ECX,dword ptr [R13] LEA RDX,[0x120dcb] LEA R15,[RSP + 0x20] MOV ESI,0x100 MOV RDI,R15 XOR EAX,EAX CALL 0x00102160 MOV RDI,RBP XOR ESI,ESI XOR EDX,EDX MOV RCX,R15 CALL 0x00103f78 MOV EAX,dword ptr [R13] CMP EAX,0x1b JZ 0x001144f6 CMP EAX,0x7 JNZ 0x001145f9 MOV RAX,qword ptr [R13 + 0x50] CMP dword ptr [RAX],0x8 JNZ 0x0011460a LEA RCX,[RAX + 0x48] LEA RDX,[RAX + 0x60] ADD RAX,0x50 JMP 0x00114502 LAB_001144f6: LEA RDX,[R13 + 0x70] LEA RAX,[R13 + 0x60] LEA RCX,[R13 + 0x50] LAB_00114502: MOV R15,qword ptr [R13 + 0x48] MOV RDX,qword ptr [RDX] MOV qword ptr [RSP + 0x10],RDX MOV RCX,qword ptr [RCX] MOV qword ptr [RSP + 0x18],RCX MOV R14,qword ptr [RAX] TEST R15,R15 JZ 0x00114551 CMP dword ptr [R15],0x6 JNZ 0x00114551 MOV RCX,qword ptr [R15 + 0x48] LEA RDX,[0x120e4c] LEA RDI,[RSP + 0x20] MOV ESI,0x100 XOR EAX,EAX CALL 0x00102160 MOV RDI,RBP XOR ESI,ESI XOR EDX,EDX LEA RCX,[RSP + 0x20] CALL 0x00103f78 LAB_00114551: MOV RDI,R12 MOV RSI,R13 CALL 0x00108c5e MOV R12,RAX TEST RAX,RAX JZ 0x00114590 CMP dword ptr [R12],0x9 JNZ 0x00114590 MOV RDI,qword ptr [R12 + 0x18] TEST RDI,RDI JZ 0x00114590 CALL 0x00114cec LEA RSI,[0x11d76b] MOV RDI,RBX MOV RDX,RAX XOR EAX,EAX CALL 0x00102200 JMP 0x001145a9 LAB_00114590: LEA RDI,[0x120ad5] MOV ESI,0x4 MOV EDX,0x1 MOV RCX,RBX CALL 0x001022c0 LAB_001145a9: TEST R15,R15 JZ 0x001145de CMP dword ptr [R15],0x6 JNZ 0x001145de MOV RBP,qword ptr [R15 + 0x48] MOV RDI,RBP CALL 0x001022d0 TEST RAX,RAX JZ 0x00114644 MOV R13,RAX LAB_001145c8: MOVZX ECX,byte ptr [RAX] CMP ECX,0x2d JZ 0x001145d6 TEST ECX,ECX JNZ 0x001145d9 JMP 0x00114626 LAB_001145d6: MOV byte ptr [RAX],0x5f LAB_001145d9: INC RAX JMP 0x001145c8 LAB_001145de: MOV RDX,qword ptr [R13 + 0x8] MOV RCX,qword ptr [R13 + 0x10] LEA RSI,[0x120e62] MOV RDI,RBX XOR EAX,EAX CALL 0x00102200 JMP 0x00114658 LAB_001145f9: MOV ESI,dword ptr [R13 + 0x8] MOV EDX,dword ptr [R13 + 0x10] LEA RCX,[0x120e22] JMP 0x00114619 LAB_0011460a: MOV ESI,dword ptr [R13 + 0x8] MOV EDX,dword ptr [R13 + 0x10] LEA RCX,[0x120dfb] LAB_00114619: MOV RDI,RBP CALL 0x00103e0b JMP 0x0011488f LAB_00114626: LEA RSI,[0x120e5e] MOV RDI,RBX MOV RDX,R13 XOR EAX,EAX CALL 0x00102200 MOV RDI,R13 CALL 0x00102030 JMP 0x00114658 LAB_00114644: LEA RSI,[0x120e5e] MOV RDI,RBX MOV RDX,RBP XOR EAX,EAX CALL 0x00102200 LAB_00114658: TEST R14,R14 JZ 0x001146f9 LEA R13,[0x120ad5] XOR EBP,EBP LAB_0011466a: TEST RBP,RBP JZ 0x00114688 MOV ESI,0x2 MOV EDX,0x1 LEA RDI,[0x12041c] MOV RCX,RBX CALL 0x001022c0 LAB_00114688: MOV RAX,qword ptr [RSP + 0x18] MOV R15,qword ptr [RAX + RBP*0x8] TEST R12,R12 JZ 0x001146cd CMP dword ptr [R12],0x9 JNZ 0x001146cd CMP RBP,qword ptr [R12 + 0x8] JNC 0x001146cd MOV RAX,qword ptr [R12 + 0x10] MOV RDI,qword ptr [RAX + RBP*0x8] TEST RDI,RDI JZ 0x001146cd CALL 0x00114cec MOV RDI,RBX LEA RSI,[0x11d76b] MOV RDX,RAX XOR EAX,EAX CALL 0x00102200 JMP 0x001146e2 LAB_001146cd: MOV ESI,0x4 MOV EDX,0x1 MOV RDI,R13 MOV RCX,RBX CALL 0x001022c0 LAB_001146e2: MOV RDI,qword ptr [R15] MOV RSI,RBX CALL 0x00102190 INC RBP CMP R14,RBP JNZ 0x0011466a LAB_001146f9: LEA RDI,[0x120e71] MOV ESI,0x2 MOV EDX,0x1 MOV RCX,RBX CALL 0x001022c0 LEA RDI,[0x11da45] MOV ESI,0x2 MOV EDX,0x1 MOV RCX,RBX CALL 0x001022c0 LEA RDI,[0x11e971] MOV ESI,0x23 MOV EDX,0x1 MOV RCX,RBX CALL 0x001022c0 LEA RDI,[0x11e995] MOV ESI,0x10 MOV EDX,0x1 MOV RCX,RBX CALL 0x001022c0 MOV RBP,qword ptr [RSP + 0x10] TEST RBP,RBP JZ 0x00114814 CMP dword ptr [RBP],0xa JNZ 0x00114822 CMP qword ptr [RBP + 0x50],0x1 MOV R15,qword ptr [RSP + 0x8] JZ 0x001147e9 XOR R14D,R14D LEA R12,[0x120e74] LEA R13,[0x11d8ca] LAB_00114792: MOV ESI,0x8 MOV EDX,0x1 MOV RDI,R12 MOV RCX,RBX CALL 0x001022c0 MOV RAX,qword ptr [RBP + 0x48] MOV RSI,qword ptr [RAX + R14*0x8] MOV RDI,R15 CALL 0x00110f0c TEST AL,AL JZ 0x0011488f MOV ESI,0x2 MOV EDX,0x1 MOV RDI,R13 MOV RCX,RBX CALL 0x001022c0 INC R14 MOV RAX,qword ptr [RBP + 0x50] LEA RCX,[RAX + -0x1] CMP R14,RCX JC 0x00114792 TEST RAX,RAX JZ 0x00114865 LAB_001147e9: LEA RDI,[0x11ee99] MOV ESI,0xf MOV EDX,0x1 MOV RCX,RBX CALL 0x001022c0 MOV RAX,qword ptr [RBP + 0x48] MOV RCX,qword ptr [RBP + 0x50] MOV RSI,qword ptr [RAX + RCX*0x8 + -0x8] MOV RDI,R15 JMP 0x00114843 LAB_00114814: LEA RDI,[0x120e7d] MOV ESI,0x12 JMP 0x00114858 LAB_00114822: LEA RDI,[0x11ee99] MOV ESI,0xf MOV EDX,0x1 MOV RCX,RBX CALL 0x001022c0 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,RBP LAB_00114843: CALL 0x00110f0c TEST AL,AL JZ 0x0011488f LEA RDI,[0x11d8ca] MOV ESI,0x2 LAB_00114858: MOV EDX,0x1 MOV RCX,RBX CALL 0x001022c0 LAB_00114865: LEA RDI,[0x11eb47] MOV ESI,0x6 MOV EDX,0x1 MOV RCX,RBX CALL 0x001022c0 MOV EDI,0x7d MOV RSI,RBX CALL 0x001021c0 MOV AL,0x1 JMP 0x00114891 LAB_0011488f: XOR EAX,EAX LAB_00114891: ADD RSP,0x128 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001148a3: LEA RDI,[0x119d5f] LEA RSI,[0x120c93] LEA RCX,[0x120d49] MOV EDX,0x26 CALL 0x00102180 LAB_001148c2: LEA RDI,[0x11b8cf] LEA RSI,[0x120c93] LEA RCX,[0x120d49] MOV EDX,0x27 CALL 0x00102180 LAB_001148e1: LEA RDI,[0x120d90] LEA RSI,[0x120c93] LEA RCX,[0x120d49] MOV EDX,0x28 CALL 0x00102180
int8 codegen_generate_function_def(long param_1,uint *param_2) { uint uVar1; uint uVar2; int *piVar3; long lVar4; int8 *puVar5; char cVar6; int iVar7; FILE *__s; int8 uVar8; int8 uVar9; ulong *puVar10; int *piVar11; char *__ptr; char *pcVar12; int4 extraout_var; uint *puVar13; uint *puVar14; ulong uVar15; int *piVar16; size_t __size; char *pcVar17; ulong uVar18; char local_138 [264]; if (param_1 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("context != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/definitions.c" ,0x26,"_Bool codegen_generate_function_def(CodegenContext *, const AstNode *)"); } if (param_2 == (uint *)0x0) { /* WARNING: Subroutine does not return */ __assert_fail("node != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/definitions.c" ,0x27,"_Bool codegen_generate_function_def(CodegenContext *, const AstNode *)"); } if ((*param_2 != 7) && (*param_2 != 0x1b)) { /* WARNING: Subroutine does not return */ __assert_fail("node->type == AST_DEFINE || node->type == AST_FUNCTION_DEF", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/definitions.c" ,0x28,"_Bool codegen_generate_function_def(CodegenContext *, const AstNode *)"); } __s = (FILE *)codegen_context_get_output(param_1); uVar8 = codegen_context_get_type_context(param_1); uVar9 = codegen_context_get_diagnostics(param_1); snprintf(local_138,0x100,"Generating function definition for node type %d",(ulong)*param_2); diagnostic_debug(uVar9,0,0,local_138); if (*param_2 == 0x1b) { puVar14 = param_2 + 0x1c; puVar10 = (ulong *)(param_2 + 0x18); puVar13 = param_2 + 0x14; } else { if (*param_2 != 7) { uVar1 = param_2[2]; uVar2 = param_2[4]; pcVar17 = "Invalid node type for function definition"; LAB_00114619: diagnostic_error(uVar9,uVar1,uVar2,pcVar17); return 0; } piVar3 = *(int **)(param_2 + 0x14); if (*piVar3 != 8) { uVar1 = param_2[2]; uVar2 = param_2[4]; pcVar17 = "Expected lambda in function definition"; goto LAB_00114619; } puVar13 = (uint *)(piVar3 + 0x12); puVar14 = (uint *)(piVar3 + 0x18); puVar10 = (ulong *)(piVar3 + 0x14); } piVar3 = *(int **)(param_2 + 0x12); piVar16 = *(int **)puVar14; lVar4 = *(long *)puVar13; uVar18 = *puVar10; if ((piVar3 != (int *)0x0) && (*piVar3 == 6)) { snprintf(local_138,0x100,"Function name: %s",*(int8 *)(piVar3 + 0x12)); diagnostic_debug(uVar9,0,0,local_138); } piVar11 = (int *)type_inference_get_type(uVar8,param_2); if (((piVar11 == (int *)0x0) || (*piVar11 != 9)) || (*(long *)(piVar11 + 6) == 0)) { fwrite(&DAT_00120ad5,4,1,__s); } else { uVar8 = codegen_type_to_c_type(); fprintf(__s,"%s ",uVar8); } if ((piVar3 == (int *)0x0) || (*piVar3 != 6)) { fprintf(__s,"_func_%zu_%zu(",*(int8 *)(param_2 + 2),*(int8 *)(param_2 + 4)); } else { pcVar17 = *(char **)(piVar3 + 0x12); __ptr = strdup(pcVar17); pcVar12 = __ptr; if (__ptr != (char *)0x0) { do { if (*pcVar12 == '-') { *pcVar12 = '_'; } else if (*pcVar12 == '\0') goto LAB_00114626; pcVar12 = pcVar12 + 1; } while( true ); } fprintf(__s,"%s(",pcVar17); } LAB_00114658: if (uVar18 != 0) { uVar15 = 0; do { if (uVar15 != 0) { fwrite(", ",2,1,__s); } puVar5 = *(int8 **)(lVar4 + uVar15 * 8); if (((piVar11 == (int *)0x0) || (*piVar11 != 9)) || ((*(ulong *)(piVar11 + 2) <= uVar15 || (*(long *)(*(long *)(piVar11 + 4) + uVar15 * 8) == 0)))) { fwrite(&DAT_00120ad5,4,1,__s); } else { uVar8 = codegen_type_to_c_type(); fprintf(__s,"%s ",uVar8); } fputs((char *)*puVar5,__s); uVar15 = uVar15 + 1; } while (uVar18 != uVar15); } fwrite(&DAT_00120e71,2,1,__s); fwrite("{\n",2,1,__s); fwrite(" // Tail call optimization loop\n",0x23,1,__s); fwrite(" while (1) {\n",0x10,1,__s); if (piVar16 == (int *)0x0) { pcVar17 = " return 0;\n"; __size = 0x12; } else { if (*piVar16 == 10) { if (*(long *)(piVar16 + 0x14) != 1) { uVar18 = 0; do { fwrite(&DAT_00120e74,8,1,__s); cVar6 = codegen_generate_expression (param_1,*(int8 *)(*(long *)(piVar16 + 0x12) + uVar18 * 8)); if (cVar6 == '\0') { return 0; } fwrite(";\n",2,1,__s); uVar18 = uVar18 + 1; } while (uVar18 < *(long *)(piVar16 + 0x14) - 1U); if (*(long *)(piVar16 + 0x14) == 0) goto LAB_00114865; } fwrite(" return ",0xf,1,__s); piVar16 = *(int **)(*(long *)(piVar16 + 0x12) + -8 + *(long *)(piVar16 + 0x14) * 8); } else { fwrite(" return ",0xf,1,__s); } cVar6 = codegen_generate_expression(param_1,piVar16); if (cVar6 == '\0') { return 0; } pcVar17 = ";\n"; __size = 2; } fwrite(pcVar17,__size,1,__s); LAB_00114865: fwrite(&DAT_0011eb47,6,1,__s); iVar7 = fputc(0x7d,__s); return CONCAT71((int7)(CONCAT44(extraout_var,iVar7) >> 8),1); LAB_00114626: fprintf(__s,"%s(",__ptr); free(__ptr); goto LAB_00114658; }
19,202
my_numchars_mb
eloqsql/strings/ctype-mb.c
size_t my_numchars_mb(CHARSET_INFO *cs __attribute__((unused)), const char *pos, const char *end) { register size_t count= 0; while (pos < end) { uint mb_len; pos+= (mb_len= my_ismbchar(cs,pos,end)) ? mb_len : 1; count++; } return count; }
O3
c
my_numchars_mb: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax cmpq %rdx, %rsi jae 0xd331d movq %rdx, %rbx movq %rsi, %r15 movq %rdi, %r12 xorl %r14d, %r14d movl $0x1, %r13d movq 0xb8(%r12), %rax movq %r12, %rdi movq %r15, %rsi movq %rbx, %rdx callq *0xc0(%rax) cmpl $0x2, %eax cmovbl %r13d, %eax cmovll %r13d, %eax addq %rax, %r15 incq %r14 cmpq %rbx, %r15 jb 0xd32ee jmp 0xd3320 xorl %r14d, %r14d movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_numchars_mb: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax cmp rsi, rdx jnb short loc_D331D mov rbx, rdx mov r15, rsi mov r12, rdi xor r14d, r14d mov r13d, 1 loc_D32EE: mov rax, [r12+0B8h] mov rdi, r12 mov rsi, r15 mov rdx, rbx call qword ptr [rax+0C0h] cmp eax, 2 cmovb eax, r13d cmovl eax, r13d add r15, rax inc r14 cmp r15, rbx jb short loc_D32EE jmp short loc_D3320 loc_D331D: xor r14d, r14d loc_D3320: mov rax, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_numchars_mb(long long a1, unsigned long long a2, unsigned long long a3) { unsigned long long v4; // r15 long long v5; // r14 long long v6; // rax bool v7; // cc if ( a2 >= a3 ) return 0LL; v4 = a2; v5 = 0LL; do { v6 = (*(long long ( **)(long long, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 192LL))( a1, v4, a3); v7 = (int)v6 < 2; if ( (unsigned int)v6 < 2 ) v6 = 1LL; if ( v7 ) v6 = 1LL; v4 += v6; ++v5; } while ( v4 < a3 ); return v5; }
my_numchars_mb: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX CMP RSI,RDX JNC 0x001d331d MOV RBX,RDX MOV R15,RSI MOV R12,RDI XOR R14D,R14D MOV R13D,0x1 LAB_001d32ee: MOV RAX,qword ptr [R12 + 0xb8] MOV RDI,R12 MOV RSI,R15 MOV RDX,RBX CALL qword ptr [RAX + 0xc0] CMP EAX,0x2 CMOVC EAX,R13D CMOVL EAX,R13D ADD R15,RAX INC R14 CMP R15,RBX JC 0x001d32ee JMP 0x001d3320 LAB_001d331d: XOR R14D,R14D LAB_001d3320: MOV RAX,R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_numchars_mb(long param_1,ulong param_2,ulong param_3) { uint uVar1; ulong uVar2; long lVar3; if (param_2 < param_3) { lVar3 = 0; do { uVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3); uVar2 = (ulong)uVar1; if (uVar1 < 2) { uVar2 = 1; } if ((int)uVar1 < 2) { uVar2 = 1; } param_2 = param_2 + uVar2; lVar3 = lVar3 + 1; } while (param_2 < param_3); } else { lVar3 = 0; } return lVar3; }
19,203
flux::lexer::Tokenizer::scanNumber()
kvthweatt[P]FluxLang/src/lexer/tokenizer.cpp
Token Tokenizer::scanNumber() { common::SourcePosition start = getPosition(); size_t start_pos = position_; bool is_float = false; bool has_exponent = false; // Check for hexadecimal format with 0x prefix if (current() == '0' && peek() == 'x') { advance(); // Consume '0' advance(); // Consume 'x' // Consume hex digits bool has_digits = false; while (!isAtEnd() && (isDigit(current()) || (current() >= 'A' && current() <= 'F'))) { // Capitalized for 0x notation has_digits = true; advance(); } if (!has_digits) { error(common::ErrorCode::INVALID_NUMBER_FORMAT, "Expected hexadecimal digits after '0x'"); return errorToken("Expected hexadecimal digits after '0x'"); } // Extract lexeme size_t length = position_ - start_pos; std::string_view lexeme = text_.substr(start_pos, length); // Create token return Token(TokenType::INTEGER_LITERAL, lexeme, start, getPosition()); } // Regular number parsing - digits first bool has_digits = false; while (!isAtEnd() && isDigit(current())) { has_digits = true; advance(); } // Check for number type suffix if (!isAtEnd()) { char suffix = current(); // Check for specific bases using suffix if (suffix == 'o') { // Octal (e.g., 77o) advance(); // Consume 'o' // No extra checks needed - we validate during conversion later } else if (suffix == 'd') { // Decimal explicit (e.g., 99d) advance(); // Consume 'd' // No extra checks needed - already decimal } else if (suffix == 'b') { // Binary (e.g., 1010b) advance(); // Consume 'b' // We'll validate the format during conversion } else if (suffix == 'h') { // Hex (e.g., 15h) advance(); // Consume 'h' // We'll validate the format during conversion } // Continue with regular number parsing if not a base suffix else if (suffix == '.') { if (isDigit(peek())) { is_float = true; advance(); // Consume '.' // Consume fractional part while (!isAtEnd() && isDigit(current())) { advance(); } } } } // Extract lexeme size_t length = position_ - start_pos; std::string_view lexeme = text_.substr(start_pos, length); // Basic validation - make sure we have at least one digit if (!has_digits) { error(common::ErrorCode::INVALID_NUMBER_FORMAT, "Invalid number format"); return errorToken("Invalid number format"); } // Create token TokenType type = is_float ? TokenType::FLOAT_LITERAL : TokenType::INTEGER_LITERAL; return Token(type, lexeme, start, getPosition()); }
O1
cpp
flux::lexer::Tokenizer::scanNumber(): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x20, %rsp movq %rsi, %r14 movq %rdi, %rbx movups 0x28(%rsi), %xmm0 movups %xmm0, 0x10(%rsp) movq 0x10(%rsi), %rax movq 0x20(%rsi), %r15 cmpq %rax, %r15 jae 0xa82b movq 0x18(%r14), %rcx cmpb $0x30, (%rcx,%r15) jne 0xa82b leaq 0x1(%r15), %rcx cmpq %rax, %rcx jae 0xa82b movq 0x18(%r14), %rax cmpb $0x78, (%rax,%rcx) jne 0xa82b movq %r14, %rdi callq 0xb8a8 movq %r14, %rdi callq 0xb8a8 movq 0x10(%r14), %rcx movq 0x20(%r14), %rdx xorl %eax, %eax cmpq %rcx, %rdx jae 0xa94a movq 0x18(%r14), %rsi movb (%rsi,%rdx), %sil addb $-0x30, %sil cmpb $0xa, %sil jb 0xa817 cmpq %rcx, %rdx jae 0xa94a movq 0x18(%r14), %rsi cmpb $0x41, (%rsi,%rdx) jl 0xa94a cmpq %rcx, %rdx jae 0xa817 movq 0x18(%r14), %rsi cmpb $0x46, (%rsi,%rdx) jg 0xa94a movq %r14, %rdi callq 0xb8a8 movq 0x10(%r14), %rcx movq 0x20(%r14), %rdx movb $0x1, %al jmp 0xa7d2 movq 0x10(%r14), %rcx movq 0x20(%r14), %rax movl $0x1, %ebp cmpq %rcx, %rax setb %dl jae 0xa8b0 movq 0x18(%r14), %rsi movb (%rsi,%rax), %sil addb $-0x30, %sil cmpb $0xa, %sil setb %r12b jae 0xa880 movq %r14, %rdi callq 0xb8a8 movq 0x10(%r14), %rcx movq 0x20(%r14), %rax cmpq %rcx, %rax setb %dl jae 0xa8b5 movq 0x18(%r14), %rsi movb (%rsi,%rax), %sil addb $-0x30, %sil cmpb $0x9, %sil jbe 0xa856 testb %dl, %dl je 0xa8b8 movq 0x18(%r14), %rdx movzbl (%rdx,%rax), %edx leal -0x62(%rdx), %esi cmpl $0xd, %esi ja 0xa98a movl $0x2045, %edi # imm = 0x2045 btl %esi, %edi jae 0xa98a movq %r14, %rdi callq 0xb8a8 jmp 0xa8b8 xorl %r12d, %r12d jmp 0xa8b8 movb $0x1, %r12b movq 0x10(%r14), %rcx movq %rcx, %rax subq %r15, %rax jb 0xaa1c testb %r12b, %r12b je 0xa8fa movq 0x18(%r14), %rcx addq %r15, %rcx movq 0x20(%r14), %rdx subq %r15, %rdx cmpq %rdx, %rax cmovbq %rax, %rdx movups 0x28(%r14), %xmm0 movq %rsp, %r9 movups %xmm0, (%r9) leaq 0x10(%rsp), %r8 movq %rbx, %rdi movl %ebp, %esi jmp 0xa935 leaq 0x20afe(%rip), %r15 # 0x2b3ff movl $0x15, %edx movq %r14, %rdi movl $0x7, %esi movq %r15, %rcx callq 0xb928 movups 0x28(%r14), %xmm0 movq %rsp, %r8 movups %xmm0, (%r8) movl $0x15, %edx movq %rbx, %rdi movl $0x69, %esi movq %r15, %rcx movq %r8, %r9 callq 0xc06c movq %rbx, %rax addq $0x20, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq testb $0x1, %al je 0xa9ea movq %rcx, %rax subq %r15, %rax jb 0xaa1c subq %r15, %rdx cmpq %rdx, %rax cmovbq %rax, %rdx addq 0x18(%r14), %r15 movups 0x28(%r14), %xmm0 movq %rsp, %r9 movups %xmm0, (%r9) leaq 0x10(%rsp), %r8 movq %rbx, %rdi movl $0x1, %esi movq %r15, %rcx jmp 0xa935 cmpl $0x2e, %edx jne 0xa8b8 incq %rax cmpq %rcx, %rax jae 0xa8b8 movq 0x18(%r14), %rcx movb (%rcx,%rax), %al addb $-0x30, %al cmpb $0x9, %al ja 0xa8b8 movq %r14, %rdi callq 0xb8a8 movq 0x20(%r14), %rax movl $0x2, %ebp cmpq 0x10(%r14), %rax jae 0xa8b8 movq 0x18(%r14), %rcx movb (%rcx,%rax), %al addb $-0x30, %al cmpb $0x9, %al ja 0xa8b8 movq %r14, %rdi callq 0xb8a8 movq 0x20(%r14), %rax jmp 0xa9c1 leaq 0x210a5(%rip), %r15 # 0x2ba96 movl $0x26, %edx movq %r14, %rdi movl $0x7, %esi movq %r15, %rcx callq 0xb928 movups 0x28(%r14), %xmm0 movq %rsp, %r8 movups %xmm0, (%r8) movl $0x26, %edx jmp 0xa927 leaq 0x20d33(%rip), %rdi # 0x2b756 leaq 0x20d12(%rip), %rsi # 0x2b73c movq %r15, %rdx xorl %eax, %eax callq 0x6380
_ZN4flux5lexer9Tokenizer10scanNumberEv: push rbp push r15 push r14 push r12 push rbx sub rsp, 20h mov r14, rsi mov rbx, rdi movups xmm0, xmmword ptr [rsi+28h] movups [rsp+48h+var_38], xmm0 mov rax, [rsi+10h] mov r15, [rsi+20h] cmp r15, rax jnb loc_A82B mov rcx, [r14+18h] cmp byte ptr [rcx+r15], 30h ; '0' jnz loc_A82B lea rcx, [r15+1] cmp rcx, rax jnb short loc_A82B mov rax, [r14+18h] cmp byte ptr [rax+rcx], 78h ; 'x' jnz short loc_A82B mov rdi, r14; this call _ZN4flux5lexer9Tokenizer7advanceEv; flux::lexer::Tokenizer::advance(void) mov rdi, r14; this call _ZN4flux5lexer9Tokenizer7advanceEv; flux::lexer::Tokenizer::advance(void) mov rcx, [r14+10h] mov rdx, [r14+20h] xor eax, eax loc_A7D2: cmp rdx, rcx jnb loc_A94A mov rsi, [r14+18h] mov sil, [rsi+rdx] add sil, 0D0h cmp sil, 0Ah jb short loc_A817 cmp rdx, rcx jnb loc_A94A mov rsi, [r14+18h] cmp byte ptr [rsi+rdx], 41h ; 'A' jl loc_A94A cmp rdx, rcx jnb short loc_A817 mov rsi, [r14+18h] cmp byte ptr [rsi+rdx], 46h ; 'F' jg loc_A94A loc_A817: mov rdi, r14; this call _ZN4flux5lexer9Tokenizer7advanceEv; flux::lexer::Tokenizer::advance(void) mov rcx, [r14+10h] mov rdx, [r14+20h] mov al, 1 jmp short loc_A7D2 loc_A82B: mov rcx, [r14+10h] mov rax, [r14+20h] mov ebp, 1 cmp rax, rcx setb dl jnb short loc_A8B0 mov rsi, [r14+18h] mov sil, [rsi+rax] add sil, 0D0h cmp sil, 0Ah setb r12b jnb short loc_A880 loc_A856: mov rdi, r14; this call _ZN4flux5lexer9Tokenizer7advanceEv; flux::lexer::Tokenizer::advance(void) mov rcx, [r14+10h] mov rax, [r14+20h] cmp rax, rcx setb dl jnb short loc_A8B5 mov rsi, [r14+18h] mov sil, [rsi+rax] add sil, 0D0h cmp sil, 9 jbe short loc_A856 loc_A880: test dl, dl jz short loc_A8B8 mov rdx, [r14+18h] movzx edx, byte ptr [rdx+rax] lea esi, [rdx-62h] cmp esi, 0Dh ja loc_A98A mov edi, 2045h bt edi, esi jnb loc_A98A mov rdi, r14; this call _ZN4flux5lexer9Tokenizer7advanceEv; flux::lexer::Tokenizer::advance(void) jmp short loc_A8B8 loc_A8B0: xor r12d, r12d jmp short loc_A8B8 loc_A8B5: mov r12b, 1 loc_A8B8: mov rcx, [r14+10h] mov rax, rcx sub rax, r15 jb loc_AA1C test r12b, r12b jz short loc_A8FA mov rcx, [r14+18h] add rcx, r15 mov rdx, [r14+20h] sub rdx, r15 cmp rax, rdx cmovb rdx, rax movups xmm0, xmmword ptr [r14+28h] mov r9, rsp movups xmmword ptr [r9], xmm0 lea r8, [rsp+48h+var_38] mov rdi, rbx mov esi, ebp jmp short loc_A935 loc_A8FA: lea r15, aInvalidNumberF; "Invalid number format" mov edx, 15h mov rdi, r14 mov esi, 7 mov rcx, r15 call _ZN4flux5lexer9Tokenizer5errorENS_6common9ErrorCodeESt17basic_string_viewIcSt11char_traitsIcEE; flux::lexer::Tokenizer::error(flux::common::ErrorCode,std::string_view) movups xmm0, xmmword ptr [r14+28h] mov r8, rsp movups xmmword ptr [r8], xmm0 mov edx, 15h loc_A927: mov rdi, rbx mov esi, 69h ; 'i' mov rcx, r15 mov r9, r8 loc_A935: call _ZN4flux5lexer5TokenC2ENS0_9TokenTypeESt17basic_string_viewIcSt11char_traitsIcEERKNS_6common14SourcePositionESA_; flux::lexer::Token::Token(flux::lexer::TokenType,std::string_view,flux::common::SourcePosition const&,flux::common::SourcePosition const&) mov rax, rbx add rsp, 20h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_A94A: test al, 1 jz loc_A9EA mov rax, rcx sub rax, r15 jb loc_AA1C sub rdx, r15 cmp rax, rdx cmovb rdx, rax add r15, [r14+18h] movups xmm0, xmmword ptr [r14+28h] mov r9, rsp movups xmmword ptr [r9], xmm0 lea r8, [rsp+48h+var_38] mov rdi, rbx mov esi, 1 mov rcx, r15 jmp short loc_A935 loc_A98A: cmp edx, 2Eh ; '.' jnz loc_A8B8 inc rax cmp rax, rcx jnb loc_A8B8 mov rcx, [r14+18h] mov al, [rcx+rax] add al, 0D0h cmp al, 9 ja loc_A8B8 mov rdi, r14; this call _ZN4flux5lexer9Tokenizer7advanceEv; flux::lexer::Tokenizer::advance(void) mov rax, [r14+20h] mov ebp, 2 loc_A9C1: cmp rax, [r14+10h] jnb loc_A8B8 mov rcx, [r14+18h] mov al, [rcx+rax] add al, 0D0h cmp al, 9 ja loc_A8B8 mov rdi, r14; this call _ZN4flux5lexer9Tokenizer7advanceEv; flux::lexer::Tokenizer::advance(void) mov rax, [r14+20h] jmp short loc_A9C1 loc_A9EA: lea r15, aExpectedHexade; "Expected hexadecimal digits after '0x'" mov edx, 26h ; '&' mov rdi, r14 mov esi, 7 mov rcx, r15 call _ZN4flux5lexer9Tokenizer5errorENS_6common9ErrorCodeESt17basic_string_viewIcSt11char_traitsIcEE; flux::lexer::Tokenizer::error(flux::common::ErrorCode,std::string_view) movups xmm0, xmmword ptr [r14+28h] mov r8, rsp movups xmmword ptr [r8], xmm0 mov edx, 26h ; '&' jmp loc_A927 loc_AA1C: lea rdi, aSPosWhichIsZuS; "%s: __pos (which is %zu) > __size (whic"... lea rsi, aBasicStringVie; "basic_string_view::substr" mov rdx, r15 xor eax, eax call __ZSt24__throw_out_of_range_fmtPKcz; std::__throw_out_of_range_fmt(char const*,...)
flux::lexer::Tokenizer * flux::lexer::Tokenizer::scanNumber(flux::lexer::Tokenizer *this, long long a2) { flux::lexer::Tokenizer *v3; // rbx unsigned long long v4; // rax unsigned long long v5; // r15 unsigned long long v6; // rcx unsigned long long v7; // rdx char v8; // al unsigned long long v9; // rcx unsigned long long v10; // rax unsigned int v11; // ebp bool v12; // dl unsigned __int8 v13; // si bool v14; // r12 int v15; // edx int v16; // edi unsigned long long v17; // rax const char *v18; // rcx unsigned long long v19; // rdx __int128 *v20; // r8 long long v21; // rsi const char *v22; // r15 const char *v24; // r15 unsigned long long v25; // rax unsigned long long v26; // rax __int128 v27; // [rsp+0h] [rbp-48h] BYREF _OWORD v28[3]; // [rsp+10h] [rbp-38h] BYREF v3 = this; v28[0] = *(_OWORD *)(a2 + 40); v4 = *(_QWORD *)(a2 + 16); v5 = *(_QWORD *)(a2 + 32); if ( v5 < v4 && *(_BYTE *)(*(_QWORD *)(a2 + 24) + v5) == 48 && v5 + 1 < v4 && *(_BYTE *)(*(_QWORD *)(a2 + 24) + v5 + 1) == 120 ) { flux::lexer::Tokenizer::advance((flux::lexer::Tokenizer *)a2); flux::lexer::Tokenizer::advance((flux::lexer::Tokenizer *)a2); v6 = *(_QWORD *)(a2 + 16); v7 = *(_QWORD *)(a2 + 32); v8 = 0; while ( v7 < v6 && ((unsigned __int8)(*(_BYTE *)(*(_QWORD *)(a2 + 24) + v7) - 48) < 0xAu || v7 < v6 && *(char *)(*(_QWORD *)(a2 + 24) + v7) >= 65 && (v7 >= v6 || *(char *)(*(_QWORD *)(a2 + 24) + v7) <= 70)) ) { flux::lexer::Tokenizer::advance((flux::lexer::Tokenizer *)a2); v6 = *(_QWORD *)(a2 + 16); v7 = *(_QWORD *)(a2 + 32); v8 = 1; } if ( (v8 & 1) != 0 ) { if ( v6 >= v5 ) { v19 = v7 - v5; if ( v6 - v5 < v19 ) v19 = v6 - v5; v24 = (const char *)(*(_QWORD *)(a2 + 24) + v5); v27 = *(_OWORD *)(a2 + 40); v20 = v28; v21 = 1LL; v18 = v24; goto LABEL_30; } LABEL_44: std::__throw_out_of_range_fmt( "%s: __pos (which is %zu) > __size (which is %zu)", "basic_string_view::substr", v5, v6); } v22 = "Expected hexadecimal digits after '0x'"; flux::lexer::Tokenizer::error(a2, 7LL, 38LL, "Expected hexadecimal digits after '0x'"); v20 = &v27; v27 = *(_OWORD *)(a2 + 40); v19 = 38LL; LABEL_29: this = v3; v21 = 105LL; v18 = v22; goto LABEL_30; } v9 = *(_QWORD *)(a2 + 16); v10 = *(_QWORD *)(a2 + 32); v11 = 1; v12 = v10 < v9; if ( v10 >= v9 ) { v14 = 0; } else { v13 = *(_BYTE *)(*(_QWORD *)(a2 + 24) + v10) - 48; v14 = v13 < 0xAu; if ( v13 >= 0xAu ) { LABEL_17: if ( v12 ) { v15 = *(unsigned __int8 *)(*(_QWORD *)(a2 + 24) + v10); if ( (unsigned int)(v15 - 98) <= 0xD && (v16 = 8261, _bittest(&v16, v15 - 98)) ) { flux::lexer::Tokenizer::advance((flux::lexer::Tokenizer *)a2); } else if ( v15 == 46 ) { v25 = v10 + 1; if ( v25 < v9 && (unsigned __int8)(*(_BYTE *)(*(_QWORD *)(a2 + 24) + v25) - 48) <= 9u ) { flux::lexer::Tokenizer::advance((flux::lexer::Tokenizer *)a2); v26 = *(_QWORD *)(a2 + 32); v11 = 2; while ( v26 < *(_QWORD *)(a2 + 16) && (unsigned __int8)(*(_BYTE *)(*(_QWORD *)(a2 + 24) + v26) - 48) <= 9u ) { flux::lexer::Tokenizer::advance((flux::lexer::Tokenizer *)a2); v26 = *(_QWORD *)(a2 + 32); } } } } } else { while ( 1 ) { flux::lexer::Tokenizer::advance((flux::lexer::Tokenizer *)a2); v9 = *(_QWORD *)(a2 + 16); v10 = *(_QWORD *)(a2 + 32); v12 = v10 < v9; if ( v10 >= v9 ) break; if ( (unsigned __int8)(*(_BYTE *)(*(_QWORD *)(a2 + 24) + v10) - 48) > 9u ) goto LABEL_17; } v14 = 1; } } v6 = *(_QWORD *)(a2 + 16); v17 = v6 - v5; if ( v6 < v5 ) goto LABEL_44; if ( !v14 ) { v22 = "Invalid number format"; flux::lexer::Tokenizer::error(a2, 7LL, 21LL, "Invalid number format"); v20 = &v27; v27 = *(_OWORD *)(a2 + 40); v19 = 21LL; goto LABEL_29; } v18 = (const char *)(v5 + *(_QWORD *)(a2 + 24)); v19 = *(_QWORD *)(a2 + 32) - v5; if ( v17 < v19 ) v19 = v17; v27 = *(_OWORD *)(a2 + 40); v20 = v28; this = v3; v21 = v11; LABEL_30: flux::lexer::Token::Token(this, v21, v19, v18, v20, &v27); return v3; }
scanNumber: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x20 MOV R14,RSI MOV RBX,RDI MOVUPS XMM0,xmmword ptr [RSI + 0x28] MOVUPS xmmword ptr [RSP + 0x10],XMM0 MOV RAX,qword ptr [RSI + 0x10] MOV R15,qword ptr [RSI + 0x20] CMP R15,RAX JNC 0x0010a82b MOV RCX,qword ptr [R14 + 0x18] CMP byte ptr [RCX + R15*0x1],0x30 JNZ 0x0010a82b LEA RCX,[R15 + 0x1] CMP RCX,RAX JNC 0x0010a82b MOV RAX,qword ptr [R14 + 0x18] CMP byte ptr [RAX + RCX*0x1],0x78 JNZ 0x0010a82b MOV RDI,R14 CALL 0x0010b8a8 MOV RDI,R14 CALL 0x0010b8a8 MOV RCX,qword ptr [R14 + 0x10] MOV RDX,qword ptr [R14 + 0x20] XOR EAX,EAX LAB_0010a7d2: CMP RDX,RCX JNC 0x0010a94a MOV RSI,qword ptr [R14 + 0x18] MOV SIL,byte ptr [RSI + RDX*0x1] ADD SIL,0xd0 CMP SIL,0xa JC 0x0010a817 CMP RDX,RCX JNC 0x0010a94a MOV RSI,qword ptr [R14 + 0x18] CMP byte ptr [RSI + RDX*0x1],0x41 JL 0x0010a94a CMP RDX,RCX JNC 0x0010a817 MOV RSI,qword ptr [R14 + 0x18] CMP byte ptr [RSI + RDX*0x1],0x46 JG 0x0010a94a LAB_0010a817: MOV RDI,R14 CALL 0x0010b8a8 MOV RCX,qword ptr [R14 + 0x10] MOV RDX,qword ptr [R14 + 0x20] MOV AL,0x1 JMP 0x0010a7d2 LAB_0010a82b: MOV RCX,qword ptr [R14 + 0x10] MOV RAX,qword ptr [R14 + 0x20] MOV EBP,0x1 CMP RAX,RCX SETC DL JNC 0x0010a8b0 MOV RSI,qword ptr [R14 + 0x18] MOV SIL,byte ptr [RSI + RAX*0x1] ADD SIL,0xd0 CMP SIL,0xa SETC R12B JNC 0x0010a880 LAB_0010a856: MOV RDI,R14 CALL 0x0010b8a8 MOV RCX,qword ptr [R14 + 0x10] MOV RAX,qword ptr [R14 + 0x20] CMP RAX,RCX SETC DL JNC 0x0010a8b5 MOV RSI,qword ptr [R14 + 0x18] MOV SIL,byte ptr [RSI + RAX*0x1] ADD SIL,0xd0 CMP SIL,0x9 JBE 0x0010a856 LAB_0010a880: TEST DL,DL JZ 0x0010a8b8 MOV RDX,qword ptr [R14 + 0x18] MOVZX EDX,byte ptr [RDX + RAX*0x1] LEA ESI,[RDX + -0x62] CMP ESI,0xd JA 0x0010a98a MOV EDI,0x2045 BT EDI,ESI JNC 0x0010a98a MOV RDI,R14 CALL 0x0010b8a8 JMP 0x0010a8b8 LAB_0010a8b0: XOR R12D,R12D JMP 0x0010a8b8 LAB_0010a8b5: MOV R12B,0x1 LAB_0010a8b8: MOV RCX,qword ptr [R14 + 0x10] MOV RAX,RCX SUB RAX,R15 JC 0x0010aa1c TEST R12B,R12B JZ 0x0010a8fa MOV RCX,qword ptr [R14 + 0x18] ADD RCX,R15 MOV RDX,qword ptr [R14 + 0x20] SUB RDX,R15 CMP RAX,RDX CMOVC RDX,RAX MOVUPS XMM0,xmmword ptr [R14 + 0x28] MOV R9,RSP MOVUPS xmmword ptr [R9],XMM0 LEA R8,[RSP + 0x10] MOV RDI,RBX MOV ESI,EBP JMP 0x0010a935 LAB_0010a8fa: LEA R15,[0x12b3ff] MOV EDX,0x15 MOV RDI,R14 MOV ESI,0x7 MOV RCX,R15 CALL 0x0010b928 MOVUPS XMM0,xmmword ptr [R14 + 0x28] MOV R8,RSP MOVUPS xmmword ptr [R8],XMM0 MOV EDX,0x15 LAB_0010a927: MOV RDI,RBX MOV ESI,0x69 MOV RCX,R15 MOV R9,R8 LAB_0010a935: CALL 0x0010c06c MOV RAX,RBX ADD RSP,0x20 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0010a94a: TEST AL,0x1 JZ 0x0010a9ea MOV RAX,RCX SUB RAX,R15 JC 0x0010aa1c SUB RDX,R15 CMP RAX,RDX CMOVC RDX,RAX ADD R15,qword ptr [R14 + 0x18] MOVUPS XMM0,xmmword ptr [R14 + 0x28] MOV R9,RSP MOVUPS xmmword ptr [R9],XMM0 LEA R8,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x1 MOV RCX,R15 JMP 0x0010a935 LAB_0010a98a: CMP EDX,0x2e JNZ 0x0010a8b8 INC RAX CMP RAX,RCX JNC 0x0010a8b8 MOV RCX,qword ptr [R14 + 0x18] MOV AL,byte ptr [RCX + RAX*0x1] ADD AL,0xd0 CMP AL,0x9 JA 0x0010a8b8 MOV RDI,R14 CALL 0x0010b8a8 MOV RAX,qword ptr [R14 + 0x20] MOV EBP,0x2 LAB_0010a9c1: CMP RAX,qword ptr [R14 + 0x10] JNC 0x0010a8b8 MOV RCX,qword ptr [R14 + 0x18] MOV AL,byte ptr [RCX + RAX*0x1] ADD AL,0xd0 CMP AL,0x9 JA 0x0010a8b8 MOV RDI,R14 CALL 0x0010b8a8 MOV RAX,qword ptr [R14 + 0x20] JMP 0x0010a9c1 LAB_0010a9ea: LEA R15,[0x12ba96] MOV EDX,0x26 MOV RDI,R14 MOV ESI,0x7 MOV RCX,R15 CALL 0x0010b928 MOVUPS XMM0,xmmword ptr [R14 + 0x28] MOV R8,RSP MOVUPS xmmword ptr [R8],XMM0 MOV EDX,0x26 JMP 0x0010a927 LAB_0010aa1c: LEA RDI,[0x12b756] LEA RSI,[0x12b73c] MOV RDX,R15 XOR EAX,EAX CALL 0x00106380
/* flux::lexer::Tokenizer::scanNumber() */ void flux::lexer::Tokenizer::scanNumber(void) { ulong uVar1; bool bVar2; ulong uVar3; ulong uVar4; uint uVar5; Tokenizer *in_RSI; bool bVar6; bool bVar7; uVar1 = *(ulong *)(in_RSI + 0x20); if ((((uVar1 < *(ulong *)(in_RSI + 0x10)) && (*(char *)(*(long *)(in_RSI + 0x18) + uVar1) == '0')) && (uVar1 + 1 < *(ulong *)(in_RSI + 0x10))) && (*(char *)(*(long *)(in_RSI + 0x18) + uVar1 + 1) == 'x')) { advance(in_RSI); advance(in_RSI); uVar3 = *(ulong *)(in_RSI + 0x10); bVar6 = false; uVar4 = *(ulong *)(in_RSI + 0x20); while ((uVar4 < uVar3 && (((byte)(*(char *)(*(long *)(in_RSI + 0x18) + uVar4) - 0x30U) < 10 || (((uVar4 < uVar3 && ('@' < *(char *)(*(long *)(in_RSI + 0x18) + uVar4))) && ((uVar3 <= uVar4 || (*(char *)(*(long *)(in_RSI + 0x18) + uVar4) < 'G'))))))))) { advance(in_RSI); uVar3 = *(ulong *)(in_RSI + 0x10); bVar6 = true; uVar4 = *(ulong *)(in_RSI + 0x20); } if (bVar6) { if (uVar3 < uVar1) goto LAB_0010aa1c; } else { error(); } } else { uVar3 = *(ulong *)(in_RSI + 0x10); uVar4 = *(ulong *)(in_RSI + 0x20); bVar6 = uVar4 < uVar3; if (bVar6) { bVar7 = (byte)(*(char *)(*(long *)(in_RSI + 0x18) + uVar4) - 0x30U) < 10; bVar2 = bVar7; while (bVar2) { advance(in_RSI); uVar3 = *(ulong *)(in_RSI + 0x10); uVar4 = *(ulong *)(in_RSI + 0x20); bVar6 = uVar4 < uVar3; if (!bVar6) { bVar7 = true; goto LAB_0010a8b8; } bVar2 = (byte)(*(char *)(*(long *)(in_RSI + 0x18) + uVar4) - 0x30U) < 10; } if (bVar6) { uVar5 = *(byte *)(*(long *)(in_RSI + 0x18) + uVar4) - 0x62; if ((uVar5 < 0xe) && ((0x2045U >> (uVar5 & 0x1f) & 1) != 0)) { advance(in_RSI); } else if ((*(byte *)(*(long *)(in_RSI + 0x18) + uVar4) == 0x2e) && ((uVar4 + 1 < uVar3 && ((byte)(*(char *)(*(long *)(in_RSI + 0x18) + uVar4 + 1) - 0x30U) < 10)))) { advance(in_RSI); uVar3 = *(ulong *)(in_RSI + 0x20); while ((uVar3 < *(ulong *)(in_RSI + 0x10) && ((byte)(*(char *)(*(long *)(in_RSI + 0x18) + uVar3) - 0x30U) < 10))) { advance(in_RSI); uVar3 = *(ulong *)(in_RSI + 0x20); } } } } else { bVar7 = false; } LAB_0010a8b8: if (*(ulong *)(in_RSI + 0x10) < uVar1) { LAB_0010aa1c: /* WARNING: Subroutine does not return */ std::__throw_out_of_range_fmt ("%s: __pos (which is %zu) > __size (which is %zu)","basic_string_view::substr", uVar1); } if (!bVar7) { error(); } } Token::Token(); return; }
19,204
ft_trig_pseudo_polarize
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-ft-math.c
static void ft_trig_pseudo_polarize(PVG_FT_Vector* vec) { PVG_FT_Angle theta; PVG_FT_Int i; PVG_FT_Fixed x, y, xtemp, b; const PVG_FT_Fixed* arctanptr; x = vec->x; y = vec->y; /* Get the vector into [-PI/4,PI/4] sector */ if (y > x) { if (y > -x) { theta = PVG_FT_ANGLE_PI2; xtemp = y; y = -x; x = xtemp; } else { theta = y > 0 ? PVG_FT_ANGLE_PI : -PVG_FT_ANGLE_PI; x = -x; y = -y; } } else { if (y < -x) { theta = -PVG_FT_ANGLE_PI2; xtemp = -y; y = x; x = xtemp; } else { theta = 0; } } arctanptr = ft_trig_arctan_table; /* Pseudorotations, with right shifts */ for (i = 1, b = 1; i < PVG_FT_TRIG_MAX_ITERS; b <<= 1, i++) { PVG_FT_Fixed v1 = ((y + b) >> i); PVG_FT_Fixed v2 = ((x + b) >> i); if (y > 0) { xtemp = x + v1; y = y - v2; x = xtemp; theta += *arctanptr++; } else { xtemp = x - v1; y = y + v2; x = xtemp; theta -= *arctanptr++; } } /* round theta */ if (theta >= 0) theta = PVG_FT_PAD_ROUND(theta, 32); else theta = -PVG_FT_PAD_ROUND(-theta, 32); vec->x = x; vec->y = theta; }
O0
c
ft_trig_pseudo_polarize: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax cmpq -0x20(%rbp), %rax jle 0x8b05e movq -0x28(%rbp), %rax xorl %ecx, %ecx subq -0x20(%rbp), %rcx cmpq %rcx, %rax jle 0x8b02c movq $0x5a0000, -0x10(%rbp) # imm = 0x5A0000 movq -0x28(%rbp), %rax movq %rax, -0x30(%rbp) xorl %eax, %eax subq -0x20(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x30(%rbp), %rax movq %rax, -0x20(%rbp) jmp 0x8b05c movq -0x28(%rbp), %rdx movq $-0xb40000, %rax # imm = 0xFF4C0000 movl $0xb40000, %ecx # imm = 0xB40000 cmpq $0x0, %rdx cmovgq %rcx, %rax movq %rax, -0x10(%rbp) xorl %eax, %eax subq -0x20(%rbp), %rax movq %rax, -0x20(%rbp) xorl %eax, %eax subq -0x28(%rbp), %rax movq %rax, -0x28(%rbp) jmp 0x8b09b movq -0x28(%rbp), %rax xorl %ecx, %ecx subq -0x20(%rbp), %rcx cmpq %rcx, %rax jge 0x8b091 movq $-0x5a0000, -0x10(%rbp) # imm = 0xFFA60000 xorl %eax, %eax subq -0x28(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x30(%rbp), %rax movq %rax, -0x20(%rbp) jmp 0x8b099 movq $0x0, -0x10(%rbp) jmp 0x8b09b leaq 0x637e(%rip), %rax # 0x91420 movq %rax, -0x40(%rbp) movl $0x1, -0x14(%rbp) movq $0x1, -0x38(%rbp) cmpl $0x17, -0x14(%rbp) jge 0x8b17e movq -0x28(%rbp), %rax addq -0x38(%rbp), %rax movl -0x14(%rbp), %ecx sarq %cl, %rax movq %rax, -0x48(%rbp) movq -0x20(%rbp), %rax addq -0x38(%rbp), %rax movl -0x14(%rbp), %ecx sarq %cl, %rax movq %rax, -0x50(%rbp) cmpq $0x0, -0x28(%rbp) jle 0x8b126 movq -0x20(%rbp), %rax addq -0x48(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax subq -0x50(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x30(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x40(%rbp), %rax movq %rax, %rcx addq $0x8, %rcx movq %rcx, -0x40(%rbp) movq (%rax), %rax addq -0x10(%rbp), %rax movq %rax, -0x10(%rbp) jmp 0x8b163 movq -0x20(%rbp), %rax subq -0x48(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax addq -0x50(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x30(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x40(%rbp), %rax movq %rax, %rcx addq $0x8, %rcx movq %rcx, -0x40(%rbp) movq (%rax), %rcx movq -0x10(%rbp), %rax subq %rcx, %rax movq %rax, -0x10(%rbp) jmp 0x8b165 movq -0x38(%rbp), %rax shlq %rax movq %rax, -0x38(%rbp) movl -0x14(%rbp), %eax addl $0x1, %eax movl %eax, -0x14(%rbp) jmp 0x8b0b5 cmpq $0x0, -0x10(%rbp) jl 0x8b197 movq -0x10(%rbp), %rax addq $0x10, %rax andq $-0x20, %rax movq %rax, -0x10(%rbp) jmp 0x8b1b0 xorl %eax, %eax movl %eax, %ecx subq -0x10(%rbp), %rcx addq $0x10, %rcx andq $-0x20, %rcx xorl %eax, %eax subq %rcx, %rax movq %rax, -0x10(%rbp) movq -0x20(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x8(%rax) popq %rbp retq nopl (%rax)
ft_trig_pseudo_polarize: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_20], rax mov rax, [rbp+var_8] mov rax, [rax+8] mov [rbp+var_28], rax mov rax, [rbp+var_28] cmp rax, [rbp+var_20] jle short loc_8B05E mov rax, [rbp+var_28] xor ecx, ecx sub rcx, [rbp+var_20] cmp rax, rcx jle short loc_8B02C mov [rbp+var_10], 5A0000h mov rax, [rbp+var_28] mov [rbp+var_30], rax xor eax, eax sub rax, [rbp+var_20] mov [rbp+var_28], rax mov rax, [rbp+var_30] mov [rbp+var_20], rax jmp short loc_8B05C loc_8B02C: mov rdx, [rbp+var_28] mov rax, 0FFFFFFFFFF4C0000h mov ecx, 0B40000h cmp rdx, 0 cmovg rax, rcx mov [rbp+var_10], rax xor eax, eax sub rax, [rbp+var_20] mov [rbp+var_20], rax xor eax, eax sub rax, [rbp+var_28] mov [rbp+var_28], rax loc_8B05C: jmp short loc_8B09B loc_8B05E: mov rax, [rbp+var_28] xor ecx, ecx sub rcx, [rbp+var_20] cmp rax, rcx jge short loc_8B091 mov [rbp+var_10], 0FFFFFFFFFFA60000h xor eax, eax sub rax, [rbp+var_28] mov [rbp+var_30], rax mov rax, [rbp+var_20] mov [rbp+var_28], rax mov rax, [rbp+var_30] mov [rbp+var_20], rax jmp short loc_8B099 loc_8B091: mov [rbp+var_10], 0 loc_8B099: jmp short $+2 loc_8B09B: lea rax, ft_trig_arctan_table mov [rbp+var_40], rax mov [rbp+var_14], 1 mov [rbp+var_38], 1 loc_8B0B5: cmp [rbp+var_14], 17h jge loc_8B17E mov rax, [rbp+var_28] add rax, [rbp+var_38] mov ecx, [rbp+var_14] sar rax, cl mov [rbp+var_48], rax mov rax, [rbp+var_20] add rax, [rbp+var_38] mov ecx, [rbp+var_14] sar rax, cl mov [rbp+var_50], rax cmp [rbp+var_28], 0 jle short loc_8B126 mov rax, [rbp+var_20] add rax, [rbp+var_48] mov [rbp+var_30], rax mov rax, [rbp+var_28] sub rax, [rbp+var_50] mov [rbp+var_28], rax mov rax, [rbp+var_30] mov [rbp+var_20], rax mov rax, [rbp+var_40] mov rcx, rax add rcx, 8 mov [rbp+var_40], rcx mov rax, [rax] add rax, [rbp+var_10] mov [rbp+var_10], rax jmp short loc_8B163 loc_8B126: mov rax, [rbp+var_20] sub rax, [rbp+var_48] mov [rbp+var_30], rax mov rax, [rbp+var_28] add rax, [rbp+var_50] mov [rbp+var_28], rax mov rax, [rbp+var_30] mov [rbp+var_20], rax mov rax, [rbp+var_40] mov rcx, rax add rcx, 8 mov [rbp+var_40], rcx mov rcx, [rax] mov rax, [rbp+var_10] sub rax, rcx mov [rbp+var_10], rax loc_8B163: jmp short $+2 loc_8B165: mov rax, [rbp+var_38] shl rax, 1 mov [rbp+var_38], rax mov eax, [rbp+var_14] add eax, 1 mov [rbp+var_14], eax jmp loc_8B0B5 loc_8B17E: cmp [rbp+var_10], 0 jl short loc_8B197 mov rax, [rbp+var_10] add rax, 10h and rax, 0FFFFFFFFFFFFFFE0h mov [rbp+var_10], rax jmp short loc_8B1B0 loc_8B197: xor eax, eax mov ecx, eax sub rcx, [rbp+var_10] add rcx, 10h and rcx, 0FFFFFFFFFFFFFFE0h xor eax, eax sub rax, rcx mov [rbp+var_10], rax loc_8B1B0: mov rcx, [rbp+var_20] mov rax, [rbp+var_8] mov [rax], rcx mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov [rax+8], rcx pop rbp retn
long long * ft_trig_pseudo_polarize(long long *a1) { long long v1; // rax _QWORD *v2; // rax long long v3; // rax _QWORD *v4; // rax long long *result; // rax long long v6; // [rsp+0h] [rbp-50h] long long v7; // [rsp+8h] [rbp-48h] _QWORD *v8; // [rsp+10h] [rbp-40h] long long v9; // [rsp+18h] [rbp-38h] long long v10; // [rsp+20h] [rbp-30h] long long v11; // [rsp+28h] [rbp-28h] long long v12; // [rsp+30h] [rbp-20h] int v13; // [rsp+3Ch] [rbp-14h] long long v14; // [rsp+40h] [rbp-10h] unsigned long long v15; // [rsp+40h] [rbp-10h] v12 = *a1; v11 = a1[1]; if ( v11 <= *a1 ) { if ( v11 >= -v12 ) { v14 = 0LL; } else { v14 = -5898240LL; v10 = -v11; v11 = *a1; v12 = v10; } } else if ( v11 <= -v12 ) { v1 = -11796480LL; if ( v11 > 0 ) v1 = 11796480LL; v14 = v1; v12 = -v12; v11 = -v11; } else { v14 = 5898240LL; v11 = -v12; v12 = a1[1]; } v8 = &ft_trig_arctan_table; v13 = 1; v9 = 1LL; while ( v13 < 23 ) { v7 = (v9 + v11) >> v13; v6 = (v9 + v12) >> v13; if ( v11 <= 0 ) { v11 += v6; v12 -= v7; v4 = v8++; v3 = v14 - *v4; } else { v11 -= v6; v12 += v7; v2 = v8++; v3 = v14 + *v2; } v14 = v3; v9 *= 2LL; ++v13; } if ( v14 < 0 ) v15 = -(long long)((16 - v14) & 0xFFFFFFFFFFFFFFE0LL); else v15 = (v14 + 16) & 0xFFFFFFFFFFFFFFE0LL; *a1 = v12; result = a1; a1[1] = v15; return result; }
ft_trig_pseudo_polarize: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x20] JLE 0x0018b05e MOV RAX,qword ptr [RBP + -0x28] XOR ECX,ECX SUB RCX,qword ptr [RBP + -0x20] CMP RAX,RCX JLE 0x0018b02c MOV qword ptr [RBP + -0x10],0x5a0000 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x30],RAX XOR EAX,EAX SUB RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x20],RAX JMP 0x0018b05c LAB_0018b02c: MOV RDX,qword ptr [RBP + -0x28] MOV RAX,-0xb40000 MOV ECX,0xb40000 CMP RDX,0x0 CMOVG RAX,RCX MOV qword ptr [RBP + -0x10],RAX XOR EAX,EAX SUB RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x20],RAX XOR EAX,EAX SUB RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x28],RAX LAB_0018b05c: JMP 0x0018b09b LAB_0018b05e: MOV RAX,qword ptr [RBP + -0x28] XOR ECX,ECX SUB RCX,qword ptr [RBP + -0x20] CMP RAX,RCX JGE 0x0018b091 MOV qword ptr [RBP + -0x10],-0x5a0000 XOR EAX,EAX SUB RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x20],RAX JMP 0x0018b099 LAB_0018b091: MOV qword ptr [RBP + -0x10],0x0 LAB_0018b099: JMP 0x0018b09b LAB_0018b09b: LEA RAX,[0x191420] MOV qword ptr [RBP + -0x40],RAX MOV dword ptr [RBP + -0x14],0x1 MOV qword ptr [RBP + -0x38],0x1 LAB_0018b0b5: CMP dword ptr [RBP + -0x14],0x17 JGE 0x0018b17e MOV RAX,qword ptr [RBP + -0x28] ADD RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RBP + -0x14] SAR RAX,CL MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RBP + -0x14] SAR RAX,CL MOV qword ptr [RBP + -0x50],RAX CMP qword ptr [RBP + -0x28],0x0 JLE 0x0018b126 MOV RAX,qword ptr [RBP + -0x20] ADD RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x28] SUB RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x40] MOV RCX,RAX ADD RCX,0x8 MOV qword ptr [RBP + -0x40],RCX MOV RAX,qword ptr [RAX] ADD RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x10],RAX JMP 0x0018b163 LAB_0018b126: MOV RAX,qword ptr [RBP + -0x20] SUB RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x40] MOV RCX,RAX ADD RCX,0x8 MOV qword ptr [RBP + -0x40],RCX MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] SUB RAX,RCX MOV qword ptr [RBP + -0x10],RAX LAB_0018b163: JMP 0x0018b165 LAB_0018b165: MOV RAX,qword ptr [RBP + -0x38] SHL RAX,0x1 MOV qword ptr [RBP + -0x38],RAX MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x1 MOV dword ptr [RBP + -0x14],EAX JMP 0x0018b0b5 LAB_0018b17e: CMP qword ptr [RBP + -0x10],0x0 JL 0x0018b197 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x10 AND RAX,-0x20 MOV qword ptr [RBP + -0x10],RAX JMP 0x0018b1b0 LAB_0018b197: XOR EAX,EAX MOV ECX,EAX SUB RCX,qword ptr [RBP + -0x10] ADD RCX,0x10 AND RCX,-0x20 XOR EAX,EAX SUB RAX,RCX MOV qword ptr [RBP + -0x10],RAX LAB_0018b1b0: MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x8],RCX POP RBP RET
void ft_trig_pseudo_polarize(long *param_1) { long lVar1; long lVar2; long lVar3; long *local_48; long local_40; long local_30; long local_28; int local_1c; ulong local_18; lVar3 = *param_1; local_30 = param_1[1]; if (lVar3 < local_30) { if (-lVar3 < local_30) { local_18 = 0x5a0000; local_28 = local_30; local_30 = lVar3; } else { local_18 = -0xb40000; if (0 < local_30) { local_18 = 0xb40000; } local_28 = -lVar3; } local_30 = -local_30; } else if (local_30 < -lVar3) { local_18 = -0x5a0000; local_28 = -local_30; local_30 = lVar3; } else { local_18 = 0; local_28 = lVar3; } local_48 = &ft_trig_arctan_table; local_40 = 1; for (local_1c = 1; local_1c < 0x17; local_1c = local_1c + 1) { lVar2 = local_30 + local_40 >> ((byte)local_1c & 0x3f); lVar3 = local_28 + local_40 >> ((byte)local_1c & 0x3f); if (local_30 < 1) { lVar2 = -lVar2; lVar1 = -*local_48; } else { lVar3 = -lVar3; lVar1 = *local_48; } local_18 = lVar1 + local_18; local_28 = local_28 + lVar2; local_30 = local_30 + lVar3; local_48 = local_48 + 1; local_40 = local_40 << 1; } if ((long)local_18 < 0) { local_18 = -(0x10 - local_18 & 0xffffffffffffffe0); } else { local_18 = local_18 + 0x10 & 0xffffffffffffffe0; } *param_1 = local_28; param_1[1] = local_18; return; }
19,205
ft_trig_pseudo_polarize
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-ft-math.c
static void ft_trig_pseudo_polarize(PVG_FT_Vector* vec) { PVG_FT_Angle theta; PVG_FT_Int i; PVG_FT_Fixed x, y, xtemp, b; const PVG_FT_Fixed* arctanptr; x = vec->x; y = vec->y; /* Get the vector into [-PI/4,PI/4] sector */ if (y > x) { if (y > -x) { theta = PVG_FT_ANGLE_PI2; xtemp = y; y = -x; x = xtemp; } else { theta = y > 0 ? PVG_FT_ANGLE_PI : -PVG_FT_ANGLE_PI; x = -x; y = -y; } } else { if (y < -x) { theta = -PVG_FT_ANGLE_PI2; xtemp = -y; y = x; x = xtemp; } else { theta = 0; } } arctanptr = ft_trig_arctan_table; /* Pseudorotations, with right shifts */ for (i = 1, b = 1; i < PVG_FT_TRIG_MAX_ITERS; b <<= 1, i++) { PVG_FT_Fixed v1 = ((y + b) >> i); PVG_FT_Fixed v2 = ((x + b) >> i); if (y > 0) { xtemp = x + v1; y = y - v2; x = xtemp; theta += *arctanptr++; } else { xtemp = x - v1; y = y + v2; x = xtemp; theta -= *arctanptr++; } } /* round theta */ if (theta >= 0) theta = PVG_FT_PAD_ROUND(theta, 32); else theta = -PVG_FT_PAD_ROUND(-theta, 32); vec->x = x; vec->y = theta; }
O3
c
ft_trig_pseudo_polarize: movq (%rdi), %r8 movq 0x8(%rdi), %rcx movq %r8, %rax negq %rax cmpq %r8, %rcx jle 0x42159 movl $0x5a0000, %edx # imm = 0x5A0000 cmpq %rax, %rcx jle 0x42170 movq %rax, %rsi jmp 0x4216b cmpq %rax, %rcx jge 0x4218b negq %rcx movq $-0x5a0000, %rdx # imm = 0xFFA60000 movq %r8, %rsi movq %rcx, %rax jmp 0x42193 testq %rcx, %rcx movl $0xb40000, %esi # imm = 0xB40000 movq $-0xb40000, %rdx # imm = 0xFF4C0000 cmovgq %rsi, %rdx negq %rcx movq %rcx, %rsi jmp 0x42193 xorl %edx, %edx movq %rcx, %rsi movq %r8, %rax pushq %rbx leaq 0x6945(%rip), %r8 # 0x48ae0 movl $0x1, %ecx movl $0x1, %r9d leaq (%r9,%rsi), %r10 sarq %cl, %r10 leaq (%r9,%rax), %r11 sarq %cl, %r11 movq (%r8), %rbx testq %rsi, %rsi jle 0x421c7 addq %r10, %rax subq %r11, %rsi addq %rbx, %rdx jmp 0x421d0 subq %r10, %rax addq %r11, %rsi subq %rbx, %rdx addq $0x8, %r8 addq %r9, %r9 incq %rcx cmpq $0x17, %rcx jne 0x421a6 testq %rdx, %rdx popq %rbx js 0x421f9 addq $0x10, %rdx movabsq $0x7fffffffffffffe0, %rcx # imm = 0x7FFFFFFFFFFFFFE0 andq %rdx, %rcx jmp 0x42208 movl $0x10, %ecx subq %rdx, %rcx andq $-0x20, %rcx negq %rcx movq %rax, (%rdi) movq %rcx, 0x8(%rdi) retq
ft_trig_pseudo_polarize: mov r8, [rdi] mov rcx, [rdi+8] mov rax, r8 neg rax cmp rcx, r8 jle short loc_42159 mov edx, 5A0000h cmp rcx, rax jle short loc_42170 mov rsi, rax jmp short loc_4216B loc_42159: cmp rcx, rax jge short loc_4218B neg rcx mov rdx, 0FFFFFFFFFFA60000h mov rsi, r8 loc_4216B: mov rax, rcx jmp short loc_42193 loc_42170: test rcx, rcx mov esi, 0B40000h mov rdx, 0FFFFFFFFFF4C0000h cmovg rdx, rsi neg rcx mov rsi, rcx jmp short loc_42193 loc_4218B: xor edx, edx mov rsi, rcx mov rax, r8 loc_42193: push rbx lea r8, ft_trig_arctan_table mov ecx, 1 mov r9d, 1 loc_421A6: lea r10, [r9+rsi] sar r10, cl lea r11, [r9+rax] sar r11, cl mov rbx, [r8] test rsi, rsi jle short loc_421C7 add rax, r10 sub rsi, r11 add rdx, rbx jmp short loc_421D0 loc_421C7: sub rax, r10 add rsi, r11 sub rdx, rbx loc_421D0: add r8, 8 add r9, r9 inc rcx cmp rcx, 17h jnz short loc_421A6 test rdx, rdx pop rbx js short loc_421F9 add rdx, 10h mov rcx, 7FFFFFFFFFFFFFE0h and rcx, rdx jmp short loc_42208 loc_421F9: mov ecx, 10h sub rcx, rdx and rcx, 0FFFFFFFFFFFFFFE0h neg rcx loc_42208: mov [rdi], rax mov [rdi+8], rcx retn
long long ft_trig_pseudo_polarize(long long *a1) { long long v1; // rcx long long result; // rax long long v3; // rdx long long v4; // rsi long long *v5; // r8 long long v6; // rcx long long v7; // r9 long long v8; // r10 long long v9; // r11 long long v10; // rbx long long v11; // rcx v1 = a1[1]; result = -*a1; if ( v1 <= *a1 ) { if ( v1 >= result ) { v3 = 0LL; v4 = a1[1]; result = *a1; goto LABEL_11; } v1 = -v1; v3 = -5898240LL; v4 = *a1; goto LABEL_6; } v3 = 5898240LL; if ( v1 > result ) { v4 = -*a1; LABEL_6: result = v1; goto LABEL_11; } v3 = -11796480LL; if ( v1 > 0 ) v3 = 11796480LL; v4 = -v1; LABEL_11: v5 = (long long *)&ft_trig_arctan_table; v6 = 1LL; v7 = 1LL; do { v8 = (v7 + v4) >> v6; v9 = (v7 + result) >> v6; v10 = *v5; if ( v4 <= 0 ) { result -= v8; v4 += v9; v3 -= v10; } else { result += v8; v4 -= v9; v3 += v10; } ++v5; v7 *= 2LL; ++v6; } while ( v6 != 23 ); if ( v3 < 0 ) v11 = -(long long)((16 - v3) & 0xFFFFFFFFFFFFFFE0LL); else v11 = (v3 + 16) & 0x7FFFFFFFFFFFFFE0LL; *a1 = result; a1[1] = v11; return result; }
ft_trig_pseudo_polarize: MOV R8,qword ptr [RDI] MOV RCX,qword ptr [RDI + 0x8] MOV RAX,R8 NEG RAX CMP RCX,R8 JLE 0x00142159 MOV EDX,0x5a0000 CMP RCX,RAX JLE 0x00142170 MOV RSI,RAX JMP 0x0014216b LAB_00142159: CMP RCX,RAX JGE 0x0014218b NEG RCX MOV RDX,-0x5a0000 MOV RSI,R8 LAB_0014216b: MOV RAX,RCX JMP 0x00142193 LAB_00142170: TEST RCX,RCX MOV ESI,0xb40000 MOV RDX,-0xb40000 CMOVG RDX,RSI NEG RCX MOV RSI,RCX JMP 0x00142193 LAB_0014218b: XOR EDX,EDX MOV RSI,RCX MOV RAX,R8 LAB_00142193: PUSH RBX LEA R8,[0x148ae0] MOV ECX,0x1 MOV R9D,0x1 LAB_001421a6: LEA R10,[R9 + RSI*0x1] SAR R10,CL LEA R11,[R9 + RAX*0x1] SAR R11,CL MOV RBX,qword ptr [R8] TEST RSI,RSI JLE 0x001421c7 ADD RAX,R10 SUB RSI,R11 ADD RDX,RBX JMP 0x001421d0 LAB_001421c7: SUB RAX,R10 ADD RSI,R11 SUB RDX,RBX LAB_001421d0: ADD R8,0x8 ADD R9,R9 INC RCX CMP RCX,0x17 JNZ 0x001421a6 TEST RDX,RDX POP RBX JS 0x001421f9 ADD RDX,0x10 MOV RCX,0x7fffffffffffffe0 AND RCX,RDX JMP 0x00142208 LAB_001421f9: MOV ECX,0x10 SUB RCX,RDX AND RCX,-0x20 NEG RCX LAB_00142208: MOV qword ptr [RDI],RAX MOV qword ptr [RDI + 0x8],RCX RET
void ft_trig_pseudo_polarize(long *param_1) { long lVar1; long lVar2; long lVar3; long lVar4; ulong uVar5; long lVar6; long *plVar7; long lVar8; long lVar9; long lVar10; lVar8 = *param_1; lVar4 = param_1[1]; lVar2 = -lVar8; if (lVar8 < lVar4) { lVar6 = 0x5a0000; lVar3 = lVar4; if (lVar4 == lVar2 || SBORROW8(lVar4,lVar2) != lVar4 + lVar8 < 0) { lVar6 = -0xb40000; if (0 < lVar4) { lVar6 = 0xb40000; } lVar3 = lVar2; lVar2 = -lVar4; } } else if (SBORROW8(lVar4,lVar2) == lVar4 + lVar8 < 0) { lVar6 = 0; lVar3 = lVar8; lVar2 = lVar4; } else { lVar6 = -0x5a0000; lVar3 = -lVar4; lVar2 = lVar8; } plVar7 = &ft_trig_arctan_table; lVar4 = 1; lVar8 = 1; do { lVar9 = lVar8 + lVar2 >> ((byte)lVar4 & 0x3f); lVar10 = lVar8 + lVar3 >> ((byte)lVar4 & 0x3f); lVar1 = *plVar7; if (lVar2 < 1) { lVar9 = -lVar9; lVar1 = -lVar1; } else { lVar10 = -lVar10; } lVar2 = lVar2 + lVar10; lVar6 = lVar6 + lVar1; lVar3 = lVar3 + lVar9; plVar7 = plVar7 + 1; lVar8 = lVar8 * 2; lVar4 = lVar4 + 1; } while (lVar4 != 0x17); if (lVar6 < 0) { uVar5 = -(0x10U - lVar6 & 0xffffffffffffffe0); } else { uVar5 = lVar6 + 0x10U & 0x7fffffffffffffe0; } *param_1 = lVar3; param_1[1] = uVar5; return; }
19,206
js_malloc_rt
bluesky950520[P]quickjs/quickjs.c
void *js_malloc_rt(JSRuntime *rt, size_t size) { void *ptr; JSMallocState *s; /* Do not allocate zero bytes: behavior is platform dependent */ assert(size != 0); s = &rt->malloc_state; /* When malloc_limit is 0 (unlimited), malloc_limit - 1 will be SIZE_MAX. */ if (unlikely(s->malloc_size + size > s->malloc_limit - 1)) return NULL; ptr = rt->mf.js_malloc(s->opaque, size); if (!ptr) return NULL; s->malloc_count++; s->malloc_size += rt->mf.js_malloc_usable_size(ptr) + MALLOC_OVERHEAD; return ptr; }
O0
c
js_malloc_rt: subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq %rsi, 0x10(%rsp) movq 0x18(%rsp), %rax addq $0x28, %rax movq %rax, (%rsp) movq (%rsp), %rax movq 0x8(%rax), %rax addq 0x10(%rsp), %rax movq (%rsp), %rcx movq 0x10(%rcx), %rcx subq $0x1, %rcx cmpq %rcx, %rax seta %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x27bd6 movq $0x0, 0x20(%rsp) jmp 0x27c41 movq 0x18(%rsp), %rax movq 0x8(%rax), %rax movq (%rsp), %rcx movq 0x18(%rcx), %rdi movq 0x10(%rsp), %rsi callq *%rax movq %rax, 0x8(%rsp) cmpq $0x0, 0x8(%rsp) jne 0x27c06 movq $0x0, 0x20(%rsp) jmp 0x27c41 movq (%rsp), %rax movq (%rax), %rcx addq $0x1, %rcx movq %rcx, (%rax) movq 0x18(%rsp), %rax movq 0x20(%rax), %rax movq 0x8(%rsp), %rdi callq *%rax movq %rax, %rcx addq $0x8, %rcx movq (%rsp), %rax addq 0x8(%rax), %rcx movq %rcx, 0x8(%rax) movq 0x8(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rax addq $0x28, %rsp retq nopl (%rax,%rax)
js_malloc_rt: sub rsp, 28h mov [rsp+28h+var_10], rdi mov [rsp+28h+var_18], rsi mov rax, [rsp+28h+var_10] add rax, 28h ; '(' mov [rsp+28h+var_28], rax mov rax, [rsp+28h+var_28] mov rax, [rax+8] add rax, [rsp+28h+var_18] mov rcx, [rsp+28h+var_28] mov rcx, [rcx+10h] sub rcx, 1 cmp rax, rcx setnbe al xor al, 0FFh xor al, 0FFh and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_27BD6 mov [rsp+28h+var_8], 0 jmp short loc_27C41 loc_27BD6: mov rax, [rsp+28h+var_10] mov rax, [rax+8] mov rcx, [rsp+28h+var_28] mov rdi, [rcx+18h] mov rsi, [rsp+28h+var_18] call rax mov [rsp+28h+var_20], rax cmp [rsp+28h+var_20], 0 jnz short loc_27C06 mov [rsp+28h+var_8], 0 jmp short loc_27C41 loc_27C06: mov rax, [rsp+28h+var_28] mov rcx, [rax] add rcx, 1 mov [rax], rcx mov rax, [rsp+28h+var_10] mov rax, [rax+20h] mov rdi, [rsp+28h+var_20] call rax mov rcx, rax add rcx, 8 mov rax, [rsp+28h+var_28] add rcx, [rax+8] mov [rax+8], rcx mov rax, [rsp+28h+var_20] mov [rsp+28h+var_8], rax loc_27C41: mov rax, [rsp+28h+var_8] add rsp, 28h retn
long long js_malloc_rt(long long a1, long long a2) { long long v3; // [rsp+8h] [rbp-20h] if ( a2 + *(_QWORD *)(a1 + 48) > (unsigned long long)(*(_QWORD *)(a1 + 56) - 1LL) ) return 0LL; v3 = (*(long long ( **)(_QWORD, long long))(a1 + 8))(*(_QWORD *)(a1 + 64), a2); if ( !v3 ) return 0LL; ++*(_QWORD *)(a1 + 40); *(_QWORD *)(a1 + 48) += (*(long long ( **)(long long))(a1 + 32))(v3) + 8; return v3; }
js_malloc_rt: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV qword ptr [RSP + 0x10],RSI MOV RAX,qword ptr [RSP + 0x18] ADD RAX,0x28 MOV qword ptr [RSP],RAX MOV RAX,qword ptr [RSP] MOV RAX,qword ptr [RAX + 0x8] ADD RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP] MOV RCX,qword ptr [RCX + 0x10] SUB RCX,0x1 CMP RAX,RCX SETA AL XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x00127bd6 MOV qword ptr [RSP + 0x20],0x0 JMP 0x00127c41 LAB_00127bd6: MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RSP] MOV RDI,qword ptr [RCX + 0x18] MOV RSI,qword ptr [RSP + 0x10] CALL RAX MOV qword ptr [RSP + 0x8],RAX CMP qword ptr [RSP + 0x8],0x0 JNZ 0x00127c06 MOV qword ptr [RSP + 0x20],0x0 JMP 0x00127c41 LAB_00127c06: MOV RAX,qword ptr [RSP] MOV RCX,qword ptr [RAX] ADD RCX,0x1 MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x20] MOV RDI,qword ptr [RSP + 0x8] CALL RAX MOV RCX,RAX ADD RCX,0x8 MOV RAX,qword ptr [RSP] ADD RCX,qword ptr [RAX + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x20],RAX LAB_00127c41: MOV RAX,qword ptr [RSP + 0x20] ADD RSP,0x28 RET
long js_malloc_rt(long param_1,long param_2) { long lVar1; int8 local_8; if (*(long *)(param_1 + 0x38) - 1U < (ulong)(*(long *)(param_1 + 0x30) + param_2)) { local_8 = 0; } else { local_8 = (**(code **)(param_1 + 8))(*(int8 *)(param_1 + 0x40),param_2); if (local_8 == 0) { local_8 = 0; } else { *(long *)(param_1 + 0x28) = *(long *)(param_1 + 0x28) + 1; lVar1 = (**(code **)(param_1 + 0x20))(local_8); *(long *)(param_1 + 0x30) = lVar1 + 8 + *(long *)(param_1 + 0x30); } } return local_8; }
19,207
js_malloc_rt
bluesky950520[P]quickjs/quickjs.c
void *js_malloc_rt(JSRuntime *rt, size_t size) { void *ptr; JSMallocState *s; /* Do not allocate zero bytes: behavior is platform dependent */ assert(size != 0); s = &rt->malloc_state; /* When malloc_limit is 0 (unlimited), malloc_limit - 1 will be SIZE_MAX. */ if (unlikely(s->malloc_size + size > s->malloc_limit - 1)) return NULL; ptr = rt->mf.js_malloc(s->opaque, size); if (!ptr) return NULL; s->malloc_count++; s->malloc_size += rt->mf.js_malloc_usable_size(ptr) + MALLOC_OVERHEAD; return ptr; }
O2
c
js_malloc_rt: pushq %r14 pushq %rbx pushq %rax movq 0x30(%rdi), %rax addq %rsi, %rax movq 0x38(%rdi), %rcx decq %rcx cmpq %rcx, %rax ja 0x1ac6d movq %rdi, %rbx movq 0x40(%rdi), %rdi callq *0x8(%rbx) testq %rax, %rax je 0x1ac6d movq %rax, %r14 incq 0x28(%rbx) movq %rax, %rdi callq *0x20(%rbx) movq 0x30(%rbx), %rcx addq %rcx, %rax addq $0x8, %rax movq %rax, 0x30(%rbx) jmp 0x1ac70 xorl %r14d, %r14d movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
js_malloc_rt: push r14 push rbx push rax mov rax, [rdi+30h] add rax, rsi mov rcx, [rdi+38h] dec rcx cmp rax, rcx ja short loc_1AC6D mov rbx, rdi mov rdi, [rdi+40h] call qword ptr [rbx+8] test rax, rax jz short loc_1AC6D mov r14, rax inc qword ptr [rbx+28h] mov rdi, rax call qword ptr [rbx+20h] mov rcx, [rbx+30h] add rax, rcx add rax, 8 mov [rbx+30h], rax jmp short loc_1AC70 loc_1AC6D: xor r14d, r14d loc_1AC70: mov rax, r14 add rsp, 8 pop rbx pop r14 retn
long long js_malloc_rt(long long a1, long long a2) { long long v2; // rax long long v3; // r14 if ( a2 + *(_QWORD *)(a1 + 48) > (unsigned long long)(*(_QWORD *)(a1 + 56) - 1LL) ) return 0LL; v2 = (*(long long ( **)(_QWORD))(a1 + 8))(*(_QWORD *)(a1 + 64)); if ( !v2 ) return 0LL; v3 = v2; ++*(_QWORD *)(a1 + 40); *(_QWORD *)(a1 + 48) += (*(long long ( **)(long long))(a1 + 32))(v2) + 8; return v3; }
js_malloc_rt: PUSH R14 PUSH RBX PUSH RAX MOV RAX,qword ptr [RDI + 0x30] ADD RAX,RSI MOV RCX,qword ptr [RDI + 0x38] DEC RCX CMP RAX,RCX JA 0x0011ac6d MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x40] CALL qword ptr [RBX + 0x8] TEST RAX,RAX JZ 0x0011ac6d MOV R14,RAX INC qword ptr [RBX + 0x28] MOV RDI,RAX CALL qword ptr [RBX + 0x20] MOV RCX,qword ptr [RBX + 0x30] ADD RAX,RCX ADD RAX,0x8 MOV qword ptr [RBX + 0x30],RAX JMP 0x0011ac70 LAB_0011ac6d: XOR R14D,R14D LAB_0011ac70: MOV RAX,R14 ADD RSP,0x8 POP RBX POP R14 RET
long js_malloc_rt(long param_1,long param_2) { long lVar1; long lVar2; if (((ulong)(*(long *)(param_1 + 0x30) + param_2) <= *(long *)(param_1 + 0x38) - 1U) && (lVar1 = (**(code **)(param_1 + 8))(*(int8 *)(param_1 + 0x40)), lVar1 != 0)) { *(long *)(param_1 + 0x28) = *(long *)(param_1 + 0x28) + 1; lVar2 = (**(code **)(param_1 + 0x20))(lVar1); *(long *)(param_1 + 0x30) = lVar2 + *(long *)(param_1 + 0x30) + 8; return lVar1; } return 0; }
19,208
ma_trid_from_key
eloqsql/storage/maria/ma_search.c
TrID _ma_trid_from_key(const MARIA_KEY *key) { if (!(key->flag & (SEARCH_PAGE_KEY_HAS_TRANSID | SEARCH_USER_KEY_HAS_TRANSID))) return 0; return transid_get_packed(key->keyinfo->share, key->data + key->data_length + key->keyinfo->share->rec_reflength); }
O0
c
ma_trid_from_key: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movl 0x18(%rax), %eax andl $0x180000, %eax # imm = 0x180000 cmpl $0x0, %eax jne 0x95af7 movq $0x0, -0x8(%rbp) jmp 0x95b30 movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq (%rax), %rdi movq -0x10(%rbp), %rax movq (%rax), %rsi movq -0x10(%rbp), %rax movl 0x10(%rax), %eax addq %rax, %rsi movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq (%rax), %rax movl 0x740(%rax), %eax addq %rax, %rsi callq 0x46b40 movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x10, %rsp popq %rbp retq nopw (%rax,%rax)
_ma_trid_from_key: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov eax, [rax+18h] and eax, 180000h cmp eax, 0 jnz short loc_95AF7 mov [rbp+var_8], 0 jmp short loc_95B30 loc_95AF7: mov rax, [rbp+var_10] mov rax, [rax+8] mov rdi, [rax] mov rax, [rbp+var_10] mov rsi, [rax] mov rax, [rbp+var_10] mov eax, [rax+10h] add rsi, rax mov rax, [rbp+var_10] mov rax, [rax+8] mov rax, [rax] mov eax, [rax+740h] add rsi, rax call transid_get_packed mov [rbp+var_8], rax loc_95B30: mov rax, [rbp+var_8] add rsp, 10h pop rbp retn
unsigned long long ma_trid_from_key(long long a1) { if ( (*(_DWORD *)(a1 + 24) & 0x180000) != 0 ) return transid_get_packed( **(_QWORD **)(a1 + 8), (unsigned __int8 *)(*(unsigned int *)(**(_QWORD **)(a1 + 8) + 1856LL) + *(unsigned int *)(a1 + 16) + *(_QWORD *)a1)); else return 0LL; }
_ma_trid_from_key: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x18] AND EAX,0x180000 CMP EAX,0x0 JNZ 0x00195af7 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00195b30 LAB_00195af7: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x10] ADD RSI,RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x740] ADD RSI,RAX CALL 0x00146b40 MOV qword ptr [RBP + -0x8],RAX LAB_00195b30: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x10 POP RBP RET
int8 _ma_trid_from_key(long *param_1) { int8 local_10; if ((*(uint *)(param_1 + 3) & 0x180000) == 0) { local_10 = 0; } else { local_10 = transid_get_packed(*(int8 *)param_1[1], *param_1 + (ulong)*(uint *)(param_1 + 2) + (ulong)*(uint *)(*(long *)param_1[1] + 0x740)); } return local_10; }
19,209
my_strntoll_mb2_or_mb4
eloqsql/strings/ctype-ucs2.c
static longlong my_strntoll_mb2_or_mb4(CHARSET_INFO *cs, const char *nptr, size_t l, int base, char **endptr, int *err) { int negative=0; int overflow; int cnv; my_wc_t wc; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; register ulonglong cutoff; register unsigned int cutlim; register ulonglong res; register const uchar *s= (const uchar*) nptr; register const uchar *e= (const uchar*) nptr+l; const uchar *save; *err= 0; do { if ((cnv= mb_wc(cs, &wc, s, e)) > 0) { switch (wc) { case ' ' : break; case '\t': break; case '-' : negative= !negative; break; case '+' : break; default : goto bs; } } else /* No more characters or bad multibyte sequence */ { if (endptr !=NULL ) *endptr = (char*)s; err[0] = (cnv==MY_CS_ILSEQ) ? EILSEQ : EDOM; return 0; } s+=cnv; } while (1); bs: overflow = 0; res = 0; save = s; cutoff = (~(ulonglong) 0) / (unsigned long int) base; cutlim = (uint) ((~(ulonglong) 0) % (unsigned long int) base); do { if ((cnv= mb_wc(cs, &wc, s, e)) > 0) { s+=cnv; if ( wc>='0' && wc<='9') wc -= '0'; else if ( wc>='A' && wc<='Z') wc = wc - 'A' + 10; else if ( wc>='a' && wc<='z') wc = wc - 'a' + 10; else break; if ((int)wc >= base) break; if (res > cutoff || (res == cutoff && wc > cutlim)) overflow = 1; else { res *= (ulonglong) base; res += wc; } } else if (cnv==MY_CS_ILSEQ) { if (endptr !=NULL ) *endptr = (char*)s; err[0]=EILSEQ; return 0; } else { /* No more characters */ break; } } while(1); if (endptr != NULL) *endptr = (char *) s; if (s == save) { err[0]=EDOM; return 0L; } if (negative) { if (res > (ulonglong) LONGLONG_MIN) overflow = 1; } else if (res > (ulonglong) LONGLONG_MAX) overflow = 1; if (overflow) { err[0]=ERANGE; return negative ? LONGLONG_MIN : LONGLONG_MAX; } return (negative ? -((longlong)res) : (longlong)res); }
O3
c
my_strntoll_mb2_or_mb4: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %r8, -0x40(%rbp) movl %ecx, -0x44(%rbp) movq %rdx, %r13 movq %rsi, %r15 movq %rdi, %r14 movq 0xb8(%rdi), %rax movq 0x28(%rax), %r12 addq %rsi, %r13 movq %r9, -0x50(%rbp) movl $0x0, (%r9) leaq -0x30(%rbp), %rsi movq %r15, %rdx movq %r13, %rcx callq *%r12 testl %eax, %eax jle 0x47822 movl $0x0, -0x34(%rbp) leaq -0x30(%rbp), %rbx movq -0x30(%rbp), %rcx cmpq $0x2a, %rcx jg 0x477f2 cmpq $0x9, %rcx je 0x4780a cmpq $0x20, %rcx je 0x4780a jmp 0x47854 cmpq $0x2b, %rcx je 0x4780a cmpq $0x2d, %rcx jne 0x47854 xorl %ecx, %ecx cmpl $0x0, -0x34(%rbp) sete %cl movl %ecx, -0x34(%rbp) movl %eax, %eax addq %rax, %r15 movq %r14, %rdi movq %rbx, %rsi movq %r15, %rdx movq %r13, %rcx callq *%r12 testl %eax, %eax jg 0x477da movq -0x40(%rbp), %rcx testq %rcx, %rcx je 0x4782e movq %r15, (%rcx) testl %eax, %eax movl $0x54, %eax movl $0x21, %ecx cmovel %eax, %ecx movq -0x50(%rbp), %rax movl %ecx, (%rax) xorl %eax, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movslq -0x44(%rbp), %rcx movq $-0x1, %rax xorl %edx, %edx movq %rcx, -0x60(%rbp) divq %rcx movq %rdx, %rbx movq %rax, -0x58(%rbp) leaq -0x30(%rbp), %rsi movq %r14, %rdi movq %r15, %rdx movq %r13, %rcx callq *%r12 testl %eax, %eax jle 0x47935 movl %ebx, %ecx movq %rcx, -0x68(%rbp) xorl %ecx, %ecx movq %r15, %rbx xorl %r9d, %r9d movq %rbx, %rsi movl %eax, %ebx addq %rsi, %rbx movq -0x30(%rbp), %rsi leaq -0x30(%rsi), %rax cmpq $0x9, %rax ja 0x478b1 movq %rax, -0x30(%rbp) jmp 0x478d6 leaq -0x41(%rsi), %rax cmpq $0x19, %rax ja 0x478c1 addq $-0x37, %rsi jmp 0x478cf leaq -0x61(%rsi), %rax cmpq $0x19, %rax ja 0x47946 addq $-0x57, %rsi movq %rsi, -0x30(%rbp) movq %rsi, %rax cmpl -0x44(%rbp), %eax jge 0x47946 movl $0x1, %esi cmpq -0x58(%rbp), %rcx jbe 0x478eb movq %rcx, %rdi jmp 0x47905 jne 0x478f7 movq -0x58(%rbp), %rdi cmpq -0x68(%rbp), %rax ja 0x47905 imulq -0x60(%rbp), %rcx addq %rcx, %rax movl %r9d, %esi movq %rax, %rdi movq %rdi, -0x70(%rbp) movq %rsi, -0x78(%rbp) movq %r14, %rdi leaq -0x30(%rbp), %rsi movq %rbx, %rdx movq %r13, %rcx callq *%r12 movq -0x70(%rbp), %rdi movq -0x78(%rbp), %rsi movq %rdi, %rcx movl %esi, %r9d testl %eax, %eax jg 0x47895 jmp 0x4793c xorl %edi, %edi movq %r15, %rbx xorl %esi, %esi testl %eax, %eax je 0x479af movl %esi, %r9d movq %rdi, %rcx movq -0x40(%rbp), %rax testq %rax, %rax je 0x47952 movq %rbx, (%rax) cmpq %r15, %rbx je 0x479a0 movabsq $-0x8000000000000000, %rsi # imm = 0x8000000000000000 cmpq %rsi, %rcx movl $0x1, %eax movl %r9d, %edi cmoval %eax, %edi testq %rcx, %rcx cmovsl %eax, %r9d movl -0x34(%rbp), %r8d testl %r8d, %r8d cmovnel %edi, %r9d testl %r9d, %r9d je 0x479ca leaq -0x1(%rsi), %rax testl %r8d, %r8d movq -0x50(%rbp), %rcx movl $0x22, (%rcx) cmovneq %rsi, %rax jmp 0x47845 movq -0x50(%rbp), %rax movl $0x21, (%rax) jmp 0x47843 movq -0x40(%rbp), %rax testq %rax, %rax je 0x479bb movq %rbx, (%rax) movq -0x50(%rbp), %rax movl $0x54, (%rax) jmp 0x47843 movq %rcx, %rax negq %rax testl %r8d, %r8d cmoveq %rcx, %rax jmp 0x47845
my_strntoll_mb2_or_mb4: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov [rbp+var_40], r8 mov [rbp+var_44], ecx mov r13, rdx mov r15, rsi mov r14, rdi mov rax, [rdi+0B8h] mov r12, [rax+28h] add r13, rsi mov [rbp+var_50], r9 mov dword ptr [r9], 0 lea rsi, [rbp+var_30] mov rdx, r15 mov rcx, r13 call r12 test eax, eax jle short loc_47822 mov [rbp+var_34], 0 lea rbx, [rbp+var_30] loc_477DA: mov rcx, [rbp+var_30] cmp rcx, 2Ah ; '*' jg short loc_477F2 cmp rcx, 9 jz short loc_4780A cmp rcx, 20h ; ' ' jz short loc_4780A jmp short loc_47854 loc_477F2: cmp rcx, 2Bh ; '+' jz short loc_4780A cmp rcx, 2Dh ; '-' jnz short loc_47854 xor ecx, ecx cmp [rbp+var_34], 0 setz cl mov [rbp+var_34], ecx loc_4780A: mov eax, eax add r15, rax mov rdi, r14 mov rsi, rbx mov rdx, r15 mov rcx, r13 call r12 test eax, eax jg short loc_477DA loc_47822: mov rcx, [rbp+var_40] test rcx, rcx jz short loc_4782E mov [rcx], r15 loc_4782E: test eax, eax mov eax, 54h ; 'T' mov ecx, 21h ; '!' cmovz ecx, eax mov rax, [rbp+var_50] mov [rax], ecx loc_47843: xor eax, eax loc_47845: add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_47854: movsxd rcx, [rbp+var_44] mov rax, 0FFFFFFFFFFFFFFFFh xor edx, edx mov [rbp+var_60], rcx div rcx mov rbx, rdx mov [rbp+var_58], rax lea rsi, [rbp+var_30] mov rdi, r14 mov rdx, r15 mov rcx, r13 call r12 test eax, eax jle loc_47935 mov ecx, ebx mov [rbp+var_68], rcx xor ecx, ecx mov rbx, r15 xor r9d, r9d loc_47895: mov rsi, rbx mov ebx, eax add rbx, rsi mov rsi, [rbp+var_30] lea rax, [rsi-30h] cmp rax, 9 ja short loc_478B1 mov [rbp+var_30], rax jmp short loc_478D6 loc_478B1: lea rax, [rsi-41h] cmp rax, 19h ja short loc_478C1 add rsi, 0FFFFFFFFFFFFFFC9h jmp short loc_478CF loc_478C1: lea rax, [rsi-61h] cmp rax, 19h ja short loc_47946 add rsi, 0FFFFFFFFFFFFFFA9h loc_478CF: mov [rbp+var_30], rsi mov rax, rsi loc_478D6: cmp eax, [rbp+var_44] jge short loc_47946 mov esi, 1 cmp rcx, [rbp+var_58] jbe short loc_478EB mov rdi, rcx jmp short loc_47905 loc_478EB: jnz short loc_478F7 mov rdi, [rbp+var_58] cmp rax, [rbp+var_68] ja short loc_47905 loc_478F7: imul rcx, [rbp+var_60] add rax, rcx mov esi, r9d mov rdi, rax loc_47905: mov [rbp+var_70], rdi mov [rbp+var_78], rsi mov rdi, r14 lea rsi, [rbp+var_30] mov rdx, rbx mov rcx, r13 call r12 mov rdi, [rbp+var_70] mov rsi, [rbp+var_78] mov rcx, rdi mov r9d, esi test eax, eax jg loc_47895 jmp short loc_4793C loc_47935: xor edi, edi mov rbx, r15 xor esi, esi loc_4793C: test eax, eax jz short loc_479AF mov r9d, esi mov rcx, rdi loc_47946: mov rax, [rbp+var_40] test rax, rax jz short loc_47952 mov [rax], rbx loc_47952: cmp rbx, r15 jz short loc_479A0 mov rsi, 8000000000000000h cmp rcx, rsi mov eax, 1 mov edi, r9d cmova edi, eax test rcx, rcx cmovs r9d, eax mov r8d, [rbp+var_34] test r8d, r8d cmovnz r9d, edi test r9d, r9d jz short loc_479CA lea rax, [rsi-1] test r8d, r8d mov rcx, [rbp+var_50] mov dword ptr [rcx], 22h ; '"' cmovnz rax, rsi jmp loc_47845 loc_479A0: mov rax, [rbp+var_50] mov dword ptr [rax], 21h ; '!' jmp loc_47843 loc_479AF: mov rax, [rbp+var_40] test rax, rax jz short loc_479BB mov [rax], rbx loc_479BB: mov rax, [rbp+var_50] mov dword ptr [rax], 54h ; 'T' jmp loc_47843 loc_479CA: mov rax, rcx neg rax test r8d, r8d cmovz rax, rcx jmp loc_47845
unsigned long long my_strntoll_mb2_or_mb4(long long a1, long long a2, long long a3, int a4, _QWORD *a5, int *a6) { long long v6; // r15 long long ( *v8)(long long, _QWORD *, long long, long long); // r12 long long v9; // r13 int v10; // eax int v11; // ecx unsigned long long result; // rax int v13; // eax long long v14; // r8 long long v15; // rcx long long v16; // rbx long long v17; // r9 unsigned long long v18; // rax long long v19; // rsi unsigned int v20; // esi unsigned long long v21; // rdi int v22; // edi unsigned long long v23; // [rsp+28h] [rbp-58h] BOOL v27; // [rsp+4Ch] [rbp-34h] _QWORD v28[6]; // [rsp+50h] [rbp-30h] BYREF v6 = a2; v8 = *(long long ( **)(long long, _QWORD *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL); v9 = a2 + a3; *a6 = 0; v10 = v8(a1, v28, a2, a2 + a3); if ( v10 <= 0 ) { LABEL_11: if ( a5 ) *a5 = v6; v11 = 33; if ( !v10 ) v11 = 84; *a6 = v11; return 0LL; } v27 = 0; while ( v28[0] > 42LL ) { if ( v28[0] != 43LL ) { if ( v28[0] != 45LL ) goto LABEL_17; v27 = !v27; } LABEL_10: v6 += (unsigned int)v10; v10 = v8(a1, v28, v6, v9); if ( v10 <= 0 ) goto LABEL_11; } if ( v28[0] == 9LL || v28[0] == 32LL ) goto LABEL_10; LABEL_17: v23 = 0xFFFFFFFFFFFFFFFFLL / a4; v13 = v8(a1, v28, v6, v9); if ( v13 <= 0 ) { v21 = 0LL; v16 = v6; v20 = 0; LABEL_35: if ( v13 ) { LODWORD(v17) = v20; v15 = v21; goto LABEL_37; } if ( a5 ) *a5 = v16; *a6 = 84; return 0LL; } v15 = 0LL; v16 = v6; v17 = 0LL; while ( 1 ) { v16 += (unsigned int)v13; v18 = v28[0] - 48LL; if ( (unsigned long long)(v28[0] - 48LL) > 9 ) { if ( (unsigned long long)(v28[0] - 65LL) > 0x19 ) { if ( (unsigned long long)(v28[0] - 97LL) > 0x19 ) break; v19 = v28[0] - 87LL; } else { v19 = v28[0] - 55LL; } v28[0] = v19; v18 = v19; } else { v28[0] -= 48LL; } if ( (int)v18 >= a4 ) break; v20 = 1; if ( v15 <= v23 ) { if ( v15 != v23 || (v21 = 0xFFFFFFFFFFFFFFFFLL / a4, v18 <= (unsigned int)(0xFFFFFFFFFFFFFFFFLL % a4)) ) { v20 = v17; v21 = a4 * v15 + v18; } } else { v21 = v15; } v13 = ((long long ( *)(long long, _QWORD *, long long, long long, long long, long long))v8)( a1, v28, v16, v9, v14, v17); v15 = v21; v17 = v20; if ( v13 <= 0 ) goto LABEL_35; } LABEL_37: if ( a5 ) *a5 = v16; if ( v16 == v6 ) { *a6 = 33; return 0LL; } v22 = v17; if ( (unsigned long long)v15 > 0x8000000000000000LL ) v22 = 1; if ( v15 < 0 ) LODWORD(v17) = 1; if ( v27 ) LODWORD(v17) = v22; if ( (_DWORD)v17 ) { result = 0x7FFFFFFFFFFFFFFFLL; *a6 = 34; if ( v27 ) return 0x8000000000000000LL; } else { result = -v15; if ( !v27 ) return v15; } return result; }
my_strntoll_mb2_or_mb4: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV qword ptr [RBP + -0x40],R8 MOV dword ptr [RBP + -0x44],ECX MOV R13,RDX MOV R15,RSI MOV R14,RDI MOV RAX,qword ptr [RDI + 0xb8] MOV R12,qword ptr [RAX + 0x28] ADD R13,RSI MOV qword ptr [RBP + -0x50],R9 MOV dword ptr [R9],0x0 LEA RSI,[RBP + -0x30] MOV RDX,R15 MOV RCX,R13 CALL R12 TEST EAX,EAX JLE 0x00147822 MOV dword ptr [RBP + -0x34],0x0 LEA RBX,[RBP + -0x30] LAB_001477da: MOV RCX,qword ptr [RBP + -0x30] CMP RCX,0x2a JG 0x001477f2 CMP RCX,0x9 JZ 0x0014780a CMP RCX,0x20 JZ 0x0014780a JMP 0x00147854 LAB_001477f2: CMP RCX,0x2b JZ 0x0014780a CMP RCX,0x2d JNZ 0x00147854 XOR ECX,ECX CMP dword ptr [RBP + -0x34],0x0 SETZ CL MOV dword ptr [RBP + -0x34],ECX LAB_0014780a: MOV EAX,EAX ADD R15,RAX MOV RDI,R14 MOV RSI,RBX MOV RDX,R15 MOV RCX,R13 CALL R12 TEST EAX,EAX JG 0x001477da LAB_00147822: MOV RCX,qword ptr [RBP + -0x40] TEST RCX,RCX JZ 0x0014782e MOV qword ptr [RCX],R15 LAB_0014782e: TEST EAX,EAX MOV EAX,0x54 MOV ECX,0x21 CMOVZ ECX,EAX MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],ECX LAB_00147843: XOR EAX,EAX LAB_00147845: ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00147854: MOVSXD RCX,dword ptr [RBP + -0x44] MOV RAX,-0x1 XOR EDX,EDX MOV qword ptr [RBP + -0x60],RCX DIV RCX MOV RBX,RDX MOV qword ptr [RBP + -0x58],RAX LEA RSI,[RBP + -0x30] MOV RDI,R14 MOV RDX,R15 MOV RCX,R13 CALL R12 TEST EAX,EAX JLE 0x00147935 MOV ECX,EBX MOV qword ptr [RBP + -0x68],RCX XOR ECX,ECX MOV RBX,R15 XOR R9D,R9D LAB_00147895: MOV RSI,RBX MOV EBX,EAX ADD RBX,RSI MOV RSI,qword ptr [RBP + -0x30] LEA RAX,[RSI + -0x30] CMP RAX,0x9 JA 0x001478b1 MOV qword ptr [RBP + -0x30],RAX JMP 0x001478d6 LAB_001478b1: LEA RAX,[RSI + -0x41] CMP RAX,0x19 JA 0x001478c1 ADD RSI,-0x37 JMP 0x001478cf LAB_001478c1: LEA RAX,[RSI + -0x61] CMP RAX,0x19 JA 0x00147946 ADD RSI,-0x57 LAB_001478cf: MOV qword ptr [RBP + -0x30],RSI MOV RAX,RSI LAB_001478d6: CMP EAX,dword ptr [RBP + -0x44] JGE 0x00147946 MOV ESI,0x1 CMP RCX,qword ptr [RBP + -0x58] JBE 0x001478eb MOV RDI,RCX JMP 0x00147905 LAB_001478eb: JNZ 0x001478f7 MOV RDI,qword ptr [RBP + -0x58] CMP RAX,qword ptr [RBP + -0x68] JA 0x00147905 LAB_001478f7: IMUL RCX,qword ptr [RBP + -0x60] ADD RAX,RCX MOV ESI,R9D MOV RDI,RAX LAB_00147905: MOV qword ptr [RBP + -0x70],RDI MOV qword ptr [RBP + -0x78],RSI MOV RDI,R14 LEA RSI,[RBP + -0x30] MOV RDX,RBX MOV RCX,R13 CALL R12 MOV RDI,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x78] MOV RCX,RDI MOV R9D,ESI TEST EAX,EAX JG 0x00147895 JMP 0x0014793c LAB_00147935: XOR EDI,EDI MOV RBX,R15 XOR ESI,ESI LAB_0014793c: TEST EAX,EAX JZ 0x001479af MOV R9D,ESI MOV RCX,RDI LAB_00147946: MOV RAX,qword ptr [RBP + -0x40] TEST RAX,RAX JZ 0x00147952 MOV qword ptr [RAX],RBX LAB_00147952: CMP RBX,R15 JZ 0x001479a0 MOV RSI,-0x8000000000000000 CMP RCX,RSI MOV EAX,0x1 MOV EDI,R9D CMOVA EDI,EAX TEST RCX,RCX CMOVS R9D,EAX MOV R8D,dword ptr [RBP + -0x34] TEST R8D,R8D CMOVNZ R9D,EDI TEST R9D,R9D JZ 0x001479ca LEA RAX,[RSI + -0x1] TEST R8D,R8D MOV RCX,qword ptr [RBP + -0x50] MOV dword ptr [RCX],0x22 CMOVNZ RAX,RSI JMP 0x00147845 LAB_001479a0: MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],0x21 JMP 0x00147843 LAB_001479af: MOV RAX,qword ptr [RBP + -0x40] TEST RAX,RAX JZ 0x001479bb MOV qword ptr [RAX],RBX LAB_001479bb: MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],0x54 JMP 0x00147843 LAB_001479ca: MOV RAX,RCX NEG RAX TEST R8D,R8D CMOVZ RAX,RCX JMP 0x00147845
ulong my_strntoll_mb2_or_mb4 (long param_1,long param_2,long param_3,int param_4,long *param_5, int4 *param_6) { code *pcVar1; int1 auVar2 [16]; int1 auVar3 [16]; bool bVar4; bool bVar5; bool bVar6; ulong uVar7; uint uVar8; ulong uVar9; int4 uVar10; ulong uVar11; long lVar12; ulong uVar13; ulong local_38; pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); param_3 = param_3 + param_2; *param_6 = 0; uVar8 = (*pcVar1)(param_1,&local_38,param_2,param_3); if (0 < (int)uVar8) { bVar4 = false; do { if ((long)local_38 < 0x2b) { if ((local_38 != 9) && (local_38 != 0x20)) { LAB_00147854: auVar2._8_8_ = 0; auVar2._0_8_ = (long)param_4; auVar3 = ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff); uVar9 = SUB168(auVar3 / auVar2,0); uVar8 = (*pcVar1)(param_1,&local_38,param_2,param_3); lVar12 = param_2; if ((int)uVar8 < 1) { uVar11 = 0; bVar5 = false; goto LAB_0014793c; } uVar11 = 0; bVar5 = false; goto LAB_00147895; } } else if (local_38 != 0x2b) { if (local_38 != 0x2d) goto LAB_00147854; bVar4 = !bVar4; } param_2 = param_2 + (ulong)uVar8; uVar8 = (*pcVar1)(param_1,&local_38,param_2,param_3); } while (0 < (int)uVar8); } if (param_5 != (long *)0x0) { *param_5 = param_2; } uVar10 = 0x21; if (uVar8 == 0) { uVar10 = 0x54; } *param_6 = uVar10; return 0; while( true ) { if (param_4 <= (int)uVar13) goto LAB_00147946; uVar7 = uVar11; bVar6 = true; if ((uVar11 <= uVar9) && ((uVar11 != uVar9 || (uVar7 = uVar9, uVar13 <= (SUB168(auVar3 % auVar2,0) & 0xffffffff))))) { uVar7 = uVar13 + uVar11 * (long)param_4; bVar6 = bVar5; } bVar5 = bVar6; uVar11 = uVar7; local_38 = uVar13; uVar8 = (*pcVar1)(param_1,&local_38,lVar12,param_3); if ((int)uVar8 < 1) break; LAB_00147895: lVar12 = (ulong)uVar8 + lVar12; uVar13 = local_38 - 0x30; if (9 < uVar13) { if (local_38 - 0x41 < 0x1a) { uVar13 = local_38 - 0x37; } else { if (0x19 < local_38 - 0x61) goto LAB_00147946; uVar13 = local_38 - 0x57; } } } LAB_0014793c: if (uVar8 == 0) { if (param_5 != (long *)0x0) { *param_5 = lVar12; } *param_6 = 0x54; } else { LAB_00147946: if (param_5 != (long *)0x0) { *param_5 = lVar12; } if (lVar12 != param_2) { bVar6 = bVar5; if (0x8000000000000000 < uVar11) { bVar6 = true; } if ((long)uVar11 < 0) { bVar5 = true; } if (bVar4) { bVar5 = bVar6; } if (!bVar5) { if (!bVar4) { return uVar11; } return -uVar11; } *param_6 = 0x22; if (bVar4) { return 0x8000000000000000; } return 0x7fffffffffffffff; } *param_6 = 0x21; } return 0; }
19,210
lf_pinbox_real_free
eloqsql/mysys/lf_alloc-pin.c
static void lf_pinbox_real_free(LF_PINS *pins) { int npins; void *list; void **addr= NULL; void *first= NULL, *last= NULL; struct st_my_thread_var *var= my_thread_var; void *stack_ends_here= var ? var->stack_ends_here : NULL; LF_PINBOX *pinbox= pins->pinbox; npins= pinbox->pins_in_array+1; #ifdef HAVE_ALLOCA if (stack_ends_here != NULL) { int alloca_size= sizeof(void *)*LF_PINBOX_PINS*npins; /* create a sorted list of pinned addresses, to speed up searches */ if (available_stack_size(&pinbox, stack_ends_here) > alloca_size + ALLOCA_SAFETY_MARGIN) { struct st_harvester hv; addr= (void **) alloca(alloca_size); hv.granary= addr; hv.npins= npins; /* scan the dynarray and accumulate all pinned addresses */ lf_dynarray_iterate(&pinbox->pinarray, (lf_dynarray_func)harvest_pins, &hv); npins= (int)(hv.granary-addr); /* and sort them */ if (npins) qsort(addr, npins, sizeof(void *), (qsort_cmp)ptr_cmp); } } #endif list= pins->purgatory; pins->purgatory= 0; pins->purgatory_count= 0; while (list) { void *cur= list; list= *(void **)((char *)cur+pinbox->free_ptr_offset); if (npins) { if (addr) /* use binary search */ { void **a, **b, **c; for (a= addr, b= addr+npins-1, c= a+(b-a)/2; (b-a) > 1; c= a+(b-a)/2) if (cur == *c) a= b= c; else if (cur > *c) a= c; else b= c; if (cur == *a || cur == *b) goto found; } else /* no alloca - no cookie. linear search here */ { if (lf_dynarray_iterate(&pinbox->pinarray, (lf_dynarray_func)match_pins, cur)) goto found; } } /* not pinned - freeing */ if (last) last= next_node(pinbox, last)= (uchar *)cur; else first= last= (uchar *)cur; continue; found: /* pinned - keeping */ add_to_purgatory(pins, cur); } if (last) pinbox->free_func(first, last, pinbox->free_func_arg); }
O3
c
lf_pinbox_real_free: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) callq 0xa2412 testq %rax, %rax je 0xa5f2a movq 0xb8(%rax), %rax movq 0x20(%rbx), %rdi movq %rdi, -0x38(%rbp) movl 0x40(%rdi), %r8d incl %r8d testq %rax, %rax je 0xa5f39 movl %r8d, %ecx shll $0x5, %ecx leaq -0x38(%rbp), %rdx subq %rdx, %rax leal 0x2000(%rcx), %edx movslq %edx, %rdx cmpq %rdx, %rax jle 0xa5f39 movslq %ecx, %rax movq %rsp, %r14 addq $0xf, %rax andq $-0x10, %rax subq %rax, %r14 movq %r14, %rsp leaq -0x70(%rbp), %r12 movq %r14, (%r12) movl %r8d, 0x8(%r12) leaq 0x38d(%rip), %rsi # 0xa6280 movq %r12, %rdx callq 0xa6449 movq (%r12), %r8 subq %r14, %r8 shrq $0x3, %r8 testl %r8d, %r8d je 0xa5f3c movslq %r8d, %rsi leaq 0x3c3(%rip), %rcx # 0xa62d8 movl $0x8, %edx movq %r14, %rdi movq %r8, %r15 callq 0x295e0 movq %r15, %r8 jmp 0xa5f3c movq 0x20(%rbx), %rax movq %rax, -0x38(%rbp) movl 0x40(%rax), %r8d incl %r8d xorl %r14d, %r14d movq 0x28(%rbx), %r15 movq $0x0, 0x28(%rbx) movl $0x0, 0x30(%rbx) testq %r15, %r15 je 0xa6084 movslq %r8d, %rax leaq (%r14,%rax,8), %r13 addq $-0x8, %r13 leaq -0x8(,%rax,8), %rcx movq %rcx, %rax sarq $0x3, %rax movq %rcx, -0x60(%rbp) shrq $0x3f, %rcx addq %rax, %rcx andq $-0x2, %rcx leaq (%r14,%rcx,4), %rax movq %rax, -0x48(%rbp) movq $0x0, -0x40(%rbp) xorl %r10d, %r10d movq %rbx, -0x58(%rbp) movq %r14, -0x50(%rbp) movq %r15, %r12 movq -0x38(%rbp), %rdi movl 0x38(%rdi), %eax movq (%r15,%rax), %r15 testl %r8d, %r8d je 0xa6009 testq %r14, %r14 je 0xa601e movq %r14, %rcx movq %r13, %rax cmpq $0x9, -0x60(%rbp) jl 0xa5fff movq -0x48(%rbp), %rdx movq %r13, %rax movq %r14, %rcx cmpq (%rdx), %r12 cmovbeq %rdx, %rax cmovaeq %rdx, %rcx cmoveq %rdx, %rax movq %rax, %rsi subq %rcx, %rsi movq %rsi, %rdx sarq $0x3, %rdx movq %rsi, %rdi shrq $0x3f, %rdi addq %rdx, %rdi andq $-0x2, %rdi leaq (%rcx,%rdi,4), %rdx cmpq $0x8, %rsi jg 0xa5fcb cmpq (%rcx), %r12 je 0xa6045 cmpq (%rax), %r12 je 0xa6045 testq %r10, %r10 je 0xa605d movq -0x38(%rbp), %rax movl 0x38(%rax), %eax movq %r12, (%r10,%rax) movq %r12, %r10 jmp 0xa6064 leaq 0x2cc(%rip), %rsi # 0xa62f1 movq %r12, %rdx movq %r8, %r14 movq %r10, %rbx callq 0xa6449 movq %rbx, %r10 movq %r14, %r8 movq -0x50(%rbp), %r14 movq -0x58(%rbp), %rbx testl %eax, %eax je 0xa6009 movq 0x20(%rbx), %rax movq 0x28(%rbx), %rcx movl 0x38(%rax), %eax movq %rcx, (%r12,%rax) movq %r12, 0x28(%rbx) incl 0x30(%rbx) jmp 0xa6064 movq %r12, %r10 movq %r12, -0x40(%rbp) testq %r15, %r15 jne 0xa5f9c testq %r10, %r10 je 0xa6084 movq -0x38(%rbp), %rax movq 0x30(%rax), %rdx movq -0x40(%rbp), %rdi movq %r10, %rsi callq *0x28(%rax) movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0xa60a2 leaq -0x28(%rbp), %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29260
lf_pinbox_real_free: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax call _my_thread_var test rax, rax jz loc_A5F2A mov rax, [rax+0B8h] mov rdi, [rbx+20h] mov [rbp+var_38], rdi mov r8d, [rdi+40h] inc r8d test rax, rax jz loc_A5F39 mov ecx, r8d shl ecx, 5 lea rdx, [rbp+var_38] sub rax, rdx lea edx, [rcx+2000h] movsxd rdx, edx cmp rax, rdx jle short loc_A5F39 movsxd rax, ecx mov r14, rsp add rax, 0Fh and rax, 0FFFFFFFFFFFFFFF0h sub r14, rax mov rsp, r14 lea r12, [rbp+var_70] mov [r12], r14 mov [r12+8], r8d lea rsi, harvest_pins mov rdx, r12 call lf_dynarray_iterate mov r8, [r12] sub r8, r14 shr r8, 3 test r8d, r8d jz short loc_A5F3C movsxd rsi, r8d lea rcx, ptr_cmp mov edx, 8 mov rdi, r14 mov r15, r8 call _qsort mov r8, r15 jmp short loc_A5F3C loc_A5F2A: mov rax, [rbx+20h] mov [rbp+var_38], rax mov r8d, [rax+40h] inc r8d loc_A5F39: xor r14d, r14d loc_A5F3C: mov r15, [rbx+28h] mov qword ptr [rbx+28h], 0 mov dword ptr [rbx+30h], 0 test r15, r15 jz loc_A6084 movsxd rax, r8d lea r13, [r14+rax*8] add r13, 0FFFFFFFFFFFFFFF8h lea rcx, ds:0FFFFFFFFFFFFFFF8h[rax*8] mov rax, rcx sar rax, 3 mov [rbp+var_60], rcx shr rcx, 3Fh add rcx, rax and rcx, 0FFFFFFFFFFFFFFFEh lea rax, [r14+rcx*4] mov [rbp+var_48], rax mov [rbp+var_40], 0 xor r10d, r10d mov [rbp+var_58], rbx mov [rbp+var_50], r14 loc_A5F9C: mov r12, r15 mov rdi, [rbp+var_38] mov eax, [rdi+38h] mov r15, [r15+rax] test r8d, r8d jz short loc_A6009 test r14, r14 jz short loc_A601E mov rcx, r14 mov rax, r13 cmp [rbp+var_60], 9 jl short loc_A5FFF mov rdx, [rbp+var_48] mov rax, r13 mov rcx, r14 loc_A5FCB: cmp r12, [rdx] cmovbe rax, rdx cmovnb rcx, rdx cmovz rax, rdx mov rsi, rax sub rsi, rcx mov rdx, rsi sar rdx, 3 mov rdi, rsi shr rdi, 3Fh add rdi, rdx and rdi, 0FFFFFFFFFFFFFFFEh lea rdx, [rcx+rdi*4] cmp rsi, 8 jg short loc_A5FCB loc_A5FFF: cmp r12, [rcx] jz short loc_A6045 cmp r12, [rax] jz short loc_A6045 loc_A6009: test r10, r10 jz short loc_A605D mov rax, [rbp+var_38] mov eax, [rax+38h] mov [r10+rax], r12 mov r10, r12 jmp short loc_A6064 loc_A601E: lea rsi, match_pins mov rdx, r12 mov r14, r8 mov rbx, r10 call lf_dynarray_iterate mov r10, rbx mov r8, r14 mov r14, [rbp+var_50] mov rbx, [rbp+var_58] test eax, eax jz short loc_A6009 loc_A6045: mov rax, [rbx+20h] mov rcx, [rbx+28h] mov eax, [rax+38h] mov [r12+rax], rcx mov [rbx+28h], r12 inc dword ptr [rbx+30h] jmp short loc_A6064 loc_A605D: mov r10, r12 mov [rbp+var_40], r12 loc_A6064: test r15, r15 jnz loc_A5F9C test r10, r10 jz short loc_A6084 mov rax, [rbp+var_38] mov rdx, [rax+30h] mov rdi, [rbp+var_40] mov rsi, r10 call qword ptr [rax+28h] loc_A6084: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_A60A2 lea rsp, [rbp-28h] pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_A60A2: call ___stack_chk_fail
unsigned long long lf_pinbox_real_free(long long a1) { long long v1; // rbx long long v2; // rax long long v3; // rax long long v4; // rdi unsigned long long v5; // r8 char *v6; // r14 unsigned long long v7; // r15 unsigned long long v8; // r15 long long v9; // r13 unsigned long long v10; // rcx unsigned long long v11; // r10 unsigned long long v12; // r12 _QWORD *v13; // rax char *v14; // rdx unsigned long long v15; // r14 unsigned long long v16; // rbx int v17; // eax char *v19; // [rsp+0h] [rbp-70h] BYREF int v20; // [rsp+8h] [rbp-68h] long long v21; // [rsp+10h] [rbp-60h] long long v22; // [rsp+18h] [rbp-58h] char *v23; // [rsp+20h] [rbp-50h] char *v24; // [rsp+28h] [rbp-48h] unsigned long long v25; // [rsp+30h] [rbp-40h] _QWORD v26[7]; // [rsp+38h] [rbp-38h] BYREF v1 = a1; v26[1] = __readfsqword(0x28u); v2 = my_thread_var(); if ( v2 ) { v3 = *(_QWORD *)(v2 + 184); v4 = *(_QWORD *)(a1 + 32); v26[0] = v4; v5 = (unsigned int)(*(_DWORD *)(v4 + 64) + 1); if ( v3 && v3 - (long long)v26 > 32 * (int)v5 + 0x2000 ) { v6 = (char *)&v19 - ((32 * (int)v5 + 15LL) & 0xFFFFFFFFFFFFFFF0LL); v19 = v6; v20 = v5; lf_dynarray_iterate(v4, harvest_pins, &v19); v5 = (unsigned long long)(v19 - v6) >> 3; if ( (_DWORD)v5 ) { v7 = (unsigned long long)(v19 - v6) >> 3; qsort(v6, (int)v5, 8LL, ptr_cmp); v5 = v7; } goto LABEL_8; } } else { v26[0] = *(_QWORD *)(a1 + 32); v5 = (unsigned int)(*(_DWORD *)(v26[0] + 64LL) + 1); } v6 = 0LL; LABEL_8: v8 = *(_QWORD *)(v1 + 40); *(_QWORD *)(v1 + 40) = 0LL; *(_DWORD *)(v1 + 48) = 0; if ( !v8 ) return __readfsqword(0x28u); v9 = (long long)&v6[8 * (int)v5 - 8]; v21 = 8LL * (int)v5 - 8; v10 = ((v21 >> 3) + ((unsigned long long)v21 >> 63)) & 0xFFFFFFFFFFFFFFFELL; v24 = &v6[4 * v10]; v25 = 0LL; v11 = 0LL; v22 = v1; v23 = v6; do { v12 = v8; v8 = *(_QWORD *)(v8 + *(unsigned int *)(v26[0] + 56LL)); if ( (_DWORD)v5 ) { if ( v6 ) { v10 = (unsigned long long)v6; v13 = (_QWORD *)v9; if ( v21 >= 9 ) { v14 = v24; v13 = (_QWORD *)v9; v10 = (unsigned long long)v6; do { if ( v12 <= *(_QWORD *)v14 ) v13 = v14; if ( v12 >= *(_QWORD *)v14 ) v10 = (unsigned long long)v14; if ( v12 == *(_QWORD *)v14 ) v13 = v14; v14 = (char *)(v10 + 4 * ((((long long)((long long)v13 - v10) >> 3) + (((unsigned long long)v13 - v10) >> 63)) & 0xFFFFFFFFFFFFFFFELL)); } while ( (long long)((long long)v13 - v10) > 8 ); } if ( v12 == *(_QWORD *)v10 || v12 == *v13 ) { LABEL_26: v10 = *(_QWORD *)(v1 + 40); *(_QWORD *)(v12 + *(unsigned int *)(*(_QWORD *)(v1 + 32) + 56LL)) = v10; *(_QWORD *)(v1 + 40) = v12; ++*(_DWORD *)(v1 + 48); continue; } } else { v15 = v5; v16 = v11; v17 = lf_dynarray_iterate(v26[0], match_pins, v12); v11 = v16; v5 = v15; v6 = v23; v1 = v22; if ( v17 ) goto LABEL_26; } } if ( v11 ) { *(_QWORD *)(v11 + *(unsigned int *)(v26[0] + 56LL)) = v12; v11 = v12; } else { v11 = v12; v25 = v12; } } while ( v8 ); if ( v11 ) (*(void ( **)(unsigned long long, unsigned long long, _QWORD, unsigned long long, unsigned long long))(v26[0] + 40LL))( v25, v11, *(_QWORD *)(v26[0] + 48LL), v10, v5); return __readfsqword(0x28u); }
lf_pinbox_real_free: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX CALL 0x001a2412 TEST RAX,RAX JZ 0x001a5f2a MOV RAX,qword ptr [RAX + 0xb8] MOV RDI,qword ptr [RBX + 0x20] MOV qword ptr [RBP + -0x38],RDI MOV R8D,dword ptr [RDI + 0x40] INC R8D TEST RAX,RAX JZ 0x001a5f39 MOV ECX,R8D SHL ECX,0x5 LEA RDX,[RBP + -0x38] SUB RAX,RDX LEA EDX,[RCX + 0x2000] MOVSXD RDX,EDX CMP RAX,RDX JLE 0x001a5f39 MOVSXD RAX,ECX MOV R14,RSP ADD RAX,0xf AND RAX,-0x10 SUB R14,RAX MOV RSP,R14 LEA R12,[RBP + -0x70] MOV qword ptr [R12],R14 MOV dword ptr [R12 + 0x8],R8D LEA RSI,[0x1a6280] MOV RDX,R12 CALL 0x001a6449 MOV R8,qword ptr [R12] SUB R8,R14 SHR R8,0x3 TEST R8D,R8D JZ 0x001a5f3c MOVSXD RSI,R8D LEA RCX,[0x1a62d8] MOV EDX,0x8 MOV RDI,R14 MOV R15,R8 CALL 0x001295e0 MOV R8,R15 JMP 0x001a5f3c LAB_001a5f2a: MOV RAX,qword ptr [RBX + 0x20] MOV qword ptr [RBP + -0x38],RAX MOV R8D,dword ptr [RAX + 0x40] INC R8D LAB_001a5f39: XOR R14D,R14D LAB_001a5f3c: MOV R15,qword ptr [RBX + 0x28] MOV qword ptr [RBX + 0x28],0x0 MOV dword ptr [RBX + 0x30],0x0 TEST R15,R15 JZ 0x001a6084 MOVSXD RAX,R8D LEA R13,[R14 + RAX*0x8] ADD R13,-0x8 LEA RCX,[-0x8 + RAX*0x8] MOV RAX,RCX SAR RAX,0x3 MOV qword ptr [RBP + -0x60],RCX SHR RCX,0x3f ADD RCX,RAX AND RCX,-0x2 LEA RAX,[R14 + RCX*0x4] MOV qword ptr [RBP + -0x48],RAX MOV qword ptr [RBP + -0x40],0x0 XOR R10D,R10D MOV qword ptr [RBP + -0x58],RBX MOV qword ptr [RBP + -0x50],R14 LAB_001a5f9c: MOV R12,R15 MOV RDI,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RDI + 0x38] MOV R15,qword ptr [R15 + RAX*0x1] TEST R8D,R8D JZ 0x001a6009 TEST R14,R14 JZ 0x001a601e MOV RCX,R14 MOV RAX,R13 CMP qword ptr [RBP + -0x60],0x9 JL 0x001a5fff MOV RDX,qword ptr [RBP + -0x48] MOV RAX,R13 MOV RCX,R14 LAB_001a5fcb: CMP R12,qword ptr [RDX] CMOVBE RAX,RDX CMOVNC RCX,RDX CMOVZ RAX,RDX MOV RSI,RAX SUB RSI,RCX MOV RDX,RSI SAR RDX,0x3 MOV RDI,RSI SHR RDI,0x3f ADD RDI,RDX AND RDI,-0x2 LEA RDX,[RCX + RDI*0x4] CMP RSI,0x8 JG 0x001a5fcb LAB_001a5fff: CMP R12,qword ptr [RCX] JZ 0x001a6045 CMP R12,qword ptr [RAX] JZ 0x001a6045 LAB_001a6009: TEST R10,R10 JZ 0x001a605d MOV RAX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RAX + 0x38] MOV qword ptr [R10 + RAX*0x1],R12 MOV R10,R12 JMP 0x001a6064 LAB_001a601e: LEA RSI,[0x1a62f1] MOV RDX,R12 MOV R14,R8 MOV RBX,R10 CALL 0x001a6449 MOV R10,RBX MOV R8,R14 MOV R14,qword ptr [RBP + -0x50] MOV RBX,qword ptr [RBP + -0x58] TEST EAX,EAX JZ 0x001a6009 LAB_001a6045: MOV RAX,qword ptr [RBX + 0x20] MOV RCX,qword ptr [RBX + 0x28] MOV EAX,dword ptr [RAX + 0x38] MOV qword ptr [R12 + RAX*0x1],RCX MOV qword ptr [RBX + 0x28],R12 INC dword ptr [RBX + 0x30] JMP 0x001a6064 LAB_001a605d: MOV R10,R12 MOV qword ptr [RBP + -0x40],R12 LAB_001a6064: TEST R15,R15 JNZ 0x001a5f9c TEST R10,R10 JZ 0x001a6084 MOV RAX,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RAX + 0x30] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,R10 CALL qword ptr [RAX + 0x28] LAB_001a6084: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001a60a2 LEA RSP,[RBP + -0x28] POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001a60a2: CALL 0x00129260
/* WARNING: Type propagation algorithm not settling */ void lf_pinbox_real_free(long param_1) { ulong uVar1; ulong uVar2; int8 uVar3; code *pcVar4; ulong *puVar5; int iVar6; long lVar7; ulong *puVar8; ulong *puVar9; ulong **__base; long lVar10; int iVar11; ulong uVar12; ulong *puVar13; ulong *puVar14; ulong uVar15; long in_FS_OFFSET; ulong *apuStack_80 [2]; int local_70; long local_68; long local_60; ulong *local_58; ulong *local_50; ulong local_48; long local_40; long local_38; __base = apuStack_80 + 1; local_38 = *(long *)(in_FS_OFFSET + 0x28); apuStack_80[0] = (ulong *)0x1a5e88; lVar7 = _my_thread_var(); if (lVar7 == 0) { local_40 = *(long *)(param_1 + 0x20); iVar11 = *(int *)(*(long *)(param_1 + 0x20) + 0x40) + 1; } else { lVar10 = *(long *)(param_1 + 0x20); local_40 = lVar10; iVar11 = *(int *)(lVar10 + 0x40) + 1; if ((*(long *)(lVar7 + 0xb8) != 0) && ((long)(iVar11 * 0x20 + 0x2000) < *(long *)(lVar7 + 0xb8) - (long)&local_40)) { lVar7 = -(long)(iVar11 * 0x20); __base = (ulong **)((long)apuStack_80 + lVar7 + 8U); apuStack_80[1] = (ulong *)__base; local_70 = iVar11; *(int8 *)((long)apuStack_80 + lVar7) = 0x1a5efb; lf_dynarray_iterate(lVar10,harvest_pins,apuStack_80 + 1); iVar11 = (int)((ulong)((long)apuStack_80[1] - (long)__base) >> 3); puVar14 = (ulong *)__base; if (iVar11 != 0) { *(int8 *)((long)apuStack_80 + lVar7) = 0x1a5f25; qsort(__base,(long)iVar11,8,ptr_cmp); } goto LAB_001a5f3c; } } puVar14 = (ulong *)0x0; LAB_001a5f3c: uVar15 = *(ulong *)(param_1 + 0x28); *(int8 *)(param_1 + 0x28) = 0; *(int4 *)(param_1 + 0x30) = 0; if (uVar15 != 0) { puVar13 = puVar14 + (long)iVar11 + -1; local_68 = (long)iVar11 * 8 + -8; local_50 = (ulong *)((long)puVar14 + ((local_68 >> 3) - (local_68 >> 0x3f) & 0xfffffffffffffffeU) * 4); local_48 = 0; uVar12 = 0; local_60 = param_1; local_58 = puVar14; do { lVar7 = local_40; uVar1 = *(ulong *)(uVar15 + *(uint *)(local_40 + 0x38)); if (iVar11 == 0) { LAB_001a6009: if (uVar12 == 0) { local_48 = uVar15; uVar12 = uVar15; } else { *(ulong *)(uVar12 + *(uint *)(local_40 + 0x38)) = uVar15; uVar12 = uVar15; } } else { puVar8 = puVar13; puVar9 = puVar14; puVar5 = local_50; lVar10 = local_68; if (puVar14 == (ulong *)0x0) { __base[-1] = (ulong *)0x1a6033; iVar6 = lf_dynarray_iterate(lVar7,match_pins,uVar15); param_1 = local_60; puVar14 = local_58; if (iVar6 == 0) goto LAB_001a6009; } else { while (8 < lVar10) { uVar2 = *puVar5; if (uVar2 > uVar15 || uVar15 == uVar2) { puVar8 = puVar5; } if (uVar2 <= uVar15) { puVar9 = puVar5; } if (uVar15 == uVar2) { puVar8 = puVar5; } lVar10 = (long)puVar8 - (long)puVar9; puVar5 = (ulong *)((long)puVar9 + ((lVar10 >> 3) - (lVar10 >> 0x3f) & 0xfffffffffffffffeU) * 4); } if ((uVar15 != *puVar9) && (uVar15 != *puVar8)) goto LAB_001a6009; } *(int8 *)(uVar15 + *(uint *)(*(long *)(param_1 + 0x20) + 0x38)) = *(int8 *)(param_1 + 0x28); *(ulong *)(param_1 + 0x28) = uVar15; *(int *)(param_1 + 0x30) = *(int *)(param_1 + 0x30) + 1; } uVar2 = local_48; uVar15 = uVar1; } while (uVar1 != 0); if (uVar12 != 0) { uVar3 = *(int8 *)(local_40 + 0x30); pcVar4 = *(code **)(local_40 + 0x28); __base[-1] = (ulong *)0x1a6084; (*pcVar4)(uVar2,uVar12,uVar3); } } if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __base[-1] = (ulong *)lf_pinbox_free; __stack_chk_fail(); } return; }
19,211
decltype(auto) coro::sync_wait<coro::detail::when_all_ready_awaitable<std::tuple<coro::detail::when_all_task<void>, coro::detail::when_all_task<void>, coro::detail::when_all_task<void>, coro::detail::when_all_task<void>, coro::detail::when_all_task<void>, coro::detail::when_all_task<void>>>, std::tuple<coro::detail::when_all_task<void>, coro::detail::when_all_task<void>, coro::detail::when_all_task<void>, coro::detail::when_all_task<void>, coro::detail::when_all_task<void>, coro::detail::when_all_task<void>>&&>(coro::detail::when_all_ready_awaitable<std::tuple<coro::detail::when_all_task<void>, coro::detail::when_all_task<void>, coro::detail::when_all_task<void>, coro::detail::when_all_task<void>, coro::detail::when_all_task<void>, coro::detail::when_all_task<void>>>&&)
AlayaLite/build_O3/_deps/libcoro-src/include/coro/sync_wait.hpp
auto sync_wait(awaitable_type&& a) -> decltype(auto) { detail::sync_wait_event e{}; auto task = detail::make_sync_wait_task(std::forward<awaitable_type>(a)); task.promise().start(e); e.wait(); if constexpr (std::is_void_v<return_type>) { task.promise().result(); return; } else if constexpr (std::is_reference_v<return_type>) { return task.promise().result(); } else if constexpr (std::is_move_assignable_v<return_type>) { // issue-242 // For non-trivial types (or possibly types that don't fit in a register) // the compiler will end up calling the ~return_type() when the promise // is destructed at the end of sync_wait(). This causes the return_type // object to also be destructed causing the final return/move from // sync_wait() to be a 'use after free' bug. To work around this the result // must be moved off the promise object before the promise is destructed. // Other solutions could be heap allocating the return_type but that has // other downsides, for now it is determined that a double move is an // acceptable solution to work around this bug. auto result = std::move(task).promise().result(); return result; } else { return task.promise().result(); } }
O3
cpp
decltype(auto) coro::sync_wait<coro::detail::when_all_ready_awaitable<std::tuple<coro::detail::when_all_task<void>, coro::detail::when_all_task<void>, coro::detail::when_all_task<void>, coro::detail::when_all_task<void>, coro::detail::when_all_task<void>, coro::detail::when_all_task<void>>>, std::tuple<coro::detail::when_all_task<void>, coro::detail::when_all_task<void>, coro::detail::when_all_task<void>, coro::detail::when_all_task<void>, coro::detail::when_all_task<void>, coro::detail::when_all_task<void>>&&>(coro::detail::when_all_ready_awaitable<std::tuple<coro::detail::when_all_task<void>, coro::detail::when_all_task<void>, coro::detail::when_all_task<void>, coro::detail::when_all_task<void>, coro::detail::when_all_task<void>, coro::detail::when_all_task<void>>>&&): pushq %r15 pushq %r14 pushq %rbx subq $0xb0, %rsp movq %rdi, %r14 movq %rsp, %r15 movq %r15, %rdi xorl %esi, %esi callq 0xc8a0c leaq -0x39b6(%rip), %rax # 0x9bd61 leaq 0x70(%rsp), %rbx movq %rax, -0x10(%rbx) leaq -0x392c(%rip), %rax # 0x9bdfb movq %rax, -0x8(%rbx) movq %r14, 0x30(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x8(%rbx) movq $0x0, 0x18(%rbx) movb $0x0, 0x38(%rbx) movq %r15, (%rbx) leaq 0x60(%rsp), %rdi callq 0x9bd61 movq %rsp, %rdi callq 0xc8a90 movq %rbx, %rdi callq 0x9fa06 movq %rax, %r14 movq %rbx, %rdi callq 0x9faa6 leaq 0x28(%rsp), %rdi callq 0x177a0 movq %r14, %rax addq $0xb0, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movq %rbx, %rdi callq 0x9faa6 leaq 0x28(%rsp), %rdi callq 0x177a0 movq %r14, %rdi callq 0x17740 nop
_ZN4coro9sync_waitITkNS_8concepts9awaitableENS_4taskIlEEOlEEDcOT_: push r15 push r14 push rbx sub rsp, 0B0h mov r14, rdi mov r15, rsp mov rdi, r15; this xor esi, esi; bool call _ZN4coro6detail15sync_wait_eventC2Eb; coro::detail::sync_wait_event::sync_wait_event(bool) lea rax, _ZN4coro6detailL19make_sync_wait_taskITkNS_8concepts9awaitableENS_4taskIlEEOlEENS0_14sync_wait_taskIT0_EEOT__resume lea rbx, [rsp+0C8h+var_58] mov [rbx-10h], rax lea rax, _ZN4coro6detailL19make_sync_wait_taskITkNS_8concepts9awaitableENS_4taskIlEEOlEENS0_14sync_wait_taskIT0_EEOT__cleanup mov [rbx-8], rax mov [rbx+30h], r14 xorps xmm0, xmm0 movups xmmword ptr [rbx+8], xmm0 mov qword ptr [rbx+18h], 0 mov byte ptr [rbx+38h], 0 mov [rbx], r15 lea rdi, [rsp+0C8h+var_68] call _ZN4coro6detailL19make_sync_wait_taskITkNS_8concepts9awaitableENS_4taskIlEEOlEENS0_14sync_wait_taskIT0_EEOT__resume mov rdi, rsp; this call _ZN4coro6detail15sync_wait_event4waitEv; coro::detail::sync_wait_event::wait(void) mov rdi, rbx call _ZNR4coro6detail22sync_wait_task_promiseIOlE6resultEv; coro::detail::sync_wait_task_promise<long &&>::result(void) mov r14, rax mov rdi, rbx call _ZN4coro6detail22sync_wait_task_promiseIOlED2Ev; coro::detail::sync_wait_task_promise<long &&>::~sync_wait_task_promise() lea rdi, [rsp+0C8h+var_A0]; this call __ZNSt18condition_variableD1Ev; std::condition_variable::~condition_variable() mov rax, r14 add rsp, 0B0h pop rbx pop r14 pop r15 retn mov r14, rax mov rdi, rbx call _ZN4coro6detail22sync_wait_task_promiseIOlED2Ev; coro::detail::sync_wait_task_promise<long &&>::~sync_wait_task_promise() lea rdi, [rsp+arg_20]; this call __ZNSt18condition_variableD1Ev; std::condition_variable::~condition_variable() mov rdi, r14 call __Unwind_Resume
long long ZN4coro9sync_waitITkNS_8concepts9awaitableENS_4taskIlEEOlEEDcOT_(long long a1) { long long v1; // r14 _BYTE v3[40]; // [rsp+0h] [rbp-C8h] BYREF _BYTE v4[56]; // [rsp+28h] [rbp-A0h] BYREF _QWORD v5[2]; // [rsp+60h] [rbp-68h] BYREF _BYTE *v6; // [rsp+70h] [rbp-58h] BYREF __int128 v7; // [rsp+78h] [rbp-50h] long long v8; // [rsp+88h] [rbp-40h] long long v9; // [rsp+A0h] [rbp-28h] char v10; // [rsp+A8h] [rbp-20h] coro::detail::sync_wait_event::sync_wait_event((coro::detail::sync_wait_event *)v3, 0); v5[0] = ZN4coro6detailL19make_sync_wait_taskITkNS_8concepts9awaitableENS_4taskIlEEOlEENS0_14sync_wait_taskIT0_EEOT__resume; v5[1] = ZN4coro6detailL19make_sync_wait_taskITkNS_8concepts9awaitableENS_4taskIlEEOlEENS0_14sync_wait_taskIT0_EEOT__cleanup; v9 = a1; v7 = 0LL; v8 = 0LL; v10 = 0; v6 = v3; ZN4coro6detailL19make_sync_wait_taskITkNS_8concepts9awaitableENS_4taskIlEEOlEENS0_14sync_wait_taskIT0_EEOT__resume((long long)v5); coro::detail::sync_wait_event::wait((coro::detail::sync_wait_event *)v3); v1 = coro::detail::sync_wait_task_promise<long &&>::result(&v6); coro::detail::sync_wait_task_promise<long &&>::~sync_wait_task_promise(&v6); std::condition_variable::~condition_variable((std::condition_variable *)v4); return v1; }
_ZN4coro9sync_waitITkNS_8concepts9awaitableENS_4taskIlEEOlEEDcOT_: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0xb0 MOV R14,RDI MOV R15,RSP MOV RDI,R15 XOR ESI,ESI CALL 0x001c8a0c LEA RAX,[0x19bd61] LEA RBX,[RSP + 0x70] MOV qword ptr [RBX + -0x10],RAX LEA RAX,[0x19bdfb] MOV qword ptr [RBX + -0x8],RAX MOV qword ptr [RBX + 0x30],R14 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x8],XMM0 MOV qword ptr [RBX + 0x18],0x0 MOV byte ptr [RBX + 0x38],0x0 MOV qword ptr [RBX],R15 LAB_0019f745: LEA RDI,[RSP + 0x60] CALL 0x0019bd61 MOV RDI,RSP CALL 0x001c8a90 MOV RDI,RBX CALL 0x0019fa06 LAB_0019f75f: MOV R14,RAX MOV RDI,RBX CALL 0x0019faa6 LEA RDI,[RSP + 0x28] CALL 0x001177a0 MOV RAX,R14 ADD RSP,0xb0 POP RBX POP R14 POP R15 RET
int8 _ZN4coro9sync_waitITkNS_8concepts9awaitableENS_4taskIlEEOlEEDcOT_(int8 param_1) { int8 uVar1; sync_wait_event asStack_c8 [40]; condition_variable local_a0 [56]; code *local_68; code *local_60; int1 *local_58; int8 local_50; int8 uStack_48; int8 local_40; int8 local_28; int1 local_20; coro::detail::sync_wait_event::sync_wait_event(asStack_c8,false); local_68 = _ZN4coro6detailL19make_sync_wait_taskITkNS_8concepts9awaitableENS_4taskIlEEOlEENS0_14sync_wait_taskIT0_EEOT__resume ; local_60 = _ZN4coro6detailL19make_sync_wait_taskITkNS_8concepts9awaitableENS_4taskIlEEOlEENS0_14sync_wait_taskIT0_EEOT__cleanup ; local_50 = 0; uStack_48 = 0; local_40 = 0; local_20 = 0; /* try { // try from 0019f745 to 0019f75e has its CatchHandler @ 0019f784 */ local_58 = asStack_c8; local_28 = param_1; _ZN4coro6detailL19make_sync_wait_taskITkNS_8concepts9awaitableENS_4taskIlEEOlEENS0_14sync_wait_taskIT0_EEOT__resume (&local_68); coro::detail::sync_wait_event::wait(asStack_c8); uVar1 = coro::detail::sync_wait_task_promise<long&&>::result ((sync_wait_task_promise<long&&> *)&local_58); coro::detail::sync_wait_task_promise<long&&>::~sync_wait_task_promise ((sync_wait_task_promise<long&&> *)&local_58); std::condition_variable::~condition_variable(local_a0); return uVar1; }
19,212
GetMonitorHeight
csit-sgu[P]mit-game-2025-team-tyler/Libraries/raylib/src/platforms/rcore_desktop_glfw.c
int GetMonitorHeight(int monitor) { int height = 0; int monitorCount = 0; GLFWmonitor **monitors = glfwGetMonitors(&monitorCount); if ((monitor >= 0) && (monitor < monitorCount)) { const GLFWvidmode *mode = glfwGetVideoMode(monitors[monitor]); if (mode) height = mode->height; else TRACELOG(LOG_WARNING, "GLFW: Failed to find video mode for selected monitor"); } else TRACELOG(LOG_WARNING, "GLFW: Failed to find selected monitor"); return height; }
O3
c
GetMonitorHeight: pushq %rbx subq $0x10, %rsp movl %edi, %ebx leaq 0xc(%rsp), %rdi movl $0x0, (%rdi) callq 0xbf116 testl %ebx, %ebx js 0x703ce cmpl %ebx, 0xc(%rsp) jle 0x703ce movl %ebx, %ecx movq (%rax,%rcx,8), %rdi callq 0xbf4ff testq %rax, %rax je 0x703d7 movl 0x4(%rax), %ebx jmp 0x703ec leaq 0x6f52d(%rip), %rsi # 0xdf902 jmp 0x703de leaq 0x6f4ef(%rip), %rsi # 0xdf8cd xorl %ebx, %ebx movl $0x4, %edi xorl %eax, %eax callq 0xb9e53 movl %ebx, %eax addq $0x10, %rsp popq %rbx retq
GetMonitorHeight: push rbx sub rsp, 10h mov ebx, edi lea rdi, [rsp+18h+var_C] mov dword ptr [rdi], 0 call glfwGetMonitors test ebx, ebx js short loc_703CE cmp [rsp+18h+var_C], ebx jle short loc_703CE mov ecx, ebx mov rdi, [rax+rcx*8] call glfwGetVideoMode test rax, rax jz short loc_703D7 mov ebx, [rax+4] jmp short loc_703EC loc_703CE: lea rsi, aGlfwFailedToFi_0; "GLFW: Failed to find selected monitor" jmp short loc_703DE loc_703D7: lea rsi, aGlfwFailedToFi; "GLFW: Failed to find video mode for sel"... loc_703DE: xor ebx, ebx mov edi, 4 xor eax, eax call TraceLog loc_703EC: mov eax, ebx add rsp, 10h pop rbx retn
long long GetMonitorHeight(int a1) { long long Monitors; // rax int v2; // edx int v3; // ecx int v4; // r8d int v5; // r9d long long VideoMode; // rax unsigned int v7; // ebx const char *v8; // rsi int v10[3]; // [rsp+Ch] [rbp-Ch] BYREF v10[0] = 0; Monitors = glfwGetMonitors(v10); if ( a1 < 0 || v10[0] <= a1 ) { v8 = "GLFW: Failed to find selected monitor"; LABEL_7: v7 = 0; TraceLog(4, (_DWORD)v8, v2, v3, v4, v5); return v7; } VideoMode = glfwGetVideoMode(*(_QWORD *)(Monitors + 8LL * (unsigned int)a1)); if ( !VideoMode ) { v8 = "GLFW: Failed to find video mode for selected monitor"; goto LABEL_7; } return *(unsigned int *)(VideoMode + 4); }
GetMonitorHeight: PUSH RBX SUB RSP,0x10 MOV EBX,EDI LEA RDI,[RSP + 0xc] MOV dword ptr [RDI],0x0 CALL 0x001bf116 TEST EBX,EBX JS 0x001703ce CMP dword ptr [RSP + 0xc],EBX JLE 0x001703ce MOV ECX,EBX MOV RDI,qword ptr [RAX + RCX*0x8] CALL 0x001bf4ff TEST RAX,RAX JZ 0x001703d7 MOV EBX,dword ptr [RAX + 0x4] JMP 0x001703ec LAB_001703ce: LEA RSI,[0x1df902] JMP 0x001703de LAB_001703d7: LEA RSI,[0x1df8cd] LAB_001703de: XOR EBX,EBX MOV EDI,0x4 XOR EAX,EAX CALL 0x001b9e53 LAB_001703ec: MOV EAX,EBX ADD RSP,0x10 POP RBX RET
int4 GetMonitorHeight(uint param_1) { long lVar1; char *pcVar2; lVar1 = glfwGetMonitors(); if (((int)param_1 < 0) || (-1 < (int)param_1)) { pcVar2 = "GLFW: Failed to find selected monitor"; } else { lVar1 = glfwGetVideoMode(*(int8 *)(lVar1 + (ulong)param_1 * 8)); if (lVar1 != 0) { return *(int4 *)(lVar1 + 4); } pcVar2 = "GLFW: Failed to find video mode for selected monitor"; } TraceLog(4,pcVar2); return 0; }
19,213
LefDefParser::defiVpin::Init(char const*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiNet.cpp
void defiVpin::Init(const char* name) { int len = strlen(name) + 1; name_ = (char*)malloc(len); strcpy(name_, defData->DEFCASE(name)); orient_ = -1; status_ = ' '; layer_ = 0; }
O0
cpp
LefDefParser::defiVpin::Init(char const*): subq $0x28, %rsp movq %rdi, 0x20(%rsp) movq %rsi, 0x18(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x18(%rsp), %rdi callq 0x70e0 addq $0x1, %rax movl %eax, 0x14(%rsp) movslq 0x14(%rsp), %rdi callq 0x72d0 movq %rax, %rcx movq 0x8(%rsp), %rax movq %rcx, 0x20(%rax) movq 0x20(%rax), %rcx movq %rcx, (%rsp) movq 0x30(%rax), %rdi movq 0x18(%rsp), %rsi callq 0x27ed0 movq (%rsp), %rdi movq %rax, %rsi callq 0x7220 movq 0x8(%rsp), %rax movl $0xffffffff, 0x10(%rax) # imm = 0xFFFFFFFF movb $0x20, 0x14(%rax) movq $0x0, 0x28(%rax) addq $0x28, %rsp retq nop
_ZN12LefDefParser8defiVpin4InitEPKc: sub rsp, 28h mov [rsp+28h+var_8], rdi mov [rsp+28h+var_10], rsi mov rax, [rsp+28h+var_8] mov [rsp+28h+var_20], rax mov rdi, [rsp+28h+var_10] call _strlen add rax, 1 mov [rsp+28h+var_14], eax movsxd rdi, [rsp+28h+var_14] call _malloc mov rcx, rax mov rax, [rsp+28h+var_20] mov [rax+20h], rcx mov rcx, [rax+20h] mov [rsp+28h+var_28], rcx mov rdi, [rax+30h]; this mov rsi, [rsp+28h+var_10]; char * call _ZN12LefDefParser8defrData7DEFCASEEPKc; LefDefParser::defrData::DEFCASE(char const*) mov rdi, [rsp+28h+var_28] mov rsi, rax call _strcpy mov rax, [rsp+28h+var_20] mov dword ptr [rax+10h], 0FFFFFFFFh mov byte ptr [rax+14h], 20h ; ' ' mov qword ptr [rax+28h], 0 add rsp, 28h retn
LefDefParser::defiVpin * LefDefParser::defiVpin::Init(LefDefParser::defiVpin *this, const char *a2) { const char *v2; // rax long long v3; // rdx LefDefParser::defiVpin *result; // rax long long v5; // [rsp+0h] [rbp-28h] int v6; // [rsp+14h] [rbp-14h] v6 = strlen(a2) + 1; *((_QWORD *)this + 4) = malloc(v6); v5 = *((_QWORD *)this + 4); v2 = LefDefParser::defrData::DEFCASE(*((LefDefParser::defrData **)this + 6), a2); strcpy(v5, v2, v3); result = this; *((_DWORD *)this + 4) = -1; *((_BYTE *)this + 20) = 32; *((_QWORD *)this + 5) = 0LL; return result; }
Init: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x18],RSI MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x18] CALL 0x001070e0 ADD RAX,0x1 MOV dword ptr [RSP + 0x14],EAX MOVSXD RDI,dword ptr [RSP + 0x14] CALL 0x001072d0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x20],RCX MOV RCX,qword ptr [RAX + 0x20] MOV qword ptr [RSP],RCX MOV RDI,qword ptr [RAX + 0x30] MOV RSI,qword ptr [RSP + 0x18] CALL 0x00127ed0 MOV RDI,qword ptr [RSP] MOV RSI,RAX CALL 0x00107220 MOV RAX,qword ptr [RSP + 0x8] MOV dword ptr [RAX + 0x10],0xffffffff MOV byte ptr [RAX + 0x14],0x20 MOV qword ptr [RAX + 0x28],0x0 ADD RSP,0x28 RET
/* LefDefParser::defiVpin::Init(char const*) */ void __thiscall LefDefParser::defiVpin::Init(defiVpin *this,char *param_1) { char *__dest; size_t sVar1; void *pvVar2; char *__src; sVar1 = strlen(param_1); pvVar2 = malloc((long)((int)sVar1 + 1)); *(void **)(this + 0x20) = pvVar2; __dest = *(char **)(this + 0x20); __src = (char *)defrData::DEFCASE(*(defrData **)(this + 0x30),param_1); strcpy(__dest,__src); *(int4 *)(this + 0x10) = 0xffffffff; this[0x14] = (defiVpin)0x20; *(int8 *)(this + 0x28) = 0; return; }
19,214
wt_end
eloqsql/mysys/waiting_threads.c
void wt_end() { DBUG_ENTER("wt_end"); if (!wt_init_done) DBUG_VOID_RETURN; DBUG_ASSERT(reshash.count == 0); lf_hash_destroy(&reshash); reshash.alloc.constructor= NULL; wt_init_done= 0; DBUG_VOID_RETURN; }
O3
c
wt_end: cmpb $0x1, 0xb66af3(%rip) # 0xc14ef0 jne 0xae422 pushq %rbp movq %rsp, %rbp leaq 0xb667d6(%rip), %rdi # 0xc14be0 callq 0xad61e movq $0x0, 0xb66846(%rip) # 0xc14c60 movb $0x0, 0xb66acf(%rip) # 0xc14ef0 popq %rbp retq
wt_end: cmp cs:wt_init_done, 1 jnz short locret_AE422 push rbp mov rbp, rsp lea rdi, reshash call lf_hash_destroy mov cs:qword_C14C60, 0 mov cs:wt_init_done, 0 pop rbp locret_AE422: retn
long long wt_end() { long long result; // rax if ( wt_init_done == 1 ) { result = lf_hash_destroy((long long)&reshash); qword_C14C60 = 0LL; wt_init_done = 0; } return result; }
wt_end: CMP byte ptr [0x00d14ef0],0x1 JNZ 0x001ae422 PUSH RBP MOV RBP,RSP LEA RDI,[0xd14be0] CALL 0x001ad61e MOV qword ptr [0x00d14c60],0x0 MOV byte ptr [0x00d14ef0],0x0 POP RBP LAB_001ae422: RET
void wt_end(void) { if (wt_init_done == '\x01') { lf_hash_destroy(reshash); reshash._128_8_ = 0; wt_init_done = '\0'; } return; }
19,215
FTB_WORD_cmp
eloqsql/storage/myisam/ft_boolean_search.c
static int FTB_WORD_cmp(my_off_t *v, FTB_WORD *a, FTB_WORD *b) { int i; /* if a==curdoc, take it as a < b */ if (v && a->docid[0] == *v) return -1; /* ORDER BY docid, ndepth DESC */ i=CMP_NUM(a->docid[0], b->docid[0]); if (!i) i=CMP_NUM(b->ndepth,a->ndepth); return i; }
O0
c
FTB_WORD_cmp: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) cmpq $0x0, -0x10(%rbp) je 0x9fb94 movq -0x18(%rbp), %rax movq 0x10(%rax), %rax movq -0x10(%rbp), %rcx cmpq (%rcx), %rax jne 0x9fb94 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x9fc1f movq -0x18(%rbp), %rax movq 0x10(%rax), %rax movq -0x20(%rbp), %rcx cmpq 0x10(%rcx), %rax jae 0x9fbb0 movl $0xffffffff, %eax # imm = 0xFFFFFFFF movl %eax, -0x28(%rbp) jmp 0x9fbd0 movq -0x18(%rbp), %rax movq 0x10(%rax), %rdx movq -0x20(%rbp), %rax movq 0x10(%rax), %rsi movl $0x1, %eax xorl %ecx, %ecx cmpq %rsi, %rdx cmovel %ecx, %eax movl %eax, -0x28(%rbp) movl -0x28(%rbp), %eax movl %eax, -0x24(%rbp) cmpl $0x0, -0x24(%rbp) jne 0x9fc19 movq -0x20(%rbp), %rax movl 0x44(%rax), %eax movq -0x18(%rbp), %rcx cmpl 0x44(%rcx), %eax jae 0x9fbf6 movl $0xffffffff, %eax # imm = 0xFFFFFFFF movl %eax, -0x2c(%rbp) jmp 0x9fc13 movq -0x20(%rbp), %rax movl 0x44(%rax), %edx movq -0x18(%rbp), %rax movl 0x44(%rax), %esi movl $0x1, %eax xorl %ecx, %ecx cmpl %esi, %edx cmovel %ecx, %eax movl %eax, -0x2c(%rbp) movl -0x2c(%rbp), %eax movl %eax, -0x24(%rbp) movl -0x24(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw %cs:(%rax,%rax)
FTB_WORD_cmp: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx cmp [rbp+var_10], 0 jz short loc_9FB94 mov rax, [rbp+var_18] mov rax, [rax+10h] mov rcx, [rbp+var_10] cmp rax, [rcx] jnz short loc_9FB94 mov [rbp+var_4], 0FFFFFFFFh jmp loc_9FC1F loc_9FB94: mov rax, [rbp+var_18] mov rax, [rax+10h] mov rcx, [rbp+var_20] cmp rax, [rcx+10h] jnb short loc_9FBB0 mov eax, 0FFFFFFFFh mov [rbp+var_28], eax jmp short loc_9FBD0 loc_9FBB0: mov rax, [rbp+var_18] mov rdx, [rax+10h] mov rax, [rbp+var_20] mov rsi, [rax+10h] mov eax, 1 xor ecx, ecx cmp rdx, rsi cmovz eax, ecx mov [rbp+var_28], eax loc_9FBD0: mov eax, [rbp+var_28] mov [rbp+var_24], eax cmp [rbp+var_24], 0 jnz short loc_9FC19 mov rax, [rbp+var_20] mov eax, [rax+44h] mov rcx, [rbp+var_18] cmp eax, [rcx+44h] jnb short loc_9FBF6 mov eax, 0FFFFFFFFh mov [rbp+var_2C], eax jmp short loc_9FC13 loc_9FBF6: mov rax, [rbp+var_20] mov edx, [rax+44h] mov rax, [rbp+var_18] mov esi, [rax+44h] mov eax, 1 xor ecx, ecx cmp edx, esi cmovz eax, ecx mov [rbp+var_2C], eax loc_9FC13: mov eax, [rbp+var_2C] mov [rbp+var_24], eax loc_9FC19: mov eax, [rbp+var_24] mov [rbp+var_4], eax loc_9FC1F: mov eax, [rbp+var_4] pop rbp retn
long long FTB_WORD_cmp(_QWORD *a1, long long a2, long long a3) { int v5; // [rsp+4h] [rbp-28h] unsigned int v6; // [rsp+8h] [rbp-24h] if ( a1 && *(_QWORD *)(a2 + 16) == *a1 ) { return (unsigned int)-1; } else { if ( *(_QWORD *)(a2 + 16) >= *(_QWORD *)(a3 + 16) ) v5 = *(_QWORD *)(a2 + 16) != *(_QWORD *)(a3 + 16); else v5 = -1; v6 = v5; if ( !v5 ) { if ( *(_DWORD *)(a3 + 68) >= *(_DWORD *)(a2 + 68) ) return *(_DWORD *)(a3 + 68) != *(_DWORD *)(a2 + 68); else return (unsigned int)-1; } return v6; } }
FTB_WORD_cmp: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX CMP qword ptr [RBP + -0x10],0x0 JZ 0x0019fb94 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX] JNZ 0x0019fb94 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0019fc1f LAB_0019fb94: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RCX + 0x10] JNC 0x0019fbb0 MOV EAX,0xffffffff MOV dword ptr [RBP + -0x28],EAX JMP 0x0019fbd0 LAB_0019fbb0: MOV RAX,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RAX + 0x10] MOV EAX,0x1 XOR ECX,ECX CMP RDX,RSI CMOVZ EAX,ECX MOV dword ptr [RBP + -0x28],EAX LAB_0019fbd0: MOV EAX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x24],EAX CMP dword ptr [RBP + -0x24],0x0 JNZ 0x0019fc19 MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x44] MOV RCX,qword ptr [RBP + -0x18] CMP EAX,dword ptr [RCX + 0x44] JNC 0x0019fbf6 MOV EAX,0xffffffff MOV dword ptr [RBP + -0x2c],EAX JMP 0x0019fc13 LAB_0019fbf6: MOV RAX,qword ptr [RBP + -0x20] MOV EDX,dword ptr [RAX + 0x44] MOV RAX,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RAX + 0x44] MOV EAX,0x1 XOR ECX,ECX CMP EDX,ESI CMOVZ EAX,ECX MOV dword ptr [RBP + -0x2c],EAX LAB_0019fc13: MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x24],EAX LAB_0019fc19: MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x4],EAX LAB_0019fc1f: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
uint FTB_WORD_cmp(long *param_1,long param_2,long param_3) { uint local_34; uint local_30; uint local_2c; uint local_c; if ((param_1 == (long *)0x0) || (*(long *)(param_2 + 0x10) != *param_1)) { if (*(ulong *)(param_2 + 0x10) < *(ulong *)(param_3 + 0x10)) { local_30 = 0xffffffff; } else { local_30 = (uint)(*(long *)(param_2 + 0x10) != *(long *)(param_3 + 0x10)); } local_2c = local_30; if (local_30 == 0) { if (*(uint *)(param_3 + 0x44) < *(uint *)(param_2 + 0x44)) { local_34 = 0xffffffff; } else { local_34 = (uint)(*(int *)(param_3 + 0x44) != *(int *)(param_2 + 0x44)); } local_2c = local_34; } local_c = local_2c; } else { local_c = 0xffffffff; } return local_c; }
19,216
nglog::LogDestination::LogDestination(nglog::LogSeverity, char const*)
ng-log[P]ng-log/src/logging.cc
LogDestination::LogDestination(LogSeverity severity, const char* base_filename) : fileobject_(severity, base_filename), logger_(&fileobject_) {}
O2
cpp
nglog::LogDestination::LogDestination(nglog::LogSeverity, char const*): pushq %rbp pushq %r14 pushq %rbx subq $0x10, %rsp movl %esi, %ebp movq %rdi, %rbx leaq 0x24724(%rip), %rax # 0x2d830 movq %rax, (%rdi) xorps %xmm0, %xmm0 movups %xmm0, 0x8(%rdi) movups %xmm0, 0x18(%rdi) andq $0x0, 0x28(%rdi) testq %rdx, %rdx setne 0x30(%rdi) leaq 0x38(%rdi), %r14 leaq 0x15aee(%rip), %rsi # 0x1ec1f cmovneq %rdx, %rsi leaq 0xf(%rsp), %rdx movq %r14, %rdi callq 0x8d9c callq 0x1c915 leaq 0x58(%rbx), %rdi leaq 0xe(%rsp), %rdx movq %rax, %rsi callq 0x8d9c leaq 0x88(%rbx), %rax movq %rax, 0x78(%rbx) andq $0x0, 0x80(%rbx) movb $0x0, 0x88(%rbx) andq $0x0, 0x98(%rbx) movl %ebp, 0xa0(%rbx) movaps 0x15309(%rip), %xmm0 # 0x1e490 movups %xmm0, 0xa4(%rbx) andq $0x0, 0xb8(%rbx) callq 0x7070 movq %rax, 0xc0(%rbx) movq %rbx, 0xc8(%rbx) addq $0x10, %rsp popq %rbx popq %r14 popq %rbp retq jmp 0x91b4 movq %rax, %rbx movq %r14, %rdi callq 0x7b38 movq %rbx, %rdi callq 0x7a00 nop
_ZN5nglog14LogDestinationC2ENS_11LogSeverityEPKc: push rbp; Alternative name is 'nglog::LogDestination::LogDestination(nglog::LogSeverity, char const*)' push r14 push rbx sub rsp, 10h mov ebp, esi mov rbx, rdi lea rax, off_2D830 mov [rdi], rax xorps xmm0, xmm0 movups xmmword ptr [rdi+8], xmm0 movups xmmword ptr [rdi+18h], xmm0 and qword ptr [rdi+28h], 0 test rdx, rdx setnz byte ptr [rdi+30h] lea r14, [rdi+38h] lea rsi, asc_1EC1D+2; "" cmovnz rsi, rdx lea rdx, [rsp+28h+var_19] mov rdi, r14; this call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) call _ZN5nglog5tools26ProgramInvocationShortNameEv; nglog::tools::ProgramInvocationShortName(void) lea rdi, [rbx+58h]; this lea rdx, [rsp+28h+var_1A] mov rsi, rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rax, [rbx+88h] mov [rbx+78h], rax and qword ptr [rbx+80h], 0 mov byte ptr [rbx+88h], 0 and qword ptr [rbx+98h], 0 mov [rbx+0A0h], ebp movaps xmm0, cs:xmmword_1E490 movups xmmword ptr [rbx+0A4h], xmm0 and qword ptr [rbx+0B8h], 0 call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void) mov [rbx+0C0h], rax mov [rbx+0C8h], rbx add rsp, 10h pop rbx pop r14 pop rbp retn jmp short $+2 loc_91B4: mov rbx, rax mov rdi, r14; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
long long nglog::LogDestination::LogDestination(long long a1, int a2, char *a3) { char *v5; // rsi nglog::tools *v6; // rdi long long v7; // rax long long result; // rax *(_QWORD *)a1 = off_2D830; *(_OWORD *)(a1 + 8) = 0LL; *(_OWORD *)(a1 + 24) = 0LL; *(_QWORD *)(a1 + 40) = 0LL; *(_BYTE *)(a1 + 48) = a3 != 0LL; v5 = ""; if ( a3 ) v5 = a3; v6 = (nglog::tools *)(a1 + 56); std::string::basic_string<std::allocator<char>>(v6, (long long)v5); v7 = nglog::tools::ProgramInvocationShortName(v6); std::string::basic_string<std::allocator<char>>((_QWORD *)(a1 + 88), v7); *(_QWORD *)(a1 + 120) = a1 + 136; *(_QWORD *)(a1 + 128) = 0LL; *(_BYTE *)(a1 + 136) = 0; *(_QWORD *)(a1 + 152) = 0LL; *(_DWORD *)(a1 + 160) = a2; *(_OWORD *)(a1 + 164) = xmmword_1E490; *(_QWORD *)(a1 + 184) = 0LL; result = std::chrono::_V2::system_clock::now((std::chrono::_V2::system_clock *)(a1 + 88)); *(_QWORD *)(a1 + 192) = result; *(_QWORD *)(a1 + 200) = a1; return result; }
LogDestination: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x10 MOV EBP,ESI MOV RBX,RDI LEA RAX,[0x12d830] MOV qword ptr [RDI],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x8],XMM0 MOVUPS xmmword ptr [RDI + 0x18],XMM0 AND qword ptr [RDI + 0x28],0x0 TEST RDX,RDX SETNZ byte ptr [RDI + 0x30] LEA R14,[RDI + 0x38] LEA RSI,[0x11ec1f] CMOVNZ RSI,RDX LEA RDX,[RSP + 0xf] MOV RDI,R14 CALL 0x00108d9c LAB_00109142: CALL 0x0011c915 LEA RDI,[RBX + 0x58] LAB_0010914b: LEA RDX,[RSP + 0xe] MOV RSI,RAX CALL 0x00108d9c LAB_00109158: LEA RAX,[RBX + 0x88] MOV qword ptr [RBX + 0x78],RAX AND qword ptr [RBX + 0x80],0x0 MOV byte ptr [RBX + 0x88],0x0 AND qword ptr [RBX + 0x98],0x0 MOV dword ptr [RBX + 0xa0],EBP MOVAPS XMM0,xmmword ptr [0x0011e490] MOVUPS xmmword ptr [RBX + 0xa4],XMM0 AND qword ptr [RBX + 0xb8],0x0 CALL 0x00107070 MOV qword ptr [RBX + 0xc0],RAX MOV qword ptr [RBX + 0xc8],RBX ADD RSP,0x10 POP RBX POP R14 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* nglog::LogDestination::LogDestination(nglog::LogSeverity, char const*) */ void __thiscall nglog::LogDestination::LogDestination(LogDestination *this,int4 param_2,char *param_3) { char *pcVar1; int8 uVar2; allocator local_1a; allocator local_19; *(int ***)this = &PTR__LogFileObject_0012d830; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; this[0x30] = (LogDestination)(param_3 != (char *)0x0); pcVar1 = ""; if (param_3 != (char *)0x0) { pcVar1 = param_3; } std::__cxx11::string::string<std::allocator<char>>((string *)(this + 0x38),pcVar1,&local_19); /* try { // try from 00109142 to 00109146 has its CatchHandler @ 001091b4 */ pcVar1 = (char *)tools::ProgramInvocationShortName(); /* try { // try from 0010914b to 00109157 has its CatchHandler @ 001091b2 */ std::__cxx11::string::string<std::allocator<char>>((string *)(this + 0x58),pcVar1,&local_1a); *(LogDestination **)(this + 0x78) = this + 0x88; *(int8 *)(this + 0x80) = 0; this[0x88] = (LogDestination)0x0; *(int8 *)(this + 0x98) = 0; *(int4 *)(this + 0xa0) = param_2; uVar2 = _UNK_0011e498; *(int8 *)(this + 0xa4) = _DAT_0011e490; *(int8 *)(this + 0xac) = uVar2; *(int8 *)(this + 0xb8) = 0; uVar2 = std::chrono::_V2::system_clock::now(); *(int8 *)(this + 0xc0) = uVar2; *(LogDestination **)(this + 200) = this; return; }
19,217
minja::VariableExpr::VariableExpr(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/minja.hpp
VariableExpr(const Location & location, const std::string& n) : Expression(location), name(n) {}
O1
cpp
minja::VariableExpr::VariableExpr(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %rbx movq %rdi, %rbx leaq 0x92529(%rip), %r15 # 0x12a3a8 addq $0x10, %r15 movq %r15, (%rdi) movq (%rsi), %rax movq %rax, 0x8(%rdi) movq 0x8(%rsi), %rax movq %rax, 0x10(%rdi) testq %rax, %rax je 0x97eaf movq 0x940df(%rip), %rcx # 0x12bf80 cmpb $0x0, (%rcx) je 0x97eab incl 0x8(%rax) jmp 0x97eaf lock incl 0x8(%rax) movq 0x10(%rsi), %rax movq %rax, 0x18(%rbx) leaq 0x92ef2(%rip), %rax # 0x12adb0 addq $0x10, %rax movq %rax, (%rbx) leaq 0x20(%rbx), %rdi leaq 0x30(%rbx), %rax movq %rax, 0x20(%rbx) movq (%rdx), %rsi movq 0x8(%rdx), %rdx addq %rsi, %rdx callq 0x210f0 popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movq %r15, (%rbx) movq 0x10(%rbx), %rdi testq %rdi, %rdi je 0x97efa callq 0x6c090 movq %r14, %rdi callq 0x1af20
_ZN5minja12VariableExprC2ERKNS_8LocationERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r15 push r14 push rbx mov rbx, rdi lea r15, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression add r15, 10h mov [rdi], r15 mov rax, [rsi] mov [rdi+8], rax mov rax, [rsi+8] mov [rdi+10h], rax test rax, rax jz short loc_97EAF mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_97EAB inc dword ptr [rax+8] jmp short loc_97EAF loc_97EAB: lock inc dword ptr [rax+8] loc_97EAF: mov rax, [rsi+10h] mov [rbx+18h], rax lea rax, _ZTVN5minja12VariableExprE; `vtable for'minja::VariableExpr add rax, 10h mov [rbx], rax lea rdi, [rbx+20h] lea rax, [rbx+30h] mov [rbx+20h], rax mov rsi, [rdx] mov rdx, [rdx+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) pop rbx pop r14 pop r15 retn mov r14, rax mov [rbx], r15 mov rdi, [rbx+10h] test rdi, rdi jz short loc_97EFA call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_97EFA: mov rdi, r14 call __Unwind_Resume
long long minja::VariableExpr::VariableExpr(_QWORD *a1, _QWORD *a2, long long a3) { long long v3; // rax *a1 = &`vtable for'minja::Expression + 2; a1[1] = *a2; v3 = a2[1]; a1[2] = v3; if ( v3 ) { if ( _libc_single_threaded ) ++*(_DWORD *)(v3 + 8); else _InterlockedIncrement((volatile signed __int32 *)(v3 + 8)); } a1[3] = a2[2]; *a1 = &`vtable for'minja::VariableExpr + 2; a1[4] = a1 + 6; return std::string::_M_construct<char *>(a1 + 4, *(_BYTE **)a3, *(_QWORD *)a3 + *(_QWORD *)(a3 + 8)); }
VariableExpr: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RDI LEA R15,[0x22a3a8] ADD R15,0x10 MOV qword ptr [RDI],R15 MOV RAX,qword ptr [RSI] MOV qword ptr [RDI + 0x8],RAX MOV RAX,qword ptr [RSI + 0x8] MOV qword ptr [RDI + 0x10],RAX TEST RAX,RAX JZ 0x00197eaf MOV RCX,qword ptr [0x0022bf80] CMP byte ptr [RCX],0x0 JZ 0x00197eab INC dword ptr [RAX + 0x8] JMP 0x00197eaf LAB_00197eab: INC.LOCK dword ptr [RAX + 0x8] LAB_00197eaf: MOV RAX,qword ptr [RSI + 0x10] MOV qword ptr [RBX + 0x18],RAX LEA RAX,[0x22adb0] ADD RAX,0x10 MOV qword ptr [RBX],RAX LEA RDI,[RBX + 0x20] LEA RAX,[RBX + 0x30] MOV qword ptr [RBX + 0x20],RAX MOV RSI,qword ptr [RDX] MOV RDX,qword ptr [RDX + 0x8] ADD RDX,RSI LAB_00197edb: CALL 0x001210f0 LAB_00197ee0: POP RBX POP R14 POP R15 RET
/* minja::VariableExpr::VariableExpr(minja::Location const&, std::__cxx11::string const&) */ void __thiscall minja::VariableExpr::VariableExpr(VariableExpr *this,Location *param_1,string *param_2) { long lVar1; *(int ***)this = &PTR___cxa_pure_virtual_0022a3b8; *(int8 *)(this + 8) = *(int8 *)param_1; lVar1 = *(long *)(param_1 + 8); *(long *)(this + 0x10) = lVar1; if (lVar1 != 0) { if (*PTR___libc_single_threaded_0022bf80 == '\0') { LOCK(); *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; UNLOCK(); } else { *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; } } *(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10); *(int ***)this = &PTR_do_evaluate_0022adc0; *(VariableExpr **)(this + 0x20) = this + 0x30; /* try { // try from 00197edb to 00197edf has its CatchHandler @ 00197ee6 */ std::__cxx11::string::_M_construct<char*> (this + 0x20,*(long *)param_2,*(long *)(param_2 + 8) + *(long *)param_2); return; }
19,218
minja::VariableExpr::VariableExpr(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/minja.hpp
VariableExpr(const Location & location, const std::string& n) : Expression(location), name(n) {}
O3
cpp
minja::VariableExpr::VariableExpr(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbx movq %rdi, %rbx leaq 0x91323(%rip), %rax # 0x128db0 addq $0x10, %rax movq %rax, (%rdi) movq 0x20(%rdi), %rdi leaq 0x30(%rbx), %rax cmpq %rax, %rdi je 0x97aac movq (%rax), %rsi incq %rsi callq 0x1a890 leaq 0x908f5(%rip), %rax # 0x1283a8 addq $0x10, %rax movq %rax, (%rbx) movq 0x10(%rbx), %rdi testq %rdi, %rdi je 0x97ac8 callq 0x6c8e8 movl $0x40, %esi movq %rbx, %rdi popq %rbx jmp 0x1a890
_ZN5minja12VariableExprD0Ev: push rbx mov rbx, rdi lea rax, _ZTVN5minja12VariableExprE; `vtable for'minja::VariableExpr add rax, 10h mov [rdi], rax mov rdi, [rdi+20h]; void * lea rax, [rbx+30h] cmp rdi, rax jz short loc_97AAC mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_97AAC: lea rax, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression add rax, 10h mov [rbx], rax mov rdi, [rbx+10h] test rdi, rdi jz short loc_97AC8 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_97AC8: mov esi, 40h ; '@'; unsigned __int64 mov rdi, rbx; void * pop rbx jmp __ZdlPvm; operator delete(void *,ulong)
void minja::VariableExpr::~VariableExpr(minja::VariableExpr *this) { char *v2; // rdi volatile signed __int32 *v3; // rdi *(_QWORD *)this = &`vtable for'minja::VariableExpr + 2; v2 = (char *)*((_QWORD *)this + 4); if ( v2 != (char *)this + 48 ) operator delete(v2, *((_QWORD *)this + 6) + 1LL); *(_QWORD *)this = &`vtable for'minja::Expression + 2; v3 = (volatile signed __int32 *)*((_QWORD *)this + 2); if ( v3 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3); operator delete(this, 0x40uLL); }
~VariableExpr: PUSH RBX MOV RBX,RDI LEA RAX,[0x228db0] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV RDI,qword ptr [RDI + 0x20] LEA RAX,[RBX + 0x30] CMP RDI,RAX JZ 0x00197aac MOV RSI,qword ptr [RAX] INC RSI CALL 0x0011a890 LAB_00197aac: LEA RAX,[0x2283a8] ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RBX + 0x10] TEST RDI,RDI JZ 0x00197ac8 CALL 0x0016c8e8 LAB_00197ac8: MOV ESI,0x40 MOV RDI,RBX POP RBX JMP 0x0011a890
/* minja::VariableExpr::~VariableExpr() */ void __thiscall minja::VariableExpr::~VariableExpr(VariableExpr *this) { *(int ***)this = &PTR_do_evaluate_00228dc0; if (*(VariableExpr **)(this + 0x20) != this + 0x30) { operator_delete(*(VariableExpr **)(this + 0x20),*(long *)(this + 0x30) + 1); } *(int ***)this = &PTR___cxa_pure_virtual_002283b8; if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10)); } operator_delete(this,0x40); return; }
19,219
ggml_compute_forward_diag_mask_zero
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp
void ggml_compute_forward_diag_mask_zero( const ggml_compute_params * params, ggml_tensor * dst) { const ggml_tensor * src0 = dst->src[0]; switch (src0->type) { case GGML_TYPE_F32: { ggml_compute_forward_diag_mask_f32(params, dst, 0); } break; default: { GGML_ABORT("fatal error"); } } }
O3
cpp
ggml_compute_forward_diag_mask_zero: movq 0x98(%rsi), %rax cmpl $0x0, (%rax) jne 0x3c06b vxorps %xmm0, %xmm0, %xmm0 jmp 0x3be65 pushq %rax leaq 0x16a2d(%rip), %rdi # 0x52aa0 leaq 0xc606(%rip), %rdx # 0x48680 movl $0x121a, %esi # imm = 0x121A xorl %eax, %eax callq 0xaf40
ggml_compute_forward_diag_mask_zero: mov rax, [rsi+98h] cmp dword ptr [rax], 0 jnz short loc_3C06B vxorps xmm0, xmm0, xmm0 jmp _ZL34ggml_compute_forward_diag_mask_f32PK19ggml_compute_paramsP11ggml_tensorf; ggml_compute_forward_diag_mask_f32(ggml_compute_params const*,ggml_tensor *,float) loc_3C06B: push rax lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aFatalError; "fatal error" mov esi, 121Ah xor eax, eax call _ggml_abort
long long ggml_compute_forward_diag_mask_zero(int *a1, long long a2, __m128 _XMM0) { if ( **(_DWORD **)(a2 + 152) ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp", 4634LL, "fatal error"); return ggml_compute_forward_soft_max(); } else { __asm { vxorps xmm0, xmm0, xmm0 } return ggml_compute_forward_diag_mask_f32(a1, a2, _XMM0); } }
ggml_compute_forward_diag_mask_zero: MOV RAX,qword ptr [RSI + 0x98] CMP dword ptr [RAX],0x0 JNZ 0x0013c06b VXORPS XMM0,XMM0,XMM0 JMP 0x0013be65 LAB_0013c06b: PUSH RAX LEA RDI,[0x152aa0] LEA RDX,[0x148680] MOV ESI,0x121a XOR EAX,EAX CALL 0x0010af40
void ggml_compute_forward_diag_mask_zero(ggml_compute_params *param_1,ggml_tensor *param_2) { if (**(int **)(param_2 + 0x98) == 0) { ggml_compute_forward_diag_mask_f32(param_1,param_2,0.0); return; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp", 0x121a,"fatal error"); }
19,220
common_log::set_colors(bool)
monkey531[P]llama/common/log.cpp
void set_colors(bool colors) { pause(); if (colors) { g_col[COMMON_LOG_COL_DEFAULT] = LOG_COL_DEFAULT; g_col[COMMON_LOG_COL_BOLD] = LOG_COL_BOLD; g_col[COMMON_LOG_COL_RED] = LOG_COL_RED; g_col[COMMON_LOG_COL_GREEN] = LOG_COL_GREEN; g_col[COMMON_LOG_COL_YELLOW] = LOG_COL_YELLOW; g_col[COMMON_LOG_COL_BLUE] = LOG_COL_BLUE; g_col[COMMON_LOG_COL_MAGENTA] = LOG_COL_MAGENTA; g_col[COMMON_LOG_COL_CYAN] = LOG_COL_CYAN; g_col[COMMON_LOG_COL_WHITE] = LOG_COL_WHITE; } else { for (size_t i = 0; i < g_col.size(); i++) { g_col[i] = ""; } } resume(); }
O3
cpp
common_log::set_colors(bool): pushq %rbp pushq %rbx pushq %rax movl %esi, %ebp movq %rdi, %rbx callq 0xcc60a testl %ebp, %ebp je 0xccac9 movq 0x609d2(%rip), %rax # 0x12d430 leaq 0x1974e(%rip), %rcx # 0xe61b3 movq %rcx, (%rax) movq 0x609c1(%rip), %rax # 0x12d430 leaq 0x28459(%rip), %rcx # 0xf4ecf movq %rcx, 0x8(%rax) leaq 0x28453(%rip), %rcx # 0xf4ed4 movq %rcx, 0x10(%rax) leaq 0x2844e(%rip), %rcx # 0xf4eda movq %rcx, 0x18(%rax) leaq 0x28449(%rip), %rcx # 0xf4ee0 movq %rcx, 0x20(%rax) leaq 0x28444(%rip), %rcx # 0xf4ee6 movq %rcx, 0x28(%rax) leaq 0x2843f(%rip), %rcx # 0xf4eec movq %rcx, 0x30(%rax) leaq 0x2843a(%rip), %rcx # 0xf4ef2 movq %rcx, 0x38(%rax) leaq 0x28435(%rip), %rcx # 0xf4ef8 movq %rcx, 0x40(%rax) jmp 0xccb03 movq 0x60960(%rip), %rax # 0x12d430 cmpq %rax, 0x60961(%rip) # 0x12d438 je 0xccb03 xorl %ecx, %ecx leaq 0x1eeba(%rip), %rdx # 0xeb99c movq %rdx, (%rax,%rcx,8) incq %rcx movq 0x60948(%rip), %rsi # 0x12d438 movq 0x60939(%rip), %rax # 0x12d430 subq %rax, %rsi sarq $0x3, %rsi cmpq %rsi, %rcx jb 0xccae2 movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %rbp jmp 0xcc692 nop
_ZN10common_log10set_colorsEb: push rbp push rbx push rax mov ebp, esi mov rbx, rdi call _ZN10common_log5pauseEv; common_log::pause(void) test ebp, ebp jz short loc_CCAC9 mov rax, cs:_ZL5g_col; g_col lea rcx, a096mS0m+9; "\x1B[0m" mov [rax], rcx mov rax, cs:_ZL5g_col; g_col lea rcx, a1m; "\x1B[1m" mov [rax+8], rcx lea rcx, a31m; "\x1B[31m" mov [rax+10h], rcx lea rcx, a32m; "\x1B[32m" mov [rax+18h], rcx lea rcx, a33m; "\x1B[33m" mov [rax+20h], rcx lea rcx, a34m; "\x1B[34m" mov [rax+28h], rcx lea rcx, a35m; "\x1B[35m" mov [rax+30h], rcx lea rcx, a36m; "\x1B[36m" mov [rax+38h], rcx lea rcx, a37m; "\x1B[37m" mov [rax+40h], rcx jmp short loc_CCB03 loc_CCAC9: mov rax, cs:_ZL5g_col; g_col cmp cs:qword_12D438, rax jz short loc_CCB03 xor ecx, ecx lea rdx, aErrorWhileHand_0+34h; "" loc_CCAE2: mov [rax+rcx*8], rdx inc rcx mov rsi, cs:qword_12D438 mov rax, cs:_ZL5g_col; g_col sub rsi, rax sar rsi, 3 cmp rcx, rsi jb short loc_CCAE2 loc_CCB03: mov rdi, rbx; this add rsp, 8 pop rbx pop rbp jmp _ZN10common_log6resumeEv; common_log::resume(void)
long long common_log::set_colors(common_log *this, int a2) { _QWORD *v2; // rax long long v3; // rax unsigned long long v4; // rcx common_log::pause(this); if ( a2 ) { *(_QWORD *)g_col = "\x1B[0m"; v2 = (_QWORD *)g_col; *(_QWORD *)(g_col + 8) = "\x1B[1m"; v2[2] = "\x1B[31m"; v2[3] = "\x1B[32m"; v2[4] = "\x1B[33m"; v2[5] = "\x1B[34m"; v2[6] = "\x1B[35m"; v2[7] = "\x1B[36m"; v2[8] = "\x1B[37m"; } else { v3 = g_col; if ( qword_12D438 != g_col ) { v4 = 0LL; do { *(_QWORD *)(v3 + 8 * v4++) = ""; v3 = g_col; } while ( v4 < (qword_12D438 - g_col) >> 3 ); } } return common_log::resume(this); }
set_colors: PUSH RBP PUSH RBX PUSH RAX MOV EBP,ESI MOV RBX,RDI CALL 0x001cc60a TEST EBP,EBP JZ 0x001ccac9 MOV RAX,qword ptr [0x0022d430] LEA RCX,[0x1e61b3] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [0x0022d430] LEA RCX,[0x1f4ecf] MOV qword ptr [RAX + 0x8],RCX LEA RCX,[0x1f4ed4] MOV qword ptr [RAX + 0x10],RCX LEA RCX,[0x1f4eda] MOV qword ptr [RAX + 0x18],RCX LEA RCX,[0x1f4ee0] MOV qword ptr [RAX + 0x20],RCX LEA RCX,[0x1f4ee6] MOV qword ptr [RAX + 0x28],RCX LEA RCX,[0x1f4eec] MOV qword ptr [RAX + 0x30],RCX LEA RCX,[0x1f4ef2] MOV qword ptr [RAX + 0x38],RCX LEA RCX,[0x1f4ef8] MOV qword ptr [RAX + 0x40],RCX JMP 0x001ccb03 LAB_001ccac9: MOV RAX,qword ptr [0x0022d430] CMP qword ptr [0x0022d438],RAX JZ 0x001ccb03 XOR ECX,ECX LEA RDX,[0x1eb99c] LAB_001ccae2: MOV qword ptr [RAX + RCX*0x8],RDX INC RCX MOV RSI,qword ptr [0x0022d438] MOV RAX,qword ptr [0x0022d430] SUB RSI,RAX SAR RSI,0x3 CMP RCX,RSI JC 0x001ccae2 LAB_001ccb03: MOV RDI,RBX ADD RSP,0x8 POP RBX POP RBP JMP 0x001cc692
/* common_log::set_colors(bool) */ void __thiscall common_log::set_colors(common_log *this,bool param_1) { int8 *puVar1; ulong uVar2; int7 in_register_00000031; pause(this); if ((int)CONCAT71(in_register_00000031,param_1) == 0) { if (DAT_0022d438 != g_col) { uVar2 = 0; do { g_col[uVar2] = ""; uVar2 = uVar2 + 1; } while (uVar2 < (ulong)((long)DAT_0022d438 - (long)g_col >> 3)); } } else { *g_col = &DAT_001e61b3; puVar1 = g_col; g_col[1] = &DAT_001f4ecf; puVar1[2] = &DAT_001f4ed4; puVar1[3] = &DAT_001f4eda; puVar1[4] = &DAT_001f4ee0; puVar1[5] = &DAT_001f4ee6; puVar1[6] = &DAT_001f4eec; puVar1[7] = &DAT_001f4ef2; puVar1[8] = &DAT_001f4ef8; } resume(this); return; }
19,221
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_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>>::start_array(unsigned long)
monkey531[P]llama/common/json.hpp
bool start_array(std::size_t len) { ref_stack.push_back(handle_value(BasicJsonType::value_t::array)); if (JSON_HEDLEY_UNLIKELY(len != static_cast<std::size_t>(-1) && len > ref_stack.back()->max_size())) { JSON_THROW(out_of_range::create(408, concat("excessive array size: ", std::to_string(len)), ref_stack.back())); } return true; }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_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>>::start_array(unsigned long): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rsi, %r15 movq %rdi, %r14 leaq 0x8(%rdi), %rbx leaq 0x8(%rsp), %rsi movb $0x2, (%rsi) callq 0x4d82c leaq 0x28(%rsp), %rsi movq %rax, (%rsi) movq %rbx, %rdi callq 0x4d90c cmpq $-0x1, %r15 je 0x4d683 movq 0x10(%r14), %rax movq -0x8(%rax), %rdi callq 0x4a87e cmpq %r15, %rax jb 0x4d690 movb $0x1, %al addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq pushq $0x20 popq %rdi callq 0x223c0 movq %rax, %rbx leaq 0x8(%rsp), %rdi movq %r15, %rsi callq 0x4a9f1 leaq 0x48459(%rip), %rsi # 0x95b08 leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x4bc73 movq 0x10(%r14), %rax movq -0x8(%rax), %rcx movb $0x1, %bpl leaq 0x28(%rsp), %rdx movq %rbx, %rdi movl $0x198, %esi # imm = 0x198 callq 0x4a8a6 xorl %ebp, %ebp leaq 0x87cdc(%rip), %rsi # 0xd53c0 leaq -0x3b9(%rip), %rdx # 0x4d332 movq %rbx, %rdi callq 0x22cd0 movq %rax, %r14 leaq 0x28(%rsp), %rdi callq 0x22f48 jmp 0x4d708 movq %rax, %r14 movb $0x1, %bpl leaq 0x8(%rsp), %rdi callq 0x22f48 testb %bpl, %bpl jne 0x4d71c jmp 0x4d724 movq %rax, %r14 movq %rbx, %rdi callq 0x22550 movq %r14, %rdi callq 0x22d30
_ZN8nlohmann16json_abi_v3_11_36detail19json_sax_dom_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE11start_arrayEm: push rbp; char push r15; int push r14; int push rbx; int sub rsp, 48h mov r15, rsi mov r14, rdi lea rbx, [rdi+8] lea rsi, [rsp+68h+var_60] mov byte ptr [rsi], 2 call _ZN8nlohmann16json_abi_v3_11_36detail19json_sax_dom_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueINS1_7value_tEEEPSF_OT_; nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<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>>::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(nlohmann::json_abi_v3_11_3::detail::value_t &&) lea rsi, [rsp+68h+var_40] mov [rsi], rax mov rdi, rbx call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE12emplace_backIJSE_EEERSE_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> * &&) cmp r15, 0FFFFFFFFFFFFFFFFh jz short loc_4D683 mov rax, [r14+10h] mov rdi, [rax-8] call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8max_sizeEv; 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>::max_size(void) cmp rax, r15 jb short loc_4D690 loc_4D683: mov al, 1 add rsp, 48h pop rbx pop r14 pop r15 pop rbp retn loc_4D690: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+68h+var_60]; this mov rsi, r15; unsigned __int64 call _ZNSt7__cxx119to_stringEm; std::to_string(ulong) lea rsi, aExcessiveArray; "excessive array size: " lea rdi, [rsp+68h+var_40] lea rdx, [rsp+68h+var_60] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA23_KcS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[23],std::string>(char const(&)[23],std::string &&) mov rax, [r14+10h] mov rcx, [rax-8] mov bpl, 1 lea rdx, [rsp+68h+var_40] mov rdi, rbx; this mov esi, 198h; int 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 mov r14, rax lea rdi, [rsp+68h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_4D708 mov r14, rax mov bpl, 1 loc_4D708: lea rdi, [rsp+68h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_4D71C jmp short loc_4D724 mov r14, rax loc_4D71C: mov rdi, rbx; void * call ___cxa_free_exception loc_4D724: mov rdi, r14 call __Unwind_Resume
char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_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>>::start_array( long long a1, unsigned long long a2) { nlohmann::json_abi_v3_11_3::detail::out_of_range *exception; // rbx _BYTE v4[32]; // [rsp+8h] [rbp-60h] BYREF _QWORD v5[8]; // [rsp+28h] [rbp-40h] BYREF v4[0] = 2; v5[0] = nlohmann::json_abi_v3_11_3::detail::json_sax_dom_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>>::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>( a1, v4); std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *>>::emplace_back<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> *>(a1 + 8); if ( a2 != -1LL && 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>::max_size(*(unsigned __int8 **)(*(_QWORD *)(a1 + 16) - 8LL)) < a2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL); std::to_string((std::__cxx11 *)v4, a2); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[23],std::string>( (long long)v5, (long long)"excessive array size: ", (long long)v4); ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 408, (long long)v5); __cxa_throw( exception, (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 1; }
start_array: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV R15,RSI MOV R14,RDI LEA RBX,[RDI + 0x8] LEA RSI,[RSP + 0x8] MOV byte ptr [RSI],0x2 CALL 0x0014d82c LEA RSI,[RSP + 0x28] MOV qword ptr [RSI],RAX MOV RDI,RBX CALL 0x0014d90c CMP R15,-0x1 JZ 0x0014d683 MOV RAX,qword ptr [R14 + 0x10] MOV RDI,qword ptr [RAX + -0x8] CALL 0x0014a87e CMP RAX,R15 JC 0x0014d690 LAB_0014d683: MOV AL,0x1 ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP RET LAB_0014d690: PUSH 0x20 POP RDI CALL 0x001223c0 MOV RBX,RAX LAB_0014d69b: LEA RDI,[RSP + 0x8] MOV RSI,R15 CALL 0x0014a9f1 LAB_0014d6a8: LEA RSI,[0x195b08] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x8] CALL 0x0014bc73 MOV RAX,qword ptr [R14 + 0x10] MOV RCX,qword ptr [RAX + -0x8] MOV BPL,0x1 LAB_0014d6c9: LEA RDX,[RSP + 0x28] MOV RDI,RBX MOV ESI,0x198 CALL 0x0014a8a6 XOR EBP,EBP LEA RSI,[0x1d53c0] LEA RDX,[0x14d332] MOV RDI,RBX CALL 0x00122cd0
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_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> >::start_array(unsigned long) */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: json_sax_dom_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>> ::start_array(json_sax_dom_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>> *this,ulong param_1) { ulong uVar1; int8 uVar2; __cxx11 local_60 [32]; basic_json *local_40 [4]; local_60[0] = (__cxx11)0x2; local_40[0] = handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(this,local_60); std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> :: emplace_back<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>*> ((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8),local_40); if (param_1 != 0xffffffffffffffff) { uVar1 = 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> ::max_size(*(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> **)(*(long *)(this + 0x10) + -8)); if (uVar1 < param_1) { uVar2 = __cxa_allocate_exception(0x20); /* try { // try from 0014d69b to 0014d6a7 has its CatchHandler @ 0014d719 */ std::__cxx11::to_string(local_60,param_1); /* try { // try from 0014d6a8 to 0014d6bd has its CatchHandler @ 0014d702 */ concat<std::__cxx11::string,char_const(&)[23],std::__cxx11::string> ((detail *)local_40,"excessive array size: ",(string *)local_60); /* try { // try from 0014d6c9 to 0014d6f2 has its CatchHandler @ 0014d6f3 */ _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,0x198,local_40,*(int8 *)(*(long *)(this + 0x10) + -8)); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&out_of_range::typeinfo,exception::~exception); } } return 1; }
19,222
Catch::TextFlow::Column::const_iterator::addIndentAndSuffix[abi:cxx11](unsigned long, unsigned long) const
AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp
std::string Column::const_iterator::addIndentAndSuffix( size_t position, size_t length ) const { std::string ret; const auto desired_indent = indentSize(); ret.reserve( desired_indent + length + m_addHyphen ); ret.append( desired_indent, ' ' ); ret.append( m_column.m_string, position, length ); if ( m_addHyphen ) { ret.push_back( '-' ); } return ret; }
O3
cpp
Catch::TextFlow::Column::const_iterator::addIndentAndSuffix[abi:cxx11](unsigned long, unsigned long) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %r15 movq %rdx, %r12 movq %rsi, %r14 movq %rdi, %rbx leaq 0x10(%rdi), %rbp movq %rbp, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) cmpq $0x0, 0x8(%rsi) movq (%rsi), %rax je 0x6385c movq 0x28(%rax), %r13 jmp 0x63866 movq 0x30(%rax), %r13 cmpq $-0x1, %r13 je 0x63856 movzbl 0x20(%r14), %esi addq %r15, %rsi addq %r13, %rsi movq %rbx, %rdi callq 0x76b7c movq 0x8(%rbx), %rsi movq %rbx, %rdi xorl %edx, %edx movq %r13, %rcx movl $0x20, %r8d callq 0x80566 movq (%r14), %rsi movq %rbx, %rdi movq %r12, %rdx movq %r15, %rcx callq 0x790ae cmpb $0x1, 0x20(%r14) jne 0x638b5 movq %rbx, %rdi movl $0x2d, %esi callq 0x771b8 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 movq (%rbx), %rdi cmpq %rbp, %rdi je 0x638de movq (%rbp), %rsi incq %rsi callq 0x17150 movq %r14, %rdi callq 0x17740
_ZNK5Catch8TextFlow6Column14const_iterator18addIndentAndSuffixB5cxx11Emm: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r15, rcx mov r12, rdx mov r14, rsi mov rbx, rdi lea rbp, [rdi+10h] mov [rdi], rbp mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 cmp qword ptr [rsi+8], 0 mov rax, [rsi] jz short loc_6385C loc_63856: mov r13, [rax+28h] jmp short loc_63866 loc_6385C: mov r13, [rax+30h] cmp r13, 0FFFFFFFFFFFFFFFFh jz short loc_63856 loc_63866: movzx esi, byte ptr [r14+20h] add rsi, r15 add rsi, r13 mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rsi, [rbx+8] mov rdi, rbx xor edx, edx mov rcx, r13 mov r8d, 20h ; ' ' call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE14_M_replace_auxEmmmc; std::string::_M_replace_aux(ulong,ulong,ulong,char) mov rsi, [r14] mov rdi, rbx mov rdx, r12 mov rcx, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_mm; std::string::append(std::string const&,ulong,ulong) cmp byte ptr [r14+20h], 1 jnz short loc_638B5 mov rdi, rbx mov esi, 2Dh ; '-' call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) loc_638B5: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax mov rdi, [rbx]; void * cmp rdi, rbp jz short loc_638DE mov rsi, [rbp+0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_638DE: mov rdi, r14 call __Unwind_Resume
long long Catch::TextFlow::Column::const_iterator::addIndentAndSuffix[abi:cxx11]( long long a1, long long *a2, long long a3, long long a4) { long long v6; // rax long long v7; // r13 *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; v6 = *a2; if ( a2[1] || (v7 = *(_QWORD *)(v6 + 48), v7 == -1) ) v7 = *(_QWORD *)(v6 + 40); std::string::reserve(a1, v7 + a4 + *((unsigned __int8 *)a2 + 32)); std::string::_M_replace_aux(a1, *(_QWORD *)(a1 + 8), 0LL, v7, 32LL); std::string::append(a1, *a2, a3, a4); if ( *((_BYTE *)a2 + 32) == 1 ) std::string::push_back(a1, 45LL); return a1; }
addIndentAndSuffix[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R15,RCX MOV R12,RDX MOV R14,RSI MOV RBX,RDI LEA RBP,[RDI + 0x10] MOV qword ptr [RDI],RBP MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 CMP qword ptr [RSI + 0x8],0x0 MOV RAX,qword ptr [RSI] JZ 0x0016385c LAB_00163856: MOV R13,qword ptr [RAX + 0x28] JMP 0x00163866 LAB_0016385c: MOV R13,qword ptr [RAX + 0x30] CMP R13,-0x1 JZ 0x00163856 LAB_00163866: MOVZX ESI,byte ptr [R14 + 0x20] ADD RSI,R15 ADD RSI,R13 LAB_00163871: MOV RDI,RBX CALL 0x00176b7c MOV RSI,qword ptr [RBX + 0x8] MOV RDI,RBX XOR EDX,EDX MOV RCX,R13 MOV R8D,0x20 CALL 0x00180566 MOV RSI,qword ptr [R14] MOV RDI,RBX MOV RDX,R12 MOV RCX,R15 CALL 0x001790ae CMP byte ptr [R14 + 0x20],0x1 JNZ 0x001638b5 MOV RDI,RBX MOV ESI,0x2d CALL 0x001771b8 LAB_001638b5: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* Catch::TextFlow::Column::const_iterator::addIndentAndSuffix[abi:cxx11](unsigned long, unsigned long) const */ ulong Catch::TextFlow::Column::const_iterator::addIndentAndSuffix_abi_cxx11_ (ulong param_1,ulong param_2) { long in_RCX; ulong in_RDX; ulong uVar1; *(ulong *)param_1 = param_1 + 0x10; *(int8 *)(param_1 + 8) = 0; *(int1 *)(param_1 + 0x10) = 0; if ((*(long *)(param_2 + 8) != 0) || (uVar1 = *(ulong *)(*(long *)param_2 + 0x30), uVar1 == 0xffffffffffffffff)) { uVar1 = *(ulong *)(*(long *)param_2 + 0x28); } /* try { // try from 00163871 to 001638b4 has its CatchHandler @ 001638c7 */ std::__cxx11::string::reserve((string *)param_1,(ulong)*(byte *)(param_2 + 0x20) + in_RCX + uVar1) ; std::__cxx11::string::_M_replace_aux((string *)param_1,*(ulong *)(param_1 + 8),0,uVar1,' '); std::__cxx11::string::append((string *)param_1,*(ulong *)param_2,in_RDX); if (*(char *)(param_2 + 0x20) == '\x01') { std::__cxx11::string::push_back((string *)param_1,'-'); } return param_1; }
19,223
google::protobuf::MethodDescriptorProto::Clear()
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
void MethodDescriptorProto::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.MethodDescriptorProto) uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; cached_has_bits = _impl_._has_bits_[0]; if (cached_has_bits & 0x0000000fu) { if (cached_has_bits & 0x00000001u) { _impl_.name_.ClearNonDefaultToEmpty(); } if (cached_has_bits & 0x00000002u) { _impl_.input_type_.ClearNonDefaultToEmpty(); } if (cached_has_bits & 0x00000004u) { _impl_.output_type_.ClearNonDefaultToEmpty(); } if (cached_has_bits & 0x00000008u) { GOOGLE_DCHECK(_impl_.options_ != nullptr); _impl_.options_->Clear(); } } ::memset(&_impl_.client_streaming_, 0, static_cast<size_t>( reinterpret_cast<char*>(&_impl_.server_streaming_) - reinterpret_cast<char*>(&_impl_.client_streaming_)) + sizeof(_impl_.server_streaming_)); _impl_._has_bits_.Clear(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); }
O0
cpp
google::protobuf::MethodDescriptorProto::Clear(): subq $0xb8, %rsp movq %rdi, 0x80(%rsp) movq 0x80(%rsp), %rax movq %rax, 0x20(%rsp) movl $0x0, 0x7c(%rsp) addq $0x10, %rax movq %rax, 0xa0(%rsp) movl $0x0, 0x9c(%rsp) movq 0xa0(%rsp), %rax movslq 0x9c(%rsp), %rcx movl (%rax,%rcx,4), %eax movl %eax, 0x7c(%rsp) movl 0x7c(%rsp), %eax andl $0xf, %eax cmpl $0x0, %eax je 0xbb1dd movl 0x7c(%rsp), %eax andl $0x1, %eax cmpl $0x0, %eax je 0xbb0d0 movq 0x20(%rsp), %rdi addq $0x10, %rdi addq $0x8, %rdi callq 0xd4de0 movl 0x7c(%rsp), %eax andl $0x2, %eax cmpl $0x0, %eax je 0xbb0ee movq 0x20(%rsp), %rdi addq $0x10, %rdi addq $0x10, %rdi callq 0xd4de0 movl 0x7c(%rsp), %eax andl $0x4, %eax cmpl $0x0, %eax je 0xbb10c movq 0x20(%rsp), %rdi addq $0x10, %rdi addq $0x18, %rdi callq 0xd4de0 movl 0x7c(%rsp), %eax andl $0x8, %eax cmpl $0x0, %eax je 0xbb1db jmp 0xbb11e xorl %eax, %eax testb $0x1, %al jne 0xbb129 jmp 0xbb1cd movq 0x20(%rsp), %rax movq 0x30(%rax), %rax movb $0x0, 0x3f(%rsp) cmpq $0x0, %rax je 0xbb13f jmp 0xbb18f leaq 0x1357ea(%rip), %rdx # 0x1f0930 leaq 0x40(%rsp), %rdi movq %rdi, 0x10(%rsp) movl $0x3, %esi movl $0x16de, %ecx # imm = 0x16DE callq 0x237e0 movq 0x10(%rsp), %rdi movb $0x1, 0x3f(%rsp) leaq 0x13584d(%rip), %rsi # 0x1f09bd callq 0x230a0 movq %rax, 0x18(%rsp) jmp 0xbb17c movq 0x18(%rsp), %rsi leaq 0x2b(%rsp), %rdi callq 0x23250 jmp 0xbb18d jmp 0xbb18f testb $0x1, 0x3f(%rsp) jne 0xbb198 jmp 0xbb1a2 leaq 0x40(%rsp), %rdi callq 0x23820 jmp 0xbb11e movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) testb $0x1, 0x3f(%rsp) jne 0xbb1be jmp 0xbb1c8 leaq 0x40(%rsp), %rdi callq 0x23820 jmp 0xbb290 movq 0x20(%rsp), %rax movq 0x30(%rax), %rdi callq 0xbb2a0 jmp 0xbb1dd movq 0x20(%rsp), %rax movq %rax, %rdi addq $0x10, %rdi addq $0x28, %rdi movq %rax, %rdx addq $0x10, %rdx addq $0x29, %rdx addq $0x10, %rax addq $0x28, %rax subq %rax, %rdx addq $0x1, %rdx xorl %esi, %esi callq 0x13200 movq 0x20(%rsp), %rax addq $0x10, %rax movq %rax, 0xa8(%rsp) movq 0xa8(%rsp), %rdi xorl %esi, %esi movl $0x4, %edx callq 0x13200 movq 0x20(%rsp), %rax addq $0x8, %rax movq %rax, 0x88(%rsp) movq 0x88(%rsp), %rax movq %rax, 0x8(%rsp) movq %rax, 0x90(%rsp) movq 0x90(%rsp), %rax movq %rax, 0xb0(%rsp) movq 0xb0(%rsp), %rax movq (%rax), %rax andq $0x1, %rax cmpq $0x0, %rax je 0xbb288 movq 0x8(%rsp), %rdi callq 0xe0a90 addq $0xb8, %rsp retq movq 0x30(%rsp), %rdi callq 0x13750 nopw (%rax,%rax)
_ZN6google8protobuf21MethodDescriptorProto5ClearEv: sub rsp, 0B8h mov [rsp+0B8h+var_38], rdi mov rax, [rsp+0B8h+var_38] mov [rsp+0B8h+var_98], rax mov [rsp+0B8h+var_3C], 0 add rax, 10h mov [rsp+0B8h+var_18], rax mov [rsp+0B8h+var_1C], 0 mov rax, [rsp+0B8h+var_18] movsxd rcx, [rsp+0B8h+var_1C] mov eax, [rax+rcx*4] mov [rsp+0B8h+var_3C], eax mov eax, [rsp+0B8h+var_3C] and eax, 0Fh cmp eax, 0 jz loc_BB1DD mov eax, [rsp+0B8h+var_3C] and eax, 1 cmp eax, 0 jz short loc_BB0D0 mov rdi, [rsp+0B8h+var_98] add rdi, 10h add rdi, 8; this call _ZN6google8protobuf8internal14ArenaStringPtr22ClearNonDefaultToEmptyEv; google::protobuf::internal::ArenaStringPtr::ClearNonDefaultToEmpty(void) loc_BB0D0: mov eax, [rsp+0B8h+var_3C] and eax, 2 cmp eax, 0 jz short loc_BB0EE mov rdi, [rsp+0B8h+var_98] add rdi, 10h add rdi, 10h; this call _ZN6google8protobuf8internal14ArenaStringPtr22ClearNonDefaultToEmptyEv; google::protobuf::internal::ArenaStringPtr::ClearNonDefaultToEmpty(void) loc_BB0EE: mov eax, [rsp+0B8h+var_3C] and eax, 4 cmp eax, 0 jz short loc_BB10C mov rdi, [rsp+0B8h+var_98] add rdi, 10h add rdi, 18h; this call _ZN6google8protobuf8internal14ArenaStringPtr22ClearNonDefaultToEmptyEv; google::protobuf::internal::ArenaStringPtr::ClearNonDefaultToEmpty(void) loc_BB10C: mov eax, [rsp+0B8h+var_3C] and eax, 8 cmp eax, 0 jz loc_BB1DB jmp short $+2 loc_BB11E: xor eax, eax test al, 1 jnz short loc_BB129 jmp loc_BB1CD loc_BB129: mov rax, [rsp+0B8h+var_98] mov rax, [rax+30h] mov [rsp+0B8h+var_79], 0 cmp rax, 0 jz short loc_BB13F jmp short loc_BB18F loc_BB13F: lea rdx, aWorkspaceLlm4b_8; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+0B8h+var_78] mov [rsp+0B8h+var_A8], rdi mov esi, 3 mov ecx, 16DEh call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, [rsp+0B8h+var_A8] mov [rsp+0B8h+var_79], 1 lea rsi, aCheckFailedImp; "CHECK failed: _impl_.options_ != nullpt"... call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+0B8h+var_A0], rax jmp short $+2 loc_BB17C: mov rsi, [rsp+0B8h+var_A0] lea rdi, [rsp+0B8h+var_8D] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_BB18D: jmp short $+2 loc_BB18F: test [rsp+0B8h+var_79], 1 jnz short loc_BB198 jmp short loc_BB1A2 loc_BB198: lea rdi, [rsp+0B8h+var_78]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_BB1A2: jmp loc_BB11E mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax test [rsp+arg_37], 1 jnz short loc_BB1BE jmp short loc_BB1C8 loc_BB1BE: lea rdi, [rsp+arg_38]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_BB1C8: jmp loc_BB290 loc_BB1CD: mov rax, [rsp+0B8h+var_98] mov rdi, [rax+30h]; this call _ZN6google8protobuf13MethodOptions5ClearEv; google::protobuf::MethodOptions::Clear(void) loc_BB1DB: jmp short $+2 loc_BB1DD: mov rax, [rsp+0B8h+var_98] mov rdi, rax add rdi, 10h add rdi, 28h ; '(' mov rdx, rax add rdx, 10h add rdx, 29h ; ')' add rax, 10h add rax, 28h ; '(' sub rdx, rax add rdx, 1 xor esi, esi call _memset mov rax, [rsp+0B8h+var_98] add rax, 10h mov [rsp+0B8h+var_10], rax mov rdi, [rsp+0B8h+var_10] xor esi, esi mov edx, 4 call _memset mov rax, [rsp+0B8h+var_98] add rax, 8 mov [rsp+0B8h+var_30], rax mov rax, [rsp+0B8h+var_30] mov [rsp+0B8h+var_B0], rax mov [rsp+0B8h+var_28], rax mov rax, [rsp+0B8h+var_28] mov [rsp+0B8h+var_8], rax mov rax, [rsp+0B8h+var_8] mov rax, [rax] and rax, 1 cmp rax, 0 jz short loc_BB288 mov rdi, [rsp+0B8h+var_B0]; void * call _ZN6google8protobuf8internal16InternalMetadata7DoClearINS0_15UnknownFieldSetEEEvv; google::protobuf::internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet>(void) loc_BB288: add rsp, 0B8h retn loc_BB290: mov rdi, [rsp+arg_28] call __Unwind_Resume
long long google::protobuf::MethodDescriptorProto::Clear(google::protobuf::MethodDescriptorProto *this) { long long result; // rax int v2; // [rsp+7Ch] [rbp-3Ch] v2 = *((_DWORD *)this + 4); if ( (v2 & 0xF) != 0 ) { if ( (v2 & 1) != 0 ) google::protobuf::internal::ArenaStringPtr::ClearNonDefaultToEmpty((google::protobuf::MethodDescriptorProto *)((char *)this + 24)); if ( (v2 & 2) != 0 ) google::protobuf::internal::ArenaStringPtr::ClearNonDefaultToEmpty((google::protobuf::MethodDescriptorProto *)((char *)this + 32)); if ( (v2 & 4) != 0 ) google::protobuf::internal::ArenaStringPtr::ClearNonDefaultToEmpty((google::protobuf::MethodDescriptorProto *)((char *)this + 40)); if ( (v2 & 8) != 0 ) google::protobuf::MethodOptions::Clear(*((google::protobuf::MethodOptions **)this + 6)); } memset((char *)this + 56, 0LL, 2LL); memset((char *)this + 16, 0LL, 4LL); result = *((_QWORD *)this + 1) & 1LL; if ( result ) return google::protobuf::internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet>((char *)this + 8); return result; }
Clear: SUB RSP,0xb8 MOV qword ptr [RSP + 0x80],RDI MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x20],RAX MOV dword ptr [RSP + 0x7c],0x0 ADD RAX,0x10 MOV qword ptr [RSP + 0xa0],RAX MOV dword ptr [RSP + 0x9c],0x0 MOV RAX,qword ptr [RSP + 0xa0] MOVSXD RCX,dword ptr [RSP + 0x9c] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RSP + 0x7c],EAX MOV EAX,dword ptr [RSP + 0x7c] AND EAX,0xf CMP EAX,0x0 JZ 0x001bb1dd MOV EAX,dword ptr [RSP + 0x7c] AND EAX,0x1 CMP EAX,0x0 JZ 0x001bb0d0 MOV RDI,qword ptr [RSP + 0x20] ADD RDI,0x10 ADD RDI,0x8 CALL 0x001d4de0 LAB_001bb0d0: MOV EAX,dword ptr [RSP + 0x7c] AND EAX,0x2 CMP EAX,0x0 JZ 0x001bb0ee MOV RDI,qword ptr [RSP + 0x20] ADD RDI,0x10 ADD RDI,0x10 CALL 0x001d4de0 LAB_001bb0ee: MOV EAX,dword ptr [RSP + 0x7c] AND EAX,0x4 CMP EAX,0x0 JZ 0x001bb10c MOV RDI,qword ptr [RSP + 0x20] ADD RDI,0x10 ADD RDI,0x18 CALL 0x001d4de0 LAB_001bb10c: MOV EAX,dword ptr [RSP + 0x7c] AND EAX,0x8 CMP EAX,0x0 JZ 0x001bb1db JMP 0x001bb11e LAB_001bb11e: XOR EAX,EAX TEST AL,0x1 JNZ 0x001bb129 JMP 0x001bb1cd LAB_001bb129: MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + 0x30] MOV byte ptr [RSP + 0x3f],0x0 CMP RAX,0x0 JZ 0x001bb13f JMP 0x001bb18f LAB_001bb13f: LEA RDX,[0x2f0930] LEA RDI,[RSP + 0x40] MOV qword ptr [RSP + 0x10],RDI MOV ESI,0x3 MOV ECX,0x16de CALL 0x001237e0 MOV RDI,qword ptr [RSP + 0x10] MOV byte ptr [RSP + 0x3f],0x1 LAB_001bb169: LEA RSI,[0x2f09bd] CALL 0x001230a0 MOV qword ptr [RSP + 0x18],RAX JMP 0x001bb17c LAB_001bb17c: MOV RSI,qword ptr [RSP + 0x18] LEA RDI,[RSP + 0x2b] CALL 0x00123250 LAB_001bb18b: JMP 0x001bb18d LAB_001bb18d: JMP 0x001bb18f LAB_001bb18f: TEST byte ptr [RSP + 0x3f],0x1 JNZ 0x001bb198 JMP 0x001bb1a2 LAB_001bb198: LEA RDI,[RSP + 0x40] CALL 0x00123820 LAB_001bb1a2: JMP 0x001bb11e LAB_001bb1cd: MOV RAX,qword ptr [RSP + 0x20] MOV RDI,qword ptr [RAX + 0x30] CALL 0x001bb2a0 LAB_001bb1db: JMP 0x001bb1dd LAB_001bb1dd: MOV RAX,qword ptr [RSP + 0x20] MOV RDI,RAX ADD RDI,0x10 ADD RDI,0x28 MOV RDX,RAX ADD RDX,0x10 ADD RDX,0x29 ADD RAX,0x10 ADD RAX,0x28 SUB RDX,RAX ADD RDX,0x1 XOR ESI,ESI CALL 0x00113200 MOV RAX,qword ptr [RSP + 0x20] ADD RAX,0x10 MOV qword ptr [RSP + 0xa8],RAX MOV RDI,qword ptr [RSP + 0xa8] XOR ESI,ESI MOV EDX,0x4 CALL 0x00113200 MOV RAX,qword ptr [RSP + 0x20] ADD RAX,0x8 MOV qword ptr [RSP + 0x88],RAX MOV RAX,qword ptr [RSP + 0x88] MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x90],RAX MOV RAX,qword ptr [RSP + 0x90] MOV qword ptr [RSP + 0xb0],RAX MOV RAX,qword ptr [RSP + 0xb0] MOV RAX,qword ptr [RAX] AND RAX,0x1 CMP RAX,0x0 JZ 0x001bb288 MOV RDI,qword ptr [RSP + 0x8] CALL 0x001e0a90 LAB_001bb288: ADD RSP,0xb8 RET
/* WARNING: Removing unreachable block (ram,0x001bb129) */ /* WARNING: Removing unreachable block (ram,0x001bb13f) */ /* WARNING: Removing unreachable block (ram,0x001bb13d) */ /* WARNING: Removing unreachable block (ram,0x001bb18f) */ /* WARNING: Removing unreachable block (ram,0x001bb198) */ /* WARNING: Removing unreachable block (ram,0x001bb196) */ /* WARNING: Removing unreachable block (ram,0x001bb1a2) */ /* google::protobuf::MethodDescriptorProto::Clear() */ void __thiscall google::protobuf::MethodDescriptorProto::Clear(MethodDescriptorProto *this) { uint uVar1; uVar1 = *(uint *)(this + 0x10); if ((uVar1 & 0xf) != 0) { if ((uVar1 & 1) != 0) { internal::ArenaStringPtr::ClearNonDefaultToEmpty((ArenaStringPtr *)(this + 0x18)); } if ((uVar1 & 2) != 0) { internal::ArenaStringPtr::ClearNonDefaultToEmpty((ArenaStringPtr *)(this + 0x20)); } if ((uVar1 & 4) != 0) { internal::ArenaStringPtr::ClearNonDefaultToEmpty((ArenaStringPtr *)(this + 0x28)); } if ((uVar1 & 8) != 0) { MethodOptions::Clear(*(MethodOptions **)(this + 0x30)); } } memset(this + 0x38,0,2); memset(this + 0x10,0,4); if ((*(ulong *)(this + 8) & 1) != 0) { internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet> ((InternalMetadata *)(this + 8)); } return; }
19,224
blst_p2_to_affine
corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/e2.c
void blst_p2_to_affine(POINTonE2_affine *out, const POINTonE2 *a) { POINTonE2_to_affine(out, a); }
O3
c
blst_p2_to_affine: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x128, %rsp # imm = 0x128 movq %rsi, %r14 movq %rdi, %rbx leaq 0xc0(%rsi), %rdi leaq 0x3069f(%rip), %rsi # 0x8a948 movl $0x60, %edx callq 0x6e940 testq %rax, %rax jne 0x5a2cd leaq -0x138(%rbp), %r15 movq %r15, %rdi movq %r14, %rsi callq 0x5a188 movq %r15, %r14 movl $0xc0, %edx movq %rbx, %rdi movq %r14, %rsi callq 0x211a0 addq $0x128, %rsp # imm = 0x128 popq %rbx popq %r14 popq %r15 popq %rbp retq
blst_p2_to_affine: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 128h mov r14, rsi mov rbx, rdi lea rdi, [rsi+0C0h] lea rsi, BLS12_381_Rx mov edx, 60h ; '`' call vec_is_equal_16x test rax, rax jnz short loc_5A2CD lea r15, [rbp+var_138] mov rdi, r15 mov rsi, r14 call POINTonE2_from_Jacobian mov r14, r15 loc_5A2CD: mov edx, 0C0h mov rdi, rbx mov rsi, r14 call _memcpy add rsp, 128h pop rbx pop r14 pop r15 pop rbp retn
long long blst_p2_to_affine(long long a1, long long a2) { _BYTE v3[312]; // [rsp+8h] [rbp-138h] BYREF if ( !vec_is_equal_16x(a2 + 192, &BLS12_381_Rx, 96LL) ) POINTonE2_from_Jacobian((long long)v3, a2); return memcpy(a1); }
blst_p2_to_affine: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x128 MOV R14,RSI MOV RBX,RDI LEA RDI,[RSI + 0xc0] LEA RSI,[0x18a948] MOV EDX,0x60 CALL 0x0016e940 TEST RAX,RAX JNZ 0x0015a2cd LEA R15,[RBP + -0x138] MOV RDI,R15 MOV RSI,R14 CALL 0x0015a188 MOV R14,R15 LAB_0015a2cd: MOV EDX,0xc0 MOV RDI,RBX MOV RSI,R14 CALL 0x001211a0 ADD RSP,0x128 POP RBX POP R14 POP R15 POP RBP RET
void blst_p2_to_affine(void *param_1,int1 *param_2) { long lVar1; int1 *__src; int1 local_140 [288]; lVar1 = vec_is_equal_16x(param_2 + 0xc0,&BLS12_381_Rx,0x60); __src = param_2; if (lVar1 == 0) { __src = local_140; POINTonE2_from_Jacobian(__src,param_2); } memcpy(param_1,__src,0xc0); return; }
19,225
my_mutex_init
eloqsql/mysys/thr_mutex.c
void my_mutex_init() { /* Initialize mutex attributes */ #ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP /* Set mutex type to "fast" a.k.a "adaptive" In this case the thread may steal the mutex from some other thread that is waiting for the same mutex. This will save us some context switches but may cause a thread to 'starve forever' while waiting for the mutex (not likely if the code within the mutex is short). */ pthread_mutexattr_init(&my_fast_mutexattr); pthread_mutexattr_settype(&my_fast_mutexattr, PTHREAD_MUTEX_ADAPTIVE_NP); #endif #ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP /* Set mutex type to "errorcheck" */ pthread_mutexattr_init(&my_errorcheck_mutexattr); pthread_mutexattr_settype(&my_errorcheck_mutexattr, PTHREAD_MUTEX_ERRORCHECK); #endif #if defined(SAFE_MUTEX_DEFINED) safe_mutex_global_init(); #endif }
O3
c
my_mutex_init: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax leaq 0xb64577(%rip), %rbx # 0xc089c0 movq %rbx, %rdi callq 0x297c0 movq %rbx, %rdi movl $0x3, %esi callq 0x29460 leaq 0xb6455f(%rip), %rbx # 0xc089c4 movq %rbx, %rdi callq 0x297c0 movq %rbx, %rdi movl $0x2, %esi addq $0x8, %rsp popq %rbx popq %rbp jmp 0x29460
my_mutex_init: push rbp mov rbp, rsp push rbx push rax lea rbx, my_fast_mutexattr mov rdi, rbx call _pthread_mutexattr_init mov rdi, rbx mov esi, 3 call _pthread_mutexattr_settype lea rbx, my_errorcheck_mutexattr mov rdi, rbx call _pthread_mutexattr_init mov rdi, rbx mov esi, 2 add rsp, 8 pop rbx pop rbp jmp _pthread_mutexattr_settype
long long my_mutex_init() { pthread_mutexattr_init(&my_fast_mutexattr); pthread_mutexattr_settype(&my_fast_mutexattr, 3LL); pthread_mutexattr_init(&my_errorcheck_mutexattr); return pthread_mutexattr_settype(&my_errorcheck_mutexattr, 2LL); }
my_mutex_init: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX LEA RBX,[0xd089c0] MOV RDI,RBX CALL 0x001297c0 MOV RDI,RBX MOV ESI,0x3 CALL 0x00129460 LEA RBX,[0xd089c4] MOV RDI,RBX CALL 0x001297c0 MOV RDI,RBX MOV ESI,0x2 ADD RSP,0x8 POP RBX POP RBP JMP 0x00129460
void my_mutex_init(void) { pthread_mutexattr_init((pthread_mutexattr_t *)&my_fast_mutexattr); pthread_mutexattr_settype((pthread_mutexattr_t *)&my_fast_mutexattr,3); pthread_mutexattr_init((pthread_mutexattr_t *)&my_errorcheck_mutexattr); pthread_mutexattr_settype((pthread_mutexattr_t *)&my_errorcheck_mutexattr,2); return; }
19,226
print_xml_row
eloqsql/client/mysqldump.c
static void print_xml_row(FILE *xml_file, const char *row_name, MYSQL_RES *tableRes, MYSQL_ROW *row, const char *str_create) { uint i; my_bool body_found __attribute__((unused)) = 0; char *create_stmt_ptr= NULL; ulong create_stmt_len= 0; MYSQL_FIELD *field; ulong *lengths= mysql_fetch_lengths(tableRes); fprintf(xml_file, "\t\t<%s", row_name); check_io(xml_file); mysql_field_seek(tableRes, 0); for (i= 0; (field= mysql_fetch_field(tableRes)); i++) { if ((*row)[i]) { /* For 'create' statements, dump using CDATA. */ if ((str_create) && (strcmp(str_create, field->name) == 0)) { create_stmt_ptr= (*row)[i]; create_stmt_len= lengths[i]; #ifdef DBUG_ASSERT_EXISTS body_found= 1; #endif } else { fputc(' ', xml_file); print_quoted_xml(xml_file, field->name, field->name_length, 1); fputs("=\"", xml_file); if (opt_copy_s3_tables && !strcmp(field->name, "Engine") && !strcmp((*row)[i], "S3")) print_quoted_xml(xml_file, "Aria", sizeof("Aria") - 1, 0); else print_quoted_xml(xml_file, (*row)[i], lengths[i], 0); fputc('"', xml_file); check_io(xml_file); } } } if (create_stmt_len) { DBUG_ASSERT(body_found); fputs(">\n", xml_file); print_xml_cdata(xml_file, create_stmt_ptr, create_stmt_len); fprintf(xml_file, "\t\t</%s>\n", row_name); } else fputs(" />\n", xml_file); check_io(xml_file); }
O0
c
print_xml_row: 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) movb $0x0, -0x2d(%rbp) movq $0x0, -0x38(%rbp) movq $0x0, -0x40(%rbp) movq -0x18(%rbp), %rdi callq 0x51980 movq %rax, -0x50(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rdx leaq 0x97ea4(%rip), %rsi # 0xdcde0 movb $0x0, %al callq 0x381d0 movq -0x8(%rbp), %rdi callq 0x38d60 movq -0x18(%rbp), %rdi xorl %esi, %esi callq 0x51b50 movl $0x0, -0x2c(%rbp) movq -0x18(%rbp), %rdi callq 0x51730 movq %rax, -0x48(%rbp) cmpq $0x0, %rax je 0x450b1 movq -0x20(%rbp), %rax movq (%rax), %rax movl -0x2c(%rbp), %ecx cmpq $0x0, (%rax,%rcx,8) je 0x450a1 cmpq $0x0, -0x28(%rbp) je 0x44fcc movq -0x28(%rbp), %rdi movq -0x48(%rbp), %rax movq (%rax), %rsi callq 0x38880 cmpl $0x0, %eax jne 0x44fcc movq -0x20(%rbp), %rax movq (%rax), %rax movl -0x2c(%rbp), %ecx movq (%rax,%rcx,8), %rax movq %rax, -0x38(%rbp) movq -0x50(%rbp), %rax movl -0x2c(%rbp), %ecx movq (%rax,%rcx,8), %rax movq %rax, -0x40(%rbp) jmp 0x4509f movq -0x8(%rbp), %rsi movl $0x20, %edi callq 0x388b0 movq -0x8(%rbp), %rdi movq -0x48(%rbp), %rax movq (%rax), %rsi movq -0x48(%rbp), %rax movl 0x48(%rax), %eax movl %eax, %edx movl $0x1, %ecx callq 0x440e0 movq -0x8(%rbp), %rsi leaq 0x97de3(%rip), %rdi # 0xdcde6 callq 0x38340 movsbl 0x3bc824(%rip), %eax # 0x401833 cmpl $0x0, %eax je 0x45064 movq -0x48(%rbp), %rax movq (%rax), %rdi leaq 0x97dc7(%rip), %rsi # 0xdcde9 callq 0x38880 cmpl $0x0, %eax jne 0x45064 movq -0x20(%rbp), %rax movq (%rax), %rax movl -0x2c(%rbp), %ecx movq (%rax,%rcx,8), %rdi leaq 0x93cb7(%rip), %rsi # 0xd8cf8 callq 0x38880 cmpl $0x0, %eax jne 0x45064 movq -0x8(%rbp), %rdi leaq 0x97d9a(%rip), %rsi # 0xdcdf0 movl $0x4, %edx xorl %ecx, %ecx callq 0x440e0 jmp 0x45088 movq -0x8(%rbp), %rdi movq -0x20(%rbp), %rax movq (%rax), %rax movl -0x2c(%rbp), %ecx movq (%rax,%rcx,8), %rsi movq -0x50(%rbp), %rax movl -0x2c(%rbp), %ecx movq (%rax,%rcx,8), %rdx xorl %ecx, %ecx callq 0x440e0 movq -0x8(%rbp), %rsi movl $0x22, %edi callq 0x388b0 movq -0x8(%rbp), %rdi callq 0x38d60 jmp 0x450a1 jmp 0x450a3 movl -0x2c(%rbp), %eax addl $0x1, %eax movl %eax, -0x2c(%rbp) jmp 0x44f5e cmpq $0x0, -0x40(%rbp) je 0x450f5 jmp 0x450ba jmp 0x450bc movq -0x8(%rbp), %rsi leaq 0x9675f(%rip), %rdi # 0xdb826 callq 0x38340 movq -0x8(%rbp), %rdi movq -0x38(%rbp), %rsi movq -0x40(%rbp), %rdx callq 0x45620 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rdx leaq 0x97d09(%rip), %rsi # 0xdcdf5 movb $0x0, %al callq 0x381d0 jmp 0x45105 movq -0x8(%rbp), %rsi leaq 0x98b87(%rip), %rdi # 0xddc87 callq 0x38340 movq -0x8(%rbp), %rdi callq 0x38d60 addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
print_xml_row: 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_2D], 0 mov [rbp+var_38], 0 mov [rbp+var_40], 0 mov rdi, [rbp+var_18] call mysql_fetch_lengths mov [rbp+var_50], rax mov rdi, [rbp+var_8] mov rdx, [rbp+var_10] lea rsi, aS_1; "\t\t<%s" mov al, 0 call _fprintf mov rdi, [rbp+var_8] call check_io mov rdi, [rbp+var_18] xor esi, esi call mysql_field_seek mov [rbp+var_2C], 0 loc_44F5E: mov rdi, [rbp+var_18] call mysql_fetch_field mov [rbp+var_48], rax cmp rax, 0 jz loc_450B1 mov rax, [rbp+var_20] mov rax, [rax] mov ecx, [rbp+var_2C] cmp qword ptr [rax+rcx*8], 0 jz loc_450A1 cmp [rbp+var_28], 0 jz short loc_44FCC mov rdi, [rbp+var_28] mov rax, [rbp+var_48] mov rsi, [rax] call _strcmp cmp eax, 0 jnz short loc_44FCC mov rax, [rbp+var_20] mov rax, [rax] mov ecx, [rbp+var_2C] mov rax, [rax+rcx*8] mov [rbp+var_38], rax mov rax, [rbp+var_50] mov ecx, [rbp+var_2C] mov rax, [rax+rcx*8] mov [rbp+var_40], rax jmp loc_4509F loc_44FCC: mov rsi, [rbp+var_8] mov edi, 20h ; ' ' call _fputc mov rdi, [rbp+var_8] mov rax, [rbp+var_48] mov rsi, [rax] mov rax, [rbp+var_48] mov eax, [rax+48h] mov edx, eax mov ecx, 1 call print_quoted_xml mov rsi, [rbp+var_8] lea rdi, asc_DCDE6; "=\"" call _fputs movsx eax, cs:opt_copy_s3_tables cmp eax, 0 jz short loc_45064 mov rax, [rbp+var_48] mov rdi, [rax] lea rsi, aEngine_0; "Engine" call _strcmp cmp eax, 0 jnz short loc_45064 mov rax, [rbp+var_20] mov rax, [rax] mov ecx, [rbp+var_2C] mov rdi, [rax+rcx*8] lea rsi, aIfNoS3TablesWi+6Ah; "S3" call _strcmp cmp eax, 0 jnz short loc_45064 mov rdi, [rbp+var_8] lea rsi, aAria; "Aria" mov edx, 4 xor ecx, ecx call print_quoted_xml jmp short loc_45088 loc_45064: mov rdi, [rbp+var_8] mov rax, [rbp+var_20] mov rax, [rax] mov ecx, [rbp+var_2C] mov rsi, [rax+rcx*8] mov rax, [rbp+var_50] mov ecx, [rbp+var_2C] mov rdx, [rax+rcx*8] xor ecx, ecx call print_quoted_xml loc_45088: mov rsi, [rbp+var_8] mov edi, 22h ; '"' call _fputc mov rdi, [rbp+var_8] call check_io loc_4509F: jmp short $+2 loc_450A1: jmp short $+2 loc_450A3: mov eax, [rbp+var_2C] add eax, 1 mov [rbp+var_2C], eax jmp loc_44F5E loc_450B1: cmp [rbp+var_40], 0 jz short loc_450F5 jmp short $+2 loc_450BA: jmp short $+2 loc_450BC: mov rsi, [rbp+var_8] lea rdi, asc_DB823+3; ">\n" call _fputs mov rdi, [rbp+var_8] mov rsi, [rbp+var_38] mov rdx, [rbp+var_40] call print_xml_cdata mov rdi, [rbp+var_8] mov rdx, [rbp+var_10] lea rsi, aS_2; "\t\t</%s>\n" mov al, 0 call _fprintf jmp short loc_45105 loc_450F5: mov rsi, [rbp+var_8] lea rdi, aOptionsComment+19h; " />\n" call _fputs loc_45105: mov rdi, [rbp+var_8] call check_io add rsp, 50h pop rbp retn
long long print_xml_row(long long a1, const char *a2, long long a3, _QWORD *a4, long long a5) { long long lengths; // [rsp+0h] [rbp-50h] _QWORD *field; // [rsp+8h] [rbp-48h] long long v8; // [rsp+10h] [rbp-40h] long long v9; // [rsp+18h] [rbp-38h] unsigned int i; // [rsp+24h] [rbp-2Ch] v9 = 0LL; v8 = 0LL; lengths = mysql_fetch_lengths(a3); fprintf(a1, "\t\t<%s", a2); check_io(a1); mysql_field_seek(a3, 0LL); for ( i = 0; ; ++i ) { field = (_QWORD *)mysql_fetch_field(a3); if ( !field ) break; if ( *(_QWORD *)(*a4 + 8LL * i) ) { if ( a5 && !(unsigned int)strcmp(a5, *field) ) { v9 = *(_QWORD *)(*a4 + 8LL * i); v8 = *(_QWORD *)(lengths + 8LL * i); } else { fputc(32LL, a1); print_quoted_xml(a1, (_BYTE *)*field, *((unsigned int *)field + 18), 1); fputs("=\"", a1); if ( opt_copy_s3_tables && !(unsigned int)strcmp(*field, "Engine") && !(unsigned int)strcmp(*(_QWORD *)(*a4 + 8LL * i), "S3") ) { print_quoted_xml(a1, "Aria", 4LL, 0); } else { print_quoted_xml(a1, *(_BYTE **)(*a4 + 8LL * i), *(_QWORD *)(lengths + 8LL * i), 0); } fputc(34LL, a1); check_io(a1); } } } if ( v8 ) { fputs(">\n", a1); print_xml_cdata(a1, v9, v8); fprintf(a1, "\t\t</%s>\n", a2); } else { fputs(" />\n", a1); } return check_io(a1); }
print_xml_row: 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 byte ptr [RBP + -0x2d],0x0 MOV qword ptr [RBP + -0x38],0x0 MOV qword ptr [RBP + -0x40],0x0 MOV RDI,qword ptr [RBP + -0x18] CALL 0x00151980 MOV qword ptr [RBP + -0x50],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x10] LEA RSI,[0x1dcde0] MOV AL,0x0 CALL 0x001381d0 MOV RDI,qword ptr [RBP + -0x8] CALL 0x00138d60 MOV RDI,qword ptr [RBP + -0x18] XOR ESI,ESI CALL 0x00151b50 MOV dword ptr [RBP + -0x2c],0x0 LAB_00144f5e: MOV RDI,qword ptr [RBP + -0x18] CALL 0x00151730 MOV qword ptr [RBP + -0x48],RAX CMP RAX,0x0 JZ 0x001450b1 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x2c] CMP qword ptr [RAX + RCX*0x8],0x0 JZ 0x001450a1 CMP qword ptr [RBP + -0x28],0x0 JZ 0x00144fcc MOV RDI,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x48] MOV RSI,qword ptr [RAX] CALL 0x00138880 CMP EAX,0x0 JNZ 0x00144fcc MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x40],RAX JMP 0x0014509f LAB_00144fcc: MOV RSI,qword ptr [RBP + -0x8] MOV EDI,0x20 CALL 0x001388b0 MOV RDI,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x48] MOV RSI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x48] MOV EAX,dword ptr [RAX + 0x48] MOV EDX,EAX MOV ECX,0x1 CALL 0x001440e0 MOV RSI,qword ptr [RBP + -0x8] LEA RDI,[0x1dcde6] CALL 0x00138340 MOVSX EAX,byte ptr [0x00501833] CMP EAX,0x0 JZ 0x00145064 MOV RAX,qword ptr [RBP + -0x48] MOV RDI,qword ptr [RAX] LEA RSI,[0x1dcde9] CALL 0x00138880 CMP EAX,0x0 JNZ 0x00145064 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x2c] MOV RDI,qword ptr [RAX + RCX*0x8] LEA RSI,[0x1d8cf8] CALL 0x00138880 CMP EAX,0x0 JNZ 0x00145064 MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x1dcdf0] MOV EDX,0x4 XOR ECX,ECX CALL 0x001440e0 JMP 0x00145088 LAB_00145064: MOV RDI,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x2c] MOV RSI,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RBP + -0x2c] MOV RDX,qword ptr [RAX + RCX*0x8] XOR ECX,ECX CALL 0x001440e0 LAB_00145088: MOV RSI,qword ptr [RBP + -0x8] MOV EDI,0x22 CALL 0x001388b0 MOV RDI,qword ptr [RBP + -0x8] CALL 0x00138d60 LAB_0014509f: JMP 0x001450a1 LAB_001450a1: JMP 0x001450a3 LAB_001450a3: MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,0x1 MOV dword ptr [RBP + -0x2c],EAX JMP 0x00144f5e LAB_001450b1: CMP qword ptr [RBP + -0x40],0x0 JZ 0x001450f5 JMP 0x001450ba LAB_001450ba: JMP 0x001450bc LAB_001450bc: MOV RSI,qword ptr [RBP + -0x8] LEA RDI,[0x1db826] CALL 0x00138340 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RBP + -0x40] CALL 0x00145620 MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x10] LEA RSI,[0x1dcdf5] MOV AL,0x0 CALL 0x001381d0 JMP 0x00145105 LAB_001450f5: MOV RSI,qword ptr [RBP + -0x8] LEA RDI,[0x1ddc87] CALL 0x00138340 LAB_00145105: MOV RDI,qword ptr [RBP + -0x8] CALL 0x00138d60 ADD RSP,0x50 POP RBP RET
void print_xml_row(FILE *param_1,int8 param_2,int8 param_3,long *param_4,char *param_5) { int iVar1; long lVar2; int8 *puVar3; long local_48; int8 local_40; uint local_34; local_40 = 0; local_48 = 0; lVar2 = mysql_fetch_lengths(param_3); fprintf(param_1,"\t\t<%s",param_2); check_io(param_1); mysql_field_seek(param_3,0); local_34 = 0; while (puVar3 = (int8 *)mysql_fetch_field(param_3), puVar3 != (int8 *)0x0) { if (*(long *)(*param_4 + (ulong)local_34 * 8) != 0) { if ((param_5 == (char *)0x0) || (iVar1 = strcmp(param_5,(char *)*puVar3), iVar1 != 0)) { fputc(0x20,param_1); print_quoted_xml(param_1,*puVar3,*(int4 *)(puVar3 + 9),1); fputs("=\"",param_1); if ((opt_copy_s3_tables == '\0') || ((iVar1 = strcmp((char *)*puVar3,"Engine"), iVar1 != 0 || (iVar1 = strcmp(*(char **)(*param_4 + (ulong)local_34 * 8),"S3"), iVar1 != 0)))) { print_quoted_xml(param_1,*(int8 *)(*param_4 + (ulong)local_34 * 8), *(int8 *)(lVar2 + (ulong)local_34 * 8),0); } else { print_quoted_xml(param_1,&DAT_001dcdf0,4,0); } fputc(0x22,param_1); check_io(param_1); } else { local_40 = *(int8 *)(*param_4 + (ulong)local_34 * 8); local_48 = *(long *)(lVar2 + (ulong)local_34 * 8); } } local_34 = local_34 + 1; } if (local_48 == 0) { fputs(" />\n",param_1); } else { fputs(">\n",param_1); print_xml_cdata(param_1,local_40,local_48); fprintf(param_1,"\t\t</%s>\n",param_2); } check_io(param_1); return; }
19,227
my_rw_rdlock
eloqsql/mysys/thr_rwlock.c
int my_rw_rdlock(my_rw_lock_t *rwp) { pthread_mutex_lock(&rwp->lock); /* active or queued writers */ while (( rwp->state < 0 ) || rwp->waiters) pthread_cond_wait( &rwp->readers, &rwp->lock); rwp->state++; pthread_mutex_unlock(&rwp->lock); return(0); }
O0
c
my_rw_rdlock: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi callq 0x24460 movq -0x8(%rbp), %rcx movb $0x1, %al cmpl $0x0, 0x88(%rcx) movb %al, -0x9(%rbp) jl 0x27568 movq -0x8(%rbp), %rax cmpl $0x0, 0x8c(%rax) setne %al movb %al, -0x9(%rbp) movb -0x9(%rbp), %al testb $0x1, %al jne 0x27571 jmp 0x27584 movq -0x8(%rbp), %rdi addq $0x28, %rdi movq -0x8(%rbp), %rsi callq 0x244e0 jmp 0x27545 movq -0x8(%rbp), %rax movl 0x88(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x88(%rax) movq -0x8(%rbp), %rdi callq 0x24210 xorl %eax, %eax addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
my_rw_rdlock: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] call _pthread_mutex_lock loc_27545: mov rcx, [rbp+var_8] mov al, 1 cmp dword ptr [rcx+88h], 0 mov [rbp+var_9], al jl short loc_27568 mov rax, [rbp+var_8] cmp dword ptr [rax+8Ch], 0 setnz al mov [rbp+var_9], al loc_27568: mov al, [rbp+var_9] test al, 1 jnz short loc_27571 jmp short loc_27584 loc_27571: mov rdi, [rbp+var_8] add rdi, 28h ; '(' mov rsi, [rbp+var_8] call _pthread_cond_wait jmp short loc_27545 loc_27584: mov rax, [rbp+var_8] mov ecx, [rax+88h] add ecx, 1 mov [rax+88h], ecx mov rdi, [rbp+var_8] call _pthread_mutex_unlock xor eax, eax add rsp, 10h pop rbp retn
long long my_rw_rdlock(long long a1) { bool v2; // [rsp+7h] [rbp-9h] pthread_mutex_lock(a1); while ( 1 ) { v2 = 1; if ( *(int *)(a1 + 136) >= 0 ) v2 = *(_DWORD *)(a1 + 140) != 0; if ( !v2 ) break; pthread_cond_wait(a1 + 40, a1); } ++*(_DWORD *)(a1 + 136); pthread_mutex_unlock(a1); return 0LL; }
my_rw_rdlock: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] CALL 0x00124460 LAB_00127545: MOV RCX,qword ptr [RBP + -0x8] MOV AL,0x1 CMP dword ptr [RCX + 0x88],0x0 MOV byte ptr [RBP + -0x9],AL JL 0x00127568 MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x8c],0x0 SETNZ AL MOV byte ptr [RBP + -0x9],AL LAB_00127568: MOV AL,byte ptr [RBP + -0x9] TEST AL,0x1 JNZ 0x00127571 JMP 0x00127584 LAB_00127571: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x28 MOV RSI,qword ptr [RBP + -0x8] CALL 0x001244e0 JMP 0x00127545 LAB_00127584: MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x88] ADD ECX,0x1 MOV dword ptr [RAX + 0x88],ECX MOV RDI,qword ptr [RBP + -0x8] CALL 0x00124210 XOR EAX,EAX ADD RSP,0x10 POP RBP RET
int8 my_rw_rdlock(pthread_mutex_t *param_1) { bool bVar1; pthread_mutex_lock(param_1); while( true ) { bVar1 = true; if (-1 < *(int *)((long)param_1 + 0x88)) { bVar1 = *(int *)((long)param_1 + 0x8c) != 0; } if (!bVar1) break; pthread_cond_wait((pthread_cond_t *)(param_1 + 1),param_1); } *(int *)((long)param_1 + 0x88) = *(int *)((long)param_1 + 0x88) + 1; pthread_mutex_unlock(param_1); return 0; }
19,228
str2int
eloqsql/strings/str2int.c
char *str2int(register const char *src, register int radix, long int lower, long int upper, long int *val) { int sign; /* is number negative (+1) or positive (-1) */ int n; /* number of digits yet to be converted */ long limit; /* "largest" possible valid input */ long scale; /* the amount to multiply next digit by */ long sofar; /* the running value */ register int d; /* (negative of) next digit */ char *start; int digits[32]; /* Room for numbers */ /* Make sure *val is sensible in case of error */ *val = 0; /* Check that the radix is in the range 2..36 */ #ifndef DBUG_OFF if (radix < 2 || radix > 36) { errno=EDOM; return NullS; } #endif /* The basic problem is: how do we handle the conversion of a number without resorting to machine-specific code to check for overflow? Obviously, we have to ensure that no calculation can overflow. We are guaranteed that the "lower" and "upper" arguments are valid machine integers. On sign-and-magnitude, twos-complement, and ones-complement machines all, if +|n| is representable, so is -|n|, but on twos complement machines the converse is not true. So the "maximum" representable number has a negative representative. Limit is set to MY_MIN(-|lower|,-|upper|); this is the "largest" number we are concerned with. */ /* Calculate Limit using Scale as a scratch variable */ if ((limit = lower) > 0) limit = -limit; if ((scale = upper) > 0) scale = -scale; if (scale < limit) limit = scale; /* Skip leading spaces and check for a sign. Note: because on a 2s complement machine MinLong is a valid integer but |MinLong| is not, we have to keep the current converted value (and the scale!) as *negative* numbers, so the sign is the opposite of what you might expect. */ while (my_isspace(&my_charset_latin1,*src)) src++; sign = -1; if (*src == '+') src++; else if (*src == '-') src++, sign = 1; /* Skip leading zeros so that we never compute a power of radix in scale that we won't have a need for. Otherwise sticking enough 0s in front of a number could cause the multiplication to overflow when it neededn't. */ start=(char*) src; while (*src == '0') src++; /* Move over the remaining digits. We have to convert from left to left in order to avoid overflow. Answer is after last digit. */ for (n = 0; (digits[n]=char_val(*src)) < radix && n < 20; n++,src++) ; /* Check that there is at least one digit */ if (start == src) { errno=EDOM; return NullS; } /* The invariant we want to maintain is that src is just to the right of n digits, we've converted k digits to sofar, scale = -radix**k, and scale < sofar < 0. Now if the final number is to be within the original Limit, we must have (to the left)*scale+sofar >= Limit, or (to the left)*scale >= Limit-sofar, i.e. the digits to the left of src must form an integer <= (Limit-sofar)/(scale). In particular, this is true of the next digit. In our incremental calculation of Limit, IT IS VITAL that (-|N|)/(-|D|) = |N|/|D| */ for (sofar = 0, scale = -1; --n >= 1;) { if ((long) -(d=digits[n]) < limit) { errno=ERANGE; return NullS; } limit = (limit+d)/radix, sofar += d*scale; scale *= radix; } if (n == 0) { if ((long) -(d=digits[n]) < limit) /* get last digit */ { errno=ERANGE; return NullS; } sofar+=d*scale; } /* Now it might still happen that sofar = -32768 or its equivalent, so we can't just multiply by the sign and check that the result is in the range lower..upper. All of this caution is a right pain in the neck. If only there were a standard routine which says generate thus and such a signal on integer overflow... But not enough machines can do it *SIGH*. */ if (sign < 0) { if (sofar < -LONG_MAX || (sofar= -sofar) > upper) { errno=ERANGE; return NullS; } } else if (sofar < lower) { errno=ERANGE; return NullS; } *val = sofar; errno=0; /* indicate that all went well */ return (char*) src; }
O0
c
str2int: pushq %rbp movq %rsp, %rbp subq $0xf0, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq -0x30(%rbp), %rax movq $0x0, (%rax) movq -0x20(%rbp), %rax movq %rax, -0x40(%rbp) cmpq $0x0, %rax jle 0x12b211 xorl %eax, %eax subq -0x40(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x48(%rbp) cmpq $0x0, %rax jle 0x12b229 xorl %eax, %eax subq -0x48(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax cmpq -0x40(%rbp), %rax jge 0x12b23b movq -0x48(%rbp), %rax movq %rax, -0x40(%rbp) jmp 0x12b23d leaq 0x22e2dc(%rip), %rax # 0x359520 movq 0x40(%rax), %rax movq -0x10(%rbp), %rcx movzbl (%rcx), %ecx movzbl 0x1(%rax,%rcx), %eax andl $0x8, %eax cmpl $0x0, %eax je 0x12b26a movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0x12b23d movl $0xffffffff, -0x34(%rbp) # imm = 0xFFFFFFFF movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x2b, %eax jne 0x12b28b movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0x12b2ac movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x2d, %eax jne 0x12b2aa movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) movl $0x1, -0x34(%rbp) jmp 0x12b2ac movq -0x10(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x30, %eax jne 0x12b2ce movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0x12b2b4 movl $0x0, -0x38(%rbp) movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x30, %eax jl 0x12b2ff movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x39, %eax jg 0x12b2ff movq -0x10(%rbp), %rax movsbl (%rax), %eax subl $0x30, %eax movl %eax, -0xe4(%rbp) jmp 0x12b37e movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x41, %eax jl 0x12b32c movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x5a, %eax jg 0x12b32c movq -0x10(%rbp), %rax movsbl (%rax), %eax subl $0x41, %eax addl $0xa, %eax movl %eax, -0xe8(%rbp) jmp 0x12b372 movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x61, %eax jl 0x12b359 movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x7a, %eax jg 0x12b359 movq -0x10(%rbp), %rax movsbl (%rax), %eax subl $0x61, %eax addl $0xa, %eax movl %eax, -0xec(%rbp) jmp 0x12b366 movl $0x7f, %eax movl %eax, -0xec(%rbp) jmp 0x12b366 movl -0xec(%rbp), %eax movl %eax, -0xe8(%rbp) movl -0xe8(%rbp), %eax movl %eax, -0xe4(%rbp) movl -0xe4(%rbp), %ecx movslq -0x38(%rbp), %rax movl %ecx, -0xe0(%rbp,%rax,4) xorl %eax, %eax cmpl -0x14(%rbp), %ecx movb %al, -0xed(%rbp) jge 0x12b3a9 cmpl $0x14, -0x38(%rbp) setl %al movb %al, -0xed(%rbp) movb -0xed(%rbp), %al testb $0x1, %al jne 0x12b3b5 jmp 0x12b3d1 jmp 0x12b3b7 movl -0x38(%rbp), %eax addl $0x1, %eax movl %eax, -0x38(%rbp) movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0x12b2d5 movq -0x60(%rbp), %rax cmpq -0x10(%rbp), %rax jne 0x12b3f3 callq 0x3a9f0 movl $0x21, (%rax) movq $0x0, -0x8(%rbp) jmp 0x12b540 movq $0x0, -0x50(%rbp) movq $-0x1, -0x48(%rbp) movl -0x38(%rbp), %eax addl $-0x1, %eax movl %eax, -0x38(%rbp) cmpl $0x1, %eax jl 0x12b47b movslq -0x38(%rbp), %rax movl -0xe0(%rbp,%rax,4), %ecx movl %ecx, -0x54(%rbp) xorl %eax, %eax subl %ecx, %eax cltq cmpq -0x40(%rbp), %rax jge 0x12b443 callq 0x3a9f0 movl $0x22, (%rax) movq $0x0, -0x8(%rbp) jmp 0x12b540 movq -0x40(%rbp), %rax movslq -0x54(%rbp), %rcx addq %rcx, %rax movslq -0x14(%rbp), %rcx cqto idivq %rcx movq %rax, -0x40(%rbp) movslq -0x54(%rbp), %rax imulq -0x48(%rbp), %rax addq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) movslq -0x14(%rbp), %rax imulq -0x48(%rbp), %rax movq %rax, -0x48(%rbp) jmp 0x12b403 cmpl $0x0, -0x38(%rbp) jne 0x12b4c4 movslq -0x38(%rbp), %rax movl -0xe0(%rbp,%rax,4), %ecx movl %ecx, -0x54(%rbp) xorl %eax, %eax subl %ecx, %eax cltq cmpq -0x40(%rbp), %rax jge 0x12b4b3 callq 0x3a9f0 movl $0x22, (%rax) movq $0x0, -0x8(%rbp) jmp 0x12b540 movslq -0x54(%rbp), %rax imulq -0x48(%rbp), %rax addq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) cmpl $0x0, -0x34(%rbp) jge 0x12b501 movabsq $-0x7fffffffffffffff, %rax # imm = 0x8000000000000001 cmpq %rax, -0x50(%rbp) jl 0x12b4ea xorl %eax, %eax subq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) cmpq -0x28(%rbp), %rax jle 0x12b4ff callq 0x3a9f0 movl $0x22, (%rax) movq $0x0, -0x8(%rbp) jmp 0x12b540 jmp 0x12b522 movq -0x50(%rbp), %rax cmpq -0x20(%rbp), %rax jge 0x12b520 callq 0x3a9f0 movl $0x22, (%rax) movq $0x0, -0x8(%rbp) jmp 0x12b540 jmp 0x12b522 movq -0x50(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) callq 0x3a9f0 movl $0x0, (%rax) movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0xf0, %rsp popq %rbp retq nopl (%rax)
str2int: push rbp mov rbp, rsp sub rsp, 0F0h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov rax, [rbp+var_30] mov qword ptr [rax], 0 mov rax, [rbp+var_20] mov [rbp+var_40], rax cmp rax, 0 jle short loc_12B211 xor eax, eax sub rax, [rbp+var_40] mov [rbp+var_40], rax loc_12B211: mov rax, [rbp+var_28] mov [rbp+var_48], rax cmp rax, 0 jle short loc_12B229 xor eax, eax sub rax, [rbp+var_48] mov [rbp+var_48], rax loc_12B229: mov rax, [rbp+var_48] cmp rax, [rbp+var_40] jge short loc_12B23B mov rax, [rbp+var_48] mov [rbp+var_40], rax loc_12B23B: jmp short $+2 loc_12B23D: lea rax, my_charset_latin1 mov rax, [rax+40h] mov rcx, [rbp+var_10] movzx ecx, byte ptr [rcx] movzx eax, byte ptr [rax+rcx+1] and eax, 8 cmp eax, 0 jz short loc_12B26A mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp short loc_12B23D loc_12B26A: mov [rbp+var_34], 0FFFFFFFFh mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 2Bh ; '+' jnz short loc_12B28B mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp short loc_12B2AC loc_12B28B: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 2Dh ; '-' jnz short loc_12B2AA mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax mov [rbp+var_34], 1 loc_12B2AA: jmp short $+2 loc_12B2AC: mov rax, [rbp+var_10] mov [rbp+var_60], rax loc_12B2B4: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 30h ; '0' jnz short loc_12B2CE mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp short loc_12B2B4 loc_12B2CE: mov [rbp+var_38], 0 loc_12B2D5: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 30h ; '0' jl short loc_12B2FF mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 39h ; '9' jg short loc_12B2FF mov rax, [rbp+var_10] movsx eax, byte ptr [rax] sub eax, 30h ; '0' mov [rbp+var_E4], eax jmp short loc_12B37E loc_12B2FF: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 41h ; 'A' jl short loc_12B32C mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 5Ah ; 'Z' jg short loc_12B32C mov rax, [rbp+var_10] movsx eax, byte ptr [rax] sub eax, 41h ; 'A' add eax, 0Ah mov [rbp+var_E8], eax jmp short loc_12B372 loc_12B32C: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 61h ; 'a' jl short loc_12B359 mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 7Ah ; 'z' jg short loc_12B359 mov rax, [rbp+var_10] movsx eax, byte ptr [rax] sub eax, 61h ; 'a' add eax, 0Ah mov [rbp+var_EC], eax jmp short loc_12B366 loc_12B359: mov eax, 7Fh mov [rbp+var_EC], eax jmp short $+2 loc_12B366: mov eax, [rbp+var_EC] mov [rbp+var_E8], eax loc_12B372: mov eax, [rbp+var_E8] mov [rbp+var_E4], eax loc_12B37E: mov ecx, [rbp+var_E4] movsxd rax, [rbp+var_38] mov [rbp+rax*4+var_E0], ecx xor eax, eax cmp ecx, [rbp+var_14] mov [rbp+var_ED], al jge short loc_12B3A9 cmp [rbp+var_38], 14h setl al mov [rbp+var_ED], al loc_12B3A9: mov al, [rbp+var_ED] test al, 1 jnz short loc_12B3B5 jmp short loc_12B3D1 loc_12B3B5: jmp short $+2 loc_12B3B7: mov eax, [rbp+var_38] add eax, 1 mov [rbp+var_38], eax mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp loc_12B2D5 loc_12B3D1: mov rax, [rbp+var_60] cmp rax, [rbp+var_10] jnz short loc_12B3F3 call ___errno_location mov dword ptr [rax], 21h ; '!' mov [rbp+var_8], 0 jmp loc_12B540 loc_12B3F3: mov [rbp+var_50], 0 mov [rbp+var_48], 0FFFFFFFFFFFFFFFFh loc_12B403: mov eax, [rbp+var_38] add eax, 0FFFFFFFFh mov [rbp+var_38], eax cmp eax, 1 jl short loc_12B47B movsxd rax, [rbp+var_38] mov ecx, [rbp+rax*4+var_E0] mov [rbp+var_54], ecx xor eax, eax sub eax, ecx cdqe cmp rax, [rbp+var_40] jge short loc_12B443 call ___errno_location mov dword ptr [rax], 22h ; '"' mov [rbp+var_8], 0 jmp loc_12B540 loc_12B443: mov rax, [rbp+var_40] movsxd rcx, [rbp+var_54] add rax, rcx movsxd rcx, [rbp+var_14] cqo idiv rcx mov [rbp+var_40], rax movsxd rax, [rbp+var_54] imul rax, [rbp+var_48] add rax, [rbp+var_50] mov [rbp+var_50], rax movsxd rax, [rbp+var_14] imul rax, [rbp+var_48] mov [rbp+var_48], rax jmp short loc_12B403 loc_12B47B: cmp [rbp+var_38], 0 jnz short loc_12B4C4 movsxd rax, [rbp+var_38] mov ecx, [rbp+rax*4+var_E0] mov [rbp+var_54], ecx xor eax, eax sub eax, ecx cdqe cmp rax, [rbp+var_40] jge short loc_12B4B3 call ___errno_location mov dword ptr [rax], 22h ; '"' mov [rbp+var_8], 0 jmp loc_12B540 loc_12B4B3: movsxd rax, [rbp+var_54] imul rax, [rbp+var_48] add rax, [rbp+var_50] mov [rbp+var_50], rax loc_12B4C4: cmp [rbp+var_34], 0 jge short loc_12B501 mov rax, 8000000000000001h cmp [rbp+var_50], rax jl short loc_12B4EA xor eax, eax sub rax, [rbp+var_50] mov [rbp+var_50], rax cmp rax, [rbp+var_28] jle short loc_12B4FF loc_12B4EA: call ___errno_location mov dword ptr [rax], 22h ; '"' mov [rbp+var_8], 0 jmp short loc_12B540 loc_12B4FF: jmp short loc_12B522 loc_12B501: mov rax, [rbp+var_50] cmp rax, [rbp+var_20] jge short loc_12B520 call ___errno_location mov dword ptr [rax], 22h ; '"' mov [rbp+var_8], 0 jmp short loc_12B540 loc_12B520: jmp short $+2 loc_12B522: mov rcx, [rbp+var_50] mov rax, [rbp+var_30] mov [rax], rcx call ___errno_location mov dword ptr [rax], 0 mov rax, [rbp+var_10] mov [rbp+var_8], rax loc_12B540: mov rax, [rbp+var_8] add rsp, 0F0h pop rbp retn
_BYTE * str2int(_BYTE *a1, int a2, long long a3, long long a4, long long *a5) { bool v6; // [rsp+3h] [rbp-EDh] int v7; // [rsp+4h] [rbp-ECh] int v8; // [rsp+8h] [rbp-E8h] int v9; // [rsp+Ch] [rbp-E4h] _DWORD v10[32]; // [rsp+10h] [rbp-E0h] _BYTE *v11; // [rsp+90h] [rbp-60h] int v12; // [rsp+9Ch] [rbp-54h] long long v13; // [rsp+A0h] [rbp-50h] long long i; // [rsp+A8h] [rbp-48h] long long v15; // [rsp+B0h] [rbp-40h] int v16; // [rsp+B8h] [rbp-38h] int v17; // [rsp+BCh] [rbp-34h] long long *v18; // [rsp+C0h] [rbp-30h] long long v19; // [rsp+C8h] [rbp-28h] long long v20; // [rsp+D0h] [rbp-20h] int v21; // [rsp+DCh] [rbp-14h] _BYTE *v22; // [rsp+E0h] [rbp-10h] v22 = a1; v21 = a2; v20 = a3; v19 = a4; v18 = a5; *a5 = 0LL; v15 = v20; if ( v20 > 0 ) v15 = -v15; i = v19; if ( v19 > 0 ) i = -i; if ( i < v15 ) v15 = i; while ( (*(_BYTE *)(*(_QWORD *)&my_charset_latin1[16] + (unsigned __int8)*v22 + 1LL) & 8) != 0 ) ++v22; v17 = -1; if ( *v22 == 43 ) { ++v22; } else if ( *v22 == 45 ) { ++v22; v17 = 1; } v11 = v22; while ( *v22 == 48 ) ++v22; v16 = 0; while ( 1 ) { if ( (char)*v22 < 48 || (char)*v22 > 57 ) { if ( (char)*v22 < 65 || (char)*v22 > 90 ) { v7 = (char)*v22 < 97 || (char)*v22 > 122 ? 127 : (char)*v22 - 97 + 10; v8 = v7; } else { v8 = (char)*v22 - 65 + 10; } v9 = v8; } else { v9 = (char)*v22 - 48; } v10[v16] = v9; v6 = 0; if ( v9 < v21 ) v6 = v16 < 20; if ( !v6 ) break; ++v16; ++v22; } if ( v11 != v22 ) { v13 = 0LL; for ( i = -1LL; --v16 >= 1; i *= v21 ) { v12 = v10[v16]; if ( -v12 < v15 ) goto LABEL_49; v15 = (v12 + v15) / v21; v13 += i * v12; } if ( !v16 ) { v12 = v10[0]; if ( -v10[0] < v15 ) goto LABEL_49; v13 += i * v12; } if ( v17 < 0 ) { if ( v13 == 0x8000000000000000LL ) goto LABEL_49; v13 = -v13; if ( v13 > v19 ) goto LABEL_49; LABEL_50: *v18 = v13; *(_DWORD *)__errno_location(a1) = 0; return v22; } if ( v13 >= v20 ) goto LABEL_50; LABEL_49: *(_DWORD *)__errno_location(a1) = 34; return 0LL; } *(_DWORD *)__errno_location(a1) = 33; return 0LL; }
19,229
str2int
eloqsql/strings/str2int.c
char *str2int(register const char *src, register int radix, long int lower, long int upper, long int *val) { int sign; /* is number negative (+1) or positive (-1) */ int n; /* number of digits yet to be converted */ long limit; /* "largest" possible valid input */ long scale; /* the amount to multiply next digit by */ long sofar; /* the running value */ register int d; /* (negative of) next digit */ char *start; int digits[32]; /* Room for numbers */ /* Make sure *val is sensible in case of error */ *val = 0; /* Check that the radix is in the range 2..36 */ #ifndef DBUG_OFF if (radix < 2 || radix > 36) { errno=EDOM; return NullS; } #endif /* The basic problem is: how do we handle the conversion of a number without resorting to machine-specific code to check for overflow? Obviously, we have to ensure that no calculation can overflow. We are guaranteed that the "lower" and "upper" arguments are valid machine integers. On sign-and-magnitude, twos-complement, and ones-complement machines all, if +|n| is representable, so is -|n|, but on twos complement machines the converse is not true. So the "maximum" representable number has a negative representative. Limit is set to MY_MIN(-|lower|,-|upper|); this is the "largest" number we are concerned with. */ /* Calculate Limit using Scale as a scratch variable */ if ((limit = lower) > 0) limit = -limit; if ((scale = upper) > 0) scale = -scale; if (scale < limit) limit = scale; /* Skip leading spaces and check for a sign. Note: because on a 2s complement machine MinLong is a valid integer but |MinLong| is not, we have to keep the current converted value (and the scale!) as *negative* numbers, so the sign is the opposite of what you might expect. */ while (my_isspace(&my_charset_latin1,*src)) src++; sign = -1; if (*src == '+') src++; else if (*src == '-') src++, sign = 1; /* Skip leading zeros so that we never compute a power of radix in scale that we won't have a need for. Otherwise sticking enough 0s in front of a number could cause the multiplication to overflow when it neededn't. */ start=(char*) src; while (*src == '0') src++; /* Move over the remaining digits. We have to convert from left to left in order to avoid overflow. Answer is after last digit. */ for (n = 0; (digits[n]=char_val(*src)) < radix && n < 20; n++,src++) ; /* Check that there is at least one digit */ if (start == src) { errno=EDOM; return NullS; } /* The invariant we want to maintain is that src is just to the right of n digits, we've converted k digits to sofar, scale = -radix**k, and scale < sofar < 0. Now if the final number is to be within the original Limit, we must have (to the left)*scale+sofar >= Limit, or (to the left)*scale >= Limit-sofar, i.e. the digits to the left of src must form an integer <= (Limit-sofar)/(scale). In particular, this is true of the next digit. In our incremental calculation of Limit, IT IS VITAL that (-|N|)/(-|D|) = |N|/|D| */ for (sofar = 0, scale = -1; --n >= 1;) { if ((long) -(d=digits[n]) < limit) { errno=ERANGE; return NullS; } limit = (limit+d)/radix, sofar += d*scale; scale *= radix; } if (n == 0) { if ((long) -(d=digits[n]) < limit) /* get last digit */ { errno=ERANGE; return NullS; } sofar+=d*scale; } /* Now it might still happen that sofar = -32768 or its equivalent, so we can't just multiply by the sign and check that the result is in the range lower..upper. All of this caution is a right pain in the neck. If only there were a standard routine which says generate thus and such a signal on integer overflow... But not enough machines can do it *SIGH*. */ if (sign < 0) { if (sofar < -LONG_MAX || (sofar= -sofar) > upper) { errno=ERANGE; return NullS; } } else if (sofar < lower) { errno=ERANGE; return NullS; } *val = sofar; errno=0; /* indicate that all went well */ return (char*) src; }
O3
c
str2int: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x80, %rsp movq %rdx, %r9 movq $0x0, (%r8) movq %rdx, %rax negq %rax cmovsq %rdx, %rax movq %rcx, %rdx negq %rdx cmovnsq %rcx, %rdx leaq 0x2ed22d(%rip), %r10 # 0x3ca060 movq 0x40(%r10), %r11 movzbl (%rdi), %r10d incq %rdi testb $0x8, 0x1(%r11,%r10) jne 0xdce37 negq %rax cmpq %rax, %rdx cmovlq %rdx, %rax cmpl $0x2b, %r10d je 0xdce64 cmpl $0x2d, %r10d jne 0xdce61 xorl %r10d, %r10d jmp 0xdce67 decq %rdi movb $0x1, %r10b leaq -0x1(%rdi), %rbx movb 0x1(%rbx), %r14b incq %rbx cmpb $0x30, %r14b je 0xdce6b xorl %r11d, %r11d xorl %edx, %edx leal -0x30(%r14), %r15d cmpb $0x9, %r15b ja 0xdce8d movzbl %r15b, %r15d jmp 0xdceb9 leal -0x41(%r14), %r15d cmpb $0x19, %r15b ja 0xdcea1 movzbl %r14b, %r15d addl $-0x37, %r15d jmp 0xdceb9 leal -0x61(%r14), %r12d movl $0x7f, %r15d cmpb $0x19, %r12b ja 0xdceb9 movzbl %r14b, %r15d addl $-0x57, %r15d movl %r15d, -0xa0(%rbp,%rdx,4) cmpl %esi, %r15d jge 0xdcedb cmpq $0x13, %rdx ja 0xdcedb incq %rdx movb 0x1(%rbx), %r14b incq %rbx incl %r11d jmp 0xdce7d cmpq %rdi, %rbx je 0xdcf23 cmpq $0x2, %rdx jb 0xdcf2b movslq %esi, %r14 movq $-0x1, %rdi xorl %esi, %esi decl %r11d movslq -0xa0(%rbp,%r11,4), %r15 movq %r15, %rdx negq %rdx cmpq %rdx, %rax jg 0xdcf66 addq %r15, %rax cqto idivq %r14 imulq %rdi, %r15 addq %r15, %rsi imulq %r14, %rdi cmpl $0x1, %r11d jg 0xdcef2 jmp 0xdcf38 movl $0x21, %r14d jmp 0xdcf6c xorl %esi, %esi decl %edx jne 0xdcf51 movq $-0x1, %rdi movslq -0xa0(%rbp), %rdx movq %rdx, %r11 negq %r11 cmpq %r11, %rax jg 0xdcf66 imulq %rdx, %rdi addq %rdi, %rsi testb %r10b, %r10b je 0xdcf89 negq %rsi seto %al cmpq %rcx, %rsi setg %cl orb %al, %cl je 0xdcf8e movl $0x22, %r14d xorl %ebx, %ebx callq 0x39a20 movl %r14d, (%rax) movq %rbx, %rax addq $0x80, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq cmpq %r9, %rsi jl 0xdcf66 movq %rsi, (%r8) xorl %r14d, %r14d jmp 0xdcf6e nop
str2int: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 80h mov r9, rdx mov qword ptr [r8], 0 mov rax, rdx neg rax cmovs rax, rdx mov rdx, rcx neg rdx cmovns rdx, rcx lea r10, my_charset_latin1 mov r11, [r10+40h] loc_DCE37: movzx r10d, byte ptr [rdi] inc rdi test byte ptr [r11+r10+1], 8 jnz short loc_DCE37 neg rax cmp rdx, rax cmovl rax, rdx cmp r10d, 2Bh ; '+' jz short loc_DCE64 cmp r10d, 2Dh ; '-' jnz short loc_DCE61 xor r10d, r10d jmp short loc_DCE67 loc_DCE61: dec rdi loc_DCE64: mov r10b, 1 loc_DCE67: lea rbx, [rdi-1] loc_DCE6B: mov r14b, [rbx+1] inc rbx cmp r14b, 30h ; '0' jz short loc_DCE6B xor r11d, r11d xor edx, edx loc_DCE7D: lea r15d, [r14-30h] cmp r15b, 9 ja short loc_DCE8D movzx r15d, r15b jmp short loc_DCEB9 loc_DCE8D: lea r15d, [r14-41h] cmp r15b, 19h ja short loc_DCEA1 movzx r15d, r14b add r15d, 0FFFFFFC9h jmp short loc_DCEB9 loc_DCEA1: lea r12d, [r14-61h] mov r15d, 7Fh cmp r12b, 19h ja short loc_DCEB9 movzx r15d, r14b add r15d, 0FFFFFFA9h loc_DCEB9: mov [rbp+rdx*4+var_A0], r15d cmp r15d, esi jge short loc_DCEDB cmp rdx, 13h ja short loc_DCEDB inc rdx mov r14b, [rbx+1] inc rbx inc r11d jmp short loc_DCE7D loc_DCEDB: cmp rbx, rdi jz short loc_DCF23 cmp rdx, 2 jb short loc_DCF2B movsxd r14, esi mov rdi, 0FFFFFFFFFFFFFFFFh xor esi, esi loc_DCEF2: dec r11d movsxd r15, [rbp+r11*4+var_A0] mov rdx, r15 neg rdx cmp rax, rdx jg short loc_DCF66 add rax, r15 cqo idiv r14 imul r15, rdi add rsi, r15 imul rdi, r14 cmp r11d, 1 jg short loc_DCEF2 jmp short loc_DCF38 loc_DCF23: mov r14d, 21h ; '!' jmp short loc_DCF6C loc_DCF2B: xor esi, esi dec edx jnz short loc_DCF51 mov rdi, 0FFFFFFFFFFFFFFFFh loc_DCF38: movsxd rdx, [rbp+var_A0] mov r11, rdx neg r11 cmp rax, r11 jg short loc_DCF66 imul rdi, rdx add rsi, rdi loc_DCF51: test r10b, r10b jz short loc_DCF89 neg rsi seto al cmp rsi, rcx setnle cl or cl, al jz short loc_DCF8E loc_DCF66: mov r14d, 22h ; '"' loc_DCF6C: xor ebx, ebx loc_DCF6E: call ___errno_location mov [rax], r14d mov rax, rbx add rsp, 80h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_DCF89: cmp rsi, r9 jl short loc_DCF66 loc_DCF8E: mov [r8], rsi xor r14d, r14d jmp short loc_DCF6E
long long str2int(long long a1, int a2, long long a3, long long a4, long long *a5) { long long v6; // rax long long v7; // rdx long long v8; // r10 long long v9; // rax char v10; // r10 long long v11; // rbx unsigned __int8 v12; // r14 long long v13; // r11 unsigned long long i; // rdx int v15; // r15d long long v16; // r14 long long v17; // rsi long long v18; // r15 int v19; // r14d _DWORD v21[40]; // [rsp+0h] [rbp-A0h] *a5 = 0LL; v6 = -a3; if ( a3 > 0 ) v6 = a3; v7 = -a4; if ( a4 <= 0 ) v7 = a4; do v8 = *(unsigned __int8 *)a1++; while ( (*(_BYTE *)(*(_QWORD *)&my_charset_latin1[16] + v8 + 1) & 8) != 0 ); v9 = -v6; if ( v7 < v9 ) v9 = v7; if ( (_DWORD)v8 != 43 ) { if ( (_DWORD)v8 == 45 ) { v10 = 0; goto LABEL_13; } --a1; } v10 = 1; LABEL_13: v11 = a1 - 1; do v12 = *(_BYTE *)++v11; while ( v12 == 48 ); LODWORD(v13) = 0; for ( i = 0LL; ; ++i ) { LOBYTE(v15) = v12 - 48; if ( (unsigned __int8)(v12 - 48) > 9u ) { if ( (unsigned __int8)(v12 - 65) > 0x19u ) { v15 = 127; if ( (unsigned __int8)(v12 - 97) <= 0x19u ) v15 = v12 - 87; } else { v15 = v12 - 55; } } else { v15 = (unsigned __int8)v15; } v21[i] = v15; if ( v15 >= a2 || i > 0x13 ) break; v12 = *(_BYTE *)++v11; LODWORD(v13) = v13 + 1; } if ( v11 != a1 ) { if ( i >= 2 ) { v16 = a2; a1 = -1LL; v17 = 0LL; while ( 1 ) { v13 = (unsigned int)(v13 - 1); v18 = (int)v21[v13]; if ( v9 > -v18 ) goto LABEL_38; v9 = (v18 + v9) / v16; v17 += a1 * v18; a1 *= v16; if ( (int)v13 <= 1 ) goto LABEL_34; } } v17 = 0LL; if ( (_DWORD)i == 1 ) { a1 = -1LL; LABEL_34: if ( v9 > -(long long)v21[0] ) goto LABEL_38; a1 *= v21[0]; v17 += a1; } if ( v10 ) { v17 = -v17; if ( __OFSUB__(v17, 1LL) || v17 > a4 ) { LABEL_38: v19 = 34; goto LABEL_39; } } else if ( v17 < a3 ) { goto LABEL_38; } *a5 = v17; v19 = 0; goto LABEL_40; } v19 = 33; LABEL_39: v11 = 0LL; LABEL_40: *(_DWORD *)__errno_location(a1) = v19; return v11; }
str2int: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x80 MOV R9,RDX MOV qword ptr [R8],0x0 MOV RAX,RDX NEG RAX CMOVS RAX,RDX MOV RDX,RCX NEG RDX CMOVNS RDX,RCX LEA R10,[0x4ca060] MOV R11,qword ptr [R10 + 0x40] LAB_001dce37: MOVZX R10D,byte ptr [RDI] INC RDI TEST byte ptr [R11 + R10*0x1 + 0x1],0x8 JNZ 0x001dce37 NEG RAX CMP RDX,RAX CMOVL RAX,RDX CMP R10D,0x2b JZ 0x001dce64 CMP R10D,0x2d JNZ 0x001dce61 XOR R10D,R10D JMP 0x001dce67 LAB_001dce61: DEC RDI LAB_001dce64: MOV R10B,0x1 LAB_001dce67: LEA RBX,[RDI + -0x1] LAB_001dce6b: MOV R14B,byte ptr [RBX + 0x1] INC RBX CMP R14B,0x30 JZ 0x001dce6b XOR R11D,R11D XOR EDX,EDX LAB_001dce7d: LEA R15D,[R14 + -0x30] CMP R15B,0x9 JA 0x001dce8d MOVZX R15D,R15B JMP 0x001dceb9 LAB_001dce8d: LEA R15D,[R14 + -0x41] CMP R15B,0x19 JA 0x001dcea1 MOVZX R15D,R14B ADD R15D,-0x37 JMP 0x001dceb9 LAB_001dcea1: LEA R12D,[R14 + -0x61] MOV R15D,0x7f CMP R12B,0x19 JA 0x001dceb9 MOVZX R15D,R14B ADD R15D,-0x57 LAB_001dceb9: MOV dword ptr [RBP + RDX*0x4 + -0xa0],R15D CMP R15D,ESI JGE 0x001dcedb CMP RDX,0x13 JA 0x001dcedb INC RDX MOV R14B,byte ptr [RBX + 0x1] INC RBX INC R11D JMP 0x001dce7d LAB_001dcedb: CMP RBX,RDI JZ 0x001dcf23 CMP RDX,0x2 JC 0x001dcf2b MOVSXD R14,ESI MOV RDI,-0x1 XOR ESI,ESI LAB_001dcef2: DEC R11D MOVSXD R15,dword ptr [RBP + R11*0x4 + -0xa0] MOV RDX,R15 NEG RDX CMP RAX,RDX JG 0x001dcf66 ADD RAX,R15 CQO IDIV R14 IMUL R15,RDI ADD RSI,R15 IMUL RDI,R14 CMP R11D,0x1 JG 0x001dcef2 JMP 0x001dcf38 LAB_001dcf23: MOV R14D,0x21 JMP 0x001dcf6c LAB_001dcf2b: XOR ESI,ESI DEC EDX JNZ 0x001dcf51 MOV RDI,-0x1 LAB_001dcf38: MOVSXD RDX,dword ptr [RBP + -0xa0] MOV R11,RDX NEG R11 CMP RAX,R11 JG 0x001dcf66 IMUL RDI,RDX ADD RSI,RDI LAB_001dcf51: TEST R10B,R10B JZ 0x001dcf89 NEG RSI SETO AL CMP RSI,RCX SETG CL OR CL,AL JZ 0x001dcf8e LAB_001dcf66: MOV R14D,0x22 LAB_001dcf6c: XOR EBX,EBX LAB_001dcf6e: CALL 0x00139a20 MOV dword ptr [RAX],R14D MOV RAX,RBX ADD RSP,0x80 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001dcf89: CMP RSI,R9 JL 0x001dcf66 LAB_001dcf8e: MOV qword ptr [R8],RSI XOR R14D,R14D JMP 0x001dcf6e
byte * str2int(byte *param_1,int param_2,long param_3,long param_4,long *param_5) { long lVar1; int *piVar2; ulong uVar3; byte *pbVar4; long lVar5; byte *pbVar6; long lVar7; ulong uVar8; byte bVar9; int iVar10; uint uVar11; long lVar12; bool bVar13; uint local_a8 [32]; *param_5 = 0; lVar5 = -param_3; if (0 < param_3) { lVar5 = param_3; } lVar7 = -param_4; if (param_4 < 1) { lVar7 = param_4; } do { pbVar4 = param_1; bVar9 = *pbVar4; param_1 = pbVar4 + 1; } while ((PTR_ctype_latin1_004ca0a0[(ulong)bVar9 + 1] & 8) != 0); lVar1 = -lVar5; if (SBORROW8(lVar7,-lVar5) != lVar7 + lVar5 < 0) { lVar1 = lVar7; } pbVar6 = param_1; if ((bVar9 == 0x2b) || (pbVar6 = pbVar4, bVar9 != 0x2d)) { bVar13 = true; } else { bVar13 = false; pbVar6 = param_1; } pbVar4 = pbVar6 + -1; do { bVar9 = pbVar4[1]; pbVar4 = pbVar4 + 1; } while (bVar9 == 0x30); uVar8 = 0; uVar3 = 0; while( true ) { if ((byte)(bVar9 - 0x30) < 10) { uVar11 = (uint)(byte)(bVar9 - 0x30); } else if ((byte)(bVar9 + 0xbf) < 0x1a) { uVar11 = bVar9 - 0x37; } else { uVar11 = 0x7f; if ((byte)(bVar9 + 0x9f) < 0x1a) { uVar11 = bVar9 - 0x57; } } local_a8[uVar3] = uVar11; if ((param_2 <= (int)uVar11) || (0x13 < uVar3)) break; uVar3 = uVar3 + 1; bVar9 = pbVar4[1]; pbVar4 = pbVar4 + 1; uVar8 = (ulong)((int)uVar8 + 1); } if (pbVar4 == pbVar6) { iVar10 = 0x21; } else { if (uVar3 < 2) { lVar5 = 0; if ((int)uVar3 == 1) { lVar7 = -1; goto LAB_001dcf38; } LAB_001dcf51: if (bVar13) { lVar7 = -lVar5; bVar13 = -param_4 == lVar5; lVar5 = lVar7; if (bVar13 || lVar7 < param_4) { LAB_001dcf8e: *param_5 = lVar5; iVar10 = 0; goto LAB_001dcf6e; } } else if (param_3 <= lVar5) goto LAB_001dcf8e; } else { lVar7 = -1; lVar5 = 0; do { uVar11 = (int)uVar8 - 1; uVar8 = (ulong)uVar11; lVar12 = (long)(int)local_a8[uVar8]; if (lVar1 != -lVar12 && SBORROW8(lVar1,-lVar12) == lVar1 + lVar12 < 0) goto LAB_001dcf66; lVar1 = (lVar1 + lVar12) / (long)param_2; lVar5 = lVar5 + lVar12 * lVar7; lVar7 = lVar7 * param_2; } while (1 < (int)uVar11); LAB_001dcf38: lVar12 = (long)(int)local_a8[0]; if (lVar1 == -lVar12 || SBORROW8(lVar1,-lVar12) != lVar1 + lVar12 < 0) { lVar5 = lVar5 + lVar7 * lVar12; goto LAB_001dcf51; } } LAB_001dcf66: iVar10 = 0x22; } pbVar4 = (byte *)0x0; LAB_001dcf6e: piVar2 = __errno_location(); *piVar2 = iVar10; return pbVar4; }
19,230
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; }
O3
c
get_internal_charset: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x2c8, %rsp # imm = 0x2C8 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movl %esi, %r13d leaq 0xb6d36b(%rip), %r12 # 0xbffac0 movq (%r12,%r13,8), %rbx testq %rbx, %rbx je 0x9283e testb $0x1, 0xd(%rbx) jne 0x92845 movq %rdx, %r15 movq %rdi, %r14 leaq 0xb76167(%rip), %rax # 0xc088e0 cmpq $0x0, 0x40(%rax) jne 0x92a27 leaq 0xb76155(%rip), %rdi # 0xc088e0 callq 0x29220 movl 0xc(%rbx), %eax testb $0x9, %al jne 0x92831 leaq -0x230(%rbp), %rdi callq 0x9205b movq 0x10(%rbx), %rsi leaq 0x495a7(%rip), %rdx # 0xdbd59 movq %rax, %rdi xorl %ecx, %ecx xorl %eax, %eax callq 0xd6d80 leaq -0x2e0(%rbp), %rdi movb $0x0, (%rdi) leaq -0xd01(%rip), %rax # 0x91ace movq %rax, 0x80(%rdi) leaq -0xd00(%rip), %rax # 0x91add movq %rax, 0x88(%rdi) leaq -0xcf3(%rip), %rax # 0x91af8 movq %rax, 0x90(%rdi) leaq 0xd335(%rip), %rax # 0x9fb2e movq %rax, 0x98(%rdi) leaq 0x2f2ee9(%rip), %rax # 0x3856f0 movq (%rax), %rax movq %rax, 0xa0(%rdi) leaq -0xd02(%rip), %rax # 0x91b16 movq %rax, 0xa8(%rdi) leaq -0x230(%rbp), %rsi movq %r15, %rdx callq 0x93404 movl 0xc(%rbx), %eax btl $0x9, %eax jb 0x92855 xorl %ebx, %ebx jmp 0x929e7 xorl %ebx, %ebx jmp 0x92a03 leaq 0xb712e4(%rip), %rax # 0xc03b30 incq (%rax,%r13,8) jmp 0x92a03 btl $0x8, %eax jb 0x929dc cmpq $0x0, 0x40(%rbx) je 0x9287b cmpq $0x0, 0x50(%rbx) je 0x9287b cmpq $0x0, 0x48(%rbx) je 0x9287b cmpq $0x0, 0x68(%rbx) jne 0x928aa movq 0x10(%rbx), %rdi movl $0x20, %esi callq 0x9250c testl %eax, %eax je 0x928aa cmpl %eax, (%rbx) je 0x928aa movl %eax, %eax movq (%r12,%rax,8), %rsi testq %rsi, %rsi je 0x928aa testb $0x2, 0xd(%rsi) je 0x928aa movq %rbx, %rdi callq 0x9364d cmpq $0x0, 0x58(%rbx) jne 0x9299e testb $0x10, 0xc(%rbx) jne 0x9299e movq 0x38(%rbx), %rax testq %rax, %rax je 0x9299e leaq 0x4950c(%rip), %rsi # 0xdbddf movl $0x8, %edx movq %rax, -0x2e8(%rbp) movq -0x2e8(%rbp), %rdi callq 0x291d0 movq -0x2e8(%rbp), %rcx testl %eax, %eax jne 0x9299e leaq 0x8(%rcx), %rdi movq %rdi, -0x2f0(%rbp) movl $0x5d, %esi callq 0x29440 testq %rax, %rax setne %dl movq -0x2e8(%rbp), %rcx addq $0x28, %rcx cmpq %rax, %rcx seta %cl andb %dl, %cl cmpb $0x1, %cl jne 0x9299e movq -0x2f0(%rbp), %rsi subq %rsi, %rax leaq -0x2e0(%rbp), %rdi movl $0x21, %ecx movq %rax, %rdx movq %rax, -0x2e8(%rbp) callq 0x29420 movq -0x2e8(%rbp), %rax movb $0x0, -0x2e0(%rbp,%rax) leaq -0x2e0(%rbp), %rdi movq %r15, %rsi callq 0x921ef testl %eax, %eax je 0x9299e cmpl %eax, (%rbx) je 0x9299e movl %eax, %eax movq (%r12,%rax,8), %rax testq %rax, %rax je 0x9299e testb $0x2, 0xd(%rax) je 0x9299e cmpq $0x0, 0x58(%rbx) jne 0x9299e testb $0x10, 0xc(%rbx) jne 0x9299e movq 0x58(%rax), %rax movq %rax, 0x58(%rbx) movq 0xb8(%rbx), %rax movq (%rax), %rax testq %rax, %rax je 0x929b9 movq %rbx, %rdi movq %r14, %rsi callq *%rax testb %al, %al jne 0x929d4 movq 0xc0(%rbx), %rax movq (%rax), %rax testq %rax, %rax je 0x929d8 movq %rbx, %rdi movq %r14, %rsi callq *%rax testb %al, %al je 0x929d8 xorl %ebx, %ebx jmp 0x929dc orb $0x1, 0xd(%rbx) leaq 0xb7114d(%rip), %rax # 0xc03b30 incq (%rax,%r13,8) leaq 0xb75ef2(%rip), %rax # 0xc088e0 movq 0x40(%rax), %rdi testq %rdi, %rdi jne 0x92a31 leaq 0xb75ee2(%rip), %rdi # 0xc088e0 callq 0x291e0 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x92a43 movq %rbx, %rax addq $0x2c8, %rsp # imm = 0x2C8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x2e8a7 jmp 0x92790 leaq 0x2f35d8(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x929f7 callq 0x29270
get_internal_charset: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 2C8h mov rax, fs:28h mov [rbp+var_30], rax mov r13d, esi lea r12, all_charsets mov rbx, [r12+r13*8] test rbx, rbx jz loc_9283E test byte ptr [rbx+0Dh], 1 jnz loc_92845 mov r15, rdx mov r14, rdi lea rax, THR_LOCK_charset cmp qword ptr [rax+40h], 0 jnz loc_92A27 lea rdi, THR_LOCK_charset call _pthread_mutex_lock loc_92790: mov eax, [rbx+0Ch] test al, 9 jnz loc_92831 lea rdi, [rbp+var_230] call get_charsets_dir mov rsi, [rbx+10h] lea rdx, aIndexXml+5; ".xml" mov rdi, rax xor ecx, ecx xor eax, eax call strxmov lea rdi, [rbp+var_2E0] mov byte ptr [rdi], 0 lea rax, my_once_alloc_c mov [rdi+80h], rax lea rax, my_malloc_c mov [rdi+88h], rax lea rax, my_realloc_c mov [rdi+90h], rax lea rax, my_free mov [rdi+98h], rax lea rax, my_charset_error_reporter mov rax, [rax] mov [rdi+0A0h], rax lea rax, add_collation mov [rdi+0A8h], rax lea rsi, [rbp+var_230] mov rdx, r15 call my_read_charset_file mov eax, [rbx+0Ch] loc_92831: bt eax, 9 jb short loc_92855 xor ebx, ebx jmp loc_929E7 loc_9283E: xor ebx, ebx jmp loc_92A03 loc_92845: lea rax, my_collation_statistics inc qword ptr [rax+r13*8] jmp loc_92A03 loc_92855: bt eax, 8 jb loc_929DC cmp qword ptr [rbx+40h], 0 jz short loc_9287B cmp qword ptr [rbx+50h], 0 jz short loc_9287B cmp qword ptr [rbx+48h], 0 jz short loc_9287B cmp qword ptr [rbx+68h], 0 jnz short loc_928AA loc_9287B: mov rdi, [rbx+10h] mov esi, 20h ; ' ' call get_charset_number_internal test eax, eax jz short loc_928AA cmp [rbx], eax jz short loc_928AA mov eax, eax mov rsi, [r12+rax*8] test rsi, rsi jz short loc_928AA test byte ptr [rsi+0Dh], 2 jz short loc_928AA mov rdi, rbx call inherit_charset_data loc_928AA: cmp qword ptr [rbx+58h], 0 jnz loc_9299E test byte ptr [rbx+0Ch], 10h jnz loc_9299E mov rax, [rbx+38h] test rax, rax jz loc_9299E lea rsi, aImport; "[import " mov edx, 8 mov [rbp+var_2E8], rax mov rdi, [rbp+var_2E8] call _strncmp mov rcx, [rbp+var_2E8] test eax, eax jnz loc_9299E lea rdi, [rcx+8] mov [rbp+var_2F0], rdi mov esi, 5Dh ; ']' call _strchr test rax, rax setnz dl mov rcx, [rbp+var_2E8] add rcx, 28h ; '(' cmp rcx, rax setnbe cl and cl, dl cmp cl, 1 jnz short loc_9299E mov rsi, [rbp+var_2F0] sub rax, rsi lea rdi, [rbp+var_2E0] mov ecx, 21h ; '!' mov rdx, rax mov [rbp+var_2E8], rax call ___memcpy_chk mov rax, [rbp+var_2E8] mov [rbp+rax+var_2E0], 0 lea rdi, [rbp+var_2E0] mov rsi, r15 call get_collation_number test eax, eax jz short loc_9299E cmp [rbx], eax jz short loc_9299E mov eax, eax mov rax, [r12+rax*8] test rax, rax jz short loc_9299E test byte ptr [rax+0Dh], 2 jz short loc_9299E cmp qword ptr [rbx+58h], 0 jnz short loc_9299E test byte ptr [rbx+0Ch], 10h jnz short loc_9299E mov rax, [rax+58h] mov [rbx+58h], rax loc_9299E: mov rax, [rbx+0B8h] mov rax, [rax] test rax, rax jz short loc_929B9 mov rdi, rbx mov rsi, r14 call rax test al, al jnz short loc_929D4 loc_929B9: mov rax, [rbx+0C0h] mov rax, [rax] test rax, rax jz short loc_929D8 mov rdi, rbx mov rsi, r14 call rax test al, al jz short loc_929D8 loc_929D4: xor ebx, ebx jmp short loc_929DC loc_929D8: or byte ptr [rbx+0Dh], 1 loc_929DC: lea rax, my_collation_statistics inc qword ptr [rax+r13*8] loc_929E7: lea rax, THR_LOCK_charset mov rdi, [rax+40h] test rdi, rdi jnz short loc_92A31 loc_929F7: lea rdi, THR_LOCK_charset call _pthread_mutex_unlock loc_92A03: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_92A43 mov rax, rbx add rsp, 2C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_92A27: call get_internal_charset_cold_1 jmp loc_92790 loc_92A31: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_929F7 loc_92A43: call ___stack_chk_fail
long long get_internal_charset(long long a1, unsigned int a2, long long a3) { long long v3; // r13 long long v4; // rbx long long v6; // rdx long long v7; // rcx int v8; // eax int charsets_dir; // eax int v10; // r8d int v11; // r9d int charset_number_internal; // eax long long v13; // rsi long long v14; // rax int v15; // eax unsigned long long v16; // rax int collation_number; // eax long long v18; // rax unsigned __int8 ( *v19)(long long, long long, long long, long long); // rax unsigned __int8 ( *v20)(long long, long long, long long, long long); // rax long long v22; // [rsp+0h] [rbp-2F0h] long long v23; // [rsp+8h] [rbp-2E8h] _BYTE v24[128]; // [rsp+10h] [rbp-2E0h] BYREF long long ( *v25)(long long); // [rsp+90h] [rbp-260h] long long ( *v26)(long long); // [rsp+98h] [rbp-258h] long long ( *v27)(long long, long long, long long, long long, long long, long long); // [rsp+A0h] [rbp-250h] long long ( *v28)(_QWORD); // [rsp+A8h] [rbp-248h] long long ( *v29)(); // [rsp+B0h] [rbp-240h] long long ( *v30)(unsigned int *); // [rsp+B8h] [rbp-238h] _BYTE v31[512]; // [rsp+C0h] [rbp-230h] BYREF unsigned long long v32; // [rsp+2C0h] [rbp-30h] v32 = __readfsqword(0x28u); v3 = a2; v4 = all_charsets[a2]; if ( !v4 ) return 0LL; if ( (*(_BYTE *)(v4 + 13) & 1) != 0 ) { ++my_collation_statistics[a2]; } else { if ( THR_LOCK_charset[8] ) get_internal_charset_cold_1(); else pthread_mutex_lock(THR_LOCK_charset); v8 = *(_DWORD *)(v4 + 12); if ( (v8 & 9) == 0 ) { charsets_dir = get_charsets_dir((long long)v31); strxmov(charsets_dir, *(_QWORD *)(v4 + 16), (unsigned int)".xml", 0, v10, v11); v24[0] = 0; v25 = my_once_alloc_c; v26 = my_malloc_c; v27 = my_realloc_c; v28 = my_free; v29 = my_charset_error_reporter; v30 = add_collation; my_read_charset_file(v24, v31, a3); v8 = *(_DWORD *)(v4 + 12); } if ( (v8 & 0x200) != 0 ) { if ( (v8 & 0x100) == 0 ) { if ( !*(_QWORD *)(v4 + 64) || !*(_QWORD *)(v4 + 80) || !*(_QWORD *)(v4 + 72) || !*(_QWORD *)(v4 + 104) ) { charset_number_internal = get_charset_number_internal(*(_QWORD *)(v4 + 16), 32); if ( charset_number_internal ) { if ( *(_DWORD *)v4 != charset_number_internal ) { v13 = all_charsets[charset_number_internal]; if ( v13 ) { if ( (*(_BYTE *)(v13 + 13) & 2) != 0 ) inherit_charset_data(v4); } } } } if ( !*(_QWORD *)(v4 + 88) && (*(_BYTE *)(v4 + 12) & 0x10) == 0 ) { v14 = *(_QWORD *)(v4 + 56); if ( v14 ) { v23 = *(_QWORD *)(v4 + 56); v15 = strncmp(v14, "[import ", 8LL); v7 = v23; if ( !v15 ) { v22 = v23 + 8; v16 = strchr(v23 + 8, 93LL); LOBYTE(v6) = v16 != 0; v7 = v23 + 40; LOBYTE(v7) = v16 != 0 && v23 + 40 > v16; if ( (_BYTE)v7 == 1 ) { v23 = v16 - v22; __memcpy_chk(v24, v22, v16 - v22, 33LL); v24[v23] = 0; collation_number = get_collation_number((long long)v24, a3); if ( collation_number ) { if ( *(_DWORD *)v4 != collation_number ) { v18 = all_charsets[collation_number]; if ( v18 ) { if ( (*(_BYTE *)(v18 + 13) & 2) != 0 && !*(_QWORD *)(v4 + 88) && (*(_BYTE *)(v4 + 12) & 0x10) == 0 ) *(_QWORD *)(v4 + 88) = *(_QWORD *)(v18 + 88); } } } } } } } v19 = **(unsigned __int8 ( ***)(long long, long long, long long, long long))(v4 + 184); if ( v19 && v19(v4, a1, v6, v7) || (v20 = **(unsigned __int8 ( ***)(long long, long long, long long, long long))(v4 + 192)) != 0LL && v20(v4, a1, v6, v7) ) { v4 = 0LL; } else { *(_BYTE *)(v4 + 13) |= 1u; } } ++my_collation_statistics[v3]; } else { v4 = 0LL; } if ( THR_LOCK_charset[8] ) PSI_server[44](); pthread_mutex_unlock(THR_LOCK_charset); } return v4; }
get_internal_charset: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x2c8 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV R13D,ESI LEA R12,[0xcffac0] MOV RBX,qword ptr [R12 + R13*0x8] TEST RBX,RBX JZ 0x0019283e TEST byte ptr [RBX + 0xd],0x1 JNZ 0x00192845 MOV R15,RDX MOV R14,RDI LEA RAX,[0xd088e0] CMP qword ptr [RAX + 0x40],0x0 JNZ 0x00192a27 LEA RDI,[0xd088e0] CALL 0x00129220 LAB_00192790: MOV EAX,dword ptr [RBX + 0xc] TEST AL,0x9 JNZ 0x00192831 LEA RDI,[RBP + -0x230] CALL 0x0019205b MOV RSI,qword ptr [RBX + 0x10] LEA RDX,[0x1dbd59] MOV RDI,RAX XOR ECX,ECX XOR EAX,EAX CALL 0x001d6d80 LEA RDI,[RBP + -0x2e0] MOV byte ptr [RDI],0x0 LEA RAX,[0x191ace] MOV qword ptr [RDI + 0x80],RAX LEA RAX,[0x191add] MOV qword ptr [RDI + 0x88],RAX LEA RAX,[0x191af8] MOV qword ptr [RDI + 0x90],RAX LEA RAX,[0x19fb2e] MOV qword ptr [RDI + 0x98],RAX LEA RAX,[0x4856f0] MOV RAX,qword ptr [RAX] MOV qword ptr [RDI + 0xa0],RAX LEA RAX,[0x191b16] MOV qword ptr [RDI + 0xa8],RAX LEA RSI,[RBP + -0x230] MOV RDX,R15 CALL 0x00193404 MOV EAX,dword ptr [RBX + 0xc] LAB_00192831: BT EAX,0x9 JC 0x00192855 XOR EBX,EBX JMP 0x001929e7 LAB_0019283e: XOR EBX,EBX JMP 0x00192a03 LAB_00192845: LEA RAX,[0xd03b30] INC qword ptr [RAX + R13*0x8] JMP 0x00192a03 LAB_00192855: BT EAX,0x8 JC 0x001929dc CMP qword ptr [RBX + 0x40],0x0 JZ 0x0019287b CMP qword ptr [RBX + 0x50],0x0 JZ 0x0019287b CMP qword ptr [RBX + 0x48],0x0 JZ 0x0019287b CMP qword ptr [RBX + 0x68],0x0 JNZ 0x001928aa LAB_0019287b: MOV RDI,qword ptr [RBX + 0x10] MOV ESI,0x20 CALL 0x0019250c TEST EAX,EAX JZ 0x001928aa CMP dword ptr [RBX],EAX JZ 0x001928aa MOV EAX,EAX MOV RSI,qword ptr [R12 + RAX*0x8] TEST RSI,RSI JZ 0x001928aa TEST byte ptr [RSI + 0xd],0x2 JZ 0x001928aa MOV RDI,RBX CALL 0x0019364d LAB_001928aa: CMP qword ptr [RBX + 0x58],0x0 JNZ 0x0019299e TEST byte ptr [RBX + 0xc],0x10 JNZ 0x0019299e MOV RAX,qword ptr [RBX + 0x38] TEST RAX,RAX JZ 0x0019299e LEA RSI,[0x1dbddf] MOV EDX,0x8 MOV qword ptr [RBP + -0x2e8],RAX MOV RDI,qword ptr [RBP + -0x2e8] CALL 0x001291d0 MOV RCX,qword ptr [RBP + -0x2e8] TEST EAX,EAX JNZ 0x0019299e LEA RDI,[RCX + 0x8] MOV qword ptr [RBP + -0x2f0],RDI MOV ESI,0x5d CALL 0x00129440 TEST RAX,RAX SETNZ DL MOV RCX,qword ptr [RBP + -0x2e8] ADD RCX,0x28 CMP RCX,RAX SETA CL AND CL,DL CMP CL,0x1 JNZ 0x0019299e MOV RSI,qword ptr [RBP + -0x2f0] SUB RAX,RSI LEA RDI,[RBP + -0x2e0] MOV ECX,0x21 MOV RDX,RAX MOV qword ptr [RBP + -0x2e8],RAX CALL 0x00129420 MOV RAX,qword ptr [RBP + -0x2e8] MOV byte ptr [RBP + RAX*0x1 + -0x2e0],0x0 LEA RDI,[RBP + -0x2e0] MOV RSI,R15 CALL 0x001921ef TEST EAX,EAX JZ 0x0019299e CMP dword ptr [RBX],EAX JZ 0x0019299e MOV EAX,EAX MOV RAX,qword ptr [R12 + RAX*0x8] TEST RAX,RAX JZ 0x0019299e TEST byte ptr [RAX + 0xd],0x2 JZ 0x0019299e CMP qword ptr [RBX + 0x58],0x0 JNZ 0x0019299e TEST byte ptr [RBX + 0xc],0x10 JNZ 0x0019299e MOV RAX,qword ptr [RAX + 0x58] MOV qword ptr [RBX + 0x58],RAX LAB_0019299e: MOV RAX,qword ptr [RBX + 0xb8] MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x001929b9 MOV RDI,RBX MOV RSI,R14 CALL RAX TEST AL,AL JNZ 0x001929d4 LAB_001929b9: MOV RAX,qword ptr [RBX + 0xc0] MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x001929d8 MOV RDI,RBX MOV RSI,R14 CALL RAX TEST AL,AL JZ 0x001929d8 LAB_001929d4: XOR EBX,EBX JMP 0x001929dc LAB_001929d8: OR byte ptr [RBX + 0xd],0x1 LAB_001929dc: LEA RAX,[0xd03b30] INC qword ptr [RAX + R13*0x8] LAB_001929e7: LEA RAX,[0xd088e0] MOV RDI,qword ptr [RAX + 0x40] TEST RDI,RDI JNZ 0x00192a31 LAB_001929f7: LEA RDI,[0xd088e0] CALL 0x001291e0 LAB_00192a03: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00192a43 MOV RAX,RBX ADD RSP,0x2c8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00192a27: CALL 0x0012e8a7 JMP 0x00192790 LAB_00192a31: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x001929f7 LAB_00192a43: CALL 0x00129270
uint * get_internal_charset(int8 param_1,ulong param_2,int8 param_3) { char *__s; char *__s1; long lVar1; char cVar2; uint uVar3; int iVar4; int8 uVar5; char *pcVar6; uint *puVar7; long in_FS_OFFSET; int1 local_2e8 [128]; code *local_268; code *local_260; code *local_258; code *local_250; int *local_248; code *local_240; int1 local_238 [512]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); param_2 = param_2 & 0xffffffff; puVar7 = (uint *)(&all_charsets)[param_2]; if (puVar7 == (uint *)0x0) { puVar7 = (uint *)0x0; goto LAB_00192a03; } if ((*(byte *)((long)puVar7 + 0xd) & 1) != 0) { *(long *)(my_collation_statistics + param_2 * 8) = *(long *)(my_collation_statistics + param_2 * 8) + 1; goto LAB_00192a03; } if (THR_LOCK_charset._64_8_ == 0) { pthread_mutex_lock((pthread_mutex_t *)THR_LOCK_charset); } else { get_internal_charset_cold_1(); } uVar3 = puVar7[3]; if ((uVar3 & 9) == 0) { uVar5 = get_charsets_dir(local_238); strxmov(uVar5,*(int8 *)(puVar7 + 4),".xml",0); local_2e8[0] = 0; local_268 = my_once_alloc_c; local_260 = my_malloc_c; local_258 = my_realloc_c; local_250 = my_free; local_248 = my_charset_error_reporter; local_240 = add_collation; my_read_charset_file(local_2e8,local_238,param_3); uVar3 = puVar7[3]; } if ((uVar3 >> 9 & 1) == 0) { puVar7 = (uint *)0x0; } else { if ((uVar3 >> 8 & 1) == 0) { if ((((*(long *)(puVar7 + 0x10) == 0) || (*(long *)(puVar7 + 0x14) == 0)) || (*(long *)(puVar7 + 0x12) == 0)) || (*(long *)(puVar7 + 0x1a) == 0)) { uVar3 = get_charset_number_internal(*(int8 *)(puVar7 + 4),0x20); if (((uVar3 != 0) && (*puVar7 != uVar3)) && (((&all_charsets)[uVar3] != 0 && ((*(byte *)((&all_charsets)[uVar3] + 0xd) & 2) != 0)))) { inherit_charset_data(puVar7); } } if (((*(long *)(puVar7 + 0x16) == 0) && ((puVar7[3] & 0x10) == 0)) && (__s1 = *(char **)(puVar7 + 0xe), __s1 != (char *)0x0)) { iVar4 = strncmp(__s1,"[import ",8); if (iVar4 == 0) { __s = __s1 + 8; pcVar6 = strchr(__s,0x5d); if (pcVar6 < __s1 + 0x28 && pcVar6 != (char *)0x0) { __memcpy_chk(local_2e8,__s,(long)pcVar6 - (long)__s,0x21); local_2e8[(long)pcVar6 - (long)__s] = 0; uVar3 = get_collation_number(local_2e8,param_3); if (((((uVar3 != 0) && (*puVar7 != uVar3)) && (lVar1 = (&all_charsets)[uVar3], lVar1 != 0)) && (((*(byte *)(lVar1 + 0xd) & 2) != 0 && (*(long *)(puVar7 + 0x16) == 0)))) && ((puVar7[3] & 0x10) == 0)) { *(int8 *)(puVar7 + 0x16) = *(int8 *)(lVar1 + 0x58); } } } } if ((code *)**(int8 **)(puVar7 + 0x2e) == (code *)0x0) { LAB_001929b9: if ((code *)**(int8 **)(puVar7 + 0x30) != (code *)0x0) { cVar2 = (*(code *)**(int8 **)(puVar7 + 0x30))(puVar7,param_1); if (cVar2 != '\0') goto LAB_001929d4; } *(byte *)((long)puVar7 + 0xd) = *(byte *)((long)puVar7 + 0xd) | 1; } else { cVar2 = (*(code *)**(int8 **)(puVar7 + 0x2e))(puVar7,param_1); if (cVar2 == '\0') goto LAB_001929b9; LAB_001929d4: puVar7 = (uint *)0x0; } } *(long *)(my_collation_statistics + param_2 * 8) = *(long *)(my_collation_statistics + param_2 * 8) + 1; } if (THR_LOCK_charset._64_8_ != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)THR_LOCK_charset); LAB_00192a03: if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return puVar7; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
19,231
intern_filename
eloqsql/mysys/mf_pack.c
char *intern_filename(char *to, const char *from) { size_t length, to_length; char buff[FN_REFLEN + 1]; if (from == to) { /* Dirname may destroy from */ (void) strnmov(buff, from, FN_REFLEN); from=buff; } length= dirname_part(to, from, &to_length); /* Copy dirname & fix chars */ (void) strnmov(to + to_length, from + length, FN_REFLEN - to_length); return (to); }
O0
c
intern_filename: pushq %rbp movq %rsp, %rbp subq $0x240, %rsp # imm = 0x240 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x218(%rbp) movq %rsi, -0x220(%rbp) movq -0x220(%rbp), %rax cmpq -0x218(%rbp), %rax jne 0x6834c leaq -0x210(%rbp), %rdi movq -0x220(%rbp), %rsi movl $0x200, %edx # imm = 0x200 callq 0xb04d0 leaq -0x210(%rbp), %rax movq %rax, -0x220(%rbp) movq -0x218(%rbp), %rdi movq -0x220(%rbp), %rsi leaq -0x230(%rbp), %rdx callq 0x5cac0 movq %rax, -0x228(%rbp) movq -0x218(%rbp), %rdi movq -0x230(%rbp), %rax addq %rax, %rdi movq -0x220(%rbp), %rsi movq -0x228(%rbp), %rcx addq %rcx, %rsi movl $0x200, %edx # imm = 0x200 subq %rax, %rdx callq 0xb04d0 movq -0x218(%rbp), %rax movq %rax, -0x238(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x683cc movq -0x238(%rbp), %rax addq $0x240, %rsp # imm = 0x240 popq %rbp retq callq 0x26360 nopw %cs:(%rax,%rax)
intern_filename: push rbp mov rbp, rsp sub rsp, 240h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_218], rdi mov [rbp+var_220], rsi mov rax, [rbp+var_220] cmp rax, [rbp+var_218] jnz short loc_6834C lea rdi, [rbp+var_210] mov rsi, [rbp+var_220] mov edx, 200h call strnmov lea rax, [rbp+var_210] mov [rbp+var_220], rax loc_6834C: mov rdi, [rbp+var_218] mov rsi, [rbp+var_220] lea rdx, [rbp+var_230] call dirname_part mov [rbp+var_228], rax mov rdi, [rbp+var_218] mov rax, [rbp+var_230] add rdi, rax mov rsi, [rbp+var_220] mov rcx, [rbp+var_228] add rsi, rcx mov edx, 200h sub rdx, rax call strnmov mov rax, [rbp+var_218] mov [rbp+var_238], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_683CC mov rax, [rbp+var_238] add rsp, 240h pop rbp retn loc_683CC: call ___stack_chk_fail
long long intern_filename(long long a1, _BYTE *a2) { long long v3; // [rsp+10h] [rbp-230h] BYREF long long v4; // [rsp+18h] [rbp-228h] _BYTE *v5; // [rsp+20h] [rbp-220h] long long v6; // [rsp+28h] [rbp-218h] _BYTE v7[520]; // [rsp+30h] [rbp-210h] BYREF unsigned long long v8; // [rsp+238h] [rbp-8h] v8 = __readfsqword(0x28u); v6 = a1; v5 = a2; if ( a2 == (_BYTE *)a1 ) { strnmov(v7, v5, 512LL); v5 = v7; } v4 = dirname_part(v6, v5, &v3); strnmov(v3 + v6, &v5[v4], 512 - v3); return v6; }
intern_filename: PUSH RBP MOV RBP,RSP SUB RSP,0x240 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x218],RDI MOV qword ptr [RBP + -0x220],RSI MOV RAX,qword ptr [RBP + -0x220] CMP RAX,qword ptr [RBP + -0x218] JNZ 0x0016834c LEA RDI,[RBP + -0x210] MOV RSI,qword ptr [RBP + -0x220] MOV EDX,0x200 CALL 0x001b04d0 LEA RAX,[RBP + -0x210] MOV qword ptr [RBP + -0x220],RAX LAB_0016834c: MOV RDI,qword ptr [RBP + -0x218] MOV RSI,qword ptr [RBP + -0x220] LEA RDX,[RBP + -0x230] CALL 0x0015cac0 MOV qword ptr [RBP + -0x228],RAX MOV RDI,qword ptr [RBP + -0x218] MOV RAX,qword ptr [RBP + -0x230] ADD RDI,RAX MOV RSI,qword ptr [RBP + -0x220] MOV RCX,qword ptr [RBP + -0x228] ADD RSI,RCX MOV EDX,0x200 SUB RDX,RAX CALL 0x001b04d0 MOV RAX,qword ptr [RBP + -0x218] MOV qword ptr [RBP + -0x238],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001683cc MOV RAX,qword ptr [RBP + -0x238] ADD RSP,0x240 POP RBP RET LAB_001683cc: CALL 0x00126360
int1 * intern_filename(int1 *param_1,int1 *param_2) { long in_FS_OFFSET; long local_238; long local_230; int1 *local_228; int1 *local_220; int1 local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_228 = param_2; local_220 = param_1; if (param_2 == param_1) { strnmov(local_218,param_2,0x200); local_228 = local_218; } local_230 = dirname_part(local_220,local_228,&local_238); strnmov(local_220 + local_238,local_228 + local_230,0x200 - local_238); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_220; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
19,232
ma_init_block_record_data
eloqsql/storage/maria/ma_blockrec.c
void _ma_init_block_record_data(void) { uint i; bzero(total_header_size, sizeof(total_header_size)); total_header_size[0]= FLAG_SIZE; /* Flag uchar */ for (i= 1; i < array_elements(total_header_size); i++) { uint size= FLAG_SIZE, j, bit; for (j= 0; (bit= (1 << j)) <= i; j++) { if (i & bit) size+= header_sizes[j]; } total_header_size[i]= size; } }
O0
c
ma_init_block_record_data: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp leaq 0xc06601(%rip), %rdi # 0xc7a410 xorl %esi, %esi movl $0x10, %edx callq 0x2a2c0 movb $0x1, 0xc065ee(%rip) # 0xc7a410 movl $0x1, -0x4(%rbp) cmpl $0x10, -0x4(%rbp) jae 0x73e9c movl $0x1, -0x8(%rbp) movl $0x0, -0xc(%rbp) movl -0xc(%rbp), %ecx movl $0x1, %eax shll %cl, %eax movl %eax, -0x10(%rbp) cmpl -0x4(%rbp), %eax ja 0x73e7d movl -0x4(%rbp), %eax andl -0x10(%rbp), %eax cmpl $0x0, %eax je 0x73e70 movl -0xc(%rbp), %eax movl %eax, %ecx leaq 0x24a1ea(%rip), %rax # 0x2be050 movzbl (%rax,%rcx), %eax addl -0x8(%rbp), %eax movl %eax, -0x8(%rbp) jmp 0x73e72 movl -0xc(%rbp), %eax addl $0x1, %eax movl %eax, -0xc(%rbp) jmp 0x73e3d movl -0x8(%rbp), %eax movb %al, %dl movl -0x4(%rbp), %eax movl %eax, %ecx leaq 0xc06582(%rip), %rax # 0xc7a410 movb %dl, (%rax,%rcx) movl -0x4(%rbp), %eax addl $0x1, %eax movl %eax, -0x4(%rbp) jmp 0x73e29 addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ma_init_block_record_data: push rbp mov rbp, rsp sub rsp, 10h lea rdi, total_header_size xor esi, esi mov edx, 10h call _memset mov cs:total_header_size, 1 mov [rbp+var_4], 1 loc_73E29: cmp [rbp+var_4], 10h jnb short loc_73E9C mov [rbp+var_8], 1 mov [rbp+var_C], 0 loc_73E3D: mov ecx, [rbp+var_C] mov eax, 1 shl eax, cl mov [rbp+var_10], eax cmp eax, [rbp+var_4] ja short loc_73E7D mov eax, [rbp+var_4] and eax, [rbp+var_10] cmp eax, 0 jz short loc_73E70 mov eax, [rbp+var_C] mov ecx, eax lea rax, header_sizes movzx eax, byte ptr [rax+rcx] add eax, [rbp+var_8] mov [rbp+var_8], eax loc_73E70: jmp short $+2 loc_73E72: mov eax, [rbp+var_C] add eax, 1 mov [rbp+var_C], eax jmp short loc_73E3D loc_73E7D: mov eax, [rbp+var_8] mov dl, al mov eax, [rbp+var_4] mov ecx, eax lea rax, total_header_size mov [rax+rcx], dl mov eax, [rbp+var_4] add eax, 1 mov [rbp+var_4], eax jmp short loc_73E29 loc_73E9C: add rsp, 10h pop rbp retn
long long ma_init_block_record_data() { long long result; // rax int j; // [rsp+4h] [rbp-Ch] char v2; // [rsp+8h] [rbp-8h] unsigned int i; // [rsp+Ch] [rbp-4h] result = memset(total_header_size, 0LL, 16LL); total_header_size[0] = 1; for ( i = 1; i < 0x10; ++i ) { v2 = 1; for ( j = 0; 1 << j <= i; ++j ) { if ( ((1 << j) & i) != 0 ) v2 += header_sizes[j]; } total_header_size[i] = v2; result = i + 1; } return result; }
_ma_init_block_record_data: PUSH RBP MOV RBP,RSP SUB RSP,0x10 LEA RDI,[0xd7a410] XOR ESI,ESI MOV EDX,0x10 CALL 0x0012a2c0 MOV byte ptr [0x00d7a410],0x1 MOV dword ptr [RBP + -0x4],0x1 LAB_00173e29: CMP dword ptr [RBP + -0x4],0x10 JNC 0x00173e9c MOV dword ptr [RBP + -0x8],0x1 MOV dword ptr [RBP + -0xc],0x0 LAB_00173e3d: MOV ECX,dword ptr [RBP + -0xc] MOV EAX,0x1 SHL EAX,CL MOV dword ptr [RBP + -0x10],EAX CMP EAX,dword ptr [RBP + -0x4] JA 0x00173e7d MOV EAX,dword ptr [RBP + -0x4] AND EAX,dword ptr [RBP + -0x10] CMP EAX,0x0 JZ 0x00173e70 MOV EAX,dword ptr [RBP + -0xc] MOV ECX,EAX LEA RAX,[0x3be050] MOVZX EAX,byte ptr [RAX + RCX*0x1] ADD EAX,dword ptr [RBP + -0x8] MOV dword ptr [RBP + -0x8],EAX LAB_00173e70: JMP 0x00173e72 LAB_00173e72: MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0x1 MOV dword ptr [RBP + -0xc],EAX JMP 0x00173e3d LAB_00173e7d: MOV EAX,dword ptr [RBP + -0x8] MOV DL,AL MOV EAX,dword ptr [RBP + -0x4] MOV ECX,EAX LEA RAX,[0xd7a410] MOV byte ptr [RAX + RCX*0x1],DL MOV EAX,dword ptr [RBP + -0x4] ADD EAX,0x1 MOV dword ptr [RBP + -0x4],EAX JMP 0x00173e29 LAB_00173e9c: ADD RSP,0x10 POP RBP RET
void _ma_init_block_record_data(void) { char cVar1; uint uVar2; uint local_14; uint local_c; memset(total_header_size,0,0x10); total_header_size[0] = 1; for (local_c = 1; local_c < 0x10; local_c = local_c + 1) { cVar1 = '\x01'; for (local_14 = 0; uVar2 = 1 << ((byte)local_14 & 0x1f), uVar2 <= local_c; local_14 = local_14 + 1) { if ((local_c & uVar2) != 0) { cVar1 = *(char *)((long)&header_sizes + (ulong)local_14) + cVar1; } } total_header_size[local_c] = cVar1; } return; }
19,233
ma_init_block_record_data
eloqsql/storage/maria/ma_blockrec.c
void _ma_init_block_record_data(void) { uint i; bzero(total_header_size, sizeof(total_header_size)); total_header_size[0]= FLAG_SIZE; /* Flag uchar */ for (i= 1; i < array_elements(total_header_size); i++) { uint size= FLAG_SIZE, j, bit; for (j= 0; (bit= (1 << j)) <= i; j++) { if (i & bit) size+= header_sizes[j]; } total_header_size[i]= size; } }
O3
c
ma_init_block_record_data: pushq %rbp movq %rsp, %rbp xorps %xmm0, %xmm0 movaps %xmm0, 0xba3c82(%rip) # 0xbff810 movb $0x1, 0xba3c7b(%rip) # 0xbff810 movl $0x1, %eax leaq 0xba3c6f(%rip), %rdx # 0xbff810 leaq 0x85978(%rip), %rsi # 0xe1520 movb $0x1, %dil xorl %ecx, %ecx movl $0x1, %r8d testl %eax, %r8d je 0x5bbbf movl %ecx, %r8d addb (%r8,%rsi), %dil incl %ecx movl $0x1, %r8d shll %cl, %r8d cmpq %r8, %rax jae 0x5bbb3 movb %dil, (%rax,%rdx) incq %rax cmpq $0x10, %rax jne 0x5bba8 popq %rbp retq
_ma_init_block_record_data: push rbp mov rbp, rsp xorps xmm0, xmm0 movaps cs:total_header_size, xmm0 mov byte ptr cs:total_header_size, 1 mov eax, 1 lea rdx, total_header_size lea rsi, header_sizes loc_5BBA8: mov dil, 1 xor ecx, ecx mov r8d, 1 loc_5BBB3: test r8d, eax jz short loc_5BBBF mov r8d, ecx add dil, [r8+rsi] loc_5BBBF: inc ecx mov r8d, 1 shl r8d, cl cmp rax, r8 jnb short loc_5BBB3 mov [rax+rdx], dil inc rax cmp rax, 10h jnz short loc_5BBA8 pop rbp retn
unsigned long long ma_init_block_record_data() { unsigned long long result; // rax char v1; // di int v2; // ecx unsigned long long v3; // r8 total_header_size = 0LL; LOBYTE(total_header_size) = 1; for ( result = 1LL; result != 16; ++result ) { v1 = 1; v2 = 0; LODWORD(v3) = 1; do { if ( ((unsigned int)result & (unsigned int)v3) != 0 ) v1 += header_sizes[v2]; v3 = (unsigned int)(1 << ++v2); } while ( result >= v3 ); *((_BYTE *)&total_header_size + result) = v1; } return result; }
_ma_init_block_record_data: PUSH RBP MOV RBP,RSP XORPS XMM0,XMM0 MOVAPS xmmword ptr [0x00cff810],XMM0 MOV byte ptr [0x00cff810],0x1 MOV EAX,0x1 LEA RDX,[0xcff810] LEA RSI,[0x1e1520] LAB_0015bba8: MOV DIL,0x1 XOR ECX,ECX MOV R8D,0x1 LAB_0015bbb3: TEST R8D,EAX JZ 0x0015bbbf MOV R8D,ECX ADD DIL,byte ptr [R8 + RSI*0x1] LAB_0015bbbf: INC ECX MOV R8D,0x1 SHL R8D,CL CMP RAX,R8 JNC 0x0015bbb3 MOV byte ptr [RAX + RDX*0x1],DIL INC RAX CMP RAX,0x10 JNZ 0x0015bba8 POP RBP RET
void _ma_init_block_record_data(void) { ulong uVar1; uint uVar2; ulong uVar3; char cVar4; ulong uVar5; total_header_size._8_8_ = 0; total_header_size._0_8_ = 1; uVar1 = 1; do { cVar4 = '\x01'; uVar3 = 0; uVar5 = 1; do { if (((uint)uVar5 & (uint)uVar1) != 0) { cVar4 = cVar4 + (&header_sizes)[uVar3]; } uVar2 = (int)uVar3 + 1; uVar3 = (ulong)uVar2; uVar5 = (ulong)(uint)(1 << ((byte)uVar2 & 0x1f)); } while (uVar5 <= uVar1); total_header_size[uVar1] = cVar4; uVar1 = uVar1 + 1; } while (uVar1 != 0x10); return; }
19,234
fmt::v10::detail::code_point_index(fmt::v10::basic_string_view<char>, unsigned long)
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h
inline auto code_point_index(string_view s, size_t n) -> size_t { size_t result = s.size(); const char* begin = s.begin(); for_each_codepoint(s, [begin, &n, &result](uint32_t, string_view sv) { if (n != 0) { --n; return true; } result = to_unsigned(sv.begin() - begin); return false; }); return result; }
O0
c
fmt::v10::detail::code_point_index(fmt::v10::basic_string_view<char>, unsigned long): subq $0x68, %rsp movq %rdi, 0x58(%rsp) movq %rsi, 0x60(%rsp) movq %rdx, 0x50(%rsp) leaq 0x58(%rsp), %rdi callq 0x24d80 movq %rax, 0x48(%rsp) leaq 0x58(%rsp), %rdi callq 0x7bdc0 movq %rax, 0x40(%rsp) movq 0x58(%rsp), %rax movq %rax, 0x30(%rsp) movq 0x60(%rsp), %rax movq %rax, 0x38(%rsp) movq 0x40(%rsp), %rax movq %rax, 0x18(%rsp) leaq 0x50(%rsp), %rax movq %rax, 0x20(%rsp) leaq 0x48(%rsp), %rax movq %rax, 0x28(%rsp) movq 0x30(%rsp), %rdi movq 0x38(%rsp), %rsi leaq 0x18(%rsp), %rax movq (%rax), %rcx movq %rcx, (%rsp) movq 0x8(%rax), %rcx movq %rcx, 0x8(%rsp) movq 0x10(%rax), %rax movq %rax, 0x10(%rsp) callq 0xec530 movq 0x48(%rsp), %rax addq $0x68, %rsp retq nopw (%rax,%rax)
_ZN3fmt3v106detail16code_point_indexENS0_17basic_string_viewIcEEm: sub rsp, 68h mov [rsp+68h+var_10], rdi mov [rsp+68h+var_8], rsi mov [rsp+68h+var_18], rdx lea rdi, [rsp+68h+var_10] call _ZNK3fmt3v1017basic_string_viewIcE4sizeEv; fmt::v10::basic_string_view<char>::size(void) mov [rsp+68h+var_20], rax lea rdi, [rsp+68h+var_10] call _ZNK3fmt3v1017basic_string_viewIcE5beginEv; fmt::v10::basic_string_view<char>::begin(void) mov [rsp+68h+var_28], rax mov rax, [rsp+68h+var_10] mov [rsp+68h+var_38], rax mov rax, [rsp+68h+var_8] mov [rsp+68h+var_30], rax mov rax, [rsp+68h+var_28] mov [rsp+68h+var_50], rax lea rax, [rsp+68h+var_18] mov [rsp+68h+var_48], rax lea rax, [rsp+68h+var_20] mov [rsp+68h+var_40], rax mov rdi, [rsp+68h+var_38] mov rsi, [rsp+68h+var_30] lea rax, [rsp+68h+var_50] mov rcx, [rax] mov [rsp+68h+var_68], rcx mov rcx, [rax+8] mov [rsp+68h+var_60], rcx mov rax, [rax+10h] mov [rsp+68h+var_58], rax call _ZN3fmt3v106detail18for_each_codepointIZNS1_16code_point_indexENS0_17basic_string_viewIcEEmEUljS4_E_EEvS4_T_; fmt::v10::detail::for_each_codepoint<fmt::v10::detail::code_point_index(fmt::v10::basic_string_view<char>,ulong)::{lambda(uint,fmt::v10::basic_string_view<char>)#1}>(fmt::v10::basic_string_view<char>,fmt::v10::detail::code_point_index(fmt::v10::basic_string_view<char>,ulong)::{lambda(uint,fmt::v10::basic_string_view<char>)#1}) mov rax, [rsp+68h+var_20] add rsp, 68h retn
long long fmt::v10::detail::code_point_index(long long a1, long long a2, long long a3) { long long v3; // rax int v4; // edx int v5; // r8d int v6; // r9d long long v8; // [rsp+48h] [rbp-20h] BYREF long long v9; // [rsp+50h] [rbp-18h] BYREF long long v10; // [rsp+58h] [rbp-10h] BYREF long long v11; // [rsp+60h] [rbp-8h] v10 = a1; v11 = a2; v9 = a3; v8 = fmt::v10::basic_string_view<char>::size((long long)&v10); v3 = fmt::v10::basic_string_view<char>::begin((long long)&v10); fmt::v10::detail::for_each_codepoint<fmt::v10::detail::code_point_index(fmt::v10::basic_string_view<char>,unsigned long)::{lambda(unsigned int,fmt::v10::basic_string_view<char>)#1}>( v10, v11, v4, (unsigned int)&v9, v5, v6, v3, &v9, &v8, v3, &v9, &v8, v10, v11, v3); return v8; }
code_point_index: SUB RSP,0x68 MOV qword ptr [RSP + 0x58],RDI MOV qword ptr [RSP + 0x60],RSI MOV qword ptr [RSP + 0x50],RDX LEA RDI,[RSP + 0x58] CALL 0x00124d80 MOV qword ptr [RSP + 0x48],RAX LEA RDI,[RSP + 0x58] CALL 0x0017bdc0 MOV qword ptr [RSP + 0x40],RAX MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x38],RAX MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x18],RAX LEA RAX,[RSP + 0x50] MOV qword ptr [RSP + 0x20],RAX LEA RAX,[RSP + 0x48] MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x38] LEA RAX,[RSP + 0x18] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RAX CALL 0x001ec530 MOV RAX,qword ptr [RSP + 0x48] ADD RSP,0x68 RET
/* fmt::v10::detail::code_point_index(fmt::v10::basic_string_view<char>, unsigned long) */ int8 fmt::v10::detail::code_point_index(int8 param_1,int8 param_2) { int8 uVar1; int8 local_10; int8 local_8; local_10 = param_1; local_8 = param_2; uVar1 = basic_string_view<char>::size((basic_string_view<char> *)&local_10); basic_string_view<char>::begin((basic_string_view<char> *)&local_10); for_each_codepoint<fmt::v10::detail::code_point_index(fmt::v10::basic_string_view<char>,unsigned_long)::_lambda(unsigned_int,fmt::v10::basic_string_view<char>)_1_> (local_10,local_8); return uVar1; }
19,235
nglog::InstallPrefixFormatter(void (*)(std::ostream&, nglog::LogMessage const&, void*), void*)
ng-log[P]ng-log/src/logging.cc
void InstallPrefixFormatter(PrefixFormatterCallback callback, void* data) { if (callback != nullptr) { g_prefix_formatter = std::make_unique<PrefixFormatter>(callback, data); } else { g_prefix_formatter = nullptr; } }
O1
cpp
nglog::InstallPrefixFormatter(void (*)(std::ostream&, nglog::LogMessage const&, void*), void*): testq %rdi, %rdi je 0x10154 pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movl $0x18, %edi callq 0x8fc0 movl $0x0, (%rax) movq %r14, 0x8(%rax) movq %rbx, 0x10(%rax) movq 0x22a7a(%rip), %rdi # 0x32bb0 movq %rax, 0x22a73(%rip) # 0x32bb0 testq %rdi, %rdi leaq 0x8(%rsp), %rsp popq %rbx popq %r14 je 0x1016b movl $0x18, %esi jmp 0x900c movq 0x22a55(%rip), %rdi # 0x32bb0 movq $0x0, 0x22a4a(%rip) # 0x32bb0 testq %rdi, %rdi jne 0x1014a retq
_ZN5nglog22InstallPrefixFormatterEPFvRSoRKNS_10LogMessageEPvES4_: test rdi, rdi jz short loc_10154 push r14 push rbx push rax mov rbx, rsi mov r14, rdi mov edi, 18h; unsigned __int64 call _Znwm; operator new(ulong) mov dword ptr [rax], 0 mov [rax+8], r14 mov [rax+10h], rbx mov rdi, cs:_ZN5nglog12_GLOBAL__N_118g_prefix_formatterE; void * mov cs:_ZN5nglog12_GLOBAL__N_118g_prefix_formatterE, rax; nglog::`anonymous namespace'::g_prefix_formatter test rdi, rdi lea rsp, [rsp+8] pop rbx pop r14 jz short locret_1016B loc_1014A: mov esi, 18h; unsigned __int64 jmp _ZdlPvm; operator delete(void *,ulong) loc_10154: mov rdi, cs:_ZN5nglog12_GLOBAL__N_118g_prefix_formatterE; nglog::`anonymous namespace'::g_prefix_formatter mov cs:_ZN5nglog12_GLOBAL__N_118g_prefix_formatterE, 0; nglog::`anonymous namespace'::g_prefix_formatter test rdi, rdi jnz short loc_1014A locret_1016B: retn
void nglog::InstallPrefixFormatter( nglog *this, void (*a2)(std::ostream *, const nglog::LogMessage *, void *), void *a3) { _QWORD *v3; // rax void *v4; // rdi if ( this ) { v3 = (_QWORD *)operator new(24LL); *(_DWORD *)v3 = 0; v3[1] = this; v3[2] = a2; v4 = nglog::`anonymous namespace'::g_prefix_formatter; nglog::`anonymous namespace'::g_prefix_formatter = v3; if ( !v4 ) return; goto LABEL_3; } v4 = nglog::`anonymous namespace'::g_prefix_formatter; nglog::`anonymous namespace'::g_prefix_formatter = 0LL; if ( v4 ) LABEL_3: operator delete(v4); }
InstallPrefixFormatter: TEST RDI,RDI JZ 0x00110154 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI MOV EDI,0x18 CALL 0x00108fc0 MOV dword ptr [RAX],0x0 MOV qword ptr [RAX + 0x8],R14 MOV qword ptr [RAX + 0x10],RBX MOV RDI,qword ptr [0x00132bb0] MOV qword ptr [0x00132bb0],RAX TEST RDI,RDI LEA RSP,[RSP + 0x8] POP RBX POP R14 JZ 0x0011016b LAB_0011014a: MOV ESI,0x18 JMP 0x0010900c LAB_00110154: MOV RDI,qword ptr [0x00132bb0] MOV qword ptr [0x00132bb0],0x0 TEST RDI,RDI JNZ 0x0011014a LAB_0011016b: RET
/* nglog::InstallPrefixFormatter(void (*)(std::ostream&, nglog::LogMessage const&, void*), void*) */ void nglog::InstallPrefixFormatter (_func_void_ostream_ptr_LogMessage_ptr_void_ptr *param_1,void *param_2) { int4 *puVar1; void *pvVar2; bool bVar3; pvVar2 = (anonymous_namespace)::g_prefix_formatter; if (param_1 == (_func_void_ostream_ptr_LogMessage_ptr_void_ptr *)0x0) { (anonymous_namespace)::g_prefix_formatter = (int4 *)0x0; if (pvVar2 == (void *)0x0) { (anonymous_namespace)::g_prefix_formatter = (int4 *)0x0; return; } } else { puVar1 = (int4 *)operator_new(0x18); *puVar1 = 0; *(_func_void_ostream_ptr_LogMessage_ptr_void_ptr **)(puVar1 + 2) = param_1; *(void **)(puVar1 + 4) = param_2; bVar3 = (anonymous_namespace)::g_prefix_formatter == (int4 *)0x0; pvVar2 = (anonymous_namespace)::g_prefix_formatter; (anonymous_namespace)::g_prefix_formatter = puVar1; if (bVar3) { return; } } operator_delete(pvVar2,0x18); return; }
19,236
nglog::InstallPrefixFormatter(void (*)(std::ostream&, nglog::LogMessage const&, void*), void*)
ng-log[P]ng-log/src/logging.cc
void InstallPrefixFormatter(PrefixFormatterCallback callback, void* data) { if (callback != nullptr) { g_prefix_formatter = std::make_unique<PrefixFormatter>(callback, data); } else { g_prefix_formatter = nullptr; } }
O3
cpp
nglog::InstallPrefixFormatter(void (*)(std::ostream&, nglog::LogMessage const&, void*), void*): testq %rdi, %rdi je 0xfe3f pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movl $0x18, %edi callq 0x8e90 movl $0x0, (%rax) movq %r14, 0x8(%rax) movq %rbx, 0x10(%rax) movq 0x22d8f(%rip), %rdi # 0x32bb0 movq %rax, 0x22d88(%rip) # 0x32bb0 testq %rdi, %rdi leaq 0x8(%rsp), %rsp popq %rbx popq %r14 je 0xfe56 movl $0x18, %esi jmp 0x8edc movq 0x22d6a(%rip), %rdi # 0x32bb0 movq $0x0, 0x22d5f(%rip) # 0x32bb0 testq %rdi, %rdi jne 0xfe35 retq
_ZN5nglog22InstallPrefixFormatterEPFvRSoRKNS_10LogMessageEPvES4_: test rdi, rdi jz short loc_FE3F push r14 push rbx push rax mov rbx, rsi mov r14, rdi mov edi, 18h; unsigned __int64 call _Znwm; operator new(ulong) mov dword ptr [rax], 0 mov [rax+8], r14 mov [rax+10h], rbx mov rdi, cs:_ZN5nglog12_GLOBAL__N_118g_prefix_formatterE; void * mov cs:_ZN5nglog12_GLOBAL__N_118g_prefix_formatterE, rax; nglog::`anonymous namespace'::g_prefix_formatter test rdi, rdi lea rsp, [rsp+8] pop rbx pop r14 jz short locret_FE56 loc_FE35: mov esi, 18h; unsigned __int64 jmp _ZdlPvm; operator delete(void *,ulong) loc_FE3F: mov rdi, cs:_ZN5nglog12_GLOBAL__N_118g_prefix_formatterE; nglog::`anonymous namespace'::g_prefix_formatter mov cs:_ZN5nglog12_GLOBAL__N_118g_prefix_formatterE, 0; nglog::`anonymous namespace'::g_prefix_formatter test rdi, rdi jnz short loc_FE35 locret_FE56: retn
void nglog::InstallPrefixFormatter( nglog *this, void (*a2)(std::ostream *, const nglog::LogMessage *, void *), void *a3) { _QWORD *v3; // rax void *v4; // rdi if ( this ) { v3 = (_QWORD *)operator new(24LL); *(_DWORD *)v3 = 0; v3[1] = this; v3[2] = a2; v4 = nglog::`anonymous namespace'::g_prefix_formatter; nglog::`anonymous namespace'::g_prefix_formatter = v3; if ( !v4 ) return; goto LABEL_3; } v4 = nglog::`anonymous namespace'::g_prefix_formatter; nglog::`anonymous namespace'::g_prefix_formatter = 0LL; if ( v4 ) LABEL_3: operator delete(v4); }
InstallPrefixFormatter: TEST RDI,RDI JZ 0x0010fe3f PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI MOV EDI,0x18 CALL 0x00108e90 MOV dword ptr [RAX],0x0 MOV qword ptr [RAX + 0x8],R14 MOV qword ptr [RAX + 0x10],RBX MOV RDI,qword ptr [0x00132bb0] MOV qword ptr [0x00132bb0],RAX TEST RDI,RDI LEA RSP,[RSP + 0x8] POP RBX POP R14 JZ 0x0010fe56 LAB_0010fe35: MOV ESI,0x18 JMP 0x00108edc LAB_0010fe3f: MOV RDI,qword ptr [0x00132bb0] MOV qword ptr [0x00132bb0],0x0 TEST RDI,RDI JNZ 0x0010fe35 LAB_0010fe56: RET
/* nglog::InstallPrefixFormatter(void (*)(std::ostream&, nglog::LogMessage const&, void*), void*) */ void nglog::InstallPrefixFormatter (_func_void_ostream_ptr_LogMessage_ptr_void_ptr *param_1,void *param_2) { int4 *puVar1; void *pvVar2; bool bVar3; pvVar2 = (anonymous_namespace)::g_prefix_formatter; if (param_1 == (_func_void_ostream_ptr_LogMessage_ptr_void_ptr *)0x0) { (anonymous_namespace)::g_prefix_formatter = (int4 *)0x0; if (pvVar2 == (void *)0x0) { (anonymous_namespace)::g_prefix_formatter = (int4 *)0x0; return; } } else { puVar1 = (int4 *)operator_new(0x18); *puVar1 = 0; *(_func_void_ostream_ptr_LogMessage_ptr_void_ptr **)(puVar1 + 2) = param_1; *(void **)(puVar1 + 4) = param_2; bVar3 = (anonymous_namespace)::g_prefix_formatter == (int4 *)0x0; pvVar2 = (anonymous_namespace)::g_prefix_formatter; (anonymous_namespace)::g_prefix_formatter = puVar1; if (bVar3) { return; } } operator_delete(pvVar2,0x18); return; }
19,237
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::hex_bytes(unsigned char)
monkey531[P]llama/common/json.hpp
static std::string hex_bytes(std::uint8_t byte) { std::string result = "FF"; constexpr const char* nibble_to_hex = "0123456789ABCDEF"; result[0] = nibble_to_hex[byte / 16]; result[1] = nibble_to_hex[byte % 16]; return result; }
O1
cpp
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::hex_bytes(unsigned char): pushq %r14 pushq %rbx pushq %rax movl %esi, %ebx movq %rdi, %r14 leaq 0x10(%rdi), %rax movq %rax, (%rdi) leaq 0x30732(%rip), %rsi # 0xabedd leaq 0x3072d(%rip), %rdx # 0xabedf callq 0x1c80a movl %ebx, %eax shrl $0x4, %eax leaq 0x329a2(%rip), %rcx # 0xae165 movb (%rax,%rcx), %al movq (%r14), %rdx movb %al, (%rdx) andl $0xf, %ebx movb (%rbx,%rcx), %al movq (%r14), %rcx movb %al, 0x1(%rcx) movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9hex_bytesEh: push r14 push rbx push rax mov ebx, esi mov r14, rdi lea rax, [rdi+10h] mov [rdi], rax lea rsi, aInvalidStringS_0+41h; "FF" lea rdx, aInvalidStringS_0+43h; "" 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 eax, ebx shr eax, 4 lea rcx, a0123456789abcd; "0123456789ABCDEF" mov al, [rax+rcx] mov rdx, [r14] mov [rdx], al and ebx, 0Fh mov al, [rbx+rcx] mov rcx, [r14] mov [rcx+1], al mov rax, r14 add rsp, 8 pop rbx pop r14 retn
_QWORD * nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::hex_bytes( _QWORD *a1, unsigned int a2) { *a1 = a1 + 2; std::string::_M_construct<char const*>(a1, "FF", (long long)""); *(_BYTE *)*a1 = a0123456789abcd[a2 >> 4]; *(_BYTE *)(*a1 + 1LL) = a0123456789abcd[a2 & 0xF]; return a1; }
hex_bytes: PUSH R14 PUSH RBX PUSH RAX MOV EBX,ESI MOV R14,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RDI],RAX LEA RSI,[0x1abedd] LEA RDX,[0x1abedf] CALL 0x0011c80a MOV EAX,EBX SHR EAX,0x4 LEA RCX,[0x1ae165] MOV AL,byte ptr [RAX + RCX*0x1] MOV RDX,qword ptr [R14] MOV byte ptr [RDX],AL AND EBX,0xf MOV AL,byte ptr [RBX + RCX*0x1] MOV RCX,qword ptr [R14] MOV byte ptr [RCX + 0x1],AL MOV RAX,R14 ADD RSP,0x8 POP RBX POP R14 RET
/* nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::hex_bytes(unsigned char) */ serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> * __thiscall nlohmann::json_abi_v3_11_3::detail:: serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::hex_bytes(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this,uchar param_1) { int7 in_register_00000031; *(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> **)this = this + 0x10; std::__cxx11::string::_M_construct<char_const*>(this,"FF",""); **(char **)this = "0123456789ABCDEF"[(CONCAT71(in_register_00000031,param_1) & 0xffffffff) >> 4]; *(char *)(*(long *)this + 1) = "0123456789ABCDEF"[(uint)CONCAT71(in_register_00000031,param_1) & 0xf]; return this; }
19,238
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::hex_bytes(unsigned char)
monkey531[P]llama/common/json.hpp
static std::string hex_bytes(std::uint8_t byte) { std::string result = "FF"; constexpr const char* nibble_to_hex = "0123456789ABCDEF"; result[0] = nibble_to_hex[byte / 16]; result[1] = nibble_to_hex[byte % 16]; return result; }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::hex_bytes(unsigned char): pushq %r14 pushq %rbx pushq %rax movl %esi, %ebx movq %rdi, %r14 leaq 0x23323(%rip), %rsi # 0x8ee8d leaq 0x7(%rsp), %rdx callq 0x22836 movl %ebx, %eax shrl $0x4, %eax leaq 0x255a4(%rip), %rcx # 0x91124 movb (%rax,%rcx), %al movq (%r14), %rdx movb %al, (%rdx) andl $0xf, %ebx movb (%rbx,%rcx), %al movq (%r14), %rcx movb %al, 0x1(%rcx) movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9hex_bytesEh: push r14 push rbx push rax mov ebx, esi mov r14, rdi lea rsi, aInvalidStringS_0+41h; "FF" lea rdx, [rsp+18h+var_11] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov eax, ebx shr eax, 4 lea rcx, a0123456789abcd; "0123456789ABCDEF" mov al, [rax+rcx] mov rdx, [r14] mov [rdx], al and ebx, 0Fh mov al, [rbx+rcx] mov rcx, [r14] mov [rcx+1], al mov rax, r14 add rsp, 8 pop rbx pop r14 retn
_QWORD * nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::hex_bytes( _QWORD *a1, unsigned int a2) { std::string::basic_string<std::allocator<char>>(a1, (long long)"FF"); *(_BYTE *)*a1 = a0123456789abcd[a2 >> 4]; *(_BYTE *)(*a1 + 1LL) = a0123456789abcd[a2 & 0xF]; return a1; }
hex_bytes: PUSH R14 PUSH RBX PUSH RAX MOV EBX,ESI MOV R14,RDI LEA RSI,[0x18ee8d] LEA RDX,[RSP + 0x7] CALL 0x00122836 MOV EAX,EBX SHR EAX,0x4 LEA RCX,[0x191124] MOV AL,byte ptr [RAX + RCX*0x1] MOV RDX,qword ptr [R14] MOV byte ptr [RDX],AL AND EBX,0xf MOV AL,byte ptr [RBX + RCX*0x1] MOV RCX,qword ptr [R14] MOV byte ptr [RCX + 0x1],AL MOV RAX,R14 ADD RSP,0x8 POP RBX POP R14 RET
/* nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::hex_bytes(unsigned char) */ serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> * __thiscall nlohmann::json_abi_v3_11_3::detail:: serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::hex_bytes(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this,uchar param_1) { int7 in_register_00000031; allocator local_11; std::__cxx11::string::string<std::allocator<char>>((string *)this,"FF",&local_11); **(char **)this = "0123456789ABCDEF"[(CONCAT71(in_register_00000031,param_1) & 0xffffffff) >> 4]; *(char *)(*(long *)this + 1) = "0123456789ABCDEF"[(uint)CONCAT71(in_register_00000031,param_1) & 0xf]; return this; }
19,239
skip
eloqsql/unittest/mytap/tap.c
void skip(int how_many, char const * const fmt, ...) { char reason[80]; if (fmt && *fmt) { va_list ap; va_start(ap, fmt); vsnprintf(reason, sizeof(reason), fmt, ap); va_end(ap); } else reason[0] = '\0'; while (how_many-- > 0) { va_list ap; memset((char*) &ap, 0, sizeof(ap)); /* Keep compiler happy */ vemit_tap(1, NULL, ap); emit_dir("skip", reason); emit_endl(); } }
O3
c
skip: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x128, %rsp # imm = 0x128 movl %edi, %ebx movq %rdx, -0x140(%rbp) movq %rcx, -0x138(%rbp) movq %r8, -0x130(%rbp) movq %r9, -0x128(%rbp) testb %al, %al je 0x91d3b movaps %xmm0, -0x120(%rbp) movaps %xmm1, -0x110(%rbp) movaps %xmm2, -0x100(%rbp) movaps %xmm3, -0xf0(%rbp) movaps %xmm4, -0xe0(%rbp) movaps %xmm5, -0xd0(%rbp) movaps %xmm6, -0xc0(%rbp) movaps %xmm7, -0xb0(%rbp) movq %fs:0x28, %rax movq %rax, -0x30(%rbp) testq %rsi, %rsi je 0x91d99 movq %rsi, %r10 cmpb $0x0, (%rsi) je 0x91d99 leaq -0x150(%rbp), %rax leaq -0xa0(%rbp), %r9 movq %rax, 0x10(%r9) leaq 0x10(%rbp), %rax movq %rax, 0x8(%r9) movabsq $0x3000000010, %rax # imm = 0x3000000010 movq %rax, (%r9) leaq -0x80(%rbp), %rdi movl $0x50, %esi movl $0x50, %ecx movl $0x1, %edx movq %r10, %r8 callq 0x29190 jmp 0x91d9d movb $0x0, -0x80(%rbp) testl %ebx, %ebx jle 0x91e2d incl %ebx movq 0x2f21ea(%rip), %r15 # 0x383f98 leaq 0x4a2fb(%rip), %r12 # 0xdc0b0 leaq -0x80(%rbp), %r13 leaq 0x4e1a4(%rip), %r14 # 0xdff64 xorps %xmm0, %xmm0 movaps %xmm0, -0xa0(%rbp) movq $0x0, -0x90(%rbp) movl $0x1, %edi xorl %esi, %esi leaq -0xa0(%rbp), %rdx callq 0x91b81 movq (%r15), %rdi movl $0x1, %esi leaq 0x4a325(%rip), %rdx # 0xdc11c movq %r12, %rcx movq %r13, %r8 xorl %eax, %eax callq 0x291f0 movq (%r15), %rdi callq 0x29400 movq (%r15), %rdi movl $0x1, %esi movq %r14, %rdx xorl %eax, %eax callq 0x291f0 movq (%r15), %rdi callq 0x29400 decl %ebx cmpl $0x1, %ebx ja 0x91dc0 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x91e4e addq $0x128, %rsp # imm = 0x128 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29260
skip: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 128h mov ebx, edi mov [rbp+var_140], rdx mov [rbp+var_138], rcx mov [rbp+var_130], r8 mov [rbp+var_128], r9 test al, al jz short loc_91D3B movaps [rbp+var_120], xmm0 movaps [rbp+var_110], xmm1 movaps [rbp+var_100], xmm2 movaps [rbp+var_F0], xmm3 movaps [rbp+var_E0], xmm4 movaps [rbp+var_D0], xmm5 movaps [rbp+var_C0], xmm6 movaps [rbp+var_B0], xmm7 loc_91D3B: mov rax, fs:28h mov [rbp+var_30], rax test rsi, rsi jz short loc_91D99 mov r10, rsi cmp byte ptr [rsi], 0 jz short loc_91D99 lea rax, [rbp+var_150] lea r9, [rbp+var_A0] mov [r9+10h], rax lea rax, [rbp+arg_0] mov [r9+8], rax mov rax, 3000000010h mov [r9], rax lea rdi, [rbp+var_80] mov esi, 50h ; 'P' mov ecx, 50h ; 'P' mov edx, 1 mov r8, r10 call ___vsnprintf_chk jmp short loc_91D9D loc_91D99: mov [rbp+var_80], 0 loc_91D9D: test ebx, ebx jle loc_91E2D inc ebx mov r15, cs:stdout_ptr lea r12, aSkip; "skip" lea r13, [rbp+var_80] lea r14, asc_DFF61+3; "\n" loc_91DC0: xorps xmm0, xmm0 movaps [rbp+var_A0], xmm0 mov [rbp+var_90], 0 mov edi, 1 xor esi, esi lea rdx, [rbp+var_A0] call vemit_tap mov rdi, [r15] mov esi, 1 lea rdx, aSS; " # %s %s" mov rcx, r12 mov r8, r13 xor eax, eax call ___fprintf_chk mov rdi, [r15] call _fflush mov rdi, [r15] mov esi, 1 mov rdx, r14 xor eax, eax call ___fprintf_chk mov rdi, [r15] call _fflush dec ebx cmp ebx, 1 ja short loc_91DC0 loc_91E2D: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_91E4E add rsp, 128h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_91E4E: call ___stack_chk_fail
unsigned long long skip(int a1, _BYTE *a2, ...) { unsigned int v2; // ebx va_list va; // [rsp+B0h] [rbp-A0h] BYREF char v5[80]; // [rsp+D0h] [rbp-80h] BYREF unsigned long long v6; // [rsp+120h] [rbp-30h] v6 = __readfsqword(0x28u); if ( a2 && *a2 ) { va_start(va, a2); __vsnprintf_chk(v5, 80LL, 1LL, 80LL, a2, va); } else { v5[0] = 0; } if ( a1 > 0 ) { v2 = a1 + 1; do { memset(va, 0, sizeof(va)); vemit_tap(1, 0LL, (long long)va); __fprintf_chk(stdout, 1LL, " # %s %s", "skip", v5); fflush(stdout); __fprintf_chk(stdout, 1LL, "\n"); fflush(stdout); --v2; } while ( v2 > 1 ); } return __readfsqword(0x28u); }
skip: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x128 MOV EBX,EDI MOV qword ptr [RBP + -0x140],RDX MOV qword ptr [RBP + -0x138],RCX MOV qword ptr [RBP + -0x130],R8 MOV qword ptr [RBP + -0x128],R9 TEST AL,AL JZ 0x00191d3b MOVAPS xmmword ptr [RBP + -0x120],XMM0 MOVAPS xmmword ptr [RBP + -0x110],XMM1 MOVAPS xmmword ptr [RBP + -0x100],XMM2 MOVAPS xmmword ptr [RBP + -0xf0],XMM3 MOVAPS xmmword ptr [RBP + -0xe0],XMM4 MOVAPS xmmword ptr [RBP + -0xd0],XMM5 MOVAPS xmmword ptr [RBP + -0xc0],XMM6 MOVAPS xmmword ptr [RBP + -0xb0],XMM7 LAB_00191d3b: MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX TEST RSI,RSI JZ 0x00191d99 MOV R10,RSI CMP byte ptr [RSI],0x0 JZ 0x00191d99 LEA RAX,[RBP + -0x150] LEA R9,[RBP + -0xa0] MOV qword ptr [R9 + 0x10],RAX LEA RAX,[RBP + 0x10] MOV qword ptr [R9 + 0x8],RAX MOV RAX,0x3000000010 MOV qword ptr [R9],RAX LEA RDI,[RBP + -0x80] MOV ESI,0x50 MOV ECX,0x50 MOV EDX,0x1 MOV R8,R10 CALL 0x00129190 JMP 0x00191d9d LAB_00191d99: MOV byte ptr [RBP + -0x80],0x0 LAB_00191d9d: TEST EBX,EBX JLE 0x00191e2d INC EBX MOV R15,qword ptr [0x00483f98] LEA R12,[0x1dc0b0] LEA R13,[RBP + -0x80] LEA R14,[0x1dff64] LAB_00191dc0: XORPS XMM0,XMM0 MOVAPS xmmword ptr [RBP + -0xa0],XMM0 MOV qword ptr [RBP + -0x90],0x0 MOV EDI,0x1 XOR ESI,ESI LEA RDX,[RBP + -0xa0] CALL 0x00191b81 MOV RDI,qword ptr [R15] MOV ESI,0x1 LEA RDX,[0x1dc11c] MOV RCX,R12 MOV R8,R13 XOR EAX,EAX CALL 0x001291f0 MOV RDI,qword ptr [R15] CALL 0x00129400 MOV RDI,qword ptr [R15] MOV ESI,0x1 MOV RDX,R14 XOR EAX,EAX CALL 0x001291f0 MOV RDI,qword ptr [R15] CALL 0x00129400 DEC EBX CMP EBX,0x1 JA 0x00191dc0 LAB_00191e2d: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00191e4e ADD RSP,0x128 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00191e4e: CALL 0x00129260
void skip(int4 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8,int param_9, char *param_10,int8 param_11,int8 param_12,int8 param_13, int8 param_14) { int *puVar1; char in_AL; uint uVar2; long in_FS_OFFSET; int1 local_158 [16]; int8 local_148; int8 local_140; int8 local_138; int8 local_130; int4 local_128; int8 local_118; int8 local_108; int8 local_f8; int8 local_e8; int8 local_d8; int8 local_c8; int8 local_b8; int8 local_a8; int1 *puStack_a0; int1 *local_98; int1 local_88 [80]; long local_38; if (in_AL != '\0') { local_128 = param_1; local_118 = param_2; local_108 = param_3; local_f8 = param_4; local_e8 = param_5; local_d8 = param_6; local_c8 = param_7; local_b8 = param_8; } local_38 = *(long *)(in_FS_OFFSET + 0x28); local_148 = param_11; local_140 = param_12; local_138 = param_13; local_130 = param_14; if ((param_10 == (char *)0x0) || (*param_10 == '\0')) { local_88[0] = 0; } else { local_98 = local_158; puStack_a0 = &stack0x00000008; local_a8 = 0x3000000010; __vsnprintf_chk(local_88,0x50,1,0x50,param_10); } puVar1 = PTR_stdout_00483f98; if (0 < param_9) { uVar2 = param_9 + 1; do { local_a8 = 0; puStack_a0 = (int1 *)0x0; local_98 = (int1 *)0x0; vemit_tap(1,0,&local_a8); __fprintf_chk(*(int8 *)puVar1,1," # %s %s",&DAT_001dc0b0,local_88); fflush(*(FILE **)puVar1); __fprintf_chk(*(int8 *)puVar1,1,&DAT_001dff64); fflush(*(FILE **)puVar1); uVar2 = uVar2 - 1; } while (1 < uVar2); } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
19,240
Cache::getId(unsigned int)
DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/Cache.cpp
uint32_t Cache::getId(uint32_t addr) { uint32_t offsetBits = log2i(policy.blockSize); uint32_t idBits = log2i(policy.blockNum / policy.associativity); uint32_t mask = (1 << idBits) - 1; return (addr >> offsetBits) & mask; }
O1
cpp
Cache::getId(unsigned int): movl 0x3c(%rdi), %eax movl $0xffffffff, %ecx # imm = 0xFFFFFFFF movl $0xffffffff, %r8d # imm = 0xFFFFFFFF testl %eax, %eax je 0x3a1e xorl %r8d, %r8d cmpl $0x1, %eax je 0x3a1e cmpl $0x2, %eax jb 0x3a1e xorl %r8d, %r8d movl %eax, %edx shrl %edx incl %r8d cmpl $0x3, %eax movl %edx, %eax ja 0x3a12 movl 0x40(%rdi), %eax xorl %edx, %edx divl 0x44(%rdi) testl %eax, %eax je 0x3a45 xorl %ecx, %ecx cmpl $0x1, %eax je 0x3a45 cmpl $0x2, %eax jb 0x3a45 xorl %ecx, %ecx movl %eax, %edx shrl %edx incl %ecx cmpl $0x3, %eax movl %edx, %eax ja 0x3a3a movl $0xffffffff, %eax # imm = 0xFFFFFFFF shll %cl, %eax movl %r8d, %ecx shrl %cl, %esi notl %eax andl %eax, %esi movl %esi, %eax retq
_ZN5Cache5getIdEj: mov eax, [rdi+3Ch] mov ecx, 0FFFFFFFFh mov r8d, 0FFFFFFFFh test eax, eax jz short loc_3A1E xor r8d, r8d cmp eax, 1 jz short loc_3A1E cmp eax, 2 jb short loc_3A1E xor r8d, r8d mov edx, eax loc_3A12: shr edx, 1 inc r8d cmp eax, 3 mov eax, edx ja short loc_3A12 loc_3A1E: mov eax, [rdi+40h] xor edx, edx div dword ptr [rdi+44h] test eax, eax jz short loc_3A45 xor ecx, ecx cmp eax, 1 jz short loc_3A45 cmp eax, 2 jb short loc_3A45 xor ecx, ecx mov edx, eax loc_3A3A: shr edx, 1 inc ecx cmp eax, 3 mov eax, edx ja short loc_3A3A loc_3A45: mov eax, 0FFFFFFFFh shl eax, cl mov ecx, r8d shr esi, cl not eax and esi, eax mov eax, esi retn
long long Cache::getId(Cache *this, unsigned int 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 = *((_DWORD *)this + 15); v3 = -1; v4 = -1; if ( v2 ) { v4 = 0; if ( v2 != 1 ) { v4 = 0; v5 = *((_DWORD *)this + 15); do { v5 >>= 1; ++v4; v6 = v2 <= 3; v2 = v5; } while ( !v6 ); } } v7 = *((_DWORD *)this + 16) / *((_DWORD *)this + 17); if ( v7 ) { v3 = 0; if ( v7 != 1 ) { v3 = 0; v8 = *((_DWORD *)this + 16) / *((_DWORD *)this + 17); do { v8 >>= 1; ++v3; v6 = v7 <= 3; v7 = v8; } while ( !v6 ); } } return ~(-1 << v3) & (a2 >> v4); }
getId: MOV EAX,dword ptr [RDI + 0x3c] MOV ECX,0xffffffff MOV R8D,0xffffffff TEST EAX,EAX JZ 0x00103a1e XOR R8D,R8D CMP EAX,0x1 JZ 0x00103a1e CMP EAX,0x2 JC 0x00103a1e XOR R8D,R8D MOV EDX,EAX LAB_00103a12: SHR EDX,0x1 INC R8D CMP EAX,0x3 MOV EAX,EDX JA 0x00103a12 LAB_00103a1e: MOV EAX,dword ptr [RDI + 0x40] XOR EDX,EDX DIV dword ptr [RDI + 0x44] TEST EAX,EAX JZ 0x00103a45 XOR ECX,ECX CMP EAX,0x1 JZ 0x00103a45 CMP EAX,0x2 JC 0x00103a45 XOR ECX,ECX MOV EDX,EAX LAB_00103a3a: SHR EDX,0x1 INC ECX CMP EAX,0x3 MOV EAX,EDX JA 0x00103a3a LAB_00103a45: MOV EAX,0xffffffff SHL EAX,CL MOV ECX,R8D SHR ESI,CL NOT EAX AND ESI,EAX MOV EAX,ESI RET
/* Cache::getId(unsigned int) */ uint __thiscall Cache::getId(Cache *this,uint param_1) { bool bVar1; uint uVar2; byte bVar3; 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)); bVar3 = 0xff; if (uVar2 != 0) { bVar3 = 0; if ((uVar2 != 1) && (bVar3 = 0, 1 < uVar2)) { bVar3 = 0; uVar4 = (ulong)*(uint *)(this + 0x40) / (ulong)*(uint *)(this + 0x44); do { bVar3 = bVar3 + 1; uVar2 = (uint)uVar4; uVar4 = uVar4 >> 1; } while (3 < uVar2); } } return param_1 >> (bVar5 & 0x1f) & ~(-1 << (bVar3 & 0x1f)); }
19,241
Cache::getId(unsigned int)
DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/Cache.cpp
uint32_t Cache::getId(uint32_t addr) { uint32_t offsetBits = log2i(policy.blockSize); uint32_t idBits = log2i(policy.blockNum / policy.associativity); uint32_t mask = (1 << idBits) - 1; return (addr >> offsetBits) & mask; }
O3
cpp
Cache::getId(unsigned int): movl 0x3c(%rdi), %eax movl $0xffffffff, %ecx # imm = 0xFFFFFFFF movl $0xffffffff, %r8d # imm = 0xFFFFFFFF testl %eax, %eax je 0x39a2 xorl %r8d, %r8d cmpl $0x1, %eax je 0x39a2 movl %eax, %edx shrl %edx incl %r8d cmpl $0x3, %eax movl %edx, %eax ja 0x3996 movl 0x40(%rdi), %eax xorl %edx, %edx divl 0x44(%rdi) testl %eax, %eax je 0x39c2 xorl %ecx, %ecx cmpl $0x1, %eax je 0x39c2 movl %eax, %edx shrl %edx incl %ecx cmpl $0x3, %eax movl %edx, %eax ja 0x39b7 movl $0xffffffff, %eax # imm = 0xFFFFFFFF shll %cl, %eax movl %r8d, %ecx shrl %cl, %esi notl %eax andl %eax, %esi movl %esi, %eax retq nop
_ZN5Cache5getIdEj: mov eax, [rdi+3Ch] mov ecx, 0FFFFFFFFh mov r8d, 0FFFFFFFFh test eax, eax jz short loc_39A2 xor r8d, r8d cmp eax, 1 jz short loc_39A2 mov edx, eax loc_3996: shr edx, 1 inc r8d cmp eax, 3 mov eax, edx ja short loc_3996 loc_39A2: mov eax, [rdi+40h] xor edx, edx div dword ptr [rdi+44h] test eax, eax jz short loc_39C2 xor ecx, ecx cmp eax, 1 jz short loc_39C2 mov edx, eax loc_39B7: shr edx, 1 inc ecx cmp eax, 3 mov eax, edx ja short loc_39B7 loc_39C2: mov eax, 0FFFFFFFFh shl eax, cl mov ecx, r8d shr esi, cl not eax and esi, eax mov eax, esi retn
long long Cache::getId(Cache *this, unsigned int 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 = *((_DWORD *)this + 15); v3 = -1; v4 = -1; if ( v2 ) { v4 = 0; if ( v2 != 1 ) { v5 = *((_DWORD *)this + 15); do { v5 >>= 1; ++v4; v6 = v2 <= 3; v2 = v5; } while ( !v6 ); } } v7 = *((_DWORD *)this + 16) / *((_DWORD *)this + 17); if ( v7 ) { v3 = 0; if ( v7 != 1 ) { v8 = *((_DWORD *)this + 16) / *((_DWORD *)this + 17); do { v8 >>= 1; ++v3; v6 = v7 <= 3; v7 = v8; } while ( !v6 ); } } return ~(-1 << v3) & (a2 >> v4); }
getId: MOV EAX,dword ptr [RDI + 0x3c] MOV ECX,0xffffffff MOV R8D,0xffffffff TEST EAX,EAX JZ 0x001039a2 XOR R8D,R8D CMP EAX,0x1 JZ 0x001039a2 MOV EDX,EAX LAB_00103996: SHR EDX,0x1 INC R8D CMP EAX,0x3 MOV EAX,EDX JA 0x00103996 LAB_001039a2: MOV EAX,dword ptr [RDI + 0x40] XOR EDX,EDX DIV dword ptr [RDI + 0x44] TEST EAX,EAX JZ 0x001039c2 XOR ECX,ECX CMP EAX,0x1 JZ 0x001039c2 MOV EDX,EAX LAB_001039b7: SHR EDX,0x1 INC ECX CMP EAX,0x3 MOV EAX,EDX JA 0x001039b7 LAB_001039c2: MOV EAX,0xffffffff SHL EAX,CL MOV ECX,R8D SHR ESI,CL NOT EAX AND ESI,EAX MOV EAX,ESI RET
/* Cache::getId(unsigned int) */ uint __thiscall Cache::getId(Cache *this,uint param_1) { bool bVar1; uint uVar2; byte bVar3; ulong uVar4; byte bVar5; byte bVar6; uVar2 = *(uint *)(this + 0x3c); bVar3 = 0xff; bVar5 = 0xff; if (uVar2 != 0) { bVar6 = 0; bVar5 = 0; if (uVar2 != 1) { do { bVar5 = bVar6 + 1; bVar1 = 3 < uVar2; uVar2 = uVar2 >> 1; bVar6 = bVar5; } while (bVar1); } } uVar4 = (ulong)*(uint *)(this + 0x40) / (ulong)*(uint *)(this + 0x44); if ((int)uVar4 != 0) { bVar6 = 0; bVar3 = 0; if ((int)uVar4 != 1) { do { bVar3 = bVar6 + 1; uVar2 = (uint)uVar4; uVar4 = uVar4 >> 1; bVar6 = bVar3; } while (3 < uVar2); } } return param_1 >> (bVar5 & 0x1f) & ~(-1 << (bVar3 & 0x1f)); }
19,242
copy_str16
bluesky950520[P]quickjs/quickjs.c
static void copy_str16(uint16_t *dst, const JSString *p, int offset, int len) { if (p->is_wide_char) { memcpy(dst, p->u.str16 + offset, len * 2); } else { const uint8_t *src1 = p->u.str8 + offset; int i; for(i = 0; i < len; i++) dst[i] = src1[i]; } }
O2
c
copy_str16: movq %rsi, %rax addq $0x18, %rsi testb $-0x80, 0x7(%rax) jne 0x3a89b xorl %eax, %eax testl %edx, %edx cmovlel %eax, %edx cmpq %rax, %rdx je 0x3a8a2 movzbl (%rsi,%rax), %ecx movw %cx, (%rdi,%rax,2) incq %rax jmp 0x3a889 addl %edx, %edx jmp 0xe5c0 retq
copy_str16: mov rax, rsi add rsi, 18h test byte ptr [rax+7], 80h jnz short loc_3A89B xor eax, eax test edx, edx cmovle edx, eax loc_3A889: cmp rdx, rax jz short locret_3A8A2 movzx ecx, byte ptr [rsi+rax] mov [rdi+rax*2], cx inc rax jmp short loc_3A889 loc_3A89B: add edx, edx jmp _memcpy locret_3A8A2: retn
long long copy_str16(long long a1, long long a2, long long a3) { long long v4; // rsi long long result; // rax v4 = a2 + 24; if ( *(char *)(a2 + 7) < 0 ) return memcpy(a1, v4, (unsigned int)(2 * a3)); result = 0LL; if ( (int)a3 <= 0 ) a3 = 0LL; while ( a3 != result ) { *(_WORD *)(a1 + 2 * result) = *(unsigned __int8 *)(v4 + result); ++result; } return result; }
copy_str16: MOV RAX,RSI ADD RSI,0x18 TEST byte ptr [RAX + 0x7],0x80 JNZ 0x0013a89b XOR EAX,EAX TEST EDX,EDX CMOVLE EDX,EAX LAB_0013a889: CMP RDX,RAX JZ 0x0013a8a2 MOVZX ECX,byte ptr [RSI + RAX*0x1] MOV word ptr [RDI + RAX*0x2],CX INC RAX JMP 0x0013a889 LAB_0013a89b: ADD EDX,EDX JMP 0x0010e5c0 LAB_0013a8a2: RET
void copy_str16(void *param_1,long param_2,uint param_3) { ulong uVar1; ulong uVar2; if ((*(byte *)(param_2 + 7) & 0x80) == 0) { uVar1 = 0; uVar2 = (ulong)param_3; if ((int)param_3 < 1) { uVar2 = uVar1; } for (; uVar2 != uVar1; uVar1 = uVar1 + 1) { *(ushort *)((long)param_1 + uVar1 * 2) = (ushort)*(byte *)(param_2 + 0x18 + uVar1); } return; } memcpy(param_1,(void *)(param_2 + 0x18),(ulong)(param_3 * 2)); return; }
19,243
ok1
eloqsql/unittest/mytap/tap.c
void ok1(int const pass) { va_list ap; memset(&ap, 0, sizeof(ap)); if (!pass && *g_test.todo == '\0') ++g_test.failed; vemit_tap(pass, NULL, ap); if (*g_test.todo != '\0') emit_dir("todo", g_test.todo); emit_endl(); }
O0
c
ok1: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x4(%rbp) leaq -0x20(%rbp), %rdi xorl %esi, %esi movl $0x18, %edx callq 0x2a2c0 cmpl $0x0, -0x4(%rbp) jne 0xdb4ac movsbl 0xba0424(%rip), %eax # 0xc7b8bc cmpl $0x0, %eax jne 0xdb4ac movl 0xba0415(%rip), %eax # 0xc7b8b8 addl $0x1, %eax movl %eax, 0xba040c(%rip) # 0xc7b8b8 movl -0x4(%rbp), %edi leaq -0x20(%rbp), %rdx xorl %eax, %eax movl %eax, %esi callq 0xdb340 movsbl 0xba03f9(%rip), %eax # 0xc7b8bc cmpl $0x0, %eax je 0xdb4df leaq 0x79bef(%rip), %rdi # 0x1550be leaq 0xba03da(%rip), %rsi # 0xc7b8b0 addq $0xc, %rsi callq 0xdb420 callq 0xdb880 addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
ok1: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_4], edi lea rdi, [rbp+var_20] xor esi, esi mov edx, 18h call _memset cmp [rbp+var_4], 0 jnz short loc_DB4AC movsx eax, cs:byte_C7B8BC cmp eax, 0 jnz short loc_DB4AC mov eax, cs:dword_C7B8B8 add eax, 1 mov cs:dword_C7B8B8, eax loc_DB4AC: mov edi, [rbp+var_4] lea rdx, [rbp+var_20] xor eax, eax mov esi, eax call vemit_tap movsx eax, cs:byte_C7B8BC cmp eax, 0 jz short loc_DB4DF lea rdi, aTodo; "todo" lea rsi, g_test add rsi, 0Ch call emit_dir loc_DB4DF: call emit_endl add rsp, 20h pop rbp retn
long long ok1(int a1) { _BYTE v2[28]; // [rsp+0h] [rbp-20h] BYREF int v3; // [rsp+1Ch] [rbp-4h] v3 = a1; memset(v2, 0LL, 24LL); if ( !v3 && !byte_C7B8BC ) ++dword_C7B8B8; vemit_tap(v3, 0LL, (long long)v2); if ( byte_C7B8BC ) emit_dir("todo", (const char *)&g_test + 12); return emit_endl(); }
ok1: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x4],EDI LEA RDI,[RBP + -0x20] XOR ESI,ESI MOV EDX,0x18 CALL 0x0012a2c0 CMP dword ptr [RBP + -0x4],0x0 JNZ 0x001db4ac MOVSX EAX,byte ptr [0x00d7b8bc] CMP EAX,0x0 JNZ 0x001db4ac MOV EAX,dword ptr [0x00d7b8b8] ADD EAX,0x1 MOV dword ptr [0x00d7b8b8],EAX LAB_001db4ac: MOV EDI,dword ptr [RBP + -0x4] LEA RDX,[RBP + -0x20] XOR EAX,EAX MOV ESI,EAX CALL 0x001db340 MOVSX EAX,byte ptr [0x00d7b8bc] CMP EAX,0x0 JZ 0x001db4df LEA RDI,[0x2550be] LEA RSI,[0xd7b8b0] ADD RSI,0xc CALL 0x001db420 LAB_001db4df: CALL 0x001db880 ADD RSP,0x20 POP RBP RET
void ok1(int param_1) { int1 local_28 [28]; int local_c; local_c = param_1; memset(local_28,0,0x18); if ((local_c == 0) && (DAT_00d7b8bc == '\0')) { DAT_00d7b8b8 = DAT_00d7b8b8 + 1; } vemit_tap(local_c,0,local_28); if (DAT_00d7b8bc != '\0') { emit_dir(&DAT_002550be,&DAT_00d7b8bc); } emit_endl(); return; }
19,244
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::subdivideSharpnessValues()
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/refinement.cpp
void Refinement::subdivideSharpnessValues() { // // Subdividing edge and vertex sharpness values are independent, but in order // to maintain proper classification/tagging of components as semi-sharp, both // must be computed and the neighborhood inspected to properly update the // status. // // It is possible to clear the semi-sharp status when propagating the tags and // to reset it (potentially multiple times) when updating the sharpness values. // The vertex subdivision Rule is also affected by this, which complicates the // process. So for now we apply a post-process to explicitly handle all // semi-sharp vertices. // // These methods will update sharpness tags local to the edges and vertices: subdivideEdgeSharpness(); subdivideVertexSharpness(); // This method uses local sharpness tags (set above) to update vertex tags that // reflect the neighborhood of the vertex (e.g. its rule): reclassifySemisharpVertices(); }
O0
cpp
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::subdivideSharpnessValues(): pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x10(%rbp) callq 0xcd1d0 movq -0x10(%rbp), %rdi callq 0xcd5f0 movq -0x10(%rbp), %rdi callq 0xd6e40 addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement24subdivideSharpnessValuesEv: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8]; this mov [rbp+var_10], rdi call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement22subdivideEdgeSharpnessEv; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::subdivideEdgeSharpness(void) mov rdi, [rbp+var_10]; this call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement24subdivideVertexSharpnessEv; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::subdivideVertexSharpness(void) mov rdi, [rbp+var_10]; this call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement27reclassifySemisharpVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::reclassifySemisharpVertices(void) add rsp, 10h pop rbp retn
long long OpenSubdiv::v3_6_0::Vtr::internal::Refinement::subdivideSharpnessValues( OpenSubdiv::v3_6_0::Vtr::internal::Refinement *this) { OpenSubdiv::v3_6_0::Vtr::internal::Refinement::subdivideEdgeSharpness(this); OpenSubdiv::v3_6_0::Vtr::internal::Refinement::subdivideVertexSharpness(this); return OpenSubdiv::v3_6_0::Vtr::internal::Refinement::reclassifySemisharpVertices(this); }
subdivideSharpnessValues: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RDI CALL 0x001cd1d0 MOV RDI,qword ptr [RBP + -0x10] CALL 0x001cd5f0 MOV RDI,qword ptr [RBP + -0x10] CALL 0x001d6e40 ADD RSP,0x10 POP RBP RET
/* OpenSubdiv::v3_6_0::Vtr::internal::Refinement::subdivideSharpnessValues() */ void __thiscall OpenSubdiv::v3_6_0::Vtr::internal::Refinement::subdivideSharpnessValues(Refinement *this) { subdivideEdgeSharpness(this); subdivideVertexSharpness(this); reclassifySemisharpVertices(this); return; }
19,245
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::subdivideSharpnessValues()
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/refinement.cpp
void Refinement::subdivideSharpnessValues() { // // Subdividing edge and vertex sharpness values are independent, but in order // to maintain proper classification/tagging of components as semi-sharp, both // must be computed and the neighborhood inspected to properly update the // status. // // It is possible to clear the semi-sharp status when propagating the tags and // to reset it (potentially multiple times) when updating the sharpness values. // The vertex subdivision Rule is also affected by this, which complicates the // process. So for now we apply a post-process to explicitly handle all // semi-sharp vertices. // // These methods will update sharpness tags local to the edges and vertices: subdivideEdgeSharpness(); subdivideVertexSharpness(); // This method uses local sharpness tags (set above) to update vertex tags that // reflect the neighborhood of the vertex (e.g. its rule): reclassifySemisharpVertices(); }
O3
cpp
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::subdivideSharpnessValues(): pushq %rbx movq %rdi, %rbx callq 0x3a250 movq %rbx, %rdi callq 0x3a330 movq %rbx, %rdi popq %rbx jmp 0x3c130
_ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement24subdivideSharpnessValuesEv: push rbx mov rbx, rdi call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement22subdivideEdgeSharpnessEv; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::subdivideEdgeSharpness(void) mov rdi, rbx; this call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement24subdivideVertexSharpnessEv; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::subdivideVertexSharpness(void) mov rdi, rbx; this pop rbx jmp __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement27reclassifySemisharpVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::reclassifySemisharpVertices(void)
long long OpenSubdiv::v3_6_0::Vtr::internal::Refinement::subdivideSharpnessValues( OpenSubdiv::v3_6_0::Vtr::internal::Refinement *this) { OpenSubdiv::v3_6_0::Vtr::internal::Refinement::subdivideEdgeSharpness(this); OpenSubdiv::v3_6_0::Vtr::internal::Refinement::subdivideVertexSharpness(this); return OpenSubdiv::v3_6_0::Vtr::internal::Refinement::reclassifySemisharpVertices(this); }
subdivideSharpnessValues: PUSH RBX MOV RBX,RDI CALL 0x0013a250 MOV RDI,RBX CALL 0x0013a330 MOV RDI,RBX POP RBX JMP 0x0013c130
/* OpenSubdiv::v3_6_0::Vtr::internal::Refinement::subdivideSharpnessValues() */ void __thiscall OpenSubdiv::v3_6_0::Vtr::internal::Refinement::subdivideSharpnessValues(Refinement *this) { subdivideEdgeSharpness(this); subdivideVertexSharpness(this); reclassifySemisharpVertices(this); return; }
19,246
llm_build_context::append_pooling(ggml_cgraph*)
monkey531[P]llama/src/llama.cpp
struct ggml_cgraph * append_pooling(struct ggml_cgraph * gf) { // find result_norm tensor for input struct ggml_tensor * inp = nullptr; for (int i = ggml_graph_n_nodes(gf) - 1; i >= 0; --i) { inp = ggml_graph_node(gf, i); if (strcmp(inp->name, "result_norm") == 0 || strcmp(inp->name, "result_embd") == 0) { break; } else { inp = nullptr; } } GGML_ASSERT(inp != nullptr && "missing result_norm/result_embd tensor"); struct ggml_tensor * cur; switch (pooling_type) { case LLAMA_POOLING_TYPE_NONE: { cur = inp; } break; case LLAMA_POOLING_TYPE_MEAN: { struct ggml_tensor * inp_mean = build_inp_mean(); cur = ggml_mul_mat(ctx0, ggml_cont(ctx0, ggml_transpose(ctx0, inp)), inp_mean); } break; case LLAMA_POOLING_TYPE_CLS: case LLAMA_POOLING_TYPE_LAST: { struct ggml_tensor * inp_cls = build_inp_cls(); cur = ggml_get_rows(ctx0, inp, inp_cls); } break; case LLAMA_POOLING_TYPE_RANK: { struct ggml_tensor * inp_cls = build_inp_cls(); inp = ggml_get_rows(ctx0, inp, inp_cls); // classification head // https://github.com/huggingface/transformers/blob/5af7d41e49bbfc8319f462eb45253dcb3863dfb7/src/transformers/models/roberta/modeling_roberta.py#L1566 GGML_ASSERT(model.cls != nullptr); GGML_ASSERT(model.cls_b != nullptr); cur = ggml_add (ctx0, ggml_mul_mat(ctx0, model.cls, inp), model.cls_b); cur = ggml_tanh(ctx0, cur); // some models don't have `cls_out`, for example: https://huggingface.co/jinaai/jina-reranker-v1-tiny-en // https://huggingface.co/jinaai/jina-reranker-v1-tiny-en/blob/cb5347e43979c3084a890e3f99491952603ae1b7/modeling_bert.py#L884-L896 if (model.cls_out) { GGML_ASSERT(model.cls_out_b != nullptr); cur = ggml_add (ctx0, ggml_mul_mat(ctx0, model.cls_out, cur), model.cls_out_b); } } break; default: { GGML_ABORT("unknown pooling type"); } } cb(cur, "result_embd_pooled", -1); ggml_build_forward_expand(gf, cur); return gf; }
O2
cpp
llm_build_context::append_pooling(ggml_cgraph*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, (%rsp) movq %rsi, %rdi callq 0xa0460 movl %eax, %ebp leaq 0x74dcf(%rip), %r12 # 0x13edc4 leaq 0x7500c(%rip), %r13 # 0x13f008 testl %ebp, %ebp jle 0xca1b2 decl %ebp movq %rbx, %rdi movl %ebp, %esi callq 0x9e5b0 movq %rax, %r15 leaq 0x100(%rax), %r14 movq %r14, %rdi movq %r12, %rsi callq 0xa4ac0 testl %eax, %eax je 0xca038 movq %r14, %rdi movq %r13, %rsi callq 0xa4ac0 testl %eax, %eax jne 0xc9ffc testq %r15, %r15 je 0xca1b2 movq (%rsp), %r13 movl 0xcc(%r13), %eax cmpq $0x4, %rax ja 0xca20b leaq 0x742c7(%rip), %rcx # 0x13e324 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq %r13, %rdi callq 0xa5ea0 movq 0xe8(%r13), %rdi movq %r15, %rsi movq %rax, %rdx callq 0x9d410 jmp 0xca179 movq %r13, %rdi callq 0xa5ea0 movq 0xe8(%r13), %rdi movq %r15, %rsi movq %rax, %rdx callq 0x9d410 movq (%r13), %rcx movq 0x1978(%rcx), %rsi testq %rsi, %rsi je 0xca1d3 cmpq $0x0, 0x1980(%rcx) je 0xca1ef movq 0xe8(%r13), %r14 movq %r14, %rdi movq %rax, %rdx callq 0x9eb30 movq (%r13), %rcx movq 0x1980(%rcx), %rdx movq %r14, %rdi movq %rax, %rsi callq 0x9e1f0 movq 0xe8(%r13), %rdi movq %rax, %rsi callq 0xa1e70 movq %rax, %r15 movq (%r13), %rax movq 0x1988(%rax), %rsi testq %rsi, %rsi je 0xca17c cmpq $0x0, 0x1990(%rax) je 0xca225 movq 0xe8(%r13), %r14 movq %r14, %rdi movq %r15, %rdx callq 0x9eb30 movq (%r13), %rcx movq 0x1990(%rcx), %rdx movq %r14, %rdi movq %rax, %rsi callq 0x9e1f0 jmp 0xca179 movq %r13, %rdi callq 0x9fdc0 movq %rax, %r14 movq 0xe8(%r13), %r12 movq %r12, %rdi movq %r15, %rsi callq 0xa4380 movq %r12, %rdi movq %rax, %rsi callq 0x9c2b0 movq %r12, %rdi movq %rax, %rsi movq %r14, %rdx callq 0x9eb30 movq %rax, %r15 movq 0xd8(%r13), %rdi leaq 0x7522b(%rip), %rdx # 0x13f3b5 pushq $-0x1 popq %rcx movq %r15, %rsi callq 0x9b040 movq %rbx, %rdi movq %r15, %rsi callq 0x9d750 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x74183(%rip), %rdi # 0x13e33c leaq 0x741c4(%rip), %rdx # 0x13e384 leaq 0x75157(%rip), %rcx # 0x13f31e movl $0x55f, %esi # imm = 0x55F xorl %eax, %eax callq 0xa6ac0 leaq 0x74162(%rip), %rdi # 0x13e33c leaq 0x741a3(%rip), %rdx # 0x13e384 leaq 0x75171(%rip), %rcx # 0x13f359 movl $0x57a, %esi # imm = 0x57A jmp 0xca1cc leaq 0x74146(%rip), %rdi # 0x13e33c leaq 0x74187(%rip), %rdx # 0x13e384 leaq 0x7516a(%rip), %rcx # 0x13f36e movl $0x57b, %esi # imm = 0x57B jmp 0xca1cc leaq 0x7412a(%rip), %rdi # 0x13e33c leaq 0x75187(%rip), %rdx # 0x13f3a0 movl $0x58a, %esi # imm = 0x58A xorl %eax, %eax callq 0xa6ac0 leaq 0x74110(%rip), %rdi # 0x13e33c leaq 0x74151(%rip), %rdx # 0x13e384 leaq 0x7514b(%rip), %rcx # 0x13f385 movl $0x583, %esi # imm = 0x583 jmp 0xca1cc nop
_ZN17llm_build_context14append_poolingEP11ggml_cgraph: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi mov [rsp+38h+var_38], rdi mov rdi, rsi call _ggml_graph_n_nodes mov ebp, eax lea r12, aResultNorm; "result_norm" lea r13, aResultEmbd; "result_embd" loc_C9FFC: test ebp, ebp jle loc_CA1B2 dec ebp mov rdi, rbx mov esi, ebp call _ggml_graph_node mov r15, rax lea r14, [rax+100h] mov rdi, r14 mov rsi, r12 call _strcmp test eax, eax jz short loc_CA038 mov rdi, r14 mov rsi, r13 call _strcmp test eax, eax jnz short loc_C9FFC loc_CA038: test r15, r15 jz loc_CA1B2 mov r13, [rsp+38h+var_38] mov eax, [r13+0CCh] cmp rax, 4; switch 5 cases ja def_CA064; jumptable 00000000000CA064 default case lea rcx, jpt_CA064 movsxd rax, ds:(jpt_CA064 - 13E324h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_CA066: mov rdi, r13; jumptable 00000000000CA064 cases 2,3 call __ZN17llm_build_context13build_inp_clsEv; llm_build_context::build_inp_cls(void) mov rdi, [r13+0E8h] mov rsi, r15 mov rdx, rax call _ggml_get_rows jmp loc_CA179 loc_CA085: mov rdi, r13; jumptable 00000000000CA064 case 4 call __ZN17llm_build_context13build_inp_clsEv; llm_build_context::build_inp_cls(void) mov rdi, [r13+0E8h] mov rsi, r15 mov rdx, rax call _ggml_get_rows mov rcx, [r13+0] mov rsi, [rcx+1978h] test rsi, rsi jz loc_CA1D3 cmp qword ptr [rcx+1980h], 0 jz loc_CA1EF mov r14, [r13+0E8h] mov rdi, r14 mov rdx, rax call _ggml_mul_mat mov rcx, [r13+0] mov rdx, [rcx+1980h] mov rdi, r14 mov rsi, rax call _ggml_add mov rdi, [r13+0E8h] mov rsi, rax call _ggml_tanh mov r15, rax mov rax, [r13+0] mov rsi, [rax+1988h] test rsi, rsi jz short loc_CA17C; jumptable 00000000000CA064 case 0 cmp qword ptr [rax+1990h], 0 jz loc_CA225 mov r14, [r13+0E8h] mov rdi, r14 mov rdx, r15 call _ggml_mul_mat mov rcx, [r13+0] mov rdx, [rcx+1990h] mov rdi, r14 mov rsi, rax call _ggml_add jmp short loc_CA179 loc_CA143: mov rdi, r13; jumptable 00000000000CA064 case 1 call __ZN17llm_build_context14build_inp_meanEv; llm_build_context::build_inp_mean(void) mov r14, rax mov r12, [r13+0E8h] mov rdi, r12 mov rsi, r15 call _ggml_transpose mov rdi, r12 mov rsi, rax call _ggml_cont mov rdi, r12 mov rsi, rax mov rdx, r14 call _ggml_mul_mat loc_CA179: mov r15, rax loc_CA17C: mov rdi, [r13+0D8h]; jumptable 00000000000CA064 case 0 lea rdx, aResultEmbdPool; "result_embd_pooled" push 0FFFFFFFFFFFFFFFFh pop rcx mov rsi, r15 call __ZNKSt8functionIFvP11ggml_tensorPKciEEclES1_S3_i; std::function<void ()(ggml_tensor *,char const*,int)>::operator()(ggml_tensor *,char const*,int) mov rdi, rbx mov rsi, r15 call _ggml_build_forward_expand mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_CA1B2: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aInpNullptrMiss; "inp != nullptr && \"missing result_norm"... mov esi, 55Fh loc_CA1CC: xor eax, eax call _ggml_abort loc_CA1D3: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aModelClsNullpt; "model.cls != nullptr" mov esi, 57Ah jmp short loc_CA1CC loc_CA1EF: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aModelClsBNullp; "model.cls_b != nullptr" mov esi, 57Bh jmp short loc_CA1CC def_CA064: lea rdi, aWorkspaceLlm4b_0; jumptable 00000000000CA064 default case lea rdx, aUnknownPooling; "unknown pooling type" mov esi, 58Ah xor eax, eax call _ggml_abort loc_CA225: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aModelClsOutBNu; "model.cls_out_b != nullptr" mov esi, 583h jmp short loc_CA1CC
long long llm_build_context::append_pooling(long long a1, long long a2, float a3) { int v4; // ebp long long v5; // r15 long long v6; // rax long long rows; // rax long long v8; // rax long long v9; // rax long long v10; // rsi long long v11; // r14 long long v12; // rax long long v13; // rax long long v14; // rsi long long v15; // r14 long long v16; // rax long long v17; // r14 long long v18; // r12 long long v19; // rax long long v20; // rax v4 = ggml_graph_n_nodes(a2); do { if ( v4 <= 0 ) goto LABEL_16; v5 = ggml_graph_node(a2, (unsigned int)--v4); } while ( (unsigned int)strcmp(v5 + 256, "result_norm") && (unsigned int)strcmp(v5 + 256, "result_embd") ); if ( !v5 ) { LABEL_16: ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama.cpp", 1375LL, "GGML_ASSERT(%s) failed", "inp != nullptr && \"missing result_norm/result_embd tensor\""); while ( 1 ) LABEL_17: ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama.cpp", 1402LL, "GGML_ASSERT(%s) failed", "model.cls != nullptr"); } switch ( *(_DWORD *)(a1 + 204) ) { case 0: goto LABEL_15; case 1: v17 = llm_build_context::build_inp_mean((llm_build_context *)a1); v18 = *(_QWORD *)(a1 + 232); v19 = ggml_transpose(v18, v5); v20 = ggml_cont(v18, v19); rows = ggml_mul_mat(v18, v20, v17); goto LABEL_14; case 2: case 3: v6 = llm_build_context::build_inp_cls((llm_build_context *)a1); rows = ggml_get_rows(*(_QWORD *)(a1 + 232), v5, v6); goto LABEL_14; case 4: v8 = llm_build_context::build_inp_cls((llm_build_context *)a1); v9 = ggml_get_rows(*(_QWORD *)(a1 + 232), v5, v8); v10 = *(_QWORD *)(*(_QWORD *)a1 + 6520LL); if ( !v10 ) goto LABEL_17; if ( !*(_QWORD *)(*(_QWORD *)a1 + 6528LL) ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama.cpp", 1403LL, "GGML_ASSERT(%s) failed", "model.cls_b != nullptr"); goto LABEL_17; } v11 = *(_QWORD *)(a1 + 232); v12 = ggml_mul_mat(v11, v10, v9); v13 = ggml_add(v11, v12, *(_QWORD *)(*(_QWORD *)a1 + 6528LL), a3); v5 = ggml_tanh(*(_QWORD *)(a1 + 232), v13, a3); v14 = *(_QWORD *)(*(_QWORD *)a1 + 6536LL); if ( !v14 ) goto LABEL_15; if ( !*(_QWORD *)(*(_QWORD *)a1 + 6544LL) ) { LABEL_20: ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama.cpp", 1411LL, "GGML_ASSERT(%s) failed", "model.cls_out_b != nullptr"); goto LABEL_17; } v15 = *(_QWORD *)(a1 + 232); v16 = ggml_mul_mat(v15, v14, v5); rows = ggml_add(v15, v16, *(_QWORD *)(*(_QWORD *)a1 + 6544LL), a3); LABEL_14: v5 = rows; LABEL_15: std::function<void ()(ggml_tensor *,char const*,int)>::operator()( *(_QWORD *)(a1 + 216), v5, "result_embd_pooled", -1LL); ggml_build_forward_expand(a2, v5); return a2; default: ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama.cpp", 1418LL, "unknown pooling type"); goto LABEL_20; } }
append_pooling: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI MOV qword ptr [RSP],RDI MOV RDI,RSI CALL 0x001a0460 MOV EBP,EAX LEA R12,[0x23edc4] LEA R13,[0x23f008] LAB_001c9ffc: TEST EBP,EBP JLE 0x001ca1b2 DEC EBP MOV RDI,RBX MOV ESI,EBP CALL 0x0019e5b0 MOV R15,RAX LEA R14,[RAX + 0x100] MOV RDI,R14 MOV RSI,R12 CALL 0x001a4ac0 TEST EAX,EAX JZ 0x001ca038 MOV RDI,R14 MOV RSI,R13 CALL 0x001a4ac0 TEST EAX,EAX JNZ 0x001c9ffc LAB_001ca038: TEST R15,R15 JZ 0x001ca1b2 MOV R13,qword ptr [RSP] MOV EAX,dword ptr [R13 + 0xcc] CMP RAX,0x4 JA 0x001ca20b LEA RCX,[0x23e324] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_2: MOV RDI,R13 CALL 0x001a5ea0 MOV RDI,qword ptr [R13 + 0xe8] MOV RSI,R15 MOV RDX,RAX CALL 0x0019d410 JMP 0x001ca179 caseD_4: MOV RDI,R13 CALL 0x001a5ea0 MOV RDI,qword ptr [R13 + 0xe8] MOV RSI,R15 MOV RDX,RAX CALL 0x0019d410 MOV RCX,qword ptr [R13] MOV RSI,qword ptr [RCX + 0x1978] TEST RSI,RSI JZ 0x001ca1d3 CMP qword ptr [RCX + 0x1980],0x0 JZ 0x001ca1ef MOV R14,qword ptr [R13 + 0xe8] MOV RDI,R14 MOV RDX,RAX CALL 0x0019eb30 MOV RCX,qword ptr [R13] MOV RDX,qword ptr [RCX + 0x1980] MOV RDI,R14 MOV RSI,RAX CALL 0x0019e1f0 MOV RDI,qword ptr [R13 + 0xe8] MOV RSI,RAX CALL 0x001a1e70 MOV R15,RAX MOV RAX,qword ptr [R13] MOV RSI,qword ptr [RAX + 0x1988] TEST RSI,RSI JZ 0x001ca17c CMP qword ptr [RAX + 0x1990],0x0 JZ 0x001ca225 MOV R14,qword ptr [R13 + 0xe8] MOV RDI,R14 MOV RDX,R15 CALL 0x0019eb30 MOV RCX,qword ptr [R13] MOV RDX,qword ptr [RCX + 0x1990] MOV RDI,R14 MOV RSI,RAX CALL 0x0019e1f0 JMP 0x001ca179 caseD_1: MOV RDI,R13 CALL 0x0019fdc0 MOV R14,RAX MOV R12,qword ptr [R13 + 0xe8] MOV RDI,R12 MOV RSI,R15 CALL 0x001a4380 MOV RDI,R12 MOV RSI,RAX CALL 0x0019c2b0 MOV RDI,R12 MOV RSI,RAX MOV RDX,R14 CALL 0x0019eb30 LAB_001ca179: MOV R15,RAX caseD_0: MOV RDI,qword ptr [R13 + 0xd8] LEA RDX,[0x23f3b5] PUSH -0x1 POP RCX MOV RSI,R15 CALL 0x0019b040 MOV RDI,RBX MOV RSI,R15 CALL 0x0019d750 MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001ca1b2: LEA RDI,[0x23e33c] LEA RDX,[0x23e384] LEA RCX,[0x23f31e] MOV ESI,0x55f LAB_001ca1cc: XOR EAX,EAX CALL 0x001a6ac0 LAB_001ca1d3: LEA RDI,[0x23e33c] LEA RDX,[0x23e384] LEA RCX,[0x23f359] MOV ESI,0x57a JMP 0x001ca1cc LAB_001ca1ef: LEA RDI,[0x23e33c] LEA RDX,[0x23e384] LEA RCX,[0x23f36e] MOV ESI,0x57b JMP 0x001ca1cc default: LEA RDI,[0x23e33c] LEA RDX,[0x23f3a0] MOV ESI,0x58a XOR EAX,EAX CALL 0x001a6ac0 LAB_001ca225: LEA RDI,[0x23e33c] LEA RDX,[0x23e384] LEA RCX,[0x23f385] MOV ESI,0x583 JMP 0x001ca1cc
/* llm_build_context::append_pooling(ggml_cgraph*) */ ggml_cgraph * __thiscall llm_build_context::append_pooling(llm_build_context *this,ggml_cgraph *param_1) { long lVar1; int iVar2; int iVar3; ggml_tensor *pgVar4; int8 uVar5; int8 uVar6; char *pcVar7; int8 uVar8; iVar2 = ggml_graph_n_nodes(param_1); do { if (iVar2 < 1) goto LAB_001ca1b2; iVar2 = iVar2 + -1; pgVar4 = (ggml_tensor *)ggml_graph_node(param_1,iVar2); iVar3 = strcmp((char *)(pgVar4 + 0x100),"result_norm"); } while ((iVar3 != 0) && (iVar3 = strcmp((char *)(pgVar4 + 0x100),"result_embd"), iVar3 != 0)); if (pgVar4 != (ggml_tensor *)0x0) { switch(*(int4 *)(this + 0xcc)) { case 0: break; case 1: uVar5 = build_inp_mean(this); uVar8 = *(int8 *)(this + 0xe8); uVar6 = ggml_transpose(uVar8,pgVar4); uVar6 = ggml_cont(uVar8,uVar6); pgVar4 = (ggml_tensor *)ggml_mul_mat(uVar8,uVar6,uVar5); break; case 2: case 3: uVar8 = build_inp_cls(this); pgVar4 = (ggml_tensor *)ggml_get_rows(*(int8 *)(this + 0xe8),pgVar4,uVar8); break; case 4: uVar8 = build_inp_cls(this); uVar8 = ggml_get_rows(*(int8 *)(this + 0xe8),pgVar4,uVar8); lVar1 = *(long *)(*(long *)this + 0x1978); if (lVar1 == 0) { pcVar7 = "model.cls != nullptr"; uVar8 = 0x57a; } else { if (*(long *)(*(long *)this + 0x1980) != 0) { uVar5 = *(int8 *)(this + 0xe8); uVar8 = ggml_mul_mat(uVar5,lVar1,uVar8); uVar8 = ggml_add(uVar5,uVar8,*(int8 *)(*(long *)this + 0x1980)); pgVar4 = (ggml_tensor *)ggml_tanh(*(int8 *)(this + 0xe8),uVar8); lVar1 = *(long *)(*(long *)this + 0x1988); if (lVar1 != 0) { if (*(long *)(*(long *)this + 0x1990) == 0) { pcVar7 = "model.cls_out_b != nullptr"; uVar8 = 0x583; goto LAB_001ca1cc; } uVar8 = *(int8 *)(this + 0xe8); uVar5 = ggml_mul_mat(uVar8,lVar1,pgVar4); pgVar4 = (ggml_tensor *)ggml_add(uVar8,uVar5,*(int8 *)(*(long *)this + 0x1990)); } break; } pcVar7 = "model.cls_b != nullptr"; uVar8 = 0x57b; } goto LAB_001ca1cc; default: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama.cpp",0x58a, "unknown pooling type"); } std::function<void(ggml_tensor*,char_const*,int)>::operator() (*(function<void(ggml_tensor*,char_const*,int)> **)(this + 0xd8),pgVar4, "result_embd_pooled",-1); ggml_build_forward_expand(param_1,pgVar4); return param_1; } LAB_001ca1b2: pcVar7 = "inp != nullptr && \"missing result_norm/result_embd tensor\""; uVar8 = 0x55f; LAB_001ca1cc: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama.cpp",uVar8, "GGML_ASSERT(%s) failed",pcVar7); }
19,247
llm_build_context::append_pooling(ggml_cgraph*)
monkey531[P]llama/src/llama.cpp
struct ggml_cgraph * append_pooling(struct ggml_cgraph * gf) { // find result_norm tensor for input struct ggml_tensor * inp = nullptr; for (int i = ggml_graph_n_nodes(gf) - 1; i >= 0; --i) { inp = ggml_graph_node(gf, i); if (strcmp(inp->name, "result_norm") == 0 || strcmp(inp->name, "result_embd") == 0) { break; } else { inp = nullptr; } } GGML_ASSERT(inp != nullptr && "missing result_norm/result_embd tensor"); struct ggml_tensor * cur; switch (pooling_type) { case LLAMA_POOLING_TYPE_NONE: { cur = inp; } break; case LLAMA_POOLING_TYPE_MEAN: { struct ggml_tensor * inp_mean = build_inp_mean(); cur = ggml_mul_mat(ctx0, ggml_cont(ctx0, ggml_transpose(ctx0, inp)), inp_mean); } break; case LLAMA_POOLING_TYPE_CLS: case LLAMA_POOLING_TYPE_LAST: { struct ggml_tensor * inp_cls = build_inp_cls(); cur = ggml_get_rows(ctx0, inp, inp_cls); } break; case LLAMA_POOLING_TYPE_RANK: { struct ggml_tensor * inp_cls = build_inp_cls(); inp = ggml_get_rows(ctx0, inp, inp_cls); // classification head // https://github.com/huggingface/transformers/blob/5af7d41e49bbfc8319f462eb45253dcb3863dfb7/src/transformers/models/roberta/modeling_roberta.py#L1566 GGML_ASSERT(model.cls != nullptr); GGML_ASSERT(model.cls_b != nullptr); cur = ggml_add (ctx0, ggml_mul_mat(ctx0, model.cls, inp), model.cls_b); cur = ggml_tanh(ctx0, cur); // some models don't have `cls_out`, for example: https://huggingface.co/jinaai/jina-reranker-v1-tiny-en // https://huggingface.co/jinaai/jina-reranker-v1-tiny-en/blob/cb5347e43979c3084a890e3f99491952603ae1b7/modeling_bert.py#L884-L896 if (model.cls_out) { GGML_ASSERT(model.cls_out_b != nullptr); cur = ggml_add (ctx0, ggml_mul_mat(ctx0, model.cls_out, cur), model.cls_out_b); } } break; default: { GGML_ABORT("unknown pooling type"); } } cb(cur, "result_embd_pooled", -1); ggml_build_forward_expand(gf, cur); return gf; }
O3
cpp
llm_build_context::append_pooling(ggml_cgraph*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, (%rsp) movq %rsi, %rdi callq 0x671d0 movl %eax, %ebp leaq 0x8115d(%rip), %r12 # 0x110e04 leaq 0x8139a(%rip), %r13 # 0x111048 testl %ebp, %ebp jle 0x8fe66 decl %ebp movq %rbx, %rdi movl %ebp, %esi callq 0x66040 movq %rax, %r15 leaq 0x100(%rax), %r14 movq %r14, %rdi movq %r12, %rsi callq 0x69b90 testl %eax, %eax je 0x8fcea movq %r14, %rdi movq %r13, %rsi callq 0x69b90 testl %eax, %eax jne 0x8fcae testq %r15, %r15 je 0x8fe66 movq (%rsp), %r13 movl 0xcc(%r13), %eax cmpq $0x4, %rax ja 0x8febf leaq 0x80655(%rip), %rcx # 0x110364 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq %r13, %rdi callq 0x6a7c0 movq 0xe8(%r13), %rdi movq %r15, %rsi movq %rax, %rdx callq 0x65540 jmp 0x8fe2b movq %r13, %rdi callq 0x6a7c0 movq 0xe8(%r13), %rdi movq %r15, %rsi movq %rax, %rdx callq 0x65540 movq (%r13), %rcx movq 0x1978(%rcx), %rsi testq %rsi, %rsi je 0x8fe87 cmpq $0x0, 0x1980(%rcx) je 0x8fea3 movq 0xe8(%r13), %r14 movq %r14, %rdi movq %rax, %rdx callq 0x66370 movq (%r13), %rcx movq 0x1980(%rcx), %rdx movq %r14, %rdi movq %rax, %rsi callq 0x65e00 movq 0xe8(%r13), %rdi movq %rax, %rsi callq 0x681f0 movq %rax, %r15 movq (%r13), %rax movq 0x1988(%rax), %rsi testq %rsi, %rsi je 0x8fe2e cmpq $0x0, 0x1990(%rax) je 0x8fed9 movq 0xe8(%r13), %r14 movq %r14, %rdi movq %r15, %rdx callq 0x66370 movq (%r13), %rcx movq 0x1990(%rcx), %rdx movq %r14, %rdi movq %rax, %rsi callq 0x65e00 jmp 0x8fe2b movq %r13, %rdi callq 0x66df0 movq %rax, %r14 movq 0xe8(%r13), %r12 movq %r12, %rdi movq %r15, %rsi callq 0x696c0 movq %r12, %rdi movq %rax, %rsi callq 0x64af0 movq %r12, %rdi movq %rax, %rsi movq %r14, %rdx callq 0x66370 movq %rax, %r15 movq 0xd8(%r13), %rdi leaq 0x815b9(%rip), %rdx # 0x1113f5 movq %r15, %rsi movl $0xffffffff, %ecx # imm = 0xFFFFFFFF callq 0x64030 movq %rbx, %rdi movq %r15, %rsi callq 0x65770 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x8050f(%rip), %rdi # 0x11037c leaq 0x80550(%rip), %rdx # 0x1103c4 leaq 0x814e3(%rip), %rcx # 0x11135e movl $0x55f, %esi # imm = 0x55F xorl %eax, %eax callq 0x6af70 leaq 0x804ee(%rip), %rdi # 0x11037c leaq 0x8052f(%rip), %rdx # 0x1103c4 leaq 0x814fd(%rip), %rcx # 0x111399 movl $0x57a, %esi # imm = 0x57A jmp 0x8fe80 leaq 0x804d2(%rip), %rdi # 0x11037c leaq 0x80513(%rip), %rdx # 0x1103c4 leaq 0x814f6(%rip), %rcx # 0x1113ae movl $0x57b, %esi # imm = 0x57B jmp 0x8fe80 leaq 0x804b6(%rip), %rdi # 0x11037c leaq 0x81513(%rip), %rdx # 0x1113e0 movl $0x58a, %esi # imm = 0x58A xorl %eax, %eax callq 0x6af70 leaq 0x8049c(%rip), %rdi # 0x11037c leaq 0x804dd(%rip), %rdx # 0x1103c4 leaq 0x814d7(%rip), %rcx # 0x1113c5 movl $0x583, %esi # imm = 0x583 jmp 0x8fe80 nop
_ZN17llm_build_context14append_poolingEP11ggml_cgraph: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi mov [rsp+38h+var_38], rdi mov rdi, rsi call _ggml_graph_n_nodes mov ebp, eax lea r12, aResultNorm; "result_norm" lea r13, aResultEmbd; "result_embd" loc_8FCAE: test ebp, ebp jle loc_8FE66 dec ebp mov rdi, rbx mov esi, ebp call _ggml_graph_node mov r15, rax lea r14, [rax+100h] mov rdi, r14 mov rsi, r12 call _strcmp test eax, eax jz short loc_8FCEA mov rdi, r14 mov rsi, r13 call _strcmp test eax, eax jnz short loc_8FCAE loc_8FCEA: test r15, r15 jz loc_8FE66 mov r13, [rsp+38h+var_38] mov eax, [r13+0CCh] cmp rax, 4; switch 5 cases ja def_8FD16; jumptable 000000000008FD16 default case lea rcx, jpt_8FD16 movsxd rax, ds:(jpt_8FD16 - 110364h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_8FD18: mov rdi, r13; jumptable 000000000008FD16 cases 2,3 call __ZN17llm_build_context13build_inp_clsEv; llm_build_context::build_inp_cls(void) mov rdi, [r13+0E8h] mov rsi, r15 mov rdx, rax call _ggml_get_rows jmp loc_8FE2B loc_8FD37: mov rdi, r13; jumptable 000000000008FD16 case 4 call __ZN17llm_build_context13build_inp_clsEv; llm_build_context::build_inp_cls(void) mov rdi, [r13+0E8h] mov rsi, r15 mov rdx, rax call _ggml_get_rows mov rcx, [r13+0] mov rsi, [rcx+1978h] test rsi, rsi jz loc_8FE87 cmp qword ptr [rcx+1980h], 0 jz loc_8FEA3 mov r14, [r13+0E8h] mov rdi, r14 mov rdx, rax call _ggml_mul_mat mov rcx, [r13+0] mov rdx, [rcx+1980h] mov rdi, r14 mov rsi, rax call _ggml_add mov rdi, [r13+0E8h] mov rsi, rax call _ggml_tanh mov r15, rax mov rax, [r13+0] mov rsi, [rax+1988h] test rsi, rsi jz short loc_8FE2E; jumptable 000000000008FD16 case 0 cmp qword ptr [rax+1990h], 0 jz loc_8FED9 mov r14, [r13+0E8h] mov rdi, r14 mov rdx, r15 call _ggml_mul_mat mov rcx, [r13+0] mov rdx, [rcx+1990h] mov rdi, r14 mov rsi, rax call _ggml_add jmp short loc_8FE2B loc_8FDF5: mov rdi, r13; jumptable 000000000008FD16 case 1 call __ZN17llm_build_context14build_inp_meanEv; llm_build_context::build_inp_mean(void) mov r14, rax mov r12, [r13+0E8h] mov rdi, r12 mov rsi, r15 call _ggml_transpose mov rdi, r12 mov rsi, rax call _ggml_cont mov rdi, r12 mov rsi, rax mov rdx, r14 call _ggml_mul_mat loc_8FE2B: mov r15, rax loc_8FE2E: mov rdi, [r13+0D8h]; jumptable 000000000008FD16 case 0 lea rdx, aResultEmbdPool; "result_embd_pooled" mov rsi, r15 mov ecx, 0FFFFFFFFh call __ZNKSt8functionIFvP11ggml_tensorPKciEEclES1_S3_i; std::function<void ()(ggml_tensor *,char const*,int)>::operator()(ggml_tensor *,char const*,int) mov rdi, rbx mov rsi, r15 call _ggml_build_forward_expand mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_8FE66: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aInpNullptrMiss; "inp != nullptr && \"missing result_norm"... mov esi, 55Fh loc_8FE80: xor eax, eax call _ggml_abort loc_8FE87: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aModelClsNullpt; "model.cls != nullptr" mov esi, 57Ah jmp short loc_8FE80 loc_8FEA3: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aModelClsBNullp; "model.cls_b != nullptr" mov esi, 57Bh jmp short loc_8FE80 def_8FD16: lea rdi, aWorkspaceLlm4b_0; jumptable 000000000008FD16 default case lea rdx, aUnknownPooling; "unknown pooling type" mov esi, 58Ah xor eax, eax call _ggml_abort loc_8FED9: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aModelClsOutBNu; "model.cls_out_b != nullptr" mov esi, 583h jmp short loc_8FE80
long long llm_build_context::append_pooling(long long a1, long long a2, float a3) { int v4; // ebp long long v5; // r15 long long v6; // rax long long rows; // rax long long v8; // rax long long v9; // rax long long v10; // rsi long long v11; // r14 long long v12; // rax long long v13; // rax long long v14; // rsi long long v15; // r14 long long v16; // rax long long v17; // r14 long long v18; // r12 long long v19; // rax long long v20; // rax v4 = ggml_graph_n_nodes(a2); do { if ( v4 <= 0 ) goto LABEL_16; v5 = ggml_graph_node(a2, (unsigned int)--v4); } while ( (unsigned int)strcmp(v5 + 256, "result_norm") && (unsigned int)strcmp(v5 + 256, "result_embd") ); if ( !v5 ) { LABEL_16: ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama.cpp", 1375LL, "GGML_ASSERT(%s) failed", "inp != nullptr && \"missing result_norm/result_embd tensor\""); while ( 1 ) LABEL_17: ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama.cpp", 1402LL, "GGML_ASSERT(%s) failed", "model.cls != nullptr"); } switch ( *(_DWORD *)(a1 + 204) ) { case 0: goto LABEL_15; case 1: v17 = llm_build_context::build_inp_mean((llm_build_context *)a1); v18 = *(_QWORD *)(a1 + 232); v19 = ggml_transpose(v18, v5); v20 = ggml_cont(v18, v19); rows = ggml_mul_mat(v18, v20, v17); goto LABEL_14; case 2: case 3: v6 = llm_build_context::build_inp_cls((llm_build_context *)a1); rows = ggml_get_rows(*(_QWORD *)(a1 + 232), v5, v6); goto LABEL_14; case 4: v8 = llm_build_context::build_inp_cls((llm_build_context *)a1); v9 = ggml_get_rows(*(_QWORD *)(a1 + 232), v5, v8); v10 = *(_QWORD *)(*(_QWORD *)a1 + 6520LL); if ( !v10 ) goto LABEL_17; if ( !*(_QWORD *)(*(_QWORD *)a1 + 6528LL) ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama.cpp", 1403LL, "GGML_ASSERT(%s) failed", "model.cls_b != nullptr"); goto LABEL_17; } v11 = *(_QWORD *)(a1 + 232); v12 = ggml_mul_mat(v11, v10, v9); v13 = ggml_add(v11, v12, *(_QWORD *)(*(_QWORD *)a1 + 6528LL), a3); v5 = ggml_tanh(*(_QWORD *)(a1 + 232), v13, a3); v14 = *(_QWORD *)(*(_QWORD *)a1 + 6536LL); if ( !v14 ) goto LABEL_15; if ( !*(_QWORD *)(*(_QWORD *)a1 + 6544LL) ) { LABEL_20: ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama.cpp", 1411LL, "GGML_ASSERT(%s) failed", "model.cls_out_b != nullptr"); goto LABEL_17; } v15 = *(_QWORD *)(a1 + 232); v16 = ggml_mul_mat(v15, v14, v5); rows = ggml_add(v15, v16, *(_QWORD *)(*(_QWORD *)a1 + 6544LL), a3); LABEL_14: v5 = rows; LABEL_15: std::function<void ()(ggml_tensor *,char const*,int)>::operator()( *(_QWORD *)(a1 + 216), v5, "result_embd_pooled", 0xFFFFFFFFLL); ggml_build_forward_expand(a2, v5); return a2; default: ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama.cpp", 1418LL, "unknown pooling type"); goto LABEL_20; } }
append_pooling: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI MOV qword ptr [RSP],RDI MOV RDI,RSI CALL 0x001671d0 MOV EBP,EAX LEA R12,[0x210e04] LEA R13,[0x211048] LAB_0018fcae: TEST EBP,EBP JLE 0x0018fe66 DEC EBP MOV RDI,RBX MOV ESI,EBP CALL 0x00166040 MOV R15,RAX LEA R14,[RAX + 0x100] MOV RDI,R14 MOV RSI,R12 CALL 0x00169b90 TEST EAX,EAX JZ 0x0018fcea MOV RDI,R14 MOV RSI,R13 CALL 0x00169b90 TEST EAX,EAX JNZ 0x0018fcae LAB_0018fcea: TEST R15,R15 JZ 0x0018fe66 MOV R13,qword ptr [RSP] MOV EAX,dword ptr [R13 + 0xcc] CMP RAX,0x4 JA 0x0018febf LEA RCX,[0x210364] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_2: MOV RDI,R13 CALL 0x0016a7c0 MOV RDI,qword ptr [R13 + 0xe8] MOV RSI,R15 MOV RDX,RAX CALL 0x00165540 JMP 0x0018fe2b caseD_4: MOV RDI,R13 CALL 0x0016a7c0 MOV RDI,qword ptr [R13 + 0xe8] MOV RSI,R15 MOV RDX,RAX CALL 0x00165540 MOV RCX,qword ptr [R13] MOV RSI,qword ptr [RCX + 0x1978] TEST RSI,RSI JZ 0x0018fe87 CMP qword ptr [RCX + 0x1980],0x0 JZ 0x0018fea3 MOV R14,qword ptr [R13 + 0xe8] MOV RDI,R14 MOV RDX,RAX CALL 0x00166370 MOV RCX,qword ptr [R13] MOV RDX,qword ptr [RCX + 0x1980] MOV RDI,R14 MOV RSI,RAX CALL 0x00165e00 MOV RDI,qword ptr [R13 + 0xe8] MOV RSI,RAX CALL 0x001681f0 MOV R15,RAX MOV RAX,qword ptr [R13] MOV RSI,qword ptr [RAX + 0x1988] TEST RSI,RSI JZ 0x0018fe2e CMP qword ptr [RAX + 0x1990],0x0 JZ 0x0018fed9 MOV R14,qword ptr [R13 + 0xe8] MOV RDI,R14 MOV RDX,R15 CALL 0x00166370 MOV RCX,qword ptr [R13] MOV RDX,qword ptr [RCX + 0x1990] MOV RDI,R14 MOV RSI,RAX CALL 0x00165e00 JMP 0x0018fe2b caseD_1: MOV RDI,R13 CALL 0x00166df0 MOV R14,RAX MOV R12,qword ptr [R13 + 0xe8] MOV RDI,R12 MOV RSI,R15 CALL 0x001696c0 MOV RDI,R12 MOV RSI,RAX CALL 0x00164af0 MOV RDI,R12 MOV RSI,RAX MOV RDX,R14 CALL 0x00166370 LAB_0018fe2b: MOV R15,RAX caseD_0: MOV RDI,qword ptr [R13 + 0xd8] LEA RDX,[0x2113f5] MOV RSI,R15 MOV ECX,0xffffffff CALL 0x00164030 MOV RDI,RBX MOV RSI,R15 CALL 0x00165770 MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0018fe66: LEA RDI,[0x21037c] LEA RDX,[0x2103c4] LEA RCX,[0x21135e] MOV ESI,0x55f LAB_0018fe80: XOR EAX,EAX CALL 0x0016af70 LAB_0018fe87: LEA RDI,[0x21037c] LEA RDX,[0x2103c4] LEA RCX,[0x211399] MOV ESI,0x57a JMP 0x0018fe80 LAB_0018fea3: LEA RDI,[0x21037c] LEA RDX,[0x2103c4] LEA RCX,[0x2113ae] MOV ESI,0x57b JMP 0x0018fe80 default: LEA RDI,[0x21037c] LEA RDX,[0x2113e0] MOV ESI,0x58a XOR EAX,EAX CALL 0x0016af70 LAB_0018fed9: LEA RDI,[0x21037c] LEA RDX,[0x2103c4] LEA RCX,[0x2113c5] MOV ESI,0x583 JMP 0x0018fe80
/* llm_build_context::append_pooling(ggml_cgraph*) */ ggml_cgraph * __thiscall llm_build_context::append_pooling(llm_build_context *this,ggml_cgraph *param_1) { long lVar1; int iVar2; int iVar3; ggml_tensor *pgVar4; int8 uVar5; int8 uVar6; char *pcVar7; int8 uVar8; iVar2 = ggml_graph_n_nodes(param_1); do { if (iVar2 < 1) goto LAB_0018fe66; iVar2 = iVar2 + -1; pgVar4 = (ggml_tensor *)ggml_graph_node(param_1,iVar2); iVar3 = strcmp((char *)(pgVar4 + 0x100),"result_norm"); } while ((iVar3 != 0) && (iVar3 = strcmp((char *)(pgVar4 + 0x100),"result_embd"), iVar3 != 0)); if (pgVar4 != (ggml_tensor *)0x0) { switch(*(int4 *)(this + 0xcc)) { case 0: break; case 1: uVar5 = build_inp_mean(this); uVar8 = *(int8 *)(this + 0xe8); uVar6 = ggml_transpose(uVar8,pgVar4); uVar6 = ggml_cont(uVar8,uVar6); pgVar4 = (ggml_tensor *)ggml_mul_mat(uVar8,uVar6,uVar5); break; case 2: case 3: uVar8 = build_inp_cls(this); pgVar4 = (ggml_tensor *)ggml_get_rows(*(int8 *)(this + 0xe8),pgVar4,uVar8); break; case 4: uVar8 = build_inp_cls(this); uVar8 = ggml_get_rows(*(int8 *)(this + 0xe8),pgVar4,uVar8); lVar1 = *(long *)(*(long *)this + 0x1978); if (lVar1 == 0) { pcVar7 = "model.cls != nullptr"; uVar8 = 0x57a; } else { if (*(long *)(*(long *)this + 0x1980) != 0) { uVar5 = *(int8 *)(this + 0xe8); uVar8 = ggml_mul_mat(uVar5,lVar1,uVar8); uVar8 = ggml_add(uVar5,uVar8,*(int8 *)(*(long *)this + 0x1980)); pgVar4 = (ggml_tensor *)ggml_tanh(*(int8 *)(this + 0xe8),uVar8); lVar1 = *(long *)(*(long *)this + 0x1988); if (lVar1 != 0) { if (*(long *)(*(long *)this + 0x1990) == 0) { pcVar7 = "model.cls_out_b != nullptr"; uVar8 = 0x583; goto LAB_0018fe80; } uVar8 = *(int8 *)(this + 0xe8); uVar5 = ggml_mul_mat(uVar8,lVar1,pgVar4); pgVar4 = (ggml_tensor *)ggml_add(uVar8,uVar5,*(int8 *)(*(long *)this + 0x1990)); } break; } pcVar7 = "model.cls_b != nullptr"; uVar8 = 0x57b; } goto LAB_0018fe80; default: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama.cpp",0x58a, "unknown pooling type"); } std::function<void(ggml_tensor*,char_const*,int)>::operator() (*(function<void(ggml_tensor*,char_const*,int)> **)(this + 0xd8),pgVar4, "result_embd_pooled",-1); ggml_build_forward_expand(param_1,pgVar4); return param_1; } LAB_0018fe66: pcVar7 = "inp != nullptr && \"missing result_norm/result_embd tensor\""; uVar8 = 0x55f; LAB_0018fe80: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama.cpp",uVar8, "GGML_ASSERT(%s) failed",pcVar7); }
19,248
mi_bin_search
eloqsql/storage/myisam/mi_search.c
int _mi_bin_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page, uchar *key, uint key_len, uint comp_flag, uchar **ret_pos, uchar *buff __attribute__((unused)), my_bool *last_key) { reg4 int start,mid,end,save_end; int UNINIT_VAR(flag); uint totlength,nod_flag,not_used[2]; DBUG_ENTER("_mi_bin_search"); totlength=keyinfo->keylength+(nod_flag=mi_test_if_nod(page)); start=0; mid=1; save_end=end=(int) ((mi_getint(page)-2-nod_flag)/totlength-1); DBUG_PRINT("test",("mi_getint: %d end: %d",mi_getint(page),end)); page+=2+nod_flag; while (start != end) { mid= (start+end)/2; if ((flag=ha_key_cmp(keyinfo->seg,page+(uint) mid*totlength,key,key_len, comp_flag, not_used)) >= 0) end=mid; else start=mid+1; } if (mid != start) flag=ha_key_cmp(keyinfo->seg,page+(uint) start*totlength,key,key_len, comp_flag, not_used); if (flag < 0) start++; /* point at next, bigger key */ *ret_pos=page+(uint) start*totlength; *last_key= end == save_end; DBUG_PRINT("exit",("flag: %d keypos: %d",flag,start)); DBUG_RETURN(flag); }
O0
c
mi_bin_search: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq 0x20(%rbp), %rax movq 0x18(%rbp), %rax movq 0x10(%rbp), %rax movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movl %r8d, -0x24(%rbp) movl %r9d, -0x28(%rbp) movl -0x3c(%rbp), %eax movl %eax, -0x3c(%rbp) movq -0x10(%rbp), %rax movzwl 0x12(%rax), %eax movl %eax, -0x50(%rbp) movq -0x18(%rbp), %rax movzbl (%rax), %eax andl $0x80, %eax cmpl $0x0, %eax je 0xe29b0 movq -0x8(%rbp), %rax movq (%rax), %rax movl 0x17c(%rax), %eax movl %eax, -0x54(%rbp) jmp 0xe29b7 xorl %eax, %eax movl %eax, -0x54(%rbp) jmp 0xe29b7 movl -0x50(%rbp), %eax movl -0x54(%rbp), %ecx movl %ecx, -0x44(%rbp) addl %ecx, %eax movl %eax, -0x40(%rbp) movl $0x0, -0x2c(%rbp) movl $0x1, -0x30(%rbp) movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x18(%rbp), %rcx movzbl (%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movzwl %ax, %eax andl $0x7fff, %eax # imm = 0x7FFF subl $0x2, %eax subl -0x44(%rbp), %eax xorl %edx, %edx divl -0x40(%rbp) subl $0x1, %eax movl %eax, -0x34(%rbp) movl %eax, -0x38(%rbp) jmp 0xe2a0b movl -0x44(%rbp), %ecx addl $0x2, %ecx movq -0x18(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x18(%rbp) movl -0x2c(%rbp), %eax cmpl -0x34(%rbp), %eax je 0xe2a7e movl -0x2c(%rbp), %eax addl -0x34(%rbp), %eax movl $0x2, %ecx cltd idivl %ecx movl %eax, -0x30(%rbp) movq -0x10(%rbp), %rax movq 0x28(%rax), %rdi movq -0x18(%rbp), %rsi movl -0x30(%rbp), %eax imull -0x40(%rbp), %eax movl %eax, %eax addq %rax, %rsi movq -0x20(%rbp), %rdx movl -0x24(%rbp), %ecx movl -0x28(%rbp), %r8d leaq -0x4c(%rbp), %r9 callq 0x11c400 movl %eax, -0x3c(%rbp) cmpl $0x0, %eax jl 0xe2a73 movl -0x30(%rbp), %eax movl %eax, -0x34(%rbp) jmp 0xe2a7c movl -0x30(%rbp), %eax addl $0x1, %eax movl %eax, -0x2c(%rbp) jmp 0xe2a1e movl -0x30(%rbp), %eax cmpl -0x2c(%rbp), %eax je 0xe2ab5 movq -0x10(%rbp), %rax movq 0x28(%rax), %rdi movq -0x18(%rbp), %rsi movl -0x2c(%rbp), %eax imull -0x40(%rbp), %eax movl %eax, %eax addq %rax, %rsi movq -0x20(%rbp), %rdx movl -0x24(%rbp), %ecx movl -0x28(%rbp), %r8d leaq -0x4c(%rbp), %r9 callq 0x11c400 movl %eax, -0x3c(%rbp) cmpl $0x0, -0x3c(%rbp) jge 0xe2ac4 movl -0x2c(%rbp), %eax addl $0x1, %eax movl %eax, -0x2c(%rbp) movq -0x18(%rbp), %rcx movl -0x2c(%rbp), %eax imull -0x40(%rbp), %eax movl %eax, %eax addq %rax, %rcx movq 0x10(%rbp), %rax movq %rcx, (%rax) movl -0x34(%rbp), %eax cmpl -0x38(%rbp), %eax sete %al andb $0x1, %al movzbl %al, %eax movb %al, %cl movq 0x20(%rbp), %rax movb %cl, (%rax) jmp 0xe2af3 jmp 0xe2af5 movl -0x3c(%rbp), %eax movl %eax, -0x58(%rbp) movl -0x58(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_mi_bin_search: push rbp mov rbp, rsp sub rsp, 60h mov rax, [rbp+arg_10] mov rax, [rbp+arg_8] mov rax, [rbp+arg_0] mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_24], r8d mov [rbp+var_28], r9d mov eax, [rbp+var_3C] mov [rbp+var_3C], eax mov rax, [rbp+var_10] movzx eax, word ptr [rax+12h] mov [rbp+var_50], eax mov rax, [rbp+var_18] movzx eax, byte ptr [rax] and eax, 80h cmp eax, 0 jz short loc_E29B0 mov rax, [rbp+var_8] mov rax, [rax] mov eax, [rax+17Ch] mov [rbp+var_54], eax jmp short loc_E29B7 loc_E29B0: xor eax, eax mov [rbp+var_54], eax jmp short $+2 loc_E29B7: mov eax, [rbp+var_50] mov ecx, [rbp+var_54] mov [rbp+var_44], ecx add eax, ecx mov [rbp+var_40], eax mov [rbp+var_2C], 0 mov [rbp+var_30], 1 mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] movzx eax, ax mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx] movzx ecx, cx shl ecx, 8 or eax, ecx movzx eax, ax and eax, 7FFFh sub eax, 2 sub eax, [rbp+var_44] xor edx, edx div [rbp+var_40] sub eax, 1 mov [rbp+var_34], eax mov [rbp+var_38], eax jmp short $+2 loc_E2A0B: mov ecx, [rbp+var_44] add ecx, 2 mov rax, [rbp+var_18] mov ecx, ecx add rax, rcx mov [rbp+var_18], rax loc_E2A1E: mov eax, [rbp+var_2C] cmp eax, [rbp+var_34] jz short loc_E2A7E mov eax, [rbp+var_2C] add eax, [rbp+var_34] mov ecx, 2 cdq idiv ecx mov [rbp+var_30], eax mov rax, [rbp+var_10] mov rdi, [rax+28h] mov rsi, [rbp+var_18] mov eax, [rbp+var_30] imul eax, [rbp+var_40] mov eax, eax add rsi, rax mov rdx, [rbp+var_20] mov ecx, [rbp+var_24] mov r8d, [rbp+var_28] lea r9, [rbp+var_4C] call ha_key_cmp mov [rbp+var_3C], eax cmp eax, 0 jl short loc_E2A73 mov eax, [rbp+var_30] mov [rbp+var_34], eax jmp short loc_E2A7C loc_E2A73: mov eax, [rbp+var_30] add eax, 1 mov [rbp+var_2C], eax loc_E2A7C: jmp short loc_E2A1E loc_E2A7E: mov eax, [rbp+var_30] cmp eax, [rbp+var_2C] jz short loc_E2AB5 mov rax, [rbp+var_10] mov rdi, [rax+28h] mov rsi, [rbp+var_18] mov eax, [rbp+var_2C] imul eax, [rbp+var_40] mov eax, eax add rsi, rax mov rdx, [rbp+var_20] mov ecx, [rbp+var_24] mov r8d, [rbp+var_28] lea r9, [rbp+var_4C] call ha_key_cmp mov [rbp+var_3C], eax loc_E2AB5: cmp [rbp+var_3C], 0 jge short loc_E2AC4 mov eax, [rbp+var_2C] add eax, 1 mov [rbp+var_2C], eax loc_E2AC4: mov rcx, [rbp+var_18] mov eax, [rbp+var_2C] imul eax, [rbp+var_40] mov eax, eax add rcx, rax mov rax, [rbp+arg_0] mov [rax], rcx mov eax, [rbp+var_34] cmp eax, [rbp+var_38] setz al and al, 1 movzx eax, al mov cl, al mov rax, [rbp+arg_10] mov [rax], cl jmp short $+2 loc_E2AF3: jmp short $+2 loc_E2AF5: mov eax, [rbp+var_3C] mov [rbp+var_58], eax mov eax, [rbp+var_58] add rsp, 60h pop rbp retn
long long mi_bin_search( long long a1, long long a2, unsigned __int16 *a3, long long a4, unsigned int a5, unsigned int a6, _QWORD *a7, long long a8, bool *a9) { int v10; // [rsp+Ch] [rbp-54h] int v11; // [rsp+10h] [rbp-50h] _BYTE v12[8]; // [rsp+14h] [rbp-4Ch] BYREF int v13; // [rsp+1Ch] [rbp-44h] int v14; // [rsp+20h] [rbp-40h] int v15; // [rsp+24h] [rbp-3Ch] unsigned int v16; // [rsp+28h] [rbp-38h] unsigned int v17; // [rsp+2Ch] [rbp-34h] int v18; // [rsp+30h] [rbp-30h] int v19; // [rsp+34h] [rbp-2Ch] unsigned int v20; // [rsp+38h] [rbp-28h] unsigned int v21; // [rsp+3Ch] [rbp-24h] long long v22; // [rsp+40h] [rbp-20h] unsigned __int16 *v23; // [rsp+48h] [rbp-18h] long long v24; // [rsp+50h] [rbp-10h] long long v25; // [rsp+58h] [rbp-8h] v25 = a1; v24 = a2; v23 = a3; v22 = a4; v21 = a5; v20 = a6; v11 = *(unsigned __int16 *)(a2 + 18); if ( (*(_BYTE *)a3 & 0x80) != 0 ) v10 = *(_DWORD *)(*(_QWORD *)v25 + 380LL); else v10 = 0; v13 = v10; v14 = v10 + v11; v19 = 0; v18 = 1; v17 = ((_byteswap_ushort(*v23) & 0x7FFFu) - 2 - v10) / (v10 + v11) - 1; v16 = v17; v23 = (unsigned __int16 *)((char *)v23 + (unsigned int)(v10 + 2)); while ( v19 != v17 ) { v18 = (int)(v17 + v19) / 2; v15 = ha_key_cmp(*(_QWORD *)(v24 + 40), (char *)v23 + (unsigned int)(v14 * v18), v22, v21, v20, v12); if ( v15 < 0 ) v19 = v18 + 1; else v17 = v18; } if ( v18 != v19 ) v15 = ha_key_cmp(*(_QWORD *)(v24 + 40), (char *)v23 + (unsigned int)(v14 * v19), v22, v21, v20, v12); if ( v15 < 0 ) ++v19; *a7 = (char *)v23 + (unsigned int)(v14 * v19); *a9 = v17 == v16; return (unsigned int)v15; }
_mi_bin_search: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV RAX,qword ptr [RBP + 0x20] MOV RAX,qword ptr [RBP + 0x18] MOV RAX,qword ptr [RBP + 0x10] 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 dword ptr [RBP + -0x24],R8D MOV dword ptr [RBP + -0x28],R9D MOV EAX,dword ptr [RBP + -0x3c] MOV dword ptr [RBP + -0x3c],EAX MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX + 0x12] MOV dword ptr [RBP + -0x50],EAX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] AND EAX,0x80 CMP EAX,0x0 JZ 0x001e29b0 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x17c] MOV dword ptr [RBP + -0x54],EAX JMP 0x001e29b7 LAB_001e29b0: XOR EAX,EAX MOV dword ptr [RBP + -0x54],EAX JMP 0x001e29b7 LAB_001e29b7: MOV EAX,dword ptr [RBP + -0x50] MOV ECX,dword ptr [RBP + -0x54] MOV dword ptr [RBP + -0x44],ECX ADD EAX,ECX MOV dword ptr [RBP + -0x40],EAX MOV dword ptr [RBP + -0x2c],0x0 MOV dword ptr [RBP + -0x30],0x1 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX AND EAX,0x7fff SUB EAX,0x2 SUB EAX,dword ptr [RBP + -0x44] XOR EDX,EDX DIV dword ptr [RBP + -0x40] SUB EAX,0x1 MOV dword ptr [RBP + -0x34],EAX MOV dword ptr [RBP + -0x38],EAX JMP 0x001e2a0b LAB_001e2a0b: MOV ECX,dword ptr [RBP + -0x44] ADD ECX,0x2 MOV RAX,qword ptr [RBP + -0x18] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX LAB_001e2a1e: MOV EAX,dword ptr [RBP + -0x2c] CMP EAX,dword ptr [RBP + -0x34] JZ 0x001e2a7e MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,dword ptr [RBP + -0x34] MOV ECX,0x2 CDQ IDIV ECX MOV dword ptr [RBP + -0x30],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x28] MOV RSI,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x30] IMUL EAX,dword ptr [RBP + -0x40] MOV EAX,EAX ADD RSI,RAX MOV RDX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x24] MOV R8D,dword ptr [RBP + -0x28] LEA R9,[RBP + -0x4c] CALL 0x0021c400 MOV dword ptr [RBP + -0x3c],EAX CMP EAX,0x0 JL 0x001e2a73 MOV EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x34],EAX JMP 0x001e2a7c LAB_001e2a73: MOV EAX,dword ptr [RBP + -0x30] ADD EAX,0x1 MOV dword ptr [RBP + -0x2c],EAX LAB_001e2a7c: JMP 0x001e2a1e LAB_001e2a7e: MOV EAX,dword ptr [RBP + -0x30] CMP EAX,dword ptr [RBP + -0x2c] JZ 0x001e2ab5 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x28] MOV RSI,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x2c] IMUL EAX,dword ptr [RBP + -0x40] MOV EAX,EAX ADD RSI,RAX MOV RDX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x24] MOV R8D,dword ptr [RBP + -0x28] LEA R9,[RBP + -0x4c] CALL 0x0021c400 MOV dword ptr [RBP + -0x3c],EAX LAB_001e2ab5: CMP dword ptr [RBP + -0x3c],0x0 JGE 0x001e2ac4 MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,0x1 MOV dword ptr [RBP + -0x2c],EAX LAB_001e2ac4: MOV RCX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x2c] IMUL EAX,dword ptr [RBP + -0x40] MOV EAX,EAX ADD RCX,RAX MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RAX],RCX MOV EAX,dword ptr [RBP + -0x34] CMP EAX,dword ptr [RBP + -0x38] SETZ AL AND AL,0x1 MOVZX EAX,AL MOV CL,AL MOV RAX,qword ptr [RBP + 0x20] MOV byte ptr [RAX],CL JMP 0x001e2af3 LAB_001e2af3: JMP 0x001e2af5 LAB_001e2af5: MOV EAX,dword ptr [RBP + -0x3c] MOV dword ptr [RBP + -0x58],EAX MOV EAX,dword ptr [RBP + -0x58] ADD RSP,0x60 POP RBP RET
int _mi_bin_search(long *param_1,long param_2,byte *param_3,int8 param_4,int4 param_5, int4 param_6,int8 *param_7,int8 param_8,int8 param_9) { int local_5c; int1 local_54 [8]; int local_4c; uint local_48; int local_44; int local_40; int local_3c; int local_38; int local_34; int4 local_30; int4 local_2c; int8 local_28; byte *local_20; long local_18; long *local_10; if ((*param_3 & 0x80) == 0) { local_5c = 0; } else { local_5c = *(int *)(*param_1 + 0x17c); } local_4c = local_5c; local_48 = (uint)*(ushort *)(param_2 + 0x12) + local_5c; local_34 = 0; local_38 = 1; local_40 = ((((uint)param_3[1] | (*param_3 & 0x7f) << 8) - 2) - local_5c) / local_48 - 1; local_20 = param_3 + (local_5c + 2); local_3c = local_40; local_30 = param_6; local_2c = param_5; local_28 = param_4; local_18 = param_2; local_10 = param_1; while (local_34 != local_3c) { local_38 = (local_34 + local_3c) / 2; local_44 = ha_key_cmp(*(int8 *)(local_18 + 0x28),local_20 + local_38 * local_48,local_28, local_2c,local_30,local_54); if (local_44 < 0) { local_34 = local_38 + 1; } else { local_3c = local_38; } } if (local_38 != local_34) { local_44 = ha_key_cmp(*(int8 *)(local_18 + 0x28),local_20 + local_34 * local_48,local_28, local_2c,local_30,local_54); } if (local_44 < 0) { local_34 = local_34 + 1; } *param_7 = local_20 + local_34 * local_48; *(bool *)param_9 = local_3c == local_40; return local_44; }
19,249
psi_cond_timedwait
eloqsql/mysys/my_thr_init.c
ATTRIBUTE_COLD int psi_cond_timedwait(mysql_cond_t *that, mysql_mutex_t *mutex, const struct timespec *abstime, const char *file, uint line) { PSI_cond_locker_state state; PSI_cond_locker *locker= PSI_COND_CALL(start_cond_wait) (&state, that->m_psi, mutex->m_psi, PSI_COND_TIMEDWAIT, file, line); int result= my_cond_timedwait(&that->m_cond, &mutex->m_mutex, abstime); if (psi_likely(locker)) PSI_COND_CALL(end_cond_wait)(locker, result); return result; }
O3
c
psi_cond_timedwait: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movl %r8d, %r9d movq %rcx, %r8 movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %r12 leaq 0x311f68(%rip), %r13 # 0x3378f0 movq (%r13), %rax movq 0x30(%rdi), %rsi movq 0x40(%r15), %rdx leaq -0x60(%rbp), %rdi pushq $0x1 popq %rcx callq *0x1c0(%rax) movq %rax, %rbx movq %r12, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x254a0 movl %eax, %r14d testq %rbx, %rbx jne 0x259cc movl %r14d, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq (%r13), %rax movq %rbx, %rdi movl %r14d, %esi callq *0x1c8(%rax) jmp 0x259ba
psi_cond_timedwait: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r9d, r8d mov r8, rcx mov r14, rdx mov r15, rsi mov r12, rdi lea r13, PSI_server mov rax, [r13+0] mov rsi, [rdi+30h] mov rdx, [r15+40h] lea rdi, [rbp+var_60] push 1 pop rcx call qword ptr [rax+1C0h] mov rbx, rax mov rdi, r12 mov rsi, r15 mov rdx, r14 call _pthread_cond_timedwait mov r14d, eax test rbx, rbx jnz short loc_259CC loc_259BA: mov eax, r14d add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_259CC: mov rax, [r13+0] mov rdi, rbx mov esi, r14d call qword ptr [rax+1C8h] jmp short loc_259BA
long long psi_cond_timedwait(long long a1, long long a2, long long a3, long long a4, unsigned int a5) { long long v6; // rbx unsigned int v7; // r14d _BYTE v9[96]; // [rsp+0h] [rbp-60h] BYREF v6 = ((long long ( *)(_BYTE *, _QWORD, _QWORD, long long, long long, _QWORD))PSI_server[56])( v9, *(_QWORD *)(a1 + 48), *(_QWORD *)(a2 + 64), 1LL, a4, a5); v7 = pthread_cond_timedwait(a1, a2, a3); if ( v6 ) ((void ( *)(long long, _QWORD))PSI_server[57])(v6, v7); return v7; }
psi_cond_timedwait: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R9D,R8D MOV R8,RCX MOV R14,RDX MOV R15,RSI MOV R12,RDI LEA R13,[0x4378f0] MOV RAX,qword ptr [R13] MOV RSI,qword ptr [RDI + 0x30] MOV RDX,qword ptr [R15 + 0x40] LEA RDI,[RBP + -0x60] PUSH 0x1 POP RCX CALL qword ptr [RAX + 0x1c0] MOV RBX,RAX MOV RDI,R12 MOV RSI,R15 MOV RDX,R14 CALL 0x001254a0 MOV R14D,EAX TEST RBX,RBX JNZ 0x001259cc LAB_001259ba: MOV EAX,R14D ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001259cc: MOV RAX,qword ptr [R13] MOV RDI,RBX MOV ESI,R14D CALL qword ptr [RAX + 0x1c8] JMP 0x001259ba
int psi_cond_timedwait(pthread_cond_t *param_1,pthread_mutex_t *param_2,timespec *param_3, int8 param_4,int4 param_5) { int iVar1; long lVar2; int1 local_68 [56]; lVar2 = (**(code **)(PSI_server + 0x1c0)) (local_68,param_1[1].__align,*(int8 *)((long)param_2 + 0x40),1,param_4, param_5); iVar1 = pthread_cond_timedwait(param_1,param_2,param_3); if (lVar2 != 0) { (**(code **)(PSI_server + 0x1c8))(lVar2,iVar1); } return iVar1; }
19,250
minja::Value::call(std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&) const
monkey531[P]llama/common/minja.hpp
Value call(const std::shared_ptr<Context> & context, ArgumentsValue & args) const { if (!callable_) throw std::runtime_error("Value is not callable: " + dump()); return (*callable_)(context, args); }
O1
cpp
minja::Value::call(std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&) const: pushq %rbp pushq %r14 pushq %rbx subq $0x40, %rsp movq %rsi, %r14 movq 0x30(%rsi), %rsi testq %rsi, %rsi je 0x5aaa1 cmpq $0x0, 0x10(%rsi) je 0x5aafc movq %rdi, %rbx callq *0x18(%rsi) movq %rbx, %rax addq $0x40, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x10, %edi callq 0x1a390 movq %rax, %rbx movq %rsp, %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x43576 leaq 0x5988f(%rip), %rsi # 0xb4356 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x29fff movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %rbx, %rdi callq 0x1ac00 xorl %ebp, %ebp movq 0x8b503(%rip), %rsi # 0xe5ff0 movq 0x8b47c(%rip), %rdx # 0xe5f70 movq %rbx, %rdi callq 0x1acd0 callq 0x1a270 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x5ab27 movq 0x30(%rsp), %rsi incq %rsi callq 0x1a740 jmp 0x5ab27 movq %rax, %r14 movb $0x1, %bpl leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x5ab4a movq 0x10(%rsp), %rsi incq %rsi callq 0x1a740 jmp 0x5ab4a movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0x5ab57 movq %rbx, %rdi callq 0x1a530 movq %r14, %rdi callq 0x1ad30 nop
_ZNK5minja5Value4callERKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueE: push rbp push r14 push rbx sub rsp, 40h mov r14, rsi mov rsi, [rsi+30h] test rsi, rsi jz short loc_5AAA1 cmp qword ptr [rsi+10h], 0 jz short loc_5AAFC mov rbx, rdi call qword ptr [rsi+18h] mov rax, rbx add rsp, 40h pop rbx pop r14 pop rbp retn loc_5AAA1: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, rsp mov rsi, r14 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aValueIsNotCall; "Value is not callable: " lea rdi, [rsp+58h+var_38] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+58h+var_38] 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 loc_5AAFC: call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void) mov r14, rax lea rax, [rsp+58h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_5AB27 mov rsi, [rsp+58h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_5AB27 mov r14, rax mov bpl, 1 loc_5AB27: lea rax, [rsp+58h+var_48] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_5AB4A mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_5AB4A mov r14, rax mov bpl, 1 loc_5AB4A: test bpl, bpl jz short loc_5AB57 mov rdi, rbx; void * call ___cxa_free_exception loc_5AB57: mov rdi, r14 call __Unwind_Resume
long long minja::Value::call(long long a1, long long a2) { long long v3; // rsi void *exception; // rbx _BYTE v6[16]; // [rsp+0h] [rbp-58h] BYREF _BYTE v7[16]; // [rsp+20h] [rbp-38h] BYREF v3 = *(_QWORD *)(a2 + 48); if ( !v3 ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v6, a2, 0xFFFFFFFF, 0); std::operator+<char>((long long)v7, (long long)"Value is not callable: ", (long long)v6); std::runtime_error::runtime_error(exception, v7); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( !*(_QWORD *)(v3 + 16) ) std::__throw_bad_function_call(); (*(void (**)(void))(v3 + 24))(); return a1; }
call: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x40 MOV R14,RSI MOV RSI,qword ptr [RSI + 0x30] TEST RSI,RSI JZ 0x0015aaa1 CMP qword ptr [RSI + 0x10],0x0 JZ 0x0015aafc MOV RBX,RDI CALL qword ptr [RSI + 0x18] MOV RAX,RBX ADD RSP,0x40 POP RBX POP R14 POP RBP RET LAB_0015aaa1: MOV EDI,0x10 CALL 0x0011a390 MOV RBX,RAX LAB_0015aaae: MOV RDI,RSP MOV RSI,R14 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x00143576 LAB_0015aac0: LEA RSI,[0x1b4356] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x00129fff MOV BPL,0x1 LAB_0015aad7: LEA RSI,[RSP + 0x20] MOV RDI,RBX CALL 0x0011ac00 XOR EBP,EBP MOV RSI,qword ptr [0x001e5ff0] MOV RDX,qword ptr [0x001e5f70] MOV RDI,RBX CALL 0x0011acd0 LAB_0015aafc: CALL 0x0011a270
/* minja::Value::call(std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&) const */ shared_ptr * minja::Value::call(shared_ptr *param_1,ArgumentsValue *param_2) { long lVar1; runtime_error *this; int1 auStack_58 [32]; string local_38 [32]; lVar1 = *(long *)(param_2 + 0x30); if (lVar1 == 0) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0015aaae to 0015aabf has its CatchHandler @ 0015ab44 */ dump_abi_cxx11_((int)auStack_58,SUB81(param_2,0)); /* try { // try from 0015aac0 to 0015aad3 has its CatchHandler @ 0015ab21 */ std::operator+((char *)local_38,(string *)"Value is not callable: "); /* try { // try from 0015aad7 to 0015aafb has its CatchHandler @ 0015ab01 */ std::runtime_error::runtime_error(this,local_38); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001e5ff0,PTR__runtime_error_001e5f70); } if (*(long *)(lVar1 + 0x10) != 0) { (**(code **)(lVar1 + 0x18))(); return param_1; } /* WARNING: Subroutine does not return */ std::__throw_bad_function_call(); }
19,251
initialize_bucket(st_lf_hash*, LF_SLIST**, unsigned int, LF_PINS*)
eloqsql/mysys/lf_hash.cc
static int initialize_bucket(LF_HASH *hash, LF_SLIST **node, uint bucket, LF_PINS *pins) { uint parent= my_clear_highest_bit(bucket); LF_SLIST *dummy= (LF_SLIST *)my_malloc(key_memory_lf_slist, sizeof(LF_SLIST), MYF(MY_WME)); LF_SLIST **tmp= 0, *cur; LF_SLIST **el= (LF_SLIST **)lf_dynarray_lvalue(&hash->array, parent); if (unlikely(!el || !dummy)) return -1; if (*el == NULL && bucket && unlikely(initialize_bucket(hash, el, parent, pins))) { my_free(dummy); return -1; } dummy->hashnr= my_reverse_bits(bucket) | 0; /* dummy node */ dummy->key= dummy_key; dummy->keylen= 0; if ((cur= l_insert(el, hash->charset, dummy, pins, LF_HASH_UNIQUE))) { my_free(dummy); dummy= cur; } my_atomic_casptr((void **)node, (void **)(char*) &tmp, dummy); /* note that if the CAS above failed (after l_insert() succeeded), it would mean that some other thread has executed l_insert() for the same dummy node, its l_insert() failed, it picked up our dummy node (in "dummy= cur") and executed the same CAS as above. Which means that even if CAS above failed we don't need to retry, and we should not free(dummy) - there's no memory leak here */ return 0; }
O3
cpp
initialize_bucket(st_lf_hash*, LF_SLIST**, unsigned int, LF_PINS*): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rcx, -0x40(%rbp) movl %edx, %r12d movq %rsi, -0x30(%rbp) movq %rdi, %rbx movl %edx, %eax shrl %eax movl %edx, %ecx shrl $0x2, %ecx orl %eax, %ecx movl %ecx, %eax shrl $0x2, %eax orl %ecx, %eax movl %eax, %ecx shrl $0x4, %ecx orl %eax, %ecx movl %ecx, %eax shrl $0x8, %eax orl %ecx, %eax movl %eax, %r15d shrl $0x10, %r15d orl %eax, %r15d andl %edx, %r15d leaq 0xbff2ae(%rip), %rax # 0xc31024 movl (%rax), %edi pushq $0x20 popq %rsi pushq $0x10 popq %rdx callq 0xbf321 movq %rax, %r13 movq %rbx, -0x38(%rbp) movq %rbx, %rdi movl %r15d, %esi callq 0x31a15 pushq $-0x1 popq %r14 testq %rax, %rax je 0x31e55 testq %r13, %r13 je 0x31e55 movq %rax, %rbx testl %r12d, %r12d je 0x31dbd cmpq $0x0, (%rbx) je 0x31e67 movl $0xff, %eax movl %r12d, %ecx andl %eax, %ecx leaq 0xd4582(%rip), %rdx # 0x106350 movzbl (%rdx,%rcx), %ecx shll $0x18, %ecx movl %r12d, %esi shrl $0x8, %esi andl %eax, %esi movzbl (%rdx,%rsi), %esi shll $0x10, %esi orl %ecx, %esi movl %r12d, %ecx shrl $0x10, %ecx andl %eax, %ecx movzbl (%rdx,%rcx), %eax shll $0x8, %eax orl %esi, %eax shrl $0x18, %r12d movzbl (%rdx,%r12), %ecx orl %eax, %ecx movl %ecx, 0x18(%r13) leaq 0xca567(%rip), %rax # 0xfc374 movq %rax, 0x8(%r13) andq $0x0, 0x10(%r13) movq -0x38(%rbp), %rax movq 0xa8(%rax), %rsi pushq $0x1 popq %r8 movq %rbx, %rdi movq %r13, %rdx movq -0x40(%rbp), %rcx callq 0xc5d99 testq %rax, %rax je 0x31e47 movq %rax, %rbx movq %r13, %rdi callq 0xbf54e movq %rbx, %r13 movq -0x30(%rbp), %rcx xorl %r14d, %r14d xorl %eax, %eax lock cmpxchgq %r13, (%rcx) movl %r14d, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq -0x38(%rbp), %rdi movq %rbx, %rsi movl %r15d, %edx movq -0x40(%rbp), %rcx callq 0x31d23 testl %eax, %eax je 0x31dbd movq %r13, %rdi callq 0xbf54e jmp 0x31e55
_ZL17initialize_bucketP10st_lf_hashPP8LF_SLISTjP7LF_PINS: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_40], rcx mov r12d, edx mov [rbp+var_30], rsi mov rbx, rdi mov eax, edx shr eax, 1 mov ecx, edx shr ecx, 2 or ecx, eax mov eax, ecx shr eax, 2 or eax, ecx mov ecx, eax shr ecx, 4 or ecx, eax mov eax, ecx shr eax, 8 or eax, ecx mov r15d, eax shr r15d, 10h or r15d, eax and r15d, edx lea rax, key_memory_lf_slist mov edi, [rax] push 20h ; ' ' pop rsi push 10h pop rdx call my_malloc mov r13, rax mov [rbp+var_38], rbx mov rdi, rbx mov esi, r15d call lf_dynarray_lvalue push 0FFFFFFFFFFFFFFFFh pop r14 test rax, rax jz loc_31E55 test r13, r13 jz loc_31E55 mov rbx, rax test r12d, r12d jz short loc_31DBD cmp qword ptr [rbx], 0 jz loc_31E67 loc_31DBD: mov eax, 0FFh mov ecx, r12d and ecx, eax lea rdx, _my_bits_reverse_table movzx ecx, byte ptr [rdx+rcx] shl ecx, 18h mov esi, r12d shr esi, 8 and esi, eax movzx esi, byte ptr [rdx+rsi] shl esi, 10h or esi, ecx mov ecx, r12d shr ecx, 10h and ecx, eax movzx eax, byte ptr [rdx+rcx] shl eax, 8 or eax, esi shr r12d, 18h movzx ecx, byte ptr [rdx+r12] or ecx, eax mov [r13+18h], ecx lea rax, aTotalKeyblocks+30h; "" mov [r13+8], rax and qword ptr [r13+10h], 0 mov rax, [rbp+var_38] mov rsi, [rax+0A8h] push 1 pop r8 mov rdi, rbx mov rdx, r13 mov rcx, [rbp+var_40] call _ZL8l_insertPP8LF_SLISTPK15charset_info_stS0_P7LF_PINSj; l_insert(LF_SLIST **,charset_info_st const*,LF_SLIST *,LF_PINS *,uint) test rax, rax jz short loc_31E47 mov rbx, rax mov rdi, r13 call my_free mov r13, rbx loc_31E47: mov rcx, [rbp+var_30] xor r14d, r14d xor eax, eax lock cmpxchg [rcx], r13 loc_31E55: mov eax, r14d add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_31E67: mov rdi, [rbp+var_38] mov rsi, rbx mov edx, r15d mov rcx, [rbp+var_40] call _ZL17initialize_bucketP10st_lf_hashPP8LF_SLISTjP7LF_PINS; initialize_bucket(st_lf_hash *,LF_SLIST **,uint,LF_PINS *) test eax, eax jz loc_31DBD mov rdi, r13 call my_free jmp short loc_31E55
long long initialize_bucket(long long a1, volatile signed long long *a2, unsigned int a3, long long a4) { unsigned int v5; // ecx unsigned int v6; // r15d signed long long v7; // r13 _QWORD *v8; // rax unsigned int v9; // r14d _QWORD *v10; // rbx long long v11; // rax signed long long v12; // rbx v5 = (a3 >> 1) | (a3 >> 2) | (((a3 >> 1) | (a3 >> 2)) >> 2) | (((a3 >> 1) | (a3 >> 2) | (((a3 >> 1) | (a3 >> 2)) >> 2)) >> 4); v6 = a3 & (v5 | (v5 >> 8) | ((v5 | (v5 >> 8)) >> 16)); v7 = my_malloc(key_memory_lf_slist, 32LL, 16LL); v8 = (_QWORD *)lf_dynarray_lvalue(a1, v6); v9 = -1; if ( v8 && v7 ) { v10 = v8; if ( a3 && !*v8 && (unsigned int)initialize_bucket(a1, v8, v6, a4) ) { my_free(v7); } else { *(_DWORD *)(v7 + 24) = (my_bits_reverse_table[(unsigned __int8)a3] << 24) | (my_bits_reverse_table[BYTE1(a3)] << 16) | (my_bits_reverse_table[BYTE2(a3)] << 8) | my_bits_reverse_table[HIBYTE(a3)]; *(_QWORD *)(v7 + 8) = ""; *(_QWORD *)(v7 + 16) = 0LL; v11 = l_insert(v10, *(_QWORD *)(a1 + 168), v7, a4, 1LL); if ( v11 ) { v12 = v11; my_free(v7); v7 = v12; } v9 = 0; _InterlockedCompareExchange64(a2, v7, 0LL); } } return v9; }
initialize_bucket: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RBP + -0x40],RCX MOV R12D,EDX MOV qword ptr [RBP + -0x30],RSI MOV RBX,RDI MOV EAX,EDX SHR EAX,0x1 MOV ECX,EDX SHR ECX,0x2 OR ECX,EAX MOV EAX,ECX SHR EAX,0x2 OR EAX,ECX MOV ECX,EAX SHR ECX,0x4 OR ECX,EAX MOV EAX,ECX SHR EAX,0x8 OR EAX,ECX MOV R15D,EAX SHR R15D,0x10 OR R15D,EAX AND R15D,EDX LEA RAX,[0xd31024] MOV EDI,dword ptr [RAX] PUSH 0x20 POP RSI PUSH 0x10 POP RDX CALL 0x001bf321 MOV R13,RAX MOV qword ptr [RBP + -0x38],RBX MOV RDI,RBX MOV ESI,R15D CALL 0x00131a15 PUSH -0x1 POP R14 TEST RAX,RAX JZ 0x00131e55 TEST R13,R13 JZ 0x00131e55 MOV RBX,RAX TEST R12D,R12D JZ 0x00131dbd CMP qword ptr [RBX],0x0 JZ 0x00131e67 LAB_00131dbd: MOV EAX,0xff MOV ECX,R12D AND ECX,EAX LEA RDX,[0x206350] MOVZX ECX,byte ptr [RDX + RCX*0x1] SHL ECX,0x18 MOV ESI,R12D SHR ESI,0x8 AND ESI,EAX MOVZX ESI,byte ptr [RDX + RSI*0x1] SHL ESI,0x10 OR ESI,ECX MOV ECX,R12D SHR ECX,0x10 AND ECX,EAX MOVZX EAX,byte ptr [RDX + RCX*0x1] SHL EAX,0x8 OR EAX,ESI SHR R12D,0x18 MOVZX ECX,byte ptr [RDX + R12*0x1] OR ECX,EAX MOV dword ptr [R13 + 0x18],ECX LEA RAX,[0x1fc374] MOV qword ptr [R13 + 0x8],RAX AND qword ptr [R13 + 0x10],0x0 MOV RAX,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RAX + 0xa8] PUSH 0x1 POP R8 MOV RDI,RBX MOV RDX,R13 MOV RCX,qword ptr [RBP + -0x40] CALL 0x001c5d99 TEST RAX,RAX JZ 0x00131e47 MOV RBX,RAX MOV RDI,R13 CALL 0x001bf54e MOV R13,RBX LAB_00131e47: MOV RCX,qword ptr [RBP + -0x30] XOR R14D,R14D XOR EAX,EAX CMPXCHG.LOCK qword ptr [RCX],R13 LAB_00131e55: MOV EAX,R14D ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00131e67: MOV RDI,qword ptr [RBP + -0x38] MOV RSI,RBX MOV EDX,R15D MOV RCX,qword ptr [RBP + -0x40] CALL 0x00131d23 TEST EAX,EAX JZ 0x00131dbd MOV RDI,R13 CALL 0x001bf54e JMP 0x00131e55
/* initialize_bucket(st_lf_hash*, LF_SLIST**, unsigned int, LF_PINS*) */ int4 initialize_bucket(st_lf_hash *param_1,LF_SLIST **param_2,uint param_3,LF_PINS *param_4) { int iVar1; LF_SLIST *pLVar2; LF_SLIST **ppLVar3; LF_SLIST *pLVar4; uint uVar5; int4 uVar6; uVar5 = param_3 >> 2 | param_3 >> 1; uVar5 = uVar5 >> 2 | uVar5; uVar5 = uVar5 >> 4 | uVar5; uVar5 = uVar5 >> 8 | uVar5; uVar5 = (uVar5 >> 0x10 | uVar5) & param_3; pLVar2 = (LF_SLIST *)my_malloc(key_memory_lf_slist,0x20,0x10); ppLVar3 = (LF_SLIST **)lf_dynarray_lvalue(param_1,uVar5); uVar6 = 0xffffffff; if ((ppLVar3 != (LF_SLIST **)0x0) && (pLVar2 != (LF_SLIST *)0x0)) { if ((param_3 == 0) || ((*ppLVar3 != (LF_SLIST *)0x0 || (iVar1 = initialize_bucket(param_1,ppLVar3,uVar5,param_4), iVar1 == 0)))) { *(uint *)(pLVar2 + 0x18) = (uint)(byte)_my_bits_reverse_table[param_3 >> 0x18] | (uint)(byte)_my_bits_reverse_table[param_3 >> 0x10 & 0xff] << 8 | (uint)(byte)_my_bits_reverse_table[param_3 >> 8 & 0xff] << 0x10 | (uint)(byte)_my_bits_reverse_table[param_3 & 0xff] << 0x18; *(char **)(pLVar2 + 8) = ""; *(int8 *)(pLVar2 + 0x10) = 0; pLVar4 = (LF_SLIST *)l_insert(ppLVar3,*(charset_info_st **)(param_1 + 0xa8),pLVar2,param_4,1); if (pLVar4 != (LF_SLIST *)0x0) { my_free(pLVar2); pLVar2 = pLVar4; } uVar6 = 0; LOCK(); if (*param_2 == (LF_SLIST *)0x0) { *param_2 = pLVar2; } UNLOCK(); } else { my_free(pLVar2); } } return uVar6; }
19,252
my_mb_wc_utf8mb4_quick
eloqsql/strings/ctype-utf8.h
static inline int my_mb_wc_utf8mb4_quick(my_wc_t *pwc, const uchar *s, const uchar *e) { uchar c; if (s >= e) return MY_CS_TOOSMALL; c= s[0]; if (c < 0x80) { *pwc= c; return 1; } else if (c < 0xc2) return MY_CS_ILSEQ; else if (c < 0xe0) { if (s + 2 > e) /* We need 2 characters */ return MY_CS_TOOSMALL2; if (!(IS_CONTINUATION_BYTE(s[1]))) return MY_CS_ILSEQ; *pwc= UTF8MB2_CODE(c, s[1]); return 2; } else if (c < 0xf0) { if (s + 3 > e) /* We need 3 characters */ return MY_CS_TOOSMALL3; if (!IS_UTF8MB3_STEP2(c, s[1], s[2])) return MY_CS_ILSEQ; *pwc= UTF8MB3_CODE(c, s[1], s[2]); return 3; } else if (c < 0xf5) { if (s + 4 > e) /* We need 4 characters */ return MY_CS_TOOSMALL4; if (!IS_UTF8MB4_STEP2(c, s[1], s[2], s[3])) return MY_CS_ILSEQ; *pwc= UTF8MB4_CODE(c, s[1], s[2], s[3]); return 4; } return MY_CS_ILSEQ; }
O0
c
my_mb_wc_utf8mb4_quick: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jb 0x7dc06 movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x7de83 movq -0x18(%rbp), %rax movb (%rax), %al movb %al, -0x21(%rbp) movzbl -0x21(%rbp), %eax cmpl $0x80, %eax jge 0x7dc33 movzbl -0x21(%rbp), %eax movl %eax, %ecx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl $0x1, -0x4(%rbp) jmp 0x7de83 movzbl -0x21(%rbp), %eax cmpl $0xc2, %eax jge 0x7dc4a movl $0x0, -0x4(%rbp) jmp 0x7de83 movzbl -0x21(%rbp), %eax cmpl $0xe0, %eax jge 0x7dcc0 movq -0x18(%rbp), %rax addq $0x2, %rax cmpq -0x20(%rbp), %rax jbe 0x7dc6f movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x7de83 movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jl 0x7dc8d movl $0x0, -0x4(%rbp) jmp 0x7de83 movzbl -0x21(%rbp), %eax andl $0x1f, %eax movslq %eax, %rcx shlq $0x6, %rcx movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cltq orq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl $0x2, -0x4(%rbp) jmp 0x7de83 movzbl -0x21(%rbp), %eax cmpl $0xf0, %eax jge 0x7dd7c movq -0x18(%rbp), %rax addq $0x3, %rax cmpq -0x20(%rbp), %rax jbe 0x7dce9 movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99 jmp 0x7de83 movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x7dd27 movq -0x18(%rbp), %rax movzbl 0x2(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x7dd27 movzbl -0x21(%rbp), %eax cmpl $0xe1, %eax jge 0x7dd33 movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0xa0, %eax jge 0x7dd33 movl $0x0, -0x4(%rbp) jmp 0x7de83 movzbl -0x21(%rbp), %eax andl $0xf, %eax movslq %eax, %rcx shlq $0xc, %rcx movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cltq shlq $0x6, %rax orq %rax, %rcx movq -0x18(%rbp), %rax movzbl 0x2(%rax), %eax xorl $0x80, %eax cltq orq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl $0x3, -0x4(%rbp) jmp 0x7de83 movzbl -0x21(%rbp), %eax cmpl $0xf5, %eax jge 0x7de74 movq -0x18(%rbp), %rax addq $0x4, %rax cmpq -0x20(%rbp), %rax jbe 0x7dda5 movl $0xffffff98, -0x4(%rbp) # imm = 0xFFFFFF98 jmp 0x7de83 movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x7de0f movq -0x18(%rbp), %rax movzbl 0x2(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x7de0f movq -0x18(%rbp), %rax movzbl 0x3(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x7de0f movzbl -0x21(%rbp), %eax cmpl $0xf1, %eax jge 0x7ddf5 movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0x90, %eax jl 0x7de0f movzbl -0x21(%rbp), %eax cmpl $0xf3, %eax jle 0x7de18 movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0x8f, %eax jle 0x7de18 movl $0x0, -0x4(%rbp) jmp 0x7de83 movzbl -0x21(%rbp), %eax andl $0x7, %eax movslq %eax, %rcx shlq $0x12, %rcx movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cltq shlq $0xc, %rax orq %rax, %rcx movq -0x18(%rbp), %rax movzbl 0x2(%rax), %eax xorl $0x80, %eax cltq shlq $0x6, %rax orq %rax, %rcx movq -0x18(%rbp), %rax movzbl 0x3(%rax), %eax xorl $0x80, %eax cltq orq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl $0x4, -0x4(%rbp) jmp 0x7de83 jmp 0x7de76 jmp 0x7de78 jmp 0x7de7a jmp 0x7de7c movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax,%rax)
my_mb_wc_utf8mb4_quick_0: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jb short loc_7DC06 mov [rbp+var_4], 0FFFFFF9Bh jmp loc_7DE83 loc_7DC06: mov rax, [rbp+var_18] mov al, [rax] mov [rbp+var_21], al movzx eax, [rbp+var_21] cmp eax, 80h jge short loc_7DC33 movzx eax, [rbp+var_21] mov ecx, eax mov rax, [rbp+var_10] mov [rax], rcx mov [rbp+var_4], 1 jmp loc_7DE83 loc_7DC33: movzx eax, [rbp+var_21] cmp eax, 0C2h jge short loc_7DC4A mov [rbp+var_4], 0 jmp loc_7DE83 loc_7DC4A: movzx eax, [rbp+var_21] cmp eax, 0E0h jge short loc_7DCC0 mov rax, [rbp+var_18] add rax, 2 cmp rax, [rbp+var_20] jbe short loc_7DC6F mov [rbp+var_4], 0FFFFFF9Ah jmp loc_7DE83 loc_7DC6F: mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] xor eax, 80h cmp eax, 40h ; '@' jl short loc_7DC8D mov [rbp+var_4], 0 jmp loc_7DE83 loc_7DC8D: movzx eax, [rbp+var_21] and eax, 1Fh movsxd rcx, eax shl rcx, 6 mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] xor eax, 80h cdqe or rcx, rax mov rax, [rbp+var_10] mov [rax], rcx mov [rbp+var_4], 2 jmp loc_7DE83 loc_7DCC0: movzx eax, [rbp+var_21] cmp eax, 0F0h jge loc_7DD7C mov rax, [rbp+var_18] add rax, 3 cmp rax, [rbp+var_20] jbe short loc_7DCE9 mov [rbp+var_4], 0FFFFFF99h jmp loc_7DE83 loc_7DCE9: mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] xor eax, 80h cmp eax, 40h ; '@' jge short loc_7DD27 mov rax, [rbp+var_18] movzx eax, byte ptr [rax+2] xor eax, 80h cmp eax, 40h ; '@' jge short loc_7DD27 movzx eax, [rbp+var_21] cmp eax, 0E1h jge short loc_7DD33 mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] cmp eax, 0A0h jge short loc_7DD33 loc_7DD27: mov [rbp+var_4], 0 jmp loc_7DE83 loc_7DD33: movzx eax, [rbp+var_21] and eax, 0Fh movsxd rcx, eax shl rcx, 0Ch mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] xor eax, 80h cdqe shl rax, 6 or rcx, rax mov rax, [rbp+var_18] movzx eax, byte ptr [rax+2] xor eax, 80h cdqe or rcx, rax mov rax, [rbp+var_10] mov [rax], rcx mov [rbp+var_4], 3 jmp loc_7DE83 loc_7DD7C: movzx eax, [rbp+var_21] cmp eax, 0F5h jge loc_7DE74 mov rax, [rbp+var_18] add rax, 4 cmp rax, [rbp+var_20] jbe short loc_7DDA5 mov [rbp+var_4], 0FFFFFF98h jmp loc_7DE83 loc_7DDA5: mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] xor eax, 80h cmp eax, 40h ; '@' jge short loc_7DE0F mov rax, [rbp+var_18] movzx eax, byte ptr [rax+2] xor eax, 80h cmp eax, 40h ; '@' jge short loc_7DE0F mov rax, [rbp+var_18] movzx eax, byte ptr [rax+3] xor eax, 80h cmp eax, 40h ; '@' jge short loc_7DE0F movzx eax, [rbp+var_21] cmp eax, 0F1h jge short loc_7DDF5 mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] cmp eax, 90h jl short loc_7DE0F loc_7DDF5: movzx eax, [rbp+var_21] cmp eax, 0F3h jle short loc_7DE18 mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] cmp eax, 8Fh jle short loc_7DE18 loc_7DE0F: mov [rbp+var_4], 0 jmp short loc_7DE83 loc_7DE18: movzx eax, [rbp+var_21] and eax, 7 movsxd rcx, eax shl rcx, 12h mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] xor eax, 80h cdqe shl rax, 0Ch or rcx, rax mov rax, [rbp+var_18] movzx eax, byte ptr [rax+2] xor eax, 80h cdqe shl rax, 6 or rcx, rax mov rax, [rbp+var_18] movzx eax, byte ptr [rax+3] xor eax, 80h cdqe or rcx, rax mov rax, [rbp+var_10] mov [rax], rcx mov [rbp+var_4], 4 jmp short loc_7DE83 loc_7DE74: jmp short $+2 loc_7DE76: jmp short $+2 loc_7DE78: jmp short $+2 loc_7DE7A: jmp short $+2 loc_7DE7C: mov [rbp+var_4], 0 loc_7DE83: mov eax, [rbp+var_4] pop rbp retn
long long my_mb_wc_utf8mb4_quick_0(unsigned long long *a1, unsigned __int8 *a2, unsigned long long a3) { unsigned __int8 v4; // [rsp+1h] [rbp-21h] if ( (unsigned long long)a2 < a3 ) { v4 = *a2; if ( *a2 >= 0x80u ) { if ( v4 >= 0xC2u ) { if ( v4 >= 0xE0u ) { if ( v4 >= 0xF0u ) { if ( v4 >= 0xF5u ) { return 0; } else if ( (unsigned long long)(a2 + 4) <= a3 ) { if ( (a2[1] ^ 0x80) < 64 && (a2[2] ^ 0x80) < 64 && (a2[3] ^ 0x80) < 64 && (v4 >= 0xF1u || a2[1] >= 0x90u) && (v4 <= 0xF3u || a2[1] <= 0x8Fu) ) { *a1 = a2[3] ^ 0x80u | ((long long)(a2[2] ^ 0x80u) << 6) | ((long long)(a2[1] ^ 0x80u) << 12) | ((unsigned long long)(v4 & 7) << 18); return 4; } else { return 0; } } else { return (unsigned int)-104; } } else if ( (unsigned long long)(a2 + 3) <= a3 ) { if ( (a2[1] ^ 0x80) < 64 && (a2[2] ^ 0x80) < 64 && (v4 >= 0xE1u || a2[1] >= 0xA0u) ) { *a1 = a2[2] ^ 0x80u | ((long long)(a2[1] ^ 0x80u) << 6) | ((unsigned long long)(v4 & 0xF) << 12); return 3; } else { return 0; } } else { return (unsigned int)-103; } } else if ( (unsigned long long)(a2 + 2) <= a3 ) { if ( (a2[1] ^ 0x80) < 64 ) { *a1 = a2[1] ^ 0x80u | ((unsigned long long)(v4 & 0x1F) << 6); return 2; } else { return 0; } } else { return (unsigned int)-102; } } else { return 0; } } else { *a1 = v4; return 1; } } else { return (unsigned int)-101; } }
my_mb_wc_utf8mb4_quick: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JC 0x0017dc06 MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x0017de83 LAB_0017dc06: MOV RAX,qword ptr [RBP + -0x18] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x21],AL MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0x80 JGE 0x0017dc33 MOVZX EAX,byte ptr [RBP + -0x21] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x1 JMP 0x0017de83 LAB_0017dc33: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xc2 JGE 0x0017dc4a MOV dword ptr [RBP + -0x4],0x0 JMP 0x0017de83 LAB_0017dc4a: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xe0 JGE 0x0017dcc0 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x20] JBE 0x0017dc6f MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x0017de83 LAB_0017dc6f: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CMP EAX,0x40 JL 0x0017dc8d MOV dword ptr [RBP + -0x4],0x0 JMP 0x0017de83 LAB_0017dc8d: MOVZX EAX,byte ptr [RBP + -0x21] AND EAX,0x1f MOVSXD RCX,EAX SHL RCX,0x6 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CDQE OR RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x2 JMP 0x0017de83 LAB_0017dcc0: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xf0 JGE 0x0017dd7c MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x3 CMP RAX,qword ptr [RBP + -0x20] JBE 0x0017dce9 MOV dword ptr [RBP + -0x4],0xffffff99 JMP 0x0017de83 LAB_0017dce9: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CMP EAX,0x40 JGE 0x0017dd27 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x2] XOR EAX,0x80 CMP EAX,0x40 JGE 0x0017dd27 MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xe1 JGE 0x0017dd33 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0xa0 JGE 0x0017dd33 LAB_0017dd27: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0017de83 LAB_0017dd33: MOVZX EAX,byte ptr [RBP + -0x21] AND EAX,0xf MOVSXD RCX,EAX SHL RCX,0xc MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CDQE SHL RAX,0x6 OR RCX,RAX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x2] XOR EAX,0x80 CDQE OR RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x3 JMP 0x0017de83 LAB_0017dd7c: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xf5 JGE 0x0017de74 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x4 CMP RAX,qword ptr [RBP + -0x20] JBE 0x0017dda5 MOV dword ptr [RBP + -0x4],0xffffff98 JMP 0x0017de83 LAB_0017dda5: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CMP EAX,0x40 JGE 0x0017de0f MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x2] XOR EAX,0x80 CMP EAX,0x40 JGE 0x0017de0f MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x3] XOR EAX,0x80 CMP EAX,0x40 JGE 0x0017de0f MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xf1 JGE 0x0017ddf5 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x90 JL 0x0017de0f LAB_0017ddf5: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xf3 JLE 0x0017de18 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x8f JLE 0x0017de18 LAB_0017de0f: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0017de83 LAB_0017de18: MOVZX EAX,byte ptr [RBP + -0x21] AND EAX,0x7 MOVSXD RCX,EAX SHL RCX,0x12 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CDQE SHL RAX,0xc OR RCX,RAX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x2] XOR EAX,0x80 CDQE SHL RAX,0x6 OR RCX,RAX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x3] XOR EAX,0x80 CDQE OR RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x4 JMP 0x0017de83 LAB_0017de74: JMP 0x0017de76 LAB_0017de76: JMP 0x0017de78 LAB_0017de78: JMP 0x0017de7a LAB_0017de7a: JMP 0x0017de7c LAB_0017de7c: MOV dword ptr [RBP + -0x4],0x0 LAB_0017de83: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_mb_wc_utf8mb4_quick(ulong *param_1,byte *param_2,byte *param_3) { byte bVar1; int4 local_c; if (param_2 < param_3) { bVar1 = *param_2; if (bVar1 < 0x80) { *param_1 = (ulong)bVar1; local_c = 1; } else if (bVar1 < 0xc2) { local_c = 0; } else if (bVar1 < 0xe0) { if (param_3 < param_2 + 2) { local_c = 0xffffff9a; } else if ((param_2[1] ^ 0x80) < 0x40) { *param_1 = (long)(int)(bVar1 & 0x1f) << 6 | (long)(int)(param_2[1] ^ 0x80); local_c = 2; } else { local_c = 0; } } else if (bVar1 < 0xf0) { if (param_3 < param_2 + 3) { local_c = 0xffffff99; } else if ((((param_2[1] ^ 0x80) < 0x40) && ((param_2[2] ^ 0x80) < 0x40)) && ((0xe0 < bVar1 || (0x9f < param_2[1])))) { *param_1 = (long)(int)(bVar1 & 0xf) << 0xc | (long)(int)(param_2[1] ^ 0x80) << 6 | (long)(int)(param_2[2] ^ 0x80); local_c = 3; } else { local_c = 0; } } else if (bVar1 < 0xf5) { if (param_3 < param_2 + 4) { local_c = 0xffffff98; } else if ((((((param_2[1] ^ 0x80) < 0x40) && ((param_2[2] ^ 0x80) < 0x40)) && ((param_2[3] ^ 0x80) < 0x40)) && ((0xf0 < bVar1 || (0x8f < param_2[1])))) && ((bVar1 < 0xf4 || (param_2[1] < 0x90)))) { *param_1 = (long)(int)(bVar1 & 7) << 0x12 | (long)(int)(param_2[1] ^ 0x80) << 0xc | (long)(int)(param_2[2] ^ 0x80) << 6 | (long)(int)(param_2[3] ^ 0x80); local_c = 4; } else { local_c = 0; } } else { local_c = 0; } } else { local_c = 0xffffff9b; } return local_c; }
19,253
string_parse_kv_override(char const*, std::vector<llama_model_kv_override, std::allocator<llama_model_kv_override>>&)
monkey531[P]llama/common/common.cpp
bool string_parse_kv_override(const char * data, std::vector<llama_model_kv_override> & overrides) { const char * sep = strchr(data, '='); if (sep == nullptr || sep - data >= 128) { LOG_ERR("%s: malformed KV override '%s'\n", __func__, data); return false; } llama_model_kv_override kvo; std::strncpy(kvo.key, data, sep - data); kvo.key[sep - data] = 0; sep++; if (strncmp(sep, "int:", 4) == 0) { sep += 4; kvo.tag = LLAMA_KV_OVERRIDE_TYPE_INT; kvo.val_i64 = std::atol(sep); } else if (strncmp(sep, "float:", 6) == 0) { sep += 6; kvo.tag = LLAMA_KV_OVERRIDE_TYPE_FLOAT; kvo.val_f64 = std::atof(sep); } else if (strncmp(sep, "bool:", 5) == 0) { sep += 5; kvo.tag = LLAMA_KV_OVERRIDE_TYPE_BOOL; if (std::strcmp(sep, "true") == 0) { kvo.val_bool = true; } else if (std::strcmp(sep, "false") == 0) { kvo.val_bool = false; } else { LOG_ERR("%s: invalid boolean value for KV override '%s'\n", __func__, data); return false; } } else if (strncmp(sep, "str:", 4) == 0) { sep += 4; kvo.tag = LLAMA_KV_OVERRIDE_TYPE_STR; if (strlen(sep) > 127) { LOG_ERR("%s: malformed KV override '%s', value cannot exceed 127 chars\n", __func__, data); return false; } strncpy(kvo.val_str, sep, 127); kvo.val_str[127] = '\0'; } else { LOG_ERR("%s: invalid type for KV override '%s'\n", __func__, data); return false; } overrides.emplace_back(std::move(kvo)); return true; }
O2
cpp
string_parse_kv_override(char const*, std::vector<llama_model_kv_override, std::allocator<llama_model_kv_override>>&): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x110, %rsp # imm = 0x110 movq %rsi, %r14 movq %rdi, %rbx pushq $0x3d popq %rsi callq 0x24300 testq %rax, %rax je 0x55393 movq %rax, %r15 movq %rax, %r12 subq %rbx, %r12 cmpq $0x80, %r12 jl 0x553cd leaq 0xad0ae(%rip), %rax # 0x102448 cmpl $0x0, (%rax) js 0x55545 callq 0x970d6 leaq 0x5f7b7(%rip), %rdx # 0xb4b66 leaq 0x5f7d0(%rip), %rcx # 0xb4b86 xorl %ebp, %ebp pushq $0x4 popq %rsi movq %rax, %rdi movq %rbx, %r8 xorl %eax, %eax callq 0x9716e jmp 0x55547 leaq 0xc(%rsp), %rdi movq %rbx, %rsi movq %r12, %rdx callq 0x24480 movb $0x0, 0xc(%rsp,%r12) leaq 0x1(%r15), %r12 leaq 0x5f7b1(%rip), %rsi # 0xb4b9f pushq $0x4 popq %rdx movq %r12, %rdi callq 0x24440 testl %eax, %eax je 0x55468 leaq 0x5f7a0(%rip), %rsi # 0xb4ba4 pushq $0x6 popq %rdx movq %r12, %rdi callq 0x24440 testl %eax, %eax je 0x55483 leaq 0x5f791(%rip), %rsi # 0xb4bab pushq $0x5 popq %rdx movq %r12, %rdi callq 0x24440 testl %eax, %eax je 0x554b5 leaq 0x5f7ad(%rip), %rsi # 0xb4be1 pushq $0x4 popq %rdx movq %r12, %rdi callq 0x24440 testl %eax, %eax je 0x5550c leaq 0xacffa(%rip), %rax # 0x102448 cmpl $0x0, (%rax) js 0x55545 callq 0x970d6 leaq 0x5f7c2(%rip), %rdx # 0xb4c25 jmp 0x553af addq $0x5, %r15 andl $0x0, 0x8(%rsp) movq %r15, %rdi callq 0x24a50 movq %rax, 0x90(%rsp) jmp 0x554a0 addq $0x7, %r15 movl $0x1, 0x8(%rsp) movq %r15, %rdi callq 0x24ab0 movsd %xmm0, 0x90(%rsp) leaq 0x8(%rsp), %rsi movq %r14, %rdi callq 0x59390 movb $0x1, %bpl jmp 0x55547 addq $0x6, %r15 movl $0x2, 0x8(%rsp) leaq 0x57582(%rip), %rsi # 0xaca4a movq %r15, %rdi callq 0x24c40 testl %eax, %eax je 0x55559 leaq 0x5a254(%rip), %rsi # 0xaf733 movq %r15, %rdi callq 0x24c40 testl %eax, %eax je 0x55585 leaq 0xacf52(%rip), %rax # 0x102448 cmpl $0x0, (%rax) js 0x55545 callq 0x970d6 leaq 0x5f6aa(%rip), %rdx # 0xb4bb1 jmp 0x553af addq $0x5, %r15 movl $0x3, 0x8(%rsp) movq %r15, %rdi callq 0x243e0 cmpq $0x80, %rax jb 0x55566 leaq 0xacf19(%rip), %rax # 0x102448 cmpl $0x0, (%rax) js 0x55545 callq 0x970d6 leaq 0x5f6a6(%rip), %rdx # 0xb4be6 jmp 0x553af xorl %ebp, %ebp movl %ebp, %eax addq $0x110, %rsp # imm = 0x110 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movb $0x1, 0x90(%rsp) jmp 0x554a0 leaq 0x90(%rsp), %rbx pushq $0x7f popq %rdx movq %rbx, %rdi movq %r15, %rsi callq 0x24480 movb $0x0, 0x7f(%rbx) jmp 0x554a0 movb $0x0, 0x90(%rsp) jmp 0x554a0
_Z24string_parse_kv_overridePKcRSt6vectorI23llama_model_kv_overrideSaIS2_EE: push rbp push r15 push r14 push r12 push rbx sub rsp, 110h mov r14, rsi mov rbx, rdi push 3Dh ; '=' pop rsi call _strchr test rax, rax jz short loc_55393 mov r15, rax mov r12, rax sub r12, rbx cmp r12, 80h jl short loc_553CD loc_55393: lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js loc_55545 call _Z15common_log_mainv; common_log_main(void) lea rdx, aSMalformedKvOv; "%s: malformed KV override '%s'\n" loc_553AF: lea rcx, aStringParseKvO; "string_parse_kv_override" xor ebp, ebp push 4 pop rsi mov rdi, rax mov r8, rbx xor eax, eax call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) jmp loc_55547 loc_553CD: lea rdi, [rsp+138h+var_12C] mov rsi, rbx mov rdx, r12 call _strncpy mov [rsp+r12+138h+var_12C], 0 lea r12, [r15+1] lea rsi, aInt; "int:" push 4 pop rdx mov rdi, r12 call _strncmp test eax, eax jz short loc_55468 lea rsi, aFloat; "float:" push 6 pop rdx mov rdi, r12 call _strncmp test eax, eax jz short loc_55483 lea rsi, aBool; "bool:" push 5 pop rdx mov rdi, r12 call _strncmp test eax, eax jz loc_554B5 lea rsi, aStr; "str:" push 4 pop rdx mov rdi, r12 call _strncmp test eax, eax jz loc_5550C lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js loc_55545 call _Z15common_log_mainv; common_log_main(void) lea rdx, aSInvalidTypeFo; "%s: invalid type for KV override '%s'\n" jmp loc_553AF loc_55468: add r15, 5 and [rsp+138h+var_130], 0 mov rdi, r15 call _atol mov [rsp+138h+var_A8], rax jmp short loc_554A0 loc_55483: add r15, 7 mov [rsp+138h+var_130], 1 mov rdi, r15 call _atof movsd [rsp+138h+var_A8], xmm0 loc_554A0: lea rsi, [rsp+138h+var_130] mov rdi, r14 call _ZNSt6vectorI23llama_model_kv_overrideSaIS0_EE12emplace_backIJS0_EEERS0_DpOT_; std::vector<llama_model_kv_override>::emplace_back<llama_model_kv_override>(llama_model_kv_override &&) mov bpl, 1 jmp loc_55547 loc_554B5: add r15, 6 mov [rsp+138h+var_130], 2 lea rsi, aTrue; "true" mov rdi, r15 call _strcmp test eax, eax jz loc_55559 lea rsi, aAdvancedOption+0ABh; "false" mov rdi, r15 call _strcmp test eax, eax jz loc_55585 lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js short loc_55545 call _Z15common_log_mainv; common_log_main(void) lea rdx, aSInvalidBoolea; "%s: invalid boolean value for KV overri"... jmp loc_553AF loc_5550C: add r15, 5 mov [rsp+138h+var_130], 3 mov rdi, r15 call _strlen cmp rax, 80h jb short loc_55566 lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js short loc_55545 call _Z15common_log_mainv; common_log_main(void) lea rdx, aSMalformedKvOv_0; "%s: malformed KV override '%s', value c"... jmp loc_553AF loc_55545: xor ebp, ebp loc_55547: mov eax, ebp add rsp, 110h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_55559: mov byte ptr [rsp+138h+var_A8], 1 jmp loc_554A0 loc_55566: lea rbx, [rsp+138h+var_A8] push 7Fh pop rdx mov rdi, rbx mov rsi, r15 call _strncpy mov byte ptr [rbx+7Fh], 0 jmp loc_554A0 loc_55585: mov byte ptr [rsp+138h+var_A8], 0 jmp loc_554A0
long long string_parse_kv_override(long long a1, long long a2) { unsigned int v2; // ebp long long v3; // rax long long v4; // r15 long long v5; // r12 int v6; // eax int v7; // r9d const char *v8; // rdx long long v9; // r15 long long v10; // r15 int v12; // [rsp+8h] [rbp-130h] BYREF _BYTE v13[132]; // [rsp+Ch] [rbp-12Ch] BYREF long long v14[15]; // [rsp+90h] [rbp-A8h] BYREF char v15; // [rsp+10Fh] [rbp-29h] v3 = strchr(a1, 61LL); if ( v3 ) { v4 = v3; v5 = v3 - a1; if ( v3 - a1 < 128 ) { strncpy(v13, a1, v3 - a1); v13[v5] = 0; if ( !(unsigned int)strncmp(v4 + 1, "int:", 4LL) ) { v12 = 0; v14[0] = atol(v4 + 5); } else if ( !(unsigned int)strncmp(v4 + 1, "float:", 6LL) ) { v12 = 1; v14[0] = atof(v4 + 7); } else if ( !(unsigned int)strncmp(v4 + 1, "bool:", 5LL) ) { v9 = v4 + 6; v12 = 2; if ( !(unsigned int)strcmp(v9) ) { LOBYTE(v14[0]) = 1; } else { if ( (unsigned int)strcmp(v9) ) { if ( common_log_verbosity_thold >= 0 ) { v6 = common_log_main(); v8 = "%s: invalid boolean value for KV override '%s'\n"; goto LABEL_5; } return 0; } LOBYTE(v14[0]) = 0; } } else { if ( (unsigned int)strncmp(v4 + 1, "str:", 4LL) ) { if ( common_log_verbosity_thold >= 0 ) { v6 = common_log_main(); v8 = "%s: invalid type for KV override '%s'\n"; goto LABEL_5; } return 0; } v10 = v4 + 5; v12 = 3; if ( (unsigned long long)strlen(v10) >= 0x80 ) { if ( common_log_verbosity_thold >= 0 ) { v6 = common_log_main(); v8 = "%s: malformed KV override '%s', value cannot exceed 127 chars\n"; goto LABEL_5; } return 0; } strncpy(v14, v10, 127LL); v15 = 0; } std::vector<llama_model_kv_override>::emplace_back<llama_model_kv_override>(a2, &v12); LOBYTE(v2) = 1; return v2; } } if ( common_log_verbosity_thold < 0 ) return 0; v6 = common_log_main(); v8 = "%s: malformed KV override '%s'\n"; LABEL_5: v2 = 0; common_log_add(v6, 4, (_DWORD)v8, (unsigned int)"string_parse_kv_override", a1, v7); return v2; }
string_parse_kv_override: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x110 MOV R14,RSI MOV RBX,RDI PUSH 0x3d POP RSI CALL 0x00124300 TEST RAX,RAX JZ 0x00155393 MOV R15,RAX MOV R12,RAX SUB R12,RBX CMP R12,0x80 JL 0x001553cd LAB_00155393: LEA RAX,[0x202448] CMP dword ptr [RAX],0x0 JS 0x00155545 CALL 0x001970d6 LEA RDX,[0x1b4b66] LAB_001553af: LEA RCX,[0x1b4b86] XOR EBP,EBP PUSH 0x4 POP RSI MOV RDI,RAX MOV R8,RBX XOR EAX,EAX CALL 0x0019716e JMP 0x00155547 LAB_001553cd: LEA RDI,[RSP + 0xc] MOV RSI,RBX MOV RDX,R12 CALL 0x00124480 MOV byte ptr [RSP + R12*0x1 + 0xc],0x0 LEA R12,[R15 + 0x1] LEA RSI,[0x1b4b9f] PUSH 0x4 POP RDX MOV RDI,R12 CALL 0x00124440 TEST EAX,EAX JZ 0x00155468 LEA RSI,[0x1b4ba4] PUSH 0x6 POP RDX MOV RDI,R12 CALL 0x00124440 TEST EAX,EAX JZ 0x00155483 LEA RSI,[0x1b4bab] PUSH 0x5 POP RDX MOV RDI,R12 CALL 0x00124440 TEST EAX,EAX JZ 0x001554b5 LEA RSI,[0x1b4be1] PUSH 0x4 POP RDX MOV RDI,R12 CALL 0x00124440 TEST EAX,EAX JZ 0x0015550c LEA RAX,[0x202448] CMP dword ptr [RAX],0x0 JS 0x00155545 CALL 0x001970d6 LEA RDX,[0x1b4c25] JMP 0x001553af LAB_00155468: ADD R15,0x5 AND dword ptr [RSP + 0x8],0x0 MOV RDI,R15 CALL 0x00124a50 MOV qword ptr [RSP + 0x90],RAX JMP 0x001554a0 LAB_00155483: ADD R15,0x7 MOV dword ptr [RSP + 0x8],0x1 MOV RDI,R15 CALL 0x00124ab0 MOVSD qword ptr [RSP + 0x90],XMM0 LAB_001554a0: LEA RSI,[RSP + 0x8] MOV RDI,R14 CALL 0x00159390 MOV BPL,0x1 JMP 0x00155547 LAB_001554b5: ADD R15,0x6 MOV dword ptr [RSP + 0x8],0x2 LEA RSI,[0x1aca4a] MOV RDI,R15 CALL 0x00124c40 TEST EAX,EAX JZ 0x00155559 LEA RSI,[0x1af733] MOV RDI,R15 CALL 0x00124c40 TEST EAX,EAX JZ 0x00155585 LEA RAX,[0x202448] CMP dword ptr [RAX],0x0 JS 0x00155545 CALL 0x001970d6 LEA RDX,[0x1b4bb1] JMP 0x001553af LAB_0015550c: ADD R15,0x5 MOV dword ptr [RSP + 0x8],0x3 MOV RDI,R15 CALL 0x001243e0 CMP RAX,0x80 JC 0x00155566 LEA RAX,[0x202448] CMP dword ptr [RAX],0x0 JS 0x00155545 CALL 0x001970d6 LEA RDX,[0x1b4be6] JMP 0x001553af LAB_00155545: XOR EBP,EBP LAB_00155547: MOV EAX,EBP ADD RSP,0x110 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00155559: MOV byte ptr [RSP + 0x90],0x1 JMP 0x001554a0 LAB_00155566: LEA RBX,[RSP + 0x90] PUSH 0x7f POP RDX MOV RDI,RBX MOV RSI,R15 CALL 0x00124480 MOV byte ptr [RBX + 0x7f],0x0 JMP 0x001554a0 LAB_00155585: MOV byte ptr [RSP + 0x90],0x0 JMP 0x001554a0
/* string_parse_kv_override(char const*, std::vector<llama_model_kv_override, std::allocator<llama_model_kv_override> >&) */ ulong string_parse_kv_override(char *param_1,vector *param_2) { char *__s1; int iVar1; char *pcVar2; int8 uVar3; int8 unaff_RBP; ulong uVar4; size_t sVar5; int4 local_130; char local_12c [132]; double local_a8 [15]; int1 local_29; pcVar2 = strchr(param_1,0x3d); if ((pcVar2 == (char *)0x0) || (sVar5 = (long)pcVar2 - (long)param_1, 0x7f < (long)sVar5)) { if (common_log_verbosity_thold < 0) goto LAB_00155545; uVar3 = common_log_main(); pcVar2 = "%s: malformed KV override \'%s\'\n"; goto LAB_001553af; } strncpy(local_12c,param_1,sVar5); local_12c[sVar5] = '\0'; __s1 = pcVar2 + 1; iVar1 = strncmp(__s1,"int:",4); if (iVar1 == 0) { local_130 = 0; local_a8[0] = (double)atol(pcVar2 + 5); } else { iVar1 = strncmp(__s1,"float:",6); if (iVar1 == 0) { local_130 = 1; local_a8[0] = atof(pcVar2 + 7); } else { iVar1 = strncmp(__s1,"bool:",5); if (iVar1 != 0) { iVar1 = strncmp(__s1,"str:",4); if (iVar1 == 0) { local_130 = 3; sVar5 = strlen(pcVar2 + 5); if (sVar5 < 0x80) { strncpy((char *)local_a8,pcVar2 + 5,0x7f); local_29 = 0; goto LAB_001554a0; } if (common_log_verbosity_thold < 0) goto LAB_00155545; uVar3 = common_log_main(); pcVar2 = "%s: malformed KV override \'%s\', value cannot exceed 127 chars\n"; } else { if (common_log_verbosity_thold < 0) { LAB_00155545: uVar4 = 0; goto LAB_00155547; } uVar3 = common_log_main(); pcVar2 = "%s: invalid type for KV override \'%s\'\n"; } LAB_001553af: uVar4 = 0; common_log_add(uVar3,4,pcVar2,"string_parse_kv_override",param_1); goto LAB_00155547; } local_130 = 2; iVar1 = strcmp(pcVar2 + 6,"true"); if (iVar1 == 0) { local_a8[0] = (double)CONCAT71(local_a8[0]._1_7_,1); } else { iVar1 = strcmp(pcVar2 + 6,"false"); if (iVar1 != 0) { if (common_log_verbosity_thold < 0) goto LAB_00155545; uVar3 = common_log_main(); pcVar2 = "%s: invalid boolean value for KV override \'%s\'\n"; goto LAB_001553af; } local_a8[0] = (double)((ulong)local_a8[0] & 0xffffffffffffff00); } } } LAB_001554a0: std::vector<llama_model_kv_override,std::allocator<llama_model_kv_override>>:: emplace_back<llama_model_kv_override> ((vector<llama_model_kv_override,std::allocator<llama_model_kv_override>> *)param_2, (llama_model_kv_override *)&local_130); uVar4 = CONCAT71((int7)((ulong)unaff_RBP >> 8),1); LAB_00155547: return uVar4 & 0xffffffff; }
19,254
string_parse_kv_override(char const*, std::vector<llama_model_kv_override, std::allocator<llama_model_kv_override>>&)
monkey531[P]llama/common/common.cpp
bool string_parse_kv_override(const char * data, std::vector<llama_model_kv_override> & overrides) { const char * sep = strchr(data, '='); if (sep == nullptr || sep - data >= 128) { LOG_ERR("%s: malformed KV override '%s'\n", __func__, data); return false; } llama_model_kv_override kvo; std::strncpy(kvo.key, data, sep - data); kvo.key[sep - data] = 0; sep++; if (strncmp(sep, "int:", 4) == 0) { sep += 4; kvo.tag = LLAMA_KV_OVERRIDE_TYPE_INT; kvo.val_i64 = std::atol(sep); } else if (strncmp(sep, "float:", 6) == 0) { sep += 6; kvo.tag = LLAMA_KV_OVERRIDE_TYPE_FLOAT; kvo.val_f64 = std::atof(sep); } else if (strncmp(sep, "bool:", 5) == 0) { sep += 5; kvo.tag = LLAMA_KV_OVERRIDE_TYPE_BOOL; if (std::strcmp(sep, "true") == 0) { kvo.val_bool = true; } else if (std::strcmp(sep, "false") == 0) { kvo.val_bool = false; } else { LOG_ERR("%s: invalid boolean value for KV override '%s'\n", __func__, data); return false; } } else if (strncmp(sep, "str:", 4) == 0) { sep += 4; kvo.tag = LLAMA_KV_OVERRIDE_TYPE_STR; if (strlen(sep) > 127) { LOG_ERR("%s: malformed KV override '%s', value cannot exceed 127 chars\n", __func__, data); return false; } strncpy(kvo.val_str, sep, 127); kvo.val_str[127] = '\0'; } else { LOG_ERR("%s: invalid type for KV override '%s'\n", __func__, data); return false; } overrides.emplace_back(std::move(kvo)); return true; }
O3
cpp
string_parse_kv_override(char const*, std::vector<llama_model_kv_override, std::allocator<llama_model_kv_override>>&): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x110, %rsp # imm = 0x110 movq %rsi, %r14 movq %rdi, %rbx movl $0x3d, %esi callq 0x1b300 testq %rax, %rax je 0x73d64 movq %rax, %r15 movq %rax, %r12 subq %rbx, %r12 cmpq $0x80, %r12 jl 0x73da0 leaq 0xbb6bd(%rip), %rax # 0x12f428 cmpl $0x0, (%rax) js 0x73f4c callq 0xcc4d7 leaq 0x7cdf6(%rip), %rdx # 0xf0b76 leaq 0x7ce0f(%rip), %rcx # 0xf0b96 xorl %ebp, %ebp movq %rax, %rdi movl $0x4, %esi movq %rbx, %r8 xorl %eax, %eax callq 0xcc574 jmp 0x73f4e leaq 0xc(%rsp), %rdi movq %rbx, %rsi movq %r12, %rdx callq 0x1b460 movb $0x0, 0xc(%rsp,%r12) leaq 0x1(%r15), %r12 leaq 0x7cdee(%rip), %rsi # 0xf0baf movl $0x4, %edx movq %r12, %rdi callq 0x1b430 testl %eax, %eax je 0x73e43 leaq 0x7cddb(%rip), %rsi # 0xf0bb4 movl $0x6, %edx movq %r12, %rdi callq 0x1b430 testl %eax, %eax je 0x73e61 leaq 0x7cdca(%rip), %rsi # 0xf0bbb movl $0x5, %edx movq %r12, %rdi callq 0x1b430 testl %eax, %eax je 0x73ebc leaq 0x7cde4(%rip), %rsi # 0xf0bf1 movl $0x4, %edx movq %r12, %rdi callq 0x1b430 testl %eax, %eax je 0x73f13 leaq 0xbb5ff(%rip), %rax # 0x12f428 cmpl $0x0, (%rax) js 0x73f4c callq 0xcc4d7 leaq 0x7cdf7(%rip), %rdx # 0xf0c35 jmp 0x73d80 addq $0x5, %r15 movl $0x0, 0x8(%rsp) movq %r15, %rdi callq 0x1ba30 movq %rax, 0x90(%rsp) jmp 0x73e7e addq $0x7, %r15 movl $0x1, 0x8(%rsp) movq %r15, %rdi callq 0x1ba90 movsd %xmm0, 0x90(%rsp) movq 0x8(%r14), %rax cmpq 0x10(%r14), %rax je 0x73ea4 leaq 0x8(%rsp), %rsi movl $0x108, %edx # imm = 0x108 movq %rax, %rdi callq 0x1b720 addq $0x108, 0x8(%r14) # imm = 0x108 jmp 0x73eb4 leaq 0x8(%rsp), %rdx movq %r14, %rdi movq %rax, %rsi callq 0xb977a movb $0x1, %bpl jmp 0x73f4e addq $0x6, %r15 movl $0x2, 0x8(%rsp) leaq 0x74b7b(%rip), %rsi # 0xe8a4a movq %r15, %rdi callq 0x1bc20 testl %eax, %eax je 0x73f60 leaq 0x7784d(%rip), %rsi # 0xeb733 movq %r15, %rdi callq 0x1bc20 testl %eax, %eax je 0x73f8e leaq 0xbb52b(%rip), %rax # 0x12f428 cmpl $0x0, (%rax) js 0x73f4c callq 0xcc4d7 leaq 0x7ccb3(%rip), %rdx # 0xf0bc1 jmp 0x73d80 addq $0x5, %r15 movl $0x3, 0x8(%rsp) movq %r15, %rdi callq 0x1b3e0 cmpq $0x80, %rax jb 0x73f6d leaq 0xbb4f2(%rip), %rax # 0x12f428 cmpl $0x0, (%rax) js 0x73f4c callq 0xcc4d7 leaq 0x7ccaf(%rip), %rdx # 0xf0bf6 jmp 0x73d80 xorl %ebp, %ebp movl %ebp, %eax addq $0x110, %rsp # imm = 0x110 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movb $0x1, 0x90(%rsp) jmp 0x73e7e leaq 0x90(%rsp), %rbx movl $0x7f, %edx movq %rbx, %rdi movq %r15, %rsi callq 0x1b460 movb $0x0, 0x7f(%rbx) jmp 0x73e7e movb $0x0, 0x90(%rsp) jmp 0x73e7e
_Z24string_parse_kv_overridePKcRSt6vectorI23llama_model_kv_overrideSaIS2_EE: push rbp push r15 push r14 push r12 push rbx sub rsp, 110h mov r14, rsi mov rbx, rdi mov esi, 3Dh ; '=' call _strchr test rax, rax jz short loc_73D64 mov r15, rax mov r12, rax sub r12, rbx cmp r12, 80h jl short loc_73DA0 loc_73D64: lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js loc_73F4C call _Z15common_log_mainv; common_log_main(void) lea rdx, aSMalformedKvOv; "%s: malformed KV override '%s'\n" loc_73D80: lea rcx, aStringParseKvO; "string_parse_kv_override" xor ebp, ebp mov rdi, rax mov esi, 4 mov r8, rbx xor eax, eax call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) jmp loc_73F4E loc_73DA0: lea rdi, [rsp+138h+var_12C] mov rsi, rbx mov rdx, r12 call _strncpy mov [rsp+r12+138h+var_12C], 0 lea r12, [r15+1] lea rsi, aInt; "int:" mov edx, 4 mov rdi, r12 call _strncmp test eax, eax jz short loc_73E43 lea rsi, aFloat; "float:" mov edx, 6 mov rdi, r12 call _strncmp test eax, eax jz short loc_73E61 lea rsi, aBool; "bool:" mov edx, 5 mov rdi, r12 call _strncmp test eax, eax jz loc_73EBC lea rsi, aStr; "str:" mov edx, 4 mov rdi, r12 call _strncmp test eax, eax jz loc_73F13 lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js loc_73F4C call _Z15common_log_mainv; common_log_main(void) lea rdx, aSInvalidTypeFo; "%s: invalid type for KV override '%s'\n" jmp loc_73D80 loc_73E43: add r15, 5 mov [rsp+138h+var_130], 0 mov rdi, r15 call _atol mov [rsp+138h+var_A8], rax jmp short loc_73E7E loc_73E61: add r15, 7 mov [rsp+138h+var_130], 1 mov rdi, r15 call _atof movsd [rsp+138h+var_A8], xmm0 loc_73E7E: mov rax, [r14+8] cmp rax, [r14+10h] jz short loc_73EA4 lea rsi, [rsp+138h+var_130] mov edx, 108h mov rdi, rax call _memcpy add qword ptr [r14+8], 108h jmp short loc_73EB4 loc_73EA4: lea rdx, [rsp+138h+var_130] mov rdi, r14 mov rsi, rax call _ZNSt6vectorI23llama_model_kv_overrideSaIS0_EE17_M_realloc_insertIJS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_; std::vector<llama_model_kv_override>::_M_realloc_insert<llama_model_kv_override>(__gnu_cxx::__normal_iterator<llama_model_kv_override*,std::vector<llama_model_kv_override>>,llama_model_kv_override &&) loc_73EB4: mov bpl, 1 jmp loc_73F4E loc_73EBC: add r15, 6 mov [rsp+138h+var_130], 2 lea rsi, aTrue; "true" mov rdi, r15 call _strcmp test eax, eax jz loc_73F60 lea rsi, aAdvancedOption+0ABh; "false" mov rdi, r15 call _strcmp test eax, eax jz loc_73F8E lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js short loc_73F4C call _Z15common_log_mainv; common_log_main(void) lea rdx, aSInvalidBoolea; "%s: invalid boolean value for KV overri"... jmp loc_73D80 loc_73F13: add r15, 5 mov [rsp+138h+var_130], 3 mov rdi, r15 call _strlen cmp rax, 80h jb short loc_73F6D lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js short loc_73F4C call _Z15common_log_mainv; common_log_main(void) lea rdx, aSMalformedKvOv_0; "%s: malformed KV override '%s', value c"... jmp loc_73D80 loc_73F4C: xor ebp, ebp loc_73F4E: mov eax, ebp add rsp, 110h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_73F60: mov byte ptr [rsp+138h+var_A8], 1 jmp loc_73E7E loc_73F6D: lea rbx, [rsp+138h+var_A8] mov edx, 7Fh mov rdi, rbx mov rsi, r15 call _strncpy mov byte ptr [rbx+7Fh], 0 jmp loc_73E7E loc_73F8E: mov byte ptr [rsp+138h+var_A8], 0 jmp loc_73E7E
long long string_parse_kv_override(long long a1, long long a2) { unsigned int v2; // ebp long long v3; // rax long long v4; // r15 long long v5; // r12 int v6; // eax int v7; // r9d const char *v8; // rdx long long v9; // r15 long long v10; // r15 int v12; // [rsp+8h] [rbp-130h] BYREF _BYTE v13[132]; // [rsp+Ch] [rbp-12Ch] BYREF long long v14[15]; // [rsp+90h] [rbp-A8h] BYREF char v15; // [rsp+10Fh] [rbp-29h] v3 = strchr(a1, 61LL); if ( !v3 || (v4 = v3, v5 = v3 - a1, v3 - a1 >= 128) ) { if ( common_log_verbosity_thold >= 0 ) { v6 = common_log_main(); v8 = "%s: malformed KV override '%s'\n"; LABEL_5: v2 = 0; common_log_add(v6, 4, (_DWORD)v8, (unsigned int)"string_parse_kv_override", a1, v7); return v2; } return 0; } strncpy(v13, a1, v3 - a1); v13[v5] = 0; if ( !(unsigned int)strncmp(v4 + 1, "int:", 4LL) ) { v12 = 0; v14[0] = atol(v4 + 5); } else if ( !(unsigned int)strncmp(v4 + 1, "float:", 6LL) ) { v12 = 1; v14[0] = atof(v4 + 7); } else if ( !(unsigned int)strncmp(v4 + 1, "bool:", 5LL) ) { v9 = v4 + 6; v12 = 2; if ( !(unsigned int)strcmp(v9, "true") ) { LOBYTE(v14[0]) = 1; } else { if ( (unsigned int)strcmp(v9, "false") ) { if ( common_log_verbosity_thold >= 0 ) { v6 = common_log_main(); v8 = "%s: invalid boolean value for KV override '%s'\n"; goto LABEL_5; } return 0; } LOBYTE(v14[0]) = 0; } } else { if ( (unsigned int)strncmp(v4 + 1, "str:", 4LL) ) { if ( common_log_verbosity_thold >= 0 ) { v6 = common_log_main(); v8 = "%s: invalid type for KV override '%s'\n"; goto LABEL_5; } return 0; } v10 = v4 + 5; v12 = 3; if ( (unsigned long long)strlen(v10) >= 0x80 ) { if ( common_log_verbosity_thold >= 0 ) { v6 = common_log_main(); v8 = "%s: malformed KV override '%s', value cannot exceed 127 chars\n"; goto LABEL_5; } return 0; } strncpy(v14, v10, 127LL); v15 = 0; } if ( *(_QWORD *)(a2 + 8) == *(_QWORD *)(a2 + 16) ) { std::vector<llama_model_kv_override>::_M_realloc_insert<llama_model_kv_override>(a2, *(_QWORD *)(a2 + 8), &v12); } else { memcpy(*(_QWORD *)(a2 + 8), &v12, 264LL); *(_QWORD *)(a2 + 8) += 264LL; } LOBYTE(v2) = 1; return v2; }
string_parse_kv_override: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x110 MOV R14,RSI MOV RBX,RDI MOV ESI,0x3d CALL 0x0011b300 TEST RAX,RAX JZ 0x00173d64 MOV R15,RAX MOV R12,RAX SUB R12,RBX CMP R12,0x80 JL 0x00173da0 LAB_00173d64: LEA RAX,[0x22f428] CMP dword ptr [RAX],0x0 JS 0x00173f4c CALL 0x001cc4d7 LEA RDX,[0x1f0b76] LAB_00173d80: LEA RCX,[0x1f0b96] XOR EBP,EBP MOV RDI,RAX MOV ESI,0x4 MOV R8,RBX XOR EAX,EAX CALL 0x001cc574 JMP 0x00173f4e LAB_00173da0: LEA RDI,[RSP + 0xc] MOV RSI,RBX MOV RDX,R12 CALL 0x0011b460 MOV byte ptr [RSP + R12*0x1 + 0xc],0x0 LEA R12,[R15 + 0x1] LEA RSI,[0x1f0baf] MOV EDX,0x4 MOV RDI,R12 CALL 0x0011b430 TEST EAX,EAX JZ 0x00173e43 LEA RSI,[0x1f0bb4] MOV EDX,0x6 MOV RDI,R12 CALL 0x0011b430 TEST EAX,EAX JZ 0x00173e61 LEA RSI,[0x1f0bbb] MOV EDX,0x5 MOV RDI,R12 CALL 0x0011b430 TEST EAX,EAX JZ 0x00173ebc LEA RSI,[0x1f0bf1] MOV EDX,0x4 MOV RDI,R12 CALL 0x0011b430 TEST EAX,EAX JZ 0x00173f13 LEA RAX,[0x22f428] CMP dword ptr [RAX],0x0 JS 0x00173f4c CALL 0x001cc4d7 LEA RDX,[0x1f0c35] JMP 0x00173d80 LAB_00173e43: ADD R15,0x5 MOV dword ptr [RSP + 0x8],0x0 MOV RDI,R15 CALL 0x0011ba30 MOV qword ptr [RSP + 0x90],RAX JMP 0x00173e7e LAB_00173e61: ADD R15,0x7 MOV dword ptr [RSP + 0x8],0x1 MOV RDI,R15 CALL 0x0011ba90 MOVSD qword ptr [RSP + 0x90],XMM0 LAB_00173e7e: MOV RAX,qword ptr [R14 + 0x8] CMP RAX,qword ptr [R14 + 0x10] JZ 0x00173ea4 LEA RSI,[RSP + 0x8] MOV EDX,0x108 MOV RDI,RAX CALL 0x0011b720 ADD qword ptr [R14 + 0x8],0x108 JMP 0x00173eb4 LAB_00173ea4: LEA RDX,[RSP + 0x8] MOV RDI,R14 MOV RSI,RAX CALL 0x001b977a LAB_00173eb4: MOV BPL,0x1 JMP 0x00173f4e LAB_00173ebc: ADD R15,0x6 MOV dword ptr [RSP + 0x8],0x2 LEA RSI,[0x1e8a4a] MOV RDI,R15 CALL 0x0011bc20 TEST EAX,EAX JZ 0x00173f60 LEA RSI,[0x1eb733] MOV RDI,R15 CALL 0x0011bc20 TEST EAX,EAX JZ 0x00173f8e LEA RAX,[0x22f428] CMP dword ptr [RAX],0x0 JS 0x00173f4c CALL 0x001cc4d7 LEA RDX,[0x1f0bc1] JMP 0x00173d80 LAB_00173f13: ADD R15,0x5 MOV dword ptr [RSP + 0x8],0x3 MOV RDI,R15 CALL 0x0011b3e0 CMP RAX,0x80 JC 0x00173f6d LEA RAX,[0x22f428] CMP dword ptr [RAX],0x0 JS 0x00173f4c CALL 0x001cc4d7 LEA RDX,[0x1f0bf6] JMP 0x00173d80 LAB_00173f4c: XOR EBP,EBP LAB_00173f4e: MOV EAX,EBP ADD RSP,0x110 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00173f60: MOV byte ptr [RSP + 0x90],0x1 JMP 0x00173e7e LAB_00173f6d: LEA RBX,[RSP + 0x90] MOV EDX,0x7f MOV RDI,RBX MOV RSI,R15 CALL 0x0011b460 MOV byte ptr [RBX + 0x7f],0x0 JMP 0x00173e7e LAB_00173f8e: MOV byte ptr [RSP + 0x90],0x0 JMP 0x00173e7e
/* string_parse_kv_override(char const*, std::vector<llama_model_kv_override, std::allocator<llama_model_kv_override> >&) */ ulong string_parse_kv_override(char *param_1,vector *param_2) { char *__s1; void *__dest; int iVar1; char *pcVar2; int8 uVar3; int8 unaff_RBP; ulong uVar4; size_t sVar5; int4 local_130; char local_12c [132]; double local_a8 [15]; int1 local_29; pcVar2 = strchr(param_1,0x3d); if ((pcVar2 == (char *)0x0) || (sVar5 = (long)pcVar2 - (long)param_1, 0x7f < (long)sVar5)) { if (common_log_verbosity_thold < 0) goto LAB_00173f4c; uVar3 = common_log_main(); pcVar2 = "%s: malformed KV override \'%s\'\n"; goto LAB_00173d80; } strncpy(local_12c,param_1,sVar5); local_12c[sVar5] = '\0'; __s1 = pcVar2 + 1; iVar1 = strncmp(__s1,"int:",4); if (iVar1 == 0) { local_130 = 0; local_a8[0] = (double)atol(pcVar2 + 5); } else { iVar1 = strncmp(__s1,"float:",6); if (iVar1 == 0) { local_130 = 1; local_a8[0] = atof(pcVar2 + 7); } else { iVar1 = strncmp(__s1,"bool:",5); if (iVar1 != 0) { iVar1 = strncmp(__s1,"str:",4); if (iVar1 == 0) { local_130 = 3; sVar5 = strlen(pcVar2 + 5); if (sVar5 < 0x80) { strncpy((char *)local_a8,pcVar2 + 5,0x7f); local_29 = 0; goto LAB_00173e7e; } if (common_log_verbosity_thold < 0) goto LAB_00173f4c; uVar3 = common_log_main(); pcVar2 = "%s: malformed KV override \'%s\', value cannot exceed 127 chars\n"; } else { if (common_log_verbosity_thold < 0) { LAB_00173f4c: uVar4 = 0; goto LAB_00173f4e; } uVar3 = common_log_main(); pcVar2 = "%s: invalid type for KV override \'%s\'\n"; } LAB_00173d80: uVar4 = 0; common_log_add(uVar3,4,pcVar2,"string_parse_kv_override",param_1); goto LAB_00173f4e; } local_130 = 2; iVar1 = strcmp(pcVar2 + 6,"true"); if (iVar1 == 0) { local_a8[0] = (double)CONCAT71(local_a8[0]._1_7_,1); } else { iVar1 = strcmp(pcVar2 + 6,"false"); if (iVar1 != 0) { if (common_log_verbosity_thold < 0) goto LAB_00173f4c; uVar3 = common_log_main(); pcVar2 = "%s: invalid boolean value for KV override \'%s\'\n"; goto LAB_00173d80; } local_a8[0] = (double)((ulong)local_a8[0] & 0xffffffffffffff00); } } } LAB_00173e7e: __dest = *(void **)(param_2 + 8); if (__dest == *(void **)(param_2 + 0x10)) { std::vector<llama_model_kv_override,std::allocator<llama_model_kv_override>>:: _M_realloc_insert<llama_model_kv_override> ((vector<llama_model_kv_override,std::allocator<llama_model_kv_override>> *)param_2, __dest,&local_130); } else { memcpy(__dest,&local_130,0x108); *(long *)(param_2 + 8) = *(long *)(param_2 + 8) + 0x108; } uVar4 = CONCAT71((int7)((ulong)unaff_RBP >> 8),1); LAB_00173f4e: return uVar4 & 0xffffffff; }
19,255
js_regexp_get_flag
bluesky950520[P]quickjs/quickjs.c
static JSValue js_regexp_get_flag(JSContext *ctx, JSValue this_val, int mask) { JSRegExp *re; int flags; if (JS_VALUE_GET_TAG(this_val) != JS_TAG_OBJECT) return JS_ThrowTypeErrorNotAnObject(ctx); re = js_get_regexp(ctx, this_val, FALSE); if (!re) { if (js_same_value(ctx, this_val, ctx->class_proto[JS_CLASS_REGEXP])) return JS_UNDEFINED; else return JS_ThrowTypeErrorInvalidClass(ctx, JS_CLASS_REGEXP); } flags = lre_get_flags(re->bytecode->u.str8); return js_bool(flags & mask); }
O1
c
js_regexp_get_flag: pushq %rbp pushq %r14 pushq %rbx movq %rdi, %r14 cmpl $-0x1, %edx jne 0x47d4e cmpw $0x12, 0x6(%rsi) jne 0x47d68 movl %ecx, %ebp movq 0x38(%rsi), %rdi addq $0x18, %rdi callq 0x94d00 xorl %ebx, %ebx testl %ebp, %eax setne %bl movl $0x1, %edx jmp 0x47da1 leaq 0x572d0(%rip), %rsi # 0x9f025 xorl %ebx, %ebx movq %r14, %rdi xorl %eax, %eax callq 0x22567 movl $0x6, %edx jmp 0x47da1 movq 0x40(%r14), %rax movq 0x120(%rax), %rcx movq 0x128(%rax), %r8 movq %r14, %rdi callq 0x26461 testl %eax, %eax je 0x47d8d movl $0x3, %edx jmp 0x47d9f movq %r14, %rdi movl $0x12, %esi callq 0x275f0 movl $0x6, %edx xorl %ebx, %ebx movq %rbx, %rax popq %rbx popq %r14 popq %rbp retq
js_regexp_get_flag: push rbp push r14 push rbx mov r14, rdi cmp edx, 0FFFFFFFFh jnz short loc_47D4E cmp word ptr [rsi+6], 12h jnz short loc_47D68 mov ebp, ecx mov rdi, [rsi+38h] add rdi, 18h call lre_get_flags xor ebx, ebx test eax, ebp setnz bl mov edx, 1 jmp short loc_47DA1 loc_47D4E: lea rsi, aOperandPrototy+20h; "not an object" xor ebx, ebx mov rdi, r14 xor eax, eax call JS_ThrowTypeError mov edx, 6 jmp short loc_47DA1 loc_47D68: mov rax, [r14+40h] mov rcx, [rax+120h] mov r8, [rax+128h] mov rdi, r14 call js_same_value test eax, eax jz short loc_47D8D mov edx, 3 jmp short loc_47D9F loc_47D8D: mov rdi, r14 mov esi, 12h call JS_ThrowTypeErrorInvalidClass mov edx, 6 loc_47D9F: xor ebx, ebx loc_47DA1: mov rax, rbx pop rbx pop r14 pop rbp retn
_BOOL8 js_regexp_get_flag( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long v14; // rbx double v15; // xmm4_8 double v16; // xmm5_8 char v18; // [rsp+0h] [rbp-18h] if ( (_DWORD)a3 == -1 ) { if ( *(_WORD *)(a2 + 6) == 18 ) { return ((unsigned int)a4 & (unsigned int)lre_get_flags(*(_QWORD *)(a2 + 56) + 24LL)) != 0; } else { if ( !(unsigned int)js_same_value( a1, (_DWORD *)a2, a3, *(_DWORD **)(*(_QWORD *)(a1 + 64) + 288LL), *(_QWORD *)(*(_QWORD *)(a1 + 64) + 296LL)) ) JS_ThrowTypeErrorInvalidClass(a1, 18, a7, a8, a9, a10, v15, v16, a13, a14); return 0LL; } } else { v14 = 0LL; JS_ThrowTypeError(a1, (long long)"not an object", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v18); } return v14; }
19,256
js_regexp_get_flag
bluesky950520[P]quickjs/quickjs.c
static JSValue js_regexp_get_flag(JSContext *ctx, JSValue this_val, int mask) { JSRegExp *re; int flags; if (JS_VALUE_GET_TAG(this_val) != JS_TAG_OBJECT) return JS_ThrowTypeErrorNotAnObject(ctx); re = js_get_regexp(ctx, this_val, FALSE); if (!re) { if (js_same_value(ctx, this_val, ctx->class_proto[JS_CLASS_REGEXP])) return JS_UNDEFINED; else return JS_ThrowTypeErrorInvalidClass(ctx, JS_CLASS_REGEXP); } flags = lre_get_flags(re->bytecode->u.str8); return js_bool(flags & mask); }
O2
c
js_regexp_get_flag: pushq %rbp pushq %rbx pushq %rax movq %rdi, %rbx cmpl $-0x1, %edx jne 0x3e1b5 cmpw $0x12, 0x6(%rsi) jne 0x3e1c1 movl %ecx, %ebp movq 0x38(%rsi), %rdi addq $0x18, %rdi callq 0x7c068 movl %eax, %ecx xorl %eax, %eax testl %ebp, %ecx setne %al pushq $0x1 popq %rdx jmp 0x3e1e4 movq %rbx, %rdi callq 0x1d5e1 pushq $0x6 jmp 0x3e1e1 movq 0x40(%rbx), %rax movq 0x120(%rax), %rcx movq 0x128(%rax), %r8 movq %rbx, %rdi callq 0x1ff32 testl %eax, %eax je 0x3e1eb pushq $0x3 popq %rdx xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %rbp retq pushq $0x12 popq %rsi movq %rbx, %rdi callq 0x2122d jmp 0x3e1bd
js_regexp_get_flag: push rbp push rbx push rax mov rbx, rdi cmp edx, 0FFFFFFFFh jnz short loc_3E1B5 cmp word ptr [rsi+6], 12h jnz short loc_3E1C1 mov ebp, ecx mov rdi, [rsi+38h] add rdi, 18h call lre_get_flags mov ecx, eax xor eax, eax test ecx, ebp setnz al push 1 pop rdx jmp short loc_3E1E4 loc_3E1B5: mov rdi, rbx call JS_ThrowTypeErrorNotAnObject loc_3E1BD: push 6 jmp short loc_3E1E1 loc_3E1C1: mov rax, [rbx+40h] mov rcx, [rax+120h] mov r8, [rax+128h] mov rdi, rbx call js_same_value test eax, eax jz short loc_3E1EB push 3 loc_3E1E1: pop rdx xor eax, eax loc_3E1E4: add rsp, 8 pop rbx pop rbp retn loc_3E1EB: push 12h pop rsi mov rdi, rbx call JS_ThrowTypeErrorInvalidClass jmp short loc_3E1BD
_BOOL8 js_regexp_get_flag( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { char v14; // al if ( (_DWORD)a3 == -1 ) { if ( *(_WORD *)(a2 + 6) == 18 ) return ((unsigned int)a4 & (unsigned int)lre_get_flags(*(_QWORD *)(a2 + 56) + 24LL)) != 0; if ( !(unsigned int)js_same_value( a1, (_DWORD *)a2, a3, *(_DWORD **)(*(_QWORD *)(a1 + 64) + 288LL), *(_QWORD *)(*(_QWORD *)(a1 + 64) + 296LL)) ) JS_ThrowTypeErrorInvalidClass(a1, 18); } else { JS_ThrowTypeErrorNotAnObject(a1, a7, a8, a9, a10, a11, a12, a13, a14, a2, a3, a4, a5, a6, v14); } return 0LL; }
js_regexp_get_flag: PUSH RBP PUSH RBX PUSH RAX MOV RBX,RDI CMP EDX,-0x1 JNZ 0x0013e1b5 CMP word ptr [RSI + 0x6],0x12 JNZ 0x0013e1c1 MOV EBP,ECX MOV RDI,qword ptr [RSI + 0x38] ADD RDI,0x18 CALL 0x0017c068 MOV ECX,EAX XOR EAX,EAX TEST ECX,EBP SETNZ AL PUSH 0x1 POP RDX JMP 0x0013e1e4 LAB_0013e1b5: MOV RDI,RBX CALL 0x0011d5e1 LAB_0013e1bd: PUSH 0x6 JMP 0x0013e1e1 LAB_0013e1c1: MOV RAX,qword ptr [RBX + 0x40] MOV RCX,qword ptr [RAX + 0x120] MOV R8,qword ptr [RAX + 0x128] MOV RDI,RBX CALL 0x0011ff32 TEST EAX,EAX JZ 0x0013e1eb PUSH 0x3 LAB_0013e1e1: POP RDX XOR EAX,EAX LAB_0013e1e4: ADD RSP,0x8 POP RBX POP RBP RET LAB_0013e1eb: PUSH 0x12 POP RSI MOV RDI,RBX CALL 0x0012122d JMP 0x0013e1bd
bool js_regexp_get_flag(long param_1,long param_2,int8 param_3,uint param_4) { uint uVar1; int iVar2; if ((int)param_3 == -1) { if (*(short *)(param_2 + 6) == 0x12) { uVar1 = lre_get_flags(*(long *)(param_2 + 0x38) + 0x18); return (uVar1 & param_4) != 0; } iVar2 = js_same_value(param_1,param_2,param_3,*(int8 *)(*(long *)(param_1 + 0x40) + 0x120) ,*(int8 *)(*(long *)(param_1 + 0x40) + 0x128)); if (iVar2 == 0) { JS_ThrowTypeErrorInvalidClass(param_1,0x12); } } else { JS_ThrowTypeErrorNotAnObject(param_1); } return false; }
19,257
SetWindowMinSize
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/platforms/rcore_desktop_glfw.c
void SetWindowMinSize(int width, int height) { CORE.Window.screenMin.width = width; CORE.Window.screenMin.height = height; int minWidth = (CORE.Window.screenMin.width == 0)? GLFW_DONT_CARE : (int)CORE.Window.screenMin.width; int minHeight = (CORE.Window.screenMin.height == 0)? GLFW_DONT_CARE : (int)CORE.Window.screenMin.height; int maxWidth = (CORE.Window.screenMax.width == 0)? GLFW_DONT_CARE : (int)CORE.Window.screenMax.width; int maxHeight = (CORE.Window.screenMax.height == 0)? GLFW_DONT_CARE : (int)CORE.Window.screenMax.height; glfwSetWindowSizeLimits(platform.handle, minWidth, minHeight, maxWidth, maxHeight); }
O2
c
SetWindowMinSize: movl %edi, 0xc90f2(%rip) # 0x127c34 xorl %r8d, %r8d cmpl $0x1, %edi movl $0x0, %eax sbbl %eax, %eax orl %edi, %eax cmpl $0x1, %esi movl $0x0, %edx sbbl %edx, %edx movl %esi, 0xc90d7(%rip) # 0x127c38 orl %esi, %edx movl 0xc90d3(%rip), %esi # 0x127c3c cmpl $0x1, %esi movl $0x0, %ecx sbbl %ecx, %ecx orl %esi, %ecx movl 0xc90c5(%rip), %esi # 0x127c40 cmpl $0x1, %esi sbbl %r8d, %r8d orl %esi, %r8d movq 0xc9b3d(%rip), %rdi # 0x1286c8 movl %eax, %esi jmp 0xa7ecf
SetWindowMinSize: mov cs:dword_127C34, edi xor r8d, r8d cmp edi, 1 mov eax, 0 sbb eax, eax or eax, edi cmp esi, 1 mov edx, 0 sbb edx, edx mov cs:dword_127C38, esi or edx, esi mov esi, cs:dword_127C3C cmp esi, 1 mov ecx, 0 sbb ecx, ecx or ecx, esi mov esi, cs:dword_127C40 cmp esi, 1 sbb r8d, r8d or r8d, esi mov rdi, cs:platform_0 mov esi, eax jmp glfwSetWindowSizeLimits
long long SetWindowMinSize(int a1, int a2) { dword_127C34 = a1; dword_127C38 = a2; return glfwSetWindowSizeLimits( platform_0, a1 | (unsigned int)-(a1 == 0), a2 | (unsigned int)-(a2 == 0), dword_127C3C | (unsigned int)-(dword_127C3C == 0), dword_127C40 | (unsigned int)-(dword_127C40 == 0)); }
SetWindowMinSize: MOV dword ptr [0x00227c34],EDI XOR R8D,R8D CMP EDI,0x1 MOV EAX,0x0 SBB EAX,EAX OR EAX,EDI CMP ESI,0x1 MOV EDX,0x0 SBB EDX,EDX MOV dword ptr [0x00227c38],ESI OR EDX,ESI MOV ESI,dword ptr [0x00227c3c] CMP ESI,0x1 MOV ECX,0x0 SBB ECX,ECX OR ECX,ESI MOV ESI,dword ptr [0x00227c40] CMP ESI,0x1 SBB R8D,R8D OR R8D,ESI MOV RDI,qword ptr [0x002286c8] MOV ESI,EAX JMP 0x001a7ecf
void SetWindowMinSize(uint param_1,uint param_2) { DAT_00227c34 = param_1; DAT_00227c38 = param_2; glfwSetWindowSizeLimits (platform_0,-(uint)(param_1 == 0) | param_1,-(uint)(param_2 == 0) | param_2, -(uint)(DAT_00227c3c == 0) | DAT_00227c3c,-(uint)(DAT_00227c40 == 0) | DAT_00227c40); return; }
19,258
SetWindowMinSize
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/platforms/rcore_desktop_glfw.c
void SetWindowMinSize(int width, int height) { CORE.Window.screenMin.width = width; CORE.Window.screenMin.height = height; int minWidth = (CORE.Window.screenMin.width == 0)? GLFW_DONT_CARE : (int)CORE.Window.screenMin.width; int minHeight = (CORE.Window.screenMin.height == 0)? GLFW_DONT_CARE : (int)CORE.Window.screenMin.height; int maxWidth = (CORE.Window.screenMax.width == 0)? GLFW_DONT_CARE : (int)CORE.Window.screenMax.width; int maxHeight = (CORE.Window.screenMax.height == 0)? GLFW_DONT_CARE : (int)CORE.Window.screenMax.height; glfwSetWindowSizeLimits(platform.handle, minWidth, minHeight, maxWidth, maxHeight); }
O3
c
SetWindowMinSize: movl %edi, 0xcbb07(%rip) # 0x13bc14 xorl %r8d, %r8d cmpl $0x1, %edi movl $0x0, %eax sbbl %eax, %eax orl %edi, %eax cmpl $0x1, %esi movl $0x0, %edx sbbl %edx, %edx movl %esi, 0xcbaec(%rip) # 0x13bc18 orl %esi, %edx movl 0xcbae8(%rip), %esi # 0x13bc1c cmpl $0x1, %esi movl $0x0, %ecx sbbl %ecx, %ecx orl %esi, %ecx movl 0xcbada(%rip), %esi # 0x13bc20 cmpl $0x1, %esi sbbl %r8d, %r8d orl %esi, %r8d movq 0xcc552(%rip), %rdi # 0x13c6a8 movl %eax, %esi jmp 0xc1011
SetWindowMinSize: mov cs:dword_13BC14, edi xor r8d, r8d cmp edi, 1 mov eax, 0 sbb eax, eax or eax, edi cmp esi, 1 mov edx, 0 sbb edx, edx mov cs:dword_13BC18, esi or edx, esi mov esi, cs:dword_13BC1C cmp esi, 1 mov ecx, 0 sbb ecx, ecx or ecx, esi mov esi, cs:dword_13BC20 cmp esi, 1 sbb r8d, r8d or r8d, esi mov rdi, cs:platform_0 mov esi, eax jmp glfwSetWindowSizeLimits
long long SetWindowMinSize(int a1, int a2) { dword_13BC14 = a1; dword_13BC18 = a2; return glfwSetWindowSizeLimits( platform_0, a1 | (unsigned int)-(a1 == 0), a2 | (unsigned int)-(a2 == 0), dword_13BC1C | (unsigned int)-(dword_13BC1C == 0), dword_13BC20 | (unsigned int)-(dword_13BC20 == 0)); }
SetWindowMinSize: MOV dword ptr [0x0023bc14],EDI XOR R8D,R8D CMP EDI,0x1 MOV EAX,0x0 SBB EAX,EAX OR EAX,EDI CMP ESI,0x1 MOV EDX,0x0 SBB EDX,EDX MOV dword ptr [0x0023bc18],ESI OR EDX,ESI MOV ESI,dword ptr [0x0023bc1c] CMP ESI,0x1 MOV ECX,0x0 SBB ECX,ECX OR ECX,ESI MOV ESI,dword ptr [0x0023bc20] CMP ESI,0x1 SBB R8D,R8D OR R8D,ESI MOV RDI,qword ptr [0x0023c6a8] MOV ESI,EAX JMP 0x001c1011
void SetWindowMinSize(uint param_1,uint param_2) { DAT_0023bc14 = param_1; DAT_0023bc18 = param_2; glfwSetWindowSizeLimits (platform_0,-(uint)(param_1 == 0) | param_1,-(uint)(param_2 == 0) | param_2, -(uint)(DAT_0023bc1c == 0) | DAT_0023bc1c,-(uint)(DAT_0023bc20 == 0) | DAT_0023bc20); return; }
19,259
OpenSubdiv::v3_6_0::Tmr::Neighborhood::computeHashKey() const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/neighborhood.cpp
hashkey_type Neighborhood::computeHashKey() const { // topology information starts with the first component count (_faceCount) // and ends at the last component value (crease sharpness values) uint8_t const* start = byteStart() + offsetof(Neighborhood, _faceCount); uint8_t const* end = byteEnd(); size_t size = end - start; return hashBytes(start, size); }
O1
cpp
OpenSubdiv::v3_6_0::Tmr::Neighborhood::computeHashKey() const: leaq 0x8(%rdi), %rcx movzwl 0x8(%rdi), %eax movzwl 0xa(%rdi), %edx addl %eax, %edx movzwl 0xc(%rdi), %eax movzwl 0xe(%rdi), %esi leaq (%rsi,%rsi,2), %rsi leaq (%rdi,%rax,8), %rax leaq (%rax,%rsi,4), %rax leaq (%rax,%rdx,4), %rdx addq $0x10, %rdx movq %rdx, %rax subq %rcx, %rax testq %rax, %rax jle 0xa3681 xorl %eax, %eax imull $0x1000193, %eax, %esi # imm = 0x1000193 movzbl (%rcx), %eax xorl %esi, %eax incq %rcx cmpq %rdx, %rcx jb 0xa366d retq xorl %eax, %eax retq
_ZNK10OpenSubdiv6v3_6_03Tmr12Neighborhood14computeHashKeyEv: lea rcx, [rdi+8] movzx eax, word ptr [rdi+8] movzx edx, word ptr [rdi+0Ah] add edx, eax movzx eax, word ptr [rdi+0Ch] movzx esi, word ptr [rdi+0Eh] lea rsi, [rsi+rsi*2] lea rax, [rdi+rax*8] lea rax, [rax+rsi*4] lea rdx, [rax+rdx*4] add rdx, 10h mov rax, rdx sub rax, rcx test rax, rax jle short loc_A3681 xor eax, eax loc_A366D: imul esi, eax, 1000193h movzx eax, byte ptr [rcx] xor eax, esi inc rcx cmp rcx, rdx jb short loc_A366D retn loc_A3681: xor eax, eax retn
long long OpenSubdiv::v3_6_0::Tmr::Neighborhood::computeHashKey(OpenSubdiv::v3_6_0::Tmr::Neighborhood *this) { unsigned __int8 *v1; // rcx long long result; // rax v1 = (unsigned __int8 *)this + 8; if ( 8LL * *((unsigned __int16 *)this + 6) + 12LL * *((unsigned __int16 *)this + 7) + 4LL * (*((unsigned __int16 *)this + 4) + (unsigned int)*((unsigned __int16 *)this + 5)) + 8 <= 0 ) return 0LL; LODWORD(result) = 0; do result = (16777619 * (_DWORD)result) ^ (unsigned int)*v1++; while ( v1 < (unsigned __int8 *)this + 12 * *((unsigned __int16 *)this + 7) + 8 * *((unsigned __int16 *)this + 6) + 4 * *((unsigned __int16 *)this + 4) + 4 * (unsigned int)*((unsigned __int16 *)this + 5) + 16 ); return result; }
computeHashKey: LEA RCX,[RDI + 0x8] MOVZX EAX,word ptr [RDI + 0x8] MOVZX EDX,word ptr [RDI + 0xa] ADD EDX,EAX MOVZX EAX,word ptr [RDI + 0xc] MOVZX ESI,word ptr [RDI + 0xe] LEA RSI,[RSI + RSI*0x2] LEA RAX,[RDI + RAX*0x8] LEA RAX,[RAX + RSI*0x4] LEA RDX,[RAX + RDX*0x4] ADD RDX,0x10 MOV RAX,RDX SUB RAX,RCX TEST RAX,RAX JLE 0x001a3681 XOR EAX,EAX LAB_001a366d: IMUL ESI,EAX,0x1000193 MOVZX EAX,byte ptr [RCX] XOR EAX,ESI INC RCX CMP RCX,RDX JC 0x001a366d RET LAB_001a3681: XOR EAX,EAX RET
/* OpenSubdiv::v3_6_0::Tmr::Neighborhood::computeHashKey() const */ uint __thiscall OpenSubdiv::v3_6_0::Tmr::Neighborhood::computeHashKey(Neighborhood *this) { uint uVar1; Neighborhood *pNVar2; Neighborhood *pNVar3; pNVar2 = this + 8; pNVar3 = this + (ulong)((uint)*(ushort *)(this + 10) + (uint)*(ushort *)(this + 8)) * 4 + (ulong)*(ushort *)(this + 0xe) * 0xc + (ulong)*(ushort *)(this + 0xc) * 8 + 0x10; if (pNVar3 != pNVar2 && -1 < (long)pNVar3 - (long)pNVar2) { uVar1 = 0; do { uVar1 = (uint)(byte)*pNVar2 ^ uVar1 * 0x1000193; pNVar2 = pNVar2 + 1; } while (pNVar2 < pNVar3); return uVar1; } return 0; }
19,260
OpenSubdiv::v3_6_0::Tmr::Neighborhood::computeHashKey() const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/neighborhood.cpp
hashkey_type Neighborhood::computeHashKey() const { // topology information starts with the first component count (_faceCount) // and ends at the last component value (crease sharpness values) uint8_t const* start = byteStart() + offsetof(Neighborhood, _faceCount); uint8_t const* end = byteEnd(); size_t size = end - start; return hashBytes(start, size); }
O3
cpp
OpenSubdiv::v3_6_0::Tmr::Neighborhood::computeHashKey() const: leaq 0x8(%rdi), %rcx movzwl 0x8(%rdi), %eax movzwl 0xa(%rdi), %edx addl %eax, %edx movzwl 0xc(%rdi), %eax movzwl 0xe(%rdi), %esi leaq (%rsi,%rsi,2), %rsi leaq (%rdi,%rax,8), %rax leaq (%rax,%rsi,4), %rax leaq (%rax,%rdx,4), %rdx addq $0x10, %rdx movq %rdx, %rax subq %rcx, %rax testq %rax, %rax jle 0xa6125 xorl %eax, %eax imull $0x1000193, %eax, %esi # imm = 0x1000193 movzbl (%rcx), %eax xorl %esi, %eax incq %rcx cmpq %rdx, %rcx jb 0xa6111 retq xorl %eax, %eax retq
_ZNK10OpenSubdiv6v3_6_03Tmr12Neighborhood14computeHashKeyEv: lea rcx, [rdi+8] movzx eax, word ptr [rdi+8] movzx edx, word ptr [rdi+0Ah] add edx, eax movzx eax, word ptr [rdi+0Ch] movzx esi, word ptr [rdi+0Eh] lea rsi, [rsi+rsi*2] lea rax, [rdi+rax*8] lea rax, [rax+rsi*4] lea rdx, [rax+rdx*4] add rdx, 10h mov rax, rdx sub rax, rcx test rax, rax jle short loc_A6125 xor eax, eax loc_A6111: imul esi, eax, 1000193h movzx eax, byte ptr [rcx] xor eax, esi inc rcx cmp rcx, rdx jb short loc_A6111 retn loc_A6125: xor eax, eax retn
long long OpenSubdiv::v3_6_0::Tmr::Neighborhood::computeHashKey(OpenSubdiv::v3_6_0::Tmr::Neighborhood *this) { unsigned __int8 *v1; // rcx long long result; // rax v1 = (unsigned __int8 *)this + 8; if ( 8LL * *((unsigned __int16 *)this + 6) + 12LL * *((unsigned __int16 *)this + 7) + 4LL * (*((unsigned __int16 *)this + 4) + (unsigned int)*((unsigned __int16 *)this + 5)) + 8 <= 0 ) return 0LL; LODWORD(result) = 0; do result = (16777619 * (_DWORD)result) ^ (unsigned int)*v1++; while ( v1 < (unsigned __int8 *)this + 12 * *((unsigned __int16 *)this + 7) + 8 * *((unsigned __int16 *)this + 6) + 4 * *((unsigned __int16 *)this + 4) + 4 * (unsigned int)*((unsigned __int16 *)this + 5) + 16 ); return result; }
computeHashKey: LEA RCX,[RDI + 0x8] MOVZX EAX,word ptr [RDI + 0x8] MOVZX EDX,word ptr [RDI + 0xa] ADD EDX,EAX MOVZX EAX,word ptr [RDI + 0xc] MOVZX ESI,word ptr [RDI + 0xe] LEA RSI,[RSI + RSI*0x2] LEA RAX,[RDI + RAX*0x8] LEA RAX,[RAX + RSI*0x4] LEA RDX,[RAX + RDX*0x4] ADD RDX,0x10 MOV RAX,RDX SUB RAX,RCX TEST RAX,RAX JLE 0x001a6125 XOR EAX,EAX LAB_001a6111: IMUL ESI,EAX,0x1000193 MOVZX EAX,byte ptr [RCX] XOR EAX,ESI INC RCX CMP RCX,RDX JC 0x001a6111 RET LAB_001a6125: XOR EAX,EAX RET
/* OpenSubdiv::v3_6_0::Tmr::Neighborhood::computeHashKey() const */ uint __thiscall OpenSubdiv::v3_6_0::Tmr::Neighborhood::computeHashKey(Neighborhood *this) { uint uVar1; Neighborhood *pNVar2; Neighborhood *pNVar3; pNVar2 = this + 8; pNVar3 = this + (ulong)((uint)*(ushort *)(this + 10) + (uint)*(ushort *)(this + 8)) * 4 + (ulong)*(ushort *)(this + 0xe) * 0xc + (ulong)*(ushort *)(this + 0xc) * 8 + 0x10; if (pNVar3 != pNVar2 && -1 < (long)pNVar3 - (long)pNVar2) { uVar1 = 0; do { uVar1 = (uint)(byte)*pNVar2 ^ uVar1 * 0x1000193; pNVar2 = pNVar2 + 1; } while (pNVar2 < pNVar3); return uVar1; } return 0; }
19,261
thr_upgrade_write_delay_lock
eloqsql/mysys/thr_lock.c
my_bool thr_upgrade_write_delay_lock(THR_LOCK_DATA *data, enum thr_lock_type new_lock_type, ulong lock_wait_timeout) { THR_LOCK *lock=data->lock; enum enum_thr_lock_result res; DBUG_ENTER("thr_upgrade_write_delay_lock"); mysql_mutex_lock(&lock->mutex); if (data->type == TL_UNLOCK || data->type >= TL_WRITE_LOW_PRIORITY) { mysql_mutex_unlock(&lock->mutex); DBUG_RETURN(data->type == TL_UNLOCK); /* Test if Aborted */ } check_locks(lock,"before upgrading lock", data->type, 0); /* TODO: Upgrade to TL_WRITE_CONCURRENT_INSERT in some cases */ data->type= new_lock_type; /* Upgrade lock */ /* Check if someone has given us the lock */ if (!data->cond) { if (!lock->read.data) /* No read locks */ { /* We have the lock */ /* For this function, get_status is not allowed to fail */ if (data->lock->get_status) (*data->lock->get_status)(data->status_param, 0); mysql_mutex_unlock(&lock->mutex); if (lock->start_trans) (*lock->start_trans)(data->status_param); DBUG_RETURN(0); } if (((*data->prev)=data->next)) /* remove from lock-list */ data->next->prev= data->prev; else lock->write.last=data->prev; if ((data->next=lock->write_wait.data)) /* Put first in lock_list */ data->next->prev= &data->next; else lock->write_wait.last= &data->next; data->prev= &lock->write_wait.data; lock->write_wait.data=data; check_locks(lock,"upgrading lock", new_lock_type, 0); } else { check_locks(lock,"waiting for lock", new_lock_type, 0); } res= wait_for_lock(&lock->write_wait, data, 1, lock_wait_timeout); if (res == THR_LOCK_SUCCESS && lock->start_trans) DBUG_RETURN((*lock->start_trans)(data->status_param)); DBUG_RETURN(0); }
O0
c
thr_upgrade_write_delay_lock: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rdi addq $0x18, %rdi leaq 0x54d51(%rip), %rsi # 0xda05f movl $0x5a5, %edx # imm = 0x5A5 callq 0x83ba0 movq -0x10(%rbp), %rax cmpl $0x0, 0x40(%rax) je 0x8532c movq -0x10(%rbp), %rax cmpl $0xb, 0x40(%rax) jl 0x85351 movq -0x28(%rbp), %rdi addq $0x18, %rdi callq 0x83c10 movq -0x10(%rbp), %rax cmpl $0x0, 0x40(%rax) sete %al andb $0x1, %al movzbl %al, %eax movb %al, -0x1(%rbp) jmp 0x854dd movl -0x14(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x40(%rax) movq -0x10(%rbp), %rax cmpq $0x0, 0x20(%rax) jne 0x85485 movq -0x28(%rbp), %rax cmpq $0x0, 0x70(%rax) jne 0x853dd movq -0x10(%rbp), %rax movq 0x18(%rax), %rax cmpq $0x0, 0xb0(%rax) je 0x853a2 movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movq 0xb0(%rax), %rax movq -0x10(%rbp), %rcx movq 0x28(%rcx), %rdi xorl %esi, %esi callq *%rax movq -0x28(%rbp), %rdi addq $0x18, %rdi callq 0x83c10 movq -0x28(%rbp), %rax cmpq $0x0, 0xd0(%rax) je 0x853d2 movq -0x28(%rbp), %rax movq 0xd0(%rax), %rax movq -0x10(%rbp), %rcx movq 0x28(%rcx), %rdi callq *%rax jmp 0x853d4 movb $0x0, -0x1(%rbp) jmp 0x854dd movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq -0x10(%rbp), %rcx movq 0x10(%rcx), %rcx movq %rax, (%rcx) cmpq $0x0, %rax je 0x8540c movq -0x10(%rbp), %rax movq 0x10(%rax), %rcx movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rcx, 0x10(%rax) jmp 0x8541f movq -0x10(%rbp), %rax movq 0x10(%rax), %rcx movq -0x28(%rbp), %rax movq %rcx, 0x98(%rax) movq -0x28(%rbp), %rax movq 0x80(%rax), %rax movq -0x10(%rbp), %rcx movq %rax, 0x8(%rcx) cmpq $0x0, %rax je 0x8544e movq -0x10(%rbp), %rcx addq $0x8, %rcx movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rcx, 0x10(%rax) jmp 0x85461 movq -0x10(%rbp), %rcx addq $0x8, %rcx movq -0x28(%rbp), %rax movq %rcx, 0x88(%rax) movq -0x28(%rbp), %rcx addq $0x80, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x10(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, 0x80(%rax) jmp 0x85487 jmp 0x85487 movq -0x28(%rbp), %rdi addq $0x80, %rdi movq -0x10(%rbp), %rsi movq -0x20(%rbp), %rcx movl $0x1, %edx callq 0x854f0 movl %eax, -0x2c(%rbp) cmpl $0x0, -0x2c(%rbp) jne 0x854d7 movq -0x28(%rbp), %rax cmpq $0x0, 0xd0(%rax) je 0x854d7 jmp 0x854bd movq -0x28(%rbp), %rax movq 0xd0(%rax), %rax movq -0x10(%rbp), %rcx movq 0x28(%rcx), %rdi callq *%rax movb %al, -0x1(%rbp) jmp 0x854dd jmp 0x854d9 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
thr_upgrade_write_delay_lock: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov rax, [rbp+var_10] mov rax, [rax+18h] mov [rbp+var_28], rax mov rdi, [rbp+var_28] add rdi, 18h lea rsi, aWorkspaceLlm4b_21; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 5A5h call inline_mysql_mutex_lock_11 mov rax, [rbp+var_10] cmp dword ptr [rax+40h], 0 jz short loc_8532C mov rax, [rbp+var_10] cmp dword ptr [rax+40h], 0Bh jl short loc_85351 loc_8532C: mov rdi, [rbp+var_28] add rdi, 18h call inline_mysql_mutex_unlock_11 mov rax, [rbp+var_10] cmp dword ptr [rax+40h], 0 setz al and al, 1 movzx eax, al mov [rbp+var_1], al jmp loc_854DD loc_85351: mov ecx, [rbp+var_14] mov rax, [rbp+var_10] mov [rax+40h], ecx mov rax, [rbp+var_10] cmp qword ptr [rax+20h], 0 jnz loc_85485 mov rax, [rbp+var_28] cmp qword ptr [rax+70h], 0 jnz short loc_853DD mov rax, [rbp+var_10] mov rax, [rax+18h] cmp qword ptr [rax+0B0h], 0 jz short loc_853A2 mov rax, [rbp+var_10] mov rax, [rax+18h] mov rax, [rax+0B0h] mov rcx, [rbp+var_10] mov rdi, [rcx+28h] xor esi, esi call rax loc_853A2: mov rdi, [rbp+var_28] add rdi, 18h call inline_mysql_mutex_unlock_11 mov rax, [rbp+var_28] cmp qword ptr [rax+0D0h], 0 jz short loc_853D2 mov rax, [rbp+var_28] mov rax, [rax+0D0h] mov rcx, [rbp+var_10] mov rdi, [rcx+28h] call rax loc_853D2: jmp short $+2 loc_853D4: mov [rbp+var_1], 0 jmp loc_854DD loc_853DD: mov rax, [rbp+var_10] mov rax, [rax+8] mov rcx, [rbp+var_10] mov rcx, [rcx+10h] mov [rcx], rax cmp rax, 0 jz short loc_8540C mov rax, [rbp+var_10] mov rcx, [rax+10h] mov rax, [rbp+var_10] mov rax, [rax+8] mov [rax+10h], rcx jmp short loc_8541F loc_8540C: mov rax, [rbp+var_10] mov rcx, [rax+10h] mov rax, [rbp+var_28] mov [rax+98h], rcx loc_8541F: mov rax, [rbp+var_28] mov rax, [rax+80h] mov rcx, [rbp+var_10] mov [rcx+8], rax cmp rax, 0 jz short loc_8544E mov rcx, [rbp+var_10] add rcx, 8 mov rax, [rbp+var_10] mov rax, [rax+8] mov [rax+10h], rcx jmp short loc_85461 loc_8544E: mov rcx, [rbp+var_10] add rcx, 8 mov rax, [rbp+var_28] mov [rax+88h], rcx loc_85461: mov rcx, [rbp+var_28] add rcx, 80h mov rax, [rbp+var_10] mov [rax+10h], rcx mov rcx, [rbp+var_10] mov rax, [rbp+var_28] mov [rax+80h], rcx jmp short loc_85487 loc_85485: jmp short $+2 loc_85487: mov rdi, [rbp+var_28] add rdi, 80h mov rsi, [rbp+var_10] mov rcx, [rbp+var_20] mov edx, 1 call wait_for_lock mov [rbp+var_2C], eax cmp [rbp+var_2C], 0 jnz short loc_854D7 mov rax, [rbp+var_28] cmp qword ptr [rax+0D0h], 0 jz short loc_854D7 jmp short $+2 loc_854BD: mov rax, [rbp+var_28] mov rax, [rax+0D0h] mov rcx, [rbp+var_10] mov rdi, [rcx+28h] call rax mov [rbp+var_1], al jmp short loc_854DD loc_854D7: jmp short $+2 loc_854D9: mov [rbp+var_1], 0 loc_854DD: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char thr_upgrade_write_delay_lock(long long a1, int a2, long long a3) { long long v3; // rax long long v4; // rax long long v6; // [rsp+8h] [rbp-28h] v6 = *(_QWORD *)(a1 + 24); inline_mysql_mutex_lock_11(v6 + 24, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c", 0x5A5u); if ( !*(_DWORD *)(a1 + 64) || *(int *)(a1 + 64) >= 11 ) { inline_mysql_mutex_unlock_11(v6 + 24); return *(_DWORD *)(a1 + 64) == 0; } *(_DWORD *)(a1 + 64) = a2; if ( *(_QWORD *)(a1 + 32) ) goto LABEL_18; if ( *(_QWORD *)(v6 + 112) ) { v3 = *(_QWORD *)(a1 + 8); **(_QWORD **)(a1 + 16) = v3; if ( v3 ) *(_QWORD *)(*(_QWORD *)(a1 + 8) + 16LL) = *(_QWORD *)(a1 + 16); else *(_QWORD *)(v6 + 152) = *(_QWORD *)(a1 + 16); v4 = *(_QWORD *)(v6 + 128); *(_QWORD *)(a1 + 8) = v4; if ( v4 ) *(_QWORD *)(*(_QWORD *)(a1 + 8) + 16LL) = a1 + 8; else *(_QWORD *)(v6 + 136) = a1 + 8; *(_QWORD *)(a1 + 16) = v6 + 128; *(_QWORD *)(v6 + 128) = a1; LABEL_18: if ( (unsigned int)wait_for_lock(v6 + 128, a1, 1LL, a3) || !*(_QWORD *)(v6 + 208) ) return 0; else return (*(long long ( **)(_QWORD))(v6 + 208))(*(_QWORD *)(a1 + 40)); } if ( *(_QWORD *)(*(_QWORD *)(a1 + 24) + 176LL) ) (*(void ( **)(_QWORD, _QWORD))(*(_QWORD *)(a1 + 24) + 176LL))(*(_QWORD *)(a1 + 40), 0LL); inline_mysql_mutex_unlock_11(v6 + 24); if ( *(_QWORD *)(v6 + 208) ) (*(void ( **)(_QWORD))(v6 + 208))(*(_QWORD *)(a1 + 40)); return 0; }
thr_upgrade_write_delay_lock: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x18 LEA RSI,[0x1da05f] MOV EDX,0x5a5 CALL 0x00183ba0 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x40],0x0 JZ 0x0018532c MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x40],0xb JL 0x00185351 LAB_0018532c: MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x18 CALL 0x00183c10 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x40],0x0 SETZ AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x1],AL JMP 0x001854dd LAB_00185351: MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x40],ECX MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x20],0x0 JNZ 0x00185485 MOV RAX,qword ptr [RBP + -0x28] CMP qword ptr [RAX + 0x70],0x0 JNZ 0x001853dd MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] CMP qword ptr [RAX + 0xb0],0x0 JZ 0x001853a2 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RAX + 0xb0] MOV RCX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RCX + 0x28] XOR ESI,ESI CALL RAX LAB_001853a2: MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x18 CALL 0x00183c10 MOV RAX,qword ptr [RBP + -0x28] CMP qword ptr [RAX + 0xd0],0x0 JZ 0x001853d2 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0xd0] MOV RCX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RCX + 0x28] CALL RAX LAB_001853d2: JMP 0x001853d4 LAB_001853d4: MOV byte ptr [RBP + -0x1],0x0 JMP 0x001854dd LAB_001853dd: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x10] MOV qword ptr [RCX],RAX CMP RAX,0x0 JZ 0x0018540c MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RAX + 0x10],RCX JMP 0x0018541f LAB_0018540c: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0x98],RCX LAB_0018541f: MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x80] MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x8],RAX CMP RAX,0x0 JZ 0x0018544e MOV RCX,qword ptr [RBP + -0x10] ADD RCX,0x8 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RAX + 0x10],RCX JMP 0x00185461 LAB_0018544e: MOV RCX,qword ptr [RBP + -0x10] ADD RCX,0x8 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0x88],RCX LAB_00185461: MOV RCX,qword ptr [RBP + -0x28] ADD RCX,0x80 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x10],RCX MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0x80],RCX JMP 0x00185487 LAB_00185485: JMP 0x00185487 LAB_00185487: MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x80 MOV RSI,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x20] MOV EDX,0x1 CALL 0x001854f0 MOV dword ptr [RBP + -0x2c],EAX CMP dword ptr [RBP + -0x2c],0x0 JNZ 0x001854d7 MOV RAX,qword ptr [RBP + -0x28] CMP qword ptr [RAX + 0xd0],0x0 JZ 0x001854d7 JMP 0x001854bd LAB_001854bd: MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0xd0] MOV RCX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RCX + 0x28] CALL RAX MOV byte ptr [RBP + -0x1],AL JMP 0x001854dd LAB_001854d7: JMP 0x001854d9 LAB_001854d9: MOV byte ptr [RBP + -0x1],0x0 LAB_001854dd: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int1 thr_upgrade_write_delay_lock(long param_1,int4 param_2,int8 param_3) { long lVar1; long lVar2; int iVar3; int1 local_9; lVar1 = *(long *)(param_1 + 0x18); inline_mysql_mutex_lock (lVar1 + 0x18,"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x5a5); if ((*(int *)(param_1 + 0x40) == 0) || (10 < *(int *)(param_1 + 0x40))) { inline_mysql_mutex_unlock(lVar1 + 0x18); local_9 = *(int *)(param_1 + 0x40) == 0; } else { *(int4 *)(param_1 + 0x40) = param_2; if (*(long *)(param_1 + 0x20) == 0) { if (*(long *)(lVar1 + 0x70) == 0) { if (*(long *)(*(long *)(param_1 + 0x18) + 0xb0) != 0) { (**(code **)(*(long *)(param_1 + 0x18) + 0xb0))(*(int8 *)(param_1 + 0x28),0); } inline_mysql_mutex_unlock(lVar1 + 0x18); if (*(long *)(lVar1 + 0xd0) != 0) { (**(code **)(lVar1 + 0xd0))(*(int8 *)(param_1 + 0x28)); } return 0; } lVar2 = *(long *)(param_1 + 8); **(long **)(param_1 + 0x10) = lVar2; if (lVar2 == 0) { *(int8 *)(lVar1 + 0x98) = *(int8 *)(param_1 + 0x10); } else { *(int8 *)(*(long *)(param_1 + 8) + 0x10) = *(int8 *)(param_1 + 0x10); } lVar2 = *(long *)(lVar1 + 0x80); *(long *)(param_1 + 8) = lVar2; if (lVar2 == 0) { *(long *)(lVar1 + 0x88) = param_1 + 8; } else { *(long *)(*(long *)(param_1 + 8) + 0x10) = param_1 + 8; } *(long *)(param_1 + 0x10) = lVar1 + 0x80; *(long *)(lVar1 + 0x80) = param_1; } iVar3 = wait_for_lock(lVar1 + 0x80,param_1,1,param_3); if ((iVar3 == 0) && (*(long *)(lVar1 + 0xd0) != 0)) { local_9 = (**(code **)(lVar1 + 0xd0))(*(int8 *)(param_1 + 0x28)); } else { local_9 = 0; } } return local_9; }
19,262
js_parse_expect
bluesky950520[P]quickjs/quickjs.c
static int js_parse_expect(JSParseState *s, int tok) { char buf[ATOM_GET_STR_BUF_SIZE]; if (s->token.val == tok) return next_token(s); switch(s->token.val) { case TOK_EOF: return js_parse_error(s, "Unexpected end of input"); case TOK_NUMBER: return js_parse_error(s, "Unexpected number"); case TOK_STRING: return js_parse_error(s, "Unexpected string"); case TOK_TEMPLATE: return js_parse_error(s, "Unexpected string template"); case TOK_REGEXP: return js_parse_error(s, "Unexpected regexp"); case TOK_IDENT: return js_parse_error(s, "Unexpected identifier '%s'", JS_AtomGetStr(s->ctx, buf, sizeof(buf), s->token.u.ident.atom)); case TOK_ERROR: return js_parse_error(s, "Invalid or unexpected token"); default: return js_parse_error(s, "Unexpected token '%.*s'", (int)(s->buf_ptr - s->token.ptr), (const char *)s->token.ptr); } }
O0
c
js_parse_expect: subq $0x68, %rsp movq %rdi, 0x58(%rsp) movl %esi, 0x54(%rsp) movq 0x58(%rsp), %rax movl 0x20(%rax), %eax cmpl 0x54(%rsp), %eax jne 0xa559e movq 0x58(%rsp), %rdi callq 0x9cfc0 movl %eax, 0x64(%rsp) jmp 0xa56ed movq 0x58(%rsp), %rax movl 0x20(%rax), %eax subl $-0x80, %eax movl %eax, %ecx movq %rcx, 0x8(%rsp) subl $0x2a, %eax ja 0xa56b6 movq 0x8(%rsp), %rax leaq 0x6640f(%rip), %rcx # 0x10b9d4 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x58(%rsp), %rdi leaq 0x6a2da(%rip), %rsi # 0x10f8b4 movb $0x0, %al callq 0x48690 movl %eax, 0x64(%rsp) jmp 0xa56ed movq 0x58(%rsp), %rdi leaq 0x696f9(%rip), %rsi # 0x10ecef movb $0x0, %al callq 0x48690 movl %eax, 0x64(%rsp) jmp 0xa56ed movq 0x58(%rsp), %rdi leaq 0x6a544(%rip), %rsi # 0x10fb56 movb $0x0, %al callq 0x48690 movl %eax, 0x64(%rsp) jmp 0xa56ed movq 0x58(%rsp), %rdi leaq 0x6a53a(%rip), %rsi # 0x10fb68 movb $0x0, %al callq 0x48690 movl %eax, 0x64(%rsp) jmp 0xa56ed movq 0x58(%rsp), %rdi leaq 0x6a539(%rip), %rsi # 0x10fb83 movb $0x0, %al callq 0x48690 movl %eax, 0x64(%rsp) jmp 0xa56ed movq 0x58(%rsp), %rax movq %rax, (%rsp) movq 0x58(%rsp), %rax movq (%rax), %rdi leaq 0x10(%rsp), %rsi movq 0x58(%rsp), %rax movl 0x38(%rax), %ecx movl $0x40, %edx callq 0x52b00 movq (%rsp), %rdi movq %rax, %rdx leaq 0x6a505(%rip), %rsi # 0x10fb95 movb $0x0, %al callq 0x48690 movl %eax, 0x64(%rsp) jmp 0xa56ed movq 0x58(%rsp), %rdi leaq 0x6a507(%rip), %rsi # 0x10fbb0 movb $0x0, %al callq 0x48690 movl %eax, 0x64(%rsp) jmp 0xa56ed movq 0x58(%rsp), %rdi movq 0x58(%rsp), %rax movq 0x70(%rax), %rax movq 0x58(%rsp), %rcx movq 0x30(%rcx), %rcx subq %rcx, %rax movl %eax, %edx movq 0x58(%rsp), %rax movq 0x30(%rax), %rcx leaq 0x6a4ea(%rip), %rsi # 0x10fbcc movb $0x0, %al callq 0x48690 movl %eax, 0x64(%rsp) movl 0x64(%rsp), %eax addq $0x68, %rsp retq nopw %cs:(%rax,%rax)
js_parse_expect: sub rsp, 68h mov [rsp+68h+var_10], rdi mov [rsp+68h+var_14], esi mov rax, [rsp+68h+var_10] mov eax, [rax+20h] cmp eax, [rsp+68h+var_14] jnz short loc_A559E mov rdi, [rsp+68h+var_10] call next_token mov [rsp+68h+var_4], eax jmp loc_A56ED loc_A559E: mov rax, [rsp+68h+var_10] mov eax, [rax+20h] sub eax, 0FFFFFF80h; switch 43 cases mov ecx, eax mov [rsp+68h+var_60], rcx sub eax, 2Ah ja def_A55CC; jumptable 00000000000A55CC default case, cases -123--89,-87 mov rax, [rsp+68h+var_60] lea rcx, jpt_A55CC movsxd rax, ds:(jpt_A55CC - 10B9D4h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_A55CE: mov rdi, [rsp+68h+var_10]; jumptable 00000000000A55CC case -86 lea rsi, aUnexpectedEndO_2; "Unexpected end of input" mov al, 0 call js_parse_error mov [rsp+68h+var_4], eax jmp loc_A56ED loc_A55EA: mov rdi, [rsp+68h+var_10]; jumptable 00000000000A55CC case -128 lea rsi, aUnexpectedNumb; "Unexpected number" mov al, 0 call js_parse_error mov [rsp+68h+var_4], eax jmp loc_A56ED loc_A5606: mov rdi, [rsp+68h+var_10]; jumptable 00000000000A55CC case -127 lea rsi, aUnexpectedStri; "Unexpected string" mov al, 0 call js_parse_error mov [rsp+68h+var_4], eax jmp loc_A56ED loc_A5622: mov rdi, [rsp+68h+var_10]; jumptable 00000000000A55CC case -126 lea rsi, aUnexpectedStri_0; "Unexpected string template" mov al, 0 call js_parse_error mov [rsp+68h+var_4], eax jmp loc_A56ED loc_A563E: mov rdi, [rsp+68h+var_10]; jumptable 00000000000A55CC case -124 lea rsi, aUnexpectedRege; "Unexpected regexp" mov al, 0 call js_parse_error mov [rsp+68h+var_4], eax jmp loc_A56ED loc_A565A: mov rax, [rsp+68h+var_10]; jumptable 00000000000A55CC case -125 mov [rsp+68h+var_68], rax mov rax, [rsp+68h+var_10] mov rdi, [rax] lea rsi, [rsp+68h+var_58] mov rax, [rsp+68h+var_10] mov ecx, [rax+38h] mov edx, 40h ; '@' call JS_AtomGetStr mov rdi, [rsp+68h+var_68] mov rdx, rax lea rsi, aUnexpectedIden; "Unexpected identifier '%s'" mov al, 0 call js_parse_error mov [rsp+68h+var_4], eax jmp short loc_A56ED loc_A569D: mov rdi, [rsp+68h+var_10]; jumptable 00000000000A55CC case -88 lea rsi, aInvalidOrUnexp; "Invalid or unexpected token" mov al, 0 call js_parse_error mov [rsp+68h+var_4], eax jmp short loc_A56ED def_A55CC: mov rdi, [rsp+68h+var_10]; jumptable 00000000000A55CC default case, cases -123--89,-87 mov rax, [rsp+68h+var_10] mov rax, [rax+70h] mov rcx, [rsp+68h+var_10] mov rcx, [rcx+30h] sub rax, rcx mov edx, eax mov rax, [rsp+68h+var_10] mov rcx, [rax+30h] lea rsi, aUnexpectedToke_3; "Unexpected token '%.*s'" mov al, 0 call js_parse_error mov [rsp+68h+var_4], eax loc_A56ED: mov eax, [rsp+68h+var_4] add rsp, 68h retn
long long js_parse_expect( long long a1, int a2, long long a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, long long a12, long long a13, long long a14) { long long v14; // rcx _BYTE *Str; // rax long long v16; // rcx long long v17; // r8 long long v18; // r9 __m128 v19; // xmm4 __m128 v20; // xmm5 char v22; // [rsp+0h] [rbp-68h] long long *v23; // [rsp+0h] [rbp-68h] _BYTE v24[68]; // [rsp+10h] [rbp-58h] BYREF int v25; // [rsp+54h] [rbp-14h] long long *v26; // [rsp+58h] [rbp-10h] unsigned int v27; // [rsp+64h] [rbp-4h] v26 = (long long *)a1; v25 = a2; if ( *(_DWORD *)(a1 + 32) == a2 ) { return (unsigned int)next_token(v26, a4, a5, a6, a7, *(double *)a8.m128_u64, *(double *)a9.m128_u64, a10, a11); } else { v14 = (unsigned int)(*((_DWORD *)v26 + 8) + 128); switch ( *((_DWORD *)v26 + 8) ) { case 0xFFFFFF80: v27 = js_parse_error( v26, (long long)"Unexpected number", a3, v14, a13, a14, a4, a5, a6, a7, a8, a9, a10, a11, v22); break; case 0xFFFFFF81: v27 = js_parse_error( v26, (long long)"Unexpected string", a3, v14, a13, a14, a4, a5, a6, a7, a8, a9, a10, a11, v22); break; case 0xFFFFFF82: v27 = js_parse_error( v26, (long long)"Unexpected string template", a3, v14, a13, a14, a4, a5, a6, a7, a8, a9, a10, a11, v22); break; case 0xFFFFFF83: v23 = v26; Str = JS_AtomGetStr(*v26, v24, 64, *((_DWORD *)v26 + 14)); v27 = js_parse_error( v23, (long long)"Unexpected identifier '%s'", (long long)Str, v16, v17, v18, a4, a5, a6, a7, v19, v20, a10, a11, (char)v23); break; case 0xFFFFFF84: v27 = js_parse_error( v26, (long long)"Unexpected regexp", a3, v14, a13, a14, a4, a5, a6, a7, a8, a9, a10, a11, v22); break; case 0xFFFFFFA8: v27 = js_parse_error( v26, (long long)"Invalid or unexpected token", a3, v14, a13, a14, a4, a5, a6, a7, a8, a9, a10, a11, v22); break; case 0xFFFFFFAA: v27 = js_parse_error( v26, (long long)"Unexpected end of input", a3, v14, a13, a14, a4, a5, a6, a7, a8, a9, a10, a11, v22); break; default: v27 = js_parse_error( v26, (long long)"Unexpected token '%.*s'", (unsigned int)v26[14] - (unsigned int)v26[6], v26[6], a13, a14, a4, a5, a6, a7, a8, a9, a10, a11, v22); break; } } return v27; }
js_parse_expect: SUB RSP,0x68 MOV qword ptr [RSP + 0x58],RDI MOV dword ptr [RSP + 0x54],ESI MOV RAX,qword ptr [RSP + 0x58] MOV EAX,dword ptr [RAX + 0x20] CMP EAX,dword ptr [RSP + 0x54] JNZ 0x001a559e MOV RDI,qword ptr [RSP + 0x58] CALL 0x0019cfc0 MOV dword ptr [RSP + 0x64],EAX JMP 0x001a56ed LAB_001a559e: MOV RAX,qword ptr [RSP + 0x58] MOV EAX,dword ptr [RAX + 0x20] SUB EAX,-0x80 MOV ECX,EAX MOV qword ptr [RSP + 0x8],RCX SUB EAX,0x2a JA 0x001a56b6 MOV RAX,qword ptr [RSP + 0x8] LEA RCX,[0x20b9d4] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_ffffffaa: MOV RDI,qword ptr [RSP + 0x58] LEA RSI,[0x20f8b4] MOV AL,0x0 CALL 0x00148690 MOV dword ptr [RSP + 0x64],EAX JMP 0x001a56ed caseD_ffffff80: MOV RDI,qword ptr [RSP + 0x58] LEA RSI,[0x20ecef] MOV AL,0x0 CALL 0x00148690 MOV dword ptr [RSP + 0x64],EAX JMP 0x001a56ed caseD_ffffff81: MOV RDI,qword ptr [RSP + 0x58] LEA RSI,[0x20fb56] MOV AL,0x0 CALL 0x00148690 MOV dword ptr [RSP + 0x64],EAX JMP 0x001a56ed caseD_ffffff82: MOV RDI,qword ptr [RSP + 0x58] LEA RSI,[0x20fb68] MOV AL,0x0 CALL 0x00148690 MOV dword ptr [RSP + 0x64],EAX JMP 0x001a56ed caseD_ffffff84: MOV RDI,qword ptr [RSP + 0x58] LEA RSI,[0x20fb83] MOV AL,0x0 CALL 0x00148690 MOV dword ptr [RSP + 0x64],EAX JMP 0x001a56ed caseD_ffffff83: MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP],RAX MOV RAX,qword ptr [RSP + 0x58] MOV RDI,qword ptr [RAX] LEA RSI,[RSP + 0x10] MOV RAX,qword ptr [RSP + 0x58] MOV ECX,dword ptr [RAX + 0x38] MOV EDX,0x40 CALL 0x00152b00 MOV RDI,qword ptr [RSP] MOV RDX,RAX LEA RSI,[0x20fb95] MOV AL,0x0 CALL 0x00148690 MOV dword ptr [RSP + 0x64],EAX JMP 0x001a56ed caseD_ffffffa8: MOV RDI,qword ptr [RSP + 0x58] LEA RSI,[0x20fbb0] MOV AL,0x0 CALL 0x00148690 MOV dword ptr [RSP + 0x64],EAX JMP 0x001a56ed caseD_ffffff85: MOV RDI,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RAX + 0x70] MOV RCX,qword ptr [RSP + 0x58] MOV RCX,qword ptr [RCX + 0x30] SUB RAX,RCX MOV EDX,EAX MOV RAX,qword ptr [RSP + 0x58] MOV RCX,qword ptr [RAX + 0x30] LEA RSI,[0x20fbcc] MOV AL,0x0 CALL 0x00148690 MOV dword ptr [RSP + 0x64],EAX LAB_001a56ed: MOV EAX,dword ptr [RSP + 0x64] ADD RSP,0x68 RET
int4 js_parse_expect(int8 *param_1,int param_2) { int8 uVar1; int1 local_58 [68]; int local_14; int8 *local_10; int4 local_4; local_14 = param_2; local_10 = param_1; if (*(int *)(param_1 + 4) == param_2) { local_4 = next_token(param_1); } else { switch(*(int4 *)(param_1 + 4)) { case 0xffffff80: local_4 = js_parse_error(param_1,"Unexpected number"); break; case 0xffffff81: local_4 = js_parse_error(param_1,"Unexpected string"); break; case 0xffffff82: local_4 = js_parse_error(param_1,"Unexpected string template"); break; case 0xffffff83: uVar1 = JS_AtomGetStr(*param_1,local_58,0x40,*(int4 *)(param_1 + 7)); local_4 = js_parse_error(param_1,"Unexpected identifier \'%s\'",uVar1); break; case 0xffffff84: local_4 = js_parse_error(param_1,"Unexpected regexp"); break; default: local_4 = js_parse_error(param_1,"Unexpected token \'%.*s\'", (int)param_1[0xe] - (int)param_1[6],param_1[6]); break; case 0xffffffa8: local_4 = js_parse_error(param_1,"Invalid or unexpected token"); break; case 0xffffffaa: local_4 = js_parse_error(param_1,"Unexpected end of input"); } } return local_4; }
19,263
js_parse_expect
bluesky950520[P]quickjs/quickjs.c
static int js_parse_expect(JSParseState *s, int tok) { char buf[ATOM_GET_STR_BUF_SIZE]; if (s->token.val == tok) return next_token(s); switch(s->token.val) { case TOK_EOF: return js_parse_error(s, "Unexpected end of input"); case TOK_NUMBER: return js_parse_error(s, "Unexpected number"); case TOK_STRING: return js_parse_error(s, "Unexpected string"); case TOK_TEMPLATE: return js_parse_error(s, "Unexpected string template"); case TOK_REGEXP: return js_parse_error(s, "Unexpected regexp"); case TOK_IDENT: return js_parse_error(s, "Unexpected identifier '%s'", JS_AtomGetStr(s->ctx, buf, sizeof(buf), s->token.u.ident.atom)); case TOK_ERROR: return js_parse_error(s, "Invalid or unexpected token"); default: return js_parse_error(s, "Unexpected token '%.*s'", (int)(s->buf_ptr - s->token.ptr), (const char *)s->token.ptr); } }
O2
c
js_parse_expect: pushq %rbx subq $0x40, %rsp movq %rdi, %rbx movl 0x20(%rdi), %eax cmpl %esi, %eax jne 0x55257 movq %rbx, %rdi addq $0x40, %rsp popq %rbx jmp 0x4fa4e leal 0x80(%rax), %ecx cmpl $0x4, %ecx ja 0x5527b leaq 0x2f167(%rip), %rax # 0x843d0 movslq (%rax,%rcx,4), %rcx addq %rax, %rcx jmpq *%rcx leaq 0x31962(%rip), %rsi # 0x86bdb jmp 0x552f0 cmpl $-0x58, %eax je 0x55297 cmpl $-0x56, %eax jne 0x552cd leaq 0x324fe(%rip), %rsi # 0x8778a jmp 0x552f0 leaq 0x327c4(%rip), %rsi # 0x87a59 jmp 0x552f0 leaq 0x327e8(%rip), %rsi # 0x87a86 jmp 0x552f0 leaq 0x32797(%rip), %rsi # 0x87a3e jmp 0x552f0 movq (%rbx), %rdi movl 0x38(%rbx), %edx movq %rsp, %rsi callq 0x2f335 leaq 0x327ad(%rip), %rsi # 0x87a6b movq %rbx, %rdi movq %rax, %rdx xorl %eax, %eax callq 0x28457 jmp 0x552fa movl 0x70(%rbx), %edx movq 0x30(%rbx), %rcx subl %ecx, %edx leaq 0x327c5(%rip), %rsi # 0x87aa2 movq %rbx, %rdi xorl %eax, %eax callq 0x28457 jmp 0x552fa leaq 0x3273c(%rip), %rsi # 0x87a2c movq %rbx, %rdi xorl %eax, %eax callq 0x28457 pushq $-0x1 popq %rax addq $0x40, %rsp popq %rbx retq
js_parse_expect: push rbx sub rsp, 40h mov rbx, rdi mov eax, [rdi+20h] cmp eax, esi jnz short loc_55257 mov rdi, rbx add rsp, 40h pop rbx jmp next_token loc_55257: lea ecx, [rax+80h]; switch 5 cases cmp ecx, 4 ja short def_55270; jumptable 0000000000055270 default case lea rax, jpt_55270 movsxd rcx, ds:(jpt_55270 - 843D0h)[rax+rcx*4] add rcx, rax jmp rcx; switch jump loc_55272: lea rsi, aUnexpectedNumb; jumptable 0000000000055270 case -128 jmp short loc_552F0 def_55270: cmp eax, 0FFFFFFA8h; jumptable 0000000000055270 default case jz short loc_55297 cmp eax, 0FFFFFFAAh jnz short loc_552CD lea rsi, aUnexpectedEndO_2; "Unexpected end of input" jmp short loc_552F0 loc_5528E: lea rsi, aUnexpectedRege; jumptable 0000000000055270 case -124 jmp short loc_552F0 loc_55297: lea rsi, aInvalidOrUnexp; "Invalid or unexpected token" jmp short loc_552F0 loc_552A0: lea rsi, aUnexpectedStri; jumptable 0000000000055270 case -126 jmp short loc_552F0 loc_552A9: mov rdi, [rbx]; jumptable 0000000000055270 case -125 mov edx, [rbx+38h] mov rsi, rsp call JS_AtomGetStr lea rsi, aUnexpectedIden; "Unexpected identifier '%s'" mov rdi, rbx mov rdx, rax xor eax, eax call js_parse_error jmp short loc_552FA loc_552CD: mov edx, [rbx+70h] mov rcx, [rbx+30h] sub edx, ecx lea rsi, aUnexpectedToke_2; "Unexpected token '%.*s'" mov rdi, rbx xor eax, eax call js_parse_error jmp short loc_552FA loc_552E9: lea rsi, aUnexpectedStri_0; jumptable 0000000000055270 case -127 loc_552F0: mov rdi, rbx xor eax, eax call js_parse_error loc_552FA: push 0FFFFFFFFFFFFFFFFh pop rax add rsp, 40h pop rbx retn
long long js_parse_expect( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { int v14; // eax long long result; // rax const char *v16; // rsi long long Str; // rax long long v18; // rcx long long v19; // r8 long long v20; // r9 __m128 v21; // xmm4 __m128 v22; // xmm5 char v23[72]; // [rsp+0h] [rbp-48h] BYREF v14 = *(_DWORD *)(a1 + 32); if ( v14 == (_DWORD)a2 ) return next_token(a1, a2, a3, a7, a8, a9, a10, a11, a12, a13, a14, a4, a5, a6); switch ( v14 ) { case -128: v16 = "Unexpected number"; goto LABEL_14; case -127: v16 = "Unexpected string"; goto LABEL_14; case -126: v16 = "Unexpected string template"; goto LABEL_14; case -125: Str = JS_AtomGetStr(*(_QWORD *)a1, v23, *(_DWORD *)(a1 + 56)); js_parse_error( (long long *)a1, (long long)"Unexpected identifier '%s'", Str, v18, v19, v20, a7, a8, a9, a10, v21, v22, a13, a14, v23[0]); goto LABEL_15; case -124: v16 = "Unexpected regexp"; goto LABEL_14; default: if ( v14 == -88 ) { v16 = "Invalid or unexpected token"; } else { if ( v14 != -86 ) { js_parse_error( (long long *)a1, (long long)"Unexpected token '%.*s'", *(_DWORD *)(a1 + 112) - (unsigned int)*(_QWORD *)(a1 + 48), *(_QWORD *)(a1 + 48), a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v23[0]); goto LABEL_15; } v16 = "Unexpected end of input"; } LABEL_14: js_parse_error( (long long *)a1, (long long)v16, a3, (unsigned int)(v14 + 128), a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v23[0]); LABEL_15: result = -1LL; break; } return result; }
js_parse_expect: PUSH RBX SUB RSP,0x40 MOV RBX,RDI MOV EAX,dword ptr [RDI + 0x20] CMP EAX,ESI JNZ 0x00155257 MOV RDI,RBX ADD RSP,0x40 POP RBX JMP 0x0014fa4e LAB_00155257: LEA ECX,[RAX + 0x80] CMP ECX,0x4 JA 0x0015527b LEA RAX,[0x1843d0] MOVSXD RCX,dword ptr [RAX + RCX*0x4] ADD RCX,RAX switchD: JMP RCX caseD_ffffff80: LEA RSI,[0x186bdb] JMP 0x001552f0 default: CMP EAX,-0x58 JZ 0x00155297 CMP EAX,-0x56 JNZ 0x001552cd LEA RSI,[0x18778a] JMP 0x001552f0 caseD_ffffff84: LEA RSI,[0x187a59] JMP 0x001552f0 LAB_00155297: LEA RSI,[0x187a86] JMP 0x001552f0 caseD_ffffff82: LEA RSI,[0x187a3e] JMP 0x001552f0 caseD_ffffff83: MOV RDI,qword ptr [RBX] MOV EDX,dword ptr [RBX + 0x38] MOV RSI,RSP CALL 0x0012f335 LEA RSI,[0x187a6b] MOV RDI,RBX MOV RDX,RAX XOR EAX,EAX CALL 0x00128457 JMP 0x001552fa LAB_001552cd: MOV EDX,dword ptr [RBX + 0x70] MOV RCX,qword ptr [RBX + 0x30] SUB EDX,ECX LEA RSI,[0x187aa2] MOV RDI,RBX XOR EAX,EAX CALL 0x00128457 JMP 0x001552fa caseD_ffffff81: LEA RSI,[0x187a2c] LAB_001552f0: MOV RDI,RBX XOR EAX,EAX CALL 0x00128457 LAB_001552fa: PUSH -0x1 POP RAX ADD RSP,0x40 POP RBX RET
int8 js_parse_expect(int8 *param_1,int param_2) { int iVar1; int8 uVar2; char *pcVar3; int1 auStack_48 [64]; iVar1 = *(int *)(param_1 + 4); if (iVar1 == param_2) { uVar2 = next_token(param_1); return uVar2; } switch(iVar1) { case -0x80: pcVar3 = "Unexpected number"; break; case -0x7f: pcVar3 = "Unexpected string"; break; case -0x7e: pcVar3 = "Unexpected string template"; break; case -0x7d: uVar2 = JS_AtomGetStr(*param_1,auStack_48,*(int4 *)(param_1 + 7)); js_parse_error(param_1,"Unexpected identifier \'%s\'",uVar2); return 0xffffffffffffffff; case -0x7c: pcVar3 = "Unexpected regexp"; break; default: if (iVar1 == -0x58) { pcVar3 = "Invalid or unexpected token"; } else { if (iVar1 != -0x56) { js_parse_error(param_1,"Unexpected token \'%.*s\'",*(int *)(param_1 + 0xe) - (int)param_1[6] ); return 0xffffffffffffffff; } pcVar3 = "Unexpected end of input"; } } js_parse_error(param_1,pcVar3); return 0xffffffffffffffff; }
19,264
testing::TestInfo::Run()
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc
void TestInfo::Run() { TestEventListener* repeater = UnitTest::GetInstance()->listeners().repeater(); if (!should_run_) { if (is_disabled_ && matches_filter_) repeater->OnTestDisabled(*this); return; } // Tells UnitTest where to store test result. UnitTest::GetInstance()->set_current_test_info(this); // Notifies the unit test event listeners that a test is about to start. repeater->OnTestStart(*this); result_.set_start_timestamp(internal::GetTimeInMillis()); internal::Timer timer; UnitTest::GetInstance()->UponLeavingGTest(); // Creates the test object. Test* const test = internal::HandleExceptionsInMethodIfSupported( factory_, &internal::TestFactoryBase::CreateTest, "the test fixture's constructor"); // Runs the test if the constructor didn't generate a fatal failure or invoke // GTEST_SKIP(). // Note that the object will not be null if (!Test::HasFatalFailure() && !Test::IsSkipped()) { // This doesn't throw as all user code that can throw are wrapped into // exception handling code. test->Run(); } if (test != nullptr) { // Deletes the test object. UnitTest::GetInstance()->UponLeavingGTest(); internal::HandleExceptionsInMethodIfSupported( test, &Test::DeleteSelf_, "the test fixture's destructor"); } result_.set_elapsed_time(timer.Elapsed()); // Notifies the unit test event listener that a test has just finished. repeater->OnTestEnd(*this); // Tells UnitTest to stop associating assertion results to this // test. UnitTest::GetInstance()->set_current_test_info(nullptr); }
O0
cpp
testing::TestInfo::Run(): subq $0x58, %rsp movq %rdi, 0x50(%rsp) movq 0x50(%rsp), %rax movq %rax, 0x10(%rsp) callq 0xc4be0 movq %rax, %rdi callq 0xcf830 movq %rax, %rdi callq 0xc86b0 movq %rax, %rcx movq 0x10(%rsp), %rax movq %rcx, 0x48(%rsp) testb $0x1, 0x80(%rax) jne 0xcf6df movq 0x10(%rsp), %rax testb $0x1, 0x81(%rax) je 0xcf6da movq 0x10(%rsp), %rax testb $0x1, 0x82(%rax) je 0xcf6da movq 0x10(%rsp), %rsi movq 0x48(%rsp), %rdi movq (%rdi), %rax callq *0x48(%rax) jmp 0xcf81d callq 0xc4be0 movq 0x10(%rsp), %rsi movq %rax, %rdi callq 0xcf850 movq 0x10(%rsp), %rsi movq 0x48(%rsp), %rdi movq (%rdi), %rax movq 0x40(%rax), %rax callq *%rax movq 0x10(%rsp), %rax addq $0x90, %rax movq %rax, 0x8(%rsp) callq 0xc8c90 movq 0x8(%rsp), %rdi movq %rax, %rsi callq 0xf08c0 leaq 0x40(%rsp), %rdi callq 0xf08e0 callq 0xc4be0 movq %rax, %rdi callq 0xcf8c0 movq 0x10(%rsp), %rax movq 0x88(%rax), %rdi movq $0x0, 0x30(%rsp) movq $0x11, 0x28(%rsp) movq 0x28(%rsp), %rsi movq 0x30(%rsp), %rdx leaq 0x4df0f(%rip), %rcx # 0x11d67b callq 0xf0910 movq %rax, 0x38(%rsp) callq 0xcec90 testb $0x1, %al jne 0xcf792 callq 0xcecb0 testb $0x1, %al jne 0xcf792 movq 0x38(%rsp), %rdi callq 0xceb80 cmpq $0x0, 0x38(%rsp) je 0xcf7d7 callq 0xc4be0 movq %rax, %rdi callq 0xcf8c0 movq 0x38(%rsp), %rdi leaq 0x2146d(%rip), %rax # 0xf0c20 movq %rax, 0x18(%rsp) movq $0x0, 0x20(%rsp) movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdx leaq 0x4dec8(%rip), %rcx # 0x11d69a callq 0xf0310 movq 0x10(%rsp), %rax addq $0x90, %rax movq %rax, (%rsp) leaq 0x40(%rsp), %rdi callq 0xf0c70 movq (%rsp), %rdi movq %rax, %rsi callq 0xf0c50 movq 0x10(%rsp), %rsi movq 0x48(%rsp), %rdi movq (%rdi), %rax callq *0x58(%rax) callq 0xc4be0 movq %rax, %rdi xorl %eax, %eax movl %eax, %esi callq 0xcf850 addq $0x58, %rsp retq nopw %cs:(%rax,%rax)
_ZN7testing8TestInfo3RunEv: sub rsp, 58h mov [rsp+58h+var_8], rdi mov rax, [rsp+58h+var_8] mov [rsp+58h+var_48], rax call _ZN7testing8UnitTest11GetInstanceEv; testing::UnitTest::GetInstance(void) mov rdi, rax; this call _ZN7testing8UnitTest9listenersEv; testing::UnitTest::listeners(void) mov rdi, rax; this call _ZN7testing18TestEventListeners8repeaterEv; testing::TestEventListeners::repeater(void) mov rcx, rax mov rax, [rsp+58h+var_48] mov [rsp+58h+var_10], rcx test byte ptr [rax+80h], 1 jnz short loc_CF6DF mov rax, [rsp+58h+var_48] test byte ptr [rax+81h], 1 jz short loc_CF6DA mov rax, [rsp+58h+var_48] test byte ptr [rax+82h], 1 jz short loc_CF6DA mov rsi, [rsp+58h+var_48] mov rdi, [rsp+58h+var_10] mov rax, [rdi] call qword ptr [rax+48h] loc_CF6DA: jmp loc_CF81D loc_CF6DF: call _ZN7testing8UnitTest11GetInstanceEv; testing::UnitTest::GetInstance(void) mov rsi, [rsp+58h+var_48]; testing::TestInfo * mov rdi, rax; this call _ZN7testing8UnitTest21set_current_test_infoEPNS_8TestInfoE; testing::UnitTest::set_current_test_info(testing::TestInfo *) mov rsi, [rsp+58h+var_48] mov rdi, [rsp+58h+var_10]; this mov rax, [rdi] mov rax, [rax+40h] call rax mov rax, [rsp+58h+var_48] add rax, 90h mov [rsp+58h+var_50], rax call _ZN7testing8internal15GetTimeInMillisEv; testing::internal::GetTimeInMillis(void) mov rdi, [rsp+58h+var_50]; this mov rsi, rax; __int64 call _ZN7testing10TestResult19set_start_timestampEl; testing::TestResult::set_start_timestamp(long) lea rdi, [rsp+58h+var_18]; this call _ZN7testing8internal5TimerC2Ev; testing::internal::Timer::Timer(void) call _ZN7testing8UnitTest11GetInstanceEv; testing::UnitTest::GetInstance(void) mov rdi, rax; this call _ZN7testing8UnitTest16UponLeavingGTestEv; testing::UnitTest::UponLeavingGTest(void) mov rax, [rsp+58h+var_48] mov rdi, [rax+88h]; this mov [rsp+58h+var_28], 0 mov [rsp+58h+var_30], 11h mov rsi, [rsp+58h+var_30] mov rdx, [rsp+58h+var_28] lea rcx, aTheTestFixture; "the test fixture's constructor" call _ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS0_15TestFactoryBaseEPNS_4TestEEET0_PT_MS6_FS5_vEPKc; testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::TestFactoryBase,testing::Test *>(testing::internal::TestFactoryBase *,testing::Test * (testing::internal::TestFactoryBase::*)(void),char const*) mov [rsp+58h+var_20], rax call _ZN7testing4Test15HasFatalFailureEv; testing::Test::HasFatalFailure(void) test al, 1 jnz short loc_CF792 call _ZN7testing4Test9IsSkippedEv; testing::Test::IsSkipped(void) test al, 1 jnz short loc_CF792 mov rdi, [rsp+58h+var_20]; this call _ZN7testing4Test3RunEv; testing::Test::Run(void) loc_CF792: cmp [rsp+58h+var_20], 0 jz short loc_CF7D7 call _ZN7testing8UnitTest11GetInstanceEv; testing::UnitTest::GetInstance(void) mov rdi, rax; this call _ZN7testing8UnitTest16UponLeavingGTestEv; testing::UnitTest::UponLeavingGTest(void) mov rdi, [rsp+58h+var_20] lea rax, _ZN7testing4Test11DeleteSelf_Ev; testing::Test::DeleteSelf_(void) mov [rsp+58h+var_40], rax mov [rsp+58h+var_38], 0 mov rsi, [rsp+58h+var_40] mov rdx, [rsp+58h+var_38] lea rcx, aTheTestFixture_0; "the test fixture's destructor" call _ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS_4TestEvEET0_PT_MS4_FS3_vEPKc; testing::internal::HandleExceptionsInMethodIfSupported<testing::Test,void>(testing::Test *,void (testing::Test::*)(void),char const*) loc_CF7D7: mov rax, [rsp+58h+var_48] add rax, 90h mov [rsp+58h+var_58], rax lea rdi, [rsp+58h+var_18]; this call _ZN7testing8internal5Timer7ElapsedEv; testing::internal::Timer::Elapsed(void) mov rdi, [rsp+58h+var_58]; this mov rsi, rax; __int64 call _ZN7testing10TestResult16set_elapsed_timeEl; testing::TestResult::set_elapsed_time(long) mov rsi, [rsp+58h+var_48] mov rdi, [rsp+58h+var_10]; this mov rax, [rdi] call qword ptr [rax+58h] call _ZN7testing8UnitTest11GetInstanceEv; testing::UnitTest::GetInstance(void) mov rdi, rax; this xor eax, eax mov esi, eax; testing::TestInfo * call _ZN7testing8UnitTest21set_current_test_infoEPNS_8TestInfoE; testing::UnitTest::set_current_test_info(testing::TestInfo *) loc_CF81D: add rsp, 58h retn
Run: SUB RSP,0x58 MOV qword ptr [RSP + 0x50],RDI MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x10],RAX CALL 0x001c4be0 MOV RDI,RAX CALL 0x001cf830 MOV RDI,RAX CALL 0x001c86b0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x48],RCX TEST byte ptr [RAX + 0x80],0x1 JNZ 0x001cf6df MOV RAX,qword ptr [RSP + 0x10] TEST byte ptr [RAX + 0x81],0x1 JZ 0x001cf6da MOV RAX,qword ptr [RSP + 0x10] TEST byte ptr [RAX + 0x82],0x1 JZ 0x001cf6da MOV RSI,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RSP + 0x48] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x48] LAB_001cf6da: JMP 0x001cf81d LAB_001cf6df: CALL 0x001c4be0 MOV RSI,qword ptr [RSP + 0x10] MOV RDI,RAX CALL 0x001cf850 MOV RSI,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RSP + 0x48] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x40] CALL RAX MOV RAX,qword ptr [RSP + 0x10] ADD RAX,0x90 MOV qword ptr [RSP + 0x8],RAX CALL 0x001c8c90 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,RAX CALL 0x001f08c0 LEA RDI,[RSP + 0x40] CALL 0x001f08e0 CALL 0x001c4be0 MOV RDI,RAX CALL 0x001cf8c0 MOV RAX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RAX + 0x88] MOV qword ptr [RSP + 0x30],0x0 MOV qword ptr [RSP + 0x28],0x11 MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x30] LEA RCX,[0x21d67b] CALL 0x001f0910 MOV qword ptr [RSP + 0x38],RAX CALL 0x001cec90 TEST AL,0x1 JNZ 0x001cf792 CALL 0x001cecb0 TEST AL,0x1 JNZ 0x001cf792 MOV RDI,qword ptr [RSP + 0x38] CALL 0x001ceb80 LAB_001cf792: CMP qword ptr [RSP + 0x38],0x0 JZ 0x001cf7d7 CALL 0x001c4be0 MOV RDI,RAX CALL 0x001cf8c0 MOV RDI,qword ptr [RSP + 0x38] LEA RAX,[0x1f0c20] MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x20],0x0 MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] LEA RCX,[0x21d69a] CALL 0x001f0310 LAB_001cf7d7: MOV RAX,qword ptr [RSP + 0x10] ADD RAX,0x90 MOV qword ptr [RSP],RAX LEA RDI,[RSP + 0x40] CALL 0x001f0c70 MOV RDI,qword ptr [RSP] MOV RSI,RAX CALL 0x001f0c50 MOV RSI,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RSP + 0x48] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x58] CALL 0x001c4be0 MOV RDI,RAX XOR EAX,EAX MOV ESI,EAX CALL 0x001cf850 LAB_001cf81d: ADD RSP,0x58 RET
/* testing::TestInfo::Run() */ void __thiscall testing::TestInfo::Run(TestInfo *this) { UnitTest *pUVar1; TestEventListeners *this_00; long lVar2; Test *this_01; ulong uVar3; Timer local_18 [8]; long *local_10; TestInfo *local_8; local_8 = this; pUVar1 = (UnitTest *)UnitTest::GetInstance(); this_00 = (TestEventListeners *)UnitTest::listeners(pUVar1); local_10 = (long *)TestEventListeners::repeater(this_00); if (((byte)this[0x80] & 1) == 0) { if ((((byte)this[0x81] & 1) != 0) && (((byte)this[0x82] & 1) != 0)) { (**(code **)(*local_10 + 0x48))(local_10,this); } } else { pUVar1 = (UnitTest *)UnitTest::GetInstance(); UnitTest::set_current_test_info(pUVar1,this); (**(code **)(*local_10 + 0x40))(local_10,this); lVar2 = internal::GetTimeInMillis(); TestResult::set_start_timestamp((TestResult *)(this + 0x90),lVar2); internal::Timer::Timer(local_18); pUVar1 = (UnitTest *)UnitTest::GetInstance(); UnitTest::UponLeavingGTest(pUVar1); this_01 = internal:: HandleExceptionsInMethodIfSupported<testing::internal::TestFactoryBase,testing::Test*> (*(TestFactoryBase **)(this + 0x88),(_func_Test_ptr *)0x11,(char *)0x0); uVar3 = Test::HasFatalFailure(); if (((uVar3 & 1) == 0) && (uVar3 = Test::IsSkipped(), (uVar3 & 1) == 0)) { Test::Run(this_01); } if (this_01 != (Test *)0x0) { pUVar1 = (UnitTest *)UnitTest::GetInstance(); UnitTest::UponLeavingGTest(pUVar1); internal::HandleExceptionsInMethodIfSupported<testing::Test,void> (this_01,Test::DeleteSelf_,(char *)0x0); } lVar2 = internal::Timer::Elapsed(local_18); TestResult::set_elapsed_time((TestResult *)(this + 0x90),lVar2); (**(code **)(*local_10 + 0x58))(local_10,this); pUVar1 = (UnitTest *)UnitTest::GetInstance(); UnitTest::set_current_test_info(pUVar1,(TestInfo *)0x0); } return; }
19,265
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>>>>>::~lexer()
monkey531[P]llama/common/json.hpp
~lexer() = default;
O3
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>>>>>::~lexer(): pushq %rbx movq %rdi, %rbx movq 0x50(%rdi), %rdi leaq 0x60(%rbx), %rax cmpq %rax, %rdi je 0x44bdc movq (%rax), %rsi incq %rsi callq 0x186a0 movq 0x38(%rbx), %rdi testq %rdi, %rdi je 0x44bf2 movq 0x48(%rbx), %rsi subq %rdi, %rsi popq %rbx jmp 0x186a0 popq %rbx retq
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEED2Ev: push rbx mov rbx, rdi mov rdi, [rdi+50h]; void * lea rax, [rbx+60h] cmp rdi, rax jz short loc_44BDC mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_44BDC: mov rdi, [rbx+38h]; void * test rdi, rdi jz short loc_44BF2 mov rsi, [rbx+48h] sub rsi, rdi; unsigned __int64 pop rbx jmp __ZdlPvm; operator delete(void *,ulong) loc_44BF2: pop rbx retn
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>>>::~lexer( _QWORD *a1) { _QWORD *v2; // rdi void *v3; // rdi v2 = (_QWORD *)a1[10]; if ( v2 != a1 + 12 ) operator delete(v2, a1[12] + 1LL); v3 = (void *)a1[7]; if ( v3 ) operator delete(v3, a1[9] - (_QWORD)v3); }
~lexer: PUSH RBX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x50] LEA RAX,[RBX + 0x60] CMP RDI,RAX JZ 0x00144bdc MOV RSI,qword ptr [RAX] INC RSI CALL 0x001186a0 LAB_00144bdc: MOV RDI,qword ptr [RBX + 0x38] TEST RDI,RDI JZ 0x00144bf2 MOV RSI,qword ptr [RBX + 0x48] SUB RSI,RDI POP RBX JMP 0x001186a0 LAB_00144bf2: 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 > > >::~lexer() */ void __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::~lexer(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) { void *pvVar1; if (*(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 + 0x50) != this + 0x60) { operator_delete(*(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 + 0x50),*(long *)(this + 0x60) + 1); } pvVar1 = *(void **)(this + 0x38); if (pvVar1 != (void *)0x0) { operator_delete(pvVar1,*(long *)(this + 0x48) - (long)pvVar1); return; } return; }
19,266
transid_get_packed
eloqsql/storage/maria/ma_key.c
ulonglong transid_get_packed(MARIA_SHARE *share, const uchar *from) { ulonglong value; uint length; if (from[0] < MARIA_MIN_TRANSID_PACK_OFFSET) value= (ulonglong) from[0]; else { value= 0; for (length= (uint) (from[0] - MARIA_TRANSID_PACK_OFFSET), value= (ulonglong) from[1], from+=2; --length ; from++) value= (value << 8) + ((ulonglong) *from); } return (value >> 1) + share->state.create_trid; }
O3
c
transid_get_packed: pushq %rbp movq %rsp, %rbp movzbl (%rsi), %ecx cmpq $0xf2, %rcx ja 0x37aa2 movq %rcx, %rax jmp 0x37acb movzbl 0x1(%rsi), %eax cmpl $0xfa, %ecx je 0x37acb addq $-0xfa, %rcx xorl %edx, %edx shlq $0x8, %rax movzbl 0x2(%rsi,%rdx), %r8d orq %r8, %rax incq %rdx cmpl %edx, %ecx jne 0x37ab7 shrq %rax addq 0xe0(%rdi), %rax popq %rbp retq
transid_get_packed: push rbp mov rbp, rsp movzx ecx, byte ptr [rsi] cmp rcx, 0F2h ja short loc_37AA2 mov rax, rcx jmp short loc_37ACB loc_37AA2: movzx eax, byte ptr [rsi+1] cmp ecx, 0FAh jz short loc_37ACB add rcx, 0FFFFFFFFFFFFFF06h xor edx, edx loc_37AB7: shl rax, 8 movzx r8d, byte ptr [rsi+rdx+2] or rax, r8 inc rdx cmp ecx, edx jnz short loc_37AB7 loc_37ACB: shr rax, 1 add rax, [rdi+0E0h] pop rbp retn
unsigned long long transid_get_packed(long long a1, unsigned __int8 *a2) { unsigned long long v2; // rcx unsigned long long v3; // rax int v4; // ecx long long v5; // rdx v2 = *a2; if ( v2 > 0xF2 ) { v3 = a2[1]; if ( (_DWORD)v2 != 250 ) { v4 = v2 - 250; v5 = 0LL; do v3 = a2[v5++ + 2] | (v3 << 8); while ( v4 != (_DWORD)v5 ); } } else { v3 = *a2; } return *(_QWORD *)(a1 + 224) + (v3 >> 1); }
transid_get_packed: PUSH RBP MOV RBP,RSP MOVZX ECX,byte ptr [RSI] CMP RCX,0xf2 JA 0x00137aa2 MOV RAX,RCX JMP 0x00137acb LAB_00137aa2: MOVZX EAX,byte ptr [RSI + 0x1] CMP ECX,0xfa JZ 0x00137acb ADD RCX,-0xfa XOR EDX,EDX LAB_00137ab7: SHL RAX,0x8 MOVZX R8D,byte ptr [RSI + RDX*0x1 + 0x2] OR RAX,R8 INC RDX CMP ECX,EDX JNZ 0x00137ab7 LAB_00137acb: SHR RAX,0x1 ADD RAX,qword ptr [RDI + 0xe0] POP RBP RET
long transid_get_packed(long param_1,byte *param_2) { byte bVar1; ulong uVar2; long lVar3; bVar1 = *param_2; uVar2 = (ulong)bVar1; if ((0xf2 < uVar2) && (uVar2 = (ulong)param_2[1], bVar1 != 0xfa)) { lVar3 = 0; do { uVar2 = uVar2 << 8 | (ulong)param_2[lVar3 + 2]; lVar3 = lVar3 + 1; } while (bVar1 - 0xfa != (int)lVar3); } return (uVar2 >> 1) + *(long *)(param_1 + 0xe0); }
19,267
auth_old_password
eloqsql/libmariadb/plugins/auth/old_password.c
static int auth_old_password(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql) { uchar *pkt; int pkt_len; if (((MCPVIO_EXT *)vio)->mysql_change_user) { /* in mysql_change_user() the client sends the first packet. we use the old scramble. */ pkt= (uchar*)mysql->scramble_buff; } else { /* read the scramble */ if ((pkt_len= vio->read_packet(vio, &pkt)) < 0) return CR_ERROR; if (pkt_len != SCRAMBLE_LENGTH_323 + 1 && pkt_len != SCRAMBLE_LENGTH + 1) return CR_SERVER_HANDSHAKE_ERR; /* save it in MYSQL */ memmove(mysql->scramble_buff, pkt, pkt_len - 1); mysql->scramble_buff[pkt_len - 1] = 0; } if (mysql && mysql->passwd[0]) { char scrambled[SCRAMBLE_LENGTH_323 + 1]; ma_scramble_323(scrambled, (char*)pkt, mysql->passwd); if (vio->write_packet(vio, (uchar*)scrambled, SCRAMBLE_LENGTH_323 + 1)) return CR_ERROR; } else if (vio->write_packet(vio, 0, 0)) /* no password */ return CR_ERROR; return CR_OK; }
O3
c
auth_old_password: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x20, %rsp movq %rsi, %r14 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x28(%rbp) cmpb $0x0, 0x48(%rdi) je 0x2e596 leaq 0x48e(%r14), %rax movq %rax, -0x40(%rbp) testq %r14, %r14 jne 0x2e5d6 jmp 0x2e609 leaq -0x40(%rbp), %rsi movq %rbx, %rdi callq *(%rbx) testl %eax, %eax js 0x2e604 movl %eax, %r12d cmpl $0x15, %eax je 0x2e5b7 movl $0x7dc, %r15d # imm = 0x7DC cmpl $0x9, %r12d jne 0x2e620 leaq 0x48e(%r14), %rdi movq -0x40(%rbp), %rsi decl %r12d movq %r12, %rdx callq 0x13720 movb $0x0, 0x48e(%r14,%r12) movq 0x2c0(%r14), %rdx cmpb $0x0, (%rdx) je 0x2e609 movq -0x40(%rbp), %rsi leaq -0x31(%rbp), %r14 movq %r14, %rdi callq 0x325c2 movq %rbx, %rdi movq %r14, %rsi movl $0x9, %edx callq *0x8(%rbx) testl %eax, %eax je 0x2e61a xorl %r15d, %r15d jmp 0x2e620 xorl %r15d, %r15d movq %rbx, %rdi xorl %esi, %esi xorl %edx, %edx callq *0x8(%rbx) testl %eax, %eax jne 0x2e620 movl $0xffffffff, %r15d # imm = 0xFFFFFFFF movq %fs:0x28, %rax cmpq -0x28(%rbp), %rax jne 0x2e63f movl %r15d, %eax addq $0x20, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq callq 0x13500
auth_old_password: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 20h mov r14, rsi mov rbx, rdi mov rax, fs:28h mov [rbp+var_28], rax cmp byte ptr [rdi+48h], 0 jz short loc_2E596 lea rax, [r14+48Eh] mov [rbp+var_40], rax test r14, r14 jnz short loc_2E5D6 jmp short loc_2E609 loc_2E596: lea rsi, [rbp+var_40] mov rdi, rbx call qword ptr [rbx] test eax, eax js short loc_2E604 mov r12d, eax cmp eax, 15h jz short loc_2E5B7 mov r15d, 7DCh cmp r12d, 9 jnz short loc_2E620 loc_2E5B7: lea rdi, [r14+48Eh] mov rsi, [rbp+var_40] dec r12d mov rdx, r12 call _memmove mov byte ptr [r14+r12+48Eh], 0 loc_2E5D6: mov rdx, [r14+2C0h] cmp byte ptr [rdx], 0 jz short loc_2E609 mov rsi, [rbp+var_40] lea r14, [rbp+var_31] mov rdi, r14 call ma_scramble_323 mov rdi, rbx mov rsi, r14 mov edx, 9 call qword ptr [rbx+8] test eax, eax jz short loc_2E61A loc_2E604: xor r15d, r15d jmp short loc_2E620 loc_2E609: xor r15d, r15d mov rdi, rbx xor esi, esi xor edx, edx call qword ptr [rbx+8] test eax, eax jnz short loc_2E620 loc_2E61A: mov r15d, 0FFFFFFFFh loc_2E620: mov rax, fs:28h cmp rax, [rbp+var_28] jnz short loc_2E63F mov eax, r15d add rsp, 20h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_2E63F: call ___stack_chk_fail
long long auth_old_password(long long a1, long long a2) { int v2; // eax unsigned int v3; // r15d unsigned int v4; // r12d long long v6; // [rsp+0h] [rbp-40h] BYREF _BYTE v7[9]; // [rsp+Fh] [rbp-31h] BYREF unsigned long long v8; // [rsp+18h] [rbp-28h] v8 = __readfsqword(0x28u); if ( !*(_BYTE *)(a1 + 72) ) { v2 = (*(long long ( **)(long long, long long *))a1)(a1, &v6); if ( v2 < 0 ) return 0; if ( v2 != 21 ) { v3 = 2012; if ( v2 != 9 ) return v3; } v4 = v2 - 1; memmove(a2 + 1166, v6, (unsigned int)(v2 - 1)); *(_BYTE *)(a2 + v4 + 1166) = 0; LABEL_8: if ( !**(_BYTE **)(a2 + 704) ) goto LABEL_11; ma_scramble_323(v7, v6); if ( !(*(unsigned int ( **)(long long, _BYTE *, long long))(a1 + 8))(a1, v7, 9LL) ) return (unsigned int)-1; return 0; } v6 = a2 + 1166; if ( a2 ) goto LABEL_8; LABEL_11: v3 = 0; if ( !(*(unsigned int ( **)(long long, _QWORD, _QWORD))(a1 + 8))(a1, 0LL, 0LL) ) return (unsigned int)-1; return v3; }
auth_old_password: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x20 MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX CMP byte ptr [RDI + 0x48],0x0 JZ 0x0012e596 LEA RAX,[R14 + 0x48e] MOV qword ptr [RBP + -0x40],RAX TEST R14,R14 JNZ 0x0012e5d6 JMP 0x0012e609 LAB_0012e596: LEA RSI,[RBP + -0x40] MOV RDI,RBX CALL qword ptr [RBX] TEST EAX,EAX JS 0x0012e604 MOV R12D,EAX CMP EAX,0x15 JZ 0x0012e5b7 MOV R15D,0x7dc CMP R12D,0x9 JNZ 0x0012e620 LAB_0012e5b7: LEA RDI,[R14 + 0x48e] MOV RSI,qword ptr [RBP + -0x40] DEC R12D MOV RDX,R12 CALL 0x00113720 MOV byte ptr [R14 + R12*0x1 + 0x48e],0x0 LAB_0012e5d6: MOV RDX,qword ptr [R14 + 0x2c0] CMP byte ptr [RDX],0x0 JZ 0x0012e609 MOV RSI,qword ptr [RBP + -0x40] LEA R14,[RBP + -0x31] MOV RDI,R14 CALL 0x001325c2 MOV RDI,RBX MOV RSI,R14 MOV EDX,0x9 CALL qword ptr [RBX + 0x8] TEST EAX,EAX JZ 0x0012e61a LAB_0012e604: XOR R15D,R15D JMP 0x0012e620 LAB_0012e609: XOR R15D,R15D MOV RDI,RBX XOR ESI,ESI XOR EDX,EDX CALL qword ptr [RBX + 0x8] TEST EAX,EAX JNZ 0x0012e620 LAB_0012e61a: MOV R15D,0xffffffff LAB_0012e620: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x28] JNZ 0x0012e63f MOV EAX,R15D ADD RSP,0x20 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0012e63f: CALL 0x00113500
int8 auth_old_password(int8 *param_1,long param_2) { int iVar1; int8 uVar2; long in_FS_OFFSET; void *local_48; int1 local_39 [9]; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); if (*(char *)(param_1 + 9) == '\0') { iVar1 = (*(code *)*param_1)(param_1,&local_48); if (-1 < iVar1) { if ((iVar1 != 0x15) && (uVar2 = 0x7dc, iVar1 != 9)) goto LAB_0012e620; memmove((void *)(param_2 + 0x48e),local_48,(ulong)(iVar1 - 1)); *(int1 *)(param_2 + 0x48e + (ulong)(iVar1 - 1)) = 0; goto LAB_0012e5d6; } LAB_0012e604: uVar2 = 0; goto LAB_0012e620; } local_48 = (void *)(param_2 + 0x48e); if (param_2 == 0) { LAB_0012e609: uVar2 = 0; iVar1 = (*(code *)param_1[1])(param_1,0,0); if (iVar1 != 0) goto LAB_0012e620; } else { LAB_0012e5d6: if (**(char **)(param_2 + 0x2c0) == '\0') goto LAB_0012e609; ma_scramble_323(local_39,local_48); iVar1 = (*(code *)param_1[1])(param_1,local_39,9); if (iVar1 != 0) goto LAB_0012e604; } uVar2 = 0xffffffff; LAB_0012e620: if (*(long *)(in_FS_OFFSET + 0x28) != local_30) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return uVar2; }
19,268
ftxui::(anonymous namespace)::Border::SetBox(ftxui::Box)
Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/dom/border.cpp
void SetBox(Box box) override { Node::SetBox(box); if (children_.size() == 2) { Box title_box; title_box.x_min = box.x_min + 1; title_box.x_max = box.x_max - 1; title_box.y_min = box.y_min; title_box.y_max = box.y_min; children_[1]->SetBox(title_box); } box.x_min++; box.x_max--; box.y_min++; box.y_max--; children_[0]->SetBox(box); }
O2
cpp
ftxui::(anonymous namespace)::Border::SetBox(ftxui::Box): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 movabsq $-0x100000000, %r13 # imm = 0xFFFFFFFF00000000 callq 0x1efd6 movq 0x8(%r15), %rax movq 0x10(%r15), %rdx subq %rax, %rdx leaq 0x1(%r14), %rcx cmpq $0x20, %rdx jne 0x1ccf3 movl %ebx, %esi movabsq $0x100000001, %rdx # imm = 0x100000001 imulq %rsi, %rdx movq 0x10(%rax), %rdi andq %r13, %r14 addq %r13, %r14 movl %ecx, %r12d orq %r14, %r12 movq (%rdi), %rax movq %r12, %rsi callq *0x18(%rax) movq 0x8(%r15), %rax jmp 0x1ccff andq %r13, %r14 addq %r13, %r14 movl %ecx, %r12d orq %r14, %r12 leal 0x1(%rbx), %edx movq (%rax), %rdi andq %r13, %rbx addq %r13, %rbx orq %rbx, %rdx movq (%rdi), %rax movq 0x18(%rax), %rax movq %r12, %rsi popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 jmpq *%rax nop
_ZN5ftxui12_GLOBAL__N_16Border6SetBoxENS_3BoxE: push r15 push r14 push r13 push r12 push rbx mov rbx, rdx mov r14, rsi mov r15, rdi mov r13, 0FFFFFFFF00000000h call _ZN5ftxui4Node6SetBoxENS_3BoxE; ftxui::Node::SetBox(ftxui::Box) mov rax, [r15+8] mov rdx, [r15+10h] sub rdx, rax lea rcx, [r14+1] cmp rdx, 20h ; ' ' jnz short loc_1CCF3 mov esi, ebx mov rdx, 100000001h imul rdx, rsi mov rdi, [rax+10h] and r14, r13 add r14, r13 mov r12d, ecx or r12, r14 mov rax, [rdi] mov rsi, r12 call qword ptr [rax+18h] mov rax, [r15+8] jmp short loc_1CCFF loc_1CCF3: and r14, r13 add r14, r13 mov r12d, ecx or r12, r14 loc_1CCFF: lea edx, [rbx+1] mov rdi, [rax] and rbx, r13 add rbx, r13 or rdx, rbx mov rax, [rdi] mov rax, [rax+18h] mov rsi, r12 pop rbx pop r12 pop r13 pop r14 pop r15 jmp rax
long long ftxui::`anonymous namespace'::Border::SetBox(long long a1, long long a2, long long a3) { _QWORD *v4; // rax ftxui::Node::SetBox(); v4 = *(_QWORD **)(a1 + 8); if ( *(_QWORD *)(a1 + 16) - (_QWORD)v4 == 32LL ) { (*(void ( **)(_QWORD, unsigned long long, long long))(*(_QWORD *)v4[2] + 24LL))( v4[2], ((a2 & 0xFFFFFFFF00000000LL) - 0x100000000LL) | (unsigned int)(a2 + 1), 0x100000001LL * (unsigned int)a3); v4 = *(_QWORD **)(a1 + 8); } return (*(long long ( **)(_QWORD, unsigned long long, unsigned long long))(*(_QWORD *)*v4 + 24LL))( *v4, ((a2 & 0xFFFFFFFF00000000LL) - 0x100000000LL) | (unsigned int)(a2 + 1), ((a3 & 0xFFFFFFFF00000000LL) - 0x100000000LL) | (unsigned int)(a3 + 1)); }
SetBox: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV RBX,RDX MOV R14,RSI MOV R15,RDI MOV R13,-0x100000000 CALL 0x0011efd6 MOV RAX,qword ptr [R15 + 0x8] MOV RDX,qword ptr [R15 + 0x10] SUB RDX,RAX LEA RCX,[R14 + 0x1] CMP RDX,0x20 JNZ 0x0011ccf3 MOV ESI,EBX MOV RDX,0x100000001 IMUL RDX,RSI MOV RDI,qword ptr [RAX + 0x10] AND R14,R13 ADD R14,R13 MOV R12D,ECX OR R12,R14 MOV RAX,qword ptr [RDI] MOV RSI,R12 CALL qword ptr [RAX + 0x18] MOV RAX,qword ptr [R15 + 0x8] JMP 0x0011ccff LAB_0011ccf3: AND R14,R13 ADD R14,R13 MOV R12D,ECX OR R12,R14 LAB_0011ccff: LEA EDX,[RBX + 0x1] MOV RDI,qword ptr [RAX] AND RBX,R13 ADD RBX,R13 OR RDX,RBX MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x18] MOV RSI,R12 POP RBX POP R12 POP R13 POP R14 POP R15 JMP RAX
/* ftxui::(anonymous namespace)::Border::SetBox(ftxui::Box) */ void ftxui::(anonymous_namespace)::Border::SetBox(long param_1,ulong param_2,ulong param_3) { int8 *puVar1; ulong uVar2; Node::SetBox(); puVar1 = *(int8 **)(param_1 + 8); if (*(long *)(param_1 + 0x10) - (long)puVar1 == 0x20) { uVar2 = param_2 + 1 & 0xffffffff | (param_2 & 0xffffffff00000000) - 0x100000000; (**(code **)(*(long *)puVar1[2] + 0x18)) ((long *)puVar1[2],uVar2,(param_3 & 0xffffffff) * 0x100000001); puVar1 = *(int8 **)(param_1 + 8); } else { uVar2 = param_2 + 1 & 0xffffffff | (param_2 & 0xffffffff00000000) - 0x100000000; } /* WARNING: Could not recover jumptable at 0x0011cd21. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(*(long *)*puVar1 + 0x18)) ((long *)*puVar1,uVar2, (ulong)((int)param_3 + 1) | (param_3 & 0xffffffff00000000) - 0x100000000); return; }
19,269
ftxui::separatorDashed()
Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/dom/separator.cpp
Element separatorDashed() { return std::make_shared<SeparatorAuto>(DASHED); }
O3
cpp
ftxui::separatorDashed(): pushq %r15 pushq %r14 pushq %rbx movq %rdi, %r14 movl $0x70, %edi callq 0xb3e0 movq %rax, %rbx movabsq $0x100000001, %rax # imm = 0x100000001 movq %rax, 0x8(%rbx) leaq 0x33413(%rip), %rax # 0x575f8 movq %rax, (%rbx) movq %rbx, %r15 addq $0x10, %r15 movq %r15, %rdi callq 0x23de0 leaq 0x3344a(%rip), %rax # 0x57648 movq %rax, 0x10(%rbx) movl $0x1, 0x6c(%rbx) movq %r15, (%r14) movq %rbx, 0x8(%r14) movq %r14, %rax popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movl $0x70, %esi movq %rbx, %rdi callq 0xb400 movq %r14, %rdi callq 0xb780
_ZN5ftxui15separatorDashedEv: push r15 push r14 push rbx mov r14, rdi mov edi, 70h ; 'p'; unsigned __int64 call __Znwm; operator new(ulong) mov rbx, rax mov rax, 100000001h mov [rbx+8], rax lea rax, off_575F8 mov [rbx], rax mov r15, rbx add r15, 10h mov rdi, r15; this call _ZN5ftxui4NodeC2Ev; ftxui::Node::Node(void) lea rax, off_57648 mov [rbx+10h], rax mov dword ptr [rbx+6Ch], 1 mov [r14], r15 mov [r14+8], rbx mov rax, r14 pop rbx pop r14 pop r15 retn mov r14, rax mov esi, 70h ; 'p'; unsigned __int64 mov rdi, rbx; void * call __ZdlPvm; operator delete(void *,ulong) mov rdi, r14 call __Unwind_Resume
ftxui * ftxui::separatorDashed(ftxui *this) { long long v1; // rbx v1 = operator new(0x70uLL); *(_QWORD *)(v1 + 8) = 0x100000001LL; *(_QWORD *)v1 = off_575F8; ftxui::Node::Node((ftxui::Node *)(v1 + 16)); *(_QWORD *)(v1 + 16) = off_57648; *(_DWORD *)(v1 + 108) = 1; *(_QWORD *)this = v1 + 16; *((_QWORD *)this + 1) = v1; return this; }
separatorDashed: PUSH R15 PUSH R14 PUSH RBX MOV R14,RDI MOV EDI,0x70 CALL 0x0010b3e0 MOV RBX,RAX MOV RAX,0x100000001 MOV qword ptr [RBX + 0x8],RAX LEA RAX,[0x1575f8] MOV qword ptr [RBX],RAX MOV R15,RBX ADD R15,0x10 LAB_001241ef: MOV RDI,R15 CALL 0x00123de0 LAB_001241f7: LEA RAX,[0x157648] MOV qword ptr [RBX + 0x10],RAX MOV dword ptr [RBX + 0x6c],0x1 MOV qword ptr [R14],R15 MOV qword ptr [R14 + 0x8],RBX MOV RAX,R14 POP RBX POP R14 POP R15 RET
/* ftxui::separatorDashed() */ ftxui * __thiscall ftxui::separatorDashed(ftxui *this) { int8 *puVar1; puVar1 = (int8 *)operator_new(0x70); puVar1[1] = 0x100000001; *puVar1 = &PTR___Sp_counted_ptr_inplace_001575f8; /* try { // try from 001241ef to 001241f6 has its CatchHandler @ 00124219 */ Node::Node((Node *)(puVar1 + 2)); puVar1[2] = &PTR__Node_00157648; *(int4 *)((long)puVar1 + 0x6c) = 1; *(Node **)this = (Node *)(puVar1 + 2); *(int8 **)(this + 8) = puVar1; return this; }
19,270
alaya::AlignAlloc<unsigned int>::AlignAlloc()
AlayaLite/include/executor/jobs/../../index/graph/../../utils/memory.hpp
auto allocate(int n) -> ValueType * { if (n <= 1 << 14) { int sz = (n * sizeof(ValueType) + 63) >> 6 << 6; return ptr_ = static_cast<ValueType *>(std::aligned_alloc(64, sz)); } int sz = (n * sizeof(ValueType) + (1 << 21) - 1) >> 21 << 21; ptr_ = static_cast<ValueType *>(std::aligned_alloc(1 << 21, sz)); madvise(ptr_, sz, MADV_HUGEPAGE); return ptr_; }
O0
cpp
alaya::AlignAlloc<unsigned int>::AlignAlloc(): subq $0x28, %rsp movq %rdi, 0x18(%rsp) movl %esi, 0x14(%rsp) movq 0x18(%rsp), %rax movq %rax, (%rsp) cmpl $0x4000, 0x14(%rsp) # imm = 0x4000 jg 0x4f976 movslq 0x14(%rsp), %rax imulq $0xc, %rax, %rax addq $0x3f, %rax shrq $0x6, %rax shlq $0x6, %rax movl %eax, 0x10(%rsp) movslq 0x10(%rsp), %rsi movl $0x40, %edi callq 0x15550 movq (%rsp), %rcx movq %rax, (%rcx) movq %rax, 0x20(%rsp) jmp 0x4f9cc movslq 0x14(%rsp), %rax imulq $0xc, %rax, %rax addq $0x200000, %rax # imm = 0x200000 subq $0x1, %rax shrq $0x15, %rax shlq $0x15, %rax movl %eax, 0xc(%rsp) movslq 0xc(%rsp), %rsi movl $0x200000, %edi # imm = 0x200000 callq 0x15550 movq %rax, %rcx movq (%rsp), %rax movq %rcx, (%rax) movq (%rax), %rdi movslq 0xc(%rsp), %rsi movl $0xe, %edx callq 0x15910 movq (%rsp), %rax movq (%rax), %rax movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rax addq $0x28, %rsp retq nopw %cs:(%rax,%rax)
_ZN5alaya10AlignAllocINS_8NeighborIjfEEE8allocateEi: sub rsp, 28h mov [rsp+28h+var_10], rdi mov [rsp+28h+var_14], esi mov rax, [rsp+28h+var_10] mov [rsp+28h+var_28], rax cmp [rsp+28h+var_14], 4000h jg short loc_4F976 movsxd rax, [rsp+28h+var_14] imul rax, 0Ch add rax, 3Fh ; '?' shr rax, 6 shl rax, 6 mov [rsp+28h+var_18], eax movsxd rsi, [rsp+28h+var_18] mov edi, 40h ; '@' call _aligned_alloc mov rcx, [rsp+28h+var_28] mov [rcx], rax mov [rsp+28h+var_8], rax jmp short loc_4F9CC loc_4F976: movsxd rax, [rsp+28h+var_14] imul rax, 0Ch add rax, 200000h sub rax, 1 shr rax, 15h shl rax, 15h mov [rsp+28h+var_1C], eax movsxd rsi, [rsp+28h+var_1C] mov edi, 200000h call _aligned_alloc mov rcx, rax mov rax, [rsp+28h+var_28] mov [rax], rcx mov rdi, [rax] movsxd rsi, [rsp+28h+var_1C] mov edx, 0Eh call _madvise mov rax, [rsp+28h+var_28] mov rax, [rax] mov [rsp+28h+var_8], rax loc_4F9CC: mov rax, [rsp+28h+var_8] add rsp, 28h retn
long long alaya::AlignAlloc<alaya::Neighbor<unsigned int,float>>::allocate(long long *a1, int a2) { long long v2; // rax signed int v4; // [rsp+Ch] [rbp-1Ch] if ( a2 > 0x4000 ) { v4 = (unsigned int)((unsigned long long)(12LL * a2 + 0x1FFFFF) >> 21) << 21; *a1 = aligned_alloc(0x200000LL, v4); madvise(*a1, v4, 14LL); return *a1; } else { v2 = aligned_alloc(64LL, (int)((unsigned int)((unsigned long long)(12LL * a2 + 63) >> 6) << 6)); *a1 = v2; return v2; } }
allocate: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV dword ptr [RSP + 0x14],ESI MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP],RAX CMP dword ptr [RSP + 0x14],0x4000 JG 0x0014f976 MOVSXD RAX,dword ptr [RSP + 0x14] IMUL RAX,RAX,0xc ADD RAX,0x3f SHR RAX,0x6 SHL RAX,0x6 MOV dword ptr [RSP + 0x10],EAX MOVSXD RSI,dword ptr [RSP + 0x10] MOV EDI,0x40 CALL 0x00115550 MOV RCX,qword ptr [RSP] MOV qword ptr [RCX],RAX MOV qword ptr [RSP + 0x20],RAX JMP 0x0014f9cc LAB_0014f976: MOVSXD RAX,dword ptr [RSP + 0x14] IMUL RAX,RAX,0xc ADD RAX,0x200000 SUB RAX,0x1 SHR RAX,0x15 SHL RAX,0x15 MOV dword ptr [RSP + 0xc],EAX MOVSXD RSI,dword ptr [RSP + 0xc] MOV EDI,0x200000 CALL 0x00115550 MOV RCX,RAX MOV RAX,qword ptr [RSP] MOV qword ptr [RAX],RCX MOV RDI,qword ptr [RAX] MOVSXD RSI,dword ptr [RSP + 0xc] MOV EDX,0xe CALL 0x00115910 MOV RAX,qword ptr [RSP] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x20],RAX LAB_0014f9cc: MOV RAX,qword ptr [RSP + 0x20] ADD RSP,0x28 RET
/* alaya::AlignAlloc<alaya::Neighbor<unsigned int, float> >::allocate(int) */ int8 __thiscall alaya::AlignAlloc<alaya::Neighbor<unsigned_int,float>>::allocate (AlignAlloc<alaya::Neighbor<unsigned_int,float>> *this,int param_1) { uint uVar1; int8 uVar2; int8 local_8; if (param_1 < 0x4001) { local_8 = aligned_alloc(0x40,(long)(int)(param_1 * 0xc + 0x3fU & 0xffffffc0)); *(int8 *)this = local_8; } else { uVar1 = param_1 * 0xc + 0x1fffffU & 0xffe00000; uVar2 = aligned_alloc(0x200000,(long)(int)uVar1); *(int8 *)this = uVar2; madvise(*(void **)this,(long)(int)uVar1,0xe); local_8 = *(int8 *)this; } return local_8; }
19,271
alaya::AlignAlloc<unsigned int>::AlignAlloc()
AlayaLite/include/executor/jobs/../../index/graph/../../utils/memory.hpp
auto allocate(int n) -> ValueType * { if (n <= 1 << 14) { int sz = (n * sizeof(ValueType) + 63) >> 6 << 6; return ptr_ = static_cast<ValueType *>(std::aligned_alloc(64, sz)); } int sz = (n * sizeof(ValueType) + (1 << 21) - 1) >> 21 << 21; ptr_ = static_cast<ValueType *>(std::aligned_alloc(1 << 21, sz)); madvise(ptr_, sz, MADV_HUGEPAGE); return ptr_; }
O3
cpp
alaya::AlignAlloc<unsigned int>::AlignAlloc(): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx leal (,%rsi,4), %eax leal (%rax,%rax,2), %eax cmpl $0x4000, %esi # imm = 0x4000 jg 0x23f67 addl $0x3f, %eax andl $-0x40, %eax movslq %eax, %rsi movl $0x40, %edi callq 0x11ba0 movq %rax, (%rbx) jmp 0x23f97 addl $0x1fffff, %eax # imm = 0x1FFFFF andl $0xffe00000, %eax # imm = 0xFFE00000 movslq %eax, %r14 movl $0x200000, %edi # imm = 0x200000 movq %r14, %rsi callq 0x11ba0 movq %rax, (%rbx) movq %rax, %rdi movq %r14, %rsi movl $0xe, %edx callq 0x116b0 movq (%rbx), %rax addq $0x8, %rsp popq %rbx popq %r14 retq nop
_ZN5alaya10AlignAllocINS_8NeighborIjfEEE8allocateEi: push r14 push rbx push rax mov rbx, rdi lea eax, ds:0[rsi*4] lea eax, [rax+rax*2] cmp esi, 4000h jg short loc_23F67 add eax, 3Fh ; '?' and eax, 0FFFFFFC0h movsxd rsi, eax mov edi, 40h ; '@' call _aligned_alloc mov [rbx], rax jmp short loc_23F97 loc_23F67: add eax, 1FFFFFh and eax, 0FFE00000h movsxd r14, eax mov edi, 200000h mov rsi, r14 call _aligned_alloc mov [rbx], rax mov rdi, rax mov rsi, r14 mov edx, 0Eh call _madvise mov rax, [rbx] loc_23F97: add rsp, 8 pop rbx pop r14 retn
long long alaya::AlignAlloc<alaya::Neighbor<unsigned int,float>>::allocate(long long a1, int a2) { int v2; // eax long long result; // rax long long v4; // r14 long long v5; // rax v2 = 12 * a2; if ( a2 > 0x4000 ) { v4 = (int)((v2 + 0x1FFFFF) & 0xFFE00000); v5 = aligned_alloc(0x200000LL, v4); *(_QWORD *)a1 = v5; madvise(v5, v4, 14LL); return *(_QWORD *)a1; } else { result = aligned_alloc(64LL, (int)((v2 + 63) & 0xFFFFFFC0)); *(_QWORD *)a1 = result; } return result; }
allocate: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI LEA EAX,[RSI*0x4] LEA EAX,[RAX + RAX*0x2] CMP ESI,0x4000 JG 0x00123f67 ADD EAX,0x3f AND EAX,0xffffffc0 MOVSXD RSI,EAX MOV EDI,0x40 CALL 0x00111ba0 MOV qword ptr [RBX],RAX JMP 0x00123f97 LAB_00123f67: ADD EAX,0x1fffff AND EAX,0xffe00000 MOVSXD R14,EAX MOV EDI,0x200000 MOV RSI,R14 CALL 0x00111ba0 MOV qword ptr [RBX],RAX MOV RDI,RAX MOV RSI,R14 MOV EDX,0xe CALL 0x001116b0 MOV RAX,qword ptr [RBX] LAB_00123f97: ADD RSP,0x8 POP RBX POP R14 RET
/* alaya::AlignAlloc<alaya::Neighbor<unsigned int, float> >::allocate(int) */ int8 __thiscall alaya::AlignAlloc<alaya::Neighbor<unsigned_int,float>>::allocate (AlignAlloc<alaya::Neighbor<unsigned_int,float>> *this,int param_1) { int8 uVar1; void *__addr; size_t __len; if (param_1 < 0x4001) { uVar1 = aligned_alloc(0x40,(long)(int)(param_1 * 0xc + 0x3fU & 0xffffffc0)); *(int8 *)this = uVar1; } else { __len = (size_t)(int)(param_1 * 0xc + 0x1fffffU & 0xffe00000); __addr = (void *)aligned_alloc(0x200000,__len); *(void **)this = __addr; madvise(__addr,__len,0xe); uVar1 = *(int8 *)this; } return uVar1; }
19,272
gzstreambuf::underflow()
iqtree3/utils/gzstream.cpp
int gzstreambuf::underflow() { // used for input buffer only if ( gptr() && ( gptr() < egptr())) return * reinterpret_cast<unsigned char *>( gptr()); if ( ! (mode & std::ios::in) || ! opened) return EOF; // Josuttis' implementation of inbuf long n_putback = gptr() - eback(); if ( n_putback > 4) n_putback = 4; memcpy( buffer + (4 - n_putback), gptr() - n_putback, n_putback); int num = gzread( file, buffer+4, bufferSize-4); if (num <= 0) // ERROR or EOF return EOF; compressed_position = gzoffset(file); // reset buffer pointers setg( buffer + (4 - n_putback), // beginning of putback area buffer + 4, // read position buffer + 4 + num); // end of buffer // return next character return * reinterpret_cast<unsigned char *>( gptr()); }
O3
cpp
gzstreambuf::underflow(): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdi, %rbx movq 0x10(%rdi), %rsi testq %rsi, %rsi je 0x296fc cmpq 0x18(%rbx), %rsi jae 0x296fc movzbl (%rsi), %ebp jmp 0x2977e testb $0x8, 0x178(%rbx) movl $0xffffffff, %ebp # imm = 0xFFFFFFFF je 0x2977e cmpb $0x0, 0x177(%rbx) je 0x2977e movq %rsi, %rax subq 0x8(%rbx), %rax cmpq $0x4, %rax movl $0x4, %edx cmovlq %rax, %rdx movq %rbx, %r14 subq %rdx, %r14 addq $0x4c, %r14 subq %rdx, %rsi movq %r14, %rdi callq 0x15260 movq 0x40(%rbx), %rdi leaq 0x4c(%rbx), %r15 movq %r15, %rsi movl $0x12b, %edx # imm = 0x12B callq 0x155c0 testl %eax, %eax jle 0x2977e movl %eax, %r12d movq 0x40(%rbx), %rdi callq 0x151a0 movq %rax, 0x188(%rbx) movl %r12d, %eax addq %r15, %rax movq %r14, 0x8(%rbx) movq %r15, 0x10(%rbx) movq %rax, 0x18(%rbx) movzbl 0x4c(%rbx), %ebp movl %ebp, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq nop
_ZN11gzstreambuf9underflowEv: push rbp push r15 push r14 push r12 push rbx mov rbx, rdi mov rsi, [rdi+10h] test rsi, rsi jz short loc_296FC cmp rsi, [rbx+18h] jnb short loc_296FC movzx ebp, byte ptr [rsi] jmp loc_2977E loc_296FC: test byte ptr [rbx+178h], 8 mov ebp, 0FFFFFFFFh jz short loc_2977E cmp byte ptr [rbx+177h], 0 jz short loc_2977E mov rax, rsi sub rax, [rbx+8] cmp rax, 4 mov edx, 4 cmovl rdx, rax mov r14, rbx sub r14, rdx add r14, 4Ch ; 'L' sub rsi, rdx mov rdi, r14 call _memcpy mov rdi, [rbx+40h] lea r15, [rbx+4Ch] mov rsi, r15 mov edx, 12Bh call _gzread test eax, eax jle short loc_2977E mov r12d, eax mov rdi, [rbx+40h] call _gzoffset mov [rbx+188h], rax mov eax, r12d add rax, r15 mov [rbx+8], r14 mov [rbx+10h], r15 mov [rbx+18h], rax movzx ebp, byte ptr [rbx+4Ch] loc_2977E: mov eax, ebp pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long gzstreambuf::underflow(gzstreambuf *this) { unsigned __int8 *v1; // rsi unsigned int v2; // ebp long long v3; // rdx char *v4; // r14 char *v5; // r15 int v6; // eax int v7; // r12d v1 = (unsigned __int8 *)*((_QWORD *)this + 2); if ( v1 && (unsigned long long)v1 < *((_QWORD *)this + 3) ) { return *v1; } else { v2 = -1; if ( (*((_BYTE *)this + 376) & 8) != 0 && *((_BYTE *)this + 375) ) { v3 = 4LL; if ( (long long)&v1[-*((_QWORD *)this + 1)] < 4 ) v3 = (long long)&v1[-*((_QWORD *)this + 1)]; v4 = (char *)this - v3 + 76; memcpy(v4, &v1[-v3], v3); v5 = (char *)this + 76; v6 = gzread(*((_QWORD *)this + 8), (char *)this + 76, 299LL); if ( v6 > 0 ) { v7 = v6; *((_QWORD *)this + 49) = gzoffset(*((_QWORD *)this + 8)); *((_QWORD *)this + 1) = v4; *((_QWORD *)this + 2) = v5; *((_QWORD *)this + 3) = &v5[v7]; return *((unsigned __int8 *)this + 76); } } } return v2; }
underflow: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RDI MOV RSI,qword ptr [RDI + 0x10] TEST RSI,RSI JZ 0x001296fc CMP RSI,qword ptr [RBX + 0x18] JNC 0x001296fc MOVZX EBP,byte ptr [RSI] JMP 0x0012977e LAB_001296fc: TEST byte ptr [RBX + 0x178],0x8 MOV EBP,0xffffffff JZ 0x0012977e CMP byte ptr [RBX + 0x177],0x0 JZ 0x0012977e MOV RAX,RSI SUB RAX,qword ptr [RBX + 0x8] CMP RAX,0x4 MOV EDX,0x4 CMOVL RDX,RAX MOV R14,RBX SUB R14,RDX ADD R14,0x4c SUB RSI,RDX MOV RDI,R14 CALL 0x00115260 MOV RDI,qword ptr [RBX + 0x40] LEA R15,[RBX + 0x4c] MOV RSI,R15 MOV EDX,0x12b CALL 0x001155c0 TEST EAX,EAX JLE 0x0012977e MOV R12D,EAX MOV RDI,qword ptr [RBX + 0x40] CALL 0x001151a0 MOV qword ptr [RBX + 0x188],RAX MOV EAX,R12D ADD RAX,R15 MOV qword ptr [RBX + 0x8],R14 MOV qword ptr [RBX + 0x10],R15 MOV qword ptr [RBX + 0x18],RAX MOVZX EBP,byte ptr [RBX + 0x4c] LAB_0012977e: MOV EAX,EBP POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* gzstreambuf::underflow() */ ulong __thiscall gzstreambuf::underflow(gzstreambuf *this) { gzstreambuf *pgVar1; byte *pbVar2; uint uVar3; int8 uVar4; size_t __n; ulong uVar5; pbVar2 = *(byte **)(this + 0x10); if ((pbVar2 == (byte *)0x0) || (*(byte **)(this + 0x18) <= pbVar2)) { uVar5 = 0xffffffff; if ((((byte)this[0x178] & 8) != 0) && (this[0x177] != (gzstreambuf)0x0)) { __n = 4; if ((long)pbVar2 - *(long *)(this + 8) < 4) { __n = (long)pbVar2 - *(long *)(this + 8); } memcpy(this + (0x4c - __n),pbVar2 + -__n,__n); pgVar1 = this + 0x4c; uVar3 = gzread(*(int8 *)(this + 0x40),pgVar1,299); if (0 < (int)uVar3) { uVar4 = gzoffset(*(int8 *)(this + 0x40)); *(int8 *)(this + 0x188) = uVar4; *(gzstreambuf **)(this + 8) = this + (0x4c - __n); *(gzstreambuf **)(this + 0x10) = pgVar1; *(gzstreambuf **)(this + 0x18) = pgVar1 + uVar3; uVar5 = (ulong)(byte)this[0x4c]; } } } else { uVar5 = (ulong)*pbVar2; } return uVar5; }
19,273
mi_ft_del
eloqsql/storage/myisam/ft_update.c
int _mi_ft_del(MI_INFO *info, uint keynr, uchar *keybuf, const uchar *record, my_off_t pos) { int error= -1; FT_WORD *wlist; DBUG_ENTER("_mi_ft_del"); DBUG_PRINT("enter",("keynr: %d",keynr)); if ((wlist=_mi_ft_parserecord(info, keynr, record, &info->ft_memroot))) error=_mi_ft_erase(info,keynr,keybuf,wlist,pos); free_root(&info->ft_memroot, MYF(MY_MARK_BLOCKS_FREE)); DBUG_PRINT("exit",("Return: %d",error)); DBUG_RETURN(error); }
O0
c
mi_ft_del: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movl $0xffffffff, -0x2c(%rbp) # imm = 0xFFFFFFFF jmp 0xa4e44 movq -0x8(%rbp), %rdi movl -0xc(%rbp), %esi movq -0x20(%rbp), %rdx movq -0x8(%rbp), %rcx addq $0x90, %rcx callq 0xa46e0 movq %rax, -0x38(%rbp) cmpq $0x0, %rax je 0xa4e84 movq -0x8(%rbp), %rdi movl -0xc(%rbp), %esi movq -0x18(%rbp), %rdx movq -0x38(%rbp), %rcx movq -0x28(%rbp), %r8 callq 0xa4c70 movl %eax, -0x2c(%rbp) movq -0x8(%rbp), %rdi addq $0x90, %rdi movl $0x2, %esi callq 0xef340 jmp 0xa4e9b jmp 0xa4e9d movl -0x2c(%rbp), %eax movl %eax, -0x3c(%rbp) movl -0x3c(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopl (%rax)
_mi_ft_del: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_2C], 0FFFFFFFFh jmp short $+2 loc_A4E44: mov rdi, [rbp+var_8] mov esi, [rbp+var_C] mov rdx, [rbp+var_20] mov rcx, [rbp+var_8] add rcx, 90h call _mi_ft_parserecord mov [rbp+var_38], rax cmp rax, 0 jz short loc_A4E84 mov rdi, [rbp+var_8] mov esi, [rbp+var_C] mov rdx, [rbp+var_18] mov rcx, [rbp+var_38] mov r8, [rbp+var_28] call _mi_ft_erase mov [rbp+var_2C], eax loc_A4E84: mov rdi, [rbp+var_8] add rdi, 90h mov esi, 2 call free_root jmp short $+2 loc_A4E9B: jmp short $+2 loc_A4E9D: mov eax, [rbp+var_2C] mov [rbp+var_3C], eax mov eax, [rbp+var_3C] add rsp, 40h pop rbp retn
long long mi_ft_del(_QWORD *a1, unsigned int a2, long long a3, long long a4, long long a5) { _QWORD *v6; // [rsp+8h] [rbp-38h] unsigned int v7; // [rsp+14h] [rbp-2Ch] v7 = -1; v6 = (_QWORD *)mi_ft_parserecord(a1, a2, a4, (long long)(a1 + 18)); if ( v6 ) v7 = mi_ft_erase((long long)a1, a2, a3, v6, a5); free_root(a1 + 18, 2LL); return v7; }
_mi_ft_del: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV dword ptr [RBP + -0x2c],0xffffffff JMP 0x001a4e44 LAB_001a4e44: MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0xc] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x8] ADD RCX,0x90 CALL 0x001a46e0 MOV qword ptr [RBP + -0x38],RAX CMP RAX,0x0 JZ 0x001a4e84 MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0xc] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x38] MOV R8,qword ptr [RBP + -0x28] CALL 0x001a4c70 MOV dword ptr [RBP + -0x2c],EAX LAB_001a4e84: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x90 MOV ESI,0x2 CALL 0x001ef340 JMP 0x001a4e9b LAB_001a4e9b: JMP 0x001a4e9d LAB_001a4e9d: MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x3c],EAX MOV EAX,dword ptr [RBP + -0x3c] ADD RSP,0x40 POP RBP RET
int4 _mi_ft_del(long param_1,int4 param_2,int8 param_3,int8 param_4,int8 param_5) { long lVar1; int4 local_34; local_34 = 0xffffffff; lVar1 = _mi_ft_parserecord(param_1,param_2,param_4,param_1 + 0x90); if (lVar1 != 0) { local_34 = _mi_ft_erase(param_1,param_2,param_3,lVar1,param_5); } free_root(param_1 + 0x90,2); return local_34; }
19,274
string_table_contains
tsotchke[P]eshkol/src/core/utils/string_table.c
bool string_table_contains(StringTable* table, const char* string) { assert(table != NULL); assert(string != NULL); // Compute hash size_t length = strlen(string); uint32_t hash = hash_string(string, length); // Compute bucket index size_t bucket = hash & (table->bucket_count - 1); // Look for existing entry Entry* entry = table->buckets[bucket]; while (entry) { if (entry->hash == hash && entry->length == length && memcmp(entry->string, string, length) == 0) { return true; } entry = entry->next; } return false; }
O2
c
string_table_contains: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx testq %rdi, %rdi je 0x441d movq %rsi, %rbx testq %rsi, %rsi je 0x443c movq %rdi, %r15 movq %rbx, %rdi callq 0x1060 movq %rax, %r14 movq %rbx, %rdi movq %rax, %rsi callq 0x430b movl %eax, %ebp movl 0x10(%r15), %r12d decl %r12d andl %eax, %r12d shlq $0x3, %r12 addq 0x8(%r15), %r12 movq (%r12), %r12 testq %r12, %r12 je 0x440e cmpl %ebp, 0x10(%r12) jne 0x4408 cmpq %r14, 0x8(%r12) jne 0x4408 movq (%r12), %rdi movq %rbx, %rsi movq %r14, %rdx callq 0x10e0 testl %eax, %eax je 0x440e addq $0x18, %r12 jmp 0x43de testq %r12, %r12 setne %al popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq leaq 0x3610(%rip), %rdi # 0x7a34 leaq 0x357f(%rip), %rsi # 0x79aa leaq 0x36a3(%rip), %rcx # 0x7ad5 movl $0xb8, %edx callq 0x1090 leaq 0x3646(%rip), %rdi # 0x7a89 leaq 0x3560(%rip), %rsi # 0x79aa leaq 0x3684(%rip), %rcx # 0x7ad5 movl $0xb9, %edx callq 0x1090
string_table_contains: push rbp push r15 push r14 push r12 push rbx test rdi, rdi jz short loc_441D mov rbx, rsi test rsi, rsi jz loc_443C mov r15, rdi mov rdi, rbx call _strlen mov r14, rax mov rdi, rbx mov rsi, rax call hash_string mov ebp, eax mov r12d, [r15+10h] dec r12d and r12d, eax shl r12, 3 add r12, [r15+8] loc_43DE: mov r12, [r12] test r12, r12 jz short loc_440E cmp [r12+10h], ebp jnz short loc_4408 cmp [r12+8], r14 jnz short loc_4408 mov rdi, [r12] mov rsi, rbx mov rdx, r14 call _bcmp test eax, eax jz short loc_440E loc_4408: add r12, 18h jmp short loc_43DE loc_440E: test r12, r12 setnz al pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_441D: lea rdi, aTableNull; "table != NULL" lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rcx, aBoolStringTabl; "_Bool string_table_contains(StringTable"... mov edx, 0B8h call ___assert_fail loc_443C: lea rdi, aStringNull; "string != NULL" lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rcx, aBoolStringTabl; "_Bool string_table_contains(StringTable"... mov edx, 0B9h call ___assert_fail
bool string_table_contains(long long a1, long long a2) { long long v2; // r14 int v3; // ebp long long *i; // r12 long long v5; // r12 if ( !a1 ) __assert_fail( "table != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/string_table.c", 184LL, "_Bool string_table_contains(StringTable *, const char *)"); if ( !a2 ) __assert_fail( "string != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/string_table.c", 185LL, "_Bool string_table_contains(StringTable *, const char *)"); v2 = strlen(a2); v3 = hash_string(a2, v2); for ( i = (long long *)(*(_QWORD *)(a1 + 8) + 8LL * (v3 & (unsigned int)(*(_DWORD *)(a1 + 16) - 1))); ; i = (long long *)(v5 + 24) ) { v5 = *i; if ( !v5 || *(_DWORD *)(v5 + 16) == v3 && *(_QWORD *)(v5 + 8) == v2 && !(unsigned int)bcmp(*(_QWORD *)v5, a2, v2) ) break; } return v5 != 0; }
string_table_contains: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX TEST RDI,RDI JZ 0x0010441d MOV RBX,RSI TEST RSI,RSI JZ 0x0010443c MOV R15,RDI MOV RDI,RBX CALL 0x00101060 MOV R14,RAX MOV RDI,RBX MOV RSI,RAX CALL 0x0010430b MOV EBP,EAX MOV R12D,dword ptr [R15 + 0x10] DEC R12D AND R12D,EAX SHL R12,0x3 ADD R12,qword ptr [R15 + 0x8] LAB_001043de: MOV R12,qword ptr [R12] TEST R12,R12 JZ 0x0010440e CMP dword ptr [R12 + 0x10],EBP JNZ 0x00104408 CMP qword ptr [R12 + 0x8],R14 JNZ 0x00104408 MOV RDI,qword ptr [R12] MOV RSI,RBX MOV RDX,R14 CALL 0x001010e0 TEST EAX,EAX JZ 0x0010440e LAB_00104408: ADD R12,0x18 JMP 0x001043de LAB_0010440e: TEST R12,R12 SETNZ AL POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0010441d: LEA RDI,[0x107a34] LEA RSI,[0x1079aa] LEA RCX,[0x107ad5] MOV EDX,0xb8 CALL 0x00101090 LAB_0010443c: LEA RDI,[0x107a89] LEA RSI,[0x1079aa] LEA RCX,[0x107ad5] MOV EDX,0xb9 CALL 0x00101090
bool string_table_contains(long param_1,char *param_2) { int8 *puVar1; uint uVar2; int iVar3; size_t __n; long *plVar4; if (param_1 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("table != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/string_table.c" ,0xb8,"_Bool string_table_contains(StringTable *, const char *)"); } if (param_2 == (char *)0x0) { /* WARNING: Subroutine does not return */ __assert_fail("string != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/string_table.c" ,0xb9,"_Bool string_table_contains(StringTable *, const char *)"); } __n = strlen(param_2); uVar2 = hash_string(param_2,__n); plVar4 = (long *)((ulong)(*(int *)(param_1 + 0x10) - 1U & uVar2) * 8 + *(long *)(param_1 + 8)); while (puVar1 = (int8 *)*plVar4, puVar1 != (int8 *)0x0) { if ((*(uint *)(puVar1 + 2) == uVar2) && (puVar1[1] == __n)) { iVar3 = bcmp((void *)*puVar1,param_2,__n); if (iVar3 == 0) break; } plVar4 = puVar1 + 3; } return puVar1 != (int8 *)0x0; }
19,275
ma_calc_total_blob_length
eloqsql/storage/maria/ma_dynrec.c
ulong _ma_calc_total_blob_length(MARIA_HA *info, const uchar *record) { ulong length; MARIA_BLOB *blob,*end; for (length=0, blob= info->blobs, end=blob+info->s->base.blobs ; blob != end; blob++) { blob->length= _ma_calc_blob_length(blob->pack_length, record + blob->offset); length+=blob->length; } return length; }
O3
c
ma_calc_total_blob_length: pushq %rbp movq %rsp, %rbp movq (%rdi), %rax movl 0x3f0(%rax), %eax testq %rax, %rax je 0x3cff8 movq 0x288(%rdi), %rcx shlq $0x3, %rax leaq (%rax,%rax,2), %rdx xorl %edi, %edi leaq 0xa4218(%rip), %r8 # 0xe11b4 xorl %eax, %eax movl 0x8(%rcx,%rdi), %r10d decl %r10d cmpl $0x3, %r10d ja 0x3cfe2 movq (%rcx,%rdi), %r9 movslq (%r8,%r10,4), %r10 addq %r8, %r10 jmpq *%r10 movzbl (%rsi,%r9), %r9d jmp 0x3cfe5 movzwl (%rsi,%r9), %r10d movzbl 0x2(%rsi,%r9), %r9d shll $0x10, %r9d orq %r10, %r9 jmp 0x3cfe5 movl (%rsi,%r9), %r9d jmp 0x3cfe5 movzwl (%rsi,%r9), %r9d jmp 0x3cfe5 xorl %r9d, %r9d movq %r9, 0x10(%rcx,%rdi) addq %r9, %rax addq $0x18, %rdi cmpq %rdi, %rdx jne 0x3cf9e jmp 0x3cffa xorl %eax, %eax popq %rbp retq
_ma_calc_total_blob_length: push rbp mov rbp, rsp mov rax, [rdi] mov eax, [rax+3F0h] test rax, rax jz short loc_3CFF8 mov rcx, [rdi+288h] shl rax, 3 lea rdx, [rax+rax*2] xor edi, edi lea r8, jpt_3CFB7 xor eax, eax loc_3CF9E: mov r10d, [rcx+rdi+8] dec r10d; switch 4 cases cmp r10d, 3 ja short def_3CFB7; jumptable 000000000003CFB7 default case mov r9, [rcx+rdi] movsxd r10, ds:(jpt_3CFB7 - 0E11B4h)[r8+r10*4] add r10, r8 jmp r10; switch jump loc_3CFBA: movzx r9d, byte ptr [rsi+r9]; jumptable 000000000003CFB7 case 1 jmp short loc_3CFE5 loc_3CFC1: movzx r10d, word ptr [rsi+r9]; jumptable 000000000003CFB7 case 3 movzx r9d, byte ptr [rsi+r9+2] shl r9d, 10h or r9, r10 jmp short loc_3CFE5 loc_3CFD5: mov r9d, [rsi+r9]; jumptable 000000000003CFB7 case 4 jmp short loc_3CFE5 loc_3CFDB: movzx r9d, word ptr [rsi+r9]; jumptable 000000000003CFB7 case 2 jmp short loc_3CFE5 def_3CFB7: xor r9d, r9d; jumptable 000000000003CFB7 default case loc_3CFE5: mov [rcx+rdi+10h], r9 add rax, r9 add rdi, 18h cmp rdx, rdi jnz short loc_3CF9E jmp short loc_3CFFA loc_3CFF8: xor eax, eax loc_3CFFA: pop rbp retn
long long ma_calc_total_blob_length(_QWORD *a1, long long a2) { long long v2; // rcx long long v3; // rdx long long v4; // rdi long long result; // rax long long v6; // r9 unsigned long long v7; // r9 if ( !*(_DWORD *)(*a1 + 1008LL) ) return 0LL; v2 = a1[81]; v3 = 24LL * *(unsigned int *)(*a1 + 1008LL); v4 = 0LL; result = 0LL; do { v6 = *(_QWORD *)(v2 + v4); switch ( *(_DWORD *)(v2 + v4 + 8) ) { case 1: v7 = *(unsigned __int8 *)(a2 + v6); break; case 2: v7 = *(unsigned __int16 *)(a2 + v6); break; case 3: v7 = *(unsigned __int16 *)(a2 + v6) | (unsigned long long)(*(unsigned __int8 *)(a2 + v6 + 2) << 16); break; case 4: v7 = *(unsigned int *)(a2 + v6); break; default: v7 = 0LL; break; } *(_QWORD *)(v2 + v4 + 16) = v7; result += v7; v4 += 24LL; } while ( v3 != v4 ); return result; }
_ma_calc_total_blob_length: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDI] MOV EAX,dword ptr [RAX + 0x3f0] TEST RAX,RAX JZ 0x0013cff8 MOV RCX,qword ptr [RDI + 0x288] SHL RAX,0x3 LEA RDX,[RAX + RAX*0x2] XOR EDI,EDI LEA R8,[0x1e11b4] XOR EAX,EAX LAB_0013cf9e: MOV R10D,dword ptr [RCX + RDI*0x1 + 0x8] DEC R10D CMP R10D,0x3 JA 0x0013cfe2 MOV R9,qword ptr [RCX + RDI*0x1] MOVSXD R10,dword ptr [R8 + R10*0x4] ADD R10,R8 switchD: JMP R10 caseD_1: MOVZX R9D,byte ptr [RSI + R9*0x1] JMP 0x0013cfe5 caseD_3: MOVZX R10D,word ptr [RSI + R9*0x1] MOVZX R9D,byte ptr [RSI + R9*0x1 + 0x2] SHL R9D,0x10 OR R9,R10 JMP 0x0013cfe5 caseD_4: MOV R9D,dword ptr [RSI + R9*0x1] JMP 0x0013cfe5 caseD_2: MOVZX R9D,word ptr [RSI + R9*0x1] JMP 0x0013cfe5 LAB_0013cfe2: XOR R9D,R9D LAB_0013cfe5: MOV qword ptr [RCX + RDI*0x1 + 0x10],R9 ADD RAX,R9 ADD RDI,0x18 CMP RDX,RDI JNZ 0x0013cf9e JMP 0x0013cffa LAB_0013cff8: XOR EAX,EAX LAB_0013cffa: POP RBP RET
long _ma_calc_total_blob_length(long *param_1,long param_2) { uint uVar1; int iVar2; long lVar3; long lVar4; long lVar5; long lVar6; ulong uVar7; uVar1 = *(uint *)(*param_1 + 0x3f0); if ((ulong)uVar1 == 0) { lVar5 = 0; } else { lVar3 = param_1[0x51]; lVar6 = 0; lVar5 = 0; do { iVar2 = *(int *)(lVar3 + 8 + lVar6); if (iVar2 - 1U < 4) { lVar4 = *(long *)(lVar3 + lVar6); switch(iVar2) { case 1: uVar7 = (ulong)*(byte *)(param_2 + lVar4); break; case 2: uVar7 = (ulong)*(ushort *)(param_2 + lVar4); break; case 3: uVar7 = (ulong)CONCAT12(*(int1 *)(param_2 + 2 + lVar4), *(int2 *)(param_2 + lVar4)); break; case 4: uVar7 = (ulong)*(uint *)(param_2 + lVar4); } } else { uVar7 = 0; } *(ulong *)(lVar3 + 0x10 + lVar6) = uVar7; lVar5 = lVar5 + uVar7; lVar6 = lVar6 + 0x18; } while ((ulong)uVar1 * 0x18 != lVar6); } return lVar5; }
19,276
mysql_insert_select_prepare_tester(THD*)
eloqsql/sql/sql_prepare.cc
static int mysql_insert_select_prepare_tester(THD *thd) { SELECT_LEX *first_select= thd->lex->first_select_lex(); TABLE_LIST *second_table= first_select->table_list.first->next_local; /* Skip first table, which is the table we are inserting in */ first_select->table_list.first= second_table; thd->lex->first_select_lex()->context.table_list= thd->lex->first_select_lex()->context.first_name_resolution_table= second_table; return mysql_insert_select_prepare(thd, NULL); }
O0
cpp
mysql_insert_select_prepare_tester(THD*): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq 0x58(%rax), %rdi callq 0x4bb3e0 movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x270(%rax), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x270(%rax) movq -0x18(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x8(%rbp), %rax movq 0x58(%rax), %rdi callq 0x4bb3e0 movq -0x20(%rbp), %rcx movq %rcx, 0x58(%rax) movq -0x8(%rbp), %rax movq 0x58(%rax), %rdi callq 0x4bb3e0 movq -0x20(%rbp), %rcx movq %rcx, 0x50(%rax) movq -0x8(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x576f30 addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZL34mysql_insert_select_prepare_testerP3THD: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rdi, [rax+58h]; this call _ZN3LEX16first_select_lexEv; LEX::first_select_lex(void) mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rax, [rax+270h] mov rax, [rax] mov [rbp+var_18], rax mov rcx, [rbp+var_18] mov rax, [rbp+var_10] mov [rax+270h], rcx mov rax, [rbp+var_18] mov [rbp+var_20], rax mov rax, [rbp+var_8] mov rdi, [rax+58h]; this call _ZN3LEX16first_select_lexEv; LEX::first_select_lex(void) mov rcx, [rbp+var_20] mov [rax+58h], rcx mov rax, [rbp+var_8] mov rdi, [rax+58h]; this call _ZN3LEX16first_select_lexEv; LEX::first_select_lex(void) mov rcx, [rbp+var_20] mov [rax+50h], rcx mov rdi, [rbp+var_8]; THD * xor eax, eax mov esi, eax; select_result * call _Z27mysql_insert_select_prepareP3THDP13select_result; mysql_insert_select_prepare(THD *,select_result *) add rsp, 20h pop rbp retn
long long mysql_insert_select_prepare_tester(LEX **a1) { long long v1; // rcx long long v3; // [rsp+0h] [rbp-20h] long long select_lex; // [rsp+10h] [rbp-10h] select_lex = LEX::first_select_lex(a1[11]); v1 = **(_QWORD **)(select_lex + 624); *(_QWORD *)(select_lex + 624) = v1; v3 = v1; *(_QWORD *)(LEX::first_select_lex(a1[11]) + 88) = v1; *(_QWORD *)(LEX::first_select_lex(a1[11]) + 80) = v3; return mysql_insert_select_prepare(a1, 0LL); }
set_row_field_definitions: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RAX JMP 0x005e566a LAB_005e566a: MOV RDI,qword ptr [RBP + -0x18] LEA RSI,[0x16f0890] CALL 0x005e89e0 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xd8],RCX ADD RSP,0x20 POP RBP RET
/* Spvar_definition::set_row_field_definitions(Row_definition_list*) */ void __thiscall Spvar_definition::set_row_field_definitions(Spvar_definition *this,Row_definition_list *param_1) { Type_handler_hybrid_field_type::set_handler ((Type_handler_hybrid_field_type *)this,(Type_handler *)type_handler_row); *(Row_definition_list **)(this + 0xd8) = param_1; return; }
19,277
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 0x3022c9(%rip), %rax # 0x333e60 movq (%rax), %rax leaq -0x78(%rbp), %rdi movl %ebx, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax jne 0x31bd9 movl %ebx, %edi movq %r13, %rsi movq %r14, %rdx movq %r12, %rcx movq -0x30(%rbp), %r8 callq 0x5d880 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 0x30227d(%rip), %rax # 0x333e60 movq (%rax), %rax leaq 0x634b2(%rip), %rdx # 0x9509f 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 0x5d880 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 0x302228(%rip), %rax # 0x333e60 movq (%rax), %rax movq %r15, %rdi callq *0x218(%rax) jmp 0x31bc7
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_31BD9 mov edi, ebx mov rsi, r13 mov rdx, r14 mov rcx, r12 mov r8, [rbp+var_30] call my_pread mov rbx, rax loc_31BC7: mov rax, rbx add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_31BD9: mov r15, rax lea rax, PSI_server mov rax, [rax] lea rdx, aWorkspaceLlm4b_1; "/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_31BC7
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,[0x433e60] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x78] MOV ESI,EBX MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x00131bd9 MOV EDI,EBX MOV RSI,R13 MOV RDX,R14 MOV RCX,R12 MOV R8,qword ptr [RBP + -0x30] CALL 0x0015d880 MOV RBX,RAX LAB_00131bc7: MOV RAX,RBX ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00131bd9: MOV R15,RAX LEA RAX,[0x433e60] MOV RAX,qword ptr [RAX] LEA RDX,[0x19509f] 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 0x0015d880 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,[0x433e60] MOV RAX,qword ptr [RAX] MOV RDI,R15 CALL qword ptr [RAX + 0x218] JMP 0x00131bc7
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; }
19,278
blst_verify
corpus-core[P]colibri-stateless/src/util/crypto.c
bool blst_verify(bytes32_t message_hash, /**< 32 bytes hashed message */ bls_signature_t signature, /**< 96 bytes signature */ uint8_t* public_keys, /**< 48 bytes public key array */ int num_public_keys, /**< number of public keys */ bytes_t pubkeys_used, bool deserialized // if true the publickeys are already deserialized (96 bytes(p1_affine)) ) { /**< num_public_keys.len = num_public_keys/8 and indicates with the bits set which of the public keys are part of the signature */ if (pubkeys_used.len != num_public_keys / 8) return false; // generate the aggregated pubkey blst_p2_affine sig; blst_p1_affine pubkey_aggregated; blst_p1 pubkey_sum; bool first_key = true; for (int i = 0; i < num_public_keys; i++) { if (pubkeys_used.data[i / 8] & (1 << (i % 8))) { blst_p1_affine pubkey_affine; if (deserialized) pubkey_affine = ((blst_p1_affine*) public_keys)[i]; else if (blst_p1_deserialize(&pubkey_affine, public_keys + i * 48) != BLST_SUCCESS) return false; if (first_key) { blst_p1_from_affine(&pubkey_sum, &pubkey_affine); first_key = false; } else blst_p1_add_or_double_affine(&pubkey_sum, &pubkey_sum, &pubkey_affine); } } blst_p1_to_affine(&pubkey_aggregated, &pubkey_sum); // deserialize signature if (blst_p2_deserialize(&sig, signature) != BLST_SUCCESS) return false; // Pairing... blst_pairing* ctx = (blst_pairing*) safe_malloc(blst_pairing_sizeof()); if (!ctx) return false; blst_pairing_init(ctx, true, blst_dst, blst_dst_len); if (blst_pairing_aggregate_pk_in_g1(ctx, &pubkey_aggregated, &sig, message_hash, 32, NULL, 0) != BLST_SUCCESS) { safe_free(ctx); return false; } blst_pairing_commit(ctx); bool result = blst_pairing_finalverify(ctx, NULL); // cleanup safe_free(ctx); return result; }
O0
c
blst_verify: pushq %rbp movq %rsp, %rbp subq $0x280, %rsp # imm = 0x280 movb 0x10(%rbp), %al movl %r8d, -0x18(%rbp) movq %r9, -0x10(%rbp) movq %rdi, -0x20(%rbp) movq %rsi, -0x28(%rbp) movq %rdx, -0x30(%rbp) movl %ecx, -0x34(%rbp) andb $0x1, %al movb %al, -0x35(%rbp) movl -0x18(%rbp), %eax movl %eax, -0x260(%rbp) movl -0x34(%rbp), %eax movl $0x8, %ecx cltd idivl %ecx movl %eax, %ecx movl -0x260(%rbp), %eax cmpl %ecx, %eax je 0xa3513 movb $0x0, -0x1(%rbp) jmp 0xa372e movb $0x1, -0x1e9(%rbp) movl $0x0, -0x1f0(%rbp) movl -0x1f0(%rbp), %eax cmpl -0x34(%rbp), %eax jge 0xa3636 movq -0x10(%rbp), %rax movq %rax, -0x270(%rbp) movl -0x1f0(%rbp), %eax movl $0x8, %ecx cltd idivl %ecx movl %eax, %ecx movq -0x270(%rbp), %rax movslq %ecx, %rcx movzbl (%rax,%rcx), %eax movl %eax, -0x264(%rbp) movl -0x1f0(%rbp), %eax movl $0x8, %ecx cltd idivl %ecx movl -0x264(%rbp), %eax movl %edx, %ecx movl $0x1, %edx shll %cl, %edx movl %edx, %ecx andl %ecx, %eax cmpl $0x0, %eax je 0xa3620 testb $0x1, -0x35(%rbp) je 0xa35b7 movq -0x30(%rbp), %rsi movslq -0x1f0(%rbp), %rax imulq $0x60, %rax, %rax addq %rax, %rsi leaq -0x250(%rbp), %rdi movl $0x60, %edx callq 0x231c0 jmp 0xa35e3 movq -0x30(%rbp), %rsi imull $0x30, -0x1f0(%rbp), %eax cltq addq %rax, %rsi leaq -0x250(%rbp), %rdi callq 0xa7d90 cmpl $0x0, %eax je 0xa35e1 movb $0x0, -0x1(%rbp) jmp 0xa372e jmp 0xa35e3 testb $0x1, -0x1e9(%rbp) je 0xa3608 leaq -0x1e8(%rbp), %rdi leaq -0x250(%rbp), %rsi callq 0xa7410 movb $0x0, -0x1e9(%rbp) jmp 0xa361e leaq -0x1e8(%rbp), %rsi leaq -0x250(%rbp), %rdx movq %rsi, %rdi callq 0xa8b00 jmp 0xa3620 jmp 0xa3622 movl -0x1f0(%rbp), %eax addl $0x1, %eax movl %eax, -0x1f0(%rbp) jmp 0xa3524 leaq -0x158(%rbp), %rdi leaq -0x1e8(%rbp), %rsi callq 0xa7370 movq -0x28(%rbp), %rsi leaq -0xf8(%rbp), %rdi callq 0xaac90 cmpl $0x0, %eax je 0xa3667 movb $0x0, -0x1(%rbp) jmp 0xa372e callq 0xaf1d0 movq %rax, %rdi callq 0x9c400 movq %rax, -0x258(%rbp) cmpq $0x0, -0x258(%rbp) jne 0xa368e movb $0x0, -0x1(%rbp) jmp 0xa372e movq -0x258(%rbp), %rdi movl $0x1, %esi leaq 0x421df(%rip), %rdx # 0xe5880 movl $0x2b, %ecx callq 0xaf1e0 movq -0x258(%rbp), %rdi movq -0x20(%rbp), %rcx leaq -0x158(%rbp), %rsi leaq -0xf8(%rbp), %rdx movl $0x20, %r8d xorl %eax, %eax movl %eax, %r9d movq $0x0, (%rsp) callq 0xaf950 cmpl $0x0, %eax je 0xa36f3 movq -0x258(%rbp), %rdi callq 0x9c5a0 movb $0x0, -0x1(%rbp) jmp 0xa372e movq -0x258(%rbp), %rdi callq 0xb0070 movq -0x258(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0xb0380 andb $0x1, %al movb %al, -0x259(%rbp) movq -0x258(%rbp), %rdi callq 0x9c5a0 movb -0x259(%rbp), %al andb $0x1, %al movb %al, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x280, %rsp # imm = 0x280 popq %rbp retq nopl (%rax)
blst_verify: push rbp mov rbp, rsp sub rsp, 280h mov al, [rbp+arg_0] mov [rbp+var_18], r8d mov [rbp+var_10], r9 mov [rbp+var_20], rdi mov [rbp+var_28], rsi mov [rbp+var_30], rdx mov [rbp+var_34], ecx and al, 1 mov [rbp+var_35], al mov eax, [rbp+var_18] mov [rbp+var_260], eax mov eax, [rbp+var_34] mov ecx, 8 cdq idiv ecx mov ecx, eax mov eax, [rbp+var_260] cmp eax, ecx jz short loc_A3513 mov [rbp+var_1], 0 jmp loc_A372E loc_A3513: mov [rbp+var_1E9], 1 mov [rbp+var_1F0], 0 loc_A3524: mov eax, [rbp+var_1F0] cmp eax, [rbp+var_34] jge loc_A3636 mov rax, [rbp+var_10] mov [rbp+var_270], rax mov eax, [rbp+var_1F0] mov ecx, 8 cdq idiv ecx mov ecx, eax mov rax, [rbp+var_270] movsxd rcx, ecx movzx eax, byte ptr [rax+rcx] mov [rbp+var_264], eax mov eax, [rbp+var_1F0] mov ecx, 8 cdq idiv ecx mov eax, [rbp+var_264] mov ecx, edx mov edx, 1 shl edx, cl mov ecx, edx and eax, ecx cmp eax, 0 jz loc_A3620 test [rbp+var_35], 1 jz short loc_A35B7 mov rsi, [rbp+var_30] movsxd rax, [rbp+var_1F0] imul rax, 60h ; '`' add rsi, rax lea rdi, [rbp+var_250] mov edx, 60h ; '`' call _memcpy jmp short loc_A35E3 loc_A35B7: mov rsi, [rbp+var_30] imul eax, [rbp+var_1F0], 30h ; '0' cdqe add rsi, rax lea rdi, [rbp+var_250] call blst_p1_deserialize cmp eax, 0 jz short loc_A35E1 mov [rbp+var_1], 0 jmp loc_A372E loc_A35E1: jmp short $+2 loc_A35E3: test [rbp+var_1E9], 1 jz short loc_A3608 lea rdi, [rbp+var_1E8] lea rsi, [rbp+var_250] call blst_p1_from_affine mov [rbp+var_1E9], 0 jmp short loc_A361E loc_A3608: lea rsi, [rbp+var_1E8] lea rdx, [rbp+var_250] mov rdi, rsi call blst_p1_add_or_double_affine loc_A361E: jmp short $+2 loc_A3620: jmp short $+2 loc_A3622: mov eax, [rbp+var_1F0] add eax, 1 mov [rbp+var_1F0], eax jmp loc_A3524 loc_A3636: lea rdi, [rbp+var_158] lea rsi, [rbp+var_1E8] call blst_p1_to_affine mov rsi, [rbp+var_28] lea rdi, [rbp+var_F8] call blst_p2_deserialize cmp eax, 0 jz short loc_A3667 mov [rbp+var_1], 0 jmp loc_A372E loc_A3667: call blst_pairing_sizeof mov rdi, rax call safe_malloc mov [rbp+var_258], rax cmp [rbp+var_258], 0 jnz short loc_A368E mov [rbp+var_1], 0 jmp loc_A372E loc_A368E: mov rdi, [rbp+var_258] mov esi, 1 lea rdx, blst_dst; "BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_"... mov ecx, 2Bh ; '+' call blst_pairing_init mov rdi, [rbp+var_258] mov rcx, [rbp+var_20] lea rsi, [rbp+var_158] lea rdx, [rbp+var_F8] mov r8d, 20h ; ' ' xor eax, eax mov r9d, eax mov [rsp+280h+var_280], 0 call blst_pairing_aggregate_pk_in_g1 cmp eax, 0 jz short loc_A36F3 mov rdi, [rbp+var_258] call safe_free mov [rbp+var_1], 0 jmp short loc_A372E loc_A36F3: mov rdi, [rbp+var_258] call blst_pairing_commit mov rdi, [rbp+var_258] xor eax, eax mov esi, eax call blst_pairing_finalverify and al, 1 mov [rbp+var_259], al mov rdi, [rbp+var_258] call safe_free mov al, [rbp+var_259] and al, 1 mov [rbp+var_1], al loc_A372E: mov al, [rbp+var_1] and al, 1 add rsp, 280h pop rbp retn
char blst_verify(long long a1, long long a2, long long a3, int a4, int a5, long long a6, char a7) { long long v7; // rdx long long v8; // rax char v10; // [rsp+27h] [rbp-259h] long long v11; // [rsp+28h] [rbp-258h] _BYTE v12[96]; // [rsp+30h] [rbp-250h] BYREF int i; // [rsp+90h] [rbp-1F0h] char v14; // [rsp+97h] [rbp-1E9h] _BYTE v15[144]; // [rsp+98h] [rbp-1E8h] BYREF _BYTE v16[96]; // [rsp+128h] [rbp-158h] BYREF _BYTE v17[195]; // [rsp+188h] [rbp-F8h] BYREF char v18; // [rsp+24Bh] [rbp-35h] int v19; // [rsp+24Ch] [rbp-34h] long long v20; // [rsp+250h] [rbp-30h] long long v21; // [rsp+258h] [rbp-28h] long long v22; // [rsp+260h] [rbp-20h] int v23; // [rsp+268h] [rbp-18h] long long v24; // [rsp+270h] [rbp-10h] v23 = a5; v24 = a6; v22 = a1; v21 = a2; v20 = a3; v19 = a4; v18 = a7 & 1; v7 = (unsigned int)(a4 >> 31); LODWORD(v7) = a4 % 8; if ( a5 != a4 / 8 ) return 0; v14 = 1; for ( i = 0; i < v19; ++i ) { v7 = (unsigned int)(1 << (i % 8)); if ( ((1 << (i % 8)) & *(unsigned __int8 *)(v24 + i / 8)) != 0 ) { if ( (v18 & 1) != 0 ) { memcpy(v12, 96LL * i + v20, sizeof(v12)); } else if ( (unsigned int)blst_p1_deserialize(v12, 48 * i + v20) ) { return 0; } if ( (v14 & 1) != 0 ) { blst_p1_from_affine(v15, v12); v14 = 0; } else { blst_p1_add_or_double_affine(v15, v15, v12); } } } blst_p1_to_affine(v16, v15, v7); if ( (unsigned int)blst_p2_deserialize(v17, v21) ) return 0; v8 = blst_pairing_sizeof(); v11 = safe_malloc(v8); if ( !v11 ) return 0; blst_pairing_init(v11, 1LL, "BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_POP_", 43LL); if ( (unsigned int)blst_pairing_aggregate_pk_in_g1(v11, (unsigned int)v16, (unsigned int)v17, v22, 32, 0, 0LL) ) { safe_free(v11); return 0; } else { blst_pairing_commit(v11); v10 = blst_pairing_finalverify(v11, 0LL) & 1; safe_free(v11); return v10 & 1; } }
blst_verify: PUSH RBP MOV RBP,RSP SUB RSP,0x280 MOV AL,byte ptr [RBP + 0x10] MOV dword ptr [RBP + -0x18],R8D MOV qword ptr [RBP + -0x10],R9 MOV qword ptr [RBP + -0x20],RDI MOV qword ptr [RBP + -0x28],RSI MOV qword ptr [RBP + -0x30],RDX MOV dword ptr [RBP + -0x34],ECX AND AL,0x1 MOV byte ptr [RBP + -0x35],AL MOV EAX,dword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x260],EAX MOV EAX,dword ptr [RBP + -0x34] MOV ECX,0x8 CDQ IDIV ECX MOV ECX,EAX MOV EAX,dword ptr [RBP + -0x260] CMP EAX,ECX JZ 0x001a3513 MOV byte ptr [RBP + -0x1],0x0 JMP 0x001a372e LAB_001a3513: MOV byte ptr [RBP + -0x1e9],0x1 MOV dword ptr [RBP + -0x1f0],0x0 LAB_001a3524: MOV EAX,dword ptr [RBP + -0x1f0] CMP EAX,dword ptr [RBP + -0x34] JGE 0x001a3636 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x270],RAX MOV EAX,dword ptr [RBP + -0x1f0] MOV ECX,0x8 CDQ IDIV ECX MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x270] MOVSXD RCX,ECX MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV dword ptr [RBP + -0x264],EAX MOV EAX,dword ptr [RBP + -0x1f0] MOV ECX,0x8 CDQ IDIV ECX MOV EAX,dword ptr [RBP + -0x264] MOV ECX,EDX MOV EDX,0x1 SHL EDX,CL MOV ECX,EDX AND EAX,ECX CMP EAX,0x0 JZ 0x001a3620 TEST byte ptr [RBP + -0x35],0x1 JZ 0x001a35b7 MOV RSI,qword ptr [RBP + -0x30] MOVSXD RAX,dword ptr [RBP + -0x1f0] IMUL RAX,RAX,0x60 ADD RSI,RAX LEA RDI,[RBP + -0x250] MOV EDX,0x60 CALL 0x001231c0 JMP 0x001a35e3 LAB_001a35b7: MOV RSI,qword ptr [RBP + -0x30] IMUL EAX,dword ptr [RBP + -0x1f0],0x30 CDQE ADD RSI,RAX LEA RDI,[RBP + -0x250] CALL 0x001a7d90 CMP EAX,0x0 JZ 0x001a35e1 MOV byte ptr [RBP + -0x1],0x0 JMP 0x001a372e LAB_001a35e1: JMP 0x001a35e3 LAB_001a35e3: TEST byte ptr [RBP + -0x1e9],0x1 JZ 0x001a3608 LEA RDI,[RBP + -0x1e8] LEA RSI,[RBP + -0x250] CALL 0x001a7410 MOV byte ptr [RBP + -0x1e9],0x0 JMP 0x001a361e LAB_001a3608: LEA RSI,[RBP + -0x1e8] LEA RDX,[RBP + -0x250] MOV RDI,RSI CALL 0x001a8b00 LAB_001a361e: JMP 0x001a3620 LAB_001a3620: JMP 0x001a3622 LAB_001a3622: MOV EAX,dword ptr [RBP + -0x1f0] ADD EAX,0x1 MOV dword ptr [RBP + -0x1f0],EAX JMP 0x001a3524 LAB_001a3636: LEA RDI,[RBP + -0x158] LEA RSI,[RBP + -0x1e8] CALL 0x001a7370 MOV RSI,qword ptr [RBP + -0x28] LEA RDI,[RBP + -0xf8] CALL 0x001aac90 CMP EAX,0x0 JZ 0x001a3667 MOV byte ptr [RBP + -0x1],0x0 JMP 0x001a372e LAB_001a3667: CALL 0x001af1d0 MOV RDI,RAX CALL 0x0019c400 MOV qword ptr [RBP + -0x258],RAX CMP qword ptr [RBP + -0x258],0x0 JNZ 0x001a368e MOV byte ptr [RBP + -0x1],0x0 JMP 0x001a372e LAB_001a368e: MOV RDI,qword ptr [RBP + -0x258] MOV ESI,0x1 LEA RDX,[0x1e5880] MOV ECX,0x2b CALL 0x001af1e0 MOV RDI,qword ptr [RBP + -0x258] MOV RCX,qword ptr [RBP + -0x20] LEA RSI,[RBP + -0x158] LEA RDX,[RBP + -0xf8] MOV R8D,0x20 XOR EAX,EAX MOV R9D,EAX MOV qword ptr [RSP],0x0 CALL 0x001af950 CMP EAX,0x0 JZ 0x001a36f3 MOV RDI,qword ptr [RBP + -0x258] CALL 0x0019c5a0 MOV byte ptr [RBP + -0x1],0x0 JMP 0x001a372e LAB_001a36f3: MOV RDI,qword ptr [RBP + -0x258] CALL 0x001b0070 MOV RDI,qword ptr [RBP + -0x258] XOR EAX,EAX MOV ESI,EAX CALL 0x001b0380 AND AL,0x1 MOV byte ptr [RBP + -0x259],AL MOV RDI,qword ptr [RBP + -0x258] CALL 0x0019c5a0 MOV AL,byte ptr [RBP + -0x259] AND AL,0x1 MOV byte ptr [RBP + -0x1],AL LAB_001a372e: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x280 POP RBP RET
byte blst_verify(int8 param_1,int8 param_2,long param_3,int param_4,int param_5, long param_6,byte param_7) { byte bVar1; int iVar2; int8 uVar3; long lVar4; uint uVar5; ulong uVar6; ulong extraout_RDX; ulong extraout_RDX_00; int1 local_258 [96]; int local_1f8; byte local_1f1; int1 local_1f0 [144]; int1 local_160 [96]; int1 local_100 [195]; byte local_3d; int local_3c; long local_38; int8 local_30; int8 local_28; int local_20; long local_18; byte local_9; local_3d = param_7 & 1; uVar6 = (long)param_4 % 8 & 0xffffffff; if (param_5 == param_4 / 8) { local_1f1 = 1; local_3c = param_4; local_38 = param_3; local_30 = param_2; local_28 = param_1; local_20 = param_5; local_18 = param_6; for (local_1f8 = 0; local_1f8 < local_3c; local_1f8 = local_1f8 + 1) { uVar5 = 1 << ((byte)((long)local_1f8 % 8) & 0x1f); uVar6 = (ulong)uVar5; if ((*(byte *)(local_18 + local_1f8 / 8) & uVar5) != 0) { if ((local_3d & 1) == 0) { iVar2 = blst_p1_deserialize(local_258,local_38 + local_1f8 * 0x30); if (iVar2 != 0) { return 0; } } else { memcpy(local_258,(void *)(local_38 + (long)local_1f8 * 0x60),0x60); } if ((local_1f1 & 1) == 0) { blst_p1_add_or_double_affine(local_1f0,local_1f0,local_258); uVar6 = extraout_RDX_00; } else { blst_p1_from_affine(local_1f0,local_258); local_1f1 = 0; uVar6 = extraout_RDX; } } } blst_p1_to_affine(local_160,local_1f0,uVar6); iVar2 = blst_p2_deserialize(local_100,local_30); if (iVar2 == 0) { uVar3 = blst_pairing_sizeof(); lVar4 = safe_malloc(uVar3); if (lVar4 == 0) { local_9 = 0; } else { blst_pairing_init(lVar4,1,"BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_POP_",0x2b); iVar2 = blst_pairing_aggregate_pk_in_g1(lVar4,local_160,local_100,local_28,0x20,0,0); if (iVar2 == 0) { blst_pairing_commit(lVar4); bVar1 = blst_pairing_finalverify(lVar4,0); safe_free(lVar4); local_9 = bVar1 & 1; } else { safe_free(lVar4); local_9 = 0; } } } else { local_9 = 0; } } else { local_9 = 0; } return local_9; }
19,279
blst_verify
corpus-core[P]colibri-stateless/src/util/crypto.c
bool blst_verify(bytes32_t message_hash, /**< 32 bytes hashed message */ bls_signature_t signature, /**< 96 bytes signature */ uint8_t* public_keys, /**< 48 bytes public key array */ int num_public_keys, /**< number of public keys */ bytes_t pubkeys_used, bool deserialized // if true the publickeys are already deserialized (96 bytes(p1_affine)) ) { /**< num_public_keys.len = num_public_keys/8 and indicates with the bits set which of the public keys are part of the signature */ if (pubkeys_used.len != num_public_keys / 8) return false; // generate the aggregated pubkey blst_p2_affine sig; blst_p1_affine pubkey_aggregated; blst_p1 pubkey_sum; bool first_key = true; for (int i = 0; i < num_public_keys; i++) { if (pubkeys_used.data[i / 8] & (1 << (i % 8))) { blst_p1_affine pubkey_affine; if (deserialized) pubkey_affine = ((blst_p1_affine*) public_keys)[i]; else if (blst_p1_deserialize(&pubkey_affine, public_keys + i * 48) != BLST_SUCCESS) return false; if (first_key) { blst_p1_from_affine(&pubkey_sum, &pubkey_affine); first_key = false; } else blst_p1_add_or_double_affine(&pubkey_sum, &pubkey_sum, &pubkey_affine); } } blst_p1_to_affine(&pubkey_aggregated, &pubkey_sum); // deserialize signature if (blst_p2_deserialize(&sig, signature) != BLST_SUCCESS) return false; // Pairing... blst_pairing* ctx = (blst_pairing*) safe_malloc(blst_pairing_sizeof()); if (!ctx) return false; blst_pairing_init(ctx, true, blst_dst, blst_dst_len); if (blst_pairing_aggregate_pk_in_g1(ctx, &pubkey_aggregated, &sig, message_hash, 32, NULL, 0) != BLST_SUCCESS) { safe_free(ctx); return false; } blst_pairing_commit(ctx); bool result = blst_pairing_finalverify(ctx, NULL); // cleanup safe_free(ctx); return result; }
O3
c
blst_verify: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1c8, %rsp # imm = 0x1C8 leal 0x7(%rcx), %eax testl %ecx, %ecx cmovnsl %ecx, %eax sarl $0x3, %eax cmpl %r8d, %eax jne 0x54f52 movq %rsi, 0x10(%rsp) movq %rdi, 0x8(%rsp) testl %ecx, %ecx jle 0x54f2a movq %r9, %r15 movq %rdx, %rbx movl %ecx, %r14d movb $0x1, %r13b xorl %ebp, %ebp movq %rdx, %r12 movl %ebp, %eax shrl $0x3, %eax movzbl (%r15,%rax), %eax movl %ebp, %ecx andl $0x7, %ecx btl %ecx, %eax jae 0x54f1a cmpb $0x0, 0x200(%rsp) je 0x54edf movl $0xc, %ecx leaq 0x18(%rsp), %rdi movq %rbx, %rsi rep movsq (%rsi), %es:(%rdi) jmp 0x54ef0 leaq 0x18(%rsp), %rdi movq %r12, %rsi callq 0x57c0a testl %eax, %eax jne 0x54f52 leaq 0xd8(%rsp), %rdi testb $0x1, %r13b je 0x54f0a leaq 0x18(%rsp), %rsi callq 0x57519 jmp 0x54f17 movq %rdi, %rsi leaq 0x18(%rsp), %rdx callq 0x58837 xorl %r13d, %r13d incq %rbp addq $0x30, %r12 addq $0x60, %rbx cmpq %rbp, %r14 jne 0x54eaf leaq 0x168(%rsp), %rdi leaq 0xd8(%rsp), %rsi callq 0x574b8 leaq 0x18(%rsp), %rdi movq 0x10(%rsp), %rsi callq 0x5abc5 testl %eax, %eax je 0x54f68 xorl %ebp, %ebp movl %ebp, %eax addq $0x1c8, %rsp # imm = 0x1C8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x5f25c movq %rax, %rdi callq 0x50ecc testq %rax, %rax je 0x54f52 movq %rax, %rbx leaq 0x352cc(%rip), %rdx # 0x8a250 movl $0x2b, %ecx movq %rax, %rdi movl $0x1, %esi callq 0x5f267 movq $0x0, (%rsp) leaq 0x168(%rsp), %rsi leaq 0x18(%rsp), %rdx movl $0x20, %r8d movq %rbx, %rdi movq 0x8(%rsp), %rcx xorl %r9d, %r9d callq 0x5f6cb testl %eax, %eax je 0x54fcf movq %rbx, %rdi callq 0x50f4c jmp 0x54f52 movq %rbx, %rdi callq 0x5fb2b movq %rbx, %rdi xorl %esi, %esi callq 0x5fce9 movl %eax, %ebp movq %rbx, %rdi callq 0x50f4c jmp 0x54f54
blst_verify: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 1C8h lea eax, [rcx+7] test ecx, ecx cmovns eax, ecx sar eax, 3 cmp eax, r8d jnz loc_54F52 mov [rsp+1F8h+var_1E8], rsi mov [rsp+1F8h+var_1F0], rdi test ecx, ecx jle loc_54F2A mov r15, r9 mov rbx, rdx mov r14d, ecx mov r13b, 1 xor ebp, ebp mov r12, rdx loc_54EAF: mov eax, ebp shr eax, 3 movzx eax, byte ptr [r15+rax] mov ecx, ebp and ecx, 7 bt eax, ecx jnb short loc_54F1A cmp [rsp+1F8h+arg_0], 0 jz short loc_54EDF mov ecx, 0Ch lea rdi, [rsp+1F8h+var_1E0] mov rsi, rbx rep movsq jmp short loc_54EF0 loc_54EDF: lea rdi, [rsp+1F8h+var_1E0] mov rsi, r12 call blst_p1_deserialize test eax, eax jnz short loc_54F52 loc_54EF0: lea rdi, [rsp+1F8h+var_120] test r13b, 1 jz short loc_54F0A lea rsi, [rsp+1F8h+var_1E0] call blst_p1_from_affine jmp short loc_54F17 loc_54F0A: mov rsi, rdi lea rdx, [rsp+1F8h+var_1E0] call blst_p1_add_or_double_affine loc_54F17: xor r13d, r13d loc_54F1A: inc rbp add r12, 30h ; '0' add rbx, 60h ; '`' cmp r14, rbp jnz short loc_54EAF loc_54F2A: lea rdi, [rsp+1F8h+var_90] lea rsi, [rsp+1F8h+var_120] call blst_p1_to_affine lea rdi, [rsp+1F8h+var_1E0] mov rsi, [rsp+1F8h+var_1E8] call blst_p2_deserialize test eax, eax jz short loc_54F68 loc_54F52: xor ebp, ebp loc_54F54: mov eax, ebp add rsp, 1C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_54F68: call blst_pairing_sizeof mov rdi, rax call safe_malloc test rax, rax jz short loc_54F52 mov rbx, rax lea rdx, blst_dst; "BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_"... mov ecx, 2Bh ; '+' mov rdi, rax mov esi, 1 call blst_pairing_init mov [rsp+1F8h+var_1F8], 0 lea rsi, [rsp+1F8h+var_90] lea rdx, [rsp+1F8h+var_1E0] mov r8d, 20h ; ' ' mov rdi, rbx mov rcx, [rsp+1F8h+var_1F0] xor r9d, r9d call blst_pairing_aggregate_pk_in_g1 test eax, eax jz short loc_54FCF mov rdi, rbx call safe_free jmp short loc_54F52 loc_54FCF: mov rdi, rbx call blst_pairing_commit mov rdi, rbx xor esi, esi call blst_pairing_finalverify mov ebp, eax mov rdi, rbx call safe_free jmp loc_54F54
long long blst_verify(int a1, long long a2, char *a3, int a4, int a5, long long a6, char a7) { char *v8; // rbx long long v9; // r14 char v10; // r13 long long v11; // rbp char *v12; // r12 int v13; // eax unsigned int v14; // ebp long long v16; // rax long long v17; // rax long long v18; // rbx _BYTE v19[192]; // [rsp+18h] [rbp-1E0h] BYREF _BYTE v20[144]; // [rsp+D8h] [rbp-120h] BYREF _BYTE v21[144]; // [rsp+168h] [rbp-90h] BYREF if ( a4 / 8 == a5 ) { if ( a4 > 0 ) { v8 = a3; v9 = (unsigned int)a4; v10 = 1; v11 = 0LL; v12 = a3; do { v13 = *(unsigned __int8 *)(a6 + ((unsigned int)v11 >> 3)); if ( _bittest(&v13, v11 & 7) ) { if ( a7 ) { qmemcpy(v19, v8, 0x60uLL); } else if ( (unsigned int)blst_p1_deserialize(v19, v12) ) { return 0; } if ( (v10 & 1) != 0 ) blst_p1_from_affine(v20, v19); else blst_p1_add_or_double_affine(v20, v20, v19); v10 = 0; } ++v11; v12 += 48; v8 += 96; } while ( v9 != v11 ); } blst_p1_to_affine(v21, v20); if ( !(unsigned int)blst_p2_deserialize(v19, a2) ) { v16 = blst_pairing_sizeof(); v17 = safe_malloc(v16); if ( v17 ) { v18 = v17; blst_pairing_init(v17, 1LL, "BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_POP_", 43LL); if ( !(unsigned int)blst_pairing_aggregate_pk_in_g1(v18, (unsigned int)v21, (unsigned int)v19, a1, 32, 0, 0LL) ) { blst_pairing_commit(v18); v14 = blst_pairing_finalverify(v18, 0LL); safe_free(v18); return v14; } safe_free(v18); } } } return 0; }
blst_verify: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1c8 LEA EAX,[RCX + 0x7] TEST ECX,ECX CMOVNS EAX,ECX SAR EAX,0x3 CMP EAX,R8D JNZ 0x00154f52 MOV qword ptr [RSP + 0x10],RSI MOV qword ptr [RSP + 0x8],RDI TEST ECX,ECX JLE 0x00154f2a MOV R15,R9 MOV RBX,RDX MOV R14D,ECX MOV R13B,0x1 XOR EBP,EBP MOV R12,RDX LAB_00154eaf: MOV EAX,EBP SHR EAX,0x3 MOVZX EAX,byte ptr [R15 + RAX*0x1] MOV ECX,EBP AND ECX,0x7 BT EAX,ECX JNC 0x00154f1a CMP byte ptr [RSP + 0x200],0x0 JZ 0x00154edf MOV ECX,0xc LEA RDI,[RSP + 0x18] MOV RSI,RBX MOVSQ.REP RDI,RSI JMP 0x00154ef0 LAB_00154edf: LEA RDI,[RSP + 0x18] MOV RSI,R12 CALL 0x00157c0a TEST EAX,EAX JNZ 0x00154f52 LAB_00154ef0: LEA RDI,[RSP + 0xd8] TEST R13B,0x1 JZ 0x00154f0a LEA RSI,[RSP + 0x18] CALL 0x00157519 JMP 0x00154f17 LAB_00154f0a: MOV RSI,RDI LEA RDX,[RSP + 0x18] CALL 0x00158837 LAB_00154f17: XOR R13D,R13D LAB_00154f1a: INC RBP ADD R12,0x30 ADD RBX,0x60 CMP R14,RBP JNZ 0x00154eaf LAB_00154f2a: LEA RDI,[RSP + 0x168] LEA RSI,[RSP + 0xd8] CALL 0x001574b8 LEA RDI,[RSP + 0x18] MOV RSI,qword ptr [RSP + 0x10] CALL 0x0015abc5 TEST EAX,EAX JZ 0x00154f68 LAB_00154f52: XOR EBP,EBP LAB_00154f54: MOV EAX,EBP ADD RSP,0x1c8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00154f68: CALL 0x0015f25c MOV RDI,RAX CALL 0x00150ecc TEST RAX,RAX JZ 0x00154f52 MOV RBX,RAX LEA RDX,[0x18a250] MOV ECX,0x2b MOV RDI,RAX MOV ESI,0x1 CALL 0x0015f267 MOV qword ptr [RSP],0x0 LEA RSI,[RSP + 0x168] LEA RDX,[RSP + 0x18] MOV R8D,0x20 MOV RDI,RBX MOV RCX,qword ptr [RSP + 0x8] XOR R9D,R9D CALL 0x0015f6cb TEST EAX,EAX JZ 0x00154fcf MOV RDI,RBX CALL 0x00150f4c JMP 0x00154f52 LAB_00154fcf: MOV RDI,RBX CALL 0x0015fb2b MOV RDI,RBX XOR ESI,ESI CALL 0x0015fce9 MOV EBP,EAX MOV RDI,RBX CALL 0x00150f4c JMP 0x00154f54
int4 blst_verify(int8 param_1,int8 param_2,int8 *param_3,uint param_4,int param_5, long param_6,char param_7) { uint uVar1; int iVar2; int4 uVar3; int8 uVar4; long lVar5; ulong uVar6; int8 *puVar7; int8 *puVar8; int8 *puVar9; bool bVar10; byte bVar11; int8 local_1e0 [24]; int1 local_120 [144]; int1 local_90 [96]; bVar11 = 0; uVar1 = param_4 + 7; if (-1 < (int)param_4) { uVar1 = param_4; } if ((int)uVar1 >> 3 == param_5) { if (0 < (int)param_4) { bVar10 = true; uVar6 = 0; puVar9 = param_3; do { if ((*(byte *)(param_6 + (uVar6 >> 3 & 0x1fffffff)) >> ((uint)uVar6 & 7) & 1) != 0) { if (param_7 == '\0') { iVar2 = blst_p1_deserialize(local_1e0,puVar9); if (iVar2 != 0) { return 0; } } else { puVar7 = param_3; puVar8 = local_1e0; for (lVar5 = 0xc; lVar5 != 0; lVar5 = lVar5 + -1) { *puVar8 = *puVar7; puVar7 = puVar7 + (ulong)bVar11 * -2 + 1; puVar8 = puVar8 + (ulong)bVar11 * -2 + 1; } } if (bVar10) { blst_p1_from_affine(local_120,local_1e0); } else { blst_p1_add_or_double_affine(local_120,local_120,local_1e0); } bVar10 = false; } uVar6 = uVar6 + 1; puVar9 = puVar9 + 6; param_3 = param_3 + 0xc; } while (param_4 != uVar6); } blst_p1_to_affine(local_90,local_120); iVar2 = blst_p2_deserialize(local_1e0,param_2); if (iVar2 == 0) { uVar4 = blst_pairing_sizeof(); lVar5 = safe_malloc(uVar4); if (lVar5 != 0) { blst_pairing_init(lVar5,1,"BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_POP_",0x2b); iVar2 = blst_pairing_aggregate_pk_in_g1(lVar5,local_90,local_1e0,param_1,0x20,0,0); if (iVar2 == 0) { blst_pairing_commit(lVar5); uVar3 = blst_pairing_finalverify(lVar5,0); safe_free(lVar5); return uVar3; } safe_free(lVar5); } } } return 0; }
19,280
stmt_unbuffered_fetch
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
static int stmt_unbuffered_fetch(MYSQL_STMT *stmt, uchar **row) { ulong pkt_len; pkt_len= ma_net_safe_read(stmt->mysql); if (pkt_len == packet_error) { stmt->fetch_row_func= stmt_unbuffered_eof; return(1); } if (stmt->mysql->net.read_pos[0] == 254) { *row = NULL; stmt->fetch_row_func= stmt_unbuffered_eof; return(MYSQL_NO_DATA); } else *row = stmt->mysql->net.read_pos; stmt->result.rows++; return(0); }
O3
c
stmt_unbuffered_fetch: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx movq 0x38(%rdi), %rdi callq 0x15e47 movl $0xffffffff, %ecx # imm = 0xFFFFFFFF cmpq %rcx, %rax jne 0x1f450 leaq 0x3e0d(%rip), %rax # 0x2324f movq %rax, 0x348(%rbx) movl $0x1, %eax jmp 0x1f485 movq 0x38(%rbx), %rax movq 0x20(%rax), %rax cmpb $-0x2, (%rax) jne 0x1f479 movq $0x0, (%r14) leaq 0x3de4(%rip), %rax # 0x2324f movq %rax, 0x348(%rbx) movl $0x64, %eax jmp 0x1f485 movq %rax, (%r14) incq 0xc8(%rbx) xorl %eax, %eax popq %rbx popq %r14 popq %rbp retq
stmt_unbuffered_fetch: push rbp mov rbp, rsp push r14 push rbx mov r14, rsi mov rbx, rdi mov rdi, [rdi+38h] call ma_net_safe_read mov ecx, 0FFFFFFFFh cmp rax, rcx jnz short loc_1F450 lea rax, stmt_unbuffered_eof mov [rbx+348h], rax mov eax, 1 jmp short loc_1F485 loc_1F450: mov rax, [rbx+38h] mov rax, [rax+20h] cmp byte ptr [rax], 0FEh jnz short loc_1F479 mov qword ptr [r14], 0 lea rax, stmt_unbuffered_eof mov [rbx+348h], rax mov eax, 64h ; 'd' jmp short loc_1F485 loc_1F479: mov [r14], rax inc qword ptr [rbx+0C8h] xor eax, eax loc_1F485: pop rbx pop r14 pop rbp retn
long long stmt_unbuffered_fetch(long long *a1, _QWORD *a2, long long a3, long long a4, unsigned long long a5, int a6) { _BYTE *v7; // rax if ( ma_net_safe_read(a1[7], (long long)a2, a3, a4, a5, a6) == 0xFFFFFFFF ) { a1[105] = (long long)stmt_unbuffered_eof; return 1LL; } else { v7 = *(_BYTE **)(a1[7] + 32); if ( *v7 == 0xFE ) { *a2 = 0LL; a1[105] = (long long)stmt_unbuffered_eof; return 100LL; } else { *a2 = v7; ++a1[25]; return 0LL; } } }
stmt_unbuffered_fetch: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV R14,RSI MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x38] CALL 0x00115e47 MOV ECX,0xffffffff CMP RAX,RCX JNZ 0x0011f450 LEA RAX,[0x12324f] MOV qword ptr [RBX + 0x348],RAX MOV EAX,0x1 JMP 0x0011f485 LAB_0011f450: MOV RAX,qword ptr [RBX + 0x38] MOV RAX,qword ptr [RAX + 0x20] CMP byte ptr [RAX],0xfe JNZ 0x0011f479 MOV qword ptr [R14],0x0 LEA RAX,[0x12324f] MOV qword ptr [RBX + 0x348],RAX MOV EAX,0x64 JMP 0x0011f485 LAB_0011f479: MOV qword ptr [R14],RAX INC qword ptr [RBX + 0xc8] XOR EAX,EAX LAB_0011f485: POP RBX POP R14 POP RBP RET
int8 stmt_unbuffered_fetch(long param_1,int8 *param_2) { char *pcVar1; long lVar2; int8 uVar3; lVar2 = ma_net_safe_read(*(int8 *)(param_1 + 0x38)); if (lVar2 == 0xffffffff) { *(code **)(param_1 + 0x348) = stmt_unbuffered_eof; uVar3 = 1; } else { pcVar1 = *(char **)(*(long *)(param_1 + 0x38) + 0x20); if (*pcVar1 == -2) { *param_2 = 0; *(code **)(param_1 + 0x348) = stmt_unbuffered_eof; uVar3 = 100; } else { *param_2 = pcVar1; *(long *)(param_1 + 200) = *(long *)(param_1 + 200) + 1; uVar3 = 0; } } return uVar3; }
19,281
inline_mysql_file_write
eloqsql/include/mysql/psi/mysql_file.h
static inline size_t inline_mysql_file_write( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif File file, const uchar *buffer, size_t count, myf flags) { size_t result; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; size_t bytes_written; locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_WRITE); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line); result= my_write(file, buffer, count, flags); if (flags & (MY_NABP | MY_FNABP)) bytes_written= (result == 0) ? count : 0; else bytes_written= (result != MY_FILE_ERROR) ? result : 0; PSI_FILE_CALL(end_file_wait)(locker, bytes_written); return result; } #endif result= my_write(file, buffer, count, flags); return result; }
O0
c
inline_mysql_file_write: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) leaq 0x217a28(%rip), %rax # 0x2cb4e0 movq (%rax), %rax movq 0x158(%rax), %rax movl -0x18(%rbp), %esi leaq -0x88(%rbp), %rdi movl $0x7, %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 0xb3bc7 leaq 0x2179de(%rip), %rax # 0x2cb4e0 movq (%rax), %rax movq 0x210(%rax), %rax movq -0x40(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x10(%rbp), %rdx movl -0x14(%rbp), %ecx callq *%rax movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rcx callq 0xff520 movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax andq $0x6, %rax cmpq $0x0, %rax je 0xb3b72 cmpq $0x0, -0x38(%rbp) jne 0xb3b57 movq -0x28(%rbp), %rax movq %rax, -0x98(%rbp) jmp 0xb3b62 xorl %eax, %eax movq %rax, -0x98(%rbp) jmp 0xb3b62 movq -0x98(%rbp), %rax movq %rax, -0x90(%rbp) jmp 0xb3b9f cmpq $-0x1, -0x38(%rbp) je 0xb3b86 movq -0x38(%rbp), %rax movq %rax, -0xa0(%rbp) jmp 0xb3b91 xorl %eax, %eax movq %rax, -0xa0(%rbp) jmp 0xb3b91 movq -0xa0(%rbp), %rax movq %rax, -0x90(%rbp) leaq 0x21793a(%rip), %rax # 0x2cb4e0 movq (%rax), %rax movq 0x218(%rax), %rax movq -0x40(%rbp), %rdi movq -0x90(%rbp), %rsi callq *%rax movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0xb3be7 movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rcx callq 0xff520 movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0xa0, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
inline_mysql_file_write_1: push rbp mov rbp, rsp sub rsp, 0A0h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov [rbp+var_20], rcx mov [rbp+var_28], r8 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, 7 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 loc_B3BC7 lea rax, PSI_server mov rax, [rax] mov rax, [rax+210h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_28] mov rdx, [rbp+var_10] mov ecx, [rbp+var_14] call rax mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] mov rcx, [rbp+var_30] call my_write mov [rbp+var_38], rax mov rax, [rbp+var_30] and rax, 6 cmp rax, 0 jz short loc_B3B72 cmp [rbp+var_38], 0 jnz short loc_B3B57 mov rax, [rbp+var_28] mov [rbp+var_98], rax jmp short loc_B3B62 loc_B3B57: xor eax, eax mov [rbp+var_98], rax jmp short $+2 loc_B3B62: mov rax, [rbp+var_98] mov [rbp+var_90], rax jmp short loc_B3B9F loc_B3B72: cmp [rbp+var_38], 0FFFFFFFFFFFFFFFFh jz short loc_B3B86 mov rax, [rbp+var_38] mov [rbp+var_A0], rax jmp short loc_B3B91 loc_B3B86: xor eax, eax mov [rbp+var_A0], rax jmp short $+2 loc_B3B91: mov rax, [rbp+var_A0] mov [rbp+var_90], rax loc_B3B9F: lea rax, PSI_server mov rax, [rax] mov rax, [rax+218h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_90] call rax mov rax, [rbp+var_38] mov [rbp+var_8], rax jmp short loc_B3BE7 loc_B3BC7: mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] mov rcx, [rbp+var_30] call my_write mov [rbp+var_38], rax mov rax, [rbp+var_38] mov [rbp+var_8], rax loc_B3BE7: mov rax, [rbp+var_8] add rsp, 0A0h pop rbp retn
long long inline_mysql_file_write_1( long long a1, unsigned int a2, unsigned int a3, long long a4, long long a5, long long a6) { long long v7; // [rsp+0h] [rbp-A0h] long long v8; // [rsp+8h] [rbp-98h] _BYTE v9[72]; // [rsp+18h] [rbp-88h] BYREF long long v10; // [rsp+60h] [rbp-40h] long long v11; // [rsp+68h] [rbp-38h] long long v12; // [rsp+70h] [rbp-30h] long long v13; // [rsp+78h] [rbp-28h] long long v14; // [rsp+80h] [rbp-20h] unsigned int v15; // [rsp+88h] [rbp-18h] unsigned int v16; // [rsp+8Ch] [rbp-14h] long long v17; // [rsp+90h] [rbp-10h] v17 = a1; v16 = a2; v15 = a3; v14 = a4; v13 = a5; v12 = a6; v10 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v9, a3, 7LL); if ( v10 ) { ((void ( *)(long long, long long, long long, _QWORD))PSI_server[66])(v10, v13, v17, v16); v11 = my_write(v15, v14, v13, v12); if ( (v12 & 6) != 0 ) { if ( v11 ) v8 = 0LL; else v8 = v13; ((void ( *)(long long, long long))PSI_server[67])(v10, v8); } else { if ( v11 == -1 ) v7 = 0LL; else v7 = v11; ((void ( *)(long long, long long))PSI_server[67])(v10, v7); } return v11; } else { return my_write(v15, v14, v13, v12); } }
inline_mysql_file_write: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 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 qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 LEA RAX,[0x3cb4e0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x158] MOV ESI,dword ptr [RBP + -0x18] LEA RDI,[RBP + -0x88] MOV EDX,0x7 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 0x001b3bc7 LEA RAX,[0x3cb4e0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x210] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x14] CALL RAX MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] CALL 0x001ff520 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x30] AND RAX,0x6 CMP RAX,0x0 JZ 0x001b3b72 CMP qword ptr [RBP + -0x38],0x0 JNZ 0x001b3b57 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x98],RAX JMP 0x001b3b62 LAB_001b3b57: XOR EAX,EAX MOV qword ptr [RBP + -0x98],RAX JMP 0x001b3b62 LAB_001b3b62: MOV RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0x90],RAX JMP 0x001b3b9f LAB_001b3b72: CMP qword ptr [RBP + -0x38],-0x1 JZ 0x001b3b86 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0xa0],RAX JMP 0x001b3b91 LAB_001b3b86: XOR EAX,EAX MOV qword ptr [RBP + -0xa0],RAX JMP 0x001b3b91 LAB_001b3b91: MOV RAX,qword ptr [RBP + -0xa0] MOV qword ptr [RBP + -0x90],RAX LAB_001b3b9f: LEA RAX,[0x3cb4e0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x90] CALL RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX JMP 0x001b3be7 LAB_001b3bc7: MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] CALL 0x001ff520 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX LAB_001b3be7: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0xa0 POP RBP RET
long inline_mysql_file_write (int8 param_1,int4 param_2,int4 param_3,int8 param_4, long param_5,ulong param_6) { long local_a8; long local_a0; long local_98; int1 local_90 [72]; long local_48; long local_40; ulong local_38; long local_30; int8 local_28; int4 local_20; int4 local_1c; int8 local_18; long local_10; local_38 = param_6; local_30 = 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,7); if (local_48 == 0) { local_10 = my_write(local_20,local_28,local_30,local_38); } else { (**(code **)(PSI_server + 0x210))(local_48,local_30,local_18,local_1c); local_40 = my_write(local_20,local_28,local_30,local_38); if ((local_38 & 6) == 0) { local_a8 = local_40; if (local_40 == -1) { local_a8 = 0; } local_98 = local_a8; } else { if (local_40 == 0) { local_a0 = local_30; } else { local_a0 = 0; } local_98 = local_a0; } (**(code **)(PSI_server + 0x218))(local_48,local_98); local_10 = local_40; } return local_10; }
19,282
ftxui::Pixel::Pixel()
Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/include/ftxui/screen/screen.hpp
Pixel() : blink(false), bold(false), dim(false), inverted(false), underlined(false), underlined_double(false), strikethrough(false), automerge(false) {}
O1
cpp
ftxui::Pixel::Pixel(): pushq %r15 pushq %r14 pushq %rbx movq %rdi, %r14 movw $0x0, (%rdi) leaq 0x8(%rdi), %rbx leaq 0x18(%rdi), %r15 movq %r15, 0x8(%rdi) leaq 0xd4a0(%rip), %rsi # 0x400a6 leaq 0xd49a(%rip), %rdx # 0x400a7 movq %rbx, %rdi callq 0x10884 leaq 0x28(%r14), %rdi xorl %esi, %esi callq 0x20c62 addq $0x2c, %r14 movq %r14, %rdi xorl %esi, %esi callq 0x20c62 popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movq (%rbx), %rdi cmpq %r15, %rdi je 0x32c4a movq (%r15), %rsi incq %rsi callq 0xb400 movq %r14, %rdi callq 0xb780
_ZN5ftxui5PixelC2Ev: push r15 push r14 push rbx mov r14, rdi mov word ptr [rdi], 0 lea rbx, [rdi+8] lea r15, [rdi+18h] mov [rdi+8], r15 lea rsi, asc_400A5+1; " " lea rdx, asc_400A5+2; "" mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [r14+28h] xor esi, esi call _ZN5ftxui5ColorC2ENS0_8Palette1E; ftxui::Color::Color(ftxui::Color::Palette1) add r14, 2Ch ; ',' mov rdi, r14 xor esi, esi call _ZN5ftxui5ColorC2ENS0_8Palette1E; ftxui::Color::Color(ftxui::Color::Palette1) pop rbx pop r14 pop r15 retn mov r14, rax mov rdi, [rbx]; void * cmp rdi, r15 jz short loc_32C4A mov rsi, [r15] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_32C4A: mov rdi, r14 call __Unwind_Resume
void ftxui::Pixel::Pixel(ftxui::Pixel *this) { *(_WORD *)this = 0; *((_QWORD *)this + 1) = (char *)this + 24; std::string::_M_construct<char const*>((_QWORD *)this + 1, " ", (long long)""); ftxui::Color::Color((_DWORD *)this + 10); ftxui::Color::Color((_DWORD *)this + 11); }
Pixel: PUSH R15 PUSH R14 PUSH RBX MOV R14,RDI MOV word ptr [RDI],0x0 LEA RBX,[RDI + 0x8] LEA R15,[RDI + 0x18] MOV qword ptr [RDI + 0x8],R15 LEA RSI,[0x1400a6] LEA RDX,[0x1400a7] MOV RDI,RBX CALL 0x00110884 LEA RDI,[R14 + 0x28] LAB_00132c19: XOR ESI,ESI CALL 0x00120c62 ADD R14,0x2c MOV RDI,R14 XOR ESI,ESI CALL 0x00120c62 LAB_00132c2e: POP RBX POP R14 POP R15 RET
/* ftxui::Pixel::Pixel() */ void __thiscall ftxui::Pixel::Pixel(Pixel *this) { *(int2 *)this = 0; *(Pixel **)(this + 8) = this + 0x18; std::__cxx11::string::_M_construct<char_const*>(this + 8,&DAT_001400a6,&DAT_001400a7); /* try { // try from 00132c19 to 00132c2d has its CatchHandler @ 00132c34 */ Color::Color((Color *)(this + 0x28),0); Color::Color((Color *)(this + 0x2c),0); return; }
19,283
find_collation_data_inheritance_source
eloqsql/mysys/charset.c
static CHARSET_INFO *find_collation_data_inheritance_source(CHARSET_INFO *cs, myf flags) { const char *beg, *end; if (cs->tailoring && !strncmp(cs->tailoring, "[import ", 8) && (end= strchr(cs->tailoring + 8, ']')) && (beg= cs->tailoring + 8) + MY_CS_NAME_SIZE > end) { char name[MY_CS_NAME_SIZE + 1]; memcpy(name, beg, end - beg); name[end - beg]= '\0'; return inheritance_source_by_id(cs, get_collation_number(name,MYF(flags))); } return NULL; }
O0
c
find_collation_data_inheritance_source: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x40(%rbp) movq %rsi, -0x48(%rbp) movq -0x40(%rbp), %rax cmpq $0x0, 0x38(%rax) je 0xdef76 movq -0x40(%rbp), %rax movq 0x38(%rax), %rdi leaq 0x76371(%rip), %rsi # 0x15524c movl $0x8, %edx callq 0x2a1e0 cmpl $0x0, %eax jne 0xdef76 movq -0x40(%rbp), %rax movq 0x38(%rax), %rdi addq $0x8, %rdi movl $0x5d, %esi callq 0x2a410 movq %rax, -0x58(%rbp) cmpq $0x0, %rax je 0xdef76 movq -0x40(%rbp), %rax movq 0x38(%rax), %rax addq $0x8, %rax movq %rax, -0x50(%rbp) addq $0x20, %rax cmpq -0x58(%rbp), %rax jbe 0xdef76 leaq -0x30(%rbp), %rdi movq -0x50(%rbp), %rsi movq -0x58(%rbp), %rdx movq -0x50(%rbp), %rax subq %rax, %rdx callq 0x2a090 movq -0x58(%rbp), %rax movq -0x50(%rbp), %rcx subq %rcx, %rax movb $0x0, -0x30(%rbp,%rax) movq -0x40(%rbp), %rax movq %rax, -0x60(%rbp) leaq -0x30(%rbp), %rdi movq -0x48(%rbp), %rsi callq 0xdccb0 movq -0x60(%rbp), %rdi movl %eax, %esi callq 0xdf0f0 movq %rax, -0x38(%rbp) jmp 0xdef7e movq $0x0, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x68(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xdefa2 movq -0x68(%rbp), %rax addq $0x70, %rsp popq %rbp retq callq 0x2a270 nopw (%rax,%rax)
find_collation_data_inheritance_source: push rbp mov rbp, rsp sub rsp, 70h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_40], rdi mov [rbp+var_48], rsi mov rax, [rbp+var_40] cmp qword ptr [rax+38h], 0 jz loc_DEF76 mov rax, [rbp+var_40] mov rdi, [rax+38h] lea rsi, aImport; "[import " mov edx, 8 call _strncmp cmp eax, 0 jnz loc_DEF76 mov rax, [rbp+var_40] mov rdi, [rax+38h] add rdi, 8 mov esi, 5Dh ; ']' call _strchr mov [rbp+var_58], rax cmp rax, 0 jz short loc_DEF76 mov rax, [rbp+var_40] mov rax, [rax+38h] add rax, 8 mov [rbp+var_50], rax add rax, 20h ; ' ' cmp rax, [rbp+var_58] jbe short loc_DEF76 lea rdi, [rbp+var_30] mov rsi, [rbp+var_50] mov rdx, [rbp+var_58] mov rax, [rbp+var_50] sub rdx, rax call _memcpy mov rax, [rbp+var_58] mov rcx, [rbp+var_50] sub rax, rcx mov [rbp+rax+var_30], 0 mov rax, [rbp+var_40] mov [rbp+var_60], rax lea rdi, [rbp+var_30] mov rsi, [rbp+var_48] call get_collation_number mov rdi, [rbp+var_60] mov esi, eax call inheritance_source_by_id mov [rbp+var_38], rax jmp short loc_DEF7E loc_DEF76: mov [rbp+var_38], 0 loc_DEF7E: mov rax, [rbp+var_38] mov [rbp+var_68], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_DEFA2 mov rax, [rbp+var_68] add rsp, 70h pop rbp retn loc_DEFA2: call ___stack_chk_fail
long long find_collation_data_inheritance_source(long long a1, long long a2) { unsigned int collation_number; // eax unsigned long long v4; // [rsp+18h] [rbp-58h] long long v5; // [rsp+20h] [rbp-50h] _BYTE v7[40]; // [rsp+40h] [rbp-30h] BYREF unsigned long long v8; // [rsp+68h] [rbp-8h] v8 = __readfsqword(0x28u); if ( !*(_QWORD *)(a1 + 56) ) return 0LL; if ( (unsigned int)strncmp(*(_QWORD *)(a1 + 56), "[import ", 8LL) ) return 0LL; v4 = strchr(*(_QWORD *)(a1 + 56) + 8LL, 93LL); if ( !v4 ) return 0LL; v5 = *(_QWORD *)(a1 + 56) + 8LL; if ( *(_QWORD *)(a1 + 56) + 40LL <= v4 ) return 0LL; memcpy(v7, v5, v4 - v5); v7[v4 - v5] = 0; collation_number = get_collation_number((long long)v7, a2); return inheritance_source_by_id(a1, collation_number); }
find_collation_data_inheritance_source: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x40],RDI MOV qword ptr [RBP + -0x48],RSI MOV RAX,qword ptr [RBP + -0x40] CMP qword ptr [RAX + 0x38],0x0 JZ 0x001def76 MOV RAX,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RAX + 0x38] LEA RSI,[0x25524c] MOV EDX,0x8 CALL 0x0012a1e0 CMP EAX,0x0 JNZ 0x001def76 MOV RAX,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RAX + 0x38] ADD RDI,0x8 MOV ESI,0x5d CALL 0x0012a410 MOV qword ptr [RBP + -0x58],RAX CMP RAX,0x0 JZ 0x001def76 MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0x38] ADD RAX,0x8 MOV qword ptr [RBP + -0x50],RAX ADD RAX,0x20 CMP RAX,qword ptr [RBP + -0x58] JBE 0x001def76 LEA RDI,[RBP + -0x30] MOV RSI,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RBP + -0x50] SUB RDX,RAX CALL 0x0012a090 MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x50] SUB RAX,RCX MOV byte ptr [RBP + RAX*0x1 + -0x30],0x0 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x60],RAX LEA RDI,[RBP + -0x30] MOV RSI,qword ptr [RBP + -0x48] CALL 0x001dccb0 MOV RDI,qword ptr [RBP + -0x60] MOV ESI,EAX CALL 0x001df0f0 MOV qword ptr [RBP + -0x38],RAX JMP 0x001def7e LAB_001def76: MOV qword ptr [RBP + -0x38],0x0 LAB_001def7e: MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001defa2 MOV RAX,qword ptr [RBP + -0x68] ADD RSP,0x70 POP RBP RET LAB_001defa2: CALL 0x0012a270
int8 find_collation_data_inheritance_source(long param_1,int8 param_2) { int iVar1; int4 uVar2; char *pcVar3; void *__src; long in_FS_OFFSET; int8 local_40; char local_38 [40]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); if (*(long *)(param_1 + 0x38) != 0) { iVar1 = strncmp(*(char **)(param_1 + 0x38),"[import ",8); if (iVar1 == 0) { pcVar3 = strchr((char *)(*(long *)(param_1 + 0x38) + 8),0x5d); if ((pcVar3 != (char *)0x0) && (__src = (void *)(*(long *)(param_1 + 0x38) + 8), pcVar3 < (char *)(*(long *)(param_1 + 0x38) + 0x28))) { memcpy(local_38,__src,(long)pcVar3 - (long)__src); pcVar3[(long)(local_38 + -(long)__src)] = '\0'; uVar2 = get_collation_number(local_38,param_2); local_40 = inheritance_source_by_id(param_1,uVar2); goto LAB_001def7e; } } } local_40 = 0; LAB_001def7e: if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_40; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
19,284
test_zerofill_1byte
eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c
static int test_zerofill_1byte(MYSQL *mysql) { MYSQL_STMT *stmt= mysql_stmt_init(mysql); int rc; MYSQL_BIND bind; char buffer[3]; rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1"); check_mysql_rc(rc, mysql); rc= mysql_query(mysql, "CREATE TABLE t1 (a int zerofill)"); check_mysql_rc(rc, mysql); rc= mysql_query(mysql, "INSERT INTO t1 VALUES(1)"); check_mysql_rc(rc, mysql); rc= mysql_stmt_prepare(stmt, SL("SELECT a FROM t1")); check_stmt_rc(rc, stmt); rc= mysql_stmt_execute(stmt); check_stmt_rc(rc, stmt); memset(&bind, 0, sizeof(MYSQL_BIND)); bind.buffer_type= MYSQL_TYPE_STRING; bind.buffer= buffer; bind.buffer_length= 1; rc= mysql_stmt_bind_result(stmt, &bind); rc= mysql_stmt_fetch(stmt); FAIL_IF(rc != 101, "expected truncation warning"); mysql_stmt_close(stmt); rc= mysql_query(mysql, "DROP TABLE t1"); check_mysql_rc(rc, mysql); return OK; }
O0
c
test_zerofill_1byte: pushq %rbp movq %rsp, %rbp subq $0xe0, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rdi callq 0x44950 movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rdi leaq 0x4e3cf(%rip), %rsi # 0x66636 callq 0x38a70 movl %eax, -0x1c(%rbp) cmpl $0x0, -0x1c(%rbp) je 0x182cd movl -0x1c(%rbp), %eax movl %eax, -0xa4(%rbp) movq -0x10(%rbp), %rdi callq 0x3c3f0 movq %rax, -0xa0(%rbp) movq -0x10(%rbp), %rdi callq 0x3c3c0 movl -0xa4(%rbp), %esi movq -0xa0(%rbp), %rdx movl %eax, %ecx leaq 0x4d428(%rip), %rdi # 0x656d5 leaq 0x4ddb9(%rip), %r8 # 0x6606d movl $0x13b9, %r9d # imm = 0x13B9 movb $0x0, %al callq 0x2fc40 movl $0x1, -0x4(%rbp) jmp 0x18551 jmp 0x182cf movq -0x10(%rbp), %rdi leaq 0x4e732(%rip), %rsi # 0x66a0c callq 0x38a70 movl %eax, -0x1c(%rbp) cmpl $0x0, -0x1c(%rbp) je 0x18340 movl -0x1c(%rbp), %eax movl %eax, -0xb4(%rbp) movq -0x10(%rbp), %rdi callq 0x3c3f0 movq %rax, -0xb0(%rbp) movq -0x10(%rbp), %rdi callq 0x3c3c0 movl -0xb4(%rbp), %esi movq -0xb0(%rbp), %rdx movl %eax, %ecx leaq 0x4d3b5(%rip), %rdi # 0x656d5 leaq 0x4dd46(%rip), %r8 # 0x6606d movl $0x13bc, %r9d # imm = 0x13BC movb $0x0, %al callq 0x2fc40 movl $0x1, -0x4(%rbp) jmp 0x18551 jmp 0x18342 movq -0x10(%rbp), %rdi leaq 0x4e6e0(%rip), %rsi # 0x66a2d callq 0x38a70 movl %eax, -0x1c(%rbp) cmpl $0x0, -0x1c(%rbp) je 0x183b3 movl -0x1c(%rbp), %eax movl %eax, -0xc4(%rbp) movq -0x10(%rbp), %rdi callq 0x3c3f0 movq %rax, -0xc0(%rbp) movq -0x10(%rbp), %rdi callq 0x3c3c0 movl -0xc4(%rbp), %esi movq -0xc0(%rbp), %rdx movl %eax, %ecx leaq 0x4d342(%rip), %rdi # 0x656d5 leaq 0x4dcd3(%rip), %r8 # 0x6606d movl $0x13bf, %r9d # imm = 0x13BF movb $0x0, %al callq 0x2fc40 movl $0x1, -0x4(%rbp) jmp 0x18551 jmp 0x183b5 movq -0x18(%rbp), %rdi leaq 0x4e165(%rip), %rsi # 0x66525 movl $0x10, %edx callq 0x45070 movl %eax, -0x1c(%rbp) cmpl $0x0, -0x1c(%rbp) je 0x18405 movq -0x18(%rbp), %rdi callq 0x43fd0 movq %rax, %rsi leaq 0x4d1aa(%rip), %rdi # 0x65590 leaq 0x4dc80(%rip), %rdx # 0x6606d movl $0x13c2, %ecx # imm = 0x13C2 movb $0x0, %al callq 0x2fc40 movl $0x1, -0x4(%rbp) jmp 0x18551 jmp 0x18407 movq -0x18(%rbp), %rdi callq 0x46580 movl %eax, -0x1c(%rbp) cmpl $0x0, -0x1c(%rbp) je 0x1844b movq -0x18(%rbp), %rdi callq 0x43fd0 movq %rax, %rsi leaq 0x4d164(%rip), %rdi # 0x65590 leaq 0x4dc3a(%rip), %rdx # 0x6606d movl $0x13c5, %ecx # imm = 0x13C5 movb $0x0, %al callq 0x2fc40 movl $0x1, -0x4(%rbp) jmp 0x18551 jmp 0x1844d leaq -0x90(%rbp), %rdi xorl %esi, %esi movl $0x70, %edx callq 0x14260 movl $0xfe, -0x30(%rbp) leaq -0x93(%rbp), %rax movq %rax, -0x80(%rbp) movq $0x1, -0x50(%rbp) movq -0x18(%rbp), %rdi leaq -0x90(%rbp), %rsi callq 0x43940 movsbl %al, %eax movl %eax, -0x1c(%rbp) movq -0x18(%rbp), %rdi callq 0x44020 movl %eax, -0x1c(%rbp) cmpl $0x65, -0x1c(%rbp) je 0x184cf leaq 0x4d0e7(%rip), %rdi # 0x65590 leaq 0x4e596(%rip), %rsi # 0x66a46 leaq 0x4dbb6(%rip), %rdx # 0x6606d movl $0x13cf, %ecx # imm = 0x13CF movb $0x0, %al callq 0x2fc40 movl $0x1, -0x4(%rbp) jmp 0x18551 jmp 0x184d1 movq -0x18(%rbp), %rdi callq 0x43eb0 movq -0x10(%rbp), %rdi leaq 0x4e065(%rip), %rsi # 0x6654a callq 0x38a70 movl %eax, -0x1c(%rbp) cmpl $0x0, -0x1c(%rbp) je 0x18548 movl -0x1c(%rbp), %eax movl %eax, -0xd4(%rbp) movq -0x10(%rbp), %rdi callq 0x3c3f0 movq %rax, -0xd0(%rbp) movq -0x10(%rbp), %rdi callq 0x3c3c0 movl -0xd4(%rbp), %esi movq -0xd0(%rbp), %rdx movl %eax, %ecx leaq 0x4d1aa(%rip), %rdi # 0x656d5 leaq 0x4db3b(%rip), %r8 # 0x6606d movl $0x13d3, %r9d # imm = 0x13D3 movb $0x0, %al callq 0x2fc40 movl $0x1, -0x4(%rbp) jmp 0x18551 jmp 0x1854a movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0xe0, %rsp popq %rbp retq nopl (%rax)
test_zerofill_1byte: push rbp mov rbp, rsp sub rsp, 0E0h mov [rbp+var_10], rdi mov rdi, [rbp+var_10] call mysql_stmt_init mov [rbp+var_18], rax mov rdi, [rbp+var_10] lea rsi, aDropTableIfExi_0; "DROP TABLE IF EXISTS t1" call mysql_query mov [rbp+var_1C], eax cmp [rbp+var_1C], 0 jz short loc_182CD mov eax, [rbp+var_1C] mov [rbp+var_A4], eax mov rdi, [rbp+var_10] call mysql_error mov [rbp+var_A0], rax mov rdi, [rbp+var_10] call mysql_errno mov esi, [rbp+var_A4] mov rdx, [rbp+var_A0] mov ecx, eax lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov r9d, 13B9h mov al, 0 call diag mov [rbp+var_4], 1 jmp loc_18551 loc_182CD: jmp short $+2 loc_182CF: mov rdi, [rbp+var_10] lea rsi, aCreateTableT1A_1; "CREATE TABLE t1 (a int zerofill)" call mysql_query mov [rbp+var_1C], eax cmp [rbp+var_1C], 0 jz short loc_18340 mov eax, [rbp+var_1C] mov [rbp+var_B4], eax mov rdi, [rbp+var_10] call mysql_error mov [rbp+var_B0], rax mov rdi, [rbp+var_10] call mysql_errno mov esi, [rbp+var_B4] mov rdx, [rbp+var_B0] mov ecx, eax lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov r9d, 13BCh mov al, 0 call diag mov [rbp+var_4], 1 jmp loc_18551 loc_18340: jmp short $+2 loc_18342: mov rdi, [rbp+var_10] lea rsi, aInsertIntoT1Va_2; "INSERT INTO t1 VALUES(1)" call mysql_query mov [rbp+var_1C], eax cmp [rbp+var_1C], 0 jz short loc_183B3 mov eax, [rbp+var_1C] mov [rbp+var_C4], eax mov rdi, [rbp+var_10] call mysql_error mov [rbp+var_C0], rax mov rdi, [rbp+var_10] call mysql_errno mov esi, [rbp+var_C4] mov rdx, [rbp+var_C0] mov ecx, eax lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov r9d, 13BFh mov al, 0 call diag mov [rbp+var_4], 1 jmp loc_18551 loc_183B3: jmp short $+2 loc_183B5: mov rdi, [rbp+var_18] lea rsi, aSelectAFromT1; "SELECT a FROM t1" mov edx, 10h call mysql_stmt_prepare mov [rbp+var_1C], eax cmp [rbp+var_1C], 0 jz short loc_18405 mov rdi, [rbp+var_18] call mysql_stmt_error mov rsi, rax lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 13C2h mov al, 0 call diag mov [rbp+var_4], 1 jmp loc_18551 loc_18405: jmp short $+2 loc_18407: mov rdi, [rbp+var_18] call mysql_stmt_execute mov [rbp+var_1C], eax cmp [rbp+var_1C], 0 jz short loc_1844B mov rdi, [rbp+var_18] call mysql_stmt_error mov rsi, rax lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 13C5h mov al, 0 call diag mov [rbp+var_4], 1 jmp loc_18551 loc_1844B: jmp short $+2 loc_1844D: lea rdi, [rbp+var_90] xor esi, esi mov edx, 70h ; 'p' call _memset mov [rbp+var_30], 0FEh lea rax, [rbp+var_93] mov [rbp+var_80], rax mov [rbp+var_50], 1 mov rdi, [rbp+var_18] lea rsi, [rbp+var_90] call mysql_stmt_bind_result movsx eax, al mov [rbp+var_1C], eax mov rdi, [rbp+var_18] call mysql_stmt_fetch mov [rbp+var_1C], eax cmp [rbp+var_1C], 65h ; 'e' jz short loc_184CF lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rsi, aExpectedTrunca; "expected truncation warning" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 13CFh mov al, 0 call diag mov [rbp+var_4], 1 jmp loc_18551 loc_184CF: jmp short $+2 loc_184D1: mov rdi, [rbp+var_18] call mysql_stmt_close mov rdi, [rbp+var_10] lea rsi, aDropTableT1; "DROP TABLE t1" call mysql_query mov [rbp+var_1C], eax cmp [rbp+var_1C], 0 jz short loc_18548 mov eax, [rbp+var_1C] mov [rbp+var_D4], eax mov rdi, [rbp+var_10] call mysql_error mov [rbp+var_D0], rax mov rdi, [rbp+var_10] call mysql_errno mov esi, [rbp+var_D4] mov rdx, [rbp+var_D0] mov ecx, eax lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov r9d, 13D3h mov al, 0 call diag mov [rbp+var_4], 1 jmp short loc_18551 loc_18548: jmp short $+2 loc_1854A: mov [rbp+var_4], 0 loc_18551: mov eax, [rbp+var_4] add rsp, 0E0h pop rbp retn
long long test_zerofill_1byte(long long a1) { int v1; // eax int v2; // eax int v3; // eax int v4; // eax int v5; // r8d int v6; // r9d int v7; // eax int v8; // r8d int v9; // r9d int v10; // r8d int v11; // r9d int v12; // eax int v14; // [rsp+Ch] [rbp-D4h] int v15; // [rsp+10h] [rbp-D0h] int v16; // [rsp+20h] [rbp-C0h] int v17; // [rsp+30h] [rbp-B0h] int v18; // [rsp+40h] [rbp-A0h] char v19; // [rsp+4Dh] [rbp-93h] BYREF _BYTE v20[16]; // [rsp+50h] [rbp-90h] BYREF char *v21; // [rsp+60h] [rbp-80h] long long v22; // [rsp+90h] [rbp-50h] int v23; // [rsp+B0h] [rbp-30h] int v24; // [rsp+C4h] [rbp-1Ch] long long v25; // [rsp+C8h] [rbp-18h] long long v26; // [rsp+D0h] [rbp-10h] v26 = a1; v25 = mysql_stmt_init(a1); v24 = mysql_query(a1, "DROP TABLE IF EXISTS t1"); if ( v24 ) { v18 = mysql_error(v26); v1 = mysql_errno(v26); diag( (unsigned int)"Error (%d): %s (%d) in %s line %d", v24, v18, v1, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", 5049); return 1; } else { v24 = mysql_query(v26, "CREATE TABLE t1 (a int zerofill)"); if ( v24 ) { v17 = mysql_error(v26); v2 = mysql_errno(v26); diag( (unsigned int)"Error (%d): %s (%d) in %s line %d", v24, v17, v2, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", 5052); return 1; } else { v24 = mysql_query(v26, "INSERT INTO t1 VALUES(1)"); if ( v24 ) { v16 = mysql_error(v26); v3 = mysql_errno(v26); diag( (unsigned int)"Error (%d): %s (%d) in %s line %d", v24, v16, v3, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", 5055); return 1; } else if ( (unsigned int)mysql_stmt_prepare(v25, "SELECT a FROM t1", 16LL) ) { v4 = mysql_stmt_error(v25); diag( (unsigned int)"Error: %s (%s: %d)", v4, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", 5058, v5, v6); return 1; } else { v24 = mysql_stmt_execute(v25); if ( v24 ) { v7 = mysql_stmt_error(v25); diag( (unsigned int)"Error: %s (%s: %d)", v7, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", 5061, v8, v9); return 1; } else { memset(v20, 0LL, 112LL); v23 = 254; v21 = &v19; v22 = 1LL; v24 = (char)mysql_stmt_bind_result(v25, v20); v24 = mysql_stmt_fetch(v25); if ( v24 == 101 ) { mysql_stmt_close(v25); v24 = mysql_query(v26, "DROP TABLE t1"); if ( v24 ) { v14 = v24; v15 = mysql_error(v26); v12 = mysql_errno(v26); diag( (unsigned int)"Error (%d): %s (%d) in %s line %d", v14, v15, v12, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", 5075); return 1; } else { return 0; } } else { diag( (unsigned int)"Error: %s (%s: %d)", (unsigned int)"expected truncation warning", (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", 5071, v10, v11); return 1; } } } } } }
test_zerofill_1byte: PUSH RBP MOV RBP,RSP SUB RSP,0xe0 MOV qword ptr [RBP + -0x10],RDI MOV RDI,qword ptr [RBP + -0x10] CALL 0x00144950 MOV qword ptr [RBP + -0x18],RAX MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x166636] CALL 0x00138a70 MOV dword ptr [RBP + -0x1c],EAX CMP dword ptr [RBP + -0x1c],0x0 JZ 0x001182cd MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0xa4],EAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0013c3f0 MOV qword ptr [RBP + -0xa0],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0013c3c0 MOV ESI,dword ptr [RBP + -0xa4] MOV RDX,qword ptr [RBP + -0xa0] MOV ECX,EAX LEA RDI,[0x1656d5] LEA R8,[0x16606d] MOV R9D,0x13b9 MOV AL,0x0 CALL 0x0012fc40 MOV dword ptr [RBP + -0x4],0x1 JMP 0x00118551 LAB_001182cd: JMP 0x001182cf LAB_001182cf: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x166a0c] CALL 0x00138a70 MOV dword ptr [RBP + -0x1c],EAX CMP dword ptr [RBP + -0x1c],0x0 JZ 0x00118340 MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0xb4],EAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0013c3f0 MOV qword ptr [RBP + -0xb0],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0013c3c0 MOV ESI,dword ptr [RBP + -0xb4] MOV RDX,qword ptr [RBP + -0xb0] MOV ECX,EAX LEA RDI,[0x1656d5] LEA R8,[0x16606d] MOV R9D,0x13bc MOV AL,0x0 CALL 0x0012fc40 MOV dword ptr [RBP + -0x4],0x1 JMP 0x00118551 LAB_00118340: JMP 0x00118342 LAB_00118342: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x166a2d] CALL 0x00138a70 MOV dword ptr [RBP + -0x1c],EAX CMP dword ptr [RBP + -0x1c],0x0 JZ 0x001183b3 MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0xc4],EAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0013c3f0 MOV qword ptr [RBP + -0xc0],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0013c3c0 MOV ESI,dword ptr [RBP + -0xc4] MOV RDX,qword ptr [RBP + -0xc0] MOV ECX,EAX LEA RDI,[0x1656d5] LEA R8,[0x16606d] MOV R9D,0x13bf MOV AL,0x0 CALL 0x0012fc40 MOV dword ptr [RBP + -0x4],0x1 JMP 0x00118551 LAB_001183b3: JMP 0x001183b5 LAB_001183b5: MOV RDI,qword ptr [RBP + -0x18] LEA RSI,[0x166525] MOV EDX,0x10 CALL 0x00145070 MOV dword ptr [RBP + -0x1c],EAX CMP dword ptr [RBP + -0x1c],0x0 JZ 0x00118405 MOV RDI,qword ptr [RBP + -0x18] CALL 0x00143fd0 MOV RSI,RAX LEA RDI,[0x165590] LEA RDX,[0x16606d] MOV ECX,0x13c2 MOV AL,0x0 CALL 0x0012fc40 MOV dword ptr [RBP + -0x4],0x1 JMP 0x00118551 LAB_00118405: JMP 0x00118407 LAB_00118407: MOV RDI,qword ptr [RBP + -0x18] CALL 0x00146580 MOV dword ptr [RBP + -0x1c],EAX CMP dword ptr [RBP + -0x1c],0x0 JZ 0x0011844b MOV RDI,qword ptr [RBP + -0x18] CALL 0x00143fd0 MOV RSI,RAX LEA RDI,[0x165590] LEA RDX,[0x16606d] MOV ECX,0x13c5 MOV AL,0x0 CALL 0x0012fc40 MOV dword ptr [RBP + -0x4],0x1 JMP 0x00118551 LAB_0011844b: JMP 0x0011844d LAB_0011844d: LEA RDI,[RBP + -0x90] XOR ESI,ESI MOV EDX,0x70 CALL 0x00114260 MOV dword ptr [RBP + -0x30],0xfe LEA RAX,[RBP + -0x93] MOV qword ptr [RBP + -0x80],RAX MOV qword ptr [RBP + -0x50],0x1 MOV RDI,qword ptr [RBP + -0x18] LEA RSI,[RBP + -0x90] CALL 0x00143940 MOVSX EAX,AL MOV dword ptr [RBP + -0x1c],EAX MOV RDI,qword ptr [RBP + -0x18] CALL 0x00144020 MOV dword ptr [RBP + -0x1c],EAX CMP dword ptr [RBP + -0x1c],0x65 JZ 0x001184cf LEA RDI,[0x165590] LEA RSI,[0x166a46] LEA RDX,[0x16606d] MOV ECX,0x13cf MOV AL,0x0 CALL 0x0012fc40 MOV dword ptr [RBP + -0x4],0x1 JMP 0x00118551 LAB_001184cf: JMP 0x001184d1 LAB_001184d1: MOV RDI,qword ptr [RBP + -0x18] CALL 0x00143eb0 MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x16654a] CALL 0x00138a70 MOV dword ptr [RBP + -0x1c],EAX CMP dword ptr [RBP + -0x1c],0x0 JZ 0x00118548 MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0xd4],EAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0013c3f0 MOV qword ptr [RBP + -0xd0],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0013c3c0 MOV ESI,dword ptr [RBP + -0xd4] MOV RDX,qword ptr [RBP + -0xd0] MOV ECX,EAX LEA RDI,[0x1656d5] LEA R8,[0x16606d] MOV R9D,0x13d3 MOV AL,0x0 CALL 0x0012fc40 MOV dword ptr [RBP + -0x4],0x1 JMP 0x00118551 LAB_00118548: JMP 0x0011854a LAB_0011854a: MOV dword ptr [RBP + -0x4],0x0 LAB_00118551: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0xe0 POP RBP RET
int4 test_zerofill_1byte(int8 param_1) { char cVar1; int iVar2; int4 uVar3; int8 uVar4; int1 local_9b [3]; int1 local_98 [16]; int1 *local_88; int8 local_58; int4 local_38; int local_24; int8 local_20; int8 local_18; int4 local_c; local_18 = param_1; local_20 = mysql_stmt_init(param_1); iVar2 = mysql_query(local_18,"DROP TABLE IF EXISTS t1"); local_24 = iVar2; if (iVar2 == 0) { iVar2 = mysql_query(local_18,"CREATE TABLE t1 (a int zerofill)"); local_24 = iVar2; if (iVar2 == 0) { iVar2 = mysql_query(local_18,"INSERT INTO t1 VALUES(1)"); local_24 = iVar2; if (iVar2 == 0) { local_24 = mysql_stmt_prepare(local_20,"SELECT a FROM t1",0x10); if (local_24 == 0) { local_24 = mysql_stmt_execute(local_20); if (local_24 == 0) { memset(local_98,0,0x70); local_38 = 0xfe; local_88 = local_9b; local_58 = 1; cVar1 = mysql_stmt_bind_result(local_20,local_98); local_24 = (int)cVar1; local_24 = mysql_stmt_fetch(local_20); if (local_24 == 0x65) { mysql_stmt_close(local_20); iVar2 = mysql_query(local_18,"DROP TABLE t1"); if (iVar2 == 0) { local_c = 0; } else { local_24 = iVar2; uVar4 = mysql_error(local_18); uVar3 = mysql_errno(local_18); diag("Error (%d): %s (%d) in %s line %d",iVar2,uVar4,uVar3, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c" ,0x13d3); local_c = 1; } } else { diag("Error: %s (%s: %d)","expected truncation warning", "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c" ,0x13cf); local_c = 1; } } else { uVar4 = mysql_stmt_error(local_20); diag("Error: %s (%s: %d)",uVar4, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c" ,0x13c5); local_c = 1; } } else { uVar4 = mysql_stmt_error(local_20); diag("Error: %s (%s: %d)",uVar4, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", 0x13c2); local_c = 1; } } else { uVar4 = mysql_error(local_18); uVar3 = mysql_errno(local_18); diag("Error (%d): %s (%d) in %s line %d",iVar2,uVar4,uVar3, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", 0x13bf); local_c = 1; } } else { uVar4 = mysql_error(local_18); uVar3 = mysql_errno(local_18); diag("Error (%d): %s (%d) in %s line %d",iVar2,uVar4,uVar3, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", 0x13bc); local_c = 1; } } else { uVar4 = mysql_error(local_18); uVar3 = mysql_errno(local_18); diag("Error (%d): %s (%d) in %s line %d",iVar2,uVar4,uVar3, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",0x13b9) ; local_c = 1; } return local_c; }
19,285
test_zerofill_1byte
eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c
static int test_zerofill_1byte(MYSQL *mysql) { MYSQL_STMT *stmt= mysql_stmt_init(mysql); int rc; MYSQL_BIND bind; char buffer[3]; rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1"); check_mysql_rc(rc, mysql); rc= mysql_query(mysql, "CREATE TABLE t1 (a int zerofill)"); check_mysql_rc(rc, mysql); rc= mysql_query(mysql, "INSERT INTO t1 VALUES(1)"); check_mysql_rc(rc, mysql); rc= mysql_stmt_prepare(stmt, SL("SELECT a FROM t1")); check_stmt_rc(rc, stmt); rc= mysql_stmt_execute(stmt); check_stmt_rc(rc, stmt); memset(&bind, 0, sizeof(MYSQL_BIND)); bind.buffer_type= MYSQL_TYPE_STRING; bind.buffer= buffer; bind.buffer_length= 1; rc= mysql_stmt_bind_result(stmt, &bind); rc= mysql_stmt_fetch(stmt); FAIL_IF(rc != 101, "expected truncation warning"); mysql_stmt_close(stmt); rc= mysql_query(mysql, "DROP TABLE t1"); check_mysql_rc(rc, mysql); return OK; }
O3
c
test_zerofill_1byte: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x78, %rsp movq %rdi, %rbx callq 0x322b8 movq %rax, %r14 leaq 0x3002a(%rip), %rsi # 0x47286 movq %rbx, %rdi callq 0x2bbf9 testl %eax, %eax je 0x1729f movl %eax, %r15d movq %rbx, %rdi callq 0x2dc72 movq %rax, %r14 movq %rbx, %rdi callq 0x2dc5d leaq 0x2f0a0(%rip), %rdi # 0x46325 leaq 0x2fa31(%rip), %r8 # 0x46cbd movl %r15d, %esi movq %r14, %rdx movl %eax, %ecx movl $0x13b9, %r9d # imm = 0x13B9 jmp 0x1732b leaq 0x303b6(%rip), %rsi # 0x4765c movq %rbx, %rdi callq 0x2bbf9 testl %eax, %eax je 0x172e6 movl %eax, %r15d movq %rbx, %rdi callq 0x2dc72 movq %rax, %r14 movq %rbx, %rdi callq 0x2dc5d leaq 0x2f056(%rip), %rdi # 0x46325 leaq 0x2f9e7(%rip), %r8 # 0x46cbd movl %r15d, %esi movq %r14, %rdx movl %eax, %ecx movl $0x13bc, %r9d # imm = 0x13BC jmp 0x1732b leaq 0x30390(%rip), %rsi # 0x4767d movq %rbx, %rdi callq 0x2bbf9 testl %eax, %eax je 0x17342 movl %eax, %r15d movq %rbx, %rdi callq 0x2dc72 movq %rax, %r14 movq %rbx, %rdi callq 0x2dc5d leaq 0x2f00f(%rip), %rdi # 0x46325 leaq 0x2f9a0(%rip), %r8 # 0x46cbd movl %r15d, %esi movq %r14, %rdx movl %eax, %ecx movl $0x13bf, %r9d # imm = 0x13BF xorl %eax, %eax callq 0x264ef movl $0x1, %eax addq $0x78, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x2fe2c(%rip), %rsi # 0x47175 movl $0x10, %edx movq %r14, %rdi callq 0x3267c testl %eax, %eax je 0x1737d movq %r14, %rdi callq 0x31d58 leaq 0x2ee77(%rip), %rdi # 0x461e0 leaq 0x2f94d(%rip), %rdx # 0x46cbd movq %rax, %rsi movl $0x13c2, %ecx # imm = 0x13C2 jmp 0x17469 movq %r14, %rdi callq 0x3324d testl %eax, %eax je 0x173ac movq %r14, %rdi callq 0x31d58 leaq 0x2ee48(%rip), %rdi # 0x461e0 leaq 0x2f91e(%rip), %rdx # 0x46cbd movq %rax, %rsi movl $0x13c5, %ecx # imm = 0x13C5 jmp 0x17469 xorps %xmm0, %xmm0 leaq -0x90(%rbp), %rsi movaps %xmm0, 0x60(%rsi) movaps %xmm0, 0x10(%rsi) movaps %xmm0, 0x40(%rsi) movaps %xmm0, 0x50(%rsi) movaps %xmm0, 0x30(%rsi) movaps %xmm0, 0x20(%rsi) movaps %xmm0, (%rsi) movl $0xfe, 0x60(%rsi) leaq -0x1b(%rbp), %rax movq %rax, 0x10(%rsi) movq $0x1, 0x40(%rsi) movq %r14, %rdi callq 0x31a20 movq %r14, %rdi callq 0x31d73 cmpl $0x65, %eax jne 0x1744f movq %r14, %rdi callq 0x31cc9 leaq 0x2fd8e(%rip), %rsi # 0x4719a movq %rbx, %rdi callq 0x2bbf9 testl %eax, %eax je 0x17475 movl %eax, %r14d movq %rbx, %rdi callq 0x2dc72 movq %rax, %r15 movq %rbx, %rdi callq 0x2dc5d leaq 0x2eef0(%rip), %rdi # 0x46325 leaq 0x2f881(%rip), %r8 # 0x46cbd movl %r14d, %esi movq %r15, %rdx movl %eax, %ecx movl $0x13d3, %r9d # imm = 0x13D3 jmp 0x1732b leaq 0x2ed8a(%rip), %rdi # 0x461e0 leaq 0x30239(%rip), %rsi # 0x47696 leaq 0x2f859(%rip), %rdx # 0x46cbd movl $0x13cf, %ecx # imm = 0x13CF xorl %eax, %eax callq 0x264ef jmp 0x17332 xorl %eax, %eax jmp 0x17337
test_zerofill_1byte: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 78h mov rbx, rdi call mysql_stmt_init mov r14, rax lea rsi, aDropTableIfExi_0; "DROP TABLE IF EXISTS t1" mov rdi, rbx call mysql_query test eax, eax jz short loc_1729F mov r15d, eax mov rdi, rbx call mysql_error mov r14, rax mov rdi, rbx call mysql_errno lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, r15d mov rdx, r14 mov ecx, eax mov r9d, 13B9h jmp loc_1732B loc_1729F: lea rsi, aCreateTableT1A_1; "CREATE TABLE t1 (a int zerofill)" mov rdi, rbx call mysql_query test eax, eax jz short loc_172E6 mov r15d, eax mov rdi, rbx call mysql_error mov r14, rax mov rdi, rbx call mysql_errno lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, r15d mov rdx, r14 mov ecx, eax mov r9d, 13BCh jmp short loc_1732B loc_172E6: lea rsi, aInsertIntoT1Va_1; "INSERT INTO t1 VALUES(1)" mov rdi, rbx call mysql_query test eax, eax jz short loc_17342 mov r15d, eax mov rdi, rbx call mysql_error mov r14, rax mov rdi, rbx call mysql_errno lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, r15d mov rdx, r14 mov ecx, eax mov r9d, 13BFh loc_1732B: xor eax, eax call diag loc_17332: mov eax, 1 loc_17337: add rsp, 78h pop rbx pop r14 pop r15 pop rbp retn loc_17342: lea rsi, aSelectAFromT1; "SELECT a FROM t1" mov edx, 10h mov rdi, r14 call mysql_stmt_prepare test eax, eax jz short loc_1737D mov rdi, r14 call mysql_stmt_error lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov rsi, rax mov ecx, 13C2h jmp loc_17469 loc_1737D: mov rdi, r14 call mysql_stmt_execute test eax, eax jz short loc_173AC mov rdi, r14 call mysql_stmt_error lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov rsi, rax mov ecx, 13C5h jmp loc_17469 loc_173AC: xorps xmm0, xmm0 lea rsi, [rbp+var_90] movaps xmmword ptr [rsi+60h], xmm0 movaps xmmword ptr [rsi+10h], xmm0 movaps xmmword ptr [rsi+40h], xmm0 movaps xmmword ptr [rsi+50h], xmm0 movaps xmmword ptr [rsi+30h], xmm0 movaps xmmword ptr [rsi+20h], xmm0 movaps xmmword ptr [rsi], xmm0 mov dword ptr [rsi+60h], 0FEh lea rax, [rbp+var_1B] mov [rsi+10h], rax mov qword ptr [rsi+40h], 1 mov rdi, r14 call mysql_stmt_bind_result mov rdi, r14 call mysql_stmt_fetch cmp eax, 65h ; 'e' jnz short loc_1744F mov rdi, r14 call mysql_stmt_close lea rsi, aDropTableT1; "DROP TABLE t1" mov rdi, rbx call mysql_query test eax, eax jz short loc_17475 mov r14d, eax mov rdi, rbx call mysql_error mov r15, rax mov rdi, rbx call mysql_errno lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, r14d mov rdx, r15 mov ecx, eax mov r9d, 13D3h jmp loc_1732B loc_1744F: lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rsi, aExpectedTrunca; "expected truncation warning" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 13CFh loc_17469: xor eax, eax call diag jmp loc_17332 loc_17475: xor eax, eax jmp loc_17337
long long test_zerofill_1byte(long long a1) { long long v1; // r14 int v2; // eax int v3; // r15d int v4; // r14d int v5; // eax const char *v6; // rdi const char *v7; // r8 const char *v8; // rsi const char *v9; // rdx int v10; // ecx int v11; // r9d int v12; // eax int v13; // r15d int v14; // r14d int v15; // eax int v16; // eax int v17; // r15d int v18; // r14d int v19; // eax int v21; // eax long long v22; // rdx long long v23; // rcx long long v24; // r8 long long v25; // r9 int v26; // eax int v27; // eax int v28; // r14d int v29; // r15d int v30; // eax __int128 v31; // [rsp+0h] [rbp-90h] BYREF __int128 v32; // [rsp+10h] [rbp-80h] __int128 v33; // [rsp+20h] [rbp-70h] __int128 v34; // [rsp+30h] [rbp-60h] __int128 v35; // [rsp+40h] [rbp-50h] __int128 v36; // [rsp+50h] [rbp-40h] __int128 v37; // [rsp+60h] [rbp-30h] char v38; // [rsp+75h] [rbp-1Bh] BYREF v1 = mysql_stmt_init(a1); v2 = mysql_query(a1, "DROP TABLE IF EXISTS t1"); if ( v2 ) { v3 = v2; v4 = mysql_error(a1); v5 = mysql_errno(a1); v6 = "Error (%d): %s (%d) in %s line %d"; v7 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"; LODWORD(v8) = v3; LODWORD(v9) = v4; v10 = v5; v11 = 5049; LABEL_7: diag((_DWORD)v6, (_DWORD)v8, (_DWORD)v9, v10, (_DWORD)v7, v11); return 1LL; } v12 = mysql_query(a1, "CREATE TABLE t1 (a int zerofill)"); if ( v12 ) { v13 = v12; v14 = mysql_error(a1); v15 = mysql_errno(a1); v6 = "Error (%d): %s (%d) in %s line %d"; v7 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"; LODWORD(v8) = v13; LODWORD(v9) = v14; v10 = v15; v11 = 5052; goto LABEL_7; } v16 = mysql_query(a1, "INSERT INTO t1 VALUES(1)"); if ( v16 ) { v17 = v16; v18 = mysql_error(a1); v19 = mysql_errno(a1); v6 = "Error (%d): %s (%d) in %s line %d"; v7 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"; LODWORD(v8) = v17; LODWORD(v9) = v18; v10 = v19; v11 = 5055; goto LABEL_7; } if ( (unsigned int)mysql_stmt_prepare(v1, "SELECT a FROM t1", 16LL) ) { v21 = mysql_stmt_error(v1); v6 = "Error: %s (%s: %d)"; v9 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"; LODWORD(v8) = v21; v10 = 5058; goto LABEL_7; } if ( (unsigned int)mysql_stmt_execute(v1) ) { v26 = mysql_stmt_error(v1); v6 = "Error: %s (%s: %d)"; v9 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"; LODWORD(v8) = v26; v10 = 5061; goto LABEL_7; } v37 = 0LL; v32 = 0LL; v35 = 0LL; v36 = 0LL; v34 = 0LL; v33 = 0LL; v31 = 0LL; LODWORD(v37) = 254; *(_QWORD *)&v32 = &v38; *(_QWORD *)&v35 = 1LL; ((void ( *)(long long, __int128 *, long long, long long, long long, long long))mysql_stmt_bind_result)( v1, &v31, v22, v23, v24, v25); if ( (unsigned int)mysql_stmt_fetch(v1) != 101 ) { v6 = "Error: %s (%s: %d)"; v8 = "expected truncation warning"; v9 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"; v10 = 5071; goto LABEL_7; } mysql_stmt_close(v1); v27 = mysql_query(a1, "DROP TABLE t1"); if ( v27 ) { v28 = v27; v29 = mysql_error(a1); v30 = mysql_errno(a1); v6 = "Error (%d): %s (%d) in %s line %d"; v7 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"; LODWORD(v8) = v28; LODWORD(v9) = v29; v10 = v30; v11 = 5075; goto LABEL_7; } return 0LL; }
test_zerofill_1byte: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x78 MOV RBX,RDI CALL 0x001322b8 MOV R14,RAX LEA RSI,[0x147286] MOV RDI,RBX CALL 0x0012bbf9 TEST EAX,EAX JZ 0x0011729f MOV R15D,EAX MOV RDI,RBX CALL 0x0012dc72 MOV R14,RAX MOV RDI,RBX CALL 0x0012dc5d LEA RDI,[0x146325] LEA R8,[0x146cbd] MOV ESI,R15D MOV RDX,R14 MOV ECX,EAX MOV R9D,0x13b9 JMP 0x0011732b LAB_0011729f: LEA RSI,[0x14765c] MOV RDI,RBX CALL 0x0012bbf9 TEST EAX,EAX JZ 0x001172e6 MOV R15D,EAX MOV RDI,RBX CALL 0x0012dc72 MOV R14,RAX MOV RDI,RBX CALL 0x0012dc5d LEA RDI,[0x146325] LEA R8,[0x146cbd] MOV ESI,R15D MOV RDX,R14 MOV ECX,EAX MOV R9D,0x13bc JMP 0x0011732b LAB_001172e6: LEA RSI,[0x14767d] MOV RDI,RBX CALL 0x0012bbf9 TEST EAX,EAX JZ 0x00117342 MOV R15D,EAX MOV RDI,RBX CALL 0x0012dc72 MOV R14,RAX MOV RDI,RBX CALL 0x0012dc5d LEA RDI,[0x146325] LEA R8,[0x146cbd] MOV ESI,R15D MOV RDX,R14 MOV ECX,EAX MOV R9D,0x13bf LAB_0011732b: XOR EAX,EAX CALL 0x001264ef LAB_00117332: MOV EAX,0x1 LAB_00117337: ADD RSP,0x78 POP RBX POP R14 POP R15 POP RBP RET LAB_00117342: LEA RSI,[0x147175] MOV EDX,0x10 MOV RDI,R14 CALL 0x0013267c TEST EAX,EAX JZ 0x0011737d MOV RDI,R14 CALL 0x00131d58 LEA RDI,[0x1461e0] LEA RDX,[0x146cbd] MOV RSI,RAX MOV ECX,0x13c2 JMP 0x00117469 LAB_0011737d: MOV RDI,R14 CALL 0x0013324d TEST EAX,EAX JZ 0x001173ac MOV RDI,R14 CALL 0x00131d58 LEA RDI,[0x1461e0] LEA RDX,[0x146cbd] MOV RSI,RAX MOV ECX,0x13c5 JMP 0x00117469 LAB_001173ac: XORPS XMM0,XMM0 LEA RSI,[RBP + -0x90] MOVAPS xmmword ptr [RSI + 0x60],XMM0 MOVAPS xmmword ptr [RSI + 0x10],XMM0 MOVAPS xmmword ptr [RSI + 0x40],XMM0 MOVAPS xmmword ptr [RSI + 0x50],XMM0 MOVAPS xmmword ptr [RSI + 0x30],XMM0 MOVAPS xmmword ptr [RSI + 0x20],XMM0 MOVAPS xmmword ptr [RSI],XMM0 MOV dword ptr [RSI + 0x60],0xfe LEA RAX,[RBP + -0x1b] MOV qword ptr [RSI + 0x10],RAX MOV qword ptr [RSI + 0x40],0x1 MOV RDI,R14 CALL 0x00131a20 MOV RDI,R14 CALL 0x00131d73 CMP EAX,0x65 JNZ 0x0011744f MOV RDI,R14 CALL 0x00131cc9 LEA RSI,[0x14719a] MOV RDI,RBX CALL 0x0012bbf9 TEST EAX,EAX JZ 0x00117475 MOV R14D,EAX MOV RDI,RBX CALL 0x0012dc72 MOV R15,RAX MOV RDI,RBX CALL 0x0012dc5d LEA RDI,[0x146325] LEA R8,[0x146cbd] MOV ESI,R14D MOV RDX,R15 MOV ECX,EAX MOV R9D,0x13d3 JMP 0x0011732b LAB_0011744f: LEA RDI,[0x1461e0] LEA RSI,[0x147696] LEA RDX,[0x146cbd] MOV ECX,0x13cf LAB_00117469: XOR EAX,EAX CALL 0x001264ef JMP 0x00117332 LAB_00117475: XOR EAX,EAX JMP 0x00117337
int8 test_zerofill_1byte(int8 param_1) { int iVar1; int4 uVar2; int8 uVar3; char *pcVar4; int8 uVar5; uVar3 = mysql_stmt_init(); iVar1 = mysql_query(param_1,"DROP TABLE IF EXISTS t1"); if (iVar1 == 0) { iVar1 = mysql_query(param_1,"CREATE TABLE t1 (a int zerofill)"); if (iVar1 == 0) { iVar1 = mysql_query(param_1,"INSERT INTO t1 VALUES(1)"); if (iVar1 == 0) { iVar1 = mysql_stmt_prepare(uVar3,"SELECT a FROM t1",0x10); if (iVar1 == 0) { iVar1 = mysql_stmt_execute(uVar3); if (iVar1 == 0) { mysql_stmt_bind_result(uVar3); iVar1 = mysql_stmt_fetch(uVar3); if (iVar1 == 0x65) { mysql_stmt_close(uVar3); iVar1 = mysql_query(param_1,"DROP TABLE t1"); if (iVar1 == 0) { return 0; } uVar3 = mysql_error(param_1); uVar2 = mysql_errno(param_1); uVar5 = 0x13d3; goto LAB_0011732b; } pcVar4 = "expected truncation warning"; uVar3 = 0x13cf; } else { pcVar4 = (char *)mysql_stmt_error(uVar3); uVar3 = 0x13c5; } } else { pcVar4 = (char *)mysql_stmt_error(uVar3); uVar3 = 0x13c2; } diag("Error: %s (%s: %d)",pcVar4, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", uVar3); return 1; } uVar3 = mysql_error(param_1); uVar2 = mysql_errno(param_1); uVar5 = 0x13bf; } else { uVar3 = mysql_error(param_1); uVar2 = mysql_errno(param_1); uVar5 = 0x13bc; } } else { uVar3 = mysql_error(param_1); uVar2 = mysql_errno(param_1); uVar5 = 0x13b9; } LAB_0011732b: diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",uVar5); return 1; }
19,286
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 0x399606(%rip), %rax # 0x402760 movq (%rax), %r15 testq %r15, %r15 je 0x69194 movq %rdi, %rbx movq 0x10(%r15), %r14 movq (%r14), %r12 movq 0x5b0(%r12), %rdi movq %rbx, %rsi callq 0x2a690 testl %eax, %eax jne 0x6918b cmpq $0x0, 0x718(%r12) jne 0x69197 movq 0x8(%r15), %r15 testq %r15, %r15 jne 0x69165 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_69194 mov rbx, rdi loc_69165: mov r14, [r15+10h] mov r12, [r14] mov rdi, [r12+5B0h] mov rsi, rbx call _strcmp test eax, eax jnz short loc_6918B cmp qword ptr [r12+718h], 0 jnz short loc_69197 loc_6918B: mov r15, [r15+8] test r15, r15 jnz short loc_69165 loc_69194: xor r14d, r14d loc_69197: 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,[0x502760] MOV R15,qword ptr [RAX] TEST R15,R15 JZ 0x00169194 MOV RBX,RDI LAB_00169165: MOV R14,qword ptr [R15 + 0x10] MOV R12,qword ptr [R14] MOV RDI,qword ptr [R12 + 0x5b0] MOV RSI,RBX CALL 0x0012a690 TEST EAX,EAX JNZ 0x0016918b CMP qword ptr [R12 + 0x718],0x0 JNZ 0x00169197 LAB_0016918b: MOV R15,qword ptr [R15 + 0x8] TEST R15,R15 JNZ 0x00169165 LAB_00169194: XOR R14D,R14D LAB_00169197: 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; }
19,287
LefDefParser::lefReloadBuffer()
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lef_keywords.cpp
void lefReloadBuffer() { int nb; nb = 0; if (lefData->first_buffer) { lefData->first_buffer = 0; if (lefSettings->ReadFunction) { if ((nb = (*lefSettings->ReadFunction)(lefData->lefrFile, lefData->current_buffer, 4)) != 4) { lefData->next = NULL; return; } } else { if ((nb = fread(lefData->current_buffer, 1, 4, lefData->lefrFile)) != 4) { lefData->next = NULL; return; } } lefData->encrypted = encIsEncrypted((unsigned char*) lefData->current_buffer); } if (lefData->encrypted) { int i; int c; if (lefSettings->ReadEncrypted) { // is encrypted file and user has set the enable flag to read one for (i = 0; i < IN_BUF_SIZE; i++) { if ((c = encFgetc(lefData->lefrFile)) == EOF) { break; } lefData->current_buffer[i] = c; } nb = i; } else { // an encrypted file, but user does not allow to read one printf("File is an encrypted file, reader is not set to read one.\n"); return; } } else if (nb == 0) { if (lefSettings->ReadFunction) nb = (*lefSettings->ReadFunction)(lefData->lefrFile, lefData->current_buffer, IN_BUF_SIZE); else // This is a normal file so just read some bytes. nb = fread(lefData->current_buffer, 1, IN_BUF_SIZE, lefData->lefrFile); } if (nb <= 0) { lefData->next = NULL; } else { lefData->next = lefData->current_buffer; lefData->last = lefData->current_buffer + nb - 1; } }
O0
cpp
LefDefParser::lefReloadBuffer(): subq $0x18, %rsp movl $0x0, 0x14(%rsp) leaq 0x6dbcd(%rip), %rax # 0xa2740 movq (%rax), %rax cmpl $0x0, 0xfc(%rax) je 0x34c7a leaq 0x6dbb6(%rip), %rax # 0xa2740 movq (%rax), %rax movl $0x0, 0xfc(%rax) leaq 0x6db7a(%rip), %rax # 0xa2718 movq (%rax), %rax cmpq $0x0, 0xb8(%rax) je 0x34c03 leaq 0x6db66(%rip), %rax # 0xa2718 movq (%rax), %rax movq 0xb8(%rax), %rax leaq 0x6db7d(%rip), %rcx # 0xa2740 movq (%rcx), %rcx movq (%rcx), %rdi leaq 0x6db70(%rip), %rcx # 0xa2740 movq (%rcx), %rsi addq $0x1818, %rsi # imm = 0x1818 movl $0x4, %edx callq *%rax movl %eax, 0x14(%rsp) cmpl $0x4, %eax je 0x34c01 leaq 0x6db4f(%rip), %rax # 0xa2740 movq (%rax), %rax movq $0x0, 0x50(%rax) jmp 0x34e13 jmp 0x34c52 leaq 0x6db36(%rip), %rax # 0xa2740 movq (%rax), %rdi addq $0x1818, %rdi # imm = 0x1818 leaq 0x6db25(%rip), %rax # 0xa2740 movq (%rax), %rax movq (%rax), %rcx movl $0x1, %esi movl $0x4, %edx callq 0x2380 movl %eax, 0x14(%rsp) cmpl $0x4, %eax je 0x34c50 leaq 0x6db00(%rip), %rax # 0xa2740 movq (%rax), %rax movq $0x0, 0x50(%rax) jmp 0x34e13 jmp 0x34c52 leaq 0x6dae7(%rip), %rax # 0xa2740 movq (%rax), %rdi addq $0x1818, %rdi # imm = 0x1818 callq 0x72380 movl %eax, %ecx leaq 0x6dacf(%rip), %rax # 0xa2740 movq (%rax), %rax movl %ecx, 0xf4(%rax) leaq 0x6dabf(%rip), %rax # 0xa2740 movq (%rax), %rax cmpl $0x0, 0xf4(%rax) je 0x34d1e leaq 0x6da80(%rip), %rax # 0xa2718 movq (%rax), %rax cmpl $0x0, 0xc0(%rax) je 0x34d06 movl $0x0, 0x10(%rsp) cmpl $0x4000, 0x10(%rsp) # imm = 0x4000 jge 0x34cfc leaq 0x6da83(%rip), %rax # 0xa2740 movq (%rax), %rax movq (%rax), %rdi callq 0x72390 movl %eax, 0xc(%rsp) cmpl $-0x1, %eax jne 0x34cd3 jmp 0x34cfc movl 0xc(%rsp), %eax movb %al, %dl leaq 0x6da60(%rip), %rax # 0xa2740 movq (%rax), %rax movslq 0x10(%rsp), %rcx movb %dl, 0x1818(%rax,%rcx) movl 0x10(%rsp), %eax addl $0x1, %eax movl %eax, 0x10(%rsp) jmp 0x34cac movl 0x10(%rsp), %eax movl %eax, 0x14(%rsp) jmp 0x34d19 leaq 0x46382(%rip), %rdi # 0x7b08f movb $0x0, %al callq 0x2030 jmp 0x34e13 jmp 0x34dae cmpl $0x0, 0x14(%rsp) jne 0x34dac leaq 0x6d9e8(%rip), %rax # 0xa2718 movq (%rax), %rax cmpq $0x0, 0xb8(%rax) je 0x34d79 leaq 0x6d9d4(%rip), %rax # 0xa2718 movq (%rax), %rax movq 0xb8(%rax), %rax leaq 0x6d9eb(%rip), %rcx # 0xa2740 movq (%rcx), %rcx movq (%rcx), %rdi leaq 0x6d9de(%rip), %rcx # 0xa2740 movq (%rcx), %rsi addq $0x1818, %rsi # imm = 0x1818 movl $0x4000, %edx # imm = 0x4000 callq *%rax movl %eax, 0x14(%rsp) jmp 0x34daa leaq 0x6d9c0(%rip), %rax # 0xa2740 movq (%rax), %rdi addq $0x1818, %rdi # imm = 0x1818 leaq 0x6d9af(%rip), %rax # 0xa2740 movq (%rax), %rax movq (%rax), %rcx movl $0x1, %esi movl $0x4000, %edx # imm = 0x4000 callq 0x2380 movl %eax, 0x14(%rsp) jmp 0x34dac jmp 0x34dae cmpl $0x0, 0x14(%rsp) jg 0x34dc9 leaq 0x6d984(%rip), %rax # 0xa2740 movq (%rax), %rax movq $0x0, 0x50(%rax) jmp 0x34e13 leaq 0x6d970(%rip), %rax # 0xa2740 movq (%rax), %rcx addq $0x1818, %rcx # imm = 0x1818 leaq 0x6d95f(%rip), %rax # 0xa2740 movq (%rax), %rax movq %rcx, 0x50(%rax) leaq 0x6d951(%rip), %rax # 0xa2740 movq (%rax), %rcx addq $0x1818, %rcx # imm = 0x1818 movslq 0x14(%rsp), %rax addq %rax, %rcx addq $-0x1, %rcx leaq 0x6d934(%rip), %rax # 0xa2740 movq (%rax), %rax movq %rcx, 0x20(%rax) addq $0x18, %rsp retq nopl (%rax,%rax)
_ZN12LefDefParser15lefReloadBufferEv: sub rsp, 18h mov [rsp+18h+var_4], 0 lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData mov rax, [rax] cmp dword ptr [rax+0FCh], 0 jz loc_34C7A lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData mov rax, [rax] mov dword ptr [rax+0FCh], 0 lea rax, _ZN12LefDefParser11lefSettingsE; LefDefParser::lefSettings mov rax, [rax] cmp qword ptr [rax+0B8h], 0 jz short loc_34C03 lea rax, _ZN12LefDefParser11lefSettingsE; LefDefParser::lefSettings mov rax, [rax] mov rax, [rax+0B8h] lea rcx, _ZN12LefDefParser7lefDataE; LefDefParser::lefData mov rcx, [rcx] mov rdi, [rcx] lea rcx, _ZN12LefDefParser7lefDataE; LefDefParser::lefData mov rsi, [rcx] add rsi, 1818h; unsigned __int8 * mov edx, 4 call rax mov [rsp+18h+var_4], eax cmp eax, 4 jz short loc_34C01 lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData mov rax, [rax] mov qword ptr [rax+50h], 0 jmp loc_34E13 loc_34C01: jmp short loc_34C52 loc_34C03: lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData mov rdi, [rax] add rdi, 1818h lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData mov rax, [rax] mov rcx, [rax] mov esi, 1 mov edx, 4 call _fread mov [rsp+18h+var_4], eax cmp eax, 4 jz short loc_34C50 lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData mov rax, [rax] mov qword ptr [rax+50h], 0 jmp loc_34E13 loc_34C50: jmp short $+2 loc_34C52: lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData mov rdi, [rax] add rdi, 1818h; this call _ZN12LefDefParser14encIsEncryptedEPh; LefDefParser::encIsEncrypted(uchar *) mov ecx, eax lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData mov rax, [rax] mov [rax+0F4h], ecx loc_34C7A: lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData mov rax, [rax] cmp dword ptr [rax+0F4h], 0 jz loc_34D1E lea rax, _ZN12LefDefParser11lefSettingsE; LefDefParser::lefSettings mov rax, [rax] cmp dword ptr [rax+0C0h], 0 jz short loc_34D06 mov [rsp+18h+var_8], 0 loc_34CAC: cmp [rsp+18h+var_8], 4000h jge short loc_34CFC lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData mov rax, [rax] mov rdi, [rax] call _ZN12LefDefParser8encFgetcEP8_IO_FILE; LefDefParser::encFgetc(_IO_FILE *) mov [rsp+18h+var_C], eax cmp eax, 0FFFFFFFFh jnz short loc_34CD3 jmp short loc_34CFC loc_34CD3: mov eax, [rsp+18h+var_C] mov dl, al lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData mov rax, [rax] movsxd rcx, [rsp+18h+var_8] mov [rax+rcx+1818h], dl mov eax, [rsp+18h+var_8] add eax, 1 mov [rsp+18h+var_8], eax jmp short loc_34CAC loc_34CFC: mov eax, [rsp+18h+var_8] mov [rsp+18h+var_4], eax jmp short loc_34D19 loc_34D06: lea rdi, aFileIsAnEncryp; "File is an encrypted file, reader is no"... mov al, 0 call _printf jmp loc_34E13 loc_34D19: jmp loc_34DAE loc_34D1E: cmp [rsp+18h+var_4], 0 jnz loc_34DAC lea rax, _ZN12LefDefParser11lefSettingsE; LefDefParser::lefSettings mov rax, [rax] cmp qword ptr [rax+0B8h], 0 jz short loc_34D79 lea rax, _ZN12LefDefParser11lefSettingsE; LefDefParser::lefSettings mov rax, [rax] mov rax, [rax+0B8h] lea rcx, _ZN12LefDefParser7lefDataE; LefDefParser::lefData mov rcx, [rcx] mov rdi, [rcx] lea rcx, _ZN12LefDefParser7lefDataE; LefDefParser::lefData mov rsi, [rcx] add rsi, 1818h mov edx, 4000h call rax mov [rsp+18h+var_4], eax jmp short loc_34DAA loc_34D79: lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData mov rdi, [rax] add rdi, 1818h lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData mov rax, [rax] mov rcx, [rax] mov esi, 1 mov edx, 4000h call _fread mov [rsp+18h+var_4], eax loc_34DAA: jmp short $+2 loc_34DAC: jmp short $+2 loc_34DAE: cmp [rsp+18h+var_4], 0 jg short loc_34DC9 lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData mov rax, [rax] mov qword ptr [rax+50h], 0 jmp short loc_34E13 loc_34DC9: lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData mov rcx, [rax] add rcx, 1818h lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData mov rax, [rax] mov [rax+50h], rcx lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData mov rcx, [rax] add rcx, 1818h movsxd rax, [rsp+18h+var_4] add rcx, rax add rcx, 0FFFFFFFFFFFFFFFFh lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData mov rax, [rax] mov [rax+20h], rcx loc_34E13: add rsp, 18h retn
long long LefDefParser::lefReloadBuffer(LefDefParser *this) { unsigned __int8 *v1; // rsi long long result; // rax int v3; // [rsp+Ch] [rbp-Ch] int i; // [rsp+10h] [rbp-8h] int v5; // [rsp+14h] [rbp-4h] v5 = 0; if ( *(_DWORD *)(LefDefParser::lefData + 252LL) ) { *(_DWORD *)(LefDefParser::lefData + 252LL) = 0; if ( *((_QWORD *)LefDefParser::lefSettings + 23) ) { v1 = (unsigned __int8 *)(LefDefParser::lefData + 6168LL); v5 = (*((long long ( **)(_QWORD, long long, long long))LefDefParser::lefSettings + 23))( *(_QWORD *)LefDefParser::lefData, LefDefParser::lefData + 6168LL, 4LL); if ( v5 != 4 ) { result = LefDefParser::lefData; *(_QWORD *)(LefDefParser::lefData + 80LL) = 0LL; return result; } } else { v1 = (_BYTE *)(&dword_0 + 1); v5 = fread(LefDefParser::lefData + 6168LL, 1LL, 4LL, *(_QWORD *)LefDefParser::lefData); if ( v5 != 4 ) { result = LefDefParser::lefData; *(_QWORD *)(LefDefParser::lefData + 80LL) = 0LL; return result; } } *(_DWORD *)(LefDefParser::lefData + 244LL) = LefDefParser::encIsEncrypted( (LefDefParser *)(LefDefParser::lefData + 6168LL), v1); } if ( *(_DWORD *)(LefDefParser::lefData + 244LL) ) { if ( !*((_DWORD *)LefDefParser::lefSettings + 48) ) return printf("File is an encrypted file, reader is not set to read one.\n"); for ( i = 0; i < 0x4000; ++i ) { v3 = LefDefParser::encFgetc(*(_QWORD *)LefDefParser::lefData); if ( v3 == -1 ) break; *(_BYTE *)(LefDefParser::lefData + i + 6168LL) = v3; } v5 = i; } else if ( !v5 ) { if ( *((_QWORD *)LefDefParser::lefSettings + 23) ) v5 = (*((long long ( **)(_QWORD, long long, long long))LefDefParser::lefSettings + 23))( *(_QWORD *)LefDefParser::lefData, LefDefParser::lefData + 6168LL, 0x4000LL); else v5 = fread(LefDefParser::lefData + 6168LL, 1LL, 0x4000LL, *(_QWORD *)LefDefParser::lefData); } if ( v5 > 0 ) { *(_QWORD *)(LefDefParser::lefData + 80LL) = LefDefParser::lefData + 6168LL; result = LefDefParser::lefData; *(_QWORD *)(LefDefParser::lefData + 32LL) = v5 + LefDefParser::lefData + 6168LL - 1; } else { result = LefDefParser::lefData; *(_QWORD *)(LefDefParser::lefData + 80LL) = 0LL; } return result; }
lefReloadBuffer: SUB RSP,0x18 MOV dword ptr [RSP + 0x14],0x0 LEA RAX,[0x1a2740] MOV RAX,qword ptr [RAX] CMP dword ptr [RAX + 0xfc],0x0 JZ 0x00134c7a LEA RAX,[0x1a2740] MOV RAX,qword ptr [RAX] MOV dword ptr [RAX + 0xfc],0x0 LEA RAX,[0x1a2718] MOV RAX,qword ptr [RAX] CMP qword ptr [RAX + 0xb8],0x0 JZ 0x00134c03 LEA RAX,[0x1a2718] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0xb8] LEA RCX,[0x1a2740] MOV RCX,qword ptr [RCX] MOV RDI,qword ptr [RCX] LEA RCX,[0x1a2740] MOV RSI,qword ptr [RCX] ADD RSI,0x1818 MOV EDX,0x4 CALL RAX MOV dword ptr [RSP + 0x14],EAX CMP EAX,0x4 JZ 0x00134c01 LEA RAX,[0x1a2740] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x50],0x0 JMP 0x00134e13 LAB_00134c01: JMP 0x00134c52 LAB_00134c03: LEA RAX,[0x1a2740] MOV RDI,qword ptr [RAX] ADD RDI,0x1818 LEA RAX,[0x1a2740] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RAX] MOV ESI,0x1 MOV EDX,0x4 CALL 0x00102380 MOV dword ptr [RSP + 0x14],EAX CMP EAX,0x4 JZ 0x00134c50 LEA RAX,[0x1a2740] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x50],0x0 JMP 0x00134e13 LAB_00134c50: JMP 0x00134c52 LAB_00134c52: LEA RAX,[0x1a2740] MOV RDI,qword ptr [RAX] ADD RDI,0x1818 CALL 0x00172380 MOV ECX,EAX LEA RAX,[0x1a2740] MOV RAX,qword ptr [RAX] MOV dword ptr [RAX + 0xf4],ECX LAB_00134c7a: LEA RAX,[0x1a2740] MOV RAX,qword ptr [RAX] CMP dword ptr [RAX + 0xf4],0x0 JZ 0x00134d1e LEA RAX,[0x1a2718] MOV RAX,qword ptr [RAX] CMP dword ptr [RAX + 0xc0],0x0 JZ 0x00134d06 MOV dword ptr [RSP + 0x10],0x0 LAB_00134cac: CMP dword ptr [RSP + 0x10],0x4000 JGE 0x00134cfc LEA RAX,[0x1a2740] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX] CALL 0x00172390 MOV dword ptr [RSP + 0xc],EAX CMP EAX,-0x1 JNZ 0x00134cd3 JMP 0x00134cfc LAB_00134cd3: MOV EAX,dword ptr [RSP + 0xc] MOV DL,AL LEA RAX,[0x1a2740] MOV RAX,qword ptr [RAX] MOVSXD RCX,dword ptr [RSP + 0x10] MOV byte ptr [RAX + RCX*0x1 + 0x1818],DL MOV EAX,dword ptr [RSP + 0x10] ADD EAX,0x1 MOV dword ptr [RSP + 0x10],EAX JMP 0x00134cac LAB_00134cfc: MOV EAX,dword ptr [RSP + 0x10] MOV dword ptr [RSP + 0x14],EAX JMP 0x00134d19 LAB_00134d06: LEA RDI,[0x17b08f] MOV AL,0x0 CALL 0x00102030 JMP 0x00134e13 LAB_00134d19: JMP 0x00134dae LAB_00134d1e: CMP dword ptr [RSP + 0x14],0x0 JNZ 0x00134dac LEA RAX,[0x1a2718] MOV RAX,qword ptr [RAX] CMP qword ptr [RAX + 0xb8],0x0 JZ 0x00134d79 LEA RAX,[0x1a2718] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0xb8] LEA RCX,[0x1a2740] MOV RCX,qword ptr [RCX] MOV RDI,qword ptr [RCX] LEA RCX,[0x1a2740] MOV RSI,qword ptr [RCX] ADD RSI,0x1818 MOV EDX,0x4000 CALL RAX MOV dword ptr [RSP + 0x14],EAX JMP 0x00134daa LAB_00134d79: LEA RAX,[0x1a2740] MOV RDI,qword ptr [RAX] ADD RDI,0x1818 LEA RAX,[0x1a2740] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RAX] MOV ESI,0x1 MOV EDX,0x4000 CALL 0x00102380 MOV dword ptr [RSP + 0x14],EAX LAB_00134daa: JMP 0x00134dac LAB_00134dac: JMP 0x00134dae LAB_00134dae: CMP dword ptr [RSP + 0x14],0x0 JG 0x00134dc9 LEA RAX,[0x1a2740] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x50],0x0 JMP 0x00134e13 LAB_00134dc9: LEA RAX,[0x1a2740] MOV RCX,qword ptr [RAX] ADD RCX,0x1818 LEA RAX,[0x1a2740] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x50],RCX LEA RAX,[0x1a2740] MOV RCX,qword ptr [RAX] ADD RCX,0x1818 MOVSXD RAX,dword ptr [RSP + 0x14] ADD RCX,RAX ADD RCX,-0x1 LEA RAX,[0x1a2740] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x20],RCX LAB_00134e13: ADD RSP,0x18 RET
/* LefDefParser::lefReloadBuffer() */ void LefDefParser::lefReloadBuffer(void) { int iVar1; int4 uVar2; size_t sVar3; int local_8; int local_4; local_4 = 0; if (*(int *)((long)lefData + 0xfc) != 0) { *(int4 *)((long)lefData + 0xfc) = 0; if (*(long *)(lefSettings + 0xb8) == 0) { sVar3 = fread(lefData + 0x303,1,4,(FILE *)*lefData); if ((int)sVar3 != 4) { lefData[10] = 0; return; } } else { iVar1 = (**(code **)(lefSettings + 0xb8))(*lefData,lefData + 0x303,4); if (iVar1 != 4) { lefData[10] = 0; return; } } local_4 = 4; uVar2 = encIsEncrypted((uchar *)(lefData + 0x303)); *(int4 *)((long)lefData + 0xf4) = uVar2; } if (*(int *)((long)lefData + 0xf4) == 0) { if (local_4 == 0) { if (*(long *)(lefSettings + 0xb8) == 0) { sVar3 = fread(lefData + 0x303,1,0x4000,(FILE *)*lefData); local_4 = (int)sVar3; } else { local_4 = (**(code **)(lefSettings + 0xb8))(*lefData,lefData + 0x303,0x4000); } } } else { if (*(int *)(lefSettings + 0xc0) == 0) { printf("File is an encrypted file, reader is not set to read one.\n"); return; } local_8 = 0; while ((local_8 < 0x4000 && (iVar1 = encFgetc((_IO_FILE *)*lefData), iVar1 != -1))) { *(char *)((long)lefData + (long)local_8 + 0x1818) = (char)iVar1; local_8 = local_8 + 1; } local_4 = local_8; } if (local_4 < 1) { lefData[10] = 0; } else { lefData[10] = lefData + 0x303; lefData[4] = (long)lefData + (long)local_4 + 0x1817; } return; }
19,288
LefDefParser::lefReloadBuffer()
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lef_keywords.cpp
void lefReloadBuffer() { int nb; nb = 0; if (lefData->first_buffer) { lefData->first_buffer = 0; if (lefSettings->ReadFunction) { if ((nb = (*lefSettings->ReadFunction)(lefData->lefrFile, lefData->current_buffer, 4)) != 4) { lefData->next = NULL; return; } } else { if ((nb = fread(lefData->current_buffer, 1, 4, lefData->lefrFile)) != 4) { lefData->next = NULL; return; } } lefData->encrypted = encIsEncrypted((unsigned char*) lefData->current_buffer); } if (lefData->encrypted) { int i; int c; if (lefSettings->ReadEncrypted) { // is encrypted file and user has set the enable flag to read one for (i = 0; i < IN_BUF_SIZE; i++) { if ((c = encFgetc(lefData->lefrFile)) == EOF) { break; } lefData->current_buffer[i] = c; } nb = i; } else { // an encrypted file, but user does not allow to read one printf("File is an encrypted file, reader is not set to read one.\n"); return; } } else if (nb == 0) { if (lefSettings->ReadFunction) nb = (*lefSettings->ReadFunction)(lefData->lefrFile, lefData->current_buffer, IN_BUF_SIZE); else // This is a normal file so just read some bytes. nb = fread(lefData->current_buffer, 1, IN_BUF_SIZE, lefData->lefrFile); } if (nb <= 0) { lefData->next = NULL; } else { lefData->next = lefData->current_buffer; lefData->last = lefData->current_buffer + nb - 1; } }
O3
cpp
LefDefParser::lefReloadBuffer(): pushq %r14 pushq %rbx pushq %rax leaq 0x532c1(%rip), %r14 # 0x775e0 movq (%r14), %rax cmpl $0x0, 0xfc(%rax) je 0x24360 movl $0x0, 0xfc(%rax) leaq 0x5327c(%rip), %rcx # 0x775b8 movq (%rcx), %rcx movq 0xb8(%rcx), %rcx testq %rcx, %rcx je 0x2439b movq (%rax), %rdi addq $0x1818, %rax # imm = 0x1818 movl $0x4, %edx movq %rax, %rsi callq *%rcx jmp 0x243b6 cmpl $0x0, 0xf4(%rax) jne 0x243d5 leaq 0x53248(%rip), %rcx # 0x775b8 movq (%rcx), %rcx movq 0xb8(%rcx), %rcx testq %rcx, %rcx je 0x24441 movq (%rax), %rdi addq $0x1818, %rax # imm = 0x1818 movl $0x4000, %edx # imm = 0x4000 movq %rax, %rsi callq *%rcx jmp 0x2445c movq (%rax), %rcx addq $0x1818, %rax # imm = 0x1818 movl $0x1, %esi movl $0x4, %edx movq %rax, %rdi callq 0x22d0 cmpl $0x4, %eax jne 0x2441a movl $0x1818, %edi # imm = 0x1818 addq (%r14), %rdi callq 0x49860 movq (%r14), %rcx movl %eax, 0xf4(%rcx) testl %eax, %eax je 0x2443a leaq 0x531dc(%rip), %rax # 0x775b8 movq (%rax), %rax cmpl $0x0, 0xc0(%rax) je 0x24427 xorl %ebx, %ebx movq (%r14), %rax movq (%rax), %rdi callq 0x49863 cmpl $-0x1, %eax je 0x2445f movq (%r14), %rcx movb %al, 0x1818(%rcx,%rbx) incq %rbx cmpq $0x4000, %rbx # imm = 0x4000 jne 0x243ea movq (%r14), %rcx movl $0x4000, %ebx # imm = 0x4000 jmp 0x24466 movq (%r14), %rax movq $0x0, 0x50(%rax) jmp 0x24480 leaq 0x2db36(%rip), %rdi # 0x51f64 addq $0x8, %rsp popq %rbx popq %r14 jmp 0x22e0 movl $0x4, %ebx jmp 0x24466 movq (%rax), %rcx addq $0x1818, %rax # imm = 0x1818 movl $0x1, %esi movl $0x4000, %edx # imm = 0x4000 movq %rax, %rdi callq 0x22d0 movq %rax, %rbx movq (%r14), %rcx testl %ebx, %ebx jle 0x24488 leaq 0x1818(%rcx), %rax movq %rax, 0x50(%rcx) movl %ebx, %eax addq %rcx, %rax addq $0x1817, %rax # imm = 0x1817 movq %rax, 0x20(%rcx) addq $0x8, %rsp popq %rbx popq %r14 retq movq $0x0, 0x50(%rcx) jmp 0x24480
_ZN12LefDefParser15lefReloadBufferEv: push r14 push rbx push rax lea r14, _ZN12LefDefParser7lefDataE; LefDefParser::lefData mov rax, [r14] cmp dword ptr [rax+0FCh], 0 jz short loc_24360 mov dword ptr [rax+0FCh], 0 lea rcx, _ZN12LefDefParser11lefSettingsE; LefDefParser::lefSettings mov rcx, [rcx] mov rcx, [rcx+0B8h] test rcx, rcx jz short loc_2439B mov rdi, [rax] add rax, 1818h mov edx, 4 mov rsi, rax call rcx jmp short loc_243B6 loc_24360: cmp dword ptr [rax+0F4h], 0 jnz short loc_243D5 lea rcx, _ZN12LefDefParser11lefSettingsE; LefDefParser::lefSettings mov rcx, [rcx] mov rcx, [rcx+0B8h] test rcx, rcx jz loc_24441 mov rdi, [rax] add rax, 1818h mov edx, 4000h mov rsi, rax call rcx jmp loc_2445C loc_2439B: mov rcx, [rax] add rax, 1818h mov esi, (offset dword_0+1); unsigned __int8 * mov edx, 4 mov rdi, rax call _fread loc_243B6: cmp eax, 4 jnz short loc_2441A mov edi, 1818h add rdi, [r14]; this call _ZN12LefDefParser14encIsEncryptedEPh; LefDefParser::encIsEncrypted(uchar *) mov rcx, [r14] mov [rcx+0F4h], eax test eax, eax jz short loc_2443A loc_243D5: lea rax, _ZN12LefDefParser11lefSettingsE; LefDefParser::lefSettings mov rax, [rax] cmp dword ptr [rax+0C0h], 0 jz short loc_24427 xor ebx, ebx loc_243EA: mov rax, [r14] mov rdi, [rax] call _ZN12LefDefParser8encFgetcEP8_IO_FILE; LefDefParser::encFgetc(_IO_FILE *) cmp eax, 0FFFFFFFFh jz short loc_2445F mov rcx, [r14] mov [rcx+rbx+1818h], al inc rbx cmp rbx, 4000h jnz short loc_243EA mov rcx, [r14] mov ebx, 4000h jmp short loc_24466 loc_2441A: mov rax, [r14] mov qword ptr [rax+50h], 0 jmp short loc_24480 loc_24427: lea rdi, aFileIsAnEncryp; "File is an encrypted file, reader is no"... add rsp, 8 pop rbx pop r14 jmp _puts loc_2443A: mov ebx, 4 jmp short loc_24466 loc_24441: mov rcx, [rax] add rax, 1818h mov esi, 1 mov edx, 4000h mov rdi, rax call _fread loc_2445C: mov rbx, rax loc_2445F: mov rcx, [r14] test ebx, ebx jle short loc_24488 loc_24466: lea rax, [rcx+1818h] mov [rcx+50h], rax mov eax, ebx add rax, rcx add rax, 1817h mov [rcx+20h], rax loc_24480: add rsp, 8 pop rbx pop r14 retn loc_24488: mov qword ptr [rcx+50h], 0 jmp short loc_24480
long long LefDefParser::lefReloadBuffer(LefDefParser *this) { _QWORD *v1; // rax long long ( *v2)(_QWORD, _QWORD *, long long); // rcx unsigned __int8 *v3; // rsi int v4; // eax long long ( *v5)(_QWORD, long long, long long); // rcx long long result; // rax int IsEncrypted; // eax long long v8; // rcx long long v9; // rbx v1 = *(_QWORD **)LefDefParser::lefData; if ( *(_DWORD *)(*(_QWORD *)LefDefParser::lefData + 252LL) ) { *(_DWORD *)(*(_QWORD *)LefDefParser::lefData + 252LL) = 0; v2 = (long long ( *)(_QWORD, _QWORD *, long long))*((_QWORD *)LefDefParser::lefSettings + 23); if ( v2 ) { v3 = (unsigned __int8 *)(v1 + 771); v4 = v2(*v1, v1 + 771, 4LL); } else { v3 = (unsigned __int8 *)&dword_0 + 1; v4 = fread(v1 + 771, (char *)&dword_0 + 1, 4LL, *v1); } if ( v4 != 4 ) { result = *(_QWORD *)LefDefParser::lefData; *(_QWORD *)(*(_QWORD *)LefDefParser::lefData + 80LL) = 0LL; return result; } IsEncrypted = LefDefParser::encIsEncrypted((LefDefParser *)(*(_QWORD *)LefDefParser::lefData + 6168LL), v3); v8 = *(_QWORD *)LefDefParser::lefData; *(_DWORD *)(*(_QWORD *)LefDefParser::lefData + 244LL) = IsEncrypted; if ( !IsEncrypted ) { LODWORD(v9) = 4; goto LABEL_21; } } else if ( !*(_DWORD *)(*(_QWORD *)LefDefParser::lefData + 244LL) ) { v5 = (long long ( *)(_QWORD, long long, long long))*((_QWORD *)LefDefParser::lefSettings + 23); if ( v5 ) result = v5(**(_QWORD **)LefDefParser::lefData, *(_QWORD *)LefDefParser::lefData + 6168LL, 0x4000LL); else result = fread(*(_QWORD *)LefDefParser::lefData + 6168LL, 1LL, 0x4000LL, **(_QWORD **)LefDefParser::lefData); LODWORD(v9) = result; goto LABEL_20; } if ( !*((_DWORD *)LefDefParser::lefSettings + 48) ) return puts("File is an encrypted file, reader is not set to read one."); v9 = 0LL; while ( 1 ) { result = LefDefParser::encFgetc(**(_QWORD **)LefDefParser::lefData); if ( (_DWORD)result == -1 ) break; *(_BYTE *)(*(_QWORD *)LefDefParser::lefData + v9++ + 6168) = result; if ( v9 == 0x4000 ) { v8 = *(_QWORD *)LefDefParser::lefData; LODWORD(v9) = 0x4000; goto LABEL_21; } } LABEL_20: v8 = *(_QWORD *)LefDefParser::lefData; if ( (int)v9 <= 0 ) { *(_QWORD *)(*(_QWORD *)LefDefParser::lefData + 80LL) = 0LL; return result; } LABEL_21: *(_QWORD *)(v8 + 80) = v8 + 6168; result = v8 + (unsigned int)v9 + 6167; *(_QWORD *)(v8 + 32) = result; return result; }
lefReloadBuffer: PUSH R14 PUSH RBX PUSH RAX LEA R14,[0x1775e0] MOV RAX,qword ptr [R14] CMP dword ptr [RAX + 0xfc],0x0 JZ 0x00124360 MOV dword ptr [RAX + 0xfc],0x0 LEA RCX,[0x1775b8] MOV RCX,qword ptr [RCX] MOV RCX,qword ptr [RCX + 0xb8] TEST RCX,RCX JZ 0x0012439b MOV RDI,qword ptr [RAX] ADD RAX,0x1818 MOV EDX,0x4 MOV RSI,RAX CALL RCX JMP 0x001243b6 LAB_00124360: CMP dword ptr [RAX + 0xf4],0x0 JNZ 0x001243d5 LEA RCX,[0x1775b8] MOV RCX,qword ptr [RCX] MOV RCX,qword ptr [RCX + 0xb8] TEST RCX,RCX JZ 0x00124441 MOV RDI,qword ptr [RAX] ADD RAX,0x1818 MOV EDX,0x4000 MOV RSI,RAX CALL RCX JMP 0x0012445c LAB_0012439b: MOV RCX,qword ptr [RAX] ADD RAX,0x1818 MOV ESI,0x1 MOV EDX,0x4 MOV RDI,RAX CALL 0x001022d0 LAB_001243b6: CMP EAX,0x4 JNZ 0x0012441a MOV EDI,0x1818 ADD RDI,qword ptr [R14] CALL 0x00149860 MOV RCX,qword ptr [R14] MOV dword ptr [RCX + 0xf4],EAX TEST EAX,EAX JZ 0x0012443a LAB_001243d5: LEA RAX,[0x1775b8] MOV RAX,qword ptr [RAX] CMP dword ptr [RAX + 0xc0],0x0 JZ 0x00124427 XOR EBX,EBX LAB_001243ea: MOV RAX,qword ptr [R14] MOV RDI,qword ptr [RAX] CALL 0x00149863 CMP EAX,-0x1 JZ 0x0012445f MOV RCX,qword ptr [R14] MOV byte ptr [RCX + RBX*0x1 + 0x1818],AL INC RBX CMP RBX,0x4000 JNZ 0x001243ea MOV RCX,qword ptr [R14] MOV EBX,0x4000 JMP 0x00124466 LAB_0012441a: MOV RAX,qword ptr [R14] MOV qword ptr [RAX + 0x50],0x0 JMP 0x00124480 LAB_00124427: LEA RDI,[0x151f64] ADD RSP,0x8 POP RBX POP R14 JMP 0x001022e0 LAB_0012443a: MOV EBX,0x4 JMP 0x00124466 LAB_00124441: MOV RCX,qword ptr [RAX] ADD RAX,0x1818 MOV ESI,0x1 MOV EDX,0x4000 MOV RDI,RAX CALL 0x001022d0 LAB_0012445c: MOV RBX,RAX LAB_0012445f: MOV RCX,qword ptr [R14] TEST EBX,EBX JLE 0x00124488 LAB_00124466: LEA RAX,[RCX + 0x1818] MOV qword ptr [RCX + 0x50],RAX MOV EAX,EBX ADD RAX,RCX ADD RAX,0x1817 MOV qword ptr [RCX + 0x20],RAX LAB_00124480: ADD RSP,0x8 POP RBX POP R14 RET LAB_00124488: MOV qword ptr [RCX + 0x50],0x0 JMP 0x00124480
/* LefDefParser::lefReloadBuffer() */ void LefDefParser::lefReloadBuffer(void) { int iVar1; int8 *puVar2; size_t sVar3; puVar2 = lefData; if (*(int *)((long)lefData + 0xfc) == 0) { if (*(int *)((long)lefData + 0xf4) == 0) { if (*(code **)(lefSettings + 0xb8) == (code *)0x0) { sVar3 = fread(lefData + 0x303,1,0x4000,(FILE *)*lefData); } else { sVar3 = (**(code **)(lefSettings + 0xb8))(*lefData,lefData + 0x303,0x4000); } LAB_0012445f: puVar2 = lefData; if ((int)sVar3 < 1) { lefData[10] = 0; return; } goto LAB_00124466; } } else { *(int4 *)((long)lefData + 0xfc) = 0; if (*(code **)(lefSettings + 0xb8) == (code *)0x0) { sVar3 = fread(puVar2 + 0x303,1,4,(FILE *)*puVar2); iVar1 = (int)sVar3; } else { iVar1 = (**(code **)(lefSettings + 0xb8))(*puVar2,puVar2 + 0x303,4); } if (iVar1 != 4) { lefData[10] = 0; return; } iVar1 = encIsEncrypted((uchar *)(lefData + 0x303)); puVar2 = lefData; *(int *)((long)lefData + 0xf4) = iVar1; if (iVar1 == 0) { sVar3 = 4; goto LAB_00124466; } } if (*(int *)(lefSettings + 0xc0) == 0) { puts("File is an encrypted file, reader is not set to read one."); return; } sVar3 = 0; do { iVar1 = encFgetc((_IO_FILE *)*lefData); if (iVar1 == -1) goto LAB_0012445f; *(char *)((long)lefData + sVar3 + 0x1818) = (char)iVar1; sVar3 = sVar3 + 1; } while (sVar3 != 0x4000); sVar3 = 0x4000; puVar2 = lefData; LAB_00124466: puVar2[10] = puVar2 + 0x303; puVar2[4] = (long)puVar2 + (sVar3 & 0xffffffff) + 0x1817; return; }
19,289
my_uni_utf8mb3
eloqsql/strings/ctype-utf8.c
static int my_uni_utf8mb3(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *r, uchar *e) { if (wc < 0x80) { if (r >= e) return MY_CS_TOOSMALL; *r= (uchar) wc; return 1; } if (wc < 0x800) { if (r + 2 > e) return MY_CS_TOOSMALLN(2); /* U+0080..U+07FF: 00000xxx.xxyyyyyy -> 110xxxxx 10yyyyyy */ *r++= (uchar) (0xC0 | (wc >> 6)); *r= (uchar) (0x80 | (wc & 0x3F)); return 2; } if (wc < 0x10000) { if (r + 3 > e) return MY_CS_TOOSMALLN(3); /* U+0800..U+FFFF: xxxxyyyy.yyzzzzzz -> 1110xxxx 10yyyyyy 10zzzzzz */ *r++= (uchar) (0xE0 | (wc >> 12)); *r++= (uchar) (0x80 | ((wc >> 6) & 0x3f)); *r= (uchar) (0x80 | (wc & 0x3f)); return 3; } return MY_CS_ILUNI; }
O3
c
my_uni_utf8mb3: pushq %rbp movq %rsp, %rbp cmpq $0x7f, %rsi ja 0xcb91e movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0xcb990 movb %sil, (%rdx) movl $0x1, %eax jmp 0xcb990 cmpq $0x7ff, %rsi # imm = 0x7FF ja 0xcb951 leaq 0x2(%rdx), %rdi movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %rdi ja 0xcb990 movl %esi, %eax shrl $0x6, %eax orb $-0x40, %al movb %al, (%rdx) andb $0x3f, %sil orb $-0x80, %sil movb %sil, 0x1(%rdx) movl $0x2, %eax jmp 0xcb990 xorl %eax, %eax cmpq $0xffff, %rsi # imm = 0xFFFF ja 0xcb990 leaq 0x3(%rdx), %rdi movl $0xffffff99, %eax # imm = 0xFFFFFF99 cmpq %rcx, %rdi ja 0xcb990 movl %esi, %eax shrl $0xc, %eax orb $-0x20, %al movb %al, (%rdx) movl %esi, %eax shrl $0x6, %eax andb $0x3f, %al orb $-0x80, %al movb %al, 0x1(%rdx) andb $0x3f, %sil orb $-0x80, %sil movb %sil, 0x2(%rdx) movl $0x3, %eax popq %rbp retq
my_uni_utf8mb3: push rbp mov rbp, rsp cmp rsi, 7Fh ja short loc_CB91E mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short loc_CB990 mov [rdx], sil mov eax, 1 jmp short loc_CB990 loc_CB91E: cmp rsi, 7FFh ja short loc_CB951 lea rdi, [rdx+2] mov eax, 0FFFFFF9Ah cmp rdi, rcx ja short loc_CB990 mov eax, esi shr eax, 6 or al, 0C0h mov [rdx], al and sil, 3Fh or sil, 80h mov [rdx+1], sil mov eax, 2 jmp short loc_CB990 loc_CB951: xor eax, eax cmp rsi, 0FFFFh ja short loc_CB990 lea rdi, [rdx+3] mov eax, 0FFFFFF99h cmp rdi, rcx ja short loc_CB990 mov eax, esi shr eax, 0Ch or al, 0E0h mov [rdx], al mov eax, esi shr eax, 6 and al, 3Fh or al, 80h mov [rdx+1], al and sil, 3Fh or sil, 80h mov [rdx+2], sil mov eax, 3 loc_CB990: pop rbp retn
long long my_uni_utf8mb3(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4) { long long result; // rax if ( a2 > 0x7F ) { if ( a2 > 0x7FF ) { result = 0LL; if ( a2 <= 0xFFFF ) { result = 4294967193LL; if ( (unsigned long long)(a3 + 3) <= a4 ) { *a3 = ((unsigned int)a2 >> 12) | 0xE0; a3[1] = ((unsigned int)a2 >> 6) & 0x3F | 0x80; a3[2] = a2 & 0x3F | 0x80; return 3LL; } } } else { result = 4294967194LL; if ( (unsigned long long)(a3 + 2) <= a4 ) { *a3 = ((unsigned int)a2 >> 6) | 0xC0; a3[1] = a2 & 0x3F | 0x80; return 2LL; } } } else { result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { *a3 = a2; return 1LL; } } return result; }
my_uni_utf8mb3: PUSH RBP MOV RBP,RSP CMP RSI,0x7f JA 0x001cb91e MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x001cb990 MOV byte ptr [RDX],SIL MOV EAX,0x1 JMP 0x001cb990 LAB_001cb91e: CMP RSI,0x7ff JA 0x001cb951 LEA RDI,[RDX + 0x2] MOV EAX,0xffffff9a CMP RDI,RCX JA 0x001cb990 MOV EAX,ESI SHR EAX,0x6 OR AL,0xc0 MOV byte ptr [RDX],AL AND SIL,0x3f OR SIL,0x80 MOV byte ptr [RDX + 0x1],SIL MOV EAX,0x2 JMP 0x001cb990 LAB_001cb951: XOR EAX,EAX CMP RSI,0xffff JA 0x001cb990 LEA RDI,[RDX + 0x3] MOV EAX,0xffffff99 CMP RDI,RCX JA 0x001cb990 MOV EAX,ESI SHR EAX,0xc OR AL,0xe0 MOV byte ptr [RDX],AL MOV EAX,ESI SHR EAX,0x6 AND AL,0x3f OR AL,0x80 MOV byte ptr [RDX + 0x1],AL AND SIL,0x3f OR SIL,0x80 MOV byte ptr [RDX + 0x2],SIL MOV EAX,0x3 LAB_001cb990: POP RBP RET
int8 my_uni_utf8mb3(int8 param_1,ulong param_2,byte *param_3,byte *param_4) { int8 uVar1; byte bVar2; uint uVar3; uVar3 = (uint)param_2; bVar2 = (byte)param_2; if (param_2 < 0x80) { uVar1 = 0xffffff9b; if (param_3 < param_4) { *param_3 = bVar2; uVar1 = 1; } } else if (param_2 < 0x800) { uVar1 = 0xffffff9a; if (param_3 + 2 <= param_4) { *param_3 = (byte)(uVar3 >> 6) | 0xc0; param_3[1] = bVar2 & 0x3f | 0x80; uVar1 = 2; } } else { uVar1 = 0; if ((param_2 < 0x10000) && (uVar1 = 0xffffff99, param_3 + 3 <= param_4)) { *param_3 = (byte)(uVar3 >> 0xc) | 0xe0; param_3[1] = (byte)(uVar3 >> 6) & 0x3f | 0x80; param_3[2] = bVar2 & 0x3f | 0x80; uVar1 = 3; } } return uVar1; }
19,290
ma_ft_convert_to_ft2
eloqsql/storage/maria/ma_ft_update.c
my_bool _ma_ft_convert_to_ft2(MARIA_HA *info, MARIA_KEY *key) { MARIA_SHARE *share= info->s; my_off_t root; DYNAMIC_ARRAY *da=info->ft1_to_ft2; MARIA_KEYDEF *keyinfo=&share->ft2_keyinfo; uchar *key_ptr= (uchar*) dynamic_array_ptr(da, 0), *end; uint length, key_length; MARIA_PINNED_PAGE tmp_page_link, *page_link= &tmp_page_link; MARIA_KEY tmp_key; MARIA_PAGE page; DBUG_ENTER("_ma_ft_convert_to_ft2"); /* we'll generate one pageful at once, and insert the rest one-by-one */ /* calculating the length of this page ...*/ length=(keyinfo->block_length-2) / keyinfo->keylength; set_if_smaller(length, da->elements); length=length * keyinfo->keylength; get_key_full_length_rdonly(key_length, key->data); while (_ma_ck_delete(info, key) == 0) { /* nothing to do here. _ma_ck_delete() will populate info->ft1_to_ft2 with deleted keys */ } /* creating pageful of keys */ bzero(info->buff, share->keypage_header); _ma_store_keynr(share, info->buff, keyinfo->key_nr); _ma_store_page_used(share, info->buff, length + share->keypage_header); memcpy(info->buff + share->keypage_header, key_ptr, length); info->keyread_buff_used= info->page_changed=1; /* info->buff is used */ /** @todo RECOVERY BUG this is not logged yet. Ok as this code is never called, but soon it will be. */ if ((root= _ma_new(info, DFLT_INIT_HITS, &page_link)) == HA_OFFSET_ERROR) DBUG_RETURN(1); _ma_page_setup(&page, info, keyinfo, root, info->buff); if (_ma_write_keypage(&page, page_link->write_lock, DFLT_INIT_HITS)) DBUG_RETURN(1); /* inserting the rest of key values */ end= (uchar*) dynamic_array_ptr(da, da->elements); tmp_key.keyinfo= keyinfo; tmp_key.data_length= keyinfo->keylength; tmp_key.ref_length= 0; tmp_key.flag= 0; for (key_ptr+=length; key_ptr < end; key_ptr+=keyinfo->keylength) { tmp_key.data= key_ptr; if (_ma_ck_real_write_btree(info, &tmp_key, &root, SEARCH_SAME)) DBUG_RETURN(1); } /* now, writing the word key entry */ ft_intXstore(key->data + key_length, - (int) da->elements); _ma_dpointer(share, key->data + key_length + HA_FT_WLEN, root); DBUG_RETURN(_ma_ck_real_write_btree(info, key, &share->state.key_root[key->keyinfo-> key_nr], SEARCH_SAME)); }
O0
c
ma_ft_convert_to_ft2: pushq %rbp movq %rsp, %rbp subq $0xe0, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x320(%rax), %rax movq %rax, -0x30(%rbp) movq -0x20(%rbp), %rax addq $0x458, %rax # imm = 0x458 movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax movq (%rax), %rax movq -0x30(%rbp), %rcx imull $0x0, 0x14(%rcx), %ecx movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x40(%rbp) leaq -0x68(%rbp), %rax movq %rax, -0x70(%rbp) movq -0x38(%rbp), %rax movzwl 0xa6(%rax), %eax subl $0x2, %eax movq -0x38(%rbp), %rcx movzwl 0xaa(%rcx), %ecx cltd idivl %ecx movl %eax, -0x4c(%rbp) movl -0x4c(%rbp), %eax movq -0x30(%rbp), %rcx cmpl 0x8(%rcx), %eax jbe 0x73590 movq -0x30(%rbp), %rax movl 0x8(%rax), %eax movl %eax, -0x4c(%rbp) jmp 0x73592 movl -0x4c(%rbp), %eax movq -0x38(%rbp), %rcx movzwl 0xaa(%rcx), %ecx imull %ecx, %eax movl %eax, -0x4c(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movzbl (%rax), %eax cmpl $0xff, %eax je 0x735c9 movq -0x18(%rbp), %rax movq (%rax), %rax movzbl (%rax), %eax addl $0x1, %eax movl %eax, -0x50(%rbp) jmp 0x735f3 movq -0x18(%rbp), %rax movq (%rax), %rax movzbl 0x2(%rax), %eax movzwl %ax, %eax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movzbl 0x1(%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movzwl %ax, %eax addl $0x3, %eax movl %eax, -0x50(%rbp) jmp 0x735f5 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x67f60 movsbl %al, %eax cmpl $0x0, %eax jne 0x7360c jmp 0x735f5 movq -0x10(%rbp), %rax movq 0x378(%rax), %rdi movq -0x20(%rbp), %rax movl 0x744(%rax), %eax movl %eax, %edx xorl %esi, %esi callq 0x29280 movq -0x38(%rbp), %rax movb 0xa5(%rax), %dl movq -0x10(%rbp), %rax movq 0x378(%rax), %rax movq -0x20(%rbp), %rcx movl 0x744(%rcx), %ecx subl $0x1, %ecx subl $0x1, %ecx subl $0x2, %ecx movl %ecx, %ecx movb %dl, (%rax,%rcx) movl -0x4c(%rbp), %eax movq -0x20(%rbp), %rcx addl 0x744(%rcx), %eax movl %eax, -0xcc(%rbp) movl -0xcc(%rbp), %eax movb %al, %dl movq -0x10(%rbp), %rax movq 0x378(%rax), %rax movq -0x20(%rbp), %rcx movl 0x744(%rcx), %ecx movb %dl, -0x1(%rax,%rcx) movl -0xcc(%rbp), %eax shrl $0x8, %eax movb %al, %dl movq -0x10(%rbp), %rax movq 0x378(%rax), %rax movq -0x20(%rbp), %rcx movl 0x744(%rcx), %ecx movb %dl, -0x2(%rax,%rcx) movq -0x10(%rbp), %rax movq 0x378(%rax), %rdi movq -0x20(%rbp), %rax movl 0x744(%rax), %eax addq %rax, %rdi movq -0x40(%rbp), %rsi movl -0x4c(%rbp), %eax movl %eax, %edx callq 0x29090 movq -0x10(%rbp), %rax movb $0x1, 0x684(%rax) movq -0x10(%rbp), %rax movb $0x1, 0x685(%rax) movq -0x10(%rbp), %rdi movl $0x3, %esi leaq -0x70(%rbp), %rdx callq 0x3d7e0 movq %rax, -0x28(%rbp) cmpq $-0x1, %rax jne 0x73712 jmp 0x73709 movb $0x1, -0x1(%rbp) jmp 0x738d9 movq -0x10(%rbp), %rsi movq -0x38(%rbp), %rdx movq -0x28(%rbp), %rcx movq -0x10(%rbp), %rax movq 0x378(%rax), %r8 leaq -0xc8(%rbp), %rdi callq 0x3cef0 movq -0x70(%rbp), %rax movl 0xc(%rax), %esi leaq -0xc8(%rbp), %rdi movl $0x3, %edx callq 0x3d210 cmpb $0x0, %al je 0x7375c jmp 0x73753 movb $0x1, -0x1(%rbp) jmp 0x738d9 movq -0x30(%rbp), %rax movq (%rax), %rax movq -0x30(%rbp), %rcx movl 0x8(%rcx), %ecx movq -0x30(%rbp), %rdx imull 0x14(%rdx), %ecx movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x48(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x88(%rbp) movq -0x38(%rbp), %rax movzwl 0xaa(%rax), %eax movl %eax, -0x80(%rbp) movl $0x0, -0x7c(%rbp) movl $0x0, -0x78(%rbp) movl -0x4c(%rbp), %ecx movq -0x40(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax cmpq -0x48(%rbp), %rax jae 0x7380c movq -0x40(%rbp), %rax movq %rax, -0x90(%rbp) movq -0x10(%rbp), %rdi leaq -0x90(%rbp), %rsi leaq -0x28(%rbp), %rdx movl $0x4, %ecx callq 0x62660 cmpb $0x0, %al je 0x737ef jmp 0x737e6 movb $0x1, -0x1(%rbp) jmp 0x738d9 jmp 0x737f1 movq -0x38(%rbp), %rax movzwl 0xaa(%rax), %ecx movq -0x40(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x40(%rbp) jmp 0x737b2 movq -0x30(%rbp), %rcx xorl %eax, %eax subl 0x8(%rcx), %eax cltq movq %rax, -0xd8(%rbp) movq -0xd8(%rbp), %rax movb %al, %dl movq -0x18(%rbp), %rax movq (%rax), %rax movl -0x50(%rbp), %ecx movb %dl, 0x3(%rax,%rcx) movq -0xd8(%rbp), %rax shrq $0x8, %rax movb %al, %dl movq -0x18(%rbp), %rax movq (%rax), %rax movl -0x50(%rbp), %ecx movb %dl, 0x2(%rax,%rcx) movq -0xd8(%rbp), %rax shrq $0x10, %rax movb %al, %dl movq -0x18(%rbp), %rax movq (%rax), %rax movl -0x50(%rbp), %ecx movb %dl, 0x1(%rax,%rcx) movq -0xd8(%rbp), %rax shrq $0x18, %rax movb %al, %dl movq -0x18(%rbp), %rax movq (%rax), %rax movl -0x50(%rbp), %ecx movb %dl, (%rax,%rcx) movq -0x20(%rbp), %rdi movq -0x18(%rbp), %rax movq (%rax), %rsi movl -0x50(%rbp), %eax addq %rax, %rsi addq $0x4, %rsi movq -0x28(%rbp), %rdx callq 0x39640 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rax movq 0x118(%rax), %rdx movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movzbl 0xa5(%rax), %eax shlq $0x3, %rax addq %rax, %rdx movl $0x4, %ecx callq 0x62660 movb %al, -0x1(%rbp) movb -0x1(%rbp), %al addq $0xe0, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nop
_ma_ft_convert_to_ft2: push rbp mov rbp, rsp sub rsp, 0E0h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rax, [rax+320h] mov [rbp+var_30], rax mov rax, [rbp+var_20] add rax, 458h mov [rbp+var_38], rax mov rax, [rbp+var_30] mov rax, [rax] mov rcx, [rbp+var_30] imul ecx, [rcx+14h], 0 mov ecx, ecx add rax, rcx mov [rbp+var_40], rax lea rax, [rbp+var_68] mov [rbp+var_70], rax mov rax, [rbp+var_38] movzx eax, word ptr [rax+0A6h] sub eax, 2 mov rcx, [rbp+var_38] movzx ecx, word ptr [rcx+0AAh] cdq idiv ecx mov [rbp+var_4C], eax mov eax, [rbp+var_4C] mov rcx, [rbp+var_30] cmp eax, [rcx+8] jbe short loc_73590 mov rax, [rbp+var_30] mov eax, [rax+8] mov [rbp+var_4C], eax loc_73590: jmp short $+2 loc_73592: mov eax, [rbp+var_4C] mov rcx, [rbp+var_38] movzx ecx, word ptr [rcx+0AAh] imul eax, ecx mov [rbp+var_4C], eax mov rax, [rbp+var_18] mov rax, [rax] movzx eax, byte ptr [rax] cmp eax, 0FFh jz short loc_735C9 mov rax, [rbp+var_18] mov rax, [rax] movzx eax, byte ptr [rax] add eax, 1 mov [rbp+var_50], eax jmp short loc_735F3 loc_735C9: mov rax, [rbp+var_18] mov rax, [rax] movzx eax, byte ptr [rax+2] movzx eax, ax mov rcx, [rbp+var_18] mov rcx, [rcx] movzx ecx, byte ptr [rcx+1] movzx ecx, cx shl ecx, 8 or eax, ecx movzx eax, ax add eax, 3 mov [rbp+var_50], eax loc_735F3: jmp short $+2 loc_735F5: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call _ma_ck_delete movsx eax, al cmp eax, 0 jnz short loc_7360C jmp short loc_735F5 loc_7360C: mov rax, [rbp+var_10] mov rdi, [rax+378h] mov rax, [rbp+var_20] mov eax, [rax+744h] mov edx, eax xor esi, esi call _memset mov rax, [rbp+var_38] mov dl, [rax+0A5h] mov rax, [rbp+var_10] mov rax, [rax+378h] mov rcx, [rbp+var_20] mov ecx, [rcx+744h] sub ecx, 1 sub ecx, 1 sub ecx, 2 mov ecx, ecx mov [rax+rcx], dl mov eax, [rbp+var_4C] mov rcx, [rbp+var_20] add eax, [rcx+744h] mov [rbp+var_CC], eax mov eax, [rbp+var_CC] mov dl, al mov rax, [rbp+var_10] mov rax, [rax+378h] mov rcx, [rbp+var_20] mov ecx, [rcx+744h] mov [rax+rcx-1], dl mov eax, [rbp+var_CC] shr eax, 8 mov dl, al mov rax, [rbp+var_10] mov rax, [rax+378h] mov rcx, [rbp+var_20] mov ecx, [rcx+744h] mov [rax+rcx-2], dl mov rax, [rbp+var_10] mov rdi, [rax+378h] mov rax, [rbp+var_20] mov eax, [rax+744h] add rdi, rax mov rsi, [rbp+var_40] mov eax, [rbp+var_4C] mov edx, eax call _memcpy mov rax, [rbp+var_10] mov byte ptr [rax+684h], 1 mov rax, [rbp+var_10] mov byte ptr [rax+685h], 1 mov rdi, [rbp+var_10] mov esi, 3 lea rdx, [rbp+var_70] call _ma_new mov [rbp+var_28], rax cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_73712 jmp short $+2 loc_73709: mov [rbp+var_1], 1 jmp loc_738D9 loc_73712: mov rsi, [rbp+var_10] mov rdx, [rbp+var_38] mov rcx, [rbp+var_28] mov rax, [rbp+var_10] mov r8, [rax+378h] lea rdi, [rbp+var_C8] call _ma_page_setup mov rax, [rbp+var_70] mov esi, [rax+0Ch] lea rdi, [rbp+var_C8] mov edx, 3 call _ma_write_keypage cmp al, 0 jz short loc_7375C jmp short $+2 loc_73753: mov [rbp+var_1], 1 jmp loc_738D9 loc_7375C: mov rax, [rbp+var_30] mov rax, [rax] mov rcx, [rbp+var_30] mov ecx, [rcx+8] mov rdx, [rbp+var_30] imul ecx, [rdx+14h] mov ecx, ecx add rax, rcx mov [rbp+var_48], rax mov rax, [rbp+var_38] mov [rbp+var_88], rax mov rax, [rbp+var_38] movzx eax, word ptr [rax+0AAh] mov [rbp+var_80], eax mov [rbp+var_7C], 0 mov [rbp+var_78], 0 mov ecx, [rbp+var_4C] mov rax, [rbp+var_40] mov ecx, ecx add rax, rcx mov [rbp+var_40], rax loc_737B2: mov rax, [rbp+var_40] cmp rax, [rbp+var_48] jnb short loc_7380C mov rax, [rbp+var_40] mov [rbp+var_90], rax mov rdi, [rbp+var_10] lea rsi, [rbp+var_90] lea rdx, [rbp+var_28] mov ecx, 4 call _ma_ck_real_write_btree cmp al, 0 jz short loc_737EF jmp short $+2 loc_737E6: mov [rbp+var_1], 1 jmp loc_738D9 loc_737EF: jmp short $+2 loc_737F1: mov rax, [rbp+var_38] movzx ecx, word ptr [rax+0AAh] mov rax, [rbp+var_40] movsxd rcx, ecx add rax, rcx mov [rbp+var_40], rax jmp short loc_737B2 loc_7380C: mov rcx, [rbp+var_30] xor eax, eax sub eax, [rcx+8] cdqe mov [rbp+var_D8], rax mov rax, [rbp+var_D8] mov dl, al mov rax, [rbp+var_18] mov rax, [rax] mov ecx, [rbp+var_50] mov [rax+rcx+3], dl mov rax, [rbp+var_D8] shr rax, 8 mov dl, al mov rax, [rbp+var_18] mov rax, [rax] mov ecx, [rbp+var_50] mov [rax+rcx+2], dl mov rax, [rbp+var_D8] shr rax, 10h mov dl, al mov rax, [rbp+var_18] mov rax, [rax] mov ecx, [rbp+var_50] mov [rax+rcx+1], dl mov rax, [rbp+var_D8] shr rax, 18h mov dl, al mov rax, [rbp+var_18] mov rax, [rax] mov ecx, [rbp+var_50] mov [rax+rcx], dl mov rdi, [rbp+var_20] mov rax, [rbp+var_18] mov rsi, [rax] mov eax, [rbp+var_50] add rsi, rax add rsi, 4 mov rdx, [rbp+var_28] call _ma_dpointer mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rax, [rbp+var_20] mov rdx, [rax+118h] mov rax, [rbp+var_18] mov rax, [rax+8] movzx eax, byte ptr [rax+0A5h] shl rax, 3 add rdx, rax mov ecx, 4 call _ma_ck_real_write_btree mov [rbp+var_1], al loc_738D9: mov al, [rbp+var_1] add rsp, 0E0h pop rbp retn
bool ma_ft_convert_to_ft2(long long *a1, long long *a2) { int v2; // eax int v4; // [rsp+8h] [rbp-D8h] unsigned int v5; // [rsp+14h] [rbp-CCh] long long *v6[7]; // [rsp+18h] [rbp-C8h] BYREF _QWORD v7[2]; // [rsp+50h] [rbp-90h] BYREF int v8; // [rsp+60h] [rbp-80h] int v9; // [rsp+64h] [rbp-7Ch] int v10; // [rsp+68h] [rbp-78h] char *v11; // [rsp+70h] [rbp-70h] BYREF char v12; // [rsp+78h] [rbp-68h] BYREF unsigned int v13; // [rsp+90h] [rbp-50h] unsigned int v14; // [rsp+94h] [rbp-4Ch] unsigned long long v15; // [rsp+98h] [rbp-48h] unsigned long long v16; // [rsp+A0h] [rbp-40h] long long v17; // [rsp+A8h] [rbp-38h] long long v18; // [rsp+B0h] [rbp-30h] long long v19; // [rsp+B8h] [rbp-28h] BYREF long long v20; // [rsp+C0h] [rbp-20h] long long *v21; // [rsp+C8h] [rbp-18h] long long *v22; // [rsp+D0h] [rbp-10h] v22 = a1; v21 = a2; v20 = *a1; v18 = a1[100]; v17 = v20 + 1112; v16 = *(_QWORD *)v18; v11 = &v12; v14 = (*(unsigned __int16 *)(v20 + 1278) - 2) / *(unsigned __int16 *)(v20 + 1282); if ( v14 > *(_DWORD *)(v18 + 8) ) v14 = *(_DWORD *)(v18 + 8); v14 *= *(unsigned __int16 *)(v17 + 170); if ( *(unsigned __int8 *)*v21 == 255 ) v2 = _byteswap_ushort(*(_WORD *)(*v21 + 1)) + 3; else v2 = *(unsigned __int8 *)*v21 + 1; v13 = v2; while ( !ma_ck_delete(v22, v21) ) ; memset(v22[111], 0LL, *(unsigned int *)(v20 + 1860)); *(_BYTE *)(v22[111] + (unsigned int)(*(_DWORD *)(v20 + 1860) - 4)) = *(_BYTE *)(v17 + 165); v5 = *(_DWORD *)(v20 + 1860) + v14; *(_BYTE *)(v22[111] + *(unsigned int *)(v20 + 1860) - 1) = v5; *(_BYTE *)(v22[111] + *(unsigned int *)(v20 + 1860) - 2) = BYTE1(v5); memcpy(*(unsigned int *)(v20 + 1860) + v22[111], v16, v14); *((_BYTE *)v22 + 1668) = 1; *((_BYTE *)v22 + 1669) = 1; v19 = ma_new(v22, 3, (long long *)&v11); if ( v19 == -1 ) return 1; ma_page_setup((long long)v6, v22, v17, v19, v22[111]); if ( ma_write_keypage(v6, *((_DWORD *)v11 + 3), 3) ) return 1; v15 = (unsigned int)(*(_DWORD *)(v18 + 20) * *(_DWORD *)(v18 + 8)) + *(_QWORD *)v18; v7[1] = v17; v8 = *(unsigned __int16 *)(v17 + 170); v9 = 0; v10 = 0; for ( v16 += v14; v16 < v15; v16 += *(unsigned __int16 *)(v17 + 170) ) { v7[0] = v16; if ( ma_ck_real_write_btree((long long)v22, (long long)v7, &v19, 4) ) return 1; } v4 = -*(_DWORD *)(v18 + 8); *(_BYTE *)(*v21 + v13 + 3) = -*(_BYTE *)(v18 + 8); *(_BYTE *)(*v21 + v13 + 2) = BYTE1(v4); *(_BYTE *)(*v21 + v13 + 1) = BYTE2(v4); *(_BYTE *)(*v21 + v13) = HIBYTE(v4); ma_dpointer(v20, (_BYTE *)(v13 + *v21 + 4), v19); return ma_ck_real_write_btree( (long long)v22, (long long)v21, (_QWORD *)(8LL * *(unsigned __int8 *)(v21[1] + 165) + *(_QWORD *)(v20 + 280)), 4); }
_ma_ft_convert_to_ft2: PUSH RBP MOV RBP,RSP SUB RSP,0xe0 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x320] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x458 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x30] IMUL ECX,dword ptr [RCX + 0x14],0x0 MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x40],RAX LEA RAX,[RBP + -0x68] MOV qword ptr [RBP + -0x70],RAX MOV RAX,qword ptr [RBP + -0x38] MOVZX EAX,word ptr [RAX + 0xa6] SUB EAX,0x2 MOV RCX,qword ptr [RBP + -0x38] MOVZX ECX,word ptr [RCX + 0xaa] CDQ IDIV ECX MOV dword ptr [RBP + -0x4c],EAX MOV EAX,dword ptr [RBP + -0x4c] MOV RCX,qword ptr [RBP + -0x30] CMP EAX,dword ptr [RCX + 0x8] JBE 0x00173590 MOV RAX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RBP + -0x4c],EAX LAB_00173590: JMP 0x00173592 LAB_00173592: MOV EAX,dword ptr [RBP + -0x4c] MOV RCX,qword ptr [RBP + -0x38] MOVZX ECX,word ptr [RCX + 0xaa] IMUL EAX,ECX MOV dword ptr [RBP + -0x4c],EAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOVZX EAX,byte ptr [RAX] CMP EAX,0xff JZ 0x001735c9 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOVZX EAX,byte ptr [RAX] ADD EAX,0x1 MOV dword ptr [RBP + -0x50],EAX JMP 0x001735f3 LAB_001735c9: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOVZX EAX,byte ptr [RAX + 0x2] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x1] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX ADD EAX,0x3 MOV dword ptr [RBP + -0x50],EAX LAB_001735f3: JMP 0x001735f5 LAB_001735f5: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00167f60 MOVSX EAX,AL CMP EAX,0x0 JNZ 0x0017360c JMP 0x001735f5 LAB_0017360c: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x378] MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x744] MOV EDX,EAX XOR ESI,ESI CALL 0x00129280 MOV RAX,qword ptr [RBP + -0x38] MOV DL,byte ptr [RAX + 0xa5] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x378] MOV RCX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RCX + 0x744] SUB ECX,0x1 SUB ECX,0x1 SUB ECX,0x2 MOV ECX,ECX MOV byte ptr [RAX + RCX*0x1],DL MOV EAX,dword ptr [RBP + -0x4c] MOV RCX,qword ptr [RBP + -0x20] ADD EAX,dword ptr [RCX + 0x744] MOV dword ptr [RBP + -0xcc],EAX MOV EAX,dword ptr [RBP + -0xcc] MOV DL,AL MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x378] MOV RCX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RCX + 0x744] MOV byte ptr [RAX + RCX*0x1 + -0x1],DL MOV EAX,dword ptr [RBP + -0xcc] SHR EAX,0x8 MOV DL,AL MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x378] MOV RCX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RCX + 0x744] MOV byte ptr [RAX + RCX*0x1 + -0x2],DL MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x378] MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x744] ADD RDI,RAX MOV RSI,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RBP + -0x4c] MOV EDX,EAX CALL 0x00129090 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x684],0x1 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x685],0x1 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x3 LEA RDX,[RBP + -0x70] CALL 0x0013d7e0 MOV qword ptr [RBP + -0x28],RAX CMP RAX,-0x1 JNZ 0x00173712 JMP 0x00173709 LAB_00173709: MOV byte ptr [RBP + -0x1],0x1 JMP 0x001738d9 LAB_00173712: MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] MOV R8,qword ptr [RAX + 0x378] LEA RDI,[RBP + -0xc8] CALL 0x0013cef0 MOV RAX,qword ptr [RBP + -0x70] MOV ESI,dword ptr [RAX + 0xc] LEA RDI,[RBP + -0xc8] MOV EDX,0x3 CALL 0x0013d210 CMP AL,0x0 JZ 0x0017375c JMP 0x00173753 LAB_00173753: MOV byte ptr [RBP + -0x1],0x1 JMP 0x001738d9 LAB_0017375c: MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RCX + 0x8] MOV RDX,qword ptr [RBP + -0x30] IMUL ECX,dword ptr [RDX + 0x14] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x88],RAX MOV RAX,qword ptr [RBP + -0x38] MOVZX EAX,word ptr [RAX + 0xaa] MOV dword ptr [RBP + -0x80],EAX MOV dword ptr [RBP + -0x7c],0x0 MOV dword ptr [RBP + -0x78],0x0 MOV ECX,dword ptr [RBP + -0x4c] MOV RAX,qword ptr [RBP + -0x40] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x40],RAX LAB_001737b2: MOV RAX,qword ptr [RBP + -0x40] CMP RAX,qword ptr [RBP + -0x48] JNC 0x0017380c MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x90],RAX MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[RBP + -0x90] LEA RDX,[RBP + -0x28] MOV ECX,0x4 CALL 0x00162660 CMP AL,0x0 JZ 0x001737ef JMP 0x001737e6 LAB_001737e6: MOV byte ptr [RBP + -0x1],0x1 JMP 0x001738d9 LAB_001737ef: JMP 0x001737f1 LAB_001737f1: MOV RAX,qword ptr [RBP + -0x38] MOVZX ECX,word ptr [RAX + 0xaa] MOV RAX,qword ptr [RBP + -0x40] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x40],RAX JMP 0x001737b2 LAB_0017380c: MOV RCX,qword ptr [RBP + -0x30] XOR EAX,EAX SUB EAX,dword ptr [RCX + 0x8] CDQE MOV qword ptr [RBP + -0xd8],RAX MOV RAX,qword ptr [RBP + -0xd8] MOV DL,AL MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x50] MOV byte ptr [RAX + RCX*0x1 + 0x3],DL MOV RAX,qword ptr [RBP + -0xd8] SHR RAX,0x8 MOV DL,AL MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x50] MOV byte ptr [RAX + RCX*0x1 + 0x2],DL MOV RAX,qword ptr [RBP + -0xd8] SHR RAX,0x10 MOV DL,AL MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x50] MOV byte ptr [RAX + RCX*0x1 + 0x1],DL MOV RAX,qword ptr [RBP + -0xd8] SHR RAX,0x18 MOV DL,AL MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x50] MOV byte ptr [RAX + RCX*0x1],DL MOV RDI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX] MOV EAX,dword ptr [RBP + -0x50] ADD RSI,RAX ADD RSI,0x4 MOV RDX,qword ptr [RBP + -0x28] CALL 0x00139640 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RAX + 0x118] MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOVZX EAX,byte ptr [RAX + 0xa5] SHL RAX,0x3 ADD RDX,RAX MOV ECX,0x4 CALL 0x00162660 MOV byte ptr [RBP + -0x1],AL LAB_001738d9: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0xe0 POP RBP RET
int1 _ma_ft_convert_to_ft2(long *param_1,long *param_2) { char cVar1; int iVar2; ulong uVar3; ulong extraout_RDX; int1 local_d0 [56]; ulong local_98; long local_90; uint local_88; int4 local_84; int4 local_80; int1 *local_78; int1 local_70 [24]; uint local_58; uint local_54; ulong local_50; void *local_48; long local_40; long *local_38; long local_30; long local_28; long *local_20; long *local_18; int1 local_9; local_28 = *param_1; local_38 = (long *)param_1[100]; local_40 = local_28 + 0x458; local_48 = (void *)*local_38; local_78 = local_70; iVar2 = *(ushort *)(local_28 + 0x4fe) - 2; local_54 = iVar2 / (int)(uint)*(ushort *)(local_28 + 0x502); uVar3 = (long)iVar2 % (long)(int)(uint)*(ushort *)(local_28 + 0x502) & 0xffffffff; if (*(uint *)(local_38 + 1) < local_54) { local_54 = *(uint *)(local_38 + 1); } local_54 = local_54 * *(ushort *)(local_28 + 0x502); local_20 = param_2; local_18 = param_1; if (*(char *)*param_2 == -1) { local_58 = CONCAT11(*(int1 *)(*param_2 + 1),*(int1 *)(*param_2 + 2)) + 3; } else { local_58 = *(byte *)*param_2 + 1; } do { cVar1 = _ma_ck_delete(local_18,local_20,uVar3); uVar3 = extraout_RDX; } while (cVar1 == '\0'); memset((void *)local_18[0x6f],0,(ulong)*(uint *)(local_28 + 0x744)); *(int1 *)(local_18[0x6f] + (ulong)(*(int *)(local_28 + 0x744) - 4)) = *(int1 *)(local_40 + 0xa5); iVar2 = local_54 + *(int *)(local_28 + 0x744); *(char *)(local_18[0x6f] + -1 + (ulong)*(uint *)(local_28 + 0x744)) = (char)iVar2; *(char *)(local_18[0x6f] + -2 + (ulong)*(uint *)(local_28 + 0x744)) = (char)((uint)iVar2 >> 8); memcpy((void *)(local_18[0x6f] + (ulong)*(uint *)(local_28 + 0x744)),local_48,(ulong)local_54); *(int1 *)((long)local_18 + 0x684) = 1; *(int1 *)((long)local_18 + 0x685) = 1; local_30 = _ma_new(local_18,3,&local_78); if (local_30 == -1) { local_9 = 1; } else { _ma_page_setup(local_d0,local_18,local_40,local_30,local_18[0x6f]); cVar1 = _ma_write_keypage(local_d0,*(int4 *)(local_78 + 0xc),3); if (cVar1 == '\0') { local_50 = *local_38 + (ulong)(uint)((int)local_38[1] * *(int *)((long)local_38 + 0x14)); local_90 = local_40; local_88 = (uint)*(ushort *)(local_40 + 0xaa); local_84 = 0; local_80 = 0; for (local_48 = (void *)((long)local_48 + (ulong)local_54); local_48 < local_50; local_48 = (void *)((long)local_48 + (long)(int)(uint)*(ushort *)(local_40 + 0xaa))) { local_98 = (ulong)local_48; cVar1 = _ma_ck_real_write_btree(local_18,&local_98,&local_30,4); if (cVar1 != '\0') { return 1; } } iVar2 = -(int)local_38[1]; *(char *)(*local_20 + 3 + (ulong)local_58) = (char)iVar2; *(char *)(*local_20 + 2 + (ulong)local_58) = (char)((uint)iVar2 >> 8); *(char *)(*local_20 + 1 + (ulong)local_58) = (char)((uint)iVar2 >> 0x10); *(char *)(*local_20 + (ulong)local_58) = (char)((uint)iVar2 >> 0x18); _ma_dpointer(local_28,*local_20 + (ulong)local_58 + 4,local_30); local_9 = _ma_ck_real_write_btree (local_18,local_20, *(long *)(local_28 + 0x118) + (ulong)*(byte *)(local_20[1] + 0xa5) * 8,4) ; } else { local_9 = 1; } } return local_9; }
19,291
my_strdup
eloqsql/mysys/my_malloc.c
char *my_strdup(PSI_memory_key key, const char *from, myf my_flags) { char *ptr; size_t length= strlen(from)+1; DBUG_ENTER("my_strdup"); if ((ptr= (char*) my_malloc(key, length, my_flags))) memcpy(ptr, from, length); DBUG_RETURN(ptr); }
O0
c
my_strdup: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x10(%rbp), %rdi callq 0x2a330 addq $0x1, %rax movq %rax, -0x28(%rbp) movl -0x4(%rbp), %edi movq -0x28(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0xfc090 movq %rax, -0x20(%rbp) cmpq $0x0, %rax je 0xfc55f movq -0x20(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x28(%rbp), %rdx callq 0x2a0b0 jmp 0xfc561 movq -0x20(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_strdup: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rdi, [rbp+var_10] call _strlen add rax, 1 mov [rbp+var_28], rax mov edi, [rbp+var_4] mov rsi, [rbp+var_28] mov rdx, [rbp+var_18] call my_malloc mov [rbp+var_20], rax cmp rax, 0 jz short loc_FC55F mov rdi, [rbp+var_20] mov rsi, [rbp+var_10] mov rdx, [rbp+var_28] call _memcpy loc_FC55F: jmp short $+2 loc_FC561: mov rax, [rbp+var_20] mov [rbp+var_30], rax mov rax, [rbp+var_30] add rsp, 30h pop rbp retn
long long my_strdup(unsigned int a1, long long a2, int a3) { const char *v4; // [rsp+8h] [rbp-28h] long long v5; // [rsp+10h] [rbp-20h] v4 = (const char *)(strlen(a2) + 1); v5 = my_malloc(a1, v4, a3); if ( v5 ) memcpy(v5, a2, v4); return v5; }
my_strdup: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0012a330 ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX MOV EDI,dword ptr [RBP + -0x4] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x18] CALL 0x001fc090 MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JZ 0x001fc55f MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x28] CALL 0x0012a0b0 LAB_001fc55f: JMP 0x001fc561 LAB_001fc561: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RSP,0x30 POP RBP RET
void * my_strdup(int4 param_1,char *param_2,int8 param_3) { size_t sVar1; void *__dest; sVar1 = strlen(param_2); __dest = (void *)my_malloc(param_1,sVar1 + 1,param_3); if (__dest != (void *)0x0) { memcpy(__dest,param_2,sVar1 + 1); } return __dest; }
19,292
SeekMusicStream
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raudio.c
void SeekMusicStream(Music music, float position) { // Seeking is not supported in module formats if ((music.ctxType == MUSIC_MODULE_XM) || (music.ctxType == MUSIC_MODULE_MOD)) return; unsigned int positionInFrames = (unsigned int)(position*music.stream.sampleRate); switch (music.ctxType) { #if defined(SUPPORT_FILEFORMAT_WAV) case MUSIC_AUDIO_WAV: drwav_seek_to_pcm_frame((drwav *)music.ctxData, positionInFrames); break; #endif #if defined(SUPPORT_FILEFORMAT_OGG) case MUSIC_AUDIO_OGG: stb_vorbis_seek_frame((stb_vorbis *)music.ctxData, positionInFrames); break; #endif #if defined(SUPPORT_FILEFORMAT_MP3) case MUSIC_AUDIO_MP3: drmp3_seek_to_pcm_frame((drmp3 *)music.ctxData, positionInFrames); break; #endif #if defined(SUPPORT_FILEFORMAT_QOA) case MUSIC_AUDIO_QOA: { int qoaFrame = positionInFrames/QOA_FRAME_LEN; qoaplay_seek_frame((qoaplay_desc *)music.ctxData, qoaFrame); // Seeks to QOA frame, not PCM frame // We need to compute QOA frame number and update positionInFrames positionInFrames = ((qoaplay_desc *)music.ctxData)->sample_position; } break; #endif #if defined(SUPPORT_FILEFORMAT_FLAC) case MUSIC_AUDIO_FLAC: drflac_seek_to_pcm_frame((drflac *)music.ctxData, positionInFrames); break; #endif default: break; } ma_mutex_lock(&AUDIO.System.lock); music.stream.buffer->framesProcessed = positionInFrames; ma_mutex_unlock(&AUDIO.System.lock); }
O0
c
SeekMusicStream: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp leaq 0x10(%rbp), %rax movq %rax, -0x18(%rbp) movss %xmm0, -0x4(%rbp) cmpl $0x6, 0x28(%rax) je 0x7d175 movq -0x18(%rbp), %rax cmpl $0x7, 0x28(%rax) jne 0x7d17a jmp 0x7d265 movq -0x18(%rbp), %rax movss -0x4(%rbp), %xmm0 movl 0x10(%rax), %ecx cvtsi2ss %rcx, %xmm1 mulss %xmm1, %xmm0 cvttss2si %xmm0, %rcx movl %ecx, -0x8(%rbp) movl 0x28(%rax), %eax decl %eax movl %eax, %ecx movq %rcx, -0x20(%rbp) subl $0x4, %eax ja 0x7d22d movq -0x20(%rbp), %rax leaq 0x127cde(%rip), %rcx # 0x1a4e94 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x18(%rbp), %rax movq 0x30(%rax), %rdi movl -0x8(%rbp), %eax movl %eax, %esi callq 0x5f0c0 jmp 0x7d22f movq -0x18(%rbp), %rax movq 0x30(%rax), %rdi movl -0x8(%rbp), %esi callq 0x69640 jmp 0x7d22f movq -0x18(%rbp), %rax movq 0x30(%rax), %rdi movl -0x8(%rbp), %eax movl %eax, %esi callq 0x6e6e0 jmp 0x7d22f movl -0x8(%rbp), %eax movl $0x1400, %ecx # imm = 0x1400 xorl %edx, %edx divl %ecx movl %eax, %ecx movq -0x18(%rbp), %rax movl %ecx, -0xc(%rbp) movq 0x30(%rax), %rdi movl -0xc(%rbp), %esi callq 0x715a0 movq -0x18(%rbp), %rax movq 0x30(%rax), %rax movl 0x12c(%rax), %eax movl %eax, -0x8(%rbp) jmp 0x7d22f jmp 0x7d22f leaq 0x1996fa(%rip), %rdi # 0x216930 addq $0x12b8, %rdi # imm = 0x12B8 callq 0x1d970 movq -0x18(%rbp), %rax movl -0x8(%rbp), %ecx movq (%rax), %rax movl %ecx, 0x168(%rax) leaq 0x1996d7(%rip), %rdi # 0x216930 addq $0x12b8, %rdi # imm = 0x12B8 callq 0x1d9e0 addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
SeekMusicStream: push rbp mov rbp, rsp sub rsp, 20h lea rax, [rbp+arg_0] mov [rbp+var_18], rax movss [rbp+var_4], xmm0 cmp dword ptr [rax+28h], 6 jz short loc_7D175 mov rax, [rbp+var_18] cmp dword ptr [rax+28h], 7 jnz short loc_7D17A loc_7D175: jmp loc_7D265 loc_7D17A: mov rax, [rbp+var_18] movss xmm0, [rbp+var_4] mov ecx, [rax+10h] cvtsi2ss xmm1, rcx mulss xmm0, xmm1 cvttss2si rcx, xmm0 mov [rbp+var_8], ecx mov eax, [rax+28h] dec eax; switch 5 cases mov ecx, eax mov [rbp+var_20], rcx sub eax, 4 ja def_7D1BD; jumptable 000000000007D1BD default case, case 3 mov rax, [rbp+var_20] lea rcx, jpt_7D1BD movsxd rax, ds:(jpt_7D1BD - 1A4E94h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_7D1BF: mov rax, [rbp+var_18]; jumptable 000000000007D1BD case 1 mov rdi, [rax+30h] mov eax, [rbp+var_8] mov esi, eax call drwav_seek_to_pcm_frame jmp short loc_7D22F loc_7D1D3: mov rax, [rbp+var_18]; jumptable 000000000007D1BD case 2 mov rdi, [rax+30h] mov esi, [rbp+var_8] call stb_vorbis_seek_frame jmp short loc_7D22F loc_7D1E5: mov rax, [rbp+var_18]; jumptable 000000000007D1BD case 4 mov rdi, [rax+30h] mov eax, [rbp+var_8] mov esi, eax call drmp3_seek_to_pcm_frame jmp short loc_7D22F loc_7D1F9: mov eax, [rbp+var_8]; jumptable 000000000007D1BD case 5 mov ecx, 1400h xor edx, edx div ecx mov ecx, eax mov rax, [rbp+var_18] mov [rbp+var_C], ecx mov rdi, [rax+30h] mov esi, [rbp+var_C] call qoaplay_seek_frame mov rax, [rbp+var_18] mov rax, [rax+30h] mov eax, [rax+12Ch] mov [rbp+var_8], eax jmp short loc_7D22F def_7D1BD: jmp short $+2; jumptable 000000000007D1BD default case, case 3 loc_7D22F: lea rdi, AUDIO add rdi, 12B8h call ma_mutex_lock mov rax, [rbp+var_18] mov ecx, [rbp+var_8] mov rax, [rax] mov [rax+168h], ecx lea rdi, AUDIO add rdi, 12B8h call ma_mutex_unlock loc_7D265: add rsp, 20h pop rbp retn
long long * SeekMusicStream( float a1, long long a2, long long a3, long long a4, long long a5, long long a6, long long a7, long long a8, long long a9, int a10, long long a11, long long a12, int a13, unsigned __int16 *a14) { long long *result; // rax unsigned int v15; // [rsp+18h] [rbp-8h] result = &a8; if ( a13 != 6 ) { result = &a8; if ( a13 != 7 ) { v15 = (int)(float)(a1 * (float)a10); switch ( a13 ) { case 1: drwav_seek_to_pcm_frame(a14, v15); break; case 2: stb_vorbis_seek_frame(a14, v15); break; case 4: drmp3_seek_to_pcm_frame((long long)a14, v15); break; case 5: qoaplay_seek_frame((long long)a14, v15 / 0x1400); v15 = *((_DWORD *)a14 + 75); break; default: break; } ma_mutex_lock((long long)&AUDIO + 4792); *(_DWORD *)(a8 + 360) = v15; return (long long *)ma_mutex_unlock((long long)&AUDIO + 4792); } } return result; }
SeekMusicStream: PUSH RBP MOV RBP,RSP SUB RSP,0x20 LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0x18],RAX MOVSS dword ptr [RBP + -0x4],XMM0 CMP dword ptr [RAX + 0x28],0x6 JZ 0x0017d175 MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x28],0x7 JNZ 0x0017d17a LAB_0017d175: JMP 0x0017d265 LAB_0017d17a: MOV RAX,qword ptr [RBP + -0x18] MOVSS XMM0,dword ptr [RBP + -0x4] MOV ECX,dword ptr [RAX + 0x10] CVTSI2SS XMM1,RCX MULSS XMM0,XMM1 CVTTSS2SI RCX,XMM0 MOV dword ptr [RBP + -0x8],ECX MOV EAX,dword ptr [RAX + 0x28] DEC EAX MOV ECX,EAX MOV qword ptr [RBP + -0x20],RCX SUB EAX,0x4 JA 0x0017d22d MOV RAX,qword ptr [RBP + -0x20] LEA RCX,[0x2a4e94] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x30] MOV EAX,dword ptr [RBP + -0x8] MOV ESI,EAX CALL 0x0015f0c0 JMP 0x0017d22f caseD_2: MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x30] MOV ESI,dword ptr [RBP + -0x8] CALL 0x00169640 JMP 0x0017d22f caseD_4: MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x30] MOV EAX,dword ptr [RBP + -0x8] MOV ESI,EAX CALL 0x0016e6e0 JMP 0x0017d22f caseD_5: MOV EAX,dword ptr [RBP + -0x8] MOV ECX,0x1400 XOR EDX,EDX DIV ECX MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RBP + -0xc],ECX MOV RDI,qword ptr [RAX + 0x30] MOV ESI,dword ptr [RBP + -0xc] CALL 0x001715a0 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x30] MOV EAX,dword ptr [RAX + 0x12c] MOV dword ptr [RBP + -0x8],EAX JMP 0x0017d22f caseD_3: JMP 0x0017d22f LAB_0017d22f: LEA RDI,[0x316930] ADD RDI,0x12b8 CALL 0x0011d970 MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV dword ptr [RAX + 0x168],ECX LEA RDI,[0x316930] ADD RDI,0x12b8 CALL 0x0011d9e0 LAB_0017d265: ADD RSP,0x20 POP RBP RET
/* WARNING: Restarted to delay deadcode elimination for space: stack */ void SeekMusicStream(float param_1) { ulong uVar1; long in_stack_00000008; uint in_stack_00000018; int in_stack_00000030; long in_stack_00000038; int4 local_10; if ((in_stack_00000030 != 6) && (in_stack_00000030 != 7)) { uVar1 = (ulong)(param_1 * (float)in_stack_00000018); local_10 = (int4)uVar1; switch(in_stack_00000030) { case 1: drwav_seek_to_pcm_frame(in_stack_00000038,uVar1 & 0xffffffff); break; case 2: stb_vorbis_seek_frame(in_stack_00000038,uVar1 & 0xffffffff); break; default: break; case 4: drmp3_seek_to_pcm_frame(in_stack_00000038,uVar1 & 0xffffffff); break; case 5: qoaplay_seek_frame(in_stack_00000038,(uVar1 & 0xffffffff) / 0x1400, (uVar1 & 0xffffffff) % 0x1400); local_10 = *(int4 *)(in_stack_00000038 + 300); } ma_mutex_lock(0x317be8); *(int4 *)(in_stack_00000008 + 0x168) = local_10; ma_mutex_unlock(0x317be8); } return; }
19,293
SeekMusicStream
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raudio.c
void SeekMusicStream(Music music, float position) { // Seeking is not supported in module formats if ((music.ctxType == MUSIC_MODULE_XM) || (music.ctxType == MUSIC_MODULE_MOD)) return; unsigned int positionInFrames = (unsigned int)(position*music.stream.sampleRate); switch (music.ctxType) { #if defined(SUPPORT_FILEFORMAT_WAV) case MUSIC_AUDIO_WAV: drwav_seek_to_pcm_frame((drwav *)music.ctxData, positionInFrames); break; #endif #if defined(SUPPORT_FILEFORMAT_OGG) case MUSIC_AUDIO_OGG: stb_vorbis_seek_frame((stb_vorbis *)music.ctxData, positionInFrames); break; #endif #if defined(SUPPORT_FILEFORMAT_MP3) case MUSIC_AUDIO_MP3: drmp3_seek_to_pcm_frame((drmp3 *)music.ctxData, positionInFrames); break; #endif #if defined(SUPPORT_FILEFORMAT_QOA) case MUSIC_AUDIO_QOA: { int qoaFrame = positionInFrames/QOA_FRAME_LEN; qoaplay_seek_frame((qoaplay_desc *)music.ctxData, qoaFrame); // Seeks to QOA frame, not PCM frame // We need to compute QOA frame number and update positionInFrames positionInFrames = ((qoaplay_desc *)music.ctxData)->sample_position; } break; #endif #if defined(SUPPORT_FILEFORMAT_FLAC) case MUSIC_AUDIO_FLAC: drflac_seek_to_pcm_frame((drflac *)music.ctxData, positionInFrames); break; #endif default: break; } ma_mutex_lock(&AUDIO.System.lock); music.stream.buffer->framesProcessed = positionInFrames; ma_mutex_unlock(&AUDIO.System.lock); }
O1
c
SeekMusicStream: pushq %r15 pushq %r14 pushq %rbx movl 0x48(%rsp), %eax movl %eax, %ecx andl $-0x2, %ecx cmpl $0x6, %ecx jne 0x451cb popq %rbx popq %r14 popq %r15 retq leaq 0x20(%rsp), %r15 movl 0x10(%r15), %ecx cvtsi2ss %rcx, %xmm1 mulss %xmm0, %xmm1 cvttss2si %xmm1, %rbx decl %eax cmpl $0x4, %eax ja 0x45241 leaq 0x90808(%rip), %rcx # 0xd59f8 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x30(%r15), %rdi movl %ebx, %esi callq 0x2fcd1 jmp 0x45241 movq 0x30(%r15), %rdi movl %ebx, %esi callq 0x3c3a9 jmp 0x45241 movq 0x30(%r15), %rdi movl %ebx, %esi callq 0x36b7b jmp 0x45241 movl %ebx, %eax movl $0xcccccccd, %esi # imm = 0xCCCCCCCD imulq %rax, %rsi shrq $0x2c, %rsi movq 0x30(%r15), %rbx movq %rbx, %rdi callq 0x3e670 movl 0x12c(%rbx), %ebx leaq 0xf98d0(%rip), %r14 # 0x13eb18 movq %r14, %rdi callq 0x97d0 movq (%r15), %rax movl %ebx, 0x168(%rax) movq %r14, %rdi popq %rbx popq %r14 popq %r15 jmp 0x93c0
SeekMusicStream: push r15 push r14 push rbx mov eax, [rsp+18h+arg_28] mov ecx, eax and ecx, 0FFFFFFFEh cmp ecx, 6 jnz short loc_451CB pop rbx pop r14 pop r15 retn loc_451CB: lea r15, [rsp+18h+arg_0] mov ecx, [r15+10h] cvtsi2ss xmm1, rcx mulss xmm1, xmm0 cvttss2si rbx, xmm1 dec eax; switch 5 cases cmp eax, 4 ja short def_451F7; jumptable 00000000000451F7 default case, case 3 lea rcx, jpt_451F7 movsxd rax, ds:(jpt_451F7 - 0D59F8h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_451F9: mov rdi, [r15+30h]; jumptable 00000000000451F7 case 1 mov esi, ebx call drwav_seek_to_pcm_frame jmp short def_451F7; jumptable 00000000000451F7 default case, case 3 loc_45206: mov rdi, [r15+30h]; jumptable 00000000000451F7 case 4 mov esi, ebx call drmp3_seek_to_pcm_frame jmp short def_451F7; jumptable 00000000000451F7 default case, case 3 loc_45213: mov rdi, [r15+30h]; jumptable 00000000000451F7 case 2 mov esi, ebx call stb_vorbis_seek_frame jmp short def_451F7; jumptable 00000000000451F7 default case, case 3 loc_45220: mov eax, ebx; jumptable 00000000000451F7 case 5 mov esi, 0CCCCCCCDh imul rsi, rax shr rsi, 2Ch mov rbx, [r15+30h] mov rdi, rbx call qoaplay_seek_frame mov ebx, [rbx+12Ch] def_451F7: lea r14, unk_13EB18; jumptable 00000000000451F7 default case, case 3 mov rdi, r14 call _pthread_mutex_lock mov rax, [r15] mov [rax+168h], ebx mov rdi, r14 pop rbx pop r14 pop r15 jmp _pthread_mutex_unlock
long long SeekMusicStream( float a1, long long a2, long long a3, long long a4, long long a5, long long a6, long long a7, long long a8, int a9, int a10, int a11, int a12, unsigned int a13, int *a14) { long long result; // rax unsigned int v15; // ebx result = a13; if ( (a13 & 0xFFFFFFFE) != 6 ) { v15 = (int)(float)((float)a10 * a1); switch ( a13 ) { case 1u: drwav_seek_to_pcm_frame((long long)a14, v15, a4); break; case 2u: stb_vorbis_seek_frame((long long)a14, v15); break; case 4u: drmp3_seek_to_pcm_frame((long long)a14, v15); break; case 5u: qoaplay_seek_frame(a14, v15 / 0x1400); v15 = a14[75]; break; default: break; } pthread_mutex_lock(&unk_13EB18); *(_DWORD *)(a8 + 360) = v15; return pthread_mutex_unlock(&unk_13EB18); } return result; }
SeekMusicStream: PUSH R15 PUSH R14 PUSH RBX MOV EAX,dword ptr [RSP + 0x48] MOV ECX,EAX AND ECX,0xfffffffe CMP ECX,0x6 JNZ 0x001451cb POP RBX POP R14 POP R15 RET LAB_001451cb: LEA R15,[RSP + 0x20] MOV ECX,dword ptr [R15 + 0x10] CVTSI2SS XMM1,RCX MULSS XMM1,XMM0 CVTTSS2SI RBX,XMM1 DEC EAX CMP EAX,0x4 JA 0x00145241 LEA RCX,[0x1d59f8] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: MOV RDI,qword ptr [R15 + 0x30] MOV ESI,EBX CALL 0x0012fcd1 JMP 0x00145241 caseD_4: MOV RDI,qword ptr [R15 + 0x30] MOV ESI,EBX CALL 0x0013c3a9 JMP 0x00145241 caseD_2: MOV RDI,qword ptr [R15 + 0x30] MOV ESI,EBX CALL 0x00136b7b JMP 0x00145241 caseD_5: MOV EAX,EBX MOV ESI,0xcccccccd IMUL RSI,RAX SHR RSI,0x2c MOV RBX,qword ptr [R15 + 0x30] MOV RDI,RBX CALL 0x0013e670 MOV EBX,dword ptr [RBX + 0x12c] caseD_3: LEA R14,[0x23eb18] MOV RDI,R14 CALL 0x001097d0 MOV RAX,qword ptr [R15] MOV dword ptr [RAX + 0x168],EBX MOV RDI,R14 POP RBX POP R14 POP R15 JMP 0x001093c0
void SeekMusicStream(float param_1) { int4 uVar1; long in_stack_00000008; uint in_stack_00000018; uint in_stack_00000030; long in_stack_00000038; ulong uVar2; if ((in_stack_00000030 & 0xfffffffe) == 6) { return; } uVar2 = (ulong)((float)in_stack_00000018 * param_1); uVar1 = (int4)uVar2; switch(in_stack_00000030) { case 1: drwav_seek_to_pcm_frame(in_stack_00000038,uVar2 & 0xffffffff); break; case 2: stb_vorbis_seek_frame(in_stack_00000038,uVar2 & 0xffffffff); break; case 4: drmp3_seek_to_pcm_frame(in_stack_00000038,uVar2 & 0xffffffff); break; case 5: qoaplay_seek_frame(in_stack_00000038,(uVar2 & 0xffffffff) / 0x1400); uVar1 = *(int4 *)(in_stack_00000038 + 300); } pthread_mutex_lock((pthread_mutex_t *)(AUDIO + 0x12b8)); *(int4 *)(in_stack_00000008 + 0x168) = uVar1; pthread_mutex_unlock((pthread_mutex_t *)(AUDIO + 0x12b8)); return; }
19,294
SeekMusicStream
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raudio.c
void SeekMusicStream(Music music, float position) { // Seeking is not supported in module formats if ((music.ctxType == MUSIC_MODULE_XM) || (music.ctxType == MUSIC_MODULE_MOD)) return; unsigned int positionInFrames = (unsigned int)(position*music.stream.sampleRate); switch (music.ctxType) { #if defined(SUPPORT_FILEFORMAT_WAV) case MUSIC_AUDIO_WAV: drwav_seek_to_pcm_frame((drwav *)music.ctxData, positionInFrames); break; #endif #if defined(SUPPORT_FILEFORMAT_OGG) case MUSIC_AUDIO_OGG: stb_vorbis_seek_frame((stb_vorbis *)music.ctxData, positionInFrames); break; #endif #if defined(SUPPORT_FILEFORMAT_MP3) case MUSIC_AUDIO_MP3: drmp3_seek_to_pcm_frame((drmp3 *)music.ctxData, positionInFrames); break; #endif #if defined(SUPPORT_FILEFORMAT_QOA) case MUSIC_AUDIO_QOA: { int qoaFrame = positionInFrames/QOA_FRAME_LEN; qoaplay_seek_frame((qoaplay_desc *)music.ctxData, qoaFrame); // Seeks to QOA frame, not PCM frame // We need to compute QOA frame number and update positionInFrames positionInFrames = ((qoaplay_desc *)music.ctxData)->sample_position; } break; #endif #if defined(SUPPORT_FILEFORMAT_FLAC) case MUSIC_AUDIO_FLAC: drflac_seek_to_pcm_frame((drflac *)music.ctxData, positionInFrames); break; #endif default: break; } ma_mutex_lock(&AUDIO.System.lock); music.stream.buffer->framesProcessed = positionInFrames; ma_mutex_unlock(&AUDIO.System.lock); }
O3
c
SeekMusicStream: pushq %r15 pushq %r14 pushq %rbx movl 0x48(%rsp), %eax movl %eax, %ecx andl $-0x2, %ecx cmpl $0x6, %ecx jne 0x44a41 popq %rbx popq %r14 popq %r15 retq leaq 0x20(%rsp), %r15 movl 0x10(%r15), %ecx cvtsi2ss %rcx, %xmm1 mulss %xmm0, %xmm1 cvttss2si %xmm1, %rbx decl %eax cmpl $0x4, %eax ja 0x44ab7 leaq 0x8b1da(%rip), %rcx # 0xcfc40 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x30(%r15), %rdi movl %ebx, %esi callq 0x2f654 jmp 0x44ab7 movq 0x30(%r15), %rdi movl %ebx, %esi callq 0x3bc39 jmp 0x44ab7 movq 0x30(%r15), %rdi movl %ebx, %esi callq 0x36175 jmp 0x44ab7 movl %ebx, %eax movl $0xcccccccd, %esi # imm = 0xCCCCCCCD imulq %rax, %rsi shrq $0x2c, %rsi movq 0x30(%r15), %rbx movq %rbx, %rdi callq 0x3de44 movl 0x12c(%rbx), %ebx leaq 0xf406a(%rip), %r14 # 0x138b28 movq %r14, %rdi callq 0xa7d0 movq (%r15), %rax movl %ebx, 0x168(%rax) movq %r14, %rdi popq %rbx popq %r14 popq %r15 jmp 0xa3c0
SeekMusicStream: push r15 push r14 push rbx mov eax, [rsp+18h+arg_28] mov ecx, eax and ecx, 0FFFFFFFEh cmp ecx, 6 jnz short loc_44A41 pop rbx pop r14 pop r15 retn loc_44A41: lea r15, [rsp+18h+arg_0] mov ecx, [r15+10h] cvtsi2ss xmm1, rcx mulss xmm1, xmm0 cvttss2si rbx, xmm1 dec eax; switch 5 cases cmp eax, 4 ja short def_44A6D; jumptable 0000000000044A6D default case, case 3 lea rcx, jpt_44A6D movsxd rax, ds:(jpt_44A6D - 0CFC40h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_44A6F: mov rdi, [r15+30h]; jumptable 0000000000044A6D case 1 mov esi, ebx call drwav_seek_to_pcm_frame jmp short def_44A6D; jumptable 0000000000044A6D default case, case 3 loc_44A7C: mov rdi, [r15+30h]; jumptable 0000000000044A6D case 4 mov esi, ebx call drmp3_seek_to_pcm_frame jmp short def_44A6D; jumptable 0000000000044A6D default case, case 3 loc_44A89: mov rdi, [r15+30h]; jumptable 0000000000044A6D case 2 mov esi, ebx call stb_vorbis_seek_frame jmp short def_44A6D; jumptable 0000000000044A6D default case, case 3 loc_44A96: mov eax, ebx; jumptable 0000000000044A6D case 5 mov esi, 0CCCCCCCDh imul rsi, rax shr rsi, 2Ch mov rbx, [r15+30h] mov rdi, rbx call qoaplay_seek_frame mov ebx, [rbx+12Ch] def_44A6D: lea r14, unk_138B28; jumptable 0000000000044A6D default case, case 3 mov rdi, r14 call _pthread_mutex_lock mov rax, [r15] mov [rax+168h], ebx mov rdi, r14 pop rbx pop r14 pop r15 jmp _pthread_mutex_unlock
long long SeekMusicStream( float a1, long long a2, long long a3, long long a4, long long a5, long long a6, long long a7, long long a8, int a9, int a10, int a11, int a12, unsigned int a13, int *a14) { long long result; // rax unsigned int v15; // ebx result = a13; if ( (a13 & 0xFFFFFFFE) != 6 ) { v15 = (int)(float)((float)a10 * a1); switch ( a13 ) { case 1u: drwav_seek_to_pcm_frame((long long)a14, v15, a4); break; case 2u: stb_vorbis_seek_frame((long long)a14, v15); break; case 4u: drmp3_seek_to_pcm_frame((long long)a14, v15); break; case 5u: qoaplay_seek_frame(a14, v15 / 0x1400); v15 = a14[75]; break; default: break; } pthread_mutex_lock(&unk_138B28); *(_DWORD *)(a8 + 360) = v15; return pthread_mutex_unlock(&unk_138B28); } return result; }
SeekMusicStream: PUSH R15 PUSH R14 PUSH RBX MOV EAX,dword ptr [RSP + 0x48] MOV ECX,EAX AND ECX,0xfffffffe CMP ECX,0x6 JNZ 0x00144a41 POP RBX POP R14 POP R15 RET LAB_00144a41: LEA R15,[RSP + 0x20] MOV ECX,dword ptr [R15 + 0x10] CVTSI2SS XMM1,RCX MULSS XMM1,XMM0 CVTTSS2SI RBX,XMM1 DEC EAX CMP EAX,0x4 JA 0x00144ab7 LEA RCX,[0x1cfc40] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: MOV RDI,qword ptr [R15 + 0x30] MOV ESI,EBX CALL 0x0012f654 JMP 0x00144ab7 caseD_4: MOV RDI,qword ptr [R15 + 0x30] MOV ESI,EBX CALL 0x0013bc39 JMP 0x00144ab7 caseD_2: MOV RDI,qword ptr [R15 + 0x30] MOV ESI,EBX CALL 0x00136175 JMP 0x00144ab7 caseD_5: MOV EAX,EBX MOV ESI,0xcccccccd IMUL RSI,RAX SHR RSI,0x2c MOV RBX,qword ptr [R15 + 0x30] MOV RDI,RBX CALL 0x0013de44 MOV EBX,dword ptr [RBX + 0x12c] caseD_3: LEA R14,[0x238b28] MOV RDI,R14 CALL 0x0010a7d0 MOV RAX,qword ptr [R15] MOV dword ptr [RAX + 0x168],EBX MOV RDI,R14 POP RBX POP R14 POP R15 JMP 0x0010a3c0
void SeekMusicStream(float param_1) { int4 uVar1; long in_stack_00000008; uint in_stack_00000018; uint in_stack_00000030; long in_stack_00000038; ulong uVar2; if ((in_stack_00000030 & 0xfffffffe) == 6) { return; } uVar2 = (ulong)((float)in_stack_00000018 * param_1); uVar1 = (int4)uVar2; switch(in_stack_00000030) { case 1: drwav_seek_to_pcm_frame(in_stack_00000038,uVar2 & 0xffffffff); break; case 2: stb_vorbis_seek_frame(in_stack_00000038,uVar2 & 0xffffffff); break; case 4: drmp3_seek_to_pcm_frame(in_stack_00000038,uVar2 & 0xffffffff); break; case 5: qoaplay_seek_frame(in_stack_00000038,(uVar2 & 0xffffffff) / 0x1400); uVar1 = *(int4 *)(in_stack_00000038 + 300); } pthread_mutex_lock((pthread_mutex_t *)(AUDIO + 0x12b8)); *(int4 *)(in_stack_00000008 + 0x168) = uVar1; pthread_mutex_unlock((pthread_mutex_t *)(AUDIO + 0x12b8)); return; }
19,295
void nglog::internal::MakeCheckOpValueString<char>(std::ostream*, char const&)
ng-log[P]ng-log/src/logging.cc
void MakeCheckOpValueString(std::ostream* os, const char& v) { if (v >= 32 && v <= 126) { (*os) << "'" << v << "'"; } else { (*os) << "char value " << static_cast<short>(v); } }
O3
cpp
void nglog::internal::MakeCheckOpValueString<char>(std::ostream*, char const&): pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rsi, %r14 movq %rdi, %rbx movb (%rsi), %al addb $-0x7f, %al cmpb $-0x5f, %al jae 0x1d901 leaq 0x163ca(%rip), %rsi # 0x33ca9 movl $0xb, %edx movq %rbx, %rdi callq 0x8720 movsbl (%r14), %esi movq %rbx, %rdi addq $0x10, %rsp popq %rbx popq %r14 popq %r15 jmp 0x8580 leaq 0x14482(%rip), %r15 # 0x31d8a movl $0x1, %edx movq %rbx, %rdi movq %r15, %rsi callq 0x8720 movb (%r14), %al leaq 0xf(%rsp), %rsi movb %al, (%rsi) movl $0x1, %edx movq %rbx, %rdi callq 0x8720 movl $0x1, %edx movq %rax, %rdi movq %r15, %rsi callq 0x8720 addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq
_ZN5nglog8internal22MakeCheckOpValueStringIcEEvPSoRKT_: push r15 push r14 push rbx sub rsp, 10h mov r14, rsi mov rbx, rdi mov al, [rsi] add al, 81h cmp al, 0A1h jnb short loc_1D901 lea rsi, aUnsignedCharVa+9; "char value " mov edx, 0Bh mov rdi, rbx call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) movsx esi, byte ptr [r14] mov rdi, rbx add rsp, 10h pop rbx pop r14 pop r15 jmp __ZNSolsEs; std::ostream::operator<<(short) loc_1D901: lea r15, aBuf0A+0Ch; "'" mov edx, 1 mov rdi, rbx mov rsi, r15 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov al, [r14] lea rsi, [rsp+28h+var_19] mov [rsi], al mov edx, 1 mov rdi, rbx call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov edx, 1 mov rdi, rax mov rsi, r15 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) add rsp, 10h pop rbx pop r14 pop r15 retn
long long nglog::internal::MakeCheckOpValueString<char>(long long a1, char *a2) { long long v3; // rax _BYTE v4[25]; // [rsp+Fh] [rbp-19h] BYREF if ( (unsigned __int8)(*a2 - 127) >= 0xA1u ) { std::__ostream_insert<char,std::char_traits<char>>(a1, "'", 1LL); v4[0] = *a2; v3 = std::__ostream_insert<char,std::char_traits<char>>(a1, v4, 1LL); return std::__ostream_insert<char,std::char_traits<char>>(v3, "'", 1LL); } else { std::__ostream_insert<char,std::char_traits<char>>(a1, "char value ", 11LL); return std::ostream::operator<<(a1, (unsigned int)*a2); } }
MakeCheckOpValueString<char>: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV R14,RSI MOV RBX,RDI MOV AL,byte ptr [RSI] ADD AL,0x81 CMP AL,0xa1 JNC 0x0011d901 LEA RSI,[0x133ca9] MOV EDX,0xb MOV RDI,RBX CALL 0x00108720 MOVSX ESI,byte ptr [R14] MOV RDI,RBX ADD RSP,0x10 POP RBX POP R14 POP R15 JMP 0x00108580 LAB_0011d901: LEA R15,[0x131d8a] MOV EDX,0x1 MOV RDI,RBX MOV RSI,R15 CALL 0x00108720 MOV AL,byte ptr [R14] LEA RSI,[RSP + 0xf] MOV byte ptr [RSI],AL MOV EDX,0x1 MOV RDI,RBX CALL 0x00108720 MOV EDX,0x1 MOV RDI,RAX MOV RSI,R15 CALL 0x00108720 ADD RSP,0x10 POP RBX POP R14 POP R15 RET
/* void nglog::internal::MakeCheckOpValueString<char>(std::ostream*, char const&) */ void nglog::internal::MakeCheckOpValueString<char>(ostream *param_1,char *param_2) { ostream *poVar1; char local_19; if ((byte)(*param_2 + 0x81U) < 0xa1) { std::__ostream_insert<char,std::char_traits<char>>(param_1,"char value ",0xb); std::ostream::operator<<(param_1,(short)*param_2); return; } std::__ostream_insert<char,std::char_traits<char>>(param_1,"\'",1); local_19 = *param_2; poVar1 = std::__ostream_insert<char,std::char_traits<char>>(param_1,&local_19,1); std::__ostream_insert<char,std::char_traits<char>>(poVar1,"\'",1); return; }
19,296
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>>::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, unsigned long)
monkey531[P]llama/common/json.hpp
explicit iteration_proxy_value(IteratorType it, std::size_t array_index_ = 0) noexcept(std::is_nothrow_move_constructible<IteratorType>::value && std::is_nothrow_default_constructible<string_type>::value) : anchor(std::move(it)) , array_index(array_index_) {}
O0
cpp
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>>::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, unsigned long): subq $0x38, %rsp movq %rdi, 0x30(%rsp) movq %rsi, 0x28(%rsp) movq %rdx, 0x20(%rsp) movq 0x30(%rsp), %rax movq %rax, (%rsp) movups (%rsi), %xmm0 movups 0x10(%rsi), %xmm1 movups %xmm1, 0x10(%rax) movups %xmm0, (%rax) movq 0x20(%rsp), %rcx movq %rcx, 0x20(%rax) movq $0x0, 0x28(%rax) addq $0x30, %rax movq %rax, 0x8(%rsp) leaq 0x1f(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x5b0f0 movq 0x8(%rsp), %rdi movq 0x10(%rsp), %rdx leaq 0x8d2f6(%rip), %rsi # 0x21334a callq 0x620f0 jmp 0x18605b leaq 0x1f(%rsp), %rdi callq 0x5b570 movq (%rsp), %rdi addq $0x50, %rdi callq 0x5a5f0 addq $0x38, %rsp retq movq %rax, %rdi callq 0x63db0 nop
_ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEEC2ESI_m: sub rsp, 38h mov [rsp+38h+var_8], rdi mov [rsp+38h+var_10], rsi mov [rsp+38h+var_18], rdx mov rax, [rsp+38h+var_8] mov [rsp+38h+var_38], rax movups xmm0, xmmword ptr [rsi] movups xmm1, xmmword ptr [rsi+10h] movups xmmword ptr [rax+10h], xmm1 movups xmmword ptr [rax], xmm0 mov rcx, [rsp+38h+var_18] mov [rax+20h], rcx mov qword ptr [rax+28h], 0 add rax, 30h ; '0' mov [rsp+38h+var_30], rax lea rdi, [rsp+38h+var_19] mov [rsp+38h+var_28], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdi, [rsp+38h+var_30] mov rdx, [rsp+38h+var_28] lea rsi, aMinExp0+0Ah; "0" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_18605B: lea rdi, [rsp+38h+var_19] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rdi, [rsp+38h+var_38] add rdi, 50h ; 'P' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void) add rsp, 38h retn mov rdi, rax call __clang_call_terminate
long long nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>>::iteration_proxy_value( long long a1, _OWORD *a2, long long a3) { __int128 v3; // xmm0 char v5; // [rsp+1Fh] [rbp-19h] BYREF long long v6; // [rsp+20h] [rbp-18h] _OWORD *v7; // [rsp+28h] [rbp-10h] long long v8; // [rsp+30h] [rbp-8h] v8 = a1; v7 = a2; v6 = a3; v3 = *a2; *(_OWORD *)(a1 + 16) = a2[1]; *(_OWORD *)a1 = v3; *(_QWORD *)(a1 + 32) = v6; *(_QWORD *)(a1 + 40) = 0LL; std::allocator<char>::allocator(&v5, a2); std::string::basic_string<std::allocator<char>>(a1 + 48, (long long)"0", (long long)&v5); std::allocator<char>::~allocator(&v5); return std::string::basic_string(a1 + 80); }
19,297
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>>::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, unsigned long)
monkey531[P]llama/common/json.hpp
explicit iteration_proxy_value(IteratorType it, std::size_t array_index_ = 0) noexcept(std::is_nothrow_move_constructible<IteratorType>::value && std::is_nothrow_default_constructible<string_type>::value) : anchor(std::move(it)) , array_index(array_index_) {}
O3
cpp
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>>::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, unsigned long): pushq %rbx movq %rdi, %rbx movups (%rsi), %xmm0 movups 0x10(%rsi), %xmm1 movups %xmm1, 0x10(%rdi) movups %xmm0, (%rdi) movq %rdx, 0x20(%rdi) movq $0x0, 0x28(%rdi) addq $0x30, %rdi leaq 0x40(%rbx), %rax movq %rax, 0x30(%rbx) leaq 0x441d8(%rip), %rsi # 0xf18f7 leaq 0x441d2(%rip), %rdx # 0xf18f8 callq 0x222de leaq 0x60(%rbx), %rax movq %rax, 0x50(%rbx) movq $0x0, 0x58(%rbx) movb $0x0, 0x60(%rbx) popq %rbx retq movq %rax, %rdi callq 0x21fc5
_ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEEC2ESH_m: push rbx mov rbx, rdi movups xmm0, xmmword ptr [rsi] movups xmm1, xmmword ptr [rsi+10h] movups xmmword ptr [rdi+10h], xmm1 movups xmmword ptr [rdi], xmm0 mov [rdi+20h], rdx mov qword ptr [rdi+28h], 0 add rdi, 30h ; '0' lea rax, [rbx+40h] mov [rbx+30h], rax lea rsi, aMinExp0+0Ah; "0" lea rdx, aMinExp0+0Bh; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rax, [rbx+60h] mov [rbx+50h], rax mov qword ptr [rbx+58h], 0 mov byte ptr [rbx+60h], 0 pop rbx retn mov rdi, rax call __clang_call_terminate
long long nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::iteration_proxy_value( long long a1, __int128 *a2, long long a3) { __int128 v3; // xmm0 long long result; // rax v3 = *a2; *(_OWORD *)(a1 + 16) = a2[1]; *(_OWORD *)a1 = v3; *(_QWORD *)(a1 + 32) = a3; *(_QWORD *)(a1 + 40) = 0LL; *(_QWORD *)(a1 + 48) = a1 + 64; std::string::_M_construct<char const*>(a1 + 48, "0", (long long)""); result = a1 + 96; *(_QWORD *)(a1 + 80) = a1 + 96; *(_QWORD *)(a1 + 88) = 0LL; *(_BYTE *)(a1 + 96) = 0; return result; }
iteration_proxy_value: PUSH RBX MOV RBX,RDI MOVUPS XMM0,xmmword ptr [RSI] MOVUPS XMM1,xmmword ptr [RSI + 0x10] MOVUPS xmmword ptr [RDI + 0x10],XMM1 MOVUPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x20],RDX MOV qword ptr [RDI + 0x28],0x0 ADD RDI,0x30 LEA RAX,[RBX + 0x40] MOV qword ptr [RBX + 0x30],RAX LAB_001ad718: LEA RSI,[0x1f18f7] LEA RDX,[0x1f18f8] CALL 0x001222de LEA RAX,[RBX + 0x60] MOV qword ptr [RBX + 0x50],RAX MOV qword ptr [RBX + 0x58],0x0 MOV byte ptr [RBX + 0x60],0x0 POP RBX RET
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > >::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >, unsigned long) */ void __thiscall nlohmann::json_abi_v3_11_3::detail:: iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::iteration_proxy_value (iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *this,int4 *param_2,int8 param_3) { int4 uVar1; int4 uVar2; int4 uVar3; int4 uVar4; int4 uVar5; int4 uVar6; int4 uVar7; uVar1 = *param_2; uVar2 = param_2[1]; uVar3 = param_2[2]; uVar4 = param_2[3]; uVar5 = param_2[5]; uVar6 = param_2[6]; uVar7 = param_2[7]; *(int4 *)(this + 0x10) = param_2[4]; *(int4 *)(this + 0x14) = uVar5; *(int4 *)(this + 0x18) = uVar6; *(int4 *)(this + 0x1c) = uVar7; *(int4 *)this = uVar1; *(int4 *)(this + 4) = uVar2; *(int4 *)(this + 8) = uVar3; *(int4 *)(this + 0xc) = uVar4; *(int8 *)(this + 0x20) = param_3; *(int8 *)(this + 0x28) = 0; *(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> **)(this + 0x30) = this + 0x40; /* try { // try from 001ad718 to 001ad72a has its CatchHandler @ 001ad741 */ std::__cxx11::string::_M_construct<char_const*>(this + 0x30,"0",""); *(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> **)(this + 0x50) = this + 0x60; *(int8 *)(this + 0x58) = 0; this[0x60] = (iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> )0x0; return; }
19,298
release_whole_queue
eloqsql/mysys/mf_keycache.c
static void release_whole_queue(KEYCACHE_WQUEUE *wqueue) { struct st_my_thread_var *last; struct st_my_thread_var *next; struct st_my_thread_var *thread; /* Queue may be empty. */ if (!(last= wqueue->last_thread)) return; next= last->next; /* First (oldest) element */ do { thread=next; DBUG_ASSERT(thread && thread->init == 1); KEYCACHE_DBUG_PRINT("release_whole_queue: signal", ("thread %ld", (ulong) thread->id)); /* Take thread from queue. */ next= thread->next; thread->next= NULL; /* Signal the thread. */ keycache_pthread_cond_signal(&thread->suspend); } while (thread != last); /* Now queue is definitely empty. */ wqueue->last_thread= NULL; }
O3
c
release_whole_queue: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq (%rdi), %r14 testq %r14, %r14 je 0x53d98 movq %rdi, %rbx movq 0x88(%r14), %r12 leaq 0x2dc5fc(%rip), %r15 # 0x330350 movq 0x38(%r12), %rdi movq 0x88(%r12), %r13 movq $0x0, 0x88(%r12) testq %rdi, %rdi jne 0x53d86 leaq 0x8(%r12), %rdi callq 0x28040 cmpq %r14, %r12 movq %r13, %r12 jne 0x53d54 jmp 0x53d91 movq (%r15), %rax callq *0x170(%rax) jmp 0x53d72 movq $0x0, (%rbx) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
release_whole_queue: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, [rdi] test r14, r14 jz short loc_53D98 mov rbx, rdi mov r12, [r14+88h] lea r15, PSI_server loc_53D54: mov rdi, [r12+38h] mov r13, [r12+88h] mov qword ptr [r12+88h], 0 test rdi, rdi jnz short loc_53D86 loc_53D72: lea rdi, [r12+8] call _pthread_cond_signal cmp r12, r14 mov r12, r13 jnz short loc_53D54 jmp short loc_53D91 loc_53D86: mov rax, [r15] call qword ptr [rax+170h] jmp short loc_53D72 loc_53D91: mov qword ptr [rbx], 0 loc_53D98: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long release_whole_queue(long long *a1) { long long v1; // r14 long long v3; // r12 long long v4; // rdi long long v5; // r13 long long result; // rax bool v7; // zf v1 = *a1; if ( *a1 ) { v3 = *(_QWORD *)(v1 + 136); do { v4 = *(_QWORD *)(v3 + 56); v5 = *(_QWORD *)(v3 + 136); *(_QWORD *)(v3 + 136) = 0LL; if ( v4 ) ((void ( *)(long long))PSI_server[46])(v4); result = pthread_cond_signal(v3 + 8); v7 = v3 == v1; v3 = v5; } while ( !v7 ); *a1 = 0LL; } return result; }
release_whole_queue: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,qword ptr [RDI] TEST R14,R14 JZ 0x00153d98 MOV RBX,RDI MOV R12,qword ptr [R14 + 0x88] LEA R15,[0x430350] LAB_00153d54: MOV RDI,qword ptr [R12 + 0x38] MOV R13,qword ptr [R12 + 0x88] MOV qword ptr [R12 + 0x88],0x0 TEST RDI,RDI JNZ 0x00153d86 LAB_00153d72: LEA RDI,[R12 + 0x8] CALL 0x00128040 CMP R12,R14 MOV R12,R13 JNZ 0x00153d54 JMP 0x00153d91 LAB_00153d86: MOV RAX,qword ptr [R15] CALL qword ptr [RAX + 0x170] JMP 0x00153d72 LAB_00153d91: MOV qword ptr [RBX],0x0 LAB_00153d98: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void release_whole_queue(long *param_1) { long lVar1; long lVar2; long lVar3; bool bVar4; lVar1 = *param_1; if (lVar1 != 0) { lVar3 = *(long *)(lVar1 + 0x88); do { lVar2 = *(long *)(lVar3 + 0x88); *(int8 *)(lVar3 + 0x88) = 0; if (*(long *)(lVar3 + 0x38) != 0) { (**(code **)(PSI_server + 0x170))(); } pthread_cond_signal((pthread_cond_t *)(lVar3 + 8)); bVar4 = lVar3 != lVar1; lVar3 = lVar2; } while (bVar4); *param_1 = 0; } return; }
19,299
my_strntoul_mb2_or_mb4
eloqsql/strings/ctype-ucs2.c
static ulong my_strntoul_mb2_or_mb4(CHARSET_INFO *cs, const char *nptr, size_t l, int base, char **endptr, int *err) { int negative= 0; int overflow; int cnv; my_wc_t wc; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; register unsigned int cutlim; register uint32 cutoff; register uint32 res; register const uchar *s= (const uchar*) nptr; register const uchar *e= (const uchar*) nptr + l; const uchar *save; *err= 0; do { if ((cnv= mb_wc(cs, &wc, s, e)) > 0) { switch (wc) { case ' ' : break; case '\t': break; case '-' : negative= !negative; break; case '+' : break; default : goto bs; } } else /* No more characters or bad multibyte sequence */ { if (endptr !=NULL ) *endptr= (char*)s; err[0]= (cnv == MY_CS_ILSEQ) ? EILSEQ : EDOM; return 0; } s+= cnv; } while (1); bs: overflow= 0; res= 0; save= s; cutoff= ((uint32)~0L) / (uint32) base; cutlim= (uint) (((uint32)~0L) % (uint32) base); do { if ((cnv= mb_wc(cs, &wc, s, e)) > 0) { s+= cnv; if (wc >= '0' && wc <= '9') wc-= '0'; else if (wc >= 'A' && wc <= 'Z') wc= wc - 'A' + 10; else if (wc >= 'a' && wc <= 'z') wc= wc - 'a' + 10; else break; if ((int) wc >= base) break; if (res > cutoff || (res == cutoff && wc > cutlim)) overflow = 1; else { res*= (uint32) base; res+= wc; } } else if (cnv == MY_CS_ILSEQ) { if (endptr != NULL ) *endptr= (char*)s; err[0]= EILSEQ; return 0; } else { /* No more characters */ break; } } while(1); if (endptr != NULL) *endptr= (char *) s; if (s == save) { err[0]= EDOM; return 0L; } if (overflow) { err[0]= (ERANGE); return (~(uint32) 0); } return (negative ? -((long) res) : (long) res); }
O3
c
my_strntoul_mb2_or_mb4: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %r8, -0x40(%rbp) movl %ecx, -0x34(%rbp) movq %rdx, %r13 movq %rsi, %r15 movq %rdi, %r14 movq 0xb8(%rdi), %rax movq 0x28(%rax), %r12 addq %rsi, %r13 movq %r9, -0x50(%rbp) movl $0x0, (%r9) leaq -0x30(%rbp), %rsi movq %r15, %rdx movq %r13, %rcx callq *%r12 testl %eax, %eax jle 0x69a65 movl $0x0, -0x38(%rbp) leaq -0x30(%rbp), %rbx movq -0x30(%rbp), %rcx cmpq $0x2a, %rcx jg 0x69a35 cmpq $0x9, %rcx je 0x69a4d cmpq $0x20, %rcx je 0x69a4d jmp 0x69a97 cmpq $0x2b, %rcx je 0x69a4d cmpq $0x2d, %rcx jne 0x69a97 xorl %ecx, %ecx cmpl $0x0, -0x38(%rbp) sete %cl movl %ecx, -0x38(%rbp) movl %eax, %eax addq %rax, %r15 movq %r14, %rdi movq %rbx, %rsi movq %r15, %rdx movq %r13, %rcx callq *%r12 testl %eax, %eax jg 0x69a1d movq -0x40(%rbp), %rcx testq %rcx, %rcx je 0x69a71 movq %r15, (%rcx) testl %eax, %eax movl $0x54, %eax movl $0x21, %ecx cmovel %eax, %ecx movq -0x50(%rbp), %rax movl %ecx, (%rax) xorl %eax, %eax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0xffffffff, %eax # imm = 0xFFFFFFFF xorl %edx, %edx divl -0x34(%rbp) movl %edx, %ebx movl %eax, -0x44(%rbp) leaq -0x30(%rbp), %rsi movq %r14, %rdi movq %r15, %rdx movq %r13, %rcx callq *%r12 testl %eax, %eax jle 0x69b5b movq %r12, -0x68(%rbp) movl %ebx, %ecx movq %rcx, -0x60(%rbp) xorl %ecx, %ecx movq %r15, %rbx xorl %edi, %edi movq %rbx, %rsi movl %eax, %ebx addq %rsi, %rbx movq -0x30(%rbp), %rsi leaq -0x30(%rsi), %rax cmpq $0x9, %rax ja 0x69aeb movq %rax, -0x30(%rbp) jmp 0x69b10 leaq -0x41(%rsi), %rax cmpq $0x19, %rax ja 0x69afb addq $-0x37, %rsi jmp 0x69b09 leaq -0x61(%rsi), %rax cmpq $0x19, %rax ja 0x69b6c addq $-0x57, %rsi movq %rsi, -0x30(%rbp) movq %rsi, %rax cmpl -0x34(%rbp), %eax jge 0x69b6c movl $0x1, %esi cmpl -0x44(%rbp), %ecx ja 0x69b33 jne 0x69b2b movl -0x44(%rbp), %r12d cmpq -0x60(%rbp), %rax ja 0x69b36 imull -0x34(%rbp), %ecx addl %eax, %ecx movl %edi, %esi movl %ecx, %r12d movl %esi, -0x54(%rbp) movq %r14, %rdi leaq -0x30(%rbp), %rsi movq %rbx, %rdx movq %r13, %rcx callq *-0x68(%rbp) movl -0x54(%rbp), %esi movl %r12d, %ecx movl %esi, %edi testl %eax, %eax jg 0x69acf jmp 0x69b63 xorl %r12d, %r12d movq %r15, %rbx xorl %esi, %esi testl %eax, %eax je 0x69ba4 movl %esi, %edi movl %r12d, %ecx movq -0x40(%rbp), %rax testq %rax, %rax je 0x69b78 movq %rbx, (%rax) cmpq %r15, %rbx je 0x69b95 testl %edi, %edi je 0x69bbf movq -0x50(%rbp), %rax movl $0x22, (%rax) movl $0xffffffff, %eax # imm = 0xFFFFFFFF jmp 0x69a88 movq -0x50(%rbp), %rax movl $0x21, (%rax) jmp 0x69a86 movq -0x40(%rbp), %rax testq %rax, %rax je 0x69bb0 movq %rbx, (%rax) movq -0x50(%rbp), %rax movl $0x54, (%rax) jmp 0x69a86 movl %ecx, %ecx movq %rcx, %rax negq %rax cmpl $0x0, -0x38(%rbp) cmoveq %rcx, %rax jmp 0x69a88
my_strntoul_mb2_or_mb4: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov [rbp+var_40], r8 mov [rbp+var_34], ecx mov r13, rdx mov r15, rsi mov r14, rdi mov rax, [rdi+0B8h] mov r12, [rax+28h] add r13, rsi mov [rbp+var_50], r9 mov dword ptr [r9], 0 lea rsi, [rbp+var_30] mov rdx, r15 mov rcx, r13 call r12 test eax, eax jle short loc_69A65 mov [rbp+var_38], 0 lea rbx, [rbp+var_30] loc_69A1D: mov rcx, [rbp+var_30] cmp rcx, 2Ah ; '*' jg short loc_69A35 cmp rcx, 9 jz short loc_69A4D cmp rcx, 20h ; ' ' jz short loc_69A4D jmp short loc_69A97 loc_69A35: cmp rcx, 2Bh ; '+' jz short loc_69A4D cmp rcx, 2Dh ; '-' jnz short loc_69A97 xor ecx, ecx cmp [rbp+var_38], 0 setz cl mov [rbp+var_38], ecx loc_69A4D: mov eax, eax add r15, rax mov rdi, r14 mov rsi, rbx mov rdx, r15 mov rcx, r13 call r12 test eax, eax jg short loc_69A1D loc_69A65: mov rcx, [rbp+var_40] test rcx, rcx jz short loc_69A71 mov [rcx], r15 loc_69A71: test eax, eax mov eax, 54h ; 'T' mov ecx, 21h ; '!' cmovz ecx, eax mov rax, [rbp+var_50] mov [rax], ecx loc_69A86: xor eax, eax loc_69A88: add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_69A97: mov eax, 0FFFFFFFFh xor edx, edx div [rbp+var_34] mov ebx, edx mov [rbp+var_44], eax lea rsi, [rbp+var_30] mov rdi, r14 mov rdx, r15 mov rcx, r13 call r12 test eax, eax jle loc_69B5B mov [rbp+var_68], r12 mov ecx, ebx mov [rbp+var_60], rcx xor ecx, ecx mov rbx, r15 xor edi, edi loc_69ACF: mov rsi, rbx mov ebx, eax add rbx, rsi mov rsi, [rbp+var_30] lea rax, [rsi-30h] cmp rax, 9 ja short loc_69AEB mov [rbp+var_30], rax jmp short loc_69B10 loc_69AEB: lea rax, [rsi-41h] cmp rax, 19h ja short loc_69AFB add rsi, 0FFFFFFFFFFFFFFC9h jmp short loc_69B09 loc_69AFB: lea rax, [rsi-61h] cmp rax, 19h ja short loc_69B6C add rsi, 0FFFFFFFFFFFFFFA9h loc_69B09: mov [rbp+var_30], rsi mov rax, rsi loc_69B10: cmp eax, [rbp+var_34] jge short loc_69B6C mov esi, 1 cmp ecx, [rbp+var_44] ja short loc_69B33 jnz short loc_69B2B mov r12d, [rbp+var_44] cmp rax, [rbp+var_60] ja short loc_69B36 loc_69B2B: imul ecx, [rbp+var_34] add ecx, eax mov esi, edi loc_69B33: mov r12d, ecx loc_69B36: mov [rbp+var_54], esi mov rdi, r14 lea rsi, [rbp+var_30] mov rdx, rbx mov rcx, r13 call [rbp+var_68] mov esi, [rbp+var_54] mov ecx, r12d mov edi, esi test eax, eax jg loc_69ACF jmp short loc_69B63 loc_69B5B: xor r12d, r12d mov rbx, r15 xor esi, esi loc_69B63: test eax, eax jz short loc_69BA4 mov edi, esi mov ecx, r12d loc_69B6C: mov rax, [rbp+var_40] test rax, rax jz short loc_69B78 mov [rax], rbx loc_69B78: cmp rbx, r15 jz short loc_69B95 test edi, edi jz short loc_69BBF mov rax, [rbp+var_50] mov dword ptr [rax], 22h ; '"' mov eax, 0FFFFFFFFh jmp loc_69A88 loc_69B95: mov rax, [rbp+var_50] mov dword ptr [rax], 21h ; '!' jmp loc_69A86 loc_69BA4: mov rax, [rbp+var_40] test rax, rax jz short loc_69BB0 mov [rax], rbx loc_69BB0: mov rax, [rbp+var_50] mov dword ptr [rax], 54h ; 'T' jmp loc_69A86 loc_69BBF: mov ecx, ecx mov rax, rcx neg rax cmp [rbp+var_38], 0 cmovz rax, rcx jmp loc_69A88
long long my_strntoul_mb2_or_mb4(long long a1, long long a2, long long a3, unsigned int a4, _QWORD *a5, int *a6) { long long v6; // r15 long long ( *v8)(long long, _QWORD *, long long, long long); // r12 long long v9; // r13 int v10; // eax int v11; // ecx long long result; // rax int v13; // eax unsigned int v14; // ecx long long v15; // rbx int v16; // edi unsigned long long v17; // rax long long v18; // rsi int v19; // esi unsigned int v20; // r12d long long ( *v21)(long long, _QWORD *, long long, long long); // [rsp+8h] [rbp-68h] unsigned int v23; // [rsp+2Ch] [rbp-44h] BOOL v25; // [rsp+38h] [rbp-38h] _QWORD v27[6]; // [rsp+40h] [rbp-30h] BYREF v6 = a2; v8 = *(long long ( **)(long long, _QWORD *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL); v9 = a2 + a3; *a6 = 0; v10 = v8(a1, v27, a2, a2 + a3); if ( v10 <= 0 ) { LABEL_11: if ( a5 ) *a5 = v6; v11 = 33; if ( !v10 ) v11 = 84; *a6 = v11; return 0LL; } v25 = 0; while ( 1 ) { if ( v27[0] > 42LL ) { if ( v27[0] != 43LL ) { if ( v27[0] != 45LL ) break; v25 = !v25; } goto LABEL_10; } if ( v27[0] != 9LL && v27[0] != 32LL ) break; LABEL_10: v6 += (unsigned int)v10; v10 = v8(a1, v27, v6, v9); if ( v10 <= 0 ) goto LABEL_11; } v23 = 0xFFFFFFFF / a4; v13 = v8(a1, v27, v6, v9); if ( v13 > 0 ) { v21 = v8; v14 = 0; v15 = v6; v16 = 0; while ( 1 ) { v15 += (unsigned int)v13; v17 = v27[0] - 48LL; if ( (unsigned long long)(v27[0] - 48LL) > 9 ) { if ( (unsigned long long)(v27[0] - 65LL) > 0x19 ) { if ( (unsigned long long)(v27[0] - 97LL) > 0x19 ) goto LABEL_37; v18 = v27[0] - 87LL; } else { v18 = v27[0] - 55LL; } v27[0] = v18; v17 = v18; } else { v27[0] -= 48LL; } if ( (int)v17 >= (int)a4 ) goto LABEL_37; v19 = 1; if ( v14 <= v23 ) { if ( v14 == v23 ) { v20 = 0xFFFFFFFF / a4; if ( v17 > 0xFFFFFFFF % a4 ) goto LABEL_32; } v14 = v17 + a4 * v14; v19 = v16; } v20 = v14; LABEL_32: v13 = v21(a1, v27, v15, v9); v14 = v20; v16 = v19; if ( v13 <= 0 ) goto LABEL_35; } } v20 = 0; v15 = v6; v19 = 0; LABEL_35: if ( !v13 ) { if ( a5 ) *a5 = v15; *a6 = 84; return 0LL; } v16 = v19; v14 = v20; LABEL_37: if ( a5 ) *a5 = v15; if ( v15 == v6 ) { *a6 = 33; return 0LL; } if ( v16 ) { *a6 = 34; return 0xFFFFFFFFLL; } else { result = -(long long)v14; if ( !v25 ) return v14; } return result; }
my_strntoul_mb2_or_mb4: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV qword ptr [RBP + -0x40],R8 MOV dword ptr [RBP + -0x34],ECX MOV R13,RDX MOV R15,RSI MOV R14,RDI MOV RAX,qword ptr [RDI + 0xb8] MOV R12,qword ptr [RAX + 0x28] ADD R13,RSI MOV qword ptr [RBP + -0x50],R9 MOV dword ptr [R9],0x0 LEA RSI,[RBP + -0x30] MOV RDX,R15 MOV RCX,R13 CALL R12 TEST EAX,EAX JLE 0x00169a65 MOV dword ptr [RBP + -0x38],0x0 LEA RBX,[RBP + -0x30] LAB_00169a1d: MOV RCX,qword ptr [RBP + -0x30] CMP RCX,0x2a JG 0x00169a35 CMP RCX,0x9 JZ 0x00169a4d CMP RCX,0x20 JZ 0x00169a4d JMP 0x00169a97 LAB_00169a35: CMP RCX,0x2b JZ 0x00169a4d CMP RCX,0x2d JNZ 0x00169a97 XOR ECX,ECX CMP dword ptr [RBP + -0x38],0x0 SETZ CL MOV dword ptr [RBP + -0x38],ECX LAB_00169a4d: MOV EAX,EAX ADD R15,RAX MOV RDI,R14 MOV RSI,RBX MOV RDX,R15 MOV RCX,R13 CALL R12 TEST EAX,EAX JG 0x00169a1d LAB_00169a65: MOV RCX,qword ptr [RBP + -0x40] TEST RCX,RCX JZ 0x00169a71 MOV qword ptr [RCX],R15 LAB_00169a71: TEST EAX,EAX MOV EAX,0x54 MOV ECX,0x21 CMOVZ ECX,EAX MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],ECX LAB_00169a86: XOR EAX,EAX LAB_00169a88: ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00169a97: MOV EAX,0xffffffff XOR EDX,EDX DIV dword ptr [RBP + -0x34] MOV EBX,EDX MOV dword ptr [RBP + -0x44],EAX LEA RSI,[RBP + -0x30] MOV RDI,R14 MOV RDX,R15 MOV RCX,R13 CALL R12 TEST EAX,EAX JLE 0x00169b5b MOV qword ptr [RBP + -0x68],R12 MOV ECX,EBX MOV qword ptr [RBP + -0x60],RCX XOR ECX,ECX MOV RBX,R15 XOR EDI,EDI LAB_00169acf: MOV RSI,RBX MOV EBX,EAX ADD RBX,RSI MOV RSI,qword ptr [RBP + -0x30] LEA RAX,[RSI + -0x30] CMP RAX,0x9 JA 0x00169aeb MOV qword ptr [RBP + -0x30],RAX JMP 0x00169b10 LAB_00169aeb: LEA RAX,[RSI + -0x41] CMP RAX,0x19 JA 0x00169afb ADD RSI,-0x37 JMP 0x00169b09 LAB_00169afb: LEA RAX,[RSI + -0x61] CMP RAX,0x19 JA 0x00169b6c ADD RSI,-0x57 LAB_00169b09: MOV qword ptr [RBP + -0x30],RSI MOV RAX,RSI LAB_00169b10: CMP EAX,dword ptr [RBP + -0x34] JGE 0x00169b6c MOV ESI,0x1 CMP ECX,dword ptr [RBP + -0x44] JA 0x00169b33 JNZ 0x00169b2b MOV R12D,dword ptr [RBP + -0x44] CMP RAX,qword ptr [RBP + -0x60] JA 0x00169b36 LAB_00169b2b: IMUL ECX,dword ptr [RBP + -0x34] ADD ECX,EAX MOV ESI,EDI LAB_00169b33: MOV R12D,ECX LAB_00169b36: MOV dword ptr [RBP + -0x54],ESI MOV RDI,R14 LEA RSI,[RBP + -0x30] MOV RDX,RBX MOV RCX,R13 CALL qword ptr [RBP + -0x68] MOV ESI,dword ptr [RBP + -0x54] MOV ECX,R12D MOV EDI,ESI TEST EAX,EAX JG 0x00169acf JMP 0x00169b63 LAB_00169b5b: XOR R12D,R12D MOV RBX,R15 XOR ESI,ESI LAB_00169b63: TEST EAX,EAX JZ 0x00169ba4 MOV EDI,ESI MOV ECX,R12D LAB_00169b6c: MOV RAX,qword ptr [RBP + -0x40] TEST RAX,RAX JZ 0x00169b78 MOV qword ptr [RAX],RBX LAB_00169b78: CMP RBX,R15 JZ 0x00169b95 TEST EDI,EDI JZ 0x00169bbf MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],0x22 MOV EAX,0xffffffff JMP 0x00169a88 LAB_00169b95: MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],0x21 JMP 0x00169a86 LAB_00169ba4: MOV RAX,qword ptr [RBP + -0x40] TEST RAX,RAX JZ 0x00169bb0 MOV qword ptr [RAX],RBX LAB_00169bb0: MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],0x54 JMP 0x00169a86 LAB_00169bbf: MOV ECX,ECX MOV RAX,RCX NEG RAX CMP dword ptr [RBP + -0x38],0x0 CMOVZ RAX,RCX JMP 0x00169a88
ulong my_strntoul_mb2_or_mb4 (long param_1,long param_2,long param_3,uint param_4,long *param_5, int4 *param_6) { code *pcVar1; bool bVar2; bool bVar3; bool bVar4; uint uVar5; uint uVar6; int4 uVar7; uint uVar8; long lVar9; ulong uVar10; ulong local_38; pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); param_3 = param_3 + param_2; *param_6 = 0; uVar5 = (*pcVar1)(param_1,&local_38,param_2,param_3); if (0 < (int)uVar5) { bVar2 = false; do { if ((long)local_38 < 0x2b) { if ((local_38 != 9) && (local_38 != 0x20)) { LAB_00169a97: uVar5 = (uint)(0xffffffff / (ulong)param_4); uVar6 = (*pcVar1)(param_1,&local_38,param_2,param_3); lVar9 = param_2; if ((int)uVar6 < 1) { uVar8 = 0; bVar3 = false; goto LAB_00169b63; } uVar8 = 0; bVar3 = false; goto LAB_00169acf; } } else if (local_38 != 0x2b) { if (local_38 != 0x2d) goto LAB_00169a97; bVar2 = !bVar2; } param_2 = param_2 + (ulong)uVar5; uVar5 = (*pcVar1)(param_1,&local_38,param_2,param_3); } while (0 < (int)uVar5); } if (param_5 != (long *)0x0) { *param_5 = param_2; } uVar7 = 0x21; if (uVar5 == 0) { uVar7 = 0x54; } *param_6 = uVar7; return 0; while( true ) { if ((int)param_4 <= (int)uVar10) goto LAB_00169b6c; uVar6 = uVar8; bVar4 = true; if ((uVar8 <= uVar5) && ((uVar8 != uVar5 || (uVar6 = uVar5, uVar10 <= 0xffffffffU % (ulong)param_4)))) { uVar6 = uVar8 * param_4 + (int)uVar10; bVar4 = bVar3; } bVar3 = bVar4; uVar8 = uVar6; local_38 = uVar10; uVar6 = (*pcVar1)(param_1,&local_38,lVar9,param_3); if ((int)uVar6 < 1) break; LAB_00169acf: lVar9 = (ulong)uVar6 + lVar9; uVar10 = local_38 - 0x30; if (9 < uVar10) { if (local_38 - 0x41 < 0x1a) { uVar10 = local_38 - 0x37; } else { if (0x19 < local_38 - 0x61) goto LAB_00169b6c; uVar10 = local_38 - 0x57; } } } LAB_00169b63: if (uVar6 == 0) { if (param_5 != (long *)0x0) { *param_5 = lVar9; } *param_6 = 0x54; } else { LAB_00169b6c: if (param_5 != (long *)0x0) { *param_5 = lVar9; } if (lVar9 != param_2) { if (bVar3) { *param_6 = 0x22; return 0xffffffff; } if (!bVar2) { return (ulong)uVar8; } return -(ulong)uVar8; } *param_6 = 0x21; } return 0; }