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
16,800
google::protobuf::MapValueConstRef::GetStringValue[abi:cxx11]() const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/map_field.h
const std::string& GetStringValue() const { TYPE_CHECK(FieldDescriptor::CPPTYPE_STRING, "MapValueConstRef::GetStringValue"); return *reinterpret_cast<std::string*>(data_); }
O3
c
google::protobuf::MapValueConstRef::GetStringValue[abi:cxx11]() const: pushq %r15 pushq %r14 pushq %rbx subq $0x40, %rsp movq %rdi, %rbx callq 0x98410 cmpl $0x9, %eax je 0x9c937 leaq 0xcc642(%rip), %rdx # 0x168ec5 leaq 0x8(%rsp), %r14 movq %r14, %rdi movl $0x3, %esi movl $0x2e2, %ecx # imm = 0x2E2 callq 0x857c2 leaq 0xcc689(%rip), %rsi # 0x168f2a movq %r14, %rdi callq 0x852c0 leaq 0xccc5b(%rip), %rsi # 0x16950b movq %rax, %rdi callq 0x852c0 leaq 0xcc6ae(%rip), %rsi # 0x168f6d movq %rax, %rdi callq 0x852c0 leaq 0xcc6b5(%rip), %rsi # 0x168f83 movq %rax, %rdi callq 0x852c0 leaq 0x16fcb3(%rip), %r15 # 0x20c590 movq 0x48(%r15), %rsi movq %rax, %rdi callq 0x852c0 leaq 0xcf76f(%rip), %rsi # 0x16c05f movq %rax, %rdi callq 0x852c0 leaq 0xcc692(%rip), %rsi # 0x168f91 movq %rax, %rdi callq 0x852c0 movq %rax, %r14 movq %rbx, %rdi callq 0x98410 movl %eax, %eax movq (%r15,%rax,8), %rsi movq %r14, %rdi callq 0x852c0 leaq 0x7(%rsp), %rdi movq %rax, %rsi callq 0x8539a leaq 0x8(%rsp), %rdi callq 0x857e0 movq (%rbx), %rax addq $0x40, %rsp popq %rbx popq %r14 popq %r15 retq jmp 0x9c946 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x857e0 movq %rbx, %rdi callq 0x2e220 nop
_ZNK6google8protobuf16MapValueConstRef14GetStringValueB5cxx11Ev: push r15 push r14 push rbx sub rsp, 40h mov rbx, rdi call _ZNK6google8protobuf16MapValueConstRef4typeEv; google::protobuf::MapValueConstRef::type(void) cmp eax, 9 jz loc_9C937 lea rdx, aWorkspaceLlm4b_22; "/workspace/llm4binary/github2025/aimrt_"... lea r14, [rsp+58h+var_50] mov rdi, r14 mov esi, 3 mov ecx, 2E2h call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) lea rsi, aProtocolBuffer_0; "Protocol Buffer map usage error:\n" mov rdi, r14 call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) lea rsi, aMapvalueconstr_7; "MapValueConstRef::GetStringValue" mov rdi, rax call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) lea rsi, aTypeDoesNotMat; " type does not match\n" mov rdi, rax call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) lea rsi, aExpected; " Expected : " mov rdi, rax call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) lea r15, _ZN6google8protobuf15FieldDescriptor14kCppTypeToNameE; google::protobuf::FieldDescriptor::kCppTypeToName mov rsi, [r15+48h] mov rdi, rax call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) lea rsi, aSyntax0+0Fh; "\n" mov rdi, rax call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) lea rsi, aActual_0; " Actual : " mov rdi, rax call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov r14, rax mov rdi, rbx; this call _ZNK6google8protobuf16MapValueConstRef4typeEv; google::protobuf::MapValueConstRef::type(void) mov eax, eax mov rsi, [r15+rax*8] mov rdi, r14 call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) lea rdi, [rsp+58h+var_51] mov rsi, rax call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) lea rdi, [rsp+58h+var_50]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_9C937: mov rax, [rbx] add rsp, 40h pop rbx pop r14 pop r15 retn jmp short $+2 loc_9C946: mov rbx, rax lea rdi, [rsp+arg_0]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() mov rdi, rbx call __Unwind_Resume
long long google::protobuf::MapValueConstRef::GetStringValue[abi:cxx11]( google::protobuf::MapValueConstRef *this) { long long v1; // rax long long v2; // rax long long v3; // rax long long v4; // rax long long v5; // rax long long v6; // rax long long v7; // r14 unsigned int v8; // eax google::protobuf::internal::LogMessage *v9; // rax char v11; // [rsp+7h] [rbp-51h] BYREF _BYTE v12[80]; // [rsp+8h] [rbp-50h] BYREF if ( (unsigned int)google::protobuf::MapValueConstRef::type(this) != 9 ) { google::protobuf::internal::LogMessage::LogMessage( (long long)v12, 3, (long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/map_field.h", 738); v1 = google::protobuf::internal::LogMessage::operator<<((long long)v12, (long long)"Protocol Buffer map usage error:\n"); v2 = google::protobuf::internal::LogMessage::operator<<(v1, (long long)"MapValueConstRef::GetStringValue"); v3 = google::protobuf::internal::LogMessage::operator<<(v2, (long long)" type does not match\n"); v4 = google::protobuf::internal::LogMessage::operator<<(v3, (long long)" Expected : "); v5 = google::protobuf::internal::LogMessage::operator<<( v4, (long long)*(&google::protobuf::FieldDescriptor::kCppTypeToName + 9)); v6 = google::protobuf::internal::LogMessage::operator<<(v5, (long long)"\n"); v7 = google::protobuf::internal::LogMessage::operator<<(v6, (long long)" Actual : "); v8 = google::protobuf::MapValueConstRef::type(this); v9 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<( v7, (long long)*(&google::protobuf::FieldDescriptor::kCppTypeToName + v8)); google::protobuf::internal::LogFinisher::operator=((long long)&v11, v9); google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v12); } return *(_QWORD *)this; }
GetStringValue[abi:cxx11]: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x40 MOV RBX,RDI CALL 0x00198410 CMP EAX,0x9 JZ 0x0019c937 LEA RDX,[0x268ec5] LEA R14,[RSP + 0x8] MOV RDI,R14 MOV ESI,0x3 MOV ECX,0x2e2 CALL 0x001857c2 LAB_0019c89a: LEA RSI,[0x268f2a] MOV RDI,R14 CALL 0x001852c0 LEA RSI,[0x26950b] MOV RDI,RAX CALL 0x001852c0 LEA RSI,[0x268f6d] MOV RDI,RAX CALL 0x001852c0 LEA RSI,[0x268f83] MOV RDI,RAX CALL 0x001852c0 LEA R15,[0x30c590] MOV RSI,qword ptr [R15 + 0x48] MOV RDI,RAX CALL 0x001852c0 LEA RSI,[0x26c05f] MOV RDI,RAX CALL 0x001852c0 LEA RSI,[0x268f91] MOV RDI,RAX CALL 0x001852c0 MOV R14,RAX MOV RDI,RBX CALL 0x00198410 MOV EAX,EAX MOV RSI,qword ptr [R15 + RAX*0x8] MOV RDI,R14 CALL 0x001852c0 LAB_0019c920: LEA RDI,[RSP + 0x7] MOV RSI,RAX CALL 0x0018539a LAB_0019c92d: LEA RDI,[RSP + 0x8] CALL 0x001857e0 LAB_0019c937: MOV RAX,qword ptr [RBX] ADD RSP,0x40 POP RBX POP R14 POP R15 RET
/* google::protobuf::MapValueConstRef::GetStringValue[abi:cxx11]() const */ int8 __thiscall google::protobuf::MapValueConstRef::GetStringValue_abi_cxx11_(MapValueConstRef *this) { int iVar1; uint uVar2; LogMessage *pLVar3; LogFinisher local_51; LogMessage local_50 [56]; iVar1 = type(this); if (iVar1 != 9) { internal::LogMessage::LogMessage (local_50,3, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/map_field.h" ,0x2e2); /* try { // try from 0019c89a to 0019c91f has its CatchHandler @ 0019c946 */ pLVar3 = (LogMessage *) internal::LogMessage::operator<<(local_50,"Protocol Buffer map usage error:\n"); pLVar3 = (LogMessage *) internal::LogMessage::operator<<(pLVar3,"MapValueConstRef::GetStringValue"); pLVar3 = (LogMessage *)internal::LogMessage::operator<<(pLVar3," type does not match\n"); pLVar3 = (LogMessage *)internal::LogMessage::operator<<(pLVar3," Expected : "); pLVar3 = (LogMessage *) internal::LogMessage::operator<<(pLVar3,(char *)FieldDescriptor::kCppTypeToName._72_8_) ; pLVar3 = (LogMessage *)internal::LogMessage::operator<<(pLVar3,"\n"); pLVar3 = (LogMessage *)internal::LogMessage::operator<<(pLVar3," Actual : "); uVar2 = type(this); pLVar3 = (LogMessage *) internal::LogMessage::operator<< (pLVar3,*(char **)(FieldDescriptor::kCppTypeToName + (ulong)uVar2 * 8)); /* try { // try from 0019c920 to 0019c92c has its CatchHandler @ 0019c944 */ internal::LogFinisher::operator=(&local_51,pLVar3); internal::LogMessage::~LogMessage(local_50); } return *(int8 *)this; }
16,801
js_array_buffer_transfer
bluesky950520[P]quickjs/quickjs.c
static JSValue js_array_buffer_transfer(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { BOOL transfer_to_fixed_length = magic & 1; JSArrayBuffer *abuf; uint64_t new_len, old_len, max_len, *pmax_len; uint8_t *bs, *new_bs; abuf = JS_GetOpaque2(ctx, this_val, JS_CLASS_ARRAY_BUFFER); if (!abuf) return JS_EXCEPTION; if (abuf->shared) return JS_ThrowTypeError(ctx, "cannot transfer a SharedArrayBuffer"); if (argc < 1 || JS_IsUndefined(argv[0])) new_len = abuf->byte_length; else if (JS_ToIndex(ctx, &new_len, argv[0])) return JS_EXCEPTION; if (abuf->detached) return JS_ThrowTypeErrorDetachedArrayBuffer(ctx); pmax_len = NULL; if (!transfer_to_fixed_length) { if (array_buffer_is_resizable(abuf)) { // carry over maxByteLength max_len = abuf->max_byte_length; if (new_len > max_len) return JS_ThrowTypeError(ctx, "invalid array buffer length"); // TODO(bnoordhuis) support externally managed RABs if (abuf->free_func == js_array_buffer_free) pmax_len = &max_len; } } /* create an empty AB */ if (new_len == 0) { JS_DetachArrayBuffer(ctx, this_val); return js_array_buffer_constructor2(ctx, JS_UNDEFINED, 0, pmax_len, JS_CLASS_ARRAY_BUFFER); } bs = abuf->data; old_len = abuf->byte_length; /* if length mismatch, realloc. Otherwise, use the same backing buffer. */ if (new_len != old_len) { new_bs = js_realloc(ctx, bs, new_len); if (!new_bs) return JS_EXCEPTION; bs = new_bs; if (new_len > old_len) memset(bs + old_len, 0, new_len - old_len); } /* neuter the backing buffer */ abuf->data = NULL; abuf->byte_length = 0; abuf->detached = TRUE; return js_array_buffer_constructor3(ctx, JS_UNDEFINED, new_len, pmax_len, JS_CLASS_ARRAY_BUFFER, bs, abuf->free_func, NULL, FALSE); }
O3
c
js_array_buffer_transfer: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %r14 movq %rdi, %rbx cmpl $-0x1, %r14d jne 0x82004 movq %rsi, %r15 cmpw $0x13, 0x6(%rsi) jne 0x82004 movq 0x30(%r15), %r12 testq %r12, %r12 je 0x82004 cmpb $0x0, 0x9(%r12) je 0x8201b leaq 0x21ea4(%rip), %rsi # 0xa3ea6 jmp 0x82043 movq %rbx, %rdi movl $0x13, %esi callq 0x270bb movl $0x6, %edx xorl %r14d, %r14d jmp 0x82055 movl %r9d, %ebp testl %ecx, %ecx jle 0x8202b movq 0x8(%r8), %rcx cmpl $0x3, %ecx jne 0x8206c movslq (%r12), %rax movq %rax, 0x8(%rsp) cmpb $0x0, 0x8(%r12) je 0x82082 leaq 0x21c68(%rip), %rsi # 0xa3cab xorl %r14d, %r14d movq %rbx, %rdi xorl %eax, %eax callq 0x2214f movl $0x6, %edx xorl %ecx, %ecx movl %r14d, %eax orq %rcx, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq (%r8), %rdx leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x274b4 testl %eax, %eax jne 0x82011 jmp 0x82034 testb $0x1, %bpl jne 0x820ae movslq 0x4(%r12), %rax movq 0x8(%rsp), %r13 testq %rax, %rax js 0x820b3 movq %rax, 0x10(%rsp) cmpq %rax, %r13 jbe 0x82179 leaq 0x21bc3(%rip), %rsi # 0xa3c6f jmp 0x82043 movq 0x8(%rsp), %r13 xorl %ebp, %ebp testq %r13, %r13 je 0x82129 movq 0x10(%r12), %r14 movslq (%r12), %r15 cmpq %r15, %r13 je 0x820f7 movq %rbx, %rdi movq %r14, %rsi movq %r13, %rdx callq 0x1c884 testq %rax, %rax je 0x82011 movq %rax, %r14 movq %r13, %rdx subq %r15, %rdx jbe 0x820f7 movq %r14, %rdi addq %r15, %rdi xorl %esi, %esi callq 0xe340 xorl %eax, %eax movq %rax, 0x10(%r12) movl %eax, (%r12) movb $0x1, 0x8(%r12) movl $0x3, %edx movq %rbx, %rdi xorl %esi, %esi movq %r13, %rcx movq %rbp, %r8 movl $0x13, %r9d pushq %rax pushq %rax pushq 0x30(%r12) pushq %r14 jmp 0x8215b movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x395d4 xorl %eax, %eax leaq -0x48baa(%rip), %r10 # 0x39596 movl $0x3, %edx movq %rbx, %rdi xorl %esi, %esi xorl %ecx, %ecx movq %rbp, %r8 movl $0x13, %r9d pushq $0x1 pushq %rax pushq %r10 pushq %rax callq 0x392b3 addq $0x20, %rsp movq %rax, %r14 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rax, %rcx jmp 0x82057 leaq -0x48bea(%rip), %rax # 0x39596 xorl %ecx, %ecx cmpq %rax, 0x30(%r12) leaq 0x10(%rsp), %rbp cmovneq %rcx, %rbp jmp 0x820b5
js_array_buffer_transfer: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r14, rdx mov rbx, rdi cmp r14d, 0FFFFFFFFh jnz short loc_82004 mov r15, rsi cmp word ptr [rsi+6], 13h jnz short loc_82004 mov r12, [r15+30h] test r12, r12 jz short loc_82004 cmp byte ptr [r12+9], 0 jz short loc_8201B lea rsi, aCannotTransfer; "cannot transfer a SharedArrayBuffer" jmp short loc_82043 loc_82004: mov rdi, rbx mov esi, 13h call JS_ThrowTypeErrorInvalidClass loc_82011: mov edx, 6 xor r14d, r14d jmp short loc_82055 loc_8201B: mov ebp, r9d test ecx, ecx jle short loc_8202B mov rcx, [r8+8] cmp ecx, 3 jnz short loc_8206C loc_8202B: movsxd rax, dword ptr [r12] mov [rsp+48h+var_40], rax loc_82034: cmp byte ptr [r12+8], 0 jz short loc_82082 lea rsi, aArraybufferIsD; "ArrayBuffer is detached" loc_82043: xor r14d, r14d mov rdi, rbx xor eax, eax call JS_ThrowTypeError mov edx, 6 loc_82055: xor ecx, ecx loc_82057: mov eax, r14d or rax, rcx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_8206C: mov rdx, [r8] lea rsi, [rsp+48h+var_40] mov rdi, rbx call JS_ToIndex test eax, eax jnz short loc_82011 jmp short loc_82034 loc_82082: test bpl, 1 jnz short loc_820AE movsxd rax, dword ptr [r12+4] mov r13, [rsp+48h+var_40] test rax, rax js short loc_820B3 mov [rsp+48h+var_38], rax cmp r13, rax jbe loc_82179 lea rsi, aInvalidArrayBu; "invalid array buffer length" jmp short loc_82043 loc_820AE: mov r13, [rsp+48h+var_40] loc_820B3: xor ebp, ebp loc_820B5: test r13, r13 jz short loc_82129 mov r14, [r12+10h] movsxd r15, dword ptr [r12] cmp r13, r15 jz short loc_820F7 mov rdi, rbx mov rsi, r14 mov rdx, r13 call js_realloc test rax, rax jz loc_82011 mov r14, rax mov rdx, r13 sub rdx, r15 jbe short loc_820F7 mov rdi, r14 add rdi, r15 xor esi, esi call _memset loc_820F7: xor eax, eax mov [r12+10h], rax mov [r12], eax mov byte ptr [r12+8], 1 mov edx, 3 mov rdi, rbx xor esi, esi mov rcx, r13 mov r8, rbp mov r9d, 13h push rax push rax push qword ptr [r12+30h] push r14 jmp short loc_8215B loc_82129: mov rdi, rbx mov rsi, r15 mov rdx, r14 call JS_DetachArrayBuffer xor eax, eax lea r10, js_array_buffer_free mov edx, 3 mov rdi, rbx xor esi, esi xor ecx, ecx mov r8, rbp mov r9d, 13h push 1 push rax push r10 push rax loc_8215B: call js_array_buffer_constructor3 add rsp, 20h mov r14, rax mov rcx, 0FFFFFFFF00000000h and rcx, rax jmp loc_82057 loc_82179: lea rax, js_array_buffer_free xor ecx, ecx cmp [r12+30h], rax lea rbp, [rsp+48h+var_38] cmovnz rbp, rcx jmp loc_820B5
unsigned long long js_array_buffer_transfer( 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; // r12 const char *v15; // rsi unsigned int v16; // r14d char v17; // bp unsigned long long v18; // rcx long long v20; // rax unsigned long long v21; // r13 unsigned long long *v22; // rbp long long v23; // r14 unsigned long long v24; // r15 long long v25; // rax unsigned long long v26; // rax __m128 v27; // xmm4 __m128 v28; // xmm5 char v29; // [rsp+0h] [rbp-48h] unsigned long long v30; // [rsp+8h] [rbp-40h] BYREF long long v31; // [rsp+10h] [rbp-38h] BYREF if ( (_DWORD)a3 != -1 || *(_WORD *)(a2 + 6) != 19 || (v14 = *(int **)(a2 + 48)) == 0LL ) { JS_ThrowTypeErrorInvalidClass(a1, 19, a7, a8, a9, a10, *(double *)a11.m128_u64, *(double *)a12.m128_u64, a13, a14); goto LABEL_7; } if ( *((_BYTE *)v14 + 9) ) { v15 = "cannot transfer a SharedArrayBuffer"; LABEL_13: v16 = 0; JS_ThrowTypeError(a1, (long long)v15, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v29); goto LABEL_14; } v17 = a6; if ( (int)a4 <= 0 || (a4 = *(_QWORD *)(a5 + 8), (_DWORD)a4 == 3) ) { v30 = *v14; } else if ( (unsigned int)JS_ToIndex( a1, &v30, *(_DWORD **)a5, a4, a7, a8, a9, a10, *(double *)a11.m128_u64, *(double *)a12.m128_u64, a13, a14) ) { goto LABEL_7; } if ( *((_BYTE *)v14 + 8) ) { v15 = "ArrayBuffer is detached"; goto LABEL_13; } if ( (v17 & 1) != 0 ) { v21 = v30; } else { v20 = v14[1]; v21 = v30; if ( v20 >= 0 ) { v31 = v14[1]; if ( v30 > v20 ) { v15 = "invalid array buffer length"; goto LABEL_13; } v22 = (unsigned long long *)&v31; if ( *((long long ( **)(long long, long long, long long))v14 + 6) != js_array_buffer_free ) v22 = 0LL; goto LABEL_24; } } v22 = 0LL; LABEL_24: if ( !v21 ) { JS_DetachArrayBuffer(a1, a2, -1); v26 = js_array_buffer_constructor3( a1, 0LL, 3LL, 0LL, v22, 19LL, a7, a8, a9, a10, v27, v28, a13, a14, 0LL, (long long ( *)())js_array_buffer_free, 0LL, 1u); goto LABEL_31; } v23 = *((_QWORD *)v14 + 2); v24 = *v14; if ( v21 == v24 ) { LABEL_29: *((_QWORD *)v14 + 2) = 0LL; *v14 = 0; *((_BYTE *)v14 + 8) = 1; v26 = js_array_buffer_constructor3( a1, 0LL, 3LL, v21, v22, 19LL, a7, a8, a9, a10, a11, a12, a13, a14, v23, *((long long ( **)())v14 + 6), 0LL, 0); LABEL_31: v16 = v26; v18 = v26 & 0xFFFFFFFF00000000LL; return v18 | v16; } v25 = js_realloc(a1, *((_QWORD *)v14 + 2), v21); if ( v25 ) { v23 = v25; if ( v21 > v24 ) memset(v24 + v25, 0LL, v21 - v24); goto LABEL_29; } LABEL_7: v16 = 0; LABEL_14: v18 = 0LL; return v18 | v16; }
js_array_buffer_transfer: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R14,RDX MOV RBX,RDI CMP R14D,-0x1 JNZ 0x00182004 MOV R15,RSI CMP word ptr [RSI + 0x6],0x13 JNZ 0x00182004 MOV R12,qword ptr [R15 + 0x30] TEST R12,R12 JZ 0x00182004 CMP byte ptr [R12 + 0x9],0x0 JZ 0x0018201b LEA RSI,[0x1a3ea6] JMP 0x00182043 LAB_00182004: MOV RDI,RBX MOV ESI,0x13 CALL 0x001270bb LAB_00182011: MOV EDX,0x6 XOR R14D,R14D JMP 0x00182055 LAB_0018201b: MOV EBP,R9D TEST ECX,ECX JLE 0x0018202b MOV RCX,qword ptr [R8 + 0x8] CMP ECX,0x3 JNZ 0x0018206c LAB_0018202b: MOVSXD RAX,dword ptr [R12] MOV qword ptr [RSP + 0x8],RAX LAB_00182034: CMP byte ptr [R12 + 0x8],0x0 JZ 0x00182082 LEA RSI,[0x1a3cab] LAB_00182043: XOR R14D,R14D MOV RDI,RBX XOR EAX,EAX CALL 0x0012214f MOV EDX,0x6 LAB_00182055: XOR ECX,ECX LAB_00182057: MOV EAX,R14D OR RAX,RCX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0018206c: MOV RDX,qword ptr [R8] LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x001274b4 TEST EAX,EAX JNZ 0x00182011 JMP 0x00182034 LAB_00182082: TEST BPL,0x1 JNZ 0x001820ae MOVSXD RAX,dword ptr [R12 + 0x4] MOV R13,qword ptr [RSP + 0x8] TEST RAX,RAX JS 0x001820b3 MOV qword ptr [RSP + 0x10],RAX CMP R13,RAX JBE 0x00182179 LEA RSI,[0x1a3c6f] JMP 0x00182043 LAB_001820ae: MOV R13,qword ptr [RSP + 0x8] LAB_001820b3: XOR EBP,EBP LAB_001820b5: TEST R13,R13 JZ 0x00182129 MOV R14,qword ptr [R12 + 0x10] MOVSXD R15,dword ptr [R12] CMP R13,R15 JZ 0x001820f7 MOV RDI,RBX MOV RSI,R14 MOV RDX,R13 CALL 0x0011c884 TEST RAX,RAX JZ 0x00182011 MOV R14,RAX MOV RDX,R13 SUB RDX,R15 JBE 0x001820f7 MOV RDI,R14 ADD RDI,R15 XOR ESI,ESI CALL 0x0010e340 LAB_001820f7: XOR EAX,EAX MOV qword ptr [R12 + 0x10],RAX MOV dword ptr [R12],EAX MOV byte ptr [R12 + 0x8],0x1 MOV EDX,0x3 MOV RDI,RBX XOR ESI,ESI MOV RCX,R13 MOV R8,RBP MOV R9D,0x13 PUSH RAX PUSH RAX PUSH qword ptr [R12 + 0x30] PUSH R14 JMP 0x0018215b LAB_00182129: MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 CALL 0x001395d4 XOR EAX,EAX LEA R10,[0x139596] MOV EDX,0x3 MOV RDI,RBX XOR ESI,ESI XOR ECX,ECX MOV R8,RBP MOV R9D,0x13 PUSH 0x1 PUSH RAX PUSH R10 PUSH RAX LAB_0018215b: CALL 0x001392b3 ADD RSP,0x20 MOV R14,RAX MOV RCX,-0x100000000 AND RCX,RAX JMP 0x00182057 LAB_00182179: LEA RAX,[0x139596] XOR ECX,ECX CMP qword ptr [R12 + 0x30],RAX LEA RBP,[RSP + 0x10] CMOVNZ RBP,RCX JMP 0x001820b5
ulong js_array_buffer_transfer (int8 param_1,long param_2,int8 param_3,int param_4,int8 *param_5, ulong param_6) { int *piVar1; int iVar2; ulong uVar3; long lVar4; ulong uVar5; ulong *puVar6; char *pcVar7; code *pcVar8; int8 uVar9; ulong local_40; ulong local_38; if ((((int)param_3 == -1) && (*(short *)(param_2 + 6) == 0x13)) && (piVar1 = *(int **)(param_2 + 0x30), piVar1 != (int *)0x0)) { if (*(char *)((long)piVar1 + 9) == '\0') { if ((param_4 < 1) || ((int)param_5[1] == 3)) { local_40 = (ulong)*piVar1; } else { iVar2 = JS_ToIndex(param_1,&local_40,*param_5); if (iVar2 != 0) goto LAB_00182055; } uVar5 = local_40; if ((char)piVar1[2] == '\0') { if (((param_6 & 1) == 0) && (uVar3 = (ulong)piVar1[1], -1 < (long)uVar3)) { local_38 = uVar3; if (uVar3 < local_40) { pcVar7 = "invalid array buffer length"; goto LAB_00182043; } puVar6 = &local_38; if (*(code **)(piVar1 + 0xc) != js_array_buffer_free) { puVar6 = (ulong *)0x0; } } else { puVar6 = (ulong *)0x0; } if (local_40 == 0) { JS_DetachArrayBuffer(param_1,param_2,param_3); uVar5 = 0; uVar9 = 1; pcVar8 = js_array_buffer_free; lVar4 = 0; } else { lVar4 = *(long *)(piVar1 + 4); uVar3 = (ulong)*piVar1; if (local_40 != uVar3) { lVar4 = js_realloc(param_1,lVar4,local_40); if (lVar4 == 0) goto LAB_00182055; if (uVar3 <= uVar5 && uVar5 - uVar3 != 0) { memset((void *)(lVar4 + uVar3),0,uVar5 - uVar3); } } piVar1[4] = 0; piVar1[5] = 0; *piVar1 = 0; *(int1 *)(piVar1 + 2) = 1; uVar9 = 0; pcVar8 = *(code **)(piVar1 + 0xc); } uVar5 = js_array_buffer_constructor3(param_1,0,3,uVar5,puVar6,0x13,lVar4,pcVar8,0,uVar9); uVar3 = uVar5 & 0xffffffff00000000; goto LAB_00182057; } pcVar7 = "ArrayBuffer is detached"; } else { pcVar7 = "cannot transfer a SharedArrayBuffer"; } LAB_00182043: JS_ThrowTypeError(param_1,pcVar7); } else { JS_ThrowTypeErrorInvalidClass(param_1,0x13); } LAB_00182055: uVar5 = 0; uVar3 = 0; LAB_00182057: return uVar5 & 0xffffffff | uVar3; }
16,802
nice_time
eloqsql/unittest/mytap/tap.c
static void nice_time(double sec,char *buff, my_bool part_second) { ulong tmp; if (sec >= 3600.0*24) { tmp=(ulong) (sec/(3600.0*24)); sec-=3600.0*24*tmp; buff+= sprintf(buff, "%ld %s", tmp, tmp > 1 ? " days " : " day "); } if (sec >= 3600.0) { tmp=(ulong) (sec/3600.0); sec-=3600.0*tmp; buff+= sprintf(buff, "%ld %s", tmp, tmp > 1 ? " hours " : " hour "); } if (sec >= 60.0) { tmp=(ulong) (sec/60.0); sec-=60.0*tmp; buff+= sprintf(buff, "%ld min ", tmp); } if (part_second) sprintf(buff,"%.2f sec",sec); else sprintf(buff,"%d sec",(int) sec); }
O0
c
nice_time: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movb %sil, %al movsd %xmm0, -0x8(%rbp) movq %rdi, -0x10(%rbp) movb %al, -0x11(%rbp) movsd -0x8(%rbp), %xmm0 movsd 0x5852c(%rip), %xmm1 # 0x7dae0 ucomisd %xmm1, %xmm0 jb 0x2567a movsd -0x8(%rbp), %xmm0 movsd 0x58515(%rip), %xmm1 # 0x7dae0 divsd %xmm1, %xmm0 movaps %xmm0, %xmm1 cvttsd2si %xmm1, %rax movq %rax, %rdx sarq $0x3f, %rdx movsd 0x5850a(%rip), %xmm1 # 0x7daf0 subsd %xmm1, %xmm0 cvttsd2si %xmm0, %rcx andq %rdx, %rcx orq %rcx, %rax movq %rax, -0x20(%rbp) movaps 0x584c0(%rip), %xmm1 # 0x7dac0 movq -0x20(%rbp), %xmm0 punpckldq %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1] movapd 0x584bf(%rip), %xmm1 # 0x7dad0 subpd %xmm1, %xmm0 movaps %xmm0, %xmm1 unpckhpd %xmm0, %xmm0 # xmm0 = xmm0[1,1] addsd %xmm1, %xmm0 movsd -0x8(%rbp), %xmm1 movsd 0x584bb(%rip), %xmm2 # 0x7dae8 mulsd %xmm2, %xmm0 addsd %xmm1, %xmm0 movsd %xmm0, -0x8(%rbp) movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rdx movq -0x20(%rbp), %rsi leaq 0x53b81(%rip), %rcx # 0x791ce leaq 0x53b73(%rip), %rax # 0x791c7 cmpq $0x1, %rsi cmovaq %rax, %rcx leaq 0x53b5d(%rip), %rsi # 0x791c0 movb $0x0, %al callq 0x240b0 movl %eax, %ecx movq -0x10(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) movsd -0x8(%rbp), %xmm0 movsd 0x58471(%rip), %xmm1 # 0x7daf8 ucomisd %xmm1, %xmm0 jb 0x2574d movsd -0x8(%rbp), %xmm0 movsd 0x5845a(%rip), %xmm1 # 0x7daf8 divsd %xmm1, %xmm0 movaps %xmm0, %xmm1 cvttsd2si %xmm1, %rax movq %rax, %rdx sarq $0x3f, %rdx movsd 0x58437(%rip), %xmm1 # 0x7daf0 subsd %xmm1, %xmm0 cvttsd2si %xmm0, %rcx andq %rdx, %rcx orq %rcx, %rax movq %rax, -0x20(%rbp) movaps 0x583ed(%rip), %xmm1 # 0x7dac0 movq -0x20(%rbp), %xmm0 punpckldq %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1] movapd 0x583ec(%rip), %xmm1 # 0x7dad0 subpd %xmm1, %xmm0 movaps %xmm0, %xmm1 unpckhpd %xmm0, %xmm0 # xmm0 = xmm0[1,1] addsd %xmm1, %xmm0 movsd -0x8(%rbp), %xmm1 movsd 0x58400(%rip), %xmm2 # 0x7db00 mulsd %xmm2, %xmm0 addsd %xmm1, %xmm0 movsd %xmm0, -0x8(%rbp) movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rdx movq -0x20(%rbp), %rsi leaq 0x53abc(%rip), %rcx # 0x791dc leaq 0x53aad(%rip), %rax # 0x791d4 cmpq $0x1, %rsi cmovaq %rax, %rcx leaq 0x53a8a(%rip), %rsi # 0x791c0 movb $0x0, %al callq 0x240b0 movl %eax, %ecx movq -0x10(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) movsd -0x8(%rbp), %xmm0 movsd 0x583ae(%rip), %xmm1 # 0x7db08 ucomisd %xmm1, %xmm0 jb 0x25806 movsd -0x8(%rbp), %xmm0 movsd 0x58397(%rip), %xmm1 # 0x7db08 divsd %xmm1, %xmm0 movaps %xmm0, %xmm1 cvttsd2si %xmm1, %rax movq %rax, %rdx sarq $0x3f, %rdx movsd 0x58364(%rip), %xmm1 # 0x7daf0 subsd %xmm1, %xmm0 cvttsd2si %xmm0, %rcx andq %rdx, %rcx orq %rcx, %rax movq %rax, -0x20(%rbp) movaps 0x5831a(%rip), %xmm1 # 0x7dac0 movq -0x20(%rbp), %xmm0 punpckldq %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1] movapd 0x58319(%rip), %xmm1 # 0x7dad0 subpd %xmm1, %xmm0 movaps %xmm0, %xmm1 unpckhpd %xmm0, %xmm0 # xmm0 = xmm0[1,1] addsd %xmm1, %xmm0 movsd -0x8(%rbp), %xmm1 movsd 0x5833d(%rip), %xmm2 # 0x7db10 mulsd %xmm2, %xmm0 addsd %xmm1, %xmm0 movsd %xmm0, -0x8(%rbp) movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rdx leaq 0x539f4(%rip), %rsi # 0x791e3 movb $0x0, %al callq 0x240b0 movl %eax, %ecx movq -0x10(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) cmpb $0x0, -0x11(%rbp) je 0x25825 movq -0x10(%rbp), %rdi movsd -0x8(%rbp), %xmm0 leaq 0x539d0(%rip), %rsi # 0x791ec movb $0x1, %al callq 0x240b0 jmp 0x2583c movq -0x10(%rbp), %rdi cvttsd2si -0x8(%rbp), %edx leaq 0x539c0(%rip), %rsi # 0x791f5 movb $0x0, %al callq 0x240b0 addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
nice_time: push rbp mov rbp, rsp sub rsp, 20h mov al, sil movsd [rbp+var_8], xmm0 mov [rbp+var_10], rdi mov [rbp+var_11], al movsd xmm0, [rbp+var_8] movsd xmm1, cs:qword_7DAE0 ucomisd xmm0, xmm1 jb loc_2567A movsd xmm0, [rbp+var_8] movsd xmm1, cs:qword_7DAE0 divsd xmm0, xmm1 movaps xmm1, xmm0 cvttsd2si rax, xmm1 mov rdx, rax sar rdx, 3Fh movsd xmm1, cs:qword_7DAF0 subsd xmm0, xmm1 cvttsd2si rcx, xmm0 and rcx, rdx or rax, rcx mov [rbp+var_20], rax movaps xmm1, cs:xmmword_7DAC0 movq xmm0, [rbp+var_20] punpckldq xmm0, xmm1 movapd xmm1, cs:xmmword_7DAD0 subpd xmm0, xmm1 movaps xmm1, xmm0 unpckhpd xmm0, xmm0 addsd xmm0, xmm1 movsd xmm1, [rbp+var_8] movsd xmm2, cs:qword_7DAE8 mulsd xmm0, xmm2 addsd xmm0, xmm1 movsd [rbp+var_8], xmm0 mov rdi, [rbp+var_10] mov rdx, [rbp+var_20] mov rsi, [rbp+var_20] lea rcx, aDay; " day " lea rax, aDays; " days " cmp rsi, 1 cmova rcx, rax lea rsi, aLdS; "%ld %s" mov al, 0 call _sprintf mov ecx, eax mov rax, [rbp+var_10] movsxd rcx, ecx add rax, rcx mov [rbp+var_10], rax loc_2567A: movsd xmm0, [rbp+var_8] movsd xmm1, cs:qword_7DAF8 ucomisd xmm0, xmm1 jb loc_2574D movsd xmm0, [rbp+var_8] movsd xmm1, cs:qword_7DAF8 divsd xmm0, xmm1 movaps xmm1, xmm0 cvttsd2si rax, xmm1 mov rdx, rax sar rdx, 3Fh movsd xmm1, cs:qword_7DAF0 subsd xmm0, xmm1 cvttsd2si rcx, xmm0 and rcx, rdx or rax, rcx mov [rbp+var_20], rax movaps xmm1, cs:xmmword_7DAC0 movq xmm0, [rbp+var_20] punpckldq xmm0, xmm1 movapd xmm1, cs:xmmword_7DAD0 subpd xmm0, xmm1 movaps xmm1, xmm0 unpckhpd xmm0, xmm0 addsd xmm0, xmm1 movsd xmm1, [rbp+var_8] movsd xmm2, cs:qword_7DB00 mulsd xmm0, xmm2 addsd xmm0, xmm1 movsd [rbp+var_8], xmm0 mov rdi, [rbp+var_10] mov rdx, [rbp+var_20] mov rsi, [rbp+var_20] lea rcx, aHour; " hour " lea rax, aHours; " hours " cmp rsi, 1 cmova rcx, rax lea rsi, aLdS; "%ld %s" mov al, 0 call _sprintf mov ecx, eax mov rax, [rbp+var_10] movsxd rcx, ecx add rax, rcx mov [rbp+var_10], rax loc_2574D: movsd xmm0, [rbp+var_8] movsd xmm1, cs:qword_7DB08 ucomisd xmm0, xmm1 jb loc_25806 movsd xmm0, [rbp+var_8] movsd xmm1, cs:qword_7DB08 divsd xmm0, xmm1 movaps xmm1, xmm0 cvttsd2si rax, xmm1 mov rdx, rax sar rdx, 3Fh movsd xmm1, cs:qword_7DAF0 subsd xmm0, xmm1 cvttsd2si rcx, xmm0 and rcx, rdx or rax, rcx mov [rbp+var_20], rax movaps xmm1, cs:xmmword_7DAC0 movq xmm0, [rbp+var_20] punpckldq xmm0, xmm1 movapd xmm1, cs:xmmword_7DAD0 subpd xmm0, xmm1 movaps xmm1, xmm0 unpckhpd xmm0, xmm0 addsd xmm0, xmm1 movsd xmm1, [rbp+var_8] movsd xmm2, cs:qword_7DB10 mulsd xmm0, xmm2 addsd xmm0, xmm1 movsd [rbp+var_8], xmm0 mov rdi, [rbp+var_10] mov rdx, [rbp+var_20] lea rsi, aLdMin; "%ld min " mov al, 0 call _sprintf mov ecx, eax mov rax, [rbp+var_10] movsxd rcx, ecx add rax, rcx mov [rbp+var_10], rax loc_25806: cmp [rbp+var_11], 0 jz short loc_25825 mov rdi, [rbp+var_10] movsd xmm0, [rbp+var_8] lea rsi, a2fSec; "%.2f sec" mov al, 1 call _sprintf jmp short loc_2583C loc_25825: mov rdi, [rbp+var_10] cvttsd2si edx, [rbp+var_8] lea rsi, aDSec; "%d sec" mov al, 0 call _sprintf loc_2583C: add rsp, 20h pop rbp retn
long long nice_time(long long a1, __int8 a2, double a3) { __m128d v3; // xmm0 const char *v4; // rcx int v5; // eax __m128d v6; // xmm0 const char *v7; // rcx int v8; // eax __m128d v9; // xmm0 int v10; // eax __m128i v12; // [rsp+0h] [rbp-20h] BYREF long long v13; // [rsp+10h] [rbp-10h] double v14; // [rsp+18h] [rbp-8h] v14 = a3; v13 = a1; v12.m128i_i8[15] = a2; if ( a3 >= 86400.0 ) { v12.m128i_i64[0] = (unsigned int)(int)(v14 / 86400.0); v3 = _mm_sub_pd((__m128d)_mm_unpacklo_epi32(_mm_loadl_epi64(&v12), (__m128i)xmmword_7DAC0), (__m128d)xmmword_7DAD0); v14 = (_mm_unpackhi_pd(v3, v3).m128d_f64[0] + v3.m128d_f64[0]) * -86400.0 + v14; v4 = " day "; if ( v12.m128i_i64[0] > 1uLL ) v4 = " days "; v5 = sprintf(v13, "%ld %s", v12.m128i_i64[0], v4); v13 += v5; } if ( v14 >= 3600.0 ) { v12.m128i_i64[0] = (unsigned int)(int)(v14 / 3600.0); v6 = _mm_sub_pd((__m128d)_mm_unpacklo_epi32(_mm_loadl_epi64(&v12), (__m128i)xmmword_7DAC0), (__m128d)xmmword_7DAD0); v14 = (_mm_unpackhi_pd(v6, v6).m128d_f64[0] + v6.m128d_f64[0]) * -3600.0 + v14; v7 = " hour "; if ( v12.m128i_i64[0] > 1uLL ) v7 = " hours "; v8 = sprintf(v13, "%ld %s", v12.m128i_i64[0], v7); v13 += v8; } if ( v14 >= 60.0 ) { v12.m128i_i64[0] = (unsigned int)(int)(v14 / 60.0); v9 = _mm_sub_pd((__m128d)_mm_unpacklo_epi32(_mm_loadl_epi64(&v12), (__m128i)xmmword_7DAC0), (__m128d)xmmword_7DAD0); v14 = (_mm_unpackhi_pd(v9, v9).m128d_f64[0] + v9.m128d_f64[0]) * -60.0 + v14; v10 = sprintf(v13, "%ld min ", v12.m128i_i64[0]); v13 += v10; } if ( v12.m128i_i8[15] ) return sprintf(v13, "%.2f sec", v14); else return sprintf(v13, "%d sec", (int)v14); }
nice_time: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV AL,SIL MOVSD qword ptr [RBP + -0x8],XMM0 MOV qword ptr [RBP + -0x10],RDI MOV byte ptr [RBP + -0x11],AL MOVSD XMM0,qword ptr [RBP + -0x8] MOVSD XMM1,qword ptr [0x0017dae0] UCOMISD XMM0,XMM1 JC 0x0012567a MOVSD XMM0,qword ptr [RBP + -0x8] MOVSD XMM1,qword ptr [0x0017dae0] DIVSD XMM0,XMM1 MOVAPS XMM1,XMM0 CVTTSD2SI RAX,XMM1 MOV RDX,RAX SAR RDX,0x3f MOVSD XMM1,qword ptr [0x0017daf0] SUBSD XMM0,XMM1 CVTTSD2SI RCX,XMM0 AND RCX,RDX OR RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOVAPS XMM1,xmmword ptr [0x0017dac0] MOVQ XMM0,qword ptr [RBP + -0x20] PUNPCKLDQ XMM0,XMM1 MOVAPD XMM1,xmmword ptr [0x0017dad0] SUBPD XMM0,XMM1 MOVAPS XMM1,XMM0 UNPCKHPD XMM0,XMM0 ADDSD XMM0,XMM1 MOVSD XMM1,qword ptr [RBP + -0x8] MOVSD XMM2,qword ptr [0x0017dae8] MULSD XMM0,XMM2 ADDSD XMM0,XMM1 MOVSD qword ptr [RBP + -0x8],XMM0 MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x20] LEA RCX,[0x1791ce] LEA RAX,[0x1791c7] CMP RSI,0x1 CMOVA RCX,RAX LEA RSI,[0x1791c0] MOV AL,0x0 CALL 0x001240b0 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX LAB_0012567a: MOVSD XMM0,qword ptr [RBP + -0x8] MOVSD XMM1,qword ptr [0x0017daf8] UCOMISD XMM0,XMM1 JC 0x0012574d MOVSD XMM0,qword ptr [RBP + -0x8] MOVSD XMM1,qword ptr [0x0017daf8] DIVSD XMM0,XMM1 MOVAPS XMM1,XMM0 CVTTSD2SI RAX,XMM1 MOV RDX,RAX SAR RDX,0x3f MOVSD XMM1,qword ptr [0x0017daf0] SUBSD XMM0,XMM1 CVTTSD2SI RCX,XMM0 AND RCX,RDX OR RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOVAPS XMM1,xmmword ptr [0x0017dac0] MOVQ XMM0,qword ptr [RBP + -0x20] PUNPCKLDQ XMM0,XMM1 MOVAPD XMM1,xmmword ptr [0x0017dad0] SUBPD XMM0,XMM1 MOVAPS XMM1,XMM0 UNPCKHPD XMM0,XMM0 ADDSD XMM0,XMM1 MOVSD XMM1,qword ptr [RBP + -0x8] MOVSD XMM2,qword ptr [0x0017db00] MULSD XMM0,XMM2 ADDSD XMM0,XMM1 MOVSD qword ptr [RBP + -0x8],XMM0 MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x20] LEA RCX,[0x1791dc] LEA RAX,[0x1791d4] CMP RSI,0x1 CMOVA RCX,RAX LEA RSI,[0x1791c0] MOV AL,0x0 CALL 0x001240b0 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX LAB_0012574d: MOVSD XMM0,qword ptr [RBP + -0x8] MOVSD XMM1,qword ptr [0x0017db08] UCOMISD XMM0,XMM1 JC 0x00125806 MOVSD XMM0,qword ptr [RBP + -0x8] MOVSD XMM1,qword ptr [0x0017db08] DIVSD XMM0,XMM1 MOVAPS XMM1,XMM0 CVTTSD2SI RAX,XMM1 MOV RDX,RAX SAR RDX,0x3f MOVSD XMM1,qword ptr [0x0017daf0] SUBSD XMM0,XMM1 CVTTSD2SI RCX,XMM0 AND RCX,RDX OR RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOVAPS XMM1,xmmword ptr [0x0017dac0] MOVQ XMM0,qword ptr [RBP + -0x20] PUNPCKLDQ XMM0,XMM1 MOVAPD XMM1,xmmword ptr [0x0017dad0] SUBPD XMM0,XMM1 MOVAPS XMM1,XMM0 UNPCKHPD XMM0,XMM0 ADDSD XMM0,XMM1 MOVSD XMM1,qword ptr [RBP + -0x8] MOVSD XMM2,qword ptr [0x0017db10] MULSD XMM0,XMM2 ADDSD XMM0,XMM1 MOVSD qword ptr [RBP + -0x8],XMM0 MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x20] LEA RSI,[0x1791e3] MOV AL,0x0 CALL 0x001240b0 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX LAB_00125806: CMP byte ptr [RBP + -0x11],0x0 JZ 0x00125825 MOV RDI,qword ptr [RBP + -0x10] MOVSD XMM0,qword ptr [RBP + -0x8] LEA RSI,[0x1791ec] MOV AL,0x1 CALL 0x001240b0 JMP 0x0012583c LAB_00125825: MOV RDI,qword ptr [RBP + -0x10] CVTTSD2SI EDX,qword ptr [RBP + -0x8] LEA RSI,[0x1791f5] MOV AL,0x0 CALL 0x001240b0 LAB_0012583c: ADD RSP,0x20 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void nice_time(double param_1,char *param_2,char param_3,int8 param_4) { int iVar1; ulong uVar2; char *pcVar3; int4 extraout_var; int4 extraout_var_00; int4 extraout_var_01; int4 uVar4; int1 auVar5 [16]; int1 auVar6 [16]; int1 auVar7 [16]; char *local_18; double local_10; uVar4 = (int4)((ulong)param_4 >> 0x20); local_18 = param_2; local_10 = param_1; if (DAT_0017dae0 <= param_1) { uVar2 = (ulong)(param_1 / DAT_0017dae0); uVar2 = uVar2 | (long)(param_1 / DAT_0017dae0 - DAT_0017daf0) & (long)uVar2 >> 0x3f; auVar5._8_4_ = (int)(uVar2 >> 0x20); auVar5._0_8_ = uVar2; auVar5._12_4_ = _UNK_0017dac4; local_10 = ((auVar5._8_8_ - _UNK_0017dad8) + ((double)CONCAT44(_DAT_0017dac0,(int)uVar2) - _DAT_0017dad0)) * DAT_0017dae8 + param_1; pcVar3 = " day "; if (1 < uVar2) { pcVar3 = " days "; } iVar1 = sprintf(param_2,"%ld %s",uVar2,pcVar3); local_18 = param_2 + iVar1; uVar4 = extraout_var; } if (DAT_0017daf8 <= local_10) { uVar2 = (ulong)(local_10 / DAT_0017daf8); uVar2 = uVar2 | (long)(local_10 / DAT_0017daf8 - DAT_0017daf0) & (long)uVar2 >> 0x3f; auVar6._8_4_ = (int)(uVar2 >> 0x20); auVar6._0_8_ = uVar2; auVar6._12_4_ = _UNK_0017dac4; local_10 = ((auVar6._8_8_ - _UNK_0017dad8) + ((double)CONCAT44(_DAT_0017dac0,(int)uVar2) - _DAT_0017dad0)) * DAT_0017db00 + local_10; pcVar3 = " hour "; if (1 < uVar2) { pcVar3 = " hours "; } iVar1 = sprintf(local_18,"%ld %s",uVar2,pcVar3); local_18 = local_18 + iVar1; uVar4 = extraout_var_00; } if (DAT_0017db08 <= local_10) { uVar2 = (ulong)(local_10 / DAT_0017db08); uVar2 = uVar2 | (long)(local_10 / DAT_0017db08 - DAT_0017daf0) & (long)uVar2 >> 0x3f; auVar7._8_4_ = (int)(uVar2 >> 0x20); auVar7._0_8_ = uVar2; auVar7._12_4_ = _UNK_0017dac4; local_10 = ((auVar7._8_8_ - _UNK_0017dad8) + ((double)CONCAT44(_DAT_0017dac0,(int)uVar2) - _DAT_0017dad0)) * DAT_0017db10 + local_10; iVar1 = sprintf(local_18,"%ld min ",uVar2); local_18 = local_18 + iVar1; uVar4 = extraout_var_01; } if (param_3 == '\0') { sprintf(local_18,"%d sec",CONCAT44(uVar4,(int)local_10)); } else { sprintf(local_18,"%.2f sec",local_10); } return; }
16,803
bchange
eloqsql/strings/bchange.c
void bchange(register uchar *dst, size_t old_length, register const uchar *src, size_t new_length, size_t tot_length) { size_t rest=tot_length-old_length; if (old_length < new_length) bmove_upp(dst+rest+new_length,dst+tot_length,rest); else bmove(dst+new_length,dst+old_length,rest); memcpy(dst,src,new_length); }
O3
c
bchange: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rcx, %rbx movq %rdx, %r14 movq %rdi, %r15 movq %r8, %rdx subq %rsi, %rdx cmpq %rcx, %rsi jae 0xb5a2e leaq (%r15,%rdx), %rdi addq %rbx, %rdi addq %r15, %r8 movq %r8, %rsi callq 0xb5a54 jmp 0xb5a3a leaq (%r15,%rbx), %rdi addq %r15, %rsi callq 0x2a140 movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x2a0a0 nop
bchange: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rcx mov r14, rdx mov r15, rdi mov rdx, r8 sub rdx, rsi cmp rsi, rcx jnb short loc_B5A2E lea rdi, [r15+rdx] add rdi, rbx add r8, r15 mov rsi, r8 call bmove_upp jmp short loc_B5A3A loc_B5A2E: lea rdi, [r15+rbx] add rsi, r15 call _memmove loc_B5A3A: mov rdi, r15 mov rsi, r14 mov rdx, rbx add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp _memcpy
long long bchange(long long a1, unsigned long long a2, long long a3, unsigned long long a4, long long a5) { long long v7; // rdx v7 = a5 - a2; if ( a2 >= a4 ) memmove(a1 + a4, a1 + a2, v7); else bmove_upp(a4 + a1 + v7, a1 + a5); return memcpy(a1, a3, a4); }
bchange: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RCX MOV R14,RDX MOV R15,RDI MOV RDX,R8 SUB RDX,RSI CMP RSI,RCX JNC 0x001b5a2e LEA RDI,[R15 + RDX*0x1] ADD RDI,RBX ADD R8,R15 MOV RSI,R8 CALL 0x001b5a54 JMP 0x001b5a3a LAB_001b5a2e: LEA RDI,[R15 + RBX*0x1] ADD RSI,R15 CALL 0x0012a140 LAB_001b5a3a: MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x0012a0a0
void bchange(void *param_1,ulong param_2,void *param_3,ulong param_4,long param_5) { if (param_2 < param_4) { bmove_upp((long)param_1 + param_4 + (param_5 - param_2),param_5 + (long)param_1); } else { memmove((void *)((long)param_1 + param_4),(void *)(param_2 + (long)param_1),param_5 - param_2); } memcpy(param_1,param_3,param_4); return; }
16,804
tree_record_pos
eloqsql/mysys/tree.c
ha_rows tree_record_pos(TREE *tree, const void *key, enum ha_rkey_function flag, void *custom_arg) { int cmp; TREE_ELEMENT *element= tree->root; double left= 1; double right= tree->elements_in_tree; while (element != &null_element) { if ((cmp= (*tree->compare)(custom_arg, ELEMENT_KEY(tree, element), key)) == 0) { switch (flag) { case HA_READ_KEY_EXACT: case HA_READ_BEFORE_KEY: cmp= 1; break; case HA_READ_AFTER_KEY: cmp= -1; break; default: return HA_POS_ERROR; } } if (cmp < 0) /* element < key */ { element= element->right; left= (left + right) / 2; } else { element= element->left; right= (left + right) / 2; } } switch (flag) { case HA_READ_KEY_EXACT: case HA_READ_BEFORE_KEY: return (ha_rows) right; case HA_READ_AFTER_KEY: return (ha_rows) left; default: return HA_POS_ERROR; } }
O0
c
tree_record_pos: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000 movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rax movl 0x20c(%rax), %eax cvtsi2sd %rax, %xmm0 movsd %xmm0, -0x48(%rbp) leaq 0x1c3df5(%rip), %rax # 0x2c0d00 cmpq %rax, -0x38(%rbp) je 0xfd011 movq -0x10(%rbp), %rax movq 0x228(%rax), %rax movq %rax, -0x58(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x10(%rbp), %rax cmpl $0x0, 0x208(%rax) je 0xfcf50 movq -0x38(%rbp), %rax movq -0x10(%rbp), %rcx movl 0x208(%rcx), %ecx addq %rcx, %rax movq %rax, -0x60(%rbp) jmp 0xfcf5c movq -0x38(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x60(%rbp) movq -0x58(%rbp), %rax movq -0x50(%rbp), %rdi movq -0x60(%rbp), %rsi movq -0x18(%rbp), %rdx callq *%rax movl %eax, -0x2c(%rbp) cmpl $0x0, %eax jne 0xfcfb7 movl -0x1c(%rbp), %eax movl %eax, -0x64(%rbp) testl %eax, %eax je 0xfcf96 jmp 0xfcf82 movl -0x64(%rbp), %eax subl $0x3, %eax je 0xfcf9f jmp 0xfcf8c movl -0x64(%rbp), %eax subl $0x4, %eax jne 0xfcfa8 jmp 0xfcf96 movl $0x1, -0x2c(%rbp) jmp 0xfcfb5 movl $0xffffffff, -0x2c(%rbp) # imm = 0xFFFFFFFF jmp 0xfcfb5 movq $-0x1, -0x8(%rbp) jmp 0xfd09b jmp 0xfcfb7 cmpl $0x0, -0x2c(%rbp) jge 0xfcfe6 movq -0x38(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x38(%rbp) movsd -0x40(%rbp), %xmm0 addsd -0x48(%rbp), %xmm0 movsd 0x5cfcd(%rip), %xmm1 # 0x159fa8 divsd %xmm1, %xmm0 movsd %xmm0, -0x40(%rbp) jmp 0xfd00c movq -0x38(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) movsd -0x40(%rbp), %xmm0 addsd -0x48(%rbp), %xmm0 movsd 0x5cfa5(%rip), %xmm1 # 0x159fa8 divsd %xmm1, %xmm0 movsd %xmm0, -0x48(%rbp) jmp 0xfcf04 movl -0x1c(%rbp), %eax movl %eax, -0x68(%rbp) testl %eax, %eax je 0xfd031 jmp 0xfd01d movl -0x68(%rbp), %eax subl $0x3, %eax je 0xfd062 jmp 0xfd027 movl -0x68(%rbp), %eax subl $0x4, %eax jne 0xfd093 jmp 0xfd031 movsd -0x48(%rbp), %xmm0 movsd 0x5cefa(%rip), %xmm2 # 0x159f38 movaps %xmm0, %xmm1 subsd %xmm2, %xmm1 cvttsd2si %xmm1, %rcx cvttsd2si %xmm0, %rax movq %rax, %rdx sarq $0x3f, %rdx andq %rdx, %rcx orq %rcx, %rax movq %rax, -0x8(%rbp) jmp 0xfd09b movsd -0x40(%rbp), %xmm0 movsd 0x5cec9(%rip), %xmm2 # 0x159f38 movaps %xmm0, %xmm1 subsd %xmm2, %xmm1 cvttsd2si %xmm1, %rcx cvttsd2si %xmm0, %rax movq %rax, %rdx sarq $0x3f, %rdx andq %rdx, %rcx orq %rcx, %rax movq %rax, -0x8(%rbp) jmp 0xfd09b movq $-0x1, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x70, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
tree_record_pos: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_28], rcx mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_38], rax mov rax, 3FF0000000000000h mov [rbp+var_40], rax mov rax, [rbp+var_10] mov eax, [rax+20Ch] cvtsi2sd xmm0, rax movsd [rbp+var_48], xmm0 loc_FCF04: lea rax, null_element cmp [rbp+var_38], rax jz loc_FD011 mov rax, [rbp+var_10] mov rax, [rax+228h] mov [rbp+var_58], rax mov rax, [rbp+var_28] mov [rbp+var_50], rax mov rax, [rbp+var_10] cmp dword ptr [rax+208h], 0 jz short loc_FCF50 mov rax, [rbp+var_38] mov rcx, [rbp+var_10] mov ecx, [rcx+208h] add rax, rcx mov [rbp+var_60], rax jmp short loc_FCF5C loc_FCF50: mov rax, [rbp+var_38] mov rax, [rax+18h] mov [rbp+var_60], rax loc_FCF5C: mov rax, [rbp+var_58] mov rdi, [rbp+var_50] mov rsi, [rbp+var_60] mov rdx, [rbp+var_18] call rax mov [rbp+var_2C], eax cmp eax, 0 jnz short loc_FCFB7 mov eax, [rbp+var_1C] mov [rbp+var_64], eax test eax, eax jz short loc_FCF96 jmp short $+2 loc_FCF82: mov eax, [rbp+var_64] sub eax, 3 jz short loc_FCF9F jmp short $+2 loc_FCF8C: mov eax, [rbp+var_64] sub eax, 4 jnz short loc_FCFA8 jmp short $+2 loc_FCF96: mov [rbp+var_2C], 1 jmp short loc_FCFB5 loc_FCF9F: mov [rbp+var_2C], 0FFFFFFFFh jmp short loc_FCFB5 loc_FCFA8: mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh jmp loc_FD09B loc_FCFB5: jmp short $+2 loc_FCFB7: cmp [rbp+var_2C], 0 jge short loc_FCFE6 mov rax, [rbp+var_38] mov rax, [rax+8] mov [rbp+var_38], rax movsd xmm0, [rbp+var_40] addsd xmm0, [rbp+var_48] movsd xmm1, cs:qword_159FA8 divsd xmm0, xmm1 movsd [rbp+var_40], xmm0 jmp short loc_FD00C loc_FCFE6: mov rax, [rbp+var_38] mov rax, [rax] mov [rbp+var_38], rax movsd xmm0, [rbp+var_40] addsd xmm0, [rbp+var_48] movsd xmm1, cs:qword_159FA8 divsd xmm0, xmm1 movsd [rbp+var_48], xmm0 loc_FD00C: jmp loc_FCF04 loc_FD011: mov eax, [rbp+var_1C] mov [rbp+var_68], eax test eax, eax jz short loc_FD031 jmp short $+2 loc_FD01D: mov eax, [rbp+var_68] sub eax, 3 jz short loc_FD062 jmp short $+2 loc_FD027: mov eax, [rbp+var_68] sub eax, 4 jnz short loc_FD093 jmp short $+2 loc_FD031: movsd xmm0, [rbp+var_48] movsd xmm2, cs:qword_159F38 movaps xmm1, xmm0 subsd xmm1, xmm2 cvttsd2si rcx, xmm1 cvttsd2si rax, xmm0 mov rdx, rax sar rdx, 3Fh and rcx, rdx or rax, rcx mov [rbp+var_8], rax jmp short loc_FD09B loc_FD062: movsd xmm0, [rbp+var_40] movsd xmm2, cs:qword_159F38 movaps xmm1, xmm0 subsd xmm1, xmm2 cvttsd2si rcx, xmm1 cvttsd2si rax, xmm0 mov rdx, rax sar rdx, 3Fh and rcx, rdx or rax, rcx mov [rbp+var_8], rax jmp short loc_FD09B loc_FD093: mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh loc_FD09B: mov rax, [rbp+var_8] add rsp, 70h pop rbp retn
long long tree_record_pos(int *a1, long long a2, int a3, long long a4) { int v4; // eax long long *v6; // [rsp+18h] [rbp-58h] double v7; // [rsp+28h] [rbp-48h] double v8; // [rsp+30h] [rbp-40h] long long **v9; // [rsp+38h] [rbp-38h] int v10; // [rsp+44h] [rbp-2Ch] v9 = *(long long ***)a1; v8 = 1.0; v7 = (double)a1[131]; while ( v9 != (long long **)&null_element ) { v6 = (long long *)*((_QWORD *)a1 + 69); if ( a1[130] ) v4 = ((long long ( *)(long long, char *, long long))v6)(a4, (char *)v9 + (unsigned int)a1[130], a2); else v4 = ((long long ( *)(long long, long long *, long long))v6)(a4, v9[3], a2); v10 = v4; if ( !v4 ) { if ( a3 ) { if ( a3 == 3 ) { v10 = -1; goto LABEL_13; } if ( a3 != 4 ) return -1LL; } v10 = 1; } LABEL_13: if ( v10 >= 0 ) { v9 = (long long **)*v9; v7 = (v8 + v7) / 2.0; } else { v9 = (long long **)v9[1]; v8 = (v8 + v7) / 2.0; } } switch ( a3 ) { case 0: return (unsigned int)(int)v7; case 3: return (unsigned int)(int)v8; case 4: return (unsigned int)(int)v7; } return -1LL; }
tree_record_pos: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX MOV RAX,0x3ff0000000000000 MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x20c] CVTSI2SD XMM0,RAX MOVSD qword ptr [RBP + -0x48],XMM0 LAB_001fcf04: LEA RAX,[0x3c0d00] CMP qword ptr [RBP + -0x38],RAX JZ 0x001fd011 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x228] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x208],0x0 JZ 0x001fcf50 MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x208] ADD RAX,RCX MOV qword ptr [RBP + -0x60],RAX JMP 0x001fcf5c LAB_001fcf50: MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x60],RAX LAB_001fcf5c: MOV RAX,qword ptr [RBP + -0x58] MOV RDI,qword ptr [RBP + -0x50] MOV RSI,qword ptr [RBP + -0x60] MOV RDX,qword ptr [RBP + -0x18] CALL RAX MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x0 JNZ 0x001fcfb7 MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x64],EAX TEST EAX,EAX JZ 0x001fcf96 JMP 0x001fcf82 LAB_001fcf82: MOV EAX,dword ptr [RBP + -0x64] SUB EAX,0x3 JZ 0x001fcf9f JMP 0x001fcf8c LAB_001fcf8c: MOV EAX,dword ptr [RBP + -0x64] SUB EAX,0x4 JNZ 0x001fcfa8 JMP 0x001fcf96 LAB_001fcf96: MOV dword ptr [RBP + -0x2c],0x1 JMP 0x001fcfb5 LAB_001fcf9f: MOV dword ptr [RBP + -0x2c],0xffffffff JMP 0x001fcfb5 LAB_001fcfa8: MOV qword ptr [RBP + -0x8],-0x1 JMP 0x001fd09b LAB_001fcfb5: JMP 0x001fcfb7 LAB_001fcfb7: CMP dword ptr [RBP + -0x2c],0x0 JGE 0x001fcfe6 MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x38],RAX MOVSD XMM0,qword ptr [RBP + -0x40] ADDSD XMM0,qword ptr [RBP + -0x48] MOVSD XMM1,qword ptr [0x00259fa8] DIVSD XMM0,XMM1 MOVSD qword ptr [RBP + -0x40],XMM0 JMP 0x001fd00c LAB_001fcfe6: MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX MOVSD XMM0,qword ptr [RBP + -0x40] ADDSD XMM0,qword ptr [RBP + -0x48] MOVSD XMM1,qword ptr [0x00259fa8] DIVSD XMM0,XMM1 MOVSD qword ptr [RBP + -0x48],XMM0 LAB_001fd00c: JMP 0x001fcf04 LAB_001fd011: MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x68],EAX TEST EAX,EAX JZ 0x001fd031 JMP 0x001fd01d LAB_001fd01d: MOV EAX,dword ptr [RBP + -0x68] SUB EAX,0x3 JZ 0x001fd062 JMP 0x001fd027 LAB_001fd027: MOV EAX,dword ptr [RBP + -0x68] SUB EAX,0x4 JNZ 0x001fd093 JMP 0x001fd031 LAB_001fd031: MOVSD XMM0,qword ptr [RBP + -0x48] MOVSD XMM2,qword ptr [0x00259f38] MOVAPS XMM1,XMM0 SUBSD XMM1,XMM2 CVTTSD2SI RCX,XMM1 CVTTSD2SI RAX,XMM0 MOV RDX,RAX SAR RDX,0x3f AND RCX,RDX OR RAX,RCX MOV qword ptr [RBP + -0x8],RAX JMP 0x001fd09b LAB_001fd062: MOVSD XMM0,qword ptr [RBP + -0x40] MOVSD XMM2,qword ptr [0x00259f38] MOVAPS XMM1,XMM0 SUBSD XMM1,XMM2 CVTTSD2SI RCX,XMM1 CVTTSD2SI RAX,XMM0 MOV RDX,RAX SAR RDX,0x3f AND RCX,RDX OR RAX,RCX MOV qword ptr [RBP + -0x8],RAX JMP 0x001fd09b LAB_001fd093: MOV qword ptr [RBP + -0x8],-0x1 LAB_001fd09b: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x70 POP RBP RET
ulong tree_record_pos(int8 *param_1,int8 param_2,int param_3,int8 param_4) { long local_68; double local_50; double local_48; int8 *local_40; int local_34; local_40 = (int8 *)*param_1; local_48 = 1.0; local_50 = (double)*(uint *)((long)param_1 + 0x20c); do { if (local_40 == (int8 *)null_element) { if (param_3 != 0) { if (param_3 == 3) { return (long)local_48 | (long)(local_48 - DAT_00259f38) & (long)local_48 >> 0x3f; } if (param_3 != 4) { return 0xffffffffffffffff; } } return (long)local_50 | (long)(local_50 - DAT_00259f38) & (long)local_50 >> 0x3f; } if (*(int *)(param_1 + 0x41) == 0) { local_68 = local_40[3]; } else { local_68 = (long)local_40 + (ulong)*(uint *)(param_1 + 0x41); } local_34 = (*(code *)param_1[0x45])(param_4,local_68,param_2); if (local_34 == 0) { if (param_3 != 0) { if (param_3 == 3) { local_34 = -1; goto LAB_001fcfb7; } if (param_3 != 4) { return 0xffffffffffffffff; } } local_34 = 1; } LAB_001fcfb7: if (local_34 < 0) { local_40 = (int8 *)local_40[1]; local_48 = (local_48 + local_50) / DAT_00259fa8; } else { local_40 = (int8 *)*local_40; local_50 = (local_48 + local_50) / DAT_00259fa8; } } while( true ); }
16,805
LefDefParser::lefwViaLayerRect(double, double, double, double, int)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwViaLayerRect(double x1l, double y1l, double x2l, double y2l, int mask) { if (!lefwFile) return LEFW_UNINITIALIZED; if (lefwState != LEFW_VIA_START && lefwState != LEFW_VIA) return LEFW_BAD_ORDER; if (!lefwDidLayer) return LEFW_BAD_ORDER; if (mask && versionNum < 5.8) { return LEFW_WRONG_VERSION; } if (!lefwValidateMaskNumber(mask)) { return LEFW_BAD_DATA; } if (lefwWriteEncrypt) { if (mask) { encPrint(lefwFile, (char*) " RECT MASK %d %.11g %.11g %.11g %.11g ;\n", mask, x1l, y1l, x2l, y2l); } else { encPrint(lefwFile, (char*) " RECT %.11g %.11g %.11g %.11g ;\n", x1l, y1l, x2l, y2l); } } else { if (mask) { fprintf(lefwFile, " RECT MASK %d %.11g %.11g %.11g %.11g ;\n", mask, x1l, y1l, x2l, y2l); } else { fprintf(lefwFile, " RECT %.11g %.11g %.11g %.11g ;\n", x1l, y1l, x2l, y2l); } } lefwLines++; lefwState = LEFW_VIA; return LEFW_OK; }
O3
cpp
LefDefParser::lefwViaLayerRect(double, double, double, double, int): pushq %rbx movl %edi, %edx leaq 0x74fb1(%rip), %rax # 0x8d0f0 movq (%rax), %rdi testq %rdi, %rdi je 0x181f6 leaq 0x751ee(%rip), %rbx # 0x8d340 movl (%rbx), %ecx movl $0x2, %eax cmpl $0x48, %ecx je 0x18167 cmpl $0xf, %ecx jne 0x181fb leaq 0x751da(%rip), %rcx # 0x8d348 cmpl $0x0, (%rcx) je 0x181fb testl %edx, %edx je 0x18192 movl $0x5, %eax movsd 0x52970(%rip), %xmm4 # 0x6aaf8 ucomisd 0x74d20(%rip), %xmm4 # 0x8ceb0 ja 0x181fb movl $0x3, %eax testl %edx, %edx js 0x181fb je 0x181d9 movl $0xffffffff, %ecx # imm = 0xFFFFFFFF movl $0xcccccccd, %esi # imm = 0xCCCCCCCD movl %edx, %r8d movl %r8d, %r9d imulq %rsi, %r9 shrq $0x23, %r9 leal (%r9,%r9), %r10d leal (%r10,%r10,4), %r10d movl %r8d, %r11d subl %r10d, %r11d cmpl $0x3, %r11d ja 0x181fb incl %ecx cmpl $0x9, %r8d movl %r9d, %r8d ja 0x181aa cmpl $0x2, %ecx ja 0x181fb cmpb $0x1, 0x751fc(%rip) # 0x8d3dc jne 0x181fd testl %edx, %edx je 0x18211 leaq 0x434b3(%rip), %rsi # 0x5b6a0 movb $0x4, %al callq 0x55afd jmp 0x1822f movl $0x1, %eax popq %rbx retq testl %edx, %edx je 0x18221 leaq 0x43498(%rip), %rsi # 0x5b6a0 movb $0x4, %al callq 0x22e0 jmp 0x1822f leaq 0x434b6(%rip), %rsi # 0x5b6ce movb $0x4, %al callq 0x55afd jmp 0x1822f leaq 0x434a6(%rip), %rsi # 0x5b6ce movb $0x4, %al callq 0x22e0 leaq 0x75106(%rip), %rax # 0x8d33c incl (%rax) movl $0x48, (%rbx) xorl %eax, %eax jmp 0x181fb
_ZN12LefDefParser16lefwViaLayerRectEddddi: push rbx mov edx, edi lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] test rdi, rdi jz loc_181F6 lea rbx, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState mov ecx, [rbx] mov eax, 2 cmp ecx, 48h ; 'H' jz short loc_18167 cmp ecx, 0Fh jnz loc_181FB loc_18167: lea rcx, _ZN12LefDefParser12lefwDidLayerE; LefDefParser::lefwDidLayer cmp dword ptr [rcx], 0 jz loc_181FB test edx, edx jz short loc_18192 mov eax, 5 movsd xmm4, cs:qword_6AAF8 ucomisd xmm4, cs:_ZN12LefDefParserL10versionNumE; LefDefParser::versionNum ja short loc_181FB loc_18192: mov eax, 3 test edx, edx js short loc_181FB jz short loc_181D9 mov ecx, 0FFFFFFFFh mov esi, 0CCCCCCCDh mov r8d, edx loc_181AA: mov r9d, r8d imul r9, rsi shr r9, 23h lea r10d, [r9+r9] lea r10d, [r10+r10*4] mov r11d, r8d sub r11d, r10d cmp r11d, 3 ja short loc_181FB inc ecx cmp r8d, 9 mov r8d, r9d ja short loc_181AA cmp ecx, 2 ja short loc_181FB loc_181D9: cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt jnz short loc_181FD test edx, edx jz short loc_18211 lea rsi, aRectMaskD11g11; " RECT MASK %d %.11g %.11g %.11g %."... mov al, 4 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_1822F loc_181F6: mov eax, 1 loc_181FB: pop rbx retn loc_181FD: test edx, edx jz short loc_18221 lea rsi, aRectMaskD11g11; " RECT MASK %d %.11g %.11g %.11g %."... mov al, 4 call _fprintf jmp short loc_1822F loc_18211: lea rsi, aRect11g11g11g1; " RECT %.11g %.11g %.11g %.11g ;\n" mov al, 4 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_1822F loc_18221: lea rsi, aRect11g11g11g1; " RECT %.11g %.11g %.11g %.11g ;\n" mov al, 4 call _fprintf loc_1822F: lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines inc dword ptr [rax] mov dword ptr [rbx], 48h ; 'H' xor eax, eax jmp short loc_181FB
long long LefDefParser::lefwViaLayerRect( LefDefParser *this, double a2, double a3, double a4, double a5, int a6, long long a7, long long a8, unsigned int a9, unsigned int a10) { long long result; // rax _DWORD *v11; // rcx bool v12; // cc if ( !*(_QWORD *)&LefDefParser::lefwFile ) return 1LL; result = 2LL; if ( LefDefParser::lefwState == 72 || LefDefParser::lefwState == 15 ) { v11 = &LefDefParser::lefwDidLayer; if ( LefDefParser::lefwDidLayer ) { if ( !(_DWORD)this || (result = 5LL, *(double *)&LefDefParser::versionNum >= 5.8) ) { result = 3LL; if ( (int)this >= 0 ) { if ( (_DWORD)this ) { LODWORD(v11) = -1; a9 = (unsigned int)this; while ( 1 ) { a10 = a9 / 0xA; if ( a9 % 0xA > 3 ) break; LODWORD(v11) = (_DWORD)v11 + 1; v12 = a9 <= 9; a9 /= 0xAu; if ( v12 ) { if ( (unsigned int)v11 > 2 ) return result; goto LABEL_13; } } } else { LABEL_13: if ( LefDefParser::lefwWriteEncrypt == 1 ) { if ( (_DWORD)this ) LefDefParser::encPrint( LefDefParser::lefwFile, (unsigned int)" RECT MASK %d %.11g %.11g %.11g %.11g ;\n", (_DWORD)this, (_DWORD)v11, a9, a10); else LefDefParser::encPrint( LefDefParser::lefwFile, (unsigned int)" RECT %.11g %.11g %.11g %.11g ;\n", 0, (_DWORD)v11, a9, a10); } else if ( (_DWORD)this ) { fprintf( *(_QWORD *)&LefDefParser::lefwFile, " RECT MASK %d %.11g %.11g %.11g %.11g ;\n", (_DWORD)this, a2, a3, a4, a5); } else { fprintf(*(_QWORD *)&LefDefParser::lefwFile, " RECT %.11g %.11g %.11g %.11g ;\n", a2, a3, a4, a5); } ++LefDefParser::lefwLines; LefDefParser::lefwState = 72; return 0LL; } } } } } return result; }
lefwViaLayerRect: PUSH RBX MOV EDX,EDI LEA RAX,[0x18d0f0] MOV RDI,qword ptr [RAX] TEST RDI,RDI JZ 0x001181f6 LEA RBX,[0x18d340] MOV ECX,dword ptr [RBX] MOV EAX,0x2 CMP ECX,0x48 JZ 0x00118167 CMP ECX,0xf JNZ 0x001181fb LAB_00118167: LEA RCX,[0x18d348] CMP dword ptr [RCX],0x0 JZ 0x001181fb TEST EDX,EDX JZ 0x00118192 MOV EAX,0x5 MOVSD XMM4,qword ptr [0x0016aaf8] UCOMISD XMM4,qword ptr [0x0018ceb0] JA 0x001181fb LAB_00118192: MOV EAX,0x3 TEST EDX,EDX JS 0x001181fb JZ 0x001181d9 MOV ECX,0xffffffff MOV ESI,0xcccccccd MOV R8D,EDX LAB_001181aa: MOV R9D,R8D IMUL R9,RSI SHR R9,0x23 LEA R10D,[R9 + R9*0x1] LEA R10D,[R10 + R10*0x4] MOV R11D,R8D SUB R11D,R10D CMP R11D,0x3 JA 0x001181fb INC ECX CMP R8D,0x9 MOV R8D,R9D JA 0x001181aa CMP ECX,0x2 JA 0x001181fb LAB_001181d9: CMP byte ptr [0x0018d3dc],0x1 JNZ 0x001181fd TEST EDX,EDX JZ 0x00118211 LEA RSI,[0x15b6a0] MOV AL,0x4 CALL 0x00155afd JMP 0x0011822f LAB_001181f6: MOV EAX,0x1 LAB_001181fb: POP RBX RET LAB_001181fd: TEST EDX,EDX JZ 0x00118221 LEA RSI,[0x15b6a0] MOV AL,0x4 CALL 0x001022e0 JMP 0x0011822f LAB_00118211: LEA RSI,[0x15b6ce] MOV AL,0x4 CALL 0x00155afd JMP 0x0011822f LAB_00118221: LEA RSI,[0x15b6ce] MOV AL,0x4 CALL 0x001022e0 LAB_0011822f: LEA RAX,[0x18d33c] INC dword ptr [RAX] MOV dword ptr [RBX],0x48 XOR EAX,EAX JMP 0x001181fb
/* LefDefParser::lefwViaLayerRect(double, double, double, double, int) */ int8 LefDefParser::lefwViaLayerRect (double param_1,double param_2,double param_3,double param_4,int param_5) { bool bVar1; uint uVar2; int8 uVar3; uint uVar4; if (lefwFile == (_IO_FILE *)0x0) { uVar3 = 1; } else { uVar3 = 2; if ((((lefwState == 0x48) || (lefwState == 0xf)) && (lefwDidLayer != 0)) && ((param_5 == 0 || (uVar3 = 5, DAT_0016aaf8 <= versionNum)))) { uVar3 = 3; if (-1 < param_5) { if (param_5 != 0) { uVar4 = 0xffffffff; uVar2 = param_5; do { if (3 < uVar2 % 10) { return 3; } uVar4 = uVar4 + 1; bVar1 = 9 < uVar2; uVar2 = uVar2 / 10; } while (bVar1); if (2 < uVar4) { return 3; } } if (lefwWriteEncrypt == '\x01') { if (param_5 == 0) { encPrint(lefwFile," RECT %.11g %.11g %.11g %.11g ;\n"); } else { encPrint(lefwFile," RECT MASK %d %.11g %.11g %.11g %.11g ;\n"); } } else if (param_5 == 0) { fprintf(lefwFile," RECT %.11g %.11g %.11g %.11g ;\n"); } else { fprintf(lefwFile," RECT MASK %d %.11g %.11g %.11g %.11g ;\n"); } lefwLines = lefwLines + 1; lefwState = 0x48; uVar3 = 0; } } } return uVar3; }
16,806
string_indexof
bluesky950520[P]quickjs/quickjs.c
static int string_indexof(JSString *p1, JSString *p2, int from) { /* assuming 0 <= from <= p1->len */ int c, i, j, len1 = p1->len, len2 = p2->len; if (len2 == 0) return from; for (i = from, c = string_get(p2, 0); i + len2 <= len1; i = j + 1) { j = string_indexof_char(p1, c, i); if (j < 0 || j + len2 > len1) break; if (!string_cmp(p1, p2, j + 1, 1, len2 - 1)) return j; } return -1; }
O3
c
string_indexof: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %edx, %r15d movl $0x7fffffff, %ebx # imm = 0x7FFFFFFF movq %rsi, 0x10(%rsp) movq 0x4(%rsi), %rax movl %eax, %ebp andl %ebx, %ebp je 0x7f884 movq %rdi, %r14 andl 0x4(%rdi), %ebx testl %eax, %eax js 0x7f889 movq 0x10(%rsp), %rax movzbl 0x18(%rax), %eax jmp 0x7f892 movl %r15d, %r13d jmp 0x7f8e3 movq 0x10(%rsp), %rax movzwl 0x18(%rax), %eax movl %eax, 0xc(%rsp) subl %ebp, %ebx decl %ebp movl $0xffffffff, %r13d # imm = 0xFFFFFFFF cmpl %ebx, %r15d jg 0x7f8e3 movq %r14, %rdi movl 0xc(%rsp), %esi movl %r15d, %edx callq 0x4cc92 testl %eax, %eax js 0x7f8e3 movl %eax, %r12d cmpl %ebx, %eax jg 0x7f8e3 leal 0x1(%r12), %r15d movq %r14, %rdi movq 0x10(%rsp), %rsi movl %r15d, %edx movl $0x1, %ecx movl %ebp, %r8d callq 0x7f707 testl %eax, %eax jne 0x7f8a0 movl %r12d, %r13d movl %r13d, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
string_indexof: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r15d, edx mov ebx, 7FFFFFFFh mov [rsp+48h+var_38], rsi mov rax, [rsi+4] mov ebp, eax and ebp, ebx jz short loc_7F884 mov r14, rdi and ebx, [rdi+4] test eax, eax js short loc_7F889 mov rax, [rsp+48h+var_38] movzx eax, byte ptr [rax+18h] jmp short loc_7F892 loc_7F884: mov r13d, r15d jmp short loc_7F8E3 loc_7F889: mov rax, [rsp+48h+var_38] movzx eax, word ptr [rax+18h] loc_7F892: mov [rsp+48h+var_3C], eax sub ebx, ebp dec ebp mov r13d, 0FFFFFFFFh loc_7F8A0: cmp r15d, ebx jg short loc_7F8E3 mov rdi, r14 mov esi, [rsp+48h+var_3C] mov edx, r15d call string_indexof_char test eax, eax js short loc_7F8E3 mov r12d, eax cmp eax, ebx jg short loc_7F8E3 lea r15d, [r12+1] mov rdi, r14 mov rsi, [rsp+48h+var_38] mov edx, r15d mov ecx, 1 mov r8d, ebp call string_cmp test eax, eax jnz short loc_7F8A0 mov r13d, r12d loc_7F8E3: mov eax, r13d add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long string_indexof(long long a1, long long a2, unsigned int a3) { int v3; // r15d long long v4; // rax int v5; // ebp unsigned int v6; // eax unsigned int v7; // r13d int v8; // ebx int v9; // ebp int v10; // eax unsigned int v11; // r12d unsigned int v13; // [rsp+Ch] [rbp-3Ch] v3 = a3; v4 = *(_QWORD *)(a2 + 4); v5 = v4 & 0x7FFFFFFF; if ( (v4 & 0x7FFFFFFF) != 0 ) { if ( (int)v4 < 0 ) v6 = *(unsigned __int16 *)(a2 + 24); else v6 = *(unsigned __int8 *)(a2 + 24); v13 = v6; v8 = (*(_DWORD *)(a1 + 4) & 0x7FFFFFFF) - v5; v9 = v5 - 1; v7 = -1; while ( v3 <= v8 ) { v10 = string_indexof_char(a1, v13, v3); if ( v10 < 0 ) break; v11 = v10; if ( v10 > v8 ) break; v3 = v10 + 1; if ( !(unsigned int)string_cmp(a1, a2, v10 + 1, 1, v9) ) return v11; } } else { return a3; } return v7; }
string_indexof: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R15D,EDX MOV EBX,0x7fffffff MOV qword ptr [RSP + 0x10],RSI MOV RAX,qword ptr [RSI + 0x4] MOV EBP,EAX AND EBP,EBX JZ 0x0017f884 MOV R14,RDI AND EBX,dword ptr [RDI + 0x4] TEST EAX,EAX JS 0x0017f889 MOV RAX,qword ptr [RSP + 0x10] MOVZX EAX,byte ptr [RAX + 0x18] JMP 0x0017f892 LAB_0017f884: MOV R13D,R15D JMP 0x0017f8e3 LAB_0017f889: MOV RAX,qword ptr [RSP + 0x10] MOVZX EAX,word ptr [RAX + 0x18] LAB_0017f892: MOV dword ptr [RSP + 0xc],EAX SUB EBX,EBP DEC EBP MOV R13D,0xffffffff LAB_0017f8a0: CMP R15D,EBX JG 0x0017f8e3 MOV RDI,R14 MOV ESI,dword ptr [RSP + 0xc] MOV EDX,R15D CALL 0x0014cc92 TEST EAX,EAX JS 0x0017f8e3 MOV R12D,EAX CMP EAX,EBX JG 0x0017f8e3 LEA R15D,[R12 + 0x1] MOV RDI,R14 MOV RSI,qword ptr [RSP + 0x10] MOV EDX,R15D MOV ECX,0x1 MOV R8D,EBP CALL 0x0017f707 TEST EAX,EAX JNZ 0x0017f8a0 MOV R13D,R12D LAB_0017f8e3: MOV EAX,R13D ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int string_indexof(long param_1,long param_2,int param_3) { ushort uVar1; uint uVar2; int iVar3; int iVar4; int iVar5; uint uVar6; uVar2 = (uint)*(ulong *)(param_2 + 4); uVar6 = uVar2 & 0x7fffffff; iVar3 = param_3; if ((*(ulong *)(param_2 + 4) & 0x7fffffff) != 0) { if ((int)uVar2 < 0) { uVar1 = *(ushort *)(param_2 + 0x18); } else { uVar1 = (ushort)*(byte *)(param_2 + 0x18); } iVar5 = (*(uint *)(param_1 + 4) & 0x7fffffff) - uVar6; do { if (iVar5 < param_3) { return -1; } iVar3 = string_indexof_char(param_1,uVar1,param_3); if (iVar3 < 0) { return -1; } if (iVar5 < iVar3) { return -1; } param_3 = iVar3 + 1; iVar4 = string_cmp(param_1,param_2,param_3,1,uVar6 - 1); } while (iVar4 != 0); } return iVar3; }
16,807
fs_validate_filename(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/common.cpp
bool fs_validate_filename(const std::string & filename) { if (!filename.length()) { // Empty filename invalid return false; } if (filename.length() > 255) { // Limit at common largest possible filename on Linux filesystems // to avoid unnecessary further validation // (On systems with smaller limits it will be caught by the OS) return false; } std::u32string filename_utf32; try { #if defined(__clang__) // disable C++17 deprecation warning for std::codecvt_utf8 # pragma clang diagnostic push # pragma clang diagnostic ignored "-Wdeprecated-declarations" #endif std::wstring_convert<std::codecvt_utf8<char32_t>, char32_t> converter; #if defined(__clang__) # pragma clang diagnostic pop #endif filename_utf32 = converter.from_bytes(filename); // If the reverse conversion mismatches, it means overlong UTF-8 sequences were used, // or invalid encodings were encountered. Reject such attempts std::string filename_reencoded = converter.to_bytes(filename_utf32); if (filename_reencoded != filename) { return false; } } catch (const std::exception &) { return false; } // Check for forbidden codepoints: // - Control characters // - Unicode equivalents of illegal characters // - UTF-16 surrogate pairs // - UTF-8 replacement character // - Byte order mark (BOM) // - Illegal characters: / \ : * ? " < > | for (char32_t c : filename_utf32) { if (c <= 0x1F // Control characters (C0) || c == 0x7F // Control characters (DEL) || (c >= 0x80 && c <= 0x9F) // Control characters (C1) || c == 0xFF0E // Fullwidth Full Stop (period equivalent) || c == 0x2215 // Division Slash (forward slash equivalent) || c == 0x2216 // Set Minus (backslash equivalent) || (c >= 0xD800 && c <= 0xDFFF) // UTF-16 surrogate pairs || c == 0xFFFD // Replacement Character (UTF-8) || c == 0xFEFF // Byte Order Mark (BOM) || c == '/' || c == '\\' || c == ':' || c == '*' // Illegal characters || c == '?' || c == '"' || c == '<' || c == '>' || c == '|') { return false; } } // Reject any leading or trailing ' ', or any trailing '.', these are stripped on Windows and will cause a different filename // Unicode and other whitespace is not affected, only 0x20 space if (filename.front() == ' ' || filename.back() == ' ' || filename.back() == '.') { return false; } // Reject any ".." (currently stricter than necessary, it should be fine to just check for == ".." instead) if (filename.find("..") != std::string::npos) { return false; } // Reject "." if (filename == ".") { return false; } return true; }
O0
cpp
fs_validate_filename(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): subq $0x128, %rsp # imm = 0x128 movq %rdi, 0x118(%rsp) movq 0x118(%rsp), %rdi callq 0x5aa10 cmpq $0x0, %rax jne 0xf005f movb $0x0, 0x127(%rsp) jmp 0xf03f7 movq 0x118(%rsp), %rdi callq 0x5aa10 cmpq $0xff, %rax jbe 0xf0081 movb $0x0, 0x127(%rsp) jmp 0xf03f7 leaq 0xf8(%rsp), %rdi callq 0xf9a40 leaq 0x98(%rsp), %rdi callq 0xf9ac0 jmp 0xf009d movq 0x118(%rsp), %rdx leaq 0x68(%rsp), %rdi leaq 0x98(%rsp), %rsi callq 0xf9b80 jmp 0xf00b9 leaq 0xf8(%rsp), %rdi movq %rdi, 0x10(%rsp) leaq 0x68(%rsp), %rsi movq %rsi, 0x8(%rsp) callq 0xf9c00 movq 0x8(%rsp), %rdi callq 0xf9e40 movq 0x10(%rsp), %rdx leaq 0x48(%rsp), %rdi leaq 0x98(%rsp), %rsi callq 0xf9e80 jmp 0xf00f8 movq 0x118(%rsp), %rsi leaq 0x48(%rsp), %rdi callq 0xf9f00 testb $0x1, %al jne 0xf0113 jmp 0xf0199 movb $0x0, 0x127(%rsp) movl $0x1, 0x44(%rsp) jmp 0xf01a1 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) jmp 0xf015c movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) leaq 0x98(%rsp), %rdi callq 0xf9f30 movl 0x8c(%rsp), %eax movl $0x1, %ecx cmpl %ecx, %eax jne 0xf03e8 movq 0x90(%rsp), %rdi callq 0x5a0f0 movq %rax, 0x38(%rsp) movb $0x0, 0x127(%rsp) movl $0x1, 0x44(%rsp) callq 0x5adc0 jmp 0xf01c8 movl $0x0, 0x44(%rsp) leaq 0x48(%rsp), %rdi callq 0x5b588 leaq 0x98(%rsp), %rdi callq 0xf9f30 movl 0x44(%rsp), %eax testl %eax, %eax jne 0xf03d9 jmp 0xf01c6 jmp 0xf01e6 jmp 0xf03d9 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) jmp 0xf03e8 leaq 0xf8(%rsp), %rax movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rdi callq 0xf9f70 movq %rax, 0x28(%rsp) movq 0x30(%rsp), %rdi callq 0xf9fa0 movq %rax, 0x20(%rsp) leaq 0x28(%rsp), %rdi leaq 0x20(%rsp), %rsi callq 0xfa000 testb $0x1, %al jne 0xf0229 jmp 0xf0312 leaq 0x28(%rsp), %rdi callq 0xfa040 movl (%rax), %eax movl %eax, 0x1c(%rsp) cmpl $0x1f, 0x1c(%rsp) jbe 0xf02ec cmpl $0x7f, 0x1c(%rsp) je 0xf02ec cmpl $0x80, 0x1c(%rsp) jb 0xf0267 cmpl $0x9f, 0x1c(%rsp) jbe 0xf02ec cmpl $0xff0e, 0x1c(%rsp) # imm = 0xFF0E je 0xf02ec cmpl $0x2215, 0x1c(%rsp) # imm = 0x2215 je 0xf02ec cmpl $0x2216, 0x1c(%rsp) # imm = 0x2216 je 0xf02ec cmpl $0xd800, 0x1c(%rsp) # imm = 0xD800 jb 0xf0299 cmpl $0xdfff, 0x1c(%rsp) # imm = 0xDFFF jbe 0xf02ec cmpl $0xfffd, 0x1c(%rsp) # imm = 0xFFFD je 0xf02ec cmpl $0xfeff, 0x1c(%rsp) # imm = 0xFEFF je 0xf02ec cmpl $0x2f, 0x1c(%rsp) je 0xf02ec cmpl $0x5c, 0x1c(%rsp) je 0xf02ec cmpl $0x3a, 0x1c(%rsp) je 0xf02ec cmpl $0x2a, 0x1c(%rsp) je 0xf02ec cmpl $0x3f, 0x1c(%rsp) je 0xf02ec cmpl $0x22, 0x1c(%rsp) je 0xf02ec cmpl $0x3c, 0x1c(%rsp) je 0xf02ec cmpl $0x3e, 0x1c(%rsp) je 0xf02ec cmpl $0x7c, 0x1c(%rsp) jne 0xf0301 movb $0x0, 0x127(%rsp) movl $0x1, 0x44(%rsp) jmp 0xf03d9 jmp 0xf0303 leaq 0x28(%rsp), %rdi callq 0xfa050 jmp 0xf0211 movq 0x118(%rsp), %rdi callq 0x5a260 movsbl (%rax), %eax cmpl $0x20, %eax je 0xf0351 movq 0x118(%rsp), %rdi callq 0x5af40 movsbl (%rax), %eax cmpl $0x20, %eax je 0xf0351 movq 0x118(%rsp), %rdi callq 0x5af40 movsbl (%rax), %eax cmpl $0x2e, %eax jne 0xf0363 movb $0x0, 0x127(%rsp) movl $0x1, 0x44(%rsp) jmp 0xf03d9 movq 0x118(%rsp), %rdi leaq 0x11cbce(%rip), %rsi # 0x20cf40 xorl %eax, %eax movl %eax, %edx callq 0x5a070 cmpq $-0x1, %rax je 0xf0393 movb $0x0, 0x127(%rsp) movl $0x1, 0x44(%rsp) jmp 0xf03d9 movq 0x118(%rsp), %rdi leaq 0x11cb9f(%rip), %rsi # 0x20cf41 callq 0x8e4d0 movb %al, 0x7(%rsp) jmp 0xf03ad movb 0x7(%rsp), %al testb $0x1, %al jne 0xf03b7 jmp 0xf03c9 movb $0x0, 0x127(%rsp) movl $0x1, 0x44(%rsp) jmp 0xf03d9 movb $0x1, 0x127(%rsp) movl $0x1, 0x44(%rsp) leaq 0xf8(%rsp), %rdi callq 0xf9e40 jmp 0xf03f7 leaq 0xf8(%rsp), %rdi callq 0xf9e40 jmp 0xf0408 movb 0x127(%rsp), %al andb $0x1, %al addq $0x128, %rsp # imm = 0x128 retq movq 0x90(%rsp), %rdi callq 0x5abc0 nopw %cs:(%rax,%rax)
_Z20fs_validate_filenameRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: sub rsp, 128h mov [rsp+128h+var_10], rdi mov rdi, [rsp+128h+var_10] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void) cmp rax, 0 jnz short loc_F005F mov [rsp+128h+var_1], 0 jmp loc_F03F7 loc_F005F: mov rdi, [rsp+128h+var_10] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void) cmp rax, 0FFh jbe short loc_F0081 mov [rsp+128h+var_1], 0 jmp loc_F03F7 loc_F0081: lea rdi, [rsp+128h+var_30] call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEC2Ev; std::basic_string<char32_t>::basic_string(void) lea rdi, [rsp+128h+var_90]; int call _ZNSt7__cxx1115wstring_convertISt12codecvt_utf8IDiLm1114111ELSt12codecvt_mode0EEDiSaIDiESaIcEEC2Ev; std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::wstring_convert(void) jmp short $+2 loc_F009D: mov rdx, [rsp+128h+var_10] lea rdi, [rsp+128h+var_C0] lea rsi, [rsp+128h+var_90] call _ZNSt7__cxx1115wstring_convertISt12codecvt_utf8IDiLm1114111ELSt12codecvt_mode0EEDiSaIDiESaIcEE10from_bytesERKNS_12basic_stringIcSt11char_traitsIcES5_EE; std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::from_bytes(std::string const&) jmp short $+2 loc_F00B9: lea rdi, [rsp+128h+var_30] mov [rsp+128h+var_118], rdi lea rsi, [rsp+128h+var_C0] mov [rsp+128h+var_120], rsi call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEaSEOS4_; std::basic_string<char32_t>::operator=(std::basic_string<char32_t>&&) mov rdi, [rsp+128h+var_120] call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEED2Ev; std::basic_string<char32_t>::~basic_string() mov rdx, [rsp+128h+var_118] lea rdi, [rsp+128h+var_E0] lea rsi, [rsp+128h+var_90] call _ZNSt7__cxx1115wstring_convertISt12codecvt_utf8IDiLm1114111ELSt12codecvt_mode0EEDiSaIDiESaIcEE8to_bytesERKNS_12basic_stringIDiSt11char_traitsIDiES4_EE; std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::to_bytes(std::basic_string<char32_t> const&) jmp short $+2 loc_F00F8: mov rsi, [rsp+128h+var_10] lea rdi, [rsp+128h+var_E0] call _ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EESA_; std::operator!=<char>(std::string const&,std::string const&) test al, 1 jnz short loc_F0113 jmp loc_F0199 loc_F0113: mov [rsp+128h+var_1], 0 mov [rsp+128h+var_E4], 1 jmp short loc_F01A1 mov rcx, rax mov eax, edx mov [rsp+128h+var_98], rcx mov [rsp+128h+var_9C], eax jmp short loc_F015C mov rcx, rax mov eax, edx mov [rsp+128h+var_98], rcx mov [rsp+128h+var_9C], eax lea rdi, [rsp+128h+var_90] call _ZNSt7__cxx1115wstring_convertISt12codecvt_utf8IDiLm1114111ELSt12codecvt_mode0EEDiSaIDiESaIcEED2Ev; std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::~wstring_convert() loc_F015C: mov eax, [rsp+128h+var_9C] mov ecx, 1 cmp eax, ecx jnz loc_F03E8 mov rdi, [rsp+128h+var_98]; void * call ___cxa_begin_catch mov [rsp+128h+var_F0], rax mov [rsp+128h+var_1], 0 mov [rsp+128h+var_E4], 1 call ___cxa_end_catch jmp short loc_F01C8 loc_F0199: mov [rsp+128h+var_E4], 0 loc_F01A1: lea rdi, [rsp+128h+var_E0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+128h+var_90] call _ZNSt7__cxx1115wstring_convertISt12codecvt_utf8IDiLm1114111ELSt12codecvt_mode0EEDiSaIDiESaIcEED2Ev; std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::~wstring_convert() mov eax, [rsp+128h+var_E4] test eax, eax jnz loc_F03D9 jmp short $+2 loc_F01C6: jmp short loc_F01E6 loc_F01C8: jmp loc_F03D9 mov rcx, rax mov eax, edx mov [rsp+128h+var_98], rcx mov [rsp+128h+var_9C], eax jmp loc_F03E8 loc_F01E6: lea rax, [rsp+128h+var_30] mov [rsp+128h+var_F8], rax mov rdi, [rsp+128h+var_F8] call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEE5beginEv; std::basic_string<char32_t>::begin(void) mov [rsp+128h+var_100], rax mov rdi, [rsp+128h+var_F8] call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEE3endEv; std::basic_string<char32_t>::end(void) mov [rsp+128h+var_108], rax loc_F0211: lea rdi, [rsp+128h+var_100] lea rsi, [rsp+128h+var_108] call _ZN9__gnu_cxxneIPDiNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_; __gnu_cxx::operator!=<char32_t *,std::basic_string<char32_t>>(__gnu_cxx::__normal_iterator<char32_t *,std::basic_string<char32_t>> const&,__gnu_cxx::__normal_iterator<char32_t *,std::basic_string<char32_t>> const&) test al, 1 jnz short loc_F0229 jmp loc_F0312 loc_F0229: lea rdi, [rsp+128h+var_100] call _ZNK9__gnu_cxx17__normal_iteratorIPDiNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEEEdeEv; __gnu_cxx::__normal_iterator<char32_t *,std::basic_string<char32_t>>::operator*(void) mov eax, [rax] mov [rsp+128h+var_10C], eax cmp [rsp+128h+var_10C], 1Fh jbe loc_F02EC cmp [rsp+128h+var_10C], 7Fh jz loc_F02EC cmp [rsp+128h+var_10C], 80h jb short loc_F0267 cmp [rsp+128h+var_10C], 9Fh jbe loc_F02EC loc_F0267: cmp [rsp+128h+var_10C], 0FF0Eh jz short loc_F02EC cmp [rsp+128h+var_10C], 2215h jz short loc_F02EC cmp [rsp+128h+var_10C], 2216h jz short loc_F02EC cmp [rsp+128h+var_10C], 0D800h jb short loc_F0299 cmp [rsp+128h+var_10C], 0DFFFh jbe short loc_F02EC loc_F0299: cmp [rsp+128h+var_10C], 0FFFDh jz short loc_F02EC cmp [rsp+128h+var_10C], 0FEFFh jz short loc_F02EC cmp [rsp+128h+var_10C], 2Fh ; '/' jz short loc_F02EC cmp [rsp+128h+var_10C], 5Ch ; '\' jz short loc_F02EC cmp [rsp+128h+var_10C], 3Ah ; ':' jz short loc_F02EC cmp [rsp+128h+var_10C], 2Ah ; '*' jz short loc_F02EC cmp [rsp+128h+var_10C], 3Fh ; '?' jz short loc_F02EC cmp [rsp+128h+var_10C], 22h ; '"' jz short loc_F02EC cmp [rsp+128h+var_10C], 3Ch ; '<' jz short loc_F02EC cmp [rsp+128h+var_10C], 3Eh ; '>' jz short loc_F02EC cmp [rsp+128h+var_10C], 7Ch ; '|' jnz short loc_F0301 loc_F02EC: mov [rsp+128h+var_1], 0 mov [rsp+128h+var_E4], 1 jmp loc_F03D9 loc_F0301: jmp short $+2 loc_F0303: lea rdi, [rsp+128h+var_100] call _ZN9__gnu_cxx17__normal_iteratorIPDiNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEEEppEv; __gnu_cxx::__normal_iterator<char32_t *,std::basic_string<char32_t>>::operator++(void) jmp loc_F0211 loc_F0312: mov rdi, [rsp+128h+var_10] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5frontEv; std::string::front(void) movsx eax, byte ptr [rax] cmp eax, 20h ; ' ' jz short loc_F0351 mov rdi, [rsp+128h+var_10] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4backEv; std::string::back(void) movsx eax, byte ptr [rax] cmp eax, 20h ; ' ' jz short loc_F0351 mov rdi, [rsp+128h+var_10] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4backEv; std::string::back(void) movsx eax, byte ptr [rax] cmp eax, 2Eh ; '.' jnz short loc_F0363 loc_F0351: mov [rsp+128h+var_1], 0 mov [rsp+128h+var_E4], 1 jmp short loc_F03D9 loc_F0363: mov rdi, [rsp+128h+var_10] lea rsi, aN0N1+7; ".." xor eax, eax mov edx, eax call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcm; std::string::find(char const*,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh jz short loc_F0393 mov [rsp+128h+var_1], 0 mov [rsp+128h+var_E4], 1 jmp short loc_F03D9 loc_F0393: mov rdi, [rsp+128h+var_10] lea rsi, aN0N1+8; "." call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) mov [rsp+128h+var_121], al jmp short $+2 loc_F03AD: mov al, [rsp+128h+var_121] test al, 1 jnz short loc_F03B7 jmp short loc_F03C9 loc_F03B7: mov [rsp+128h+var_1], 0 mov [rsp+128h+var_E4], 1 jmp short loc_F03D9 loc_F03C9: mov [rsp+128h+var_1], 1 mov [rsp+128h+var_E4], 1 loc_F03D9: lea rdi, [rsp+128h+var_30] call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEED2Ev; std::basic_string<char32_t>::~basic_string() jmp short loc_F03F7 loc_F03E8: lea rdi, [rsp+128h+var_30] call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEED2Ev; std::basic_string<char32_t>::~basic_string() jmp short loc_F0408 loc_F03F7: mov al, [rsp+128h+var_1] and al, 1 add rsp, 128h retn loc_F0408: mov rdi, [rsp+128h+var_98] call __Unwind_Resume
bool fs_validate_filename(long long a1, int a2) { int v2; // edx int v3; // ecx int v4; // r8d int v5; // r9d int v7; // [rsp+0h] [rbp-128h] int v8; // [rsp+8h] [rbp-120h] void *v9; // [rsp+10h] [rbp-118h] int v10; // [rsp+18h] [rbp-110h] unsigned int v11; // [rsp+1Ch] [rbp-10Ch] long long v12; // [rsp+20h] [rbp-108h] BYREF _QWORD v13[2]; // [rsp+28h] [rbp-100h] BYREF int v14; // [rsp+44h] [rbp-E4h] _BYTE v15[32]; // [rsp+48h] [rbp-E0h] BYREF _BYTE v16[36]; // [rsp+68h] [rbp-C0h] BYREF int v17[24]; // [rsp+98h] [rbp-90h] BYREF _BYTE v18[32]; // [rsp+F8h] [rbp-30h] BYREF long long v19; // [rsp+118h] [rbp-10h] bool v20; // [rsp+127h] [rbp-1h] v19 = a1; if ( std::string::length(a1) ) { if ( (unsigned long long)std::string::length(v19) <= 0xFF ) { std::basic_string<char32_t>::basic_string(v18); std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::wstring_convert( (int)v17, a2, v2, v3, v4, v5, v7, v8, v9, v10, v12); std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::from_bytes( v16, v17, v19); std::basic_string<char32_t>::operator=(); std::basic_string<char32_t>::~basic_string(v16); std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::to_bytes( v15, v17, v18); if ( (std::operator!=<char>(v15, v19) & 1) != 0 ) { v20 = 0; v14 = 1; } else { v14 = 0; } std::string::~string(v15); std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::~wstring_convert(v17); if ( !v14 ) { v13[1] = v18; v13[0] = std::basic_string<char32_t>::begin(v18); v12 = std::basic_string<char32_t>::end(v18); while ( (__gnu_cxx::operator!=<char32_t *,std::basic_string<char32_t>>(v13, &v12) & 1) != 0 ) { v11 = *(_DWORD *)__gnu_cxx::__normal_iterator<char32_t *,std::basic_string<char32_t>>::operator*(v13); if ( v11 <= 0x1F || v11 == 127 || v11 >= 0x80 && v11 <= 0x9F || v11 == 65294 || v11 == 8725 || v11 == 8726 || v11 >= 0xD800 && v11 <= 0xDFFF || v11 == 65533 || v11 == 65279 || v11 == 47 || v11 == 92 || v11 == 58 || v11 == 42 || v11 == 63 || v11 == 34 || v11 == 60 || v11 == 62 || v11 == 124 ) { v20 = 0; v14 = 1; goto LABEL_41; } __gnu_cxx::__normal_iterator<char32_t *,std::basic_string<char32_t>>::operator++(v13); } if ( *(_BYTE *)std::string::front(v19) == 32 || *(_BYTE *)std::string::back(v19) == 32 || *(_BYTE *)std::string::back(v19) == 46 ) { v20 = 0; v14 = 1; } else { v20 = std::string::find(v19, "..", 0LL) == -1 && !std::operator==<char>(v19, (long long)"."); v14 = 1; } } LABEL_41: std::basic_string<char32_t>::~basic_string(v18); } else { return 0; } } else { return 0; } return v20; }
fs_validate_filename: SUB RSP,0x128 MOV qword ptr [RSP + 0x118],RDI MOV RDI,qword ptr [RSP + 0x118] CALL 0x0015aa10 CMP RAX,0x0 JNZ 0x001f005f MOV byte ptr [RSP + 0x127],0x0 JMP 0x001f03f7 LAB_001f005f: MOV RDI,qword ptr [RSP + 0x118] CALL 0x0015aa10 CMP RAX,0xff JBE 0x001f0081 MOV byte ptr [RSP + 0x127],0x0 JMP 0x001f03f7 LAB_001f0081: LEA RDI,[RSP + 0xf8] CALL 0x001f9a40 LAB_001f008e: LEA RDI,[RSP + 0x98] CALL 0x001f9ac0 JMP 0x001f009d LAB_001f009d: MOV RDX,qword ptr [RSP + 0x118] LAB_001f00a5: LEA RDI,[RSP + 0x68] LEA RSI,[RSP + 0x98] CALL 0x001f9b80 JMP 0x001f00b9 LAB_001f00b9: LEA RDI,[RSP + 0xf8] MOV qword ptr [RSP + 0x10],RDI LEA RSI,[RSP + 0x68] MOV qword ptr [RSP + 0x8],RSI CALL 0x001f9c00 MOV RDI,qword ptr [RSP + 0x8] CALL 0x001f9e40 MOV RDX,qword ptr [RSP + 0x10] LEA RDI,[RSP + 0x48] LEA RSI,[RSP + 0x98] CALL 0x001f9e80 LAB_001f00f6: JMP 0x001f00f8 LAB_001f00f8: MOV RSI,qword ptr [RSP + 0x118] LEA RDI,[RSP + 0x48] CALL 0x001f9f00 TEST AL,0x1 JNZ 0x001f0113 JMP 0x001f0199 LAB_001f0113: MOV byte ptr [RSP + 0x127],0x0 MOV dword ptr [RSP + 0x44],0x1 JMP 0x001f01a1 LAB_001f0199: MOV dword ptr [RSP + 0x44],0x0 LAB_001f01a1: LEA RDI,[RSP + 0x48] CALL 0x0015b588 LEA RDI,[RSP + 0x98] CALL 0x001f9f30 MOV EAX,dword ptr [RSP + 0x44] TEST EAX,EAX JNZ 0x001f03d9 JMP 0x001f01c6 LAB_001f01c6: JMP 0x001f01e6 LAB_001f01e6: LEA RAX,[RSP + 0xf8] MOV qword ptr [RSP + 0x30],RAX MOV RDI,qword ptr [RSP + 0x30] CALL 0x001f9f70 MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x30] CALL 0x001f9fa0 MOV qword ptr [RSP + 0x20],RAX LAB_001f0211: LEA RDI,[RSP + 0x28] LEA RSI,[RSP + 0x20] CALL 0x001fa000 TEST AL,0x1 JNZ 0x001f0229 JMP 0x001f0312 LAB_001f0229: LEA RDI,[RSP + 0x28] CALL 0x001fa040 MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0x1c],EAX CMP dword ptr [RSP + 0x1c],0x1f JBE 0x001f02ec CMP dword ptr [RSP + 0x1c],0x7f JZ 0x001f02ec CMP dword ptr [RSP + 0x1c],0x80 JC 0x001f0267 CMP dword ptr [RSP + 0x1c],0x9f JBE 0x001f02ec LAB_001f0267: CMP dword ptr [RSP + 0x1c],0xff0e JZ 0x001f02ec CMP dword ptr [RSP + 0x1c],0x2215 JZ 0x001f02ec CMP dword ptr [RSP + 0x1c],0x2216 JZ 0x001f02ec CMP dword ptr [RSP + 0x1c],0xd800 JC 0x001f0299 CMP dword ptr [RSP + 0x1c],0xdfff JBE 0x001f02ec LAB_001f0299: CMP dword ptr [RSP + 0x1c],0xfffd JZ 0x001f02ec CMP dword ptr [RSP + 0x1c],0xfeff JZ 0x001f02ec CMP dword ptr [RSP + 0x1c],0x2f JZ 0x001f02ec CMP dword ptr [RSP + 0x1c],0x5c JZ 0x001f02ec CMP dword ptr [RSP + 0x1c],0x3a JZ 0x001f02ec CMP dword ptr [RSP + 0x1c],0x2a JZ 0x001f02ec CMP dword ptr [RSP + 0x1c],0x3f JZ 0x001f02ec CMP dword ptr [RSP + 0x1c],0x22 JZ 0x001f02ec CMP dword ptr [RSP + 0x1c],0x3c JZ 0x001f02ec CMP dword ptr [RSP + 0x1c],0x3e JZ 0x001f02ec CMP dword ptr [RSP + 0x1c],0x7c JNZ 0x001f0301 LAB_001f02ec: MOV byte ptr [RSP + 0x127],0x0 MOV dword ptr [RSP + 0x44],0x1 JMP 0x001f03d9 LAB_001f0301: JMP 0x001f0303 LAB_001f0303: LEA RDI,[RSP + 0x28] CALL 0x001fa050 JMP 0x001f0211 LAB_001f0312: MOV RDI,qword ptr [RSP + 0x118] CALL 0x0015a260 MOVSX EAX,byte ptr [RAX] CMP EAX,0x20 JZ 0x001f0351 MOV RDI,qword ptr [RSP + 0x118] CALL 0x0015af40 MOVSX EAX,byte ptr [RAX] CMP EAX,0x20 JZ 0x001f0351 MOV RDI,qword ptr [RSP + 0x118] CALL 0x0015af40 MOVSX EAX,byte ptr [RAX] CMP EAX,0x2e JNZ 0x001f0363 LAB_001f0351: MOV byte ptr [RSP + 0x127],0x0 MOV dword ptr [RSP + 0x44],0x1 JMP 0x001f03d9 LAB_001f0363: MOV RDI,qword ptr [RSP + 0x118] LEA RSI,[0x30cf40] XOR EAX,EAX MOV EDX,EAX CALL 0x0015a070 CMP RAX,-0x1 JZ 0x001f0393 MOV byte ptr [RSP + 0x127],0x0 MOV dword ptr [RSP + 0x44],0x1 JMP 0x001f03d9 LAB_001f0393: MOV RDI,qword ptr [RSP + 0x118] LEA RSI,[0x30cf41] CALL 0x0018e4d0 LAB_001f03a7: MOV byte ptr [RSP + 0x7],AL JMP 0x001f03ad LAB_001f03ad: MOV AL,byte ptr [RSP + 0x7] TEST AL,0x1 JNZ 0x001f03b7 JMP 0x001f03c9 LAB_001f03b7: MOV byte ptr [RSP + 0x127],0x0 MOV dword ptr [RSP + 0x44],0x1 JMP 0x001f03d9 LAB_001f03c9: MOV byte ptr [RSP + 0x127],0x1 MOV dword ptr [RSP + 0x44],0x1 LAB_001f03d9: LEA RDI,[RSP + 0xf8] CALL 0x001f9e40 JMP 0x001f03f7 LAB_001f03f7: MOV AL,byte ptr [RSP + 0x127] AND AL,0x1 ADD RSP,0x128 RET
/* fs_validate_filename(std::__cxx11::string const&) */ ulong fs_validate_filename(string *param_1) { uint uVar1; bool bVar2; long lVar3; ulong uVar4; uint *puVar5; char *pcVar6; int8 local_108; int8 local_100; u32string *local_f8; uint local_e4; u32string local_e0 [32]; wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>> local_c0 [48]; wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>> local_90 [96]; u32string local_30 [32]; string *local_10; int1 local_1; local_10 = param_1; lVar3 = std::__cxx11::string::length(); if (lVar3 == 0) { local_1 = 0; uVar4 = 0; } else { uVar4 = std::__cxx11::string::length(); if (uVar4 < 0x100) { std::__cxx11::u32string::u32string(local_30); /* try { // try from 001f008e to 001f009a has its CatchHandler @ 001f0125 */ std::__cxx11:: wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>> ::wstring_convert(local_90); /* try { // try from 001f00a5 to 001f00f5 has its CatchHandler @ 001f013b */ std::__cxx11:: wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>> ::from_bytes(local_c0,(string *)local_90); std::__cxx11::u32string::operator=(local_30,(u32string *)local_c0); std::__cxx11::u32string::~u32string((u32string *)local_c0); std::__cxx11:: wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>> ::to_bytes(local_e0); bVar2 = std::operator!=((string *)local_e0,local_10); if (bVar2) { local_1 = 0; } local_e4 = (uint)bVar2; std::__cxx11::string::~string((string *)local_e0); std::__cxx11:: wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>> ::~wstring_convert(local_90); if (local_e4 == 0) { local_f8 = local_30; local_100 = std::__cxx11::u32string::begin(local_f8); local_108 = std::__cxx11::u32string::end(local_f8); while (bVar2 = __gnu_cxx::operator!= ((__normal_iterator *)&local_100,(__normal_iterator *)&local_108), bVar2) { puVar5 = (uint *)__gnu_cxx::__normal_iterator<char32_t*,std::__cxx11::u32string>:: operator*((__normal_iterator<char32_t*,std::__cxx11::u32string> *) &local_100); uVar1 = *puVar5; if ((((((uVar1 < 0x20) || (uVar1 == 0x7f)) || ((0x7f < uVar1 && (uVar1 < 0xa0)))) || ((uVar1 == 0xff0e || (uVar1 == 0x2215)))) || ((uVar1 == 0x2216 || ((((0xd7ff < uVar1 && (uVar1 < 0xe000)) || (uVar1 == 0xfffd)) || (((uVar1 == 0xfeff || (uVar1 == 0x2f)) || ((uVar1 == 0x5c || ((uVar1 == 0x3a || (uVar1 == 0x2a)))))))))))) || ((uVar1 == 0x3f || ((((uVar1 == 0x22 || (uVar1 == 0x3c)) || (uVar1 == 0x3e)) || (uVar1 == 0x7c)))))) { local_1 = 0; local_e4 = 1; goto LAB_001f03d9; } __gnu_cxx::__normal_iterator<char32_t*,std::__cxx11::u32string>::operator++ ((__normal_iterator<char32_t*,std::__cxx11::u32string> *)&local_100); } pcVar6 = (char *)std::__cxx11::string::front(); if (((*pcVar6 == ' ') || (pcVar6 = (char *)std::__cxx11::string::back(), *pcVar6 == ' ')) || (pcVar6 = (char *)std::__cxx11::string::back(), *pcVar6 == '.')) { local_1 = 0; local_e4 = 1; } else { lVar3 = std::__cxx11::string::find((char *)local_10,0x30cf40); if (lVar3 == -1) { bVar2 = std::operator==(local_10,"."); if (bVar2) { local_1 = 0; local_e4 = 1; } else { local_1 = 1; local_e4 = 1; } } else { local_1 = 0; local_e4 = 1; } } } LAB_001f03d9: uVar4 = std::__cxx11::u32string::~u32string(local_30); } else { local_1 = 0; } } return CONCAT71((int7)(uVar4 >> 8),local_1) & 0xffffffffffffff01; }
16,808
JS_AtomIsNumericIndex1
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_AtomIsNumericIndex1(JSContext *ctx, JSAtom atom) { JSRuntime *rt = ctx->rt; JSAtomStruct *p1; JSString *p; int c, len, ret; JSValue num, str; if (__JS_AtomIsTaggedInt(atom)) return js_int32(__JS_AtomToUInt32(atom)); assert(atom < rt->atom_size); p1 = rt->atom_array[atom]; if (p1->atom_type != JS_ATOM_TYPE_STRING) return JS_UNDEFINED; p = p1; len = p->len; if (p->is_wide_char) { const uint16_t *r = p->u.str16, *r_end = p->u.str16 + len; if (r >= r_end) return JS_UNDEFINED; c = *r; if (c == '-') { if (r >= r_end) return JS_UNDEFINED; r++; c = *r; /* -0 case is specific */ if (c == '0' && len == 2) goto minus_zero; } /* XXX: should test NaN, but the tests do not check it */ if (!is_num(c)) { /* XXX: String should be normalized, therefore 8-bit only */ const uint16_t nfinity16[7] = { 'n', 'f', 'i', 'n', 'i', 't', 'y' }; if (!(c =='I' && (r_end - r) == 8 && !memcmp(r + 1, nfinity16, sizeof(nfinity16)))) return JS_UNDEFINED; } } else { const uint8_t *r = p->u.str8, *r_end = p->u.str8 + len; if (r >= r_end) return JS_UNDEFINED; c = *r; if (c == '-') { if (r >= r_end) return JS_UNDEFINED; r++; c = *r; /* -0 case is specific */ if (c == '0' && len == 2) { minus_zero: return js_float64(-0.0); } } if (!is_num(c)) { if (!(c =='I' && (r_end - r) == 8 && !memcmp(r + 1, "nfinity", 7))) return JS_UNDEFINED; } } /* this is ECMA CanonicalNumericIndexString primitive */ num = JS_ToNumber(ctx, JS_MKPTR(JS_TAG_STRING, p)); if (JS_IsException(num)) return num; str = JS_ToString(ctx, num); if (JS_IsException(str)) { JS_FreeValue(ctx, num); return str; } ret = js_string_eq(p, JS_VALUE_GET_STRING(str)); JS_FreeValue(ctx, str); if (ret) { return num; } else { JS_FreeValue(ctx, num); return JS_UNDEFINED; } }
O0
c
JS_AtomIsNumericIndex1: subq $0xc8, %rsp movq %rdi, 0xb0(%rsp) movl %esi, 0xac(%rsp) movq 0xb0(%rsp), %rax movq 0x18(%rax), %rax movq %rax, 0xa0(%rsp) movl 0xac(%rsp), %edi callq 0x360c0 cmpl $0x0, %eax je 0x36303 movl 0xac(%rsp), %edi callq 0x360e0 movl %eax, %edi callq 0x33cc0 movq %rax, 0xb8(%rsp) movq %rdx, 0xc0(%rsp) jmp 0x367d8 movq 0xa0(%rsp), %rax movq 0x68(%rax), %rax movl 0xac(%rsp), %ecx movq (%rax,%rcx,8), %rax movq %rax, 0x98(%rsp) movq 0x98(%rsp), %rax movq 0x4(%rax), %rax shrq $0x3e, %rax movzbl %al, %eax cmpl $0x1, %eax je 0x36356 movl $0x0, 0xb8(%rsp) movq $0x3, 0xc0(%rsp) jmp 0x367d8 movq 0x98(%rsp), %rax movq %rax, 0x90(%rsp) movq 0x90(%rsp), %rax movq 0x4(%rax), %rax andq $0x7fffffff, %rax # imm = 0x7FFFFFFF movl %eax, 0x88(%rsp) movq 0x90(%rsp), %rax movq 0x4(%rax), %rax shrq $0x1f, %rax andq $0x1, %rax cmpb $0x0, %al je 0x364ff movq 0x90(%rsp), %rax addq $0x18, %rax movq %rax, 0x58(%rsp) movq 0x90(%rsp), %rax addq $0x18, %rax movslq 0x88(%rsp), %rcx shlq %rcx addq %rcx, %rax movq %rax, 0x50(%rsp) movq 0x58(%rsp), %rax cmpq 0x50(%rsp), %rax jb 0x363f3 movl $0x0, 0xb8(%rsp) movq $0x3, 0xc0(%rsp) jmp 0x367d8 movq 0x58(%rsp), %rax movzwl (%rax), %eax movl %eax, 0x8c(%rsp) cmpl $0x2d, 0x8c(%rsp) jne 0x3646c movq 0x58(%rsp), %rax cmpq 0x50(%rsp), %rax jb 0x36434 movl $0x0, 0xb8(%rsp) movq $0x3, 0xc0(%rsp) jmp 0x367d8 movq 0x58(%rsp), %rax addq $0x2, %rax movq %rax, 0x58(%rsp) movq 0x58(%rsp), %rax movzwl (%rax), %eax movl %eax, 0x8c(%rsp) cmpl $0x30, 0x8c(%rsp) jne 0x3646a cmpl $0x2, 0x88(%rsp) jne 0x3646a jmp 0x365c8 jmp 0x3646c movl 0x8c(%rsp), %edi callq 0x5cc20 cmpl $0x0, %eax jne 0x364fa movq 0xd720a(%rip), %rax # 0x10d68e movq %rax, 0x42(%rsp) movl 0xd7207(%rip), %eax # 0x10d696 movl %eax, 0x4a(%rsp) movw 0xd7200(%rip), %ax # 0x10d69a movw %ax, 0x4e(%rsp) cmpl $0x49, 0x8c(%rsp) jne 0x364dc movq 0x50(%rsp), %rax movq 0x58(%rsp), %rcx subq %rcx, %rax sarq %rax cmpq $0x8, %rax jne 0x364dc movq 0x58(%rsp), %rdi addq $0x2, %rdi leaq 0x42(%rsp), %rsi movl $0xe, %edx callq 0xe480 cmpl $0x0, %eax je 0x364f8 movl $0x0, 0xb8(%rsp) movq $0x3, 0xc0(%rsp) jmp 0x367d8 jmp 0x364fa jmp 0x36659 movq 0x90(%rsp), %rax addq $0x18, %rax movq %rax, 0x38(%rsp) movq 0x90(%rsp), %rax addq $0x18, %rax movslq 0x88(%rsp), %rcx addq %rcx, %rax movq %rax, 0x30(%rsp) movq 0x38(%rsp), %rax cmpq 0x30(%rsp), %rax jb 0x36554 movl $0x0, 0xb8(%rsp) movq $0x3, 0xc0(%rsp) jmp 0x367d8 movq 0x38(%rsp), %rax movzbl (%rax), %eax movl %eax, 0x8c(%rsp) cmpl $0x2d, 0x8c(%rsp) jne 0x365ec movq 0x38(%rsp), %rax cmpq 0x30(%rsp), %rax jb 0x36595 movl $0x0, 0xb8(%rsp) movq $0x3, 0xc0(%rsp) jmp 0x367d8 movq 0x38(%rsp), %rax addq $0x1, %rax movq %rax, 0x38(%rsp) movq 0x38(%rsp), %rax movzbl (%rax), %eax movl %eax, 0x8c(%rsp) cmpl $0x30, 0x8c(%rsp) jne 0x365ea cmpl $0x2, 0x88(%rsp) jne 0x365ea jmp 0x365c8 movsd 0xd7270(%rip), %xmm0 # 0x10d840 callq 0x4d660 movq %rax, 0xb8(%rsp) movq %rdx, 0xc0(%rsp) jmp 0x367d8 jmp 0x365ec movl 0x8c(%rsp), %edi callq 0x5cc20 cmpl $0x0, %eax jne 0x36657 cmpl $0x49, 0x8c(%rsp) jne 0x36639 movq 0x30(%rsp), %rax movq 0x38(%rsp), %rcx subq %rcx, %rax cmpq $0x8, %rax jne 0x36639 movq 0x38(%rsp), %rdi addq $0x1, %rdi leaq 0xd7bfb(%rip), %rsi # 0x10e225 movl $0x7, %edx callq 0xe480 cmpl $0x0, %eax je 0x36655 movl $0x0, 0xb8(%rsp) movq $0x3, 0xc0(%rsp) jmp 0x367d8 jmp 0x36657 jmp 0x36659 movq 0xb0(%rsp), %rdi movq 0x90(%rsp), %rax movq %rax, 0x10(%rsp) movq $-0x7, 0x18(%rsp) movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rdx callq 0x61860 movq %rax, 0x20(%rsp) movq %rdx, 0x28(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x70(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x78(%rsp) movq 0x70(%rsp), %rdi movq 0x78(%rsp), %rsi callq 0x23cc0 cmpl $0x0, %eax je 0x366d7 movq 0x70(%rsp), %rax movq %rax, 0xb8(%rsp) movq 0x78(%rsp), %rax movq %rax, 0xc0(%rsp) jmp 0x367d8 movq 0xb0(%rsp), %rdi movq 0x70(%rsp), %rsi movq 0x78(%rsp), %rdx callq 0x29d40 movq %rax, (%rsp) movq %rdx, 0x8(%rsp) movq (%rsp), %rax movq %rax, 0x60(%rsp) movq 0x8(%rsp), %rax movq %rax, 0x68(%rsp) movq 0x60(%rsp), %rdi movq 0x68(%rsp), %rsi callq 0x23cc0 cmpl $0x0, %eax je 0x36754 movq 0xb0(%rsp), %rdi movq 0x70(%rsp), %rsi movq 0x78(%rsp), %rdx callq 0x23c90 movq 0x60(%rsp), %rax movq %rax, 0xb8(%rsp) movq 0x68(%rsp), %rax movq %rax, 0xc0(%rsp) jmp 0x367d8 movq 0x90(%rsp), %rdi movq 0x60(%rsp), %rsi callq 0x618d0 movl %eax, 0x84(%rsp) movq 0xb0(%rsp), %rdi movq 0x60(%rsp), %rsi movq 0x68(%rsp), %rdx callq 0x23c90 cmpl $0x0, 0x84(%rsp) je 0x367aa movq 0x70(%rsp), %rax movq %rax, 0xb8(%rsp) movq 0x78(%rsp), %rax movq %rax, 0xc0(%rsp) jmp 0x367d8 movq 0xb0(%rsp), %rdi movq 0x70(%rsp), %rsi movq 0x78(%rsp), %rdx callq 0x23c90 movl $0x0, 0xb8(%rsp) movq $0x3, 0xc0(%rsp) movq 0xb8(%rsp), %rax movq 0xc0(%rsp), %rdx addq $0xc8, %rsp retq
JS_AtomIsNumericIndex1: sub rsp, 0C8h mov [rsp+0C8h+var_18], rdi mov [rsp+0C8h+var_1C], esi mov rax, [rsp+0C8h+var_18] mov rax, [rax+18h] mov [rsp+0C8h+var_28], rax mov edi, [rsp+0C8h+var_1C] call __JS_AtomIsTaggedInt cmp eax, 0 jz short loc_36303 mov edi, [rsp+0C8h+var_1C] call __JS_AtomToUInt32 mov edi, eax call js_int32 mov [rsp+0C8h+var_10], rax mov [rsp+0C8h+var_8], rdx jmp loc_367D8 loc_36303: mov rax, [rsp+0C8h+var_28] mov rax, [rax+68h] mov ecx, [rsp+0C8h+var_1C] mov rax, [rax+rcx*8] mov [rsp+0C8h+var_30], rax mov rax, [rsp+0C8h+var_30] mov rax, [rax+4] shr rax, 3Eh movzx eax, al cmp eax, 1 jz short loc_36356 mov dword ptr [rsp+0C8h+var_10], 0 mov [rsp+0C8h+var_8], 3 jmp loc_367D8 loc_36356: mov rax, [rsp+0C8h+var_30] mov [rsp+0C8h+var_38], rax mov rax, [rsp+0C8h+var_38] mov rax, [rax+4] and rax, 7FFFFFFFh mov [rsp+0C8h+var_40], eax mov rax, [rsp+0C8h+var_38] mov rax, [rax+4] shr rax, 1Fh and rax, 1 cmp al, 0 jz loc_364FF mov rax, [rsp+0C8h+var_38] add rax, 18h mov [rsp+0C8h+var_70], rax mov rax, [rsp+0C8h+var_38] add rax, 18h movsxd rcx, [rsp+0C8h+var_40] shl rcx, 1 add rax, rcx mov [rsp+0C8h+var_78], rax mov rax, [rsp+0C8h+var_70] cmp rax, [rsp+0C8h+var_78] jb short loc_363F3 mov dword ptr [rsp+0C8h+var_10], 0 mov [rsp+0C8h+var_8], 3 jmp loc_367D8 loc_363F3: mov rax, [rsp+0C8h+var_70] movzx eax, word ptr [rax] mov [rsp+0C8h+var_3C], eax cmp [rsp+0C8h+var_3C], 2Dh ; '-' jnz short loc_3646C mov rax, [rsp+0C8h+var_70] cmp rax, [rsp+0C8h+var_78] jb short loc_36434 mov dword ptr [rsp+0C8h+var_10], 0 mov [rsp+0C8h+var_8], 3 jmp loc_367D8 loc_36434: mov rax, [rsp+0C8h+var_70] add rax, 2 mov [rsp+0C8h+var_70], rax mov rax, [rsp+0C8h+var_70] movzx eax, word ptr [rax] mov [rsp+0C8h+var_3C], eax cmp [rsp+0C8h+var_3C], 30h ; '0' jnz short loc_3646A cmp [rsp+0C8h+var_40], 2 jnz short loc_3646A jmp loc_365C8 loc_3646A: jmp short $+2 loc_3646C: mov edi, [rsp+0C8h+var_3C] call is_num cmp eax, 0 jnz short loc_364FA mov rax, cs:qword_10D68E mov [rsp+0C8h+var_86], rax mov eax, cs:dword_10D696 mov [rsp+0C8h+var_7E], eax mov ax, cs:word_10D69A mov [rsp+0C8h+var_7A], ax cmp [rsp+0C8h+var_3C], 49h ; 'I' jnz short loc_364DC mov rax, [rsp+0C8h+var_78] mov rcx, [rsp+0C8h+var_70] sub rax, rcx sar rax, 1 cmp rax, 8 jnz short loc_364DC mov rdi, [rsp+0C8h+var_70] add rdi, 2 lea rsi, [rsp+0C8h+var_86] mov edx, 0Eh call _memcmp cmp eax, 0 jz short loc_364F8 loc_364DC: mov dword ptr [rsp+0C8h+var_10], 0 mov [rsp+0C8h+var_8], 3 jmp loc_367D8 loc_364F8: jmp short $+2 loc_364FA: jmp loc_36659 loc_364FF: mov rax, [rsp+0C8h+var_38] add rax, 18h mov [rsp+0C8h+var_90], rax mov rax, [rsp+0C8h+var_38] add rax, 18h movsxd rcx, [rsp+0C8h+var_40] add rax, rcx mov [rsp+0C8h+var_98], rax mov rax, [rsp+0C8h+var_90] cmp rax, [rsp+0C8h+var_98] jb short loc_36554 mov dword ptr [rsp+0C8h+var_10], 0 mov [rsp+0C8h+var_8], 3 jmp loc_367D8 loc_36554: mov rax, [rsp+0C8h+var_90] movzx eax, byte ptr [rax] mov [rsp+0C8h+var_3C], eax cmp [rsp+0C8h+var_3C], 2Dh ; '-' jnz short loc_365EC mov rax, [rsp+0C8h+var_90] cmp rax, [rsp+0C8h+var_98] jb short loc_36595 mov dword ptr [rsp+0C8h+var_10], 0 mov [rsp+0C8h+var_8], 3 jmp loc_367D8 loc_36595: mov rax, [rsp+0C8h+var_90] add rax, 1 mov [rsp+0C8h+var_90], rax mov rax, [rsp+0C8h+var_90] movzx eax, byte ptr [rax] mov [rsp+0C8h+var_3C], eax cmp [rsp+0C8h+var_3C], 30h ; '0' jnz short loc_365EA cmp [rsp+0C8h+var_40], 2 jnz short loc_365EA jmp short $+2 loc_365C8: movsd xmm0, cs:qword_10D840 call js_float64 mov [rsp+0C8h+var_10], rax mov [rsp+0C8h+var_8], rdx jmp loc_367D8 loc_365EA: jmp short $+2 loc_365EC: mov edi, [rsp+0C8h+var_3C] call is_num cmp eax, 0 jnz short loc_36657 cmp [rsp+0C8h+var_3C], 49h ; 'I' jnz short loc_36639 mov rax, [rsp+0C8h+var_98] mov rcx, [rsp+0C8h+var_90] sub rax, rcx cmp rax, 8 jnz short loc_36639 mov rdi, [rsp+0C8h+var_90] add rdi, 1 lea rsi, aInfinity+2; "nfinity" mov edx, 7 call _memcmp cmp eax, 0 jz short loc_36655 loc_36639: mov dword ptr [rsp+0C8h+var_10], 0 mov [rsp+0C8h+var_8], 3 jmp loc_367D8 loc_36655: jmp short $+2 loc_36657: jmp short $+2 loc_36659: mov rdi, [rsp+0C8h+var_18] mov rax, [rsp+0C8h+var_38] mov [rsp+0C8h+var_B8], rax mov [rsp+0C8h+var_B0], 0FFFFFFFFFFFFFFF9h mov rsi, [rsp+0C8h+var_B8] mov rdx, [rsp+0C8h+var_B0] call JS_ToNumber mov [rsp+0C8h+var_A8], rax mov [rsp+0C8h+var_A0], rdx mov rax, [rsp+0C8h+var_A8] mov [rsp+0C8h+var_58], rax mov rax, [rsp+0C8h+var_A0] mov [rsp+0C8h+var_50], rax mov rdi, [rsp+0C8h+var_58] mov rsi, [rsp+0C8h+var_50] call JS_IsException_1 cmp eax, 0 jz short loc_366D7 mov rax, [rsp+0C8h+var_58] mov [rsp+0C8h+var_10], rax mov rax, [rsp+0C8h+var_50] mov [rsp+0C8h+var_8], rax jmp loc_367D8 loc_366D7: mov rdi, [rsp+0C8h+var_18] mov rsi, [rsp+0C8h+var_58] mov rdx, [rsp+0C8h+var_50] call JS_ToString mov [rsp+0C8h+var_C8], rax mov [rsp+0C8h+var_C0], rdx mov rax, [rsp+0C8h+var_C8] mov [rsp+0C8h+var_68], rax mov rax, [rsp+0C8h+var_C0] mov [rsp+0C8h+var_60], rax mov rdi, [rsp+0C8h+var_68] mov rsi, [rsp+0C8h+var_60] call JS_IsException_1 cmp eax, 0 jz short loc_36754 mov rdi, [rsp+0C8h+var_18] mov rsi, [rsp+0C8h+var_58] mov rdx, [rsp+0C8h+var_50] call JS_FreeValue mov rax, [rsp+0C8h+var_68] mov [rsp+0C8h+var_10], rax mov rax, [rsp+0C8h+var_60] mov [rsp+0C8h+var_8], rax jmp loc_367D8 loc_36754: mov rdi, [rsp+0C8h+var_38] mov rsi, [rsp+0C8h+var_68] call js_string_eq mov [rsp+0C8h+var_44], eax mov rdi, [rsp+0C8h+var_18] mov rsi, [rsp+0C8h+var_68] mov rdx, [rsp+0C8h+var_60] call JS_FreeValue cmp [rsp+0C8h+var_44], 0 jz short loc_367AA mov rax, [rsp+0C8h+var_58] mov [rsp+0C8h+var_10], rax mov rax, [rsp+0C8h+var_50] mov [rsp+0C8h+var_8], rax jmp short loc_367D8 loc_367AA: mov rdi, [rsp+0C8h+var_18] mov rsi, [rsp+0C8h+var_58] mov rdx, [rsp+0C8h+var_50] call JS_FreeValue mov dword ptr [rsp+0C8h+var_10], 0 mov [rsp+0C8h+var_8], 3 loc_367D8: mov rax, [rsp+0C8h+var_10] mov rdx, [rsp+0C8h+var_8] add rsp, 0C8h retn
long long JS_AtomIsNumericIndex1(long long a1, int a2) { int v2; // eax long long v3; // rdx long long v4; // rdx long long v5; // rdx long long v6; // rcx long long v7; // r8 long long v8; // r9 long long v9; // rdx unsigned long long v11; // [rsp+30h] [rbp-98h] unsigned __int8 *v12; // [rsp+38h] [rbp-90h] long long v13; // [rsp+42h] [rbp-86h] BYREF int v14; // [rsp+4Ah] [rbp-7Eh] __int16 v15; // [rsp+4Eh] [rbp-7Ah] unsigned long long v16; // [rsp+50h] [rbp-78h] unsigned __int16 *v17; // [rsp+58h] [rbp-70h] long long v18; // [rsp+60h] [rbp-68h] long long v19; // [rsp+68h] [rbp-60h] long long v20; // [rsp+70h] [rbp-58h] long long v21; // [rsp+78h] [rbp-50h] int v22; // [rsp+84h] [rbp-44h] int v23; // [rsp+88h] [rbp-40h] unsigned int v24; // [rsp+8Ch] [rbp-3Ch] long long v25; // [rsp+90h] [rbp-38h] long long v26; // [rsp+98h] [rbp-30h] long long v27; // [rsp+A0h] [rbp-28h] unsigned int v28; // [rsp+ACh] [rbp-1Ch] long long v29; // [rsp+B0h] [rbp-18h] long long v30; // [rsp+B8h] [rbp-10h] long long v31; // [rsp+C0h] [rbp-8h] v29 = a1; v28 = a2; v27 = *(_QWORD *)(a1 + 24); if ( _JS_AtomIsTaggedInt(a2) ) { v2 = _JS_AtomToUInt32(v28); v30 = js_int32(v2); v31 = v3; return v30; } v26 = *(_QWORD *)(*(_QWORD *)(v27 + 104) + 8LL * v28); if ( *(_QWORD *)(v26 + 4) >> 62 != 1 ) { LODWORD(v30) = 0; v31 = 3LL; return v30; } v25 = v26; v23 = *(_QWORD *)(v26 + 4) & 0x7FFFFFFF; if ( (*(_QWORD *)(v26 + 4) & 0x80000000LL) != 0 ) { v17 = (unsigned __int16 *)(v25 + 24); v16 = 2LL * v23 + v25 + 24; if ( v25 + 24 >= v16 ) { LODWORD(v30) = 0; v31 = 3LL; return v30; } v24 = *v17; if ( v24 != 45 ) goto LABEL_42; if ( (unsigned long long)v17 >= v16 ) { LODWORD(v30) = 0; v31 = 3LL; return v30; } v24 = *++v17; if ( v24 != 48 || v23 != 2 ) { LABEL_42: if ( !(unsigned int)is_num(v24) ) { v13 = 0x6E00690066006ELL; v14 = 7602281; v15 = 121; if ( v24 != 73 || (long long)(v16 - (_QWORD)v17) >> 1 != 8 || (unsigned int)memcmp(v17 + 1, &v13, 14LL) ) { LODWORD(v30) = 0; v31 = 3LL; return v30; } } goto LABEL_32; } LABEL_26: v30 = js_float64(-0.0); v31 = v4; return v30; } v12 = (unsigned __int8 *)(v25 + 24); v11 = v23 + v25 + 24; if ( v25 + 24 >= v11 ) { LODWORD(v30) = 0; v31 = 3LL; return v30; } v24 = *v12; if ( v24 == 45 ) { if ( (unsigned long long)v12 >= v11 ) { LODWORD(v30) = 0; v31 = 3LL; return v30; } v12 = (unsigned __int8 *)(v25 + 25); v24 = *(unsigned __int8 *)(v25 + 25); if ( v24 == 48 && v23 == 2 ) goto LABEL_26; } if ( !(unsigned int)is_num(v24) && (v24 != 73 || v11 - (_QWORD)v12 != 8 || (unsigned int)memcmp(v12 + 1, "nfinity", 7LL)) ) { LODWORD(v30) = 0; v31 = 3LL; return v30; } LABEL_32: v20 = JS_ToNumber(v29, v25, -7LL); v21 = v5; if ( JS_IsException_1(v20, v5) ) { v30 = v20; v31 = v21; } else { v18 = JS_ToString(v29, v20, v21, v6, v7, v8); v19 = v9; if ( JS_IsException_1(v18, v9) ) { JS_FreeValue(v29, v20, v21); v30 = v18; v31 = v19; } else { v22 = js_string_eq(v25, v18); JS_FreeValue(v29, v18, v19); if ( v22 ) { v30 = v20; v31 = v21; } else { JS_FreeValue(v29, v20, v21); LODWORD(v30) = 0; v31 = 3LL; } } } return v30; }
JS_AtomIsNumericIndex1: SUB RSP,0xc8 MOV qword ptr [RSP + 0xb0],RDI MOV dword ptr [RSP + 0xac],ESI MOV RAX,qword ptr [RSP + 0xb0] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0xa0],RAX MOV EDI,dword ptr [RSP + 0xac] CALL 0x001360c0 CMP EAX,0x0 JZ 0x00136303 MOV EDI,dword ptr [RSP + 0xac] CALL 0x001360e0 MOV EDI,EAX CALL 0x00133cc0 MOV qword ptr [RSP + 0xb8],RAX MOV qword ptr [RSP + 0xc0],RDX JMP 0x001367d8 LAB_00136303: MOV RAX,qword ptr [RSP + 0xa0] MOV RAX,qword ptr [RAX + 0x68] MOV ECX,dword ptr [RSP + 0xac] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP + 0x98],RAX MOV RAX,qword ptr [RSP + 0x98] MOV RAX,qword ptr [RAX + 0x4] SHR RAX,0x3e MOVZX EAX,AL CMP EAX,0x1 JZ 0x00136356 MOV dword ptr [RSP + 0xb8],0x0 MOV qword ptr [RSP + 0xc0],0x3 JMP 0x001367d8 LAB_00136356: MOV RAX,qword ptr [RSP + 0x98] MOV qword ptr [RSP + 0x90],RAX MOV RAX,qword ptr [RSP + 0x90] MOV RAX,qword ptr [RAX + 0x4] AND RAX,0x7fffffff MOV dword ptr [RSP + 0x88],EAX MOV RAX,qword ptr [RSP + 0x90] MOV RAX,qword ptr [RAX + 0x4] SHR RAX,0x1f AND RAX,0x1 CMP AL,0x0 JZ 0x001364ff MOV RAX,qword ptr [RSP + 0x90] ADD RAX,0x18 MOV qword ptr [RSP + 0x58],RAX MOV RAX,qword ptr [RSP + 0x90] ADD RAX,0x18 MOVSXD RCX,dword ptr [RSP + 0x88] SHL RCX,0x1 ADD RAX,RCX MOV qword ptr [RSP + 0x50],RAX MOV RAX,qword ptr [RSP + 0x58] CMP RAX,qword ptr [RSP + 0x50] JC 0x001363f3 MOV dword ptr [RSP + 0xb8],0x0 MOV qword ptr [RSP + 0xc0],0x3 JMP 0x001367d8 LAB_001363f3: MOV RAX,qword ptr [RSP + 0x58] MOVZX EAX,word ptr [RAX] MOV dword ptr [RSP + 0x8c],EAX CMP dword ptr [RSP + 0x8c],0x2d JNZ 0x0013646c MOV RAX,qword ptr [RSP + 0x58] CMP RAX,qword ptr [RSP + 0x50] JC 0x00136434 MOV dword ptr [RSP + 0xb8],0x0 MOV qword ptr [RSP + 0xc0],0x3 JMP 0x001367d8 LAB_00136434: MOV RAX,qword ptr [RSP + 0x58] ADD RAX,0x2 MOV qword ptr [RSP + 0x58],RAX MOV RAX,qword ptr [RSP + 0x58] MOVZX EAX,word ptr [RAX] MOV dword ptr [RSP + 0x8c],EAX CMP dword ptr [RSP + 0x8c],0x30 JNZ 0x0013646a CMP dword ptr [RSP + 0x88],0x2 JNZ 0x0013646a JMP 0x001365c8 LAB_0013646a: JMP 0x0013646c LAB_0013646c: MOV EDI,dword ptr [RSP + 0x8c] CALL 0x0015cc20 CMP EAX,0x0 JNZ 0x001364fa MOV RAX,qword ptr [0x0020d68e] MOV qword ptr [RSP + 0x42],RAX MOV EAX,dword ptr [0x0020d696] MOV dword ptr [RSP + 0x4a],EAX MOV AX,word ptr [0x0020d69a] MOV word ptr [RSP + 0x4e],AX CMP dword ptr [RSP + 0x8c],0x49 JNZ 0x001364dc MOV RAX,qword ptr [RSP + 0x50] MOV RCX,qword ptr [RSP + 0x58] SUB RAX,RCX SAR RAX,0x1 CMP RAX,0x8 JNZ 0x001364dc MOV RDI,qword ptr [RSP + 0x58] ADD RDI,0x2 LEA RSI,[RSP + 0x42] MOV EDX,0xe CALL 0x0010e480 CMP EAX,0x0 JZ 0x001364f8 LAB_001364dc: MOV dword ptr [RSP + 0xb8],0x0 MOV qword ptr [RSP + 0xc0],0x3 JMP 0x001367d8 LAB_001364f8: JMP 0x001364fa LAB_001364fa: JMP 0x00136659 LAB_001364ff: MOV RAX,qword ptr [RSP + 0x90] ADD RAX,0x18 MOV qword ptr [RSP + 0x38],RAX MOV RAX,qword ptr [RSP + 0x90] ADD RAX,0x18 MOVSXD RCX,dword ptr [RSP + 0x88] ADD RAX,RCX MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RSP + 0x38] CMP RAX,qword ptr [RSP + 0x30] JC 0x00136554 MOV dword ptr [RSP + 0xb8],0x0 MOV qword ptr [RSP + 0xc0],0x3 JMP 0x001367d8 LAB_00136554: MOV RAX,qword ptr [RSP + 0x38] MOVZX EAX,byte ptr [RAX] MOV dword ptr [RSP + 0x8c],EAX CMP dword ptr [RSP + 0x8c],0x2d JNZ 0x001365ec MOV RAX,qword ptr [RSP + 0x38] CMP RAX,qword ptr [RSP + 0x30] JC 0x00136595 MOV dword ptr [RSP + 0xb8],0x0 MOV qword ptr [RSP + 0xc0],0x3 JMP 0x001367d8 LAB_00136595: MOV RAX,qword ptr [RSP + 0x38] ADD RAX,0x1 MOV qword ptr [RSP + 0x38],RAX MOV RAX,qword ptr [RSP + 0x38] MOVZX EAX,byte ptr [RAX] MOV dword ptr [RSP + 0x8c],EAX CMP dword ptr [RSP + 0x8c],0x30 JNZ 0x001365ea CMP dword ptr [RSP + 0x88],0x2 JNZ 0x001365ea JMP 0x001365c8 LAB_001365c8: MOVSD XMM0,qword ptr [0x0020d840] CALL 0x0014d660 MOV qword ptr [RSP + 0xb8],RAX MOV qword ptr [RSP + 0xc0],RDX JMP 0x001367d8 LAB_001365ea: JMP 0x001365ec LAB_001365ec: MOV EDI,dword ptr [RSP + 0x8c] CALL 0x0015cc20 CMP EAX,0x0 JNZ 0x00136657 CMP dword ptr [RSP + 0x8c],0x49 JNZ 0x00136639 MOV RAX,qword ptr [RSP + 0x30] MOV RCX,qword ptr [RSP + 0x38] SUB RAX,RCX CMP RAX,0x8 JNZ 0x00136639 MOV RDI,qword ptr [RSP + 0x38] ADD RDI,0x1 LEA RSI,[0x20e225] MOV EDX,0x7 CALL 0x0010e480 CMP EAX,0x0 JZ 0x00136655 LAB_00136639: MOV dword ptr [RSP + 0xb8],0x0 MOV qword ptr [RSP + 0xc0],0x3 JMP 0x001367d8 LAB_00136655: JMP 0x00136657 LAB_00136657: JMP 0x00136659 LAB_00136659: MOV RDI,qword ptr [RSP + 0xb0] MOV RAX,qword ptr [RSP + 0x90] MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x18],-0x7 MOV RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x18] CALL 0x00161860 MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RSP + 0x28],RDX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x70],RAX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x78],RAX MOV RDI,qword ptr [RSP + 0x70] MOV RSI,qword ptr [RSP + 0x78] CALL 0x00123cc0 CMP EAX,0x0 JZ 0x001366d7 MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0xb8],RAX MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0xc0],RAX JMP 0x001367d8 LAB_001366d7: MOV RDI,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0x70] MOV RDX,qword ptr [RSP + 0x78] CALL 0x00129d40 MOV qword ptr [RSP],RAX MOV qword ptr [RSP + 0x8],RDX MOV RAX,qword ptr [RSP] MOV qword ptr [RSP + 0x60],RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x68],RAX MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x68] CALL 0x00123cc0 CMP EAX,0x0 JZ 0x00136754 MOV RDI,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0x70] MOV RDX,qword ptr [RSP + 0x78] CALL 0x00123c90 MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0xb8],RAX MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0xc0],RAX JMP 0x001367d8 LAB_00136754: MOV RDI,qword ptr [RSP + 0x90] MOV RSI,qword ptr [RSP + 0x60] CALL 0x001618d0 MOV dword ptr [RSP + 0x84],EAX MOV RDI,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x68] CALL 0x00123c90 CMP dword ptr [RSP + 0x84],0x0 JZ 0x001367aa MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0xb8],RAX MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0xc0],RAX JMP 0x001367d8 LAB_001367aa: MOV RDI,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0x70] MOV RDX,qword ptr [RSP + 0x78] CALL 0x00123c90 MOV dword ptr [RSP + 0xb8],0x0 MOV qword ptr [RSP + 0xc0],0x3 LAB_001367d8: MOV RAX,qword ptr [RSP + 0xb8] MOV RDX,qword ptr [RSP + 0xc0] ADD RSP,0xc8 RET
int1 [16] JS_AtomIsNumericIndex1(long param_1,uint param_2) { int iVar1; int4 uVar2; byte *pbVar3; int1 auVar4 [16]; byte *local_90; int8 local_86; int4 local_7e; int2 local_7a; ushort *local_78; ushort *local_70; int1 local_68 [16]; int1 local_58 [16]; int local_44; uint local_40; uint local_3c; long local_38; long local_30; long local_28; uint local_1c; long local_18; int4 local_10; int4 uStack_c; int8 local_8; local_28 = *(long *)(param_1 + 0x18); local_1c = param_2; local_18 = param_1; iVar1 = __JS_AtomIsTaggedInt(param_2); if (iVar1 != 0) { uVar2 = __JS_AtomToUInt32(local_1c); auVar4 = js_int32(uVar2); local_8 = auVar4._8_8_; local_10 = auVar4._0_4_; uStack_c = auVar4._4_4_; goto LAB_001367d8; } local_38 = *(long *)(*(long *)(local_28 + 0x68) + (ulong)local_1c * 8); if ((uint)((ulong)*(int8 *)(local_38 + 4) >> 0x3e) != 1) { local_10 = 0; local_8 = 3; goto LAB_001367d8; } local_40 = (uint)*(int8 *)(local_38 + 4) & 0x7fffffff; local_30 = local_38; if ((*(ulong *)(local_38 + 4) >> 0x1f & 1) == 0) { local_90 = (byte *)(local_38 + 0x18); pbVar3 = (byte *)(local_38 + 0x18 + (long)(int)local_40); if (pbVar3 <= local_90) { local_10 = 0; local_8 = 3; goto LAB_001367d8; } local_3c = (uint)*local_90; if (local_3c == 0x2d) { if (pbVar3 <= local_90) { local_10 = 0; local_8 = 3; goto LAB_001367d8; } local_90 = (byte *)(local_38 + 0x19); local_3c = (uint)*local_90; if ((local_3c == 0x30) && (local_40 == 2)) goto LAB_001365c8; } iVar1 = is_num(local_3c); if ((iVar1 == 0) && (((local_3c != 0x49 || ((long)pbVar3 - (long)local_90 != 8)) || (iVar1 = memcmp(local_90 + 1,"nfinity",7), iVar1 != 0)))) { local_10 = 0; local_8 = 3; goto LAB_001367d8; } } else { local_70 = (ushort *)(local_38 + 0x18); local_78 = (ushort *)(local_38 + 0x18 + (long)(int)local_40 * 2); if (local_78 <= local_70) { local_10 = 0; local_8 = 3; goto LAB_001367d8; } local_3c = (uint)*local_70; if (local_3c == 0x2d) { if (local_78 <= local_70) { local_10 = 0; local_8 = 3; goto LAB_001367d8; } local_70 = (ushort *)(local_38 + 0x1a); local_3c = (uint)*local_70; if ((local_3c == 0x30) && (local_40 == 2)) { LAB_001365c8: local_3c = 0x30; auVar4 = js_float64(DAT_0020d840); local_8 = auVar4._8_8_; local_10 = auVar4._0_4_; uStack_c = auVar4._4_4_; goto LAB_001367d8; } } iVar1 = is_num(local_3c); if (iVar1 == 0) { local_86 = DAT_0020d68e; local_7e = DAT_0020d696; local_7a = DAT_0020d69a; if (((local_3c != 0x49) || ((long)local_78 - (long)local_70 >> 1 != 8)) || (iVar1 = memcmp(local_70 + 1,&local_86,0xe), iVar1 != 0)) { local_10 = 0; local_8 = 3; goto LAB_001367d8; } } } local_58 = JS_ToNumber(local_18,local_38,0xfffffffffffffff9); iVar1 = JS_IsException(local_58._0_8_,local_58._8_8_); if (iVar1 == 0) { local_68 = JS_ToString(local_18,local_58._0_8_,local_58._8_8_); iVar1 = JS_IsException(local_68._0_8_,local_68._8_8_); if (iVar1 == 0) { local_44 = js_string_eq(local_38,local_68._0_8_); JS_FreeValue(local_18,local_68._0_8_,local_68._8_8_); if (local_44 == 0) { JS_FreeValue(local_18,local_58._0_8_,local_58._8_8_); local_10 = 0; local_8 = 3; } else { local_10 = local_58._0_4_; uStack_c = local_58._4_4_; local_8 = local_58._8_8_; } } else { JS_FreeValue(local_18,local_58._0_8_,local_58._8_8_); local_10 = local_68._0_4_; uStack_c = local_68._4_4_; local_8 = local_68._8_8_; } } else { local_10 = local_58._0_4_; uStack_c = local_58._4_4_; local_8 = local_58._8_8_; } LAB_001367d8: auVar4._4_4_ = uStack_c; auVar4._0_4_ = local_10; auVar4._8_8_ = local_8; return auVar4; }
16,809
ggml_rope_cache_init(float, float, float const*, float*, long, float, float, float*, float, float)
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp
static void ggml_rope_cache_init( float theta_base, float freq_scale, const float * freq_factors, float corr_dims[2], int64_t ne0, float ext_factor, float mscale, float * cache, float sin_sign, float theta_scale) { // ref: https://github.com/jquesnelle/yarn/blob/master/scaled_rope/LlamaYaRNScaledRotaryEmbedding.py float theta = theta_base; for (int64_t i0 = 0; i0 < ne0; i0 += 2) { const float ff = freq_factors ? freq_factors[i0/2] : 1.0f; rope_yarn( theta/ff, freq_scale, corr_dims, i0, ext_factor, mscale, &cache[i0 + 0], &cache[i0 + 1] ); cache[i0 + 1] *= sin_sign; theta *= theta_scale; } }
O1
cpp
ggml_rope_cache_init(float, float, float const*, float*, long, float, float, float*, float, float): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x20, %rsp vmovss %xmm5, 0x18(%rsp) vmovss %xmm4, 0x14(%rsp) vmovss %xmm3, 0x10(%rsp) vmovss %xmm2, 0xc(%rsp) vmovss %xmm1, 0x8(%rsp) testq %rdx, %rdx jle 0x47f56 movq %rcx, %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %r12 vmovaps %xmm0, %xmm1 addq $0x4, %rbx xorl %r13d, %r13d vmovss 0x11aa(%rip), %xmm0 # 0x490a0 testq %r12, %r12 je 0x47f01 vmovss (%r12,%r13,2), %xmm0 vdivss %xmm0, %xmm1, %xmm0 leaq -0x4(%rbx), %rdx vmovss %xmm1, 0x1c(%rsp) vmovss 0x8(%rsp), %xmm1 movq %r15, %rdi movq %r13, %rsi vmovss 0xc(%rsp), %xmm2 vmovss 0x10(%rsp), %xmm3 movq %rbx, %rcx callq 0x48188 vmovss 0x1c(%rsp), %xmm1 vmovss 0x14(%rsp), %xmm0 vmulss (%rbx), %xmm0, %xmm0 vmovss %xmm0, (%rbx) vmulss 0x18(%rsp), %xmm1, %xmm1 addq $0x2, %r13 addq $0x8, %rbx cmpq %r14, %r13 jl 0x47eee addq $0x20, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
_ZL20ggml_rope_cache_initffPKfPflffS1_ff: push r15 push r14 push r13 push r12 push rbx sub rsp, 20h vmovss [rsp+48h+var_30], xmm5 vmovss [rsp+48h+var_34], xmm4 vmovss [rsp+48h+var_38], xmm3 vmovss [rsp+48h+var_3C], xmm2 vmovss [rsp+48h+var_40], xmm1 test rdx, rdx jle short loc_47F56 mov rbx, rcx mov r14, rdx mov r15, rsi mov r12, rdi vmovaps xmm1, xmm0 add rbx, 4 xor r13d, r13d loc_47EEE: vmovss xmm0, cs:dword_490A0 test r12, r12 jz short loc_47F01 vmovss xmm0, dword ptr [r12+r13*2] loc_47F01: vdivss xmm0, xmm1, xmm0; float lea rdx, [rbx-4]; float * vmovss [rsp+48h+var_2C], xmm1 vmovss xmm1, [rsp+48h+var_40]; float mov rdi, r15; float * mov rsi, r13; __int64 vmovss xmm2, [rsp+48h+var_3C]; float vmovss xmm3, [rsp+48h+var_38]; float mov rcx, rbx; float * call _ZL9rope_yarnffPflffS_S_; rope_yarn(float,float,float *,long,float,float,float *,float *) vmovss xmm1, [rsp+48h+var_2C] vmovss xmm0, [rsp+48h+var_34] vmulss xmm0, xmm0, dword ptr [rbx] vmovss dword ptr [rbx], xmm0 vmulss xmm1, xmm1, [rsp+48h+var_30] add r13, 2 add rbx, 8 cmp r13, r14 jl short loc_47EEE loc_47F56: add rsp, 20h pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long ggml_rope_cache_init( __m128 _XMM0, __m128 _XMM1, const float *a3, float *a4, long long a5, __m128 _XMM2, __m128 _XMM3, float *a8, __m128 _XMM4, __m128 _XMM5) { long long result; // rax __asm { vmovss [rsp+48h+var_30], xmm5 vmovss [rsp+48h+var_34], xmm4 vmovss [rsp+48h+var_38], xmm3 vmovss [rsp+48h+var_3C], xmm2 vmovss [rsp+48h+var_40], xmm1 } if ( a5 > 0 ) { _R12 = a3; __asm { vmovaps xmm1, xmm0 } _RBX = a8 + 1; for ( _R13 = 0LL; _R13 < a5; _R13 += 2LL ) { __asm { vmovss xmm0, cs:dword_490A0 } if ( a3 ) __asm { vmovss xmm0, dword ptr [r12+r13*2] } __asm { vdivss xmm0, xmm1, xmm0; float vmovss [rsp+48h+var_2C], xmm1 vmovss xmm1, [rsp+48h+var_40]; float vmovss xmm2, [rsp+48h+var_3C]; float vmovss xmm3, [rsp+48h+var_38]; float } result = rope_yarn( *(float *)&_XMM0, *(float *)&_XMM1, a4, _R13, *(float *)&_XMM2, *(float *)&_XMM3, _RBX - 1, _RBX); __asm { vmovss xmm1, [rsp+48h+var_2C] vmovss xmm0, [rsp+48h+var_34] vmulss xmm0, xmm0, dword ptr [rbx] vmovss dword ptr [rbx], xmm0 vmulss xmm1, xmm1, [rsp+48h+var_30] } _RBX += 2; } } return result; }
ggml_rope_cache_init: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x20 VMOVSS dword ptr [RSP + 0x18],XMM5 VMOVSS dword ptr [RSP + 0x14],XMM4 VMOVSS dword ptr [RSP + 0x10],XMM3 VMOVSS dword ptr [RSP + 0xc],XMM2 VMOVSS dword ptr [RSP + 0x8],XMM1 TEST RDX,RDX JLE 0x00147f56 MOV RBX,RCX MOV R14,RDX MOV R15,RSI MOV R12,RDI VMOVAPS XMM1,XMM0 ADD RBX,0x4 XOR R13D,R13D LAB_00147eee: VMOVSS XMM0,dword ptr [0x001490a0] TEST R12,R12 JZ 0x00147f01 VMOVSS XMM0,dword ptr [R12 + R13*0x2] LAB_00147f01: VDIVSS XMM0,XMM1,XMM0 LEA RDX,[RBX + -0x4] VMOVSS dword ptr [RSP + 0x1c],XMM1 VMOVSS XMM1,dword ptr [RSP + 0x8] MOV RDI,R15 MOV RSI,R13 VMOVSS XMM2,dword ptr [RSP + 0xc] VMOVSS XMM3,dword ptr [RSP + 0x10] MOV RCX,RBX CALL 0x00148188 VMOVSS XMM1,dword ptr [RSP + 0x1c] VMOVSS XMM0,dword ptr [RSP + 0x14] VMULSS XMM0,XMM0,dword ptr [RBX] VMOVSS dword ptr [RBX],XMM0 VMULSS XMM1,XMM1,dword ptr [RSP + 0x18] ADD R13,0x2 ADD RBX,0x8 CMP R13,R14 JL 0x00147eee LAB_00147f56: ADD RSP,0x20 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* ggml_rope_cache_init(float, float, float const*, float*, long, float, float, float*, float, float) */ void ggml_rope_cache_init (float param_1,float param_2,float *param_3,float *param_4,long param_5,float param_6 ,float param_7,float *param_8,float param_9,float param_10) { float *pfVar1; long lVar2; float fVar3; if (0 < param_5) { pfVar1 = param_8 + 1; lVar2 = 0; do { fVar3 = DAT_001490a0; if (param_3 != (float *)0x0) { fVar3 = *(float *)((long)param_3 + lVar2 * 2); } rope_yarn(param_1 / fVar3,param_2,param_4,lVar2,param_6,param_7,pfVar1 + -1,pfVar1); *pfVar1 = param_9 * *pfVar1; param_1 = param_1 * param_10; lVar2 = lVar2 + 2; pfVar1 = pfVar1 + 2; } while (lVar2 < param_5); } return; }
16,810
mariadb_field_attr
eloqsql/libmariadb/libmariadb/mariadb_lib.c
int STDCALL mariadb_field_attr(MARIADB_CONST_STRING *attr, const MYSQL_FIELD *field, enum mariadb_field_attr_t type) { MA_FIELD_EXTENSION *ext= (MA_FIELD_EXTENSION*) field->extension; if (!ext || type > MARIADB_FIELD_ATTR_LAST) { *attr= null_const_string; return 1; } *attr= ext->metadata[type]; return 0; }
O0
c
mariadb_field_attr: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq -0x18(%rbp), %rax movq 0x78(%rax), %rax movq %rax, -0x28(%rbp) cmpq $0x0, -0x28(%rbp) je 0x517a8 cmpl $0x1, -0x1c(%rbp) jbe 0x517ca movq -0x10(%rbp), %rax movq 0x3b12f5(%rip), %rcx # 0x402aa8 movq %rcx, (%rax) movq 0x3b12f3(%rip), %rcx # 0x402ab0 movq %rcx, 0x8(%rax) movl $0x1, -0x4(%rbp) jmp 0x517f1 movq -0x10(%rbp), %rax movq -0x28(%rbp), %rcx movl -0x1c(%rbp), %edx shlq $0x4, %rdx addq %rdx, %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw %cs:(%rax,%rax)
mariadb_field_attr: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov rax, [rbp+var_18] mov rax, [rax+78h] mov [rbp+var_28], rax cmp [rbp+var_28], 0 jz short loc_517A8 cmp [rbp+var_1C], 1 jbe short loc_517CA loc_517A8: mov rax, [rbp+var_10] mov rcx, cs:null_const_string mov [rax], rcx mov rcx, cs:qword_402AB0 mov [rax+8], rcx mov [rbp+var_4], 1 jmp short loc_517F1 loc_517CA: mov rax, [rbp+var_10] mov rcx, [rbp+var_28] mov edx, [rbp+var_1C] shl rdx, 4 add rcx, rdx mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx mov [rbp+var_4], 0 loc_517F1: mov eax, [rbp+var_4] pop rbp retn
long long mariadb_field_attr(_QWORD *a1, long long a2, unsigned int a3) { long long v3; // rdx long long v5; // [rsp+0h] [rbp-28h] v5 = *(_QWORD *)(a2 + 120); if ( v5 && a3 <= 1 ) { v3 = 16LL * a3; *a1 = *(_QWORD *)(v3 + v5); a1[1] = *(_QWORD *)(v3 + v5 + 8); return 0; } else { *a1 = null_const_string; a1[1] = qword_402AB0; return 1; } }
mariadb_field_attr: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x78] MOV qword ptr [RBP + -0x28],RAX CMP qword ptr [RBP + -0x28],0x0 JZ 0x001517a8 CMP dword ptr [RBP + -0x1c],0x1 JBE 0x001517ca LAB_001517a8: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [0x00502aa8] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [0x00502ab0] MOV qword ptr [RAX + 0x8],RCX MOV dword ptr [RBP + -0x4],0x1 JMP 0x001517f1 LAB_001517ca: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x28] MOV EDX,dword ptr [RBP + -0x1c] SHL RDX,0x4 ADD RCX,RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV dword ptr [RBP + -0x4],0x0 LAB_001517f1: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 mariadb_field_attr(int8 *param_1,long param_2,uint param_3) { int8 *puVar1; int4 local_c; if ((*(long *)(param_2 + 0x78) == 0) || (1 < param_3)) { *param_1 = null_const_string; param_1[1] = DAT_00502ab0; local_c = 1; } else { puVar1 = (int8 *)(*(long *)(param_2 + 0x78) + (ulong)param_3 * 0x10); *param_1 = *puVar1; param_1[1] = puVar1[1]; local_c = 0; } return local_c; }
16,811
Node_measure_with_measure_fn_Test::TestBody()
yoga-mod/tests/YGNodeCallbackTest.cpp
TEST(Node, measure_with_measure_fn) { auto n = Node{}; n.setMeasureFunc( [](YGNodeConstRef, float w, YGMeasureMode wm, float h, YGMeasureMode hm) { return YGSize{w * static_cast<float>(wm), h / static_cast<float>(hm)}; }); ASSERT_EQ( n.measure(23, MeasureMode::Exactly, 24, MeasureMode::AtMost), (YGSize{23, 12})); }
O3
cpp
Node_measure_with_measure_fn_Test::TestBody(): pushq %rbp movq %rsp, %rbp pushq %rbx subq $0x268, %rsp # imm = 0x268 leaq -0x270(%rbp), %rbx movq %rbx, %rdi callq 0x371522 leaq 0x8a6(%rip), %rsi # 0xad1da movq %rbx, %rdi callq 0x371874 leaq -0x270(%rbp), %rdi movss 0x2f1089(%rip), %xmm0 # 0x39d9d4 movss 0x2f1085(%rip), %xmm1 # 0x39d9d8 movl $0x1, %esi movl $0x2, %edx callq 0x37174c leaq -0x18(%rbp), %rcx movlps %xmm0, (%rcx) movsd 0x2f107f(%rip), %xmm0 # 0x39d9f0 leaq -0x10(%rbp), %r8 movsd %xmm0, (%r8) leaq 0x2f1127(%rip), %rsi # 0x39daa8 leaq 0x2f115d(%rip), %rdx # 0x39dae5 leaq -0x28(%rbp), %rdi callq 0xad3c6 cmpb $0x0, -0x28(%rbp) jne 0xac9f4 leaq -0x18(%rbp), %rdi callq 0x37f68a movq -0x20(%rbp), %rax testq %rax, %rax je 0xac9ae movq (%rax), %r8 jmp 0xac9b5 leaq 0x2fc9f5(%rip), %r8 # 0x3a93aa leaq 0x2f105b(%rip), %rdx # 0x39da17 leaq -0x10(%rbp), %rdi movl $0x2, %esi movl $0x2a, %ecx callq 0x37cfa4 leaq -0x10(%rbp), %rdi leaq -0x18(%rbp), %rsi callq 0x37bc92 leaq -0x10(%rbp), %rdi callq 0x37d01c movq -0x18(%rbp), %rdi testq %rdi, %rdi je 0xac9f4 movq (%rdi), %rax callq *0x8(%rax) movq -0x20(%rbp), %rsi testq %rsi, %rsi je 0xaca06 leaq -0x20(%rbp), %rdi callq 0x6fd1c movq -0x58(%rbp), %rdi testq %rdi, %rdi je 0xaca1b movq -0x48(%rbp), %rsi subq %rdi, %rsi callq 0x32440 movq -0x1c0(%rbp), %rsi testq %rsi, %rsi je 0xaca33 leaq -0x1c0(%rbp), %rdi callq 0x7777e addq $0x268, %rsp # imm = 0x268 popq %rbx popq %rbp retq movq %rax, %rbx leaq -0x10(%rbp), %rdi callq 0x37d01c jmp 0xaca4e movq %rax, %rbx movq -0x18(%rbp), %rdi testq %rdi, %rdi je 0xaca62 movq (%rdi), %rax callq *0x8(%rax) jmp 0xaca62 movq %rax, %rbx movq -0x20(%rbp), %rsi testq %rsi, %rsi je 0xaca7d leaq -0x20(%rbp), %rdi callq 0x6fd1c jmp 0xaca7d jmp 0xaca7a jmp 0xaca7a movq %rax, %rbx leaq -0x270(%rbp), %rdi callq 0x911d4 movq %rbx, %rdi callq 0x32840 nop
_ZN33Node_measure_with_measure_fn_Test8TestBodyEv: push rbp mov rbp, rsp push rbx sub rsp, 268h lea rbx, [rbp+var_270] mov rdi, rbx; this call _ZN8facebook4yoga4NodeC2Ev; facebook::yoga::Node::Node(void) lea rsi, _ZZN33Node_measure_with_measure_fn_Test8TestBodyEvEN3$_08__invokeEPK6YGNodef13YGMeasureModefS4_; Node_measure_with_measure_fn_Test::TestBody(void)::$_0::__invoke(YGNode const*,float,YGMeasureMode,float,YGMeasureMode) mov rdi, rbx; this call _ZN8facebook4yoga4Node14setMeasureFuncEPF6YGSizePK6YGNodef13YGMeasureModefS6_E; facebook::yoga::Node::setMeasureFunc(YGSize (*)(YGNode const*,float,YGMeasureMode,float,YGMeasureMode)) lea rdi, [rbp+var_270] movss xmm0, cs:dword_39D9D4 movss xmm1, cs:dword_39D9D8 mov esi, 1 mov edx, 2 call _ZN8facebook4yoga4Node7measureEfNS0_11MeasureModeEfS2_; facebook::yoga::Node::measure(float,facebook::yoga::MeasureMode,float,facebook::yoga::MeasureMode) lea rcx, [rbp+var_18] movlps qword ptr [rcx], xmm0 movsd xmm0, cs:qword_39D9F0 lea r8, [rbp+var_10] movsd qword ptr [r8], xmm0 lea rsi, aNMeasure23Meas; "n.measure(23, MeasureMode::Exactly, 24,"... lea rdx, aYgsize2312; "(YGSize{23, 12})" lea rdi, [rbp+var_28]; this call _ZN7testing8internal11CmpHelperEQI6YGSizeS2_EENS_15AssertionResultEPKcS5_RKT_RKT0_; testing::internal::CmpHelperEQ<YGSize,YGSize>(char const*,char const*,YGSize const&,YGSize const&) cmp [rbp+var_28], 0 jnz short loc_AC9F4 lea rdi, [rbp+var_18]; this call _ZN7testing7MessageC2Ev; testing::Message::Message(void) mov rax, [rbp+var_20] test rax, rax jz short loc_AC9AE mov r8, [rax] jmp short loc_AC9B5 loc_AC9AE: lea r8, aSFromSSMsTotal+1Ah; "" loc_AC9B5: lea rdx, aWorkspaceLlm4b_16; "/workspace/llm4binary/github2025/yoga-m"... lea rdi, [rbp+var_10] mov esi, 2 mov ecx, 2Ah ; '*' call _ZN7testing8internal12AssertHelperC2ENS_14TestPartResult4TypeEPKciS5_; testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type,char const*,int,char const*) lea rdi, [rbp+var_10] lea rsi, [rbp+var_18] call _ZNK7testing8internal12AssertHelperaSERKNS_7MessageE; testing::internal::AssertHelper::operator=(testing::Message const&) lea rdi, [rbp+var_10]; this call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper() mov rdi, [rbp+var_18] test rdi, rdi jz short loc_AC9F4 mov rax, [rdi] call qword ptr [rax+8] loc_AC9F4: mov rsi, [rbp+var_20] test rsi, rsi jz short loc_ACA06 lea rdi, [rbp+var_20] call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*) loc_ACA06: mov rdi, [rbp+var_58]; void * test rdi, rdi jz short loc_ACA1B mov rsi, [rbp+var_48] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_ACA1B: mov rsi, [rbp+var_1C0] test rsi, rsi jz short loc_ACA33 lea rdi, [rbp+var_1C0] call _ZNKSt14default_deleteIN8facebook4yoga16SmallValueBufferILm4EE8OverflowEEclEPS4_; std::default_delete<facebook::yoga::SmallValueBuffer<4ul>::Overflow>::operator()(facebook::yoga::SmallValueBuffer<4ul>::Overflow*) loc_ACA33: add rsp, 268h pop rbx pop rbp retn mov rbx, rax lea rdi, [rbp+var_10]; this call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper() jmp short loc_ACA4E mov rbx, rax loc_ACA4E: mov rdi, [rbp+var_18] test rdi, rdi jz short loc_ACA62 mov rax, [rdi] call qword ptr [rax+8] jmp short loc_ACA62 mov rbx, rax loc_ACA62: mov rsi, [rbp+var_20] test rsi, rsi jz short loc_ACA7D lea rdi, [rbp+var_20] call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*) jmp short loc_ACA7D jmp short loc_ACA7A jmp short $+2 loc_ACA7A: mov rbx, rax loc_ACA7D: lea rdi, [rbp+var_270]; void * call _ZN8facebook4yoga4NodeD2Ev; facebook::yoga::Node::~Node() mov rdi, rbx call __Unwind_Resume
void Node_measure_with_measure_fn_Test::TestBody(Node_measure_with_measure_fn_Test *this) { __m128 v1; // xmm0 char *v2; // r8 double v3; // xmm0_8 _BYTE v4[176]; // [rsp+0h] [rbp-270h] BYREF long long v5[45]; // [rsp+B0h] [rbp-1C0h] BYREF void *v6; // [rsp+218h] [rbp-58h] long long v7; // [rsp+228h] [rbp-48h] _BYTE v8[8]; // [rsp+248h] [rbp-28h] BYREF _QWORD *v9; // [rsp+250h] [rbp-20h] BYREF long long v10; // [rsp+258h] [rbp-18h] BYREF _QWORD v11[2]; // [rsp+260h] [rbp-10h] BYREF facebook::yoga::Node::Node((facebook::yoga::Node *)v4); facebook::yoga::Node::setMeasureFunc((facebook::yoga *)v4); v1 = (__m128)0x41B80000u; *(double *)v1.m128_u64 = facebook::yoga::Node::measure(v4, 1LL, 2LL, 23.0, 24.0); _mm_storel_ps((double *)&v10, v1); v11[0] = 0x4140000041B80000LL; testing::internal::CmpHelperEQ<YGSize,YGSize>((testing *)v8); if ( !v8[0] ) { testing::Message::Message((testing::Message *)&v10); v2 = v9 ? (char *)*v9 : ""; testing::internal::AssertHelper::AssertHelper( v11, 2LL, "/workspace/llm4binary/github2025/yoga-mod/tests/YGNodeCallbackTest.cpp", 42LL, v2); v3 = testing::internal::AssertHelper::operator=(v11, &v10); testing::internal::AssertHelper::~AssertHelper((testing::internal::AssertHelper *)v11); if ( v10 ) (*(void ( **)(long long, double))(*(_QWORD *)v10 + 8LL))(v10, v3); } if ( v9 ) std::default_delete<std::string>::operator()((long long)&v9, (long long)v9); if ( v6 ) operator delete(v6, v7 - (_QWORD)v6); if ( v5[0] ) std::default_delete<facebook::yoga::SmallValueBuffer<4ul>::Overflow>::operator()((long long)v5, v5[0]); }
TestBody: PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x268 LEA RBX,[RBP + -0x270] MOV RDI,RBX CALL 0x00471522 LAB_001ac92d: LEA RSI,[0x1ad1da] MOV RDI,RBX CALL 0x00471874 LAB_001ac93c: LEA RDI,[RBP + -0x270] MOVSS XMM0,dword ptr [0x0049d9d4] MOVSS XMM1,dword ptr [0x0049d9d8] MOV ESI,0x1 MOV EDX,0x2 CALL 0x0047174c LEA RCX,[RBP + -0x18] MOVLPS qword ptr [RCX],XMM0 MOVSD XMM0,qword ptr [0x0049d9f0] LEA R8,[RBP + -0x10] MOVSD qword ptr [R8],XMM0 LAB_001ac97a: LEA RSI,[0x49daa8] LEA RDX,[0x49dae5] LEA RDI,[RBP + -0x28] CALL 0x001ad3c6 CMP byte ptr [RBP + -0x28],0x0 JNZ 0x001ac9f4 LAB_001ac997: LEA RDI,[RBP + -0x18] CALL 0x0047f68a MOV RAX,qword ptr [RBP + -0x20] TEST RAX,RAX JZ 0x001ac9ae MOV R8,qword ptr [RAX] JMP 0x001ac9b5 LAB_001ac9ae: LEA R8,[0x4a93aa] LAB_001ac9b5: LEA RDX,[0x49da17] LEA RDI,[RBP + -0x10] MOV ESI,0x2 MOV ECX,0x2a CALL 0x0047cfa4 LAB_001ac9cf: LEA RDI,[RBP + -0x10] LEA RSI,[RBP + -0x18] CALL 0x0047bc92 LAB_001ac9dc: LEA RDI,[RBP + -0x10] CALL 0x0047d01c MOV RDI,qword ptr [RBP + -0x18] TEST RDI,RDI JZ 0x001ac9f4 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_001ac9f4: MOV RSI,qword ptr [RBP + -0x20] TEST RSI,RSI JZ 0x001aca06 LEA RDI,[RBP + -0x20] CALL 0x0016fd1c LAB_001aca06: MOV RDI,qword ptr [RBP + -0x58] TEST RDI,RDI JZ 0x001aca1b MOV RSI,qword ptr [RBP + -0x48] SUB RSI,RDI CALL 0x00132440 LAB_001aca1b: MOV RSI,qword ptr [RBP + -0x1c0] TEST RSI,RSI JZ 0x001aca33 LEA RDI,[RBP + -0x1c0] CALL 0x0017777e LAB_001aca33: ADD RSP,0x268 POP RBX POP RBP RET
/* Node_measure_with_measure_fn_Test::TestBody() */ void Node_measure_with_measure_fn_Test::TestBody(void) { char *pcVar1; Node local_278 [176]; Overflow *local_1c8 [45]; void *local_60; long local_50; internal local_30 [8]; string *local_28; long *local_20; int8 local_18; facebook::yoga::Node::Node(local_278); /* try { // try from 001ac92d to 001ac93b has its CatchHandler @ 001aca7a */ facebook::yoga::Node::setMeasureFunc(local_278,TestBody()::$_0::__invoke); /* try { // try from 001ac93c to 001ac961 has its CatchHandler @ 001aca78 */ local_20 = (long *)facebook::yoga::Node::measure(DAT_0049d9d4,DAT_0049d9d8,local_278,1,2); local_18 = DAT_0049d9f0; /* try { // try from 001ac97a to 001ac990 has its CatchHandler @ 001aca76 */ testing::internal::CmpHelperEQ<YGSize,YGSize> (local_30,"n.measure(23, MeasureMode::Exactly, 24, MeasureMode::AtMost)", "(YGSize{23, 12})",(YGSize *)&local_20,(YGSize *)&local_18); if (local_30[0] == (internal)0x0) { /* try { // try from 001ac997 to 001ac99f has its CatchHandler @ 001aca5f */ testing::Message::Message((Message *)&local_20); if (local_28 == (string *)0x0) { pcVar1 = ""; } else { pcVar1 = *(char **)local_28; } /* try { // try from 001ac9b5 to 001ac9ce has its CatchHandler @ 001aca4b */ testing::internal::AssertHelper::AssertHelper ((AssertHelper *)&local_18,2, "/workspace/llm4binary/github2025/yoga-mod/tests/YGNodeCallbackTest.cpp",0x2a,pcVar1) ; /* try { // try from 001ac9cf to 001ac9db has its CatchHandler @ 001aca3d */ testing::internal::AssertHelper::operator=((AssertHelper *)&local_18,(Message *)&local_20); testing::internal::AssertHelper::~AssertHelper((AssertHelper *)&local_18); if (local_20 != (long *)0x0) { (**(code **)(*local_20 + 8))(); } } if (local_28 != (string *)0x0) { std::default_delete<std::__cxx11::string>::operator() ((default_delete<std::__cxx11::string> *)&local_28,local_28); } if (local_60 != (void *)0x0) { operator_delete(local_60,local_50 - (long)local_60); } if (local_1c8[0] != (Overflow *)0x0) { std::default_delete<facebook::yoga::SmallValueBuffer<4ul>::Overflow>::operator() ((default_delete<facebook::yoga::SmallValueBuffer<4ul>::Overflow> *)local_1c8, local_1c8[0]); } return; }
16,812
minja::Parser::consumeToken(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, minja::SpaceHandling)
monkey531[P]llama/common/minja.hpp
std::string consumeToken(const std::regex & regex, SpaceHandling space_handling = SpaceHandling::Strip) { auto start = it; consumeSpaces(space_handling); std::smatch match; if (std::regex_search(it, end, match, regex) && match.position() == 0) { it += match[0].length(); return match[0].str(); } it = start; return ""; }
O3
cpp
minja::Parser::consumeToken(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, minja::SpaceHandling): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx movq 0x20(%rsi), %r12 movq %rsi, %rdi movl %ecx, %esi callq 0x84626 xorps %xmm0, %xmm0 movq %rsp, %rdx movaps %xmm0, 0x10(%rdx) movaps %xmm0, (%rdx) movq 0x18(%r14), %rsi movq 0x20(%r14), %rdi movq %r15, %rcx xorl %r8d, %r8d callq 0x6d78b testb %al, %al je 0x8389b movq 0x18(%rsp), %rsi movq (%rsp), %rax movq 0x8(%rsp), %rcx movq %rcx, %rdx subq %rax, %rdx je 0x83882 movq (%rax), %r8 cmpq $0x48, %rdx jne 0x83893 cmpq %rsi, %r8 jne 0x8389b jmp 0x83889 cmpq %rsi, -0x48(%rax,%rdx) jne 0x8389b leaq (%rax,%rdx), %rdi addq $-0x48, %rdi jmp 0x838dd movq %rax, %rdi cmpq %rsi, %r8 je 0x838dd movq %r12, 0x20(%r14) leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x68229(%rip), %rdx # 0xebad6 movq %rbx, %rdi movq %rdx, %rsi callq 0x21cae movq (%rsp), %rdi testq %rdi, %rdi je 0x838ce movq 0x10(%rsp), %rsi subq %rdi, %rsi callq 0x1a8d0 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq 0x8(%rdi), %r8 subq %rsi, %r8 xorl %esi, %esi cmpb $0x0, 0x10(%rdi) cmovneq %r8, %rsi addq %rsi, 0x20(%r14) cmpq $0x48, %rdx leaq -0x48(%rax,%rdx), %rsi movq %rax, %rdx cmoveq %rsi, %rdx cmpq %rcx, %rax cmoveq %rsi, %rdx cmpb $0x1, 0x10(%rdx) jne 0x83927 movq (%rdx), %rsi movq 0x8(%rdx), %rdx leaq 0x10(%rbx), %rax movq %rax, (%rbx) movq %rbx, %rdi callq 0x70376 jmp 0x838b8 leaq 0x10(%rbx), %rax movq %rax, (%rbx) movq $0x0, 0x8(%rbx) movb $0x0, 0x10(%rbx) jmp 0x838b8 jmp 0x83941 movq %rax, %rbx movq (%rsp), %rdi testq %rdi, %rdi je 0x8395a movq 0x10(%rsp), %rsi subq %rdi, %rsi callq 0x1a8d0 movq %rbx, %rdi callq 0x1afc0
_ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE: push r15 push r14 push r12 push rbx sub rsp, 28h mov r15, rdx mov r14, rsi mov rbx, rdi mov r12, [rsi+20h] mov rdi, rsi mov esi, ecx call _ZN5minja6Parser13consumeSpacesENS_13SpaceHandlingE; minja::Parser::consumeSpaces(minja::SpaceHandling) xorps xmm0, xmm0 mov rdx, rsp movaps xmmword ptr [rdx+10h], xmm0 movaps xmmword ptr [rdx], xmm0 mov rsi, [r14+18h] mov rdi, [r14+20h] mov rcx, r15 xor r8d, r8d call _ZNSt8__detail17__regex_algo_implIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS5_9sub_matchISB_EEEcNS5_12regex_traitsIcEELNS_20_RegexExecutorPolicyE0ELb0EEEbT_SI_RNS5_13match_resultsISI_T0_EERKNS5_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeE; std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type) test al, al jz short loc_8389B mov rsi, [rsp+48h+var_30] mov rax, [rsp+48h+var_48] mov rcx, [rsp+48h+var_40] mov rdx, rcx sub rdx, rax jz short loc_83882 mov r8, [rax] cmp rdx, 48h ; 'H' jnz short loc_83893 cmp r8, rsi jnz short loc_8389B jmp short loc_83889 loc_83882: cmp [rax+rdx-48h], rsi jnz short loc_8389B loc_83889: lea rdi, [rax+rdx] add rdi, 0FFFFFFFFFFFFFFB8h jmp short loc_838DD loc_83893: mov rdi, rax cmp r8, rsi jz short loc_838DD loc_8389B: mov [r14+20h], r12 lea rax, [rbx+10h] mov [rbx], rax lea rdx, aErrorWhileHand_0+34h; "" mov rdi, rbx mov rsi, rdx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) loc_838B8: mov rdi, [rsp+48h+var_48]; void * test rdi, rdi jz short loc_838CE mov rsi, [rsp+48h+var_38] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_838CE: mov rax, rbx add rsp, 28h pop rbx pop r12 pop r14 pop r15 retn loc_838DD: mov r8, [rdi+8] sub r8, rsi xor esi, esi cmp byte ptr [rdi+10h], 0 cmovnz rsi, r8 add [r14+20h], rsi cmp rdx, 48h ; 'H' lea rsi, [rax+rdx-48h] mov rdx, rax cmovz rdx, rsi cmp rax, rcx cmovz rdx, rsi cmp byte ptr [rdx+10h], 1 jnz short loc_83927 mov rsi, [rdx] mov rdx, [rdx+8] lea rax, [rbx+10h] mov [rbx], rax mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag) jmp short loc_838B8 loc_83927: lea rax, [rbx+10h] mov [rbx], rax mov qword ptr [rbx+8], 0 mov byte ptr [rbx+10h], 0 jmp loc_838B8 jmp short $+2 loc_83941: mov rbx, rax mov rdi, [rsp+0]; void * test rdi, rdi jz short loc_8395A mov rsi, [rsp+arg_8] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8395A: mov rdi, rbx call __Unwind_Resume
long long minja::Parser::consumeToken(long long a1, long long a2, long long a3, unsigned int a4) { long long v7; // r12 __int128 v8; // kr00_16 long long v9; // rdx long long v10; // r8 long long v11; // rdi long long v13; // rsi bool v14; // zf long long v15; // rsi long long v16; // rdx _BYTE *v17; // rsi long long v18; // rdx __int128 v19; // [rsp+0h] [rbp-48h] BYREF __int128 v20; // [rsp+10h] [rbp-38h] v7 = *(_QWORD *)(a2 + 32); minja::Parser::consumeSpaces(a2, a4); v20 = 0LL; v19 = 0LL; if ( !std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false>( *(long long **)(a2 + 32), *(_QWORD *)(a2 + 24), (long long **)&v19, a3, 0) ) goto LABEL_9; v8 = v19; v9 = *((_QWORD *)&v19 + 1) - v19; if ( *((_QWORD *)&v19 + 1) != (_QWORD)v19 ) { v10 = *(_QWORD *)v19; if ( v9 == 72 ) { if ( v10 == *((_QWORD *)&v20 + 1) ) goto LABEL_7; } else { v11 = v19; if ( v10 == *((_QWORD *)&v20 + 1) ) goto LABEL_13; } LABEL_9: *(_QWORD *)(a2 + 32) = v7; *(_QWORD *)a1 = a1 + 16; std::string::_M_construct<char const*>(a1, "", (long long)""); goto LABEL_10; } if ( *(_QWORD *)(*((_QWORD *)&v19 + 1) - 72LL) != *((_QWORD *)&v20 + 1) ) goto LABEL_9; LABEL_7: v11 = *((_QWORD *)&v19 + 1) - 72LL; LABEL_13: v13 = 0LL; if ( *(_BYTE *)(v11 + 16) ) v13 = *(_QWORD *)(v11 + 8) - *((_QWORD *)&v20 + 1); *(_QWORD *)(a2 + 32) += v13; v14 = v9 == 72; v15 = v8 + v9 - 72; v16 = v8; if ( v14 ) v16 = v15; if ( (_QWORD)v8 == *((_QWORD *)&v8 + 1) ) v16 = v15; if ( *(_BYTE *)(v16 + 16) == 1 ) { v17 = *(_BYTE **)v16; v18 = *(_QWORD *)(v16 + 8); *(_QWORD *)a1 = a1 + 16; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(a1, v17, v18); } else { *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; } LABEL_10: if ( (_QWORD)v19 ) operator delete((void *)v19, v20 - v19); return a1; }
consumeToken: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R15,RDX MOV R14,RSI MOV RBX,RDI MOV R12,qword ptr [RSI + 0x20] MOV RDI,RSI MOV ESI,ECX CALL 0x00184626 XORPS XMM0,XMM0 MOV RDX,RSP MOVAPS xmmword ptr [RDX + 0x10],XMM0 MOVAPS xmmword ptr [RDX],XMM0 MOV RSI,qword ptr [R14 + 0x18] MOV RDI,qword ptr [R14 + 0x20] LAB_0018384d: MOV RCX,R15 XOR R8D,R8D CALL 0x0016d78b TEST AL,AL JZ 0x0018389b MOV RSI,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x8] MOV RDX,RCX SUB RDX,RAX JZ 0x00183882 MOV R8,qword ptr [RAX] CMP RDX,0x48 JNZ 0x00183893 CMP R8,RSI JNZ 0x0018389b JMP 0x00183889 LAB_00183882: CMP qword ptr [RAX + RDX*0x1 + -0x48],RSI JNZ 0x0018389b LAB_00183889: LEA RDI,[RAX + RDX*0x1] ADD RDI,-0x48 JMP 0x001838dd LAB_00183893: MOV RDI,RAX CMP R8,RSI JZ 0x001838dd LAB_0018389b: MOV qword ptr [R14 + 0x20],R12 LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LAB_001838a6: LEA RDX,[0x1ebad6] MOV RDI,RBX MOV RSI,RDX CALL 0x00121cae LAB_001838b8: MOV RDI,qword ptr [RSP] TEST RDI,RDI JZ 0x001838ce MOV RSI,qword ptr [RSP + 0x10] SUB RSI,RDI CALL 0x0011a8d0 LAB_001838ce: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R12 POP R14 POP R15 RET LAB_001838dd: MOV R8,qword ptr [RDI + 0x8] SUB R8,RSI XOR ESI,ESI CMP byte ptr [RDI + 0x10],0x0 CMOVNZ RSI,R8 ADD qword ptr [R14 + 0x20],RSI CMP RDX,0x48 LEA RSI,[RAX + RDX*0x1 + -0x48] MOV RDX,RAX CMOVZ RDX,RSI CMP RAX,RCX CMOVZ RDX,RSI CMP byte ptr [RDX + 0x10],0x1 JNZ 0x00183927 MOV RSI,qword ptr [RDX] MOV RDX,qword ptr [RDX + 0x8] LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LAB_0018391d: MOV RDI,RBX CALL 0x00170376 LAB_00183925: JMP 0x001838b8 LAB_00183927: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX MOV qword ptr [RBX + 0x8],0x0 MOV byte ptr [RBX + 0x10],0x0 JMP 0x001838b8
/* minja::Parser::consumeToken(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char> > const&, minja::SpaceHandling) */ long * minja::Parser::consumeToken (long *param_1,Parser *param_2,int8 param_3,int4 param_4) { int8 uVar1; bool bVar2; long lVar3; long *plVar4; long lVar5; long *plVar6; long *local_48; long *plStack_40; long local_38; long lStack_30; uVar1 = *(int8 *)(param_2 + 0x20); consumeSpaces(param_2,param_4); local_38 = 0; lStack_30 = 0; local_48 = (long *)0x0; plStack_40 = (long *)0x0; /* try { // try from 0018384d to 00183857 has its CatchHandler @ 00183941 */ bVar2 = std::__detail:: __regex_algo_impl<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>,char,std::__cxx11::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false> (*(int8 *)(param_2 + 0x20),*(int8 *)(param_2 + 0x18),&local_48, param_3,0); if (bVar2) { lVar3 = (long)plStack_40 - (long)local_48; if (lVar3 == 0) { lVar5 = local_48[-9]; joined_r0x00183887: if (lVar5 != lStack_30) goto LAB_0018389b; plVar6 = (long *)((long)local_48 + lVar3 + -0x48); } else { lVar5 = *local_48; if (lVar3 == 0x48) goto joined_r0x00183887; plVar6 = local_48; if (lVar5 != lStack_30) goto LAB_0018389b; } lVar5 = 0; if ((char)plVar6[2] != '\0') { lVar5 = plVar6[1] - lStack_30; } *(long *)(param_2 + 0x20) = *(long *)(param_2 + 0x20) + lVar5; plVar6 = (long *)((long)local_48 + lVar3 + -0x48); plVar4 = local_48; if (lVar3 == 0x48) { plVar4 = plVar6; } if (local_48 == plStack_40) { plVar4 = plVar6; } if ((char)plVar4[2] == '\x01') { lVar3 = *plVar4; lVar5 = plVar4[1]; *param_1 = (long)(param_1 + 2); /* try { // try from 0018391d to 00183924 has its CatchHandler @ 00183941 */ std::__cxx11::string:: _M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>> (param_1,lVar3,lVar5); } else { *param_1 = (long)(param_1 + 2); param_1[1] = 0; *(int1 *)(param_1 + 2) = 0; } } else { LAB_0018389b: *(int8 *)(param_2 + 0x20) = uVar1; *param_1 = (long)(param_1 + 2); /* try { // try from 001838a6 to 001838b7 has its CatchHandler @ 0018393f */ std::__cxx11::string::_M_construct<char_const*>(param_1,""); } if (local_48 != (long *)0x0) { operator_delete(local_48,local_38 - (long)local_48); } return param_1; }
16,813
translog_first_theoretical_lsn
eloqsql/storage/maria/ma_loghandler.c
LSN translog_first_theoretical_lsn() { TRANSLOG_ADDRESS addr= translog_get_horizon(); TRANSLOG_PAGE_SIZE_BUFF psize_buff; uchar *page; TRANSLOG_VALIDATOR_DATA data; DBUG_ENTER("translog_first_theoretical_lsn"); DBUG_PRINT("info", ("Horizon: " LSN_FMT, LSN_IN_PARTS(addr))); DBUG_ASSERT(translog_status == TRANSLOG_OK || translog_status == TRANSLOG_READONLY); if (!translog_is_file(1)) DBUG_RETURN(LSN_IMPOSSIBLE); if (addr == MAKE_LSN(1, TRANSLOG_PAGE_SIZE)) { /* log has no records yet */ DBUG_RETURN(MAKE_LSN(1, TRANSLOG_PAGE_SIZE + log_descriptor.page_overhead)); } addr= MAKE_LSN(1, TRANSLOG_PAGE_SIZE); /* the first page of the file */ data.addr= &addr; if ((page= translog_get_page(&data, psize_buff.buffer, NULL)) == NULL) DBUG_RETURN(LSN_ERROR); DBUG_RETURN(MAKE_LSN(1, TRANSLOG_PAGE_SIZE + page_overhead[page[TRANSLOG_PAGE_FLAGS]])); }
O3
c
translog_first_theoretical_lsn: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x2020, %rsp # imm = 0x2020 movq %fs:0x28, %rax movq %rax, -0x18(%rbp) callq 0x4720c movq %rax, %rbx movl $0x1, %edi callq 0x48a93 testb %al, %al je 0x48dd9 movabsq $0x100002000, %r14 # imm = 0x100002000 cmpq %r14, %rbx jne 0x48ddd movzwl 0x3b43b0(%rip), %eax # 0x3fd184 addq %r14, %rax jmp 0x48e28 xorl %eax, %eax jmp 0x48e28 leaq -0x2020(%rbp), %rax movq %r14, (%rax) leaq -0x2030(%rbp), %rdi movq %rax, (%rdi) leaq -0x2018(%rbp), %rsi xorl %edx, %edx callq 0x45804 testq %rax, %rax je 0x48e23 movzbl 0x6(%rax), %eax leaq 0xbb5241(%rip), %rcx # 0xbfe050 movl $0x2000, %edx # imm = 0x2000 addl (%rcx,%rax,4), %edx leaq (%r14,%rdx), %rax addq $-0x2000, %rax # imm = 0xE000 jmp 0x48e28 movl $0x1, %eax movq %fs:0x28, %rcx cmpq -0x18(%rbp), %rcx jne 0x48e43 addq $0x2020, %rsp # imm = 0x2020 popq %rbx popq %r14 popq %rbp retq callq 0x29260
translog_first_theoretical_lsn: push rbp mov rbp, rsp push r14 push rbx sub rsp, 2020h mov rax, fs:28h mov [rbp+var_18], rax call translog_get_horizon mov rbx, rax mov edi, 1 call translog_is_file test al, al jz short loc_48DD9 mov r14, 100002000h cmp rbx, r14 jnz short loc_48DDD movzx eax, cs:word_3FD184 add rax, r14 jmp short loc_48E28 loc_48DD9: xor eax, eax jmp short loc_48E28 loc_48DDD: lea rax, [rbp+var_2020] mov [rax], r14 lea rdi, [rbp+var_2030] mov [rdi], rax lea rsi, [rbp+var_2018] xor edx, edx call translog_get_page test rax, rax jz short loc_48E23 movzx eax, byte ptr [rax+6] lea rcx, page_overhead mov edx, 2000h add edx, [rcx+rax*4] lea rax, [r14+rdx] add rax, 0FFFFFFFFFFFFE000h jmp short loc_48E28 loc_48E23: mov eax, 1 loc_48E28: mov rcx, fs:28h cmp rcx, [rbp+var_18] jnz short loc_48E43 add rsp, 2020h pop rbx pop r14 pop rbp retn loc_48E43: call ___stack_chk_fail
long long translog_first_theoretical_lsn(long long a1, long long a2) { long long horizon; // rbx long long v3; // rdx long long v4; // rcx int v5; // r8d int v6; // r9d long long page; // rax long long *v9; // [rsp+0h] [rbp-2030h] BYREF long long v10; // [rsp+10h] [rbp-2020h] BYREF _BYTE v11[8192]; // [rsp+18h] [rbp-2018h] BYREF unsigned long long v12; // [rsp+2018h] [rbp-18h] v12 = __readfsqword(0x28u); horizon = translog_get_horizon(); if ( !translog_is_file(1u, a2, v3, v4, v5, v6) ) return 0LL; if ( horizon == 0x100002000LL ) return (unsigned __int16)word_3FD184 + 0x100002000LL; v10 = 0x100002000LL; v9 = &v10; page = translog_get_page(&v9, (long long)v11, 0LL); if ( page ) return (unsigned int)(*((_DWORD *)&page_overhead + *(unsigned __int8 *)(page + 6)) + 0x2000) + 0x100000000LL; else return 1LL; }
translog_first_theoretical_lsn: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x2020 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX CALL 0x0014720c MOV RBX,RAX MOV EDI,0x1 CALL 0x00148a93 TEST AL,AL JZ 0x00148dd9 MOV R14,0x100002000 CMP RBX,R14 JNZ 0x00148ddd MOVZX EAX,word ptr [0x004fd184] ADD RAX,R14 JMP 0x00148e28 LAB_00148dd9: XOR EAX,EAX JMP 0x00148e28 LAB_00148ddd: LEA RAX,[RBP + -0x2020] MOV qword ptr [RAX],R14 LEA RDI,[RBP + -0x2030] MOV qword ptr [RDI],RAX LEA RSI,[RBP + -0x2018] XOR EDX,EDX CALL 0x00145804 TEST RAX,RAX JZ 0x00148e23 MOVZX EAX,byte ptr [RAX + 0x6] LEA RCX,[0xcfe050] MOV EDX,0x2000 ADD EDX,dword ptr [RCX + RAX*0x4] LEA RAX,[R14 + RDX*0x1] ADD RAX,-0x2000 JMP 0x00148e28 LAB_00148e23: MOV EAX,0x1 LAB_00148e28: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x18] JNZ 0x00148e43 ADD RSP,0x2020 POP RBX POP R14 POP RBP RET LAB_00148e43: CALL 0x00129260
long translog_first_theoretical_lsn(void) { char cVar1; long lVar2; long in_FS_OFFSET; int8 *local_2038 [2]; int8 local_2028; int1 local_2020 [8192]; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); lVar2 = translog_get_horizon(); cVar1 = translog_is_file(1); if (cVar1 == '\0') { lVar2 = 0; } else if (lVar2 == 0x100002000) { lVar2 = (ulong)DAT_004fd184 + 0x100002000; } else { local_2038[0] = &local_2028; local_2028 = 0x100002000; lVar2 = translog_get_page(local_2038,local_2020,0); if (lVar2 == 0) { lVar2 = 1; } else { lVar2 = (ulong)(*(int *)(page_overhead + (ulong)*(byte *)(lVar2 + 6) * 4) + 0x2000) + 0x100000000; } } if (*(long *)(in_FS_OFFSET + 0x28) == local_20) { return lVar2; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
16,814
my_hash_sort_simple
eloqsql/strings/ctype-simple.c
void my_hash_sort_simple(CHARSET_INFO *cs, const uchar *key, size_t len, ulong *nr1, ulong *nr2) { register const uchar *sort_order=cs->sort_order; const uchar *end; uint16 space_weight= sort_order[' ']; /* Remove all trailing characters that are equal to space. We have to do this to be able to compare 'A ' and 'A' as identical. If the key is long enough, cut the trailing spaces (0x20) using an optimized function implemented in skip_trailing_spaces(). "len > 16" is just some heuristic here. Calling skip_triling_space() for short values is not desirable, because its initialization block may be more expensive than the performance gained. */ end= len > 16 ? skip_trailing_space(key, len) : key + len; /* We removed all trailing characters that are binary equal to space 0x20. Now remove all trailing characters that have weights equal to space. Some 8bit simple collations may have such characters: - cp1250_general_ci 0xA0 NO-BREAK SPACE == 0x20 SPACE - cp1251_ukrainian_ci 0x60 GRAVE ACCENT == 0x20 SPACE - koi8u_general_ci 0x60 GRAVE ACCENT == 0x20 SPACE */ for ( ; key < end ; ) { if (sort_order[*--end] != space_weight) { end++; break; } } my_hash_sort_simple_nopad(cs, key, end - key, nr1, nr2); }
O0
c
my_hash_sort_simple: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x8(%rbp), %rax movq 0x58(%rax), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movzbl 0x20(%rax), %eax movw %ax, -0x3a(%rbp) cmpq $0x10, -0x18(%rbp) jbe 0x9265e movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x926e0 movq %rax, -0x48(%rbp) jmp 0x9266a movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax cmpq -0x38(%rbp), %rax jae 0x926af movq -0x30(%rbp), %rax movq -0x38(%rbp), %rcx movq %rcx, %rdx addq $-0x1, %rdx movq %rdx, -0x38(%rbp) movzbl -0x1(%rcx), %ecx movzbl (%rax,%rcx), %eax movzwl -0x3a(%rbp), %ecx cmpl %ecx, %eax je 0x926ad movq -0x38(%rbp), %rax addq $0x1, %rax movq %rax, -0x38(%rbp) jmp 0x926af jmp 0x92672 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x38(%rbp), %rdx movq -0x10(%rbp), %rax subq %rax, %rdx movq -0x20(%rbp), %rcx movq -0x28(%rbp), %r8 callq 0x92550 addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_hash_sort_simple: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rax, [rbp+var_8] mov rax, [rax+58h] mov [rbp+var_30], rax mov rax, [rbp+var_30] movzx eax, byte ptr [rax+20h] mov [rbp+var_3A], ax cmp [rbp+var_18], 10h jbe short loc_9265E mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call skip_trailing_space_2 mov [rbp+var_48], rax jmp short loc_9266A loc_9265E: mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_48], rax loc_9266A: mov rax, [rbp+var_48] mov [rbp+var_38], rax loc_92672: mov rax, [rbp+var_10] cmp rax, [rbp+var_38] jnb short loc_926AF mov rax, [rbp+var_30] mov rcx, [rbp+var_38] mov rdx, rcx add rdx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_38], rdx movzx ecx, byte ptr [rcx-1] movzx eax, byte ptr [rax+rcx] movzx ecx, [rbp+var_3A] cmp eax, ecx jz short loc_926AD mov rax, [rbp+var_38] add rax, 1 mov [rbp+var_38], rax jmp short loc_926AF loc_926AD: jmp short loc_92672 loc_926AF: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_38] mov rax, [rbp+var_10] sub rdx, rax mov rcx, [rbp+var_20] mov r8, [rbp+var_28] call my_hash_sort_simple_nopad add rsp, 50h pop rbp retn
_QWORD * my_hash_sort_simple(long long a1, unsigned __int8 *a2, unsigned long long a3, long long *a4, _QWORD *a5) { unsigned long long v5; // rcx long long v7; // [rsp+8h] [rbp-48h] __int16 v8; // [rsp+16h] [rbp-3Ah] unsigned long long v9; // [rsp+18h] [rbp-38h] long long v10; // [rsp+20h] [rbp-30h] v10 = *(_QWORD *)(a1 + 88); v8 = *(unsigned __int8 *)(v10 + 32); if ( a3 <= 0x10 ) v7 = (long long)&a2[a3]; else v7 = skip_trailing_space_2(a2, a3); v9 = v7; while ( (unsigned long long)a2 < v9 ) { v5 = v9--; if ( *(unsigned __int8 *)(v10 + *(unsigned __int8 *)(v5 - 1)) != v8 ) return my_hash_sort_simple_nopad(a1, a2, ++v9 - (_QWORD)a2, a4, a5); } return my_hash_sort_simple_nopad(a1, a2, v9 - (_QWORD)a2, a4, a5); }
my_hash_sort_simple: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x58] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,byte ptr [RAX + 0x20] MOV word ptr [RBP + -0x3a],AX CMP qword ptr [RBP + -0x18],0x10 JBE 0x0019265e MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x001926e0 MOV qword ptr [RBP + -0x48],RAX JMP 0x0019266a LAB_0019265e: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x48],RAX LAB_0019266a: MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x38],RAX LAB_00192672: MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x38] JNC 0x001926af MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x38] MOV RDX,RCX ADD RDX,-0x1 MOV qword ptr [RBP + -0x38],RDX MOVZX ECX,byte ptr [RCX + -0x1] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOVZX ECX,word ptr [RBP + -0x3a] CMP EAX,ECX JZ 0x001926ad MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x1 MOV qword ptr [RBP + -0x38],RAX JMP 0x001926af LAB_001926ad: JMP 0x00192672 LAB_001926af: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x10] SUB RDX,RAX MOV RCX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x28] CALL 0x00192550 ADD RSP,0x50 POP RBP RET
void my_hash_sort_simple(long param_1,ulong param_2,ulong param_3,int8 param_4, int8 param_5) { char cVar1; long lVar2; ulong uVar3; ulong local_50; ulong local_40; lVar2 = *(long *)(param_1 + 0x58); cVar1 = *(char *)(lVar2 + 0x20); if (param_3 < 0x11) { local_50 = param_2 + param_3; } else { local_50 = skip_trailing_space(param_2,param_3); } local_40 = local_50; uVar3 = local_40; do { local_40 = uVar3; if (local_40 <= param_2) break; uVar3 = local_40 - 1; } while (*(char *)(lVar2 + (ulong)*(byte *)(local_40 - 1)) == cVar1); my_hash_sort_simple_nopad(param_1,param_2,local_40 - param_2,param_4,param_5); return; }
16,815
ftxui::emptyElement()
Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/dom/util.cpp
Element emptyElement() { class Impl : public Node { void ComputeRequirement() override { requirement_.min_x = 0; requirement_.min_y = 0; } }; return std::make_unique<Impl>(); }
O1
cpp
ftxui::emptyElement(): pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdi, %r14 movl $0x60, %edi callq 0xb3e0 movq %rax, %rbx xorps %xmm0, %xmm0 movaps %xmm0, (%rax) movaps %xmm0, 0x10(%rax) movaps %xmm0, 0x20(%rax) movaps %xmm0, 0x30(%rax) movaps %xmm0, 0x40(%rax) movaps %xmm0, 0x50(%rax) movq %rax, %rdi callq 0x240c8 leaq 0x3293e(%rip), %rax # 0x58aa0 movq %rax, (%rbx) movq %rbx, (%r14) leaq 0x8(%r14), %r15 xorl %eax, %eax movq %rax, 0x8(%r14) movq %rax, 0x8(%rsp) movl $0x18, %edi callq 0xb3e0 movabsq $0x100000001, %rcx # imm = 0x100000001 movq %rcx, 0x8(%rax) leaq 0x32962(%rip), %rcx # 0x58af8 movq %rcx, (%rax) movq %rbx, 0x10(%rax) leaq 0x8(%rsp), %rbx movq %rax, (%rbx) movq %r15, %rdi movq %rbx, %rsi callq 0x26586 movq (%rbx), %rdi testq %rdi, %rdi je 0x261bd callq 0x14c7c movq %r14, %rax addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movq (%r15), %rdi testq %rdi, %rdi je 0x261da callq 0x14c7c movq (%rbx), %rax movq %rbx, %rdi callq *0x8(%rax) jmp 0x261f5 movq %rax, %r14 movl $0x60, %esi movq %rbx, %rdi callq 0xb400 movq %r14, %rdi callq 0xb780 nop
_ZN5ftxui12emptyElementEv: push r15 push r14 push rbx sub rsp, 10h mov r14, rdi mov edi, 60h ; '`'; unsigned __int64 call __Znwm; operator new(ulong) mov rbx, rax xorps xmm0, xmm0 movaps xmmword ptr [rax], xmm0 movaps xmmword ptr [rax+10h], xmm0 movaps xmmword ptr [rax+20h], xmm0 movaps xmmword ptr [rax+30h], xmm0 movaps xmmword ptr [rax+40h], xmm0 movaps xmmword ptr [rax+50h], xmm0 mov rdi, rax; this call _ZN5ftxui4NodeC2Ev; ftxui::Node::Node(void) lea rax, off_58AA0 mov [rbx], rax mov [r14], rbx lea r15, [r14+8] xor eax, eax mov [r14+8], rax mov [rsp+28h+var_20], rax mov edi, 18h; unsigned __int64 call __Znwm; operator new(ulong) mov rcx, 100000001h mov [rax+8], rcx lea rcx, off_58AF8 mov [rax], rcx mov [rax+10h], rbx lea rbx, [rsp+28h+var_20] mov [rbx], rax mov rdi, r15 mov rsi, rbx call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEaSERKS2_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=(std::__shared_count<(__gnu_cxx::_Lock_policy)2> const&) mov rdi, [rbx] test rdi, rdi jz short loc_261BD call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_261BD: mov rax, r14 add rsp, 10h pop rbx pop r14 pop r15 retn mov r14, rax mov rdi, [r15] test rdi, rdi jz short loc_261DA call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_261DA: mov rax, [rbx] mov rdi, rbx call qword ptr [rax+8] jmp short loc_261F5 mov r14, rax mov esi, 60h ; '`'; unsigned __int64 mov rdi, rbx; void * call __ZdlPvm; operator delete(void *,ulong) loc_261F5: mov rdi, r14 call __Unwind_Resume
ftxui * ftxui::emptyElement(ftxui *this) { ftxui::Node *v1; // rbx long long v2; // rax volatile signed __int32 *v4; // [rsp+8h] [rbp-20h] BYREF v1 = (ftxui::Node *)operator new(0x60uLL); *(_OWORD *)v1 = 0LL; *((_OWORD *)v1 + 1) = 0LL; *((_OWORD *)v1 + 2) = 0LL; *((_OWORD *)v1 + 3) = 0LL; *((_OWORD *)v1 + 4) = 0LL; *((_OWORD *)v1 + 5) = 0LL; ftxui::Node::Node(v1); *(_QWORD *)v1 = &off_58AA0; *(_QWORD *)this = v1; *((_QWORD *)this + 1) = 0LL; v2 = operator new(0x18uLL); *(_QWORD *)(v2 + 8) = 0x100000001LL; *(_QWORD *)v2 = off_58AF8; *(_QWORD *)(v2 + 16) = v1; v4 = (volatile signed __int32 *)v2; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=((char *)this + 8, &v4); if ( v4 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v4); return this; }
emptyElement: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV R14,RDI MOV EDI,0x60 CALL 0x0010b3e0 MOV RBX,RAX XORPS XMM0,XMM0 MOVAPS xmmword ptr [RAX],XMM0 MOVAPS xmmword ptr [RAX + 0x10],XMM0 MOVAPS xmmword ptr [RAX + 0x20],XMM0 MOVAPS xmmword ptr [RAX + 0x30],XMM0 MOVAPS xmmword ptr [RAX + 0x40],XMM0 MOVAPS xmmword ptr [RAX + 0x50],XMM0 LAB_00126153: MOV RDI,RAX CALL 0x001240c8 LEA RAX,[0x158aa0] MOV qword ptr [RBX],RAX MOV qword ptr [R14],RBX LEA R15,[R14 + 0x8] XOR EAX,EAX MOV qword ptr [R14 + 0x8],RAX MOV qword ptr [RSP + 0x8],RAX LAB_00126177: MOV EDI,0x18 CALL 0x0010b3e0 LAB_00126181: MOV RCX,0x100000001 MOV qword ptr [RAX + 0x8],RCX LEA RCX,[0x158af8] MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x10],RBX LEA RBX,[RSP + 0x8] MOV qword ptr [RBX],RAX MOV RDI,R15 MOV RSI,RBX CALL 0x00126586 MOV RDI,qword ptr [RBX] TEST RDI,RDI JZ 0x001261bd CALL 0x00114c7c LAB_001261bd: MOV RAX,R14 ADD RSP,0x10 POP RBX POP R14 POP R15 RET
/* ftxui::emptyElement() */ ftxui * __thiscall ftxui::emptyElement(ftxui *this) { Node *this_00; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_20; this_00 = (Node *)operator_new(0x60); *(int8 *)this_00 = 0; *(int8 *)(this_00 + 8) = 0; *(int8 *)(this_00 + 0x10) = 0; *(int8 *)(this_00 + 0x18) = 0; *(int8 *)(this_00 + 0x20) = 0; *(int8 *)(this_00 + 0x28) = 0; *(int8 *)(this_00 + 0x30) = 0; *(int8 *)(this_00 + 0x38) = 0; *(int8 *)(this_00 + 0x40) = 0; *(int8 *)(this_00 + 0x48) = 0; *(int8 *)(this_00 + 0x50) = 0; *(int8 *)(this_00 + 0x58) = 0; /* try { // try from 00126153 to 0012615a has its CatchHandler @ 001261e5 */ Node::Node(this_00); *(int ***)this_00 = &PTR__Node_00158aa0; *(Node **)this = this_00; *(int8 *)(this + 8) = 0; local_20 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0; /* try { // try from 00126177 to 00126180 has its CatchHandler @ 001261ca */ local_20 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)operator_new(0x18); *(int8 *)(local_20 + 8) = 0x100000001; *(int ***)local_20 = &PTR___Sp_counted_base_00158af8; *(Node **)(local_20 + 0x10) = this_00; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator= ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(this + 8),(__shared_count *)&local_20); if (local_20 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_20); } return this; }
16,816
minja::TextNode::TextNode(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/./minja.hpp
TextNode(const Location & location, const std::string& t) : TemplateNode(location), text(t) {}
O3
cpp
minja::TextNode::TextNode(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %rbx movq %rdi, %rbx leaq 0x8dc35(%rip), %r15 # 0xeefe8 movq %r15, (%rdi) movq (%rsi), %rax movq %rax, 0x8(%rdi) movq 0x8(%rsi), %rax movq %rax, 0x10(%rdi) testq %rax, %rax je 0x613df movq 0x8ebcf(%rip), %rcx # 0xeffa0 cmpb $0x0, (%rcx) je 0x613db incl 0x8(%rax) jmp 0x613df lock incl 0x8(%rax) movq 0x10(%rsi), %rax movq %rax, 0x18(%rbx) leaq 0x8de4a(%rip), %rax # 0xef238 movq %rax, (%rbx) leaq 0x20(%rbx), %rdi leaq 0x30(%rbx), %rax movq %rax, 0x20(%rbx) movq (%rdx), %rsi movq 0x8(%rdx), %rdx addq %rsi, %rdx callq 0x2bdf8 popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movq %r15, (%rbx) movq 0x10(%rbx), %rdi testq %rdi, %rdi je 0x61426 callq 0x2f80e movq %r14, %rdi callq 0x18b90
_ZN5minja8TextNodeC2ERKNS_8LocationERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r15 push r14 push rbx mov rbx, rdi lea r15, off_EEFE8 mov [rdi], r15 mov rax, [rsi] mov [rdi+8], rax mov rax, [rsi+8] mov [rdi+10h], rax test rax, rax jz short loc_613DF mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_613DB inc dword ptr [rax+8] jmp short loc_613DF loc_613DB: lock inc dword ptr [rax+8] loc_613DF: mov rax, [rsi+10h] mov [rbx+18h], rax lea rax, off_EF238 mov [rbx], rax lea rdi, [rbx+20h] lea rax, [rbx+30h] mov [rbx+20h], rax mov rsi, [rdx] mov rdx, [rdx+8] add rdx, rsi call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) pop rbx pop r14 pop r15 retn mov r14, rax mov [rbx], r15 mov rdi, [rbx+10h] test rdi, rdi jz short loc_61426 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_61426: mov rdi, r14 call __Unwind_Resume
long long minja::TextNode::TextNode(_QWORD *a1, _QWORD *a2, long long a3) { long long v3; // rax *a1 = &off_EEFE8; a1[1] = *a2; v3 = a2[1]; a1[2] = v3; if ( v3 ) { if ( _libc_single_threaded ) ++*(_DWORD *)(v3 + 8); else _InterlockedIncrement((volatile signed __int32 *)(v3 + 8)); } a1[3] = a2[2]; *a1 = &off_EF238; a1[4] = a1 + 6; return std::string::_M_construct<char *>((long long)(a1 + 4), *(_BYTE **)a3, *(_QWORD *)a3 + *(_QWORD *)(a3 + 8)); }
TextNode: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RDI LEA R15,[0x1eefe8] MOV qword ptr [RDI],R15 MOV RAX,qword ptr [RSI] MOV qword ptr [RDI + 0x8],RAX MOV RAX,qword ptr [RSI + 0x8] MOV qword ptr [RDI + 0x10],RAX TEST RAX,RAX JZ 0x001613df MOV RCX,qword ptr [0x001effa0] CMP byte ptr [RCX],0x0 JZ 0x001613db INC dword ptr [RAX + 0x8] JMP 0x001613df LAB_001613db: INC.LOCK dword ptr [RAX + 0x8] LAB_001613df: MOV RAX,qword ptr [RSI + 0x10] MOV qword ptr [RBX + 0x18],RAX LEA RAX,[0x1ef238] MOV qword ptr [RBX],RAX LEA RDI,[RBX + 0x20] LEA RAX,[RBX + 0x30] MOV qword ptr [RBX + 0x20],RAX MOV RSI,qword ptr [RDX] MOV RDX,qword ptr [RDX + 0x8] ADD RDX,RSI LAB_00161407: CALL 0x0012bdf8 LAB_0016140c: POP RBX POP R14 POP R15 RET
/* minja::TextNode::TextNode(minja::Location const&, std::__cxx11::string const&) */ void __thiscall minja::TextNode::TextNode(TextNode *this,Location *param_1,string *param_2) { long lVar1; *(int ***)this = &PTR___cxa_pure_virtual_001eefe8; *(int8 *)(this + 8) = *(int8 *)param_1; lVar1 = *(long *)(param_1 + 8); *(long *)(this + 0x10) = lVar1; if (lVar1 != 0) { if (*PTR___libc_single_threaded_001effa0 == '\0') { LOCK(); *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; UNLOCK(); } else { *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; } } *(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10); *(int ***)this = &PTR_do_render_001ef238; *(TextNode **)(this + 0x20) = this + 0x30; /* try { // try from 00161407 to 0016140b has its CatchHandler @ 00161412 */ std::__cxx11::string::_M_construct<char*> (this + 0x20,*(long *)param_2,*(long *)(param_2 + 8) + *(long *)param_2); return; }
16,817
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::token_type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
hkr04[P]cpp-mcp/common/json.hpp
std::string exception_message(const token_type expected, const std::string& context) { std::string error_msg = "syntax error "; if (!context.empty()) { error_msg += concat("while parsing ", context, ' '); } error_msg += "- "; if (last_token == token_type::parse_error) { error_msg += concat(m_lexer.get_error_message(), "; last read: '", m_lexer.get_token_string(), '\''); } else { error_msg += concat("unexpected ", lexer_t::token_type_name(last_token)); } if (expected != token_type::uninitialized) { error_msg += concat("; expected ", lexer_t::token_type_name(expected)); } return error_msg; }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::token_type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x58, %rsp movq %rcx, %r15 movl %edx, %ebp movq %rsi, %r14 movq %rdi, %rbx leaq 0x105ca(%rip), %rsi # 0x4dd9e leaq 0x10(%rsp), %rdx callq 0xcab2 cmpq $0x0, 0x8(%r15) je 0x3d818 leaq 0x38(%rsp), %rcx movb $0x20, (%rcx) leaq 0x105b8(%rip), %rsi # 0x4ddac leaq 0x10(%rsp), %rdi movq %r15, %rdx callq 0x40deb leaq 0x10(%rsp), %rsi movq %rbx, %rdi callq 0xabb0 leaq 0x10(%rsp), %rdi callq 0xac20 leaq 0x1059c(%rip), %rsi # 0x4ddbb movq %rbx, %rdi callq 0xab70 movl 0x20(%r14), %edi cmpl $0xe, %edi jne 0x3d88f movq 0x98(%r14), %rax addq $0x28, %r14 movq %rax, 0x30(%rsp) leaq 0x38(%rsp), %rdi movq %r14, %rsi callq 0x3d5da leaq 0xf(%rsp), %r8 movb $0x27, (%r8) leaq 0x10561(%rip), %rdx # 0x4ddbe leaq 0x10(%rsp), %rdi leaq 0x30(%rsp), %rsi leaq 0x38(%rsp), %rcx callq 0x40e5b leaq 0x10(%rsp), %rsi movq %rbx, %rdi callq 0xabb0 leaq 0x10(%rsp), %rdi callq 0xac20 leaq 0x38(%rsp), %rdi jmp 0x3d8bf callq 0x40f32 leaq 0x38(%rsp), %rdx movq %rax, (%rdx) leaq 0x1052a(%rip), %rsi # 0x4ddcd leaq 0x10(%rsp), %rdi callq 0x40ed3 leaq 0x10(%rsp), %rsi movq %rbx, %rdi callq 0xabb0 leaq 0x10(%rsp), %rdi callq 0xac20 testl %ebp, %ebp je 0x3d8ff movl %ebp, %edi callq 0x40f32 leaq 0x38(%rsp), %rdx movq %rax, (%rdx) leaq 0x104fb(%rip), %rsi # 0x4ddd9 leaq 0x10(%rsp), %rdi callq 0x40ed3 leaq 0x10(%rsp), %rsi movq %rbx, %rdi callq 0xabb0 leaq 0x10(%rsp), %rdi callq 0xac20 movq %rbx, %rax addq $0x58, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0xac20 jmp 0x3d921 jmp 0x3d930 movq %rax, %r14 leaq 0x38(%rsp), %rdi jmp 0x3d938 jmp 0x3d941 jmp 0x3d941 jmp 0x3d930 jmp 0x3d941 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0xac20 jmp 0x3d944 jmp 0x3d941 movq %rax, %r14 movq %rbx, %rdi callq 0xac20 movq %r14, %rdi callq 0xaac0
_ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE17exception_messageENS1_10lexer_baseISF_E10token_typeERKSB_: push rbp push r15 push r14 push rbx sub rsp, 58h mov r15, rcx mov ebp, edx mov r14, rsi mov rbx, rdi lea rsi, aSyntaxError; "syntax error " lea rdx, [rsp+78h+var_68] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) cmp qword ptr [r15+8], 0 jz short loc_3D818 lea rcx, [rsp+78h+var_40] mov byte ptr [rcx], 20h ; ' ' lea rsi, aWhileParsing; "while parsing " lea rdi, [rsp+78h+var_68] mov rdx, r15 call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA15_KcRKS8_cEEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[15],std::string const&,char>(char const(&)[15],std::string const&,char &&) lea rsi, [rsp+78h+var_68] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&) lea rdi, [rsp+78h+var_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_3D818: lea rsi, asc_4DDBB; "- " mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov edi, [r14+20h] cmp edi, 0Eh jnz short loc_3D88F mov rax, [r14+98h] add r14, 28h ; '(' mov [rsp+78h+var_48], rax lea rdi, [rsp+78h+var_40] mov rsi, r14 call _ZNK8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE16get_token_stringEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_token_string(void) lea r8, [rsp+78h+var_69] mov byte ptr [r8], 27h ; ''' lea rdx, aLastRead; "; last read: '" lea rdi, [rsp+78h+var_68] lea rsi, [rsp+78h+var_48] lea rcx, [rsp+78h+var_40] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKcRA15_S9_S8_cEEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const*,char const(&)[15],std::string,char>(char const*,char const(&)[15],std::string,char &&) lea rsi, [rsp+78h+var_68] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&) lea rdi, [rsp+78h+var_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+78h+var_40] jmp short loc_3D8BF loc_3D88F: call _ZN8nlohmann16json_abi_v3_11_36detail10lexer_baseINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15token_type_nameENSG_10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type) lea rdx, [rsp+78h+var_40] mov [rdx], rax lea rsi, aUnexpected; "unexpected " lea rdi, [rsp+78h+var_68] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA12_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>(char const(&)[12],char const* &&) lea rsi, [rsp+78h+var_68] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&) lea rdi, [rsp+78h+var_68]; void * loc_3D8BF: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test ebp, ebp jz short loc_3D8FF mov edi, ebp call _ZN8nlohmann16json_abi_v3_11_36detail10lexer_baseINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15token_type_nameENSG_10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type) lea rdx, [rsp+78h+var_40] mov [rdx], rax lea rsi, aExpected; "; expected " lea rdi, [rsp+78h+var_68] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA12_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>(char const(&)[12],char const* &&) lea rsi, [rsp+78h+var_68] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&) lea rdi, [rsp+78h+var_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_3D8FF: mov rax, rbx add rsp, 58h pop rbx pop r14 pop r15 pop rbp retn mov r14, rax lea rdi, [rsp+arg_8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_3D921 jmp short loc_3D930 mov r14, rax loc_3D921: lea rdi, [rsp+arg_30] jmp short loc_3D938 jmp short loc_3D941 jmp short loc_3D941 jmp short loc_3D930 jmp short loc_3D941 loc_3D930: mov r14, rax lea rdi, [rsp+arg_8]; void * loc_3D938: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_3D944 jmp short $+2 loc_3D941: mov r14, rax loc_3D944: mov rdi, rbx; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r14 call __Unwind_Resume
_QWORD * nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::exception_message( _QWORD *a1, long long a2, unsigned int a3, long long a4) { _BYTE *v7; // rdi char v9; // [rsp+Fh] [rbp-69h] BYREF _BYTE v10[32]; // [rsp+10h] [rbp-68h] BYREF long long v11; // [rsp+30h] [rbp-48h] BYREF _QWORD v12[8]; // [rsp+38h] [rbp-40h] BYREF std::string::basic_string<std::allocator<char>>(a1, (long long)"syntax error "); if ( *(_QWORD *)(a4 + 8) ) { LOBYTE(v12[0]) = 32; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[15],std::string const&,char>( v10, "while parsing ", a4, v12); std::string::append(a1, v10); std::string::~string(v10); } std::string::append(a1, "- "); if ( *(_DWORD *)(a2 + 32) == 14 ) { v11 = *(_QWORD *)(a2 + 152); nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_token_string( (long long)v12, a2 + 40); v9 = 39; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const*,char const(&)[15],std::string,char>( v10, &v11, "; last read: '", v12, &v9); std::string::append(a1, v10); std::string::~string(v10); v7 = v12; } else { v12[0] = ((long long (*)(void))nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::token_type_name)(); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>(v10, "unexpected "); std::string::append(a1, v10); v7 = v10; } std::string::~string(v7); if ( a3 ) { v12[0] = nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::token_type_name(a3); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>(v10, "; expected "); std::string::append(a1, v10); std::string::~string(v10); } return a1; }
exception_message: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x58 MOV R15,RCX MOV EBP,EDX MOV R14,RSI MOV RBX,RDI LEA RSI,[0x14dd9e] LEA RDX,[RSP + 0x10] CALL 0x0010cab2 CMP qword ptr [R15 + 0x8],0x0 JZ 0x0013d818 LEA RCX,[RSP + 0x38] MOV byte ptr [RCX],0x20 LAB_0013d7ed: LEA RSI,[0x14ddac] LEA RDI,[RSP + 0x10] MOV RDX,R15 CALL 0x00140deb LAB_0013d801: LEA RSI,[RSP + 0x10] MOV RDI,RBX CALL 0x0010abb0 LEA RDI,[RSP + 0x10] CALL 0x0010ac20 LAB_0013d818: LEA RSI,[0x14ddbb] MOV RDI,RBX CALL 0x0010ab70 MOV EDI,dword ptr [R14 + 0x20] CMP EDI,0xe JNZ 0x0013d88f MOV RAX,qword ptr [R14 + 0x98] ADD R14,0x28 MOV qword ptr [RSP + 0x30],RAX LAB_0013d840: LEA RDI,[RSP + 0x38] MOV RSI,R14 CALL 0x0013d5da LEA R8,[RSP + 0xf] MOV byte ptr [R8],0x27 LAB_0013d856: LEA RDX,[0x14ddbe] LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x30] LEA RCX,[RSP + 0x38] CALL 0x00140e5b LAB_0013d871: LEA RSI,[RSP + 0x10] MOV RDI,RBX CALL 0x0010abb0 LEA RDI,[RSP + 0x10] CALL 0x0010ac20 LEA RDI,[RSP + 0x38] JMP 0x0013d8bf LAB_0013d88f: CALL 0x00140f32 LEA RDX,[RSP + 0x38] MOV qword ptr [RDX],RAX LAB_0013d89c: LEA RSI,[0x14ddcd] LEA RDI,[RSP + 0x10] CALL 0x00140ed3 LAB_0013d8ad: LEA RSI,[RSP + 0x10] MOV RDI,RBX CALL 0x0010abb0 LEA RDI,[RSP + 0x10] LAB_0013d8bf: CALL 0x0010ac20 TEST EBP,EBP JZ 0x0013d8ff MOV EDI,EBP CALL 0x00140f32 LEA RDX,[RSP + 0x38] MOV qword ptr [RDX],RAX LAB_0013d8d7: LEA RSI,[0x14ddd9] LEA RDI,[RSP + 0x10] CALL 0x00140ed3 LAB_0013d8e8: LEA RSI,[RSP + 0x10] MOV RDI,RBX CALL 0x0010abb0 LAB_0013d8f5: LEA RDI,[RSP + 0x10] CALL 0x0010ac20 LAB_0013d8ff: MOV RAX,RBX ADD RSP,0x58 POP RBX POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::token_type, std::__cxx11::string const&) */ string * nlohmann::json_abi_v3_11_3::detail:: parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::exception_message(string *param_1,long param_2,int param_3,string *param_4) { string *this; char local_69; allocator local_68 [32]; char *local_48; char *local_40 [4]; std::__cxx11::string::string<std::allocator<char>>(param_1,"syntax error ",local_68); if (*(long *)(param_4 + 8) != 0) { local_40[0] = (char *)CONCAT71(local_40[0]._1_7_,0x20); /* try { // try from 0013d7ed to 0013d800 has its CatchHandler @ 0013d93f */ concat<std::__cxx11::string,char_const(&)[15],std::__cxx11::string_const&,char> ((detail *)local_68,"while parsing ",param_4,(char *)local_40); /* try { // try from 0013d801 to 0013d80d has its CatchHandler @ 0013d930 */ std::__cxx11::string::append(param_1); std::__cxx11::string::~string((string *)local_68); } /* try { // try from 0013d818 to 0013d826 has its CatchHandler @ 0013d941 */ std::__cxx11::string::append((char *)param_1); if (*(int *)(param_2 + 0x20) == 0xe) { local_48 = *(char **)(param_2 + 0x98); /* try { // try from 0013d840 to 0013d84c has its CatchHandler @ 0013d92a */ lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::get_token_string(); local_69 = '\''; /* try { // try from 0013d856 to 0013d870 has its CatchHandler @ 0013d91e */ concat<std::__cxx11::string,char_const*,char_const(&)[15],std::__cxx11::string,char> ((detail *)local_68,&local_48,"; last read: \'",(string *)local_40,&local_69); /* try { // try from 0013d871 to 0013d87d has its CatchHandler @ 0013d90d */ std::__cxx11::string::append(param_1); std::__cxx11::string::~string((string *)local_68); this = (string *)local_40; } else { local_40[0] = (char *)lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::token_type_name(); /* try { // try from 0013d89c to 0013d8ac has its CatchHandler @ 0013d928 */ concat<std::__cxx11::string,char_const(&)[12],char_const*> ((detail *)local_68,"unexpected ",local_40); /* try { // try from 0013d8ad to 0013d8b9 has its CatchHandler @ 0013d91c */ std::__cxx11::string::append(param_1); this = (string *)local_68; } std::__cxx11::string::~string(this); if (param_3 != 0) { local_40[0] = (char *)lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::token_type_name(param_3); /* try { // try from 0013d8d7 to 0013d8e7 has its CatchHandler @ 0013d92e */ concat<std::__cxx11::string,char_const(&)[12],char_const*> ((detail *)local_68,"; expected ",local_40); /* try { // try from 0013d8e8 to 0013d8f4 has its CatchHandler @ 0013d92c */ std::__cxx11::string::append(param_1); std::__cxx11::string::~string((string *)local_68); } return param_1; }
16,818
cxxopts::values::abstract_value<bool>::~abstract_value()
shubhamoy[P]dir2txt/include/cxxopts.hpp
~abstract_value() override = default;
O3
cpp
cxxopts::values::abstract_value<bool>::~abstract_value(): pushq %rbx movq %rdi, %rbx leaq 0x28e0d(%rip), %rax # 0x4d8c0 movq %rax, (%rdi) movq 0x58(%rdi), %rdi leaq 0x68(%rbx), %rax cmpq %rax, %rdi je 0x24ace movq (%rax), %rsi incq %rsi callq 0x8380 movq 0x38(%rbx), %rdi leaq 0x48(%rbx), %rax cmpq %rax, %rdi je 0x24ae6 movq (%rax), %rsi incq %rsi callq 0x8380 movq 0x20(%rbx), %rdi testq %rdi, %rdi je 0x24af4 callq 0x9930 movq 0x10(%rbx), %rdi testq %rdi, %rdi je 0x24b2a movq 0x29494(%rip), %rax # 0x4df98 cmpb $0x0, (%rax) je 0x24b14 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x24b1e movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x24b2a movq (%rdi), %rax popq %rbx jmpq *0x18(%rax) popq %rbx retq
_ZN7cxxopts6values14abstract_valueIbED2Ev: push rbx mov rbx, rdi lea rax, off_4D8C0 mov [rdi], rax mov rdi, [rdi+58h]; void * lea rax, [rbx+68h] cmp rdi, rax jz short loc_24ACE mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_24ACE: mov rdi, [rbx+38h]; void * lea rax, [rbx+48h] cmp rdi, rax jz short loc_24AE6 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_24AE6: mov rdi, [rbx+20h] test rdi, rdi jz short loc_24AF4 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_24AF4: mov rdi, [rbx+10h] test rdi, rdi jz short loc_24B2A mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_24B14 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_24B1E loc_24B14: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_24B1E: cmp eax, 1 jnz short loc_24B2A mov rax, [rdi] pop rbx jmp qword ptr [rax+18h] loc_24B2A: pop rbx retn
void cxxopts::values::abstract_value<bool>::~abstract_value(_QWORD *a1) { _QWORD *v2; // rdi _QWORD *v3; // rdi volatile signed __int32 *v4; // rdi volatile signed __int32 *v5; // rdi signed __int32 v6; // eax *a1 = &off_4D8C0; v2 = (_QWORD *)a1[11]; if ( v2 != a1 + 13 ) operator delete(v2, a1[13] + 1LL); v3 = (_QWORD *)a1[7]; if ( v3 != a1 + 9 ) operator delete(v3, a1[9] + 1LL); v4 = (volatile signed __int32 *)a1[4]; if ( v4 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v4); v5 = (volatile signed __int32 *)a1[2]; if ( v5 ) { if ( _libc_single_threaded ) { v6 = *((_DWORD *)v5 + 3); *((_DWORD *)v5 + 3) = v6 - 1; } else { v6 = _InterlockedExchangeAdd(v5 + 3, 0xFFFFFFFF); } if ( v6 == 1 ) (*(void ( **)(volatile signed __int32 *))(*(_QWORD *)v5 + 24LL))(v5); } }
~abstract_value: PUSH RBX MOV RBX,RDI LEA RAX,[0x14d8c0] MOV qword ptr [RDI],RAX MOV RDI,qword ptr [RDI + 0x58] LEA RAX,[RBX + 0x68] CMP RDI,RAX JZ 0x00124ace MOV RSI,qword ptr [RAX] INC RSI CALL 0x00108380 LAB_00124ace: MOV RDI,qword ptr [RBX + 0x38] LEA RAX,[RBX + 0x48] CMP RDI,RAX JZ 0x00124ae6 MOV RSI,qword ptr [RAX] INC RSI CALL 0x00108380 LAB_00124ae6: MOV RDI,qword ptr [RBX + 0x20] TEST RDI,RDI JZ 0x00124af4 CALL 0x00109930 LAB_00124af4: MOV RDI,qword ptr [RBX + 0x10] TEST RDI,RDI JZ 0x00124b2a MOV RAX,qword ptr [0x0014df98] CMP byte ptr [RAX],0x0 JZ 0x00124b14 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x00124b1e LAB_00124b14: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_00124b1e: CMP EAX,0x1 JNZ 0x00124b2a MOV RAX,qword ptr [RDI] POP RBX JMP qword ptr [RAX + 0x18] LAB_00124b2a: POP RBX RET
/* cxxopts::values::abstract_value<bool>::~abstract_value() */ void __thiscall cxxopts::values::abstract_value<bool>::~abstract_value(abstract_value<bool> *this) { int *piVar1; long *plVar2; int iVar3; *(int ***)this = &PTR__abstract_value_0014d8c0; if (*(abstract_value<bool> **)(this + 0x58) != this + 0x68) { operator_delete(*(abstract_value<bool> **)(this + 0x58),*(long *)(this + 0x68) + 1); } if (*(abstract_value<bool> **)(this + 0x38) != this + 0x48) { operator_delete(*(abstract_value<bool> **)(this + 0x38),*(long *)(this + 0x48) + 1); } if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x20) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x20)); } plVar2 = *(long **)(this + 0x10); if (plVar2 != (long *)0x0) { if (*PTR___libc_single_threaded_0014df98 == '\0') { LOCK(); piVar1 = (int *)((long)plVar2 + 0xc); iVar3 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar3 = *(int *)((long)plVar2 + 0xc); *(int *)((long)plVar2 + 0xc) = iVar3 + -1; } if (iVar3 == 1) { /* WARNING: Could not recover jumptable at 0x00124b27. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(*plVar2 + 0x18))(); return; } } return; }
16,819
maria_page_filler_set_normal
eloqsql/storage/maria/ma_pagecrc.c
my_bool maria_page_filler_set_normal(PAGECACHE_IO_HOOK_ARGS *args) { uchar *page= args->page; #ifdef DBUG_ASSERT_EXISTS pgcache_page_no_t page_no= args->pageno; #endif MARIA_SHARE *share= (MARIA_SHARE *)args->data; DBUG_ENTER("maria_page_filler_set_normal"); DBUG_ASSERT(page_no != 0); /* Catches some simple bugs */ int4store_aligned(page + share->block_size - CRC_SIZE, MARIA_NO_CRC_NORMAL_PAGE); DBUG_RETURN(0); }
O0
c
maria_page_filler_set_normal: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x18(%rbp) jmp 0x5d8e1 jmp 0x5d8e3 movq -0x10(%rbp), %rax movq -0x18(%rbp), %rcx movl 0x7bc(%rcx), %ecx addq %rcx, %rax addq $-0x4, %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF jmp 0x5d908 jmp 0x5d90a xorl %eax, %eax popq %rbp retq nop
maria_page_filler_set_normal: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_10], rax mov rax, [rbp+var_8] mov rax, [rax+10h] mov [rbp+var_18], rax jmp short $+2 loc_5D8E1: jmp short $+2 loc_5D8E3: mov rax, [rbp+var_10] mov rcx, [rbp+var_18] mov ecx, [rcx+7BCh] add rax, rcx add rax, 0FFFFFFFFFFFFFFFCh mov [rbp+var_20], rax mov rax, [rbp+var_20] mov dword ptr [rax], 0FFFFFFFFh jmp short $+2 loc_5D908: jmp short $+2 loc_5D90A: xor eax, eax pop rbp retn
long long maria_page_filler_set_normal(_QWORD *a1) { *(_DWORD *)(*(unsigned int *)(a1[2] + 1980LL) + *a1 - 4LL) = -1; return 0LL; }
maria_page_filler_set_normal: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x18],RAX JMP 0x0015d8e1 LAB_0015d8e1: JMP 0x0015d8e3 LAB_0015d8e3: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RCX + 0x7bc] ADD RAX,RCX ADD RAX,-0x4 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],0xffffffff JMP 0x0015d908 LAB_0015d908: JMP 0x0015d90a LAB_0015d90a: XOR EAX,EAX POP RBP RET
int8 maria_page_filler_set_normal(long *param_1) { *(int4 *)(*param_1 + (ulong)*(uint *)(param_1[2] + 0x7bc) + -4) = 0xffffffff; return 0; }
16,820
OpenSubdiv::v3_6_0::Far::PatchTable::GetSingleCreasePatchSharpnessValue(int, int) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp
float PatchTable::GetSingleCreasePatchSharpnessValue(int arrayIndex, int patchIndex) const { PatchArray const & pa = getPatchArray(arrayIndex); assert((pa.patchIndex + patchIndex) < (int)_sharpnessIndices.size()); Index index = _sharpnessIndices[pa.patchIndex + patchIndex]; if (index == Vtr::INDEX_INVALID) { return 0.0f; } assert(index < (Index)_sharpnessValues.size()); return _sharpnessValues[index]; }
O0
cpp
OpenSubdiv::v3_6_0::Far::PatchTable::GetSingleCreasePatchSharpnessValue(int, int) const: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq -0x10(%rbp), %rdi movq %rdi, -0x30(%rbp) movl -0x14(%rbp), %esi callq 0xc85b0 movq -0x30(%rbp), %rdi movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movl 0xc(%rax), %eax addl -0x18(%rbp), %eax movl %eax, -0x28(%rbp) addq $0xe0, %rdi callq 0xd7ae0 movq %rax, %rcx movl -0x28(%rbp), %eax cmpl %ecx, %eax jge 0x13fc8f jmp 0x13fcae leaq 0xb0f1f(%rip), %rdi # 0x1f0bb5 leaq 0xb0b4c(%rip), %rsi # 0x1f07e9 movl $0x151, %edx # imm = 0x151 leaq 0xb0f49(%rip), %rcx # 0x1f0bf2 callq 0xc9440 movq -0x30(%rbp), %rdi addq $0xe0, %rdi movq -0x20(%rbp), %rax movl 0xc(%rax), %eax addl -0x18(%rbp), %eax movslq %eax, %rsi callq 0xd09b0 movl (%rax), %eax movl %eax, -0x24(%rbp) cmpl $-0x1, -0x24(%rbp) jne 0x13fce0 xorps %xmm0, %xmm0 movss %xmm0, -0x4(%rbp) jmp 0x13fd3e movq -0x30(%rbp), %rdi movl -0x24(%rbp), %eax movl %eax, -0x34(%rbp) addq $0xf8, %rdi callq 0xd6570 movq %rax, %rcx movl -0x34(%rbp), %eax cmpl %ecx, %eax jge 0x13fd02 jmp 0x13fd21 leaq 0xb0e85(%rip), %rdi # 0x1f0b8e leaq 0xb0ad9(%rip), %rsi # 0x1f07e9 movl $0x156, %edx # imm = 0x156 leaq 0xb0ed6(%rip), %rcx # 0x1f0bf2 callq 0xc9440 movq -0x30(%rbp), %rdi addq $0xf8, %rdi movslq -0x24(%rbp), %rsi callq 0xd1480 movss (%rax), %xmm0 movss %xmm0, -0x4(%rbp) movss -0x4(%rbp), %xmm0 addq $0x40, %rsp popq %rbp retq nopl (%rax)
_ZNK10OpenSubdiv6v3_6_03Far10PatchTable34GetSingleCreasePatchSharpnessValueEii: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov rdi, [rbp+var_10]; this mov [rbp+var_30], rdi mov esi, [rbp+var_14]; int call __ZNK10OpenSubdiv6v3_6_03Far10PatchTable13getPatchArrayEi; OpenSubdiv::v3_6_0::Far::PatchTable::getPatchArray(int) mov rdi, [rbp+var_30] mov [rbp+var_20], rax mov rax, [rbp+var_20] mov eax, [rax+0Ch] add eax, [rbp+var_18] mov [rbp+var_28], eax add rdi, 0E0h call __ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void) mov rcx, rax mov eax, [rbp+var_28] cmp eax, ecx jge short loc_13FC8F jmp short loc_13FCAE loc_13FC8F: lea rdi, aPaPatchindexPa_0; "(pa.patchIndex + patchIndex) < (int)_sh"... lea rsi, aWorkspaceLlm4b_15; "/workspace/llm4binary/github/2025_star3"... mov edx, 151h lea rcx, aFloatOpensubdi_0; "float OpenSubdiv::v3_6_0::Far::PatchTab"... call ___assert_fail loc_13FCAE: mov rdi, [rbp+var_30] add rdi, 0E0h mov rax, [rbp+var_20] mov eax, [rax+0Ch] add eax, [rbp+var_18] movsxd rsi, eax call __ZNKSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong) mov eax, [rax] mov [rbp+var_24], eax cmp [rbp+var_24], 0FFFFFFFFh jnz short loc_13FCE0 xorps xmm0, xmm0 movss [rbp+var_4], xmm0 jmp short loc_13FD3E loc_13FCE0: mov rdi, [rbp+var_30] mov eax, [rbp+var_24] mov [rbp+var_34], eax add rdi, 0F8h call __ZNKSt6vectorIfSaIfEE4sizeEv; std::vector<float>::size(void) mov rcx, rax mov eax, [rbp+var_34] cmp eax, ecx jge short loc_13FD02 jmp short loc_13FD21 loc_13FD02: lea rdi, aIndexIndexShar; "index < (Index)_sharpnessValues.size()" lea rsi, aWorkspaceLlm4b_15; "/workspace/llm4binary/github/2025_star3"... mov edx, 156h lea rcx, aFloatOpensubdi_0; "float OpenSubdiv::v3_6_0::Far::PatchTab"... call ___assert_fail loc_13FD21: mov rdi, [rbp+var_30] add rdi, 0F8h movsxd rsi, [rbp+var_24] call __ZNKSt6vectorIfSaIfEEixEm; std::vector<float>::operator[](ulong) movss xmm0, dword ptr [rax] movss [rbp+var_4], xmm0 loc_13FD3E: movss xmm0, [rbp+var_4] add rsp, 40h pop rbp retn
float OpenSubdiv::v3_6_0::Far::PatchTable::GetSingleCreasePatchSharpnessValue( OpenSubdiv::v3_6_0::Far::PatchTable *this, int a2, int a3) { int v4; // [rsp+18h] [rbp-28h] int v5; // [rsp+1Ch] [rbp-24h] long long PatchArray; // [rsp+20h] [rbp-20h] PatchArray = OpenSubdiv::v3_6_0::Far::PatchTable::getPatchArray(this, a2); v4 = a3 + *(_DWORD *)(PatchArray + 12); if ( v4 >= (int)std::vector<int>::size((char *)this + 224) ) __assert_fail( "(pa.patchIndex + patchIndex) < (int)_sharpnessIndices.size()", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp", 337LL, "float OpenSubdiv::v3_6_0::Far::PatchTable::GetSingleCreasePatchSharpnessValue(int, int) const"); v5 = *(_DWORD *)std::vector<int>::operator[]((char *)this + 224, a3 + *(_DWORD *)(PatchArray + 12)); if ( v5 == -1 ) return 0.0; if ( v5 >= (int)std::vector<float>::size((char *)this + 248) ) __assert_fail( "index < (Index)_sharpnessValues.size()", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp", 342LL, "float OpenSubdiv::v3_6_0::Far::PatchTable::GetSingleCreasePatchSharpnessValue(int, int) const"); return *(float *)std::vector<float>::operator[]((char *)this + 248, v5); }
16,821
OpenSubdiv::v3_6_0::Far::PatchTable::GetSingleCreasePatchSharpnessValue(int, int) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp
float PatchTable::GetSingleCreasePatchSharpnessValue(int arrayIndex, int patchIndex) const { PatchArray const & pa = getPatchArray(arrayIndex); assert((pa.patchIndex + patchIndex) < (int)_sharpnessIndices.size()); Index index = _sharpnessIndices[pa.patchIndex + patchIndex]; if (index == Vtr::INDEX_INVALID) { return 0.0f; } assert(index < (Index)_sharpnessValues.size()); return _sharpnessValues[index]; }
O1
cpp
OpenSubdiv::v3_6_0::Far::PatchTable::GetSingleCreasePatchSharpnessValue(int, int) const: pushq %rax movq 0x8(%rdi), %rax movq 0x10(%rdi), %rcx subq %rax, %rcx shrq $0x2, %rcx imull $0xcccccccd, %ecx, %ecx # imm = 0xCCCCCCCD cmpl %esi, %ecx jle 0x69da8 movslq %esi, %rcx leaq (%rcx,%rcx,4), %rcx movslq 0xc(%rax,%rcx,4), %rcx movslq %edx, %rax addq %rcx, %rax movq 0xe0(%rdi), %rcx movq 0xe8(%rdi), %rdx subq %rcx, %rdx shrq $0x2, %rdx cmpl %edx, %eax jge 0x69dc7 movslq (%rcx,%rax,4), %rax cmpq $-0x1, %rax je 0x69da3 movq 0xf8(%rdi), %rcx movq 0x100(%rdi), %rdx subq %rcx, %rdx shrq $0x2, %rdx cmpl %edx, %eax jge 0x69de6 movss (%rcx,%rax,4), %xmm0 jmp 0x69da6 xorps %xmm0, %xmm0 popq %rax retq leaq 0x4ef4e(%rip), %rdi # 0xb8cfd leaq 0x4ea1c(%rip), %rsi # 0xb87d2 leaq 0x4ef66(%rip), %rcx # 0xb8d23 movl $0x90, %edx callq 0x39560 leaq 0x4edd0(%rip), %rdi # 0xb8b9e leaq 0x4e9fd(%rip), %rsi # 0xb87d2 leaq 0x4edff(%rip), %rcx # 0xb8bdb movl $0x151, %edx # imm = 0x151 callq 0x39560 leaq 0x4ed8a(%rip), %rdi # 0xb8b77 leaq 0x4e9de(%rip), %rsi # 0xb87d2 leaq 0x4ede0(%rip), %rcx # 0xb8bdb movl $0x156, %edx # imm = 0x156 callq 0x39560 nop
_ZNK10OpenSubdiv6v3_6_03Far10PatchTable34GetSingleCreasePatchSharpnessValueEii: push rax mov rax, [rdi+8] mov rcx, [rdi+10h] sub rcx, rax shr rcx, 2 imul ecx, 0CCCCCCCDh cmp ecx, esi jle short loc_69DA8 movsxd rcx, esi lea rcx, [rcx+rcx*4] movsxd rcx, dword ptr [rax+rcx*4+0Ch] movsxd rax, edx add rax, rcx mov rcx, [rdi+0E0h] mov rdx, [rdi+0E8h] sub rdx, rcx shr rdx, 2 cmp eax, edx jge short loc_69DC7 movsxd rax, dword ptr [rcx+rax*4] cmp rax, 0FFFFFFFFFFFFFFFFh jz short loc_69DA3 mov rcx, [rdi+0F8h] mov rdx, [rdi+100h] sub rdx, rcx shr rdx, 2 cmp eax, edx jge short loc_69DE6 movss xmm0, dword ptr [rcx+rax*4] jmp short loc_69DA6 loc_69DA3: xorps xmm0, xmm0 loc_69DA6: pop rax retn loc_69DA8: lea rdi, aArrayindexInde; "arrayIndex<(Index)GetNumPatchArrays()" lea rsi, aWorkspaceLlm4b_16; "/workspace/llm4binary/github/2025_star3"... lea rcx, aConstPatchtabl; "const PatchTable::PatchArray &OpenSubdi"... mov edx, 90h call ___assert_fail loc_69DC7: lea rdi, aPaPatchindexPa_0; "(pa.patchIndex + patchIndex) < (int)_sh"... lea rsi, aWorkspaceLlm4b_16; "/workspace/llm4binary/github/2025_star3"... lea rcx, aFloatOpensubdi_0; "float OpenSubdiv::v3_6_0::Far::PatchTab"... mov edx, 151h call ___assert_fail loc_69DE6: lea rdi, aIndexIndexShar; "index < (Index)_sharpnessValues.size()" lea rsi, aWorkspaceLlm4b_16; "/workspace/llm4binary/github/2025_star3"... lea rcx, aFloatOpensubdi_0; "float OpenSubdiv::v3_6_0::Far::PatchTab"... mov edx, 156h call ___assert_fail
double __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> OpenSubdiv::v3_6_0::Far::PatchTable::GetSingleCreasePatchSharpnessValue( OpenSubdiv::v3_6_0::Far::PatchTable *this, signed int a2, int a3) { long long v3; // rax long long v4; // rax long long v5; // rcx long long v6; // rax long long v7; // rcx double result; // xmm0_8 v3 = *((_QWORD *)this + 1); if ( (int)(-858993459 * ((unsigned long long)(*((_QWORD *)this + 2) - v3) >> 2)) <= a2 ) __assert_fail( "arrayIndex<(Index)GetNumPatchArrays()", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp", 144LL, "const PatchTable::PatchArray &OpenSubdiv::v3_6_0::Far::PatchTable::getPatchArray(Index) const"); v4 = *(int *)(v3 + 20LL * a2 + 12) + (long long)a3; v5 = *((_QWORD *)this + 28); if ( (int)v4 >= (int)((unsigned long long)(*((_QWORD *)this + 29) - v5) >> 2) ) __assert_fail( "(pa.patchIndex + patchIndex) < (int)_sharpnessIndices.size()", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp", 337LL, "float OpenSubdiv::v3_6_0::Far::PatchTable::GetSingleCreasePatchSharpnessValue(int, int) const"); v6 = *(int *)(v5 + 4 * v4); if ( v6 == -1 ) return 0.0; v7 = *((_QWORD *)this + 31); if ( (int)v6 >= (int)((unsigned long long)(*((_QWORD *)this + 32) - v7) >> 2) ) __assert_fail( "index < (Index)_sharpnessValues.size()", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp", 342LL, "float OpenSubdiv::v3_6_0::Far::PatchTable::GetSingleCreasePatchSharpnessValue(int, int) const"); *(_QWORD *)&result = *(unsigned int *)(v7 + 4 * v6); return result; }
GetSingleCreasePatchSharpnessValue: PUSH RAX MOV RAX,qword ptr [RDI + 0x8] MOV RCX,qword ptr [RDI + 0x10] SUB RCX,RAX SHR RCX,0x2 IMUL ECX,ECX,-0x33333333 CMP ECX,ESI JLE 0x00169da8 MOVSXD RCX,ESI LEA RCX,[RCX + RCX*0x4] MOVSXD RCX,dword ptr [RAX + RCX*0x4 + 0xc] MOVSXD RAX,EDX ADD RAX,RCX MOV RCX,qword ptr [RDI + 0xe0] MOV RDX,qword ptr [RDI + 0xe8] SUB RDX,RCX SHR RDX,0x2 CMP EAX,EDX JGE 0x00169dc7 MOVSXD RAX,dword ptr [RCX + RAX*0x4] CMP RAX,-0x1 JZ 0x00169da3 MOV RCX,qword ptr [RDI + 0xf8] MOV RDX,qword ptr [RDI + 0x100] SUB RDX,RCX SHR RDX,0x2 CMP EAX,EDX JGE 0x00169de6 MOVSS XMM0,dword ptr [RCX + RAX*0x4] JMP 0x00169da6 LAB_00169da3: XORPS XMM0,XMM0 LAB_00169da6: POP RAX RET LAB_00169da8: LEA RDI,[0x1b8cfd] LEA RSI,[0x1b87d2] LEA RCX,[0x1b8d23] MOV EDX,0x90 CALL 0x00139560 LAB_00169dc7: LEA RDI,[0x1b8b9e] LEA RSI,[0x1b87d2] LEA RCX,[0x1b8bdb] MOV EDX,0x151 CALL 0x00139560 LAB_00169de6: LEA RDI,[0x1b8b77] LEA RSI,[0x1b87d2] LEA RCX,[0x1b8bdb] MOV EDX,0x156 CALL 0x00139560
/* OpenSubdiv::v3_6_0::Far::PatchTable::GetSingleCreasePatchSharpnessValue(int, int) const */ int8 __thiscall OpenSubdiv::v3_6_0::Far::PatchTable::GetSingleCreasePatchSharpnessValue (PatchTable *this,int param_1,int param_2) { int iVar1; int8 in_RAX; long lVar2; if ((int)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 2) * -0x33333333 <= param_1) { /* WARNING: Subroutine does not return */ __assert_fail("arrayIndex<(Index)GetNumPatchArrays()", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp" ,0x90, "const PatchTable::PatchArray &OpenSubdiv::v3_6_0::Far::PatchTable::getPatchArray(Index) const" ); } lVar2 = (long)param_2 + (long)*(int *)(*(long *)(this + 8) + 0xc + (long)param_1 * 0x14); if ((int)((ulong)(*(long *)(this + 0xe8) - *(long *)(this + 0xe0)) >> 2) <= (int)lVar2) { /* WARNING: Subroutine does not return */ __assert_fail("(pa.patchIndex + patchIndex) < (int)_sharpnessIndices.size()", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp" ,0x151, "float OpenSubdiv::v3_6_0::Far::PatchTable::GetSingleCreasePatchSharpnessValue(int, int) const" ); } iVar1 = *(int *)(*(long *)(this + 0xe0) + lVar2 * 4); if ((iVar1 != -1) && ((int)((ulong)(*(long *)(this + 0x100) - *(long *)(this + 0xf8)) >> 2) <= iVar1)) { /* WARNING: Subroutine does not return */ __assert_fail("index < (Index)_sharpnessValues.size()", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp" ,0x156, "float OpenSubdiv::v3_6_0::Far::PatchTable::GetSingleCreasePatchSharpnessValue(int, int) const" ); } return in_RAX; }
16,822
my_wc_mb_8bit
eloqsql/strings/ctype-simple.c
int my_wc_mb_8bit(CHARSET_INFO *cs,my_wc_t wc, uchar *str, uchar *end) { MY_UNI_IDX *idx; if (str >= end) return MY_CS_TOOSMALL; for (idx=cs->tab_from_uni; idx->tab ; idx++) { if (idx->from <= wc && idx->to >= wc) { str[0]= idx->tab[wc - idx->from]; return (!str[0] && wc) ? MY_CS_ILUNI : 1; } } return MY_CS_ILUNI; }
O0
c
my_wc_mb_8bit: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0x386aa movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x38743 movq -0x10(%rbp), %rax movq 0x70(%rax), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax cmpq $0x0, 0x8(%rax) je 0x3873c movq -0x30(%rbp), %rax movzwl (%rax), %eax cmpq -0x18(%rbp), %rax ja 0x38729 movq -0x30(%rbp), %rax movzwl 0x2(%rax), %eax cmpq -0x18(%rbp), %rax jb 0x38729 movq -0x30(%rbp), %rax movq 0x8(%rax), %rax movq -0x18(%rbp), %rcx movq -0x30(%rbp), %rdx movzwl (%rdx), %edx subq %rdx, %rcx movb (%rax,%rcx), %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movq -0x20(%rbp), %rcx xorl %eax, %eax cmpb $0x0, (%rcx) movb %al, -0x31(%rbp) jne 0x38714 cmpq $0x0, -0x18(%rbp) setne %al movb %al, -0x31(%rbp) movb -0x31(%rbp), %dl movl $0x1, %eax xorl %ecx, %ecx testb $0x1, %dl cmovnel %ecx, %eax movl %eax, -0x4(%rbp) jmp 0x38743 jmp 0x3872b movq -0x30(%rbp), %rax addq $0x10, %rax movq %rax, -0x30(%rbp) jmp 0x386b6 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax,%rax)
my_wc_mb_8bit: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_386AA mov [rbp+var_4], 0FFFFFF9Bh jmp loc_38743 loc_386AA: mov rax, [rbp+var_10] mov rax, [rax+70h] mov [rbp+var_30], rax loc_386B6: mov rax, [rbp+var_30] cmp qword ptr [rax+8], 0 jz short loc_3873C mov rax, [rbp+var_30] movzx eax, word ptr [rax] cmp rax, [rbp+var_18] ja short loc_38729 mov rax, [rbp+var_30] movzx eax, word ptr [rax+2] cmp rax, [rbp+var_18] jb short loc_38729 mov rax, [rbp+var_30] mov rax, [rax+8] mov rcx, [rbp+var_18] mov rdx, [rbp+var_30] movzx edx, word ptr [rdx] sub rcx, rdx mov cl, [rax+rcx] mov rax, [rbp+var_20] mov [rax], cl mov rcx, [rbp+var_20] xor eax, eax cmp byte ptr [rcx], 0 mov [rbp+var_31], al jnz short loc_38714 cmp [rbp+var_18], 0 setnz al mov [rbp+var_31], al loc_38714: mov dl, [rbp+var_31] mov eax, 1 xor ecx, ecx test dl, 1 cmovnz eax, ecx mov [rbp+var_4], eax jmp short loc_38743 loc_38729: jmp short $+2 loc_3872B: mov rax, [rbp+var_30] add rax, 10h mov [rbp+var_30], rax jmp loc_386B6 loc_3873C: mov [rbp+var_4], 0 loc_38743: mov eax, [rbp+var_4] pop rbp retn
long long my_wc_mb_8bit(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4) { bool v5; // [rsp+1h] [rbp-31h] unsigned __int16 *i; // [rsp+2h] [rbp-30h] if ( (unsigned long long)a3 < a4 ) { for ( i = *(unsigned __int16 **)(a1 + 112); ; i += 8 ) { if ( !*((_QWORD *)i + 1) ) return 0; if ( *i <= a2 && i[1] >= a2 ) break; } *a3 = *(_BYTE *)(*((_QWORD *)i + 1) + a2 - *i); v5 = 0; if ( !*a3 ) v5 = a2 != 0; return !v5; } else { return (unsigned int)-101; } }
my_wc_mb_8bit: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JC 0x001386aa MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x00138743 LAB_001386aa: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x70] MOV qword ptr [RBP + -0x30],RAX LAB_001386b6: MOV RAX,qword ptr [RBP + -0x30] CMP qword ptr [RAX + 0x8],0x0 JZ 0x0013873c MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,word ptr [RAX] CMP RAX,qword ptr [RBP + -0x18] JA 0x00138729 MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,word ptr [RAX + 0x2] CMP RAX,qword ptr [RBP + -0x18] JC 0x00138729 MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x30] MOVZX EDX,word ptr [RDX] SUB RCX,RDX MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV RCX,qword ptr [RBP + -0x20] XOR EAX,EAX CMP byte ptr [RCX],0x0 MOV byte ptr [RBP + -0x31],AL JNZ 0x00138714 CMP qword ptr [RBP + -0x18],0x0 SETNZ AL MOV byte ptr [RBP + -0x31],AL LAB_00138714: MOV DL,byte ptr [RBP + -0x31] MOV EAX,0x1 XOR ECX,ECX TEST DL,0x1 CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x4],EAX JMP 0x00138743 LAB_00138729: JMP 0x0013872b LAB_0013872b: MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x10 MOV qword ptr [RBP + -0x30],RAX JMP 0x001386b6 LAB_0013873c: MOV dword ptr [RBP + -0x4],0x0 LAB_00138743: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
uint my_wc_mb_8bit(long param_1,ulong param_2,char *param_3,char *param_4) { ushort *local_38; uint local_c; if (param_3 < param_4) { for (local_38 = *(ushort **)(param_1 + 0x70); *(long *)(local_38 + 4) != 0; local_38 = local_38 + 8) { if ((*local_38 <= param_2) && (param_2 <= local_38[1])) { *param_3 = *(char *)(*(long *)(local_38 + 4) + (param_2 - *local_38)); return (uint)(*param_3 != '\0' || param_2 == 0); } } local_c = 0; } else { local_c = 0xffffff9b; } return local_c; }
16,823
google::protobuf::internal::InternalMetadata::SetArena(google::protobuf::Arena*, bool)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/metadata_lite.h
void SetArena(Arena* arena, bool is_message_owned) { ptr_ = is_message_owned ? reinterpret_cast<intptr_t>(arena) | kMessageOwnedArenaTagMask : reinterpret_cast<intptr_t>(arena); GOOGLE_DCHECK(!is_message_owned || arena != nullptr); }
O0
c
google::protobuf::internal::InternalMetadata::SetArena(google::protobuf::Arena*, bool): subq $0x88, %rsp movb %dl, %al movq %rdi, 0x80(%rsp) movq %rsi, 0x78(%rsp) andb $0x1, %al movb %al, 0x77(%rsp) movq 0x80(%rsp), %rax movq %rax, 0x18(%rsp) testb $0x1, 0x77(%rsp) je 0xb0d10 movq 0x78(%rsp), %rax orq $0x2, %rax movq %rax, 0x10(%rsp) jmp 0xb0d1a movq 0x78(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x18(%rsp), %rax movq 0x10(%rsp), %rcx movq %rcx, (%rax) xorl %eax, %eax testb $0x1, %al jne 0xb0d32 jmp 0xb0dd2 movb 0x77(%rsp), %al movb $0x0, 0x37(%rsp) testb $0x1, %al je 0xb0d47 cmpq $0x0, 0x78(%rsp) je 0xb0d49 jmp 0xb0d97 leaq 0x304f27(%rip), %rdx # 0x3b5c77 leaq 0x38(%rsp), %rdi movq %rdi, (%rsp) movl $0x3, %esi movl $0x4a, %ecx callq 0x219560 movq (%rsp), %rdi movb $0x1, 0x37(%rsp) leaq 0x304f68(%rip), %rsi # 0x3b5ce0 callq 0x218e20 movq %rax, 0x8(%rsp) jmp 0xb0d84 movq 0x8(%rsp), %rsi leaq 0x23(%rsp), %rdi callq 0x218fd0 jmp 0xb0d95 jmp 0xb0d97 testb $0x1, 0x37(%rsp) jne 0xb0da0 jmp 0xb0daa leaq 0x38(%rsp), %rdi callq 0x2195a0 jmp 0xb0d27 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x28(%rsp) movl %eax, 0x24(%rsp) testb $0x1, 0x37(%rsp) jne 0xb0dc6 jmp 0xb0dd0 leaq 0x38(%rsp), %rdi callq 0x2195a0 jmp 0xb0dda addq $0x88, %rsp retq movq 0x28(%rsp), %rdi callq 0x21700 nopw %cs:(%rax,%rax) nop
_ZN6google8protobuf8internal16InternalMetadata8SetArenaEPNS0_5ArenaEb: sub rsp, 88h mov al, dl mov [rsp+88h+var_8], rdi mov [rsp+88h+var_10], rsi and al, 1 mov [rsp+88h+var_11], al mov rax, [rsp+88h+var_8] mov [rsp+88h+var_70], rax test [rsp+88h+var_11], 1 jz short loc_B0D10 mov rax, [rsp+88h+var_10] or rax, 2 mov [rsp+88h+var_78], rax jmp short loc_B0D1A loc_B0D10: mov rax, [rsp+88h+var_10] mov [rsp+88h+var_78], rax loc_B0D1A: mov rax, [rsp+88h+var_70] mov rcx, [rsp+88h+var_78] mov [rax], rcx loc_B0D27: xor eax, eax test al, 1 jnz short loc_B0D32 jmp loc_B0DD2 loc_B0D32: mov al, [rsp+88h+var_11] mov [rsp+88h+var_51], 0 test al, 1 jz short loc_B0D47 cmp [rsp+88h+var_10], 0 jz short loc_B0D49 loc_B0D47: jmp short loc_B0D97 loc_B0D49: lea rdx, aWorkspaceLlm4b_14; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+88h+var_50] mov [rsp+88h+var_88], rdi mov esi, 3 mov ecx, 4Ah ; 'J' call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, [rsp+88h+var_88] mov [rsp+88h+var_51], 1 lea rsi, aCheckFailedIsM; "CHECK failed: !is_message_owned || aren"... call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+88h+var_80], rax jmp short $+2 loc_B0D84: mov rsi, [rsp+88h+var_80] lea rdi, [rsp+88h+var_65] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_B0D95: jmp short $+2 loc_B0D97: test [rsp+88h+var_51], 1 jnz short loc_B0DA0 jmp short loc_B0DAA loc_B0DA0: lea rdi, [rsp+88h+var_50]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_B0DAA: jmp loc_B0D27 mov rcx, rax mov eax, edx mov [rsp+arg_20], rcx mov [rsp+arg_1C], eax test [rsp+arg_2F], 1 jnz short loc_B0DC6 jmp short loc_B0DD0 loc_B0DC6: lea rdi, [rsp+arg_30]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_B0DD0: jmp short loc_B0DDA loc_B0DD2: add rsp, 88h retn loc_B0DDA: mov rdi, [rsp+arg_20] call __Unwind_Resume
long long google::protobuf::internal::InternalMetadata::SetArena( google::protobuf::internal::InternalMetadata *this, unsigned long long a2, char a3) { unsigned long long v4; // [rsp+10h] [rbp-78h] if ( (a3 & 1) != 0 ) v4 = a2 | 2; else v4 = a2; *(_QWORD *)this = v4; return 0LL; }
SetArena: SUB RSP,0x88 MOV AL,DL MOV qword ptr [RSP + 0x80],RDI MOV qword ptr [RSP + 0x78],RSI AND AL,0x1 MOV byte ptr [RSP + 0x77],AL MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x18],RAX TEST byte ptr [RSP + 0x77],0x1 JZ 0x001b0d10 MOV RAX,qword ptr [RSP + 0x78] OR RAX,0x2 MOV qword ptr [RSP + 0x10],RAX JMP 0x001b0d1a LAB_001b0d10: MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x10],RAX LAB_001b0d1a: MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RAX],RCX LAB_001b0d27: XOR EAX,EAX TEST AL,0x1 JNZ 0x001b0d32 JMP 0x001b0dd2 LAB_001b0d32: MOV AL,byte ptr [RSP + 0x77] MOV byte ptr [RSP + 0x37],0x0 TEST AL,0x1 JZ 0x001b0d47 CMP qword ptr [RSP + 0x78],0x0 JZ 0x001b0d49 LAB_001b0d47: JMP 0x001b0d97 LAB_001b0d49: LEA RDX,[0x4b5c77] LEA RDI,[RSP + 0x38] MOV qword ptr [RSP],RDI MOV ESI,0x3 MOV ECX,0x4a CALL 0x00319560 MOV RDI,qword ptr [RSP] MOV byte ptr [RSP + 0x37],0x1 LAB_001b0d71: LEA RSI,[0x4b5ce0] CALL 0x00318e20 MOV qword ptr [RSP + 0x8],RAX JMP 0x001b0d84 LAB_001b0d84: MOV RSI,qword ptr [RSP + 0x8] LEA RDI,[RSP + 0x23] CALL 0x00318fd0 LAB_001b0d93: JMP 0x001b0d95 LAB_001b0d95: JMP 0x001b0d97 LAB_001b0d97: TEST byte ptr [RSP + 0x37],0x1 JNZ 0x001b0da0 JMP 0x001b0daa LAB_001b0da0: LEA RDI,[RSP + 0x38] CALL 0x003195a0 LAB_001b0daa: JMP 0x001b0d27 LAB_001b0dd2: ADD RSP,0x88 RET
/* WARNING: Removing unreachable block (ram,0x001b0d32) */ /* WARNING: Removing unreachable block (ram,0x001b0d3f) */ /* WARNING: Removing unreachable block (ram,0x001b0d47) */ /* WARNING: Removing unreachable block (ram,0x001b0d49) */ /* WARNING: Removing unreachable block (ram,0x001b0d97) */ /* WARNING: Removing unreachable block (ram,0x001b0da0) */ /* WARNING: Removing unreachable block (ram,0x001b0d9e) */ /* WARNING: Removing unreachable block (ram,0x001b0daa) */ /* google::protobuf::internal::InternalMetadata::SetArena(google::protobuf::Arena*, bool) */ void __thiscall google::protobuf::internal::InternalMetadata::SetArena (InternalMetadata *this,Arena *param_1,bool param_2) { Arena *local_78; local_78 = param_1; if (param_2) { local_78 = (Arena *)((ulong)param_1 | 2); } *(Arena **)this = local_78; return; }
16,824
stbi__at_eof(stbi__context*)
monkey531[P]llama/examples/llava/../../common/stb_image.h
stbi_inline static int stbi__at_eof(stbi__context *s) { if (s->io.read) { if (!(s->io.eof)(s->io_user_data)) return 0; // if feof() is true, check if buffer = end // special case: we've only got the special 0 character at the end if (s->read_from_callbacks == 0) return 1; } return s->img_buffer >= s->img_buffer_end; }
O2
c
stbi__at_eof(stbi__context*): pushq %rbx movq %rdi, %rbx cmpq $0x0, 0x10(%rdi) je 0x3f36c movq 0x28(%rbx), %rdi callq *0x20(%rbx) testl %eax, %eax je 0x3f381 cmpl $0x0, 0x30(%rbx) je 0x3f385 movq 0xc0(%rbx), %rcx xorl %eax, %eax cmpq 0xc8(%rbx), %rcx setae %al jmp 0x3f388 xorl %eax, %eax jmp 0x3f388 pushq $0x1 popq %rax popq %rbx retq
_ZL12stbi__at_eofP13stbi__context: push rbx mov rbx, rdi cmp qword ptr [rdi+10h], 0 jz short loc_3F36C mov rdi, [rbx+28h] call qword ptr [rbx+20h] test eax, eax jz short loc_3F381 cmp dword ptr [rbx+30h], 0 jz short loc_3F385 loc_3F36C: mov rcx, [rbx+0C0h] xor eax, eax cmp rcx, [rbx+0C8h] setnb al jmp short loc_3F388 loc_3F381: xor eax, eax jmp short loc_3F388 loc_3F385: push 1 pop rax loc_3F388: pop rbx retn
long long stbi__at_eof(long long a1) { if ( !*(_QWORD *)(a1 + 16) ) return *(_QWORD *)(a1 + 192) >= *(_QWORD *)(a1 + 200); if ( !(*(unsigned int ( **)(_QWORD))(a1 + 32))(*(_QWORD *)(a1 + 40)) ) return 0LL; if ( *(_DWORD *)(a1 + 48) ) return *(_QWORD *)(a1 + 192) >= *(_QWORD *)(a1 + 200); return 1LL; }
stbi__at_eof: PUSH RBX MOV RBX,RDI CMP qword ptr [RDI + 0x10],0x0 JZ 0x0013f36c MOV RDI,qword ptr [RBX + 0x28] CALL qword ptr [RBX + 0x20] TEST EAX,EAX JZ 0x0013f381 CMP dword ptr [RBX + 0x30],0x0 JZ 0x0013f385 LAB_0013f36c: MOV RCX,qword ptr [RBX + 0xc0] XOR EAX,EAX CMP RCX,qword ptr [RBX + 0xc8] SETNC AL JMP 0x0013f388 LAB_0013f381: XOR EAX,EAX JMP 0x0013f388 LAB_0013f385: PUSH 0x1 POP RAX LAB_0013f388: POP RBX RET
/* stbi__at_eof(stbi__context*) */ bool stbi__at_eof(stbi__context *param_1) { int iVar1; if (*(long *)(param_1 + 0x10) != 0) { iVar1 = (**(code **)(param_1 + 0x20))(*(int8 *)(param_1 + 0x28)); if (iVar1 == 0) { return false; } if (*(int *)(param_1 + 0x30) == 0) { return true; } } return *(ulong *)(param_1 + 200) <= *(ulong *)(param_1 + 0xc0); }
16,825
FileWriterText::FileWriterText(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)
shubhamoy[P]dir2txt/src/FileWriterText.cpp
FileWriterText::FileWriterText(const std::string& outputFile, bool stripComments) : stripComments(stripComments) { out.open(outputFile); if (!out) { std::cerr << "❌ Failed to open output file: " << outputFile << std::endl; std::exit(1); } }
O2
cpp
FileWriterText::FileWriterText(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %edx, %ebp movq %rsi, %r14 movq %rdi, %r15 leaq 0x2d356(%rip), %rax # 0x4fad0 movq %rax, (%rdi) leaq 0x8(%rdi), %rbx movq %rbx, %rdi callq 0x85c0 movb %bpl, 0x208(%r15) pushq $0x10 popq %rdx movq %rbx, %rdi movq %r14, %rsi callq 0x81e0 movq (%rbx), %rax movq -0x18(%rax), %rax testb $0x5, 0x20(%rbx,%rax) jne 0x227b7 addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq 0x2d822(%rip), %rdi # 0x4ffe0 leaq 0xe72a(%rip), %rsi # 0x30eef callq 0x8390 movq %rax, %rdi movq %r14, %rsi callq 0x8370 movq %rax, %rdi callq 0x81f0 pushq $0x1 popq %rdi callq 0x8460 movq %rax, %r14 movq %rbx, %rdi callq 0x8530 movq %r14, %rdi callq 0x85e0
_ZN14FileWriterTextC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb: push rbp; Alternative name is 'FileWriterText::FileWriterText(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)' push r15 push r14 push rbx push rax mov ebp, edx mov r14, rsi mov r15, rdi lea rax, off_4FAD0 mov [rdi], rax lea rbx, [rdi+8] mov rdi, rbx call __ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev; std::ofstream::basic_ofstream(void) mov [r15+208h], bpl push 10h pop rdx mov rdi, rbx mov rsi, r14 call __ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode; std::ofstream::open(std::string const&,std::_Ios_Openmode) mov rax, [rbx] mov rax, [rax-18h] test byte ptr [rbx+rax+20h], 5 jnz short loc_227B7 add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_227B7: mov rdi, cs:_ZSt4cerr_ptr lea rsi, unk_30EEF call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rdi, rax mov rsi, r14 call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov rdi, rax call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &) push 1 pop rdi call _exit mov r14, rax mov rdi, rbx call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream() mov rdi, r14 call __Unwind_Resume
long long FileWriterText::FileWriterText(long long a1, long long a2, char a3) { long long v4; // rdx long long result; // rax long long v6; // rax long long v7; // rax *(_QWORD *)a1 = off_4FAD0; std::ofstream::basic_ofstream(a1 + 8); *(_BYTE *)(a1 + 520) = a3; std::ofstream::open(a1 + 8, a2, 16LL); result = *(_QWORD *)(*(_QWORD *)(a1 + 8) - 24LL); if ( (*(_BYTE *)(a1 + 8 + result + 32) & 5) != 0 ) { v6 = std::operator<<<std::char_traits<char>>(&std::cerr, &unk_30EEF, v4); v7 = std::operator<<<char>(v6, a2); std::endl<char,std::char_traits<char>>(v7); exit(1LL); } return result; }
FileWriterText: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBP,EDX MOV R14,RSI MOV R15,RDI LEA RAX,[0x14fad0] MOV qword ptr [RDI],RAX LEA RBX,[RDI + 0x8] MOV RDI,RBX CALL 0x001085c0 MOV byte ptr [R15 + 0x208],BPL LAB_00122790: PUSH 0x10 POP RDX MOV RDI,RBX MOV RSI,R14 CALL 0x001081e0 MOV RAX,qword ptr [RBX] MOV RAX,qword ptr [RAX + -0x18] TEST byte ptr [RBX + RAX*0x1 + 0x20],0x5 JNZ 0x001227b7 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_001227b7: MOV RDI,qword ptr [0x0014ffe0] LEA RSI,[0x130eef] CALL 0x00108390 MOV RDI,RAX MOV RSI,R14 CALL 0x00108370 MOV RDI,RAX CALL 0x001081f0 LAB_001227dd: PUSH 0x1 POP RDI CALL 0x00108460
/* FileWriterText::FileWriterText(std::__cxx11::string const&, bool) */ void __thiscall FileWriterText::FileWriterText(FileWriterText *this,string *param_1,bool param_2) { ofstream *this_00; ostream *poVar1; *(int ***)this = &PTR__FileWriterText_0014fad0; this_00 = (ofstream *)(this + 8); std::ofstream::ofstream(this_00); this[0x208] = (FileWriterText)param_2; /* try { // try from 00122790 to 001227dc has its CatchHandler @ 001227e5 */ std::ofstream::open(this_00,param_1,0x10); if (((byte)this[*(long *)(*(long *)this_00 + -0x18) + 0x28] & 5) == 0) { return; } poVar1 = std::operator<<((ostream *)PTR_cerr_0014ffe0,&DAT_00130eef); poVar1 = std::operator<<(poVar1,param_1); std::endl<char,std::char_traits<char>>(poVar1); /* WARNING: Subroutine does not return */ exit(1); }
16,826
mysql_local_infile_init
eloqsql/libmariadb/libmariadb/ma_loaddata.c
static int mysql_local_infile_init(void **ptr, const char *filename, void *userdata) { MYSQL_INFILE_INFO *info; MYSQL *mysql= (MYSQL *)userdata; info = (MYSQL_INFILE_INFO *)malloc(sizeof(MYSQL_INFILE_INFO)); if (!info) { return(1); } memset(info, 0, sizeof(MYSQL_INFILE_INFO)); *ptr = info; info->filename = filename; info->fp= ma_open(filename, "rb", mysql); if (!info->fp) { /* error handling is done via mysql_local_infile_error function, so we need to copy error to info */ if (mysql_errno(mysql) && !info->error_no) { info->error_no= mysql_errno(mysql); ma_strmake(info->error_msg, mysql_error(mysql), MYSQL_ERRMSG_SIZE); } else { info->error_no = errno; snprintf((char *)info->error_msg, sizeof(info->error_msg), CER(CR_FILE_NOT_FOUND), filename, info->error_no); } return(1); } return(0); }
O3
c
mysql_local_infile_init: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %r13 movl $0x1, %edi movl $0x218, %esi # imm = 0x218 callq 0x132e0 movl $0x1, %r12d testq %rax, %rax je 0x24f29 movq %rax, %rbx movq %rax, (%r13) movq %r14, 0x210(%rax) leaq 0x1466f(%rip), %rsi # 0x39503 movq %r14, %rdi movq %r15, %rdx callq 0x2a040 movq %rax, (%rbx) xorl %r12d, %r12d testq %rax, %rax jne 0x24f29 movq %r15, %rdi callq 0x1ea69 testl %eax, %eax je 0x24ebc cmpl $0x0, 0x8(%rbx) je 0x24efc callq 0x13060 movl (%rax), %eax movl %eax, 0x8(%rbx) addq $0xc, %rbx leaq 0x28f4f(%rip), %rcx # 0x4de20 movq 0x20(%rcx), %r8 movl %eax, (%rsp) movl $0x1, %r12d movl $0x201, %esi # imm = 0x201 movl $0x201, %ecx # imm = 0x201 movq %rbx, %rdi movl $0x1, %edx movq %r14, %r9 xorl %eax, %eax callq 0x132c0 jmp 0x24f29 movq %r15, %rdi callq 0x1ea69 movl %eax, 0x8(%rbx) addq $0xc, %rbx movq %r15, %rdi callq 0x1ea7e movl $0x200, %edx # imm = 0x200 movq %rbx, %rdi movq %rax, %rsi callq 0x275c3 movl $0x1, %r12d movl %r12d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
mysql_local_infile_init: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r15, rdx mov r14, rsi mov r13, rdi mov edi, 1 mov esi, 218h call _calloc mov r12d, 1 test rax, rax jz loc_24F29 mov rbx, rax mov [r13+0], rax mov [rax+210h], r14 lea rsi, aRb; "rb" mov rdi, r14 mov rdx, r15 call ma_open mov [rbx], rax xor r12d, r12d test rax, rax jnz short loc_24F29 mov rdi, r15 call mysql_errno test eax, eax jz short loc_24EBC cmp dword ptr [rbx+8], 0 jz short loc_24EFC loc_24EBC: call ___errno_location mov eax, [rax] mov [rbx+8], eax add rbx, 0Ch lea rcx, mariadb_client_errors mov r8, [rcx+20h] mov [rsp+30h+var_30], eax mov r12d, 1 mov esi, 201h mov ecx, 201h mov rdi, rbx mov edx, 1 mov r9, r14 xor eax, eax call ___snprintf_chk jmp short loc_24F29 loc_24EFC: mov rdi, r15 call mysql_errno mov [rbx+8], eax add rbx, 0Ch mov rdi, r15 call mysql_error mov edx, 200h mov rdi, rbx mov rsi, rax call ma_strmake mov r12d, 1 loc_24F29: mov eax, r12d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long mysql_local_infile_init(long long *a1, long long a2, long long a3) { long long v3; // rax long long v5; // rax unsigned int v6; // r12d long long v7; // rbx long long v8; // rax int v9; // eax char *v10; // rax long long v12; // [rsp+0h] [rbp-30h] HIDWORD(v12) = HIDWORD(v3); v5 = calloc(1LL, 536LL); v6 = 1; if ( v5 ) { v7 = v5; *a1 = v5; *(_QWORD *)(v5 + 528) = a2; v8 = ma_open(a2, "rb", a3); *(_QWORD *)v7 = v8; v6 = 0; if ( !v8 ) { if ( (unsigned int)mysql_errno(a3) && !*(_DWORD *)(v7 + 8) ) { *(_DWORD *)(v7 + 8) = mysql_errno(a3); v10 = mysql_error(a3); ma_strmake(v7 + 12, v10, 512LL); return 1; } else { v9 = *(_DWORD *)__errno_location(a3); *(_DWORD *)(v7 + 8) = v9; LODWORD(v12) = v9; v6 = 1; __snprintf_chk(v7 + 12, 513LL, 1LL, 513LL, mariadb_client_errors[4], a2, v12); } } } return v6; }
mysql_local_infile_init: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R15,RDX MOV R14,RSI MOV R13,RDI MOV EDI,0x1 MOV ESI,0x218 CALL 0x001132e0 MOV R12D,0x1 TEST RAX,RAX JZ 0x00124f29 MOV RBX,RAX MOV qword ptr [R13],RAX MOV qword ptr [RAX + 0x210],R14 LEA RSI,[0x139503] MOV RDI,R14 MOV RDX,R15 CALL 0x0012a040 MOV qword ptr [RBX],RAX XOR R12D,R12D TEST RAX,RAX JNZ 0x00124f29 MOV RDI,R15 CALL 0x0011ea69 TEST EAX,EAX JZ 0x00124ebc CMP dword ptr [RBX + 0x8],0x0 JZ 0x00124efc LAB_00124ebc: CALL 0x00113060 MOV EAX,dword ptr [RAX] MOV dword ptr [RBX + 0x8],EAX ADD RBX,0xc LEA RCX,[0x14de20] MOV R8,qword ptr [RCX + 0x20] MOV dword ptr [RSP],EAX MOV R12D,0x1 MOV ESI,0x201 MOV ECX,0x201 MOV RDI,RBX MOV EDX,0x1 MOV R9,R14 XOR EAX,EAX CALL 0x001132c0 JMP 0x00124f29 LAB_00124efc: MOV RDI,R15 CALL 0x0011ea69 MOV dword ptr [RBX + 0x8],EAX ADD RBX,0xc MOV RDI,R15 CALL 0x0011ea7e MOV EDX,0x200 MOV RDI,RBX MOV RSI,RAX CALL 0x001275c3 MOV R12D,0x1 LAB_00124f29: MOV EAX,R12D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 mysql_local_infile_init(int8 *param_1,long param_2,int8 param_3) { int iVar1; int4 uVar2; int8 in_RAX; long *plVar3; long lVar4; int *piVar5; int8 uVar6; uVar2 = (int4)((ulong)in_RAX >> 0x20); plVar3 = (long *)calloc(1,0x218); uVar6 = 1; if (plVar3 != (long *)0x0) { *param_1 = plVar3; plVar3[0x42] = param_2; lVar4 = ma_open(param_2,&DAT_00139503,param_3); *plVar3 = lVar4; uVar6 = 0; if (lVar4 == 0) { iVar1 = mysql_errno(param_3); if ((iVar1 == 0) || ((int)plVar3[1] != 0)) { piVar5 = __errno_location(); iVar1 = *piVar5; *(int *)(plVar3 + 1) = iVar1; uVar6 = 1; __snprintf_chk((long)plVar3 + 0xc,0x201,1,0x201,mariadb_client_errors._32_8_,param_2, CONCAT44(uVar2,iVar1)); } else { uVar2 = mysql_errno(param_3); *(int4 *)(plVar3 + 1) = uVar2; uVar6 = mysql_error(param_3); ma_strmake((long)plVar3 + 0xc,uVar6,0x200); uVar6 = 1; } } } return uVar6; }
16,827
ImPlot::PlotToPixels(double, double, int, int)
zkingston[P]unknot/build_O1/_deps/implot-src/implot.cpp
ImVec2 PlotToPixels(double x, double y, ImAxis x_idx, ImAxis y_idx) { ImPlotContext& gp = *GImPlot; IM_ASSERT_USER_ERROR(gp.CurrentPlot != nullptr, "PlotToPixels() needs to be called between BeginPlot() and EndPlot()!"); IM_ASSERT_USER_ERROR(x_idx == IMPLOT_AUTO || (x_idx >= ImAxis_X1 && x_idx < ImAxis_Y1), "X-Axis index out of bounds!"); IM_ASSERT_USER_ERROR(y_idx == IMPLOT_AUTO || (y_idx >= ImAxis_Y1 && y_idx < ImAxis_COUNT), "Y-Axis index out of bounds!"); SetupLock(); ImPlotPlot& plot = *gp.CurrentPlot; ImPlotAxis& x_axis = x_idx == IMPLOT_AUTO ? plot.Axes[plot.CurrentX] : plot.Axes[x_idx]; ImPlotAxis& y_axis = y_idx == IMPLOT_AUTO ? plot.Axes[plot.CurrentY] : plot.Axes[y_idx]; return ImVec2( x_axis.PlotToPixels(x), y_axis.PlotToPixels(y) ); }
O1
cpp
ImPlot::PlotToPixels(double, double, int, int): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x48, %rsp movl %esi, %ebx movl %edi, %r14d movapd %xmm1, (%rsp) movapd %xmm0, 0x10(%rsp) movq 0x27691e(%rip), %r15 # 0x336ca0 cmpq $0x0, 0x50(%r15) jne 0xc0395 leaq 0x1d4e42(%rip), %rdi # 0x2951d2 callq 0x2161f4 leal 0x1(%r14), %eax cmpl $0x4, %eax jae 0xc0543 leal 0x1(%rbx), %eax cmpl $0x6, %eax ja 0xc0554 movl $0x71, %ecx btl %eax, %ecx jae 0xc0554 movq 0x2768dd(%rip), %r12 # 0x336ca0 movq 0x50(%r12), %rax cmpb $0x0, 0x9de(%rax) jne 0xc03d6 callq 0xb930f movq 0x50(%r12), %rax movb $0x1, 0x9de(%rax) movq 0x50(%r15), %rax leaq 0x18(%rax), %r15 cmpl $-0x1, %r14d jne 0xc03f7 movl 0x978(%rax), %r14d movslq %r14d, %rcx imulq $0x178, %rcx, %r14 # imm = 0x178 addq %r15, %r14 cmpl $-0x1, %ebx jne 0xc040f movl 0x97c(%rax), %ebx movslq %ebx, %rax imulq $0x178, %rax, %rax # imm = 0x178 addq %rax, %r15 movq 0xf8(%r14), %rax testq %rax, %rax je 0xc0473 movq 0x108(%r14), %rdi movapd 0x10(%rsp), %xmm0 callq *%rax movsd 0x118(%r14), %xmm1 subsd %xmm1, %xmm0 movsd 0x120(%r14), %xmm2 subsd %xmm1, %xmm2 divsd %xmm2, %xmm0 movsd 0x10(%r14), %xmm1 movsd 0x18(%r14), %xmm2 subsd %xmm1, %xmm2 mulsd %xmm0, %xmm2 addsd %xmm1, %xmm2 movapd %xmm2, 0x10(%rsp) movapd (%rsp), %xmm0 movss 0x110(%r14), %xmm4 movsd 0x128(%r14), %xmm2 movsd 0x10(%r14), %xmm3 movq 0xf8(%r15), %rax testq %rax, %rax je 0xc04ff movq 0x108(%r15), %rdi movapd %xmm2, (%rsp) movapd %xmm3, 0x30(%rsp) movaps %xmm4, 0x20(%rsp) callq *%rax movaps 0x20(%rsp), %xmm4 movapd 0x30(%rsp), %xmm3 movsd 0x118(%r15), %xmm1 subsd %xmm1, %xmm0 movsd 0x120(%r15), %xmm2 subsd %xmm1, %xmm2 divsd %xmm2, %xmm0 movsd 0x10(%r15), %xmm1 movsd 0x18(%r15), %xmm2 subsd %xmm1, %xmm2 mulsd %xmm0, %xmm2 movapd %xmm2, %xmm0 movapd (%rsp), %xmm2 addsd %xmm1, %xmm0 movapd 0x10(%rsp), %xmm1 unpcklpd %xmm0, %xmm1 # xmm1 = xmm1[0],xmm0[0] movss 0x110(%r15), %xmm0 unpcklps %xmm0, %xmm4 # xmm4 = xmm4[0],xmm0[0],xmm4[1],xmm0[1] cvtps2pd %xmm4, %xmm0 movhpd 0x10(%r15), %xmm3 # xmm3 = xmm3[0],mem[0] subpd %xmm3, %xmm1 movhpd 0x128(%r15), %xmm2 # xmm2 = xmm2[0],mem[0] mulpd %xmm1, %xmm2 addpd %xmm0, %xmm2 cvtpd2ps %xmm2, %xmm0 addq $0x48, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq leaq 0x1da2f8(%rip), %rdi # 0x29a842 callq 0x2161f4 jmp 0xc03a2 leaq 0x1da303(%rip), %rdi # 0x29a85e callq 0x2161f4 jmp 0xc03bc
_ZN6ImPlot12PlotToPixelsEddii: push r15 push r14 push r12 push rbx sub rsp, 48h mov ebx, esi mov r14d, edi movapd [rsp+68h+var_68], xmm1 movapd [rsp+68h+var_58], xmm0 mov r15, cs:GImPlot cmp qword ptr [r15+50h], 0 jnz short loc_C0395 lea rdi, aPlottopixelsNe; "PlotToPixels() needs to be called betwe"... call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*) loc_C0395: lea eax, [r14+1] cmp eax, 4 jnb loc_C0543 loc_C03A2: lea eax, [rbx+1] cmp eax, 6 ja loc_C0554 mov ecx, 71h ; 'q' bt ecx, eax jnb loc_C0554 loc_C03BC: mov r12, cs:GImPlot mov rax, [r12+50h] cmp byte ptr [rax+9DEh], 0 jnz short loc_C03D6 call _ZN6ImPlot11SetupFinishEv; ImPlot::SetupFinish(void) loc_C03D6: mov rax, [r12+50h] mov byte ptr [rax+9DEh], 1 mov rax, [r15+50h] lea r15, [rax+18h] cmp r14d, 0FFFFFFFFh jnz short loc_C03F7 mov r14d, [rax+978h] loc_C03F7: movsxd rcx, r14d imul r14, rcx, 178h add r14, r15 cmp ebx, 0FFFFFFFFh jnz short loc_C040F mov ebx, [rax+97Ch] loc_C040F: movsxd rax, ebx imul rax, 178h add r15, rax mov rax, [r14+0F8h] test rax, rax jz short loc_C0473 mov rdi, [r14+108h] movapd xmm0, [rsp+68h+var_58] call rax movsd xmm1, qword ptr [r14+118h] subsd xmm0, xmm1 movsd xmm2, qword ptr [r14+120h] subsd xmm2, xmm1 divsd xmm0, xmm2 movsd xmm1, qword ptr [r14+10h] movsd xmm2, qword ptr [r14+18h] subsd xmm2, xmm1 mulsd xmm2, xmm0 addsd xmm2, xmm1 movapd [rsp+68h+var_58], xmm2 loc_C0473: movapd xmm0, [rsp+68h+var_68] movss xmm4, dword ptr [r14+110h] movsd xmm2, qword ptr [r14+128h] movsd xmm3, qword ptr [r14+10h] mov rax, [r15+0F8h] test rax, rax jz short loc_C04FF mov rdi, [r15+108h] movapd [rsp+68h+var_68], xmm2 movapd [rsp+68h+var_38], xmm3 movaps [rsp+68h+var_48], xmm4 call rax movaps xmm4, [rsp+68h+var_48] movapd xmm3, [rsp+68h+var_38] movsd xmm1, qword ptr [r15+118h] subsd xmm0, xmm1 movsd xmm2, qword ptr [r15+120h] subsd xmm2, xmm1 divsd xmm0, xmm2 movsd xmm1, qword ptr [r15+10h] movsd xmm2, qword ptr [r15+18h] subsd xmm2, xmm1 mulsd xmm2, xmm0 movapd xmm0, xmm2 movapd xmm2, [rsp+68h+var_68] addsd xmm0, xmm1 loc_C04FF: movapd xmm1, [rsp+68h+var_58] unpcklpd xmm1, xmm0 movss xmm0, dword ptr [r15+110h] unpcklps xmm4, xmm0 cvtps2pd xmm0, xmm4 movhpd xmm3, qword ptr [r15+10h] subpd xmm1, xmm3 movhpd xmm2, qword ptr [r15+128h] mulpd xmm2, xmm1 addpd xmm2, xmm0 cvtpd2ps xmm0, xmm2 add rsp, 48h pop rbx pop r12 pop r14 pop r15 retn loc_C0543: lea rdi, aXAxisIndexOutO; "X-Axis index out of bounds!" call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*) jmp loc_C03A2 loc_C0554: lea rdi, aYAxisIndexOutO; "Y-Axis index out of bounds!" call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*) jmp loc_C03BC
__m128 ImPlot::PlotToPixels(ImPlot *this, __m128d a2, __m128d a3, const char *a4) { int v4; // ebx int v5; // r14d ImGui *v6; // r15 int v7; // ecx ImGui *v8; // r12 long long v9; // rax long long v10; // r15 long long v11; // r14 long long v12; // r15 double ( *v13)(_QWORD, double); // rax double v14; // xmm0_8 __m128d v15; // xmm2 __m128d v16; // xmm0 __m128 v17; // xmm4 __m128d v18; // xmm2 __m128d v19; // xmm3 double ( *v20)(_QWORD, double); // rax double v21; // xmm0_8 double v22; // xmm1_8 double v24; // [rsp+0h] [rbp-68h] __m128d v25; // [rsp+10h] [rbp-58h] __m128 v26; // [rsp+20h] [rbp-48h] v4 = (int)a4; v5 = (int)this; v25 = a2; v6 = GImPlot; if ( !*((_QWORD *)GImPlot + 10) ) { this = (ImPlot *)"PlotToPixels() needs to be called between BeginPlot() and EndPlot()!"; ImGui::ErrorLog((ImGui *)"PlotToPixels() needs to be called between BeginPlot() and EndPlot()!", a4); } if ( (unsigned int)(v5 + 1) >= 4 ) { this = (ImPlot *)"X-Axis index out of bounds!"; ImGui::ErrorLog((ImGui *)"X-Axis index out of bounds!", a4); } if ( (unsigned int)((_DWORD)a4 + 1) > 6 || (v7 = 113, !_bittest(&v7, (_DWORD)a4 + 1)) ) { this = (ImPlot *)"Y-Axis index out of bounds!"; ImGui::ErrorLog((ImGui *)"Y-Axis index out of bounds!", a4); } v8 = GImPlot; if ( !*(_BYTE *)(*((_QWORD *)GImPlot + 10) + 2526LL) ) ImPlot::SetupFinish(this, a4); *(_BYTE *)(*((_QWORD *)v8 + 10) + 2526LL) = 1; v9 = *((_QWORD *)v6 + 10); v10 = v9 + 24; if ( v5 == -1 ) v5 = *(_DWORD *)(v9 + 2424); v11 = v10 + 376LL * v5; if ( (_DWORD)a4 == -1 ) v4 = *(_DWORD *)(v9 + 2428); v12 = 376LL * v4 + v10; v13 = *(double ( **)(_QWORD, double))(v11 + 248); if ( v13 ) { v14 = v13(*(_QWORD *)(v11 + 264), a2.m128d_f64[0]); v15 = (__m128d)*(unsigned long long *)(v11 + 24); v15.m128d_f64[0] = (v15.m128d_f64[0] - *(double *)(v11 + 16)) * ((v14 - *(double *)(v11 + 280)) / (*(double *)(v11 + 288) - *(double *)(v11 + 280))) + *(double *)(v11 + 16); v25 = v15; } v16 = a3; v17 = (__m128)*(unsigned int *)(v11 + 272); v18.m128d_f64[0] = *(double *)(v11 + 296); v19.m128d_f64[0] = *(double *)(v11 + 16); v20 = *(double ( **)(_QWORD, double))(v12 + 248); if ( v20 ) { v24 = *(double *)(v11 + 296); v26 = (__m128)*(unsigned int *)(v11 + 272); v21 = v20(*(_QWORD *)(v12 + 264), a3.m128d_f64[0]); v17 = v26; v22 = *(double *)(v12 + 16); v18 = (__m128d)*(unsigned long long *)(v12 + 24); v18.m128d_f64[0] = (v18.m128d_f64[0] - v22) * ((v21 - *(double *)(v12 + 280)) / (*(double *)(v12 + 288) - *(double *)(v12 + 280))); v16 = v18; v18.m128d_f64[0] = v24; v16.m128d_f64[0] = v16.m128d_f64[0] + v22; } v19.m128d_f64[1] = *(double *)(v12 + 16); v18.m128d_f64[1] = *(double *)(v12 + 296); return _mm_cvtpd_ps( _mm_add_pd( _mm_mul_pd(v18, _mm_sub_pd(_mm_unpacklo_pd(v25, v16), v19)), _mm_cvtps_pd(_mm_unpacklo_ps(v17, (__m128)*(unsigned int *)(v12 + 272))))); }
PlotToPixels: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x48 MOV EBX,ESI MOV R14D,EDI MOVAPD xmmword ptr [RSP],XMM1 MOVAPD xmmword ptr [RSP + 0x10],XMM0 MOV R15,qword ptr [0x00436ca0] CMP qword ptr [R15 + 0x50],0x0 JNZ 0x001c0395 LEA RDI,[0x3951d2] CALL 0x003161f4 LAB_001c0395: LEA EAX,[R14 + 0x1] CMP EAX,0x4 JNC 0x001c0543 LAB_001c03a2: LEA EAX,[RBX + 0x1] CMP EAX,0x6 JA 0x001c0554 MOV ECX,0x71 BT ECX,EAX JNC 0x001c0554 LAB_001c03bc: MOV R12,qword ptr [0x00436ca0] MOV RAX,qword ptr [R12 + 0x50] CMP byte ptr [RAX + 0x9de],0x0 JNZ 0x001c03d6 CALL 0x001b930f LAB_001c03d6: MOV RAX,qword ptr [R12 + 0x50] MOV byte ptr [RAX + 0x9de],0x1 MOV RAX,qword ptr [R15 + 0x50] LEA R15,[RAX + 0x18] CMP R14D,-0x1 JNZ 0x001c03f7 MOV R14D,dword ptr [RAX + 0x978] LAB_001c03f7: MOVSXD RCX,R14D IMUL R14,RCX,0x178 ADD R14,R15 CMP EBX,-0x1 JNZ 0x001c040f MOV EBX,dword ptr [RAX + 0x97c] LAB_001c040f: MOVSXD RAX,EBX IMUL RAX,RAX,0x178 ADD R15,RAX MOV RAX,qword ptr [R14 + 0xf8] TEST RAX,RAX JZ 0x001c0473 MOV RDI,qword ptr [R14 + 0x108] MOVAPD XMM0,xmmword ptr [RSP + 0x10] CALL RAX MOVSD XMM1,qword ptr [R14 + 0x118] SUBSD XMM0,XMM1 MOVSD XMM2,qword ptr [R14 + 0x120] SUBSD XMM2,XMM1 DIVSD XMM0,XMM2 MOVSD XMM1,qword ptr [R14 + 0x10] MOVSD XMM2,qword ptr [R14 + 0x18] SUBSD XMM2,XMM1 MULSD XMM2,XMM0 ADDSD XMM2,XMM1 MOVAPD xmmword ptr [RSP + 0x10],XMM2 LAB_001c0473: MOVAPD XMM0,xmmword ptr [RSP] MOVSS XMM4,dword ptr [R14 + 0x110] MOVSD XMM2,qword ptr [R14 + 0x128] MOVSD XMM3,qword ptr [R14 + 0x10] MOV RAX,qword ptr [R15 + 0xf8] TEST RAX,RAX JZ 0x001c04ff MOV RDI,qword ptr [R15 + 0x108] MOVAPD xmmword ptr [RSP],XMM2 MOVAPD xmmword ptr [RSP + 0x30],XMM3 MOVAPS xmmword ptr [RSP + 0x20],XMM4 CALL RAX MOVAPS XMM4,xmmword ptr [RSP + 0x20] MOVAPD XMM3,xmmword ptr [RSP + 0x30] MOVSD XMM1,qword ptr [R15 + 0x118] SUBSD XMM0,XMM1 MOVSD XMM2,qword ptr [R15 + 0x120] SUBSD XMM2,XMM1 DIVSD XMM0,XMM2 MOVSD XMM1,qword ptr [R15 + 0x10] MOVSD XMM2,qword ptr [R15 + 0x18] SUBSD XMM2,XMM1 MULSD XMM2,XMM0 MOVAPD XMM0,XMM2 MOVAPD XMM2,xmmword ptr [RSP] ADDSD XMM0,XMM1 LAB_001c04ff: MOVAPD XMM1,xmmword ptr [RSP + 0x10] UNPCKLPD XMM1,XMM0 MOVSS XMM0,dword ptr [R15 + 0x110] UNPCKLPS XMM4,XMM0 CVTPS2PD XMM0,XMM4 MOVHPD XMM3,qword ptr [R15 + 0x10] SUBPD XMM1,XMM3 MOVHPD XMM2,qword ptr [R15 + 0x128] MULPD XMM2,XMM1 ADDPD XMM2,XMM0 CVTPD2PS XMM0,XMM2 ADD RSP,0x48 POP RBX POP R12 POP R14 POP R15 RET LAB_001c0543: LEA RDI,[0x39a842] CALL 0x003161f4 JMP 0x001c03a2 LAB_001c0554: LEA RDI,[0x39a85e] CALL 0x003161f4 JMP 0x001c03bc
/* ImPlot::PlotToPixels(double, double, int, int) */ int8 ImPlot::PlotToPixels(double param_1,double param_2,int param_3,int param_4) { float fVar1; double dVar2; double dVar3; double dVar4; long lVar5; long lVar6; double local_58; lVar6 = GImPlot; if (*(long *)(GImPlot + 0x50) == 0) { ImGui::ErrorLog("PlotToPixels() needs to be called between BeginPlot() and EndPlot()!"); } if (3 < param_3 + 1U) { ImGui::ErrorLog("X-Axis index out of bounds!"); } if ((6 < param_4 + 1U) || ((0x71U >> (param_4 + 1U & 0x1f) & 1) == 0)) { ImGui::ErrorLog("Y-Axis index out of bounds!"); } lVar5 = GImPlot; if (*(char *)(*(long *)(GImPlot + 0x50) + 0x9de) == '\0') { SetupFinish(); } *(int1 *)(*(long *)(lVar5 + 0x50) + 0x9de) = 1; lVar6 = *(long *)(lVar6 + 0x50); if (param_3 == -1) { param_3 = *(int *)(lVar6 + 0x978); } lVar5 = (long)param_3 * 0x178 + lVar6 + 0x18; if (param_4 == -1) { param_4 = *(int *)(lVar6 + 0x97c); } lVar6 = lVar6 + 0x18 + (long)param_4 * 0x178; local_58 = param_1; if (*(code **)(lVar5 + 0xf8) != (code *)0x0) { local_58._0_4_ = SUB84(param_1,0); dVar3 = (double)(**(code **)(lVar5 + 0xf8))(local_58._0_4_,*(int8 *)(lVar5 + 0x108)); local_58 = (*(double *)(lVar5 + 0x18) - *(double *)(lVar5 + 0x10)) * ((dVar3 - *(double *)(lVar5 + 0x118)) / (*(double *)(lVar5 + 0x120) - *(double *)(lVar5 + 0x118))) + *(double *)(lVar5 + 0x10); } fVar1 = *(float *)(lVar5 + 0x110); dVar3 = *(double *)(lVar5 + 0x128); dVar2 = *(double *)(lVar5 + 0x10); if (*(code **)(lVar6 + 0xf8) != (code *)0x0) { dVar4 = (double)(**(code **)(lVar6 + 0xf8))(*(int8 *)(lVar6 + 0x108)); param_2 = (*(double *)(lVar6 + 0x18) - *(double *)(lVar6 + 0x10)) * ((dVar4 - *(double *)(lVar6 + 0x118)) / (*(double *)(lVar6 + 0x120) - *(double *)(lVar6 + 0x118))) + *(double *)(lVar6 + 0x10) ; } return CONCAT44((float)(*(double *)(lVar6 + 0x128) * (param_2 - *(double *)(lVar6 + 0x10)) + (double)*(float *)(lVar6 + 0x110)), (float)(dVar3 * (local_58 - dVar2) + (double)fVar1)); }
16,828
nglog::LogDestination::SetLoggerImpl(nglog::base::Logger*)
ng-log[P]ng-log/src/logging.cc
void LogDestination::SetLoggerImpl(base::Logger* logger) { if (logger_ == logger) { // Prevent releasing currently held sink on reset return; } if (logger_ && logger_ != &fileobject_) { // Delete user-specified logger set via SetLogger(). delete logger_; } logger_ = logger; }
O3
cpp
nglog::LogDestination::SetLoggerImpl(nglog::base::Logger*): pushq %r14 pushq %rbx pushq %rax movq %rdi, %r14 movq 0xc8(%rdi), %rdi cmpq %rsi, %rdi je 0xa789 movq %rsi, %rbx testq %rdi, %rdi sete %al cmpq %r14, %rdi sete %cl orb %al, %cl jne 0xa782 movq (%rdi), %rax callq *0x8(%rax) movq %rbx, 0xc8(%r14) addq $0x8, %rsp popq %rbx popq %r14 retq nop
_ZN5nglog14LogDestination13SetLoggerImplEPNS_4base6LoggerE: push r14 push rbx push rax mov r14, rdi mov rdi, [rdi+0C8h] cmp rdi, rsi jz short loc_A789 mov rbx, rsi test rdi, rdi setz al cmp rdi, r14 setz cl or cl, al jnz short loc_A782 mov rax, [rdi] call qword ptr [rax+8] loc_A782: mov [r14+0C8h], rbx loc_A789: add rsp, 8 pop rbx pop r14 retn
char nglog::LogDestination::SetLoggerImpl(nglog::LogDestination *this, nglog::base::Logger *a2) { nglog::base::Logger *v3; // rdi char result; // al v3 = (nglog::base::Logger *)*((_QWORD *)this + 25); if ( v3 != a2 ) { result = v3 == 0LL; if ( v3 != 0LL && v3 != this ) result = (*(long long ( **)(nglog::base::Logger *))(*(_QWORD *)v3 + 8LL))(v3); *((_QWORD *)this + 25) = a2; } return result; }
SetLoggerImpl: PUSH R14 PUSH RBX PUSH RAX MOV R14,RDI MOV RDI,qword ptr [RDI + 0xc8] CMP RDI,RSI JZ 0x0010a789 MOV RBX,RSI TEST RDI,RDI SETZ AL CMP RDI,R14 SETZ CL OR CL,AL JNZ 0x0010a782 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_0010a782: MOV qword ptr [R14 + 0xc8],RBX LAB_0010a789: ADD RSP,0x8 POP RBX POP R14 RET
/* nglog::LogDestination::SetLoggerImpl(nglog::base::Logger*) */ void __thiscall nglog::LogDestination::SetLoggerImpl(LogDestination *this,Logger *param_1) { Logger *pLVar1; pLVar1 = *(Logger **)(this + 200); if (pLVar1 != param_1) { if (pLVar1 != (Logger *)this && pLVar1 != (Logger *)0x0) { (**(code **)(*(long *)pLVar1 + 8))(); } *(Logger **)(this + 200) = param_1; } return; }
16,829
mi_rec_pos
eloqsql/storage/myisam/mi_search.c
my_off_t _mi_rec_pos(MYISAM_SHARE *s, uchar *ptr) { my_off_t pos; switch (s->rec_reflength) { #if SIZEOF_OFF_T > 4 case 8: pos= (my_off_t) mi_uint8korr(ptr); if (pos == HA_OFFSET_ERROR) return HA_OFFSET_ERROR; /* end of list */ break; case 7: pos= (my_off_t) mi_uint7korr(ptr); if (pos == (((my_off_t) 1) << 56) -1) return HA_OFFSET_ERROR; /* end of list */ break; case 6: pos= (my_off_t) mi_uint6korr(ptr); if (pos == (((my_off_t) 1) << 48) -1) return HA_OFFSET_ERROR; /* end of list */ break; case 5: pos= (my_off_t) mi_uint5korr(ptr); if (pos == (((my_off_t) 1) << 40) -1) return HA_OFFSET_ERROR; /* end of list */ break; #else case 8: case 7: case 6: case 5: ptr+= (s->rec_reflength-4); /* fall through */ #endif case 4: pos= (my_off_t) mi_uint4korr(ptr); if (pos == (my_off_t) (uint32) ~0L) return HA_OFFSET_ERROR; break; case 3: pos= (my_off_t) mi_uint3korr(ptr); if (pos == (my_off_t) (1 << 24) -1) return HA_OFFSET_ERROR; break; case 2: pos= (my_off_t) mi_uint2korr(ptr); if (pos == (my_off_t) (1 << 16) -1) return HA_OFFSET_ERROR; break; default: abort(); /* Impossible */ } return ((s->options & (HA_OPTION_PACK_RECORD | HA_OPTION_COMPRESS_RECORD)) ? pos : pos*s->base.pack_reclength); }
O0
c
mi_rec_pos: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movl 0x338(%rax), %eax addl $-0x2, %eax movl %eax, %ecx movq %rcx, -0x28(%rbp) subl $0x6, %eax ja 0xc0804 movq -0x28(%rbp), %rax leaq 0x98d1d(%rip), %rcx # 0x159344 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x18(%rbp), %rax movzbl 0x7(%rax), %eax movq -0x18(%rbp), %rcx movzbl 0x6(%rcx), %ecx shll $0x8, %ecx orl %ecx, %eax movq -0x18(%rbp), %rcx movzbl 0x5(%rcx), %ecx shll $0x10, %ecx orl %ecx, %eax movq -0x18(%rbp), %rcx movzbl 0x4(%rcx), %ecx shll $0x18, %ecx orl %ecx, %eax movl %eax, %eax movq -0x18(%rbp), %rcx movzbl 0x3(%rcx), %ecx movq -0x18(%rbp), %rdx movzbl 0x2(%rdx), %edx shll $0x8, %edx orl %edx, %ecx movq -0x18(%rbp), %rdx movzbl 0x1(%rdx), %edx shll $0x10, %edx orl %edx, %ecx movq -0x18(%rbp), %rdx movzbl (%rdx), %edx shll $0x18, %edx orl %edx, %ecx movl %ecx, %ecx shlq $0x20, %rcx orq %rcx, %rax movq %rax, -0x20(%rbp) cmpq $-0x1, -0x20(%rbp) jne 0xc06b0 movq $-0x1, -0x8(%rbp) jmp 0xc0844 jmp 0xc0809 movq -0x18(%rbp), %rdi callq 0xc0270 movq %rax, -0x20(%rbp) movabsq $0xffffffffffffff, %rax # imm = 0xFFFFFFFFFFFFFF cmpq %rax, -0x20(%rbp) jne 0xc06df movq $-0x1, -0x8(%rbp) jmp 0xc0844 jmp 0xc0809 movq -0x18(%rbp), %rdi callq 0xc02d0 movq %rax, -0x20(%rbp) movabsq $0xffffffffffff, %rax # imm = 0xFFFFFFFFFFFF cmpq %rax, -0x20(%rbp) jne 0xc070e movq $-0x1, -0x8(%rbp) jmp 0xc0844 jmp 0xc0809 movq -0x18(%rbp), %rdi callq 0xc0320 movq %rax, -0x20(%rbp) movabsq $0xffffffffff, %rax # imm = 0xFFFFFFFFFF cmpq %rax, -0x20(%rbp) jne 0xc073d movq $-0x1, -0x8(%rbp) jmp 0xc0844 jmp 0xc0809 movq -0x18(%rbp), %rax movzbl 0x3(%rax), %eax movq -0x18(%rbp), %rcx movzbl 0x2(%rcx), %ecx shll $0x8, %ecx orl %ecx, %eax movq -0x18(%rbp), %rcx movzbl 0x1(%rcx), %ecx shll $0x10, %ecx orl %ecx, %eax movq -0x18(%rbp), %rcx movzbl (%rcx), %ecx shll $0x18, %ecx orl %ecx, %eax movl %eax, %eax movq %rax, -0x20(%rbp) movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpq %rax, -0x20(%rbp) jne 0xc078e movq $-0x1, -0x8(%rbp) jmp 0xc0844 jmp 0xc0809 movq -0x18(%rbp), %rax movzbl 0x2(%rax), %eax movq -0x18(%rbp), %rcx movzbl 0x1(%rcx), %ecx shll $0x8, %ecx orl %ecx, %eax movq -0x18(%rbp), %rcx movzbl (%rcx), %ecx shll $0x10, %ecx orl %ecx, %eax movl %eax, %eax movq %rax, -0x20(%rbp) cmpq $0xffffff, -0x20(%rbp) # imm = 0xFFFFFF jne 0xc07cb movq $-0x1, -0x8(%rbp) jmp 0xc0844 jmp 0xc0809 movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x18(%rbp), %rcx movzbl (%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movzwl %ax, %eax movq %rax, -0x20(%rbp) cmpq $0xffff, -0x20(%rbp) # imm = 0xFFFF jne 0xc0802 movq $-0x1, -0x8(%rbp) jmp 0xc0844 jmp 0xc0809 callq 0x2a5c0 movq -0x10(%rbp), %rax movq 0x318(%rax), %rax andq $0x5, %rax cmpq $0x0, %rax je 0xc0828 movq -0x20(%rbp), %rax movq %rax, -0x30(%rbp) jmp 0xc083c movq -0x20(%rbp), %rax movq -0x10(%rbp), %rcx imulq 0x148(%rcx), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nop
_mi_rec_pos: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] mov eax, [rax+338h] add eax, 0FFFFFFFEh; switch 7 cases mov ecx, eax mov [rbp+var_28], rcx sub eax, 6 ja def_C062E; jumptable 00000000000C062E default case mov rax, [rbp+var_28] lea rcx, jpt_C062E movsxd rax, ds:(jpt_C062E - 159344h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_C0630: mov rax, [rbp+var_18]; jumptable 00000000000C062E case 8 movzx eax, byte ptr [rax+7] mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+6] shl ecx, 8 or eax, ecx mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+5] shl ecx, 10h or eax, ecx mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+4] shl ecx, 18h or eax, ecx mov eax, eax mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+3] mov rdx, [rbp+var_18] movzx edx, byte ptr [rdx+2] shl edx, 8 or ecx, edx mov rdx, [rbp+var_18] movzx edx, byte ptr [rdx+1] shl edx, 10h or ecx, edx mov rdx, [rbp+var_18] movzx edx, byte ptr [rdx] shl edx, 18h or ecx, edx mov ecx, ecx shl rcx, 20h or rax, rcx mov [rbp+var_20], rax cmp [rbp+var_20], 0FFFFFFFFFFFFFFFFh jnz short loc_C06B0 mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh jmp loc_C0844 loc_C06B0: jmp loc_C0809 loc_C06B5: mov rdi, [rbp+var_18]; jumptable 00000000000C062E case 7 call mi_uint7korr_0 mov [rbp+var_20], rax mov rax, 0FFFFFFFFFFFFFFh cmp [rbp+var_20], rax jnz short loc_C06DF mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh jmp loc_C0844 loc_C06DF: jmp loc_C0809 loc_C06E4: mov rdi, [rbp+var_18]; jumptable 00000000000C062E case 6 call mi_uint6korr_0 mov [rbp+var_20], rax mov rax, 0FFFFFFFFFFFFh cmp [rbp+var_20], rax jnz short loc_C070E mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh jmp loc_C0844 loc_C070E: jmp loc_C0809 loc_C0713: mov rdi, [rbp+var_18]; jumptable 00000000000C062E case 5 call mi_uint5korr_0 mov [rbp+var_20], rax mov rax, 0FFFFFFFFFFh cmp [rbp+var_20], rax jnz short loc_C073D mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh jmp loc_C0844 loc_C073D: jmp loc_C0809 loc_C0742: mov rax, [rbp+var_18]; jumptable 00000000000C062E case 4 movzx eax, byte ptr [rax+3] mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+2] shl ecx, 8 or eax, ecx mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+1] shl ecx, 10h or eax, ecx mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx] shl ecx, 18h or eax, ecx mov eax, eax mov [rbp+var_20], rax mov eax, 0FFFFFFFFh cmp [rbp+var_20], rax jnz short loc_C078E mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh jmp loc_C0844 loc_C078E: jmp short loc_C0809 loc_C0790: mov rax, [rbp+var_18]; jumptable 00000000000C062E case 3 movzx eax, byte ptr [rax+2] mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+1] shl ecx, 8 or eax, ecx mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx] shl ecx, 10h or eax, ecx mov eax, eax mov [rbp+var_20], rax cmp [rbp+var_20], 0FFFFFFh jnz short loc_C07CB mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh jmp short loc_C0844 loc_C07CB: jmp short loc_C0809 loc_C07CD: mov rax, [rbp+var_18]; jumptable 00000000000C062E case 2 movzx eax, byte ptr [rax+1] movzx eax, ax mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx] movzx ecx, cx shl ecx, 8 or eax, ecx movzx eax, ax mov [rbp+var_20], rax cmp [rbp+var_20], 0FFFFh jnz short loc_C0802 mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh jmp short loc_C0844 loc_C0802: jmp short loc_C0809 def_C062E: call _abort; jumptable 00000000000C062E default case loc_C0809: mov rax, [rbp+var_10] mov rax, [rax+318h] and rax, 5 cmp rax, 0 jz short loc_C0828 mov rax, [rbp+var_20] mov [rbp+var_30], rax jmp short loc_C083C loc_C0828: mov rax, [rbp+var_20] mov rcx, [rbp+var_10] imul rax, [rcx+148h] mov [rbp+var_30], rax loc_C083C: mov rax, [rbp+var_30] mov [rbp+var_8], rax loc_C0844: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
long long mi_rec_pos(long long a1, unsigned int *a2, long long a3) { unsigned long long v4; // [rsp+0h] [rbp-30h] unsigned long long v5; // [rsp+10h] [rbp-20h] long long v6; // [rsp+28h] [rbp-8h] switch ( *(_DWORD *)(a1 + 824) ) { case 2: v5 = _byteswap_ushort(*(_WORD *)a2); if ( v5 != 0xFFFF ) goto LABEL_24; v6 = -1LL; break; case 3: v5 = (*(unsigned __int8 *)a2 << 16) | (*((unsigned __int8 *)a2 + 1) << 8) | (unsigned int)*((unsigned __int8 *)a2 + 2); if ( v5 != 0xFFFFFF ) goto LABEL_24; v6 = -1LL; break; case 4: v5 = _byteswap_ulong(*a2); if ( v5 != 0xFFFFFFFF ) goto LABEL_24; v6 = -1LL; break; case 5: v5 = mi_uint5korr_0(a2); if ( v5 != 0xFFFFFFFFFFLL ) goto LABEL_24; v6 = -1LL; break; case 6: v5 = mi_uint6korr_0(a2); if ( v5 != 0xFFFFFFFFFFFFLL ) goto LABEL_24; v6 = -1LL; break; case 7: v5 = mi_uint7korr_0(a2); if ( v5 != 0xFFFFFFFFFFFFFFLL ) goto LABEL_24; v6 = -1LL; break; case 8: v5 = ((unsigned long long)_byteswap_ulong(*a2) << 32) | _byteswap_ulong(a2[1]); if ( v5 == -1LL ) { v6 = -1LL; } else { LABEL_24: if ( (*(_QWORD *)(a1 + 792) & 5LL) != 0 ) v4 = v5; else v4 = *(_QWORD *)(a1 + 328) * v5; v6 = v4; } break; default: abort(a1, a2, a3); } return v6; }
_mi_rec_pos: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x338] ADD EAX,-0x2 MOV ECX,EAX MOV qword ptr [RBP + -0x28],RCX SUB EAX,0x6 JA 0x001c0804 MOV RAX,qword ptr [RBP + -0x28] LEA RCX,[0x259344] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_8: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x7] MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x6] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x5] SHL ECX,0x10 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x4] SHL ECX,0x18 OR EAX,ECX MOV EAX,EAX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x3] MOV RDX,qword ptr [RBP + -0x18] MOVZX EDX,byte ptr [RDX + 0x2] SHL EDX,0x8 OR ECX,EDX MOV RDX,qword ptr [RBP + -0x18] MOVZX EDX,byte ptr [RDX + 0x1] SHL EDX,0x10 OR ECX,EDX MOV RDX,qword ptr [RBP + -0x18] MOVZX EDX,byte ptr [RDX] SHL EDX,0x18 OR ECX,EDX MOV ECX,ECX SHL RCX,0x20 OR RAX,RCX MOV qword ptr [RBP + -0x20],RAX CMP qword ptr [RBP + -0x20],-0x1 JNZ 0x001c06b0 MOV qword ptr [RBP + -0x8],-0x1 JMP 0x001c0844 LAB_001c06b0: JMP 0x001c0809 caseD_7: MOV RDI,qword ptr [RBP + -0x18] CALL 0x001c0270 MOV qword ptr [RBP + -0x20],RAX MOV RAX,0xffffffffffffff CMP qword ptr [RBP + -0x20],RAX JNZ 0x001c06df MOV qword ptr [RBP + -0x8],-0x1 JMP 0x001c0844 LAB_001c06df: JMP 0x001c0809 caseD_6: MOV RDI,qword ptr [RBP + -0x18] CALL 0x001c02d0 MOV qword ptr [RBP + -0x20],RAX MOV RAX,0xffffffffffff CMP qword ptr [RBP + -0x20],RAX JNZ 0x001c070e MOV qword ptr [RBP + -0x8],-0x1 JMP 0x001c0844 LAB_001c070e: JMP 0x001c0809 caseD_5: MOV RDI,qword ptr [RBP + -0x18] CALL 0x001c0320 MOV qword ptr [RBP + -0x20],RAX MOV RAX,0xffffffffff CMP qword ptr [RBP + -0x20],RAX JNZ 0x001c073d MOV qword ptr [RBP + -0x8],-0x1 JMP 0x001c0844 LAB_001c073d: JMP 0x001c0809 caseD_4: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x3] MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x10 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX] SHL ECX,0x18 OR EAX,ECX MOV EAX,EAX MOV qword ptr [RBP + -0x20],RAX MOV EAX,0xffffffff CMP qword ptr [RBP + -0x20],RAX JNZ 0x001c078e MOV qword ptr [RBP + -0x8],-0x1 JMP 0x001c0844 LAB_001c078e: JMP 0x001c0809 caseD_3: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x2] MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX] SHL ECX,0x10 OR EAX,ECX MOV EAX,EAX MOV qword ptr [RBP + -0x20],RAX CMP qword ptr [RBP + -0x20],0xffffff JNZ 0x001c07cb MOV qword ptr [RBP + -0x8],-0x1 JMP 0x001c0844 LAB_001c07cb: JMP 0x001c0809 caseD_2: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX MOV qword ptr [RBP + -0x20],RAX CMP qword ptr [RBP + -0x20],0xffff JNZ 0x001c0802 MOV qword ptr [RBP + -0x8],-0x1 JMP 0x001c0844 LAB_001c0802: JMP 0x001c0809 default: CALL 0x0012a5c0 LAB_001c0809: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x318] AND RAX,0x5 CMP RAX,0x0 JZ 0x001c0828 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x30],RAX JMP 0x001c083c LAB_001c0828: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x10] IMUL RAX,qword ptr [RCX + 0x148] MOV qword ptr [RBP + -0x30],RAX LAB_001c083c: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x8],RAX LAB_001c0844: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
ulong _mi_rec_pos(long param_1,int1 *param_2) { ulong local_38; ulong local_28; switch(*(int4 *)(param_1 + 0x338)) { case 2: local_28 = (ulong)CONCAT11(*param_2,param_2[1]); if (local_28 == 0xffff) { return 0xffffffffffffffff; } break; case 3: local_28 = (ulong)CONCAT12(*param_2,CONCAT11(param_2[1],param_2[2])); if (local_28 == 0xffffff) { return 0xffffffffffffffff; } break; case 4: local_28 = (ulong)CONCAT13(*param_2,CONCAT12(param_2[1],CONCAT11(param_2[2],param_2[3]))); if (local_28 == 0xffffffff) { return 0xffffffffffffffff; } break; case 5: local_28 = mi_uint5korr(param_2); if (local_28 == 0xffffffffff) { return 0xffffffffffffffff; } break; case 6: local_28 = mi_uint6korr(param_2); if (local_28 == 0xffffffffffff) { return 0xffffffffffffffff; } break; case 7: local_28 = mi_uint7korr(param_2); if (local_28 == 0xffffffffffffff) { return 0xffffffffffffffff; } break; case 8: local_28 = CONCAT44(CONCAT13(*param_2,CONCAT12(param_2[1],CONCAT11(param_2[2],param_2[3]))), CONCAT13(param_2[4],CONCAT12(param_2[5],CONCAT11(param_2[6],param_2[7])))); if (local_28 == 0xffffffffffffffff) { return 0xffffffffffffffff; } break; default: /* WARNING: Subroutine does not return */ abort(); } if ((*(ulong *)(param_1 + 0x318) & 5) == 0) { local_38 = local_28 * *(long *)(param_1 + 0x148); } else { local_38 = local_28; } return local_38; }
16,830
client_mpvio_write_packet
eloqsql/libmariadb/plugins/auth/my_auth.c
static int client_mpvio_write_packet(struct st_plugin_vio *mpv, const uchar *pkt, size_t pkt_len) { int res; MCPVIO_EXT *mpvio= (MCPVIO_EXT*)mpv; if (mpvio->packets_written == 0) { if (mpvio->mysql_change_user) res= send_change_user_packet(mpvio, pkt, (int)pkt_len); else res= send_client_reply_packet(mpvio, pkt, (int)pkt_len); } else { NET *net= &mpvio->mysql->net; if (mpvio->mysql->thd) res= 1; /* no chit-chat in embedded */ else res= ma_net_write(net, (unsigned char *)pkt, pkt_len) || ma_net_flush(net); } if (res) { /* don't overwrite errors */ if (!mysql_errno(mpvio->mysql)) my_set_error(mpvio->mysql, CR_SERVER_LOST, SQLSTATE_UNKNOWN, ER(CR_SERVER_LOST_EXTENDED), "sending authentication information", errno); } mpvio->packets_written++; return res; }
O0
c
client_mpvio_write_packet: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax cmpl $0x0, 0x44(%rax) jne 0x459a0 movq -0x28(%rbp), %rax cmpb $0x0, 0x48(%rax) je 0x45988 movq -0x28(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rax movl %eax, %edx callq 0x45ad0 movl %eax, -0x1c(%rbp) jmp 0x4599e movq -0x28(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rax movl %eax, %edx callq 0x45d40 movl %eax, -0x1c(%rbp) jmp 0x45a03 movq -0x28(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax movq 0x18(%rax), %rax cmpq $0x0, 0x4d8(%rax) je 0x459c7 movl $0x1, -0x1c(%rbp) jmp 0x45a01 movq -0x30(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x4ba60 movl %eax, %ecx movb $0x1, %al cmpl $0x0, %ecx movb %al, -0x31(%rbp) jne 0x459f6 movq -0x30(%rbp), %rdi callq 0x4b640 cmpl $0x0, %eax setne %al movb %al, -0x31(%rbp) movb -0x31(%rbp), %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x1c(%rbp) jmp 0x45a03 cmpl $0x0, -0x1c(%rbp) je 0x45a70 movq -0x28(%rbp), %rax movq 0x18(%rax), %rdi callq 0x276d0 cmpl $0x0, %eax jne 0x45a6e movq -0x28(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x50(%rbp) leaq 0x21812(%rip), %rax # 0x67240 movq (%rax), %rax movq %rax, -0x48(%rbp) leaq 0x21814(%rip), %rax # 0x67250 movq 0x1b8(%rax), %rax movq %rax, -0x40(%rbp) callq 0x13050 movq -0x50(%rbp), %rdi movq -0x48(%rbp), %rdx movq -0x40(%rbp), %rcx movl (%rax), %r9d movl $0x7dd, %esi # imm = 0x7DD leaq 0xd7d2(%rip), %r8 # 0x53239 movb $0x0, %al callq 0x1bae0 jmp 0x45a70 movq -0x28(%rbp), %rax movl 0x44(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x44(%rax) movl -0x1c(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
client_mpvio_write_packet: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_8] mov [rbp+var_28], rax mov rax, [rbp+var_28] cmp dword ptr [rax+44h], 0 jnz short loc_459A0 mov rax, [rbp+var_28] cmp byte ptr [rax+48h], 0 jz short loc_45988 mov rdi, [rbp+var_28] mov rsi, [rbp+var_10] mov rax, [rbp+var_18] mov edx, eax call send_change_user_packet mov [rbp+var_1C], eax jmp short loc_4599E loc_45988: mov rdi, [rbp+var_28] mov rsi, [rbp+var_10] mov rax, [rbp+var_18] mov edx, eax call send_client_reply_packet mov [rbp+var_1C], eax loc_4599E: jmp short loc_45A03 loc_459A0: mov rax, [rbp+var_28] mov rax, [rax+18h] mov [rbp+var_30], rax mov rax, [rbp+var_28] mov rax, [rax+18h] cmp qword ptr [rax+4D8h], 0 jz short loc_459C7 mov [rbp+var_1C], 1 jmp short loc_45A01 loc_459C7: mov rdi, [rbp+var_30] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] call ma_net_write mov ecx, eax mov al, 1 cmp ecx, 0 mov [rbp+var_31], al jnz short loc_459F6 mov rdi, [rbp+var_30] call ma_net_flush cmp eax, 0 setnz al mov [rbp+var_31], al loc_459F6: mov al, [rbp+var_31] and al, 1 movzx eax, al mov [rbp+var_1C], eax loc_45A01: jmp short $+2 loc_45A03: cmp [rbp+var_1C], 0 jz short loc_45A70 mov rax, [rbp+var_28] mov rdi, [rax+18h] call mysql_errno cmp eax, 0 jnz short loc_45A6E mov rax, [rbp+var_28] mov rax, [rax+18h] mov [rbp+var_50], rax lea rax, SQLSTATE_UNKNOWN mov rax, [rax] mov [rbp+var_48], rax lea rax, client_errors mov rax, [rax+1B8h] mov [rbp+var_40], rax call ___errno_location mov rdi, [rbp+var_50] mov rdx, [rbp+var_48] mov rcx, [rbp+var_40] mov r9d, [rax] mov esi, 7DDh lea r8, aSendingAuthent; "sending authentication information" mov al, 0 call my_set_error loc_45A6E: jmp short $+2 loc_45A70: mov rax, [rbp+var_28] mov ecx, [rax+44h] add ecx, 1 mov [rax+44h], ecx mov eax, [rbp+var_1C] add rsp, 50h pop rbp retn
long long client_mpvio_write_packet(long long a1, long long a2, long long a3) { unsigned int *v3; // rax long long v5; // [rsp+0h] [rbp-50h] char *v6; // [rsp+8h] [rbp-48h] char *v7; // [rsp+10h] [rbp-40h] bool v8; // [rsp+1Fh] [rbp-31h] long long v9; // [rsp+20h] [rbp-30h] unsigned int v10; // [rsp+34h] [rbp-1Ch] if ( *(_DWORD *)(a1 + 68) ) { v9 = *(_QWORD *)(a1 + 24); if ( *(_QWORD *)(v9 + 1240) ) { v10 = 1; } else { v8 = 1; if ( !(unsigned int)ma_net_write(v9, a2, a3) ) v8 = (unsigned int)ma_net_flush(v9) != 0; v10 = v8; } } else if ( *(_BYTE *)(a1 + 72) ) { v10 = send_change_user_packet(a1, a2, (unsigned int)a3); } else { v10 = send_client_reply_packet(a1, a2, (unsigned int)a3); } if ( v10 && !(unsigned int)mysql_errno(*(_QWORD *)(a1 + 24)) ) { v5 = *(_QWORD *)(a1 + 24); v6 = SQLSTATE_UNKNOWN; v7 = client_errors[55]; v3 = (unsigned int *)__errno_location(); my_set_error(v5, 0x7DDu, (long long)v6, (long long)v7, "sending authentication information", *v3); } ++*(_DWORD *)(a1 + 68); return v10; }
client_mpvio_write_packet: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] CMP dword ptr [RAX + 0x44],0x0 JNZ 0x001459a0 MOV RAX,qword ptr [RBP + -0x28] CMP byte ptr [RAX + 0x48],0x0 JZ 0x00145988 MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x18] MOV EDX,EAX CALL 0x00145ad0 MOV dword ptr [RBP + -0x1c],EAX JMP 0x0014599e LAB_00145988: MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x18] MOV EDX,EAX CALL 0x00145d40 MOV dword ptr [RBP + -0x1c],EAX LAB_0014599e: JMP 0x00145a03 LAB_001459a0: MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x18] CMP qword ptr [RAX + 0x4d8],0x0 JZ 0x001459c7 MOV dword ptr [RBP + -0x1c],0x1 JMP 0x00145a01 LAB_001459c7: MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] CALL 0x0014ba60 MOV ECX,EAX MOV AL,0x1 CMP ECX,0x0 MOV byte ptr [RBP + -0x31],AL JNZ 0x001459f6 MOV RDI,qword ptr [RBP + -0x30] CALL 0x0014b640 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x31],AL LAB_001459f6: MOV AL,byte ptr [RBP + -0x31] AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RBP + -0x1c],EAX LAB_00145a01: JMP 0x00145a03 LAB_00145a03: CMP dword ptr [RBP + -0x1c],0x0 JZ 0x00145a70 MOV RAX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RAX + 0x18] CALL 0x001276d0 CMP EAX,0x0 JNZ 0x00145a6e MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x50],RAX LEA RAX,[0x167240] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x48],RAX LEA RAX,[0x167250] MOV RAX,qword ptr [RAX + 0x1b8] MOV qword ptr [RBP + -0x40],RAX CALL 0x00113050 MOV RDI,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x40] MOV R9D,dword ptr [RAX] MOV ESI,0x7dd LEA R8,[0x153239] MOV AL,0x0 CALL 0x0011bae0 LAB_00145a6e: JMP 0x00145a70 LAB_00145a70: MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX + 0x44] ADD ECX,0x1 MOV dword ptr [RAX + 0x44],ECX MOV EAX,dword ptr [RBP + -0x1c] ADD RSP,0x50 POP RBP RET
uint client_mpvio_write_packet(long param_1,int8 param_2,ulong param_3) { int8 uVar1; int *puVar2; int *puVar3; int iVar4; int *piVar5; bool local_39; uint local_24; if (*(int *)(param_1 + 0x44) == 0) { if (*(char *)(param_1 + 0x48) == '\0') { local_24 = send_client_reply_packet(param_1,param_2,param_3 & 0xffffffff); } else { local_24 = send_change_user_packet(param_1,param_2,param_3 & 0xffffffff); } } else { uVar1 = *(int8 *)(param_1 + 0x18); if (*(long *)(*(long *)(param_1 + 0x18) + 0x4d8) == 0) { iVar4 = ma_net_write(uVar1,param_2,param_3); local_39 = true; if (iVar4 == 0) { iVar4 = ma_net_flush(uVar1); local_39 = iVar4 != 0; } local_24 = (uint)local_39; } else { local_24 = 1; } } if ((local_24 != 0) && (iVar4 = mysql_errno(*(int8 *)(param_1 + 0x18)), puVar3 = PTR_s_Lost_connection_to_server_at___s_00167408, puVar2 = SQLSTATE_UNKNOWN, iVar4 == 0 )) { uVar1 = *(int8 *)(param_1 + 0x18); piVar5 = __errno_location(); my_set_error(uVar1,0x7dd,puVar2,puVar3,"sending authentication information",*piVar5); } *(int *)(param_1 + 0x44) = *(int *)(param_1 + 0x44) + 1; return local_24; }
16,831
my_message_stderr
eloqsql/mysys/my_mess.c
void my_message_stderr(uint error __attribute__((unused)), const char *str, myf MyFlags) { DBUG_ENTER("my_message_stderr"); DBUG_PRINT("enter",("message: %s",str)); (void) fflush(stdout); if (MyFlags & (ME_NOTE | ME_ERROR_LOG_ONLY)) DBUG_VOID_RETURN; if (MyFlags & ME_BELL) (void) fputc('\007', stderr); if (my_progname) { (void)fputs(my_progname,stderr); (void)fputs(": ",stderr); } (void)fputs(str,stderr); (void)fputc('\n',stderr); (void)fflush(stderr); DBUG_VOID_RETURN; }
O3
c
my_message_stderr: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdx, %r14 movq %rsi, %rbx movq 0x2ddc1c(%rip), %rax # 0x348fb8 movq (%rax), %rdi callq 0x374d0 testl $0x480, %r14d # imm = 0x480 je 0x6b3b2 popq %rbx popq %r14 popq %rbp retq testb $0x4, %r14b je 0x6b3cc movq 0x2ddc09(%rip), %rax # 0x348fc8 movq (%rax), %rsi movl $0x7, %edi callq 0x378e0 leaq 0x3647bd(%rip), %rax # 0x3cfb90 movq (%rax), %rdi testq %rdi, %rdi je 0x6b3e0 callq 0x38767 movq 0x2ddbe1(%rip), %r14 # 0x348fc8 movq (%r14), %rsi movq %rbx, %rdi callq 0x37340 movq (%r14), %rsi movl $0xa, %edi callq 0x378e0 movq (%r14), %rdi popq %rbx popq %r14 popq %rbp jmp 0x374d0 nop
my_message_stderr: push rbp mov rbp, rsp push r14 push rbx mov r14, rdx mov rbx, rsi mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush test r14d, 480h jz short loc_6B3B2 pop rbx pop r14 pop rbp retn loc_6B3B2: test r14b, 4 jz short loc_6B3CC mov rax, cs:stderr_ptr mov rsi, [rax] mov edi, 7 call _fputc loc_6B3CC: lea rax, my_progname mov rdi, [rax] test rdi, rdi jz short loc_6B3E0 call my_message_stderr_cold_1 loc_6B3E0: mov r14, cs:stderr_ptr mov rsi, [r14] mov rdi, rbx call _fputs mov rsi, [r14] mov edi, 0Ah call _fputc mov rdi, [r14] pop rbx pop r14 pop rbp jmp _fflush
long long my_message_stderr(long long a1, long long a2, __int16 a3) { long long v4; // rbx long long result; // rax const char *v6; // rdx v4 = a2; result = fflush(stdout); if ( (a3 & 0x480) == 0 ) { if ( (a3 & 4) != 0 ) { a2 = stderr; fputc(7LL, stderr); } if ( my_progname ) my_message_stderr_cold_1((long long)my_progname, a2, (long long)v6); fputs(v4, stderr, v6); fputc(10LL, stderr); return fflush(stderr); } return result; }
my_message_stderr: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV R14,RDX MOV RBX,RSI MOV RAX,qword ptr [0x00448fb8] MOV RDI,qword ptr [RAX] CALL 0x001374d0 TEST R14D,0x480 JZ 0x0016b3b2 POP RBX POP R14 POP RBP RET LAB_0016b3b2: TEST R14B,0x4 JZ 0x0016b3cc MOV RAX,qword ptr [0x00448fc8] MOV RSI,qword ptr [RAX] MOV EDI,0x7 CALL 0x001378e0 LAB_0016b3cc: LEA RAX,[0x4cfb90] MOV RDI,qword ptr [RAX] TEST RDI,RDI JZ 0x0016b3e0 CALL 0x00138767 LAB_0016b3e0: MOV R14,qword ptr [0x00448fc8] MOV RSI,qword ptr [R14] MOV RDI,RBX CALL 0x00137340 MOV RSI,qword ptr [R14] MOV EDI,0xa CALL 0x001378e0 MOV RDI,qword ptr [R14] POP RBX POP R14 POP RBP JMP 0x001374d0
void my_message_stderr(int8 param_1,char *param_2,ulong param_3) { int *puVar1; fflush(*(FILE **)PTR_stdout_00448fb8); if ((param_3 & 0x480) != 0) { return; } if ((param_3 & 4) != 0) { fputc(7,*(FILE **)PTR_stderr_00448fc8); } if (my_progname != 0) { my_message_stderr_cold_1(); } puVar1 = PTR_stderr_00448fc8; fputs(param_2,*(FILE **)PTR_stderr_00448fc8); fputc(10,*(FILE **)puVar1); fflush(*(FILE **)puVar1); return; }
16,832
my_strxfrm_desc_and_reverse
eloqsql/strings/ctype-simple.c
void my_strxfrm_desc_and_reverse(uchar *str, uchar *strend, uint flags, uint level) { if (flags & (MY_STRXFRM_DESC_LEVEL1 << level)) { if (flags & (MY_STRXFRM_REVERSE_LEVEL1 << level)) { for (strend--; str <= strend;) { uchar tmp= *str; *str++= ~*strend; *strend--= ~tmp; } } else { for (; str < strend; str++) *str= ~*str; } } else if (flags & (MY_STRXFRM_REVERSE_LEVEL1 << level)) { for (strend--; str < strend;) { uchar tmp= *str; *str++= *strend; *strend--= tmp; } } }
O3
c
my_strxfrm_desc_and_reverse: pushq %rbp movq %rsp, %rbp movl %edx, %r8d shrl %cl, %r8d movl $0x10000, %eax # imm = 0x10000 shll %cl, %eax btl $0x8, %r8d jae 0xb670c testl %edx, %eax je 0xb673f decq %rsi cmpq %rdi, %rsi jb 0xb674e incq %rdi movb -0x1(%rdi), %al movb (%rsi), %cl notb %cl movb %cl, -0x1(%rdi) notb %al movb %al, (%rsi) decq %rsi leaq 0x1(%rdi), %rax cmpq %rsi, %rdi movq %rax, %rdi jbe 0xb66ed jmp 0xb674e testl %edx, %eax setne %al decq %rsi cmpq %rdi, %rsi seta %cl andb %al, %cl cmpb $0x1, %cl jne 0xb674e incq %rdi movb -0x1(%rdi), %al movb (%rsi), %cl movb %cl, -0x1(%rdi) movb %al, (%rsi) decq %rsi leaq 0x1(%rdi), %rax cmpq %rsi, %rdi movq %rax, %rdi jb 0xb6724 jmp 0xb674e cmpq %rsi, %rdi jae 0xb674e notb (%rdi) incq %rdi cmpq %rsi, %rdi jne 0xb6744 popq %rbp retq
my_strxfrm_desc_and_reverse: push rbp mov rbp, rsp mov r8d, edx shr r8d, cl mov eax, offset stru_10000 shl eax, cl bt r8d, 8 jnb short loc_B670C test eax, edx jz short loc_B673F dec rsi cmp rsi, rdi jb short loc_B674E inc rdi loc_B66ED: mov al, [rdi-1] mov cl, [rsi] not cl mov [rdi-1], cl not al mov [rsi], al dec rsi lea rax, [rdi+1] cmp rdi, rsi mov rdi, rax jbe short loc_B66ED jmp short loc_B674E loc_B670C: test eax, edx setnz al dec rsi cmp rsi, rdi setnbe cl and cl, al cmp cl, 1 jnz short loc_B674E inc rdi loc_B6724: mov al, [rdi-1] mov cl, [rsi] mov [rdi-1], cl mov [rsi], al dec rsi lea rax, [rdi+1] cmp rdi, rsi mov rdi, rax jb short loc_B6724 jmp short loc_B674E loc_B673F: cmp rdi, rsi jnb short loc_B674E loc_B6744: not byte ptr [rdi] inc rdi cmp rdi, rsi jnz short loc_B6744 loc_B674E: pop rbp retn
char my_strxfrm_desc_and_reverse(_BYTE *a1, _BYTE *a2, unsigned int a3, char a4) { int v4; // eax _BYTE *v5; // rsi _BYTE *v6; // rdi char v7; // al _BYTE *v9; // rsi _BYTE *v10; // rdi char v11; // al v4 = (_DWORD)&stru_10000 << a4; if ( ((a3 >> a4) & 0x100) != 0 ) { if ( (a3 & v4) != 0 ) { v5 = a2 - 1; if ( v5 >= a1 ) { v6 = a1 + 1; do { v7 = *(v6 - 1); *(v6 - 1) = ~*v5; *v5-- = ~v7; LOBYTE(v4) = (_BYTE)v6 + 1; } while ( v6++ <= v5 ); } } else if ( a1 < a2 ) { do { *a1 = ~*a1; ++a1; } while ( a1 != a2 ); } } else { LOBYTE(v4) = (a3 & v4) != 0; v9 = a2 - 1; if ( ((unsigned __int8)v4 & (v9 > a1)) == 1 ) { v10 = a1 + 1; do { v11 = *(v10 - 1); *(v10 - 1) = *v9; *v9-- = v11; LOBYTE(v4) = (_BYTE)v10 + 1; } while ( v10++ < v9 ); } } return v4; }
my_strxfrm_desc_and_reverse: PUSH RBP MOV RBP,RSP MOV R8D,EDX SHR R8D,CL MOV EAX,0x10000 SHL EAX,CL BT R8D,0x8 JNC 0x001b670c TEST EAX,EDX JZ 0x001b673f DEC RSI CMP RSI,RDI JC 0x001b674e INC RDI LAB_001b66ed: MOV AL,byte ptr [RDI + -0x1] MOV CL,byte ptr [RSI] NOT CL MOV byte ptr [RDI + -0x1],CL NOT AL MOV byte ptr [RSI],AL DEC RSI LEA RAX,[RDI + 0x1] CMP RDI,RSI MOV RDI,RAX JBE 0x001b66ed JMP 0x001b674e LAB_001b670c: TEST EAX,EDX SETNZ AL DEC RSI CMP RSI,RDI SETA CL AND CL,AL CMP CL,0x1 JNZ 0x001b674e INC RDI LAB_001b6724: MOV AL,byte ptr [RDI + -0x1] MOV CL,byte ptr [RSI] MOV byte ptr [RDI + -0x1],CL MOV byte ptr [RSI],AL DEC RSI LEA RAX,[RDI + 0x1] CMP RDI,RSI MOV RDI,RAX JC 0x001b6724 JMP 0x001b674e LAB_001b673f: CMP RDI,RSI JNC 0x001b674e LAB_001b6744: NOT byte ptr [RDI] INC RDI CMP RDI,RSI JNZ 0x001b6744 LAB_001b674e: POP RBP RET
void my_strxfrm_desc_and_reverse(byte *param_1,byte *param_2,uint param_3,byte param_4) { byte bVar1; uint uVar2; byte *pbVar3; bool bVar4; uVar2 = 0x10000 << (param_4 & 0x1f); if (((param_3 >> (param_4 & 0x1f)) >> 8 & 1) == 0) { param_2 = param_2 + -1; if (param_1 < param_2 && (uVar2 & param_3) != 0) { pbVar3 = param_1 + 1; do { bVar1 = pbVar3[-1]; pbVar3[-1] = *param_2; *param_2 = bVar1; param_2 = param_2 + -1; bVar4 = pbVar3 < param_2; pbVar3 = pbVar3 + 1; } while (bVar4); } } else if ((uVar2 & param_3) == 0) { if (param_1 < param_2) { do { *param_1 = ~*param_1; param_1 = param_1 + 1; } while (param_1 != param_2); } } else { param_2 = param_2 + -1; if (param_1 <= param_2) { pbVar3 = param_1 + 1; do { bVar1 = pbVar3[-1]; pbVar3[-1] = ~*param_2; *param_2 = ~bVar1; param_2 = param_2 + -1; bVar4 = pbVar3 <= param_2; pbVar3 = pbVar3 + 1; } while (bVar4); } } return; }
16,833
PreparedResultSet::Fetch() const
SylCore-WoTLK/src/server/database/Database/QueryResult.cpp
Field* PreparedResultSet::Fetch() const { ASSERT(m_rowPosition < m_rowCount); return const_cast<Field*>(&m_rows[uint32(m_rowPosition) * m_fieldCount]); }
O3
cpp
PreparedResultSet::Fetch() const: pushq %rbx subq $0x80, %rsp movq 0x38(%rdi), %rax cmpq 0x30(%rdi), %rax jae 0x7b10d imull 0x40(%rdi), %eax leaq (%rax,%rax,2), %rax shlq $0x3, %rax addq 0x18(%rdi), %rax addq $0x80, %rsp popq %rbx retq leaq 0x60(%rsp), %rbx movq %rbx, %rdi callq 0xc7c65 movq (%rbx), %rax movq 0x8(%rbx), %rcx movq %rcx, 0x40(%rsp) movq %rax, 0x48(%rsp) movq $0x1a, 0x30(%rsp) leaq 0x8294f(%rip), %rax # 0xfda8a movq %rax, 0x38(%rsp) xorps %xmm0, %xmm0 movaps %xmm0, 0x50(%rsp) movaps 0x50(%rsp), %xmm0 movups %xmm0, 0x20(%rsp) movups 0x30(%rsp), %xmm0 movups %xmm0, 0x10(%rsp) movups 0x40(%rsp), %xmm0 movups %xmm0, (%rsp) leaq 0x827c4(%rip), %rsi # 0xfd930 leaq 0x82911(%rip), %r8 # 0xfda84 movl $0x5b, %edi movl $0x5, %ecx movl $0x198, %edx # imm = 0x198 callq 0xc7130 movq %rax, %rbx leaq 0x70(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x7b1a5 movq 0x70(%rsp), %rsi incq %rsi callq 0xd32e8 movq %rbx, %rdi callq 0x1bba0 nop
_ZNK17PreparedResultSet5FetchEv: push rbx sub rsp, 80h mov rax, [rdi+38h] cmp rax, [rdi+30h] jnb short loc_7B10D imul eax, [rdi+40h] lea rax, [rax+rax*2] shl rax, 3 add rax, [rdi+18h] add rsp, 80h pop rbx retn loc_7B10D: lea rbx, [rsp+88h+var_28] mov rdi, rbx call _Z12GetDebugInfoB5cxx11v; GetDebugInfo(void) mov rax, [rbx] mov rcx, [rbx+8] mov qword ptr [rsp+88h+var_48], rcx mov qword ptr [rsp+88h+var_48+8], rax mov qword ptr [rsp+88h+var_58], 1Ah lea rax, aMRowpositionMR; "m_rowPosition < m_rowCount" mov qword ptr [rsp+88h+var_58+8], rax xorps xmm0, xmm0 movaps [rsp+88h+var_38], xmm0 movaps xmm0, [rsp+88h+var_38] movups [rsp+88h+var_68], xmm0 movups xmm0, [rsp+88h+var_58] movups [rsp+88h+var_78], xmm0 movups xmm0, [rsp+88h+var_48] movups [rsp+88h+var_88], xmm0 lea rsi, aWorkspaceLlm4b_18; "/workspace/llm4binary/github2025/SylCor"... lea r8, aFetch; "Fetch" mov edi, 5Bh ; '[' mov ecx, 5 mov edx, 198h call _ZN5Acore6AssertESt17basic_string_viewIcSt11char_traitsIcEEjS3_S3_S3_S3_; Acore::Assert(std::string_view,uint,std::string_view,std::string_view,std::string_view,std::string_view) mov rbx, rax lea rax, [rsp+88h+var_18] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_7B1A5 mov rsi, [rsp+88h+var_18] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_7B1A5: mov rdi, rbx call __Unwind_Resume
long long PreparedResultSet::Fetch(PreparedResultSet *this) { unsigned long long v1; // rax long long v3; // r9 _QWORD v4[2]; // [rsp+60h] [rbp-28h] BYREF v1 = *((_QWORD *)this + 7); if ( v1 >= *((_QWORD *)this + 6) ) { GetDebugInfo[abi:cxx11](v4); Acore::Assert( 91LL, "/workspace/llm4binary/github2025/SylCore-WoTLK/src/server/database/Database/QueryResult.cpp", 408LL, 5LL, "Fetch", v3, v4[1], v4[0], 26LL, "m_rowPosition < m_rowCount", 0LL, 0LL); } return *((_QWORD *)this + 3) + 24LL * (unsigned int)(*((_DWORD *)this + 16) * v1); }
Fetch: PUSH RBX SUB RSP,0x80 MOV RAX,qword ptr [RDI + 0x38] CMP RAX,qword ptr [RDI + 0x30] JNC 0x0017b10d IMUL EAX,dword ptr [RDI + 0x40] LEA RAX,[RAX + RAX*0x2] SHL RAX,0x3 ADD RAX,qword ptr [RDI + 0x18] ADD RSP,0x80 POP RBX RET LAB_0017b10d: LEA RBX,[RSP + 0x60] MOV RDI,RBX CALL 0x001c7c65 MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RBX + 0x8] MOV qword ptr [RSP + 0x40],RCX MOV qword ptr [RSP + 0x48],RAX MOV qword ptr [RSP + 0x30],0x1a LEA RAX,[0x1fda8a] MOV qword ptr [RSP + 0x38],RAX XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x50],XMM0 LAB_0017b148: MOVAPS XMM0,xmmword ptr [RSP + 0x50] MOVUPS xmmword ptr [RSP + 0x20],XMM0 MOVUPS XMM0,xmmword ptr [RSP + 0x30] MOVUPS xmmword ptr [RSP + 0x10],XMM0 MOVUPS XMM0,xmmword ptr [RSP + 0x40] MOVUPS xmmword ptr [RSP],XMM0 LEA RSI,[0x1fd930] LEA R8,[0x1fda84] MOV EDI,0x5b MOV ECX,0x5 MOV EDX,0x198 CALL 0x001c7130 LAB_0017b187: MOV RBX,RAX LEA RAX,[RSP + 0x70] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0017b1a5 MOV RSI,qword ptr [RSP + 0x70] INC RSI CALL 0x001d32e8 LAB_0017b1a5: MOV RDI,RBX CALL 0x0011bba0
/* PreparedResultSet::Fetch() const */ long __thiscall PreparedResultSet::Fetch(PreparedResultSet *this) { int8 uVar1; int8 in_R9; int4 uStack_40; long *local_28; int4 local_20; long local_18 [2]; if (*(ulong *)(this + 0x38) < *(ulong *)(this + 0x30)) { return (ulong)(uint)((int)*(ulong *)(this + 0x38) * *(int *)(this + 0x40)) * 0x18 + *(long *)(this + 0x18); } GetDebugInfo_abi_cxx11_(); /* try { // try from 0017b148 to 0017b186 has its CatchHandler @ 0017b187 */ uStack_40 = SUB84(local_28,0); uVar1 = Acore::Assert(0x5b, "/workspace/llm4binary/github2025/SylCore-WoTLK/src/server/database/Database/QueryResult.cpp" ,0x198,5,"Fetch",in_R9,local_20,uStack_40,0x1a,"m_rowPosition < m_rowCount", 0,0); /* catch() { ... } // from try @ 0017b148 with catch @ 0017b187 */ if (local_28 != local_18) { operator_delete(local_28,local_18[0] + 1); } /* WARNING: Subroutine does not return */ _Unwind_Resume(uVar1); }
16,834
check_keyword
pnggroup[P]pngcheck/pngcheck.c
int check_keyword(uch *buffer, int maxsize, int *pKeylen, const char *keyword_name, const char *chunkid, const char *fname) { int j, prev_space = 0; int keylen = keywordlen(buffer, maxsize); if (pKeylen) *pKeylen = keylen; if (keylen == 0) { printf("%s zero length %s%s%s\n", verbose? ":":fname, verbose? "":chunkid, verbose? "":" ", keyword_name); return 1; } if (keylen > 79) { printf("%s %s %s is longer than 79 characters\n", verbose? ":":fname, verbose? "":chunkid, keyword_name); return 2; } if (buffer[0] == ' ') { printf("%s %s %s has leading space(s)\n", verbose? ":":fname, verbose? "":chunkid, keyword_name); return 3; } if (buffer[keylen - 1] == ' ') { printf("%s %s %s has trailing space(s)\n", verbose? ":":fname, verbose? "":chunkid, keyword_name); return 4; } for (j = 0; j < keylen; ++j) { if (buffer[j] == ' ') { if (prev_space) { printf("%s %s %s has consecutive spaces\n", verbose? ":":fname, verbose? "":chunkid, keyword_name); return 5; } prev_space = 1; } else { prev_space = 0; } } for (j = 0; j < keylen; ++j) { if (latin1_keyword_forbidden[buffer[j]]) { /* [0,31] || [127,160] */ printf("%s %s %s has control character(s) (%u)\n", verbose? ":":fname, verbose? "":chunkid, keyword_name, buffer[j]); return 6; } } return 0; }
O3
c
check_keyword: movq %rcx, %r10 testl %esi, %esi jle 0x11f6c movl %esi, %ecx xorl %eax, %eax cmpb $0x0, (%rdi,%rax) je 0x11f6e incq %rax cmpq %rax, %rcx jne 0x11f5a movl %ecx, %eax jmp 0x11f6e xorl %eax, %eax testq %rdx, %rdx je 0x11f75 movl %eax, (%rdx) pushq %rax testl %eax, %eax je 0x11fb7 cmpl $0x50, %eax jl 0x11ffd cmpl $0x0, 0xa28a(%rip) # 0x1c210 leaq 0x69c7(%rip), %rsi # 0x18954 cmoveq %r9, %rsi leaq 0x184c(%rip), %rdx # 0x137e4 cmoveq %r8, %rdx leaq 0x6062(%rip), %rdi # 0x18005 movq %r10, %rcx xorl %eax, %eax callq 0x20e0 movl $0x2, %eax jmp 0x12139 cmpl $0x0, 0xa252(%rip) # 0x1c210 leaq 0x698f(%rip), %rsi # 0x18954 cmoveq %r9, %rsi leaq 0x1814(%rip), %rax # 0x137e4 cmovneq %rax, %r8 leaq 0x2964(%rip), %rcx # 0x1493f cmovneq %rax, %rcx leaq 0x6007(%rip), %rdi # 0x17fed movq %r8, %rdx movq %r10, %r8 xorl %eax, %eax callq 0x20e0 movl $0x1, %eax jmp 0x12139 cmpb $0x20, (%rdi) jne 0x1203a cmpl $0x0, 0xa207(%rip) # 0x1c210 leaq 0x6944(%rip), %rsi # 0x18954 cmoveq %r9, %rsi leaq 0x17c9(%rip), %rdx # 0x137e4 cmoveq %r8, %rdx leaq 0x6007(%rip), %rdi # 0x1802d movq %r10, %rcx xorl %eax, %eax callq 0x20e0 movl $0x3, %eax jmp 0x12139 movslq %eax, %rcx cmpb $0x20, -0x1(%rdi,%rcx) jne 0x1207c cmpl $0x0, 0xa1c5(%rip) # 0x1c210 leaq 0x6902(%rip), %rsi # 0x18954 cmoveq %r9, %rsi leaq 0x1787(%rip), %rdx # 0x137e4 cmoveq %r8, %rdx leaq 0x5fe5(%rip), %rdi # 0x1804d movq %r10, %rcx xorl %eax, %eax callq 0x20e0 movl $0x4, %eax jmp 0x12139 testl %eax, %eax jle 0x120ca movl %eax, %ecx xorl %edx, %edx xorl %esi, %esi cmpb $0x20, (%rdi,%rdx) movl $0x0, %r11d jne 0x1209c movl $0x1, %r11d testl %esi, %esi jne 0x120ce incq %rdx movl %r11d, %esi cmpq %rdx, %rcx jne 0x12086 testl %eax, %eax jle 0x120ca xorl %edx, %edx leaq 0x117c(%rip), %rsi # 0x13230 movzbl (%rdi,%rdx), %eax cmpb $0x0, (%rax,%rsi) jne 0x12103 incq %rdx xorl %eax, %eax cmpq %rdx, %rcx jne 0x120b4 jmp 0x12139 xorl %eax, %eax jmp 0x12139 cmpl $0x0, 0xa13b(%rip) # 0x1c210 leaq 0x6878(%rip), %rsi # 0x18954 cmoveq %r9, %rsi leaq 0x16fd(%rip), %rdx # 0x137e4 cmoveq %r8, %rdx leaq 0x5f7c(%rip), %rdi # 0x1806e movq %r10, %rcx xorl %eax, %eax callq 0x20e0 movl $0x5, %eax jmp 0x12139 cmpl $0x0, 0xa106(%rip) # 0x1c210 leaq 0x6843(%rip), %rsi # 0x18954 cmoveq %r9, %rsi leaq 0x16c8(%rip), %rdx # 0x137e4 cmoveq %r8, %rdx leaq 0x5f69(%rip), %rdi # 0x18090 movq %r10, %rcx movl %eax, %r8d xorl %eax, %eax callq 0x20e0 movl $0x6, %eax popq %rcx retq
check_keyword: mov r10, rcx test esi, esi jle short loc_11F6C mov ecx, esi xor eax, eax loc_11F5A: cmp byte ptr [rdi+rax], 0 jz short loc_11F6E inc rax cmp rcx, rax jnz short loc_11F5A mov eax, ecx jmp short loc_11F6E loc_11F6C: xor eax, eax loc_11F6E: test rdx, rdx jz short loc_11F75 mov [rdx], eax loc_11F75: push rax test eax, eax jz short loc_11FB7 cmp eax, 50h ; 'P' jl short loc_11FFD cmp cs:verbose, 0 lea rsi, aChangeSyncIdLi+25h; ":" cmovz rsi, r9 lea rdx, aZlibWarningDif+3Ah; "" cmovz rdx, r8 lea rdi, aSSSIsLongerTha; "%s %s %s is longer than 79 characters"... mov rcx, r10 xor eax, eax call _printf mov eax, 2 jmp loc_12139 loc_11FB7: cmp cs:verbose, 0 lea rsi, aChangeSyncIdLi+25h; ":" cmovz rsi, r9 lea rax, aZlibWarningDif+3Ah; "" cmovnz r8, rax lea rcx, asc_1493D+2; " " cmovnz rcx, rax lea rdi, aSZeroLengthSSS; "%s zero length %s%s%s\n" mov rdx, r8 mov r8, r10 xor eax, eax call _printf mov eax, 1 jmp loc_12139 loc_11FFD: cmp byte ptr [rdi], 20h ; ' ' jnz short loc_1203A cmp cs:verbose, 0 lea rsi, aChangeSyncIdLi+25h; ":" cmovz rsi, r9 lea rdx, aZlibWarningDif+3Ah; "" cmovz rdx, r8 lea rdi, aSSSHasLeadingS; "%s %s %s has leading space(s)\n" mov rcx, r10 xor eax, eax call _printf mov eax, 3 jmp loc_12139 loc_1203A: movsxd rcx, eax cmp byte ptr [rdi+rcx-1], 20h ; ' ' jnz short loc_1207C cmp cs:verbose, 0 lea rsi, aChangeSyncIdLi+25h; ":" cmovz rsi, r9 lea rdx, aZlibWarningDif+3Ah; "" cmovz rdx, r8 lea rdi, aSSSHasTrailing; "%s %s %s has trailing space(s)\n" mov rcx, r10 xor eax, eax call _printf mov eax, 4 jmp loc_12139 loc_1207C: test eax, eax jle short loc_120CA mov ecx, eax xor edx, edx xor esi, esi loc_12086: cmp byte ptr [rdi+rdx], 20h ; ' ' mov r11d, 0 jnz short loc_1209C mov r11d, 1 test esi, esi jnz short loc_120CE loc_1209C: inc rdx mov esi, r11d cmp rcx, rdx jnz short loc_12086 test eax, eax jle short loc_120CA xor edx, edx lea rsi, latin1_keyword_forbidden loc_120B4: movzx eax, byte ptr [rdi+rdx] cmp byte ptr [rax+rsi], 0 jnz short loc_12103 inc rdx xor eax, eax cmp rcx, rdx jnz short loc_120B4 jmp short loc_12139 loc_120CA: xor eax, eax jmp short loc_12139 loc_120CE: cmp cs:verbose, 0 lea rsi, aChangeSyncIdLi+25h; ":" cmovz rsi, r9 lea rdx, aZlibWarningDif+3Ah; "" cmovz rdx, r8 lea rdi, aSSSHasConsecut; "%s %s %s has consecutive spaces\n" mov rcx, r10 xor eax, eax call _printf mov eax, 5 jmp short loc_12139 loc_12103: cmp cs:verbose, 0 lea rsi, aChangeSyncIdLi+25h; ":" cmovz rsi, r9 lea rdx, aZlibWarningDif+3Ah; "" cmovz rdx, r8 lea rdi, aSSSHasControlC; "%s %s %s has control character(s) (%u)"... mov rcx, r10 mov r8d, eax xor eax, eax call _printf mov eax, 6 loc_12139: pop rcx retn
long long check_keyword(_BYTE *a1, int a2, _DWORD *a3, const char *a4, const char *a5, const char *a6) { long long v7; // rax const char *v8; // rsi const char *v9; // rdx long long result; // rax const char *v11; // rsi const char *v12; // rcx const char *v13; // rsi const char *v14; // rdx const char *v15; // rsi const char *v16; // rdx long long v17; // rcx long long v18; // rdx int v19; // esi int v20; // r11d long long v21; // rdx long long v22; // rax const char *v23; // rsi const char *v24; // rdx const char *v25; // rsi const char *v26; // rdx if ( a2 <= 0 ) { LODWORD(v7) = 0; } else { v7 = 0LL; while ( a1[v7] ) { if ( a2 == ++v7 ) { LODWORD(v7) = a2; break; } } } if ( a3 ) *a3 = v7; if ( (_DWORD)v7 ) { if ( (int)v7 < 80 ) { if ( *a1 == 32 ) { v13 = ":"; if ( !verbose ) v13 = a6; v14 = ""; if ( !verbose ) v14 = a5; printf("%s %s %s has leading space(s)\n", v13, v14, a4); return 3LL; } else if ( a1[(int)v7 - 1] == 32 ) { v15 = ":"; if ( !verbose ) v15 = a6; v16 = ""; if ( !verbose ) v16 = a5; printf("%s %s %s has trailing space(s)\n", v15, v16, a4); return 4LL; } else if ( (int)v7 <= 0 ) { return 0LL; } else { v17 = (unsigned int)v7; v18 = 0LL; v19 = 0; do { v20 = 0; if ( a1[v18] == 32 ) { v20 = 1; if ( v19 ) { v23 = ":"; if ( !verbose ) v23 = a6; v24 = ""; if ( !verbose ) v24 = a5; printf("%s %s %s has consecutive spaces\n", v23, v24, a4); return 5LL; } } ++v18; v19 = v20; } while ( (unsigned int)v7 != v18 ); v21 = 0LL; while ( 1 ) { v22 = (unsigned __int8)a1[v21]; if ( latin1_keyword_forbidden[v22] ) break; ++v21; result = 0LL; if ( v17 == v21 ) return result; } v25 = ":"; if ( !verbose ) v25 = a6; v26 = ""; if ( !verbose ) v26 = a5; printf("%s %s %s has control character(s) (%u)\n", v25, v26, a4, v22); return 6LL; } } else { v8 = ":"; if ( !verbose ) v8 = a6; v9 = ""; if ( !verbose ) v9 = a5; printf("%s %s %s is longer than 79 characters\n", v8, v9, a4); return 2LL; } } else { v11 = ":"; if ( verbose ) a5 = ""; else v11 = a6; v12 = " "; if ( verbose ) v12 = ""; printf("%s zero length %s%s%s\n", v11, a5, v12, a4); return 1LL; } }
check_keyword: MOV R10,RCX TEST ESI,ESI JLE 0x00111f6c MOV ECX,ESI XOR EAX,EAX LAB_00111f5a: CMP byte ptr [RDI + RAX*0x1],0x0 JZ 0x00111f6e INC RAX CMP RCX,RAX JNZ 0x00111f5a MOV EAX,ECX JMP 0x00111f6e LAB_00111f6c: XOR EAX,EAX LAB_00111f6e: TEST RDX,RDX JZ 0x00111f75 MOV dword ptr [RDX],EAX LAB_00111f75: PUSH RAX TEST EAX,EAX JZ 0x00111fb7 CMP EAX,0x50 JL 0x00111ffd CMP dword ptr [0x0011c210],0x0 LEA RSI,[0x118954] CMOVZ RSI,R9 LEA RDX,[0x1137e4] CMOVZ RDX,R8 LEA RDI,[0x118005] MOV RCX,R10 XOR EAX,EAX CALL 0x001020e0 MOV EAX,0x2 JMP 0x00112139 LAB_00111fb7: CMP dword ptr [0x0011c210],0x0 LEA RSI,[0x118954] CMOVZ RSI,R9 LEA RAX,[0x1137e4] CMOVNZ R8,RAX LEA RCX,[0x11493f] CMOVNZ RCX,RAX LEA RDI,[0x117fed] MOV RDX,R8 MOV R8,R10 XOR EAX,EAX CALL 0x001020e0 MOV EAX,0x1 JMP 0x00112139 LAB_00111ffd: CMP byte ptr [RDI],0x20 JNZ 0x0011203a CMP dword ptr [0x0011c210],0x0 LEA RSI,[0x118954] CMOVZ RSI,R9 LEA RDX,[0x1137e4] CMOVZ RDX,R8 LEA RDI,[0x11802d] MOV RCX,R10 XOR EAX,EAX CALL 0x001020e0 MOV EAX,0x3 JMP 0x00112139 LAB_0011203a: MOVSXD RCX,EAX CMP byte ptr [RDI + RCX*0x1 + -0x1],0x20 JNZ 0x0011207c CMP dword ptr [0x0011c210],0x0 LEA RSI,[0x118954] CMOVZ RSI,R9 LEA RDX,[0x1137e4] CMOVZ RDX,R8 LEA RDI,[0x11804d] MOV RCX,R10 XOR EAX,EAX CALL 0x001020e0 MOV EAX,0x4 JMP 0x00112139 LAB_0011207c: TEST EAX,EAX JLE 0x001120ca MOV ECX,EAX XOR EDX,EDX XOR ESI,ESI LAB_00112086: CMP byte ptr [RDI + RDX*0x1],0x20 MOV R11D,0x0 JNZ 0x0011209c MOV R11D,0x1 TEST ESI,ESI JNZ 0x001120ce LAB_0011209c: INC RDX MOV ESI,R11D CMP RCX,RDX JNZ 0x00112086 TEST EAX,EAX JLE 0x001120ca XOR EDX,EDX LEA RSI,[0x113230] LAB_001120b4: MOVZX EAX,byte ptr [RDI + RDX*0x1] CMP byte ptr [RAX + RSI*0x1],0x0 JNZ 0x00112103 INC RDX XOR EAX,EAX CMP RCX,RDX JNZ 0x001120b4 JMP 0x00112139 LAB_001120ca: XOR EAX,EAX JMP 0x00112139 LAB_001120ce: CMP dword ptr [0x0011c210],0x0 LEA RSI,[0x118954] CMOVZ RSI,R9 LEA RDX,[0x1137e4] CMOVZ RDX,R8 LEA RDI,[0x11806e] MOV RCX,R10 XOR EAX,EAX CALL 0x001020e0 MOV EAX,0x5 JMP 0x00112139 LAB_00112103: CMP dword ptr [0x0011c210],0x0 LEA RSI,[0x118954] CMOVZ RSI,R9 LEA RDX,[0x1137e4] CMOVZ RDX,R8 LEA RDI,[0x118090] MOV RCX,R10 MOV R8D,EAX XOR EAX,EAX CALL 0x001020e0 MOV EAX,0x6 LAB_00112139: POP RCX RET
int8 check_keyword(char *param_1,uint param_2,int *param_3,int8 param_4,char *param_5,char *param_6 ) { bool bVar1; bool bVar2; int iVar3; ulong uVar4; ulong uVar5; int8 uVar6; char *pcVar7; char *pcVar8; if ((int)param_2 < 1) { uVar5 = 0; } else { uVar4 = 0; do { uVar5 = uVar4; if (param_1[uVar4] == '\0') break; uVar4 = uVar4 + 1; uVar5 = (ulong)param_2; } while (param_2 != uVar4); } iVar3 = (int)uVar5; if (param_3 != (int *)0x0) { *param_3 = iVar3; } if (iVar3 == 0) { pcVar8 = param_6; if (verbose != 0) { param_5 = ""; pcVar8 = ":"; } pcVar7 = " "; if (verbose != 0) { pcVar7 = ""; } printf("%s zero length %s%s%s\n",pcVar8,param_5,pcVar7,param_4,param_6,uVar5); uVar6 = 1; } else if (iVar3 < 0x50) { if (*param_1 == ' ') { pcVar8 = ":"; if (verbose == 0) { pcVar8 = param_6; } pcVar7 = ""; if (verbose == 0) { pcVar7 = param_5; } printf("%s %s %s has leading space(s)\n",pcVar8,pcVar7,param_4,param_5,param_6,uVar5); uVar6 = 3; } else if (param_1[(long)iVar3 + -1] == ' ') { pcVar8 = ":"; if (verbose == 0) { pcVar8 = param_6; } pcVar7 = ""; if (verbose == 0) { pcVar7 = param_5; } printf("%s %s %s has trailing space(s)\n",pcVar8,pcVar7,param_4,param_5,param_6,uVar5); uVar6 = 4; } else { if (0 < iVar3) { uVar4 = 0; bVar1 = false; do { bVar2 = false; if ((param_1[uVar4] == ' ') && (bVar2 = true, bVar1)) { pcVar8 = ":"; if (verbose == 0) { pcVar8 = param_6; } pcVar7 = ""; if (verbose == 0) { pcVar7 = param_5; } printf("%s %s %s has consecutive spaces\n",pcVar8,pcVar7,param_4,param_5,param_6,uVar5) ; return 5; } bVar1 = bVar2; uVar4 = uVar4 + 1; } while ((uVar5 & 0xffffffff) != uVar4); if (0 < iVar3) { uVar4 = 0; do { if (latin1_keyword_forbidden[(byte)param_1[uVar4]] != '\0') { pcVar8 = ":"; if (verbose == 0) { pcVar8 = param_6; } pcVar7 = ""; if (verbose == 0) { pcVar7 = param_5; } printf("%s %s %s has control character(s) (%u)\n",pcVar8,pcVar7,param_4, (ulong)(byte)param_1[uVar4],param_6,uVar5); return 6; } uVar4 = uVar4 + 1; } while ((uVar5 & 0xffffffff) != uVar4); return 0; } } uVar6 = 0; } } else { pcVar8 = ":"; if (verbose == 0) { pcVar8 = param_6; } pcVar7 = ""; if (verbose == 0) { pcVar7 = param_5; } printf("%s %s %s is longer than 79 characters\n",pcVar8,pcVar7,param_4,param_5,param_6,uVar5); uVar6 = 2; } return uVar6; }
16,835
mi_ft_update
eloqsql/storage/myisam/ft_update.c
int _mi_ft_update(MI_INFO *info, uint keynr, uchar *keybuf, const uchar *oldrec, const uchar *newrec, my_off_t pos) { int error= -1; FT_WORD *oldlist,*newlist, *old_word, *new_word; CHARSET_INFO *cs=info->s->keyinfo[keynr].seg->charset; uint key_length; int cmp, cmp2; DBUG_ENTER("_mi_ft_update"); if (!(old_word=oldlist=_mi_ft_parserecord(info, keynr, oldrec, &info->ft_memroot)) || !(new_word=newlist=_mi_ft_parserecord(info, keynr, newrec, &info->ft_memroot))) goto err; error=0; while(old_word->pos && new_word->pos) { cmp= ha_compare_text(cs, (uchar*) old_word->pos,old_word->len, (uchar*) new_word->pos,new_word->len,0); cmp2= cmp ? 0 : (fabs(old_word->weight - new_word->weight) > 1.e-5); if (cmp < 0 || cmp2) { key_length=_ft_make_key(info,keynr,keybuf,old_word,pos); if ((error=_mi_ck_delete(info,keynr,(uchar*) keybuf,key_length))) goto err; } if (cmp > 0 || cmp2) { key_length=_ft_make_key(info,keynr,keybuf,new_word,pos); if ((error=_mi_ck_write(info,keynr,(uchar*) keybuf,key_length))) goto err; } if (cmp<=0) old_word++; if (cmp>=0) new_word++; } if (old_word->pos) error=_mi_ft_erase(info,keynr,keybuf,old_word,pos); else if (new_word->pos) error=_mi_ft_store(info,keynr,keybuf,new_word,pos); err: free_root(&info->ft_memroot, MYF(MY_MARK_BLOCKS_FREE)); DBUG_RETURN(error); }
O0
c
mi_ft_update: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movl $0xffffffff, -0x34(%rbp) # imm = 0xFFFFFFFF movq -0x8(%rbp), %rax movq (%rax), %rax movq 0x218(%rax), %rax movl -0xc(%rbp), %ecx imulq $0x70, %rcx, %rcx addq %rcx, %rax movq 0x28(%rax), %rax movq (%rax), %rax movq %rax, -0x60(%rbp) movq -0x8(%rbp), %rdi movl -0xc(%rbp), %esi movq -0x20(%rbp), %rdx movq -0x8(%rbp), %rcx addq $0x90, %rcx callq 0xa7dc0 movq %rax, -0x40(%rbp) movq %rax, -0x50(%rbp) cmpq $0x0, %rax je 0xa801e movq -0x8(%rbp), %rdi movl -0xc(%rbp), %esi movq -0x28(%rbp), %rdx movq -0x8(%rbp), %rcx addq $0x90, %rcx callq 0xa7dc0 movq %rax, -0x48(%rbp) movq %rax, -0x58(%rbp) cmpq $0x0, %rax jne 0xa8023 jmp 0xa81cf movl $0x0, -0x34(%rbp) movq -0x50(%rbp), %rcx xorl %eax, %eax cmpq $0x0, (%rcx) movb %al, -0x6d(%rbp) je 0xa8047 movq -0x58(%rbp), %rax cmpq $0x0, (%rax) setne %al movb %al, -0x6d(%rbp) movb -0x6d(%rbp), %al testb $0x1, %al jne 0xa8053 jmp 0xa817f movq -0x60(%rbp), %rdi movq -0x50(%rbp), %rax movq (%rax), %rsi movq -0x50(%rbp), %rax movq 0x10(%rax), %rdx movq -0x58(%rbp), %rax movq (%rax), %rcx movq -0x58(%rbp), %rax movq 0x10(%rax), %r8 xorl %r9d, %r9d callq 0xf8ce0 movl %eax, -0x68(%rbp) cmpl $0x0, -0x68(%rbp) je 0xa808d xorl %eax, %eax movl %eax, -0x74(%rbp) jmp 0xa80c1 movq -0x50(%rbp), %rax movsd 0x8(%rax), %xmm0 movq -0x58(%rbp), %rax subsd 0x8(%rax), %xmm0 movaps 0xbd32a(%rip), %xmm1 # 0x1653d0 pand %xmm1, %xmm0 movsd 0xbd0ae(%rip), %xmm1 # 0x165160 ucomisd %xmm1, %xmm0 seta %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x74(%rbp) movl -0x74(%rbp), %eax movl %eax, -0x6c(%rbp) cmpl $0x0, -0x68(%rbp) jl 0xa80d3 cmpl $0x0, -0x6c(%rbp) je 0xa8110 movq -0x8(%rbp), %rdi movl -0xc(%rbp), %esi movq -0x18(%rbp), %rdx movq -0x50(%rbp), %rcx movq -0x30(%rbp), %r8 callq 0xa8200 movl %eax, -0x64(%rbp) movq -0x8(%rbp), %rdi movl -0xc(%rbp), %esi movq -0x18(%rbp), %rdx movl -0x64(%rbp), %ecx callq 0xa8e40 movl %eax, -0x34(%rbp) cmpl $0x0, %eax je 0xa810e jmp 0xa81cf jmp 0xa8110 cmpl $0x0, -0x68(%rbp) jg 0xa811c cmpl $0x0, -0x6c(%rbp) je 0xa8156 movq -0x8(%rbp), %rdi movl -0xc(%rbp), %esi movq -0x18(%rbp), %rdx movq -0x58(%rbp), %rcx movq -0x30(%rbp), %r8 callq 0xa8200 movl %eax, -0x64(%rbp) movq -0x8(%rbp), %rdi movl -0xc(%rbp), %esi movq -0x18(%rbp), %rdx movl -0x64(%rbp), %ecx callq 0xcabc0 movl %eax, -0x34(%rbp) cmpl $0x0, %eax je 0xa8154 jmp 0xa81cf jmp 0xa8156 cmpl $0x0, -0x68(%rbp) jg 0xa8168 movq -0x50(%rbp), %rax addq $0x18, %rax movq %rax, -0x50(%rbp) cmpl $0x0, -0x68(%rbp) jl 0xa817a movq -0x58(%rbp), %rax addq $0x18, %rax movq %rax, -0x58(%rbp) jmp 0xa802a movq -0x50(%rbp), %rax cmpq $0x0, (%rax) je 0xa81a6 movq -0x8(%rbp), %rdi movl -0xc(%rbp), %esi movq -0x18(%rbp), %rdx movq -0x50(%rbp), %rcx movq -0x30(%rbp), %r8 callq 0xa8350 movl %eax, -0x34(%rbp) jmp 0xa81cd movq -0x58(%rbp), %rax cmpq $0x0, (%rax) je 0xa81cb movq -0x8(%rbp), %rdi movl -0xc(%rbp), %esi movq -0x18(%rbp), %rdx movq -0x58(%rbp), %rcx movq -0x30(%rbp), %r8 callq 0xa83e0 movl %eax, -0x34(%rbp) jmp 0xa81cd jmp 0xa81cf movq -0x8(%rbp), %rdi addq $0x90, %rdi movl $0x2, %esi callq 0xf2a20 movl -0x34(%rbp), %eax movl %eax, -0x78(%rbp) movl -0x78(%rbp), %eax addq $0x80, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_mi_ft_update: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_30], r9 mov [rbp+var_34], 0FFFFFFFFh mov rax, [rbp+var_8] mov rax, [rax] mov rax, [rax+218h] mov ecx, [rbp+var_C] imul rcx, 70h ; 'p' add rax, rcx mov rax, [rax+28h] mov rax, [rax] mov [rbp+var_60], rax mov rdi, [rbp+var_8] mov esi, [rbp+var_C] mov rdx, [rbp+var_20] mov rcx, [rbp+var_8] add rcx, 90h call _mi_ft_parserecord mov [rbp+var_40], rax mov [rbp+var_50], rax cmp rax, 0 jz short loc_A801E mov rdi, [rbp+var_8] mov esi, [rbp+var_C] mov rdx, [rbp+var_28] mov rcx, [rbp+var_8] add rcx, 90h call _mi_ft_parserecord mov [rbp+var_48], rax mov [rbp+var_58], rax cmp rax, 0 jnz short loc_A8023 loc_A801E: jmp loc_A81CF loc_A8023: mov [rbp+var_34], 0 loc_A802A: mov rcx, [rbp+var_50] xor eax, eax cmp qword ptr [rcx], 0 mov [rbp+var_6D], al jz short loc_A8047 mov rax, [rbp+var_58] cmp qword ptr [rax], 0 setnz al mov [rbp+var_6D], al loc_A8047: mov al, [rbp+var_6D] test al, 1 jnz short loc_A8053 jmp loc_A817F loc_A8053: mov rdi, [rbp+var_60] mov rax, [rbp+var_50] mov rsi, [rax] mov rax, [rbp+var_50] mov rdx, [rax+10h] mov rax, [rbp+var_58] mov rcx, [rax] mov rax, [rbp+var_58] mov r8, [rax+10h] xor r9d, r9d call ha_compare_text mov [rbp+var_68], eax cmp [rbp+var_68], 0 jz short loc_A808D xor eax, eax mov [rbp+var_74], eax jmp short loc_A80C1 loc_A808D: mov rax, [rbp+var_50] movsd xmm0, qword ptr [rax+8] mov rax, [rbp+var_58] subsd xmm0, qword ptr [rax+8] movaps xmm1, cs:xmmword_1653D0 pand xmm0, xmm1 movsd xmm1, cs:qword_165160 ucomisd xmm0, xmm1 setnbe al and al, 1 movzx eax, al mov [rbp+var_74], eax loc_A80C1: mov eax, [rbp+var_74] mov [rbp+var_6C], eax cmp [rbp+var_68], 0 jl short loc_A80D3 cmp [rbp+var_6C], 0 jz short loc_A8110 loc_A80D3: mov rdi, [rbp+var_8] mov esi, [rbp+var_C] mov rdx, [rbp+var_18] mov rcx, [rbp+var_50] mov r8, [rbp+var_30] call _ft_make_key mov [rbp+var_64], eax mov rdi, [rbp+var_8] mov esi, [rbp+var_C] mov rdx, [rbp+var_18] mov ecx, [rbp+var_64] call _mi_ck_delete mov [rbp+var_34], eax cmp eax, 0 jz short loc_A810E jmp loc_A81CF loc_A810E: jmp short $+2 loc_A8110: cmp [rbp+var_68], 0 jg short loc_A811C cmp [rbp+var_6C], 0 jz short loc_A8156 loc_A811C: mov rdi, [rbp+var_8] mov esi, [rbp+var_C] mov rdx, [rbp+var_18] mov rcx, [rbp+var_58] mov r8, [rbp+var_30] call _ft_make_key mov [rbp+var_64], eax mov rdi, [rbp+var_8] mov esi, [rbp+var_C] mov rdx, [rbp+var_18] mov ecx, [rbp+var_64] call _mi_ck_write mov [rbp+var_34], eax cmp eax, 0 jz short loc_A8154 jmp short loc_A81CF loc_A8154: jmp short $+2 loc_A8156: cmp [rbp+var_68], 0 jg short loc_A8168 mov rax, [rbp+var_50] add rax, 18h mov [rbp+var_50], rax loc_A8168: cmp [rbp+var_68], 0 jl short loc_A817A mov rax, [rbp+var_58] add rax, 18h mov [rbp+var_58], rax loc_A817A: jmp loc_A802A loc_A817F: mov rax, [rbp+var_50] cmp qword ptr [rax], 0 jz short loc_A81A6 mov rdi, [rbp+var_8] mov esi, [rbp+var_C] mov rdx, [rbp+var_18] mov rcx, [rbp+var_50] mov r8, [rbp+var_30] call _mi_ft_erase mov [rbp+var_34], eax jmp short loc_A81CD loc_A81A6: mov rax, [rbp+var_58] cmp qword ptr [rax], 0 jz short loc_A81CB mov rdi, [rbp+var_8] mov esi, [rbp+var_C] mov rdx, [rbp+var_18] mov rcx, [rbp+var_58] mov r8, [rbp+var_30] call _mi_ft_store mov [rbp+var_34], eax loc_A81CB: jmp short $+2 loc_A81CD: jmp short $+2 loc_A81CF: mov rdi, [rbp+var_8] add rdi, 90h mov esi, 2 call free_root mov eax, [rbp+var_34] mov [rbp+var_78], eax mov eax, [rbp+var_78] add rsp, 80h pop rbp retn
long long mi_ft_update(_QWORD *a1, unsigned int a2, long long a3, long long a4, long long a5, long long a6) { __m128i v6; // xmm0 BOOL v8; // [rsp+Ch] [rbp-74h] bool v9; // [rsp+13h] [rbp-6Dh] int v10; // [rsp+18h] [rbp-68h] unsigned int key; // [rsp+1Ch] [rbp-64h] unsigned int v12; // [rsp+1Ch] [rbp-64h] long long v13; // [rsp+20h] [rbp-60h] long long v14; // [rsp+28h] [rbp-58h] _QWORD *v15; // [rsp+30h] [rbp-50h] unsigned int v16; // [rsp+4Ch] [rbp-34h] v16 = -1; v13 = **(_QWORD **)(112LL * a2 + *(_QWORD *)(*a1 + 536LL) + 40); v15 = (_QWORD *)mi_ft_parserecord(a1, a2, a4, (long long)(a1 + 18)); if ( v15 ) { v14 = mi_ft_parserecord(a1, a2, a5, (long long)(a1 + 18)); if ( v14 ) { v16 = 0; while ( 1 ) { v9 = 0; if ( *v15 ) v9 = *(_QWORD *)v14 != 0LL; if ( !v9 ) break; v10 = ha_compare_text(v13, *v15, v15[2], *(_QWORD *)v14, *(_QWORD *)(v14 + 16), 0LL); if ( v10 ) { v8 = 0; } else { v6 = (__m128i)(unsigned long long)v15[1]; *(double *)v6.m128i_i64 = *(double *)v6.m128i_i64 - *(double *)(v14 + 8); v8 = *(double *)_mm_and_si128(v6, (__m128i)xmmword_1653D0).m128i_i64 > 0.00001; } if ( v10 < 0 || v8 ) { key = ft_make_key(a1, a2, a3, v15, a6); v16 = mi_ck_delete(a1, a2, a3, key); if ( v16 ) goto LABEL_26; } if ( v10 > 0 || v8 ) { v12 = ft_make_key(a1, a2, a3, v14, a6); v16 = mi_ck_write(a1, a2, a3, v12); if ( v16 ) goto LABEL_26; } if ( v10 <= 0 ) v15 += 3; if ( v10 >= 0 ) v14 += 24LL; } if ( *v15 ) { v16 = mi_ft_erase(a1, a2, a3, v15, a6); } else if ( *(_QWORD *)v14 ) { v16 = mi_ft_store(a1, a2, a3, v14, a6); } } } LABEL_26: free_root(a1 + 18, 2LL); return v16; }
_mi_ft_update: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 MOV dword ptr [RBP + -0x34],0xffffffff MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV ECX,dword ptr [RBP + -0xc] IMUL RCX,RCX,0x70 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x60],RAX MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0xc] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x8] ADD RCX,0x90 CALL 0x001a7dc0 MOV qword ptr [RBP + -0x40],RAX MOV qword ptr [RBP + -0x50],RAX CMP RAX,0x0 JZ 0x001a801e MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0xc] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x8] ADD RCX,0x90 CALL 0x001a7dc0 MOV qword ptr [RBP + -0x48],RAX MOV qword ptr [RBP + -0x58],RAX CMP RAX,0x0 JNZ 0x001a8023 LAB_001a801e: JMP 0x001a81cf LAB_001a8023: MOV dword ptr [RBP + -0x34],0x0 LAB_001a802a: MOV RCX,qword ptr [RBP + -0x50] XOR EAX,EAX CMP qword ptr [RCX],0x0 MOV byte ptr [RBP + -0x6d],AL JZ 0x001a8047 MOV RAX,qword ptr [RBP + -0x58] CMP qword ptr [RAX],0x0 SETNZ AL MOV byte ptr [RBP + -0x6d],AL LAB_001a8047: MOV AL,byte ptr [RBP + -0x6d] TEST AL,0x1 JNZ 0x001a8053 JMP 0x001a817f LAB_001a8053: MOV RDI,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RBP + -0x50] MOV RSI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x58] MOV R8,qword ptr [RAX + 0x10] XOR R9D,R9D CALL 0x001f8ce0 MOV dword ptr [RBP + -0x68],EAX CMP dword ptr [RBP + -0x68],0x0 JZ 0x001a808d XOR EAX,EAX MOV dword ptr [RBP + -0x74],EAX JMP 0x001a80c1 LAB_001a808d: MOV RAX,qword ptr [RBP + -0x50] MOVSD XMM0,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x58] SUBSD XMM0,qword ptr [RAX + 0x8] MOVAPS XMM1,xmmword ptr [0x002653d0] PAND XMM0,XMM1 MOVSD XMM1,qword ptr [0x00265160] UCOMISD XMM0,XMM1 SETA AL AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RBP + -0x74],EAX LAB_001a80c1: MOV EAX,dword ptr [RBP + -0x74] MOV dword ptr [RBP + -0x6c],EAX CMP dword ptr [RBP + -0x68],0x0 JL 0x001a80d3 CMP dword ptr [RBP + -0x6c],0x0 JZ 0x001a8110 LAB_001a80d3: MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0xc] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x50] MOV R8,qword ptr [RBP + -0x30] CALL 0x001a8200 MOV dword ptr [RBP + -0x64],EAX MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0xc] MOV RDX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x64] CALL 0x001a8e40 MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JZ 0x001a810e JMP 0x001a81cf LAB_001a810e: JMP 0x001a8110 LAB_001a8110: CMP dword ptr [RBP + -0x68],0x0 JG 0x001a811c CMP dword ptr [RBP + -0x6c],0x0 JZ 0x001a8156 LAB_001a811c: MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0xc] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x58] MOV R8,qword ptr [RBP + -0x30] CALL 0x001a8200 MOV dword ptr [RBP + -0x64],EAX MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0xc] MOV RDX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x64] CALL 0x001cabc0 MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JZ 0x001a8154 JMP 0x001a81cf LAB_001a8154: JMP 0x001a8156 LAB_001a8156: CMP dword ptr [RBP + -0x68],0x0 JG 0x001a8168 MOV RAX,qword ptr [RBP + -0x50] ADD RAX,0x18 MOV qword ptr [RBP + -0x50],RAX LAB_001a8168: CMP dword ptr [RBP + -0x68],0x0 JL 0x001a817a MOV RAX,qword ptr [RBP + -0x58] ADD RAX,0x18 MOV qword ptr [RBP + -0x58],RAX LAB_001a817a: JMP 0x001a802a LAB_001a817f: MOV RAX,qword ptr [RBP + -0x50] CMP qword ptr [RAX],0x0 JZ 0x001a81a6 MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0xc] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x50] MOV R8,qword ptr [RBP + -0x30] CALL 0x001a8350 MOV dword ptr [RBP + -0x34],EAX JMP 0x001a81cd LAB_001a81a6: MOV RAX,qword ptr [RBP + -0x58] CMP qword ptr [RAX],0x0 JZ 0x001a81cb MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0xc] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x58] MOV R8,qword ptr [RBP + -0x30] CALL 0x001a83e0 MOV dword ptr [RBP + -0x34],EAX LAB_001a81cb: JMP 0x001a81cd LAB_001a81cd: JMP 0x001a81cf LAB_001a81cf: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x90 MOV ESI,0x2 CALL 0x001f2a20 MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x78],EAX MOV EAX,dword ptr [RBP + -0x78] ADD RSP,0x80 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int _mi_ft_update(long *param_1,uint param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6) { int8 uVar1; int iVar2; int4 uVar3; bool bVar4; long *local_60; long *local_58; int local_3c; local_3c = -1; uVar1 = **(int8 **)(*(long *)(*param_1 + 0x218) + (ulong)param_2 * 0x70 + 0x28); local_58 = (long *)_mi_ft_parserecord(param_1,param_2,param_4,param_1 + 0x12); if ((local_58 != (long *)0x0) && (local_60 = (long *)_mi_ft_parserecord(param_1,param_2,param_5,param_1 + 0x12), local_60 != (long *)0x0)) { local_3c = 0; while( true ) { bVar4 = false; if (*local_58 != 0) { bVar4 = *local_60 != 0; } if (!bVar4) break; iVar2 = ha_compare_text(uVar1,*local_58,local_58[2],*local_60,local_60[2],0); if (iVar2 == 0) { bVar4 = DAT_00265160 < (double)((ulong)((double)local_58[1] - (double)local_60[1]) & _DAT_002653d0); } else { bVar4 = false; } if ((iVar2 < 0) || (bVar4)) { uVar3 = _ft_make_key(param_1,param_2,param_3,local_58,param_6); local_3c = _mi_ck_delete(param_1,param_2,param_3,uVar3); if (local_3c != 0) goto LAB_001a81cf; } if ((0 < iVar2) || (bVar4)) { uVar3 = _ft_make_key(param_1,param_2,param_3,local_60,param_6); local_3c = _mi_ck_write(param_1,param_2,param_3,uVar3); if (local_3c != 0) goto LAB_001a81cf; } if (iVar2 < 1) { local_58 = local_58 + 3; } if (-1 < iVar2) { local_60 = local_60 + 3; } } if (*local_58 == 0) { if (*local_60 != 0) { local_3c = _mi_ft_store(param_1,param_2,param_3,local_60,param_6); } } else { local_3c = _mi_ft_erase(param_1,param_2,param_3,local_58,param_6); } } LAB_001a81cf: free_root(param_1 + 0x12,2); return local_3c; }
16,836
js_regexp_finalizer
bluesky950520[P]quickjs/quickjs.c
static void js_regexp_finalizer(JSRuntime *rt, JSValue val) { JSObject *p = JS_VALUE_GET_OBJ(val); JSRegExp *re = &p->u.regexp; JS_FreeValueRT(rt, JS_MKPTR(JS_TAG_STRING, re->bytecode)); JS_FreeValueRT(rt, JS_MKPTR(JS_TAG_STRING, re->pattern)); }
O1
c
js_regexp_finalizer: pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movq 0x38(%rsi), %rsi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x3a062 movq %rbx, %rdi movq $-0x7, %rdx callq 0x20652 movq 0x30(%r14), %rsi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x3a088 movq %rbx, %rdi movq $-0x7, %rdx addq $0x8, %rsp popq %rbx popq %r14 jmp 0x20652 addq $0x8, %rsp popq %rbx popq %r14 retq
js_regexp_finalizer: push r14 push rbx push rax mov r14, rsi mov rbx, rdi mov rsi, [rsi+38h] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short loc_3A062 mov rdi, rbx mov rdx, 0FFFFFFFFFFFFFFF9h call js_free_value_rt loc_3A062: mov rsi, [r14+30h] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short loc_3A088 mov rdi, rbx mov rdx, 0FFFFFFFFFFFFFFF9h add rsp, 8 pop rbx pop r14 jmp js_free_value_rt loc_3A088: add rsp, 8 pop rbx pop r14 retn
long long js_regexp_finalizer(long long a1, long long a2, long long a3, long long a4, long long a5, long long a6) { _QWORD *v7; // rsi int v8; // eax long long v9; // rcx _QWORD *v10; // rsi long long result; // rax long long v12; // rcx v7 = *(_QWORD **)(a2 + 56); v8 = *(_DWORD *)v7; v9 = (unsigned int)(*(_DWORD *)v7 - 1); *(_DWORD *)v7 = v9; if ( v8 <= 1 ) js_free_value_rt(a1, v7, -7LL, v9, a5, a6); v10 = *(_QWORD **)(a2 + 48); result = *(unsigned int *)v10; v12 = (unsigned int)(result - 1); *(_DWORD *)v10 = v12; if ( (int)result <= 1 ) return js_free_value_rt(a1, v10, -7LL, v12, a5, a6); return result; }
js_regexp_finalizer: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV RSI,qword ptr [RSI + 0x38] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x0013a062 MOV RDI,RBX MOV RDX,-0x7 CALL 0x00120652 LAB_0013a062: MOV RSI,qword ptr [R14 + 0x30] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x0013a088 MOV RDI,RBX MOV RDX,-0x7 ADD RSP,0x8 POP RBX POP R14 JMP 0x00120652 LAB_0013a088: ADD RSP,0x8 POP RBX POP R14 RET
void js_regexp_finalizer(int8 param_1,long param_2) { int iVar1; int *piVar2; piVar2 = *(int **)(param_2 + 0x38); iVar1 = *piVar2; *piVar2 = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(param_1,piVar2,0xfffffffffffffff9); } piVar2 = *(int **)(param_2 + 0x30); iVar1 = *piVar2; *piVar2 = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(param_1,piVar2,0xfffffffffffffff9); return; } return; }
16,837
js_regexp_finalizer
bluesky950520[P]quickjs/quickjs.c
static void js_regexp_finalizer(JSRuntime *rt, JSValue val) { JSObject *p = JS_VALUE_GET_OBJ(val); JSRegExp *re = &p->u.regexp; JS_FreeValueRT(rt, JS_MKPTR(JS_TAG_STRING, re->bytecode)); JS_FreeValueRT(rt, JS_MKPTR(JS_TAG_STRING, re->pattern)); }
O3
c
js_regexp_finalizer: pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movq 0x38(%rsi), %rsi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x3b5c5 movq %rbx, %rdi movq $-0x7, %rdx callq 0x20d90 movq 0x30(%r14), %rsi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x3b5eb movq %rbx, %rdi movq $-0x7, %rdx addq $0x8, %rsp popq %rbx popq %r14 jmp 0x20d90 addq $0x8, %rsp popq %rbx popq %r14 retq
js_regexp_finalizer: push r14 push rbx push rax mov r14, rsi mov rbx, rdi mov rsi, [rsi+38h] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short loc_3B5C5 mov rdi, rbx mov rdx, 0FFFFFFFFFFFFFFF9h call js_free_value_rt loc_3B5C5: mov rsi, [r14+30h] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short loc_3B5EB mov rdi, rbx mov rdx, 0FFFFFFFFFFFFFFF9h add rsp, 8 pop rbx pop r14 jmp js_free_value_rt loc_3B5EB: add rsp, 8 pop rbx pop r14 retn
long long js_regexp_finalizer(long long a1, long long a2, long long a3, long long a4, long long a5, long long a6) { _QWORD *v7; // rsi int v8; // eax long long v9; // rcx _QWORD *v10; // rsi long long result; // rax long long v12; // rcx v7 = *(_QWORD **)(a2 + 56); v8 = *(_DWORD *)v7; v9 = (unsigned int)(*(_DWORD *)v7 - 1); *(_DWORD *)v7 = v9; if ( v8 <= 1 ) js_free_value_rt(a1, v7, -7LL, v9, a5, a6); v10 = *(_QWORD **)(a2 + 48); result = *(unsigned int *)v10; v12 = (unsigned int)(result - 1); *(_DWORD *)v10 = v12; if ( (int)result <= 1 ) return js_free_value_rt(a1, v10, -7LL, v12, a5, a6); return result; }
js_regexp_finalizer: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV RSI,qword ptr [RSI + 0x38] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x0013b5c5 MOV RDI,RBX MOV RDX,-0x7 CALL 0x00120d90 LAB_0013b5c5: MOV RSI,qword ptr [R14 + 0x30] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x0013b5eb MOV RDI,RBX MOV RDX,-0x7 ADD RSP,0x8 POP RBX POP R14 JMP 0x00120d90 LAB_0013b5eb: ADD RSP,0x8 POP RBX POP R14 RET
void js_regexp_finalizer(int8 param_1,long param_2) { int iVar1; int *piVar2; piVar2 = *(int **)(param_2 + 0x38); iVar1 = *piVar2; *piVar2 = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(param_1,piVar2,0xfffffffffffffff9); } piVar2 = *(int **)(param_2 + 0x30); iVar1 = *piVar2; *piVar2 = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(param_1,piVar2,0xfffffffffffffff9); return; } return; }
16,838
map_to_g2
corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/map_to_g2.c
static void map_to_g2(POINTonE2 *out, const vec384x u, const vec384x v) { POINTonE2 p; map_to_isogenous_E2(&p, u); if (v != NULL) { map_to_isogenous_E2(out, v); /* borrow |out| */ POINTonE2_dadd(&p, &p, out, Aprime_E2); } isogeny_map_to_E2(&p, &p); /* sprinkle isogenous powder */ clear_cofactor(out, &p); }
O0
c
map_to_g2: pushq %rbp movq %rsp, %rbp subq $0x140, %rsp # imm = 0x140 movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x10(%rbp), %rsi leaq -0x138(%rbp), %rdi callq 0xbb0e0 cmpq $0x0, -0x18(%rbp) je 0xacfd5 movq -0x8(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0xbb0e0 movq -0x8(%rbp), %rdx leaq -0x138(%rbp), %rsi leaq 0x3a093(%rip), %rcx # 0xe7060 movq %rsi, %rdi callq 0xab220 leaq -0x138(%rbp), %rsi movq %rsi, %rdi callq 0xbb470 movq -0x8(%rbp), %rdi leaq -0x138(%rbp), %rsi callq 0xbb7c0 addq $0x140, %rsp # imm = 0x140 popq %rbp retq nopl (%rax)
map_to_g2: push rbp mov rbp, rsp sub rsp, 140h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rsi, [rbp+var_10] lea rdi, [rbp+var_138] call map_to_isogenous_E2 cmp [rbp+var_18], 0 jz short loc_ACFD5 mov rdi, [rbp+var_8] mov rsi, [rbp+var_18] call map_to_isogenous_E2 mov rdx, [rbp+var_8] lea rsi, [rbp+var_138] lea rcx, Aprime_E2 mov rdi, rsi call POINTonE2_dadd loc_ACFD5: lea rsi, [rbp+var_138] mov rdi, rsi call isogeny_map_to_E2 mov rdi, [rbp+var_8] lea rsi, [rbp+var_138] call clear_cofactor add rsp, 140h pop rbp retn
long long map_to_g2(long long a1, long long a2, long long a3) { _BYTE v4[288]; // [rsp+8h] [rbp-138h] BYREF long long v5; // [rsp+128h] [rbp-18h] long long v6; // [rsp+130h] [rbp-10h] long long v7; // [rsp+138h] [rbp-8h] v7 = a1; v6 = a2; v5 = a3; map_to_isogenous_E2(v4, a2); if ( v5 ) { map_to_isogenous_E2(v7, v5); POINTonE2_dadd((long long)v4, (long long)v4, v7, (long long)&Aprime_E2); } isogeny_map_to_E2(v4); return clear_cofactor(v7, v4); }
map_to_g2: PUSH RBP MOV RBP,RSP SUB RSP,0x140 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RSI,qword ptr [RBP + -0x10] LEA RDI,[RBP + -0x138] CALL 0x001bb0e0 CMP qword ptr [RBP + -0x18],0x0 JZ 0x001acfd5 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x18] CALL 0x001bb0e0 MOV RDX,qword ptr [RBP + -0x8] LEA RSI,[RBP + -0x138] LEA RCX,[0x1e7060] MOV RDI,RSI CALL 0x001ab220 LAB_001acfd5: LEA RSI,[RBP + -0x138] MOV RDI,RSI CALL 0x001bb470 MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[RBP + -0x138] CALL 0x001bb7c0 ADD RSP,0x140 POP RBP RET
void map_to_g2(int8 param_1,int8 param_2,long param_3) { int1 local_140 [288]; long local_20; int8 local_18; int8 local_10; local_20 = param_3; local_18 = param_2; local_10 = param_1; map_to_isogenous_E2(local_140,param_2); if (local_20 != 0) { map_to_isogenous_E2(local_10,local_20); POINTonE2_dadd(local_140,local_140,local_10,Aprime_E2); } isogeny_map_to_E2(local_140); clear_cofactor(local_10,local_140); return; }
16,839
testing::internal::(anonymous namespace)::PositiveAndNegativeUnitTestFilter::PositiveAndNegativeUnitTestFilter(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
giladroyz[P]FindPeaks/build_O2/_deps/googletest-src/googletest/src/gtest.cc
explicit PositiveAndNegativeUnitTestFilter(const std::string& filter) { std::vector<std::string> positive_and_negative_filters; // NOTE: `SplitString` always returns a non-empty container. SplitString(filter, '-', &positive_and_negative_filters); const auto& positive_filter = positive_and_negative_filters.front(); if (positive_and_negative_filters.size() > 1) { positive_filter_ = UnitTestFilter( positive_filter.empty() ? kUniversalFilter : positive_filter); // TODO(b/214626361): Fail on multiple '-' characters // For the moment to preserve old behavior we concatenate the rest of the // string parts with `-` as separator to generate the negative filter. auto negative_filter_string = positive_and_negative_filters[1]; for (std::size_t i = 2; i < positive_and_negative_filters.size(); i++) negative_filter_string = negative_filter_string + '-' + positive_and_negative_filters[i]; negative_filter_ = UnitTestFilter(negative_filter_string); } else { // In case we don't have a negative filter and positive filter is "" // we do not use kUniversalFilter by design as opposed to when we have a // negative filter. positive_filter_ = UnitTestFilter(positive_filter); } }
O2
cpp
testing::internal::(anonymous namespace)::PositiveAndNegativeUnitTestFilter::PositiveAndNegativeUnitTestFilter(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 $0xc8, %rsp movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, (%rdi) andq $0x0, 0x10(%rdi) leaq 0x48(%rdi), %rax movq %rax, 0x18(%rdi) pushq $0x1 popq %rax movq %rax, 0x20(%rdi) movups %xmm0, 0x28(%rdi) movl $0x3f800000, %ecx # imm = 0x3F800000 movl %ecx, 0x38(%rdi) leaq 0x50(%rdi), %rdx movq %rdx, 0x30(%rsp) leaq 0x98(%rdi), %rdx andq $0x0, 0x60(%rdi) movups %xmm0, 0x40(%rdi) movups %xmm0, 0x50(%rdi) movq %rdx, 0x68(%rdi) movq %rax, 0x70(%rdi) movups %xmm0, 0x78(%rdi) movl %ecx, 0x88(%rdi) movups %xmm0, 0x90(%rdi) leaq 0x10(%rsp), %rdx movaps %xmm0, (%rdx) andq $0x0, 0x10(%rdx) leaq 0x39a12(%rip), %rdi # 0x4e6c8 pushq $0x2d popq %rsi callq 0x10b2a movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rax subq %rsi, %rax cmpq $0x21, %rax jb 0x14ceb movq 0x8(%rsi), %r12 testq %r12, %r12 movq %rbx, 0x8(%rsp) je 0x14d12 leaq 0x38(%rsp), %rdi callq 0x87a0 jmp 0x14d28 leaq 0x58(%rsp), %rdi callq 0x149da leaq 0x58(%rsp), %r14 movq %rbx, %rdi movq %r14, %rsi callq 0x22dfa movq %r14, %rdi callq 0x14bc4 jmp 0x14e15 leaq 0x1d14b(%rip), %rsi # 0x31e64 leaq 0x38(%rsp), %rdi leaq 0x7(%rsp), %rdx callq 0x81f0 leaq 0x58(%rsp), %rdi leaq 0x38(%rsp), %rsi callq 0x149da leaq 0x58(%rsp), %r15 movq %rbx, %rdi movq %r15, %rsi callq 0x22dfa movq %r15, %rdi callq 0x14bc4 leaq 0x38(%rsp), %rdi callq 0x8ad8 testq %r12, %r12 movq 0x10(%rsp), %rsi addq $0x20, %rsi leaq 0x38(%rsp), %rdi callq 0x87a0 pushq $0x2 popq %r14 pushq $0x40 popq %rbx leaq 0xa8(%rsp), %r15 leaq 0x38(%rsp), %r12 pushq $0x2d popq %rbp leaq 0x58(%rsp), %r13 movq 0x18(%rsp), %rax subq 0x10(%rsp), %rax sarq $0x5, %rax cmpq %rax, %r14 jae 0x14de2 movq %r15, %rdi movq %r12, %rsi movl %ebp, %edx callq 0x2498c movq 0x10(%rsp), %rdx addq %rbx, %rdx movq %r13, %rdi movq %r15, %rsi callq 0x2496d movq %r12, %rdi movq %r13, %rsi callq 0x8670 movq %r13, %rdi callq 0x8ad8 movq %r15, %rdi callq 0x8ad8 incq %r14 addq $0x20, %rbx jmp 0x14d8b leaq 0x58(%rsp), %rdi leaq 0x38(%rsp), %rsi callq 0x149da leaq 0x58(%rsp), %rbx movq 0x30(%rsp), %rdi movq %rbx, %rsi callq 0x22dfa movq %rbx, %rdi callq 0x14bc4 leaq 0x38(%rsp), %rdi callq 0x8ad8 leaq 0x10(%rsp), %rdi callq 0x246f8 addq $0xc8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x14e6a jmp 0x14e53 movq %rax, %r15 leaq 0x38(%rsp), %rdi callq 0x8ad8 jmp 0x14e47 movq %rax, %r15 testq %r12, %r12 jmp 0x14e77 jmp 0x14e4e movq %rbx, 0x8(%rsp) movq %rax, %r15 jmp 0x14e77 movq %rax, %r15 leaq 0xa8(%rsp), %rdi callq 0x8ad8 jmp 0x14e6d movq %rax, %r15 leaq 0x38(%rsp), %rdi callq 0x8ad8 leaq 0x10(%rsp), %rdi callq 0x246f8 movq 0x30(%rsp), %rdi callq 0x14bc4 movq 0x8(%rsp), %rdi callq 0x14bc4 movq %r15, %rdi callq 0x89a0 nop
_ZN7testing8internal12_GLOBAL__N_133PositiveAndNegativeUnitTestFilterC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0C8h mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 and qword ptr [rdi+10h], 0 lea rax, [rdi+48h] mov [rdi+18h], rax push 1 pop rax mov [rdi+20h], rax movups xmmword ptr [rdi+28h], xmm0 mov ecx, 3F800000h mov [rdi+38h], ecx lea rdx, [rdi+50h] mov [rsp+0F8h+var_C8], rdx lea rdx, [rdi+98h] and qword ptr [rdi+60h], 0 movups xmmword ptr [rdi+40h], xmm0 movups xmmword ptr [rdi+50h], xmm0 mov [rdi+68h], rdx mov [rdi+70h], rax movups xmmword ptr [rdi+78h], xmm0 mov [rdi+88h], ecx movups xmmword ptr [rdi+90h], xmm0 lea rdx, [rsp+0F8h+var_E8] movaps xmmword ptr [rdx], xmm0 and qword ptr [rdx+10h], 0 lea rdi, _ZN7testing18FLAGS_gtest_filterB5cxx11E; testing::FLAGS_gtest_filter push 2Dh ; '-' pop rsi call _ZN7testing8internal11SplitStringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcPSt6vectorIS6_SaIS6_EE; testing::internal::SplitString(std::string const&,char,std::vector<std::string> *) mov rsi, [rsp+0F8h+var_E8] mov rax, [rsp+0F8h+var_E0] sub rax, rsi cmp rax, 21h ; '!' jb short loc_14CEB mov r12, [rsi+8] test r12, r12 mov [rsp+0F8h+var_F0], rbx jz short loc_14D12 lea rdi, [rsp+0F8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) jmp short loc_14D28 loc_14CEB: lea rdi, [rsp+0F8h+var_A0] call _ZN7testing8internal12_GLOBAL__N_114UnitTestFilterC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::`anonymous namespace'::UnitTestFilter::UnitTestFilter(std::string const&) lea r14, [rsp+0F8h+var_A0] mov rdi, rbx mov rsi, r14 call _ZN7testing8internal12_GLOBAL__N_114UnitTestFilteraSEOS2_; testing::internal::`anonymous namespace'::UnitTestFilter::operator=(testing::internal::`anonymous namespace'::UnitTestFilter&&) mov rdi, r14; this call _ZN7testing8internal12_GLOBAL__N_114UnitTestFilterD2Ev; testing::internal::`anonymous namespace'::UnitTestFilter::~UnitTestFilter() jmp loc_14E15 loc_14D12: lea rsi, _ZN7testingL16kUniversalFilterE; "*" lea rdi, [rsp+0F8h+var_C0] lea rdx, [rsp+0F8h+var_F1] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&) loc_14D28: lea rdi, [rsp+0F8h+var_A0] lea rsi, [rsp+0F8h+var_C0] call _ZN7testing8internal12_GLOBAL__N_114UnitTestFilterC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::`anonymous namespace'::UnitTestFilter::UnitTestFilter(std::string const&) lea r15, [rsp+0F8h+var_A0] mov rdi, rbx mov rsi, r15 call _ZN7testing8internal12_GLOBAL__N_114UnitTestFilteraSEOS2_; testing::internal::`anonymous namespace'::UnitTestFilter::operator=(testing::internal::`anonymous namespace'::UnitTestFilter&&) mov rdi, r15; this call _ZN7testing8internal12_GLOBAL__N_114UnitTestFilterD2Ev; testing::internal::`anonymous namespace'::UnitTestFilter::~UnitTestFilter() lea rdi, [rsp+0F8h+var_C0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test r12, r12 mov rsi, [rsp+0F8h+var_E8] add rsi, 20h ; ' ' lea rdi, [rsp+0F8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) push 2 pop r14 push 40h ; '@' pop rbx lea r15, [rsp+0F8h+var_50] lea r12, [rsp+0F8h+var_C0] push 2Dh ; '-' pop rbp lea r13, [rsp+0F8h+var_A0] loc_14D8B: mov rax, [rsp+0F8h+var_E0] sub rax, [rsp+0F8h+var_E8] sar rax, 5 cmp r14, rax jnb short loc_14DE2 mov rdi, r15 mov rsi, r12 mov edx, ebp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_S5_; std::operator+<char>(std::string const&,char) mov rdx, [rsp+0F8h+var_E8] add rdx, rbx mov rdi, r13 mov rsi, r15 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_; std::operator+<char>(std::string&&,std::string const&) mov rdi, r12 mov rsi, r13 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, r13; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r15; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() inc r14 add rbx, 20h ; ' ' jmp short loc_14D8B loc_14DE2: lea rdi, [rsp+0F8h+var_A0] lea rsi, [rsp+0F8h+var_C0] call _ZN7testing8internal12_GLOBAL__N_114UnitTestFilterC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::`anonymous namespace'::UnitTestFilter::UnitTestFilter(std::string const&) lea rbx, [rsp+0F8h+var_A0] mov rdi, [rsp+0F8h+var_C8] mov rsi, rbx call _ZN7testing8internal12_GLOBAL__N_114UnitTestFilteraSEOS2_; testing::internal::`anonymous namespace'::UnitTestFilter::operator=(testing::internal::`anonymous namespace'::UnitTestFilter&&) mov rdi, rbx; this call _ZN7testing8internal12_GLOBAL__N_114UnitTestFilterD2Ev; testing::internal::`anonymous namespace'::UnitTestFilter::~UnitTestFilter() lea rdi, [rsp+0F8h+var_C0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_14E15: lea rdi, [rsp+0F8h+var_E8]; void * call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() add rsp, 0C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_14E6A jmp short loc_14E53 mov r15, rax lea rdi, [rsp+arg_30]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_14E47 mov r15, rax loc_14E47: test r12, r12 jmp short loc_14E77 jmp short $+2 loc_14E4E: mov [rsp+arg_0], rbx loc_14E53: mov r15, rax jmp short loc_14E77 mov r15, rax lea rdi, [rsp+arg_A0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_14E6D loc_14E6A: mov r15, rax loc_14E6D: lea rdi, [rsp+arg_30]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_14E77: lea rdi, [rsp+arg_8]; void * call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, [rsp+arg_28]; this call _ZN7testing8internal12_GLOBAL__N_114UnitTestFilterD2Ev; testing::internal::`anonymous namespace'::UnitTestFilter::~UnitTestFilter() mov rdi, [rsp+arg_0]; this call _ZN7testing8internal12_GLOBAL__N_114UnitTestFilterD2Ev; testing::internal::`anonymous namespace'::UnitTestFilter::~UnitTestFilter() mov rdi, r15 call __Unwind_Resume
void testing::internal::`anonymous namespace'::PositiveAndNegativeUnitTestFilter::PositiveAndNegativeUnitTestFilter( long long a1) { long long v1; // r12 unsigned long long v2; // r14 long long v3; // rbx char v4; // [rsp+7h] [rbp-F1h] BYREF long long v5; // [rsp+8h] [rbp-F0h] __int128 v6; // [rsp+10h] [rbp-E8h] BYREF long long v7; // [rsp+20h] [rbp-D8h] long long v8; // [rsp+30h] [rbp-C8h] _BYTE v9[32]; // [rsp+38h] [rbp-C0h] BYREF _BYTE v10[80]; // [rsp+58h] [rbp-A0h] BYREF _BYTE v11[80]; // [rsp+A8h] [rbp-50h] BYREF *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; *(_QWORD *)(a1 + 24) = a1 + 72; *(_QWORD *)(a1 + 32) = 1LL; *(_OWORD *)(a1 + 40) = 0LL; *(_DWORD *)(a1 + 56) = 1065353216; v8 = a1 + 80; *(_QWORD *)(a1 + 96) = 0LL; *(_OWORD *)(a1 + 64) = 0LL; *(_OWORD *)(a1 + 80) = 0LL; *(_QWORD *)(a1 + 104) = a1 + 152; *(_QWORD *)(a1 + 112) = 1LL; *(_OWORD *)(a1 + 120) = 0LL; *(_DWORD *)(a1 + 136) = 1065353216; *(_OWORD *)(a1 + 144) = 0LL; v6 = 0LL; v7 = 0LL; testing::internal::SplitString((long long)&testing::FLAGS_gtest_filter[abi:cxx11], 45, &v6); if ( *((_QWORD *)&v6 + 1) - (_QWORD)v6 < 0x21uLL ) { testing::internal::`anonymous namespace'::UnitTestFilter::UnitTestFilter((long long)v10, v6); testing::internal::`anonymous namespace'::UnitTestFilter::operator=(a1, v10); testing::internal::`anonymous namespace'::UnitTestFilter::~UnitTestFilter((testing::internal::_anonymous_namespace_::UnitTestFilter *)v10); } else { v1 = *(_QWORD *)(v6 + 8); v5 = a1; if ( v1 ) std::string::basic_string(v9, v6); else std::string::basic_string(v9, "*", &v4); testing::internal::`anonymous namespace'::UnitTestFilter::UnitTestFilter((long long)v10, (long long)v9); testing::internal::`anonymous namespace'::UnitTestFilter::operator=(a1, v10); testing::internal::`anonymous namespace'::UnitTestFilter::~UnitTestFilter((testing::internal::_anonymous_namespace_::UnitTestFilter *)v10); std::string::~string(v9); std::string::basic_string(v9, v6 + 32); v2 = 2LL; v3 = 64LL; while ( v2 < (long long)(*((_QWORD *)&v6 + 1) - v6) >> 5 ) { std::operator+<char>(v11, v9, 45LL); std::operator+<char>(v10, v11, v3 + v6); std::string::operator=(v9, v10); std::string::~string(v10); std::string::~string(v11); ++v2; v3 += 32LL; } testing::internal::`anonymous namespace'::UnitTestFilter::UnitTestFilter((long long)v10, (long long)v9); testing::internal::`anonymous namespace'::UnitTestFilter::operator=(v8, v10); testing::internal::`anonymous namespace'::UnitTestFilter::~UnitTestFilter((testing::internal::_anonymous_namespace_::UnitTestFilter *)v10); std::string::~string(v9); } std::vector<std::string>::~vector(&v6); }
PositiveAndNegativeUnitTestFilter: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xc8 MOV RBX,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 AND qword ptr [RDI + 0x10],0x0 LEA RAX,[RDI + 0x48] MOV qword ptr [RDI + 0x18],RAX PUSH 0x1 POP RAX MOV qword ptr [RDI + 0x20],RAX MOVUPS xmmword ptr [RDI + 0x28],XMM0 MOV ECX,0x3f800000 MOV dword ptr [RDI + 0x38],ECX LEA RDX,[RDI + 0x50] MOV qword ptr [RSP + 0x30],RDX LEA RDX,[RDI + 0x98] AND qword ptr [RDI + 0x60],0x0 MOVUPS xmmword ptr [RDI + 0x40],XMM0 MOVUPS xmmword ptr [RDI + 0x50],XMM0 MOV qword ptr [RDI + 0x68],RDX MOV qword ptr [RDI + 0x70],RAX MOVUPS xmmword ptr [RDI + 0x78],XMM0 MOV dword ptr [RDI + 0x88],ECX MOVUPS xmmword ptr [RDI + 0x90],XMM0 LEA RDX,[RSP + 0x10] MOVAPS xmmword ptr [RDX],XMM0 AND qword ptr [RDX + 0x10],0x0 LAB_00114caf: LEA RDI,[0x14e6c8] PUSH 0x2d POP RSI CALL 0x00110b2a MOV RSI,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP + 0x18] SUB RAX,RSI CMP RAX,0x21 JC 0x00114ceb MOV R12,qword ptr [RSI + 0x8] TEST R12,R12 MOV qword ptr [RSP + 0x8],RBX JZ 0x00114d12 LAB_00114cdf: LEA RDI,[RSP + 0x38] CALL 0x001087a0 JMP 0x00114d28 LAB_00114ceb: LEA RDI,[RSP + 0x58] CALL 0x001149da LEA R14,[RSP + 0x58] MOV RDI,RBX MOV RSI,R14 CALL 0x00122dfa MOV RDI,R14 CALL 0x00114bc4 JMP 0x00114e15 LAB_00114d12: LEA RSI,[0x131e64] LEA RDI,[RSP + 0x38] LEA RDX,[RSP + 0x7] CALL 0x001081f0 LAB_00114d28: LEA RDI,[RSP + 0x58] LEA RSI,[RSP + 0x38] CALL 0x001149da LEA R15,[RSP + 0x58] MOV RDI,RBX MOV RSI,R15 CALL 0x00122dfa MOV RDI,R15 CALL 0x00114bc4 LEA RDI,[RSP + 0x38] CALL 0x00108ad8 TEST R12,R12 MOV RSI,qword ptr [RSP + 0x10] ADD RSI,0x20 LAB_00114d65: LEA RDI,[RSP + 0x38] CALL 0x001087a0 PUSH 0x2 POP R14 PUSH 0x40 POP RBX LEA R15,[RSP + 0xa8] LEA R12,[RSP + 0x38] PUSH 0x2d POP RBP LEA R13,[RSP + 0x58] LAB_00114d8b: MOV RAX,qword ptr [RSP + 0x18] SUB RAX,qword ptr [RSP + 0x10] SAR RAX,0x5 CMP R14,RAX JNC 0x00114de2 LAB_00114d9e: MOV RDI,R15 MOV RSI,R12 MOV EDX,EBP CALL 0x0012498c MOV RDX,qword ptr [RSP + 0x10] ADD RDX,RBX LAB_00114db3: MOV RDI,R13 MOV RSI,R15 CALL 0x0012496d MOV RDI,R12 MOV RSI,R13 CALL 0x00108670 MOV RDI,R13 CALL 0x00108ad8 MOV RDI,R15 CALL 0x00108ad8 INC R14 ADD RBX,0x20 JMP 0x00114d8b LAB_00114de2: LEA RDI,[RSP + 0x58] LEA RSI,[RSP + 0x38] CALL 0x001149da LAB_00114df1: LEA RBX,[RSP + 0x58] MOV RDI,qword ptr [RSP + 0x30] MOV RSI,RBX CALL 0x00122dfa MOV RDI,RBX CALL 0x00114bc4 LEA RDI,[RSP + 0x38] CALL 0x00108ad8 LAB_00114e15: LEA RDI,[RSP + 0x10] CALL 0x001246f8 ADD RSP,0xc8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* testing::internal::(anonymous namespace)::PositiveAndNegativeUnitTestFilter::PositiveAndNegativeUnitTestFilter(std::__cxx11::string const&) */ void __thiscall testing::internal::(anonymous_namespace)::PositiveAndNegativeUnitTestFilter:: PositiveAndNegativeUnitTestFilter(PositiveAndNegativeUnitTestFilter *this,string *param_1) { ulong uVar1; allocator local_f1; PositiveAndNegativeUnitTestFilter *local_f0; string *local_e8; long lStack_e0; int8 local_d8; PositiveAndNegativeUnitTestFilter *local_c8; string local_c0 [32]; UnitTestFilter local_a0 [80]; string local_50 [32]; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; *(PositiveAndNegativeUnitTestFilter **)(this + 0x18) = this + 0x48; *(int8 *)(this + 0x20) = 1; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(int4 *)(this + 0x38) = 0x3f800000; local_c8 = this + 0x50; *(int8 *)(this + 0x60) = 0; *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; *(int8 *)(this + 0x50) = 0; *(int8 *)(this + 0x58) = 0; *(PositiveAndNegativeUnitTestFilter **)(this + 0x68) = this + 0x98; *(int8 *)(this + 0x70) = 1; *(int8 *)(this + 0x78) = 0; *(int8 *)(this + 0x80) = 0; *(int4 *)(this + 0x88) = 0x3f800000; *(int8 *)(this + 0x90) = 0; *(int8 *)(this + 0x98) = 0; local_e8 = (string *)0x0; lStack_e0 = 0; local_d8 = 0; /* try { // try from 00114caf to 00114cbd has its CatchHandler @ 00114e4e */ SplitString((string *)FLAGS_gtest_filter_abi_cxx11_,'-',(vector *)&local_e8); if ((ulong)(lStack_e0 - (long)local_e8) < 0x21) { /* try { // try from 00114ceb to 00114cf4 has its CatchHandler @ 00114e4c */ UnitTestFilter::UnitTestFilter(local_a0,local_e8); UnitTestFilter::operator=((UnitTestFilter *)this,local_a0); UnitTestFilter::~UnitTestFilter(local_a0); } else { local_f0 = this; if (*(long *)(local_e8 + 8) == 0) { /* try { // try from 00114d12 to 00114d27 has its CatchHandler @ 00114e44 */ std::__cxx11::string::string(local_c0,"*",&local_f1); } else { /* try { // try from 00114cdf to 00114ce8 has its CatchHandler @ 00114e44 */ std::__cxx11::string::string(local_c0,local_e8); } /* try { // try from 00114d28 to 00114d36 has its CatchHandler @ 00114e35 */ UnitTestFilter::UnitTestFilter(local_a0,local_c0); UnitTestFilter::operator=((UnitTestFilter *)this,local_a0); UnitTestFilter::~UnitTestFilter(local_a0); std::__cxx11::string::~string(local_c0); /* try { // try from 00114d65 to 00114d6e has its CatchHandler @ 00114e33 */ std::__cxx11::string::string(local_c0,local_e8 + 0x20); for (uVar1 = 2; uVar1 < (ulong)(lStack_e0 - (long)local_e8 >> 5); uVar1 = uVar1 + 1) { /* try { // try from 00114d9e to 00114daa has its CatchHandler @ 00114e6a */ std::operator+(local_50,(char)local_c0); /* try { // try from 00114db3 to 00114dbd has its CatchHandler @ 00114e58 */ std::operator+((string *)local_a0,local_50); std::__cxx11::string::operator=(local_c0,(string *)local_a0); std::__cxx11::string::~string((string *)local_a0); std::__cxx11::string::~string(local_50); } /* try { // try from 00114de2 to 00114df0 has its CatchHandler @ 00114e31 */ UnitTestFilter::UnitTestFilter(local_a0,local_c0); UnitTestFilter::operator=((UnitTestFilter *)local_c8,local_a0); UnitTestFilter::~UnitTestFilter(local_a0); std::__cxx11::string::~string(local_c0); } std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_e8); return; }
16,840
mysql_list_tables_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_list_tables_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_list_tables, (parms->mysql, parms->wild), parms->mysql, MYSQL_RES *, r_ptr) }
O0
c
mysql_list_tables_start_internal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x10(%rbp), %rax movq 0x8(%rax), %rsi callq 0x20070 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x20(%rbp), %rax movl $0x0, (%rax) addq $0x20, %rsp popq %rbp retq nop
mysql_list_tables_start_internal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rdi, [rax] mov rax, [rbp+var_10] mov rsi, [rax+8] call mysql_list_tables mov [rbp+var_18], rax mov rcx, [rbp+var_18] mov rax, [rbp+var_20] mov [rax+8], rcx mov rax, [rbp+var_20] mov dword ptr [rax], 0 add rsp, 20h pop rbp retn
long long mysql_list_tables_start_internal(long long a1) { long long result; // rax long long v2; // [rsp+0h] [rbp-20h] v2 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 1152LL) + 40LL); *(_QWORD *)(v2 + 8) = mysql_list_tables(*(_QWORD *)a1, *(const char **)(a1 + 8)); result = v2; *(_DWORD *)v2 = 0; return result; }
mysql_list_tables_start_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x8] CALL 0x00120070 MOV qword ptr [RBP + -0x18],RAX MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],0x0 ADD RSP,0x20 POP RBP RET
void mysql_list_tables_start_internal(long *param_1) { int4 *puVar1; int8 uVar2; puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28); uVar2 = mysql_list_tables(*param_1,param_1[1]); *(int8 *)(puVar1 + 2) = uVar2; *puVar1 = 0; return; }
16,841
common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&, common_chat_inputs const&)
monkey531[P]llama/common/chat.cpp
static common_chat_params common_chat_params_init_functionary_v3_1_llama_3_1(const common_chat_template & tmpl, const struct common_chat_inputs & inputs) { // https://github.com/MeetKai/functionary/blob/main/tests/prompt_test_v3-llama3.1.txt common_chat_params data; json tools = inputs.tools.is_null() ? inputs.tools : json::array(); std::string python_code_argument_name; auto has_raw_python = false; data.grammar_lazy = inputs.tool_choice != "required"; data.grammar = build_grammar([&](const common_grammar_builder & builder) { std::vector<std::string> tool_rules; foreach_function(inputs.tools, [&](const json & tool) { const auto & function = tool["function"]; const auto & parameters = function["parameters"]; std::string name = function["name"]; if (name == "python" || name == "ipython") { if (!parameters.contains("type")) { throw std::runtime_error("Missing type in python tool"); } has_raw_python = true; auto type = parameters.at("type"); if (type == "object") { auto properties = parameters.at("properties"); for (auto it = properties.begin(); it != properties.end(); ++it) { if (it.value().at("type") == "string") { if (!python_code_argument_name.empty()) { throw std::runtime_error("Multiple string arguments found in python tool"); } python_code_argument_name = it.key(); } } if (python_code_argument_name.empty()) { throw std::runtime_error("No string argument found in python tool"); } } else if (type != "string") { throw std::runtime_error("Invalid type in python tool: " + type.dump()); } } tool_rules.push_back(builder.add_rule(name + "-call", "\"<function=" + name + ">\" " + builder.add_schema(name + "-args", parameters) + " \"</function>\" space")); }); if (has_raw_python) { tool_rules.push_back(builder.add_rule("python-call", "\"<|python_tag|>\" .*")); data.grammar_triggers.push_back({"<|python_tag|>", /* .at_start = */ false}); } auto tool_call = builder.add_rule("tool_call", string_join(tool_rules, " | ")) + " space"; builder.add_rule("root", inputs.parallel_tool_calls ? "(" + tool_call + ")+" : tool_call); data.grammar_triggers.push_back({"<function=", /* .at_start = */ false}); }, grammar_options); data.prompt = tmpl.apply(inputs.messages, inputs.tools.empty() ? json() : inputs.tools, inputs.add_generation_prompt); // TODO: if (has_raw_python) data.format = COMMON_CHAT_FORMAT_FUNCTIONARY_V3_1_LLAMA_3_1; return data; }
O3
cpp
common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&, common_chat_inputs const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa8, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movl $0x0, (%rdi) xorl %eax, %eax movb %al, 0x8(%rdi) movq %rax, 0x10(%rdi) leaq 0x28(%rdi), %rcx movq %rcx, 0x18(%rdi) movq %rax, 0x20(%rdi) movb %al, 0x28(%rdi) movb %al, 0x38(%rdi) xorps %xmm0, %xmm0 movups %xmm0, 0x40(%rdi) movups %xmm0, 0x50(%rdi) movups %xmm0, 0x60(%rdi) movups %xmm0, 0x70(%rdi) movq %rax, 0x80(%rdi) leaq 0x10(%rdx), %r12 cmpb %al, 0x10(%rdx) je 0xd077e leaq 0x58(%rsp), %rdi xorl %esi, %esi xorl %edx, %edx xorl %ecx, %ecx movl $0x2, %r8d callq 0x7ebb2 jmp 0xd078b leaq 0x58(%rsp), %rdi movq %r12, %rsi callq 0x5d6e2 leaq 0x88(%rsp), %rbp movq %rbp, -0x10(%rbp) xorl %r13d, %r13d movq %r13, -0x8(%rbp) movb %r13b, (%rbp) movb %r13b, 0x17(%rsp) leaq 0x20(%r14), %rdi leaq 0x1efb3(%rip), %rsi # 0xef765 callq 0xa4f05 movb %al, 0x38(%rbx) movq %r13, 0x20(%rsp) movl $0x20, %edi callq 0x1a8b0 movq %r14, (%rax) leaq 0x17(%rsp), %rcx movq %rcx, 0x8(%rax) leaq 0x78(%rsp), %rcx movq %rcx, 0x10(%rax) movq %rbx, 0x18(%rax) leaq 0x18(%rsp), %rsi movq %rax, (%rsi) leaq 0x9fa9(%rip), %rax # 0xda79a movq %rax, 0x18(%rsi) leaq 0xa692(%rip), %rax # 0xdae8e movq %rax, 0x10(%rsi) leaq 0x24e91(%rip), %rdx # 0xf5698 leaq 0x38(%rsp), %rdi callq 0xbb074 leaq 0x18(%rbx), %rdi leaq 0x38(%rsp), %r13 movq %r13, %rsi callq 0x1aab0 movq (%r13), %rdi leaq 0x48(%rsp), %r13 cmpq %r13, %rdi je 0xd083d movq 0x48(%rsp), %rsi incq %rsi callq 0x1a8d0 movq 0x28(%rsp), %rax testq %rax, %rax je 0xd0856 leaq 0x18(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movzbl (%r12), %eax testl %eax, %eax je 0xd0885 cmpl $0x2, %eax je 0xd0869 cmpl $0x1, %eax jne 0xd0876 movq 0x18(%r14), %rax movq (%rax), %rcx cmpq 0x8(%rax), %rcx je 0xd0885 leaq 0x18(%rsp), %rdi movq %r12, %rsi callq 0x5d6e2 jmp 0xd0893 movb $0x0, 0x18(%rsp) movq $0x0, 0x20(%rsp) movzbl 0x68(%r14), %r8d leaq 0x68(%rsp), %r9 movb $0x0, (%r9) movq $0x0, 0x8(%r9) movl $0x1, (%rsp) leaq 0x38(%rsp), %rdi leaq 0x18(%rsp), %rcx movq %r15, %rsi movq %r14, %rdx callq 0xa1624 leaq 0x98(%rsp), %rdi leaq 0x38(%rsp), %rsi callq 0x7f906 movb 0x8(%rbx), %al leaq 0x98(%rsp), %rdi movb (%rdi), %cl movb %cl, 0x8(%rbx) movb %al, (%rdi) movq 0x10(%rbx), %rax movq 0x8(%rdi), %rcx movq %rcx, 0x10(%rbx) movq %rax, 0x8(%rdi) callq 0x5dbae movq 0x38(%rsp), %rdi cmpq %r13, %rdi je 0xd0915 movq 0x48(%rsp), %rsi incq %rsi callq 0x1a8d0 leaq 0x68(%rsp), %rdi callq 0x5dbae leaq 0x18(%rsp), %rdi callq 0x5dbae movl $0x8, (%rbx) movq 0x78(%rsp), %rdi cmpq %rbp, %rdi je 0xd0949 movq 0x88(%rsp), %rsi incq %rsi callq 0x1a8d0 leaq 0x58(%rsp), %rdi callq 0x5dbae addq $0xa8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0xd09c4 jmp 0xd09bc movq %rax, %r14 movq 0x38(%rsp), %rdi cmpq %r13, %rdi je 0xd0988 movq 0x48(%rsp), %rsi incq %rsi callq 0x1a8d0 jmp 0xd0988 movq %rax, %r14 leaq 0x68(%rsp), %rdi callq 0x5dbae leaq 0x18(%rsp), %rdi callq 0x5dbae jmp 0xd09c7 movq %rax, %r14 movq 0x28(%rsp), %rax testq %rax, %rax je 0xd09c7 leaq 0x18(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax jmp 0xd09c7 movq %rax, %rdi callq 0x21aaf movq %rax, %r14 movq 0x78(%rsp), %rdi cmpq %rbp, %rdi je 0xd09e1 movq 0x88(%rsp), %rsi incq %rsi callq 0x1a8d0 leaq 0x58(%rsp), %rdi callq 0x5dbae movq %rbx, %rdi callq 0x7e4c4 movq %r14, %rdi callq 0x1afc0 movq %rax, %r14 jmp 0xd09eb
_ZL50common_chat_params_init_functionary_v3_1_llama_3_1RKN5minja13chat_templateERK18common_chat_inputs: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0A8h mov r14, rdx mov r15, rsi mov rbx, rdi mov dword ptr [rdi], 0 xor eax, eax mov [rdi+8], al mov [rdi+10h], rax lea rcx, [rdi+28h] mov [rdi+18h], rcx mov [rdi+20h], rax mov [rdi+28h], al mov [rdi+38h], al xorps xmm0, xmm0 movups xmmword ptr [rdi+40h], xmm0 movups xmmword ptr [rdi+50h], xmm0 movups xmmword ptr [rdi+60h], xmm0 movups xmmword ptr [rdi+70h], xmm0 mov [rdi+80h], rax lea r12, [rdx+10h] cmp [rdx+10h], al jz short loc_D077E lea rdi, [rsp+0D8h+var_80] xor esi, esi xor edx, edx xor ecx, ecx mov r8d, 2 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ESt16initializer_listINS0_6detail8json_refISD_EEEbNSF_7value_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>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<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,nlohmann::json_abi_v3_11_3::detail::value_t) jmp short loc_D078B loc_D077E: lea rdi, [rsp+0D8h+var_80] mov rsi, r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; 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>::basic_json(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&) loc_D078B: lea rbp, [rsp+0D8h+var_50] mov [rbp-10h], rbp xor r13d, r13d mov [rbp-8], r13 mov [rbp+0], r13b mov [rsp+0D8h+var_C1], r13b lea rdi, [r14+20h] lea rsi, aRequired; "required" call _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_ mov [rbx+38h], al mov [rsp+0D8h+var_B8], r13 mov edi, 20h ; ' '; unsigned __int64 call __Znwm; operator new(ulong) mov [rax], r14 lea rcx, [rsp+0D8h+var_C1] mov [rax+8], rcx lea rcx, [rsp+0D8h+var_60] mov [rax+10h], rcx mov [rax+18h], rbx lea rsi, [rsp+0D8h+var_C0] mov [rsi], rax lea rax, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL50common_chat_params_init_functionary_v3_1_llama_3_1RKN5minja13chat_templateERK18common_chat_inputsE3$_0E9_M_invokeERKSt9_Any_dataS2_; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_invoke(std::_Any_data const&,common_grammar_builder const&) mov [rsi+18h], rax lea rax, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL50common_chat_params_init_functionary_v3_1_llama_3_1RKN5minja13chat_templateERK18common_chat_inputsE3$_0E10_M_managerERSt9_Any_dataRKSD_St18_Manager_operation; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsi+10h], rax lea rdx, _ZL15grammar_options; grammar_options lea rdi, [rsp+0D8h+var_A0] call _Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options; build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&) lea rdi, [rbx+18h] lea r13, [rsp+0D8h+var_A0] mov rsi, r13 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r13+0]; void * lea r13, [rsp+0D8h+var_90] cmp rdi, r13 jz short loc_D083D mov rsi, [rsp+0D8h+var_90] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_D083D: mov rax, [rsp+0D8h+var_B0] test rax, rax jz short loc_D0856 lea rdi, [rsp+0D8h+var_C0] mov rsi, rdi mov edx, 3 call rax loc_D0856: movzx eax, byte ptr [r12] test eax, eax jz short loc_D0885 cmp eax, 2 jz short loc_D0869 cmp eax, 1 jnz short loc_D0876 loc_D0869: mov rax, [r14+18h] mov rcx, [rax] cmp rcx, [rax+8] jz short loc_D0885 loc_D0876: lea rdi, [rsp+0D8h+var_C0] mov rsi, r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; 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>::basic_json(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&) jmp short loc_D0893 loc_D0885: mov [rsp+0D8h+var_C0], 0 mov [rsp+0D8h+var_B8], 0 loc_D0893: movzx r8d, byte ptr [r14+68h] lea r9, [rsp+0D8h+var_70] mov byte ptr [r9], 0 mov qword ptr [r9+8], 0 mov [rsp+0D8h+var_D8], 1 lea rdi, [rsp+0D8h+var_A0] lea rcx, [rsp+0D8h+var_C0] mov rsi, r15 mov rdx, r14 call _ZNK5minja13chat_template5applyERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEESH_bSH_b; minja::chat_template::apply(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&,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&,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> const&,bool) lea rdi, [rsp+0D8h+var_40] lea rsi, [rsp+0D8h+var_A0] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_ mov al, [rbx+8] lea rdi, [rsp+0D8h+var_40] mov cl, [rdi] mov [rbx+8], cl mov [rdi], al mov rax, [rbx+10h] mov rcx, [rdi+8] mov [rbx+10h], rcx mov [rdi+8], rax 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, [rsp+0D8h+var_A0]; void * cmp rdi, r13 jz short loc_D0915 mov rsi, [rsp+0D8h+var_90] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_D0915: lea rdi, [rsp+0D8h+var_70] 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+0D8h+var_C0] 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 dword ptr [rbx], 8 mov rdi, [rsp+0D8h+var_60]; void * cmp rdi, rbp jz short loc_D0949 mov rsi, [rsp+0D8h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_D0949: lea rdi, [rsp+0D8h+var_80] 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() add rsp, 0A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_D09C4 jmp short loc_D09BC mov r14, rax mov rdi, [rsp+0D8h+var_A0]; void * cmp rdi, r13 jz short loc_D0988 mov rsi, [rsp+0D8h+var_90] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_D0988 mov r14, rax loc_D0988: lea rdi, [rsp+0D8h+var_70] 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+0D8h+var_C0] 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() jmp short loc_D09C7 mov r14, rax mov rax, [rsp+0D8h+var_B0] test rax, rax jz short loc_D09C7 lea rdi, [rsp+0D8h+var_C0] mov rsi, rdi mov edx, 3 call rax jmp short loc_D09C7 loc_D09BC: mov rdi, rax call __clang_call_terminate loc_D09C4: mov r14, rax loc_D09C7: mov rdi, [rsp+0D8h+var_60]; void * cmp rdi, rbp jz short loc_D09E1 mov rsi, [rsp+0D8h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_D09E1: lea rdi, [rsp+0D8h+var_80] 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() loc_D09EB: mov rdi, rbx; this call _ZN18common_chat_paramsD2Ev; common_chat_params::~common_chat_params() mov rdi, r14 call __Unwind_Resume mov r14, rax jmp short loc_D09EB
long long common_chat_params_init_functionary_v3_1_llama_3_1( const minja::chat_template *a1, const common_chat_inputs *a2, long long a3) { unsigned __int8 *v4; // r12 _QWORD *v5; // rax int v6; // r8d int v7; // r9d int v8; // eax int v9; // r8d char v10; // al long long v11; // rax char v13; // [rsp+17h] [rbp-C1h] BYREF _QWORD *v14; // [rsp+18h] [rbp-C0h] BYREF long long v15; // [rsp+20h] [rbp-B8h] long long ( *v16)(); // [rsp+28h] [rbp-B0h] long long ( *v17)(); // [rsp+30h] [rbp-A8h] void *v18[2]; // [rsp+38h] [rbp-A0h] BYREF _QWORD v19[2]; // [rsp+48h] [rbp-90h] BYREF unsigned __int8 v20[16]; // [rsp+58h] [rbp-80h] BYREF _BYTE v21[8]; // [rsp+68h] [rbp-70h] BYREF long long v22; // [rsp+70h] [rbp-68h] void *v23[2]; // [rsp+78h] [rbp-60h] BYREF _QWORD v24[2]; // [rsp+88h] [rbp-50h] BYREF char v25[8]; // [rsp+98h] [rbp-40h] BYREF long long v26; // [rsp+A0h] [rbp-38h] *(_DWORD *)a1 = 0; *((_BYTE *)a1 + 8) = 0; *((_QWORD *)a1 + 2) = 0LL; *((_QWORD *)a1 + 3) = (char *)a1 + 40; *((_QWORD *)a1 + 4) = 0LL; *((_BYTE *)a1 + 40) = 0; *((_BYTE *)a1 + 56) = 0; *((_OWORD *)a1 + 4) = 0LL; *((_OWORD *)a1 + 5) = 0LL; *((_OWORD *)a1 + 6) = 0LL; *((_OWORD *)a1 + 7) = 0LL; *((_QWORD *)a1 + 16) = 0LL; v4 = (unsigned __int8 *)(a3 + 16); if ( *(_BYTE *)(a3 + 16) ) 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>::basic_json( v20, 0LL, 0LL, 0LL, 2LL); else 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>::basic_json( v20, (unsigned __int8 *)(a3 + 16)); v23[0] = v24; v23[1] = 0LL; LOBYTE(v24[0]) = 0; v13 = 0; *((_BYTE *)a1 + 56) = ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_( a3 + 32, (long long)"required"); v15 = 0LL; v5 = (_QWORD *)operator new(0x20uLL); *v5 = a3; v5[1] = &v13; v5[2] = v23; v5[3] = a1; v14 = v5; v17 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_invoke; v16 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_manager; build_grammar[abi:cxx11]((long long)v18, (long long)&v14, grammar_options, (long long)v23, v6, v7); std::string::operator=((char *)a1 + 24, v18); if ( v18[0] != v19 ) operator delete(v18[0], v19[0] + 1LL); if ( v16 ) ((void ( *)(_QWORD **, _QWORD **, long long))v16)(&v14, &v14, 3LL); v8 = *v4; if ( !*v4 || (v8 == 2 || v8 == 1) && **(_QWORD **)(a3 + 24) == *(_QWORD *)(*(_QWORD *)(a3 + 24) + 8LL) ) { LOBYTE(v14) = 0; v15 = 0LL; } else { 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>::basic_json( (unsigned __int8 *)&v14, v4); } v9 = *(unsigned __int8 *)(a3 + 104); v21[0] = 0; v22 = 0LL; minja::chat_template::apply((long long)v18, a2, (unsigned __int8 *)a3, (unsigned __int8 *)&v14, v9, v21, 1); ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_(v25); v10 = *((_BYTE *)a1 + 8); *((_BYTE *)a1 + 8) = v25[0]; v25[0] = v10; v11 = *((_QWORD *)a1 + 2); *((_QWORD *)a1 + 2) = v26; v26 = v11; 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(v25); if ( v18[0] != v19 ) operator delete(v18[0], v19[0] + 1LL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v21); 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(&v14); *(_DWORD *)a1 = 8; if ( v23[0] != v24 ) operator delete(v23[0], v24[0] + 1LL); return nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v20); }
common_chat_params_init_functionary_v3_1_llama_3_1: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa8 MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV dword ptr [RDI],0x0 XOR EAX,EAX MOV byte ptr [RDI + 0x8],AL MOV qword ptr [RDI + 0x10],RAX LEA RCX,[RDI + 0x28] MOV qword ptr [RDI + 0x18],RCX MOV qword ptr [RDI + 0x20],RAX MOV byte ptr [RDI + 0x28],AL MOV byte ptr [RDI + 0x38],AL XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x40],XMM0 MOVUPS xmmword ptr [RDI + 0x50],XMM0 MOVUPS xmmword ptr [RDI + 0x60],XMM0 MOVUPS xmmword ptr [RDI + 0x70],XMM0 MOV qword ptr [RDI + 0x80],RAX LEA R12,[RDX + 0x10] CMP byte ptr [RDX + 0x10],AL JZ 0x001d077e LAB_001d0766: LEA RDI,[RSP + 0x58] XOR ESI,ESI XOR EDX,EDX XOR ECX,ECX MOV R8D,0x2 CALL 0x0017ebb2 JMP 0x001d078b LAB_001d077e: LEA RDI,[RSP + 0x58] MOV RSI,R12 CALL 0x0015d6e2 LAB_001d078b: LEA RBP,[RSP + 0x88] MOV qword ptr [RBP + -0x10],RBP XOR R13D,R13D MOV qword ptr [RBP + -0x8],R13 MOV byte ptr [RBP],R13B MOV byte ptr [RSP + 0x17],R13B LEA RDI,[R14 + 0x20] LEA RSI,[0x1ef765] CALL 0x001a4f05 MOV byte ptr [RBX + 0x38],AL MOV qword ptr [RSP + 0x20],R13 LAB_001d07bf: MOV EDI,0x20 CALL 0x0011a8b0 MOV qword ptr [RAX],R14 LEA RCX,[RSP + 0x17] MOV qword ptr [RAX + 0x8],RCX LEA RCX,[RSP + 0x78] MOV qword ptr [RAX + 0x10],RCX MOV qword ptr [RAX + 0x18],RBX LEA RSI,[RSP + 0x18] MOV qword ptr [RSI],RAX LEA RAX,[0x1da79a] MOV qword ptr [RSI + 0x18],RAX LEA RAX,[0x1dae8e] MOV qword ptr [RSI + 0x10],RAX LAB_001d0800: LEA RDX,[0x1f5698] LEA RDI,[RSP + 0x38] CALL 0x001bb074 LEA RDI,[RBX + 0x18] LEA R13,[RSP + 0x38] MOV RSI,R13 CALL 0x0011aab0 MOV RDI,qword ptr [R13] LEA R13,[RSP + 0x48] CMP RDI,R13 JZ 0x001d083d MOV RSI,qword ptr [RSP + 0x48] INC RSI CALL 0x0011a8d0 LAB_001d083d: MOV RAX,qword ptr [RSP + 0x28] TEST RAX,RAX JZ 0x001d0856 LAB_001d0847: LEA RDI,[RSP + 0x18] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001d0856: MOVZX EAX,byte ptr [R12] TEST EAX,EAX JZ 0x001d0885 CMP EAX,0x2 JZ 0x001d0869 CMP EAX,0x1 JNZ 0x001d0876 LAB_001d0869: MOV RAX,qword ptr [R14 + 0x18] MOV RCX,qword ptr [RAX] CMP RCX,qword ptr [RAX + 0x8] JZ 0x001d0885 LAB_001d0876: LEA RDI,[RSP + 0x18] MOV RSI,R12 CALL 0x0015d6e2 JMP 0x001d0893 LAB_001d0885: MOV byte ptr [RSP + 0x18],0x0 MOV qword ptr [RSP + 0x20],0x0 LAB_001d0893: MOVZX R8D,byte ptr [R14 + 0x68] LEA R9,[RSP + 0x68] MOV byte ptr [R9],0x0 MOV qword ptr [R9 + 0x8],0x0 LAB_001d08a9: MOV dword ptr [RSP],0x1 LEA RDI,[RSP + 0x38] LEA RCX,[RSP + 0x18] MOV RSI,R15 MOV RDX,R14 CALL 0x001a1624 LAB_001d08c5: LEA RDI,[RSP + 0x98] LEA RSI,[RSP + 0x38] CALL 0x0017f906 MOV AL,byte ptr [RBX + 0x8] LEA RDI,[RSP + 0x98] MOV CL,byte ptr [RDI] MOV byte ptr [RBX + 0x8],CL MOV byte ptr [RDI],AL MOV RAX,qword ptr [RBX + 0x10] MOV RCX,qword ptr [RDI + 0x8] MOV qword ptr [RBX + 0x10],RCX MOV qword ptr [RDI + 0x8],RAX CALL 0x0015dbae MOV RDI,qword ptr [RSP + 0x38] CMP RDI,R13 JZ 0x001d0915 MOV RSI,qword ptr [RSP + 0x48] INC RSI CALL 0x0011a8d0 LAB_001d0915: LEA RDI,[RSP + 0x68] CALL 0x0015dbae LEA RDI,[RSP + 0x18] CALL 0x0015dbae MOV dword ptr [RBX],0x8 MOV RDI,qword ptr [RSP + 0x78] CMP RDI,RBP JZ 0x001d0949 MOV RSI,qword ptr [RSP + 0x88] INC RSI CALL 0x0011a8d0 LAB_001d0949: LEA RDI,[RSP + 0x58] CALL 0x0015dbae ADD RSP,0xa8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&, common_chat_inputs const&) */ void common_chat_params_init_functionary_v3_1_llama_3_1 (chat_template *param_1,common_chat_inputs *param_2) { basic_json *pbVar1; basic_json bVar2; int8 uVar3; chat_template cVar4; long in_RDX; int1 local_c1; long *local_c0; int8 local_b8; code *local_b0; code *local_a8; long *local_a0 [2]; long local_90 [2]; 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_80 [16]; data local_70 [8]; int8 local_68; int1 *local_60; int8 local_58; int1 local_50; int7 uStack_4f; chat_template local_40 [8]; int8 local_38; *(int4 *)param_1 = 0; param_1[8] = (chat_template)0x0; *(int8 *)(param_1 + 0x10) = 0; *(chat_template **)(param_1 + 0x18) = param_1 + 0x28; *(int8 *)(param_1 + 0x20) = 0; param_1[0x28] = (chat_template)0x0; param_1[0x38] = (chat_template)0x0; *(int8 *)(param_1 + 0x40) = 0; *(int8 *)(param_1 + 0x48) = 0; *(int8 *)(param_1 + 0x50) = 0; *(int8 *)(param_1 + 0x58) = 0; *(int8 *)(param_1 + 0x60) = 0; *(int8 *)(param_1 + 0x68) = 0; *(int8 *)(param_1 + 0x70) = 0; *(int8 *)(param_1 + 0x78) = 0; *(int8 *)(param_1 + 0x80) = 0; pbVar1 = (basic_json *)(in_RDX + 0x10); if (*(char *)(in_RDX + 0x10) == '\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> ::basic_json(local_80,pbVar1); } else { /* try { // try from 001d0766 to 001d078a has its CatchHandler @ 001d09fb */ nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(local_80,0,0,0,2); } local_58 = 0; local_50 = 0; local_c1 = 0; local_60 = &local_50; cVar4 = (chat_template) _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_ (in_RDX + 0x20,"required"); param_1[0x38] = cVar4; local_b8 = 0; /* try { // try from 001d07bf to 001d07c8 has its CatchHandler @ 001d09c4 */ local_c0 = (long *)operator_new(0x20); *local_c0 = in_RDX; local_c0[1] = (long)&local_c1; local_c0[2] = (long)&local_60; local_c0[3] = (long)param_1; local_a8 = std:: _Function_handler<void(common_grammar_builder_const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template_const&,common_chat_inputs_const&)::$_0> ::_M_invoke; local_b0 = std:: _Function_handler<void(common_grammar_builder_const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template_const&,common_chat_inputs_const&)::$_0> ::_M_manager; /* try { // try from 001d0800 to 001d0810 has its CatchHandler @ 001d099e */ build_grammar_abi_cxx11_((function *)local_a0,(common_grammar_options *)&local_c0); std::__cxx11::string::operator=((string *)(param_1 + 0x18),(string *)local_a0); if (local_a0[0] != local_90) { operator_delete(local_a0[0],local_90[0] + 1); } if (local_b0 != (code *)0x0) { /* try { // try from 001d0847 to 001d0855 has its CatchHandler @ 001d0967 */ (*local_b0)(&local_c0,&local_c0,3); } bVar2 = *pbVar1; if ((bVar2 == (basic_json)0x0) || (((bVar2 == (basic_json)0x2 || (bVar2 == (basic_json)0x1)) && (**(long **)(in_RDX + 0x18) == (*(long **)(in_RDX + 0x18))[1])))) { local_c0 = (long *)((ulong)local_c0 & 0xffffffffffffff00); local_b8 = 0; } else { /* try { // try from 001d0876 to 001d0882 has its CatchHandler @ 001d0965 */ nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)&local_c0,pbVar1); } local_70[0] = (data)0x0; local_68 = 0; /* try { // try from 001d08a9 to 001d08c4 has its CatchHandler @ 001d0985 */ minja::chat_template::apply ((basic_json *)local_a0,(basic_json *)param_2,SUB81(in_RDX,0),(basic_json *)&local_c0, *(bool *)(in_RDX + 0x68)); /* try { // try from 001d08c5 to 001d08d6 has its CatchHandler @ 001d0969 */ _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_ (local_40,local_a0); cVar4 = param_1[8]; param_1[8] = local_40[0]; uVar3 = *(int8 *)(param_1 + 0x10); *(int8 *)(param_1 + 0x10) = local_38; local_40[0] = cVar4; local_38 = uVar3; 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((data *)local_40); if (local_a0[0] != local_90) { operator_delete(local_a0[0],local_90[0] + 1); } 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_70); 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((data *)&local_c0); *(int4 *)param_1 = 8; if (local_60 != &local_50) { operator_delete(local_60,CONCAT71(uStack_4f,local_50) + 1); } 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((data *)local_80); return; }
16,842
mysql_stmt_next_result_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_stmt_next_result_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_stmt_next_result, (parms->stmt), parms->stmt->mysql, int, r_int) }
O0
c
mysql_stmt_next_result_start_internal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x38(%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi callq 0x87570 movl %eax, -0x14(%rbp) movl -0x14(%rbp), %ecx movq -0x20(%rbp), %rax movl %ecx, 0x8(%rax) movq -0x20(%rbp), %rax movl $0x0, (%rax) addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
mysql_stmt_next_result_start_internal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+38h] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rdi, [rax] call mysql_stmt_next_result mov [rbp+var_14], eax mov ecx, [rbp+var_14] mov rax, [rbp+var_20] mov [rax+8], ecx mov rax, [rbp+var_20] mov dword ptr [rax], 0 add rsp, 20h pop rbp retn
_DWORD * mysql_stmt_next_result_start_internal(long long *a1) { _DWORD *result; // rax _DWORD *v2; // [rsp+0h] [rbp-20h] v2 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(*a1 + 56) + 1152LL) + 40LL); v2[2] = mysql_stmt_next_result(*a1); result = v2; *v2 = 0; return result; }
mysql_stmt_next_result_start_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] CALL 0x00187570 MOV dword ptr [RBP + -0x14],EAX MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x8],ECX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],0x0 ADD RSP,0x20 POP RBP RET
void mysql_stmt_next_result_start_internal(long *param_1) { int4 *puVar1; int4 uVar2; puVar1 = *(int4 **)(*(long *)(*(long *)(*param_1 + 0x38) + 0x480) + 0x28); uVar2 = mysql_stmt_next_result(*param_1); puVar1[2] = uVar2; *puVar1 = 0; return; }
16,843
SchemaConverter::_add_primitive(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, BuiltinRule const&)
monkey531[P]llama/common/json-schema-to-grammar.cpp
std::string _add_primitive(const std::string & name, const BuiltinRule & rule) { auto n = _add_rule(name, rule.content); for (const auto & dep : rule.deps) { BuiltinRule dep_rule; auto it = PRIMITIVE_RULES.find(dep); if (it == PRIMITIVE_RULES.end()) { it = STRING_FORMAT_RULES.find(dep); if (it == STRING_FORMAT_RULES.end()) { _errors.push_back("Rule " + dep + " not known"); continue; } } if (_rules.find(dep) == _rules.end()) { _add_primitive(dep, it->second); } } return n; }
O2
cpp
SchemaConverter::_add_primitive(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, BuiltinRule const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xc8, %rsp movq %rcx, %r14 movq %rsi, %rbx movq %rdi, (%rsp) callq 0x8427c movq 0x20(%r14), %r15 movq 0x28(%r14), %rax movq %rax, 0x28(%rsp) leaq 0x40(%rsp), %rbp leaq 0x28(%rbx), %rax movq %rax, 0x20(%rsp) leaq 0x30(%rbx), %rax movq %rax, 0x18(%rsp) movq %rbx, 0x10(%rsp) leaq 0xc8(%rbx), %rax movq %rax, 0x8(%rsp) leaq 0x88(%rsp), %r13 leaq 0xa8(%rsp), %r12 cmpq 0x28(%rsp), %r15 je 0x876c2 movq %rbp, 0x30(%rsp) andq $0x0, 0x38(%rsp) movb $0x0, 0x40(%rsp) xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rbp) andq $0x0, 0x20(%rbp) leaq 0x4ad2b(%rip), %rdi # 0xd2338 movq %r15, %rsi callq 0x8b6b0 movq %rax, %rbx testq %rax, %rax jne 0x87634 leaq 0x4ad4c(%rip), %rdi # 0xd2370 movq %r15, %rsi callq 0x8b6b0 movq %rax, %rbx testq %rax, %rax je 0x87668 movq 0x20(%rsp), %rdi movq %r15, %rsi callq 0x84562 cmpq 0x18(%rsp), %rax jne 0x876af addq $0x28, %rbx leaq 0x68(%rsp), %rdi movq 0x10(%rsp), %rsi movq %r15, %rdx movq %rbx, %rcx callq 0x8757a leaq 0x68(%rsp), %rdi jmp 0x876aa movq %r13, %rbx movq %r13, %rdi leaq 0x10ea7(%rip), %rsi # 0x9851c movq %r15, %rdx callq 0x28de9 movq %r12, %r14 movq %r12, %rdi movq %rbx, %rsi leaq 0x10e95(%rip), %rdx # 0x98522 callq 0x28a6a movq 0x8(%rsp), %rdi movq %r14, %rsi callq 0x2307a movq %r14, %rdi callq 0x20d88 movq %rbx, %rdi callq 0x20d88 leaq 0x30(%rsp), %rdi callq 0x827f2 addq $0x20, %r15 jmp 0x875df movq (%rsp), %rax addq $0xc8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0xa8(%rsp), %rdi callq 0x20d88 jmp 0x876ed movq %rax, %rbx leaq 0x88(%rsp), %rdi callq 0x20d88 jmp 0x87705 jmp 0x87702 jmp 0x87702 jmp 0x87702 movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x827f2 movq (%rsp), %rdi callq 0x20d88 movq %rbx, %rdi callq 0x20b90
_ZN15SchemaConverter14_add_primitiveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK11BuiltinRule: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0C8h mov r14, rcx mov rbx, rsi mov [rsp+0F8h+var_F8], rdi call _ZN15SchemaConverter9_add_ruleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_; SchemaConverter::_add_rule(std::string const&,std::string const&) mov r15, [r14+20h] mov rax, [r14+28h] mov [rsp+0F8h+var_D0], rax lea rbp, [rsp+0F8h+var_B8] lea rax, [rbx+28h] mov [rsp+0F8h+var_D8], rax lea rax, [rbx+30h] mov [rsp+0F8h+var_E0], rax mov [rsp+0F8h+var_E8], rbx lea rax, [rbx+0C8h] mov [rsp+0F8h+var_F0], rax lea r13, [rsp+0F8h+var_70] lea r12, [rsp+0F8h+var_50] loc_875DF: cmp r15, [rsp+0F8h+var_D0] jz loc_876C2 mov [rsp+0F8h+var_C8], rbp and [rsp+0F8h+var_C0], 0 mov [rsp+0F8h+var_B8], 0 xorps xmm0, xmm0 movups xmmword ptr [rbp+10h], xmm0 and qword ptr [rbp+20h], 0 lea rdi, _Z15PRIMITIVE_RULESB5cxx11; PRIMITIVE_RULES mov rsi, r15 call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_11BuiltinRuleESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,BuiltinRule>,std::allocator<std::pair<std::string const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(std::string const&) mov rbx, rax test rax, rax jnz short loc_87634 lea rdi, _Z19STRING_FORMAT_RULESB5cxx11; STRING_FORMAT_RULES mov rsi, r15 call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_11BuiltinRuleESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,BuiltinRule>,std::allocator<std::pair<std::string const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(std::string const&) mov rbx, rax test rax, rax jz short loc_87668 loc_87634: mov rdi, [rsp+0F8h+var_D8] mov rsi, r15 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE4findERS7_; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::find(std::string const&) cmp rax, [rsp+0F8h+var_E0] jnz short loc_876AF add rbx, 28h ; '(' lea rdi, [rsp+0F8h+var_90] mov rsi, [rsp+0F8h+var_E8] mov rdx, r15 mov rcx, rbx call _ZN15SchemaConverter14_add_primitiveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK11BuiltinRule; SchemaConverter::_add_primitive(std::string const&,BuiltinRule const&) lea rdi, [rsp+0F8h+var_90] jmp short loc_876AA loc_87668: mov rbx, r13 mov rdi, r13 lea rsi, aRule; "Rule " mov rdx, r15 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) mov r14, r12 mov rdi, r12 mov rsi, rbx lea rdx, aNotKnown; " not known" call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) mov rdi, [rsp+0F8h+var_F0] mov rsi, r14 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) mov rdi, r14; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx; void * loc_876AA: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_876AF: lea rdi, [rsp+0F8h+var_C8]; this call _ZN11BuiltinRuleD2Ev; BuiltinRule::~BuiltinRule() add r15, 20h ; ' ' jmp loc_875DF loc_876C2: mov rax, [rsp+0F8h+var_F8] add rsp, 0C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax lea rdi, [rsp+arg_A0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_876ED mov rbx, rax loc_876ED: lea rdi, [rsp+arg_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_87705 jmp short loc_87702 jmp short loc_87702 jmp short $+2 loc_87702: mov rbx, rax loc_87705: lea rdi, [rsp+arg_28]; this call _ZN11BuiltinRuleD2Ev; BuiltinRule::~BuiltinRule() mov rdi, [rsp+0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
long long SchemaConverter::_add_primitive(long long a1, long long a2, _QWORD *a3, _QWORD *a4) { long long v5; // r15 long long v6; // rax int v7; // ebx long long v8; // rax int v9; // r8d int v10; // r9d _DWORD *v11; // rdi long long v13; // [rsp+0h] [rbp-F8h] long long v14; // [rsp+8h] [rbp-F0h] int v15; // [rsp+10h] [rbp-E8h] long long v16; // [rsp+18h] [rbp-E0h] long long v17; // [rsp+20h] [rbp-D8h] long long v18; // [rsp+28h] [rbp-D0h] _DWORD *v19; // [rsp+30h] [rbp-C8h] BYREF long long v20; // [rsp+38h] [rbp-C0h] _DWORD v21[4]; // [rsp+40h] [rbp-B8h] BYREF __int128 v22; // [rsp+50h] [rbp-A8h] long long v23; // [rsp+60h] [rbp-98h] _DWORD v24[6]; // [rsp+68h] [rbp-90h] BYREF char v25; // [rsp+80h] [rbp-78h] _DWORD v26[6]; // [rsp+88h] [rbp-70h] BYREF char v27; // [rsp+A0h] [rbp-58h] _BYTE v28[80]; // [rsp+A8h] [rbp-50h] BYREF v13 = a1; SchemaConverter::_add_rule(a1, a2, a3, a4); v5 = a4[4]; v18 = a4[5]; v17 = a2 + 40; v16 = a2 + 48; v15 = a2; v14 = a2 + 200; while ( v5 != v18 ) { v19 = v21; v20 = 0LL; LOBYTE(v21[0]) = 0; v22 = 0LL; v23 = 0LL; v6 = std::_Hashtable<std::string,std::pair<std::string const,BuiltinRule>,std::allocator<std::pair<std::string const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find( &PRIMITIVE_RULES[abi:cxx11], v5); v7 = v6; if ( v6 || (v8 = std::_Hashtable<std::string,std::pair<std::string const,BuiltinRule>,std::allocator<std::pair<std::string const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find( &STRING_FORMAT_RULES[abi:cxx11], v5), v7 = v8, v8) ) { if ( std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::find( v17, v5) != v16 ) goto LABEL_9; SchemaConverter::_add_primitive( (unsigned int)v24, v15, v5, v7 + 40, v9, v10, v13, v14, v15, v16, v17, v18, (_DWORD)v19, v20, v21[0], v21[2], v22, DWORD2(v22), v23, v24[0], v24[2], v24[4], v25, v26[0], v26[2], v26[4], v27); v11 = v24; } else { std::operator+<char>((long long)v26, (long long)"Rule ", v5); std::operator+<char>((long long)v28, (long long)v26, (long long)" not known"); std::vector<std::string>::emplace_back<std::string>(v14, (long long)v28); std::string::~string(v28); v11 = v26; } std::string::~string(v11); LABEL_9: BuiltinRule::~BuiltinRule((BuiltinRule *)&v19); v5 += 32LL; } return v13; }
_add_primitive: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xc8 MOV R14,RCX MOV RBX,RSI MOV qword ptr [RSP],RDI CALL 0x0018427c MOV R15,qword ptr [R14 + 0x20] MOV RAX,qword ptr [R14 + 0x28] MOV qword ptr [RSP + 0x28],RAX LEA RBP,[RSP + 0x40] LEA RAX,[RBX + 0x28] MOV qword ptr [RSP + 0x20],RAX LEA RAX,[RBX + 0x30] MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x10],RBX LEA RAX,[RBX + 0xc8] MOV qword ptr [RSP + 0x8],RAX LEA R13,[RSP + 0x88] LEA R12,[RSP + 0xa8] LAB_001875df: CMP R15,qword ptr [RSP + 0x28] JZ 0x001876c2 MOV qword ptr [RSP + 0x30],RBP AND qword ptr [RSP + 0x38],0x0 MOV byte ptr [RSP + 0x40],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBP + 0x10],XMM0 AND qword ptr [RBP + 0x20],0x0 LAB_00187606: LEA RDI,[0x1d2338] MOV RSI,R15 CALL 0x0018b6b0 MOV RBX,RAX TEST RAX,RAX JNZ 0x00187634 LAB_0018761d: LEA RDI,[0x1d2370] MOV RSI,R15 CALL 0x0018b6b0 MOV RBX,RAX TEST RAX,RAX JZ 0x00187668 LAB_00187634: MOV RDI,qword ptr [RSP + 0x20] MOV RSI,R15 CALL 0x00184562 CMP RAX,qword ptr [RSP + 0x18] JNZ 0x001876af ADD RBX,0x28 LAB_0018764c: LEA RDI,[RSP + 0x68] MOV RSI,qword ptr [RSP + 0x10] MOV RDX,R15 MOV RCX,RBX CALL 0x0018757a LEA RDI,[RSP + 0x68] JMP 0x001876aa LAB_00187668: MOV RBX,R13 MOV RDI,R13 LEA RSI,[0x19851c] MOV RDX,R15 CALL 0x00128de9 LAB_0018767d: MOV R14,R12 MOV RDI,R12 MOV RSI,RBX LEA RDX,[0x198522] CALL 0x00128a6a LAB_00187692: MOV RDI,qword ptr [RSP + 0x8] MOV RSI,R14 CALL 0x0012307a LAB_0018769f: MOV RDI,R14 CALL 0x00120d88 MOV RDI,RBX LAB_001876aa: CALL 0x00120d88 LAB_001876af: LEA RDI,[RSP + 0x30] CALL 0x001827f2 ADD R15,0x20 JMP 0x001875df LAB_001876c2: MOV RAX,qword ptr [RSP] ADD RSP,0xc8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* SchemaConverter::_add_primitive(std::__cxx11::string const&, BuiltinRule const&) */ string * SchemaConverter::_add_primitive(string *param_1,BuiltinRule *param_2) { string *psVar1; long lVar2; BuiltinRule *pBVar3; long in_RCX; string *this; string *psVar4; int1 *local_c8; int8 local_c0; int1 local_b8 [16]; int8 local_a8; int8 uStack_a0; int8 local_98; string local_90 [32]; string local_70 [32]; string local_50 [32]; _add_rule(param_1,(string *)param_2); psVar4 = *(string **)(in_RCX + 0x20); psVar1 = *(string **)(in_RCX + 0x28); do { if (psVar4 == psVar1) { return param_1; } local_c0 = 0; local_b8[0] = 0; local_a8 = 0; uStack_a0 = 0; local_98 = 0; local_c8 = local_b8; /* try { // try from 00187606 to 00187614 has its CatchHandler @ 00187702 */ lVar2 = std:: _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,BuiltinRule>,std::allocator<std::pair<std::__cxx11::string_const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> ::find((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,BuiltinRule>,std::allocator<std::pair<std::__cxx11::string_const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> *)PRIMITIVE_RULES_abi_cxx11_,psVar4); if (lVar2 == 0) { /* try { // try from 0018761d to 0018762b has its CatchHandler @ 001876fe */ lVar2 = std:: _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,BuiltinRule>,std::allocator<std::pair<std::__cxx11::string_const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> ::find((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,BuiltinRule>,std::allocator<std::pair<std::__cxx11::string_const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> *)STRING_FORMAT_RULES_abi_cxx11_,psVar4); if (lVar2 != 0) goto LAB_00187634; /* try { // try from 00187668 to 0018767c has its CatchHandler @ 001876fc */ std::operator+((char *)local_70,(string *)"Rule "); /* try { // try from 0018767d to 00187691 has its CatchHandler @ 001876ea */ std::operator+(local_50,(char *)local_70); /* try { // try from 00187692 to 0018769e has its CatchHandler @ 001876d8 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string> ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *) (param_2 + 200),local_50); std::__cxx11::string::~string(local_50); this = local_70; LAB_001876aa: std::__cxx11::string::~string(this); } else { LAB_00187634: /* try { // try from 00187634 to 00187640 has its CatchHandler @ 00187700 */ pBVar3 = (BuiltinRule *) std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::find((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> *)(param_2 + 0x28),psVar4); if (pBVar3 == param_2 + 0x30) { /* try { // try from 0018764c to 00187660 has its CatchHandler @ 00187702 */ _add_primitive(local_90,param_2); this = local_90; goto LAB_001876aa; } } BuiltinRule::~BuiltinRule((BuiltinRule *)&local_c8); psVar4 = psVar4 + 0x20; } while( true ); }
16,844
minja::Parser::parseIdentifier()
monkey531[P]llama/common/minja.hpp
std::shared_ptr<VariableExpr> parseIdentifier() { static std::regex ident_regex(R"((?!(?:not|is|and|or|del)\b)[a-zA-Z_]\w*)"); auto location = get_location(); auto ident = consumeToken(ident_regex); if (ident.empty()) return nullptr; return std::make_shared<VariableExpr>(location, ident); }
O1
cpp
minja::Parser::parseIdentifier(): pushq %r14 pushq %rbx subq $0x48, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0xaf5cc(%rip), %rax # 0xdff98 movb (%rax), %al testb %al, %al je 0x30a8e movq (%r14), %rax movq %rax, 0x10(%rsp) movq 0x8(%r14), %rax movq %rax, 0x18(%rsp) testq %rax, %rax je 0x30a01 movq 0xae5a5(%rip), %rcx # 0xdef98 cmpb $0x0, (%rcx) je 0x309fd incl 0x8(%rax) jmp 0x30a01 lock incl 0x8(%rax) movq 0x20(%r14), %rax subq 0x10(%r14), %rax movq %rax, 0x20(%rsp) leaq 0xaf563(%rip), %rdx # 0xdff78 leaq 0x28(%rsp), %rdi movq %r14, %rsi movl $0x1, %ecx callq 0x3030e cmpq $0x0, 0x30(%rsp) je 0x30a53 movq $0x0, (%rbx) leaq 0x8(%rbx), %rdi leaq 0xf(%rsp), %rdx leaq 0x10(%rsp), %rcx leaq 0x28(%rsp), %r8 movq %rbx, %rsi callq 0x5a46a jmp 0x30a59 xorps %xmm0, %xmm0 movups %xmm0, (%rbx) leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x30a74 movq 0x38(%rsp), %rsi incq %rsi callq 0x186a0 movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x30a83 callq 0x2fde4 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r14 retq leaq 0xaf503(%rip), %rdi # 0xdff98 callq 0x18c00 testl %eax, %eax je 0x309d6 leaq 0xaf4cf(%rip), %rdi # 0xdff78 leaq 0x7dcde(%rip), %rsi # 0xae78e movl $0x10, %edx callq 0x2fe54 leaq -0xc05(%rip), %rdi # 0x2febc leaq 0xaf4b0(%rip), %rsi # 0xdff78 leaq 0xaebd9(%rip), %rdx # 0xdf6a8 callq 0x185d0 leaq 0xaf4bd(%rip), %rdi # 0xdff98 callq 0x18440 jmp 0x309d6 movq %rax, %rbx leaq 0xaf4a9(%rip), %rdi # 0xdff98 callq 0x18430 jmp 0x30b28 movq %rax, %rbx leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x30b19 movq 0x38(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x30b19 movq %rax, %rbx movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x30b28 callq 0x2fde4 movq %rbx, %rdi callq 0x18bb0
_ZN5minja6Parser15parseIdentifierEv: push r14 push rbx sub rsp, 48h mov r14, rsi mov rbx, rdi lea rax, _ZGVZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; `guard variable for'minja::Parser::parseIdentifier(void)::ident_regex mov al, [rax] test al, al jz loc_30A8E loc_309D6: mov rax, [r14] mov [rsp+58h+var_48], rax mov rax, [r14+8] mov [rsp+58h+var_40], rax test rax, rax jz short loc_30A01 mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_309FD inc dword ptr [rax+8] jmp short loc_30A01 loc_309FD: lock inc dword ptr [rax+8] loc_30A01: mov rax, [r14+20h] sub rax, [r14+10h] mov [rsp+58h+var_38], rax lea rdx, _ZZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; minja::Parser::parseIdentifier(void)::ident_regex lea rdi, [rsp+58h+var_30] mov rsi, r14 mov ecx, 1 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling) cmp [rsp+58h+var_28], 0 jz short loc_30A53 mov qword ptr [rbx], 0 lea rdi, [rbx+8] lea rdx, [rsp+58h+var_49] lea rcx, [rsp+58h+var_48] lea r8, [rsp+58h+var_30] mov rsi, rbx call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN5minja12VariableExprESaIS5_EJRNS4_8LocationERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::VariableExpr,std::allocator<minja::VariableExpr>,minja::Location &,std::string &>(minja::VariableExpr *&,std::_Sp_alloc_shared_tag<std::allocator<minja::VariableExpr>>,minja::Location &,std::string &) jmp short loc_30A59 loc_30A53: xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 loc_30A59: lea rax, [rsp+58h+var_20] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_30A74 mov rsi, [rsp+58h+var_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_30A74: mov rdi, [rsp+58h+var_40] test rdi, rdi jz short loc_30A83 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_30A83: mov rax, rbx add rsp, 48h pop rbx pop r14 retn loc_30A8E: lea rdi, _ZGVZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_309D6 lea rdi, _ZZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; minja::Parser::parseIdentifier(void)::ident_regex lea rsi, aNotIsAndOrDelB; "(?!(?:not|is|and|or|del)\\b)[a-zA-Z_]\\"... mov edx, 10h call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc lea rsi, _ZZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; __guard * call ___cxa_guard_release jmp loc_309D6 mov rbx, rax lea rdi, _ZGVZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; __guard * call ___cxa_guard_abort jmp short loc_30B28 mov rbx, rax lea rax, [rsp+arg_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_30B19 mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_30B19 mov rbx, rax loc_30B19: mov rdi, [rsp+arg_10] test rdi, rdi jz short loc_30B28 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_30B28: mov rdi, rbx call __Unwind_Resume
minja::Parser * minja::Parser::parseIdentifier(minja::Parser *this, long long *a2) { volatile signed __int32 *v2; // rax char v4; // [rsp+Fh] [rbp-49h] BYREF long long v5; // [rsp+10h] [rbp-48h] BYREF volatile signed __int32 *v6; // [rsp+18h] [rbp-40h] long long v7; // [rsp+20h] [rbp-38h] void *v8[2]; // [rsp+28h] [rbp-30h] BYREF long long v9; // [rsp+38h] [rbp-20h] BYREF if ( !(_BYTE)`guard variable for'minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11], "(?!(?:not|is|and|or|del)\\b)[a-zA-Z_]\\w*", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11]); } v5 = *a2; v2 = (volatile signed __int32 *)a2[1]; v6 = v2; if ( v2 ) { if ( _libc_single_threaded ) ++*((_DWORD *)v2 + 2); else _InterlockedIncrement(v2 + 2); } v7 = a2[4] - a2[2]; minja::Parser::consumeToken( (long long)v8, (long long)a2, (long long)&minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11], 1u); if ( v8[1] ) { *(_QWORD *)this = 0LL; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::VariableExpr,std::allocator<minja::VariableExpr>,minja::Location &,std::string &>( (char *)this + 8, this, &v4, &v5, v8); } else { *(_OWORD *)this = 0LL; } if ( v8[0] != &v9 ) operator delete(v8[0], v9 + 1); if ( v6 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v6); return this; }
parseIdentifier: PUSH R14 PUSH RBX SUB RSP,0x48 MOV R14,RSI MOV RBX,RDI LEA RAX,[0x1dff98] MOV AL,byte ptr [RAX] TEST AL,AL JZ 0x00130a8e LAB_001309d6: MOV RAX,qword ptr [R14] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [R14 + 0x8] MOV qword ptr [RSP + 0x18],RAX TEST RAX,RAX JZ 0x00130a01 MOV RCX,qword ptr [0x001def98] CMP byte ptr [RCX],0x0 JZ 0x001309fd INC dword ptr [RAX + 0x8] JMP 0x00130a01 LAB_001309fd: INC.LOCK dword ptr [RAX + 0x8] LAB_00130a01: MOV RAX,qword ptr [R14 + 0x20] SUB RAX,qword ptr [R14 + 0x10] MOV qword ptr [RSP + 0x20],RAX LAB_00130a0e: LEA RDX,[0x1dff78] LEA RDI,[RSP + 0x28] MOV RSI,R14 MOV ECX,0x1 CALL 0x0013030e CMP qword ptr [RSP + 0x30],0x0 JZ 0x00130a53 MOV qword ptr [RBX],0x0 LEA RDI,[RBX + 0x8] LAB_00130a3a: LEA RDX,[RSP + 0xf] LEA RCX,[RSP + 0x10] LEA R8,[RSP + 0x28] MOV RSI,RBX CALL 0x0015a46a JMP 0x00130a59 LAB_00130a53: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 LAB_00130a59: LEA RAX,[RSP + 0x38] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00130a74 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x001186a0 LAB_00130a74: MOV RDI,qword ptr [RSP + 0x18] TEST RDI,RDI JZ 0x00130a83 CALL 0x0012fde4 LAB_00130a83: MOV RAX,RBX ADD RSP,0x48 POP RBX POP R14 RET LAB_00130a8e: LEA RDI,[0x1dff98] CALL 0x00118c00 TEST EAX,EAX JZ 0x001309d6 LAB_00130aa2: LEA RDI,[0x1dff78] LEA RSI,[0x1ae78e] MOV EDX,0x10 CALL 0x0012fe54 LAB_00130aba: LEA RDI,[0x12febc] LEA RSI,[0x1dff78] LEA RDX,[0x1df6a8] CALL 0x001185d0 LEA RDI,[0x1dff98] CALL 0x00118440 JMP 0x001309d6
/* minja::Parser::parseIdentifier() */ void minja::Parser::parseIdentifier(void) { _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *this; int iVar1; long in_RSI; int8 *in_RDI; long *local_30; long local_28; long local_20 [2]; if (parseIdentifier()::ident_regex_abi_cxx11_ == '\0') { iVar1 = __cxa_guard_acquire(&parseIdentifier()::ident_regex_abi_cxx11_); if (iVar1 != 0) { /* try { // try from 00130aa2 to 00130ab9 has its CatchHandler @ 00130ae5 */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex ((basic_regex<char,std::__cxx11::regex_traits<char>> *) parseIdentifier()::ident_regex_abi_cxx11_, "(?!(?:not|is|and|or|del)\\b)[a-zA-Z_]\\w*",0x10); __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, parseIdentifier()::ident_regex_abi_cxx11_,&__dso_handle); __cxa_guard_release(&parseIdentifier()::ident_regex_abi_cxx11_); } } this = *(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(in_RSI + 8); if (this != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_001def98 == '\0') { LOCK(); *(int *)(this + 8) = *(int *)(this + 8) + 1; UNLOCK(); } else { *(int *)(this + 8) = *(int *)(this + 8) + 1; } } /* try { // try from 00130a0e to 00130a26 has its CatchHandler @ 00130b16 */ consumeToken(&local_30); if (local_28 == 0) { *in_RDI = 0; in_RDI[1] = 0; } else { *in_RDI = 0; /* try { // try from 00130a3a to 00130a50 has its CatchHandler @ 00130af6 */ std::__shared_count<(__gnu_cxx::_Lock_policy)2>:: __shared_count<minja::VariableExpr,std::allocator<minja::VariableExpr>,minja::Location&,std::__cxx11::string&> ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(in_RDI + 1)); } if (local_30 != local_20) { operator_delete(local_30,local_20[0] + 1); } if (this != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(this); } return; }
16,845
quorem
eloqsql/libmariadb/libmariadb/ma_dtoa.c
static int quorem(Bigint *b, Bigint *S) { int n; ULong *bx, *bxe, q, *sx, *sxe; ULLong borrow, carry, y, ys; n= S->wds; if (b->wds < n) return 0; sx= S->p.x; sxe= sx + --n; bx= b->p.x; bxe= bx + n; q= *bxe / (*sxe + 1); /* ensure q <= true quotient */ if (q) { borrow= 0; carry= 0; do { ys= *sx++ * (ULLong)q + carry; carry= ys >> 32; y= *bx - (ys & FFFFFFFF) - borrow; borrow= y >> 32 & (ULong)1; *bx++= (ULong) (y & FFFFFFFF); } while (sx <= sxe); if (!*bxe) { bx= b->p.x; while (--bxe > bx && !*bxe) --n; b->wds= n; } } if (cmp(b, S) >= 0) { q++; borrow= 0; carry= 0; bx= b->p.x; sx= S->p.x; do { ys= *sx++ + carry; carry= ys >> 32; y= *bx - (ys & FFFFFFFF) - borrow; borrow= y >> 32 & (ULong)1; *bx++= (ULong) (y & FFFFFFFF); } while (sx <= sxe); bx= b->p.x; bxe= bx + n; if (!*bxe) { while (--bxe > bx && !*bxe) --n; b->wds= n; } } return q; }
O0
c
quorem: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x18(%rbp), %rax movl 0x14(%rax), %eax movl %eax, -0x1c(%rbp) movq -0x10(%rbp), %rax movl 0x14(%rax), %eax cmpl -0x1c(%rbp), %eax jge 0x35d32 movl $0x0, -0x4(%rbp) jmp 0x35fc3 movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movl -0x1c(%rbp), %ecx addl $-0x1, %ecx movl %ecx, -0x1c(%rbp) movslq %ecx, %rcx shlq $0x2, %rcx addq %rcx, %rax movq %rax, -0x48(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movslq -0x1c(%rbp), %rcx shlq $0x2, %rcx addq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movl (%rax), %eax movq -0x48(%rbp), %rcx movl (%rcx), %ecx addl $0x1, %ecx xorl %edx, %edx divl %ecx movl %eax, -0x34(%rbp) cmpl $0x0, -0x34(%rbp) je 0x35e8a movq $0x0, -0x50(%rbp) movq $0x0, -0x58(%rbp) movq -0x40(%rbp), %rax movq %rax, %rcx addq $0x4, %rcx movq %rcx, -0x40(%rbp) movl (%rax), %eax movl -0x34(%rbp), %ecx imulq %rcx, %rax addq -0x58(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x68(%rbp), %rax shrq $0x20, %rax movq %rax, -0x58(%rbp) movq -0x28(%rbp), %rax movl (%rax), %eax movabsq $0xffffffff, %rcx # imm = 0xFFFFFFFF andq -0x68(%rbp), %rcx subq %rcx, %rax subq -0x50(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x60(%rbp), %rax shrq $0x20, %rax andq $0x1, %rax movq %rax, -0x50(%rbp) movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF andq -0x60(%rbp), %rax movl %eax, %ecx movq -0x28(%rbp), %rax movq %rax, %rdx addq $0x4, %rdx movq %rdx, -0x28(%rbp) movl %ecx, (%rax) movq -0x40(%rbp), %rax cmpq -0x48(%rbp), %rax jbe 0x35da6 movq -0x30(%rbp), %rax cmpl $0x0, (%rax) jne 0x35e88 movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) movq -0x30(%rbp), %rcx addq $-0x4, %rcx movq %rcx, -0x30(%rbp) xorl %eax, %eax cmpq -0x28(%rbp), %rcx movb %al, -0x69(%rbp) jbe 0x35e6a movq -0x30(%rbp), %rax cmpl $0x0, (%rax) setne %al xorb $-0x1, %al movb %al, -0x69(%rbp) movb -0x69(%rbp), %al testb $0x1, %al jne 0x35e73 jmp 0x35e7e movl -0x1c(%rbp), %eax addl $-0x1, %eax movl %eax, -0x1c(%rbp) jmp 0x35e44 movl -0x1c(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x14(%rax) jmp 0x35e8a movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x359e0 cmpl $0x0, %eax jl 0x35fbd movl -0x34(%rbp), %eax addl $0x1, %eax movl %eax, -0x34(%rbp) movq $0x0, -0x50(%rbp) movq $0x0, -0x58(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq %rax, %rcx addq $0x4, %rcx movq %rcx, -0x40(%rbp) movl (%rax), %eax addq -0x58(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x68(%rbp), %rax shrq $0x20, %rax movq %rax, -0x58(%rbp) movq -0x28(%rbp), %rax movl (%rax), %eax movabsq $0xffffffff, %rcx # imm = 0xFFFFFFFF andq -0x68(%rbp), %rcx subq %rcx, %rax subq -0x50(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x60(%rbp), %rax shrq $0x20, %rax andq $0x1, %rax movq %rax, -0x50(%rbp) movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF andq -0x60(%rbp), %rax movl %eax, %ecx movq -0x28(%rbp), %rax movq %rax, %rdx addq $0x4, %rdx movq %rdx, -0x28(%rbp) movl %ecx, (%rax) movq -0x40(%rbp), %rax cmpq -0x48(%rbp), %rax jbe 0x35ecf movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movslq -0x1c(%rbp), %rcx shlq $0x2, %rcx addq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax cmpl $0x0, (%rax) jne 0x35fbb jmp 0x35f77 movq -0x30(%rbp), %rcx addq $-0x4, %rcx movq %rcx, -0x30(%rbp) xorl %eax, %eax cmpq -0x28(%rbp), %rcx movb %al, -0x6a(%rbp) jbe 0x35f9d movq -0x30(%rbp), %rax cmpl $0x0, (%rax) setne %al xorb $-0x1, %al movb %al, -0x6a(%rbp) movb -0x6a(%rbp), %al testb $0x1, %al jne 0x35fa6 jmp 0x35fb1 movl -0x1c(%rbp), %eax addl $-0x1, %eax movl %eax, -0x1c(%rbp) jmp 0x35f77 movl -0x1c(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x14(%rax) jmp 0x35fbd movl -0x34(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x70, %rsp popq %rbp retq nopl (%rax)
quorem: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_18] mov eax, [rax+14h] mov [rbp+var_1C], eax mov rax, [rbp+var_10] mov eax, [rax+14h] cmp eax, [rbp+var_1C] jge short loc_35D32 mov [rbp+var_4], 0 jmp loc_35FC3 loc_35D32: mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_40], rax mov rax, [rbp+var_40] mov ecx, [rbp+var_1C] add ecx, 0FFFFFFFFh mov [rbp+var_1C], ecx movsxd rcx, ecx shl rcx, 2 add rax, rcx mov [rbp+var_48], rax mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_28], rax mov rax, [rbp+var_28] movsxd rcx, [rbp+var_1C] shl rcx, 2 add rax, rcx mov [rbp+var_30], rax mov rax, [rbp+var_30] mov eax, [rax] mov rcx, [rbp+var_48] mov ecx, [rcx] add ecx, 1 xor edx, edx div ecx mov [rbp+var_34], eax cmp [rbp+var_34], 0 jz loc_35E8A mov [rbp+var_50], 0 mov [rbp+var_58], 0 loc_35DA6: mov rax, [rbp+var_40] mov rcx, rax add rcx, 4 mov [rbp+var_40], rcx mov eax, [rax] mov ecx, [rbp+var_34] imul rax, rcx add rax, [rbp+var_58] mov [rbp+var_68], rax mov rax, [rbp+var_68] shr rax, 20h mov [rbp+var_58], rax mov rax, [rbp+var_28] mov eax, [rax] mov rcx, 0FFFFFFFFh and rcx, [rbp+var_68] sub rax, rcx sub rax, [rbp+var_50] mov [rbp+var_60], rax mov rax, [rbp+var_60] shr rax, 20h and rax, 1 mov [rbp+var_50], rax mov rax, 0FFFFFFFFh and rax, [rbp+var_60] mov ecx, eax mov rax, [rbp+var_28] mov rdx, rax add rdx, 4 mov [rbp+var_28], rdx mov [rax], ecx mov rax, [rbp+var_40] cmp rax, [rbp+var_48] jbe loc_35DA6 mov rax, [rbp+var_30] cmp dword ptr [rax], 0 jnz short loc_35E88 mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_28], rax loc_35E44: mov rcx, [rbp+var_30] add rcx, 0FFFFFFFFFFFFFFFCh mov [rbp+var_30], rcx xor eax, eax cmp rcx, [rbp+var_28] mov [rbp+var_69], al jbe short loc_35E6A mov rax, [rbp+var_30] cmp dword ptr [rax], 0 setnz al xor al, 0FFh mov [rbp+var_69], al loc_35E6A: mov al, [rbp+var_69] test al, 1 jnz short loc_35E73 jmp short loc_35E7E loc_35E73: mov eax, [rbp+var_1C] add eax, 0FFFFFFFFh mov [rbp+var_1C], eax jmp short loc_35E44 loc_35E7E: mov ecx, [rbp+var_1C] mov rax, [rbp+var_10] mov [rax+14h], ecx loc_35E88: jmp short $+2 loc_35E8A: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call cmp cmp eax, 0 jl loc_35FBD mov eax, [rbp+var_34] add eax, 1 mov [rbp+var_34], eax mov [rbp+var_50], 0 mov [rbp+var_58], 0 mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_28], rax mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_40], rax loc_35ECF: mov rax, [rbp+var_40] mov rcx, rax add rcx, 4 mov [rbp+var_40], rcx mov eax, [rax] add rax, [rbp+var_58] mov [rbp+var_68], rax mov rax, [rbp+var_68] shr rax, 20h mov [rbp+var_58], rax mov rax, [rbp+var_28] mov eax, [rax] mov rcx, 0FFFFFFFFh and rcx, [rbp+var_68] sub rax, rcx sub rax, [rbp+var_50] mov [rbp+var_60], rax mov rax, [rbp+var_60] shr rax, 20h and rax, 1 mov [rbp+var_50], rax mov rax, 0FFFFFFFFh and rax, [rbp+var_60] mov ecx, eax mov rax, [rbp+var_28] mov rdx, rax add rdx, 4 mov [rbp+var_28], rdx mov [rax], ecx mov rax, [rbp+var_40] cmp rax, [rbp+var_48] jbe short loc_35ECF mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_28], rax mov rax, [rbp+var_28] movsxd rcx, [rbp+var_1C] shl rcx, 2 add rax, rcx mov [rbp+var_30], rax mov rax, [rbp+var_30] cmp dword ptr [rax], 0 jnz short loc_35FBB jmp short $+2 loc_35F77: mov rcx, [rbp+var_30] add rcx, 0FFFFFFFFFFFFFFFCh mov [rbp+var_30], rcx xor eax, eax cmp rcx, [rbp+var_28] mov [rbp+var_6A], al jbe short loc_35F9D mov rax, [rbp+var_30] cmp dword ptr [rax], 0 setnz al xor al, 0FFh mov [rbp+var_6A], al loc_35F9D: mov al, [rbp+var_6A] test al, 1 jnz short loc_35FA6 jmp short loc_35FB1 loc_35FA6: mov eax, [rbp+var_1C] add eax, 0FFFFFFFFh mov [rbp+var_1C], eax jmp short loc_35F77 loc_35FB1: mov ecx, [rbp+var_1C] mov rax, [rbp+var_10] mov [rax+14h], ecx loc_35FBB: jmp short $+2 loc_35FBD: mov eax, [rbp+var_34] mov [rbp+var_4], eax loc_35FC3: mov eax, [rbp+var_4] add rsp, 70h pop rbp retn
long long quorem(long long a1, long long a2) { unsigned int *v2; // rax unsigned int *v3; // rax unsigned int *v4; // rax unsigned int *v5; // rax char v7; // [rsp+6h] [rbp-6Ah] char v8; // [rsp+7h] [rbp-69h] unsigned long long v9; // [rsp+8h] [rbp-68h] unsigned long long v10; // [rsp+8h] [rbp-68h] unsigned long long v11; // [rsp+10h] [rbp-60h] unsigned long long v12; // [rsp+10h] [rbp-60h] unsigned long long v13; // [rsp+18h] [rbp-58h] unsigned long long v14; // [rsp+18h] [rbp-58h] long long v15; // [rsp+20h] [rbp-50h] long long v16; // [rsp+20h] [rbp-50h] unsigned int *v17; // [rsp+28h] [rbp-48h] unsigned int *v18; // [rsp+30h] [rbp-40h] unsigned int *v19; // [rsp+30h] [rbp-40h] unsigned int v20; // [rsp+3Ch] [rbp-34h] _DWORD *v21; // [rsp+40h] [rbp-30h] _DWORD *v22; // [rsp+40h] [rbp-30h] unsigned int *v23; // [rsp+48h] [rbp-28h] unsigned int *v24; // [rsp+48h] [rbp-28h] int v25; // [rsp+54h] [rbp-1Ch] int v26; // [rsp+54h] [rbp-1Ch] v25 = *(_DWORD *)(a2 + 20); if ( *(_DWORD *)(a1 + 20) >= v25 ) { v18 = *(unsigned int **)a2; v26 = v25 - 1; v17 = (unsigned int *)(4LL * v26 + *(_QWORD *)a2); v23 = *(unsigned int **)a1; v21 = (_DWORD *)(4LL * v26 + *(_QWORD *)a1); v20 = *v21 / (*v17 + 1); if ( v20 ) { v15 = 0LL; v13 = 0LL; do { v2 = v18++; v9 = v13 + v20 * (unsigned long long)*v2; v13 = HIDWORD(v9); v11 = *v23 - (unsigned long long)(unsigned int)v9 - v15; v15 = HIDWORD(v11) & 1; v3 = v23++; *v3 = v11; } while ( v18 <= v17 ); if ( !*v21 ) { while ( 1 ) { --v21; v8 = 0; if ( (unsigned long long)v21 > *(_QWORD *)a1 ) v8 = ~(*v21 != 0); if ( (v8 & 1) == 0 ) break; --v26; } *(_DWORD *)(a1 + 20) = v26; } } if ( (int)cmp(a1, a2) >= 0 ) { ++v20; v16 = 0LL; v14 = 0LL; v24 = *(unsigned int **)a1; v19 = *(unsigned int **)a2; do { v4 = v19++; v10 = v14 + *v4; v14 = HIDWORD(v10); v12 = *v24 - (unsigned long long)(unsigned int)v10 - v16; v16 = HIDWORD(v12) & 1; v5 = v24++; *v5 = v12; } while ( v19 <= v17 ); v22 = (_DWORD *)(4LL * v26 + *(_QWORD *)a1); if ( !*v22 ) { while ( 1 ) { --v22; v7 = 0; if ( (unsigned long long)v22 > *(_QWORD *)a1 ) v7 = ~(*v22 != 0); if ( (v7 & 1) == 0 ) break; --v26; } *(_DWORD *)(a1 + 20) = v26; } } return v20; } else { return 0; } }
quorem: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x14] MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x14] CMP EAX,dword ptr [RBP + -0x1c] JGE 0x00135d32 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00135fc3 LAB_00135d32: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] MOV ECX,dword ptr [RBP + -0x1c] ADD ECX,-0x1 MOV dword ptr [RBP + -0x1c],ECX MOVSXD RCX,ECX SHL RCX,0x2 ADD RAX,RCX MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] MOVSXD RCX,dword ptr [RBP + -0x1c] SHL RCX,0x2 ADD RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RAX] MOV RCX,qword ptr [RBP + -0x48] MOV ECX,dword ptr [RCX] ADD ECX,0x1 XOR EDX,EDX DIV ECX MOV dword ptr [RBP + -0x34],EAX CMP dword ptr [RBP + -0x34],0x0 JZ 0x00135e8a MOV qword ptr [RBP + -0x50],0x0 MOV qword ptr [RBP + -0x58],0x0 LAB_00135da6: MOV RAX,qword ptr [RBP + -0x40] MOV RCX,RAX ADD RCX,0x4 MOV qword ptr [RBP + -0x40],RCX MOV EAX,dword ptr [RAX] MOV ECX,dword ptr [RBP + -0x34] IMUL RAX,RCX ADD RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x68] SHR RAX,0x20 MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX] MOV RCX,0xffffffff AND RCX,qword ptr [RBP + -0x68] SUB RAX,RCX SUB RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x60] SHR RAX,0x20 AND RAX,0x1 MOV qword ptr [RBP + -0x50],RAX MOV RAX,0xffffffff AND RAX,qword ptr [RBP + -0x60] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x28] MOV RDX,RAX ADD RDX,0x4 MOV qword ptr [RBP + -0x28],RDX MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x40] CMP RAX,qword ptr [RBP + -0x48] JBE 0x00135da6 MOV RAX,qword ptr [RBP + -0x30] CMP dword ptr [RAX],0x0 JNZ 0x00135e88 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX LAB_00135e44: MOV RCX,qword ptr [RBP + -0x30] ADD RCX,-0x4 MOV qword ptr [RBP + -0x30],RCX XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x28] MOV byte ptr [RBP + -0x69],AL JBE 0x00135e6a MOV RAX,qword ptr [RBP + -0x30] CMP dword ptr [RAX],0x0 SETNZ AL XOR AL,0xff MOV byte ptr [RBP + -0x69],AL LAB_00135e6a: MOV AL,byte ptr [RBP + -0x69] TEST AL,0x1 JNZ 0x00135e73 JMP 0x00135e7e LAB_00135e73: MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,-0x1 MOV dword ptr [RBP + -0x1c],EAX JMP 0x00135e44 LAB_00135e7e: MOV ECX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x14],ECX LAB_00135e88: JMP 0x00135e8a LAB_00135e8a: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x001359e0 CMP EAX,0x0 JL 0x00135fbd MOV EAX,dword ptr [RBP + -0x34] ADD EAX,0x1 MOV dword ptr [RBP + -0x34],EAX MOV qword ptr [RBP + -0x50],0x0 MOV qword ptr [RBP + -0x58],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x40],RAX LAB_00135ecf: MOV RAX,qword ptr [RBP + -0x40] MOV RCX,RAX ADD RCX,0x4 MOV qword ptr [RBP + -0x40],RCX MOV EAX,dword ptr [RAX] ADD RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x68] SHR RAX,0x20 MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX] MOV RCX,0xffffffff AND RCX,qword ptr [RBP + -0x68] SUB RAX,RCX SUB RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x60] SHR RAX,0x20 AND RAX,0x1 MOV qword ptr [RBP + -0x50],RAX MOV RAX,0xffffffff AND RAX,qword ptr [RBP + -0x60] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x28] MOV RDX,RAX ADD RDX,0x4 MOV qword ptr [RBP + -0x28],RDX MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x40] CMP RAX,qword ptr [RBP + -0x48] JBE 0x00135ecf MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] MOVSXD RCX,dword ptr [RBP + -0x1c] SHL RCX,0x2 ADD RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] CMP dword ptr [RAX],0x0 JNZ 0x00135fbb JMP 0x00135f77 LAB_00135f77: MOV RCX,qword ptr [RBP + -0x30] ADD RCX,-0x4 MOV qword ptr [RBP + -0x30],RCX XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x28] MOV byte ptr [RBP + -0x6a],AL JBE 0x00135f9d MOV RAX,qword ptr [RBP + -0x30] CMP dword ptr [RAX],0x0 SETNZ AL XOR AL,0xff MOV byte ptr [RBP + -0x6a],AL LAB_00135f9d: MOV AL,byte ptr [RBP + -0x6a] TEST AL,0x1 JNZ 0x00135fa6 JMP 0x00135fb1 LAB_00135fa6: MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,-0x1 MOV dword ptr [RBP + -0x1c],EAX JMP 0x00135f77 LAB_00135fb1: MOV ECX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x14],ECX LAB_00135fbb: JMP 0x00135fbd LAB_00135fbd: MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x4],EAX LAB_00135fc3: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x70 POP RBP RET
uint quorem(int8 *param_1,int8 *param_2) { int iVar1; uint *puVar2; ulong uVar3; uint *puVar4; bool bVar5; ulong local_60; ulong local_58; uint *local_48; uint local_3c; uint *local_38; uint *local_30; int local_24; uint local_c; if (*(int *)((long)param_1 + 0x14) < *(int *)((long)param_2 + 0x14)) { local_c = 0; } else { local_24 = *(int *)((long)param_2 + 0x14) + -1; puVar2 = (uint *)*param_2 + local_24; local_38 = (uint *)*param_1 + local_24; local_3c = *local_38 / (*puVar2 + 1); if (local_3c != 0) { local_58 = 0; local_60 = 0; local_48 = (uint *)*param_2; local_30 = (uint *)*param_1; do { puVar4 = local_48 + 1; uVar3 = (ulong)*local_48 * (ulong)local_3c + local_60; local_60 = uVar3 >> 0x20; uVar3 = ((ulong)*local_30 - (uVar3 & 0xffffffff)) - local_58; local_58 = uVar3 >> 0x20 & 1; *local_30 = (uint)uVar3; local_48 = puVar4; local_30 = local_30 + 1; } while (puVar4 <= puVar2); if (*local_38 == 0) { while( true ) { local_38 = local_38 + -1; bVar5 = false; if ((uint *)*param_1 < local_38) { bVar5 = *local_38 == 0; } if (!bVar5) break; local_24 = local_24 + -1; } *(int *)((long)param_1 + 0x14) = local_24; } } iVar1 = cmp(param_1,param_2); if (-1 < iVar1) { local_3c = local_3c + 1; local_58 = 0; local_60 = 0; local_48 = (uint *)*param_2; local_30 = (uint *)*param_1; do { puVar4 = local_48 + 1; uVar3 = *local_48 + local_60; local_60 = uVar3 >> 0x20; uVar3 = ((ulong)*local_30 - (uVar3 & 0xffffffff)) - local_58; local_58 = uVar3 >> 0x20 & 1; *local_30 = (uint)uVar3; local_48 = puVar4; local_30 = local_30 + 1; } while (puVar4 <= puVar2); local_38 = (uint *)((int *)*param_1 + local_24); if (*local_38 == 0) { while( true ) { local_38 = local_38 + -1; bVar5 = false; if ((int *)*param_1 < local_38) { bVar5 = *local_38 == 0; } if (!bVar5) break; local_24 = local_24 + -1; } *(int *)((long)param_1 + 0x14) = local_24; } } local_c = local_3c; } return local_c; }
16,846
testing::AssertionResult testing::internal::FloatingPointLE<float>(char const*, char const*, float, float)
giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest.cc
AssertionResult FloatingPointLE(const char* expr1, const char* expr2, RawType val1, RawType val2) { // Returns success if val1 is less than val2, if (val1 < val2) { return AssertionSuccess(); } // or if val1 is almost equal to val2. const FloatingPoint<RawType> lhs(val1), rhs(val2); if (lhs.AlmostEquals(rhs)) { return AssertionSuccess(); } // Note that the above two checks will both fail if either val1 or // val2 is NaN, as the IEEE floating-point standard requires that // any predicate involving a NaN must return false. ::std::stringstream val1_ss; val1_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2) << val1; ::std::stringstream val2_ss; val2_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2) << val2; return AssertionFailure() << "Expected: (" << expr1 << ") <= (" << expr2 << ")\n" << " Actual: " << StringStreamToString(&val1_ss) << " vs " << StringStreamToString(&val2_ss); }
O3
cpp
testing::AssertionResult testing::internal::FloatingPointLE<float>(char const*, char const*, float, float): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x380, %rsp # imm = 0x380 movq %rdi, %rbx movq %rsi, 0x20(%rsp) movq %rdx, 0x18(%rsp) ucomiss %xmm0, %xmm1 ja 0x33316 leaq 0x2c(%rsp), %rdi movss %xmm0, 0x4(%rsp) movss %xmm0, (%rdi) leaq 0x28(%rsp), %rsi movss %xmm1, (%rsp) movss %xmm1, (%rsi) callq 0x3aa7c testb %al, %al je 0x33326 movb $0x1, (%rbx) movq $0x0, 0x8(%rbx) jmp 0x334d9 leaq 0x1f8(%rsp), %rdi callq 0x8340 leaq 0x208(%rsp), %rdi movq (%rdi), %rax movq -0x18(%rax), %rax movq $0x8, 0x210(%rsp,%rax) xorps %xmm0, %xmm0 cvtss2sd 0x4(%rsp), %xmm0 callq 0x88f0 leaq 0x70(%rsp), %rdi callq 0x8340 leaq 0x80(%rsp), %rdi movq (%rdi), %rax movq -0x18(%rax), %rax movq $0x8, 0x88(%rsp,%rax) xorps %xmm0, %xmm0 cvtss2sd (%rsp), %xmm0 callq 0x88f0 leaq 0x10(%rsp), %r14 movb $0x0, -0x8(%r14) movq $0x0, (%r14) leaq 0xd293(%rip), %rsi # 0x40639 leaq 0x8(%rsp), %rdi callq 0xe358 leaq 0x20(%rsp), %rsi movq %rax, %rdi callq 0xe3d6 leaq 0x113b8(%rip), %rsi # 0x4477c movq %rax, %rdi callq 0x331d2 leaq 0x18(%rsp), %rsi movq %rax, %rdi callq 0xe3d6 leaq 0xff81(%rip), %rsi # 0x43361 movq %rax, %rdi callq 0xe466 leaq 0xf830(%rip), %rsi # 0x42c1f movq %rax, %rdi callq 0x36b88 movq %rax, %r12 leaq 0x50(%rsp), %rdi leaq 0x1f8(%rsp), %r15 movq %r15, %rsi callq 0x1cbbf leaq 0x50(%rsp), %rsi movq %r12, %rdi callq 0xe4e4 leaq 0xd231(%rip), %rsi # 0x40654 movq %rax, %rdi callq 0xe558 movq %rax, %r13 leaq 0x30(%rsp), %rdi leaq 0x70(%rsp), %r12 movq %r12, %rsi callq 0x1cbbf leaq 0x30(%rsp), %rsi movq %r13, %rdi callq 0xe4e4 movq %rbx, %rdi movq %rax, %rsi callq 0xece8 leaq 0x40(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x33473 movq 0x40(%rsp), %rsi incq %rsi callq 0x84e0 leaq 0x60(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x3348e movq 0x60(%rsp), %rsi incq %rsi callq 0x84e0 movq 0x10(%rsp), %rsi testq %rsi, %rsi je 0x334a0 movq %r14, %rdi callq 0xdb84 movq 0x25ae9(%rip), %r14 # 0x58f90 movq %r12, %rdi movq %r14, %rsi callq 0x8390 movl $0x80, %r13d addq %r13, %r12 movq %r12, %rdi callq 0x8190 movq %r15, %rdi movq %r14, %rsi callq 0x8390 addq %r13, %r15 movq %r15, %rdi callq 0x8190 movq %rbx, %rax addq $0x380, %rsp # imm = 0x380 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq jmp 0x3351d jmp 0x3353d movq %rax, %rbx jmp 0x33552 jmp 0x334f8 movq %rax, %rbx jmp 0x33570 movq %rax, %rbx leaq 0x40(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x33520 movq 0x40(%rsp), %rsi incq %rsi callq 0x84e0 jmp 0x33520 movq %rax, %rbx leaq 0x60(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x33540 movq 0x60(%rsp), %rsi incq %rsi callq 0x84e0 jmp 0x33540 movq %rax, %rbx movq 0x10(%rsp), %rsi testq %rsi, %rsi je 0x33552 movq %r14, %rdi callq 0xdb84 movq 0x25a37(%rip), %rsi # 0x58f90 leaq 0x70(%rsp), %rdi callq 0x8390 leaq 0xf0(%rsp), %rdi callq 0x8190 movq 0x25a19(%rip), %rsi # 0x58f90 leaq 0x1f8(%rsp), %rdi callq 0x8390 leaq 0x278(%rsp), %rdi callq 0x8190 movq %rbx, %rdi callq 0x8990
_ZN7testing8internal15FloatingPointLEIfEENS_15AssertionResultEPKcS4_T_S5_: push r15 push r14 push r13 push r12 push rbx sub rsp, 380h mov rbx, rdi mov [rsp+3A8h+var_388], rsi mov [rsp+3A8h+var_390], rdx ucomiss xmm1, xmm0 ja short loc_33316 lea rdi, [rsp+3A8h+var_37C] movss dword ptr [rsp+3A8h+var_3A8+4], xmm0 movss dword ptr [rdi], xmm0 lea rsi, [rsp+3A8h+var_380] movss dword ptr [rsp+3A8h+var_3A8], xmm1; __int64 movss dword ptr [rsi], xmm1 call _ZNK7testing8internal13FloatingPointIfE12AlmostEqualsERKS2_; testing::internal::FloatingPoint<float>::AlmostEquals(testing::internal::FloatingPoint<float> const&) test al, al jz short loc_33326 loc_33316: mov byte ptr [rbx], 1 mov qword ptr [rbx+8], 0 jmp loc_334D9 loc_33326: lea rdi, [rsp+3A8h+var_1B0] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) lea rdi, [rsp+3A8h+var_1A0] mov rax, [rdi] mov rax, [rax-18h] mov [rsp+rax+3A8h+var_198], 8 xorps xmm0, xmm0 cvtss2sd xmm0, dword ptr [rsp+3A8h+var_3A8+4] call __ZNSo9_M_insertIdEERSoT_; std::ostream::_M_insert<double>(double) lea rdi, [rsp+3A8h+var_338] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) lea rdi, [rsp+3A8h+var_328] mov rax, [rdi] mov rax, [rax-18h] mov [rsp+rax+3A8h+var_320], 8 xorps xmm0, xmm0 cvtss2sd xmm0, dword ptr [rsp+3A8h+var_3A8] call __ZNSo9_M_insertIdEERSoT_; std::ostream::_M_insert<double>(double) lea r14, [rsp+3A8h+var_398] mov byte ptr [r14-8], 0 mov qword ptr [r14], 0 lea rsi, aExpected; "Expected: (" lea rdi, [rsp+3A8h+var_3A0]; this call _ZN7testing15AssertionResultlsIA12_cEERS0_RKT_; testing::AssertionResult::operator<<<char [12]>(char [12] const&) lea rsi, [rsp+3A8h+var_388] mov rdi, rax; this call _ZN7testing15AssertionResultlsIPKcEERS0_RKT_; testing::AssertionResult::operator<<<char const*>(char const* const&) lea rsi, asc_4477C; ") <= (" mov rdi, rax; this call _ZN7testing15AssertionResultlsIA7_cEERS0_RKT_; testing::AssertionResult::operator<<<char [7]>(char [7] const&) lea rsi, [rsp+3A8h+var_390] mov rdi, rax; this call _ZN7testing15AssertionResultlsIPKcEERS0_RKT_; testing::AssertionResult::operator<<<char const*>(char const* const&) lea rsi, aSMs+7; ")\n" mov rdi, rax; this call _ZN7testing15AssertionResultlsIA3_cEERS0_RKT_; testing::AssertionResult::operator<<<char [3]>(char [3] const&) lea rsi, aActual_0+1; " Actual: " mov rdi, rax; this call _ZN7testing15AssertionResultlsIA11_cEERS0_RKT_; testing::AssertionResult::operator<<<char [11]>(char [11] const&) mov r12, rax lea rdi, [rsp+3A8h+var_358] lea r15, [rsp+3A8h+var_1B0] mov rsi, r15 call _ZN7testing8internal20StringStreamToStringEPNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE; testing::internal::StringStreamToString(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>> *) lea rsi, [rsp+3A8h+var_358] mov rdi, r12; this call _ZN7testing15AssertionResultlsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERS0_RKT_; testing::AssertionResult::operator<<<std::string>(std::string const&) lea rsi, aVs; " vs " mov rdi, rax; this call _ZN7testing15AssertionResultlsIA5_cEERS0_RKT_; testing::AssertionResult::operator<<<char [5]>(char [5] const&) mov r13, rax lea rdi, [rsp+3A8h+var_378] lea r12, [rsp+3A8h+var_338] mov rsi, r12 call _ZN7testing8internal20StringStreamToStringEPNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE; testing::internal::StringStreamToString(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>> *) lea rsi, [rsp+3A8h+var_378] mov rdi, r13; this call _ZN7testing15AssertionResultlsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERS0_RKT_; testing::AssertionResult::operator<<<std::string>(std::string const&) mov rdi, rbx mov rsi, rax call _ZN7testing15AssertionResultC2ERKS0_; testing::AssertionResult::AssertionResult(testing::AssertionResult const&) lea rax, [rsp+3A8h+var_368] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_33473 mov rsi, [rsp+3A8h+var_368] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_33473: lea rax, [rsp+3A8h+var_348] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_3348E mov rsi, [rsp+3A8h+var_348] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3348E: mov rsi, [rsp+3A8h+var_398] test rsi, rsi jz short loc_334A0 mov rdi, r14 call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*) loc_334A0: mov r14, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr mov rdi, r12 mov rsi, r14 call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() mov r13d, 80h add r12, r13 mov rdi, r12; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, r15 mov rsi, r14 call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() add r15, r13 mov rdi, r15; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() loc_334D9: mov rax, rbx add rsp, 380h pop rbx pop r12 pop r13 pop r14 pop r15 retn jmp short loc_3351D jmp short loc_3353D mov rbx, rax jmp short loc_33552 jmp short $+2 loc_334F8: mov rbx, rax jmp short loc_33570 mov rbx, rax lea rax, [rsp+arg_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_33520 mov rsi, [rsp+arg_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_33520 loc_3351D: mov rbx, rax loc_33520: lea rax, [rsp+arg_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_33540 mov rsi, [rsp+arg_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_33540 loc_3353D: mov rbx, rax loc_33540: mov rsi, [rsp+arg_8] test rsi, rsi jz short loc_33552 mov rdi, r14 call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*) loc_33552: mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+arg_68] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+arg_E8]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() loc_33570: mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+arg_1F0] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+arg_270]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, rbx call __Unwind_Resume
testing::AssertionResult * testing::internal::FloatingPointLE<float>( testing::AssertionResult *a1, const char *a2, const char *a3, float a4, float a5) { testing::AssertionResult *v5; // rax testing::AssertionResult *v6; // rax testing::AssertionResult *v7; // rax testing::AssertionResult *v8; // rax testing::AssertionResult *v9; // rax testing::AssertionResult *v10; // r12 testing::AssertionResult *v11; // rax testing::AssertionResult *v12; // r13 testing::AssertionResult *v13; // rax _BYTE v15[8]; // [rsp+8h] [rbp-3A0h] BYREF long long v16; // [rsp+10h] [rbp-398h] BYREF const char *v17; // [rsp+18h] [rbp-390h] BYREF const char *v18; // [rsp+20h] [rbp-388h] BYREF float v19; // [rsp+28h] [rbp-380h] float v20; // [rsp+2Ch] [rbp-37Ch] void *v21[2]; // [rsp+30h] [rbp-378h] BYREF long long v22; // [rsp+40h] [rbp-368h] BYREF void *v23[2]; // [rsp+50h] [rbp-358h] BYREF long long v24; // [rsp+60h] [rbp-348h] BYREF _BYTE v25[16]; // [rsp+70h] [rbp-338h] BYREF _QWORD v26[14]; // [rsp+80h] [rbp-328h] BYREF long long v27; // [rsp+F0h] [rbp-2B8h] BYREF _BYTE v28[16]; // [rsp+1F8h] [rbp-1B0h] BYREF _QWORD v29[14]; // [rsp+208h] [rbp-1A0h] BYREF long long v30; // [rsp+278h] [rbp-130h] BYREF v18 = a2; v17 = a3; if ( a5 > a4 || (v20 = a4, v19 = a5, (unsigned __int8)testing::internal::FloatingPoint<float>::AlmostEquals()) ) { *(_BYTE *)a1 = 1; *((_QWORD *)a1 + 1) = 0LL; } else { std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v28); *(_QWORD *)((char *)&v29[1] + *(_QWORD *)(v29[0] - 24LL)) = 8LL; std::ostream::_M_insert<double>(v29, a4); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v25); *(_QWORD *)((char *)&v26[1] + *(_QWORD *)(v26[0] - 24LL)) = 8LL; std::ostream::_M_insert<double>(v26, a5); v15[0] = 0; v16 = 0LL; v5 = testing::AssertionResult::operator<<<char [12]>((testing::AssertionResult *)v15, (long long)"Expected: ("); v6 = testing::AssertionResult::operator<<<char const*>(v5, &v18); v7 = testing::AssertionResult::operator<<<char [7]>(v6, (long long)") <= ("); v8 = testing::AssertionResult::operator<<<char const*>(v7, &v17); v9 = testing::AssertionResult::operator<<<char [3]>(v8, (long long)")\n"); v10 = (testing::AssertionResult *)testing::AssertionResult::operator<<<char [11]>( v9, __SPAIR64__(LODWORD(a4), LODWORD(a5))); testing::internal::StringStreamToString((long long)v23, (long long)v28); v11 = testing::AssertionResult::operator<<<std::string>(v10, v23); v12 = testing::AssertionResult::operator<<<char [5]>(v11, (long long)" vs "); testing::internal::StringStreamToString((long long)v21, (long long)v25); v13 = testing::AssertionResult::operator<<<std::string>(v12, v21); testing::AssertionResult::AssertionResult(a1, v13); if ( v21[0] != &v22 ) operator delete(v21[0], v22 + 1); if ( v23[0] != &v24 ) operator delete(v23[0], v24 + 1); if ( v16 ) std::default_delete<std::string>::operator()((long long)&v16, v16); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream( v25, &`VTT for'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>); std::ios_base::~ios_base((std::ios_base *)&v27); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream( v28, &`VTT for'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>); std::ios_base::~ios_base((std::ios_base *)&v30); } return a1; }
FloatingPointLE<float>: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x380 MOV RBX,RDI MOV qword ptr [RSP + 0x20],RSI MOV qword ptr [RSP + 0x18],RDX UCOMISS XMM1,XMM0 JA 0x00133316 LEA RDI,[RSP + 0x2c] MOVSS dword ptr [RSP + 0x4],XMM0 MOVSS dword ptr [RDI],XMM0 LEA RSI,[RSP + 0x28] MOVSS dword ptr [RSP],XMM1 MOVSS dword ptr [RSI],XMM1 CALL 0x0013aa7c TEST AL,AL JZ 0x00133326 LAB_00133316: MOV byte ptr [RBX],0x1 MOV qword ptr [RBX + 0x8],0x0 JMP 0x001334d9 LAB_00133326: LEA RDI,[RSP + 0x1f8] CALL 0x00108340 LEA RDI,[RSP + 0x208] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + -0x18] MOV qword ptr [RSP + RAX*0x1 + 0x210],0x8 XORPS XMM0,XMM0 CVTSS2SD XMM0,dword ptr [RSP + 0x4] LAB_00133357: CALL 0x001088f0 LAB_0013335c: LEA RDI,[RSP + 0x70] CALL 0x00108340 LEA RDI,[RSP + 0x80] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + -0x18] MOV qword ptr [RSP + RAX*0x1 + 0x88],0x8 XORPS XMM0,XMM0 CVTSS2SD XMM0,dword ptr [RSP] LAB_00133389: CALL 0x001088f0 LEA R14,[RSP + 0x10] MOV byte ptr [R14 + -0x8],0x0 MOV qword ptr [R14],0x0 LAB_0013339f: LEA RSI,[0x140639] LEA RDI,[RSP + 0x8] CALL 0x0010e358 LEA RSI,[RSP + 0x20] MOV RDI,RAX CALL 0x0010e3d6 LEA RSI,[0x14477c] MOV RDI,RAX CALL 0x001331d2 LEA RSI,[RSP + 0x18] MOV RDI,RAX CALL 0x0010e3d6 LEA RSI,[0x143361] MOV RDI,RAX CALL 0x0010e466 LEA RSI,[0x142c1f] MOV RDI,RAX CALL 0x00136b88 LAB_001333f7: MOV R12,RAX LEA RDI,[RSP + 0x50] LEA R15,[RSP + 0x1f8] MOV RSI,R15 CALL 0x0011cbbf LAB_0013340f: LEA RSI,[RSP + 0x50] MOV RDI,R12 CALL 0x0010e4e4 LEA RSI,[0x140654] MOV RDI,RAX CALL 0x0010e558 LAB_0013342b: MOV R13,RAX LEA RDI,[RSP + 0x30] LEA R12,[RSP + 0x70] MOV RSI,R12 CALL 0x0011cbbf LAB_00133440: LEA RSI,[RSP + 0x30] MOV RDI,R13 CALL 0x0010e4e4 MOV RDI,RBX MOV RSI,RAX CALL 0x0010ece8 LAB_00133458: LEA RAX,[RSP + 0x40] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00133473 MOV RSI,qword ptr [RSP + 0x40] INC RSI CALL 0x001084e0 LAB_00133473: LEA RAX,[RSP + 0x60] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0013348e MOV RSI,qword ptr [RSP + 0x60] INC RSI CALL 0x001084e0 LAB_0013348e: MOV RSI,qword ptr [RSP + 0x10] TEST RSI,RSI JZ 0x001334a0 MOV RDI,R14 CALL 0x0010db84 LAB_001334a0: MOV R14,qword ptr [0x00158f90] MOV RDI,R12 MOV RSI,R14 CALL 0x00108390 MOV R13D,0x80 ADD R12,R13 MOV RDI,R12 CALL 0x00108190 MOV RDI,R15 MOV RSI,R14 CALL 0x00108390 ADD R15,R13 MOV RDI,R15 CALL 0x00108190 LAB_001334d9: MOV RAX,RBX ADD RSP,0x380 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* testing::AssertionResult testing::internal::FloatingPointLE<float>(char const*, char const*, float, float) */ internal * __thiscall testing::internal::FloatingPointLE<float> (internal *this,char *param_1,char *param_2,float param_3,float param_4) { char cVar1; AssertionResult *pAVar2; AssertionResult local_3a0 [8]; string *local_398; char *local_390; char *local_388; float local_380; float local_37c; long *local_378 [2]; long local_368 [2]; long *local_358 [2]; long local_348 [2]; stringstream local_338 [16]; long local_328; int8 auStack_320 [13]; ios_base aiStack_2b8 [264]; stringstream local_1b0 [16]; long local_1a0; int8 auStack_198 [13]; ios_base aiStack_130 [264]; if ((param_4 <= param_3) && (local_390 = param_2, local_388 = param_1, local_380 = param_4, local_37c = param_3, cVar1 = FloatingPoint<float>::AlmostEquals ((FloatingPoint<float> *)&local_37c,(FloatingPoint *)&local_380), cVar1 == '\0')) { std::__cxx11::stringstream::stringstream(local_1b0); *(int8 *)((long)auStack_198 + *(long *)(local_1a0 + -0x18)) = 8; /* try { // try from 00133357 to 0013335b has its CatchHandler @ 001334f8 */ std::ostream::_M_insert<double>((double)param_3); /* try { // try from 0013335c to 00133365 has its CatchHandler @ 001334f6 */ std::__cxx11::stringstream::stringstream(local_338); *(int8 *)((long)auStack_320 + *(long *)(local_328 + -0x18)) = 8; /* try { // try from 00133389 to 0013338d has its CatchHandler @ 001334f1 */ std::ostream::_M_insert<double>((double)param_4); local_3a0[0] = (AssertionResult)0x0; local_398 = (string *)0x0; /* try { // try from 0013339f to 001333f6 has its CatchHandler @ 0013353d */ pAVar2 = (AssertionResult *)AssertionResult::operator<<(local_3a0,"Expected: ("); pAVar2 = AssertionResult::operator<<(pAVar2,&local_388); pAVar2 = AssertionResult::operator<<(pAVar2,") <= ("); pAVar2 = AssertionResult::operator<<(pAVar2,&local_390); pAVar2 = AssertionResult::operator<<(pAVar2,")\n"); pAVar2 = AssertionResult::operator<<(pAVar2," Actual: "); /* try { // try from 001333f7 to 0013340e has its CatchHandler @ 001334ef */ StringStreamToString((stringstream *)local_358); /* try { // try from 0013340f to 0013342a has its CatchHandler @ 0013351d */ pAVar2 = AssertionResult::operator<<(pAVar2,(string *)local_358); pAVar2 = AssertionResult::operator<<(pAVar2," vs "); /* try { // try from 0013342b to 0013343f has its CatchHandler @ 001334ed */ StringStreamToString((stringstream *)local_378); /* try { // try from 00133440 to 00133457 has its CatchHandler @ 001334fd */ pAVar2 = AssertionResult::operator<<(pAVar2,(string *)local_378); AssertionResult::AssertionResult((AssertionResult *)this,pAVar2); if (local_378[0] != local_368) { operator_delete(local_378[0],local_368[0] + 1); } if (local_358[0] != local_348) { operator_delete(local_358[0],local_348[0] + 1); } if (local_398 != (string *)0x0) { std::default_delete<std::__cxx11::string>::operator() ((default_delete<std::__cxx11::string> *)&local_398,local_398); } std::__cxx11::stringstream::~stringstream(local_338); std::ios_base::~ios_base(aiStack_2b8); std::__cxx11::stringstream::~stringstream(local_1b0); std::ios_base::~ios_base(aiStack_130); return this; } *this = (internal)0x1; *(int8 *)(this + 8) = 0; return this; }
16,847
ma_bitmap_reset_cache
eloqsql/storage/maria/ma_bitmap.c
void _ma_bitmap_reset_cache(MARIA_SHARE *share) { MARIA_FILE_BITMAP *bitmap= &share->bitmap; if (bitmap->map) /* If using bitmap */ { /* Forget changes in current bitmap page */ bitmap->changed= 0; /* We can't read a page yet, as in some case we don't have an active page cache yet. Pretend we have a dummy, full and not changed bitmap page in memory. We set bitmap->page to a value so that if we use it in move_to_next_bitmap() it will point to page 0. (This can only happen if writing to a bitmap page fails) */ bitmap->page= ((pgcache_page_no_t) 0) - bitmap->pages_covered; bitmap->used_size= bitmap->total_size= bitmap->max_total_size; bitmap->full_head_size= bitmap->full_tail_size= bitmap->max_total_size; bfill(bitmap->map, share->block_size, 255); #ifndef DBUG_OFF memcpy(bitmap->map + bitmap->block_size, bitmap->map, bitmap->block_size); #endif /* Start scanning for free space from start of file */ share->state.first_bitmap_with_space = 0; } }
O0
c
ma_bitmap_reset_cache: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0xa10, %rax # imm = 0xA10 movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x8(%rax) je 0x41a02 movq -0x10(%rbp), %rax movb $0x0, 0x20(%rax) movq -0x10(%rbp), %rax xorl %ecx, %ecx subq 0x138(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x10(%rbp), %rax movl 0x12c(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x128(%rax) movq -0x10(%rbp), %rax movl %ecx, 0x24(%rax) movq -0x10(%rbp), %rax movl 0x12c(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x2c(%rax) movq -0x10(%rbp), %rax movl %ecx, 0x28(%rax) movq -0x10(%rbp), %rax movq 0x8(%rax), %rdi movq -0x8(%rbp), %rax movl 0x7bc(%rax), %eax movl %eax, %edx movl $0xff, %esi callq 0x2a2c0 movq -0x8(%rbp), %rax movq $0x0, 0xd0(%rax) addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
_ma_bitmap_reset_cache: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] add rax, 0A10h mov [rbp+var_10], rax mov rax, [rbp+var_10] cmp qword ptr [rax+8], 0 jz short loc_41A02 mov rax, [rbp+var_10] mov byte ptr [rax+20h], 0 mov rax, [rbp+var_10] xor ecx, ecx sub rcx, [rax+138h] mov rax, [rbp+var_10] mov [rax+10h], rcx mov rax, [rbp+var_10] mov ecx, [rax+12Ch] mov rax, [rbp+var_10] mov [rax+128h], ecx mov rax, [rbp+var_10] mov [rax+24h], ecx mov rax, [rbp+var_10] mov ecx, [rax+12Ch] mov rax, [rbp+var_10] mov [rax+2Ch], ecx mov rax, [rbp+var_10] mov [rax+28h], ecx mov rax, [rbp+var_10] mov rdi, [rax+8] mov rax, [rbp+var_8] mov eax, [rax+7BCh] mov edx, eax mov esi, 0FFh call _memset mov rax, [rbp+var_8] mov qword ptr [rax+0D0h], 0 loc_41A02: add rsp, 10h pop rbp retn
long long ma_bitmap_reset_cache(long long a1) { long long result; // rax int v2; // ecx int v3; // ecx result = a1 + 2576; if ( *(_QWORD *)(a1 + 2584) ) { *(_BYTE *)(a1 + 2608) = 0; *(_QWORD *)(a1 + 2592) = -*(_QWORD *)(a1 + 2888); v2 = *(_DWORD *)(a1 + 2876); *(_DWORD *)(a1 + 2872) = v2; *(_DWORD *)(a1 + 2612) = v2; v3 = *(_DWORD *)(a1 + 2876); *(_DWORD *)(a1 + 2620) = v3; *(_DWORD *)(a1 + 2616) = v3; memset(*(_QWORD *)(a1 + 2584), 255LL, *(unsigned int *)(a1 + 1980)); result = a1; *(_QWORD *)(a1 + 208) = 0LL; } return result; }
_ma_bitmap_reset_cache: PUSH RBP MOV RBP,RSP SUB RSP,0x10 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] CMP qword ptr [RAX + 0x8],0x0 JZ 0x00141a02 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x20],0x0 MOV RAX,qword ptr [RBP + -0x10] XOR ECX,ECX SUB RCX,qword ptr [RAX + 0x138] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x12c] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x128],ECX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x24],ECX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x12c] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x2c],ECX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x28],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x7bc] MOV EDX,EAX MOV ESI,0xff CALL 0x0012a2c0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xd0],0x0 LAB_00141a02: ADD RSP,0x10 POP RBP RET
void _ma_bitmap_reset_cache(long param_1) { if (*(long *)(param_1 + 0xa18) != 0) { *(int1 *)(param_1 + 0xa30) = 0; *(long *)(param_1 + 0xa20) = -*(long *)(param_1 + 0xb48); *(int4 *)(param_1 + 0xb38) = *(int4 *)(param_1 + 0xb3c); *(int4 *)(param_1 + 0xa34) = *(int4 *)(param_1 + 0xb3c); *(int4 *)(param_1 + 0xa3c) = *(int4 *)(param_1 + 0xb3c); *(int4 *)(param_1 + 0xa38) = *(int4 *)(param_1 + 0xb3c); memset(*(void **)(param_1 + 0xa18),0xff,(ulong)*(uint *)(param_1 + 0x7bc)); *(int8 *)(param_1 + 0xd0) = 0; } return; }
16,848
translog_buffer_decrease_writers
eloqsql/storage/maria/ma_loghandler.c
static void translog_buffer_decrease_writers(struct st_translog_buffer *buffer) { DBUG_ENTER("translog_buffer_decrease_writers"); translog_buffer_lock_assert_owner(buffer); buffer->copy_to_buffer_in_progress--; DBUG_PRINT("info", ("copy_to_buffer_in_progress. Buffer #%u %p progress: %d", (uint) buffer->buffer_no, buffer, buffer->copy_to_buffer_in_progress)); if (buffer->copy_to_buffer_in_progress == 0) mysql_cond_broadcast(&buffer->waiting_filling_buffer); DBUG_VOID_RETURN; }
O0
c
translog_buffer_decrease_writers: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movl 0x100078(%rax), %ecx addl $-0x1, %ecx movl %ecx, 0x100078(%rax) jmp 0x5bd91 movq -0x8(%rbp), %rax cmpl $0x0, 0x100078(%rax) jne 0x5bdae movq -0x8(%rbp), %rdi addq $0x100040, %rdi # imm = 0x100040 callq 0x55fa0 jmp 0x5bdb0 jmp 0x5bdb2 addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
translog_buffer_decrease_writers: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov ecx, ds:dword_100078[rax] add ecx, 0FFFFFFFFh mov ds:dword_100078[rax], ecx jmp short $+2 loc_5BD91: mov rax, [rbp+var_8] cmp ds:dword_100078[rax], 0 jnz short loc_5BDAE mov rdi, [rbp+var_8] add rdi, 100040h call inline_mysql_cond_broadcast_0 loc_5BDAE: jmp short $+2 loc_5BDB0: jmp short $+2 loc_5BDB2: add rsp, 10h pop rbp retn
long long translog_buffer_decrease_writers(long long a1) { long long result; // rax --*(int *)((char *)&dword_100078 + a1); result = a1; if ( !*(int *)((char *)&dword_100078 + a1) ) return inline_mysql_cond_broadcast_0(a1 + 1048640); return result; }
translog_buffer_decrease_writers: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x100078] ADD ECX,-0x1 MOV dword ptr [RAX + 0x100078],ECX JMP 0x0015bd91 LAB_0015bd91: MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x100078],0x0 JNZ 0x0015bdae MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x100040 CALL 0x00155fa0 LAB_0015bdae: JMP 0x0015bdb0 LAB_0015bdb0: JMP 0x0015bdb2 LAB_0015bdb2: ADD RSP,0x10 POP RBP RET
void translog_buffer_decrease_writers(long param_1) { *(int *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_type + param_1) = *(int *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_type + param_1) + -1; if (*(int *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_type + param_1) == 0) { inline_mysql_cond_broadcast((long)&Elf64_Phdr_ARRAY_00100040[0].p_type + param_1); } return; }
16,849
my_hash_sort_simple_nopad
eloqsql/strings/ctype-simple.c
void my_hash_sort_simple_nopad(CHARSET_INFO *cs, const uchar *key, size_t len, ulong *nr1, ulong *nr2) { register const uchar *sort_order=cs->sort_order; const uchar *end= key + len; register ulong m1= *nr1, m2= *nr2; for (; key < (uchar*) end ; key++) { MY_HASH_ADD(m1, m2, (uint) sort_order[(uint) *key]); } *nr1= m1; *nr2= m2; }
O0
c
my_hash_sort_simple_nopad: 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 -0x8(%rbp), %rax movq 0x58(%rax), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x40(%rbp) movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x48(%rbp) movq -0x10(%rbp), %rax cmpq -0x38(%rbp), %rax jae 0x49504 jmp 0x494b2 movq -0x40(%rbp), %rax andq $0x3f, %rax addq -0x48(%rbp), %rax movq -0x30(%rbp), %rcx movq -0x10(%rbp), %rdx movzbl (%rdx), %edx movl %edx, %edx movzbl (%rcx,%rdx), %ecx movl %ecx, %ecx imulq %rcx, %rax movq -0x40(%rbp), %rcx shlq $0x8, %rcx addq %rcx, %rax xorq -0x40(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x48(%rbp), %rax addq $0x3, %rax movq %rax, -0x48(%rbp) jmp 0x494f6 movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0x494a6 movq -0x40(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movq -0x48(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) popq %rbp retq nopl (%rax)
my_hash_sort_simple_nopad: 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_8] mov rax, [rax+58h] mov [rbp+var_30], rax mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_38], rax mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_40], rax mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_48], rax loc_494A6: mov rax, [rbp+var_10] cmp rax, [rbp+var_38] jnb short loc_49504 jmp short $+2 loc_494B2: mov rax, [rbp+var_40] and rax, 3Fh add rax, [rbp+var_48] mov rcx, [rbp+var_30] mov rdx, [rbp+var_10] movzx edx, byte ptr [rdx] mov edx, edx movzx ecx, byte ptr [rcx+rdx] mov ecx, ecx imul rax, rcx mov rcx, [rbp+var_40] shl rcx, 8 add rax, rcx xor rax, [rbp+var_40] mov [rbp+var_40], rax mov rax, [rbp+var_48] add rax, 3 mov [rbp+var_48], rax jmp short $+2 loc_494F6: mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp short loc_494A6 loc_49504: mov rcx, [rbp+var_40] mov rax, [rbp+var_20] mov [rax], rcx mov rcx, [rbp+var_48] mov rax, [rbp+var_28] mov [rax], rcx pop rbp retn
_QWORD * my_hash_sort_simple_nopad(long long a1, unsigned __int8 *a2, long long a3, long long *a4, _QWORD *a5) { _QWORD *result; // rax long long v6; // [rsp+0h] [rbp-48h] long long v7; // [rsp+8h] [rbp-40h] unsigned __int8 *v8; // [rsp+38h] [rbp-10h] v8 = a2; v7 = *a4; v6 = *a5; while ( v8 < &a2[a3] ) { v7 ^= (v7 << 8) + *(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + *v8) * (v6 + (v7 & 0x3F)); v6 += 3LL; ++v8; } *a4 = v7; result = a5; *a5 = v6; return result; }
my_hash_sort_simple_nopad: 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 + -0x8] MOV RAX,qword ptr [RAX + 0x58] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x48],RAX LAB_001494a6: MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x38] JNC 0x00149504 JMP 0x001494b2 LAB_001494b2: MOV RAX,qword ptr [RBP + -0x40] AND RAX,0x3f ADD RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x10] MOVZX EDX,byte ptr [RDX] MOV EDX,EDX MOVZX ECX,byte ptr [RCX + RDX*0x1] MOV ECX,ECX IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x40] SHL RCX,0x8 ADD RAX,RCX XOR RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x48] ADD RAX,0x3 MOV qword ptr [RBP + -0x48],RAX JMP 0x001494f6 LAB_001494f6: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX JMP 0x001494a6 LAB_00149504: MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX POP RBP RET
void my_hash_sort_simple_nopad(long param_1,byte *param_2,long param_3,ulong *param_4,long *param_5) { long local_50; ulong local_48; byte *local_18; local_48 = *param_4; local_50 = *param_5; for (local_18 = param_2; local_18 < param_2 + param_3; local_18 = local_18 + 1) { local_48 = ((local_48 & 0x3f) + local_50) * (ulong)*(byte *)(*(long *)(param_1 + 0x58) + (ulong)*local_18) + local_48 * 0x100 ^ local_48; local_50 = local_50 + 3; } *param_4 = local_48; *param_5 = local_50; return; }
16,850
my_stmt_result
eloqsql/libmariadb/unittest/libmariadb/my_test.h
int my_stmt_result(MYSQL *mysql, const char *buff) { MYSQL_STMT *stmt; int row_count= 0; int rc; stmt= mysql_stmt_init(mysql); rc= mysql_stmt_prepare(stmt, buff, (unsigned long)strlen(buff)); FAIL_IF(rc, mysql_stmt_error(stmt)); rc= mysql_stmt_execute(stmt); FAIL_IF(rc, mysql_stmt_error(stmt)); while (mysql_stmt_fetch(stmt) != MYSQL_NO_DATA) row_count++; mysql_stmt_close(stmt); return row_count; }
O3
c
my_stmt_result: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rsi, %r14 callq 0x322b8 movq %rax, %rbx movq %r14, %rdi callq 0x141c0 movq %rbx, %rdi movq %r14, %rsi movq %rax, %rdx callq 0x3267c testl %eax, %eax je 0x14bb0 movq %rbx, %rdi callq 0x31d58 leaq 0x31641(%rip), %rdi # 0x461e0 leaq 0x31662(%rip), %rdx # 0x46208 movq %rax, %rsi movl $0x156, %ecx # imm = 0x156 jmp 0x14bda movq %rbx, %rdi callq 0x3324d testl %eax, %eax je 0x14bef movq %rbx, %rdi callq 0x31d58 leaq 0x31615(%rip), %rdi # 0x461e0 leaq 0x31636(%rip), %rdx # 0x46208 movq %rax, %rsi movl $0x159, %ecx # imm = 0x159 xorl %eax, %eax callq 0x264ef movl $0x1, %r14d movl %r14d, %eax popq %rbx popq %r14 popq %rbp retq movl $0xffffffff, %r14d # imm = 0xFFFFFFFF movq %rbx, %rdi callq 0x31d73 incl %r14d cmpl $0x64, %eax jne 0x14bf5 movq %rbx, %rdi callq 0x31cc9 jmp 0x14be7
my_stmt_result: push rbp mov rbp, rsp push r14 push rbx mov r14, rsi call mysql_stmt_init mov rbx, rax mov rdi, r14 call _strlen mov rdi, rbx mov rsi, r14 mov rdx, rax call mysql_stmt_prepare test eax, eax jz short loc_14BB0 mov rdi, rbx call mysql_stmt_error lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"... mov rsi, rax mov ecx, 156h jmp short loc_14BDA loc_14BB0: mov rdi, rbx call mysql_stmt_execute test eax, eax jz short loc_14BEF mov rdi, rbx call mysql_stmt_error lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"... mov rsi, rax mov ecx, 159h loc_14BDA: xor eax, eax call diag mov r14d, 1 loc_14BE7: mov eax, r14d pop rbx pop r14 pop rbp retn loc_14BEF: mov r14d, 0FFFFFFFFh loc_14BF5: mov rdi, rbx call mysql_stmt_fetch inc r14d cmp eax, 64h ; 'd' jnz short loc_14BF5 mov rdi, rbx call mysql_stmt_close jmp short loc_14BE7
long long my_stmt_result(long long a1, long long a2) { long long v2; // rbx long long v3; // rax int v4; // esi int v5; // r8d int v6; // r9d int v7; // ecx unsigned int v8; // r14d v2 = mysql_stmt_init(); v3 = strlen(a2); if ( (unsigned int)mysql_stmt_prepare(v2, a2, v3) ) { v4 = mysql_stmt_error(v2); v7 = 342; LABEL_5: diag( (unsigned int)"Error: %s (%s: %d)", v4, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h", v7, v5, v6); return 1; } if ( (unsigned int)mysql_stmt_execute(v2) ) { v4 = mysql_stmt_error(v2); v7 = 345; goto LABEL_5; } v8 = -1; do ++v8; while ( (unsigned int)mysql_stmt_fetch(v2) != 100 ); mysql_stmt_close(v2); return v8; }
my_stmt_result: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV R14,RSI CALL 0x001322b8 MOV RBX,RAX MOV RDI,R14 CALL 0x001141c0 MOV RDI,RBX MOV RSI,R14 MOV RDX,RAX CALL 0x0013267c TEST EAX,EAX JZ 0x00114bb0 MOV RDI,RBX CALL 0x00131d58 LEA RDI,[0x1461e0] LEA RDX,[0x146208] MOV RSI,RAX MOV ECX,0x156 JMP 0x00114bda LAB_00114bb0: MOV RDI,RBX CALL 0x0013324d TEST EAX,EAX JZ 0x00114bef MOV RDI,RBX CALL 0x00131d58 LEA RDI,[0x1461e0] LEA RDX,[0x146208] MOV RSI,RAX MOV ECX,0x159 LAB_00114bda: XOR EAX,EAX CALL 0x001264ef MOV R14D,0x1 LAB_00114be7: MOV EAX,R14D POP RBX POP R14 POP RBP RET LAB_00114bef: MOV R14D,0xffffffff LAB_00114bf5: MOV RDI,RBX CALL 0x00131d73 INC R14D CMP EAX,0x64 JNZ 0x00114bf5 MOV RDI,RBX CALL 0x00131cc9 JMP 0x00114be7
int my_stmt_result(int8 param_1,char *param_2) { int iVar1; int iVar2; int8 uVar3; size_t sVar4; int8 uVar5; uVar3 = mysql_stmt_init(); sVar4 = strlen(param_2); iVar1 = mysql_stmt_prepare(uVar3,param_2,sVar4); if (iVar1 == 0) { iVar1 = mysql_stmt_execute(uVar3); if (iVar1 == 0) { iVar1 = -1; do { iVar2 = mysql_stmt_fetch(uVar3); iVar1 = iVar1 + 1; } while (iVar2 != 100); mysql_stmt_close(uVar3); return iVar1; } uVar3 = mysql_stmt_error(uVar3); uVar5 = 0x159; } else { uVar3 = mysql_stmt_error(uVar3); uVar5 = 0x156; } diag("Error: %s (%s: %d)",uVar3, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",uVar5); return 1; }
16,851
alloc_root
eloqsql/mysys/my_alloc.c
void *alloc_root(MEM_ROOT *mem_root, size_t length) { #if defined(HAVE_valgrind) && defined(EXTRA_DEBUG) reg1 USED_MEM *next; DBUG_ENTER("alloc_root"); DBUG_PRINT("enter",("root: %p", mem_root)); DBUG_ASSERT(alloc_root_inited(mem_root)); DBUG_EXECUTE_IF("simulate_out_of_memory", { if (mem_root->error_handler) (*mem_root->error_handler)(); DBUG_SET("-d,simulate_out_of_memory"); DBUG_RETURN((void*) 0); /* purecov: inspected */ }); length+=ALIGN_SIZE(sizeof(USED_MEM)); if (!(next = (USED_MEM*) my_malloc(mem_root->m_psi_key, length, MYF(MY_WME | ME_FATAL | MALLOC_FLAG(mem_root->block_size))))) { if (mem_root->error_handler) (*mem_root->error_handler)(); DBUG_RETURN((uchar*) 0); /* purecov: inspected */ } next->next= mem_root->used; next->left= 0; next->size= length; mem_root->used= next; DBUG_PRINT("exit",("ptr: %p", (((char*)next)+ALIGN_SIZE(sizeof(USED_MEM))))); DBUG_RETURN((((uchar*) next)+ALIGN_SIZE(sizeof(USED_MEM)))); #else size_t get_size, block_size; uchar* point; reg1 USED_MEM *next= 0; reg2 USED_MEM **prev; size_t original_length __attribute__((unused)) = length; DBUG_ENTER("alloc_root"); DBUG_PRINT("enter",("root: %p", mem_root)); DBUG_ASSERT(alloc_root_inited(mem_root)); DBUG_EXECUTE_IF("simulate_out_of_memory", { /* Avoid reusing an already allocated block */ if (mem_root->error_handler) (*mem_root->error_handler)(); DBUG_SET("-d,simulate_out_of_memory"); DBUG_RETURN((void*) 0); /* purecov: inspected */ }); length= ALIGN_SIZE(length) + REDZONE_SIZE; if ((*(prev= &mem_root->free)) != NULL) { if ((*prev)->left < length && mem_root->first_block_usage++ >= ALLOC_MAX_BLOCK_USAGE_BEFORE_DROP && (*prev)->left < ALLOC_MAX_BLOCK_TO_DROP) { next= *prev; *prev= next->next; /* Remove block from list */ next->next= mem_root->used; mem_root->used= next; mem_root->first_block_usage= 0; } for (next= *prev ; next && next->left < length ; next= next->next) prev= &next->next; } if (! next) { /* Time to alloc new block */ block_size= (mem_root->block_size & ~1) * (mem_root->block_num >> 2); get_size= length+ALIGN_SIZE(sizeof(USED_MEM)); get_size= MY_MAX(get_size, block_size); if (!(next = (USED_MEM*) my_malloc(mem_root->m_psi_key, get_size, MYF(MY_WME | ME_FATAL | MALLOC_FLAG(mem_root-> block_size))))) { if (mem_root->error_handler) (*mem_root->error_handler)(); DBUG_RETURN((void*) 0); /* purecov: inspected */ } mem_root->block_num++; next->next= *prev; next->size= get_size; next->left= get_size-ALIGN_SIZE(sizeof(USED_MEM)); *prev=next; TRASH_MEM(next); } point= (uchar*) ((char*) next+ (next->size-next->left)); /*TODO: next part may be unneded due to mem_root->first_block_usage counter*/ if ((next->left-= length) < mem_root->min_malloc) { /* Full block */ *prev= next->next; /* Remove block from list */ next->next= mem_root->used; mem_root->used= next; mem_root->first_block_usage= 0; } point+= REDZONE_SIZE; TRASH_ALLOC(point, original_length); DBUG_PRINT("exit",("ptr: %p", point)); DBUG_RETURN((void*) point); #endif }
O0
c
alloc_root: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq $0x0, -0x38(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x48(%rbp) jmp 0xece32 jmp 0xece34 jmp 0xece36 jmp 0xece38 jmp 0xece3a movq -0x18(%rbp), %rax addq $0x8, %rax subq $0x1, %rax andq $-0x8, %rax addq $0x0, %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x40(%rbp) cmpq $0x0, (%rax) je 0xecf22 movq -0x40(%rbp), %rax movq (%rax), %rax movq 0x8(%rax), %rax cmpq -0x18(%rbp), %rax jae 0xeced9 movq -0x10(%rbp), %rcx movl 0x2c(%rcx), %eax movl %eax, %edx addl $0x1, %edx movl %edx, 0x2c(%rcx) cmpl $0xa, %eax jb 0xeced9 movq -0x40(%rbp), %rax movq (%rax), %rax cmpq $0x1000, 0x8(%rax) # imm = 0x1000 jae 0xeced9 movq -0x40(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq (%rax), %rcx movq -0x40(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rax movq 0x8(%rax), %rcx movq -0x38(%rbp), %rax movq %rcx, (%rax) movq -0x38(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x10(%rbp), %rax movl $0x0, 0x2c(%rax) movq -0x40(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) xorl %eax, %eax cmpq $0x0, -0x38(%rbp) movb %al, -0x49(%rbp) je 0xecf02 movq -0x38(%rbp), %rax movq 0x8(%rax), %rax cmpq -0x18(%rbp), %rax setb %al movb %al, -0x49(%rbp) movb -0x49(%rbp), %al testb $0x1, %al jne 0xecf0b jmp 0xecf20 movq -0x38(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x38(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) jmp 0xecee4 jmp 0xecf22 cmpq $0x0, -0x38(%rbp) jne 0xed025 movq -0x10(%rbp), %rax movq 0x20(%rax), %rax andq $-0x2, %rax movq -0x10(%rbp), %rcx movl 0x28(%rcx), %ecx shrl $0x2, %ecx movl %ecx, %ecx imulq %rcx, %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax addq $0x18, %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jbe 0xecf6d movq -0x20(%rbp), %rax movq %rax, -0x58(%rbp) jmp 0xecf75 movq -0x28(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movl 0x38(%rax), %edi movq -0x20(%rbp), %rsi movq -0x10(%rbp), %rax movq 0x20(%rax), %rdx andq $0x1, %rdx xorl %eax, %eax movl $0x10000, %ecx # imm = 0x10000 cmpq $0x0, %rdx cmovnel %ecx, %eax orl $0x1010, %eax # imm = 0x1010 movl %eax, %eax movl %eax, %edx callq 0xf3210 movq %rax, -0x38(%rbp) cmpq $0x0, %rax jne 0xecfdb movq -0x10(%rbp), %rax cmpq $0x0, 0x30(%rax) je 0xecfcc movq -0x10(%rbp), %rax callq *0x30(%rax) jmp 0xecfce movq $0x0, -0x8(%rbp) jmp 0xed0ad movq -0x10(%rbp), %rax movl 0x28(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x28(%rax) movq -0x40(%rbp), %rax movq (%rax), %rcx movq -0x38(%rbp), %rax movq %rcx, (%rax) movq -0x20(%rbp), %rcx movq -0x38(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x20(%rbp), %rcx subq $0x18, %rcx movq -0x38(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x38(%rbp), %rcx movq -0x40(%rbp), %rax movq %rcx, (%rax) jmp 0xed01f jmp 0xed021 jmp 0xed023 jmp 0xed025 movq -0x38(%rbp), %rax movq -0x38(%rbp), %rcx movq 0x10(%rcx), %rcx movq -0x38(%rbp), %rdx subq 0x8(%rdx), %rcx addq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x18(%rbp), %rdx movq -0x38(%rbp), %rcx movq 0x8(%rcx), %rax subq %rdx, %rax movq %rax, 0x8(%rcx) movq -0x10(%rbp), %rcx cmpq 0x18(%rcx), %rax jae 0xed091 movq -0x38(%rbp), %rax movq (%rax), %rcx movq -0x40(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rax movq 0x8(%rax), %rcx movq -0x38(%rbp), %rax movq %rcx, (%rax) movq -0x38(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x10(%rbp), %rax movl $0x0, 0x2c(%rax) movq -0x30(%rbp), %rax movq %rax, -0x30(%rbp) jmp 0xed09b jmp 0xed09d jmp 0xed09f jmp 0xed0a1 jmp 0xed0a3 jmp 0xed0a5 movq -0x30(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x60, %rsp popq %rbp retq nopw (%rax,%rax)
alloc_root: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_38], 0 mov rax, [rbp+var_18] mov [rbp+var_48], rax jmp short $+2 loc_ECE32: jmp short $+2 loc_ECE34: jmp short $+2 loc_ECE36: jmp short $+2 loc_ECE38: jmp short $+2 loc_ECE3A: mov rax, [rbp+var_18] add rax, 8 sub rax, 1 and rax, 0FFFFFFFFFFFFFFF8h add rax, 0 mov [rbp+var_18], rax mov rax, [rbp+var_10] mov [rbp+var_40], rax cmp qword ptr [rax], 0 jz loc_ECF22 mov rax, [rbp+var_40] mov rax, [rax] mov rax, [rax+8] cmp rax, [rbp+var_18] jnb short loc_ECED9 mov rcx, [rbp+var_10] mov eax, [rcx+2Ch] mov edx, eax add edx, 1 mov [rcx+2Ch], edx cmp eax, 0Ah jb short loc_ECED9 mov rax, [rbp+var_40] mov rax, [rax] cmp qword ptr [rax+8], 1000h jnb short loc_ECED9 mov rax, [rbp+var_40] mov rax, [rax] mov [rbp+var_38], rax mov rax, [rbp+var_38] mov rcx, [rax] mov rax, [rbp+var_40] mov [rax], rcx mov rax, [rbp+var_10] mov rcx, [rax+8] mov rax, [rbp+var_38] mov [rax], rcx mov rcx, [rbp+var_38] mov rax, [rbp+var_10] mov [rax+8], rcx mov rax, [rbp+var_10] mov dword ptr [rax+2Ch], 0 loc_ECED9: mov rax, [rbp+var_40] mov rax, [rax] mov [rbp+var_38], rax loc_ECEE4: xor eax, eax cmp [rbp+var_38], 0 mov [rbp+var_49], al jz short loc_ECF02 mov rax, [rbp+var_38] mov rax, [rax+8] cmp rax, [rbp+var_18] setb al mov [rbp+var_49], al loc_ECF02: mov al, [rbp+var_49] test al, 1 jnz short loc_ECF0B jmp short loc_ECF20 loc_ECF0B: mov rax, [rbp+var_38] mov [rbp+var_40], rax mov rax, [rbp+var_38] mov rax, [rax] mov [rbp+var_38], rax jmp short loc_ECEE4 loc_ECF20: jmp short $+2 loc_ECF22: cmp [rbp+var_38], 0 jnz loc_ED025 mov rax, [rbp+var_10] mov rax, [rax+20h] and rax, 0FFFFFFFFFFFFFFFEh mov rcx, [rbp+var_10] mov ecx, [rcx+28h] shr ecx, 2 mov ecx, ecx imul rax, rcx mov [rbp+var_28], rax mov rax, [rbp+var_18] add rax, 18h mov [rbp+var_20], rax mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jbe short loc_ECF6D mov rax, [rbp+var_20] mov [rbp+var_58], rax jmp short loc_ECF75 loc_ECF6D: mov rax, [rbp+var_28] mov [rbp+var_58], rax loc_ECF75: mov rax, [rbp+var_58] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov edi, [rax+38h] mov rsi, [rbp+var_20] mov rax, [rbp+var_10] mov rdx, [rax+20h] and rdx, 1 xor eax, eax mov ecx, 10000h cmp rdx, 0 cmovnz eax, ecx or eax, 1010h mov eax, eax mov edx, eax call my_malloc mov [rbp+var_38], rax cmp rax, 0 jnz short loc_ECFDB mov rax, [rbp+var_10] cmp qword ptr [rax+30h], 0 jz short loc_ECFCC mov rax, [rbp+var_10] call qword ptr [rax+30h] loc_ECFCC: jmp short $+2 loc_ECFCE: mov [rbp+var_8], 0 jmp loc_ED0AD loc_ECFDB: mov rax, [rbp+var_10] mov ecx, [rax+28h] add ecx, 1 mov [rax+28h], ecx mov rax, [rbp+var_40] mov rcx, [rax] mov rax, [rbp+var_38] mov [rax], rcx mov rcx, [rbp+var_20] mov rax, [rbp+var_38] mov [rax+10h], rcx mov rcx, [rbp+var_20] sub rcx, 18h mov rax, [rbp+var_38] mov [rax+8], rcx mov rcx, [rbp+var_38] mov rax, [rbp+var_40] mov [rax], rcx jmp short $+2 loc_ED01F: jmp short $+2 loc_ED021: jmp short $+2 loc_ED023: jmp short $+2 loc_ED025: mov rax, [rbp+var_38] mov rcx, [rbp+var_38] mov rcx, [rcx+10h] mov rdx, [rbp+var_38] sub rcx, [rdx+8] add rax, rcx mov [rbp+var_30], rax mov rdx, [rbp+var_18] mov rcx, [rbp+var_38] mov rax, [rcx+8] sub rax, rdx mov [rcx+8], rax mov rcx, [rbp+var_10] cmp rax, [rcx+18h] jnb short loc_ED091 mov rax, [rbp+var_38] mov rcx, [rax] mov rax, [rbp+var_40] mov [rax], rcx mov rax, [rbp+var_10] mov rcx, [rax+8] mov rax, [rbp+var_38] mov [rax], rcx mov rcx, [rbp+var_38] mov rax, [rbp+var_10] mov [rax+8], rcx mov rax, [rbp+var_10] mov dword ptr [rax+2Ch], 0 loc_ED091: mov rax, [rbp+var_30] mov [rbp+var_30], rax jmp short $+2 loc_ED09B: jmp short $+2 loc_ED09D: jmp short $+2 loc_ED09F: jmp short $+2 loc_ED0A1: jmp short $+2 loc_ED0A3: jmp short $+2 loc_ED0A5: mov rax, [rbp+var_30] mov [rbp+var_8], rax loc_ED0AD: mov rax, [rbp+var_8] add rsp, 60h pop rbp retn
char * alloc_root(_QWORD **a1, long long a2) { unsigned int v2; // eax long long v3; // rdi int v4; // eax unsigned long long v5; // rax unsigned long long v7; // [rsp+8h] [rbp-58h] bool v8; // [rsp+17h] [rbp-49h] _QWORD *v9; // [rsp+20h] [rbp-40h] _QWORD *i; // [rsp+28h] [rbp-38h] _QWORD *v11; // [rsp+28h] [rbp-38h] char *v12; // [rsp+30h] [rbp-30h] unsigned long long v13; // [rsp+48h] [rbp-18h] i = 0LL; v13 = (a2 + 7) & 0xFFFFFFFFFFFFFFF8LL; v9 = a1; if ( *a1 ) { if ( (*a1)[1] < v13 ) { v2 = *((_DWORD *)a1 + 11); *((_DWORD *)a1 + 11) = v2 + 1; if ( v2 >= 0xA && (*a1)[1] < 0x1000uLL ) { v11 = *a1; *a1 = (_QWORD *)**a1; *v11 = a1[1]; a1[1] = v11; *((_DWORD *)a1 + 11) = 0; } } for ( i = *a1; ; i = (_QWORD *)*i ) { v8 = 0; if ( i ) v8 = i[1] < v13; if ( !v8 ) break; v9 = i; } } if ( !i ) { if ( v13 + 24 <= (*((_DWORD *)a1 + 10) >> 2) * ((unsigned long long)a1[4] & 0xFFFFFFFFFFFFFFFELL) ) v7 = (*((_DWORD *)a1 + 10) >> 2) * ((unsigned long long)a1[4] & 0xFFFFFFFFFFFFFFFELL); else v7 = v13 + 24; v3 = *((unsigned int *)a1 + 14); v4 = 0; if ( ((unsigned long long)a1[4] & 1) != 0 ) v4 = 0x10000; i = (_QWORD *)my_malloc(v3, v7, v4 | 0x1010u); if ( !i ) { if ( a1[6] ) ((void (*)(void))a1[6])(); return 0LL; } ++*((_DWORD *)a1 + 10); *i = *v9; i[2] = v7; i[1] = v7 - 24; *v9 = i; } v12 = (char *)i + i[2] - i[1]; v5 = i[1] - v13; i[1] = v5; if ( v5 < (unsigned long long)a1[3] ) { *v9 = *i; *i = a1[1]; a1[1] = i; *((_DWORD *)a1 + 11) = 0; } return v12; }
alloc_root: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x38],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x48],RAX JMP 0x001ece32 LAB_001ece32: JMP 0x001ece34 LAB_001ece34: JMP 0x001ece36 LAB_001ece36: JMP 0x001ece38 LAB_001ece38: JMP 0x001ece3a LAB_001ece3a: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x8 SUB RAX,0x1 AND RAX,-0x8 ADD RAX,0x0 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x40],RAX CMP qword ptr [RAX],0x0 JZ 0x001ecf22 MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x8] CMP RAX,qword ptr [RBP + -0x18] JNC 0x001eced9 MOV RCX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RCX + 0x2c] MOV EDX,EAX ADD EDX,0x1 MOV dword ptr [RCX + 0x2c],EDX CMP EAX,0xa JC 0x001eced9 MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX] CMP qword ptr [RAX + 0x8],0x1000 JNC 0x001eced9 MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x2c],0x0 LAB_001eced9: MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX LAB_001ecee4: XOR EAX,EAX CMP qword ptr [RBP + -0x38],0x0 MOV byte ptr [RBP + -0x49],AL JZ 0x001ecf02 MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x8] CMP RAX,qword ptr [RBP + -0x18] SETC AL MOV byte ptr [RBP + -0x49],AL LAB_001ecf02: MOV AL,byte ptr [RBP + -0x49] TEST AL,0x1 JNZ 0x001ecf0b JMP 0x001ecf20 LAB_001ecf0b: MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX JMP 0x001ecee4 LAB_001ecf20: JMP 0x001ecf22 LAB_001ecf22: CMP qword ptr [RBP + -0x38],0x0 JNZ 0x001ed025 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] AND RAX,-0x2 MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x28] SHR ECX,0x2 MOV ECX,ECX IMUL RAX,RCX MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x18 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JBE 0x001ecf6d MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x58],RAX JMP 0x001ecf75 LAB_001ecf6d: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x58],RAX LAB_001ecf75: MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV EDI,dword ptr [RAX + 0x38] MOV RSI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x20] AND RDX,0x1 XOR EAX,EAX MOV ECX,0x10000 CMP RDX,0x0 CMOVNZ EAX,ECX OR EAX,0x1010 MOV EAX,EAX MOV EDX,EAX CALL 0x001f3210 MOV qword ptr [RBP + -0x38],RAX CMP RAX,0x0 JNZ 0x001ecfdb MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x30],0x0 JZ 0x001ecfcc MOV RAX,qword ptr [RBP + -0x10] CALL qword ptr [RAX + 0x30] LAB_001ecfcc: JMP 0x001ecfce LAB_001ecfce: MOV qword ptr [RBP + -0x8],0x0 JMP 0x001ed0ad LAB_001ecfdb: MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x28] ADD ECX,0x1 MOV dword ptr [RAX + 0x28],ECX MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x10],RCX MOV RCX,qword ptr [RBP + -0x20] SUB RCX,0x18 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x8],RCX MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RAX],RCX JMP 0x001ed01f LAB_001ed01f: JMP 0x001ed021 LAB_001ed021: JMP 0x001ed023 LAB_001ed023: JMP 0x001ed025 LAB_001ed025: MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RCX + 0x10] MOV RDX,qword ptr [RBP + -0x38] SUB RCX,qword ptr [RDX + 0x8] ADD RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RCX + 0x8] SUB RAX,RDX MOV qword ptr [RCX + 0x8],RAX MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x18] JNC 0x001ed091 MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x2c],0x0 LAB_001ed091: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x30],RAX JMP 0x001ed09b LAB_001ed09b: JMP 0x001ed09d LAB_001ed09d: JMP 0x001ed09f LAB_001ed09f: JMP 0x001ed0a1 LAB_001ed0a1: JMP 0x001ed0a3 LAB_001ed0a3: JMP 0x001ed0a5 LAB_001ed0a5: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x8],RAX LAB_001ed0ad: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x60 POP RBP RET
long alloc_root(long *param_1,long param_2) { long *plVar1; long lVar2; long lVar3; long lVar4; uint uVar5; ulong uVar6; bool bVar7; ulong local_60; long *local_48; long *local_40; local_40 = (long *)0x0; uVar6 = param_2 + 7U & 0xfffffffffffffff8; local_48 = param_1; if (*param_1 != 0) { if (((*(ulong *)(*param_1 + 8) < uVar6) && (uVar5 = *(uint *)((long)param_1 + 0x2c), *(uint *)((long)param_1 + 0x2c) = uVar5 + 1, 9 < uVar5)) && (*(ulong *)(*param_1 + 8) < 0x1000)) { plVar1 = (long *)*param_1; *param_1 = *plVar1; *plVar1 = param_1[1]; param_1[1] = (long)plVar1; *(int4 *)((long)param_1 + 0x2c) = 0; } local_40 = (long *)*param_1; while( true ) { bVar7 = false; if (local_40 != (long *)0x0) { bVar7 = (ulong)local_40[1] < uVar6; } if (!bVar7) break; local_48 = local_40; local_40 = (long *)*local_40; } } if (local_40 == (long *)0x0) { local_60 = (param_1[4] & 0xfffffffffffffffeU) * (ulong)(*(uint *)(param_1 + 5) >> 2); if (local_60 < uVar6 + 0x18) { local_60 = uVar6 + 0x18; } uVar5 = 0; if ((param_1[4] & 1U) != 0) { uVar5 = 0x10000; } local_40 = (long *)my_malloc((int)param_1[7],local_60,uVar5 | 0x1010); if (local_40 == (long *)0x0) { if (param_1[6] != 0) { (*(code *)param_1[6])(); } return 0; } *(int *)(param_1 + 5) = (int)param_1[5] + 1; *local_40 = *local_48; local_40[2] = local_60; local_40[1] = local_60 - 0x18; *local_48 = (long)local_40; } lVar2 = local_40[2]; lVar3 = local_40[1]; lVar4 = local_40[1]; local_40[1] = lVar4 - uVar6; if (lVar4 - uVar6 < (ulong)param_1[3]) { *local_48 = *local_40; *local_40 = param_1[1]; param_1[1] = (long)local_40; *(int4 *)((long)param_1 + 0x2c) = 0; } return (long)local_40 + (lVar2 - lVar3); }
16,852
js_json_check
bluesky950520[P]quickjs/quickjs.c
static JSValue js_json_check(JSContext *ctx, JSONStringifyContext *jsc, JSValue holder, JSValue val, JSValue key) { JSValue v; JSValue args[2]; if (JS_IsObject(val) || JS_IsBigInt(ctx, val)) { JSValue f = JS_GetProperty(ctx, val, JS_ATOM_toJSON); if (JS_IsException(f)) goto exception; if (JS_IsFunction(ctx, f)) { v = JS_CallFree(ctx, f, val, 1, &key); JS_FreeValue(ctx, val); val = v; if (JS_IsException(val)) goto exception; } else { JS_FreeValue(ctx, f); } } if (!JS_IsUndefined(jsc->replacer_func)) { args[0] = key; args[1] = val; v = JS_Call(ctx, jsc->replacer_func, holder, 2, args); JS_FreeValue(ctx, val); val = v; if (JS_IsException(val)) goto exception; } switch (JS_VALUE_GET_NORM_TAG(val)) { case JS_TAG_OBJECT: if (JS_IsFunction(ctx, val)) break; case JS_TAG_STRING: case JS_TAG_INT: case JS_TAG_FLOAT64: case JS_TAG_BOOL: case JS_TAG_NULL: case JS_TAG_BIG_INT: case JS_TAG_EXCEPTION: return val; default: break; } JS_FreeValue(ctx, val); return JS_UNDEFINED; exception: JS_FreeValue(ctx, val); return JS_EXCEPTION; }
O0
c
js_json_check: subq $0xc8, %rsp leaq 0xd0(%rsp), %rax movq %rax, 0x18(%rsp) movq %rdx, 0xa8(%rsp) movq %rcx, 0xb0(%rsp) movq %r8, 0x98(%rsp) movq %r9, 0xa0(%rsp) movq %rdi, 0x90(%rsp) movq %rsi, 0x88(%rsp) movq 0x98(%rsp), %rdi movq 0xa0(%rsp), %rsi callq 0x2af70 cmpl $0x0, %eax jne 0x50db4 movq 0x90(%rsp), %rdi movq 0x98(%rsp), %rsi movq 0xa0(%rsp), %rdx callq 0x38e90 cmpl $0x0, %eax je 0x50ee4 movq 0x90(%rsp), %rdi movq 0x98(%rsp), %rsi movq 0xa0(%rsp), %rdx movl $0x91, %ecx callq 0x29d80 movq %rax, 0x40(%rsp) movq %rdx, 0x48(%rsp) movq 0x40(%rsp), %rdi movq 0x48(%rsp), %rsi callq 0x23cc0 cmpl $0x0, %eax je 0x50df9 jmp 0x510a9 movq 0x90(%rsp), %rdi movq 0x40(%rsp), %rsi movq 0x48(%rsp), %rdx callq 0x2e510 cmpl $0x0, %eax je 0x50ecb movq 0x18(%rsp), %rax movq 0x90(%rsp), %rdi movq 0x40(%rsp), %rsi movq 0x48(%rsp), %rdx movq 0x98(%rsp), %rcx movq 0xa0(%rsp), %r8 movl $0x1, %r9d movq %rax, (%rsp) callq 0x2e280 movq %rax, 0x30(%rsp) movq %rdx, 0x38(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x78(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x80(%rsp) movq 0x90(%rsp), %rdi movq 0x98(%rsp), %rsi movq 0xa0(%rsp), %rdx callq 0x23c90 movq 0x78(%rsp), %rax movq %rax, 0x98(%rsp) movq 0x80(%rsp), %rax movq %rax, 0xa0(%rsp) movq 0x98(%rsp), %rdi movq 0xa0(%rsp), %rsi callq 0x23cc0 cmpl $0x0, %eax je 0x50ec9 jmp 0x510a9 jmp 0x50ee2 movq 0x90(%rsp), %rdi movq 0x40(%rsp), %rsi movq 0x48(%rsp), %rdx callq 0x23c90 jmp 0x50ee4 movq 0x88(%rsp), %rax movq (%rax), %rdi movq 0x8(%rax), %rsi callq 0x2e260 cmpl $0x0, %eax jne 0x50fe8 movq 0x18(%rsp), %rax movq (%rax), %rcx movq %rcx, 0x50(%rsp) movq 0x8(%rax), %rax movq %rax, 0x58(%rsp) movq 0x98(%rsp), %rax movq %rax, 0x60(%rsp) movq 0xa0(%rsp), %rax movq %rax, 0x68(%rsp) movq 0x90(%rsp), %rdi movq 0x88(%rsp), %rcx leaq 0x50(%rsp), %rax movq (%rcx), %rsi movq 0x8(%rcx), %rdx movq 0xa8(%rsp), %rcx movq 0xb0(%rsp), %r8 movl $0x2, %r9d movq %rax, (%rsp) callq 0x3a050 movq %rax, 0x20(%rsp) movq %rdx, 0x28(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x78(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x80(%rsp) movq 0x90(%rsp), %rdi movq 0x98(%rsp), %rsi movq 0xa0(%rsp), %rdx callq 0x23c90 movq 0x78(%rsp), %rax movq %rax, 0x98(%rsp) movq 0x80(%rsp), %rax movq %rax, 0xa0(%rsp) movq 0x98(%rsp), %rdi movq 0xa0(%rsp), %rsi callq 0x23cc0 cmpl $0x0, %eax je 0x50fe6 jmp 0x510a9 jmp 0x50fe8 movl 0xa0(%rsp), %eax movl %eax, 0x14(%rsp) subl $-0x9, %eax je 0x5104f jmp 0x50ffa movl 0x14(%rsp), %eax subl $-0x7, %eax je 0x5104f jmp 0x51005 movl 0x14(%rsp), %eax subl $-0x1, %eax je 0x51029 jmp 0x51010 movl 0x14(%rsp), %eax subl $0x3, %eax jb 0x5104f jmp 0x5101b movl 0x14(%rsp), %eax addl $-0x6, %eax subl $0x2, %eax jb 0x5104f jmp 0x51071 movq 0x90(%rsp), %rdi movq 0x98(%rsp), %rsi movq 0xa0(%rsp), %rdx callq 0x2e510 cmpl $0x0, %eax je 0x5104d jmp 0x51073 jmp 0x5104f movq 0x98(%rsp), %rax movq %rax, 0xb8(%rsp) movq 0xa0(%rsp), %rax movq %rax, 0xc0(%rsp) jmp 0x510dd jmp 0x51073 movq 0x90(%rsp), %rdi movq 0x98(%rsp), %rsi movq 0xa0(%rsp), %rdx callq 0x23c90 movl $0x0, 0xb8(%rsp) movq $0x3, 0xc0(%rsp) jmp 0x510dd movq 0x90(%rsp), %rdi movq 0x98(%rsp), %rsi movq 0xa0(%rsp), %rdx callq 0x23c90 movl $0x0, 0xb8(%rsp) movq $0x6, 0xc0(%rsp) movq 0xb8(%rsp), %rax movq 0xc0(%rsp), %rdx addq $0xc8, %rsp retq nopw %cs:(%rax,%rax)
js_json_check: sub rsp, 0C8h lea rax, [rsp+0C8h+arg_0] mov [rsp+0C8h+var_B0], rax mov [rsp+0C8h+var_20], rdx mov [rsp+0C8h+var_18], rcx mov [rsp+0C8h+var_30], r8 mov [rsp+0C8h+var_28], r9 mov [rsp+0C8h+var_38], rdi mov [rsp+0C8h+var_40], rsi mov rdi, [rsp+0C8h+var_30] mov rsi, [rsp+0C8h+var_28] call JS_IsObject cmp eax, 0 jnz short loc_50DB4 mov rdi, [rsp+0C8h+var_38] mov rsi, [rsp+0C8h+var_30] mov rdx, [rsp+0C8h+var_28] call JS_IsBigInt_0 cmp eax, 0 jz loc_50EE4 loc_50DB4: mov rdi, [rsp+0C8h+var_38] mov rsi, [rsp+0C8h+var_30] mov rdx, [rsp+0C8h+var_28] mov ecx, 91h call JS_GetProperty mov [rsp+0C8h+var_88], rax mov [rsp+0C8h+var_80], rdx mov rdi, [rsp+0C8h+var_88] mov rsi, [rsp+0C8h+var_80] call JS_IsException_1 cmp eax, 0 jz short loc_50DF9 jmp loc_510A9 loc_50DF9: mov rdi, [rsp+0C8h+var_38] mov rsi, [rsp+0C8h+var_88] mov rdx, [rsp+0C8h+var_80] call JS_IsFunction cmp eax, 0 jz loc_50ECB mov rax, [rsp+0C8h+var_B0] mov rdi, [rsp+0C8h+var_38] mov rsi, [rsp+0C8h+var_88] mov rdx, [rsp+0C8h+var_80] mov rcx, [rsp+0C8h+var_30] mov r8, [rsp+0C8h+var_28] mov r9d, 1 mov [rsp+0C8h+var_C8], rax call JS_CallFree mov [rsp+0C8h+var_98], rax mov [rsp+0C8h+var_90], rdx mov rax, [rsp+0C8h+var_98] mov [rsp+0C8h+var_50], rax mov rax, [rsp+0C8h+var_90] mov [rsp+0C8h+var_48], rax mov rdi, [rsp+0C8h+var_38] mov rsi, [rsp+0C8h+var_30] mov rdx, [rsp+0C8h+var_28] call JS_FreeValue mov rax, [rsp+0C8h+var_50] mov [rsp+0C8h+var_30], rax mov rax, [rsp+0C8h+var_48] mov [rsp+0C8h+var_28], rax mov rdi, [rsp+0C8h+var_30] mov rsi, [rsp+0C8h+var_28] call JS_IsException_1 cmp eax, 0 jz short loc_50EC9 jmp loc_510A9 loc_50EC9: jmp short loc_50EE2 loc_50ECB: mov rdi, [rsp+0C8h+var_38] mov rsi, [rsp+0C8h+var_88] mov rdx, [rsp+0C8h+var_80] call JS_FreeValue loc_50EE2: jmp short $+2 loc_50EE4: mov rax, [rsp+0C8h+var_40] mov rdi, [rax] mov rsi, [rax+8] call JS_IsUndefined_0 cmp eax, 0 jnz loc_50FE8 mov rax, [rsp+0C8h+var_B0] mov rcx, [rax] mov [rsp+0C8h+var_78], rcx mov rax, [rax+8] mov [rsp+0C8h+var_70], rax mov rax, [rsp+0C8h+var_30] mov [rsp+0C8h+var_68], rax mov rax, [rsp+0C8h+var_28] mov [rsp+0C8h+var_60], rax mov rdi, [rsp+0C8h+var_38] mov rcx, [rsp+0C8h+var_40] lea rax, [rsp+0C8h+var_78] mov rsi, [rcx] mov rdx, [rcx+8] mov rcx, [rsp+0C8h+var_20] mov r8, [rsp+0C8h+var_18] mov r9d, 2 mov [rsp+0C8h+var_C8], rax call JS_Call mov [rsp+0C8h+var_A8], rax mov [rsp+0C8h+var_A0], rdx mov rax, [rsp+0C8h+var_A8] mov [rsp+0C8h+var_50], rax mov rax, [rsp+0C8h+var_A0] mov [rsp+0C8h+var_48], rax mov rdi, [rsp+0C8h+var_38] mov rsi, [rsp+0C8h+var_30] mov rdx, [rsp+0C8h+var_28] call JS_FreeValue mov rax, [rsp+0C8h+var_50] mov [rsp+0C8h+var_30], rax mov rax, [rsp+0C8h+var_48] mov [rsp+0C8h+var_28], rax mov rdi, [rsp+0C8h+var_30] mov rsi, [rsp+0C8h+var_28] call JS_IsException_1 cmp eax, 0 jz short loc_50FE6 jmp loc_510A9 loc_50FE6: jmp short $+2 loc_50FE8: mov eax, dword ptr [rsp+0C8h+var_28] mov [rsp+0C8h+var_B4], eax sub eax, 0FFFFFFF7h jz short loc_5104F jmp short $+2 loc_50FFA: mov eax, [rsp+0C8h+var_B4] sub eax, 0FFFFFFF9h jz short loc_5104F jmp short $+2 loc_51005: mov eax, [rsp+0C8h+var_B4] sub eax, 0FFFFFFFFh jz short loc_51029 jmp short $+2 loc_51010: mov eax, [rsp+0C8h+var_B4] sub eax, 3 jb short loc_5104F jmp short $+2 loc_5101B: mov eax, [rsp+0C8h+var_B4] add eax, 0FFFFFFFAh sub eax, 2 jb short loc_5104F jmp short loc_51071 loc_51029: mov rdi, [rsp+0C8h+var_38] mov rsi, [rsp+0C8h+var_30] mov rdx, [rsp+0C8h+var_28] call JS_IsFunction cmp eax, 0 jz short loc_5104D jmp short loc_51073 loc_5104D: jmp short $+2 loc_5104F: mov rax, [rsp+0C8h+var_30] mov [rsp+0C8h+var_10], rax mov rax, [rsp+0C8h+var_28] mov [rsp+0C8h+var_8], rax jmp short loc_510DD loc_51071: jmp short $+2 loc_51073: mov rdi, [rsp+0C8h+var_38] mov rsi, [rsp+0C8h+var_30] mov rdx, [rsp+0C8h+var_28] call JS_FreeValue mov dword ptr [rsp+0C8h+var_10], 0 mov [rsp+0C8h+var_8], 3 jmp short loc_510DD loc_510A9: mov rdi, [rsp+0C8h+var_38] mov rsi, [rsp+0C8h+var_30] mov rdx, [rsp+0C8h+var_28] call JS_FreeValue mov dword ptr [rsp+0C8h+var_10], 0 mov [rsp+0C8h+var_8], 6 loc_510DD: mov rax, [rsp+0C8h+var_10] mov rdx, [rsp+0C8h+var_8] add rsp, 0C8h retn
long long js_json_check( long long a1, long long *a2, long long a3, long long a4, long long a5, long long a6, long long a7, long long a8) { long long v8; // rdx long long v9; // rdx long long v10; // rdx long long Property; // [rsp+40h] [rbp-88h] long long v13; // [rsp+48h] [rbp-80h] _QWORD v14[5]; // [rsp+50h] [rbp-78h] BYREF long long v15; // [rsp+78h] [rbp-50h] long long v16; // [rsp+80h] [rbp-48h] long long *v17; // [rsp+88h] [rbp-40h] long long v18; // [rsp+90h] [rbp-38h] long long v19; // [rsp+98h] [rbp-30h] long long v20; // [rsp+A0h] [rbp-28h] long long v21; // [rsp+A8h] [rbp-20h] long long v22; // [rsp+B0h] [rbp-18h] long long v23; // [rsp+B8h] [rbp-10h] long long v24; // [rsp+C0h] [rbp-8h] v21 = a3; v22 = a4; v19 = a5; v20 = a6; v18 = a1; v17 = a2; if ( JS_IsObject(a5, a6) || JS_IsBigInt_0(v18, v19, v20) ) { Property = JS_GetProperty(v18, v19, v20, 145); v13 = v8; if ( JS_IsException_1(Property, v8) ) goto LABEL_19; if ( (unsigned int)JS_IsFunction(v18, Property, v13) ) { v15 = JS_CallFree(v18, Property, v13, v19, v20, 1, (long long)&a7); v16 = v9; JS_FreeValue(v18, v19, v20); v19 = v15; v20 = v16; if ( !JS_IsException_1(v15, v16) ) goto LABEL_8; LABEL_19: JS_FreeValue(v18, v19, v20); LODWORD(v23) = 0; v24 = 6LL; return v23; } JS_FreeValue(v18, Property, v13); } LABEL_8: if ( !JS_IsUndefined_0(*v17, v17[1]) ) { v14[0] = a7; v14[1] = a8; v14[2] = v19; v14[3] = v20; v15 = JS_Call(v18, *v17, v17[1], v21, v22, 2, (long long)v14); v16 = v10; JS_FreeValue(v18, v19, v20); v19 = v15; v20 = v16; if ( JS_IsException_1(v15, v16) ) goto LABEL_19; } if ( (_DWORD)v20 != -9 && (_DWORD)v20 != -7 ) { if ( (_DWORD)v20 == -1 ) { if ( (unsigned int)JS_IsFunction(v18, v19, -1) ) { LABEL_18: JS_FreeValue(v18, v19, v20); LODWORD(v23) = 0; v24 = 3LL; return v23; } } else if ( (unsigned int)v20 >= 3 && (unsigned int)(v20 - 6) >= 2 ) { goto LABEL_18; } } v23 = v19; v24 = v20; return v23; }
js_json_check: SUB RSP,0xc8 LEA RAX,[RSP + 0xd0] MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0xa8],RDX MOV qword ptr [RSP + 0xb0],RCX MOV qword ptr [RSP + 0x98],R8 MOV qword ptr [RSP + 0xa0],R9 MOV qword ptr [RSP + 0x90],RDI MOV qword ptr [RSP + 0x88],RSI MOV RDI,qword ptr [RSP + 0x98] MOV RSI,qword ptr [RSP + 0xa0] CALL 0x0012af70 CMP EAX,0x0 JNZ 0x00150db4 MOV RDI,qword ptr [RSP + 0x90] MOV RSI,qword ptr [RSP + 0x98] MOV RDX,qword ptr [RSP + 0xa0] CALL 0x00138e90 CMP EAX,0x0 JZ 0x00150ee4 LAB_00150db4: MOV RDI,qword ptr [RSP + 0x90] MOV RSI,qword ptr [RSP + 0x98] MOV RDX,qword ptr [RSP + 0xa0] MOV ECX,0x91 CALL 0x00129d80 MOV qword ptr [RSP + 0x40],RAX MOV qword ptr [RSP + 0x48],RDX MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x48] CALL 0x00123cc0 CMP EAX,0x0 JZ 0x00150df9 JMP 0x001510a9 LAB_00150df9: MOV RDI,qword ptr [RSP + 0x90] MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x48] CALL 0x0012e510 CMP EAX,0x0 JZ 0x00150ecb MOV RAX,qword ptr [RSP + 0x18] MOV RDI,qword ptr [RSP + 0x90] MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x48] MOV RCX,qword ptr [RSP + 0x98] MOV R8,qword ptr [RSP + 0xa0] MOV R9D,0x1 MOV qword ptr [RSP],RAX CALL 0x0012e280 MOV qword ptr [RSP + 0x30],RAX MOV qword ptr [RSP + 0x38],RDX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x78],RAX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x80],RAX MOV RDI,qword ptr [RSP + 0x90] MOV RSI,qword ptr [RSP + 0x98] MOV RDX,qword ptr [RSP + 0xa0] CALL 0x00123c90 MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x98],RAX MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0xa0],RAX MOV RDI,qword ptr [RSP + 0x98] MOV RSI,qword ptr [RSP + 0xa0] CALL 0x00123cc0 CMP EAX,0x0 JZ 0x00150ec9 JMP 0x001510a9 LAB_00150ec9: JMP 0x00150ee2 LAB_00150ecb: MOV RDI,qword ptr [RSP + 0x90] MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x48] CALL 0x00123c90 LAB_00150ee2: JMP 0x00150ee4 LAB_00150ee4: MOV RAX,qword ptr [RSP + 0x88] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x8] CALL 0x0012e260 CMP EAX,0x0 JNZ 0x00150fe8 MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP + 0x50],RCX MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x58],RAX MOV RAX,qword ptr [RSP + 0x98] MOV qword ptr [RSP + 0x60],RAX MOV RAX,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0x68],RAX MOV RDI,qword ptr [RSP + 0x90] MOV RCX,qword ptr [RSP + 0x88] LEA RAX,[RSP + 0x50] MOV RSI,qword ptr [RCX] MOV RDX,qword ptr [RCX + 0x8] MOV RCX,qword ptr [RSP + 0xa8] MOV R8,qword ptr [RSP + 0xb0] MOV R9D,0x2 MOV qword ptr [RSP],RAX CALL 0x0013a050 MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RSP + 0x28],RDX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x78],RAX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x80],RAX MOV RDI,qword ptr [RSP + 0x90] MOV RSI,qword ptr [RSP + 0x98] MOV RDX,qword ptr [RSP + 0xa0] CALL 0x00123c90 MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x98],RAX MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0xa0],RAX MOV RDI,qword ptr [RSP + 0x98] MOV RSI,qword ptr [RSP + 0xa0] CALL 0x00123cc0 CMP EAX,0x0 JZ 0x00150fe6 JMP 0x001510a9 LAB_00150fe6: JMP 0x00150fe8 LAB_00150fe8: MOV EAX,dword ptr [RSP + 0xa0] MOV dword ptr [RSP + 0x14],EAX SUB EAX,-0x9 JZ 0x0015104f JMP 0x00150ffa LAB_00150ffa: MOV EAX,dword ptr [RSP + 0x14] SUB EAX,-0x7 JZ 0x0015104f JMP 0x00151005 LAB_00151005: MOV EAX,dword ptr [RSP + 0x14] SUB EAX,-0x1 JZ 0x00151029 JMP 0x00151010 LAB_00151010: MOV EAX,dword ptr [RSP + 0x14] SUB EAX,0x3 JC 0x0015104f JMP 0x0015101b LAB_0015101b: MOV EAX,dword ptr [RSP + 0x14] ADD EAX,-0x6 SUB EAX,0x2 JC 0x0015104f JMP 0x00151071 LAB_00151029: MOV RDI,qword ptr [RSP + 0x90] MOV RSI,qword ptr [RSP + 0x98] MOV RDX,qword ptr [RSP + 0xa0] CALL 0x0012e510 CMP EAX,0x0 JZ 0x0015104d JMP 0x00151073 LAB_0015104d: JMP 0x0015104f LAB_0015104f: MOV RAX,qword ptr [RSP + 0x98] MOV qword ptr [RSP + 0xb8],RAX MOV RAX,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0xc0],RAX JMP 0x001510dd LAB_00151071: JMP 0x00151073 LAB_00151073: MOV RDI,qword ptr [RSP + 0x90] MOV RSI,qword ptr [RSP + 0x98] MOV RDX,qword ptr [RSP + 0xa0] CALL 0x00123c90 MOV dword ptr [RSP + 0xb8],0x0 MOV qword ptr [RSP + 0xc0],0x3 JMP 0x001510dd LAB_001510a9: MOV RDI,qword ptr [RSP + 0x90] MOV RSI,qword ptr [RSP + 0x98] MOV RDX,qword ptr [RSP + 0xa0] CALL 0x00123c90 MOV dword ptr [RSP + 0xb8],0x0 MOV qword ptr [RSP + 0xc0],0x6 LAB_001510dd: MOV RAX,qword ptr [RSP + 0xb8] MOV RDX,qword ptr [RSP + 0xc0] ADD RSP,0xc8 RET
int1 [16] js_json_check(int8 param_1,int8 *param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8) { int iVar1; int1 auVar3 [16]; int8 local_78; int8 local_70; int1 local_68 [16]; int1 local_50 [16]; int8 *local_40; int8 local_38; int1 local_30 [16]; int8 local_20; int8 local_18; int4 local_10; int4 uStack_c; int8 local_8; int8 uVar2; local_40 = param_2; local_38 = param_1; local_30._0_8_ = param_5; local_30._8_8_ = param_6; local_20 = param_3; local_18 = param_4; iVar1 = JS_IsObject(param_5,param_6); if (iVar1 != 0) { LAB_00150db4: auVar3 = JS_GetProperty(local_38,local_30._0_8_,local_30._8_8_,0x91); uVar2 = auVar3._8_8_; auVar3._0_8_ = auVar3._0_8_; iVar1 = JS_IsException(auVar3._0_8_,uVar2); if (iVar1 == 0) { iVar1 = JS_IsFunction(local_38,auVar3._0_8_,uVar2); if (iVar1 == 0) { JS_FreeValue(local_38,auVar3._0_8_,uVar2); } else { local_50 = JS_CallFree(local_38,auVar3._0_8_,uVar2,local_30._0_8_,local_30._8_8_,1,&param_7) ; JS_FreeValue(local_38,local_30._0_8_,local_30._8_8_); local_30 = local_50; iVar1 = JS_IsException(local_50._0_8_,local_50._8_8_); if (iVar1 != 0) goto LAB_001510a9; } goto LAB_00150ee4; } LAB_001510a9: JS_FreeValue(local_38,local_30._0_8_,local_30._8_8_); local_10 = 0; local_8 = 6; goto LAB_001510dd; } iVar1 = JS_IsBigInt(local_38,local_30._0_8_,local_30._8_8_); if (iVar1 != 0) goto LAB_00150db4; LAB_00150ee4: iVar1 = JS_IsUndefined(*local_40,local_40[1]); if (iVar1 == 0) { local_78 = param_7; local_70 = param_8; local_68 = local_30; auVar3 = JS_Call(local_38,*local_40,local_40[1],local_20,local_18,2,&local_78); local_50 = auVar3; JS_FreeValue(local_38,local_30._0_8_,local_30._8_8_); local_30 = local_50; iVar1 = JS_IsException(local_50._0_8_,local_50._8_8_); if (iVar1 != 0) goto LAB_001510a9; } auVar3._0_8_ = local_30._8_8_; if ((local_30._8_4_ == 0xfffffff7) || (local_30._8_4_ == 0xfffffff9)) { LAB_0015104f: local_10 = local_30._0_4_; uStack_c = local_30._4_4_; local_8 = local_30._8_8_; } else { if (local_30._8_4_ == 0xffffffff) { iVar1 = JS_IsFunction(local_38,local_30._0_8_,auVar3._0_8_); if (iVar1 == 0) goto LAB_0015104f; } else if (((uint)local_30._8_4_ < 3) || (local_30._8_4_ - 6 < 2)) goto LAB_0015104f; JS_FreeValue(local_38,local_30._0_8_,local_30._8_8_); local_10 = 0; local_8 = 3; } LAB_001510dd: auVar3._4_4_ = uStack_c; auVar3._0_4_ = local_10; auVar3._8_8_ = local_8; return auVar3; }
16,853
js_json_check
bluesky950520[P]quickjs/quickjs.c
static JSValue js_json_check(JSContext *ctx, JSONStringifyContext *jsc, JSValue holder, JSValue val, JSValue key) { JSValue v; JSValue args[2]; if (JS_IsObject(val) || JS_IsBigInt(ctx, val)) { JSValue f = JS_GetProperty(ctx, val, JS_ATOM_toJSON); if (JS_IsException(f)) goto exception; if (JS_IsFunction(ctx, f)) { v = JS_CallFree(ctx, f, val, 1, &key); JS_FreeValue(ctx, val); val = v; if (JS_IsException(val)) goto exception; } else { JS_FreeValue(ctx, f); } } if (!JS_IsUndefined(jsc->replacer_func)) { args[0] = key; args[1] = val; v = JS_Call(ctx, jsc->replacer_func, holder, 2, args); JS_FreeValue(ctx, val); val = v; if (JS_IsException(val)) goto exception; } switch (JS_VALUE_GET_NORM_TAG(val)) { case JS_TAG_OBJECT: if (JS_IsFunction(ctx, val)) break; case JS_TAG_STRING: case JS_TAG_INT: case JS_TAG_FLOAT64: case JS_TAG_BOOL: case JS_TAG_NULL: case JS_TAG_BIG_INT: case JS_TAG_EXCEPTION: return val; default: break; } JS_FreeValue(ctx, val); return JS_UNDEFINED; exception: JS_FreeValue(ctx, val); return JS_EXCEPTION; }
O1
c
js_json_check: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %r9, %rbx movq %r8, %r14 movq %rcx, %r8 movq %rdx, %rcx movq %rsi, %rbp movq %rdi, %r15 movl %ebx, %eax orl $0x8, %eax cmpl $-0x1, %eax jne 0x349c7 movq %rcx, 0x20(%rsp) movq %r8, 0x28(%rsp) movl $0x0, 0x8(%rsp) movq $0x0, (%rsp) movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx movl $0x91, %ecx movq %r14, %r8 movq %rbx, %r9 callq 0x22fa3 movq %rdx, %r12 cmpl $0x6, %r12d jne 0x34945 xorl %eax, %eax jmp 0x349b5 movq %rax, %r13 movq %r15, %rdi movq %rax, %rsi movq %r12, %rdx callq 0x22dbe testl %eax, %eax je 0x349a4 leaq 0xa0(%rsp), %rax movq %rax, (%rsp) movq %r15, %rdi movq %r13, %rsi movq %r12, %rdx movq %r14, %rcx movq %rbx, %r8 movl $0x1, %r9d callq 0x22c9d movq %rax, %r12 movq %rdx, %r13 movq 0x18(%r15), %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x1d8c6 cmpl $0x6, %r13d setne %al movq %r12, %r14 movq %r13, %rbx jmp 0x349b5 movq 0x18(%r15), %rdi movq %r13, %rsi movq %r12, %rdx callq 0x1d8c6 movb $0x1, %al testb %al, %al movq 0x28(%rsp), %r8 movq 0x20(%rsp), %rcx je 0x34a49 movq 0x8(%rbp), %rdx cmpl $0x3, %edx je 0x34a63 leaq 0xa0(%rsp), %rax movups (%rax), %xmm0 leaq 0x40(%rsp), %rax movaps %xmm0, (%rax) movq %r14, 0x10(%rax) movq %rbx, 0x18(%rax) movq (%rbp), %rsi movl $0x0, 0x30(%rsp) movq $0x3, 0x38(%rsp) movups 0x30(%rsp), %xmm0 movups %xmm0, (%rsp) movq %rax, 0x10(%rsp) movl $0x2, 0x18(%rsp) movq %r15, %rdi movl $0x2, %r9d callq 0x284ca movq %rax, %r12 movq %rdx, %r13 movq 0x18(%r15), %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x1d8c6 movq %r12, %r14 movq %r13, %rbx cmpl $0x6, %r13d jne 0x34a63 movq 0x18(%r15), %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x1d8c6 movl $0x6, %ebx xorl %eax, %eax xorl %ecx, %ecx jmp 0x34a85 leal 0x9(%rbx), %eax cmpl $0x10, %eax ja 0x34ab1 movl $0x18e05, %ecx # imm = 0x18E05 btl %eax, %ecx jae 0x34a9a movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %r14, %rcx movl %r14d, %eax orq %rcx, %rax movq %rbx, %rdx addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq cmpl $0x8, %eax jne 0x34ab1 movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x22dbe testl %eax, %eax je 0x34a75 movq 0x18(%r15), %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x1d8c6 movl $0x3, %ebx jmp 0x34a5d
js_json_check: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov rbx, r9 mov r14, r8 mov r8, rcx mov rcx, rdx mov rbp, rsi mov r15, rdi mov eax, ebx or eax, 8 cmp eax, 0FFFFFFFFh jnz loc_349C7 mov [rsp+98h+var_78], rcx mov [rsp+98h+var_70], r8 mov dword ptr [rsp+98h+var_98+8], 0 mov qword ptr [rsp+98h+var_98], 0 mov rdi, r15 mov rsi, r14 mov rdx, rbx mov ecx, 91h mov r8, r14 mov r9, rbx call JS_GetPropertyInternal2 mov r12, rdx cmp r12d, 6 jnz short loc_34945 xor eax, eax jmp short loc_349B5 loc_34945: mov r13, rax mov rdi, r15 mov rsi, rax mov rdx, r12 call JS_IsFunction test eax, eax jz short loc_349A4 lea rax, [rsp+98h+arg_0] mov qword ptr [rsp+98h+var_98], rax mov rdi, r15 mov rsi, r13 mov rdx, r12 mov rcx, r14 mov r8, rbx mov r9d, 1 call JS_CallFree mov r12, rax mov r13, rdx mov rdi, [r15+18h] mov rsi, r14 mov rdx, rbx call JS_FreeValueRT cmp r13d, 6 setnz al mov r14, r12 mov rbx, r13 jmp short loc_349B5 loc_349A4: mov rdi, [r15+18h] mov rsi, r13 mov rdx, r12 call JS_FreeValueRT mov al, 1 loc_349B5: test al, al mov r8, [rsp+98h+var_70] mov rcx, [rsp+98h+var_78] jz loc_34A49 loc_349C7: mov rdx, [rbp+8] cmp edx, 3 jz loc_34A63 lea rax, [rsp+98h+arg_0] movups xmm0, xmmword ptr [rax] lea rax, [rsp+98h+var_58] movaps xmmword ptr [rax], xmm0 mov [rax+10h], r14 mov [rax+18h], rbx mov rsi, [rbp+0] mov dword ptr [rsp+98h+var_68], 0 mov qword ptr [rsp+98h+var_68+8], 3 movups xmm0, [rsp+98h+var_68] movups [rsp+98h+var_98], xmm0 mov [rsp+98h+var_88], rax mov [rsp+98h+var_80], 2 mov rdi, r15 mov r9d, 2 call JS_CallInternal mov r12, rax mov r13, rdx mov rdi, [r15+18h] mov rsi, r14 mov rdx, rbx call JS_FreeValueRT mov r14, r12 mov rbx, r13 cmp r13d, 6 jnz short loc_34A63 loc_34A49: mov rdi, [r15+18h] mov rsi, r14 mov rdx, rbx call JS_FreeValueRT mov ebx, 6 loc_34A5D: xor eax, eax xor ecx, ecx jmp short loc_34A85 loc_34A63: lea eax, [rbx+9] cmp eax, 10h ja short loc_34AB1 mov ecx, 18E05h bt ecx, eax jnb short loc_34A9A loc_34A75: mov rcx, 0FFFFFFFF00000000h and rcx, r14 mov eax, r14d loc_34A85: or rax, rcx mov rdx, rbx add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_34A9A: cmp eax, 8 jnz short loc_34AB1 mov rdi, r15 mov rsi, r14 mov rdx, rbx call JS_IsFunction test eax, eax jz short loc_34A75 loc_34AB1: mov rdi, [r15+18h] mov rsi, r14 mov rdx, rbx call JS_FreeValueRT mov ebx, 3 jmp short loc_34A5D
unsigned long long js_json_check( long long a1, long long *a2, long long a3, long long a4, long long a5, long long a6, double a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, __int128 a15) { long long v15; // rbx long long v18; // rcx unsigned long long PropertyInternal2; // rax long long v20; // rdx long long v21; // r12 bool v22; // al _DWORD *v23; // r13 long long v24; // r12 long long v25; // rdx long long v26; // r13 long long v27; // rdx unsigned long long v28; // r12 long long v29; // rdx long long v30; // r13 long long v31; // rax unsigned long long v32; // rcx int v33; // ecx long long v36; // [rsp+28h] [rbp-70h] __m128 v37; // [rsp+30h] [rbp-68h] __int128 v38; // [rsp+40h] [rbp-58h] BYREF long long v39; // [rsp+50h] [rbp-48h] long long v40; // [rsp+58h] [rbp-40h] v15 = a6; v18 = a3; if ( ((unsigned int)a6 | 8) == 0xFFFFFFFF ) { v36 = a4; PropertyInternal2 = JS_GetPropertyInternal2(a1, a5, a6, 0x91u, a5, a6, 0LL, 0); v21 = v20; if ( (_DWORD)v20 == 6 ) { v22 = 0; } else { v23 = (_DWORD *)PropertyInternal2; if ( (unsigned int)JS_IsFunction(a1, PropertyInternal2, v20) ) { v24 = JS_CallFree(a1, v23, v21, a5, v15, 1, (long long)&a15); v26 = v25; JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)a5, v15); v22 = (_DWORD)v26 != 6; a5 = v24; v15 = v26; } else { JS_FreeValueRT(*(_QWORD *)(a1 + 24), v23, v21); v22 = 1; } } a4 = v36; v18 = a3; if ( !v22 ) goto LABEL_10; } v27 = a2[1]; if ( (_DWORD)v27 != 3 ) { v38 = a15; v39 = a5; v40 = v15; v37.m128_i32[0] = 0; v37.m128_u64[1] = 3LL; v28 = JS_CallInternal( a1, *a2, v27, v18, a4, 2LL, v37, a8, a9, a10, a11, a12, a13, a14, v37.m128_i8[0], 3, (long long)&v38, 2u); v30 = v29; JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)a5, v15); a5 = v28; v15 = v30; if ( (_DWORD)v30 == 6 ) goto LABEL_10; } if ( (unsigned int)(v15 + 9) <= 0x10 && ((v33 = 101893, _bittest(&v33, v15 + 9)) || (_DWORD)v15 == -1 && !(unsigned int)JS_IsFunction(a1, a5, -1)) ) { v32 = a5 & 0xFFFFFFFF00000000LL; v31 = (unsigned int)a5; } else { LABEL_10: JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)a5, v15); v31 = 0LL; v32 = 0LL; } return v32 | v31; }
js_json_check: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV RBX,R9 MOV R14,R8 MOV R8,RCX MOV RCX,RDX MOV RBP,RSI MOV R15,RDI MOV EAX,EBX OR EAX,0x8 CMP EAX,-0x1 JNZ 0x001349c7 MOV qword ptr [RSP + 0x20],RCX MOV qword ptr [RSP + 0x28],R8 MOV dword ptr [RSP + 0x8],0x0 MOV qword ptr [RSP],0x0 MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX MOV ECX,0x91 MOV R8,R14 MOV R9,RBX CALL 0x00122fa3 MOV R12,RDX CMP R12D,0x6 JNZ 0x00134945 XOR EAX,EAX JMP 0x001349b5 LAB_00134945: MOV R13,RAX MOV RDI,R15 MOV RSI,RAX MOV RDX,R12 CALL 0x00122dbe TEST EAX,EAX JZ 0x001349a4 LEA RAX,[RSP + 0xa0] MOV qword ptr [RSP],RAX MOV RDI,R15 MOV RSI,R13 MOV RDX,R12 MOV RCX,R14 MOV R8,RBX MOV R9D,0x1 CALL 0x00122c9d MOV R12,RAX MOV R13,RDX MOV RDI,qword ptr [R15 + 0x18] MOV RSI,R14 MOV RDX,RBX CALL 0x0011d8c6 CMP R13D,0x6 SETNZ AL MOV R14,R12 MOV RBX,R13 JMP 0x001349b5 LAB_001349a4: MOV RDI,qword ptr [R15 + 0x18] MOV RSI,R13 MOV RDX,R12 CALL 0x0011d8c6 MOV AL,0x1 LAB_001349b5: TEST AL,AL MOV R8,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x20] JZ 0x00134a49 LAB_001349c7: MOV RDX,qword ptr [RBP + 0x8] CMP EDX,0x3 JZ 0x00134a63 LEA RAX,[RSP + 0xa0] MOVUPS XMM0,xmmword ptr [RAX] LEA RAX,[RSP + 0x40] MOVAPS xmmword ptr [RAX],XMM0 MOV qword ptr [RAX + 0x10],R14 MOV qword ptr [RAX + 0x18],RBX MOV RSI,qword ptr [RBP] MOV dword ptr [RSP + 0x30],0x0 MOV qword ptr [RSP + 0x38],0x3 MOVUPS XMM0,xmmword ptr [RSP + 0x30] MOVUPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x10],RAX MOV dword ptr [RSP + 0x18],0x2 MOV RDI,R15 MOV R9D,0x2 CALL 0x001284ca MOV R12,RAX MOV R13,RDX MOV RDI,qword ptr [R15 + 0x18] MOV RSI,R14 MOV RDX,RBX CALL 0x0011d8c6 MOV R14,R12 MOV RBX,R13 CMP R13D,0x6 JNZ 0x00134a63 LAB_00134a49: MOV RDI,qword ptr [R15 + 0x18] MOV RSI,R14 MOV RDX,RBX CALL 0x0011d8c6 MOV EBX,0x6 LAB_00134a5d: XOR EAX,EAX XOR ECX,ECX JMP 0x00134a85 LAB_00134a63: LEA EAX,[RBX + 0x9] CMP EAX,0x10 JA 0x00134ab1 MOV ECX,0x18e05 BT ECX,EAX JNC 0x00134a9a LAB_00134a75: MOV RCX,-0x100000000 AND RCX,R14 MOV EAX,R14D LAB_00134a85: OR RAX,RCX MOV RDX,RBX ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00134a9a: CMP EAX,0x8 JNZ 0x00134ab1 MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX CALL 0x00122dbe TEST EAX,EAX JZ 0x00134a75 LAB_00134ab1: MOV RDI,qword ptr [R15 + 0x18] MOV RSI,R14 MOV RDX,RBX CALL 0x0011d8c6 MOV EBX,0x3 JMP 0x00134a5d
int1 [16] js_json_check(long param_1,int8 *param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8) { int1 auVar1 [16]; uint uVar2; int iVar3; ulong uVar4; ulong uVar5; int8 uVar6; int8 uVar7; bool bVar8; int1 auVar9 [16]; int1 auVar10 [16]; uint uStack_64; int8 local_58; int8 uStack_50; int1 local_48 [16]; auVar10._8_8_ = param_6; auVar10._0_8_ = param_5; auVar1._8_8_ = param_6; auVar1._0_8_ = param_5; if (((uint)param_6 | 8) == 0xffffffff) { auVar9 = JS_GetPropertyInternal2(param_1,param_5,param_6,0x91,param_5,param_6,0,0); uVar7 = auVar9._8_8_; uVar6 = auVar9._0_8_; if (auVar9._8_4_ == 6) { bVar8 = false; auVar10 = auVar1; } else { iVar3 = JS_IsFunction(param_1,uVar6,uVar7); if (iVar3 == 0) { JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar6,uVar7); bVar8 = true; } else { auVar10 = JS_CallFree(param_1,uVar6,uVar7,param_5,param_6,1,&param_7); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),param_5,param_6); bVar8 = auVar10._8_4_ != 6; } } if (bVar8) goto LAB_001349c7; LAB_00134a49: JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar10._0_8_,auVar10._8_8_); uVar6 = 6; } else { LAB_001349c7: uVar6 = auVar10._8_8_; uVar7 = auVar10._0_8_; if ((int)param_2[1] != 3) { local_58 = param_7; uStack_50 = param_8; local_48 = auVar10; auVar10 = JS_CallInternal(param_1,*param_2,param_2[1],param_3,param_4,2, (ulong)uStack_64 << 0x20,3,&local_58,2); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar7,uVar6); if (auVar10._8_4_ == 6) goto LAB_00134a49; } uVar6 = auVar10._8_8_; uVar4 = auVar10._0_8_; uVar2 = auVar10._8_4_ + 9; if (uVar2 < 0x11) { if ((0x18e05U >> (uVar2 & 0x1f) & 1) != 0) { LAB_00134a75: uVar5 = uVar4 & 0xffffffff00000000; uVar4 = uVar4 & 0xffffffff; goto LAB_00134a85; } if (uVar2 == 8) { iVar3 = JS_IsFunction(param_1,uVar4,uVar6); if (iVar3 == 0) goto LAB_00134a75; } } JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar4,uVar6); uVar6 = 3; } uVar4 = 0; uVar5 = 0; LAB_00134a85: auVar9._0_8_ = uVar4 | uVar5; auVar9._8_8_ = uVar6; return auVar9; }
16,854
js_json_check
bluesky950520[P]quickjs/quickjs.c
static JSValue js_json_check(JSContext *ctx, JSONStringifyContext *jsc, JSValue holder, JSValue val, JSValue key) { JSValue v; JSValue args[2]; if (JS_IsObject(val) || JS_IsBigInt(ctx, val)) { JSValue f = JS_GetProperty(ctx, val, JS_ATOM_toJSON); if (JS_IsException(f)) goto exception; if (JS_IsFunction(ctx, f)) { v = JS_CallFree(ctx, f, val, 1, &key); JS_FreeValue(ctx, val); val = v; if (JS_IsException(val)) goto exception; } else { JS_FreeValue(ctx, f); } } if (!JS_IsUndefined(jsc->replacer_func)) { args[0] = key; args[1] = val; v = JS_Call(ctx, jsc->replacer_func, holder, 2, args); JS_FreeValue(ctx, val); val = v; if (JS_IsException(val)) goto exception; } switch (JS_VALUE_GET_NORM_TAG(val)) { case JS_TAG_OBJECT: if (JS_IsFunction(ctx, val)) break; case JS_TAG_STRING: case JS_TAG_INT: case JS_TAG_FLOAT64: case JS_TAG_BOOL: case JS_TAG_NULL: case JS_TAG_BIG_INT: case JS_TAG_EXCEPTION: return val; default: break; } JS_FreeValue(ctx, val); return JS_UNDEFINED; exception: JS_FreeValue(ctx, val); return JS_EXCEPTION; }
O2
c
js_json_check: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %r9, %rbx movq %r8, %r15 movq %rcx, %r8 movq %rdx, %rcx movq %rsi, %rbp movq %rdi, %r14 movl %ebx, %eax orl $0x8, %eax cmpl $-0x1, %eax jne 0x2e3ae movq %rcx, 0x10(%rsp) movq %r8, 0x18(%rsp) movq %r14, %rdi movq %r15, %rsi movq %rbx, %rdx movl $0x91, %ecx callq 0x1b043 movq %rdx, %r12 cmpl $0x6, %r12d je 0x2e406 movq %rax, %r13 movq %r14, %rdi movq %rax, %rsi movq %r12, %rdx callq 0x1ce7d testl %eax, %eax je 0x2e396 leaq 0x80(%rsp), %rax movq %rax, (%rsp) pushq $0x1 popq %r9 movq %r14, %rdi movq %r13, %rsi movq %r12, %rdx movq %r15, %rcx movq %rbx, %r8 callq 0x1cd8e movq %rax, %r12 movq %rdx, %r13 movq %r14, %rdi movq %r15, %rsi movq %rbx, %rdx callq 0x1801e movq %r12, %r15 movq %r13, %rbx cmpl $0x6, %r13d movq 0x18(%rsp), %r8 movq 0x10(%rsp), %rcx jne 0x2e3ae jmp 0x2e406 movq %r14, %rdi movq %r13, %rsi movq %r12, %rdx callq 0x1801e movq 0x18(%rsp), %r8 movq 0x10(%rsp), %rcx movq 0x8(%rbp), %rdx cmpl $0x3, %edx je 0x2e41d leaq 0x80(%rsp), %rax movups (%rax), %xmm0 leaq 0x20(%rsp), %rax movaps %xmm0, (%rax) movq %r15, 0x10(%rax) movq %rbx, 0x18(%rax) movq (%rbp), %rsi movq %rax, (%rsp) pushq $0x2 popq %r9 movq %r14, %rdi callq 0x21eb6 movq %rax, %r12 movq %rdx, %r13 movq %r14, %rdi movq %r15, %rsi movq %rbx, %rdx callq 0x1801e movq %r12, %r15 movq %r13, %rbx cmpl $0x6, %r13d jne 0x2e41d movq %r14, %rdi movq %r15, %rsi movq %rbx, %rdx callq 0x1801e pushq $0x6 popq %rbx xorl %eax, %eax xorl %ecx, %ecx jmp 0x2e43f leal 0x9(%rbx), %eax cmpl $0x10, %eax ja 0x2e46b movl $0x18e05, %ecx # imm = 0x18E05 btl %eax, %ecx jae 0x2e454 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %r15, %rcx movl %r15d, %eax orq %rcx, %rax movq %rbx, %rdx addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq cmpl $0x8, %eax jne 0x2e46b movq %r14, %rdi movq %r15, %rsi movq %rbx, %rdx callq 0x1ce7d testl %eax, %eax je 0x2e42f movq %r14, %rdi movq %r15, %rsi movq %rbx, %rdx callq 0x1801e pushq $0x3 jmp 0x2e416
js_json_check: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov rbx, r9 mov r15, r8 mov r8, rcx mov rcx, rdx mov rbp, rsi mov r14, rdi mov eax, ebx or eax, 8 cmp eax, 0FFFFFFFFh jnz loc_2E3AE mov [rsp+78h+var_68], rcx mov [rsp+78h+var_60], r8 mov rdi, r14 mov rsi, r15 mov rdx, rbx mov ecx, 91h call JS_GetProperty mov r12, rdx cmp r12d, 6 jz loc_2E406 mov r13, rax mov rdi, r14 mov rsi, rax mov rdx, r12 call JS_IsFunction test eax, eax jz short loc_2E396 lea rax, [rsp+78h+arg_0] mov [rsp+78h+var_78], rax push 1 pop r9 mov rdi, r14 mov rsi, r13 mov rdx, r12 mov rcx, r15 mov r8, rbx call JS_CallFree mov r12, rax mov r13, rdx mov rdi, r14 mov rsi, r15 mov rdx, rbx call JS_FreeValue mov r15, r12 mov rbx, r13 cmp r13d, 6 mov r8, [rsp+78h+var_60] mov rcx, [rsp+78h+var_68] jnz short loc_2E3AE jmp short loc_2E406 loc_2E396: mov rdi, r14 mov rsi, r13 mov rdx, r12 call JS_FreeValue mov r8, [rsp+78h+var_60] mov rcx, [rsp+78h+var_68] loc_2E3AE: mov rdx, [rbp+8] cmp edx, 3 jz short loc_2E41D lea rax, [rsp+78h+arg_0] movups xmm0, xmmword ptr [rax] lea rax, [rsp+78h+var_58] movaps xmmword ptr [rax], xmm0 mov [rax+10h], r15 mov [rax+18h], rbx mov rsi, [rbp+0] mov [rsp+78h+var_78], rax push 2 pop r9 mov rdi, r14 call JS_Call mov r12, rax mov r13, rdx mov rdi, r14 mov rsi, r15 mov rdx, rbx call JS_FreeValue mov r15, r12 mov rbx, r13 cmp r13d, 6 jnz short loc_2E41D loc_2E406: mov rdi, r14 mov rsi, r15 mov rdx, rbx call JS_FreeValue push 6 loc_2E416: pop rbx xor eax, eax xor ecx, ecx jmp short loc_2E43F loc_2E41D: lea eax, [rbx+9] cmp eax, 10h ja short loc_2E46B mov ecx, offset loc_18E05 bt ecx, eax jnb short loc_2E454 loc_2E42F: mov rcx, 0FFFFFFFF00000000h and rcx, r15 mov eax, r15d loc_2E43F: or rax, rcx mov rdx, rbx add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_2E454: cmp eax, 8 jnz short loc_2E46B mov rdi, r14 mov rsi, r15 mov rdx, rbx call JS_IsFunction test eax, eax jz short loc_2E42F loc_2E46B: mov rdi, r14 mov rsi, r15 mov rdx, rbx call JS_FreeValue push 3 jmp short loc_2E416
unsigned long long js_json_check(long long a1, _QWORD *a2, int a3, int a4, long long a5, long long a6, __int128 a7) { long long v7; // rbx int v10; // ecx long long Property; // rax long long v12; // rdx long long v13; // r12 long long v14; // r13 long long v15; // r12 long long v16; // rdx long long v17; // r13 long long v18; // rdx long long v19; // r12 long long v20; // rdx long long v21; // r13 long long v22; // rax unsigned long long v23; // rcx void *v24; // rcx int v27; // [rsp+18h] [rbp-60h] __int128 v28; // [rsp+20h] [rbp-58h] BYREF long long v29; // [rsp+30h] [rbp-48h] long long v30; // [rsp+38h] [rbp-40h] v7 = a6; v10 = a3; if ( ((unsigned int)a6 | 8) == 0xFFFFFFFF ) { v27 = a4; Property = JS_GetProperty(a1, a5, a6, 145); v13 = v12; if ( (_DWORD)v12 == 6 ) goto LABEL_9; v14 = Property; if ( (unsigned int)JS_IsFunction(a1, Property, v12) ) { v15 = JS_CallFree(a1, v14, v13, a5, v7, 1, (long long)&a7); v17 = v16; JS_FreeValue(a1, a5, v7); a5 = v15; v7 = v17; a4 = v27; v10 = a3; if ( (_DWORD)v17 == 6 ) goto LABEL_9; } else { JS_FreeValue(a1, v14, v13); a4 = v27; v10 = a3; } } v18 = a2[1]; if ( (_DWORD)v18 == 3 ) goto LABEL_19; v28 = a7; v29 = a5; v30 = v7; v19 = JS_Call(a1, *a2, v18, v10, a4, 2, (long long)&v28); v21 = v20; JS_FreeValue(a1, a5, v7); a5 = v19; v7 = v21; if ( (_DWORD)v21 != 6 ) { LABEL_19: if ( (unsigned int)(v7 + 9) <= 0x10 ) { v24 = &loc_18E05; if ( _bittest((const int *)&v24, v7 + 9) || (_DWORD)v7 == -1 && !(unsigned int)JS_IsFunction(a1, a5, -1) ) { v23 = a5 & 0xFFFFFFFF00000000LL; v22 = (unsigned int)a5; return v23 | v22; } } } LABEL_9: JS_FreeValue(a1, a5, v7); v22 = 0LL; v23 = 0LL; return v23 | v22; }
js_json_check: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV RBX,R9 MOV R15,R8 MOV R8,RCX MOV RCX,RDX MOV RBP,RSI MOV R14,RDI MOV EAX,EBX OR EAX,0x8 CMP EAX,-0x1 JNZ 0x0012e3ae MOV qword ptr [RSP + 0x10],RCX MOV qword ptr [RSP + 0x18],R8 MOV RDI,R14 MOV RSI,R15 MOV RDX,RBX MOV ECX,0x91 CALL 0x0011b043 MOV R12,RDX CMP R12D,0x6 JZ 0x0012e406 MOV R13,RAX MOV RDI,R14 MOV RSI,RAX MOV RDX,R12 CALL 0x0011ce7d TEST EAX,EAX JZ 0x0012e396 LEA RAX,[RSP + 0x80] MOV qword ptr [RSP],RAX PUSH 0x1 POP R9 MOV RDI,R14 MOV RSI,R13 MOV RDX,R12 MOV RCX,R15 MOV R8,RBX CALL 0x0011cd8e MOV R12,RAX MOV R13,RDX MOV RDI,R14 MOV RSI,R15 MOV RDX,RBX CALL 0x0011801e MOV R15,R12 MOV RBX,R13 CMP R13D,0x6 MOV R8,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x10] JNZ 0x0012e3ae JMP 0x0012e406 LAB_0012e396: MOV RDI,R14 MOV RSI,R13 MOV RDX,R12 CALL 0x0011801e MOV R8,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x10] LAB_0012e3ae: MOV RDX,qword ptr [RBP + 0x8] CMP EDX,0x3 JZ 0x0012e41d LEA RAX,[RSP + 0x80] MOVUPS XMM0,xmmword ptr [RAX] LEA RAX,[RSP + 0x20] MOVAPS xmmword ptr [RAX],XMM0 MOV qword ptr [RAX + 0x10],R15 MOV qword ptr [RAX + 0x18],RBX MOV RSI,qword ptr [RBP] MOV qword ptr [RSP],RAX PUSH 0x2 POP R9 MOV RDI,R14 CALL 0x00121eb6 MOV R12,RAX MOV R13,RDX MOV RDI,R14 MOV RSI,R15 MOV RDX,RBX CALL 0x0011801e MOV R15,R12 MOV RBX,R13 CMP R13D,0x6 JNZ 0x0012e41d LAB_0012e406: MOV RDI,R14 MOV RSI,R15 MOV RDX,RBX CALL 0x0011801e PUSH 0x6 LAB_0012e416: POP RBX XOR EAX,EAX XOR ECX,ECX JMP 0x0012e43f LAB_0012e41d: LEA EAX,[RBX + 0x9] CMP EAX,0x10 JA 0x0012e46b MOV ECX,0x18e05 BT ECX,EAX JNC 0x0012e454 LAB_0012e42f: MOV RCX,-0x100000000 AND RCX,R15 MOV EAX,R15D LAB_0012e43f: OR RAX,RCX MOV RDX,RBX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0012e454: CMP EAX,0x8 JNZ 0x0012e46b MOV RDI,R14 MOV RSI,R15 MOV RDX,RBX CALL 0x0011ce7d TEST EAX,EAX JZ 0x0012e42f LAB_0012e46b: MOV RDI,R14 MOV RSI,R15 MOV RDX,RBX CALL 0x0011801e PUSH 0x3 JMP 0x0012e416
int1 [16] js_json_check(int8 param_1,int8 *param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8) { int1 auVar1 [16]; int iVar2; uint uVar3; ulong uVar4; ulong uVar5; int8 uVar6; int8 uVar7; int1 auVar8 [16]; int1 auVar9 [16]; int8 uStackY_80; int4 local_58; int4 uStack_54; int4 uStack_50; int4 uStack_4c; int1 local_48 [16]; auVar1._8_8_ = param_6; auVar1._0_8_ = param_5; auVar9._8_8_ = param_6; auVar9._0_8_ = param_5; if (((uint)param_6 | 8) == 0xffffffff) { auVar8 = JS_GetProperty(param_1,param_5,param_6,0x91); uVar7 = auVar8._8_8_; uVar6 = auVar8._0_8_; auVar9 = auVar1; if (auVar8._8_4_ != 6) { iVar2 = JS_IsFunction(param_1,uVar6,uVar7); if (iVar2 == 0) { JS_FreeValue(param_1,uVar6,uVar7); } else { auVar9 = JS_CallFree(param_1,uVar6,uVar7,param_5,param_6,1,&param_7); JS_FreeValue(param_1,param_5,param_6); if (auVar9._8_4_ == 6) goto LAB_0012e406; } goto LAB_0012e3ae; } LAB_0012e406: JS_FreeValue(param_1,auVar9._0_8_,auVar9._8_8_); uStackY_80 = 6; } else { LAB_0012e3ae: uVar6 = auVar9._8_8_; uVar7 = auVar9._0_8_; if ((int)param_2[1] != 3) { local_58 = (int4)param_7; uStack_54 = param_7._4_4_; uStack_50 = (int4)param_8; uStack_4c = param_8._4_4_; local_48 = auVar9; auVar9 = JS_Call(param_1,*param_2,param_2[1],param_3,param_4,2,&local_58); JS_FreeValue(param_1,uVar7,uVar6); if (auVar9._8_4_ == 6) goto LAB_0012e406; } uStackY_80 = auVar9._8_8_; uVar4 = auVar9._0_8_; uVar3 = auVar9._8_4_ + 9; if (uVar3 < 0x11) { if ((0x18e05U >> (uVar3 & 0x1f) & 1) != 0) { LAB_0012e42f: uVar5 = uVar4 & 0xffffffff00000000; uVar4 = uVar4 & 0xffffffff; goto LAB_0012e43f; } if (uVar3 == 8) { iVar2 = JS_IsFunction(param_1,uVar4,uStackY_80); if (iVar2 == 0) goto LAB_0012e42f; } } JS_FreeValue(param_1,uVar4,uStackY_80); uStackY_80 = 3; } uVar4 = 0; uVar5 = 0; LAB_0012e43f: auVar8._0_8_ = uVar4 | uVar5; auVar8._8_8_ = uStackY_80; return auVar8; }
16,855
google::protobuf::ServiceOptions::ByteSizeLong() const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
size_t ServiceOptions::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.ServiceOptions) size_t total_size = 0; total_size += _impl_._extensions_.ByteSize(); uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; total_size += 2UL * this->_internal_uninterpreted_option_size(); for (const auto& msg : this->_impl_.uninterpreted_option_) { total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } // optional bool deprecated = 33 [default = false]; cached_has_bits = _impl_._has_bits_[0]; if (cached_has_bits & 0x00000001u) { total_size += 2 + 1; } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); }
O3
cpp
google::protobuf::ServiceOptions::ByteSizeLong() const: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdi, %rbx addq $0x10, %rdi callq 0xb940c movslq 0x38(%rbx), %r15 movq 0x40(%rbx), %r12 leaq 0x8(%r12), %rcx testq %r12, %r12 cmovneq %rcx, %r12 leaq (%rax,%r15,2), %r14 testq %r15, %r15 je 0xf69f2 shlq $0x3, %r15 xorl %r13d, %r13d movq (%r12,%r13), %rdi callq 0xf8074 addq %rax, %r14 orl $0x1, %eax bsrl %eax, %eax leal (%rax,%rax,8), %eax addl $0x49, %eax shrl $0x6, %eax addq %rax, %r14 addq $0x8, %r13 cmpq %r13, %r15 jne 0xf69cb leaq 0x3(%r14), %rsi testb $0x1, 0x28(%rbx) cmoveq %r14, %rsi leaq 0x2c(%rbx), %rdx movq %rbx, %rdi popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 jmp 0x9f36e nop
_ZNK6google8protobuf14ServiceOptions12ByteSizeLongEv: push r15 push r14 push r13 push r12 push rbx mov rbx, rdi add rdi, 10h; this call _ZNK6google8protobuf8internal12ExtensionSet8ByteSizeEv; google::protobuf::internal::ExtensionSet::ByteSize(void) movsxd r15, dword ptr [rbx+38h] mov r12, [rbx+40h] lea rcx, [r12+8] test r12, r12 cmovnz r12, rcx lea r14, [rax+r15*2] test r15, r15 jz short loc_F69F2 shl r15, 3 xor r13d, r13d loc_F69CB: mov rdi, [r12+r13]; this call _ZNK6google8protobuf19UninterpretedOption12ByteSizeLongEv; google::protobuf::UninterpretedOption::ByteSizeLong(void) add r14, rax or eax, 1 bsr eax, eax lea eax, [rax+rax*8] add eax, 49h ; 'I' shr eax, 6 add r14, rax add r13, 8 cmp r15, r13 jnz short loc_F69CB loc_F69F2: lea rsi, [r14+3] test byte ptr [rbx+28h], 1 cmovz rsi, r14 lea rdx, [rbx+2Ch] mov rdi, rbx pop rbx pop r12 pop r13 pop r14 pop r15 jmp _ZNK6google8protobuf7Message29MaybeComputeUnknownFieldsSizeEmPNS0_8internal10CachedSizeE; google::protobuf::Message::MaybeComputeUnknownFieldsSize(ulong,google::protobuf::internal::CachedSize *)
char * google::protobuf::ServiceOptions::ByteSizeLong(google::protobuf::ServiceOptions *this) { long long v1; // rax long long v2; // r15 long long v3; // r12 long long v4; // r14 long long v5; // r15 long long v6; // r13 long long v7; // rax long long v8; // r14 const google::protobuf::UnknownFieldSet *v9; // rsi v1 = google::protobuf::internal::ExtensionSet::ByteSize((google::protobuf::ServiceOptions *)((char *)this + 16)); v2 = *((int *)this + 14); v3 = *((_QWORD *)this + 8); if ( v3 ) v3 += 8LL; v4 = v1 + 2 * v2; if ( *((_DWORD *)this + 14) ) { v5 = 8 * v2; v6 = 0LL; do { v7 = google::protobuf::UninterpretedOption::ByteSizeLong(*(google::protobuf::UninterpretedOption **)(v3 + v6)); v8 = v7 + v4; _BitScanReverse((unsigned int *)&v7, v7 | 1); v4 = ((unsigned int)(9 * v7 + 73) >> 6) + v8; v6 += 8LL; } while ( v5 != v6 ); } v9 = (const google::protobuf::UnknownFieldSet *)(v4 + 3); if ( (*((_BYTE *)this + 40) & 1) == 0 ) v9 = (const google::protobuf::UnknownFieldSet *)v4; return google::protobuf::Message::MaybeComputeUnknownFieldsSize((long long)this, v9, (_DWORD *)this + 11); }
ByteSizeLong: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV RBX,RDI ADD RDI,0x10 CALL 0x001b940c MOVSXD R15,dword ptr [RBX + 0x38] MOV R12,qword ptr [RBX + 0x40] LEA RCX,[R12 + 0x8] TEST R12,R12 CMOVNZ R12,RCX LEA R14,[RAX + R15*0x2] TEST R15,R15 JZ 0x001f69f2 SHL R15,0x3 XOR R13D,R13D LAB_001f69cb: MOV RDI,qword ptr [R12 + R13*0x1] CALL 0x001f8074 ADD R14,RAX OR EAX,0x1 BSR EAX,EAX LEA EAX,[RAX + RAX*0x8] ADD EAX,0x49 SHR EAX,0x6 ADD R14,RAX ADD R13,0x8 CMP R15,R13 JNZ 0x001f69cb LAB_001f69f2: LEA RSI,[R14 + 0x3] TEST byte ptr [RBX + 0x28],0x1 CMOVZ RSI,R14 LEA RDX,[RBX + 0x2c] MOV RDI,RBX POP RBX POP R12 POP R13 POP R14 POP R15 JMP 0x0019f36e
/* google::protobuf::ServiceOptions::ByteSizeLong() const */ void __thiscall google::protobuf::ServiceOptions::ByteSizeLong(ServiceOptions *this) { int iVar1; uint uVar2; long lVar3; long lVar4; ulong uVar5; long lVar6; ulong uVar7; long lVar8; lVar3 = internal::ExtensionSet::ByteSize((ExtensionSet *)(this + 0x10)); lVar8 = (long)*(int *)(this + 0x38); lVar6 = *(long *)(this + 0x40); if (lVar6 != 0) { lVar6 = lVar6 + 8; } uVar7 = lVar3 + lVar8 * 2; if (lVar8 != 0) { lVar3 = 0; do { lVar4 = UninterpretedOption::ByteSizeLong(*(UninterpretedOption **)(lVar6 + lVar3)); uVar2 = (uint)lVar4 | 1; iVar1 = 0x1f; if (uVar2 != 0) { for (; uVar2 >> iVar1 == 0; iVar1 = iVar1 + -1) { } } uVar7 = uVar7 + lVar4 + (ulong)(iVar1 * 9 + 0x49U >> 6); lVar3 = lVar3 + 8; } while (lVar8 * 8 != lVar3); } uVar5 = uVar7 + 3; if (((byte)this[0x28] & 1) == 0) { uVar5 = uVar7; } Message::MaybeComputeUnknownFieldsSize((Message *)this,uVar5,(CachedSize *)(this + 0x2c)); return; }
16,856
my_mutex_init
eloqsql/mysys/thr_mutex.c
void my_mutex_init() { /* Initialize mutex attributes */ #ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP /* Set mutex type to "fast" a.k.a "adaptive" In this case the thread may steal the mutex from some other thread that is waiting for the same mutex. This will save us some context switches but may cause a thread to 'starve forever' while waiting for the mutex (not likely if the code within the mutex is short). */ pthread_mutexattr_init(&my_fast_mutexattr); pthread_mutexattr_settype(&my_fast_mutexattr, PTHREAD_MUTEX_ADAPTIVE_NP); #endif #ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP /* Set mutex type to "errorcheck" */ pthread_mutexattr_init(&my_errorcheck_mutexattr); pthread_mutexattr_settype(&my_errorcheck_mutexattr, PTHREAD_MUTEX_ERRORCHECK); #endif #if defined(SAFE_MUTEX_DEFINED) safe_mutex_global_init(); #endif }
O3
c
my_mutex_init: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax leaq 0x3412b7(%rip), %rbx # 0x36e360 movq %rbx, %rdi callq 0x24070 movq %rbx, %rdi movl $0x3, %esi callq 0x244c0 leaq 0x34129f(%rip), %rbx # 0x36e364 movq %rbx, %rdi callq 0x24070 movq %rbx, %rdi movl $0x2, %esi addq $0x8, %rsp popq %rbx popq %rbp jmp 0x244c0
my_mutex_init: push rbp mov rbp, rsp push rbx push rax lea rbx, my_fast_mutexattr mov rdi, rbx call _pthread_mutexattr_init mov rdi, rbx mov esi, 3 call _pthread_mutexattr_settype lea rbx, my_errorcheck_mutexattr mov rdi, rbx call _pthread_mutexattr_init mov rdi, rbx mov esi, 2 add rsp, 8 pop rbx pop rbp jmp _pthread_mutexattr_settype
long long my_mutex_init() { pthread_mutexattr_init(&my_fast_mutexattr); pthread_mutexattr_settype(&my_fast_mutexattr, 3LL); pthread_mutexattr_init(&my_errorcheck_mutexattr); return pthread_mutexattr_settype(&my_errorcheck_mutexattr, 2LL); }
my_mutex_init: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX LEA RBX,[0x46e360] MOV RDI,RBX CALL 0x00124070 MOV RDI,RBX MOV ESI,0x3 CALL 0x001244c0 LEA RBX,[0x46e364] MOV RDI,RBX CALL 0x00124070 MOV RDI,RBX MOV ESI,0x2 ADD RSP,0x8 POP RBX POP RBP JMP 0x001244c0
void my_mutex_init(void) { pthread_mutexattr_init((pthread_mutexattr_t *)&my_fast_mutexattr); pthread_mutexattr_settype((pthread_mutexattr_t *)&my_fast_mutexattr,3); pthread_mutexattr_init((pthread_mutexattr_t *)&my_errorcheck_mutexattr); pthread_mutexattr_settype((pthread_mutexattr_t *)&my_errorcheck_mutexattr,2); return; }
16,857
cli_report_progress
eloqsql/libmariadb/libmariadb/mariadb_lib.c
static int cli_report_progress(MYSQL *mysql, uchar *packet, uint length) { uint stage, max_stage, proc_length; double progress; uchar *start= packet; if (length < 5) return 1; /* Wrong packet */ if (!(mysql->options.extension && mysql->options.extension->report_progress)) return 0; /* No callback, ignore packet */ packet++; /* Ignore number of strings */ stage= (uint) *packet++; max_stage= (uint) *packet++; progress= uint3korr(packet)/1000.0; packet+= 3; proc_length= net_field_length(&packet); if (packet + proc_length > start + length) return 1; /* Wrong packet */ (*mysql->options.extension->report_progress)(mysql, stage, max_stage, progress, (char*) packet, proc_length); return 0; }
O0
c
cli_report_progress: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x38(%rbp) cmpl $0x5, -0x1c(%rbp) jae 0x1bced movl $0x1, -0x4(%rbp) jmp 0x1bde0 movq -0x10(%rbp), %rax cmpq $0x0, 0x480(%rax) je 0x1bd10 movq -0x10(%rbp), %rax movq 0x480(%rax), %rax cmpq $0x0, 0x80(%rax) jne 0x1bd1c movl $0x0, -0x4(%rbp) jmp 0x1bde0 movq -0x18(%rbp), %rax incq %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movq %rax, %rcx incq %rcx movq %rcx, -0x18(%rbp) movzbl (%rax), %eax movl %eax, -0x20(%rbp) movq -0x18(%rbp), %rax movq %rax, %rcx incq %rcx movq %rcx, -0x18(%rbp) movzbl (%rax), %eax movl %eax, -0x24(%rbp) movq -0x18(%rbp), %rcx movzwl (%rcx), %eax movzbl 0x2(%rcx), %ecx shll $0x10, %ecx orl %ecx, %eax cvtsi2sd %eax, %xmm0 movsd 0x39f85(%rip), %xmm1 # 0x55cf0 divsd %xmm1, %xmm0 movsd %xmm0, -0x30(%rbp) movq -0x18(%rbp), %rax addq $0x3, %rax movq %rax, -0x18(%rbp) leaq -0x18(%rbp), %rdi callq 0x1bdf0 movl %eax, -0x28(%rbp) movq -0x18(%rbp), %rax movl -0x28(%rbp), %ecx addq %rcx, %rax movq -0x38(%rbp), %rcx movl -0x1c(%rbp), %edx addq %rdx, %rcx cmpq %rcx, %rax jbe 0x1bdae movl $0x1, -0x4(%rbp) jmp 0x1bde0 movq -0x10(%rbp), %rax movq 0x480(%rax), %rax movq 0x80(%rax), %rax movq -0x10(%rbp), %rdi movl -0x20(%rbp), %esi movl -0x24(%rbp), %edx movsd -0x30(%rbp), %xmm0 movq -0x18(%rbp), %rcx movl -0x28(%rbp), %r8d callq *%rax movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopl (%rax)
cli_report_progress: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov rax, [rbp+var_18] mov [rbp+var_38], rax cmp [rbp+var_1C], 5 jnb short loc_1BCED mov [rbp+var_4], 1 jmp loc_1BDE0 loc_1BCED: mov rax, [rbp+var_10] cmp qword ptr [rax+480h], 0 jz short loc_1BD10 mov rax, [rbp+var_10] mov rax, [rax+480h] cmp qword ptr [rax+80h], 0 jnz short loc_1BD1C loc_1BD10: mov [rbp+var_4], 0 jmp loc_1BDE0 loc_1BD1C: mov rax, [rbp+var_18] inc rax mov [rbp+var_18], rax mov rax, [rbp+var_18] mov rcx, rax inc rcx mov [rbp+var_18], rcx movzx eax, byte ptr [rax] mov [rbp+var_20], eax mov rax, [rbp+var_18] mov rcx, rax inc rcx mov [rbp+var_18], rcx movzx eax, byte ptr [rax] mov [rbp+var_24], eax mov rcx, [rbp+var_18] movzx eax, word ptr [rcx] movzx ecx, byte ptr [rcx+2] shl ecx, 10h or eax, ecx cvtsi2sd xmm0, eax movsd xmm1, cs:qword_55CF0 divsd xmm0, xmm1 movsd [rbp+var_30], xmm0 mov rax, [rbp+var_18] add rax, 3 mov [rbp+var_18], rax lea rdi, [rbp+var_18] call net_field_length mov [rbp+var_28], eax mov rax, [rbp+var_18] mov ecx, [rbp+var_28] add rax, rcx mov rcx, [rbp+var_38] mov edx, [rbp+var_1C] add rcx, rdx cmp rax, rcx jbe short loc_1BDAE mov [rbp+var_4], 1 jmp short loc_1BDE0 loc_1BDAE: mov rax, [rbp+var_10] mov rax, [rax+480h] mov rax, [rax+80h] mov rdi, [rbp+var_10] mov esi, [rbp+var_20] mov edx, [rbp+var_24] movsd xmm0, [rbp+var_30] mov rcx, [rbp+var_18] mov r8d, [rbp+var_28] call rax mov [rbp+var_4], 0 loc_1BDE0: mov eax, [rbp+var_4] add rsp, 40h pop rbp retn
long long cli_report_progress(long long a1, unsigned __int16 *a2, unsigned int a3) { unsigned __int16 *v3; // rax unsigned __int16 *v4; // rax double v6; // [rsp+10h] [rbp-30h] unsigned int v7; // [rsp+18h] [rbp-28h] unsigned int v8; // [rsp+1Ch] [rbp-24h] unsigned int v9; // [rsp+20h] [rbp-20h] unsigned __int16 *v11; // [rsp+28h] [rbp-18h] BYREF long long v12; // [rsp+30h] [rbp-10h] v12 = a1; v11 = a2; if ( a3 >= 5 ) { if ( *(_QWORD *)(v12 + 1152) && *(_QWORD *)(*(_QWORD *)(v12 + 1152) + 128LL) ) { v11 = (unsigned __int16 *)((char *)v11 + 1); v3 = v11; v11 = (unsigned __int16 *)((char *)v11 + 1); v9 = *(unsigned __int8 *)v3; v4 = v11; v11 = (unsigned __int16 *)((char *)v11 + 1); v8 = *(unsigned __int8 *)v4; v6 = (double)((*((unsigned __int8 *)v11 + 2) << 16) | (unsigned int)*v11) / 1000.0; v11 = (unsigned __int16 *)((char *)v11 + 3); v7 = net_field_length(&v11); if ( (char *)v11 + v7 <= (char *)a2 + a3 ) { (*(void ( **)(long long, _QWORD, _QWORD, unsigned __int16 *, _QWORD, double))(*(_QWORD *)(v12 + 1152) + 128LL))( v12, v9, v8, v11, v7, v6); return 0; } else { return 1; } } else { return 0; } } else { return 1; } }
cli_report_progress: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x38],RAX CMP dword ptr [RBP + -0x1c],0x5 JNC 0x0011bced MOV dword ptr [RBP + -0x4],0x1 JMP 0x0011bde0 LAB_0011bced: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x480],0x0 JZ 0x0011bd10 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x480] CMP qword ptr [RAX + 0x80],0x0 JNZ 0x0011bd1c LAB_0011bd10: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0011bde0 LAB_0011bd1c: MOV RAX,qword ptr [RBP + -0x18] INC RAX MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX INC RCX MOV qword ptr [RBP + -0x18],RCX MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x20],EAX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX INC RCX MOV qword ptr [RBP + -0x18],RCX MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x24],EAX MOV RCX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x10 OR EAX,ECX CVTSI2SD XMM0,EAX MOVSD XMM1,qword ptr [0x00155cf0] DIVSD XMM0,XMM1 MOVSD qword ptr [RBP + -0x30],XMM0 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x3 MOV qword ptr [RBP + -0x18],RAX LEA RDI,[RBP + -0x18] CALL 0x0011bdf0 MOV dword ptr [RBP + -0x28],EAX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x28] ADD RAX,RCX MOV RCX,qword ptr [RBP + -0x38] MOV EDX,dword ptr [RBP + -0x1c] ADD RCX,RDX CMP RAX,RCX JBE 0x0011bdae MOV dword ptr [RBP + -0x4],0x1 JMP 0x0011bde0 LAB_0011bdae: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x80] MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x20] MOV EDX,dword ptr [RBP + -0x24] MOVSD XMM0,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x18] MOV R8D,dword ptr [RBP + -0x28] CALL RAX MOV dword ptr [RBP + -0x4],0x0 LAB_0011bde0: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x40 POP RBP RET
int4 cli_report_progress(long param_1,long param_2,uint param_3) { int1 uVar1; int1 uVar2; uint uVar3; double dVar4; long local_20; long local_18; int4 local_c; if (param_3 < 5) { local_c = 1; } else if ((*(long *)(param_1 + 0x480) == 0) || (*(long *)(*(long *)(param_1 + 0x480) + 0x80) == 0)) { local_c = 0; } else { uVar1 = *(int1 *)(param_2 + 1); uVar2 = *(int1 *)(param_2 + 2); dVar4 = (double)*(uint3 *)(param_2 + 3) / DAT_00155cf0; local_20 = param_2 + 6; local_18 = param_1; uVar3 = net_field_length(&local_20); if (param_2 + (ulong)param_3 < local_20 + (ulong)uVar3) { local_c = 1; } else { (**(code **)(*(long *)(local_18 + 0x480) + 0x80))(dVar4,local_18,uVar1,uVar2,local_20,uVar3); local_c = 0; } } return local_c; }
16,858
common_chat_params_init_command_r7b(minja::chat_template const&, common_chat_inputs const&)
monkey531[P]llama/common/chat.cpp
static common_chat_params common_chat_params_init_command_r7b(const common_chat_template & tmpl, const struct common_chat_inputs & inputs) { common_chat_params data; data.grammar_lazy = inputs.tool_choice != "required"; data.grammar = build_grammar([&](const common_grammar_builder & builder) { auto schemas = json::array(); foreach_function(inputs.tools, [&](const json & tool) { const auto & function = tool["function"]; schemas.push_back({ {"type", "object"}, {"properties", { {"tool_call_id", { {"type", "string"}, // Command-R's template expects an integer string. {"pattern", "^[0-9]{1,10}$"}, }}, {"tool_name", { {"type", "string"}, {"const", function["name"]}, }}, {"parameters", function["parameters"]}, }}, {"required", json::array({"tool_call_id", "tool_name", "parameters"})}, }); }); auto schema = json { {"type", "array"}, {"items", schemas.size() == 1 ? schemas[0] : json {{"anyOf", schemas}}}, {"minItems", 1}, }; if (!inputs.parallel_tool_calls) { schema["maxItems"] = 1; } builder.add_rule("root", "\"<|START_ACTION|>\" " + builder.add_schema("tool_calls", schema) + " \"<|END_ACTION|>\""); }, grammar_options); data.grammar_triggers.push_back({"<|START_ACTION|>", /* .at_start = */ false}); data.preserved_tokens = { "<|START_RESPONSE|>", "<|END_RESPONSE|>", "<|START_THINKING|>", "<|END_THINKING|>", "<|END_ACTION|>", }; data.prompt = tmpl.apply(inputs.messages, inputs.tools.empty() ? json() : inputs.tools, inputs.add_generation_prompt); data.format = COMMON_CHAT_FORMAT_COMMAND_R7B; return data; }
O3
cpp
common_chat_params_init_command_r7b(minja::chat_template const&, common_chat_inputs const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xe8, %rsp movq %rdx, %r14 movq %rsi, %rbp movq %rdi, %rbx movl $0x0, (%rdi) xorl %r15d, %r15d movb %r15b, 0x8(%rdi) movq %r15, 0x10(%rdi) leaq 0x28(%rdi), %rax movq %rax, 0x18(%rdi) movq %r15, 0x20(%rdi) movb %r15b, 0x28(%rdi) movb %r15b, 0x38(%rdi) xorps %xmm0, %xmm0 movups %xmm0, 0x40(%rdi) movups %xmm0, 0x50(%rdi) movups %xmm0, 0x60(%rdi) movups %xmm0, 0x70(%rdi) movq %r15, 0x80(%rdi) leaq 0x20(%rdx), %rdi leaq 0x1a188(%rip), %rsi # 0xb7d46 callq 0x879cd movb %al, 0x38(%rbx) leaq 0x8(%rsp), %rsi movq %r15, 0x8(%rsi) movq %r14, (%rsi) leaq 0xe49d(%rip), %rax # 0xac076 movq %rax, 0x18(%rsi) leaq 0xed12(%rip), %rax # 0xac8f6 movq %rax, 0x10(%rsi) leaq 0x209a5(%rip), %rdx # 0xbe594 leaq 0x38(%rsp), %rdi callq 0x324c8 leaq 0x18(%rbx), %rdi leaq 0x38(%rsp), %r12 movq %r12, %rsi callq 0x19820 movq (%r12), %rdi leaq 0x48(%rsp), %r15 cmpq %r15, %rdi je 0x9dc25 movq 0x48(%rsp), %rsi incq %rsi callq 0x196b0 movq 0x18(%rsp), %rax testq %rax, %rax je 0x9dc3e leaq 0x8(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax leaq 0x38(%rsp), %rdi movq %r15, (%rdi) leaq 0x21a33(%rip), %rsi # 0xbf680 leaq 0x21a3c(%rip), %rdx # 0xbf690 callq 0x320e8 leaq 0x40(%rbx), %rdi leaq 0x38(%rsp), %rsi movb $0x0, 0x20(%rsi) callq 0xb0648 movq 0x38(%rsp), %rdi cmpq %r15, %rdi je 0x9dc82 movq 0x48(%rsp), %rsi incq %rsi callq 0x196b0 leaq 0x38(%rsp), %r12 movq %r15, (%r12) leaq 0x21ec4(%rip), %rsi # 0xbfb56 leaq 0x21ecf(%rip), %rdx # 0xbfb68 movq %r12, %rdi callq 0x320e8 leaq 0x58(%rsp), %r13 leaq 0x68(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x21eb3(%rip), %rsi # 0xbfb69 leaq 0x21ebc(%rip), %rdx # 0xbfb79 movq %r13, %rdi callq 0x320e8 leaq 0x78(%rsp), %r13 leaq 0x88(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x21e9d(%rip), %rsi # 0xbfb7a leaq 0x21ea8(%rip), %rdx # 0xbfb8c movq %r13, %rdi callq 0x320e8 leaq 0x98(%rsp), %r13 leaq 0xa8(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x21e86(%rip), %rsi # 0xbfb8d leaq 0x21e8f(%rip), %rdx # 0xbfb9d movq %r13, %rdi callq 0x320e8 leaq 0xb8(%rsp), %r13 leaq 0xc8(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x21e6d(%rip), %rsi # 0xbfb9e leaq 0x21e74(%rip), %rdx # 0xbfbac movq %r13, %rdi callq 0x320e8 leaq 0x58(%rbx), %rdi leaq 0xd8(%rsp), %r12 leaq 0x38(%rsp), %rsi movq %r12, %rdx callq 0xb0a50 movq $-0xa0, %r12 movq -0x10(%r15), %rdi cmpq %rdi, %r15 je 0x9dd74 movq (%r15), %rsi incq %rsi callq 0x196b0 addq $-0x20, %r15 addq $0x20, %r12 jne 0x9dd60 movzbl 0x10(%r14), %eax testl %eax, %eax leaq 0x48(%rsp), %r15 je 0x9ddb3 cmpl $0x2, %eax je 0x9dd96 cmpl $0x1, %eax jne 0x9dda3 movq 0x18(%r14), %rax movq (%rax), %rcx cmpq 0x8(%rax), %rcx je 0x9ddb3 leaq 0x10(%r14), %rsi leaq 0x8(%rsp), %rdi callq 0x2d4c2 jmp 0x9ddc1 movb $0x0, 0x8(%rsp) movq $0x0, 0x10(%rsp) movzbl 0x68(%r14), %r8d leaq 0x28(%rsp), %r9 movb $0x0, (%r9) movq $0x0, 0x8(%r9) movl $0x1, (%rsp) leaq 0x38(%rsp), %rdi leaq 0x8(%rsp), %rcx movq %rbp, %rsi movq %r14, %rdx callq 0x8449a leaq 0xd8(%rsp), %rdi leaq 0x38(%rsp), %rsi callq 0x559f2 movb 0x8(%rbx), %al leaq 0xd8(%rsp), %rdi movb (%rdi), %cl movb %cl, 0x8(%rbx) movb %al, (%rdi) movq 0x10(%rbx), %rax movq 0x8(%rdi), %rcx movq %rcx, 0x10(%rbx) movq %rax, 0x8(%rdi) callq 0x2d98e movq 0x38(%rsp), %rdi cmpq %r15, %rdi je 0x9de43 movq 0x48(%rsp), %rsi incq %rsi callq 0x196b0 leaq 0x28(%rsp), %rdi callq 0x2d98e leaq 0x8(%rsp), %rdi callq 0x2d98e movl $0xa, (%rbx) addq $0xe8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x9df12 jmp 0x9df43 movq %rax, %r14 movq 0x38(%rsp), %rdi cmpq %r15, %rdi je 0x9de98 movq 0x48(%rsp), %rsi incq %rsi callq 0x196b0 jmp 0x9de98 movq %rax, %r14 leaq 0x28(%rsp), %rdi callq 0x2d98e leaq 0x8(%rsp), %rdi callq 0x2d98e jmp 0x9df15 movq %rax, %r14 leaq 0x38(%rsp), %rsi movq %r12, %rdi callq 0x1b1fa jmp 0x9df15 jmp 0x9dec6 jmp 0x9dec6 jmp 0x9dec6 movq %rax, %r14 addq $-0x10, %r13 movq -0x10(%r13), %rdi cmpq %rdi, %r13 je 0x9dee2 movq (%r13), %rsi incq %rsi callq 0x196b0 leaq -0x20(%r13), %rax addq $-0x10, %r13 cmpq %r12, %r13 movq %rax, %r13 jne 0x9decd jmp 0x9df15 jmp 0x9df12 movq %rax, %r14 movq 0x38(%rsp), %rdi cmpq %r15, %rdi je 0x9df15 movq 0x48(%rsp), %rsi incq %rsi callq 0x196b0 jmp 0x9df15 movq %rax, %r14 movq %rbx, %rdi callq 0x62f40 movq %r14, %rdi callq 0x19be0 movq %rax, %r14 movq 0x18(%rsp), %rax testq %rax, %rax je 0x9df15 leaq 0x8(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax jmp 0x9df15 movq %rax, %rdi callq 0x27a01
_ZL35common_chat_params_init_command_r7bRKN5minja13chat_templateERK18common_chat_inputs: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0E8h mov r14, rdx mov rbp, rsi mov rbx, rdi mov dword ptr [rdi], 0 xor r15d, r15d mov [rdi+8], r15b mov [rdi+10h], r15 lea rax, [rdi+28h] mov [rdi+18h], rax mov [rdi+20h], r15 mov [rdi+28h], r15b mov [rdi+38h], r15b xorps xmm0, xmm0 movups xmmword ptr [rdi+40h], xmm0 movups xmmword ptr [rdi+50h], xmm0 movups xmmword ptr [rdi+60h], xmm0 movups xmmword ptr [rdi+70h], xmm0 mov [rdi+80h], r15 lea rdi, [rdx+20h] lea rsi, aRequired; "required" call _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_ mov [rbx+38h], al lea rsi, [rsp+118h+var_110] mov [rsi+8], r15 mov [rsi], r14 lea rax, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL35common_chat_params_init_command_r7bRKN5minja13chat_templateERK18common_chat_inputsE3$_0E9_M_invokeERKSt9_Any_dataS2_; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_command_r7b(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_invoke(std::_Any_data const&,common_grammar_builder const&) mov [rsi+18h], rax lea rax, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL35common_chat_params_init_command_r7bRKN5minja13chat_templateERK18common_chat_inputsE3$_0E10_M_managerERSt9_Any_dataRKSD_St18_Manager_operation; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_command_r7b(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsi+10h], rax lea rdx, _ZL15grammar_options; grammar_options lea rdi, [rsp+118h+var_E0] call _Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options; build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&) lea rdi, [rbx+18h] lea r12, [rsp+118h+var_E0] mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r12]; void * lea r15, [rsp+118h+var_D0] cmp rdi, r15 jz short loc_9DC25 mov rsi, [rsp+118h+var_D0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9DC25: mov rax, [rsp+118h+var_100] test rax, rax jz short loc_9DC3E lea rdi, [rsp+118h+var_110] mov rsi, rdi mov edx, 3 call rax loc_9DC3E: lea rdi, [rsp+118h+var_E0] mov [rdi], r15 lea rsi, aEndThinkingSta+10h; "<|START_ACTION|>" lea rdx, aEndThinkingSta+20h; "" 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, [rbx+40h] lea rsi, [rsp+118h+var_E0] mov byte ptr [rsi+20h], 0 call _ZNSt6vectorI22common_grammar_triggerSaIS0_EE12emplace_backIJS0_EEERS0_DpOT_; std::vector<common_grammar_trigger>::emplace_back<common_grammar_trigger>(common_grammar_trigger &&) mov rdi, [rsp+118h+var_E0]; void * cmp rdi, r15 jz short loc_9DC82 mov rsi, [rsp+118h+var_D0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9DC82: lea r12, [rsp+118h+var_E0] mov [r12], r15 lea rsi, aStartResponse; "<|START_RESPONSE|>" lea rdx, aStartResponse+12h; "" mov rdi, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea r13, [rsp+118h+var_C0] lea rax, [rsp+118h+var_B0] mov [rax-10h], rax lea rsi, aEndResponse; "<|END_RESPONSE|>" lea rdx, aEndResponse+10h; "" mov rdi, 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) lea r13, [rsp+118h+var_A0] lea rax, [rsp+118h+var_90] mov [rax-10h], rax lea rsi, aStartThinking; "<|START_THINKING|>" lea rdx, aStartThinking+12h; "" mov rdi, 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) lea r13, [rsp+118h+var_80] lea rax, [rsp+118h+var_70] mov [rax-10h], rax lea rsi, aEndThinking; "<|END_THINKING|>" lea rdx, aEndThinking+10h; "" mov rdi, 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) lea r13, [rsp+118h+var_60] lea r15, [rsp+118h+var_50] mov [r15-10h], r15 lea rsi, aEndAction; "<|END_ACTION|>" lea rdx, aEndAction+0Eh; "" mov rdi, 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) lea rdi, [rbx+58h] lea r12, [rsp+118h+var_40] lea rsi, [rsp+118h+var_E0] mov rdx, r12 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE13_M_assign_auxIPKS5_EEvT_SB_St20forward_iterator_tag; std::vector<std::string>::_M_assign_aux<std::string const*>(std::string const*,std::string const*,std::forward_iterator_tag) mov r12, 0FFFFFFFFFFFFFF60h loc_9DD60: mov rdi, [r15-10h]; void * cmp r15, rdi jz short loc_9DD74 mov rsi, [r15] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9DD74: add r15, 0FFFFFFFFFFFFFFE0h add r12, 20h ; ' ' jnz short loc_9DD60 movzx eax, byte ptr [r14+10h] test eax, eax lea r15, [rsp+118h+var_D0] jz short loc_9DDB3 cmp eax, 2 jz short loc_9DD96 cmp eax, 1 jnz short loc_9DDA3 loc_9DD96: mov rax, [r14+18h] mov rcx, [rax] cmp rcx, [rax+8] jz short loc_9DDB3 loc_9DDA3: lea rsi, [r14+10h] lea rdi, [rsp+118h+var_110] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; 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>::basic_json(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&) jmp short loc_9DDC1 loc_9DDB3: mov [rsp+118h+var_110], 0 mov [rsp+118h+var_108], 0 loc_9DDC1: movzx r8d, byte ptr [r14+68h] lea r9, [rsp+118h+var_F0] mov byte ptr [r9], 0 mov qword ptr [r9+8], 0 mov [rsp+118h+var_118], 1 lea rdi, [rsp+118h+var_E0] lea rcx, [rsp+118h+var_110] mov rsi, rbp mov rdx, r14 call _ZNK5minja13chat_template5applyERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEESH_bSH_b; minja::chat_template::apply(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&,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&,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> const&,bool) lea rdi, [rsp+118h+var_40] lea rsi, [rsp+118h+var_E0] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_ mov al, [rbx+8] lea rdi, [rsp+118h+var_40] mov cl, [rdi] mov [rbx+8], cl mov [rdi], al mov rax, [rbx+10h] mov rcx, [rdi+8] mov [rbx+10h], rcx mov [rdi+8], rax 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, [rsp+118h+var_E0]; void * cmp rdi, r15 jz short loc_9DE43 mov rsi, [rsp+118h+var_D0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9DE43: lea rdi, [rsp+118h+var_F0] 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+118h+var_110] 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 dword ptr [rbx], 0Ah add rsp, 0E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp loc_9DF12 jmp loc_9DF43 mov r14, rax mov rdi, [rsp+118h+var_E0]; void * cmp rdi, r15 jz short loc_9DE98 mov rsi, [rsp+118h+var_D0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9DE98 mov r14, rax loc_9DE98: lea rdi, [rsp+118h+var_F0] 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+118h+var_110] 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() jmp short loc_9DF15 mov r14, rax lea rsi, [rsp+118h+var_E0] mov rdi, r12 call _ZL35common_chat_params_init_command_r7bRKN5minja13chat_templateERK18common_chat_inputs_cold_1; common_chat_params_init_command_r7b(minja::chat_template const&,common_chat_inputs const&) [clone] jmp short loc_9DF15 jmp short loc_9DEC6 jmp short loc_9DEC6 jmp short $+2 loc_9DEC6: mov r14, rax add r13, 0FFFFFFFFFFFFFFF0h loc_9DECD: mov rdi, [r13-10h]; void * cmp r13, rdi jz short loc_9DEE2 mov rsi, [r13+0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9DEE2: lea rax, [r13-20h] add r13, 0FFFFFFFFFFFFFFF0h cmp r13, r12 mov r13, rax jnz short loc_9DECD jmp short loc_9DF15 jmp short loc_9DF12 mov r14, rax mov rdi, [rsp+118h+var_E0]; void * cmp rdi, r15 jz short loc_9DF15 mov rsi, [rsp+118h+var_D0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9DF15 loc_9DF12: mov r14, rax loc_9DF15: mov rdi, rbx; this call _ZN18common_chat_paramsD2Ev; common_chat_params::~common_chat_params() mov rdi, r14 call __Unwind_Resume mov r14, rax mov rax, [rsp+118h+var_100] test rax, rax jz short loc_9DF15 lea rdi, [rsp+118h+var_110] mov rsi, rdi mov edx, 3 call rax jmp short loc_9DF15 loc_9DF43: mov rdi, rax call __clang_call_terminate
long long common_chat_params_init_command_r7b( const minja::chat_template *a1, const common_chat_inputs *a2, long long a3) { long long v5; // rcx int v6; // r8d int v7; // r9d _QWORD *v8; // r15 long long v9; // r12 _QWORD *v10; // rdi int v11; // eax int v12; // r8d char v13; // al long long v14; // rax long long result; // rax long long v16; // [rsp+8h] [rbp-110h] BYREF long long v17; // [rsp+10h] [rbp-108h] long long ( *v18)(); // [rsp+18h] [rbp-100h] long long ( *v19)(); // [rsp+20h] [rbp-F8h] _BYTE v20[8]; // [rsp+28h] [rbp-F0h] BYREF long long v21; // [rsp+30h] [rbp-E8h] void *v22[2]; // [rsp+38h] [rbp-E0h] BYREF _QWORD v23[2]; // [rsp+48h] [rbp-D0h] BYREF char *v24; // [rsp+58h] [rbp-C0h] BYREF char v25; // [rsp+68h] [rbp-B0h] BYREF char *v26; // [rsp+78h] [rbp-A0h] BYREF char v27; // [rsp+88h] [rbp-90h] BYREF char *v28; // [rsp+98h] [rbp-80h] BYREF char v29; // [rsp+A8h] [rbp-70h] BYREF _BYTE *v30; // [rsp+B8h] [rbp-60h] BYREF _BYTE v31[16]; // [rsp+C8h] [rbp-50h] BYREF char v32[8]; // [rsp+D8h] [rbp-40h] BYREF long long v33; // [rsp+E0h] [rbp-38h] *(_DWORD *)a1 = 0; *((_BYTE *)a1 + 8) = 0; *((_QWORD *)a1 + 2) = 0LL; *((_QWORD *)a1 + 3) = (char *)a1 + 40; *((_QWORD *)a1 + 4) = 0LL; *((_BYTE *)a1 + 40) = 0; *((_BYTE *)a1 + 56) = 0; *((_OWORD *)a1 + 4) = 0LL; *((_OWORD *)a1 + 5) = 0LL; *((_OWORD *)a1 + 6) = 0LL; *((_OWORD *)a1 + 7) = 0LL; *((_QWORD *)a1 + 16) = 0LL; *((_BYTE *)a1 + 56) = ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_( (unsigned __int8 *)(a3 + 32), (long long)"required", (__m128d)0LL); v17 = 0LL; v16 = a3; v19 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_command_r7b(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_invoke; v18 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_command_r7b(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_manager; build_grammar[abi:cxx11]((long long)v22, (long long)&v16, grammar_options, v5, v6, v7); std::string::operator=((char *)a1 + 24, v22); if ( v22[0] != v23 ) operator delete(v22[0], v23[0] + 1LL); if ( v18 ) ((void ( *)(long long *, long long *, long long))v18)(&v16, &v16, 3LL); v22[0] = v23; std::string::_M_construct<char const*>((long long)v22, "<|START_ACTION|>", (long long)""); LOBYTE(v24) = 0; std::vector<common_grammar_trigger>::emplace_back<common_grammar_trigger>((char *)a1 + 64); if ( v22[0] != v23 ) operator delete(v22[0], v23[0] + 1LL); v22[0] = v23; std::string::_M_construct<char const*>((long long)v22, "<|START_RESPONSE|>", (long long)""); v24 = &v25; std::string::_M_construct<char const*>((long long)&v24, "<|END_RESPONSE|>", (long long)""); v26 = &v27; std::string::_M_construct<char const*>((long long)&v26, "<|START_THINKING|>", (long long)""); v28 = &v29; std::string::_M_construct<char const*>((long long)&v28, "<|END_THINKING|>", (long long)""); v8 = v31; v30 = v31; std::string::_M_construct<char const*>((long long)&v30, "<|END_ACTION|>", (long long)""); std::vector<std::string>::_M_assign_aux<std::string const*>((char *)a1 + 88, v22, v32); v9 = -160LL; do { v10 = (_QWORD *)*(v8 - 2); if ( v8 != v10 ) operator delete(v10, *v8 + 1LL); v8 -= 4; v9 += 32LL; } while ( v9 ); v11 = *(unsigned __int8 *)(a3 + 16); if ( !*(_BYTE *)(a3 + 16) || (v11 == 2 || v11 == 1) && **(_QWORD **)(a3 + 24) == *(_QWORD *)(*(_QWORD *)(a3 + 24) + 8LL) ) { LOBYTE(v16) = 0; v17 = 0LL; } else { 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>::basic_json( (unsigned __int8 *)&v16, (unsigned __int8 *)(a3 + 16)); } v12 = *(unsigned __int8 *)(a3 + 104); v20[0] = 0; v21 = 0LL; minja::chat_template::apply((long long)v22, a2, (unsigned __int8 *)a3, (unsigned __int8 *)&v16, v12, v20, 1); ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_(v32); v13 = *((_BYTE *)a1 + 8); *((_BYTE *)a1 + 8) = v32[0]; v32[0] = v13; v14 = *((_QWORD *)a1 + 2); *((_QWORD *)a1 + 2) = v33; v33 = v14; 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(v32); if ( v22[0] != v23 ) operator delete(v22[0], v23[0] + 1LL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v20); result = 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(&v16); *(_DWORD *)a1 = 10; return result; }
common_chat_params_init_command_r7b: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xe8 MOV R14,RDX MOV RBP,RSI MOV RBX,RDI MOV dword ptr [RDI],0x0 XOR R15D,R15D MOV byte ptr [RDI + 0x8],R15B MOV qword ptr [RDI + 0x10],R15 LEA RAX,[RDI + 0x28] MOV qword ptr [RDI + 0x18],RAX MOV qword ptr [RDI + 0x20],R15 MOV byte ptr [RDI + 0x28],R15B MOV byte ptr [RDI + 0x38],R15B XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x40],XMM0 MOVUPS xmmword ptr [RDI + 0x50],XMM0 MOVUPS xmmword ptr [RDI + 0x60],XMM0 MOVUPS xmmword ptr [RDI + 0x70],XMM0 MOV qword ptr [RDI + 0x80],R15 LEA RDI,[RDX + 0x20] LEA RSI,[0x1b7d46] CALL 0x001879cd MOV byte ptr [RBX + 0x38],AL LEA RSI,[RSP + 0x8] MOV qword ptr [RSI + 0x8],R15 MOV qword ptr [RSI],R14 LEA RAX,[0x1ac076] MOV qword ptr [RSI + 0x18],RAX LEA RAX,[0x1ac8f6] MOV qword ptr [RSI + 0x10],RAX LAB_0019dbe8: LEA RDX,[0x1be594] LEA RDI,[RSP + 0x38] CALL 0x001324c8 LEA RDI,[RBX + 0x18] LEA R12,[RSP + 0x38] MOV RSI,R12 CALL 0x00119820 MOV RDI,qword ptr [R12] LEA R15,[RSP + 0x48] CMP RDI,R15 JZ 0x0019dc25 MOV RSI,qword ptr [RSP + 0x48] INC RSI CALL 0x001196b0 LAB_0019dc25: MOV RAX,qword ptr [RSP + 0x18] TEST RAX,RAX JZ 0x0019dc3e LAB_0019dc2f: LEA RDI,[RSP + 0x8] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_0019dc3e: LEA RDI,[RSP + 0x38] MOV qword ptr [RDI],R15 LAB_0019dc46: LEA RSI,[0x1bf680] LEA RDX,[0x1bf690] CALL 0x001320e8 LEA RDI,[RBX + 0x40] LEA RSI,[RSP + 0x38] MOV byte ptr [RSI + 0x20],0x0 LAB_0019dc66: CALL 0x001b0648 MOV RDI,qword ptr [RSP + 0x38] CMP RDI,R15 JZ 0x0019dc82 MOV RSI,qword ptr [RSP + 0x48] INC RSI CALL 0x001196b0 LAB_0019dc82: LEA R12,[RSP + 0x38] MOV qword ptr [R12],R15 LAB_0019dc8b: LEA RSI,[0x1bfb56] LEA RDX,[0x1bfb68] MOV RDI,R12 CALL 0x001320e8 LEA R13,[RSP + 0x58] LEA RAX,[RSP + 0x68] MOV qword ptr [RAX + -0x10],RAX LAB_0019dcaf: LEA RSI,[0x1bfb69] LEA RDX,[0x1bfb79] MOV RDI,R13 CALL 0x001320e8 LEA R13,[RSP + 0x78] LEA RAX,[RSP + 0x88] MOV qword ptr [RAX + -0x10],RAX LAB_0019dcd6: LEA RSI,[0x1bfb7a] LEA RDX,[0x1bfb8c] MOV RDI,R13 CALL 0x001320e8 LEA R13,[RSP + 0x98] LEA RAX,[RSP + 0xa8] MOV qword ptr [RAX + -0x10],RAX LAB_0019dd00: LEA RSI,[0x1bfb8d] LEA RDX,[0x1bfb9d] MOV RDI,R13 CALL 0x001320e8 LEA R13,[RSP + 0xb8] LEA R15,[RSP + 0xc8] MOV qword ptr [R15 + -0x10],R15 LAB_0019dd2a: LEA RSI,[0x1bfb9e] LEA RDX,[0x1bfbac] MOV RDI,R13 CALL 0x001320e8 LEA RDI,[RBX + 0x58] LEA R12,[RSP + 0xd8] LAB_0019dd4c: LEA RSI,[RSP + 0x38] MOV RDX,R12 CALL 0x001b0a50 MOV R12,-0xa0 LAB_0019dd60: MOV RDI,qword ptr [R15 + -0x10] CMP R15,RDI JZ 0x0019dd74 MOV RSI,qword ptr [R15] INC RSI CALL 0x001196b0 LAB_0019dd74: ADD R15,-0x20 ADD R12,0x20 JNZ 0x0019dd60 MOVZX EAX,byte ptr [R14 + 0x10] TEST EAX,EAX LEA R15,[RSP + 0x48] JZ 0x0019ddb3 CMP EAX,0x2 JZ 0x0019dd96 CMP EAX,0x1 JNZ 0x0019dda3 LAB_0019dd96: MOV RAX,qword ptr [R14 + 0x18] MOV RCX,qword ptr [RAX] CMP RCX,qword ptr [RAX + 0x8] JZ 0x0019ddb3 LAB_0019dda3: LEA RSI,[R14 + 0x10] LEA RDI,[RSP + 0x8] CALL 0x0012d4c2 JMP 0x0019ddc1 LAB_0019ddb3: MOV byte ptr [RSP + 0x8],0x0 MOV qword ptr [RSP + 0x10],0x0 LAB_0019ddc1: MOVZX R8D,byte ptr [R14 + 0x68] LEA R9,[RSP + 0x28] MOV byte ptr [R9],0x0 MOV qword ptr [R9 + 0x8],0x0 LAB_0019ddd7: MOV dword ptr [RSP],0x1 LEA RDI,[RSP + 0x38] LEA RCX,[RSP + 0x8] MOV RSI,RBP MOV RDX,R14 CALL 0x0018449a LAB_0019ddf3: LEA RDI,[RSP + 0xd8] LEA RSI,[RSP + 0x38] CALL 0x001559f2 LAB_0019de05: MOV AL,byte ptr [RBX + 0x8] LEA RDI,[RSP + 0xd8] MOV CL,byte ptr [RDI] MOV byte ptr [RBX + 0x8],CL MOV byte ptr [RDI],AL MOV RAX,qword ptr [RBX + 0x10] MOV RCX,qword ptr [RDI + 0x8] MOV qword ptr [RBX + 0x10],RCX MOV qword ptr [RDI + 0x8],RAX CALL 0x0012d98e MOV RDI,qword ptr [RSP + 0x38] CMP RDI,R15 JZ 0x0019de43 MOV RSI,qword ptr [RSP + 0x48] INC RSI CALL 0x001196b0 LAB_0019de43: LEA RDI,[RSP + 0x28] CALL 0x0012d98e LEA RDI,[RSP + 0x8] CALL 0x0012d98e MOV dword ptr [RBX],0xa ADD RSP,0xe8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_chat_params_init_command_r7b(minja::chat_template const&, common_chat_inputs const&) */ void common_chat_params_init_command_r7b(chat_template *param_1,common_chat_inputs *param_2) { char cVar1; int8 uVar2; chat_template cVar3; ulong in_RDX; long lVar4; long *plVar5; ulong local_110 [2]; code *local_100; code *local_f8; data local_f0 [8]; int8 local_e8; long *local_e0 [2]; long local_d0 [2]; int1 *local_c0 [2]; int1 local_b0 [16]; int1 *local_a0 [2]; int1 local_90 [16]; int1 *local_80 [2]; int1 local_70 [16]; long *local_60 [2]; long local_50 [2]; chat_template local_40 [8]; int8 local_38; *(int4 *)param_1 = 0; param_1[8] = (chat_template)0x0; *(int8 *)(param_1 + 0x10) = 0; *(chat_template **)(param_1 + 0x18) = param_1 + 0x28; *(int8 *)(param_1 + 0x20) = 0; param_1[0x28] = (chat_template)0x0; param_1[0x38] = (chat_template)0x0; *(int8 *)(param_1 + 0x40) = 0; *(int8 *)(param_1 + 0x48) = 0; *(int8 *)(param_1 + 0x50) = 0; *(int8 *)(param_1 + 0x58) = 0; *(int8 *)(param_1 + 0x60) = 0; *(int8 *)(param_1 + 0x68) = 0; *(int8 *)(param_1 + 0x70) = 0; *(int8 *)(param_1 + 0x78) = 0; *(int8 *)(param_1 + 0x80) = 0; cVar3 = (chat_template) _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_ (in_RDX + 0x20,"required"); param_1[0x38] = cVar3; local_110[1] = 0; local_f8 = std:: _Function_handler<void(common_grammar_builder_const&),common_chat_params_init_command_r7b(minja::chat_template_const&,common_chat_inputs_const&)::$_0> ::_M_invoke; local_100 = std:: _Function_handler<void(common_grammar_builder_const&),common_chat_params_init_command_r7b(minja::chat_template_const&,common_chat_inputs_const&)::$_0> ::_M_manager; /* try { // try from 0019dbe8 to 0019dbf8 has its CatchHandler @ 0019df25 */ local_110[0] = in_RDX; build_grammar_abi_cxx11_((function *)local_e0,(common_grammar_options *)local_110); std::__cxx11::string::operator=((string *)(param_1 + 0x18),(string *)local_e0); if (local_e0[0] != local_d0) { operator_delete(local_e0[0],local_d0[0] + 1); } if (local_100 != (code *)0x0) { /* try { // try from 0019dc2f to 0019dc3d has its CatchHandler @ 0019de74 */ (*local_100)(local_110,local_110,3); } local_e0[0] = local_d0; /* try { // try from 0019dc46 to 0019dc58 has its CatchHandler @ 0019df12 */ std::__cxx11::string::_M_construct<char_const*>(local_e0,"<|START_ACTION|>",""); local_c0[0] = (int1 *)((ulong)local_c0[0] & 0xffffffffffffff00); /* try { // try from 0019dc66 to 0019dc6a has its CatchHandler @ 0019def6 */ std::vector<common_grammar_trigger,std::allocator<common_grammar_trigger>>:: emplace_back<common_grammar_trigger> ((vector<common_grammar_trigger,std::allocator<common_grammar_trigger>> *) (param_1 + 0x40),(common_grammar_trigger *)local_e0); if (local_e0[0] != local_d0) { operator_delete(local_e0[0],local_d0[0] + 1); } local_e0[0] = local_d0; /* try { // try from 0019dc8b to 0019dca0 has its CatchHandler @ 0019def4 */ std::__cxx11::string::_M_construct<char_const*>(local_e0,"<|START_RESPONSE|>",""); local_c0[0] = local_b0; /* try { // try from 0019dcaf to 0019dcc4 has its CatchHandler @ 0019dec6 */ std::__cxx11::string::_M_construct<char_const*>(local_c0,"<|END_RESPONSE|>",""); local_a0[0] = local_90; /* try { // try from 0019dcd6 to 0019dceb has its CatchHandler @ 0019dec4 */ std::__cxx11::string::_M_construct<char_const*>(local_a0,"<|START_THINKING|>",""); local_80[0] = local_70; /* try { // try from 0019dd00 to 0019dd15 has its CatchHandler @ 0019dec2 */ std::__cxx11::string::_M_construct<char_const*>(local_80,"<|END_THINKING|>",""); plVar5 = local_50; local_60[0] = plVar5; /* try { // try from 0019dd2a to 0019dd3f has its CatchHandler @ 0019dec0 */ std::__cxx11::string::_M_construct<char_const*>(local_60,"<|END_ACTION|>",""); /* try { // try from 0019dd4c to 0019dd58 has its CatchHandler @ 0019deae */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: _M_assign_aux<std::__cxx11::string_const*>(param_1 + 0x58,local_e0,local_40); lVar4 = -0xa0; do { if (plVar5 != (long *)plVar5[-2]) { operator_delete((long *)plVar5[-2],*plVar5 + 1); } plVar5 = plVar5 + -4; lVar4 = lVar4 + 0x20; } while (lVar4 != 0); cVar1 = *(char *)(in_RDX + 0x10); if ((cVar1 == '\0') || (((cVar1 == '\x02' || (cVar1 == '\x01')) && (**(long **)(in_RDX + 0x18) == (*(long **)(in_RDX + 0x18))[1])))) { local_110[0] = local_110[0] & 0xffffffffffffff00; local_110[1] = 0; } else { /* try { // try from 0019dda3 to 0019ddb0 has its CatchHandler @ 0019de6f */ nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)local_110,(basic_json *)(in_RDX + 0x10)); } local_f0[0] = (data)0x0; local_e8 = 0; /* try { // try from 0019ddd7 to 0019ddf2 has its CatchHandler @ 0019de95 */ minja::chat_template::apply ((basic_json *)local_e0,(basic_json *)param_2,SUB81(in_RDX,0),(basic_json *)local_110, *(bool *)(in_RDX + 0x68)); /* try { // try from 0019ddf3 to 0019de04 has its CatchHandler @ 0019de79 */ _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_ (local_40,local_e0); cVar3 = param_1[8]; param_1[8] = local_40[0]; uVar2 = *(int8 *)(param_1 + 0x10); *(int8 *)(param_1 + 0x10) = local_38; local_40[0] = cVar3; local_38 = uVar2; 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((data *)local_40); if (local_e0[0] != local_d0) { operator_delete(local_e0[0],local_d0[0] + 1); } 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_f0); 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((data *)local_110); *(int4 *)param_1 = 10; return; }
16,859
rlp_decode
corpus-core[P]colibri-stateless/src/chains/eth/verifier/rlp.c
INTERNAL rlp_type_t rlp_decode(bytes_t* src, int index, bytes_t* target) { size_t pos = 0, src_idx = 0; for (; src_idx < src->len; src_idx++, pos++) { uint8_t c = src->data[src_idx]; if (c < 0x80) { if ((int) pos == index) return check_range(target, src, 1, src->data + src_idx, 1); } else if (c < 0xb8) { if ((int) pos == index) return check_range(target, src, c - 0x80, src->data + src_idx + 1, RLP_ITEM); src_idx += c - 0x80; } else if (c < 0xc0) { size_t len, n; for (len = 0, n = 0; n < (uint8_t) (c - 0xB7); n++) len |= (*(src->data + src_idx + 1 + n)) << (8 * ((c - 0xb7) - n - 1)); if ((int) pos == index) return check_range(target, src, len, src->data + src_idx + c - 0xb7 + 1, RLP_ITEM); src_idx += len + c - 0xb7; } else if (c < 0xf8) { size_t len = c - 0xc0; if ((int) pos == index) return check_range(target, src, len, src->data + src_idx + 1, RLP_LIST); src_idx += len; } else { size_t len = 0; for (size_t i = 0; i < (uint8_t) (c - 0xF7); i++) len |= (*(src->data + src_idx + 1 + i)) << (8 * ((c - 0xf7) - i - 1)); if ((int) pos == index) return check_range(target, src, len, src->data + src_idx + c - 0xf7 + 1, RLP_LIST); src_idx += len + c - 0xf7; } } if (index < 0) return src_idx == src->len ? (rlp_type_t) pos : RLP_OUT_OF_RANGE; return (src_idx > src->len) ? RLP_OUT_OF_RANGE : RLP_NOT_FOUND; }
O3
c
rlp_decode: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movl (%rdi), %r9d testq %r9, %r9 je 0x2d640 movq 0x8(%rdi), %rax xorl %r10d, %r10d xorl %r11d, %r11d leaq (%rax,%r11), %r8 movzbl (%rax,%r11), %ebx testb %bl, %bl js 0x2d55b cmpl %esi, %r10d jne 0x2d62f jmp 0x2d66b cmpb $-0x49, %bl ja 0x2d574 leal -0x80(%rbx), %ecx cmpl %esi, %r10d je 0x2d6a7 addq %rcx, %r11 jmp 0x2d62f cmpb $-0x41, %bl ja 0x2d5b0 leal -0xb7(%rbx), %ecx movzbl %cl, %r15d testl %r15d, %r15d je 0x2d5f9 leal -0x5c0(,%rbx,8), %ecx xorl %r12d, %r12d xorl %r14d, %r14d movzbl 0x1(%r8,%r12), %ebp shll %cl, %ebp movslq %ebp, %r13 orq %r13, %r14 incq %r12 addl $-0x8, %ecx cmpq %r12, %r15 jne 0x2d595 jmp 0x2d5fc cmpb $-0x8, %bl jae 0x2d5c5 leal -0xc0(%rbx), %ecx cmpl %esi, %r10d jne 0x2d56c jmp 0x2d726 movl %ebx, %r15d addl $0xffffff09, %r15d # imm = 0xFFFFFF09 je 0x2d616 leal -0x7c0(,%rbx,8), %ecx xorl %r12d, %r12d xorl %r14d, %r14d movzbl 0x1(%r8,%r12), %ebp shll %cl, %ebp movslq %ebp, %r13 orq %r13, %r14 incq %r12 addl $-0x8, %ecx cmpq %r12, %r15 jne 0x2d5de jmp 0x2d619 xorl %r14d, %r14d movl %ebx, %ecx cmpl %esi, %r10d je 0x2d6e3 addq %rcx, %r11 addq %r14, %r11 addq $-0xb7, %r11 jmp 0x2d62f xorl %r14d, %r14d cmpl %esi, %r10d je 0x2d756 addq %rbx, %r11 addq %r14, %r11 addq $-0xf7, %r11 incq %r11 incq %r10 cmpq %r9, %r11 jb 0x2d540 jmp 0x2d646 xorl %r11d, %r11d xorl %r10d, %r10d testl %esi, %esi js 0x2d65a xorl %eax, %eax cmpq %r9, %r11 seta %al orl $-0x2, %eax jmp 0x2d792 cmpq %r9, %r11 movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmovel %r10d, %eax jmp 0x2d792 movl $0xffffffff, %eax # imm = 0xFFFFFFFF testq %rdx, %rdx je 0x2d792 movl $0x1, (%rdx) movq %r8, 0x8(%rdx) movq 0x8(%rdi), %rcx cmpq %r8, %rcx ja 0x2d792 incq %r8 movl (%rdi), %eax addq %rax, %rcx xorl %eax, %eax cmpq %r8, %rcx sbbl %eax, %eax orl $0x1, %eax jmp 0x2d792 movl $0xffffffff, %eax # imm = 0xFFFFFFFF testq %rdx, %rdx je 0x2d792 incq %r8 movl %ecx, (%rdx) movq %r8, 0x8(%rdx) movq 0x8(%rdi), %rdx cmpq %r8, %rdx ja 0x2d792 addq %rcx, %r8 cmpq %rdx, %r8 jb 0x2d792 movl (%rdi), %eax addq %rax, %rdx xorl %eax, %eax cmpq %r8, %rdx jmp 0x2d69d movl $0xffffffff, %eax # imm = 0xFFFFFFFF testq %rdx, %rdx je 0x2d792 addq %r8, %rcx addq $-0xb6, %rcx movl %r14d, (%rdx) movq %rcx, 0x8(%rdx) movq 0x8(%rdi), %rdx cmpq %rcx, %rdx ja 0x2d792 addq %r14, %rcx cmpq %rdx, %rcx jb 0x2d792 movl (%rdi), %eax addq %rax, %rdx xorl %eax, %eax cmpq %rcx, %rdx jmp 0x2d69d movl $0xffffffff, %eax # imm = 0xFFFFFFFF testq %rdx, %rdx je 0x2d792 incq %r8 movl %ecx, (%rdx) movq %r8, 0x8(%rdx) movq 0x8(%rdi), %rdx cmpq %r8, %rdx ja 0x2d792 addq %rcx, %r8 cmpq %rdx, %r8 jb 0x2d792 movl (%rdi), %eax addq %rax, %rdx xorl %eax, %eax cmpq %r8, %rdx jmp 0x2d78d movl $0xffffffff, %eax # imm = 0xFFFFFFFF testq %rdx, %rdx je 0x2d792 leaq (%r8,%rbx), %rcx addq $-0xf6, %rcx movl %r14d, (%rdx) movq %rcx, 0x8(%rdx) movq 0x8(%rdi), %rdx cmpq %rcx, %rdx ja 0x2d792 addq %r14, %rcx cmpq %rdx, %rcx jb 0x2d792 movl (%rdi), %eax addq %rax, %rdx xorl %eax, %eax cmpq %rcx, %rdx sbbl %eax, %eax orl $0x2, %eax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
rlp_decode: push rbp push r15 push r14 push r13 push r12 push rbx mov r9d, [rdi] test r9, r9 jz loc_2D640 mov rax, [rdi+8] xor r10d, r10d xor r11d, r11d loc_2D540: lea r8, [rax+r11] movzx ebx, byte ptr [rax+r11] test bl, bl js short loc_2D55B cmp r10d, esi jnz loc_2D62F jmp loc_2D66B loc_2D55B: cmp bl, 0B7h ja short loc_2D574 lea ecx, [rbx-80h] cmp r10d, esi jz loc_2D6A7 loc_2D56C: add r11, rcx jmp loc_2D62F loc_2D574: cmp bl, 0BFh ja short loc_2D5B0 lea ecx, [rbx-0B7h] movzx r15d, cl test r15d, r15d jz short loc_2D5F9 lea ecx, ds:0FFFFFFFFFFFFFA40h[rbx*8] xor r12d, r12d xor r14d, r14d loc_2D595: movzx ebp, byte ptr [r8+r12+1] shl ebp, cl movsxd r13, ebp or r14, r13 inc r12 add ecx, 0FFFFFFF8h cmp r15, r12 jnz short loc_2D595 jmp short loc_2D5FC loc_2D5B0: cmp bl, 0F8h jnb short loc_2D5C5 lea ecx, [rbx-0C0h] cmp r10d, esi jnz short loc_2D56C jmp loc_2D726 loc_2D5C5: mov r15d, ebx add r15d, 0FFFFFF09h jz short loc_2D616 lea ecx, ds:0FFFFFFFFFFFFF840h[rbx*8] xor r12d, r12d xor r14d, r14d loc_2D5DE: movzx ebp, byte ptr [r8+r12+1] shl ebp, cl movsxd r13, ebp or r14, r13 inc r12 add ecx, 0FFFFFFF8h cmp r15, r12 jnz short loc_2D5DE jmp short loc_2D619 loc_2D5F9: xor r14d, r14d loc_2D5FC: mov ecx, ebx cmp r10d, esi jz loc_2D6E3 add r11, rcx add r11, r14 add r11, 0FFFFFFFFFFFFFF49h jmp short loc_2D62F loc_2D616: xor r14d, r14d loc_2D619: cmp r10d, esi jz loc_2D756 add r11, rbx add r11, r14 add r11, 0FFFFFFFFFFFFFF09h loc_2D62F: inc r11 inc r10 cmp r11, r9 jb loc_2D540 jmp short loc_2D646 loc_2D640: xor r11d, r11d xor r10d, r10d loc_2D646: test esi, esi js short loc_2D65A xor eax, eax cmp r11, r9 setnbe al or eax, 0FFFFFFFEh jmp loc_2D792 loc_2D65A: cmp r11, r9 mov eax, 0FFFFFFFFh cmovz eax, r10d jmp loc_2D792 loc_2D66B: mov eax, 0FFFFFFFFh test rdx, rdx jz loc_2D792 mov dword ptr [rdx], 1 mov [rdx+8], r8 mov rcx, [rdi+8] cmp rcx, r8 ja loc_2D792 inc r8 mov eax, [rdi] add rcx, rax xor eax, eax cmp rcx, r8 loc_2D69D: sbb eax, eax or eax, 1 jmp loc_2D792 loc_2D6A7: mov eax, 0FFFFFFFFh test rdx, rdx jz loc_2D792 inc r8 mov [rdx], ecx mov [rdx+8], r8 mov rdx, [rdi+8] cmp rdx, r8 ja loc_2D792 add r8, rcx cmp r8, rdx jb loc_2D792 mov eax, [rdi] add rdx, rax xor eax, eax cmp rdx, r8 jmp short loc_2D69D loc_2D6E3: mov eax, 0FFFFFFFFh test rdx, rdx jz loc_2D792 add rcx, r8 add rcx, 0FFFFFFFFFFFFFF4Ah mov [rdx], r14d mov [rdx+8], rcx mov rdx, [rdi+8] cmp rdx, rcx ja loc_2D792 add rcx, r14 cmp rcx, rdx jb short loc_2D792 mov eax, [rdi] add rdx, rax xor eax, eax cmp rdx, rcx jmp loc_2D69D loc_2D726: mov eax, 0FFFFFFFFh test rdx, rdx jz short loc_2D792 inc r8 mov [rdx], ecx mov [rdx+8], r8 mov rdx, [rdi+8] cmp rdx, r8 ja short loc_2D792 add r8, rcx cmp r8, rdx jb short loc_2D792 mov eax, [rdi] add rdx, rax xor eax, eax cmp rdx, r8 jmp short loc_2D78D loc_2D756: mov eax, 0FFFFFFFFh test rdx, rdx jz short loc_2D792 lea rcx, [r8+rbx] add rcx, 0FFFFFFFFFFFFFF0Ah mov [rdx], r14d mov [rdx+8], rcx mov rdx, [rdi+8] cmp rdx, rcx ja short loc_2D792 add rcx, r14 cmp rcx, rdx jb short loc_2D792 mov eax, [rdi] add rdx, rax xor eax, eax cmp rdx, rcx loc_2D78D: sbb eax, eax or eax, 2 loc_2D792: pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long rlp_decode(unsigned int *a1, int a2, long long a3) { unsigned long long v3; // r9 long long v4; // rax unsigned int v5; // r10d unsigned long long v6; // r11 unsigned long long v7; // r8 long long v8; // rbx long long v9; // rcx int v10; // ecx long long v11; // r12 unsigned long long v12; // r14 int v13; // ecx long long v14; // r12 unsigned long long v15; // r14 long long result; // rax unsigned long long v17; // rcx bool v18; // cf unsigned long long v19; // r8 unsigned long long v20; // rdx unsigned long long v21; // r8 unsigned long long v22; // rcx unsigned long long v23; // rdx unsigned long long v24; // rcx unsigned long long v25; // r8 unsigned long long v26; // rdx unsigned long long v27; // r8 bool v28; // cf unsigned long long v29; // rcx unsigned long long v30; // rdx unsigned long long v31; // rcx v3 = *a1; if ( !*a1 ) { v6 = 0LL; v5 = 0; LABEL_26: if ( a2 >= 0 ) return (v6 > v3) | 0xFFFFFFFE; result = 0xFFFFFFFFLL; if ( v6 == v3 ) return v5; return result; } v4 = *((_QWORD *)a1 + 1); v5 = 0; v6 = 0LL; while ( 1 ) { v7 = v4 + v6; v8 = *(unsigned __int8 *)(v4 + v6); if ( (v8 & 0x80u) == 0LL ) { if ( v5 == a2 ) { result = 0xFFFFFFFFLL; if ( !a3 ) return result; *(_DWORD *)a3 = 1; *(_QWORD *)(a3 + 8) = v7; v17 = *((_QWORD *)a1 + 1); if ( v17 > v7 ) return result; v18 = *a1 + v17 < v7 + 1; return v18 ? -1 : 1; } goto LABEL_23; } if ( (unsigned __int8)v8 <= 0xB7u ) { v9 = (unsigned int)(v8 - 128); if ( v5 == a2 ) { result = 0xFFFFFFFFLL; if ( !a3 ) return result; v19 = v7 + 1; *(_DWORD *)a3 = v9; *(_QWORD *)(a3 + 8) = v19; v20 = *((_QWORD *)a1 + 1); if ( v20 > v19 ) return result; v21 = v9 + v19; if ( v21 < v20 ) return result; v18 = *a1 + v20 < v21; return v18 ? -1 : 1; } goto LABEL_8; } if ( (unsigned __int8)v8 > 0xBFu ) break; v10 = 8 * v8 - 1472; v11 = 0LL; v12 = 0LL; do { v12 |= *(unsigned __int8 *)(v7 + v11++ + 1) << v10; v10 -= 8; } while ( (unsigned __int8)(v8 + 73) != v11 ); if ( v5 == a2 ) { result = 0xFFFFFFFFLL; if ( !a3 ) return result; v22 = v7 + (unsigned int)v8 - 182; *(_DWORD *)a3 = v12; *(_QWORD *)(a3 + 8) = v22; v23 = *((_QWORD *)a1 + 1); if ( v23 > v22 ) return result; v24 = v12 + v22; if ( v24 < v23 ) return result; v18 = *a1 + v23 < v24; return v18 ? -1 : 1; } v6 = v12 + *(unsigned __int8 *)(v4 + v6) + v6 - 183; LABEL_23: ++v6; ++v5; if ( v6 >= v3 ) goto LABEL_26; } if ( (unsigned __int8)v8 < 0xF8u ) { v9 = (unsigned int)(v8 - 192); if ( v5 == a2 ) { result = 0xFFFFFFFFLL; if ( a3 ) { v25 = v7 + 1; *(_DWORD *)a3 = v9; *(_QWORD *)(a3 + 8) = v25; v26 = *((_QWORD *)a1 + 1); if ( v26 <= v25 ) { v27 = v9 + v25; if ( v27 >= v26 ) { v28 = *a1 + v26 < v27; return v28 ? -1 : 2; } } } return result; } LABEL_8: v6 += v9; goto LABEL_23; } v13 = 8 * v8 - 1984; v14 = 0LL; v15 = 0LL; do { v15 |= *(unsigned __int8 *)(v7 + v14++ + 1) << v13; v13 -= 8; } while ( (_DWORD)v8 - 247 != v14 ); if ( v5 != a2 ) { v6 = v15 + v8 + v6 - 247; goto LABEL_23; } result = 0xFFFFFFFFLL; if ( a3 ) { v29 = v7 + v8 - 246; *(_DWORD *)a3 = v15; *(_QWORD *)(a3 + 8) = v29; v30 = *((_QWORD *)a1 + 1); if ( v30 <= v29 ) { v31 = v15 + v29; if ( v31 >= v30 ) { v28 = *a1 + v30 < v31; return v28 ? -1 : 2; } } } return result; }
rlp_decode: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R9D,dword ptr [RDI] TEST R9,R9 JZ 0x0012d640 MOV RAX,qword ptr [RDI + 0x8] XOR R10D,R10D XOR R11D,R11D LAB_0012d540: LEA R8,[RAX + R11*0x1] MOVZX EBX,byte ptr [RAX + R11*0x1] TEST BL,BL JS 0x0012d55b CMP R10D,ESI JNZ 0x0012d62f JMP 0x0012d66b LAB_0012d55b: CMP BL,0xb7 JA 0x0012d574 LEA ECX,[RBX + -0x80] CMP R10D,ESI JZ 0x0012d6a7 LAB_0012d56c: ADD R11,RCX JMP 0x0012d62f LAB_0012d574: CMP BL,0xbf JA 0x0012d5b0 LEA ECX,[RBX + -0xb7] MOVZX R15D,CL TEST R15D,R15D JZ 0x0012d5f9 LEA ECX,[-0x5c0 + RBX*0x8] XOR R12D,R12D XOR R14D,R14D LAB_0012d595: MOVZX EBP,byte ptr [R8 + R12*0x1 + 0x1] SHL EBP,CL MOVSXD R13,EBP OR R14,R13 INC R12 ADD ECX,-0x8 CMP R15,R12 JNZ 0x0012d595 JMP 0x0012d5fc LAB_0012d5b0: CMP BL,0xf8 JNC 0x0012d5c5 LEA ECX,[RBX + -0xc0] CMP R10D,ESI JNZ 0x0012d56c JMP 0x0012d726 LAB_0012d5c5: MOV R15D,EBX ADD R15D,0xffffff09 JZ 0x0012d616 LEA ECX,[-0x7c0 + RBX*0x8] XOR R12D,R12D XOR R14D,R14D LAB_0012d5de: MOVZX EBP,byte ptr [R8 + R12*0x1 + 0x1] SHL EBP,CL MOVSXD R13,EBP OR R14,R13 INC R12 ADD ECX,-0x8 CMP R15,R12 JNZ 0x0012d5de JMP 0x0012d619 LAB_0012d5f9: XOR R14D,R14D LAB_0012d5fc: MOV ECX,EBX CMP R10D,ESI JZ 0x0012d6e3 ADD R11,RCX ADD R11,R14 ADD R11,-0xb7 JMP 0x0012d62f LAB_0012d616: XOR R14D,R14D LAB_0012d619: CMP R10D,ESI JZ 0x0012d756 ADD R11,RBX ADD R11,R14 ADD R11,-0xf7 LAB_0012d62f: INC R11 INC R10 CMP R11,R9 JC 0x0012d540 JMP 0x0012d646 LAB_0012d640: XOR R11D,R11D XOR R10D,R10D LAB_0012d646: TEST ESI,ESI JS 0x0012d65a XOR EAX,EAX CMP R11,R9 SETA AL OR EAX,0xfffffffe JMP 0x0012d792 LAB_0012d65a: CMP R11,R9 MOV EAX,0xffffffff CMOVZ EAX,R10D JMP 0x0012d792 LAB_0012d66b: MOV EAX,0xffffffff TEST RDX,RDX JZ 0x0012d792 MOV dword ptr [RDX],0x1 MOV qword ptr [RDX + 0x8],R8 MOV RCX,qword ptr [RDI + 0x8] CMP RCX,R8 JA 0x0012d792 INC R8 MOV EAX,dword ptr [RDI] ADD RCX,RAX XOR EAX,EAX CMP RCX,R8 LAB_0012d69d: SBB EAX,EAX OR EAX,0x1 JMP 0x0012d792 LAB_0012d6a7: MOV EAX,0xffffffff TEST RDX,RDX JZ 0x0012d792 INC R8 MOV dword ptr [RDX],ECX MOV qword ptr [RDX + 0x8],R8 MOV RDX,qword ptr [RDI + 0x8] CMP RDX,R8 JA 0x0012d792 ADD R8,RCX CMP R8,RDX JC 0x0012d792 MOV EAX,dword ptr [RDI] ADD RDX,RAX XOR EAX,EAX CMP RDX,R8 JMP 0x0012d69d LAB_0012d6e3: MOV EAX,0xffffffff TEST RDX,RDX JZ 0x0012d792 ADD RCX,R8 ADD RCX,-0xb6 MOV dword ptr [RDX],R14D MOV qword ptr [RDX + 0x8],RCX MOV RDX,qword ptr [RDI + 0x8] CMP RDX,RCX JA 0x0012d792 ADD RCX,R14 CMP RCX,RDX JC 0x0012d792 MOV EAX,dword ptr [RDI] ADD RDX,RAX XOR EAX,EAX CMP RDX,RCX JMP 0x0012d69d LAB_0012d726: MOV EAX,0xffffffff TEST RDX,RDX JZ 0x0012d792 INC R8 MOV dword ptr [RDX],ECX MOV qword ptr [RDX + 0x8],R8 MOV RDX,qword ptr [RDI + 0x8] CMP RDX,R8 JA 0x0012d792 ADD R8,RCX CMP R8,RDX JC 0x0012d792 MOV EAX,dword ptr [RDI] ADD RDX,RAX XOR EAX,EAX CMP RDX,R8 JMP 0x0012d78d LAB_0012d756: MOV EAX,0xffffffff TEST RDX,RDX JZ 0x0012d792 LEA RCX,[R8 + RBX*0x1] ADD RCX,-0xf6 MOV dword ptr [RDX],R14D MOV qword ptr [RDX + 0x8],RCX MOV RDX,qword ptr [RDI + 0x8] CMP RDX,RCX JA 0x0012d792 ADD RCX,R14 CMP RCX,RDX JC 0x0012d792 MOV EAX,dword ptr [RDI] ADD RDX,RAX XOR EAX,EAX CMP RDX,RCX LAB_0012d78d: SBB EAX,EAX OR EAX,0x2 LAB_0012d792: POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
uint rlp_decode(uint *param_1,uint param_2,uint *param_3) { byte bVar1; byte bVar2; uint uVar3; ulong uVar4; ulong uVar5; uint uVar6; ulong uVar7; ulong uVar8; ulong uVar9; uint uVar10; bool bVar11; uVar5 = (ulong)*param_1; if (uVar5 == 0) { uVar7 = 0; uVar6 = 0; } else { uVar6 = 0; uVar7 = 0; do { uVar4 = *(long *)(param_1 + 2) + uVar7; bVar1 = *(byte *)(*(long *)(param_1 + 2) + uVar7); if ((char)bVar1 < '\0') { if (bVar1 < 0xb8) { uVar9 = (ulong)(bVar1 - 0x80); if (uVar6 == param_2) { if (param_3 == (uint *)0x0) { return 0xffffffff; } uVar4 = uVar4 + 1; *param_3 = bVar1 - 0x80; *(ulong *)(param_3 + 2) = uVar4; uVar5 = *(ulong *)(param_1 + 2); if (uVar4 < uVar5) { return 0xffffffff; } if (uVar4 + uVar9 < uVar5) { return 0xffffffff; } bVar11 = uVar5 + *param_1 < uVar4 + uVar9; goto LAB_0012d69d; } LAB_0012d56c: uVar7 = uVar7 + uVar9; } else { uVar3 = (uint)bVar1; if (bVar1 < 0xc0) { uVar10 = bVar1 - 0xb7 & 0xff; if (uVar10 == 0) { uVar9 = 0; } else { bVar1 = bVar1 * '\b' + 0x40; uVar8 = 0; uVar9 = 0; do { uVar9 = uVar9 | (long)(int)((uint)*(byte *)(uVar4 + 1 + uVar8) << (bVar1 & 0x1f)); uVar8 = uVar8 + 1; bVar1 = bVar1 - 8; } while (uVar10 != uVar8); } if (uVar6 == param_2) { if (param_3 == (uint *)0x0) { return 0xffffffff; } uVar7 = (uVar3 + uVar4) - 0xb6; *param_3 = (uint)uVar9; *(ulong *)(param_3 + 2) = uVar7; uVar5 = *(ulong *)(param_1 + 2); if (uVar7 < uVar5) { return 0xffffffff; } if (uVar7 + uVar9 < uVar5) { return 0xffffffff; } bVar11 = uVar5 + *param_1 < uVar7 + uVar9; goto LAB_0012d69d; } uVar7 = (uVar7 + uVar3 + uVar9) - 0xb7; } else { if (bVar1 < 0xf8) { uVar9 = (ulong)(bVar1 - 0xc0); if (uVar6 == param_2) { if (param_3 == (uint *)0x0) { return 0xffffffff; } uVar4 = uVar4 + 1; *param_3 = bVar1 - 0xc0; *(ulong *)(param_3 + 2) = uVar4; uVar5 = *(ulong *)(param_1 + 2); if (uVar4 < uVar5) { return 0xffffffff; } if (uVar4 + uVar9 < uVar5) { return 0xffffffff; } bVar11 = uVar5 + *param_1 < uVar4 + uVar9; LAB_0012d78d: return -(uint)bVar11 | 2; } goto LAB_0012d56c; } if (uVar3 - 0xf7 == 0) { uVar9 = 0; } else { bVar2 = bVar1 * '\b' + 0x40; uVar8 = 0; uVar9 = 0; do { uVar9 = uVar9 | (long)(int)((uint)*(byte *)(uVar4 + 1 + uVar8) << (bVar2 & 0x1f)); uVar8 = uVar8 + 1; bVar2 = bVar2 - 8; } while (uVar3 - 0xf7 != uVar8); } if (uVar6 == param_2) { if (param_3 == (uint *)0x0) { return 0xffffffff; } uVar7 = (uVar4 + bVar1) - 0xf6; *param_3 = (uint)uVar9; *(ulong *)(param_3 + 2) = uVar7; uVar5 = *(ulong *)(param_1 + 2); if (uVar7 < uVar5) { return 0xffffffff; } if (uVar7 + uVar9 < uVar5) { return 0xffffffff; } bVar11 = uVar5 + *param_1 < uVar7 + uVar9; goto LAB_0012d78d; } uVar7 = (uVar7 + bVar1 + uVar9) - 0xf7; } } } else if (uVar6 == param_2) { if (param_3 == (uint *)0x0) { return 0xffffffff; } *param_3 = 1; *(ulong *)(param_3 + 2) = uVar4; if (uVar4 < *(ulong *)(param_1 + 2)) { return 0xffffffff; } bVar11 = *(ulong *)(param_1 + 2) + (ulong)*param_1 < uVar4 + 1; LAB_0012d69d: return -(uint)bVar11 | 1; } uVar7 = uVar7 + 1; uVar6 = uVar6 + 1; } while (uVar7 < uVar5); } if ((int)param_2 < 0) { uVar3 = 0xffffffff; if (uVar7 == uVar5) { uVar3 = uVar6; } } else { uVar3 = uVar5 < uVar7 | 0xfffffffe; } return uVar3; }
16,860
normalize_dirname
eloqsql/mysys/mf_pack.c
size_t normalize_dirname(char *to, const char *from) { size_t length; char buff[FN_REFLEN + 1]; DBUG_ENTER("normalize_dirname"); /* Despite the name, this actually converts the name to the system's format (TODO: name this properly). */ (void) intern_filename(buff, from); length= strlen(buff); /* Fix that '/' is last */ if (length && #ifdef FN_DEVCHAR buff[length - 1] != FN_DEVCHAR && #endif buff[length - 1] != FN_LIBCHAR && buff[length - 1] != '/') { /* we need reserve 2 bytes for the trailing slash and the zero */ if (length >= sizeof (buff) - 1) length= sizeof (buff) - 2; buff[length]= FN_LIBCHAR; buff[length + 1]= '\0'; } length=cleanup_dirname(to, buff); DBUG_RETURN(length); }
O3
c
normalize_dirname: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x210, %rsp # imm = 0x210 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x18(%rbp) leaq -0x220(%rbp), %r14 movq %r14, %rdi callq 0xa2845 movq %r14, %rdi callq 0x2a330 testq %rax, %rax je 0xa2b9b cmpb $0x2f, -0x1(%rax,%r14) je 0xa2b9b movl $0x1ff, %ecx # imm = 0x1FF cmpq %rcx, %rax cmovbq %rax, %rcx movw $0x2f, -0x220(%rbp,%rcx) leaq -0x220(%rbp), %rsi movq %rbx, %rdi callq 0xa28db movq %fs:0x28, %rcx cmpq -0x18(%rbp), %rcx jne 0xa2bc5 addq $0x210, %rsp # imm = 0x210 popq %rbx popq %r14 popq %rbp retq callq 0x2a250
normalize_dirname: push rbp mov rbp, rsp push r14 push rbx sub rsp, 210h mov rbx, rdi mov rax, fs:28h mov [rbp+var_18], rax lea r14, [rbp+var_220] mov rdi, r14 call intern_filename mov rdi, r14 call _strlen test rax, rax jz short loc_A2B9B cmp byte ptr [rax+r14-1], 2Fh ; '/' jz short loc_A2B9B mov ecx, 1FFh cmp rax, rcx cmovb rcx, rax mov [rbp+rcx+var_220], 2Fh ; '/' loc_A2B9B: lea rsi, [rbp+var_220] mov rdi, rbx call cleanup_dirname mov rcx, fs:28h cmp rcx, [rbp+var_18] jnz short loc_A2BC5 add rsp, 210h pop rbx pop r14 pop rbp retn loc_A2BC5: call ___stack_chk_fail
long long normalize_dirname(long long a1, _BYTE *a2) { unsigned long long v2; // rax long long v3; // rcx unsigned __int8 v5[520]; // [rsp+0h] [rbp-220h] BYREF unsigned long long v6; // [rsp+208h] [rbp-18h] v6 = __readfsqword(0x28u); intern_filename((long long)v5, a2); v2 = strlen(v5); if ( v2 && v5[v2 - 1] != 47 ) { v3 = 511LL; if ( v2 < 0x1FF ) v3 = v2; *(_WORD *)&v5[v3] = 47; } return cleanup_dirname(a1, v5); }
normalize_dirname: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x210 MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX LEA R14,[RBP + -0x220] MOV RDI,R14 CALL 0x001a2845 MOV RDI,R14 CALL 0x0012a330 TEST RAX,RAX JZ 0x001a2b9b CMP byte ptr [RAX + R14*0x1 + -0x1],0x2f JZ 0x001a2b9b MOV ECX,0x1ff CMP RAX,RCX CMOVC RCX,RAX MOV word ptr [RBP + RCX*0x1 + -0x220],0x2f LAB_001a2b9b: LEA RSI,[RBP + -0x220] MOV RDI,RBX CALL 0x001a28db MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x18] JNZ 0x001a2bc5 ADD RSP,0x210 POP RBX POP R14 POP RBP RET LAB_001a2bc5: CALL 0x0012a250
void normalize_dirname(int8 param_1) { size_t sVar1; size_t sVar2; long in_FS_OFFSET; int8 uStack_230; char local_228 [520]; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); uStack_230 = (code *)0x1a2b70; intern_filename(local_228); uStack_230 = (code *)0x1a2b78; sVar1 = strlen(local_228); if ((sVar1 != 0) && (local_228[sVar1 - 1] != '/')) { sVar2 = 0x1ff; if (sVar1 < 0x1ff) { sVar2 = sVar1; } (local_228 + sVar2)[0] = '/'; (local_228 + sVar2)[1] = '\0'; } uStack_230 = (code *)0x1a2baa; cleanup_dirname(param_1,local_228); if (*(long *)(in_FS_OFFSET + 0x28) == local_20) { return; } /* WARNING: Subroutine does not return */ uStack_230 = unpack_dirname; __stack_chk_fail(); }
16,861
str_append
bluesky950520[P]quickjs/run-test262.c
char *str_append(char **pp, const char *sep, const char *str) { char *res, *p; size_t len = 0; p = *pp; if (p) { len = strlen(p) + strlen(sep); } res = malloc(len + strlen(str) + 1); if (p) { strcpy(res, p); strcat(res, sep); } strcpy(res + len, str); free(p); return *pp = res; }
O1
c
str_append: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %rbx movq (%rdi), %r14 testq %r14, %r14 je 0x13f06 movq %r14, %rdi callq 0xe270 movq %rax, %rbp movq %r12, %rdi callq 0xe270 movq %rax, %r13 addq %rbp, %r13 jmp 0x13f09 xorl %r13d, %r13d movq %r15, %rdi callq 0xe270 leaq (%rax,%r13), %rdi incq %rdi callq 0xe6d0 movq %rax, %rbp testq %r14, %r14 je 0x13f3b movq %rbp, %rdi movq %r14, %rsi callq 0xe110 movq %rbp, %rdi movq %r12, %rsi callq 0xe910 movq %rbp, %rdi addq %r13, %rdi movq %r15, %rsi callq 0xe110 movq %r14, %rdi callq 0xe060 movq %rbp, (%rbx) movq %rbp, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
str_append: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r15, rdx mov r12, rsi mov rbx, rdi mov r14, [rdi] test r14, r14 jz short loc_13F06 mov rdi, r14 call _strlen mov rbp, rax mov rdi, r12 call _strlen mov r13, rax add r13, rbp jmp short loc_13F09 loc_13F06: xor r13d, r13d loc_13F09: mov rdi, r15 call _strlen lea rdi, [rax+r13] inc rdi call _malloc mov rbp, rax test r14, r14 jz short loc_13F3B mov rdi, rbp mov rsi, r14 call _strcpy mov rdi, rbp mov rsi, r12 call _strcat loc_13F3B: mov rdi, rbp add rdi, r13 mov rsi, r15 call _strcpy mov rdi, r14 call _free mov [rbx], rbp mov rax, rbp add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long str_append(long long *a1, long long a2, long long a3) { long long v4; // r14 long long v5; // rbp long long v6; // r13 long long v7; // rax long long v8; // rax long long v9; // rbp v4 = *a1; if ( *a1 ) { v5 = strlen(*a1); v6 = v5 + strlen(a2); } else { v6 = 0LL; } v7 = strlen(a3); v8 = malloc(v7 + v6 + 1); v9 = v8; if ( v4 ) { strcpy(v8, v4); strcat(v9, a2); } strcpy(v6 + v9, a3); free(v4); *a1 = v9; return v9; }
str_append: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R15,RDX MOV R12,RSI MOV RBX,RDI MOV R14,qword ptr [RDI] TEST R14,R14 JZ 0x00113f06 MOV RDI,R14 CALL 0x0010e270 MOV RBP,RAX MOV RDI,R12 CALL 0x0010e270 MOV R13,RAX ADD R13,RBP JMP 0x00113f09 LAB_00113f06: XOR R13D,R13D LAB_00113f09: MOV RDI,R15 CALL 0x0010e270 LEA RDI,[RAX + R13*0x1] INC RDI CALL 0x0010e6d0 MOV RBP,RAX TEST R14,R14 JZ 0x00113f3b MOV RDI,RBP MOV RSI,R14 CALL 0x0010e110 MOV RDI,RBP MOV RSI,R12 CALL 0x0010e910 LAB_00113f3b: MOV RDI,RBP ADD RDI,R13 MOV RSI,R15 CALL 0x0010e110 MOV RDI,R14 CALL 0x0010e060 MOV qword ptr [RBX],RBP MOV RAX,RBP ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
char * str_append(int8 *param_1,char *param_2,char *param_3) { char *__s; size_t sVar1; size_t sVar2; char *__dest; long lVar3; __s = (char *)*param_1; if (__s == (char *)0x0) { lVar3 = 0; } else { sVar1 = strlen(__s); sVar2 = strlen(param_2); lVar3 = sVar2 + sVar1; } sVar1 = strlen(param_3); __dest = (char *)malloc(sVar1 + lVar3 + 1); if (__s != (char *)0x0) { strcpy(__dest,__s); strcat(__dest,param_2); } strcpy(__dest + lVar3,param_3); free(__s); *param_1 = __dest; return __dest; }
16,862
str_append
bluesky950520[P]quickjs/run-test262.c
char *str_append(char **pp, const char *sep, const char *str) { char *res, *p; size_t len = 0; p = *pp; if (p) { len = strlen(p) + strlen(sep); } res = malloc(len + strlen(str) + 1); if (p) { strcpy(res, p); strcat(res, sep); } strcpy(res + len, str); free(p); return *pp = res; }
O2
c
str_append: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %rbx movq (%rdi), %r14 testq %r14, %r14 je 0xedf8 movq %r14, %rdi callq 0xe280 movq %rax, %rbp movq %r12, %rdi callq 0xe280 movq %rax, %r13 addq %rbp, %r13 jmp 0xedfb xorl %r13d, %r13d movq %r15, %rdi callq 0xe280 leaq (%rax,%r13), %rdi incq %rdi callq 0xe6f0 movq %rax, %rbp testq %r14, %r14 je 0xee2d movq %rbp, %rdi movq %r14, %rsi callq 0xe120 movq %rbp, %rdi movq %r12, %rsi callq 0xe930 movq %rbp, %rdi addq %r13, %rdi movq %r15, %rsi callq 0xe120 movq %r14, %rdi callq 0xe060 movq %rbp, (%rbx) movq %rbp, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
str_append: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r15, rdx mov r12, rsi mov rbx, rdi mov r14, [rdi] test r14, r14 jz short loc_EDF8 mov rdi, r14 call _strlen mov rbp, rax mov rdi, r12 call _strlen mov r13, rax add r13, rbp jmp short loc_EDFB loc_EDF8: xor r13d, r13d loc_EDFB: mov rdi, r15 call _strlen lea rdi, [rax+r13] inc rdi call _malloc mov rbp, rax test r14, r14 jz short loc_EE2D mov rdi, rbp mov rsi, r14 call _strcpy mov rdi, rbp mov rsi, r12 call _strcat loc_EE2D: mov rdi, rbp add rdi, r13 mov rsi, r15 call _strcpy mov rdi, r14 call _free mov [rbx], rbp mov rax, rbp add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long str_append(long long *a1, long long a2, long long a3) { long long v4; // r14 long long v5; // rbp long long v6; // r13 long long v7; // rax long long v8; // rax long long v9; // rbp v4 = *a1; if ( *a1 ) { v5 = strlen(*a1); v6 = v5 + strlen(a2); } else { v6 = 0LL; } v7 = strlen(a3); v8 = malloc(v7 + v6 + 1); v9 = v8; if ( v4 ) { strcpy(v8, v4); strcat(v9, a2); } strcpy(v6 + v9, a3); free(v4); *a1 = v9; return v9; }
str_append: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R15,RDX MOV R12,RSI MOV RBX,RDI MOV R14,qword ptr [RDI] TEST R14,R14 JZ 0x0010edf8 MOV RDI,R14 CALL 0x0010e280 MOV RBP,RAX MOV RDI,R12 CALL 0x0010e280 MOV R13,RAX ADD R13,RBP JMP 0x0010edfb LAB_0010edf8: XOR R13D,R13D LAB_0010edfb: MOV RDI,R15 CALL 0x0010e280 LEA RDI,[RAX + R13*0x1] INC RDI CALL 0x0010e6f0 MOV RBP,RAX TEST R14,R14 JZ 0x0010ee2d MOV RDI,RBP MOV RSI,R14 CALL 0x0010e120 MOV RDI,RBP MOV RSI,R12 CALL 0x0010e930 LAB_0010ee2d: MOV RDI,RBP ADD RDI,R13 MOV RSI,R15 CALL 0x0010e120 MOV RDI,R14 CALL 0x0010e060 MOV qword ptr [RBX],RBP MOV RAX,RBP ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
char * str_append(int8 *param_1,char *param_2,char *param_3) { char *__s; size_t sVar1; size_t sVar2; char *__dest; long lVar3; __s = (char *)*param_1; if (__s == (char *)0x0) { lVar3 = 0; } else { sVar1 = strlen(__s); sVar2 = strlen(param_2); lVar3 = sVar2 + sVar1; } sVar1 = strlen(param_3); __dest = (char *)malloc(sVar1 + lVar3 + 1); if (__s != (char *)0x0) { strcpy(__dest,__s); strcat(__dest,param_2); } strcpy(__dest + lVar3,param_3); free(__s); *param_1 = __dest; return __dest; }
16,863
insert_dynamic
eloqsql/mysys/array.c
my_bool insert_dynamic(DYNAMIC_ARRAY *array, const void * element) { void *buffer; if (array->elements == array->max_element) { /* Call only when necessary */ if (!(buffer=alloc_dynamic(array))) return TRUE; } else { buffer=array->buffer+(array->elements * array->size_of_element); array->elements++; } memcpy(buffer,element,(size_t) array->size_of_element); return FALSE; }
O0
c
insert_dynamic: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movl 0x8(%rax), %eax movq -0x10(%rbp), %rcx cmpl 0xc(%rcx), %eax jne 0x3228b movq -0x10(%rbp), %rdi callq 0x322e0 movq %rax, -0x20(%rbp) cmpq $0x0, %rax jne 0x32289 movb $0x1, -0x1(%rbp) jmp 0x322d1 jmp 0x322b7 movq -0x10(%rbp), %rax movq (%rax), %rax movq -0x10(%rbp), %rcx movl 0x8(%rcx), %ecx movq -0x10(%rbp), %rdx imull 0x14(%rdx), %ecx movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movl 0x8(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x8(%rax) movq -0x20(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x10(%rbp), %rax movl 0x14(%rax), %eax movl %eax, %edx callq 0x25270 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
insert_dynamic: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] mov eax, [rax+8] mov rcx, [rbp+var_10] cmp eax, [rcx+0Ch] jnz short loc_3228B mov rdi, [rbp+var_10] call alloc_dynamic mov [rbp+var_20], rax cmp rax, 0 jnz short loc_32289 mov [rbp+var_1], 1 jmp short loc_322D1 loc_32289: jmp short loc_322B7 loc_3228B: mov rax, [rbp+var_10] mov rax, [rax] mov rcx, [rbp+var_10] mov ecx, [rcx+8] mov rdx, [rbp+var_10] imul ecx, [rdx+14h] mov ecx, ecx add rax, rcx mov [rbp+var_20], rax mov rax, [rbp+var_10] mov ecx, [rax+8] add ecx, 1 mov [rax+8], ecx loc_322B7: mov rdi, [rbp+var_20] mov rsi, [rbp+var_18] mov rax, [rbp+var_10] mov eax, [rax+14h] mov edx, eax call _memcpy mov [rbp+var_1], 0 loc_322D1: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char insert_dynamic(long long a1, long long a2) { long long v3; // [rsp+0h] [rbp-20h] if ( *(_DWORD *)(a1 + 8) != *(_DWORD *)(a1 + 12) ) { v3 = (unsigned int)(*(_DWORD *)(a1 + 20) * (*(_DWORD *)(a1 + 8))++) + *(_QWORD *)a1; LABEL_6: memcpy(v3, a2, *(unsigned int *)(a1 + 20)); return 0; } v3 = alloc_dynamic(a1); if ( v3 ) goto LABEL_6; return 1; }
insert_dynamic: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0xc] JNZ 0x0013228b MOV RDI,qword ptr [RBP + -0x10] CALL 0x001322e0 MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JNZ 0x00132289 MOV byte ptr [RBP + -0x1],0x1 JMP 0x001322d1 LAB_00132289: JMP 0x001322b7 LAB_0013228b: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x8] MOV RDX,qword ptr [RBP + -0x10] IMUL ECX,dword ptr [RDX + 0x14] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x8] ADD ECX,0x1 MOV dword ptr [RAX + 0x8],ECX LAB_001322b7: MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x14] MOV EDX,EAX CALL 0x00125270 MOV byte ptr [RBP + -0x1],0x0 LAB_001322d1: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 insert_dynamic(long *param_1,void *param_2) { void *local_28; if ((int)param_1[1] == *(int *)((long)param_1 + 0xc)) { local_28 = (void *)alloc_dynamic(param_1); if (local_28 == (void *)0x0) { return 1; } } else { local_28 = (void *)(*param_1 + (ulong)(uint)((int)param_1[1] * *(int *)((long)param_1 + 0x14))); *(int *)(param_1 + 1) = (int)param_1[1] + 1; } memcpy(local_28,param_2,(ulong)*(uint *)((long)param_1 + 0x14)); return 0; }
16,864
testing::internal::(anonymous namespace)::FailureTest::FailureTest(testing::internal::CodeLocation const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool)
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc
explicit FailureTest(const CodeLocation& loc, std::string error_message, bool as_error) : loc_(loc), error_message_(std::move(error_message)), as_error_(as_error) {}
O0
cpp
testing::internal::(anonymous namespace)::FailureTest::FailureTest(testing::internal::CodeLocation const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool): subq $0x48, %rsp movq %rdx, 0x8(%rsp) movb %cl, %al movq %rdi, 0x40(%rsp) movq %rsi, 0x38(%rsp) movq %rdx, 0x30(%rsp) andb $0x1, %al movb %al, 0x2f(%rsp) movq 0x40(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0xce0c0 movq 0x10(%rsp), %rdi leaq 0x9ca85(%rip), %rax # 0x184360 movq %rax, (%rdi) addq $0x10, %rdi movq 0x38(%rsp), %rsi callq 0xed600 jmp 0xe78ee movq 0x10(%rsp), %rdi movq 0x8(%rsp), %rsi addq $0x38, %rdi callq 0x1e970 movq 0x10(%rsp), %rax movb 0x2f(%rsp), %cl andb $0x1, %cl movb %cl, 0x58(%rax) addq $0x48, %rsp retq movq 0x10(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x20(%rsp) movl %eax, 0x1c(%rsp) callq 0xce140 movq 0x20(%rsp), %rdi callq 0x16cf0 nopw (%rax,%rax)
_ZN7testing8internal12_GLOBAL__N_111FailureTestC2ERKNS0_12CodeLocationENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb: sub rsp, 48h mov [rsp+48h+var_40], rdx mov al, cl mov [rsp+48h+var_8], rdi mov [rsp+48h+var_10], rsi mov [rsp+48h+var_18], rdx and al, 1 mov [rsp+48h+var_19], al mov rdi, [rsp+48h+var_8]; this mov [rsp+48h+var_38], rdi call _ZN7testing4TestC2Ev; testing::Test::Test(void) mov rdi, [rsp+48h+var_38] lea rax, off_184360 mov [rdi], rax add rdi, 10h; this mov rsi, [rsp+48h+var_10]; testing::internal::CodeLocation * call _ZN7testing8internal12CodeLocationC2ERKS1_; testing::internal::CodeLocation::CodeLocation(testing::internal::CodeLocation const&) jmp short $+2 loc_E78EE: mov rdi, [rsp+48h+var_38] mov rsi, [rsp+48h+var_40] add rdi, 38h ; '8' call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_; std::string::basic_string(std::string&&) mov rax, [rsp+48h+var_38] mov cl, [rsp+48h+var_19] and cl, 1 mov [rax+58h], cl add rsp, 48h retn mov rdi, [rsp+arg_8]; this mov rcx, rax mov eax, edx mov [rsp+arg_18], rcx mov [rsp+arg_14], eax call _ZN7testing4TestD2Ev; testing::Test::~Test() mov rdi, [rsp+arg_18] call __Unwind_Resume
_BYTE * testing::internal::`anonymous namespace'::FailureTest::FailureTest( _BYTE *a1, const testing::internal::CodeLocation *a2, long long a3, char a4) { _BYTE *result; // rax char v6; // [rsp+2Fh] [rbp-19h] v6 = a4 & 1; testing::Test::Test((testing::Test *)a1); *(_QWORD *)a1 = off_184360; testing::internal::CodeLocation::CodeLocation((testing::internal::CodeLocation *)(a1 + 16), a2); std::string::basic_string((long long)(a1 + 56), a3); result = a1; a1[88] = v6 & 1; return result; }
FailureTest: SUB RSP,0x48 MOV qword ptr [RSP + 0x8],RDX MOV AL,CL MOV qword ptr [RSP + 0x40],RDI MOV qword ptr [RSP + 0x38],RSI MOV qword ptr [RSP + 0x30],RDX AND AL,0x1 MOV byte ptr [RSP + 0x2f],AL MOV RDI,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x10],RDI CALL 0x001ce0c0 MOV RDI,qword ptr [RSP + 0x10] LEA RAX,[0x284360] MOV qword ptr [RDI],RAX ADD RDI,0x10 MOV RSI,qword ptr [RSP + 0x38] LAB_001e78e7: CALL 0x001ed600 LAB_001e78ec: JMP 0x001e78ee LAB_001e78ee: MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x8] ADD RDI,0x38 CALL 0x0011e970 MOV RAX,qword ptr [RSP + 0x10] MOV CL,byte ptr [RSP + 0x2f] AND CL,0x1 MOV byte ptr [RAX + 0x58],CL ADD RSP,0x48 RET
/* testing::internal::(anonymous namespace)::FailureTest::FailureTest(testing::internal::CodeLocation const&, std::__cxx11::string, bool) */ void __thiscall testing::internal::(anonymous_namespace)::FailureTest::FailureTest (FailureTest *this,CodeLocation *param_1,string *param_3,byte param_4) { Test::Test((Test *)this); *(int ***)this = &PTR__FailureTest_00284360; /* try { // try from 001e78e7 to 001e78eb has its CatchHandler @ 001e7915 */ CodeLocation::CodeLocation((CodeLocation *)(this + 0x10),param_1); std::__cxx11::string::string((string *)(this + 0x38),param_3); this[0x58] = (FailureTest)(param_4 & 1); return; }
16,865
my_wc_mb_utf8mb4
eloqsql/strings/ctype-utf8.c
static int my_wc_mb_utf8mb4(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *r, uchar *e) { int count; if (r >= e) return MY_CS_TOOSMALL; if (wc < 0x80) count= 1; else if (wc < 0x800) count= 2; else if (wc < 0x10000) count= 3; else if (wc < 0x200000) count= 4; else return MY_CS_ILUNI; if (r + count > e) return MY_CS_TOOSMALLN(count); switch (count) { case 4: r[3] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x10000; /* fall through */ case 3: r[2] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x800; /* fall through */ case 2: r[1] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0xc0; /* fall through */ case 1: r[0] = (uchar) wc; } return count; }
O3
c
my_wc_mb_utf8mb4: pushq %rbp movq %rsp, %rbp movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x4f444 movl $0x1, %edi cmpq $0x80, %rsi jb 0x4f3dd movl $0x2, %edi cmpq $0x800, %rsi # imm = 0x800 jb 0x4f3dd movl $0x3, %edi cmpq $0x10000, %rsi # imm = 0x10000 jb 0x4f3dd xorl %eax, %eax movl $0x4, %edi cmpq $0x1fffff, %rsi # imm = 0x1FFFFF ja 0x4f444 movl %edi, %eax addq %rdx, %rax cmpq %rcx, %rax jbe 0x4f3f0 movl $0xffffff9c, %eax # imm = 0xFFFFFF9C subl %edi, %eax jmp 0x4f444 leal -0x1(%rdi), %eax leaq 0x284a56(%rip), %rcx # 0x2d3e50 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movl %esi, %eax andb $0x3f, %al orb $-0x80, %al movb %al, 0x3(%rdx) shrq $0x6, %rsi orq $0x10000, %rsi # imm = 0x10000 movl %esi, %eax andb $0x3f, %al orb $-0x80, %al movb %al, 0x2(%rdx) shrq $0x6, %rsi orq $0x800, %rsi # imm = 0x800 movl %esi, %eax andb $0x3f, %al orb $-0x80, %al movb %al, 0x1(%rdx) shrq $0x6, %rsi orq $0xc0, %rsi movb %sil, (%rdx) movl %edi, %eax popq %rbp retq
my_wc_mb_utf8mb4: push rbp mov rbp, rsp mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb loc_4F444 mov edi, 1 cmp rsi, 80h jb short loc_4F3DD mov edi, 2 cmp rsi, 800h jb short loc_4F3DD mov edi, 3 cmp rsi, offset stru_10000 jb short loc_4F3DD xor eax, eax mov edi, 4 cmp rsi, offset unk_1FFFFF ja short loc_4F444 loc_4F3DD: mov eax, edi add rax, rdx cmp rax, rcx jbe short loc_4F3F0 mov eax, 0FFFFFF9Ch sub eax, edi jmp short loc_4F444 loc_4F3F0: lea eax, [rdi-1] lea rcx, jpt_4F401 movsxd rax, ds:(jpt_4F401 - 2D3E50h)[rcx+rax*4]; switch 4 cases add rax, rcx jmp rax; switch jump loc_4F403: mov eax, esi; jumptable 000000000004F401 case 3 and al, 3Fh or al, 80h mov [rdx+3], al shr rsi, 6 or rsi, 10000h loc_4F417: mov eax, esi; jumptable 000000000004F401 case 2 and al, 3Fh or al, 80h mov [rdx+2], al shr rsi, 6 or rsi, 800h loc_4F42B: mov eax, esi; jumptable 000000000004F401 case 1 and al, 3Fh or al, 80h mov [rdx+1], al shr rsi, 6 or rsi, 0C0h loc_4F43F: mov [rdx], sil; jumptable 000000000004F401 case 0 mov eax, edi loc_4F444: pop rbp retn
long long my_wc_mb_utf8mb4(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4) { long long result; // rax unsigned int v5; // edi result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { v5 = 1; if ( a2 < 0x80 || (v5 = 2, a2 < 0x800) || (v5 = 3, a2 < (unsigned long long)&stru_10000) || (result = 0LL, v5 = 4, a2 <= (unsigned long long)&unk_1FFFFF) ) { if ( (unsigned long long)&a3[v5] <= a4 ) { switch ( v5 ) { case 1u: goto LABEL_12; case 2u: goto LABEL_11; case 3u: goto LABEL_10; case 4u: a3[3] = a2 & 0x3F | 0x80; a2 = (a2 >> 6) | 0x10000; LABEL_10: a3[2] = a2 & 0x3F | 0x80; a2 = (a2 >> 6) | 0x800; LABEL_11: a3[1] = a2 & 0x3F | 0x80; a2 = (a2 >> 6) | 0xC0; LABEL_12: *a3 = a2; result = v5; break; } } else { return -100 - v5; } } } return result; }
my_wc_mb_utf8mb4: PUSH RBP MOV RBP,RSP MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x0014f444 MOV EDI,0x1 CMP RSI,0x80 JC 0x0014f3dd MOV EDI,0x2 CMP RSI,0x800 JC 0x0014f3dd MOV EDI,0x3 CMP RSI,0x10000 JC 0x0014f3dd XOR EAX,EAX MOV EDI,0x4 CMP RSI,0x1fffff JA 0x0014f444 LAB_0014f3dd: MOV EAX,EDI ADD RAX,RDX CMP RAX,RCX JBE 0x0014f3f0 MOV EAX,0xffffff9c SUB EAX,EDI JMP 0x0014f444 LAB_0014f3f0: LEA EAX,[RDI + -0x1] LEA RCX,[0x3d3e50] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX JMP RAX LAB_0014f444: POP RBP RET
ulong my_wc_mb_utf8mb4(int8 param_1,ulong param_2,ulong param_3,ulong param_4) { ulong uVar1; long lVar2; uVar1 = 0xffffff9b; if (param_3 < param_4) { lVar2 = 1; if ((((0x7f < param_2) && (lVar2 = 2, 0x7ff < param_2)) && (lVar2 = 3, 0xffff < param_2)) && (lVar2 = 4, 0x1fffff < param_2)) { return 0; } if (lVar2 + param_3 <= param_4) { /* WARNING: Could not recover jumptable at 0x0014f401. Too many branches */ /* WARNING: Treating indirect jump as call */ uVar1 = (*(code *)(&DAT_003d3e50 + *(int *)(&DAT_003d3e50 + (ulong)((int)lVar2 - 1) * 4)))(); return uVar1; } uVar1 = (ulong)(-(int)lVar2 - 100); } return uVar1; }
16,866
ma_ft_cmp
eloqsql/storage/maria/ma_ft_update.c
int _ma_ft_cmp(MARIA_HA *info, uint keynr, const uchar *rec1, const uchar *rec2) { FT_SEG_ITERATOR ftsi1, ftsi2; CHARSET_INFO *cs=info->s->keyinfo[keynr].seg->charset; DBUG_ENTER("_ma_ft_cmp"); _ma_ft_segiterator_init(info, keynr, rec1, &ftsi1); _ma_ft_segiterator_init(info, keynr, rec2, &ftsi2); while (_ma_ft_segiterator(&ftsi1) && _ma_ft_segiterator(&ftsi2)) { if ((ftsi1.pos != ftsi2.pos) && (!ftsi1.pos || !ftsi2.pos || ha_compare_text(cs, ftsi1.pos,ftsi1.len, ftsi2.pos,ftsi2.len,0))) DBUG_RETURN(THOSE_TWO_DAMN_KEYS_ARE_REALLY_DIFFERENT); } DBUG_RETURN(GEE_THEY_ARE_ABSOLUTELY_IDENTICAL); }
O0
c
ma_ft_cmp: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x570(%rax), %rax movl -0x14(%rbp), %ecx imulq $0x118, %rcx, %rcx # imm = 0x118 addq %rcx, %rax movq 0xc0(%rax), %rax movq (%rax), %rax movq %rax, -0x70(%rbp) movq -0x10(%rbp), %rdi movl -0x14(%rbp), %esi movq -0x20(%rbp), %rdx leaq -0x48(%rbp), %rcx callq 0x96de0 movq -0x10(%rbp), %rdi movl -0x14(%rbp), %esi movq -0x28(%rbp), %rdx leaq -0x68(%rbp), %rcx callq 0x96de0 leaq -0x48(%rbp), %rdi callq 0x96eb0 movl %eax, %ecx xorl %eax, %eax cmpl $0x0, %ecx movb %al, -0x71(%rbp) je 0x972a2 leaq -0x68(%rbp), %rdi callq 0x96eb0 cmpl $0x0, %eax setne %al movb %al, -0x71(%rbp) movb -0x71(%rbp), %al testb $0x1, %al jne 0x972ab jmp 0x972f4 movq -0x30(%rbp), %rax cmpq -0x50(%rbp), %rax je 0x972f2 cmpq $0x0, -0x30(%rbp) je 0x972e7 cmpq $0x0, -0x50(%rbp) je 0x972e7 movq -0x70(%rbp), %rdi movq -0x30(%rbp), %rsi movl -0x44(%rbp), %eax movl %eax, %edx movq -0x50(%rbp), %rcx movl -0x64(%rbp), %eax movl %eax, %r8d xorl %r9d, %r9d callq 0xbb250 cmpl $0x0, %eax je 0x972f2 jmp 0x972e9 movl $0x1, -0x4(%rbp) jmp 0x972fd jmp 0x9727b jmp 0x972f6 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x80, %rsp popq %rbp retq nopl (%rax)
_ma_ft_cmp: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+570h] mov ecx, [rbp+var_14] imul rcx, 118h add rax, rcx mov rax, [rax+0C0h] mov rax, [rax] mov [rbp+var_70], rax mov rdi, [rbp+var_10] mov esi, [rbp+var_14] mov rdx, [rbp+var_20] lea rcx, [rbp+var_48] call _ma_ft_segiterator_init mov rdi, [rbp+var_10] mov esi, [rbp+var_14] mov rdx, [rbp+var_28] lea rcx, [rbp+var_68] call _ma_ft_segiterator_init loc_9727B: lea rdi, [rbp+var_48] call _ma_ft_segiterator mov ecx, eax xor eax, eax cmp ecx, 0 mov [rbp+var_71], al jz short loc_972A2 lea rdi, [rbp+var_68] call _ma_ft_segiterator cmp eax, 0 setnz al mov [rbp+var_71], al loc_972A2: mov al, [rbp+var_71] test al, 1 jnz short loc_972AB jmp short loc_972F4 loc_972AB: mov rax, [rbp+var_30] cmp rax, [rbp+var_50] jz short loc_972F2 cmp [rbp+var_30], 0 jz short loc_972E7 cmp [rbp+var_50], 0 jz short loc_972E7 mov rdi, [rbp+var_70] mov rsi, [rbp+var_30] mov eax, [rbp+var_44] mov edx, eax mov rcx, [rbp+var_50] mov eax, [rbp+var_64] mov r8d, eax xor r9d, r9d call ha_compare_text cmp eax, 0 jz short loc_972F2 loc_972E7: jmp short $+2 loc_972E9: mov [rbp+var_4], 1 jmp short loc_972FD loc_972F2: jmp short loc_9727B loc_972F4: jmp short $+2 loc_972F6: mov [rbp+var_4], 0 loc_972FD: mov eax, [rbp+var_4] add rsp, 80h pop rbp retn
long long ma_ft_cmp(long long a1, unsigned int a2, long long a3, long long a4) { bool v5; // [rsp+Fh] [rbp-71h] long long v6; // [rsp+10h] [rbp-70h] _BYTE v7[4]; // [rsp+18h] [rbp-68h] BYREF unsigned int v8; // [rsp+1Ch] [rbp-64h] long long v9; // [rsp+30h] [rbp-50h] _BYTE v10[4]; // [rsp+38h] [rbp-48h] BYREF unsigned int v11; // [rsp+3Ch] [rbp-44h] long long v12; // [rsp+50h] [rbp-30h] long long v13; // [rsp+58h] [rbp-28h] long long v14; // [rsp+60h] [rbp-20h] unsigned int v15; // [rsp+6Ch] [rbp-14h] long long v16; // [rsp+70h] [rbp-10h] v16 = a1; v15 = a2; v14 = a3; v13 = a4; v6 = **(_QWORD **)(280LL * a2 + *(_QWORD *)(*(_QWORD *)a1 + 1392LL) + 192); ma_ft_segiterator_init(a1, a2, a3, (long long)v10); ma_ft_segiterator_init(v16, v15, v13, (long long)v7); while ( 1 ) { v5 = 0; if ( (unsigned int)ma_ft_segiterator((long long)v10) ) v5 = (unsigned int)ma_ft_segiterator((long long)v7) != 0; if ( !v5 ) break; if ( v12 != v9 && (!v12 || !v9 || (unsigned int)ha_compare_text(v6, v12, v11, v9, v8, 0LL)) ) return 1; } return 0; }
_ma_ft_cmp: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x570] MOV ECX,dword ptr [RBP + -0x14] IMUL RCX,RCX,0x118 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0xc0] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x70],RAX MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x14] MOV RDX,qword ptr [RBP + -0x20] LEA RCX,[RBP + -0x48] CALL 0x00196de0 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x14] MOV RDX,qword ptr [RBP + -0x28] LEA RCX,[RBP + -0x68] CALL 0x00196de0 LAB_0019727b: LEA RDI,[RBP + -0x48] CALL 0x00196eb0 MOV ECX,EAX XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RBP + -0x71],AL JZ 0x001972a2 LEA RDI,[RBP + -0x68] CALL 0x00196eb0 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x71],AL LAB_001972a2: MOV AL,byte ptr [RBP + -0x71] TEST AL,0x1 JNZ 0x001972ab JMP 0x001972f4 LAB_001972ab: MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x50] JZ 0x001972f2 CMP qword ptr [RBP + -0x30],0x0 JZ 0x001972e7 CMP qword ptr [RBP + -0x50],0x0 JZ 0x001972e7 MOV RDI,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RBP + -0x44] MOV EDX,EAX MOV RCX,qword ptr [RBP + -0x50] MOV EAX,dword ptr [RBP + -0x64] MOV R8D,EAX XOR R9D,R9D CALL 0x001bb250 CMP EAX,0x0 JZ 0x001972f2 LAB_001972e7: JMP 0x001972e9 LAB_001972e9: MOV dword ptr [RBP + -0x4],0x1 JMP 0x001972fd LAB_001972f2: JMP 0x0019727b LAB_001972f4: JMP 0x001972f6 LAB_001972f6: MOV dword ptr [RBP + -0x4],0x0 LAB_001972fd: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x80 POP RBP RET
int4 _ma_ft_cmp(long *param_1,uint param_2,int8 param_3,int8 param_4) { int8 uVar1; int iVar2; bool bVar3; int1 local_70 [4]; int4 local_6c; long local_58; int1 local_50 [4]; int4 local_4c; long local_38; int8 local_30; int8 local_28; uint local_1c; long *local_18; uVar1 = **(int8 **)(*(long *)(*param_1 + 0x570) + (ulong)param_2 * 0x118 + 0xc0); local_30 = param_4; local_28 = param_3; local_1c = param_2; local_18 = param_1; _ma_ft_segiterator_init(param_1,param_2,param_3,local_50); _ma_ft_segiterator_init(local_18,local_1c,local_30,local_70); while( true ) { iVar2 = _ma_ft_segiterator(local_50); bVar3 = false; if (iVar2 != 0) { iVar2 = _ma_ft_segiterator(local_70); bVar3 = iVar2 != 0; } if (!bVar3) break; if ((local_38 != local_58) && (((local_38 == 0 || (local_58 == 0)) || (iVar2 = ha_compare_text(uVar1,local_38,local_4c,local_58,local_6c,0), iVar2 != 0)))) { return 1; } } return 0; }
16,867
sha256_final
corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/sha256.h
static void sha256_final(unsigned char md[32], SHA256_CTX *ctx) { unsigned long long bits = ctx->N * 8; size_t n = ctx->off; unsigned char *tail; ctx->buf[n++] = 0x80; if (n > (sizeof(ctx->buf) - 8)) { sha256_block_data_order(ctx->h, ctx->buf, 1); vec_zero(ctx->buf, sizeof(ctx->buf)); } tail = ctx->buf + sizeof(ctx->buf) - 8; __TOBE32(tail, (unsigned int)(bits >> 32)); __TOBE32(tail + 4, (unsigned int)bits); sha256_block_data_order(ctx->h, ctx->buf, 1); sha256_emit(md, ctx->h); }
O0
c
sha256_final: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x20(%rax), %rax shlq $0x3, %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax movq 0x68(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq -0x20(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb $-0x80, 0x28(%rax,%rcx) cmpq $0x38, -0x20(%rbp) jbe 0xb7393 movq -0x10(%rbp), %rdi movq -0x10(%rbp), %rsi addq $0x28, %rsi movl $0x1, %edx callq 0xc14c0 movq -0x10(%rbp), %rdi addq $0x28, %rdi movl $0x40, %esi callq 0xa87c0 movq -0x10(%rbp), %rax addq $0x28, %rax addq $0x40, %rax addq $-0x8, %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax shrq $0x20, %rax shrl $0x18, %eax movb %al, %cl movq -0x28(%rbp), %rax movb %cl, (%rax) movq -0x18(%rbp), %rax shrq $0x20, %rax shrl $0x10, %eax movb %al, %cl movq -0x28(%rbp), %rax movb %cl, 0x1(%rax) movq -0x18(%rbp), %rax shrq $0x20, %rax shrl $0x8, %eax movb %al, %cl movq -0x28(%rbp), %rax movb %cl, 0x2(%rax) movq -0x18(%rbp), %rax shrq $0x20, %rax movb %al, %cl movq -0x28(%rbp), %rax movb %cl, 0x3(%rax) movq -0x18(%rbp), %rax shrl $0x18, %eax movb %al, %cl movq -0x28(%rbp), %rax movb %cl, 0x4(%rax) movq -0x18(%rbp), %rax shrl $0x10, %eax movb %al, %cl movq -0x28(%rbp), %rax movb %cl, 0x5(%rax) movq -0x18(%rbp), %rax shrl $0x8, %eax movb %al, %cl movq -0x28(%rbp), %rax movb %cl, 0x6(%rax) movq -0x18(%rbp), %rax movb %al, %cl movq -0x28(%rbp), %rax movb %cl, 0x7(%rax) movq -0x10(%rbp), %rdi movq -0x10(%rbp), %rsi addq $0x28, %rsi movl $0x1, %edx callq 0xc14c0 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0xc3820 addq $0x30, %rsp popq %rbp retq nopl (%rax)
sha256_final: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov rax, [rax+20h] shl rax, 3 mov [rbp+var_18], rax mov rax, [rbp+var_10] mov rax, [rax+68h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rcx, [rbp+var_20] mov rdx, rcx add rdx, 1 mov [rbp+var_20], rdx mov byte ptr [rax+rcx+28h], 80h cmp [rbp+var_20], 38h ; '8' jbe short loc_B7393 mov rdi, [rbp+var_10] mov rsi, [rbp+var_10] add rsi, 28h ; '(' mov edx, 1 call blst_sha256_block_data_order mov rdi, [rbp+var_10] add rdi, 28h ; '(' mov esi, 40h ; '@' call vec_zero loc_B7393: mov rax, [rbp+var_10] add rax, 28h ; '(' add rax, 40h ; '@' add rax, 0FFFFFFFFFFFFFFF8h mov [rbp+var_28], rax mov rax, [rbp+var_18] shr rax, 20h shr eax, 18h mov cl, al mov rax, [rbp+var_28] mov [rax], cl mov rax, [rbp+var_18] shr rax, 20h shr eax, 10h mov cl, al mov rax, [rbp+var_28] mov [rax+1], cl mov rax, [rbp+var_18] shr rax, 20h shr eax, 8 mov cl, al mov rax, [rbp+var_28] mov [rax+2], cl mov rax, [rbp+var_18] shr rax, 20h mov cl, al mov rax, [rbp+var_28] mov [rax+3], cl mov rax, [rbp+var_18] shr eax, 18h mov cl, al mov rax, [rbp+var_28] mov [rax+4], cl mov rax, [rbp+var_18] shr eax, 10h mov cl, al mov rax, [rbp+var_28] mov [rax+5], cl mov rax, [rbp+var_18] shr eax, 8 mov cl, al mov rax, [rbp+var_28] mov [rax+6], cl mov rax, [rbp+var_18] mov cl, al mov rax, [rbp+var_28] mov [rax+7], cl mov rdi, [rbp+var_10] mov rsi, [rbp+var_10] add rsi, 28h ; '(' mov edx, 1 call blst_sha256_block_data_order mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] call blst_sha256_emit add rsp, 30h pop rbp retn
sha256_final: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] SHL RAX,0x3 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x68] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x20] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX + RCX*0x1 + 0x28],0x80 CMP qword ptr [RBP + -0x20],0x38 JBE 0x001b7393 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x28 MOV EDX,0x1 CALL 0x001c14c0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x28 MOV ESI,0x40 CALL 0x001a87c0 LAB_001b7393: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x28 ADD RAX,0x40 ADD RAX,-0x8 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x20 SHR EAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x20 SHR EAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x20 SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x20 MOV CL,AL MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x18] SHR EAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x4],CL MOV RAX,qword ptr [RBP + -0x18] SHR EAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x5],CL MOV RAX,qword ptr [RBP + -0x18] SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x6],CL MOV RAX,qword ptr [RBP + -0x18] MOV CL,AL MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x7],CL MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x28 MOV EDX,0x1 CALL 0x001c14c0 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x001c3820 ADD RSP,0x30 POP RBP RET
void sha256_final(int8 param_1,long param_2) { long lVar1; long lVar2; lVar2 = *(long *)(param_2 + 0x20) << 3; lVar1 = *(long *)(param_2 + 0x68); *(int1 *)(param_2 + 0x28 + lVar1) = 0x80; if (0x38 < lVar1 + 1U) { blst_sha256_block_data_order(param_2,param_2 + 0x28,1); vec_zero(param_2 + 0x28,0x40); } *(char *)(param_2 + 0x60) = (char)((ulong)lVar2 >> 0x38); *(char *)(param_2 + 0x61) = (char)((ulong)lVar2 >> 0x30); *(char *)(param_2 + 0x62) = (char)((ulong)lVar2 >> 0x28); *(char *)(param_2 + 99) = (char)((ulong)lVar2 >> 0x20); *(char *)(param_2 + 100) = (char)((ulong)lVar2 >> 0x18); *(char *)(param_2 + 0x65) = (char)((ulong)lVar2 >> 0x10); *(char *)(param_2 + 0x66) = (char)((ulong)lVar2 >> 8); *(char *)(param_2 + 0x67) = (char)lVar2; blst_sha256_block_data_order(param_2,param_2 + 0x28,1); blst_sha256_emit(param_1,param_2); return; }
16,868
d2b
eloqsql/strings/dtoa.c
static Bigint *d2b(U *d, int *e, int *bits, Stack_alloc *alloc) { Bigint *b; int de, k; ULong *x, y, z; int i; #define d0 word0(d) #define d1 word1(d) b= Balloc(1, alloc); x= b->p.x; z= d0 & Frac_mask; d0 &= 0x7fffffff; /* clear sign bit, which we ignore */ if ((de= (int)(d0 >> Exp_shift))) z|= Exp_msk1; if ((y= d1)) { if ((k= lo0bits(&y))) { x[0]= y | z << (32 - k); z>>= k; } else x[0]= y; i= b->wds= (x[1]= z) ? 2 : 1; } else { k= lo0bits(&z); x[0]= z; i= b->wds= 1; k+= 32; } if (de) { *e= de - Bias - (P-1) + k; *bits= P - k; } else { *e= de - Bias - (P-1) + 1 + k; *bits= 32*i - hi0bits(x[i-1]); } return b; #undef d0 #undef d1 }
O3
c
d2b: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, -0x40(%rbp) movq %rsi, -0x38(%rbp) movq %rdi, %r12 movl $0x1, %edi movq %rcx, %rsi callq 0x8eb48 movq %rax, %r14 movq (%rax), %r13 movl 0x4(%r12), %ebx movl %ebx, %r15d andl $0xfffff, %r15d # imm = 0xFFFFF movl %r15d, -0x2c(%rbp) andl $0x7fffffff, %ebx # imm = 0x7FFFFFFF movl %ebx, 0x4(%r12) cmpl $0x100000, %ebx # imm = 0x100000 jb 0x8ec1c orl $0x100000, %r15d # imm = 0x100000 movl %r15d, -0x2c(%rbp) movl (%r12), %eax movl %eax, -0x30(%rbp) testl %eax, %eax je 0x8ec66 leaq -0x30(%rbp), %r12 movq %r12, %rdi callq 0x8f221 movl %eax, %ecx negb %cl movl %r15d, %edx shll %cl, %edx movl %eax, %ecx shrl %cl, %r15d testl %eax, %eax cmovel %eax, %edx orl (%r12), %edx movl %edx, (%r13) movl %r15d, 0x4(%r13) cmpl $0x1, %r15d movl $0x2, %r15d sbbl $0x0, %r15d movl %r15d, 0x14(%r14) jmp 0x8ec8b leaq -0x2c(%rbp), %r12 movq %r12, %rdi callq 0x8f221 movl (%r12), %ecx movl %ecx, (%r13) movl $0x1, 0x14(%r14) addl $0x20, %eax movl $0x1, %r15d cmpl $0x100000, %ebx # imm = 0x100000 jae 0x8ecb4 addl $0xfffffbce, %eax # imm = 0xFFFFFBCE movq -0x38(%rbp), %rcx movl %eax, (%rcx) movl %r15d, %eax shll $0x5, %r15d movl -0x4(%r13,%rax,4), %edi callq 0x8f2b2 subl %eax, %r15d jmp 0x8eccf shrl $0x14, %ebx leal (%rbx,%rax), %ecx addl $0xfffffbcd, %ecx # imm = 0xFFFFFBCD movq -0x38(%rbp), %rdx movl %ecx, (%rdx) movl $0x35, %r15d subl %eax, %r15d movq -0x40(%rbp), %rax movl %r15d, (%rax) movq %r14, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
d2b: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_40], rdx mov [rbp+var_38], rsi mov r12, rdi mov edi, 1 mov rsi, rcx call Balloc_0 mov r14, rax mov r13, [rax] mov ebx, [r12+4] mov r15d, ebx and r15d, 0FFFFFh mov [rbp+var_2C], r15d and ebx, 7FFFFFFFh mov [r12+4], ebx cmp ebx, offset unk_100000 jb short loc_8EC1C or r15d, 100000h mov [rbp+var_2C], r15d loc_8EC1C: mov eax, [r12] mov [rbp+var_30], eax test eax, eax jz short loc_8EC66 lea r12, [rbp+var_30] mov rdi, r12 call lo0bits_0 mov ecx, eax neg cl mov edx, r15d shl edx, cl mov ecx, eax shr r15d, cl test eax, eax cmovz edx, eax or edx, [r12] mov [r13+0], edx mov [r13+4], r15d cmp r15d, 1 mov r15d, 2 sbb r15d, 0 mov [r14+14h], r15d jmp short loc_8EC8B loc_8EC66: lea r12, [rbp+var_2C] mov rdi, r12 call lo0bits_0 mov ecx, [r12] mov [r13+0], ecx mov dword ptr [r14+14h], 1 add eax, 20h ; ' ' mov r15d, 1 loc_8EC8B: cmp ebx, offset unk_100000 jnb short loc_8ECB4 add eax, 0FFFFFBCEh mov rcx, [rbp+var_38] mov [rcx], eax mov eax, r15d shl r15d, 5 mov edi, [r13+rax*4-4] call hi0bits_0 sub r15d, eax jmp short loc_8ECCF loc_8ECB4: shr ebx, 14h lea ecx, [rbx+rax] add ecx, 0FFFFFBCDh mov rdx, [rbp+var_38] mov [rdx], ecx mov r15d, 35h ; '5' sub r15d, eax loc_8ECCF: mov rax, [rbp+var_40] mov [rax], r15d mov rax, r14 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long d2b(int *a1, _DWORD *a2, _DWORD *a3, long long a4) { long long v4; // r14 int *v5; // r13 int v6; // ebx unsigned int v7; // r15d unsigned int v8; // ebx int v9; // eax unsigned int v10; // edx unsigned int v11; // r15d unsigned int v12; // r15d int v13; // eax int v14; // r15d int v17; // [rsp+10h] [rbp-30h] BYREF int v18[11]; // [rsp+14h] [rbp-2Ch] BYREF v4 = Balloc_0(1, a4); v5 = *(int **)v4; v6 = a1[1]; v7 = v6 & 0xFFFFF; v18[0] = v6 & 0xFFFFF; v8 = v6 & 0x7FFFFFFF; a1[1] = v8; if ( v8 >= (unsigned int)&unk_100000 ) { v7 |= 0x100000u; v18[0] = v7; } v17 = *a1; if ( v17 ) { v9 = lo0bits_0(&v17); v10 = v7 << -(char)v9; v11 = v7 >> v9; if ( !v9 ) v10 = 0; *v5 = v17 | v10; v5[1] = v11; v12 = 2 - (v11 == 0); *(_DWORD *)(v4 + 20) = v12; } else { v13 = lo0bits_0(v18); *v5 = v18[0]; *(_DWORD *)(v4 + 20) = 1; v9 = v13 + 32; v12 = 1; } if ( v8 >= (unsigned int)&unk_100000 ) { *a2 = (v8 >> 20) + v9 - 1075; v14 = 53 - v9; } else { *a2 = v9 - 1074; v14 = 32 * v12 - hi0bits_0((unsigned int)v5[v12 - 1]); } *a3 = v14; return v4; }
d2b: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RBP + -0x40],RDX MOV qword ptr [RBP + -0x38],RSI MOV R12,RDI MOV EDI,0x1 MOV RSI,RCX CALL 0x0018eb48 MOV R14,RAX MOV R13,qword ptr [RAX] MOV EBX,dword ptr [R12 + 0x4] MOV R15D,EBX AND R15D,0xfffff MOV dword ptr [RBP + -0x2c],R15D AND EBX,0x7fffffff MOV dword ptr [R12 + 0x4],EBX CMP EBX,0x100000 JC 0x0018ec1c OR R15D,0x100000 MOV dword ptr [RBP + -0x2c],R15D LAB_0018ec1c: MOV EAX,dword ptr [R12] MOV dword ptr [RBP + -0x30],EAX TEST EAX,EAX JZ 0x0018ec66 LEA R12,[RBP + -0x30] MOV RDI,R12 CALL 0x0018f221 MOV ECX,EAX NEG CL MOV EDX,R15D SHL EDX,CL MOV ECX,EAX SHR R15D,CL TEST EAX,EAX CMOVZ EDX,EAX OR EDX,dword ptr [R12] MOV dword ptr [R13],EDX MOV dword ptr [R13 + 0x4],R15D CMP R15D,0x1 MOV R15D,0x2 SBB R15D,0x0 MOV dword ptr [R14 + 0x14],R15D JMP 0x0018ec8b LAB_0018ec66: LEA R12,[RBP + -0x2c] MOV RDI,R12 CALL 0x0018f221 MOV ECX,dword ptr [R12] MOV dword ptr [R13],ECX MOV dword ptr [R14 + 0x14],0x1 ADD EAX,0x20 MOV R15D,0x1 LAB_0018ec8b: CMP EBX,0x100000 JNC 0x0018ecb4 ADD EAX,0xfffffbce MOV RCX,qword ptr [RBP + -0x38] MOV dword ptr [RCX],EAX MOV EAX,R15D SHL R15D,0x5 MOV EDI,dword ptr [R13 + RAX*0x4 + -0x4] CALL 0x0018f2b2 SUB R15D,EAX JMP 0x0018eccf LAB_0018ecb4: SHR EBX,0x14 LEA ECX,[RBX + RAX*0x1] ADD ECX,0xfffffbcd MOV RDX,qword ptr [RBP + -0x38] MOV dword ptr [RDX],ECX MOV R15D,0x35 SUB R15D,EAX LAB_0018eccf: MOV RAX,qword ptr [RBP + -0x40] MOV dword ptr [RAX],R15D MOV RAX,R14 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long * d2b(uint *param_1,int *param_2,int *param_3,int8 param_4) { uint *puVar1; int iVar2; long *plVar3; uint uVar4; uint uVar5; uint uVar6; uint local_38; uint local_34; plVar3 = (long *)Balloc(1,param_4); puVar1 = (uint *)*plVar3; uVar6 = param_1[1] & 0xfffff; uVar5 = param_1[1] & 0x7fffffff; param_1[1] = uVar5; if (0xfffff < uVar5) { uVar6 = uVar6 | 0x100000; } local_38 = *param_1; local_34 = uVar6; if (local_38 == 0) { iVar2 = lo0bits(&local_34); *puVar1 = local_34; *(int4 *)((long)plVar3 + 0x14) = 1; iVar2 = iVar2 + 0x20; uVar6 = 1; } else { iVar2 = lo0bits(&local_38); uVar4 = uVar6 << (-(byte)iVar2 & 0x1f); uVar6 = uVar6 >> ((byte)iVar2 & 0x1f); if (iVar2 == 0) { uVar4 = 0; } *puVar1 = uVar4 | local_38; puVar1[1] = uVar6; uVar6 = 2 - (uVar6 == 0); *(uint *)((long)plVar3 + 0x14) = uVar6; } if (uVar5 < 0x100000) { *param_2 = iVar2 + -0x432; iVar2 = hi0bits(puVar1[(ulong)uVar6 - 1]); iVar2 = uVar6 * 0x20 - iVar2; } else { *param_2 = (uVar5 >> 0x14) + iVar2 + -0x433; iVar2 = 0x35 - iVar2; } *param_3 = iVar2; return plVar3; }
16,869
free_block
eloqsql/storage/maria/ma_pagecache.c
static my_bool free_block(PAGECACHE *pagecache, PAGECACHE_BLOCK_LINK *block, my_bool abort_if_pinned) { uint status= block->status; KEYCACHE_THREAD_TRACE("free block"); KEYCACHE_DBUG_PRINT("free_block", ("block: %u hash_link %p", PCBLOCK_NUMBER(pagecache, block), block->hash_link)); mysql_mutex_assert_owner(&pagecache->cache_lock); if (block->hash_link) { /* While waiting for readers to finish, new readers might request the block. But since we set block->status|= PCBLOCK_REASSIGNED, they will wait on block->wqueue[COND_FOR_SAVED]. They must be signaled later. */ block->status|= PCBLOCK_REASSIGNED; wait_for_readers(pagecache, block); if (unlikely(abort_if_pinned) && unlikely(block->pins)) { /* Block got pinned while waiting for readers. This can only happens when called from flush_pagecache_blocks_int() when flushing blocks as part of prepare for maria_close() or from flush_cached_blocks() */ block->status&= ~PCBLOCK_REASSIGNED; unreg_request(pagecache, block, 0); /* All pending requests for this page must be resubmitted. */ if (block->wqueue[COND_FOR_SAVED].last_thread) wqueue_release_queue(&block->wqueue[COND_FOR_SAVED]); return 1; } unlink_hash(pagecache, block->hash_link); } unlink_changed(block); DBUG_ASSERT(block->wlocks == 0); DBUG_ASSERT(block->rlocks == 0); DBUG_ASSERT(block->rlocks_queue == 0); DBUG_ASSERT(block->pins == 0); DBUG_ASSERT((block->status & ~(PCBLOCK_ERROR | PCBLOCK_READ | PCBLOCK_IN_FLUSH | PCBLOCK_CHANGED | PCBLOCK_REASSIGNED | PCBLOCK_DEL_WRITE)) == 0); DBUG_ASSERT(block->requests >= 1); DBUG_ASSERT(block->next_used == NULL); block->status= 0; #ifdef DBUG_ASSERT_EXISTS block->type= PAGECACHE_EMPTY_PAGE; #endif block->rec_lsn= LSN_MAX; DBUG_PRINT("hash", ("block (Free): %p, hash_link: %p -> NULL", block, block->hash_link)); block->hash_link= NULL; if (block->temperature == PCBLOCK_WARM) pagecache->warm_blocks--; block->temperature= PCBLOCK_COLD; KEYCACHE_THREAD_TRACE("free block"); KEYCACHE_DBUG_PRINT("free_block", ("block is freed")); unreg_request(pagecache, block, 0); /* Block->requests is != 0 if unreg_requests()/link_block() gave the block to a waiting thread */ if (!block->requests) { DBUG_ASSERT(block->next_used != 0); /* Remove the free block from the LRU ring. */ unlink_block(pagecache, block); /* Insert the free block in the free list. */ block->next_used= pagecache->free_block_list; pagecache->free_block_list= block; /* Keep track of the number of currently unused blocks. */ pagecache->blocks_unused++; } else { /* keep flag set by link_block() */ block->status= status & PCBLOCK_REASSIGNED; } /* All pending requests for this page must be resubmitted. */ if (block->wqueue[COND_FOR_SAVED].last_thread) wqueue_release_queue(&block->wqueue[COND_FOR_SAVED]); return 0; }
O0
c
free_block: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movb %dl, %al movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movb %al, -0x19(%rbp) movq -0x18(%rbp), %rax movzwl 0x74(%rax), %eax movl %eax, -0x20(%rbp) jmp 0x30a62 jmp 0x30a64 jmp 0x30a66 movq -0x18(%rbp), %rax cmpq $0x0, 0x20(%rax) je 0x30b14 movq -0x18(%rbp), %rax movzwl 0x74(%rax), %ecx orl $0x8, %ecx movw %cx, 0x74(%rax) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x30d60 movsbl -0x19(%rbp), %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x30b03 movq -0x18(%rbp), %rax cmpl $0x0, 0x64(%rax) setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x30b03 movq -0x18(%rbp), %rax movzwl 0x74(%rax), %ecx andl $-0x9, %ecx movw %cx, 0x74(%rax) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi xorl %edx, %edx callq 0x2d430 movq -0x18(%rbp), %rax cmpq $0x0, 0x50(%rax) je 0x30afa movq -0x18(%rbp), %rdi addq $0x48, %rdi addq $0x8, %rdi callq 0xff720 movb $0x1, -0x1(%rbp) jmp 0x30c19 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rax movq 0x20(%rax), %rsi callq 0x30890 movq -0x18(%rbp), %rdi callq 0x30e90 jmp 0x30b1f jmp 0x30b21 jmp 0x30b23 jmp 0x30b25 jmp 0x30b27 jmp 0x30b29 jmp 0x30b2b jmp 0x30b2d jmp 0x30b2f jmp 0x30b31 jmp 0x30b33 jmp 0x30b35 jmp 0x30b37 movq -0x18(%rbp), %rax movw $0x0, 0x74(%rax) movq -0x18(%rbp), %rax movabsq $0xffffffffffffff, %rcx # imm = 0xFFFFFFFFFFFFFF movq %rcx, 0x88(%rax) jmp 0x30b58 movq -0x18(%rbp), %rax movq $0x0, 0x20(%rax) movq -0x18(%rbp), %rax cmpl $0x1, 0x78(%rax) jne 0x30b7e movq -0x10(%rbp), %rax movq 0x60(%rax), %rcx addq $-0x1, %rcx movq %rcx, 0x60(%rax) movq -0x18(%rbp), %rax movl $0x0, 0x78(%rax) jmp 0x30b8b movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi xorl %edx, %edx callq 0x2d430 movq -0x18(%rbp), %rax cmpl $0x0, 0x60(%rax) jne 0x30be8 jmp 0x30ba6 jmp 0x30ba8 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x30ed0 movq -0x10(%rbp), %rax movq 0xa0(%rax), %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movq -0x18(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0xa0(%rax) movq -0x10(%rbp), %rax movq 0x50(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x50(%rax) jmp 0x30bf9 movl -0x20(%rbp), %eax andl $0x8, %eax movw %ax, %cx movq -0x18(%rbp), %rax movw %cx, 0x74(%rax) movq -0x18(%rbp), %rax cmpq $0x0, 0x50(%rax) je 0x30c15 movq -0x18(%rbp), %rdi addq $0x48, %rdi addq $0x8, %rdi callq 0xff720 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
free_block: push rbp mov rbp, rsp sub rsp, 20h mov al, dl mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_19], al mov rax, [rbp+var_18] movzx eax, word ptr [rax+74h] mov [rbp+var_20], eax jmp short $+2 loc_30A62: jmp short $+2 loc_30A64: jmp short $+2 loc_30A66: mov rax, [rbp+var_18] cmp qword ptr [rax+20h], 0 jz loc_30B14 mov rax, [rbp+var_18] movzx ecx, word ptr [rax+74h] or ecx, 8 mov [rax+74h], cx mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call wait_for_readers movsx eax, [rbp+var_19] cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_30B03 mov rax, [rbp+var_18] cmp dword ptr [rax+64h], 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_30B03 mov rax, [rbp+var_18] movzx ecx, word ptr [rax+74h] and ecx, 0FFFFFFF7h mov [rax+74h], cx mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] xor edx, edx call unreg_request mov rax, [rbp+var_18] cmp qword ptr [rax+50h], 0 jz short loc_30AFA mov rdi, [rbp+var_18] add rdi, 48h ; 'H' add rdi, 8 call wqueue_release_queue loc_30AFA: mov [rbp+var_1], 1 jmp loc_30C19 loc_30B03: mov rdi, [rbp+var_10] mov rax, [rbp+var_18] mov rsi, [rax+20h] call unlink_hash loc_30B14: mov rdi, [rbp+var_18] call unlink_changed jmp short $+2 loc_30B1F: jmp short $+2 loc_30B21: jmp short $+2 loc_30B23: jmp short $+2 loc_30B25: jmp short $+2 loc_30B27: jmp short $+2 loc_30B29: jmp short $+2 loc_30B2B: jmp short $+2 loc_30B2D: jmp short $+2 loc_30B2F: jmp short $+2 loc_30B31: jmp short $+2 loc_30B33: jmp short $+2 loc_30B35: jmp short $+2 loc_30B37: mov rax, [rbp+var_18] mov word ptr [rax+74h], 0 mov rax, [rbp+var_18] mov rcx, 0FFFFFFFFFFFFFFh mov [rax+88h], rcx jmp short $+2 loc_30B58: mov rax, [rbp+var_18] mov qword ptr [rax+20h], 0 mov rax, [rbp+var_18] cmp dword ptr [rax+78h], 1 jnz short loc_30B7E mov rax, [rbp+var_10] mov rcx, [rax+60h] add rcx, 0FFFFFFFFFFFFFFFFh mov [rax+60h], rcx loc_30B7E: mov rax, [rbp+var_18] mov dword ptr [rax+78h], 0 jmp short $+2 loc_30B8B: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] xor edx, edx call unreg_request mov rax, [rbp+var_18] cmp dword ptr [rax+60h], 0 jnz short loc_30BE8 jmp short $+2 loc_30BA6: jmp short $+2 loc_30BA8: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call unlink_block mov rax, [rbp+var_10] mov rcx, [rax+0A0h] mov rax, [rbp+var_18] mov [rax], rcx mov rcx, [rbp+var_18] mov rax, [rbp+var_10] mov [rax+0A0h], rcx mov rax, [rbp+var_10] mov rcx, [rax+50h] add rcx, 1 mov [rax+50h], rcx jmp short loc_30BF9 loc_30BE8: mov eax, [rbp+var_20] and eax, 8 mov cx, ax mov rax, [rbp+var_18] mov [rax+74h], cx loc_30BF9: mov rax, [rbp+var_18] cmp qword ptr [rax+50h], 0 jz short loc_30C15 mov rdi, [rbp+var_18] add rdi, 48h ; 'H' add rdi, 8 call wqueue_release_queue loc_30C15: mov [rbp+var_1], 0 loc_30C19: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char free_block(_QWORD *a1, long long a2, char a3) { __int16 v4; // [rsp+0h] [rbp-20h] v4 = *(_WORD *)(a2 + 116); if ( *(_QWORD *)(a2 + 32) ) { *(_WORD *)(a2 + 116) |= 8u; wait_for_readers(a1, a2); if ( a3 && *(_DWORD *)(a2 + 100) ) { *(_WORD *)(a2 + 116) &= ~8u; unreg_request(a1, a2, 0); if ( *(_QWORD *)(a2 + 80) ) wqueue_release_queue(a2 + 80); return 1; } unlink_hash(a1, *(long long **)(a2 + 32)); } unlink_changed(a2); *(_WORD *)(a2 + 116) = 0; *(_QWORD *)(a2 + 136) = 0xFFFFFFFFFFFFFFLL; *(_QWORD *)(a2 + 32) = 0LL; if ( *(_DWORD *)(a2 + 120) == 1 ) --a1[12]; *(_DWORD *)(a2 + 120) = 0; unreg_request(a1, a2, 0); if ( *(_DWORD *)(a2 + 96) ) { *(_WORD *)(a2 + 116) = v4 & 8; } else { unlink_block(a1, a2); *(_QWORD *)a2 = a1[20]; a1[20] = a2; ++a1[10]; } if ( *(_QWORD *)(a2 + 80) ) wqueue_release_queue(a2 + 80); return 0; }
free_block: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV AL,DL MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV byte ptr [RBP + -0x19],AL MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX + 0x74] MOV dword ptr [RBP + -0x20],EAX JMP 0x00130a62 LAB_00130a62: JMP 0x00130a64 LAB_00130a64: JMP 0x00130a66 LAB_00130a66: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x20],0x0 JZ 0x00130b14 MOV RAX,qword ptr [RBP + -0x18] MOVZX ECX,word ptr [RAX + 0x74] OR ECX,0x8 MOV word ptr [RAX + 0x74],CX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00130d60 MOVSX EAX,byte ptr [RBP + -0x19] CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x00130b03 MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x64],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x00130b03 MOV RAX,qword ptr [RBP + -0x18] MOVZX ECX,word ptr [RAX + 0x74] AND ECX,0xfffffff7 MOV word ptr [RAX + 0x74],CX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] XOR EDX,EDX CALL 0x0012d430 MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x50],0x0 JZ 0x00130afa MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x48 ADD RDI,0x8 CALL 0x001ff720 LAB_00130afa: MOV byte ptr [RBP + -0x1],0x1 JMP 0x00130c19 LAB_00130b03: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0x20] CALL 0x00130890 LAB_00130b14: MOV RDI,qword ptr [RBP + -0x18] CALL 0x00130e90 JMP 0x00130b1f LAB_00130b1f: JMP 0x00130b21 LAB_00130b21: JMP 0x00130b23 LAB_00130b23: JMP 0x00130b25 LAB_00130b25: JMP 0x00130b27 LAB_00130b27: JMP 0x00130b29 LAB_00130b29: JMP 0x00130b2b LAB_00130b2b: JMP 0x00130b2d LAB_00130b2d: JMP 0x00130b2f LAB_00130b2f: JMP 0x00130b31 LAB_00130b31: JMP 0x00130b33 LAB_00130b33: JMP 0x00130b35 LAB_00130b35: JMP 0x00130b37 LAB_00130b37: MOV RAX,qword ptr [RBP + -0x18] MOV word ptr [RAX + 0x74],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,0xffffffffffffff MOV qword ptr [RAX + 0x88],RCX JMP 0x00130b58 LAB_00130b58: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x20],0x0 MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x78],0x1 JNZ 0x00130b7e MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x60] ADD RCX,-0x1 MOV qword ptr [RAX + 0x60],RCX LAB_00130b7e: MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x78],0x0 JMP 0x00130b8b LAB_00130b8b: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] XOR EDX,EDX CALL 0x0012d430 MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x60],0x0 JNZ 0x00130be8 JMP 0x00130ba6 LAB_00130ba6: JMP 0x00130ba8 LAB_00130ba8: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00130ed0 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0xa0] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xa0],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x50] ADD RCX,0x1 MOV qword ptr [RAX + 0x50],RCX JMP 0x00130bf9 LAB_00130be8: MOV EAX,dword ptr [RBP + -0x20] AND EAX,0x8 MOV CX,AX MOV RAX,qword ptr [RBP + -0x18] MOV word ptr [RAX + 0x74],CX LAB_00130bf9: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x50],0x0 JZ 0x00130c15 MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x48 ADD RDI,0x8 CALL 0x001ff720 LAB_00130c15: MOV byte ptr [RBP + -0x1],0x0 LAB_00130c19: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 free_block(long param_1,int8 *param_2,char param_3) { ushort uVar1; uVar1 = *(ushort *)((long)param_2 + 0x74); if (param_2[4] != 0) { *(ushort *)((long)param_2 + 0x74) = *(ushort *)((long)param_2 + 0x74) | 8; wait_for_readers(param_1,param_2); if ((param_3 != '\0') && (*(int *)((long)param_2 + 100) != 0)) { *(ushort *)((long)param_2 + 0x74) = *(ushort *)((long)param_2 + 0x74) & 0xfff7; unreg_request(param_1,param_2,0); if (param_2[10] != 0) { wqueue_release_queue(param_2 + 10); } return 1; } unlink_hash(param_1,param_2[4]); } unlink_changed(param_2); *(int2 *)((long)param_2 + 0x74) = 0; param_2[0x11] = 0xffffffffffffff; param_2[4] = 0; if (*(int *)(param_2 + 0xf) == 1) { *(long *)(param_1 + 0x60) = *(long *)(param_1 + 0x60) + -1; } *(int4 *)(param_2 + 0xf) = 0; unreg_request(param_1,param_2,0); if (*(int *)(param_2 + 0xc) == 0) { unlink_block(param_1,param_2); *param_2 = *(int8 *)(param_1 + 0xa0); *(int8 **)(param_1 + 0xa0) = param_2; *(long *)(param_1 + 0x50) = *(long *)(param_1 + 0x50) + 1; } else { *(ushort *)((long)param_2 + 0x74) = uVar1 & 8; } if (param_2[10] != 0) { wqueue_release_queue(param_2 + 10); } return 0; }
16,870
LefDefParser::lefwArrayCanplaceStr(char const*, double, double, char const*, double, double, double, double)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwArrayCanplaceStr(const char *name, double origX, double origY, const char *orient, double numX, double numY, double spaceX, double spaceY) { if (!lefwFile) return LEFW_UNINITIALIZED; if (lefwState != LEFW_ARRAY_START && lefwState != LEFW_ARRAY) return LEFW_BAD_ORDER; if (!name || name == 0 || *name == 0) return LEFW_BAD_DATA; if (lefwWriteEncrypt) encPrint(lefwFile, (char*) " CANPLACE %s %.11g %.11g %s DO %.11g BY %.11g STEP %.11g %.11g ;\n", name, origX, origY, orient, numX, numY, spaceX, spaceY); else fprintf(lefwFile, " CANPLACE %s %.11g %.11g %s DO %.11g BY %.11g STEP %.11g %.11g ;\n", name, origX, origY, orient, numX, numY, spaceX, spaceY); lefwLines++; lefwHasArrayReq = 1; lefwState = LEFW_ARRAY; return LEFW_OK; }
O3
cpp
LefDefParser::lefwArrayCanplaceStr(char const*, double, double, char const*, double, double, double, double): pushq %rbx movq %rdi, %rdx leaq 0x72093(%rip), %rax # 0x8d0f0 movq (%rax), %rdi testq %rdi, %rdi je 0x1b0a8 movq %rsi, %rcx leaq 0x722d1(%rip), %rbx # 0x8d340 movl (%rbx), %esi cmpl $0x13, %esi je 0x1b080 movl $0x2, %eax cmpl $0x2, %esi jne 0x1b0db movl $0x3, %eax testq %rdx, %rdx je 0x1b0db cmpb $0x0, (%rdx) je 0x1b0db cmpb $0x1, 0x72346(%rip) # 0x8d3dc jne 0x1b0af leaq 0x40b86(%rip), %rsi # 0x5bc25 movb $0x6, %al callq 0x55afd jmp 0x1b0bd movl $0x1, %eax jmp 0x1b0db leaq 0x40b6f(%rip), %rsi # 0x5bc25 movb $0x6, %al callq 0x22e0 leaq 0x72278(%rip), %rax # 0x8d33c incl (%rax) leaq 0x72297(%rip), %rax # 0x8d364 movl $0x1, (%rax) movl $0x13, (%rbx) xorl %eax, %eax popq %rbx retq
_ZN12LefDefParser20lefwArrayCanplaceStrEPKcddS1_dddd: push rbx mov rdx, rdi lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] test rdi, rdi jz short loc_1B0A8 mov rcx, rsi lea rbx, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState mov esi, [rbx] cmp esi, 13h jz short loc_1B080 mov eax, 2 cmp esi, 2 jnz short loc_1B0DB loc_1B080: mov eax, 3 test rdx, rdx jz short loc_1B0DB cmp byte ptr [rdx], 0 jz short loc_1B0DB cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt jnz short loc_1B0AF lea rsi, aCanplaceS11g11; " CANPLACE %s %.11g %.11g %s DO %.11g "... mov al, 6 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_1B0BD loc_1B0A8: mov eax, 1 jmp short loc_1B0DB loc_1B0AF: lea rsi, aCanplaceS11g11; " CANPLACE %s %.11g %.11g %s DO %.11g "... mov al, 6 call _fprintf loc_1B0BD: lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines inc dword ptr [rax] lea rax, _ZN12LefDefParser15lefwHasArrayReqE; LefDefParser::lefwHasArrayReq mov dword ptr [rax], 1 mov dword ptr [rbx], 13h xor eax, eax loc_1B0DB: pop rbx retn
long long LefDefParser::lefwArrayCanplaceStr( LefDefParser *this, const char *a2, double a3, double a4, const char *a5, double a6, double a7, double a8, double a9, long long a10, int a11, int a12) { long long result; // rax if ( !*(_QWORD *)&LefDefParser::lefwFile ) return 1LL; if ( LefDefParser::lefwState == 19 || (result = 2LL, LefDefParser::lefwState == 2) ) { result = 3LL; if ( this ) { if ( *(_BYTE *)this ) { if ( LefDefParser::lefwWriteEncrypt == 1 ) LefDefParser::encPrint( LefDefParser::lefwFile, (unsigned int)" CANPLACE %s %.11g %.11g %s DO %.11g BY %.11g STEP %.11g %.11g ;\n", (_DWORD)this, (_DWORD)a2, a11, a12); else fprintf( *(_QWORD *)&LefDefParser::lefwFile, " CANPLACE %s %.11g %.11g %s DO %.11g BY %.11g STEP %.11g %.11g ;\n", (const char *)this, a3, a4, a2, a6, a7, a8, a9); ++LefDefParser::lefwLines; LefDefParser::lefwHasArrayReq = 1; LefDefParser::lefwState = 19; return 0LL; } } } return result; }
lefwArrayCanplaceStr: PUSH RBX MOV RDX,RDI LEA RAX,[0x18d0f0] MOV RDI,qword ptr [RAX] TEST RDI,RDI JZ 0x0011b0a8 MOV RCX,RSI LEA RBX,[0x18d340] MOV ESI,dword ptr [RBX] CMP ESI,0x13 JZ 0x0011b080 MOV EAX,0x2 CMP ESI,0x2 JNZ 0x0011b0db LAB_0011b080: MOV EAX,0x3 TEST RDX,RDX JZ 0x0011b0db CMP byte ptr [RDX],0x0 JZ 0x0011b0db CMP byte ptr [0x0018d3dc],0x1 JNZ 0x0011b0af LEA RSI,[0x15bc25] MOV AL,0x6 CALL 0x00155afd JMP 0x0011b0bd LAB_0011b0a8: MOV EAX,0x1 JMP 0x0011b0db LAB_0011b0af: LEA RSI,[0x15bc25] MOV AL,0x6 CALL 0x001022e0 LAB_0011b0bd: LEA RAX,[0x18d33c] INC dword ptr [RAX] LEA RAX,[0x18d364] MOV dword ptr [RAX],0x1 MOV dword ptr [RBX],0x13 XOR EAX,EAX LAB_0011b0db: POP RBX RET
/* LefDefParser::lefwArrayCanplaceStr(char const*, double, double, char const*, double, double, double, double) */ int8 LefDefParser::lefwArrayCanplaceStr (char *param_1,double param_2,double param_3,char *param_4,double param_5,double param_6, double param_7,double param_8) { int8 uVar1; if (lefwFile == (_IO_FILE *)0x0) { uVar1 = 1; } else if ((((lefwState == 0x13) || (uVar1 = 2, lefwState == 2)) && (uVar1 = 3, param_1 != (char *)0x0)) && (*param_1 != '\0')) { if (lefwWriteEncrypt == '\x01') { encPrint(lefwFile," CANPLACE %s %.11g %.11g %s DO %.11g BY %.11g STEP %.11g %.11g ;\n"); } else { fprintf(lefwFile," CANPLACE %s %.11g %.11g %s DO %.11g BY %.11g STEP %.11g %.11g ;\n", param_1,param_4); } lefwLines = lefwLines + 1; lefwHasArrayReq = 1; lefwState = 0x13; uVar1 = 0; } return uVar1; }
16,871
ft2_search
eloqsql/storage/myisam/ft_boolean_search.c
static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search) { int r; MYISAM_SHARE *share= ftb->info->s; if (share->concurrent_insert) mysql_rwlock_rdlock(&share->key_root_lock[ftb->keynr]); r= _ft2_search_no_lock(ftb, ftbw, init_search); if (share->concurrent_insert) mysql_rwlock_unlock(&share->key_root_lock[ftb->keynr]); return r; }
O0
c
ft2_search: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movb %dl, %al movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movb %al, -0x11(%rbp) movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax cmpb $0x0, 0x384(%rax) je 0xa6901 movq -0x20(%rbp), %rax movq 0x4c8(%rax), %rdi movq -0x8(%rbp), %rax movl 0x340(%rax), %eax imulq $0x98, %rax, %rax addq %rax, %rdi leaq 0xb4fee(%rip), %rsi # 0x15b8e5 movl $0x1e4, %edx # imm = 0x1E4 callq 0xa7ae0 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movsbl -0x11(%rbp), %edx callq 0xa7b50 movl %eax, -0x18(%rbp) movq -0x20(%rbp), %rax cmpb $0x0, 0x384(%rax) je 0xa6946 movq -0x20(%rbp), %rax movq 0x4c8(%rax), %rdi movq -0x8(%rbp), %rax movl 0x340(%rax), %eax imulq $0x98, %rax, %rax addq %rax, %rdi callq 0xa80f0 movl -0x18(%rbp), %eax addq $0x20, %rsp popq %rbp retq nop
_ft2_search: push rbp mov rbp, rsp sub rsp, 20h mov al, dl mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_11], al mov rax, [rbp+var_8] mov rax, [rax+8] mov rax, [rax] mov [rbp+var_20], rax mov rax, [rbp+var_20] cmp byte ptr [rax+384h], 0 jz short loc_A6901 mov rax, [rbp+var_20] mov rdi, [rax+4C8h] mov rax, [rbp+var_8] mov eax, [rax+340h] imul rax, 98h add rdi, rax lea rsi, aWorkspaceLlm4b_30; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 1E4h call inline_mysql_rwlock_rdlock_7 loc_A6901: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] movsx edx, [rbp+var_11] call _ft2_search_no_lock mov [rbp+var_18], eax mov rax, [rbp+var_20] cmp byte ptr [rax+384h], 0 jz short loc_A6946 mov rax, [rbp+var_20] mov rdi, [rax+4C8h] mov rax, [rbp+var_8] mov eax, [rax+340h] imul rax, 98h add rdi, rax call inline_mysql_rwlock_unlock_9 loc_A6946: mov eax, [rbp+var_18] add rsp, 20h pop rbp retn
long long ft2_search(long long a1, long long a2, char a3) { long long v4; // [rsp+0h] [rbp-20h] unsigned int v5; // [rsp+8h] [rbp-18h] v4 = **(_QWORD **)(a1 + 8); if ( *(_BYTE *)(v4 + 900) ) inline_mysql_rwlock_rdlock_7( 152LL * *(unsigned int *)(a1 + 832) + *(_QWORD *)(v4 + 1224), "/workspace/llm4binary/github2025/eloqsql/storage/myisam/ft_boolean_search.c", 484LL); v5 = ft2_search_no_lock(a1, a2, (unsigned int)a3); if ( *(_BYTE *)(v4 + 900) ) inline_mysql_rwlock_unlock_9(152LL * *(unsigned int *)(a1 + 832) + *(_QWORD *)(v4 + 1224)); return v5; }
_ft2_search: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV AL,DL MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV byte ptr [RBP + -0x11],AL MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] CMP byte ptr [RAX + 0x384],0x0 JZ 0x001a6901 MOV RAX,qword ptr [RBP + -0x20] MOV RDI,qword ptr [RAX + 0x4c8] MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x340] IMUL RAX,RAX,0x98 ADD RDI,RAX LEA RSI,[0x25b8e5] MOV EDX,0x1e4 CALL 0x001a7ae0 LAB_001a6901: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOVSX EDX,byte ptr [RBP + -0x11] CALL 0x001a7b50 MOV dword ptr [RBP + -0x18],EAX MOV RAX,qword ptr [RBP + -0x20] CMP byte ptr [RAX + 0x384],0x0 JZ 0x001a6946 MOV RAX,qword ptr [RBP + -0x20] MOV RDI,qword ptr [RAX + 0x4c8] MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x340] IMUL RAX,RAX,0x98 ADD RDI,RAX CALL 0x001a80f0 LAB_001a6946: MOV EAX,dword ptr [RBP + -0x18] ADD RSP,0x20 POP RBP RET
int4 _ft2_search(long param_1,int8 param_2,char param_3) { long lVar1; int4 uVar2; lVar1 = **(long **)(param_1 + 8); if (*(char *)(lVar1 + 900) != '\0') { inline_mysql_rwlock_rdlock (*(long *)(lVar1 + 0x4c8) + (ulong)*(uint *)(param_1 + 0x340) * 0x98, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/ft_boolean_search.c",0x1e4); } uVar2 = _ft2_search_no_lock(param_1,param_2,(int)param_3); if (*(char *)(lVar1 + 900) != '\0') { inline_mysql_rwlock_unlock(*(long *)(lVar1 + 0x4c8) + (ulong)*(uint *)(param_1 + 0x340) * 0x98); } return uVar2; }
16,872
google::protobuf::compiler::Version* google::protobuf::Arena::CreateMaybeMessage<google::protobuf::compiler::Version>(google::protobuf::Arena*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/plugin.pb.cc
CodeGeneratorRequest::CodeGeneratorRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { SharedCtor(arena, is_message_owned); // @@protoc_insertion_point(arena_constructor:google.protobuf.compiler.CodeGeneratorRequest) }
O3
cpp
google::protobuf::compiler::Version* google::protobuf::Arena::CreateMaybeMessage<google::protobuf::compiler::Version>(google::protobuf::Arena*): pushq %rbx testq %rdi, %rdi je 0xaf436 movq %rdi, %rbx leaq 0x5284a(%rip), %rdx # 0x101c70 movl $0x30, %esi callq 0x92e00 movq %rbx, 0x8(%rax) jmp 0xaf448 movl $0x30, %edi callq 0xf350 movq $0x0, 0x8(%rax) leaq 0x52541(%rip), %rcx # 0x101990 movq %rcx, (%rax) xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rax) movups %xmm0, 0x1c(%rax) leaq 0x53e14(%rip), %rcx # 0x103278 movq %rcx, 0x18(%rax) popq %rbx retq
_ZN6google8protobuf5Arena18CreateMaybeMessageINS0_8compiler7VersionEJEEEPT_PS1_DpOT0_: push rbx test rdi, rdi jz short loc_AF436 mov rbx, rdi lea rdx, _ZTIN6google8protobuf8compiler7VersionE; type_info * mov esi, 30h ; '0'; unsigned __int64 call _ZN6google8protobuf5Arena23AllocateAlignedWithHookEmPKSt9type_info; google::protobuf::Arena::AllocateAlignedWithHook(ulong,std::type_info const*) mov [rax+8], rbx jmp short loc_AF448 loc_AF436: mov edi, 30h ; '0'; unsigned __int64 call __Znwm; operator new(ulong) mov qword ptr [rax+8], 0 loc_AF448: lea rcx, off_101990 mov [rax], rcx xorps xmm0, xmm0 movups xmmword ptr [rax+10h], xmm0 movups xmmword ptr [rax+1Ch], xmm0 lea rcx, _ZN6google8protobuf8internal26fixed_address_empty_stringB5cxx11E; google::protobuf::internal::fixed_address_empty_string mov [rax+18h], rcx pop rbx retn
long long google::protobuf::Arena::CreateMaybeMessage<google::protobuf::compiler::Version>( google::protobuf::Arena *a1) { long long result; // rax if ( a1 ) { result = google::protobuf::Arena::AllocateAlignedWithHook( a1, 0x30uLL, (const type_info *)&`typeinfo for'google::protobuf::compiler::Version); *(_QWORD *)(result + 8) = a1; } else { result = operator new(0x30uLL); *(_QWORD *)(result + 8) = 0LL; } *(_QWORD *)result = off_101990; *(_OWORD *)(result + 16) = 0LL; *(_OWORD *)(result + 28) = 0LL; *(_QWORD *)(result + 24) = google::protobuf::internal::fixed_address_empty_string[abi:cxx11]; return result; }
CreateMaybeMessage<google::protobuf::compiler::Version>: PUSH RBX TEST RDI,RDI JZ 0x001af436 MOV RBX,RDI LEA RDX,[0x201c70] MOV ESI,0x30 CALL 0x00192e00 MOV qword ptr [RAX + 0x8],RBX JMP 0x001af448 LAB_001af436: MOV EDI,0x30 CALL 0x0010f350 MOV qword ptr [RAX + 0x8],0x0 LAB_001af448: LEA RCX,[0x201990] MOV qword ptr [RAX],RCX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + 0x10],XMM0 MOVUPS xmmword ptr [RAX + 0x1c],XMM0 LEA RCX,[0x203278] MOV qword ptr [RAX + 0x18],RCX POP RBX RET
/* google::protobuf::compiler::Version* google::protobuf::Arena::CreateMaybeMessage<google::protobuf::compiler::Version>(google::protobuf::Arena*) */ Version * google::protobuf::Arena::CreateMaybeMessage<google::protobuf::compiler::Version> (Arena *param_1) { Version *pVVar1; if (param_1 == (Arena *)0x0) { pVVar1 = (Version *)operator_new(0x30); *(int8 *)(pVVar1 + 8) = 0; } else { pVVar1 = (Version *)AllocateAlignedWithHook((ulong)param_1,(type_info *)0x30); *(Arena **)(pVVar1 + 8) = param_1; } *(int ***)pVVar1 = &PTR__Version_00201990; *(int8 *)(pVVar1 + 0x10) = 0; *(int8 *)(pVVar1 + 0x18) = 0; *(int8 *)(pVVar1 + 0x1c) = 0; *(int8 *)(pVVar1 + 0x24) = 0; *(int8 **)(pVVar1 + 0x18) = &internal::fixed_address_empty_string_abi_cxx11_; return pVVar1; }
16,873
my_hash_update
eloqsql/mysys/hash.c
my_bool my_hash_update(HASH *hash, uchar *record, uchar *old_key, size_t old_key_length) { uint new_index, new_pos_index, org_index, records, idx; size_t length, empty, blength; my_hash_value_type hash_nr; HASH_LINK org_link,*data,*previous,*pos; uchar *new_key; DBUG_ENTER("my_hash_update"); new_key= (uchar*) my_hash_key(hash, record, &length, 1); hash_nr= hash->hash_function(hash->charset, new_key, length); if (HASH_UNIQUE & hash->flags) { HASH_SEARCH_STATE state; uchar *found; if ((found= my_hash_first_from_hash_value(hash, hash_nr, new_key, length, &state))) { do { if (found != record) DBUG_RETURN(1); /* Duplicate entry */ } while ((found= my_hash_next(hash, new_key, length, &state))); } } data=dynamic_element(&hash->array,0,HASH_LINK*); blength=hash->blength; records=hash->records; /* Search after record with key */ idx= my_hash_mask(hash->hash_function(hash->charset, old_key, (old_key_length ? old_key_length : hash->key_length)), blength, records); org_index= idx; new_index= my_hash_mask(hash_nr, blength, records); previous=0; for (;;) { if ((pos= data+idx)->data == record) break; previous=pos; if ((idx=pos->next) == NO_RECORD) DBUG_RETURN(1); /* Not found in links */ } if (org_index == new_index) { data[idx].hash_nr= hash_nr; /* Hash number may have changed */ DBUG_RETURN(0); /* Record is in right position */ } org_link= *pos; empty=idx; /* Relink record from current chain */ if (!previous) { if (pos->next != NO_RECORD) { empty=pos->next; *pos= data[pos->next]; } } else previous->next=pos->next; /* unlink pos */ /* Move data to correct position */ if (new_index == empty) { /* At this point record is unlinked from the old chain, thus it holds random position. By the chance this position is equal to position for the first element in the new chain. That means updated record is the only record in the new chain. */ if (empty != idx) { /* Record was moved while unlinking it from the old chain. Copy data to a new position. */ data[empty]= org_link; } data[empty].next= NO_RECORD; data[empty].hash_nr= hash_nr; DBUG_RETURN(0); } pos=data+new_index; new_pos_index= my_hash_rec_mask(pos, blength, records); if (new_index != new_pos_index) { /* Other record in wrong position */ data[empty]= *pos; movelink(data,new_index,new_pos_index, (uint) empty); org_link.next=NO_RECORD; data[new_index]= org_link; data[new_index].hash_nr= hash_nr; } else { /* Link in chain at right position */ org_link.next=data[new_index].next; data[empty]=org_link; data[empty].hash_nr= hash_nr; data[new_index].next= (uint) empty; } DBUG_RETURN(0); }
O0
c
my_hash_update: pushq %rbp movq %rsp, %rbp subq $0xc0, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi leaq -0x48(%rbp), %rdx movl $0x1, %ecx callq 0x2be70 movq %rax, -0x90(%rbp) movq -0x10(%rbp), %rax movq 0x58(%rax), %rax movq -0x10(%rbp), %rcx movq 0x68(%rcx), %rdi movq -0x90(%rbp), %rsi movq -0x48(%rbp), %rdx callq *%rax movl %eax, -0x5c(%rbp) movq -0x10(%rbp), %rax movl 0x20(%rax), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x2c3fa movq -0x10(%rbp), %rdi movl -0x5c(%rbp), %esi movq -0x90(%rbp), %rdx movq -0x48(%rbp), %rcx leaq -0x94(%rbp), %r8 callq 0x2b650 movq %rax, -0xa0(%rbp) cmpq $0x0, %rax je 0x2c3f8 jmp 0x2c3b4 movq -0xa0(%rbp), %rax cmpq -0x18(%rbp), %rax je 0x2c3cc jmp 0x2c3c3 movb $0x1, -0x1(%rbp) jmp 0x2c712 jmp 0x2c3ce movq -0x10(%rbp), %rdi movq -0x90(%rbp), %rsi movq -0x48(%rbp), %rdx leaq -0x94(%rbp), %rcx callq 0x2b870 movq %rax, -0xa0(%rbp) cmpq $0x0, %rax jne 0x2c3b4 jmp 0x2c3f8 jmp 0x2c3fa movq -0x10(%rbp), %rax movq 0x28(%rax), %rax movq %rax, -0x78(%rbp) movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x58(%rbp) movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movl %eax, -0x38(%rbp) movq -0x10(%rbp), %rax movq 0x58(%rax), %rax movq %rax, -0xb8(%rbp) movq -0x10(%rbp), %rax movq 0x68(%rax), %rax movq %rax, -0xb0(%rbp) movq -0x20(%rbp), %rax movq %rax, -0xa8(%rbp) cmpq $0x0, -0x28(%rbp) je 0x2c45a movq -0x28(%rbp), %rax movq %rax, -0xc0(%rbp) jmp 0x2c469 movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0xc0(%rbp) movq -0xb8(%rbp), %rax movq -0xa8(%rbp), %rsi movq -0xb0(%rbp), %rdi movq -0xc0(%rbp), %rdx callq *%rax movl %eax, %edi movq -0x58(%rbp), %rsi movl -0x38(%rbp), %eax movl %eax, %edx callq 0x2b750 movl %eax, -0x3c(%rbp) movl -0x3c(%rbp), %eax movl %eax, -0x34(%rbp) movl -0x5c(%rbp), %edi movq -0x58(%rbp), %rsi movl -0x38(%rbp), %eax movl %eax, %edx callq 0x2b750 movl %eax, -0x2c(%rbp) movq $0x0, -0x80(%rbp) movq -0x78(%rbp), %rax movl -0x3c(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x88(%rbp) movq 0x8(%rax), %rax cmpq -0x18(%rbp), %rax jne 0x2c4dd jmp 0x2c506 movq -0x88(%rbp), %rax movq %rax, -0x80(%rbp) movq -0x88(%rbp), %rax movl (%rax), %eax movl %eax, -0x3c(%rbp) cmpl $-0x1, %eax jne 0x2c504 jmp 0x2c4fb movb $0x1, -0x1(%rbp) jmp 0x2c712 jmp 0x2c4bc movl -0x34(%rbp), %eax cmpl -0x2c(%rbp), %eax jne 0x2c52b movl -0x5c(%rbp), %ecx movq -0x78(%rbp), %rax movl -0x3c(%rbp), %edx shlq $0x4, %rdx addq %rdx, %rax movl %ecx, 0x4(%rax) movb $0x0, -0x1(%rbp) jmp 0x2c712 movq -0x88(%rbp), %rax movq (%rax), %rcx movq %rcx, -0x70(%rbp) movq 0x8(%rax), %rax movq %rax, -0x68(%rbp) movl -0x3c(%rbp), %eax movq %rax, -0x50(%rbp) cmpq $0x0, -0x80(%rbp) jne 0x2c593 movq -0x88(%rbp), %rax cmpl $-0x1, (%rax) je 0x2c591 movq -0x88(%rbp), %rax movl (%rax), %eax movq %rax, -0x50(%rbp) movq -0x88(%rbp), %rax movq -0x78(%rbp), %rcx movq -0x88(%rbp), %rdx movl (%rdx), %edx shlq $0x4, %rdx addq %rdx, %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) jmp 0x2c5a2 movq -0x88(%rbp), %rax movl (%rax), %ecx movq -0x80(%rbp), %rax movl %ecx, (%rax) movl -0x2c(%rbp), %eax cmpq -0x50(%rbp), %rax jne 0x2c608 movq -0x50(%rbp), %rax movl -0x3c(%rbp), %ecx cmpq %rcx, %rax je 0x2c5d5 movq -0x78(%rbp), %rax movq -0x50(%rbp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq -0x70(%rbp), %rcx movq %rcx, (%rax) movq -0x68(%rbp), %rcx movq %rcx, 0x8(%rax) movq -0x78(%rbp), %rax movq -0x50(%rbp), %rcx shlq $0x4, %rcx addq %rcx, %rax movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF movl -0x5c(%rbp), %ecx movq -0x78(%rbp), %rax movq -0x50(%rbp), %rdx shlq $0x4, %rdx addq %rdx, %rax movl %ecx, 0x4(%rax) movb $0x0, -0x1(%rbp) jmp 0x2c712 movq -0x78(%rbp), %rax movl -0x2c(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x88(%rbp) movq -0x88(%rbp), %rdi movq -0x58(%rbp), %rsi movl -0x38(%rbp), %eax movl %eax, %edx callq 0x2b840 movl %eax, -0x30(%rbp) movl -0x2c(%rbp), %eax cmpl -0x30(%rbp), %eax je 0x2c6b0 movq -0x78(%rbp), %rax movq -0x50(%rbp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq -0x88(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) movq -0x78(%rbp), %rdi movl -0x2c(%rbp), %esi movl -0x30(%rbp), %edx movq -0x50(%rbp), %rax movl %eax, %ecx callq 0x2bee0 movl $0xffffffff, -0x70(%rbp) # imm = 0xFFFFFFFF movq -0x78(%rbp), %rax movl -0x2c(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax movq -0x70(%rbp), %rcx movq %rcx, (%rax) movq -0x68(%rbp), %rcx movq %rcx, 0x8(%rax) movl -0x5c(%rbp), %ecx movq -0x78(%rbp), %rax movl -0x2c(%rbp), %edx shlq $0x4, %rdx addq %rdx, %rax movl %ecx, 0x4(%rax) jmp 0x2c70c movq -0x78(%rbp), %rax movl -0x2c(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax movl (%rax), %eax movl %eax, -0x70(%rbp) movq -0x78(%rbp), %rax movq -0x50(%rbp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq -0x70(%rbp), %rcx movq %rcx, (%rax) movq -0x68(%rbp), %rcx movq %rcx, 0x8(%rax) movl -0x5c(%rbp), %ecx movq -0x78(%rbp), %rax movq -0x50(%rbp), %rdx shlq $0x4, %rdx addq %rdx, %rax movl %ecx, 0x4(%rax) movq -0x50(%rbp), %rax movl %eax, %ecx movq -0x78(%rbp), %rax movl -0x2c(%rbp), %edx shlq $0x4, %rdx addq %rdx, %rax movl %ecx, (%rax) jmp 0x2c70e movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0xc0, %rsp popq %rbp retq nop
my_hash_update: push rbp mov rbp, rsp sub rsp, 0C0h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] lea rdx, [rbp+var_48] mov ecx, 1 call my_hash_key mov [rbp+var_90], rax mov rax, [rbp+var_10] mov rax, [rax+58h] mov rcx, [rbp+var_10] mov rdi, [rcx+68h] mov rsi, [rbp+var_90] mov rdx, [rbp+var_48] call rax mov [rbp+var_5C], eax mov rax, [rbp+var_10] mov eax, [rax+20h] and eax, 1 cmp eax, 0 jz short loc_2C3FA mov rdi, [rbp+var_10] mov esi, [rbp+var_5C] mov rdx, [rbp+var_90] mov rcx, [rbp+var_48] lea r8, [rbp+var_94] call my_hash_first_from_hash_value mov [rbp+var_A0], rax cmp rax, 0 jz short loc_2C3F8 jmp short $+2 loc_2C3B4: mov rax, [rbp+var_A0] cmp rax, [rbp+var_18] jz short loc_2C3CC jmp short $+2 loc_2C3C3: mov [rbp+var_1], 1 jmp loc_2C712 loc_2C3CC: jmp short $+2 loc_2C3CE: mov rdi, [rbp+var_10] mov rsi, [rbp+var_90] mov rdx, [rbp+var_48] lea rcx, [rbp+var_94] call my_hash_next mov [rbp+var_A0], rax cmp rax, 0 jnz short loc_2C3B4 jmp short $+2 loc_2C3F8: jmp short $+2 loc_2C3FA: mov rax, [rbp+var_10] mov rax, [rax+28h] mov [rbp+var_78], rax mov rax, [rbp+var_10] mov rax, [rax+10h] mov [rbp+var_58], rax mov rax, [rbp+var_10] mov rax, [rax+18h] mov [rbp+var_38], eax mov rax, [rbp+var_10] mov rax, [rax+58h] mov [rbp+var_B8], rax mov rax, [rbp+var_10] mov rax, [rax+68h] mov [rbp+var_B0], rax mov rax, [rbp+var_20] mov [rbp+var_A8], rax cmp [rbp+var_28], 0 jz short loc_2C45A mov rax, [rbp+var_28] mov [rbp+var_C0], rax jmp short loc_2C469 loc_2C45A: mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_C0], rax loc_2C469: mov rax, [rbp+var_B8] mov rsi, [rbp+var_A8] mov rdi, [rbp+var_B0] mov rdx, [rbp+var_C0] call rax mov edi, eax mov rsi, [rbp+var_58] mov eax, [rbp+var_38] mov edx, eax call my_hash_mask mov [rbp+var_3C], eax mov eax, [rbp+var_3C] mov [rbp+var_34], eax mov edi, [rbp+var_5C] mov rsi, [rbp+var_58] mov eax, [rbp+var_38] mov edx, eax call my_hash_mask mov [rbp+var_2C], eax mov [rbp+var_80], 0 loc_2C4BC: mov rax, [rbp+var_78] mov ecx, [rbp+var_3C] shl rcx, 4 add rax, rcx mov [rbp+var_88], rax mov rax, [rax+8] cmp rax, [rbp+var_18] jnz short loc_2C4DD jmp short loc_2C506 loc_2C4DD: mov rax, [rbp+var_88] mov [rbp+var_80], rax mov rax, [rbp+var_88] mov eax, [rax] mov [rbp+var_3C], eax cmp eax, 0FFFFFFFFh jnz short loc_2C504 jmp short $+2 loc_2C4FB: mov [rbp+var_1], 1 jmp loc_2C712 loc_2C504: jmp short loc_2C4BC loc_2C506: mov eax, [rbp+var_34] cmp eax, [rbp+var_2C] jnz short loc_2C52B mov ecx, [rbp+var_5C] mov rax, [rbp+var_78] mov edx, [rbp+var_3C] shl rdx, 4 add rax, rdx mov [rax+4], ecx mov [rbp+var_1], 0 jmp loc_2C712 loc_2C52B: mov rax, [rbp+var_88] mov rcx, [rax] mov [rbp+var_70], rcx mov rax, [rax+8] mov [rbp+var_68], rax mov eax, [rbp+var_3C] mov [rbp+var_50], rax cmp [rbp+var_80], 0 jnz short loc_2C593 mov rax, [rbp+var_88] cmp dword ptr [rax], 0FFFFFFFFh jz short loc_2C591 mov rax, [rbp+var_88] mov eax, [rax] mov [rbp+var_50], rax mov rax, [rbp+var_88] mov rcx, [rbp+var_78] mov rdx, [rbp+var_88] mov edx, [rdx] shl rdx, 4 add rcx, rdx mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx loc_2C591: jmp short loc_2C5A2 loc_2C593: mov rax, [rbp+var_88] mov ecx, [rax] mov rax, [rbp+var_80] mov [rax], ecx loc_2C5A2: mov eax, [rbp+var_2C] cmp rax, [rbp+var_50] jnz short loc_2C608 mov rax, [rbp+var_50] mov ecx, [rbp+var_3C] cmp rax, rcx jz short loc_2C5D5 mov rax, [rbp+var_78] mov rcx, [rbp+var_50] shl rcx, 4 add rax, rcx mov rcx, [rbp+var_70] mov [rax], rcx mov rcx, [rbp+var_68] mov [rax+8], rcx loc_2C5D5: mov rax, [rbp+var_78] mov rcx, [rbp+var_50] shl rcx, 4 add rax, rcx mov dword ptr [rax], 0FFFFFFFFh mov ecx, [rbp+var_5C] mov rax, [rbp+var_78] mov rdx, [rbp+var_50] shl rdx, 4 add rax, rdx mov [rax+4], ecx mov [rbp+var_1], 0 jmp loc_2C712 loc_2C608: mov rax, [rbp+var_78] mov ecx, [rbp+var_2C] shl rcx, 4 add rax, rcx mov [rbp+var_88], rax mov rdi, [rbp+var_88] mov rsi, [rbp+var_58] mov eax, [rbp+var_38] mov edx, eax call my_hash_rec_mask mov [rbp+var_30], eax mov eax, [rbp+var_2C] cmp eax, [rbp+var_30] jz short loc_2C6B0 mov rax, [rbp+var_78] mov rcx, [rbp+var_50] shl rcx, 4 add rax, rcx mov rcx, [rbp+var_88] mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx mov rdi, [rbp+var_78] mov esi, [rbp+var_2C] mov edx, [rbp+var_30] mov rax, [rbp+var_50] mov ecx, eax call movelink mov dword ptr [rbp+var_70], 0FFFFFFFFh mov rax, [rbp+var_78] mov ecx, [rbp+var_2C] shl rcx, 4 add rax, rcx mov rcx, [rbp+var_70] mov [rax], rcx mov rcx, [rbp+var_68] mov [rax+8], rcx mov ecx, [rbp+var_5C] mov rax, [rbp+var_78] mov edx, [rbp+var_2C] shl rdx, 4 add rax, rdx mov [rax+4], ecx jmp short loc_2C70C loc_2C6B0: mov rax, [rbp+var_78] mov ecx, [rbp+var_2C] shl rcx, 4 add rax, rcx mov eax, [rax] mov dword ptr [rbp+var_70], eax mov rax, [rbp+var_78] mov rcx, [rbp+var_50] shl rcx, 4 add rax, rcx mov rcx, [rbp+var_70] mov [rax], rcx mov rcx, [rbp+var_68] mov [rax+8], rcx mov ecx, [rbp+var_5C] mov rax, [rbp+var_78] mov rdx, [rbp+var_50] shl rdx, 4 add rax, rdx mov [rax+4], ecx mov rax, [rbp+var_50] mov ecx, eax mov rax, [rbp+var_78] mov edx, [rbp+var_2C] shl rdx, 4 add rax, rdx mov [rax], ecx loc_2C70C: jmp short $+2 loc_2C70E: mov [rbp+var_1], 0 loc_2C712: mov al, [rbp+var_1] add rsp, 0C0h pop rbp retn
char my_hash_update(_QWORD *a1, long long a2, long long a3, long long a4) { unsigned int v4; // eax unsigned int *v5; // rax _QWORD *v6; // rcx _QWORD *v7; // rax _QWORD *v8; // rax unsigned int *v9; // rcx _QWORD *v10; // rax _QWORD *v11; // rax long long ( *v13)(long long, long long, long long); // [rsp+8h] [rbp-B8h] long long v14; // [rsp+10h] [rbp-B0h] long long v15; // [rsp+20h] [rbp-A0h] unsigned int v16; // [rsp+2Ch] [rbp-94h] BYREF long long v17; // [rsp+30h] [rbp-90h] unsigned int *v18; // [rsp+38h] [rbp-88h] _DWORD *v19; // [rsp+40h] [rbp-80h] long long v20; // [rsp+48h] [rbp-78h] long long v21; // [rsp+50h] [rbp-70h] long long v22; // [rsp+58h] [rbp-68h] unsigned int v23; // [rsp+64h] [rbp-5Ch] unsigned long long v24; // [rsp+68h] [rbp-58h] long long v25; // [rsp+70h] [rbp-50h] long long v26; // [rsp+78h] [rbp-48h] BYREF unsigned int v27; // [rsp+84h] [rbp-3Ch] unsigned int v28; // [rsp+88h] [rbp-38h] unsigned int v29; // [rsp+8Ch] [rbp-34h] unsigned int v30; // [rsp+90h] [rbp-30h] unsigned int v31; // [rsp+94h] [rbp-2Ch] long long v32; // [rsp+98h] [rbp-28h] long long v33; // [rsp+A0h] [rbp-20h] long long v34; // [rsp+A8h] [rbp-18h] _QWORD *v35; // [rsp+B0h] [rbp-10h] v35 = a1; v34 = a2; v33 = a3; v32 = a4; v17 = my_hash_key((long long)a1, a2, &v26, 1); v23 = ((long long ( *)(_QWORD, long long, long long))v35[11])(v35[13], v17, v26); if ( (v35[4] & 1) != 0 && (v15 = my_hash_first_from_hash_value(v35, v23, v17, v26, &v16)) != 0 ) { while ( v15 == v34 ) { v15 = my_hash_next((long long)v35, v17, v26, &v16); if ( !v15 ) goto LABEL_6; } return 1; } else { LABEL_6: v20 = v35[5]; v24 = v35[2]; v28 = v35[3]; v13 = (long long ( *)(long long, long long, long long))v35[11]; v14 = v35[13]; if ( v32 ) v4 = v13(v14, v33, v32); else v4 = v13(v14, v33, v35[1]); v27 = my_hash_mask(v4, v24, v28); v29 = v27; v31 = my_hash_mask(v23, v24, v28); v19 = 0LL; while ( 1 ) { v18 = (unsigned int *)(16LL * v27 + v20); if ( *((_QWORD *)v18 + 1) == v34 ) break; v19 = v18; v27 = *v18; if ( v27 == -1 ) return 1; } if ( v29 == v31 ) { *(_DWORD *)(16LL * v27 + v20 + 4) = v23; return 0; } else { v21 = *(_QWORD *)v18; v22 = *((_QWORD *)v18 + 1); v25 = v27; if ( v19 ) { *v19 = *v18; } else if ( *v18 != -1 ) { v25 = *v18; v5 = v18; v6 = (_QWORD *)(16LL * *v18 + v20); *(_QWORD *)v18 = *v6; *((_QWORD *)v5 + 1) = v6[1]; } if ( v31 == v25 ) { if ( v25 != v27 ) { v7 = (_QWORD *)(16 * v25 + v20); *v7 = v21; v7[1] = v22; } *(_DWORD *)(16 * v25 + v20) = -1; *(_DWORD *)(16 * v25 + v20 + 4) = v23; return 0; } else { v18 = (unsigned int *)(16LL * v31 + v20); v30 = my_hash_rec_mask((long long)v18, v24, v28); if ( v31 == v30 ) { LODWORD(v21) = *(_DWORD *)(16LL * v31 + v20); v11 = (_QWORD *)(16 * v25 + v20); *v11 = v21; v11[1] = v22; *(_DWORD *)(16 * v25 + v20 + 4) = v23; *(_DWORD *)(16LL * v31 + v20) = v25; } else { v8 = (_QWORD *)(16 * v25 + v20); v9 = v18; *v8 = *(_QWORD *)v18; v8[1] = *((_QWORD *)v9 + 1); movelink(v20, v31, v30, v25); LODWORD(v21) = -1; v10 = (_QWORD *)(16LL * v31 + v20); *v10 = v21; v10[1] = v22; *(_DWORD *)(16LL * v31 + v20 + 4) = v23; } return 0; } } } }
my_hash_update: PUSH RBP MOV RBP,RSP SUB RSP,0xc0 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 RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] LEA RDX,[RBP + -0x48] MOV ECX,0x1 CALL 0x0012be70 MOV qword ptr [RBP + -0x90],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x58] MOV RCX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RCX + 0x68] MOV RSI,qword ptr [RBP + -0x90] MOV RDX,qword ptr [RBP + -0x48] CALL RAX MOV dword ptr [RBP + -0x5c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x20] AND EAX,0x1 CMP EAX,0x0 JZ 0x0012c3fa MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x5c] MOV RDX,qword ptr [RBP + -0x90] MOV RCX,qword ptr [RBP + -0x48] LEA R8,[RBP + -0x94] CALL 0x0012b650 MOV qword ptr [RBP + -0xa0],RAX CMP RAX,0x0 JZ 0x0012c3f8 JMP 0x0012c3b4 LAB_0012c3b4: MOV RAX,qword ptr [RBP + -0xa0] CMP RAX,qword ptr [RBP + -0x18] JZ 0x0012c3cc JMP 0x0012c3c3 LAB_0012c3c3: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0012c712 LAB_0012c3cc: JMP 0x0012c3ce LAB_0012c3ce: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x90] MOV RDX,qword ptr [RBP + -0x48] LEA RCX,[RBP + -0x94] CALL 0x0012b870 MOV qword ptr [RBP + -0xa0],RAX CMP RAX,0x0 JNZ 0x0012c3b4 JMP 0x0012c3f8 LAB_0012c3f8: JMP 0x0012c3fa LAB_0012c3fa: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOV dword ptr [RBP + -0x38],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x58] MOV qword ptr [RBP + -0xb8],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x68] MOV qword ptr [RBP + -0xb0],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0xa8],RAX CMP qword ptr [RBP + -0x28],0x0 JZ 0x0012c45a MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0xc0],RAX JMP 0x0012c469 LAB_0012c45a: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0xc0],RAX LAB_0012c469: MOV RAX,qword ptr [RBP + -0xb8] MOV RSI,qword ptr [RBP + -0xa8] MOV RDI,qword ptr [RBP + -0xb0] MOV RDX,qword ptr [RBP + -0xc0] CALL RAX MOV EDI,EAX MOV RSI,qword ptr [RBP + -0x58] MOV EAX,dword ptr [RBP + -0x38] MOV EDX,EAX CALL 0x0012b750 MOV dword ptr [RBP + -0x3c],EAX MOV EAX,dword ptr [RBP + -0x3c] MOV dword ptr [RBP + -0x34],EAX MOV EDI,dword ptr [RBP + -0x5c] MOV RSI,qword ptr [RBP + -0x58] MOV EAX,dword ptr [RBP + -0x38] MOV EDX,EAX CALL 0x0012b750 MOV dword ptr [RBP + -0x2c],EAX MOV qword ptr [RBP + -0x80],0x0 LAB_0012c4bc: MOV RAX,qword ptr [RBP + -0x78] MOV ECX,dword ptr [RBP + -0x3c] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x88],RAX MOV RAX,qword ptr [RAX + 0x8] CMP RAX,qword ptr [RBP + -0x18] JNZ 0x0012c4dd JMP 0x0012c506 LAB_0012c4dd: MOV RAX,qword ptr [RBP + -0x88] MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RBP + -0x88] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x3c],EAX CMP EAX,-0x1 JNZ 0x0012c504 JMP 0x0012c4fb LAB_0012c4fb: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0012c712 LAB_0012c504: JMP 0x0012c4bc LAB_0012c506: MOV EAX,dword ptr [RBP + -0x34] CMP EAX,dword ptr [RBP + -0x2c] JNZ 0x0012c52b MOV ECX,dword ptr [RBP + -0x5c] MOV RAX,qword ptr [RBP + -0x78] MOV EDX,dword ptr [RBP + -0x3c] SHL RDX,0x4 ADD RAX,RDX MOV dword ptr [RAX + 0x4],ECX MOV byte ptr [RBP + -0x1],0x0 JMP 0x0012c712 LAB_0012c52b: MOV RAX,qword ptr [RBP + -0x88] MOV RCX,qword ptr [RAX] MOV qword ptr [RBP + -0x70],RCX MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x68],RAX MOV EAX,dword ptr [RBP + -0x3c] MOV qword ptr [RBP + -0x50],RAX CMP qword ptr [RBP + -0x80],0x0 JNZ 0x0012c593 MOV RAX,qword ptr [RBP + -0x88] CMP dword ptr [RAX],-0x1 JZ 0x0012c591 MOV RAX,qword ptr [RBP + -0x88] MOV EAX,dword ptr [RAX] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x88] MOV RCX,qword ptr [RBP + -0x78] MOV RDX,qword ptr [RBP + -0x88] MOV EDX,dword ptr [RDX] SHL RDX,0x4 ADD RCX,RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX LAB_0012c591: JMP 0x0012c5a2 LAB_0012c593: MOV RAX,qword ptr [RBP + -0x88] MOV ECX,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x80] MOV dword ptr [RAX],ECX LAB_0012c5a2: MOV EAX,dword ptr [RBP + -0x2c] CMP RAX,qword ptr [RBP + -0x50] JNZ 0x0012c608 MOV RAX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RBP + -0x3c] CMP RAX,RCX JZ 0x0012c5d5 MOV RAX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RBP + -0x50] SHL RCX,0x4 ADD RAX,RCX MOV RCX,qword ptr [RBP + -0x70] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x68] MOV qword ptr [RAX + 0x8],RCX LAB_0012c5d5: MOV RAX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RBP + -0x50] SHL RCX,0x4 ADD RAX,RCX MOV dword ptr [RAX],0xffffffff MOV ECX,dword ptr [RBP + -0x5c] MOV RAX,qword ptr [RBP + -0x78] MOV RDX,qword ptr [RBP + -0x50] SHL RDX,0x4 ADD RAX,RDX MOV dword ptr [RAX + 0x4],ECX MOV byte ptr [RBP + -0x1],0x0 JMP 0x0012c712 LAB_0012c608: MOV RAX,qword ptr [RBP + -0x78] MOV ECX,dword ptr [RBP + -0x2c] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x88],RAX MOV RDI,qword ptr [RBP + -0x88] MOV RSI,qword ptr [RBP + -0x58] MOV EAX,dword ptr [RBP + -0x38] MOV EDX,EAX CALL 0x0012b840 MOV dword ptr [RBP + -0x30],EAX MOV EAX,dword ptr [RBP + -0x2c] CMP EAX,dword ptr [RBP + -0x30] JZ 0x0012c6b0 MOV RAX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RBP + -0x50] SHL RCX,0x4 ADD RAX,RCX MOV RCX,qword ptr [RBP + -0x88] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV RDI,qword ptr [RBP + -0x78] MOV ESI,dword ptr [RBP + -0x2c] MOV EDX,dword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x50] MOV ECX,EAX CALL 0x0012bee0 MOV dword ptr [RBP + -0x70],0xffffffff MOV RAX,qword ptr [RBP + -0x78] MOV ECX,dword ptr [RBP + -0x2c] SHL RCX,0x4 ADD RAX,RCX MOV RCX,qword ptr [RBP + -0x70] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x68] MOV qword ptr [RAX + 0x8],RCX MOV ECX,dword ptr [RBP + -0x5c] MOV RAX,qword ptr [RBP + -0x78] MOV EDX,dword ptr [RBP + -0x2c] SHL RDX,0x4 ADD RAX,RDX MOV dword ptr [RAX + 0x4],ECX JMP 0x0012c70c LAB_0012c6b0: MOV RAX,qword ptr [RBP + -0x78] MOV ECX,dword ptr [RBP + -0x2c] SHL RCX,0x4 ADD RAX,RCX MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x70],EAX MOV RAX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RBP + -0x50] SHL RCX,0x4 ADD RAX,RCX MOV RCX,qword ptr [RBP + -0x70] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x68] MOV qword ptr [RAX + 0x8],RCX MOV ECX,dword ptr [RBP + -0x5c] MOV RAX,qword ptr [RBP + -0x78] MOV RDX,qword ptr [RBP + -0x50] SHL RDX,0x4 ADD RAX,RDX MOV dword ptr [RAX + 0x4],ECX MOV RAX,qword ptr [RBP + -0x50] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x78] MOV EDX,dword ptr [RBP + -0x2c] SHL RDX,0x4 ADD RAX,RDX MOV dword ptr [RAX],ECX LAB_0012c70c: JMP 0x0012c70e LAB_0012c70e: MOV byte ptr [RBP + -0x1],0x0 LAB_0012c712: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0xc0 POP RBP RET
int1 my_hash_update(long param_1,long param_2,int8 param_3,long param_4) { int4 uVar1; long lVar2; uint *puVar3; int8 *puVar4; long local_c8; int1 local_9c [4]; int8 local_98; int8 *local_90; uint *local_88; long local_80; int8 local_78; int8 local_70; int4 local_64; int8 local_60; ulong local_58; int8 local_50; uint local_44; int4 local_40; uint local_3c; uint local_38; uint local_34; long local_30; int8 local_28; long local_20; long local_18; local_30 = param_4; local_28 = param_3; local_20 = param_2; local_18 = param_1; local_98 = my_hash_key(param_1,param_2,&local_50,1); local_64 = (**(code **)(local_18 + 0x58))(*(int8 *)(local_18 + 0x68),local_98,local_50); if ((*(uint *)(local_18 + 0x20) & 1) != 0) { lVar2 = my_hash_first_from_hash_value(local_18,local_64,local_98,local_50,local_9c); while (lVar2 != 0) { if (lVar2 != local_20) { return 1; } lVar2 = my_hash_next(local_18,local_98,local_50,local_9c); } } local_80 = *(long *)(local_18 + 0x28); local_60 = *(int8 *)(local_18 + 0x10); local_40 = (int4)*(int8 *)(local_18 + 0x18); if (local_30 == 0) { local_c8 = *(long *)(local_18 + 8); } else { local_c8 = local_30; } uVar1 = (**(code **)(local_18 + 0x58))(*(int8 *)(local_18 + 0x68),local_28,local_c8); local_44 = my_hash_mask(uVar1,local_60,local_40); local_3c = local_44; local_34 = my_hash_mask(local_64,local_60,local_40); local_88 = (uint *)0x0; while (puVar3 = (uint *)(local_80 + (ulong)local_44 * 0x10), *(long *)(puVar3 + 2) != local_20) { local_44 = *puVar3; local_88 = puVar3; if (local_44 == 0xffffffff) { return 1; } } if (local_3c == local_34) { *(int4 *)(local_80 + (ulong)local_44 * 0x10 + 4) = local_64; return 0; } local_78 = *(int8 *)puVar3; local_70 = *(int8 *)(puVar3 + 2); local_58 = (ulong)local_44; if (local_88 == (uint *)0x0) { if (*puVar3 != 0xffffffff) { local_58 = (ulong)*puVar3; puVar4 = (int8 *)(local_80 + (ulong)*puVar3 * 0x10); *(int8 *)puVar3 = *puVar4; *(int8 *)(puVar3 + 2) = puVar4[1]; } } else { *local_88 = *puVar3; } if (local_34 == local_58) { if (local_58 != local_44) { puVar4 = (int8 *)(local_80 + local_58 * 0x10); *puVar4 = local_78; puVar4[1] = local_70; } *(int4 *)(local_80 + local_58 * 0x10) = 0xffffffff; *(int4 *)(local_80 + local_58 * 0x10 + 4) = local_64; return 0; } local_90 = (int8 *)(local_80 + (ulong)local_34 * 0x10); local_38 = my_hash_rec_mask(local_90,local_60,local_40); if (local_34 == local_38) { local_78 = CONCAT44(local_78._4_4_,*(int4 *)(local_80 + (ulong)local_34 * 0x10)); puVar4 = (int8 *)(local_80 + local_58 * 0x10); *puVar4 = local_78; puVar4[1] = local_70; *(int4 *)(local_80 + local_58 * 0x10 + 4) = local_64; *(int *)(local_80 + (ulong)local_34 * 0x10) = (int)local_58; } else { puVar4 = (int8 *)(local_80 + local_58 * 0x10); *puVar4 = *local_90; puVar4[1] = local_90[1]; movelink(local_80,local_34,local_38,local_58 & 0xffffffff); local_78 = CONCAT44(local_78._4_4_,0xffffffff); puVar4 = (int8 *)(local_80 + (ulong)local_34 * 0x10); *puVar4 = local_78; puVar4[1] = local_70; *(int4 *)(local_80 + (ulong)local_34 * 0x10 + 4) = local_64; } return 0; }
16,874
common_chat_params_init_command_r7b(minja::chat_template const&, common_chat_inputs const&)
monkey531[P]llama/common/chat.cpp
static common_chat_params common_chat_params_init_command_r7b(const common_chat_template & tmpl, const struct common_chat_inputs & inputs) { common_chat_params data; data.grammar_lazy = inputs.tool_choice != "required"; data.grammar = build_grammar([&](const common_grammar_builder & builder) { auto schemas = json::array(); foreach_function(inputs.tools, [&](const json & tool) { const auto & function = tool["function"]; schemas.push_back({ {"type", "object"}, {"properties", { {"tool_call_id", { {"type", "string"}, // Command-R's template expects an integer string. {"pattern", "^[0-9]{1,10}$"}, }}, {"tool_name", { {"type", "string"}, {"const", function["name"]}, }}, {"parameters", function["parameters"]}, }}, {"required", json::array({"tool_call_id", "tool_name", "parameters"})}, }); }); auto schema = json { {"type", "array"}, {"items", schemas.size() == 1 ? schemas[0] : json {{"anyOf", schemas}}}, {"minItems", 1}, }; if (!inputs.parallel_tool_calls) { schema["maxItems"] = 1; } builder.add_rule("root", "\"<|START_ACTION|>\" " + builder.add_schema("tool_calls", schema) + " \"<|END_ACTION|>\""); }, grammar_options); data.grammar_triggers.push_back({"<|START_ACTION|>", /* .at_start = */ false}); data.preserved_tokens = { "<|START_RESPONSE|>", "<|END_RESPONSE|>", "<|START_THINKING|>", "<|END_THINKING|>", "<|END_ACTION|>", }; data.prompt = tmpl.apply(inputs.messages, inputs.tools.empty() ? json() : inputs.tools, inputs.add_generation_prompt); data.format = COMMON_CHAT_FORMAT_COMMAND_R7B; return data; }
O3
cpp
common_chat_params_init_command_r7b(minja::chat_template const&, common_chat_inputs const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xe8, %rsp movq %rdx, %r14 movq %rsi, %rbp movq %rdi, %rbx movl $0x0, (%rdi) xorl %r15d, %r15d movb %r15b, 0x8(%rdi) movq %r15, 0x10(%rdi) leaq 0x28(%rdi), %rax movq %rax, 0x18(%rdi) movq %r15, 0x20(%rdi) movb %r15b, 0x28(%rdi) movb %r15b, 0x38(%rdi) xorps %xmm0, %xmm0 movups %xmm0, 0x40(%rdi) movups %xmm0, 0x50(%rdi) movups %xmm0, 0x60(%rdi) movups %xmm0, 0x70(%rdi) movq %r15, 0x80(%rdi) leaq 0x20(%rdx), %rdi leaq 0x20357(%rip), %rsi # 0x114c91 callq 0xc8691 movb %al, 0x38(%rbx) leaq 0x8(%rsp), %rsi movq %r15, 0x8(%rsi) movq %r14, (%rsi) leaq 0xe49d(%rip), %rax # 0x102df2 movq %rax, 0x18(%rsi) leaq 0xed12(%rip), %rax # 0x103672 movq %rax, 0x10(%rsi) leaq 0x26225(%rip), %rdx # 0x11ab90 leaq 0x38(%rsp), %rdi callq 0xde690 leaq 0x18(%rbx), %rdi leaq 0x38(%rsp), %r12 movq %r12, %rsi callq 0x1dee0 movq (%r12), %rdi leaq 0x48(%rsp), %r15 cmpq %r15, %rdi je 0xf49a1 movq 0x48(%rsp), %rsi incq %rsi callq 0x1dc50 movq 0x18(%rsp), %rax testq %rax, %rax je 0xf49ba leaq 0x8(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax leaq 0x38(%rsp), %rdi movq %r15, (%rdi) leaq 0x272b3(%rip), %rsi # 0x11bc7c leaq 0x272bc(%rip), %rdx # 0x11bc8c callq 0x25e6a leaq 0x40(%rbx), %rdi leaq 0x38(%rsp), %rsi movb $0x0, 0x20(%rsi) callq 0x1073c4 movq 0x38(%rsp), %rdi cmpq %r15, %rdi je 0xf49fe movq 0x48(%rsp), %rsi incq %rsi callq 0x1dc50 leaq 0x38(%rsp), %r12 movq %r15, (%r12) leaq 0x27739(%rip), %rsi # 0x11c147 leaq 0x27744(%rip), %rdx # 0x11c159 movq %r12, %rdi callq 0x25e6a leaq 0x58(%rsp), %r13 leaq 0x68(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x27728(%rip), %rsi # 0x11c15a leaq 0x27731(%rip), %rdx # 0x11c16a movq %r13, %rdi callq 0x25e6a leaq 0x78(%rsp), %r13 leaq 0x88(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x27712(%rip), %rsi # 0x11c16b leaq 0x2771d(%rip), %rdx # 0x11c17d movq %r13, %rdi callq 0x25e6a leaq 0x98(%rsp), %r13 leaq 0xa8(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x276fb(%rip), %rsi # 0x11c17e leaq 0x27704(%rip), %rdx # 0x11c18e movq %r13, %rdi callq 0x25e6a leaq 0xb8(%rsp), %r13 leaq 0xc8(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x276e2(%rip), %rsi # 0x11c18f leaq 0x276e9(%rip), %rdx # 0x11c19d movq %r13, %rdi callq 0x25e6a leaq 0x58(%rbx), %rdi leaq 0xd8(%rsp), %r12 leaq 0x38(%rsp), %rsi movq %r12, %rdx callq 0x1077a6 movq $-0xa0, %r12 movq -0x10(%r15), %rdi cmpq %rdi, %r15 je 0xf4af0 movq (%r15), %rsi incq %rsi callq 0x1dc50 addq $-0x20, %r15 addq $0x20, %r12 jne 0xf4adc movzbl 0x10(%r14), %eax testl %eax, %eax leaq 0x48(%rsp), %r15 je 0xf4b2f cmpl $0x2, %eax je 0xf4b12 cmpl $0x1, %eax jne 0xf4b1f movq 0x18(%r14), %rax movq (%rax), %rcx cmpq 0x8(%rax), %rcx je 0xf4b2f leaq 0x10(%r14), %rsi leaq 0x8(%rsp), %rdi callq 0x8db9c jmp 0xf4b3d movb $0x0, 0x8(%rsp) movq $0x0, 0x10(%rsp) movzbl 0x68(%r14), %r8d leaq 0x28(%rsp), %r9 movb $0x0, (%r9) movq $0x0, 0x8(%r9) movl $0x1, (%rsp) leaq 0x38(%rsp), %rdi leaq 0x8(%rsp), %rcx movq %rbp, %rsi movq %r14, %rdx callq 0xc4db0 leaq 0xd8(%rsp), %rdi leaq 0x38(%rsp), %rsi callq 0xa3142 movb 0x8(%rbx), %al leaq 0xd8(%rsp), %rdi movb (%rdi), %cl movb %cl, 0x8(%rbx) movb %al, (%rdi) movq 0x10(%rbx), %rax movq 0x8(%rdi), %rcx movq %rcx, 0x10(%rbx) movq %rax, 0x8(%rdi) callq 0x8e068 movq 0x38(%rsp), %rdi cmpq %r15, %rdi je 0xf4bbf movq 0x48(%rsp), %rsi incq %rsi callq 0x1dc50 leaq 0x28(%rsp), %rdi callq 0x8e068 leaq 0x8(%rsp), %rdi callq 0x8e068 movl $0xa, (%rbx) addq $0xe8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0xf4c8e jmp 0xf4cbf movq %rax, %r14 movq 0x38(%rsp), %rdi cmpq %r15, %rdi je 0xf4c14 movq 0x48(%rsp), %rsi incq %rsi callq 0x1dc50 jmp 0xf4c14 movq %rax, %r14 leaq 0x28(%rsp), %rdi callq 0x8e068 leaq 0x8(%rsp), %rdi callq 0x8e068 jmp 0xf4c91 movq %rax, %r14 leaq 0x38(%rsp), %rsi movq %r12, %rdi callq 0x204f7 jmp 0xf4c91 jmp 0xf4c42 jmp 0xf4c42 jmp 0xf4c42 movq %rax, %r14 addq $-0x10, %r13 movq -0x10(%r13), %rdi cmpq %rdi, %r13 je 0xf4c5e movq (%r13), %rsi incq %rsi callq 0x1dc50 leaq -0x20(%r13), %rax addq $-0x10, %r13 cmpq %r12, %r13 movq %rax, %r13 jne 0xf4c49 jmp 0xf4c91 jmp 0xf4c8e movq %rax, %r14 movq 0x38(%rsp), %rdi cmpq %r15, %rdi je 0xf4c91 movq 0x48(%rsp), %rsi incq %rsi callq 0x1dc50 jmp 0xf4c91 movq %rax, %r14 movq %rbx, %rdi callq 0xa1c74 movq %r14, %rdi callq 0x1e660 movq %rax, %r14 movq 0x18(%rsp), %rax testq %rax, %rax je 0xf4c91 leaq 0x8(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax jmp 0xf4c91 movq %rax, %rdi callq 0x25c6b
_ZL35common_chat_params_init_command_r7bRKN5minja13chat_templateERK18common_chat_inputs: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0E8h mov r14, rdx mov rbp, rsi mov rbx, rdi mov dword ptr [rdi], 0 xor r15d, r15d mov [rdi+8], r15b mov [rdi+10h], r15 lea rax, [rdi+28h] mov [rdi+18h], rax mov [rdi+20h], r15 mov [rdi+28h], r15b mov [rdi+38h], r15b xorps xmm0, xmm0 movups xmmword ptr [rdi+40h], xmm0 movups xmmword ptr [rdi+50h], xmm0 movups xmmword ptr [rdi+60h], xmm0 movups xmmword ptr [rdi+70h], xmm0 mov [rdi+80h], r15 lea rdi, [rdx+20h] lea rsi, aRequired; "required" call _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_ mov [rbx+38h], al lea rsi, [rsp+118h+var_110] mov [rsi+8], r15 mov [rsi], r14 lea rax, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL35common_chat_params_init_command_r7bRKN5minja13chat_templateERK18common_chat_inputsE3$_0E9_M_invokeERKSt9_Any_dataS2_; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_command_r7b(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_invoke(std::_Any_data const&,common_grammar_builder const&) mov [rsi+18h], rax lea rax, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL35common_chat_params_init_command_r7bRKN5minja13chat_templateERK18common_chat_inputsE3$_0E10_M_managerERSt9_Any_dataRKSD_St18_Manager_operation; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_command_r7b(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsi+10h], rax lea rdx, _ZL15grammar_options; grammar_options lea rdi, [rsp+118h+var_E0] call _Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options; build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&) lea rdi, [rbx+18h] lea r12, [rsp+118h+var_E0] mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r12]; void * lea r15, [rsp+118h+var_D0] cmp rdi, r15 jz short loc_F49A1 mov rsi, [rsp+118h+var_D0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_F49A1: mov rax, [rsp+118h+var_100] test rax, rax jz short loc_F49BA lea rdi, [rsp+118h+var_110] mov rsi, rdi mov edx, 3 call rax loc_F49BA: lea rdi, [rsp+118h+var_E0] mov [rdi], r15 lea rsi, aEndThinkingSta+10h; "<|START_ACTION|>" lea rdx, aEndThinkingSta+20h; "" 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, [rbx+40h] lea rsi, [rsp+118h+var_E0] mov byte ptr [rsi+20h], 0 call _ZNSt6vectorI22common_grammar_triggerSaIS0_EE12emplace_backIJS0_EEERS0_DpOT_; std::vector<common_grammar_trigger>::emplace_back<common_grammar_trigger>(common_grammar_trigger &&) mov rdi, [rsp+118h+var_E0]; void * cmp rdi, r15 jz short loc_F49FE mov rsi, [rsp+118h+var_D0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_F49FE: lea r12, [rsp+118h+var_E0] mov [r12], r15 lea rsi, aStartResponse; "<|START_RESPONSE|>" lea rdx, aStartResponse+12h; "" mov rdi, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea r13, [rsp+118h+var_C0] lea rax, [rsp+118h+var_B0] mov [rax-10h], rax lea rsi, aEndResponse; "<|END_RESPONSE|>" lea rdx, aEndResponse+10h; "" mov rdi, 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) lea r13, [rsp+118h+var_A0] lea rax, [rsp+118h+var_90] mov [rax-10h], rax lea rsi, aStartThinking; "<|START_THINKING|>" lea rdx, aStartThinking+12h; "" mov rdi, 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) lea r13, [rsp+118h+var_80] lea rax, [rsp+118h+var_70] mov [rax-10h], rax lea rsi, aEndThinking; "<|END_THINKING|>" lea rdx, aEndThinking+10h; "" mov rdi, 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) lea r13, [rsp+118h+var_60] lea r15, [rsp+118h+var_50] mov [r15-10h], r15 lea rsi, aEndAction; "<|END_ACTION|>" lea rdx, aEndAction+0Eh; "" mov rdi, 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) lea rdi, [rbx+58h] lea r12, [rsp+118h+var_40] lea rsi, [rsp+118h+var_E0] mov rdx, r12 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE13_M_assign_auxIPKS5_EEvT_SB_St20forward_iterator_tag; std::vector<std::string>::_M_assign_aux<std::string const*>(std::string const*,std::string const*,std::forward_iterator_tag) mov r12, 0FFFFFFFFFFFFFF60h loc_F4ADC: mov rdi, [r15-10h]; void * cmp r15, rdi jz short loc_F4AF0 mov rsi, [r15] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_F4AF0: add r15, 0FFFFFFFFFFFFFFE0h add r12, 20h ; ' ' jnz short loc_F4ADC movzx eax, byte ptr [r14+10h] test eax, eax lea r15, [rsp+118h+var_D0] jz short loc_F4B2F cmp eax, 2 jz short loc_F4B12 cmp eax, 1 jnz short loc_F4B1F loc_F4B12: mov rax, [r14+18h] mov rcx, [rax] cmp rcx, [rax+8] jz short loc_F4B2F loc_F4B1F: lea rsi, [r14+10h] lea rdi, [rsp+118h+var_110] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; 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>::basic_json(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&) jmp short loc_F4B3D loc_F4B2F: mov [rsp+118h+var_110], 0 mov [rsp+118h+var_108], 0 loc_F4B3D: movzx r8d, byte ptr [r14+68h] lea r9, [rsp+118h+var_F0] mov byte ptr [r9], 0 mov qword ptr [r9+8], 0 mov [rsp+118h+var_118], 1 lea rdi, [rsp+118h+var_E0] lea rcx, [rsp+118h+var_110] mov rsi, rbp mov rdx, r14 call _ZNK5minja13chat_template5applyERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEESH_bSH_b; minja::chat_template::apply(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&,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&,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> const&,bool) lea rdi, [rsp+118h+var_40] lea rsi, [rsp+118h+var_E0] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_ mov al, [rbx+8] lea rdi, [rsp+118h+var_40] mov cl, [rdi] mov [rbx+8], cl mov [rdi], al mov rax, [rbx+10h] mov rcx, [rdi+8] mov [rbx+10h], rcx mov [rdi+8], rax 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, [rsp+118h+var_E0]; void * cmp rdi, r15 jz short loc_F4BBF mov rsi, [rsp+118h+var_D0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_F4BBF: lea rdi, [rsp+118h+var_F0] 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+118h+var_110] 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 dword ptr [rbx], 0Ah add rsp, 0E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp loc_F4C8E jmp loc_F4CBF mov r14, rax mov rdi, [rsp+118h+var_E0]; void * cmp rdi, r15 jz short loc_F4C14 mov rsi, [rsp+118h+var_D0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_F4C14 mov r14, rax loc_F4C14: lea rdi, [rsp+118h+var_F0] 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+118h+var_110] 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() jmp short loc_F4C91 mov r14, rax lea rsi, [rsp+118h+var_E0] mov rdi, r12 call _ZL35common_chat_params_init_command_r7bRKN5minja13chat_templateERK18common_chat_inputs_cold_1; common_chat_params_init_command_r7b(minja::chat_template const&,common_chat_inputs const&) [clone] jmp short loc_F4C91 jmp short loc_F4C42 jmp short loc_F4C42 jmp short $+2 loc_F4C42: mov r14, rax add r13, 0FFFFFFFFFFFFFFF0h loc_F4C49: mov rdi, [r13-10h]; void * cmp r13, rdi jz short loc_F4C5E mov rsi, [r13+0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_F4C5E: lea rax, [r13-20h] add r13, 0FFFFFFFFFFFFFFF0h cmp r13, r12 mov r13, rax jnz short loc_F4C49 jmp short loc_F4C91 jmp short loc_F4C8E mov r14, rax mov rdi, [rsp+118h+var_E0]; void * cmp rdi, r15 jz short loc_F4C91 mov rsi, [rsp+118h+var_D0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_F4C91 loc_F4C8E: mov r14, rax loc_F4C91: mov rdi, rbx; this call _ZN18common_chat_paramsD2Ev; common_chat_params::~common_chat_params() mov rdi, r14 call __Unwind_Resume mov r14, rax mov rax, [rsp+118h+var_100] test rax, rax jz short loc_F4C91 lea rdi, [rsp+118h+var_110] mov rsi, rdi mov edx, 3 call rax jmp short loc_F4C91 loc_F4CBF: mov rdi, rax call __clang_call_terminate
long long common_chat_params_init_command_r7b( const minja::chat_template *a1, const common_chat_inputs *a2, long long a3) { long long v5; // rcx int v6; // r8d int v7; // r9d _QWORD *v8; // r15 long long v9; // r12 _QWORD *v10; // rdi int v11; // eax int v12; // r8d char v13; // al long long v14; // rax long long result; // rax long long v16; // [rsp+8h] [rbp-110h] BYREF long long v17; // [rsp+10h] [rbp-108h] long long ( *v18)(); // [rsp+18h] [rbp-100h] long long ( *v19)(); // [rsp+20h] [rbp-F8h] _BYTE v20[8]; // [rsp+28h] [rbp-F0h] BYREF long long v21; // [rsp+30h] [rbp-E8h] void *v22[2]; // [rsp+38h] [rbp-E0h] BYREF _QWORD v23[2]; // [rsp+48h] [rbp-D0h] BYREF char *v24; // [rsp+58h] [rbp-C0h] BYREF char v25; // [rsp+68h] [rbp-B0h] BYREF char *v26; // [rsp+78h] [rbp-A0h] BYREF char v27; // [rsp+88h] [rbp-90h] BYREF char *v28; // [rsp+98h] [rbp-80h] BYREF char v29; // [rsp+A8h] [rbp-70h] BYREF _BYTE *v30; // [rsp+B8h] [rbp-60h] BYREF _BYTE v31[16]; // [rsp+C8h] [rbp-50h] BYREF char v32[8]; // [rsp+D8h] [rbp-40h] BYREF long long v33; // [rsp+E0h] [rbp-38h] *(_DWORD *)a1 = 0; *((_BYTE *)a1 + 8) = 0; *((_QWORD *)a1 + 2) = 0LL; *((_QWORD *)a1 + 3) = (char *)a1 + 40; *((_QWORD *)a1 + 4) = 0LL; *((_BYTE *)a1 + 40) = 0; *((_BYTE *)a1 + 56) = 0; *((_OWORD *)a1 + 4) = 0LL; *((_OWORD *)a1 + 5) = 0LL; *((_OWORD *)a1 + 6) = 0LL; *((_OWORD *)a1 + 7) = 0LL; *((_QWORD *)a1 + 16) = 0LL; *((_BYTE *)a1 + 56) = ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_( a3 + 32, (long long)"required"); v17 = 0LL; v16 = a3; v19 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_command_r7b(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_invoke; v18 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_command_r7b(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_manager; build_grammar[abi:cxx11]((long long)v22, (long long)&v16, grammar_options, v5, v6, v7); std::string::operator=((char *)a1 + 24, v22); if ( v22[0] != v23 ) operator delete(v22[0], v23[0] + 1LL); if ( v18 ) ((void ( *)(long long *, long long *, long long))v18)(&v16, &v16, 3LL); v22[0] = v23; std::string::_M_construct<char const*>((long long)v22, "<|START_ACTION|>", (long long)""); LOBYTE(v24) = 0; std::vector<common_grammar_trigger>::emplace_back<common_grammar_trigger>((char *)a1 + 64); if ( v22[0] != v23 ) operator delete(v22[0], v23[0] + 1LL); v22[0] = v23; std::string::_M_construct<char const*>((long long)v22, "<|START_RESPONSE|>", (long long)""); v24 = &v25; std::string::_M_construct<char const*>((long long)&v24, "<|END_RESPONSE|>", (long long)""); v26 = &v27; std::string::_M_construct<char const*>((long long)&v26, "<|START_THINKING|>", (long long)""); v28 = &v29; std::string::_M_construct<char const*>((long long)&v28, "<|END_THINKING|>", (long long)""); v8 = v31; v30 = v31; std::string::_M_construct<char const*>((long long)&v30, "<|END_ACTION|>", (long long)""); std::vector<std::string>::_M_assign_aux<std::string const*>((char *)a1 + 88, v22, v32); v9 = -160LL; do { v10 = (_QWORD *)*(v8 - 2); if ( v8 != v10 ) operator delete(v10, *v8 + 1LL); v8 -= 4; v9 += 32LL; } while ( v9 ); v11 = *(unsigned __int8 *)(a3 + 16); if ( !*(_BYTE *)(a3 + 16) || (v11 == 2 || v11 == 1) && **(_QWORD **)(a3 + 24) == *(_QWORD *)(*(_QWORD *)(a3 + 24) + 8LL) ) { LOBYTE(v16) = 0; v17 = 0LL; } else { 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>::basic_json( (unsigned __int8 *)&v16, (unsigned __int8 *)(a3 + 16)); } v12 = *(unsigned __int8 *)(a3 + 104); v20[0] = 0; v21 = 0LL; minja::chat_template::apply((long long)v22, a2, (unsigned __int8 *)a3, (unsigned __int8 *)&v16, v12, v20, 1); ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_(v32); v13 = *((_BYTE *)a1 + 8); *((_BYTE *)a1 + 8) = v32[0]; v32[0] = v13; v14 = *((_QWORD *)a1 + 2); *((_QWORD *)a1 + 2) = v33; v33 = v14; 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(v32); if ( v22[0] != v23 ) operator delete(v22[0], v23[0] + 1LL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v20); result = 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(&v16); *(_DWORD *)a1 = 10; return result; }
common_chat_params_init_command_r7b: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xe8 MOV R14,RDX MOV RBP,RSI MOV RBX,RDI MOV dword ptr [RDI],0x0 XOR R15D,R15D MOV byte ptr [RDI + 0x8],R15B MOV qword ptr [RDI + 0x10],R15 LEA RAX,[RDI + 0x28] MOV qword ptr [RDI + 0x18],RAX MOV qword ptr [RDI + 0x20],R15 MOV byte ptr [RDI + 0x28],R15B MOV byte ptr [RDI + 0x38],R15B XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x40],XMM0 MOVUPS xmmword ptr [RDI + 0x50],XMM0 MOVUPS xmmword ptr [RDI + 0x60],XMM0 MOVUPS xmmword ptr [RDI + 0x70],XMM0 MOV qword ptr [RDI + 0x80],R15 LEA RDI,[RDX + 0x20] LEA RSI,[0x214c91] CALL 0x001c8691 MOV byte ptr [RBX + 0x38],AL LEA RSI,[RSP + 0x8] MOV qword ptr [RSI + 0x8],R15 MOV qword ptr [RSI],R14 LEA RAX,[0x202df2] MOV qword ptr [RSI + 0x18],RAX LEA RAX,[0x203672] MOV qword ptr [RSI + 0x10],RAX LAB_001f4964: LEA RDX,[0x21ab90] LEA RDI,[RSP + 0x38] CALL 0x001de690 LEA RDI,[RBX + 0x18] LEA R12,[RSP + 0x38] MOV RSI,R12 CALL 0x0011dee0 MOV RDI,qword ptr [R12] LEA R15,[RSP + 0x48] CMP RDI,R15 JZ 0x001f49a1 MOV RSI,qword ptr [RSP + 0x48] INC RSI CALL 0x0011dc50 LAB_001f49a1: MOV RAX,qword ptr [RSP + 0x18] TEST RAX,RAX JZ 0x001f49ba LAB_001f49ab: LEA RDI,[RSP + 0x8] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001f49ba: LEA RDI,[RSP + 0x38] MOV qword ptr [RDI],R15 LAB_001f49c2: LEA RSI,[0x21bc7c] LEA RDX,[0x21bc8c] CALL 0x00125e6a LEA RDI,[RBX + 0x40] LEA RSI,[RSP + 0x38] MOV byte ptr [RSI + 0x20],0x0 LAB_001f49e2: CALL 0x002073c4 MOV RDI,qword ptr [RSP + 0x38] CMP RDI,R15 JZ 0x001f49fe MOV RSI,qword ptr [RSP + 0x48] INC RSI CALL 0x0011dc50 LAB_001f49fe: LEA R12,[RSP + 0x38] MOV qword ptr [R12],R15 LAB_001f4a07: LEA RSI,[0x21c147] LEA RDX,[0x21c159] MOV RDI,R12 CALL 0x00125e6a LEA R13,[RSP + 0x58] LEA RAX,[RSP + 0x68] MOV qword ptr [RAX + -0x10],RAX LAB_001f4a2b: LEA RSI,[0x21c15a] LEA RDX,[0x21c16a] MOV RDI,R13 CALL 0x00125e6a LEA R13,[RSP + 0x78] LEA RAX,[RSP + 0x88] MOV qword ptr [RAX + -0x10],RAX LAB_001f4a52: LEA RSI,[0x21c16b] LEA RDX,[0x21c17d] MOV RDI,R13 CALL 0x00125e6a LEA R13,[RSP + 0x98] LEA RAX,[RSP + 0xa8] MOV qword ptr [RAX + -0x10],RAX LAB_001f4a7c: LEA RSI,[0x21c17e] LEA RDX,[0x21c18e] MOV RDI,R13 CALL 0x00125e6a LEA R13,[RSP + 0xb8] LEA R15,[RSP + 0xc8] MOV qword ptr [R15 + -0x10],R15 LAB_001f4aa6: LEA RSI,[0x21c18f] LEA RDX,[0x21c19d] MOV RDI,R13 CALL 0x00125e6a LEA RDI,[RBX + 0x58] LEA R12,[RSP + 0xd8] LAB_001f4ac8: LEA RSI,[RSP + 0x38] MOV RDX,R12 CALL 0x002077a6 MOV R12,-0xa0 LAB_001f4adc: MOV RDI,qword ptr [R15 + -0x10] CMP R15,RDI JZ 0x001f4af0 MOV RSI,qword ptr [R15] INC RSI CALL 0x0011dc50 LAB_001f4af0: ADD R15,-0x20 ADD R12,0x20 JNZ 0x001f4adc MOVZX EAX,byte ptr [R14 + 0x10] TEST EAX,EAX LEA R15,[RSP + 0x48] JZ 0x001f4b2f CMP EAX,0x2 JZ 0x001f4b12 CMP EAX,0x1 JNZ 0x001f4b1f LAB_001f4b12: MOV RAX,qword ptr [R14 + 0x18] MOV RCX,qword ptr [RAX] CMP RCX,qword ptr [RAX + 0x8] JZ 0x001f4b2f LAB_001f4b1f: LEA RSI,[R14 + 0x10] LEA RDI,[RSP + 0x8] CALL 0x0018db9c JMP 0x001f4b3d LAB_001f4b2f: MOV byte ptr [RSP + 0x8],0x0 MOV qword ptr [RSP + 0x10],0x0 LAB_001f4b3d: MOVZX R8D,byte ptr [R14 + 0x68] LEA R9,[RSP + 0x28] MOV byte ptr [R9],0x0 MOV qword ptr [R9 + 0x8],0x0 LAB_001f4b53: MOV dword ptr [RSP],0x1 LEA RDI,[RSP + 0x38] LEA RCX,[RSP + 0x8] MOV RSI,RBP MOV RDX,R14 CALL 0x001c4db0 LAB_001f4b6f: LEA RDI,[RSP + 0xd8] LEA RSI,[RSP + 0x38] CALL 0x001a3142 LAB_001f4b81: MOV AL,byte ptr [RBX + 0x8] LEA RDI,[RSP + 0xd8] MOV CL,byte ptr [RDI] MOV byte ptr [RBX + 0x8],CL MOV byte ptr [RDI],AL MOV RAX,qword ptr [RBX + 0x10] MOV RCX,qword ptr [RDI + 0x8] MOV qword ptr [RBX + 0x10],RCX MOV qword ptr [RDI + 0x8],RAX CALL 0x0018e068 MOV RDI,qword ptr [RSP + 0x38] CMP RDI,R15 JZ 0x001f4bbf MOV RSI,qword ptr [RSP + 0x48] INC RSI CALL 0x0011dc50 LAB_001f4bbf: LEA RDI,[RSP + 0x28] CALL 0x0018e068 LEA RDI,[RSP + 0x8] CALL 0x0018e068 MOV dword ptr [RBX],0xa ADD RSP,0xe8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_chat_params_init_command_r7b(minja::chat_template const&, common_chat_inputs const&) */ void common_chat_params_init_command_r7b(chat_template *param_1,common_chat_inputs *param_2) { char cVar1; int8 uVar2; chat_template cVar3; ulong in_RDX; long lVar4; long *plVar5; ulong local_110 [2]; code *local_100; code *local_f8; data local_f0 [8]; int8 local_e8; long *local_e0 [2]; long local_d0 [2]; int1 *local_c0 [2]; int1 local_b0 [16]; int1 *local_a0 [2]; int1 local_90 [16]; int1 *local_80 [2]; int1 local_70 [16]; long *local_60 [2]; long local_50 [2]; chat_template local_40 [8]; int8 local_38; *(int4 *)param_1 = 0; param_1[8] = (chat_template)0x0; *(int8 *)(param_1 + 0x10) = 0; *(chat_template **)(param_1 + 0x18) = param_1 + 0x28; *(int8 *)(param_1 + 0x20) = 0; param_1[0x28] = (chat_template)0x0; param_1[0x38] = (chat_template)0x0; *(int8 *)(param_1 + 0x40) = 0; *(int8 *)(param_1 + 0x48) = 0; *(int8 *)(param_1 + 0x50) = 0; *(int8 *)(param_1 + 0x58) = 0; *(int8 *)(param_1 + 0x60) = 0; *(int8 *)(param_1 + 0x68) = 0; *(int8 *)(param_1 + 0x70) = 0; *(int8 *)(param_1 + 0x78) = 0; *(int8 *)(param_1 + 0x80) = 0; cVar3 = (chat_template) _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_ (in_RDX + 0x20,"required"); param_1[0x38] = cVar3; local_110[1] = 0; local_f8 = std:: _Function_handler<void(common_grammar_builder_const&),common_chat_params_init_command_r7b(minja::chat_template_const&,common_chat_inputs_const&)::$_0> ::_M_invoke; local_100 = std:: _Function_handler<void(common_grammar_builder_const&),common_chat_params_init_command_r7b(minja::chat_template_const&,common_chat_inputs_const&)::$_0> ::_M_manager; /* try { // try from 001f4964 to 001f4974 has its CatchHandler @ 001f4ca1 */ local_110[0] = in_RDX; build_grammar_abi_cxx11_((function *)local_e0,(common_grammar_options *)local_110); std::__cxx11::string::operator=((string *)(param_1 + 0x18),(string *)local_e0); if (local_e0[0] != local_d0) { operator_delete(local_e0[0],local_d0[0] + 1); } if (local_100 != (code *)0x0) { /* try { // try from 001f49ab to 001f49b9 has its CatchHandler @ 001f4bf0 */ (*local_100)(local_110,local_110,3); } local_e0[0] = local_d0; /* try { // try from 001f49c2 to 001f49d4 has its CatchHandler @ 001f4c8e */ std::__cxx11::string::_M_construct<char_const*>(local_e0,"<|START_ACTION|>",""); local_c0[0] = (int1 *)((ulong)local_c0[0] & 0xffffffffffffff00); /* try { // try from 001f49e2 to 001f49e6 has its CatchHandler @ 001f4c72 */ std::vector<common_grammar_trigger,std::allocator<common_grammar_trigger>>:: emplace_back<common_grammar_trigger> ((vector<common_grammar_trigger,std::allocator<common_grammar_trigger>> *) (param_1 + 0x40),(common_grammar_trigger *)local_e0); if (local_e0[0] != local_d0) { operator_delete(local_e0[0],local_d0[0] + 1); } local_e0[0] = local_d0; /* try { // try from 001f4a07 to 001f4a1c has its CatchHandler @ 001f4c70 */ std::__cxx11::string::_M_construct<char_const*>(local_e0,"<|START_RESPONSE|>",""); local_c0[0] = local_b0; /* try { // try from 001f4a2b to 001f4a40 has its CatchHandler @ 001f4c42 */ std::__cxx11::string::_M_construct<char_const*>(local_c0,"<|END_RESPONSE|>",""); local_a0[0] = local_90; /* try { // try from 001f4a52 to 001f4a67 has its CatchHandler @ 001f4c40 */ std::__cxx11::string::_M_construct<char_const*>(local_a0,"<|START_THINKING|>",""); local_80[0] = local_70; /* try { // try from 001f4a7c to 001f4a91 has its CatchHandler @ 001f4c3e */ std::__cxx11::string::_M_construct<char_const*>(local_80,"<|END_THINKING|>",""); plVar5 = local_50; local_60[0] = plVar5; /* try { // try from 001f4aa6 to 001f4abb has its CatchHandler @ 001f4c3c */ std::__cxx11::string::_M_construct<char_const*>(local_60,"<|END_ACTION|>",""); /* try { // try from 001f4ac8 to 001f4ad4 has its CatchHandler @ 001f4c2a */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: _M_assign_aux<std::__cxx11::string_const*>(param_1 + 0x58,local_e0,local_40); lVar4 = -0xa0; do { if (plVar5 != (long *)plVar5[-2]) { operator_delete((long *)plVar5[-2],*plVar5 + 1); } plVar5 = plVar5 + -4; lVar4 = lVar4 + 0x20; } while (lVar4 != 0); cVar1 = *(char *)(in_RDX + 0x10); if ((cVar1 == '\0') || (((cVar1 == '\x02' || (cVar1 == '\x01')) && (**(long **)(in_RDX + 0x18) == (*(long **)(in_RDX + 0x18))[1])))) { local_110[0] = local_110[0] & 0xffffffffffffff00; local_110[1] = 0; } else { /* try { // try from 001f4b1f to 001f4b2c has its CatchHandler @ 001f4beb */ nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)local_110,(basic_json *)(in_RDX + 0x10)); } local_f0[0] = (data)0x0; local_e8 = 0; /* try { // try from 001f4b53 to 001f4b6e has its CatchHandler @ 001f4c11 */ minja::chat_template::apply ((basic_json *)local_e0,(basic_json *)param_2,SUB81(in_RDX,0),(basic_json *)local_110, *(bool *)(in_RDX + 0x68)); /* try { // try from 001f4b6f to 001f4b80 has its CatchHandler @ 001f4bf5 */ _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_ (local_40,local_e0); cVar3 = param_1[8]; param_1[8] = local_40[0]; uVar2 = *(int8 *)(param_1 + 0x10); *(int8 *)(param_1 + 0x10) = local_38; local_40[0] = cVar3; local_38 = uVar2; 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((data *)local_40); if (local_e0[0] != local_d0) { operator_delete(local_e0[0],local_d0[0] + 1); } 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_f0); 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((data *)local_110); *(int4 *)param_1 = 10; return; }
16,875
aggregate_thread_status(PFS_thread*, PFS_account*, PFS_user*, PFS_host*)
eloqsql/storage/perfschema/pfs_instr.cc
void aggregate_thread_status(PFS_thread *thread, PFS_account *safe_account, PFS_user *safe_user, PFS_host *safe_host) { THD *thd= thread->m_thd; if (thd == NULL) return; if (likely(safe_account != NULL)) { safe_account->aggregate_status_stats(&thd->status_var); return; } if (safe_user != NULL) { safe_user->aggregate_status_stats(&thd->status_var); } if (safe_host != NULL) { safe_host->aggregate_status_stats(&thd->status_var); } return; }
O0
cpp
aggregate_thread_status(PFS_thread*, PFS_account*, PFS_user*, PFS_host*): 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), %rax movq 0x1608(%rax), %rax movq %rax, -0x28(%rbp) cmpq $0x0, -0x28(%rbp) jne 0x3c760 jmp 0x3c7c0 cmpq $0x0, -0x10(%rbp) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x3c788 movq -0x10(%rbp), %rdi movq -0x28(%rbp), %rsi addq $0xc80, %rsi # imm = 0xC80 callq 0x417c0 jmp 0x3c7c0 cmpq $0x0, -0x18(%rbp) je 0x3c7a3 movq -0x18(%rbp), %rdi movq -0x28(%rbp), %rsi addq $0xc80, %rsi # imm = 0xC80 callq 0x417c0 cmpq $0x0, -0x20(%rbp) je 0x3c7be movq -0x20(%rbp), %rdi movq -0x28(%rbp), %rsi addq $0xc80, %rsi # imm = 0xC80 callq 0x417c0 jmp 0x3c7c0 addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_Z23aggregate_thread_statusP10PFS_threadP11PFS_accountP8PFS_userP8PFS_host: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rax, [rbp+var_8] mov rax, [rax+1608h] mov [rbp+var_28], rax cmp [rbp+var_28], 0 jnz short loc_3C760 jmp short loc_3C7C0 loc_3C760: cmp [rbp+var_10], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 jz short loc_3C788 mov rdi, [rbp+var_10] mov rsi, [rbp+var_28] add rsi, 0C80h call _ZN20PFS_connection_slice22aggregate_status_statsEPK17system_status_var; PFS_connection_slice::aggregate_status_stats(system_status_var const*) jmp short loc_3C7C0 loc_3C788: cmp [rbp+var_18], 0 jz short loc_3C7A3 mov rdi, [rbp+var_18] mov rsi, [rbp+var_28] add rsi, 0C80h call _ZN20PFS_connection_slice22aggregate_status_statsEPK17system_status_var; PFS_connection_slice::aggregate_status_stats(system_status_var const*) loc_3C7A3: cmp [rbp+var_20], 0 jz short loc_3C7BE mov rdi, [rbp+var_20] mov rsi, [rbp+var_28] add rsi, 0C80h call _ZN20PFS_connection_slice22aggregate_status_statsEPK17system_status_var; PFS_connection_slice::aggregate_status_stats(system_status_var const*) loc_3C7BE: jmp short $+2 loc_3C7C0: add rsp, 30h pop rbp retn
long long aggregate_thread_status(PFS_thread *a1, PFS_account *a2, PFS_user *a3, PFS_host *a4) { long long result; // rax long long v5; // [rsp+8h] [rbp-28h] result = *((_QWORD *)a1 + 705); v5 = result; if ( result ) { result = a2 != 0LL; if ( a2 ) { return PFS_connection_slice::aggregate_status_stats(a2, v5 + 3200); } else { if ( a3 ) result = PFS_connection_slice::aggregate_status_stats(a3, v5 + 3200); if ( a4 ) return PFS_connection_slice::aggregate_status_stats(a4, v5 + 3200); } } return result; }
aggregate_thread_status: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x1608] MOV qword ptr [RBP + -0x28],RAX CMP qword ptr [RBP + -0x28],0x0 JNZ 0x0013c760 JMP 0x0013c7c0 LAB_0013c760: CMP qword ptr [RBP + -0x10],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 JZ 0x0013c788 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x28] ADD RSI,0xc80 CALL 0x001417c0 JMP 0x0013c7c0 LAB_0013c788: CMP qword ptr [RBP + -0x18],0x0 JZ 0x0013c7a3 MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x28] ADD RSI,0xc80 CALL 0x001417c0 LAB_0013c7a3: CMP qword ptr [RBP + -0x20],0x0 JZ 0x0013c7be MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x28] ADD RSI,0xc80 CALL 0x001417c0 LAB_0013c7be: JMP 0x0013c7c0 LAB_0013c7c0: ADD RSP,0x30 POP RBP RET
/* aggregate_thread_status(PFS_thread*, PFS_account*, PFS_user*, PFS_host*) */ void aggregate_thread_status (PFS_thread *param_1,PFS_account *param_2,PFS_user *param_3,PFS_host *param_4) { long lVar1; lVar1 = *(long *)(param_1 + 0x1608); if (lVar1 != 0) { if (param_2 == (PFS_account *)0x0) { if (param_3 != (PFS_user *)0x0) { PFS_connection_slice::aggregate_status_stats ((PFS_connection_slice *)param_3,(system_status_var *)(lVar1 + 0xc80)); } if (param_4 != (PFS_host *)0x0) { PFS_connection_slice::aggregate_status_stats ((PFS_connection_slice *)param_4,(system_status_var *)(lVar1 + 0xc80)); } } else { PFS_connection_slice::aggregate_status_stats ((PFS_connection_slice *)param_2,(system_status_var *)(lVar1 + 0xc80)); } } return; }
16,876
aggregate_thread_status(PFS_thread*, PFS_account*, PFS_user*, PFS_host*)
eloqsql/storage/perfschema/pfs_instr.cc
void aggregate_thread_status(PFS_thread *thread, PFS_account *safe_account, PFS_user *safe_user, PFS_host *safe_host) { THD *thd= thread->m_thd; if (thd == NULL) return; if (likely(safe_account != NULL)) { safe_account->aggregate_status_stats(&thd->status_var); return; } if (safe_user != NULL) { safe_user->aggregate_status_stats(&thd->status_var); } if (safe_host != NULL) { safe_host->aggregate_status_stats(&thd->status_var); } return; }
O3
cpp
aggregate_thread_status(PFS_thread*, PFS_account*, PFS_user*, PFS_host*): pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq 0x1608(%rdi), %rbx testq %rbx, %rbx je 0x38f74 testq %rsi, %rsi je 0x38f51 addq $0xc80, %rbx # imm = 0xC80 addq $0x30, %rsi movq %rsi, %rdi movq %rbx, %rsi popq %rbx popq %r14 popq %rbp jmp 0x3cec2 movq %rcx, %r14 testq %rdx, %rdx je 0x38f6c leaq 0xc80(%rbx), %rsi addq $0x30, %rdx movq %rdx, %rdi callq 0x3cec2 movq %r14, %rsi testq %r14, %r14 jne 0x38f37 popq %rbx popq %r14 popq %rbp retq
_Z23aggregate_thread_statusP10PFS_threadP11PFS_accountP8PFS_userP8PFS_host: push rbp mov rbp, rsp push r14 push rbx mov rbx, [rdi+1608h] test rbx, rbx jz short loc_38F74 test rsi, rsi jz short loc_38F51 loc_38F37: add rbx, 0C80h add rsi, 30h ; '0' mov rdi, rsi mov rsi, rbx pop rbx pop r14 pop rbp jmp _ZN16PFS_status_stats14aggregate_fromEPK17system_status_var; PFS_status_stats::aggregate_from(system_status_var const*) loc_38F51: mov r14, rcx test rdx, rdx jz short loc_38F6C lea rsi, [rbx+0C80h] add rdx, 30h ; '0' mov rdi, rdx call _ZN16PFS_status_stats14aggregate_fromEPK17system_status_var; PFS_status_stats::aggregate_from(system_status_var const*) loc_38F6C: mov rsi, r14 test r14, r14 jnz short loc_38F37 loc_38F74: pop rbx pop r14 pop rbp retn
long long aggregate_thread_status(PFS_thread *a1, PFS_account *a2, PFS_user *a3, PFS_host *a4) { long long v4; // rbx long long result; // rax v4 = *((_QWORD *)a1 + 705); if ( v4 ) { if ( a2 ) return PFS_status_stats::aggregate_from((char *)a2 + 48, v4 + 3200); if ( a3 ) result = PFS_status_stats::aggregate_from((char *)a3 + 48, v4 + 3200); a2 = a4; if ( a4 ) return PFS_status_stats::aggregate_from((char *)a2 + 48, v4 + 3200); } return result; }
aggregate_thread_status: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,qword ptr [RDI + 0x1608] TEST RBX,RBX JZ 0x00138f74 TEST RSI,RSI JZ 0x00138f51 LAB_00138f37: ADD RBX,0xc80 ADD RSI,0x30 MOV RDI,RSI MOV RSI,RBX POP RBX POP R14 POP RBP JMP 0x0013cec2 LAB_00138f51: MOV R14,RCX TEST RDX,RDX JZ 0x00138f6c LEA RSI,[RBX + 0xc80] ADD RDX,0x30 MOV RDI,RDX CALL 0x0013cec2 LAB_00138f6c: MOV RSI,R14 TEST R14,R14 JNZ 0x00138f37 LAB_00138f74: POP RBX POP R14 POP RBP RET
/* aggregate_thread_status(PFS_thread*, PFS_account*, PFS_user*, PFS_host*) */ void aggregate_thread_status (PFS_thread *param_1,PFS_account *param_2,PFS_user *param_3,PFS_host *param_4) { long lVar1; lVar1 = *(long *)(param_1 + 0x1608); if (lVar1 == 0) { return; } if (param_2 == (PFS_account *)0x0) { if (param_3 != (PFS_user *)0x0) { PFS_status_stats::aggregate_from ((PFS_status_stats *)(param_3 + 0x30),(system_status_var *)(lVar1 + 0xc80)); } param_2 = (PFS_account *)param_4; if (param_4 == (PFS_host *)0x0) { return; } } PFS_status_stats::aggregate_from ((PFS_status_stats *)((PFS_host *)param_2 + 0x30),(system_status_var *)(lVar1 + 0xc80)); return; }
16,877
ft2_search
eloqsql/storage/myisam/ft_boolean_search.c
static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search) { int r; MYISAM_SHARE *share= ftb->info->s; if (share->concurrent_insert) mysql_rwlock_rdlock(&share->key_root_lock[ftb->keynr]); r= _ft2_search_no_lock(ftb, ftbw, init_search); if (share->concurrent_insert) mysql_rwlock_unlock(&share->key_root_lock[ftb->keynr]); return r; }
O0
c
ft2_search: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movb %dl, %al movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movb %al, -0x11(%rbp) movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax cmpb $0x0, 0x384(%rax) je 0xa0751 movq -0x20(%rbp), %rax movq 0x4c8(%rax), %rdi movq -0x8(%rbp), %rax movl 0x340(%rax), %eax imulq $0x98, %rax, %rax addq %rax, %rdi leaq 0xb476c(%rip), %rsi # 0x154eb3 movl $0x1e4, %edx # imm = 0x1E4 callq 0xa1930 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movsbl -0x11(%rbp), %edx callq 0xa19a0 movl %eax, -0x18(%rbp) movq -0x20(%rbp), %rax cmpb $0x0, 0x384(%rax) je 0xa0796 movq -0x20(%rbp), %rax movq 0x4c8(%rax), %rdi movq -0x8(%rbp), %rax movl 0x340(%rax), %eax imulq $0x98, %rax, %rax addq %rax, %rdi callq 0xa1f40 movl -0x18(%rbp), %eax addq $0x20, %rsp popq %rbp retq nop
_ft2_search: push rbp mov rbp, rsp sub rsp, 20h mov al, dl mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_11], al mov rax, [rbp+var_8] mov rax, [rax+8] mov rax, [rax] mov [rbp+var_20], rax mov rax, [rbp+var_20] cmp byte ptr [rax+384h], 0 jz short loc_A0751 mov rax, [rbp+var_20] mov rdi, [rax+4C8h] mov rax, [rbp+var_8] mov eax, [rax+340h] imul rax, 98h add rdi, rax lea rsi, aWorkspaceLlm4b_21; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 1E4h call inline_mysql_rwlock_rdlock_1 loc_A0751: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] movsx edx, [rbp+var_11] call _ft2_search_no_lock mov [rbp+var_18], eax mov rax, [rbp+var_20] cmp byte ptr [rax+384h], 0 jz short loc_A0796 mov rax, [rbp+var_20] mov rdi, [rax+4C8h] mov rax, [rbp+var_8] mov eax, [rax+340h] imul rax, 98h add rdi, rax call inline_mysql_rwlock_unlock_3 loc_A0796: mov eax, [rbp+var_18] add rsp, 20h pop rbp retn
long long ft2_search(long long a1, long long a2, char a3) { long long v4; // [rsp+0h] [rbp-20h] unsigned int v5; // [rsp+8h] [rbp-18h] v4 = **(_QWORD **)(a1 + 8); if ( *(_BYTE *)(v4 + 900) ) inline_mysql_rwlock_rdlock_1( 152LL * *(unsigned int *)(a1 + 832) + *(_QWORD *)(v4 + 1224), "/workspace/llm4binary/github2025/eloqsql/storage/myisam/ft_boolean_search.c", 484LL); v5 = ft2_search_no_lock(a1, a2, (unsigned int)a3); if ( *(_BYTE *)(v4 + 900) ) inline_mysql_rwlock_unlock_3(152LL * *(unsigned int *)(a1 + 832) + *(_QWORD *)(v4 + 1224)); return v5; }
_ft2_search: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV AL,DL MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV byte ptr [RBP + -0x11],AL MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] CMP byte ptr [RAX + 0x384],0x0 JZ 0x001a0751 MOV RAX,qword ptr [RBP + -0x20] MOV RDI,qword ptr [RAX + 0x4c8] MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x340] IMUL RAX,RAX,0x98 ADD RDI,RAX LEA RSI,[0x254eb3] MOV EDX,0x1e4 CALL 0x001a1930 LAB_001a0751: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOVSX EDX,byte ptr [RBP + -0x11] CALL 0x001a19a0 MOV dword ptr [RBP + -0x18],EAX MOV RAX,qword ptr [RBP + -0x20] CMP byte ptr [RAX + 0x384],0x0 JZ 0x001a0796 MOV RAX,qword ptr [RBP + -0x20] MOV RDI,qword ptr [RAX + 0x4c8] MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x340] IMUL RAX,RAX,0x98 ADD RDI,RAX CALL 0x001a1f40 LAB_001a0796: MOV EAX,dword ptr [RBP + -0x18] ADD RSP,0x20 POP RBP RET
int4 _ft2_search(long param_1,int8 param_2,char param_3) { long lVar1; int4 uVar2; lVar1 = **(long **)(param_1 + 8); if (*(char *)(lVar1 + 900) != '\0') { inline_mysql_rwlock_rdlock (*(long *)(lVar1 + 0x4c8) + (ulong)*(uint *)(param_1 + 0x340) * 0x98, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/ft_boolean_search.c",0x1e4); } uVar2 = _ft2_search_no_lock(param_1,param_2,(int)param_3); if (*(char *)(lVar1 + 900) != '\0') { inline_mysql_rwlock_unlock(*(long *)(lVar1 + 0x4c8) + (ulong)*(uint *)(param_1 + 0x340) * 0x98); } return uVar2; }
16,878
testing::internal::StreamingListener::OnTestPartResult(testing::TestPartResult const&)
giladroyz[P]FindPeaks/build_O0/_deps/googletest-src/googletest/src/gtest-internal-inl.h
void OnTestPartResult(const TestPartResult& test_part_result) override { const char* file_name = test_part_result.file_name(); if (file_name == nullptr) file_name = ""; SendLn("event=TestPartResult&file=" + UrlEncode(file_name) + "&line=" + StreamableToString(test_part_result.line_number()) + "&message=" + UrlEncode(test_part_result.message())); }
O0
c
testing::internal::StreamingListener::OnTestPartResult(testing::TestPartResult const&): pushq %rbp movq %rsp, %rbp subq $0x140, %rsp # imm = 0x140 movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x138(%rbp) movq -0x10(%rbp), %rdi callq 0x46a10 movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) jne 0x598cd leaq 0x2207e(%rip), %rax # 0x7b947 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rsi leaq -0xd8(%rbp), %rdi movq %rdi, -0x140(%rbp) callq 0x3b740 movq -0x140(%rbp), %rdx leaq 0x23269(%rip), %rsi # 0x7cb5b leaq -0xb8(%rbp), %rdi callq 0x45410 jmp 0x59900 leaq 0x2326f(%rip), %rdx # 0x7cb76 leaq -0x98(%rbp), %rdi leaq -0xb8(%rbp), %rsi callq 0x44aa0 jmp 0x5991c movq -0x10(%rbp), %rdi callq 0x46a60 movl %eax, -0x10c(%rbp) leaq -0x108(%rbp), %rdi leaq -0x10c(%rbp), %rsi callq 0x44bc0 jmp 0x59940 leaq -0x78(%rbp), %rdi leaq -0x98(%rbp), %rsi leaq -0x108(%rbp), %rdx callq 0x44af0 jmp 0x59959 leaq 0x2321d(%rip), %rdx # 0x7cb7d leaq -0x58(%rbp), %rdi leaq -0x78(%rbp), %rsi callq 0x44aa0 jmp 0x5996f movq -0x10(%rbp), %rdi callq 0x46a90 movq %rax, %rsi leaq -0x130(%rbp), %rdi callq 0x3b740 jmp 0x59989 leaq -0x38(%rbp), %rdi leaq -0x58(%rbp), %rsi leaq -0x130(%rbp), %rdx callq 0x44af0 jmp 0x5999f movq -0x138(%rbp), %rdi leaq -0x38(%rbp), %rsi callq 0x5a6e0 jmp 0x599b1 leaq -0x38(%rbp), %rdi callq 0xad98 leaq -0x130(%rbp), %rdi callq 0xad98 leaq -0x58(%rbp), %rdi callq 0xad98 leaq -0x78(%rbp), %rdi callq 0xad98 leaq -0x108(%rbp), %rdi callq 0xad98 leaq -0x98(%rbp), %rdi callq 0xad98 leaq -0xb8(%rbp), %rdi callq 0xad98 leaq -0xd8(%rbp), %rdi callq 0xad98 addq $0x140, %rsp # imm = 0x140 popq %rbp retq movq %rax, %rcx movl %edx, %eax movq %rcx, -0xe0(%rbp) movl %eax, -0xe4(%rbp) jmp 0x59b03 movq %rax, %rcx movl %edx, %eax movq %rcx, -0xe0(%rbp) movl %eax, -0xe4(%rbp) jmp 0x59af7 movq %rax, %rcx movl %edx, %eax movq %rcx, -0xe0(%rbp) movl %eax, -0xe4(%rbp) jmp 0x59aeb movq %rax, %rcx movl %edx, %eax movq %rcx, -0xe0(%rbp) movl %eax, -0xe4(%rbp) jmp 0x59adf movq %rax, %rcx movl %edx, %eax movq %rcx, -0xe0(%rbp) movl %eax, -0xe4(%rbp) jmp 0x59ad6 movq %rax, %rcx movl %edx, %eax movq %rcx, -0xe0(%rbp) movl %eax, -0xe4(%rbp) jmp 0x59acd movq %rax, %rcx movl %edx, %eax movq %rcx, -0xe0(%rbp) movl %eax, -0xe4(%rbp) jmp 0x59ac1 movq %rax, %rcx movl %edx, %eax movq %rcx, -0xe0(%rbp) movl %eax, -0xe4(%rbp) leaq -0x38(%rbp), %rdi callq 0xad98 leaq -0x130(%rbp), %rdi callq 0xad98 leaq -0x58(%rbp), %rdi callq 0xad98 leaq -0x78(%rbp), %rdi callq 0xad98 leaq -0x108(%rbp), %rdi callq 0xad98 leaq -0x98(%rbp), %rdi callq 0xad98 leaq -0xb8(%rbp), %rdi callq 0xad98 leaq -0xd8(%rbp), %rdi callq 0xad98 movq -0xe0(%rbp), %rdi callq 0xac00 nopl (%rax,%rax)
_ZN7testing8internal17StreamingListener16OnTestPartResultERKNS_14TestPartResultE: push rbp mov rbp, rsp sub rsp, 140h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_138], rax mov rdi, [rbp+var_10]; this call _ZNK7testing14TestPartResult9file_nameEv; testing::TestPartResult::file_name(void) mov [rbp+var_18], rax cmp [rbp+var_18], 0 jnz short loc_598CD lea rax, aSFromSSMsTotal+1Ah; "" mov [rbp+var_18], rax loc_598CD: mov rsi, [rbp+var_18] lea rdi, [rbp+var_D8] mov [rbp+var_140], rdi call _ZN7testing8internal17StreamingListener9UrlEncodeB5cxx11EPKc; testing::internal::StreamingListener::UrlEncode(char const*) mov rdx, [rbp+var_140] lea rsi, aEventTestpartr; "event=TestPartResult&file=" lea rdi, [rbp+var_B8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) jmp short $+2 loc_59900: lea rdx, aLine_1; "&line=" lea rdi, [rbp+var_98] lea rsi, [rbp+var_B8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) jmp short $+2 loc_5991C: mov rdi, [rbp+var_10]; this call _ZNK7testing14TestPartResult11line_numberEv; testing::TestPartResult::line_number(void) mov [rbp+var_10C], eax lea rdi, [rbp+var_108] lea rsi, [rbp+var_10C] call _ZN7testing8internal18StreamableToStringIiEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; testing::internal::StreamableToString<int>(int const&) jmp short $+2 loc_59940: lea rdi, [rbp+var_78] lea rsi, [rbp+var_98] lea rdx, [rbp+var_108] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) jmp short $+2 loc_59959: lea rdx, aMessage_0; "&message=" lea rdi, [rbp+var_58] lea rsi, [rbp+var_78] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) jmp short $+2 loc_5996F: mov rdi, [rbp+var_10]; this call _ZNK7testing14TestPartResult7messageEv; testing::TestPartResult::message(void) mov rsi, rax lea rdi, [rbp+var_130] call _ZN7testing8internal17StreamingListener9UrlEncodeB5cxx11EPKc; testing::internal::StreamingListener::UrlEncode(char const*) jmp short $+2 loc_59989: lea rdi, [rbp+var_38] lea rsi, [rbp+var_58] lea rdx, [rbp+var_130] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) jmp short $+2 loc_5999F: mov rdi, [rbp+var_138] lea rsi, [rbp+var_38] call _ZN7testing8internal17StreamingListener6SendLnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::StreamingListener::SendLn(std::string const&) jmp short $+2 loc_599B1: lea rdi, [rbp+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_130]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_58]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_78]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_108]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_98]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_B8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_D8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() add rsp, 140h pop rbp retn mov rcx, rax mov eax, edx mov [rbp+var_E0], rcx mov [rbp+var_E4], eax jmp loc_59B03 mov rcx, rax mov eax, edx mov [rbp+var_E0], rcx mov [rbp+var_E4], eax jmp loc_59AF7 mov rcx, rax mov eax, edx mov [rbp+var_E0], rcx mov [rbp+var_E4], eax jmp loc_59AEB mov rcx, rax mov eax, edx mov [rbp+var_E0], rcx mov [rbp+var_E4], eax jmp short loc_59ADF mov rcx, rax mov eax, edx mov [rbp+var_E0], rcx mov [rbp+var_E4], eax jmp short loc_59AD6 mov rcx, rax mov eax, edx mov [rbp+var_E0], rcx mov [rbp+var_E4], eax jmp short loc_59ACD mov rcx, rax mov eax, edx mov [rbp+var_E0], rcx mov [rbp+var_E4], eax jmp short loc_59AC1 mov rcx, rax mov eax, edx mov [rbp+var_E0], rcx mov [rbp+var_E4], eax lea rdi, [rbp+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_59AC1: lea rdi, [rbp+var_130]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_59ACD: lea rdi, [rbp+var_58]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_59AD6: lea rdi, [rbp+var_78]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_59ADF: lea rdi, [rbp+var_108]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_59AEB: lea rdi, [rbp+var_98]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_59AF7: lea rdi, [rbp+var_B8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_59B03: lea rdi, [rbp+var_D8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rdi, [rbp+var_E0] call __Unwind_Resume
void testing::internal::StreamingListener::OnTestPartResult( testing::internal::StreamingListener *this, const testing::TestPartResult *a2) { signed __int8 *v2; // rax _BYTE v3[36]; // [rsp+10h] [rbp-130h] BYREF int v4; // [rsp+34h] [rbp-10Ch] BYREF _BYTE v5[36]; // [rsp+38h] [rbp-108h] BYREF _BYTE v6[32]; // [rsp+68h] [rbp-D8h] BYREF _BYTE v7[32]; // [rsp+88h] [rbp-B8h] BYREF _BYTE v8[32]; // [rsp+A8h] [rbp-98h] BYREF _BYTE v9[32]; // [rsp+C8h] [rbp-78h] BYREF _BYTE v10[32]; // [rsp+E8h] [rbp-58h] BYREF _BYTE v11[32]; // [rsp+108h] [rbp-38h] BYREF signed __int8 *v12; // [rsp+128h] [rbp-18h] testing::TestPartResult *v13; // [rsp+130h] [rbp-10h] testing::internal::StreamingListener *v14; // [rsp+138h] [rbp-8h] v14 = this; v13 = a2; v12 = (signed __int8 *)testing::TestPartResult::file_name(a2); if ( !v12 ) v12 = ""; testing::internal::StreamingListener::UrlEncode[abi:cxx11]((long long)v6, v12); std::operator+<char>((long long)v7, (long long)"event=TestPartResult&file=", (long long)v6); std::operator+<char>((long long)v8, (long long)v7, "&line="); v4 = testing::TestPartResult::line_number(v13); testing::internal::StreamableToString<int>((long long)v5, (long long)&v4); std::operator+<char>((long long)v9, (long long)v8, (long long)v5); std::operator+<char>((long long)v10, (long long)v9, "&message="); v2 = (signed __int8 *)testing::TestPartResult::message(v13); testing::internal::StreamingListener::UrlEncode[abi:cxx11]((long long)v3, v2); std::operator+<char>((long long)v11, (long long)v10, (long long)v3); testing::internal::StreamingListener::SendLn(this, v11); std::string::~string(v11); std::string::~string(v3); std::string::~string(v10); std::string::~string(v9); std::string::~string(v5); std::string::~string(v8); std::string::~string(v7); std::string::~string(v6); }
OnTestPartResult: PUSH RBP MOV RBP,RSP SUB RSP,0x140 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x138],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00146a10 MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x18],0x0 JNZ 0x001598cd LEA RAX,[0x17b947] MOV qword ptr [RBP + -0x18],RAX LAB_001598cd: MOV RSI,qword ptr [RBP + -0x18] LEA RDI,[RBP + -0xd8] MOV qword ptr [RBP + -0x140],RDI CALL 0x0013b740 MOV RDX,qword ptr [RBP + -0x140] LAB_001598eb: LEA RSI,[0x17cb5b] LEA RDI,[RBP + -0xb8] CALL 0x00145410 JMP 0x00159900 LAB_00159900: LEA RDX,[0x17cb76] LEA RDI,[RBP + -0x98] LEA RSI,[RBP + -0xb8] CALL 0x00144aa0 JMP 0x0015991c LAB_0015991c: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00146a60 MOV dword ptr [RBP + -0x10c],EAX LAB_0015992b: LEA RDI,[RBP + -0x108] LEA RSI,[RBP + -0x10c] CALL 0x00144bc0 JMP 0x00159940 LAB_00159940: LEA RDI,[RBP + -0x78] LEA RSI,[RBP + -0x98] LEA RDX,[RBP + -0x108] CALL 0x00144af0 JMP 0x00159959 LAB_00159959: LEA RDX,[0x17cb7d] LEA RDI,[RBP + -0x58] LEA RSI,[RBP + -0x78] CALL 0x00144aa0 JMP 0x0015996f LAB_0015996f: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00146a90 MOV RSI,RAX LAB_0015997b: LEA RDI,[RBP + -0x130] CALL 0x0013b740 JMP 0x00159989 LAB_00159989: LEA RDI,[RBP + -0x38] LEA RSI,[RBP + -0x58] LEA RDX,[RBP + -0x130] CALL 0x00144af0 JMP 0x0015999f LAB_0015999f: MOV RDI,qword ptr [RBP + -0x138] LEA RSI,[RBP + -0x38] CALL 0x0015a6e0 LAB_001599af: JMP 0x001599b1 LAB_001599b1: LEA RDI,[RBP + -0x38] CALL 0x0010ad98 LEA RDI,[RBP + -0x130] CALL 0x0010ad98 LEA RDI,[RBP + -0x58] CALL 0x0010ad98 LEA RDI,[RBP + -0x78] CALL 0x0010ad98 LEA RDI,[RBP + -0x108] CALL 0x0010ad98 LEA RDI,[RBP + -0x98] CALL 0x0010ad98 LEA RDI,[RBP + -0xb8] CALL 0x0010ad98 LEA RDI,[RBP + -0xd8] CALL 0x0010ad98 ADD RSP,0x140 POP RBP RET
/* testing::internal::StreamingListener::OnTestPartResult(testing::TestPartResult const&) */ void __thiscall testing::internal::StreamingListener::OnTestPartResult (StreamingListener *this,TestPartResult *param_1) { char *pcVar1; StreamingListener local_138 [36]; int local_114; internal local_110 [48]; StreamingListener local_e0 [32]; string local_c0 [32]; string local_a0 [32]; string local_80 [32]; string local_60 [32]; string local_40 [32]; char *local_20; TestPartResult *local_18; StreamingListener *local_10; local_18 = param_1; local_10 = this; local_20 = (char *)TestPartResult::file_name(); if (local_20 == (char *)0x0) { local_20 = ""; } UrlEncode_abi_cxx11_(local_e0,local_20); /* try { // try from 001598eb to 001598fd has its CatchHandler @ 00159a11 */ std::operator+((char *)local_c0,(string *)"event=TestPartResult&file="); /* try { // try from 00159900 to 00159919 has its CatchHandler @ 00159a28 */ std::operator+(local_a0,(char *)local_c0); local_114 = TestPartResult::line_number(local_18); /* try { // try from 0015992b to 0015993d has its CatchHandler @ 00159a3f */ StreamableToString<int>(local_110,&local_114); /* try { // try from 00159940 to 00159956 has its CatchHandler @ 00159a56 */ std::operator+(local_80,local_a0); /* try { // try from 00159959 to 0015996c has its CatchHandler @ 00159a6a */ std::operator+(local_60,(char *)local_80); pcVar1 = (char *)TestPartResult::message(); /* try { // try from 0015997b to 00159986 has its CatchHandler @ 00159a7e */ UrlEncode_abi_cxx11_(local_138,pcVar1); /* try { // try from 00159989 to 0015999c has its CatchHandler @ 00159a92 */ std::operator+(local_40,local_60); /* try { // try from 0015999f to 001599ae has its CatchHandler @ 00159aa6 */ SendLn(this,local_40); std::__cxx11::string::~string(local_40); std::__cxx11::string::~string((string *)local_138); std::__cxx11::string::~string(local_60); std::__cxx11::string::~string(local_80); std::__cxx11::string::~string((string *)local_110); std::__cxx11::string::~string(local_a0); std::__cxx11::string::~string(local_c0); std::__cxx11::string::~string((string *)local_e0); return; }
16,879
nglog::tools::ReadFromOffset(int, void*, unsigned long, unsigned long)
ng-log[P]ng-log/src/symbolize.cc
static ssize_t ReadFromOffset(const int fd, void* buf, const size_t count, const size_t offset) { NGLOG_SAFE_ASSERT(fd >= 0); NGLOG_SAFE_ASSERT(count <= static_cast<size_t>(std::numeric_limits<ssize_t>::max())); char* buf0 = reinterpret_cast<char*>(buf); size_t num_bytes = 0; while (num_bytes < count) { ssize_t len = FailureRetry([fd, p = buf0 + num_bytes, n = count - num_bytes, m = static_cast<off_t>(offset + num_bytes)] { return pread(fd, p, n, m); }); if (len < 0) { // There was an error other than EINTR. return -1; } if (len == 0) { // Reached EOF. break; } num_bytes += static_cast<size_t>(len); } NGLOG_SAFE_ASSERT(num_bytes <= count); return static_cast<ssize_t>(num_bytes); }
O3
cpp
nglog::tools::ReadFromOffset(int, void*, unsigned long, unsigned long): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp testl %edi, %edi js 0x2139e testq %rdx, %rdx js 0x2139e movl %edi, %ebp xorl %r14d, %r14d movq %rdx, 0x10(%rsp) movq %rsi, 0x8(%rsp) movq %rdx, %r13 subq %r14, %r13 jbe 0x21399 leaq (%rsi,%r14), %r15 movq %rcx, %rbx leaq (%r14,%rcx), %r12 movl %ebp, %edi movq %r15, %rsi movq %r13, %rdx movq %r12, %rcx callq 0x76c0 cmpq $-0x1, %rax jne 0x21364 callq 0x7050 cmpl $0x4, (%rax) je 0x21342 jmp 0x213a3 xorl %ecx, %ecx testq %rax, %rax sete %cl leal (%rcx,%rcx,2), %edi movl $0x0, %ecx cmovleq %rcx, %rax movl $0x1, %ecx cmovsl %ecx, %edi addq %rax, %r14 testl %edi, %edi movq %rbx, %rcx movq 0x10(%rsp), %rdx movq 0x8(%rsp), %rsi je 0x2132f cmpl $0x3, %edi jne 0x213a3 cmpq %rdx, %r14 jbe 0x213aa callq 0x72b0 movq $-0x1, %r14 movq %r14, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN5nglog5toolsL14ReadFromOffsetEiPvmm: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h test edi, edi js loc_2139E test rdx, rdx js short loc_2139E mov ebp, edi xor r14d, r14d mov [rsp+48h+var_38], rdx mov [rsp+48h+var_40], rsi loc_2132F: mov r13, rdx sub r13, r14 jbe short loc_21399 lea r15, [rsi+r14] mov rbx, rcx lea r12, [r14+rcx] loc_21342: mov edi, ebp mov rsi, r15 mov rdx, r13 mov rcx, r12 call _pread cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_21364 call ___errno_location cmp dword ptr [rax], 4 jz short loc_21342 jmp short loc_213A3 loc_21364: xor ecx, ecx test rax, rax setz cl lea edi, [rcx+rcx*2] mov ecx, 0 cmovle rax, rcx mov ecx, 1 cmovs edi, ecx add r14, rax test edi, edi mov rcx, rbx mov rdx, [rsp+48h+var_38] mov rsi, [rsp+48h+var_40] jz short loc_2132F cmp edi, 3 jnz short loc_213A3 loc_21399: cmp r14, rdx jbe short loc_213AA loc_2139E: call _abort loc_213A3: mov r14, 0FFFFFFFFFFFFFFFFh loc_213AA: mov rax, r14 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long nglog::tools::ReadFromOffset(unsigned long long this, long long a2, char *a3, long long a4) { unsigned int v4; // ebp unsigned long long v5; // r14 char *v6; // r13 long long v7; // rbx long long v8; // r12 long long v9; // rax bool v10; // sf long long v12; // [rsp+8h] [rbp-40h] char *v13; // [rsp+10h] [rbp-38h] if ( (this & 0x80000000) != 0LL || (long long)a3 < 0 ) LABEL_16: abort(this); v4 = this; v5 = 0LL; v13 = a3; v12 = a2; do { v6 = &a3[-v5]; if ( (unsigned long long)a3 <= v5 ) goto LABEL_15; v7 = a4; v8 = v5 + a4; while ( 1 ) { v9 = pread(v4, a2 + v5, v6, v8); if ( v9 != -1 ) break; if ( *(_DWORD *)__errno_location(v4) != 4 ) return -1LL; } v10 = v9 < 0; this = 3 * (unsigned int)(v9 == 0); if ( v9 <= 0 ) v9 = 0LL; if ( v10 ) this = 1LL; v5 += v9; a4 = v7; a3 = v13; a2 = v12; } while ( !(_DWORD)this ); if ( (_DWORD)this != 3 ) return -1LL; LABEL_15: if ( v5 > (unsigned long long)a3 ) goto LABEL_16; return v5; }
ReadFromOffset: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 TEST EDI,EDI JS 0x0012139e TEST RDX,RDX JS 0x0012139e MOV EBP,EDI XOR R14D,R14D MOV qword ptr [RSP + 0x10],RDX MOV qword ptr [RSP + 0x8],RSI LAB_0012132f: MOV R13,RDX SUB R13,R14 JBE 0x00121399 LEA R15,[RSI + R14*0x1] MOV RBX,RCX LEA R12,[R14 + RCX*0x1] LAB_00121342: MOV EDI,EBP MOV RSI,R15 MOV RDX,R13 MOV RCX,R12 CALL 0x001076c0 CMP RAX,-0x1 JNZ 0x00121364 CALL 0x00107050 CMP dword ptr [RAX],0x4 JZ 0x00121342 JMP 0x001213a3 LAB_00121364: XOR ECX,ECX TEST RAX,RAX SETZ CL LEA EDI,[RCX + RCX*0x2] MOV ECX,0x0 CMOVLE RAX,RCX MOV ECX,0x1 CMOVS EDI,ECX ADD R14,RAX TEST EDI,EDI MOV RCX,RBX MOV RDX,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x8] JZ 0x0012132f CMP EDI,0x3 JNZ 0x001213a3 LAB_00121399: CMP R14,RDX JBE 0x001213aa LAB_0012139e: CALL 0x001072b0 LAB_001213a3: MOV R14,-0x1 LAB_001213aa: MOV RAX,R14 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nglog::tools::ReadFromOffset(int, void*, unsigned long, unsigned long) */ ulong nglog::tools::ReadFromOffset(int param_1,void *param_2,ulong param_3,ulong param_4) { char cVar1; long lVar2; int *piVar3; ulong uVar4; bool bVar5; bool bVar6; if ((-1 < param_1) && (-1 < (long)param_3)) { uVar4 = 0; do { if (param_3 < uVar4 || param_3 - uVar4 == 0) goto LAB_00121399; while (lVar2 = pread(param_1,(void *)((long)param_2 + uVar4),param_3 - uVar4,uVar4 + param_4), lVar2 == -1) { piVar3 = __errno_location(); if (*piVar3 != 4) goto LAB_001213a3; } bVar6 = lVar2 < 0; bVar5 = lVar2 == 0; if (lVar2 < 1) { lVar2 = 0; } cVar1 = bVar5 * '\x03'; if (bVar6) { cVar1 = '\x01'; } uVar4 = uVar4 + lVar2; } while (cVar1 == '\0'); if (cVar1 == '\x03') { LAB_00121399: if (param_3 < uVar4) goto LAB_0012139e; } else { LAB_001213a3: uVar4 = 0xffffffffffffffff; } return uVar4; } LAB_0012139e: /* WARNING: Subroutine does not return */ abort(); }
16,880
google::protobuf::OneofDescriptorProto::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
void OneofDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { auto* const _this = static_cast<OneofDescriptorProto*>(&to_msg); auto& from = static_cast<const OneofDescriptorProto&>(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.OneofDescriptorProto) GOOGLE_DCHECK_NE(&from, _this); uint32_t cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = from._impl_._has_bits_[0]; if (cached_has_bits & 0x00000003u) { if (cached_has_bits & 0x00000001u) { _this->_internal_set_name(from._internal_name()); } if (cached_has_bits & 0x00000002u) { _this->_internal_mutable_options()->::PROTOBUF_NAMESPACE_ID::OneofOptions::MergeFrom( from._internal_options()); } } _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); }
O0
cpp
google::protobuf::OneofDescriptorProto::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&): subq $0x138, %rsp # imm = 0x138 movq %rdi, 0xb8(%rsp) movq %rsi, 0xb0(%rsp) movq 0xb8(%rsp), %rax movq %rax, 0xa8(%rsp) movq 0xb0(%rsp), %rax movq %rax, 0xa0(%rsp) xorl %eax, %eax testb $0x1, %al jne 0xb53a2 jmp 0xb544c movq 0xa0(%rsp), %rax movq 0xa8(%rsp), %rcx movb $0x0, 0x67(%rsp) cmpq %rcx, %rax je 0xb53be jmp 0xb540e leaq 0x13b56b(%rip), %rdx # 0x1f0930 leaq 0x68(%rsp), %rdi movq %rdi, 0x38(%rsp) movl $0x3, %esi movl $0x1139, %ecx # imm = 0x1139 callq 0x237e0 movq 0x38(%rsp), %rdi movb $0x1, 0x67(%rsp) leaq 0x13b5ab(%rip), %rsi # 0x1f099a callq 0x230a0 movq %rax, 0x40(%rsp) jmp 0xb53fb movq 0x40(%rsp), %rsi leaq 0x53(%rsp), %rdi callq 0x23250 jmp 0xb540c jmp 0xb540e testb $0x1, 0x67(%rsp) jne 0xb5417 jmp 0xb5421 leaq 0x68(%rsp), %rdi callq 0x23820 jmp 0xb5397 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x58(%rsp) movl %eax, 0x54(%rsp) testb $0x1, 0x67(%rsp) jne 0xb543d jmp 0xb5447 leaq 0x68(%rsp), %rdi callq 0x23820 jmp 0xb5687 movl $0x0, 0x4c(%rsp) movq 0xa0(%rsp), %rax addq $0x10, %rax movq %rax, 0x100(%rsp) movl $0x0, 0xfc(%rsp) movq 0x100(%rsp), %rax movslq 0xfc(%rsp), %rcx movl (%rax,%rcx,4), %eax movl %eax, 0x4c(%rsp) movl 0x4c(%rsp), %eax andl $0x3, %eax cmpl $0x0, %eax je 0xb5582 movl 0x4c(%rsp), %eax andl $0x1, %eax cmpl $0x0, %eax je 0xb5548 movq 0xa8(%rsp), %rax movq %rax, 0x20(%rsp) movq 0xa0(%rsp), %rdi callq 0x87d60 movq 0x20(%rsp), %rcx movq %rcx, 0x110(%rsp) movq %rax, 0x108(%rsp) movq 0x110(%rsp), %rdi movq %rdi, %rax addq $0x10, %rax movq %rax, 0x120(%rsp) movl $0x0, 0x11c(%rsp) movq 0x120(%rsp), %rax movslq 0x11c(%rsp), %rcx movl (%rax,%rcx,4), %edx orl $0x1, %edx movl %edx, (%rax,%rcx,4) movq %rdi, %rax addq $0x10, %rax addq $0x8, %rax movq %rax, 0x28(%rsp) movq 0x108(%rsp), %rax movq %rax, 0x30(%rsp) callq 0x80180 movq 0x28(%rsp), %rdi movq 0x30(%rsp), %rsi movq %rax, %rdx callq 0x183680 movl 0x4c(%rsp), %eax andl $0x2, %eax cmpl $0x0, %eax je 0xb5580 movq 0xa8(%rsp), %rdi callq 0x81490 movq %rax, 0x18(%rsp) movq 0xa0(%rsp), %rdi callq 0x87ed0 movq 0x18(%rsp), %rdi movq %rax, %rsi callq 0xd78b0 jmp 0xb5582 movq 0xa8(%rsp), %rcx addq $0x8, %rcx movq 0xa0(%rsp), %rax addq $0x8, %rax movq %rcx, 0xc8(%rsp) movq %rax, 0xc0(%rsp) movq 0xc8(%rsp), %rax movq %rax, 0x10(%rsp) movq 0xc0(%rsp), %rax movq %rax, 0xd0(%rsp) movq 0xd0(%rsp), %rax movq %rax, 0x130(%rsp) movq 0x130(%rsp), %rax movq (%rax), %rax andq $0x1, %rax cmpq $0x0, %rax je 0xb567f movq 0xc0(%rsp), %rax movq %rax, 0xe0(%rsp) movq $0x0, 0xd8(%rsp) movq 0xe0(%rsp), %rax movq %rax, 0x8(%rsp) movq %rax, 0xf0(%rsp) movq 0xf0(%rsp), %rax movq %rax, 0x128(%rsp) movq 0x128(%rsp), %rax movq (%rax), %rax andq $0x1, %rax cmpq $0x0, %rax je 0xb565e movq 0x8(%rsp), %rdi callq 0x9cd40 addq $0x8, %rax movq %rax, 0xe8(%rsp) jmp 0xb566d callq *0xd8(%rsp) movq %rax, 0xe8(%rsp) movq 0x10(%rsp), %rdi movq 0xe8(%rsp), %rsi callq 0xe0920 addq $0x138, %rsp # imm = 0x138 retq movq 0x58(%rsp), %rdi callq 0x13750 nopw %cs:(%rax,%rax)
_ZN6google8protobuf20OneofDescriptorProto9MergeImplERNS0_7MessageERKS2_: sub rsp, 138h mov [rsp+138h+var_80], rdi mov [rsp+138h+var_88], rsi mov rax, [rsp+138h+var_80] mov [rsp+138h+var_90], rax mov rax, [rsp+138h+var_88] mov [rsp+138h+var_98], rax loc_B5397: xor eax, eax test al, 1 jnz short loc_B53A2 jmp loc_B544C loc_B53A2: mov rax, [rsp+138h+var_98] mov rcx, [rsp+138h+var_90] mov [rsp+138h+var_D1], 0 cmp rax, rcx jz short loc_B53BE jmp short loc_B540E loc_B53BE: lea rdx, aWorkspaceLlm4b_8; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+138h+var_D0] mov [rsp+138h+var_100], rdi mov esi, 3 mov ecx, 1139h call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, [rsp+138h+var_100] mov [rsp+138h+var_D1], 1 lea rsi, aCheckFailedFro; "CHECK failed: (&from) != (_this): " call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+138h+var_F8], rax jmp short $+2 loc_B53FB: mov rsi, [rsp+138h+var_F8] lea rdi, [rsp+138h+var_E5] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_B540C: jmp short $+2 loc_B540E: test [rsp+138h+var_D1], 1 jnz short loc_B5417 jmp short loc_B5421 loc_B5417: lea rdi, [rsp+138h+var_D0]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_B5421: jmp loc_B5397 mov rcx, rax mov eax, edx mov [rsp+arg_50], rcx mov [rsp+arg_4C], eax test [rsp+arg_5F], 1 jnz short loc_B543D jmp short loc_B5447 loc_B543D: lea rdi, [rsp+arg_60]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_B5447: jmp loc_B5687 loc_B544C: mov [rsp+138h+var_EC], 0 mov rax, [rsp+138h+var_98] add rax, 10h mov [rsp+138h+var_38], rax mov [rsp+138h+var_3C], 0 mov rax, [rsp+138h+var_38] movsxd rcx, [rsp+138h+var_3C] mov eax, [rax+rcx*4] mov [rsp+138h+var_EC], eax mov eax, [rsp+138h+var_EC] and eax, 3 cmp eax, 0 jz loc_B5582 mov eax, [rsp+138h+var_EC] and eax, 1 cmp eax, 0 jz loc_B5548 mov rax, [rsp+138h+var_90] mov [rsp+138h+var_118], rax mov rdi, [rsp+138h+var_98] call _ZNK6google8protobuf20OneofDescriptorProto14_internal_nameB5cxx11Ev; google::protobuf::OneofDescriptorProto::_internal_name(void) mov rcx, [rsp+138h+var_118] mov [rsp+138h+var_28], rcx mov [rsp+138h+var_30], rax mov rdi, [rsp+138h+var_28]; this mov rax, rdi add rax, 10h mov [rsp+138h+var_18], rax mov [rsp+138h+var_1C], 0 mov rax, [rsp+138h+var_18] movsxd rcx, [rsp+138h+var_1C] mov edx, [rax+rcx*4] or edx, 1 mov [rax+rcx*4], edx mov rax, rdi add rax, 10h add rax, 8 mov qword ptr [rsp+138h+var_110], rax mov rax, [rsp+138h+var_30] mov qword ptr [rsp+138h+var_108], rax call _ZNK6google8protobuf11MessageLite21GetArenaForAllocationEv; google::protobuf::MessageLite::GetArenaForAllocation(void) mov rdi, qword ptr [rsp+138h+var_110]; int mov rsi, qword ptr [rsp+138h+var_108]; int mov rdx, rax; int call _ZN6google8protobuf8internal14ArenaStringPtr3SetERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS0_5ArenaE; google::protobuf::internal::ArenaStringPtr::Set(std::string const&,google::protobuf::Arena *) loc_B5548: mov eax, [rsp+138h+var_EC] and eax, 2 cmp eax, 0 jz short loc_B5580 mov rdi, [rsp+138h+var_90]; this call _ZN6google8protobuf20OneofDescriptorProto25_internal_mutable_optionsEv; google::protobuf::OneofDescriptorProto::_internal_mutable_options(void) mov [rsp+138h+var_120], rax mov rdi, [rsp+138h+var_98]; this call _ZNK6google8protobuf20OneofDescriptorProto17_internal_optionsEv; google::protobuf::OneofDescriptorProto::_internal_options(void) mov rdi, [rsp+138h+var_120]; this mov rsi, rax; google::protobuf::OneofOptions * call _ZN6google8protobuf12OneofOptions9MergeFromERKS1_; google::protobuf::OneofOptions::MergeFrom(google::protobuf::OneofOptions const&) loc_B5580: jmp short $+2 loc_B5582: mov rcx, [rsp+138h+var_90] add rcx, 8 mov rax, [rsp+138h+var_98] add rax, 8 mov [rsp+138h+var_70], rcx mov [rsp+138h+var_78], rax mov rax, [rsp+138h+var_70] mov [rsp+138h+var_128], rax mov rax, [rsp+138h+var_78] mov [rsp+138h+var_68], rax mov rax, [rsp+138h+var_68] mov [rsp+138h+var_8], rax mov rax, [rsp+138h+var_8] mov rax, [rax] and rax, 1 cmp rax, 0 jz loc_B567F mov rax, [rsp+138h+var_78] mov [rsp+138h+var_58], rax mov [rsp+138h+var_60], 0 mov rax, [rsp+138h+var_58] mov [rsp+138h+var_130], rax mov [rsp+138h+var_48], rax mov rax, [rsp+138h+var_48] mov [rsp+138h+var_10], rax mov rax, [rsp+138h+var_10] mov rax, [rax] and rax, 1 cmp rax, 0 jz short loc_B565E mov rdi, [rsp+138h+var_130] call _ZNK6google8protobuf8internal16InternalMetadata8PtrValueINS2_9ContainerINS0_15UnknownFieldSetEEEEEPT_v; google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>(void) add rax, 8 mov qword ptr [rsp+138h+var_50], rax jmp short loc_B566D loc_B565E: call [rsp+138h+var_60] mov qword ptr [rsp+138h+var_50], rax loc_B566D: mov rdi, [rsp+138h+var_128]; void * mov rsi, qword ptr [rsp+138h+var_50]; int call _ZN6google8protobuf8internal16InternalMetadata11DoMergeFromINS0_15UnknownFieldSetEEEvRKT_; google::protobuf::internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet>(google::protobuf::UnknownFieldSet const&) loc_B567F: add rsp, 138h retn loc_B5687: mov rdi, [rsp+arg_50] call __Unwind_Resume
long long google::protobuf::OneofDescriptorProto::MergeImpl( google::protobuf::OneofDescriptorProto *this, void ( ***a2)(google::protobuf::OneofOptions *__hidden this), const google::protobuf::Message *a3) { int ArenaForAllocation; // eax long long result; // rax int v5; // [rsp+4Ch] [rbp-ECh] google::protobuf::OneofDescriptorProto *v6; // [rsp+A0h] [rbp-98h] google::protobuf::OneofDescriptorProto *v7; // [rsp+A8h] [rbp-90h] _QWORD *v8; // [rsp+C0h] [rbp-78h] int v9[2]; // [rsp+E8h] [rbp-50h] google::protobuf::Message *v10; // [rsp+108h] [rbp-30h] v7 = this; v6 = (google::protobuf::OneofDescriptorProto *)a2; v5 = *((_DWORD *)a2 + 4); if ( (v5 & 3) != 0 ) { if ( (v5 & 1) != 0 ) { v10 = (google::protobuf::Message *)google::protobuf::OneofDescriptorProto::_internal_name[abi:cxx11]((long long)a2); *((_DWORD *)this + 4) |= 1u; ArenaForAllocation = google::protobuf::MessageLite::GetArenaForAllocation(this); this = (google::protobuf::OneofDescriptorProto *)((char *)this + 24); a2 = (void ( ***)(google::protobuf::OneofOptions *__hidden))v10; google::protobuf::internal::ArenaStringPtr::Set((_DWORD)v7 + 24, (int)v10, ArenaForAllocation); } if ( (v5 & 2) != 0 ) { this = (google::protobuf::OneofDescriptorProto *)google::protobuf::OneofDescriptorProto::_internal_mutable_options(v7); a2 = google::protobuf::OneofDescriptorProto::_internal_options(v6); google::protobuf::OneofOptions::MergeFrom(this, (const google::protobuf::OneofOptions *)a2); } } v8 = (_QWORD *)((char *)v6 + 8); result = *((_QWORD *)v6 + 1) & 1LL; if ( result ) { if ( (*v8 & 1LL) != 0 ) *(_QWORD *)v9 = google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>(v8) + 8; else v9[0] = ((long long ( *)(google::protobuf::OneofDescriptorProto *, void ( ***)(google::protobuf::OneofOptions *__hidden), const google::protobuf::Message *))dword_0)( this, a2, a3); return google::protobuf::internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet>( (char *)v7 + 8, v9[0]); } return result; }
MergeImpl: SUB RSP,0x138 MOV qword ptr [RSP + 0xb8],RDI MOV qword ptr [RSP + 0xb0],RSI MOV RAX,qword ptr [RSP + 0xb8] MOV qword ptr [RSP + 0xa8],RAX MOV RAX,qword ptr [RSP + 0xb0] MOV qword ptr [RSP + 0xa0],RAX LAB_001b5397: XOR EAX,EAX TEST AL,0x1 JNZ 0x001b53a2 JMP 0x001b544c LAB_001b53a2: MOV RAX,qword ptr [RSP + 0xa0] MOV RCX,qword ptr [RSP + 0xa8] MOV byte ptr [RSP + 0x67],0x0 CMP RAX,RCX JZ 0x001b53be JMP 0x001b540e LAB_001b53be: LEA RDX,[0x2f0930] LEA RDI,[RSP + 0x68] MOV qword ptr [RSP + 0x38],RDI MOV ESI,0x3 MOV ECX,0x1139 CALL 0x001237e0 MOV RDI,qword ptr [RSP + 0x38] MOV byte ptr [RSP + 0x67],0x1 LAB_001b53e8: LEA RSI,[0x2f099a] CALL 0x001230a0 MOV qword ptr [RSP + 0x40],RAX JMP 0x001b53fb LAB_001b53fb: MOV RSI,qword ptr [RSP + 0x40] LEA RDI,[RSP + 0x53] CALL 0x00123250 LAB_001b540a: JMP 0x001b540c LAB_001b540c: JMP 0x001b540e LAB_001b540e: TEST byte ptr [RSP + 0x67],0x1 JNZ 0x001b5417 JMP 0x001b5421 LAB_001b5417: LEA RDI,[RSP + 0x68] CALL 0x00123820 LAB_001b5421: JMP 0x001b5397 LAB_001b544c: MOV dword ptr [RSP + 0x4c],0x0 MOV RAX,qword ptr [RSP + 0xa0] ADD RAX,0x10 MOV qword ptr [RSP + 0x100],RAX MOV dword ptr [RSP + 0xfc],0x0 MOV RAX,qword ptr [RSP + 0x100] MOVSXD RCX,dword ptr [RSP + 0xfc] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RSP + 0x4c],EAX MOV EAX,dword ptr [RSP + 0x4c] AND EAX,0x3 CMP EAX,0x0 JZ 0x001b5582 MOV EAX,dword ptr [RSP + 0x4c] AND EAX,0x1 CMP EAX,0x0 JZ 0x001b5548 MOV RAX,qword ptr [RSP + 0xa8] MOV qword ptr [RSP + 0x20],RAX MOV RDI,qword ptr [RSP + 0xa0] CALL 0x00187d60 MOV RCX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x110],RCX MOV qword ptr [RSP + 0x108],RAX MOV RDI,qword ptr [RSP + 0x110] MOV RAX,RDI ADD RAX,0x10 MOV qword ptr [RSP + 0x120],RAX MOV dword ptr [RSP + 0x11c],0x0 MOV RAX,qword ptr [RSP + 0x120] MOVSXD RCX,dword ptr [RSP + 0x11c] MOV EDX,dword ptr [RAX + RCX*0x4] OR EDX,0x1 MOV dword ptr [RAX + RCX*0x4],EDX MOV RAX,RDI ADD RAX,0x10 ADD RAX,0x8 MOV qword ptr [RSP + 0x28],RAX MOV RAX,qword ptr [RSP + 0x108] MOV qword ptr [RSP + 0x30],RAX CALL 0x00180180 MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x30] MOV RDX,RAX CALL 0x00283680 LAB_001b5548: MOV EAX,dword ptr [RSP + 0x4c] AND EAX,0x2 CMP EAX,0x0 JZ 0x001b5580 MOV RDI,qword ptr [RSP + 0xa8] CALL 0x00181490 MOV qword ptr [RSP + 0x18],RAX MOV RDI,qword ptr [RSP + 0xa0] CALL 0x00187ed0 MOV RDI,qword ptr [RSP + 0x18] MOV RSI,RAX CALL 0x001d78b0 LAB_001b5580: JMP 0x001b5582 LAB_001b5582: MOV RCX,qword ptr [RSP + 0xa8] ADD RCX,0x8 MOV RAX,qword ptr [RSP + 0xa0] ADD RAX,0x8 MOV qword ptr [RSP + 0xc8],RCX MOV qword ptr [RSP + 0xc0],RAX MOV RAX,qword ptr [RSP + 0xc8] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0xc0] MOV qword ptr [RSP + 0xd0],RAX MOV RAX,qword ptr [RSP + 0xd0] MOV qword ptr [RSP + 0x130],RAX MOV RAX,qword ptr [RSP + 0x130] MOV RAX,qword ptr [RAX] AND RAX,0x1 CMP RAX,0x0 JZ 0x001b567f MOV RAX,qword ptr [RSP + 0xc0] MOV qword ptr [RSP + 0xe0],RAX MOV qword ptr [RSP + 0xd8],0x0 MOV RAX,qword ptr [RSP + 0xe0] MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0xf0],RAX MOV RAX,qword ptr [RSP + 0xf0] MOV qword ptr [RSP + 0x128],RAX MOV RAX,qword ptr [RSP + 0x128] MOV RAX,qword ptr [RAX] AND RAX,0x1 CMP RAX,0x0 JZ 0x001b565e MOV RDI,qword ptr [RSP + 0x8] CALL 0x0019cd40 ADD RAX,0x8 MOV qword ptr [RSP + 0xe8],RAX JMP 0x001b566d LAB_001b565e: CALL qword ptr [RSP + 0xd8] MOV qword ptr [RSP + 0xe8],RAX LAB_001b566d: MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0xe8] CALL 0x001e0920 LAB_001b567f: ADD RSP,0x138 RET
/* WARNING: Removing unreachable block (ram,0x001b53a2) */ /* WARNING: Removing unreachable block (ram,0x001b53be) */ /* WARNING: Removing unreachable block (ram,0x001b53bc) */ /* WARNING: Removing unreachable block (ram,0x001b540e) */ /* WARNING: Removing unreachable block (ram,0x001b5417) */ /* WARNING: Removing unreachable block (ram,0x001b5415) */ /* WARNING: Removing unreachable block (ram,0x001b5421) */ /* google::protobuf::OneofDescriptorProto::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&) */ void google::protobuf::OneofDescriptorProto::MergeImpl(Message *param_1,Message *param_2) { uint uVar1; string *psVar2; Arena *pAVar3; OneofOptions *this; OneofOptions *pOVar4; InternalMetadata *this_00; UnknownFieldSet *local_50; uVar1 = *(uint *)(param_2 + 0x10); if ((uVar1 & 3) != 0) { if ((uVar1 & 1) != 0) { psVar2 = (string *)_internal_name_abi_cxx11_((OneofDescriptorProto *)param_2); *(uint *)(param_1 + 0x10) = *(uint *)(param_1 + 0x10) | 1; pAVar3 = (Arena *)MessageLite::GetArenaForAllocation((MessageLite *)param_1); internal::ArenaStringPtr::Set((ArenaStringPtr *)(param_1 + 0x18),psVar2,pAVar3); } if ((uVar1 & 2) != 0) { this = (OneofOptions *)_internal_mutable_options((OneofDescriptorProto *)param_1); pOVar4 = (OneofOptions *)_internal_options((OneofDescriptorProto *)param_2); OneofOptions::MergeFrom(this,pOVar4); } } this_00 = (InternalMetadata *)(param_2 + 8); if ((*(ulong *)this_00 & 1) != 0) { if ((*(ulong *)this_00 & 1) == 0) { local_50 = (UnknownFieldSet *)(*(code *)0x0)(); } else { local_50 = (UnknownFieldSet *) internal::InternalMetadata:: PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>> (this_00); local_50 = (UnknownFieldSet *)((Container *)local_50 + 8); } internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet> ((InternalMetadata *)(param_1 + 8),local_50); } return; }
16,881
apply(minja::chat_template 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> 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> const&, bool, 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&)
llama.cpp/common/chat.cpp
static std::string apply( const common_chat_template & tmpl, const nlohmann::ordered_json & messages, const nlohmann::ordered_json & tools, bool add_generation_prompt, const nlohmann::ordered_json & extra_context = nlohmann::ordered_json()) { minja::chat_template_inputs tmpl_inputs; tmpl_inputs.messages = messages; tmpl_inputs.tools = tools; tmpl_inputs.add_generation_prompt = add_generation_prompt; tmpl_inputs.extra_context = extra_context; // TODO: add flag to control date/time, if only for testing purposes. // tmpl_inputs.now = std::chrono::system_clock::now(); minja::chat_template_options tmpl_opts; // To avoid double BOS / EOS tokens, we're manually removing begining / trailing tokens // instead of using `chat_template_options.use_bos_token = false`, since these tokens // may be needed inside the template / between messages too. auto result = tmpl.apply(tmpl_inputs, tmpl_opts); if (string_starts_with(result, tmpl.bos_token())) { result = result.substr(tmpl.bos_token().size()); } if (string_ends_with(result, tmpl.eos_token())) { result = result.substr(0, result.size() - tmpl.eos_token().size()); } return result; }
O3
cpp
apply(minja::chat_template 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> 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> const&, bool, 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&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xb8, %rsp movq %r9, 0x8(%rsp) movl %r8d, 0x4(%rsp) movq %rcx, 0x10(%rsp) movq %rdx, %rbp movq %rsi, %r12 movq %rdi, %rbx xorl %r13d, %r13d leaq 0x68(%rsp), %r14 movb %r13b, (%r14) movq %r13, 0x8(%r14) movq %r14, %rdi movl $0x1, %esi callq 0x732fc movq %r14, %rdi movl $0x1, %esi callq 0x732fc leaq 0x78(%rsp), %r15 movb %r13b, (%r15) movq %r13, 0x8(%r15) movq %r15, %rdi movl $0x1, %esi callq 0x732fc movq %r15, %rdi movl $0x1, %esi callq 0x732fc movb $0x1, 0x10(%r15) leaq 0x90(%rsp), %r14 movb %r13b, (%r14) movq %r13, 0x8(%r14) movq %r14, %rdi movl $0x1, %esi callq 0x732fc movq %r14, %rdi movl $0x1, %esi callq 0x732fc callq 0x1c8d0 movq %rax, 0x10(%r14) leaq 0x58(%rsp), %rdi movq %rbp, %rsi callq 0x2fd1c leaq 0x68(%rsp), %rdi leaq 0x58(%rsp), %rbp movq %rbp, %rsi callq 0x6831a movq %rbp, %rdi xorl %esi, %esi callq 0x732fc movq %rbp, %rdi callq 0x300e0 leaq 0x48(%rsp), %rdi movq 0x10(%rsp), %rsi callq 0x2fd1c leaq 0x48(%rsp), %r13 movq %r15, %rdi movq %r13, %rsi callq 0x6831a movq %r13, %rdi xorl %esi, %esi callq 0x732fc movq %r13, %rdi callq 0x300e0 movl 0x4(%rsp), %eax movb %al, 0x88(%rsp) leaq 0x38(%rsp), %rdi movq 0x8(%rsp), %rsi callq 0x2fd1c leaq 0x38(%rsp), %r13 movq %r14, %rdi movq %r13, %rsi callq 0x6831a movq %r13, %rdi xorl %esi, %esi callq 0x732fc movq %r13, %rdi callq 0x300e0 movabsq $0x101010101010101, %rax # imm = 0x101010101010101 leaq 0xa8(%rsp), %rcx movq %rax, (%rcx) movl $0x1010101, 0x7(%rcx) # imm = 0x1010101 leaq 0x68(%rsp), %rdx movq %rbx, %rdi movq %r12, %rsi callq 0x69190 movq 0x30(%r12), %rsi movq 0x38(%r12), %rcx movq %rbx, %rdi xorl %edx, %edx callq 0x1c1a0 testq %rax, %rax jne 0x53a2f movq 0x38(%r12), %rdx leaq 0x18(%rsp), %rdi movq %rbx, %rsi movq $-0x1, %rcx callq 0x1cbb0 leaq 0x18(%rsp), %r13 movq %rbx, %rdi movq %r13, %rsi callq 0x1c670 movq (%r13), %rdi leaq 0x28(%rsp), %rax cmpq %rax, %rdi je 0x53a2f movq 0x28(%rsp), %rsi incq %rsi callq 0x1c110 movq 0x8(%rbx), %rsi movq 0x58(%r12), %rdx subq %rdx, %rsi jb 0x53a91 leaq 0x50(%r12), %rcx movq %rbx, %rdi callq 0x1cca0 testl %eax, %eax jne 0x53a91 movq 0x8(%rbx), %rcx subq 0x58(%r12), %rcx leaq 0x18(%rsp), %rdi movq %rbx, %rsi xorl %edx, %edx callq 0x1cbb0 leaq 0x18(%rsp), %r12 movq %rbx, %rdi movq %r12, %rsi callq 0x1c670 movq (%r12), %rdi leaq 0x28(%rsp), %rax cmpq %rax, %rdi je 0x53a91 movq 0x28(%rsp), %rsi incq %rsi callq 0x1c110 movq %r14, %rdi xorl %esi, %esi callq 0x732fc movq %r14, %rdi callq 0x300e0 movq %r15, %rdi xorl %esi, %esi callq 0x732fc movq %r15, %rdi callq 0x300e0 leaq 0x68(%rsp), %rbx movq %rbx, %rdi xorl %esi, %esi callq 0x732fc movq %rbx, %rdi callq 0x300e0 addq $0xb8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x53ae2 jmp 0x53ae2 movq %rax, %r14 movq (%rbx), %rdi addq $0x10, %rbx cmpq %rbx, %rdi je 0x53b03 movq (%rbx), %rsi incq %rsi callq 0x1c110 jmp 0x53b03 jmp 0x53b00 movq %rax, %r14 leaq 0x68(%rsp), %rdi callq 0x6bce0 movq %r14, %rdi callq 0x1c7d0 nop
_ZL5applyRKN5minja13chat_templateERKN8nlohmann16json_abi_v3_11_310basic_jsonINS4_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS4_14adl_serializerES7_IhSaIhEEvEESJ_bSJ_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0B8h mov [rsp+0E8h+var_E0], r9 mov [rsp+0E8h+var_E4], r8d mov [rsp+0E8h+var_D8], rcx mov rbp, rdx mov r12, rsi mov rbx, rdi xor r13d, r13d lea r14, [rsp+0E8h+var_80] mov [r14], r13b mov [r14+8], r13 mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) lea r15, [rsp+0E8h+var_70] mov [r15], r13b mov [r15+8], r13 mov rdi, r15 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r15 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov byte ptr [r15+10h], 1 lea r14, [rsp+0E8h+var_58] mov [r14], r13b mov [r14+8], r13 mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14; this mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void) mov [r14+10h], rax lea rdi, [rsp+0E8h+var_90] mov rsi, rbp call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; 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>::basic_json(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&) lea rdi, [rsp+0E8h+var_80] lea rbp, [rsp+0E8h+var_90] mov rsi, rbp call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; 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=(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 rdi, rbp 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, rbp 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+0E8h+var_A0] mov rsi, [rsp+0E8h+var_D8] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; 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>::basic_json(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&) lea r13, [rsp+0E8h+var_A0] mov rdi, r15 mov rsi, r13 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; 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=(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 rdi, r13 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, r13 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 eax, [rsp+0E8h+var_E4] mov [rsp+0E8h+var_60], al lea rdi, [rsp+0E8h+var_B0] mov rsi, [rsp+0E8h+var_E0] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; 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>::basic_json(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&) lea r13, [rsp+0E8h+var_B0] mov rdi, r14 mov rsi, r13 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; 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=(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 rdi, r13 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, r13 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 rax, 101010101010101h lea rcx, [rsp+0E8h+var_40] mov [rcx], rax mov dword ptr [rcx+7], 1010101h lea rdx, [rsp+0E8h+var_80] mov rdi, rbx mov rsi, r12 call _ZNK5minja13chat_template5applyB5cxx11ERKNS_20chat_template_inputsERKNS_21chat_template_optionsE; minja::chat_template::apply(minja::chat_template_inputs const&,minja::chat_template_options const&) mov rsi, [r12+30h] mov rcx, [r12+38h] mov rdi, rbx xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5rfindEPKcmm; std::string::rfind(char const*,ulong,ulong) test rax, rax jnz short loc_53A2F mov rdx, [r12+38h] lea rdi, [rsp+0E8h+var_D0] mov rsi, rbx mov rcx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) lea r13, [rsp+0E8h+var_D0] mov rdi, rbx mov rsi, r13 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r13+0]; void * lea rax, [rsp+0E8h+var_C0] cmp rdi, rax jz short loc_53A2F mov rsi, [rsp+0E8h+var_C0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_53A2F: mov rsi, [rbx+8] mov rdx, [r12+58h] sub rsi, rdx jb short loc_53A91 lea rcx, [r12+50h] mov rdi, rbx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEmmRKS4_; std::string::compare(ulong,ulong,std::string const&) test eax, eax jnz short loc_53A91 mov rcx, [rbx+8] sub rcx, [r12+58h] lea rdi, [rsp+0E8h+var_D0] mov rsi, rbx xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) lea r12, [rsp+0E8h+var_D0] mov rdi, rbx mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r12]; void * lea rax, [rsp+0E8h+var_C0] cmp rdi, rax jz short loc_53A91 mov rsi, [rsp+0E8h+var_C0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_53A91: 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() mov rdi, r15 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, r15 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 rbx, [rsp+0E8h+var_80] mov rdi, rbx 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, 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() add rsp, 0B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_53AE2 jmp short $+2 loc_53AE2: mov r14, rax mov rdi, [rbx]; void * add rbx, 10h cmp rdi, rbx jz short loc_53B03 mov rsi, [rbx] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_53B03 jmp short $+2 loc_53B00: mov r14, rax loc_53B03: lea rdi, [rsp+arg_60]; this call _ZN5minja20chat_template_inputsD2Ev; minja::chat_template_inputs::~chat_template_inputs() mov rdi, r14 call __Unwind_Resume
long long apply( long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned __int8 *a4, char a5, unsigned __int8 *a6) { unsigned long long v8; // rsi unsigned long long v9; // rdx bool v10; // cf unsigned long long v11; // rsi void *v16[2]; // [rsp+18h] [rbp-D0h] BYREF _QWORD v17[2]; // [rsp+28h] [rbp-C0h] BYREF _BYTE v18[16]; // [rsp+38h] [rbp-B0h] BYREF _BYTE v19[16]; // [rsp+48h] [rbp-A0h] BYREF _BYTE v20[16]; // [rsp+58h] [rbp-90h] BYREF _BYTE v21[8]; // [rsp+68h] [rbp-80h] BYREF long long v22; // [rsp+70h] [rbp-78h] _BYTE v23[8]; // [rsp+78h] [rbp-70h] BYREF long long v24; // [rsp+80h] [rbp-68h] char v25; // [rsp+88h] [rbp-60h] _BYTE v26[8]; // [rsp+90h] [rbp-58h] BYREF long long v27; // [rsp+98h] [rbp-50h] long long v28; // [rsp+A0h] [rbp-48h] _QWORD v29[8]; // [rsp+A8h] [rbp-40h] BYREF v21[0] = 0; v22 = 0LL; 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( v21, 1LL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant( v21, 1LL); v23[0] = 0; v24 = 0LL; 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( v23, 1LL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant( v23, 1LL); v25 = 1; v26[0] = 0; v27 = 0LL; 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( v26, 1LL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant( v26, 1LL); v28 = std::chrono::_V2::system_clock::now((std::chrono::_V2::system_clock *)v26); 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>::basic_json( (long long)v20, 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>::operator=( v21, v20); 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( v20, 0LL); 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(v20); 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>::basic_json( (long long)v19, a4); 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=( v23, v19); 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( v19, 0LL); 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(v19); v25 = a5; 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>::basic_json( (long long)v18, a6); 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=( v26, v18); 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( v18, 0LL); 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(v18); v29[0] = 0x101010101010101LL; *(_DWORD *)((char *)v29 + 7) = 16843009; minja::chat_template::apply[abi:cxx11](a1, a2, v21, v29); if ( !std::string::rfind(a1, a2[6], 0LL, a2[7]) ) { std::string::substr(v16, a1, a2[7], -1LL); std::string::operator=(a1, v16); if ( v16[0] != v17 ) operator delete(v16[0], v17[0] + 1LL); } v8 = *(_QWORD *)(a1 + 8); v9 = a2[11]; v10 = v8 < v9; v11 = v8 - v9; if ( !v10 && !(unsigned int)std::string::compare(a1, v11, v9, a2 + 10) ) { std::string::substr(v16, a1, 0LL, *(_QWORD *)(a1 + 8) - a2[11]); std::string::operator=(a1, v16); if ( v16[0] != v17 ) operator delete(v16[0], v17[0] + 1LL); } nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant( v26, 0LL); 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(v26); 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( v23, 0LL); 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(v23); 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( v21, 0LL); return nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v21); }
apply: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xb8 MOV qword ptr [RSP + 0x8],R9 MOV dword ptr [RSP + 0x4],R8D MOV qword ptr [RSP + 0x10],RCX MOV RBP,RDX MOV R12,RSI MOV RBX,RDI XOR R13D,R13D LEA R14,[RSP + 0x68] MOV byte ptr [R14],R13B MOV qword ptr [R14 + 0x8],R13 MOV RDI,R14 MOV ESI,0x1 CALL 0x001732fc MOV RDI,R14 MOV ESI,0x1 CALL 0x001732fc LEA R15,[RSP + 0x78] MOV byte ptr [R15],R13B MOV qword ptr [R15 + 0x8],R13 MOV RDI,R15 MOV ESI,0x1 CALL 0x001732fc MOV RDI,R15 MOV ESI,0x1 CALL 0x001732fc MOV byte ptr [R15 + 0x10],0x1 LEA R14,[RSP + 0x90] MOV byte ptr [R14],R13B MOV qword ptr [R14 + 0x8],R13 MOV RDI,R14 MOV ESI,0x1 CALL 0x001732fc MOV RDI,R14 MOV ESI,0x1 CALL 0x001732fc CALL 0x0011c8d0 MOV qword ptr [R14 + 0x10],RAX LAB_00153908: LEA RDI,[RSP + 0x58] MOV RSI,RBP CALL 0x0012fd1c LEA RDI,[RSP + 0x68] LEA RBP,[RSP + 0x58] MOV RSI,RBP CALL 0x0016831a MOV RDI,RBP XOR ESI,ESI CALL 0x001732fc MOV RDI,RBP CALL 0x001300e0 LEA RDI,[RSP + 0x48] MOV RSI,qword ptr [RSP + 0x10] CALL 0x0012fd1c LEA R13,[RSP + 0x48] MOV RDI,R15 MOV RSI,R13 CALL 0x0016831a MOV RDI,R13 XOR ESI,ESI CALL 0x001732fc MOV RDI,R13 CALL 0x001300e0 MOV EAX,dword ptr [RSP + 0x4] MOV byte ptr [RSP + 0x88],AL LEA RDI,[RSP + 0x38] MOV RSI,qword ptr [RSP + 0x8] CALL 0x0012fd1c LEA R13,[RSP + 0x38] MOV RDI,R14 MOV RSI,R13 CALL 0x0016831a MOV RDI,R13 XOR ESI,ESI CALL 0x001732fc MOV RDI,R13 CALL 0x001300e0 MOV RAX,0x101010101010101 LEA RCX,[RSP + 0xa8] MOV qword ptr [RCX],RAX MOV dword ptr [RCX + 0x7],0x1010101 LAB_001539c2: LEA RDX,[RSP + 0x68] MOV RDI,RBX MOV RSI,R12 CALL 0x00169190 MOV RSI,qword ptr [R12 + 0x30] MOV RCX,qword ptr [R12 + 0x38] MOV RDI,RBX XOR EDX,EDX CALL 0x0011c1a0 TEST RAX,RAX JNZ 0x00153a2f MOV RDX,qword ptr [R12 + 0x38] LAB_001539f0: LEA RDI,[RSP + 0x18] MOV RSI,RBX MOV RCX,-0x1 CALL 0x0011cbb0 LEA R13,[RSP + 0x18] MOV RDI,RBX MOV RSI,R13 CALL 0x0011c670 MOV RDI,qword ptr [R13] LEA RAX,[RSP + 0x28] CMP RDI,RAX JZ 0x00153a2f MOV RSI,qword ptr [RSP + 0x28] INC RSI CALL 0x0011c110 LAB_00153a2f: MOV RSI,qword ptr [RBX + 0x8] MOV RDX,qword ptr [R12 + 0x58] SUB RSI,RDX JC 0x00153a91 LEA RCX,[R12 + 0x50] LAB_00153a42: MOV RDI,RBX CALL 0x0011cca0 TEST EAX,EAX JNZ 0x00153a91 MOV RCX,qword ptr [RBX + 0x8] SUB RCX,qword ptr [R12 + 0x58] LAB_00153a57: LEA RDI,[RSP + 0x18] MOV RSI,RBX XOR EDX,EDX CALL 0x0011cbb0 LAB_00153a66: LEA R12,[RSP + 0x18] MOV RDI,RBX MOV RSI,R12 CALL 0x0011c670 MOV RDI,qword ptr [R12] LEA RAX,[RSP + 0x28] CMP RDI,RAX JZ 0x00153a91 MOV RSI,qword ptr [RSP + 0x28] INC RSI CALL 0x0011c110 LAB_00153a91: MOV RDI,R14 XOR ESI,ESI CALL 0x001732fc MOV RDI,R14 CALL 0x001300e0 MOV RDI,R15 XOR ESI,ESI CALL 0x001732fc MOV RDI,R15 CALL 0x001300e0 LEA RBX,[RSP + 0x68] MOV RDI,RBX XOR ESI,ESI CALL 0x001732fc MOV RDI,RBX CALL 0x001300e0 ADD RSP,0xb8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* apply(minja::chat_template 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&, 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&, bool, 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&) */ void apply(chat_template *param_1,basic_json *param_2,basic_json *param_3,bool param_4, basic_json *param_5) { string *psVar1; int iVar2; long lVar3; int7 in_register_00000009; bool bVar4; bool bVar5; basic_json *in_R9; long *local_d0 [2]; long local_c0 [2]; 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_b0 [16]; 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_a0 [16]; 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_90 [16]; 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_80 [8]; int8 local_78; data local_70 [8]; int8 local_68; int1 local_60; data local_58 [8]; int8 local_50; int8 local_48; int7 local_40; int4 uStack_39; local_80[0] = (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; local_78 = 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> ::assert_invariant(SUB81(local_80,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> ::assert_invariant(SUB81(local_80,0)); local_70[0] = (data)0x0; local_68 = 0; bVar4 = SUB81(local_70,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> ::assert_invariant(bVar4); 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(bVar4); local_60 = 1; local_58[0] = (data)0x0; local_50 = 0; bVar5 = SUB81(local_58,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> ::assert_invariant(bVar5); 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(bVar5); local_48 = std::chrono::_V2::system_clock::now(); /* try { // try from 00153908 to 00153983 has its CatchHandler @ 00153b00 */ nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(local_90,param_3); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator=(local_80,(data *)local_90); 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((data *)local_90,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((data *)local_90); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(local_a0,(basic_json *)CONCAT71(in_register_00000009,param_4)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator=((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_70,(data *)local_a0); 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((data *)local_a0,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((data *)local_a0); local_60 = SUB81(param_5,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> ::basic_json(local_b0,in_R9); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator=((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_58,(data *)local_b0); 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((data *)local_b0,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((data *)local_b0); local_40 = 0x1010101010101; uStack_39 = 0x1010101; /* try { // try from 001539c2 to 001539d1 has its CatchHandler @ 00153afe */ minja::chat_template::apply_abi_cxx11_ ((chat_template_inputs *)param_1,(chat_template_options *)param_2); lVar3 = std::__cxx11::string::rfind((char *)param_1,*(ulong *)(param_2 + 0x30),0); if (lVar3 == 0) { /* try { // try from 001539f0 to 00153a03 has its CatchHandler @ 00153ae0 */ std::__cxx11::string::substr((ulong)local_d0,(ulong)param_1); std::__cxx11::string::operator=((string *)param_1,(string *)local_d0); if (local_d0[0] != local_c0) { operator_delete(local_d0[0],local_c0[0] + 1); } } psVar1 = *(string **)(param_2 + 0x58); if (psVar1 <= *(string **)(param_1 + 8)) { /* try { // try from 00153a42 to 00153a49 has its CatchHandler @ 00153ae2 */ iVar2 = std::__cxx11::string::compare ((ulong)param_1,(long)*(string **)(param_1 + 8) - (long)psVar1,psVar1); if (iVar2 == 0) { /* try { // try from 00153a57 to 00153a65 has its CatchHandler @ 00153ade */ std::__cxx11::string::substr((ulong)local_d0,(ulong)param_1); std::__cxx11::string::operator=((string *)param_1,(string *)local_d0); if (local_d0[0] != local_c0) { operator_delete(local_d0[0],local_c0[0] + 1); } } } 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(bVar5); 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_58); 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(bVar4); 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_70); 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((data *)local_80,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((data *)local_80); return; }
16,882
nlohmann::json_abi_v3_11_3::detail::invalid_iterator nlohmann::json_abi_v3_11_3::detail::invalid_iterator::create<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*)
11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp
static invalid_iterator create(int id_, const std::string& what_arg, BasicJsonContext context) { const std::string w = concat(exception::name("invalid_iterator", id_), exception::diagnostics(context), what_arg); return {id_, w.c_str()}; }
O1
cpp
nlohmann::json_abi_v3_11_3::detail::invalid_iterator nlohmann::json_abi_v3_11_3::detail::invalid_iterator::create<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x98, %rsp movq %rdx, %r15 movl %esi, %ebp movq %rdi, %rbx leaq 0x38(%rsp), %r13 movq %r13, -0x10(%r13) leaq 0x5688(%rip), %rsi # 0x22eb1 leaq 0x5691(%rip), %rdx # 0x22ec1 leaq 0x28(%rsp), %rdi callq 0x11370 leaq 0x48(%rsp), %rdi leaq 0x28(%rsp), %rsi movl %ebp, %edx callq 0x11500 leaq 0x78(%rsp), %r14 movq %r14, -0x10(%r14) xorl %eax, %eax movq %rax, -0x8(%r14) movb %al, (%r14) leaq 0x18(%rsp), %r12 movq %r12, -0x10(%r12) movq %rax, -0x8(%r12) movb %al, (%r12) movq 0x8(%r15), %rsi addq 0x50(%rsp), %rsi leaq 0x8(%rsp), %rdi callq 0x11e40 movq 0x48(%rsp), %rsi movq 0x50(%rsp), %rdx leaq 0x8(%rsp), %rdi callq 0x112a0 movq 0x68(%rsp), %rsi movq 0x70(%rsp), %rdx leaq 0x8(%rsp), %rdi callq 0x112a0 movq (%r15), %rsi movq 0x8(%r15), %rdx leaq 0x8(%rsp), %rdi callq 0x112a0 movq 0x68(%rsp), %rdi cmpq %r14, %rdi je 0x1d8d3 movq 0x78(%rsp), %rsi incq %rsi callq 0x119b0 leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x1d8ee movq 0x58(%rsp), %rsi incq %rsi callq 0x119b0 movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x1d905 movq 0x38(%rsp), %rsi incq %rsi callq 0x119b0 movq 0x8(%rsp), %rdx movq %rbx, %rdi movl %ebp, %esi callq 0x119a0 movq 0xf655(%rip), %rax # 0x2cf70 addq $0x10, %rax movq %rax, (%rbx) movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x1d939 movq 0x18(%rsp), %rsi incq %rsi callq 0x119b0 movq %rbx, %rax addq $0x98, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x1d9c7 movq 0x18(%rsp), %rsi jmp 0x1d9bf movq %rax, %rbx jmp 0x1d9b0 movq %rax, %rbx jmp 0x1d9c7 movq %rdx, %rbx movq %rax, %r15 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x1d989 movq 0x18(%rsp), %rsi incq %rsi callq 0x119b0 leaq 0x68(%rsp), %rdi leaq 0x48(%rsp), %rdx leaq 0x88(%rsp), %r12 movq %r14, %rsi movq %r15, %rcx movl %ebx, %r8d movq %r12, %r9 callq 0x124a1 movq (%r12), %rbx movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x1d9c7 movq 0x38(%rsp), %rsi incq %rsi callq 0x119b0 movq %rbx, %rdi callq 0x12010 nop
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 98h mov r15, rdx mov ebp, esi mov rbx, rdi lea r13, [rsp+0C8h+var_90] mov [r13-10h], r13 lea rsi, aInvalidIterato; "invalid_iterator" lea rdx, aInvalidIterato+10h; "" lea rdi, [rsp+0C8h+var_A0] 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+0C8h+var_80]; int lea rsi, [rsp+0C8h+var_A0]; int mov edx, ebp; int call __ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int) lea r14, [rsp+0C8h+var_50] mov [r14-10h], r14 xor eax, eax mov [r14-8], rax mov [r14], al lea r12, [rsp+0C8h+var_B0] mov [r12-10h], r12 mov [r12-8], rax mov [r12], al mov rsi, [r15+8] add rsi, [rsp+0C8h+var_78] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rsi, qword ptr [rsp+0C8h+var_80] mov rdx, [rsp+0C8h+var_78] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rsi, [rsp+0C8h+var_60] mov rdx, [rsp+0C8h+var_58] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rsi, [r15] mov rdx, [r15+8] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rdi, [rsp+0C8h+var_60]; void * cmp rdi, r14 jz short loc_1D8D3 mov rsi, [rsp+0C8h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1D8D3: lea rax, [rsp+0C8h+var_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_1D8EE mov rsi, [rsp+0C8h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1D8EE: mov rdi, [rsp+0C8h+var_A0]; void * cmp rdi, r13 jz short loc_1D905 mov rsi, [rsp+0C8h+var_90] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1D905: mov rdx, [rsp+0C8h+var_C0]; char * mov rdi, rbx; this mov esi, ebp; int call __ZN8nlohmann16json_abi_v3_11_36detail9exceptionC2EiPKc; nlohmann::json_abi_v3_11_3::detail::exception::exception(int,char const*) mov rax, cs:_ZTVN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE_ptr add rax, 10h mov [rbx], rax mov rdi, [rsp+0C8h+var_C0]; void * cmp rdi, r12 jz short loc_1D939 mov rsi, [rsp+0C8h+var_B0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1D939: mov rax, rbx add rsp, 98h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, [rsp+arg_0] cmp rdi, r12 jz short loc_1D9C7 mov rsi, [rsp+arg_10] jmp short loc_1D9BF mov rbx, rax jmp short loc_1D9B0 mov rbx, rax jmp short loc_1D9C7 mov rbx, rdx mov r15, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r12 jz short loc_1D989 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1D989: lea rdi, [rsp+arg_60] lea rdx, [rsp+arg_40] lea r12, [rsp+arg_80] mov rsi, r14 mov rcx, r15 mov r8d, ebx mov r9, r12 call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ__cold_1 mov rbx, [r12] loc_1D9B0: mov rdi, [rsp+arg_20]; void * cmp rdi, r13 jz short loc_1D9C7 mov rsi, [rsp+arg_30] loc_1D9BF: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1D9C7: mov rdi, rbx call __Unwind_Resume
nlohmann::json_abi_v3_11_3::detail::exception * ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( nlohmann::json_abi_v3_11_3::detail::exception *this, int a2, _QWORD *a3) { int v4; // ecx int v5; // r8d int v6; // r9d int v8; // [rsp+0h] [rbp-C8h] char *v9; // [rsp+8h] [rbp-C0h] BYREF void *v10; // [rsp+10h] [rbp-B8h] _QWORD v11[2]; // [rsp+18h] [rbp-B0h] BYREF void *v12[2]; // [rsp+28h] [rbp-A0h] BYREF _QWORD v13[2]; // [rsp+38h] [rbp-90h] BYREF int v14[2]; // [rsp+48h] [rbp-80h] BYREF long long v15; // [rsp+50h] [rbp-78h] long long v16; // [rsp+58h] [rbp-70h] BYREF void *v17; // [rsp+68h] [rbp-60h] long long v18; // [rsp+70h] [rbp-58h] _QWORD v19[10]; // [rsp+78h] [rbp-50h] BYREF v12[0] = v13; std::string::_M_construct<char const*>(v12, "invalid_iterator", ""); nlohmann::json_abi_v3_11_3::detail::exception::name( (int)v14, (int)v12, a2, v4, v5, v6, v8, (int)v9, v10, v11[0], v11[1]); v17 = v19; v18 = 0LL; LOBYTE(v19[0]) = 0; v9 = (char *)v11; v10 = 0LL; LOBYTE(v11[0]) = 0; std::string::reserve(&v9, v15 + a3[1]); std::string::_M_append(&v9, *(_QWORD *)v14, v15); std::string::_M_append(&v9, v17, v18); std::string::_M_append(&v9, *a3, a3[1]); if ( v17 != v19 ) operator delete(v17, v19[0] + 1LL); if ( *(long long **)v14 != &v16 ) operator delete(*(void **)v14, v16 + 1); if ( v12[0] != v13 ) operator delete(v12[0], v13[0] + 1LL); nlohmann::json_abi_v3_11_3::detail::exception::exception(this, a2, v9); *(_QWORD *)this = &`vtable for'nlohmann::json_abi_v3_11_3::detail::invalid_iterator + 2; if ( v9 != (char *)v11 ) operator delete(v9, v11[0] + 1LL); return this; }
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x98 MOV R15,RDX MOV EBP,ESI MOV RBX,RDI LEA R13,[RSP + 0x38] MOV qword ptr [R13 + -0x10],R13 LAB_0011d822: LEA RSI,[0x122eb1] LEA RDX,[0x122ec1] LEA RDI,[RSP + 0x28] CALL 0x00111370 LAB_0011d83a: LEA RDI,[RSP + 0x48] LEA RSI,[RSP + 0x28] MOV EDX,EBP CALL 0x00111500 LEA R14,[RSP + 0x78] MOV qword ptr [R14 + -0x10],R14 XOR EAX,EAX MOV qword ptr [R14 + -0x8],RAX MOV byte ptr [R14],AL LEA R12,[RSP + 0x18] MOV qword ptr [R12 + -0x10],R12 MOV qword ptr [R12 + -0x8],RAX MOV byte ptr [R12],AL MOV RSI,qword ptr [R15 + 0x8] ADD RSI,qword ptr [RSP + 0x50] LAB_0011d879: LEA RDI,[RSP + 0x8] CALL 0x00111e40 MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] LEA RDI,[RSP + 0x8] CALL 0x001112a0 MOV RSI,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] LEA RDI,[RSP + 0x8] CALL 0x001112a0 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] LEA RDI,[RSP + 0x8] CALL 0x001112a0 MOV RDI,qword ptr [RSP + 0x68] CMP RDI,R14 JZ 0x0011d8d3 MOV RSI,qword ptr [RSP + 0x78] INC RSI CALL 0x001119b0 LAB_0011d8d3: LEA RAX,[RSP + 0x58] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0011d8ee MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x001119b0 LAB_0011d8ee: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R13 JZ 0x0011d905 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x001119b0 LAB_0011d905: MOV RDX,qword ptr [RSP + 0x8] LAB_0011d90a: MOV RDI,RBX MOV ESI,EBP CALL 0x001119a0 LAB_0011d914: MOV RAX,qword ptr [0x0012cf70] ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R12 JZ 0x0011d939 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001119b0 LAB_0011d939: MOV RAX,RBX ADD RSP,0x98 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
exception * _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (exception *param_1,int param_2,ulong *param_3) { char *local_c0; int8 local_b8; char local_b0; int7 uStack_af; long *local_a0 [2]; long local_90 [2]; long *local_80 [2]; long local_70 [2]; int1 *local_60; int8 local_58; int1 local_50; int7 uStack_4f; /* try { // try from 0011d822 to 0011d839 has its CatchHandler @ 0011d967 */ local_a0[0] = local_90; std::__cxx11::string::_M_construct<char_const*>(local_a0,"invalid_iterator",""); /* try { // try from 0011d83a to 0011d84a has its CatchHandler @ 0011d962 */ nlohmann::json_abi_v3_11_3::detail::exception::name ((exception *)local_80,(string *)local_a0,param_2); local_58 = 0; local_50 = 0; local_b8 = 0; local_b0 = '\0'; /* try { // try from 0011d879 to 0011d8bb has its CatchHandler @ 0011d96c */ local_c0 = &local_b0; local_60 = &local_50; std::__cxx11::string::reserve((ulong)&local_c0); std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_80[0]); std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_60); std::__cxx11::string::_M_append((char *)&local_c0,*param_3); if (local_60 != &local_50) { operator_delete(local_60,CONCAT71(uStack_4f,local_50) + 1); } if (local_80[0] != local_70) { operator_delete(local_80[0],local_70[0] + 1); } if (local_a0[0] != local_90) { operator_delete(local_a0[0],local_90[0] + 1); } /* try { // try from 0011d90a to 0011d913 has its CatchHandler @ 0011d94e */ nlohmann::json_abi_v3_11_3::detail::exception::exception(param_1,param_2,local_c0); *(int **)param_1 = PTR_vtable_0012cf70 + 0x10; if (local_c0 != &local_b0) { operator_delete(local_c0,CONCAT71(uStack_af,local_b0) + 1); } return param_1; }
16,883
nlohmann::json_abi_v3_11_3::detail::invalid_iterator nlohmann::json_abi_v3_11_3::detail::invalid_iterator::create<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*)
11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp
static invalid_iterator create(int id_, const std::string& what_arg, BasicJsonContext context) { const std::string w = concat(exception::name("invalid_iterator", id_), exception::diagnostics(context), what_arg); return {id_, w.c_str()}; }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::invalid_iterator nlohmann::json_abi_v3_11_3::detail::invalid_iterator::create<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x88, %rsp movq %rcx, %r15 movq %rdx, %r14 movl %esi, %ebp movq %rdi, %rbx leaq 0x44aa(%rip), %rsi # 0x2bea1 leaq 0x28(%rsp), %rdi leaq 0x7(%rsp), %rdx callq 0x1dc00 leaq 0x48(%rsp), %rdi leaq 0x28(%rsp), %rsi movl %ebp, %edx callq 0x1c8d0 leaq 0x8(%rsp), %rdi movq %r15, %rsi callq 0x1d830 leaq 0x68(%rsp), %rdi leaq 0x48(%rsp), %rsi leaq 0x8(%rsp), %rdx movq %r14, %rcx callq 0x1d890 leaq 0x8(%rsp), %rdi callq 0x1c6f0 leaq 0x48(%rsp), %rdi callq 0x1c6f0 leaq 0x28(%rsp), %rdi callq 0x1c6f0 movq 0x68(%rsp), %rdx movq %rbx, %rdi movl %ebp, %esi callq 0x1d8b0 leaq 0x68(%rsp), %rdi callq 0x1c6f0 movq %rbx, %rax addq $0x88, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x68(%rsp), %rdi jmp 0x27ab3 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x1c6f0 jmp 0x27a9f movq %rax, %rbx leaq 0x48(%rsp), %rdi callq 0x1c6f0 jmp 0x27aae movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x1c6f0 jmp 0x27abd movq %rax, %rbx movq %rbx, %rdi callq 0x1dcb0 nop
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_: push rbp push r15 push r14 push rbx sub rsp, 88h mov r15, rcx mov r14, rdx mov ebp, esi mov rbx, rdi lea rsi, aInvalidIterato; "invalid_iterator" lea rdi, [rsp+0A8h+var_80] lea rdx, [rsp+0A8h+var_A1] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+0A8h+var_60] lea rsi, [rsp+0A8h+var_80] mov edx, ebp call __ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int) lea rdi, [rsp+0A8h+var_A0] mov rsi, r15 call __ZN8nlohmann16json_abi_v3_11_36detail9exception18get_byte_positionsINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEESC_PKT_; nlohmann::json_abi_v3_11_3::detail::exception::get_byte_positions<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const*) lea rdi, [rsp+0A8h+var_40] lea rsi, [rsp+0A8h+var_60] lea rdx, [rsp+0A8h+var_A0] mov rcx, r14 call __ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS8_S8_RKS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,std::string,std::string const&>(std::string,std::string,std::string const&) lea rdi, [rsp+0A8h+var_A0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0A8h+var_60] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0A8h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdx, [rsp+0A8h+var_40]; char * mov rdi, rbx; this mov esi, ebp; int call __ZN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorC2EiPKc; nlohmann::json_abi_v3_11_3::detail::invalid_iterator::invalid_iterator(int,char const*) lea rdi, [rsp+0A8h+var_40] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, rbx add rsp, 88h pop rbx pop r14 pop r15 pop rbp retn mov rbx, rax lea rdi, [rsp+arg_60] jmp short loc_27AB3 mov rbx, rax lea rdi, [rsp+arg_0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_27A9F mov rbx, rax loc_27A9F: lea rdi, [rsp+arg_40] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_27AAE mov rbx, rax loc_27AAE: lea rdi, [rsp+arg_20] loc_27AB3: call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_27ABD mov rbx, rax loc_27ABD: mov rdi, rbx call __Unwind_Resume
nlohmann::json_abi_v3_11_3::detail::invalid_iterator * ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( nlohmann::json_abi_v3_11_3::detail::invalid_iterator *this, unsigned int a2, long long a3, long long a4) { char v7; // [rsp+7h] [rbp-A1h] BYREF _BYTE v8[32]; // [rsp+8h] [rbp-A0h] BYREF _BYTE v9[32]; // [rsp+28h] [rbp-80h] BYREF _BYTE v10[32]; // [rsp+48h] [rbp-60h] BYREF char *v11[8]; // [rsp+68h] [rbp-40h] BYREF std::string::basic_string<std::allocator<char>>(v9, "invalid_iterator", &v7); nlohmann::json_abi_v3_11_3::detail::exception::name(v10, v9, a2); nlohmann::json_abi_v3_11_3::detail::exception::get_byte_positions<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( v8, a4); nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,std::string,std::string const&>(v11, v10, v8, a3); std::string::~string(v8); std::string::~string(v10); std::string::~string(v9); nlohmann::json_abi_v3_11_3::detail::invalid_iterator::invalid_iterator(this, a2, v11[0]); std::string::~string(v11); return this; }
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x88 MOV R15,RCX MOV R14,RDX MOV EBP,ESI MOV RBX,RDI LAB_001279f0: LEA RSI,[0x12bea1] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x7] CALL 0x0011dc00 LAB_00127a06: LEA RDI,[RSP + 0x48] LEA RSI,[RSP + 0x28] MOV EDX,EBP CALL 0x0011c8d0 LAB_00127a17: LEA RDI,[RSP + 0x8] MOV RSI,R15 CALL 0x0011d830 LAB_00127a24: LEA RDI,[RSP + 0x68] LEA RSI,[RSP + 0x48] LEA RDX,[RSP + 0x8] MOV RCX,R14 CALL 0x0011d890 LEA RDI,[RSP + 0x8] CALL 0x0011c6f0 LEA RDI,[RSP + 0x48] CALL 0x0011c6f0 LEA RDI,[RSP + 0x28] CALL 0x0011c6f0 MOV RDX,qword ptr [RSP + 0x68] LAB_00127a5e: MOV RDI,RBX MOV ESI,EBP CALL 0x0011d8b0 LAB_00127a68: LEA RDI,[RSP + 0x68] CALL 0x0011c6f0 MOV RAX,RBX ADD RSP,0x88 POP RBX POP R14 POP R15 POP RBP RET
invalid_iterator * _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (invalid_iterator *param_1,int param_2,string *param_3) { allocator local_a1; basic_json local_a0 [32]; string local_80 [32]; exception local_60 [32]; char *local_40 [4]; /* try { // try from 001279f0 to 00127a05 has its CatchHandler @ 00127aba */ std::__cxx11::string::string<std::allocator<char>>(local_80,"invalid_iterator",&local_a1); /* try { // try from 00127a06 to 00127a16 has its CatchHandler @ 00127aab */ nlohmann::json_abi_v3_11_3::detail::exception::name(local_60,local_80,param_2); /* try { // try from 00127a17 to 00127a23 has its CatchHandler @ 00127a9c */ nlohmann::json_abi_v3_11_3::detail::exception:: get_byte_positions<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (local_a0); /* try { // try from 00127a24 to 00127a3a has its CatchHandler @ 00127a8d */ nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,std::__cxx11::string,std::__cxx11::string,std::__cxx11::string_const&> ((detail *)local_40,(string *)local_60,(string *)local_a0,param_3); std::__cxx11::string::~string((string *)local_a0); std::__cxx11::string::~string((string *)local_60); std::__cxx11::string::~string(local_80); /* try { // try from 00127a5e to 00127a67 has its CatchHandler @ 00127a83 */ nlohmann::json_abi_v3_11_3::detail::invalid_iterator::invalid_iterator (param_1,param_2,local_40[0]); std::__cxx11::string::~string((string *)local_40); return param_1; }
16,884
nlohmann::json_abi_v3_11_3::detail::invalid_iterator nlohmann::json_abi_v3_11_3::detail::invalid_iterator::create<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*)
11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp
static invalid_iterator create(int id_, const std::string& what_arg, BasicJsonContext context) { const std::string w = concat(exception::name("invalid_iterator", id_), exception::diagnostics(context), what_arg); return {id_, w.c_str()}; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::invalid_iterator nlohmann::json_abi_v3_11_3::detail::invalid_iterator::create<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x98, %rsp movq %rdx, %r15 movl %esi, %ebp movq %rdi, %rbx leaq 0x38(%rsp), %r13 movq %r13, -0x10(%r13) leaq 0x4a0c(%rip), %rsi # 0x21eb1 leaq 0x4a15(%rip), %rdx # 0x21ec1 leaq 0x28(%rsp), %rdi callq 0x11370 leaq 0x48(%rsp), %rdi leaq 0x28(%rsp), %rsi movl %ebp, %edx callq 0x114f0 leaq 0x78(%rsp), %r14 movq %r14, -0x10(%r14) xorl %eax, %eax movq %rax, -0x8(%r14) movb %al, (%r14) leaq 0x18(%rsp), %r12 movq %r12, -0x10(%r12) movq %rax, -0x8(%r12) movb %al, (%r12) movq 0x8(%r15), %rsi addq 0x50(%rsp), %rsi leaq 0x8(%rsp), %rdi callq 0x11e10 movq 0x48(%rsp), %rsi movq 0x50(%rsp), %rdx leaq 0x8(%rsp), %rdi callq 0x112a0 movq 0x68(%rsp), %rsi movq 0x70(%rsp), %rdx leaq 0x8(%rsp), %rdi callq 0x112a0 movq (%r15), %rsi movq 0x8(%r15), %rdx leaq 0x8(%rsp), %rdi callq 0x112a0 movq 0x68(%rsp), %rdi cmpq %r14, %rdi je 0x1d54f movq 0x78(%rsp), %rsi incq %rsi callq 0x119a0 leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x1d56a movq 0x58(%rsp), %rsi incq %rsi callq 0x119a0 movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x1d581 movq 0x38(%rsp), %rsi incq %rsi callq 0x119a0 movq 0x8(%rsp), %rdx movq %rbx, %rdi movl %ebp, %esi callq 0x11990 movq 0xe9d9(%rip), %rax # 0x2bf70 addq $0x10, %rax movq %rax, (%rbx) movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x1d5b5 movq 0x18(%rsp), %rsi incq %rsi callq 0x119a0 movq %rbx, %rax addq $0x98, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x1d643 movq 0x18(%rsp), %rsi jmp 0x1d63b movq %rax, %rbx jmp 0x1d62c movq %rax, %rbx jmp 0x1d643 movq %rdx, %rbx movq %rax, %r15 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x1d605 movq 0x18(%rsp), %rsi incq %rsi callq 0x119a0 leaq 0x68(%rsp), %rdi leaq 0x48(%rsp), %rdx leaq 0x88(%rsp), %r12 movq %r14, %rsi movq %r15, %rcx movl %ebx, %r8d movq %r12, %r9 callq 0x124c5 movq (%r12), %rbx movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x1d643 movq 0x38(%rsp), %rsi incq %rsi callq 0x119a0 movq %rbx, %rdi callq 0x11fe0 nop
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 98h mov r15, rdx mov ebp, esi mov rbx, rdi lea r13, [rsp+0C8h+var_90] mov [r13-10h], r13 lea rsi, aInvalidIterato; "invalid_iterator" lea rdx, aInvalidIterato+10h; "" lea rdi, [rsp+0C8h+var_A0] 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+0C8h+var_80]; int lea rsi, [rsp+0C8h+var_A0]; int mov edx, ebp; int call __ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int) lea r14, [rsp+0C8h+var_50] mov [r14-10h], r14 xor eax, eax mov [r14-8], rax mov [r14], al lea r12, [rsp+0C8h+var_B0] mov [r12-10h], r12 mov [r12-8], rax mov [r12], al mov rsi, [r15+8] add rsi, [rsp+0C8h+var_78] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rsi, qword ptr [rsp+0C8h+var_80] mov rdx, [rsp+0C8h+var_78] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rsi, [rsp+0C8h+var_60] mov rdx, [rsp+0C8h+var_58] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rsi, [r15] mov rdx, [r15+8] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rdi, [rsp+0C8h+var_60]; void * cmp rdi, r14 jz short loc_1D54F mov rsi, [rsp+0C8h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1D54F: lea rax, [rsp+0C8h+var_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_1D56A mov rsi, [rsp+0C8h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1D56A: mov rdi, [rsp+0C8h+var_A0]; void * cmp rdi, r13 jz short loc_1D581 mov rsi, [rsp+0C8h+var_90] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1D581: mov rdx, [rsp+0C8h+var_C0]; char * mov rdi, rbx; this mov esi, ebp; int call __ZN8nlohmann16json_abi_v3_11_36detail9exceptionC2EiPKc; nlohmann::json_abi_v3_11_3::detail::exception::exception(int,char const*) mov rax, cs:_ZTVN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE_ptr add rax, 10h mov [rbx], rax mov rdi, [rsp+0C8h+var_C0]; void * cmp rdi, r12 jz short loc_1D5B5 mov rsi, [rsp+0C8h+var_B0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1D5B5: mov rax, rbx add rsp, 98h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, [rsp+arg_0] cmp rdi, r12 jz short loc_1D643 mov rsi, [rsp+arg_10] jmp short loc_1D63B mov rbx, rax jmp short loc_1D62C mov rbx, rax jmp short loc_1D643 mov rbx, rdx mov r15, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r12 jz short loc_1D605 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1D605: lea rdi, [rsp+arg_60] lea rdx, [rsp+arg_40] lea r12, [rsp+arg_80] mov rsi, r14 mov rcx, r15 mov r8d, ebx mov r9, r12 call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ__cold_1 mov rbx, [r12] loc_1D62C: mov rdi, [rsp+arg_20]; void * cmp rdi, r13 jz short loc_1D643 mov rsi, [rsp+arg_30] loc_1D63B: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1D643: mov rdi, rbx call __Unwind_Resume
nlohmann::json_abi_v3_11_3::detail::exception * ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( nlohmann::json_abi_v3_11_3::detail::exception *this, int a2, _QWORD *a3) { int v4; // ecx int v5; // r8d int v6; // r9d int v8; // [rsp+0h] [rbp-C8h] char *v9; // [rsp+8h] [rbp-C0h] BYREF void *v10; // [rsp+10h] [rbp-B8h] _QWORD v11[2]; // [rsp+18h] [rbp-B0h] BYREF void *v12[2]; // [rsp+28h] [rbp-A0h] BYREF _QWORD v13[2]; // [rsp+38h] [rbp-90h] BYREF int v14[2]; // [rsp+48h] [rbp-80h] BYREF long long v15; // [rsp+50h] [rbp-78h] long long v16; // [rsp+58h] [rbp-70h] BYREF void *v17; // [rsp+68h] [rbp-60h] long long v18; // [rsp+70h] [rbp-58h] _QWORD v19[10]; // [rsp+78h] [rbp-50h] BYREF v12[0] = v13; std::string::_M_construct<char const*>(v12, "invalid_iterator", ""); nlohmann::json_abi_v3_11_3::detail::exception::name( (int)v14, (int)v12, a2, v4, v5, v6, v8, (int)v9, v10, v11[0], v11[1]); v17 = v19; v18 = 0LL; LOBYTE(v19[0]) = 0; v9 = (char *)v11; v10 = 0LL; LOBYTE(v11[0]) = 0; std::string::reserve(&v9, v15 + a3[1]); std::string::_M_append(&v9, *(_QWORD *)v14, v15); std::string::_M_append(&v9, v17, v18); std::string::_M_append(&v9, *a3, a3[1]); if ( v17 != v19 ) operator delete(v17, v19[0] + 1LL); if ( *(long long **)v14 != &v16 ) operator delete(*(void **)v14, v16 + 1); if ( v12[0] != v13 ) operator delete(v12[0], v13[0] + 1LL); nlohmann::json_abi_v3_11_3::detail::exception::exception(this, a2, v9); *(_QWORD *)this = &`vtable for'nlohmann::json_abi_v3_11_3::detail::invalid_iterator + 2; if ( v9 != (char *)v11 ) operator delete(v9, v11[0] + 1LL); return this; }
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x98 MOV R15,RDX MOV EBP,ESI MOV RBX,RDI LEA R13,[RSP + 0x38] MOV qword ptr [R13 + -0x10],R13 LAB_0011d49e: LEA RSI,[0x121eb1] LEA RDX,[0x121ec1] LEA RDI,[RSP + 0x28] CALL 0x00111370 LAB_0011d4b6: LEA RDI,[RSP + 0x48] LEA RSI,[RSP + 0x28] MOV EDX,EBP CALL 0x001114f0 LEA R14,[RSP + 0x78] MOV qword ptr [R14 + -0x10],R14 XOR EAX,EAX MOV qword ptr [R14 + -0x8],RAX MOV byte ptr [R14],AL LEA R12,[RSP + 0x18] MOV qword ptr [R12 + -0x10],R12 MOV qword ptr [R12 + -0x8],RAX MOV byte ptr [R12],AL MOV RSI,qword ptr [R15 + 0x8] ADD RSI,qword ptr [RSP + 0x50] LAB_0011d4f5: LEA RDI,[RSP + 0x8] CALL 0x00111e10 MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] LEA RDI,[RSP + 0x8] CALL 0x001112a0 MOV RSI,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] LEA RDI,[RSP + 0x8] CALL 0x001112a0 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] LEA RDI,[RSP + 0x8] CALL 0x001112a0 MOV RDI,qword ptr [RSP + 0x68] CMP RDI,R14 JZ 0x0011d54f MOV RSI,qword ptr [RSP + 0x78] INC RSI CALL 0x001119a0 LAB_0011d54f: LEA RAX,[RSP + 0x58] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0011d56a MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x001119a0 LAB_0011d56a: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R13 JZ 0x0011d581 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x001119a0 LAB_0011d581: MOV RDX,qword ptr [RSP + 0x8] LAB_0011d586: MOV RDI,RBX MOV ESI,EBP CALL 0x00111990 LAB_0011d590: MOV RAX,qword ptr [0x0012bf70] ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R12 JZ 0x0011d5b5 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001119a0 LAB_0011d5b5: MOV RAX,RBX ADD RSP,0x98 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
exception * _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (exception *param_1,int param_2,ulong *param_3) { char *local_c0; int8 local_b8; char local_b0; int7 uStack_af; long *local_a0 [2]; long local_90 [2]; long *local_80 [2]; long local_70 [2]; int1 *local_60; int8 local_58; int1 local_50; int7 uStack_4f; /* try { // try from 0011d49e to 0011d4b5 has its CatchHandler @ 0011d5e3 */ local_a0[0] = local_90; std::__cxx11::string::_M_construct<char_const*>(local_a0,"invalid_iterator",""); /* try { // try from 0011d4b6 to 0011d4c6 has its CatchHandler @ 0011d5de */ nlohmann::json_abi_v3_11_3::detail::exception::name ((exception *)local_80,(string *)local_a0,param_2); local_58 = 0; local_50 = 0; local_b8 = 0; local_b0 = '\0'; /* try { // try from 0011d4f5 to 0011d537 has its CatchHandler @ 0011d5e8 */ local_c0 = &local_b0; local_60 = &local_50; std::__cxx11::string::reserve((ulong)&local_c0); std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_80[0]); std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_60); std::__cxx11::string::_M_append((char *)&local_c0,*param_3); if (local_60 != &local_50) { operator_delete(local_60,CONCAT71(uStack_4f,local_50) + 1); } if (local_80[0] != local_70) { operator_delete(local_80[0],local_70[0] + 1); } if (local_a0[0] != local_90) { operator_delete(local_a0[0],local_90[0] + 1); } /* try { // try from 0011d586 to 0011d58f has its CatchHandler @ 0011d5ca */ nlohmann::json_abi_v3_11_3::detail::exception::exception(param_1,param_2,local_c0); *(int **)param_1 = PTR_vtable_0012bf70 + 0x10; if (local_c0 != &local_b0) { operator_delete(local_c0,CONCAT71(uStack_af,local_b0) + 1); } return param_1; }
16,885
blst_sk_to_pk2_in_g2
corpus-core[P]colibri-stateless/build_O2/_deps/blst-src/src/e2.c
void blst_sk_to_pk2_in_g2(unsigned char out[192], POINTonE2_affine *PK, const pow256 SK) { POINTonE2 P[1]; POINTonE2_sign(P, &BLS12_381_G2, SK); if (PK != NULL) vec_copy(PK, P, sizeof(*PK)); if (out != NULL) { limb_t sgn0_pty = POINTonE2_Serialize_BE(out, P); out[0] |= (sgn0_pty & 2) << 4; /* pre-decorate */ out[0] |= vec_is_zero(P->Z, sizeof(P->Z)) << 6; } }
O2
c
blst_sk_to_pk2_in_g2: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x120, %rsp # imm = 0x120 movq %rsi, %r14 movq %rdi, %rbx leaq 0x2adba(%rip), %rsi # 0x7fa70 leaq -0x130(%rbp), %rdi callq 0x54b6d testq %r14, %r14 je 0x54cdb leaq -0x130(%rbp), %rsi movl $0xc0, %edx movq %r14, %rdi callq 0x51055 testq %rbx, %rbx je 0x54d07 leaq -0x130(%rbp), %rsi movq %rbx, %rdi callq 0x54d13 shlb $0x4, %al andb $0x20, %al orb %al, (%rbx) leaq -0x70(%rbp), %rdi pushq $0x60 popq %rsi callq 0x510f5 shlb $0x6, %al orb %al, (%rbx) addq $0x120, %rsp # imm = 0x120 popq %rbx popq %r14 popq %rbp retq
blst_sk_to_pk2_in_g2: push rbp mov rbp, rsp push r14 push rbx sub rsp, 120h mov r14, rsi mov rbx, rdi lea rsi, BLS12_381_G2 lea rdi, [rbp+var_130] call POINTonE2_sign test r14, r14 jz short loc_54CDB lea rsi, [rbp+var_130] mov edx, 0C0h mov rdi, r14 call vec_copy loc_54CDB: test rbx, rbx jz short loc_54D07 lea rsi, [rbp+var_130] mov rdi, rbx call POINTonE2_Serialize_BE shl al, 4 and al, 20h or [rbx], al lea rdi, [rbp+var_70] push 60h ; '`' pop rsi call vec_is_zero shl al, 6 or [rbx], al loc_54D07: add rsp, 120h pop rbx pop r14 pop rbp retn
char blst_sk_to_pk2_in_g2(_BYTE *a1, long long a2) { char result; // al _BYTE v3[192]; // [rsp+0h] [rbp-130h] BYREF _BYTE v4[112]; // [rsp+C0h] [rbp-70h] BYREF result = POINTonE2_sign((long long)v3); if ( a2 ) result = vec_copy(a2, (long long)v3, 0xC0uLL); if ( a1 ) { *a1 |= (16 * POINTonE2_Serialize_BE(a1, v3)) & 0x20; result = (unsigned __int8)vec_is_zero((long long)v4, 0x60uLL) << 6; *a1 |= result; } return result; }
blst_sk_to_pk2_in_g2: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x120 MOV R14,RSI MOV RBX,RDI LEA RSI,[0x17fa70] LEA RDI,[RBP + -0x130] CALL 0x00154b6d TEST R14,R14 JZ 0x00154cdb LEA RSI,[RBP + -0x130] MOV EDX,0xc0 MOV RDI,R14 CALL 0x00151055 LAB_00154cdb: TEST RBX,RBX JZ 0x00154d07 LEA RSI,[RBP + -0x130] MOV RDI,RBX CALL 0x00154d13 SHL AL,0x4 AND AL,0x20 OR byte ptr [RBX],AL LEA RDI,[RBP + -0x70] PUSH 0x60 POP RSI CALL 0x001510f5 SHL AL,0x6 OR byte ptr [RBX],AL LAB_00154d07: ADD RSP,0x120 POP RBX POP R14 POP RBP RET
void blst_sk_to_pk2_in_g2(byte *param_1,long param_2) { byte bVar1; char cVar2; int1 local_138 [192]; int1 local_78 [96]; POINTonE2_sign(local_138,BLS12_381_G2); if (param_2 != 0) { vec_copy(param_2,local_138,0xc0); } if (param_1 != (byte *)0x0) { bVar1 = POINTonE2_Serialize_BE(param_1,local_138); *param_1 = *param_1 | (bVar1 & 2) << 4; cVar2 = vec_is_zero(local_78,0x60); *param_1 = *param_1 | cVar2 << 6; } return; }
16,886
bc_get_buf
bluesky950520[P]quickjs/quickjs.c
static int bc_get_buf(BCReaderState *s, void *buf, uint32_t buf_len) { if (buf_len != 0) { if (unlikely(!buf || s->buf_end - s->ptr < buf_len)) return bc_read_error_end(s); memcpy(buf, s->ptr, buf_len); s->ptr += buf_len; } return 0; }
O0
c
bc_get_buf: subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq %rsi, 0x10(%rsp) movl %edx, 0xc(%rsp) cmpl $0x0, 0xc(%rsp) je 0x7d312 movb $0x1, %al cmpq $0x0, 0x10(%rsp) movb %al, 0xb(%rsp) je 0x7d2be movq 0x18(%rsp), %rax movq 0x18(%rax), %rax movq 0x18(%rsp), %rcx movq 0x10(%rcx), %rcx subq %rcx, %rax movl 0xc(%rsp), %ecx cmpq %rcx, %rax setl %al movb %al, 0xb(%rsp) movb 0xb(%rsp), %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x7d2e3 movq 0x18(%rsp), %rdi callq 0x7a490 movl %eax, 0x24(%rsp) jmp 0x7d31a movq 0x10(%rsp), %rdi movq 0x18(%rsp), %rax movq 0x10(%rax), %rsi movl 0xc(%rsp), %eax movl %eax, %edx callq 0xe5b0 movl 0xc(%rsp), %edx movq 0x18(%rsp), %rax movq 0x10(%rax), %rcx movl %edx, %edx addq %rdx, %rcx movq %rcx, 0x10(%rax) movl $0x0, 0x24(%rsp) movl 0x24(%rsp), %eax addq $0x28, %rsp retq nopw %cs:(%rax,%rax)
bc_get_buf: sub rsp, 28h mov [rsp+28h+var_10], rdi mov [rsp+28h+var_18], rsi mov [rsp+28h+var_1C], edx cmp [rsp+28h+var_1C], 0 jz loc_7D312 mov al, 1 cmp [rsp+28h+var_18], 0 mov [rsp+28h+var_1D], al jz short loc_7D2BE mov rax, [rsp+28h+var_10] mov rax, [rax+18h] mov rcx, [rsp+28h+var_10] mov rcx, [rcx+10h] sub rax, rcx mov ecx, [rsp+28h+var_1C] cmp rax, rcx setl al mov [rsp+28h+var_1D], al loc_7D2BE: mov al, [rsp+28h+var_1D] xor al, 0FFh xor al, 0FFh and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_7D2E3 mov rdi, [rsp+28h+var_10] call bc_read_error_end mov [rsp+28h+var_4], eax jmp short loc_7D31A loc_7D2E3: mov rdi, [rsp+28h+var_18] mov rax, [rsp+28h+var_10] mov rsi, [rax+10h] mov eax, [rsp+28h+var_1C] mov edx, eax call _memcpy mov edx, [rsp+28h+var_1C] mov rax, [rsp+28h+var_10] mov rcx, [rax+10h] mov edx, edx add rcx, rdx mov [rax+10h], rcx loc_7D312: mov [rsp+28h+var_4], 0 loc_7D31A: mov eax, [rsp+28h+var_4] add rsp, 28h retn
long long bc_get_buf( 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) { bool v15; // [rsp+Bh] [rbp-1Dh] unsigned int v16; // [rsp+Ch] [rbp-1Ch] v16 = a3; if ( !(_DWORD)a3 ) return 0; v15 = 1; if ( a2 ) { a4 = (unsigned int)a3; v15 = *(_QWORD *)(a1 + 24) - *(_QWORD *)(a1 + 16) < (long long)(unsigned int)a3; } if ( !v15 ) { memcpy(a2, *(_QWORD *)(a1 + 16), (unsigned int)a3); *(_QWORD *)(a1 + 16) += v16; return 0; } return (unsigned int)bc_read_error_end(a1, a7, a8, a9, a10, a11, a12, a13, a14, a2, a3, a4, a5, a6); }
bc_get_buf: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV qword ptr [RSP + 0x10],RSI MOV dword ptr [RSP + 0xc],EDX CMP dword ptr [RSP + 0xc],0x0 JZ 0x0017d312 MOV AL,0x1 CMP qword ptr [RSP + 0x10],0x0 MOV byte ptr [RSP + 0xb],AL JZ 0x0017d2be 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 MOV ECX,dword ptr [RSP + 0xc] CMP RAX,RCX SETL AL MOV byte ptr [RSP + 0xb],AL LAB_0017d2be: MOV AL,byte ptr [RSP + 0xb] XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x0017d2e3 MOV RDI,qword ptr [RSP + 0x18] CALL 0x0017a490 MOV dword ptr [RSP + 0x24],EAX JMP 0x0017d31a LAB_0017d2e3: MOV RDI,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RAX + 0x10] MOV EAX,dword ptr [RSP + 0xc] MOV EDX,EAX CALL 0x0010e5b0 MOV EDX,dword ptr [RSP + 0xc] MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RAX + 0x10] MOV EDX,EDX ADD RCX,RDX MOV qword ptr [RAX + 0x10],RCX LAB_0017d312: MOV dword ptr [RSP + 0x24],0x0 LAB_0017d31a: MOV EAX,dword ptr [RSP + 0x24] ADD RSP,0x28 RET
int4 bc_get_buf(long param_1,void *param_2,uint param_3) { bool bVar1; int4 uVar2; if (param_3 != 0) { bVar1 = true; if (param_2 != (void *)0x0) { bVar1 = *(long *)(param_1 + 0x18) - *(long *)(param_1 + 0x10) < (long)(ulong)param_3; } if (bVar1) { uVar2 = bc_read_error_end(param_1); return uVar2; } memcpy(param_2,*(void **)(param_1 + 0x10),(ulong)param_3); *(ulong *)(param_1 + 0x10) = *(long *)(param_1 + 0x10) + (ulong)param_3; } return 0; }
16,887
bc_get_buf
bluesky950520[P]quickjs/quickjs.c
static int bc_get_buf(BCReaderState *s, void *buf, uint32_t buf_len) { if (buf_len != 0) { if (unlikely(!buf || s->buf_end - s->ptr < buf_len)) return bc_read_error_end(s); memcpy(buf, s->ptr, buf_len); s->ptr += buf_len; } return 0; }
O2
c
bc_get_buf: pushq %r15 pushq %r14 pushq %rbx xorl %ebx, %ebx testl %edx, %edx je 0x3d3bb movq %rdi, %r14 testq %rsi, %rsi je 0x3d3c3 movq 0x10(%r14), %rax movq 0x18(%r14), %rcx subq %rax, %rcx movl %edx, %r15d cmpq %r15, %rcx jl 0x3d3c3 movq %rsi, %rdi movq %rax, %rsi movq %r15, %rdx callq 0xe5c0 addq %r15, 0x10(%r14) movl %ebx, %eax popq %rbx popq %r14 popq %r15 retq movq %r14, %rdi callq 0x3d27c pushq $-0x1 popq %rbx jmp 0x3d3bb
bc_get_buf: push r15 push r14 push rbx xor ebx, ebx test edx, edx jz short loc_3D3BB mov r14, rdi test rsi, rsi jz short loc_3D3C3 mov rax, [r14+10h] mov rcx, [r14+18h] sub rcx, rax mov r15d, edx cmp rcx, r15 jl short loc_3D3C3 mov rdi, rsi mov rsi, rax mov rdx, r15 call _memcpy add [r14+10h], r15 loc_3D3BB: mov eax, ebx pop rbx pop r14 pop r15 retn loc_3D3C3: mov rdi, r14 call bc_read_error_end push 0FFFFFFFFFFFFFFFFh pop rbx jmp short loc_3D3BB
long long bc_get_buf( 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) { unsigned int v14; // ebx long long v15; // r15 v14 = 0; if ( (_DWORD)a3 ) { if ( a2 && (a4 = *(_QWORD *)(a1 + 24) - *(_QWORD *)(a1 + 16), v15 = (unsigned int)a3, a4 >= (unsigned int)a3) ) { memcpy(a2, *(_QWORD *)(a1 + 16), (unsigned int)a3); *(_QWORD *)(a1 + 16) += v15; } else { bc_read_error_end(a1, a7, a8, a9, a10, a11, a12, a13, a14, a2, a3, a4, a5, a6); return (unsigned int)-1; } } return v14; }
bc_get_buf: PUSH R15 PUSH R14 PUSH RBX XOR EBX,EBX TEST EDX,EDX JZ 0x0013d3bb MOV R14,RDI TEST RSI,RSI JZ 0x0013d3c3 MOV RAX,qword ptr [R14 + 0x10] MOV RCX,qword ptr [R14 + 0x18] SUB RCX,RAX MOV R15D,EDX CMP RCX,R15 JL 0x0013d3c3 MOV RDI,RSI MOV RSI,RAX MOV RDX,R15 CALL 0x0010e5c0 ADD qword ptr [R14 + 0x10],R15 LAB_0013d3bb: MOV EAX,EBX POP RBX POP R14 POP R15 RET LAB_0013d3c3: MOV RDI,R14 CALL 0x0013d27c PUSH -0x1 POP RBX JMP 0x0013d3bb
int4 bc_get_buf(long param_1,void *param_2,uint param_3) { int4 uVar1; ulong __n; uVar1 = 0; if (param_3 != 0) { if (param_2 != (void *)0x0) { __n = (ulong)param_3; if ((long)__n <= *(long *)(param_1 + 0x18) - (long)*(void **)(param_1 + 0x10)) { memcpy(param_2,*(void **)(param_1 + 0x10),__n); *(long *)(param_1 + 0x10) = *(long *)(param_1 + 0x10) + __n; return 0; } } bc_read_error_end(param_1); uVar1 = 0xffffffff; } return uVar1; }
16,888
common_arg::common_arg(std::initializer_list<char const*> const&, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&))
monkey531[P]llama/common/arg.h
common_arg( const std::initializer_list<const char *> & args, const char * value_hint, const char * value_hint_2, const std::string & help, void (*handler)(common_params & params, const std::string &, const std::string &) ) : args(args), value_hint(value_hint), value_hint_2(value_hint_2), help(help), handler_str_str(handler) {}
O3
c
common_arg::common_arg(std::initializer_list<char const*> const&, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r9, 0x8(%rsp) movq %r8, %r15 movq %rcx, %r12 movq %rdx, %r13 movq %rsi, %r14 movq %rdi, %rbx leaq 0x14(%rsp), %rsi movl $0x0, (%rsi) leaq 0x7(%rsp), %rcx leaq 0x6(%rsp), %r8 movl $0x1, %edx callq 0x5691e leaq 0x38(%rbx), %rax xorl %ecx, %ecx movq %rcx, 0x40(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x30(%rbx) movq %rax, 0x48(%rbx) movq %rax, 0x50(%rbx) movq %rcx, 0x58(%rbx) leaq 0x60(%rbx), %rbp movq (%r14), %rsi movq 0x8(%r14), %rdx leaq 0x5(%rsp), %rcx movq %rbp, %rdi callq 0x569a0 movq %r13, 0x78(%rbx) movq %r12, 0x80(%rbx) movq $0x0, 0x88(%rbx) leaq 0x90(%rbx), %rdi leaq 0xa0(%rbx), %rax movq %rax, 0x90(%rbx) movq (%r15), %rsi movq 0x8(%r15), %rdx addq %rsi, %rdx callq 0x210fc movb $0x0, 0xb0(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0xb8(%rbx) movq 0x8(%rsp), %rax movq %rax, 0xc8(%rbx) movq $0x0, 0xd0(%rbx) addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 movq (%rbp), %rdi testq %rdi, %rdi je 0x53672 movq 0x70(%rbx), %rsi subq %rdi, %rsi callq 0x1a890 jmp 0x53672 movq %rax, %r14 leaq 0x30(%rbx), %rdi callq 0x214f0 movq %rbx, %rdi callq 0x214f0 movq %r14, %rdi callq 0x1af20 nop
_ZN10common_argC2ERKSt16initializer_listIPKcES2_S2_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPFvR13common_paramsSD_SD_E: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rsp+48h+var_40], r9 mov r15, r8 mov r12, rcx mov r13, rdx mov r14, rsi mov rbx, rdi lea rsi, [rsp+48h+var_34] mov dword ptr [rsi], 0 lea rcx, [rsp+48h+var_41] lea r8, [rsp+48h+var_42] mov edx, 1 call _ZNSt3setI13llama_exampleSt4lessIS0_ESaIS0_EEC2ESt16initializer_listIS0_ERKS2_RKS3_; std::set<llama_example>::set(std::initializer_list<llama_example>,std::less<llama_example> const&,std::allocator<llama_example> const&) lea rax, [rbx+38h] xor ecx, ecx mov [rbx+40h], rcx xorps xmm0, xmm0 movups xmmword ptr [rbx+30h], xmm0 mov [rbx+48h], rax mov [rbx+50h], rax mov [rbx+58h], rcx lea rbp, [rbx+60h] mov rsi, [r14] mov rdx, [r14+8] lea rcx, [rsp+48h+var_43] mov rdi, rbp call _ZNSt6vectorIPKcSaIS1_EEC2ESt16initializer_listIS1_ERKS2_; std::vector<char const*>::vector(std::initializer_list<char const*>,std::allocator<char const*> const&) mov [rbx+78h], r13 mov [rbx+80h], r12 mov qword ptr [rbx+88h], 0 lea rdi, [rbx+90h] lea rax, [rbx+0A0h] mov [rbx+90h], rax mov rsi, [r15] mov rdx, [r15+8] add rdx, rsi call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov byte ptr [rbx+0B0h], 0 xorps xmm0, xmm0 movups xmmword ptr [rbx+0B8h], xmm0 mov rax, [rsp+48h+var_40] mov [rbx+0C8h], rax mov qword ptr [rbx+0D0h], 0 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax mov rdi, [rbp+0]; void * test rdi, rdi jz short loc_53672 mov rsi, [rbx+70h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_53672 mov r14, rax loc_53672: lea rdi, [rbx+30h] call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree() mov rdi, rbx call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree() mov rdi, r14 call __Unwind_Resume
long long common_arg::common_arg(long long a1, _QWORD *a2, long long a3, long long a4, long long a5, long long a6) { long long result; // rax char v10; // [rsp+5h] [rbp-43h] BYREF char v11; // [rsp+6h] [rbp-42h] BYREF char v12; // [rsp+7h] [rbp-41h] BYREF long long v13; // [rsp+8h] [rbp-40h] _DWORD v14[13]; // [rsp+14h] [rbp-34h] BYREF v13 = a6; v14[0] = 0; std::set<llama_example>::set(a1, v14, 1LL, &v12, &v11); *(_QWORD *)(a1 + 64) = 0LL; *(_OWORD *)(a1 + 48) = 0LL; *(_QWORD *)(a1 + 72) = a1 + 56; *(_QWORD *)(a1 + 80) = a1 + 56; *(_QWORD *)(a1 + 88) = 0LL; std::vector<char const*>::vector(a1 + 96, *a2, a2[1], &v10); *(_QWORD *)(a1 + 120) = a3; *(_QWORD *)(a1 + 128) = a4; *(_QWORD *)(a1 + 136) = 0LL; *(_QWORD *)(a1 + 144) = a1 + 160; std::string::_M_construct<char *>(a1 + 144, *(_BYTE **)a5, *(_QWORD *)a5 + *(_QWORD *)(a5 + 8)); *(_BYTE *)(a1 + 176) = 0; *(_OWORD *)(a1 + 184) = 0LL; result = v13; *(_QWORD *)(a1 + 200) = v13; *(_QWORD *)(a1 + 208) = 0LL; return result; }
common_arg: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RSP + 0x8],R9 MOV R15,R8 MOV R12,RCX MOV R13,RDX MOV R14,RSI MOV RBX,RDI LEA RSI,[RSP + 0x14] MOV dword ptr [RSI],0x0 LEA RCX,[RSP + 0x7] LEA R8,[RSP + 0x6] MOV EDX,0x1 CALL 0x0015691e LEA RAX,[RBX + 0x38] XOR ECX,ECX MOV qword ptr [RBX + 0x40],RCX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOV qword ptr [RBX + 0x48],RAX MOV qword ptr [RBX + 0x50],RAX MOV qword ptr [RBX + 0x58],RCX LEA RBP,[RBX + 0x60] MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] LAB_001535d7: LEA RCX,[RSP + 0x5] MOV RDI,RBP CALL 0x001569a0 MOV qword ptr [RBX + 0x78],R13 MOV qword ptr [RBX + 0x80],R12 MOV qword ptr [RBX + 0x88],0x0 LEA RDI,[RBX + 0x90] LEA RAX,[RBX + 0xa0] MOV qword ptr [RBX + 0x90],RAX MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] ADD RDX,RSI LAB_00153619: CALL 0x001210fc LAB_0015361e: MOV byte ptr [RBX + 0xb0],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0xb8],XMM0 MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RBX + 0xc8],RAX MOV qword ptr [RBX + 0xd0],0x0 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_arg::common_arg(std::initializer_list<char const*> const&, char const*, char const*, std::__cxx11::string const&, void (*)(common_params&, std::__cxx11::string const&, std::__cxx11::string const&)) */ void __thiscall common_arg::common_arg (common_arg *this,initializer_list *param_1,char *param_2,char *param_3,string *param_4, _func_void_common_params_ptr_string_ptr_string_ptr *param_5) { int1 local_43; int1 local_42; int1 local_41; _func_void_common_params_ptr_string_ptr_string_ptr *local_40; int4 local_34; local_34 = 0; local_40 = param_5; std::set<llama_example,std::less<llama_example>,std::allocator<llama_example>>::set (this,&local_34,1,&local_41,&local_42); *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(common_arg **)(this + 0x48) = this + 0x38; *(common_arg **)(this + 0x50) = this + 0x38; *(int8 *)(this + 0x58) = 0; /* try { // try from 001535d7 to 001535e3 has its CatchHandler @ 0015366f */ std::vector<char_const*,std::allocator<char_const*>>::vector ((vector<char_const*,std::allocator<char_const*>> *)(this + 0x60),*(int8 *)param_1 ,*(int8 *)(param_1 + 8),&local_43); *(char **)(this + 0x78) = param_2; *(char **)(this + 0x80) = param_3; *(int8 *)(this + 0x88) = 0; *(common_arg **)(this + 0x90) = this + 0xa0; /* try { // try from 00153619 to 0015361d has its CatchHandler @ 00153655 */ std::__cxx11::string::_M_construct<char*> (this + 0x90,*(long *)param_4,*(long *)(param_4 + 8) + *(long *)param_4); this[0xb0] = (common_arg)0x0; *(int8 *)(this + 0xb8) = 0; *(int8 *)(this + 0xc0) = 0; *(_func_void_common_params_ptr_string_ptr_string_ptr **)(this + 200) = local_40; *(int8 *)(this + 0xd0) = 0; return; }
16,889
my_coll_parser_scan_logical_position
eloqsql/strings/ctype-uca.c
static int my_coll_parser_scan_logical_position(MY_COLL_RULE_PARSER *p, my_wc_t *pwc, size_t limit) { MY_COLL_RULES *rules= p->rules; MY_COLL_LEXEM *lexem= my_coll_parser_curr(p); if (!lex_cmp(lexem, C_STRING_WITH_LEN("[first non-ignorable]"))) lexem->code= rules->uca->first_non_ignorable; else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[last non-ignorable]"))) lexem->code= rules->uca->last_non_ignorable; else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[first primary ignorable]"))) lexem->code= rules->uca->first_primary_ignorable; else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[last primary ignorable]"))) lexem->code= rules->uca->last_primary_ignorable; else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[first secondary ignorable]"))) lexem->code= rules->uca->first_secondary_ignorable; else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[last secondary ignorable]"))) lexem->code= rules->uca->last_secondary_ignorable; else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[first tertiary ignorable]"))) lexem->code= rules->uca->first_tertiary_ignorable; else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[last tertiary ignorable]"))) lexem->code= rules->uca->last_tertiary_ignorable; else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[first trailing]"))) lexem->code= rules->uca->first_trailing; else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[last trailing]"))) lexem->code= rules->uca->last_trailing; else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[first variable]"))) lexem->code= rules->uca->first_variable; else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[last variable]"))) lexem->code= rules->uca->last_variable; else return 0; /* Don't scan the next token */ if (!my_coll_rule_expand(pwc, limit, lexem->code)) { /* Logical position can not be in a contraction, so the above call should never fail. Let's assert in debug version and print a nice error message in production version. */ DBUG_ASSERT(0); return my_coll_parser_too_long_error(p, "Logical position"); } return my_coll_parser_scan(p); }
O0
c
my_coll_parser_scan_logical_position: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0xf0(%rax), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rdi callq 0x4e7e0 movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rdi leaq 0x2c589(%rip), %rsi # 0x7ba44 movl $0x15, %edx callq 0x4ef60 cmpl $0x0, %eax jne 0x4f4e4 movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq 0x70(%rax), %rax movl %eax, %ecx movq -0x30(%rbp), %rax movl %ecx, 0x24(%rax) jmp 0x4f754 movq -0x30(%rbp), %rdi leaq 0x2c56b(%rip), %rsi # 0x7ba5a movl $0x14, %edx callq 0x4ef60 cmpl $0x0, %eax jne 0x4f518 movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq 0x78(%rax), %rax movl %eax, %ecx movq -0x30(%rbp), %rax movl %ecx, 0x24(%rax) jmp 0x4f752 movq -0x30(%rbp), %rdi leaq 0x2c54c(%rip), %rsi # 0x7ba6f movl $0x19, %edx callq 0x4ef60 cmpl $0x0, %eax jne 0x4f54f movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq 0x80(%rax), %rax movl %eax, %ecx movq -0x30(%rbp), %rax movl %ecx, 0x24(%rax) jmp 0x4f750 movq -0x30(%rbp), %rdi leaq 0x2c52f(%rip), %rsi # 0x7ba89 movl $0x18, %edx callq 0x4ef60 cmpl $0x0, %eax jne 0x4f586 movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq 0x88(%rax), %rax movl %eax, %ecx movq -0x30(%rbp), %rax movl %ecx, 0x24(%rax) jmp 0x4f74e movq -0x30(%rbp), %rdi leaq 0x2c511(%rip), %rsi # 0x7baa2 movl $0x1b, %edx callq 0x4ef60 cmpl $0x0, %eax jne 0x4f5bd movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq 0x90(%rax), %rax movl %eax, %ecx movq -0x30(%rbp), %rax movl %ecx, 0x24(%rax) jmp 0x4f74c movq -0x30(%rbp), %rdi leaq 0x2c4f6(%rip), %rsi # 0x7babe movl $0x1a, %edx callq 0x4ef60 cmpl $0x0, %eax jne 0x4f5f4 movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq 0x98(%rax), %rax movl %eax, %ecx movq -0x30(%rbp), %rax movl %ecx, 0x24(%rax) jmp 0x4f74a movq -0x30(%rbp), %rdi leaq 0x2c4da(%rip), %rsi # 0x7bad9 movl $0x1a, %edx callq 0x4ef60 cmpl $0x0, %eax jne 0x4f62b movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq 0xa0(%rax), %rax movl %eax, %ecx movq -0x30(%rbp), %rax movl %ecx, 0x24(%rax) jmp 0x4f748 movq -0x30(%rbp), %rdi leaq 0x2c4be(%rip), %rsi # 0x7baf4 movl $0x19, %edx callq 0x4ef60 cmpl $0x0, %eax jne 0x4f662 movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq 0xa8(%rax), %rax movl %eax, %ecx movq -0x30(%rbp), %rax movl %ecx, 0x24(%rax) jmp 0x4f746 movq -0x30(%rbp), %rdi leaq 0x2c4a1(%rip), %rsi # 0x7bb0e movl $0x10, %edx callq 0x4ef60 cmpl $0x0, %eax jne 0x4f699 movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq 0xb0(%rax), %rax movl %eax, %ecx movq -0x30(%rbp), %rax movl %ecx, 0x24(%rax) jmp 0x4f744 movq -0x30(%rbp), %rdi leaq 0x2c47b(%rip), %rsi # 0x7bb1f movl $0xf, %edx callq 0x4ef60 cmpl $0x0, %eax jne 0x4f6cd movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq 0xb8(%rax), %rax movl %eax, %ecx movq -0x30(%rbp), %rax movl %ecx, 0x24(%rax) jmp 0x4f742 movq -0x30(%rbp), %rdi leaq 0x2c457(%rip), %rsi # 0x7bb2f movl $0x10, %edx callq 0x4ef60 cmpl $0x0, %eax jne 0x4f701 movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq 0xc0(%rax), %rax movl %eax, %ecx movq -0x30(%rbp), %rax movl %ecx, 0x24(%rax) jmp 0x4f740 movq -0x30(%rbp), %rdi leaq 0x2c434(%rip), %rsi # 0x7bb40 movl $0xf, %edx callq 0x4ef60 cmpl $0x0, %eax jne 0x4f735 movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq 0xc8(%rax), %rax movl %eax, %ecx movq -0x30(%rbp), %rax movl %ecx, 0x24(%rax) jmp 0x4f73e movl $0x0, -0x4(%rbp) jmp 0x4f793 jmp 0x4f740 jmp 0x4f742 jmp 0x4f744 jmp 0x4f746 jmp 0x4f748 jmp 0x4f74a jmp 0x4f74c jmp 0x4f74e jmp 0x4f750 jmp 0x4f752 jmp 0x4f754 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x30(%rbp), %rax movslq 0x24(%rax), %rdx callq 0x4f8b0 cmpl $0x0, %eax jne 0x4f787 jmp 0x4f770 jmp 0x4f772 movq -0x10(%rbp), %rdi leaq 0x2c3d3(%rip), %rsi # 0x7bb50 callq 0x4f920 movl %eax, -0x4(%rbp) jmp 0x4f793 movq -0x10(%rbp), %rdi callq 0x4efc0 movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopl (%rax)
my_coll_parser_scan_logical_position: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_10] mov rax, [rax+0F0h] mov [rbp+var_28], rax mov rdi, [rbp+var_10] call my_coll_parser_curr mov [rbp+var_30], rax mov rdi, [rbp+var_30] lea rsi, aFirstNonIgnora; "[first non-ignorable]" mov edx, 15h call lex_cmp cmp eax, 0 jnz short loc_4F4E4 mov rax, [rbp+var_28] mov rax, [rax+8] mov rax, [rax+70h] mov ecx, eax mov rax, [rbp+var_30] mov [rax+24h], ecx jmp loc_4F754 loc_4F4E4: mov rdi, [rbp+var_30] lea rsi, aLastNonIgnorab; "[last non-ignorable]" mov edx, 14h call lex_cmp cmp eax, 0 jnz short loc_4F518 mov rax, [rbp+var_28] mov rax, [rax+8] mov rax, [rax+78h] mov ecx, eax mov rax, [rbp+var_30] mov [rax+24h], ecx jmp loc_4F752 loc_4F518: mov rdi, [rbp+var_30] lea rsi, aFirstPrimaryIg; "[first primary ignorable]" mov edx, 19h call lex_cmp cmp eax, 0 jnz short loc_4F54F mov rax, [rbp+var_28] mov rax, [rax+8] mov rax, [rax+80h] mov ecx, eax mov rax, [rbp+var_30] mov [rax+24h], ecx jmp loc_4F750 loc_4F54F: mov rdi, [rbp+var_30] lea rsi, aLastPrimaryIgn; "[last primary ignorable]" mov edx, 18h call lex_cmp cmp eax, 0 jnz short loc_4F586 mov rax, [rbp+var_28] mov rax, [rax+8] mov rax, [rax+88h] mov ecx, eax mov rax, [rbp+var_30] mov [rax+24h], ecx jmp loc_4F74E loc_4F586: mov rdi, [rbp+var_30] lea rsi, aFirstSecondary; "[first secondary ignorable]" mov edx, 1Bh call lex_cmp cmp eax, 0 jnz short loc_4F5BD mov rax, [rbp+var_28] mov rax, [rax+8] mov rax, [rax+90h] mov ecx, eax mov rax, [rbp+var_30] mov [rax+24h], ecx jmp loc_4F74C loc_4F5BD: mov rdi, [rbp+var_30] lea rsi, aLastSecondaryI; "[last secondary ignorable]" mov edx, 1Ah call lex_cmp cmp eax, 0 jnz short loc_4F5F4 mov rax, [rbp+var_28] mov rax, [rax+8] mov rax, [rax+98h] mov ecx, eax mov rax, [rbp+var_30] mov [rax+24h], ecx jmp loc_4F74A loc_4F5F4: mov rdi, [rbp+var_30] lea rsi, aFirstTertiaryI; "[first tertiary ignorable]" mov edx, 1Ah call lex_cmp cmp eax, 0 jnz short loc_4F62B mov rax, [rbp+var_28] mov rax, [rax+8] mov rax, [rax+0A0h] mov ecx, eax mov rax, [rbp+var_30] mov [rax+24h], ecx jmp loc_4F748 loc_4F62B: mov rdi, [rbp+var_30] lea rsi, aLastTertiaryIg; "[last tertiary ignorable]" mov edx, 19h call lex_cmp cmp eax, 0 jnz short loc_4F662 mov rax, [rbp+var_28] mov rax, [rax+8] mov rax, [rax+0A8h] mov ecx, eax mov rax, [rbp+var_30] mov [rax+24h], ecx jmp loc_4F746 loc_4F662: mov rdi, [rbp+var_30] lea rsi, aFirstTrailing; "[first trailing]" mov edx, 10h call lex_cmp cmp eax, 0 jnz short loc_4F699 mov rax, [rbp+var_28] mov rax, [rax+8] mov rax, [rax+0B0h] mov ecx, eax mov rax, [rbp+var_30] mov [rax+24h], ecx jmp loc_4F744 loc_4F699: mov rdi, [rbp+var_30] lea rsi, aLastTrailing; "[last trailing]" mov edx, 0Fh call lex_cmp cmp eax, 0 jnz short loc_4F6CD mov rax, [rbp+var_28] mov rax, [rax+8] mov rax, [rax+0B8h] mov ecx, eax mov rax, [rbp+var_30] mov [rax+24h], ecx jmp short loc_4F742 loc_4F6CD: mov rdi, [rbp+var_30] lea rsi, aFirstVariable; "[first variable]" mov edx, 10h call lex_cmp cmp eax, 0 jnz short loc_4F701 mov rax, [rbp+var_28] mov rax, [rax+8] mov rax, [rax+0C0h] mov ecx, eax mov rax, [rbp+var_30] mov [rax+24h], ecx jmp short loc_4F740 loc_4F701: mov rdi, [rbp+var_30] lea rsi, aLastVariable; "[last variable]" mov edx, 0Fh call lex_cmp cmp eax, 0 jnz short loc_4F735 mov rax, [rbp+var_28] mov rax, [rax+8] mov rax, [rax+0C8h] mov ecx, eax mov rax, [rbp+var_30] mov [rax+24h], ecx jmp short loc_4F73E loc_4F735: mov [rbp+var_4], 0 jmp short loc_4F793 loc_4F73E: jmp short $+2 loc_4F740: jmp short $+2 loc_4F742: jmp short $+2 loc_4F744: jmp short $+2 loc_4F746: jmp short $+2 loc_4F748: jmp short $+2 loc_4F74A: jmp short $+2 loc_4F74C: jmp short $+2 loc_4F74E: jmp short $+2 loc_4F750: jmp short $+2 loc_4F752: jmp short $+2 loc_4F754: mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] mov rax, [rbp+var_30] movsxd rdx, dword ptr [rax+24h] call my_coll_rule_expand cmp eax, 0 jnz short loc_4F787 jmp short $+2 loc_4F770: jmp short $+2 loc_4F772: mov rdi, [rbp+var_10] lea rsi, aLogicalPositio; "Logical position" call my_coll_parser_too_long_error mov [rbp+var_4], eax jmp short loc_4F793 loc_4F787: mov rdi, [rbp+var_10] call my_coll_parser_scan mov [rbp+var_4], eax loc_4F793: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long my_coll_parser_scan_logical_position(long long a1, long long a2, long long a3) { long long v4; // [rsp+0h] [rbp-30h] long long v5; // [rsp+8h] [rbp-28h] v5 = *(_QWORD *)(a1 + 240); v4 = my_coll_parser_curr(a1); if ( (unsigned int)lex_cmp(v4, (long long)"[first non-ignorable]", 0x15uLL) ) { if ( (unsigned int)lex_cmp(v4, (long long)"[last non-ignorable]", 0x14uLL) ) { if ( (unsigned int)lex_cmp(v4, (long long)"[first primary ignorable]", 0x19uLL) ) { if ( (unsigned int)lex_cmp(v4, (long long)"[last primary ignorable]", 0x18uLL) ) { if ( (unsigned int)lex_cmp(v4, (long long)"[first secondary ignorable]", 0x1BuLL) ) { if ( (unsigned int)lex_cmp(v4, (long long)"[last secondary ignorable]", 0x1AuLL) ) { if ( (unsigned int)lex_cmp(v4, (long long)"[first tertiary ignorable]", 0x1AuLL) ) { if ( (unsigned int)lex_cmp(v4, (long long)"[last tertiary ignorable]", 0x19uLL) ) { if ( (unsigned int)lex_cmp(v4, (long long)"[first trailing]", 0x10uLL) ) { if ( (unsigned int)lex_cmp(v4, (long long)"[last trailing]", 0xFuLL) ) { if ( (unsigned int)lex_cmp(v4, (long long)"[first variable]", 0x10uLL) ) { if ( (unsigned int)lex_cmp(v4, (long long)"[last variable]", 0xFuLL) ) return 0; *(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 200LL); } else { *(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 192LL); } } else { *(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 184LL); } } else { *(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 176LL); } } else { *(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 168LL); } } else { *(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 160LL); } } else { *(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 152LL); } } else { *(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 144LL); } } else { *(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 136LL); } } else { *(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 128LL); } } else { *(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 120LL); } } else { *(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 112LL); } if ( (unsigned int)my_coll_rule_expand(a2, a3, *(int *)(v4 + 36)) ) return (unsigned int)my_coll_parser_scan(a1); else return (unsigned int)my_coll_parser_too_long_error(a1, "Logical position"); }
my_coll_parser_scan_logical_position: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xf0] MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0014e7e0 MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[0x17ba44] MOV EDX,0x15 CALL 0x0014ef60 CMP EAX,0x0 JNZ 0x0014f4e4 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x70] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x24],ECX JMP 0x0014f754 LAB_0014f4e4: MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[0x17ba5a] MOV EDX,0x14 CALL 0x0014ef60 CMP EAX,0x0 JNZ 0x0014f518 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x78] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x24],ECX JMP 0x0014f752 LAB_0014f518: MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[0x17ba6f] MOV EDX,0x19 CALL 0x0014ef60 CMP EAX,0x0 JNZ 0x0014f54f MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x80] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x24],ECX JMP 0x0014f750 LAB_0014f54f: MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[0x17ba89] MOV EDX,0x18 CALL 0x0014ef60 CMP EAX,0x0 JNZ 0x0014f586 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x88] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x24],ECX JMP 0x0014f74e LAB_0014f586: MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[0x17baa2] MOV EDX,0x1b CALL 0x0014ef60 CMP EAX,0x0 JNZ 0x0014f5bd MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x90] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x24],ECX JMP 0x0014f74c LAB_0014f5bd: MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[0x17babe] MOV EDX,0x1a CALL 0x0014ef60 CMP EAX,0x0 JNZ 0x0014f5f4 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x98] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x24],ECX JMP 0x0014f74a LAB_0014f5f4: MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[0x17bad9] MOV EDX,0x1a CALL 0x0014ef60 CMP EAX,0x0 JNZ 0x0014f62b MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0xa0] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x24],ECX JMP 0x0014f748 LAB_0014f62b: MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[0x17baf4] MOV EDX,0x19 CALL 0x0014ef60 CMP EAX,0x0 JNZ 0x0014f662 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0xa8] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x24],ECX JMP 0x0014f746 LAB_0014f662: MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[0x17bb0e] MOV EDX,0x10 CALL 0x0014ef60 CMP EAX,0x0 JNZ 0x0014f699 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0xb0] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x24],ECX JMP 0x0014f744 LAB_0014f699: MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[0x17bb1f] MOV EDX,0xf CALL 0x0014ef60 CMP EAX,0x0 JNZ 0x0014f6cd MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0xb8] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x24],ECX JMP 0x0014f742 LAB_0014f6cd: MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[0x17bb2f] MOV EDX,0x10 CALL 0x0014ef60 CMP EAX,0x0 JNZ 0x0014f701 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0xc0] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x24],ECX JMP 0x0014f740 LAB_0014f701: MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[0x17bb40] MOV EDX,0xf CALL 0x0014ef60 CMP EAX,0x0 JNZ 0x0014f735 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0xc8] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x24],ECX JMP 0x0014f73e LAB_0014f735: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0014f793 LAB_0014f73e: JMP 0x0014f740 LAB_0014f740: JMP 0x0014f742 LAB_0014f742: JMP 0x0014f744 LAB_0014f744: JMP 0x0014f746 LAB_0014f746: JMP 0x0014f748 LAB_0014f748: JMP 0x0014f74a LAB_0014f74a: JMP 0x0014f74c LAB_0014f74c: JMP 0x0014f74e LAB_0014f74e: JMP 0x0014f750 LAB_0014f750: JMP 0x0014f752 LAB_0014f752: JMP 0x0014f754 LAB_0014f754: MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x30] MOVSXD RDX,dword ptr [RAX + 0x24] CALL 0x0014f8b0 CMP EAX,0x0 JNZ 0x0014f787 JMP 0x0014f770 LAB_0014f770: JMP 0x0014f772 LAB_0014f772: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x17bb50] CALL 0x0014f920 MOV dword ptr [RBP + -0x4],EAX JMP 0x0014f793 LAB_0014f787: MOV RDI,qword ptr [RBP + -0x10] CALL 0x0014efc0 MOV dword ptr [RBP + -0x4],EAX LAB_0014f793: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 my_coll_parser_scan_logical_position(long param_1,int8 param_2,int8 param_3) { long lVar1; int iVar2; long lVar3; int4 local_c; lVar1 = *(long *)(param_1 + 0xf0); lVar3 = my_coll_parser_curr(param_1); iVar2 = lex_cmp(lVar3,"[first non-ignorable]",0x15); if (iVar2 == 0) { *(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0x70); } else { iVar2 = lex_cmp(lVar3,"[last non-ignorable]",0x14); if (iVar2 == 0) { *(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0x78); } else { iVar2 = lex_cmp(lVar3,"[first primary ignorable]",0x19); if (iVar2 == 0) { *(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0x80); } else { iVar2 = lex_cmp(lVar3,"[last primary ignorable]",0x18); if (iVar2 == 0) { *(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0x88); } else { iVar2 = lex_cmp(lVar3,"[first secondary ignorable]",0x1b); if (iVar2 == 0) { *(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0x90); } else { iVar2 = lex_cmp(lVar3,"[last secondary ignorable]",0x1a); if (iVar2 == 0) { *(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0x98); } else { iVar2 = lex_cmp(lVar3,"[first tertiary ignorable]",0x1a); if (iVar2 == 0) { *(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0xa0); } else { iVar2 = lex_cmp(lVar3,"[last tertiary ignorable]",0x19); if (iVar2 == 0) { *(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0xa8); } else { iVar2 = lex_cmp(lVar3,"[first trailing]",0x10); if (iVar2 == 0) { *(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0xb0); } else { iVar2 = lex_cmp(lVar3,"[last trailing]",0xf); if (iVar2 == 0) { *(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0xb8); } else { iVar2 = lex_cmp(lVar3,"[first variable]",0x10); if (iVar2 == 0) { *(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0xc0); } else { iVar2 = lex_cmp(lVar3,"[last variable]",0xf); if (iVar2 != 0) { return 0; } *(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 200); } } } } } } } } } } } iVar2 = my_coll_rule_expand(param_2,param_3,(long)*(int *)(lVar3 + 0x24)); if (iVar2 == 0) { local_c = my_coll_parser_too_long_error(param_1,"Logical position"); } else { local_c = my_coll_parser_scan(param_1); } return local_c; }
16,890
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan_string()
monkey531[P]llama/common/json.hpp
token_type scan_string() { // reset token_buffer (ignore opening quote) reset(); // we entered the function by reading an open quote JSON_ASSERT(current == '\"'); while (true) { // get next character switch (get()) { // end of file while parsing string case char_traits<char_type>::eof(): { error_message = "invalid string: missing closing quote"; return token_type::parse_error; } // closing quote case '\"': { return token_type::value_string; } // escapes case '\\': { switch (get()) { // quotation mark case '\"': add('\"'); break; // reverse solidus case '\\': add('\\'); break; // solidus case '/': add('/'); break; // backspace case 'b': add('\b'); break; // form feed case 'f': add('\f'); break; // line feed case 'n': add('\n'); break; // carriage return case 'r': add('\r'); break; // tab case 't': add('\t'); break; // unicode escapes case 'u': { const int codepoint1 = get_codepoint(); int codepoint = codepoint1; // start with codepoint1 if (JSON_HEDLEY_UNLIKELY(codepoint1 == -1)) { error_message = "invalid string: '\\u' must be followed by 4 hex digits"; return token_type::parse_error; } // check if code point is a high surrogate if (0xD800 <= codepoint1 && codepoint1 <= 0xDBFF) { // expect next \uxxxx entry if (JSON_HEDLEY_LIKELY(get() == '\\' && get() == 'u')) { const int codepoint2 = get_codepoint(); if (JSON_HEDLEY_UNLIKELY(codepoint2 == -1)) { error_message = "invalid string: '\\u' must be followed by 4 hex digits"; return token_type::parse_error; } // check if codepoint2 is a low surrogate if (JSON_HEDLEY_LIKELY(0xDC00 <= codepoint2 && codepoint2 <= 0xDFFF)) { // overwrite codepoint codepoint = static_cast<int>( // high surrogate occupies the most significant 22 bits (static_cast<unsigned int>(codepoint1) << 10u) // low surrogate occupies the least significant 15 bits + static_cast<unsigned int>(codepoint2) // there is still the 0xD800, 0xDC00 and 0x10000 noise // in the result, so we have to subtract with: // (0xD800 << 10) + DC00 - 0x10000 = 0x35FDC00 - 0x35FDC00u); } else { error_message = "invalid string: surrogate U+D800..U+DBFF must be followed by U+DC00..U+DFFF"; return token_type::parse_error; } } else { error_message = "invalid string: surrogate U+D800..U+DBFF must be followed by U+DC00..U+DFFF"; return token_type::parse_error; } } else { if (JSON_HEDLEY_UNLIKELY(0xDC00 <= codepoint1 && codepoint1 <= 0xDFFF)) { error_message = "invalid string: surrogate U+DC00..U+DFFF must follow U+D800..U+DBFF"; return token_type::parse_error; } } // result of the above calculation yields a proper codepoint JSON_ASSERT(0x00 <= codepoint && codepoint <= 0x10FFFF); // translate codepoint into bytes if (codepoint < 0x80) { // 1-byte characters: 0xxxxxxx (ASCII) add(static_cast<char_int_type>(codepoint)); } else if (codepoint <= 0x7FF) { // 2-byte characters: 110xxxxx 10xxxxxx add(static_cast<char_int_type>(0xC0u | (static_cast<unsigned int>(codepoint) >> 6u))); add(static_cast<char_int_type>(0x80u | (static_cast<unsigned int>(codepoint) & 0x3Fu))); } else if (codepoint <= 0xFFFF) { // 3-byte characters: 1110xxxx 10xxxxxx 10xxxxxx add(static_cast<char_int_type>(0xE0u | (static_cast<unsigned int>(codepoint) >> 12u))); add(static_cast<char_int_type>(0x80u | ((static_cast<unsigned int>(codepoint) >> 6u) & 0x3Fu))); add(static_cast<char_int_type>(0x80u | (static_cast<unsigned int>(codepoint) & 0x3Fu))); } else { // 4-byte characters: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx add(static_cast<char_int_type>(0xF0u | (static_cast<unsigned int>(codepoint) >> 18u))); add(static_cast<char_int_type>(0x80u | ((static_cast<unsigned int>(codepoint) >> 12u) & 0x3Fu))); add(static_cast<char_int_type>(0x80u | ((static_cast<unsigned int>(codepoint) >> 6u) & 0x3Fu))); add(static_cast<char_int_type>(0x80u | (static_cast<unsigned int>(codepoint) & 0x3Fu))); } break; } // other characters after escape default: error_message = "invalid string: forbidden character after backslash"; return token_type::parse_error; } break; } // invalid control characters case 0x00: { error_message = "invalid string: control character U+0000 (NUL) must be escaped to \\u0000"; return token_type::parse_error; } case 0x01: { error_message = "invalid string: control character U+0001 (SOH) must be escaped to \\u0001"; return token_type::parse_error; } case 0x02: { error_message = "invalid string: control character U+0002 (STX) must be escaped to \\u0002"; return token_type::parse_error; } case 0x03: { error_message = "invalid string: control character U+0003 (ETX) must be escaped to \\u0003"; return token_type::parse_error; } case 0x04: { error_message = "invalid string: control character U+0004 (EOT) must be escaped to \\u0004"; return token_type::parse_error; } case 0x05: { error_message = "invalid string: control character U+0005 (ENQ) must be escaped to \\u0005"; return token_type::parse_error; } case 0x06: { error_message = "invalid string: control character U+0006 (ACK) must be escaped to \\u0006"; return token_type::parse_error; } case 0x07: { error_message = "invalid string: control character U+0007 (BEL) must be escaped to \\u0007"; return token_type::parse_error; } case 0x08: { error_message = "invalid string: control character U+0008 (BS) must be escaped to \\u0008 or \\b"; return token_type::parse_error; } case 0x09: { error_message = "invalid string: control character U+0009 (HT) must be escaped to \\u0009 or \\t"; return token_type::parse_error; } case 0x0A: { error_message = "invalid string: control character U+000A (LF) must be escaped to \\u000A or \\n"; return token_type::parse_error; } case 0x0B: { error_message = "invalid string: control character U+000B (VT) must be escaped to \\u000B"; return token_type::parse_error; } case 0x0C: { error_message = "invalid string: control character U+000C (FF) must be escaped to \\u000C or \\f"; return token_type::parse_error; } case 0x0D: { error_message = "invalid string: control character U+000D (CR) must be escaped to \\u000D or \\r"; return token_type::parse_error; } case 0x0E: { error_message = "invalid string: control character U+000E (SO) must be escaped to \\u000E"; return token_type::parse_error; } case 0x0F: { error_message = "invalid string: control character U+000F (SI) must be escaped to \\u000F"; return token_type::parse_error; } case 0x10: { error_message = "invalid string: control character U+0010 (DLE) must be escaped to \\u0010"; return token_type::parse_error; } case 0x11: { error_message = "invalid string: control character U+0011 (DC1) must be escaped to \\u0011"; return token_type::parse_error; } case 0x12: { error_message = "invalid string: control character U+0012 (DC2) must be escaped to \\u0012"; return token_type::parse_error; } case 0x13: { error_message = "invalid string: control character U+0013 (DC3) must be escaped to \\u0013"; return token_type::parse_error; } case 0x14: { error_message = "invalid string: control character U+0014 (DC4) must be escaped to \\u0014"; return token_type::parse_error; } case 0x15: { error_message = "invalid string: control character U+0015 (NAK) must be escaped to \\u0015"; return token_type::parse_error; } case 0x16: { error_message = "invalid string: control character U+0016 (SYN) must be escaped to \\u0016"; return token_type::parse_error; } case 0x17: { error_message = "invalid string: control character U+0017 (ETB) must be escaped to \\u0017"; return token_type::parse_error; } case 0x18: { error_message = "invalid string: control character U+0018 (CAN) must be escaped to \\u0018"; return token_type::parse_error; } case 0x19: { error_message = "invalid string: control character U+0019 (EM) must be escaped to \\u0019"; return token_type::parse_error; } case 0x1A: { error_message = "invalid string: control character U+001A (SUB) must be escaped to \\u001A"; return token_type::parse_error; } case 0x1B: { error_message = "invalid string: control character U+001B (ESC) must be escaped to \\u001B"; return token_type::parse_error; } case 0x1C: { error_message = "invalid string: control character U+001C (FS) must be escaped to \\u001C"; return token_type::parse_error; } case 0x1D: { error_message = "invalid string: control character U+001D (GS) must be escaped to \\u001D"; return token_type::parse_error; } case 0x1E: { error_message = "invalid string: control character U+001E (RS) must be escaped to \\u001E"; return token_type::parse_error; } case 0x1F: { error_message = "invalid string: control character U+001F (US) must be escaped to \\u001F"; return token_type::parse_error; } // U+0020..U+007F (except U+0022 (quote) and U+005C (backspace)) case 0x20: case 0x21: case 0x23: case 0x24: case 0x25: case 0x26: case 0x27: case 0x28: case 0x29: case 0x2A: case 0x2B: case 0x2C: case 0x2D: case 0x2E: case 0x2F: case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: case 0x3A: case 0x3B: case 0x3C: case 0x3D: case 0x3E: case 0x3F: case 0x40: case 0x41: case 0x42: case 0x43: case 0x44: case 0x45: case 0x46: case 0x47: case 0x48: case 0x49: case 0x4A: case 0x4B: case 0x4C: case 0x4D: case 0x4E: case 0x4F: case 0x50: case 0x51: case 0x52: case 0x53: case 0x54: case 0x55: case 0x56: case 0x57: case 0x58: case 0x59: case 0x5A: case 0x5B: case 0x5D: case 0x5E: case 0x5F: case 0x60: case 0x61: case 0x62: case 0x63: case 0x64: case 0x65: case 0x66: case 0x67: case 0x68: case 0x69: case 0x6A: case 0x6B: case 0x6C: case 0x6D: case 0x6E: case 0x6F: case 0x70: case 0x71: case 0x72: case 0x73: case 0x74: case 0x75: case 0x76: case 0x77: case 0x78: case 0x79: case 0x7A: case 0x7B: case 0x7C: case 0x7D: case 0x7E: case 0x7F: { add(current); break; } // U+0080..U+07FF: bytes C2..DF 80..BF case 0xC2: case 0xC3: case 0xC4: case 0xC5: case 0xC6: case 0xC7: case 0xC8: case 0xC9: case 0xCA: case 0xCB: case 0xCC: case 0xCD: case 0xCE: case 0xCF: case 0xD0: case 0xD1: case 0xD2: case 0xD3: case 0xD4: case 0xD5: case 0xD6: case 0xD7: case 0xD8: case 0xD9: case 0xDA: case 0xDB: case 0xDC: case 0xDD: case 0xDE: case 0xDF: { if (JSON_HEDLEY_UNLIKELY(!next_byte_in_range({0x80, 0xBF}))) { return token_type::parse_error; } break; } // U+0800..U+0FFF: bytes E0 A0..BF 80..BF case 0xE0: { if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0xA0, 0xBF, 0x80, 0xBF})))) { return token_type::parse_error; } break; } // U+1000..U+CFFF: bytes E1..EC 80..BF 80..BF // U+E000..U+FFFF: bytes EE..EF 80..BF 80..BF case 0xE1: case 0xE2: case 0xE3: case 0xE4: case 0xE5: case 0xE6: case 0xE7: case 0xE8: case 0xE9: case 0xEA: case 0xEB: case 0xEC: case 0xEE: case 0xEF: { if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x80, 0xBF, 0x80, 0xBF})))) { return token_type::parse_error; } break; } // U+D000..U+D7FF: bytes ED 80..9F 80..BF case 0xED: { if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x80, 0x9F, 0x80, 0xBF})))) { return token_type::parse_error; } break; } // U+10000..U+3FFFF F0 90..BF 80..BF 80..BF case 0xF0: { if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x90, 0xBF, 0x80, 0xBF, 0x80, 0xBF})))) { return token_type::parse_error; } break; } // U+40000..U+FFFFF F1..F3 80..BF 80..BF 80..BF case 0xF1: case 0xF2: case 0xF3: { if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x80, 0xBF, 0x80, 0xBF, 0x80, 0xBF})))) { return token_type::parse_error; } break; } // U+100000..U+10FFFF F4 80..8F 80..BF 80..BF case 0xF4: { if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x80, 0x8F, 0x80, 0xBF, 0x80, 0xBF})))) { return token_type::parse_error; } break; } // remaining bytes (80..C1 and F5..FF) are ill-formed default: { error_message = "invalid string: ill-formed UTF-8 byte"; return token_type::parse_error; } } } }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan_string(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx callq 0x3ef66 cmpl $0x22, 0x14(%rbx) jne 0x3e9bc leaq 0x50(%rbx), %r14 leaq 0x6de13(%rip), %r12 # 0xac3d8 pushq $0xe popq %rbp movq %rbx, %rdi callq 0x3ed24 incl %eax cmpl $0xf5, %eax ja 0x3e98e movslq (%r12,%rax,4), %rcx addq %r12, %rcx movabsq $0xbf00000080, %rax # imm = 0xBF00000080 jmpq *%rcx movb 0x14(%rbx), %r15b movsbl %r15b, %esi movq %r14, %rdi callq 0x24750 jmp 0x3e5c8 movq %rsp, %rsi movq %rax, (%rsi) pushq $0x2 jmp 0x3e69a movaps 0x6dcea(%rip), %xmm0 # 0xac300 movq %rsp, %rsi movaps %xmm0, (%rsi) pushq $0x4 jmp 0x3e69a movups 0x75609(%rip), %xmm0 # 0xb3c30 jmp 0x3e68e movaps 0x6dcc0(%rip), %xmm0 # 0xac2f0 jmp 0x3e616 movq %rbx, %rdi callq 0x3ed24 leaq 0x73941(%rip), %r13 # 0xb1f82 leal -0x6e(%rax), %ecx cmpl $0x7, %ecx jbe 0x3e6bc cmpl $0x22, %eax je 0x3e7b5 cmpl $0x2f, %eax je 0x3e7c5 cmpl $0x66, %eax je 0x3e7bd cmpl $0x62, %eax je 0x3e7cd cmpl $0x5c, %eax jne 0x3e995 movb $0x5c, %r15b jmp 0x3e5f4 movups 0x755c3(%rip), %xmm0 # 0xb3c48 jmp 0x3e68e movups 0x7558a(%rip), %xmm0 # 0xb3c18 movq %rsp, %rsi movaps %xmm0, (%rsi) movq %rax, 0x10(%rsi) pushq $0x6 popq %rdx movq %rbx, %rdi callq 0x3f068 testb %al, %al jne 0x3e5c8 jmp 0x3e999 movaps 0x6dc59(%rip), %xmm0 # 0xac310 jmp 0x3e616 leaq 0x6e0ed(%rip), %rax # 0xac7b0 movslq (%rax,%rcx,4), %rcx addq %rax, %rcx jmpq *%rcx movb $0xa, %r15b jmp 0x3e5f4 movb $0xd, %r15b jmp 0x3e5f4 movq %rbx, %rdi callq 0x3efa2 leaq 0x737a6(%rip), %r13 # 0xb1e91 cmpl $-0x1, %eax je 0x3e995 movl %eax, %r15d andl $0xfffffc00, %eax # imm = 0xFFFFFC00 cmpl $0xd800, %eax # imm = 0xD800 jne 0x3e7d5 movq %rbx, %rdi callq 0x3ed24 cmpl $0x5c, %eax jne 0x3e9aa movq %rbx, %rdi callq 0x3ed24 cmpl $0x75, %eax jne 0x3e9aa movq %rbx, %rdi callq 0x3efa2 cmpl $-0x1, %eax je 0x3e995 movl %eax, %ecx andl $0xfffffc00, %ecx # imm = 0xFFFFFC00 leaq 0x7377e(%rip), %r13 # 0xb1ec7 cmpl $0xdc00, %ecx # imm = 0xDC00 jne 0x3e995 shll $0xa, %r15d addl %eax, %r15d addl $0xfca02400, %r15d # imm = 0xFCA02400 movl %r15d, %eax shrl $0x12, %eax orb $-0x10, %al movsbl %al, %esi movq %r14, %rdi callq 0x24750 movl %r15d, %eax shrl $0xc, %eax andb $0x3f, %al orb $-0x80, %al movsbl %al, %esi movq %r14, %rdi callq 0x24750 movl %r15d, %eax shrl $0x6, %eax andb $0x3f, %al orb $-0x80, %al movsbl %al, %esi movq %r14, %rdi callq 0x24750 andb $0x3f, %r15b orb $-0x80, %r15b jmp 0x3e5f4 movb $0x9, %r15b jmp 0x3e5f4 movb $0x22, %r15b jmp 0x3e5f4 movb $0xc, %r15b jmp 0x3e5f4 movb $0x2f, %r15b jmp 0x3e5f4 movb $0x8, %r15b jmp 0x3e5f4 cmpl $0xdc00, %eax # imm = 0xDC00 je 0x3e9b3 cmpl $0x110000, %r15d # imm = 0x110000 jae 0x3e9dd cmpl $0x7f, %r15d jbe 0x3e5f4 cmpl $0x7ff, %r15d # imm = 0x7FF ja 0x3e80a movl %r15d, %eax shrl $0x6, %eax orb $-0x40, %al jmp 0x3e795 cmpl $0xffff, %r15d # imm = 0xFFFF ja 0x3e763 movl %r15d, %eax shrl $0xc, %eax orb $-0x20, %al jmp 0x3e780 leaq 0x7402c(%rip), %r13 # 0xb2857 jmp 0x3e995 leaq 0x73eb6(%rip), %r13 # 0xb26ed jmp 0x3e995 leaq 0x73cf4(%rip), %r13 # 0xb2537 jmp 0x3e995 leaq 0x73ae1(%rip), %r13 # 0xb2330 jmp 0x3e995 leaq 0x73d25(%rip), %r13 # 0xb2580 jmp 0x3e995 leaq 0x73b17(%rip), %r13 # 0xb237e jmp 0x3e995 leaq 0x73de8(%rip), %r13 # 0xb265b jmp 0x3e995 leaq 0x73f90(%rip), %r13 # 0xb280f jmp 0x3e995 leaq 0x73898(%rip), %r13 # 0xb2123 jmp 0x3e995 leaq 0x73c57(%rip), %r13 # 0xb24ee jmp 0x3e995 leaq 0x73e01(%rip), %r13 # 0xb26a4 jmp 0x3e995 leaq 0x7382b(%rip), %r13 # 0xb20da jmp 0x3e995 leaq 0x737d6(%rip), %r13 # 0xb2091 jmp 0x3e995 leaq 0x739d3(%rip), %r13 # 0xb229a jmp 0x3e995 leaq 0x73899(%rip), %r13 # 0xb216c jmp 0x3e995 leaq 0x73e9f(%rip), %r13 # 0xb277e jmp 0x3e995 leaq 0x7375d(%rip), %r13 # 0xb2048 jmp 0x3e995 leaq 0x73574(%rip), %r13 # 0xb1e6b jmp 0x3e995 leaq 0x73b59(%rip), %r13 # 0xb245c jmp 0x3e995 leaq 0x736f0(%rip), %r13 # 0xb1fff jmp 0x3e995 leaq 0x7369b(%rip), %r13 # 0xb1fb6 jmp 0x3e995 leaq 0x73b81(%rip), %r13 # 0xb24a5 jmp 0x3e995 leaq 0x7391f(%rip), %r13 # 0xb224c jmp 0x3e995 leaq 0x73f69(%rip), %r13 # 0xb289f jmp 0x3e995 leaq 0x73876(%rip), %r13 # 0xb21b5 jmp 0x3e995 leaq 0x73cca(%rip), %r13 # 0xb2612 jmp 0x3e995 leaq 0x73997(%rip), %r13 # 0xb22e8 jmp 0x3e995 leaq 0x73a72(%rip), %r13 # 0xb23cc jmp 0x3e995 leaq 0x7389b(%rip), %r13 # 0xb21fe jmp 0x3e995 leaq 0x73c5d(%rip), %r13 # 0xb25c9 jmp 0x3e995 leaq 0x73dc0(%rip), %r13 # 0xb2735 jmp 0x3e995 leaq 0x73a96(%rip), %r13 # 0xb2414 jmp 0x3e995 leaq 0x73e40(%rip), %r13 # 0xb27c7 jmp 0x3e995 pushq $0x4 popq %rbp jmp 0x3e999 leaq 0x73f52(%rip), %r13 # 0xb28e7 movq %r13, 0x70(%rbx) movl %ebp, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x73516(%rip), %r13 # 0xb1ec7 jmp 0x3e995 leaq 0x73559(%rip), %r13 # 0xb1f13 jmp 0x3e995 leaq 0x73223(%rip), %rdi # 0xb1be6 leaq 0x6d776(%rip), %rdx # 0xac140 leaq 0x7348a(%rip), %rcx # 0xb1e5b movl $0x1dd1, %esi # imm = 0x1DD1 xorl %eax, %eax callq 0x24e90 leaq 0x73202(%rip), %rdi # 0xb1be6 leaq 0x6d755(%rip), %rdx # 0xac140 leaq 0x73565(%rip), %rcx # 0xb1f57 movl $0x1e49, %esi # imm = 0x1E49 jmp 0x3e9d6 nop
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE11scan_stringEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rdi call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5resetEv; 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>>>::reset(void) cmp dword ptr [rbx+14h], 22h ; '"' jnz loc_3E9BC lea r14, [rbx+50h] lea r12, jpt_3E5EE push 0Eh pop rbp loc_3E5C8: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) inc eax; switch 246 cases cmp eax, 0F5h ja def_3E5EE; jumptable 000000000003E5EE default case, cases 128-193 movsxd rcx, ds:(jpt_3E5EE - 0AC3D8h)[r12+rax*4] add rcx, r12 mov rax, 0BF00000080h jmp rcx; switch jump loc_3E5F0: mov r15b, [rbx+14h]; jumptable 000000000003E5EE cases 32,33,35-91,93-127 loc_3E5F4: movsx esi, r15b mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) jmp short loc_3E5C8 loc_3E602: mov rsi, rsp; jumptable 000000000003E5EE cases 194-223 mov [rsi], rax push 2 jmp loc_3E69A loc_3E60F: movaps xmm0, cs:xmmword_AC300; jumptable 000000000003E5EE cases 225-236,238,239 loc_3E616: mov rsi, rsp movaps xmmword ptr [rsi], xmm0 push 4 jmp short loc_3E69A loc_3E620: movups xmm0, cs:xmmword_B3C30; jumptable 000000000003E5EE cases 241-243 jmp short loc_3E68E loc_3E629: movaps xmm0, cs:xmmword_AC2F0; jumptable 000000000003E5EE case 237 jmp short loc_3E616 loc_3E632: mov rdi, rbx; jumptable 000000000003E5EE case 92 call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) lea r13, aInvalidStringF; "invalid string: forbidden character aft"... lea ecx, [rax-6Eh]; switch 8 cases cmp ecx, 7 jbe short loc_3E6BC def_3E6CA: cmp eax, 22h ; '"'; jumptable 000000000003E6CA default case jz loc_3E7B5 cmp eax, 2Fh ; '/' jz loc_3E7C5 cmp eax, 66h ; 'f' jz loc_3E7BD cmp eax, 62h ; 'b' jz loc_3E7CD cmp eax, 5Ch ; '\' jnz loc_3E995; jumptable 000000000003E6CA cases 111-113,115 mov r15b, 5Ch ; '\' jmp loc_3E5F4 loc_3E67E: movups xmm0, cs:xmmword_B3C48; jumptable 000000000003E5EE case 244 jmp short loc_3E68E loc_3E687: movups xmm0, cs:xmmword_B3C18; jumptable 000000000003E5EE case 240 loc_3E68E: mov rsi, rsp movaps xmmword ptr [rsi], xmm0 mov [rsi+10h], rax push 6 loc_3E69A: pop rdx mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE18next_byte_in_rangeESt16initializer_listIiE; 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>>>::next_byte_in_range(std::initializer_list<int>) test al, al jnz loc_3E5C8 jmp loc_3E999 loc_3E6B0: movaps xmm0, cs:xmmword_AC310; jumptable 000000000003E5EE case 224 jmp loc_3E616 loc_3E6BC: lea rax, jpt_3E6CA movsxd rcx, ds:(jpt_3E6CA - 0AC7B0h)[rax+rcx*4] add rcx, rax jmp rcx; switch jump loc_3E6CC: mov r15b, 0Ah; jumptable 000000000003E6CA case 110 jmp loc_3E5F4 loc_3E6D4: mov r15b, 0Dh; jumptable 000000000003E6CA case 114 jmp loc_3E5F4 loc_3E6DC: mov rdi, rbx; jumptable 000000000003E6CA case 117 call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE13get_codepointEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_codepoint(void) lea r13, aInvalidStringU; "invalid string: '\\u' must be followed "... cmp eax, 0FFFFFFFFh jz loc_3E995; jumptable 000000000003E6CA cases 111-113,115 mov r15d, eax and eax, 0FFFFFC00h cmp eax, 0D800h jnz loc_3E7D5 mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) cmp eax, 5Ch ; '\' jnz loc_3E9AA mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) cmp eax, 75h ; 'u' jnz loc_3E9AA mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE13get_codepointEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_codepoint(void) cmp eax, 0FFFFFFFFh jz loc_3E995; jumptable 000000000003E6CA cases 111-113,115 mov ecx, eax and ecx, 0FFFFFC00h lea r13, aInvalidStringS; "invalid string: surrogate U+D800..U+DBF"... cmp ecx, 0DC00h jnz loc_3E995; jumptable 000000000003E6CA cases 111-113,115 shl r15d, 0Ah add r15d, eax add r15d, 0FCA02400h loc_3E763: mov eax, r15d shr eax, 12h or al, 0F0h movsx esi, al mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov eax, r15d shr eax, 0Ch and al, 3Fh or al, 80h loc_3E780: movsx esi, al mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov eax, r15d shr eax, 6 and al, 3Fh or al, 80h loc_3E795: movsx esi, al mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) and r15b, 3Fh or r15b, 80h jmp loc_3E5F4 loc_3E7AD: mov r15b, 9; jumptable 000000000003E6CA case 116 jmp loc_3E5F4 loc_3E7B5: mov r15b, 22h ; '"' jmp loc_3E5F4 loc_3E7BD: mov r15b, 0Ch jmp loc_3E5F4 loc_3E7C5: mov r15b, 2Fh ; '/' jmp loc_3E5F4 loc_3E7CD: mov r15b, 8 jmp loc_3E5F4 loc_3E7D5: cmp eax, 0DC00h jz loc_3E9B3 cmp r15d, 110000h jnb loc_3E9DD cmp r15d, 7Fh jbe loc_3E5F4 cmp r15d, 7FFh ja short loc_3E80A mov eax, r15d shr eax, 6 or al, 0C0h jmp short loc_3E795 loc_3E80A: cmp r15d, 0FFFFh ja loc_3E763 mov eax, r15d shr eax, 0Ch or al, 0E0h jmp loc_3E780 loc_3E824: lea r13, aInvalidStringC; jumptable 000000000003E5EE case 30 jmp loc_3E995; jumptable 000000000003E6CA cases 111-113,115 loc_3E830: lea r13, aInvalidStringC_0; jumptable 000000000003E5EE case 25 jmp loc_3E995; jumptable 000000000003E6CA cases 111-113,115 loc_3E83C: lea r13, aInvalidStringC_1; jumptable 000000000003E5EE case 19 jmp loc_3E995; jumptable 000000000003E6CA cases 111-113,115 loc_3E848: lea r13, aInvalidStringC_2; jumptable 000000000003E5EE case 12 jmp loc_3E995; jumptable 000000000003E6CA cases 111-113,115 loc_3E854: lea r13, aInvalidStringC_3; jumptable 000000000003E5EE case 20 jmp loc_3E995; jumptable 000000000003E6CA cases 111-113,115 loc_3E860: lea r13, aInvalidStringC_4; jumptable 000000000003E5EE case 13 jmp loc_3E995; jumptable 000000000003E6CA cases 111-113,115 loc_3E86C: lea r13, aInvalidStringC_5; jumptable 000000000003E5EE case 23 jmp loc_3E995; jumptable 000000000003E6CA cases 111-113,115 loc_3E878: lea r13, aInvalidStringC_6; jumptable 000000000003E5EE case 29 jmp loc_3E995; jumptable 000000000003E6CA cases 111-113,115 loc_3E884: lea r13, aInvalidStringC_7; jumptable 000000000003E5EE case 5 jmp loc_3E995; jumptable 000000000003E6CA cases 111-113,115 loc_3E890: lea r13, aInvalidStringC_8; jumptable 000000000003E5EE case 18 jmp loc_3E995; jumptable 000000000003E6CA cases 111-113,115 loc_3E89C: lea r13, aInvalidStringC_9; jumptable 000000000003E5EE case 24 jmp loc_3E995; jumptable 000000000003E6CA cases 111-113,115 loc_3E8A8: lea r13, aInvalidStringC_10; jumptable 000000000003E5EE case 4 jmp loc_3E995; jumptable 000000000003E6CA cases 111-113,115 loc_3E8B4: lea r13, aInvalidStringC_11; jumptable 000000000003E5EE case 3 jmp loc_3E995; jumptable 000000000003E6CA cases 111-113,115 loc_3E8C0: lea r13, aInvalidStringC_12; jumptable 000000000003E5EE case 10 jmp loc_3E995; jumptable 000000000003E6CA cases 111-113,115 loc_3E8CC: lea r13, aInvalidStringC_13; jumptable 000000000003E5EE case 6 jmp loc_3E995; jumptable 000000000003E6CA cases 111-113,115 loc_3E8D8: lea r13, aInvalidStringC_14; jumptable 000000000003E5EE case 27 jmp loc_3E995; jumptable 000000000003E6CA cases 111-113,115 loc_3E8E4: lea r13, aInvalidStringC_15; jumptable 000000000003E5EE case 2 jmp loc_3E995; jumptable 000000000003E6CA cases 111-113,115 loc_3E8F0: lea r13, aInvalidStringM; jumptable 000000000003E5EE case -1 jmp loc_3E995; jumptable 000000000003E6CA cases 111-113,115 loc_3E8FC: lea r13, aInvalidStringC_16; jumptable 000000000003E5EE case 16 jmp loc_3E995; jumptable 000000000003E6CA cases 111-113,115 loc_3E908: lea r13, aInvalidStringC_17; jumptable 000000000003E5EE case 1 jmp loc_3E995; jumptable 000000000003E6CA cases 111-113,115 loc_3E914: lea r13, aInvalidStringC_18; jumptable 000000000003E5EE case 0 jmp short loc_3E995; jumptable 000000000003E6CA cases 111-113,115 loc_3E91D: lea r13, aInvalidStringC_19; jumptable 000000000003E5EE case 17 jmp short loc_3E995; jumptable 000000000003E6CA cases 111-113,115 loc_3E926: lea r13, aInvalidStringC_20; jumptable 000000000003E5EE case 9 jmp short loc_3E995; jumptable 000000000003E6CA cases 111-113,115 loc_3E92F: lea r13, aInvalidStringC_21; jumptable 000000000003E5EE case 31 jmp short loc_3E995; jumptable 000000000003E6CA cases 111-113,115 loc_3E938: lea r13, aInvalidStringC_22; jumptable 000000000003E5EE case 7 jmp short loc_3E995; jumptable 000000000003E6CA cases 111-113,115 loc_3E941: lea r13, aInvalidStringC_23; jumptable 000000000003E5EE case 22 jmp short loc_3E995; jumptable 000000000003E6CA cases 111-113,115 loc_3E94A: lea r13, aInvalidStringC_24; jumptable 000000000003E5EE case 11 jmp short loc_3E995; jumptable 000000000003E6CA cases 111-113,115 loc_3E953: lea r13, aInvalidStringC_25; jumptable 000000000003E5EE case 14 jmp short loc_3E995; jumptable 000000000003E6CA cases 111-113,115 loc_3E95C: lea r13, aInvalidStringC_26; jumptable 000000000003E5EE case 8 jmp short loc_3E995; jumptable 000000000003E6CA cases 111-113,115 loc_3E965: lea r13, aInvalidStringC_27; jumptable 000000000003E5EE case 21 jmp short loc_3E995; jumptable 000000000003E6CA cases 111-113,115 loc_3E96E: lea r13, aInvalidStringC_28; jumptable 000000000003E5EE case 26 jmp short loc_3E995; jumptable 000000000003E6CA cases 111-113,115 loc_3E977: lea r13, aInvalidStringC_29; jumptable 000000000003E5EE case 15 jmp short loc_3E995; jumptable 000000000003E6CA cases 111-113,115 loc_3E980: lea r13, aInvalidStringC_30; jumptable 000000000003E5EE case 28 jmp short loc_3E995; jumptable 000000000003E6CA cases 111-113,115 loc_3E989: push 4; jumptable 000000000003E5EE case 34 pop rbp jmp short loc_3E999 def_3E5EE: lea r13, aInvalidStringI; jumptable 000000000003E5EE default case, cases 128-193 loc_3E995: mov [rbx+70h], r13; jumptable 000000000003E6CA cases 111-113,115 loc_3E999: mov eax, ebp add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3E9AA: lea r13, aInvalidStringS; "invalid string: surrogate U+D800..U+DBF"... jmp short loc_3E995; jumptable 000000000003E6CA cases 111-113,115 loc_3E9B3: lea r13, aInvalidStringS_0; "invalid string: surrogate U+DC00..U+DFF"... jmp short loc_3E995; jumptable 000000000003E6CA cases 111-113,115 loc_3E9BC: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCurrent; "current == '\\\"'" mov esi, 1DD1h loc_3E9D6: xor eax, eax call _ggml_abort loc_3E9DD: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, a0x00CodepointC; "0x00 <= codepoint && codepoint <= 0x10F"... mov esi, 1E49h jmp short loc_3E9D6
long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_string( long long a1) { unsigned int v1; // ebp long long v2; // rcx long long v3; // r8 long long v4; // r9 unsigned int v5; // r15d char byte_in_range; // al __int128 v7; // xmm0 __int128 v8; // xmm0 int v9; // eax const char *v10; // r13 unsigned int codepoint; // eax unsigned int v12; // eax int v13; // eax char v14; // al char v15; // al _QWORD v17[2]; // [rsp+0h] [rbp-48h] BYREF long long v18; // [rsp+10h] [rbp-38h] 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>>>::reset(); if ( *(_DWORD *)(a1 + 20) != 34 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 7633LL, "GGML_ASSERT(%s) failed", "current == '\\\"'"); while ( 1 ) LABEL_89: ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 7753LL, "GGML_ASSERT(%s) failed", "0x00 <= codepoint && codepoint <= 0x10FFFF"); } v1 = 14; while ( 2 ) { while ( 2 ) { switch ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) ) { case 0xFFFFFFFF: v10 = "invalid string: missing closing quote"; goto LABEL_84; case 0u: v10 = "invalid string: control character U+0000 (NUL) must be escaped to \\u0000"; goto LABEL_84; case 1u: v10 = "invalid string: control character U+0001 (SOH) must be escaped to \\u0001"; goto LABEL_84; case 2u: v10 = "invalid string: control character U+0002 (STX) must be escaped to \\u0002"; goto LABEL_84; case 3u: v10 = "invalid string: control character U+0003 (ETX) must be escaped to \\u0003"; goto LABEL_84; case 4u: v10 = "invalid string: control character U+0004 (EOT) must be escaped to \\u0004"; goto LABEL_84; case 5u: v10 = "invalid string: control character U+0005 (ENQ) must be escaped to \\u0005"; goto LABEL_84; case 6u: v10 = "invalid string: control character U+0006 (ACK) must be escaped to \\u0006"; goto LABEL_84; case 7u: v10 = "invalid string: control character U+0007 (BEL) must be escaped to \\u0007"; goto LABEL_84; case 8u: v10 = "invalid string: control character U+0008 (BS) must be escaped to \\u0008 or \\b"; goto LABEL_84; case 9u: v10 = "invalid string: control character U+0009 (HT) must be escaped to \\u0009 or \\t"; goto LABEL_84; case 0xAu: v10 = "invalid string: control character U+000A (LF) must be escaped to \\u000A or \\n"; goto LABEL_84; case 0xBu: v10 = "invalid string: control character U+000B (VT) must be escaped to \\u000B"; goto LABEL_84; case 0xCu: v10 = "invalid string: control character U+000C (FF) must be escaped to \\u000C or \\f"; goto LABEL_84; case 0xDu: v10 = "invalid string: control character U+000D (CR) must be escaped to \\u000D or \\r"; goto LABEL_84; case 0xEu: v10 = "invalid string: control character U+000E (SO) must be escaped to \\u000E"; goto LABEL_84; case 0xFu: v10 = "invalid string: control character U+000F (SI) must be escaped to \\u000F"; goto LABEL_84; case 0x10u: v10 = "invalid string: control character U+0010 (DLE) must be escaped to \\u0010"; goto LABEL_84; case 0x11u: v10 = "invalid string: control character U+0011 (DC1) must be escaped to \\u0011"; goto LABEL_84; case 0x12u: v10 = "invalid string: control character U+0012 (DC2) must be escaped to \\u0012"; goto LABEL_84; case 0x13u: v10 = "invalid string: control character U+0013 (DC3) must be escaped to \\u0013"; goto LABEL_84; case 0x14u: v10 = "invalid string: control character U+0014 (DC4) must be escaped to \\u0014"; goto LABEL_84; case 0x15u: v10 = "invalid string: control character U+0015 (NAK) must be escaped to \\u0015"; goto LABEL_84; case 0x16u: v10 = "invalid string: control character U+0016 (SYN) must be escaped to \\u0016"; goto LABEL_84; case 0x17u: v10 = "invalid string: control character U+0017 (ETB) must be escaped to \\u0017"; goto LABEL_84; case 0x18u: v10 = "invalid string: control character U+0018 (CAN) must be escaped to \\u0018"; goto LABEL_84; case 0x19u: v10 = "invalid string: control character U+0019 (EM) must be escaped to \\u0019"; goto LABEL_84; case 0x1Au: v10 = "invalid string: control character U+001A (SUB) must be escaped to \\u001A"; goto LABEL_84; case 0x1Bu: v10 = "invalid string: control character U+001B (ESC) must be escaped to \\u001B"; goto LABEL_84; case 0x1Cu: v10 = "invalid string: control character U+001C (FS) must be escaped to \\u001C"; goto LABEL_84; case 0x1Du: v10 = "invalid string: control character U+001D (GS) must be escaped to \\u001D"; goto LABEL_84; case 0x1Eu: v10 = "invalid string: control character U+001E (RS) must be escaped to \\u001E"; goto LABEL_84; case 0x1Fu: v10 = "invalid string: control character U+001F (US) must be escaped to \\u001F"; goto LABEL_84; case 0x20u: case 0x21u: case 0x23u: case 0x24u: case 0x25u: case 0x26u: case 0x27u: case 0x28u: case 0x29u: case 0x2Au: case 0x2Bu: case 0x2Cu: case 0x2Du: case 0x2Eu: case 0x2Fu: case 0x30u: case 0x31u: case 0x32u: case 0x33u: case 0x34u: case 0x35u: case 0x36u: case 0x37u: case 0x38u: case 0x39u: case 0x3Au: case 0x3Bu: case 0x3Cu: case 0x3Du: case 0x3Eu: case 0x3Fu: case 0x40u: case 0x41u: case 0x42u: case 0x43u: case 0x44u: case 0x45u: case 0x46u: case 0x47u: case 0x48u: case 0x49u: case 0x4Au: case 0x4Bu: case 0x4Cu: case 0x4Du: case 0x4Eu: case 0x4Fu: case 0x50u: case 0x51u: case 0x52u: case 0x53u: case 0x54u: case 0x55u: case 0x56u: case 0x57u: case 0x58u: case 0x59u: case 0x5Au: case 0x5Bu: case 0x5Du: case 0x5Eu: case 0x5Fu: case 0x60u: case 0x61u: case 0x62u: case 0x63u: case 0x64u: case 0x65u: case 0x66u: case 0x67u: case 0x68u: case 0x69u: case 0x6Au: case 0x6Bu: case 0x6Cu: case 0x6Du: case 0x6Eu: case 0x6Fu: case 0x70u: case 0x71u: case 0x72u: case 0x73u: case 0x74u: case 0x75u: case 0x76u: case 0x77u: case 0x78u: case 0x79u: case 0x7Au: case 0x7Bu: case 0x7Cu: case 0x7Du: case 0x7Eu: case 0x7Fu: LOBYTE(v5) = *(_BYTE *)(a1 + 20); goto LABEL_5; case 0x22u: return 4; case 0x5Cu: v9 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1); v10 = "invalid string: forbidden character after backslash"; break; case 0xC2u: case 0xC3u: case 0xC4u: case 0xC5u: case 0xC6u: case 0xC7u: case 0xC8u: case 0xC9u: case 0xCAu: case 0xCBu: case 0xCCu: case 0xCDu: case 0xCEu: case 0xCFu: case 0xD0u: case 0xD1u: case 0xD2u: case 0xD3u: case 0xD4u: case 0xD5u: case 0xD6u: case 0xD7u: case 0xD8u: case 0xD9u: case 0xDAu: case 0xDBu: case 0xDCu: case 0xDDu: case 0xDEu: case 0xDFu: byte_in_range = 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>>>::next_byte_in_range( a1, v17, 2LL, v2, v3, v4, 0xBF00000080LL, v17[1], v18); goto LABEL_21; case 0xE0u: v7 = xmmword_AC310; goto LABEL_8; case 0xE1u: case 0xE2u: case 0xE3u: case 0xE4u: case 0xE5u: case 0xE6u: case 0xE7u: case 0xE8u: case 0xE9u: case 0xEAu: case 0xEBu: case 0xECu: case 0xEEu: case 0xEFu: v7 = xmmword_AC300; goto LABEL_8; case 0xEDu: v7 = xmmword_AC2F0; LABEL_8: byte_in_range = 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>>>::next_byte_in_range( a1, v17, 4LL, v2, v3, v4, v7, *((_QWORD *)&v7 + 1), v18); goto LABEL_21; case 0xF0u: v8 = xmmword_B3C18; goto LABEL_20; case 0xF1u: case 0xF2u: case 0xF3u: v8 = xmmword_B3C30; goto LABEL_20; case 0xF4u: v8 = xmmword_B3C48; LABEL_20: byte_in_range = 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>>>::next_byte_in_range( a1, v17, 6LL, v2, v3, v4, v8, *((_QWORD *)&v8 + 1), 0xBF00000080LL); LABEL_21: if ( !byte_in_range ) return v1; continue; default: v10 = "invalid string: ill-formed UTF-8 byte"; goto LABEL_84; } break; } switch ( v9 ) { case 'n': LOBYTE(v5) = 10; goto LABEL_5; case 'o': case 'p': case 'q': case 's': goto LABEL_84; case 'r': LOBYTE(v5) = 13; goto LABEL_5; case 't': LOBYTE(v5) = 9; goto LABEL_5; case 'u': codepoint = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_codepoint(a1); v10 = "invalid string: '\\u' must be followed by 4 hex digits"; if ( codepoint == -1 ) goto LABEL_84; v5 = codepoint; v12 = codepoint & 0xFFFFFC00; if ( v12 != 55296 ) { if ( v12 == 56320 ) { v10 = "invalid string: surrogate U+DC00..U+DFFF must follow U+D800..U+DBFF"; goto LABEL_84; } if ( v5 >= 0x110000 ) goto LABEL_89; if ( v5 > 0x7F ) { if ( v5 <= 0x7FF ) { v15 = (v5 >> 6) | 0xC0; goto LABEL_36; } if ( v5 <= 0xFFFF ) { v14 = (v5 >> 12) | 0xE0; goto LABEL_35; } LABEL_34: std::string::push_back(a1 + 80, (unsigned int)(char)((v5 >> 18) | 0xF0)); v14 = (v5 >> 12) & 0x3F | 0x80; LABEL_35: std::string::push_back(a1 + 80, (unsigned int)v14); v15 = (v5 >> 6) & 0x3F | 0x80; LABEL_36: std::string::push_back(a1 + 80, (unsigned int)v15); LOBYTE(v5) = v5 & 0x3F | 0x80; } LABEL_5: std::string::push_back(a1 + 80, (unsigned int)(char)v5); continue; } if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) == 92 && (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) == 117 ) { v13 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_codepoint(a1); if ( v13 == -1 ) goto LABEL_84; v10 = "invalid string: surrogate U+D800..U+DBFF must be followed by U+DC00..U+DFFF"; if ( (v13 & 0xFFFFFC00) != 0xDC00 ) goto LABEL_84; v5 = v13 + (v5 << 10) - 56613888; goto LABEL_34; } v10 = "invalid string: surrogate U+D800..U+DBFF must be followed by U+DC00..U+DFFF"; LABEL_84: *(_QWORD *)(a1 + 112) = v10; return v1; default: switch ( v9 ) { case '"': LOBYTE(v5) = 34; break; case '/': LOBYTE(v5) = 47; break; case 'f': LOBYTE(v5) = 12; break; case 'b': LOBYTE(v5) = 8; break; case '\\': LOBYTE(v5) = 92; break; default: goto LABEL_84; } goto LABEL_5; } } }
scan_string: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDI CALL 0x0013ef66 CMP dword ptr [RBX + 0x14],0x22 JNZ 0x0013e9bc LEA R14,[RBX + 0x50] LEA R12,[0x1ac3d8] PUSH 0xe POP RBP LAB_0013e5c8: MOV RDI,RBX CALL 0x0013ed24 INC EAX CMP EAX,0xf5 JA 0x0013e98e MOVSXD RCX,dword ptr [R12 + RAX*0x4] ADD RCX,R12 MOV RAX,0xbf00000080 switchD: JMP RCX caseD_20: MOV R15B,byte ptr [RBX + 0x14] LAB_0013e5f4: MOVSX ESI,R15B MOV RDI,R14 CALL 0x00124750 JMP 0x0013e5c8 caseD_c2: MOV RSI,RSP MOV qword ptr [RSI],RAX PUSH 0x2 JMP 0x0013e69a caseD_e1: MOVAPS XMM0,xmmword ptr [0x001ac300] LAB_0013e616: MOV RSI,RSP MOVAPS xmmword ptr [RSI],XMM0 PUSH 0x4 JMP 0x0013e69a caseD_f1: MOVUPS XMM0,xmmword ptr [0x001b3c30] JMP 0x0013e68e caseD_ed: MOVAPS XMM0,xmmword ptr [0x001ac2f0] JMP 0x0013e616 caseD_5c: MOV RDI,RBX CALL 0x0013ed24 LEA R13,[0x1b1f82] LEA ECX,[RAX + -0x6e] CMP ECX,0x7 JBE 0x0013e6bc default: CMP EAX,0x22 JZ 0x0013e7b5 CMP EAX,0x2f JZ 0x0013e7c5 CMP EAX,0x66 JZ 0x0013e7bd CMP EAX,0x62 JZ 0x0013e7cd CMP EAX,0x5c JNZ 0x0013e995 MOV R15B,0x5c JMP 0x0013e5f4 caseD_f4: MOVUPS XMM0,xmmword ptr [0x001b3c48] JMP 0x0013e68e caseD_f0: MOVUPS XMM0,xmmword ptr [0x001b3c18] LAB_0013e68e: MOV RSI,RSP MOVAPS xmmword ptr [RSI],XMM0 MOV qword ptr [RSI + 0x10],RAX PUSH 0x6 LAB_0013e69a: POP RDX MOV RDI,RBX CALL 0x0013f068 TEST AL,AL JNZ 0x0013e5c8 JMP 0x0013e999 caseD_e0: MOVAPS XMM0,xmmword ptr [0x001ac310] JMP 0x0013e616 LAB_0013e6bc: LEA RAX,[0x1ac7b0] MOVSXD RCX,dword ptr [RAX + RCX*0x4] ADD RCX,RAX switchD: JMP RCX caseD_6e: MOV R15B,0xa JMP 0x0013e5f4 caseD_72: MOV R15B,0xd JMP 0x0013e5f4 caseD_75: MOV RDI,RBX CALL 0x0013efa2 LEA R13,[0x1b1e91] CMP EAX,-0x1 JZ 0x0013e995 MOV R15D,EAX AND EAX,0xfffffc00 CMP EAX,0xd800 JNZ 0x0013e7d5 MOV RDI,RBX CALL 0x0013ed24 CMP EAX,0x5c JNZ 0x0013e9aa MOV RDI,RBX CALL 0x0013ed24 CMP EAX,0x75 JNZ 0x0013e9aa MOV RDI,RBX CALL 0x0013efa2 CMP EAX,-0x1 JZ 0x0013e995 MOV ECX,EAX AND ECX,0xfffffc00 LEA R13,[0x1b1ec7] CMP ECX,0xdc00 JNZ 0x0013e995 SHL R15D,0xa ADD R15D,EAX ADD R15D,0xfca02400 LAB_0013e763: MOV EAX,R15D SHR EAX,0x12 OR AL,0xf0 MOVSX ESI,AL MOV RDI,R14 CALL 0x00124750 MOV EAX,R15D SHR EAX,0xc AND AL,0x3f OR AL,0x80 LAB_0013e780: MOVSX ESI,AL MOV RDI,R14 CALL 0x00124750 MOV EAX,R15D SHR EAX,0x6 AND AL,0x3f OR AL,0x80 LAB_0013e795: MOVSX ESI,AL MOV RDI,R14 CALL 0x00124750 AND R15B,0x3f OR R15B,0x80 JMP 0x0013e5f4 caseD_74: MOV R15B,0x9 JMP 0x0013e5f4 LAB_0013e7b5: MOV R15B,0x22 JMP 0x0013e5f4 LAB_0013e7bd: MOV R15B,0xc JMP 0x0013e5f4 LAB_0013e7c5: MOV R15B,0x2f JMP 0x0013e5f4 LAB_0013e7cd: MOV R15B,0x8 JMP 0x0013e5f4 LAB_0013e7d5: CMP EAX,0xdc00 JZ 0x0013e9b3 CMP R15D,0x110000 JNC 0x0013e9dd CMP R15D,0x7f JBE 0x0013e5f4 CMP R15D,0x7ff JA 0x0013e80a MOV EAX,R15D SHR EAX,0x6 OR AL,0xc0 JMP 0x0013e795 LAB_0013e80a: CMP R15D,0xffff JA 0x0013e763 MOV EAX,R15D SHR EAX,0xc OR AL,0xe0 JMP 0x0013e780 caseD_1e: LEA R13,[0x1b2857] JMP 0x0013e995 caseD_19: LEA R13,[0x1b26ed] JMP 0x0013e995 caseD_13: LEA R13,[0x1b2537] JMP 0x0013e995 caseD_c: LEA R13,[0x1b2330] JMP 0x0013e995 caseD_14: LEA R13,[0x1b2580] JMP 0x0013e995 caseD_d: LEA R13,[0x1b237e] JMP 0x0013e995 caseD_17: LEA R13,[0x1b265b] JMP 0x0013e995 caseD_1d: LEA R13,[0x1b280f] JMP 0x0013e995 caseD_5: LEA R13,[0x1b2123] JMP 0x0013e995 caseD_12: LEA R13,[0x1b24ee] JMP 0x0013e995 caseD_18: LEA R13,[0x1b26a4] JMP 0x0013e995 caseD_4: LEA R13,[0x1b20da] JMP 0x0013e995 caseD_3: LEA R13,[0x1b2091] JMP 0x0013e995 caseD_a: LEA R13,[0x1b229a] JMP 0x0013e995 caseD_6: LEA R13,[0x1b216c] JMP 0x0013e995 caseD_1b: LEA R13,[0x1b277e] JMP 0x0013e995 caseD_2: LEA R13,[0x1b2048] JMP 0x0013e995 caseD_ffffffff: LEA R13,[0x1b1e6b] JMP 0x0013e995 caseD_10: LEA R13,[0x1b245c] JMP 0x0013e995 caseD_1: LEA R13,[0x1b1fff] JMP 0x0013e995 caseD_0: LEA R13,[0x1b1fb6] JMP 0x0013e995 caseD_11: LEA R13,[0x1b24a5] JMP 0x0013e995 caseD_9: LEA R13,[0x1b224c] JMP 0x0013e995 caseD_1f: LEA R13,[0x1b289f] JMP 0x0013e995 caseD_7: LEA R13,[0x1b21b5] JMP 0x0013e995 caseD_16: LEA R13,[0x1b2612] JMP 0x0013e995 caseD_b: LEA R13,[0x1b22e8] JMP 0x0013e995 caseD_e: LEA R13,[0x1b23cc] JMP 0x0013e995 caseD_8: LEA R13,[0x1b21fe] JMP 0x0013e995 caseD_15: LEA R13,[0x1b25c9] JMP 0x0013e995 caseD_1a: LEA R13,[0x1b2735] JMP 0x0013e995 caseD_f: LEA R13,[0x1b2414] JMP 0x0013e995 caseD_1c: LEA R13,[0x1b27c7] JMP 0x0013e995 caseD_22: PUSH 0x4 POP RBP JMP 0x0013e999 caseD_80: LEA R13,[0x1b28e7] caseD_6f: MOV qword ptr [RBX + 0x70],R13 LAB_0013e999: MOV EAX,EBP ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013e9aa: LEA R13,[0x1b1ec7] JMP 0x0013e995 LAB_0013e9b3: LEA R13,[0x1b1f13] JMP 0x0013e995 LAB_0013e9bc: LEA RDI,[0x1b1be6] LEA RDX,[0x1ac140] LEA RCX,[0x1b1e5b] MOV ESI,0x1dd1 LAB_0013e9d6: XOR EAX,EAX CALL 0x00124e90 LAB_0013e9dd: LEA RDI,[0x1b1be6] LEA RDX,[0x1ac140] LEA RCX,[0x1b1f57] MOV ESI,0x1e49 JMP 0x0013e9d6
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::scan_string() */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::scan_string(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *this) { char cVar1; int4 uVar2; int iVar3; uint uVar4; int8 uVar5; char cVar6; char *pcVar7; int4 uVar8; int8 uStack_50; int8 local_48; int4 uStack_40; int4 uStack_3c; int8 local_38; reset(this); if (*(int *)(this + 0x14) != 0x22) { pcVar7 = "current == \'\\\"\'"; uVar5 = 0x1dd1; LAB_0013e9d6: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar5, "GGML_ASSERT(%s) failed",pcVar7); } cVar6 = (char)this + 'P'; LAB_0013e5c8: uVar2 = get(this); switch(uVar2) { case 0: pcVar7 = "invalid string: control character U+0000 (NUL) must be escaped to \\u0000"; break; case 1: pcVar7 = "invalid string: control character U+0001 (SOH) must be escaped to \\u0001"; break; case 2: pcVar7 = "invalid string: control character U+0002 (STX) must be escaped to \\u0002"; break; case 3: pcVar7 = "invalid string: control character U+0003 (ETX) must be escaped to \\u0003"; break; case 4: pcVar7 = "invalid string: control character U+0004 (EOT) must be escaped to \\u0004"; break; case 5: pcVar7 = "invalid string: control character U+0005 (ENQ) must be escaped to \\u0005"; break; case 6: pcVar7 = "invalid string: control character U+0006 (ACK) must be escaped to \\u0006"; break; case 7: pcVar7 = "invalid string: control character U+0007 (BEL) must be escaped to \\u0007"; break; case 8: pcVar7 = "invalid string: control character U+0008 (BS) must be escaped to \\u0008 or \\b"; break; case 9: pcVar7 = "invalid string: control character U+0009 (HT) must be escaped to \\u0009 or \\t"; break; case 10: pcVar7 = "invalid string: control character U+000A (LF) must be escaped to \\u000A or \\n"; break; case 0xb: pcVar7 = "invalid string: control character U+000B (VT) must be escaped to \\u000B"; break; case 0xc: pcVar7 = "invalid string: control character U+000C (FF) must be escaped to \\u000C or \\f"; break; case 0xd: pcVar7 = "invalid string: control character U+000D (CR) must be escaped to \\u000D or \\r"; break; case 0xe: pcVar7 = "invalid string: control character U+000E (SO) must be escaped to \\u000E"; break; case 0xf: pcVar7 = "invalid string: control character U+000F (SI) must be escaped to \\u000F"; break; case 0x10: pcVar7 = "invalid string: control character U+0010 (DLE) must be escaped to \\u0010"; break; case 0x11: pcVar7 = "invalid string: control character U+0011 (DC1) must be escaped to \\u0011"; break; case 0x12: pcVar7 = "invalid string: control character U+0012 (DC2) must be escaped to \\u0012"; break; case 0x13: pcVar7 = "invalid string: control character U+0013 (DC3) must be escaped to \\u0013"; break; case 0x14: pcVar7 = "invalid string: control character U+0014 (DC4) must be escaped to \\u0014"; break; case 0x15: pcVar7 = "invalid string: control character U+0015 (NAK) must be escaped to \\u0015"; break; case 0x16: pcVar7 = "invalid string: control character U+0016 (SYN) must be escaped to \\u0016"; break; case 0x17: pcVar7 = "invalid string: control character U+0017 (ETB) must be escaped to \\u0017"; break; case 0x18: pcVar7 = "invalid string: control character U+0018 (CAN) must be escaped to \\u0018"; break; case 0x19: pcVar7 = "invalid string: control character U+0019 (EM) must be escaped to \\u0019"; break; case 0x1a: pcVar7 = "invalid string: control character U+001A (SUB) must be escaped to \\u001A"; break; case 0x1b: pcVar7 = "invalid string: control character U+001B (ESC) must be escaped to \\u001B"; break; case 0x1c: pcVar7 = "invalid string: control character U+001C (FS) must be escaped to \\u001C"; break; case 0x1d: pcVar7 = "invalid string: control character U+001D (GS) must be escaped to \\u001D"; break; case 0x1e: pcVar7 = "invalid string: control character U+001E (RS) must be escaped to \\u001E"; break; case 0x1f: pcVar7 = "invalid string: control character U+001F (US) must be escaped to \\u001F"; break; case 0x20: case 0x21: case 0x23: case 0x24: case 0x25: case 0x26: case 0x27: case 0x28: case 0x29: case 0x2a: case 0x2b: case 0x2c: case 0x2d: case 0x2e: case 0x2f: case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: case 0x3a: case 0x3b: case 0x3c: case 0x3d: case 0x3e: case 0x3f: case 0x40: case 0x41: case 0x42: case 0x43: case 0x44: case 0x45: case 0x46: case 0x47: case 0x48: case 0x49: case 0x4a: case 0x4b: case 0x4c: case 0x4d: case 0x4e: case 0x4f: case 0x50: case 0x51: case 0x52: case 0x53: case 0x54: case 0x55: case 0x56: case 0x57: case 0x58: case 0x59: case 0x5a: case 0x5b: case 0x5d: case 0x5e: case 0x5f: case 0x60: case 0x61: case 0x62: case 99: case 100: case 0x65: case 0x66: case 0x67: case 0x68: case 0x69: case 0x6a: case 0x6b: case 0x6c: case 0x6d: case 0x6e: case 0x6f: case 0x70: case 0x71: case 0x72: case 0x73: case 0x74: case 0x75: case 0x76: case 0x77: case 0x78: case 0x79: case 0x7a: case 0x7b: case 0x7c: case 0x7d: case 0x7e: case 0x7f: goto LAB_0013e5f4; case 0x22: return 4; case 0x5c: iVar3 = get(this); pcVar7 = "invalid string: forbidden character after backslash"; switch(iVar3) { case 0x6e: break; case 0x6f: case 0x70: case 0x71: case 0x73: goto switchD_0013e6ca_caseD_6f; case 0x72: break; case 0x74: break; case 0x75: uVar4 = get_codepoint(this); pcVar7 = "invalid string: \'\\u\' must be followed by 4 hex digits"; if (uVar4 == 0xffffffff) goto switchD_0013e6ca_caseD_6f; if ((uVar4 & 0xfffffc00) == 0xd800) { iVar3 = get(this); if ((iVar3 != 0x5c) || (iVar3 = get(this), iVar3 != 0x75)) { pcVar7 = "invalid string: surrogate U+D800..U+DBFF must be followed by U+DC00..U+DFFF"; goto switchD_0013e6ca_caseD_6f; } uVar4 = get_codepoint(this); if ((uVar4 == 0xffffffff) || (pcVar7 = "invalid string: surrogate U+D800..U+DBFF must be followed by U+DC00..U+DFFF", (uVar4 & 0xfffffc00) != 0xdc00)) goto switchD_0013e6ca_caseD_6f; LAB_0013e763: std::__cxx11::string::push_back(cVar6); LAB_0013e780: std::__cxx11::string::push_back(cVar6); } else { if ((uVar4 & 0xfffffc00) == 0xdc00) { pcVar7 = "invalid string: surrogate U+DC00..U+DFFF must follow U+D800..U+DBFF"; goto switchD_0013e6ca_caseD_6f; } if (0x10ffff < uVar4) { pcVar7 = "0x00 <= codepoint && codepoint <= 0x10FFFF"; uVar5 = 0x1e49; goto LAB_0013e9d6; } if (uVar4 < 0x80) break; if (0x7ff < uVar4) { if (0xffff < uVar4) goto LAB_0013e763; goto LAB_0013e780; } } std::__cxx11::string::push_back(cVar6); break; default: if ((((iVar3 != 0x22) && (iVar3 != 0x2f)) && (iVar3 != 0x66)) && ((iVar3 != 0x62 && (iVar3 != 0x5c)))) goto switchD_0013e6ca_caseD_6f; } LAB_0013e5f4: std::__cxx11::string::push_back(cVar6); goto LAB_0013e5c8; default: pcVar7 = "invalid string: ill-formed UTF-8 byte"; break; case 0xc2: case 0xc3: case 0xc4: case 0xc5: case 0xc6: case 199: case 200: case 0xc9: case 0xca: case 0xcb: case 0xcc: case 0xcd: case 0xce: case 0xcf: case 0xd0: case 0xd1: case 0xd2: case 0xd3: case 0xd4: case 0xd5: case 0xd6: case 0xd7: case 0xd8: case 0xd9: case 0xda: case 0xdb: case 0xdc: case 0xdd: case 0xde: case 0xdf: local_48 = 0xbf00000080; uStack_50 = 2; goto LAB_0013e69a; case 0xe0: uVar2 = _DAT_001ac310; uVar8 = _UNK_001ac314; uStack_40 = _UNK_001ac318; uStack_3c = _UNK_001ac31c; goto LAB_0013e616; case 0xe1: case 0xe2: case 0xe3: case 0xe4: case 0xe5: case 0xe6: case 0xe7: case 0xe8: case 0xe9: case 0xea: case 0xeb: case 0xec: case 0xee: case 0xef: uVar2 = _DAT_001ac300; uVar8 = _UNK_001ac304; uStack_40 = _UNK_001ac308; uStack_3c = _UNK_001ac30c; goto LAB_0013e616; case 0xed: uVar2 = _DAT_001ac2f0; uVar8 = _UNK_001ac2f4; uStack_40 = _UNK_001ac2f8; uStack_3c = _UNK_001ac2fc; LAB_0013e616: local_48 = CONCAT44(uVar8,uVar2); uStack_50 = 4; LAB_0013e69a: cVar1 = next_byte_in_range(this,&local_48,uStack_50); if (cVar1 == '\0') { return 0xe; } goto LAB_0013e5c8; case 0xf0: uVar2 = _DAT_001b3c18; uVar8 = _UNK_001b3c1c; uStack_40 = _UNK_001b3c20; uStack_3c = _UNK_001b3c24; goto LAB_0013e68e; case 0xf1: case 0xf2: case 0xf3: uVar2 = _DAT_001b3c30; uVar8 = _UNK_001b3c34; uStack_40 = _UNK_001b3c38; uStack_3c = _UNK_001b3c3c; goto LAB_0013e68e; case 0xf4: uVar2 = _DAT_001b3c48; uVar8 = _UNK_001b3c4c; uStack_40 = _UNK_001b3c50; uStack_3c = _UNK_001b3c54; LAB_0013e68e: local_48 = CONCAT44(uVar8,uVar2); local_38 = 0xbf00000080; uStack_50 = 6; goto LAB_0013e69a; case 0xffffffff: pcVar7 = "invalid string: missing closing quote"; } switchD_0013e6ca_caseD_6f: *(char **)(this + 0x70) = pcVar7; return 0xe; }
16,891
init_extent
eloqsql/storage/maria/ma_blockrec.c
static void init_extent(MARIA_EXTENT_CURSOR *extent, uchar *extent_info, uint extents, MARIA_RECORD_POS *tail_positions) { uint page_count; extent->extent= extent_info; extent->extent_count= extents; extent->page= page_korr(extent_info); /* First extent */ page_count= (uint2korr(extent_info + ROW_EXTENT_PAGE_SIZE) & ~START_EXTENT_BIT); extent->tail= page_count & TAIL_BIT; if (extent->tail) { extent->page_count= 1; extent->tail_row_nr= page_count & ~TAIL_BIT; } else extent->page_count= page_count; extent->tail_positions= tail_positions; extent->lock_for_tail_pages= PAGECACHE_LOCK_LEFT_UNLOCKED; }
O0
c
init_extent: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq %rcx, -0x20(%rbp) movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, (%rax) movl -0x14(%rbp), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x28(%rax) movq -0x10(%rbp), %rdi callq 0x799f0 movq %rax, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x18(%rax) movq -0x10(%rbp), %rax movzwl 0x5(%rax), %eax andl $0xffffbfff, %eax # imm = 0xFFFFBFFF movl %eax, -0x24(%rbp) movl -0x24(%rbp), %ecx andl $0x8000, %ecx # imm = 0x8000 movq -0x8(%rbp), %rax movl %ecx, 0x2c(%rax) movq -0x8(%rbp), %rax cmpl $0x0, 0x2c(%rax) je 0x77b27 movq -0x8(%rbp), %rax movl $0x1, 0x20(%rax) movl -0x24(%rbp), %ecx andl $0xffff7fff, %ecx # imm = 0xFFFF7FFF movq -0x8(%rbp), %rax movl %ecx, 0x30(%rax) jmp 0x77b31 movl -0x24(%rbp), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x20(%rax) movq -0x20(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x8(%rbp), %rax movl $0x0, 0x24(%rax) addq $0x30, %rsp popq %rbp retq nop
init_extent: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_20], rcx mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov [rax], rcx mov ecx, [rbp+var_14] mov rax, [rbp+var_8] mov [rax+28h], ecx mov rdi, [rbp+var_10] call uint5korr_1 mov rcx, rax mov rax, [rbp+var_8] mov [rax+18h], rcx mov rax, [rbp+var_10] movzx eax, word ptr [rax+5] and eax, 0FFFFBFFFh mov [rbp+var_24], eax mov ecx, [rbp+var_24] and ecx, 8000h mov rax, [rbp+var_8] mov [rax+2Ch], ecx mov rax, [rbp+var_8] cmp dword ptr [rax+2Ch], 0 jz short loc_77B27 mov rax, [rbp+var_8] mov dword ptr [rax+20h], 1 mov ecx, [rbp+var_24] and ecx, 0FFFF7FFFh mov rax, [rbp+var_8] mov [rax+30h], ecx jmp short loc_77B31 loc_77B27: mov ecx, [rbp+var_24] mov rax, [rbp+var_8] mov [rax+20h], ecx loc_77B31: mov rcx, [rbp+var_20] mov rax, [rbp+var_8] mov [rax+10h], rcx mov rax, [rbp+var_8] mov dword ptr [rax+24h], 0 add rsp, 30h pop rbp retn
long long init_extent(long long a1, long long a2, int a3, long long a4) { long long result; // rax int v5; // [rsp+Ch] [rbp-24h] *(_QWORD *)a1 = a2; *(_DWORD *)(a1 + 40) = a3; *(_QWORD *)(a1 + 24) = uint5korr_1(a2); v5 = *(_WORD *)(a2 + 5) & 0xBFFF; *(_DWORD *)(a1 + 44) = *(_WORD *)(a2 + 5) & 0x8000; if ( *(_DWORD *)(a1 + 44) ) { *(_DWORD *)(a1 + 32) = 1; *(_DWORD *)(a1 + 48) = v5 & 0xFFFF7FFF; } else { *(_DWORD *)(a1 + 32) = v5; } *(_QWORD *)(a1 + 16) = a4; result = a1; *(_DWORD *)(a1 + 36) = 0; return result; }
init_extent: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV qword ptr [RBP + -0x20],RCX MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],RCX MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x28],ECX MOV RDI,qword ptr [RBP + -0x10] CALL 0x001799f0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX + 0x5] AND EAX,0xffffbfff MOV dword ptr [RBP + -0x24],EAX MOV ECX,dword ptr [RBP + -0x24] AND ECX,0x8000 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x2c],ECX MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x2c],0x0 JZ 0x00177b27 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x20],0x1 MOV ECX,dword ptr [RBP + -0x24] AND ECX,0xffff7fff MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x30],ECX JMP 0x00177b31 LAB_00177b27: MOV ECX,dword ptr [RBP + -0x24] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x20],ECX LAB_00177b31: MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x24],0x0 ADD RSP,0x30 POP RBP RET
void init_extent(long *param_1,long param_2,int4 param_3,long param_4) { uint uVar1; long lVar2; *param_1 = param_2; *(int4 *)(param_1 + 5) = param_3; lVar2 = uint5korr(param_2); param_1[3] = lVar2; uVar1 = (uint)*(ushort *)(param_2 + 5); *(uint *)((long)param_1 + 0x2c) = uVar1 & 0x8000; if (*(int *)((long)param_1 + 0x2c) == 0) { *(uint *)(param_1 + 4) = uVar1 & 0xffffbfff; } else { *(int4 *)(param_1 + 4) = 1; *(uint *)(param_1 + 6) = uVar1 & 0xffff3fff; } param_1[2] = param_4; *(int4 *)((long)param_1 + 0x24) = 0; return; }
16,892
testing::internal::UnitTestImpl::GetTestSuite(char const*, char const*, void (*)(), void (*)())
seiftnesse[P]memoryallocator/build_O2/_deps/googletest-src/googletest/src/gtest.cc
TestSuite* UnitTestImpl::GetTestSuite( const char* test_suite_name, const char* type_param, internal::SetUpTestSuiteFunc set_up_tc, internal::TearDownTestSuiteFunc tear_down_tc) { // Can we find a TestSuite with the given name? const auto test_suite = std::find_if(test_suites_.rbegin(), test_suites_.rend(), TestSuiteNameIs(test_suite_name)); if (test_suite != test_suites_.rend()) return *test_suite; // No. Let's create one. auto* const new_test_suite = new TestSuite(test_suite_name, type_param, set_up_tc, tear_down_tc); const UnitTestFilter death_test_suite_filter(kDeathTestSuiteFilter); // Is this a death test suite? if (death_test_suite_filter.MatchesName(test_suite_name)) { // Yes. Inserts the test suite after the last death test suite // defined so far. This only works when the test suites haven't // been shuffled. Otherwise we may end up running a death test // after a non-death test. ++last_death_test_suite_; test_suites_.insert(test_suites_.begin() + last_death_test_suite_, new_test_suite); } else { // No. Appends to the end of the list. test_suites_.push_back(new_test_suite); } test_suite_indices_.push_back(static_cast<int>(test_suite_indices_.size())); return new_test_suite; }
O2
cpp
testing::internal::UnitTestImpl::GetTestSuite(char const*, char const*, void (*)(), void (*)()): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xb8, %rsp movq %r8, %r12 movq %rcx, %r13 movq %rdx, %rbp movq %rsi, %r14 movq %rdi, %rbx movq 0xc0(%rdi), %rax movq %rax, 0x38(%rsp) movq 0xb8(%rdi), %rax movq %rax, 0x30(%rsp) leaq 0x68(%rsp), %rdi leaq 0x10(%rsp), %rdx callq 0xd602 leaq 0x48(%rsp), %rdi leaq 0x68(%rsp), %rsi callq 0x97d0 leaq 0x40(%rsp), %rdi leaq 0x38(%rsp), %rsi leaq 0x30(%rsp), %rdx leaq 0x48(%rsp), %rcx callq 0x290fc leaq 0xb8(%rbx), %r15 leaq 0x48(%rsp), %rdi callq 0x9af8 leaq 0x68(%rsp), %rdi callq 0x9af8 movq 0x40(%rsp), %rax cmpq (%r15), %rax je 0x24373 movq -0x8(%rax), %rbx jmp 0x2446a movl $0x108, %edi # imm = 0x108 callq 0x94d0 movq %r12, %r8 movq %rax, %r12 movq %rax, %rdi movq %r14, %rsi movq %rbp, %rdx movq %r13, %rcx callq 0x1bd00 movq %r12, 0x8(%rsp) leaq 0xcd70(%rip), %rsi # 0x31110 leaq 0x10(%rsp), %rdi leaq 0x7(%rsp), %rdx callq 0xd602 leaq 0x68(%rsp), %rdi leaq 0x10(%rsp), %rsi callq 0x17638 leaq 0x10(%rsp), %rdi callq 0x9af8 leaq 0x10(%rsp), %rdi leaq 0x7(%rsp), %rdx movq %r14, %rsi callq 0xd602 leaq 0x68(%rsp), %rdi leaq 0x10(%rsp), %rsi callq 0x17716 movl %eax, %ebp leaq 0x10(%rsp), %rdi callq 0x9af8 testb %bpl, %bpl je 0x24429 movslq 0x164(%rbx), %rax leaq 0x1(%rax), %rcx movl %ecx, 0x164(%rbx) leaq 0x8(,%rax,8), %rsi addq 0xb8(%rbx), %rsi leaq 0x8(%rsp), %rdx movq %r15, %rdi callq 0x2918e jmp 0x24436 leaq 0x8(%rsp), %rsi movq %r15, %rdi callq 0x291f8 movq 0xd8(%rbx), %rax subq 0xd0(%rbx), %rax leaq 0xd0(%rbx), %rdi shrq $0x2, %rax leaq 0x10(%rsp), %rsi movl %eax, (%rsi) callq 0x2efb0 movq 0x8(%rsp), %rbx leaq 0x68(%rsp), %rdi callq 0x17822 movq %rbx, %rax addq $0xb8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x24494 jmp 0x24494 jmp 0x24494 movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x9af8 jmp 0x24497 movq %rax, %rbx leaq 0x68(%rsp), %rdi callq 0x17822 jmp 0x244e2 movq %rax, %rbx leaq 0x10(%rsp), %rdi jmp 0x244d8 jmp 0x244df movq %rax, %rbx movl $0x108, %esi # imm = 0x108 movq %r12, %rdi callq 0x9500 jmp 0x244e2 movq %rax, %rbx leaq 0x48(%rsp), %rdi callq 0x9af8 jmp 0x244d3 movq %rax, %rbx leaq 0x68(%rsp), %rdi callq 0x9af8 jmp 0x244e2 movq %rax, %rbx movq %rbx, %rdi callq 0x99d0
_ZN7testing8internal12UnitTestImpl12GetTestSuiteEPKcS3_PFvvES5_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0B8h mov r12, r8 mov r13, rcx mov rbp, rdx mov r14, rsi mov rbx, rdi mov rax, [rdi+0C0h] mov [rsp+0E8h+var_B0], rax mov rax, [rdi+0B8h] mov [rsp+0E8h+var_B8], rax lea rdi, [rsp+0E8h+var_80] lea rdx, [rsp+0E8h+var_D8] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+0E8h+var_A0] lea rsi, [rsp+0E8h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) lea rdi, [rsp+0E8h+var_A8] lea rsi, [rsp+0E8h+var_B0] lea rdx, [rsp+0E8h+var_B8] lea rcx, [rsp+0E8h+var_A0] call _ZSt7find_ifISt16reverse_iteratorIN9__gnu_cxx17__normal_iteratorIPPN7testing9TestSuiteESt6vectorIS5_SaIS5_EEEEENS3_8internal15TestSuiteNameIsEET_SE_SE_T0_; std::find_if<std::reverse_iterator<__gnu_cxx::__normal_iterator<testing::TestSuite **,std::vector<testing::TestSuite *>>>,testing::internal::TestSuiteNameIs>(std::reverse_iterator<__gnu_cxx::__normal_iterator<testing::TestSuite **,std::vector<testing::TestSuite *>>>,std::reverse_iterator<__gnu_cxx::__normal_iterator<testing::TestSuite **,std::vector<testing::TestSuite *>>>,testing::internal::TestSuiteNameIs) lea r15, [rbx+0B8h] lea rdi, [rsp+0E8h+var_A0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0E8h+var_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, [rsp+0E8h+var_A8] cmp rax, [r15] jz short loc_24373 mov rbx, [rax-8] jmp loc_2446A loc_24373: mov edi, 108h; unsigned __int64 call __Znwm; operator new(ulong) mov r8, r12; void (*)(void) mov r12, rax mov rdi, rax; this mov rsi, r14; char * mov rdx, rbp; char * mov rcx, r13; void (*)(void) call _ZN7testing9TestSuiteC2EPKcS2_PFvvES4_; testing::TestSuite::TestSuite(char const*,char const*,void (*)(void),void (*)(void)) mov [rsp+0E8h+var_E0], r12 lea rsi, _ZN7testingL21kDeathTestSuiteFilterE; "*DeathTest:*DeathTest/*" lea rdi, [rsp+0E8h+var_D8] lea rdx, [rsp+0E8h+var_E1] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+0E8h+var_80] lea rsi, [rsp+0E8h+var_D8] call _ZN7testing8internal12_GLOBAL__N_114UnitTestFilterC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::`anonymous namespace'::UnitTestFilter::UnitTestFilter(std::string const&) lea rdi, [rsp+0E8h+var_D8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0E8h+var_D8] lea rdx, [rsp+0E8h+var_E1] mov rsi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+0E8h+var_80] lea rsi, [rsp+0E8h+var_D8] call _ZNK7testing8internal12_GLOBAL__N_114UnitTestFilter11MatchesNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::`anonymous namespace'::UnitTestFilter::MatchesName(std::string const&) mov ebp, eax lea rdi, [rsp+0E8h+var_D8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jz short loc_24429 movsxd rax, dword ptr [rbx+164h] lea rcx, [rax+1] mov [rbx+164h], ecx lea rsi, ds:8[rax*8] add rsi, [rbx+0B8h] lea rdx, [rsp+0E8h+var_E0] mov rdi, r15 call _ZNSt6vectorIPN7testing9TestSuiteESaIS2_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS2_S4_EERS7_; std::vector<testing::TestSuite *>::insert(__gnu_cxx::__normal_iterator<testing::TestSuite * const*,std::vector<testing::TestSuite *>>,testing::TestSuite * const&) jmp short loc_24436 loc_24429: lea rsi, [rsp+0E8h+var_E0] mov rdi, r15 call _ZNSt6vectorIPN7testing9TestSuiteESaIS2_EE9push_backERKS2_; std::vector<testing::TestSuite *>::push_back(testing::TestSuite * const&) loc_24436: mov rax, [rbx+0D8h] sub rax, [rbx+0D0h] lea rdi, [rbx+0D0h] shr rax, 2 lea rsi, [rsp+0E8h+var_D8] mov [rsi], eax call _ZNSt6vectorIiSaIiEE12emplace_backIJiEEERiDpOT_; std::vector<int>::emplace_back<int>(int &&) mov rbx, [rsp+0E8h+var_E0] lea rdi, [rsp+0E8h+var_80]; this call _ZN7testing8internal12_GLOBAL__N_114UnitTestFilterD2Ev; testing::internal::`anonymous namespace'::UnitTestFilter::~UnitTestFilter() loc_2446A: mov rax, rbx add rsp, 0B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_24494 jmp short loc_24494 jmp short loc_24494 mov rbx, rax lea rdi, [rsp+arg_8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_24497 loc_24494: mov rbx, rax loc_24497: lea rdi, [rsp+arg_60]; this call _ZN7testing8internal12_GLOBAL__N_114UnitTestFilterD2Ev; testing::internal::`anonymous namespace'::UnitTestFilter::~UnitTestFilter() jmp short loc_244E2 mov rbx, rax lea rdi, [rsp+arg_8] jmp short loc_244D8 jmp short loc_244DF mov rbx, rax mov esi, 108h; unsigned __int64 mov rdi, r12; void * call __ZdlPvm; operator delete(void *,ulong) jmp short loc_244E2 mov rbx, rax lea rdi, [rsp+arg_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_244D3 mov rbx, rax loc_244D3: lea rdi, [rsp+arg_60]; void * loc_244D8: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_244E2 loc_244DF: mov rbx, rax loc_244E2: mov rdi, rbx call __Unwind_Resume
testing::TestSuite * testing::internal::UnitTestImpl::GetTestSuite( testing::internal::UnitTestImpl *this, const char *a2, const char *a3, void (*a4)(void), void (*a5)(void)) { int v8; // r8d int v9; // r9d testing::TestSuite *v10; // rbx testing::TestSuite *v11; // rax void (*v12)(void); // r8 testing::TestSuite *v13; // r12 char v14; // bp long long v15; // rax testing::TestSuite *v17; // [rsp+8h] [rbp-E0h] BYREF _QWORD v18[4]; // [rsp+10h] [rbp-D8h] BYREF long long v19; // [rsp+30h] [rbp-B8h] BYREF long long v20; // [rsp+38h] [rbp-B0h] BYREF long long v21; // [rsp+40h] [rbp-A8h] BYREF _BYTE v22[32]; // [rsp+48h] [rbp-A0h] BYREF long long v23[16]; // [rsp+68h] [rbp-80h] BYREF v20 = *((_QWORD *)this + 24); v19 = *((_QWORD *)this + 23); std::string::basic_string<std::allocator<char>>(v23, (long long)a2); std::string::basic_string(v22, v23); std::find_if<std::reverse_iterator<__gnu_cxx::__normal_iterator<testing::TestSuite **,std::vector<testing::TestSuite *>>>,testing::internal::TestSuiteNameIs>( (unsigned int)&v21, (unsigned int)&v20, (unsigned int)&v19, (unsigned int)v22, v8, v9); std::string::~string(v22); std::string::~string(v23); if ( v21 != *((_QWORD *)this + 23) ) return *(testing::TestSuite **)(v21 - 8); v11 = (testing::TestSuite *)operator new(0x108uLL); v12 = a5; v13 = v11; testing::TestSuite::TestSuite(v11, a2, a3, a4, v12); v17 = v13; std::string::basic_string<std::allocator<char>>(v18, (long long)"*DeathTest:*DeathTest/*"); testing::internal::`anonymous namespace'::UnitTestFilter::UnitTestFilter((long long)v23, (long long)v18); std::string::~string(v18); std::string::basic_string<std::allocator<char>>(v18, (long long)a2); v14 = testing::internal::`anonymous namespace'::UnitTestFilter::MatchesName(v23, (long long)v18); std::string::~string(v18); if ( v14 ) { v15 = *((int *)this + 89); *((_DWORD *)this + 89) = v15 + 1; std::vector<testing::TestSuite *>::insert((char *)this + 184, *((_QWORD *)this + 23) + 8 * v15 + 8, &v17); } else { std::vector<testing::TestSuite *>::push_back((char *)this + 184, &v17); } LODWORD(v18[0]) = (*((_QWORD *)this + 27) - *((_QWORD *)this + 26)) >> 2; std::vector<int>::emplace_back<int>((char *)this + 208); v10 = v17; testing::internal::`anonymous namespace'::UnitTestFilter::~UnitTestFilter((testing::internal::_anonymous_namespace_::UnitTestFilter *)v23); return v10; }
GetTestSuite: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xb8 MOV R12,R8 MOV R13,RCX MOV RBP,RDX MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr [RDI + 0xc0] MOV qword ptr [RSP + 0x38],RAX MOV RAX,qword ptr [RDI + 0xb8] MOV qword ptr [RSP + 0x30],RAX LAB_0012430e: LEA RDI,[RSP + 0x68] LEA RDX,[RSP + 0x10] CALL 0x0010d602 LAB_0012431d: LEA RDI,[RSP + 0x48] LEA RSI,[RSP + 0x68] CALL 0x001097d0 LAB_0012432c: LEA RDI,[RSP + 0x40] LEA RSI,[RSP + 0x38] LEA RDX,[RSP + 0x30] LEA RCX,[RSP + 0x48] CALL 0x001290fc LAB_00124345: LEA R15,[RBX + 0xb8] LEA RDI,[RSP + 0x48] CALL 0x00109af8 LEA RDI,[RSP + 0x68] CALL 0x00109af8 MOV RAX,qword ptr [RSP + 0x40] CMP RAX,qword ptr [R15] JZ 0x00124373 MOV RBX,qword ptr [RAX + -0x8] JMP 0x0012446a LAB_00124373: MOV EDI,0x108 CALL 0x001094d0 MOV R8,R12 MOV R12,RAX LAB_00124383: MOV RDI,RAX MOV RSI,R14 MOV RDX,RBP MOV RCX,R13 CALL 0x0011bd00 MOV qword ptr [RSP + 0x8],R12 LAB_00124399: LEA RSI,[0x131110] LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0x7] CALL 0x0010d602 LAB_001243af: LEA RDI,[RSP + 0x68] LEA RSI,[RSP + 0x10] CALL 0x00117638 LEA RDI,[RSP + 0x10] CALL 0x00109af8 LAB_001243c8: LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0x7] MOV RSI,R14 CALL 0x0010d602 LAB_001243da: LEA RDI,[RSP + 0x68] LEA RSI,[RSP + 0x10] CALL 0x00117716 MOV EBP,EAX LEA RDI,[RSP + 0x10] CALL 0x00109af8 TEST BPL,BPL JZ 0x00124429 MOVSXD RAX,dword ptr [RBX + 0x164] LEA RCX,[RAX + 0x1] MOV dword ptr [RBX + 0x164],ECX LEA RSI,[0x8 + RAX*0x8] ADD RSI,qword ptr [RBX + 0xb8] LAB_0012441a: LEA RDX,[RSP + 0x8] MOV RDI,R15 CALL 0x0012918e JMP 0x00124436 LAB_00124429: LEA RSI,[RSP + 0x8] MOV RDI,R15 CALL 0x001291f8 LAB_00124436: MOV RAX,qword ptr [RBX + 0xd8] SUB RAX,qword ptr [RBX + 0xd0] LEA RDI,[RBX + 0xd0] SHR RAX,0x2 LEA RSI,[RSP + 0x10] MOV dword ptr [RSI],EAX LAB_00124456: CALL 0x0012efb0 LAB_0012445b: MOV RBX,qword ptr [RSP + 0x8] LEA RDI,[RSP + 0x68] CALL 0x00117822 LAB_0012446a: MOV RAX,RBX ADD RSP,0xb8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* testing::internal::UnitTestImpl::GetTestSuite(char const*, char const*, void (*)(), void (*)()) */ TestSuite * __thiscall testing::internal::UnitTestImpl::GetTestSuite (UnitTestImpl *this,char *param_1,char *param_2,_func_void *param_3,_func_void *param_4) { vector<testing::TestSuite*,std::allocator<testing::TestSuite*>> *this_00; int iVar1; char cVar2; TestSuite *pTVar3; allocator local_e1; TestSuite *local_e0; int local_d8 [8]; int8 local_b8; int8 local_b0; long local_a8; string local_a0 [32]; string local_80 [80]; local_b0 = *(int8 *)(this + 0xc0); local_b8 = *(int8 *)(this + 0xb8); /* try { // try from 0012430e to 0012431c has its CatchHandler @ 001244df */ std::__cxx11::string::string<std::allocator<char>>(local_80,param_1,(allocator *)local_d8); /* try { // try from 0012431d to 0012432b has its CatchHandler @ 001244d0 */ std::__cxx11::string::string(local_a0,local_80); /* try { // try from 0012432c to 00124344 has its CatchHandler @ 001244c1 */ std:: find_if<std::reverse_iterator<__gnu_cxx::__normal_iterator<testing::TestSuite**,std::vector<testing::TestSuite*,std::allocator<testing::TestSuite*>>>>,testing::internal::TestSuiteNameIs> (&local_a8,&local_b0,&local_b8,local_a0); this_00 = (vector<testing::TestSuite*,std::allocator<testing::TestSuite*>> *)(this + 0xb8); std::__cxx11::string::~string(local_a0); std::__cxx11::string::~string(local_80); if (local_a8 == *(long *)this_00) { pTVar3 = (TestSuite *)operator_new(0x108); /* try { // try from 00124383 to 00124393 has its CatchHandler @ 001244af */ TestSuite::TestSuite(pTVar3,param_1,param_2,param_3,param_4); /* try { // try from 00124399 to 001243ae has its CatchHandler @ 001244ad */ local_e0 = pTVar3; std::__cxx11::string::string<std::allocator<char>> ((string *)local_d8,"*DeathTest:*DeathTest/*",&local_e1); /* try { // try from 001243af to 001243bd has its CatchHandler @ 001244a3 */ (anonymous_namespace)::UnitTestFilter::UnitTestFilter ((UnitTestFilter *)local_80,(string *)local_d8); std::__cxx11::string::~string((string *)local_d8); /* try { // try from 001243c8 to 001243d9 has its CatchHandler @ 00124494 */ std::__cxx11::string::string<std::allocator<char>>((string *)local_d8,param_1,&local_e1); /* try { // try from 001243da to 001243e8 has its CatchHandler @ 00124485 */ cVar2 = (anonymous_namespace)::UnitTestFilter::MatchesName ((UnitTestFilter *)local_80,(string *)local_d8); std::__cxx11::string::~string((string *)local_d8); if (cVar2 == '\0') { /* try { // try from 00124429 to 00124435 has its CatchHandler @ 0012447f */ std::vector<testing::TestSuite*,std::allocator<testing::TestSuite*>>::push_back (this_00,&local_e0); } else { iVar1 = *(int *)(this + 0x164); *(int *)(this + 0x164) = iVar1 + 1; /* try { // try from 0012441a to 00124426 has its CatchHandler @ 00124481 */ std::vector<testing::TestSuite*,std::allocator<testing::TestSuite*>>::insert (this_00,(long)iVar1 * 8 + 8 + *(long *)(this + 0xb8),&local_e0); } local_d8[0] = (int)((ulong)(*(long *)(this + 0xd8) - *(long *)(this + 0xd0)) >> 2); /* try { // try from 00124456 to 0012445a has its CatchHandler @ 00124483 */ std::vector<int,std::allocator<int>>::emplace_back<int> ((vector<int,std::allocator<int>> *)(this + 0xd0),local_d8); pTVar3 = local_e0; (anonymous_namespace)::UnitTestFilter::~UnitTestFilter((UnitTestFilter *)local_80); } else { pTVar3 = *(TestSuite **)(local_a8 + -8); } return pTVar3; }
16,893
my_xml_leave
eloqsql/strings/xml.c
static int my_xml_leave(MY_XML_PARSER *p, const char *str, size_t slen) { char *e, *tag; size_t glen; char s[32]; char g[32]; int rc; /* Find previous '/' or beginning */ for (e= p->attr.end; (e > p->attr.start) && (e[0] != '/') ; e--); glen= (size_t) ((e[0] == '/') ? (p->attr.end - e - 1) : p->attr.end - e); tag= e[0] == '/' ? e + 1 : e; if (str && (slen != glen || memcmp(str, tag, slen))) { mstr(s,str,sizeof(s)-1,slen); if (glen) { mstr(g, tag, sizeof(g)-1, glen); sprintf(p->errstr,"'</%s>' unexpected ('</%s>' wanted)",s,g); } else sprintf(p->errstr,"'</%s>' unexpected (END-OF-INPUT wanted)", s); return MY_XML_ERROR; } if (p->flags & MY_XML_FLAG_RELATIVE_NAMES) rc= p->leave_xml ? p->leave_xml(p, str, slen) : MY_XML_OK; else rc= (p->leave_xml ? p->leave_xml(p, p->attr.start, p->attr.end - p->attr.start) : MY_XML_OK); *e='\0'; p->attr.end= e; return rc; }
O0
c
my_xml_leave: pushq %rbp movq %rsp, %rbp subq $0xb0, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x60(%rbp) movq %rsi, -0x68(%rbp) movq %rdx, -0x70(%rbp) movq -0x60(%rbp), %rax movq 0x120(%rax), %rax movq %rax, -0x78(%rbp) movq -0x78(%rbp), %rcx movq -0x60(%rbp), %rdx xorl %eax, %eax cmpq 0x118(%rdx), %rcx movb %al, -0x8d(%rbp) jbe 0x8a26f movq -0x78(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax setne %al movb %al, -0x8d(%rbp) movb -0x8d(%rbp), %al testb $0x1, %al jne 0x8a27b jmp 0x8a28b jmp 0x8a27d movq -0x78(%rbp), %rax addq $-0x1, %rax movq %rax, -0x78(%rbp) jmp 0x8a243 movq -0x78(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax jne 0x8a2b6 movq -0x60(%rbp), %rax movq 0x120(%rax), %rax movq -0x78(%rbp), %rcx subq %rcx, %rax subq $0x1, %rax movq %rax, -0x98(%rbp) jmp 0x8a2cf movq -0x60(%rbp), %rax movq 0x120(%rax), %rax movq -0x78(%rbp), %rcx subq %rcx, %rax movq %rax, -0x98(%rbp) movq -0x98(%rbp), %rax movq %rax, -0x88(%rbp) movq -0x78(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax jne 0x8a2fa movq -0x78(%rbp), %rax addq $0x1, %rax movq %rax, -0xa0(%rbp) jmp 0x8a305 movq -0x78(%rbp), %rax movq %rax, -0xa0(%rbp) movq -0xa0(%rbp), %rax movq %rax, -0x80(%rbp) cmpq $0x0, -0x68(%rbp) je 0x8a3bd movq -0x70(%rbp), %rax cmpq -0x88(%rbp), %rax jne 0x8a33e movq -0x68(%rbp), %rdi movq -0x80(%rbp), %rsi movq -0x70(%rbp), %rdx callq 0x25140 cmpl $0x0, %eax je 0x8a3bd leaq -0x30(%rbp), %rdi movq -0x68(%rbp), %rsi movq -0x70(%rbp), %rcx movl $0x1f, %edx callq 0x8a970 cmpq $0x0, -0x88(%rbp) je 0x8a397 leaq -0x50(%rbp), %rdi movq -0x80(%rbp), %rsi movq -0x88(%rbp), %rcx movl $0x1f, %edx callq 0x8a970 movq -0x60(%rbp), %rdi addq $0x8, %rdi leaq -0x30(%rbp), %rdx leaq -0x50(%rbp), %rcx leaq 0x6b08(%rip), %rsi # 0x90e96 movb $0x0, %al callq 0x250a0 jmp 0x8a3b1 movq -0x60(%rbp), %rdi addq $0x8, %rdi leaq -0x30(%rbp), %rdx leaq 0x6b10(%rip), %rsi # 0x90eba movb $0x0, %al callq 0x250a0 movl $0x1, -0x54(%rbp) jmp 0x8a492 movq -0x60(%rbp), %rax movl (%rax), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x8a412 movq -0x60(%rbp), %rax cmpq $0x0, 0x158(%rax) je 0x8a3fa movq -0x60(%rbp), %rax movq 0x158(%rax), %rax movq -0x60(%rbp), %rdi movq -0x68(%rbp), %rsi movq -0x70(%rbp), %rdx callq *%rax movl %eax, -0xa4(%rbp) jmp 0x8a404 xorl %eax, %eax movl %eax, -0xa4(%rbp) jmp 0x8a404 movl -0xa4(%rbp), %eax movl %eax, -0x8c(%rbp) jmp 0x8a473 movq -0x60(%rbp), %rax cmpq $0x0, 0x158(%rax) je 0x8a45d movq -0x60(%rbp), %rax movq 0x158(%rax), %rax movq -0x60(%rbp), %rdi movq -0x60(%rbp), %rcx movq 0x118(%rcx), %rsi movq -0x60(%rbp), %rcx movq 0x120(%rcx), %rdx movq -0x60(%rbp), %rcx movq 0x118(%rcx), %rcx subq %rcx, %rdx callq *%rax movl %eax, -0xa8(%rbp) jmp 0x8a467 xorl %eax, %eax movl %eax, -0xa8(%rbp) jmp 0x8a467 movl -0xa8(%rbp), %eax movl %eax, -0x8c(%rbp) movq -0x78(%rbp), %rax movb $0x0, (%rax) movq -0x78(%rbp), %rcx movq -0x60(%rbp), %rax movq %rcx, 0x120(%rax) movl -0x8c(%rbp), %eax movl %eax, -0x54(%rbp) movl -0x54(%rbp), %eax movl %eax, -0xac(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x8a4bc movl -0xac(%rbp), %eax addq $0xb0, %rsp popq %rbp retq callq 0x253b0 nopw %cs:(%rax,%rax)
my_xml_leave: push rbp mov rbp, rsp sub rsp, 0B0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_60], rdi mov [rbp+var_68], rsi mov [rbp+var_70], rdx mov rax, [rbp+var_60] mov rax, [rax+120h] mov [rbp+var_78], rax loc_8A243: mov rcx, [rbp+var_78] mov rdx, [rbp+var_60] xor eax, eax cmp rcx, [rdx+118h] mov [rbp+var_8D], al jbe short loc_8A26F mov rax, [rbp+var_78] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' setnz al mov [rbp+var_8D], al loc_8A26F: mov al, [rbp+var_8D] test al, 1 jnz short loc_8A27B jmp short loc_8A28B loc_8A27B: jmp short $+2 loc_8A27D: mov rax, [rbp+var_78] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_78], rax jmp short loc_8A243 loc_8A28B: mov rax, [rbp+var_78] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jnz short loc_8A2B6 mov rax, [rbp+var_60] mov rax, [rax+120h] mov rcx, [rbp+var_78] sub rax, rcx sub rax, 1 mov [rbp+var_98], rax jmp short loc_8A2CF loc_8A2B6: mov rax, [rbp+var_60] mov rax, [rax+120h] mov rcx, [rbp+var_78] sub rax, rcx mov [rbp+var_98], rax loc_8A2CF: mov rax, [rbp+var_98] mov [rbp+var_88], rax mov rax, [rbp+var_78] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jnz short loc_8A2FA mov rax, [rbp+var_78] add rax, 1 mov [rbp+var_A0], rax jmp short loc_8A305 loc_8A2FA: mov rax, [rbp+var_78] mov [rbp+var_A0], rax loc_8A305: mov rax, [rbp+var_A0] mov [rbp+var_80], rax cmp [rbp+var_68], 0 jz loc_8A3BD mov rax, [rbp+var_70] cmp rax, [rbp+var_88] jnz short loc_8A33E mov rdi, [rbp+var_68] mov rsi, [rbp+var_80] mov rdx, [rbp+var_70] call _memcmp cmp eax, 0 jz short loc_8A3BD loc_8A33E: lea rdi, [rbp+var_30] mov rsi, [rbp+var_68] mov rcx, [rbp+var_70] mov edx, 1Fh call mstr_0 cmp [rbp+var_88], 0 jz short loc_8A397 lea rdi, [rbp+var_50] mov rsi, [rbp+var_80] mov rcx, [rbp+var_88] mov edx, 1Fh call mstr_0 mov rdi, [rbp+var_60] add rdi, 8 lea rdx, [rbp+var_30] lea rcx, [rbp+var_50] lea rsi, aSUnexpectedSWa; "'</%s>' unexpected ('</%s>' wanted)" mov al, 0 call _sprintf jmp short loc_8A3B1 loc_8A397: mov rdi, [rbp+var_60] add rdi, 8 lea rdx, [rbp+var_30] lea rsi, aSUnexpectedEnd; "'</%s>' unexpected (END-OF-INPUT wanted"... mov al, 0 call _sprintf loc_8A3B1: mov [rbp+var_54], 1 jmp loc_8A492 loc_8A3BD: mov rax, [rbp+var_60] mov eax, [rax] and eax, 1 cmp eax, 0 jz short loc_8A412 mov rax, [rbp+var_60] cmp qword ptr [rax+158h], 0 jz short loc_8A3FA mov rax, [rbp+var_60] mov rax, [rax+158h] mov rdi, [rbp+var_60] mov rsi, [rbp+var_68] mov rdx, [rbp+var_70] call rax mov [rbp+var_A4], eax jmp short loc_8A404 loc_8A3FA: xor eax, eax mov [rbp+var_A4], eax jmp short $+2 loc_8A404: mov eax, [rbp+var_A4] mov [rbp+var_8C], eax jmp short loc_8A473 loc_8A412: mov rax, [rbp+var_60] cmp qword ptr [rax+158h], 0 jz short loc_8A45D mov rax, [rbp+var_60] mov rax, [rax+158h] mov rdi, [rbp+var_60] mov rcx, [rbp+var_60] mov rsi, [rcx+118h] mov rcx, [rbp+var_60] mov rdx, [rcx+120h] mov rcx, [rbp+var_60] mov rcx, [rcx+118h] sub rdx, rcx call rax mov [rbp+var_A8], eax jmp short loc_8A467 loc_8A45D: xor eax, eax mov [rbp+var_A8], eax jmp short $+2 loc_8A467: mov eax, [rbp+var_A8] mov [rbp+var_8C], eax loc_8A473: mov rax, [rbp+var_78] mov byte ptr [rax], 0 mov rcx, [rbp+var_78] mov rax, [rbp+var_60] mov [rax+120h], rcx mov eax, [rbp+var_8C] mov [rbp+var_54], eax loc_8A492: mov eax, [rbp+var_54] mov [rbp+var_AC], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_8A4BC mov eax, [rbp+var_AC] add rsp, 0B0h pop rbp retn loc_8A4BC: call ___stack_chk_fail
long long my_xml_leave(long long a1, long long a2, long long a3) { unsigned int v4; // [rsp+8h] [rbp-A8h] unsigned int v5; // [rsp+Ch] [rbp-A4h] _BYTE *v6; // [rsp+10h] [rbp-A0h] long long v7; // [rsp+18h] [rbp-98h] bool v8; // [rsp+23h] [rbp-8Dh] unsigned int v9; // [rsp+24h] [rbp-8Ch] _BYTE *i; // [rsp+38h] [rbp-78h] char v13[32]; // [rsp+60h] [rbp-50h] BYREF char v14[40]; // [rsp+80h] [rbp-30h] BYREF unsigned long long v15; // [rsp+A8h] [rbp-8h] v15 = __readfsqword(0x28u); for ( i = *(_BYTE **)(a1 + 288); ; --i ) { v8 = 0; if ( (unsigned long long)i > *(_QWORD *)(a1 + 280) ) v8 = *i != 47; if ( !v8 ) break; } if ( *i == 47 ) v7 = *(_QWORD *)(a1 + 288) - (_QWORD)i - 1LL; else v7 = *(_QWORD *)(a1 + 288) - (_QWORD)i; if ( *i == 47 ) v6 = i + 1; else v6 = i; if ( !a2 || a3 == v7 && !(unsigned int)memcmp(a2, v6, a3) ) { if ( (*(_DWORD *)a1 & 1) != 0 ) { if ( *(_QWORD *)(a1 + 344) ) v5 = (*(long long ( **)(long long, long long, long long))(a1 + 344))(a1, a2, a3); else v5 = 0; v9 = v5; } else { if ( *(_QWORD *)(a1 + 344) ) v4 = (*(long long ( **)(long long, _QWORD, _QWORD))(a1 + 344))( a1, *(_QWORD *)(a1 + 280), *(_QWORD *)(a1 + 288) - *(_QWORD *)(a1 + 280)); else v4 = 0; v9 = v4; } *i = 0; *(_QWORD *)(a1 + 288) = i; return v9; } else { mstr_0(v14, a2, 31LL, a3); if ( v7 ) { mstr_0(v13, v6, 31LL, v7); sprintf(a1 + 8, "'</%s>' unexpected ('</%s>' wanted)", v14, v13); } else { sprintf(a1 + 8, "'</%s>' unexpected (END-OF-INPUT wanted)", v14); } return 1; } }
my_xml_leave: PUSH RBP MOV RBP,RSP SUB RSP,0xb0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x60],RDI MOV qword ptr [RBP + -0x68],RSI MOV qword ptr [RBP + -0x70],RDX MOV RAX,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RAX + 0x120] MOV qword ptr [RBP + -0x78],RAX LAB_0018a243: MOV RCX,qword ptr [RBP + -0x78] MOV RDX,qword ptr [RBP + -0x60] XOR EAX,EAX CMP RCX,qword ptr [RDX + 0x118] MOV byte ptr [RBP + -0x8d],AL JBE 0x0018a26f MOV RAX,qword ptr [RBP + -0x78] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f SETNZ AL MOV byte ptr [RBP + -0x8d],AL LAB_0018a26f: MOV AL,byte ptr [RBP + -0x8d] TEST AL,0x1 JNZ 0x0018a27b JMP 0x0018a28b LAB_0018a27b: JMP 0x0018a27d LAB_0018a27d: MOV RAX,qword ptr [RBP + -0x78] ADD RAX,-0x1 MOV qword ptr [RBP + -0x78],RAX JMP 0x0018a243 LAB_0018a28b: MOV RAX,qword ptr [RBP + -0x78] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f JNZ 0x0018a2b6 MOV RAX,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RAX + 0x120] MOV RCX,qword ptr [RBP + -0x78] SUB RAX,RCX SUB RAX,0x1 MOV qword ptr [RBP + -0x98],RAX JMP 0x0018a2cf LAB_0018a2b6: MOV RAX,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RAX + 0x120] MOV RCX,qword ptr [RBP + -0x78] SUB RAX,RCX MOV qword ptr [RBP + -0x98],RAX LAB_0018a2cf: MOV RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0x88],RAX MOV RAX,qword ptr [RBP + -0x78] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f JNZ 0x0018a2fa MOV RAX,qword ptr [RBP + -0x78] ADD RAX,0x1 MOV qword ptr [RBP + -0xa0],RAX JMP 0x0018a305 LAB_0018a2fa: MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0xa0],RAX LAB_0018a305: MOV RAX,qword ptr [RBP + -0xa0] MOV qword ptr [RBP + -0x80],RAX CMP qword ptr [RBP + -0x68],0x0 JZ 0x0018a3bd MOV RAX,qword ptr [RBP + -0x70] CMP RAX,qword ptr [RBP + -0x88] JNZ 0x0018a33e MOV RDI,qword ptr [RBP + -0x68] MOV RSI,qword ptr [RBP + -0x80] MOV RDX,qword ptr [RBP + -0x70] CALL 0x00125140 CMP EAX,0x0 JZ 0x0018a3bd LAB_0018a33e: LEA RDI,[RBP + -0x30] MOV RSI,qword ptr [RBP + -0x68] MOV RCX,qword ptr [RBP + -0x70] MOV EDX,0x1f CALL 0x0018a970 CMP qword ptr [RBP + -0x88],0x0 JZ 0x0018a397 LEA RDI,[RBP + -0x50] MOV RSI,qword ptr [RBP + -0x80] MOV RCX,qword ptr [RBP + -0x88] MOV EDX,0x1f CALL 0x0018a970 MOV RDI,qword ptr [RBP + -0x60] ADD RDI,0x8 LEA RDX,[RBP + -0x30] LEA RCX,[RBP + -0x50] LEA RSI,[0x190e96] MOV AL,0x0 CALL 0x001250a0 JMP 0x0018a3b1 LAB_0018a397: MOV RDI,qword ptr [RBP + -0x60] ADD RDI,0x8 LEA RDX,[RBP + -0x30] LEA RSI,[0x190eba] MOV AL,0x0 CALL 0x001250a0 LAB_0018a3b1: MOV dword ptr [RBP + -0x54],0x1 JMP 0x0018a492 LAB_0018a3bd: MOV RAX,qword ptr [RBP + -0x60] MOV EAX,dword ptr [RAX] AND EAX,0x1 CMP EAX,0x0 JZ 0x0018a412 MOV RAX,qword ptr [RBP + -0x60] CMP qword ptr [RAX + 0x158],0x0 JZ 0x0018a3fa MOV RAX,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RAX + 0x158] MOV RDI,qword ptr [RBP + -0x60] MOV RSI,qword ptr [RBP + -0x68] MOV RDX,qword ptr [RBP + -0x70] CALL RAX MOV dword ptr [RBP + -0xa4],EAX JMP 0x0018a404 LAB_0018a3fa: XOR EAX,EAX MOV dword ptr [RBP + -0xa4],EAX JMP 0x0018a404 LAB_0018a404: MOV EAX,dword ptr [RBP + -0xa4] MOV dword ptr [RBP + -0x8c],EAX JMP 0x0018a473 LAB_0018a412: MOV RAX,qword ptr [RBP + -0x60] CMP qword ptr [RAX + 0x158],0x0 JZ 0x0018a45d MOV RAX,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RAX + 0x158] MOV RDI,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RBP + -0x60] MOV RSI,qword ptr [RCX + 0x118] MOV RCX,qword ptr [RBP + -0x60] MOV RDX,qword ptr [RCX + 0x120] MOV RCX,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RCX + 0x118] SUB RDX,RCX CALL RAX MOV dword ptr [RBP + -0xa8],EAX JMP 0x0018a467 LAB_0018a45d: XOR EAX,EAX MOV dword ptr [RBP + -0xa8],EAX JMP 0x0018a467 LAB_0018a467: MOV EAX,dword ptr [RBP + -0xa8] MOV dword ptr [RBP + -0x8c],EAX LAB_0018a473: MOV RAX,qword ptr [RBP + -0x78] MOV byte ptr [RAX],0x0 MOV RCX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RAX + 0x120],RCX MOV EAX,dword ptr [RBP + -0x8c] MOV dword ptr [RBP + -0x54],EAX LAB_0018a492: MOV EAX,dword ptr [RBP + -0x54] MOV dword ptr [RBP + -0xac],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0018a4bc MOV EAX,dword ptr [RBP + -0xac] ADD RSP,0xb0 POP RBP RET LAB_0018a4bc: CALL 0x001253b0
int4 my_xml_leave(uint *param_1,void *param_2,size_t param_3) { int iVar1; long in_FS_OFFSET; bool bVar2; int4 local_b0; int4 local_ac; char *local_a8; size_t local_a0; int4 local_94; char *local_80; int4 local_5c; int1 local_58 [32]; int1 local_38 [40]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_80 = *(char **)(param_1 + 0x48); while( true ) { bVar2 = false; if (*(char **)(param_1 + 0x46) < local_80) { bVar2 = *local_80 != '/'; } if (!bVar2) break; local_80 = local_80 + -1; } if (*local_80 == '/') { local_a0 = (*(long *)(param_1 + 0x48) - (long)local_80) - 1; } else { local_a0 = *(long *)(param_1 + 0x48) - (long)local_80; } if (*local_80 == '/') { local_a8 = local_80 + 1; } else { local_a8 = local_80; } if (param_2 == (void *)0x0) { LAB_0018a3bd: if ((*param_1 & 1) == 0) { if (*(long *)(param_1 + 0x56) == 0) { local_b0 = 0; } else { local_b0 = (**(code **)(param_1 + 0x56)) (param_1,*(int8 *)(param_1 + 0x46), *(long *)(param_1 + 0x48) - *(long *)(param_1 + 0x46)); } local_94 = local_b0; } else { if (*(long *)(param_1 + 0x56) == 0) { local_ac = 0; } else { local_ac = (**(code **)(param_1 + 0x56))(param_1,param_2,param_3); } local_94 = local_ac; } *local_80 = '\0'; *(char **)(param_1 + 0x48) = local_80; local_5c = local_94; } else { if (param_3 == local_a0) { iVar1 = memcmp(param_2,local_a8,param_3); if (iVar1 == 0) goto LAB_0018a3bd; } mstr(local_38,param_2,0x1f,param_3); if (local_a0 == 0) { sprintf((char *)(param_1 + 2),"\'</%s>\' unexpected (END-OF-INPUT wanted)",local_38); } else { mstr(local_58,local_a8,0x1f,local_a0); sprintf((char *)(param_1 + 2),"\'</%s>\' unexpected (\'</%s>\' wanted)",local_38,local_58); } local_5c = 1; } if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_5c; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
16,894
JS_LoadModuleInternal
bluesky950520[P]quickjs/quickjs.c
static void JS_LoadModuleInternal(JSContext *ctx, const char *basename, const char *filename, JSValueConst *resolving_funcs) { JSValue evaluate_promise; JSModuleDef *m; JSValue ret, err, func_obj, evaluate_resolving_funcs[2]; JSValueConst func_data[3]; m = js_host_resolve_imported_module(ctx, basename, filename); if (!m) goto fail; if (js_resolve_module(ctx, m) < 0) { js_free_modules(ctx, JS_FREE_MODULE_NOT_RESOLVED); goto fail; } /* Evaluate the module code */ func_obj = JS_NewModuleValue(ctx, m); evaluate_promise = JS_EvalFunction(ctx, func_obj); if (JS_IsException(evaluate_promise)) { fail: err = JS_GetException(ctx); ret = JS_Call(ctx, resolving_funcs[1], JS_UNDEFINED, 1, (JSValueConst *)&err); JS_FreeValue(ctx, ret); /* XXX: what to do if exception ? */ JS_FreeValue(ctx, err); return; } func_obj = JS_NewModuleValue(ctx, m); func_data[0] = resolving_funcs[0]; func_data[1] = resolving_funcs[1]; func_data[2] = func_obj; evaluate_resolving_funcs[0] = JS_NewCFunctionData(ctx, js_load_module_fulfilled, 0, 0, 3, func_data); evaluate_resolving_funcs[1] = JS_NewCFunctionData(ctx, js_load_module_rejected, 0, 0, 3, func_data); JS_FreeValue(ctx, func_obj); ret = js_promise_then(ctx, evaluate_promise, 2, (JSValueConst *)evaluate_resolving_funcs); JS_FreeValue(ctx, ret); JS_FreeValue(ctx, evaluate_resolving_funcs[0]); JS_FreeValue(ctx, evaluate_resolving_funcs[1]); JS_FreeValue(ctx, evaluate_promise); }
O0
c
JS_LoadModuleInternal: subq $0x158, %rsp # imm = 0x158 movq %rdi, 0x150(%rsp) movq %rsi, 0x148(%rsp) movq %rdx, 0x140(%rsp) movq %rcx, 0x138(%rsp) movq 0x150(%rsp), %rdi movq 0x148(%rsp), %rsi movq 0x140(%rsp), %rdx callq 0x7a120 movq %rax, 0x120(%rsp) cmpq $0x0, 0x120(%rsp) jne 0x5083c jmp 0x5091f movq 0x150(%rsp), %rdi movq 0x120(%rsp), %rsi callq 0x510d0 cmpl $0x0, %eax jge 0x5086d movq 0x150(%rsp), %rdi movl $0x1, %esi callq 0x2e0f0 jmp 0x5091f movq 0x150(%rsp), %rdi movq 0x120(%rsp), %rsi callq 0x7a2e0 movq %rax, 0x90(%rsp) movq %rdx, 0x98(%rsp) movq 0x90(%rsp), %rax movq %rax, 0xf0(%rsp) movq 0x98(%rsp), %rax movq %rax, 0xf8(%rsp) movq 0x150(%rsp), %rdi movq 0xf0(%rsp), %rsi movq 0xf8(%rsp), %rdx callq 0x50c10 movq %rax, 0x80(%rsp) movq %rdx, 0x88(%rsp) movq 0x80(%rsp), %rax movq %rax, 0x128(%rsp) movq 0x88(%rsp), %rax movq %rax, 0x130(%rsp) movq 0x128(%rsp), %rdi movq 0x130(%rsp), %rsi callq 0x29fb0 cmpl $0x0, %eax je 0x509fd jmp 0x5091f movq 0x150(%rsp), %rdi callq 0x33260 movq %rax, 0x70(%rsp) movq %rdx, 0x78(%rsp) movq 0x70(%rsp), %rax movq %rax, 0x100(%rsp) movq 0x78(%rsp), %rax movq %rax, 0x108(%rsp) movq 0x150(%rsp), %rdi movq 0x138(%rsp), %rax movl $0x0, 0x50(%rsp) movq $0x3, 0x58(%rsp) movq 0x10(%rax), %rsi movq 0x18(%rax), %rdx movq 0x50(%rsp), %rcx movq 0x58(%rsp), %r8 movl $0x1, %r9d leaq 0x100(%rsp), %rax movq %rax, (%rsp) callq 0x40340 movq %rax, 0x60(%rsp) movq %rdx, 0x68(%rsp) movq 0x60(%rsp), %rax movq %rax, 0x110(%rsp) movq 0x68(%rsp), %rax movq %rax, 0x118(%rsp) movq 0x150(%rsp), %rdi movq 0x110(%rsp), %rsi movq 0x118(%rsp), %rdx callq 0x29f80 movq 0x150(%rsp), %rdi movq 0x100(%rsp), %rsi movq 0x108(%rsp), %rdx callq 0x29f80 jmp 0x50c08 movq 0x150(%rsp), %rdi movq 0x120(%rsp), %rsi callq 0x7a2e0 movq %rax, 0x40(%rsp) movq %rdx, 0x48(%rsp) movq 0x40(%rsp), %rax movq %rax, 0xf0(%rsp) movq 0x48(%rsp), %rax movq %rax, 0xf8(%rsp) movq 0x138(%rsp), %rax movq (%rax), %rcx movq %rcx, 0xa0(%rsp) movq 0x8(%rax), %rax movq %rax, 0xa8(%rsp) movq 0x138(%rsp), %rax movq 0x10(%rax), %rcx movq %rcx, 0xb0(%rsp) movq 0x18(%rax), %rax movq %rax, 0xb8(%rsp) movq 0xf0(%rsp), %rax movq %rax, 0xc0(%rsp) movq 0xf8(%rsp), %rax movq %rax, 0xc8(%rsp) movq 0x150(%rsp), %rdi leaq 0xa0(%rsp), %r9 leaq 0x29884(%rip), %rsi # 0x7a330 xorl %ecx, %ecx movl $0x3, %r8d movl %ecx, %edx callq 0x30aa0 movq %rax, 0x30(%rsp) movq %rdx, 0x38(%rsp) movq 0x30(%rsp), %rax movq %rax, 0xd0(%rsp) movq 0x38(%rsp), %rax movq %rax, 0xd8(%rsp) movq 0x150(%rsp), %rdi leaq 0xa0(%rsp), %r9 leaq 0x29a2a(%rip), %rsi # 0x7a520 xorl %ecx, %ecx movl $0x3, %r8d movl %ecx, %edx callq 0x30aa0 movq %rax, 0x20(%rsp) movq %rdx, 0x28(%rsp) movq 0x20(%rsp), %rax movq %rax, 0xe0(%rsp) movq 0x28(%rsp), %rax movq %rax, 0xe8(%rsp) movq 0x150(%rsp), %rdi movq 0xf0(%rsp), %rsi movq 0xf8(%rsp), %rdx callq 0x29f80 movq 0x150(%rsp), %rdi leaq 0xd0(%rsp), %r8 movq 0x128(%rsp), %rsi movq 0x130(%rsp), %rdx movl $0x2, %ecx callq 0x7a650 movq %rax, 0x10(%rsp) movq %rdx, 0x18(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x110(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x118(%rsp) movq 0x150(%rsp), %rdi movq 0x110(%rsp), %rsi movq 0x118(%rsp), %rdx callq 0x29f80 movq 0x150(%rsp), %rdi movq 0xd0(%rsp), %rsi movq 0xd8(%rsp), %rdx callq 0x29f80 movq 0x150(%rsp), %rdi movq 0xe0(%rsp), %rsi movq 0xe8(%rsp), %rdx callq 0x29f80 movq 0x150(%rsp), %rdi movq 0x128(%rsp), %rsi movq 0x130(%rsp), %rdx callq 0x29f80 addq $0x158, %rsp # imm = 0x158 retq
JS_LoadModuleInternal: sub rsp, 158h mov [rsp+158h+var_8], rdi mov [rsp+158h+var_10], rsi mov [rsp+158h+var_18], rdx mov [rsp+158h+var_20], rcx mov rdi, [rsp+158h+var_8] mov rsi, [rsp+158h+var_10] mov rdx, [rsp+158h+var_18] call js_host_resolve_imported_module mov [rsp+158h+var_38], rax cmp [rsp+158h+var_38], 0 jnz short loc_5083C jmp loc_5091F loc_5083C: mov rdi, [rsp+158h+var_8] mov rsi, [rsp+158h+var_38] call js_resolve_module cmp eax, 0 jge short loc_5086D mov rdi, [rsp+158h+var_8] mov esi, 1 call js_free_modules jmp loc_5091F loc_5086D: mov rdi, [rsp+158h+var_8] mov rsi, [rsp+158h+var_38] call JS_NewModuleValue mov [rsp+158h+var_C8], rax mov [rsp+158h+var_C0], rdx mov rax, [rsp+158h+var_C8] mov [rsp+158h+var_68], rax mov rax, [rsp+158h+var_C0] mov [rsp+158h+var_60], rax mov rdi, [rsp+158h+var_8] mov rsi, [rsp+158h+var_68] mov rdx, [rsp+158h+var_60] call JS_EvalFunction mov [rsp+158h+var_D8], rax mov [rsp+158h+var_D0], rdx mov rax, [rsp+158h+var_D8] mov [rsp+158h+var_30], rax mov rax, [rsp+158h+var_D0] mov [rsp+158h+var_28], rax mov rdi, [rsp+158h+var_30] mov rsi, [rsp+158h+var_28] call JS_IsException_1 cmp eax, 0 jz loc_509FD jmp short $+2 loc_5091F: mov rdi, [rsp+158h+var_8] call JS_GetException mov [rsp+158h+var_E8], rax mov [rsp+158h+var_E0], rdx mov rax, [rsp+158h+var_E8] mov [rsp+158h+var_58], rax mov rax, [rsp+158h+var_E0] mov [rsp+158h+var_50], rax mov rdi, [rsp+158h+var_8] mov rax, [rsp+158h+var_20] mov dword ptr [rsp+158h+var_108], 0 mov [rsp+158h+var_100], 3 mov rsi, [rax+10h] mov rdx, [rax+18h] mov rcx, [rsp+158h+var_108] mov r8, [rsp+158h+var_100] mov r9d, 1 lea rax, [rsp+158h+var_58] mov [rsp+158h+var_158], rax call JS_Call mov [rsp+158h+var_F8], rax mov [rsp+158h+var_F0], rdx mov rax, [rsp+158h+var_F8] mov [rsp+158h+var_48], rax mov rax, [rsp+158h+var_F0] mov [rsp+158h+var_40], rax mov rdi, [rsp+158h+var_8] mov rsi, [rsp+158h+var_48] mov rdx, [rsp+158h+var_40] call JS_FreeValue mov rdi, [rsp+158h+var_8] mov rsi, [rsp+158h+var_58] mov rdx, [rsp+158h+var_50] call JS_FreeValue jmp loc_50C08 loc_509FD: mov rdi, [rsp+158h+var_8] mov rsi, [rsp+158h+var_38] call JS_NewModuleValue mov [rsp+158h+var_118], rax mov [rsp+158h+var_110], rdx mov rax, [rsp+158h+var_118] mov [rsp+158h+var_68], rax mov rax, [rsp+158h+var_110] mov [rsp+158h+var_60], rax mov rax, [rsp+158h+var_20] mov rcx, [rax] mov [rsp+158h+var_B8], rcx mov rax, [rax+8] mov [rsp+158h+var_B0], rax mov rax, [rsp+158h+var_20] mov rcx, [rax+10h] mov [rsp+158h+var_A8], rcx mov rax, [rax+18h] mov [rsp+158h+var_A0], rax mov rax, [rsp+158h+var_68] mov [rsp+158h+var_98], rax mov rax, [rsp+158h+var_60] mov [rsp+158h+var_90], rax mov rdi, [rsp+158h+var_8] lea r9, [rsp+158h+var_B8] lea rsi, js_load_module_fulfilled xor ecx, ecx mov r8d, 3 mov edx, ecx call JS_NewCFunctionData mov [rsp+158h+var_128], rax mov [rsp+158h+var_120], rdx mov rax, [rsp+158h+var_128] mov [rsp+158h+var_88], rax mov rax, [rsp+158h+var_120] mov [rsp+158h+var_80], rax mov rdi, [rsp+158h+var_8] lea r9, [rsp+158h+var_B8] lea rsi, js_load_module_rejected xor ecx, ecx mov r8d, 3 mov edx, ecx call JS_NewCFunctionData mov [rsp+158h+var_138], rax mov [rsp+158h+var_130], rdx mov rax, [rsp+158h+var_138] mov [rsp+158h+var_78], rax mov rax, [rsp+158h+var_130] mov [rsp+158h+var_70], rax mov rdi, [rsp+158h+var_8] mov rsi, [rsp+158h+var_68] mov rdx, [rsp+158h+var_60] call JS_FreeValue mov rdi, [rsp+158h+var_8] lea r8, [rsp+158h+var_88] mov rsi, [rsp+158h+var_30] mov rdx, [rsp+158h+var_28] mov ecx, 2 call js_promise_then mov [rsp+158h+var_148], rax mov [rsp+158h+var_140], rdx mov rax, [rsp+158h+var_148] mov [rsp+158h+var_48], rax mov rax, [rsp+158h+var_140] mov [rsp+158h+var_40], rax mov rdi, [rsp+158h+var_8] mov rsi, [rsp+158h+var_48] mov rdx, [rsp+158h+var_40] call JS_FreeValue mov rdi, [rsp+158h+var_8] mov rsi, [rsp+158h+var_88] mov rdx, [rsp+158h+var_80] call JS_FreeValue mov rdi, [rsp+158h+var_8] mov rsi, [rsp+158h+var_78] mov rdx, [rsp+158h+var_70] call JS_FreeValue mov rdi, [rsp+158h+var_8] mov rsi, [rsp+158h+var_30] mov rdx, [rsp+158h+var_28] call JS_FreeValue loc_50C08: add rsp, 158h retn
long long JS_LoadModuleInternal(long long a1, long long a2, long long a3, _QWORD *a4) { long long v4; // rdx long long v5; // rdx long long v6; // rdx long long v7; // rdx long long v9; // rdx long long v10; // rdx long long v11; // rdx long long v12; // rdx _QWORD v13[6]; // [rsp+A0h] [rbp-B8h] BYREF long long v14; // [rsp+D0h] [rbp-88h] BYREF long long v15; // [rsp+D8h] [rbp-80h] long long v16; // [rsp+E0h] [rbp-78h] long long v17; // [rsp+E8h] [rbp-70h] long long v18; // [rsp+F0h] [rbp-68h] long long v19; // [rsp+F8h] [rbp-60h] long long Exception; // [rsp+100h] [rbp-58h] BYREF long long v21; // [rsp+108h] [rbp-50h] long long v22; // [rsp+110h] [rbp-48h] long long v23; // [rsp+118h] [rbp-40h] long long v24; // [rsp+120h] [rbp-38h] long long v25; // [rsp+128h] [rbp-30h] long long v26; // [rsp+130h] [rbp-28h] _QWORD *v27; // [rsp+138h] [rbp-20h] long long v28; // [rsp+140h] [rbp-18h] long long v29; // [rsp+148h] [rbp-10h] long long v30; // [rsp+150h] [rbp-8h] v30 = a1; v29 = a2; v28 = a3; v27 = a4; v24 = js_host_resolve_imported_module(a1, a2, a3); if ( !v24 ) goto LABEL_5; if ( (int)js_resolve_module(v30, v24) < 0 ) { js_free_modules(v30, 1); LABEL_5: Exception = JS_GetException(v30); v21 = v6; v22 = JS_Call(v30, v27[2], v27[3], 0, 3, 1, (long long)&Exception); v23 = v7; JS_FreeValue(v30, v22, v7); return JS_FreeValue(v30, Exception, v21); } v18 = JS_NewModuleValue(v30, v24); v19 = v4; v25 = JS_EvalFunction(v30, v18, v4); v26 = v5; if ( JS_IsException_1(v25, v5) ) goto LABEL_5; v18 = JS_NewModuleValue(v30, v24); v19 = v9; v13[0] = *v27; v13[1] = v27[1]; v13[2] = v27[2]; v13[3] = v27[3]; v13[4] = v18; v13[5] = v9; v14 = JS_NewCFunctionData(v30, (long long)js_load_module_fulfilled, 0, 0, 3, (long long)v13); v15 = v10; v16 = JS_NewCFunctionData(v30, (long long)js_load_module_rejected, 0, 0, 3, (long long)v13); v17 = v11; JS_FreeValue(v30, v18, v19); v22 = js_promise_then(v30, v25, v26, 2LL, &v14); v23 = v12; JS_FreeValue(v30, v22, v12); JS_FreeValue(v30, v14, v15); JS_FreeValue(v30, v16, v17); return JS_FreeValue(v30, v25, v26); }
JS_LoadModuleInternal: SUB RSP,0x158 MOV qword ptr [RSP + 0x150],RDI MOV qword ptr [RSP + 0x148],RSI MOV qword ptr [RSP + 0x140],RDX MOV qword ptr [RSP + 0x138],RCX MOV RDI,qword ptr [RSP + 0x150] MOV RSI,qword ptr [RSP + 0x148] MOV RDX,qword ptr [RSP + 0x140] CALL 0x0017a120 MOV qword ptr [RSP + 0x120],RAX CMP qword ptr [RSP + 0x120],0x0 JNZ 0x0015083c JMP 0x0015091f LAB_0015083c: MOV RDI,qword ptr [RSP + 0x150] MOV RSI,qword ptr [RSP + 0x120] CALL 0x001510d0 CMP EAX,0x0 JGE 0x0015086d MOV RDI,qword ptr [RSP + 0x150] MOV ESI,0x1 CALL 0x0012e0f0 JMP 0x0015091f LAB_0015086d: MOV RDI,qword ptr [RSP + 0x150] MOV RSI,qword ptr [RSP + 0x120] CALL 0x0017a2e0 MOV qword ptr [RSP + 0x90],RAX MOV qword ptr [RSP + 0x98],RDX MOV RAX,qword ptr [RSP + 0x90] MOV qword ptr [RSP + 0xf0],RAX MOV RAX,qword ptr [RSP + 0x98] MOV qword ptr [RSP + 0xf8],RAX MOV RDI,qword ptr [RSP + 0x150] MOV RSI,qword ptr [RSP + 0xf0] MOV RDX,qword ptr [RSP + 0xf8] CALL 0x00150c10 MOV qword ptr [RSP + 0x80],RAX MOV qword ptr [RSP + 0x88],RDX MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x128],RAX MOV RAX,qword ptr [RSP + 0x88] MOV qword ptr [RSP + 0x130],RAX MOV RDI,qword ptr [RSP + 0x128] MOV RSI,qword ptr [RSP + 0x130] CALL 0x00129fb0 CMP EAX,0x0 JZ 0x001509fd JMP 0x0015091f LAB_0015091f: MOV RDI,qword ptr [RSP + 0x150] CALL 0x00133260 MOV qword ptr [RSP + 0x70],RAX MOV qword ptr [RSP + 0x78],RDX MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x100],RAX MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x108],RAX MOV RDI,qword ptr [RSP + 0x150] MOV RAX,qword ptr [RSP + 0x138] MOV dword ptr [RSP + 0x50],0x0 MOV qword ptr [RSP + 0x58],0x3 MOV RSI,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RSP + 0x50] MOV R8,qword ptr [RSP + 0x58] MOV R9D,0x1 LEA RAX,[RSP + 0x100] MOV qword ptr [RSP],RAX CALL 0x00140340 MOV qword ptr [RSP + 0x60],RAX MOV qword ptr [RSP + 0x68],RDX MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x110],RAX MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x118],RAX MOV RDI,qword ptr [RSP + 0x150] MOV RSI,qword ptr [RSP + 0x110] MOV RDX,qword ptr [RSP + 0x118] CALL 0x00129f80 MOV RDI,qword ptr [RSP + 0x150] MOV RSI,qword ptr [RSP + 0x100] MOV RDX,qword ptr [RSP + 0x108] CALL 0x00129f80 JMP 0x00150c08 LAB_001509fd: MOV RDI,qword ptr [RSP + 0x150] MOV RSI,qword ptr [RSP + 0x120] CALL 0x0017a2e0 MOV qword ptr [RSP + 0x40],RAX MOV qword ptr [RSP + 0x48],RDX MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0xf0],RAX MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0xf8],RAX MOV RAX,qword ptr [RSP + 0x138] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP + 0xa0],RCX MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0xa8],RAX MOV RAX,qword ptr [RSP + 0x138] MOV RCX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0xb0],RCX MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0xb8],RAX MOV RAX,qword ptr [RSP + 0xf0] MOV qword ptr [RSP + 0xc0],RAX MOV RAX,qword ptr [RSP + 0xf8] MOV qword ptr [RSP + 0xc8],RAX MOV RDI,qword ptr [RSP + 0x150] LEA R9,[RSP + 0xa0] LEA RSI,[0x17a330] XOR ECX,ECX MOV R8D,0x3 MOV EDX,ECX CALL 0x00130aa0 MOV qword ptr [RSP + 0x30],RAX MOV qword ptr [RSP + 0x38],RDX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0xd0],RAX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0xd8],RAX MOV RDI,qword ptr [RSP + 0x150] LEA R9,[RSP + 0xa0] LEA RSI,[0x17a520] XOR ECX,ECX MOV R8D,0x3 MOV EDX,ECX CALL 0x00130aa0 MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RSP + 0x28],RDX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0xe0],RAX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0xe8],RAX MOV RDI,qword ptr [RSP + 0x150] MOV RSI,qword ptr [RSP + 0xf0] MOV RDX,qword ptr [RSP + 0xf8] CALL 0x00129f80 MOV RDI,qword ptr [RSP + 0x150] LEA R8,[RSP + 0xd0] MOV RSI,qword ptr [RSP + 0x128] MOV RDX,qword ptr [RSP + 0x130] MOV ECX,0x2 CALL 0x0017a650 MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x18],RDX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x110],RAX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x118],RAX MOV RDI,qword ptr [RSP + 0x150] MOV RSI,qword ptr [RSP + 0x110] MOV RDX,qword ptr [RSP + 0x118] CALL 0x00129f80 MOV RDI,qword ptr [RSP + 0x150] MOV RSI,qword ptr [RSP + 0xd0] MOV RDX,qword ptr [RSP + 0xd8] CALL 0x00129f80 MOV RDI,qword ptr [RSP + 0x150] MOV RSI,qword ptr [RSP + 0xe0] MOV RDX,qword ptr [RSP + 0xe8] CALL 0x00129f80 MOV RDI,qword ptr [RSP + 0x150] MOV RSI,qword ptr [RSP + 0x128] MOV RDX,qword ptr [RSP + 0x130] CALL 0x00129f80 LAB_00150c08: ADD RSP,0x158 RET
void JS_LoadModuleInternal (int8 param_1,int8 param_2,int8 param_3,int8 *param_4) { int iVar1; uint uStack_104; int8 local_b8; int8 local_b0; int8 local_a8; int8 local_a0; int1 local_98 [16]; int1 local_88 [16]; int1 local_78 [16]; int1 local_68 [16]; int1 local_58 [16]; int1 local_48 [16]; long local_38; int1 local_30 [16]; int8 *local_20; int8 local_18; int8 local_10; int8 local_8; local_20 = param_4; local_18 = param_3; local_10 = param_2; local_8 = param_1; local_38 = js_host_resolve_imported_module(param_1,param_2,param_3); if (local_38 != 0) { iVar1 = js_resolve_module(local_8,local_38); if (iVar1 < 0) { js_free_modules(local_8,1); } else { local_68 = JS_NewModuleValue(local_8,local_38); local_30 = JS_EvalFunction(local_8,local_68._0_8_,local_68._8_8_); iVar1 = JS_IsException(local_30._0_8_,local_30._8_8_); if (iVar1 == 0) { local_98 = JS_NewModuleValue(local_8,local_38); local_b8 = *local_20; local_b0 = local_20[1]; local_a8 = local_20[2]; local_a0 = local_20[3]; local_68 = local_98; local_88 = JS_NewCFunctionData(local_8,js_load_module_fulfilled,0,0,3,&local_b8); local_78 = JS_NewCFunctionData(local_8,js_load_module_rejected,0,0,3,&local_b8); JS_FreeValue(local_8,local_68._0_8_,local_68._8_8_); local_48 = js_promise_then(local_8,local_30._0_8_,local_30._8_8_,2,local_88); JS_FreeValue(local_8,local_48._0_8_,local_48._8_8_); JS_FreeValue(local_8,local_88._0_8_,local_88._8_8_); JS_FreeValue(local_8,local_78._0_8_,local_78._8_8_); JS_FreeValue(local_8,local_30._0_8_,local_30._8_8_); return; } } } local_58 = JS_GetException(local_8); local_48 = JS_Call(local_8,local_20[2],local_20[3],(ulong)uStack_104 << 0x20,3,1,local_58); JS_FreeValue(local_8,local_48._0_8_,local_48._8_8_); JS_FreeValue(local_8,local_58._0_8_,local_58._8_8_); return; }
16,895
OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::populateBaseLevel(OpenSubdiv::v3_6_0::Far::TopologyRefiner&, OpenSubdiv::v3_6_0::Far::TopologyDescriptor const&, OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::Options)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/../far/../far/topologyRefinerFactory.h
bool TopologyRefinerFactory<MESH>::populateBaseLevel(TopologyRefiner& refiner, MESH const& mesh, Options options) { // // Construction of a specialized topology refiner involves four steps, each of which // involves a method specialized for MESH followed by one that takes an action in // response to it or in preparation for the next step. // // Both the specialized methods and those that follow them may find fault in the // construction and trigger failure at any time: // // // Sizing of the topology -- this is a required specialization for MESH. This defines // an inventory of all components and their relations that is used to allocate buffers // to be efficiently populated in the subsequent topology assignment step. // if (! resizeComponentTopology(refiner, mesh)) return false; if (! prepareComponentTopologySizing(refiner)) return false; // // Assignment of the topology -- this is a required specialization for MESH. If edges // are specified, all other topological relations are expected to be defined for them. // Otherwise edges and remaining topology will be completed from the face-vertices: // bool validate = options.validateFullTopology; TopologyCallback callback = reinterpret_cast<TopologyCallback>(reportInvalidTopologyAdapter); void const * userData = &mesh; if (! assignComponentTopology(refiner, mesh)) return false; if (! prepareComponentTopologyAssignment(refiner, validate, callback, userData)) return false; // // User assigned and internal tagging of components -- an optional specialization for // MESH. Allows the specification of sharpness values, holes, etc. // if (! assignComponentTags(refiner, mesh)) return false; if (! prepareComponentTagsAndSharpness(refiner)) return false; // // Defining channels of face-varying primvar data -- an optional specialization for MESH. // if (! assignFaceVaryingTopology(refiner, mesh)) return false; if (! prepareFaceVaryingChannels(refiner)) return false; return true; }
O0
c
OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::populateBaseLevel(OpenSubdiv::v3_6_0::Far::TopologyRefiner&, OpenSubdiv::v3_6_0::Far::TopologyDescriptor const&, OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::Options): pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdx, -0x20(%rbp) movl %ecx, -0x18(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x10(%rbp) movl -0x18(%rbp), %eax movl %eax, -0x8(%rbp) movq %rdi, -0x28(%rbp) movq %rsi, -0x30(%rbp) movq -0x28(%rbp), %rdi movq -0x30(%rbp), %rsi callq 0xca6f0 testb $0x1, %al jne 0x19099f movb $0x0, -0x1(%rbp) jmp 0x190a6d movq -0x28(%rbp), %rdi callq 0xd7a60 testb $0x1, %al jne 0x1909b5 movb $0x0, -0x1(%rbp) jmp 0x190a6d movb -0x8(%rbp), %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movb %al, -0x31(%rbp) movq 0xb05a1(%rip), %rax # 0x240f70 movq %rax, -0x40(%rbp) movq -0x30(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x28(%rbp), %rdi movq -0x30(%rbp), %rsi callq 0xccf70 testb $0x1, %al jne 0x1909f2 movb $0x0, -0x1(%rbp) jmp 0x190a6d movq -0x28(%rbp), %rdi movb -0x31(%rbp), %al movq -0x40(%rbp), %rdx movq -0x48(%rbp), %rcx andb $0x1, %al movzbl %al, %esi callq 0xc3750 testb $0x1, %al jne 0x190a15 movb $0x0, -0x1(%rbp) jmp 0x190a6d movq -0x28(%rbp), %rdi movq -0x30(%rbp), %rsi callq 0xd0780 testb $0x1, %al jne 0x190a2c movb $0x0, -0x1(%rbp) jmp 0x190a6d movq -0x28(%rbp), %rdi callq 0xd5400 testb $0x1, %al jne 0x190a3f movb $0x0, -0x1(%rbp) jmp 0x190a6d movq -0x28(%rbp), %rdi movq -0x30(%rbp), %rsi callq 0xd4400 testb $0x1, %al jne 0x190a56 movb $0x0, -0x1(%rbp) jmp 0x190a6d movq -0x28(%rbp), %rdi callq 0xcb670 testb $0x1, %al jne 0x190a69 movb $0x0, -0x1(%rbp) jmp 0x190a6d movb $0x1, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x50, %rsp popq %rbp retq nopl (%rax,%rax)
_ZN10OpenSubdiv6v3_6_03Far22TopologyRefinerFactoryINS1_18TopologyDescriptorEE17populateBaseLevelERNS1_15TopologyRefinerERKS3_NS4_7OptionsE: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_20], rdx mov [rbp+var_18], ecx mov rax, [rbp+var_20] mov [rbp+var_10], rax mov eax, [rbp+var_18] mov [rbp+var_8], eax mov [rbp+var_28], rdi mov [rbp+var_30], rsi mov rdi, [rbp+var_28] mov rsi, [rbp+var_30]; OpenSubdiv::v3_6_0::Far::TopologyRefiner * call __ZN10OpenSubdiv6v3_6_03Far22TopologyRefinerFactoryINS1_18TopologyDescriptorEE23resizeComponentTopologyERNS1_15TopologyRefinerERKS3_; OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::resizeComponentTopology(OpenSubdiv::v3_6_0::Far::TopologyRefiner &,OpenSubdiv::v3_6_0::Far::TopologyDescriptor const&) test al, 1 jnz short loc_19099F mov [rbp+var_1], 0 jmp loc_190A6D loc_19099F: mov rdi, [rbp+var_28]; this call __ZN10OpenSubdiv6v3_6_03Far26TopologyRefinerFactoryBase30prepareComponentTopologySizingERNS1_15TopologyRefinerE; OpenSubdiv::v3_6_0::Far::TopologyRefinerFactoryBase::prepareComponentTopologySizing(OpenSubdiv::v3_6_0::Far::TopologyRefiner &) test al, 1 jnz short loc_1909B5 mov [rbp+var_1], 0 jmp loc_190A6D loc_1909B5: mov al, byte ptr [rbp+var_8] and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 mov [rbp+var_31], al mov rax, cs:_ZN10OpenSubdiv6v3_6_03Far22TopologyRefinerFactoryINS1_18TopologyDescriptorEE28reportInvalidTopologyAdapterENS0_3Vtr8internal5Level13TopologyErrorEPKcPKS3__ptr mov [rbp+var_40], rax mov rax, [rbp+var_30] mov [rbp+var_48], rax mov rdi, [rbp+var_28] mov rsi, [rbp+var_30] call __ZN10OpenSubdiv6v3_6_03Far22TopologyRefinerFactoryINS1_18TopologyDescriptorEE23assignComponentTopologyERNS1_15TopologyRefinerERKS3_; OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::assignComponentTopology(OpenSubdiv::v3_6_0::Far::TopologyRefiner &,OpenSubdiv::v3_6_0::Far::TopologyDescriptor const&) test al, 1 jnz short loc_1909F2 mov [rbp+var_1], 0 jmp short loc_190A6D loc_1909F2: mov rdi, [rbp+var_28] mov al, [rbp+var_31] mov rdx, [rbp+var_40] mov rcx, [rbp+var_48] and al, 1 movzx esi, al call __ZN10OpenSubdiv6v3_6_03Far26TopologyRefinerFactoryBase34prepareComponentTopologyAssignmentERNS1_15TopologyRefinerEbPFvNS0_3Vtr8internal5Level13TopologyErrorEPKcPKvESC_; OpenSubdiv::v3_6_0::Far::TopologyRefinerFactoryBase::prepareComponentTopologyAssignment(OpenSubdiv::v3_6_0::Far::TopologyRefiner &,bool,void (*)(OpenSubdiv::v3_6_0::Vtr::internal::Level::TopologyError,char const*,void const*),void const*) test al, 1 jnz short loc_190A15 mov [rbp+var_1], 0 jmp short loc_190A6D loc_190A15: mov rdi, [rbp+var_28] mov rsi, [rbp+var_30]; OpenSubdiv::v3_6_0::Far::TopologyRefiner * call __ZN10OpenSubdiv6v3_6_03Far22TopologyRefinerFactoryINS1_18TopologyDescriptorEE19assignComponentTagsERNS1_15TopologyRefinerERKS3_; OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::assignComponentTags(OpenSubdiv::v3_6_0::Far::TopologyRefiner &,OpenSubdiv::v3_6_0::Far::TopologyDescriptor const&) test al, 1 jnz short loc_190A2C mov [rbp+var_1], 0 jmp short loc_190A6D loc_190A2C: mov rdi, [rbp+var_28]; this call __ZN10OpenSubdiv6v3_6_03Far26TopologyRefinerFactoryBase32prepareComponentTagsAndSharpnessERNS1_15TopologyRefinerE; OpenSubdiv::v3_6_0::Far::TopologyRefinerFactoryBase::prepareComponentTagsAndSharpness(OpenSubdiv::v3_6_0::Far::TopologyRefiner &) test al, 1 jnz short loc_190A3F mov [rbp+var_1], 0 jmp short loc_190A6D loc_190A3F: mov rdi, [rbp+var_28] mov rsi, [rbp+var_30]; OpenSubdiv::v3_6_0::Far::TopologyRefiner * call __ZN10OpenSubdiv6v3_6_03Far22TopologyRefinerFactoryINS1_18TopologyDescriptorEE25assignFaceVaryingTopologyERNS1_15TopologyRefinerERKS3_; OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::assignFaceVaryingTopology(OpenSubdiv::v3_6_0::Far::TopologyRefiner &,OpenSubdiv::v3_6_0::Far::TopologyDescriptor const&) test al, 1 jnz short loc_190A56 mov [rbp+var_1], 0 jmp short loc_190A6D loc_190A56: mov rdi, [rbp+var_28]; this call __ZN10OpenSubdiv6v3_6_03Far26TopologyRefinerFactoryBase26prepareFaceVaryingChannelsERNS1_15TopologyRefinerE; OpenSubdiv::v3_6_0::Far::TopologyRefinerFactoryBase::prepareFaceVaryingChannels(OpenSubdiv::v3_6_0::Far::TopologyRefiner &) test al, 1 jnz short loc_190A69 mov [rbp+var_1], 0 jmp short loc_190A6D loc_190A69: mov [rbp+var_1], 1 loc_190A6D: mov al, [rbp+var_1] and al, 1 add rsp, 50h pop rbp retn
bool OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::populateBaseLevel( OpenSubdiv::v3_6_0::Far::TopologyRefinerFactoryBase *a1, OpenSubdiv::v3_6_0::Far::TopologyRefiner *a2, long long a3, char a4) { if ( (OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::resizeComponentTopology( (long long)a1, (unsigned int *)a2) & 1) != 0 ) { if ( (OpenSubdiv::v3_6_0::Far::TopologyRefinerFactoryBase::prepareComponentTopologySizing(a1, a2) & 1) != 0 ) { if ( (OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::assignComponentTopology( (long long)a1, (long long)a2) & 1) != 0 ) { if ( (OpenSubdiv::v3_6_0::Far::TopologyRefinerFactoryBase::prepareComponentTopologyAssignment( a1, (a4 & 1) != 0, (void ( *)(long long, _BYTE *, long long))OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::reportInvalidTopologyAdapter, (long long)a2) & 1) != 0 ) { if ( (OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::assignComponentTags( (long long)a1, (long long)a2) & 1) != 0 ) return (OpenSubdiv::v3_6_0::Far::TopologyRefinerFactoryBase::prepareComponentTagsAndSharpness(a1, a2) & 1) != 0 && (OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::assignFaceVaryingTopology( (long long)a1, (long long)a2) & 1) != 0 && (OpenSubdiv::v3_6_0::Far::TopologyRefinerFactoryBase::prepareFaceVaryingChannels(a1, a2) & 1) != 0; else return 0; } else { return 0; } } else { return 0; } } else { return 0; } } else { return 0; } }
16,896
OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::populateBaseLevel(OpenSubdiv::v3_6_0::Far::TopologyRefiner&, OpenSubdiv::v3_6_0::Far::TopologyDescriptor const&, OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::Options)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/../far/../far/topologyRefinerFactory.h
bool TopologyRefinerFactory<MESH>::populateBaseLevel(TopologyRefiner& refiner, MESH const& mesh, Options options) { // // Construction of a specialized topology refiner involves four steps, each of which // involves a method specialized for MESH followed by one that takes an action in // response to it or in preparation for the next step. // // Both the specialized methods and those that follow them may find fault in the // construction and trigger failure at any time: // // // Sizing of the topology -- this is a required specialization for MESH. This defines // an inventory of all components and their relations that is used to allocate buffers // to be efficiently populated in the subsequent topology assignment step. // if (! resizeComponentTopology(refiner, mesh)) return false; if (! prepareComponentTopologySizing(refiner)) return false; // // Assignment of the topology -- this is a required specialization for MESH. If edges // are specified, all other topological relations are expected to be defined for them. // Otherwise edges and remaining topology will be completed from the face-vertices: // bool validate = options.validateFullTopology; TopologyCallback callback = reinterpret_cast<TopologyCallback>(reportInvalidTopologyAdapter); void const * userData = &mesh; if (! assignComponentTopology(refiner, mesh)) return false; if (! prepareComponentTopologyAssignment(refiner, validate, callback, userData)) return false; // // User assigned and internal tagging of components -- an optional specialization for // MESH. Allows the specification of sharpness values, holes, etc. // if (! assignComponentTags(refiner, mesh)) return false; if (! prepareComponentTagsAndSharpness(refiner)) return false; // // Defining channels of face-varying primvar data -- an optional specialization for MESH. // if (! assignFaceVaryingTopology(refiner, mesh)) return false; if (! prepareFaceVaryingChannels(refiner)) return false; return true; }
O1
c
OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::populateBaseLevel(OpenSubdiv::v3_6_0::Far::TopologyRefiner&, OpenSubdiv::v3_6_0::Far::TopologyDescriptor const&, OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::Options): pushq %rbp pushq %r14 pushq %rbx movl %ecx, %ebp movq %rsi, %r14 movq %rdi, %rbx callq 0x398a0 testb %al, %al je 0x8b447 movq %rbx, %rdi callq 0x3c4b0 testb %al, %al je 0x8b447 movq %rbx, %rdi movq %r14, %rsi callq 0x3a1c0 testb %al, %al je 0x8b447 andl $0x1, %ebp movq 0x52b78(%rip), %rdx # 0xddf78 movq %rbx, %rdi movl %ebp, %esi movq %r14, %rcx callq 0x381a0 testb %al, %al je 0x8b447 movq %rbx, %rdi movq %r14, %rsi callq 0x3ac60 testb %al, %al je 0x8b447 movq %rbx, %rdi callq 0x3bc60 testb %al, %al je 0x8b447 movq %rbx, %rdi movq %r14, %rsi callq 0x3b820 testb %al, %al je 0x8b447 movq %rbx, %rdi popq %rbx popq %r14 popq %rbp jmp 0x39c40 xorl %eax, %eax popq %rbx popq %r14 popq %rbp retq
_ZN10OpenSubdiv6v3_6_03Far22TopologyRefinerFactoryINS1_18TopologyDescriptorEE17populateBaseLevelERNS1_15TopologyRefinerERKS3_NS4_7OptionsE: push rbp push r14 push rbx mov ebp, ecx mov r14, rsi mov rbx, rdi call __ZN10OpenSubdiv6v3_6_03Far22TopologyRefinerFactoryINS1_18TopologyDescriptorEE23resizeComponentTopologyERNS1_15TopologyRefinerERKS3_; OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::resizeComponentTopology(OpenSubdiv::v3_6_0::Far::TopologyRefiner &,OpenSubdiv::v3_6_0::Far::TopologyDescriptor const&) test al, al jz short loc_8B447 mov rdi, rbx; this call __ZN10OpenSubdiv6v3_6_03Far26TopologyRefinerFactoryBase30prepareComponentTopologySizingERNS1_15TopologyRefinerE; OpenSubdiv::v3_6_0::Far::TopologyRefinerFactoryBase::prepareComponentTopologySizing(OpenSubdiv::v3_6_0::Far::TopologyRefiner &) test al, al jz short loc_8B447 mov rdi, rbx mov rsi, r14 call __ZN10OpenSubdiv6v3_6_03Far22TopologyRefinerFactoryINS1_18TopologyDescriptorEE23assignComponentTopologyERNS1_15TopologyRefinerERKS3_; OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::assignComponentTopology(OpenSubdiv::v3_6_0::Far::TopologyRefiner &,OpenSubdiv::v3_6_0::Far::TopologyDescriptor const&) test al, al jz short loc_8B447 and ebp, 1 mov rdx, cs:_ZN10OpenSubdiv6v3_6_03Far22TopologyRefinerFactoryINS1_18TopologyDescriptorEE28reportInvalidTopologyAdapterENS0_3Vtr8internal5Level13TopologyErrorEPKcPKS3__ptr mov rdi, rbx; this mov esi, ebp mov rcx, r14 call __ZN10OpenSubdiv6v3_6_03Far26TopologyRefinerFactoryBase34prepareComponentTopologyAssignmentERNS1_15TopologyRefinerEbPFvNS0_3Vtr8internal5Level13TopologyErrorEPKcPKvESC_; OpenSubdiv::v3_6_0::Far::TopologyRefinerFactoryBase::prepareComponentTopologyAssignment(OpenSubdiv::v3_6_0::Far::TopologyRefiner &,bool,void (*)(OpenSubdiv::v3_6_0::Vtr::internal::Level::TopologyError,char const*,void const*),void const*) test al, al jz short loc_8B447 mov rdi, rbx mov rsi, r14; OpenSubdiv::v3_6_0::Far::TopologyRefiner * call __ZN10OpenSubdiv6v3_6_03Far22TopologyRefinerFactoryINS1_18TopologyDescriptorEE19assignComponentTagsERNS1_15TopologyRefinerERKS3_; OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::assignComponentTags(OpenSubdiv::v3_6_0::Far::TopologyRefiner &,OpenSubdiv::v3_6_0::Far::TopologyDescriptor const&) test al, al jz short loc_8B447 mov rdi, rbx; this call __ZN10OpenSubdiv6v3_6_03Far26TopologyRefinerFactoryBase32prepareComponentTagsAndSharpnessERNS1_15TopologyRefinerE; OpenSubdiv::v3_6_0::Far::TopologyRefinerFactoryBase::prepareComponentTagsAndSharpness(OpenSubdiv::v3_6_0::Far::TopologyRefiner &) test al, al jz short loc_8B447 mov rdi, rbx mov rsi, r14; OpenSubdiv::v3_6_0::Far::TopologyRefiner * call __ZN10OpenSubdiv6v3_6_03Far22TopologyRefinerFactoryINS1_18TopologyDescriptorEE25assignFaceVaryingTopologyERNS1_15TopologyRefinerERKS3_; OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::assignFaceVaryingTopology(OpenSubdiv::v3_6_0::Far::TopologyRefiner &,OpenSubdiv::v3_6_0::Far::TopologyDescriptor const&) test al, al jz short loc_8B447 mov rdi, rbx; this pop rbx pop r14 pop rbp jmp __ZN10OpenSubdiv6v3_6_03Far26TopologyRefinerFactoryBase26prepareFaceVaryingChannelsERNS1_15TopologyRefinerE; OpenSubdiv::v3_6_0::Far::TopologyRefinerFactoryBase::prepareFaceVaryingChannels(OpenSubdiv::v3_6_0::Far::TopologyRefiner &) loc_8B447: xor eax, eax pop rbx pop r14 pop rbp retn
long long OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::populateBaseLevel( OpenSubdiv::v3_6_0::Far::TopologyRefiner *this, OpenSubdiv::v3_6_0::Far::TopologyRefiner *a2) { if ( OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::resizeComponentTopology( (long long)this, (int *)a2) && (unsigned __int8)OpenSubdiv::v3_6_0::Far::TopologyRefinerFactoryBase::prepareComponentTopologySizing(this, a2) && OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::assignComponentTopology( (long long)this, (long long)a2) && (unsigned __int8)OpenSubdiv::v3_6_0::Far::TopologyRefinerFactoryBase::prepareComponentTopologyAssignment(this) && OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::assignComponentTags( (long long)this, (long long)a2) && (unsigned __int8)OpenSubdiv::v3_6_0::Far::TopologyRefinerFactoryBase::prepareComponentTagsAndSharpness(this, a2) && OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::assignFaceVaryingTopology( (long long)this, (long long)a2) ) { return OpenSubdiv::v3_6_0::Far::TopologyRefinerFactoryBase::prepareFaceVaryingChannels(this, a2); } else { return 0LL; } }
populateBaseLevel: PUSH RBP PUSH R14 PUSH RBX MOV EBP,ECX MOV R14,RSI MOV RBX,RDI CALL 0x001398a0 TEST AL,AL JZ 0x0018b447 MOV RDI,RBX CALL 0x0013c4b0 TEST AL,AL JZ 0x0018b447 MOV RDI,RBX MOV RSI,R14 CALL 0x0013a1c0 TEST AL,AL JZ 0x0018b447 AND EBP,0x1 MOV RDX,qword ptr [0x001ddf78] MOV RDI,RBX MOV ESI,EBP MOV RCX,R14 CALL 0x001381a0 TEST AL,AL JZ 0x0018b447 MOV RDI,RBX MOV RSI,R14 CALL 0x0013ac60 TEST AL,AL JZ 0x0018b447 MOV RDI,RBX CALL 0x0013bc60 TEST AL,AL JZ 0x0018b447 MOV RDI,RBX MOV RSI,R14 CALL 0x0013b820 TEST AL,AL JZ 0x0018b447 MOV RDI,RBX POP RBX POP R14 POP RBP JMP 0x00139c40 LAB_0018b447: XOR EAX,EAX POP RBX POP R14 POP RBP RET
/* OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::populateBaseLevel(OpenSubdiv::v3_6_0::Far::TopologyRefiner&, OpenSubdiv::v3_6_0::Far::TopologyDescriptor const&, OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::Options) */ int8 __thiscall OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>:: populateBaseLevel(TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor> *this, TopologyDescriptor *param_1,int8 param_3,byte param_4) { char cVar1; int8 uVar2; cVar1 = resizeComponentTopology((TopologyRefiner *)this,param_1); if (cVar1 != '\0') { cVar1 = TopologyRefinerFactoryBase::prepareComponentTopologySizing((TopologyRefiner *)this); if (cVar1 != '\0') { cVar1 = assignComponentTopology((TopologyRefiner *)this,param_1); if (cVar1 != '\0') { cVar1 = TopologyRefinerFactoryBase::prepareComponentTopologyAssignment ((TopologyRefiner *)this,(bool)(param_4 & 1), (_func_void_TopologyError_char_ptr_void_ptr *) PTR_reportInvalidTopologyAdapter_001ddf78,param_1); if (cVar1 != '\0') { cVar1 = assignComponentTags((TopologyRefiner *)this,param_1); if (cVar1 != '\0') { cVar1 = TopologyRefinerFactoryBase::prepareComponentTagsAndSharpness ((TopologyRefiner *)this); if (cVar1 != '\0') { cVar1 = assignFaceVaryingTopology((TopologyRefiner *)this,param_1); if (cVar1 != '\0') { uVar2 = TopologyRefinerFactoryBase::prepareFaceVaryingChannels ((TopologyRefiner *)this); return uVar2; } } } } } } } return 0; }
16,897
OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::populateBaseLevel(OpenSubdiv::v3_6_0::Far::TopologyRefiner&, OpenSubdiv::v3_6_0::Far::TopologyDescriptor const&, OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::Options)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/../far/../far/topologyRefinerFactory.h
bool TopologyRefinerFactory<MESH>::populateBaseLevel(TopologyRefiner& refiner, MESH const& mesh, Options options) { // // Construction of a specialized topology refiner involves four steps, each of which // involves a method specialized for MESH followed by one that takes an action in // response to it or in preparation for the next step. // // Both the specialized methods and those that follow them may find fault in the // construction and trigger failure at any time: // // // Sizing of the topology -- this is a required specialization for MESH. This defines // an inventory of all components and their relations that is used to allocate buffers // to be efficiently populated in the subsequent topology assignment step. // if (! resizeComponentTopology(refiner, mesh)) return false; if (! prepareComponentTopologySizing(refiner)) return false; // // Assignment of the topology -- this is a required specialization for MESH. If edges // are specified, all other topological relations are expected to be defined for them. // Otherwise edges and remaining topology will be completed from the face-vertices: // bool validate = options.validateFullTopology; TopologyCallback callback = reinterpret_cast<TopologyCallback>(reportInvalidTopologyAdapter); void const * userData = &mesh; if (! assignComponentTopology(refiner, mesh)) return false; if (! prepareComponentTopologyAssignment(refiner, validate, callback, userData)) return false; // // User assigned and internal tagging of components -- an optional specialization for // MESH. Allows the specification of sharpness values, holes, etc. // if (! assignComponentTags(refiner, mesh)) return false; if (! prepareComponentTagsAndSharpness(refiner)) return false; // // Defining channels of face-varying primvar data -- an optional specialization for MESH. // if (! assignFaceVaryingTopology(refiner, mesh)) return false; if (! prepareFaceVaryingChannels(refiner)) return false; return true; }
O3
c
OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::populateBaseLevel(OpenSubdiv::v3_6_0::Far::TopologyRefiner&, OpenSubdiv::v3_6_0::Far::TopologyDescriptor const&, OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::Options): pushq %rbp pushq %r14 pushq %rbx movl %ecx, %ebp movq %rsi, %r14 movq %rdi, %rbx callq 0x39880 testb %al, %al je 0x8de11 movq %rbx, %rdi callq 0x3c460 testb %al, %al je 0x8de11 movq %rbx, %rdi movq %r14, %rsi callq 0x3a1a0 testb %al, %al je 0x8de11 andl $0x1, %ebp movq 0x541b6(%rip), %rdx # 0xe1f80 movq %rbx, %rdi movl %ebp, %esi movq %r14, %rcx callq 0x381a0 testb %al, %al je 0x8de11 movq %rbx, %rdi movq %r14, %rsi callq 0x3ac30 testb %al, %al je 0x8de11 movq %rbx, %rdi callq 0x3bc20 testb %al, %al je 0x8de11 movq %rbx, %rdi movq %r14, %rsi callq 0x3b7e0 testb %al, %al je 0x8de11 movq %rbx, %rdi popq %rbx popq %r14 popq %rbp jmp 0x39c20 xorl %eax, %eax popq %rbx popq %r14 popq %rbp retq
_ZN10OpenSubdiv6v3_6_03Far22TopologyRefinerFactoryINS1_18TopologyDescriptorEE17populateBaseLevelERNS1_15TopologyRefinerERKS3_NS4_7OptionsE: push rbp push r14 push rbx mov ebp, ecx mov r14, rsi mov rbx, rdi call __ZN10OpenSubdiv6v3_6_03Far22TopologyRefinerFactoryINS1_18TopologyDescriptorEE23resizeComponentTopologyERNS1_15TopologyRefinerERKS3_; OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::resizeComponentTopology(OpenSubdiv::v3_6_0::Far::TopologyRefiner &,OpenSubdiv::v3_6_0::Far::TopologyDescriptor const&) test al, al jz short loc_8DE11 mov rdi, rbx; this call __ZN10OpenSubdiv6v3_6_03Far26TopologyRefinerFactoryBase30prepareComponentTopologySizingERNS1_15TopologyRefinerE; OpenSubdiv::v3_6_0::Far::TopologyRefinerFactoryBase::prepareComponentTopologySizing(OpenSubdiv::v3_6_0::Far::TopologyRefiner &) test al, al jz short loc_8DE11 mov rdi, rbx mov rsi, r14 call __ZN10OpenSubdiv6v3_6_03Far22TopologyRefinerFactoryINS1_18TopologyDescriptorEE23assignComponentTopologyERNS1_15TopologyRefinerERKS3_; OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::assignComponentTopology(OpenSubdiv::v3_6_0::Far::TopologyRefiner &,OpenSubdiv::v3_6_0::Far::TopologyDescriptor const&) test al, al jz short loc_8DE11 and ebp, 1 mov rdx, cs:_ZN10OpenSubdiv6v3_6_03Far22TopologyRefinerFactoryINS1_18TopologyDescriptorEE28reportInvalidTopologyAdapterENS0_3Vtr8internal5Level13TopologyErrorEPKcPKS3__ptr mov rdi, rbx; this mov esi, ebp mov rcx, r14 call __ZN10OpenSubdiv6v3_6_03Far26TopologyRefinerFactoryBase34prepareComponentTopologyAssignmentERNS1_15TopologyRefinerEbPFvNS0_3Vtr8internal5Level13TopologyErrorEPKcPKvESC_; OpenSubdiv::v3_6_0::Far::TopologyRefinerFactoryBase::prepareComponentTopologyAssignment(OpenSubdiv::v3_6_0::Far::TopologyRefiner &,bool,void (*)(OpenSubdiv::v3_6_0::Vtr::internal::Level::TopologyError,char const*,void const*),void const*) test al, al jz short loc_8DE11 mov rdi, rbx mov rsi, r14; OpenSubdiv::v3_6_0::Far::TopologyRefiner * call __ZN10OpenSubdiv6v3_6_03Far22TopologyRefinerFactoryINS1_18TopologyDescriptorEE19assignComponentTagsERNS1_15TopologyRefinerERKS3_; OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::assignComponentTags(OpenSubdiv::v3_6_0::Far::TopologyRefiner &,OpenSubdiv::v3_6_0::Far::TopologyDescriptor const&) test al, al jz short loc_8DE11 mov rdi, rbx; this call __ZN10OpenSubdiv6v3_6_03Far26TopologyRefinerFactoryBase32prepareComponentTagsAndSharpnessERNS1_15TopologyRefinerE; OpenSubdiv::v3_6_0::Far::TopologyRefinerFactoryBase::prepareComponentTagsAndSharpness(OpenSubdiv::v3_6_0::Far::TopologyRefiner &) test al, al jz short loc_8DE11 mov rdi, rbx mov rsi, r14; OpenSubdiv::v3_6_0::Far::TopologyRefiner * call __ZN10OpenSubdiv6v3_6_03Far22TopologyRefinerFactoryINS1_18TopologyDescriptorEE25assignFaceVaryingTopologyERNS1_15TopologyRefinerERKS3_; OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::assignFaceVaryingTopology(OpenSubdiv::v3_6_0::Far::TopologyRefiner &,OpenSubdiv::v3_6_0::Far::TopologyDescriptor const&) test al, al jz short loc_8DE11 mov rdi, rbx; this pop rbx pop r14 pop rbp jmp __ZN10OpenSubdiv6v3_6_03Far26TopologyRefinerFactoryBase26prepareFaceVaryingChannelsERNS1_15TopologyRefinerE; OpenSubdiv::v3_6_0::Far::TopologyRefinerFactoryBase::prepareFaceVaryingChannels(OpenSubdiv::v3_6_0::Far::TopologyRefiner &) loc_8DE11: xor eax, eax pop rbx pop r14 pop rbp retn
long long OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::populateBaseLevel( OpenSubdiv::v3_6_0::Far::TopologyRefiner *this, OpenSubdiv::v3_6_0::Far::TopologyRefiner *a2) { if ( OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::resizeComponentTopology( (long long)this, (int *)a2) && (unsigned __int8)OpenSubdiv::v3_6_0::Far::TopologyRefinerFactoryBase::prepareComponentTopologySizing(this, a2) && OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::assignComponentTopology( (long long)this, (long long)a2) && (unsigned __int8)OpenSubdiv::v3_6_0::Far::TopologyRefinerFactoryBase::prepareComponentTopologyAssignment(this) && OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::assignComponentTags( (long long)this, (long long)a2) && (unsigned __int8)OpenSubdiv::v3_6_0::Far::TopologyRefinerFactoryBase::prepareComponentTagsAndSharpness(this, a2) && OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::assignFaceVaryingTopology( (long long)this, (long long)a2) ) { return OpenSubdiv::v3_6_0::Far::TopologyRefinerFactoryBase::prepareFaceVaryingChannels(this, a2); } else { return 0LL; } }
populateBaseLevel: PUSH RBP PUSH R14 PUSH RBX MOV EBP,ECX MOV R14,RSI MOV RBX,RDI CALL 0x00139880 TEST AL,AL JZ 0x0018de11 MOV RDI,RBX CALL 0x0013c460 TEST AL,AL JZ 0x0018de11 MOV RDI,RBX MOV RSI,R14 CALL 0x0013a1a0 TEST AL,AL JZ 0x0018de11 AND EBP,0x1 MOV RDX,qword ptr [0x001e1f80] MOV RDI,RBX MOV ESI,EBP MOV RCX,R14 CALL 0x001381a0 TEST AL,AL JZ 0x0018de11 MOV RDI,RBX MOV RSI,R14 CALL 0x0013ac30 TEST AL,AL JZ 0x0018de11 MOV RDI,RBX CALL 0x0013bc20 TEST AL,AL JZ 0x0018de11 MOV RDI,RBX MOV RSI,R14 CALL 0x0013b7e0 TEST AL,AL JZ 0x0018de11 MOV RDI,RBX POP RBX POP R14 POP RBP JMP 0x00139c20 LAB_0018de11: XOR EAX,EAX POP RBX POP R14 POP RBP RET
/* OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::populateBaseLevel(OpenSubdiv::v3_6_0::Far::TopologyRefiner&, OpenSubdiv::v3_6_0::Far::TopologyDescriptor const&, OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::Options) */ int8 __thiscall OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>:: populateBaseLevel(TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor> *this, TopologyDescriptor *param_1,int8 param_3,byte param_4) { char cVar1; int8 uVar2; cVar1 = resizeComponentTopology((TopologyRefiner *)this,param_1); if (cVar1 != '\0') { cVar1 = TopologyRefinerFactoryBase::prepareComponentTopologySizing((TopologyRefiner *)this); if (cVar1 != '\0') { cVar1 = assignComponentTopology((TopologyRefiner *)this,param_1); if (cVar1 != '\0') { cVar1 = TopologyRefinerFactoryBase::prepareComponentTopologyAssignment ((TopologyRefiner *)this,(bool)(param_4 & 1), (_func_void_TopologyError_char_ptr_void_ptr *) PTR_reportInvalidTopologyAdapter_001e1f80,param_1); if (cVar1 != '\0') { cVar1 = assignComponentTags((TopologyRefiner *)this,param_1); if (cVar1 != '\0') { cVar1 = TopologyRefinerFactoryBase::prepareComponentTagsAndSharpness ((TopologyRefiner *)this); if (cVar1 != '\0') { cVar1 = assignFaceVaryingTopology((TopologyRefiner *)this,param_1); if (cVar1 != '\0') { uVar2 = TopologyRefinerFactoryBase::prepareFaceVaryingChannels ((TopologyRefiner *)this); return uVar2; } } } } } } } return 0; }
16,898
std::vector<std::shared_ptr<ftxui::Node>, std::allocator<std::shared_ptr<ftxui::Node>>> ftxui::unpack<std::shared_ptr<ftxui::Node>>(std::shared_ptr<ftxui::Node>)
Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/include/ftxui/dom/take_any_args.hpp
Elements unpack(Args... args) { std::vector<Element> vec; (Merge(vec, std::move(args)), ...); return vec; }
O2
cpp
std::vector<std::shared_ptr<ftxui::Node>, std::allocator<std::shared_ptr<ftxui::Node>>> ftxui::unpack<std::shared_ptr<ftxui::Node>>(std::shared_ptr<ftxui::Node>): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x30, %rsp movq %rcx, %r12 movq %rdx, %r13 movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, (%rdi) andq $0x0, 0x10(%rdi) leaq 0x28(%rsp), %r14 movups (%rsi), %xmm0 andq $0x0, 0x8(%rsi) movaps %xmm0, -0x8(%r14) andq $0x0, (%rsi) leaq 0x20(%rsp), %rsi callq 0x13c72 leaq 0x18(%rsp), %r15 movups (%r13), %xmm0 andq $0x0, 0x8(%r13) movaps %xmm0, -0x8(%r15) andq $0x0, (%r13) leaq 0x10(%rsp), %rsi movq %rbx, %rdi callq 0x13c72 leaq 0x8(%rsp), %r13 movups (%r12), %xmm0 andq $0x0, 0x8(%r12) movaps %xmm0, -0x8(%r13) andq $0x0, (%r12) movq %rsp, %rsi movq %rbx, %rdi callq 0x13c72 movq %r13, %rdi callq 0x13452 movq %r15, %rdi callq 0x13452 movq %r14, %rdi callq 0x13452 movq %rbx, %rax addq $0x30, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %r12 movq %r13, %rdi callq 0x13452 jmp 0x1e4fe movq %rax, %r12 movq %r15, %rdi callq 0x13452 jmp 0x1e50b movq %rax, %r12 movq %r14, %rdi callq 0x13452 movq %rbx, %rdi callq 0x13b2c movq %r12, %rdi callq 0xc7f0 nop
_ZN5ftxui6unpackIJSt10shared_ptrINS_4NodeEES3_S3_EEESt6vectorIS3_SaIS3_EEDpT_: push r15 push r14 push r13 push r12 push rbx sub rsp, 30h mov r12, rcx mov r13, rdx mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 and qword ptr [rdi+10h], 0 lea r14, [rsp+58h+var_30] movups xmm0, xmmword ptr [rsi] and qword ptr [rsi+8], 0 movaps xmmword ptr [r14-8], xmm0 and qword ptr [rsi], 0 lea rsi, [rsp+58h+var_38] call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EE12emplace_backIJS3_EEERS3_DpOT_; std::vector<std::shared_ptr<ftxui::Node>>::emplace_back<std::shared_ptr<ftxui::Node>>(std::shared_ptr<ftxui::Node> &&) lea r15, [rsp+58h+var_40] movups xmm0, xmmword ptr [r13+0] and qword ptr [r13+8], 0 movaps xmmword ptr [r15-8], xmm0 and qword ptr [r13+0], 0 lea rsi, [rsp+58h+var_48] mov rdi, rbx call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EE12emplace_backIJS3_EEERS3_DpOT_; std::vector<std::shared_ptr<ftxui::Node>>::emplace_back<std::shared_ptr<ftxui::Node>>(std::shared_ptr<ftxui::Node> &&) lea r13, [rsp+58h+var_50] movups xmm0, xmmword ptr [r12] and qword ptr [r12+8], 0 movaps xmmword ptr [r13-8], xmm0 and qword ptr [r12], 0 mov rsi, rsp mov rdi, rbx call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EE12emplace_backIJS3_EEERS3_DpOT_; std::vector<std::shared_ptr<ftxui::Node>>::emplace_back<std::shared_ptr<ftxui::Node>>(std::shared_ptr<ftxui::Node> &&) mov rdi, r13 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, r15 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, r14 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rax, rbx add rsp, 30h pop rbx pop r12 pop r13 pop r14 pop r15 retn mov r12, rax mov rdi, r13 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp short loc_1E4FE mov r12, rax loc_1E4FE: mov rdi, r15 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp short loc_1E50B mov r12, rax loc_1E50B: mov rdi, r14 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, rbx call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() mov rdi, r12 call __Unwind_Resume
long long ftxui::unpack<std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>>( long long a1, long long a2, long long a3, long long a4) { __int128 v6; // xmm0 __int128 v7; // xmm0 __int128 v8; // xmm0 __int128 v10; // [rsp+0h] [rbp-58h] BYREF __int128 v11; // [rsp+10h] [rbp-48h] BYREF __int128 v12[3]; // [rsp+20h] [rbp-38h] BYREF *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; v6 = *(_OWORD *)a2; *(_QWORD *)(a2 + 8) = 0LL; v12[0] = v6; *(_QWORD *)a2 = 0LL; std::vector<std::shared_ptr<ftxui::Node>>::emplace_back<std::shared_ptr<ftxui::Node>>(a1, v12); v7 = *(_OWORD *)a3; *(_QWORD *)(a3 + 8) = 0LL; v11 = v7; *(_QWORD *)a3 = 0LL; std::vector<std::shared_ptr<ftxui::Node>>::emplace_back<std::shared_ptr<ftxui::Node>>(a1, &v11); v8 = *(_OWORD *)a4; *(_QWORD *)(a4 + 8) = 0LL; v10 = v8; *(_QWORD *)a4 = 0LL; std::vector<std::shared_ptr<ftxui::Node>>::emplace_back<std::shared_ptr<ftxui::Node>>(a1, &v10); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v10 + 1); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v11 + 1); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)v12 + 1); return a1; }
unpack<std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>>: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x30 MOV R12,RCX MOV R13,RDX MOV RBX,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 AND qword ptr [RDI + 0x10],0x0 LEA R14,[RSP + 0x28] MOVUPS XMM0,xmmword ptr [RSI] AND qword ptr [RSI + 0x8],0x0 MOVAPS xmmword ptr [R14 + -0x8],XMM0 AND qword ptr [RSI],0x0 LAB_0011e470: LEA RSI,[RSP + 0x20] CALL 0x00113c72 LEA R15,[RSP + 0x18] MOVUPS XMM0,xmmword ptr [R13] AND qword ptr [R13 + 0x8],0x0 MOVAPS xmmword ptr [R15 + -0x8],XMM0 AND qword ptr [R13],0x0 LAB_0011e493: LEA RSI,[RSP + 0x10] MOV RDI,RBX CALL 0x00113c72 LEA R13,[RSP + 0x8] MOVUPS XMM0,xmmword ptr [R12] AND qword ptr [R12 + 0x8],0x0 MOVAPS xmmword ptr [R13 + -0x8],XMM0 AND qword ptr [R12],0x0 LAB_0011e4ba: MOV RSI,RSP MOV RDI,RBX CALL 0x00113c72 LAB_0011e4c5: MOV RDI,R13 CALL 0x00113452 MOV RDI,R15 CALL 0x00113452 MOV RDI,R14 CALL 0x00113452 MOV RAX,RBX ADD RSP,0x30 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* std::vector<std::shared_ptr<ftxui::Node>, std::allocator<std::shared_ptr<ftxui::Node> > > ftxui::unpack<std::shared_ptr<ftxui::Node>, std::shared_ptr<ftxui::Node>, std::shared_ptr<ftxui::Node> >(std::shared_ptr<ftxui::Node>, std::shared_ptr<ftxui::Node>, std::shared_ptr<ftxui::Node>) */ ftxui * __thiscall ftxui:: unpack<std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>> (ftxui *this,int8 *param_2,int8 *param_3,int8 *param_4) { int8 local_58; int8 uStack_50; int8 local_48; int8 uStack_40; int8 local_38; int8 uStack_30; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; local_38 = *param_2; uStack_30 = param_2[1]; param_2[1] = 0; *param_2 = 0; /* try { // try from 0011e470 to 0011e479 has its CatchHandler @ 0011e508 */ std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>:: emplace_back<std::shared_ptr<ftxui::Node>> ((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *) this,(shared_ptr *)&local_38); local_48 = *param_3; uStack_40 = param_3[1]; param_3[1] = 0; *param_3 = 0; /* try { // try from 0011e493 to 0011e49f has its CatchHandler @ 0011e4fb */ std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>:: emplace_back<std::shared_ptr<ftxui::Node>> ((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *) this,(shared_ptr *)&local_48); local_58 = *param_4; uStack_50 = param_4[1]; param_4[1] = 0; *param_4 = 0; /* try { // try from 0011e4ba to 0011e4c4 has its CatchHandler @ 0011e4ee */ std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>:: emplace_back<std::shared_ptr<ftxui::Node>> ((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *) this,(shared_ptr *)&local_58); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_50); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_40); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_30); return this; }
16,899
mujoco::plugin::elasticity::AddFlexForce(double*, std::vector<double, std::allocator<double>> const&, mjModel_ const*, mjData_*, double const*, int)
aimrt_mujoco_sim/_deps/mujoco-src/plugin/elasticity/elasticity.h
inline void AddFlexForce(mjtNum* qfrc, const std::vector<mjtNum>& force, const mjModel* m, mjData* d, const mjtNum* xpos, int f0) { int* bodyid = m->flex_vertbodyid + m->flex_vertadr[f0]; for (int v = 0; v < m->flex_vertnum[f0]; v++) { int bid = bodyid[v]; if (m->body_simple[bid] != 2) { // this should only occur for pinned flex vertices mj_applyFT(m, d, force.data() + 3*v, 0, xpos + 3*v, bid, qfrc); } else { int body_dofnum = m->body_dofnum[bid]; int body_dofadr = m->body_dofadr[bid]; for (int x = 0; x < body_dofnum; x++) { qfrc[body_dofadr+x] += force[3*v+x]; } } } }
O0
c
mujoco::plugin::elasticity::AddFlexForce(double*, std::vector<double, std::allocator<double>> const&, mjModel_ const*, mjData_*, double const*, int): subq $0x68, %rsp movq %rdi, 0x60(%rsp) movq %rsi, 0x58(%rsp) movq %rdx, 0x50(%rsp) movq %rcx, 0x48(%rsp) movq %r8, 0x40(%rsp) movl %r9d, 0x3c(%rsp) movq 0x50(%rsp), %rax movq 0xa20(%rax), %rax movq 0x50(%rsp), %rcx movq 0x9c0(%rcx), %rcx movslq 0x3c(%rsp), %rdx movslq (%rcx,%rdx,4), %rcx shlq $0x2, %rcx addq %rcx, %rax movq %rax, 0x30(%rsp) movl $0x0, 0x2c(%rsp) movl 0x2c(%rsp), %eax movq 0x50(%rsp), %rcx movq 0x9c8(%rcx), %rcx movslq 0x3c(%rsp), %rdx cmpl (%rcx,%rdx,4), %eax jge 0x111cd movq 0x30(%rsp), %rax movslq 0x2c(%rsp), %rcx movl (%rax,%rcx,4), %eax movl %eax, 0x28(%rsp) movq 0x50(%rsp), %rax movq 0x588(%rax), %rax movslq 0x28(%rsp), %rcx movzbl (%rax,%rcx), %eax cmpl $0x2, %eax je 0x11136 movq 0x50(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x48(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x58(%rsp), %rdi callq 0x11980 movq 0x8(%rsp), %rdi movq 0x10(%rsp), %rsi movq %rax, %rdx imull $0x3, 0x2c(%rsp), %eax cltq shlq $0x3, %rax addq %rax, %rdx movq 0x40(%rsp), %r8 imull $0x3, 0x2c(%rsp), %eax cltq shlq $0x3, %rax addq %rax, %r8 movl 0x28(%rsp), %r9d movq 0x60(%rsp), %rax xorl %ecx, %ecx movq %rax, (%rsp) callq 0x5300 jmp 0x111bb movq 0x50(%rsp), %rax movq 0x560(%rax), %rax movslq 0x28(%rsp), %rcx movl (%rax,%rcx,4), %eax movl %eax, 0x24(%rsp) movq 0x50(%rsp), %rax movq 0x568(%rax), %rax movslq 0x28(%rsp), %rcx movl (%rax,%rcx,4), %eax movl %eax, 0x20(%rsp) movl $0x0, 0x1c(%rsp) movl 0x1c(%rsp), %eax cmpl 0x24(%rsp), %eax jge 0x111b9 movq 0x58(%rsp), %rdi imull $0x3, 0x2c(%rsp), %eax addl 0x1c(%rsp), %eax movslq %eax, %rsi callq 0x119a0 vmovsd (%rax), %xmm0 movq 0x60(%rsp), %rax movl 0x20(%rsp), %ecx addl 0x1c(%rsp), %ecx movslq %ecx, %rcx vaddsd (%rax,%rcx,8), %xmm0, %xmm0 vmovsd %xmm0, (%rax,%rcx,8) movl 0x1c(%rsp), %eax addl $0x1, %eax movl %eax, 0x1c(%rsp) jmp 0x1116e jmp 0x111bb jmp 0x111bd movl 0x2c(%rsp), %eax addl $0x1, %eax movl %eax, 0x2c(%rsp) jmp 0x11087 addq $0x68, %rsp retq nopw %cs:(%rax,%rax)
_ZN6mujoco6plugin10elasticity12AddFlexForceEPdRKSt6vectorIdSaIdEEPK8mjModel_P7mjData_PKdi: sub rsp, 68h mov [rsp+68h+var_8], rdi mov [rsp+68h+var_10], rsi mov [rsp+68h+var_18], rdx mov [rsp+68h+var_20], rcx mov [rsp+68h+var_28], r8 mov [rsp+68h+var_2C], r9d mov rax, [rsp+68h+var_18] mov rax, [rax+0A20h] mov rcx, [rsp+68h+var_18] mov rcx, [rcx+9C0h] movsxd rdx, [rsp+68h+var_2C] movsxd rcx, dword ptr [rcx+rdx*4] shl rcx, 2 add rax, rcx mov [rsp+68h+var_38], rax mov [rsp+68h+var_3C], 0 loc_11087: mov eax, [rsp+68h+var_3C] mov rcx, [rsp+68h+var_18] mov rcx, [rcx+9C8h] movsxd rdx, [rsp+68h+var_2C] cmp eax, [rcx+rdx*4] jge loc_111CD mov rax, [rsp+68h+var_38] movsxd rcx, [rsp+68h+var_3C] mov eax, [rax+rcx*4] mov [rsp+68h+var_40], eax mov rax, [rsp+68h+var_18] mov rax, [rax+588h] movsxd rcx, [rsp+68h+var_40] movzx eax, byte ptr [rax+rcx] cmp eax, 2 jz short loc_11136 mov rax, [rsp+68h+var_18] mov [rsp+68h+var_60], rax mov rax, [rsp+68h+var_20] mov [rsp+68h+var_58], rax mov rdi, [rsp+68h+var_10] call _ZNKSt6vectorIdSaIdEE4dataEv; std::vector<double>::data(void) mov rdi, [rsp+68h+var_60] mov rsi, [rsp+68h+var_58] mov rdx, rax imul eax, [rsp+68h+var_3C], 3 cdqe shl rax, 3 add rdx, rax mov r8, [rsp+68h+var_28] imul eax, [rsp+68h+var_3C], 3 cdqe shl rax, 3 add r8, rax mov r9d, [rsp+68h+var_40] mov rax, [rsp+68h+var_8] xor ecx, ecx mov [rsp+68h+var_68], rax call _mj_applyFT jmp loc_111BB loc_11136: mov rax, [rsp+68h+var_18] mov rax, [rax+560h] movsxd rcx, [rsp+68h+var_40] mov eax, [rax+rcx*4] mov [rsp+68h+var_44], eax mov rax, [rsp+68h+var_18] mov rax, [rax+568h] movsxd rcx, [rsp+68h+var_40] mov eax, [rax+rcx*4] mov [rsp+68h+var_48], eax mov [rsp+68h+var_4C], 0 loc_1116E: mov eax, [rsp+68h+var_4C] cmp eax, [rsp+68h+var_44] jge short loc_111B9 mov rdi, [rsp+68h+var_10] imul eax, [rsp+68h+var_3C], 3 add eax, [rsp+68h+var_4C] movsxd rsi, eax call _ZNKSt6vectorIdSaIdEEixEm; std::vector<double>::operator[](ulong) vmovsd xmm0, qword ptr [rax] mov rax, [rsp+68h+var_8] mov ecx, [rsp+68h+var_48] add ecx, [rsp+68h+var_4C] movsxd rcx, ecx vaddsd xmm0, xmm0, qword ptr [rax+rcx*8] vmovsd qword ptr [rax+rcx*8], xmm0 mov eax, [rsp+68h+var_4C] add eax, 1 mov [rsp+68h+var_4C], eax jmp short loc_1116E loc_111B9: jmp short $+2 loc_111BB: jmp short $+2 loc_111BD: mov eax, [rsp+68h+var_3C] add eax, 1 mov [rsp+68h+var_3C], eax jmp loc_11087 loc_111CD: add rsp, 68h retn
long long mujoco::plugin::elasticity::AddFlexForce( long long a1, long long a2, _QWORD *a3, long long a4, long long a5, int a6) { long long result; // rax long long v7; // rax int j; // [rsp+1Ch] [rbp-4Ch] int v14; // [rsp+20h] [rbp-48h] int v15; // [rsp+24h] [rbp-44h] unsigned int v16; // [rsp+28h] [rbp-40h] unsigned int i; // [rsp+2Ch] [rbp-3Ch] long long v18; // [rsp+30h] [rbp-38h] v18 = 4LL * *(int *)(a3[312] + 4LL * a6) + a3[324]; for ( i = 0; ; ++i ) { result = i; if ( (signed int)i >= *(_DWORD *)(a3[313] + 4LL * a6) ) break; v16 = *(_DWORD *)(v18 + 4LL * (int)i); if ( *(_BYTE *)(a3[177] + (int)v16) == 2 ) { v15 = *(_DWORD *)(a3[172] + 4LL * (int)v16); v14 = *(_DWORD *)(a3[173] + 4LL * (int)v16); for ( j = 0; j < v15; ++j ) { _RAX = std::vector<double>::operator[](a2, (int)(j + 3 * i)); __asm { vmovsd xmm0, qword ptr [rax] } _RAX = a1; _RCX = j + v14; __asm { vaddsd xmm0, xmm0, qword ptr [rax+rcx*8] vmovsd qword ptr [rax+rcx*8], xmm0 } } } else { v7 = std::vector<double>::data(a2); mj_applyFT(a3, a4, 8LL * (int)(3 * i) + v7, 0LL, 8LL * (int)(3 * i) + a5, v16, a1); } } return result; }
AddFlexForce: SUB RSP,0x68 MOV qword ptr [RSP + 0x60],RDI MOV qword ptr [RSP + 0x58],RSI MOV qword ptr [RSP + 0x50],RDX MOV qword ptr [RSP + 0x48],RCX MOV qword ptr [RSP + 0x40],R8 MOV dword ptr [RSP + 0x3c],R9D MOV RAX,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RAX + 0xa20] MOV RCX,qword ptr [RSP + 0x50] MOV RCX,qword ptr [RCX + 0x9c0] MOVSXD RDX,dword ptr [RSP + 0x3c] MOVSXD RCX,dword ptr [RCX + RDX*0x4] SHL RCX,0x2 ADD RAX,RCX MOV qword ptr [RSP + 0x30],RAX MOV dword ptr [RSP + 0x2c],0x0 LAB_00111087: MOV EAX,dword ptr [RSP + 0x2c] MOV RCX,qword ptr [RSP + 0x50] MOV RCX,qword ptr [RCX + 0x9c8] MOVSXD RDX,dword ptr [RSP + 0x3c] CMP EAX,dword ptr [RCX + RDX*0x4] JGE 0x001111cd MOV RAX,qword ptr [RSP + 0x30] MOVSXD RCX,dword ptr [RSP + 0x2c] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RSP + 0x28],EAX MOV RAX,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RAX + 0x588] MOVSXD RCX,dword ptr [RSP + 0x28] MOVZX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x2 JZ 0x00111136 MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x10],RAX MOV RDI,qword ptr [RSP + 0x58] CALL 0x00111980 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x10] MOV RDX,RAX IMUL EAX,dword ptr [RSP + 0x2c],0x3 CDQE SHL RAX,0x3 ADD RDX,RAX MOV R8,qword ptr [RSP + 0x40] IMUL EAX,dword ptr [RSP + 0x2c],0x3 CDQE SHL RAX,0x3 ADD R8,RAX MOV R9D,dword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x60] XOR ECX,ECX MOV qword ptr [RSP],RAX CALL 0x00105300 JMP 0x001111bb LAB_00111136: MOV RAX,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RAX + 0x560] MOVSXD RCX,dword ptr [RSP + 0x28] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RSP + 0x24],EAX MOV RAX,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RAX + 0x568] MOVSXD RCX,dword ptr [RSP + 0x28] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RSP + 0x20],EAX MOV dword ptr [RSP + 0x1c],0x0 LAB_0011116e: MOV EAX,dword ptr [RSP + 0x1c] CMP EAX,dword ptr [RSP + 0x24] JGE 0x001111b9 MOV RDI,qword ptr [RSP + 0x58] IMUL EAX,dword ptr [RSP + 0x2c],0x3 ADD EAX,dword ptr [RSP + 0x1c] MOVSXD RSI,EAX CALL 0x001119a0 VMOVSD XMM0,qword ptr [RAX] MOV RAX,qword ptr [RSP + 0x60] MOV ECX,dword ptr [RSP + 0x20] ADD ECX,dword ptr [RSP + 0x1c] MOVSXD RCX,ECX VADDSD XMM0,XMM0,qword ptr [RAX + RCX*0x8] VMOVSD qword ptr [RAX + RCX*0x8],XMM0 MOV EAX,dword ptr [RSP + 0x1c] ADD EAX,0x1 MOV dword ptr [RSP + 0x1c],EAX JMP 0x0011116e LAB_001111b9: JMP 0x001111bb LAB_001111bb: JMP 0x001111bd LAB_001111bd: MOV EAX,dword ptr [RSP + 0x2c] ADD EAX,0x1 MOV dword ptr [RSP + 0x2c],EAX JMP 0x00111087 LAB_001111cd: ADD RSP,0x68 RET
/* mujoco::plugin::elasticity::AddFlexForce(double*, std::vector<double, std::allocator<double> > const&, mjModel_ const*, mjData_*, double const*, int) */ void mujoco::plugin::elasticity::AddFlexForce (double *param_1,vector *param_2,mjModel_ *param_3,mjData_ *param_4,double *param_5, int param_6) { int iVar1; int iVar2; int iVar3; long lVar4; long lVar5; double *pdVar6; int iVar7; int local_4c; int local_3c; lVar4 = *(long *)(param_3 + 0xa20); iVar1 = *(int *)(*(long *)(param_3 + 0x9c0) + (long)param_6 * 4); for (local_3c = 0; local_3c < *(int *)(*(long *)(param_3 + 0x9c8) + (long)param_6 * 4); local_3c = local_3c + 1) { iVar2 = *(int *)(lVar4 + (long)iVar1 * 4 + (long)local_3c * 4); if (*(char *)(*(long *)(param_3 + 0x588) + (long)iVar2) == '\x02') { iVar3 = *(int *)(*(long *)(param_3 + 0x560) + (long)iVar2 * 4); iVar2 = *(int *)(*(long *)(param_3 + 0x568) + (long)iVar2 * 4); for (local_4c = 0; local_4c < iVar3; local_4c = local_4c + 1) { pdVar6 = (double *) std::vector<double,std::allocator<double>>::operator[] ((vector<double,std::allocator<double>> *)param_2, (long)(local_3c * 3 + local_4c)); iVar7 = iVar2 + local_4c; param_1[iVar7] = *pdVar6 + param_1[iVar7]; } } else { lVar5 = std::vector<double,std::allocator<double>>::data ((vector<double,std::allocator<double>> *)param_2); mj_applyFT(param_3,param_4,lVar5 + (long)(local_3c * 3) * 8,0,param_5 + local_3c * 3,iVar2, param_1); } } return; }