index
int64
0
66.5k
func_name
stringlengths
2
5.36k
func_dep
stringlengths
16
2.19k
func
stringlengths
8
55.3k
test
stringlengths
0
7.07k
opt
stringclasses
4 values
language
stringclasses
2 values
asm
stringlengths
0
45.4k
ida_asm
stringlengths
0
44.7k
ida_pseudo
stringlengths
0
44.3k
ghidra_asm
stringlengths
0
49.1k
ghidra_pseudo
stringlengths
0
64.7k
28,700
js_callsite_finalizer
bluesky950520[P]quickjs/quickjs.c
static void js_callsite_finalizer(JSRuntime *rt, JSValue val) { JSCallSiteData *csd = JS_GetOpaque(val, JS_CLASS_CALL_SITE); if (csd) { JS_FreeValueRT(rt, csd->filename); JS_FreeValueRT(rt, csd->func); JS_FreeValueRT(rt, csd->func_name); js_free_rt(rt, csd); } }
O0
c
js_callsite_finalizer: subq $0x28, %rsp movq %rsi, 0x18(%rsp) movq %rdx, 0x20(%rsp) movq %rdi, 0x10(%rsp) movq 0x18(%rsp), %rdi movq 0x20(%rsp), %rsi movl $0x3c, %edx callq 0x38350 movq %rax, 0x8(%rsp) cmpq $0x0, 0x8(%rsp) je 0xe5c37 movq 0x10(%rsp), %rdi movq 0x8(%rsp), %rax movq (%rax), %rsi movq 0x8(%rax), %rdx callq 0x23d10 movq 0x10(%rsp), %rdi movq 0x8(%rsp), %rax movq 0x10(%rax), %rsi movq 0x18(%rax), %rdx callq 0x23d10 movq 0x10(%rsp), %rdi movq 0x8(%rsp), %rax movq 0x20(%rax), %rsi movq 0x28(%rax), %rdx callq 0x23d10 movq 0x10(%rsp), %rdi movq 0x8(%rsp), %rsi callq 0x21960 addq $0x28, %rsp retq nopl (%rax)
js_callsite_finalizer: sub rsp, 28h mov [rsp+28h+var_10], rsi mov [rsp+28h+var_8], rdx mov [rsp+28h+var_18], rdi mov rdi, [rsp+28h+var_10] mov rsi, [rsp+28h+var_8] mov edx, 3Ch ; '<' call JS_GetOpaque mov [rsp+28h+var_20], rax cmp [rsp+28h+var_20], 0 jz short loc_E5C37 mov rdi, [rsp+28h+var_18] mov rax, [rsp+28h+var_20] mov rsi, [rax] mov rdx, [rax+8] call JS_FreeValueRT mov rdi, [rsp+28h+var_18] mov rax, [rsp+28h+var_20] mov rsi, [rax+10h] mov rdx, [rax+18h] call JS_FreeValueRT mov rdi, [rsp+28h+var_18] mov rax, [rsp+28h+var_20] mov rsi, [rax+20h] mov rdx, [rax+28h] call JS_FreeValueRT mov rdi, [rsp+28h+var_18] mov rsi, [rsp+28h+var_20] call js_free_rt loc_E5C37: add rsp, 28h retn
void js_callsite_finalizer(long long a1, long long a2, int a3) { long long Opaque; // [rsp+8h] [rbp-20h] Opaque = JS_GetOpaque(a2, a3, 60); if ( Opaque ) { JS_FreeValueRT(a1, *(_DWORD **)Opaque, *(_QWORD *)(Opaque + 8)); JS_FreeValueRT(a1, *(_DWORD **)(Opaque + 16), *(_QWORD *)(Opaque + 24)); JS_FreeValueRT(a1, *(_DWORD **)(Opaque + 32), *(_QWORD *)(Opaque + 40)); js_free_rt(a1, Opaque); } }
js_callsite_finalizer: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RSI MOV qword ptr [RSP + 0x20],RDX MOV qword ptr [RSP + 0x10],RDI MOV RDI,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RSP + 0x20] MOV EDX,0x3c CALL 0x00138350 MOV qword ptr [RSP + 0x8],RAX CMP qword ptr [RSP + 0x8],0x0 JZ 0x001e5c37 MOV RDI,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] CALL 0x00123d10 MOV RDI,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RAX + 0x18] CALL 0x00123d10 MOV RDI,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RAX + 0x20] MOV RDX,qword ptr [RAX + 0x28] CALL 0x00123d10 MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x8] CALL 0x00121960 LAB_001e5c37: ADD RSP,0x28 RET
void js_callsite_finalizer(int8 param_1,int8 param_2,int8 param_3) { int8 *puVar1; puVar1 = (int8 *)JS_GetOpaque(param_2,param_3,0x3c); if (puVar1 != (int8 *)0x0) { JS_FreeValueRT(param_1,*puVar1,puVar1[1]); JS_FreeValueRT(param_1,puVar1[2],puVar1[3]); JS_FreeValueRT(param_1,puVar1[4],puVar1[5]); js_free_rt(param_1,puVar1); } return; }
28,701
js_callsite_finalizer
bluesky950520[P]quickjs/quickjs.c
static void js_callsite_finalizer(JSRuntime *rt, JSValue val) { JSCallSiteData *csd = JS_GetOpaque(val, JS_CLASS_CALL_SITE); if (csd) { JS_FreeValueRT(rt, csd->filename); JS_FreeValueRT(rt, csd->func); JS_FreeValueRT(rt, csd->func_name); js_free_rt(rt, csd); } }
O2
c
js_callsite_finalizer: pushq %r14 pushq %rbx pushq %rax cmpl $-0x1, %edx jne 0x6f30e cmpw $0x3c, 0x6(%rsi) jne 0x6f30e movq 0x30(%rsi), %r14 testq %r14, %r14 je 0x6f30e movq %rdi, %rbx movq (%r14), %rsi movq 0x8(%r14), %rdx callq 0x18031 movq 0x10(%r14), %rsi movq 0x18(%r14), %rdx movq %rbx, %rdi callq 0x18031 movq 0x20(%r14), %rsi movq 0x28(%r14), %rdx movq %rbx, %rdi callq 0x18031 movq %rbx, %rdi movq %r14, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x170cb addq $0x8, %rsp popq %rbx popq %r14 retq
js_callsite_finalizer: push r14 push rbx push rax cmp edx, 0FFFFFFFFh jnz short loc_6F30E cmp word ptr [rsi+6], 3Ch ; '<' jnz short loc_6F30E mov r14, [rsi+30h] test r14, r14 jz short loc_6F30E mov rbx, rdi mov rsi, [r14] mov rdx, [r14+8] call JS_FreeValueRT mov rsi, [r14+10h] mov rdx, [r14+18h] mov rdi, rbx call JS_FreeValueRT mov rsi, [r14+20h] mov rdx, [r14+28h] mov rdi, rbx call JS_FreeValueRT mov rdi, rbx mov rsi, r14 add rsp, 8 pop rbx pop r14 jmp js_free_rt loc_6F30E: add rsp, 8 pop rbx pop r14 retn
long long js_callsite_finalizer(long long a1, long long a2, int a3) { long long v3; // r14 long long result; // rax if ( a3 == -1 && *(_WORD *)(a2 + 6) == 60 ) { v3 = *(_QWORD *)(a2 + 48); if ( v3 ) { JS_FreeValueRT(a1, *(unsigned int **)v3, *(_QWORD *)(v3 + 8)); JS_FreeValueRT(a1, *(unsigned int **)(v3 + 16), *(_QWORD *)(v3 + 24)); JS_FreeValueRT(a1, *(unsigned int **)(v3 + 32), *(_QWORD *)(v3 + 40)); return js_free_rt(a1, v3); } } return result; }
js_callsite_finalizer: PUSH R14 PUSH RBX PUSH RAX CMP EDX,-0x1 JNZ 0x0016f30e CMP word ptr [RSI + 0x6],0x3c JNZ 0x0016f30e MOV R14,qword ptr [RSI + 0x30] TEST R14,R14 JZ 0x0016f30e MOV RBX,RDI MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] CALL 0x00118031 MOV RSI,qword ptr [R14 + 0x10] MOV RDX,qword ptr [R14 + 0x18] MOV RDI,RBX CALL 0x00118031 MOV RSI,qword ptr [R14 + 0x20] MOV RDX,qword ptr [R14 + 0x28] MOV RDI,RBX CALL 0x00118031 MOV RDI,RBX MOV RSI,R14 ADD RSP,0x8 POP RBX POP R14 JMP 0x001170cb LAB_0016f30e: ADD RSP,0x8 POP RBX POP R14 RET
void js_callsite_finalizer(int8 param_1,long param_2,int param_3) { int8 *puVar1; if (((param_3 == -1) && (*(short *)(param_2 + 6) == 0x3c)) && (puVar1 = *(int8 **)(param_2 + 0x30), puVar1 != (int8 *)0x0)) { JS_FreeValueRT(param_1,*puVar1,puVar1[1]); JS_FreeValueRT(param_1,puVar1[2],puVar1[3]); JS_FreeValueRT(param_1,puVar1[4],puVar1[5]); js_free_rt(param_1,puVar1); return; } return; }
28,702
_cxx_global_var_init
Razamindset[P]pawnstar-chess-engine/src/engine/search.cpp
void Engine::orderMoves(Movelist& moves) { std::vector<std::pair<Move, int>> scoredMoves; scoredMoves.reserve(moves.size()); for (const auto& move : moves) { int score = 0; // worst queen takes pawn // ! If we make n moves on the board for each reacursive call that is // computationally heavy If we skip this step the engine will still look // at all the moves but 50% performace boost with same result. So we donot // need to check for checks and mates here // Prioritize captures using MVV-LVA if (board.isCapture(move)) { score = 0; Piece attacker = board.at(move.from()); Piece victim = board.at(move.to()); score += getPieceValue(victim) - getPieceValue(attacker); } // Prioritize promotions if (move.promotionType() == QUEEN) score += 900; if (move.promotionType() == ROOK) score += 500; if (move.promotionType() == BISHOP) score += 320; if (move.promotionType() == KNIGHT) score += 300; scoredMoves.emplace_back(move, score); } // Todo Need to learn this sorting magic function ask gpt for now // Sort moves by descending score std::sort(scoredMoves.begin(), scoredMoves.end(), [](const auto& a, const auto& b) { return a.second > b.second; }); // Replace original move list with sorted moves moves.clear(); for (const auto& [move, score] : scoredMoves) { moves.add(move); } }
O0
cpp
_cxx_global_var_init: pushq %rbp movq %rsp, %rbp subq $0xf0, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0xd0(%rbp) leaq -0x28(%rbp), %rdi movq %rdi, -0xc8(%rbp) callq 0x1d0d0 movq -0x10(%rbp), %rdi callq 0x1d1f0 movq -0xc8(%rbp), %rdi movslq %eax, %rsi callq 0x1d0f0 jmp 0x1b448 movq -0x10(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rdi callq 0x1a030 movq %rax, -0x48(%rbp) movq -0x40(%rbp), %rdi callq 0x1a050 movq %rax, -0x50(%rbp) movq -0x48(%rbp), %rax cmpq -0x50(%rbp), %rax je 0x1b63b movq -0xd0(%rbp), %rdi movq -0x48(%rbp), %rax movq %rax, -0x58(%rbp) movl $0x0, -0x5c(%rbp) movq -0x58(%rbp), %rax movl (%rax), %eax movl %eax, -0x60(%rbp) movl -0x60(%rbp), %esi callq 0x1d210 movb %al, -0xd1(%rbp) jmp 0x1b4a7 movb -0xd1(%rbp), %al testb $0x1, %al jne 0x1b4b6 jmp 0x1b581 movl $0x0, -0x5c(%rbp) movq -0x58(%rbp), %rdi callq 0x197a0 movq -0xd0(%rbp), %rdi movl %eax, -0x68(%rbp) movl -0x68(%rbp), %esi callq 0xa5b0 movb %al, -0xd2(%rbp) jmp 0x1b4e0 movb -0xd2(%rbp), %al movb %al, -0x61(%rbp) movq -0x58(%rbp), %rdi callq 0x197e0 movq -0xd0(%rbp), %rdi movl %eax, -0x70(%rbp) movl -0x70(%rbp), %esi callq 0xa5b0 movb %al, -0xd3(%rbp) jmp 0x1b50c movq -0xd0(%rbp), %rdi movb -0xd3(%rbp), %al movb %al, -0x69(%rbp) movb -0x69(%rbp), %al movb %al, -0x71(%rbp) movzbl -0x71(%rbp), %esi callq 0xf440 movl %eax, -0xd8(%rbp) jmp 0x1b533 movq -0xd0(%rbp), %rdi movb -0x61(%rbp), %al movb %al, -0x72(%rbp) movzbl -0x72(%rbp), %esi callq 0xf440 movl %eax, -0xdc(%rbp) jmp 0x1b551 movl -0xdc(%rbp), %ecx movl -0xd8(%rbp), %eax subl %ecx, %eax addl -0x5c(%rbp), %eax movl %eax, -0x5c(%rbp) jmp 0x1b581 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x30(%rbp) movl %eax, -0x34(%rbp) leaq -0x28(%rbp), %rdi callq 0x1d440 jmp 0x1b730 movq -0x58(%rbp), %rdi callq 0x1a3b0 movb %al, -0x73(%rbp) leaq -0x73(%rbp), %rdi callq 0xa120 cmpl $0x10, %eax jne 0x1b5a6 movl -0x5c(%rbp), %eax addl $0x384, %eax # imm = 0x384 movl %eax, -0x5c(%rbp) movq -0x58(%rbp), %rdi callq 0x1a3b0 movb %al, -0x74(%rbp) leaq -0x74(%rbp), %rdi callq 0xa120 cmpl $0x8, %eax jne 0x1b5cb movl -0x5c(%rbp), %eax addl $0x1f4, %eax # imm = 0x1F4 movl %eax, -0x5c(%rbp) movq -0x58(%rbp), %rdi callq 0x1a3b0 movb %al, -0x75(%rbp) leaq -0x75(%rbp), %rdi callq 0xa120 cmpl $0x4, %eax jne 0x1b5f0 movl -0x5c(%rbp), %eax addl $0x140, %eax # imm = 0x140 movl %eax, -0x5c(%rbp) movq -0x58(%rbp), %rdi callq 0x1a3b0 movb %al, -0x76(%rbp) leaq -0x76(%rbp), %rdi callq 0xa120 cmpl $0x2, %eax jne 0x1b615 movl -0x5c(%rbp), %eax addl $0x12c, %eax # imm = 0x12C movl %eax, -0x5c(%rbp) movq -0x58(%rbp), %rsi leaq -0x28(%rbp), %rdi leaq -0x5c(%rbp), %rdx callq 0x1d2a0 jmp 0x1b628 jmp 0x1b62a movq -0x48(%rbp), %rax addq $0x4, %rax movq %rax, -0x48(%rbp) jmp 0x1b46a leaq -0x28(%rbp), %rdi movq %rdi, -0xe8(%rbp) callq 0x1d320 movq -0xe8(%rbp), %rdi movq %rax, -0x80(%rbp) callq 0x1d350 movq %rax, -0x88(%rbp) movq -0x80(%rbp), %rdi movq -0x88(%rbp), %rsi callq 0x1b740 jmp 0x1b674 movq -0x10(%rbp), %rdi callq 0x13150 leaq -0x28(%rbp), %rax movq %rax, -0x98(%rbp) movq -0x98(%rbp), %rdi callq 0x1d320 movq %rax, -0xa0(%rbp) movq -0x98(%rbp), %rdi callq 0x1d350 movq %rax, -0xa8(%rbp) leaq -0xa0(%rbp), %rdi leaq -0xa8(%rbp), %rsi callq 0x1d380 testb $0x1, %al jne 0x1b6c7 jmp 0x1b71e leaq -0xa0(%rbp), %rdi callq 0x1d3c0 movq %rax, -0xb0(%rbp) movq -0xb0(%rbp), %rdi callq 0x1d3e0 movq %rax, -0xb8(%rbp) movq -0xb0(%rbp), %rdi callq 0x1d400 movq %rax, -0xc0(%rbp) movq -0x10(%rbp), %rdi movq -0xb8(%rbp), %rsi callq 0x166d0 leaq -0xa0(%rbp), %rdi callq 0x1d420 jmp 0x1b6ae leaq -0x28(%rbp), %rdi callq 0x1d440 addq $0xf0, %rsp popq %rbp retq movq -0x30(%rbp), %rdi callq 0x34d0 nopl (%rax)
_ZN6Engine10orderMovesERN5chess8MovelistE: push rbp mov rbp, rsp sub rsp, 0F0h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_D0], rax lea rdi, [rbp+var_28] mov [rbp+var_C8], rdi call _ZNSt6vectorISt4pairIN5chess4MoveEiESaIS3_EEC2Ev; std::vector<std::pair<chess::Move,int>>::vector(void) mov rdi, [rbp+var_10]; this call _ZNK5chess8Movelist4sizeEv; chess::Movelist::size(void) mov rdi, [rbp+var_C8] movsxd rsi, eax call _ZNSt6vectorISt4pairIN5chess4MoveEiESaIS3_EE7reserveEm; std::vector<std::pair<chess::Move,int>>::reserve(ulong) jmp short $+2 loc_1B448: mov rax, [rbp+var_10] mov [rbp+var_40], rax mov rdi, [rbp+var_40]; this call _ZN5chess8Movelist5beginEv; chess::Movelist::begin(void) mov [rbp+var_48], rax mov rdi, [rbp+var_40]; this call _ZN5chess8Movelist3endEv; chess::Movelist::end(void) mov [rbp+var_50], rax loc_1B46A: mov rax, [rbp+var_48] cmp rax, [rbp+var_50] jz loc_1B63B mov rdi, [rbp+var_D0] mov rax, [rbp+var_48] mov [rbp+var_58], rax mov [rbp+var_5C], 0 mov rax, [rbp+var_58] mov eax, [rax] mov [rbp+var_60], eax mov esi, [rbp+var_60] call _ZNK5chess5Board9isCaptureENS_4MoveE; chess::Board::isCapture(chess::Move) mov [rbp+var_D1], al jmp short $+2 loc_1B4A7: mov al, [rbp+var_D1] test al, 1 jnz short loc_1B4B6 jmp loc_1B581 loc_1B4B6: mov [rbp+var_5C], 0 mov rdi, [rbp+var_58]; this call _ZNK5chess4Move4fromEv; chess::Move::from(void) mov rdi, [rbp+var_D0] mov [rbp+var_68], eax mov esi, [rbp+var_68] call _ZNK5chess5Board2atINS_5PieceEEET_NS_6SquareE; chess::Board::at<chess::Piece>(chess::Square) mov [rbp+var_D2], al jmp short $+2 loc_1B4E0: mov al, [rbp+var_D2] mov [rbp+var_61], al mov rdi, [rbp+var_58]; this call _ZNK5chess4Move2toEv; chess::Move::to(void) mov rdi, [rbp+var_D0] mov [rbp+var_70], eax mov esi, [rbp+var_70] call _ZNK5chess5Board2atINS_5PieceEEET_NS_6SquareE; chess::Board::at<chess::Piece>(chess::Square) mov [rbp+var_D3], al jmp short $+2 loc_1B50C: mov rdi, [rbp+var_D0] mov al, [rbp+var_D3] mov [rbp+var_69], al mov al, [rbp+var_69] mov [rbp+var_71], al movzx esi, [rbp+var_71] call _ZN6Engine13getPieceValueEN5chess5PieceE; Engine::getPieceValue(chess::Piece) mov [rbp+var_D8], eax jmp short $+2 loc_1B533: mov rdi, [rbp+var_D0] mov al, [rbp+var_61] mov [rbp+var_72], al movzx esi, [rbp+var_72] call _ZN6Engine13getPieceValueEN5chess5PieceE; Engine::getPieceValue(chess::Piece) mov [rbp+var_DC], eax jmp short $+2 loc_1B551: mov ecx, [rbp+var_DC] mov eax, [rbp+var_D8] sub eax, ecx add eax, [rbp+var_5C] mov [rbp+var_5C], eax jmp short loc_1B581 mov rcx, rax mov eax, edx mov [rbp+var_30], rcx mov [rbp+var_34], eax lea rdi, [rbp+var_28] call _ZNSt6vectorISt4pairIN5chess4MoveEiESaIS3_EED2Ev; std::vector<std::pair<chess::Move,int>>::~vector() jmp loc_1B730 loc_1B581: mov rdi, [rbp+var_58]; this call _ZNK5chess4Move13promotionTypeEv; chess::Move::promotionType(void) mov [rbp+var_73], al lea rdi, [rbp+var_73] call _ZNK5chess9PieceTypecviEv; chess::PieceType::operator int(void) cmp eax, 10h jnz short loc_1B5A6 mov eax, [rbp+var_5C] add eax, 384h mov [rbp+var_5C], eax loc_1B5A6: mov rdi, [rbp+var_58]; this call _ZNK5chess4Move13promotionTypeEv; chess::Move::promotionType(void) mov [rbp+var_74], al lea rdi, [rbp+var_74] call _ZNK5chess9PieceTypecviEv; chess::PieceType::operator int(void) cmp eax, 8 jnz short loc_1B5CB mov eax, [rbp+var_5C] add eax, 1F4h mov [rbp+var_5C], eax loc_1B5CB: mov rdi, [rbp+var_58]; this call _ZNK5chess4Move13promotionTypeEv; chess::Move::promotionType(void) mov [rbp+var_75], al lea rdi, [rbp+var_75] call _ZNK5chess9PieceTypecviEv; chess::PieceType::operator int(void) cmp eax, 4 jnz short loc_1B5F0 mov eax, [rbp+var_5C] add eax, 140h mov [rbp+var_5C], eax loc_1B5F0: mov rdi, [rbp+var_58]; this call _ZNK5chess4Move13promotionTypeEv; chess::Move::promotionType(void) mov [rbp+var_76], al lea rdi, [rbp+var_76] call _ZNK5chess9PieceTypecviEv; chess::PieceType::operator int(void) cmp eax, 2 jnz short loc_1B615 mov eax, [rbp+var_5C] add eax, 12Ch mov [rbp+var_5C], eax loc_1B615: mov rsi, [rbp+var_58] lea rdi, [rbp+var_28] lea rdx, [rbp+var_5C] call _ZNSt6vectorISt4pairIN5chess4MoveEiESaIS3_EE12emplace_backIJRKS2_RiEEERS3_DpOT_; std::vector<std::pair<chess::Move,int>>::emplace_back<chess::Move const&,int &>(chess::Move const&,int &) jmp short $+2 loc_1B628: jmp short $+2 loc_1B62A: mov rax, [rbp+var_48] add rax, 4 mov [rbp+var_48], rax jmp loc_1B46A loc_1B63B: lea rdi, [rbp+var_28] mov [rbp+var_E8], rdi call _ZNSt6vectorISt4pairIN5chess4MoveEiESaIS3_EE5beginEv; std::vector<std::pair<chess::Move,int>>::begin(void) mov rdi, [rbp+var_E8] mov [rbp+var_80], rax call _ZNSt6vectorISt4pairIN5chess4MoveEiESaIS3_EE3endEv; std::vector<std::pair<chess::Move,int>>::end(void) mov [rbp+var_88], rax mov rdi, [rbp+var_80] mov rsi, [rbp+var_88] call _ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIN5chess4MoveEiESt6vectorIS5_SaIS5_EEEEZN6Engine10orderMovesERNS3_8MovelistEE3$_0EvT_SF_T0_; std::sort<__gnu_cxx::__normal_iterator<std::pair<chess::Move,int> *,std::vector<std::pair<chess::Move,int>>>,Engine::orderMoves(chess::Movelist &)::$_0>(__gnu_cxx::__normal_iterator<std::pair<chess::Move,int> *,std::vector<std::pair<chess::Move,int>>>,__gnu_cxx::__normal_iterator<std::pair<chess::Move,int> *,std::vector<std::pair<chess::Move,int>>>,Engine::orderMoves(chess::Movelist &)::$_0) jmp short $+2 loc_1B674: mov rdi, [rbp+var_10]; this call _ZN5chess8Movelist5clearEv; chess::Movelist::clear(void) lea rax, [rbp+var_28] mov [rbp+var_98], rax mov rdi, [rbp+var_98] call _ZNSt6vectorISt4pairIN5chess4MoveEiESaIS3_EE5beginEv; std::vector<std::pair<chess::Move,int>>::begin(void) mov [rbp+var_A0], rax mov rdi, [rbp+var_98] call _ZNSt6vectorISt4pairIN5chess4MoveEiESaIS3_EE3endEv; std::vector<std::pair<chess::Move,int>>::end(void) mov [rbp+var_A8], rax loc_1B6AE: lea rdi, [rbp+var_A0] lea rsi, [rbp+var_A8] call _ZN9__gnu_cxxneIPSt4pairIN5chess4MoveEiESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_; __gnu_cxx::operator!=<std::pair<chess::Move,int> *,std::vector<std::pair<chess::Move,int>>>(__gnu_cxx::__normal_iterator<std::pair<chess::Move,int> *,std::vector<std::pair<chess::Move,int>>> const&,__gnu_cxx::__normal_iterator<std::pair<chess::Move,int> *,std::vector<std::pair<chess::Move,int>>> const&) test al, 1 jnz short loc_1B6C7 jmp short loc_1B71E loc_1B6C7: lea rdi, [rbp+var_A0] call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIN5chess4MoveEiESt6vectorIS4_SaIS4_EEEdeEv; __gnu_cxx::__normal_iterator<std::pair<chess::Move,int> *,std::vector<std::pair<chess::Move,int>>>::operator*(void) mov [rbp+var_B0], rax mov rdi, [rbp+var_B0] call _ZSt3getILm0EN5chess4MoveEiERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKS6_; std::get<0ul,chess::Move,int>(std::pair<chess::Move,int> const&) mov [rbp+var_B8], rax mov rdi, [rbp+var_B0] call _ZSt3getILm1EN5chess4MoveEiERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKS6_; std::get<1ul,chess::Move,int>(std::pair<chess::Move,int> const&) mov [rbp+var_C0], rax mov rdi, [rbp+var_10]; this mov rsi, [rbp+var_B8]; chess::Move * call _ZN5chess8Movelist3addERKNS_4MoveE; chess::Movelist::add(chess::Move const&) lea rdi, [rbp+var_A0] call _ZN9__gnu_cxx17__normal_iteratorIPSt4pairIN5chess4MoveEiESt6vectorIS4_SaIS4_EEEppEv; __gnu_cxx::__normal_iterator<std::pair<chess::Move,int> *,std::vector<std::pair<chess::Move,int>>>::operator++(void) jmp short loc_1B6AE loc_1B71E: lea rdi, [rbp+var_28] call _ZNSt6vectorISt4pairIN5chess4MoveEiESaIS3_EED2Ev; std::vector<std::pair<chess::Move,int>>::~vector() add rsp, 0F0h pop rbp retn loc_1B730: mov rdi, [rbp+var_30] call __Unwind_Resume
long long Engine::orderMoves(Engine *this, chess::Movelist *a2) { int v2; // eax int v4; // [rsp+14h] [rbp-DCh] int PieceValue; // [rsp+18h] [rbp-D8h] chess::Move *v6; // [rsp+38h] [rbp-B8h] long long v7; // [rsp+40h] [rbp-B0h] long long v8; // [rsp+48h] [rbp-A8h] BYREF _QWORD v9[3]; // [rsp+50h] [rbp-A0h] BYREF long long v10; // [rsp+68h] [rbp-88h] long long v11; // [rsp+70h] [rbp-80h] char v12; // [rsp+7Ah] [rbp-76h] BYREF char v13; // [rsp+7Bh] [rbp-75h] BYREF char v14; // [rsp+7Ch] [rbp-74h] BYREF unsigned __int8 v15[3]; // [rsp+7Dh] [rbp-73h] BYREF int v16; // [rsp+80h] [rbp-70h] char v17; // [rsp+87h] [rbp-69h] int v18; // [rsp+88h] [rbp-68h] char v19; // [rsp+8Fh] [rbp-61h] unsigned int v20; // [rsp+90h] [rbp-60h] int v21; // [rsp+94h] [rbp-5Ch] BYREF chess::Move *v22; // [rsp+98h] [rbp-58h] long long v23; // [rsp+A0h] [rbp-50h] chess::Move *v24; // [rsp+A8h] [rbp-48h] chess::Movelist *v25; // [rsp+B0h] [rbp-40h] _BYTE v26[24]; // [rsp+C8h] [rbp-28h] BYREF chess::Movelist *v27; // [rsp+E0h] [rbp-10h] Engine *v28; // [rsp+E8h] [rbp-8h] v28 = this; v27 = a2; std::vector<std::pair<chess::Move,int>>::vector(); v2 = chess::Movelist::size(v27); std::vector<std::pair<chess::Move,int>>::reserve(v26, v2); v25 = v27; v24 = (chess::Move *)chess::Movelist::begin(v27); v23 = chess::Movelist::end(v25); while ( v24 != (chess::Move *)v23 ) { v22 = v24; v21 = 0; v20 = *(_DWORD *)v24; if ( (chess::Board::isCapture(this, v20) & 1) != 0 ) { v21 = 0; v18 = chess::Move::from(v22); v19 = chess::Board::at<chess::Piece>((long long)this, v18); v16 = chess::Move::to(v22); v17 = chess::Board::at<chess::Piece>((long long)this, v16); v15[2] = v17; PieceValue = Engine::getPieceValue((long long)this, v17); v15[1] = v19; v4 = Engine::getPieceValue((long long)this, v19); v21 += PieceValue - v4; } v15[0] = chess::Move::promotionType(v22); if ( (unsigned int)chess::PieceType::operator int(v15) == 16 ) v21 += 900; v14 = chess::Move::promotionType(v22); if ( (unsigned int)chess::PieceType::operator int((unsigned __int8 *)&v14) == 8 ) v21 += 500; v13 = chess::Move::promotionType(v22); if ( (unsigned int)chess::PieceType::operator int((unsigned __int8 *)&v13) == 4 ) v21 += 320; v12 = chess::Move::promotionType(v22); if ( (unsigned int)chess::PieceType::operator int((unsigned __int8 *)&v12) == 2 ) v21 += 300; std::vector<std::pair<chess::Move,int>>::emplace_back<chess::Move const&,int &>(v26, v22, &v21); v24 = (chess::Move *)((char *)v24 + 4); } v11 = ((long long (*)(void))std::vector<std::pair<chess::Move,int>>::begin)(); v10 = std::vector<std::pair<chess::Move,int>>::end(v26); std::sort<__gnu_cxx::__normal_iterator<std::pair<chess::Move,int> *,std::vector<std::pair<chess::Move,int>>>,Engine::orderMoves(chess::Movelist &)::$_0>( v11, v10); chess::Movelist::clear(v27); v9[1] = v26; v9[0] = std::vector<std::pair<chess::Move,int>>::begin(v26); v8 = std::vector<std::pair<chess::Move,int>>::end(v26); while ( (__gnu_cxx::operator!=<std::pair<chess::Move,int> *,std::vector<std::pair<chess::Move,int>>>(v9, &v8) & 1) != 0 ) { v7 = __gnu_cxx::__normal_iterator<std::pair<chess::Move,int> *,std::vector<std::pair<chess::Move,int>>>::operator*(v9); v6 = (chess::Move *)std::get<0ul,chess::Move,int>(v7); std::get<1ul,chess::Move,int>(v7); chess::Movelist::add(v27, v6); __gnu_cxx::__normal_iterator<std::pair<chess::Move,int> *,std::vector<std::pair<chess::Move,int>>>::operator++(v9); } return std::vector<std::pair<chess::Move,int>>::~vector(v26); }
orderMoves: PUSH RBP MOV RBP,RSP SUB RSP,0xf0 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0xd0],RAX LEA RDI,[RBP + -0x28] MOV qword ptr [RBP + -0xc8],RDI CALL 0x0011d0d0 MOV RDI,qword ptr [RBP + -0x10] CALL 0x0011d1f0 MOV RDI,qword ptr [RBP + -0xc8] MOVSXD RSI,EAX LAB_0011b441: CALL 0x0011d0f0 JMP 0x0011b448 LAB_0011b448: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RBP + -0x40] CALL 0x0011a030 MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x40] CALL 0x0011a050 MOV qword ptr [RBP + -0x50],RAX LAB_0011b46a: MOV RAX,qword ptr [RBP + -0x48] CMP RAX,qword ptr [RBP + -0x50] JZ 0x0011b63b MOV RDI,qword ptr [RBP + -0xd0] MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x58],RAX MOV dword ptr [RBP + -0x5c],0x0 MOV RAX,qword ptr [RBP + -0x58] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x60],EAX MOV ESI,dword ptr [RBP + -0x60] CALL 0x0011d210 MOV byte ptr [RBP + -0xd1],AL JMP 0x0011b4a7 LAB_0011b4a7: MOV AL,byte ptr [RBP + -0xd1] TEST AL,0x1 JNZ 0x0011b4b6 JMP 0x0011b581 LAB_0011b4b6: MOV dword ptr [RBP + -0x5c],0x0 MOV RDI,qword ptr [RBP + -0x58] CALL 0x001197a0 MOV RDI,qword ptr [RBP + -0xd0] MOV dword ptr [RBP + -0x68],EAX MOV ESI,dword ptr [RBP + -0x68] CALL 0x0010a5b0 MOV byte ptr [RBP + -0xd2],AL JMP 0x0011b4e0 LAB_0011b4e0: MOV AL,byte ptr [RBP + -0xd2] MOV byte ptr [RBP + -0x61],AL MOV RDI,qword ptr [RBP + -0x58] CALL 0x001197e0 MOV RDI,qword ptr [RBP + -0xd0] MOV dword ptr [RBP + -0x70],EAX MOV ESI,dword ptr [RBP + -0x70] CALL 0x0010a5b0 MOV byte ptr [RBP + -0xd3],AL JMP 0x0011b50c LAB_0011b50c: MOV RDI,qword ptr [RBP + -0xd0] MOV AL,byte ptr [RBP + -0xd3] MOV byte ptr [RBP + -0x69],AL MOV AL,byte ptr [RBP + -0x69] MOV byte ptr [RBP + -0x71],AL MOVZX ESI,byte ptr [RBP + -0x71] CALL 0x0010f440 MOV dword ptr [RBP + -0xd8],EAX JMP 0x0011b533 LAB_0011b533: MOV RDI,qword ptr [RBP + -0xd0] MOV AL,byte ptr [RBP + -0x61] MOV byte ptr [RBP + -0x72],AL MOVZX ESI,byte ptr [RBP + -0x72] CALL 0x0010f440 MOV dword ptr [RBP + -0xdc],EAX JMP 0x0011b551 LAB_0011b551: MOV ECX,dword ptr [RBP + -0xdc] MOV EAX,dword ptr [RBP + -0xd8] SUB EAX,ECX ADD EAX,dword ptr [RBP + -0x5c] MOV dword ptr [RBP + -0x5c],EAX JMP 0x0011b581 LAB_0011b581: MOV RDI,qword ptr [RBP + -0x58] CALL 0x0011a3b0 MOV byte ptr [RBP + -0x73],AL LEA RDI,[RBP + -0x73] CALL 0x0010a120 CMP EAX,0x10 JNZ 0x0011b5a6 MOV EAX,dword ptr [RBP + -0x5c] ADD EAX,0x384 MOV dword ptr [RBP + -0x5c],EAX LAB_0011b5a6: MOV RDI,qword ptr [RBP + -0x58] CALL 0x0011a3b0 MOV byte ptr [RBP + -0x74],AL LEA RDI,[RBP + -0x74] CALL 0x0010a120 CMP EAX,0x8 JNZ 0x0011b5cb MOV EAX,dword ptr [RBP + -0x5c] ADD EAX,0x1f4 MOV dword ptr [RBP + -0x5c],EAX LAB_0011b5cb: MOV RDI,qword ptr [RBP + -0x58] CALL 0x0011a3b0 MOV byte ptr [RBP + -0x75],AL LEA RDI,[RBP + -0x75] CALL 0x0010a120 CMP EAX,0x4 JNZ 0x0011b5f0 MOV EAX,dword ptr [RBP + -0x5c] ADD EAX,0x140 MOV dword ptr [RBP + -0x5c],EAX LAB_0011b5f0: MOV RDI,qword ptr [RBP + -0x58] CALL 0x0011a3b0 MOV byte ptr [RBP + -0x76],AL LEA RDI,[RBP + -0x76] CALL 0x0010a120 CMP EAX,0x2 JNZ 0x0011b615 MOV EAX,dword ptr [RBP + -0x5c] ADD EAX,0x12c MOV dword ptr [RBP + -0x5c],EAX LAB_0011b615: MOV RSI,qword ptr [RBP + -0x58] LEA RDI,[RBP + -0x28] LEA RDX,[RBP + -0x5c] CALL 0x0011d2a0 JMP 0x0011b628 LAB_0011b628: JMP 0x0011b62a LAB_0011b62a: MOV RAX,qword ptr [RBP + -0x48] ADD RAX,0x4 MOV qword ptr [RBP + -0x48],RAX JMP 0x0011b46a LAB_0011b63b: LEA RDI,[RBP + -0x28] MOV qword ptr [RBP + -0xe8],RDI CALL 0x0011d320 MOV RDI,qword ptr [RBP + -0xe8] MOV qword ptr [RBP + -0x80],RAX CALL 0x0011d350 MOV qword ptr [RBP + -0x88],RAX MOV RDI,qword ptr [RBP + -0x80] MOV RSI,qword ptr [RBP + -0x88] CALL 0x0011b740 LAB_0011b672: JMP 0x0011b674 LAB_0011b674: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00113150 LEA RAX,[RBP + -0x28] MOV qword ptr [RBP + -0x98],RAX MOV RDI,qword ptr [RBP + -0x98] CALL 0x0011d320 MOV qword ptr [RBP + -0xa0],RAX MOV RDI,qword ptr [RBP + -0x98] CALL 0x0011d350 MOV qword ptr [RBP + -0xa8],RAX LAB_0011b6ae: LEA RDI,[RBP + -0xa0] LEA RSI,[RBP + -0xa8] CALL 0x0011d380 TEST AL,0x1 JNZ 0x0011b6c7 JMP 0x0011b71e LAB_0011b6c7: LEA RDI,[RBP + -0xa0] CALL 0x0011d3c0 MOV qword ptr [RBP + -0xb0],RAX MOV RDI,qword ptr [RBP + -0xb0] CALL 0x0011d3e0 MOV qword ptr [RBP + -0xb8],RAX MOV RDI,qword ptr [RBP + -0xb0] CALL 0x0011d400 MOV qword ptr [RBP + -0xc0],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0xb8] CALL 0x001166d0 LEA RDI,[RBP + -0xa0] CALL 0x0011d420 JMP 0x0011b6ae LAB_0011b71e: LEA RDI,[RBP + -0x28] CALL 0x0011d440 ADD RSP,0xf0 POP RBP RET
/* Engine::orderMoves(chess::Movelist&) */ void __thiscall Engine::orderMoves(Engine *this,Movelist *param_1) { byte bVar1; bool bVar2; int iVar3; int iVar4; pair *ppVar5; type *ptVar6; int8 local_b0; int8 local_a8; vector<std::pair<chess::Move,int>,std::allocator<std::pair<chess::Move,int>>> *local_a0; int8 local_90; int8 local_88; PieceType local_7e; PieceType local_7d; PieceType local_7c; PieceType local_7b; int1 local_7a; int1 local_79; int4 local_78; int1 local_71; int4 local_70; int1 local_69; int4 local_68; int local_64; Move *local_60; Move *local_58; Move *local_50; Movelist *local_48; vector<std::pair<chess::Move,int>,std::allocator<std::pair<chess::Move,int>>> local_30 [24]; Movelist *local_18; Engine *local_10; local_18 = param_1; local_10 = this; std::vector<std::pair<chess::Move,int>,std::allocator<std::pair<chess::Move,int>>>::vector (local_30); iVar3 = chess::Movelist::size(local_18); /* try { // try from 0011b441 to 0011b671 has its CatchHandler @ 0011b567 */ std::vector<std::pair<chess::Move,int>,std::allocator<std::pair<chess::Move,int>>>::reserve (local_30,(long)iVar3); local_48 = local_18; local_50 = (Move *)chess::Movelist::begin(local_18); local_58 = (Move *)chess::Movelist::end(local_48); for (; local_50 != local_58; local_50 = local_50 + 4) { local_60 = local_50; local_64 = 0; local_68 = *(int4 *)local_50; bVar1 = chess::Board::isCapture((Board *)this,local_68); if ((bVar1 & 1) != 0) { local_64 = 0; local_70 = chess::Move::from(local_60); local_69 = chess::Board::at<chess::Piece>((Board *)this,local_70); local_78 = chess::Move::to(local_60); local_79 = chess::Board::at<chess::Piece>((Board *)this,local_78); local_71 = local_79; iVar3 = getPieceValue(this,local_79); local_7a = local_69; iVar4 = getPieceValue(this,local_69); local_64 = (iVar3 - iVar4) + local_64; } local_7b = (PieceType)chess::Move::promotionType(local_60); iVar3 = chess::PieceType::operator_cast_to_int(&local_7b); if (iVar3 == 0x10) { local_64 = local_64 + 900; } local_7c = (PieceType)chess::Move::promotionType(local_60); iVar3 = chess::PieceType::operator_cast_to_int(&local_7c); if (iVar3 == 8) { local_64 = local_64 + 500; } local_7d = (PieceType)chess::Move::promotionType(local_60); iVar3 = chess::PieceType::operator_cast_to_int(&local_7d); if (iVar3 == 4) { local_64 = local_64 + 0x140; } local_7e = (PieceType)chess::Move::promotionType(local_60); iVar3 = chess::PieceType::operator_cast_to_int(&local_7e); if (iVar3 == 2) { local_64 = local_64 + 300; } std::vector<std::pair<chess::Move,int>,std::allocator<std::pair<chess::Move,int>>>:: emplace_back<chess::Move_const&,int&>(local_30,local_60,&local_64); } local_88 = std::vector<std::pair<chess::Move,int>,std::allocator<std::pair<chess::Move,int>>>:: begin(local_30); local_90 = std::vector<std::pair<chess::Move,int>,std::allocator<std::pair<chess::Move,int>>>::end (local_30); std:: sort<__gnu_cxx::__normal_iterator<std::pair<chess::Move,int>*,std::vector<std::pair<chess::Move,int>,std::allocator<std::pair<chess::Move,int>>>>,Engine::orderMoves(chess::Movelist&)::__0> (local_88,local_90); chess::Movelist::clear(local_18); local_a0 = local_30; local_a8 = std::vector<std::pair<chess::Move,int>,std::allocator<std::pair<chess::Move,int>>>:: begin(local_a0); local_b0 = std::vector<std::pair<chess::Move,int>,std::allocator<std::pair<chess::Move,int>>>::end (local_a0); while (bVar2 = __gnu_cxx::operator!= ((__normal_iterator *)&local_a8,(__normal_iterator *)&local_b0), bVar2) { ppVar5 = (pair *)__gnu_cxx:: __normal_iterator<std::pair<chess::Move,int>*,std::vector<std::pair<chess::Move,int>,std::allocator<std::pair<chess::Move,int>>>> ::operator*((__normal_iterator<std::pair<chess::Move,int>*,std::vector<std::pair<chess::Move,int>,std::allocator<std::pair<chess::Move,int>>>> *)&local_a8); ptVar6 = std::get<0ul,chess::Move,int>(ppVar5); std::get<1ul,chess::Move,int>(ppVar5); chess::Movelist::add(local_18,(Move *)ptVar6); __gnu_cxx:: __normal_iterator<std::pair<chess::Move,int>*,std::vector<std::pair<chess::Move,int>,std::allocator<std::pair<chess::Move,int>>>> ::operator++((__normal_iterator<std::pair<chess::Move,int>*,std::vector<std::pair<chess::Move,int>,std::allocator<std::pair<chess::Move,int>>>> *)&local_a8); } std::vector<std::pair<chess::Move,int>,std::allocator<std::pair<chess::Move,int>>>::~vector (local_30); return; }
28,703
_cxx_global_var_init
Razamindset[P]pawnstar-chess-engine/src/engine/search.cpp
void Engine::orderMoves(Movelist& moves) { std::vector<std::pair<Move, int>> scoredMoves; scoredMoves.reserve(moves.size()); for (const auto& move : moves) { int score = 0; // worst queen takes pawn // ! If we make n moves on the board for each reacursive call that is // computationally heavy If we skip this step the engine will still look // at all the moves but 50% performace boost with same result. So we donot // need to check for checks and mates here // Prioritize captures using MVV-LVA if (board.isCapture(move)) { score = 0; Piece attacker = board.at(move.from()); Piece victim = board.at(move.to()); score += getPieceValue(victim) - getPieceValue(attacker); } // Prioritize promotions if (move.promotionType() == QUEEN) score += 900; if (move.promotionType() == ROOK) score += 500; if (move.promotionType() == BISHOP) score += 320; if (move.promotionType() == KNIGHT) score += 300; scoredMoves.emplace_back(move, score); } // Todo Need to learn this sorting magic function ask gpt for now // Sort moves by descending score std::sort(scoredMoves.begin(), scoredMoves.end(), [](const auto& a, const auto& b) { return a.second > b.second; }); // Replace original move list with sorted moves moves.clear(); for (const auto& [move, score] : scoredMoves) { moves.add(move); } }
O1
cpp
_cxx_global_var_init: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rsi, %rbx movq %rdi, %r14 xorps %xmm0, %xmm0 leaq 0x10(%rsp), %rdi movaps %xmm0, (%rdi) movq $0x0, 0x10(%rdi) movslq 0x400(%rsi), %rsi callq 0xba24 movq %rbx, 0x30(%rsp) movslq 0x400(%rbx), %r15 testq %r15, %r15 je 0xaf7e shlq $0x2, %r15 movl $0xc000, %ebp # imm = 0xC000 leaq 0x10(%rsp), %r12 leaq 0xc(%rsp), %rbx movq 0x30(%rsp), %r13 movl $0x0, 0xc(%rsp) movl (%r13), %eax movl %eax, %ecx andl $0x3f, %ecx cmpb $0xc, 0x60(%r14,%rcx) sete %cl movzwl %ax, %edx cmpl %ebp, %edx setae %dl orb %cl, %dl andl %ebp, %eax negw %ax setno %al testb %al, %dl jne 0xaf3b movq %r12, %rbx movl $0x0, 0xc(%rsp) movzwl (%r13), %eax movl %eax, %ecx shrl $0x6, %ecx andl $0x3f, %ecx movb 0x60(%r14,%rcx), %r12b andl $0x3f, %eax movzbl 0x60(%r14,%rax), %esi movq %r14, %rdi callq 0x6c2a movl %eax, %ebp movzbl %r12b, %esi movq %r14, %rdi callq 0x6c2a subl %eax, %ebp addl %ebp, 0xc(%rsp) movl $0xc000, %ebp # imm = 0xC000 movq %rbx, %r12 leaq 0xc(%rsp), %rbx movzwl (%r13), %eax shrl $0xc, %eax andl $0x3, %eax cmpl $0x1, %eax je 0xaf5a cmpl $0x3, %eax jne 0xaf62 addl $0x140, 0xc(%rsp) # imm = 0x140 jmp 0xaf62 addl $0x12c, 0xc(%rsp) # imm = 0x12C movq %r12, %rdi movq %r13, %rsi movq %rbx, %rdx callq 0xbac8 addq $0x4, %r13 addq $-0x4, %r15 jne 0xaebc movq 0x10(%rsp), %r15 movq 0x18(%rsp), %r14 cmpq %r14, %r15 movq 0x30(%rsp), %rbx je 0xb031 movq %r14, %r12 subq %r15, %r12 movq %r12, %rax sarq $0x3, %rax bsrq %rax, %rdx xorl $0x3f, %edx addl %edx, %edx xorq $0x7e, %rdx movq %r15, %rdi movq %r14, %rsi callq 0xb6dd cmpq $0x81, %r12 jl 0xb026 leaq 0x80(%r15), %r12 movq %r15, %rdi movq %r12, %rsi callq 0xb980 cmpq %r14, %r12 je 0xb031 addq $0x84, %r15 movq (%r12), %rax movq %rax, %rcx shrq $0x20, %rcx movq %r12, %rdx cmpl %ecx, -0x4(%r12) jge 0xb012 movq %r15, %rdx movq %rdx, %rsi movq -0xc(%rdx), %rdx movq %rdx, -0x4(%rsi) leaq -0x8(%rsi), %rdx cmpl %ecx, -0x10(%rsi) jl 0xaffa addq $-0x4, %rdx movl %eax, (%rdx) movl %ecx, 0x4(%rdx) addq $0x8, %r12 addq $0x8, %r15 cmpq %r14, %r12 jne 0xafe2 jmp 0xb031 movq %r15, %rdi movq %r14, %rsi callq 0xb980 movl $0x0, 0x400(%rbx) movq 0x10(%rsp), %rdi movq 0x18(%rsp), %rax cmpq %rax, %rdi je 0xb074 movq %rdi, %rcx movslq 0x400(%rbx), %rdx cmpq $0x100, %rdx # imm = 0x100 jge 0xb095 leal 0x1(%rdx), %esi movl %esi, 0x400(%rbx) movl (%rcx), %esi movl %esi, (%rbx,%rdx,4) addq $0x8, %rcx cmpq %rax, %rcx jne 0xb04d testq %rdi, %rdi je 0xb086 movq 0x20(%rsp), %rsi subq %rdi, %rsi callq 0x3210 addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x5eca(%rip), %rdi # 0x10f66 leaq 0x5b39(%rip), %rsi # 0x10bdc leaq 0x5f02(%rip), %rcx # 0x10fac movl $0x56f, %edx # imm = 0x56F callq 0x3130 jmp 0xb0b8 jmp 0xb0b8 movq %rax, %rbx movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0xb0d2 movq 0x20(%rsp), %rsi subq %rdi, %rsi callq 0x3210 movq %rbx, %rdi callq 0x3360
_ZN6Engine10orderMovesERN5chess8MovelistE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov rbx, rsi mov r14, rdi xorps xmm0, xmm0 lea rdi, [rsp+68h+var_58] movaps xmmword ptr [rdi], xmm0 mov qword ptr [rdi+10h], 0 movsxd rsi, dword ptr [rsi+400h] call _ZNSt6vectorISt4pairIN5chess4MoveEiESaIS3_EE7reserveEm; std::vector<std::pair<chess::Move,int>>::reserve(ulong) mov [rsp+68h+var_38], rbx movsxd r15, dword ptr [rbx+400h] test r15, r15 jz loc_AF7E shl r15, 2 mov ebp, 0C000h lea r12, [rsp+68h+var_58] lea rbx, [rsp+68h+var_5C] mov r13, [rsp+68h+var_38] loc_AEBC: mov [rsp+68h+var_5C], 0 mov eax, [r13+0] mov ecx, eax and ecx, 3Fh cmp byte ptr [r14+rcx+60h], 0Ch setz cl movzx edx, ax cmp edx, ebp setnb dl or dl, cl and eax, ebp neg ax setno al test dl, al jnz short loc_AF3B mov rbx, r12 mov [rsp+68h+var_5C], 0 movzx eax, word ptr [r13+0] mov ecx, eax shr ecx, 6 and ecx, 3Fh mov r12b, [r14+rcx+60h] and eax, 3Fh movzx esi, byte ptr [r14+rax+60h] mov rdi, r14 call _ZN6Engine13getPieceValueEN5chess5PieceE; Engine::getPieceValue(chess::Piece) mov ebp, eax movzx esi, r12b mov rdi, r14 call _ZN6Engine13getPieceValueEN5chess5PieceE; Engine::getPieceValue(chess::Piece) sub ebp, eax add [rsp+68h+var_5C], ebp mov ebp, 0C000h mov r12, rbx lea rbx, [rsp+68h+var_5C] loc_AF3B: movzx eax, word ptr [r13+0] shr eax, 0Ch and eax, 3 cmp eax, 1 jz short loc_AF5A cmp eax, 3 jnz short loc_AF62 add [rsp+68h+var_5C], 140h jmp short loc_AF62 loc_AF5A: add [rsp+68h+var_5C], 12Ch loc_AF62: mov rdi, r12 mov rsi, r13 mov rdx, rbx call _ZNSt6vectorISt4pairIN5chess4MoveEiESaIS3_EE12emplace_backIJRKS2_RiEEERS3_DpOT_; std::vector<std::pair<chess::Move,int>>::emplace_back<chess::Move const&,int &>(chess::Move const&,int &) add r13, 4 add r15, 0FFFFFFFFFFFFFFFCh jnz loc_AEBC loc_AF7E: mov r15, [rsp+68h+var_58] mov r14, [rsp+68h+var_50] cmp r15, r14 mov rbx, [rsp+68h+var_38] jz loc_B031 mov r12, r14 sub r12, r15 mov rax, r12 sar rax, 3 bsr rdx, rax xor edx, 3Fh add edx, edx xor rdx, 7Eh mov rdi, r15 mov rsi, r14 call _ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIPSt4pairIN5chess4MoveEiESt6vectorIS5_SaIS5_EEEElNS0_5__ops15_Iter_comp_iterIZN6Engine10orderMovesERNS3_8MovelistEE3$_0EEEvT_SI_T0_T1_; std::__introsort_loop<__gnu_cxx::__normal_iterator<std::pair<chess::Move,int> *,std::vector<std::pair<chess::Move,int>>>,long,__gnu_cxx::__ops::_Iter_comp_iter<Engine::orderMoves(chess::Movelist &)::$_0>>(__gnu_cxx::__normal_iterator<std::pair<chess::Move,int> *,std::vector<std::pair<chess::Move,int>>>,__gnu_cxx::__normal_iterator<std::pair<chess::Move,int> *,std::vector<std::pair<chess::Move,int>>>,long,__gnu_cxx::__ops::_Iter_comp_iter<Engine::orderMoves(chess::Movelist &)::$_0>) cmp r12, 81h jl short loc_B026 lea r12, [r15+80h] mov rdi, r15 mov rsi, r12 call _ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIN5chess4MoveEiESt6vectorIS5_SaIS5_EEEENS0_5__ops15_Iter_comp_iterIZN6Engine10orderMovesERNS3_8MovelistEE3$_0EEEvT_SI_T0_; std::__insertion_sort<__gnu_cxx::__normal_iterator<std::pair<chess::Move,int> *,std::vector<std::pair<chess::Move,int>>>,__gnu_cxx::__ops::_Iter_comp_iter<Engine::orderMoves(chess::Movelist &)::$_0>>(__gnu_cxx::__normal_iterator<std::pair<chess::Move,int> *,std::vector<std::pair<chess::Move,int>>>,__gnu_cxx::__normal_iterator<std::pair<chess::Move,int> *,std::vector<std::pair<chess::Move,int>>>,__gnu_cxx::__ops::_Iter_comp_iter<Engine::orderMoves(chess::Movelist &)::$_0>) cmp r12, r14 jz short loc_B031 add r15, 84h loc_AFE2: mov rax, [r12] mov rcx, rax shr rcx, 20h mov rdx, r12 cmp [r12-4], ecx jge short loc_B012 mov rdx, r15 loc_AFFA: mov rsi, rdx mov rdx, [rdx-0Ch] mov [rsi-4], rdx lea rdx, [rsi-8] cmp [rsi-10h], ecx jl short loc_AFFA add rdx, 0FFFFFFFFFFFFFFFCh loc_B012: mov [rdx], eax mov [rdx+4], ecx add r12, 8 add r15, 8 cmp r12, r14 jnz short loc_AFE2 jmp short loc_B031 loc_B026: mov rdi, r15 mov rsi, r14 call _ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIN5chess4MoveEiESt6vectorIS5_SaIS5_EEEENS0_5__ops15_Iter_comp_iterIZN6Engine10orderMovesERNS3_8MovelistEE3$_0EEEvT_SI_T0_; std::__insertion_sort<__gnu_cxx::__normal_iterator<std::pair<chess::Move,int> *,std::vector<std::pair<chess::Move,int>>>,__gnu_cxx::__ops::_Iter_comp_iter<Engine::orderMoves(chess::Movelist &)::$_0>>(__gnu_cxx::__normal_iterator<std::pair<chess::Move,int> *,std::vector<std::pair<chess::Move,int>>>,__gnu_cxx::__normal_iterator<std::pair<chess::Move,int> *,std::vector<std::pair<chess::Move,int>>>,__gnu_cxx::__ops::_Iter_comp_iter<Engine::orderMoves(chess::Movelist &)::$_0>) loc_B031: mov dword ptr [rbx+400h], 0 mov rdi, [rsp+68h+var_58]; void * mov rax, [rsp+68h+var_50] cmp rdi, rax jz short loc_B074 mov rcx, rdi loc_B04D: movsxd rdx, dword ptr [rbx+400h] cmp rdx, 100h jge short loc_B095 lea esi, [rdx+1] mov [rbx+400h], esi mov esi, [rcx] mov [rbx+rdx*4], esi add rcx, 8 cmp rcx, rax jnz short loc_B04D loc_B074: test rdi, rdi jz short loc_B086 mov rsi, [rsp+68h+var_48] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B086: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_B095: lea rdi, aSizeConstantsM; "size_ < constants::MAX_MOVES" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidChessMovel_0; "void chess::Movelist::add(const_referen"... mov edx, 56Fh call ___assert_fail jmp short loc_B0B8 jmp short $+2 loc_B0B8: mov rbx, rax mov rdi, [rsp+68h+var_58]; void * test rdi, rdi jz short loc_B0D2 mov rsi, [rsp+68h+var_48] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B0D2: mov rdi, rbx call __Unwind_Resume
void Engine::orderMoves(long long a1, long long a2) { long long v2; // r15 __int128 *v3; // r12 _WORD *v4; // r13 __int128 *v5; // rbx char v6; // r12 int PieceValue; // ebp int v8; // eax int v9; // eax __int128 v10; // kr00_16 _WORD *v11; // rbx long long v12; // r12 unsigned long long v13; // rdx _QWORD *v14; // r12 long long v15; // r15 long long v16; // rax long long v17; // rcx _DWORD *v18; // rdx long long v19; // rdx long long v20; // rsi __int128 v21; // kr10_16 _DWORD *v22; // rcx long long v23; // rdx int v24; // [rsp+Ch] [rbp-5Ch] BYREF __int128 v25; // [rsp+10h] [rbp-58h] BYREF long long v26; // [rsp+20h] [rbp-48h] _WORD *v27; // [rsp+30h] [rbp-38h] v25 = 0LL; v26 = 0LL; std::vector<std::pair<chess::Move,int>>::reserve(&v25, *(int *)(a2 + 1024)); v27 = (_WORD *)a2; if ( *(_DWORD *)(a2 + 1024) ) { v2 = 4LL * *(int *)(a2 + 1024); v3 = &v25; v4 = v27; do { v24 = 0; if ( __OFSUB__(-(*v4 & 0xC000), 1) || *(_BYTE *)(a1 + (*(_DWORD *)v4 & 0x3F) + 96) != 12 && (unsigned __int16)*(_DWORD *)v4 < 0xC000u ) { v5 = v3; v24 = 0; v6 = *(_BYTE *)(a1 + (((unsigned __int16)*v4 >> 6) & 0x3F) + 96); PieceValue = Engine::getPieceValue(a1, *(_BYTE *)(a1 + (*v4 & 0x3F) + 96)); v8 = Engine::getPieceValue(a1, v6); v24 += PieceValue - v8; v3 = v5; } v9 = ((unsigned __int16)*v4 >> 12) & 3; if ( v9 == 1 ) { v24 += 300; } else if ( v9 == 3 ) { v24 += 320; } std::vector<std::pair<chess::Move,int>>::emplace_back<chess::Move const&,int &>(v3, v4, &v24); v4 += 2; v2 -= 4LL; } while ( v2 ); } v10 = v25; v11 = v27; if ( (_QWORD)v25 != *((_QWORD *)&v25 + 1) ) { v12 = *((_QWORD *)&v25 + 1) - v25; _BitScanReverse64(&v13, (long long)(*((_QWORD *)&v25 + 1) - v25) >> 3); std::__introsort_loop<__gnu_cxx::__normal_iterator<std::pair<chess::Move,int> *,std::vector<std::pair<chess::Move,int>>>,long,__gnu_cxx::__ops::_Iter_comp_iter<Engine::orderMoves(chess::Movelist &)::$_0>>( v25, *((_QWORD *)&v25 + 1), (2 * ((unsigned int)v13 ^ 0x3F)) ^ 0x7ELL); if ( v12 < 129 ) { std::__insertion_sort<__gnu_cxx::__normal_iterator<std::pair<chess::Move,int> *,std::vector<std::pair<chess::Move,int>>>,__gnu_cxx::__ops::_Iter_comp_iter<Engine::orderMoves(chess::Movelist &)::$_0>>( v10, *((_QWORD *)&v10 + 1)); } else { v14 = (_QWORD *)(v10 + 128); std::__insertion_sort<__gnu_cxx::__normal_iterator<std::pair<chess::Move,int> *,std::vector<std::pair<chess::Move,int>>>,__gnu_cxx::__ops::_Iter_comp_iter<Engine::orderMoves(chess::Movelist &)::$_0>>( v10, v10 + 128); if ( (_QWORD)v10 + 128LL != *((_QWORD *)&v10 + 1) ) { v15 = v10 + 132; do { v16 = *v14; v17 = HIDWORD(*v14); v18 = v14; if ( *((_DWORD *)v14 - 1) < (int)v17 ) { v19 = v15; do { v20 = v19; *(_QWORD *)(v19 - 4) = *(_QWORD *)(v19 - 12); v19 -= 8LL; } while ( *(_DWORD *)(v20 - 16) < (int)v17 ); v18 = (_DWORD *)(v19 - 4); } *v18 = v16; v18[1] = v17; ++v14; v15 = v10 + 8; } while ( v14 != *((_QWORD **)&v10 + 1) ); } } } *((_DWORD *)v11 + 256) = 0; v21 = v25; if ( (_QWORD)v25 != *((_QWORD *)&v25 + 1) ) { v22 = (_DWORD *)v25; do { v23 = *((int *)v11 + 256); if ( v23 >= 256 ) __assert_fail( "size_ < constants::MAX_MOVES", "/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp", 1391LL, "void chess::Movelist::add(const_reference)"); *((_DWORD *)v11 + 256) = v23 + 1; *(_DWORD *)&v11[2 * v23] = *v22; v22 += 2; } while ( v22 != *((_DWORD **)&v21 + 1) ); } if ( (_QWORD)v21 ) operator delete((void *)v21, v26 - v21); }
orderMoves: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV RBX,RSI MOV R14,RDI XORPS XMM0,XMM0 LEA RDI,[RSP + 0x10] MOVAPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x10],0x0 MOVSXD RSI,dword ptr [RSI + 0x400] LAB_0010ae8a: CALL 0x0010ba24 MOV qword ptr [RSP + 0x30],RBX MOVSXD R15,dword ptr [RBX + 0x400] TEST R15,R15 JZ 0x0010af7e SHL R15,0x2 MOV EBP,0xc000 LEA R12,[RSP + 0x10] LEA RBX,[RSP + 0xc] MOV R13,qword ptr [RSP + 0x30] LAB_0010aebc: MOV dword ptr [RSP + 0xc],0x0 MOV EAX,dword ptr [R13] MOV ECX,EAX AND ECX,0x3f CMP byte ptr [R14 + RCX*0x1 + 0x60],0xc SETZ CL MOVZX EDX,AX CMP EDX,EBP SETNC DL OR DL,CL AND EAX,EBP NEG AX SETNO AL TEST DL,AL JNZ 0x0010af3b MOV RBX,R12 MOV dword ptr [RSP + 0xc],0x0 MOVZX EAX,word ptr [R13] MOV ECX,EAX SHR ECX,0x6 AND ECX,0x3f MOV R12B,byte ptr [R14 + RCX*0x1 + 0x60] AND EAX,0x3f MOVZX ESI,byte ptr [R14 + RAX*0x1 + 0x60] LAB_0010af12: MOV RDI,R14 CALL 0x00106c2a MOV EBP,EAX MOVZX ESI,R12B MOV RDI,R14 CALL 0x00106c2a SUB EBP,EAX ADD dword ptr [RSP + 0xc],EBP MOV EBP,0xc000 MOV R12,RBX LEA RBX,[RSP + 0xc] LAB_0010af3b: MOVZX EAX,word ptr [R13] SHR EAX,0xc AND EAX,0x3 CMP EAX,0x1 JZ 0x0010af5a CMP EAX,0x3 JNZ 0x0010af62 ADD dword ptr [RSP + 0xc],0x140 JMP 0x0010af62 LAB_0010af5a: ADD dword ptr [RSP + 0xc],0x12c LAB_0010af62: MOV RDI,R12 MOV RSI,R13 MOV RDX,RBX CALL 0x0010bac8 LAB_0010af70: ADD R13,0x4 ADD R15,-0x4 JNZ 0x0010aebc LAB_0010af7e: MOV R15,qword ptr [RSP + 0x10] MOV R14,qword ptr [RSP + 0x18] CMP R15,R14 MOV RBX,qword ptr [RSP + 0x30] JZ 0x0010b031 MOV R12,R14 SUB R12,R15 MOV RAX,R12 SAR RAX,0x3 BSR RDX,RAX XOR EDX,0x3f ADD EDX,EDX XOR RDX,0x7e MOV RDI,R15 MOV RSI,R14 CALL 0x0010b6dd CMP R12,0x81 JL 0x0010b026 LEA R12,[R15 + 0x80] MOV RDI,R15 MOV RSI,R12 CALL 0x0010b980 CMP R12,R14 JZ 0x0010b031 ADD R15,0x84 LAB_0010afe2: MOV RAX,qword ptr [R12] MOV RCX,RAX SHR RCX,0x20 MOV RDX,R12 CMP dword ptr [R12 + -0x4],ECX JGE 0x0010b012 MOV RDX,R15 LAB_0010affa: MOV RSI,RDX MOV RDX,qword ptr [RDX + -0xc] MOV qword ptr [RSI + -0x4],RDX LEA RDX,[RSI + -0x8] CMP dword ptr [RSI + -0x10],ECX JL 0x0010affa ADD RDX,-0x4 LAB_0010b012: MOV dword ptr [RDX],EAX MOV dword ptr [RDX + 0x4],ECX ADD R12,0x8 ADD R15,0x8 CMP R12,R14 JNZ 0x0010afe2 JMP 0x0010b031 LAB_0010b026: MOV RDI,R15 MOV RSI,R14 CALL 0x0010b980 LAB_0010b031: MOV dword ptr [RBX + 0x400],0x0 MOV RDI,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP + 0x18] CMP RDI,RAX JZ 0x0010b074 MOV RCX,RDI LAB_0010b04d: MOVSXD RDX,dword ptr [RBX + 0x400] CMP RDX,0x100 JGE 0x0010b095 LEA ESI,[RDX + 0x1] MOV dword ptr [RBX + 0x400],ESI MOV ESI,dword ptr [RCX] MOV dword ptr [RBX + RDX*0x4],ESI ADD RCX,0x8 CMP RCX,RAX JNZ 0x0010b04d LAB_0010b074: TEST RDI,RDI JZ 0x0010b086 MOV RSI,qword ptr [RSP + 0x20] SUB RSI,RDI CALL 0x00103210 LAB_0010b086: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0010b095: LEA RDI,[0x110f66] LEA RSI,[0x110bdc] LEA RCX,[0x110fac] MOV EDX,0x56f CALL 0x00103130
/* Engine::orderMoves(chess::Movelist&) */ void __thiscall Engine::orderMoves(Engine *this,Movelist *param_1) { Engine EVar1; int8 uVar2; int8 *puVar3; Movelist *pMVar4; int4 *puVar5; ushort uVar6; int iVar7; int iVar8; ulong uVar9; int4 *puVar10; int8 *puVar11; long lVar12; int8 *puVar13; long lVar14; int4 *puVar15; int local_5c; int8 *local_58; int8 *puStack_50; long local_48; Movelist *local_38; local_58 = (int8 *)0x0; puStack_50 = (int8 *)0x0; local_48 = 0; /* try { // try from 0010ae8a to 0010ae8e has its CatchHandler @ 0010b0b4 */ std::vector<std::pair<chess::Move,int>,std::allocator<std::pair<chess::Move,int>>>::reserve ((vector<std::pair<chess::Move,int>,std::allocator<std::pair<chess::Move,int>>> *) &local_58,(long)*(int *)(param_1 + 0x400)); local_38 = param_1; if ((long)*(int *)(param_1 + 0x400) != 0) { lVar14 = (long)*(int *)(param_1 + 0x400) << 2; do { local_5c = 0; if ((*(uint *)param_1 & 0xffff) < 0xc000 && this[(ulong)(*(uint *)param_1 & 0x3f) + 0x60] != (Engine)0xc) { local_5c = 0; EVar1 = this[(ulong)(*(ushort *)param_1 >> 6 & 0x3f) + 0x60]; /* try { // try from 0010af12 to 0010af27 has its CatchHandler @ 0010b0b6 */ iVar7 = getPieceValue(this,this[(ulong)(*(ushort *)param_1 & 0x3f) + 0x60]); iVar8 = getPieceValue(this,EVar1); local_5c = local_5c + (iVar7 - iVar8); } uVar6 = *(ushort *)param_1 >> 0xc & 3; if (uVar6 == 1) { local_5c = local_5c + 300; } else if (uVar6 == 3) { local_5c = local_5c + 0x140; } /* try { // try from 0010af62 to 0010af6f has its CatchHandler @ 0010b0b8 */ std::vector<std::pair<chess::Move,int>,std::allocator<std::pair<chess::Move,int>>>:: emplace_back<chess::Move_const&,int&> ((vector<std::pair<chess::Move,int>,std::allocator<std::pair<chess::Move,int>>> *) &local_58,param_1,&local_5c); param_1 = param_1 + 4; lVar14 = lVar14 + -4; } while (lVar14 != 0); } pMVar4 = local_38; puVar3 = puStack_50; puVar11 = local_58; if (local_58 != puStack_50) { lVar12 = (long)puStack_50 - (long)local_58; uVar9 = lVar12 >> 3; lVar14 = 0x3f; if (uVar9 != 0) { for (; uVar9 >> lVar14 == 0; lVar14 = lVar14 + -1) { } } std:: __introsort_loop<__gnu_cxx::__normal_iterator<std::pair<chess::Move,int>*,std::vector<std::pair<chess::Move,int>,std::allocator<std::pair<chess::Move,int>>>>,long,__gnu_cxx::__ops::_Iter_comp_iter<Engine::orderMoves(chess::Movelist&)::__0>> (local_58,puStack_50,((uint)lVar14 ^ 0x3f) * 2 ^ 0x7e); if (lVar12 < 0x81) { std:: __insertion_sort<__gnu_cxx::__normal_iterator<std::pair<chess::Move,int>*,std::vector<std::pair<chess::Move,int>,std::allocator<std::pair<chess::Move,int>>>>,__gnu_cxx::__ops::_Iter_comp_iter<Engine::orderMoves(chess::Movelist&)::__0>> (puVar11,puVar3); } else { puVar13 = puVar11 + 0x10; std:: __insertion_sort<__gnu_cxx::__normal_iterator<std::pair<chess::Move,int>*,std::vector<std::pair<chess::Move,int>,std::allocator<std::pair<chess::Move,int>>>>,__gnu_cxx::__ops::_Iter_comp_iter<Engine::orderMoves(chess::Movelist&)::__0>> (puVar11,puVar13); if (puVar13 != puVar3) { puVar15 = (int4 *)((long)puVar11 + 0x84); do { uVar2 = *puVar13; iVar7 = (int)((ulong)uVar2 >> 0x20); puVar11 = puVar13; puVar5 = puVar15; if (*(int *)((long)puVar13 + -4) < iVar7) { do { puVar10 = puVar5; *(int8 *)(puVar10 + -1) = *(int8 *)(puVar10 + -3); puVar5 = puVar10 + -2; } while ((int)puVar10[-4] < iVar7); puVar11 = (int8 *)(puVar10 + -3); } *(int *)puVar11 = (int)uVar2; *(int *)((long)puVar11 + 4) = iVar7; puVar13 = puVar13 + 1; puVar15 = puVar15 + 2; } while (puVar13 != puVar3); } } } *(int4 *)(pMVar4 + 0x400) = 0; puVar11 = local_58; while( true ) { if (puVar11 == puStack_50) { if (local_58 != (int8 *)0x0) { operator_delete(local_58,local_48 - (long)local_58); } return; } iVar7 = *(int *)(pMVar4 + 0x400); if (0xff < (long)iVar7) break; *(int *)(pMVar4 + 0x400) = iVar7 + 1; *(int4 *)(pMVar4 + (long)iVar7 * 4) = *(int4 *)puVar11; puVar11 = puVar11 + 1; } /* WARNING: Subroutine does not return */ __assert_fail("size_ < constants::MAX_MOVES", "/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp" ,0x56f,"void chess::Movelist::add(const_reference)"); }
28,704
_cxx_global_var_init
Razamindset[P]pawnstar-chess-engine/src/engine/search.cpp
void Engine::orderMoves(Movelist& moves) { std::vector<std::pair<Move, int>> scoredMoves; scoredMoves.reserve(moves.size()); for (const auto& move : moves) { int score = 0; // worst queen takes pawn // ! If we make n moves on the board for each reacursive call that is // computationally heavy If we skip this step the engine will still look // at all the moves but 50% performace boost with same result. So we donot // need to check for checks and mates here // Prioritize captures using MVV-LVA if (board.isCapture(move)) { score = 0; Piece attacker = board.at(move.from()); Piece victim = board.at(move.to()); score += getPieceValue(victim) - getPieceValue(attacker); } // Prioritize promotions if (move.promotionType() == QUEEN) score += 900; if (move.promotionType() == ROOK) score += 500; if (move.promotionType() == BISHOP) score += 320; if (move.promotionType() == KNIGHT) score += 300; scoredMoves.emplace_back(move, score); } // Todo Need to learn this sorting magic function ask gpt for now // Sort moves by descending score std::sort(scoredMoves.begin(), scoredMoves.end(), [](const auto& a, const auto& b) { return a.second > b.second; }); // Replace original move list with sorted moves moves.clear(); for (const auto& [move, score] : scoredMoves) { moves.add(move); } }
O2
cpp
_cxx_global_var_init: pushq %rbx leaq 0xef184(%rip), %rbx # 0xf1613 movq %rbx, %rdi callq 0x2300 movq 0x13b5a(%rip), %rdi # 0x15ff8 leaq 0x13d4b(%rip), %rdx # 0x161f0 movq %rbx, %rsi popq %rbx jmp 0x2200
_GLOBAL__sub_I_search_cpp: push rbx lea rbx, _ZStL8__ioinit_1; std::__ioinit mov rdi, rbx; this call __ZNSt8ios_base4InitC1Ev; std::ios_base::Init::Init(void) mov rdi, cs:lpfunc; lpfunc lea rdx, __dso_handle; lpdso_handle mov rsi, rbx; obj pop rbx jmp ___cxa_atexit
int GLOBAL__sub_I_search_cpp() { std::ios_base::Init::Init((std::ios_base::Init *)&std::__ioinit); return __cxa_atexit((void (*)(void *))&std::ios_base::Init::~Init, &std::__ioinit, &_dso_handle); }
_GLOBAL__sub_I_search.cpp: PUSH RBX LEA RBX,[0x1f1613] MOV RDI,RBX CALL 0x00102300 MOV RDI,qword ptr [0x00115ff8] LEA RDX,[0x1161f0] MOV RSI,RBX POP RBX JMP 0x00102200
void _GLOBAL__sub_I_search_cpp(void) { std::ios_base::Init::Init((Init *)&std::__ioinit); __cxa_atexit(PTR__Init_00115ff8,&std::__ioinit,&__dso_handle); return; }
28,705
_cxx_global_var_init
Razamindset[P]pawnstar-chess-engine/src/engine/search.cpp
void Engine::orderMoves(Movelist& moves) { std::vector<std::pair<Move, int>> scoredMoves; scoredMoves.reserve(moves.size()); for (const auto& move : moves) { int score = 0; // worst queen takes pawn // ! If we make n moves on the board for each reacursive call that is // computationally heavy If we skip this step the engine will still look // at all the moves but 50% performace boost with same result. So we donot // need to check for checks and mates here // Prioritize captures using MVV-LVA if (board.isCapture(move)) { score = 0; Piece attacker = board.at(move.from()); Piece victim = board.at(move.to()); score += getPieceValue(victim) - getPieceValue(attacker); } // Prioritize promotions if (move.promotionType() == QUEEN) score += 900; if (move.promotionType() == ROOK) score += 500; if (move.promotionType() == BISHOP) score += 320; if (move.promotionType() == KNIGHT) score += 300; scoredMoves.emplace_back(move, score); } // Todo Need to learn this sorting magic function ask gpt for now // Sort moves by descending score std::sort(scoredMoves.begin(), scoredMoves.end(), [](const auto& a, const auto& b) { return a.second > b.second; }); // Replace original move list with sorted moves moves.clear(); for (const auto& [move, score] : scoredMoves) { moves.add(move); } }
O3
cpp
_cxx_global_var_init: pushq %rbx leaq 0xed0fc(%rip), %rbx # 0xef603 movq %rbx, %rdi callq 0x22e0 movq 0x11ae2(%rip), %rdi # 0x13ff8 leaq 0x11cc3(%rip), %rdx # 0x141e0 movq %rbx, %rsi popq %rbx jmp 0x21e0
_GLOBAL__sub_I_search_cpp: push rbx lea rbx, _ZStL8__ioinit_1; std::__ioinit mov rdi, rbx; this call __ZNSt8ios_base4InitC1Ev; std::ios_base::Init::Init(void) mov rdi, cs:lpfunc; lpfunc lea rdx, __dso_handle; lpdso_handle mov rsi, rbx; obj pop rbx jmp ___cxa_atexit
int GLOBAL__sub_I_search_cpp() { std::ios_base::Init::Init((std::ios_base::Init *)&std::__ioinit); return __cxa_atexit((void (*)(void *))&std::ios_base::Init::~Init, &std::__ioinit, &_dso_handle); }
_GLOBAL__sub_I_search.cpp: PUSH RBX LEA RBX,[0x1ef603] MOV RDI,RBX CALL 0x001022e0 MOV RDI,qword ptr [0x00113ff8] LEA RDX,[0x1141e0] MOV RSI,RBX POP RBX JMP 0x001021e0
void _GLOBAL__sub_I_search_cpp(void) { std::ios_base::Init::Init((Init *)&std::__ioinit); __cxa_atexit(PTR__Init_00113ff8,&std::__ioinit,&__dso_handle); return; }
28,706
minja::Parser::parseBracedExpressionOrArray()
monkey531[P]llama/common/minja.hpp
std::shared_ptr<Expression> parseBracedExpressionOrArray() { if (consumeToken("(").empty()) return nullptr; auto expr = parseExpression(); if (!expr) throw std::runtime_error("Expected expression in braced expression"); if (!consumeToken(")").empty()) { return expr; // Drop the parentheses } std::vector<std::shared_ptr<Expression>> tuple; tuple.emplace_back(std::move(expr)); while (it != end) { if (consumeToken(",").empty()) throw std::runtime_error("Expected comma in tuple"); auto next = parseExpression(); if (!next) throw std::runtime_error("Expected expression in tuple"); tuple.push_back(std::move(next)); if (!consumeToken(")").empty()) { return std::make_shared<ArrayExpr>(get_location(), std::move(tuple)); } } throw std::runtime_error("Expected closing parenthesis"); }
O3
cpp
minja::Parser::parseBracedExpressionOrArray(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rsi, %r14 movq %rdi, %r13 leaq 0x10(%rsp), %r12 movq %r12, -0x10(%r12) leaq 0x6fe50(%rip), %rsi # 0xb5a8e leaq 0x6fe4a(%rip), %rdx # 0xb5a8f movq %rsp, %rdi callq 0x200f4 leaq 0x20(%rsp), %rdi movq %rsp, %rdx movq %r14, %rsi movl $0x1, %ecx callq 0x3382c leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi movq -0x8(%rax), %rbx cmpq %rax, %rdi je 0x45c81 movq 0x30(%rsp), %rsi incq %rsi callq 0x186e0 movq (%rsp), %rdi cmpq %r12, %rdi je 0x45c97 movq 0x10(%rsp), %rsi incq %rsi callq 0x186e0 testq %rbx, %rbx je 0x45d30 leaq 0x60(%rsp), %rbx movq %rbx, %rdi movq %r14, %rsi movl $0x1, %edx callq 0x330f8 cmpq $0x0, (%rbx) je 0x4603f movq %rsp, %rdi movq %r12, (%rdi) leaq 0x6faa3(%rip), %rsi # 0xb576f leaq 0x6fa9d(%rip), %rdx # 0xb5770 callq 0x200f4 leaq 0x20(%rsp), %rdi movq %rsp, %rdx movq %r14, %rsi movl $0x1, %ecx callq 0x3382c movq 0x20(%rsp), %rdi movq 0x28(%rsp), %rbx leaq 0x30(%rsp), %rax cmpq %rax, %rdi je 0x45d0e movq 0x30(%rsp), %rsi incq %rsi callq 0x186e0 movq (%rsp), %rdi cmpq %r12, %rdi je 0x45d24 movq 0x10(%rsp), %rsi incq %rsi callq 0x186e0 testq %rbx, %rbx je 0x45d4d movaps 0x60(%rsp), %xmm0 jmp 0x45d33 xorps %xmm0, %xmm0 movups %xmm0, (%r13) movq %r13, %rax addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r13, 0x80(%rsp) xorps %xmm0, %xmm0 leaq 0x40(%rsp), %rdi movaps %xmm0, (%rdi) movq $0x0, 0x10(%rdi) leaq 0x60(%rsp), %rsi callq 0x43d38 movq 0x20(%r14), %rax cmpq 0x18(%r14), %rax je 0x45ea9 movq %rsp, %r13 leaq 0x20(%rsp), %rbp leaq 0x70(%rsp), %rbx movq %r12, (%rsp) movq %r13, %rdi leaq 0x68edb(%rip), %rsi # 0xaec76 leaq 0x68ed5(%rip), %rdx # 0xaec77 callq 0x200f4 movq %rbp, %rdi movq %r14, %rsi movq %r13, %rdx movl $0x1, %ecx callq 0x3382c movq 0x20(%rsp), %rdi movq 0x28(%rsp), %r15 leaq 0x30(%rsp), %rax cmpq %rax, %rdi je 0x45ddb movq 0x30(%rsp), %rsi incq %rsi callq 0x186e0 movq (%rsp), %rdi cmpq %r12, %rdi je 0x45df1 movq 0x10(%rsp), %rsi incq %rsi callq 0x186e0 testq %r15, %r15 je 0x45fd9 movq %rbx, %rdi movq %r14, %rsi movl $0x1, %edx callq 0x330f8 cmpq $0x0, 0x70(%rsp) je 0x4600b leaq 0x40(%rsp), %rdi movq %rbx, %rsi callq 0x43d38 movq %r12, (%rsp) movq %r13, %rdi leaq 0x6f93e(%rip), %rsi # 0xb576f leaq 0x6f938(%rip), %rdx # 0xb5770 callq 0x200f4 movq %rbp, %rdi movq %r14, %rsi movq %r13, %rdx movl $0x1, %ecx callq 0x3382c movq 0x20(%rsp), %rdi movq 0x28(%rsp), %r15 leaq 0x30(%rsp), %rax cmpq %rax, %rdi je 0x45e71 movq 0x30(%rsp), %rsi incq %rsi callq 0x186e0 movq (%rsp), %rdi cmpq %r12, %rdi je 0x45e87 movq 0x10(%rsp), %rsi incq %rsi callq 0x186e0 testq %r15, %r15 jne 0x45eca movq 0x78(%rsp), %rdi testq %rdi, %rdi je 0x45e9b callq 0x32e06 movq 0x20(%r14), %rax cmpq 0x18(%r14), %rax jne 0x45d8d movl $0x10, %edi callq 0x18380 movq %rax, %r14 leaq 0x68df0(%rip), %rsi # 0xaecad movq %rax, %rdi callq 0x18280 jmp 0x45ff5 movq (%r14), %r12 movq 0x8(%r14), %r15 testq %r15, %r15 movq 0x80(%rsp), %r13 je 0x45ef5 movq 0x9b0b3(%rip), %rax # 0xe0f98 cmpb $0x0, (%rax) je 0x45ef0 incl 0x8(%r15) jmp 0x45ef5 lock incl 0x8(%r15) movq 0x20(%r14), %rbx subq 0x10(%r14), %rbx movl $0x48, %edi callq 0x186d0 leaq 0x9967a(%rip), %rdx # 0xdf588 addq $0x10, %rdx movq %rax, %rcx addq $0x10, %rcx leaq 0x99368(%rip), %rsi # 0xdf288 addq $0x10, %rsi movabsq $0x100000001, %rdi # imm = 0x100000001 movq %rdi, 0x8(%rax) movq %rdx, (%rax) movq %rsi, 0x10(%rax) movq %r12, 0x18(%rax) movq %r15, 0x20(%rax) testq %r15, %r15 je 0x45f5d movq 0x9b04b(%rip), %rdx # 0xe0f98 cmpb $0x0, (%rdx) je 0x45f58 incl 0x8(%r15) jmp 0x45f5d lock incl 0x8(%r15) leaq 0x99674(%rip), %rdx # 0xdf5d8 addq $0x10, %rdx movq %rbx, 0x28(%rax) movq %rdx, 0x10(%rax) movaps 0x40(%rsp), %xmm0 movups %xmm0, 0x30(%rax) movq 0x50(%rsp), %rdx movq %rdx, 0x40(%rax) xorps %xmm0, %xmm0 movaps %xmm0, 0x40(%rsp) movq $0x0, 0x50(%rsp) movq %rcx, (%r13) movq %rax, 0x8(%r13) testq %r15, %r15 je 0x45fa8 movq %r15, %rdi callq 0x32e06 movq 0x78(%rsp), %rdi testq %rdi, %rdi je 0x45fb7 callq 0x32e06 leaq 0x40(%rsp), %rdi callq 0x43d7c movq 0x68(%rsp), %rdi testq %rdi, %rdi je 0x45d38 callq 0x32e06 jmp 0x45d38 movl $0x10, %edi callq 0x18380 movq %rax, %r14 leaq 0x68c8b(%rip), %rsi # 0xaec78 movq %rax, %rdi callq 0x18280 movq 0x9aff4(%rip), %rsi # 0xe0ff0 movq 0x9af6d(%rip), %rdx # 0xe0f70 movq %r14, %rdi callq 0x18bb0 movl $0x10, %edi callq 0x18380 movq %rax, %r14 leaq 0x68c71(%rip), %rsi # 0xaec90 movq %rax, %rdi callq 0x18280 movq 0x9afc2(%rip), %rsi # 0xe0ff0 movq 0x9af3b(%rip), %rdx # 0xe0f70 movq %r14, %rdi callq 0x18bb0 jmp 0x46071 movl $0x10, %edi callq 0x18380 movq %rax, %r14 leaq 0x68bfa(%rip), %rsi # 0xaec4d movq %rax, %rdi callq 0x18280 movq 0x9af8e(%rip), %rsi # 0xe0ff0 movq 0x9af07(%rip), %rdx # 0xe0f70 movq %r14, %rdi callq 0x18bb0 movq %rax, %rbx testq %r15, %r15 je 0x46132 movq %r15, %rdi callq 0x32e06 jmp 0x46132 jmp 0x460be movq %rax, %rbx movq %r14, %rdi callq 0x18520 jmp 0x4616b movq %rax, %rbx movq (%rsp), %rdi cmpq %r12, %rdi je 0x4616b movq 0x10(%rsp), %rsi incq %rsi callq 0x186e0 jmp 0x4616b movq %rax, %rbx jmp 0x4616b movq %rax, %rbx movq (%rsp), %rdi cmpq %r12, %rdi je 0x4617a movq 0x10(%rsp), %rsi incq %rsi callq 0x186e0 jmp 0x4617a movq %rax, %rbx jmp 0x4617a jmp 0x4612f movq %rax, %rbx movq %r14, %rdi callq 0x18520 jmp 0x46132 jmp 0x46101 movq %rax, %rbx movq %r14, %rdi callq 0x18520 jmp 0x46161 jmp 0x4615e movq %rax, %rbx movq (%rsp), %rdi cmpq %r12, %rdi je 0x46161 movq 0x10(%rsp), %rsi incq %rsi callq 0x186e0 jmp 0x46161 jmp 0x4615e jmp 0x4612f movq %rax, %rbx movq 0x78(%rsp), %rdi testq %rdi, %rdi je 0x46161 callq 0x32e06 jmp 0x46161 movq %rax, %rbx movq (%rsp), %rdi cmpq %r12, %rdi je 0x46132 movq 0x10(%rsp), %rsi incq %rsi callq 0x186e0 jmp 0x46132 movq %rax, %rbx leaq 0x40(%rsp), %rdi callq 0x43d7c movq 0x68(%rsp), %rdi testq %rdi, %rdi je 0x4617a callq 0x32e06 movq %rbx, %rdi callq 0x18c10
_ZN5minja6Parser28parseBracedExpressionOrArrayEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 88h mov r14, rsi mov r13, rdi lea r12, [rsp+0B8h+var_A8] mov [r12-10h], r12 lea rsi, asc_B5A89+5; "(" lea rdx, asc_B5A89+6; "" mov rdi, rsp call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+0B8h+var_98] mov rdx, rsp mov rsi, r14 mov ecx, 1 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling) lea rax, [rsp+0B8h+var_88] mov rdi, [rax-10h]; void * mov rbx, [rax-8] cmp rdi, rax jz short loc_45C81 mov rsi, [rsp+0B8h+var_88] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_45C81: mov rdi, [rsp+0B8h+var_B8]; void * cmp rdi, r12 jz short loc_45C97 mov rsi, [rsp+0B8h+var_A8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_45C97: test rbx, rbx jz loc_45D30 lea rbx, [rsp+0B8h+var_58] mov rdi, rbx; this mov rsi, r14; bool mov edx, 1 call _ZN5minja6Parser15parseExpressionEb; minja::Parser::parseExpression(bool) cmp qword ptr [rbx], 0 jz loc_4603F mov rdi, rsp mov [rdi], r12 lea rsi, a09401910201912+51h; ")" lea rdx, a09401910201912+52h; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+0B8h+var_98] mov rdx, rsp mov rsi, r14 mov ecx, 1 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling) mov rdi, [rsp+0B8h+var_98]; void * mov rbx, [rsp+0B8h+var_90] lea rax, [rsp+0B8h+var_88] cmp rdi, rax jz short loc_45D0E mov rsi, [rsp+0B8h+var_88] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_45D0E: mov rdi, [rsp+0B8h+var_B8]; void * cmp rdi, r12 jz short loc_45D24 mov rsi, [rsp+0B8h+var_A8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_45D24: test rbx, rbx jz short loc_45D4D movaps xmm0, [rsp+0B8h+var_58] jmp short loc_45D33 loc_45D30: xorps xmm0, xmm0 loc_45D33: movups xmmword ptr [r13+0], xmm0 loc_45D38: mov rax, r13 add rsp, 88h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_45D4D: mov [rsp+0B8h+var_38], r13 xorps xmm0, xmm0 lea rdi, [rsp+0B8h+var_78] movaps xmmword ptr [rdi], xmm0 mov qword ptr [rdi+10h], 0 lea rsi, [rsp+0B8h+var_58] call _ZNSt6vectorISt10shared_ptrIN5minja10ExpressionEESaIS3_EE12emplace_backIJS3_EEERS3_DpOT_; std::vector<std::shared_ptr<minja::Expression>>::emplace_back<std::shared_ptr<minja::Expression>>(std::shared_ptr<minja::Expression> &&) mov rax, [r14+20h] cmp rax, [r14+18h] jz loc_45EA9 mov r13, rsp lea rbp, [rsp+0B8h+var_98] lea rbx, [rsp+0B8h+var_48] loc_45D8D: mov [rsp+0B8h+var_B8], r12 mov rdi, r13 lea rsi, asc_AEC76; "," lea rdx, asc_AEC76+1; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rdi, rbp mov rsi, r14 mov rdx, r13 mov ecx, 1 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling) mov rdi, [rsp+0B8h+var_98]; void * mov r15, [rsp+0B8h+var_90] lea rax, [rsp+0B8h+var_88] cmp rdi, rax jz short loc_45DDB mov rsi, [rsp+0B8h+var_88] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_45DDB: mov rdi, [rsp+0B8h+var_B8]; void * cmp rdi, r12 jz short loc_45DF1 mov rsi, [rsp+0B8h+var_A8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_45DF1: test r15, r15 jz loc_45FD9 mov rdi, rbx; this mov rsi, r14; bool mov edx, 1 call _ZN5minja6Parser15parseExpressionEb; minja::Parser::parseExpression(bool) cmp [rsp+0B8h+var_48], 0 jz loc_4600B lea rdi, [rsp+0B8h+var_78] mov rsi, rbx call _ZNSt6vectorISt10shared_ptrIN5minja10ExpressionEESaIS3_EE12emplace_backIJS3_EEERS3_DpOT_; std::vector<std::shared_ptr<minja::Expression>>::emplace_back<std::shared_ptr<minja::Expression>>(std::shared_ptr<minja::Expression> &&) mov [rsp+0B8h+var_B8], r12 mov rdi, r13 lea rsi, a09401910201912+51h; ")" lea rdx, a09401910201912+52h; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rdi, rbp mov rsi, r14 mov rdx, r13 mov ecx, 1 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling) mov rdi, [rsp+0B8h+var_98]; void * mov r15, [rsp+0B8h+var_90] lea rax, [rsp+0B8h+var_88] cmp rdi, rax jz short loc_45E71 mov rsi, [rsp+0B8h+var_88] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_45E71: mov rdi, [rsp+0B8h+var_B8]; void * cmp rdi, r12 jz short loc_45E87 mov rsi, [rsp+0B8h+var_A8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_45E87: test r15, r15 jnz short loc_45ECA mov rdi, [rsp+0B8h+var_40] test rdi, rdi jz short loc_45E9B call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_45E9B: mov rax, [r14+20h] cmp rax, [r14+18h] jnz loc_45D8D loc_45EA9: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aExpectedClosin_3; "Expected closing parenthesis" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp loc_45FF5 loc_45ECA: mov r12, [r14] mov r15, [r14+8] test r15, r15 mov r13, [rsp+0B8h+var_38] jz short loc_45EF5 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_45EF0 inc dword ptr [r15+8] jmp short loc_45EF5 loc_45EF0: lock inc dword ptr [r15+8] loc_45EF5: mov rbx, [r14+20h] sub rbx, [r14+10h] mov edi, 48h ; 'H'; unsigned __int64 call __Znwm; operator new(ulong) lea rdx, _ZTVSt23_Sp_counted_ptr_inplaceIN5minja9ArrayExprESaIS1_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<minja::ArrayExpr,std::allocator<minja::ArrayExpr>,(__gnu_cxx::_Lock_policy)2> add rdx, 10h mov rcx, rax add rcx, 10h lea rsi, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression add rsi, 10h mov rdi, 100000001h mov [rax+8], rdi mov [rax], rdx mov [rax+10h], rsi mov [rax+18h], r12 mov [rax+20h], r15 test r15, r15 jz short loc_45F5D mov rdx, cs:__libc_single_threaded_ptr cmp byte ptr [rdx], 0 jz short loc_45F58 inc dword ptr [r15+8] jmp short loc_45F5D loc_45F58: lock inc dword ptr [r15+8] loc_45F5D: lea rdx, _ZTVN5minja9ArrayExprE; `vtable for'minja::ArrayExpr add rdx, 10h mov [rax+28h], rbx mov [rax+10h], rdx movaps xmm0, [rsp+0B8h+var_78] movups xmmword ptr [rax+30h], xmm0 mov rdx, [rsp+0B8h+var_68] mov [rax+40h], rdx xorps xmm0, xmm0 movaps [rsp+0B8h+var_78], xmm0 mov [rsp+0B8h+var_68], 0 mov [r13+0], rcx mov [r13+8], rax test r15, r15 jz short loc_45FA8 mov rdi, r15 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_45FA8: mov rdi, [rsp+0B8h+var_40] test rdi, rdi jz short loc_45FB7 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_45FB7: lea rdi, [rsp+0B8h+var_78] call _ZNSt6vectorISt10shared_ptrIN5minja10ExpressionEESaIS3_EED2Ev; std::vector<std::shared_ptr<minja::Expression>>::~vector() mov rdi, qword ptr [rsp+0B8h+var_58+8] test rdi, rdi jz loc_45D38 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) jmp loc_45D38 loc_45FD9: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aExpectedCommaI; "Expected comma in tuple" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) loc_45FF5: mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r14; void * call ___cxa_throw loc_4600B: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aExpectedExpres_3; "Expected expression in tuple" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp short loc_46071 loc_4603F: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aExpectedExpres_4; "Expected expression in braced expressio"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r14; void * call ___cxa_throw loc_46071: mov rbx, rax test r15, r15 jz loc_46132 mov rdi, r15 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) jmp loc_46132 jmp short loc_460BE mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp loc_4616B mov rbx, rax mov rdi, [rsp+0B8h+var_B8]; void * cmp rdi, r12 jz loc_4616B mov rsi, [rsp+0B8h+var_A8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp loc_4616B loc_460BE: mov rbx, rax jmp loc_4616B mov rbx, rax mov rdi, [rsp+0B8h+var_B8]; void * cmp rdi, r12 jz loc_4617A mov rsi, [rsp+0B8h+var_A8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp loc_4617A mov rbx, rax jmp loc_4617A jmp short loc_4612F mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_46132 jmp short $+2 loc_46101: mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_46161 jmp short loc_4615E mov rbx, rax mov rdi, [rsp+0B8h+var_B8]; void * cmp rdi, r12 jz short loc_46161 mov rsi, [rsp+0B8h+var_A8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_46161 jmp short loc_4615E jmp short $+2 loc_4612F: mov rbx, rax loc_46132: mov rdi, [rsp+0B8h+var_40] test rdi, rdi jz short loc_46161 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) jmp short loc_46161 mov rbx, rax mov rdi, [rsp+0B8h+var_B8]; void * cmp rdi, r12 jz short loc_46132 mov rsi, [rsp+0B8h+var_A8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_46132 loc_4615E: mov rbx, rax loc_46161: lea rdi, [rsp+0B8h+var_78] call _ZNSt6vectorISt10shared_ptrIN5minja10ExpressionEESaIS3_EED2Ev; std::vector<std::shared_ptr<minja::Expression>>::~vector() loc_4616B: mov rdi, qword ptr [rsp+0B8h+var_58+8] test rdi, rdi jz short loc_4617A call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_4617A: mov rdi, rbx call __Unwind_Resume
minja::Parser * minja::Parser::parseBracedExpressionOrArray(minja::Parser *this, long long *a2) { minja::Parser *v2; // r13 long long v3; // rbx long long v4; // rbx __int128 v5; // xmm0 long long v7; // r15 long long v8; // r15 std::runtime_error *v9; // r14 long long v10; // r12 volatile signed __int32 *v11; // r15 long long v12; // rbx long long v13; // rax std::runtime_error *v14; // r14 std::runtime_error *exception; // r14 void *v16[2]; // [rsp+0h] [rbp-B8h] BYREF _QWORD v17[2]; // [rsp+10h] [rbp-A8h] BYREF void *v18; // [rsp+20h] [rbp-98h] BYREF long long v19; // [rsp+28h] [rbp-90h] _QWORD v20[2]; // [rsp+30h] [rbp-88h] BYREF __int128 v21; // [rsp+40h] [rbp-78h] BYREF long long v22; // [rsp+50h] [rbp-68h] __int128 v23; // [rsp+60h] [rbp-58h] BYREF __int128 v24; // [rsp+70h] [rbp-48h] BYREF minja::Parser *v25; // [rsp+80h] [rbp-38h] v2 = this; v16[0] = v17; std::string::_M_construct<char const*>((long long)v16, "(", (long long)""); minja::Parser::consumeToken(&v18, (long long)a2, (_BYTE **)v16, 1u); v3 = v19; if ( v18 != v20 ) operator delete(v18, v20[0] + 1LL); if ( v16[0] != v17 ) operator delete(v16[0], v17[0] + 1LL); if ( !v3 ) { v5 = 0LL; goto LABEL_14; } minja::Parser::parseExpression((minja::Parser *)&v23, a2, 1); if ( !(_QWORD)v23 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected expression in braced expression"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v16[0] = v17; std::string::_M_construct<char const*>((long long)v16, ")", (long long)""); minja::Parser::consumeToken(&v18, (long long)a2, (_BYTE **)v16, 1u); v4 = v19; if ( v18 != v20 ) operator delete(v18, v20[0] + 1LL); if ( v16[0] != v17 ) operator delete(v16[0], v17[0] + 1LL); if ( v4 ) { v5 = v23; LABEL_14: *(_OWORD *)this = v5; return v2; } v25 = this; v21 = 0LL; v22 = 0LL; std::vector<std::shared_ptr<minja::Expression>>::emplace_back<std::shared_ptr<minja::Expression>>((long long)&v21, &v23); if ( a2[4] == a2[3] ) { LABEL_31: v9 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(v9, "Expected closing parenthesis"); goto LABEL_47; } while ( 1 ) { v16[0] = v17; std::string::_M_construct<char const*>((long long)v16, ",", (long long)""); minja::Parser::consumeToken(&v18, (long long)a2, (_BYTE **)v16, 1u); v7 = v19; if ( v18 != v20 ) operator delete(v18, v20[0] + 1LL); if ( v16[0] != v17 ) operator delete(v16[0], v17[0] + 1LL); if ( !v7 ) { v9 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(v9, "Expected comma in tuple"); LABEL_47: __cxa_throw( v9, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Parser::parseExpression((minja::Parser *)&v24, a2, 1); if ( !(_QWORD)v24 ) { v14 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(v14, "Expected expression in tuple"); __cxa_throw( v14, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } std::vector<std::shared_ptr<minja::Expression>>::emplace_back<std::shared_ptr<minja::Expression>>( (long long)&v21, &v24); v16[0] = v17; std::string::_M_construct<char const*>((long long)v16, ")", (long long)""); minja::Parser::consumeToken(&v18, (long long)a2, (_BYTE **)v16, 1u); v8 = v19; if ( v18 != v20 ) operator delete(v18, v20[0] + 1LL); if ( v16[0] != v17 ) operator delete(v16[0], v17[0] + 1LL); if ( v8 ) break; if ( *((_QWORD *)&v24 + 1) ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v24 + 1)); if ( a2[4] == a2[3] ) goto LABEL_31; } v10 = *a2; v11 = (volatile signed __int32 *)a2[1]; v2 = v25; if ( v11 ) { if ( _libc_single_threaded ) ++*((_DWORD *)v11 + 2); else _InterlockedIncrement(v11 + 2); } v12 = a2[4] - a2[2]; v13 = operator new(0x48uLL); *(_QWORD *)(v13 + 8) = 0x100000001LL; *(_QWORD *)v13 = &`vtable for'std::_Sp_counted_ptr_inplace<minja::ArrayExpr,std::allocator<minja::ArrayExpr>,(__gnu_cxx::_Lock_policy)2> + 2; *(_QWORD *)(v13 + 16) = &`vtable for'minja::Expression + 2; *(_QWORD *)(v13 + 24) = v10; *(_QWORD *)(v13 + 32) = v11; if ( v11 ) { if ( _libc_single_threaded ) ++*((_DWORD *)v11 + 2); else _InterlockedIncrement(v11 + 2); } *(_QWORD *)(v13 + 40) = v12; *(_QWORD *)(v13 + 16) = &`vtable for'minja::ArrayExpr + 2; *(_OWORD *)(v13 + 48) = v21; *(_QWORD *)(v13 + 64) = v22; v21 = 0LL; v22 = 0LL; *(_QWORD *)v2 = v13 + 16; *((_QWORD *)v2 + 1) = v13; if ( v11 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v11); if ( *((_QWORD *)&v24 + 1) ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v24 + 1)); std::vector<std::shared_ptr<minja::Expression>>::~vector((long long)&v21); if ( *((_QWORD *)&v23 + 1) ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v23 + 1)); return v2; }
parseBracedExpressionOrArray: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x88 MOV R14,RSI MOV R13,RDI LEA R12,[RSP + 0x10] MOV qword ptr [R12 + -0x10],R12 LAB_00145c37: LEA RSI,[0x1b5a8e] LEA RDX,[0x1b5a8f] MOV RDI,RSP CALL 0x001200f4 LAB_00145c4d: LEA RDI,[RSP + 0x20] MOV RDX,RSP MOV RSI,R14 MOV ECX,0x1 CALL 0x0013382c LAB_00145c62: LEA RAX,[RSP + 0x30] MOV RDI,qword ptr [RAX + -0x10] MOV RBX,qword ptr [RAX + -0x8] CMP RDI,RAX JZ 0x00145c81 MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x001186e0 LAB_00145c81: MOV RDI,qword ptr [RSP] CMP RDI,R12 JZ 0x00145c97 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x001186e0 LAB_00145c97: TEST RBX,RBX JZ 0x00145d30 LEA RBX,[RSP + 0x60] MOV RDI,RBX MOV RSI,R14 MOV EDX,0x1 CALL 0x001330f8 CMP qword ptr [RBX],0x0 JZ 0x0014603f MOV RDI,RSP MOV qword ptr [RDI],R12 LAB_00145cc5: LEA RSI,[0x1b576f] LEA RDX,[0x1b5770] CALL 0x001200f4 LAB_00145cd8: LEA RDI,[RSP + 0x20] MOV RDX,RSP MOV RSI,R14 MOV ECX,0x1 CALL 0x0013382c MOV RDI,qword ptr [RSP + 0x20] MOV RBX,qword ptr [RSP + 0x28] LEA RAX,[RSP + 0x30] CMP RDI,RAX JZ 0x00145d0e MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x001186e0 LAB_00145d0e: MOV RDI,qword ptr [RSP] CMP RDI,R12 JZ 0x00145d24 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x001186e0 LAB_00145d24: TEST RBX,RBX JZ 0x00145d4d MOVAPS XMM0,xmmword ptr [RSP + 0x60] JMP 0x00145d33 LAB_00145d30: XORPS XMM0,XMM0 LAB_00145d33: MOVUPS xmmword ptr [R13],XMM0 LAB_00145d38: MOV RAX,R13 ADD RSP,0x88 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00145d4d: MOV qword ptr [RSP + 0x80],R13 XORPS XMM0,XMM0 LEA RDI,[RSP + 0x40] MOVAPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x10],0x0 LAB_00145d68: LEA RSI,[RSP + 0x60] CALL 0x00143d38 MOV RAX,qword ptr [R14 + 0x20] CMP RAX,qword ptr [R14 + 0x18] JZ 0x00145ea9 MOV R13,RSP LEA RBP,[RSP + 0x20] LEA RBX,[RSP + 0x70] LAB_00145d8d: MOV qword ptr [RSP],R12 LAB_00145d91: MOV RDI,R13 LEA RSI,[0x1aec76] LEA RDX,[0x1aec77] CALL 0x001200f4 LAB_00145da7: MOV RDI,RBP MOV RSI,R14 MOV RDX,R13 MOV ECX,0x1 CALL 0x0013382c MOV RDI,qword ptr [RSP + 0x20] MOV R15,qword ptr [RSP + 0x28] LEA RAX,[RSP + 0x30] CMP RDI,RAX JZ 0x00145ddb MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x001186e0 LAB_00145ddb: MOV RDI,qword ptr [RSP] CMP RDI,R12 JZ 0x00145df1 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x001186e0 LAB_00145df1: TEST R15,R15 JZ 0x00145fd9 LAB_00145dfa: MOV RDI,RBX MOV RSI,R14 MOV EDX,0x1 CALL 0x001330f8 CMP qword ptr [RSP + 0x70],0x0 JZ 0x0014600b LAB_00145e16: LEA RDI,[RSP + 0x40] MOV RSI,RBX CALL 0x00143d38 MOV qword ptr [RSP],R12 LAB_00145e27: MOV RDI,R13 LEA RSI,[0x1b576f] LEA RDX,[0x1b5770] CALL 0x001200f4 LAB_00145e3d: MOV RDI,RBP MOV RSI,R14 MOV RDX,R13 MOV ECX,0x1 CALL 0x0013382c LAB_00145e50: MOV RDI,qword ptr [RSP + 0x20] MOV R15,qword ptr [RSP + 0x28] LEA RAX,[RSP + 0x30] CMP RDI,RAX JZ 0x00145e71 MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x001186e0 LAB_00145e71: MOV RDI,qword ptr [RSP] CMP RDI,R12 JZ 0x00145e87 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x001186e0 LAB_00145e87: TEST R15,R15 JNZ 0x00145eca MOV RDI,qword ptr [RSP + 0x78] TEST RDI,RDI JZ 0x00145e9b CALL 0x00132e06 LAB_00145e9b: MOV RAX,qword ptr [R14 + 0x20] CMP RAX,qword ptr [R14 + 0x18] JNZ 0x00145d8d LAB_00145ea9: MOV EDI,0x10 CALL 0x00118380 MOV R14,RAX LAB_00145eb6: LEA RSI,[0x1aecad] MOV RDI,RAX CALL 0x00118280 JMP 0x00145ff5 LAB_00145eca: MOV R12,qword ptr [R14] MOV R15,qword ptr [R14 + 0x8] TEST R15,R15 MOV R13,qword ptr [RSP + 0x80] JZ 0x00145ef5 MOV RAX,qword ptr [0x001e0f98] CMP byte ptr [RAX],0x0 JZ 0x00145ef0 INC dword ptr [R15 + 0x8] JMP 0x00145ef5 LAB_00145ef0: INC.LOCK dword ptr [R15 + 0x8] LAB_00145ef5: MOV RBX,qword ptr [R14 + 0x20] SUB RBX,qword ptr [R14 + 0x10] LAB_00145efd: MOV EDI,0x48 CALL 0x001186d0 LAB_00145f07: LEA RDX,[0x1df588] ADD RDX,0x10 MOV RCX,RAX ADD RCX,0x10 LEA RSI,[0x1df288] ADD RSI,0x10 MOV RDI,0x100000001 MOV qword ptr [RAX + 0x8],RDI MOV qword ptr [RAX],RDX MOV qword ptr [RAX + 0x10],RSI MOV qword ptr [RAX + 0x18],R12 MOV qword ptr [RAX + 0x20],R15 TEST R15,R15 JZ 0x00145f5d MOV RDX,qword ptr [0x001e0f98] CMP byte ptr [RDX],0x0 JZ 0x00145f58 INC dword ptr [R15 + 0x8] JMP 0x00145f5d LAB_00145f58: INC.LOCK dword ptr [R15 + 0x8] LAB_00145f5d: LEA RDX,[0x1df5d8] ADD RDX,0x10 MOV qword ptr [RAX + 0x28],RBX MOV qword ptr [RAX + 0x10],RDX MOVAPS XMM0,xmmword ptr [RSP + 0x40] MOVUPS xmmword ptr [RAX + 0x30],XMM0 MOV RDX,qword ptr [RSP + 0x50] MOV qword ptr [RAX + 0x40],RDX XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOV qword ptr [RSP + 0x50],0x0 MOV qword ptr [R13],RCX MOV qword ptr [R13 + 0x8],RAX TEST R15,R15 JZ 0x00145fa8 MOV RDI,R15 CALL 0x00132e06 LAB_00145fa8: MOV RDI,qword ptr [RSP + 0x78] TEST RDI,RDI JZ 0x00145fb7 CALL 0x00132e06 LAB_00145fb7: LEA RDI,[RSP + 0x40] CALL 0x00143d7c MOV RDI,qword ptr [RSP + 0x68] TEST RDI,RDI JZ 0x00145d38 CALL 0x00132e06 JMP 0x00145d38 LAB_00145fd9: MOV EDI,0x10 CALL 0x00118380 MOV R14,RAX LAB_00145fe6: LEA RSI,[0x1aec78] MOV RDI,RAX CALL 0x00118280 LAB_00145ff5: MOV RSI,qword ptr [0x001e0ff0] MOV RDX,qword ptr [0x001e0f70] MOV RDI,R14 CALL 0x00118bb0 LAB_0014600b: MOV EDI,0x10 CALL 0x00118380 MOV R14,RAX LAB_00146018: LEA RSI,[0x1aec90] MOV RDI,RAX CALL 0x00118280 LAB_00146027: MOV RSI,qword ptr [0x001e0ff0] MOV RDX,qword ptr [0x001e0f70] MOV RDI,R14 CALL 0x00118bb0 LAB_0014603f: MOV EDI,0x10 CALL 0x00118380 MOV R14,RAX LAB_0014604c: LEA RSI,[0x1aec4d] MOV RDI,RAX CALL 0x00118280 LAB_0014605b: MOV RSI,qword ptr [0x001e0ff0] MOV RDX,qword ptr [0x001e0f70] MOV RDI,R14 CALL 0x00118bb0
/* minja::Parser::parseBracedExpressionOrArray() */ int8 * minja::Parser::parseBracedExpressionOrArray(void) { int8 uVar1; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *this; long lVar2; long lVar3; runtime_error *prVar4; int8 *puVar5; int8 *in_RSI; int8 *in_RDI; long *local_b8 [2]; long local_a8 [2]; long *local_98; long local_90; long local_88 [2]; int8 local_78; int8 uStack_70; int8 local_68; int4 local_58; int4 uStack_54; int4 uStack_50; int4 uStack_4c; long local_48; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40; int8 *local_38; local_b8[0] = local_a8; /* try { // try from 00145c37 to 00145c4c has its CatchHandler @ 001460e8 */ std::__cxx11::string::_M_construct<char_const*>(local_b8,&DAT_001b5a8e,&DAT_001b5a8f); /* try { // try from 00145c4d to 00145c61 has its CatchHandler @ 001460c6 */ consumeToken(&local_98); lVar2 = local_90; if (local_98 != local_88) { operator_delete(local_98,local_88[0] + 1); } if (local_b8[0] != local_a8) { operator_delete(local_b8[0],local_a8[0] + 1); } if (lVar2 == 0) { local_58 = 0; uStack_54 = 0; uStack_50 = 0; uStack_4c = 0; } else { parseExpression(SUB81(&local_58,0)); if (CONCAT44(uStack_54,local_58) == 0) { prVar4 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0014604c to 0014605a has its CatchHandler @ 0014608c */ std::runtime_error::runtime_error(prVar4,"Expected expression in braced expression"); /* try { // try from 0014605b to 00146070 has its CatchHandler @ 0014608a */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar4,PTR_typeinfo_001e0ff0,PTR__runtime_error_001e0f70); } local_b8[0] = local_a8; /* try { // try from 00145cc5 to 00145cd7 has its CatchHandler @ 001460be */ std::__cxx11::string::_M_construct<char_const*>(local_b8,&DAT_001b576f,&DAT_001b5770); /* try { // try from 00145cd8 to 00145cec has its CatchHandler @ 0014609c */ consumeToken(&local_98); lVar2 = local_90; if (local_98 != local_88) { operator_delete(local_98,local_88[0] + 1); } if (local_b8[0] != local_a8) { operator_delete(local_b8[0],local_a8[0] + 1); } if (lVar2 == 0) { local_78 = 0; uStack_70 = 0; local_68 = 0; /* try { // try from 00145d68 to 00145d71 has its CatchHandler @ 0014615e */ local_38 = in_RDI; std:: vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>> ::emplace_back<std::shared_ptr<minja::Expression>> ((vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>> *)&local_78,(shared_ptr *)&local_58); if (in_RSI[4] != in_RSI[3]) { do { local_b8[0] = local_a8; /* try { // try from 00145d91 to 00145da6 has its CatchHandler @ 0014610e */ std::__cxx11::string::_M_construct<char_const*>(local_b8,&DAT_001aec76,&DAT_001aec77); /* try { // try from 00145da7 to 00145db9 has its CatchHandler @ 00146110 */ consumeToken(&local_98); lVar2 = local_90; if (local_98 != local_88) { operator_delete(local_98,local_88[0] + 1); } if (local_b8[0] != local_a8) { operator_delete(local_b8[0],local_a8[0] + 1); } if (lVar2 == 0) { prVar4 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00145fe6 to 00145ff4 has its CatchHandler @ 001460ff */ std::runtime_error::runtime_error(prVar4,"Expected comma in tuple"); goto LAB_00145ff5; } /* try { // try from 00145dfa to 00145e09 has its CatchHandler @ 0014612b */ parseExpression(SUB81((shared_ptr *)&local_48,0)); if (local_48 == 0) { prVar4 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00146018 to 00146026 has its CatchHandler @ 001460f2 */ std::runtime_error::runtime_error(prVar4,"Expected expression in tuple"); /* try { // try from 00146027 to 0014603c has its CatchHandler @ 001460f0 */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar4,PTR_typeinfo_001e0ff0,PTR__runtime_error_001e0f70); } /* try { // try from 00145e16 to 00145e22 has its CatchHandler @ 0014612d */ std:: vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>> ::emplace_back<std::shared_ptr<minja::Expression>> ((vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>> *)&local_78,(shared_ptr *)&local_48); local_b8[0] = local_a8; /* try { // try from 00145e27 to 00145e3c has its CatchHandler @ 0014612f */ std::__cxx11::string::_M_construct<char_const*>(local_b8,&DAT_001b576f,&DAT_001b5770); /* try { // try from 00145e3d to 00145e4f has its CatchHandler @ 00146143 */ consumeToken(&local_98); lVar2 = local_90; if (local_98 != local_88) { operator_delete(local_98,local_88[0] + 1); } if (local_b8[0] != local_a8) { operator_delete(local_b8[0],local_a8[0] + 1); } if (lVar2 != 0) { uVar1 = *in_RSI; this = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1]; if (this != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_001e0f98 == '\0') { LOCK(); *(int *)(this + 8) = *(int *)(this + 8) + 1; UNLOCK(); } else { *(int *)(this + 8) = *(int *)(this + 8) + 1; } } lVar2 = in_RSI[4]; lVar3 = in_RSI[2]; /* try { // try from 00145efd to 00145f06 has its CatchHandler @ 00146071 */ puVar5 = (int8 *)operator_new(0x48); puVar5[1] = 0x100000001; *puVar5 = &PTR___Sp_counted_ptr_inplace_001df598; puVar5[2] = &PTR___cxa_pure_virtual_001df298; puVar5[3] = uVar1; puVar5[4] = this; if (this != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_001e0f98 == '\0') { LOCK(); *(int *)(this + 8) = *(int *)(this + 8) + 1; UNLOCK(); } else { *(int *)(this + 8) = *(int *)(this + 8) + 1; } } puVar5[5] = lVar2 - lVar3; puVar5[2] = &PTR_do_evaluate_001df5e8; puVar5[6] = local_78; puVar5[7] = uStack_70; puVar5[8] = local_68; local_78 = 0; uStack_70 = 0; local_68 = 0; *local_38 = puVar5 + 2; local_38[1] = puVar5; if (this != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(this); } if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40); } std:: vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>> ::~vector((vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>> *)&local_78); if ((_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)CONCAT44(uStack_4c,uStack_50) == (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { return local_38; } std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release ((_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)CONCAT44(uStack_4c,uStack_50) ); return local_38; } if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40); } } while (in_RSI[4] != in_RSI[3]); } prVar4 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00145eb6 to 00145ec4 has its CatchHandler @ 00146101 */ std::runtime_error::runtime_error(prVar4,"Expected closing parenthesis"); LAB_00145ff5: /* try { // try from 00145ff5 to 0014600a has its CatchHandler @ 0014615e */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar4,PTR_typeinfo_001e0ff0,PTR__runtime_error_001e0f70); } } *(int4 *)in_RDI = local_58; *(int4 *)((long)in_RDI + 4) = uStack_54; *(int4 *)(in_RDI + 1) = uStack_50; *(int4 *)((long)in_RDI + 0xc) = uStack_4c; return in_RDI; }
28,707
LefDefParser::lefiDensity::lefiDensity()
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiMacro.cpp
lefiDensity::lefiDensity() : numLayers_(0), layersAllocated_(0), layerName_(NULL), numRects_(NULL), rectsAllocated_(NULL), rects_(NULL), densityValue_(NULL) { Init(); }
O0
cpp
LefDefParser::lefiDensity::lefiDensity(): pushq %rax movq %rdi, (%rsp) movq (%rsp), %rdi movl $0x0, (%rdi) movl $0x0, 0x4(%rdi) movq $0x0, 0x8(%rdi) movq $0x0, 0x10(%rdi) movq $0x0, 0x18(%rdi) movq $0x0, 0x20(%rdi) movq $0x0, 0x28(%rdi) callq 0x59500 popq %rax retq nopw %cs:(%rax,%rax)
_ZN12LefDefParser11lefiDensityC2Ev: push rax mov [rsp+8+var_8], rdi mov rdi, [rsp+8+var_8]; this mov dword ptr [rdi], 0 mov dword ptr [rdi+4], 0 mov qword ptr [rdi+8], 0 mov qword ptr [rdi+10h], 0 mov qword ptr [rdi+18h], 0 mov qword ptr [rdi+20h], 0 mov qword ptr [rdi+28h], 0 call _ZN12LefDefParser11lefiDensity4InitEv; LefDefParser::lefiDensity::Init(void) pop rax retn
LefDefParser::lefiDensity * LefDefParser::lefiDensity::lefiDensity(LefDefParser::lefiDensity *this) { *(_DWORD *)this = 0; *((_DWORD *)this + 1) = 0; *((_QWORD *)this + 1) = 0LL; *((_QWORD *)this + 2) = 0LL; *((_QWORD *)this + 3) = 0LL; *((_QWORD *)this + 4) = 0LL; *((_QWORD *)this + 5) = 0LL; LefDefParser::lefiDensity::Init(this); return this; }
lefiDensity: PUSH RAX MOV qword ptr [RSP],RDI MOV RDI,qword ptr [RSP] MOV dword ptr [RDI],0x0 MOV dword ptr [RDI + 0x4],0x0 MOV qword ptr [RDI + 0x8],0x0 MOV qword ptr [RDI + 0x10],0x0 MOV qword ptr [RDI + 0x18],0x0 MOV qword ptr [RDI + 0x20],0x0 MOV qword ptr [RDI + 0x28],0x0 CALL 0x00159500 POP RAX RET
/* LefDefParser::lefiDensity::lefiDensity() */ lefiDensity * __thiscall LefDefParser::lefiDensity::lefiDensity(lefiDensity *this) { *(int4 *)this = 0; *(int4 *)(this + 4) = 0; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; Init(this); return this; }
28,708
ftxui::(anonymous namespace)::InputBase::Text(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/component/input.cpp
Element Text(const std::string& input) { if (!password()) { return text(input); } std::string out; out.reserve(10 + input.size() * 3 / 2); for (size_t i = 0; i < input.size(); ++i) { out += "•"; } return text(out); }
O3
cpp
ftxui::(anonymous namespace)::InputBase::Text(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rdx, %r14 movq %rdi, %rbx leaq 0x98(%rsi), %rdi callq 0x2c650 cmpb $0x0, (%rax) je 0x2b6ca leaq 0x18(%rsp), %r13 movq %r13, -0x10(%r13) movq $0x0, -0x8(%r13) movb $0x0, (%r13) movq 0x8(%r14), %rax leaq (%rax,%rax,2), %rsi shrq %rsi addq $0xa, %rsi leaq 0x8(%rsp), %rdi callq 0xb6a0 cmpq $0x0, 0x8(%r14) je 0x2b675 xorl %ebp, %ebp leaq 0x13203(%rip), %r15 # 0x3e85f leaq 0x8(%rsp), %r12 movq %r12, %rdi movq %r15, %rsi callq 0xb7f0 incq %rbp cmpq 0x8(%r14), %rbp jb 0x2b661 leaq 0x38(%rsp), %r14 movq %r14, -0x10(%r14) movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx addq %rsi, %rdx leaq 0x28(%rsp), %rdi callq 0x11be0 leaq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0x24fc0 movq 0x28(%rsp), %rdi cmpq %r14, %rdi je 0x2b6b9 movq 0x38(%rsp), %rsi incq %rsi callq 0xb400 movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x2b70c movq 0x18(%rsp), %rsi jmp 0x2b704 leaq 0x58(%rsp), %r15 movq %r15, -0x10(%r15) movq (%r14), %rsi movq 0x8(%r14), %rdx addq %rsi, %rdx leaq 0x48(%rsp), %r14 movq %r14, %rdi callq 0x11be0 movq %rbx, %rdi movq %r14, %rsi callq 0x24fc0 movq 0x48(%rsp), %rdi cmpq %r15, %rdi je 0x2b70c movq 0x58(%rsp), %rsi incq %rsi callq 0xb400 addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0x28(%rsp), %rdi cmpq %r14, %rdi je 0x2b750 movq 0x38(%rsp), %rsi incq %rsi callq 0xb400 jmp 0x2b750 movq %rax, %rbx movq 0x48(%rsp), %rdi cmpq %r15, %rdi je 0x2b767 movq 0x58(%rsp), %rsi jmp 0x2b75f jmp 0x2b74d movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x2b767 movq 0x18(%rsp), %rsi incq %rsi callq 0xb400 movq %rbx, %rdi callq 0xb780 nop
_ZN5ftxui12_GLOBAL__N_19InputBase4TextERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov r14, rdx mov rbx, rdi lea rdi, [rsi+98h] call _ZN5ftxui3RefIbE7AddressEv; ftxui::Ref<bool>::Address(void) cmp byte ptr [rax], 0 jz loc_2B6CA lea r13, [rsp+98h+var_80] mov [r13-10h], r13 mov qword ptr [r13-8], 0 mov byte ptr [r13+0], 0 mov rax, [r14+8] lea rsi, [rax+rax*2] shr rsi, 1 add rsi, 0Ah lea rdi, [rsp+98h+var_90] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) cmp qword ptr [r14+8], 0 jz short loc_2B675 xor ebp, ebp lea r15, unk_3E85F lea r12, [rsp+98h+var_90] loc_2B661: mov rdi, r12 mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) inc rbp cmp rbp, [r14+8] jb short loc_2B661 loc_2B675: lea r14, [rsp+98h+var_60] mov [r14-10h], r14 mov rsi, [rsp+98h+var_90] mov rdx, [rsp+98h+var_88] add rdx, rsi lea rdi, [rsp+98h+var_70] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rsi, [rsp+98h+var_70] mov rdi, rbx call _ZN5ftxui4textENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; ftxui::text(std::string) mov rdi, [rsp+98h+var_70]; void * cmp rdi, r14 jz short loc_2B6B9 mov rsi, [rsp+98h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2B6B9: mov rdi, [rsp+98h+var_90] cmp rdi, r13 jz short loc_2B70C mov rsi, [rsp+98h+var_80] jmp short loc_2B704 loc_2B6CA: lea r15, [rsp+98h+var_40] mov [r15-10h], r15 mov rsi, [r14] mov rdx, [r14+8] add rdx, rsi lea r14, [rsp+98h+var_50] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov rdi, rbx mov rsi, r14 call _ZN5ftxui4textENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; ftxui::text(std::string) mov rdi, [rsp+98h+var_50]; void * cmp rdi, r15 jz short loc_2B70C mov rsi, [rsp+98h+var_40] loc_2B704: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2B70C: add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, [rsp+arg_20]; void * cmp rdi, r14 jz short loc_2B750 mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_2B750 mov rbx, rax mov rdi, [rsp+arg_40] cmp rdi, r15 jz short loc_2B767 mov rsi, [rsp+arg_50] jmp short loc_2B75F jmp short $+2 loc_2B74D: mov rbx, rax loc_2B750: mov rdi, [rsp+arg_0]; void * cmp rdi, r13 jz short loc_2B767 mov rsi, [rsp+arg_10] loc_2B75F: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2B767: mov rdi, rbx call __Unwind_Resume
void ftxui::`anonymous namespace'::InputBase::Text(ftxui::Node **a1, long long a2, long long a3) { unsigned long long v4; // rbp _BYTE *v5; // rdi long long v6; // rsi _BYTE *v7; // [rsp+8h] [rbp-90h] BYREF long long v8; // [rsp+10h] [rbp-88h] _QWORD v9[2]; // [rsp+18h] [rbp-80h] BYREF void *v10[2]; // [rsp+28h] [rbp-70h] BYREF _QWORD v11[2]; // [rsp+38h] [rbp-60h] BYREF void *v12[2]; // [rsp+48h] [rbp-50h] BYREF _QWORD v13[8]; // [rsp+58h] [rbp-40h] BYREF if ( !*(_BYTE *)ftxui::Ref<bool>::Address(a2 + 152) ) { v12[0] = v13; std::string::_M_construct<char *>((long long)v12, *(_BYTE **)a3, *(_QWORD *)a3 + *(_QWORD *)(a3 + 8)); ftxui::text(a1, (long long)v12); v5 = v12[0]; if ( v12[0] == v13 ) return; v6 = v13[0]; goto LABEL_11; } v7 = v9; v8 = 0LL; LOBYTE(v9[0]) = 0; std::string::reserve(&v7, ((unsigned long long)(3LL * *(_QWORD *)(a3 + 8)) >> 1) + 10); if ( *(_QWORD *)(a3 + 8) ) { v4 = 0LL; do { std::string::append(&v7, &unk_3E85F); ++v4; } while ( v4 < *(_QWORD *)(a3 + 8) ); } v10[0] = v11; std::string::_M_construct<char *>((long long)v10, v7, (long long)&v7[v8]); ftxui::text(a1, (long long)v10); if ( v10[0] != v11 ) operator delete(v10[0], v11[0] + 1LL); v5 = v7; if ( v7 != (_BYTE *)v9 ) { v6 = v9[0]; LABEL_11: operator delete(v5, v6 + 1); } }
Text: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R14,RDX MOV RBX,RDI LEA RDI,[RSI + 0x98] CALL 0x0012c650 CMP byte ptr [RAX],0x0 JZ 0x0012b6ca LEA R13,[RSP + 0x18] MOV qword ptr [R13 + -0x10],R13 MOV qword ptr [R13 + -0x8],0x0 MOV byte ptr [R13],0x0 MOV RAX,qword ptr [R14 + 0x8] LEA RSI,[RAX + RAX*0x2] SHR RSI,0x1 ADD RSI,0xa LAB_0012b642: LEA RDI,[RSP + 0x8] CALL 0x0010b6a0 CMP qword ptr [R14 + 0x8],0x0 JZ 0x0012b675 XOR EBP,EBP LEA R15,[0x13e85f] LEA R12,[RSP + 0x8] LAB_0012b661: MOV RDI,R12 MOV RSI,R15 CALL 0x0010b7f0 INC RBP CMP RBP,qword ptr [R14 + 0x8] JC 0x0012b661 LAB_0012b675: LEA R14,[RSP + 0x38] MOV qword ptr [R14 + -0x10],R14 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] ADD RDX,RSI LAB_0012b68b: LEA RDI,[RSP + 0x28] CALL 0x00111be0 LAB_0012b695: LEA RSI,[RSP + 0x28] MOV RDI,RBX CALL 0x00124fc0 LAB_0012b6a2: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R14 JZ 0x0012b6b9 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x0010b400 LAB_0012b6b9: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R13 JZ 0x0012b70c MOV RSI,qword ptr [RSP + 0x18] JMP 0x0012b704 LAB_0012b6ca: LEA R15,[RSP + 0x58] MOV qword ptr [R15 + -0x10],R15 MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] ADD RDX,RSI LEA R14,[RSP + 0x48] MOV RDI,R14 CALL 0x00111be0 LAB_0012b6ea: MOV RDI,RBX MOV RSI,R14 CALL 0x00124fc0 LAB_0012b6f5: MOV RDI,qword ptr [RSP + 0x48] CMP RDI,R15 JZ 0x0012b70c MOV RSI,qword ptr [RSP + 0x58] LAB_0012b704: INC RSI CALL 0x0010b400 LAB_0012b70c: ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* ftxui::(anonymous namespace)::InputBase::Text(std::__cxx11::string const&) */ void ftxui::(anonymous_namespace)::InputBase::Text(string *param_1) { char *pcVar1; long *in_RDX; ulong uVar2; long in_RSI; long *plVar3; long *local_90; long local_88; int1 local_80; int7 uStack_7f; long *local_70 [2]; long local_60 [2]; long *local_50 [2]; long local_40 [2]; pcVar1 = (char *)Ref<bool>::Address((Ref<bool> *)(in_RSI + 0x98)); if (*pcVar1 == '\0') { local_50[0] = local_40; std::__cxx11::string::_M_construct<char*>(local_50,*in_RDX,in_RDX[1] + *in_RDX); /* try { // try from 0012b6ea to 0012b6f4 has its CatchHandler @ 0012b737 */ text((ftxui *)param_1,local_50); plVar3 = local_50[0]; if (local_50[0] == local_40) { return; } } else { local_88 = 0; local_80 = 0; /* try { // try from 0012b642 to 0012b64b has its CatchHandler @ 0012b74b */ local_90 = (long *)&local_80; std::__cxx11::string::reserve((ulong)&local_90); if (in_RDX[1] != 0) { uVar2 = 0; do { /* try { // try from 0012b661 to 0012b66b has its CatchHandler @ 0012b74d */ std::__cxx11::string::append((char *)&local_90); uVar2 = uVar2 + 1; } while (uVar2 < (ulong)in_RDX[1]); } /* try { // try from 0012b68b to 0012b694 has its CatchHandler @ 0012b74b */ local_70[0] = local_60; std::__cxx11::string::_M_construct<char*> (local_70,local_90,(int1 *)(local_88 + (long)local_90)); /* try { // try from 0012b695 to 0012b6a1 has its CatchHandler @ 0012b71b */ text((ftxui *)param_1,local_70); if (local_70[0] != local_60) { operator_delete(local_70[0],local_60[0] + 1); } if (local_90 == (long *)&local_80) { return; } local_40[0] = CONCAT71(uStack_7f,local_80); plVar3 = local_90; } operator_delete(plVar3,local_40[0] + 1); return; }
28,709
JS_GetIterator2
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_GetIterator2(JSContext *ctx, JSValue obj, JSValue method) { JSValue enum_obj; enum_obj = JS_Call(ctx, method, obj, 0, NULL); if (JS_IsException(enum_obj)) return enum_obj; if (!JS_IsObject(enum_obj)) { JS_FreeValue(ctx, enum_obj); return JS_ThrowTypeErrorNotAnObject(ctx); } return enum_obj; }
O0
c
JS_GetIterator2: subq $0x68, %rsp movq %rsi, 0x48(%rsp) movq %rdx, 0x50(%rsp) movq %rcx, 0x38(%rsp) movq %r8, 0x40(%rsp) movq %rdi, 0x30(%rsp) movq 0x30(%rsp), %rdi movq 0x38(%rsp), %rsi movq 0x40(%rsp), %rdx movq 0x48(%rsp), %rcx movq 0x50(%rsp), %r8 xorl %r9d, %r9d xorl %eax, %eax movq $0x0, (%rsp) callq 0x38d90 movq %rax, 0x10(%rsp) movq %rdx, 0x18(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x28(%rsp) movq 0x20(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x22a00 cmpl $0x0, %eax je 0x6d9a0 movq 0x20(%rsp), %rax movq %rax, 0x58(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x60(%rsp) jmp 0x6d9f2 movq 0x20(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x29cb0 cmpl $0x0, %eax jne 0x6d9de movq 0x30(%rsp), %rdi movq 0x20(%rsp), %rsi movq 0x28(%rsp), %rdx callq 0x229d0 movq 0x30(%rsp), %rdi callq 0x2e2e0 movq %rax, 0x58(%rsp) movq %rdx, 0x60(%rsp) jmp 0x6d9f2 movq 0x20(%rsp), %rax movq %rax, 0x58(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x60(%rsp) movq 0x58(%rsp), %rax movq 0x60(%rsp), %rdx addq $0x68, %rsp retq nopw %cs:(%rax,%rax)
JS_GetIterator2: sub rsp, 68h mov [rsp+68h+var_20], rsi mov [rsp+68h+var_18], rdx mov [rsp+68h+var_30], rcx mov [rsp+68h+var_28], r8 mov [rsp+68h+var_38], rdi mov rdi, [rsp+68h+var_38] mov rsi, [rsp+68h+var_30] mov rdx, [rsp+68h+var_28] mov rcx, [rsp+68h+var_20] mov r8, [rsp+68h+var_18] xor r9d, r9d xor eax, eax mov [rsp+68h+var_68], 0 call JS_Call mov [rsp+68h+var_58], rax mov [rsp+68h+var_50], rdx mov rax, [rsp+68h+var_58] mov [rsp+68h+var_48], rax mov rax, [rsp+68h+var_50] mov [rsp+68h+var_40], rax mov rdi, [rsp+68h+var_48] mov rsi, [rsp+68h+var_40] call JS_IsException_1 cmp eax, 0 jz short loc_6D9A0 mov rax, [rsp+68h+var_48] mov [rsp+68h+var_10], rax mov rax, [rsp+68h+var_40] mov [rsp+68h+var_8], rax jmp short loc_6D9F2 loc_6D9A0: mov rdi, [rsp+68h+var_48] mov rsi, [rsp+68h+var_40] call JS_IsObject cmp eax, 0 jnz short loc_6D9DE mov rdi, [rsp+68h+var_38] mov rsi, [rsp+68h+var_48] mov rdx, [rsp+68h+var_40] call JS_FreeValue mov rdi, [rsp+68h+var_38] call JS_ThrowTypeErrorNotAnObject mov [rsp+68h+var_10], rax mov [rsp+68h+var_8], rdx jmp short loc_6D9F2 loc_6D9DE: mov rax, [rsp+68h+var_48] mov [rsp+68h+var_10], rax mov rax, [rsp+68h+var_40] mov [rsp+68h+var_8], rax loc_6D9F2: mov rax, [rsp+68h+var_10] mov rdx, [rsp+68h+var_8] add rsp, 68h retn
long long JS_GetIterator2( long long a1, int a2, int a3, int a4, int a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, double a10, double a11, __m128 a12, __m128 a13) { long long v13; // rdx long long v14; // rdx long long v15; // rcx long long v16; // r8 long long v17; // r9 __m128 v18; // xmm4 __m128 v19; // xmm5 long long v21; // [rsp+10h] [rbp-58h] long long v22; // [rsp+28h] [rbp-40h] v21 = JS_Call(a1, a4, a5, a2, a3, 0, 0LL); v22 = v13; if ( JS_IsException_1(v21, v13) ) return v21; if ( JS_IsObject(v21, v22) ) return v21; JS_FreeValue(a1, v21, v22); return JS_ThrowTypeErrorNotAnObject(a1, a6, a7, a8, a9, v18, v19, a12, a13, v21, v14, v15, v16, v17); }
JS_GetIterator2: SUB RSP,0x68 MOV qword ptr [RSP + 0x48],RSI MOV qword ptr [RSP + 0x50],RDX MOV qword ptr [RSP + 0x38],RCX MOV qword ptr [RSP + 0x40],R8 MOV qword ptr [RSP + 0x30],RDI MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x40] MOV RCX,qword ptr [RSP + 0x48] MOV R8,qword ptr [RSP + 0x50] XOR R9D,R9D XOR EAX,EAX MOV qword ptr [RSP],0x0 CALL 0x00138d90 MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x18],RDX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x28] CALL 0x00122a00 CMP EAX,0x0 JZ 0x0016d9a0 MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x58],RAX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x60],RAX JMP 0x0016d9f2 LAB_0016d9a0: MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x28] CALL 0x00129cb0 CMP EAX,0x0 JNZ 0x0016d9de MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x28] CALL 0x001229d0 MOV RDI,qword ptr [RSP + 0x30] CALL 0x0012e2e0 MOV qword ptr [RSP + 0x58],RAX MOV qword ptr [RSP + 0x60],RDX JMP 0x0016d9f2 LAB_0016d9de: MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x58],RAX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x60],RAX LAB_0016d9f2: MOV RAX,qword ptr [RSP + 0x58] MOV RDX,qword ptr [RSP + 0x60] ADD RSP,0x68 RET
int1 [16] JS_GetIterator2(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5) { int iVar1; int8 uVar2; int8 uVar3; int1 auVar4 [16]; auVar4 = JS_Call(param_1,param_4,param_5,param_2,param_3,0,0); uVar3 = auVar4._8_8_; uVar2 = auVar4._0_8_; iVar1 = JS_IsException(uVar2,uVar3); if ((iVar1 == 0) && (iVar1 = JS_IsObject(uVar2,uVar3), iVar1 == 0)) { JS_FreeValue(param_1,uVar2,uVar3); auVar4 = JS_ThrowTypeErrorNotAnObject(param_1); } return auVar4; }
28,710
JS_GetIterator2
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_GetIterator2(JSContext *ctx, JSValue obj, JSValue method) { JSValue enum_obj; enum_obj = JS_Call(ctx, method, obj, 0, NULL); if (JS_IsException(enum_obj)) return enum_obj; if (!JS_IsObject(enum_obj)) { JS_FreeValue(ctx, enum_obj); return JS_ThrowTypeErrorNotAnObject(ctx); } return enum_obj; }
O3
c
JS_GetIterator2: pushq %r14 pushq %rbx subq $0x38, %rsp movq %rdx, %rax movq %rsi, %r9 movq %rdi, %rbx movl $0x0, 0x28(%rsp) movq $0x3, 0x30(%rsp) movups 0x28(%rsp), %xmm0 movups %xmm0, (%rsp) movl $0x2, 0x18(%rsp) movq $0x0, 0x10(%rsp) movq %rcx, %rsi movq %r8, %rdx movq %r9, %rcx movq %rax, %r8 xorl %r9d, %r9d callq 0x27eca movq %rax, %r14 cmpl $-0x1, %edx je 0x429c3 cmpl $0x6, %edx je 0x429c3 cmpl $-0x9, %edx jb 0x429aa movq 0x18(%rbx), %rdi movl (%r14), %eax leal -0x1(%rax), %ecx movl %ecx, (%r14) cmpl $0x1, %eax jg 0x429aa movq %r14, %rsi callq 0x20d90 leaq 0x5df3c(%rip), %rsi # 0xa08ed xorl %r14d, %r14d movq %rbx, %rdi xorl %eax, %eax callq 0x2214f movl $0x6, %edx movq %r14, %rax addq $0x38, %rsp popq %rbx popq %r14 retq
JS_GetIterator2: push r14 push rbx sub rsp, 38h mov rax, rdx mov r9, rsi mov rbx, rdi mov dword ptr [rsp+48h+var_20], 0 mov qword ptr [rsp+48h+var_20+8], 3 movups xmm0, [rsp+48h+var_20] movups [rsp+48h+var_48], xmm0 mov [rsp+48h+var_30], 2 mov [rsp+48h+var_38], 0 mov rsi, rcx mov rdx, r8 mov rcx, r9 mov r8, rax xor r9d, r9d call JS_CallInternal mov r14, rax cmp edx, 0FFFFFFFFh jz short loc_429C3 cmp edx, 6 jz short loc_429C3 cmp edx, 0FFFFFFF7h jb short loc_429AA mov rdi, [rbx+18h] mov eax, [r14] lea ecx, [rax-1] mov [r14], ecx cmp eax, 1 jg short loc_429AA mov rsi, r14 call js_free_value_rt loc_429AA: lea rsi, aOperandPrototy+20h; "not an object" xor r14d, r14d mov rdi, rbx xor eax, eax call JS_ThrowTypeError mov edx, 6 loc_429C3: mov rax, r14 add rsp, 38h pop rbx pop r14 retn
_QWORD * JS_GetIterator2( long long a1, long long a2, long long a3, long long a4, long long a5, double a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13) { _DWORD *v14; // rax long long v15; // rdx long long v16; // rcx long long v17; // r8 long long v18; // r9 __m128 v19; // xmm4 __m128 v20; // xmm5 _QWORD *v21; // r14 long long v22; // rdi int v23; // eax char v25; // [rsp+0h] [rbp-48h] __m128i v26; // [rsp+28h] [rbp-20h] v26.m128i_i32[0] = 0; v26.m128i_i64[1] = 3LL; v14 = (_DWORD *)JS_CallInternal( a1, a4, a5, a2, a3, 0LL, v26, a7, a8, a9, a10, a11, a12, a13, v26.m128i_i8[0], 3, 0LL, 2u); v21 = v14; if ( (_DWORD)v15 != -1 && (_DWORD)v15 != 6 ) { if ( (unsigned int)v15 >= 0xFFFFFFF7 ) { v22 = *(_QWORD *)(a1 + 24); v23 = *v14; v16 = (unsigned int)(v23 - 1); *(_DWORD *)v21 = v16; if ( v23 <= 1 ) js_free_value_rt(v22, v21, v15, v16, v17, v18); } v21 = 0LL; JS_ThrowTypeError( a1, (long long)"not an object", v15, v16, v17, v18, (__m128)v26, a7, a8, a9, v19, v20, a12, a13, v25); } return v21; }
JS_GetIterator2: PUSH R14 PUSH RBX SUB RSP,0x38 MOV RAX,RDX MOV R9,RSI MOV RBX,RDI MOV dword ptr [RSP + 0x28],0x0 MOV qword ptr [RSP + 0x30],0x3 MOVUPS XMM0,xmmword ptr [RSP + 0x28] MOVUPS xmmword ptr [RSP],XMM0 MOV dword ptr [RSP + 0x18],0x2 MOV qword ptr [RSP + 0x10],0x0 MOV RSI,RCX MOV RDX,R8 MOV RCX,R9 MOV R8,RAX XOR R9D,R9D CALL 0x00127eca MOV R14,RAX CMP EDX,-0x1 JZ 0x001429c3 CMP EDX,0x6 JZ 0x001429c3 CMP EDX,-0x9 JC 0x001429aa MOV RDI,qword ptr [RBX + 0x18] MOV EAX,dword ptr [R14] LEA ECX,[RAX + -0x1] MOV dword ptr [R14],ECX CMP EAX,0x1 JG 0x001429aa MOV RSI,R14 CALL 0x00120d90 LAB_001429aa: LEA RSI,[0x1a08ed] XOR R14D,R14D MOV RDI,RBX XOR EAX,EAX CALL 0x0012214f MOV EDX,0x6 LAB_001429c3: MOV RAX,R14 ADD RSP,0x38 POP RBX POP R14 RET
int * JS_GetIterator2(long param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5) { int iVar1; int8 uVar2; uint uVar3; int *piVar4; int1 auVar5 [12]; auVar5 = JS_CallInternal(param_1,param_4,param_5,param_2,param_3,0,0,3,0,2); uVar3 = auVar5._8_4_; piVar4 = auVar5._0_8_; if ((uVar3 != 0xffffffff) && (uVar3 != 6)) { if (0xfffffff6 < uVar3) { uVar2 = *(int8 *)(param_1 + 0x18); iVar1 = *piVar4; *piVar4 = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(uVar2,piVar4); } } piVar4 = (int *)0x0; JS_ThrowTypeError(param_1,"not an object"); } return piVar4; }
28,711
my_print_variables
eloqsql/mysys/my_getopt.c
void my_print_variables(const struct my_option *options) { uint name_space= 34, length, nr; ulonglong llvalue; char buff[255]; const struct my_option *optp; DBUG_ENTER("my_print_variables"); for (optp= options; optp->name; optp++) { length= (uint)strlen(optp->name)+1; if (length > name_space) name_space= length; } printf("\nVariables (--variable-name=value)\n"); printf("%-*s%s", name_space, "and boolean options {FALSE|TRUE}", "Value (after reading options)\n"); for (length=1; length < 75; length++) putchar(length == name_space ? ' ' : '-'); putchar('\n'); for (optp= options; optp->name; optp++) { void *value= optp->var_type & GET_ASK_ADDR ? (*my_getopt_get_addr)("", 0, optp, 0) : optp->value; if (value) { length= print_name(optp); for (; length < name_space; length++) putchar(' '); switch ((optp->var_type & GET_TYPE_MASK)) { case GET_SET: if (!(llvalue= *(ulonglong*) value)) printf("%s\n", ""); else for (nr= 0; llvalue && nr < optp->typelib->count; nr++, llvalue >>=1) { if (llvalue & 1) printf( llvalue > 1 ? "%s," : "%s\n", get_type(optp->typelib, nr)); } break; case GET_FLAGSET: llvalue= *(ulonglong*) value; for (nr= 0; llvalue && nr < optp->typelib->count; nr++, llvalue >>=1) { printf("%s%s=", (nr ? "," : ""), get_type(optp->typelib, nr)); printf(llvalue & 1 ? "on" : "off"); } printf("\n"); break; case GET_ENUM: printf("%s\n", get_type(optp->typelib, *(ulong*) value)); break; case GET_STR: case GET_STR_ALLOC: /* fall through */ printf("%s\n", *((char**) value) ? *((char**) value) : "(No default value)"); break; case GET_BOOL: printf("%s\n", *((my_bool*) value) ? "TRUE" : "FALSE"); break; case GET_BIT: { ulonglong bit= (optp->block_size >= 0 ? optp->block_size : -optp->block_size); my_bool reverse= optp->block_size < 0; printf("%s\n", ((*((ulonglong*) value) & bit) != 0) ^ reverse ? "TRUE" : "FALSE"); break; } case GET_INT: printf("%d\n", *((int*) value)); break; case GET_UINT: printf("%u\n", *((uint*) value)); break; case GET_LONG: printf("%ld\n", *((long*) value)); break; case GET_ULONG: printf("%lu\n", *((ulong*) value)); break; case GET_LL: printf("%s\n", llstr(*((longlong*) value), buff)); break; case GET_ULL: longlong10_to_str(*((ulonglong*) value), buff, 10); printf("%s\n", buff); break; case GET_DOUBLE: printf("%g\n", *(double*) value); break; case GET_NO_ARG: printf("(No default value)\n"); break; default: printf("(Disabled)\n"); break; } } } DBUG_VOID_RETURN; }
O3
c
my_print_variables: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x108, %rsp # imm = 0x108 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq (%rdi), %rdi testq %rdi, %rdi je 0x83370 leaq 0x70(%rbx), %r15 movl $0x22, %r12d callq 0x3a4c0 movq %rax, %r14 incl %r14d cmpl %r12d, %r14d cmovbel %r12d, %r14d movq (%r15), %rdi addq $0x70, %r15 movl %r14d, %r12d testq %rdi, %rdi jne 0x8334d jmp 0x83376 movl $0x22, %r14d leaq 0x3d80f(%rip), %rsi # 0xc0b8c movl $0x1, %r15d movl $0x1, %edi xorl %eax, %eax callq 0x3abc0 leaq 0x3d81a(%rip), %rsi # 0xc0bb0 leaq 0x3d81a(%rip), %rcx # 0xc0bb7 leaq 0x3d834(%rip), %r8 # 0xc0bd8 movl $0x1, %edi movl %r14d, %edx xorl %eax, %eax callq 0x3abc0 movl $0x20, %r12d cmpl %r15d, %r14d movl $0x2d, %edi cmovel %r12d, %edi callq 0x3ad50 incl %r15d cmpl $0x4b, %r15d jne 0x833b9 movl $0xa, %edi callq 0x3ad50 cmpq $0x0, (%rbx) jne 0x8342f jmp 0x836fb movl (%r15), %edx movl $0x1, %edi leaq 0x370cd(%rip), %rsi # 0xba4c4 xorl %eax, %eax callq 0x3abc0 jmp 0x836ec movq (%r15), %rdx movl $0x1, %edi leaq 0x3db9d(%rip), %rsi # 0xc0faf jmp 0x836e5 movl $0x1, %edi leaq 0x36d33(%rip), %rsi # 0xba156 leaq 0x3fb74(%rip), %rdx # 0xc2f9e jmp 0x836e5 testb $-0x80, 0x30(%rbx) jne 0x8343b movq 0x18(%rbx), %r15 jmp 0x83455 leaq 0x3fb5c(%rip), %rdi # 0xc2f9e xorl %esi, %esi movq %rbx, %rdx xorl %ecx, %ecx leaq 0x36d6d0(%rip), %rax # 0x3f0b20 callq *(%rax) movq %rax, %r15 testq %r15, %r15 je 0x836ec movq (%rbx), %r13 movq %r13, %r12 movzbl (%r12), %eax movl $0x2d, %edi cmpl $0x5f, %eax je 0x8347a testl %eax, %eax je 0x83487 movsbl %al, %edi callq 0x3ad50 incq %r12 incl %r13d jmp 0x83464 subl (%rbx), %r13d cmpl %r13d, %r14d jbe 0x834a1 movl $0x20, %edi callq 0x3ad50 incl %r13d cmpl %r14d, %r13d jb 0x8348f movq 0x30(%rbx), %rax andl $0x3f, %eax decq %rax cmpq $0xf, %rax ja 0x83625 leaq 0x4144c(%rip), %rcx # 0xc4908 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq (%r15), %rdx testq %rdx, %rdx leaq 0x3d72f(%rip), %rax # 0xc0c01 jmp 0x8365d movq (%r15), %r12 testq %r12, %r12 je 0x83555 xorl %r15d, %r15d movq 0x28(%rbx), %rdi cmpl (%rdi), %r15d jae 0x83555 testl %r15d, %r15d leaq 0x3d704(%rip), %r13 # 0xc0bf9 leaq 0x3faa2(%rip), %rax # 0xc2f9e cmoveq %rax, %r13 movl %r15d, %esi callq 0x868d0 movl $0x1, %edi leaq 0x3d6e7(%rip), %rsi # 0xc0bfb movq %r13, %rdx movq %rax, %rcx xorl %eax, %eax callq 0x3abc0 testb $0x1, %r12b leaq 0x3ea5e(%rip), %rsi # 0xc1f8a leaq 0x3d38a(%rip), %rax # 0xc08bd cmoveq %rax, %rsi movl $0x1, %edi xorl %eax, %eax callq 0x3abc0 incl %r15d movq %r12, %rax shrq %rax cmpq $0x1, %r12 movq %rax, %r12 ja 0x834e2 movl $0x1, %edi leaq 0x3fa3c(%rip), %rsi # 0xc2f9d jmp 0x8363f movq 0x28(%rbx), %rdi movl (%r15), %esi callq 0x868d0 jmp 0x83672 movsd (%r15), %xmm0 movl $0x1, %edi leaq 0x3d697(%rip), %rsi # 0xc0c1f movb $0x1, %al callq 0x3abc0 jmp 0x836ec movl (%r15), %edx movl $0x1, %edi leaq 0x3d063(%rip), %rsi # 0xc0606 jmp 0x833f7 movq (%r15), %r12 testq %r12, %r12 je 0x83417 xorl %r15d, %r15d movq 0x28(%rbx), %rdi cmpl (%rdi), %r15d jae 0x836ec testb $0x1, %r12b je 0x835fa cmpq $0x1, %r12 leaq 0x3d622(%rip), %r13 # 0xc0bf7 leaq 0x36b7a(%rip), %rax # 0xba156 cmoveq %rax, %r13 movl %r15d, %esi callq 0x868d0 movl $0x1, %edi movq %r13, %rsi movq %rax, %rdx xorl %eax, %eax callq 0x3abc0 incl %r15d movq %r12, %rax shrq %rax cmpq $0x2, %r12 movq %rax, %r12 jae 0x835b7 jmp 0x836ec movq (%r15), %rdx movl $0x1, %edi leaq 0x368be(%rip), %rsi # 0xb9ede jmp 0x836e5 movl $0x1, %edi leaq 0x3d606(%rip), %rsi # 0xc0c37 jmp 0x8363f movl $0x1, %edi leaq 0x3d5e4(%rip), %rsi # 0xc0c23 xorl %eax, %eax callq 0x3abc0 jmp 0x836ec cmpb $0x0, (%r15) leaq 0x3d5be(%rip), %rdx # 0xc0c14 leaq 0x3d5bc(%rip), %rax # 0xc0c19 cmoveq %rax, %rdx jmp 0x836d9 movq (%r15), %rdi leaq -0x130(%rbp), %rsi callq 0xb5028 movl $0x1, %edi leaq 0x36ad8(%rip), %rsi # 0xba156 movq %rax, %rdx jmp 0x836e5 movq (%r15), %rdi leaq -0x130(%rbp), %r15 movq %r15, %rsi movl $0xa, %edx callq 0xb4f4e movl $0x1, %edi leaq 0x36ab0(%rip), %rsi # 0xba156 movq %r15, %rdx jmp 0x836e5 movq 0x60(%rbx), %rax movq %rax, %rcx negq %rcx cmovsq %rax, %rcx testq %rax, %rax sets %al testq %rcx, (%r15) sete %cl xorb %al, %cl leaq 0x3d546(%rip), %rdx # 0xc0c14 leaq 0x3d544(%rip), %rax # 0xc0c19 cmovneq %rax, %rdx movl $0x1, %edi leaq 0x36a71(%rip), %rsi # 0xba156 xorl %eax, %eax callq 0x3abc0 cmpq $0x0, 0x70(%rbx) leaq 0x70(%rbx), %rbx jne 0x8342f movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x8371c addq $0x108, %rsp # imm = 0x108 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x3a340
my_print_variables: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 108h mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax mov rdi, [rdi] test rdi, rdi jz short loc_83370 lea r15, [rbx+70h] mov r12d, 22h ; '"' loc_8334D: call _strlen mov r14, rax inc r14d cmp r14d, r12d cmovbe r14d, r12d mov rdi, [r15] add r15, 70h ; 'p' mov r12d, r14d test rdi, rdi jnz short loc_8334D jmp short loc_83376 loc_83370: mov r14d, 22h ; '"' loc_83376: lea rsi, aVariablesVaria; "\nVariables (--variable-name=value)\n" mov r15d, 1 mov edi, 1 xor eax, eax call ___printf_chk lea rsi, aSS_1; "%-*s%s" lea rcx, aAndBooleanOpti; "and boolean options {FALSE|TRUE}" lea r8, aValueAfterRead; "Value (after reading options)\n" mov edi, 1 mov edx, r14d xor eax, eax call ___printf_chk mov r12d, 20h ; ' ' loc_833B9: cmp r14d, r15d mov edi, 2Dh ; '-' cmovz edi, r12d call _putchar inc r15d cmp r15d, 4Bh ; 'K' jnz short loc_833B9 mov edi, 0Ah call _putchar cmp qword ptr [rbx], 0 jnz short loc_8342F jmp loc_836FB loc_833E8: mov edx, [r15]; jumptable 00000000000834C3 case 4 mov edi, 1 lea rsi, aDeleteFileFile+17h; "%u\n" loc_833F7: xor eax, eax call ___printf_chk jmp loc_836EC loc_83403: mov rdx, [r15]; jumptable 00000000000834C3 case 5 mov edi, 1 lea rsi, aUserTime2fSyst+119h; "%ld\n" jmp loc_836E5 loc_83417: mov edi, 1 lea rsi, aStartTransacti+12h; "%s\n" lea rdx, asc_C2F9A+4; "" jmp loc_836E5 loc_8342F: test byte ptr [rbx+30h], 80h jnz short loc_8343B mov r15, [rbx+18h] jmp short loc_83455 loc_8343B: lea rdi, asc_C2F9A+4; "" xor esi, esi mov rdx, rbx xor ecx, ecx lea rax, my_getopt_get_addr call qword ptr [rax] mov r15, rax loc_83455: test r15, r15 jz loc_836EC mov r13, [rbx] mov r12, r13 loc_83464: movzx eax, byte ptr [r12] mov edi, 2Dh ; '-' cmp eax, 5Fh ; '_' jz short loc_8347A test eax, eax jz short loc_83487 movsx edi, al loc_8347A: call _putchar inc r12 inc r13d jmp short loc_83464 loc_83487: sub r13d, [rbx] cmp r14d, r13d jbe short loc_834A1 loc_8348F: mov edi, 20h ; ' ' call _putchar inc r13d cmp r13d, r14d jb short loc_8348F loc_834A1: mov rax, [rbx+30h] and eax, 3Fh dec rax; switch 16 cases cmp rax, 0Fh ja def_834C3; jumptable 00000000000834C3 default case, case 11 lea rcx, jpt_834C3 movsxd rax, ds:(jpt_834C3 - 0C4908h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_834C5: mov rdx, [r15]; jumptable 00000000000834C3 cases 9,10 test rdx, rdx lea rax, aNoDefaultValue; "(No default value)" jmp loc_8365D loc_834D7: mov r12, [r15]; jumptable 00000000000834C3 case 15 test r12, r12 jz short loc_83555 xor r15d, r15d loc_834E2: mov rdi, [rbx+28h] cmp r15d, [rdi] jnb short loc_83555 test r15d, r15d lea r13, aS_4+2; "," lea rax, asc_C2F9A+4; "" cmovz r13, rax mov esi, r15d call get_type mov edi, 1 lea rsi, aSS_2; "%s%s=" mov rdx, r13 mov rcx, rax xor eax, eax call ___printf_chk test r12b, 1 lea rsi, aExpansion+7; "on" lea rax, aOff; "off" cmovz rsi, rax mov edi, 1 xor eax, eax call ___printf_chk inc r15d mov rax, r12 shr rax, 1 cmp r12, 1 mov r12, rax ja short loc_834E2 loc_83555: mov edi, 1 lea rsi, asc_C2F9A+3; "\n" jmp loc_8363F loc_83566: mov rdi, [rbx+28h]; jumptable 00000000000834C3 case 12 mov esi, [r15] call get_type jmp loc_83672 loc_83577: movsd xmm0, qword ptr [r15]; jumptable 00000000000834C3 case 14 mov edi, 1 lea rsi, aG; "%g\n" mov al, 1 call ___printf_chk jmp loc_836EC loc_83594: mov edx, [r15]; jumptable 00000000000834C3 case 3 mov edi, 1 lea rsi, aErrorFoundOpti+48h; "%d\n" jmp loc_833F7 loc_835A8: mov r12, [r15]; jumptable 00000000000834C3 case 13 test r12, r12 jz loc_83417 xor r15d, r15d loc_835B7: mov rdi, [rbx+28h] cmp r15d, [rdi] jnb loc_836EC test r12b, 1 jz short loc_835FA cmp r12, 1 lea r13, aS_4; "%s," lea rax, aStartTransacti+12h; "%s\n" cmovz r13, rax mov esi, r15d call get_type mov edi, 1 mov rsi, r13 mov rdx, rax xor eax, eax call ___printf_chk loc_835FA: inc r15d mov rax, r12 shr rax, 1 cmp r12, 2 mov r12, rax jnb short loc_835B7 jmp loc_836EC loc_83611: mov rdx, [r15]; jumptable 00000000000834C3 case 6 mov edi, 1 lea rsi, aSThreadIdLuExe+32h; "%lu\n" jmp loc_836E5 def_834C3: mov edi, 1; jumptable 00000000000834C3 default case, case 11 lea rsi, aDisabled; "(Disabled)\n" jmp short loc_8363F loc_83633: mov edi, 1; jumptable 00000000000834C3 case 1 lea rsi, aNoDefaultValue_0; "(No default value)\n" loc_8363F: xor eax, eax call ___printf_chk jmp loc_836EC loc_8364B: cmp byte ptr [r15], 0; jumptable 00000000000834C3 case 2 lea rdx, aTrue_0; "TRUE" lea rax, aFalse_0; "FALSE" loc_8365D: cmovz rdx, rax jmp short loc_836D9 loc_83663: mov rdi, [r15]; jumptable 00000000000834C3 case 7 lea rsi, [rbp+var_130] call llstr loc_83672: mov edi, 1 lea rsi, aStartTransacti+12h; "%s\n" mov rdx, rax jmp short loc_836E5 loc_83683: mov rdi, [r15]; jumptable 00000000000834C3 case 8 lea r15, [rbp+var_130] mov rsi, r15 mov edx, 0Ah call int10_to_str mov edi, 1 lea rsi, aStartTransacti+12h; "%s\n" mov rdx, r15 jmp short loc_836E5 loc_836AB: mov rax, [rbx+60h]; jumptable 00000000000834C3 case 16 mov rcx, rax neg rcx cmovs rcx, rax test rax, rax sets al test [r15], rcx setz cl xor cl, al lea rdx, aTrue_0; "TRUE" lea rax, aFalse_0; "FALSE" cmovnz rdx, rax loc_836D9: mov edi, 1 lea rsi, aStartTransacti+12h; "%s\n" loc_836E5: xor eax, eax call ___printf_chk loc_836EC: cmp qword ptr [rbx+70h], 0 lea rbx, [rbx+70h] jnz loc_8342F loc_836FB: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_8371C add rsp, 108h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_8371C: call ___stack_chk_fail
unsigned long long my_print_variables(_QWORD *a1) { _QWORD *v1; // rbx long long v2; // rdi long long *v3; // r15 unsigned int v4; // r12d unsigned int v5; // r14d int v6; // r15d long long v7; // rdi unsigned int *addr; // r15 long long v9; // r13 _BYTE *i; // r12 int v11; // eax long long v12; // rdi unsigned int j; // r13d const char *v14; // rdx bool v15; // zf const char *v16; // rax unsigned long long v17; // r12 unsigned int v18; // r15d unsigned int *v19; // rdi const char *v20; // r13 const char *v21; // rax const char *v22; // rsi bool v23; // cc long long type; // rax unsigned long long v25; // r12 unsigned int v26; // r15d unsigned int *v27; // rdi const char *v28; // r13 long long v29; // rax bool v30; // cf long long v31; // rcx _BYTE v33[256]; // [rsp+0h] [rbp-130h] BYREF unsigned long long v34; // [rsp+100h] [rbp-30h] v1 = a1; v34 = __readfsqword(0x28u); v2 = *a1; if ( v2 ) { v3 = v1 + 14; v4 = 34; do { v5 = strlen(v2) + 1; if ( v5 <= v4 ) v5 = v4; v2 = *v3; v3 += 14; v4 = v5; } while ( v2 ); } else { v5 = 34; } v6 = 1; __printf_chk(1LL, "\nVariables (--variable-name=value)\n"); __printf_chk(1LL, "%-*s%s", v5, "and boolean options {FALSE|TRUE}", "Value (after reading options)\n"); do { v7 = 45LL; if ( v5 == v6 ) v7 = 32LL; putchar(v7); ++v6; } while ( v6 != 75 ); putchar(10LL); if ( !*v1 ) return __readfsqword(0x28u); do { if ( *((char *)v1 + 48) < 0 ) addr = (unsigned int *)my_getopt_get_addr("", 0LL, v1, 0LL); else addr = (unsigned int *)v1[3]; if ( !addr ) goto LABEL_68; v9 = *v1; for ( i = (_BYTE *)*v1; ; ++i ) { v11 = (unsigned __int8)*i; v12 = 45LL; if ( v11 == 95 ) goto LABEL_26; if ( !*i ) break; v12 = (unsigned int)(char)v11; LABEL_26: putchar(v12); LODWORD(v9) = v9 + 1; } for ( j = v9 - *(_DWORD *)v1; j < v5; ++j ) putchar(32LL); switch ( v1[6] & 0x3FLL ) { case 1LL: __printf_chk(1LL, "(No default value)\n"); break; case 2LL: v15 = *(_BYTE *)addr == 0; v14 = "TRUE"; v16 = "FALSE"; goto LABEL_57; case 3LL: __printf_chk(1LL, "%d\n", *addr); break; case 4LL: __printf_chk(1LL, "%u\n", *addr); break; case 5LL: __printf_chk(1LL, "%ld\n", *(_QWORD *)addr); break; case 6LL: __printf_chk(1LL, "%lu\n", *(_QWORD *)addr); break; case 7LL: type = llstr(*(_QWORD *)addr, v33); goto LABEL_61; case 8LL: int10_to_str(*(_QWORD *)addr, v33, 10LL); __printf_chk(1LL, "%s\n", v33); break; case 9LL: case 0xALL: v14 = *(const char **)addr; v15 = *(_QWORD *)addr == 0LL; v16 = "(No default value)"; LABEL_57: if ( v15 ) v14 = v16; goto LABEL_67; case 0xCLL: type = get_type(v1[5], *addr); LABEL_61: __printf_chk(1LL, "%s\n", type); break; case 0xDLL: v25 = *(_QWORD *)addr; if ( *(_QWORD *)addr ) { v26 = 0; do { v27 = (unsigned int *)v1[5]; if ( v26 >= *v27 ) break; if ( (v25 & 1) != 0 ) { v28 = "%s,"; if ( v25 == 1 ) v28 = "%s\n"; v29 = get_type(v27, v26); __printf_chk(1LL, v28, v29); } ++v26; v30 = v25 < 2; v25 >>= 1; } while ( !v30 ); } else { __printf_chk(1LL, "%s\n", ""); } break; case 0xELL: __printf_chk(1LL, "%g\n", *(double *)addr); break; case 0xFLL: v17 = *(_QWORD *)addr; if ( *(_QWORD *)addr ) { v18 = 0; do { v19 = (unsigned int *)v1[5]; if ( v18 >= *v19 ) break; v20 = ","; if ( !v18 ) v20 = ""; v21 = (const char *)get_type(v19, v18); __printf_chk(1LL, "%s%s=", v20, v21); v22 = "on"; if ( (v17 & 1) == 0 ) v22 = "off"; __printf_chk(1LL, v22); ++v18; v23 = v17 <= 1; v17 >>= 1; } while ( !v23 ); } __printf_chk(1LL, "\n"); break; case 0x10LL: v31 = -v1[12]; if ( (long long)v1[12] > 0 ) v31 = v1[12]; v14 = "TRUE"; if ( (long long)v1[12] < 0 != ((v31 & *(_QWORD *)addr) == 0) ) v14 = "FALSE"; LABEL_67: __printf_chk(1LL, "%s\n", v14); break; default: __printf_chk(1LL, "(Disabled)\n"); break; } LABEL_68: v15 = v1[14] == 0LL; v1 += 14; } while ( !v15 ); return __readfsqword(0x28u); }
my_print_variables: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x108 MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RDI] TEST RDI,RDI JZ 0x00183370 LEA R15,[RBX + 0x70] MOV R12D,0x22 LAB_0018334d: CALL 0x0013a4c0 MOV R14,RAX INC R14D CMP R14D,R12D CMOVBE R14D,R12D MOV RDI,qword ptr [R15] ADD R15,0x70 MOV R12D,R14D TEST RDI,RDI JNZ 0x0018334d JMP 0x00183376 LAB_00183370: MOV R14D,0x22 LAB_00183376: LEA RSI,[0x1c0b8c] MOV R15D,0x1 MOV EDI,0x1 XOR EAX,EAX CALL 0x0013abc0 LEA RSI,[0x1c0bb0] LEA RCX,[0x1c0bb7] LEA R8,[0x1c0bd8] MOV EDI,0x1 MOV EDX,R14D XOR EAX,EAX CALL 0x0013abc0 MOV R12D,0x20 LAB_001833b9: CMP R14D,R15D MOV EDI,0x2d CMOVZ EDI,R12D CALL 0x0013ad50 INC R15D CMP R15D,0x4b JNZ 0x001833b9 MOV EDI,0xa CALL 0x0013ad50 CMP qword ptr [RBX],0x0 JNZ 0x0018342f JMP 0x001836fb caseD_4: MOV EDX,dword ptr [R15] MOV EDI,0x1 LEA RSI,[0x1ba4c4] LAB_001833f7: XOR EAX,EAX CALL 0x0013abc0 JMP 0x001836ec caseD_5: MOV RDX,qword ptr [R15] MOV EDI,0x1 LEA RSI,[0x1c0faf] JMP 0x001836e5 LAB_00183417: MOV EDI,0x1 LEA RSI,[0x1ba156] LEA RDX,[0x1c2f9e] JMP 0x001836e5 LAB_0018342f: TEST byte ptr [RBX + 0x30],0x80 JNZ 0x0018343b MOV R15,qword ptr [RBX + 0x18] JMP 0x00183455 LAB_0018343b: LEA RDI,[0x1c2f9e] XOR ESI,ESI MOV RDX,RBX XOR ECX,ECX LEA RAX,[0x4f0b20] CALL qword ptr [RAX] MOV R15,RAX LAB_00183455: TEST R15,R15 JZ 0x001836ec MOV R13,qword ptr [RBX] MOV R12,R13 LAB_00183464: MOVZX EAX,byte ptr [R12] MOV EDI,0x2d CMP EAX,0x5f JZ 0x0018347a TEST EAX,EAX JZ 0x00183487 MOVSX EDI,AL LAB_0018347a: CALL 0x0013ad50 INC R12 INC R13D JMP 0x00183464 LAB_00183487: SUB R13D,dword ptr [RBX] CMP R14D,R13D JBE 0x001834a1 LAB_0018348f: MOV EDI,0x20 CALL 0x0013ad50 INC R13D CMP R13D,R14D JC 0x0018348f LAB_001834a1: MOV RAX,qword ptr [RBX + 0x30] AND EAX,0x3f DEC RAX CMP RAX,0xf JA 0x00183625 LEA RCX,[0x1c4908] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_9: MOV RDX,qword ptr [R15] TEST RDX,RDX LEA RAX,[0x1c0c01] JMP 0x0018365d caseD_f: MOV R12,qword ptr [R15] TEST R12,R12 JZ 0x00183555 XOR R15D,R15D LAB_001834e2: MOV RDI,qword ptr [RBX + 0x28] CMP R15D,dword ptr [RDI] JNC 0x00183555 TEST R15D,R15D LEA R13,[0x1c0bf9] LEA RAX,[0x1c2f9e] CMOVZ R13,RAX MOV ESI,R15D CALL 0x001868d0 MOV EDI,0x1 LEA RSI,[0x1c0bfb] MOV RDX,R13 MOV RCX,RAX XOR EAX,EAX CALL 0x0013abc0 TEST R12B,0x1 LEA RSI,[0x1c1f8a] LEA RAX,[0x1c08bd] CMOVZ RSI,RAX MOV EDI,0x1 XOR EAX,EAX CALL 0x0013abc0 INC R15D MOV RAX,R12 SHR RAX,0x1 CMP R12,0x1 MOV R12,RAX JA 0x001834e2 LAB_00183555: MOV EDI,0x1 LEA RSI,[0x1c2f9d] JMP 0x0018363f caseD_c: MOV RDI,qword ptr [RBX + 0x28] MOV ESI,dword ptr [R15] CALL 0x001868d0 JMP 0x00183672 caseD_e: MOVSD XMM0,qword ptr [R15] MOV EDI,0x1 LEA RSI,[0x1c0c1f] MOV AL,0x1 CALL 0x0013abc0 JMP 0x001836ec caseD_3: MOV EDX,dword ptr [R15] MOV EDI,0x1 LEA RSI,[0x1c0606] JMP 0x001833f7 caseD_d: MOV R12,qword ptr [R15] TEST R12,R12 JZ 0x00183417 XOR R15D,R15D LAB_001835b7: MOV RDI,qword ptr [RBX + 0x28] CMP R15D,dword ptr [RDI] JNC 0x001836ec TEST R12B,0x1 JZ 0x001835fa CMP R12,0x1 LEA R13,[0x1c0bf7] LEA RAX,[0x1ba156] CMOVZ R13,RAX MOV ESI,R15D CALL 0x001868d0 MOV EDI,0x1 MOV RSI,R13 MOV RDX,RAX XOR EAX,EAX CALL 0x0013abc0 LAB_001835fa: INC R15D MOV RAX,R12 SHR RAX,0x1 CMP R12,0x2 MOV R12,RAX JNC 0x001835b7 JMP 0x001836ec caseD_6: MOV RDX,qword ptr [R15] MOV EDI,0x1 LEA RSI,[0x1b9ede] JMP 0x001836e5 caseD_b: MOV EDI,0x1 LEA RSI,[0x1c0c37] JMP 0x0018363f caseD_1: MOV EDI,0x1 LEA RSI,[0x1c0c23] LAB_0018363f: XOR EAX,EAX CALL 0x0013abc0 JMP 0x001836ec caseD_2: CMP byte ptr [R15],0x0 LEA RDX,[0x1c0c14] LEA RAX,[0x1c0c19] LAB_0018365d: CMOVZ RDX,RAX JMP 0x001836d9 caseD_7: MOV RDI,qword ptr [R15] LEA RSI,[RBP + -0x130] CALL 0x001b5028 LAB_00183672: MOV EDI,0x1 LEA RSI,[0x1ba156] MOV RDX,RAX JMP 0x001836e5 caseD_8: MOV RDI,qword ptr [R15] LEA R15,[RBP + -0x130] MOV RSI,R15 MOV EDX,0xa CALL 0x001b4f4e MOV EDI,0x1 LEA RSI,[0x1ba156] MOV RDX,R15 JMP 0x001836e5 caseD_10: MOV RAX,qword ptr [RBX + 0x60] MOV RCX,RAX NEG RCX CMOVS RCX,RAX TEST RAX,RAX SETS AL TEST qword ptr [R15],RCX SETZ CL XOR CL,AL LEA RDX,[0x1c0c14] LEA RAX,[0x1c0c19] CMOVNZ RDX,RAX LAB_001836d9: MOV EDI,0x1 LEA RSI,[0x1ba156] LAB_001836e5: XOR EAX,EAX CALL 0x0013abc0 LAB_001836ec: CMP qword ptr [RBX + 0x70],0x0 LEA RBX,[RBX + 0x70] JNZ 0x0018342f LAB_001836fb: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0018371c ADD RSP,0x108 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0018371c: CALL 0x0013a340
void my_print_variables(long *param_1) { char cVar1; int4 uVar2; long lVar3; size_t sVar4; ulong *puVar5; int8 uVar6; ulong uVar7; char *pcVar8; int iVar9; uint uVar10; char *pcVar11; ulong uVar12; int *puVar13; uint uVar14; long *plVar15; long in_FS_OFFSET; bool bVar16; char local_138 [256]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); pcVar11 = (char *)*param_1; if (pcVar11 == (char *)0x0) { uVar10 = 0x22; } else { plVar15 = param_1 + 0xe; uVar10 = 0x22; do { sVar4 = strlen(pcVar11); uVar14 = (int)sVar4 + 1; if (uVar14 <= uVar10) { uVar14 = uVar10; } uVar10 = uVar14; pcVar11 = (char *)*plVar15; plVar15 = plVar15 + 0xe; } while (pcVar11 != (char *)0x0); } uVar14 = 1; __printf_chk(1,"\nVariables (--variable-name=value)\n"); __printf_chk(1,"%-*s%s",uVar10,"and boolean options {FALSE|TRUE}", "Value (after reading options)\n"); do { iVar9 = 0x2d; if (uVar10 == uVar14) { iVar9 = 0x20; } putchar(iVar9); uVar14 = uVar14 + 1; } while (uVar14 != 0x4b); putchar(10); lVar3 = *param_1; joined_r0x001833e1: if (lVar3 == 0) { if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return; } if ((*(byte *)(param_1 + 6) & 0x80) == 0) { puVar5 = (ulong *)param_1[3]; } else { puVar5 = (ulong *)(*my_getopt_get_addr)(&DAT_001c2f9e,0,param_1,0); } if (puVar5 != (ulong *)0x0) { pcVar11 = (char *)*param_1; pcVar8 = pcVar11; do { cVar1 = *pcVar11; iVar9 = 0x2d; if (cVar1 != '_') { if (cVar1 == '\0') goto LAB_00183487; iVar9 = (int)cVar1; } putchar(iVar9); pcVar11 = pcVar11 + 1; pcVar8 = (char *)(ulong)((int)pcVar8 + 1); } while( true ); } goto LAB_001836ec; LAB_00183487: for (uVar14 = (int)pcVar8 - (int)*param_1; uVar14 < uVar10; uVar14 = uVar14 + 1) { putchar(0x20); } switch((uint)param_1[6] & 0x3f) { case 1: goto LAB_0018363f; case 2: bVar16 = (char)*puVar5 == '\0'; pcVar11 = "TRUE"; pcVar8 = "FALSE"; goto LAB_0018365d; case 3: uVar2 = (int4)*puVar5; pcVar11 = "%d\n"; goto LAB_001833f7; case 4: uVar2 = (int4)*puVar5; pcVar11 = "%u\n"; LAB_001833f7: __printf_chk(1,pcVar11,uVar2); goto LAB_001836ec; case 5: pcVar11 = (char *)*puVar5; pcVar8 = "%ld\n"; break; case 6: pcVar11 = (char *)*puVar5; pcVar8 = "%lu\n"; break; case 7: pcVar11 = (char *)llstr(*puVar5,local_138); goto LAB_00183672; case 8: pcVar11 = local_138; int10_to_str(*puVar5,pcVar11,10); pcVar8 = "%s\n"; break; case 9: case 10: pcVar11 = (char *)*puVar5; bVar16 = pcVar11 == (char *)0x0; pcVar8 = "(No default value)"; LAB_0018365d: if (bVar16) { pcVar11 = pcVar8; } LAB_001836d9: pcVar8 = "%s\n"; break; default: goto LAB_0018363f; case 0xc: pcVar11 = (char *)get_type(param_1[5],(int)*puVar5); LAB_00183672: pcVar8 = "%s\n"; break; case 0xd: if (*puVar5 != 0) { uVar14 = 0; uVar12 = *puVar5; do { if (*(uint *)param_1[5] <= uVar14) break; if ((uVar12 & 1) != 0) { pcVar11 = "%s,"; if (uVar12 == 1) { pcVar11 = "%s\n"; } uVar6 = get_type((uint *)param_1[5],uVar14); __printf_chk(1,pcVar11,uVar6); } uVar14 = uVar14 + 1; bVar16 = 1 < uVar12; uVar12 = uVar12 >> 1; } while (bVar16); goto LAB_001836ec; } pcVar8 = "%s\n"; pcVar11 = ""; break; case 0xe: __printf_chk(*puVar5,1); goto LAB_001836ec; case 0xf: if (*puVar5 != 0) { uVar14 = 0; uVar12 = *puVar5; do { if (*(uint *)param_1[5] <= uVar14) break; puVar13 = &DAT_001c0bf9; if (uVar14 == 0) { puVar13 = &DAT_001c2f9e; } get_type((uint *)param_1[5],uVar14); __printf_chk(1,"%s%s=",puVar13); pcVar11 = "on"; if ((uVar12 & 1) == 0) { pcVar11 = "off"; } __printf_chk(1,pcVar11); uVar14 = uVar14 + 1; bVar16 = 1 < uVar12; uVar12 = uVar12 >> 1; } while (bVar16); } LAB_0018363f: __printf_chk(1); goto LAB_001836ec; case 0x10: uVar12 = param_1[0xc]; uVar7 = -uVar12; if (0 < (long)uVar12) { uVar7 = uVar12; } pcVar11 = "TRUE"; if (((*puVar5 & uVar7) == 0) != (long)uVar12 < 0) { pcVar11 = "FALSE"; } goto LAB_001836d9; } __printf_chk(1,pcVar8,pcVar11); LAB_001836ec: lVar3 = param_1[0xe]; param_1 = param_1 + 0xe; goto joined_r0x001833e1; }
28,712
check_mb_utf8mb3_sequence
eloqsql/libmariadb/libmariadb/ma_charset.c
static unsigned int check_mb_utf8mb3_sequence(const char *start, const char *end) { uchar c; if (start >= end) { return 0; } c = (uchar) start[0]; if (c < 0x80) { return 1; /* single byte character */ } if (c < 0xC2) { return 0; /* invalid mb character */ } if (c < 0xE0) { if (start + 2 > end) { return 0; /* too small */ } if (!(((uchar)start[1] ^ 0x80) < 0x40)) { return 0; } return 2; } if (c < 0xF0) { if (start + 3 > end) { return 0; /* too small */ } if (!(((uchar)start[1] ^ 0x80) < 0x40 && ((uchar)start[2] ^ 0x80) < 0x40 && (c >= 0xE1 || (uchar)start[1] >= 0xA0))) { return 0; /* invalid utf8 character */ } return 3; } return 0; }
O0
c
check_mb_utf8mb3_sequence: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax cmpq -0x18(%rbp), %rax jb 0x76102 movl $0x0, -0x4(%rbp) jmp 0x761fe movq -0x10(%rbp), %rax movb (%rax), %al movb %al, -0x19(%rbp) movzbl -0x19(%rbp), %eax cmpl $0x80, %eax jge 0x76122 movl $0x1, -0x4(%rbp) jmp 0x761fe movzbl -0x19(%rbp), %eax cmpl $0xc2, %eax jge 0x76139 movl $0x0, -0x4(%rbp) jmp 0x761fe movzbl -0x19(%rbp), %eax cmpl $0xe0, %eax jge 0x76185 movq -0x10(%rbp), %rax addq $0x2, %rax cmpq -0x18(%rbp), %rax jbe 0x7615e movl $0x0, -0x4(%rbp) jmp 0x761fe movq -0x10(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jl 0x7617c movl $0x0, -0x4(%rbp) jmp 0x761fe movl $0x2, -0x4(%rbp) jmp 0x761fe movzbl -0x19(%rbp), %eax cmpl $0xf0, %eax jge 0x761f7 movq -0x10(%rbp), %rax addq $0x3, %rax cmpq -0x18(%rbp), %rax jbe 0x761a7 movl $0x0, -0x4(%rbp) jmp 0x761fe movq -0x10(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x761e5 movq -0x10(%rbp), %rax movzbl 0x2(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x761e5 movzbl -0x19(%rbp), %eax cmpl $0xe1, %eax jge 0x761ee movq -0x10(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0xa0, %eax jge 0x761ee movl $0x0, -0x4(%rbp) jmp 0x761fe movl $0x3, -0x4(%rbp) jmp 0x761fe movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw %cs:(%rax,%rax)
check_mb_utf8mb3_sequence: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] cmp rax, [rbp+var_18] jb short loc_76102 mov [rbp+var_4], 0 jmp loc_761FE loc_76102: mov rax, [rbp+var_10] mov al, [rax] mov [rbp+var_19], al movzx eax, [rbp+var_19] cmp eax, 80h jge short loc_76122 mov [rbp+var_4], 1 jmp loc_761FE loc_76122: movzx eax, [rbp+var_19] cmp eax, 0C2h jge short loc_76139 mov [rbp+var_4], 0 jmp loc_761FE loc_76139: movzx eax, [rbp+var_19] cmp eax, 0E0h jge short loc_76185 mov rax, [rbp+var_10] add rax, 2 cmp rax, [rbp+var_18] jbe short loc_7615E mov [rbp+var_4], 0 jmp loc_761FE loc_7615E: mov rax, [rbp+var_10] movzx eax, byte ptr [rax+1] xor eax, 80h cmp eax, 40h ; '@' jl short loc_7617C mov [rbp+var_4], 0 jmp loc_761FE loc_7617C: mov [rbp+var_4], 2 jmp short loc_761FE loc_76185: movzx eax, [rbp+var_19] cmp eax, 0F0h jge short loc_761F7 mov rax, [rbp+var_10] add rax, 3 cmp rax, [rbp+var_18] jbe short loc_761A7 mov [rbp+var_4], 0 jmp short loc_761FE loc_761A7: mov rax, [rbp+var_10] movzx eax, byte ptr [rax+1] xor eax, 80h cmp eax, 40h ; '@' jge short loc_761E5 mov rax, [rbp+var_10] movzx eax, byte ptr [rax+2] xor eax, 80h cmp eax, 40h ; '@' jge short loc_761E5 movzx eax, [rbp+var_19] cmp eax, 0E1h jge short loc_761EE mov rax, [rbp+var_10] movzx eax, byte ptr [rax+1] cmp eax, 0A0h jge short loc_761EE loc_761E5: mov [rbp+var_4], 0 jmp short loc_761FE loc_761EE: mov [rbp+var_4], 3 jmp short loc_761FE loc_761F7: mov [rbp+var_4], 0 loc_761FE: mov eax, [rbp+var_4] pop rbp retn
long long check_mb_utf8mb3_sequence(unsigned __int8 *a1, unsigned long long a2) { unsigned __int8 v3; // [rsp+1h] [rbp-19h] if ( (unsigned long long)a1 < a2 ) { v3 = *a1; if ( *a1 >= 0x80u ) { if ( v3 >= 0xC2u ) { if ( v3 >= 0xE0u ) { if ( v3 >= 0xF0u ) { return 0; } else if ( (unsigned long long)(a1 + 3) <= a2 ) { if ( (a1[1] ^ 0x80) < 64 && (a1[2] ^ 0x80) < 64 && (v3 >= 0xE1u || a1[1] >= 0xA0u) ) return 3; else return 0; } else { return 0; } } else if ( (unsigned long long)(a1 + 2) <= a2 ) { if ( (a1[1] ^ 0x80) < 64 ) return 2; else return 0; } else { return 0; } } else { return 0; } } else { return 1; } } else { return 0; } }
check_mb_utf8mb3_sequence: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x18] JC 0x00176102 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001761fe LAB_00176102: MOV RAX,qword ptr [RBP + -0x10] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x19],AL MOVZX EAX,byte ptr [RBP + -0x19] CMP EAX,0x80 JGE 0x00176122 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001761fe LAB_00176122: MOVZX EAX,byte ptr [RBP + -0x19] CMP EAX,0xc2 JGE 0x00176139 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001761fe LAB_00176139: MOVZX EAX,byte ptr [RBP + -0x19] CMP EAX,0xe0 JGE 0x00176185 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x18] JBE 0x0017615e MOV dword ptr [RBP + -0x4],0x0 JMP 0x001761fe LAB_0017615e: MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CMP EAX,0x40 JL 0x0017617c MOV dword ptr [RBP + -0x4],0x0 JMP 0x001761fe LAB_0017617c: MOV dword ptr [RBP + -0x4],0x2 JMP 0x001761fe LAB_00176185: MOVZX EAX,byte ptr [RBP + -0x19] CMP EAX,0xf0 JGE 0x001761f7 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x3 CMP RAX,qword ptr [RBP + -0x18] JBE 0x001761a7 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001761fe LAB_001761a7: MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CMP EAX,0x40 JGE 0x001761e5 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x2] XOR EAX,0x80 CMP EAX,0x40 JGE 0x001761e5 MOVZX EAX,byte ptr [RBP + -0x19] CMP EAX,0xe1 JGE 0x001761ee MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0xa0 JGE 0x001761ee LAB_001761e5: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001761fe LAB_001761ee: MOV dword ptr [RBP + -0x4],0x3 JMP 0x001761fe LAB_001761f7: MOV dword ptr [RBP + -0x4],0x0 LAB_001761fe: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 check_mb_utf8mb3_sequence(byte *param_1,byte *param_2) { byte bVar1; int4 local_c; if (param_1 < param_2) { bVar1 = *param_1; if (bVar1 < 0x80) { local_c = 1; } else if (bVar1 < 0xc2) { local_c = 0; } else if (bVar1 < 0xe0) { if (param_2 < param_1 + 2) { local_c = 0; } else if ((param_1[1] ^ 0x80) < 0x40) { local_c = 2; } else { local_c = 0; } } else if (bVar1 < 0xf0) { if (param_2 < param_1 + 3) { local_c = 0; } else if ((((param_1[1] ^ 0x80) < 0x40) && ((param_1[2] ^ 0x80) < 0x40)) && ((0xe0 < bVar1 || (0x9f < param_1[1])))) { local_c = 3; } else { local_c = 0; } } else { local_c = 0; } } else { local_c = 0; } return local_c; }
28,713
test_utf16_utf32_noboms
eloqsql/libmariadb/unittest/libmariadb/charset.c
static int test_utf16_utf32_noboms(MYSQL *mysql __attribute__((unused))) { #ifndef HAVE_ICONV diag("MariaDB Connector/C was built without iconv support"); return SKIP; #else const char *csname[]= {"utf16", "utf16le", "utf32", "utf8"}; MARIADB_CHARSET_INFO *csinfo[sizeof(csname)/sizeof(char*)]; const int UTF8= sizeof(csname)/sizeof(char*) - 1; unsigned char in_string[][8]= {"\xd8\x02\xdc\x60\0", /* utf16(be) */ "\x02\xd8\x60\xdc\0", /* utf16le */ "\x00\x01\x08\x60\0\0\0", /* utf32(be) */ "\xF0\x90\xA1\xA0" }; /* utf8 */ size_t in_oct_len[]= {6, 6, 8, 5}; char buffer[8], as_hex[16]; int i, error; size_t rc, in_len, out_len; for (i= 0; i < (int)(sizeof(csname)/sizeof(char*)); ++i) { csinfo[i]= mariadb_get_charset_by_name(csname[i]); if (csinfo[i] == NULL) { diag("Could not get cs info for %s", csname[i]); return FAIL; } } for (i= 0; i < UTF8; ++i) { in_len= in_oct_len[i]; out_len= sizeof(buffer); diag("Converting %s->%s", csname[i], csname[UTF8]); rc= mariadb_convert_string((char *)in_string[i], &in_len, csinfo[i], buffer, &out_len, csinfo[UTF8], &error); FAIL_IF(rc == (size_t)-1, "Conversion failed"); FAIL_IF(rc != in_oct_len[UTF8], "Incorrect number of written bytes"); if (memcmp(buffer, in_string[UTF8], rc) != 0) { mysql_hex_string(as_hex, buffer, (unsigned long)rc); diag("Converted string(%s) does not match the expected one", as_hex); return FAIL; } in_len= in_oct_len[UTF8]; out_len= sizeof(buffer); diag("Converting %s->%s", csname[UTF8], csname[i]); rc= mariadb_convert_string((char *)in_string[UTF8], &in_len, csinfo[UTF8], buffer, &out_len, csinfo[i], &error); FAIL_IF(rc == (size_t)-1, "Conversion failed"); diag("rc=%lu oct_len: %lu", (unsigned long)rc, (unsigned long)in_oct_len[i]); FAIL_IF(rc != in_oct_len[i], "Incorrect number of written bytes"); if (memcmp(buffer, in_string[i], rc) != 0) { mysql_hex_string(as_hex, buffer, (unsigned long)rc); diag("Converted string(%s) does not match the expected one", as_hex); return FAIL; } } return OK; #endif }
O3
c
test_utf16_utf32_noboms: pushq %rbp movq %rsp, %rbp leaq 0x20710(%rip), %rdi # 0x3720d xorl %eax, %eax callq 0x16f1f movl $0xffffffff, %eax # imm = 0xFFFFFFFF popq %rbp retq
test_utf16_utf32_noboms: push rbp mov rbp, rsp lea rdi, aMariadbConnect; "MariaDB Connector/C was built without i"... xor eax, eax call diag mov eax, 0FFFFFFFFh pop rbp retn
long long test_utf16_utf32_noboms(long long a1, int a2, int a3, int a4, int a5, int a6) { diag((unsigned int)"MariaDB Connector/C was built without iconv support", a2, a3, a4, a5, a6); return 0xFFFFFFFFLL; }
test_utf16_utf32_noboms: PUSH RBP MOV RBP,RSP LEA RDI,[0x13720d] XOR EAX,EAX CALL 0x00116f1f MOV EAX,0xffffffff POP RBP RET
int8 test_utf16_utf32_noboms(void) { diag("MariaDB Connector/C was built without iconv support"); return 0xffffffff; }
28,714
r3d_framebuffers_unload
r3d/src/r3d_state.c
void r3d_framebuffers_unload(void) { r3d_framebuffer_unload_gbuffer(); r3d_framebuffer_unload_deferred(); r3d_framebuffer_unload_scene(); r3d_framebuffer_unload_post(); if (R3D.framebuffer.pingPongSSAO.id != 0) { r3d_framebuffer_unload_pingpong_ssao(); } if (R3D.framebuffer.pingPongBloom.id != 0) { r3d_framebuffer_unload_pingpong_bloom(); } }
O3
c
r3d_framebuffers_unload: pushq %rbp movq %rsp, %rbp callq 0xbfdd2 callq 0xbfe2f callq 0xbfe6b callq 0xbfea7 cmpl $0x0, 0xf0212(%rip) # 0x1affcc je 0xbfdc1 callq 0xbfee3 cmpl $0x0, 0xf0228(%rip) # 0x1afff0 je 0xbfdd0 popq %rbp jmp 0xbff1f popq %rbp retq
r3d_framebuffers_unload: push rbp mov rbp, rsp call r3d_framebuffer_unload_gbuffer call r3d_framebuffer_unload_deferred call r3d_framebuffer_unload_scene call r3d_framebuffer_unload_post cmp dword ptr cs:qword_1AFFCC, 0 jz short loc_BFDC1 call r3d_framebuffer_unload_pingpong_ssao loc_BFDC1: cmp dword ptr cs:qword_1AFFF0, 0 jz short loc_BFDD0 pop rbp jmp r3d_framebuffer_unload_pingpong_bloom loc_BFDD0: pop rbp retn
long long r3d_framebuffers_unload() { long long result; // rax r3d_framebuffer_unload_gbuffer(); r3d_framebuffer_unload_deferred(); r3d_framebuffer_unload_scene(); result = r3d_framebuffer_unload_post(); if ( (_DWORD)qword_1AFFCC ) result = r3d_framebuffer_unload_pingpong_ssao(); if ( (_DWORD)qword_1AFFF0 ) return r3d_framebuffer_unload_pingpong_bloom(); return result; }
r3d_framebuffers_unload: PUSH RBP MOV RBP,RSP CALL 0x001bfdd2 CALL 0x001bfe2f CALL 0x001bfe6b CALL 0x001bfea7 CMP dword ptr [0x002affcc],0x0 JZ 0x001bfdc1 CALL 0x001bfee3 LAB_001bfdc1: CMP dword ptr [0x002afff0],0x0 JZ 0x001bfdd0 POP RBP JMP 0x001bff1f LAB_001bfdd0: POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void r3d_framebuffers_unload(void) { r3d_framebuffer_unload_gbuffer(); r3d_framebuffer_unload_deferred(); r3d_framebuffer_unload_scene(); r3d_framebuffer_unload_post(); if (DAT_002affcc != 0) { r3d_framebuffer_unload_pingpong_ssao(); } if (_DAT_002afff0 != 0) { r3d_framebuffer_unload_pingpong_bloom(); return; } return; }
28,715
LefDefParser::defiPartition::Destroy()
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiPartition.cpp
void defiPartition::Destroy() { if (name_) free(name_); name_ = 0; nameLength_ = 0; if (pin_) free(pin_); pin_ = 0; pinLength_ = 0; if (inst_) free(inst_); inst_ = 0; instLength_ = 0; clear(); if (pins_) free((char*)(pins_)); pins_ = 0; pinsAllocated_ = 0; }
O3
cpp
LefDefParser::defiPartition::Destroy(): pushq %rbx movq %rdi, %rbx movq (%rdi), %rdi testq %rdi, %rdi je 0x2ecdf callq 0x7220 movq $0x0, (%rbx) movl $0x0, 0x8(%rbx) movq 0x28(%rbx), %rdi testq %rdi, %rdi je 0x2ecfb callq 0x7220 movq $0x0, 0x28(%rbx) movl $0x0, 0x30(%rbx) movq 0x18(%rbx), %rdi testq %rdi, %rdi je 0x2ed18 callq 0x7220 movq $0x0, 0x18(%rbx) movl $0x0, 0x20(%rbx) movq %rbx, %rdi callq 0x2ec44 movq 0x50(%rbx), %rdi testq %rdi, %rdi je 0x2ed3d callq 0x7220 movq $0x0, 0x50(%rbx) movl $0x0, 0x4c(%rbx) popq %rbx retq
_ZN12LefDefParser13defiPartition7DestroyEv: push rbx mov rbx, rdi mov rdi, [rdi] test rdi, rdi jz short loc_2ECDF call _free loc_2ECDF: mov qword ptr [rbx], 0 mov dword ptr [rbx+8], 0 mov rdi, [rbx+28h] test rdi, rdi jz short loc_2ECFB call _free loc_2ECFB: mov qword ptr [rbx+28h], 0 mov dword ptr [rbx+30h], 0 mov rdi, [rbx+18h] test rdi, rdi jz short loc_2ED18 call _free loc_2ED18: mov qword ptr [rbx+18h], 0 mov dword ptr [rbx+20h], 0 mov rdi, rbx; this call _ZN12LefDefParser13defiPartition5clearEv; LefDefParser::defiPartition::clear(void) mov rdi, [rbx+50h] test rdi, rdi jz short loc_2ED3D call _free loc_2ED3D: mov qword ptr [rbx+50h], 0 mov dword ptr [rbx+4Ch], 0 pop rbx retn
long long LefDefParser::defiPartition::Destroy(LefDefParser::defiPartition *this) { void *v2; // rdi void *v3; // rdi void *v4; // rdi long long result; // rax void *v6; // rdi v2 = *(void **)this; if ( v2 ) free(v2); *(_QWORD *)this = 0LL; *((_DWORD *)this + 2) = 0; v3 = (void *)*((_QWORD *)this + 5); if ( v3 ) free(v3); *((_QWORD *)this + 5) = 0LL; *((_DWORD *)this + 12) = 0; v4 = (void *)*((_QWORD *)this + 3); if ( v4 ) free(v4); *((_QWORD *)this + 3) = 0LL; *((_DWORD *)this + 8) = 0; result = LefDefParser::defiPartition::clear(this); v6 = (void *)*((_QWORD *)this + 10); if ( v6 ) result = free(v6); *((_QWORD *)this + 10) = 0LL; *((_DWORD *)this + 19) = 0; return result; }
Destroy: PUSH RBX MOV RBX,RDI MOV RDI,qword ptr [RDI] TEST RDI,RDI JZ 0x0012ecdf CALL 0x00107220 LAB_0012ecdf: MOV qword ptr [RBX],0x0 MOV dword ptr [RBX + 0x8],0x0 MOV RDI,qword ptr [RBX + 0x28] TEST RDI,RDI JZ 0x0012ecfb CALL 0x00107220 LAB_0012ecfb: MOV qword ptr [RBX + 0x28],0x0 MOV dword ptr [RBX + 0x30],0x0 MOV RDI,qword ptr [RBX + 0x18] TEST RDI,RDI JZ 0x0012ed18 CALL 0x00107220 LAB_0012ed18: MOV qword ptr [RBX + 0x18],0x0 MOV dword ptr [RBX + 0x20],0x0 MOV RDI,RBX CALL 0x0012ec44 MOV RDI,qword ptr [RBX + 0x50] TEST RDI,RDI JZ 0x0012ed3d CALL 0x00107220 LAB_0012ed3d: MOV qword ptr [RBX + 0x50],0x0 MOV dword ptr [RBX + 0x4c],0x0 POP RBX RET
/* LefDefParser::defiPartition::Destroy() */ void __thiscall LefDefParser::defiPartition::Destroy(defiPartition *this) { if (*(void **)this != (void *)0x0) { free(*(void **)this); } *(int8 *)this = 0; *(int4 *)(this + 8) = 0; if (*(void **)(this + 0x28) != (void *)0x0) { free(*(void **)(this + 0x28)); } *(int8 *)(this + 0x28) = 0; *(int4 *)(this + 0x30) = 0; if (*(void **)(this + 0x18) != (void *)0x0) { free(*(void **)(this + 0x18)); } *(int8 *)(this + 0x18) = 0; *(int4 *)(this + 0x20) = 0; clear(this); if (*(void **)(this + 0x50) != (void *)0x0) { free(*(void **)(this + 0x50)); } *(int8 *)(this + 0x50) = 0; *(int4 *)(this + 0x4c) = 0; return; }
28,716
JS_ThrowReferenceError
bluesky950520[P]quickjs/quickjs.c
JSValue __attribute__((format(printf, 2, 3))) JS_ThrowReferenceError(JSContext *ctx, const char *fmt, ...) { JSValue val; va_list ap; va_start(ap, fmt); val = JS_ThrowError(ctx, JS_REFERENCE_ERROR, fmt, ap); va_end(ap); return val; }
O0
c
JS_ThrowReferenceError: subq $0x108, %rsp # imm = 0x108 testb %al, %al je 0x2d42c movaps %xmm0, 0x30(%rsp) movaps %xmm1, 0x40(%rsp) movaps %xmm2, 0x50(%rsp) movaps %xmm3, 0x60(%rsp) movaps %xmm4, 0x70(%rsp) movaps %xmm5, 0x80(%rsp) movaps %xmm6, 0x90(%rsp) movaps %xmm7, 0xa0(%rsp) movq %r9, 0x28(%rsp) movq %r8, 0x20(%rsp) movq %rcx, 0x18(%rsp) movq %rdx, 0x10(%rsp) movq %rdi, 0xe8(%rsp) movq %rsi, 0xe0(%rsp) movq %rsp, %rax movq %rax, 0xd0(%rsp) leaq 0x110(%rsp), %rax movq %rax, 0xc8(%rsp) movl $0x30, 0xc4(%rsp) movl $0x10, 0xc0(%rsp) movq 0xe8(%rsp), %rdi movq 0xe0(%rsp), %rdx movl $0x2, %esi leaq 0xc0(%rsp), %rcx callq 0x2d140 movq %rax, 0xb0(%rsp) movq %rdx, 0xb8(%rsp) movups 0xb0(%rsp), %xmm0 movaps %xmm0, 0xf0(%rsp) movq 0xf0(%rsp), %rax movq 0xf8(%rsp), %rdx addq $0x108, %rsp # imm = 0x108 retq nopl (%rax,%rax)
JS_ThrowReferenceError: sub rsp, 108h test al, al jz short loc_2D42C movaps [rsp+108h+var_D8], xmm0 movaps [rsp+108h+var_C8], xmm1 movaps [rsp+108h+var_B8], xmm2 movaps [rsp+108h+var_A8], xmm3 movaps [rsp+108h+var_98], xmm4 movaps [rsp+108h+var_88], xmm5 movaps [rsp+108h+var_78], xmm6 movaps [rsp+108h+var_68], xmm7 loc_2D42C: mov [rsp+108h+var_E0], r9 mov [rsp+108h+var_E8], r8 mov [rsp+108h+var_F0], rcx mov [rsp+108h+var_F8], rdx mov [rsp+108h+var_20], rdi mov [rsp+108h+var_28], rsi mov rax, rsp mov [rsp+108h+var_38], rax lea rax, [rsp+108h+arg_0] mov [rsp+108h+var_40], rax mov [rsp+108h+var_44], 30h ; '0' mov [rsp+108h+var_48], 10h mov rdi, [rsp+108h+var_20] mov rdx, [rsp+108h+var_28] mov esi, 2 lea rcx, [rsp+108h+var_48] call JS_ThrowError mov qword ptr [rsp+108h+var_58], rax mov qword ptr [rsp+108h+var_58+8], rdx movups xmm0, [rsp+108h+var_58] movaps [rsp+108h+var_18], xmm0 mov rax, qword ptr [rsp+108h+var_18] mov rdx, qword ptr [rsp+108h+var_18+8] add rsp, 108h retn
long long JS_ThrowReferenceError( 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 a15) { _QWORD v16[6]; // [rsp+0h] [rbp-108h] BYREF __m128 v17; // [rsp+30h] [rbp-D8h] __m128 v18; // [rsp+40h] [rbp-C8h] __m128 v19; // [rsp+50h] [rbp-B8h] __m128 v20; // [rsp+60h] [rbp-A8h] __m128 v21; // [rsp+70h] [rbp-98h] __m128 v22; // [rsp+80h] [rbp-88h] __m128 v23; // [rsp+90h] [rbp-78h] __m128 v24; // [rsp+A0h] [rbp-68h] _DWORD v25[2]; // [rsp+C0h] [rbp-48h] BYREF char *v26; // [rsp+C8h] [rbp-40h] _QWORD *v27; // [rsp+D0h] [rbp-38h] long long v28; // [rsp+E0h] [rbp-28h] long long v29; // [rsp+E8h] [rbp-20h] v17 = a7; v18 = a8; v19 = a9; v20 = a10; v21 = a11; v22 = a12; v23 = a13; v24 = a14; v16[5] = a6; v16[4] = a5; v16[3] = a4; v16[2] = a3; v29 = a1; v28 = a2; v27 = v16; v26 = &a15; v25[1] = 48; v25[0] = 16; return JS_ThrowError(a1, 2u, a2, (long long)v25); }
JS_ThrowReferenceError: SUB RSP,0x108 TEST AL,AL JZ 0x0012d42c MOVAPS xmmword ptr [RSP + 0x30],XMM0 MOVAPS xmmword ptr [RSP + 0x40],XMM1 MOVAPS xmmword ptr [RSP + 0x50],XMM2 MOVAPS xmmword ptr [RSP + 0x60],XMM3 MOVAPS xmmword ptr [RSP + 0x70],XMM4 MOVAPS xmmword ptr [RSP + 0x80],XMM5 MOVAPS xmmword ptr [RSP + 0x90],XMM6 MOVAPS xmmword ptr [RSP + 0xa0],XMM7 LAB_0012d42c: MOV qword ptr [RSP + 0x28],R9 MOV qword ptr [RSP + 0x20],R8 MOV qword ptr [RSP + 0x18],RCX MOV qword ptr [RSP + 0x10],RDX MOV qword ptr [RSP + 0xe8],RDI MOV qword ptr [RSP + 0xe0],RSI MOV RAX,RSP MOV qword ptr [RSP + 0xd0],RAX LEA RAX,[RSP + 0x110] MOV qword ptr [RSP + 0xc8],RAX MOV dword ptr [RSP + 0xc4],0x30 MOV dword ptr [RSP + 0xc0],0x10 MOV RDI,qword ptr [RSP + 0xe8] MOV RDX,qword ptr [RSP + 0xe0] MOV ESI,0x2 LEA RCX,[RSP + 0xc0] CALL 0x0012d140 MOV qword ptr [RSP + 0xb0],RAX MOV qword ptr [RSP + 0xb8],RDX MOVUPS XMM0,xmmword ptr [RSP + 0xb0] MOVAPS xmmword ptr [RSP + 0xf0],XMM0 MOV RAX,qword ptr [RSP + 0xf0] MOV RDX,qword ptr [RSP + 0xf8] ADD RSP,0x108 RET
int1 [16] JS_ThrowReferenceError (int4 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int8 param_9,int8 param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { int1 auVar1 [16]; char in_AL; int1 auStack_108 [16]; int8 local_f8; int8 local_f0; int8 local_e8; int8 local_e0; int4 local_d8; int8 local_c8; int8 local_b8; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int4 local_48; int4 local_44; int1 *local_40; int1 *local_38; int8 local_28; int8 local_20; local_38 = auStack_108; if (in_AL != '\0') { local_d8 = param_1; local_c8 = param_2; local_b8 = param_3; local_a8 = param_4; local_98 = param_5; local_88 = param_6; local_78 = param_7; local_68 = param_8; } local_40 = &stack0x00000008; local_44 = 0x30; local_48 = 0x10; local_f8 = param_11; local_f0 = param_12; local_e8 = param_13; local_e0 = param_14; local_28 = param_10; local_20 = param_9; auVar1 = JS_ThrowError(param_9,2,param_10,&local_48); return auVar1; }
28,717
JS_ThrowReferenceError
bluesky950520[P]quickjs/quickjs.c
JSValue __attribute__((format(printf, 2, 3))) JS_ThrowReferenceError(JSContext *ctx, const char *fmt, ...) { JSValue val; va_list ap; va_start(ap, fmt); val = JS_ThrowError(ctx, JS_REFERENCE_ERROR, fmt, ap); va_end(ap); return val; }
O2
c
JS_ThrowReferenceError: subq $0xd8, %rsp movq %rsi, %r10 leaq 0x20(%rsp), %rsi movq %rdx, 0x10(%rsi) movq %rcx, 0x18(%rsi) movq %r8, 0x20(%rsi) movq %r9, 0x28(%rsi) testb %al, %al je 0x1c739 movaps %xmm0, 0x50(%rsp) movaps %xmm1, 0x60(%rsp) movaps %xmm2, 0x70(%rsp) movaps %xmm3, 0x80(%rsp) movaps %xmm4, 0x90(%rsp) movaps %xmm5, 0xa0(%rsp) movaps %xmm6, 0xb0(%rsp) movaps %xmm7, 0xc0(%rsp) movq %rsp, %rcx movq %rsi, 0x10(%rcx) leaq 0xe0(%rsp), %rax movq %rax, 0x8(%rcx) movabsq $0x3000000010, %rax # imm = 0x3000000010 movq %rax, (%rcx) pushq $0x2 popq %rsi movq %r10, %rdx callq 0x1c551 pushq $0x6 popq %rdx xorl %eax, %eax addq $0xd8, %rsp retq
JS_ThrowReferenceError: sub rsp, 0D8h mov r10, rsi lea rsi, [rsp+0D8h+var_B8] mov [rsi+10h], rdx mov [rsi+18h], rcx mov [rsi+20h], r8 mov [rsi+28h], r9 test al, al jz short loc_1C739 movaps [rsp+0D8h+var_88], xmm0 movaps [rsp+0D8h+var_78], xmm1 movaps [rsp+0D8h+var_68], xmm2 movaps [rsp+0D8h+var_58], xmm3 movaps [rsp+0D8h+var_48], xmm4 movaps [rsp+0D8h+var_38], xmm5 movaps [rsp+0D8h+var_28], xmm6 movaps [rsp+0D8h+var_18], xmm7 loc_1C739: mov rcx, rsp mov [rcx+10h], rsi lea rax, [rsp+0D8h+arg_0] mov [rcx+8], rax mov rax, 3000000010h mov [rcx], rax push 2 pop rsi mov rdx, r10 call JS_ThrowError push 6 pop rdx xor eax, eax add rsp, 0D8h retn
long long JS_ThrowReferenceError( 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 a15) { _QWORD v16[4]; // [rsp+0h] [rbp-D8h] BYREF char v17; // [rsp+20h] [rbp-B8h] BYREF long long v18; // [rsp+30h] [rbp-A8h] long long v19; // [rsp+38h] [rbp-A0h] long long v20; // [rsp+40h] [rbp-98h] long long v21; // [rsp+48h] [rbp-90h] __m128 v22; // [rsp+50h] [rbp-88h] __m128 v23; // [rsp+60h] [rbp-78h] __m128 v24; // [rsp+70h] [rbp-68h] __m128 v25; // [rsp+80h] [rbp-58h] __m128 v26; // [rsp+90h] [rbp-48h] __m128 v27; // [rsp+A0h] [rbp-38h] __m128 v28; // [rsp+B0h] [rbp-28h] __m128 v29; // [rsp+C0h] [rbp-18h] v22 = a7; v23 = a8; v24 = a9; v25 = a10; v26 = a11; v27 = a12; v28 = a13; v29 = a14; v18 = a3; v19 = a4; v20 = a5; v21 = a6; v16[2] = &v17; v16[1] = &a15; v16[0] = 0x3000000010LL; JS_ThrowError(a1, 2LL, a2, (long long)v16); return 0LL; }
JS_ThrowReferenceError: SUB RSP,0xd8 MOV R10,RSI LEA RSI,[RSP + 0x20] MOV qword ptr [RSI + 0x10],RDX MOV qword ptr [RSI + 0x18],RCX MOV qword ptr [RSI + 0x20],R8 MOV qword ptr [RSI + 0x28],R9 TEST AL,AL JZ 0x0011c739 MOVAPS xmmword ptr [RSP + 0x50],XMM0 MOVAPS xmmword ptr [RSP + 0x60],XMM1 MOVAPS xmmword ptr [RSP + 0x70],XMM2 MOVAPS xmmword ptr [RSP + 0x80],XMM3 MOVAPS xmmword ptr [RSP + 0x90],XMM4 MOVAPS xmmword ptr [RSP + 0xa0],XMM5 MOVAPS xmmword ptr [RSP + 0xb0],XMM6 MOVAPS xmmword ptr [RSP + 0xc0],XMM7 LAB_0011c739: MOV RCX,RSP MOV qword ptr [RCX + 0x10],RSI LEA RAX,[RSP + 0xe0] MOV qword ptr [RCX + 0x8],RAX MOV RAX,0x3000000010 MOV qword ptr [RCX],RAX PUSH 0x2 POP RSI MOV RDX,R10 CALL 0x0011c551 PUSH 0x6 POP RDX XOR EAX,EAX ADD RSP,0xd8 RET
int1 [16] JS_ThrowReferenceError(int8 param_1,int8 param_2) { JS_ThrowError(param_1,2,param_2); return ZEXT816(6) << 0x40; }
28,718
my_b_seq_read
eloqsql/mysys/mf_iocache.c
static int _my_b_seq_read(IO_CACHE *info, uchar *Buffer, size_t Count) { size_t length, diff_length, save_count, max_length; my_off_t pos_in_file; save_count=Count; lock_append_buffer(info); /* pos_in_file always point on where info->buffer was read */ if ((pos_in_file=info->pos_in_file + (size_t) (info->read_end - info->buffer)) >= info->end_of_file) goto read_append_buffer; /* With read-append cache we must always do a seek before we read, because the write could have moved the file pointer astray */ if (mysql_file_seek(info->file, pos_in_file, MY_SEEK_SET, MYF(0)) == MY_FILEPOS_ERROR) { info->error= -1; unlock_append_buffer(info); return (1); } info->seek_not_done=0; diff_length= (size_t) (pos_in_file & (IO_SIZE-1)); /* now the second stage begins - read from file descriptor */ if (Count >= (size_t) (IO_SIZE+(IO_SIZE-diff_length))) { /* Fill first intern buffer */ size_t read_length; length= IO_ROUND_DN(Count) - diff_length; if ((read_length= mysql_file_read(info->file,Buffer, length, info->myflags)) == (size_t) -1) { info->error= -1; unlock_append_buffer(info); return 1; } Count-=read_length; Buffer+=read_length; pos_in_file+=read_length; if (read_length != length) { /* We only got part of data; Read the rest of the data from the write buffer */ goto read_append_buffer; } diff_length=0; } max_length= info->read_length-diff_length; if (max_length > (info->end_of_file - pos_in_file)) max_length= (size_t) (info->end_of_file - pos_in_file); if (!max_length) { if (Count) goto read_append_buffer; length=0; /* Didn't read any more chars */ } else { length= mysql_file_read(info->file,info->buffer, max_length, info->myflags); if (length == (size_t) -1) { info->error= -1; unlock_append_buffer(info); return 1; } if (length < Count) { memcpy(Buffer, info->buffer, length); Count -= length; Buffer += length; /* added the line below to make DBUG_ASSERT(pos_in_file==info->end_of_file) pass. otherwise this does not appear to be needed */ pos_in_file += length; goto read_append_buffer; } } unlock_append_buffer(info); info->read_pos=info->buffer+Count; info->read_end=info->buffer+length; info->pos_in_file=pos_in_file; memcpy(Buffer,info->buffer,(size_t) Count); return 0; read_append_buffer: /* Read data from the current write buffer. Count should never be == 0 here (The code will work even if count is 0) */ { /* First copy the data to Count */ size_t len_in_buff = (size_t) (info->write_pos - info->append_read_pos); size_t copy_len; size_t transfer_len; DBUG_ASSERT(info->append_read_pos <= info->write_pos); copy_len=MY_MIN(Count, len_in_buff); memcpy(Buffer, info->append_read_pos, copy_len); info->append_read_pos += copy_len; Count -= copy_len; if (Count) info->error= (int) (save_count - Count); /* Fill read buffer with data from write buffer */ memcpy(info->buffer, info->append_read_pos, (size_t) (transfer_len=len_in_buff - copy_len)); info->read_pos= info->buffer; info->read_end= info->buffer+transfer_len; info->append_read_pos=info->write_pos; info->pos_in_file=pos_in_file+copy_len; info->end_of_file+=len_in_buff; } unlock_append_buffer(info); return Count ? 1 : 0; }
O3
c
my_b_seq_read: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rdx, %r12 movq %rsi, -0x40(%rbp) movq %rdi, %r14 leaq 0x50(%rdi), %r15 cmpq $0x0, 0x90(%rdi) jne 0x51a7f movq %r15, %rdi callq 0x28560 movq 0x18(%r14), %r13 subq 0x20(%r14), %r13 addq (%r14), %r13 cmpq 0x8(%r14), %r13 jae 0x517fb movl 0xd4(%r14), %ebx leaq 0x2de6b9(%rip), %rax # 0x32fe50 movq (%rax), %rax leaq -0xa8(%rbp), %rdi movl %ebx, %esi movl $0x8, %edx callq *0x158(%rax) testq %rax, %rax jne 0x51aad movl %ebx, %edi movq %r13, %rsi xorl %edx, %edx xorl %ecx, %ecx callq 0x5af50 cmpq $-0x1, %rax je 0x519e2 movl $0x0, 0xe0(%r14) movl %r13d, %eax andl $0xfff, %eax # imm = 0xFFF movl $0x2000, %ecx # imm = 0x2000 subq %rax, %rcx cmpq %r12, %rcx jbe 0x518a2 movq %r12, %rdx jmp 0x51928 movq %r13, -0x38(%rbp) movq %r15, -0x30(%rbp) movq %r12, %r13 movq 0x38(%r14), %rsi movq 0x40(%r14), %r15 subq %rsi, %r15 cmpq %r15, %r13 movq %r15, %rbx cmovbq %r13, %rbx movq -0x40(%rbp), %rdi movq %rbx, %rdx callq 0x282c0 movq 0x38(%r14), %rsi addq %rbx, %rsi movq %rsi, 0x38(%r14) cmpq %r15, %r13 jbe 0x51845 subl %r13d, %r12d leal (%rbx,%r12), %eax movl %eax, 0xe4(%r14) movq 0x20(%r14), %rdi movq %r15, %r12 subq %rbx, %r12 movq %r12, %rdx callq 0x282c0 movq 0x20(%r14), %rax movq 0x40(%r14), %rcx movq %rax, 0x10(%r14) addq %rax, %r12 movq %r12, 0x18(%r14) movq %rcx, 0x38(%r14) movq -0x38(%rbp), %rax addq %rbx, %rax movq %rax, (%r14) addq %r15, 0x8(%r14) movq 0x90(%r14), %rdi testq %rdi, %rdi jne 0x51a98 xorl %ebx, %ebx cmpq %r15, %r13 seta %bl movq -0x30(%rbp), %rdi callq 0x28270 jmp 0x51a0a movq %r13, -0x38(%rbp) movl %r12d, %r13d andl $0xfffff000, %r13d # imm = 0xFFFFF000 subq %rax, %r13 movl 0xd4(%r14), %ebx movq 0xf8(%r14), %rax movq %rax, -0x30(%rbp) leaq 0x2de584(%rip), %rax # 0x32fe50 movq (%rax), %rax leaq -0xa8(%rbp), %rdi movl %ebx, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax jne 0x51ade movl %ebx, %edi movq -0x40(%rbp), %rsi movq %r13, %rdx movq -0x30(%rbp), %rcx callq 0x5ad50 movq %rax, %rbx cmpq $-0x1, %rbx je 0x519e2 movq %r12, %rdx subq %rbx, %rdx addq %rbx, -0x40(%rbp) addq %rbx, -0x38(%rbp) cmpq %r13, %rbx jne 0x51a27 xorl %eax, %eax movq -0x38(%rbp), %r13 movq 0x8(%r14), %rbx movq 0xf0(%r14), %rcx subq %rax, %rcx subq %r13, %rbx cmpq %rbx, %rcx cmovbq %rcx, %rbx testq %rbx, %rbx je 0x51a1e movq %rdx, -0x48(%rbp) movq %r13, -0x38(%rbp) movl 0xd4(%r14), %r13d movq 0x20(%r14), %rax movq %rax, -0x50(%rbp) movq 0xf8(%r14), %rax movq %rax, -0x30(%rbp) leaq 0x2de4de(%rip), %rax # 0x32fe50 movq (%rax), %rax leaq -0xa8(%rbp), %rdi movl %r13d, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax jne 0x51b53 movl %r13d, %edi movq -0x50(%rbp), %rsi movq %rbx, %rdx movq -0x30(%rbp), %rcx callq 0x5ad50 cmpq $-0x1, %rax movq -0x48(%rbp), %rdx je 0x519e2 movq %rdx, %r13 subq %rax, %r13 jbe 0x51a33 movq %r15, -0x30(%rbp) movq 0x20(%r14), %rsi movq -0x40(%rbp), %rbx movq %rbx, %rdi movq %rax, %rdx movq %rax, %r15 callq 0x282c0 addq %r15, %rbx movq %rbx, -0x40(%rbp) addq %r15, -0x38(%rbp) jmp 0x51806 movl $0xffffffff, 0xe4(%r14) # imm = 0xFFFFFFFF movq 0x90(%r14), %rdi testq %rdi, %rdi jne 0x51ac9 movq %r15, %rdi callq 0x28270 movl $0x1, %ebx movl %ebx, %eax addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq testq %rdx, %rdx je 0x51a39 movq %r13, -0x38(%rbp) movq %r15, -0x30(%rbp) movq %rdx, %r13 jmp 0x51806 movq -0x38(%rbp), %r13 jmp 0x51a3b xorl %eax, %eax movq %rax, %r12 movq %rdx, %rbx movq 0x90(%r14), %rdi testq %rdi, %rdi jne 0x51bc7 movq %r15, %rdi callq 0x28270 movq 0x20(%r14), %rsi movq %rbx, %rdx leaq (%rsi,%rbx), %rax movq %rax, 0x10(%r14) addq %rsi, %r12 movq %r12, 0x18(%r14) movq %r13, (%r14) movq -0x40(%rbp), %rdi callq 0x282c0 xorl %ebx, %ebx jmp 0x51a0a leaq 0x40fed(%rip), %rsi # 0x92a73 movq %r15, %rdi movl $0x54c, %edx # imm = 0x54C callq 0x29edc jmp 0x51778 leaq 0x2de3b1(%rip), %rax # 0x32fe50 movq (%rax), %rax callq *0x160(%rax) jmp 0x5188c leaq -0x60(%rbp), %rcx movq %rax, %rdi movl %ebx, %esi movq %r13, %rdx movq %rcx, %rbx callq 0x29de0 movq (%rbx), %rax jmp 0x517c5 leaq 0x2de380(%rip), %rax # 0x32fe50 movq (%rax), %rax callq *0x160(%rax) jmp 0x519fd movq %rax, %rcx leaq 0x2de368(%rip), %rax # 0x32fe50 movq (%rax), %rax leaq 0x40f81(%rip), %rdx # 0x92a73 movq %rcx, -0x48(%rbp) movq %rcx, %rdi movq %r13, %rsi movl $0x569, %ecx # imm = 0x569 callq *0x210(%rax) movl %ebx, %edi movq -0x40(%rbp), %rsi movq %r13, %rdx movq -0x30(%rbp), %rcx callq 0x5ad50 movq %rax, %rbx xorl %esi, %esi testq %rax, %rax movl $0x0, %eax cmoveq %r13, %rax cmpq $-0x1, %rbx cmovneq %rbx, %rsi testb $0x6, -0x30(%rbp) cmovneq %rax, %rsi leaq 0x2de30f(%rip), %rax # 0x32fe50 movq (%rax), %rax movq -0x48(%rbp), %rdi callq *0x218(%rax) jmp 0x51901 movq %rax, %rcx leaq 0x2de2f3(%rip), %rax # 0x32fe50 movq (%rax), %rax leaq 0x40f0c(%rip), %rdx # 0x92a73 movq %rcx, -0x58(%rbp) movq %rcx, %rdi movq %rbx, %rsi movl $0x589, %ecx # imm = 0x589 callq *0x210(%rax) movl %r13d, %edi movq -0x50(%rbp), %rsi movq %rbx, %rdx movq -0x30(%rbp), %rcx callq 0x5ad50 movq %rax, %r13 xorl %esi, %esi testq %rax, %rax cmovneq %rsi, %rbx cmpq $-0x1, %rax cmovneq %rax, %rsi testb $0x6, -0x30(%rbp) cmovneq %rbx, %rsi leaq 0x2de29e(%rip), %rax # 0x32fe50 movq (%rax), %rax movq -0x58(%rbp), %rdi callq *0x218(%rax) movq %r13, %rax jmp 0x519a6 leaq 0x2de282(%rip), %rax # 0x32fe50 movq (%rax), %rax callq *0x160(%rax) jmp 0x51a51
_my_b_seq_read: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 88h mov r12, rdx mov [rbp+var_40], rsi mov r14, rdi lea r15, [rdi+50h] cmp qword ptr [rdi+90h], 0 jnz loc_51A7F mov rdi, r15 call _pthread_mutex_lock loc_51778: mov r13, [r14+18h] sub r13, [r14+20h] add r13, [r14] cmp r13, [r14+8] jnb short loc_517FB mov ebx, [r14+0D4h] lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_A8] mov esi, ebx mov edx, 8 call qword ptr [rax+158h] test rax, rax jnz loc_51AAD mov edi, ebx mov rsi, r13 xor edx, edx xor ecx, ecx call my_seek loc_517C5: cmp rax, 0FFFFFFFFFFFFFFFFh jz loc_519E2 mov dword ptr [r14+0E0h], 0 mov eax, r13d and eax, 0FFFh mov ecx, 2000h sub rcx, rax cmp rcx, r12 jbe loc_518A2 mov rdx, r12 jmp loc_51928 loc_517FB: mov [rbp+var_38], r13 mov [rbp+var_30], r15 mov r13, r12 loc_51806: mov rsi, [r14+38h] mov r15, [r14+40h] sub r15, rsi cmp r13, r15 mov rbx, r15 cmovb rbx, r13 mov rdi, [rbp+var_40] mov rdx, rbx call _memcpy mov rsi, [r14+38h] add rsi, rbx mov [r14+38h], rsi cmp r13, r15 jbe short loc_51845 sub r12d, r13d lea eax, [rbx+r12] mov [r14+0E4h], eax loc_51845: mov rdi, [r14+20h] mov r12, r15 sub r12, rbx mov rdx, r12 call _memcpy mov rax, [r14+20h] mov rcx, [r14+40h] mov [r14+10h], rax add r12, rax mov [r14+18h], r12 mov [r14+38h], rcx mov rax, [rbp+var_38] add rax, rbx mov [r14], rax add [r14+8], r15 mov rdi, [r14+90h] test rdi, rdi jnz loc_51A98 loc_5188C: xor ebx, ebx cmp r13, r15 setnbe bl mov rdi, [rbp+var_30] call _pthread_mutex_unlock jmp loc_51A0A loc_518A2: mov [rbp+var_38], r13 mov r13d, r12d and r13d, 0FFFFF000h sub r13, rax mov ebx, [r14+0D4h] mov rax, [r14+0F8h] mov [rbp+var_30], rax lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_A8] mov esi, ebx mov edx, 6 call qword ptr [rax+158h] test rax, rax jnz loc_51ADE mov edi, ebx mov rsi, [rbp+var_40] mov rdx, r13 mov rcx, [rbp+var_30] call my_read mov rbx, rax loc_51901: cmp rbx, 0FFFFFFFFFFFFFFFFh jz loc_519E2 mov rdx, r12 sub rdx, rbx add [rbp+var_40], rbx add [rbp+var_38], rbx cmp rbx, r13 jnz loc_51A27 xor eax, eax mov r13, [rbp+var_38] loc_51928: mov rbx, [r14+8] mov rcx, [r14+0F0h] sub rcx, rax sub rbx, r13 cmp rcx, rbx cmovb rbx, rcx test rbx, rbx jz loc_51A1E mov [rbp+var_48], rdx mov [rbp+var_38], r13 mov r13d, [r14+0D4h] mov rax, [r14+20h] mov [rbp+var_50], rax mov rax, [r14+0F8h] mov [rbp+var_30], rax lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_A8] mov esi, r13d mov edx, 6 call qword ptr [rax+158h] test rax, rax jnz loc_51B53 mov edi, r13d mov rsi, [rbp+var_50] mov rdx, rbx mov rcx, [rbp+var_30] call my_read loc_519A6: cmp rax, 0FFFFFFFFFFFFFFFFh mov rdx, [rbp+var_48] jz short loc_519E2 mov r13, rdx sub r13, rax jbe short loc_51A33 mov [rbp+var_30], r15 mov rsi, [r14+20h] mov rbx, [rbp+var_40] mov rdi, rbx mov rdx, rax mov r15, rax call _memcpy add rbx, r15 mov [rbp+var_40], rbx add [rbp+var_38], r15 jmp loc_51806 loc_519E2: mov dword ptr [r14+0E4h], 0FFFFFFFFh mov rdi, [r14+90h] test rdi, rdi jnz loc_51AC9 loc_519FD: mov rdi, r15 call _pthread_mutex_unlock mov ebx, 1 loc_51A0A: mov eax, ebx add rsp, 88h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_51A1E: test rdx, rdx jz short loc_51A39 mov [rbp+var_38], r13 loc_51A27: mov [rbp+var_30], r15 mov r13, rdx jmp loc_51806 loc_51A33: mov r13, [rbp+var_38] jmp short loc_51A3B loc_51A39: xor eax, eax loc_51A3B: mov r12, rax mov rbx, rdx mov rdi, [r14+90h] test rdi, rdi jnz loc_51BC7 loc_51A51: mov rdi, r15 call _pthread_mutex_unlock mov rsi, [r14+20h] mov rdx, rbx lea rax, [rsi+rbx] mov [r14+10h], rax add r12, rsi mov [r14+18h], r12 mov [r14], r13 mov rdi, [rbp+var_40] call _memcpy xor ebx, ebx jmp short loc_51A0A loc_51A7F: lea rsi, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r15 mov edx, 54Ch call psi_mutex_lock jmp loc_51778 loc_51A98: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_5188C loc_51AAD: lea rcx, [rbp+var_60] mov rdi, rax mov esi, ebx mov rdx, r13 mov rbx, rcx call _my_b_seq_read_cold_1 mov rax, [rbx] jmp loc_517C5 loc_51AC9: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_519FD loc_51ADE: mov rcx, rax lea rax, PSI_server mov rax, [rax] lea rdx, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/eloqsq"... mov [rbp+var_48], rcx mov rdi, rcx mov rsi, r13 mov ecx, 569h call qword ptr [rax+210h] mov edi, ebx mov rsi, [rbp+var_40] mov rdx, r13 mov rcx, [rbp+var_30] call my_read mov rbx, rax xor esi, esi test rax, rax mov eax, 0 cmovz rax, r13 cmp rbx, 0FFFFFFFFFFFFFFFFh cmovnz rsi, rbx test byte ptr [rbp+var_30], 6 cmovnz rsi, rax lea rax, PSI_server mov rax, [rax] mov rdi, [rbp+var_48] call qword ptr [rax+218h] jmp loc_51901 loc_51B53: mov rcx, rax lea rax, PSI_server mov rax, [rax] lea rdx, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/eloqsq"... mov [rbp+var_58], rcx mov rdi, rcx mov rsi, rbx mov ecx, 589h call qword ptr [rax+210h] mov edi, r13d mov rsi, [rbp+var_50] mov rdx, rbx mov rcx, [rbp+var_30] call my_read mov r13, rax xor esi, esi test rax, rax cmovnz rbx, rsi cmp rax, 0FFFFFFFFFFFFFFFFh cmovnz rsi, rax test byte ptr [rbp+var_30], 6 cmovnz rsi, rbx lea rax, PSI_server mov rax, [rax] mov rdi, [rbp+var_58] call qword ptr [rax+218h] mov rax, r13 jmp loc_519A6 loc_51BC7: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_51A51
_BOOL8 my_b_seq_read(long long a1, unsigned long long a2, unsigned long long a3) { long long v4; // r15 unsigned long long v5; // r13 unsigned int v6; // ebx long long v7; // rax unsigned long long v8; // rsi long long v9; // rax unsigned long long v10; // rdx unsigned long long v11; // rax unsigned long long v12; // r13 long long v13; // rsi unsigned long long v14; // r15 unsigned long long v15; // rbx unsigned long long v16; // rsi long long v17; // rax long long v18; // rcx BOOL v19; // ebx unsigned long long v20; // r13 unsigned int v21; // ebx long long v22; // rax long long v23; // rbx unsigned long long v24; // rbx unsigned int v25; // r13d long long v26; // rax unsigned long long v27; // rax unsigned long long v28; // rbx unsigned long long v29; // r15 long long v30; // rdi unsigned long long v32; // r12 unsigned long long v33; // rbx long long v34; // rsi unsigned long long v35; // rax long long v36; // rax unsigned long long v37; // r13 _BYTE v38[72]; // [rsp+8h] [rbp-A8h] BYREF long long v39; // [rsp+50h] [rbp-60h] BYREF long long v40; // [rsp+58h] [rbp-58h] unsigned long long v41; // [rsp+60h] [rbp-50h] unsigned long long v42; // [rsp+68h] [rbp-48h] unsigned long long v43; // [rsp+70h] [rbp-40h] unsigned long long v44; // [rsp+78h] [rbp-38h] long long v45; // [rsp+80h] [rbp-30h] v43 = a2; v4 = a1 + 80; if ( *(_QWORD *)(a1 + 144) ) psi_mutex_lock(a1 + 80, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 0x54Cu); else pthread_mutex_lock(a1 + 80); v5 = *(_QWORD *)a1 + *(_QWORD *)(a1 + 24) - *(_QWORD *)(a1 + 32); if ( v5 >= *(_QWORD *)(a1 + 8) ) { v44 = *(_QWORD *)a1 + *(_QWORD *)(a1 + 24) - *(_QWORD *)(a1 + 32); v45 = a1 + 80; v12 = a3; LABEL_10: v13 = *(_QWORD *)(a1 + 56); v14 = *(_QWORD *)(a1 + 64) - v13; v15 = v14; if ( v12 < v14 ) v15 = v12; memcpy(v43, v13, v15); v16 = v15 + *(_QWORD *)(a1 + 56); *(_QWORD *)(a1 + 56) = v16; if ( v12 > v14 ) *(_DWORD *)(a1 + 228) = v15 + a3 - v12; memcpy(*(_QWORD *)(a1 + 32), v16, v14 - v15); v17 = *(_QWORD *)(a1 + 32); v18 = *(_QWORD *)(a1 + 64); *(_QWORD *)(a1 + 16) = v17; *(_QWORD *)(a1 + 24) = v17 + v14 - v15; *(_QWORD *)(a1 + 56) = v18; *(_QWORD *)a1 = v15 + v44; *(_QWORD *)(a1 + 8) += v14; if ( *(_QWORD *)(a1 + 144) ) PSI_server[44](); v19 = v12 > v14; pthread_mutex_unlock(v45); return v19; } v6 = *(_DWORD *)(a1 + 212); v7 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v38, v6, 8LL); if ( v7 ) { v8 = v6; my_b_seq_read_cold_1(v7, v6, v5, &v39); v9 = v39; } else { v8 = v5; v9 = my_seek(v6, v5, 0LL, 0LL); } if ( v9 == -1 ) goto LABEL_30; *(_DWORD *)(a1 + 224) = 0; v11 = v5 & 0xFFF; if ( 0x2000 - v11 <= a3 ) { v44 = v5; v20 = ((unsigned int)a3 & 0xFFFFF000) - v11; v21 = *(_DWORD *)(a1 + 212); v45 = *(_QWORD *)(a1 + 248); v22 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v38, v21, 6LL); if ( v22 ) { v42 = v22; ((void ( *)(long long, unsigned long long, const char *, long long))PSI_server[66])( v22, v20, "/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 1385LL); v23 = my_read(v21, v43, v20, v45); v8 = 0LL; v35 = 0LL; if ( !v23 ) v35 = v20; if ( v23 != -1 ) v8 = v23; if ( (v45 & 6) != 0 ) v8 = v35; ((void ( *)(unsigned long long, unsigned long long))PSI_server[67])(v42, v8); } else { v8 = v43; v23 = my_read(v21, v43, v20, v45); } if ( v23 == -1 ) goto LABEL_30; v10 = a3 - v23; v43 += v23; v44 += v23; if ( v23 != v20 ) { LABEL_36: v45 = a1 + 80; v12 = v10; goto LABEL_10; } v11 = 0LL; v5 = v44; } else { v10 = a3; } v24 = *(_QWORD *)(a1 + 8) - v5; if ( *(_QWORD *)(a1 + 240) - v11 < v24 ) v24 = *(_QWORD *)(a1 + 240) - v11; if ( !v24 ) { if ( !v10 ) { v27 = 0LL; LABEL_39: v32 = v27; v33 = v10; if ( *(_QWORD *)(a1 + 144) ) PSI_server[44](); pthread_mutex_unlock(v4); v34 = *(_QWORD *)(a1 + 32); *(_QWORD *)(a1 + 16) = v34 + v33; *(_QWORD *)(a1 + 24) = v34 + v32; *(_QWORD *)a1 = v5; memcpy(v43, v34, v33); return 0; } v44 = v5; goto LABEL_36; } v42 = v10; v44 = v5; v25 = *(_DWORD *)(a1 + 212); v41 = *(_QWORD *)(a1 + 32); v45 = *(_QWORD *)(a1 + 248); v26 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v38, v25, 6LL); if ( v26 ) { v40 = v26; ((void ( *)(long long, unsigned long long, const char *, long long))PSI_server[66])( v26, v24, "/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 1417LL); v36 = my_read(v25, v41, v24, v45); v37 = v36; v8 = 0LL; if ( v36 ) v24 = 0LL; if ( v36 != -1 ) v8 = v36; if ( (v45 & 6) != 0 ) v8 = v24; ((void ( *)(long long))PSI_server[67])(v40); v27 = v37; } else { v8 = v41; v27 = my_read(v25, v41, v24, v45); } v10 = v42; if ( v27 != -1LL ) { v12 = v42 - v27; if ( v42 > v27 ) { v45 = a1 + 80; v28 = v43; v29 = v27; memcpy(v43, *(_QWORD *)(a1 + 32), v27); v43 = v29 + v28; v44 += v29; goto LABEL_10; } v5 = v44; goto LABEL_39; } LABEL_30: *(_DWORD *)(a1 + 228) = -1; v30 = *(_QWORD *)(a1 + 144); if ( v30 ) ((void ( *)(long long, unsigned long long, unsigned long long))PSI_server[44])(v30, v8, v10); pthread_mutex_unlock(v4); return 1; }
_my_b_seq_read: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x88 MOV R12,RDX MOV qword ptr [RBP + -0x40],RSI MOV R14,RDI LEA R15,[RDI + 0x50] CMP qword ptr [RDI + 0x90],0x0 JNZ 0x00151a7f MOV RDI,R15 CALL 0x00128560 LAB_00151778: MOV R13,qword ptr [R14 + 0x18] SUB R13,qword ptr [R14 + 0x20] ADD R13,qword ptr [R14] CMP R13,qword ptr [R14 + 0x8] JNC 0x001517fb MOV EBX,dword ptr [R14 + 0xd4] LEA RAX,[0x42fe50] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0xa8] MOV ESI,EBX MOV EDX,0x8 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x00151aad MOV EDI,EBX MOV RSI,R13 XOR EDX,EDX XOR ECX,ECX CALL 0x0015af50 LAB_001517c5: CMP RAX,-0x1 JZ 0x001519e2 MOV dword ptr [R14 + 0xe0],0x0 MOV EAX,R13D AND EAX,0xfff MOV ECX,0x2000 SUB RCX,RAX CMP RCX,R12 JBE 0x001518a2 MOV RDX,R12 JMP 0x00151928 LAB_001517fb: MOV qword ptr [RBP + -0x38],R13 MOV qword ptr [RBP + -0x30],R15 MOV R13,R12 LAB_00151806: MOV RSI,qword ptr [R14 + 0x38] MOV R15,qword ptr [R14 + 0x40] SUB R15,RSI CMP R13,R15 MOV RBX,R15 CMOVC RBX,R13 MOV RDI,qword ptr [RBP + -0x40] MOV RDX,RBX CALL 0x001282c0 MOV RSI,qword ptr [R14 + 0x38] ADD RSI,RBX MOV qword ptr [R14 + 0x38],RSI CMP R13,R15 JBE 0x00151845 SUB R12D,R13D LEA EAX,[RBX + R12*0x1] MOV dword ptr [R14 + 0xe4],EAX LAB_00151845: MOV RDI,qword ptr [R14 + 0x20] MOV R12,R15 SUB R12,RBX MOV RDX,R12 CALL 0x001282c0 MOV RAX,qword ptr [R14 + 0x20] MOV RCX,qword ptr [R14 + 0x40] MOV qword ptr [R14 + 0x10],RAX ADD R12,RAX MOV qword ptr [R14 + 0x18],R12 MOV qword ptr [R14 + 0x38],RCX MOV RAX,qword ptr [RBP + -0x38] ADD RAX,RBX MOV qword ptr [R14],RAX ADD qword ptr [R14 + 0x8],R15 MOV RDI,qword ptr [R14 + 0x90] TEST RDI,RDI JNZ 0x00151a98 LAB_0015188c: XOR EBX,EBX CMP R13,R15 SETA BL MOV RDI,qword ptr [RBP + -0x30] CALL 0x00128270 JMP 0x00151a0a LAB_001518a2: MOV qword ptr [RBP + -0x38],R13 MOV R13D,R12D AND R13D,0xfffff000 SUB R13,RAX MOV EBX,dword ptr [R14 + 0xd4] MOV RAX,qword ptr [R14 + 0xf8] MOV qword ptr [RBP + -0x30],RAX LEA RAX,[0x42fe50] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0xa8] MOV ESI,EBX MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x00151ade MOV EDI,EBX MOV RSI,qword ptr [RBP + -0x40] MOV RDX,R13 MOV RCX,qword ptr [RBP + -0x30] CALL 0x0015ad50 MOV RBX,RAX LAB_00151901: CMP RBX,-0x1 JZ 0x001519e2 MOV RDX,R12 SUB RDX,RBX ADD qword ptr [RBP + -0x40],RBX ADD qword ptr [RBP + -0x38],RBX CMP RBX,R13 JNZ 0x00151a27 XOR EAX,EAX MOV R13,qword ptr [RBP + -0x38] LAB_00151928: MOV RBX,qword ptr [R14 + 0x8] MOV RCX,qword ptr [R14 + 0xf0] SUB RCX,RAX SUB RBX,R13 CMP RCX,RBX CMOVC RBX,RCX TEST RBX,RBX JZ 0x00151a1e MOV qword ptr [RBP + -0x48],RDX MOV qword ptr [RBP + -0x38],R13 MOV R13D,dword ptr [R14 + 0xd4] MOV RAX,qword ptr [R14 + 0x20] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [R14 + 0xf8] MOV qword ptr [RBP + -0x30],RAX LEA RAX,[0x42fe50] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0xa8] MOV ESI,R13D MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x00151b53 MOV EDI,R13D MOV RSI,qword ptr [RBP + -0x50] MOV RDX,RBX MOV RCX,qword ptr [RBP + -0x30] CALL 0x0015ad50 LAB_001519a6: CMP RAX,-0x1 MOV RDX,qword ptr [RBP + -0x48] JZ 0x001519e2 MOV R13,RDX SUB R13,RAX JBE 0x00151a33 MOV qword ptr [RBP + -0x30],R15 MOV RSI,qword ptr [R14 + 0x20] MOV RBX,qword ptr [RBP + -0x40] MOV RDI,RBX MOV RDX,RAX MOV R15,RAX CALL 0x001282c0 ADD RBX,R15 MOV qword ptr [RBP + -0x40],RBX ADD qword ptr [RBP + -0x38],R15 JMP 0x00151806 LAB_001519e2: MOV dword ptr [R14 + 0xe4],0xffffffff MOV RDI,qword ptr [R14 + 0x90] TEST RDI,RDI JNZ 0x00151ac9 LAB_001519fd: MOV RDI,R15 CALL 0x00128270 MOV EBX,0x1 LAB_00151a0a: MOV EAX,EBX ADD RSP,0x88 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00151a1e: TEST RDX,RDX JZ 0x00151a39 MOV qword ptr [RBP + -0x38],R13 LAB_00151a27: MOV qword ptr [RBP + -0x30],R15 MOV R13,RDX JMP 0x00151806 LAB_00151a33: MOV R13,qword ptr [RBP + -0x38] JMP 0x00151a3b LAB_00151a39: XOR EAX,EAX LAB_00151a3b: MOV R12,RAX MOV RBX,RDX MOV RDI,qword ptr [R14 + 0x90] TEST RDI,RDI JNZ 0x00151bc7 LAB_00151a51: MOV RDI,R15 CALL 0x00128270 MOV RSI,qword ptr [R14 + 0x20] MOV RDX,RBX LEA RAX,[RSI + RBX*0x1] MOV qword ptr [R14 + 0x10],RAX ADD R12,RSI MOV qword ptr [R14 + 0x18],R12 MOV qword ptr [R14],R13 MOV RDI,qword ptr [RBP + -0x40] CALL 0x001282c0 XOR EBX,EBX JMP 0x00151a0a LAB_00151a7f: LEA RSI,[0x192a73] MOV RDI,R15 MOV EDX,0x54c CALL 0x00129edc JMP 0x00151778 LAB_00151a98: LEA RAX,[0x42fe50] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0015188c LAB_00151aad: LEA RCX,[RBP + -0x60] MOV RDI,RAX MOV ESI,EBX MOV RDX,R13 MOV RBX,RCX CALL 0x00129de0 MOV RAX,qword ptr [RBX] JMP 0x001517c5 LAB_00151ac9: LEA RAX,[0x42fe50] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x001519fd LAB_00151ade: MOV RCX,RAX LEA RAX,[0x42fe50] MOV RAX,qword ptr [RAX] LEA RDX,[0x192a73] MOV qword ptr [RBP + -0x48],RCX MOV RDI,RCX MOV RSI,R13 MOV ECX,0x569 CALL qword ptr [RAX + 0x210] MOV EDI,EBX MOV RSI,qword ptr [RBP + -0x40] MOV RDX,R13 MOV RCX,qword ptr [RBP + -0x30] CALL 0x0015ad50 MOV RBX,RAX XOR ESI,ESI TEST RAX,RAX MOV EAX,0x0 CMOVZ RAX,R13 CMP RBX,-0x1 CMOVNZ RSI,RBX TEST byte ptr [RBP + -0x30],0x6 CMOVNZ RSI,RAX LEA RAX,[0x42fe50] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RBP + -0x48] CALL qword ptr [RAX + 0x218] JMP 0x00151901 LAB_00151b53: MOV RCX,RAX LEA RAX,[0x42fe50] MOV RAX,qword ptr [RAX] LEA RDX,[0x192a73] MOV qword ptr [RBP + -0x58],RCX MOV RDI,RCX MOV RSI,RBX MOV ECX,0x589 CALL qword ptr [RAX + 0x210] MOV EDI,R13D MOV RSI,qword ptr [RBP + -0x50] MOV RDX,RBX MOV RCX,qword ptr [RBP + -0x30] CALL 0x0015ad50 MOV R13,RAX XOR ESI,ESI TEST RAX,RAX CMOVNZ RBX,RSI CMP RAX,-0x1 CMOVNZ RSI,RAX TEST byte ptr [RBP + -0x30],0x6 CMOVNZ RSI,RBX LEA RAX,[0x42fe50] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RBP + -0x58] CALL qword ptr [RAX + 0x218] MOV RAX,R13 JMP 0x001519a6 LAB_00151bc7: LEA RAX,[0x42fe50] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00151a51
bool _my_b_seq_read(ulong *param_1,void *param_2,ulong param_3) { int4 uVar1; void *pvVar2; pthread_mutex_t *__mutex; long lVar3; long lVar4; ulong __n; long lVar5; ulong uVar6; long lVar7; uint uVar8; ulong uVar9; ulong uVar10; int1 local_b0 [72]; long local_68; long local_60; ulong local_58; ulong local_50; void *local_48; ulong local_40; pthread_mutex_t *local_38; __mutex = (pthread_mutex_t *)(param_1 + 10); local_48 = param_2; if (param_1[0x12] == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x54c); } uVar9 = (param_1[3] - param_1[4]) + *param_1; uVar8 = (uint)param_3; if (uVar9 < param_1[1]) { uVar1 = *(int4 *)((long)param_1 + 0xd4); lVar3 = (**(code **)(PSI_server + 0x158))(local_b0,uVar1,8); if (lVar3 == 0) { local_68 = my_seek(uVar1,uVar9,0,0); } else { _my_b_seq_read_cold_1(lVar3,uVar1,uVar9); } if (local_68 == -1) { LAB_001519e2: *(int4 *)((long)param_1 + 0xe4) = 0xffffffff; if (param_1[0x12] != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); return true; } *(int4 *)(param_1 + 0x1c) = 0; uVar10 = (ulong)((uint)uVar9 & 0xfff); if (0x2000 - uVar10 <= param_3) { lVar3 = (uVar8 & 0xfffff000) - uVar10; uVar1 = *(int4 *)((long)param_1 + 0xd4); local_38 = (pthread_mutex_t *)param_1[0x1f]; local_40 = uVar9; uVar9 = (**(code **)(PSI_server + 0x158))(local_b0,uVar1,6); if (uVar9 == 0) { lVar4 = my_read(uVar1,local_48,lVar3,local_38); } else { local_50 = uVar9; (**(code **)(PSI_server + 0x210)) (uVar9,lVar3,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x569); lVar4 = my_read(uVar1,local_48,lVar3,local_38); lVar5 = 0; if (lVar4 == 0) { lVar5 = lVar3; } lVar7 = 0; if (lVar4 != -1) { lVar7 = lVar4; } if (((ulong)local_38 & 6) != 0) { lVar7 = lVar5; } (**(code **)(PSI_server + 0x218))(local_50,lVar7); } if (lVar4 == -1) goto LAB_001519e2; param_3 = param_3 - lVar4; local_48 = (void *)((long)local_48 + lVar4); uVar9 = local_40 + lVar4; if (lVar4 != lVar3) goto LAB_00151806; uVar10 = 0; local_40 = uVar9; } uVar6 = param_1[1] - uVar9; if (param_1[0x1e] - uVar10 < param_1[1] - uVar9) { uVar6 = param_1[0x1e] - uVar10; } if (uVar6 == 0) { if (param_3 == 0) { __n = 0; uVar10 = param_3; LAB_00151a3b: if (param_1[0x12] != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); pvVar2 = (void *)param_1[4]; param_1[2] = (long)pvVar2 + uVar10; param_1[3] = __n + (long)pvVar2; *param_1 = uVar9; memcpy(local_48,pvVar2,uVar10); return false; } } else { uVar1 = *(int4 *)((long)param_1 + 0xd4); local_58 = param_1[4]; local_38 = (pthread_mutex_t *)param_1[0x1f]; local_50 = param_3; local_40 = uVar9; lVar3 = (**(code **)(PSI_server + 0x158))(local_b0,uVar1,6); if (lVar3 == 0) { __n = my_read(uVar1,local_58,uVar6,local_38); } else { local_60 = lVar3; (**(code **)(PSI_server + 0x210)) (lVar3,uVar6,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x589); __n = my_read(uVar1,local_58,uVar6,local_38); if (__n != 0) { uVar6 = 0; } uVar9 = 0; if (__n != 0xffffffffffffffff) { uVar9 = __n; } if (((ulong)local_38 & 6) != 0) { uVar9 = uVar6; } (**(code **)(PSI_server + 0x218))(local_60,uVar9); } pvVar2 = local_48; if (__n == 0xffffffffffffffff) goto LAB_001519e2; param_3 = local_50 - __n; uVar10 = local_50; uVar9 = local_40; if (local_50 < __n || param_3 == 0) goto LAB_00151a3b; local_38 = __mutex; memcpy(local_48,(void *)param_1[4],__n); local_48 = (void *)((long)pvVar2 + __n); uVar9 = local_40 + __n; __mutex = local_38; } } LAB_00151806: local_38 = __mutex; local_40 = uVar9; uVar10 = param_1[8] - (long)param_1[7]; uVar9 = uVar10; if (param_3 < uVar10) { uVar9 = param_3; } memcpy(local_48,(void *)param_1[7],uVar9); uVar6 = param_1[7]; param_1[7] = uVar6 + uVar9; if (uVar10 < param_3) { *(uint *)((long)param_1 + 0xe4) = (int)uVar9 + (uVar8 - (int)param_3); } memcpy((void *)param_1[4],(void *)(uVar6 + uVar9),uVar10 - uVar9); param_1[2] = param_1[4]; param_1[3] = (uVar10 - uVar9) + param_1[4]; param_1[7] = param_1[8]; *param_1 = local_40 + uVar9; param_1[1] = param_1[1] + uVar10; if (param_1[0x12] != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(local_38); return uVar10 < param_3; }
28,719
bitmap_is_set_all
eloqsql/mysys/my_bitmap.c
my_bool bitmap_is_set_all(const MY_BITMAP *map) { my_bitmap_map *data_ptr= map->bitmap; my_bitmap_map *end= map->last_word_ptr; for (; data_ptr < end; data_ptr++) if (*data_ptr != 0xFFFFFFFF) return FALSE; return (*data_ptr | map->last_word_mask) == 0xFFFFFFFF; }
O3
c
bitmap_is_set_all: pushq %rbp movq %rsp, %rbp movq (%rdi), %rax movq 0x8(%rdi), %rcx cmpq %rcx, %rax jae 0xa04fd cmpl $-0x1, (%rax) jne 0xa050a addq $0x4, %rax jmp 0xa04ed movl 0x18(%rdi), %ecx orl (%rax), %ecx cmpl $-0x1, %ecx sete %al jmp 0xa050c xorl %eax, %eax popq %rbp retq
bitmap_is_set_all: push rbp mov rbp, rsp mov rax, [rdi] mov rcx, [rdi+8] loc_A04ED: cmp rax, rcx jnb short loc_A04FD cmp dword ptr [rax], 0FFFFFFFFh jnz short loc_A050A add rax, 4 jmp short loc_A04ED loc_A04FD: mov ecx, [rdi+18h] or ecx, [rax] cmp ecx, 0FFFFFFFFh setz al jmp short loc_A050C loc_A050A: xor eax, eax loc_A050C: pop rbp retn
bool bitmap_is_set_all(long long a1) { _DWORD *i; // rax for ( i = *(_DWORD **)a1; ; ++i ) { if ( (unsigned long long)i >= *(_QWORD *)(a1 + 8) ) return (*i | *(_DWORD *)(a1 + 24)) == -1; if ( *i != -1 ) break; } return 0; }
bitmap_is_set_all: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDI] MOV RCX,qword ptr [RDI + 0x8] LAB_001a04ed: CMP RAX,RCX JNC 0x001a04fd CMP dword ptr [RAX],-0x1 JNZ 0x001a050a ADD RAX,0x4 JMP 0x001a04ed LAB_001a04fd: MOV ECX,dword ptr [RDI + 0x18] OR ECX,dword ptr [RAX] CMP ECX,-0x1 SETZ AL JMP 0x001a050c LAB_001a050a: XOR EAX,EAX LAB_001a050c: POP RBP RET
int8 bitmap_is_set_all(int8 *param_1) { uint *puVar1; puVar1 = (uint *)*param_1; while( true ) { if ((uint *)param_1[1] <= puVar1) { return CONCAT71((int7)((ulong)puVar1 >> 8),(*(uint *)(param_1 + 3) | *puVar1) == 0xffffffff); } if (*puVar1 != 0xffffffff) break; puVar1 = puVar1 + 1; } return 0; }
28,720
js_async_generator_resolve_function
bluesky950520[P]quickjs/quickjs.c
static JSValue js_async_generator_resolve_function(JSContext *ctx, JSValue this_obj, int argc, JSValue *argv, int magic, JSValue *func_data) { BOOL is_reject = magic & 1; JSAsyncGeneratorData *s = JS_GetOpaque(func_data[0], JS_CLASS_ASYNC_GENERATOR); JSValue arg = argv[0]; /* XXX: what if s == NULL */ if (magic >= 2) { /* resume next case in AWAITING_RETURN state */ assert(s->state == JS_ASYNC_GENERATOR_STATE_AWAITING_RETURN || s->state == JS_ASYNC_GENERATOR_STATE_COMPLETED); s->state = JS_ASYNC_GENERATOR_STATE_COMPLETED; if (is_reject) { js_async_generator_reject(ctx, s, arg); } else { js_async_generator_resolve(ctx, s, arg, TRUE); } } else { /* restart function execution after await() */ assert(s->state == JS_ASYNC_GENERATOR_STATE_EXECUTING); s->func_state.throw_flag = is_reject; if (is_reject) { JS_Throw(ctx, js_dup(arg)); } else { /* return value of await */ s->func_state.frame.cur_sp[-1] = js_dup(arg); } js_async_generator_resume_next(ctx, s); } return JS_UNDEFINED; }
O1
c
js_async_generator_resolve_function: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x40(%rsp), %rax movsd (%rax), %xmm0 movl 0x8(%rax), %eax movsd %xmm0, (%rsp) cmpl $-0x1, %eax jne 0x55ddc movq (%rsp), %rax cmpw $0x39, 0x6(%rax) jne 0x55ddc movq 0x30(%rax), %r14 jmp 0x55ddf xorl %r14d, %r14d movl %r9d, %eax andl $0x1, %eax movq (%r8), %r12 movq 0x8(%r8), %r15 cmpl $0x2, %r9d jl 0x55e17 movl $0x5, 0x8(%r14) movq %rbx, %rdi movq %r14, %rsi movq %r12, %rdx movq %r15, %rcx movl $0x1, %r8d testl %eax, %eax jne 0x55e3d callq 0x55a90 jmp 0x55e8b movl %eax, 0x24(%r14) testl %eax, %eax jne 0x55e44 movq 0x70(%r14), %rbp movq %r12, (%rsp) cmpl $-0x9, %r15d jb 0x55e33 movq (%rsp), %rax incl (%rax) movq %r12, -0x10(%rbp) addq $-0x8, %rbp jmp 0x55e7c callq 0x55c30 jmp 0x55e8b movq %r12, (%rsp) cmpl $-0x9, %r15d jb 0x55e54 movq (%rsp), %rax incl (%rax) movq 0x18(%rbx), %r13 leaq 0xf8(%r13), %rbp movq 0xf0(%r13), %rsi movq 0xf8(%r13), %rdx movq %r13, %rdi callq 0x1d8c6 movq %r12, 0xf0(%r13) movq %r15, (%rbp) movq %rbx, %rdi movq %r14, %rsi callq 0x556ae movl $0x3, %edx xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_async_generator_resolve_function: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi mov rax, [rsp+38h+arg_0] movsd xmm0, qword ptr [rax] mov eax, [rax+8] movsd [rsp+38h+var_38], xmm0 cmp eax, 0FFFFFFFFh jnz short loc_55DDC mov rax, [rsp+38h+var_38] cmp word ptr [rax+6], 39h ; '9' jnz short loc_55DDC mov r14, [rax+30h] jmp short loc_55DDF loc_55DDC: xor r14d, r14d loc_55DDF: mov eax, r9d and eax, 1 mov r12, [r8] mov r15, [r8+8] cmp r9d, 2 jl short loc_55E17 mov dword ptr [r14+8], 5 mov rdi, rbx mov rsi, r14 mov rdx, r12 mov rcx, r15 mov r8d, 1 test eax, eax jnz short loc_55E3D call js_async_generator_resolve jmp short loc_55E8B loc_55E17: mov [r14+24h], eax test eax, eax jnz short loc_55E44 mov rbp, [r14+70h] mov [rsp+38h+var_38], r12 cmp r15d, 0FFFFFFF7h jb short loc_55E33 mov rax, [rsp+38h+var_38] inc dword ptr [rax] loc_55E33: mov [rbp-10h], r12 add rbp, 0FFFFFFFFFFFFFFF8h jmp short loc_55E7C loc_55E3D: call js_async_generator_resolve_or_reject jmp short loc_55E8B loc_55E44: mov [rsp+38h+var_38], r12 cmp r15d, 0FFFFFFF7h jb short loc_55E54 mov rax, [rsp+38h+var_38] inc dword ptr [rax] loc_55E54: mov r13, [rbx+18h] lea rbp, [r13+0F8h] mov rsi, [r13+0F0h] mov rdx, [r13+0F8h] mov rdi, r13 call JS_FreeValueRT mov [r13+0F0h], r12 loc_55E7C: mov [rbp+0], r15 mov rdi, rbx mov rsi, r14 call js_async_generator_resume_next loc_55E8B: mov edx, 3 xor eax, eax add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long js_async_generator_resolve_function( long long a1, double a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, long long a10, long long a11, long long a12, long long a13, long long a14, unsigned long long *a15) { __m128 v15; // xmm0 long long v16; // r14 _DWORD *v17; // r12 long long v18; // r15 long long v19; // rbp long long *v20; // rbp long long v21; // r13 long long v23; // [rsp+0h] [rbp-38h] v15 = (__m128)*a15; v23 = *a15; if ( *((_DWORD *)a15 + 2) == -1 && *(_WORD *)(v23 + 6) == 57 ) v16 = *(_QWORD *)(v23 + 48); else v16 = 0LL; v17 = *(_DWORD **)a13; v18 = *(_QWORD *)(a13 + 8); if ( (int)a14 < 2 ) { *(_DWORD *)(v16 + 36) = a14 & 1; if ( (a14 & 1) != 0 ) { if ( (unsigned int)v18 >= 0xFFFFFFF7 ) ++*v17; v21 = *(_QWORD *)(a1 + 24); v20 = (long long *)(v21 + 248); JS_FreeValueRT(v21, *(_DWORD **)(v21 + 240), *(_QWORD *)(v21 + 248)); *(_QWORD *)(v21 + 240) = v17; } else { v19 = *(_QWORD *)(v16 + 112); if ( (unsigned int)v18 >= 0xFFFFFFF7 ) ++*v17; *(_QWORD *)(v19 - 16) = v17; v20 = (long long *)(v19 - 8); } *v20 = v18; js_async_generator_resume_next((const char *)a1, v16, a11, v15, a3, a4, a5, a6, a7, a8, a9, a12, a13, a14); } else { *(_DWORD *)(v16 + 8) = 5; if ( (a14 & 1) != 0 ) js_async_generator_resolve_or_reject( a1, v16, (long long)v17, v18, 1u, *(double *)v15.m128_u64, a3, a4, a5, a6, a7, a8, a9); else js_async_generator_resolve( a1, v16, v17, v18, 1, *(double *)v15.m128_u64, a3, a4, a5, *(double *)a6.m128_u64, *(double *)a7.m128_u64, a8, a9); } return 0LL; }
28,721
js_async_generator_resolve_function
bluesky950520[P]quickjs/quickjs.c
static JSValue js_async_generator_resolve_function(JSContext *ctx, JSValue this_obj, int argc, JSValue *argv, int magic, JSValue *func_data) { BOOL is_reject = magic & 1; JSAsyncGeneratorData *s = JS_GetOpaque(func_data[0], JS_CLASS_ASYNC_GENERATOR); JSValue arg = argv[0]; /* XXX: what if s == NULL */ if (magic >= 2) { /* resume next case in AWAITING_RETURN state */ assert(s->state == JS_ASYNC_GENERATOR_STATE_AWAITING_RETURN || s->state == JS_ASYNC_GENERATOR_STATE_COMPLETED); s->state = JS_ASYNC_GENERATOR_STATE_COMPLETED; if (is_reject) { js_async_generator_reject(ctx, s, arg); } else { js_async_generator_resolve(ctx, s, arg, TRUE); } } else { /* restart function execution after await() */ assert(s->state == JS_ASYNC_GENERATOR_STATE_EXECUTING); s->func_state.throw_flag = is_reject; if (is_reject) { JS_Throw(ctx, js_dup(arg)); } else { /* return value of await */ s->func_state.frame.cur_sp[-1] = js_dup(arg); } js_async_generator_resume_next(ctx, s); } return JS_UNDEFINED; }
O2
c
js_async_generator_resolve_function: pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x20(%rsp), %rax cmpl $-0x1, 0x8(%rax) jne 0x49977 movq (%rax), %rax cmpw $0x39, 0x6(%rax) jne 0x49977 movq 0x30(%rax), %r14 jmp 0x4997a xorl %r14d, %r14d movl %r9d, %eax andl $0x1, %eax movq (%r8), %rdx movq 0x8(%r8), %rcx cmpl $0x2, %r9d jl 0x499aa movl $0x5, 0x8(%r14) testl %eax, %eax jne 0x499c7 pushq $0x1 popq %r8 movq %rbx, %rdi movq %r14, %rsi callq 0x497a5 jmp 0x499f4 movl %eax, 0x24(%r14) testl %eax, %eax jne 0x499d4 movq 0x70(%r14), %rax cmpl $-0x9, %ecx jb 0x499bd incl (%rdx) movq %rdx, -0x10(%rax) movq %rcx, -0x8(%rax) jmp 0x499e9 movq %rbx, %rdi movq %r14, %rsi callq 0x497fe jmp 0x499f4 cmpl $-0x9, %ecx jb 0x499db incl (%rdx) movq %rbx, %rdi movq %rdx, %rsi movq %rcx, %rdx callq 0x1c446 movq %rbx, %rdi movq %r14, %rsi callq 0x49365 pushq $0x3 popq %rdx xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 retq
js_async_generator_resolve_function: push r14 push rbx push rax mov rbx, rdi mov rax, [rsp+18h+arg_0] cmp dword ptr [rax+8], 0FFFFFFFFh jnz short loc_49977 mov rax, [rax] cmp word ptr [rax+6], 39h ; '9' jnz short loc_49977 mov r14, [rax+30h] jmp short loc_4997A loc_49977: xor r14d, r14d loc_4997A: mov eax, r9d and eax, 1 mov rdx, [r8] mov rcx, [r8+8] cmp r9d, 2 jl short loc_499AA mov dword ptr [r14+8], 5 test eax, eax jnz short loc_499C7 push 1 pop r8 mov rdi, rbx mov rsi, r14 call js_async_generator_resolve jmp short loc_499F4 loc_499AA: mov [r14+24h], eax test eax, eax jnz short loc_499D4 mov rax, [r14+70h] cmp ecx, 0FFFFFFF7h jb short loc_499BD inc dword ptr [rdx] loc_499BD: mov [rax-10h], rdx mov [rax-8], rcx jmp short loc_499E9 loc_499C7: mov rdi, rbx mov rsi, r14 call js_async_generator_reject jmp short loc_499F4 loc_499D4: cmp ecx, 0FFFFFFF7h jb short loc_499DB inc dword ptr [rdx] loc_499DB: mov rdi, rbx mov rsi, rdx mov rdx, rcx call JS_Throw loc_499E9: mov rdi, rbx mov rsi, r14 call js_async_generator_resume_next loc_499F4: push 3 pop rdx xor eax, eax add rsp, 8 pop rbx pop r14 retn
long long js_async_generator_resolve_function( const char *a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, long long a10, long long a11, long long a12, long long a13, long long a14, _DWORD *a15) { long long v15; // r14 _DWORD *v16; // rdx long long v17; // rcx long long v18; // rax if ( a15[2] == -1 && *(_WORD *)(*(_QWORD *)a15 + 6LL) == 57 ) v15 = *(_QWORD *)(*(_QWORD *)a15 + 48LL); else v15 = 0LL; v16 = *(_DWORD **)a13; v17 = *(_QWORD *)(a13 + 8); if ( (int)a14 < 2 ) { *(_DWORD *)(v15 + 36) = a14 & 1; if ( (a14 & 1) != 0 ) { if ( (unsigned int)v17 >= 0xFFFFFFF7 ) ++*v16; JS_Throw((long long)a1, (long long)v16, v17); } else { v18 = *(_QWORD *)(v15 + 112); if ( (unsigned int)v17 >= 0xFFFFFFF7 ) ++*v16; *(_QWORD *)(v18 - 16) = v16; *(_QWORD *)(v18 - 8) = v17; } js_async_generator_resume_next(a1, v15, (long long)v16, a2, a3, a4, a5, a6, a7, a8, a9, v17, a13, a14); } else { *(_DWORD *)(v15 + 8) = 5; if ( (a14 & 1) != 0 ) js_async_generator_reject((long long)a1, v15, (long long)v16, v17); else js_async_generator_resolve( (long long)a1, v15, v16, v17, 1, *(double *)a2.m128_u64, a3, a4, a5, *(double *)a6.m128_u64, *(double *)a7.m128_u64, a8, a9); } return 0LL; }
js_async_generator_resolve_function: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV RAX,qword ptr [RSP + 0x20] CMP dword ptr [RAX + 0x8],-0x1 JNZ 0x00149977 MOV RAX,qword ptr [RAX] CMP word ptr [RAX + 0x6],0x39 JNZ 0x00149977 MOV R14,qword ptr [RAX + 0x30] JMP 0x0014997a LAB_00149977: XOR R14D,R14D LAB_0014997a: MOV EAX,R9D AND EAX,0x1 MOV RDX,qword ptr [R8] MOV RCX,qword ptr [R8 + 0x8] CMP R9D,0x2 JL 0x001499aa MOV dword ptr [R14 + 0x8],0x5 TEST EAX,EAX JNZ 0x001499c7 PUSH 0x1 POP R8 MOV RDI,RBX MOV RSI,R14 CALL 0x001497a5 JMP 0x001499f4 LAB_001499aa: MOV dword ptr [R14 + 0x24],EAX TEST EAX,EAX JNZ 0x001499d4 MOV RAX,qword ptr [R14 + 0x70] CMP ECX,-0x9 JC 0x001499bd INC dword ptr [RDX] LAB_001499bd: MOV qword ptr [RAX + -0x10],RDX MOV qword ptr [RAX + -0x8],RCX JMP 0x001499e9 LAB_001499c7: MOV RDI,RBX MOV RSI,R14 CALL 0x001497fe JMP 0x001499f4 LAB_001499d4: CMP ECX,-0x9 JC 0x001499db INC dword ptr [RDX] LAB_001499db: MOV RDI,RBX MOV RSI,RDX MOV RDX,RCX CALL 0x0011c446 LAB_001499e9: MOV RDI,RBX MOV RSI,R14 CALL 0x00149365 LAB_001499f4: PUSH 0x3 POP RDX XOR EAX,EAX ADD RSP,0x8 POP RBX POP R14 RET
int1 [16] js_async_generator_resolve_function(int8 param_1) { int *piVar1; int8 uVar2; long lVar3; uint uVar4; int8 *in_R8; uint in_R9D; long lVar5; long *in_stack_00000008; if (((int)in_stack_00000008[1] == -1) && (*(short *)(*in_stack_00000008 + 6) == 0x39)) { lVar5 = *(long *)(*in_stack_00000008 + 0x30); } else { lVar5 = 0; } uVar4 = in_R9D & 1; piVar1 = (int *)*in_R8; uVar2 = in_R8[1]; if ((int)in_R9D < 2) { *(uint *)(lVar5 + 0x24) = uVar4; if (uVar4 == 0) { lVar3 = *(long *)(lVar5 + 0x70); if (0xfffffff6 < (uint)uVar2) { *piVar1 = *piVar1 + 1; } *(int **)(lVar3 + -0x10) = piVar1; *(int8 *)(lVar3 + -8) = uVar2; } else { if (0xfffffff6 < (uint)uVar2) { *piVar1 = *piVar1 + 1; } JS_Throw(param_1,piVar1,uVar2); } js_async_generator_resume_next(param_1,lVar5); } else { *(int4 *)(lVar5 + 8) = 5; if (uVar4 == 0) { js_async_generator_resolve(param_1,lVar5,piVar1,uVar2,1); } else { js_async_generator_reject(param_1,lVar5); } } return ZEXT816(3) << 0x40; }
28,722
get_head_or_tail_page
eloqsql/storage/maria/ma_blockrec.c
static my_bool get_head_or_tail_page(MARIA_HA *info, const MARIA_BITMAP_BLOCK *block, uchar *buff, uint length, uint page_type, enum pagecache_page_lock lock, struct st_row_pos_info *res) { uint block_size; MARIA_PINNED_PAGE page_link; MARIA_SHARE *share= info->s; DBUG_ENTER("get_head_or_tail_page"); DBUG_PRINT("enter", ("page_type: %u length: %u", page_type, length)); block_size= share->block_size; if (block->org_bitmap_value == 0) /* Empty block */ { /* New page */ make_empty_page(info, buff, page_type, 1); res->buff= buff; res->empty_space= res->length= (block_size - PAGE_OVERHEAD_SIZE(share)); res->data= (buff + PAGE_HEADER_SIZE(share)); res->dir= res->data + res->length; res->rownr= 0; DBUG_ASSERT(length <= res->length); } else { uchar *dir; /* Read old page */ page_link.unlock= PAGECACHE_LOCK_WRITE_UNLOCK; res->buff= pagecache_read(share->pagecache, &info->dfile, block->page, 0, 0, share->page_type, lock, &page_link.link); page_link.changed= res->buff != 0; push_dynamic(&info->pinned_pages, (void*) &page_link); if (!page_link.changed) { _ma_set_fatal_error(info, my_errno); DBUG_RETURN(1); } DBUG_ASSERT((uint) (res->buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) == page_type); if (!(dir= find_free_position(info, res->buff, block_size, &res->rownr, &res->length, &res->empty_space, page_type == HEAD_PAGE))) goto crashed; if (res->length < length) { if (res->empty_space + res->length >= length) { _ma_compact_block_page(share, res->buff, res->rownr, 1, (page_type == HEAD_PAGE ? info->trn->min_read_from : 0), (page_type == HEAD_PAGE ? share->base.min_block_length : 0)); /* All empty space are now after current position */ dir= dir_entry_pos(res->buff, block_size, res->rownr); res->length= res->empty_space= uint2korr(dir+2); } if (res->length < length) { DBUG_PRINT("error", ("length: %u res->length: %u empty_space: %u", length, res->length, res->empty_space)); goto crashed; /* Wrong bitmap information */ } } res->dir= dir; res->data= res->buff + uint2korr(dir); } DBUG_RETURN(0); crashed: DBUG_ASSERT(!maria_assert_if_crashed_table); _ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); /* File crashed */ DBUG_RETURN(1); }
O0
c
get_head_or_tail_page: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq 0x10(%rbp), %rax movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movl %r8d, -0x28(%rbp) movl %r9d, -0x2c(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x50(%rbp) jmp 0x7fcb3 movq -0x50(%rbp), %rax movl 0x7bc(%rax), %eax movl %eax, -0x30(%rbp) movq -0x18(%rbp), %rax movzbl 0x15(%rax), %eax cmpl $0x0, %eax jne 0x7fd5b movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi movl -0x28(%rbp), %edx movl $0x1, %ecx callq 0x7a070 movq -0x20(%rbp), %rcx movq 0x10(%rbp), %rax movq %rcx, (%rax) movl -0x30(%rbp), %ecx movq -0x50(%rbp), %rax movl 0xc18(%rax), %eax addl $0x14, %eax subl %eax, %ecx movq 0x10(%rbp), %rax movl %ecx, 0x18(%rax) movq 0x10(%rbp), %rax movl %ecx, 0x20(%rax) movq -0x20(%rbp), %rcx movq -0x50(%rbp), %rax movl 0xc18(%rax), %eax addl $0xc, %eax movl %eax, %eax addq %rax, %rcx movq 0x10(%rbp), %rax movq %rcx, 0x8(%rax) movq 0x10(%rbp), %rax movq 0x8(%rax), %rcx movq 0x10(%rbp), %rax movl 0x18(%rax), %eax addq %rax, %rcx movq 0x10(%rbp), %rax movq %rcx, 0x10(%rax) movq 0x10(%rbp), %rax movl $0x0, 0x1c(%rax) jmp 0x7fd56 jmp 0x7ff75 movl $0x6, -0x40(%rbp) movq -0x50(%rbp), %rax movq 0x600(%rax), %rdi movq -0x10(%rbp), %rsi addq $0x470, %rsi # imm = 0x470 movq -0x18(%rbp), %rax movq (%rax), %rdx movq -0x50(%rbp), %rax movl 0x7d4(%rax), %r9d movl -0x2c(%rbp), %r10d leaq -0x48(%rbp), %rax xorl %ecx, %ecx xorl %r8d, %r8d movl %r10d, (%rsp) movq %rax, 0x8(%rsp) callq 0x2d970 movq %rax, %rcx movq 0x10(%rbp), %rax movq %rcx, (%rax) movq 0x10(%rbp), %rax cmpq $0x0, (%rax) setne %al andb $0x1, %al movzbl %al, %eax movb %al, -0x38(%rbp) movq -0x10(%rbp), %rdi addq $0x2e8, %rdi # imm = 0x2E8 leaq -0x48(%rbp), %rsi callq 0xda940 cmpb $0x0, -0x38(%rbp) jne 0x7fdfd movq -0x10(%rbp), %rax movq %rax, -0x60(%rbp) callq 0xf60c0 movq -0x60(%rbp), %rdi movl (%rax), %esi callq 0x338b0 movb $0x1, -0x1(%rbp) jmp 0x7ff93 jmp 0x7fdff jmp 0x7fe01 movq -0x10(%rbp), %rdi movq 0x10(%rbp), %rax movq (%rax), %rsi movl -0x30(%rbp), %edx movq 0x10(%rbp), %rcx addq $0x1c, %rcx movq 0x10(%rbp), %r8 addq $0x18, %r8 movq 0x10(%rbp), %r9 addq $0x20, %r9 cmpl $0x1, -0x28(%rbp) sete %al andb $0x1, %al movzbl %al, %eax movsbl %al, %eax movl %eax, (%rsp) callq 0x7ffa0 movq %rax, -0x58(%rbp) cmpq $0x0, %rax jne 0x7fe4d jmp 0x7ff7d movq 0x10(%rbp), %rax movl 0x18(%rax), %eax cmpl -0x24(%rbp), %eax jae 0x7ff4e movq 0x10(%rbp), %rax movl 0x20(%rax), %eax movq 0x10(%rbp), %rcx addl 0x18(%rcx), %eax cmpl -0x24(%rbp), %eax jb 0x7ff3a movq -0x50(%rbp), %rax movq %rax, -0x78(%rbp) movq 0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x70(%rbp) movq 0x10(%rbp), %rax movl 0x1c(%rax), %eax movl %eax, -0x64(%rbp) cmpl $0x1, -0x28(%rbp) jne 0x7feac movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq 0x80(%rax), %rax movq %rax, -0x80(%rbp) jmp 0x7feb4 xorl %eax, %eax movq %rax, -0x80(%rbp) jmp 0x7feb4 movq -0x80(%rbp), %rax movq %rax, -0x88(%rbp) cmpl $0x1, -0x28(%rbp) jne 0x7fed9 movq -0x50(%rbp), %rax movq 0x3b8(%rax), %rax movq %rax, -0x90(%rbp) jmp 0x7fee4 xorl %eax, %eax movq %rax, -0x90(%rbp) jmp 0x7fee4 movq -0x88(%rbp), %r8 movl -0x64(%rbp), %edx movq -0x70(%rbp), %rsi movq -0x78(%rbp), %rdi movq -0x90(%rbp), %rax movl %eax, %r9d movl $0x1, %ecx callq 0x748d0 movq 0x10(%rbp), %rax movq (%rax), %rdi movl -0x30(%rbp), %esi movq 0x10(%rbp), %rax movl 0x1c(%rax), %edx callq 0x75000 movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rax movzwl 0x2(%rax), %ecx movq 0x10(%rbp), %rax movl %ecx, 0x20(%rax) movq 0x10(%rbp), %rax movl %ecx, 0x18(%rax) movq 0x10(%rbp), %rax movl 0x18(%rax), %eax cmpl -0x24(%rbp), %eax jae 0x7ff4c jmp 0x7ff48 jmp 0x7ff4a jmp 0x7ff7d jmp 0x7ff4e movq -0x58(%rbp), %rcx movq 0x10(%rbp), %rax movq %rcx, 0x10(%rax) movq 0x10(%rbp), %rax movq (%rax), %rcx movq -0x58(%rbp), %rax movzwl (%rax), %eax cltq addq %rax, %rcx movq 0x10(%rbp), %rax movq %rcx, 0x8(%rax) jmp 0x7ff77 movb $0x0, -0x1(%rbp) jmp 0x7ff93 jmp 0x7ff7f jmp 0x7ff81 movq -0x10(%rbp), %rdi movl $0x7f, %esi callq 0x338b0 movb $0x1, -0x1(%rbp) movb -0x1(%rbp), %al addq $0xa0, %rsp popq %rbp retq nop
get_head_or_tail_page: push rbp mov rbp, rsp sub rsp, 0A0h mov rax, [rbp+arg_0] mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov [rbp+var_28], r8d mov [rbp+var_2C], r9d mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_50], rax jmp short $+2 loc_7FCB3: mov rax, [rbp+var_50] mov eax, [rax+7BCh] mov [rbp+var_30], eax mov rax, [rbp+var_18] movzx eax, byte ptr [rax+15h] cmp eax, 0 jnz loc_7FD5B mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] mov edx, [rbp+var_28] mov ecx, 1 call make_empty_page mov rcx, [rbp+var_20] mov rax, [rbp+arg_0] mov [rax], rcx mov ecx, [rbp+var_30] mov rax, [rbp+var_50] mov eax, [rax+0C18h] add eax, 14h sub ecx, eax mov rax, [rbp+arg_0] mov [rax+18h], ecx mov rax, [rbp+arg_0] mov [rax+20h], ecx mov rcx, [rbp+var_20] mov rax, [rbp+var_50] mov eax, [rax+0C18h] add eax, 0Ch mov eax, eax add rcx, rax mov rax, [rbp+arg_0] mov [rax+8], rcx mov rax, [rbp+arg_0] mov rcx, [rax+8] mov rax, [rbp+arg_0] mov eax, [rax+18h] add rcx, rax mov rax, [rbp+arg_0] mov [rax+10h], rcx mov rax, [rbp+arg_0] mov dword ptr [rax+1Ch], 0 jmp short $+2 loc_7FD56: jmp loc_7FF75 loc_7FD5B: mov [rbp+var_40], 6 mov rax, [rbp+var_50] mov rdi, [rax+600h] mov rsi, [rbp+var_10] add rsi, 470h mov rax, [rbp+var_18] mov rdx, [rax] mov rax, [rbp+var_50] mov r9d, [rax+7D4h] mov r10d, [rbp+var_2C] lea rax, [rbp+var_48] xor ecx, ecx xor r8d, r8d mov [rsp+0A0h+var_A0], r10d mov [rsp+0A0h+var_98], rax call pagecache_read mov rcx, rax mov rax, [rbp+arg_0] mov [rax], rcx mov rax, [rbp+arg_0] cmp qword ptr [rax], 0 setnz al and al, 1 movzx eax, al mov [rbp+var_38], al mov rdi, [rbp+var_10] add rdi, 2E8h lea rsi, [rbp+var_48] call insert_dynamic cmp [rbp+var_38], 0 jnz short loc_7FDFD mov rax, [rbp+var_10] mov [rbp+var_60], rax call _my_thread_var mov rdi, [rbp+var_60] mov esi, [rax] call _ma_set_fatal_error mov [rbp+var_1], 1 jmp loc_7FF93 loc_7FDFD: jmp short $+2 loc_7FDFF: jmp short $+2 loc_7FE01: mov rdi, [rbp+var_10] mov rax, [rbp+arg_0] mov rsi, [rax] mov edx, [rbp+var_30] mov rcx, [rbp+arg_0] add rcx, 1Ch mov r8, [rbp+arg_0] add r8, 18h mov r9, [rbp+arg_0] add r9, 20h ; ' ' cmp [rbp+var_28], 1 setz al and al, 1 movzx eax, al movsx eax, al mov [rsp+0A0h+var_A0], eax call find_free_position mov [rbp+var_58], rax cmp rax, 0 jnz short loc_7FE4D jmp loc_7FF7D loc_7FE4D: mov rax, [rbp+arg_0] mov eax, [rax+18h] cmp eax, [rbp+var_24] jnb loc_7FF4E mov rax, [rbp+arg_0] mov eax, [rax+20h] mov rcx, [rbp+arg_0] add eax, [rcx+18h] cmp eax, [rbp+var_24] jb loc_7FF3A mov rax, [rbp+var_50] mov [rbp+var_78], rax mov rax, [rbp+arg_0] mov rax, [rax] mov [rbp+var_70], rax mov rax, [rbp+arg_0] mov eax, [rax+1Ch] mov [rbp+var_64], eax cmp [rbp+var_28], 1 jnz short loc_7FEAC mov rax, [rbp+var_10] mov rax, [rax+8] mov rax, [rax+80h] mov [rbp+var_80], rax jmp short loc_7FEB4 loc_7FEAC: xor eax, eax mov [rbp+var_80], rax jmp short $+2 loc_7FEB4: mov rax, [rbp+var_80] mov [rbp+var_88], rax cmp [rbp+var_28], 1 jnz short loc_7FED9 mov rax, [rbp+var_50] mov rax, [rax+3B8h] mov [rbp+var_90], rax jmp short loc_7FEE4 loc_7FED9: xor eax, eax mov [rbp+var_90], rax jmp short $+2 loc_7FEE4: mov r8, [rbp+var_88] mov edx, [rbp+var_64] mov rsi, [rbp+var_70] mov rdi, [rbp+var_78] mov rax, [rbp+var_90] mov r9d, eax mov ecx, 1 call _ma_compact_block_page mov rax, [rbp+arg_0] mov rdi, [rax] mov esi, [rbp+var_30] mov rax, [rbp+arg_0] mov edx, [rax+1Ch] call dir_entry_pos mov [rbp+var_58], rax mov rax, [rbp+var_58] movzx ecx, word ptr [rax+2] mov rax, [rbp+arg_0] mov [rax+20h], ecx mov rax, [rbp+arg_0] mov [rax+18h], ecx loc_7FF3A: mov rax, [rbp+arg_0] mov eax, [rax+18h] cmp eax, [rbp+var_24] jnb short loc_7FF4C jmp short $+2 loc_7FF48: jmp short $+2 loc_7FF4A: jmp short loc_7FF7D loc_7FF4C: jmp short $+2 loc_7FF4E: mov rcx, [rbp+var_58] mov rax, [rbp+arg_0] mov [rax+10h], rcx mov rax, [rbp+arg_0] mov rcx, [rax] mov rax, [rbp+var_58] movzx eax, word ptr [rax] cdqe add rcx, rax mov rax, [rbp+arg_0] mov [rax+8], rcx loc_7FF75: jmp short $+2 loc_7FF77: mov [rbp+var_1], 0 jmp short loc_7FF93 loc_7FF7D: jmp short $+2 loc_7FF7F: jmp short $+2 loc_7FF81: mov rdi, [rbp+var_10] mov esi, 7Fh call _ma_set_fatal_error mov [rbp+var_1], 1 loc_7FF93: mov al, [rbp+var_1] add rsp, 0A0h pop rbp retn
char get_head_or_tail_page( _DWORD *a1, long long a2, _BYTE *a3, unsigned int a4, int a5, unsigned int a6, long long a7) { int v7; // ecx _DWORD *v8; // rdi int *v9; // rax long long v10; // rdx long long v11; // rcx long long v12; // r8 int v13; // r9d long long v14; // rdx long long v15; // rcx long long v16; // r8 int v17; // r9d unsigned long long v19; // [rsp+20h] [rbp-80h] long long v20; // [rsp+30h] [rbp-70h] unsigned int v21; // [rsp+3Ch] [rbp-64h] _DWORD *v22; // [rsp+40h] [rbp-60h] unsigned __int16 *free_position; // [rsp+48h] [rbp-58h] long long v24; // [rsp+50h] [rbp-50h] char v25[8]; // [rsp+58h] [rbp-48h] BYREF int v26; // [rsp+60h] [rbp-40h] bool v27; // [rsp+68h] [rbp-38h] unsigned int v28; // [rsp+70h] [rbp-30h] unsigned int v29; // [rsp+74h] [rbp-2Ch] int v30; // [rsp+78h] [rbp-28h] unsigned int v31; // [rsp+7Ch] [rbp-24h] _BYTE *v32; // [rsp+80h] [rbp-20h] long long *v33; // [rsp+88h] [rbp-18h] _DWORD *v34; // [rsp+90h] [rbp-10h] v34 = a1; v33 = (long long *)a2; v32 = a3; v31 = a4; v30 = a5; v29 = a6; v24 = *(_QWORD *)a1; v28 = *(_DWORD *)(*(_QWORD *)a1 + 1980LL); if ( !*(_BYTE *)(a2 + 21) ) { make_empty_page((long long)v34, v32, v30, 1); *(_QWORD *)a7 = v32; v7 = v28 - (*(_DWORD *)(v24 + 3096) + 20); *(_DWORD *)(a7 + 24) = v7; *(_DWORD *)(a7 + 32) = v7; *(_QWORD *)(a7 + 8) = &v32[*(_DWORD *)(v24 + 3096) + 12]; *(_QWORD *)(a7 + 16) = *(unsigned int *)(a7 + 24) + *(_QWORD *)(a7 + 8); *(_DWORD *)(a7 + 28) = 0; return 0; } v26 = 6; *(_QWORD *)a7 = pagecache_read( *(_QWORD **)(v24 + 1536), (long long)(v34 + 284), *v33, 0, 0LL, *(_DWORD *)(v24 + 2004), v29, v25); v27 = *(_QWORD *)a7 != 0LL; v8 = v34 + 186; insert_dynamic(v34 + 186, v25); if ( v27 ) { free_position = (unsigned __int16 *)find_free_position( (_DWORD)v34, *(_QWORD *)a7, v28, (int)a7 + 28, (int)a7 + 24, (int)a7 + 32, v30 == 1); if ( !free_position ) goto LABEL_18; if ( *(_DWORD *)(a7 + 24) < v31 ) { v15 = a7; if ( *(_DWORD *)(a7 + 24) + *(_DWORD *)(a7 + 32) >= v31 ) { v20 = *(_QWORD *)a7; v21 = *(_DWORD *)(a7 + 28); if ( v30 == 1 ) v19 = *(_QWORD *)(*((_QWORD *)v34 + 1) + 128LL); else v19 = 0LL; if ( v30 == 1 ) ma_compact_block_page(v24, v20, v21, 1, v19, *(_QWORD *)(v24 + 952)); else ma_compact_block_page(v24, v20, v21, 1, v19, 0); free_position = (unsigned __int16 *)dir_entry_pos(*(_QWORD *)a7, v28, *(_DWORD *)(a7 + 28)); v15 = free_position[1]; *(_DWORD *)(a7 + 32) = v15; *(_DWORD *)(a7 + 24) = v15; } if ( *(_DWORD *)(a7 + 24) < v31 ) { LABEL_18: ma_set_fatal_error(v34, 127, v14, v15, v16, v17); return 1; } } *(_QWORD *)(a7 + 16) = free_position; *(_QWORD *)(a7 + 8) = *free_position + *(_QWORD *)a7; return 0; } v22 = v34; v9 = (int *)my_thread_var(v8, v25); ma_set_fatal_error(v22, *v9, v10, v11, v12, v13); return 1; }
get_head_or_tail_page: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],ECX MOV dword ptr [RBP + -0x28],R8D MOV dword ptr [RBP + -0x2c],R9D MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x50],RAX JMP 0x0017fcb3 LAB_0017fcb3: MOV RAX,qword ptr [RBP + -0x50] MOV EAX,dword ptr [RAX + 0x7bc] MOV dword ptr [RBP + -0x30],EAX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x15] CMP EAX,0x0 JNZ 0x0017fd5b MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] MOV EDX,dword ptr [RBP + -0x28] MOV ECX,0x1 CALL 0x0017a070 MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RAX],RCX MOV ECX,dword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x50] MOV EAX,dword ptr [RAX + 0xc18] ADD EAX,0x14 SUB ECX,EAX MOV RAX,qword ptr [RBP + 0x10] MOV dword ptr [RAX + 0x18],ECX MOV RAX,qword ptr [RBP + 0x10] MOV dword ptr [RAX + 0x20],ECX MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x50] MOV EAX,dword ptr [RAX + 0xc18] ADD EAX,0xc MOV EAX,EAX ADD RCX,RAX MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + 0x10] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + 0x10] MOV EAX,dword ptr [RAX + 0x18] ADD RCX,RAX MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RBP + 0x10] MOV dword ptr [RAX + 0x1c],0x0 JMP 0x0017fd56 LAB_0017fd56: JMP 0x0017ff75 LAB_0017fd5b: MOV dword ptr [RBP + -0x40],0x6 MOV RAX,qword ptr [RBP + -0x50] MOV RDI,qword ptr [RAX + 0x600] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x470 MOV RAX,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x50] MOV R9D,dword ptr [RAX + 0x7d4] MOV R10D,dword ptr [RBP + -0x2c] LEA RAX,[RBP + -0x48] XOR ECX,ECX XOR R8D,R8D MOV dword ptr [RSP],R10D MOV qword ptr [RSP + 0x8],RAX CALL 0x0012d970 MOV RCX,RAX MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + 0x10] CMP qword ptr [RAX],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x38],AL MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x2e8 LEA RSI,[RBP + -0x48] CALL 0x001da940 CMP byte ptr [RBP + -0x38],0x0 JNZ 0x0017fdfd MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x60],RAX CALL 0x001f60c0 MOV RDI,qword ptr [RBP + -0x60] MOV ESI,dword ptr [RAX] CALL 0x001338b0 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0017ff93 LAB_0017fdfd: JMP 0x0017fdff LAB_0017fdff: JMP 0x0017fe01 LAB_0017fe01: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + 0x10] MOV RSI,qword ptr [RAX] MOV EDX,dword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + 0x10] ADD RCX,0x1c MOV R8,qword ptr [RBP + 0x10] ADD R8,0x18 MOV R9,qword ptr [RBP + 0x10] ADD R9,0x20 CMP dword ptr [RBP + -0x28],0x1 SETZ AL AND AL,0x1 MOVZX EAX,AL MOVSX EAX,AL MOV dword ptr [RSP],EAX CALL 0x0017ffa0 MOV qword ptr [RBP + -0x58],RAX CMP RAX,0x0 JNZ 0x0017fe4d JMP 0x0017ff7d LAB_0017fe4d: MOV RAX,qword ptr [RBP + 0x10] MOV EAX,dword ptr [RAX + 0x18] CMP EAX,dword ptr [RBP + -0x24] JNC 0x0017ff4e MOV RAX,qword ptr [RBP + 0x10] MOV EAX,dword ptr [RAX + 0x20] MOV RCX,qword ptr [RBP + 0x10] ADD EAX,dword ptr [RCX + 0x18] CMP EAX,dword ptr [RBP + -0x24] JC 0x0017ff3a MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + 0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x70],RAX MOV RAX,qword ptr [RBP + 0x10] MOV EAX,dword ptr [RAX + 0x1c] MOV dword ptr [RBP + -0x64],EAX CMP dword ptr [RBP + -0x28],0x1 JNZ 0x0017feac MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x80] MOV qword ptr [RBP + -0x80],RAX JMP 0x0017feb4 LAB_0017feac: XOR EAX,EAX MOV qword ptr [RBP + -0x80],RAX JMP 0x0017feb4 LAB_0017feb4: MOV RAX,qword ptr [RBP + -0x80] MOV qword ptr [RBP + -0x88],RAX CMP dword ptr [RBP + -0x28],0x1 JNZ 0x0017fed9 MOV RAX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RAX + 0x3b8] MOV qword ptr [RBP + -0x90],RAX JMP 0x0017fee4 LAB_0017fed9: XOR EAX,EAX MOV qword ptr [RBP + -0x90],RAX JMP 0x0017fee4 LAB_0017fee4: MOV R8,qword ptr [RBP + -0x88] MOV EDX,dword ptr [RBP + -0x64] MOV RSI,qword ptr [RBP + -0x70] MOV RDI,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RBP + -0x90] MOV R9D,EAX MOV ECX,0x1 CALL 0x001748d0 MOV RAX,qword ptr [RBP + 0x10] MOV RDI,qword ptr [RAX] MOV ESI,dword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + 0x10] MOV EDX,dword ptr [RAX + 0x1c] CALL 0x00175000 MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x58] MOVZX ECX,word ptr [RAX + 0x2] MOV RAX,qword ptr [RBP + 0x10] MOV dword ptr [RAX + 0x20],ECX MOV RAX,qword ptr [RBP + 0x10] MOV dword ptr [RAX + 0x18],ECX LAB_0017ff3a: MOV RAX,qword ptr [RBP + 0x10] MOV EAX,dword ptr [RAX + 0x18] CMP EAX,dword ptr [RBP + -0x24] JNC 0x0017ff4c JMP 0x0017ff48 LAB_0017ff48: JMP 0x0017ff4a LAB_0017ff4a: JMP 0x0017ff7d LAB_0017ff4c: JMP 0x0017ff4e LAB_0017ff4e: MOV RCX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RBP + 0x10] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x58] MOVZX EAX,word ptr [RAX] CDQE ADD RCX,RAX MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RAX + 0x8],RCX LAB_0017ff75: JMP 0x0017ff77 LAB_0017ff77: MOV byte ptr [RBP + -0x1],0x0 JMP 0x0017ff93 LAB_0017ff7d: JMP 0x0017ff7f LAB_0017ff7f: JMP 0x0017ff81 LAB_0017ff81: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x7f CALL 0x001338b0 MOV byte ptr [RBP + -0x1],0x1 LAB_0017ff93: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0xa0 POP RBP RET
int1 get_head_or_tail_page (long *param_1,int8 *param_2,long param_3,uint param_4,int param_5, int4 param_6,long *param_7) { ushort uVar1; long lVar2; long *plVar3; long lVar4; int4 *puVar5; ulong local_98; int8 local_88; ushort *local_60; int1 local_50 [8]; int4 local_48; char local_40; int local_38; int4 local_34; int local_30; uint local_2c; long local_28; int8 *local_20; long *local_18; lVar2 = *param_1; local_38 = *(int *)(lVar2 + 0x7bc); local_34 = param_6; local_30 = param_5; local_2c = param_4; local_28 = param_3; local_20 = param_2; local_18 = param_1; if (*(char *)((long)param_2 + 0x15) == '\0') { make_empty_page(param_1,param_3,param_5,1); *param_7 = local_28; local_38 = local_38 - (*(int *)(lVar2 + 0xc18) + 0x14); *(int *)(param_7 + 3) = local_38; *(int *)(param_7 + 4) = local_38; param_7[1] = local_28 + (ulong)(*(int *)(lVar2 + 0xc18) + 0xc); param_7[2] = param_7[1] + (ulong)*(uint *)(param_7 + 3); *(int4 *)((long)param_7 + 0x1c) = 0; } else { local_48 = 6; lVar4 = pagecache_read(*(int8 *)(lVar2 + 0x600),param_1 + 0x8e,*param_2,0,0, *(int4 *)(lVar2 + 0x7d4),param_6,local_50); *param_7 = lVar4; local_40 = *param_7 != 0; insert_dynamic(local_18 + 0x5d,local_50); plVar3 = local_18; if (local_40 == '\0') { puVar5 = (int4 *)_my_thread_var(); _ma_set_fatal_error(plVar3,*puVar5); return 1; } local_60 = (ushort *) find_free_position(local_18,*param_7,local_38,(long)param_7 + 0x1c,param_7 + 3, param_7 + 4,local_30 == 1); if (local_60 == (ushort *)0x0) { LAB_0017ff7d: _ma_set_fatal_error(local_18,0x7f); return 1; } if (*(uint *)(param_7 + 3) < local_2c) { if (local_2c <= (uint)((int)param_7[4] + (int)param_7[3])) { if (local_30 == 1) { local_88 = *(int8 *)(local_18[1] + 0x80); local_98 = *(ulong *)(lVar2 + 0x3b8); } else { local_88 = 0; local_98 = 0; } _ma_compact_block_page (lVar2,*param_7,*(int4 *)((long)param_7 + 0x1c),1,local_88, local_98 & 0xffffffff); local_60 = (ushort *)dir_entry_pos(*param_7,local_38,*(int4 *)((long)param_7 + 0x1c)); uVar1 = local_60[1]; *(uint *)(param_7 + 4) = (uint)uVar1; *(uint *)(param_7 + 3) = (uint)uVar1; } if (*(uint *)(param_7 + 3) < local_2c) goto LAB_0017ff7d; } param_7[2] = (long)local_60; param_7[1] = *param_7 + (long)(int)(uint)*local_60; } return 0; }
28,723
get_head_or_tail_page
eloqsql/storage/maria/ma_blockrec.c
static my_bool get_head_or_tail_page(MARIA_HA *info, const MARIA_BITMAP_BLOCK *block, uchar *buff, uint length, uint page_type, enum pagecache_page_lock lock, struct st_row_pos_info *res) { uint block_size; MARIA_PINNED_PAGE page_link; MARIA_SHARE *share= info->s; DBUG_ENTER("get_head_or_tail_page"); DBUG_PRINT("enter", ("page_type: %u length: %u", page_type, length)); block_size= share->block_size; if (block->org_bitmap_value == 0) /* Empty block */ { /* New page */ make_empty_page(info, buff, page_type, 1); res->buff= buff; res->empty_space= res->length= (block_size - PAGE_OVERHEAD_SIZE(share)); res->data= (buff + PAGE_HEADER_SIZE(share)); res->dir= res->data + res->length; res->rownr= 0; DBUG_ASSERT(length <= res->length); } else { uchar *dir; /* Read old page */ page_link.unlock= PAGECACHE_LOCK_WRITE_UNLOCK; res->buff= pagecache_read(share->pagecache, &info->dfile, block->page, 0, 0, share->page_type, lock, &page_link.link); page_link.changed= res->buff != 0; push_dynamic(&info->pinned_pages, (void*) &page_link); if (!page_link.changed) { _ma_set_fatal_error(info, my_errno); DBUG_RETURN(1); } DBUG_ASSERT((uint) (res->buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) == page_type); if (!(dir= find_free_position(info, res->buff, block_size, &res->rownr, &res->length, &res->empty_space, page_type == HEAD_PAGE))) goto crashed; if (res->length < length) { if (res->empty_space + res->length >= length) { _ma_compact_block_page(share, res->buff, res->rownr, 1, (page_type == HEAD_PAGE ? info->trn->min_read_from : 0), (page_type == HEAD_PAGE ? share->base.min_block_length : 0)); /* All empty space are now after current position */ dir= dir_entry_pos(res->buff, block_size, res->rownr); res->length= res->empty_space= uint2korr(dir+2); } if (res->length < length) { DBUG_PRINT("error", ("length: %u res->length: %u empty_space: %u", length, res->length, res->empty_space)); goto crashed; /* Wrong bitmap information */ } } res->dir= dir; res->data= res->buff + uint2korr(dir); } DBUG_RETURN(0); crashed: DBUG_ASSERT(!maria_assert_if_crashed_table); _ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); /* File crashed */ DBUG_RETURN(1); }
O3
c
get_head_or_tail_page: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r9, %rbx movl %ecx, %r12d movq %rdi, %r14 movq (%rdi), %rcx movl 0x7bc(%rcx), %r13d cmpb $0x0, 0x15(%rsi) je 0x62fbd movl %r8d, -0x2c(%rbp) leaq -0x58(%rbp), %r15 movl $0x6, 0x8(%r15) movq 0x600(%rcx), %rdi leaq 0x470(%r14), %rax movq (%rsi), %rdx movq %rcx, -0x38(%rbp) movl 0x7d4(%rcx), %r9d movq %rax, %rsi xorl %ecx, %ecx xorl %r8d, %r8d pushq %r15 pushq $0x4 callq 0x3263a addq $0x10, %rsp movq %rax, (%rbx) testq %rax, %rax setne 0x10(%r15) leaq 0x2e8(%r14), %rdi movq %r15, %rsi callq 0x91bc6 cmpb $0x0, 0x10(%r15) je 0x63010 movl %r12d, -0x30(%rbp) movq (%rbx), %r15 movq (%r14), %rdx movzbl 0x8(%r15), %r10d movzbl 0x9(%r15), %ecx leaq (%r15,%r13), %r12 movzwl 0xa(%r15), %eax movl %eax, 0x20(%rbx) cmpl $0xff, %ecx je 0x6301f cmpb %r10b, %cl jae 0x63199 leal (,%rcx,4), %esi movq %r12, %rax subq %rsi, %rax movq $-0x8, %rdi subq %rsi, %rdi movzbl -0x5(%rax), %eax movb %al, 0x9(%r15) cmpq $0xff, %rax je 0x62f92 shll $0x2, %eax movq %r12, %r8 subq %rax, %r8 movb $-0x1, -0x6(%r8) leaq (%r12,%rdi), %rax cmpq $-0x9, %rdi jg 0x63086 movzwl 0x4(%r12,%rdi), %r8d addq $0x4, %rdi testl %r8d, %r8d je 0x62f96 movzwl 0x2(%r12,%rdi), %edi addl %r8d, %edi jmp 0x6308f movq %rdx, %r15 movq %r14, %rdi movq %rdx, %rsi movl %r8d, %edx movq %rcx, %r14 movl $0x1, %ecx callq 0x5f486 movq %r15, (%rbx) subl 0xc18(%r14), %r13d addl $-0x14, %r13d movl %r13d, 0x18(%rbx) movl %r13d, 0x20(%rbx) movl 0xc18(%r14), %eax addl $0xc, %eax addq %r15, %rax movq %rax, 0x8(%rbx) addq %rax, %r13 movq %r13, 0x10(%rbx) movl $0x0, 0x1c(%rbx) jmp 0x631b8 callq 0xa1b22 movl (%rax), %esi movq %r14, %rdi jmp 0x631a1 cmpl $0xff, %r10d je 0x63199 leal -0x4(,%r10,4), %ecx subq %rcx, %r12 movq (%r14), %rdi testl %r10d, %r10d je 0x631c9 leaq -0x8(%r12), %rsi movzwl -0x8(%r12), %edx movzwl -0x6(%r12), %ecx subl %r15d, %esi leal (%rcx,%rdx), %r8d addl $0x4, %r8d cmpl %esi, %r8d jbe 0x630c1 leal -0x1(%r10), %edx cmpl $0x1, -0x2c(%rbp) movq %r10, -0x40(%rbp) jne 0x630c5 movq 0x8(%r14), %rax movq 0x80(%rax), %r8 movl 0x3b8(%rdi), %r9d jmp 0x630cb movl 0xc18(%rdx), %edi addl $0xc, %edi movq %r13, %rdx subq %rsi, %rdx leaq (%rdx,%r15), %rsi addq $-0xb, %rsi movq %rsi, %rdx cmpb $0x0, -0x1(%rsi) jne 0x630af leaq -0x4(%rdx), %rsi cmpb $0x0, (%rdx) je 0x6309d movzwl -0x1(%rdx), %edx subl %edi, %edx movw %di, (%rax) leaq 0x2(%rax), %r12 movl %ecx, %r10d jmp 0x6311d addl %edx, %ecx jmp 0x630f8 xorl %r8d, %r8d xorl %r9d, %r9d movq %r15, %rsi xorl %ecx, %ecx callq 0x5c124 movzwl -0x8(%r12), %edx movzwl -0x6(%r12), %ecx movzwl 0xa(%r15), %eax movl %eax, 0x20(%rbx) cmpl $0x4, %eax movq -0x40(%rbp), %r10 jb 0x63199 addl %edx, %ecx addl $-0x4, %eax movl %eax, 0x20(%rbx) leal 0x1(%r10), %eax movb %al, 0x8(%r15) leaq -0xc(%r12), %rax addl %ecx, %r15d movl %eax, %edx subl %r15d, %edx movw %cx, -0xc(%r12) addq $-0xa, %r12 movw $0x0, (%r12) movl %r10d, 0x1c(%rbx) movl %edx, 0x18(%rbx) movl -0x30(%rbp), %r15d cmpl %r15d, %edx jae 0x631aa movl 0x20(%rbx), %ecx addl %edx, %ecx cmpl %r15d, %ecx jb 0x63194 movq (%rbx), %rsi cmpl $0x1, -0x2c(%rbp) jne 0x6315f movq 0x8(%r14), %rax movq 0x80(%rax), %r8 movq -0x38(%rbp), %rdi movl 0x3b8(%rdi), %r9d jmp 0x63169 xorl %r8d, %r8d xorl %r9d, %r9d movq -0x38(%rbp), %rdi movl %r10d, %edx movl $0x1, %ecx callq 0x5c124 addq (%rbx), %r13 movl 0x1c(%rbx), %eax shll $0x2, %eax subq %rax, %r13 movzwl -0x6(%r13), %edx addq $-0x8, %r13 movl %edx, 0x20(%rbx) movl %edx, 0x18(%rbx) movq %r13, %rax cmpl %r15d, %edx jae 0x631aa movq %r14, %rdi movl $0x7f, %esi callq 0x36a4c movb $0x1, %al jmp 0x631ba movq %rax, 0x10(%rbx) movzwl (%rax), %eax addq (%rbx), %rax movq %rax, 0x8(%rbx) xorl %eax, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl 0xc18(%rdi), %ecx addl $0xc, %ecx jmp 0x630f8
get_head_or_tail_page: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov rbx, r9 mov r12d, ecx mov r14, rdi mov rcx, [rdi] mov r13d, [rcx+7BCh] cmp byte ptr [rsi+15h], 0 jz loc_62FBD mov [rbp+var_2C], r8d lea r15, [rbp+var_58] mov dword ptr [r15+8], 6 mov rdi, [rcx+600h] lea rax, [r14+470h] mov rdx, [rsi] mov [rbp+var_38], rcx mov r9d, [rcx+7D4h] mov rsi, rax xor ecx, ecx xor r8d, r8d push r15 push 4 call pagecache_read add rsp, 10h mov [rbx], rax test rax, rax setnz byte ptr [r15+10h] lea rdi, [r14+2E8h] mov rsi, r15 call insert_dynamic cmp byte ptr [r15+10h], 0 jz loc_63010 mov [rbp+var_30], r12d mov r15, [rbx] mov rdx, [r14] movzx r10d, byte ptr [r15+8] movzx ecx, byte ptr [r15+9] lea r12, [r15+r13] movzx eax, word ptr [r15+0Ah] mov [rbx+20h], eax cmp ecx, 0FFh jz loc_6301F cmp cl, r10b jnb loc_63199 lea esi, ds:0[rcx*4] mov rax, r12 sub rax, rsi mov rdi, 0FFFFFFFFFFFFFFF8h sub rdi, rsi movzx eax, byte ptr [rax-5] mov [r15+9], al cmp rax, 0FFh jz short loc_62F92 shl eax, 2 mov r8, r12 sub r8, rax mov byte ptr [r8-6], 0FFh loc_62F92: lea rax, [r12+rdi] loc_62F96: cmp rdi, 0FFFFFFFFFFFFFFF7h jg loc_63086 movzx r8d, word ptr [r12+rdi+4] add rdi, 4 test r8d, r8d jz short loc_62F96 movzx edi, word ptr [r12+rdi+2] add edi, r8d jmp loc_6308F loc_62FBD: mov r15, rdx mov rdi, r14 mov rsi, rdx mov edx, r8d mov r14, rcx mov ecx, 1 call make_empty_page mov [rbx], r15 sub r13d, [r14+0C18h] add r13d, 0FFFFFFECh mov [rbx+18h], r13d mov [rbx+20h], r13d mov eax, [r14+0C18h] add eax, 0Ch add rax, r15 mov [rbx+8], rax add r13, rax mov [rbx+10h], r13 mov dword ptr [rbx+1Ch], 0 jmp loc_631B8 loc_63010: call _my_thread_var mov esi, [rax] mov rdi, r14 jmp loc_631A1 loc_6301F: cmp r10d, 0FFh jz loc_63199 lea ecx, ds:0FFFFFFFFFFFFFFFCh[r10*4] sub r12, rcx mov rdi, [r14] test r10d, r10d jz loc_631C9 lea rsi, [r12-8] movzx edx, word ptr [r12-8] movzx ecx, word ptr [r12-6] sub esi, r15d lea r8d, [rcx+rdx] add r8d, 4 cmp r8d, esi jbe short loc_630C1 lea edx, [r10-1] cmp [rbp+var_2C], 1 mov [rbp+var_40], r10 jnz short loc_630C5 mov rax, [r14+8] mov r8, [rax+80h] mov r9d, [rdi+3B8h] jmp short loc_630CB loc_63086: mov edi, [rdx+0C18h] add edi, 0Ch loc_6308F: mov rdx, r13 sub rdx, rsi lea rsi, [rdx+r15] add rsi, 0FFFFFFFFFFFFFFF5h loc_6309D: mov rdx, rsi cmp byte ptr [rsi-1], 0 jnz short loc_630AF lea rsi, [rdx-4] cmp byte ptr [rdx], 0 jz short loc_6309D loc_630AF: movzx edx, word ptr [rdx-1] sub edx, edi mov [rax], di lea r12, [rax+2] mov r10d, ecx jmp short loc_6311D loc_630C1: add ecx, edx jmp short loc_630F8 loc_630C5: xor r8d, r8d xor r9d, r9d loc_630CB: mov rsi, r15 xor ecx, ecx call _ma_compact_block_page movzx edx, word ptr [r12-8] movzx ecx, word ptr [r12-6] movzx eax, word ptr [r15+0Ah] mov [rbx+20h], eax cmp eax, 4 mov r10, [rbp+var_40] jb loc_63199 add ecx, edx loc_630F8: add eax, 0FFFFFFFCh mov [rbx+20h], eax lea eax, [r10+1] mov [r15+8], al lea rax, [r12-0Ch] add r15d, ecx mov edx, eax sub edx, r15d mov [r12-0Ch], cx add r12, 0FFFFFFFFFFFFFFF6h loc_6311D: mov word ptr [r12], 0 mov [rbx+1Ch], r10d mov [rbx+18h], edx mov r15d, [rbp+var_30] cmp edx, r15d jnb short loc_631AA mov ecx, [rbx+20h] add ecx, edx cmp ecx, r15d jb short loc_63194 mov rsi, [rbx] cmp [rbp+var_2C], 1 jnz short loc_6315F mov rax, [r14+8] mov r8, [rax+80h] mov rdi, [rbp+var_38] mov r9d, [rdi+3B8h] jmp short loc_63169 loc_6315F: xor r8d, r8d xor r9d, r9d mov rdi, [rbp+var_38] loc_63169: mov edx, r10d mov ecx, 1 call _ma_compact_block_page add r13, [rbx] mov eax, [rbx+1Ch] shl eax, 2 sub r13, rax movzx edx, word ptr [r13-6] add r13, 0FFFFFFFFFFFFFFF8h mov [rbx+20h], edx mov [rbx+18h], edx mov rax, r13 loc_63194: cmp edx, r15d jnb short loc_631AA loc_63199: mov rdi, r14 mov esi, 7Fh loc_631A1: call _ma_set_fatal_error mov al, 1 jmp short loc_631BA loc_631AA: mov [rbx+10h], rax movzx eax, word ptr [rax] add rax, [rbx] mov [rbx+8], rax loc_631B8: xor eax, eax loc_631BA: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_631C9: mov ecx, [rdi+0C18h] add ecx, 0Ch jmp loc_630F8
char get_head_or_tail_page(long long *a1, long long a2, _BYTE *a3, unsigned int a4, int a5, long long a6) { long long v9; // rcx long long v10; // r13 long long v11; // rdi long long v12; // rdx long long v13; // rax long long v14; // r8 int v15; // r9d long long v16; // r15 long long v17; // rdx long long v18; // r10 long long v19; // rcx long long v20; // r12 unsigned int v21; // eax long long v22; // rsi long long v23; // rdi long long v24; // rax _WORD *v25; // rax int v26; // edi long long v28; // r14 long long v29; // r13 _BYTE *v30; // rax long long v31; // rsi long long *v32; // rdi long long v33; // r12 long long v34; // rdi int v35; // edx int v36; // ecx unsigned long long v37; // r8 unsigned int v38; // r9d long long v39; // rsi _BYTE *v40; // rdx _WORD *v41; // r12 int v42; // ecx unsigned int v43; // r15d unsigned long long v44; // r8 long long v45; // rdi unsigned int v46; // r9d long long v47; // r13 long long v49; // [rsp+8h] [rbp-58h] BYREF int v50; // [rsp+10h] [rbp-50h] bool v51; // [rsp+18h] [rbp-48h] long long v52; // [rsp+20h] [rbp-40h] long long v53; // [rsp+28h] [rbp-38h] unsigned int v54; // [rsp+30h] [rbp-30h] int v55; // [rsp+34h] [rbp-2Ch] v9 = *a1; v10 = *(unsigned int *)(*a1 + 1980); if ( !*(_BYTE *)(a2 + 21) ) { v28 = *a1; make_empty_page((long long)a1, a3, a5, 1); *(_QWORD *)a6 = a3; v29 = (unsigned int)(v10 - *(_DWORD *)(v28 + 3096) - 20); *(_DWORD *)(a6 + 24) = v29; *(_DWORD *)(a6 + 32) = v29; v30 = &a3[*(_DWORD *)(v28 + 3096) + 12]; *(_QWORD *)(a6 + 8) = v30; *(_QWORD *)(a6 + 16) = &v30[v29]; *(_DWORD *)(a6 + 28) = 0; return 0; } v55 = a5; v50 = 6; v11 = *(_QWORD *)(v9 + 1536); v12 = *(_QWORD *)a2; v53 = v9; v13 = pagecache_read(v11, (long long)(a1 + 142), v12, 0, 0LL, *(_DWORD *)(v9 + 2004), 4u, &v49); *(_QWORD *)a6 = v13; v51 = v13 != 0; insert_dynamic(a1 + 93, &v49); if ( !v51 ) { v31 = *(unsigned int *)my_thread_var(a1 + 93, (const char *)&v49); v32 = a1; LABEL_36: ma_set_fatal_error(v32, v31, v17, v19, v14, v15); return 1; } v54 = a4; v16 = *(_QWORD *)a6; v17 = *a1; v18 = *(unsigned __int8 *)(*(_QWORD *)a6 + 8LL); v19 = *(unsigned __int8 *)(*(_QWORD *)a6 + 9LL); v20 = *(_QWORD *)a6 + v10; v21 = *(unsigned __int16 *)(*(_QWORD *)a6 + 10LL); *(_DWORD *)(a6 + 32) = v21; if ( (_DWORD)v19 != 255 ) { if ( (unsigned __int8)v19 < (unsigned __int8)v18 ) { v22 = (unsigned int)(4 * v19); v23 = -8 - v22; v24 = *(unsigned __int8 *)(v20 - v22 - 5); *(_BYTE *)(v16 + 9) = v24; if ( v24 != 255 ) { v14 = v20 - (unsigned int)(4 * v24); *(_BYTE *)(v14 - 6) = -1; } v25 = (_WORD *)(v20 + v23); while ( v23 <= -9 ) { v14 = *(unsigned __int16 *)(v20 + v23 + 4); v23 += 4LL; if ( (_DWORD)v14 ) { v26 = v14 + *(unsigned __int16 *)(v20 + v23 + 2); goto LABEL_19; } } v26 = *(_DWORD *)(v17 + 3096) + 12; LABEL_19: v39 = v10 - v22 + v16 - 11; do { v40 = (_BYTE *)v39; if ( *(_BYTE *)(v39 - 1) ) break; v39 -= 4LL; } while ( !*v40 ); v17 = (unsigned int)*(unsigned __int16 *)(v40 - 1) - v26; *v25 = v26; v41 = v25 + 1; LODWORD(v18) = v19; goto LABEL_28; } LABEL_35: v32 = a1; v31 = 127LL; goto LABEL_36; } if ( (_DWORD)v18 == 255 ) goto LABEL_35; v33 = v20 - (unsigned int)(4 * v18 - 4); v34 = *a1; if ( (_DWORD)v18 ) { v35 = *(unsigned __int16 *)(v33 - 8); v36 = *(unsigned __int16 *)(v33 - 6); v14 = (unsigned int)(v36 + v35 + 4); if ( (unsigned int)v14 <= (int)v33 - 8 - (int)v16 ) { v42 = v35 + v36; } else { v52 = v18; if ( v55 == 1 ) { v37 = *(_QWORD *)(a1[1] + 128); v38 = *(_DWORD *)(v34 + 952); } else { v37 = 0LL; v38 = 0; } ma_compact_block_page(v34, v16, v18 - 1, 0, v37, v38); v17 = *(unsigned __int16 *)(v33 - 8); v19 = *(unsigned __int16 *)(v33 - 6); v21 = *(unsigned __int16 *)(v16 + 10); *(_DWORD *)(a6 + 32) = v21; LODWORD(v18) = v52; if ( v21 < 4 ) goto LABEL_35; v42 = v17 + v19; } } else { v42 = *(_DWORD *)(v34 + 3096) + 12; } *(_DWORD *)(a6 + 32) = v21 - 4; *(_BYTE *)(v16 + 8) = v18 + 1; v25 = (_WORD *)(v33 - 12); v17 = (unsigned int)(v33 - 12 - (v42 + v16)); *(_WORD *)(v33 - 12) = v42; v41 = (_WORD *)(v33 - 10); LABEL_28: *v41 = 0; *(_DWORD *)(a6 + 28) = v18; *(_DWORD *)(a6 + 24) = v17; v43 = v54; if ( (unsigned int)v17 < v54 ) { v19 = (unsigned int)(v17 + *(_DWORD *)(a6 + 32)); if ( (unsigned int)v19 >= v54 ) { if ( v55 == 1 ) { v44 = *(_QWORD *)(a1[1] + 128); v45 = v53; v46 = *(_DWORD *)(v53 + 952); } else { v44 = 0LL; v46 = 0; v45 = v53; } ma_compact_block_page(v45, *(_QWORD *)a6, v18, 1, v44, v46); v47 = *(_QWORD *)a6 + v10 - (unsigned int)(4 * *(_DWORD *)(a6 + 28)); v17 = *(unsigned __int16 *)(v47 - 6); *(_DWORD *)(a6 + 32) = v17; *(_DWORD *)(a6 + 24) = v17; v25 = (_WORD *)(v47 - 8); } if ( (unsigned int)v17 < v43 ) goto LABEL_35; } *(_QWORD *)(a6 + 16) = v25; *(_QWORD *)(a6 + 8) = *(_QWORD *)a6 + (unsigned __int16)*v25; return 0; }
get_head_or_tail_page: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV RBX,R9 MOV R12D,ECX MOV R14,RDI MOV RCX,qword ptr [RDI] MOV R13D,dword ptr [RCX + 0x7bc] CMP byte ptr [RSI + 0x15],0x0 JZ 0x00162fbd MOV dword ptr [RBP + -0x2c],R8D LEA R15,[RBP + -0x58] MOV dword ptr [R15 + 0x8],0x6 MOV RDI,qword ptr [RCX + 0x600] LEA RAX,[R14 + 0x470] MOV RDX,qword ptr [RSI] MOV qword ptr [RBP + -0x38],RCX MOV R9D,dword ptr [RCX + 0x7d4] MOV RSI,RAX XOR ECX,ECX XOR R8D,R8D PUSH R15 PUSH 0x4 CALL 0x0013263a ADD RSP,0x10 MOV qword ptr [RBX],RAX TEST RAX,RAX SETNZ byte ptr [R15 + 0x10] LEA RDI,[R14 + 0x2e8] MOV RSI,R15 CALL 0x00191bc6 CMP byte ptr [R15 + 0x10],0x0 JZ 0x00163010 MOV dword ptr [RBP + -0x30],R12D MOV R15,qword ptr [RBX] MOV RDX,qword ptr [R14] MOVZX R10D,byte ptr [R15 + 0x8] MOVZX ECX,byte ptr [R15 + 0x9] LEA R12,[R15 + R13*0x1] MOVZX EAX,word ptr [R15 + 0xa] MOV dword ptr [RBX + 0x20],EAX CMP ECX,0xff JZ 0x0016301f CMP CL,R10B JNC 0x00163199 LEA ESI,[RCX*0x4] MOV RAX,R12 SUB RAX,RSI MOV RDI,-0x8 SUB RDI,RSI MOVZX EAX,byte ptr [RAX + -0x5] MOV byte ptr [R15 + 0x9],AL CMP RAX,0xff JZ 0x00162f92 SHL EAX,0x2 MOV R8,R12 SUB R8,RAX MOV byte ptr [R8 + -0x6],0xff LAB_00162f92: LEA RAX,[R12 + RDI*0x1] LAB_00162f96: CMP RDI,-0x9 JG 0x00163086 MOVZX R8D,word ptr [R12 + RDI*0x1 + 0x4] ADD RDI,0x4 TEST R8D,R8D JZ 0x00162f96 MOVZX EDI,word ptr [R12 + RDI*0x1 + 0x2] ADD EDI,R8D JMP 0x0016308f LAB_00162fbd: MOV R15,RDX MOV RDI,R14 MOV RSI,RDX MOV EDX,R8D MOV R14,RCX MOV ECX,0x1 CALL 0x0015f486 MOV qword ptr [RBX],R15 SUB R13D,dword ptr [R14 + 0xc18] ADD R13D,-0x14 MOV dword ptr [RBX + 0x18],R13D MOV dword ptr [RBX + 0x20],R13D MOV EAX,dword ptr [R14 + 0xc18] ADD EAX,0xc ADD RAX,R15 MOV qword ptr [RBX + 0x8],RAX ADD R13,RAX MOV qword ptr [RBX + 0x10],R13 MOV dword ptr [RBX + 0x1c],0x0 JMP 0x001631b8 LAB_00163010: CALL 0x001a1b22 MOV ESI,dword ptr [RAX] MOV RDI,R14 JMP 0x001631a1 LAB_0016301f: CMP R10D,0xff JZ 0x00163199 LEA ECX,[-0x4 + R10*0x4] SUB R12,RCX MOV RDI,qword ptr [R14] TEST R10D,R10D JZ 0x001631c9 LEA RSI,[R12 + -0x8] MOVZX EDX,word ptr [R12 + -0x8] MOVZX ECX,word ptr [R12 + -0x6] SUB ESI,R15D LEA R8D,[RCX + RDX*0x1] ADD R8D,0x4 CMP R8D,ESI JBE 0x001630c1 LEA EDX,[R10 + -0x1] CMP dword ptr [RBP + -0x2c],0x1 MOV qword ptr [RBP + -0x40],R10 JNZ 0x001630c5 MOV RAX,qword ptr [R14 + 0x8] MOV R8,qword ptr [RAX + 0x80] MOV R9D,dword ptr [RDI + 0x3b8] JMP 0x001630cb LAB_00163086: MOV EDI,dword ptr [RDX + 0xc18] ADD EDI,0xc LAB_0016308f: MOV RDX,R13 SUB RDX,RSI LEA RSI,[RDX + R15*0x1] ADD RSI,-0xb LAB_0016309d: MOV RDX,RSI CMP byte ptr [RSI + -0x1],0x0 JNZ 0x001630af LEA RSI,[RDX + -0x4] CMP byte ptr [RDX],0x0 JZ 0x0016309d LAB_001630af: MOVZX EDX,word ptr [RDX + -0x1] SUB EDX,EDI MOV word ptr [RAX],DI LEA R12,[RAX + 0x2] MOV R10D,ECX JMP 0x0016311d LAB_001630c1: ADD ECX,EDX JMP 0x001630f8 LAB_001630c5: XOR R8D,R8D XOR R9D,R9D LAB_001630cb: MOV RSI,R15 XOR ECX,ECX CALL 0x0015c124 MOVZX EDX,word ptr [R12 + -0x8] MOVZX ECX,word ptr [R12 + -0x6] MOVZX EAX,word ptr [R15 + 0xa] MOV dword ptr [RBX + 0x20],EAX CMP EAX,0x4 MOV R10,qword ptr [RBP + -0x40] JC 0x00163199 ADD ECX,EDX LAB_001630f8: ADD EAX,-0x4 MOV dword ptr [RBX + 0x20],EAX LEA EAX,[R10 + 0x1] MOV byte ptr [R15 + 0x8],AL LEA RAX,[R12 + -0xc] ADD R15D,ECX MOV EDX,EAX SUB EDX,R15D MOV word ptr [R12 + -0xc],CX ADD R12,-0xa LAB_0016311d: MOV word ptr [R12],0x0 MOV dword ptr [RBX + 0x1c],R10D MOV dword ptr [RBX + 0x18],EDX MOV R15D,dword ptr [RBP + -0x30] CMP EDX,R15D JNC 0x001631aa MOV ECX,dword ptr [RBX + 0x20] ADD ECX,EDX CMP ECX,R15D JC 0x00163194 MOV RSI,qword ptr [RBX] CMP dword ptr [RBP + -0x2c],0x1 JNZ 0x0016315f MOV RAX,qword ptr [R14 + 0x8] MOV R8,qword ptr [RAX + 0x80] MOV RDI,qword ptr [RBP + -0x38] MOV R9D,dword ptr [RDI + 0x3b8] JMP 0x00163169 LAB_0016315f: XOR R8D,R8D XOR R9D,R9D MOV RDI,qword ptr [RBP + -0x38] LAB_00163169: MOV EDX,R10D MOV ECX,0x1 CALL 0x0015c124 ADD R13,qword ptr [RBX] MOV EAX,dword ptr [RBX + 0x1c] SHL EAX,0x2 SUB R13,RAX MOVZX EDX,word ptr [R13 + -0x6] ADD R13,-0x8 MOV dword ptr [RBX + 0x20],EDX MOV dword ptr [RBX + 0x18],EDX MOV RAX,R13 LAB_00163194: CMP EDX,R15D JNC 0x001631aa LAB_00163199: MOV RDI,R14 MOV ESI,0x7f LAB_001631a1: CALL 0x00136a4c MOV AL,0x1 JMP 0x001631ba LAB_001631aa: MOV qword ptr [RBX + 0x10],RAX MOVZX EAX,word ptr [RAX] ADD RAX,qword ptr [RBX] MOV qword ptr [RBX + 0x8],RAX LAB_001631b8: XOR EAX,EAX LAB_001631ba: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001631c9: MOV ECX,dword ptr [RDI + 0xc18] ADD ECX,0xc JMP 0x001630f8
int8 get_head_or_tail_page (long *param_1,int8 *param_2,long param_3,uint param_4,int param_5,long *param_6) { byte bVar1; byte bVar2; ushort uVar3; ushort uVar4; ushort uVar5; long lVar6; long lVar7; uint uVar8; char *pcVar9; long lVar10; int4 *puVar11; int8 uVar12; uint uVar13; int4 uVar14; ulong uVar15; char *pcVar16; int iVar17; long lVar18; ushort *puVar19; uint uVar20; ulong uVar21; ushort *puVar22; int1 local_60 [8]; int4 local_58; char local_50; ulong local_48; long local_40; uint local_38; int local_34; lVar10 = *param_1; uVar20 = *(uint *)(lVar10 + 0x7bc); uVar21 = (ulong)uVar20; if (*(char *)((long)param_2 + 0x15) == '\0') { make_empty_page(param_1,param_3,param_5,1); *param_6 = param_3; uVar20 = (uVar20 - *(int *)(lVar10 + 0xc18)) - 0x14; *(uint *)(param_6 + 3) = uVar20; *(uint *)(param_6 + 4) = uVar20; param_3 = (ulong)(*(int *)(lVar10 + 0xc18) + 0xc) + param_3; param_6[1] = param_3; param_6[2] = (ulong)uVar20 + param_3; *(int4 *)((long)param_6 + 0x1c) = 0; LAB_001631b8: uVar12 = 0; } else { local_58 = 6; local_40 = lVar10; local_34 = param_5; lVar10 = pagecache_read(*(int8 *)(lVar10 + 0x600),param_1 + 0x8e,*param_2,0,0, *(int4 *)(lVar10 + 0x7d4),4,local_60); *param_6 = lVar10; local_50 = lVar10 != 0; insert_dynamic(param_1 + 0x5d,local_60); if (local_50 == '\0') { puVar11 = (int4 *)_my_thread_var(); uVar14 = *puVar11; } else { lVar6 = *param_6; lVar7 = *param_1; bVar1 = *(byte *)(lVar6 + 8); bVar2 = *(byte *)(lVar6 + 9); lVar10 = lVar6 + uVar21; uVar13 = (uint)*(ushort *)(lVar6 + 10); *(uint *)(param_6 + 4) = (uint)*(ushort *)(lVar6 + 10); uVar20 = (uint)bVar2; local_38 = param_4; if (uVar20 == 0xff) { if (bVar1 != 0xff) { lVar10 = lVar10 - (ulong)((uint)bVar1 * 4 - 4); lVar7 = *param_1; uVar20 = (uint)bVar1; if (bVar1 == 0) { iVar17 = *(int *)(lVar7 + 0xc18) + 0xc; } else if ((uint)(((int)lVar10 + -8) - (int)lVar6) < (uint)*(ushort *)(lVar10 + -6) + (uint)*(ushort *)(lVar10 + -8) + 4) { if (local_34 == 1) { uVar12 = *(int8 *)(param_1[1] + 0x80); uVar14 = *(int4 *)(lVar7 + 0x3b8); } else { uVar12 = 0; uVar14 = 0; } local_48 = (ulong)bVar1; _ma_compact_block_page(lVar7,lVar6,bVar1 - 1,0,uVar12,uVar14); uVar3 = *(ushort *)(lVar10 + -8); uVar4 = *(ushort *)(lVar10 + -6); uVar5 = *(ushort *)(lVar6 + 10); uVar13 = (uint)uVar5; *(uint *)(param_6 + 4) = (uint)uVar5; if (uVar5 < 4) goto LAB_00163199; iVar17 = (uint)uVar4 + (uint)uVar3; uVar20 = (uint)local_48; } else { iVar17 = (uint)*(ushort *)(lVar10 + -6) + (uint)*(ushort *)(lVar10 + -8); } *(uint *)(param_6 + 4) = uVar13 - 4; *(char *)(lVar6 + 8) = (char)uVar20 + '\x01'; puVar22 = (ushort *)(lVar10 + -0xc); uVar13 = (int)puVar22 - ((int)lVar6 + iVar17); *(short *)(lVar10 + -0xc) = (short)iVar17; puVar19 = (ushort *)(lVar10 + -10); goto LAB_0016311d; } } else if (bVar2 < bVar1) { uVar15 = (ulong)((uint)bVar2 * 4); lVar18 = -8 - uVar15; bVar1 = *(byte *)((lVar10 - uVar15) + -5); *(byte *)(lVar6 + 9) = bVar1; if (bVar1 != 0xff) { *(int1 *)(lVar10 + (ulong)bVar1 * -4 + -6) = 0xff; } puVar22 = (ushort *)(lVar10 + lVar18); do { if (-9 < lVar18) { iVar17 = *(int *)(lVar7 + 0xc18) + 0xc; goto LAB_0016308f; } uVar3 = *(ushort *)(lVar10 + 4 + lVar18); lVar18 = lVar18 + 4; } while (uVar3 == 0); iVar17 = (uint)*(ushort *)(lVar10 + 2 + lVar18) + (uint)uVar3; LAB_0016308f: pcVar9 = (char *)((uVar21 - uVar15) + lVar6 + -0xb); do { pcVar16 = pcVar9; if (pcVar16[-1] != '\0') break; pcVar9 = pcVar16 + -4; } while (*pcVar16 == '\0'); uVar13 = (uint)*(ushort *)(pcVar16 + -1) - iVar17; *puVar22 = (ushort)iVar17; puVar19 = puVar22 + 1; LAB_0016311d: uVar8 = local_38; *puVar19 = 0; *(uint *)((long)param_6 + 0x1c) = uVar20; *(uint *)(param_6 + 3) = uVar13; if (uVar13 < local_38) { if (local_38 <= (int)param_6[4] + uVar13) { if (local_34 == 1) { uVar12 = *(int8 *)(param_1[1] + 0x80); uVar14 = *(int4 *)(local_40 + 0x3b8); } else { uVar12 = 0; uVar14 = 0; } _ma_compact_block_page(local_40,*param_6,uVar20,1,uVar12,uVar14); lVar10 = (uVar21 + *param_6) - (ulong)(uint)(*(int *)((long)param_6 + 0x1c) << 2); uVar3 = *(ushort *)(lVar10 + -6); uVar13 = (uint)uVar3; puVar22 = (ushort *)(lVar10 + -8); *(uint *)(param_6 + 4) = (uint)uVar3; *(uint *)(param_6 + 3) = (uint)uVar3; } if (uVar13 < uVar8) goto LAB_00163199; } param_6[2] = (long)puVar22; param_6[1] = (ulong)*puVar22 + *param_6; goto LAB_001631b8; } LAB_00163199: uVar14 = 0x7f; } _ma_set_fatal_error(param_1,uVar14); uVar12 = 1; } return uVar12; }
28,724
httplib::detail::to_utf8(int, char*)
hkr04[P]cpp-mcp/common/httplib.h
inline size_t to_utf8(int code, char *buff) { if (code < 0x0080) { buff[0] = static_cast<char>(code & 0x7F); return 1; } else if (code < 0x0800) { buff[0] = static_cast<char>(0xC0 | ((code >> 6) & 0x1F)); buff[1] = static_cast<char>(0x80 | (code & 0x3F)); return 2; } else if (code < 0xD800) { buff[0] = static_cast<char>(0xE0 | ((code >> 12) & 0xF)); buff[1] = static_cast<char>(0x80 | ((code >> 6) & 0x3F)); buff[2] = static_cast<char>(0x80 | (code & 0x3F)); return 3; } else if (code < 0xE000) { // D800 - DFFF is invalid... return 0; } else if (code < 0x10000) { buff[0] = static_cast<char>(0xE0 | ((code >> 12) & 0xF)); buff[1] = static_cast<char>(0x80 | ((code >> 6) & 0x3F)); buff[2] = static_cast<char>(0x80 | (code & 0x3F)); return 3; } else if (code < 0x110000) { buff[0] = static_cast<char>(0xF0 | ((code >> 18) & 0x7)); buff[1] = static_cast<char>(0x80 | ((code >> 12) & 0x3F)); buff[2] = static_cast<char>(0x80 | ((code >> 6) & 0x3F)); buff[3] = static_cast<char>(0x80 | (code & 0x3F)); return 4; } // NOTREACHED return 0; }
O0
c
httplib::detail::to_utf8(int, char*): movl %edi, -0xc(%rsp) movq %rsi, -0x18(%rsp) cmpl $0x80, -0xc(%rsp) jge 0x230e1 movl -0xc(%rsp), %eax andl $0x7f, %eax movb %al, %cl movq -0x18(%rsp), %rax movb %cl, (%rax) movq $0x1, -0x8(%rsp) jmp 0x23285 cmpl $0x800, -0xc(%rsp) # imm = 0x800 jge 0x23127 movl -0xc(%rsp), %eax sarl $0x6, %eax andl $0x1f, %eax orl $0xc0, %eax movb %al, %cl movq -0x18(%rsp), %rax movb %cl, (%rax) movl -0xc(%rsp), %eax andl $0x3f, %eax orl $0x80, %eax movb %al, %cl movq -0x18(%rsp), %rax movb %cl, 0x1(%rax) movq $0x2, -0x8(%rsp) jmp 0x23285 cmpl $0xd800, -0xc(%rsp) # imm = 0xD800 jge 0x23186 movl -0xc(%rsp), %eax sarl $0xc, %eax andl $0xf, %eax orl $0xe0, %eax movb %al, %cl movq -0x18(%rsp), %rax movb %cl, (%rax) movl -0xc(%rsp), %eax sarl $0x6, %eax andl $0x3f, %eax orl $0x80, %eax movb %al, %cl movq -0x18(%rsp), %rax movb %cl, 0x1(%rax) movl -0xc(%rsp), %eax andl $0x3f, %eax orl $0x80, %eax movb %al, %cl movq -0x18(%rsp), %rax movb %cl, 0x2(%rax) movq $0x3, -0x8(%rsp) jmp 0x23285 cmpl $0xe000, -0xc(%rsp) # imm = 0xE000 jge 0x2319e movq $0x0, -0x8(%rsp) jmp 0x23285 cmpl $0x10000, -0xc(%rsp) # imm = 0x10000 jge 0x231fd movl -0xc(%rsp), %eax sarl $0xc, %eax andl $0xf, %eax orl $0xe0, %eax movb %al, %cl movq -0x18(%rsp), %rax movb %cl, (%rax) movl -0xc(%rsp), %eax sarl $0x6, %eax andl $0x3f, %eax orl $0x80, %eax movb %al, %cl movq -0x18(%rsp), %rax movb %cl, 0x1(%rax) movl -0xc(%rsp), %eax andl $0x3f, %eax orl $0x80, %eax movb %al, %cl movq -0x18(%rsp), %rax movb %cl, 0x2(%rax) movq $0x3, -0x8(%rsp) jmp 0x23285 cmpl $0x110000, -0xc(%rsp) # imm = 0x110000 jge 0x23272 movl -0xc(%rsp), %eax sarl $0x12, %eax andl $0x7, %eax orl $0xf0, %eax movb %al, %cl movq -0x18(%rsp), %rax movb %cl, (%rax) movl -0xc(%rsp), %eax sarl $0xc, %eax andl $0x3f, %eax orl $0x80, %eax movb %al, %cl movq -0x18(%rsp), %rax movb %cl, 0x1(%rax) movl -0xc(%rsp), %eax sarl $0x6, %eax andl $0x3f, %eax orl $0x80, %eax movb %al, %cl movq -0x18(%rsp), %rax movb %cl, 0x2(%rax) movl -0xc(%rsp), %eax andl $0x3f, %eax orl $0x80, %eax movb %al, %cl movq -0x18(%rsp), %rax movb %cl, 0x3(%rax) movq $0x4, -0x8(%rsp) jmp 0x23285 jmp 0x23274 jmp 0x23276 jmp 0x23278 jmp 0x2327a jmp 0x2327c movq $0x0, -0x8(%rsp) movq -0x8(%rsp), %rax retq nopl (%rax,%rax)
_ZN7httplib6detail7to_utf8EiPc: mov [rsp+var_C], edi mov [rsp+var_18], rsi cmp [rsp+var_C], 80h jge short loc_230E1 mov eax, [rsp+var_C] and eax, 7Fh mov cl, al mov rax, [rsp+var_18] mov [rax], cl mov [rsp+var_8], 1 jmp loc_23285 loc_230E1: cmp [rsp+var_C], 800h jge short loc_23127 mov eax, [rsp+var_C] sar eax, 6 and eax, 1Fh or eax, 0C0h mov cl, al mov rax, [rsp+var_18] mov [rax], cl mov eax, [rsp+var_C] and eax, 3Fh or eax, 80h mov cl, al mov rax, [rsp+var_18] mov [rax+1], cl mov [rsp+var_8], 2 jmp loc_23285 loc_23127: cmp [rsp+var_C], 0D800h jge short loc_23186 mov eax, [rsp+var_C] sar eax, 0Ch and eax, 0Fh or eax, 0E0h mov cl, al mov rax, [rsp+var_18] mov [rax], cl mov eax, [rsp+var_C] sar eax, 6 and eax, 3Fh or eax, 80h mov cl, al mov rax, [rsp+var_18] mov [rax+1], cl mov eax, [rsp+var_C] and eax, 3Fh or eax, 80h mov cl, al mov rax, [rsp+var_18] mov [rax+2], cl mov [rsp+var_8], 3 jmp loc_23285 loc_23186: cmp [rsp+var_C], 0E000h jge short loc_2319E mov [rsp+var_8], 0 jmp loc_23285 loc_2319E: cmp [rsp+var_C], 10000h jge short loc_231FD mov eax, [rsp+var_C] sar eax, 0Ch and eax, 0Fh or eax, 0E0h mov cl, al mov rax, [rsp+var_18] mov [rax], cl mov eax, [rsp+var_C] sar eax, 6 and eax, 3Fh or eax, 80h mov cl, al mov rax, [rsp+var_18] mov [rax+1], cl mov eax, [rsp+var_C] and eax, 3Fh or eax, 80h mov cl, al mov rax, [rsp+var_18] mov [rax+2], cl mov [rsp+var_8], 3 jmp loc_23285 loc_231FD: cmp [rsp+var_C], offset unk_110000 jge short loc_23272 mov eax, [rsp+var_C] sar eax, 12h and eax, 7 or eax, 0F0h mov cl, al mov rax, [rsp+var_18] mov [rax], cl mov eax, [rsp+var_C] sar eax, 0Ch and eax, 3Fh or eax, 80h mov cl, al mov rax, [rsp+var_18] mov [rax+1], cl mov eax, [rsp+var_C] sar eax, 6 and eax, 3Fh or eax, 80h mov cl, al mov rax, [rsp+var_18] mov [rax+2], cl mov eax, [rsp+var_C] and eax, 3Fh or eax, 80h mov cl, al mov rax, [rsp+var_18] mov [rax+3], cl mov [rsp+var_8], 4 jmp short loc_23285 loc_23272: jmp short $+2 loc_23274: jmp short $+2 loc_23276: jmp short $+2 loc_23278: jmp short $+2 loc_2327A: jmp short $+2 loc_2327C: mov [rsp+var_8], 0 loc_23285: mov rax, [rsp+var_8] retn
long long httplib::detail::to_utf8(httplib::detail *this, _BYTE *a2, char *a3) { if ( (int)this >= 128 ) { if ( (int)this >= 2048 ) { if ( (int)this >= 55296 ) { if ( (int)this >= 57344 ) { if ( (int)this >= 0x10000 ) { if ( (int)this >= (int)&unk_110000 ) { return 0LL; } else { *a2 = ((int)this >> 18) & 7 | 0xF0; a2[1] = ((int)this >> 12) & 0x3F | 0x80; a2[2] = ((int)this >> 6) & 0x3F | 0x80; a2[3] = (unsigned __int8)this & 0x3F | 0x80; return 4LL; } } else { *a2 = ((int)this >> 12) & 0xF | 0xE0; a2[1] = ((int)this >> 6) & 0x3F | 0x80; a2[2] = (unsigned __int8)this & 0x3F | 0x80; return 3LL; } } else { return 0LL; } } else { *a2 = ((int)this >> 12) & 0xF | 0xE0; a2[1] = ((int)this >> 6) & 0x3F | 0x80; a2[2] = (unsigned __int8)this & 0x3F | 0x80; return 3LL; } } else { *a2 = ((int)this >> 6) & 0x1F | 0xC0; a2[1] = (unsigned __int8)this & 0x3F | 0x80; return 2LL; } } else { *a2 = (unsigned __int8)this & 0x7F; return 1LL; } }
to_utf8: MOV dword ptr [RSP + -0xc],EDI MOV qword ptr [RSP + -0x18],RSI CMP dword ptr [RSP + -0xc],0x80 JGE 0x001230e1 MOV EAX,dword ptr [RSP + -0xc] AND EAX,0x7f MOV CL,AL MOV RAX,qword ptr [RSP + -0x18] MOV byte ptr [RAX],CL MOV qword ptr [RSP + -0x8],0x1 JMP 0x00123285 LAB_001230e1: CMP dword ptr [RSP + -0xc],0x800 JGE 0x00123127 MOV EAX,dword ptr [RSP + -0xc] SAR EAX,0x6 AND EAX,0x1f OR EAX,0xc0 MOV CL,AL MOV RAX,qword ptr [RSP + -0x18] MOV byte ptr [RAX],CL MOV EAX,dword ptr [RSP + -0xc] AND EAX,0x3f OR EAX,0x80 MOV CL,AL MOV RAX,qword ptr [RSP + -0x18] MOV byte ptr [RAX + 0x1],CL MOV qword ptr [RSP + -0x8],0x2 JMP 0x00123285 LAB_00123127: CMP dword ptr [RSP + -0xc],0xd800 JGE 0x00123186 MOV EAX,dword ptr [RSP + -0xc] SAR EAX,0xc AND EAX,0xf OR EAX,0xe0 MOV CL,AL MOV RAX,qword ptr [RSP + -0x18] MOV byte ptr [RAX],CL MOV EAX,dword ptr [RSP + -0xc] SAR EAX,0x6 AND EAX,0x3f OR EAX,0x80 MOV CL,AL MOV RAX,qword ptr [RSP + -0x18] MOV byte ptr [RAX + 0x1],CL MOV EAX,dword ptr [RSP + -0xc] AND EAX,0x3f OR EAX,0x80 MOV CL,AL MOV RAX,qword ptr [RSP + -0x18] MOV byte ptr [RAX + 0x2],CL MOV qword ptr [RSP + -0x8],0x3 JMP 0x00123285 LAB_00123186: CMP dword ptr [RSP + -0xc],0xe000 JGE 0x0012319e MOV qword ptr [RSP + -0x8],0x0 JMP 0x00123285 LAB_0012319e: CMP dword ptr [RSP + -0xc],0x10000 JGE 0x001231fd MOV EAX,dword ptr [RSP + -0xc] SAR EAX,0xc AND EAX,0xf OR EAX,0xe0 MOV CL,AL MOV RAX,qword ptr [RSP + -0x18] MOV byte ptr [RAX],CL MOV EAX,dword ptr [RSP + -0xc] SAR EAX,0x6 AND EAX,0x3f OR EAX,0x80 MOV CL,AL MOV RAX,qword ptr [RSP + -0x18] MOV byte ptr [RAX + 0x1],CL MOV EAX,dword ptr [RSP + -0xc] AND EAX,0x3f OR EAX,0x80 MOV CL,AL MOV RAX,qword ptr [RSP + -0x18] MOV byte ptr [RAX + 0x2],CL MOV qword ptr [RSP + -0x8],0x3 JMP 0x00123285 LAB_001231fd: CMP dword ptr [RSP + -0xc],0x110000 JGE 0x00123272 MOV EAX,dword ptr [RSP + -0xc] SAR EAX,0x12 AND EAX,0x7 OR EAX,0xf0 MOV CL,AL MOV RAX,qword ptr [RSP + -0x18] MOV byte ptr [RAX],CL MOV EAX,dword ptr [RSP + -0xc] SAR EAX,0xc AND EAX,0x3f OR EAX,0x80 MOV CL,AL MOV RAX,qword ptr [RSP + -0x18] MOV byte ptr [RAX + 0x1],CL MOV EAX,dword ptr [RSP + -0xc] SAR EAX,0x6 AND EAX,0x3f OR EAX,0x80 MOV CL,AL MOV RAX,qword ptr [RSP + -0x18] MOV byte ptr [RAX + 0x2],CL MOV EAX,dword ptr [RSP + -0xc] AND EAX,0x3f OR EAX,0x80 MOV CL,AL MOV RAX,qword ptr [RSP + -0x18] MOV byte ptr [RAX + 0x3],CL MOV qword ptr [RSP + -0x8],0x4 JMP 0x00123285 LAB_00123272: JMP 0x00123274 LAB_00123274: JMP 0x00123276 LAB_00123276: JMP 0x00123278 LAB_00123278: JMP 0x0012327a LAB_0012327a: JMP 0x0012327c LAB_0012327c: MOV qword ptr [RSP + -0x8],0x0 LAB_00123285: MOV RAX,qword ptr [RSP + -0x8] RET
/* httplib::detail::to_utf8(int, char*) */ int8 httplib::detail::to_utf8(int param_1,char *param_2) { byte bVar1; byte bVar2; byte bVar3; int8 local_8; bVar1 = (byte)param_1; if (param_1 < 0x80) { *param_2 = bVar1 & 0x7f; local_8 = 1; } else { bVar2 = (byte)(param_1 >> 6); if (param_1 < 0x800) { *param_2 = bVar2 & 0x1f | 0xc0; param_2[1] = bVar1 & 0x3f | 0x80; local_8 = 2; } else { bVar3 = (byte)(param_1 >> 0xc); if (param_1 < 0xd800) { *param_2 = bVar3 & 0xf | 0xe0; param_2[1] = bVar2 & 0x3f | 0x80; param_2[2] = bVar1 & 0x3f | 0x80; local_8 = 3; } else if (param_1 < 0xe000) { local_8 = 0; } else if (param_1 < 0x10000) { *param_2 = bVar3 & 0xf | 0xe0; param_2[1] = bVar2 & 0x3f | 0x80; param_2[2] = bVar1 & 0x3f | 0x80; local_8 = 3; } else if (param_1 < 0x110000) { *param_2 = (byte)(param_1 >> 0x12) & 7 | 0xf0; param_2[1] = bVar3 & 0x3f | 0x80; param_2[2] = bVar2 & 0x3f | 0x80; param_2[3] = bVar1 & 0x3f | 0x80; local_8 = 4; } else { local_8 = 0; } } } return local_8; }
28,725
mysql_local_infile_error
eloqsql/libmariadb/libmariadb/ma_loaddata.c
static int mysql_local_infile_error(void *ptr, char *error_buf, unsigned int error_buf_len) { MYSQL_INFILE_INFO *info = (MYSQL_INFILE_INFO *)ptr; if (info) { ma_strmake(error_buf, info->error_msg, error_buf_len); return(info->error_no); } ma_strmake(error_buf, "Unknown error", error_buf_len); return(CR_UNKNOWN_ERROR); }
O0
c
mysql_local_infile_error: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x28(%rbp) cmpq $0x0, -0x28(%rbp) je 0x88384 movq -0x18(%rbp), %rdi movq -0x28(%rbp), %rsi addq $0xc, %rsi movl -0x1c(%rbp), %eax movl %eax, %edx callq 0x8cb60 movq -0x28(%rbp), %rax movl 0x8(%rax), %eax movl %eax, -0x4(%rbp) jmp 0x883a0 movq -0x18(%rbp), %rdi movl -0x1c(%rbp), %eax movl %eax, %edx leaq 0x8c651(%rip), %rsi # 0x1149e5 callq 0x8cb60 movl $0x7d0, -0x4(%rbp) # imm = 0x7D0 movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopl (%rax)
mysql_local_infile_error: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov rax, [rbp+var_10] mov [rbp+var_28], rax cmp [rbp+var_28], 0 jz short loc_88384 mov rdi, [rbp+var_18] mov rsi, [rbp+var_28] add rsi, 0Ch mov eax, [rbp+var_1C] mov edx, eax call ma_strmake mov rax, [rbp+var_28] mov eax, [rax+8] mov [rbp+var_4], eax jmp short loc_883A0 loc_88384: mov rdi, [rbp+var_18] mov eax, [rbp+var_1C] mov edx, eax lea rsi, aUnknownError; "Unknown error" call ma_strmake mov [rbp+var_4], 7D0h loc_883A0: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long mysql_local_infile_error(long long a1, long long a2, unsigned int a3) { if ( a1 ) { ma_strmake(a2, a1 + 12, a3); return *(unsigned int *)(a1 + 8); } else { ma_strmake(a2, "Unknown error", a3); return 2000; } }
mysql_local_infile_error: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x28],RAX CMP qword ptr [RBP + -0x28],0x0 JZ 0x00188384 MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x28] ADD RSI,0xc MOV EAX,dword ptr [RBP + -0x1c] MOV EDX,EAX CALL 0x0018cb60 MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RBP + -0x4],EAX JMP 0x001883a0 LAB_00188384: MOV RDI,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x1c] MOV EDX,EAX LEA RSI,[0x2149e5] CALL 0x0018cb60 MOV dword ptr [RBP + -0x4],0x7d0 LAB_001883a0: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 mysql_local_infile_error(long param_1,int8 param_2,int4 param_3) { int4 local_c; if (param_1 == 0) { ma_strmake(param_2,"Unknown error",param_3); local_c = 2000; } else { ma_strmake(param_2,param_1 + 0xc,param_3); local_c = *(int4 *)(param_1 + 8); } return local_c; }
28,726
mysql_local_infile_error
eloqsql/libmariadb/libmariadb/ma_loaddata.c
static int mysql_local_infile_error(void *ptr, char *error_buf, unsigned int error_buf_len) { MYSQL_INFILE_INFO *info = (MYSQL_INFILE_INFO *)ptr; if (info) { ma_strmake(error_buf, info->error_msg, error_buf_len); return(info->error_no); } ma_strmake(error_buf, "Unknown error", error_buf_len); return(CR_UNKNOWN_ERROR); }
O3
c
mysql_local_infile_error: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rsi, %rax testq %rdi, %rdi je 0x66baf movq %rdi, %rbx leaq 0xc(%rdi), %rsi movl %edx, %edx movq %rax, %rdi callq 0x6919f movl 0x8(%rbx), %eax jmp 0x66bc5 movl %edx, %edx leaq 0x56178(%rip), %rsi # 0xbcd30 movq %rax, %rdi callq 0x6919f movl $0x7d0, %eax # imm = 0x7D0 addq $0x8, %rsp popq %rbx popq %rbp retq
mysql_local_infile_error: push rbp mov rbp, rsp push rbx push rax mov rax, rsi test rdi, rdi jz short loc_66BAF mov rbx, rdi lea rsi, [rdi+0Ch] mov edx, edx mov rdi, rax call ma_strmake mov eax, [rbx+8] jmp short loc_66BC5 loc_66BAF: mov edx, edx lea rsi, aUnknownError; "Unknown error" mov rdi, rax call ma_strmake mov eax, 7D0h loc_66BC5: add rsp, 8 pop rbx pop rbp retn
long long mysql_local_infile_error(long long a1, long long a2, unsigned int a3) { if ( a1 ) { ma_strmake(a2, a1 + 12, a3); return *(unsigned int *)(a1 + 8); } else { ma_strmake(a2, "Unknown error", a3); return 2000LL; } }
mysql_local_infile_error: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RAX,RSI TEST RDI,RDI JZ 0x00166baf MOV RBX,RDI LEA RSI,[RDI + 0xc] MOV EDX,EDX MOV RDI,RAX CALL 0x0016919f MOV EAX,dword ptr [RBX + 0x8] JMP 0x00166bc5 LAB_00166baf: MOV EDX,EDX LEA RSI,[0x1bcd30] MOV RDI,RAX CALL 0x0016919f MOV EAX,0x7d0 LAB_00166bc5: ADD RSP,0x8 POP RBX POP RBP RET
int4 mysql_local_infile_error(long param_1,int8 param_2,int4 param_3) { int4 uVar1; if (param_1 == 0) { ma_strmake(param_2,"Unknown error",param_3); uVar1 = 2000; } else { ma_strmake(param_2,param_1 + 0xc,param_3); uVar1 = *(int4 *)(param_1 + 8); } return uVar1; }
28,727
rw_pr_init
eloqsql/mysys/thr_rwlock.c
int rw_pr_init(rw_pr_lock_t *rwlock) { pthread_mutex_init(&rwlock->lock, NULL); pthread_cond_init(&rwlock->no_active_readers, NULL); rwlock->active_readers= 0; rwlock->writers_waiting_readers= 0; rwlock->active_writer= FALSE; #ifdef SAFE_MUTEX rwlock->writer_thread= 0; #endif return 0; }
O3
c
rw_pr_init: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx xorl %esi, %esi callq 0x2a310 leaq 0x28(%rbx), %rdi xorl %esi, %esi callq 0x2a350 movq $0x0, 0x58(%rbx) movb $0x0, 0x60(%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %rbp retq
rw_pr_init: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi xor esi, esi call _pthread_mutex_init lea rdi, [rbx+28h] xor esi, esi call _pthread_cond_init mov qword ptr [rbx+58h], 0 mov byte ptr [rbx+60h], 0 xor eax, eax add rsp, 8 pop rbx pop rbp retn
long long rw_pr_init(long long a1) { pthread_mutex_init(a1, 0LL); pthread_cond_init(a1 + 40, 0LL); *(_QWORD *)(a1 + 88) = 0LL; *(_BYTE *)(a1 + 96) = 0; return 0LL; }
rw_pr_init: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI XOR ESI,ESI CALL 0x0012a310 LEA RDI,[RBX + 0x28] XOR ESI,ESI CALL 0x0012a350 MOV qword ptr [RBX + 0x58],0x0 MOV byte ptr [RBX + 0x60],0x0 XOR EAX,EAX ADD RSP,0x8 POP RBX POP RBP RET
int8 rw_pr_init(pthread_mutex_t *param_1) { pthread_mutex_init(param_1,(pthread_mutexattr_t *)0x0); pthread_cond_init((pthread_cond_t *)(param_1 + 1),(pthread_condattr_t *)0x0); *(int8 *)((long)param_1 + 0x58) = 0; *(int1 *)((long)param_1 + 0x60) = 0; return 0; }
28,728
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::parse<char const (&) [24]>(char const (&) [24], std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, 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>&)>, bool, bool)
llama.cpp/common/./json.hpp
JSON_HEDLEY_WARN_UNUSED_RESULT static basic_json parse(InputType&& i, const parser_callback_t cb = nullptr, const bool allow_exceptions = true, const bool ignore_comments = false) { basic_json result; parser(detail::input_adapter(std::forward<InputType>(i)), cb, allow_exceptions, ignore_comments).parse(true, result); return result; }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::parse<char const (&) [24]>(char const (&) [24], std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, 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>&)>, bool, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0xf0, %rsp movl %r8d, %ebp movl %ecx, %r14d movq %rdi, %rbx movb $0x0, (%rdi) movq $0x0, 0x8(%rdi) movq (%rsi), %r15 movq 0x8(%rsi), %r12 leaq 0x8(%rsp), %rdi movq %rdx, %rsi callq 0x2b232 addq %r15, %r12 movzbl %r14b, %r8d movzbl %bpl, %r9d leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rcx movq %r15, %rsi movq %r12, %rdx callq 0x2b186 leaq 0x28(%rsp), %rdi movl $0x1, %esi movq %rbx, %rdx callq 0x2b290 leaq 0x50(%rsp), %r14 movq %r14, %rdi callq 0x2bca2 movq -0x18(%r14), %rax testq %rax, %rax je 0x2b10e leaq 0x28(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x18(%rsp), %rax testq %rax, %rax je 0x2b127 leaq 0x8(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq %rbx, %rax addq $0xf0, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq jmp 0x2b16b jmp 0x2b16b movq %rax, %r14 leaq 0x28(%rsp), %rdi callq 0x2b7be jmp 0x2b150 movq %rax, %r14 movq 0x18(%rsp), %rax testq %rax, %rax je 0x2b176 leaq 0x8(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax jmp 0x2b176 movq %rax, %rdi callq 0x2a81a movq %rax, %r14 movq %rbx, %rdi callq 0x300e0 movq %r14, %rdi callq 0x1c7d0
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5parseIRKS9_EESD_OT_St8functionIFbiNS0_6detail13parse_event_tERSD_EEbb: push rbp push r15 push r14 push r12 push rbx sub rsp, 0F0h mov ebp, r8d mov r14d, ecx mov rbx, rdi mov byte ptr [rdi], 0 mov qword ptr [rdi+8], 0 mov r15, [rsi] mov r12, [rsi+8] lea rdi, [rsp+118h+var_110] mov rsi, rdx call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEC2ERKSJ_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<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> &)>::function(std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)> const&) add r12, r15 movzx r8d, r14b movzx r9d, bpl lea rdi, [rsp+118h+var_F0] lea rcx, [rsp+118h+var_110] mov rsi, r15 mov rdx, r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6parserINS0_6detail22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcS9_EEEEEENSF_6parserISD_T_EESO_St8functionIFbiNSF_13parse_event_tERSD_EEbb; 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>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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>&)>,bool,bool) lea rdi, [rsp+118h+var_F0]; int mov esi, 1 mov rdx, rbx call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5parseEbRSF_; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parse(bool,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>&) lea r14, [rsp+118h+var_C8] mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~lexer() mov rax, [r14-18h] test rax, rax jz short loc_2B10E lea rdi, [rsp+118h+var_F0] mov rsi, rdi mov edx, 3 call rax loc_2B10E: mov rax, [rsp+118h+var_100] test rax, rax jz short loc_2B127 lea rdi, [rsp+118h+var_110] mov rsi, rdi mov edx, 3 call rax loc_2B127: mov rax, rbx add rsp, 0F0h pop rbx pop r12 pop r14 pop r15 pop rbp retn jmp short loc_2B16B jmp short loc_2B16B mov r14, rax lea rdi, [rsp+118h+var_F0] call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~parser() jmp short loc_2B150 mov r14, rax loc_2B150: mov rax, [rsp+118h+var_100] test rax, rax jz short loc_2B176 lea rdi, [rsp+118h+var_110] mov rsi, rdi mov edx, 3 call rax jmp short loc_2B176 loc_2B16B: mov rdi, rax call __clang_call_terminate mov r14, rax loc_2B176: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; 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>::data::~data() mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::parse<std::string const&>( long long a1, long long *a2, long long a3, unsigned __int8 a4, unsigned __int8 a5) { long long v7; // r15 long long v8; // r12 _BYTE v10[16]; // [rsp+8h] [rbp-110h] BYREF void ( *v11)(_BYTE *, _BYTE *, long long); // [rsp+18h] [rbp-100h] int v12[4]; // [rsp+28h] [rbp-F0h] BYREF void ( *v13)(int *, int *, long long); // [rsp+38h] [rbp-E0h] _BYTE v14[200]; // [rsp+50h] [rbp-C8h] BYREF *(_BYTE *)a1 = 0; *(_QWORD *)(a1 + 8) = 0LL; v7 = *a2; v8 = a2[1]; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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> &)>::function( v10, a3); 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>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>( v12, v7, v7 + v8, v10, a4, a5); nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parse((int)v12); 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( v14, 1LL); if ( v13 ) v13(v12, v12, 3LL); if ( v11 ) v11(v10, v10, 3LL); return a1; }
parse<std::__cxx11::string_const&>: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0xf0 MOV EBP,R8D MOV R14D,ECX MOV RBX,RDI MOV byte ptr [RDI],0x0 MOV qword ptr [RDI + 0x8],0x0 MOV R15,qword ptr [RSI] MOV R12,qword ptr [RSI + 0x8] LAB_0012b0aa: LEA RDI,[RSP + 0x8] MOV RSI,RDX CALL 0x0012b232 ADD R12,R15 LAB_0012b0ba: MOVZX R8D,R14B MOVZX R9D,BPL LEA RDI,[RSP + 0x28] LEA RCX,[RSP + 0x8] MOV RSI,R15 MOV RDX,R12 CALL 0x0012b186 LAB_0012b0d7: LEA RDI,[RSP + 0x28] MOV ESI,0x1 MOV RDX,RBX CALL 0x0012b290 LEA R14,[RSP + 0x50] MOV RDI,R14 CALL 0x0012bca2 MOV RAX,qword ptr [R14 + -0x18] TEST RAX,RAX JZ 0x0012b10e LAB_0012b0ff: LEA RDI,[RSP + 0x28] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_0012b10e: MOV RAX,qword ptr [RSP + 0x18] TEST RAX,RAX JZ 0x0012b127 LAB_0012b118: LEA RDI,[RSP + 0x8] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_0012b127: MOV RAX,RBX ADD RSP,0xf0 POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> 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>::parse<std::__cxx11::string const&>(std::__cxx11::string const&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, 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>&)>, bool, bool) */ 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:: 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> ::parse<std::__cxx11::string_const&> (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,long *param_1,function *param_3,int1 param_4,int1 param_5) { long lVar1; long lVar2; function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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>&)> local_110 [16]; code *local_100; parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> local_f0 [16]; code *local_e0; 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>>> local_c8 [160]; *this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0; *(int8 *)(this + 8) = 0; lVar1 = *param_1; lVar2 = param_1[1]; /* try { // try from 0012b0aa to 0012b0b6 has its CatchHandler @ 0012b173 */ std:: function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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>&)> ::function(local_110,param_3); /* try { // try from 0012b0ba to 0012b0d6 has its CatchHandler @ 0012b14d */ parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> (local_f0,lVar1,lVar2 + lVar1,local_110,param_4,param_5); /* try { // try from 0012b0d7 to 0012b0e8 has its CatchHandler @ 0012b13e */ detail:: parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::parse(local_f0,true,(basic_json *)this); 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(local_c8); if (local_e0 != (code *)0x0) { /* try { // try from 0012b0ff to 0012b10d has its CatchHandler @ 0012b13c */ (*local_e0)(local_f0,local_f0,3); } if (local_100 != (code *)0x0) { /* try { // try from 0012b118 to 0012b126 has its CatchHandler @ 0012b13a */ (*local_100)(local_110,local_110,3); } return this; }
28,729
write_hook_for_clr_end
eloqsql/storage/maria/ma_key_recover.c
my_bool write_hook_for_clr_end(enum translog_record_type type __attribute__ ((unused)), TRN *trn, MARIA_HA *tbl_info, LSN *lsn __attribute__ ((unused)), void *hook_arg) { MARIA_SHARE *share= tbl_info->s; struct st_msg_to_write_hook_for_clr_end *msg= (struct st_msg_to_write_hook_for_clr_end *)hook_arg; my_bool error= FALSE; DBUG_ENTER("write_hook_for_clr_end"); DBUG_ASSERT(trn->trid != 0); trn->undo_lsn= msg->previous_undo_lsn; switch (msg->undone_record_type) { case LOGREC_UNDO_ROW_DELETE: share->state.state.records++; share->state.state.checksum+= msg->checksum_delta; break; case LOGREC_UNDO_ROW_INSERT: share->state.state.records--; share->state.state.checksum+= msg->checksum_delta; break; case LOGREC_UNDO_ROW_UPDATE: share->state.state.checksum+= msg->checksum_delta; break; case LOGREC_UNDO_KEY_INSERT_WITH_ROOT: case LOGREC_UNDO_KEY_DELETE_WITH_ROOT: { /* Update key root */ struct st_msg_to_write_hook_for_undo_key *extra_msg= (struct st_msg_to_write_hook_for_undo_key *) msg->extra_msg; *extra_msg->root= extra_msg->value; break; } case LOGREC_UNDO_KEY_INSERT: case LOGREC_UNDO_KEY_DELETE: break; case LOGREC_UNDO_BULK_INSERT: mysql_mutex_assert_owner(&share->intern_lock); error= (maria_enable_indexes(tbl_info) || /* we enabled indices, need '2' below */ _ma_state_info_write(share, MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET | MA_STATE_INFO_WRITE_FULL_INFO)); /* no need for _ma_reset_status(): REDO_DELETE_ALL is just before us */ break; default: DBUG_ASSERT(0); } if (trn->undo_lsn == LSN_IMPOSSIBLE) /* has fully rolled back */ trn->first_undo_lsn= LSN_WITH_FLAGS_TO_FLAGS(trn->first_undo_lsn); DBUG_RETURN(error); }
O0
c
write_hook_for_clr_end: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x38(%rbp) movb $0x0, -0x39(%rbp) jmp 0x44554 movq -0x38(%rbp), %rax movq (%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x98(%rax) movq -0x38(%rbp), %rax movl 0x8(%rax), %eax addl $-0x12, %eax movl %eax, %ecx movq %rcx, -0x50(%rbp) subl $0x15, %eax ja 0x4464e movq -0x50(%rbp), %rax leaq 0x11448a(%rip), %rcx # 0x158a14 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x30(%rbp), %rax movq 0x18(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x18(%rax) movq -0x38(%rbp), %rax movl 0xc(%rax), %ecx movq -0x30(%rbp), %rax addl 0x48(%rax), %ecx movl %ecx, 0x48(%rax) jmp 0x44654 movq -0x30(%rbp), %rax movq 0x18(%rax), %rcx addq $-0x1, %rcx movq %rcx, 0x18(%rax) movq -0x38(%rbp), %rax movl 0xc(%rax), %ecx movq -0x30(%rbp), %rax addl 0x48(%rax), %ecx movl %ecx, 0x48(%rax) jmp 0x44654 movq -0x38(%rbp), %rax movl 0xc(%rax), %ecx movq -0x30(%rbp), %rax addl 0x48(%rax), %ecx movl %ecx, 0x48(%rax) jmp 0x44654 movq -0x38(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movq 0x8(%rax), %rcx movq -0x48(%rbp), %rax movq (%rax), %rax movq %rcx, (%rax) jmp 0x44654 jmp 0x44654 jmp 0x44613 jmp 0x44615 movq -0x18(%rbp), %rdi callq 0x93940 movl %eax, %ecx movb $0x1, %al cmpl $0x0, %ecx movb %al, -0x51(%rbp) jne 0x44641 movq -0x30(%rbp), %rdi movl $0x3, %esi callq 0x90070 cmpl $0x0, %eax setne %al movb %al, -0x51(%rbp) movb -0x51(%rbp), %al andb $0x1, %al movzbl %al, %eax movb %al, -0x39(%rbp) jmp 0x44654 jmp 0x44650 jmp 0x44652 jmp 0x44654 movq -0x10(%rbp), %rax cmpq $0x0, 0x98(%rax) jne 0x44682 movq -0x10(%rbp), %rax movabsq $-0x100000000000000, %rcx # imm = 0xFF00000000000000 andq 0xa0(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0xa0(%rax) jmp 0x44684 movb -0x39(%rbp), %al movb %al, -0x52(%rbp) movb -0x52(%rbp), %al addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
write_hook_for_clr_end: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_30], rax mov rax, [rbp+var_28] mov [rbp+var_38], rax mov [rbp+var_39], 0 jmp short $+2 loc_44554: mov rax, [rbp+var_38] mov rcx, [rax] mov rax, [rbp+var_10] mov [rax+98h], rcx mov rax, [rbp+var_38] mov eax, [rax+8] add eax, 0FFFFFFEEh; switch 22 cases mov ecx, eax mov [rbp+var_50], rcx sub eax, 15h ja def_44591; jumptable 0000000000044591 default case, cases 25-38 mov rax, [rbp+var_50] lea rcx, jpt_44591 movsxd rax, ds:(jpt_44591 - 158A14h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_44593: mov rax, [rbp+var_30]; jumptable 0000000000044591 case 19 mov rcx, [rax+18h] add rcx, 1 mov [rax+18h], rcx mov rax, [rbp+var_38] mov ecx, [rax+0Ch] mov rax, [rbp+var_30] add ecx, [rax+48h] mov [rax+48h], ecx jmp loc_44654 loc_445B9: mov rax, [rbp+var_30]; jumptable 0000000000044591 case 18 mov rcx, [rax+18h] add rcx, 0FFFFFFFFFFFFFFFFh mov [rax+18h], rcx mov rax, [rbp+var_38] mov ecx, [rax+0Ch] mov rax, [rbp+var_30] add ecx, [rax+48h] mov [rax+48h], ecx jmp short loc_44654 loc_445DC: mov rax, [rbp+var_38]; jumptable 0000000000044591 case 20 mov ecx, [rax+0Ch] mov rax, [rbp+var_30] add ecx, [rax+48h] mov [rax+48h], ecx jmp short loc_44654 loc_445EF: mov rax, [rbp+var_38]; jumptable 0000000000044591 cases 22,24 mov rax, [rax+10h] mov [rbp+var_48], rax mov rax, [rbp+var_48] mov rcx, [rax+8] mov rax, [rbp+var_48] mov rax, [rax] mov [rax], rcx jmp short loc_44654 loc_4460F: jmp short loc_44654; jumptable 0000000000044591 cases 21,23 loc_44611: jmp short $+2; jumptable 0000000000044591 case 39 loc_44613: jmp short $+2 loc_44615: mov rdi, [rbp+var_18] call maria_enable_indexes mov ecx, eax mov al, 1 cmp ecx, 0 mov [rbp+var_51], al jnz short loc_44641 mov rdi, [rbp+var_30] mov esi, 3 call _ma_state_info_write cmp eax, 0 setnz al mov [rbp+var_51], al loc_44641: mov al, [rbp+var_51] and al, 1 movzx eax, al mov [rbp+var_39], al jmp short loc_44654 def_44591: jmp short $+2; jumptable 0000000000044591 default case, cases 25-38 loc_44650: jmp short $+2 loc_44652: jmp short $+2 loc_44654: mov rax, [rbp+var_10] cmp qword ptr [rax+98h], 0 jnz short loc_44682 mov rax, [rbp+var_10] mov rcx, 0FF00000000000000h and rcx, [rax+0A0h] mov rax, [rbp+var_10] mov [rax+0A0h], rcx loc_44682: jmp short $+2 loc_44684: mov al, [rbp+var_39] mov [rbp+var_52], al mov al, [rbp+var_52] add rsp, 60h pop rbp retn
bool write_hook_for_clr_end(long long a1, long long a2, long long *a3, long long a4, long long a5) { bool v6; // [rsp+Fh] [rbp-51h] bool v7; // [rsp+27h] [rbp-39h] long long v8; // [rsp+30h] [rbp-30h] v8 = *a3; v7 = 0; *(_QWORD *)(a2 + 152) = *(_QWORD *)a5; switch ( *(_DWORD *)(a5 + 8) ) { case 0x12: --*(_QWORD *)(v8 + 24); *(_DWORD *)(v8 + 72) += *(_DWORD *)(a5 + 12); break; case 0x13: ++*(_QWORD *)(v8 + 24); *(_DWORD *)(v8 + 72) += *(_DWORD *)(a5 + 12); break; case 0x14: *(_DWORD *)(v8 + 72) += *(_DWORD *)(a5 + 12); break; case 0x16: case 0x18: ***(_QWORD ***)(a5 + 16) = *(_QWORD *)(*(_QWORD *)(a5 + 16) + 8LL); break; case 0x27: v6 = 1; if ( !(unsigned int)maria_enable_indexes(a3) ) v6 = (unsigned int)ma_state_info_write(v8, 3LL) != 0; v7 = v6; break; default: break; } if ( !*(_QWORD *)(a2 + 152) ) *(_QWORD *)(a2 + 160) &= 0xFF00000000000000LL; return v7; }
write_hook_for_clr_end: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x38],RAX MOV byte ptr [RBP + -0x39],0x0 JMP 0x00144554 LAB_00144554: MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x98],RCX MOV RAX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RAX + 0x8] ADD EAX,-0x12 MOV ECX,EAX MOV qword ptr [RBP + -0x50],RCX SUB EAX,0x15 JA 0x0014464e MOV RAX,qword ptr [RBP + -0x50] LEA RCX,[0x258a14] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_13: MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RAX + 0x18] ADD RCX,0x1 MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RAX + 0xc] MOV RAX,qword ptr [RBP + -0x30] ADD ECX,dword ptr [RAX + 0x48] MOV dword ptr [RAX + 0x48],ECX JMP 0x00144654 caseD_12: MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RAX + 0x18] ADD RCX,-0x1 MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RAX + 0xc] MOV RAX,qword ptr [RBP + -0x30] ADD ECX,dword ptr [RAX + 0x48] MOV dword ptr [RAX + 0x48],ECX JMP 0x00144654 caseD_14: MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RAX + 0xc] MOV RAX,qword ptr [RBP + -0x30] ADD ECX,dword ptr [RAX + 0x48] MOV dword ptr [RAX + 0x48],ECX JMP 0x00144654 caseD_16: MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX],RCX JMP 0x00144654 caseD_15: JMP 0x00144654 caseD_27: JMP 0x00144613 LAB_00144613: JMP 0x00144615 LAB_00144615: MOV RDI,qword ptr [RBP + -0x18] CALL 0x00193940 MOV ECX,EAX MOV AL,0x1 CMP ECX,0x0 MOV byte ptr [RBP + -0x51],AL JNZ 0x00144641 MOV RDI,qword ptr [RBP + -0x30] MOV ESI,0x3 CALL 0x00190070 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x51],AL LAB_00144641: MOV AL,byte ptr [RBP + -0x51] AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x39],AL JMP 0x00144654 caseD_19: JMP 0x00144650 LAB_00144650: JMP 0x00144652 LAB_00144652: JMP 0x00144654 LAB_00144654: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x98],0x0 JNZ 0x00144682 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,-0x100000000000000 AND RCX,qword ptr [RAX + 0xa0] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xa0],RCX LAB_00144682: JMP 0x00144684 LAB_00144684: MOV AL,byte ptr [RBP + -0x39] MOV byte ptr [RBP + -0x52],AL MOV AL,byte ptr [RBP + -0x52] ADD RSP,0x60 POP RBP RET
bool write_hook_for_clr_end (int8 param_1,long param_2,long *param_3,int8 param_4,int8 *param_5 ) { long lVar1; int iVar2; bool local_59; bool local_41; lVar1 = *param_3; local_41 = false; *(int8 *)(param_2 + 0x98) = *param_5; switch(*(int4 *)(param_5 + 1)) { case 0x12: *(long *)(lVar1 + 0x18) = *(long *)(lVar1 + 0x18) + -1; *(int *)(lVar1 + 0x48) = *(int *)((long)param_5 + 0xc) + *(int *)(lVar1 + 0x48); break; case 0x13: *(long *)(lVar1 + 0x18) = *(long *)(lVar1 + 0x18) + 1; *(int *)(lVar1 + 0x48) = *(int *)((long)param_5 + 0xc) + *(int *)(lVar1 + 0x48); break; case 0x14: *(int *)(lVar1 + 0x48) = *(int *)((long)param_5 + 0xc) + *(int *)(lVar1 + 0x48); break; case 0x15: case 0x17: break; case 0x16: case 0x18: **(int8 **)param_5[2] = ((int8 *)param_5[2])[1]; break; default: break; case 0x27: iVar2 = maria_enable_indexes(param_3); local_59 = true; if (iVar2 == 0) { iVar2 = _ma_state_info_write(lVar1,3); local_59 = iVar2 != 0; } local_41 = local_59; } if (*(long *)(param_2 + 0x98) == 0) { *(ulong *)(param_2 + 0xa0) = *(ulong *)(param_2 + 0xa0) & 0xff00000000000000; } return local_41; }
28,730
update_backward_delete_link
eloqsql/storage/maria/ma_dynrec.c
static my_bool update_backward_delete_link(MARIA_HA *info, my_off_t delete_block, MARIA_RECORD_POS filepos) { MARIA_BLOCK_INFO block_info; DBUG_ENTER("update_backward_delete_link"); if (delete_block != HA_OFFSET_ERROR) { block_info.second_read=0; if (_ma_get_block_info(info, &block_info, info->dfile.file, delete_block) & BLOCK_DELETED) { uchar buff[8]; mi_sizestore(buff,filepos); if (info->s->file_write(info,buff, 8, delete_block+12, MYF(MY_NABP))) DBUG_RETURN(1); /* Error on write */ } else { _ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); DBUG_RETURN(1); /* Wrong delete link */ } } DBUG_RETURN(0); }
O3
c
update_backward_delete_link: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x68, %rsp movq %fs:0x28, %rax movq %rax, -0x20(%rbp) cmpq $-0x1, %rsi je 0x3a090 movq %rdx, %r15 movq %rsi, %rbx movq %rdi, %r14 leaq -0x78(%rbp), %rsi movl $0x0, 0x50(%rsi) movl 0x480(%rdi), %edx movq %rbx, %rcx callq 0x39ab8 testb $0x4, %al jne 0x3a05e movq %r14, %rdi movl $0x7f, %esi callq 0x32af4 movb $0x1, %al jmp 0x3a092 bswapq %r15 leaq -0x80(%rbp), %rsi movq %r15, (%rsi) movq (%r14), %rax addq $0xc, %rbx movl $0x8, %edx movl $0x4, %r8d movq %r14, %rdi movq %rbx, %rcx callq *0x6e8(%rax) movq %rax, %rcx movb $0x1, %al testq %rcx, %rcx jne 0x3a092 xorl %eax, %eax movq %fs:0x28, %rcx cmpq -0x20(%rbp), %rcx jne 0x3a0ac addq $0x68, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x29260
update_backward_delete_link: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 68h mov rax, fs:28h mov [rbp+var_20], rax cmp rsi, 0FFFFFFFFFFFFFFFFh jz short loc_3A090 mov r15, rdx mov rbx, rsi mov r14, rdi lea rsi, [rbp+var_78] mov dword ptr [rsi+50h], 0 mov edx, [rdi+480h] mov rcx, rbx call _ma_get_block_info test al, 4 jnz short loc_3A05E mov rdi, r14 mov esi, 7Fh call _ma_set_fatal_error mov al, 1 jmp short loc_3A092 loc_3A05E: bswap r15 lea rsi, [rbp+var_80] mov [rsi], r15 mov rax, [r14] add rbx, 0Ch mov edx, 8 mov r8d, 4 mov rdi, r14 mov rcx, rbx call qword ptr [rax+6E8h] mov rcx, rax mov al, 1 test rcx, rcx jnz short loc_3A092 loc_3A090: xor eax, eax loc_3A092: mov rcx, fs:28h cmp rcx, [rbp+var_20] jnz short loc_3A0AC add rsp, 68h pop rbx pop r14 pop r15 pop rbp retn loc_3A0AC: call ___stack_chk_fail
char update_backward_delete_link( _DWORD *a1, long long a2, unsigned long long a3, long long a4, long long a5, int a6) { long long v7; // rdx long long v8; // rcx long long v9; // r8 int v10; // r9d char result; // al long long v12; // rcx unsigned long long v13; // [rsp+0h] [rbp-80h] BYREF unsigned __int8 v14[80]; // [rsp+8h] [rbp-78h] BYREF int v15; // [rsp+58h] [rbp-28h] unsigned long long v16; // [rsp+60h] [rbp-20h] v16 = __readfsqword(0x28u); if ( a2 == -1 ) return 0; v15 = 0; if ( (ma_get_block_info((long long)a1, v14, (unsigned int)a1[288], a2, a5, a6) & 4) == 0 ) { ma_set_fatal_error(a1, 127, v7, v8, v9, v10); return 1; } v13 = _byteswap_uint64(a3); v12 = (*(long long ( **)(_DWORD *, unsigned long long *, long long, long long, long long))(*(_QWORD *)a1 + 1768LL))( a1, &v13, 8LL, a2 + 12, 4LL); result = 1; if ( !v12 ) return 0; return result; }
update_backward_delete_link: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x68 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x20],RAX CMP RSI,-0x1 JZ 0x0013a090 MOV R15,RDX MOV RBX,RSI MOV R14,RDI LEA RSI,[RBP + -0x78] MOV dword ptr [RSI + 0x50],0x0 MOV EDX,dword ptr [RDI + 0x480] MOV RCX,RBX CALL 0x00139ab8 TEST AL,0x4 JNZ 0x0013a05e MOV RDI,R14 MOV ESI,0x7f CALL 0x00132af4 MOV AL,0x1 JMP 0x0013a092 LAB_0013a05e: BSWAP R15 LEA RSI,[RBP + -0x80] MOV qword ptr [RSI],R15 MOV RAX,qword ptr [R14] ADD RBX,0xc MOV EDX,0x8 MOV R8D,0x4 MOV RDI,R14 MOV RCX,RBX CALL qword ptr [RAX + 0x6e8] MOV RCX,RAX MOV AL,0x1 TEST RCX,RCX JNZ 0x0013a092 LAB_0013a090: XOR EAX,EAX LAB_0013a092: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x20] JNZ 0x0013a0ac ADD RSP,0x68 POP RBX POP R14 POP R15 POP RBP RET LAB_0013a0ac: CALL 0x00129260
int8 update_backward_delete_link(long *param_1,long param_2,ulong param_3) { ulong uVar1; int8 uVar2; long lVar3; long in_FS_OFFSET; ulong local_88; int1 local_80 [80]; int4 local_30; long local_28; local_28 = *(long *)(in_FS_OFFSET + 0x28); if (param_2 != -1) { local_30 = 0; uVar1 = _ma_get_block_info(param_1,local_80,(int)param_1[0x90],param_2); if ((uVar1 & 4) == 0) { _ma_set_fatal_error(param_1,0x7f); uVar2 = 1; goto LAB_0013a092; } local_88 = param_3 >> 0x38 | (param_3 & 0xff000000000000) >> 0x28 | (param_3 & 0xff0000000000) >> 0x18 | (param_3 & 0xff00000000) >> 8 | (param_3 & 0xff000000) << 8 | (param_3 & 0xff0000) << 0x18 | (param_3 & 0xff00) << 0x28 | param_3 << 0x38; lVar3 = (**(code **)(*param_1 + 0x6e8))(param_1,&local_88,8,param_2 + 0xc,4); uVar2 = 1; if (lVar3 != 0) goto LAB_0013a092; } uVar2 = 0; LAB_0013a092: if (*(long *)(in_FS_OFFSET + 0x28) == local_28) { return uVar2; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
28,731
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [10], 0>(char const (&) [10]) const
monkey531[P]llama/common/json.hpp
const_reference at(KeyType && key) const { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return it->second; }
O0
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [10], 0>(char const (&) [10]) const: subq $0xc8, %rsp movq %rdi, 0xc0(%rsp) movq %rsi, 0xb8(%rsp) movq 0xc0(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0xa2980 xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0x1134e8 jmp 0x1135c4 movb $0x1, 0x83(%rsp) movl $0x20, %edi callq 0x4f580 movq 0x20(%rsp), %rdi movq %rax, 0x18(%rsp) callq 0xa04a0 movq %rax, 0x90(%rsp) leaq 0xa69d3(%rip), %rsi # 0x1b9eeb leaq 0x98(%rsp), %rdi leaq 0x90(%rsp), %rdx callq 0x11ae30 jmp 0x11352f movq 0x20(%rsp), %rcx movq 0x18(%rsp), %rdi movl $0x130, %esi # imm = 0x130 leaq 0x98(%rsp), %rdx callq 0xa0240 jmp 0x11354d movq 0x18(%rsp), %rdi movb $0x0, 0x83(%rsp) leaq 0x120ba7(%rip), %rsi # 0x234108 leaq -0x73018(%rip), %rdx # 0xa0550 callq 0x4f940 jmp 0x113741 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x1135a9 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) leaq 0x98(%rsp), %rdi callq 0x50100 testb $0x1, 0x83(%rsp) jne 0x1135b5 jmp 0x1135bf movq 0x18(%rsp), %rdi callq 0x4fc70 jmp 0x113734 movq 0x20(%rsp), %rax movq 0x8(%rax), %rdi movq 0xb8(%rsp), %rsi callq 0x11ce20 movq %rax, %rcx movq 0x20(%rsp), %rax movq %rcx, 0x78(%rsp) movq 0x8(%rax), %rdi callq 0xa27c0 movq %rax, 0x70(%rsp) leaq 0x78(%rsp), %rdi leaq 0x70(%rsp), %rsi callq 0xbb4f0 testb $0x1, %al jne 0x11360d jmp 0x11371e movb $0x1, 0x2e(%rsp) movl $0x20, %edi callq 0x4f580 movq %rax, (%rsp) movq 0xb8(%rsp), %rax movq %rax, 0x8(%rsp) leaq 0x2f(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x4fd90 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x30(%rsp), %rdi callq 0x55120 jmp 0x113652 leaq 0xa68c2(%rip), %rsi # 0x1b9f1b leaq 0xa68c1(%rip), %rcx # 0x1b9f21 leaq 0x50(%rsp), %rdi leaq 0x30(%rsp), %rdx callq 0x11c050 jmp 0x113671 movq 0x20(%rsp), %rcx movq (%rsp), %rdi movl $0x193, %esi # imm = 0x193 leaq 0x50(%rsp), %rdx callq 0x11cf40 jmp 0x11368b movq (%rsp), %rdi movb $0x0, 0x2e(%rsp) leaq 0x120b55(%rip), %rsi # 0x2341f0 leaq -0x5ac62(%rip), %rdx # 0xb8a40 callq 0x4f940 jmp 0x113741 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x113700 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x1136f6 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) leaq 0x50(%rsp), %rdi callq 0x50100 leaq 0x30(%rsp), %rdi callq 0x50100 leaq 0x2f(%rsp), %rdi callq 0x500e0 testb $0x1, 0x2e(%rsp) jne 0x113713 jmp 0x11371c movq (%rsp), %rdi callq 0x4fc70 jmp 0x113734 leaq 0x78(%rsp), %rdi callq 0xbb6f0 addq $0x20, %rax addq $0xc8, %rsp retq movq 0x88(%rsp), %rdi callq 0x4f990 nopw %cs:(%rax,%rax) nopl (%rax,%rax)
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: sub rsp, 0C8h mov [rsp+0C8h+var_8], rdi mov qword ptr [rsp+0C8h+var_10], rsi mov rdi, [rsp+0C8h+var_8] mov [rsp+0C8h+var_A8], rdi; int call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9is_objectEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::is_object(void) xor al, 0FFh xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_1134E8 jmp loc_1135C4 loc_1134E8: mov [rsp+0C8h+var_45], 1 mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rdi, [rsp+0C8h+var_A8] mov [rsp+0C8h+var_B0], rax; char call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) mov qword ptr [rsp+0C8h+var_38], rax; char lea rsi, aCannotUseAtWit; "cannot use at() with " lea rdi, [rsp+0C8h+var_30]; int lea rdx, [rsp+0C8h+var_38]; int call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) jmp short $+2 loc_11352F: mov rcx, [rsp+0C8h+var_A8] mov rdi, [rsp+0C8h+var_B0]; int mov esi, 130h lea rdx, [rsp+0C8h+var_30] call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ jmp short $+2 loc_11354D: mov rdi, [rsp+0C8h+var_B0]; void * mov [rsp+0C8h+var_45], 0 lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail10type_errorD2Ev; void (*)(void *) call ___cxa_throw jmp loc_113741 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp short loc_1135A9 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax lea rdi, [rsp+arg_90]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1135A9: test [rsp+arg_7B], 1 jnz short loc_1135B5 jmp short loc_1135BF loc_1135B5: mov rdi, [rsp+arg_10]; void * call ___cxa_free_exception loc_1135BF: jmp loc_113734 loc_1135C4: mov rax, [rsp+0C8h+var_A8] mov rdi, [rax+8] mov rsi, qword ptr [rsp+0C8h+var_10] call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA10_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_ mov rcx, rax mov rax, [rsp+0C8h+var_A8] mov qword ptr [rsp+0C8h+var_50], rcx; int mov rdi, [rax+8] call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE3endEv; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::end(void) mov qword ptr [rsp+0C8h+var_58], rax; char lea rdi, [rsp+0C8h+var_50] lea rsi, [rsp+0C8h+var_58] call _ZN9__gnu_cxxeqIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEEbRKNS_17__normal_iteratorIT_T0_EESR_; __gnu_cxx::operator==<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>(__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&,__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&) test al, 1 jnz short loc_11360D jmp loc_11371E loc_11360D: mov [rsp+0C8h+var_9A], 1 mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov [rsp+0C8h+var_C8], rax; int mov rax, qword ptr [rsp+0C8h+var_10] mov qword ptr [rsp+0C8h+var_C0], rax; int lea rdi, [rsp+0C8h+var_99] mov qword ptr [rsp+0C8h+var_B8], rdi; int call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, qword ptr [rsp+0C8h+var_C0] mov rdx, qword ptr [rsp+0C8h+var_B8] lea rdi, [rsp+0C8h+var_99+1] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_113652: lea rsi, aKey; "key '" lea rcx, aNotFound; "' not found" lea rdi, [rsp+0C8h+var_78]; int lea rdx, [rsp+0C8h+var_99+1]; int call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) jmp short $+2 loc_113671: mov rcx, [rsp+0C8h+var_A8] mov rdi, [rsp+0C8h+var_C8]; int mov esi, 193h lea rdx, [rsp+0C8h+var_78] call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ jmp short $+2 loc_11368B: mov rdi, [rsp+0C8h+var_C8]; void * mov [rsp+0C8h+var_9A], 0 lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail12out_of_rangeD2Ev; void (*)(void *) call ___cxa_throw jmp loc_113741 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp short loc_113700 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp short loc_1136F6 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax lea rdi, [rsp+arg_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1136F6: lea rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_113700: lea rdi, [rsp+arg_27] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() test [rsp+arg_26], 1 jnz short loc_113713 jmp short loc_11371C loc_113713: mov rdi, [rsp+0]; void * call ___cxa_free_exception loc_11371C: jmp short loc_113734 loc_11371E: lea rdi, [rsp+0C8h+var_50] call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEptEv; __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator->(void) add rax, 20h ; ' ' add rsp, 0C8h retn loc_113734: mov rdi, [rsp+arg_80] call __Unwind_Resume loc_113741: nop word ptr [rax+rax+00000000h] nop dword ptr [rax+rax+00h]
long long ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_( long long a1, long long a2) { int v2; // ecx int v3; // r8d int v4; // r9d int v5; // r8d int v6; // r9d int v8; // [rsp+0h] [rbp-C8h] void *v9; // [rsp+0h] [rbp-C8h] int v10; // [rsp+0h] [rbp-C8h] void *v11; // [rsp+0h] [rbp-C8h] void *v12; // [rsp+8h] [rbp-C0h] long long v13; // [rsp+8h] [rbp-C0h] int v14; // [rsp+8h] [rbp-C0h] int v15; // [rsp+10h] [rbp-B8h] int v16; // [rsp+10h] [rbp-B8h] int v17; // [rsp+18h] [rbp-B0h] void *exception; // [rsp+18h] [rbp-B0h] void *v19; // [rsp+18h] [rbp-B0h] char v20; // [rsp+18h] [rbp-B0h] int v21; // [rsp+20h] [rbp-A8h] int v22; // [rsp+28h] [rbp-A0h] char v23; // [rsp+2Fh] [rbp-99h] BYREF int v24[4]; // [rsp+30h] [rbp-98h] BYREF long long v25; // [rsp+40h] [rbp-88h] int v26; // [rsp+48h] [rbp-80h] int v27[8]; // [rsp+50h] [rbp-78h] BYREF char v28[8]; // [rsp+70h] [rbp-58h] BYREF int v29[2]; // [rsp+78h] [rbp-50h] BYREF int v30; // [rsp+80h] [rbp-48h] int v31; // [rsp+88h] [rbp-40h] char v32[8]; // [rsp+90h] [rbp-38h] BYREF int v33[8]; // [rsp+98h] [rbp-30h] BYREF int v34[2]; // [rsp+B8h] [rbp-10h] long long v35; // [rsp+C0h] [rbp-8h] v35 = a1; *(_QWORD *)v34 = a2; if ( !nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::is_object((_BYTE *)a1) ) { exception = __cxa_allocate_exception(0x20uLL); *(_QWORD *)v32 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((_BYTE *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>( (int)v33, (int)"cannot use at() with ", (int)v32, v2, v3, v4, v8, v12, v15, (long long)exception); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( (long long)v19, 304, (long long)v33, a1); HIBYTE(v30) = 0; __cxa_throw( v19, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::type_error::~type_error); } *(_QWORD *)v29 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA10_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_( *(_QWORD *)(a1 + 8), *(_QWORD *)v34); *(_QWORD *)v28 = std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::end(*(_QWORD *)(a1 + 8)); if ( __gnu_cxx::operator==<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>( (long long)v29, (long long)v28) ) { v9 = __cxa_allocate_exception(0x20uLL); v13 = *(_QWORD *)v34; std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>((long long)v24, v13, (long long)&v23); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>( (int)v27, (int)"key '", (int)v24, (int)"' not found", v5, v6, v9, v13, (int)&v23, v17, a1); ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( v10, v10, v14, v16, v20, v21, v22, v24[0], v24[2], v25, v26, v27[0], v27[2], v27[4], v27[6], v28[0], v29[0], v30, v31, v32[0]); __cxa_throw( v11, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::out_of_range::~out_of_range); } return __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator->((long long)v29) + 32; }
28,732
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [10], 0>(char const (&) [10]) const
monkey531[P]llama/common/json.hpp
const_reference at(KeyType && key) const { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return it->second; }
O2
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [10], 0>(char const (&) [10]) const: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rdi, %r14 cmpb $0x1, (%rdi) jne 0x5f9a5 movq %rsi, %r15 movq 0x8(%r14), %rdi callq 0x6305e movq 0x8(%r14), %rcx cmpq 0x8(%rcx), %rax je 0x5fa03 addq $0x20, %rax addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq pushq $0x20 popq %rdi callq 0x20390 movq %rax, %rbx movq %r14, %rdi callq 0x3d1f2 leaq 0x28(%rsp), %rdx movq %rax, (%rdx) leaq 0x329fb(%rip), %rsi # 0x923c2 leaq 0x8(%rsp), %rdi callq 0x6264d movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0x130, %esi # imm = 0x130 movq %r14, %rcx callq 0x3d0a6 xorl %ebp, %ebp leaq 0x6f8d6(%rip), %rsi # 0xcf2c8 leaq -0x172a5(%rip), %rdx # 0x48754 movq %rbx, %rdi callq 0x20b30 jmp 0x5fa6d pushq $0x20 popq %rdi callq 0x20390 movq %rax, %rbx leaq 0x28(%rsp), %rdi leaq 0x7(%rsp), %rdx movq %r15, %rsi callq 0x2303e leaq 0x329cb(%rip), %rsi # 0x923f2 leaq 0x329ca(%rip), %rcx # 0x923f8 leaq 0x8(%rsp), %rdi leaq 0x28(%rsp), %rdx callq 0x62c57 movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0x193, %esi # imm = 0x193 movq %r14, %rcx callq 0x630c2 xorl %ebp, %ebp leaq 0x6f952(%rip), %rsi # 0xcf3b0 leaq -0x17311(%rip), %rdx # 0x48754 movq %rbx, %rdi callq 0x20b30 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x20d88 jmp 0x5fa82 movq %rax, %r14 movb $0x1, %bpl leaq 0x28(%rsp), %rdi jmp 0x5fa93 jmp 0x5fa9f movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x20d88 testb %bpl, %bpl jne 0x5faa2 jmp 0x5faaa movq %rax, %r14 movq %rbx, %rdi callq 0x20510 movq %r14, %rdi callq 0x20b90
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: push rbp; char push r15; int push r14; int push rbx; int sub rsp, 48h mov r14, rdi cmp byte ptr [rdi], 1 jnz short loc_5F9A5 mov r15, rsi mov rdi, [r14+8] call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA10_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_ mov rcx, [r14+8] cmp rax, [rcx+8] jz short loc_5FA03 add rax, 20h ; ' ' add rsp, 48h pop rbx pop r14 pop r15 pop rbp retn loc_5F9A5: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+68h+var_40] mov [rdx], rax lea rsi, aCannotUseAtWit; "cannot use at() with " lea rdi, [rsp+68h+var_60] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) mov bpl, 1 lea rdx, [rsp+68h+var_60] mov rdi, rbx; this mov esi, 130h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_5FA6D loc_5FA03: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+68h+var_40] lea rdx, [rsp+68h+var_61] mov rsi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rsi, aKey; "key '" lea rcx, aNotFound; "' not found" lea rdi, [rsp+68h+var_60] lea rdx, [rsp+68h+var_40] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) mov bpl, 1 lea rdx, [rsp+68h+var_60] mov rdi, rbx; this mov esi, 193h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_5FA6D: mov r14, rax lea rdi, [rsp+68h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_5FA82 mov r14, rax mov bpl, 1 loc_5FA82: lea rdi, [rsp+68h+var_40] jmp short loc_5FA93 jmp short loc_5FA9F mov r14, rax lea rdi, [rsp+68h+var_60]; void * loc_5FA93: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_5FAA2 jmp short loc_5FAAA loc_5FA9F: mov r14, rax loc_5FAA2: mov rdi, rbx; void * call ___cxa_free_exception loc_5FAAA: mov rdi, r14 call __Unwind_Resume
long long ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_( long long a1, long long a2) { long long v2; // rax nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx nlohmann::json_abi_v3_11_3::detail::out_of_range *v5; // rbx char v6; // [rsp+0h] [rbp-68h] int v7[6]; // [rsp+8h] [rbp-60h] BYREF char v8; // [rsp+20h] [rbp-48h] const char *v9; // [rsp+28h] [rbp-40h] BYREF int v10; // [rsp+30h] [rbp-38h] int v11; // [rsp+38h] [rbp-30h] char v12; // [rsp+40h] [rbp-28h] int v13; // [rsp+48h] [rbp-20h] int v14; // [rsp+50h] [rbp-18h] int v15; // [rsp+58h] [rbp-10h] char v16; // [rsp+60h] [rbp-8h] if ( *(_BYTE *)a1 != 1 ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); v9 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(v7, "cannot use at() with "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 0x130u, (long long)v7, a1); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } v2 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA10_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_(*(_QWORD *)(a1 + 8)); if ( v2 == *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) ) { v5 = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL); std::string::basic_string<std::allocator<char>>(&v9, a2); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>( v7, "key '", &v9, "' not found"); ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( v5, 403, v6, v7[0], v7[2], v7[4], v8, (int)v9, v10, v11, v12, v13, v14, v15, v16); __cxa_throw( v5, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return v2 + 32; }
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV R14,RDI CMP byte ptr [RDI],0x1 JNZ 0x0015f9a5 MOV R15,RSI MOV RDI,qword ptr [R14 + 0x8] CALL 0x0016305e MOV RCX,qword ptr [R14 + 0x8] CMP RAX,qword ptr [RCX + 0x8] JZ 0x0015fa03 ADD RAX,0x20 ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP RET LAB_0015f9a5: PUSH 0x20 POP RDI CALL 0x00120390 MOV RBX,RAX MOV RDI,R14 CALL 0x0013d1f2 LEA RDX,[RSP + 0x28] MOV qword ptr [RDX],RAX LAB_0015f9c0: LEA RSI,[0x1923c2] LEA RDI,[RSP + 0x8] CALL 0x0016264d MOV BPL,0x1 LAB_0015f9d4: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0x130 MOV RCX,R14 CALL 0x0013d0a6 XOR EBP,EBP LEA RSI,[0x1cf2c8] LEA RDX,[0x148754] MOV RDI,RBX CALL 0x00120b30 LAB_0015fa03: PUSH 0x20 POP RDI CALL 0x00120390 MOV RBX,RAX LAB_0015fa0e: LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x7] MOV RSI,R15 CALL 0x0012303e LAB_0015fa20: LEA RSI,[0x1923f2] LEA RCX,[0x1923f8] LEA RDI,[RSP + 0x8] LEA RDX,[RSP + 0x28] CALL 0x00162c57 MOV BPL,0x1 LAB_0015fa40: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0x193 MOV RCX,R14 CALL 0x001630c2 XOR EBP,EBP LEA RSI,[0x1cf3b0] LEA RDX,[0x148754] MOV RDI,RBX CALL 0x00120b30
long _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_ (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *param_1,char *param_2) { long lVar1; int8 uVar2; allocator local_61; detail local_60 [32]; char *local_40 [4]; if (*param_1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar2 = __cxa_allocate_exception(0x20); local_40[0] = (char *)nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::type_name(param_1); /* try { // try from 0015f9c0 to 0015f9d0 has its CatchHandler @ 0015fa9f */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*> (local_60,"cannot use at() with ",local_40); /* try { // try from 0015f9d4 to 0015fa00 has its CatchHandler @ 0015fa8b */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar2,0x130,local_60,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } lVar1 = _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA10_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_ (*(int8 *)(param_1 + 8)); if (lVar1 != *(long *)(*(long *)(param_1 + 8) + 8)) { return lVar1 + 0x20; } uVar2 = __cxa_allocate_exception(0x20); /* try { // try from 0015fa0e to 0015fa1f has its CatchHandler @ 0015fa89 */ std::__cxx11::string::string<std::allocator<char>>((string *)local_40,param_2,&local_61); /* try { // try from 0015fa20 to 0015fa3c has its CatchHandler @ 0015fa7c */ nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]> (local_60,"key \'",(string *)local_40,"\' not found"); /* try { // try from 0015fa40 to 0015fa6c has its CatchHandler @ 0015fa6d */ _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar2,0x193,local_60,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); }
28,733
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [10], 0>(char const (&) [10]) const
monkey531[P]llama/common/json.hpp
const_reference at(KeyType && key) const { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return it->second; }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [10], 0>(char const (&) [10]) const: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x40, %rsp movq %rdi, %r14 cmpb $0x1, (%rdi) jne 0x68c51 movq %rsi, %r15 movq 0x8(%r14), %r12 movq (%r12), %rbx movq 0x8(%r12), %rax cmpq %rax, %rbx je 0x68c3b movq %rbx, %rdi movq %r15, %rsi callq 0x181a0 testl %eax, %eax je 0x68c30 addq $0x30, %rbx movq 0x8(%r12), %rax cmpq %rax, %rbx jne 0x68c11 jmp 0x68c33 movq %rbx, %rax movq 0x8(%r14), %rcx movq 0x8(%rcx), %rbx cmpq %rbx, %rax je 0x68caf addq $0x20, %rax addq $0x40, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x18360 movq %rax, %rbx movq %r14, %rdi callq 0x3deb4 movq %rsp, %rdx movq %rax, (%rdx) leaq 0x43770(%rip), %rsi # 0xac3e3 leaq 0x20(%rsp), %rdi callq 0x6e647 movb $0x1, %bpl leaq 0x20(%rsp), %rdx movq %rbx, %rdi movl $0x130, %esi # imm = 0x130 movq %r14, %rcx callq 0x3dc5c xorl %ebp, %ebp leaq 0x7261a(%rip), %rsi # 0xdb2b8 leaq -0x1cb2b(%rip), %rdx # 0x4c17a movq %rbx, %rdi callq 0x18b30 jmp 0x68d28 movl $0x20, %edi callq 0x18360 movq %rax, %rbx leaq 0x10(%rsp), %r12 movq %r12, -0x10(%r12) movq %r15, %rdi callq 0x18310 leaq (%rax,%r15), %rdx movq %rsp, %rdi movq %r15, %rsi callq 0x1d1e4 leaq 0x4372f(%rip), %rsi # 0xac413 leaq 0x4372e(%rip), %rcx # 0xac419 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x6ec24 movb $0x1, %bpl leaq 0x20(%rsp), %rdx movq %rbx, %rdi movl $0x193, %esi # imm = 0x193 movq %r14, %rcx callq 0x6ef9c xorl %ebp, %ebp leaq 0x72687(%rip), %rsi # 0xdb3a0 leaq -0x1cba6(%rip), %rdx # 0x4c17a movq %rbx, %rdi callq 0x18b30 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x68d46 movq 0x30(%rsp), %rsi incq %rsi callq 0x186a0 movq (%rsp), %rdi cmpq %r12, %rdi je 0x68d91 movq 0x10(%rsp), %rsi jmp 0x68d89 movq %rax, %r14 movq (%rsp), %rdi cmpq %r12, %rdi je 0x68d9b movq 0x10(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x68d9b jmp 0x68d98 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x68d91 movq 0x30(%rsp), %rsi incq %rsi callq 0x186a0 testb %bpl, %bpl jne 0x68d9b jmp 0x68da3 movq %rax, %r14 movq %rbx, %rdi callq 0x184f0 movq %r14, %rdi callq 0x18b90 nop
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: push rbp; char push r15; int push r14; int push r12; int push rbx; char sub rsp, 40h mov r14, rdi cmp byte ptr [rdi], 1 jnz short loc_68C51 mov r15, rsi mov r12, [r14+8] mov rbx, [r12] mov rax, [r12+8] cmp rbx, rax jz short loc_68C3B loc_68C11: mov rdi, rbx mov rsi, r15 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_68C30 add rbx, 30h ; '0' mov rax, [r12+8] cmp rbx, rax jnz short loc_68C11 jmp short loc_68C33 loc_68C30: mov rax, rbx loc_68C33: mov rcx, [r14+8] mov rbx, [rcx+8] loc_68C3B: cmp rax, rbx jz short loc_68CAF add rax, 20h ; ' ' add rsp, 40h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_68C51: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) mov rdx, rsp mov [rdx], rax lea rsi, aCannotUseAtWit; "cannot use at() with " lea rdi, [rsp+68h+var_48] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) mov bpl, 1 lea rdx, [rsp+68h+var_48] mov rdi, rbx; this mov esi, 130h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_68D28 loc_68CAF: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r12, [rsp+68h+var_58] mov [r12-10h], r12 mov rdi, r15 call _strlen lea rdx, [rax+r15] mov rdi, rsp mov rsi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rsi, aKey; "key '" lea rcx, aNotFound; "' not found" lea rdi, [rsp+68h+var_48] mov rdx, rsp call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) mov bpl, 1 lea rdx, [rsp+68h+var_48] mov rdi, rbx; this mov esi, 193h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_68D28: mov r14, rax lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_68D46 mov rsi, [rsp+68h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_68D46: mov rdi, [rsp+68h+var_68] cmp rdi, r12 jz short loc_68D91 mov rsi, [rsp+68h+var_58] jmp short loc_68D89 mov r14, rax mov rdi, [rsp+68h+var_68]; void * cmp rdi, r12 jz short loc_68D9B mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_68D9B jmp short loc_68D98 mov r14, rax lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_68D91 mov rsi, [rsp+68h+var_38] loc_68D89: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_68D91: test bpl, bpl jnz short loc_68D9B jmp short loc_68DA3 loc_68D98: mov r14, rax loc_68D9B: mov rdi, rbx; void * call ___cxa_free_exception loc_68DA3: mov rdi, r14 call __Unwind_Resume
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x40 MOV R14,RDI CMP byte ptr [RDI],0x1 JNZ 0x00168c51 MOV R15,RSI MOV R12,qword ptr [R14 + 0x8] MOV RBX,qword ptr [R12] MOV RAX,qword ptr [R12 + 0x8] CMP RBX,RAX JZ 0x00168c3b LAB_00168c11: MOV RDI,RBX MOV RSI,R15 CALL 0x001181a0 TEST EAX,EAX JZ 0x00168c30 ADD RBX,0x30 MOV RAX,qword ptr [R12 + 0x8] CMP RBX,RAX JNZ 0x00168c11 JMP 0x00168c33 LAB_00168c30: MOV RAX,RBX LAB_00168c33: MOV RCX,qword ptr [R14 + 0x8] MOV RBX,qword ptr [RCX + 0x8] LAB_00168c3b: CMP RAX,RBX JZ 0x00168caf ADD RAX,0x20 ADD RSP,0x40 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00168c51: MOV EDI,0x20 CALL 0x00118360 MOV RBX,RAX MOV RDI,R14 CALL 0x0013deb4 MOV RDX,RSP MOV qword ptr [RDX],RAX LAB_00168c6c: LEA RSI,[0x1ac3e3] LEA RDI,[RSP + 0x20] CALL 0x0016e647 MOV BPL,0x1 LAB_00168c80: LEA RDX,[RSP + 0x20] MOV RDI,RBX MOV ESI,0x130 MOV RCX,R14 CALL 0x0013dc5c XOR EBP,EBP LEA RSI,[0x1db2b8] LEA RDX,[0x14c17a] MOV RDI,RBX CALL 0x00118b30 LAB_00168caf: MOV EDI,0x20 CALL 0x00118360 MOV RBX,RAX LEA R12,[RSP + 0x10] MOV qword ptr [R12 + -0x10],R12 MOV RDI,R15 CALL 0x00118310 LEA RDX,[RAX + R15*0x1] LAB_00168cd2: MOV RDI,RSP MOV RSI,R15 CALL 0x0011d1e4 LAB_00168cdd: LEA RSI,[0x1ac413] LEA RCX,[0x1ac419] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x0016ec24 MOV BPL,0x1 LAB_00168cfb: LEA RDX,[RSP + 0x20] MOV RDI,RBX MOV ESI,0x193 MOV RCX,R14 CALL 0x0016ef9c XOR EBP,EBP LEA RSI,[0x1db3a0] LEA RDX,[0x14c17a] MOV RDI,RBX CALL 0x00118b30
char * _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_ (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *param_1,char *param_2) { long *plVar1; int iVar2; char *pcVar3; int8 uVar4; size_t sVar5; char *pcVar6; char *local_68 [2]; char local_58 [16]; detail local_48 [32]; if (*param_1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar4 = __cxa_allocate_exception(0x20); local_68[0] = (char *)nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::type_name(param_1); /* try { // try from 00168c6c to 00168c7c has its CatchHandler @ 00168d98 */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*> (local_48,"cannot use at() with ",local_68); /* try { // try from 00168c80 to 00168cac has its CatchHandler @ 00168d73 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar4,0x130,local_48,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } plVar1 = *(long **)(param_1 + 8); pcVar6 = (char *)*plVar1; pcVar3 = (char *)plVar1[1]; if (pcVar6 != pcVar3) { do { pcVar3 = pcVar6; iVar2 = std::__cxx11::string::compare(pcVar3); if (iVar2 == 0) break; pcVar6 = pcVar3 + 0x30; pcVar3 = (char *)plVar1[1]; } while (pcVar6 != pcVar3); pcVar6 = *(char **)(*(long *)(param_1 + 8) + 8); } if (pcVar3 == pcVar6) { uVar4 = __cxa_allocate_exception(0x20); local_68[0] = local_58; sVar5 = strlen(param_2); /* try { // try from 00168cd2 to 00168cdc has its CatchHandler @ 00168d71 */ std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5); /* try { // try from 00168cdd to 00168cf7 has its CatchHandler @ 00168d56 */ nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]> (local_48,"key \'",(string *)local_68,"\' not found"); /* try { // try from 00168cfb to 00168d27 has its CatchHandler @ 00168d28 */ _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar4,0x193,local_48,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return pcVar3 + 0x20; }
28,734
my_mb_wc_cp932
eloqsql/strings/ctype-cp932.c
static int my_mb_wc_cp932(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *pwc, const uchar *s, const uchar *e){ int hi; if (s >= e) return MY_CS_TOOSMALL; if ((hi= s[0]) < 0x80) /* ASCII: [00-7F] -> [U+0000..U+007F] */ { *pwc= hi; return 1; } /* JIS-X-0201 Half width Katakana: [A1..DF] -> [U+FF61..U+FF9F] */ if (hi >= 0xA1 && hi <= 0xDF) { *pwc= cp932_to_unicode[hi]; return 1; } if (s + 2 > e) return MY_CS_TOOSMALL2; /* JIS-X-0208-MS [81..9F,E0..FC][40..7E,80..FC] */ if (!(pwc[0]= cp932_to_unicode[(hi << 8) + s[1]])) return (iscp932head(hi) && iscp932tail(s[1])) ? -2 : MY_CS_ILSEQ; return 2; }
O3
c
my_mb_wc_cp932: pushq %rbp movq %rsp, %rbp movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0xb798f movzbl (%rdx), %edi testb %dil, %dil js 0xb7975 movq %rdi, (%rsi) jmp 0xb798a leal 0x5f(%rdi), %eax cmpb $0x3e, %al ja 0xb7991 leaq 0x4ea1d(%rip), %rax # 0x1063a0 movzwl (%rax,%rdi,2), %eax movq %rax, (%rsi) movl $0x1, %eax popq %rbp retq leaq 0x2(%rdx), %r8 movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %r8 ja 0xb798f movzbl 0x1(%rdx), %eax movl %edi, %ecx shll $0x9, %ecx leal (%rcx,%rax,2), %eax leaq 0x4e9ee(%rip), %rcx # 0x1063a0 movzwl (%rax,%rcx), %ecx movq %rcx, (%rsi) movl $0x2, %eax testq %rcx, %rcx jne 0xb798f cmpb $-0x80, %dil setne %al cmpb $-0x60, %dil setb %cl andb %al, %cl addb $0x20, %dil cmpb $0x1d, %dil setb %sil orb %cl, %sil xorl %eax, %eax cmpb $0x1, %sil jne 0xb798f movb 0x1(%rdx), %cl leal -0x40(%rcx), %edx movl $0xfffffffe, %eax # imm = 0xFFFFFFFE cmpb $0x3f, %dl jb 0xb798f movl $0x0, %eax testb %cl, %cl jns 0xb798f xorl %eax, %eax cmpb $-0x3, %cl setae %al leal -0x2(,%rax,2), %eax jmp 0xb798f
my_mb_wc_cp932: push rbp mov rbp, rsp mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short loc_B798F movzx edi, byte ptr [rdx] test dil, dil js short loc_B7975 mov [rsi], rdi jmp short loc_B798A loc_B7975: lea eax, [rdi+5Fh] cmp al, 3Eh ; '>' ja short loc_B7991 lea rax, cp932_to_unicode movzx eax, word ptr [rax+rdi*2] mov [rsi], rax loc_B798A: mov eax, 1 loc_B798F: pop rbp retn loc_B7991: lea r8, [rdx+2] mov eax, 0FFFFFF9Ah cmp r8, rcx ja short loc_B798F movzx eax, byte ptr [rdx+1] mov ecx, edi shl ecx, 9 lea eax, [rcx+rax*2] lea rcx, cp932_to_unicode movzx ecx, word ptr [rax+rcx] mov [rsi], rcx mov eax, 2 test rcx, rcx jnz short loc_B798F cmp dil, 80h setnz al cmp dil, 0A0h setb cl and cl, al add dil, 20h ; ' ' cmp dil, 1Dh setb sil or sil, cl xor eax, eax cmp sil, 1 jnz short loc_B798F mov cl, [rdx+1] lea edx, [rcx-40h] mov eax, 0FFFFFFFEh cmp dl, 3Fh ; '?' jb short loc_B798F mov eax, 0 test cl, cl jns short loc_B798F xor eax, eax cmp cl, 0FDh setnb al lea eax, ds:0FFFFFFFFFFFFFFFEh[rax*2] jmp loc_B798F
long long my_mb_wc_cp932(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4) { long long result; // rax long long v5; // rdi long long v6; // rcx char v7; // cl result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { v5 = *a3; if ( (v5 & 0x80u) == 0LL ) { *a2 = v5; return 1LL; } if ( (unsigned __int8)(v5 + 95) <= 0x3Eu ) { *a2 = cp932_to_unicode[v5]; return 1LL; } result = 4294967194LL; if ( (unsigned long long)(a3 + 2) <= a4 ) { v6 = cp932_to_unicode[256 * (_DWORD)v5 + a3[1]]; *a2 = v6; result = 2LL; if ( !v6 ) { result = 0LL; if ( (_BYTE)v5 != 0x80 && (unsigned __int8)v5 < 0xA0u || (unsigned __int8)(v5 + 32) < 0x1Du ) { v7 = a3[1]; result = 4294967294LL; if ( (unsigned __int8)(v7 - 64) >= 0x3Fu ) { result = 0LL; if ( v7 < 0 ) return 2 * (unsigned int)((unsigned __int8)v7 >= 0xFDu) - 2; } } } } } return result; }
my_mb_wc_cp932: PUSH RBP MOV RBP,RSP MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x001b798f MOVZX EDI,byte ptr [RDX] TEST DIL,DIL JS 0x001b7975 MOV qword ptr [RSI],RDI JMP 0x001b798a LAB_001b7975: LEA EAX,[RDI + 0x5f] CMP AL,0x3e JA 0x001b7991 LEA RAX,[0x2063a0] MOVZX EAX,word ptr [RAX + RDI*0x2] MOV qword ptr [RSI],RAX LAB_001b798a: MOV EAX,0x1 LAB_001b798f: POP RBP RET LAB_001b7991: LEA R8,[RDX + 0x2] MOV EAX,0xffffff9a CMP R8,RCX JA 0x001b798f MOVZX EAX,byte ptr [RDX + 0x1] MOV ECX,EDI SHL ECX,0x9 LEA EAX,[RCX + RAX*0x2] LEA RCX,[0x2063a0] MOVZX ECX,word ptr [RAX + RCX*0x1] MOV qword ptr [RSI],RCX MOV EAX,0x2 TEST RCX,RCX JNZ 0x001b798f CMP DIL,0x80 SETNZ AL CMP DIL,0xa0 SETC CL AND CL,AL ADD DIL,0x20 CMP DIL,0x1d SETC SIL OR SIL,CL XOR EAX,EAX CMP SIL,0x1 JNZ 0x001b798f MOV CL,byte ptr [RDX + 0x1] LEA EDX,[RCX + -0x40] MOV EAX,0xfffffffe CMP DL,0x3f JC 0x001b798f MOV EAX,0x0 TEST CL,CL JNS 0x001b798f XOR EAX,EAX CMP CL,0xfd SETNC AL LEA EAX,[-0x2 + RAX*0x2] JMP 0x001b798f
int my_mb_wc_cp932(int8 param_1,ulong *param_2,byte *param_3,byte *param_4) { byte bVar1; ushort uVar2; int iVar3; iVar3 = -0x65; if (param_3 < param_4) { bVar1 = *param_3; if ((char)bVar1 < '\0') { if (0x3e < (byte)(bVar1 + 0x5f)) { if (param_4 < param_3 + 2) { return -0x66; } uVar2 = *(ushort *)(cp932_to_unicode + ((uint)bVar1 * 0x200 + (uint)param_3[1] * 2)); *param_2 = (ulong)uVar2; if ((ulong)uVar2 != 0) { return 2; } if (0x1c < (byte)(bVar1 + 0x20) && (0x9f < bVar1 || bVar1 == 0x80)) { return 0; } bVar1 = param_3[1]; if ((byte)(bVar1 - 0x40) < 0x3f) { return -2; } if (-1 < (char)bVar1) { return 0; } return (uint)(0xfc < bVar1) * 2 + -2; } *param_2 = (ulong)*(ushort *)(cp932_to_unicode + (ulong)bVar1 * 2); } else { *param_2 = (ulong)bVar1; } iVar3 = 1; } return iVar3; }
28,735
decrement_share_in_trans
eloqsql/storage/maria/maria_def.h
static inline void decrement_share_in_trans(MARIA_SHARE *share) { /* Internal tables doesn't have transactions */ DBUG_ASSERT(!share->internal_table); if (!--share->in_trans) free_maria_share(share); else mysql_mutex_unlock(&share->intern_lock); }
O0
c
decrement_share_in_trans: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) jmp 0x31f3e movq -0x8(%rbp), %rcx movl 0x7ac(%rcx), %eax addl $-0x1, %eax movl %eax, 0x7ac(%rcx) cmpl $0x0, %eax jne 0x31f61 movq -0x8(%rbp), %rdi callq 0x41f30 jmp 0x31f71 movq -0x8(%rbp), %rdi addq $0x8f0, %rdi # imm = 0x8F0 callq 0x31600 addq $0x10, %rsp popq %rbp retq nopw (%rax,%rax)
decrement_share_in_trans: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi jmp short $+2 loc_31F3E: mov rcx, [rbp+var_8] mov eax, [rcx+7ACh] add eax, 0FFFFFFFFh mov [rcx+7ACh], eax cmp eax, 0 jnz short loc_31F61 mov rdi, [rbp+var_8] call free_maria_share jmp short loc_31F71 loc_31F61: mov rdi, [rbp+var_8] add rdi, 8F0h call inline_mysql_mutex_unlock_3 loc_31F71: add rsp, 10h pop rbp retn
long long decrement_share_in_trans(long long a1) { int v1; // eax v1 = *(_DWORD *)(a1 + 1964) - 1; *(_DWORD *)(a1 + 1964) = v1; if ( v1 ) return inline_mysql_mutex_unlock_3(a1 + 2288); else return free_maria_share(a1); }
decrement_share_in_trans: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI JMP 0x00131f3e LAB_00131f3e: MOV RCX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RCX + 0x7ac] ADD EAX,-0x1 MOV dword ptr [RCX + 0x7ac],EAX CMP EAX,0x0 JNZ 0x00131f61 MOV RDI,qword ptr [RBP + -0x8] CALL 0x00141f30 JMP 0x00131f71 LAB_00131f61: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x8f0 CALL 0x00131600 LAB_00131f71: ADD RSP,0x10 POP RBP RET
void decrement_share_in_trans(long param_1) { int iVar1; iVar1 = *(int *)(param_1 + 0x7ac) + -1; *(int *)(param_1 + 0x7ac) = iVar1; if (iVar1 == 0) { free_maria_share(param_1); } else { inline_mysql_mutex_unlock(param_1 + 0x8f0); } return; }
28,736
gz_decomp
3fs/build_O3/src/apache-arrow-cpp/cpp/zlib_ep-prefix/src/zlib_ep/gzread.c
local int gz_decomp(state) gz_statep state; { int ret = Z_OK; unsigned had; z_streamp strm = &(state->strm); /* fill output buffer up to end of deflate stream */ had = strm->avail_out; do { /* get more input for inflate() */ if (strm->avail_in == 0 && gz_avail(state) == -1) return -1; if (strm->avail_in == 0) { gz_error(state, Z_BUF_ERROR, "unexpected end of file"); break; } /* decompress and handle errors */ ret = inflate(strm, Z_NO_FLUSH); if (ret == Z_STREAM_ERROR || ret == Z_NEED_DICT) { gz_error(state, Z_STREAM_ERROR, "internal error: inflate stream corrupt"); return -1; } if (ret == Z_MEM_ERROR) { gz_error(state, Z_MEM_ERROR, "out of memory"); return -1; } if (ret == Z_DATA_ERROR) { /* deflate stream invalid */ gz_error(state, Z_DATA_ERROR, strm->msg == NULL ? "compressed data error" : strm->msg); return -1; } } while (strm->avail_out && ret != Z_STREAM_END); /* update available output */ state->x.have = had - strm->avail_out; state->x.next = strm->next_out - state->x.have; /* if the gzip stream completed successfully, look for another */ if (ret == Z_STREAM_END) state->how = LOOK; /* good decompression */ return 0; }
O3
c
gz_decomp: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdi, %rbx leaq 0x80(%rdi), %r15 movl 0xa0(%rdi), %r12d xorl %r14d, %r14d leaq 0x94ab(%rip), %r13 # 0x11518 cmpl $0x0, 0x88(%rbx) jne 0x8094 movq %rbx, %rdi callq 0x8158 cmpl $-0x1, %eax je 0x810a cmpl $0x0, 0x88(%rbx) je 0x8119 movq %r15, %rdi xorl %esi, %esi callq 0x3080 movl %eax, %r14d leal 0x4(%r14), %eax cmpl $0x6, %eax ja 0x80b4 movslq (%r13,%rax,4), %rax addq %r13, %rax jmpq *%rax movl 0xa0(%rbx), %eax cmpl $0x1, %r14d je 0x8133 testl %eax, %eax jne 0x806d jmp 0x8133 leaq 0x94dd(%rip), %rdx # 0x115aa movq %rbx, %rdi movl $0xfffffffe, %esi # imm = 0xFFFFFFFE jmp 0x8105 movq 0xb0(%rbx), %rax testq %rax, %rax leaq 0x94e9(%rip), %rdx # 0x115d1 cmovneq %rax, %rdx movq %rbx, %rdi movl $0xfffffffd, %esi # imm = 0xFFFFFFFD jmp 0x8105 leaq 0x9403(%rip), %rdx # 0x11500 movq %rbx, %rdi movl $0xfffffffc, %esi # imm = 0xFFFFFFFC callq 0x757b movl $0xffffffff, %eax # imm = 0xFFFFFFFF popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq leaq 0x9473(%rip), %rdx # 0x11593 movq %rbx, %rdi movl $0xfffffffb, %esi # imm = 0xFFFFFFFB callq 0x757b movl 0xa0(%rbx), %eax subl %eax, %r12d movl %r12d, (%rbx) movq 0x98(%rbx), %rax subq %r12, %rax movq %rax, 0x8(%rbx) xorl %eax, %eax cmpl $0x1, %r14d jne 0x810f movl $0x0, 0x44(%rbx) jmp 0x810f
gz_decomp: push r15 push r14 push r13 push r12 push rbx mov rbx, rdi lea r15, [rdi+80h] mov r12d, [rdi+0A0h] xor r14d, r14d lea r13, jpt_80B2 loc_806D: cmp dword ptr [rbx+88h], 0 jnz short loc_8094 mov rdi, rbx call gz_avail cmp eax, 0FFFFFFFFh jz loc_810A cmp dword ptr [rbx+88h], 0 jz loc_8119 loc_8094: mov rdi, r15 xor esi, esi call _inflate mov r14d, eax lea eax, [r14+4]; switch 7 cases cmp eax, 6 ja short def_80B2; jumptable 00000000000080B2 default case, cases -1-1 movsxd rax, ds:(jpt_80B2 - 11518h)[r13+rax*4] add rax, r13 jmp rax; switch jump def_80B2: mov eax, [rbx+0A0h]; jumptable 00000000000080B2 default case, cases -1-1 cmp r14d, 1 jz short loc_8133 test eax, eax jnz short loc_806D jmp short loc_8133 loc_80C6: lea rdx, aInternalErrorI; jumptable 00000000000080B2 cases -2,2 mov rdi, rbx mov esi, 0FFFFFFFEh jmp short loc_8105 loc_80D7: mov rax, [rbx+0B0h]; jumptable 00000000000080B2 case -3 test rax, rax lea rdx, aCompressedData; "compressed data error" cmovnz rdx, rax mov rdi, rbx mov esi, 0FFFFFFFDh jmp short loc_8105 loc_80F6: lea rdx, aOutOfMemory; jumptable 00000000000080B2 case -4 mov rdi, rbx mov esi, 0FFFFFFFCh loc_8105: call gz_error loc_810A: mov eax, 0FFFFFFFFh loc_810F: pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_8119: lea rdx, aUnexpectedEndO; "unexpected end of file" mov rdi, rbx mov esi, 0FFFFFFFBh call gz_error mov eax, [rbx+0A0h] loc_8133: sub r12d, eax mov [rbx], r12d mov rax, [rbx+98h] sub rax, r12 mov [rbx+8], rax xor eax, eax cmp r14d, 1 jnz short loc_810F mov dword ptr [rbx+44h], 0 jmp short loc_810F
long long gz_decomp(long long a1) { int v1; // r12d int v2; // r14d int v3; // eax const char *v4; // rdx int v5; // esi long long result; // rax long long v7; // r12 v1 = *(_DWORD *)(a1 + 160); v2 = 0; while ( 2 ) { if ( *(_DWORD *)(a1 + 136) ) goto LABEL_22; if ( (unsigned int)gz_avail(a1) == -1 ) return 0xFFFFFFFFLL; if ( *(_DWORD *)(a1 + 136) ) { LABEL_22: v2 = inflate(a1 + 128, 0LL); switch ( v2 ) { case -4: v4 = "out of memory"; v5 = -4; break; case -3: v4 = "compressed data error"; if ( *(_QWORD *)(a1 + 176) ) v4 = *(const char **)(a1 + 176); v5 = -3; break; case -2: case 2: v4 = "internal error: inflate stream corrupt"; v5 = -2; break; default: v3 = *(_DWORD *)(a1 + 160); if ( v2 == 1 || !v3 ) goto LABEL_18; continue; } gz_error(a1, v5, v4); return 0xFFFFFFFFLL; } break; } gz_error(a1, -5, "unexpected end of file"); v3 = *(_DWORD *)(a1 + 160); LABEL_18: v7 = (unsigned int)(v1 - v3); *(_DWORD *)a1 = v7; *(_QWORD *)(a1 + 8) = *(_QWORD *)(a1 + 152) - v7; result = 0LL; if ( v2 == 1 ) *(_DWORD *)(a1 + 68) = 0; return result; }
gz_decomp: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV RBX,RDI LEA R15,[RDI + 0x80] MOV R12D,dword ptr [RDI + 0xa0] XOR R14D,R14D LEA R13,[0x111518] LAB_0010806d: CMP dword ptr [RBX + 0x88],0x0 JNZ 0x00108094 MOV RDI,RBX CALL 0x00108158 CMP EAX,-0x1 JZ 0x0010810a CMP dword ptr [RBX + 0x88],0x0 JZ 0x00108119 LAB_00108094: MOV RDI,R15 XOR ESI,ESI CALL 0x00103080 MOV R14D,EAX LEA EAX,[R14 + 0x4] CMP EAX,0x6 JA 0x001080b4 MOVSXD RAX,dword ptr [R13 + RAX*0x4] ADD RAX,R13 switchD: JMP RAX caseD_ffffffff: MOV EAX,dword ptr [RBX + 0xa0] CMP R14D,0x1 JZ 0x00108133 TEST EAX,EAX JNZ 0x0010806d JMP 0x00108133 caseD_fffffffe: LEA RDX,[0x1115aa] MOV RDI,RBX MOV ESI,0xfffffffe JMP 0x00108105 caseD_fffffffd: MOV RAX,qword ptr [RBX + 0xb0] TEST RAX,RAX LEA RDX,[0x1115d1] CMOVNZ RDX,RAX MOV RDI,RBX MOV ESI,0xfffffffd JMP 0x00108105 caseD_fffffffc: LEA RDX,[0x111500] MOV RDI,RBX MOV ESI,0xfffffffc LAB_00108105: CALL 0x0010757b LAB_0010810a: MOV EAX,0xffffffff LAB_0010810f: POP RBX POP R12 POP R13 POP R14 POP R15 RET LAB_00108119: LEA RDX,[0x111593] MOV RDI,RBX MOV ESI,0xfffffffb CALL 0x0010757b MOV EAX,dword ptr [RBX + 0xa0] LAB_00108133: SUB R12D,EAX MOV dword ptr [RBX],R12D MOV RAX,qword ptr [RBX + 0x98] SUB RAX,R12 MOV qword ptr [RBX + 0x8],RAX XOR EAX,EAX CMP R14D,0x1 JNZ 0x0010810f MOV dword ptr [RBX + 0x44],0x0 JMP 0x0010810f
int8 gz_decomp(uint *param_1) { uint uVar1; int iVar2; int iVar3; uint uVar4; char *pcVar5; int8 uVar6; uVar1 = param_1[0x28]; iVar3 = 0; LAB_0010806d: if (param_1[0x22] == 0) { iVar2 = gz_avail(param_1); if (iVar2 == -1) { return 0xffffffff; } if (param_1[0x22] == 0) { gz_error(param_1,0xfffffffb,"unexpected end of file"); uVar4 = param_1[0x28]; LAB_00108133: *param_1 = uVar1 - uVar4; *(ulong *)(param_1 + 2) = *(long *)(param_1 + 0x26) - (ulong)(uVar1 - uVar4); if (iVar3 == 1) { param_1[0x11] = 0; } return 0; } } iVar3 = inflate(param_1 + 0x20,0); switch(iVar3) { case -4: pcVar5 = "out of memory"; uVar6 = 0xfffffffc; break; case -3: pcVar5 = "compressed data error"; if (*(char **)(param_1 + 0x2c) != (char *)0x0) { pcVar5 = *(char **)(param_1 + 0x2c); } uVar6 = 0xfffffffd; break; case -2: case 2: pcVar5 = "internal error: inflate stream corrupt"; uVar6 = 0xfffffffe; break; default: goto switchD_001080b2_caseD_ffffffff; } gz_error(param_1,uVar6,pcVar5); return 0xffffffff; switchD_001080b2_caseD_ffffffff: uVar4 = param_1[0x28]; if ((iVar3 == 1) || (uVar4 == 0)) goto LAB_00108133; goto LAB_0010806d; }
28,737
my_large_malloc
eloqsql/mysys/my_largepage.c
uchar *my_large_malloc(size_t *size, myf my_flags) { uchar *ptr= NULL; #ifdef _WIN32 DWORD alloc_type= MEM_COMMIT | MEM_RESERVE; size_t orig_size= *size; DBUG_ENTER("my_large_malloc"); if (my_use_large_pages) { alloc_type|= MEM_LARGE_PAGES; /* Align block size to my_large_page_size */ *size= MY_ALIGN(*size, (size_t) my_large_page_size); } ptr= VirtualAlloc(NULL, *size, alloc_type, PAGE_READWRITE); if (!ptr) { if (my_flags & MY_WME) { if (my_use_large_pages) { my_printf_error(EE_OUTOFMEMORY, "Couldn't allocate %zu bytes (MEM_LARGE_PAGES page " "size %zu); Windows error %lu", MYF(ME_WARNING | ME_ERROR_LOG_ONLY), *size, my_large_page_size, GetLastError()); } else { my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_ERROR_LOG), *size); } } if (my_use_large_pages) { *size= orig_size; ptr= VirtualAlloc(NULL, *size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); if (!ptr && my_flags & MY_WME) { my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_ERROR_LOG), *size); } } } #elif defined(HAVE_MMAP) int mapflag; int page_i= 0; size_t large_page_size= 0; size_t aligned_size= *size; DBUG_ENTER("my_large_malloc"); while (1) { mapflag= MAP_PRIVATE | OS_MAP_ANON; if (my_use_large_pages) { large_page_size= my_next_large_page_size(*size, &page_i); /* this might be 0, in which case we do a standard mmap */ if (large_page_size) { #if defined(MAP_HUGETLB) /* linux 2.6.32 */ mapflag|= MAP_HUGETLB; #if defined(MAP_HUGE_SHIFT) /* Linux-3.8+ */ mapflag|= my_bit_log2_size_t(large_page_size) << MAP_HUGE_SHIFT; #else # warning "No explicit large page (HUGETLB pages) support in Linux < 3.8" #endif #elif defined(MAP_ALIGNED) mapflag|= MAP_ALIGNED(my_bit_log2_size_t(large_page_size)); #if defined(MAP_ALIGNED_SUPER) mapflag|= MAP_ALIGNED_SUPER; #endif #endif aligned_size= MY_ALIGN(*size, (size_t) large_page_size); } else { aligned_size= *size; } } ptr= mmap(NULL, aligned_size, PROT_READ | PROT_WRITE, mapflag, -1, 0); if (ptr == (void*) -1) { ptr= NULL; if (my_flags & MY_WME) { if (large_page_size) { my_printf_error(EE_OUTOFMEMORY, "Couldn't allocate %zu bytes (Large/HugeTLB memory " "page size %zu); errno %u; continuing to smaller size", MYF(ME_WARNING | ME_ERROR_LOG_ONLY), aligned_size, large_page_size, errno); } else { my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_ERROR_LOG), aligned_size); } } /* try next smaller memory size */ if (large_page_size && errno == ENOMEM) continue; /* other errors are more serious */ break; } else /* success */ { if (large_page_size) { /* we do need to record the adjustment so that munmap gets called with the right size. This is only the case for HUGETLB pages. */ *size= aligned_size; } break; } if (large_page_size == 0) { break; /* no more options to try */ } } #else DBUG_RETURN(my_malloc_lock(*size, my_flags)); #endif /* defined(HAVE_MMAP) */ if (ptr != NULL) { MEM_MAKE_DEFINED(ptr, *size); } DBUG_RETURN(ptr); }
O3
c
my_large_malloc: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r15 movq %rdi, -0x30(%rbp) movq (%rdi), %rbx xorl %r14d, %r14d xorl %r13d, %r13d movl $0x22, %ecx cmpb $0x1, 0x3538a2(%rip) # 0x3b6f00 jne 0x636b5 movq -0x30(%rbp), %rax movq (%rax), %rbx cmpl $0x9, %r14d movl $0x8, %edx cmovgel %r14d, %edx cmpl $0x7, %r14d jg 0x636b2 movslq %r14d, %rsi leaq 0x35388c(%rip), %rax # 0x3b6f10 leaq (%rax,%rsi,8), %rdi subq %rdx, %rsi xorl %eax, %eax movq (%rdi), %r13 testq %r13, %r13 je 0x636af cmpq %rbx, %r13 jbe 0x63732 decq %rax addq $0x8, %rdi cmpq %rax, %rsi jne 0x6368d movl %edx, %r14d jmp 0x636b2 subl %eax, %r14d xorl %r13d, %r13d xorl %edi, %edi movq %rbx, %rsi movl $0x3, %edx movl $0xffffffff, %r8d # imm = 0xFFFFFFFF xorl %r9d, %r9d callq 0x28370 cmpq $-0x1, %rax jne 0x63aa9 testb $0x10, %r15b jne 0x636f0 testq %r13, %r13 je 0x63aa4 callq 0x28050 movq %rax, %r12 jmp 0x63722 testq %r13, %r13 je 0x63aba callq 0x28050 movq %rax, %r12 movl (%rax), %r9d movl $0x880, %edx # imm = 0x880 movl $0x5, %edi leaq 0x34266(%rip), %rsi # 0x9797b movq %rbx, %rcx movq %r13, %r8 xorl %eax, %eax callq 0x592ad cmpl $0xc, (%r12) je 0x63652 jmp 0x63aa4 movq %r13, %rcx shrq $0x20, %rcx jne 0x6376f cmpq $0x10000, %r13 # imm = 0x10000 jae 0x637a6 cmpq $0x100, %r13 # imm = 0x100 jae 0x63807 cmpq $0x10, %r13 jae 0x63895 cmpq $0x4, %r13 jae 0x639cf movl %r13d, %ecx shrl %ecx jmp 0x63a7d movq %r13, %rdx shrq $0x30, %rdx jne 0x637d8 movq %r13, %rdx shrq $0x28, %rdx jne 0x6382c movq %r13, %rdx shrq $0x24, %rdx jne 0x638b9 movq %r13, %rdx shrq $0x22, %rdx jne 0x639e0 shrl %ecx jmp 0x63a7a cmpq $0x1000000, %r13 # imm = 0x1000000 jae 0x6384e cmpq $0x100000, %r13 # imm = 0x100000 jae 0x638e4 cmpq $0x40000, %r13 # imm = 0x40000 jae 0x639f8 movl %r13d, %ecx shrl $0x11, %ecx jmp 0x63a5c movq %r13, %rdx shrq $0x38, %rdx jne 0x63873 movq %r13, %rdx shrq $0x34, %rdx jne 0x6390b movq %r13, %rdx shrq $0x32, %rdx jne 0x63a09 shrl $0x11, %ecx jmp 0x63a77 cmpq $0x1000, %r13 # imm = 0x1000 jae 0x63936 cmpq $0x400, %r13 # imm = 0x400 jae 0x63a1e movl %r13d, %ecx shrl $0x9, %ecx jmp 0x63a2d movq %r13, %rdx shrq $0x2c, %rdx jne 0x6395d movq %r13, %rdx shrq $0x2a, %rdx jne 0x63a32 shrl $0x9, %ecx jmp 0x63a45 cmpq $0x10000000, %r13 # imm = 0x10000000 jae 0x63988 cmpq $0x4000000, %r13 # imm = 0x4000000 jae 0x63a4a movl %r13d, %ecx shrl $0x19, %ecx jmp 0x63a59 movq %r13, %rdx shrq $0x3c, %rdx jne 0x639ab movq %r13, %rdx shrq $0x3a, %rdx jne 0x63a61 shrl $0x19, %ecx jmp 0x63a74 cmpq $0x80, %r13 movl $0x3, %edx sbbl $0x0, %edx movl %r13d, %ecx shrl $0x5, %ecx cmpq $0x40, %r13 cmovael %edx, %ecx orl $0x4, %ecx jmp 0x63a7d movq %r13, %rdx shrq $0x26, %rdx movq %r13, %rsi shrq $0x27, %rsi cmpq $0x1, %rsi movl $0x3, %esi sbbl $0x0, %esi shrl $0x5, %ecx testq %rdx, %rdx cmovnel %esi, %ecx orl $0x4, %ecx jmp 0x63a7a cmpq $0x800000, %r13 # imm = 0x800000 movl $0x3, %edx sbbl $0x0, %edx movl %r13d, %ecx shrl $0x15, %ecx cmpq $0x400000, %r13 # imm = 0x400000 cmovael %edx, %ecx orl $0x4, %ecx jmp 0x63a5c movq %r13, %rdx shrq $0x36, %rdx movq %r13, %rsi shrq $0x37, %rsi cmpq $0x1, %rsi movl $0x3, %esi sbbl $0x0, %esi shrl $0x15, %ecx testq %rdx, %rdx cmovnel %esi, %ecx orl $0x4, %ecx jmp 0x63a77 cmpq $0x8000, %r13 # imm = 0x8000 movl $0x3, %edx sbbl $0x0, %edx movl %r13d, %ecx shrl $0xd, %ecx cmpq $0x4000, %r13 # imm = 0x4000 cmovael %edx, %ecx orl $0x4, %ecx jmp 0x63a2d movq %r13, %rdx shrq $0x2e, %rdx movq %r13, %rsi shrq $0x2f, %rsi cmpq $0x1, %rsi movl $0x3, %esi sbbl $0x0, %esi shrl $0xd, %ecx testq %rdx, %rdx cmovnel %esi, %ecx orl $0x4, %ecx jmp 0x63a45 movl %r13d, %edx notl %edx shrl $0x1f, %edx xorl $0x3, %edx movl %r13d, %ecx shrl $0x1d, %ecx cmpq $0x40000000, %r13 # imm = 0x40000000 cmovael %edx, %ecx orl $0x4, %ecx jmp 0x63a59 movq %r13, %rdx shrq $0x3e, %rdx xorl %esi, %esi testq %r13, %r13 setns %sil xorl $0x3, %esi shrl $0x1d, %ecx testq %rdx, %rdx cmovnel %esi, %ecx orl $0x4, %ecx jmp 0x63a74 cmpq $0x8, %r13 movl $0x3, %ecx sbbl $0x0, %ecx jmp 0x63a7d movq %r13, %rcx shrq $0x23, %rcx cmpq $0x1, %rcx movl $0x3, %ecx sbbl $0x0, %ecx jmp 0x63a7a cmpq $0x80000, %r13 # imm = 0x80000 movl $0x3, %ecx sbbl $0x0, %ecx jmp 0x63a5c movq %r13, %rcx shrq $0x33, %rcx cmpq $0x1, %rcx movl $0x3, %ecx sbbl $0x0, %ecx jmp 0x63a77 cmpq $0x800, %r13 # imm = 0x800 movl $0x3, %ecx sbbl $0x0, %ecx addl $0x8, %ecx jmp 0x63a7d movq %r13, %rcx shrq $0x2b, %rcx cmpq $0x1, %rcx movl $0x3, %ecx sbbl $0x0, %ecx addl $0x8, %ecx jmp 0x63a7a cmpq $0x8000000, %r13 # imm = 0x8000000 movl $0x3, %ecx sbbl $0x0, %ecx addl $0x8, %ecx addl $0x10, %ecx jmp 0x63a7d movq %r13, %rcx shrq $0x3b, %rcx cmpq $0x1, %rcx movl $0x3, %ecx sbbl $0x0, %ecx addl $0x8, %ecx addl $0x10, %ecx addl $0x20, %ecx movl %r14d, %r14d subq %rax, %r14 incq %r14 shll $0x1a, %ecx orl $0x40022, %ecx # imm = 0x40022 leaq (%rbx,%r13), %rax decq %rax movq %r13, %rbx negq %rbx andq %rax, %rbx jmp 0x636b5 xorl %r12d, %r12d jmp 0x63ad1 movq %rax, %r12 testq %r13, %r13 je 0x63ad1 movq -0x30(%rbp), %rax movq %rbx, (%rax) jmp 0x63ad1 xorl %r12d, %r12d movl $0x44, %esi movl $0x5, %edi movq %rbx, %rdx xorl %eax, %eax callq 0x59193 movq %r12, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_large_malloc: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r15, rsi mov [rbp+var_30], rdi mov rbx, [rdi] xor r14d, r14d xor r13d, r13d loc_63652: mov ecx, 22h ; '"' cmp cs:my_use_large_pages, 1 jnz short loc_636B5 mov rax, [rbp+var_30] mov rbx, [rax] cmp r14d, 9 mov edx, 8 cmovge edx, r14d cmp r14d, 7 jg short loc_636B2 movsxd rsi, r14d lea rax, my_large_page_sizes lea rdi, [rax+rsi*8] sub rsi, rdx xor eax, eax loc_6368D: mov r13, [rdi] test r13, r13 jz short loc_636AF cmp r13, rbx jbe loc_63732 dec rax add rdi, 8 cmp rsi, rax jnz short loc_6368D mov r14d, edx jmp short loc_636B2 loc_636AF: sub r14d, eax loc_636B2: xor r13d, r13d loc_636B5: xor edi, edi mov rsi, rbx mov edx, 3 mov r8d, 0FFFFFFFFh xor r9d, r9d call _mmap64 cmp rax, 0FFFFFFFFFFFFFFFFh jnz loc_63AA9 test r15b, 10h jnz short loc_636F0 test r13, r13 jz loc_63AA4 call ___errno_location mov r12, rax jmp short loc_63722 loc_636F0: test r13, r13 jz loc_63ABA call ___errno_location mov r12, rax mov r9d, [rax] mov edx, 880h mov edi, 5 lea rsi, aCouldnTAllocat; "Couldn't allocate %zu bytes (Large/Huge"... mov rcx, rbx mov r8, r13 xor eax, eax call my_printf_error loc_63722: cmp dword ptr [r12], 0Ch jz loc_63652 jmp loc_63AA4 loc_63732: mov rcx, r13 shr rcx, 20h jnz short loc_6376F cmp r13, offset stru_10000 jnb short loc_637A6 cmp r13, 100h jnb loc_63807 cmp r13, 10h jnb loc_63895 cmp r13, 4 jnb loc_639CF mov ecx, r13d shr ecx, 1 jmp loc_63A7D loc_6376F: mov rdx, r13 shr rdx, 30h jnz short loc_637D8 mov rdx, r13 shr rdx, 28h jnz loc_6382C mov rdx, r13 shr rdx, 24h jnz loc_638B9 mov rdx, r13 shr rdx, 22h jnz loc_639E0 shr ecx, 1 jmp loc_63A7A loc_637A6: cmp r13, 1000000h jnb loc_6384E cmp r13, offset unk_100000 jnb loc_638E4 cmp r13, 40000h jnb loc_639F8 mov ecx, r13d shr ecx, 11h jmp loc_63A5C loc_637D8: mov rdx, r13 shr rdx, 38h jnz loc_63873 mov rdx, r13 shr rdx, 34h jnz loc_6390B mov rdx, r13 shr rdx, 32h jnz loc_63A09 shr ecx, 11h jmp loc_63A77 loc_63807: cmp r13, 1000h jnb loc_63936 cmp r13, 400h jnb loc_63A1E mov ecx, r13d shr ecx, 9 jmp loc_63A2D loc_6382C: mov rdx, r13 shr rdx, 2Ch jnz loc_6395D mov rdx, r13 shr rdx, 2Ah jnz loc_63A32 shr ecx, 9 jmp loc_63A45 loc_6384E: cmp r13, 10000000h jnb loc_63988 cmp r13, 4000000h jnb loc_63A4A mov ecx, r13d shr ecx, 19h jmp loc_63A59 loc_63873: mov rdx, r13 shr rdx, 3Ch jnz loc_639AB mov rdx, r13 shr rdx, 3Ah jnz loc_63A61 shr ecx, 19h jmp loc_63A74 loc_63895: cmp r13, 80h mov edx, 3 sbb edx, 0 mov ecx, r13d shr ecx, 5 cmp r13, 40h ; '@' cmovnb ecx, edx or ecx, 4 jmp loc_63A7D loc_638B9: mov rdx, r13 shr rdx, 26h mov rsi, r13 shr rsi, 27h cmp rsi, 1 mov esi, 3 sbb esi, 0 shr ecx, 5 test rdx, rdx cmovnz ecx, esi or ecx, 4 jmp loc_63A7A loc_638E4: cmp r13, 800000h mov edx, 3 sbb edx, 0 mov ecx, r13d shr ecx, 15h cmp r13, 400000h cmovnb ecx, edx or ecx, 4 jmp loc_63A5C loc_6390B: mov rdx, r13 shr rdx, 36h mov rsi, r13 shr rsi, 37h cmp rsi, 1 mov esi, 3 sbb esi, 0 shr ecx, 15h test rdx, rdx cmovnz ecx, esi or ecx, 4 jmp loc_63A77 loc_63936: cmp r13, 8000h mov edx, 3 sbb edx, 0 mov ecx, r13d shr ecx, 0Dh cmp r13, 4000h cmovnb ecx, edx or ecx, 4 jmp loc_63A2D loc_6395D: mov rdx, r13 shr rdx, 2Eh mov rsi, r13 shr rsi, 2Fh cmp rsi, 1 mov esi, 3 sbb esi, 0 shr ecx, 0Dh test rdx, rdx cmovnz ecx, esi or ecx, 4 jmp loc_63A45 loc_63988: mov edx, r13d not edx shr edx, 1Fh xor edx, 3 mov ecx, r13d shr ecx, 1Dh cmp r13, 40000000h cmovnb ecx, edx or ecx, 4 jmp loc_63A59 loc_639AB: mov rdx, r13 shr rdx, 3Eh xor esi, esi test r13, r13 setns sil xor esi, 3 shr ecx, 1Dh test rdx, rdx cmovnz ecx, esi or ecx, 4 jmp loc_63A74 loc_639CF: cmp r13, 8 mov ecx, 3 sbb ecx, 0 jmp loc_63A7D loc_639E0: mov rcx, r13 shr rcx, 23h cmp rcx, 1 mov ecx, 3 sbb ecx, 0 jmp loc_63A7A loc_639F8: cmp r13, 80000h mov ecx, 3 sbb ecx, 0 jmp short loc_63A5C loc_63A09: mov rcx, r13 shr rcx, 33h cmp rcx, 1 mov ecx, 3 sbb ecx, 0 jmp short loc_63A77 loc_63A1E: cmp r13, 800h mov ecx, 3 sbb ecx, 0 loc_63A2D: add ecx, 8 jmp short loc_63A7D loc_63A32: mov rcx, r13 shr rcx, 2Bh cmp rcx, 1 mov ecx, 3 sbb ecx, 0 loc_63A45: add ecx, 8 jmp short loc_63A7A loc_63A4A: cmp r13, 8000000h mov ecx, 3 sbb ecx, 0 loc_63A59: add ecx, 8 loc_63A5C: add ecx, 10h jmp short loc_63A7D loc_63A61: mov rcx, r13 shr rcx, 3Bh cmp rcx, 1 mov ecx, 3 sbb ecx, 0 loc_63A74: add ecx, 8 loc_63A77: add ecx, 10h loc_63A7A: add ecx, 20h ; ' ' loc_63A7D: mov r14d, r14d sub r14, rax inc r14 shl ecx, 1Ah or ecx, 40022h lea rax, [rbx+r13] dec rax mov rbx, r13 neg rbx and rbx, rax jmp loc_636B5 loc_63AA4: xor r12d, r12d jmp short loc_63AD1 loc_63AA9: mov r12, rax test r13, r13 jz short loc_63AD1 mov rax, [rbp+var_30] mov [rax], rbx jmp short loc_63AD1 loc_63ABA: xor r12d, r12d mov esi, 44h ; 'D' mov edi, 5 mov rdx, rbx xor eax, eax call my_error loc_63AD1: mov rax, r12 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_large_malloc( unsigned long long *a1, char a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, double a7, double a8, __m128 a9, __m128 a10) { unsigned long long v10; // rbx int v11; // r14d unsigned long long v12; // r13 long long v13; // rcx long long v14; // rdx unsigned long long *v15; // rdi long long v16; // rax long long v17; // rax _DWORD *v18; // r12 __m128 v19; // xmm4 __m128 v20; // xmm5 int v21; // ecx int v22; // ecx int v23; // ecx int v24; // ecx int v25; // ecx int v26; // ecx int v27; // ecx int v28; // ecx unsigned int v29; // ecx int v30; // ecx unsigned int v31; // ecx int v32; // ecx unsigned int v33; // ecx int v34; // ecx unsigned int v35; // ecx int v36; // ecx long long v37; // r12 unsigned long long *v39; // [rsp+0h] [rbp-30h] v39 = a1; v10 = *a1; v11 = 0; v12 = 0LL; while ( 1 ) { v13 = 34LL; if ( my_use_large_pages == 1 ) { v10 = *v39; v14 = 8LL; if ( v11 >= 9 ) v14 = (unsigned int)v11; if ( v11 > 7 ) { LABEL_12: v12 = 0LL; } else { v15 = &my_large_page_sizes[v11]; v16 = 0LL; while ( 1 ) { v12 = *v15; if ( !*v15 ) { v11 -= v16; goto LABEL_12; } if ( v12 <= v10 ) break; --v16; ++v15; if ( v11 - v14 == v16 ) { v11 = v14; goto LABEL_12; } } if ( HIDWORD(v12) ) { if ( HIWORD(v12) ) { if ( HIBYTE(v12) ) { if ( v12 >> 60 ) { v36 = HIDWORD(v12) >> 29; if ( v12 >> 62 ) v36 = ((v12 & 0x8000000000000000LL) == 0LL) ^ 3; v28 = v36 | 4; } else if ( v12 >> 58 ) { v28 = 3 - (v12 >> 59 == 0); } else { v28 = HIDWORD(v12) >> 25; } v24 = v28 + 8; } else if ( v12 >> 52 ) { v32 = HIDWORD(v12) >> 21; if ( v12 >> 54 ) v32 = 3 - (v12 >> 55 == 0); v24 = v32 | 4; } else if ( v12 >> 50 ) { v24 = 3 - (v12 >> 51 == 0); } else { v24 = HIDWORD(v12) >> 17; } v22 = v24 + 16; } else if ( v12 >> 40 ) { if ( v12 >> 44 ) { v34 = HIDWORD(v12) >> 13; if ( v12 >> 46 ) v34 = 3 - (v12 >> 47 == 0); v26 = v34 | 4; } else if ( v12 >> 42 ) { v26 = 3 - (v12 >> 43 == 0); } else { v26 = HIDWORD(v12) >> 9; } v22 = v26 + 8; } else if ( v12 >> 36 ) { v30 = HIDWORD(v12) >> 5; if ( v12 >> 38 ) v30 = 3 - (v12 >> 39 == 0); v22 = v30 | 4; } else if ( v12 >> 34 ) { v22 = 3 - (v12 >> 35 == 0); } else { v22 = HIDWORD(v12) >> 1; } v21 = v22 + 32; } else if ( v12 >= (unsigned long long)&stru_10000 ) { if ( v12 >= 0x1000000 ) { if ( v12 >= 0x10000000 ) { v35 = (unsigned int)v12 >> 29; if ( v12 >= 0x40000000 ) v35 = ((v12 & 0x80000000) == 0LL) ^ 3; v27 = v35 | 4; } else if ( v12 >= 0x4000000 ) { v27 = 3 - (v12 < 0x8000000); } else { v27 = (unsigned int)v12 >> 25; } v23 = v27 + 8; } else if ( v12 >= (unsigned long long)&unk_100000 ) { v31 = (unsigned int)v12 >> 21; if ( v12 >= 0x400000 ) v31 = 3 - (v12 < 0x800000); v23 = v31 | 4; } else if ( v12 >= 0x40000 ) { v23 = 3 - (v12 < 0x80000); } else { v23 = (unsigned int)v12 >> 17; } v21 = v23 + 16; } else if ( v12 >= 0x100 ) { if ( v12 >= 0x1000 ) { v33 = (unsigned int)v12 >> 13; if ( v12 >= 0x4000 ) v33 = 3 - (v12 < 0x8000); v25 = v33 | 4; } else if ( v12 >= 0x400 ) { v25 = 3 - (v12 < 0x800); } else { v25 = (unsigned int)v12 >> 9; } v21 = v25 + 8; } else if ( v12 >= 0x10 ) { v29 = (unsigned int)v12 >> 5; if ( v12 >= 0x40 ) v29 = 3 - (v12 < 0x80); v21 = v29 | 4; } else if ( v12 >= 4 ) { v21 = 3 - (v12 < 8); } else { v21 = (unsigned int)v12 >> 1; } v11 = v11 - v16 + 1; v13 = (v21 << 26) | 0x40022u; v10 = (v10 + v12 - 1) & -(long long)v12; } } v17 = mmap64(0LL, v10, 3LL, v13, 0xFFFFFFFFLL, 0LL, v39); if ( v17 != -1 ) break; if ( (a2 & 0x10) != 0 ) { if ( !v12 ) { v37 = 0LL; my_error(5u, 68LL, v10); return v37; } v18 = (_DWORD *)__errno_location(0LL); my_printf_error( a3, a4, a5, a6, v19, v20, a9, a10, 5LL, (long long)"Couldn't allocate %zu bytes (Large/HugeTLB memory page size %zu); errno %u; continuing to smaller size", 2176LL, v10, v12, (unsigned int)*v18, (char)v39); } else { if ( !v12 ) return 0LL; v18 = (_DWORD *)__errno_location(0LL); } if ( *v18 != 12 ) return 0LL; } v37 = v17; if ( v12 ) *v39 = v10; return v37; }
my_large_malloc: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R15,RSI MOV qword ptr [RBP + -0x30],RDI MOV RBX,qword ptr [RDI] XOR R14D,R14D XOR R13D,R13D LAB_00163652: MOV ECX,0x22 CMP byte ptr [0x004b6f00],0x1 JNZ 0x001636b5 MOV RAX,qword ptr [RBP + -0x30] MOV RBX,qword ptr [RAX] CMP R14D,0x9 MOV EDX,0x8 CMOVGE EDX,R14D CMP R14D,0x7 JG 0x001636b2 MOVSXD RSI,R14D LEA RAX,[0x4b6f10] LEA RDI,[RAX + RSI*0x8] SUB RSI,RDX XOR EAX,EAX LAB_0016368d: MOV R13,qword ptr [RDI] TEST R13,R13 JZ 0x001636af CMP R13,RBX JBE 0x00163732 DEC RAX ADD RDI,0x8 CMP RSI,RAX JNZ 0x0016368d MOV R14D,EDX JMP 0x001636b2 LAB_001636af: SUB R14D,EAX LAB_001636b2: XOR R13D,R13D LAB_001636b5: XOR EDI,EDI MOV RSI,RBX MOV EDX,0x3 MOV R8D,0xffffffff XOR R9D,R9D CALL 0x00128370 CMP RAX,-0x1 JNZ 0x00163aa9 TEST R15B,0x10 JNZ 0x001636f0 TEST R13,R13 JZ 0x00163aa4 CALL 0x00128050 MOV R12,RAX JMP 0x00163722 LAB_001636f0: TEST R13,R13 JZ 0x00163aba CALL 0x00128050 MOV R12,RAX MOV R9D,dword ptr [RAX] MOV EDX,0x880 MOV EDI,0x5 LEA RSI,[0x19797b] MOV RCX,RBX MOV R8,R13 XOR EAX,EAX CALL 0x001592ad LAB_00163722: CMP dword ptr [R12],0xc JZ 0x00163652 JMP 0x00163aa4 LAB_00163732: MOV RCX,R13 SHR RCX,0x20 JNZ 0x0016376f CMP R13,0x10000 JNC 0x001637a6 CMP R13,0x100 JNC 0x00163807 CMP R13,0x10 JNC 0x00163895 CMP R13,0x4 JNC 0x001639cf MOV ECX,R13D SHR ECX,0x1 JMP 0x00163a7d LAB_0016376f: MOV RDX,R13 SHR RDX,0x30 JNZ 0x001637d8 MOV RDX,R13 SHR RDX,0x28 JNZ 0x0016382c MOV RDX,R13 SHR RDX,0x24 JNZ 0x001638b9 MOV RDX,R13 SHR RDX,0x22 JNZ 0x001639e0 SHR ECX,0x1 JMP 0x00163a7a LAB_001637a6: CMP R13,0x1000000 JNC 0x0016384e CMP R13,0x100000 JNC 0x001638e4 CMP R13,0x40000 JNC 0x001639f8 MOV ECX,R13D SHR ECX,0x11 JMP 0x00163a5c LAB_001637d8: MOV RDX,R13 SHR RDX,0x38 JNZ 0x00163873 MOV RDX,R13 SHR RDX,0x34 JNZ 0x0016390b MOV RDX,R13 SHR RDX,0x32 JNZ 0x00163a09 SHR ECX,0x11 JMP 0x00163a77 LAB_00163807: CMP R13,0x1000 JNC 0x00163936 CMP R13,0x400 JNC 0x00163a1e MOV ECX,R13D SHR ECX,0x9 JMP 0x00163a2d LAB_0016382c: MOV RDX,R13 SHR RDX,0x2c JNZ 0x0016395d MOV RDX,R13 SHR RDX,0x2a JNZ 0x00163a32 SHR ECX,0x9 JMP 0x00163a45 LAB_0016384e: CMP R13,0x10000000 JNC 0x00163988 CMP R13,0x4000000 JNC 0x00163a4a MOV ECX,R13D SHR ECX,0x19 JMP 0x00163a59 LAB_00163873: MOV RDX,R13 SHR RDX,0x3c JNZ 0x001639ab MOV RDX,R13 SHR RDX,0x3a JNZ 0x00163a61 SHR ECX,0x19 JMP 0x00163a74 LAB_00163895: CMP R13,0x80 MOV EDX,0x3 SBB EDX,0x0 MOV ECX,R13D SHR ECX,0x5 CMP R13,0x40 CMOVNC ECX,EDX OR ECX,0x4 JMP 0x00163a7d LAB_001638b9: MOV RDX,R13 SHR RDX,0x26 MOV RSI,R13 SHR RSI,0x27 CMP RSI,0x1 MOV ESI,0x3 SBB ESI,0x0 SHR ECX,0x5 TEST RDX,RDX CMOVNZ ECX,ESI OR ECX,0x4 JMP 0x00163a7a LAB_001638e4: CMP R13,0x800000 MOV EDX,0x3 SBB EDX,0x0 MOV ECX,R13D SHR ECX,0x15 CMP R13,0x400000 CMOVNC ECX,EDX OR ECX,0x4 JMP 0x00163a5c LAB_0016390b: MOV RDX,R13 SHR RDX,0x36 MOV RSI,R13 SHR RSI,0x37 CMP RSI,0x1 MOV ESI,0x3 SBB ESI,0x0 SHR ECX,0x15 TEST RDX,RDX CMOVNZ ECX,ESI OR ECX,0x4 JMP 0x00163a77 LAB_00163936: CMP R13,0x8000 MOV EDX,0x3 SBB EDX,0x0 MOV ECX,R13D SHR ECX,0xd CMP R13,0x4000 CMOVNC ECX,EDX OR ECX,0x4 JMP 0x00163a2d LAB_0016395d: MOV RDX,R13 SHR RDX,0x2e MOV RSI,R13 SHR RSI,0x2f CMP RSI,0x1 MOV ESI,0x3 SBB ESI,0x0 SHR ECX,0xd TEST RDX,RDX CMOVNZ ECX,ESI OR ECX,0x4 JMP 0x00163a45 LAB_00163988: MOV EDX,R13D NOT EDX SHR EDX,0x1f XOR EDX,0x3 MOV ECX,R13D SHR ECX,0x1d CMP R13,0x40000000 CMOVNC ECX,EDX OR ECX,0x4 JMP 0x00163a59 LAB_001639ab: MOV RDX,R13 SHR RDX,0x3e XOR ESI,ESI TEST R13,R13 SETNS SIL XOR ESI,0x3 SHR ECX,0x1d TEST RDX,RDX CMOVNZ ECX,ESI OR ECX,0x4 JMP 0x00163a74 LAB_001639cf: CMP R13,0x8 MOV ECX,0x3 SBB ECX,0x0 JMP 0x00163a7d LAB_001639e0: MOV RCX,R13 SHR RCX,0x23 CMP RCX,0x1 MOV ECX,0x3 SBB ECX,0x0 JMP 0x00163a7a LAB_001639f8: CMP R13,0x80000 MOV ECX,0x3 SBB ECX,0x0 JMP 0x00163a5c LAB_00163a09: MOV RCX,R13 SHR RCX,0x33 CMP RCX,0x1 MOV ECX,0x3 SBB ECX,0x0 JMP 0x00163a77 LAB_00163a1e: CMP R13,0x800 MOV ECX,0x3 SBB ECX,0x0 LAB_00163a2d: ADD ECX,0x8 JMP 0x00163a7d LAB_00163a32: MOV RCX,R13 SHR RCX,0x2b CMP RCX,0x1 MOV ECX,0x3 SBB ECX,0x0 LAB_00163a45: ADD ECX,0x8 JMP 0x00163a7a LAB_00163a4a: CMP R13,0x8000000 MOV ECX,0x3 SBB ECX,0x0 LAB_00163a59: ADD ECX,0x8 LAB_00163a5c: ADD ECX,0x10 JMP 0x00163a7d LAB_00163a61: MOV RCX,R13 SHR RCX,0x3b CMP RCX,0x1 MOV ECX,0x3 SBB ECX,0x0 LAB_00163a74: ADD ECX,0x8 LAB_00163a77: ADD ECX,0x10 LAB_00163a7a: ADD ECX,0x20 LAB_00163a7d: MOV R14D,R14D SUB R14,RAX INC R14 SHL ECX,0x1a OR ECX,0x40022 LEA RAX,[RBX + R13*0x1] DEC RAX MOV RBX,R13 NEG RBX AND RBX,RAX JMP 0x001636b5 LAB_00163aa4: XOR R12D,R12D JMP 0x00163ad1 LAB_00163aa9: MOV R12,RAX TEST R13,R13 JZ 0x00163ad1 MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RBX JMP 0x00163ad1 LAB_00163aba: XOR R12D,R12D MOV ESI,0x44 MOV EDI,0x5 MOV RDX,RBX XOR EAX,EAX CALL 0x00159193 LAB_00163ad1: MOV RAX,R12 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void * my_large_malloc(ulong *param_1,ulong param_2) { long lVar1; void *pvVar2; int *piVar3; uint uVar4; ulong uVar5; ulong __len; ulong *puVar6; ulong uVar7; int iVar8; ulong uVar9; __len = *param_1; uVar9 = 0; uVar7 = 0; do { uVar4 = 0x22; if (my_use_large_pages == '\x01') { __len = *param_1; iVar8 = (int)uVar9; uVar5 = 8; if (8 < iVar8) { uVar5 = uVar9 & 0xffffffff; } uVar7 = uVar9; if (iVar8 < 8) { puVar6 = &my_large_page_sizes + iVar8; lVar1 = 0; do { uVar7 = *puVar6; if (uVar7 == 0) { uVar7 = (ulong)(uint)(iVar8 - (int)lVar1); break; } if (uVar7 <= __len) { if (uVar7 >> 0x20 == 0) { if (uVar7 < 0x10000) { if (uVar7 < 0x100) { if (uVar7 < 0x10) { if (uVar7 < 4) { uVar4 = (uint)(uVar7 >> 1) & 0x7fffffff; } else { uVar4 = 3 - (uVar7 < 8); } } else { uVar4 = (uint)(uVar7 >> 5) & 0x7ffffff; if (0x3f < uVar7) { uVar4 = 3 - (uVar7 < 0x80); } uVar4 = uVar4 | 4; } } else { if (uVar7 < 0x1000) { if (uVar7 < 0x400) { uVar4 = (uint)(uVar7 >> 9) & 0x7fffff; } else { uVar4 = 3 - (uVar7 < 0x800); } } else { uVar4 = (uint)(uVar7 >> 0xd) & 0x7ffff; if (0x3fff < uVar7) { uVar4 = 3 - (uVar7 < 0x8000); } uVar4 = uVar4 | 4; } uVar4 = uVar4 + 8; } } else { if (uVar7 < 0x1000000) { if (uVar7 < 0x100000) { if (uVar7 < 0x40000) { uVar4 = (uint)(uVar7 >> 0x11) & 0x7fff; } else { uVar4 = 3 - (uVar7 < 0x80000); } } else { uVar4 = (uint)(uVar7 >> 0x15) & 0x7ff; if (0x3fffff < uVar7) { uVar4 = 3 - (uVar7 < 0x800000); } uVar4 = uVar4 | 4; } } else { if (uVar7 < 0x10000000) { if (uVar7 < 0x4000000) { uVar4 = (uint)(uVar7 >> 0x19) & 0x7f; } else { uVar4 = 3 - (uVar7 < 0x8000000); } } else { uVar4 = (uint)(uVar7 >> 0x1d) & 7; if (0x3fffffff < uVar7) { uVar4 = ~(uint)uVar7 >> 0x1f ^ 3; } uVar4 = uVar4 | 4; } uVar4 = uVar4 + 8; } uVar4 = uVar4 + 0x10; } } else { uVar4 = (uint)(uVar7 >> 0x20); if (uVar7 >> 0x30 == 0) { if (uVar7 >> 0x28 == 0) { if (uVar7 >> 0x24 == 0) { if (uVar7 >> 0x22 == 0) { uVar4 = uVar4 >> 1; } else { uVar4 = 3 - (uVar7 >> 0x23 == 0); } } else { uVar4 = uVar4 >> 5; if (uVar7 >> 0x26 != 0) { uVar4 = 3 - (uVar7 >> 0x27 == 0); } uVar4 = uVar4 | 4; } } else { if (uVar7 >> 0x2c == 0) { if (uVar7 >> 0x2a == 0) { uVar4 = uVar4 >> 9; } else { uVar4 = 3 - (uVar7 >> 0x2b == 0); } } else { uVar4 = uVar4 >> 0xd; if (uVar7 >> 0x2e != 0) { uVar4 = 3 - (uVar7 >> 0x2f == 0); } uVar4 = uVar4 | 4; } uVar4 = uVar4 + 8; } } else { if (uVar7 >> 0x38 == 0) { if (uVar7 >> 0x34 == 0) { if (uVar7 >> 0x32 == 0) { uVar4 = uVar4 >> 0x11; } else { uVar4 = 3 - (uVar7 >> 0x33 == 0); } } else { uVar4 = uVar4 >> 0x15; if (uVar7 >> 0x36 != 0) { uVar4 = 3 - (uVar7 >> 0x37 == 0); } uVar4 = uVar4 | 4; } } else { if (uVar7 >> 0x3c == 0) { if (uVar7 >> 0x3a == 0) { uVar4 = uVar4 >> 0x19; } else { uVar4 = 3 - (uVar7 >> 0x3b == 0); } } else { uVar4 = uVar4 >> 0x1d; if (uVar7 >> 0x3e != 0) { uVar4 = -1 < (long)uVar7 ^ 3; } uVar4 = uVar4 | 4; } uVar4 = uVar4 + 8; } uVar4 = uVar4 + 0x10; } uVar4 = uVar4 + 0x20; } uVar9 = ((uVar9 & 0xffffffff) - lVar1) + 1; uVar4 = uVar4 << 0x1a | 0x40022; __len = -uVar7 & (__len + uVar7) - 1; goto LAB_001636b5; } lVar1 = lVar1 + -1; puVar6 = puVar6 + 1; uVar7 = uVar5; } while ((long)iVar8 - uVar5 != lVar1); } uVar9 = uVar7; uVar7 = 0; } LAB_001636b5: pvVar2 = mmap64((void *)0x0,__len,3,uVar4,-1,0); if (pvVar2 != (void *)0xffffffffffffffff) { if (uVar7 != 0) { *param_1 = __len; return pvVar2; } return pvVar2; } if ((param_2 & 0x10) == 0) { if (uVar7 == 0) { return (void *)0x0; } piVar3 = __errno_location(); } else { if (uVar7 == 0) { my_error(5,0x44,__len); return (void *)0x0; } piVar3 = __errno_location(); my_printf_error(5, "Couldn\'t allocate %zu bytes (Large/HugeTLB memory page size %zu); errno %u; continuing to smaller size" ,0x880,__len,uVar7); } if (*piVar3 != 0xc) { return (void *)0x0; } } while( true ); }
28,738
JS_ToBigInt64Free
bluesky950520[P]quickjs/quickjs.c
static int JS_ToBigInt64Free(JSContext *ctx, int64_t *pres, JSValue val) { bf_t a_s, *a; a = JS_ToBigIntFree(ctx, &a_s, val); if (!a) { *pres = 0; return -1; } bf_get_int64(pres, a, BF_GET_INT_MOD); JS_FreeBigInt(ctx, a, &a_s); return 0; }
O0
c
JS_ToBigInt64Free: subq $0x58, %rsp movq %rdx, 0x40(%rsp) movq %rcx, 0x48(%rsp) movq %rdi, 0x38(%rsp) movq %rsi, 0x30(%rsp) movq 0x38(%rsp), %rdi movq 0x40(%rsp), %rdx movq 0x48(%rsp), %rcx leaq 0x8(%rsp), %rsi callq 0x62b40 movq %rax, (%rsp) cmpq $0x0, (%rsp) jne 0x39fa2 movq 0x30(%rsp), %rax movq $0x0, (%rax) movl $0xffffffff, 0x54(%rsp) # imm = 0xFFFFFFFF jmp 0x39fd0 movq 0x30(%rsp), %rdi movq (%rsp), %rsi movl $0x1, %edx callq 0xeb3e0 movq 0x38(%rsp), %rdi movq (%rsp), %rsi leaq 0x8(%rsp), %rdx callq 0x62aa0 movl $0x0, 0x54(%rsp) movl 0x54(%rsp), %eax addq $0x58, %rsp retq nopl (%rax)
JS_ToBigInt64Free: sub rsp, 58h mov [rsp+58h+var_18], rdx mov [rsp+58h+var_10], rcx mov [rsp+58h+var_20], rdi mov [rsp+58h+var_28], rsi mov rdi, [rsp+58h+var_20] mov rdx, [rsp+58h+var_18] mov rcx, [rsp+58h+var_10] lea rsi, [rsp+58h+var_50] call JS_ToBigIntFree mov [rsp+58h+var_58], rax cmp [rsp+58h+var_58], 0 jnz short loc_39FA2 mov rax, [rsp+58h+var_28] mov qword ptr [rax], 0 mov [rsp+58h+var_4], 0FFFFFFFFh jmp short loc_39FD0 loc_39FA2: mov rdi, [rsp+58h+var_28] mov rsi, [rsp+58h+var_58] mov edx, 1 call bf_get_int64 mov rdi, [rsp+58h+var_20] mov rsi, [rsp+58h+var_58] lea rdx, [rsp+58h+var_50] call JS_FreeBigInt mov [rsp+58h+var_4], 0 loc_39FD0: mov eax, [rsp+58h+var_4] add rsp, 58h retn
long long JS_ToBigInt64Free(long long a1, _QWORD *a2, long long a3, long long a4) { long long v5; // [rsp+0h] [rbp-58h] _BYTE v6[40]; // [rsp+8h] [rbp-50h] BYREF _QWORD *v7; // [rsp+30h] [rbp-28h] long long v8; // [rsp+38h] [rbp-20h] long long v9; // [rsp+40h] [rbp-18h] long long v10; // [rsp+48h] [rbp-10h] v9 = a3; v10 = a4; v8 = a1; v7 = a2; v5 = JS_ToBigIntFree(a1, v6, a3, a4); if ( v5 ) { bf_get_int64(v7, v5, 1LL); JS_FreeBigInt(v8, v5, v6); return 0; } else { *v7 = 0LL; return (unsigned int)-1; } }
JS_ToBigInt64Free: SUB RSP,0x58 MOV qword ptr [RSP + 0x40],RDX MOV qword ptr [RSP + 0x48],RCX MOV qword ptr [RSP + 0x38],RDI MOV qword ptr [RSP + 0x30],RSI MOV RDI,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x40] MOV RCX,qword ptr [RSP + 0x48] LEA RSI,[RSP + 0x8] CALL 0x00162b40 MOV qword ptr [RSP],RAX CMP qword ptr [RSP],0x0 JNZ 0x00139fa2 MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RAX],0x0 MOV dword ptr [RSP + 0x54],0xffffffff JMP 0x00139fd0 LAB_00139fa2: MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP] MOV EDX,0x1 CALL 0x001eb3e0 MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP] LEA RDX,[RSP + 0x8] CALL 0x00162aa0 MOV dword ptr [RSP + 0x54],0x0 LAB_00139fd0: MOV EAX,dword ptr [RSP + 0x54] ADD RSP,0x58 RET
int4 JS_ToBigInt64Free(int8 param_1,int8 *param_2,int8 param_3,int8 param_4) { long lVar1; int1 local_50 [40]; int8 *local_28; int8 local_20; int8 local_18; int8 local_10; int4 local_4; local_28 = param_2; local_20 = param_1; local_18 = param_3; local_10 = param_4; lVar1 = JS_ToBigIntFree(param_1,local_50,param_3,param_4); if (lVar1 == 0) { *local_28 = 0; local_4 = 0xffffffff; } else { bf_get_int64(local_28,lVar1,1); JS_FreeBigInt(local_20,lVar1,local_50); local_4 = 0; } return local_4; }
28,739
my_numcells_sjis
eloqsql/strings/ctype-sjis.c
static size_t my_numcells_sjis(CHARSET_INFO *cs __attribute__((unused)), const char *str, const char *str_end) { size_t clen; const uchar *b= (const uchar *) str; const uchar *e= (const uchar *) str_end; for (clen= 0; b < e; ) { if (*b >= 0xA1 && *b <= 0xDF) { clen++; b++; } else if (*b > 0x7F) { clen+= 2; b+= 2; } else { clen++; b++; } } return clen; }
O0
c
my_numcells_sjis: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq $0x0, -0x20(%rbp) movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax jae 0x11d4bd movq -0x28(%rbp), %rax movzbl (%rax), %eax cmpl $0xa1, %eax jl 0x11d478 movq -0x28(%rbp), %rax movzbl (%rax), %eax cmpl $0xdf, %eax jg 0x11d478 movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) jmp 0x11d4b8 movq -0x28(%rbp), %rax movzbl (%rax), %eax cmpl $0x7f, %eax jle 0x11d49e movq -0x20(%rbp), %rax addq $0x2, %rax movq %rax, -0x20(%rbp) movq -0x28(%rbp), %rax addq $0x2, %rax movq %rax, -0x28(%rbp) jmp 0x11d4b6 movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) jmp 0x11d4b8 jmp 0x11d438 movq -0x20(%rbp), %rax popq %rbp retq nopw %cs:(%rax,%rax)
my_numcells_sjis: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_10] mov [rbp+var_28], rax mov rax, [rbp+var_18] mov [rbp+var_30], rax mov [rbp+var_20], 0 loc_11D438: mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jnb short loc_11D4BD mov rax, [rbp+var_28] movzx eax, byte ptr [rax] cmp eax, 0A1h jl short loc_11D478 mov rax, [rbp+var_28] movzx eax, byte ptr [rax] cmp eax, 0DFh jg short loc_11D478 mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax jmp short loc_11D4B8 loc_11D478: mov rax, [rbp+var_28] movzx eax, byte ptr [rax] cmp eax, 7Fh jle short loc_11D49E mov rax, [rbp+var_20] add rax, 2 mov [rbp+var_20], rax mov rax, [rbp+var_28] add rax, 2 mov [rbp+var_28], rax jmp short loc_11D4B6 loc_11D49E: mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax loc_11D4B6: jmp short $+2 loc_11D4B8: jmp loc_11D438 loc_11D4BD: mov rax, [rbp+var_20] pop rbp retn
long long my_numcells_sjis(long long a1, unsigned __int8 *a2, unsigned long long a3) { long long v5; // [rsp+10h] [rbp-20h] v5 = 0LL; while ( (unsigned long long)a2 < a3 ) { if ( *a2 < 0xA1u || *a2 > 0xDFu ) { if ( *a2 <= 0x7Fu ) { ++v5; ++a2; } else { v5 += 2LL; a2 += 2; } } else { ++v5; ++a2; } } return v5; }
28,740
my_numcells_sjis
eloqsql/strings/ctype-sjis.c
static size_t my_numcells_sjis(CHARSET_INFO *cs __attribute__((unused)), const char *str, const char *str_end) { size_t clen; const uchar *b= (const uchar *) str; const uchar *e= (const uchar *) str_end; for (clen= 0; b < e; ) { if (*b >= 0xA1 && *b <= 0xDF) { clen++; b++; } else if (*b > 0x7F) { clen+= 2; b+= 2; } else { clen++; b++; } } return clen; }
O3
c
my_numcells_sjis: cmpq %rdx, %rsi jae 0xb69ef pushq %rbp movq %rsp, %rbp xorl %eax, %eax movl $0x1, %ecx movb (%rsi), %dil leal 0x5f(%rdi), %r8d shrb $0x7, %dil movzbl %dil, %edi incq %rdi cmpb $0x3f, %r8b cmovbq %rcx, %rdi addq %rdi, %rax addq %rdi, %rsi cmpq %rdx, %rsi jb 0xb69c8 popq %rbp retq xorl %eax, %eax retq
my_numcells_sjis: cmp rsi, rdx jnb short loc_B69EF push rbp mov rbp, rsp xor eax, eax mov ecx, 1 loc_B69C8: mov dil, [rsi] lea r8d, [rdi+5Fh] shr dil, 7 movzx edi, dil inc rdi cmp r8b, 3Fh ; '?' cmovb rdi, rcx add rax, rdi add rsi, rdi cmp rsi, rdx jb short loc_B69C8 pop rbp retn loc_B69EF: xor eax, eax retn
long long my_numcells_sjis(long long a1, _BYTE *a2, unsigned long long a3) { long long result; // rax long long v4; // rdi if ( (unsigned long long)a2 >= a3 ) return 0LL; result = 0LL; do { v4 = (*a2 >> 7) + 1LL; if ( (unsigned __int8)(*a2 + 95) < 0x3Fu ) v4 = 1LL; result += v4; a2 += v4; } while ( (unsigned long long)a2 < a3 ); return result; }
my_numcells_sjis: CMP RSI,RDX JNC 0x001b69ef PUSH RBP MOV RBP,RSP XOR EAX,EAX MOV ECX,0x1 LAB_001b69c8: MOV DIL,byte ptr [RSI] LEA R8D,[RDI + 0x5f] SHR DIL,0x7 MOVZX EDI,DIL INC RDI CMP R8B,0x3f CMOVC RDI,RCX ADD RAX,RDI ADD RSI,RDI CMP RSI,RDX JC 0x001b69c8 POP RBP RET LAB_001b69ef: XOR EAX,EAX RET
long my_numcells_sjis(int8 param_1,byte *param_2,byte *param_3) { long lVar1; long lVar2; if (param_2 < param_3) { lVar1 = 0; do { lVar2 = (ulong)(*param_2 >> 7) + 1; if ((byte)(*param_2 + 0x5f) < 0x3f) { lVar2 = 1; } lVar1 = lVar1 + lVar2; param_2 = param_2 + lVar2; } while (param_2 < param_3); return lVar1; } return 0; }
28,741
js_string_match
bluesky950520[P]quickjs/quickjs.c
static JSValue js_string_match(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int atom) { // match(rx), search(rx), matchAll(rx) // atom is JS_ATOM_Symbol_match, JS_ATOM_Symbol_search, or JS_ATOM_Symbol_matchAll JSValue O = this_val, regexp = argv[0], args[2]; JSValue matcher, S, rx, result, str; int args_len; if (JS_IsUndefined(O) || JS_IsNull(O)) return JS_ThrowTypeError(ctx, "cannot convert to object"); if (!JS_IsUndefined(regexp) && !JS_IsNull(regexp)) { matcher = JS_GetProperty(ctx, regexp, atom); if (JS_IsException(matcher)) return JS_EXCEPTION; if (atom == JS_ATOM_Symbol_matchAll) { if (check_regexp_g_flag(ctx, regexp) < 0) { JS_FreeValue(ctx, matcher); return JS_EXCEPTION; } } if (!JS_IsUndefined(matcher) && !JS_IsNull(matcher)) { return JS_CallFree(ctx, matcher, regexp, 1, &O); } } S = JS_ToString(ctx, O); if (JS_IsException(S)) return JS_EXCEPTION; args_len = 1; args[0] = regexp; str = JS_UNDEFINED; if (atom == JS_ATOM_Symbol_matchAll) { str = js_new_string8(ctx, "g"); if (JS_IsException(str)) goto fail; args[args_len++] = str; } rx = JS_CallConstructor(ctx, ctx->regexp_ctor, args_len, args); JS_FreeValue(ctx, str); if (JS_IsException(rx)) { fail: JS_FreeValue(ctx, S); return JS_EXCEPTION; } result = JS_InvokeFree(ctx, rx, atom, 1, &S); JS_FreeValue(ctx, S); return result; }
O1
c
js_string_match: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rdi, %rbx movq %rsi, 0x20(%rsp) movq %rdx, 0x28(%rsp) andl $-0x2, %edx cmpl $0x2, %edx jne 0x7b84f leaq 0x269a0(%rip), %rsi # 0xa21d7 xorl %r15d, %r15d movq %rbx, %rdi xorl %eax, %eax callq 0x22567 movl $0x6, %r14d jmp 0x7ba05 movl %r9d, %ebp movq (%r8), %r13 movq 0x8(%r8), %r12 movl %r12d, %eax andl $-0x2, %eax cmpl $0x2, %eax jne 0x7b8f4 movq 0x20(%rsp), %rsi movq 0x28(%rsp), %rdx xorl %r15d, %r15d movq %rbx, %rdi xorl %ecx, %ecx callq 0x27add movq %rax, 0x10(%rsp) movq %rdx, 0x18(%rsp) movl $0x6, %r14d cmpl $0x6, %edx je 0x7ba05 movq %r13, 0x30(%rsp) movq %r12, 0x38(%rsp) cmpl $0xd6, %ebp jne 0x7b999 leaq 0x26957(%rip), %rsi # 0xa220c movq %rbx, %rdi movl $0x1, %edx callq 0x201dd movq %rdx, %r15 cmpl $0x6, %r15d je 0x7b9ef movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rax, %rcx movq %rax, 0x40(%rsp) movq %r15, 0x48(%rsp) movl %eax, %r12d movl $0x2, %r9d jmp 0x7b9aa movq %rbx, %rdi movq %r13, %rsi movq %r12, %rdx movl %ebp, %ecx movq %r13, %r8 movq %r12, %r9 pushq $0x0 pushq $0x0 callq 0x22fa3 addq $0x10, %rsp movq %rdx, %r15 movl $0x6, %r14d cmpl $0x6, %r15d je 0x7ba02 movq %rax, %rsi cmpl $0xd6, %ebp jne 0x7b950 movq %rbx, %rdi movq %rsi, 0x8(%rsp) movq %r13, %rsi movq %r12, %rdx callq 0x7d820 movq 0x8(%rsp), %rsi testl %eax, %eax js 0x7ba66 movl %r15d, %eax andl $-0x2, %eax cmpl $0x2, %eax je 0x7b868 subq $0x8, %rsp leaq 0x28(%rsp), %rax movq %rbx, %rdi movq %r15, %rdx movq %r13, %rcx movq %r12, %r8 movl $0x1, %r9d pushq %rax callq 0x22c9d addq $0x10, %rsp movq %rax, %r15 movq %rdx, %r14 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rax, %rcx jmp 0x7ba07 movl $0x3, %r15d movl $0x1, %r9d xorl %r12d, %r12d xorl %ecx, %ecx orq %rcx, %r12 movq 0x78(%rbx), %rcx movq 0x80(%rbx), %rdx leaq 0x30(%rsp), %rax movq %rbx, %rdi movq %rcx, %rsi movq %rdx, %r8 pushq $0x2 pushq %rax callq 0x2fa61 addq $0x10, %rsp movq %rax, 0x8(%rsp) movq %rdx, %r13 movq 0x18(%rbx), %rdi movq %r12, %rsi movq %r15, %rdx callq 0x1d8c6 cmpl $0x6, %r13d jne 0x7ba1f movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rdx movq 0x18(%rbx), %rdi callq 0x1d8c6 xorl %r15d, %r15d xorl %ecx, %ecx movl %r15d, %eax orq %rcx, %rax movq %r14, %rdx addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x10(%rsp), %r12 movq %rbx, %rdi movq 0x8(%rsp), %rsi movq %r13, %rdx movl %ebp, %ecx movl $0x1, %r8d movq %r12, %r9 callq 0x53929 movq %rax, %r15 movq %rdx, %r14 movq (%r12), %rsi movq 0x8(%r12), %rdx movq 0x18(%rbx), %rdi callq 0x1d8c6 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %r15, %rcx jmp 0x7ba07 movq 0x18(%rbx), %rdi movq %r15, %rdx jmp 0x7b9fd
js_string_match: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov rbx, rdi mov [rsp+88h+var_68], rsi mov [rsp+88h+var_60], rdx and edx, 0FFFFFFFEh cmp edx, 2 jnz short loc_7B84F lea rsi, aCannotConvertT_1; "cannot convert to object" xor r15d, r15d mov rdi, rbx xor eax, eax call JS_ThrowTypeError mov r14d, 6 jmp loc_7BA05 loc_7B84F: mov ebp, r9d mov r13, [r8] mov r12, [r8+8] mov eax, r12d and eax, 0FFFFFFFEh cmp eax, 2 jnz loc_7B8F4 loc_7B868: mov rsi, [rsp+88h+var_68] mov rdx, [rsp+88h+var_60] xor r15d, r15d mov rdi, rbx xor ecx, ecx call JS_ToStringInternal mov [rsp+88h+var_78], rax mov [rsp+88h+var_70], rdx mov r14d, 6 cmp edx, 6 jz loc_7BA05 mov [rsp+88h+var_58], r13 mov [rsp+88h+var_50], r12 cmp ebp, 0D6h jnz loc_7B999 lea rsi, aRegexpMustHave+1Ch; "g" mov rdi, rbx mov edx, 1 call js_new_string8_len mov r15, rdx cmp r15d, 6 jz loc_7B9EF mov rcx, 0FFFFFFFF00000000h and rcx, rax mov [rsp+88h+var_48], rax mov [rsp+88h+var_40], r15 mov r12d, eax mov r9d, 2 jmp loc_7B9AA loc_7B8F4: mov rdi, rbx mov rsi, r13 mov rdx, r12 mov ecx, ebp mov r8, r13 mov r9, r12 push 0 push 0 call JS_GetPropertyInternal2 add rsp, 10h mov r15, rdx mov r14d, 6 cmp r15d, 6 jz loc_7BA02 mov rsi, rax cmp ebp, 0D6h jnz short loc_7B950 mov rdi, rbx mov [rsp+88h+var_80], rsi mov rsi, r13 mov rdx, r12 call check_regexp_g_flag mov rsi, [rsp+88h+var_80] test eax, eax js loc_7BA66 loc_7B950: mov eax, r15d and eax, 0FFFFFFFEh cmp eax, 2 jz loc_7B868 sub rsp, 8 lea rax, [rsp+90h+var_68] mov rdi, rbx mov rdx, r15 mov rcx, r13 mov r8, r12 mov r9d, 1 push rax call JS_CallFree add rsp, 10h mov r15, rax mov r14, rdx mov rcx, 0FFFFFFFF00000000h and rcx, rax jmp short loc_7BA07 loc_7B999: mov r15d, 3 mov r9d, 1 xor r12d, r12d xor ecx, ecx loc_7B9AA: or r12, rcx mov rcx, [rbx+78h] mov rdx, [rbx+80h] lea rax, [rsp+88h+var_58] mov rdi, rbx mov rsi, rcx mov r8, rdx push 2 push rax call JS_CallConstructorInternal add rsp, 10h mov [rsp+88h+var_80], rax mov r13, rdx mov rdi, [rbx+18h] mov rsi, r12 mov rdx, r15 call JS_FreeValueRT cmp r13d, 6 jnz short loc_7BA1F loc_7B9EF: mov rsi, [rsp+88h+var_78] mov rdx, [rsp+88h+var_70] mov rdi, [rbx+18h] loc_7B9FD: call JS_FreeValueRT loc_7BA02: xor r15d, r15d loc_7BA05: xor ecx, ecx loc_7BA07: mov eax, r15d or rax, rcx mov rdx, r14 add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7BA1F: lea r12, [rsp+88h+var_78] mov rdi, rbx mov rsi, [rsp+88h+var_80] mov rdx, r13 mov ecx, ebp mov r8d, 1 mov r9, r12 call JS_InvokeFree mov r15, rax mov r14, rdx mov rsi, [r12] mov rdx, [r12+8] mov rdi, [rbx+18h] call JS_FreeValueRT mov rcx, 0FFFFFFFF00000000h and rcx, r15 jmp short loc_7BA07 loc_7BA66: mov rdi, [rbx+18h] mov rdx, r15 jmp short loc_7B9FD
unsigned long long js_string_match( 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; // rdx long long v15; // r15 unsigned int v16; // ebp long long v17; // r13 long long v18; // r12 __m128 v19; // xmm4 __m128 v20; // xmm5 long long v21; // rdx long long v22; // rax long long v23; // rdx long long v24; // r15 unsigned long long v25; // rcx long long v26; // r12 long long v27; // r9 unsigned long long PropertyInternal2; // rax long long v29; // rdx _DWORD *v30; // rsi long long v31; // rax unsigned long long v32; // rcx _DWORD *v33; // r12 long long v34; // rdx long long v35; // r13 long long v36; // rdx long long v37; // rdi char v39; // [rsp+0h] [rbp-88h] _DWORD *v40; // [rsp+8h] [rbp-80h] _DWORD *v41; // [rsp+10h] [rbp-78h] BYREF long long v42; // [rsp+18h] [rbp-70h] long long v43; // [rsp+20h] [rbp-68h] BYREF long long v44; // [rsp+28h] [rbp-60h] _QWORD v45[11]; // [rsp+30h] [rbp-58h] BYREF v43 = a2; v44 = a3; v14 = (unsigned int)a3 & 0xFFFFFFFE; if ( (_DWORD)v14 == 2 ) { LODWORD(v15) = 0; JS_ThrowTypeError( (long long)a1, (long long)"cannot convert to object", v14, a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v39); LABEL_18: v32 = 0LL; return v32 | (unsigned int)v15; } v16 = a6; v17 = *a5; v18 = a5[1]; if ( (a5[1] & 0xFFFFFFFE) == 2 ) goto LABEL_4; PropertyInternal2 = JS_GetPropertyInternal2((long long)a1, *a5, a5[1], a6, *a5, v18, 0LL, 0); v15 = v29; if ( (_DWORD)v29 == 6 ) { LABEL_17: LODWORD(v15) = 0; goto LABEL_18; } v30 = (_DWORD *)PropertyInternal2; if ( v16 == 214 ) { v30 = (_DWORD *)PropertyInternal2; if ( (int)check_regexp_g_flag(a1, v17, v18) < 0 ) { v37 = a1[3]; v36 = v15; goto LABEL_16; } } if ( (v15 & 0xFFFFFFFE) == 2 ) { LABEL_4: LODWORD(v15) = 0; v41 = (_DWORD *)JS_ToStringInternal((long long)a1, v43, v44, 0, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v42 = v21; if ( (_DWORD)v21 == 6 ) goto LABEL_18; v45[0] = v17; v45[1] = v18; if ( v16 == 214 ) { v22 = js_new_string8_len((long long)a1, (long long)"g", 1u); v24 = v23; if ( (_DWORD)v23 == 6 ) { LABEL_15: v30 = v41; v36 = v42; v37 = a1[3]; LABEL_16: JS_FreeValueRT(v37, v30, v36); goto LABEL_17; } v25 = v22 & 0xFFFFFFFF00000000LL; v45[2] = v22; v45[3] = v23; v26 = (unsigned int)v22; v27 = 2LL; } else { v24 = 3LL; v27 = 1LL; v26 = 0LL; v25 = 0LL; } v33 = (_DWORD *)(v25 | v26); v40 = (_DWORD *)JS_CallConstructorInternal( (long long)a1, a1[15], a1[16], a1[15], a1[16], v27, a7, a8, a9, a10, v19, v20, a13, a14, (long long)v45, 2); v35 = v34; JS_FreeValueRT(a1[3], v33, v24); if ( (_DWORD)v35 != 6 ) { v15 = (long long)JS_InvokeFree((long long)a1, v40, v35, v16, 1, (long long)&v41); JS_FreeValueRT(a1[3], v41, v42); v32 = v15 & 0xFFFFFFFF00000000LL; return v32 | (unsigned int)v15; } goto LABEL_15; } v31 = JS_CallFree((long long)a1, v30, v15, v17, v18, 1, (long long)&v43); LODWORD(v15) = v31; v32 = v31 & 0xFFFFFFFF00000000LL; return v32 | (unsigned int)v15; }
js_string_match: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV RBX,RDI MOV qword ptr [RSP + 0x20],RSI MOV qword ptr [RSP + 0x28],RDX AND EDX,0xfffffffe CMP EDX,0x2 JNZ 0x0017b84f LEA RSI,[0x1a21d7] XOR R15D,R15D MOV RDI,RBX XOR EAX,EAX CALL 0x00122567 MOV R14D,0x6 JMP 0x0017ba05 LAB_0017b84f: MOV EBP,R9D MOV R13,qword ptr [R8] MOV R12,qword ptr [R8 + 0x8] MOV EAX,R12D AND EAX,0xfffffffe CMP EAX,0x2 JNZ 0x0017b8f4 LAB_0017b868: MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x28] XOR R15D,R15D MOV RDI,RBX XOR ECX,ECX CALL 0x00127add MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x18],RDX MOV R14D,0x6 CMP EDX,0x6 JZ 0x0017ba05 MOV qword ptr [RSP + 0x30],R13 MOV qword ptr [RSP + 0x38],R12 CMP EBP,0xd6 JNZ 0x0017b999 LEA RSI,[0x1a220c] MOV RDI,RBX MOV EDX,0x1 CALL 0x001201dd MOV R15,RDX CMP R15D,0x6 JZ 0x0017b9ef MOV RCX,-0x100000000 AND RCX,RAX MOV qword ptr [RSP + 0x40],RAX MOV qword ptr [RSP + 0x48],R15 MOV R12D,EAX MOV R9D,0x2 JMP 0x0017b9aa LAB_0017b8f4: MOV RDI,RBX MOV RSI,R13 MOV RDX,R12 MOV ECX,EBP MOV R8,R13 MOV R9,R12 PUSH 0x0 PUSH 0x0 CALL 0x00122fa3 ADD RSP,0x10 MOV R15,RDX MOV R14D,0x6 CMP R15D,0x6 JZ 0x0017ba02 MOV RSI,RAX CMP EBP,0xd6 JNZ 0x0017b950 MOV RDI,RBX MOV qword ptr [RSP + 0x8],RSI MOV RSI,R13 MOV RDX,R12 CALL 0x0017d820 MOV RSI,qword ptr [RSP + 0x8] TEST EAX,EAX JS 0x0017ba66 LAB_0017b950: MOV EAX,R15D AND EAX,0xfffffffe CMP EAX,0x2 JZ 0x0017b868 SUB RSP,0x8 LEA RAX,[RSP + 0x28] MOV RDI,RBX MOV RDX,R15 MOV RCX,R13 MOV R8,R12 MOV R9D,0x1 PUSH RAX CALL 0x00122c9d ADD RSP,0x10 MOV R15,RAX MOV R14,RDX MOV RCX,-0x100000000 AND RCX,RAX JMP 0x0017ba07 LAB_0017b999: MOV R15D,0x3 MOV R9D,0x1 XOR R12D,R12D XOR ECX,ECX LAB_0017b9aa: OR R12,RCX MOV RCX,qword ptr [RBX + 0x78] MOV RDX,qword ptr [RBX + 0x80] LEA RAX,[RSP + 0x30] MOV RDI,RBX MOV RSI,RCX MOV R8,RDX PUSH 0x2 PUSH RAX CALL 0x0012fa61 ADD RSP,0x10 MOV qword ptr [RSP + 0x8],RAX MOV R13,RDX MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R12 MOV RDX,R15 CALL 0x0011d8c6 CMP R13D,0x6 JNZ 0x0017ba1f LAB_0017b9ef: MOV RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x18] MOV RDI,qword ptr [RBX + 0x18] LAB_0017b9fd: CALL 0x0011d8c6 LAB_0017ba02: XOR R15D,R15D LAB_0017ba05: XOR ECX,ECX LAB_0017ba07: MOV EAX,R15D OR RAX,RCX MOV RDX,R14 ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0017ba1f: LEA R12,[RSP + 0x10] MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x8] MOV RDX,R13 MOV ECX,EBP MOV R8D,0x1 MOV R9,R12 CALL 0x00153929 MOV R15,RAX MOV R14,RDX MOV RSI,qword ptr [R12] MOV RDX,qword ptr [R12 + 0x8] MOV RDI,qword ptr [RBX + 0x18] CALL 0x0011d8c6 MOV RCX,-0x100000000 AND RCX,R15 JMP 0x0017ba07 LAB_0017ba66: MOV RDI,qword ptr [RBX + 0x18] MOV RDX,R15 JMP 0x0017b9fd
int1 [16] js_string_match(long param_1,int8 param_2,int8 param_3,int8 param_4, int8 *param_5,int param_6) { int8 uVar1; int iVar2; ulong uVar3; int8 uVar4; ulong uVar5; int1 auVar6 [16]; int1 auVar7 [16]; int1 local_78 [16]; int8 local_68; int8 local_60; int8 local_58; int8 local_50; int8 local_48; int8 local_40; local_68 = param_2; local_60 = param_3; if (((uint)param_3 & 0xfffffffe) == 2) { JS_ThrowTypeError(param_1,"cannot convert to object"); } else { uVar4 = *param_5; uVar1 = param_5[1]; if (((uint)uVar1 & 0xfffffffe) == 2) { LAB_0017b868: local_78 = JS_ToStringInternal(param_1,local_68,local_60,0); if (local_78._8_4_ == 6) goto LAB_0017ba05; local_58 = uVar4; local_50 = uVar1; if (param_6 == 0xd6) { auVar6 = js_new_string8_len(param_1,"g",1); if (auVar6._8_4_ != 6) { uVar3 = auVar6._0_8_ & 0xffffffff00000000; uVar5 = auVar6._0_8_ & 0xffffffff; uVar4 = 2; local_40 = auVar6._8_8_; goto LAB_0017b9aa; } } else { auVar6._8_8_ = 3; auVar6._0_8_ = local_48; uVar4 = 1; uVar5 = 0; uVar3 = 0; LAB_0017b9aa: local_48 = auVar6._0_8_; auVar7 = JS_CallConstructorInternal (param_1,*(int8 *)(param_1 + 0x78),*(int8 *)(param_1 + 0x80), *(int8 *)(param_1 + 0x78),*(int8 *)(param_1 + 0x80),uVar4, &local_58,2); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar5 | uVar3,auVar6._8_8_); if (auVar7._8_4_ != 6) { auVar6 = JS_InvokeFree(param_1,auVar7._0_8_,auVar7._8_8_,param_6,1,local_78); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_78._0_8_,local_78._8_8_); uVar3 = auVar6._0_8_ & 0xffffffff00000000; goto LAB_0017ba07; } } uVar4 = *(int8 *)(param_1 + 0x18); auVar6 = local_78; } else { auVar6 = JS_GetPropertyInternal2(param_1,uVar4,uVar1,param_6,uVar4,uVar1,0,0); if (auVar6._8_4_ == 6) goto LAB_0017ba05; if (param_6 != 0xd6) { LAB_0017b950: if ((auVar6._8_4_ & 0xfffffffe) != 2) { auVar6 = JS_CallFree(param_1,auVar6._0_8_,auVar6._8_8_,uVar4,uVar1,1,&local_68); uVar3 = auVar6._0_8_ & 0xffffffff00000000; goto LAB_0017ba07; } goto LAB_0017b868; } iVar2 = check_regexp_g_flag(param_1,uVar4,uVar1); if (-1 < iVar2) goto LAB_0017b950; uVar4 = *(int8 *)(param_1 + 0x18); } JS_FreeValueRT(uVar4,auVar6._0_8_,auVar6._8_8_); } LAB_0017ba05: auVar6 = ZEXT816(6) << 0x40; uVar3 = 0; LAB_0017ba07: auVar7._0_8_ = auVar6._0_8_ & 0xffffffff | uVar3; auVar7._8_8_ = auVar6._8_8_; return auVar7; }
28,742
js_string_match
bluesky950520[P]quickjs/quickjs.c
static JSValue js_string_match(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int atom) { // match(rx), search(rx), matchAll(rx) // atom is JS_ATOM_Symbol_match, JS_ATOM_Symbol_search, or JS_ATOM_Symbol_matchAll JSValue O = this_val, regexp = argv[0], args[2]; JSValue matcher, S, rx, result, str; int args_len; if (JS_IsUndefined(O) || JS_IsNull(O)) return JS_ThrowTypeError(ctx, "cannot convert to object"); if (!JS_IsUndefined(regexp) && !JS_IsNull(regexp)) { matcher = JS_GetProperty(ctx, regexp, atom); if (JS_IsException(matcher)) return JS_EXCEPTION; if (atom == JS_ATOM_Symbol_matchAll) { if (check_regexp_g_flag(ctx, regexp) < 0) { JS_FreeValue(ctx, matcher); return JS_EXCEPTION; } } if (!JS_IsUndefined(matcher) && !JS_IsNull(matcher)) { return JS_CallFree(ctx, matcher, regexp, 1, &O); } } S = JS_ToString(ctx, O); if (JS_IsException(S)) return JS_EXCEPTION; args_len = 1; args[0] = regexp; str = JS_UNDEFINED; if (atom == JS_ATOM_Symbol_matchAll) { str = js_new_string8(ctx, "g"); if (JS_IsException(str)) goto fail; args[args_len++] = str; } rx = JS_CallConstructor(ctx, ctx->regexp_ctor, args_len, args); JS_FreeValue(ctx, str); if (JS_IsException(rx)) { fail: JS_FreeValue(ctx, S); return JS_EXCEPTION; } result = JS_InvokeFree(ctx, rx, atom, 1, &S); JS_FreeValue(ctx, S); return result; }
O2
c
js_string_match: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rdx, %r12 movq %rdi, %r14 movq %rsi, 0x30(%rsp) movq %rdx, 0x38(%rsp) movl %r12d, %eax andl $-0x2, %eax cmpl $0x2, %eax jne 0x67ca2 leaq 0x21487(%rip), %rsi # 0x89111 xorl %r15d, %r15d movq %r14, %rdi xorl %eax, %eax callq 0x1c64d pushq $0x6 popq %r12 xorl %ecx, %ecx jmp 0x67e3b movq %rsi, %rbp movq (%r8), %r15 movq 0x8(%r8), %r13 movl %r13d, %eax andl $-0x2, %eax cmpl $0x2, %eax jne 0x67d42 movl %r9d, 0xc(%rsp) movq %r14, %rdi movq %rbp, %rsi movq %r12, %rdx callq 0x1b03c movq %rdx, %r12 movq %rax, 0x20(%rsp) movq %rdx, 0x28(%rsp) cmpl $0x6, %r12d je 0x67e32 movq %rax, %rbx movq %r15, 0x40(%rsp) movq %r13, 0x48(%rsp) cmpl $0xd6, 0xc(%rsp) jne 0x67ddb leaq 0x2143f(%rip), %rsi # 0x89146 movq %r14, %rdi callq 0x21856 movq %rdx, %r15 cmpl $0x6, %r15d je 0x67e24 movq %rbx, 0x10(%rsp) movabsq $-0x100000000, %rdx # imm = 0xFFFFFFFF00000000 andq %rax, %rdx movq %rax, 0x50(%rsp) movq %r15, 0x58(%rsp) movl %eax, %ebx pushq $0x2 popq %rcx jmp 0x67deb movq %r14, %rdi movq %r15, %rsi movq %r13, %rdx movl %r9d, %ecx movl %r9d, %ebx callq 0x1b043 cmpl $0x6, %edx je 0x67e32 movq %rax, %rsi cmpl $0xd6, %ebx movl %ebx, %r9d jne 0x67d9d movq %r14, %rdi movq %rsi, 0x18(%rsp) movq %r15, %rsi movq %rdx, 0x10(%rsp) movq %r13, %rdx movl %r9d, %ebx callq 0x6967e movq 0x18(%rsp), %rsi movq 0x10(%rsp), %rdx movl %ebx, %r9d testl %eax, %eax js 0x67e95 movl %edx, %eax andl $-0x2, %eax cmpl $0x2, %eax je 0x67cbb leaq 0x30(%rsp), %rax movq %rax, (%rsp) pushq $0x1 popq %r9 movq %r14, %rdi movq %r15, %rcx movq %r13, %r8 callq 0x1cd8e movq %rax, %r15 movq %rdx, %r12 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rax, %rcx jmp 0x67e3b movq %rbx, 0x10(%rsp) pushq $0x3 popq %r15 pushq $0x1 popq %rcx xorl %ebx, %ebx xorl %edx, %edx orq %rdx, %rbx movq 0x78(%r14), %rsi movq 0x80(%r14), %rdx leaq 0x40(%rsp), %r8 movq %r14, %rdi callq 0x283f2 movq %rax, %r13 movq %rdx, %rbp movq %r14, %rdi movq %rbx, %rsi movq %r15, %rdx callq 0x1801e cmpl $0x6, %ebp movq 0x10(%rsp), %rbx jne 0x67e53 movq %r14, %rdi movq %rbx, %rsi movq %r12, %rdx callq 0x1801e xorl %r15d, %r15d xorl %ecx, %ecx pushq $0x6 popq %r12 movl %r15d, %eax orq %rcx, %rax movq %r12, %rdx addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq pushq $0x1 popq %r8 leaq 0x20(%rsp), %rbx movq %r14, %rdi movq %r13, %rsi movq %rbp, %rdx movl 0xc(%rsp), %ecx movq %rbx, %r9 callq 0x47b70 movq %rax, %r15 movq %rdx, %r12 movq (%rbx), %rsi movq 0x8(%rbx), %rdx movq %r14, %rdi callq 0x1801e movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %r15, %rcx jmp 0x67e3b movq %r14, %rdi jmp 0x67e2d
js_string_match: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov r12, rdx mov r14, rdi mov [rsp+98h+var_68], rsi mov [rsp+98h+var_60], rdx mov eax, r12d and eax, 0FFFFFFFEh cmp eax, 2 jnz short loc_67CA2 lea rsi, aCannotConvertT_1; "cannot convert to object" xor r15d, r15d mov rdi, r14 xor eax, eax call JS_ThrowTypeError push 6 pop r12 xor ecx, ecx jmp loc_67E3B loc_67CA2: mov rbp, rsi mov r15, [r8] mov r13, [r8+8] mov eax, r13d and eax, 0FFFFFFFEh cmp eax, 2 jnz loc_67D42 loc_67CBB: mov [rsp+98h+var_8C], r9d mov rdi, r14 mov rsi, rbp mov rdx, r12 call JS_ToString mov r12, rdx mov [rsp+98h+var_78], rax mov [rsp+98h+var_70], rdx cmp r12d, 6 jz loc_67E32 mov rbx, rax mov [rsp+98h+var_58], r15 mov [rsp+98h+var_50], r13 cmp [rsp+98h+var_8C], 0D6h jnz loc_67DDB lea rsi, aRegexpMustHave+1Ch; "g" mov rdi, r14 call js_new_string8 mov r15, rdx cmp r15d, 6 jz loc_67E24 mov [rsp+98h+var_88], rbx mov rdx, 0FFFFFFFF00000000h and rdx, rax mov [rsp+98h+var_48], rax mov [rsp+98h+var_40], r15 mov ebx, eax push 2 pop rcx jmp loc_67DEB loc_67D42: mov rdi, r14 mov rsi, r15 mov rdx, r13 mov ecx, r9d mov ebx, r9d call JS_GetProperty cmp edx, 6 jz loc_67E32 mov rsi, rax cmp ebx, 0D6h mov r9d, ebx jnz short loc_67D9D mov rdi, r14 mov [rsp+98h+var_80], rsi mov rsi, r15 mov [rsp+98h+var_88], rdx mov rdx, r13 mov ebx, r9d call check_regexp_g_flag mov rsi, [rsp+98h+var_80] mov rdx, [rsp+98h+var_88] mov r9d, ebx test eax, eax js loc_67E95 loc_67D9D: mov eax, edx and eax, 0FFFFFFFEh cmp eax, 2 jz loc_67CBB lea rax, [rsp+98h+var_68] mov [rsp+98h+var_98], rax push 1 pop r9 mov rdi, r14 mov rcx, r15 mov r8, r13 call JS_CallFree mov r15, rax mov r12, rdx mov rcx, 0FFFFFFFF00000000h and rcx, rax jmp short loc_67E3B loc_67DDB: mov [rsp+98h+var_88], rbx push 3 pop r15 push 1 pop rcx xor ebx, ebx xor edx, edx loc_67DEB: or rbx, rdx mov rsi, [r14+78h] mov rdx, [r14+80h] lea r8, [rsp+98h+var_58] mov rdi, r14 call JS_CallConstructor mov r13, rax mov rbp, rdx mov rdi, r14 mov rsi, rbx mov rdx, r15 call JS_FreeValue cmp ebp, 6 mov rbx, [rsp+98h+var_88] jnz short loc_67E53 loc_67E24: mov rdi, r14 mov rsi, rbx mov rdx, r12 loc_67E2D: call JS_FreeValue loc_67E32: xor r15d, r15d xor ecx, ecx push 6 pop r12 loc_67E3B: mov eax, r15d or rax, rcx mov rdx, r12 add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_67E53: push 1 pop r8 lea rbx, [rsp+98h+var_78] mov rdi, r14 mov rsi, r13 mov rdx, rbp mov ecx, [rsp+98h+var_8C] mov r9, rbx call JS_InvokeFree mov r15, rax mov r12, rdx mov rsi, [rbx] mov rdx, [rbx+8] mov rdi, r14 call JS_FreeValue mov rcx, 0FFFFFFFF00000000h and rcx, r15 jmp short loc_67E3B loc_67E95: mov rdi, r14 jmp short loc_67E2D
unsigned long long js_string_match( 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 v15; // r15 unsigned long long v16; // rcx long long v18; // r13 long long v19; // rax double v20; // xmm4_8 double v21; // xmm5_8 long long v22; // rdx long long v23; // r12 long long v24; // rbx long long v25; // rax long long v26; // rdx long long v27; // r15 unsigned long long v28; // rdx long long v29; // rbx unsigned int v30; // ecx int v31; // ebx long long Property; // rax long long v33; // rdx long long v34; // rsi int v35; // eax long long v36; // rax long long v37; // rbx unsigned long long v38; // r13 long long v39; // rdx long long v40; // rbp char v42; // [rsp+0h] [rbp-98h] int v43; // [rsp+Ch] [rbp-8Ch] long long v44; // [rsp+10h] [rbp-88h] long long v45; // [rsp+10h] [rbp-88h] long long v46; // [rsp+18h] [rbp-80h] long long v47; // [rsp+20h] [rbp-78h] BYREF long long v48; // [rsp+28h] [rbp-70h] _QWORD v49[2]; // [rsp+30h] [rbp-68h] BYREF _QWORD v50[11]; // [rsp+40h] [rbp-58h] BYREF v49[0] = a2; v49[1] = a3; if ( (a3 & 0xFFFFFFFE) != 2 ) { v15 = *a5; v18 = a5[1]; if ( (a5[1] & 0xFFFFFFFE) != 2 ) { v31 = a6; Property = JS_GetProperty(a1, *a5, a5[1], a6); if ( (_DWORD)v33 == 6 ) goto LABEL_17; v34 = Property; LODWORD(a6) = v31; if ( v31 == 214 ) { v46 = Property; v45 = v33; v35 = check_regexp_g_flag(a1, v15, v18); v34 = v46; v33 = v45; LODWORD(a6) = 214; if ( v35 < 0 ) goto LABEL_16; } if ( (v33 & 0xFFFFFFFE) != 2 ) { v36 = JS_CallFree(a1, v34, v33, v15, v18, 1, (long long)v49); LODWORD(v15) = v36; v16 = v36 & 0xFFFFFFFF00000000LL; return v16 | (unsigned int)v15; } } v43 = a6; v19 = JS_ToString(a1, a2, a3); v23 = v22; v47 = v19; v48 = v22; if ( (_DWORD)v22 != 6 ) { v24 = v19; v50[0] = v15; v50[1] = v18; if ( v43 == 214 ) { v25 = js_new_string8(a1, (long long)"g"); v27 = v26; if ( (_DWORD)v26 == 6 ) { LABEL_15: v34 = v24; v33 = v23; LABEL_16: JS_FreeValue(a1, v34, v33); goto LABEL_17; } v44 = v24; v28 = v25 & 0xFFFFFFFF00000000LL; v50[2] = v25; v50[3] = v27; v29 = (unsigned int)v25; v30 = 2; } else { v44 = v19; v27 = 3LL; v30 = 1; v29 = 0LL; v28 = 0LL; } v37 = v28 | v29; v38 = JS_CallConstructor( a1, *(_QWORD *)(a1 + 120), *(_QWORD *)(a1 + 128), v30, (long long)v50, a7, a8, a9, a10, v20, v21, a13, a14); v40 = v39; JS_FreeValue(a1, v37, v27); v24 = v44; if ( (_DWORD)v40 != 6 ) { v15 = JS_InvokeFree(a1, v38, v40, v43, 1, (long long)&v47); JS_FreeValue(a1, v47, v48); v16 = v15 & 0xFFFFFFFF00000000LL; return v16 | (unsigned int)v15; } goto LABEL_15; } LABEL_17: LODWORD(v15) = 0; v16 = 0LL; return v16 | (unsigned int)v15; } LODWORD(v15) = 0; JS_ThrowTypeError( a1, (long long)"cannot convert to object", a3, a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v42); v16 = 0LL; return v16 | (unsigned int)v15; }
js_string_match: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R12,RDX MOV R14,RDI MOV qword ptr [RSP + 0x30],RSI MOV qword ptr [RSP + 0x38],RDX MOV EAX,R12D AND EAX,0xfffffffe CMP EAX,0x2 JNZ 0x00167ca2 LEA RSI,[0x189111] XOR R15D,R15D MOV RDI,R14 XOR EAX,EAX CALL 0x0011c64d PUSH 0x6 POP R12 XOR ECX,ECX JMP 0x00167e3b LAB_00167ca2: MOV RBP,RSI MOV R15,qword ptr [R8] MOV R13,qword ptr [R8 + 0x8] MOV EAX,R13D AND EAX,0xfffffffe CMP EAX,0x2 JNZ 0x00167d42 LAB_00167cbb: MOV dword ptr [RSP + 0xc],R9D MOV RDI,R14 MOV RSI,RBP MOV RDX,R12 CALL 0x0011b03c MOV R12,RDX MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RSP + 0x28],RDX CMP R12D,0x6 JZ 0x00167e32 MOV RBX,RAX MOV qword ptr [RSP + 0x40],R15 MOV qword ptr [RSP + 0x48],R13 CMP dword ptr [RSP + 0xc],0xd6 JNZ 0x00167ddb LEA RSI,[0x189146] MOV RDI,R14 CALL 0x00121856 MOV R15,RDX CMP R15D,0x6 JZ 0x00167e24 MOV qword ptr [RSP + 0x10],RBX MOV RDX,-0x100000000 AND RDX,RAX MOV qword ptr [RSP + 0x50],RAX MOV qword ptr [RSP + 0x58],R15 MOV EBX,EAX PUSH 0x2 POP RCX JMP 0x00167deb LAB_00167d42: MOV RDI,R14 MOV RSI,R15 MOV RDX,R13 MOV ECX,R9D MOV EBX,R9D CALL 0x0011b043 CMP EDX,0x6 JZ 0x00167e32 MOV RSI,RAX CMP EBX,0xd6 MOV R9D,EBX JNZ 0x00167d9d MOV RDI,R14 MOV qword ptr [RSP + 0x18],RSI MOV RSI,R15 MOV qword ptr [RSP + 0x10],RDX MOV RDX,R13 MOV EBX,R9D CALL 0x0016967e MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x10] MOV R9D,EBX TEST EAX,EAX JS 0x00167e95 LAB_00167d9d: MOV EAX,EDX AND EAX,0xfffffffe CMP EAX,0x2 JZ 0x00167cbb LEA RAX,[RSP + 0x30] MOV qword ptr [RSP],RAX PUSH 0x1 POP R9 MOV RDI,R14 MOV RCX,R15 MOV R8,R13 CALL 0x0011cd8e MOV R15,RAX MOV R12,RDX MOV RCX,-0x100000000 AND RCX,RAX JMP 0x00167e3b LAB_00167ddb: MOV qword ptr [RSP + 0x10],RBX PUSH 0x3 POP R15 PUSH 0x1 POP RCX XOR EBX,EBX XOR EDX,EDX LAB_00167deb: OR RBX,RDX MOV RSI,qword ptr [R14 + 0x78] MOV RDX,qword ptr [R14 + 0x80] LEA R8,[RSP + 0x40] MOV RDI,R14 CALL 0x001283f2 MOV R13,RAX MOV RBP,RDX MOV RDI,R14 MOV RSI,RBX MOV RDX,R15 CALL 0x0011801e CMP EBP,0x6 MOV RBX,qword ptr [RSP + 0x10] JNZ 0x00167e53 LAB_00167e24: MOV RDI,R14 MOV RSI,RBX MOV RDX,R12 LAB_00167e2d: CALL 0x0011801e LAB_00167e32: XOR R15D,R15D XOR ECX,ECX PUSH 0x6 POP R12 LAB_00167e3b: MOV EAX,R15D OR RAX,RCX MOV RDX,R12 ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00167e53: PUSH 0x1 POP R8 LEA RBX,[RSP + 0x20] MOV RDI,R14 MOV RSI,R13 MOV RDX,RBP MOV ECX,dword ptr [RSP + 0xc] MOV R9,RBX CALL 0x00147b70 MOV R15,RAX MOV R12,RDX MOV RSI,qword ptr [RBX] MOV RDX,qword ptr [RBX + 0x8] MOV RDI,R14 CALL 0x0011801e MOV RCX,-0x100000000 AND RCX,R15 JMP 0x00167e3b LAB_00167e95: MOV RDI,R14 JMP 0x00167e2d
int1 [16] js_string_match(long param_1,int8 param_2,int8 param_3,int8 param_4, int8 *param_5,int param_6) { int8 uVar1; int iVar2; int8 uVar3; ulong uVar4; ulong uVar5; int1 auVar6 [16]; int1 auVar7 [16]; int1 auVar8 [16]; int1 local_78 [16]; int8 local_68; int8 local_60; int8 local_58; int8 local_50; int8 local_48; int8 local_40; local_68 = param_2; local_60 = param_3; if (((uint)param_3 & 0xfffffffe) == 2) { JS_ThrowTypeError(param_1,"cannot convert to object"); auVar6 = ZEXT816(6) << 0x40; uVar4 = 0; goto LAB_00167e3b; } uVar3 = *param_5; uVar1 = param_5[1]; if (((uint)uVar1 & 0xfffffffe) == 2) { LAB_00167cbb: auVar6 = JS_ToString(param_1,param_2,param_3); if (auVar6._8_4_ != 6) { local_58 = uVar3; local_50 = uVar1; local_78 = auVar6; if (param_6 == 0xd6) { auVar7 = js_new_string8(param_1,"g"); if (auVar7._8_4_ == 6) goto LAB_00167e2d; uVar4 = auVar7._0_8_ & 0xffffffff00000000; uVar5 = auVar7._0_8_ & 0xffffffff; uVar3 = 2; local_40 = auVar7._8_8_; } else { auVar7._8_8_ = 3; auVar7._0_8_ = local_48; uVar3 = 1; uVar5 = 0; uVar4 = 0; } local_48 = auVar7._0_8_; auVar8 = JS_CallConstructor(param_1,*(int8 *)(param_1 + 0x78), *(int8 *)(param_1 + 0x80),uVar3,&local_58); JS_FreeValue(param_1,uVar5 | uVar4,auVar7._8_8_); if (auVar8._8_4_ != 6) { auVar6 = JS_InvokeFree(param_1,auVar8._0_8_,auVar8._8_8_,param_6,1,local_78); JS_FreeValue(param_1,local_78._0_8_,local_78._8_8_); uVar4 = auVar6._0_8_ & 0xffffffff00000000; goto LAB_00167e3b; } LAB_00167e2d: JS_FreeValue(param_1,auVar6._0_8_,auVar6._8_8_); } } else { auVar6 = JS_GetProperty(param_1,uVar3,uVar1,param_6); if (auVar6._8_4_ != 6) { if (param_6 != 0xd6) { LAB_00167d9d: if ((auVar6._8_4_ & 0xfffffffe) != 2) { auVar6 = JS_CallFree(param_1,auVar6._0_8_,auVar6._8_8_,uVar3,uVar1,1,&local_68); uVar4 = auVar6._0_8_ & 0xffffffff00000000; goto LAB_00167e3b; } goto LAB_00167cbb; } iVar2 = check_regexp_g_flag(param_1,uVar3,uVar1); if (-1 < iVar2) goto LAB_00167d9d; goto LAB_00167e2d; } } uVar4 = 0; auVar6 = ZEXT816(6) << 0x40; LAB_00167e3b: auVar8._0_8_ = auVar6._0_8_ & 0xffffffff | uVar4; auVar8._8_8_ = auVar6._8_8_; return auVar8; }
28,743
my_well_formed_char_length_8bit
eloqsql/strings/ctype-simple.c
size_t my_well_formed_char_length_8bit(CHARSET_INFO *cs __attribute__((unused)), const char *start, const char *end, size_t nchars, MY_STRCOPY_STATUS *status) { size_t nbytes= (size_t) (end - start); size_t res= MY_MIN(nbytes, nchars); status->m_well_formed_error_pos= NULL; status->m_source_end_pos= start + res; return res; }
O0
c
my_well_formed_char_length_8bit: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx subq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0xaf20b movq -0x30(%rbp), %rax movq %rax, -0x40(%rbp) jmp 0xaf213 movq -0x20(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x28(%rbp), %rax movq $0x0, 0x8(%rax) movq -0x10(%rbp), %rcx addq -0x38(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) movq -0x38(%rbp), %rax popq %rbp retq nopl (%rax)
my_well_formed_char_length_8bit: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rax, [rbp+var_18] mov rcx, [rbp+var_10] sub rax, rcx mov [rbp+var_30], rax mov rax, [rbp+var_30] cmp rax, [rbp+var_20] jnb short loc_AF20B mov rax, [rbp+var_30] mov [rbp+var_40], rax jmp short loc_AF213 loc_AF20B: mov rax, [rbp+var_20] mov [rbp+var_40], rax loc_AF213: mov rax, [rbp+var_40] mov [rbp+var_38], rax mov rax, [rbp+var_28] mov qword ptr [rax+8], 0 mov rcx, [rbp+var_10] add rcx, [rbp+var_38] mov rax, [rbp+var_28] mov [rax], rcx mov rax, [rbp+var_38] pop rbp retn
unsigned long long my_well_formed_char_length_8bit( long long a1, long long a2, long long a3, unsigned long long a4, _QWORD *a5) { unsigned long long v6; // [rsp+0h] [rbp-40h] if ( a3 - a2 >= a4 ) v6 = a4; else v6 = a3 - a2; a5[1] = 0LL; *a5 = v6 + a2; return v6; }
my_well_formed_char_length_8bit: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] SUB RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x20] JNC 0x001af20b MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x40],RAX JMP 0x001af213 LAB_001af20b: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x40],RAX LAB_001af213: MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0x8],0x0 MOV RCX,qword ptr [RBP + -0x10] ADD RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x38] POP RBP RET
ulong my_well_formed_char_length_8bit (int8 param_1,long param_2,long param_3,ulong param_4,long *param_5) { ulong local_48; local_48 = param_4; if ((ulong)(param_3 - param_2) < param_4) { local_48 = param_3 - param_2; } param_5[1] = 0; *param_5 = param_2 + local_48; return local_48; }
28,744
build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&)
monkey531[P]llama/common/json-schema-to-grammar.cpp
std::string build_grammar(const std::function<void(const common_grammar_builder &)> & cb, const common_grammar_options & options) { SchemaConverter converter([&](const std::string &) { return json(); }, options.dotall, options.compact_spaces); common_grammar_builder builder { /* .add_rule = */ [&](const std::string & name, const std::string & rule) { return converter._add_rule(name, rule); }, /* .add_schema = */ [&](const std::string & name, const nlohmann::ordered_json & schema) { return converter.visit(schema, name == "root" ? "" : name); }, /* .resolve_refs = */ [&](nlohmann::ordered_json & schema) { converter.resolve_refs(schema, ""); } }; cb(builder); converter.check_errors(); return converter.format_grammar(); }
O2
cpp
build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x158, %rsp # imm = 0x158 movq %rsi, %r14 movq %rdi, %rbx xorps %xmm0, %xmm0 movq %rsp, %rsi movaps %xmm0, (%rsi) leaq 0x1d2(%rip), %rax # 0x8c36e movq %rax, 0x18(%rsi) leaq 0x1d7(%rip), %rax # 0x8c37e movq %rax, 0x10(%rsi) movzbl (%rdx), %eax movzbl 0x1(%rdx), %ecx leaq 0x60(%rsp), %r15 movq %r15, %rdi movl %eax, %edx callq 0x8dbae movq %rsp, %r12 movq %r12, %rdi callq 0x49072 andq $0x0, 0x8(%r12) movq %r15, (%r12) leaq 0x1b9(%rip), %rax # 0x8c396 movq %rax, 0x18(%r12) leaq 0x1bf(%rip), %rax # 0x8c3a8 movq %rax, 0x10(%r12) andq $0x0, 0x28(%r12) movq %r15, 0x20(%r12) leaq 0x1ce(%rip), %rax # 0x8c3ce movq %rax, 0x38(%r12) leaq 0x262(%rip), %rax # 0x8c46e movq %rax, 0x30(%r12) andq $0x0, 0x48(%r12) movq %r15, 0x40(%r12) leaq 0x168f(%rip), %rax # 0x8d8b2 movq %rax, 0x58(%r12) leaq 0x16e3(%rip), %rax # 0x8d912 movq %rax, 0x50(%r12) movq %rsp, %rsi movq %r14, %rdi callq 0x8dd46 leaq 0x60(%rsp), %rdi callq 0x8dd5a leaq 0x60(%rsp), %rsi movq %rbx, %rdi callq 0x8decc movq %rsp, %rdi callq 0x8df82 leaq 0x60(%rsp), %rdi callq 0x8dfa2 movq %rbx, %rax addq $0x158, %rsp # imm = 0x158 popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx movq %rsp, %rdi callq 0x49072 jmp 0x8c29c movq %rax, %rbx movq %rsp, %rdi callq 0x8df82 leaq 0x60(%rsp), %rdi callq 0x8dfa2 movq %rbx, %rdi callq 0x23f80
_Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options: push r15 push r14 push r12 push rbx sub rsp, 158h mov r14, rsi mov rbx, rdi xorps xmm0, xmm0 mov rsi, rsp movaps xmmword ptr [rsi], xmm0 lea rax, _ZNSt17_Function_handlerIFN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_0E9_M_invokeERKSt9_Any_dataSG_; std::_Function_handler<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::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_invoke(std::_Any_data const&,std::string const&) mov [rsi+18h], rax lea rax, _ZNSt17_Function_handlerIFN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_0E10_M_managerERSt9_Any_dataRKSV_St18_Manager_operation; std::_Function_handler<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::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsi+10h], rax movzx eax, byte ptr [rdx] movzx ecx, byte ptr [rdx+1] lea r15, [rsp+178h+var_118] mov rdi, r15 mov edx, eax call _ZN15SchemaConverterC2ERKSt8functionIFN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEERKSB_EEbb; SchemaConverter::SchemaConverter(std::function<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::string const&)> const&,bool,bool) mov r12, rsp mov rdi, r12; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() and qword ptr [r12+8], 0 mov [r12], r15 lea rax, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_S7_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_1E9_M_invokeERKSt9_Any_dataS7_S7_; std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_invoke(std::_Any_data const&,std::string const&,std::string const&) mov [r12+18h], rax lea rax, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_S7_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_1E10_M_managerERSt9_Any_dataRKSM_St18_Manager_operation; std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [r12+10h], rax and qword ptr [r12+28h], 0 mov [r12+20h], r15 lea rax, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_RKN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_2E9_M_invokeERKSt9_Any_dataS7_SI_; std::_Function_handler<std::string ()(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_invoke(std::_Any_data const&,std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov [r12+38h], rax lea rax, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_RKN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_2E10_M_managerERSt9_Any_dataRKSX_St18_Manager_operation; std::_Function_handler<std::string ()(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [r12+30h], rax and qword ptr [r12+48h], 0 mov [r12+40h], r15 lea rax, _ZNSt17_Function_handlerIFvRN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_3E9_M_invokeERKSt9_Any_dataSF_; std::_Function_handler<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> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_invoke(std::_Any_data const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &) mov [r12+58h], rax lea rax, _ZNSt17_Function_handlerIFvRN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_3E10_M_managerERSt9_Any_dataRKSU_St18_Manager_operation; std::_Function_handler<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> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [r12+50h], rax mov rsi, rsp mov rdi, r14 call _ZNKSt8functionIFvRK22common_grammar_builderEEclES2_; std::function<void ()(common_grammar_builder const&)>::operator()(common_grammar_builder const&) lea rdi, [rsp+178h+var_118]; this call _ZN15SchemaConverter12check_errorsEv; SchemaConverter::check_errors(void) lea rsi, [rsp+178h+var_118] mov rdi, rbx call _ZN15SchemaConverter14format_grammarB5cxx11Ev; SchemaConverter::format_grammar(void) mov rdi, rsp; this call _ZN22common_grammar_builderD2Ev; common_grammar_builder::~common_grammar_builder() lea rdi, [rsp+178h+var_118]; this call _ZN15SchemaConverterD2Ev; SchemaConverter::~SchemaConverter() mov rax, rbx add rsp, 158h pop rbx pop r12 pop r14 pop r15 retn mov rbx, rax mov rdi, rsp; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() jmp short loc_8C29C mov rbx, rax mov rdi, rsp; this call _ZN22common_grammar_builderD2Ev; common_grammar_builder::~common_grammar_builder() lea rdi, [rsp+arg_58]; this call _ZN15SchemaConverterD2Ev; SchemaConverter::~SchemaConverter() loc_8C29C: mov rdi, rbx call __Unwind_Resume
long long build_grammar[abi:cxx11](long long a1, long long a2, unsigned __int8 *a3, long long a4, int a5, int a6) { int v6; // edx int v7; // ecx int v8; // r8d int v9; // r9d _QWORD v11[4]; // [rsp+0h] [rbp-178h] BYREF _BYTE *v12; // [rsp+20h] [rbp-158h] long long v13; // [rsp+28h] [rbp-150h] long long ( *v14)(); // [rsp+30h] [rbp-148h] long long ( *v15)(int, int, int, int, int, int, int, char); // [rsp+38h] [rbp-140h] _BYTE *v16; // [rsp+40h] [rbp-138h] long long v17; // [rsp+48h] [rbp-130h] long long ( *v18)(); // [rsp+50h] [rbp-128h] long long ( *v19)(int, int, int, int, int, int, int, char); // [rsp+58h] [rbp-120h] _BYTE v20[280]; // [rsp+60h] [rbp-118h] BYREF SchemaConverter::SchemaConverter( (unsigned int)v20, (unsigned int)v11, *a3, a3[1], a5, a6, 0, 0, (unsigned int)std::_Function_handler<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::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_manager, (unsigned int)std::_Function_handler<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::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_invoke, (char)v12); std::_Function_base::~_Function_base((std::_Function_base *)v11); v11[1] = 0LL; v11[0] = v20; v11[3] = std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_invoke; v11[2] = std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_manager; v13 = 0LL; v12 = v20; v15 = std::_Function_handler<std::string ()(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_invoke; v14 = std::_Function_handler<std::string ()(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_manager; v17 = 0LL; v16 = v20; v19 = std::_Function_handler<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_invoke; v18 = std::_Function_handler<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_manager; std::function<void ()(common_grammar_builder const&)>::operator()(a2, v11); SchemaConverter::check_errors((SchemaConverter *)v20); SchemaConverter::format_grammar[abi:cxx11](a1, (unsigned int)v20, v6, v7, v8, v9, v11[0]); common_grammar_builder::~common_grammar_builder((common_grammar_builder *)v11); SchemaConverter::~SchemaConverter((SchemaConverter *)v20); return a1; }
build_grammar[abi:cxx11]: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x158 MOV R14,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOV RSI,RSP MOVAPS xmmword ptr [RSI],XMM0 LEA RAX,[0x18c36e] MOV qword ptr [RSI + 0x18],RAX LEA RAX,[0x18c37e] MOV qword ptr [RSI + 0x10],RAX MOVZX EAX,byte ptr [RDX] MOVZX ECX,byte ptr [RDX + 0x1] LAB_0018c1b2: LEA R15,[RSP + 0x60] MOV RDI,R15 MOV EDX,EAX CALL 0x0018dbae MOV R12,RSP MOV RDI,R12 CALL 0x00149072 AND qword ptr [R12 + 0x8],0x0 MOV qword ptr [R12],R15 LEA RAX,[0x18c396] MOV qword ptr [R12 + 0x18],RAX LEA RAX,[0x18c3a8] MOV qword ptr [R12 + 0x10],RAX AND qword ptr [R12 + 0x28],0x0 MOV qword ptr [R12 + 0x20],R15 LEA RAX,[0x18c3ce] MOV qword ptr [R12 + 0x38],RAX LEA RAX,[0x18c46e] MOV qword ptr [R12 + 0x30],RAX AND qword ptr [R12 + 0x48],0x0 MOV qword ptr [R12 + 0x40],R15 LEA RAX,[0x18d8b2] MOV qword ptr [R12 + 0x58],RAX LEA RAX,[0x18d912] MOV qword ptr [R12 + 0x50],RAX LAB_0018c234: MOV RSI,RSP MOV RDI,R14 CALL 0x0018dd46 LEA RDI,[RSP + 0x60] CALL 0x0018dd5a LEA RSI,[RSP + 0x60] MOV RDI,RBX CALL 0x0018decc LAB_0018c256: MOV RDI,RSP CALL 0x0018df82 LEA RDI,[RSP + 0x60] CALL 0x0018dfa2 MOV RAX,RBX ADD RSP,0x158 POP RBX POP R12 POP R14 POP R15 RET
/* build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&) */ function * build_grammar_abi_cxx11_(function *param_1,common_grammar_options *param_2) { long in_RDX; SchemaConverter *local_178; int8 uStack_170; code *local_168; code *local_160; SchemaConverter *local_158; int8 local_150; code *local_148; code *local_140; SchemaConverter *local_138; int8 local_130; code *local_128; code *local_120; SchemaConverter local_118 [248]; local_178 = (SchemaConverter *)0x0; uStack_170 = 0; local_160 = std:: _Function_handler<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::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_0> ::_M_invoke; local_168 = std:: _Function_handler<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::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_0> ::_M_manager; /* try { // try from 0018c1b2 to 0018c1c0 has its CatchHandler @ 0018c27a */ SchemaConverter::SchemaConverter (local_118,(function *)&local_178,*(bool *)in_RDX,*(bool *)(in_RDX + 1)); std::_Function_base::~_Function_base((_Function_base *)&local_178); uStack_170 = 0; local_160 = std:: _Function_handler<std::__cxx11::string(std::__cxx11::string_const&,std::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_1> ::_M_invoke; local_168 = std:: _Function_handler<std::__cxx11::string(std::__cxx11::string_const&,std::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_1> ::_M_manager; local_150 = 0; local_140 = std:: _Function_handler<std::__cxx11::string(std::__cxx11::string_const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_2> ::_M_invoke; local_148 = std:: _Function_handler<std::__cxx11::string(std::__cxx11::string_const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_2> ::_M_manager; local_130 = 0; local_120 = std:: _Function_handler<void(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_3> ::_M_invoke; local_128 = std:: _Function_handler<void(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_3> ::_M_manager; local_178 = local_118; local_158 = local_118; local_138 = local_118; /* try { // try from 0018c234 to 0018c255 has its CatchHandler @ 0018c287 */ std::function<void(common_grammar_builder_const&)>::operator() ((function<void(common_grammar_builder_const&)> *)param_2, (common_grammar_builder *)&local_178); SchemaConverter::check_errors(local_118); SchemaConverter::format_grammar_abi_cxx11_(); common_grammar_builder::~common_grammar_builder((common_grammar_builder *)&local_178); SchemaConverter::~SchemaConverter(local_118); return param_1; }
28,745
clip_init
llama.cpp/examples/llava/clip.cpp
struct clip_ctx * clip_init(const char * fname, struct clip_context_params ctx_params) { g_logger_state.verbosity_thold = ctx_params.verbosity; clip_ctx * ctx_clip = new clip_ctx(ctx_params); try { clip_model_loader loader(fname, *ctx_clip); loader.load_hparams(); loader.load_tensors(); loader.alloc_compute_meta(); } catch (const std::exception & e) { LOG_ERR("%s: failed to load model '%s': %s\n", __func__, fname, e.what()); delete ctx_clip; return nullptr; } return ctx_clip; }
O3
cpp
clip_init: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x50, %rsp movq %rdi, %r14 leaq 0x48(%rsp), %r15 movq %rsi, (%r15) shrq $0x20, %rsi leaq 0x3ab1b(%rip), %r13 # 0x55730 movl %esi, (%r13) movl $0x3a8, %edi # imm = 0x3A8 callq 0x15140 movq %rax, %rbx movq %rax, %rdi movq %r15, %rsi callq 0x305ec leaq 0x8(%rsp), %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x308c2 leaq 0x8(%rsp), %rdi callq 0x30e04 leaq 0x8(%rsp), %rdi callq 0x31986 leaq 0x8(%rsp), %rdi callq 0x3506c leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x1ac7a movq 0x30(%rsp), %rsi incq %rsi callq 0x15120 leaq 0x10(%rsp), %rdi callq 0x35ab4 leaq 0x8(%rsp), %rdi callq 0x35bda movq %rbx, %rax addq $0x50, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rdx, %r12 movq %rax, %r15 jmp 0x1accf movq %rax, %r15 movl $0x3a8, %esi # imm = 0x3A8 movq %rbx, %rdi callq 0x15120 movq %r15, %rdi callq 0x157c0 movq %rdx, %r12 movq %rax, %r15 leaq 0x8(%rsp), %rdi callq 0x351b2 cmpl $0x1, %r12d jne 0x1acb7 movq %r15, %rdi callq 0x150c0 cmpl $0x4, (%r13) jg 0x1ad0d movq (%rax), %rcx movq %rax, %rdi callq *0x10(%rcx) leaq 0x2b407(%rip), %rsi # 0x460fb leaq 0x2b423(%rip), %rdx # 0x4611e movl $0x4, %edi movq %r14, %rcx movq %rax, %r8 xorl %eax, %eax callq 0x1ad43 movq %rbx, %rdi callq 0x351e0 movl $0x3a8, %esi # imm = 0x3A8 movq %rbx, %rdi callq 0x15120 callq 0x15920 xorl %ebx, %ebx jmp 0x1ac8e movq %rax, %r15 callq 0x15920 jmp 0x1acb7 movq %rax, %rdi callq 0x352e0
clip_init: push r15 push r14 push r13 push r12 push rbx sub rsp, 50h mov r14, rdi lea r15, [rsp+78h+var_30] mov [r15], rsi shr rsi, 20h lea r13, g_logger_state mov [r13+0], esi mov edi, 3A8h; unsigned __int64 call __Znwm; operator new(ulong) mov rbx, rax mov rdi, rax mov rsi, r15 call _ZN8clip_ctxC2ER19clip_context_params; clip_ctx::clip_ctx(clip_context_params &) lea rdi, [rsp+78h+var_70] mov rsi, r14 mov rdx, rbx call _ZN17clip_model_loaderC2EPKcR8clip_ctx; clip_model_loader::clip_model_loader(char const*,clip_ctx &) lea rdi, [rsp+78h+var_70]; this call _ZN17clip_model_loader12load_hparamsEv; clip_model_loader::load_hparams(void) lea rdi, [rsp+78h+var_70]; this call _ZN17clip_model_loader12load_tensorsEv; clip_model_loader::load_tensors(void) lea rdi, [rsp+78h+var_70]; this call _ZN17clip_model_loader18alloc_compute_metaEv; clip_model_loader::alloc_compute_meta(void) lea rax, [rsp+78h+var_48] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_1AC7A mov rsi, [rsp+78h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1AC7A: lea rdi, [rsp+78h+var_68] call _ZNSt10unique_ptrI12gguf_context20gguf_context_deleterED2Ev; std::unique_ptr<gguf_context,gguf_context_deleter>::~unique_ptr() lea rdi, [rsp+78h+var_70] call _ZNSt10unique_ptrI12ggml_context20ggml_context_deleterED2Ev; std::unique_ptr<ggml_context,ggml_context_deleter>::~unique_ptr() loc_1AC8E: mov rax, rbx add rsp, 50h pop rbx pop r12 pop r13 pop r14 pop r15 retn mov r12, rdx mov r15, rax jmp short loc_1ACCF mov r15, rax mov esi, 3A8h; unsigned __int64 mov rdi, rbx; void * call __ZdlPvm; operator delete(void *,ulong) loc_1ACB7: mov rdi, r15 call __Unwind_Resume mov r12, rdx mov r15, rax lea rdi, [rsp+78h+var_70]; this call _ZN17clip_model_loaderD2Ev; clip_model_loader::~clip_model_loader() loc_1ACCF: cmp r12d, 1 jnz short loc_1ACB7 mov rdi, r15; void * call ___cxa_begin_catch cmp dword ptr [r13+0], 4 jg short loc_1AD0D mov rcx, [rax] mov rdi, rax call qword ptr [rcx+10h] lea rsi, aSFailedToLoadM; "%s: failed to load model '%s': %s\n" lea rdx, aClipInit; "clip_init" mov edi, 4 mov rcx, r14 mov r8, rax xor eax, eax call _ZL17clip_log_internal14ggml_log_levelPKcz; clip_log_internal(ggml_log_level,char const*,...) loc_1AD0D: mov rdi, rbx; this call _ZN8clip_ctxD2Ev; clip_ctx::~clip_ctx() mov esi, 3A8h; unsigned __int64 mov rdi, rbx; void * call __ZdlPvm; operator delete(void *,ulong) call ___cxa_end_catch xor ebx, ebx jmp loc_1AC8E mov r15, rax call ___cxa_end_catch jmp loc_1ACB7 mov rdi, rax call __clang_call_terminate
clip_ctx * clip_init(const char *a1, long long a2) { clip_ctx *v2; // rbx int v3; // edx int v4; // ecx int v5; // r8d int v6; // r9d _BYTE v8[8]; // [rsp+8h] [rbp-70h] BYREF _BYTE v9[16]; // [rsp+10h] [rbp-68h] BYREF long long *v10; // [rsp+20h] [rbp-58h] long long v11; // [rsp+30h] [rbp-48h] BYREF long long v12; // [rsp+48h] [rbp-30h] BYREF v12 = a2; g_logger_state = HIDWORD(a2); v2 = (clip_ctx *)operator new(0x3A8uLL); clip_ctx::clip_ctx((_DWORD)v2, (unsigned int)&v12, v3, v4, v5, v6); clip_model_loader::clip_model_loader((clip_model_loader *)v8, a1, v2); clip_model_loader::load_hparams((clip_model_loader *)v8); clip_model_loader::load_tensors((clip_model_loader *)v8); clip_model_loader::alloc_compute_meta((clip_model_loader *)v8); if ( v10 != &v11 ) operator delete(v10, v11 + 1); std::unique_ptr<gguf_context,gguf_context_deleter>::~unique_ptr(v9); std::unique_ptr<ggml_context,ggml_context_deleter>::~unique_ptr(v8); return v2; }
clip_init: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x50 MOV R14,RDI LEA R15,[RSP + 0x48] MOV qword ptr [R15],RSI SHR RSI,0x20 LEA R13,[0x155730] MOV dword ptr [R13],ESI MOV EDI,0x3a8 CALL 0x00115140 MOV RBX,RAX LAB_0011ac26: MOV RDI,RAX MOV RSI,R15 CALL 0x001305ec LAB_0011ac31: LEA RDI,[RSP + 0x8] MOV RSI,R14 MOV RDX,RBX CALL 0x001308c2 LAB_0011ac41: LEA RDI,[RSP + 0x8] CALL 0x00130e04 LEA RDI,[RSP + 0x8] CALL 0x00131986 LEA RDI,[RSP + 0x8] CALL 0x0013506c LAB_0011ac5f: LEA RAX,[RSP + 0x30] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0011ac7a MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x00115120 LAB_0011ac7a: LEA RDI,[RSP + 0x10] CALL 0x00135ab4 LEA RDI,[RSP + 0x8] CALL 0x00135bda LAB_0011ac8e: MOV RAX,RBX ADD RSP,0x50 POP RBX POP R12 POP R13 POP R14 POP R15 RET
clip_ctx * clip_init(char *param_1,int8 param_2) { clip_ctx *this; clip_model_loader local_70 [8]; unique_ptr<gguf_context,gguf_context_deleter> local_68 [16]; long *local_58; long local_48 [3]; int8 local_30; g_logger_state = (int4)((ulong)param_2 >> 0x20); local_30 = param_2; this = (clip_ctx *)operator_new(0x3a8); /* try { // try from 0011ac26 to 0011ac30 has its CatchHandler @ 0011aca7 */ clip_ctx::clip_ctx(this,(clip_context_params *)&local_30); /* try { // try from 0011ac31 to 0011ac40 has its CatchHandler @ 0011ac9f */ clip_model_loader::clip_model_loader(local_70,param_1,this); /* try { // try from 0011ac41 to 0011ac5e has its CatchHandler @ 0011acbf */ clip_model_loader::load_hparams(local_70); clip_model_loader::load_tensors(local_70); clip_model_loader::alloc_compute_meta(local_70); if (local_58 != local_48) { operator_delete(local_58,local_48[0] + 1); } std::unique_ptr<gguf_context,gguf_context_deleter>::~unique_ptr(local_68); std::unique_ptr<ggml_context,ggml_context_deleter>::~unique_ptr ((unique_ptr<ggml_context,ggml_context_deleter> *)local_70); return this; }
28,746
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char>(char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char&&)
monkey531[P]llama/common/json.hpp
inline OutStringType concat(Args && ... args) { OutStringType str; str.reserve(concat_length(args...)); concat_into(str, std::forward<Args>(args)...); return str; }
O1
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char>(char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char&&): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0x10(%rdi), %r13 movq %r13, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq %rsi, %rdi callq 0x1b440 movq %rax, %r12 movq (%r14), %rdi callq 0x1b440 addq %rax, %r12 movq %rbx, %rdi movq %r12, %rsi callq 0x1bff0 movq %rbx, %rdi movq %r15, %rsi callq 0x1c3e0 movq (%r14), %rsi movq %rbx, %rdi callq 0x1c3e0 movq %rbx, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %r14 movq (%rbx), %rdi cmpq %r13, %rdi je 0xa5910 movq (%r13), %rsi incq %rsi callq 0x1ba60 movq %r14, %rdi callq 0x1c250
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA52_KcPS9_EEET_DpOT0_: push r15 push r14 push r13 push r12 push rbx mov r14, rdx mov r15, rsi mov rbx, rdi lea r13, [rdi+10h] mov [rdi], r13 mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rdi, rsi call _strlen mov r12, rax mov rdi, [r14] call _strlen add r12, rax mov rdi, rbx mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rdi, rbx mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [r14] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rax, rbx pop rbx pop r12 pop r13 pop r14 pop r15 retn mov r14, rax mov rdi, [rbx]; void * cmp rdi, r13 jz short loc_A5910 mov rsi, [r13+0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A5910: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>( long long a1, const char *a2, const char **a3) { long long v4; // r12 long long v5; // rax *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; v4 = strlen(a2); v5 = strlen(*a3); std::string::reserve(a1, v5 + v4); std::string::append(a1, a2); std::string::append(a1, *a3); return a1; }
concat<std::__cxx11::string,char_const(&)[52],char_const*>: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R14,RDX MOV R15,RSI MOV RBX,RDI LEA R13,[RDI + 0x10] MOV qword ptr [RDI],R13 MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 MOV RDI,RSI CALL 0x0011b440 MOV R12,RAX MOV RDI,qword ptr [R14] CALL 0x0011b440 ADD R12,RAX LAB_001a58cb: MOV RDI,RBX MOV RSI,R12 CALL 0x0011bff0 MOV RDI,RBX MOV RSI,R15 CALL 0x0011c3e0 MOV RSI,qword ptr [R14] MOV RDI,RBX CALL 0x0011c3e0 LAB_001a58ec: MOV RAX,RBX POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const (&) [52], char const*>(char const (&) [52], char const*&&) */ detail * __thiscall nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[52],char_const*> (detail *this,char *param_1,char **param_2) { *(detail **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (detail)0x0; strlen(param_1); strlen(*param_2); /* try { // try from 001a58cb to 001a58eb has its CatchHandler @ 001a58f9 */ std::__cxx11::string::reserve((ulong)this); std::__cxx11::string::append((char *)this); std::__cxx11::string::append((char *)this); return this; }
28,747
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char>(char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char&&)
monkey531[P]llama/common/json.hpp
inline OutStringType concat(Args && ... args) { OutStringType str; str.reserve(concat_length(args...)); concat_into(str, std::forward<Args>(args)...); return str; }
O2
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char>(char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char&&): pushq %r15 pushq %r14 pushq %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0x10(%rdi), %rax movq %rax, (%rdi) andq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq %rsi, %rdi movq %rdx, %rsi callq 0x46e0d movq %rbx, %rdi movq %rax, %rsi callq 0x25000 movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x66965 movq %rbx, %rax popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movq %rbx, %rdi callq 0x254d8 movq %r14, %rdi callq 0x25250
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_: push r15 push r14 push rbx mov r14, rdx mov r15, rsi mov rbx, rdi lea rax, [rdi+10h] mov [rdi], rax and qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rdi, rsi mov rsi, rdx call _ZN8nlohmann16json_abi_v3_11_36detail13concat_lengthIJPKcEEEmS4_DpRKT_; nlohmann::json_abi_v3_11_3::detail::concat_length<char const*>(char const*,char const* const&) mov rdi, rbx mov rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rdi, rbx mov rsi, r15 mov rdx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA29_KcJPS9_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSE_OSF_DpOT1_ mov rax, rbx pop rbx pop r14 pop r15 retn mov r14, rax mov rdi, rbx; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>( long long a1, long long a2, _QWORD *a3) { long long v4; // rax *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; v4 = nlohmann::json_abi_v3_11_3::detail::concat_length<char const*>(a2, a3); std::string::reserve(a1, v4); ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA29_KcJPS9_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSE_OSF_DpOT1_( a1, a2, a3); return a1; }
concat<std::__cxx11::string,char_const(&)[29],char_const*>: PUSH R15 PUSH R14 PUSH RBX MOV R14,RDX MOV R15,RSI MOV RBX,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RDI],RAX AND qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 MOV RDI,RSI MOV RSI,RDX CALL 0x00146e0d LAB_00166930: MOV RDI,RBX MOV RSI,RAX CALL 0x00125000 MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 CALL 0x00166965 LAB_00166949: MOV RAX,RBX POP RBX POP R14 POP R15 RET
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const (&) [29], char const*>(char const (&) [29], char const*&&) */ detail * __thiscall nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[29],char_const*> (detail *this,char *param_1,char **param_2) { *(detail **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (detail)0x0; concat_length<char_const*>(param_1,param_2); /* try { // try from 00166930 to 00166948 has its CatchHandler @ 00166952 */ std::__cxx11::string::reserve((ulong)this); _ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA29_KcJPS9_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSE_OSF_DpOT1_ (this,param_1,param_2); return this; }
28,748
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char>(char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char&&)
monkey531[P]llama/common/json.hpp
inline OutStringType concat(Args && ... args) { OutStringType str; str.reserve(concat_length(args...)); concat_into(str, std::forward<Args>(args)...); return str; }
O3
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char>(char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char&&): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0x10(%rdi), %r13 movq %r13, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq %rsi, %rdi callq 0x1b440 movq %rax, %r12 movq (%r14), %rdi callq 0x1b440 addq %rax, %r12 movq %rbx, %rdi movq %r12, %rsi callq 0x1bff0 movq %rbx, %rdi movq %r15, %rsi callq 0x1c3e0 movq (%r14), %rsi movq %rbx, %rdi callq 0x1c3e0 movq %rbx, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %r14 movq (%rbx), %rdi cmpq %r13, %rdi je 0xaf1e5 movq (%r13), %rsi incq %rsi callq 0x1ba60 movq %r14, %rdi callq 0x1c250
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA51_KcPS9_EEET_DpOT0_: push r15 push r14 push r13 push r12 push rbx mov r14, rdx mov r15, rsi mov rbx, rdi lea r13, [rdi+10h] mov [rdi], r13 mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rdi, rsi call _strlen mov r12, rax mov rdi, [r14] call _strlen add r12, rax mov rdi, rbx mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rdi, rbx mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [r14] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rax, rbx pop rbx pop r12 pop r13 pop r14 pop r15 retn mov r14, rax mov rdi, [rbx]; void * cmp rdi, r13 jz short loc_AF1E5 mov rsi, [r13+0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_AF1E5: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[51],char const*>( long long a1, const char *a2, const char **a3) { long long v4; // r12 long long v5; // rax *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; v4 = strlen(a2); v5 = strlen(*a3); std::string::reserve(a1, v5 + v4); std::string::append(a1, a2); std::string::append(a1, *a3); return a1; }
concat<std::__cxx11::string,char_const(&)[51],char_const*>: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R14,RDX MOV R15,RSI MOV RBX,RDI LEA R13,[RDI + 0x10] MOV qword ptr [RDI],R13 MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 MOV RDI,RSI CALL 0x0011b440 MOV R12,RAX MOV RDI,qword ptr [R14] CALL 0x0011b440 ADD R12,RAX LAB_001af1a0: MOV RDI,RBX MOV RSI,R12 CALL 0x0011bff0 MOV RDI,RBX MOV RSI,R15 CALL 0x0011c3e0 MOV RSI,qword ptr [R14] MOV RDI,RBX CALL 0x0011c3e0 LAB_001af1c1: MOV RAX,RBX POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const (&) [51], char const*>(char const (&) [51], char const*&&) */ detail * __thiscall nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[51],char_const*> (detail *this,char *param_1,char **param_2) { *(detail **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (detail)0x0; strlen(param_1); strlen(*param_2); /* try { // try from 001af1a0 to 001af1c0 has its CatchHandler @ 001af1ce */ std::__cxx11::string::reserve((ulong)this); std::__cxx11::string::append((char *)this); std::__cxx11::string::append((char *)this); return this; }
28,749
Trie::Trie(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
MikePodsytnik[P]TCRtrie/src/Trie.cpp
Trie::Trie(const std::string& dataPath) { root_ = new TrieNode(); LoadAIRRAndBuildTrie(dataPath); }
O0
cpp
Trie::Trie(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x38(%rbp) movl $0x4, (%rdi) movl $0x4, 0x4(%rdi) movb $0x0, 0x8(%rdi) movl $0x20, 0xc(%rdi) addq $0x10, %rdi movq %rdi, -0x40(%rbp) callq 0x59ef0 movq -0x38(%rbp), %rdi addq $0x50, %rdi movq %rdi, -0x30(%rbp) callq 0x59f10 movl $0x108, %edi # imm = 0x108 callq 0x95f0 movq %rax, -0x28(%rbp) jmp 0x520fe movq -0x28(%rbp), %rdi xorl %esi, %esi movl $0x108, %edx # imm = 0x108 callq 0x9310 movq -0x28(%rbp), %rdi callq 0x59f30 movq -0x28(%rbp), %rax movq -0x38(%rbp), %rdi movq %rax, 0x48(%rdi) movq -0x10(%rbp), %rsi callq 0x52160 jmp 0x5212e addq $0x40, %rsp popq %rbp retq movq -0x30(%rbp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, -0x18(%rbp) movl %eax, -0x1c(%rbp) callq 0x59f70 movq -0x40(%rbp), %rdi callq 0x59fd0 movq -0x18(%rbp), %rdi callq 0x9a70 nopl (%rax,%rax)
_ZN4TrieC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rdi, [rbp+var_8] mov [rbp+var_38], rdi mov dword ptr [rdi], 4 mov dword ptr [rdi+4], 4 mov byte ptr [rdi+8], 0 mov dword ptr [rdi+0Ch], 20h ; ' ' add rdi, 10h mov [rbp+var_40], rdi call _ZNSt13unordered_mapIcS_IcfSt4hashIcESt8equal_toIcESaISt4pairIKcfEEES1_S3_SaIS4_IS5_S8_EEEC2Ev; std::unordered_map<char,std::unordered_map<char,float>>::unordered_map(void) mov rdi, [rbp+var_38] add rdi, 50h ; 'P' mov [rbp+var_30], rdi call _ZNSt6vectorI10AIRREntitySaIS0_EEC2Ev; std::vector<AIRREntity>::vector(void) mov edi, 108h; unsigned __int64 call __Znwm; operator new(ulong) mov [rbp+var_28], rax jmp short $+2 loc_520FE: mov rdi, [rbp+var_28] xor esi, esi mov edx, 108h call _memset mov rdi, [rbp+var_28]; this call _ZN4Trie8TrieNodeC2Ev; Trie::TrieNode::TrieNode(void) mov rax, [rbp+var_28] mov rdi, [rbp+var_38] mov [rdi+48h], rax mov rsi, [rbp+var_10] call _ZN4Trie20LoadAIRRAndBuildTrieERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Trie::LoadAIRRAndBuildTrie(std::string const&) jmp short $+2 loc_5212E: add rsp, 40h pop rbp retn mov rdi, [rbp+var_30] mov rcx, rax mov eax, edx mov [rbp+var_18], rcx mov [rbp+var_1C], eax call _ZNSt6vectorI10AIRREntitySaIS0_EED2Ev; std::vector<AIRREntity>::~vector() mov rdi, [rbp+var_40] call _ZNSt13unordered_mapIcS_IcfSt4hashIcESt8equal_toIcESaISt4pairIKcfEEES1_S3_SaIS4_IS5_S8_EEED2Ev; std::unordered_map<char,std::unordered_map<char,float>>::~unordered_map() mov rdi, [rbp+var_18] call __Unwind_Resume
long long Trie::Trie(long long a1, long long a2) { Trie::TrieNode *v3; // [rsp+18h] [rbp-28h] *(_DWORD *)a1 = 4; *(_DWORD *)(a1 + 4) = 4; *(_BYTE *)(a1 + 8) = 0; *(_DWORD *)(a1 + 12) = 32; std::unordered_map<char,std::unordered_map<char,float>>::unordered_map(a1 + 16); std::vector<AIRREntity>::vector(); v3 = (Trie::TrieNode *)operator new(0x108uLL); memset(v3, 0LL, 264LL); Trie::TrieNode::TrieNode(v3); *(_QWORD *)(a1 + 72) = v3; return Trie::LoadAIRRAndBuildTrie(a1, a2); }
Trie: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x38],RDI MOV dword ptr [RDI],0x4 MOV dword ptr [RDI + 0x4],0x4 MOV byte ptr [RDI + 0x8],0x0 MOV dword ptr [RDI + 0xc],0x20 ADD RDI,0x10 MOV qword ptr [RBP + -0x40],RDI CALL 0x00159ef0 MOV RDI,qword ptr [RBP + -0x38] ADD RDI,0x50 MOV qword ptr [RBP + -0x30],RDI CALL 0x00159f10 LAB_001520ee: MOV EDI,0x108 CALL 0x001095f0 LAB_001520f8: MOV qword ptr [RBP + -0x28],RAX JMP 0x001520fe LAB_001520fe: MOV RDI,qword ptr [RBP + -0x28] XOR ESI,ESI MOV EDX,0x108 CALL 0x00109310 MOV RDI,qword ptr [RBP + -0x28] CALL 0x00159f30 MOV RAX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RBP + -0x38] MOV qword ptr [RDI + 0x48],RAX MOV RSI,qword ptr [RBP + -0x10] LAB_00152127: CALL 0x00152160 LAB_0015212c: JMP 0x0015212e LAB_0015212e: ADD RSP,0x40 POP RBP RET
/* Trie::Trie(std::__cxx11::string const&) */ void __thiscall Trie::Trie(Trie *this,string *param_1) { TrieNode *this_00; *(int4 *)this = 4; *(int4 *)(this + 4) = 4; this[8] = (Trie)0x0; *(int4 *)(this + 0xc) = 0x20; std:: unordered_map<char,std::unordered_map<char,float,std::hash<char>,std::equal_to<char>,std::allocator<std::pair<char_const,float>>>,std::hash<char>,std::equal_to<char>,std::allocator<std::pair<char_const,std::unordered_map<char,float,std::hash<char>,std::equal_to<char>,std::allocator<std::pair<char_const,float>>>>>> ::unordered_map((unordered_map<char,std::unordered_map<char,float,std::hash<char>,std::equal_to<char>,std::allocator<std::pair<char_const,float>>>,std::hash<char>,std::equal_to<char>,std::allocator<std::pair<char_const,std::unordered_map<char,float,std::hash<char>,std::equal_to<char>,std::allocator<std::pair<char_const,float>>>>>> *)(this + 0x10)); std::vector<AIRREntity,std::allocator<AIRREntity>>::vector ((vector<AIRREntity,std::allocator<AIRREntity>> *)(this + 0x50)); /* try { // try from 001520ee to 001520f7 has its CatchHandler @ 00152134 */ this_00 = (TrieNode *)operator_new(0x108); memset(this_00,0,0x108); TrieNode::TrieNode(this_00); *(TrieNode **)(this + 0x48) = this_00; /* try { // try from 00152127 to 0015212b has its CatchHandler @ 00152134 */ LoadAIRRAndBuildTrie(this,param_1); return; }
28,750
Trie::Trie(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
MikePodsytnik[P]TCRtrie/src/Trie.cpp
Trie::Trie(const std::string& dataPath) { root_ = new TrieNode(); LoadAIRRAndBuildTrie(dataPath); }
O1
cpp
Trie::Trie(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rsi, %r14 movq %rdi, %r15 movabsq $0x400000004, %rax # imm = 0x400000004 movq %rax, (%rdi) movb $0x0, 0x8(%rdi) movl $0x20, 0xc(%rdi) leaq 0x10(%rdi), %rbx leaq 0x40(%rdi), %rax movq %rax, 0x10(%rdi) movq $0x1, 0x18(%rdi) xorps %xmm0, %xmm0 movups %xmm0, 0x20(%rdi) movl $0x3f800000, 0x30(%rdi) # imm = 0x3F800000 movups %xmm0, 0x38(%rdi) leaq 0x50(%rdi), %r12 movups %xmm0, 0x50(%rdi) movq $0x0, 0x60(%rdi) movl $0x108, %edi # imm = 0x108 callq 0x7420 movq %rax, %r13 movl $0x108, %edx # imm = 0x108 movq %rax, %rdi xorl %esi, %esi callq 0x7220 movq %r13, 0x48(%r15) movq %r15, %rdi movq %r14, %rsi callq 0x2eaea popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %r14 movq %r12, %rdi callq 0x31974 movq %rbx, %rdi callq 0x31d36 movq %r14, %rdi callq 0x7780 nop
_ZN4TrieC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r15; int push r14; int push r13; int push r12; int push rbx; int mov r14, rsi mov r15, rdi mov rax, 400000004h mov [rdi], rax mov byte ptr [rdi+8], 0 mov dword ptr [rdi+0Ch], 20h ; ' ' lea rbx, [rdi+10h] lea rax, [rdi+40h] mov [rdi+10h], rax mov qword ptr [rdi+18h], 1 xorps xmm0, xmm0 movups xmmword ptr [rdi+20h], xmm0 mov dword ptr [rdi+30h], 3F800000h movups xmmword ptr [rdi+38h], xmm0 lea r12, [rdi+50h] movups xmmword ptr [rdi+50h], xmm0 mov qword ptr [rdi+60h], 0 mov edi, 108h; unsigned __int64 call __Znwm; operator new(ulong) mov r13, rax mov edx, 108h mov rdi, rax xor esi, esi call _memset mov [r15+48h], r13 mov rdi, r15; int mov rsi, r14 call _ZN4Trie20LoadAIRRAndBuildTrieERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Trie::LoadAIRRAndBuildTrie(std::string const&) pop rbx pop r12 pop r13 pop r14 pop r15 retn mov r14, rax mov rdi, r12 call _ZNSt6vectorI10AIRREntitySaIS0_EED2Ev; std::vector<AIRREntity>::~vector() mov rdi, rbx call _ZNSt10_HashtableIcSt4pairIKcSt13unordered_mapIcfSt4hashIcESt8equal_toIcESaIS0_IS1_fEEEESaISA_ENSt8__detail10_Select1stES6_S4_NSC_18_Mod_range_hashingENSC_20_Default_ranged_hashENSC_20_Prime_rehash_policyENSC_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<char,std::pair<char const,std::unordered_map<char,float>>,std::allocator<std::pair<char const,std::unordered_map<char,float>>>,std::__detail::_Select1st,std::equal_to<char>,std::hash<char>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable() mov rdi, r14 call __Unwind_Resume
Trie: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R14,RSI MOV R15,RDI MOV RAX,0x400000004 MOV qword ptr [RDI],RAX MOV byte ptr [RDI + 0x8],0x0 MOV dword ptr [RDI + 0xc],0x20 LEA RBX,[RDI + 0x10] LEA RAX,[RDI + 0x40] MOV qword ptr [RDI + 0x10],RAX MOV qword ptr [RDI + 0x18],0x1 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x20],XMM0 MOV dword ptr [RDI + 0x30],0x3f800000 MOVUPS xmmword ptr [RDI + 0x38],XMM0 LEA R12,[RDI + 0x50] MOVUPS xmmword ptr [RDI + 0x50],XMM0 MOV qword ptr [RDI + 0x60],0x0 LAB_0012ea99: MOV EDI,0x108 CALL 0x00107420 LAB_0012eaa3: MOV R13,RAX MOV EDX,0x108 MOV RDI,RAX XOR ESI,ESI CALL 0x00107220 MOV qword ptr [R15 + 0x48],R13 LAB_0012eab9: MOV RDI,R15 MOV RSI,R14 CALL 0x0012eaea LAB_0012eac4: POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* Trie::Trie(std::__cxx11::string const&) */ void __thiscall Trie::Trie(Trie *this,string *param_1) { void *__s; *(int8 *)this = 0x400000004; this[8] = (Trie)0x0; *(int4 *)(this + 0xc) = 0x20; *(Trie **)(this + 0x10) = this + 0x40; *(int8 *)(this + 0x18) = 1; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int4 *)(this + 0x30) = 0x3f800000; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x50) = 0; *(int8 *)(this + 0x58) = 0; *(int8 *)(this + 0x60) = 0; /* try { // try from 0012ea99 to 0012eaa2 has its CatchHandler @ 0012eace */ __s = operator_new(0x108); memset(__s,0,0x108); *(void **)(this + 0x48) = __s; /* try { // try from 0012eab9 to 0012eac3 has its CatchHandler @ 0012eace */ LoadAIRRAndBuildTrie((string *)this); return; }
28,751
foreach_function(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&, std::function<void (nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)> const&)
llama.cpp/common/chat.cpp
static void foreach_function(const json & tools, const std::function<void(const json &)> & fn) { for (const auto & tool : tools) { if (!tool.contains("type") || tool.at("type") != "function" || !tool.contains("function")) { LOG_INF("Skipping tool without function: %s", tool.dump(2).c_str()); continue; } fn(tool); } }
O3
cpp
foreach_function(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&, std::function<void (nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rsi, (%rsp) movq %rdi, %r14 leaq 0x48(%rsp), %r15 movq %rdi, (%r15) xorps %xmm0, %xmm0 movups %xmm0, 0x8(%r15) movabsq $-0x8000000000000000, %rbx # imm = 0x8000000000000000 movq %rbx, 0x18(%r15) movq %r15, %rdi callq 0xd0064 leaq 0x28(%rsp), %r12 movq %r14, (%r12) xorps %xmm0, %xmm0 movups %xmm0, 0x8(%r12) movq %rbx, 0x18(%r12) movq %r12, %rdi callq 0xd00d6 movq %r15, %rdi movq %r12, %rsi callq 0xce2e2 testb %al, %al jne 0x9cafd leaq 0x48(%rsp), %r14 leaq 0x809ae(%rip), %r15 # 0x11d3bf leaq 0xc9eb8(%rip), %r12 # 0x1668d0 leaq 0x28(%rsp), %r13 movq %r14, %rdi callq 0xaf1c2 movq %rax, %rbp movq %rax, %rdi movq %r15, %rsi callq 0xaf3fe testb %al, %al je 0x9ca7f movq %rbp, %rdi movq %r15, %rsi callq 0xaf460 movq %rax, %rdi leaq 0x808ba(%rip), %rsi # 0x11d306 callq 0xaf8ab testb %al, %al jne 0x9ca7f movq %rbp, %rdi leaq 0x808a7(%rip), %rsi # 0x11d306 callq 0xafbe2 testb %al, %al je 0x9ca7f movq (%rsp), %rdi cmpq $0x0, 0x10(%rdi) je 0x9cb0c movq %rbp, %rsi callq *0x18(%rdi) jmp 0x9cae2 cmpl $0x0, (%r12) js 0x9cae2 callq 0x10ca47 movq %rax, %rbx leaq 0x8(%rsp), %rdi movq %rbp, %rsi movl $0x2, %edx movl $0x20, %ecx xorl %r8d, %r8d xorl %r9d, %r9d callq 0xaf046 movq 0x8(%rsp), %rcx movq %rbx, %rdi movl $0x2, %esi leaq 0x848dd(%rip), %rdx # 0x12139c xorl %eax, %eax callq 0x10cae4 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x9cae2 movq 0x18(%rsp), %rsi incq %rsi callq 0x21170 movq %r14, %rdi callq 0xaf95c movq %r14, %rdi movq %r13, %rsi callq 0xce2e2 testb %al, %al je 0x9ca1d addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x22280 movq %rax, %rbx movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x9cb30 movq 0x18(%rsp), %rsi incq %rsi callq 0x21170 movq %rbx, %rdi callq 0x21af0
_ZL16foreach_functionRKN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEERKSt8functionIFvSF_EE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov [rsp+98h+var_98], rsi mov r14, rdi lea r15, [rsp+98h+var_50] mov [r15], rdi xorps xmm0, xmm0 movups xmmword ptr [r15+8], xmm0 mov rbx, 8000000000000000h mov [r15+18h], rbx mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9set_beginEv; 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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::set_begin(void) lea r12, [rsp+98h+var_70] mov [r12], r14 xorps xmm0, xmm0 movups xmmword ptr [r12+8], xmm0 mov [r12+18h], rbx mov rdi, r12 call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE7set_endEv; 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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::set_end(void) mov rdi, r15 mov rsi, r12 call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_ test al, al jnz loc_9CAFD lea r14, [rsp+98h+var_50] lea r15, aUnknownBufferT+0Fh; "type" lea r12, common_log_verbosity_thold lea r13, [rsp+98h+var_70] loc_9CA1D: mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEdeEv; 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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::operator*(void) mov rbp, rax mov rdi, rax mov rsi, r15 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_ test al, al jz short loc_9CA7F mov rdi, rbp mov rsi, r15 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_ mov rdi, rax lea rsi, aFailedToFindRp_0+1Eh; "function" call _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_ test al, al jnz short loc_9CA7F mov rdi, rbp lea rsi, aFailedToFindRp_0+1Eh; "function" call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_ test al, al jz short loc_9CA7F mov rdi, [rsp+98h+var_98] cmp qword ptr [rdi+10h], 0 jz loc_9CB0C mov rsi, rbp call qword ptr [rdi+18h] jmp short loc_9CAE2 loc_9CA7F: cmp dword ptr [r12], 0 js short loc_9CAE2 call _Z15common_log_mainv; common_log_main(void) mov rbx, rax lea rdi, [rsp+98h+var_90] mov rsi, rbp mov edx, 2 mov ecx, 20h ; ' ' xor r8d, r8d xor r9d, r9d call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dumpEicbNS0_6detail15error_handler_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::dump(int,char,bool,nlohmann::json_abi_v3_11_3::detail::error_handler_t) mov rcx, [rsp+98h+var_90] mov rdi, rbx mov esi, 2 lea rdx, aSkippingToolWi; "Skipping tool without function: %s" xor eax, eax call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) mov rdi, [rsp+98h+var_90]; void * lea rax, [rsp+98h+var_80] cmp rdi, rax jz short loc_9CAE2 mov rsi, [rsp+98h+var_80] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9CAE2: mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv; 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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::operator++(void) mov rdi, r14 mov rsi, r13 call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_ test al, al jz loc_9CA1D loc_9CAFD: add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_9CB0C: call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void) mov rbx, rax mov rdi, [rsp+98h+var_90]; void * lea rax, [rsp+98h+var_80] cmp rdi, rax jz short loc_9CB30 mov rsi, [rsp+98h+var_80] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9CB30: mov rdi, rbx call __Unwind_Resume
long long foreach_function(long long a1, long long a2) { long long result; // rax long long v3; // rbp long long v4; // rax int v5; // ebx int v6; // r8d int v7; // r9d void *v8; // [rsp+8h] [rbp-90h] BYREF long long v9; // [rsp+18h] [rbp-80h] BYREF long long v10; // [rsp+28h] [rbp-70h] BYREF __int128 v11; // [rsp+30h] [rbp-68h] unsigned long long v12; // [rsp+40h] [rbp-58h] long long v13; // [rsp+48h] [rbp-50h] BYREF __int128 v14; // [rsp+50h] [rbp-48h] unsigned long long v15; // [rsp+60h] [rbp-38h] v13 = a1; v14 = 0LL; v15 = 0x8000000000000000LL; 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>::set_begin(&v13); v10 = a1; v11 = 0LL; v12 = 0x8000000000000000LL; 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>::set_end(&v10); for ( result = ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_( &v13, &v10); !(_BYTE)result; result = ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_( &v13, &v10) ) { v3 = 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>::operator*(&v13); if ( (unsigned __int8)ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_( v3, "type") && (v4 = ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_( v3, "type"), !(unsigned __int8)ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_( v4, "function")) && (unsigned __int8)ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_( v3, "function") ) { if ( !*(_QWORD *)(a2 + 16) ) std::__throw_bad_function_call(); (*(void ( **)(long long, long long))(a2 + 24))(a2, v3); } else if ( common_log_verbosity_thold >= 0 ) { v5 = common_log_main(); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::dump( (unsigned int)&v8, v3, 2, 32, 0, 0); common_log_add(v5, 2, (unsigned int)"Skipping tool without function: %s", (_DWORD)v8, v6, v7); if ( v8 != &v9 ) operator delete(v8, v9 + 1); } 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>::operator++(&v13); } return result; }
foreach_function: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV qword ptr [RSP],RSI MOV R14,RDI LEA R15,[RSP + 0x48] MOV qword ptr [R15],RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [R15 + 0x8],XMM0 MOV RBX,-0x8000000000000000 MOV qword ptr [R15 + 0x18],RBX MOV RDI,R15 CALL 0x001d0064 LEA R12,[RSP + 0x28] MOV qword ptr [R12],R14 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R12 + 0x8],XMM0 MOV qword ptr [R12 + 0x18],RBX MOV RDI,R12 CALL 0x001d00d6 MOV RDI,R15 MOV RSI,R12 CALL 0x001ce2e2 TEST AL,AL JNZ 0x0019cafd LEA R14,[RSP + 0x48] LEA R15,[0x21d3bf] LEA R12,[0x2668d0] LEA R13,[RSP + 0x28] LAB_0019ca1d: MOV RDI,R14 CALL 0x001af1c2 MOV RBP,RAX MOV RDI,RAX MOV RSI,R15 CALL 0x001af3fe TEST AL,AL JZ 0x0019ca7f MOV RDI,RBP MOV RSI,R15 CALL 0x001af460 MOV RDI,RAX LEA RSI,[0x21d306] CALL 0x001af8ab TEST AL,AL JNZ 0x0019ca7f MOV RDI,RBP LEA RSI,[0x21d306] CALL 0x001afbe2 TEST AL,AL JZ 0x0019ca7f MOV RDI,qword ptr [RSP] CMP qword ptr [RDI + 0x10],0x0 JZ 0x0019cb0c MOV RSI,RBP CALL qword ptr [RDI + 0x18] JMP 0x0019cae2 LAB_0019ca7f: CMP dword ptr [R12],0x0 JS 0x0019cae2 CALL 0x0020ca47 MOV RBX,RAX LEA RDI,[RSP + 0x8] MOV RSI,RBP MOV EDX,0x2 MOV ECX,0x20 XOR R8D,R8D XOR R9D,R9D CALL 0x001af046 MOV RCX,qword ptr [RSP + 0x8] LAB_0019cab0: MOV RDI,RBX MOV ESI,0x2 LEA RDX,[0x22139c] XOR EAX,EAX CALL 0x0020cae4 LAB_0019cac6: MOV RDI,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x0019cae2 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00121170 LAB_0019cae2: MOV RDI,R14 CALL 0x001af95c MOV RDI,R14 MOV RSI,R13 CALL 0x001ce2e2 TEST AL,AL JZ 0x0019ca1d LAB_0019cafd: ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0019cb0c: CALL 0x00122280
/* foreach_function(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&, std::function<void (nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&)> const&) */ void foreach_function(basic_json *param_1,function *param_2) { char cVar1; int8 uVar2; int8 uVar3; long *local_90 [2]; long local_80 [2]; basic_json *local_70; int8 local_68; int8 uStack_60; int8 local_58; basic_json *local_50; int8 local_48; int8 uStack_40; int8 local_38; local_48 = 0; uStack_40 = 0; local_38 = 0x8000000000000000; local_50 = param_1; 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>const> ::set_begin((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>const> *)&local_50); local_68 = 0; uStack_60 = 0; local_58 = 0x8000000000000000; local_70 = param_1; 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>const> ::set_end((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>const> *)&local_70); cVar1 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_ ((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>const> *)&local_50, (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>const> *)&local_70); if (cVar1 == '\0') { do { uVar2 = 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>const> ::operator*((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>const> *)&local_50); cVar1 = _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_ (uVar2,"type"); if (cVar1 == '\0') { LAB_0019ca7f: if (-1 < common_log_verbosity_thold) { uVar3 = common_log_main(); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::dump(local_90,uVar2,2,0x20,0,0); /* try { // try from 0019cab0 to 0019cac5 has its CatchHandler @ 0019cb11 */ common_log_add(uVar3,2,"Skipping tool without function: %s",local_90[0]); if (local_90[0] != local_80) { operator_delete(local_90[0],local_80[0] + 1); } } } else { uVar3 = _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_ (uVar2,"type"); cVar1 = _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_ (uVar3,"function"); if (cVar1 != '\0') goto LAB_0019ca7f; cVar1 = _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_ (uVar2,"function"); if (cVar1 == '\0') goto LAB_0019ca7f; if (*(long *)(param_2 + 0x10) == 0) { /* WARNING: Subroutine does not return */ std::__throw_bad_function_call(); } (**(code **)(param_2 + 0x18))(param_2,uVar2); } 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>const> ::operator++((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>const> *)&local_50); cVar1 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_ ((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>const> *)&local_50,&local_70); } while (cVar1 == '\0'); } return; }
28,752
Settings::getMode[abi:cxx11]() const
666mxvbee[P]BattleShip/lib/Settings/Settings.cpp
std::string Settings::getMode() const { std::lock_guard<std::mutex> lock(settings_mutex); return mode; }
O1
cpp
Settings::getMode[abi:cxx11]() const: pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movq %rsi, %rdi callq 0x5500 testl %eax, %eax jne 0x63cd leaq 0x10(%r14), %rax movq %rax, (%r14) movq 0x28(%rbx), %rsi movq 0x30(%rbx), %rdx addq %rsi, %rdx movq %r14, %rdi callq 0x763e movq %rbx, %rdi callq 0x52d0 movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r14 retq movl %eax, %edi callq 0x5260 movq %rax, %r14 movq %rbx, %rdi callq 0x52d0 movq %r14, %rdi callq 0x55e0 nop
_ZNK8Settings7getModeB5cxx11Ev: push r14 push rbx push rax mov rbx, rsi mov r14, rdi mov rdi, rsi call _pthread_mutex_lock test eax, eax jnz short loc_63CD lea rax, [r14+10h] mov [r14], rax mov rsi, [rbx+28h] mov rdx, [rbx+30h] add rdx, rsi mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov rdi, rbx call _pthread_mutex_unlock mov rax, r14 add rsp, 8 pop rbx pop r14 retn loc_63CD: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int) mov r14, rax mov rdi, rbx call _pthread_mutex_unlock mov rdi, r14 call __Unwind_Resume
_QWORD * Settings::getMode[abi:cxx11](_QWORD *a1, long long a2) { int v2; // eax v2 = pthread_mutex_lock(a2); if ( v2 ) std::__throw_system_error(v2); *a1 = a1 + 2; std::string::_M_construct<char *>(a1, *(_QWORD *)(a2 + 40), *(_QWORD *)(a2 + 40) + *(_QWORD *)(a2 + 48)); pthread_mutex_unlock(a2); return a1; }
getMode[abi:cxx11]: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI MOV RDI,RSI CALL 0x00105500 TEST EAX,EAX JNZ 0x001063cd LEA RAX,[R14 + 0x10] MOV qword ptr [R14],RAX MOV RSI,qword ptr [RBX + 0x28] MOV RDX,qword ptr [RBX + 0x30] ADD RDX,RSI LAB_001063b2: MOV RDI,R14 CALL 0x0010763e LAB_001063ba: MOV RDI,RBX CALL 0x001052d0 MOV RAX,R14 ADD RSP,0x8 POP RBX POP R14 RET LAB_001063cd: MOV EDI,EAX CALL 0x00105260
/* Settings::getMode[abi:cxx11]() const */ void Settings::getMode_abi_cxx11_(void) { int iVar1; pthread_mutex_t *in_RSI; long *in_RDI; iVar1 = pthread_mutex_lock(in_RSI); if (iVar1 == 0) { *in_RDI = (long)(in_RDI + 2); /* try { // try from 001063b2 to 001063b9 has its CatchHandler @ 001063d4 */ std::__cxx11::string::_M_construct<char*>(); pthread_mutex_unlock(in_RSI); return; } /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar1); }
28,753
Settings::getMode[abi:cxx11]() const
666mxvbee[P]BattleShip/lib/Settings/Settings.cpp
std::string Settings::getMode() const { std::lock_guard<std::mutex> lock(settings_mutex); return mode; }
O3
cpp
Settings::getMode[abi:cxx11]() const: pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movq %rsi, %rdi callq 0x5500 testl %eax, %eax jne 0x6381 leaq 0x10(%r14), %rax movq %rax, (%r14) movq 0x28(%rbx), %rsi movq 0x30(%rbx), %rdx addq %rsi, %rdx movq %r14, %rdi callq 0x75fc movq %rbx, %rdi callq 0x52d0 movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r14 retq movl %eax, %edi callq 0x5260 movq %rax, %r14 movq %rbx, %rdi callq 0x52d0 movq %r14, %rdi callq 0x55e0 nop
_ZNK8Settings7getModeB5cxx11Ev: push r14 push rbx push rax mov rbx, rsi mov r14, rdi mov rdi, rsi call _pthread_mutex_lock test eax, eax jnz short loc_6381 lea rax, [r14+10h] mov [r14], rax mov rsi, [rbx+28h] mov rdx, [rbx+30h] add rdx, rsi mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov rdi, rbx call _pthread_mutex_unlock mov rax, r14 add rsp, 8 pop rbx pop r14 retn loc_6381: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int) mov r14, rax mov rdi, rbx call _pthread_mutex_unlock mov rdi, r14 call __Unwind_Resume
_QWORD * Settings::getMode[abi:cxx11](_QWORD *a1, long long a2) { int v2; // eax v2 = pthread_mutex_lock(a2); if ( v2 ) std::__throw_system_error(v2); *a1 = a1 + 2; std::string::_M_construct<char *>(a1, *(_QWORD *)(a2 + 40), *(_QWORD *)(a2 + 40) + *(_QWORD *)(a2 + 48)); pthread_mutex_unlock(a2); return a1; }
getMode[abi:cxx11]: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI MOV RDI,RSI CALL 0x00105500 TEST EAX,EAX JNZ 0x00106381 LEA RAX,[R14 + 0x10] MOV qword ptr [R14],RAX MOV RSI,qword ptr [RBX + 0x28] MOV RDX,qword ptr [RBX + 0x30] ADD RDX,RSI LAB_00106366: MOV RDI,R14 CALL 0x001075fc LAB_0010636e: MOV RDI,RBX CALL 0x001052d0 MOV RAX,R14 ADD RSP,0x8 POP RBX POP R14 RET LAB_00106381: MOV EDI,EAX CALL 0x00105260
/* Settings::getMode[abi:cxx11]() const */ void Settings::getMode_abi_cxx11_(void) { int iVar1; pthread_mutex_t *in_RSI; long *in_RDI; iVar1 = pthread_mutex_lock(in_RSI); if (iVar1 == 0) { *in_RDI = (long)(in_RDI + 2); /* try { // try from 00106366 to 0010636d has its CatchHandler @ 00106388 */ std::__cxx11::string::_M_construct<char*>(); pthread_mutex_unlock(in_RSI); return; } /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar1); }
28,754
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer(char*, int, int, int, int)
monkey531[P]llama/common/json.hpp
inline char* format_buffer(char* buf, int len, int decimal_exponent, int min_exp, int max_exp) { JSON_ASSERT(min_exp < 0); JSON_ASSERT(max_exp > 0); const int k = len; const int n = len + decimal_exponent; // v = buf * 10^(n-k) // k is the length of the buffer (number of decimal digits) // n is the position of the decimal point relative to the start of the buffer. if (k <= n && n <= max_exp) { // digits[000] // len <= max_exp + 2 std::memset(buf + k, '0', static_cast<size_t>(n) - static_cast<size_t>(k)); // Make it look like a floating-point number (#362, #378) buf[n + 0] = '.'; buf[n + 1] = '0'; return buf + (static_cast<size_t>(n) + 2); } if (0 < n && n <= max_exp) { // dig.its // len <= max_digits10 + 1 JSON_ASSERT(k > n); std::memmove(buf + (static_cast<size_t>(n) + 1), buf + n, static_cast<size_t>(k) - static_cast<size_t>(n)); buf[n] = '.'; return buf + (static_cast<size_t>(k) + 1U); } if (min_exp < n && n <= 0) { // 0.[000]digits // len <= 2 + (-min_exp - 1) + max_digits10 std::memmove(buf + (2 + static_cast<size_t>(-n)), buf, static_cast<size_t>(k)); buf[0] = '0'; buf[1] = '.'; std::memset(buf + 2, '0', static_cast<size_t>(-n)); return buf + (2U + static_cast<size_t>(-n) + static_cast<size_t>(k)); } if (k == 1) { // dE+123 // len <= 1 + 5 buf += 1; } else { // d.igitsE+123 // len <= max_digits10 + 1 + 5 std::memmove(buf + 2, buf + 1, static_cast<size_t>(k) - 1); buf[1] = '.'; buf += 1 + static_cast<size_t>(k); } *buf++ = 'e'; return append_exponent(buf, n - 1); }
O1
cpp
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer(char*, int, int, int, int): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax testl %ecx, %ecx jns 0x81432 testl %r8d, %r8d jle 0x8144e movq %rdi, %rbx leal (%rdx,%rsi), %r14d testl %edx, %edx sets %al cmpl %r8d, %r14d setg %dil orb %al, %dil je 0x812ec cmpl %r8d, %r14d setg %al testl %r14d, %r14d setle %dil orb %al, %dil je 0x8131a cmpl %ecx, %r14d setle %al testl %r14d, %r14d setg %cl orb %al, %cl jne 0x81354 negl %r14d leaq (%rbx,%r14), %r15 addq $0x2, %r15 movslq %esi, %r12 movq %r15, %rdi movq %rbx, %rsi movq %r12, %rdx callq 0x1ac20 movw $0x2e30, (%rbx) # imm = 0x2E30 addq $0x2, %rbx movq %rbx, %rdi movl $0x30, %esi movq %r14, %rdx callq 0x1a410 addq %r12, %r15 jmp 0x81423 movslq %esi, %rax leaq (%rbx,%rax), %rdi movslq %r14d, %r14 movq %r14, %rdx subq %rax, %rdx movl $0x30, %esi callq 0x1a410 leaq (%rbx,%r14), %r15 addq $0x2, %r15 movw $0x302e, -0x2(%r15) # imm = 0x302E jmp 0x81423 testl %edx, %edx jns 0x8146f movl %r14d, %ecx leaq (%rbx,%rcx), %rax leaq (%rbx,%rcx), %r14 incq %r14 movl %esi, %r15d movq %r15, %rdx subq %rcx, %rdx movq %r14, %rdi movq %rax, %rsi callq 0x1ac20 movb $0x2e, -0x1(%r14) addq %rbx, %r15 incq %r15 jmp 0x81423 cmpl $0x1, %esi je 0x81377 leaq 0x2(%rbx), %rdi leaq 0x1(%rbx), %rax movslq %esi, %r15 leaq -0x1(%r15), %rdx movq %rax, %rsi callq 0x1ac20 movb $0x2e, 0x1(%rbx) addq %r15, %rbx movb $0x65, 0x1(%rbx) cmpl $0xfffffc19, %r14d # imm = 0xFFFFFC19 jle 0x8148b cmpl $0x3e9, %r14d # imm = 0x3E9 jge 0x814a7 leal -0x1(%r14), %ecx testl %r14d, %r14d setle %dl addb %dl, %dl addb $0x2b, %dl movl %ecx, %eax negl %eax cmovsl %ecx, %eax movb %dl, 0x2(%rbx) cmpl $0x9, %eax ja 0x813b9 movb $0x30, 0x3(%rbx) jmp 0x813dc movl %eax, %ecx cmpl $0x63, %eax ja 0x813e7 movl $0xcccccccd, %edx # imm = 0xCCCCCCCD imulq %rcx, %rdx shrq $0x23, %rdx movl %edx, %ecx orb $0x30, %cl movb %cl, 0x3(%rbx) addl %edx, %edx leal (%rdx,%rdx,4), %ecx subl %ecx, %eax orb $0x30, %al movb %al, 0x4(%rbx) addq $0x5, %rbx jmp 0x81420 imulq $0x51eb851f, %rcx, %rcx # imm = 0x51EB851F shrq $0x25, %rcx leal 0x30(%rcx), %edx movb %dl, 0x3(%rbx) imull $0x64, %ecx, %ecx subl %ecx, %eax imulq $0x1999999a, %rax, %rcx # imm = 0x1999999A shrq $0x20, %rcx movl %ecx, %edx orb $0x30, %dl movb %dl, 0x4(%rbx) addl %ecx, %ecx leal (%rcx,%rcx,4), %ecx subl %ecx, %eax orb $0x30, %al movb %al, 0x5(%rbx) addq $0x6, %rbx movq %rbx, %r15 movq %r15, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq leaq 0x310b9(%rip), %rdi # 0xb24f2 leaq 0x2e52c(%rip), %rdx # 0xaf96c leaq 0x33ea2(%rip), %rcx # 0xb52e9 movl $0x45e3, %esi # imm = 0x45E3 jmp 0x81468 leaq 0x3109d(%rip), %rdi # 0xb24f2 leaq 0x2e510(%rip), %rdx # 0xaf96c leaq 0x33e92(%rip), %rcx # 0xb52f5 movl $0x45e4, %esi # imm = 0x45E4 xorl %eax, %eax callq 0x1ac70 leaq 0x3107c(%rip), %rdi # 0xb24f2 leaq 0x2e4ef(%rip), %rdx # 0xaf96c leaq 0x33e7d(%rip), %rcx # 0xb5301 movl $0x45fe, %esi # imm = 0x45FE jmp 0x81468 leaq 0x31060(%rip), %rdi # 0xb24f2 leaq 0x2e4d3(%rip), %rdx # 0xaf96c leaq 0x33e67(%rip), %rcx # 0xb5307 movl $0x45ae, %esi # imm = 0x45AE jmp 0x81468 leaq 0x31044(%rip), %rdi # 0xb24f2 leaq 0x2e4b7(%rip), %rdx # 0xaf96c leaq 0x33e55(%rip), %rcx # 0xb5311 movl $0x45af, %esi # imm = 0x45AF jmp 0x81468
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl13format_bufferEPciiii: push r15 push r14 push r12 push rbx push rax test ecx, ecx jns loc_81432 test r8d, r8d jle loc_8144E mov rbx, rdi lea r14d, [rdx+rsi] test edx, edx sets al cmp r14d, r8d setnle dil or dil, al jz short loc_812EC cmp r14d, r8d setnle al test r14d, r14d setle dil or dil, al jz short loc_8131A cmp r14d, ecx setle al test r14d, r14d setnle cl or cl, al jnz loc_81354 neg r14d lea r15, [rbx+r14] add r15, 2 movsxd r12, esi mov rdi, r15 mov rsi, rbx mov rdx, r12 call _memmove mov word ptr [rbx], 2E30h add rbx, 2 mov rdi, rbx mov esi, 30h ; '0' mov rdx, r14 call _memset add r15, r12 jmp loc_81423 loc_812EC: movsxd rax, esi lea rdi, [rbx+rax] movsxd r14, r14d mov rdx, r14 sub rdx, rax mov esi, 30h ; '0' call _memset lea r15, [rbx+r14] add r15, 2 mov word ptr [r15-2], 302Eh jmp loc_81423 loc_8131A: test edx, edx jns loc_8146F mov ecx, r14d lea rax, [rbx+rcx] lea r14, [rbx+rcx] inc r14 mov r15d, esi mov rdx, r15 sub rdx, rcx mov rdi, r14 mov rsi, rax call _memmove mov byte ptr [r14-1], 2Eh ; '.' add r15, rbx inc r15 jmp loc_81423 loc_81354: cmp esi, 1 jz short loc_81377 lea rdi, [rbx+2] lea rax, [rbx+1] movsxd r15, esi lea rdx, [r15-1] mov rsi, rax call _memmove mov byte ptr [rbx+1], 2Eh ; '.' add rbx, r15 loc_81377: mov byte ptr [rbx+1], 65h ; 'e' cmp r14d, 0FFFFFC19h jle loc_8148B cmp r14d, 3E9h jge loc_814A7 lea ecx, [r14-1] test r14d, r14d setle dl add dl, dl add dl, 2Bh ; '+' mov eax, ecx neg eax cmovs eax, ecx mov [rbx+2], dl cmp eax, 9 ja short loc_813B9 mov byte ptr [rbx+3], 30h ; '0' jmp short loc_813DC loc_813B9: mov ecx, eax cmp eax, 63h ; 'c' ja short loc_813E7 mov edx, 0CCCCCCCDh imul rdx, rcx shr rdx, 23h mov ecx, edx or cl, 30h mov [rbx+3], cl add edx, edx lea ecx, [rdx+rdx*4] sub eax, ecx loc_813DC: or al, 30h mov [rbx+4], al add rbx, 5 jmp short loc_81420 loc_813E7: imul rcx, 51EB851Fh shr rcx, 25h lea edx, [rcx+30h] mov [rbx+3], dl imul ecx, 64h ; 'd' sub eax, ecx imul rcx, rax, 1999999Ah shr rcx, 20h mov edx, ecx or dl, 30h mov [rbx+4], dl add ecx, ecx lea ecx, [rcx+rcx*4] sub eax, ecx or al, 30h mov [rbx+5], al add rbx, 6 loc_81420: mov r15, rbx loc_81423: mov rax, r15 add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn loc_81432: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aMinExp0; "min_exp < 0" mov esi, 45E3h jmp short loc_81468 loc_8144E: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aMaxExp0; "max_exp > 0" mov esi, 45E4h loc_81468: xor eax, eax call _ggml_abort loc_8146F: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aKN; "k > n" mov esi, 45FEh jmp short loc_81468 loc_8148B: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aE1000; "e > -1000" mov esi, 45AEh jmp short loc_81468 loc_814A7: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aE1000_0; "e < 1000" mov esi, 45AFh jmp short loc_81468
char * nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer( nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this, char *a2, int a3, int a4, int a5) { nlohmann::json_abi_v3_11_3::detail::dtoa_impl *v5; // rbx int v6; // r14d long long v7; // r14 char *v8; // r15 char *v9; // r14 unsigned int v10; // eax long long v12; // rax if ( a4 >= 0 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17891LL, "GGML_ASSERT(%s) failed", "min_exp < 0"); goto LABEL_26; } if ( a5 <= 0 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17892LL, "GGML_ASSERT(%s) failed", "max_exp > 0"); goto LABEL_26; } v5 = this; v6 = a3 + (_DWORD)a2; if ( a3 >= 0 && a3 + (int)a2 <= a5 ) { memset((char *)this + (int)a2, 48LL, v6 - (long long)(int)a2); v8 = (char *)this + v6 + 2; *(_WORD *)((char *)this + v6) = 12334; return v8; } if ( v6 <= a5 && v6 > 0 ) { if ( a3 < 0 ) { v9 = (char *)this + (unsigned int)v6 + 1; memmove(v9); *(v9 - 1) = 46; return (char *)this + (unsigned int)a2 + 1; } goto LABEL_26; } if ( v6 <= a4 || v6 > 0 ) { if ( (_DWORD)a2 != 1 ) { memmove((char *)this + 2); *((_BYTE *)this + 1) = 46; v5 = (nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)((char *)this + (int)a2); } *((_BYTE *)v5 + 1) = 101; if ( v6 <= -999 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17838LL, "GGML_ASSERT(%s) failed", "e > -1000"); } else { if ( v6 < 1001 ) { v10 = 1 - v6; if ( 1 - v6 < 0 ) v10 = v6 - 1; *((_BYTE *)v5 + 2) = 2 * (v6 <= 0) + 43; if ( v10 > 9 ) { if ( v10 > 0x63 ) { *((_BYTE *)v5 + 3) = v10 / 0x64 + 48; v12 = v10 % 0x64; *((_BYTE *)v5 + 4) = ((unsigned long long)(429496730 * v12) >> 32) | 0x30; *((_BYTE *)v5 + 5) = (v12 - 10 * ((unsigned long long)(429496730 * v12) >> 32)) | 0x30; return (char *)v5 + 6; } *((_BYTE *)v5 + 3) = (v10 / 0xA) | 0x30; v10 %= 0xAu; } else { *((_BYTE *)v5 + 3) = 48; } *((_BYTE *)v5 + 4) = v10 | 0x30; return (char *)v5 + 5; } ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17839LL, "GGML_ASSERT(%s) failed", "e < 1000"); } while ( 1 ) LABEL_26: ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17918LL, "GGML_ASSERT(%s) failed", "k > n"); } v7 = (unsigned int)-v6; memmove((char *)this + v7 + 2); *(_WORD *)this = 11824; memset((char *)this + 2, 48LL, v7); return (char *)this + v7 + (int)a2 + 2; }
format_buffer: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX TEST ECX,ECX JNS 0x00181432 TEST R8D,R8D JLE 0x0018144e MOV RBX,RDI LEA R14D,[RDX + RSI*0x1] TEST EDX,EDX SETS AL CMP R14D,R8D SETG DIL OR DIL,AL JZ 0x001812ec CMP R14D,R8D SETG AL TEST R14D,R14D SETLE DIL OR DIL,AL JZ 0x0018131a CMP R14D,ECX SETLE AL TEST R14D,R14D SETG CL OR CL,AL JNZ 0x00181354 NEG R14D LEA R15,[RBX + R14*0x1] ADD R15,0x2 MOVSXD R12,ESI MOV RDI,R15 MOV RSI,RBX MOV RDX,R12 CALL 0x0011ac20 MOV word ptr [RBX],0x2e30 ADD RBX,0x2 MOV RDI,RBX MOV ESI,0x30 MOV RDX,R14 CALL 0x0011a410 ADD R15,R12 JMP 0x00181423 LAB_001812ec: MOVSXD RAX,ESI LEA RDI,[RBX + RAX*0x1] MOVSXD R14,R14D MOV RDX,R14 SUB RDX,RAX MOV ESI,0x30 CALL 0x0011a410 LEA R15,[RBX + R14*0x1] ADD R15,0x2 MOV word ptr [R15 + -0x2],0x302e JMP 0x00181423 LAB_0018131a: TEST EDX,EDX JNS 0x0018146f MOV ECX,R14D LEA RAX,[RBX + RCX*0x1] LEA R14,[RBX + RCX*0x1] INC R14 MOV R15D,ESI MOV RDX,R15 SUB RDX,RCX MOV RDI,R14 MOV RSI,RAX CALL 0x0011ac20 MOV byte ptr [R14 + -0x1],0x2e ADD R15,RBX INC R15 JMP 0x00181423 LAB_00181354: CMP ESI,0x1 JZ 0x00181377 LEA RDI,[RBX + 0x2] LEA RAX,[RBX + 0x1] MOVSXD R15,ESI LEA RDX,[R15 + -0x1] MOV RSI,RAX CALL 0x0011ac20 MOV byte ptr [RBX + 0x1],0x2e ADD RBX,R15 LAB_00181377: MOV byte ptr [RBX + 0x1],0x65 CMP R14D,0xfffffc19 JLE 0x0018148b CMP R14D,0x3e9 JGE 0x001814a7 LEA ECX,[R14 + -0x1] TEST R14D,R14D SETLE DL ADD DL,DL ADD DL,0x2b MOV EAX,ECX NEG EAX CMOVS EAX,ECX MOV byte ptr [RBX + 0x2],DL CMP EAX,0x9 JA 0x001813b9 MOV byte ptr [RBX + 0x3],0x30 JMP 0x001813dc LAB_001813b9: MOV ECX,EAX CMP EAX,0x63 JA 0x001813e7 MOV EDX,0xcccccccd IMUL RDX,RCX SHR RDX,0x23 MOV ECX,EDX OR CL,0x30 MOV byte ptr [RBX + 0x3],CL ADD EDX,EDX LEA ECX,[RDX + RDX*0x4] SUB EAX,ECX LAB_001813dc: OR AL,0x30 MOV byte ptr [RBX + 0x4],AL ADD RBX,0x5 JMP 0x00181420 LAB_001813e7: IMUL RCX,RCX,0x51eb851f SHR RCX,0x25 LEA EDX,[RCX + 0x30] MOV byte ptr [RBX + 0x3],DL IMUL ECX,ECX,0x64 SUB EAX,ECX IMUL RCX,RAX,0x1999999a SHR RCX,0x20 MOV EDX,ECX OR DL,0x30 MOV byte ptr [RBX + 0x4],DL ADD ECX,ECX LEA ECX,[RCX + RCX*0x4] SUB EAX,ECX OR AL,0x30 MOV byte ptr [RBX + 0x5],AL ADD RBX,0x6 LAB_00181420: MOV R15,RBX LAB_00181423: MOV RAX,R15 ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET LAB_00181432: LEA RDI,[0x1b24f2] LEA RDX,[0x1af96c] LEA RCX,[0x1b52e9] MOV ESI,0x45e3 JMP 0x00181468 LAB_0018144e: LEA RDI,[0x1b24f2] LEA RDX,[0x1af96c] LEA RCX,[0x1b52f5] MOV ESI,0x45e4 LAB_00181468: XOR EAX,EAX CALL 0x0011ac70 LAB_0018146f: LEA RDI,[0x1b24f2] LEA RDX,[0x1af96c] LEA RCX,[0x1b5301] MOV ESI,0x45fe JMP 0x00181468 LAB_0018148b: LEA RDI,[0x1b24f2] LEA RDX,[0x1af96c] LEA RCX,[0x1b5307] MOV ESI,0x45ae JMP 0x00181468 LAB_001814a7: LEA RDI,[0x1b24f2] LEA RDX,[0x1af96c] LEA RCX,[0x1b5311] MOV ESI,0x45af JMP 0x00181468
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer(char*, int, int, int, int) */ char * nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer (char *param_1,int param_2,int param_3,int param_4,int param_5) { uint uVar1; uint uVar2; ulong uVar3; char *pcVar4; byte bVar5; int8 uVar6; uint uVar7; if (param_4 < 0) { if (param_5 < 1) { pcVar4 = "max_exp > 0"; uVar6 = 0x45e4; } else { uVar7 = param_3 + param_2; if ((int)uVar7 <= param_5 && -1 < param_3) { memset(param_1 + param_2,0x30,(long)(int)uVar7 - (long)param_2); pcVar4 = param_1 + (int)uVar7; pcVar4[0] = '.'; pcVar4[1] = '0'; return pcVar4 + 2; } if ((int)uVar7 < 1 || param_5 < (int)uVar7) { if ((int)uVar7 < 1 && param_4 < (int)uVar7) { memmove(param_1 + (ulong)-uVar7 + 2,param_1,(long)param_2); param_1[0] = '0'; param_1[1] = '.'; memset(param_1 + 2,0x30,(ulong)-uVar7); return param_1 + (ulong)-uVar7 + 2 + param_2; } if (param_2 != 1) { memmove(param_1 + 2,param_1 + 1,(long)param_2 - 1); param_1[1] = '.'; param_1 = param_1 + param_2; } param_1[1] = 'e'; if ((int)uVar7 < -0x3e6) { pcVar4 = "e > -1000"; uVar6 = 0x45ae; } else { if ((int)uVar7 < 0x3e9) { uVar1 = uVar7 - 1; uVar2 = -uVar1; if (0 < (int)uVar1) { uVar2 = uVar1; } param_1[2] = ((int)uVar7 < 1) * '\x02' + '+'; if (uVar2 < 10) { param_1[3] = '0'; } else { if (99 < uVar2) { param_1[3] = (char)(uVar2 / 100) + '0'; bVar5 = (byte)((ulong)(uVar2 % 100) * 0x1999999a >> 0x20); param_1[4] = bVar5 | 0x30; param_1[5] = (char)(uVar2 % 100) + bVar5 * -10 | 0x30; return param_1 + 6; } param_1[3] = (byte)((ulong)uVar2 / 10) | 0x30; uVar2 = uVar2 + (uVar2 / 10 + uVar2 / 10) * -5; } param_1[4] = (byte)uVar2 | 0x30; return param_1 + 5; } pcVar4 = "e < 1000"; uVar6 = 0x45af; } } else { if (param_3 < 0) { uVar3 = (ulong)uVar7; memmove(param_1 + uVar3 + 1,param_1 + uVar3,(uint)param_2 - uVar3); param_1[uVar3] = '.'; return param_1 + (ulong)(uint)param_2 + 1; } pcVar4 = "k > n"; uVar6 = 0x45fe; } } } else { pcVar4 = "min_exp < 0"; uVar6 = 0x45e3; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar6, "GGML_ASSERT(%s) failed",pcVar4); }
28,755
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer(char*, int, int, int, int)
monkey531[P]llama/common/json.hpp
inline char* format_buffer(char* buf, int len, int decimal_exponent, int min_exp, int max_exp) { JSON_ASSERT(min_exp < 0); JSON_ASSERT(max_exp > 0); const int k = len; const int n = len + decimal_exponent; // v = buf * 10^(n-k) // k is the length of the buffer (number of decimal digits) // n is the position of the decimal point relative to the start of the buffer. if (k <= n && n <= max_exp) { // digits[000] // len <= max_exp + 2 std::memset(buf + k, '0', static_cast<size_t>(n) - static_cast<size_t>(k)); // Make it look like a floating-point number (#362, #378) buf[n + 0] = '.'; buf[n + 1] = '0'; return buf + (static_cast<size_t>(n) + 2); } if (0 < n && n <= max_exp) { // dig.its // len <= max_digits10 + 1 JSON_ASSERT(k > n); std::memmove(buf + (static_cast<size_t>(n) + 1), buf + n, static_cast<size_t>(k) - static_cast<size_t>(n)); buf[n] = '.'; return buf + (static_cast<size_t>(k) + 1U); } if (min_exp < n && n <= 0) { // 0.[000]digits // len <= 2 + (-min_exp - 1) + max_digits10 std::memmove(buf + (2 + static_cast<size_t>(-n)), buf, static_cast<size_t>(k)); buf[0] = '0'; buf[1] = '.'; std::memset(buf + 2, '0', static_cast<size_t>(-n)); return buf + (2U + static_cast<size_t>(-n) + static_cast<size_t>(k)); } if (k == 1) { // dE+123 // len <= 1 + 5 buf += 1; } else { // d.igitsE+123 // len <= max_digits10 + 1 + 5 std::memmove(buf + 2, buf + 1, static_cast<size_t>(k) - 1); buf[1] = '.'; buf += 1 + static_cast<size_t>(k); } *buf++ = 'e'; return append_exponent(buf, n - 1); }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer(char*, int, int, int, int): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax testl %ecx, %ecx jns 0x7134c testl %r8d, %r8d jle 0x71368 movq %rdi, %rbx leal (%rdx,%rsi), %r14d testl %edx, %edx sets %al cmpl %r8d, %r14d setg %dil orb %al, %dil je 0x7129b cmpl %r8d, %r14d setg %al testl %r14d, %r14d setle %dil orb %al, %dil je 0x712c4 testl %r14d, %r14d setg %al cmpl %ecx, %r14d setle %cl orb %al, %cl jne 0x71308 negl %r14d leaq (%rbx,%r14), %r15 addq $0x2, %r15 movslq %esi, %r12 movq %r15, %rdi movq %rbx, %rsi movq %r12, %rdx callq 0x22c30 movw $0x2e30, (%rbx) # imm = 0x2E30 addq $0x2, %rbx pushq $0x30 popq %rsi movq %rbx, %rdi movq %r14, %rdx callq 0x22430 addq %r12, %r15 jmp 0x712f9 movslq %esi, %rax leaq (%rbx,%rax), %rdi movslq %r14d, %r14 movq %r14, %rdx subq %rax, %rdx pushq $0x30 popq %rsi callq 0x22430 leaq (%rbx,%r14), %r15 addq $0x2, %r15 movw $0x302e, -0x2(%r15) # imm = 0x302E jmp 0x712f9 testl %edx, %edx jns 0x71389 movl %r14d, %ecx leaq (%rbx,%rcx), %rax leaq (%rbx,%rcx), %r14 incq %r14 movl %esi, %r15d movq %r15, %rdx subq %rcx, %rdx movq %r14, %rdi movq %rax, %rsi callq 0x22c30 movb $0x2e, -0x1(%r14) addq %rbx, %r15 incq %r15 movq %r15, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq cmpl $0x1, %esi je 0x7132b leaq 0x2(%rbx), %rdi leaq 0x1(%rbx), %rax movslq %esi, %r15 leaq -0x1(%r15), %rdx movq %rax, %rsi callq 0x22c30 movb $0x2e, 0x1(%rbx) addq %r15, %rbx movb $0x65, 0x1(%rbx) addq $0x2, %rbx decl %r14d movq %rbx, %rdi movl %r14d, %esi addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmp 0x71ca1 leaq 0x2315f(%rip), %rdi # 0x944b2 leaq 0x20615(%rip), %rdx # 0x9196f leaq 0x25f93(%rip), %rcx # 0x972f4 movl $0x45e3, %esi # imm = 0x45E3 jmp 0x71382 leaq 0x23143(%rip), %rdi # 0x944b2 leaq 0x205f9(%rip), %rdx # 0x9196f leaq 0x25f83(%rip), %rcx # 0x97300 movl $0x45e4, %esi # imm = 0x45E4 xorl %eax, %eax callq 0x22c90 leaq 0x23122(%rip), %rdi # 0x944b2 leaq 0x205d8(%rip), %rdx # 0x9196f leaq 0x25f6e(%rip), %rcx # 0x9730c movl $0x45fe, %esi # imm = 0x45FE jmp 0x71382
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl13format_bufferEPciiii: push r15 push r14 push r12 push rbx push rax test ecx, ecx jns loc_7134C test r8d, r8d jle loc_71368 mov rbx, rdi lea r14d, [rdx+rsi] test edx, edx sets al cmp r14d, r8d setnle dil or dil, al jz short loc_7129B cmp r14d, r8d setnle al test r14d, r14d setle dil or dil, al jz short loc_712C4 test r14d, r14d setnle al cmp r14d, ecx setle cl or cl, al jnz loc_71308 neg r14d lea r15, [rbx+r14] add r15, 2 movsxd r12, esi mov rdi, r15 mov rsi, rbx mov rdx, r12 call _memmove mov word ptr [rbx], 2E30h add rbx, 2 push 30h ; '0' pop rsi mov rdi, rbx mov rdx, r14 call _memset add r15, r12 jmp short loc_712F9 loc_7129B: movsxd rax, esi lea rdi, [rbx+rax] movsxd r14, r14d mov rdx, r14 sub rdx, rax push 30h ; '0' pop rsi call _memset lea r15, [rbx+r14] add r15, 2 mov word ptr [r15-2], 302Eh jmp short loc_712F9 loc_712C4: test edx, edx jns loc_71389 mov ecx, r14d lea rax, [rbx+rcx] lea r14, [rbx+rcx] inc r14 mov r15d, esi mov rdx, r15 sub rdx, rcx mov rdi, r14 mov rsi, rax call _memmove mov byte ptr [r14-1], 2Eh ; '.' add r15, rbx inc r15 loc_712F9: mov rax, r15 add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn loc_71308: cmp esi, 1 jz short loc_7132B lea rdi, [rbx+2] lea rax, [rbx+1] movsxd r15, esi lea rdx, [r15-1] mov rsi, rax call _memmove mov byte ptr [rbx+1], 2Eh ; '.' add rbx, r15 loc_7132B: mov byte ptr [rbx+1], 65h ; 'e' add rbx, 2 dec r14d mov rdi, rbx; this mov esi, r14d; char * add rsp, 8 pop rbx pop r12 pop r14 pop r15 jmp _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl15append_exponentEPci; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::append_exponent(char *,int) loc_7134C: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aMinExp0; "min_exp < 0" mov esi, 45E3h jmp short loc_71382 loc_71368: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aMaxExp0; "max_exp > 0" mov esi, 45E4h loc_71382: xor eax, eax call _ggml_abort loc_71389: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aKN; "k > n" mov esi, 45FEh jmp short loc_71382
char * nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer( nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this, char *a2, int a3, int a4, int a5) { nlohmann::json_abi_v3_11_3::detail::dtoa_impl *v5; // rbx int v6; // r14d long long v7; // r14 char *v8; // r15 char *v9; // r14 if ( a4 >= 0 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17891LL, "GGML_ASSERT(%s) failed", "min_exp < 0"); goto LABEL_16; } if ( a5 <= 0 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17892LL, "GGML_ASSERT(%s) failed", "max_exp > 0"); goto LABEL_16; } v5 = this; v6 = a3 + (_DWORD)a2; if ( a3 >= 0 && a3 + (int)a2 <= a5 ) { memset((char *)this + (int)a2, 48LL, v6 - (long long)(int)a2); v8 = (char *)this + v6 + 2; *(_WORD *)((char *)this + v6) = 12334; return v8; } if ( v6 <= a5 && v6 > 0 ) { if ( a3 < 0 ) { v9 = (char *)this + (unsigned int)v6 + 1; memmove(v9); *(v9 - 1) = 46; return (char *)this + (unsigned int)a2 + 1; } while ( 1 ) LABEL_16: ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17918LL, "GGML_ASSERT(%s) failed", "k > n"); } if ( v6 <= 0 && v6 > a4 ) { v7 = (unsigned int)-v6; memmove((char *)this + v7 + 2); *(_WORD *)this = 11824; memset((char *)this + 2, 48LL, v7); return (char *)this + v7 + (int)a2 + 2; } if ( (_DWORD)a2 != 1 ) { memmove((char *)this + 2); *((_BYTE *)this + 1) = 46; v5 = (nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)((char *)this + (int)a2); } *((_BYTE *)v5 + 1) = 101; return (char *)nlohmann::json_abi_v3_11_3::detail::dtoa_impl::append_exponent( (nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)((char *)v5 + 2), (char *)(unsigned int)(v6 - 1), a3); }
format_buffer: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX TEST ECX,ECX JNS 0x0017134c TEST R8D,R8D JLE 0x00171368 MOV RBX,RDI LEA R14D,[RDX + RSI*0x1] TEST EDX,EDX SETS AL CMP R14D,R8D SETG DIL OR DIL,AL JZ 0x0017129b CMP R14D,R8D SETG AL TEST R14D,R14D SETLE DIL OR DIL,AL JZ 0x001712c4 TEST R14D,R14D SETG AL CMP R14D,ECX SETLE CL OR CL,AL JNZ 0x00171308 NEG R14D LEA R15,[RBX + R14*0x1] ADD R15,0x2 MOVSXD R12,ESI MOV RDI,R15 MOV RSI,RBX MOV RDX,R12 CALL 0x00122c30 MOV word ptr [RBX],0x2e30 ADD RBX,0x2 PUSH 0x30 POP RSI MOV RDI,RBX MOV RDX,R14 CALL 0x00122430 ADD R15,R12 JMP 0x001712f9 LAB_0017129b: MOVSXD RAX,ESI LEA RDI,[RBX + RAX*0x1] MOVSXD R14,R14D MOV RDX,R14 SUB RDX,RAX PUSH 0x30 POP RSI CALL 0x00122430 LEA R15,[RBX + R14*0x1] ADD R15,0x2 MOV word ptr [R15 + -0x2],0x302e JMP 0x001712f9 LAB_001712c4: TEST EDX,EDX JNS 0x00171389 MOV ECX,R14D LEA RAX,[RBX + RCX*0x1] LEA R14,[RBX + RCX*0x1] INC R14 MOV R15D,ESI MOV RDX,R15 SUB RDX,RCX MOV RDI,R14 MOV RSI,RAX CALL 0x00122c30 MOV byte ptr [R14 + -0x1],0x2e ADD R15,RBX INC R15 LAB_001712f9: MOV RAX,R15 ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET LAB_00171308: CMP ESI,0x1 JZ 0x0017132b LEA RDI,[RBX + 0x2] LEA RAX,[RBX + 0x1] MOVSXD R15,ESI LEA RDX,[R15 + -0x1] MOV RSI,RAX CALL 0x00122c30 MOV byte ptr [RBX + 0x1],0x2e ADD RBX,R15 LAB_0017132b: MOV byte ptr [RBX + 0x1],0x65 ADD RBX,0x2 DEC R14D MOV RDI,RBX MOV ESI,R14D ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 JMP 0x00171ca1 LAB_0017134c: LEA RDI,[0x1944b2] LEA RDX,[0x19196f] LEA RCX,[0x1972f4] MOV ESI,0x45e3 JMP 0x00171382 LAB_00171368: LEA RDI,[0x1944b2] LEA RDX,[0x19196f] LEA RCX,[0x197300] MOV ESI,0x45e4 LAB_00171382: XOR EAX,EAX CALL 0x00122c90 LAB_00171389: LEA RDI,[0x1944b2] LEA RDX,[0x19196f] LEA RCX,[0x19730c] MOV ESI,0x45fe JMP 0x00171382
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer(char*, int, int, int, int) */ char * nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer (char *param_1,int param_2,int param_3,int param_4,int param_5) { char *pcVar1; ulong uVar2; int8 uVar3; uint uVar4; char *pcVar5; if (param_4 < 0) { if (0 < param_5) { uVar4 = param_3 + param_2; if (param_5 < (int)uVar4 || param_3 < 0) { if ((int)uVar4 < 1 || param_5 < (int)uVar4) { if ((int)uVar4 <= param_4 || 0 < (int)uVar4) { if (param_2 != 1) { memmove(param_1 + 2,param_1 + 1,(long)param_2 - 1); param_1[1] = '.'; param_1 = param_1 + param_2; } param_1[1] = 'e'; pcVar1 = (char *)append_exponent(param_1 + 2,uVar4 - 1); return pcVar1; } memmove(param_1 + (ulong)-uVar4 + 2,param_1,(long)param_2); param_1[0] = '0'; param_1[1] = '.'; memset(param_1 + 2,0x30,(ulong)-uVar4); pcVar5 = param_1 + (ulong)-uVar4 + 2 + param_2; } else { if (-1 < param_3) { pcVar1 = "k > n"; uVar3 = 0x45fe; goto LAB_00171382; } uVar2 = (ulong)uVar4; memmove(param_1 + uVar2 + 1,param_1 + uVar2,(uint)param_2 - uVar2); param_1[uVar2] = '.'; pcVar5 = param_1 + (ulong)(uint)param_2 + 1; } } else { memset(param_1 + param_2,0x30,(long)(int)uVar4 - (long)param_2); pcVar1 = param_1 + (int)uVar4; pcVar5 = pcVar1 + 2; pcVar1[0] = '.'; pcVar1[1] = '0'; } return pcVar5; } pcVar1 = "max_exp > 0"; uVar3 = 0x45e4; } else { pcVar1 = "min_exp < 0"; uVar3 = 0x45e3; } LAB_00171382: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar3, "GGML_ASSERT(%s) failed",pcVar1); }
28,756
my_snprintf_utf32
eloqsql/strings/ctype-ucs2.c
static size_t my_snprintf_utf32(CHARSET_INFO *cs __attribute__((unused)), char* to, size_t n, const char* fmt, ...) { size_t ret; va_list args; va_start(args,fmt); ret= my_vsnprintf_utf32(to, n, fmt, args); va_end(args); return ret; }
O0
c
my_snprintf_utf32: pushq %rbp movq %rsp, %rbp subq $0xf0, %rsp testb %al, %al je 0x8fe6b movaps %xmm0, -0xc0(%rbp) movaps %xmm1, -0xb0(%rbp) movaps %xmm2, -0xa0(%rbp) movaps %xmm3, -0x90(%rbp) movaps %xmm4, -0x80(%rbp) movaps %xmm5, -0x70(%rbp) movaps %xmm6, -0x60(%rbp) movaps %xmm7, -0x50(%rbp) movq %r9, -0xc8(%rbp) movq %r8, -0xd0(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) leaq -0xf0(%rbp), %rax movq %rax, -0x30(%rbp) leaq 0x10(%rbp), %rax movq %rax, -0x38(%rbp) movl $0x30, -0x3c(%rbp) movl $0x20, -0x40(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx leaq -0x40(%rbp), %rcx callq 0x93f60 movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax addq $0xf0, %rsp popq %rbp retq
my_snprintf_utf32: push rbp mov rbp, rsp sub rsp, 0F0h test al, al jz short loc_8FE6B movaps [rbp+var_C0], xmm0 movaps [rbp+var_B0], xmm1 movaps [rbp+var_A0], xmm2 movaps [rbp+var_90], xmm3 movaps [rbp+var_80], xmm4 movaps [rbp+var_70], xmm5 movaps [rbp+var_60], xmm6 movaps [rbp+var_50], xmm7 loc_8FE6B: mov [rbp+var_C8], r9 mov [rbp+var_D0], r8 mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx lea rax, [rbp+var_F0] mov [rbp+var_30], rax lea rax, [rbp+arg_0] mov [rbp+var_38], rax mov [rbp+var_3C], 30h ; '0' mov [rbp+var_40], 20h ; ' ' mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] lea rcx, [rbp+var_40] call my_vsnprintf_utf32 mov [rbp+var_28], rax mov rax, [rbp+var_28] add rsp, 0F0h pop rbp retn
long long my_snprintf_utf32( 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 a15) { char v16; // [rsp+0h] [rbp-F0h] BYREF long long v17; // [rsp+20h] [rbp-D0h] long long v18; // [rsp+28h] [rbp-C8h] __m128 v19; // [rsp+30h] [rbp-C0h] __m128 v20; // [rsp+40h] [rbp-B0h] __m128 v21; // [rsp+50h] [rbp-A0h] __m128 v22; // [rsp+60h] [rbp-90h] __m128 v23; // [rsp+70h] [rbp-80h] __m128 v24; // [rsp+80h] [rbp-70h] __m128 v25; // [rsp+90h] [rbp-60h] __m128 v26; // [rsp+A0h] [rbp-50h] _DWORD v27[2]; // [rsp+B0h] [rbp-40h] BYREF char *v28; // [rsp+B8h] [rbp-38h] char *v29; // [rsp+C0h] [rbp-30h] long long v30; // [rsp+D0h] [rbp-20h] long long v31; // [rsp+D8h] [rbp-18h] long long v32; // [rsp+E0h] [rbp-10h] long long v33; // [rsp+E8h] [rbp-8h] v19 = a7; v20 = a8; v21 = a9; v22 = a10; v23 = a11; v24 = a12; v25 = a13; v26 = a14; v18 = a6; v17 = a5; v33 = a1; v32 = a2; v31 = a3; v30 = a4; v29 = &v16; v28 = &a15; v27[1] = 48; v27[0] = 32; return my_vsnprintf_utf32(a2, a3, a4, v27); }
my_snprintf_utf32: PUSH RBP MOV RBP,RSP SUB RSP,0xf0 TEST AL,AL JZ 0x0018fe6b MOVAPS xmmword ptr [RBP + -0xc0],XMM0 MOVAPS xmmword ptr [RBP + -0xb0],XMM1 MOVAPS xmmword ptr [RBP + -0xa0],XMM2 MOVAPS xmmword ptr [RBP + -0x90],XMM3 MOVAPS xmmword ptr [RBP + -0x80],XMM4 MOVAPS xmmword ptr [RBP + -0x70],XMM5 MOVAPS xmmword ptr [RBP + -0x60],XMM6 MOVAPS xmmword ptr [RBP + -0x50],XMM7 LAB_0018fe6b: MOV qword ptr [RBP + -0xc8],R9 MOV qword ptr [RBP + -0xd0],R8 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX LEA RAX,[RBP + -0xf0] MOV qword ptr [RBP + -0x30],RAX LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0x38],RAX MOV dword ptr [RBP + -0x3c],0x30 MOV dword ptr [RBP + -0x40],0x20 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] LEA RCX,[RBP + -0x40] CALL 0x00193f60 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RSP,0xf0 POP RBP RET
int8 my_snprintf_utf32(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int8 param_9,int8 param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { char in_AL; int8 uVar1; int1 local_f8 [32]; int8 local_d8; int8 local_d0; int8 local_c8; int8 local_b8; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int4 local_48; int4 local_44; int1 *local_40; int1 *local_38; int8 local_28; int8 local_20; int8 local_18; int8 local_10; if (in_AL != '\0') { local_c8 = param_1; local_b8 = param_2; local_a8 = param_3; local_98 = param_4; local_88 = param_5; local_78 = param_6; local_68 = param_7; local_58 = param_8; } local_38 = local_f8; local_40 = &stack0x00000008; local_44 = 0x30; local_48 = 0x20; local_d8 = param_13; local_d0 = param_14; local_28 = param_12; local_20 = param_11; local_18 = param_10; local_10 = param_9; uVar1 = my_vsnprintf_utf32(param_10,param_11,param_12,&local_48); return uVar1; }
28,757
my_coll_parser_init
eloqsql/strings/ctype-uca.c
static void my_coll_parser_init(MY_COLL_RULE_PARSER *p, MY_COLL_RULES *rules, const char *str, const char *str_end) { /* Initialize parser to the input buffer and scan two tokens, to make the current token and the next token known. */ memset(p, 0, sizeof(*p)); p->rules= rules; p->errstr[0]= '\0'; my_coll_lexem_init(my_coll_parser_curr(p), str, str_end); my_coll_lexem_next(my_coll_parser_curr(p)); my_coll_parser_next(p)[0]= my_coll_parser_curr(p)[0]; my_coll_lexem_next(my_coll_parser_next(p)); }
O0
c
my_coll_parser_init: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x8(%rbp), %rdi xorl %esi, %esi movl $0x178, %edx # imm = 0x178 callq 0x281c0 movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0xf0(%rax) movq -0x8(%rbp), %rax movb $0x0, 0xf8(%rax) movq -0x8(%rbp), %rdi callq 0xad970 movq %rax, %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0xad980 movq -0x8(%rbp), %rdi callq 0xad970 movq %rax, %rdi callq 0xad9d0 movq -0x8(%rbp), %rdi callq 0xaddc0 movq %rax, -0x28(%rbp) movq -0x8(%rbp), %rdi callq 0xad970 movq -0x28(%rbp), %rdi movq %rax, %rsi movl $0x28, %edx callq 0x28290 movq -0x8(%rbp), %rdi callq 0xaddc0 movq %rax, %rdi callq 0xad9d0 addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
my_coll_parser_init: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rdi, [rbp+var_8] xor esi, esi mov edx, 178h call _memset mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov [rax+0F0h], rcx mov rax, [rbp+var_8] mov byte ptr [rax+0F8h], 0 mov rdi, [rbp+var_8] call my_coll_parser_curr mov rdi, rax mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call my_coll_lexem_init mov rdi, [rbp+var_8] call my_coll_parser_curr mov rdi, rax call my_coll_lexem_next mov rdi, [rbp+var_8] call my_coll_parser_next mov [rbp+var_28], rax mov rdi, [rbp+var_8] call my_coll_parser_curr mov rdi, [rbp+var_28] mov rsi, rax mov edx, 28h ; '(' call _memcpy mov rdi, [rbp+var_8] call my_coll_parser_next mov rdi, rax call my_coll_lexem_next add rsp, 30h pop rbp retn
long long my_coll_parser_init(long long a1, long long a2, long long a3, long long a4) { long long v4; // rax long long v5; // rax long long v6; // rsi long long v7; // rax long long v9; // [rsp+8h] [rbp-28h] memset(a1, 0LL, 376LL); *(_QWORD *)(a1 + 240) = a2; *(_BYTE *)(a1 + 248) = 0; v4 = my_coll_parser_curr(a1); my_coll_lexem_init(v4, a3, a4); v5 = my_coll_parser_curr(a1); my_coll_lexem_next(v5); v9 = my_coll_parser_next(a1); v6 = my_coll_parser_curr(a1); memcpy(v9, v6, 40LL); v7 = my_coll_parser_next(a1); return my_coll_lexem_next(v7); }
my_coll_parser_init: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV RDI,qword ptr [RBP + -0x8] XOR ESI,ESI MOV EDX,0x178 CALL 0x001281c0 MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xf0],RCX MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0xf8],0x0 MOV RDI,qword ptr [RBP + -0x8] CALL 0x001ad970 MOV RDI,RAX MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x001ad980 MOV RDI,qword ptr [RBP + -0x8] CALL 0x001ad970 MOV RDI,RAX CALL 0x001ad9d0 MOV RDI,qword ptr [RBP + -0x8] CALL 0x001addc0 MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x001ad970 MOV RDI,qword ptr [RBP + -0x28] MOV RSI,RAX MOV EDX,0x28 CALL 0x00128290 MOV RDI,qword ptr [RBP + -0x8] CALL 0x001addc0 MOV RDI,RAX CALL 0x001ad9d0 ADD RSP,0x30 POP RBP RET
void my_coll_parser_init(void *param_1,int8 param_2,int8 param_3,int8 param_4) { int8 uVar1; void *__dest; void *__src; memset(param_1,0,0x178); *(int8 *)((long)param_1 + 0xf0) = param_2; *(int1 *)((long)param_1 + 0xf8) = 0; uVar1 = my_coll_parser_curr(param_1); my_coll_lexem_init(uVar1,param_3,param_4); uVar1 = my_coll_parser_curr(param_1); my_coll_lexem_next(uVar1); __dest = (void *)my_coll_parser_next(param_1); __src = (void *)my_coll_parser_curr(param_1); memcpy(__dest,__src,0x28); uVar1 = my_coll_parser_next(param_1); my_coll_lexem_next(uVar1); return; }
28,758
my_wildcmp_8bit_impl
eloqsql/strings/ctype-simple.c
static int my_wildcmp_8bit_impl(CHARSET_INFO *cs, const char *str,const char *str_end, const char *wildstr,const char *wildend, int escape, int w_one, int w_many, int recurse_level) { int result= -1; /* Not found, using wildcards */ if (my_string_stack_guard && my_string_stack_guard(recurse_level)) return 1; while (wildstr != wildend) { while (*wildstr != w_many && *wildstr != w_one) { if (*wildstr == escape && wildstr+1 != wildend) wildstr++; if (str == str_end || likeconv(cs,*wildstr++) != likeconv(cs,*str++)) return(1); /* No match */ if (wildstr == wildend) return(str != str_end); /* Match if both are at end */ result=1; /* Found an anchor char */ } if (*wildstr == w_one) { do { if (str == str_end) /* Skip one char if possible */ return(result); INC_PTR(cs,str,str_end); } while (++wildstr < wildend && *wildstr == w_one); if (wildstr == wildend) break; } if (*wildstr == w_many) { /* Found w_many */ uchar cmp; wildstr++; /* Remove any '%' and '_' from the wild search string */ for (; wildstr != wildend ; wildstr++) { if (*wildstr == w_many) continue; if (*wildstr == w_one) { if (str == str_end) return(-1); INC_PTR(cs,str,str_end); continue; } break; /* Not a wild character */ } if (wildstr == wildend) return(0); /* Ok if w_many is last */ if (str == str_end) return(-1); if ((cmp= *wildstr) == escape && wildstr+1 != wildend) cmp= *++wildstr; INC_PTR(cs,wildstr,wildend); /* This is compared trough cmp */ cmp=likeconv(cs,cmp); do { /* Find the next character in the subject string equal to 'cmp', then check recursively my_wildcmp_8bit_impl() for the pattern remainder. */ while (str != str_end && (uchar) likeconv(cs,*str) != cmp) str++; if (str++ == str_end) return(-1); /* 'cmp' was not found in the subject string */ { int tmp=my_wildcmp_8bit_impl(cs,str,str_end, wildstr,wildend,escape,w_one, w_many, recurse_level+1); if (tmp <= 0) return(tmp); } /* The recursion call did not match. But it returned 1, which means the pattern remainder has some non-special characters. Continue, there is a chance that we'll find another 'cmp' at a different position in the subject string. */ } while (str != str_end); return(-1); } } return(str != str_end ? 1 : 0); }
O0
c
my_wildcmp_8bit_impl: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movl 0x20(%rbp), %eax movl 0x18(%rbp), %eax movl 0x10(%rbp), %eax movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movl %r9d, -0x34(%rbp) movl $0xffffffff, -0x38(%rbp) # imm = 0xFFFFFFFF leaq 0x349d41(%rip), %rax # 0x390798 cmpq $0x0, (%rax) je 0x46a7d leaq 0x349d34(%rip), %rax # 0x390798 movq (%rax), %rax movl 0x20(%rbp), %edi callq *%rax cmpl $0x0, %eax je 0x46a7d movl $0x1, -0x4(%rbp) jmp 0x46daa jmp 0x46a7f movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax je 0x46d92 jmp 0x46a8f movq -0x28(%rbp), %rax movsbl (%rax), %ecx xorl %eax, %eax cmpl 0x18(%rbp), %ecx movb %al, -0x41(%rbp) je 0x46ab0 movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl 0x10(%rbp), %eax setne %al movb %al, -0x41(%rbp) movb -0x41(%rbp), %al testb $0x1, %al jne 0x46abc jmp 0x46b66 movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl -0x34(%rbp), %eax jne 0x46ae2 movq -0x28(%rbp), %rax addq $0x1, %rax cmpq -0x30(%rbp), %rax je 0x46ae2 movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax je 0x46b2c movq -0x10(%rbp), %rax movq 0x58(%rax), %rax movq -0x28(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x28(%rbp) movzbl (%rcx), %ecx movzbl (%rax,%rcx), %eax movq -0x10(%rbp), %rcx movq 0x58(%rcx), %rcx movq -0x18(%rbp), %rdx movq %rdx, %rsi addq $0x1, %rsi movq %rsi, -0x18(%rbp) movzbl (%rdx), %edx movzbl (%rcx,%rdx), %ecx cmpl %ecx, %eax je 0x46b38 movl $0x1, -0x4(%rbp) jmp 0x46daa movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax jne 0x46b5a movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax setne %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x4(%rbp) jmp 0x46daa movl $0x1, -0x38(%rbp) jmp 0x46a8f movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl 0x10(%rbp), %eax jne 0x46bd4 jmp 0x46b74 movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jne 0x46b89 movl -0x38(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x46daa movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) movq -0x28(%rbp), %rcx addq $0x1, %rcx movq %rcx, -0x28(%rbp) xorl %eax, %eax cmpq -0x30(%rbp), %rcx movb %al, -0x42(%rbp) jae 0x46bbc movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl 0x10(%rbp), %eax sete %al movb %al, -0x42(%rbp) movb -0x42(%rbp), %al testb $0x1, %al jne 0x46b74 movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax jne 0x46bd2 jmp 0x46d92 jmp 0x46bd4 movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl 0x18(%rbp), %eax jne 0x46d8d movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax je 0x46c48 movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl 0x18(%rbp), %eax jne 0x46c08 jmp 0x46c3a movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl 0x10(%rbp), %eax jne 0x46c38 movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jne 0x46c2a movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x46daa movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) jmp 0x46c3a jmp 0x46c48 movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) jmp 0x46bf0 movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax jne 0x46c5e movl $0x0, -0x4(%rbp) jmp 0x46daa movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jne 0x46c74 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x46daa movq -0x28(%rbp), %rax movb (%rax), %al movb %al, -0x39(%rbp) movzbl %al, %eax cmpl -0x34(%rbp), %eax jne 0x46ca8 movq -0x28(%rbp), %rax addq $0x1, %rax cmpq -0x30(%rbp), %rax je 0x46ca8 movq -0x28(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x28(%rbp) movb 0x1(%rax), %al movb %al, -0x39(%rbp) movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movq 0x58(%rax), %rax movzbl -0x39(%rbp), %ecx movb (%rax,%rcx), %al movb %al, -0x39(%rbp) jmp 0x46cc8 movq -0x18(%rbp), %rcx xorl %eax, %eax cmpq -0x20(%rbp), %rcx movb %al, -0x43(%rbp) je 0x46cf6 movq -0x10(%rbp), %rax movq 0x58(%rax), %rax movq -0x18(%rbp), %rcx movzbl (%rcx), %ecx movzbl (%rax,%rcx), %eax movzbl -0x39(%rbp), %ecx cmpl %ecx, %eax setne %al movb %al, -0x43(%rbp) movb -0x43(%rbp), %al testb $0x1, %al jne 0x46cff jmp 0x46d0d movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) jmp 0x46cc8 movq -0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x18(%rbp) cmpq -0x20(%rbp), %rax jne 0x46d2b movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x46daa movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx movq -0x28(%rbp), %rcx movq -0x30(%rbp), %r8 movl -0x34(%rbp), %r9d movl 0x10(%rbp), %r11d movl 0x18(%rbp), %r10d movl 0x20(%rbp), %eax addl $0x1, %eax movl %r11d, (%rsp) movl %r10d, 0x8(%rsp) movl %eax, 0x10(%rsp) callq 0x46a20 movl %eax, -0x40(%rbp) cmpl $0x0, -0x40(%rbp) jg 0x46d74 movl -0x40(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x46daa jmp 0x46d76 movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jne 0x46cc6 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x46daa jmp 0x46a7f movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rsi xorl %eax, %eax movl $0x1, %ecx cmpq %rsi, %rdx cmovnel %ecx, %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_wildcmp_8bit_impl: push rbp mov rbp, rsp sub rsp, 60h mov eax, [rbp+arg_10] mov eax, [rbp+arg_8] mov eax, [rbp+arg_0] mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov [rbp+var_34], r9d mov [rbp+var_38], 0FFFFFFFFh lea rax, my_string_stack_guard cmp qword ptr [rax], 0 jz short loc_46A7D lea rax, my_string_stack_guard mov rax, [rax] mov edi, [rbp+arg_10] call rax cmp eax, 0 jz short loc_46A7D mov [rbp+var_4], 1 jmp loc_46DAA loc_46A7D: jmp short $+2 loc_46A7F: mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jz loc_46D92 jmp short $+2 loc_46A8F: mov rax, [rbp+var_28] movsx ecx, byte ptr [rax] xor eax, eax cmp ecx, [rbp+arg_8] mov [rbp+var_41], al jz short loc_46AB0 mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, [rbp+arg_0] setnz al mov [rbp+var_41], al loc_46AB0: mov al, [rbp+var_41] test al, 1 jnz short loc_46ABC jmp loc_46B66 loc_46ABC: mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, [rbp+var_34] jnz short loc_46AE2 mov rax, [rbp+var_28] add rax, 1 cmp rax, [rbp+var_30] jz short loc_46AE2 mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax loc_46AE2: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jz short loc_46B2C mov rax, [rbp+var_10] mov rax, [rax+58h] mov rcx, [rbp+var_28] mov rdx, rcx add rdx, 1 mov [rbp+var_28], rdx movzx ecx, byte ptr [rcx] movzx eax, byte ptr [rax+rcx] mov rcx, [rbp+var_10] mov rcx, [rcx+58h] mov rdx, [rbp+var_18] mov rsi, rdx add rsi, 1 mov [rbp+var_18], rsi movzx edx, byte ptr [rdx] movzx ecx, byte ptr [rcx+rdx] cmp eax, ecx jz short loc_46B38 loc_46B2C: mov [rbp+var_4], 1 jmp loc_46DAA loc_46B38: mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jnz short loc_46B5A mov rax, [rbp+var_18] cmp rax, [rbp+var_20] setnz al and al, 1 movzx eax, al mov [rbp+var_4], eax jmp loc_46DAA loc_46B5A: mov [rbp+var_38], 1 jmp loc_46A8F loc_46B66: mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, [rbp+arg_0] jnz short loc_46BD4 jmp short $+2 loc_46B74: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnz short loc_46B89 mov eax, [rbp+var_38] mov [rbp+var_4], eax jmp loc_46DAA loc_46B89: mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax mov rcx, [rbp+var_28] add rcx, 1 mov [rbp+var_28], rcx xor eax, eax cmp rcx, [rbp+var_30] mov [rbp+var_42], al jnb short loc_46BBC mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, [rbp+arg_0] setz al mov [rbp+var_42], al loc_46BBC: mov al, [rbp+var_42] test al, 1 jnz short loc_46B74 mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jnz short loc_46BD2 jmp loc_46D92 loc_46BD2: jmp short $+2 loc_46BD4: mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, [rbp+arg_8] jnz loc_46D8D mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax loc_46BF0: mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jz short loc_46C48 mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, [rbp+arg_8] jnz short loc_46C08 jmp short loc_46C3A loc_46C08: mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, [rbp+arg_0] jnz short loc_46C38 mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnz short loc_46C2A mov [rbp+var_4], 0FFFFFFFFh jmp loc_46DAA loc_46C2A: mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax jmp short loc_46C3A loc_46C38: jmp short loc_46C48 loc_46C3A: mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax jmp short loc_46BF0 loc_46C48: mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jnz short loc_46C5E mov [rbp+var_4], 0 jmp loc_46DAA loc_46C5E: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnz short loc_46C74 mov [rbp+var_4], 0FFFFFFFFh jmp loc_46DAA loc_46C74: mov rax, [rbp+var_28] mov al, [rax] mov [rbp+var_39], al movzx eax, al cmp eax, [rbp+var_34] jnz short loc_46CA8 mov rax, [rbp+var_28] add rax, 1 cmp rax, [rbp+var_30] jz short loc_46CA8 mov rax, [rbp+var_28] mov rcx, rax add rcx, 1 mov [rbp+var_28], rcx mov al, [rax+1] mov [rbp+var_39], al loc_46CA8: mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax mov rax, [rbp+var_10] mov rax, [rax+58h] movzx ecx, [rbp+var_39] mov al, [rax+rcx] mov [rbp+var_39], al loc_46CC6: jmp short $+2 loc_46CC8: mov rcx, [rbp+var_18] xor eax, eax cmp rcx, [rbp+var_20] mov [rbp+var_43], al jz short loc_46CF6 mov rax, [rbp+var_10] mov rax, [rax+58h] mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx] movzx eax, byte ptr [rax+rcx] movzx ecx, [rbp+var_39] cmp eax, ecx setnz al mov [rbp+var_43], al loc_46CF6: mov al, [rbp+var_43] test al, 1 jnz short loc_46CFF jmp short loc_46D0D loc_46CFF: mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax jmp short loc_46CC8 loc_46D0D: mov rax, [rbp+var_18] mov rcx, rax add rcx, 1 mov [rbp+var_18], rcx cmp rax, [rbp+var_20] jnz short loc_46D2B mov [rbp+var_4], 0FFFFFFFFh jmp short loc_46DAA loc_46D2B: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] mov rcx, [rbp+var_28] mov r8, [rbp+var_30] mov r9d, [rbp+var_34] mov r11d, [rbp+arg_0] mov r10d, [rbp+arg_8] mov eax, [rbp+arg_10] add eax, 1 mov [rsp+60h+var_60], r11d mov [rsp+60h+var_58], r10d mov [rsp+60h+var_50], eax call my_wildcmp_8bit_impl mov [rbp+var_40], eax cmp [rbp+var_40], 0 jg short loc_46D74 mov eax, [rbp+var_40] mov [rbp+var_4], eax jmp short loc_46DAA loc_46D74: jmp short $+2 loc_46D76: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnz loc_46CC6 mov [rbp+var_4], 0FFFFFFFFh jmp short loc_46DAA loc_46D8D: jmp loc_46A7F loc_46D92: mov rdx, [rbp+var_18] mov rsi, [rbp+var_20] xor eax, eax mov ecx, 1 cmp rdx, rsi cmovnz eax, ecx mov [rbp+var_4], eax loc_46DAA: mov eax, [rbp+var_4] add rsp, 60h pop rbp retn
long long my_wildcmp_8bit_impl( long long a1, unsigned __int8 *a2, unsigned __int8 *a3, char *a4, char *a5, int a6, int a7, int a8, unsigned int a9) { char *v9; // rcx unsigned __int8 *v10; // rdx char *v11; // rax unsigned __int8 *v12; // rax bool v14; // [rsp+1Dh] [rbp-43h] bool v15; // [rsp+1Eh] [rbp-42h] bool v16; // [rsp+1Fh] [rbp-41h] int v17; // [rsp+20h] [rbp-40h] unsigned __int8 v18; // [rsp+27h] [rbp-39h] unsigned __int8 v19; // [rsp+27h] [rbp-39h] unsigned int v20; // [rsp+28h] [rbp-38h] char *i; // [rsp+38h] [rbp-28h] int v25; // [rsp+38h] [rbp-28h] v20 = -1; if ( my_string_stack_guard && (unsigned int)my_string_stack_guard(a9) ) { return 1; } else { do { if ( a4 != a5 ) { while ( 1 ) { v16 = 0; if ( *a4 != a8 ) v16 = *a4 != a7; if ( !v16 ) break; if ( *a4 == a6 && a4 + 1 != a5 ) ++a4; if ( a2 == a3 ) return 1; v9 = a4++; v10 = a2++; if ( *(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + (unsigned __int8)*v9) != *(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + *v10) ) return 1; if ( a4 == a5 ) return a2 != a3; v20 = 1; } if ( *a4 != a7 ) continue; do { if ( a2 == a3 ) return v20; ++a2; ++a4; v15 = 0; if ( a4 < a5 ) v15 = *a4 == a7; } while ( v15 ); if ( a4 != a5 ) continue; } return a2 != a3; } while ( *a4 != a8 ); for ( i = a4 + 1; i != a5; ++i ) { if ( *i != a8 ) { if ( *i != a7 ) break; if ( a2 == a3 ) return (unsigned int)-1; ++a2; } } if ( i == a5 ) { return 0; } else if ( a2 == a3 ) { return (unsigned int)-1; } else { v18 = *i; if ( (unsigned __int8)*i == a6 && i + 1 != a5 ) { v11 = i; LODWORD(i) = (_DWORD)i + 1; v18 = v11[1]; } v25 = (_DWORD)i + 1; v19 = *(_BYTE *)(*(_QWORD *)(a1 + 88) + v18); do { while ( 1 ) { v14 = 0; if ( a2 != a3 ) v14 = *(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + *a2) != v19; if ( !v14 ) break; ++a2; } v12 = a2++; if ( v12 == a3 ) return (unsigned int)-1; v17 = my_wildcmp_8bit_impl(a1, (_DWORD)a2, (_DWORD)a3, v25, (_DWORD)a5, a6, a7, a8, a9 + 1); if ( v17 <= 0 ) return (unsigned int)v17; } while ( a2 != a3 ); return (unsigned int)-1; } } }
my_wildcmp_8bit_impl: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV EAX,dword ptr [RBP + 0x20] MOV EAX,dword ptr [RBP + 0x18] MOV EAX,dword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV dword ptr [RBP + -0x34],R9D MOV dword ptr [RBP + -0x38],0xffffffff LEA RAX,[0x490798] CMP qword ptr [RAX],0x0 JZ 0x00146a7d LEA RAX,[0x490798] MOV RAX,qword ptr [RAX] MOV EDI,dword ptr [RBP + 0x20] CALL RAX CMP EAX,0x0 JZ 0x00146a7d MOV dword ptr [RBP + -0x4],0x1 JMP 0x00146daa LAB_00146a7d: JMP 0x00146a7f LAB_00146a7f: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JZ 0x00146d92 JMP 0x00146a8f LAB_00146a8f: MOV RAX,qword ptr [RBP + -0x28] MOVSX ECX,byte ptr [RAX] XOR EAX,EAX CMP ECX,dword ptr [RBP + 0x18] MOV byte ptr [RBP + -0x41],AL JZ 0x00146ab0 MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,dword ptr [RBP + 0x10] SETNZ AL MOV byte ptr [RBP + -0x41],AL LAB_00146ab0: MOV AL,byte ptr [RBP + -0x41] TEST AL,0x1 JNZ 0x00146abc JMP 0x00146b66 LAB_00146abc: MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,dword ptr [RBP + -0x34] JNZ 0x00146ae2 MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 CMP RAX,qword ptr [RBP + -0x30] JZ 0x00146ae2 MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX LAB_00146ae2: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JZ 0x00146b2c MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x58] MOV RCX,qword ptr [RBP + -0x28] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0x28],RDX MOVZX ECX,byte ptr [RCX] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x58] MOV RDX,qword ptr [RBP + -0x18] MOV RSI,RDX ADD RSI,0x1 MOV qword ptr [RBP + -0x18],RSI MOVZX EDX,byte ptr [RDX] MOVZX ECX,byte ptr [RCX + RDX*0x1] CMP EAX,ECX JZ 0x00146b38 LAB_00146b2c: MOV dword ptr [RBP + -0x4],0x1 JMP 0x00146daa LAB_00146b38: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00146b5a MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RBP + -0x4],EAX JMP 0x00146daa LAB_00146b5a: MOV dword ptr [RBP + -0x38],0x1 JMP 0x00146a8f LAB_00146b66: MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,dword ptr [RBP + 0x10] JNZ 0x00146bd4 JMP 0x00146b74 LAB_00146b74: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x00146b89 MOV EAX,dword ptr [RBP + -0x38] MOV dword ptr [RBP + -0x4],EAX JMP 0x00146daa LAB_00146b89: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX MOV RCX,qword ptr [RBP + -0x28] ADD RCX,0x1 MOV qword ptr [RBP + -0x28],RCX XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x30] MOV byte ptr [RBP + -0x42],AL JNC 0x00146bbc MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,dword ptr [RBP + 0x10] SETZ AL MOV byte ptr [RBP + -0x42],AL LAB_00146bbc: MOV AL,byte ptr [RBP + -0x42] TEST AL,0x1 JNZ 0x00146b74 MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00146bd2 JMP 0x00146d92 LAB_00146bd2: JMP 0x00146bd4 LAB_00146bd4: MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,dword ptr [RBP + 0x18] JNZ 0x00146d8d MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX LAB_00146bf0: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JZ 0x00146c48 MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,dword ptr [RBP + 0x18] JNZ 0x00146c08 JMP 0x00146c3a LAB_00146c08: MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,dword ptr [RBP + 0x10] JNZ 0x00146c38 MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x00146c2a MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x00146daa LAB_00146c2a: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x00146c3a LAB_00146c38: JMP 0x00146c48 LAB_00146c3a: MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX JMP 0x00146bf0 LAB_00146c48: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00146c5e MOV dword ptr [RBP + -0x4],0x0 JMP 0x00146daa LAB_00146c5e: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x00146c74 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x00146daa LAB_00146c74: MOV RAX,qword ptr [RBP + -0x28] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x39],AL MOVZX EAX,AL CMP EAX,dword ptr [RBP + -0x34] JNZ 0x00146ca8 MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 CMP RAX,qword ptr [RBP + -0x30] JZ 0x00146ca8 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x28],RCX MOV AL,byte ptr [RAX + 0x1] MOV byte ptr [RBP + -0x39],AL LAB_00146ca8: MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x58] MOVZX ECX,byte ptr [RBP + -0x39] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x39],AL LAB_00146cc6: JMP 0x00146cc8 LAB_00146cc8: MOV RCX,qword ptr [RBP + -0x18] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x20] MOV byte ptr [RBP + -0x43],AL JZ 0x00146cf6 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x58] MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOVZX ECX,byte ptr [RBP + -0x39] CMP EAX,ECX SETNZ AL MOV byte ptr [RBP + -0x43],AL LAB_00146cf6: MOV AL,byte ptr [RBP + -0x43] TEST AL,0x1 JNZ 0x00146cff JMP 0x00146d0d LAB_00146cff: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x00146cc8 LAB_00146d0d: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x18],RCX CMP RAX,qword ptr [RBP + -0x20] JNZ 0x00146d2b MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x00146daa LAB_00146d2b: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x28] MOV R8,qword ptr [RBP + -0x30] MOV R9D,dword ptr [RBP + -0x34] MOV R11D,dword ptr [RBP + 0x10] MOV R10D,dword ptr [RBP + 0x18] MOV EAX,dword ptr [RBP + 0x20] ADD EAX,0x1 MOV dword ptr [RSP],R11D MOV dword ptr [RSP + 0x8],R10D MOV dword ptr [RSP + 0x10],EAX CALL 0x00146a20 MOV dword ptr [RBP + -0x40],EAX CMP dword ptr [RBP + -0x40],0x0 JG 0x00146d74 MOV EAX,dword ptr [RBP + -0x40] MOV dword ptr [RBP + -0x4],EAX JMP 0x00146daa LAB_00146d74: JMP 0x00146d76 LAB_00146d76: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x00146cc6 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x00146daa LAB_00146d8d: JMP 0x00146a7f LAB_00146d92: MOV RDX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] XOR EAX,EAX MOV ECX,0x1 CMP RDX,RSI CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x4],EAX LAB_00146daa: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x60 POP RBP RET
uint my_wildcmp_8bit_impl (long param_1,byte *param_2,byte *param_3,byte *param_4,byte *param_5,uint param_6, int param_7,int param_8,int param_9) { char cVar1; int iVar2; uint uVar3; byte *pbVar4; bool bVar5; byte local_41; uint local_40; byte *local_30; byte *local_20; uint local_c; local_40 = 0xffffffff; local_30 = param_4; local_20 = param_2; if ((my_string_stack_guard == (code *)0x0) || (iVar2 = (*my_string_stack_guard)(param_9), iVar2 == 0)) { do { if (local_30 == param_5) { LAB_00146d92: return (uint)(local_20 != param_3); } while( true ) { bVar5 = false; if ((char)*local_30 != param_8) { bVar5 = (char)*local_30 != param_7; } if (!bVar5) break; if (((int)(char)*local_30 == param_6) && (local_30 + 1 != param_5)) { local_30 = local_30 + 1; } if (local_20 == param_3) { return 1; } if (*(char *)(*(long *)(param_1 + 0x58) + (ulong)*local_30) != *(char *)(*(long *)(param_1 + 0x58) + (ulong)*local_20)) { return 1; } if (local_30 + 1 == param_5) { return (uint)(local_20 + 1 != param_3); } local_40 = 1; local_30 = local_30 + 1; local_20 = local_20 + 1; } if ((char)*local_30 == param_7) { do { if (local_20 == param_3) { return local_40; } local_20 = local_20 + 1; local_30 = local_30 + 1; bVar5 = false; if (local_30 < param_5) { bVar5 = (char)*local_30 == param_7; } } while (bVar5); if (local_30 == param_5) goto LAB_00146d92; } } while ((char)*local_30 != param_8); while (pbVar4 = local_30, local_30 = pbVar4 + 1, local_30 != param_5) { if ((char)*local_30 != param_8) { if ((char)*local_30 != param_7) break; if (local_20 == param_3) { return 0xffffffff; } local_20 = local_20 + 1; } } if (local_30 == param_5) { local_c = 0; } else if (local_20 == param_3) { local_c = 0xffffffff; } else { local_41 = *local_30; if ((local_41 == param_6) && (pbVar4 + 2 != param_5)) { local_30 = pbVar4 + 2; local_41 = pbVar4[2]; } cVar1 = *(char *)(*(long *)(param_1 + 0x58) + (ulong)local_41); do { while( true ) { bVar5 = false; if (local_20 != param_3) { bVar5 = *(char *)(*(long *)(param_1 + 0x58) + (ulong)*local_20) != cVar1; } if (!bVar5) break; local_20 = local_20 + 1; } pbVar4 = local_20 + 1; if (local_20 == param_3) { return 0xffffffff; } uVar3 = my_wildcmp_8bit_impl (param_1,pbVar4,param_3,local_30 + 1,param_5,param_6,param_7,param_8, param_9 + 1); if ((int)uVar3 < 1) { return uVar3; } local_20 = pbVar4; } while (pbVar4 != param_3); local_c = 0xffffffff; } } else { local_c = 1; } return local_c; }
28,759
my_copy_8bit
eloqsql/strings/ctype-simple.c
size_t my_copy_8bit(CHARSET_INFO *cs __attribute__((unused)), char *dst, size_t dst_length, const char *src, size_t src_length, size_t nchars, MY_STRCOPY_STATUS *status) { set_if_smaller(src_length, dst_length); set_if_smaller(src_length, nchars); if (src_length) memmove(dst, src, src_length); status->m_source_end_pos= src + src_length; status->m_well_formed_error_pos= NULL; return src_length; }
O0
c
my_copy_8bit: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq 0x10(%rbp), %rax movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x28(%rbp), %rax cmpq -0x18(%rbp), %rax jbe 0x4b9a6 movq -0x18(%rbp), %rax movq %rax, -0x28(%rbp) jmp 0x4b9a8 jmp 0x4b9aa movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax jbe 0x4b9bc movq -0x30(%rbp), %rax movq %rax, -0x28(%rbp) jmp 0x4b9be cmpq $0x0, -0x28(%rbp) je 0x4b9d6 movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx callq 0x24550 movq -0x20(%rbp), %rcx addq -0x28(%rbp), %rcx movq 0x10(%rbp), %rax movq %rcx, (%rax) movq 0x10(%rbp), %rax movq $0x0, 0x8(%rax) movq -0x28(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
my_copy_8bit: push rbp mov rbp, rsp sub rsp, 30h 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_28], r8 mov [rbp+var_30], r9 mov rax, [rbp+var_28] cmp rax, [rbp+var_18] jbe short loc_4B9A6 mov rax, [rbp+var_18] mov [rbp+var_28], rax loc_4B9A6: jmp short $+2 loc_4B9A8: jmp short $+2 loc_4B9AA: mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jbe short loc_4B9BC mov rax, [rbp+var_30] mov [rbp+var_28], rax loc_4B9BC: jmp short $+2 loc_4B9BE: cmp [rbp+var_28], 0 jz short loc_4B9D6 mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] call _memmove loc_4B9D6: mov rcx, [rbp+var_20] add rcx, [rbp+var_28] mov rax, [rbp+arg_0] mov [rax], rcx mov rax, [rbp+arg_0] mov qword ptr [rax+8], 0 mov rax, [rbp+var_28] add rsp, 30h pop rbp retn
unsigned long long my_copy_8bit( long long a1, long long a2, unsigned long long a3, long long a4, unsigned long long a5, unsigned long long a6, _QWORD *a7) { unsigned long long v8; // [rsp+8h] [rbp-28h] v8 = a5; if ( a5 > a3 ) v8 = a3; if ( v8 > a6 ) v8 = a6; if ( v8 ) memmove(a2, a4, v8); *a7 = v8 + a4; a7[1] = 0LL; return v8; }
my_copy_8bit: PUSH RBP MOV RBP,RSP SUB RSP,0x30 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 qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x18] JBE 0x0014b9a6 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x28],RAX LAB_0014b9a6: JMP 0x0014b9a8 LAB_0014b9a8: JMP 0x0014b9aa LAB_0014b9aa: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JBE 0x0014b9bc MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x28],RAX LAB_0014b9bc: JMP 0x0014b9be LAB_0014b9be: CMP qword ptr [RBP + -0x28],0x0 JZ 0x0014b9d6 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] CALL 0x00124550 LAB_0014b9d6: MOV RCX,qword ptr [RBP + -0x20] ADD RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RAX + 0x8],0x0 MOV RAX,qword ptr [RBP + -0x28] ADD RSP,0x30 POP RBP RET
size_t my_copy_8bit(int8 param_1,void *param_2,ulong param_3,void *param_4,ulong param_5, ulong param_6,long *param_7) { ulong local_30; local_30 = param_5; if (param_3 < param_5) { local_30 = param_3; } if (param_6 < local_30) { local_30 = param_6; } if (local_30 != 0) { memmove(param_2,param_4,local_30); } *param_7 = (long)param_4 + local_30; param_7[1] = 0; return local_30; }
28,760
long minja::Value::get<long>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, long) const
llama.cpp/common/minja/minja.hpp
T get(const std::string & key, T default_value) const { if (!contains(key)) return default_value; return at(key).get<T>(); }
O3
cpp
long minja::Value::get<long>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, long) const: pushq %r15 pushq %r14 pushq %rbx subq $0x50, %rsp movq %rdx, %rbx movq %rsi, %r15 movq %rdi, %r14 callq 0xcb4f0 testb %al, %al je 0xcb4d0 movq %rsp, %rbx movq %rbx, %rdi movq %r15, %rsi callq 0xc5f50 movq %r14, %rdi movq %rbx, %rsi callq 0xc9c24 movq %rax, %rdi callq 0xcb63a movq %rax, %rbx leaq 0x40(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x9524a movq %r14, %rdi callq 0x3488a leaq 0x38(%rsp), %rdi callq 0x46496 leaq 0x28(%rsp), %rdi callq 0x46496 leaq 0x18(%rsp), %r14 movq %r14, %rdi callq 0x46496 movq -0x10(%r14), %rdi testq %rdi, %rdi je 0xcb4d0 movq 0xa2aed(%rip), %rax # 0x16df98 cmpb $0x0, (%rax) je 0xcb4bb movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0xcb4c5 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0xcb4d0 movq (%rdi), %rax callq *0x18(%rax) movq %rbx, %rax addq $0x50, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx movq %rsp, %rdi callq 0xc03a8 movq %rbx, %rdi callq 0x21b20
_ZNK5minja5Value3getIlEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES2_: push r15 push r14 push rbx sub rsp, 50h mov rbx, rdx mov r15, rsi mov r14, rdi call _ZNK5minja5Value8containsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::contains(std::string const&) test al, al jz loc_CB4D0 mov rbx, rsp mov rdi, rbx mov rsi, r15 call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) mov rdi, r14; this mov rsi, rbx; minja::Value * call _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&) mov rdi, rax call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void) mov rbx, rax lea r14, [rsp+68h+var_28] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; 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>::data::~data() lea rdi, [rsp+68h+var_30] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+68h+var_40] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea r14, [rsp+68h+var_50] mov rdi, r14 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, [r14-10h] test rdi, rdi jz short loc_CB4D0 mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag cmp byte ptr [rax], 0 jz short loc_CB4BB mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_CB4C5 loc_CB4BB: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_CB4C5: cmp eax, 1 jnz short loc_CB4D0 mov rax, [rdi] call qword ptr [rax+18h] loc_CB4D0: mov rax, rbx add rsp, 50h pop rbx pop r14 pop r15 retn mov rbx, rax mov rdi, rsp; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() mov rdi, rbx call __Unwind_Resume
long long minja::Value::get<long>(minja::Value *this, _QWORD *a2, long long a3) { unsigned long long v4; // rax long long v5; // rdi signed __int32 v6; // eax long long v8; // [rsp+0h] [rbp-68h] BYREF long long v9; // [rsp+8h] [rbp-60h] volatile signed __int32 *v10; // [rsp+18h] [rbp-50h] BYREF volatile signed __int32 *v11; // [rsp+28h] [rbp-40h] BYREF volatile signed __int32 *v12; // [rsp+38h] [rbp-30h] BYREF char v13[40]; // [rsp+40h] [rbp-28h] BYREF if ( (unsigned __int8)minja::Value::contains() ) { minja::Value::Value((long long)&v8, a2); v4 = minja::Value::at(this, (const minja::Value *)&v8); a3 = minja::Value::get<long>(v4); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v13); 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>::data::~data(v13); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v12); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v11); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v10); v5 = v9; if ( v9 ) { if ( _libc_single_threaded ) { v6 = *(_DWORD *)(v9 + 12); *(_DWORD *)(v9 + 12) = v6 - 1; } else { v6 = _InterlockedExchangeAdd((volatile signed __int32 *)(v9 + 12), 0xFFFFFFFF); } if ( v6 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v5 + 24LL))(v5, 0LL); } } return a3; }
get<long>: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x50 MOV RBX,RDX MOV R15,RSI MOV R14,RDI CALL 0x001cb4f0 TEST AL,AL JZ 0x001cb4d0 MOV RBX,RSP MOV RDI,RBX MOV RSI,R15 CALL 0x001c5f50 LAB_001cb44d: MOV RDI,R14 MOV RSI,RBX CALL 0x001c9c24 MOV RDI,RAX CALL 0x001cb63a LAB_001cb460: MOV RBX,RAX LEA R14,[RSP + 0x40] MOV RDI,R14 XOR ESI,ESI CALL 0x0019524a MOV RDI,R14 CALL 0x0013488a LEA RDI,[RSP + 0x38] CALL 0x00146496 LEA RDI,[RSP + 0x28] CALL 0x00146496 LEA R14,[RSP + 0x18] MOV RDI,R14 CALL 0x00146496 MOV RDI,qword ptr [R14 + -0x10] TEST RDI,RDI JZ 0x001cb4d0 MOV RAX,qword ptr [0x0026df98] CMP byte ptr [RAX],0x0 JZ 0x001cb4bb MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x001cb4c5 LAB_001cb4bb: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_001cb4c5: CMP EAX,0x1 JNZ 0x001cb4d0 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_001cb4d0: MOV RAX,RBX ADD RSP,0x50 POP RBX POP R14 POP R15 RET
/* long minja::Value::get<long>(std::__cxx11::string const&, long) const */ long __thiscall minja::Value::get<long>(Value *this,string *param_1,long param_2) { int *piVar1; char cVar2; int iVar3; Value *this_00; Value aVStack_68 [8]; long *local_60; __shared_count<(__gnu_cxx::_Lock_policy)2> local_50 [16]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_40 [16]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_30 [8]; data local_28 [16]; cVar2 = contains(this,param_1); if (cVar2 != '\0') { Value(aVStack_68,param_1); /* try { // try from 001cb44d to 001cb45f has its CatchHandler @ 001cb4dd */ this_00 = (Value *)at(this,aVStack_68); param_2 = get<long>(this_00); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_28,0)); 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> ::data::~data(local_28); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_30); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_40); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_50); if (local_60 != (long *)0x0) { if (*PTR___libc_single_threaded_0026df98 == '\0') { LOCK(); piVar1 = (int *)((long)local_60 + 0xc); iVar3 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar3 = *(int *)((long)local_60 + 0xc); *(int *)((long)local_60 + 0xc) = iVar3 + -1; } if (iVar3 == 1) { (**(code **)(*local_60 + 0x18))(); } } } return param_2; }
28,761
ma_row_pos_from_key
eloqsql/storage/maria/ma_search.c
MARIA_RECORD_POS _ma_row_pos_from_key(const MARIA_KEY *key) { my_off_t pos; const uchar *after_key= key->data + key->data_length; MARIA_SHARE *share= key->keyinfo->share; switch (share->rec_reflength) { #if SIZEOF_OFF_T > 4 case 8: pos= (my_off_t) mi_uint8korr(after_key); break; case 7: pos= (my_off_t) mi_uint7korr(after_key); break; case 6: pos= (my_off_t) mi_uint6korr(after_key); break; case 5: pos= (my_off_t) mi_uint5korr(after_key); break; #else case 8: pos= (my_off_t) mi_uint4korr(after_key+4); break; case 7: pos= (my_off_t) mi_uint4korr(after_key+3); break; case 6: pos= (my_off_t) mi_uint4korr(after_key+2); break; case 5: pos= (my_off_t) mi_uint4korr(after_key+1); break; #endif case 4: pos= (my_off_t) mi_uint4korr(after_key); break; case 3: pos= (my_off_t) mi_uint3korr(after_key); break; case 2: pos= (my_off_t) mi_uint2korr(after_key); break; case 0: /* NO_RECORD */ default: pos=0L; /* Shut compiler up */ } return (*share->keypos_to_recpos)(share, pos); }
O3
c
ma_row_pos_from_key: pushq %rbp movq %rsp, %rbp movq %rdi, %rax movq 0x8(%rdi), %rcx movq (%rcx), %rdi movl 0x740(%rdi), %edx addl $-0x2, %edx cmpl $0x6, %edx ja 0x6e7d2 movq (%rax), %rcx movl 0x10(%rax), %eax leaq 0x744e7(%rip), %rsi # 0xe2c78 movslq (%rsi,%rdx,4), %rdx addq %rsi, %rdx jmpq *%rdx movzwl (%rcx,%rax), %eax rolw $0x8, %ax movzwl %ax, %esi jmp 0x6e816 movl (%rcx,%rax), %esi movzwl 0x4(%rcx,%rax), %eax shlq $0x30, %rax shlq $0x10, %rsi jmp 0x6e80a movl (%rcx,%rax), %esi bswapl %esi jmp 0x6e816 movl (%rcx,%rax), %esi movzbl 0x4(%rcx,%rax), %eax shlq $0x38, %rax shlq $0x18, %rsi jmp 0x6e80a xorl %esi, %esi jmp 0x6e816 movzwl 0x1(%rcx,%rax), %edx rolw $0x8, %dx movzwl %dx, %edx movzbl (%rcx,%rax), %esi shll $0x10, %esi orq %rdx, %rsi jmp 0x6e816 movl (%rcx,%rax), %esi movzwl 0x4(%rcx,%rax), %edx movzbl 0x6(%rcx,%rax), %eax shlq $0x38, %rax shlq $0x28, %rdx shlq $0x8, %rsi orq %rdx, %rsi orq %rax, %rsi jmp 0x6e813 movq (%rcx,%rax), %rsi bswapq %rsi movq 0x6c8(%rdi), %rax popq %rbp jmpq *%rax
_ma_row_pos_from_key: push rbp mov rbp, rsp mov rax, rdi mov rcx, [rdi+8] mov rdi, [rcx] mov edx, [rdi+740h] add edx, 0FFFFFFFEh; switch 7 cases cmp edx, 6 ja short def_6E798; jumptable 000000000006E798 default case mov rcx, [rax] mov eax, [rax+10h] lea rsi, jpt_6E798 movsxd rdx, ds:(jpt_6E798 - 0E2C78h)[rsi+rdx*4] add rdx, rsi jmp rdx; switch jump loc_6E79A: movzx eax, word ptr [rcx+rax]; jumptable 000000000006E798 case 2 rol ax, 8 movzx esi, ax jmp short loc_6E816 loc_6E7A7: mov esi, [rcx+rax]; jumptable 000000000006E798 case 6 movzx eax, word ptr [rcx+rax+4] shl rax, 30h shl rsi, 10h jmp short loc_6E80A loc_6E7B9: mov esi, [rcx+rax]; jumptable 000000000006E798 case 4 bswap esi jmp short loc_6E816 loc_6E7C0: mov esi, [rcx+rax]; jumptable 000000000006E798 case 5 movzx eax, byte ptr [rcx+rax+4] shl rax, 38h shl rsi, 18h jmp short loc_6E80A def_6E798: xor esi, esi; jumptable 000000000006E798 default case jmp short loc_6E816 loc_6E7D6: movzx edx, word ptr [rcx+rax+1]; jumptable 000000000006E798 case 3 rol dx, 8 movzx edx, dx movzx esi, byte ptr [rcx+rax] shl esi, 10h or rsi, rdx jmp short loc_6E816 loc_6E7EE: mov esi, [rcx+rax]; jumptable 000000000006E798 case 7 movzx edx, word ptr [rcx+rax+4] movzx eax, byte ptr [rcx+rax+6] shl rax, 38h shl rdx, 28h shl rsi, 8 or rsi, rdx loc_6E80A: or rsi, rax jmp short loc_6E813 loc_6E80F: mov rsi, [rcx+rax]; jumptable 000000000006E798 case 8 loc_6E813: bswap rsi loc_6E816: mov rax, [rdi+6C8h] pop rbp jmp rax
long long ma_row_pos_from_key(long long *a1) { long long v2; // rdi long long v3; // rcx long long v4; // rax unsigned long long v5; // rsi long long v6; // rsi unsigned long long v7; // rax long long v8; // rsi long long v9; // rsi long long v10; // rsi long long v11; // rdx unsigned long long v12; // rsi v2 = *(_QWORD *)a1[1]; v3 = *a1; v4 = *((unsigned int *)a1 + 4); switch ( *(_DWORD *)(v2 + 1856) ) { case 2: v5 = (unsigned __int16)__ROL2__(*(_WORD *)(v3 + v4), 8); return (*(long long ( **)(long long, unsigned long long))(v2 + 1736))(v2, v5); case 3: v5 = (unsigned __int16)__ROL2__(*(_WORD *)(v3 + v4 + 1), 8) | (unsigned long long)(*(unsigned __int8 *)(v3 + v4) << 16); return (*(long long ( **)(long long, unsigned long long))(v2 + 1736))(v2, v5); case 4: v5 = _byteswap_ulong(*(_DWORD *)(v3 + v4)); return (*(long long ( **)(long long, unsigned long long))(v2 + 1736))(v2, v5); case 5: v9 = *(unsigned int *)(v3 + v4); v7 = (unsigned long long)*(unsigned __int8 *)(v3 + v4 + 4) << 56; v8 = v9 << 24; goto LABEL_9; case 6: v6 = *(unsigned int *)(v3 + v4); v7 = (unsigned long long)*(unsigned __int16 *)(v3 + v4 + 4) << 48; v8 = v6 << 16; goto LABEL_9; case 7: v10 = *(unsigned int *)(v3 + v4); v11 = *(unsigned __int16 *)(v3 + v4 + 4); v7 = (unsigned long long)*(unsigned __int8 *)(v3 + v4 + 6) << 56; v8 = (v11 << 40) | (v10 << 8); LABEL_9: v12 = v7 | v8; goto LABEL_11; case 8: v12 = *(_QWORD *)(v3 + v4); LABEL_11: v5 = _byteswap_uint64(v12); break; default: v5 = 0LL; break; } return (*(long long ( **)(long long, unsigned long long))(v2 + 1736))(v2, v5); }
_ma_row_pos_from_key: PUSH RBP MOV RBP,RSP MOV RAX,RDI MOV RCX,qword ptr [RDI + 0x8] MOV RDI,qword ptr [RCX] MOV EDX,dword ptr [RDI + 0x740] ADD EDX,-0x2 CMP EDX,0x6 JA 0x0016e7d2 MOV RCX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x10] LEA RSI,[0x1e2c78] MOVSXD RDX,dword ptr [RSI + RDX*0x4] ADD RDX,RSI switchD: JMP RDX caseD_2: MOVZX EAX,word ptr [RCX + RAX*0x1] ROL AX,0x8 MOVZX ESI,AX JMP 0x0016e816 caseD_6: MOV ESI,dword ptr [RCX + RAX*0x1] MOVZX EAX,word ptr [RCX + RAX*0x1 + 0x4] SHL RAX,0x30 SHL RSI,0x10 JMP 0x0016e80a caseD_4: MOV ESI,dword ptr [RCX + RAX*0x1] BSWAP ESI JMP 0x0016e816 caseD_5: MOV ESI,dword ptr [RCX + RAX*0x1] MOVZX EAX,byte ptr [RCX + RAX*0x1 + 0x4] SHL RAX,0x38 SHL RSI,0x18 JMP 0x0016e80a LAB_0016e7d2: XOR ESI,ESI JMP 0x0016e816 caseD_3: MOVZX EDX,word ptr [RCX + RAX*0x1 + 0x1] ROL DX,0x8 MOVZX EDX,DX MOVZX ESI,byte ptr [RCX + RAX*0x1] SHL ESI,0x10 OR RSI,RDX JMP 0x0016e816 caseD_7: MOV ESI,dword ptr [RCX + RAX*0x1] MOVZX EDX,word ptr [RCX + RAX*0x1 + 0x4] MOVZX EAX,byte ptr [RCX + RAX*0x1 + 0x6] SHL RAX,0x38 SHL RDX,0x28 SHL RSI,0x8 OR RSI,RDX LAB_0016e80a: OR RSI,RAX JMP 0x0016e813 caseD_8: MOV RSI,qword ptr [RCX + RAX*0x1] LAB_0016e813: BSWAP RSI LAB_0016e816: MOV RAX,qword ptr [RDI + 0x6c8] POP RBP JMP RAX
void _ma_row_pos_from_key(long *param_1) { ushort uVar1; uint uVar2; long lVar3; long lVar4; ulong uVar5; ulong uVar6; lVar3 = *(long *)param_1[1]; if (6 < *(int *)(lVar3 + 0x740) - 2U) { uVar6 = 0; goto LAB_0016e816; } lVar4 = *param_1; uVar6 = (ulong)*(uint *)(param_1 + 2); switch(*(int *)(lVar3 + 0x740)) { case 2: uVar6 = (ulong)(ushort)(*(ushort *)(lVar4 + uVar6) << 8 | *(ushort *)(lVar4 + uVar6) >> 8); goto LAB_0016e816; case 3: uVar1 = *(ushort *)(lVar4 + 1 + uVar6); uVar6 = (ulong)CONCAT12(*(int1 *)(lVar4 + uVar6),uVar1 << 8 | uVar1 >> 8); goto LAB_0016e816; case 4: uVar2 = *(uint *)(lVar4 + uVar6); uVar6 = (ulong)(uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18) ; goto LAB_0016e816; case 5: uVar5 = (ulong)*(byte *)(lVar4 + 4 + uVar6) << 0x38; uVar6 = (ulong)*(uint *)(lVar4 + uVar6) << 0x18; break; case 6: uVar5 = (ulong)*(ushort *)(lVar4 + 4 + uVar6) << 0x30; uVar6 = (ulong)*(uint *)(lVar4 + uVar6) << 0x10; break; case 7: uVar5 = (ulong)*(byte *)(lVar4 + 6 + uVar6) << 0x38; uVar6 = (ulong)*(uint *)(lVar4 + uVar6) << 8 | (ulong)*(ushort *)(lVar4 + 4 + uVar6) << 0x28; break; case 8: uVar6 = *(ulong *)(lVar4 + uVar6); goto LAB_0016e813; } uVar6 = uVar6 | uVar5; LAB_0016e813: uVar6 = uVar6 >> 0x38 | (uVar6 & 0xff000000000000) >> 0x28 | (uVar6 & 0xff0000000000) >> 0x18 | (uVar6 & 0xff00000000) >> 8 | (uVar6 & 0xff000000) << 8 | (uVar6 & 0xff0000) << 0x18 | (uVar6 & 0xff00) << 0x28 | uVar6 << 0x38; LAB_0016e816: /* WARNING: Could not recover jumptable at 0x0016e81e. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(lVar3 + 0x6c8))(lVar3,uVar6); return; }
28,762
google::protobuf::compiler::cpp::ExtensionName[abi:cxx11](google::protobuf::FieldDescriptor const*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/cpp/helpers.cc
std::string ExtensionName(const FieldDescriptor* d) { if (const Descriptor* scope = d->extension_scope()) return StrCat(ClassName(scope), "::", ResolveKeyword(d->name())); return ResolveKeyword(d->name()); }
O3
cpp
google::protobuf::compiler::cpp::ExtensionName[abi:cxx11](google::protobuf::FieldDescriptor const*): pushq %r15 pushq %r14 pushq %rbx subq $0xe0, %rsp movq %rsi, %r14 movq %rdi, %rbx testb $0x8, 0x1(%rsi) jne 0x349b0 leaq 0x169537(%rip), %rdx # 0x19dea7 leaq 0x48(%rsp), %r15 movq %r15, %rdi movl $0x3, %esi movl $0x8e6, %ecx # imm = 0x8E6 callq 0x1072ba leaq 0x16957f(%rip), %rsi # 0x19df0d movq %r15, %rdi callq 0x106db8 leaq 0x80(%rsp), %rdi movq %rax, %rsi callq 0x106e92 leaq 0x48(%rsp), %rdi callq 0x1072d8 movq 0x28(%r14), %rsi testq %rsi, %rsi je 0x34a49 leaq 0x28(%rsp), %r15 movq %r15, %rdi callq 0x3422a movups (%r15), %xmm0 movups %xmm0, 0x48(%rsp) leaq 0x196ee4(%rip), %rax # 0x1cb8be movq %rax, 0x80(%rsp) movq $0x2, 0x88(%rsp) movq 0x8(%r14), %rsi leaq 0x8(%rsp), %rdi callq 0x34392 movups 0x8(%rsp), %xmm0 leaq 0xb0(%rsp), %rcx movups %xmm0, (%rcx) leaq 0x48(%rsp), %rsi leaq 0x80(%rsp), %rdx movq %rbx, %rdi callq 0x10b516 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x34a34 callq 0x1f4a0 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x34a55 callq 0x1f4a0 jmp 0x34a55 movq 0x8(%r14), %rsi movq %rbx, %rdi callq 0x34392 movq %rbx, %rax addq $0xe0, %rsp popq %rbx popq %r14 popq %r15 retq jmp 0x34a67 movq %rax, %rbx leaq 0x48(%rsp), %rdi callq 0x1072d8 jmp 0x34aa4 movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x34a91 callq 0x1f4a0 jmp 0x34a91 movq %rax, %rbx leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x34aa4 callq 0x1f4a0 movq %rbx, %rdi callq 0x1f860
_ZN6google8protobuf8compiler3cpp13ExtensionNameB5cxx11EPKNS0_15FieldDescriptorE: push r15 push r14 push rbx sub rsp, 0E0h mov r14, rsi mov rbx, rdi test byte ptr [rsi+1], 8 jnz short loc_349B0 lea rdx, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/aimrt_"... lea r15, [rsp+0F8h+var_B0] mov rdi, r15 mov esi, 3 mov ecx, 8E6h call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) lea rsi, aCheckFailedIsE; "CHECK failed: is_extension_: " mov rdi, r15 call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) lea rdi, [rsp+0F8h+var_78] mov rsi, rax call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) lea rdi, [rsp+0F8h+var_B0]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_349B0: mov rsi, [r14+28h]; int test rsi, rsi jz loc_34A49 lea r15, [rsp+0F8h+var_D0] mov rdi, r15; int call _ZN6google8protobuf8compiler3cpp9ClassNameB5cxx11EPKNS0_10DescriptorE; google::protobuf::compiler::cpp::ClassName(google::protobuf::Descriptor const*) movups xmm0, xmmword ptr [r15] movups [rsp+0F8h+var_B0], xmm0 lea rax, asc_1CB8BC+2; "::" mov [rsp+0F8h+var_78], rax mov [rsp+0F8h+var_70], 2 mov rsi, [r14+8] lea rdi, [rsp+0F8h+var_F0] call _ZN6google8protobuf8compiler3cpp14ResolveKeywordERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::compiler::cpp::ResolveKeyword(std::string const&) movups xmm0, [rsp+0F8h+var_F0] lea rcx, [rsp+0F8h+var_48] movups xmmword ptr [rcx], xmm0 lea rsi, [rsp+0F8h+var_B0] lea rdx, [rsp+0F8h+var_78] mov rdi, rbx call _ZN6google8protobuf6StrCatB5cxx11ERKNS0_7strings8AlphaNumES4_S4_; google::protobuf::StrCat(google::protobuf::strings::AlphaNum const&,google::protobuf::strings::AlphaNum const&,google::protobuf::strings::AlphaNum const&) lea rax, [rsp+0F8h+var_E0] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_34A34 call __ZdlPv; operator delete(void *) loc_34A34: lea rax, [rsp+0F8h+var_C0] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_34A55 call __ZdlPv; operator delete(void *) jmp short loc_34A55 loc_34A49: mov rsi, [r14+8] mov rdi, rbx call _ZN6google8protobuf8compiler3cpp14ResolveKeywordERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::compiler::cpp::ResolveKeyword(std::string const&) loc_34A55: mov rax, rbx add rsp, 0E0h pop rbx pop r14 pop r15 retn jmp short $+2 loc_34A67: mov rbx, rax lea rdi, [rsp+arg_40]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() jmp short loc_34AA4 mov rbx, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_34A91 call __ZdlPv; operator delete(void *) jmp short loc_34A91 mov rbx, rax loc_34A91: lea rax, [rsp+arg_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_34AA4 call __ZdlPv; operator delete(void *) loc_34AA4: mov rdi, rbx call __Unwind_Resume
_QWORD * google::protobuf::compiler::cpp::ExtensionName[abi:cxx11]( _QWORD *a1, long long a2, int a3, int a4, int a5, int a6) { long long v7; // rax long long v8; // rsi __int128 v10; // [rsp+8h] [rbp-F0h] BYREF char v11; // [rsp+18h] [rbp-E0h] BYREF __int128 v12; // [rsp+28h] [rbp-D0h] BYREF char v13; // [rsp+38h] [rbp-C0h] BYREF _OWORD v14[3]; // [rsp+48h] [rbp-B0h] BYREF _QWORD v15[6]; // [rsp+80h] [rbp-78h] BYREF __int128 v16; // [rsp+B0h] [rbp-48h] if ( (*(_BYTE *)(a2 + 1) & 8) == 0 ) { google::protobuf::internal::LogMessage::LogMessage( v14, 3LL, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.h", 2278LL); v7 = google::protobuf::internal::LogMessage::operator<<(v14, "CHECK failed: is_extension_: "); google::protobuf::internal::LogFinisher::operator=(v15, v7); google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v14); } v8 = *(_QWORD *)(a2 + 40); if ( v8 ) { google::protobuf::compiler::cpp::ClassName[abi:cxx11]((long long)&v12, v8, a3, a4, a5, a6); v14[0] = v12; v15[0] = "::"; v15[1] = 2LL; google::protobuf::compiler::cpp::ResolveKeyword(&v10, *(_BYTE ***)(a2 + 8)); v16 = v10; google::protobuf::StrCat[abi:cxx11](a1); if ( (char *)v10 != &v11 ) operator delete((void *)v10); if ( (char *)v12 != &v13 ) operator delete((void *)v12); } else { google::protobuf::compiler::cpp::ResolveKeyword(a1, *(_BYTE ***)(a2 + 8)); } return a1; }
ExtensionName[abi:cxx11]: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0xe0 MOV R14,RSI MOV RBX,RDI TEST byte ptr [RSI + 0x1],0x8 JNZ 0x001349b0 LEA RDX,[0x29dea7] LEA R15,[RSP + 0x48] MOV RDI,R15 MOV ESI,0x3 MOV ECX,0x8e6 CALL 0x002072ba LAB_00134987: LEA RSI,[0x29df0d] MOV RDI,R15 CALL 0x00206db8 LAB_00134996: LEA RDI,[RSP + 0x80] MOV RSI,RAX CALL 0x00206e92 LAB_001349a6: LEA RDI,[RSP + 0x48] CALL 0x002072d8 LAB_001349b0: MOV RSI,qword ptr [R14 + 0x28] TEST RSI,RSI JZ 0x00134a49 LEA R15,[RSP + 0x28] MOV RDI,R15 CALL 0x0013422a MOVUPS XMM0,xmmword ptr [R15] MOVUPS xmmword ptr [RSP + 0x48],XMM0 LEA RAX,[0x2cb8be] MOV qword ptr [RSP + 0x80],RAX MOV qword ptr [RSP + 0x88],0x2 MOV RSI,qword ptr [R14 + 0x8] LAB_001349f2: LEA RDI,[RSP + 0x8] CALL 0x00134392 MOVUPS XMM0,xmmword ptr [RSP + 0x8] LEA RCX,[RSP + 0xb0] MOVUPS xmmword ptr [RCX],XMM0 LAB_00134a0c: LEA RSI,[RSP + 0x48] LEA RDX,[RSP + 0x80] MOV RDI,RBX CALL 0x0020b516 LAB_00134a21: LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00134a34 CALL 0x0011f4a0 LAB_00134a34: LEA RAX,[RSP + 0x38] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00134a55 CALL 0x0011f4a0 JMP 0x00134a55 LAB_00134a49: MOV RSI,qword ptr [R14 + 0x8] MOV RDI,RBX CALL 0x00134392 LAB_00134a55: MOV RAX,RBX ADD RSP,0xe0 POP RBX POP R14 POP R15 RET
/* google::protobuf::compiler::cpp::ExtensionName[abi:cxx11](google::protobuf::FieldDescriptor const*) */ cpp * __thiscall google::protobuf::compiler::cpp::ExtensionName_abi_cxx11_(cpp *this,FieldDescriptor *param_1) { LogMessage *pLVar1; int1 *local_f0; int8 uStack_e8; int1 local_e0 [16]; int1 *local_d0; int8 uStack_c8; int1 local_c0 [16]; int1 *local_b0; int8 uStack_a8; int *local_78; int8 local_70; int1 *local_48; int8 uStack_40; if (((byte)param_1[1] & 8) == 0) { internal::LogMessage::LogMessage ((LogMessage *)&local_b0,3, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.h" ,0x8e6); /* try { // try from 00134987 to 00134995 has its CatchHandler @ 00134a67 */ pLVar1 = (LogMessage *) internal::LogMessage::operator<< ((LogMessage *)&local_b0,"CHECK failed: is_extension_: "); /* try { // try from 00134996 to 001349a5 has its CatchHandler @ 00134a65 */ internal::LogFinisher::operator=((LogFinisher *)&local_78,pLVar1); internal::LogMessage::~LogMessage((LogMessage *)&local_b0); } if (*(Descriptor **)(param_1 + 0x28) == (Descriptor *)0x0) { ResolveKeyword(this,*(string **)(param_1 + 8)); } else { ClassName_abi_cxx11_((cpp *)&local_d0,*(Descriptor **)(param_1 + 0x28)); local_b0 = local_d0; uStack_a8 = uStack_c8; local_78 = &DAT_002cb8be; local_70 = 2; /* try { // try from 001349f2 to 001349fb has its CatchHandler @ 00134a8e */ ResolveKeyword((cpp *)&local_f0,*(string **)(param_1 + 8)); local_48 = local_f0; uStack_40 = uStack_e8; /* try { // try from 00134a0c to 00134a20 has its CatchHandler @ 00134a76 */ StrCat_abi_cxx11_((protobuf *)this,(AlphaNum *)&local_b0,(AlphaNum *)&local_78, (AlphaNum *)&local_48); if (local_f0 != local_e0) { operator_delete(local_f0); } if (local_d0 != local_c0) { operator_delete(local_d0); } } return this; }
28,763
ma_net_flush
eloqsql/libmariadb/libmariadb/ma_net.c
int ma_net_flush(NET *net) { int error=0; /* don't flush if pipelined query is in progress */ if (net->extension->multi_status > COM_MULTI_OFF) return 0; if (net->buff != net->write_pos) { error=ma_net_real_write(net,(char*) net->buff, (size_t) (net->write_pos - net->buff)); net->write_pos=net->buff; } if (net->compress) net->pkt_nr= net->compress_pkt_nr; return(error); }
O3
c
ma_net_flush: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq 0x2a0(%rdi), %rcx xorl %eax, %eax cmpl $0x0, (%rcx) jne 0x32c70 movq %rdi, %rbx movq 0x8(%rdi), %rsi movq 0x18(%rdi), %rdx cmpq %rdx, %rsi je 0x32c5f subq %rsi, %rdx movq %rbx, %rdi callq 0x32c77 movq 0x8(%rbx), %rcx movq %rcx, 0x18(%rbx) jmp 0x32c61 xorl %eax, %eax cmpb $0x0, 0x84(%rbx) je 0x32c70 movl 0x64(%rbx), %ecx movl %ecx, 0x60(%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq
ma_net_flush: push rbp mov rbp, rsp push rbx push rax mov rcx, [rdi+2A0h] xor eax, eax cmp dword ptr [rcx], 0 jnz short loc_32C70 mov rbx, rdi mov rsi, [rdi+8] mov rdx, [rdi+18h] cmp rsi, rdx jz short loc_32C5F sub rdx, rsi mov rdi, rbx call ma_net_real_write mov rcx, [rbx+8] mov [rbx+18h], rcx jmp short loc_32C61 loc_32C5F: xor eax, eax loc_32C61: cmp byte ptr [rbx+84h], 0 jz short loc_32C70 mov ecx, [rbx+64h] mov [rbx+60h], ecx loc_32C70: add rsp, 8 pop rbx pop rbp retn
long long ma_net_flush(long long a1) { long long result; // rax long long v2; // rsi long long v3; // rdx result = 0LL; if ( !**(_DWORD **)(a1 + 672) ) { v2 = *(_QWORD *)(a1 + 8); v3 = *(_QWORD *)(a1 + 24); if ( v2 == v3 ) { result = 0LL; } else { result = ma_net_real_write(a1, v2, v3 - v2); *(_QWORD *)(a1 + 24) = *(_QWORD *)(a1 + 8); } if ( *(_BYTE *)(a1 + 132) ) *(_DWORD *)(a1 + 96) = *(_DWORD *)(a1 + 100); } return result; }
ma_net_flush: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RCX,qword ptr [RDI + 0x2a0] XOR EAX,EAX CMP dword ptr [RCX],0x0 JNZ 0x00132c70 MOV RBX,RDI MOV RSI,qword ptr [RDI + 0x8] MOV RDX,qword ptr [RDI + 0x18] CMP RSI,RDX JZ 0x00132c5f SUB RDX,RSI MOV RDI,RBX CALL 0x00132c77 MOV RCX,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x18],RCX JMP 0x00132c61 LAB_00132c5f: XOR EAX,EAX LAB_00132c61: CMP byte ptr [RBX + 0x84],0x0 JZ 0x00132c70 MOV ECX,dword ptr [RBX + 0x64] MOV dword ptr [RBX + 0x60],ECX LAB_00132c70: ADD RSP,0x8 POP RBX POP RBP RET
int8 ma_net_flush(long param_1) { long lVar1; int8 uVar2; uVar2 = 0; if (**(int **)(param_1 + 0x2a0) == 0) { lVar1 = *(long *)(param_1 + 8); if (lVar1 == *(long *)(param_1 + 0x18)) { uVar2 = 0; } else { uVar2 = ma_net_real_write(param_1,lVar1,*(long *)(param_1 + 0x18) - lVar1); *(int8 *)(param_1 + 0x18) = *(int8 *)(param_1 + 8); } if (*(char *)(param_1 + 0x84) != '\0') { *(int4 *)(param_1 + 0x60) = *(int4 *)(param_1 + 100); } } return uVar2; }
28,764
psi_mutex_lock
eloqsql/mysys/my_thr_init.c
ATTRIBUTE_COLD int psi_mutex_lock(mysql_mutex_t *that, const char *file, uint line) { PSI_mutex_locker_state state; PSI_mutex_locker *locker= PSI_MUTEX_CALL(start_mutex_wait) (&state, that->m_psi, PSI_MUTEX_LOCK, file, line); # ifdef SAFE_MUTEX int result= safe_mutex_lock(&that->m_mutex, FALSE, file, line); # else int result= pthread_mutex_lock(&that->m_mutex); # endif if (locker) PSI_MUTEX_CALL(end_mutex_wait)(locker, result); return result; }
O0
c
psi_mutex_lock: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) leaq 0x1bd4fe(%rip), %rax # 0x24a5f8 movq (%rax), %rax movq 0x190(%rax), %rax movq -0x8(%rbp), %rcx movq 0x40(%rcx), %rsi movq -0x10(%rbp), %rcx movl -0x14(%rbp), %r8d leaq -0x48(%rbp), %rdi xorl %edx, %edx callq *%rax movq %rax, -0x50(%rbp) movq -0x8(%rbp), %rdi callq 0x38290 movl %eax, -0x54(%rbp) cmpq $0x0, -0x50(%rbp) je 0x8d14d leaq 0x1bd4be(%rip), %rax # 0x24a5f8 movq (%rax), %rax movq 0x198(%rax), %rax movq -0x50(%rbp), %rdi movl -0x54(%rbp), %esi callq *%rax movl -0x54(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
psi_mutex_lock: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx lea rax, PSI_server mov rax, [rax] mov rax, [rax+190h] mov rcx, [rbp+var_8] mov rsi, [rcx+40h] mov rcx, [rbp+var_10] mov r8d, [rbp+var_14] lea rdi, [rbp+var_48] xor edx, edx call rax mov [rbp+var_50], rax mov rdi, [rbp+var_8] call _pthread_mutex_lock mov [rbp+var_54], eax cmp [rbp+var_50], 0 jz short loc_8D14D lea rax, PSI_server mov rax, [rax] mov rax, [rax+198h] mov rdi, [rbp+var_50] mov esi, [rbp+var_54] call rax loc_8D14D: mov eax, [rbp+var_54] add rsp, 60h pop rbp retn
long long psi_mutex_lock(long long a1, long long a2, unsigned int a3) { unsigned int v4; // [rsp+Ch] [rbp-54h] long long v5; // [rsp+10h] [rbp-50h] _BYTE v6[52]; // [rsp+18h] [rbp-48h] BYREF unsigned int v7; // [rsp+4Ch] [rbp-14h] long long v8; // [rsp+50h] [rbp-10h] long long v9; // [rsp+58h] [rbp-8h] v9 = a1; v8 = a2; v7 = a3; v5 = (*((long long ( **)(_BYTE *, _QWORD, _QWORD, long long, _QWORD))PSI_server + 50))( v6, *(_QWORD *)(a1 + 64), 0LL, a2, a3); v4 = pthread_mutex_lock(v9); if ( v5 ) (*((void ( **)(long long, _QWORD))PSI_server + 51))(v5, v4); return v4; }
psi_mutex_lock: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX LEA RAX,[0x34a5f8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x190] MOV RCX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RCX + 0x40] MOV RCX,qword ptr [RBP + -0x10] MOV R8D,dword ptr [RBP + -0x14] LEA RDI,[RBP + -0x48] XOR EDX,EDX CALL RAX MOV qword ptr [RBP + -0x50],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x00138290 MOV dword ptr [RBP + -0x54],EAX CMP qword ptr [RBP + -0x50],0x0 JZ 0x0018d14d LEA RAX,[0x34a5f8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x198] MOV RDI,qword ptr [RBP + -0x50] MOV ESI,dword ptr [RBP + -0x54] CALL RAX LAB_0018d14d: MOV EAX,dword ptr [RBP + -0x54] ADD RSP,0x60 POP RBP RET
int psi_mutex_lock(pthread_mutex_t *param_1,int8 param_2,int4 param_3) { int iVar1; long lVar2; int1 local_50 [52]; int4 local_1c; int8 local_18; pthread_mutex_t *local_10; local_1c = param_3; local_18 = param_2; local_10 = param_1; lVar2 = (**(code **)(PSI_server + 400)) (local_50,*(int8 *)((long)param_1 + 0x40),0,param_2,param_3); iVar1 = pthread_mutex_lock(local_10); if (lVar2 != 0) { (**(code **)(PSI_server + 0x198))(lVar2,iVar1); } return iVar1; }
28,765
translog_scanner_eof
eloqsql/storage/maria/ma_loghandler.c
static my_bool translog_scanner_eof(TRANSLOG_SCANNER_DATA *scanner) { DBUG_ENTER("translog_scanner_eof"); DBUG_ASSERT(LSN_FILE_NO(scanner->page_addr) == LSN_FILE_NO(scanner->last_file_page)); DBUG_PRINT("enter", ("curr Page: 0x%lx last page: 0x%lx " "normal EOF: %d", (ulong) LSN_OFFSET(scanner->page_addr), (ulong) LSN_OFFSET(scanner->last_file_page), LSN_OFFSET(scanner->page_addr) == LSN_OFFSET(scanner->last_file_page))); /* TODO: detect damaged file EOF, TODO: issue warning if damaged file EOF detected */ DBUG_RETURN(scanner->page_addr == scanner->last_file_page); }
O0
c
translog_scanner_eof: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) jmp 0x615da jmp 0x615dc jmp 0x615de jmp 0x615e0 movq -0x8(%rbp), %rax movq 0x2000(%rax), %rax movq -0x8(%rbp), %rcx cmpq 0x2010(%rcx), %rax sete %al andb $0x1, %al movzbl %al, %eax movb %al, -0x9(%rbp) movb -0x9(%rbp), %al popq %rbp retq nopw %cs:(%rax,%rax)
translog_scanner_eof: push rbp mov rbp, rsp mov [rbp+var_8], rdi jmp short $+2 loc_615DA: jmp short $+2 loc_615DC: jmp short $+2 loc_615DE: jmp short $+2 loc_615E0: mov rax, [rbp+var_8] mov rax, [rax+2000h] mov rcx, [rbp+var_8] cmp rax, [rcx+2010h] setz al and al, 1 movzx eax, al mov [rbp+var_9], al mov al, [rbp+var_9] pop rbp retn
_BOOL8 translog_scanner_eof(long long a1) { return *(_QWORD *)(a1 + 0x2000) == *(_QWORD *)(a1 + 8208); }
translog_scanner_eof: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI JMP 0x001615da LAB_001615da: JMP 0x001615dc LAB_001615dc: JMP 0x001615de LAB_001615de: JMP 0x001615e0 LAB_001615e0: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x2000] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x2010] SETZ AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x9],AL MOV AL,byte ptr [RBP + -0x9] POP RBP RET
bool translog_scanner_eof(long param_1) { return *(long *)(param_1 + 0x2000) == *(long *)(param_1 + 0x2010); }
28,766
js_std_init_handlers
bluesky950520[P]quickjs/quickjs-libc.c
void js_std_init_handlers(JSRuntime *rt) { JSThreadState *ts; ts = js_mallocz_rt(rt, sizeof(*ts)); if (!ts) { fprintf(stderr, "Could not allocate memory for the worker"); exit(1); } init_list_head(&ts->os_rw_handlers); init_list_head(&ts->os_signal_handlers); init_list_head(&ts->os_timers); init_list_head(&ts->port_list); ts->next_timer_id = 1; ts->exc = JS_UNDEFINED; js_set_thread_state(rt, ts); JS_AddRuntimeFinalizer(rt, js_std_finalize, ts); #ifdef USE_WORKER /* set the SharedArrayBuffer memory handlers */ { JSSharedArrayBufferFunctions sf; memset(&sf, 0, sizeof(sf)); sf.sab_alloc = js_sab_alloc; sf.sab_free = js_sab_free; sf.sab_dup = js_sab_dup; JS_SetSharedArrayBufferFunctions(rt, &sf); } #endif }
O0
c
js_std_init_handlers: subq $0x48, %rsp movq %rdi, 0x40(%rsp) movq 0x40(%rsp), %rdi movl $0x80, %esi callq 0x21b60 movq %rax, 0x38(%rsp) cmpq $0x0, 0x38(%rsp) jne 0x11217 movq 0x124df4(%rip), %rax # 0x135ff0 movq (%rax), %rdi leaq 0xf889b(%rip), %rsi # 0x109aa1 movb $0x0, %al callq 0xe550 movl $0x1, %edi callq 0xe8b0 movq 0x38(%rsp), %rdi callq 0x112f0 movq 0x38(%rsp), %rdi addq $0x10, %rdi callq 0x112f0 movq 0x38(%rsp), %rdi addq $0x20, %rdi callq 0x112f0 movq 0x38(%rsp), %rdi addq $0x30, %rdi callq 0x112f0 movq 0x38(%rsp), %rax movq $0x1, 0x48(%rax) movq 0x38(%rsp), %rax movl $0x0, 0x28(%rsp) movq $0x3, 0x30(%rsp) movq 0x28(%rsp), %rcx movq %rcx, 0x50(%rax) movq 0x30(%rsp), %rcx movq %rcx, 0x58(%rax) movq 0x40(%rsp), %rdi movq 0x38(%rsp), %rsi callq 0x11320 movq 0x40(%rsp), %rdi movq 0x38(%rsp), %rdx leaq 0xb0(%rip), %rsi # 0x11350 callq 0x23730 leaq 0x8(%rsp), %rdi xorl %esi, %esi movl $0x20, %edx callq 0xe350 leaq 0xd3(%rip), %rax # 0x11390 movq %rax, 0x8(%rsp) leaq 0x127(%rip), %rax # 0x113f0 movq %rax, 0x10(%rsp) leaq 0x16b(%rip), %rax # 0x11440 movq %rax, 0x18(%rsp) movq 0x40(%rsp), %rdi leaq 0x8(%rsp), %rsi callq 0x238f0 addq $0x48, %rsp retq nop
js_std_init_handlers: sub rsp, 48h mov [rsp+48h+var_8], rdi mov rdi, [rsp+48h+var_8] mov esi, 80h call js_mallocz_rt mov [rsp+48h+var_10], rax cmp [rsp+48h+var_10], 0 jnz short loc_11217 mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aCouldNotAlloca; "Could not allocate memory for the worke"... mov al, 0 call _fprintf mov edi, 1 call _exit loc_11217: mov rdi, [rsp+48h+var_10] call init_list_head mov rdi, [rsp+48h+var_10] add rdi, 10h call init_list_head mov rdi, [rsp+48h+var_10] add rdi, 20h ; ' ' call init_list_head mov rdi, [rsp+48h+var_10] add rdi, 30h ; '0' call init_list_head mov rax, [rsp+48h+var_10] mov qword ptr [rax+48h], 1 mov rax, [rsp+48h+var_10] mov dword ptr [rsp+48h+var_20], 0 mov [rsp+48h+var_18], 3 mov rcx, [rsp+48h+var_20] mov [rax+50h], rcx mov rcx, [rsp+48h+var_18] mov [rax+58h], rcx mov rdi, [rsp+48h+var_8] mov rsi, [rsp+48h+var_10] call js_set_thread_state mov rdi, [rsp+48h+var_8] mov rdx, [rsp+48h+var_10] lea rsi, js_std_finalize call JS_AddRuntimeFinalizer lea rdi, [rsp+48h+var_40] xor esi, esi mov edx, 20h ; ' ' call _memset lea rax, js_sab_alloc mov [rsp+48h+var_40], rax lea rax, js_sab_free mov [rsp+48h+var_38], rax lea rax, js_sab_dup mov [rsp+48h+var_30], rax mov rdi, [rsp+48h+var_8] lea rsi, [rsp+48h+var_40] call JS_SetSharedArrayBufferFunctions add rsp, 48h retn
long long js_std_init_handlers(long long a1) { long long v1; // rax _QWORD v3[4]; // [rsp+8h] [rbp-40h] BYREF long long v4; // [rsp+28h] [rbp-20h] long long v5; // [rsp+30h] [rbp-18h] long long v6; // [rsp+38h] [rbp-10h] long long v7; // [rsp+40h] [rbp-8h] v7 = a1; v6 = js_mallocz_rt(a1, 128LL); if ( !v6 ) { fprintf(stderr, "Could not allocate memory for the worker"); exit(1LL); } init_list_head(v6); init_list_head(v6 + 16); init_list_head(v6 + 32); init_list_head(v6 + 48); *(_QWORD *)(v6 + 72) = 1LL; v1 = v6; LODWORD(v4) = 0; v5 = 3LL; *(_QWORD *)(v6 + 80) = v4; *(_QWORD *)(v1 + 88) = v5; js_set_thread_state(v7, v6); JS_AddRuntimeFinalizer(v7, js_std_finalize, v6); memset(v3, 0LL, sizeof(v3)); v3[0] = js_sab_alloc; v3[1] = js_sab_free; v3[2] = js_sab_dup; return JS_SetSharedArrayBufferFunctions(v7, v3); }
js_std_init_handlers: SUB RSP,0x48 MOV qword ptr [RSP + 0x40],RDI MOV RDI,qword ptr [RSP + 0x40] MOV ESI,0x80 CALL 0x00121b60 MOV qword ptr [RSP + 0x38],RAX CMP qword ptr [RSP + 0x38],0x0 JNZ 0x00111217 MOV RAX,qword ptr [0x00235ff0] MOV RDI,qword ptr [RAX] LEA RSI,[0x209aa1] MOV AL,0x0 CALL 0x0010e550 MOV EDI,0x1 CALL 0x0010e8b0 LAB_00111217: MOV RDI,qword ptr [RSP + 0x38] CALL 0x001112f0 MOV RDI,qword ptr [RSP + 0x38] ADD RDI,0x10 CALL 0x001112f0 MOV RDI,qword ptr [RSP + 0x38] ADD RDI,0x20 CALL 0x001112f0 MOV RDI,qword ptr [RSP + 0x38] ADD RDI,0x30 CALL 0x001112f0 MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RAX + 0x48],0x1 MOV RAX,qword ptr [RSP + 0x38] MOV dword ptr [RSP + 0x28],0x0 MOV qword ptr [RSP + 0x30],0x3 MOV RCX,qword ptr [RSP + 0x28] MOV qword ptr [RAX + 0x50],RCX MOV RCX,qword ptr [RSP + 0x30] MOV qword ptr [RAX + 0x58],RCX MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x38] CALL 0x00111320 MOV RDI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x38] LEA RSI,[0x111350] CALL 0x00123730 LEA RDI,[RSP + 0x8] XOR ESI,ESI MOV EDX,0x20 CALL 0x0010e350 LEA RAX,[0x111390] MOV qword ptr [RSP + 0x8],RAX LEA RAX,[0x1113f0] MOV qword ptr [RSP + 0x10],RAX LEA RAX,[0x111440] MOV qword ptr [RSP + 0x18],RAX MOV RDI,qword ptr [RSP + 0x40] LEA RSI,[RSP + 0x8] CALL 0x001238f0 ADD RSP,0x48 RET
void js_std_init_handlers(int8 param_1) { code *local_40; code *local_38; code *local_30; int4 local_20; uint uStack_1c; int8 local_18; long local_10; int8 local_8; local_8 = param_1; local_10 = js_mallocz_rt(param_1,0x80); if (local_10 == 0) { fprintf(*(FILE **)PTR_stderr_00235ff0,"Could not allocate memory for the worker"); /* WARNING: Subroutine does not return */ exit(1); } init_list_head(local_10); init_list_head(local_10 + 0x10); init_list_head(local_10 + 0x20); init_list_head(local_10 + 0x30); *(int8 *)(local_10 + 0x48) = 1; local_20 = 0; local_18 = 3; *(ulong *)(local_10 + 0x50) = (ulong)uStack_1c << 0x20; *(int8 *)(local_10 + 0x58) = 3; js_set_thread_state(local_8,local_10); JS_AddRuntimeFinalizer(local_8,js_std_finalize,local_10); memset(&local_40,0,0x20); local_40 = js_sab_alloc; local_38 = js_sab_free; local_30 = js_sab_dup; JS_SetSharedArrayBufferFunctions(local_8,&local_40); return; }
28,767
js_std_init_handlers
bluesky950520[P]quickjs/quickjs-libc.c
void js_std_init_handlers(JSRuntime *rt) { JSThreadState *ts; ts = js_mallocz_rt(rt, sizeof(*ts)); if (!ts) { fprintf(stderr, "Could not allocate memory for the worker"); exit(1); } init_list_head(&ts->os_rw_handlers); init_list_head(&ts->os_signal_handlers); init_list_head(&ts->os_timers); init_list_head(&ts->port_list); ts->next_timer_id = 1; ts->exc = JS_UNDEFINED; js_set_thread_state(rt, ts); JS_AddRuntimeFinalizer(rt, js_std_finalize, ts); #ifdef USE_WORKER /* set the SharedArrayBuffer memory handlers */ { JSSharedArrayBufferFunctions sf; memset(&sf, 0, sizeof(sf)); sf.sab_alloc = js_sab_alloc; sf.sab_free = js_sab_free; sf.sab_dup = js_sab_dup; JS_SetSharedArrayBufferFunctions(rt, &sf); } #endif }
O1
c
js_std_init_handlers: pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx movl $0x80, %esi callq 0xedbb testq %rax, %rax je 0x1520c movq %rax, %r14 movq %rax, (%rax) movq %rax, 0x8(%rax) addq $0x10, %rax movq %rax, 0x10(%r14) movq %rax, 0x18(%r14) leaq 0x20(%r14), %rax movq %rax, 0x20(%r14) movq %rax, 0x28(%r14) movq %r14, %rax addq $0x30, %rax movq %rax, 0x30(%r14) movq %rax, 0x38(%r14) movq $0x1, 0x48(%r14) movl $0x0, 0x50(%r14) movq $0x3, 0x58(%r14) movl $0x1, %edi movq %rbx, %rsi movq %r14, %rdx xorl %eax, %eax callq 0x3a5f3 leaq 0x4d(%rip), %rsi # 0x15211 movq %rbx, %rdi movq %r14, %rdx callq 0xefdb xorps %xmm0, %xmm0 movq %rsp, %rsi movaps %xmm0, (%rsi) movaps %xmm0, 0x10(%rsi) leaq 0x5b(%rip), %rax # 0x1523e movq %rax, (%rsi) leaq 0x70(%rip), %rax # 0x1525d movq %rax, 0x8(%rsi) leaq 0x78(%rip), %rax # 0x15270 movq %rax, 0x10(%rsi) movq %rbx, %rdi callq 0x1d7bc addq $0x28, %rsp popq %rbx popq %r14 retq callq 0xea39
js_std_init_handlers: push r14 push rbx sub rsp, 28h mov rbx, rdi mov esi, 80h call js_mallocz_rt test rax, rax jz loc_1520C mov r14, rax mov [rax], rax mov [rax+8], rax add rax, 10h mov [r14+10h], rax mov [r14+18h], rax lea rax, [r14+20h] mov [r14+20h], rax mov [r14+28h], rax mov rax, r14 add rax, 30h ; '0' mov [r14+30h], rax mov [r14+38h], rax mov qword ptr [r14+48h], 1 mov dword ptr [r14+50h], 0 mov qword ptr [r14+58h], 3 mov edi, 1 mov rsi, rbx mov rdx, r14 xor eax, eax call js_std_cmd lea rsi, js_std_finalize mov rdi, rbx mov rdx, r14 call JS_AddRuntimeFinalizer xorps xmm0, xmm0 mov rsi, rsp movaps xmmword ptr [rsi], xmm0 movaps xmmword ptr [rsi+10h], xmm0 lea rax, js_sab_alloc mov [rsi], rax lea rax, js_sab_free mov [rsi+8], rax lea rax, js_sab_dup mov [rsi+10h], rax mov rdi, rbx call JS_SetSharedArrayBufferFunctions add rsp, 28h pop rbx pop r14 retn loc_1520C: call js_std_init_handlers_cold_1
long long js_std_init_handlers(long long a1) { _QWORD *v1; // rax int v2; // ecx int v3; // r8d int v4; // r9d long long v5; // r14 _QWORD *v6; // rax v1 = (_QWORD *)js_mallocz_rt(a1, 0x80uLL); if ( !v1 ) js_std_init_handlers_cold_1(); v5 = (long long)v1; *v1 = v1; v1[1] = v1; v6 = v1 + 2; *(_QWORD *)(v5 + 16) = v6; *(_QWORD *)(v5 + 24) = v6; *(_QWORD *)(v5 + 32) = v5 + 32; *(_QWORD *)(v5 + 40) = v5 + 32; *(_QWORD *)(v5 + 48) = v5 + 48; *(_QWORD *)(v5 + 56) = v5 + 48; *(_QWORD *)(v5 + 72) = 1LL; *(_DWORD *)(v5 + 80) = 0; *(_QWORD *)(v5 + 88) = 3LL; js_std_cmd(1, a1, v5, v2, v3, v4); JS_AddRuntimeFinalizer(a1, (long long)js_std_finalize, v5); return ((long long ( *)(long long))JS_SetSharedArrayBufferFunctions)(a1); }
js_std_init_handlers: PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,RDI MOV ESI,0x80 CALL 0x0010edbb TEST RAX,RAX JZ 0x0011520c MOV R14,RAX MOV qword ptr [RAX],RAX MOV qword ptr [RAX + 0x8],RAX ADD RAX,0x10 MOV qword ptr [R14 + 0x10],RAX MOV qword ptr [R14 + 0x18],RAX LEA RAX,[R14 + 0x20] MOV qword ptr [R14 + 0x20],RAX MOV qword ptr [R14 + 0x28],RAX MOV RAX,R14 ADD RAX,0x30 MOV qword ptr [R14 + 0x30],RAX MOV qword ptr [R14 + 0x38],RAX MOV qword ptr [R14 + 0x48],0x1 MOV dword ptr [R14 + 0x50],0x0 MOV qword ptr [R14 + 0x58],0x3 MOV EDI,0x1 MOV RSI,RBX MOV RDX,R14 XOR EAX,EAX CALL 0x0013a5f3 LEA RSI,[0x115211] MOV RDI,RBX MOV RDX,R14 CALL 0x0010efdb XORPS XMM0,XMM0 MOV RSI,RSP MOVAPS xmmword ptr [RSI],XMM0 MOVAPS xmmword ptr [RSI + 0x10],XMM0 LEA RAX,[0x11523e] MOV qword ptr [RSI],RAX LEA RAX,[0x11525d] MOV qword ptr [RSI + 0x8],RAX LEA RAX,[0x115270] MOV qword ptr [RSI + 0x10],RAX MOV RDI,RBX CALL 0x0011d7bc ADD RSP,0x28 POP RBX POP R14 RET LAB_0011520c: CALL 0x0010ea39
void js_std_init_handlers(int8 param_1) { long lVar1; int8 uVar2; int8 uVar3; uVar2 = 0x80; uVar3 = param_1; lVar1 = js_mallocz_rt(param_1,0x80); if (lVar1 != 0) { *(long *)lVar1 = lVar1; *(long *)(lVar1 + 8) = lVar1; *(long *)(lVar1 + 0x10) = lVar1 + 0x10; *(long *)(lVar1 + 0x18) = lVar1 + 0x10; *(long *)(lVar1 + 0x20) = lVar1 + 0x20; *(long *)(lVar1 + 0x28) = lVar1 + 0x20; *(long *)(lVar1 + 0x30) = lVar1 + 0x30; *(long *)(lVar1 + 0x38) = lVar1 + 0x30; *(int8 *)(lVar1 + 0x48) = 1; *(int4 *)(lVar1 + 0x50) = 0; *(int8 *)(lVar1 + 0x58) = 3; js_std_cmd(1,param_1,lVar1); JS_AddRuntimeFinalizer(param_1,js_std_finalize,lVar1); JS_SetSharedArrayBufferFunctions(param_1); return; } js_std_init_handlers_cold_1(); js_std_cmd(1,uVar3,0); js_free_rt(uVar3,uVar2); return; }
28,768
js_std_init_handlers
bluesky950520[P]quickjs/quickjs-libc.c
void js_std_init_handlers(JSRuntime *rt) { JSThreadState *ts; ts = js_mallocz_rt(rt, sizeof(*ts)); if (!ts) { fprintf(stderr, "Could not allocate memory for the worker"); exit(1); } init_list_head(&ts->os_rw_handlers); init_list_head(&ts->os_signal_handlers); init_list_head(&ts->os_timers); init_list_head(&ts->port_list); ts->next_timer_id = 1; ts->exc = JS_UNDEFINED; js_set_thread_state(rt, ts); JS_AddRuntimeFinalizer(rt, js_std_finalize, ts); #ifdef USE_WORKER /* set the SharedArrayBuffer memory handlers */ { JSSharedArrayBufferFunctions sf; memset(&sf, 0, sizeof(sf)); sf.sab_alloc = js_sab_alloc; sf.sab_free = js_sab_free; sf.sab_dup = js_sab_dup; JS_SetSharedArrayBufferFunctions(rt, &sf); } #endif }
O2
c
js_std_init_handlers: pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx movl $0x80, %esi callq 0x171a8 testq %rax, %rax je 0x10174 movq %rax, %r14 movq %rax, (%rax) movq %rax, 0x8(%rax) addq $0x10, %rax movq %rax, 0x10(%r14) movq %rax, 0x18(%r14) leaq 0x20(%r14), %rax movq %rax, 0x20(%r14) movq %rax, 0x28(%r14) movq %r14, %rax addq $0x30, %rax movq %rax, 0x30(%r14) movq %rax, 0x38(%r14) movq $0x1, 0x48(%r14) andl $0x0, 0x50(%r14) movq $0x3, 0x58(%r14) movq %rbx, %rdi movq %r14, %rsi callq 0x10198 leaq 0x79(%rip), %rsi # 0x101a8 movq %rbx, %rdi movq %r14, %rdx callq 0x17e05 leaq 0x8(%rsp), %rsi andq $0x0, 0x18(%rsi) leaq 0x80(%rip), %rax # 0x101cb movq %rax, (%rsi) leaq 0x95(%rip), %rax # 0x101ea movq %rax, 0x8(%rsi) leaq 0x9d(%rip), %rax # 0x101fd movq %rax, 0x10(%rsi) movq %rbx, %rdi callq 0x17e93 addq $0x28, %rsp popq %rbx popq %r14 retq movq 0xaae75(%rip), %rax # 0xbaff0 movq (%rax), %rcx leaq 0x727b0(%rip), %rdi # 0x82935 pushq $0x28 popq %rsi pushq $0x1 popq %rdx callq 0xe8f0 pushq $0x1 popq %rdi callq 0xe8e0
js_std_init_handlers: push r14 push rbx sub rsp, 28h mov rbx, rdi mov esi, 80h call js_mallocz_rt test rax, rax jz loc_10174 mov r14, rax mov [rax], rax mov [rax+8], rax add rax, 10h mov [r14+10h], rax mov [r14+18h], rax lea rax, [r14+20h] mov [r14+20h], rax mov [r14+28h], rax mov rax, r14 add rax, 30h ; '0' mov [r14+30h], rax mov [r14+38h], rax mov qword ptr [r14+48h], 1 and dword ptr [r14+50h], 0 mov qword ptr [r14+58h], 3 mov rdi, rbx mov rsi, r14 call js_set_thread_state lea rsi, js_std_finalize mov rdi, rbx mov rdx, r14 call JS_AddRuntimeFinalizer lea rsi, [rsp+38h+var_30] and qword ptr [rsi+18h], 0 lea rax, js_sab_alloc mov [rsi], rax lea rax, js_sab_free mov [rsi+8], rax lea rax, js_sab_dup mov [rsi+10h], rax mov rdi, rbx call JS_SetSharedArrayBufferFunctions add rsp, 28h pop rbx pop r14 retn loc_10174: mov rax, cs:stderr_ptr mov rcx, [rax] lea rdi, aCouldNotAlloca; "Could not allocate memory for the worke"... push 28h ; '(' pop rsi push 1 pop rdx call _fwrite push 1 pop rdi call _exit
long long js_std_init_handlers(long long a1) { _QWORD *v1; // rax _QWORD *v2; // r14 _QWORD *v3; // rax v1 = (_QWORD *)js_mallocz_rt(a1, 128LL); if ( !v1 ) { fwrite("Could not allocate memory for the worker", 40LL, 1LL, stderr); exit(1LL); } v2 = v1; *v1 = v1; v1[1] = v1; v3 = v1 + 2; v2[2] = v3; v2[3] = v3; v2[4] = v2 + 4; v2[5] = v2 + 4; v2[6] = v2 + 6; v2[7] = v2 + 6; v2[9] = 1LL; *((_DWORD *)v2 + 20) = 0; v2[11] = 3LL; js_set_thread_state(a1, v2); JS_AddRuntimeFinalizer(a1, js_std_finalize, v2); return JS_SetSharedArrayBufferFunctions(a1); }
js_std_init_handlers: PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,RDI MOV ESI,0x80 CALL 0x001171a8 TEST RAX,RAX JZ 0x00110174 MOV R14,RAX MOV qword ptr [RAX],RAX MOV qword ptr [RAX + 0x8],RAX ADD RAX,0x10 MOV qword ptr [R14 + 0x10],RAX MOV qword ptr [R14 + 0x18],RAX LEA RAX,[R14 + 0x20] MOV qword ptr [R14 + 0x20],RAX MOV qword ptr [R14 + 0x28],RAX MOV RAX,R14 ADD RAX,0x30 MOV qword ptr [R14 + 0x30],RAX MOV qword ptr [R14 + 0x38],RAX MOV qword ptr [R14 + 0x48],0x1 AND dword ptr [R14 + 0x50],0x0 MOV qword ptr [R14 + 0x58],0x3 MOV RDI,RBX MOV RSI,R14 CALL 0x00110198 LEA RSI,[0x1101a8] MOV RDI,RBX MOV RDX,R14 CALL 0x00117e05 LEA RSI,[RSP + 0x8] AND qword ptr [RSI + 0x18],0x0 LEA RAX,[0x1101cb] MOV qword ptr [RSI],RAX LEA RAX,[0x1101ea] MOV qword ptr [RSI + 0x8],RAX LEA RAX,[0x1101fd] MOV qword ptr [RSI + 0x10],RAX MOV RDI,RBX CALL 0x00117e93 ADD RSP,0x28 POP RBX POP R14 RET LAB_00110174: MOV RAX,qword ptr [0x001baff0] MOV RCX,qword ptr [RAX] LEA RDI,[0x182935] PUSH 0x28 POP RSI PUSH 0x1 POP RDX CALL 0x0010e8f0 PUSH 0x1 POP RDI CALL 0x0010e8e0
void js_std_init_handlers(int8 param_1) { long lVar1; lVar1 = js_mallocz_rt(param_1,0x80); if (lVar1 != 0) { *(long *)lVar1 = lVar1; *(long *)(lVar1 + 8) = lVar1; *(long *)(lVar1 + 0x10) = lVar1 + 0x10; *(long *)(lVar1 + 0x18) = lVar1 + 0x10; *(long *)(lVar1 + 0x20) = lVar1 + 0x20; *(long *)(lVar1 + 0x28) = lVar1 + 0x20; *(long *)(lVar1 + 0x30) = lVar1 + 0x30; *(long *)(lVar1 + 0x38) = lVar1 + 0x30; *(int8 *)(lVar1 + 0x48) = 1; *(int4 *)(lVar1 + 0x50) = 0; *(int8 *)(lVar1 + 0x58) = 3; js_set_thread_state(param_1,lVar1); JS_AddRuntimeFinalizer(param_1,js_std_finalize,lVar1); JS_SetSharedArrayBufferFunctions(param_1); return; } fwrite("Could not allocate memory for the worker",0x28,1,*(FILE **)PTR_stderr_001baff0); /* WARNING: Subroutine does not return */ exit(1); }
28,769
chess::Square::ep_square() const
Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp
[[nodiscard]] constexpr Square ep_square() const noexcept { assert(rank() == Rank::RANK_3 // capture || rank() == Rank::RANK_4 // push || rank() == Rank::RANK_5 // push || rank() == Rank::RANK_6 // capture ); return Square(static_cast<int>(sq) ^ 8); }
O0
cpp
chess::Square::ep_square() const: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rdi movq %rdi, -0x30(%rbp) callq 0x4bd0 movl %eax, -0x14(%rbp) leaq -0x14(%rbp), %rdi leaq 0x824d(%rip), %rsi # 0x22eb4 callq 0x84c0 movb %al, %cl movb $0x1, %al testb $0x1, %cl movb %al, -0x21(%rbp) jne 0x1ace7 movq -0x30(%rbp), %rdi callq 0x4bd0 movl %eax, -0x18(%rbp) leaq -0x18(%rbp), %rdi leaq 0xac01(%rip), %rsi # 0x25890 callq 0x84c0 movb %al, %cl movb $0x1, %al testb $0x1, %cl movb %al, -0x21(%rbp) jne 0x1ace7 movq -0x30(%rbp), %rdi callq 0x4bd0 movl %eax, -0x1c(%rbp) leaq -0x1c(%rbp), %rdi leaq 0xabdd(%rip), %rsi # 0x25894 callq 0x84c0 movb %al, %cl movb $0x1, %al testb $0x1, %cl movb %al, -0x21(%rbp) jne 0x1ace7 movq -0x30(%rbp), %rdi callq 0x4bd0 movl %eax, -0x20(%rbp) leaq -0x20(%rbp), %rdi leaq 0x81d9(%rip), %rsi # 0x22eb8 callq 0x84c0 movb %al, -0x21(%rbp) movb -0x21(%rbp), %al testb $0x1, %al jne 0x1acf0 jmp 0x1acf2 jmp 0x1ad11 leaq 0xa8be(%rip), %rdi # 0x255b7 leaq 0xa24c(%rip), %rsi # 0x24f4c movl $0x1ce, %edx # imm = 0x1CE leaq 0xa910(%rip), %rcx # 0x2561c callq 0x31c0 movq -0x30(%rbp), %rax movl (%rax), %esi xorl $0x8, %esi leaq -0x4(%rbp), %rdi callq 0x43a0 jmp 0x1ad25 movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq movq %rax, %rdi callq 0x4ef0 nopw %cs:(%rax,%rax)
_ZNK5chess6Square9ep_squareEv: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov rdi, [rbp+var_10]; this mov [rbp+var_30], rdi call _ZNK5chess6Square4rankEv; chess::Square::rank(void) mov [rbp+var_14], eax lea rdi, [rbp+var_14] lea rsi, _ZN5chess4Rank6RANK_3E; chess::Rank::RANK_3 call _ZNK5chess4RankeqERKNS0_10underlyingE; chess::Rank::operator==(chess::Rank::underlying const&) mov cl, al mov al, 1 test cl, 1 mov [rbp+var_21], al jnz short loc_1ACE7 mov rdi, [rbp+var_30]; this call _ZNK5chess6Square4rankEv; chess::Square::rank(void) mov [rbp+var_18], eax lea rdi, [rbp+var_18] lea rsi, _ZN5chess4Rank6RANK_4E; chess::Rank::RANK_4 call _ZNK5chess4RankeqERKNS0_10underlyingE; chess::Rank::operator==(chess::Rank::underlying const&) mov cl, al mov al, 1 test cl, 1 mov [rbp+var_21], al jnz short loc_1ACE7 mov rdi, [rbp+var_30]; this call _ZNK5chess6Square4rankEv; chess::Square::rank(void) mov [rbp+var_1C], eax lea rdi, [rbp+var_1C] lea rsi, _ZN5chess4Rank6RANK_5E; chess::Rank::RANK_5 call _ZNK5chess4RankeqERKNS0_10underlyingE; chess::Rank::operator==(chess::Rank::underlying const&) mov cl, al mov al, 1 test cl, 1 mov [rbp+var_21], al jnz short loc_1ACE7 mov rdi, [rbp+var_30]; this call _ZNK5chess6Square4rankEv; chess::Square::rank(void) mov [rbp+var_20], eax lea rdi, [rbp+var_20] lea rsi, _ZN5chess4Rank6RANK_6E; chess::Rank::RANK_6 call _ZNK5chess4RankeqERKNS0_10underlyingE; chess::Rank::operator==(chess::Rank::underlying const&) mov [rbp+var_21], al loc_1ACE7: mov al, [rbp+var_21] test al, 1 jnz short loc_1ACF0 jmp short loc_1ACF2 loc_1ACF0: jmp short loc_1AD11 loc_1ACF2: lea rdi, aRankRankRank3R; "rank() == Rank::RANK_3 || rank() == Ran"... lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov edx, 1CEh lea rcx, aSquareChessSqu; "Square chess::Square::ep_square() const" call ___assert_fail loc_1AD11: mov rax, [rbp+var_30] mov esi, [rax] xor esi, 8; int lea rdi, [rbp+var_4]; this call _ZN5chess6SquareC2Ei; chess::Square::Square(int) jmp short $+2 loc_1AD25: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn mov rdi, rax call __clang_call_terminate
long long chess::Square::ep_square(chess::Square *this) { bool v2; // [rsp+Fh] [rbp-21h] int v3; // [rsp+10h] [rbp-20h] BYREF int v4; // [rsp+14h] [rbp-1Ch] BYREF int v5; // [rsp+18h] [rbp-18h] BYREF int v6; // [rsp+1Ch] [rbp-14h] BYREF chess::Square *v7; // [rsp+20h] [rbp-10h] unsigned int v8; // [rsp+2Ch] [rbp-4h] BYREF v7 = this; v6 = chess::Square::rank(this); v2 = 1; if ( !chess::Rank::operator==(&v6, &chess::Rank::RANK_3) ) { v5 = chess::Square::rank(this); v2 = 1; if ( !chess::Rank::operator==(&v5, &chess::Rank::RANK_4) ) { v4 = chess::Square::rank(this); v2 = 1; if ( !chess::Rank::operator==(&v4, &chess::Rank::RANK_5) ) { v3 = chess::Square::rank(this); v2 = chess::Rank::operator==(&v3, &chess::Rank::RANK_6); } } } if ( !v2 ) __assert_fail( "rank() == Rank::RANK_3 || rank() == Rank::RANK_4 || rank() == Rank::RANK_5 || rank() == Rank::RANK_6", "/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp", 462LL, "Square chess::Square::ep_square() const"); chess::Square::Square((chess::Square *)&v8, *(_DWORD *)this ^ 8); return v8; }
ep_square: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV RDI,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x30],RDI CALL 0x00104bd0 MOV dword ptr [RBP + -0x14],EAX LEA RDI,[RBP + -0x14] LEA RSI,[0x122eb4] CALL 0x001084c0 MOV CL,AL MOV AL,0x1 TEST CL,0x1 MOV byte ptr [RBP + -0x21],AL JNZ 0x0011ace7 MOV RDI,qword ptr [RBP + -0x30] CALL 0x00104bd0 MOV dword ptr [RBP + -0x18],EAX LEA RDI,[RBP + -0x18] LEA RSI,[0x125890] CALL 0x001084c0 MOV CL,AL MOV AL,0x1 TEST CL,0x1 MOV byte ptr [RBP + -0x21],AL JNZ 0x0011ace7 MOV RDI,qword ptr [RBP + -0x30] CALL 0x00104bd0 MOV dword ptr [RBP + -0x1c],EAX LEA RDI,[RBP + -0x1c] LEA RSI,[0x125894] CALL 0x001084c0 MOV CL,AL MOV AL,0x1 TEST CL,0x1 MOV byte ptr [RBP + -0x21],AL JNZ 0x0011ace7 MOV RDI,qword ptr [RBP + -0x30] CALL 0x00104bd0 MOV dword ptr [RBP + -0x20],EAX LEA RDI,[RBP + -0x20] LEA RSI,[0x122eb8] CALL 0x001084c0 MOV byte ptr [RBP + -0x21],AL LAB_0011ace7: MOV AL,byte ptr [RBP + -0x21] TEST AL,0x1 JNZ 0x0011acf0 JMP 0x0011acf2 LAB_0011acf0: JMP 0x0011ad11 LAB_0011acf2: LEA RDI,[0x1255b7] LEA RSI,[0x124f4c] MOV EDX,0x1ce LEA RCX,[0x12561c] CALL 0x001031c0 LAB_0011ad11: MOV RAX,qword ptr [RBP + -0x30] MOV ESI,dword ptr [RAX] XOR ESI,0x8 LAB_0011ad1a: LEA RDI,[RBP + -0x4] CALL 0x001043a0 JMP 0x0011ad25 LAB_0011ad25: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
/* chess::Square::ep_square() const */ int4 __thiscall chess::Square::ep_square(Square *this) { byte bVar1; byte local_29; int4 local_28; int4 local_24; int4 local_20; int4 local_1c; Square *local_18; int4 local_c; local_18 = this; local_1c = rank(this); bVar1 = Rank::operator==((Rank *)&local_1c,(underlying *)&Rank::RANK_3); local_29 = 1; if ((bVar1 & 1) == 0) { local_20 = rank(this); bVar1 = Rank::operator==((Rank *)&local_20,(underlying *)&Rank::RANK_4); local_29 = 1; if ((bVar1 & 1) == 0) { local_24 = rank(this); bVar1 = Rank::operator==((Rank *)&local_24,(underlying *)&Rank::RANK_5); local_29 = 1; if ((bVar1 & 1) == 0) { local_28 = rank(this); local_29 = Rank::operator==((Rank *)&local_28,(underlying *)&Rank::RANK_6); } } } if ((local_29 & 1) == 0) { /* WARNING: Subroutine does not return */ __assert_fail("rank() == Rank::RANK_3 || rank() == Rank::RANK_4 || rank() == Rank::RANK_5 || rank() == Rank::RANK_6" , "/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp" ,0x1ce,"Square chess::Square::ep_square() const"); } /* try { // try from 0011ad1a to 0011ad22 has its CatchHandler @ 0011ad2e */ Square((Square *)&local_c,*(uint *)this ^ 8); return local_c; }
28,770
bc_get_u32
bluesky950520[P]quickjs/quickjs.c
static __maybe_unused int bc_get_u32(BCReaderState *s, uint32_t *pval) { uint32_t v; if (unlikely(s->buf_end - s->ptr < 4)) { *pval = 0; /* avoid warning */ return bc_read_error_end(s); } v = get_u32(s->ptr); if (is_be()) v = bswap32(v); *pval = v; s->ptr += 4; return 0; }
O0
c
bc_get_u32: subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq %rsi, 0x10(%rsp) movq 0x18(%rsp), %rax movq 0x18(%rax), %rax movq 0x18(%rsp), %rcx movq 0x10(%rcx), %rcx subq %rcx, %rax cmpq $0x4, %rax setl %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x7a2b6 movq 0x10(%rsp), %rax movl $0x0, (%rax) movq 0x18(%rsp), %rdi callq 0x7a490 movl %eax, 0x24(%rsp) jmp 0x7a302 movq 0x18(%rsp), %rax movq 0x10(%rax), %rdi callq 0x5f1b0 movl %eax, 0xc(%rsp) callq 0x2cc60 cmpb $0x0, %al je 0x7a2de movl 0xc(%rsp), %edi callq 0x79e30 movl %eax, 0xc(%rsp) movl 0xc(%rsp), %ecx movq 0x10(%rsp), %rax movl %ecx, (%rax) movq 0x18(%rsp), %rax movq 0x10(%rax), %rcx addq $0x4, %rcx movq %rcx, 0x10(%rax) movl $0x0, 0x24(%rsp) movl 0x24(%rsp), %eax addq $0x28, %rsp retq nopl (%rax,%rax)
bc_get_u32: sub rsp, 28h mov [rsp+28h+var_10], rdi mov [rsp+28h+var_18], rsi mov rax, [rsp+28h+var_10] mov rax, [rax+18h] mov rcx, [rsp+28h+var_10] mov rcx, [rcx+10h] sub rax, rcx cmp rax, 4 setl al xor al, 0FFh xor al, 0FFh and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_7A2B6 mov rax, [rsp+28h+var_18] mov dword ptr [rax], 0 mov rdi, [rsp+28h+var_10] call bc_read_error_end mov [rsp+28h+var_4], eax jmp short loc_7A302 loc_7A2B6: mov rax, [rsp+28h+var_10] mov rdi, [rax+10h] call get_u32 mov [rsp+28h+var_1C], eax call is_be_0 cmp al, 0 jz short loc_7A2DE mov edi, [rsp+28h+var_1C] call bswap32 mov [rsp+28h+var_1C], eax loc_7A2DE: mov ecx, [rsp+28h+var_1C] mov rax, [rsp+28h+var_18] mov [rax], ecx mov rax, [rsp+28h+var_10] mov rcx, [rax+10h] add rcx, 4 mov [rax+10h], rcx mov [rsp+28h+var_4], 0 loc_7A302: mov eax, [rsp+28h+var_4] add rsp, 28h retn
long long bc_get_u32(long long a1, int *a2) { int u32; // [rsp+Ch] [rbp-1Ch] if ( (long long)(*(_QWORD *)(a1 + 24) - *(_QWORD *)(a1 + 16)) >= 4 ) { u32 = get_u32(*(unsigned int **)(a1 + 16)); if ( is_be_0() ) u32 = bswap32(u32); *a2 = u32; *(_QWORD *)(a1 + 16) += 4LL; return 0; } else { *a2 = 0; return (unsigned int)bc_read_error_end(a1); } }
bc_get_u32: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV qword ptr [RSP + 0x10],RSI MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RCX + 0x10] SUB RAX,RCX CMP RAX,0x4 SETL AL XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x0017a2b6 MOV RAX,qword ptr [RSP + 0x10] MOV dword ptr [RAX],0x0 MOV RDI,qword ptr [RSP + 0x18] CALL 0x0017a490 MOV dword ptr [RSP + 0x24],EAX JMP 0x0017a302 LAB_0017a2b6: MOV RAX,qword ptr [RSP + 0x18] MOV RDI,qword ptr [RAX + 0x10] CALL 0x0015f1b0 MOV dword ptr [RSP + 0xc],EAX CALL 0x0012cc60 CMP AL,0x0 JZ 0x0017a2de MOV EDI,dword ptr [RSP + 0xc] CALL 0x00179e30 MOV dword ptr [RSP + 0xc],EAX LAB_0017a2de: MOV ECX,dword ptr [RSP + 0xc] MOV RAX,qword ptr [RSP + 0x10] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RAX + 0x10] ADD RCX,0x4 MOV qword ptr [RAX + 0x10],RCX MOV dword ptr [RSP + 0x24],0x0 LAB_0017a302: MOV EAX,dword ptr [RSP + 0x24] ADD RSP,0x28 RET
int4 bc_get_u32(long param_1,int4 *param_2) { char cVar1; int4 local_1c; int4 local_4; if (*(long *)(param_1 + 0x18) - *(long *)(param_1 + 0x10) < 4) { *param_2 = 0; local_4 = bc_read_error_end(param_1); } else { local_1c = get_u32(*(int8 *)(param_1 + 0x10)); cVar1 = is_be(); if (cVar1 != '\0') { local_1c = bswap32(local_1c); } *param_2 = local_1c; *(long *)(param_1 + 0x10) = *(long *)(param_1 + 0x10) + 4; local_4 = 0; } return local_4; }
28,771
OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::copyNonLinearSurface(OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData*, OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData const&, OpenSubdiv::v3_6_0::Bfr::FaceSurface const&) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surfaceFactory.cpp
SurfaceSet() : numSurfs(0), numFVarSurfs(0), vtxSurf(0), varSurf(0), fvarSurfs(0), fvarSurfPtrs(0), fvarIDs(0) { }
O2
cpp
OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::copyNonLinearSurface(OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData*, OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData const&, OpenSubdiv::v3_6_0::Bfr::FaceSurface const&) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x138, %rsp # imm = 0x138 testb $0x8, 0x6c(%rdx) jne 0xa971a movq %rcx, %r14 movq %rdx, %r15 movq %rsi, %rbx movl 0x68(%rdx), %eax movl %eax, 0x68(%rsi) movb 0x6c(%rdx), %al andb $0x8, %al movb 0x6c(%rsi), %cl andb $-0x9, %cl orb %al, %cl movb %cl, 0x6c(%rsi) movb 0x6c(%rdx), %al andb $0x4, %al andb $-0x5, %cl orb %al, %cl movb %cl, 0x6c(%rsi) movl 0x8(%rdx), %esi movq %rbx, %rdi callq 0x52960 testb $0x4, 0x6c(%rbx) jne 0xa96d3 addq $0x70, %r15 leaq 0x10(%rsp), %r12 movq %r12, %rdi movq %r15, %rsi callq 0x4f950 leaq 0x70(%rbx), %rdi movq %r12, %rsi callq 0x54820 leaq 0x18(%rsp), %rdi callq 0x528d0 movabsq $0x200000006, %rax # imm = 0x200000006 leaq 0x4(%rsp), %rdx movq %rax, (%rdx) movb $0x0, 0x8(%rdx) leaq 0x10(%rsp), %r15 movq %r15, %rdi movq %r14, %rsi callq 0x502e0 movl 0x14(%r15), %eax cmpl 0x8(%rbx), %eax jne 0xa9739 movq (%rbx), %rsi leaq 0x10(%rsp), %rdi callq 0x4f050 leaq 0x10(%rsp), %rdi callq 0x52c40 jmp 0xa9707 movb 0x6d(%r15), %al movb %al, 0x6d(%rbx) movb 0x6e(%r15), %al movb %al, 0x6e(%rbx) leaq 0x10(%rsp), %r15 movq %r15, %rdi movq %r14, %rsi callq 0x55110 movl 0x10(%r15), %eax cmpl 0x8(%rbx), %eax jne 0xa9758 movq (%rbx), %rsi leaq 0x10(%rsp), %rdi callq 0x50e30 orb $0x1, 0x6c(%rbx) addq $0x138, %rsp # imm = 0x138 popq %rbx popq %r12 popq %r14 popq %r15 retq leaq 0x22e3e(%rip), %rdi # 0xcc55f leaq 0x22cab(%rip), %rsi # 0xcc3d3 leaq 0x22e47(%rip), %rcx # 0xcc576 movl $0x372, %edx # imm = 0x372 callq 0x512a0 leaq 0x22eb8(%rip), %rdi # 0xcc5f8 leaq 0x22c8c(%rip), %rsi # 0xcc3d3 leaq 0x22e28(%rip), %rcx # 0xcc576 movl $0x390, %edx # imm = 0x390 callq 0x512a0 leaq 0x22e99(%rip), %rdi # 0xcc5f8 leaq 0x22c6d(%rip), %rsi # 0xcc3d3 leaq 0x22e09(%rip), %rcx # 0xcc576 movl $0x386, %edx # imm = 0x386 callq 0x512a0 movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x52c40 movq %rbx, %rdi callq 0x55300
_ZNK10OpenSubdiv6v3_6_03Bfr14SurfaceFactory20copyNonLinearSurfaceEPNS1_8internal11SurfaceDataERKS4_RKNS1_11FaceSurfaceE: push r15 push r14 push r12 push rbx sub rsp, 138h test byte ptr [rdx+6Ch], 8 jnz loc_A971A mov r14, rcx mov r15, rdx mov rbx, rsi mov eax, [rdx+68h] mov [rsi+68h], eax mov al, [rdx+6Ch] and al, 8 mov cl, [rsi+6Ch] and cl, 0F7h or cl, al mov [rsi+6Ch], cl mov al, [rdx+6Ch] and al, 4 and cl, 0FBh or cl, al mov [rsi+6Ch], cl mov esi, [rdx+8]; int mov rdi, rbx; this call __ZN10OpenSubdiv6v3_6_03Bfr8internal11SurfaceData9resizeCVsEi; OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData::resizeCVs(int) test byte ptr [rbx+6Ch], 4 jnz short loc_A96D3 add r15, 70h ; 'p' lea r12, [rsp+158h+var_148] mov rdi, r12 mov rsi, r15 call __ZNSt12__shared_ptrIKN10OpenSubdiv6v3_6_03Bfr9PatchTreeELN9__gnu_cxx12_Lock_policyE2EEC2ERKS7_; std::__shared_ptr<OpenSubdiv::v3_6_0::Bfr::PatchTree const,(__gnu_cxx::_Lock_policy)2>::__shared_ptr(std::__shared_ptr<OpenSubdiv::v3_6_0::Bfr::PatchTree const,(__gnu_cxx::_Lock_policy)2> const&) lea rdi, [rbx+70h] mov rsi, r12 call __ZNSt12__shared_ptrIKN10OpenSubdiv6v3_6_03Bfr9PatchTreeELN9__gnu_cxx12_Lock_policyE2EEaSERKS7_; std::__shared_ptr<OpenSubdiv::v3_6_0::Bfr::PatchTree const,(__gnu_cxx::_Lock_policy)2>::operator=(std::__shared_ptr<OpenSubdiv::v3_6_0::Bfr::PatchTree const,(__gnu_cxx::_Lock_policy)2> const&) lea rdi, [rsp+158h+var_140] call __ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rax, 200000006h lea rdx, [rsp+158h+var_154] mov [rdx], rax mov byte ptr [rdx+8], 0 lea r15, [rsp+158h+var_148] mov rdi, r15 mov rsi, r14 call __ZN10OpenSubdiv6v3_6_03Bfr21IrregularPatchBuilderC2ERKNS1_11FaceSurfaceERKNS2_7OptionsE; OpenSubdiv::v3_6_0::Bfr::IrregularPatchBuilder::IrregularPatchBuilder(OpenSubdiv::v3_6_0::Bfr::FaceSurface const&,OpenSubdiv::v3_6_0::Bfr::IrregularPatchBuilder::Options const&) mov eax, [r15+14h] cmp eax, [rbx+8] jnz short loc_A9739 mov rsi, [rbx]; int * lea rdi, [rsp+158h+var_148]; this call __ZNK10OpenSubdiv6v3_6_03Bfr21IrregularPatchBuilder26GatherControlVertexIndicesEPi; OpenSubdiv::v3_6_0::Bfr::IrregularPatchBuilder::GatherControlVertexIndices(int *) lea rdi, [rsp+158h+var_148]; this call __ZN10OpenSubdiv6v3_6_03Bfr21IrregularPatchBuilderD2Ev; OpenSubdiv::v3_6_0::Bfr::IrregularPatchBuilder::~IrregularPatchBuilder() jmp short loc_A9707 loc_A96D3: mov al, [r15+6Dh] mov [rbx+6Dh], al mov al, [r15+6Eh] mov [rbx+6Eh], al lea r15, [rsp+158h+var_148] mov rdi, r15; this mov rsi, r14; OpenSubdiv::v3_6_0::Bfr::FaceSurface * call __ZN10OpenSubdiv6v3_6_03Bfr19RegularPatchBuilderC2ERKNS1_11FaceSurfaceE; OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder::RegularPatchBuilder(OpenSubdiv::v3_6_0::Bfr::FaceSurface const&) mov eax, [r15+10h] cmp eax, [rbx+8] jnz short loc_A9758 mov rsi, [rbx]; int * lea rdi, [rsp+158h+var_148]; this call __ZNK10OpenSubdiv6v3_6_03Bfr19RegularPatchBuilder26GatherControlVertexIndicesEPi; OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder::GatherControlVertexIndices(int *) loc_A9707: or byte ptr [rbx+6Ch], 1 add rsp, 138h pop rbx pop r12 pop r14 pop r15 retn loc_A971A: lea rdi, aSurfacesrcIsli; "!surfaceSrc.isLinear()" lea rsi, aWorkspaceLlm4b_42; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_150; "void OpenSubdiv::v3_6_0::Bfr::SurfaceFa"... mov edx, 372h call ___assert_fail loc_A9739: lea rdi, aBuilderGetnumc; "builder.GetNumControlVertices() == surf"... lea rsi, aWorkspaceLlm4b_42; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_150; "void OpenSubdiv::v3_6_0::Bfr::SurfaceFa"... mov edx, 390h call ___assert_fail loc_A9758: lea rdi, aBuilderGetnumc; "builder.GetNumControlVertices() == surf"... lea rsi, aWorkspaceLlm4b_42; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_150; "void OpenSubdiv::v3_6_0::Bfr::SurfaceFa"... mov edx, 386h call ___assert_fail mov rbx, rax lea rdi, [rsp+158h+var_148]; this call __ZN10OpenSubdiv6v3_6_03Bfr21IrregularPatchBuilderD2Ev; OpenSubdiv::v3_6_0::Bfr::IrregularPatchBuilder::~IrregularPatchBuilder() mov rdi, rbx call __Unwind_Resume
void OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::copyNonLinearSurface( OpenSubdiv::v3_6_0::Bfr::SurfaceFactory *this, OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData *a2, const OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData *a3, const OpenSubdiv::v3_6_0::Bfr::FaceSurface *a4) { char v6; // cl long long v7; // [rsp+4h] [rbp-154h] BYREF char v8; // [rsp+Ch] [rbp-14Ch] _BYTE v9[8]; // [rsp+10h] [rbp-148h] BYREF _BYTE v10[8]; // [rsp+18h] [rbp-140h] BYREF int v11; // [rsp+20h] [rbp-138h] int v12; // [rsp+24h] [rbp-134h] if ( (*((_BYTE *)a3 + 108) & 8) != 0 ) __assert_fail( "!surfaceSrc.isLinear()", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surfaceFactory.cpp", 882LL, "void OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::copyNonLinearSurface(SurfaceType *, const SurfaceType &, const FaceSurface &) const"); *((_DWORD *)a2 + 26) = *((_DWORD *)a3 + 26); v6 = *((_BYTE *)a3 + 108) & 8 | *((_BYTE *)a2 + 108) & 0xF7; *((_BYTE *)a2 + 108) = v6; *((_BYTE *)a2 + 108) = *((_BYTE *)a3 + 108) & 4 | v6 & 0xFB; OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData::resizeCVs(a2, *((_DWORD *)a3 + 2)); if ( (*((_BYTE *)a2 + 108) & 4) != 0 ) { *((_BYTE *)a2 + 109) = *((_BYTE *)a3 + 109); *((_BYTE *)a2 + 110) = *((_BYTE *)a3 + 110); OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder::RegularPatchBuilder( (OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder *)v9, a4); if ( v11 != *((_DWORD *)a2 + 2) ) __assert_fail( "builder.GetNumControlVertices() == surfaceDst.getNumCVs()", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surfaceFactory.cpp", 902LL, "void OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::copyNonLinearSurface(SurfaceType *, const SurfaceType &, const Fac" "eSurface &) const"); OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder::GatherControlVertexIndices( (OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder *)v9, *(int **)a2); } else { std::__shared_ptr<OpenSubdiv::v3_6_0::Bfr::PatchTree const,(__gnu_cxx::_Lock_policy)2>::__shared_ptr( v9, (char *)a3 + 112); std::__shared_ptr<OpenSubdiv::v3_6_0::Bfr::PatchTree const,(__gnu_cxx::_Lock_policy)2>::operator=( (char *)a2 + 112, v9); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v10); v7 = 0x200000006LL; v8 = 0; OpenSubdiv::v3_6_0::Bfr::IrregularPatchBuilder::IrregularPatchBuilder((long long)v9, (long long)a4, (long long)&v7); if ( v12 != *((_DWORD *)a2 + 2) ) __assert_fail( "builder.GetNumControlVertices() == surfaceDst.getNumCVs()", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surfaceFactory.cpp", 912LL, "void OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::copyNonLinearSurface(SurfaceType *, const SurfaceType &, const Fac" "eSurface &) const"); OpenSubdiv::v3_6_0::Bfr::IrregularPatchBuilder::GatherControlVertexIndices( (OpenSubdiv::v3_6_0::Bfr::IrregularPatchBuilder *)v9, *(int **)a2); OpenSubdiv::v3_6_0::Bfr::IrregularPatchBuilder::~IrregularPatchBuilder((OpenSubdiv::v3_6_0::Bfr::IrregularPatchBuilder *)v9); } *((_BYTE *)a2 + 108) |= 1u; }
copyNonLinearSurface: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x138 TEST byte ptr [RDX + 0x6c],0x8 JNZ 0x001a971a MOV R14,RCX MOV R15,RDX MOV RBX,RSI MOV EAX,dword ptr [RDX + 0x68] MOV dword ptr [RSI + 0x68],EAX MOV AL,byte ptr [RDX + 0x6c] AND AL,0x8 MOV CL,byte ptr [RSI + 0x6c] AND CL,0xf7 OR CL,AL MOV byte ptr [RSI + 0x6c],CL MOV AL,byte ptr [RDX + 0x6c] AND AL,0x4 AND CL,0xfb OR CL,AL MOV byte ptr [RSI + 0x6c],CL MOV ESI,dword ptr [RDX + 0x8] MOV RDI,RBX CALL 0x00152960 TEST byte ptr [RBX + 0x6c],0x4 JNZ 0x001a96d3 ADD R15,0x70 LEA R12,[RSP + 0x10] MOV RDI,R12 MOV RSI,R15 CALL 0x0014f950 LEA RDI,[RBX + 0x70] MOV RSI,R12 CALL 0x00154820 LEA RDI,[RSP + 0x18] CALL 0x001528d0 MOV RAX,0x200000006 LEA RDX,[RSP + 0x4] MOV qword ptr [RDX],RAX MOV byte ptr [RDX + 0x8],0x0 LEA R15,[RSP + 0x10] MOV RDI,R15 MOV RSI,R14 CALL 0x001502e0 MOV EAX,dword ptr [R15 + 0x14] CMP EAX,dword ptr [RBX + 0x8] JNZ 0x001a9739 MOV RSI,qword ptr [RBX] LAB_001a96bd: LEA RDI,[RSP + 0x10] CALL 0x0014f050 LAB_001a96c7: LEA RDI,[RSP + 0x10] CALL 0x00152c40 JMP 0x001a9707 LAB_001a96d3: MOV AL,byte ptr [R15 + 0x6d] MOV byte ptr [RBX + 0x6d],AL MOV AL,byte ptr [R15 + 0x6e] MOV byte ptr [RBX + 0x6e],AL LEA R15,[RSP + 0x10] MOV RDI,R15 MOV RSI,R14 CALL 0x00155110 MOV EAX,dword ptr [R15 + 0x10] CMP EAX,dword ptr [RBX + 0x8] JNZ 0x001a9758 MOV RSI,qword ptr [RBX] LEA RDI,[RSP + 0x10] CALL 0x00150e30 LAB_001a9707: OR byte ptr [RBX + 0x6c],0x1 ADD RSP,0x138 POP RBX POP R12 POP R14 POP R15 RET LAB_001a971a: LEA RDI,[0x1cc55f] LEA RSI,[0x1cc3d3] LEA RCX,[0x1cc576] MOV EDX,0x372 CALL 0x001512a0 LAB_001a9739: LEA RDI,[0x1cc5f8] LEA RSI,[0x1cc3d3] LEA RCX,[0x1cc576] MOV EDX,0x390 CALL 0x001512a0 LAB_001a9758: LEA RDI,[0x1cc5f8] LEA RSI,[0x1cc3d3] LEA RCX,[0x1cc576] MOV EDX,0x386 CALL 0x001512a0
/* OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::copyNonLinearSurface(OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData*, OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData const&, OpenSubdiv::v3_6_0::Bfr::FaceSurface const&) const */ void __thiscall OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::copyNonLinearSurface (SurfaceFactory *this,SurfaceData *param_1,SurfaceData *param_2,FaceSurface *param_3) { SurfaceData SVar1; SurfaceData SVar2; int8 local_154; int1 local_14c; __shared_ptr<OpenSubdiv::v3_6_0::Bfr::PatchTree_const,(__gnu_cxx::_Lock_policy)2> local_148 [8]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_140 [8]; int local_138; int local_134; if (((byte)param_2[0x6c] & 8) != 0) { /* WARNING: Subroutine does not return */ __assert_fail("!surfaceSrc.isLinear()", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surfaceFactory.cpp" ,0x372, "void OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::copyNonLinearSurface(SurfaceType *, const SurfaceType &, const FaceSurface &) const" ); } *(int4 *)(param_1 + 0x68) = *(int4 *)(param_2 + 0x68); SVar1 = param_2[0x6c]; SVar2 = param_1[0x6c]; param_1[0x6c] = (SurfaceData)((byte)SVar2 & 0xf7 | (byte)SVar1 & 8); param_1[0x6c] = (SurfaceData)((byte)SVar2 & 0xf3 | (byte)SVar1 & 8 | (byte)param_2[0x6c] & 4); internal::SurfaceData::resizeCVs(param_1,*(int *)(param_2 + 8)); if (((byte)param_1[0x6c] & 4) == 0) { std::__shared_ptr<OpenSubdiv::v3_6_0::Bfr::PatchTree_const,(__gnu_cxx::_Lock_policy)2>:: __shared_ptr(local_148,(__shared_ptr *)(param_2 + 0x70)); std::__shared_ptr<OpenSubdiv::v3_6_0::Bfr::PatchTree_const,(__gnu_cxx::_Lock_policy)2>:: operator=((__shared_ptr<OpenSubdiv::v3_6_0::Bfr::PatchTree_const,(__gnu_cxx::_Lock_policy)2> *) (param_1 + 0x70),(__shared_ptr *)local_148); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_140); local_154 = 0x200000006; local_14c = 0; IrregularPatchBuilder::IrregularPatchBuilder ((IrregularPatchBuilder *)local_148,param_3,(Options *)&local_154); if (local_134 != *(int *)(param_1 + 8)) { /* WARNING: Subroutine does not return */ __assert_fail("builder.GetNumControlVertices() == surfaceDst.getNumCVs()", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surfaceFactory.cpp" ,0x390, "void OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::copyNonLinearSurface(SurfaceType *, const SurfaceType &, const FaceSurface &) const" ); } /* try { // try from 001a96bd to 001a96c6 has its CatchHandler @ 001a9777 */ IrregularPatchBuilder::GatherControlVertexIndices ((IrregularPatchBuilder *)local_148,*(int **)param_1); IrregularPatchBuilder::~IrregularPatchBuilder((IrregularPatchBuilder *)local_148); } else { param_1[0x6d] = param_2[0x6d]; param_1[0x6e] = param_2[0x6e]; RegularPatchBuilder::RegularPatchBuilder((RegularPatchBuilder *)local_148,param_3); if (local_138 != *(int *)(param_1 + 8)) { /* WARNING: Subroutine does not return */ __assert_fail("builder.GetNumControlVertices() == surfaceDst.getNumCVs()", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surfaceFactory.cpp" ,0x386, "void OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::copyNonLinearSurface(SurfaceType *, const SurfaceType &, const FaceSurface &) const" ); } RegularPatchBuilder::GatherControlVertexIndices ((RegularPatchBuilder *)local_148,*(int **)param_1); } param_1[0x6c] = (SurfaceData)((byte)param_1[0x6c] | 1); return; }
28,772
ma_checksum
eloqsql/storage/maria/ma_checksum.c
ha_checksum _ma_checksum(MARIA_HA *info, const uchar *record) { ha_checksum crc=0; uint i,end; MARIA_COLUMNDEF *base_column= info->s->columndef; uint16 *column_nr= info->s->column_nr; if (info->s->base.null_bytes) crc= my_checksum(crc, record, info->s->base.null_bytes); for (i= 0, end= info->s->base.fields ; i < end ; i++) { MARIA_COLUMNDEF *column= base_column + column_nr[i]; const uchar *pos; ulong length; if (record[column->null_pos] & column->null_bit) continue; /* Null field */ pos= record + column->offset; switch (column->type) { case FIELD_BLOB: { uint blob_size_length= column->length- portable_sizeof_char_ptr; length= _ma_calc_blob_length(blob_size_length, pos); if (length) { memcpy((char**) &pos, pos + blob_size_length, sizeof(char*)); crc= my_checksum(crc, pos, length); } continue; } case FIELD_VARCHAR: { uint pack_length= column->fill_length; if (pack_length == 1) length= (ulong) *pos; else length= uint2korr(pos); pos+= pack_length; /* Skip length information */ break; } default: length= column->length; break; } crc= my_checksum(crc, pos, length); } return crc; }
O3
c
ma_checksum: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rsi, %rbx movq (%rdi), %rax movq 0x588(%rax), %r13 movq 0x5a8(%rax), %r12 movl 0x3fc(%rax), %edx testq %rdx, %rdx je 0x70814 movq %rdi, %r15 xorl %edi, %edi movq %rbx, %rsi callq 0xa8084 movl %eax, %edi movq (%r15), %rax jmp 0x70816 xorl %edi, %edi movl 0x3c8(%rax), %esi testq %rsi, %rsi je 0x708d7 xorl %r14d, %r14d movq %rsi, -0x38(%rbp) movq %r12, -0x40(%rbp) movzwl (%r12,%r14,2), %eax imulq $0x38, %rax, %rax movzwl 0xe(%r13,%rax), %ecx movb 0x12(%r13,%rax), %dl testb %dl, (%rbx,%rcx) jne 0x708c0 addq %r13, %rax movl (%rax), %ecx movl 0x4(%rax), %r15d addq %rbx, %r15 cmpl $0x8, %ecx je 0x70895 cmpl $0x4, %ecx jne 0x708a5 movl %edi, -0x2c(%rbp) movzwl 0x8(%rax), %r12d addl $-0x8, %r12d movl %r12d, %edi movq %r15, %rsi callq 0x48dc7 testq %rax, %rax je 0x708ce movl %r12d, %ecx movq (%r15,%rcx), %rsi movl -0x2c(%rbp), %edi movq %rax, %rdx callq 0xa8084 movl %eax, %edi movq -0x40(%rbp), %r12 jmp 0x708bc movzwl 0xc(%rax), %eax cmpq $0x1, %rax jne 0x708ab movzbl (%r15), %edx jmp 0x708af movzwl 0x8(%rax), %edx jmp 0x708b2 movzwl (%r15), %edx addq %rax, %r15 movq %r15, %rsi callq 0xa8084 movl %eax, %edi movq -0x38(%rbp), %rsi incq %r14 cmpq %r14, %rsi jne 0x70830 jmp 0x708d7 movq -0x40(%rbp), %r12 movl -0x2c(%rbp), %edi jmp 0x708bc movl %edi, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ma_checksum: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rsi mov rax, [rdi] mov r13, [rax+588h] mov r12, [rax+5A8h] mov edx, [rax+3FCh] test rdx, rdx jz short loc_70814 mov r15, rdi xor edi, edi mov rsi, rbx call my_checksum mov edi, eax mov rax, [r15] jmp short loc_70816 loc_70814: xor edi, edi loc_70816: mov esi, [rax+3C8h] test rsi, rsi jz loc_708D7 xor r14d, r14d mov [rbp+var_38], rsi mov [rbp+var_40], r12 loc_70830: movzx eax, word ptr [r12+r14*2] imul rax, 38h ; '8' movzx ecx, word ptr [r13+rax+0Eh] mov dl, [r13+rax+12h] test [rbx+rcx], dl jnz short loc_708C0 add rax, r13 mov ecx, [rax] mov r15d, [rax+4] add r15, rbx cmp ecx, 8 jz short loc_70895 cmp ecx, 4 jnz short loc_708A5 mov [rbp+var_2C], edi movzx r12d, word ptr [rax+8] add r12d, 0FFFFFFF8h mov edi, r12d mov rsi, r15 call _ma_calc_blob_length test rax, rax jz short loc_708CE mov ecx, r12d mov rsi, [r15+rcx] mov edi, [rbp+var_2C] mov rdx, rax call my_checksum mov edi, eax mov r12, [rbp+var_40] jmp short loc_708BC loc_70895: movzx eax, word ptr [rax+0Ch] cmp rax, 1 jnz short loc_708AB movzx edx, byte ptr [r15] jmp short loc_708AF loc_708A5: movzx edx, word ptr [rax+8] jmp short loc_708B2 loc_708AB: movzx edx, word ptr [r15] loc_708AF: add r15, rax loc_708B2: mov rsi, r15 call my_checksum mov edi, eax loc_708BC: mov rsi, [rbp+var_38] loc_708C0: inc r14 cmp rsi, r14 jnz loc_70830 jmp short loc_708D7 loc_708CE: mov r12, [rbp+var_40] mov edi, [rbp+var_2C] jmp short loc_708BC loc_708D7: mov eax, edi add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ma_checksum(long long *a1, long long a2) { long long v3; // rax long long v4; // r13 long long v5; // r12 long long v7; // rdi long long v8; // rsi long long v9; // r14 long long v10; // rax long long v11; // rax unsigned __int8 *v12; // r15 unsigned int v13; // r12d unsigned long long v14; // rax long long v15; // rax long long v16; // rdx long long v18; // [rsp+0h] [rbp-40h] long long v19; // [rsp+8h] [rbp-38h] v3 = *a1; v4 = *(_QWORD *)(*a1 + 1416); v5 = *(_QWORD *)(*a1 + 1448); if ( *(_DWORD *)(*a1 + 1020) ) { v7 = (unsigned int)my_checksum(0LL, a2, *(unsigned int *)(*a1 + 1020)); v3 = *a1; } else { v7 = 0LL; } v8 = *(unsigned int *)(v3 + 968); if ( *(_DWORD *)(v3 + 968) ) { v9 = 0LL; v19 = *(unsigned int *)(v3 + 968); v18 = v5; while ( 1 ) { v10 = 56LL * *(unsigned __int16 *)(v5 + 2 * v9); if ( (*(_BYTE *)(v4 + v10 + 18) & *(_BYTE *)(a2 + *(unsigned __int16 *)(v4 + v10 + 14))) == 0 ) break; LABEL_18: if ( v8 == ++v9 ) return (unsigned int)v7; } v11 = v4 + v10; v12 = (unsigned __int8 *)(a2 + *(unsigned int *)(v11 + 4)); if ( *(_DWORD *)v11 == 8 ) { v15 = *(unsigned __int16 *)(v11 + 12); if ( v15 == 1 ) v16 = *v12; else v16 = *(unsigned __int16 *)v12; v12 += v15; } else { if ( *(_DWORD *)v11 == 4 ) { v13 = *(unsigned __int16 *)(v11 + 8) - 8; v14 = ma_calc_blob_length(v13, v12); if ( v14 ) { v7 = (unsigned int)my_checksum((unsigned int)v7, *(_QWORD *)&v12[v13], v14); v5 = v18; } else { v5 = v18; v7 = (unsigned int)v7; } goto LABEL_17; } v16 = *(unsigned __int16 *)(v11 + 8); } LODWORD(v7) = my_checksum(v7, v12, v16); LABEL_17: v8 = v19; goto LABEL_18; } return (unsigned int)v7; }
_ma_checksum: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RSI MOV RAX,qword ptr [RDI] MOV R13,qword ptr [RAX + 0x588] MOV R12,qword ptr [RAX + 0x5a8] MOV EDX,dword ptr [RAX + 0x3fc] TEST RDX,RDX JZ 0x00170814 MOV R15,RDI XOR EDI,EDI MOV RSI,RBX CALL 0x001a8084 MOV EDI,EAX MOV RAX,qword ptr [R15] JMP 0x00170816 LAB_00170814: XOR EDI,EDI LAB_00170816: MOV ESI,dword ptr [RAX + 0x3c8] TEST RSI,RSI JZ 0x001708d7 XOR R14D,R14D MOV qword ptr [RBP + -0x38],RSI MOV qword ptr [RBP + -0x40],R12 LAB_00170830: MOVZX EAX,word ptr [R12 + R14*0x2] IMUL RAX,RAX,0x38 MOVZX ECX,word ptr [R13 + RAX*0x1 + 0xe] MOV DL,byte ptr [R13 + RAX*0x1 + 0x12] TEST byte ptr [RBX + RCX*0x1],DL JNZ 0x001708c0 ADD RAX,R13 MOV ECX,dword ptr [RAX] MOV R15D,dword ptr [RAX + 0x4] ADD R15,RBX CMP ECX,0x8 JZ 0x00170895 CMP ECX,0x4 JNZ 0x001708a5 MOV dword ptr [RBP + -0x2c],EDI MOVZX R12D,word ptr [RAX + 0x8] ADD R12D,-0x8 MOV EDI,R12D MOV RSI,R15 CALL 0x00148dc7 TEST RAX,RAX JZ 0x001708ce MOV ECX,R12D MOV RSI,qword ptr [R15 + RCX*0x1] MOV EDI,dword ptr [RBP + -0x2c] MOV RDX,RAX CALL 0x001a8084 MOV EDI,EAX MOV R12,qword ptr [RBP + -0x40] JMP 0x001708bc LAB_00170895: MOVZX EAX,word ptr [RAX + 0xc] CMP RAX,0x1 JNZ 0x001708ab MOVZX EDX,byte ptr [R15] JMP 0x001708af LAB_001708a5: MOVZX EDX,word ptr [RAX + 0x8] JMP 0x001708b2 LAB_001708ab: MOVZX EDX,word ptr [R15] LAB_001708af: ADD R15,RAX LAB_001708b2: MOV RSI,R15 CALL 0x001a8084 MOV EDI,EAX LAB_001708bc: MOV RSI,qword ptr [RBP + -0x38] LAB_001708c0: INC R14 CMP RSI,R14 JNZ 0x00170830 JMP 0x001708d7 LAB_001708ce: MOV R12,qword ptr [RBP + -0x40] MOV EDI,dword ptr [RBP + -0x2c] JMP 0x001708bc LAB_001708d7: MOV EAX,EDI ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int4 _ma_checksum(long *param_1,long param_2) { uint uVar1; long lVar2; long lVar3; int4 uVar4; long lVar5; int *piVar6; ushort uVar7; ulong uVar8; ushort *puVar9; lVar5 = *param_1; lVar2 = *(long *)(lVar5 + 0x588); lVar3 = *(long *)(lVar5 + 0x5a8); if (*(int *)(lVar5 + 0x3fc) == 0) { uVar4 = 0; } else { uVar4 = my_checksum(0,param_2); lVar5 = *param_1; } uVar1 = *(uint *)(lVar5 + 0x3c8); if ((ulong)uVar1 != 0) { uVar8 = 0; do { lVar5 = (ulong)*(ushort *)(lVar3 + uVar8 * 2) * 0x38; if ((*(byte *)(param_2 + (ulong)*(ushort *)(lVar2 + 0xe + lVar5)) & *(byte *)(lVar2 + 0x12 + lVar5)) == 0) { piVar6 = (int *)(lVar5 + lVar2); puVar9 = (ushort *)((ulong)(uint)piVar6[1] + param_2); if (*piVar6 == 8) { if ((ulong)*(ushort *)(piVar6 + 3) == 1) { uVar7 = (ushort)(byte)*puVar9; } else { uVar7 = *puVar9; } puVar9 = (ushort *)((long)puVar9 + (ulong)*(ushort *)(piVar6 + 3)); } else { if (*piVar6 == 4) { uVar7 = *(ushort *)(piVar6 + 2); lVar5 = _ma_calc_blob_length(uVar7 - 8,puVar9); if (lVar5 != 0) { uVar4 = my_checksum(uVar4,*(int8 *)((long)puVar9 + (ulong)(uVar7 - 8)),lVar5); } goto LAB_001708c0; } uVar7 = *(ushort *)(piVar6 + 2); } uVar4 = my_checksum(uVar4,puVar9,uVar7); } LAB_001708c0: uVar8 = uVar8 + 1; } while (uVar1 != uVar8); } return uVar4; }
28,773
nglog::GetTempDirectories(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
ng-log[P]ng-log/src/logging.cc
static void GetTempDirectories(vector<string>& list) { list.clear(); #ifdef NGLOG_OS_WINDOWS // On windows we'll try to find a directory in this order: // C:/Documents & Settings/whomever/TEMP (or whatever GetTempPath() is) // C:/TMP/ // C:/TEMP/ char tmp[MAX_PATH]; if (GetTempPathA(MAX_PATH, tmp)) list.push_back(tmp); list.push_back("C:\\TMP\\"); list.push_back("C:\\TEMP\\"); #else // Directories, in order of preference. If we find a dir that // exists, we stop adding other less-preferred dirs const char* candidates[] = { // Non-null only during unittest/regtest getenv("TEST_TMPDIR"), // Explicitly-supplied temp dirs getenv("TMPDIR"), getenv("TMP"), // If all else fails "/tmp", }; for (auto d : candidates) { if (!d) continue; // Empty env var // Make sure we don't surprise anyone who's expecting a '/' string dstr = d; if (dstr[dstr.size() - 1] != '/') { dstr += "/"; } list.push_back(dstr); struct stat statbuf; if (!stat(d, &statbuf) && S_ISDIR(statbuf.st_mode)) { // We found a dir that exists - we're done. return; } } #endif }
O1
cpp
nglog::GetTempDirectories(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xd8, %rsp movq %rdi, %rbx movq (%rdi), %rsi callq 0x20cda leaq 0x159a2(%rip), %rdi # 0x2450f callq 0x7650 movq %rax, 0x20(%rsp) leaq 0x15996(%rip), %rdi # 0x24514 callq 0x7650 movq %rax, 0x28(%rsp) leaq 0x16b81(%rip), %rdi # 0x25710 callq 0x7650 movq %rax, 0x30(%rsp) leaq 0x16b74(%rip), %rax # 0x25714 movq %rax, 0x38(%rsp) leaq 0x10(%rsp), %rbp xorl %r12d, %r12d movq %rsp, %r14 leaq 0x48(%rsp), %r15 movq 0x20(%rsp,%r12), %r13 testq %r13, %r13 je 0xec4a movq %rbp, (%rsp) movq %r13, %rdi callq 0x71e0 leaq (%rax,%r13), %rdx movq %r14, %rdi movq %r13, %rsi callq 0xb47a movq (%rsp), %rax movq 0x8(%rsp), %rcx cmpb $0x2f, -0x1(%rax,%rcx) je 0xebfd movq %r14, %rdi leaq 0x15c61(%rip), %rsi # 0x24859 callq 0x79c0 movq %rbx, %rdi movq %r14, %rsi callq 0x13176 movq %r13, %rdi movq %r15, %rsi callq 0x7450 testl %eax, %eax jne 0xec2f movl 0x60(%rsp), %eax movl $0xf000, %ecx # imm = 0xF000 andl %ecx, %eax movl $0x1, %r13d cmpl $0x4000, %eax # imm = 0x4000 je 0xec32 xorl %r13d, %r13d movq (%rsp), %rdi cmpq %rbp, %rdi je 0xec50 movq 0x10(%rsp), %rsi incq %rsi callq 0x900c jmp 0xec50 movl $0x3, %r13d cmpl $0x3, %r13d je 0xec5b testl %r13d, %r13d jne 0xec69 addq $0x8, %r12 cmpq $0x20, %r12 jne 0xebb5 addq $0xd8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq (%rsp), %rdi cmpq %rbp, %rdi je 0xec94 movq 0x10(%rsp), %rsi incq %rsi callq 0x900c movq %rbx, %rdi callq 0x7930
_ZN5nglogL18GetTempDirectoriesERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0D8h mov rbx, rdi mov rsi, [rdi] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE15_M_erase_at_endEPS5_; std::vector<std::string>::_M_erase_at_end(std::string*) lea rdi, aTestTmpdir; "TEST_TMPDIR" call _getenv mov [rsp+108h+var_E8], rax lea rdi, aTestTmpdir+5; "TMPDIR" call _getenv mov [rsp+108h+var_E0], rax lea rdi, aTmp_0; "TMP" call _getenv mov [rsp+108h+var_D8], rax lea rax, aTmp; "/tmp" mov [rsp+108h+var_D0], rax lea rbp, [rsp+108h+var_F8] xor r12d, r12d mov r14, rsp lea r15, [rsp+108h+var_C0] loc_EBB5: mov r13, [rsp+r12+108h+var_E8] test r13, r13 jz loc_EC4A mov [rsp+108h+var_108], rbp mov rdi, r13 call _strlen lea rdx, [rax+r13] mov rdi, r14 mov rsi, r13 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rax, [rsp+108h+var_108] mov rcx, [rsp+108h+var_100] cmp byte ptr [rax+rcx-1], 2Fh ; '/' jz short loc_EBFD mov rdi, r14 lea rsi, asc_24858+1; "/" call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) loc_EBFD: mov rdi, rbx mov rsi, r14 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_; std::vector<std::string>::push_back(std::string const&) mov rdi, r13 mov rsi, r15 call _stat test eax, eax jnz short loc_EC2F mov eax, [rsp+108h+var_A8] mov ecx, 0F000h and eax, ecx mov r13d, 1 cmp eax, 4000h jz short loc_EC32 loc_EC2F: xor r13d, r13d loc_EC32: mov rdi, [rsp+108h+var_108]; void * cmp rdi, rbp jz short loc_EC50 mov rsi, [rsp+108h+var_F8] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) jmp short loc_EC50 loc_EC4A: mov r13d, 3 loc_EC50: cmp r13d, 3 jz short loc_EC5B test r13d, r13d jnz short loc_EC69 loc_EC5B: add r12, 8 cmp r12, 20h ; ' ' jnz loc_EBB5 loc_EC69: add rsp, 0D8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, [rsp+0]; void * cmp rdi, rbp jz short loc_EC94 mov rsi, [rsp+arg_8] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_EC94: mov rdi, rbx call __Unwind_Resume
void nglog::GetTempDirectories(_QWORD *a1) { long long i; // r12 _BYTE *v2; // r13 long long v3; // rax int v4; // r13d void *v5[2]; // [rsp+0h] [rbp-108h] BYREF _QWORD v6[2]; // [rsp+10h] [rbp-F8h] BYREF _QWORD v7[5]; // [rsp+20h] [rbp-E8h] _BYTE v8[24]; // [rsp+48h] [rbp-C0h] BYREF int v9; // [rsp+60h] [rbp-A8h] std::vector<std::string>::_M_erase_at_end(a1, *a1); v7[0] = getenv("TEST_TMPDIR"); v7[1] = getenv("TMPDIR"); v7[2] = getenv("TMP"); v7[3] = "/tmp"; for ( i = 0LL; i != 4; ++i ) { v2 = (_BYTE *)v7[i]; if ( v2 ) { v5[0] = v6; v3 = strlen(v2); std::string::_M_construct<char const*>(v5, v2, (long long)&v2[v3]); if ( *((_BYTE *)v5[0] + (unsigned long long)v5[1] - 1) != 47 ) std::string::append(v5, "/"); std::vector<std::string>::push_back(a1); if ( (unsigned int)stat(v2, v8) || (v4 = 1, (v9 & 0xF000) != 0x4000) ) v4 = 0; if ( v5[0] != v6 ) operator delete(v5[0]); } else { v4 = 3; } if ( v4 != 3 && v4 ) break; } }
GetTempDirectories: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xd8 MOV RBX,RDI MOV RSI,qword ptr [RDI] CALL 0x00120cda LEA RDI,[0x12450f] CALL 0x00107650 MOV qword ptr [RSP + 0x20],RAX LEA RDI,[0x124514] CALL 0x00107650 MOV qword ptr [RSP + 0x28],RAX LEA RDI,[0x125710] CALL 0x00107650 MOV qword ptr [RSP + 0x30],RAX LEA RAX,[0x125714] MOV qword ptr [RSP + 0x38],RAX LEA RBP,[RSP + 0x10] XOR R12D,R12D MOV R14,RSP LEA R15,[RSP + 0x48] LAB_0010ebb5: MOV R13,qword ptr [RSP + R12*0x1 + 0x20] TEST R13,R13 JZ 0x0010ec4a MOV qword ptr [RSP],RBP MOV RDI,R13 CALL 0x001071e0 LEA RDX,[RAX + R13*0x1] MOV RDI,R14 MOV RSI,R13 CALL 0x0010b47a MOV RAX,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x8] CMP byte ptr [RAX + RCX*0x1 + -0x1],0x2f JZ 0x0010ebfd LAB_0010ebee: MOV RDI,R14 LEA RSI,[0x124859] CALL 0x001079c0 LAB_0010ebfd: MOV RDI,RBX MOV RSI,R14 CALL 0x00113176 LAB_0010ec08: MOV RDI,R13 MOV RSI,R15 CALL 0x00107450 TEST EAX,EAX JNZ 0x0010ec2f MOV EAX,dword ptr [RSP + 0x60] MOV ECX,0xf000 AND EAX,ECX MOV R13D,0x1 CMP EAX,0x4000 JZ 0x0010ec32 LAB_0010ec2f: XOR R13D,R13D LAB_0010ec32: MOV RDI,qword ptr [RSP] CMP RDI,RBP JZ 0x0010ec50 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x0010900c JMP 0x0010ec50 LAB_0010ec4a: MOV R13D,0x3 LAB_0010ec50: CMP R13D,0x3 JZ 0x0010ec5b TEST R13D,R13D JNZ 0x0010ec69 LAB_0010ec5b: ADD R12,0x8 CMP R12,0x20 JNZ 0x0010ebb5 LAB_0010ec69: ADD RSP,0xd8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nglog::GetTempDirectories(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > >&) */ void nglog::GetTempDirectories(vector *param_1) { char *__s; int iVar1; size_t sVar2; long lVar3; long *local_108; long local_100; long local_f8 [2]; char *local_e8 [5]; stat local_c0; std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::_M_erase_at_end ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1, *(string **)param_1); local_e8[0] = getenv("TEST_TMPDIR"); local_e8[1] = getenv("TMPDIR"); local_e8[2] = getenv("TMP"); local_e8[3] = "/tmp"; lVar3 = 0; do { __s = *(char **)((long)local_e8 + lVar3); if (__s == (char *)0x0) { iVar1 = 3; } else { local_108 = local_f8; sVar2 = strlen(__s); std::__cxx11::string::_M_construct<char_const*>(&local_108,__s,__s + sVar2); if (*(char *)((long)local_108 + local_100 + -1) != '/') { /* try { // try from 0010ebee to 0010ec07 has its CatchHandler @ 0010ec7b */ std::__cxx11::string::append((char *)&local_108); } std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::push_back ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1, (string *)&local_108); iVar1 = stat(__s,&local_c0); if ((iVar1 != 0) || (iVar1 = 1, (local_c0.st_mode & 0xf000) != 0x4000)) { iVar1 = 0; } if (local_108 != local_f8) { operator_delete(local_108,local_f8[0] + 1); } } } while (((iVar1 == 3) || (iVar1 == 0)) && (lVar3 = lVar3 + 8, lVar3 != 0x20)); return; }
28,774
my_sync_dir
eloqsql/mysys/my_sync.c
int my_sync_dir(const char *dir_name __attribute__((unused)), myf my_flags __attribute__((unused))) { #ifdef NEED_EXPLICIT_SYNC_DIR static const char cur_dir_name[]= {FN_CURLIB, 0}; File dir_fd; int res= 0; const char *correct_dir_name; DBUG_ENTER("my_sync_dir"); DBUG_PRINT("my",("Dir: '%s' my_flags: %lu", dir_name, my_flags)); /* Sometimes the path does not contain an explicit directory */ correct_dir_name= (dir_name[0] == 0) ? cur_dir_name : dir_name; /* Syncing a dir may give EINVAL on tmpfs on Linux, which is ok. EIO on the other hand is very important. Hence MY_IGNORE_BADFD. */ if ((dir_fd= my_open(correct_dir_name, O_RDONLY, MYF(my_flags))) >= 0) { if (my_sync(dir_fd, MYF(my_flags | MY_IGNORE_BADFD))) res= 2; if (my_close(dir_fd, MYF(my_flags))) res= 3; } else res= 1; DBUG_RETURN(res); #else return 0; #endif }
O3
c
my_sync_dir: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax cmpb $0x0, (%rdi) movq %rsi, %rbx leaq 0x4eb53(%rip), %rax # 0x8dd1f cmoveq %rax, %rdi xorl %esi, %esi movq %rbx, %rdx callq 0x3e858 testl %eax, %eax js 0x3f213 movl %eax, %r14d movq %rbx, %rsi orq $0x20, %rsi movl %eax, %edi callq 0x3f084 xorl %r15d, %r15d testl %eax, %eax setne %r15b addl %r15d, %r15d movl %r14d, %edi movq %rbx, %rsi callq 0x3e9fd testl %eax, %eax movl $0x3, %eax cmovel %r15d, %eax jmp 0x3f218 movl $0x1, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
my_sync_dir: push rbp mov rbp, rsp push r15 push r14 push rbx push rax cmp byte ptr [rdi], 0 mov rbx, rsi lea rax, my_sync_dir_cur_dir_name; "." cmovz rdi, rax xor esi, esi mov rdx, rbx call my_open test eax, eax js short loc_3F213 mov r14d, eax mov rsi, rbx or rsi, 20h mov edi, eax call my_sync xor r15d, r15d test eax, eax setnz r15b add r15d, r15d mov edi, r14d mov rsi, rbx call my_close test eax, eax mov eax, 3 cmovz eax, r15d jmp short loc_3F218 loc_3F213: mov eax, 1 loc_3F218: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long my_sync_dir(const char *a1, long long a2) { int v2; // eax unsigned int v3; // r14d unsigned int v4; // r15d bool v5; // zf long long result; // rax if ( !*a1 ) a1 = "."; v2 = my_open((long long)a1, 0, a2); if ( v2 < 0 ) return 1LL; v3 = v2; v4 = 2 * ((unsigned int)my_sync((unsigned int)v2, (unsigned int)a2 | 0x20) != 0); v5 = (unsigned int)my_close(v3, a2) == 0; result = 3LL; if ( v5 ) return v4; return result; }
my_sync_dir: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX CMP byte ptr [RDI],0x0 MOV RBX,RSI LEA RAX,[0x18dd1f] CMOVZ RDI,RAX XOR ESI,ESI MOV RDX,RBX CALL 0x0013e858 TEST EAX,EAX JS 0x0013f213 MOV R14D,EAX MOV RSI,RBX OR RSI,0x20 MOV EDI,EAX CALL 0x0013f084 XOR R15D,R15D TEST EAX,EAX SETNZ R15B ADD R15D,R15D MOV EDI,R14D MOV RSI,RBX CALL 0x0013e9fd TEST EAX,EAX MOV EAX,0x3 CMOVZ EAX,R15D JMP 0x0013f218 LAB_0013f213: MOV EAX,0x1 LAB_0013f218: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
char my_sync_dir(char *param_1,ulong param_2) { char cVar1; int iVar2; int iVar3; if (*param_1 == '\0') { param_1 = "."; } iVar2 = my_open(param_1,0,param_2); if (iVar2 < 0) { cVar1 = '\x01'; } else { iVar3 = my_sync(iVar2,param_2 | 0x20); iVar2 = my_close(iVar2,param_2); cVar1 = '\x03'; if (iVar2 == 0) { cVar1 = (iVar3 != 0) * '\x02'; } } return cVar1; }
28,775
mi_mmap_pwrite
eloqsql/storage/myisam/mi_dynrec.c
size_t mi_mmap_pwrite(MI_INFO *info, const uchar *Buffer, size_t Count, my_off_t offset, myf MyFlags) { DBUG_PRINT("info", ("mi_write with mmap %d\n", info->dfile)); if (info->s->concurrent_insert) mysql_rwlock_rdlock(&info->s->mmap_lock); /* The following test may fail in the following cases: - We failed to remap a memory area (fragmented memory?) - This thread has done some writes, but not yet extended the memory mapped area. */ if (info->s->mmaped_length >= offset + Count) { memcpy(info->s->file_map + offset, Buffer, Count); if (info->s->concurrent_insert) mysql_rwlock_unlock(&info->s->mmap_lock); return 0; } else { info->s->nonmmaped_inserts++; if (info->s->concurrent_insert) mysql_rwlock_unlock(&info->s->mmap_lock); return mysql_file_pwrite(info->dfile, Buffer, Count, offset, MyFlags); } }
O3
c
mi_mmap_pwrite: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %r8, %r14 movq %rcx, %r15 movq %rdx, %rbx movq %rsi, %r12 movq %rdi, %r13 movq (%rdi), %rax cmpb $0x0, 0x384(%rax) je 0x2ed05 leaq 0x4e0(%rax), %rdi cmpq $0x0, 0x570(%rax) jne 0x2ede9 callq 0x5f868 movq (%r13), %rax leaq (%r15,%rbx), %rcx cmpq %rcx, 0x4d0(%rax) jae 0x2ed93 movq %r14, -0x30(%rbp) incl 0x4d8(%rax) movq (%r13), %r14 cmpb $0x0, 0x384(%r14) je 0x2ed4d movq 0x570(%r14), %rdi addq $0x4e0, %r14 # imm = 0x4E0 testq %rdi, %rdi jne 0x2ee70 movq %r14, %rdi callq 0x5f996 movl 0x1c0(%r13), %r14d leaq 0x3030f5(%rip), %rax # 0x331e50 movq (%rax), %rax leaq -0x78(%rbp), %rdi movl %r14d, %esi movl $0x7, %edx callq *0x158(%rax) testq %rax, %rax jne 0x2edff movl %r14d, %edi movq %r12, %rsi movq %rbx, %rdx movq %r15, %rcx movq -0x30(%rbp), %r8 callq 0x5bce2 movq %rax, %r15 jmp 0x2edd7 addq 0x270(%rax), %r15 movq %r15, %rdi movq %r12, %rsi movq %rbx, %rdx callq 0x282c0 movq (%r13), %rbx cmpb $0x0, 0x384(%rbx) je 0x2edd4 movq 0x570(%rbx), %rdi addq $0x4e0, %rbx # imm = 0x4E0 testq %rdi, %rdi jne 0x2ee85 movq %rbx, %rdi callq 0x5f996 xorl %r15d, %r15d movq %r15, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x63c35(%rip), %rsi # 0x92a25 movl $0xe3, %edx callq 0x2a077 jmp 0x2ed05 movq %rax, %r13 leaq 0x303047(%rip), %rax # 0x331e50 movq (%rax), %rax leaq 0x63c12(%rip), %rdx # 0x92a25 movq %r13, %rdi movq %rbx, %rsi movl $0xf8, %ecx callq *0x210(%rax) movl %r14d, %edi movq %r12, %rsi movq %rbx, %rdx movq %r15, %rcx movq -0x30(%rbp), %r14 movq %r14, %r8 callq 0x5bce2 movq %rax, %r15 xorl %esi, %esi testq %rax, %rax cmovneq %rsi, %rbx cmpq $-0x1, %rax cmovneq %rax, %rsi testb $0x6, %r14b cmovneq %rbx, %rsi leaq 0x302ff1(%rip), %rax # 0x331e50 movq (%rax), %rax movq %r13, %rdi callq *0x218(%rax) jmp 0x2edd7 leaq 0x302fd9(%rip), %rax # 0x331e50 movq (%rax), %rax callq *0x168(%rax) jmp 0x2ed45 leaq 0x302fc4(%rip), %rax # 0x331e50 movq (%rax), %rax callq *0x168(%rax) jmp 0x2edcc
mi_mmap_pwrite: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r14, r8 mov r15, rcx mov rbx, rdx mov r12, rsi mov r13, rdi mov rax, [rdi] cmp byte ptr [rax+384h], 0 jz short loc_2ED05 lea rdi, [rax+4E0h] cmp qword ptr [rax+570h], 0 jnz loc_2EDE9 call my_rw_rdlock loc_2ED05: mov rax, [r13+0] lea rcx, [r15+rbx] cmp [rax+4D0h], rcx jnb short loc_2ED93 mov [rbp+var_30], r14 inc dword ptr [rax+4D8h] mov r14, [r13+0] cmp byte ptr [r14+384h], 0 jz short loc_2ED4D mov rdi, [r14+570h] add r14, 4E0h test rdi, rdi jnz loc_2EE70 loc_2ED45: mov rdi, r14 call my_rw_unlock loc_2ED4D: mov r14d, [r13+1C0h] lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_78] mov esi, r14d mov edx, 7 call qword ptr [rax+158h] test rax, rax jnz loc_2EDFF mov edi, r14d mov rsi, r12 mov rdx, rbx mov rcx, r15 mov r8, [rbp+var_30] call my_pwrite mov r15, rax jmp short loc_2EDD7 loc_2ED93: add r15, [rax+270h] mov rdi, r15 mov rsi, r12 mov rdx, rbx call _memcpy mov rbx, [r13+0] cmp byte ptr [rbx+384h], 0 jz short loc_2EDD4 mov rdi, [rbx+570h] add rbx, 4E0h test rdi, rdi jnz loc_2EE85 loc_2EDCC: mov rdi, rbx call my_rw_unlock loc_2EDD4: xor r15d, r15d loc_2EDD7: mov rax, r15 add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_2EDE9: lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 0E3h call psi_rwlock_rdlock jmp loc_2ED05 loc_2EDFF: mov r13, rax lea rax, PSI_server mov rax, [rax] lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r13 mov rsi, rbx mov ecx, 0F8h call qword ptr [rax+210h] mov edi, r14d mov rsi, r12 mov rdx, rbx mov rcx, r15 mov r14, [rbp+var_30] mov r8, r14 call my_pwrite mov r15, rax xor esi, esi test rax, rax cmovnz rbx, rsi cmp rax, 0FFFFFFFFFFFFFFFFh cmovnz rsi, rax test r14b, 6 cmovnz rsi, rbx lea rax, PSI_server mov rax, [rax] mov rdi, r13 call qword ptr [rax+218h] jmp loc_2EDD7 loc_2EE70: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+168h] jmp loc_2ED45 loc_2EE85: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+168h] jmp loc_2EDCC
long long mi_mmap_pwrite(_DWORD *a1, long long a2, long long a3, long long a4, long long a5) { long long v9; // rax long long v10; // rdi long long v11; // rax long long v12; // r14 long long v13; // rdi long long v14; // r14 unsigned int v15; // r14d long long v16; // rax long long v17; // r15 long long v18; // rbx long long v19; // rdi long long v20; // rbx long long v22; // r13 _BYTE v23[72]; // [rsp+8h] [rbp-78h] BYREF long long v24; // [rsp+50h] [rbp-30h] v9 = *(_QWORD *)a1; if ( *(_BYTE *)(*(_QWORD *)a1 + 900LL) ) { v10 = v9 + 1248; if ( *(_QWORD *)(v9 + 1392) ) psi_rwlock_rdlock(v10, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c", 0xE3u); else my_rw_rdlock(v10); } v11 = *(_QWORD *)a1; if ( *(_QWORD *)(*(_QWORD *)a1 + 1232LL) >= (unsigned long long)(a4 + a3) ) { memcpy(*(_QWORD *)(v11 + 624) + a4, a2, a3); v18 = *(_QWORD *)a1; if ( *(_BYTE *)(*(_QWORD *)a1 + 900LL) ) { v19 = *(_QWORD *)(v18 + 1392); v20 = v18 + 1248; if ( v19 ) PSI_server[45](); my_rw_unlock(v20); } return 0LL; } else { v24 = a5; ++*(_DWORD *)(v11 + 1240); v12 = *(_QWORD *)a1; if ( *(_BYTE *)(*(_QWORD *)a1 + 900LL) ) { v13 = *(_QWORD *)(v12 + 1392); v14 = v12 + 1248; if ( v13 ) PSI_server[45](); my_rw_unlock(v14); } v15 = a1[112]; v16 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v23, v15, 7LL); if ( v16 ) { v22 = v16; ((void ( *)(long long, long long, const char *, long long))PSI_server[66])( v16, a3, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c", 248LL); v17 = my_pwrite(v15, a2, a3, a4, v24); ((void ( *)(long long))PSI_server[67])(v22); } else { return my_pwrite(v15, a2, a3, a4, v24); } } return v17; }
mi_mmap_pwrite: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R14,R8 MOV R15,RCX MOV RBX,RDX MOV R12,RSI MOV R13,RDI MOV RAX,qword ptr [RDI] CMP byte ptr [RAX + 0x384],0x0 JZ 0x0012ed05 LEA RDI,[RAX + 0x4e0] CMP qword ptr [RAX + 0x570],0x0 JNZ 0x0012ede9 CALL 0x0015f868 LAB_0012ed05: MOV RAX,qword ptr [R13] LEA RCX,[R15 + RBX*0x1] CMP qword ptr [RAX + 0x4d0],RCX JNC 0x0012ed93 MOV qword ptr [RBP + -0x30],R14 INC dword ptr [RAX + 0x4d8] MOV R14,qword ptr [R13] CMP byte ptr [R14 + 0x384],0x0 JZ 0x0012ed4d MOV RDI,qword ptr [R14 + 0x570] ADD R14,0x4e0 TEST RDI,RDI JNZ 0x0012ee70 LAB_0012ed45: MOV RDI,R14 CALL 0x0015f996 LAB_0012ed4d: MOV R14D,dword ptr [R13 + 0x1c0] LEA RAX,[0x431e50] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x78] MOV ESI,R14D MOV EDX,0x7 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0012edff MOV EDI,R14D MOV RSI,R12 MOV RDX,RBX MOV RCX,R15 MOV R8,qword ptr [RBP + -0x30] CALL 0x0015bce2 MOV R15,RAX JMP 0x0012edd7 LAB_0012ed93: ADD R15,qword ptr [RAX + 0x270] MOV RDI,R15 MOV RSI,R12 MOV RDX,RBX CALL 0x001282c0 MOV RBX,qword ptr [R13] CMP byte ptr [RBX + 0x384],0x0 JZ 0x0012edd4 MOV RDI,qword ptr [RBX + 0x570] ADD RBX,0x4e0 TEST RDI,RDI JNZ 0x0012ee85 LAB_0012edcc: MOV RDI,RBX CALL 0x0015f996 LAB_0012edd4: XOR R15D,R15D LAB_0012edd7: MOV RAX,R15 ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0012ede9: LEA RSI,[0x192a25] MOV EDX,0xe3 CALL 0x0012a077 JMP 0x0012ed05 LAB_0012edff: MOV R13,RAX LEA RAX,[0x431e50] MOV RAX,qword ptr [RAX] LEA RDX,[0x192a25] MOV RDI,R13 MOV RSI,RBX MOV ECX,0xf8 CALL qword ptr [RAX + 0x210] MOV EDI,R14D MOV RSI,R12 MOV RDX,RBX MOV RCX,R15 MOV R14,qword ptr [RBP + -0x30] MOV R8,R14 CALL 0x0015bce2 MOV R15,RAX XOR ESI,ESI TEST RAX,RAX CMOVNZ RBX,RSI CMP RAX,-0x1 CMOVNZ RSI,RAX TEST R14B,0x6 CMOVNZ RSI,RBX LEA RAX,[0x431e50] MOV RAX,qword ptr [RAX] MOV RDI,R13 CALL qword ptr [RAX + 0x218] JMP 0x0012edd7 LAB_0012ee70: LEA RAX,[0x431e50] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x168] JMP 0x0012ed45 LAB_0012ee85: LEA RAX,[0x431e50] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x168] JMP 0x0012edcc
size_t mi_mmap_pwrite(long *param_1,void *param_2,size_t param_3,long param_4,ulong param_5) { int4 uVar1; ulong uVar2; long lVar3; size_t sVar4; size_t sVar5; int1 local_80 [72]; ulong local_38; lVar3 = *param_1; if (*(char *)(lVar3 + 900) != '\0') { if (*(long *)(lVar3 + 0x570) == 0) { my_rw_rdlock(); } else { psi_rwlock_rdlock(lVar3 + 0x4e0, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c",0xe3); } } lVar3 = *param_1; if (*(ulong *)(lVar3 + 0x4d0) < param_4 + param_3) { *(int *)(lVar3 + 0x4d8) = *(int *)(lVar3 + 0x4d8) + 1; lVar3 = *param_1; local_38 = param_5; if (*(char *)(lVar3 + 900) != '\0') { if (*(long *)(lVar3 + 0x570) != 0) { (**(code **)(PSI_server + 0x168))(); } my_rw_unlock(lVar3 + 0x4e0); } uVar1 = (int4)param_1[0x38]; lVar3 = (**(code **)(PSI_server + 0x158))(local_80,uVar1,7); if (lVar3 == 0) { sVar4 = my_pwrite(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" ,0xf8); uVar2 = local_38; sVar4 = my_pwrite(uVar1,param_2,param_3,param_4,local_38); if (sVar4 != 0) { param_3 = 0; } sVar5 = 0; if (sVar4 != 0xffffffffffffffff) { sVar5 = sVar4; } if ((uVar2 & 6) != 0) { sVar5 = param_3; } (**(code **)(PSI_server + 0x218))(lVar3,sVar5); } } else { memcpy((void *)(param_4 + *(long *)(lVar3 + 0x270)),param_2,param_3); lVar3 = *param_1; if (*(char *)(lVar3 + 900) != '\0') { if (*(long *)(lVar3 + 0x570) != 0) { (**(code **)(PSI_server + 0x168))(); } my_rw_unlock(lVar3 + 0x4e0); } sVar4 = 0; } return sVar4; }
28,776
R3D_DrawMesh
r3d/src/r3d_core.c
void R3D_DrawMesh(Mesh mesh, Material material, Matrix transform) { r3d_drawcall_t drawCall = { 0 }; if (R3D.state.render.billboardMode == R3D_BILLBOARD_FRONT) { r3d_billboard_mode_front(&transform, &R3D.state.transform.invView); } else if (R3D.state.render.billboardMode == R3D_BILLBOARD_Y_AXIS) { r3d_billboard_mode_y(&transform, &R3D.state.transform.invView); } drawCall.transform = transform; drawCall.material = material; drawCall.geometry.mesh = mesh; drawCall.geometryType = R3D_DRAWCALL_GEOMETRY_MESH; drawCall.shadowCastMode = R3D.state.render.shadowCastMode; R3D_RenderMode mode = R3D.state.render.mode; if (mode == R3D_RENDER_AUTO_DETECT) { mode = r3d_render_auto_detect_mode(&material); } r3d_array_t* arr = &R3D.container.aDrawDeferred; if (mode == R3D_RENDER_FORWARD) { drawCall.forward.alphaScissorThreshold = R3D.state.render.alphaScissorThreshold; drawCall.forward.blendMode = R3D.state.render.blendMode; arr = &R3D.container.aDrawForward; } r3d_array_push_back(arr, &drawCall); }
O3
c
R3D_DrawMesh: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x120, %rsp # imm = 0x120 leaq 0xb0(%rbp), %r15 leaq 0x88(%rbp), %rbx leaq 0x10(%rbp), %r14 xorps %xmm0, %xmm0 movups %xmm0, -0x40(%rbp) movups %xmm0, -0x50(%rbp) movups %xmm0, -0x60(%rbp) movq $0x0, -0x30(%rbp) leaq 0xe16b3(%rip), %r12 # 0x1afc20 movl 0x171c(%r12), %eax cmpl $0x2, %eax je 0xce595 cmpl $0x1, %eax jne 0xce5a9 movl $0x15a4, %esi # imm = 0x15A4 addq 0xb1a25(%rip), %rsi # 0x17ffb0 movq %r15, %rdi callq 0xd0c84 jmp 0xce5a9 movl $0x15a4, %esi # imm = 0x15A4 addq 0xb1a0f(%rip), %rsi # 0x17ffb0 movq %r15, %rdi callq 0xd0d77 movups (%r15), %xmm0 movups 0x10(%r15), %xmm1 movups 0x20(%r15), %xmm2 movups 0x30(%r15), %xmm3 leaq -0xd8(%rbp), %rdx movaps %xmm3, -0x38(%rdx) movaps %xmm2, -0x48(%rdx) movaps %xmm1, -0x58(%rdx) movaps %xmm0, -0x68(%rdx) movups (%rbx), %xmm0 movups 0x10(%rbx), %xmm1 movaps %xmm0, -0x28(%rdx) movaps %xmm1, -0x18(%rdx) movq 0x20(%rbx), %rax movq %rax, -0x8(%rdx) movl $0xf, %ecx movq %rdx, %rdi movq %r14, %rsi rep movsq (%rsi), %es:(%rdi) movl $0x0, 0xb4(%rdx) movl 0x1710(%r12), %eax movl 0x1718(%r12), %ecx movl %ecx, 0xb0(%rdx) testl %eax, %eax jne 0xce624 movq %rbx, %rdi callq 0xce823 cmpl $0x2, %eax jne 0xce671 movss 0x1720(%r12), %xmm0 movss %xmm0, -0x2c(%rbp) movl 0x1714(%r12), %eax movl %eax, -0x30(%rbp) movq 0xd0(%r12), %rdi movq 0xd8(%r12), %rcx cmpq %rcx, %rdi jae 0xce6cd leaq 0xd0(%r12), %rbx movq 0xc8(%r12), %rax addq $0xe0, %r12 jmp 0xce6a1 movq 0x90(%r12), %rdi movq 0x98(%r12), %rcx cmpq %rcx, %rdi jae 0xce71a leaq 0x90(%r12), %rbx movq 0x88(%r12), %rax addq $0xa0, %r12 movq %r12, %r14 movq (%r14), %rdx imulq %rdx, %rdi addq %rax, %rdi leaq -0x140(%rbp), %rsi callq 0x82d0 incq (%rbx) addq $0x120, %rsp # imm = 0x120 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq leaq 0x1(%rdi), %r15 testq %rdi, %r15 je 0xce767 movq %rdi, %rax shrq %rax orq %rdi, %rax movq %rax, %rdx shrq $0x2, %rdx orq %rax, %rdx movq %rdx, %rax shrq $0x4, %rax orq %rdx, %rax movq %rax, %rdx shrq $0x8, %rdx orq %rax, %rdx movq %rdx, %rax shrq $0x10, %rax orq %rdx, %rax movq %rax, %r15 shrq $0x20, %r15 orq %rax, %r15 incq %r15 jmp 0xce76a leaq 0x1(%rdi), %r15 testq %rdi, %r15 je 0xce7c5 movq %rdi, %rax shrq %rax orq %rdi, %rax movq %rax, %rdx shrq $0x2, %rdx orq %rax, %rdx movq %rdx, %rax shrq $0x4, %rax orq %rdx, %rax movq %rax, %rdx shrq $0x8, %rdx orq %rax, %rdx movq %rdx, %rax shrq $0x10, %rax orq %rdx, %rax movq %rax, %r15 shrq $0x20, %r15 orq %rax, %r15 incq %r15 jmp 0xce7c8 addq %r15, %r15 leaq 0xd0(%r12), %rbx leaq 0xe0(%r12), %r14 movq 0xc8(%r12), %rax cmpq %r15, %rcx jae 0xce6a4 movq 0xe0(%r12), %rsi imulq %r15, %rsi movq %rax, %rdi callq 0x86b0 testq %rax, %rax je 0xce6bd movq %rax, 0xc8(%r12) movq %r15, 0xd8(%r12) movq 0xd0(%r12), %rdi jmp 0xce6a4 addq %r15, %r15 leaq 0x90(%r12), %rbx leaq 0xa0(%r12), %r14 movq 0x88(%r12), %rax cmpq %r15, %rcx jae 0xce6a4 movq 0xa0(%r12), %rsi imulq %r15, %rsi movq %rax, %rdi callq 0x86b0 testq %rax, %rax je 0xce6bd movq %rax, 0x88(%r12) movq %r15, 0x98(%r12) movq 0x90(%r12), %rdi jmp 0xce6a4
R3D_DrawMesh: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 120h lea r15, [rbp+arg_A0] lea rbx, [rbp+arg_78] lea r14, [rbp+arg_0] xorps xmm0, xmm0 movups [rbp+var_40], xmm0 movups [rbp+var_50], xmm0 movups [rbp+var_60], xmm0 mov [rbp+var_30], 0 lea r12, R3D mov eax, [r12+171Ch] cmp eax, 2 jz short loc_CE595 cmp eax, 1 jnz short loc_CE5A9 mov esi, 15A4h add rsi, cs:R3D_ptr mov rdi, r15 call r3d_billboard_mode_front jmp short loc_CE5A9 loc_CE595: mov esi, 15A4h add rsi, cs:R3D_ptr mov rdi, r15 call r3d_billboard_mode_y loc_CE5A9: movups xmm0, xmmword ptr [r15] movups xmm1, xmmword ptr [r15+10h] movups xmm2, xmmword ptr [r15+20h] movups xmm3, xmmword ptr [r15+30h] lea rdx, [rbp+var_D8] movaps xmmword ptr [rdx-38h], xmm3 movaps xmmword ptr [rdx-48h], xmm2 movaps xmmword ptr [rdx-58h], xmm1 movaps xmmword ptr [rdx-68h], xmm0 movups xmm0, xmmword ptr [rbx] movups xmm1, xmmword ptr [rbx+10h] movaps xmmword ptr [rdx-28h], xmm0 movaps xmmword ptr [rdx-18h], xmm1 mov rax, [rbx+20h] mov [rdx-8], rax mov ecx, 0Fh mov rdi, rdx mov rsi, r14 rep movsq mov dword ptr [rdx+0B4h], 0 mov eax, [r12+1710h] mov ecx, [r12+1718h] mov [rdx+0B0h], ecx test eax, eax jnz short loc_CE624 mov rdi, rbx call r3d_render_auto_detect_mode loc_CE624: cmp eax, 2 jnz short loc_CE671 movss xmm0, dword ptr [r12+1720h] movss dword ptr [rbp+var_30+4], xmm0 mov eax, [r12+1714h] mov dword ptr [rbp+var_30], eax mov rdi, [r12+0D0h] mov rcx, [r12+0D8h] cmp rdi, rcx jnb short loc_CE6CD lea rbx, [r12+0D0h] mov rax, [r12+0C8h] add r12, 0E0h jmp short loc_CE6A1 loc_CE671: mov rdi, [r12+90h] mov rcx, [r12+98h] cmp rdi, rcx jnb loc_CE71A lea rbx, [r12+90h] mov rax, [r12+88h] add r12, 0A0h loc_CE6A1: mov r14, r12 loc_CE6A4: mov rdx, [r14] imul rdi, rdx add rdi, rax lea rsi, [rbp+var_140] call _memcpy inc qword ptr [rbx] loc_CE6BD: add rsp, 120h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_CE6CD: lea r15, [rdi+1] test r15, rdi jz loc_CE767 mov rax, rdi shr rax, 1 or rax, rdi mov rdx, rax shr rdx, 2 or rdx, rax mov rax, rdx shr rax, 4 or rax, rdx mov rdx, rax shr rdx, 8 or rdx, rax mov rax, rdx shr rax, 10h or rax, rdx mov r15, rax shr r15, 20h or r15, rax inc r15 jmp short loc_CE76A loc_CE71A: lea r15, [rdi+1] test r15, rdi jz loc_CE7C5 mov rax, rdi shr rax, 1 or rax, rdi mov rdx, rax shr rdx, 2 or rdx, rax mov rax, rdx shr rax, 4 or rax, rdx mov rdx, rax shr rdx, 8 or rdx, rax mov rax, rdx shr rax, 10h or rax, rdx mov r15, rax shr r15, 20h or r15, rax inc r15 jmp short loc_CE7C8 loc_CE767: add r15, r15 loc_CE76A: lea rbx, [r12+0D0h] lea r14, [r12+0E0h] mov rax, [r12+0C8h] cmp rcx, r15 jnb loc_CE6A4 mov rsi, [r12+0E0h] imul rsi, r15 mov rdi, rax call _realloc test rax, rax jz loc_CE6BD mov [r12+0C8h], rax mov [r12+0D8h], r15 mov rdi, [r12+0D0h] jmp loc_CE6A4 loc_CE7C5: add r15, r15 loc_CE7C8: lea rbx, [r12+90h] lea r14, [r12+0A0h] mov rax, [r12+88h] cmp rcx, r15 jnb loc_CE6A4 mov rsi, [r12+0A0h] imul rsi, r15 mov rdi, rax call _realloc test rax, rax jz loc_CE6BD mov [r12+88h], rax mov [r12+98h], r15 mov rdi, [r12+90h] jmp loc_CE6A4
long long R3D_DrawMesh( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, char a7, int a8, int a9, int a10, int a11, int a12, int a13, int a14, int a15, int a16, int a17, int a18, int a19, int a20, int a21, __int128 a22, __int128 a23, long long a24, __int128 a25, __int128 a26, __int128 a27, __int128 a28) { int v28; // eax int v29; // eax long long v30; // rcx unsigned long long v31; // rdi unsigned long long v32; // rcx char *v33; // rbx long long result; // rax char *v35; // r12 unsigned long long v36; // rcx char *v37; // r14 unsigned long long v38; // rax unsigned long long v39; // r15 unsigned long long v40; // rax unsigned long long v41; // r15 __int128 v42; // [rsp+0h] [rbp-140h] BYREF __int128 v43; // [rsp+10h] [rbp-130h] __int128 v44; // [rsp+20h] [rbp-120h] __int128 v45; // [rsp+30h] [rbp-110h] __int128 v46; // [rsp+40h] [rbp-100h] __int128 v47; // [rsp+50h] [rbp-F0h] long long v48; // [rsp+60h] [rbp-E0h] _BYTE v49[120]; // [rsp+68h] [rbp-D8h] BYREF __int128 v50; // [rsp+E0h] [rbp-60h] __int128 v51; // [rsp+F0h] [rbp-50h] __int128 v52; // [rsp+100h] [rbp-40h] long long v53; // [rsp+110h] [rbp-30h] int v54; // [rsp+118h] [rbp-28h] int v55; // [rsp+11Ch] [rbp-24h] v52 = 0LL; v51 = 0LL; v50 = 0LL; v53 = 0LL; v28 = *(_DWORD *)&R3D[5916]; if ( v28 == 2 ) { r3d_billboard_mode_y(&a25, &R3D[5540]); } else if ( v28 == 1 ) { r3d_billboard_mode_front(&a25, &R3D[5540]); } v45 = a28; v44 = a27; v43 = a26; v42 = a25; v46 = a22; v47 = a23; v48 = a24; qmemcpy(v49, &a7, sizeof(v49)); v55 = 0; v29 = *(_DWORD *)&R3D[5904]; v30 = *(unsigned int *)&R3D[5912]; v54 = *(_DWORD *)&R3D[5912]; if ( !v29 ) v29 = r3d_render_auto_detect_mode( &a22, &a22, v49, v30, a5, a6, v42, *((_QWORD *)&v42 + 1), v43, *((_QWORD *)&v43 + 1), v44, *((_QWORD *)&v44 + 1), v45, *((_QWORD *)&v45 + 1), v46, *((_QWORD *)&v46 + 1), v47, *((_QWORD *)&v47 + 1), v48); if ( v29 == 2 ) { HIDWORD(v53) = *(_DWORD *)&R3D[5920]; LODWORD(v53) = *(_DWORD *)&R3D[5908]; v31 = *(_QWORD *)&R3D[208]; v32 = *(_QWORD *)&R3D[216]; if ( v31 < v32 ) { v33 = &R3D[208]; result = *(_QWORD *)&R3D[200]; v35 = &R3D[224]; LABEL_12: v37 = v35; LABEL_13: result = memcpy(result + *(_QWORD *)v37 * v31, &v42, *(_QWORD *)v37); ++*(_QWORD *)v33; return result; } if ( (v31 & (v31 + 1)) != 0 ) { v38 = v31 | (v31 >> 1) | ((v31 | (v31 >> 1)) >> 2) | ((v31 | (v31 >> 1) | ((v31 | (v31 >> 1)) >> 2)) >> 4) | ((v31 | (v31 >> 1) | ((v31 | (v31 >> 1)) >> 2) | ((v31 | (v31 >> 1) | ((v31 | (v31 >> 1)) >> 2)) >> 4)) >> 8) | ((v31 | (v31 >> 1) | ((v31 | (v31 >> 1)) >> 2) | ((v31 | (v31 >> 1) | ((v31 | (v31 >> 1)) >> 2)) >> 4) | ((v31 | (v31 >> 1) | ((v31 | (v31 >> 1)) >> 2) | ((v31 | (v31 >> 1) | ((v31 | (v31 >> 1)) >> 2)) >> 4)) >> 8)) >> 16); v39 = (v38 | HIDWORD(v38)) + 1; } else { v39 = 2 * (v31 + 1); } v33 = &R3D[208]; v37 = &R3D[224]; result = *(_QWORD *)&R3D[200]; if ( v32 >= v39 ) goto LABEL_13; result = realloc(*(_QWORD *)&R3D[200], v39 * *(_QWORD *)&R3D[224]); if ( result ) { *(_QWORD *)&R3D[200] = result; *(_QWORD *)&R3D[216] = v39; v31 = *(_QWORD *)&R3D[208]; goto LABEL_13; } } else { v31 = *(_QWORD *)&R3D[144]; v36 = *(_QWORD *)&R3D[152]; if ( v31 < v36 ) { v33 = &R3D[144]; result = *(_QWORD *)&R3D[136]; v35 = &R3D[160]; goto LABEL_12; } if ( (v31 & (v31 + 1)) != 0 ) { v40 = v31 | (v31 >> 1) | ((v31 | (v31 >> 1)) >> 2) | ((v31 | (v31 >> 1) | ((v31 | (v31 >> 1)) >> 2)) >> 4) | ((v31 | (v31 >> 1) | ((v31 | (v31 >> 1)) >> 2) | ((v31 | (v31 >> 1) | ((v31 | (v31 >> 1)) >> 2)) >> 4)) >> 8) | ((v31 | (v31 >> 1) | ((v31 | (v31 >> 1)) >> 2) | ((v31 | (v31 >> 1) | ((v31 | (v31 >> 1)) >> 2)) >> 4) | ((v31 | (v31 >> 1) | ((v31 | (v31 >> 1)) >> 2) | ((v31 | (v31 >> 1) | ((v31 | (v31 >> 1)) >> 2)) >> 4)) >> 8)) >> 16); v41 = (v40 | HIDWORD(v40)) + 1; } else { v41 = 2 * (v31 + 1); } v33 = &R3D[144]; v37 = &R3D[160]; result = *(_QWORD *)&R3D[136]; if ( v36 >= v41 ) goto LABEL_13; result = realloc(*(_QWORD *)&R3D[136], v41 * *(_QWORD *)&R3D[160]); if ( result ) { *(_QWORD *)&R3D[136] = result; *(_QWORD *)&R3D[152] = v41; v31 = *(_QWORD *)&R3D[144]; goto LABEL_13; } } return result; }
R3D_DrawMesh: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x120 LEA R15,[RBP + 0xb0] LEA RBX,[RBP + 0x88] LEA R14,[RBP + 0x10] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBP + -0x40],XMM0 MOVUPS xmmword ptr [RBP + -0x50],XMM0 MOVUPS xmmword ptr [RBP + -0x60],XMM0 MOV qword ptr [RBP + -0x30],0x0 LEA R12,[0x2afc20] MOV EAX,dword ptr [R12 + 0x171c] CMP EAX,0x2 JZ 0x001ce595 CMP EAX,0x1 JNZ 0x001ce5a9 MOV ESI,0x15a4 ADD RSI,qword ptr [0x0027ffb0] MOV RDI,R15 CALL 0x001d0c84 JMP 0x001ce5a9 LAB_001ce595: MOV ESI,0x15a4 ADD RSI,qword ptr [0x0027ffb0] MOV RDI,R15 CALL 0x001d0d77 LAB_001ce5a9: MOVUPS XMM0,xmmword ptr [R15] MOVUPS XMM1,xmmword ptr [R15 + 0x10] MOVUPS XMM2,xmmword ptr [R15 + 0x20] MOVUPS XMM3,xmmword ptr [R15 + 0x30] LEA RDX,[RBP + -0xd8] MOVAPS xmmword ptr [RDX + -0x38],XMM3 MOVAPS xmmword ptr [RDX + -0x48],XMM2 MOVAPS xmmword ptr [RDX + -0x58],XMM1 MOVAPS xmmword ptr [RDX + -0x68],XMM0 MOVUPS XMM0,xmmword ptr [RBX] MOVUPS XMM1,xmmword ptr [RBX + 0x10] MOVAPS xmmword ptr [RDX + -0x28],XMM0 MOVAPS xmmword ptr [RDX + -0x18],XMM1 MOV RAX,qword ptr [RBX + 0x20] MOV qword ptr [RDX + -0x8],RAX MOV ECX,0xf MOV RDI,RDX MOV RSI,R14 MOVSQ.REP RDI,RSI MOV dword ptr [RDX + 0xb4],0x0 MOV EAX,dword ptr [R12 + 0x1710] MOV ECX,dword ptr [R12 + 0x1718] MOV dword ptr [RDX + 0xb0],ECX TEST EAX,EAX JNZ 0x001ce624 MOV RDI,RBX CALL 0x001ce823 LAB_001ce624: CMP EAX,0x2 JNZ 0x001ce671 MOVSS XMM0,dword ptr [R12 + 0x1720] MOVSS dword ptr [RBP + -0x2c],XMM0 MOV EAX,dword ptr [R12 + 0x1714] MOV dword ptr [RBP + -0x30],EAX MOV RDI,qword ptr [R12 + 0xd0] MOV RCX,qword ptr [R12 + 0xd8] CMP RDI,RCX JNC 0x001ce6cd LEA RBX,[R12 + 0xd0] MOV RAX,qword ptr [R12 + 0xc8] ADD R12,0xe0 JMP 0x001ce6a1 LAB_001ce671: MOV RDI,qword ptr [R12 + 0x90] MOV RCX,qword ptr [R12 + 0x98] CMP RDI,RCX JNC 0x001ce71a LEA RBX,[R12 + 0x90] MOV RAX,qword ptr [R12 + 0x88] ADD R12,0xa0 LAB_001ce6a1: MOV R14,R12 LAB_001ce6a4: MOV RDX,qword ptr [R14] IMUL RDI,RDX ADD RDI,RAX LEA RSI,[RBP + -0x140] CALL 0x001082d0 INC qword ptr [RBX] LAB_001ce6bd: ADD RSP,0x120 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001ce6cd: LEA R15,[RDI + 0x1] TEST R15,RDI JZ 0x001ce767 MOV RAX,RDI SHR RAX,0x1 OR RAX,RDI MOV RDX,RAX SHR RDX,0x2 OR RDX,RAX MOV RAX,RDX SHR RAX,0x4 OR RAX,RDX MOV RDX,RAX SHR RDX,0x8 OR RDX,RAX MOV RAX,RDX SHR RAX,0x10 OR RAX,RDX MOV R15,RAX SHR R15,0x20 OR R15,RAX INC R15 JMP 0x001ce76a LAB_001ce71a: LEA R15,[RDI + 0x1] TEST R15,RDI JZ 0x001ce7c5 MOV RAX,RDI SHR RAX,0x1 OR RAX,RDI MOV RDX,RAX SHR RDX,0x2 OR RDX,RAX MOV RAX,RDX SHR RAX,0x4 OR RAX,RDX MOV RDX,RAX SHR RDX,0x8 OR RDX,RAX MOV RAX,RDX SHR RAX,0x10 OR RAX,RDX MOV R15,RAX SHR R15,0x20 OR R15,RAX INC R15 JMP 0x001ce7c8 LAB_001ce767: ADD R15,R15 LAB_001ce76a: LEA RBX,[R12 + 0xd0] LEA R14,[R12 + 0xe0] MOV RAX,qword ptr [R12 + 0xc8] CMP RCX,R15 JNC 0x001ce6a4 MOV RSI,qword ptr [R12 + 0xe0] IMUL RSI,R15 MOV RDI,RAX CALL 0x001086b0 TEST RAX,RAX JZ 0x001ce6bd MOV qword ptr [R12 + 0xc8],RAX MOV qword ptr [R12 + 0xd8],R15 MOV RDI,qword ptr [R12 + 0xd0] JMP 0x001ce6a4 LAB_001ce7c5: ADD R15,R15 LAB_001ce7c8: LEA RBX,[R12 + 0x90] LEA R14,[R12 + 0xa0] MOV RAX,qword ptr [R12 + 0x88] CMP RCX,R15 JNC 0x001ce6a4 MOV RSI,qword ptr [R12 + 0xa0] IMUL RSI,R15 MOV RDI,RAX CALL 0x001086b0 TEST RAX,RAX JZ 0x001ce6bd MOV qword ptr [R12 + 0x88],RAX MOV qword ptr [R12 + 0x98],R15 MOV RDI,qword ptr [R12 + 0x90] JMP 0x001ce6a4
void R3D_DrawMesh(void) { void *pvVar1; ulong uVar2; void *pvVar3; ulong uVar4; void *pvVar5; void *pvVar6; int iVar7; ulong uVar8; ulong uVar9; void *pvVar10; long lVar11; long *plVar12; int8 *puVar13; int8 *puVar14; size_t *psVar15; ulong uVar16; byte bVar17; int4 uStack0000000000000080; int4 uStack0000000000000084; int4 uStack0000000000000088; int4 uStack000000000000008c; int4 uStack0000000000000090; int4 uStack0000000000000094; int4 uStack0000000000000098; int4 uStack000000000000009c; int8 in_stack_000000a0; int8 in_stack_000000a8; int8 in_stack_000000b0; int8 in_stack_000000b8; int8 in_stack_000000c0; int4 uStack00000000000000c8; int4 uStack00000000000000cc; int4 uStack00000000000000d0; int4 uStack00000000000000d4; int4 uStack00000000000000d8; int4 uStack00000000000000dc; int4 uStack00000000000000e0; int4 uStack00000000000000e4; int8 local_148; int8 uStack_140; int8 local_138; int8 uStack_130; int4 local_128; int4 uStack_124; int4 uStack_120; int4 uStack_11c; int4 local_118; int4 uStack_114; int4 uStack_110; int4 uStack_10c; int4 local_108; int4 uStack_104; int4 uStack_100; int4 uStack_fc; int4 local_f8; int4 uStack_f4; int4 uStack_f0; int4 uStack_ec; int8 local_e8; int8 local_e0 [15]; int8 local_68; int8 uStack_60; int8 local_58; int8 uStack_50; int8 local_48; int8 uStack_40; int8 local_38; int4 local_30; int4 local_2c; bVar17 = 0; local_48 = 0; uStack_40 = 0; local_58 = 0; uStack_50 = 0; local_68 = 0; uStack_60 = 0; local_38 = 0; if (DAT_002b133c == 2) { r3d_billboard_mode_y(&stack0x000000a8,PTR_R3D_0027ffb0 + 0x15a4); } else if (DAT_002b133c == 1) { r3d_billboard_mode_front(&stack0x000000a8,PTR_R3D_0027ffb0 + 0x15a4); } local_118 = uStack00000000000000d8; uStack_114 = uStack00000000000000dc; uStack_110 = uStack00000000000000e0; uStack_10c = uStack00000000000000e4; local_128 = uStack00000000000000c8; uStack_124 = uStack00000000000000cc; uStack_120 = uStack00000000000000d0; uStack_11c = uStack00000000000000d4; local_138 = in_stack_000000b8; uStack_130 = in_stack_000000c0; local_148 = in_stack_000000a8; uStack_140 = in_stack_000000b0; local_108 = uStack0000000000000080; uStack_104 = uStack0000000000000084; uStack_100 = uStack0000000000000088; uStack_fc = uStack000000000000008c; local_f8 = uStack0000000000000090; uStack_f4 = uStack0000000000000094; uStack_f0 = uStack0000000000000098; uStack_ec = uStack000000000000009c; local_e8 = in_stack_000000a0; puVar13 = (int8 *)&stack0x00000008; puVar14 = local_e0; for (lVar11 = 0xf; lVar11 != 0; lVar11 = lVar11 + -1) { *puVar14 = *puVar13; puVar13 = puVar13 + (ulong)bVar17 * -2 + 1; puVar14 = puVar14 + (ulong)bVar17 * -2 + 1; } local_2c = 0; local_30 = DAT_002b1338; iVar7 = DAT_002b1330; if (DAT_002b1330 == 0) { iVar7 = r3d_render_auto_detect_mode(&stack0x00000080); } if (iVar7 == 2) { local_38 = CONCAT44(DAT_002b1340,DAT_002b1334); pvVar10 = DAT_002afce8; uVar9 = DAT_002afcf0; if (DAT_002afcf0 < DAT_002afcf8) { plVar12 = (long *)&DAT_002afcf0; psVar15 = (size_t *)&DAT_002afd00; goto LAB_001ce6a4; } if ((DAT_002afcf0 + 1 & DAT_002afcf0) == 0) { uVar16 = (DAT_002afcf0 + 1) * 2; } else { uVar8 = DAT_002afcf0 >> 1 | DAT_002afcf0; uVar8 = uVar8 >> 2 | uVar8; uVar8 = uVar8 >> 4 | uVar8; uVar8 = uVar8 >> 8 | uVar8; uVar8 = uVar8 >> 0x10 | uVar8; uVar16 = (uVar8 >> 0x20 | uVar8) + 1; } plVar12 = (long *)&DAT_002afcf0; psVar15 = (size_t *)&DAT_002afd00; if (uVar16 <= DAT_002afcf8) goto LAB_001ce6a4; pvVar10 = realloc(DAT_002afce8,DAT_002afd00 * uVar16); psVar15 = (size_t *)&DAT_002afd00; pvVar5 = DAT_002afca8; uVar8 = DAT_002afcb8; pvVar1 = DAT_002afca8; uVar9 = DAT_002afcf0; uVar2 = DAT_002afcb8; pvVar6 = pvVar10; pvVar3 = DAT_002afce8; uVar4 = DAT_002afcf8; } else { if (DAT_002afcb0 < DAT_002afcb8) { plVar12 = (long *)&DAT_002afcb0; psVar15 = (size_t *)&DAT_002afcc0; pvVar10 = DAT_002afca8; uVar9 = DAT_002afcb0; goto LAB_001ce6a4; } if ((DAT_002afcb0 + 1 & DAT_002afcb0) == 0) { uVar8 = (DAT_002afcb0 + 1) * 2; } else { uVar9 = DAT_002afcb0 >> 1 | DAT_002afcb0; uVar9 = uVar9 >> 2 | uVar9; uVar9 = uVar9 >> 4 | uVar9; uVar9 = uVar9 >> 8 | uVar9; uVar9 = uVar9 >> 0x10 | uVar9; uVar8 = (uVar9 >> 0x20 | uVar9) + 1; } plVar12 = (long *)&DAT_002afcb0; psVar15 = (size_t *)&DAT_002afcc0; pvVar10 = DAT_002afca8; uVar9 = DAT_002afcb0; if (uVar8 <= DAT_002afcb8) goto LAB_001ce6a4; pvVar10 = realloc(DAT_002afca8,DAT_002afcc0 * uVar8); pvVar5 = pvVar10; pvVar1 = DAT_002afca8; uVar9 = DAT_002afcb0; uVar2 = DAT_002afcb8; pvVar6 = DAT_002afce8; pvVar3 = DAT_002afce8; uVar16 = DAT_002afcf8; uVar4 = DAT_002afcf8; } DAT_002afcf8 = uVar16; DAT_002afce8 = pvVar6; DAT_002afcb8 = uVar8; DAT_002afca8 = pvVar5; if (pvVar10 == (void *)0x0) { DAT_002afca8 = pvVar1; DAT_002afcb8 = uVar2; DAT_002afce8 = pvVar3; DAT_002afcf8 = uVar4; return; } LAB_001ce6a4: memcpy((void *)(uVar9 * *psVar15 + (long)pvVar10),&local_148,*psVar15); *plVar12 = *plVar12 + 1; return; }
28,777
google::protobuf::compiler::java::ImmutableMapFieldGenerator::GenerateBuilderParsingCode(google::protobuf::io::Printer*) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/map_field.cc
void ImmutableMapFieldGenerator::GenerateBuilderParsingCode( io::Printer* printer) const { if (!SupportUnknownEnumValue(descriptor_->file()) && GetJavaType(ValueField(descriptor_)) == JAVATYPE_ENUM) { printer->Print( variables_, "com.google.protobuf.ByteString bytes = input.readBytes();\n" "com.google.protobuf.MapEntry<$type_parameters$>\n" "$name$__ = $default_entry$.getParserForType().parseFrom(bytes);\n" "if ($value_enum_type$.forNumber($name$__.getValue()) == null) {\n" " mergeUnknownLengthDelimitedField($number$, bytes);\n" "} else {\n" " internalGetMutable$capitalized_name$().getMutableMap().put(\n" " $name$__.getKey(), $name$__.getValue());\n" " $set_has_field_bit_builder$\n" "}\n"); } else { printer->Print( variables_, "com.google.protobuf.MapEntry<$type_parameters$>\n" "$name$__ = input.readMessage(\n" " $default_entry$.getParserForType(), extensionRegistry);\n" "internalGetMutable$capitalized_name$().getMutableMap().put(\n" " $name$__.getKey(), $name$__.getValue());\n" "$set_has_field_bit_builder$\n"); } }
O3
cpp
google::protobuf::compiler::java::ImmutableMapFieldGenerator::GenerateBuilderParsingCode(google::protobuf::io::Printer*) const: pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movq 0x8(%rdi), %rdi movq 0x10(%rdi), %rax cmpb $0x3, 0x3(%rax) je 0xd873f callq 0xd7fc2 movq %rax, %rdi callq 0x43f76 cmpl $0x7, %eax jne 0xd873f leaq 0xfd415(%rip), %rdx # 0x1d5b52 jmp 0xd8746 leaq 0xfd5c2(%rip), %rdx # 0x1d5d08 addq $0x18, %r14 movq %rbx, %rdi movq %r14, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x16cd32
_ZNK6google8protobuf8compiler4java26ImmutableMapFieldGenerator26GenerateBuilderParsingCodeEPNS0_2io7PrinterE: push r14 push rbx push rax mov rbx, rsi mov r14, rdi mov rdi, [rdi+8]; this mov rax, [rdi+10h] cmp byte ptr [rax+3], 3 jz short loc_D873F call _ZN6google8protobuf8compiler4java12_GLOBAL__N_110ValueFieldEPKNS0_15FieldDescriptorE; google::protobuf::compiler::java::`anonymous namespace'::ValueField(google::protobuf::FieldDescriptor const*) mov rdi, rax; this call _ZN6google8protobuf8compiler4java11GetJavaTypeEPKNS0_15FieldDescriptorE; google::protobuf::compiler::java::GetJavaType(google::protobuf::FieldDescriptor const*) cmp eax, 7 jnz short loc_D873F lea rdx, aComGoogleProto_14; "com.google.protobuf.ByteString bytes = "... jmp short loc_D8746 loc_D873F: lea rdx, aComGoogleProto_15; "com.google.protobuf.MapEntry<$type_para"... loc_D8746: add r14, 18h mov rdi, rbx; this mov rsi, r14 add rsp, 8 pop rbx pop r14 jmp _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
long long google::protobuf::compiler::java::ImmutableMapFieldGenerator::GenerateBuilderParsingCode( google::protobuf::compiler::java::ImmutableMapFieldGenerator *this, google::protobuf::io::Printer *a2, long long a3, long long a4, long long a5, long long a6, void *a7, int a8, char a9, int a10, int a11, int a12, int a13, int a14, int a15, void *a16, int a17, char a18) { google::protobuf::compiler::java::_anonymous_namespace_ *v18; // rdi google::protobuf::compiler::java *v19; // rax v18 = (google::protobuf::compiler::java::_anonymous_namespace_ *)*((_QWORD *)this + 1); if ( *(_BYTE *)(*((_QWORD *)v18 + 2) + 3LL) != 3 ) { v19 = (google::protobuf::compiler::java *)google::protobuf::compiler::java::`anonymous namespace'::ValueField( v18, a2); google::protobuf::compiler::java::GetJavaType(v19, a2); } return google::protobuf::io::Printer::Print(a2, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
GenerateBuilderParsingCode: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI MOV RDI,qword ptr [RDI + 0x8] MOV RAX,qword ptr [RDI + 0x10] CMP byte ptr [RAX + 0x3],0x3 JZ 0x001d873f CALL 0x001d7fc2 MOV RDI,RAX CALL 0x00143f76 CMP EAX,0x7 JNZ 0x001d873f LEA RDX,[0x2d5b52] JMP 0x001d8746 LAB_001d873f: LEA RDX,[0x2d5d08] LAB_001d8746: ADD R14,0x18 MOV RDI,RBX MOV RSI,R14 ADD RSP,0x8 POP RBX POP R14 JMP 0x0026cd32
/* google::protobuf::compiler::java::ImmutableMapFieldGenerator::GenerateBuilderParsingCode(google::protobuf::io::Printer*) const */ void __thiscall google::protobuf::compiler::java::ImmutableMapFieldGenerator::GenerateBuilderParsingCode (ImmutableMapFieldGenerator *this,Printer *param_1) { int iVar1; FieldDescriptor *pFVar2; char *pcVar3; if (*(char *)(*(long *)(*(FieldDescriptor **)(this + 8) + 0x10) + 3) != '\x03') { pFVar2 = (FieldDescriptor *)(anonymous_namespace)::ValueField(*(FieldDescriptor **)(this + 8)); iVar1 = GetJavaType(pFVar2); if (iVar1 == 7) { pcVar3 = "com.google.protobuf.ByteString bytes = input.readBytes();\ncom.google.protobuf.MapEntry<$type_parameters$>\n$name$__ = $default_entry$.getParserForType().parseFrom(bytes);\nif ($value_enum_type$.forNumber($name$__.getValue()) == null) {\n mergeUnknownLengthDelimitedField($number$, bytes);\n} else {\n internalGetMutable$capitalized_name$().getMutableMap().put(\n $name$__.getKey(), $name$__.getValue());\n $set_has_field_bit_builder$\n}\n" ; goto LAB_001d8746; } } pcVar3 = "com.google.protobuf.MapEntry<$type_parameters$>\n$name$__ = input.readMessage(\n $default_entry$.getParserForType(), extensionRegistry);\ninternalGetMutable$capitalized_name$().getMutableMap().put(\n $name$__.getKey(), $name$__.getValue());\n$set_has_field_bit_builder$\n" ; LAB_001d8746: io::Printer::Print(param_1,(map *)(this + 0x18),pcVar3); return; }
28,778
ma_bitmap_unpin_all
eloqsql/storage/maria/ma_bitmap.c
static void _ma_bitmap_unpin_all(MARIA_SHARE *share) { MARIA_FILE_BITMAP *bitmap= &share->bitmap; MARIA_PINNED_PAGE *page_link= ((MARIA_PINNED_PAGE*) dynamic_array_ptr(&bitmap->pinned_pages, 0)); MARIA_PINNED_PAGE *pinned_page= page_link + bitmap->pinned_pages.elements; DBUG_ENTER("_ma_bitmap_unpin_all"); DBUG_PRINT("info", ("pinned: %u", bitmap->pinned_pages.elements)); while (pinned_page-- != page_link) pagecache_unlock_by_link(share->pagecache, pinned_page->link, pinned_page->unlock, PAGECACHE_UNPIN, LSN_IMPOSSIBLE, LSN_IMPOSSIBLE, FALSE, TRUE); bitmap->pinned_pages.elements= 0; DBUG_VOID_RETURN; }
O0
c
ma_bitmap_unpin_all: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0xa10, %rax # imm = 0xA10 movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x140(%rax), %rax movq -0x10(%rbp), %rcx imull $0x0, 0x154(%rcx), %ecx movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx movl 0x148(%rcx), %ecx imulq $0x18, %rcx, %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) jmp 0x423f4 jmp 0x423f6 movq -0x20(%rbp), %rax movq %rax, %rcx addq $-0x18, %rcx movq %rcx, -0x20(%rbp) cmpq -0x18(%rbp), %rax je 0x42449 movq -0x8(%rbp), %rax movq 0x600(%rax), %rdi movq -0x20(%rbp), %rax movq (%rax), %rsi movq -0x20(%rbp), %rax movl 0x8(%rax), %edx movl $0x3, %ecx xorl %eax, %eax movl %eax, %r9d xorl %eax, %eax movq %r9, %r8 movl $0x0, (%rsp) movl $0x1, 0x8(%rsp) callq 0x2d710 jmp 0x423f6 movq -0x10(%rbp), %rax movl $0x0, 0x148(%rax) jmp 0x42459 addq $0x30, %rsp popq %rbp retq nop
_ma_bitmap_unpin_all: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov rax, [rbp+var_8] add rax, 0A10h mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rax, [rax+140h] mov rcx, [rbp+var_10] imul ecx, [rcx+154h], 0 mov ecx, ecx add rax, rcx mov [rbp+var_18], rax mov rax, [rbp+var_18] mov rcx, [rbp+var_10] mov ecx, [rcx+148h] imul rcx, 18h add rax, rcx mov [rbp+var_20], rax jmp short $+2 loc_423F4: jmp short $+2 loc_423F6: mov rax, [rbp+var_20] mov rcx, rax add rcx, 0FFFFFFFFFFFFFFE8h mov [rbp+var_20], rcx cmp rax, [rbp+var_18] jz short loc_42449 mov rax, [rbp+var_8] mov rdi, [rax+600h] mov rax, [rbp+var_20] mov rsi, [rax] mov rax, [rbp+var_20] mov edx, [rax+8] mov ecx, 3 xor eax, eax mov r9d, eax xor eax, eax mov r8, r9 mov [rsp+30h+var_30], 0 mov [rsp+30h+var_28], 1 call pagecache_unlock_by_link jmp short loc_423F6 loc_42449: mov rax, [rbp+var_10] mov dword ptr [rax+148h], 0 jmp short $+2 loc_42459: add rsp, 30h pop rbp retn
long long ma_bitmap_unpin_all(long long a1) { long long v1; // rax long long result; // rax long long i; // [rsp+10h] [rbp-20h] long long v4; // [rsp+18h] [rbp-18h] v4 = *(_QWORD *)(a1 + 2896); for ( i = 24LL * *(unsigned int *)(a1 + 2904) + v4; ; pagecache_unlock_by_link(*(_QWORD **)(a1 + 1536), *(_QWORD *)i, *(_DWORD *)(i + 8), 3, 0LL, 0LL, 0, 1) ) { v1 = i; i -= 24LL; if ( v1 == v4 ) break; } result = a1 + 2576; *(_DWORD *)(a1 + 2904) = 0; return result; }
_ma_bitmap_unpin_all: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0xa10 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x140] MOV RCX,qword ptr [RBP + -0x10] IMUL ECX,dword ptr [RCX + 0x154],0x0 MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x148] IMUL RCX,RCX,0x18 ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX JMP 0x001423f4 LAB_001423f4: JMP 0x001423f6 LAB_001423f6: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,RAX ADD RCX,-0x18 MOV qword ptr [RBP + -0x20],RCX CMP RAX,qword ptr [RBP + -0x18] JZ 0x00142449 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x600] MOV RAX,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x20] MOV EDX,dword ptr [RAX + 0x8] MOV ECX,0x3 XOR EAX,EAX MOV R9D,EAX XOR EAX,EAX MOV R8,R9 MOV dword ptr [RSP],0x0 MOV dword ptr [RSP + 0x8],0x1 CALL 0x0012d710 JMP 0x001423f6 LAB_00142449: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x148],0x0 JMP 0x00142459 LAB_00142459: ADD RSP,0x30 POP RBP RET
void _ma_bitmap_unpin_all(long param_1) { int8 *puVar1; int8 *local_28; puVar1 = *(int8 **)(param_1 + 0xb50); local_28 = puVar1 + (ulong)*(uint *)(param_1 + 0xb58) * 3; while (local_28 != puVar1) { pagecache_unlock_by_link (*(int8 *)(param_1 + 0x600),local_28[-3],*(int4 *)(local_28 + -2),3,0,0,0, 1); local_28 = local_28 + -3; } *(int4 *)(param_1 + 0xb58) = 0; return; }
28,779
js_object___lookupGetter__
bluesky950520[P]quickjs/quickjs.c
static JSValue js_object___lookupGetter__(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int setter) { JSValue obj, res = JS_EXCEPTION; JSAtom prop = JS_ATOM_NULL; JSPropertyDescriptor desc; int has_prop; obj = JS_ToObject(ctx, this_val); if (JS_IsException(obj)) goto exception; prop = JS_ValueToAtom(ctx, argv[0]); if (unlikely(prop == JS_ATOM_NULL)) goto exception; for (;;) { has_prop = JS_GetOwnPropertyInternal(ctx, &desc, JS_VALUE_GET_OBJ(obj), prop); if (has_prop < 0) goto exception; if (has_prop) { if (desc.flags & JS_PROP_GETSET) res = js_dup(setter ? desc.setter : desc.getter); else res = JS_UNDEFINED; js_free_desc(ctx, &desc); break; } obj = JS_GetPrototypeFree(ctx, obj); if (JS_IsException(obj)) goto exception; if (JS_IsNull(obj)) { res = JS_UNDEFINED; break; } /* avoid infinite loop (possible with proxies) */ if (js_poll_interrupts(ctx)) goto exception; } exception: JS_FreeAtom(ctx, prop); JS_FreeValue(ctx, obj); return res; }
O2
c
js_object___lookupGetter__: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movl %r9d, %ebp movq %r8, %r12 movq %rdi, %rbx callq 0x20b92 movq %rax, %r14 movq %rdx, %r15 pushq $0x6 popq %rax movq %rax, (%rsp) cmpl $0x6, %r15d jne 0x5f9ca xorl %r13d, %r13d xorl %ebp, %ebp xorl %r12d, %r12d orq %r12, %rbp movq %rbx, %rdi movl %r13d, %esi callq 0x1a995 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x1801e movq %rbp, %rax movq (%rsp), %rdx addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq (%r12), %rsi movq 0x8(%r12), %rdx movq %rbx, %rdi callq 0x1e0bc testl %eax, %eax je 0x5f990 movl %eax, %r13d movl %ebp, 0xc(%rsp) leaq 0x10(%rsp), %r12 xorl %ebp, %ebp movq %rbx, %rdi movq %r12, %rsi movq %r14, %rdx movl %r13d, %ecx callq 0x1db80 testl %eax, %eax js 0x5f995 jne 0x5fa39 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x35dad movq %rax, %r14 movq %rdx, %r15 cmpl $0x2, %r15d je 0x5fa4e cmpl $0x6, %r15d je 0x5f993 movq %rbx, %rdi callq 0x35de8 testl %eax, %eax je 0x5f9ed jmp 0x5f995 testb $0x10, 0x10(%rsp) jne 0x5fa5a pushq $0x3 popq %rax movq %rax, (%rsp) xorl %ebp, %ebp xorl %r12d, %r12d jmp 0x5fa9b pushq $0x3 popq %rax movq %rax, (%rsp) jmp 0x5f995 cmpl $0x0, 0xc(%rsp) leaq 0x38(%rsp), %rax leaq 0x40(%rsp), %rcx leaq 0x28(%rsp), %rdx leaq 0x30(%rsp), %rsi cmovneq %rax, %rdx movq (%rdx), %rax cmovneq %rcx, %rsi movq (%rsi), %rcx movq %rcx, (%rsp) cmpl $-0x9, %ecx jb 0x5fa8c incl (%rax) movabsq $-0x100000000, %r12 # imm = 0xFFFFFFFF00000000 andq %rax, %r12 movl %eax, %ebp leaq 0x10(%rsp), %rsi movq %rbx, %rdi callq 0x360ed jmp 0x5f998
js_object___lookupGetter__: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov ebp, r9d mov r12, r8 mov rbx, rdi call JS_ToObject mov r14, rax mov r15, rdx push 6 pop rax mov [rsp+78h+var_78], rax cmp r15d, 6 jnz short loc_5F9CA loc_5F990: xor r13d, r13d loc_5F993: xor ebp, ebp loc_5F995: xor r12d, r12d loc_5F998: or rbp, r12 mov rdi, rbx mov esi, r13d call JS_FreeAtom mov rdi, rbx mov rsi, r14 mov rdx, r15 call JS_FreeValue mov rax, rbp mov rdx, [rsp+78h+var_78] add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_5F9CA: mov rsi, [r12] mov rdx, [r12+8] mov rdi, rbx call JS_ValueToAtom test eax, eax jz short loc_5F990 mov r13d, eax mov [rsp+78h+var_6C], ebp lea r12, [rsp+78h+var_68] xor ebp, ebp loc_5F9ED: mov rdi, rbx mov rsi, r12 mov rdx, r14 mov ecx, r13d call JS_GetOwnPropertyInternal test eax, eax js short loc_5F995 jnz short loc_5FA39 mov rdi, rbx mov rsi, r14 mov rdx, r15 call JS_GetPrototypeFree mov r14, rax mov r15, rdx cmp r15d, 2 jz short loc_5FA4E cmp r15d, 6 jz loc_5F993 mov rdi, rbx call js_poll_interrupts test eax, eax jz short loc_5F9ED jmp loc_5F995 loc_5FA39: test [rsp+78h+var_68], 10h jnz short loc_5FA5A push 3 pop rax mov [rsp+78h+var_78], rax xor ebp, ebp xor r12d, r12d jmp short loc_5FA9B loc_5FA4E: push 3 pop rax mov [rsp+78h+var_78], rax jmp loc_5F995 loc_5FA5A: cmp [rsp+78h+var_6C], 0 lea rax, [rsp+78h+var_40] lea rcx, [rsp+78h+var_38] lea rdx, [rsp+78h+var_50] lea rsi, [rsp+78h+var_48] cmovnz rdx, rax mov rax, [rdx] cmovnz rsi, rcx mov rcx, [rsi] mov [rsp+78h+var_78], rcx cmp ecx, 0FFFFFFF7h jb short loc_5FA8C inc dword ptr [rax] loc_5FA8C: mov r12, 0FFFFFFFF00000000h and r12, rax mov ebp, eax loc_5FA9B: lea rsi, [rsp+78h+var_68] mov rdi, rbx call js_free_desc jmp loc_5F998
unsigned long long js_object___lookupGetter__( 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; // ebp long long PrototypeFree; // r14 long long v17; // rdx long long v18; // r15 unsigned int v19; // r13d long long v20; // rbp unsigned long long v21; // r12 unsigned int v23; // eax unsigned int *v24; // r8 int v25; // eax double v26; // xmm4_8 double v27; // xmm5_8 long long v28; // rdx char *v29; // rdx char *v30; // rsi unsigned long long v31; // rax int v32; // [rsp+Ch] [rbp-6Ch] long long v33[3]; // [rsp+10h] [rbp-68h] BYREF char v34; // [rsp+28h] [rbp-50h] BYREF char v35; // [rsp+30h] [rbp-48h] BYREF char v36; // [rsp+38h] [rbp-40h] BYREF char v37; // [rsp+40h] [rbp-38h] BYREF v14 = a6; PrototypeFree = JS_ToObject(a1, a2, a3, a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v18 = v17; if ( (_DWORD)v17 == 6 || (v23 = JS_ValueToAtom(a1, *a5, a5[1])) == 0 ) { v19 = 0; LABEL_3: v20 = 0LL; } else { v19 = v23; v32 = v14; v20 = 0LL; do { LOBYTE(v25) = JS_GetOwnPropertyInternal(a1, (long long)v33, PrototypeFree, v19, v24); if ( v25 < 0 ) break; if ( v25 ) { if ( (v33[0] & 0x10) != 0 ) { v29 = &v34; v30 = &v35; if ( v32 ) v29 = &v36; v31 = *(_QWORD *)v29; if ( v32 ) v30 = &v37; if ( (unsigned int)*(_QWORD *)v30 >= 0xFFFFFFF7 ) ++*(_DWORD *)v31; v21 = v31 & 0xFFFFFFFF00000000LL; v20 = (unsigned int)v31; } else { v20 = 0LL; v21 = 0LL; } js_free_desc(a1, v33); goto LABEL_5; } PrototypeFree = JS_GetPrototypeFree(a1, PrototypeFree, v18, a7, a8, a9, a10, v26, v27, a13, a14); v18 = v28; if ( (_DWORD)v28 == 2 ) break; if ( (_DWORD)v28 == 6 ) goto LABEL_3; } while ( !(unsigned int)js_poll_interrupts(a1) ); } v21 = 0LL; LABEL_5: JS_FreeAtom(a1, v19); JS_FreeValue(a1, PrototypeFree, v18); return v21 | v20; }
js_object___lookupGetter__: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV EBP,R9D MOV R12,R8 MOV RBX,RDI CALL 0x00120b92 MOV R14,RAX MOV R15,RDX PUSH 0x6 POP RAX MOV qword ptr [RSP],RAX CMP R15D,0x6 JNZ 0x0015f9ca LAB_0015f990: XOR R13D,R13D LAB_0015f993: XOR EBP,EBP LAB_0015f995: XOR R12D,R12D LAB_0015f998: OR RBP,R12 MOV RDI,RBX MOV ESI,R13D CALL 0x0011a995 MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x0011801e MOV RAX,RBP MOV RDX,qword ptr [RSP] ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0015f9ca: MOV RSI,qword ptr [R12] MOV RDX,qword ptr [R12 + 0x8] MOV RDI,RBX CALL 0x0011e0bc TEST EAX,EAX JZ 0x0015f990 MOV R13D,EAX MOV dword ptr [RSP + 0xc],EBP LEA R12,[RSP + 0x10] XOR EBP,EBP LAB_0015f9ed: MOV RDI,RBX MOV RSI,R12 MOV RDX,R14 MOV ECX,R13D CALL 0x0011db80 TEST EAX,EAX JS 0x0015f995 JNZ 0x0015fa39 MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x00135dad MOV R14,RAX MOV R15,RDX CMP R15D,0x2 JZ 0x0015fa4e CMP R15D,0x6 JZ 0x0015f993 MOV RDI,RBX CALL 0x00135de8 TEST EAX,EAX JZ 0x0015f9ed JMP 0x0015f995 LAB_0015fa39: TEST byte ptr [RSP + 0x10],0x10 JNZ 0x0015fa5a PUSH 0x3 POP RAX MOV qword ptr [RSP],RAX XOR EBP,EBP XOR R12D,R12D JMP 0x0015fa9b LAB_0015fa4e: PUSH 0x3 POP RAX MOV qword ptr [RSP],RAX JMP 0x0015f995 LAB_0015fa5a: CMP dword ptr [RSP + 0xc],0x0 LEA RAX,[RSP + 0x38] LEA RCX,[RSP + 0x40] LEA RDX,[RSP + 0x28] LEA RSI,[RSP + 0x30] CMOVNZ RDX,RAX MOV RAX,qword ptr [RDX] CMOVNZ RSI,RCX MOV RCX,qword ptr [RSI] MOV qword ptr [RSP],RCX CMP ECX,-0x9 JC 0x0015fa8c INC dword ptr [RAX] LAB_0015fa8c: MOV R12,-0x100000000 AND R12,RAX MOV EBP,EAX LAB_0015fa9b: LEA RSI,[RSP + 0x10] MOV RDI,RBX CALL 0x001360ed JMP 0x0015f998
int1 [16] js_object___lookupGetter__(int8 param_1) { int *piVar1; int iVar2; int iVar3; int8 *puVar4; ulong uVar5; int8 *in_R8; int in_R9D; ulong uVar6; int1 auVar7 [16]; int8 local_78; byte local_68 [24]; int8 local_50; int8 local_48; int8 local_40; int8 local_38; auVar7 = JS_ToObject(); local_78 = 6; if ((auVar7._8_4_ == 6) || (iVar2 = JS_ValueToAtom(param_1,*in_R8,in_R8[1]), iVar2 == 0)) { iVar2 = 0; } else { while( true ) { iVar3 = JS_GetOwnPropertyInternal(param_1,local_68,auVar7._0_8_,iVar2); if (iVar3 < 0) break; if (iVar3 != 0) { if ((local_68[0] & 0x10) == 0) { local_78 = 3; uVar5 = 0; uVar6 = 0; } else { puVar4 = &local_50; if (in_R9D != 0) { puVar4 = &local_40; } piVar1 = (int *)*puVar4; puVar4 = &local_48; if (in_R9D != 0) { puVar4 = &local_38; } local_78 = *puVar4; if (0xfffffff6 < (uint)local_78) { *piVar1 = *piVar1 + 1; } uVar6 = (ulong)piVar1 & 0xffffffff00000000; uVar5 = (ulong)piVar1 & 0xffffffff; } js_free_desc(param_1,local_68); goto LAB_0015f998; } auVar7 = JS_GetPrototypeFree(param_1,auVar7._0_8_,auVar7._8_8_); if (auVar7._8_4_ == 2) { local_78 = 3; break; } if ((auVar7._8_4_ == 6) || (iVar3 = js_poll_interrupts(param_1), iVar3 != 0)) break; } } uVar5 = 0; uVar6 = 0; LAB_0015f998: JS_FreeAtom(param_1,iVar2); JS_FreeValue(param_1,auVar7._0_8_,auVar7._8_8_); auVar7._8_8_ = local_78; auVar7._0_8_ = uVar5 | uVar6; return auVar7; }
28,780
spdlog::sinks::ansicolor_sink<spdlog::details::console_mutex>::set_color_mode(spdlog::color_mode)
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/sinks/ansicolor_sink-inl.h
SPDLOG_INLINE void ansicolor_sink<ConsoleMutex>::set_color_mode(color_mode mode) { switch (mode) { case color_mode::always: should_do_colors_ = true; return; case color_mode::automatic: should_do_colors_ = details::os::in_terminal(target_file_) && details::os::is_color_terminal(); return; case color_mode::never: should_do_colors_ = false; return; default: should_do_colors_ = false; } }
O0
c
spdlog::sinks::ansicolor_sink<spdlog::details::console_mutex>::set_color_mode(spdlog::color_mode): subq $0x28, %rsp movq %rdi, 0x20(%rsp) movl %esi, 0x1c(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x10(%rsp) movl 0x1c(%rsp), %eax movl %eax, 0x18(%rsp) testl %eax, %eax je 0x7d65b jmp 0x7d645 movl 0x18(%rsp), %eax subl $0x1, %eax je 0x7d669 jmp 0x7d650 movl 0x18(%rsp), %eax subl $0x2, %eax je 0x7d6a6 jmp 0x7d6b4 movq 0x10(%rsp), %rax movb $0x1, 0x1d0(%rax) jmp 0x7d6c0 movq 0x10(%rsp), %rax movq 0x1c0(%rax), %rdi callq 0x3b2e0 movb %al, %cl xorl %eax, %eax testb $0x1, %cl movb %al, 0xf(%rsp) jne 0x7d689 jmp 0x7d692 callq 0x3b1e0 movb %al, 0xf(%rsp) movq 0x10(%rsp), %rax movb 0xf(%rsp), %cl andb $0x1, %cl movb %cl, 0x1d0(%rax) jmp 0x7d6c0 movq 0x10(%rsp), %rax movb $0x0, 0x1d0(%rax) jmp 0x7d6c0 movq 0x10(%rsp), %rax movb $0x0, 0x1d0(%rax) addq $0x28, %rsp retq nopw %cs:(%rax,%rax) nop
_ZN6spdlog5sinks14ansicolor_sinkINS_7details17console_nullmutexEE14set_color_modeENS_10color_modeE: sub rsp, 28h mov [rsp+28h+var_8], rdi mov [rsp+28h+var_C], esi mov rax, [rsp+28h+var_8] mov [rsp+28h+var_18], rax mov eax, [rsp+28h+var_C] mov [rsp+28h+var_10], eax test eax, eax jz short loc_7D65B jmp short $+2 loc_7D645: mov eax, [rsp+28h+var_10] sub eax, 1 jz short loc_7D669 jmp short $+2 loc_7D650: mov eax, [rsp+28h+var_10] sub eax, 2 jz short loc_7D6A6 jmp short loc_7D6B4 loc_7D65B: mov rax, [rsp+28h+var_18] mov byte ptr [rax+1D0h], 1 jmp short loc_7D6C0 loc_7D669: mov rax, [rsp+28h+var_18] mov rdi, [rax+1C0h]; this call _ZN6spdlog7details2os11in_terminalEP8_IO_FILE; spdlog::details::os::in_terminal(_IO_FILE *) mov cl, al xor eax, eax test cl, 1 mov [rsp+28h+var_19], al jnz short loc_7D689 jmp short loc_7D692 loc_7D689: call _ZN6spdlog7details2os17is_color_terminalEv; spdlog::details::os::is_color_terminal(void) mov [rsp+28h+var_19], al loc_7D692: mov rax, [rsp+28h+var_18] mov cl, [rsp+28h+var_19] and cl, 1 mov [rax+1D0h], cl jmp short loc_7D6C0 loc_7D6A6: mov rax, [rsp+28h+var_18] mov byte ptr [rax+1D0h], 0 jmp short loc_7D6C0 loc_7D6B4: mov rax, [rsp+28h+var_18] mov byte ptr [rax+1D0h], 0 loc_7D6C0: add rsp, 28h retn
long long spdlog::sinks::ansicolor_sink<spdlog::details::console_nullmutex>::set_color_mode( long long a1, int a2) { spdlog::details::os *v2; // rdi long long result; // rax char is_color_terminal; // [rsp+Fh] [rbp-19h] if ( a2 ) { if ( a2 == 1 ) { v2 = *(spdlog::details::os **)(a1 + 448); is_color_terminal = 0; if ( spdlog::details::os::in_terminal((long long)v2) ) is_color_terminal = spdlog::details::os::is_color_terminal(v2); result = a1; *(_BYTE *)(a1 + 464) = is_color_terminal & 1; } else { result = a1; *(_BYTE *)(a1 + 464) = 0; } } else { result = a1; *(_BYTE *)(a1 + 464) = 1; } return result; }
set_color_mode: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV dword ptr [RSP + 0x1c],ESI MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x10],RAX MOV EAX,dword ptr [RSP + 0x1c] MOV dword ptr [RSP + 0x18],EAX TEST EAX,EAX JZ 0x0017d65b JMP 0x0017d645 LAB_0017d645: MOV EAX,dword ptr [RSP + 0x18] SUB EAX,0x1 JZ 0x0017d669 JMP 0x0017d650 LAB_0017d650: MOV EAX,dword ptr [RSP + 0x18] SUB EAX,0x2 JZ 0x0017d6a6 JMP 0x0017d6b4 LAB_0017d65b: MOV RAX,qword ptr [RSP + 0x10] MOV byte ptr [RAX + 0x1d0],0x1 JMP 0x0017d6c0 LAB_0017d669: MOV RAX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RAX + 0x1c0] CALL 0x0013b2e0 MOV CL,AL XOR EAX,EAX TEST CL,0x1 MOV byte ptr [RSP + 0xf],AL JNZ 0x0017d689 JMP 0x0017d692 LAB_0017d689: CALL 0x0013b1e0 MOV byte ptr [RSP + 0xf],AL LAB_0017d692: MOV RAX,qword ptr [RSP + 0x10] MOV CL,byte ptr [RSP + 0xf] AND CL,0x1 MOV byte ptr [RAX + 0x1d0],CL JMP 0x0017d6c0 LAB_0017d6a6: MOV RAX,qword ptr [RSP + 0x10] MOV byte ptr [RAX + 0x1d0],0x0 JMP 0x0017d6c0 LAB_0017d6b4: MOV RAX,qword ptr [RSP + 0x10] MOV byte ptr [RAX + 0x1d0],0x0 LAB_0017d6c0: ADD RSP,0x28 RET
/* spdlog::sinks::ansicolor_sink<spdlog::details::console_nullmutex>::set_color_mode(spdlog::color_mode) */ void __thiscall spdlog::sinks::ansicolor_sink<spdlog::details::console_nullmutex>::set_color_mode (ansicolor_sink<spdlog::details::console_nullmutex> *this,int param_2) { uint uVar1; byte local_19; if (param_2 == 0) { this[0x1d0] = (ansicolor_sink<spdlog::details::console_nullmutex>)0x1; } else if (param_2 == 1) { uVar1 = details::os::in_terminal(*(_IO_FILE **)(this + 0x1c0)); local_19 = 0; if ((uVar1 & 1) != 0) { local_19 = details::os::is_color_terminal(); } this[0x1d0] = (ansicolor_sink<spdlog::details::console_nullmutex>)(local_19 & 1); } else if (param_2 == 2) { this[0x1d0] = (ansicolor_sink<spdlog::details::console_nullmutex>)0x0; } else { this[0x1d0] = (ansicolor_sink<spdlog::details::console_nullmutex>)0x0; } return; }
28,781
ClearWindowState
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/platforms/rcore_desktop_glfw.c
void ClearWindowState(unsigned int flags) { // Check previous state and requested state to apply required changes // NOTE: In most cases the functions already change the flags internally // State change: FLAG_VSYNC_HINT if (((CORE.Window.flags & FLAG_VSYNC_HINT) > 0) && ((flags & FLAG_VSYNC_HINT) > 0)) { glfwSwapInterval(0); CORE.Window.flags &= ~FLAG_VSYNC_HINT; } // State change: FLAG_BORDERLESS_WINDOWED_MODE // NOTE: This must be handled before FLAG_FULLSCREEN_MODE because ToggleBorderlessWindowed() needs to get some fullscreen values if fullscreen is running if (((CORE.Window.flags & FLAG_BORDERLESS_WINDOWED_MODE) > 0) && ((flags & FLAG_BORDERLESS_WINDOWED_MODE) > 0)) { ToggleBorderlessWindowed(); // NOTE: Window state flag updated inside function } // State change: FLAG_FULLSCREEN_MODE if (((CORE.Window.flags & FLAG_FULLSCREEN_MODE) > 0) && ((flags & FLAG_FULLSCREEN_MODE) > 0)) { ToggleFullscreen(); // NOTE: Window state flag updated inside function } // State change: FLAG_WINDOW_RESIZABLE if (((CORE.Window.flags & FLAG_WINDOW_RESIZABLE) > 0) && ((flags & FLAG_WINDOW_RESIZABLE) > 0)) { glfwSetWindowAttrib(platform.handle, GLFW_RESIZABLE, GLFW_FALSE); CORE.Window.flags &= ~FLAG_WINDOW_RESIZABLE; } // State change: FLAG_WINDOW_HIDDEN if (((CORE.Window.flags & FLAG_WINDOW_HIDDEN) > 0) && ((flags & FLAG_WINDOW_HIDDEN) > 0)) { glfwShowWindow(platform.handle); CORE.Window.flags &= ~FLAG_WINDOW_HIDDEN; } // State change: FLAG_WINDOW_MINIMIZED if (((CORE.Window.flags & FLAG_WINDOW_MINIMIZED) > 0) && ((flags & FLAG_WINDOW_MINIMIZED) > 0)) { RestoreWindow(); // NOTE: Window state flag updated inside function } // State change: FLAG_WINDOW_MAXIMIZED if (((CORE.Window.flags & FLAG_WINDOW_MAXIMIZED) > 0) && ((flags & FLAG_WINDOW_MAXIMIZED) > 0)) { RestoreWindow(); // NOTE: Window state flag updated inside function } // State change: FLAG_WINDOW_UNDECORATED if (((CORE.Window.flags & FLAG_WINDOW_UNDECORATED) > 0) && ((flags & FLAG_WINDOW_UNDECORATED) > 0)) { glfwSetWindowAttrib(platform.handle, GLFW_DECORATED, GLFW_TRUE); CORE.Window.flags &= ~FLAG_WINDOW_UNDECORATED; } // State change: FLAG_WINDOW_UNFOCUSED if (((CORE.Window.flags & FLAG_WINDOW_UNFOCUSED) > 0) && ((flags & FLAG_WINDOW_UNFOCUSED) > 0)) { glfwSetWindowAttrib(platform.handle, GLFW_FOCUS_ON_SHOW, GLFW_TRUE); CORE.Window.flags &= ~FLAG_WINDOW_UNFOCUSED; } // State change: FLAG_WINDOW_TOPMOST if (((CORE.Window.flags & FLAG_WINDOW_TOPMOST) > 0) && ((flags & FLAG_WINDOW_TOPMOST) > 0)) { glfwSetWindowAttrib(platform.handle, GLFW_FLOATING, GLFW_FALSE); CORE.Window.flags &= ~FLAG_WINDOW_TOPMOST; } // State change: FLAG_WINDOW_ALWAYS_RUN if (((CORE.Window.flags & FLAG_WINDOW_ALWAYS_RUN) > 0) && ((flags & FLAG_WINDOW_ALWAYS_RUN) > 0)) { CORE.Window.flags &= ~FLAG_WINDOW_ALWAYS_RUN; } // The following states can not be changed after window creation // State change: FLAG_WINDOW_TRANSPARENT if (((CORE.Window.flags & FLAG_WINDOW_TRANSPARENT) > 0) && ((flags & FLAG_WINDOW_TRANSPARENT) > 0)) { TRACELOG(LOG_WARNING, "WINDOW: Framebuffer transparency can only be configured before window initialization"); } // State change: FLAG_WINDOW_HIGHDPI if (((CORE.Window.flags & FLAG_WINDOW_HIGHDPI) > 0) && ((flags & FLAG_WINDOW_HIGHDPI) > 0)) { TRACELOG(LOG_WARNING, "WINDOW: High DPI can only be configured before window initialization"); } // State change: FLAG_WINDOW_MOUSE_PASSTHROUGH if (((CORE.Window.flags & FLAG_WINDOW_MOUSE_PASSTHROUGH) > 0) && ((flags & FLAG_WINDOW_MOUSE_PASSTHROUGH) > 0)) { glfwSetWindowAttrib(platform.handle, GLFW_MOUSE_PASSTHROUGH, GLFW_FALSE); CORE.Window.flags &= ~FLAG_WINDOW_MOUSE_PASSTHROUGH; } // State change: FLAG_MSAA_4X_HINT if (((CORE.Window.flags & FLAG_MSAA_4X_HINT) > 0) && ((flags & FLAG_MSAA_4X_HINT) > 0)) { TRACELOG(LOG_WARNING, "WINDOW: MSAA can only be configured before window initialization"); } // State change: FLAG_INTERLACED_HINT if (((CORE.Window.flags & FLAG_INTERLACED_HINT) > 0) && ((flags & FLAG_INTERLACED_HINT) > 0)) { TRACELOG(LOG_WARNING, "RPI: Interlaced mode can only be configured before window initialization"); } }
O0
c
ClearWindowState: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movl %edi, -0x4(%rbp) movl 0x151577(%rip), %eax # 0x21ac88 andl $0x40, %eax cmpl $0x0, %eax jbe 0xc973a movl -0x4(%rbp), %eax andl $0x40, %eax cmpl $0x0, %eax jbe 0xc973a xorl %edi, %edi callq 0x184ba0 movl 0x151557(%rip), %eax # 0x21ac88 andl $-0x41, %eax movl %eax, 0x15154e(%rip) # 0x21ac88 movl 0x151548(%rip), %eax # 0x21ac88 andl $0x8000, %eax # imm = 0x8000 cmpl $0x0, %eax jbe 0xc975c movl -0x4(%rbp), %eax andl $0x8000, %eax # imm = 0x8000 cmpl $0x0, %eax jbe 0xc975c callq 0xc9050 movl 0x151526(%rip), %eax # 0x21ac88 andl $0x2, %eax cmpl $0x0, %eax jbe 0xc977a movl -0x4(%rbp), %eax andl $0x2, %eax cmpl $0x0, %eax jbe 0xc977a callq 0xc8c80 movl 0x151508(%rip), %eax # 0x21ac88 andl $0x4, %eax cmpl $0x0, %eax jbe 0xc97b5 movl -0x4(%rbp), %eax andl $0x4, %eax cmpl $0x0, %eax jbe 0xc97b5 movq 0x151fce(%rip), %rdi # 0x21b768 movl $0x20003, %esi # imm = 0x20003 xorl %edx, %edx callq 0x18f030 movl 0x1514dc(%rip), %eax # 0x21ac88 andl $-0x5, %eax movl %eax, 0x1514d3(%rip) # 0x21ac88 movl 0x1514cd(%rip), %eax # 0x21ac88 andl $0x80, %eax cmpl $0x0, %eax jbe 0xc97ef movl -0x4(%rbp), %eax andl $0x80, %eax cmpl $0x0, %eax jbe 0xc97ef movq 0x151f8f(%rip), %rdi # 0x21b768 callq 0x18ea20 movl 0x1514a4(%rip), %eax # 0x21ac88 andl $0xffffff7f, %eax # imm = 0xFFFFFF7F movl %eax, 0x151499(%rip) # 0x21ac88 movl 0x151493(%rip), %eax # 0x21ac88 andl $0x200, %eax # imm = 0x200 cmpl $0x0, %eax jbe 0xc9811 movl -0x4(%rbp), %eax andl $0x200, %eax # imm = 0x200 cmpl $0x0, %eax jbe 0xc9811 callq 0xc9320 movl 0x151471(%rip), %eax # 0x21ac88 andl $0x400, %eax # imm = 0x400 cmpl $0x0, %eax jbe 0xc9833 movl -0x4(%rbp), %eax andl $0x400, %eax # imm = 0x400 cmpl $0x0, %eax jbe 0xc9833 callq 0xc9320 movl 0x15144f(%rip), %eax # 0x21ac88 andl $0x8, %eax cmpl $0x0, %eax jbe 0xc9871 movl -0x4(%rbp), %eax andl $0x8, %eax cmpl $0x0, %eax jbe 0xc9871 movq 0x151f15(%rip), %rdi # 0x21b768 movl $0x20005, %esi # imm = 0x20005 movl $0x1, %edx callq 0x18f030 movl 0x151420(%rip), %eax # 0x21ac88 andl $-0x9, %eax movl %eax, 0x151417(%rip) # 0x21ac88 movl 0x151411(%rip), %eax # 0x21ac88 andl $0x800, %eax # imm = 0x800 cmpl $0x0, %eax jbe 0xc98b5 movl -0x4(%rbp), %eax andl $0x800, %eax # imm = 0x800 cmpl $0x0, %eax jbe 0xc98b5 movq 0x151ed3(%rip), %rdi # 0x21b768 movl $0x2000c, %esi # imm = 0x2000C movl $0x1, %edx callq 0x18f030 movl 0x1513de(%rip), %eax # 0x21ac88 andl $0xfffff7ff, %eax # imm = 0xFFFFF7FF movl %eax, 0x1513d3(%rip) # 0x21ac88 movl 0x1513cd(%rip), %eax # 0x21ac88 andl $0x1000, %eax # imm = 0x1000 cmpl $0x0, %eax jbe 0xc98f6 movl -0x4(%rbp), %eax andl $0x1000, %eax # imm = 0x1000 cmpl $0x0, %eax jbe 0xc98f6 movq 0x151e8f(%rip), %rdi # 0x21b768 movl $0x20007, %esi # imm = 0x20007 xorl %edx, %edx callq 0x18f030 movl 0x15139d(%rip), %eax # 0x21ac88 andl $0xffffefff, %eax # imm = 0xFFFFEFFF movl %eax, 0x151392(%rip) # 0x21ac88 movl 0x15138c(%rip), %eax # 0x21ac88 andl $0x100, %eax # imm = 0x100 cmpl $0x0, %eax jbe 0xc9924 movl -0x4(%rbp), %eax andl $0x100, %eax # imm = 0x100 cmpl $0x0, %eax jbe 0xc9924 movl 0x15136f(%rip), %eax # 0x21ac88 andl $0xfffffeff, %eax # imm = 0xFFFFFEFF movl %eax, 0x151364(%rip) # 0x21ac88 movl 0x15135e(%rip), %eax # 0x21ac88 andl $0x10, %eax cmpl $0x0, %eax jbe 0xc9950 movl -0x4(%rbp), %eax andl $0x10, %eax cmpl $0x0, %eax jbe 0xc9950 movl $0x4, %edi leaq 0xeba3f(%rip), %rsi # 0x1b5388 movb $0x0, %al callq 0x182c40 movl 0x151332(%rip), %eax # 0x21ac88 andl $0x2000, %eax # imm = 0x2000 cmpl $0x0, %eax jbe 0xc9980 movl -0x4(%rbp), %eax andl $0x2000, %eax # imm = 0x2000 cmpl $0x0, %eax jbe 0xc9980 movl $0x4, %edi leaq 0xeba64(%rip), %rsi # 0x1b53dd movb $0x0, %al callq 0x182c40 movl 0x151302(%rip), %eax # 0x21ac88 andl $0x4000, %eax # imm = 0x4000 cmpl $0x0, %eax jbe 0xc99c1 movl -0x4(%rbp), %eax andl $0x4000, %eax # imm = 0x4000 cmpl $0x0, %eax jbe 0xc99c1 movq 0x151dc4(%rip), %rdi # 0x21b768 movl $0x2000d, %esi # imm = 0x2000D xorl %edx, %edx callq 0x18f030 movl 0x1512d2(%rip), %eax # 0x21ac88 andl $0xffffbfff, %eax # imm = 0xFFFFBFFF movl %eax, 0x1512c7(%rip) # 0x21ac88 movl 0x1512c1(%rip), %eax # 0x21ac88 andl $0x20, %eax cmpl $0x0, %eax jbe 0xc99ed movl -0x4(%rbp), %eax andl $0x20, %eax cmpl $0x0, %eax jbe 0xc99ed movl $0x4, %edi leaq 0xeba3c(%rip), %rsi # 0x1b5422 movb $0x0, %al callq 0x182c40 movl 0x151295(%rip), %eax # 0x21ac88 andl $0x10000, %eax # imm = 0x10000 cmpl $0x0, %eax jbe 0xc9a1d movl -0x4(%rbp), %eax andl $0x10000, %eax # imm = 0x10000 cmpl $0x0, %eax jbe 0xc9a1d movl $0x4, %edi leaq 0xeba4d(%rip), %rsi # 0x1b5463 movb $0x0, %al callq 0x182c40 addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ClearWindowState: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_4], edi mov eax, cs:dword_21AC88 and eax, 40h cmp eax, 0 jbe short loc_C973A mov eax, [rbp+var_4] and eax, 40h cmp eax, 0 jbe short loc_C973A xor edi, edi call glfwSwapInterval mov eax, cs:dword_21AC88 and eax, 0FFFFFFBFh mov cs:dword_21AC88, eax loc_C973A: mov eax, cs:dword_21AC88 and eax, 8000h cmp eax, 0 jbe short loc_C975C mov eax, [rbp+var_4] and eax, 8000h cmp eax, 0 jbe short loc_C975C call ToggleBorderlessWindowed loc_C975C: mov eax, cs:dword_21AC88 and eax, 2 cmp eax, 0 jbe short loc_C977A mov eax, [rbp+var_4] and eax, 2 cmp eax, 0 jbe short loc_C977A call ToggleFullscreen loc_C977A: mov eax, cs:dword_21AC88 and eax, 4 cmp eax, 0 jbe short loc_C97B5 mov eax, [rbp+var_4] and eax, 4 cmp eax, 0 jbe short loc_C97B5 mov rdi, cs:platform mov esi, offset byte_20003 xor edx, edx call glfwSetWindowAttrib mov eax, cs:dword_21AC88 and eax, 0FFFFFFFBh mov cs:dword_21AC88, eax loc_C97B5: mov eax, cs:dword_21AC88 and eax, 80h cmp eax, 0 jbe short loc_C97EF mov eax, [rbp+var_4] and eax, 80h cmp eax, 0 jbe short loc_C97EF mov rdi, cs:platform call glfwShowWindow mov eax, cs:dword_21AC88 and eax, 0FFFFFF7Fh mov cs:dword_21AC88, eax loc_C97EF: mov eax, cs:dword_21AC88 and eax, 200h cmp eax, 0 jbe short loc_C9811 mov eax, [rbp+var_4] and eax, 200h cmp eax, 0 jbe short loc_C9811 call RestoreWindow loc_C9811: mov eax, cs:dword_21AC88 and eax, 400h cmp eax, 0 jbe short loc_C9833 mov eax, [rbp+var_4] and eax, 400h cmp eax, 0 jbe short loc_C9833 call RestoreWindow loc_C9833: mov eax, cs:dword_21AC88 and eax, 8 cmp eax, 0 jbe short loc_C9871 mov eax, [rbp+var_4] and eax, 8 cmp eax, 0 jbe short loc_C9871 mov rdi, cs:platform mov esi, offset byte_20005 mov edx, 1 call glfwSetWindowAttrib mov eax, cs:dword_21AC88 and eax, 0FFFFFFF7h mov cs:dword_21AC88, eax loc_C9871: mov eax, cs:dword_21AC88 and eax, 800h cmp eax, 0 jbe short loc_C98B5 mov eax, [rbp+var_4] and eax, 800h cmp eax, 0 jbe short loc_C98B5 mov rdi, cs:platform mov esi, offset byte_2000C mov edx, 1 call glfwSetWindowAttrib mov eax, cs:dword_21AC88 and eax, 0FFFFF7FFh mov cs:dword_21AC88, eax loc_C98B5: mov eax, cs:dword_21AC88 and eax, 1000h cmp eax, 0 jbe short loc_C98F6 mov eax, [rbp+var_4] and eax, 1000h cmp eax, 0 jbe short loc_C98F6 mov rdi, cs:platform mov esi, offset byte_20007 xor edx, edx call glfwSetWindowAttrib mov eax, cs:dword_21AC88 and eax, 0FFFFEFFFh mov cs:dword_21AC88, eax loc_C98F6: mov eax, cs:dword_21AC88 and eax, 100h cmp eax, 0 jbe short loc_C9924 mov eax, [rbp+var_4] and eax, 100h cmp eax, 0 jbe short loc_C9924 mov eax, cs:dword_21AC88 and eax, 0FFFFFEFFh mov cs:dword_21AC88, eax loc_C9924: mov eax, cs:dword_21AC88 and eax, 10h cmp eax, 0 jbe short loc_C9950 mov eax, [rbp+var_4] and eax, 10h cmp eax, 0 jbe short loc_C9950 mov edi, 4 lea rsi, aWindowFramebuf; "WINDOW: Framebuffer transparency can on"... mov al, 0 call TraceLog loc_C9950: mov eax, cs:dword_21AC88 and eax, 2000h cmp eax, 0 jbe short loc_C9980 mov eax, [rbp+var_4] and eax, 2000h cmp eax, 0 jbe short loc_C9980 mov edi, 4 lea rsi, aWindowHighDpiC; "WINDOW: High DPI can only be configured"... mov al, 0 call TraceLog loc_C9980: mov eax, cs:dword_21AC88 and eax, 4000h cmp eax, 0 jbe short loc_C99C1 mov eax, [rbp+var_4] and eax, 4000h cmp eax, 0 jbe short loc_C99C1 mov rdi, cs:platform mov esi, offset byte_2000D xor edx, edx call glfwSetWindowAttrib mov eax, cs:dword_21AC88 and eax, 0FFFFBFFFh mov cs:dword_21AC88, eax loc_C99C1: mov eax, cs:dword_21AC88 and eax, 20h cmp eax, 0 jbe short loc_C99ED mov eax, [rbp+var_4] and eax, 20h cmp eax, 0 jbe short loc_C99ED mov edi, 4 lea rsi, aWindowMsaaCanO; "WINDOW: MSAA can only be configured bef"... mov al, 0 call TraceLog loc_C99ED: mov eax, cs:dword_21AC88 and eax, 10000h cmp eax, 0 jbe short loc_C9A1D mov eax, [rbp+var_4] and eax, 10000h cmp eax, 0 jbe short loc_C9A1D mov edi, 4 lea rsi, aRpiInterlacedM; "RPI: Interlaced mode can only be config"... mov al, 0 call TraceLog loc_C9A1D: add rsp, 10h pop rbp retn
long long ClearWindowState(int a1, long long a2, int a3, int a4, int a5, int a6) { long long result; // rax if ( (dword_21AC88 & 0x40) != 0 && (a1 & 0x40) != 0 ) { glfwSwapInterval(0LL); dword_21AC88 &= ~0x40u; } if ( (dword_21AC88 & 0x8000) != 0 && (a1 & 0x8000) != 0 ) ToggleBorderlessWindowed(); if ( (dword_21AC88 & 2) != 0 && (a1 & 2) != 0 ) ToggleFullscreen(); if ( (dword_21AC88 & 4) != 0 && (a1 & 4) != 0 ) { glfwSetWindowAttrib(platform, &byte_20003, 0LL); dword_21AC88 &= ~4u; } if ( (dword_21AC88 & 0x80) != 0 && (a1 & 0x80) != 0 ) { glfwShowWindow(platform); dword_21AC88 &= ~0x80u; } if ( (dword_21AC88 & 0x200) != 0 && (a1 & 0x200) != 0 ) RestoreWindow(); if ( (dword_21AC88 & 0x400) != 0 && (a1 & 0x400) != 0 ) RestoreWindow(); if ( (dword_21AC88 & 8) != 0 && (a1 & 8) != 0 ) { glfwSetWindowAttrib(platform, &byte_20005, 1LL); dword_21AC88 &= ~8u; } if ( (dword_21AC88 & 0x800) != 0 && (a1 & 0x800) != 0 ) { glfwSetWindowAttrib(platform, &byte_2000C, 1LL); dword_21AC88 &= ~0x800u; } if ( (dword_21AC88 & 0x1000) != 0 && (a1 & 0x1000) != 0 ) { glfwSetWindowAttrib(platform, &byte_20007, 0LL); dword_21AC88 &= ~0x1000u; } if ( (dword_21AC88 & 0x100) != 0 && (a1 & 0x100) != 0 ) dword_21AC88 &= ~0x100u; if ( (dword_21AC88 & 0x10) != 0 && (a1 & 0x10) != 0 ) TraceLog( 4, (unsigned int)"WINDOW: Framebuffer transparency can only be configured before window initialization", a3, a4, a5, a6); if ( (dword_21AC88 & 0x2000) != 0 && (a1 & 0x2000) != 0 ) TraceLog(4, (unsigned int)"WINDOW: High DPI can only be configured before window initialization", a3, a4, a5, a6); if ( (dword_21AC88 & 0x4000) != 0 && (a1 & 0x4000) != 0 ) { glfwSetWindowAttrib(platform, &byte_2000D, 0LL); dword_21AC88 &= ~0x4000u; } if ( (dword_21AC88 & 0x20) != 0 && (a1 & 0x20) != 0 ) TraceLog(4, (unsigned int)"WINDOW: MSAA can only be configured before window initialization", a3, a4, a5, a6); result = dword_21AC88 & 0x10000; if ( (_DWORD)result ) { result = a1 & 0x10000; if ( (_DWORD)result ) return TraceLog( 4, (unsigned int)"RPI: Interlaced mode can only be configured before window initialization", a3, a4, a5, a6); } return result; }
ClearWindowState: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV dword ptr [RBP + -0x4],EDI MOV EAX,dword ptr [0x0031ac88] AND EAX,0x40 CMP EAX,0x0 JBE 0x001c973a MOV EAX,dword ptr [RBP + -0x4] AND EAX,0x40 CMP EAX,0x0 JBE 0x001c973a XOR EDI,EDI CALL 0x00284ba0 MOV EAX,dword ptr [0x0031ac88] AND EAX,0xffffffbf MOV dword ptr [0x0031ac88],EAX LAB_001c973a: MOV EAX,dword ptr [0x0031ac88] AND EAX,0x8000 CMP EAX,0x0 JBE 0x001c975c MOV EAX,dword ptr [RBP + -0x4] AND EAX,0x8000 CMP EAX,0x0 JBE 0x001c975c CALL 0x001c9050 LAB_001c975c: MOV EAX,dword ptr [0x0031ac88] AND EAX,0x2 CMP EAX,0x0 JBE 0x001c977a MOV EAX,dword ptr [RBP + -0x4] AND EAX,0x2 CMP EAX,0x0 JBE 0x001c977a CALL 0x001c8c80 LAB_001c977a: MOV EAX,dword ptr [0x0031ac88] AND EAX,0x4 CMP EAX,0x0 JBE 0x001c97b5 MOV EAX,dword ptr [RBP + -0x4] AND EAX,0x4 CMP EAX,0x0 JBE 0x001c97b5 MOV RDI,qword ptr [0x0031b768] MOV ESI,0x20003 XOR EDX,EDX CALL 0x0028f030 MOV EAX,dword ptr [0x0031ac88] AND EAX,0xfffffffb MOV dword ptr [0x0031ac88],EAX LAB_001c97b5: MOV EAX,dword ptr [0x0031ac88] AND EAX,0x80 CMP EAX,0x0 JBE 0x001c97ef MOV EAX,dword ptr [RBP + -0x4] AND EAX,0x80 CMP EAX,0x0 JBE 0x001c97ef MOV RDI,qword ptr [0x0031b768] CALL 0x0028ea20 MOV EAX,dword ptr [0x0031ac88] AND EAX,0xffffff7f MOV dword ptr [0x0031ac88],EAX LAB_001c97ef: MOV EAX,dword ptr [0x0031ac88] AND EAX,0x200 CMP EAX,0x0 JBE 0x001c9811 MOV EAX,dword ptr [RBP + -0x4] AND EAX,0x200 CMP EAX,0x0 JBE 0x001c9811 CALL 0x001c9320 LAB_001c9811: MOV EAX,dword ptr [0x0031ac88] AND EAX,0x400 CMP EAX,0x0 JBE 0x001c9833 MOV EAX,dword ptr [RBP + -0x4] AND EAX,0x400 CMP EAX,0x0 JBE 0x001c9833 CALL 0x001c9320 LAB_001c9833: MOV EAX,dword ptr [0x0031ac88] AND EAX,0x8 CMP EAX,0x0 JBE 0x001c9871 MOV EAX,dword ptr [RBP + -0x4] AND EAX,0x8 CMP EAX,0x0 JBE 0x001c9871 MOV RDI,qword ptr [0x0031b768] MOV ESI,0x20005 MOV EDX,0x1 CALL 0x0028f030 MOV EAX,dword ptr [0x0031ac88] AND EAX,0xfffffff7 MOV dword ptr [0x0031ac88],EAX LAB_001c9871: MOV EAX,dword ptr [0x0031ac88] AND EAX,0x800 CMP EAX,0x0 JBE 0x001c98b5 MOV EAX,dword ptr [RBP + -0x4] AND EAX,0x800 CMP EAX,0x0 JBE 0x001c98b5 MOV RDI,qword ptr [0x0031b768] MOV ESI,0x2000c MOV EDX,0x1 CALL 0x0028f030 MOV EAX,dword ptr [0x0031ac88] AND EAX,0xfffff7ff MOV dword ptr [0x0031ac88],EAX LAB_001c98b5: MOV EAX,dword ptr [0x0031ac88] AND EAX,0x1000 CMP EAX,0x0 JBE 0x001c98f6 MOV EAX,dword ptr [RBP + -0x4] AND EAX,0x1000 CMP EAX,0x0 JBE 0x001c98f6 MOV RDI,qword ptr [0x0031b768] MOV ESI,0x20007 XOR EDX,EDX CALL 0x0028f030 MOV EAX,dword ptr [0x0031ac88] AND EAX,0xffffefff MOV dword ptr [0x0031ac88],EAX LAB_001c98f6: MOV EAX,dword ptr [0x0031ac88] AND EAX,0x100 CMP EAX,0x0 JBE 0x001c9924 MOV EAX,dword ptr [RBP + -0x4] AND EAX,0x100 CMP EAX,0x0 JBE 0x001c9924 MOV EAX,dword ptr [0x0031ac88] AND EAX,0xfffffeff MOV dword ptr [0x0031ac88],EAX LAB_001c9924: MOV EAX,dword ptr [0x0031ac88] AND EAX,0x10 CMP EAX,0x0 JBE 0x001c9950 MOV EAX,dword ptr [RBP + -0x4] AND EAX,0x10 CMP EAX,0x0 JBE 0x001c9950 MOV EDI,0x4 LEA RSI,[0x2b5388] MOV AL,0x0 CALL 0x00282c40 LAB_001c9950: MOV EAX,dword ptr [0x0031ac88] AND EAX,0x2000 CMP EAX,0x0 JBE 0x001c9980 MOV EAX,dword ptr [RBP + -0x4] AND EAX,0x2000 CMP EAX,0x0 JBE 0x001c9980 MOV EDI,0x4 LEA RSI,[0x2b53dd] MOV AL,0x0 CALL 0x00282c40 LAB_001c9980: MOV EAX,dword ptr [0x0031ac88] AND EAX,0x4000 CMP EAX,0x0 JBE 0x001c99c1 MOV EAX,dword ptr [RBP + -0x4] AND EAX,0x4000 CMP EAX,0x0 JBE 0x001c99c1 MOV RDI,qword ptr [0x0031b768] MOV ESI,0x2000d XOR EDX,EDX CALL 0x0028f030 MOV EAX,dword ptr [0x0031ac88] AND EAX,0xffffbfff MOV dword ptr [0x0031ac88],EAX LAB_001c99c1: MOV EAX,dword ptr [0x0031ac88] AND EAX,0x20 CMP EAX,0x0 JBE 0x001c99ed MOV EAX,dword ptr [RBP + -0x4] AND EAX,0x20 CMP EAX,0x0 JBE 0x001c99ed MOV EDI,0x4 LEA RSI,[0x2b5422] MOV AL,0x0 CALL 0x00282c40 LAB_001c99ed: MOV EAX,dword ptr [0x0031ac88] AND EAX,0x10000 CMP EAX,0x0 JBE 0x001c9a1d MOV EAX,dword ptr [RBP + -0x4] AND EAX,0x10000 CMP EAX,0x0 JBE 0x001c9a1d MOV EDI,0x4 LEA RSI,[0x2b5463] MOV AL,0x0 CALL 0x00282c40 LAB_001c9a1d: ADD RSP,0x10 POP RBP RET
void ClearWindowState(uint param_1) { if (((DAT_0031ac88 & 0x40) != 0) && ((param_1 & 0x40) != 0)) { glfwSwapInterval(0); DAT_0031ac88 = DAT_0031ac88 & 0xffffffbf; } if (((DAT_0031ac88 & 0x8000) != 0) && ((param_1 & 0x8000) != 0)) { ToggleBorderlessWindowed(); } if (((DAT_0031ac88 & 2) != 0) && ((param_1 & 2) != 0)) { ToggleFullscreen(); } if (((DAT_0031ac88 & 4) != 0) && ((param_1 & 4) != 0)) { glfwSetWindowAttrib(platform,0x20003,0); DAT_0031ac88 = DAT_0031ac88 & 0xfffffffb; } if (((DAT_0031ac88 & 0x80) != 0) && ((param_1 & 0x80) != 0)) { glfwShowWindow(platform); DAT_0031ac88 = DAT_0031ac88 & 0xffffff7f; } if (((DAT_0031ac88 & 0x200) != 0) && ((param_1 & 0x200) != 0)) { RestoreWindow(); } if (((DAT_0031ac88 & 0x400) != 0) && ((param_1 & 0x400) != 0)) { RestoreWindow(); } if (((DAT_0031ac88 & 8) != 0) && ((param_1 & 8) != 0)) { glfwSetWindowAttrib(platform,0x20005,1); DAT_0031ac88 = DAT_0031ac88 & 0xfffffff7; } if (((DAT_0031ac88 & 0x800) != 0) && ((param_1 & 0x800) != 0)) { glfwSetWindowAttrib(platform,0x2000c,1); DAT_0031ac88 = DAT_0031ac88 & 0xfffff7ff; } if (((DAT_0031ac88 & 0x1000) != 0) && ((param_1 & 0x1000) != 0)) { glfwSetWindowAttrib(platform,0x20007,0); DAT_0031ac88 = DAT_0031ac88 & 0xffffefff; } if (((DAT_0031ac88 & 0x100) != 0) && ((param_1 & 0x100) != 0)) { DAT_0031ac88 = DAT_0031ac88 & 0xfffffeff; } if (((DAT_0031ac88 & 0x10) != 0) && ((param_1 & 0x10) != 0)) { TraceLog(4, "WINDOW: Framebuffer transparency can only be configured before window initialization") ; } if (((DAT_0031ac88 & 0x2000) != 0) && ((param_1 & 0x2000) != 0)) { TraceLog(4,"WINDOW: High DPI can only be configured before window initialization"); } if (((DAT_0031ac88 & 0x4000) != 0) && ((param_1 & 0x4000) != 0)) { glfwSetWindowAttrib(platform,0x2000d,0); DAT_0031ac88 = DAT_0031ac88 & 0xffffbfff; } if (((DAT_0031ac88 & 0x20) != 0) && ((param_1 & 0x20) != 0)) { TraceLog(4,"WINDOW: MSAA can only be configured before window initialization"); } if (((DAT_0031ac88 & 0x10000) != 0) && ((param_1 & 0x10000) != 0)) { TraceLog(4,"RPI: Interlaced mode can only be configured before window initialization"); } return; }
28,782
HeapGetStats
seiftnesse[P]memoryallocator/src/custom_alloc_stats.c
void HeapGetStats(size_t *allocated, size_t *freed, size_t *count, size_t *peak) { if (allocated) *allocated = allocation_stats.total_allocated; if (freed) *freed = allocation_stats.total_freed; if (count) *count = allocation_stats.allocation_count; if (peak) *peak = allocation_stats.peak_allocation; HEAP_LOG("Stats queried: allocated=%zu, freed=%zu, count=%zu, peak=%zu\n", allocation_stats.total_allocated, allocation_stats.total_freed, allocation_stats.allocation_count, allocation_stats.peak_allocation); }
O0
c
HeapGetStats: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) cmpq $0x0, -0x8(%rbp) je 0x4669 movq 0x4104a8e(%rip), %rcx # 0x41090f0 movq -0x8(%rbp), %rax movq %rcx, (%rax) cmpq $0x0, -0x10(%rbp) je 0x467e movq 0x4104a81(%rip), %rcx # 0x41090f8 movq -0x10(%rbp), %rax movq %rcx, (%rax) cmpq $0x0, -0x18(%rbp) je 0x4693 movq 0x4104a74(%rip), %rcx # 0x4109100 movq -0x18(%rbp), %rax movq %rcx, (%rax) cmpq $0x0, -0x20(%rbp) je 0x46a8 movq 0x4104a67(%rip), %rcx # 0x4109108 movq -0x20(%rbp), %rax movq %rcx, (%rax) popq %rbp retq nopw (%rax,%rax)
HeapGetStats: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx cmp [rbp+var_8], 0 jz short loc_4669 mov rcx, cs:allocation_stats mov rax, [rbp+var_8] mov [rax], rcx loc_4669: cmp [rbp+var_10], 0 jz short loc_467E mov rcx, cs:qword_41090F8 mov rax, [rbp+var_10] mov [rax], rcx loc_467E: cmp [rbp+var_18], 0 jz short loc_4693 mov rcx, cs:qword_4109100 mov rax, [rbp+var_18] mov [rax], rcx loc_4693: cmp [rbp+var_20], 0 jz short loc_46A8 mov rcx, cs:qword_4109108 mov rax, [rbp+var_20] mov [rax], rcx loc_46A8: pop rbp retn
_QWORD * HeapGetStats(_QWORD *a1, _QWORD *a2, _QWORD *a3, _QWORD *a4) { _QWORD *result; // rax if ( a1 ) { result = a1; *a1 = allocation_stats; } if ( a2 ) { result = a2; *a2 = qword_41090F8; } if ( a3 ) { result = a3; *a3 = qword_4109100; } if ( a4 ) { result = a4; *a4 = qword_4109108; } return result; }
HeapGetStats: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX CMP qword ptr [RBP + -0x8],0x0 JZ 0x00104669 MOV RCX,qword ptr [0x042090f0] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],RCX LAB_00104669: CMP qword ptr [RBP + -0x10],0x0 JZ 0x0010467e MOV RCX,qword ptr [0x042090f8] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX LAB_0010467e: CMP qword ptr [RBP + -0x18],0x0 JZ 0x00104693 MOV RCX,qword ptr [0x04209100] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX LAB_00104693: CMP qword ptr [RBP + -0x20],0x0 JZ 0x001046a8 MOV RCX,qword ptr [0x04209108] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX LAB_001046a8: POP RBP RET
void HeapGetStats(int8 *param_1,int8 *param_2,int8 *param_3,int8 *param_4) { if (param_1 != (int8 *)0x0) { *param_1 = allocation_stats; } if (param_2 != (int8 *)0x0) { *param_2 = DAT_042090f8; } if (param_3 != (int8 *)0x0) { *param_3 = DAT_04209100; } if (param_4 != (int8 *)0x0) { *param_4 = DAT_04209108; } return; }
28,783
ft_boolean_check_syntax_string
eloqsql/storage/myisam/ft_parser.c
my_bool ft_boolean_check_syntax_string(const uchar *str, size_t length, CHARSET_INFO *cs) { uint i, j; if (cs->mbminlen != 1) { DBUG_ASSERT(0); return 1; } if (!str || (length + 1 != sizeof(DEFAULT_FTB_SYNTAX)) || (str[0] != ' ' && str[1] != ' ')) return 1; for (i=0; i<sizeof(DEFAULT_FTB_SYNTAX); i++) { /* limiting to 7-bit ascii only */ if ((unsigned char)(str[i]) > 127 || my_isalnum(cs, str[i])) return 1; for (j=0; j<i; j++) if (str[i] == str[j] && (i != 11 || j != 10)) return 1; } return 0; }
O0
c
ft_boolean_check_syntax_string: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x20(%rbp), %rax cmpl $0x1, 0x98(%rax) je 0xa4b8a jmp 0xa4b7f jmp 0xa4b81 movb $0x1, -0x1(%rbp) jmp 0xa4c67 cmpq $0x0, -0x10(%rbp) je 0xa4bb8 movq -0x18(%rbp), %rax addq $0x1, %rax cmpq $0xf, %rax jne 0xa4bb8 movq -0x10(%rbp), %rax movzbl (%rax), %eax cmpl $0x20, %eax je 0xa4bc1 movq -0x10(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0x20, %eax je 0xa4bc1 movb $0x1, -0x1(%rbp) jmp 0xa4c67 movl $0x0, -0x24(%rbp) movl -0x24(%rbp), %eax cmpq $0xf, %rax jae 0xa4c63 movq -0x10(%rbp), %rax movl -0x24(%rbp), %ecx movzbl (%rax,%rcx), %eax cmpl $0x7f, %eax jg 0xa4c05 movq -0x20(%rbp), %rax movq 0x40(%rax), %rax movq -0x10(%rbp), %rcx movl -0x24(%rbp), %edx movzbl (%rcx,%rdx), %ecx movzbl 0x1(%rax,%rcx), %eax andl $0x7, %eax cmpl $0x0, %eax je 0xa4c0b movb $0x1, -0x1(%rbp) jmp 0xa4c67 movl $0x0, -0x28(%rbp) movl -0x28(%rbp), %eax cmpl -0x24(%rbp), %eax jae 0xa4c53 movq -0x10(%rbp), %rax movl -0x24(%rbp), %ecx movzbl (%rax,%rcx), %eax movq -0x10(%rbp), %rcx movl -0x28(%rbp), %edx movzbl (%rcx,%rdx), %ecx cmpl %ecx, %eax jne 0xa4c46 cmpl $0xb, -0x24(%rbp) jne 0xa4c40 cmpl $0xa, -0x28(%rbp) je 0xa4c46 movb $0x1, -0x1(%rbp) jmp 0xa4c67 jmp 0xa4c48 movl -0x28(%rbp), %eax addl $0x1, %eax movl %eax, -0x28(%rbp) jmp 0xa4c12 jmp 0xa4c55 movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) jmp 0xa4bc8 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al popq %rbp retq nopl (%rax)
ft_boolean_check_syntax_string: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_20] cmp dword ptr [rax+98h], 1 jz short loc_A4B8A jmp short $+2 loc_A4B7F: jmp short $+2 loc_A4B81: mov [rbp+var_1], 1 jmp loc_A4C67 loc_A4B8A: cmp [rbp+var_10], 0 jz short loc_A4BB8 mov rax, [rbp+var_18] add rax, 1 cmp rax, 0Fh jnz short loc_A4BB8 mov rax, [rbp+var_10] movzx eax, byte ptr [rax] cmp eax, 20h ; ' ' jz short loc_A4BC1 mov rax, [rbp+var_10] movzx eax, byte ptr [rax+1] cmp eax, 20h ; ' ' jz short loc_A4BC1 loc_A4BB8: mov [rbp+var_1], 1 jmp loc_A4C67 loc_A4BC1: mov [rbp+var_24], 0 loc_A4BC8: mov eax, [rbp+var_24] cmp rax, 0Fh jnb loc_A4C63 mov rax, [rbp+var_10] mov ecx, [rbp+var_24] movzx eax, byte ptr [rax+rcx] cmp eax, 7Fh jg short loc_A4C05 mov rax, [rbp+var_20] mov rax, [rax+40h] mov rcx, [rbp+var_10] mov edx, [rbp+var_24] movzx ecx, byte ptr [rcx+rdx] movzx eax, byte ptr [rax+rcx+1] and eax, 7 cmp eax, 0 jz short loc_A4C0B loc_A4C05: mov [rbp+var_1], 1 jmp short loc_A4C67 loc_A4C0B: mov [rbp+var_28], 0 loc_A4C12: mov eax, [rbp+var_28] cmp eax, [rbp+var_24] jnb short loc_A4C53 mov rax, [rbp+var_10] mov ecx, [rbp+var_24] movzx eax, byte ptr [rax+rcx] mov rcx, [rbp+var_10] mov edx, [rbp+var_28] movzx ecx, byte ptr [rcx+rdx] cmp eax, ecx jnz short loc_A4C46 cmp [rbp+var_24], 0Bh jnz short loc_A4C40 cmp [rbp+var_28], 0Ah jz short loc_A4C46 loc_A4C40: mov [rbp+var_1], 1 jmp short loc_A4C67 loc_A4C46: jmp short $+2 loc_A4C48: mov eax, [rbp+var_28] add eax, 1 mov [rbp+var_28], eax jmp short loc_A4C12 loc_A4C53: jmp short $+2 loc_A4C55: mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax jmp loc_A4BC8 loc_A4C63: mov [rbp+var_1], 0 loc_A4C67: mov al, [rbp+var_1] pop rbp retn
char ft_boolean_check_syntax_string(_BYTE *a1, long long a2, long long a3) { unsigned int j; // [rsp+0h] [rbp-28h] unsigned int i; // [rsp+4h] [rbp-24h] if ( *(_DWORD *)(a3 + 152) != 1 ) return 1; if ( !a1 || a2 != 14 || *a1 != 32 && a1[1] != 32 ) return 1; for ( i = 0; i < 0xFuLL; ++i ) { if ( (unsigned __int8)a1[i] > 0x7Fu || (*(_BYTE *)(*(_QWORD *)(a3 + 64) + (unsigned __int8)a1[i] + 1LL) & 7) != 0 ) return 1; for ( j = 0; j < i; ++j ) { if ( a1[i] == a1[j] && (i != 11 || j != 10) ) return 1; } } return 0; }
ft_boolean_check_syntax_string: 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 + -0x20] CMP dword ptr [RAX + 0x98],0x1 JZ 0x001a4b8a JMP 0x001a4b7f LAB_001a4b7f: JMP 0x001a4b81 LAB_001a4b81: MOV byte ptr [RBP + -0x1],0x1 JMP 0x001a4c67 LAB_001a4b8a: CMP qword ptr [RBP + -0x10],0x0 JZ 0x001a4bb8 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 CMP RAX,0xf JNZ 0x001a4bb8 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX] CMP EAX,0x20 JZ 0x001a4bc1 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x20 JZ 0x001a4bc1 LAB_001a4bb8: MOV byte ptr [RBP + -0x1],0x1 JMP 0x001a4c67 LAB_001a4bc1: MOV dword ptr [RBP + -0x24],0x0 LAB_001a4bc8: MOV EAX,dword ptr [RBP + -0x24] CMP RAX,0xf JNC 0x001a4c63 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x24] MOVZX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x7f JG 0x001a4c05 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x24] MOVZX ECX,byte ptr [RCX + RDX*0x1] MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1] AND EAX,0x7 CMP EAX,0x0 JZ 0x001a4c0b LAB_001a4c05: MOV byte ptr [RBP + -0x1],0x1 JMP 0x001a4c67 LAB_001a4c0b: MOV dword ptr [RBP + -0x28],0x0 LAB_001a4c12: MOV EAX,dword ptr [RBP + -0x28] CMP EAX,dword ptr [RBP + -0x24] JNC 0x001a4c53 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x24] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV RCX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x28] MOVZX ECX,byte ptr [RCX + RDX*0x1] CMP EAX,ECX JNZ 0x001a4c46 CMP dword ptr [RBP + -0x24],0xb JNZ 0x001a4c40 CMP dword ptr [RBP + -0x28],0xa JZ 0x001a4c46 LAB_001a4c40: MOV byte ptr [RBP + -0x1],0x1 JMP 0x001a4c67 LAB_001a4c46: JMP 0x001a4c48 LAB_001a4c48: MOV EAX,dword ptr [RBP + -0x28] ADD EAX,0x1 MOV dword ptr [RBP + -0x28],EAX JMP 0x001a4c12 LAB_001a4c53: JMP 0x001a4c55 LAB_001a4c55: MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOV dword ptr [RBP + -0x24],EAX JMP 0x001a4bc8 LAB_001a4c63: MOV byte ptr [RBP + -0x1],0x0 LAB_001a4c67: MOV AL,byte ptr [RBP + -0x1] POP RBP RET
int1 ft_boolean_check_syntax_string(char *param_1,long param_2,long param_3) { uint local_30; uint local_2c; int1 local_9; if (*(int *)(param_3 + 0x98) == 1) { if (((param_1 == (char *)0x0) || (param_2 != 0xe)) || ((*param_1 != ' ' && (param_1[1] != ' '))) ) { local_9 = 1; } else { for (local_2c = 0; local_2c < 0xf; local_2c = local_2c + 1) { if ((0x7f < (byte)param_1[local_2c]) || ((*(byte *)(*(long *)(param_3 + 0x40) + 1 + (ulong)(byte)param_1[local_2c]) & 7) != 0)) { return 1; } for (local_30 = 0; local_30 < local_2c; local_30 = local_30 + 1) { if ((param_1[local_2c] == param_1[local_30]) && ((local_2c != 0xb || (local_30 != 10)))) { return 1; } } } local_9 = 0; } } else { local_9 = 1; } return local_9; }
28,784
YAML::detail::node_iterator_base<YAML::detail::node>::operator++()
aimrt_mujoco_sim/_deps/yaml-cpp-src/include/yaml-cpp/node/detail/node_iterator.h
node_iterator_base<V>& operator++() { switch (m_type) { case iterator_type::NoneType: break; case iterator_type::Sequence: ++m_seqIt; break; case iterator_type::Map: ++m_mapIt; m_mapIt = increment_until_defined(m_mapIt); break; } return *this; }
O3
c
YAML::detail::node_iterator_base<YAML::detail::node>::operator++(): movq %rdi, %rax movl (%rdi), %ecx cmpl $0x2, %ecx je 0x4d00d cmpl $0x1, %ecx jne 0x4d00c addq $0x8, 0x8(%rax) retq movq 0x10(%rax), %rcx movq 0x18(%rax), %rdx addq $0x10, %rcx cmpq %rcx, %rdx je 0x4d044 movq (%rcx), %rsi movq (%rsi), %rsi movq (%rsi), %rsi cmpb $0x1, (%rsi) jne 0x4d03b movq 0x8(%rcx), %rsi movq (%rsi), %rsi movq (%rsi), %rsi cmpb $0x0, (%rsi) jne 0x4d044 addq $0x10, %rcx cmpq %rdx, %rcx jne 0x4d01e movq %rcx, 0x10(%rax) retq nop
_ZN4YAML6detail18node_iterator_baseINS0_4nodeEEppEv: mov rax, rdi mov ecx, [rdi] cmp ecx, 2 jz short loc_4D00D cmp ecx, 1 jnz short locret_4D00C add qword ptr [rax+8], 8 locret_4D00C: retn loc_4D00D: mov rcx, [rax+10h] mov rdx, [rax+18h] add rcx, 10h cmp rdx, rcx jz short loc_4D044 loc_4D01E: mov rsi, [rcx] mov rsi, [rsi] mov rsi, [rsi] cmp byte ptr [rsi], 1 jnz short loc_4D03B mov rsi, [rcx+8] mov rsi, [rsi] mov rsi, [rsi] cmp byte ptr [rsi], 0 jnz short loc_4D044 loc_4D03B: add rcx, 10h cmp rcx, rdx jnz short loc_4D01E loc_4D044: mov [rax+10h], rcx retn
long long YAML::detail::node_iterator_base<YAML::detail::node>::operator++(long long a1) { long long result; // rax _BYTE ****v2; // rdx _BYTE ****i; // rcx result = a1; if ( *(_DWORD *)a1 == 2 ) { v2 = *(_BYTE *****)(a1 + 24); for ( i = (_BYTE ****)(*(_QWORD *)(a1 + 16) + 16LL); i != v2; i += 2 ) { if ( ****i == 1 && ***i[1] ) break; } *(_QWORD *)(a1 + 16) = i; } else if ( *(_DWORD *)a1 == 1 ) { *(_QWORD *)(a1 + 8) += 8LL; } return result; }
operator++: MOV RAX,RDI MOV ECX,dword ptr [RDI] CMP ECX,0x2 JZ 0x0014d00d CMP ECX,0x1 JNZ 0x0014d00c ADD qword ptr [RAX + 0x8],0x8 LAB_0014d00c: RET LAB_0014d00d: MOV RCX,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RAX + 0x18] ADD RCX,0x10 CMP RDX,RCX JZ 0x0014d044 LAB_0014d01e: MOV RSI,qword ptr [RCX] MOV RSI,qword ptr [RSI] MOV RSI,qword ptr [RSI] CMP byte ptr [RSI],0x1 JNZ 0x0014d03b MOV RSI,qword ptr [RCX + 0x8] MOV RSI,qword ptr [RSI] MOV RSI,qword ptr [RSI] CMP byte ptr [RSI],0x0 JNZ 0x0014d044 LAB_0014d03b: ADD RCX,0x10 CMP RCX,RDX JNZ 0x0014d01e LAB_0014d044: MOV qword ptr [RAX + 0x10],RCX RET
/* YAML::detail::node_iterator_base<YAML::detail::node>::TEMPNAMEPLACEHOLDERVALUE() */ void __thiscall YAML::detail::node_iterator_base<YAML::detail::node>::operator++ (node_iterator_base<YAML::detail::node> *this) { int8 *puVar1; int8 *puVar2; if (*(int *)this != 2) { if (*(int *)this == 1) { *(long *)(this + 8) = *(long *)(this + 8) + 8; } return; } puVar2 = *(int8 **)(this + 0x10); do { puVar1 = puVar2; puVar2 = puVar1 + 2; if (*(int8 **)(this + 0x18) == puVar2) break; } while ((*(char *)**(int8 **)*puVar2 != '\x01') || (*(char *)**(int8 **)puVar1[3] == '\0')); *(int8 **)(this + 0x10) = puVar2; return; }
28,785
mi_kpos
eloqsql/storage/myisam/mi_search.c
my_off_t _mi_kpos(uint nod_flag, uchar *after_key) { after_key-=nod_flag; switch (nod_flag) { #if SIZEOF_OFF_T > 4 case 7: return mi_uint7korr(after_key)*MI_MIN_KEY_BLOCK_LENGTH; case 6: return mi_uint6korr(after_key)*MI_MIN_KEY_BLOCK_LENGTH; case 5: return mi_uint5korr(after_key)*MI_MIN_KEY_BLOCK_LENGTH; #else case 7: after_key++; case 6: after_key++; case 5: after_key++; #endif case 4: return ((my_off_t) mi_uint4korr(after_key))*MI_MIN_KEY_BLOCK_LENGTH; case 3: return ((my_off_t) mi_uint3korr(after_key))*MI_MIN_KEY_BLOCK_LENGTH; case 2: return (my_off_t) (mi_uint2korr(after_key)*MI_MIN_KEY_BLOCK_LENGTH); case 1: return (uint) (*after_key)*MI_MIN_KEY_BLOCK_LENGTH; case 0: /* At leaf page */ default: /* Impossible */ return(HA_OFFSET_ERROR); } }
O3
c
mi_kpos: pushq %rbp movq %rsp, %rbp leal -0x1(%rdi), %eax cmpl $0x6, %eax ja 0x3db53 movl %edi, %ecx negq %rcx leaq 0x5e9e2(%rip), %rdx # 0x9c4c4 movslq (%rdx,%rax,4), %rax addq %rdx, %rax jmpq *%rax movzbl (%rsi,%rcx), %eax shll $0xa, %eax jmp 0x3dba7 movl (%rsi,%rcx), %eax movzbl 0x4(%rsi,%rcx), %ecx shlq $0x38, %rcx shlq $0x18, %rax jmp 0x3db9d movzbl 0x2(%rsi,%rcx), %eax movzbl 0x1(%rsi,%rcx), %edx movzbl (%rsi,%rcx), %ecx shlq $0x1a, %rcx shll $0x12, %edx shll $0xa, %eax orl %edx, %eax jmp 0x3db4e movzbl 0x3(%rsi,%rcx), %eax movzbl 0x2(%rsi,%rcx), %edx movzbl 0x1(%rsi,%rcx), %edi movzbl (%rsi,%rcx), %ecx shlq $0x22, %rcx shlq $0x1a, %rdi shll $0x12, %edx shll $0xa, %eax orl %edx, %eax orq %rdi, %rax orq %rcx, %rax jmp 0x3dba7 movq $-0x1, %rax jmp 0x3dba7 movzbl 0x1(%rsi,%rcx), %eax movzbl (%rsi,%rcx), %ecx shll $0x12, %ecx shll $0xa, %eax orl %ecx, %eax jmp 0x3dba7 movl (%rsi,%rcx), %eax movzwl 0x4(%rsi,%rcx), %ecx shlq $0x30, %rcx shlq $0x10, %rax jmp 0x3db9d movl (%rsi,%rcx), %eax movzwl 0x4(%rsi,%rcx), %edx movzbl 0x6(%rsi,%rcx), %ecx shlq $0x38, %rcx shlq $0x28, %rdx shlq $0x8, %rax orq %rdx, %rax orq %rcx, %rax bswapq %rax shlq $0xa, %rax popq %rbp retq
_mi_kpos: push rbp mov rbp, rsp lea eax, [rdi-1]; switch 7 cases cmp eax, 6 ja short def_3DAE9; jumptable 000000000003DAE9 default case mov ecx, edi neg rcx lea rdx, jpt_3DAE9 movsxd rax, ds:(jpt_3DAE9 - 9C4C4h)[rdx+rax*4] add rax, rdx jmp rax; switch jump loc_3DAEB: movzx eax, byte ptr [rsi+rcx]; jumptable 000000000003DAE9 case 1 shl eax, 0Ah jmp loc_3DBA7 loc_3DAF7: mov eax, [rsi+rcx]; jumptable 000000000003DAE9 case 5 movzx ecx, byte ptr [rsi+rcx+4] shl rcx, 38h shl rax, 18h jmp loc_3DB9D loc_3DB0C: movzx eax, byte ptr [rsi+rcx+2]; jumptable 000000000003DAE9 case 3 movzx edx, byte ptr [rsi+rcx+1] movzx ecx, byte ptr [rsi+rcx] shl rcx, 1Ah shl edx, 12h shl eax, 0Ah or eax, edx jmp short loc_3DB4E loc_3DB28: movzx eax, byte ptr [rsi+rcx+3]; jumptable 000000000003DAE9 case 4 movzx edx, byte ptr [rsi+rcx+2] movzx edi, byte ptr [rsi+rcx+1] movzx ecx, byte ptr [rsi+rcx] shl rcx, 22h shl rdi, 1Ah shl edx, 12h shl eax, 0Ah or eax, edx or rax, rdi loc_3DB4E: or rax, rcx jmp short loc_3DBA7 def_3DAE9: mov rax, 0FFFFFFFFFFFFFFFFh; jumptable 000000000003DAE9 default case jmp short loc_3DBA7 loc_3DB5C: movzx eax, byte ptr [rsi+rcx+1]; jumptable 000000000003DAE9 case 2 movzx ecx, byte ptr [rsi+rcx] shl ecx, 12h shl eax, 0Ah or eax, ecx jmp short loc_3DBA7 loc_3DB6F: mov eax, [rsi+rcx]; jumptable 000000000003DAE9 case 6 movzx ecx, word ptr [rsi+rcx+4] shl rcx, 30h shl rax, 10h jmp short loc_3DB9D loc_3DB81: mov eax, [rsi+rcx]; jumptable 000000000003DAE9 case 7 movzx edx, word ptr [rsi+rcx+4] movzx ecx, byte ptr [rsi+rcx+6] shl rcx, 38h shl rdx, 28h shl rax, 8 or rax, rdx loc_3DB9D: or rax, rcx bswap rax shl rax, 0Ah loc_3DBA7: pop rbp retn
unsigned long long mi_kpos(unsigned int a1, long long a2) { unsigned long long result; // rax unsigned long long v3; // rcx unsigned long long v4; // rax unsigned long long v5; // rcx unsigned long long v6; // rax switch ( a1 ) { case 1u: return *(unsigned __int8 *)(a2 - a1) << 10; case 2u: return (*(unsigned __int8 *)(a2 - a1) << 18) | (*(unsigned __int8 *)(a2 - a1 + 1) << 10); case 3u: v5 = (unsigned long long)*(unsigned __int8 *)(a2 - a1) << 26; v6 = (*(unsigned __int8 *)(a2 - a1 + 1) << 18) | (*(unsigned __int8 *)(a2 - a1 + 2) << 10); return v5 | v6; case 4u: v5 = (unsigned long long)*(unsigned __int8 *)(a2 - a1) << 34; v6 = ((unsigned long long)*(unsigned __int8 *)(a2 - a1 + 1) << 26) | (*(unsigned __int8 *)(a2 - a1 + 2) << 18) | (*(unsigned __int8 *)(a2 - a1 + 3) << 10); return v5 | v6; case 5u: v3 = (unsigned long long)*(unsigned __int8 *)(a2 - a1 + 4) << 56; v4 = (unsigned long long)*(unsigned int *)(a2 - a1) << 24; goto LABEL_11; case 6u: v3 = (unsigned long long)*(unsigned __int16 *)(a2 - a1 + 4) << 48; v4 = (unsigned long long)*(unsigned int *)(a2 - a1) << 16; goto LABEL_11; case 7u: v3 = (unsigned long long)*(unsigned __int8 *)(a2 - a1 + 6) << 56; v4 = ((unsigned long long)*(unsigned __int16 *)(a2 - a1 + 4) << 40) | ((unsigned long long)*(unsigned int *)(a2 - a1) << 8); LABEL_11: result = _byteswap_uint64(v3 | v4) << 10; break; default: result = -1LL; break; } return result; }
_mi_kpos: PUSH RBP MOV RBP,RSP LEA EAX,[RDI + -0x1] CMP EAX,0x6 JA 0x0013db53 MOV ECX,EDI NEG RCX LEA RDX,[0x19c4c4] MOVSXD RAX,dword ptr [RDX + RAX*0x4] ADD RAX,RDX switchD: JMP RAX caseD_1: MOVZX EAX,byte ptr [RSI + RCX*0x1] SHL EAX,0xa JMP 0x0013dba7 caseD_5: MOV EAX,dword ptr [RSI + RCX*0x1] MOVZX ECX,byte ptr [RSI + RCX*0x1 + 0x4] SHL RCX,0x38 SHL RAX,0x18 JMP 0x0013db9d caseD_3: MOVZX EAX,byte ptr [RSI + RCX*0x1 + 0x2] MOVZX EDX,byte ptr [RSI + RCX*0x1 + 0x1] MOVZX ECX,byte ptr [RSI + RCX*0x1] SHL RCX,0x1a SHL EDX,0x12 SHL EAX,0xa OR EAX,EDX JMP 0x0013db4e caseD_4: MOVZX EAX,byte ptr [RSI + RCX*0x1 + 0x3] MOVZX EDX,byte ptr [RSI + RCX*0x1 + 0x2] MOVZX EDI,byte ptr [RSI + RCX*0x1 + 0x1] MOVZX ECX,byte ptr [RSI + RCX*0x1] SHL RCX,0x22 SHL RDI,0x1a SHL EDX,0x12 SHL EAX,0xa OR EAX,EDX OR RAX,RDI LAB_0013db4e: OR RAX,RCX JMP 0x0013dba7 LAB_0013db53: MOV RAX,-0x1 JMP 0x0013dba7 caseD_2: MOVZX EAX,byte ptr [RSI + RCX*0x1 + 0x1] MOVZX ECX,byte ptr [RSI + RCX*0x1] SHL ECX,0x12 SHL EAX,0xa OR EAX,ECX JMP 0x0013dba7 caseD_6: MOV EAX,dword ptr [RSI + RCX*0x1] MOVZX ECX,word ptr [RSI + RCX*0x1 + 0x4] SHL RCX,0x30 SHL RAX,0x10 JMP 0x0013db9d caseD_7: MOV EAX,dword ptr [RSI + RCX*0x1] MOVZX EDX,word ptr [RSI + RCX*0x1 + 0x4] MOVZX ECX,byte ptr [RSI + RCX*0x1 + 0x6] SHL RCX,0x38 SHL RDX,0x28 SHL RAX,0x8 OR RAX,RDX LAB_0013db9d: OR RAX,RCX BSWAP RAX SHL RAX,0xa LAB_0013dba7: POP RBP RET
ulong _mi_kpos(uint param_1,long param_2) { ulong uVar1; long lVar2; ulong uVar3; if (6 < param_1 - 1) { return 0xffffffffffffffff; } lVar2 = -(ulong)param_1; switch(param_1) { case 1: return (ulong)*(byte *)(param_2 + lVar2) << 10; case 2: return (ulong)((uint)*(byte *)(param_2 + 1 + lVar2) << 10 | (uint)*(byte *)(param_2 + lVar2) << 0x12); case 3: uVar3 = (ulong)*(byte *)(param_2 + lVar2) << 0x1a; uVar1 = (ulong)((uint)*(byte *)(param_2 + 2 + lVar2) << 10 | (uint)*(byte *)(param_2 + 1 + lVar2) << 0x12); goto LAB_0013db4e; case 4: uVar3 = (ulong)*(byte *)(param_2 + lVar2) << 0x22; uVar1 = (ulong)((uint)*(byte *)(param_2 + 3 + lVar2) << 10 | (uint)*(byte *)(param_2 + 2 + lVar2) << 0x12) | (ulong)*(byte *)(param_2 + 1 + lVar2) << 0x1a; LAB_0013db4e: return uVar1 | uVar3; case 5: uVar3 = (ulong)*(byte *)(param_2 + 4 + lVar2) << 0x38; uVar1 = (ulong)*(uint *)(param_2 + lVar2) << 0x18; break; case 6: uVar3 = (ulong)*(ushort *)(param_2 + 4 + lVar2) << 0x30; uVar1 = (ulong)*(uint *)(param_2 + lVar2) << 0x10; break; case 7: uVar3 = (ulong)*(byte *)(param_2 + 6 + lVar2) << 0x38; uVar1 = (ulong)*(uint *)(param_2 + lVar2) << 8 | (ulong)*(ushort *)(param_2 + 4 + lVar2) << 0x28 ; } return (uVar3 >> 0x38 | ((uVar1 | uVar3) & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18 | (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18 | (uVar1 & 0xff00) << 0x28) << 10; }
28,786
Gis_polygon::centroid_xy(double*, double*) const
eloqsql/sql/spatial.cc
int Gis_polygon::centroid_xy(double *x, double *y) const { uint32 n_linear_rings; double UNINIT_VAR(res_area); double UNINIT_VAR(res_cx), UNINIT_VAR(res_cy); const char *data= m_data; bool first_loop= 1; if (no_data(data, 4) || (n_linear_rings= uint4korr(data)) == 0) return 1; data+= 4; while (n_linear_rings--) { uint32 n_points, org_n_points; double prev_x, prev_y; double cur_area= 0; double cur_cx= 0, cur_cy= 0; double sum_cx= 0, sum_cy= 0; if (no_data(data, 4)) return 1; org_n_points= n_points= uint4korr(data); data+= 4; if (n_points == 0 || not_enough_points(data, n_points)) return 1; get_point(&prev_x, &prev_y, data); data+= POINT_DATA_SIZE; while (--n_points) // One point is already read { double tmp_x, tmp_y; double loc_area; get_point(&tmp_x, &tmp_y, data); data+= POINT_DATA_SIZE; loc_area= prev_x * tmp_y - tmp_x * prev_y; cur_area+= loc_area; cur_cx+= tmp_x; cur_cy+= tmp_y; sum_cx+= (prev_x + tmp_x) * loc_area; sum_cy+= (prev_y + tmp_y) * loc_area; prev_x= tmp_x; prev_y= tmp_y; } if (fabs(cur_area) > 1e-10) { cur_cx= sum_cx / cur_area / 3.0; cur_cy= sum_cy / cur_area / 3.0; } else { cur_cx= cur_cx / (org_n_points - 1); cur_cy= cur_cy / (org_n_points - 1); } cur_area= fabs(cur_area); if (!first_loop) { double d_area= fabs(res_area - cur_area); res_cx= (res_area * res_cx - cur_area * cur_cx) / d_area; res_cy= (res_area * res_cy - cur_area * cur_cy) / d_area; } else { first_loop= 0; res_area= cur_area; res_cx= cur_cx; res_cy= cur_cy; } } *x= res_cx; *y= res_cy; return 0; }
O0
cpp
Gis_polygon::centroid_xy(double*, double*) const: pushq %rbp movq %rsp, %rbp subq $0xc0, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rdi movq %rdi, -0xb8(%rbp) movsd -0x30(%rbp), %xmm0 movsd %xmm0, -0x30(%rbp) movsd -0x38(%rbp), %xmm0 movsd %xmm0, -0x38(%rbp) movsd -0x40(%rbp), %xmm0 movsd %xmm0, -0x40(%rbp) movq 0x8(%rdi), %rax movq %rax, -0x48(%rbp) movb $0x1, -0x49(%rbp) movq -0x48(%rbp), %rsi movl $0x4, %edx callq 0x988770 testb $0x1, %al jne 0xa7300c movq -0x48(%rbp), %rax movl (%rax), %eax movl %eax, -0x24(%rbp) cmpl $0x0, %eax jne 0xa73018 movl $0x1, -0x4(%rbp) jmp 0xa733a6 movq -0x48(%rbp), %rax addq $0x4, %rax movq %rax, -0x48(%rbp) movl -0x24(%rbp), %eax movl %eax, %ecx addl $-0x1, %ecx movl %ecx, -0x24(%rbp) cmpl $0x0, %eax je 0xa73385 movq -0xb8(%rbp), %rdi xorps %xmm0, %xmm0 movsd %xmm0, -0x70(%rbp) xorps %xmm0, %xmm0 movsd %xmm0, -0x78(%rbp) xorps %xmm0, %xmm0 movsd %xmm0, -0x80(%rbp) xorps %xmm0, %xmm0 movsd %xmm0, -0x88(%rbp) xorps %xmm0, %xmm0 movsd %xmm0, -0x90(%rbp) movq -0x48(%rbp), %rsi movl $0x4, %edx callq 0x988770 testb $0x1, %al jne 0xa73081 jmp 0xa7308d movl $0x1, -0x4(%rbp) jmp 0xa733a6 movq -0x48(%rbp), %rax movl (%rax), %eax movl %eax, -0x50(%rbp) movl %eax, -0x54(%rbp) movq -0x48(%rbp), %rax addq $0x4, %rax movq %rax, -0x48(%rbp) cmpl $0x0, -0x50(%rbp) je 0xa730c6 movq -0xb8(%rbp), %rdi movq -0x48(%rbp), %rsi movl -0x50(%rbp), %edx xorl %ecx, %ecx callq 0xa78520 testb $0x1, %al jne 0xa730c6 jmp 0xa730d2 movl $0x1, -0x4(%rbp) jmp 0xa733a6 movq -0x48(%rbp), %rdx leaq -0x60(%rbp), %rdi leaq -0x68(%rbp), %rsi callq 0xa70000 movq -0x48(%rbp), %rax addq $0x10, %rax movq %rax, -0x48(%rbp) movl -0x50(%rbp), %eax addl $-0x1, %eax movl %eax, -0x50(%rbp) cmpl $0x0, %eax je 0xa73214 movq -0x48(%rbp), %rdx leaq -0x98(%rbp), %rdi leaq -0xa0(%rbp), %rsi callq 0xa70000 movq -0x48(%rbp), %rax addq $0x10, %rax movq %rax, -0x48(%rbp) movsd -0x60(%rbp), %xmm0 movsd -0xa0(%rbp), %xmm2 movsd -0x98(%rbp), %xmm1 mulsd -0x68(%rbp), %xmm1 movq %xmm1, %rax movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 xorq %rcx, %rax movq %rax, %xmm1 mulsd %xmm2, %xmm0 addsd %xmm1, %xmm0 movsd %xmm0, -0xa8(%rbp) movsd -0xa8(%rbp), %xmm0 addsd -0x70(%rbp), %xmm0 movsd %xmm0, -0x70(%rbp) movsd -0x98(%rbp), %xmm0 addsd -0x78(%rbp), %xmm0 movsd %xmm0, -0x78(%rbp) movsd -0xa0(%rbp), %xmm0 addsd -0x80(%rbp), %xmm0 movsd %xmm0, -0x80(%rbp) movsd -0x60(%rbp), %xmm0 addsd -0x98(%rbp), %xmm0 movsd -0xa8(%rbp), %xmm2 movsd -0x88(%rbp), %xmm1 mulsd %xmm2, %xmm0 addsd %xmm1, %xmm0 movsd %xmm0, -0x88(%rbp) movsd -0x68(%rbp), %xmm0 addsd -0xa0(%rbp), %xmm0 movsd -0xa8(%rbp), %xmm2 movsd -0x90(%rbp), %xmm1 mulsd %xmm2, %xmm0 addsd %xmm1, %xmm0 movsd %xmm0, -0x90(%rbp) movsd -0x98(%rbp), %xmm0 movsd %xmm0, -0x60(%rbp) movsd -0xa0(%rbp), %xmm0 movsd %xmm0, -0x68(%rbp) jmp 0xa730ef movsd -0x70(%rbp), %xmm0 movaps 0x3995d0(%rip), %xmm1 # 0xe0c7f0 pand %xmm1, %xmm0 movsd 0x3994d4(%rip), %xmm1 # 0xe0c700 ucomisd %xmm1, %xmm0 jbe 0xa73270 movsd -0x88(%rbp), %xmm0 divsd -0x70(%rbp), %xmm0 movsd 0x399271(%rip), %xmm1 # 0xe0c4b8 divsd %xmm1, %xmm0 movsd %xmm0, -0x78(%rbp) movsd -0x90(%rbp), %xmm0 divsd -0x70(%rbp), %xmm0 movsd 0x399253(%rip), %xmm1 # 0xe0c4b8 divsd %xmm1, %xmm0 movsd %xmm0, -0x80(%rbp) jmp 0xa732a0 movsd -0x78(%rbp), %xmm0 movl -0x54(%rbp), %eax decl %eax cvtsi2sd %rax, %xmm1 divsd %xmm1, %xmm0 movsd %xmm0, -0x78(%rbp) movsd -0x80(%rbp), %xmm0 movl -0x54(%rbp), %eax decl %eax cvtsi2sd %rax, %xmm1 divsd %xmm1, %xmm0 movsd %xmm0, -0x80(%rbp) movsd -0x70(%rbp), %xmm0 movaps 0x399544(%rip), %xmm1 # 0xe0c7f0 pand %xmm1, %xmm0 movsd %xmm0, -0x70(%rbp) testb $0x1, -0x49(%rbp) jne 0xa7335e movsd -0x30(%rbp), %xmm0 subsd -0x70(%rbp), %xmm0 movaps 0x399520(%rip), %xmm1 # 0xe0c7f0 pand %xmm1, %xmm0 movsd %xmm0, -0xb0(%rbp) movsd -0x30(%rbp), %xmm0 movsd -0x38(%rbp), %xmm2 movsd -0x70(%rbp), %xmm1 mulsd -0x78(%rbp), %xmm1 movq %xmm1, %rax movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 xorq %rcx, %rax movq %rax, %xmm1 mulsd %xmm2, %xmm0 addsd %xmm1, %xmm0 divsd -0xb0(%rbp), %xmm0 movsd %xmm0, -0x38(%rbp) movsd -0x30(%rbp), %xmm0 movsd -0x40(%rbp), %xmm2 movsd -0x70(%rbp), %xmm1 mulsd -0x80(%rbp), %xmm1 movq %xmm1, %rax movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 xorq %rcx, %rax movq %rax, %xmm1 mulsd %xmm2, %xmm0 addsd %xmm1, %xmm0 divsd -0xb0(%rbp), %xmm0 movsd %xmm0, -0x40(%rbp) jmp 0xa73380 movb $0x0, -0x49(%rbp) movsd -0x70(%rbp), %xmm0 movsd %xmm0, -0x30(%rbp) movsd -0x78(%rbp), %xmm0 movsd %xmm0, -0x38(%rbp) movsd -0x80(%rbp), %xmm0 movsd %xmm0, -0x40(%rbp) jmp 0xa73024 movsd -0x38(%rbp), %xmm0 movq -0x18(%rbp), %rax movsd %xmm0, (%rax) movsd -0x40(%rbp), %xmm0 movq -0x20(%rbp), %rax movsd %xmm0, (%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0xc0, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZNK11Gis_polygon11centroid_xyEPdS0_: push rbp mov rbp, rsp sub rsp, 0C0h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rdi, [rbp+var_10]; this mov [rbp+var_B8], rdi movsd xmm0, [rbp+var_30] movsd [rbp+var_30], xmm0 movsd xmm0, [rbp+var_38] movsd [rbp+var_38], xmm0 movsd xmm0, [rbp+var_40] movsd [rbp+var_40], xmm0 mov rax, [rdi+8] mov [rbp+var_48], rax mov [rbp+var_49], 1 mov rsi, [rbp+var_48]; char * mov edx, 4; unsigned __int64 call _ZNK8Geometry7no_dataEPKcm; Geometry::no_data(char const*,ulong) test al, 1 jnz short loc_A7300C mov rax, [rbp+var_48] mov eax, [rax] mov [rbp+var_24], eax cmp eax, 0 jnz short loc_A73018 loc_A7300C: mov [rbp+var_4], 1 jmp loc_A733A6 loc_A73018: mov rax, [rbp+var_48] add rax, 4 mov [rbp+var_48], rax loc_A73024: mov eax, [rbp+var_24] mov ecx, eax add ecx, 0FFFFFFFFh mov [rbp+var_24], ecx cmp eax, 0 jz loc_A73385 mov rdi, [rbp+var_B8]; this xorps xmm0, xmm0 movsd [rbp+var_70], xmm0 xorps xmm0, xmm0 movsd [rbp+var_78], xmm0 xorps xmm0, xmm0 movsd [rbp+var_80], xmm0 xorps xmm0, xmm0 movsd [rbp+var_88], xmm0 xorps xmm0, xmm0 movsd [rbp+var_90], xmm0 mov rsi, [rbp+var_48]; char * mov edx, 4; unsigned __int64 call _ZNK8Geometry7no_dataEPKcm; Geometry::no_data(char const*,ulong) test al, 1 jnz short loc_A73081 jmp short loc_A7308D loc_A73081: mov [rbp+var_4], 1 jmp loc_A733A6 loc_A7308D: mov rax, [rbp+var_48] mov eax, [rax] mov [rbp+var_50], eax mov [rbp+var_54], eax mov rax, [rbp+var_48] add rax, 4 mov [rbp+var_48], rax cmp [rbp+var_50], 0 jz short loc_A730C6 mov rdi, [rbp+var_B8]; this mov rsi, [rbp+var_48]; char * mov edx, [rbp+var_50]; unsigned int xor ecx, ecx; unsigned int call _ZNK8Geometry17not_enough_pointsEPKcjj; Geometry::not_enough_points(char const*,uint,uint) test al, 1 jnz short loc_A730C6 jmp short loc_A730D2 loc_A730C6: mov [rbp+var_4], 1 jmp loc_A733A6 loc_A730D2: mov rdx, [rbp+var_48]; char * lea rdi, [rbp+var_60]; double * lea rsi, [rbp+var_68]; double * call _ZL9get_pointPdS_PKc; get_point(double *,double *,char const*) mov rax, [rbp+var_48] add rax, 10h mov [rbp+var_48], rax loc_A730EF: mov eax, [rbp+var_50] add eax, 0FFFFFFFFh mov [rbp+var_50], eax cmp eax, 0 jz loc_A73214 mov rdx, [rbp+var_48]; char * lea rdi, [rbp+var_98]; double * lea rsi, [rbp+var_A0]; double * call _ZL9get_pointPdS_PKc; get_point(double *,double *,char const*) mov rax, [rbp+var_48] add rax, 10h mov [rbp+var_48], rax movsd xmm0, [rbp+var_60] movsd xmm2, [rbp+var_A0] movsd xmm1, [rbp+var_98] mulsd xmm1, [rbp+var_68] movq rax, xmm1 mov rcx, 8000000000000000h xor rax, rcx movq xmm1, rax mulsd xmm0, xmm2 addsd xmm0, xmm1 movsd [rbp+var_A8], xmm0 movsd xmm0, [rbp+var_A8] addsd xmm0, [rbp+var_70] movsd [rbp+var_70], xmm0 movsd xmm0, [rbp+var_98] addsd xmm0, [rbp+var_78] movsd [rbp+var_78], xmm0 movsd xmm0, [rbp+var_A0] addsd xmm0, [rbp+var_80] movsd [rbp+var_80], xmm0 movsd xmm0, [rbp+var_60] addsd xmm0, [rbp+var_98] movsd xmm2, [rbp+var_A8] movsd xmm1, [rbp+var_88] mulsd xmm0, xmm2 addsd xmm0, xmm1 movsd [rbp+var_88], xmm0 movsd xmm0, [rbp+var_68] addsd xmm0, [rbp+var_A0] movsd xmm2, [rbp+var_A8] movsd xmm1, [rbp+var_90] mulsd xmm0, xmm2 addsd xmm0, xmm1 movsd [rbp+var_90], xmm0 movsd xmm0, [rbp+var_98] movsd [rbp+var_60], xmm0 movsd xmm0, [rbp+var_A0] movsd [rbp+var_68], xmm0 jmp loc_A730EF loc_A73214: movsd xmm0, [rbp+var_70] movaps xmm1, cs:xmmword_E0C7F0 pand xmm0, xmm1 movsd xmm1, cs:qword_E0C700 ucomisd xmm0, xmm1 jbe short loc_A73270 movsd xmm0, [rbp+var_88] divsd xmm0, [rbp+var_70] movsd xmm1, cs:qword_E0C4B8 divsd xmm0, xmm1 movsd [rbp+var_78], xmm0 movsd xmm0, [rbp+var_90] divsd xmm0, [rbp+var_70] movsd xmm1, cs:qword_E0C4B8 divsd xmm0, xmm1 movsd [rbp+var_80], xmm0 jmp short loc_A732A0 loc_A73270: movsd xmm0, [rbp+var_78] mov eax, [rbp+var_54] dec eax cvtsi2sd xmm1, rax divsd xmm0, xmm1 movsd [rbp+var_78], xmm0 movsd xmm0, [rbp+var_80] mov eax, [rbp+var_54] dec eax cvtsi2sd xmm1, rax divsd xmm0, xmm1 movsd [rbp+var_80], xmm0 loc_A732A0: movsd xmm0, [rbp+var_70] movaps xmm1, cs:xmmword_E0C7F0 pand xmm0, xmm1 movsd [rbp+var_70], xmm0 test [rbp+var_49], 1 jnz loc_A7335E movsd xmm0, [rbp+var_30] subsd xmm0, [rbp+var_70] movaps xmm1, cs:xmmword_E0C7F0 pand xmm0, xmm1 movsd [rbp+var_B0], xmm0 movsd xmm0, [rbp+var_30] movsd xmm2, [rbp+var_38] movsd xmm1, [rbp+var_70] mulsd xmm1, [rbp+var_78] movq rax, xmm1 mov rcx, 8000000000000000h xor rax, rcx movq xmm1, rax mulsd xmm0, xmm2 addsd xmm0, xmm1 divsd xmm0, [rbp+var_B0] movsd [rbp+var_38], xmm0 movsd xmm0, [rbp+var_30] movsd xmm2, [rbp+var_40] movsd xmm1, [rbp+var_70] mulsd xmm1, [rbp+var_80] movq rax, xmm1 mov rcx, 8000000000000000h xor rax, rcx movq xmm1, rax mulsd xmm0, xmm2 addsd xmm0, xmm1 divsd xmm0, [rbp+var_B0] movsd [rbp+var_40], xmm0 jmp short loc_A73380 loc_A7335E: mov [rbp+var_49], 0 movsd xmm0, [rbp+var_70] movsd [rbp+var_30], xmm0 movsd xmm0, [rbp+var_78] movsd [rbp+var_38], xmm0 movsd xmm0, [rbp+var_80] movsd [rbp+var_40], xmm0 loc_A73380: jmp loc_A73024 loc_A73385: movsd xmm0, [rbp+var_38] mov rax, [rbp+var_18] movsd qword ptr [rax], xmm0 movsd xmm0, [rbp+var_40] mov rax, [rbp+var_20] movsd qword ptr [rax], xmm0 mov [rbp+var_4], 0 loc_A733A6: mov eax, [rbp+var_4] add rsp, 0C0h pop rbp retn
long long Gis_polygon::centroid_xy(char **this, double *a2, double *a3) { __m128i v4; // xmm0 double v6; // [rsp+10h] [rbp-B0h] __int128 v7; // [rsp+20h] [rbp-A0h] BYREF double v8; // [rsp+30h] [rbp-90h] double v9; // [rsp+38h] [rbp-88h] __int128 v10; // [rsp+40h] [rbp-80h] double v11; // [rsp+50h] [rbp-70h] __int128 v12; // [rsp+58h] [rbp-68h] BYREF unsigned int v13; // [rsp+6Ch] [rbp-54h] unsigned int v14; // [rsp+70h] [rbp-50h] char v15; // [rsp+77h] [rbp-49h] char *v16; // [rsp+78h] [rbp-48h] __int128 v17; // [rsp+80h] [rbp-40h] double v18; // [rsp+90h] [rbp-30h] unsigned int v19; // [rsp+9Ch] [rbp-24h] double *v20; // [rsp+A0h] [rbp-20h] double *v21; // [rsp+A8h] [rbp-18h] Geometry *v22; // [rsp+B0h] [rbp-10h] v22 = (Geometry *)this; v21 = a2; v20 = a3; v16 = this[1]; v15 = 1; if ( !Geometry::no_data((Geometry *)this, v16, 4LL) && (v19 = *(_DWORD *)v16) != 0 ) { v16 += 4; while ( v19-- ) { v11 = 0.0; v10 = 0uLL; v9 = 0.0; v8 = 0.0; if ( Geometry::no_data((Geometry *)this, v16, 4LL) ) return 1; v14 = *(_DWORD *)v16; v13 = v14; v16 += 4; if ( !v14 || (Geometry::not_enough_points((Geometry *)this, v16, v14, 0) & 1) != 0 ) return 1; get_point((double *)&v12 + 1, (double *)&v12, (double *)v16); v16 += 16; while ( --v14 ) { get_point((double *)&v7 + 1, (double *)&v7, (double *)v16); v16 += 16; v11 = *((double *)&v12 + 1) * *(double *)&v7 - *((double *)&v7 + 1) * *(double *)&v12 + v11; *((double *)&v10 + 1) = *((double *)&v7 + 1) + *((double *)&v10 + 1); *(double *)&v10 = *(double *)&v7 + *(double *)&v10; v9 = (*((double *)&v12 + 1) + *((double *)&v7 + 1)) * (*((double *)&v12 + 1) * *(double *)&v7 - *((double *)&v7 + 1) * *(double *)&v12) + v9; v8 = (*(double *)&v12 + *(double *)&v7) * (*((double *)&v12 + 1) * *(double *)&v7 - *((double *)&v7 + 1) * *(double *)&v12) + v8; v12 = v7; } if ( *(double *)_mm_and_si128((__m128i)*(unsigned long long *)&v11, (__m128i)xmmword_E0C7F0).m128i_i64 <= 1.0e-10 ) { *((double *)&v10 + 1) = *((double *)&v10 + 1) / (double)(int)(v13 - 1); *(double *)&v10 = *(double *)&v10 / (double)(int)(v13 - 1); } else { *((double *)&v10 + 1) = v9 / v11 / 3.0; *(double *)&v10 = v8 / v11 / 3.0; } *(_QWORD *)&v11 = _mm_and_si128((__m128i)*(unsigned long long *)&v11, (__m128i)xmmword_E0C7F0).m128i_u64[0]; if ( (v15 & 1) != 0 ) { v15 = 0; v18 = v11; v17 = v10; } else { v4 = (__m128i)*(unsigned long long *)&v18; *(double *)v4.m128i_i64 = v18 - v11; v6 = *(double *)_mm_and_si128(v4, (__m128i)xmmword_E0C7F0).m128i_i64; *((double *)&v17 + 1) = (v18 * *((double *)&v17 + 1) - v11 * *((double *)&v10 + 1)) / v6; *(double *)&v17 = (v18 * *(double *)&v17 - v11 * *(double *)&v10) / v6; } } *(_OWORD *)v20 = v17; return 0; } else { return 1; } }
Item_func_additive_op: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RDI MOV RSI,qword ptr [RBP + -0x10] CALL 0x00a72fe0 MOV RAX,qword ptr [RBP + -0x18] LEA RCX,[0x1433ac0] ADD RCX,0x10 MOV qword ptr [RAX],RCX ADD RSP,0x20 POP RBP RET
/* Item_func_additive_op::Item_func_additive_op(Item_func_additive_op const&) */ void __thiscall Item_func_additive_op::Item_func_additive_op (Item_func_additive_op *this,Item_func_additive_op *param_1) { Item_num_op::Item_num_op((Item_num_op *)this,(Item_num_op *)param_1); *(int ***)this = &PTR__Item_func_additive_op_01433ad0; return; }
28,787
set_links(hash_lex_struct*, int)
eloqsql/sql/gen_lex_hash.cc
void set_links(hash_lex_struct *st, int len) { hash_lex_struct *cur, *end= st+len; for (cur= st; cur<end; cur++) { if (cur->first_char != 0 && cur->first_char != -1) { int ilink= cur->char_tails->ithis; hash_map[cur->ithis*4+2]= ilink%256; hash_map[cur->ithis*4+3]= ilink/256; set_links(cur->char_tails,cur->last_char-cur->first_char+1); } } }
O3
cpp
set_links(hash_lex_struct*, int): testl %esi, %esi jle 0xab6e pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdi, %rbx movslq %esi, %rax leaq (%rax,%rax,2), %rax leaq (%rdi,%rax,8), %r14 movl (%rbx), %eax incl %eax cmpl $0x2, %eax jb 0xab61 movq 0x8(%rbx), %rax movl 0x10(%rax), %eax movq 0x8b0a(%rip), %rcx # 0x13638 movslq 0x10(%rbx), %rdx movb %al, 0x2(%rcx,%rdx,4) leal 0xff(%rax), %ecx testl %eax, %eax cmovnsl %eax, %ecx movq 0x8af0(%rip), %rax # 0x13638 movslq 0x10(%rbx), %rdx movb %ch, 0x3(%rax,%rdx,4) movq 0x8(%rbx), %rdi movsbl 0x4(%rbx), %esi subl (%rbx), %esi incl %esi callq 0xaafe addq $0x18, %rbx cmpq %r14, %rbx jb 0xab17 popq %rbx popq %r14 popq %rbp retq
_Z9set_linksP15hash_lex_structi: test esi, esi jle short locret_AB6E push rbp mov rbp, rsp push r14 push rbx mov rbx, rdi movsxd rax, esi lea rax, [rax+rax*2] lea r14, [rdi+rax*8] loc_AB17: mov eax, [rbx] inc eax cmp eax, 2 jb short loc_AB61 mov rax, [rbx+8] mov eax, [rax+10h] mov rcx, cs:hash_map movsxd rdx, dword ptr [rbx+10h] mov [rcx+rdx*4+2], al lea ecx, [rax+0FFh] test eax, eax cmovns ecx, eax mov rax, cs:hash_map movsxd rdx, dword ptr [rbx+10h] mov [rax+rdx*4+3], ch mov rdi, [rbx+8] movsx esi, byte ptr [rbx+4] sub esi, [rbx] inc esi call _Z9set_linksP15hash_lex_structi; set_links(hash_lex_struct *,int) loc_AB61: add rbx, 18h cmp rbx, r14 jb short loc_AB17 pop rbx pop r14 pop rbp locret_AB6E: retn
void set_links(unsigned long long a1, int a2) { unsigned long long v2; // rbx int v3; // eax __int16 v4; // cx if ( a2 > 0 ) { v2 = a1; do { if ( (unsigned int)(*(_DWORD *)v2 + 1) >= 2 ) { v3 = *(_DWORD *)(*(_QWORD *)(v2 + 8) + 16LL); *(_BYTE *)(hash_map + 4LL * *(int *)(v2 + 16) + 2) = v3; v4 = v3 + 255; if ( v3 >= 0 ) HIBYTE(v4) = BYTE1(v3); *(_BYTE *)(hash_map + 4LL * *(int *)(v2 + 16) + 3) = HIBYTE(v4); set_links(*(_QWORD *)(v2 + 8), (unsigned int)(*(char *)(v2 + 4) - *(_DWORD *)v2 + 1)); } v2 += 24LL; } while ( v2 < a1 + 24LL * a2 ); } }
set_links: TEST ESI,ESI JLE 0x0010ab6e PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RDI MOVSXD RAX,ESI LEA RAX,[RAX + RAX*0x2] LEA R14,[RDI + RAX*0x8] LAB_0010ab17: MOV EAX,dword ptr [RBX] INC EAX CMP EAX,0x2 JC 0x0010ab61 MOV RAX,qword ptr [RBX + 0x8] MOV EAX,dword ptr [RAX + 0x10] MOV RCX,qword ptr [0x00113638] MOVSXD RDX,dword ptr [RBX + 0x10] MOV byte ptr [RCX + RDX*0x4 + 0x2],AL LEA ECX,[RAX + 0xff] TEST EAX,EAX CMOVNS ECX,EAX MOV RAX,qword ptr [0x00113638] MOVSXD RDX,dword ptr [RBX + 0x10] MOV byte ptr [RAX + RDX*0x4 + 0x3],CH MOV RDI,qword ptr [RBX + 0x8] MOVSX ESI,byte ptr [RBX + 0x4] SUB ESI,dword ptr [RBX] INC ESI CALL 0x0010aafe LAB_0010ab61: ADD RBX,0x18 CMP RBX,R14 JC 0x0010ab17 POP RBX POP R14 POP RBP LAB_0010ab6e: RET
/* set_links(hash_lex_struct*, int) */ void set_links(hash_lex_struct *param_1,int param_2) { hash_lex_struct *phVar1; int iVar2; int1 uVar3; if (0 < param_2) { phVar1 = param_1 + (long)param_2 * 0x18; do { if (1 < *(int *)param_1 + 1U) { iVar2 = *(int *)(*(long *)(param_1 + 8) + 0x10); *(char *)(hash_map + 2 + (long)*(int *)(param_1 + 0x10) * 4) = (char)iVar2; uVar3 = (int1)((uint)(iVar2 + 0xff) >> 8); if (-1 < iVar2) { uVar3 = (int1)((uint)iVar2 >> 8); } *(int1 *)(hash_map + 3 + (long)*(int *)(param_1 + 0x10) * 4) = uVar3; set_links(*(hash_lex_struct **)(param_1 + 8),((int)(char)param_1[4] - *(int *)param_1) + 1); } param_1 = param_1 + 0x18; } while (param_1 < phVar1); } return; }
28,788
write_hook_for_undo_bulk_insert
eloqsql/storage/maria/ma_blockrec.c
my_bool write_hook_for_undo_bulk_insert(enum translog_record_type type __attribute__ ((unused)), TRN *trn, MARIA_HA *tbl_info, LSN *lsn, void *hook_arg) { /* We are going to call maria_delete_all_rows(), but without logging and syncing, as an optimization (if we crash before commit, the UNDO will empty; if we crash after commit, we have flushed and forced the files). Status still needs to be reset under log mutex, in case of a concurrent checkpoint. */ _ma_reset_status(tbl_info); return write_hook_for_undo(type, trn, tbl_info, lsn, hook_arg); }
O0
c
write_hook_for_undo_bulk_insert: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x18(%rbp), %rdi callq 0x72890 movl -0x4(%rbp), %edi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx movq -0x28(%rbp), %r8 callq 0x55d90 addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
write_hook_for_undo_bulk_insert: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rdi, [rbp+var_18] call _ma_reset_status mov edi, [rbp+var_4] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] mov r8, [rbp+var_28] call write_hook_for_undo add rsp, 30h pop rbp retn
long long write_hook_for_undo_bulk_insert(unsigned int a1, long long a2, long long a3, _QWORD *a4) { ma_reset_status(a3); return write_hook_for_undo(a1, a2, a3, a4); }
write_hook_for_undo_bulk_insert: 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 qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RDI,qword ptr [RBP + -0x18] CALL 0x00172890 MOV EDI,dword ptr [RBP + -0x4] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x28] CALL 0x00155d90 ADD RSP,0x30 POP RBP RET
void write_hook_for_undo_bulk_insert (int4 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5) { _ma_reset_status(param_3); write_hook_for_undo(param_1,param_2,param_3,param_4,param_5); return; }
28,789
lf_dynarray_value
eloqsql/mysys/lf_dynarray.c
void *lf_dynarray_value(LF_DYNARRAY *array, uint idx) { void * ptr, * volatile * ptr_ptr= 0; int i; for (i= LF_DYNARRAY_LEVELS-1; idx < dynarray_idxes_in_prev_levels[i]; i--) /* no-op */; ptr_ptr= &array->level[i]; idx-= dynarray_idxes_in_prev_levels[i]; for (; i > 0; i--) { if (!(ptr= *ptr_ptr)) return(NULL); ptr_ptr= ((void **)ptr) + idx / dynarray_idxes_in_prev_level[i]; idx %= dynarray_idxes_in_prev_level[i]; } if (!(ptr= *ptr_ptr)) return(NULL); return ((uchar*)ptr) + array->size_of_element * idx; }
O3
c
lf_dynarray_value: pushq %rbp movq %rsp, %rbp movl %esi, %edx movl %esi, %r8d leaq 0x20(%rdi), %rax movl $0x5, %esi movl $0x4, %ecx leaq 0x3b0ba(%rip), %r9 # 0xe0d20 movq -0x8(%r9,%rcx,8), %r10 decl %esi decq %rcx addq $-0x8, %rax cmpq %r8, %r10 ja 0xa5c66 subl %r10d, %edx testq %rcx, %rcx jle 0xa5cb1 leal -0x1(%rsi), %ecx movl %ecx, %ecx leaq 0x3b0b3(%rip), %r8 # 0xe0d40 leaq (%r8,%rcx,8), %r8 xorl %ecx, %ecx movq (%rax), %r9 testq %r9, %r9 je 0xa5cc4 movl %edx, %eax xorl %edx, %edx divq (%r8) leaq (%r9,%rax,8), %rax decl %esi addq $-0x8, %r8 cmpl $0x1, %esi jg 0xa5c93 movq (%rax), %rcx testq %rcx, %rcx je 0xa5cc2 imull 0x20(%rdi), %edx addq %rdx, %rcx jmp 0xa5cc4 xorl %ecx, %ecx movq %rcx, %rax popq %rbp retq
lf_dynarray_value: push rbp mov rbp, rsp mov edx, esi mov r8d, esi lea rax, [rdi+20h] mov esi, 5 mov ecx, 4 lea r9, dynarray_idxes_in_prev_levels loc_A5C66: mov r10, [r9+rcx*8-8] dec esi dec rcx add rax, 0FFFFFFFFFFFFFFF8h cmp r10, r8 ja short loc_A5C66 sub edx, r10d test rcx, rcx jle short loc_A5CB1 lea ecx, [rsi-1] mov ecx, ecx lea r8, dynarray_idxes_in_prev_level lea r8, [r8+rcx*8] xor ecx, ecx loc_A5C93: mov r9, [rax] test r9, r9 jz short loc_A5CC4 mov eax, edx xor edx, edx div qword ptr [r8] lea rax, [r9+rax*8] dec esi add r8, 0FFFFFFFFFFFFFFF8h cmp esi, 1 jg short loc_A5C93 loc_A5CB1: mov rcx, [rax] test rcx, rcx jz short loc_A5CC2 imul edx, [rdi+20h] add rcx, rdx jmp short loc_A5CC4 loc_A5CC2: xor ecx, ecx loc_A5CC4: mov rax, rcx pop rbp retn
long long lf_dynarray_value(long long a1, unsigned int a2) { unsigned long long v3; // r8 _QWORD *v4; // rax int v5; // esi long long v6; // rcx unsigned long long v7; // r10 unsigned long long v8; // rdx _QWORD *v9; // r8 long long v10; // rcx unsigned long long v11; // rtt v3 = a2; v4 = (_QWORD *)(a1 + 32); v5 = 5; v6 = 4LL; do { v7 = dynarray_idxes_in_prev_levels[v6 - 1]; --v5; --v6; --v4; } while ( v7 > v3 ); LODWORD(v8) = a2 - v7; if ( v6 <= 0 ) { LABEL_7: if ( *v4 ) return (unsigned int)(*(_DWORD *)(a1 + 32) * v8) + *v4; else return 0LL; } else { v9 = (_QWORD *)((char *)&dynarray_idxes_in_prev_level + 8 * (unsigned int)(v5 - 1)); v10 = 0LL; while ( *v4 ) { v11 = (unsigned int)v8; v8 = (unsigned long long)(unsigned int)v8 % *v9; v4 = (_QWORD *)(*v4 + 8 * (v11 / *v9)); --v5; --v9; if ( v5 <= 1 ) goto LABEL_7; } } return v10; }
lf_dynarray_value: PUSH RBP MOV RBP,RSP MOV EDX,ESI MOV R8D,ESI LEA RAX,[RDI + 0x20] MOV ESI,0x5 MOV ECX,0x4 LEA R9,[0x1e0d20] LAB_001a5c66: MOV R10,qword ptr [R9 + RCX*0x8 + -0x8] DEC ESI DEC RCX ADD RAX,-0x8 CMP R10,R8 JA 0x001a5c66 SUB EDX,R10D TEST RCX,RCX JLE 0x001a5cb1 LEA ECX,[RSI + -0x1] MOV ECX,ECX LEA R8,[0x1e0d40] LEA R8,[R8 + RCX*0x8] XOR ECX,ECX LAB_001a5c93: MOV R9,qword ptr [RAX] TEST R9,R9 JZ 0x001a5cc4 MOV EAX,EDX XOR EDX,EDX DIV qword ptr [R8] LEA RAX,[R9 + RAX*0x8] DEC ESI ADD R8,-0x8 CMP ESI,0x1 JG 0x001a5c93 LAB_001a5cb1: MOV RCX,qword ptr [RAX] TEST RCX,RCX JZ 0x001a5cc2 IMUL EDX,dword ptr [RDI + 0x20] ADD RCX,RDX JMP 0x001a5cc4 LAB_001a5cc2: XOR ECX,ECX LAB_001a5cc4: MOV RAX,RCX POP RBP RET
long lf_dynarray_value(long param_1,uint param_2) { long lVar1; int1 auVar2 [16]; int1 auVar3 [16]; ulong uVar4; long *plVar5; long lVar6; ulong uVar7; int iVar8; int iVar9; ulong *puVar10; plVar5 = (long *)(param_1 + 0x20); lVar6 = 4; iVar9 = 5; do { iVar8 = iVar9; lVar1 = lVar6 * 8; iVar9 = iVar8 + -1; lVar6 = lVar6 + -1; plVar5 = plVar5 + -1; } while ((ulong)param_2 < *(ulong *)(write_pin_change_table + lVar1 + 0x18)); param_2 = param_2 - (int)*(ulong *)(write_pin_change_table + lVar1 + 0x18); uVar7 = (ulong)param_2; if (0 < lVar6) { puVar10 = (ulong *)(dynarray_idxes_in_prev_level + (ulong)(iVar8 - 2) * 8); do { if (*plVar5 == 0) { return 0; } uVar4 = uVar7 & 0xffffffff; auVar2._8_8_ = 0; auVar2._0_8_ = *puVar10; auVar3._8_8_ = 0; auVar3._0_8_ = uVar4; uVar7 = SUB168(auVar3 % auVar2,0); param_2 = SUB164(auVar3 % auVar2,0); plVar5 = (long *)(*plVar5 + (uVar4 / *puVar10) * 8); iVar9 = iVar9 + -1; puVar10 = puVar10 + -1; } while (1 < iVar9); } if (*plVar5 == 0) { lVar6 = 0; } else { lVar6 = *plVar5 + (ulong)(param_2 * *(int *)(param_1 + 0x20)); } return lVar6; }
28,790
pfs_unlock_rwlock_v1
eloqsql/storage/perfschema/pfs.cc
void pfs_unlock_rwlock_v1(PSI_rwlock *rwlock) { PFS_rwlock *pfs_rwlock= reinterpret_cast<PFS_rwlock*> (rwlock); assert(pfs_rwlock != NULL); assert(pfs_rwlock == sanitize_rwlock(pfs_rwlock)); assert(pfs_rwlock->m_class != NULL); assert(pfs_rwlock->m_lock.is_populated()); bool last_writer= false; bool last_reader= false; /* Note that this code is still protected by the instrumented rwlock, and therefore is: - thread safe for write locks - almost thread safe for read locks (pfs_rwlock->m_readers is unsafe). See inline_mysql_rwlock_unlock() */ /* Always update the instrumented state */ if (pfs_rwlock->m_writer != NULL) { /* Nominal case, a writer is unlocking. */ last_writer= true; pfs_rwlock->m_writer= NULL; /* Reset the readers stats, they could be off */ pfs_rwlock->m_readers= 0; } else if (likely(pfs_rwlock->m_readers > 0)) { /* Nominal case, a reader is unlocking. */ if (--(pfs_rwlock->m_readers) == 0) last_reader= true; } else { /* Edge case, we have no writer and no readers, on an unlock event. This is possible for: - partial instrumentation - instrumentation disabled at runtime, see when get_thread_rwlock_locker_v1() returns NULL No further action is taken here, the next write lock will put the statistics is a valid state. */ } #ifdef LATER_WL2333 /* See WL#2333: SHOW ENGINE ... LOCK STATUS. */ if (! pfs_rwlock->m_enabled) return; if (! pfs_rwlock->m_timed) return; ulonglong locked_time; if (last_writer) { locked_time= get_timer_pico_value(wait_timer) - pfs_rwlock->m_last_written; pfs_rwlock->m_rwlock_stat.m_write_lock_stat.aggregate_value(locked_time); } else if (last_reader) { locked_time= get_timer_pico_value(wait_timer) - pfs_rwlock->m_last_read; pfs_rwlock->m_rwlock_stat.m_read_lock_stat.aggregate_value(locked_time); } #else (void) last_reader; (void) last_writer; #endif }
O3
cpp
pfs_unlock_rwlock_v1: pushq %rbp movq %rsp, %rbp cmpq $0x0, 0x40(%rdi) je 0x296e2 andq $0x0, 0x40(%rdi) andl $0x0, 0x48(%rdi) jmp 0x296ee movl 0x48(%rdi), %eax testl %eax, %eax je 0x296ee decl %eax movl %eax, 0x48(%rdi) popq %rbp retq
pfs_unlock_rwlock_v1: push rbp mov rbp, rsp cmp qword ptr [rdi+40h], 0 jz short loc_296E2 and qword ptr [rdi+40h], 0 and dword ptr [rdi+48h], 0 jmp short loc_296EE loc_296E2: mov eax, [rdi+48h] test eax, eax jz short loc_296EE dec eax mov [rdi+48h], eax loc_296EE: pop rbp retn
void pfs_unlock_rwlock_v1(long long a1) { int v1; // eax if ( *(_QWORD *)(a1 + 64) ) { *(_QWORD *)(a1 + 64) = 0LL; *(_DWORD *)(a1 + 72) = 0; } else { v1 = *(_DWORD *)(a1 + 72); if ( v1 ) *(_DWORD *)(a1 + 72) = v1 - 1; } }
pfs_unlock_rwlock_v1: PUSH RBP MOV RBP,RSP CMP qword ptr [RDI + 0x40],0x0 JZ 0x001296e2 AND qword ptr [RDI + 0x40],0x0 AND dword ptr [RDI + 0x48],0x0 JMP 0x001296ee LAB_001296e2: MOV EAX,dword ptr [RDI + 0x48] TEST EAX,EAX JZ 0x001296ee DEC EAX MOV dword ptr [RDI + 0x48],EAX LAB_001296ee: POP RBP RET
void pfs_unlock_rwlock_v1(long param_1) { if (*(long *)(param_1 + 0x40) == 0) { if (*(int *)(param_1 + 0x48) != 0) { *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + -1; } } else { *(int8 *)(param_1 + 0x40) = 0; *(int4 *)(param_1 + 0x48) = 0; } return; }
28,791
my_strxfrm_flag_normalize
eloqsql/strings/ctype-simple.c
uint my_strxfrm_flag_normalize(uint flags, uint maximum) { DBUG_ASSERT(maximum >= 1 && maximum <= MY_STRXFRM_NLEVELS); /* If levels are omitted, then 1-maximum is assumed*/ if (!(flags & MY_STRXFRM_LEVEL_ALL)) { static uint def_level_flags[]= {0, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F }; uint flag_pad= flags & (MY_STRXFRM_PAD_WITH_SPACE | MY_STRXFRM_PAD_TO_MAXLEN); flags= def_level_flags[maximum] | flag_pad; } else { uint i; uint flag_lev= flags & MY_STRXFRM_LEVEL_ALL; uint flag_dsc= (flags >> MY_STRXFRM_DESC_SHIFT) & MY_STRXFRM_LEVEL_ALL; uint flag_rev= (flags >> MY_STRXFRM_REVERSE_SHIFT) & MY_STRXFRM_LEVEL_ALL; uint flag_pad= flags & (MY_STRXFRM_PAD_WITH_SPACE | MY_STRXFRM_PAD_TO_MAXLEN); /* If any level number is greater than the maximum, it is treated as the maximum. */ for (maximum--, flags= 0, i= 0; i < MY_STRXFRM_NLEVELS; i++) { uint src_bit= 1 << i; if (flag_lev & src_bit) { uint dst_bit= 1 << MY_MIN(i, maximum); flags|= dst_bit; flags|= (flag_dsc & dst_bit) << MY_STRXFRM_DESC_SHIFT; flags|= (flag_rev & dst_bit) << MY_STRXFRM_REVERSE_SHIFT; } } flags|= flag_pad; } return flags; }
O3
c
my_strxfrm_flag_normalize: movl %edi, %eax movl %edi, %edx andl $0x3f, %edx je 0xb6184 pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx decl %esi movl %eax, %r8d andl $0x3f00, %r8d # imm = 0x3F00 movl %eax, %r9d andl $0x3f0000, %r9d # imm = 0x3F0000 xorl %edi, %edi xorl %r10d, %r10d btl %r10d, %edx jae 0xb616f cmpl %esi, %r10d movl %esi, %ecx cmovbl %r10d, %ecx movl $0x1, %r11d shll %cl, %r11d movl $0x100, %ebx # imm = 0x100 shll %cl, %ebx andl %r8d, %ebx movl $0x10000, %r14d # imm = 0x10000 shll %cl, %r14d addl %r11d, %ebx andl %r9d, %r14d addl %ebx, %r14d orl %r14d, %edi incl %r10d cmpl $0x6, %r10d jne 0xb6138 andl $0xc0, %eax orl %edi, %eax popq %rbx popq %r14 popq %rbp retq andl $0xc0, %eax movl %esi, %ecx leaq 0x16fabe(%rip), %rdx # 0x225c50 orl (%rdx,%rcx,4), %eax retq
my_strxfrm_flag_normalize: mov eax, edi mov edx, edi and edx, 3Fh jz short loc_B6184 push rbp mov rbp, rsp push r14 push rbx dec esi mov r8d, eax and r8d, 3F00h mov r9d, eax and r9d, 3F0000h xor edi, edi xor r10d, r10d loc_B6138: bt edx, r10d jnb short loc_B616F cmp r10d, esi mov ecx, esi cmovb ecx, r10d mov r11d, 1 shl r11d, cl mov ebx, 100h shl ebx, cl and ebx, r8d mov r14d, offset stru_10000 shl r14d, cl add ebx, r11d and r14d, r9d add r14d, ebx or edi, r14d loc_B616F: inc r10d cmp r10d, 6 jnz short loc_B6138 and eax, 0C0h or eax, edi pop rbx pop r14 pop rbp retn loc_B6184: and eax, 0C0h mov ecx, esi lea rdx, my_strxfrm_flag_normalize_def_level_flags or eax, [rdx+rcx*4] retn
long long my_strxfrm_flag_normalize(int a1, int a2) { int v3; // edx unsigned int v4; // esi int v5; // r8d int v6; // edi unsigned int i; // r10d char v8; // cl v3 = a1 & 0x3F; if ( (a1 & 0x3F) == 0 ) return my_strxfrm_flag_normalize_def_level_flags[a2] | a1 & 0xC0u; v4 = a2 - 1; v5 = a1 & 0x3F00; v6 = 0; for ( i = 0; i != 6; ++i ) { if ( _bittest(&v3, i) ) { v8 = v4; if ( i < v4 ) v8 = i; v6 |= (1 << v8) + (v5 & (256 << v8)) + (a1 & 0x3F0000 & ((_DWORD)&stru_10000 << v8)); } } return v6 | a1 & 0xC0u; }
my_strxfrm_flag_normalize: MOV EAX,EDI MOV EDX,EDI AND EDX,0x3f JZ 0x001b6184 PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX DEC ESI MOV R8D,EAX AND R8D,0x3f00 MOV R9D,EAX AND R9D,0x3f0000 XOR EDI,EDI XOR R10D,R10D LAB_001b6138: BT EDX,R10D JNC 0x001b616f CMP R10D,ESI MOV ECX,ESI CMOVC ECX,R10D MOV R11D,0x1 SHL R11D,CL MOV EBX,0x100 SHL EBX,CL AND EBX,R8D MOV R14D,0x10000 SHL R14D,CL ADD EBX,R11D AND R14D,R9D ADD R14D,EBX OR EDI,R14D LAB_001b616f: INC R10D CMP R10D,0x6 JNZ 0x001b6138 AND EAX,0xc0 OR EAX,EDI POP RBX POP R14 POP RBP RET LAB_001b6184: AND EAX,0xc0 MOV ECX,ESI LEA RDX,[0x325c50] OR EAX,dword ptr [RDX + RCX*0x4] RET
uint my_strxfrm_flag_normalize(uint param_1,uint param_2) { uint uVar1; byte bVar2; uint uVar3; uint uVar4; if ((param_1 & 0x3f) != 0) { uVar3 = 0; uVar4 = 0; do { if (((param_1 & 0x3f) >> (uVar4 & 0x1f) & 1) != 0) { uVar1 = param_2 - 1; if (uVar4 < param_2 - 1) { uVar1 = uVar4; } bVar2 = (byte)uVar1; uVar3 = uVar3 | (0x10000 << (bVar2 & 0x1f) & param_1 & 0x3f0000) + (0x100 << (bVar2 & 0x1f) & param_1 & 0x3f00) + (1 << (bVar2 & 0x1f)); } uVar4 = uVar4 + 1; } while (uVar4 != 6); return param_1 & 0xc0 | uVar3; } return param_1 & 0xc0 | *(uint *)(my_strxfrm_flag_normalize_def_level_flags + (ulong)param_2 * 4); }
28,792
ma_log_rt_split
eloqsql/storage/maria/ma_rt_split.c
static my_bool _ma_log_rt_split(MARIA_PAGE *page, const uchar *key_with_nod_flag, uint full_length, const uchar *log_internal_copy, uint log_internal_copy_length, const uchar *log_key_copy, uint length_diff) { MARIA_HA *info= page->info; MARIA_SHARE *share= info->s; LSN lsn; uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE + 1 + 2 + 1 + 2 + 2 + 7], *log_pos; LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 6]; uint translog_parts, extra_length= 0; my_off_t page_pos; DBUG_ENTER("_ma_log_rt_split"); DBUG_PRINT("enter", ("page: %p", page)); DBUG_ASSERT(share->now_transactional); page_pos= page->pos / share->block_size; page_store(log_data + FILEID_STORE_SIZE, page_pos); log_pos= log_data+ FILEID_STORE_SIZE + PAGE_STORE_SIZE; log_pos[0]= KEY_OP_DEL_SUFFIX; log_pos++; DBUG_ASSERT((int)length_diff > 0); int2store(log_pos, length_diff); log_pos+= 2; log_pos[0]= KEY_OP_MULTI_COPY; log_pos++; int2store(log_pos, full_length); log_pos+= 2; int2store(log_pos, log_internal_copy_length); log_pos+= 2; log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data; log_array[TRANSLOG_INTERNAL_PARTS + 0].length= sizeof(log_data) - 7; log_array[TRANSLOG_INTERNAL_PARTS + 1].str= log_internal_copy; log_array[TRANSLOG_INTERNAL_PARTS + 1].length= log_internal_copy_length; translog_parts= 2; if (log_key_copy != NULL) /* need to store key into record */ { log_array[TRANSLOG_INTERNAL_PARTS + 2].str= log_key_copy; log_array[TRANSLOG_INTERNAL_PARTS + 2].length= 1 + 2 + 1 + 2; log_array[TRANSLOG_INTERNAL_PARTS + 3].str= key_with_nod_flag; log_array[TRANSLOG_INTERNAL_PARTS + 3].length= full_length; extra_length= 1 + 2 + 1 + 2 + full_length; translog_parts+= 2; } _ma_log_key_changes(page, log_array + TRANSLOG_INTERNAL_PARTS + translog_parts, log_pos, &extra_length, &translog_parts); /* Remember new page length for future log entires for same page */ page->org_size= page->size; if (translog_write_record(&lsn, LOGREC_REDO_INDEX, info->trn, info, (translog_size_t) ((log_pos - log_data) + log_internal_copy_length + extra_length), TRANSLOG_INTERNAL_PARTS + translog_parts, log_array, log_data, NULL)) DBUG_RETURN(1); DBUG_RETURN(0); }
O0
c
ma_log_rt_split: pushq %rbp movq %rsp, %rbp subq $0x150, %rsp # imm = 0x150 movl 0x10(%rbp), %eax movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x30(%rbp) movq %rsi, -0x38(%rbp) movl %edx, -0x3c(%rbp) movq %rcx, -0x48(%rbp) movl %r8d, -0x4c(%rbp) movq %r9, -0x58(%rbp) movq -0x30(%rbp), %rax movq (%rax), %rax movq %rax, -0x60(%rbp) movq -0x60(%rbp), %rax movq (%rax), %rax movq %rax, -0x68(%rbp) movl $0x0, -0x108(%rbp) jmp 0x88444 jmp 0x88446 jmp 0x88448 movq -0x30(%rbp), %rax movq 0x18(%rax), %rax movq -0x68(%rbp), %rcx movl 0x7bc(%rcx), %ecx xorl %edx, %edx divq %rcx movq %rax, -0x110(%rbp) leaq -0x20(%rbp), %rax addq $0x2, %rax movq %rax, -0x118(%rbp) movq -0x110(%rbp), %rax movl %eax, %ecx movq -0x118(%rbp), %rax movl %ecx, (%rax) movq -0x110(%rbp), %rax shrq $0x20, %rax movb %al, %cl movq -0x118(%rbp), %rax movb %cl, 0x4(%rax) leaq -0x20(%rbp), %rax addq $0x2, %rax addq $0x5, %rax movq %rax, -0x78(%rbp) movq -0x78(%rbp), %rax movb $0x7, (%rax) movq -0x78(%rbp), %rax addq $0x1, %rax movq %rax, -0x78(%rbp) jmp 0x884c3 jmp 0x884c5 movq -0x78(%rbp), %rax movq %rax, -0x120(%rbp) movl 0x10(%rbp), %eax movw %ax, %cx movq -0x120(%rbp), %rax movw %cx, (%rax) movq -0x78(%rbp), %rax addq $0x2, %rax movq %rax, -0x78(%rbp) movq -0x78(%rbp), %rax movb $0x9, (%rax) movq -0x78(%rbp), %rax addq $0x1, %rax movq %rax, -0x78(%rbp) movq -0x78(%rbp), %rax movq %rax, -0x128(%rbp) movl -0x3c(%rbp), %eax movw %ax, %cx movq -0x128(%rbp), %rax movw %cx, (%rax) movq -0x78(%rbp), %rax addq $0x2, %rax movq %rax, -0x78(%rbp) movq -0x78(%rbp), %rax movq %rax, -0x130(%rbp) movl -0x4c(%rbp), %eax movw %ax, %cx movq -0x130(%rbp), %rax movw %cx, (%rax) movq -0x78(%rbp), %rax addq $0x2, %rax movq %rax, -0x78(%rbp) leaq -0x20(%rbp), %rax movq %rax, -0xe0(%rbp) movq $0xf, -0xd8(%rbp) movq -0x48(%rbp), %rax movq %rax, -0xd0(%rbp) movl -0x4c(%rbp), %eax movq %rax, -0xc8(%rbp) movl $0x2, -0x104(%rbp) cmpq $0x0, -0x58(%rbp) je 0x885cf movq -0x58(%rbp), %rax movq %rax, -0xc0(%rbp) movq $0x6, -0xb8(%rbp) movq -0x38(%rbp), %rax movq %rax, -0xb0(%rbp) movl -0x3c(%rbp), %eax movq %rax, -0xa8(%rbp) movl -0x3c(%rbp), %eax addl $0x6, %eax movl %eax, -0x108(%rbp) movl -0x104(%rbp), %eax addl $0x2, %eax movl %eax, -0x104(%rbp) movq -0x30(%rbp), %rax movl 0x20(%rax), %ecx movq -0x30(%rbp), %rax movl %ecx, 0x24(%rax) movq -0x60(%rbp), %rax movq 0x8(%rax), %rdx movq -0x60(%rbp), %rcx movq -0x78(%rbp), %rax leaq -0x20(%rbp), %rsi subq %rsi, %rax movl -0x4c(%rbp), %esi addq %rsi, %rax movl -0x108(%rbp), %esi addq %rsi, %rax movl %eax, %r8d movl -0x104(%rbp), %r9d addl $0x2, %r9d leaq -0x100(%rbp), %r10 leaq -0x20(%rbp), %rax leaq -0x70(%rbp), %rdi movl $0xc, %esi xorl %r11d, %r11d movq %r10, (%rsp) movq %rax, 0x8(%rsp) movq $0x0, 0x10(%rsp) callq 0x31e20 cmpb $0x0, %al je 0x8864b jmp 0x88645 movb $0x1, -0x21(%rbp) jmp 0x88651 jmp 0x8864d movb $0x0, -0x21(%rbp) movb -0x21(%rbp), %al movb %al, -0x131(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x8867b movb -0x131(%rbp), %al addq $0x150, %rsp # imm = 0x150 popq %rbp retq callq 0x2a250
_ma_log_rt_split: push rbp mov rbp, rsp sub rsp, 150h mov eax, [rbp+arg_0] mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_30], rdi mov [rbp+var_38], rsi mov [rbp+var_3C], edx mov [rbp+var_48], rcx mov [rbp+var_4C], r8d mov [rbp+var_58], r9 mov rax, [rbp+var_30] mov rax, [rax] mov [rbp+var_60], rax mov rax, [rbp+var_60] mov rax, [rax] mov [rbp+var_68], rax mov [rbp+var_108], 0 jmp short $+2 loc_88444: jmp short $+2 loc_88446: jmp short $+2 loc_88448: mov rax, [rbp+var_30] mov rax, [rax+18h] mov rcx, [rbp+var_68] mov ecx, [rcx+7BCh] xor edx, edx div rcx mov [rbp+var_110], rax lea rax, [rbp+var_20] add rax, 2 mov [rbp+var_118], rax mov rax, [rbp+var_110] mov ecx, eax mov rax, [rbp+var_118] mov [rax], ecx mov rax, [rbp+var_110] shr rax, 20h mov cl, al mov rax, [rbp+var_118] mov [rax+4], cl lea rax, [rbp+var_20] add rax, 2 add rax, 5 mov [rbp+var_78], rax mov rax, [rbp+var_78] mov byte ptr [rax], 7 mov rax, [rbp+var_78] add rax, 1 mov [rbp+var_78], rax jmp short $+2 loc_884C3: jmp short $+2 loc_884C5: mov rax, [rbp+var_78] mov [rbp+var_120], rax mov eax, [rbp+arg_0] mov cx, ax mov rax, [rbp+var_120] mov [rax], cx mov rax, [rbp+var_78] add rax, 2 mov [rbp+var_78], rax mov rax, [rbp+var_78] mov byte ptr [rax], 9 mov rax, [rbp+var_78] add rax, 1 mov [rbp+var_78], rax mov rax, [rbp+var_78] mov [rbp+var_128], rax mov eax, [rbp+var_3C] mov cx, ax mov rax, [rbp+var_128] mov [rax], cx mov rax, [rbp+var_78] add rax, 2 mov [rbp+var_78], rax mov rax, [rbp+var_78] mov [rbp+var_130], rax mov eax, [rbp+var_4C] mov cx, ax mov rax, [rbp+var_130] mov [rax], cx mov rax, [rbp+var_78] add rax, 2 mov [rbp+var_78], rax lea rax, [rbp+var_20] mov [rbp+var_E0], rax mov [rbp+var_D8], 0Fh mov rax, [rbp+var_48] mov [rbp+var_D0], rax mov eax, [rbp+var_4C] mov [rbp+var_C8], rax mov [rbp+var_104], 2 cmp [rbp+var_58], 0 jz short loc_885CF mov rax, [rbp+var_58] mov [rbp+var_C0], rax mov [rbp+var_B8], 6 mov rax, [rbp+var_38] mov [rbp+var_B0], rax mov eax, [rbp+var_3C] mov [rbp+var_A8], rax mov eax, [rbp+var_3C] add eax, 6 mov [rbp+var_108], eax mov eax, [rbp+var_104] add eax, 2 mov [rbp+var_104], eax loc_885CF: mov rax, [rbp+var_30] mov ecx, [rax+20h] mov rax, [rbp+var_30] mov [rax+24h], ecx mov rax, [rbp+var_60] mov rdx, [rax+8] mov rcx, [rbp+var_60] mov rax, [rbp+var_78] lea rsi, [rbp+var_20] sub rax, rsi mov esi, [rbp+var_4C] add rax, rsi mov esi, [rbp+var_108] add rax, rsi mov r8d, eax mov r9d, [rbp+var_104] add r9d, 2 lea r10, [rbp+var_100] lea rax, [rbp+var_20] lea rdi, [rbp+var_70] mov esi, 0Ch xor r11d, r11d mov [rsp+150h+var_150], r10 mov [rsp+150h+var_148], rax mov [rsp+150h+var_140], 0 call translog_write_record cmp al, 0 jz short loc_8864B jmp short $+2 loc_88645: mov [rbp+var_21], 1 jmp short loc_88651 loc_8864B: jmp short $+2 loc_8864D: mov [rbp+var_21], 0 loc_88651: mov al, [rbp+var_21] mov [rbp+var_131], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_8867B mov al, [rbp+var_131] add rsp, 150h pop rbp retn loc_8867B: call ___stack_chk_fail
bool ma_log_rt_split( long long a1, long long a2, unsigned int a3, long long a4, unsigned int a5, long long a6, __int16 a7) { unsigned long long v8; // [rsp+40h] [rbp-110h] unsigned int v9; // [rsp+48h] [rbp-108h] int v10; // [rsp+4Ch] [rbp-104h] _QWORD v11[17]; // [rsp+50h] [rbp-100h] BYREF _BYTE *v12; // [rsp+D8h] [rbp-78h] _BYTE v13[8]; // [rsp+E0h] [rbp-70h] BYREF long long v14; // [rsp+E8h] [rbp-68h] long long *v15; // [rsp+F0h] [rbp-60h] long long v16; // [rsp+F8h] [rbp-58h] unsigned int v17; // [rsp+104h] [rbp-4Ch] long long v18; // [rsp+108h] [rbp-48h] unsigned int v19; // [rsp+114h] [rbp-3Ch] long long v20; // [rsp+118h] [rbp-38h] long long v21; // [rsp+120h] [rbp-30h] __int16 v22; // [rsp+130h] [rbp-20h] BYREF int v23; // [rsp+132h] [rbp-1Eh] char v24; // [rsp+136h] [rbp-1Ah] char v25; // [rsp+137h] [rbp-19h] __int16 v26; // [rsp+138h] [rbp-18h] char v27; // [rsp+13Ah] [rbp-16h] __int16 v28; // [rsp+13Bh] [rbp-15h] __int16 v29; // [rsp+13Dh] [rbp-13h] _BYTE v30[17]; // [rsp+13Fh] [rbp-11h] BYREF long long savedregs; // [rsp+150h] [rbp+0h] BYREF *(_QWORD *)&v30[9] = __readfsqword(0x28u); v21 = a1; v20 = a2; v19 = a3; v18 = a4; v17 = a5; v16 = a6; v15 = *(long long **)a1; v14 = *v15; v9 = 0; v8 = *(_QWORD *)(a1 + 24) / (unsigned long long)*(unsigned int *)(v14 + 1980); v23 = v8; v24 = BYTE4(v8); v25 = 7; v26 = a7; v27 = 9; v28 = a3; v29 = a5; v12 = v30; v11[4] = &v22; v11[5] = 15LL; v11[6] = a4; v11[7] = a5; v10 = 2; if ( a6 ) { v11[8] = v16; v11[9] = 6LL; v11[10] = v20; v11[11] = v19; v9 = v19 + 6; v10 = 4; } *(_DWORD *)(v21 + 36) = *(_DWORD *)(v21 + 32); return translog_write_record( (long long)v13, 0xCu, v15[1], v15, v9 + v17 + (_DWORD)v12 - ((unsigned int)&savedregs - 32), v10 + 2, v11, &v22, 0LL) != 0; }
_ma_log_rt_split: PUSH RBP MOV RBP,RSP SUB RSP,0x150 MOV EAX,dword ptr [RBP + 0x10] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x30],RDI MOV qword ptr [RBP + -0x38],RSI MOV dword ptr [RBP + -0x3c],EDX MOV qword ptr [RBP + -0x48],RCX MOV dword ptr [RBP + -0x4c],R8D MOV qword ptr [RBP + -0x58],R9 MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x68],RAX MOV dword ptr [RBP + -0x108],0x0 JMP 0x00188444 LAB_00188444: JMP 0x00188446 LAB_00188446: JMP 0x00188448 LAB_00188448: MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RBP + -0x68] MOV ECX,dword ptr [RCX + 0x7bc] XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x110],RAX LEA RAX,[RBP + -0x20] ADD RAX,0x2 MOV qword ptr [RBP + -0x118],RAX MOV RAX,qword ptr [RBP + -0x110] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x118] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x110] SHR RAX,0x20 MOV CL,AL MOV RAX,qword ptr [RBP + -0x118] MOV byte ptr [RAX + 0x4],CL LEA RAX,[RBP + -0x20] ADD RAX,0x2 ADD RAX,0x5 MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x78] MOV byte ptr [RAX],0x7 MOV RAX,qword ptr [RBP + -0x78] ADD RAX,0x1 MOV qword ptr [RBP + -0x78],RAX JMP 0x001884c3 LAB_001884c3: JMP 0x001884c5 LAB_001884c5: MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x120],RAX MOV EAX,dword ptr [RBP + 0x10] MOV CX,AX MOV RAX,qword ptr [RBP + -0x120] MOV word ptr [RAX],CX MOV RAX,qword ptr [RBP + -0x78] ADD RAX,0x2 MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x78] MOV byte ptr [RAX],0x9 MOV RAX,qword ptr [RBP + -0x78] ADD RAX,0x1 MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x128],RAX MOV EAX,dword ptr [RBP + -0x3c] MOV CX,AX MOV RAX,qword ptr [RBP + -0x128] MOV word ptr [RAX],CX MOV RAX,qword ptr [RBP + -0x78] ADD RAX,0x2 MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x130],RAX MOV EAX,dword ptr [RBP + -0x4c] MOV CX,AX MOV RAX,qword ptr [RBP + -0x130] MOV word ptr [RAX],CX MOV RAX,qword ptr [RBP + -0x78] ADD RAX,0x2 MOV qword ptr [RBP + -0x78],RAX LEA RAX,[RBP + -0x20] MOV qword ptr [RBP + -0xe0],RAX MOV qword ptr [RBP + -0xd8],0xf MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0xd0],RAX MOV EAX,dword ptr [RBP + -0x4c] MOV qword ptr [RBP + -0xc8],RAX MOV dword ptr [RBP + -0x104],0x2 CMP qword ptr [RBP + -0x58],0x0 JZ 0x001885cf MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0xc0],RAX MOV qword ptr [RBP + -0xb8],0x6 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0xb0],RAX MOV EAX,dword ptr [RBP + -0x3c] MOV qword ptr [RBP + -0xa8],RAX MOV EAX,dword ptr [RBP + -0x3c] ADD EAX,0x6 MOV dword ptr [RBP + -0x108],EAX MOV EAX,dword ptr [RBP + -0x104] ADD EAX,0x2 MOV dword ptr [RBP + -0x104],EAX LAB_001885cf: MOV RAX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RAX + 0x20] MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x24],ECX MOV RAX,qword ptr [RBP + -0x60] MOV RDX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RBP + -0x78] LEA RSI,[RBP + -0x20] SUB RAX,RSI MOV ESI,dword ptr [RBP + -0x4c] ADD RAX,RSI MOV ESI,dword ptr [RBP + -0x108] ADD RAX,RSI MOV R8D,EAX MOV R9D,dword ptr [RBP + -0x104] ADD R9D,0x2 LEA R10,[RBP + -0x100] LEA RAX,[RBP + -0x20] LEA RDI,[RBP + -0x70] MOV ESI,0xc XOR R11D,R11D MOV qword ptr [RSP],R10 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],0x0 CALL 0x00131e20 CMP AL,0x0 JZ 0x0018864b JMP 0x00188645 LAB_00188645: MOV byte ptr [RBP + -0x21],0x1 JMP 0x00188651 LAB_0018864b: JMP 0x0018864d LAB_0018864d: MOV byte ptr [RBP + -0x21],0x0 LAB_00188651: MOV AL,byte ptr [RBP + -0x21] MOV byte ptr [RBP + -0x131],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0018867b MOV AL,byte ptr [RBP + -0x131] ADD RSP,0x150 POP RBP RET LAB_0018867b: CALL 0x0012a250
int8 _ma_log_rt_split(long *param_1,int8 param_2,uint param_3,int8 param_4,uint param_5, long param_6,int2 param_7) { char cVar1; ulong uVar2; long in_FS_OFFSET; int local_110; int local_10c; int1 local_108 [32]; int1 *local_e8; int8 local_e0; int8 local_d8; ulong local_d0; long local_c8; int8 local_c0; int8 local_b8; ulong local_b0; int1 *local_80; int1 local_78 [8]; long local_70; long *local_68; long local_60; uint local_54; int8 local_50; uint local_44; int8 local_40; long *local_38; int1 local_29; int1 local_28 [2]; int4 local_26; int1 local_22; int1 local_21; int2 local_20; int1 local_1e; int2 local_1d; int2 local_1b; int1 auStack_19 [9]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_68 = (long *)*param_1; local_70 = *local_68; local_110 = 0; uVar2 = (ulong)param_1[3] / (ulong)*(uint *)(local_70 + 0x7bc); local_26 = (int4)uVar2; local_22 = (int1)(uVar2 >> 0x20); local_21 = 7; local_20 = param_7; local_1e = 9; local_1d = (int2)param_3; local_1b = (int2)param_5; local_80 = auStack_19; local_e8 = local_28; local_e0 = 0xf; local_d0 = (ulong)param_5; local_10c = 2; if (param_6 != 0) { local_c0 = 6; local_b0 = (ulong)param_3; local_110 = param_3 + 6; local_10c = 4; local_c8 = param_6; local_b8 = param_2; } *(int *)((long)param_1 + 0x24) = (int)param_1[4]; local_d8 = param_4; local_60 = param_6; local_54 = param_5; local_50 = param_4; local_44 = param_3; local_40 = param_2; local_38 = param_1; cVar1 = translog_write_record (local_78,0xc,local_68[1],local_68, ((int)local_80 - (int)local_28) + param_5 + local_110,local_10c + 2,local_108, local_28,0); local_29 = cVar1 != '\0'; if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_29); } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
28,793
LefDefParser::lefwLayerRoutingSpacingSameNet(int)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwLayerRoutingSpacingSameNet(int PGOnly) { if (!lefwFile) return LEFW_UNINITIALIZED; if (lefwState != LEFW_LAYERROUTING_START && lefwState != LEFW_LAYERROUTING) return LEFW_BAD_ORDER; if (!lefwIsRouting) return LEFW_BAD_DATA; // only routing calls this func if (!lefwHasLayerRoutingSpacing) return LEFW_BAD_DATA; if (lefwWriteEncrypt) { if (PGOnly) encPrint(lefwFile, (char*) " SAMENET PGONLY "); else encPrint(lefwFile, (char*) " SAMENET "); } else { if (PGOnly) fprintf(lefwFile, " SAMENET PGONLY "); else fprintf(lefwFile, " SAMENET "); } prtSemiColon = 1; return LEFW_OK; }
O3
cpp
LefDefParser::lefwLayerRoutingSpacingSameNet(int): leaq 0x1afaa(%rip), %rax # 0x24e00 movq (%rax), %rcx testq %rcx, %rcx je 0x9ea7 leaq 0x1b1eb(%rip), %rax # 0x25050 movl (%rax), %edx cmpl $0x1f, %edx je 0x9e76 movl $0x2, %eax cmpl $0x7, %edx jne 0x9ef5 leaq 0x1b247(%rip), %rdx # 0x250c4 movl $0x3, %eax cmpl $0x0, (%rdx) je 0x9ef5 cmpb $0x1, 0x1b26e(%rip) # 0x250fc jne 0x9ef5 pushq %rax cmpb $0x1, 0x1b254(%rip) # 0x250ec jne 0x9ead testl %edi, %edi je 0x9ebf leaq 0x10aad(%rip), %rsi # 0x1a952 jmp 0x9ec6 movl $0x1, %eax retq testl %edi, %edi je 0x9ed2 leaq 0x10a9a(%rip), %rdi # 0x1a952 movl $0x12, %esi jmp 0x9ede leaq 0x10a9f(%rip), %rsi # 0x1a965 movq %rcx, %rdi xorl %eax, %eax callq 0x18c35 jmp 0x9ee8 leaq 0x10a8c(%rip), %rdi # 0x1a965 movl $0xb, %esi movl $0x1, %edx callq 0x1110 movb $0x1, 0x1b205(%rip) # 0x250f4 xorl %eax, %eax addq $0x8, %rsp retq
_ZN12LefDefParser30lefwLayerRoutingSpacingSameNetEi: lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rcx, [rax] test rcx, rcx jz short loc_9EA7 lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState mov edx, [rax] cmp edx, 1Fh jz short loc_9E76 mov eax, 2 cmp edx, 7 jnz short locret_9EF5 loc_9E76: lea rdx, _ZN12LefDefParser13lefwIsRoutingE; LefDefParser::lefwIsRouting mov eax, 3 cmp dword ptr [rdx], 0 jz short locret_9EF5 cmp cs:_ZN12LefDefParserL26lefwHasLayerRoutingSpacingE, 1; LefDefParser::lefwHasLayerRoutingSpacing jnz short locret_9EF5 push rax cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt jnz short loc_9EAD test edi, edi jz short loc_9EBF lea rsi, aSamenetPgonly; " SAMENET PGONLY " jmp short loc_9EC6 loc_9EA7: mov eax, 1 retn loc_9EAD: test edi, edi jz short loc_9ED2 lea rdi, aSamenetPgonly; " SAMENET PGONLY " mov esi, 12h jmp short loc_9EDE loc_9EBF: lea rsi, aSamenet_0; " SAMENET " loc_9EC6: mov rdi, rcx xor eax, eax call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_9EE8 loc_9ED2: lea rdi, aSamenet_0; " SAMENET " mov esi, 0Bh loc_9EDE: mov edx, 1 call _fwrite loc_9EE8: mov cs:_ZN12LefDefParserL12prtSemiColonE, 1; LefDefParser::prtSemiColon xor eax, eax add rsp, 8 locret_9EF5: retn
long long LefDefParser::lefwLayerRoutingSpacingSameNet( LefDefParser *this, int a2, long long a3, long long a4, int a5, int a6) { long long result; // rax const char *v7; // rsi const char *v8; // rdi long long v9; // rsi if ( !*(_QWORD *)&LefDefParser::lefwFile ) return 1LL; if ( LefDefParser::lefwState == 31 || (result = 2LL, LefDefParser::lefwState == 7) ) { result = 3LL; if ( LefDefParser::lefwIsRouting ) { if ( LefDefParser::lefwHasLayerRoutingSpacing == 1 ) { if ( LefDefParser::lefwWriteEncrypt == 1 ) { if ( (_DWORD)this ) v7 = " SAMENET PGONLY "; else v7 = " SAMENET "; LefDefParser::encPrint( LefDefParser::lefwFile, (_DWORD)v7, (unsigned int)&LefDefParser::lefwIsRouting, LefDefParser::lefwFile, a5, a6); } else { if ( (_DWORD)this ) { v8 = " SAMENET PGONLY "; v9 = 18LL; } else { v8 = " SAMENET "; v9 = 11LL; } fwrite(v8, v9, 1LL, *(_QWORD *)&LefDefParser::lefwFile); } LefDefParser::prtSemiColon = 1; return 0LL; } } } return result; }
lefwLayerRoutingSpacingSameNet: LEA RAX,[0x124e00] MOV RCX,qword ptr [RAX] TEST RCX,RCX JZ 0x00109ea7 LEA RAX,[0x125050] MOV EDX,dword ptr [RAX] CMP EDX,0x1f JZ 0x00109e76 MOV EAX,0x2 CMP EDX,0x7 JNZ 0x00109ef5 LAB_00109e76: LEA RDX,[0x1250c4] MOV EAX,0x3 CMP dword ptr [RDX],0x0 JZ 0x00109ef5 CMP byte ptr [0x001250fc],0x1 JNZ 0x00109ef5 PUSH RAX CMP byte ptr [0x001250ec],0x1 JNZ 0x00109ead TEST EDI,EDI JZ 0x00109ebf LEA RSI,[0x11a952] JMP 0x00109ec6 LAB_00109ea7: MOV EAX,0x1 RET LAB_00109ead: TEST EDI,EDI JZ 0x00109ed2 LEA RDI,[0x11a952] MOV ESI,0x12 JMP 0x00109ede LAB_00109ebf: LEA RSI,[0x11a965] LAB_00109ec6: MOV RDI,RCX XOR EAX,EAX CALL 0x00118c35 JMP 0x00109ee8 LAB_00109ed2: LEA RDI,[0x11a965] MOV ESI,0xb LAB_00109ede: MOV EDX,0x1 CALL 0x00101110 LAB_00109ee8: MOV byte ptr [0x001250f4],0x1 XOR EAX,EAX ADD RSP,0x8 LAB_00109ef5: RET
/* LefDefParser::lefwLayerRoutingSpacingSameNet(int) */ int8 LefDefParser::lefwLayerRoutingSpacingSameNet(int param_1) { int8 uVar1; char *pcVar2; size_t __size; if (lefwFile != (_IO_FILE *)0x0) { if ((((lefwState == 0x1f) || (uVar1 = 2, lefwState == 7)) && (uVar1 = 3, lefwIsRouting != 0)) && (lefwHasLayerRoutingSpacing == '\x01')) { if (lefwWriteEncrypt == '\x01') { if (param_1 == 0) { pcVar2 = " SAMENET "; } else { pcVar2 = " SAMENET PGONLY "; } encPrint(lefwFile,pcVar2); } else { if (param_1 == 0) { pcVar2 = " SAMENET "; __size = 0xb; } else { pcVar2 = " SAMENET PGONLY "; __size = 0x12; } fwrite(pcVar2,__size,1,lefwFile); } prtSemiColon = 1; uVar1 = 0; } return uVar1; } return 1; }
28,794
add_compiled_extra_collation
eloqsql/mysys/charset.c
void add_compiled_extra_collation(struct charset_info_st *cs) { DBUG_ASSERT(cs->number < array_elements(all_charsets)); all_charsets[cs->number]= cs; cs->state|= MY_CS_AVAILABLE; if ((my_hash_insert(&charset_name_hash, (uchar*) cs))) { CHARSET_INFO *org= (CHARSET_INFO*) my_hash_search(&charset_name_hash, (uchar*) cs->cs_name.str, cs->cs_name.length); cs->cs_name= org->cs_name; } }
O3
c
add_compiled_extra_collation: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx movl (%rdi), %eax leaq 0xb6d48c(%rip), %rcx # 0xbffa50 movq %rdi, (%rcx,%rax,8) orb $0x2, 0xd(%rdi) leaq 0xb7147d(%rip), %rdi # 0xc03a50 movq %rbx, %rsi callq 0x93ed6 testb %al, %al je 0x925fb movq 0x10(%rbx), %rsi movq 0x18(%rbx), %rdx leaq 0xb71462(%rip), %rdi # 0xc03a50 callq 0x93c76 movups 0x10(%rax), %xmm0 movups %xmm0, 0x10(%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq
add_compiled_extra_collation: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi mov eax, [rdi] lea rcx, all_charsets mov [rcx+rax*8], rdi or byte ptr [rdi+0Dh], 2 lea rdi, charset_name_hash mov rsi, rbx call my_hash_insert test al, al jz short loc_925FB mov rsi, [rbx+10h] mov rdx, [rbx+18h] lea rdi, charset_name_hash call my_hash_search movups xmm0, xmmword ptr [rax+10h] movups xmmword ptr [rbx+10h], xmm0 loc_925FB: add rsp, 8 pop rbx pop rbp retn
long long add_compiled_extra_collation(unsigned int *a1) { long long result; // rax all_charsets[*a1] = a1; *((_BYTE *)a1 + 13) |= 2u; result = my_hash_insert(&charset_name_hash, a1); if ( (_BYTE)result ) { result = my_hash_search(&charset_name_hash, *((_QWORD *)a1 + 2), *((_QWORD *)a1 + 3)); *((_OWORD *)a1 + 1) = *(_OWORD *)(result + 16); } return result; }
add_compiled_extra_collation: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI MOV EAX,dword ptr [RDI] LEA RCX,[0xcffa50] MOV qword ptr [RCX + RAX*0x8],RDI OR byte ptr [RDI + 0xd],0x2 LEA RDI,[0xd03a50] MOV RSI,RBX CALL 0x00193ed6 TEST AL,AL JZ 0x001925fb MOV RSI,qword ptr [RBX + 0x10] MOV RDX,qword ptr [RBX + 0x18] LEA RDI,[0xd03a50] CALL 0x00193c76 MOVUPS XMM0,xmmword ptr [RAX + 0x10] MOVUPS xmmword ptr [RBX + 0x10],XMM0 LAB_001925fb: ADD RSP,0x8 POP RBX POP RBP RET
void add_compiled_extra_collation(uint *param_1) { int8 uVar1; char cVar2; long lVar3; (&all_charsets)[*param_1] = param_1; *(byte *)((long)param_1 + 0xd) = *(byte *)((long)param_1 + 0xd) | 2; cVar2 = my_hash_insert(charset_name_hash,param_1); if (cVar2 != '\0') { lVar3 = my_hash_search(charset_name_hash,*(int8 *)(param_1 + 4), *(int8 *)(param_1 + 6)); uVar1 = *(int8 *)(lVar3 + 0x18); *(int8 *)(param_1 + 4) = *(int8 *)(lVar3 + 0x10); *(int8 *)(param_1 + 6) = uVar1; } return; }
28,795
minja::Value::for_each(std::function<void (minja::Value&)> const&) const
monkey531[P]llama/common/minja.hpp
void for_each(const std::function<void(Value &)> & callback) const { if (is_null()) throw std::runtime_error("Undefined value or reference"); if (array_) { for (auto& item : *array_) { callback(item); } } else if (object_) { for (auto & item : *object_) { Value key(item.first); callback(key); } } else if (is_string()) { for (char c : primitive_.get<std::string>()) { auto val = Value(std::string(1, c)); callback(val); } } else { throw std::runtime_error("Value is not iterable: " + dump()); } }
O2
cpp
minja::Value::for_each(std::function<void (minja::Value&)> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x98, %rsp movq %rsi, %rbx movq %rdi, %r14 callq 0x6390a testb %al, %al jne 0x6db3e movq 0x10(%r14), %rax testq %rax, %rax je 0x6da62 movq (%rax), %r14 movq 0x8(%rax), %r15 cmpq %r15, %r14 je 0x6db2c movq %rbx, %rdi movq %r14, %rsi callq 0x6dc7c addq $0x50, %r14 jmp 0x6da48 movq 0x20(%r14), %rax testq %rax, %rax je 0x6daa4 movq (%rax), %r14 movq 0x8(%rax), %r12 leaq 0x48(%rsp), %r15 cmpq %r12, %r14 je 0x6db2c movq %r15, %rdi movq %r14, %rsi callq 0x67938 movq %rbx, %rdi movq %r15, %rsi callq 0x6dc7c movq %r15, %rdi callq 0x63132 addq $0x60, %r14 jmp 0x6da77 cmpb $0x3, 0x40(%r14) jne 0x6db6e addq $0x40, %r14 leaq 0x8(%rsp), %r15 movq %r15, %rdi movq %r14, %rsi callq 0x63fea movq (%r15), %r13 movq 0x8(%r15), %rbp xorl %r15d, %r15d leaq 0x28(%rsp), %r14 leaq 0x48(%rsp), %r12 cmpq %r15, %rbp je 0x6db22 movsbl (%r13,%r15), %edx leaq 0x38(%rsp), %rax movq %rax, 0x28(%rsp) movq %r14, %rdi pushq $0x1 popq %rsi callq 0x249f0 movq %r12, %rdi movq %r14, %rsi callq 0x66110 movq %r14, %rdi callq 0x251b8 movq %rbx, %rdi movq %r12, %rsi callq 0x6dc7c movq %r12, %rdi callq 0x63132 incq %r15 jmp 0x6dad7 leaq 0x8(%rsp), %rdi callq 0x251b8 addq $0x98, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq pushq $0x10 popq %rdi callq 0x24460 movq %rax, %rbx leaq 0x47faa(%rip), %rsi # 0xb5afa movq %rax, %rdi callq 0x24320 movq 0x92491(%rip), %rsi # 0xffff0 movq 0x923ea(%rip), %rdx # 0xfff50 movq %rbx, %rdi callq 0x24ee0 pushq $0x10 popq %rdi callq 0x24460 movq %rax, %rbx leaq 0x8(%rsp), %rdi pushq $-0x1 popq %rdx movq %r14, %rsi xorl %ecx, %ecx callq 0x63320 leaq 0x48958(%rip), %rsi # 0xb64ea leaq 0x48(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x58a46 movb $0x1, %bpl leaq 0x48(%rsp), %rsi movq %rbx, %rdi callq 0x24e10 xorl %ebp, %ebp movq 0x92436(%rip), %rsi # 0xffff0 movq 0x9238f(%rip), %rdx # 0xfff50 movq %rbx, %rdi callq 0x24ee0 movq %rax, %r14 leaq 0x48(%rsp), %rdi callq 0x251b8 jmp 0x6dbde movq %rax, %r14 movb $0x1, %bpl leaq 0x8(%rsp), %rdi callq 0x251b8 testb %bpl, %bpl jne 0x6dbf4 jmp 0x6dc38 jmp 0x6dbf1 movq %rax, %r14 movq %rbx, %rdi callq 0x24670 jmp 0x6dc38 movq %rax, %r14 jmp 0x6dc1f movq %rax, %r14 leaq 0x28(%rsp), %rdi callq 0x251b8 jmp 0x6dc1f movq %rax, %r14 leaq 0x48(%rsp), %rdi callq 0x63132 leaq 0x8(%rsp), %rdi callq 0x251b8 jmp 0x6dc38 movq %rax, %r14 leaq 0x48(%rsp), %rdi callq 0x63132 movq %r14, %rdi callq 0x24f60
_ZNK5minja5Value8for_eachERKSt8functionIFvRS0_EE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 98h mov rbx, rsi mov r14, rdi call _ZNK5minja5Value7is_nullEv; minja::Value::is_null(void) test al, al jnz loc_6DB3E mov rax, [r14+10h] test rax, rax jz short loc_6DA62 mov r14, [rax] mov r15, [rax+8] loc_6DA48: cmp r14, r15 jz loc_6DB2C mov rdi, rbx mov rsi, r14 call _ZNKSt8functionIFvRN5minja5ValueEEEclES2_; std::function<void ()(minja::Value &)>::operator()(minja::Value &) add r14, 50h ; 'P' jmp short loc_6DA48 loc_6DA62: mov rax, [r14+20h] test rax, rax jz short loc_6DAA4 mov r14, [rax] mov r12, [rax+8] lea r15, [rsp+0C8h+var_80] loc_6DA77: cmp r14, r12 jz loc_6DB2C mov rdi, r15 mov rsi, r14 call _ZN5minja5ValueC2ERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEE; minja::Value::Value(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov rdi, rbx mov rsi, r15 call _ZNKSt8functionIFvRN5minja5ValueEEEclES2_; std::function<void ()(minja::Value &)>::operator()(minja::Value &) mov rdi, r15; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() add r14, 60h ; '`' jmp short loc_6DA77 loc_6DAA4: cmp byte ptr [r14+40h], 3 jnz loc_6DB6E add r14, 40h ; '@' lea r15, [rsp+0C8h+var_C0] mov rdi, r15 mov rsi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE mov r13, [r15] mov rbp, [r15+8] xor r15d, r15d lea r14, [rsp+0C8h+var_A0] lea r12, [rsp+0C8h+var_80] loc_6DAD7: cmp rbp, r15 jz short loc_6DB22 movsx edx, byte ptr [r13+r15+0] lea rax, [rsp+0C8h+var_90] mov [rsp+0C8h+var_A0], rax mov rdi, r14 push 1 pop rsi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) mov rdi, r12 mov rsi, r14 call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) mov rdi, r14; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx mov rsi, r12 call _ZNKSt8functionIFvRN5minja5ValueEEEclES2_; std::function<void ()(minja::Value &)>::operator()(minja::Value &) mov rdi, r12; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() inc r15 jmp short loc_6DAD7 loc_6DB22: lea rdi, [rsp+0C8h+var_C0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_6DB2C: add rsp, 98h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6DB3E: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aUndefinedValue; "Undefined value or reference" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_6DB6E: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+0C8h+var_C0] push 0FFFFFFFFFFFFFFFFh pop rdx mov rsi, r14 xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aValueIsNotIter; "Value is not iterable: " lea rdi, [rsp+0C8h+var_80] lea rdx, [rsp+0C8h+var_C0] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+0C8h+var_80] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+0C8h+var_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_6DBDE mov r14, rax mov bpl, 1 loc_6DBDE: lea rdi, [rsp+0C8h+var_C0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_6DBF4 jmp short loc_6DC38 jmp short $+2 loc_6DBF1: mov r14, rax loc_6DBF4: mov rdi, rbx; void * call ___cxa_free_exception jmp short loc_6DC38 mov r14, rax jmp short loc_6DC1F mov r14, rax lea rdi, [rsp+0C8h+var_A0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_6DC1F mov r14, rax lea rdi, [rsp+0C8h+var_80]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_6DC1F: lea rdi, [rsp+0C8h+var_C0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_6DC38 mov r14, rax lea rdi, [rsp+0C8h+var_80]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_6DC38: mov rdi, r14 call __Unwind_Resume
void minja::Value::for_each(long long a1, long long a2) { long long *v2; // rax long long v3; // r14 long long v4; // r15 unsigned __int8 **v5; // rax unsigned __int8 *v6; // r14 unsigned __int8 *v7; // r12 long long v8; // r13 long long v9; // rbp long long i; // r15 long long v11; // rdx std::runtime_error *exception; // rbx void *v13; // rbx _QWORD v14[4]; // [rsp+8h] [rbp-C0h] BYREF _QWORD v15[2]; // [rsp+28h] [rbp-A0h] BYREF char v16; // [rsp+38h] [rbp-90h] BYREF _OWORD v17[8]; // [rsp+48h] [rbp-80h] BYREF if ( minja::Value::is_null((minja::Value *)a1) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Undefined value or reference"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v2 = *(long long **)(a1 + 16); if ( v2 ) { v3 = *v2; v4 = v2[1]; while ( v3 != v4 ) { std::function<void ()(minja::Value &)>::operator()(a2, v3); v3 += 80LL; } } else { v5 = *(unsigned __int8 ***)(a1 + 32); if ( v5 ) { v6 = *v5; v7 = v5[1]; while ( v6 != v7 ) { minja::Value::Value(v17, v6); std::function<void ()(minja::Value &)>::operator()(a2, v17); minja::Value::~Value((minja::Value *)v17); v6 += 96; } } else { if ( *(_BYTE *)(a1 + 64) != 3 ) { v13 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v14, a1, 0xFFFFFFFF, 0); std::operator+<char>((long long)v17, (long long)"Value is not iterable: ", (long long)v14); std::runtime_error::runtime_error(v13, v17); __cxa_throw( v13, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE( (long long)v14, a1 + 64); v8 = v14[0]; v9 = v14[1]; for ( i = 0LL; v9 != i; ++i ) { v11 = (unsigned int)*(char *)(v8 + i); v15[0] = &v16; std::string::_M_construct(v15, 1LL, v11); minja::Value::Value((long long)v17, (long long)v15); std::string::~string(v15); std::function<void ()(minja::Value &)>::operator()(a2, v17); minja::Value::~Value((minja::Value *)v17); } std::string::~string(v14); } } }
for_each: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x98 MOV RBX,RSI MOV R14,RDI CALL 0x0016390a TEST AL,AL JNZ 0x0016db3e MOV RAX,qword ptr [R14 + 0x10] TEST RAX,RAX JZ 0x0016da62 MOV R14,qword ptr [RAX] MOV R15,qword ptr [RAX + 0x8] LAB_0016da48: CMP R14,R15 JZ 0x0016db2c MOV RDI,RBX MOV RSI,R14 CALL 0x0016dc7c ADD R14,0x50 JMP 0x0016da48 LAB_0016da62: MOV RAX,qword ptr [R14 + 0x20] TEST RAX,RAX JZ 0x0016daa4 MOV R14,qword ptr [RAX] MOV R12,qword ptr [RAX + 0x8] LEA R15,[RSP + 0x48] LAB_0016da77: CMP R14,R12 JZ 0x0016db2c MOV RDI,R15 MOV RSI,R14 CALL 0x00167938 LAB_0016da8b: MOV RDI,RBX MOV RSI,R15 CALL 0x0016dc7c LAB_0016da96: MOV RDI,R15 CALL 0x00163132 ADD R14,0x60 JMP 0x0016da77 LAB_0016daa4: CMP byte ptr [R14 + 0x40],0x3 JNZ 0x0016db6e ADD R14,0x40 LEA R15,[RSP + 0x8] MOV RDI,R15 MOV RSI,R14 CALL 0x00163fea MOV R13,qword ptr [R15] MOV RBP,qword ptr [R15 + 0x8] XOR R15D,R15D LEA R14,[RSP + 0x28] LEA R12,[RSP + 0x48] LAB_0016dad7: CMP RBP,R15 JZ 0x0016db22 MOVSX EDX,byte ptr [R13 + R15*0x1] LEA RAX,[RSP + 0x38] MOV qword ptr [RSP + 0x28],RAX LAB_0016daec: MOV RDI,R14 PUSH 0x1 POP RSI CALL 0x001249f0 LAB_0016daf7: MOV RDI,R12 MOV RSI,R14 CALL 0x00166110 MOV RDI,R14 CALL 0x001251b8 LAB_0016db0a: MOV RDI,RBX MOV RSI,R12 CALL 0x0016dc7c LAB_0016db15: MOV RDI,R12 CALL 0x00163132 INC R15 JMP 0x0016dad7 LAB_0016db22: LEA RDI,[RSP + 0x8] CALL 0x001251b8 LAB_0016db2c: ADD RSP,0x98 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016db3e: PUSH 0x10 POP RDI CALL 0x00124460 MOV RBX,RAX LAB_0016db49: LEA RSI,[0x1b5afa] MOV RDI,RAX CALL 0x00124320 LAB_0016db58: MOV RSI,qword ptr [0x001ffff0] MOV RDX,qword ptr [0x001fff50] MOV RDI,RBX CALL 0x00124ee0 LAB_0016db6e: PUSH 0x10 POP RDI CALL 0x00124460 MOV RBX,RAX LAB_0016db79: LEA RDI,[RSP + 0x8] PUSH -0x1 POP RDX MOV RSI,R14 XOR ECX,ECX CALL 0x00163320 LAB_0016db8b: LEA RSI,[0x1b64ea] LEA RDI,[RSP + 0x48] LEA RDX,[RSP + 0x8] CALL 0x00158a46 MOV BPL,0x1 LAB_0016dba4: LEA RSI,[RSP + 0x48] MOV RDI,RBX CALL 0x00124e10 XOR EBP,EBP MOV RSI,qword ptr [0x001ffff0] MOV RDX,qword ptr [0x001fff50] MOV RDI,RBX CALL 0x00124ee0
/* minja::Value::for_each(std::function<void (minja::Value&)> const&) const */ void __thiscall minja::Value::for_each(Value *this,function *param_1) { int8 *puVar1; Value *pVVar2; basic_json *pbVar3; char cVar4; runtime_error *prVar5; Value *pVVar6; basic_json *pbVar7; long lVar8; string local_c0 [8]; long local_b8; int1 *local_a0 [2]; int1 local_90 [16]; Value local_80 [80]; cVar4 = is_null(this); if (cVar4 != '\0') { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016db49 to 0016db57 has its CatchHandler @ 0016dbf1 */ std::runtime_error::runtime_error(prVar5,"Undefined value or reference"); /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_001ffff0,PTR__runtime_error_001fff50); } puVar1 = *(int8 **)(this + 0x10); if (puVar1 == (int8 *)0x0) { puVar1 = *(int8 **)(this + 0x20); if (puVar1 == (int8 *)0x0) { if (this[0x40] != (Value)0x3) { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016db79 to 0016db8a has its CatchHandler @ 0016dbef */ dump_abi_cxx11_((int)local_c0,SUB81(this,0)); /* try { // try from 0016db8b to 0016dba0 has its CatchHandler @ 0016dbd8 */ std::operator+((char *)local_80,(string *)"Value is not iterable: "); /* try { // try from 0016dba4 to 0016dbc8 has its CatchHandler @ 0016dbc9 */ std::runtime_error::runtime_error(prVar5,(string *)local_80); /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_001ffff0,PTR__runtime_error_001fff50); } _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE (local_c0,this + 0x40); for (lVar8 = 0; local_b8 != lVar8; lVar8 = lVar8 + 1) { local_a0[0] = local_90; /* try { // try from 0016daec to 0016daf6 has its CatchHandler @ 0016dbfe */ std::__cxx11::string::_M_construct((ulong)local_a0,'\x01'); /* try { // try from 0016daf7 to 0016db01 has its CatchHandler @ 0016dc03 */ Value(local_80,(string *)local_a0); std::__cxx11::string::~string((string *)local_a0); /* try { // try from 0016db0a to 0016db14 has its CatchHandler @ 0016dc12 */ std::function<void(minja::Value&)>::operator() ((function<void(minja::Value&)> *)param_1,local_80); ~Value(local_80); } std::__cxx11::string::~string(local_c0); } else { pbVar3 = (basic_json *)puVar1[1]; for (pbVar7 = (basic_json *)*puVar1; pbVar7 != pbVar3; pbVar7 = pbVar7 + 0x60) { Value(local_80,pbVar7); /* try { // try from 0016da8b to 0016da95 has its CatchHandler @ 0016dc2b */ std::function<void(minja::Value&)>::operator() ((function<void(minja::Value&)> *)param_1,local_80); ~Value(local_80); } } } else { pVVar2 = (Value *)puVar1[1]; for (pVVar6 = (Value *)*puVar1; pVVar6 != pVVar2; pVVar6 = pVVar6 + 0x50) { std::function<void(minja::Value&)>::operator() ((function<void(minja::Value&)> *)param_1,pVVar6); } } return; }
28,796
YogaTest_aspect_ratio_flex_shrink_2_Test::YogaTest_aspect_ratio_flex_shrink_2_Test()
yoga-mod/tests/YGAspectRatioTest.cpp
TEST(YogaTest, aspect_ratio_flex_shrink_2) { YGNodeRef root = YGNodeNew(); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); YGNodeRef root_child0 = YGNodeNew(); YGNodeStyleSetHeightPercent(root_child0, 100); YGNodeStyleSetFlexShrink(root_child0, 1); YGNodeStyleSetAspectRatio(root_child0, 1); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNew(); YGNodeStyleSetHeightPercent(root_child1, 100); YGNodeStyleSetFlexShrink(root_child1, 1); YGNodeStyleSetAspectRatio(root_child1, 1); YGNodeInsertChild(root, root_child1, 1); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); ASSERT_EQ(0, YGNodeLayoutGetLeft(root_child0)); ASSERT_EQ(0, YGNodeLayoutGetTop(root_child0)); ASSERT_EQ(50, YGNodeLayoutGetWidth(root_child0)); ASSERT_EQ(50, YGNodeLayoutGetHeight(root_child0)); ASSERT_EQ(0, YGNodeLayoutGetLeft(root_child1)); ASSERT_EQ(50, YGNodeLayoutGetTop(root_child1)); ASSERT_EQ(50, YGNodeLayoutGetWidth(root_child1)); ASSERT_EQ(50, YGNodeLayoutGetHeight(root_child1)); YGNodeFreeRecursive(root); }
O0
cpp
YogaTest_aspect_ratio_flex_shrink_2_Test::YogaTest_aspect_ratio_flex_shrink_2_Test(): pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x10(%rbp) callq 0x7047d0 movq -0x10(%rbp), %rax leaq 0x77daec(%rip), %rcx # 0x85d1b0 addq $0x10, %rcx movq %rcx, (%rax) addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax,%rax)
_ZN40YogaTest_aspect_ratio_flex_shrink_2_TestC2Ev: 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 _ZN7testing4TestC2Ev; testing::Test::Test(void) mov rax, [rbp+var_10] lea rcx, _ZTV40YogaTest_aspect_ratio_flex_shrink_2_Test; `vtable for'YogaTest_aspect_ratio_flex_shrink_2_Test add rcx, 10h mov [rax], rcx add rsp, 10h pop rbp retn
void YogaTest_aspect_ratio_flex_shrink_2_Test::YogaTest_aspect_ratio_flex_shrink_2_Test( YogaTest_aspect_ratio_flex_shrink_2_Test *this) { testing::Test::Test(this); *(_QWORD *)this = (char *)&`vtable for'YogaTest_aspect_ratio_flex_shrink_2_Test + 16; }
YogaTest_aspect_ratio_flex_shrink_2_Test: 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 0x008047d0 MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[0x95d1b0] ADD RCX,0x10 MOV qword ptr [RAX],RCX ADD RSP,0x10 POP RBP RET
/* YogaTest_aspect_ratio_flex_shrink_2_Test::YogaTest_aspect_ratio_flex_shrink_2_Test() */ void __thiscall YogaTest_aspect_ratio_flex_shrink_2_Test::YogaTest_aspect_ratio_flex_shrink_2_Test (YogaTest_aspect_ratio_flex_shrink_2_Test *this) { testing::Test::Test((Test *)this); *(int ***)this = &PTR__YogaTest_aspect_ratio_flex_shrink_2_Test_0095d1c0; return; }
28,797
ggml_graph_cpy
monkey531[P]llama/ggml/src/ggml.c
void ggml_graph_cpy(struct ggml_cgraph * src, struct ggml_cgraph * dst) { GGML_ASSERT(dst->size >= src->n_leafs); GGML_ASSERT(dst->size >= src->n_nodes); GGML_ASSERT(dst->visited_hash_set.size >= src->visited_hash_set.size); dst->n_leafs = src->n_leafs; dst->n_nodes = src->n_nodes; dst->order = src->order; for (int i = 0; i < src->n_leafs; ++i) { dst->leafs[i] = src->leafs[i]; } for (int i = 0; i < src->n_nodes; ++i) { dst->nodes[i] = src->nodes[i]; } for (size_t i = 0; i < src->visited_hash_set.size; ++i) { // copy all hashset keys (tensors) that are in use if (ggml_bitset_get(src->visited_hash_set.used, i)) { ggml_hash_insert(&dst->visited_hash_set, src->visited_hash_set.keys[i]); } } if (dst->grads) { memset(dst->grads, 0, dst->visited_hash_set.size*sizeof(struct ggml_tensor *)); memset(dst->grad_accs, 0, dst->visited_hash_set.size*sizeof(struct ggml_tensor *)); } if (src->grads) { GGML_ASSERT(dst->grads != NULL); GGML_ASSERT(dst->grad_accs != NULL); for (int i = 0; i < src->n_nodes; ++i) { const size_t igrad_src = ggml_hash_find(&src->visited_hash_set, src->nodes[i]); const size_t igrad_dst = ggml_hash_find(&dst->visited_hash_set, dst->nodes[i]); GGML_ASSERT(igrad_src != GGML_HASHSET_FULL); GGML_ASSERT(ggml_bitset_get(src->visited_hash_set.used, igrad_src)); GGML_ASSERT(igrad_dst != GGML_HASHSET_FULL); GGML_ASSERT(ggml_bitset_get(dst->visited_hash_set.used, igrad_dst)); dst->grads[igrad_dst] = src->grads[igrad_src]; dst->grad_accs[igrad_dst] = src->grad_accs[igrad_src]; } } }
O1
c
ggml_graph_cpy: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl (%rsi), %edx movl 0x8(%rdi), %eax cmpl %eax, %edx jl 0x21d58 movq %rdi, %r14 movl 0x4(%rdi), %ecx cmpl %ecx, %edx jl 0x21d74 movq %rsi, %rbx movq 0x30(%rsi), %rdx cmpq 0x30(%r14), %rdx jb 0x21d90 movl %eax, 0x8(%rbx) movl %ecx, 0x4(%rbx) movl 0x48(%r14), %eax movl %eax, 0x48(%rbx) movslq 0x8(%r14), %rax testq %rax, %rax jle 0x21b8a xorl %ecx, %ecx movq 0x28(%r14), %rdx movq (%rdx,%rcx,8), %rdx movq 0x28(%rbx), %rsi movq %rdx, (%rsi,%rcx,8) incq %rcx cmpq %rcx, %rax jne 0x21b72 leaq 0x30(%r14), %r15 movslq 0x4(%r14), %rax testq %rax, %rax jle 0x21bb1 xorl %ecx, %ecx movq 0x10(%r14), %rdx movq (%rdx,%rcx,8), %rdx movq 0x10(%rbx), %rsi movq %rdx, (%rsi,%rcx,8) incq %rcx cmpq %rcx, %rax jne 0x21b99 leaq 0x30(%rbx), %r12 cmpq $0x0, (%r15) je 0x21bea xorl %r13d, %r13d movq 0x38(%r14), %rax movq %r13, %rcx shrq $0x5, %rcx movl (%rax,%rcx,4), %eax btl %r13d, %eax jae 0x21be2 movq 0x40(%r14), %rax movq (%rax,%r13,8), %rsi movq %r12, %rdi callq 0x21de7 incq %r13 cmpq (%r15), %r13 jb 0x21bbe movq 0x18(%rbx), %rdi testq %rdi, %rdi je 0x21c15 movq 0x30(%rbx), %rdx shlq $0x3, %rdx xorl %esi, %esi callq 0x168e0 movq 0x20(%rbx), %rdi movq 0x30(%rbx), %rdx shlq $0x3, %rdx xorl %esi, %esi callq 0x168e0 cmpq $0x0, 0x18(%r14) je 0x21cd4 cmpq $0x0, 0x18(%rbx) je 0x21dac cmpq $0x0, 0x20(%rbx) je 0x21dc8 movslq 0x4(%r14), %rax movq %rax, (%rsp) testq %rax, %rax jle 0x21cd4 xorl %ebp, %ebp movq 0x10(%r14), %rax movq (%rax,%rbp,8), %rsi movq %r15, %rdi callq 0x218e0 movq %rax, %r13 movq 0x10(%rbx), %rax movq (%rax,%rbp,8), %rsi movq %r12, %rdi callq 0x218e0 cmpq $-0x1, %r13 je 0x21ce3 movq 0x38(%r14), %rcx movq %r13, %rdx shrq $0x5, %rdx movl (%rcx,%rdx,4), %ecx btl %r13d, %ecx jae 0x21cff cmpq $-0x1, %rax je 0x21d1b movq 0x38(%rbx), %rcx movq %rax, %rdx shrq $0x5, %rdx movl (%rcx,%rdx,4), %ecx btl %eax, %ecx jae 0x21d37 movq 0x18(%r14), %rcx movq (%rcx,%r13,8), %rcx movq 0x18(%rbx), %rdx movq %rcx, (%rdx,%rax,8) movq 0x20(%r14), %rcx movq (%rcx,%r13,8), %rcx movq 0x20(%rbx), %rdx movq %rcx, (%rdx,%rax,8) incq %rbp cmpq %rbp, (%rsp) jne 0x21c49 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x28925(%rip), %rdi # 0x4a60f leaq 0x28968(%rip), %rdx # 0x4a659 leaq 0x29961(%rip), %rcx # 0x4b659 movl $0x1784, %esi # imm = 0x1784 jmp 0x21d51 leaq 0x28909(%rip), %rdi # 0x4a60f leaq 0x2894c(%rip), %rdx # 0x4a659 leaq 0x29964(%rip), %rcx # 0x4b678 movl $0x1785, %esi # imm = 0x1785 jmp 0x21d51 leaq 0x288ed(%rip), %rdi # 0x4a60f leaq 0x28930(%rip), %rdx # 0x4a659 leaq 0x2997f(%rip), %rcx # 0x4b6af movl $0x1786, %esi # imm = 0x1786 jmp 0x21d51 leaq 0x288d1(%rip), %rdi # 0x4a60f leaq 0x28914(%rip), %rdx # 0x4a659 leaq 0x29982(%rip), %rcx # 0x4b6ce movl $0x1787, %esi # imm = 0x1787 xorl %eax, %eax callq 0x17c70 leaq 0x288b0(%rip), %rdi # 0x4a60f leaq 0x288f3(%rip), %rdx # 0x4a659 leaq 0x29855(%rip), %rcx # 0x4b5c2 movl $0x1762, %esi # imm = 0x1762 jmp 0x21d51 leaq 0x28894(%rip), %rdi # 0x4a60f leaq 0x288d7(%rip), %rdx # 0x4a659 leaq 0x29853(%rip), %rcx # 0x4b5dc movl $0x1763, %esi # imm = 0x1763 jmp 0x21d51 leaq 0x28878(%rip), %rdi # 0x4a60f leaq 0x288bb(%rip), %rdx # 0x4a659 leaq 0x29851(%rip), %rcx # 0x4b5f6 movl $0x1764, %esi # imm = 0x1764 jmp 0x21d51 leaq 0x2885c(%rip), %rdi # 0x4a60f leaq 0x2889f(%rip), %rdx # 0x4a659 leaq 0x2986e(%rip), %rcx # 0x4b62f movl $0x177e, %esi # imm = 0x177E jmp 0x21d51 leaq 0x28840(%rip), %rdi # 0x4a60f leaq 0x28883(%rip), %rdx # 0x4a659 leaq 0x29865(%rip), %rcx # 0x4b642 movl $0x177f, %esi # imm = 0x177F jmp 0x21d51
ggml_graph_cpy: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov edx, [rsi] mov eax, [rdi+8] cmp edx, eax jl loc_21D58 mov r14, rdi mov ecx, [rdi+4] cmp edx, ecx jl loc_21D74 mov rbx, rsi mov rdx, [rsi+30h] cmp rdx, [r14+30h] jb loc_21D90 mov [rbx+8], eax mov [rbx+4], ecx mov eax, [r14+48h] mov [rbx+48h], eax movsxd rax, dword ptr [r14+8] test rax, rax jle short loc_21B8A xor ecx, ecx loc_21B72: mov rdx, [r14+28h] mov rdx, [rdx+rcx*8] mov rsi, [rbx+28h] mov [rsi+rcx*8], rdx inc rcx cmp rax, rcx jnz short loc_21B72 loc_21B8A: lea r15, [r14+30h] movsxd rax, dword ptr [r14+4] test rax, rax jle short loc_21BB1 xor ecx, ecx loc_21B99: mov rdx, [r14+10h] mov rdx, [rdx+rcx*8] mov rsi, [rbx+10h] mov [rsi+rcx*8], rdx inc rcx cmp rax, rcx jnz short loc_21B99 loc_21BB1: lea r12, [rbx+30h] cmp qword ptr [r15], 0 jz short loc_21BEA xor r13d, r13d loc_21BBE: mov rax, [r14+38h] mov rcx, r13 shr rcx, 5 mov eax, [rax+rcx*4] bt eax, r13d jnb short loc_21BE2 mov rax, [r14+40h] mov rsi, [rax+r13*8] mov rdi, r12 call ggml_hash_insert loc_21BE2: inc r13 cmp r13, [r15] jb short loc_21BBE loc_21BEA: mov rdi, [rbx+18h] test rdi, rdi jz short loc_21C15 mov rdx, [rbx+30h] shl rdx, 3 xor esi, esi call _memset mov rdi, [rbx+20h] mov rdx, [rbx+30h] shl rdx, 3 xor esi, esi call _memset loc_21C15: cmp qword ptr [r14+18h], 0 jz loc_21CD4 cmp qword ptr [rbx+18h], 0 jz loc_21DAC cmp qword ptr [rbx+20h], 0 jz loc_21DC8 movsxd rax, dword ptr [r14+4] mov [rsp+38h+var_38], rax test rax, rax jle loc_21CD4 xor ebp, ebp loc_21C49: mov rax, [r14+10h] mov rsi, [rax+rbp*8] mov rdi, r15 call ggml_hash_find mov r13, rax mov rax, [rbx+10h] mov rsi, [rax+rbp*8] mov rdi, r12 call ggml_hash_find cmp r13, 0FFFFFFFFFFFFFFFFh jz short loc_21CE3 mov rcx, [r14+38h] mov rdx, r13 shr rdx, 5 mov ecx, [rcx+rdx*4] bt ecx, r13d jnb short loc_21CFF cmp rax, 0FFFFFFFFFFFFFFFFh jz loc_21D1B mov rcx, [rbx+38h] mov rdx, rax shr rdx, 5 mov ecx, [rcx+rdx*4] bt ecx, eax jnb loc_21D37 mov rcx, [r14+18h] mov rcx, [rcx+r13*8] mov rdx, [rbx+18h] mov [rdx+rax*8], rcx mov rcx, [r14+20h] mov rcx, [rcx+r13*8] mov rdx, [rbx+20h] mov [rdx+rax*8], rcx inc rbp cmp [rsp+38h+var_38], rbp jnz loc_21C49 loc_21CD4: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_21CE3: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aIgradSrcGgmlHa; "igrad_src != GGML_HASHSET_FULL" mov esi, 1784h jmp short loc_21D51 loc_21CFF: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlBitsetGetS; "ggml_bitset_get(src->visited_hash_set.u"... mov esi, 1785h jmp short loc_21D51 loc_21D1B: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aIgradDstGgmlHa; "igrad_dst != GGML_HASHSET_FULL" mov esi, 1786h jmp short loc_21D51 loc_21D37: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlBitsetGetD; "ggml_bitset_get(dst->visited_hash_set.u"... mov esi, 1787h loc_21D51: xor eax, eax call _ggml_abort loc_21D58: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aDstSizeSrcNLea; "dst->size >= src->n_leafs" mov esi, 1762h jmp short loc_21D51 loc_21D74: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aDstSizeSrcNNod; "dst->size >= src->n_nodes" mov esi, 1763h jmp short loc_21D51 loc_21D90: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aDstVisitedHash; "dst->visited_hash_set.size >= src->visi"... mov esi, 1764h jmp short loc_21D51 loc_21DAC: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aDstGradsNull; "dst->grads != NULL" mov esi, 177Eh jmp short loc_21D51 loc_21DC8: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aDstGradAccsNul; "dst->grad_accs != NULL" mov esi, 177Fh jmp loc_21D51
signed long long ggml_graph_cpy(long long a1, long long a2, long long a3, long long a4, int a5, int a6) { int v6; // eax int v8; // ecx long long v9; // rax long long i; // rcx unsigned long long *v11; // r15 signed long long result; // rax long long j; // rcx unsigned long long v14; // r13 long long v15; // rdi long long v16; // rbp unsigned long long v17; // r13 int v18; // ecx int v19; // ecx const char *v20; // rcx int v21; // esi signed long long v22; // [rsp+0h] [rbp-38h] v6 = *(_DWORD *)(a1 + 8); if ( *(_DWORD *)a2 < v6 ) { v20 = "dst->size >= src->n_leafs"; v21 = 5986; goto LABEL_32; } v8 = *(_DWORD *)(a1 + 4); if ( *(_DWORD *)a2 < v8 ) { v20 = "dst->size >= src->n_nodes"; v21 = 5987; goto LABEL_32; } if ( *(_QWORD *)(a2 + 48) < *(_QWORD *)(a1 + 48) ) { v20 = "dst->visited_hash_set.size >= src->visited_hash_set.size"; v21 = 5988; goto LABEL_32; } *(_DWORD *)(a2 + 8) = v6; *(_DWORD *)(a2 + 4) = v8; *(_DWORD *)(a2 + 72) = *(_DWORD *)(a1 + 72); v9 = *(int *)(a1 + 8); if ( v9 > 0 ) { for ( i = 0LL; i != v9; ++i ) *(_QWORD *)(*(_QWORD *)(a2 + 40) + 8 * i) = *(_QWORD *)(*(_QWORD *)(a1 + 40) + 8 * i); } v11 = (unsigned long long *)(a1 + 48); result = *(int *)(a1 + 4); if ( result > 0 ) { for ( j = 0LL; j != result; ++j ) *(_QWORD *)(*(_QWORD *)(a2 + 16) + 8 * j) = *(_QWORD *)(*(_QWORD *)(a1 + 16) + 8 * j); } if ( *v11 ) { v14 = 0LL; do { result = *(unsigned int *)(*(_QWORD *)(a1 + 56) + 4 * (v14 >> 5)); if ( _bittest((const int *)&result, v14) ) result = ggml_hash_insert(a2 + 48, *(_QWORD *)(*(_QWORD *)(a1 + 64) + 8 * v14)); ++v14; } while ( v14 < *v11 ); } v15 = *(_QWORD *)(a2 + 24); if ( v15 ) { memset(v15, 0LL, 8LL * *(_QWORD *)(a2 + 48)); result = memset(*(_QWORD *)(a2 + 32), 0LL, 8LL * *(_QWORD *)(a2 + 48)); } if ( *(_QWORD *)(a1 + 24) ) { if ( !*(_QWORD *)(a2 + 24) ) { v20 = "dst->grads != NULL"; v21 = 6014; goto LABEL_32; } if ( !*(_QWORD *)(a2 + 32) ) { v20 = "dst->grad_accs != NULL"; v21 = 6015; goto LABEL_32; } result = *(int *)(a1 + 4); v22 = result; if ( result > 0 ) { v16 = 0LL; while ( 1 ) { v17 = ggml_hash_find((_QWORD *)(a1 + 48), *(_QWORD *)(*(_QWORD *)(a1 + 16) + 8 * v16)); result = ggml_hash_find((_QWORD *)(a2 + 48), *(_QWORD *)(*(_QWORD *)(a2 + 16) + 8 * v16)); if ( v17 == -1LL ) { v20 = "igrad_src != GGML_HASHSET_FULL"; v21 = 6020; goto LABEL_32; } v18 = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 4 * (v17 >> 5)); if ( !_bittest(&v18, v17) ) { v20 = "ggml_bitset_get(src->visited_hash_set.used, igrad_src)"; v21 = 6021; goto LABEL_32; } if ( result == -1 ) { v20 = "igrad_dst != GGML_HASHSET_FULL"; v21 = 6022; goto LABEL_32; } v19 = *(_DWORD *)(*(_QWORD *)(a2 + 56) + 4 * ((unsigned long long)result >> 5)); if ( !_bittest(&v19, result) ) break; *(_QWORD *)(*(_QWORD *)(a2 + 24) + 8 * result) = *(_QWORD *)(*(_QWORD *)(a1 + 24) + 8 * v17); *(_QWORD *)(*(_QWORD *)(a2 + 32) + 8 * result) = *(_QWORD *)(*(_QWORD *)(a1 + 32) + 8 * v17); if ( v22 == ++v16 ) return result; } v20 = "ggml_bitset_get(dst->visited_hash_set.used, igrad_dst)"; v21 = 6023; LABEL_32: ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c", v21, (unsigned int)"GGML_ASSERT(%s) failed", (_DWORD)v20, a5, a6); } } return result; }
ggml_graph_cpy: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV EDX,dword ptr [RSI] MOV EAX,dword ptr [RDI + 0x8] CMP EDX,EAX JL 0x00121d58 MOV R14,RDI MOV ECX,dword ptr [RDI + 0x4] CMP EDX,ECX JL 0x00121d74 MOV RBX,RSI MOV RDX,qword ptr [RSI + 0x30] CMP RDX,qword ptr [R14 + 0x30] JC 0x00121d90 MOV dword ptr [RBX + 0x8],EAX MOV dword ptr [RBX + 0x4],ECX MOV EAX,dword ptr [R14 + 0x48] MOV dword ptr [RBX + 0x48],EAX MOVSXD RAX,dword ptr [R14 + 0x8] TEST RAX,RAX JLE 0x00121b8a XOR ECX,ECX LAB_00121b72: MOV RDX,qword ptr [R14 + 0x28] MOV RDX,qword ptr [RDX + RCX*0x8] MOV RSI,qword ptr [RBX + 0x28] MOV qword ptr [RSI + RCX*0x8],RDX INC RCX CMP RAX,RCX JNZ 0x00121b72 LAB_00121b8a: LEA R15,[R14 + 0x30] MOVSXD RAX,dword ptr [R14 + 0x4] TEST RAX,RAX JLE 0x00121bb1 XOR ECX,ECX LAB_00121b99: MOV RDX,qword ptr [R14 + 0x10] MOV RDX,qword ptr [RDX + RCX*0x8] MOV RSI,qword ptr [RBX + 0x10] MOV qword ptr [RSI + RCX*0x8],RDX INC RCX CMP RAX,RCX JNZ 0x00121b99 LAB_00121bb1: LEA R12,[RBX + 0x30] CMP qword ptr [R15],0x0 JZ 0x00121bea XOR R13D,R13D LAB_00121bbe: MOV RAX,qword ptr [R14 + 0x38] MOV RCX,R13 SHR RCX,0x5 MOV EAX,dword ptr [RAX + RCX*0x4] BT EAX,R13D JNC 0x00121be2 MOV RAX,qword ptr [R14 + 0x40] MOV RSI,qword ptr [RAX + R13*0x8] MOV RDI,R12 CALL 0x00121de7 LAB_00121be2: INC R13 CMP R13,qword ptr [R15] JC 0x00121bbe LAB_00121bea: MOV RDI,qword ptr [RBX + 0x18] TEST RDI,RDI JZ 0x00121c15 MOV RDX,qword ptr [RBX + 0x30] SHL RDX,0x3 XOR ESI,ESI CALL 0x001168e0 MOV RDI,qword ptr [RBX + 0x20] MOV RDX,qword ptr [RBX + 0x30] SHL RDX,0x3 XOR ESI,ESI CALL 0x001168e0 LAB_00121c15: CMP qword ptr [R14 + 0x18],0x0 JZ 0x00121cd4 CMP qword ptr [RBX + 0x18],0x0 JZ 0x00121dac CMP qword ptr [RBX + 0x20],0x0 JZ 0x00121dc8 MOVSXD RAX,dword ptr [R14 + 0x4] MOV qword ptr [RSP],RAX TEST RAX,RAX JLE 0x00121cd4 XOR EBP,EBP LAB_00121c49: MOV RAX,qword ptr [R14 + 0x10] MOV RSI,qword ptr [RAX + RBP*0x8] MOV RDI,R15 CALL 0x001218e0 MOV R13,RAX MOV RAX,qword ptr [RBX + 0x10] MOV RSI,qword ptr [RAX + RBP*0x8] MOV RDI,R12 CALL 0x001218e0 CMP R13,-0x1 JZ 0x00121ce3 MOV RCX,qword ptr [R14 + 0x38] MOV RDX,R13 SHR RDX,0x5 MOV ECX,dword ptr [RCX + RDX*0x4] BT ECX,R13D JNC 0x00121cff CMP RAX,-0x1 JZ 0x00121d1b MOV RCX,qword ptr [RBX + 0x38] MOV RDX,RAX SHR RDX,0x5 MOV ECX,dword ptr [RCX + RDX*0x4] BT ECX,EAX JNC 0x00121d37 MOV RCX,qword ptr [R14 + 0x18] MOV RCX,qword ptr [RCX + R13*0x8] MOV RDX,qword ptr [RBX + 0x18] MOV qword ptr [RDX + RAX*0x8],RCX MOV RCX,qword ptr [R14 + 0x20] MOV RCX,qword ptr [RCX + R13*0x8] MOV RDX,qword ptr [RBX + 0x20] MOV qword ptr [RDX + RAX*0x8],RCX INC RBP CMP qword ptr [RSP],RBP JNZ 0x00121c49 LAB_00121cd4: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00121ce3: LEA RDI,[0x14a60f] LEA RDX,[0x14a659] LEA RCX,[0x14b659] MOV ESI,0x1784 JMP 0x00121d51 LAB_00121cff: LEA RDI,[0x14a60f] LEA RDX,[0x14a659] LEA RCX,[0x14b678] MOV ESI,0x1785 JMP 0x00121d51 LAB_00121d1b: LEA RDI,[0x14a60f] LEA RDX,[0x14a659] LEA RCX,[0x14b6af] MOV ESI,0x1786 JMP 0x00121d51 LAB_00121d37: LEA RDI,[0x14a60f] LEA RDX,[0x14a659] LEA RCX,[0x14b6ce] MOV ESI,0x1787 LAB_00121d51: XOR EAX,EAX CALL 0x00117c70 LAB_00121d58: LEA RDI,[0x14a60f] LEA RDX,[0x14a659] LEA RCX,[0x14b5c2] MOV ESI,0x1762 JMP 0x00121d51 LAB_00121d74: LEA RDI,[0x14a60f] LEA RDX,[0x14a659] LEA RCX,[0x14b5dc] MOV ESI,0x1763 JMP 0x00121d51 LAB_00121d90: LEA RDI,[0x14a60f] LEA RDX,[0x14a659] LEA RCX,[0x14b5f6] MOV ESI,0x1764 JMP 0x00121d51 LAB_00121dac: LEA RDI,[0x14a60f] LEA RDX,[0x14a659] LEA RCX,[0x14b62f] MOV ESI,0x177e JMP 0x00121d51 LAB_00121dc8: LEA RDI,[0x14a60f] LEA RDX,[0x14a659] LEA RCX,[0x14b642] MOV ESI,0x177f JMP 0x00121d51
void ggml_graph_cpy(long param_1,int *param_2) { ulong *puVar1; int iVar2; ulong uVar3; long lVar4; char *pcVar5; int8 uVar6; ulong uVar7; if (*param_2 < *(int *)(param_1 + 8)) { pcVar5 = "dst->size >= src->n_leafs"; uVar6 = 0x1762; } else { iVar2 = *(int *)(param_1 + 4); if (*param_2 < iVar2) { pcVar5 = "dst->size >= src->n_nodes"; uVar6 = 0x1763; } else if (*(ulong *)(param_2 + 0xc) < *(ulong *)(param_1 + 0x30)) { pcVar5 = "dst->visited_hash_set.size >= src->visited_hash_set.size"; uVar6 = 0x1764; } else { param_2[2] = *(int *)(param_1 + 8); param_2[1] = iVar2; param_2[0x12] = *(int *)(param_1 + 0x48); iVar2 = *(int *)(param_1 + 8); if (0 < (long)iVar2) { lVar4 = 0; do { *(int8 *)(*(long *)(param_2 + 10) + lVar4 * 8) = *(int8 *)(*(long *)(param_1 + 0x28) + lVar4 * 8); lVar4 = lVar4 + 1; } while (iVar2 != lVar4); } puVar1 = (ulong *)(param_1 + 0x30); iVar2 = *(int *)(param_1 + 4); if (0 < (long)iVar2) { lVar4 = 0; do { *(int8 *)(*(long *)(param_2 + 4) + lVar4 * 8) = *(int8 *)(*(long *)(param_1 + 0x10) + lVar4 * 8); lVar4 = lVar4 + 1; } while (iVar2 != lVar4); } if (*puVar1 != 0) { uVar7 = 0; do { if ((*(uint *)(*(long *)(param_1 + 0x38) + (uVar7 >> 5) * 4) >> ((uint)uVar7 & 0x1f) & 1) != 0) { ggml_hash_insert(param_2 + 0xc); } uVar7 = uVar7 + 1; } while (uVar7 < *puVar1); } if (*(void **)(param_2 + 6) != (void *)0x0) { memset(*(void **)(param_2 + 6),0,*(long *)(param_2 + 0xc) << 3); memset(*(void **)(param_2 + 8),0,*(long *)(param_2 + 0xc) << 3); } if (*(long *)(param_1 + 0x18) == 0) { return; } if (*(long *)(param_2 + 6) == 0) { pcVar5 = "dst->grads != NULL"; uVar6 = 0x177e; } else if (*(long *)(param_2 + 8) == 0) { pcVar5 = "dst->grad_accs != NULL"; uVar6 = 0x177f; } else { iVar2 = *(int *)(param_1 + 4); if ((long)iVar2 < 1) { return; } lVar4 = 0; while( true ) { uVar7 = ggml_hash_find(puVar1,*(int8 *)(*(long *)(param_1 + 0x10) + lVar4 * 8)); uVar3 = ggml_hash_find(param_2 + 0xc,*(int8 *)(*(long *)(param_2 + 4) + lVar4 * 8)); if (uVar7 == 0xffffffffffffffff) { pcVar5 = "igrad_src != GGML_HASHSET_FULL"; uVar6 = 0x1784; goto LAB_00121d51; } if ((*(uint *)(*(long *)(param_1 + 0x38) + (uVar7 >> 5) * 4) >> ((uint)uVar7 & 0x1f) & 1) == 0) break; if (uVar3 == 0xffffffffffffffff) { pcVar5 = "igrad_dst != GGML_HASHSET_FULL"; uVar6 = 0x1786; goto LAB_00121d51; } if ((*(uint *)(*(long *)(param_2 + 0xe) + (uVar3 >> 5) * 4) >> ((uint)uVar3 & 0x1f) & 1) == 0) { pcVar5 = "ggml_bitset_get(dst->visited_hash_set.used, igrad_dst)"; uVar6 = 0x1787; goto LAB_00121d51; } *(int8 *)(*(long *)(param_2 + 6) + uVar3 * 8) = *(int8 *)(*(long *)(param_1 + 0x18) + uVar7 * 8); *(int8 *)(*(long *)(param_2 + 8) + uVar3 * 8) = *(int8 *)(*(long *)(param_1 + 0x20) + uVar7 * 8); lVar4 = lVar4 + 1; if (iVar2 == lVar4) { return; } } pcVar5 = "ggml_bitset_get(src->visited_hash_set.used, igrad_src)"; uVar6 = 0x1785; } } } LAB_00121d51: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",uVar6, "GGML_ASSERT(%s) failed",pcVar5); }
28,798
ma_keylength
eloqsql/storage/maria/ma_search.c
uint _ma_keylength(MARIA_KEYDEF *keyinfo, const uchar *key) { reg1 HA_KEYSEG *keyseg; const uchar *start; if (! (keyinfo->flag & (HA_VAR_LENGTH_KEY | HA_BINARY_PACK_KEY))) return (keyinfo->keylength); start= key; for (keyseg=keyinfo->seg ; keyseg->type ; keyseg++) { if (keyseg->flag & HA_NULL_PART) if (!*key++) continue; if (keyseg->flag & (HA_SPACE_PACK | HA_BLOB_PART | HA_VAR_LENGTH_PART)) { uint length; get_key_length(length,key); key+=length; } else key+= keyseg->length; } return((uint) (key-start)+keyseg->length); }
O0
c
ma_keylength: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movzwl 0xa2(%rax), %eax andl $0x28, %eax cmpl $0x0, %eax jne 0x3e972 movq -0x10(%rbp), %rax movzwl 0xaa(%rax), %eax movl %eax, -0x4(%rbp) jmp 0x3ea77 movq -0x18(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movq 0xc0(%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax cmpb $0x0, 0x18(%rax) je 0x3ea5f movq -0x20(%rbp), %rax movzwl 0x12(%rax), %eax andl $0x10, %eax cmpl $0x0, %eax je 0x3e9c2 movq -0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x18(%rbp) cmpb $0x0, (%rax) jne 0x3e9c0 jmp 0x3ea4e jmp 0x3e9c2 movq -0x20(%rbp), %rax movzwl 0x12(%rax), %eax andl $0x29, %eax cmpl $0x0, %eax je 0x3ea36 movq -0x18(%rbp), %rax movzbl (%rax), %eax cmpl $0xff, %eax je 0x3e9f7 movq -0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x18(%rbp) movzbl (%rax), %eax movl %eax, -0x2c(%rbp) jmp 0x3ea24 movq -0x18(%rbp), %rax movzbl 0x2(%rax), %eax movzwl %ax, %eax movq -0x18(%rbp), %rcx movzbl 0x1(%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movzwl %ax, %eax movl %eax, -0x2c(%rbp) movq -0x18(%rbp), %rax addq $0x3, %rax movq %rax, -0x18(%rbp) movl -0x2c(%rbp), %ecx movq -0x18(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x18(%rbp) jmp 0x3ea4c movq -0x20(%rbp), %rax movzwl 0x14(%rax), %ecx movq -0x18(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x18(%rbp) jmp 0x3ea4e movq -0x20(%rbp), %rax addq $0x20, %rax movq %rax, -0x20(%rbp) jmp 0x3e989 movq -0x18(%rbp), %rax movq -0x28(%rbp), %rcx subq %rcx, %rax movq -0x20(%rbp), %rcx movzwl 0x14(%rcx), %ecx addl %ecx, %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax)
_ma_keylength: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] movzx eax, word ptr [rax+0A2h] and eax, 28h cmp eax, 0 jnz short loc_3E972 mov rax, [rbp+var_10] movzx eax, word ptr [rax+0AAh] mov [rbp+var_4], eax jmp loc_3EA77 loc_3E972: mov rax, [rbp+var_18] mov [rbp+var_28], rax mov rax, [rbp+var_10] mov rax, [rax+0C0h] mov [rbp+var_20], rax loc_3E989: mov rax, [rbp+var_20] cmp byte ptr [rax+18h], 0 jz loc_3EA5F mov rax, [rbp+var_20] movzx eax, word ptr [rax+12h] and eax, 10h cmp eax, 0 jz short loc_3E9C2 mov rax, [rbp+var_18] mov rcx, rax add rcx, 1 mov [rbp+var_18], rcx cmp byte ptr [rax], 0 jnz short loc_3E9C0 jmp loc_3EA4E loc_3E9C0: jmp short $+2 loc_3E9C2: mov rax, [rbp+var_20] movzx eax, word ptr [rax+12h] and eax, 29h cmp eax, 0 jz short loc_3EA36 mov rax, [rbp+var_18] movzx eax, byte ptr [rax] cmp eax, 0FFh jz short loc_3E9F7 mov rax, [rbp+var_18] mov rcx, rax add rcx, 1 mov [rbp+var_18], rcx movzx eax, byte ptr [rax] mov [rbp+var_2C], eax jmp short loc_3EA24 loc_3E9F7: mov rax, [rbp+var_18] movzx eax, byte ptr [rax+2] movzx eax, ax mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+1] movzx ecx, cx shl ecx, 8 or eax, ecx movzx eax, ax mov [rbp+var_2C], eax mov rax, [rbp+var_18] add rax, 3 mov [rbp+var_18], rax loc_3EA24: mov ecx, [rbp+var_2C] mov rax, [rbp+var_18] mov ecx, ecx add rax, rcx mov [rbp+var_18], rax jmp short loc_3EA4C loc_3EA36: mov rax, [rbp+var_20] movzx ecx, word ptr [rax+14h] mov rax, [rbp+var_18] movsxd rcx, ecx add rax, rcx mov [rbp+var_18], rax loc_3EA4C: jmp short $+2 loc_3EA4E: mov rax, [rbp+var_20] add rax, 20h ; ' ' mov [rbp+var_20], rax jmp loc_3E989 loc_3EA5F: mov rax, [rbp+var_18] mov rcx, [rbp+var_28] sub rax, rcx mov rcx, [rbp+var_20] movzx ecx, word ptr [rcx+14h] add eax, ecx mov [rbp+var_4], eax loc_3EA77: mov eax, [rbp+var_4] pop rbp retn
long long ma_keylength(long long a1, unsigned __int8 *a2) { unsigned __int8 *v2; // rax unsigned __int8 *v3; // rax int v5; // [rsp+0h] [rbp-2Ch] long long i; // [rsp+Ch] [rbp-20h] unsigned __int8 *v7; // [rsp+14h] [rbp-18h] unsigned __int8 *v8; // [rsp+14h] [rbp-18h] v7 = a2; if ( (*(_WORD *)(a1 + 162) & 0x28) != 0 ) { for ( i = *(_QWORD *)(a1 + 192); *(_BYTE *)(i + 24); i += 32LL ) { if ( (*(_WORD *)(i + 18) & 0x10) != 0 ) { v2 = v7++; if ( !*v2 ) continue; } if ( (*(_WORD *)(i + 18) & 0x29) != 0 ) { if ( *v7 == 255 ) { v5 = _byteswap_ushort(*(_WORD *)(v7 + 1)); v8 = v7 + 3; } else { v3 = v7; v8 = v7 + 1; v5 = *v3; } v7 = &v8[v5]; } else { v7 += *(unsigned __int16 *)(i + 20); } } return (unsigned int)(*(unsigned __int16 *)(i + 20) + (_DWORD)v7 - (_DWORD)a2); } else { return *(unsigned __int16 *)(a1 + 170); } }
_ma_keylength: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX + 0xa2] AND EAX,0x28 CMP EAX,0x0 JNZ 0x0013e972 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX + 0xaa] MOV dword ptr [RBP + -0x4],EAX JMP 0x0013ea77 LAB_0013e972: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xc0] MOV qword ptr [RBP + -0x20],RAX LAB_0013e989: MOV RAX,qword ptr [RBP + -0x20] CMP byte ptr [RAX + 0x18],0x0 JZ 0x0013ea5f MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,word ptr [RAX + 0x12] AND EAX,0x10 CMP EAX,0x0 JZ 0x0013e9c2 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x18],RCX CMP byte ptr [RAX],0x0 JNZ 0x0013e9c0 JMP 0x0013ea4e LAB_0013e9c0: JMP 0x0013e9c2 LAB_0013e9c2: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,word ptr [RAX + 0x12] AND EAX,0x29 CMP EAX,0x0 JZ 0x0013ea36 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] CMP EAX,0xff JZ 0x0013e9f7 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x18],RCX MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x2c],EAX JMP 0x0013ea24 LAB_0013e9f7: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x2] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x1] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX MOV dword ptr [RBP + -0x2c],EAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x3 MOV qword ptr [RBP + -0x18],RAX LAB_0013ea24: MOV ECX,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RBP + -0x18] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX JMP 0x0013ea4c LAB_0013ea36: MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,word ptr [RAX + 0x14] MOV RAX,qword ptr [RBP + -0x18] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX LAB_0013ea4c: JMP 0x0013ea4e LAB_0013ea4e: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x20 MOV qword ptr [RBP + -0x20],RAX JMP 0x0013e989 LAB_0013ea5f: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x28] SUB RAX,RCX MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,word ptr [RCX + 0x14] ADD EAX,ECX MOV dword ptr [RBP + -0x4],EAX LAB_0013ea77: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
uint _ma_keylength(long param_1,byte *param_2) { byte bVar1; byte *pbVar2; uint local_34; long local_28; byte *local_20; uint local_c; if ((*(ushort *)(param_1 + 0xa2) & 0x28) == 0) { local_c = (uint)*(ushort *)(param_1 + 0xaa); } else { local_20 = param_2; for (local_28 = *(long *)(param_1 + 0xc0); *(char *)(local_28 + 0x18) != '\0'; local_28 = local_28 + 0x20) { if (((*(ushort *)(local_28 + 0x12) & 0x10) == 0) || (pbVar2 = local_20 + 1, bVar1 = *local_20, local_20 = pbVar2, bVar1 != 0)) { if ((*(ushort *)(local_28 + 0x12) & 0x29) == 0) { local_20 = local_20 + (int)(uint)*(ushort *)(local_28 + 0x14); } else { if (*local_20 == 0xff) { local_34 = (uint)CONCAT11(local_20[1],local_20[2]); local_20 = local_20 + 3; } else { local_34 = (uint)*local_20; local_20 = local_20 + 1; } local_20 = local_20 + local_34; } } } local_c = ((int)local_20 - (int)param_2) + (uint)*(ushort *)(local_28 + 0x14); } return local_c; }
28,799
JS_ReadSharedArrayBuffer
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_ReadSharedArrayBuffer(BCReaderState *s) { JSContext *ctx = s->ctx; uint32_t byte_length, max_byte_length; uint64_t max_byte_length_u64, *pmax_byte_length = NULL; uint8_t *data_ptr; JSValue obj; uint64_t u64; if (bc_get_leb128(s, &byte_length)) return JS_EXCEPTION; if (bc_get_leb128(s, &max_byte_length)) return JS_EXCEPTION; if (max_byte_length < byte_length) return JS_ThrowTypeError(ctx, "invalid array buffer"); if (max_byte_length != UINT32_MAX) { max_byte_length_u64 = max_byte_length; pmax_byte_length = &max_byte_length_u64; } if (bc_get_u64(s, &u64)) return JS_EXCEPTION; data_ptr = (uint8_t *)(uintptr_t)u64; if (js_resize_array(s->ctx, (void **)&s->sab_tab, sizeof(s->sab_tab[0]), &s->sab_tab_size, s->sab_tab_len + 1)) return JS_EXCEPTION; /* keep the SAB pointer so that the user can clone it or free it */ s->sab_tab[s->sab_tab_len++] = data_ptr; /* the SharedArrayBuffer is cloned */ obj = js_array_buffer_constructor3(ctx, JS_UNDEFINED, byte_length, pmax_byte_length, JS_CLASS_SHARED_ARRAY_BUFFER, data_ptr, NULL, NULL, FALSE); if (JS_IsException(obj)) goto fail; if (BC_add_object_ref(s, obj)) goto fail; return obj; fail: JS_FreeValue(ctx, obj); return JS_EXCEPTION; }
O0
c
JS_ReadSharedArrayBuffer: subq $0x98, %rsp movq %rdi, 0x80(%rsp) movq 0x80(%rsp), %rax movq (%rax), %rax movq %rax, 0x78(%rsp) movq $0x0, 0x60(%rsp) movq 0x80(%rsp), %rdi leaq 0x74(%rsp), %rsi callq 0x78f20 cmpl $0x0, %eax je 0x7b12b movl $0x0, 0x88(%rsp) movq $0x6, 0x90(%rsp) jmp 0x7b368 movq 0x80(%rsp), %rdi leaq 0x70(%rsp), %rsi callq 0x78f20 cmpl $0x0, %eax je 0x7b15e movl $0x0, 0x88(%rsp) movq $0x6, 0x90(%rsp) jmp 0x7b368 movl 0x70(%rsp), %eax cmpl 0x74(%rsp), %eax jae 0x7b190 movq 0x78(%rsp), %rdi leaq 0x92188(%rip), %rsi # 0x10d2fc movb $0x0, %al callq 0x2c040 movq %rax, 0x88(%rsp) movq %rdx, 0x90(%rsp) jmp 0x7b368 cmpl $-0x1, 0x70(%rsp) je 0x7b1aa movl 0x70(%rsp), %eax movq %rax, 0x68(%rsp) leaq 0x68(%rsp), %rax movq %rax, 0x60(%rsp) movq 0x80(%rsp), %rdi leaq 0x40(%rsp), %rsi callq 0x792a0 cmpl $0x0, %eax je 0x7b1dd movl $0x0, 0x88(%rsp) movq $0x6, 0x90(%rsp) jmp 0x7b368 movq 0x40(%rsp), %rax movq %rax, 0x58(%rsp) movq 0x80(%rsp), %rax movq (%rax), %rdi movq 0x80(%rsp), %rsi addq $0x48, %rsi movq 0x80(%rsp), %rcx addq $0x54, %rcx movq 0x80(%rsp), %rax movl 0x50(%rax), %r8d addl $0x1, %r8d movl $0x8, %edx callq 0x71e80 cmpl $0x0, %eax je 0x7b245 movl $0x0, 0x88(%rsp) movq $0x6, 0x90(%rsp) jmp 0x7b368 movq 0x58(%rsp), %rdx movq 0x80(%rsp), %rax movq 0x48(%rax), %rax movq 0x80(%rsp), %rsi movl 0x50(%rsi), %ecx movl %ecx, %edi addl $0x1, %edi movl %edi, 0x50(%rsi) movslq %ecx, %rcx movq %rdx, (%rax,%rcx,8) movq 0x78(%rsp), %rdi movl $0x0, 0x20(%rsp) movq $0x3, 0x28(%rsp) movl 0x74(%rsp), %eax movl %eax, %ecx movq 0x60(%rsp), %r8 movq 0x58(%rsp), %rax movq 0x20(%rsp), %rsi movq 0x28(%rsp), %rdx movl $0x14, %r9d xorl %r10d, %r10d xorl %r10d, %r10d movq %rax, (%rsp) movq $0x0, 0x8(%rsp) movq $0x0, 0x10(%rsp) movl $0x0, 0x18(%rsp) callq 0x56690 movq %rax, 0x30(%rsp) movq %rdx, 0x38(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x48(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x50(%rsp) movq 0x48(%rsp), %rdi movq 0x50(%rsp), %rsi callq 0x22a00 cmpl $0x0, %eax je 0x7b303 jmp 0x7b33d movq 0x80(%rsp), %rdi movq 0x48(%rsp), %rsi movq 0x50(%rsp), %rdx callq 0x7c180 cmpl $0x0, %eax je 0x7b321 jmp 0x7b33d movq 0x48(%rsp), %rax movq %rax, 0x88(%rsp) movq 0x50(%rsp), %rax movq %rax, 0x90(%rsp) jmp 0x7b368 movq 0x78(%rsp), %rdi movq 0x48(%rsp), %rsi movq 0x50(%rsp), %rdx callq 0x229d0 movl $0x0, 0x88(%rsp) movq $0x6, 0x90(%rsp) movq 0x88(%rsp), %rax movq 0x90(%rsp), %rdx addq $0x98, %rsp retq
JS_ReadSharedArrayBuffer: sub rsp, 98h mov [rsp+98h+var_18], rdi mov rax, [rsp+98h+var_18] mov rax, [rax] mov [rsp+98h+var_20], rax mov [rsp+98h+var_38], 0 mov rdi, [rsp+98h+var_18] lea rsi, [rsp+98h+var_24] call bc_get_leb128 cmp eax, 0 jz short loc_7B12B mov dword ptr [rsp+98h+var_10], 0 mov [rsp+98h+var_8], 6 jmp loc_7B368 loc_7B12B: mov rdi, [rsp+98h+var_18] lea rsi, [rsp+98h+var_28] call bc_get_leb128 cmp eax, 0 jz short loc_7B15E mov dword ptr [rsp+98h+var_10], 0 mov [rsp+98h+var_8], 6 jmp loc_7B368 loc_7B15E: mov eax, [rsp+98h+var_28] cmp eax, [rsp+98h+var_24] jnb short loc_7B190 mov rdi, [rsp+98h+var_20] lea rsi, aInvalidArrayBu_0; "invalid array buffer" mov al, 0 call JS_ThrowTypeError mov [rsp+98h+var_10], rax mov [rsp+98h+var_8], rdx jmp loc_7B368 loc_7B190: cmp [rsp+98h+var_28], 0FFFFFFFFh jz short loc_7B1AA mov eax, [rsp+98h+var_28] mov [rsp+98h+var_30], rax lea rax, [rsp+98h+var_30] mov [rsp+98h+var_38], rax loc_7B1AA: mov rdi, [rsp+98h+var_18] lea rsi, [rsp+98h+var_58] call bc_get_u64 cmp eax, 0 jz short loc_7B1DD mov dword ptr [rsp+98h+var_10], 0 mov [rsp+98h+var_8], 6 jmp loc_7B368 loc_7B1DD: mov rax, [rsp+98h+var_58] mov [rsp+98h+var_40], rax mov rax, [rsp+98h+var_18] mov rdi, [rax] mov rsi, [rsp+98h+var_18] add rsi, 48h ; 'H' mov rcx, [rsp+98h+var_18] add rcx, 54h ; 'T' mov rax, [rsp+98h+var_18] mov r8d, [rax+50h] add r8d, 1 mov edx, 8 call js_resize_array cmp eax, 0 jz short loc_7B245 mov dword ptr [rsp+98h+var_10], 0 mov [rsp+98h+var_8], 6 jmp loc_7B368 loc_7B245: mov rdx, [rsp+98h+var_40] mov rax, [rsp+98h+var_18] mov rax, [rax+48h] mov rsi, [rsp+98h+var_18] mov ecx, [rsi+50h] mov edi, ecx add edi, 1 mov [rsi+50h], edi movsxd rcx, ecx mov [rax+rcx*8], rdx mov rdi, [rsp+98h+var_20] mov dword ptr [rsp+98h+var_78], 0 mov [rsp+98h+var_70], 3 mov eax, [rsp+98h+var_24] mov ecx, eax mov r8, [rsp+98h+var_38] mov rax, [rsp+98h+var_40] mov rsi, [rsp+98h+var_78] mov rdx, [rsp+98h+var_70] mov r9d, 14h xor r10d, r10d xor r10d, r10d mov [rsp+98h+var_98], rax mov [rsp+98h+var_90], 0 mov [rsp+98h+var_88], 0 mov [rsp+98h+var_80], 0 call js_array_buffer_constructor3 mov [rsp+98h+var_68], rax mov [rsp+98h+var_60], rdx mov rax, [rsp+98h+var_68] mov [rsp+98h+var_50], rax mov rax, [rsp+98h+var_60] mov [rsp+98h+var_48], rax mov rdi, [rsp+98h+var_50] mov rsi, [rsp+98h+var_48] call JS_IsException_1 cmp eax, 0 jz short loc_7B303 jmp short loc_7B33D loc_7B303: mov rdi, [rsp+98h+var_18] mov rsi, [rsp+98h+var_50] mov rdx, [rsp+98h+var_48] call BC_add_object_ref cmp eax, 0 jz short loc_7B321 jmp short loc_7B33D loc_7B321: mov rax, [rsp+98h+var_50] mov [rsp+98h+var_10], rax mov rax, [rsp+98h+var_48] mov [rsp+98h+var_8], rax jmp short loc_7B368 loc_7B33D: mov rdi, [rsp+98h+var_20] mov rsi, [rsp+98h+var_50] mov rdx, [rsp+98h+var_48] call JS_FreeValue mov dword ptr [rsp+98h+var_10], 0 mov [rsp+98h+var_8], 6 loc_7B368: mov rax, [rsp+98h+var_10] mov rdx, [rsp+98h+var_8] add rsp, 98h retn
long long JS_ReadSharedArrayBuffer( long long *a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, double a6, double a7, __m128 a8, __m128 a9) { long long v9; // rdx long long v10; // rcx long long v11; // r8 long long v12; // r9 __m128 v13; // xmm4 __m128 v14; // xmm5 long long v15; // rdx __m128 v16; // xmm4 __m128 v17; // xmm5 long long v18; // rdx long long v19; // rax int v20; // ecx long long v21; // rdx char v23; // [rsp+0h] [rbp-98h] long long v24; // [rsp+20h] [rbp-78h] long long v25; // [rsp+40h] [rbp-58h] BYREF long long v26; // [rsp+48h] [rbp-50h] long long v27; // [rsp+50h] [rbp-48h] long long v28; // [rsp+58h] [rbp-40h] unsigned long long *v29; // [rsp+60h] [rbp-38h] long long v30; // [rsp+68h] [rbp-30h] BYREF unsigned int v31; // [rsp+70h] [rbp-28h] BYREF unsigned int v32; // [rsp+74h] [rbp-24h] BYREF long long v33; // [rsp+78h] [rbp-20h] long long *v34; // [rsp+80h] [rbp-18h] long long v35; // [rsp+88h] [rbp-10h] long long v36; // [rsp+90h] [rbp-8h] v34 = a1; v33 = *a1; v29 = 0LL; if ( (unsigned int)bc_get_leb128((long long)a1, &v32) ) { LODWORD(v35) = 0; v36 = 6LL; } else if ( (unsigned int)bc_get_leb128((long long)v34, &v31) ) { LODWORD(v35) = 0; v36 = 6LL; } else if ( v31 >= v32 ) { if ( v31 != -1 ) { v30 = v31; v29 = (unsigned long long *)&v30; } if ( (unsigned int)bc_get_u64( (long long)v34, (unsigned long long *)&v25, v9, a2, a3, a4, a5, v13, v14, a8, a9, v10, v11, v12) ) { LODWORD(v35) = 0; v36 = 6LL; } else { v28 = v25; if ( (unsigned int)js_resize_array(*v34, (long long)(v34 + 9), 8u, (_DWORD *)v34 + 21, *((_DWORD *)v34 + 20) + 1) ) { LODWORD(v35) = 0; v36 = 6LL; } else { v18 = v28; v19 = v34[9]; v20 = *((_DWORD *)v34 + 20); *((_DWORD *)v34 + 20) = v20 + 1; *(_QWORD *)(v19 + 8LL * v20) = v18; LODWORD(v24) = 0; v26 = js_array_buffer_constructor3( v33, v24, 3LL, v32, v29, 20LL, a2, a3, a4, a5, v16, v17, a8, a9, v28, 0LL, 0LL, 0); v27 = v21; if ( JS_IsException_1(v26, v21) || (unsigned int)BC_add_object_ref(v34, v26, v27) ) { JS_FreeValue(v33, v26, v27); LODWORD(v35) = 0; v36 = 6LL; } else { v35 = v26; v36 = v27; } } } } else { v35 = JS_ThrowTypeError( v33, (long long)"invalid array buffer", v9, v10, v11, v12, a2, a3, a4, a5, v13, v14, a8, a9, v23); v36 = v15; } return v35; }
JS_ReadSharedArrayBuffer: SUB RSP,0x98 MOV qword ptr [RSP + 0x80],RDI MOV RAX,qword ptr [RSP + 0x80] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x78],RAX MOV qword ptr [RSP + 0x60],0x0 MOV RDI,qword ptr [RSP + 0x80] LEA RSI,[RSP + 0x74] CALL 0x00178f20 CMP EAX,0x0 JZ 0x0017b12b MOV dword ptr [RSP + 0x88],0x0 MOV qword ptr [RSP + 0x90],0x6 JMP 0x0017b368 LAB_0017b12b: MOV RDI,qword ptr [RSP + 0x80] LEA RSI,[RSP + 0x70] CALL 0x00178f20 CMP EAX,0x0 JZ 0x0017b15e MOV dword ptr [RSP + 0x88],0x0 MOV qword ptr [RSP + 0x90],0x6 JMP 0x0017b368 LAB_0017b15e: MOV EAX,dword ptr [RSP + 0x70] CMP EAX,dword ptr [RSP + 0x74] JNC 0x0017b190 MOV RDI,qword ptr [RSP + 0x78] LEA RSI,[0x20d2fc] MOV AL,0x0 CALL 0x0012c040 MOV qword ptr [RSP + 0x88],RAX MOV qword ptr [RSP + 0x90],RDX JMP 0x0017b368 LAB_0017b190: CMP dword ptr [RSP + 0x70],-0x1 JZ 0x0017b1aa MOV EAX,dword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x68],RAX LEA RAX,[RSP + 0x68] MOV qword ptr [RSP + 0x60],RAX LAB_0017b1aa: MOV RDI,qword ptr [RSP + 0x80] LEA RSI,[RSP + 0x40] CALL 0x001792a0 CMP EAX,0x0 JZ 0x0017b1dd MOV dword ptr [RSP + 0x88],0x0 MOV qword ptr [RSP + 0x90],0x6 JMP 0x0017b368 LAB_0017b1dd: MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x58],RAX MOV RAX,qword ptr [RSP + 0x80] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RSP + 0x80] ADD RSI,0x48 MOV RCX,qword ptr [RSP + 0x80] ADD RCX,0x54 MOV RAX,qword ptr [RSP + 0x80] MOV R8D,dword ptr [RAX + 0x50] ADD R8D,0x1 MOV EDX,0x8 CALL 0x00171e80 CMP EAX,0x0 JZ 0x0017b245 MOV dword ptr [RSP + 0x88],0x0 MOV qword ptr [RSP + 0x90],0x6 JMP 0x0017b368 LAB_0017b245: MOV RDX,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RSP + 0x80] MOV RAX,qword ptr [RAX + 0x48] MOV RSI,qword ptr [RSP + 0x80] MOV ECX,dword ptr [RSI + 0x50] MOV EDI,ECX ADD EDI,0x1 MOV dword ptr [RSI + 0x50],EDI MOVSXD RCX,ECX MOV qword ptr [RAX + RCX*0x8],RDX MOV RDI,qword ptr [RSP + 0x78] MOV dword ptr [RSP + 0x20],0x0 MOV qword ptr [RSP + 0x28],0x3 MOV EAX,dword ptr [RSP + 0x74] MOV ECX,EAX MOV R8,qword ptr [RSP + 0x60] MOV RAX,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x28] MOV R9D,0x14 XOR R10D,R10D XOR R10D,R10D MOV qword ptr [RSP],RAX MOV qword ptr [RSP + 0x8],0x0 MOV qword ptr [RSP + 0x10],0x0 MOV dword ptr [RSP + 0x18],0x0 CALL 0x00156690 MOV qword ptr [RSP + 0x30],RAX MOV qword ptr [RSP + 0x38],RDX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x48],RAX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x50],RAX MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x50] CALL 0x00122a00 CMP EAX,0x0 JZ 0x0017b303 JMP 0x0017b33d LAB_0017b303: MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] CALL 0x0017c180 CMP EAX,0x0 JZ 0x0017b321 JMP 0x0017b33d LAB_0017b321: MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x88],RAX MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x90],RAX JMP 0x0017b368 LAB_0017b33d: MOV RDI,qword ptr [RSP + 0x78] MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] CALL 0x001229d0 MOV dword ptr [RSP + 0x88],0x0 MOV qword ptr [RSP + 0x90],0x6 LAB_0017b368: MOV RAX,qword ptr [RSP + 0x88] MOV RDX,qword ptr [RSP + 0x90] ADD RSP,0x98 RET
int1 [16] JS_ReadSharedArrayBuffer(int8 *param_1) { int iVar1; int1 auVar2 [16]; uint uStack_74; int8 local_58; int1 local_50 [16]; int8 local_40; ulong *local_38; ulong local_30; uint local_28; uint local_24; int8 local_20; int8 *local_18; int4 local_10; int4 uStack_c; int8 local_8; local_20 = *param_1; local_38 = (ulong *)0x0; local_18 = param_1; iVar1 = bc_get_leb128(param_1,&local_24); if (iVar1 == 0) { iVar1 = bc_get_leb128(local_18,&local_28); if (iVar1 == 0) { if (local_28 < local_24) { auVar2 = JS_ThrowTypeError(local_20,"invalid array buffer"); local_8 = auVar2._8_8_; local_10 = auVar2._0_4_; uStack_c = auVar2._4_4_; } else { if (local_28 != 0xffffffff) { local_30 = (ulong)local_28; local_38 = &local_30; } iVar1 = bc_get_u64(local_18,&local_58); if (iVar1 == 0) { local_40 = local_58; iVar1 = js_resize_array(*local_18,local_18 + 9,8,(long)local_18 + 0x54, *(int *)(local_18 + 10) + 1); if (iVar1 == 0) { iVar1 = *(int *)(local_18 + 10); *(int *)(local_18 + 10) = iVar1 + 1; *(int8 *)(local_18[9] + (long)iVar1 * 8) = local_40; local_50 = js_array_buffer_constructor3 (local_20,(ulong)uStack_74 << 0x20,3,local_24,local_38,0x14, local_40,0,0,0); iVar1 = JS_IsException(local_50._0_8_,local_50._8_8_); if (iVar1 == 0) { iVar1 = BC_add_object_ref(local_18,local_50._0_8_,local_50._8_8_); if (iVar1 == 0) { local_10 = local_50._0_4_; uStack_c = local_50._4_4_; local_8 = local_50._8_8_; goto LAB_0017b368; } } JS_FreeValue(local_20,local_50._0_8_,local_50._8_8_); local_10 = 0; local_8 = 6; } else { local_10 = 0; local_8 = 6; } } else { local_10 = 0; local_8 = 6; } } } else { local_10 = 0; local_8 = 6; } } else { local_10 = 0; local_8 = 6; } LAB_0017b368: auVar2._4_4_ = uStack_c; auVar2._0_4_ = local_10; auVar2._8_8_ = local_8; return auVar2; }