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
49,400
mbedtls_rsa_rsassa_pkcs1_v15_sign
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/rsa.c
int mbedtls_rsa_rsassa_pkcs1_v15_sign(mbedtls_rsa_context *ctx, int (*f_rng)(void *, unsigned char *, size_t), void *p_rng, int mode, mbedtls_md_type_t md_alg, unsigned int hashlen, const unsigned char *hash, unsigned char *sig) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; unsigned char *sig_try = NULL, *verif = NULL; RSA_VALIDATE_RET(ctx != NULL); RSA_VALIDATE_RET(mode == MBEDTLS_RSA_PRIVATE || mode == MBEDTLS_RSA_PUBLIC); RSA_VALIDATE_RET((md_alg == MBEDTLS_MD_NONE && hashlen == 0) || hash != NULL); RSA_VALIDATE_RET(sig != NULL); if (mode == MBEDTLS_RSA_PRIVATE && ctx->padding != MBEDTLS_RSA_PKCS_V15) { return MBEDTLS_ERR_RSA_BAD_INPUT_DATA; } /* * Prepare PKCS1-v1.5 encoding (padding and hash identifier) */ if ((ret = rsa_rsassa_pkcs1_v15_encode(md_alg, hashlen, hash, ctx->len, sig)) != 0) { return ret; } /* * Call respective RSA primitive */ if (mode == MBEDTLS_RSA_PUBLIC) { /* Skip verification on a public key operation */ return mbedtls_rsa_public(ctx, sig, sig); } /* Private key operation * * In order to prevent Lenstra's attack, make the signature in a * temporary buffer and check it before returning it. */ sig_try = mbedtls_calloc(1, ctx->len); if (sig_try == NULL) { return MBEDTLS_ERR_MPI_ALLOC_FAILED; } verif = mbedtls_calloc(1, ctx->len); if (verif == NULL) { mbedtls_free(sig_try); return MBEDTLS_ERR_MPI_ALLOC_FAILED; } MBEDTLS_MPI_CHK(mbedtls_rsa_private(ctx, f_rng, p_rng, sig, sig_try)); MBEDTLS_MPI_CHK(mbedtls_rsa_public(ctx, sig_try, verif)); if (mbedtls_ct_memcmp(verif, sig, ctx->len) != 0) { ret = MBEDTLS_ERR_RSA_PRIVATE_FAILED; goto cleanup; } memcpy(sig, sig_try, ctx->len); cleanup: mbedtls_platform_zeroize(sig_try, ctx->len); mbedtls_platform_zeroize(verif, ctx->len); mbedtls_free(sig_try); mbedtls_free(verif); if (ret != 0) { memset(sig, '!', ctx->len); } return ret; }
O3
c
mbedtls_rsa_rsassa_pkcs1_v15_sign: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %ecx, %r15d movq %rdx, %r13 movq %rsi, %r12 movq %rdi, %r14 movq 0x48(%rsp), %rbx movq 0x40(%rsp), %rdx cmpl $0x1, %ecx jne 0x9178a movl $0xffffbf80, %ebp # imm = 0xFFFFBF80 cmpl $0x0, 0x148(%r14) jne 0x917a2 movq 0x8(%r14), %rcx movl %r8d, %edi movl %r9d, %esi movq %rbx, %r8 callq 0x918c9 movl %eax, %ebp testl %eax, %eax je 0x917b3 movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq testl %r15d, %r15d je 0x91866 movq 0x8(%r14), %r15 movl $0x1, %edi movq %r15, %rsi callq 0xf2f0 movl $0xfffffff0, %ebp # imm = 0xFFFFFFF0 movq %rax, (%rsp) testq %rax, %rax je 0x917a2 movl $0x1, %edi movq %r15, %rsi callq 0xf2f0 testq %rax, %rax je 0x91882 movq %rax, %r15 movq %r14, %rdi movq %r12, %rsi movq %r13, %rdx movq %rbx, %rcx movq (%rsp), %r13 movq %r13, %r8 callq 0x9042c testl %eax, %eax jne 0x91822 movq %r14, %rdi movq %r13, %rsi movq %r15, %rdx callq 0x9035f testl %eax, %eax je 0x91897 movl %eax, %ebp movq 0x8(%r14), %rsi movq %r13, %rdi callq 0x8db8c movq 0x8(%r14), %rsi movq %r15, %rdi callq 0x8db8c movq %r13, %rdi callq 0xf560 movq %r15, %rdi callq 0xf560 testl %ebp, %ebp je 0x91890 movq 0x8(%r14), %rdx movq %rbx, %rdi movl $0x21, %esi callq 0xf2b0 jmp 0x917a2 movq %r14, %rdi movq %rbx, %rsi movq %rbx, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x9035f movq (%rsp), %rdi callq 0xf560 jmp 0x917a2 xorl %ebp, %ebp jmp 0x917a2 movq 0x8(%r14), %rdx movq %r15, %rdi movq %rbx, %rsi callq 0x8240c movl $0xffffbd00, %ebp # imm = 0xFFFFBD00 testl %eax, %eax jne 0x91824 movq 0x8(%r14), %rdx movq %rbx, %rdi movq %r13, %rsi callq 0xf3a0 xorl %ebp, %ebp jmp 0x91824
mbedtls_rsa_rsassa_pkcs1_v15_sign: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r15d, ecx mov r13, rdx mov r12, rsi mov r14, rdi mov rbx, [rsp+38h+arg_8] mov rdx, [rsp+38h+arg_0] cmp ecx, 1 jnz short loc_9178A mov ebp, 0FFFFBF80h cmp dword ptr [r14+148h], 0 jnz short loc_917A2 loc_9178A: mov rcx, [r14+8] mov edi, r8d mov esi, r9d mov r8, rbx call rsa_rsassa_pkcs1_v15_encode mov ebp, eax test eax, eax jz short loc_917B3 loc_917A2: mov eax, ebp add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_917B3: test r15d, r15d jz loc_91866 mov r15, [r14+8] mov edi, 1 mov rsi, r15 call _calloc mov ebp, 0FFFFFFF0h mov [rsp+38h+var_38], rax test rax, rax jz short loc_917A2 mov edi, 1 mov rsi, r15 call _calloc test rax, rax jz loc_91882 mov r15, rax mov rdi, r14 mov rsi, r12 mov rdx, r13 mov rcx, rbx mov r13, [rsp+38h+var_38] mov r8, r13 call mbedtls_rsa_private test eax, eax jnz short loc_91822 mov rdi, r14 mov rsi, r13 mov rdx, r15 call mbedtls_rsa_public test eax, eax jz short loc_91897 loc_91822: mov ebp, eax loc_91824: mov rsi, [r14+8] mov rdi, r13 call mbedtls_platform_zeroize mov rsi, [r14+8] mov rdi, r15 call mbedtls_platform_zeroize mov rdi, r13 call _free mov rdi, r15 call _free test ebp, ebp jz short loc_91890 mov rdx, [r14+8] mov rdi, rbx mov esi, 21h ; '!' call _memset jmp loc_917A2 loc_91866: mov rdi, r14 mov rsi, rbx mov rdx, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp mbedtls_rsa_public loc_91882: mov rdi, [rsp+38h+var_38] call _free jmp loc_917A2 loc_91890: xor ebp, ebp jmp loc_917A2 loc_91897: mov rdx, [r14+8] mov rdi, r15 mov rsi, rbx call mbedtls_ct_memcmp mov ebp, 0FFFFBD00h test eax, eax jnz loc_91824 mov rdx, [r14+8] mov rdi, rbx mov rsi, r13 call _memcpy xor ebp, ebp jmp loc_91824
long long mbedtls_rsa_rsassa_pkcs1_v15_sign( long long a1, long long a2, long long a3, int a4, unsigned int a5, unsigned int a6, long long a7, unsigned long long a8) { unsigned int v10; // ebp long long v12; // r15 long long v13; // rax unsigned long long v14; // r15 unsigned int v15; // eax long long v16; // [rsp+0h] [rbp-38h] if ( a4 == 1 ) { v10 = -16512; if ( *(_DWORD *)(a1 + 328) ) return v10; } v10 = rsa_rsassa_pkcs1_v15_encode(a5, a6, a7, *(_QWORD *)(a1 + 8), a8); if ( v10 ) return v10; if ( a4 ) { v12 = *(_QWORD *)(a1 + 8); v10 = -16; v16 = calloc(1LL, v12); if ( v16 ) { v13 = calloc(1LL, v12); if ( v13 ) { v14 = v13; v15 = mbedtls_rsa_private(a1, a2, a3, a8, v16); if ( v15 || (v15 = mbedtls_rsa_public(a1, v16, v14)) != 0 ) { v10 = v15; } else { v10 = -17152; if ( !(unsigned int)mbedtls_ct_memcmp(v14, a8, *(_QWORD *)(a1 + 8)) ) { memcpy(a8, v16, *(_QWORD *)(a1 + 8)); v10 = 0; } } mbedtls_platform_zeroize(v16, *(_QWORD *)(a1 + 8)); mbedtls_platform_zeroize(v14, *(_QWORD *)(a1 + 8)); free(v16); free(v14); if ( v10 ) memset(a8, 33LL, *(_QWORD *)(a1 + 8)); else return 0; } else { free(v16); } } return v10; } return mbedtls_rsa_public(a1, a8, a8); }
mbedtls_rsa_rsassa_pkcs1_v15_sign: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R15D,ECX MOV R13,RDX MOV R12,RSI MOV R14,RDI MOV RBX,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x40] CMP ECX,0x1 JNZ 0x0019178a MOV EBP,0xffffbf80 CMP dword ptr [R14 + 0x148],0x0 JNZ 0x001917a2 LAB_0019178a: MOV RCX,qword ptr [R14 + 0x8] MOV EDI,R8D MOV ESI,R9D MOV R8,RBX CALL 0x001918c9 MOV EBP,EAX TEST EAX,EAX JZ 0x001917b3 LAB_001917a2: MOV EAX,EBP ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001917b3: TEST R15D,R15D JZ 0x00191866 MOV R15,qword ptr [R14 + 0x8] MOV EDI,0x1 MOV RSI,R15 CALL 0x0010f2f0 MOV EBP,0xfffffff0 MOV qword ptr [RSP],RAX TEST RAX,RAX JZ 0x001917a2 MOV EDI,0x1 MOV RSI,R15 CALL 0x0010f2f0 TEST RAX,RAX JZ 0x00191882 MOV R15,RAX MOV RDI,R14 MOV RSI,R12 MOV RDX,R13 MOV RCX,RBX MOV R13,qword ptr [RSP] MOV R8,R13 CALL 0x0019042c TEST EAX,EAX JNZ 0x00191822 MOV RDI,R14 MOV RSI,R13 MOV RDX,R15 CALL 0x0019035f TEST EAX,EAX JZ 0x00191897 LAB_00191822: MOV EBP,EAX LAB_00191824: MOV RSI,qword ptr [R14 + 0x8] MOV RDI,R13 CALL 0x0018db8c MOV RSI,qword ptr [R14 + 0x8] MOV RDI,R15 CALL 0x0018db8c MOV RDI,R13 CALL 0x0010f560 MOV RDI,R15 CALL 0x0010f560 TEST EBP,EBP JZ 0x00191890 MOV RDX,qword ptr [R14 + 0x8] MOV RDI,RBX MOV ESI,0x21 CALL 0x0010f2b0 JMP 0x001917a2 LAB_00191866: MOV RDI,R14 MOV RSI,RBX MOV RDX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0019035f LAB_00191882: MOV RDI,qword ptr [RSP] CALL 0x0010f560 JMP 0x001917a2 LAB_00191890: XOR EBP,EBP JMP 0x001917a2 LAB_00191897: MOV RDX,qword ptr [R14 + 0x8] MOV RDI,R15 MOV RSI,RBX CALL 0x0018240c MOV EBP,0xffffbd00 TEST EAX,EAX JNZ 0x00191824 MOV RDX,qword ptr [R14 + 0x8] MOV RDI,RBX MOV RSI,R13 CALL 0x0010f3a0 XOR EBP,EBP JMP 0x00191824
ulong mbedtls_rsa_rsassa_pkcs1_v15_sign (long param_1,int8 param_2,int8 param_3,int param_4,int4 param_5, int4 param_6,int8 param_7,void *param_8) { size_t __size; uint uVar1; int iVar2; void *__ptr; void *__ptr_00; ulong uVar3; if ((param_4 == 1) && (*(int *)(param_1 + 0x148) != 0)) { return 0xffffbf80; } uVar1 = rsa_rsassa_pkcs1_v15_encode(param_5,param_6,param_7,*(int8 *)(param_1 + 8),param_8); if (uVar1 != 0) { return (ulong)uVar1; } if (param_4 != 0) { __size = *(size_t *)(param_1 + 8); __ptr = calloc(1,__size); if (__ptr == (void *)0x0) { return 0xfffffff0; } __ptr_00 = calloc(1,__size); if (__ptr_00 != (void *)0x0) { uVar1 = mbedtls_rsa_private(param_1,param_2,param_3,param_8,__ptr); if ((uVar1 == 0) && (uVar1 = mbedtls_rsa_public(param_1,__ptr,__ptr_00), uVar1 == 0)) { iVar2 = mbedtls_ct_memcmp(__ptr_00,param_8,*(int8 *)(param_1 + 8)); uVar3 = 0xffffbd00; if (iVar2 == 0) { memcpy(param_8,__ptr,*(size_t *)(param_1 + 8)); uVar3 = 0; } } else { uVar3 = (ulong)uVar1; } mbedtls_platform_zeroize(__ptr,*(int8 *)(param_1 + 8)); mbedtls_platform_zeroize(__ptr_00,*(int8 *)(param_1 + 8)); free(__ptr); free(__ptr_00); if ((int)uVar3 == 0) { uVar3 = 0; } else { memset(param_8,0x21,*(size_t *)(param_1 + 8)); } return uVar3; } free(__ptr); return 0xfffffff0; } uVar3 = mbedtls_rsa_public(param_1,param_8,param_8); return uVar3; }
49,401
testing::internal::XmlUnitTestResultPrinter::RemoveInvalidXmlCharacters(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/src/gtest.cc
std::string XmlUnitTestResultPrinter::RemoveInvalidXmlCharacters( const std::string& str) { std::string output; output.reserve(str.size()); for (std::string::const_iterator it = str.begin(); it != str.end(); ++it) if (IsValidXmlCharacter(static_cast<unsigned char>(*it))) output.push_back(*it); return output; }
O1
cpp
testing::internal::XmlUnitTestResultPrinter::RemoveInvalidXmlCharacters(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx leaq 0x10(%rdi), %r15 movq %r15, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq 0x8(%rsi), %rsi callq 0x98c0 cmpq $0x0, 0x8(%r14) je 0x290d1 movq (%r14), %r12 movl $0x2600, %ebp # imm = 0x2600 movb (%r12), %al cmpb $0x1f, %al ja 0x290b7 cmpb $0xd, %al ja 0x290c2 movzbl %al, %ecx btl %ecx, %ebp jae 0x290c2 movsbl %al, %esi movq %rbx, %rdi callq 0x9400 incq %r12 movq (%r14), %rax addq 0x8(%r14), %rax cmpq %rax, %r12 jne 0x290a3 movq %rbx, %rax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq jmp 0x290df movq %rax, %r14 movq (%rbx), %rdi cmpq %r15, %rdi je 0x290f5 movq (%r15), %rsi incq %rsi callq 0x94c0 movq %r14, %rdi callq 0x99a0
_ZN7testing8internal24XmlUnitTestResultPrinter26RemoveInvalidXmlCharactersERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r12 push rbx mov r14, rsi mov rbx, rdi lea r15, [rdi+10h] mov [rdi], r15 mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rsi, [rsi+8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) cmp qword ptr [r14+8], 0 jz short loc_290D1 mov r12, [r14] mov ebp, 2600h loc_290A3: mov al, [r12] cmp al, 1Fh ja short loc_290B7 cmp al, 0Dh ja short loc_290C2 movzx ecx, al bt ebp, ecx jnb short loc_290C2 loc_290B7: movsx esi, al mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) loc_290C2: inc r12 mov rax, [r14] add rax, [r14+8] cmp r12, rax jnz short loc_290A3 loc_290D1: mov rax, rbx pop rbx pop r12 pop r14 pop r15 pop rbp retn jmp short $+2 loc_290DF: mov r14, rax mov rdi, [rbx]; void * cmp rdi, r15 jz short loc_290F5 mov rsi, [r15] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_290F5: mov rdi, r14 call __Unwind_Resume
long long testing::internal::XmlUnitTestResultPrinter::RemoveInvalidXmlCharacters(long long a1, long long a2) { unsigned __int8 *v2; // r12 int v3; // ebp unsigned __int8 v4; // al *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; std::string::reserve(a1, *(_QWORD *)(a2 + 8)); if ( *(_QWORD *)(a2 + 8) ) { v2 = *(unsigned __int8 **)a2; v3 = 9728; do { v4 = *v2; if ( *v2 > 0x1Fu || v4 <= 0xDu && _bittest(&v3, v4) ) std::string::push_back(a1, (unsigned int)(char)v4); ++v2; } while ( v2 != (unsigned __int8 *)(*(_QWORD *)(a2 + 8) + *(_QWORD *)a2) ); } return a1; }
RemoveInvalidXmlCharacters: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R14,RSI MOV RBX,RDI LEA R15,[RDI + 0x10] MOV qword ptr [RDI],R15 MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 MOV RSI,qword ptr [RSI + 0x8] LAB_0012908f: CALL 0x001098c0 CMP qword ptr [R14 + 0x8],0x0 JZ 0x001290d1 MOV R12,qword ptr [R14] MOV EBP,0x2600 LAB_001290a3: MOV AL,byte ptr [R12] CMP AL,0x1f JA 0x001290b7 CMP AL,0xd JA 0x001290c2 MOVZX ECX,AL BT EBP,ECX JNC 0x001290c2 LAB_001290b7: MOVSX ESI,AL MOV RDI,RBX CALL 0x00109400 LAB_001290c2: INC R12 MOV RAX,qword ptr [R14] ADD RAX,qword ptr [R14 + 0x8] CMP R12,RAX JNZ 0x001290a3 LAB_001290d1: MOV RAX,RBX POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* testing::internal::XmlUnitTestResultPrinter::RemoveInvalidXmlCharacters(std::__cxx11::string const&) */ XmlUnitTestResultPrinter * __thiscall testing::internal::XmlUnitTestResultPrinter::RemoveInvalidXmlCharacters (XmlUnitTestResultPrinter *this,string *param_1) { byte bVar1; byte *pbVar2; *(XmlUnitTestResultPrinter **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (XmlUnitTestResultPrinter)0x0; /* try { // try from 0012908f to 00129093 has its CatchHandler @ 001290dd */ std::__cxx11::string::reserve((ulong)this); if (*(long *)(param_1 + 8) != 0) { pbVar2 = *(byte **)param_1; do { bVar1 = *pbVar2; if ((0x1f < bVar1) || ((bVar1 < 0xe && ((0x2600U >> (bVar1 & 0x1f) & 1) != 0)))) { /* try { // try from 001290b7 to 001290c1 has its CatchHandler @ 001290df */ std::__cxx11::string::push_back((char)this); } pbVar2 = pbVar2 + 1; } while (pbVar2 != (byte *)(*(long *)param_1 + *(long *)(param_1 + 8))); } return this; }
49,402
mi_dpos
eloqsql/storage/myisam/mi_search.c
my_off_t _mi_dpos(MI_INFO *info, uint nod_flag, uchar *after_key) { my_off_t pos; after_key-=(nod_flag + info->s->rec_reflength); switch (info->s->rec_reflength) { #if SIZEOF_OFF_T > 4 case 8: pos= (my_off_t) mi_uint8korr(after_key); break; case 7: pos= (my_off_t) mi_uint7korr(after_key); break; case 6: pos= (my_off_t) mi_uint6korr(after_key); break; case 5: pos= (my_off_t) mi_uint5korr(after_key); break; #else case 8: pos= (my_off_t) mi_uint4korr(after_key+4); break; case 7: pos= (my_off_t) mi_uint4korr(after_key+3); break; case 6: pos= (my_off_t) mi_uint4korr(after_key+2); break; case 5: pos= (my_off_t) mi_uint4korr(after_key+1); break; #endif case 4: pos= (my_off_t) mi_uint4korr(after_key); break; case 3: pos= (my_off_t) mi_uint3korr(after_key); break; case 2: pos= (my_off_t) mi_uint2korr(after_key); break; default: pos=0L; /* Shut compiler up */ } return (info->s->options & (HA_OPTION_PACK_RECORD | HA_OPTION_COMPRESS_RECORD)) ? pos : pos*info->s->base.pack_reclength; }
O0
c
mi_dpos: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movl -0xc(%rbp), %ecx movq -0x8(%rbp), %rax movq (%rax), %rax movl 0x338(%rax), %eax addl %eax, %ecx movq -0x18(%rbp), %rax subq %rcx, %rax movq %rax, -0x18(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movl 0x338(%rax), %eax addl $-0x2, %eax movl %eax, %ecx movq %rcx, -0x28(%rbp) subl $0x6, %eax ja 0xbf10c movq -0x28(%rbp), %rax leaq 0x9a332(%rip), %rcx # 0x15930c 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) jmp 0xbf114 movq -0x18(%rbp), %rdi callq 0xc0270 movq %rax, -0x20(%rbp) jmp 0xbf114 movq -0x18(%rbp), %rdi callq 0xc02d0 movq %rax, -0x20(%rbp) jmp 0xbf114 movq -0x18(%rbp), %rdi callq 0xc0320 movq %rax, -0x20(%rbp) jmp 0xbf114 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) jmp 0xbf114 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) jmp 0xbf114 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) jmp 0xbf114 movq $0x0, -0x20(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq 0x318(%rax), %rax andq $0x5, %rax cmpq $0x0, %rax je 0xbf136 movq -0x20(%rbp), %rax movq %rax, -0x30(%rbp) jmp 0xbf14d movq -0x20(%rbp), %rax movq -0x8(%rbp), %rcx movq (%rcx), %rcx imulq 0x148(%rcx), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
_mi_dpos: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov ecx, [rbp+var_C] mov rax, [rbp+var_8] mov rax, [rax] mov eax, [rax+338h] add ecx, eax mov rax, [rbp+var_18] sub rax, rcx mov [rbp+var_18], rax mov rax, [rbp+var_8] mov rax, [rax] mov eax, [rax+338h] add eax, 0FFFFFFFEh; switch 7 cases mov ecx, eax mov [rbp+var_28], rcx sub eax, 6 ja def_BEFE1; jumptable 00000000000BEFE1 default case mov rax, [rbp+var_28] lea rcx, jpt_BEFE1 movsxd rax, ds:(jpt_BEFE1 - 15930Ch)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_BEFE3: mov rax, [rbp+var_18]; jumptable 00000000000BEFE1 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 jmp loc_BF114 loc_BF054: mov rdi, [rbp+var_18]; jumptable 00000000000BEFE1 case 7 call mi_uint7korr_0 mov [rbp+var_20], rax jmp loc_BF114 loc_BF066: mov rdi, [rbp+var_18]; jumptable 00000000000BEFE1 case 6 call mi_uint6korr_0 mov [rbp+var_20], rax jmp loc_BF114 loc_BF078: mov rdi, [rbp+var_18]; jumptable 00000000000BEFE1 case 5 call mi_uint5korr_0 mov [rbp+var_20], rax jmp loc_BF114 loc_BF08A: mov rax, [rbp+var_18]; jumptable 00000000000BEFE1 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 jmp short loc_BF114 loc_BF0C0: mov rax, [rbp+var_18]; jumptable 00000000000BEFE1 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 jmp short loc_BF114 loc_BF0E9: mov rax, [rbp+var_18]; jumptable 00000000000BEFE1 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 jmp short loc_BF114 def_BEFE1: mov [rbp+var_20], 0; jumptable 00000000000BEFE1 default case loc_BF114: mov rax, [rbp+var_8] mov rax, [rax] mov rax, [rax+318h] and rax, 5 cmp rax, 0 jz short loc_BF136 mov rax, [rbp+var_20] mov [rbp+var_30], rax jmp short loc_BF14D loc_BF136: mov rax, [rbp+var_20] mov rcx, [rbp+var_8] mov rcx, [rcx] imul rax, [rcx+148h] mov [rbp+var_30], rax loc_BF14D: mov rax, [rbp+var_30] add rsp, 30h pop rbp retn
long long mi_dpos(long long a1, int a2, long long a3) { long long v5; // [rsp+10h] [rbp-20h] unsigned __int8 *v6; // [rsp+18h] [rbp-18h] v6 = (unsigned __int8 *)(a3 - (unsigned int)(*(_DWORD *)(*(_QWORD *)a1 + 824LL) + a2)); switch ( *(_DWORD *)(*(_QWORD *)a1 + 824LL) ) { case 2: v5 = _byteswap_ushort(*(_WORD *)v6); break; case 3: v5 = (*v6 << 16) | (v6[1] << 8) | (unsigned int)v6[2]; break; case 4: v5 = _byteswap_ulong(*(_DWORD *)v6); break; case 5: v5 = mi_uint5korr_0(v6); break; case 6: v5 = mi_uint6korr_0(v6); break; case 7: v5 = mi_uint7korr_0(v6); break; case 8: v5 = ((unsigned long long)_byteswap_ulong(*(_DWORD *)v6) << 32) | _byteswap_ulong(*((_DWORD *)v6 + 1)); break; default: v5 = 0LL; break; } if ( (*(_QWORD *)(*(_QWORD *)a1 + 792LL) & 5LL) != 0 ) return v5; else return *(_QWORD *)(*(_QWORD *)a1 + 328LL) * v5; }
_mi_dpos: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV ECX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x338] ADD ECX,EAX MOV RAX,qword ptr [RBP + -0x18] SUB RAX,RCX MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x338] ADD EAX,-0x2 MOV ECX,EAX MOV qword ptr [RBP + -0x28],RCX SUB EAX,0x6 JA 0x001bf10c MOV RAX,qword ptr [RBP + -0x28] LEA RCX,[0x25930c] 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 JMP 0x001bf114 caseD_7: MOV RDI,qword ptr [RBP + -0x18] CALL 0x001c0270 MOV qword ptr [RBP + -0x20],RAX JMP 0x001bf114 caseD_6: MOV RDI,qword ptr [RBP + -0x18] CALL 0x001c02d0 MOV qword ptr [RBP + -0x20],RAX JMP 0x001bf114 caseD_5: MOV RDI,qword ptr [RBP + -0x18] CALL 0x001c0320 MOV qword ptr [RBP + -0x20],RAX JMP 0x001bf114 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 JMP 0x001bf114 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 JMP 0x001bf114 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 JMP 0x001bf114 default: MOV qword ptr [RBP + -0x20],0x0 LAB_001bf114: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x318] AND RAX,0x5 CMP RAX,0x0 JZ 0x001bf136 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x30],RAX JMP 0x001bf14d LAB_001bf136: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX] IMUL RAX,qword ptr [RCX + 0x148] MOV qword ptr [RBP + -0x30],RAX LAB_001bf14d: MOV RAX,qword ptr [RBP + -0x30] ADD RSP,0x30 POP RBP RET
ulong _mi_dpos(long *param_1,int param_2,long param_3) { int1 *puVar1; ulong local_38; ulong local_28; puVar1 = (int1 *)(param_3 - (ulong)(uint)(param_2 + *(int *)(*param_1 + 0x338))); switch(*(int4 *)(*param_1 + 0x338)) { case 2: local_28 = (ulong)CONCAT11(*puVar1,puVar1[1]); break; case 3: local_28 = (ulong)CONCAT12(*puVar1,CONCAT11(puVar1[1],puVar1[2])); break; case 4: local_28 = (ulong)CONCAT13(*puVar1,CONCAT12(puVar1[1],CONCAT11(puVar1[2],puVar1[3]))); break; case 5: local_28 = mi_uint5korr(puVar1); break; case 6: local_28 = mi_uint6korr(puVar1); break; case 7: local_28 = mi_uint7korr(puVar1); break; case 8: local_28 = CONCAT44(CONCAT13(*puVar1,CONCAT12(puVar1[1],CONCAT11(puVar1[2],puVar1[3]))), CONCAT13(puVar1[4],CONCAT12(puVar1[5],CONCAT11(puVar1[6],puVar1[7])))); break; default: local_28 = 0; } if ((*(ulong *)(*param_1 + 0x318) & 5) == 0) { local_38 = local_28 * *(long *)(*param_1 + 0x148); } else { local_38 = local_28; } return local_38; }
49,403
mi_dpos
eloqsql/storage/myisam/mi_search.c
my_off_t _mi_dpos(MI_INFO *info, uint nod_flag, uchar *after_key) { my_off_t pos; after_key-=(nod_flag + info->s->rec_reflength); switch (info->s->rec_reflength) { #if SIZEOF_OFF_T > 4 case 8: pos= (my_off_t) mi_uint8korr(after_key); break; case 7: pos= (my_off_t) mi_uint7korr(after_key); break; case 6: pos= (my_off_t) mi_uint6korr(after_key); break; case 5: pos= (my_off_t) mi_uint5korr(after_key); break; #else case 8: pos= (my_off_t) mi_uint4korr(after_key+4); break; case 7: pos= (my_off_t) mi_uint4korr(after_key+3); break; case 6: pos= (my_off_t) mi_uint4korr(after_key+2); break; case 5: pos= (my_off_t) mi_uint4korr(after_key+1); break; #endif case 4: pos= (my_off_t) mi_uint4korr(after_key); break; case 3: pos= (my_off_t) mi_uint3korr(after_key); break; case 2: pos= (my_off_t) mi_uint2korr(after_key); break; default: pos=0L; /* Shut compiler up */ } return (info->s->options & (HA_OPTION_PACK_RECORD | HA_OPTION_COMPRESS_RECORD)) ? pos : pos*info->s->base.pack_reclength; }
O3
c
mi_dpos: pushq %rbp movq %rsp, %rbp movq (%rdi), %rcx movl 0x338(%rcx), %edi leal -0x2(%rdi), %eax cmpl $0x6, %eax ja 0x845f3 addl %esi, %edi negq %rdi leaq 0x5d35e(%rip), %rsi # 0xe1910 movslq (%rsi,%rax,4), %rax addq %rsi, %rax jmpq *%rax movzwl (%rdx,%rdi), %eax rolw $0x8, %ax movzwl %ax, %eax jmp 0x84637 movl (%rdx,%rdi), %eax movzwl 0x4(%rdx,%rdi), %edx shlq $0x30, %rdx shlq $0x10, %rax jmp 0x8462b movl (%rdx,%rdi), %eax bswapl %eax jmp 0x84637 movl (%rdx,%rdi), %eax movzbl 0x4(%rdx,%rdi), %edx shlq $0x38, %rdx shlq $0x18, %rax jmp 0x8462b xorl %eax, %eax jmp 0x84637 movzwl 0x1(%rdx,%rdi), %eax rolw $0x8, %ax movzwl %ax, %esi movzbl (%rdx,%rdi), %eax shll $0x10, %eax orq %rsi, %rax jmp 0x84637 movl (%rdx,%rdi), %eax movzwl 0x4(%rdx,%rdi), %esi movzbl 0x6(%rdx,%rdi), %edx shlq $0x38, %rdx shlq $0x28, %rsi shlq $0x8, %rax orq %rsi, %rax orq %rdx, %rax jmp 0x84634 movq (%rdx,%rdi), %rax bswapq %rax testb $0x5, 0x318(%rcx) jne 0x84648 imulq 0x148(%rcx), %rax popq %rbp retq
_mi_dpos: push rbp mov rbp, rsp mov rcx, [rdi] mov edi, [rcx+338h] lea eax, [rdi-2]; switch 7 cases cmp eax, 6 ja short def_845B9; jumptable 00000000000845B9 default case add edi, esi neg rdi lea rsi, jpt_845B9 movsxd rax, ds:(jpt_845B9 - 0E1910h)[rsi+rax*4] add rax, rsi jmp rax; switch jump loc_845BB: movzx eax, word ptr [rdx+rdi]; jumptable 00000000000845B9 case 2 rol ax, 8 movzx eax, ax jmp short loc_84637 loc_845C8: mov eax, [rdx+rdi]; jumptable 00000000000845B9 case 6 movzx edx, word ptr [rdx+rdi+4] shl rdx, 30h shl rax, 10h jmp short loc_8462B loc_845DA: mov eax, [rdx+rdi]; jumptable 00000000000845B9 case 4 bswap eax jmp short loc_84637 loc_845E1: mov eax, [rdx+rdi]; jumptable 00000000000845B9 case 5 movzx edx, byte ptr [rdx+rdi+4] shl rdx, 38h shl rax, 18h jmp short loc_8462B def_845B9: xor eax, eax; jumptable 00000000000845B9 default case jmp short loc_84637 loc_845F7: movzx eax, word ptr [rdx+rdi+1]; jumptable 00000000000845B9 case 3 rol ax, 8 movzx esi, ax movzx eax, byte ptr [rdx+rdi] shl eax, 10h or rax, rsi jmp short loc_84637 loc_8460F: mov eax, [rdx+rdi]; jumptable 00000000000845B9 case 7 movzx esi, word ptr [rdx+rdi+4] movzx edx, byte ptr [rdx+rdi+6] shl rdx, 38h shl rsi, 28h shl rax, 8 or rax, rsi loc_8462B: or rax, rdx jmp short loc_84634 loc_84630: mov rax, [rdx+rdi]; jumptable 00000000000845B9 case 8 loc_84634: bswap rax loc_84637: test byte ptr [rcx+318h], 5 jnz short loc_84648 imul rax, [rcx+148h] loc_84648: pop rbp retn
unsigned long long mi_dpos(long long *a1, int a2, long long a3) { long long v3; // rcx int v4; // edi int v5; // eax long long v6; // rdi unsigned long long result; // rax long long v8; // rax unsigned long long v9; // rdx long long v10; // rax long long v11; // rax long long v12; // rax long long v13; // rsi unsigned long long v14; // rax v3 = *a1; v4 = *(_DWORD *)(*a1 + 824); v5 = v4 - 2; v6 = -(long long)(unsigned int)(a2 + v4); switch ( v5 ) { case 0: result = (unsigned __int16)__ROL2__(*(_WORD *)(a3 + v6), 8); break; case 1: result = (unsigned __int16)__ROL2__(*(_WORD *)(a3 + v6 + 1), 8) | (unsigned long long)(*(unsigned __int8 *)(a3 + v6) << 16); break; case 2: result = _byteswap_ulong(*(_DWORD *)(a3 + v6)); break; case 3: v11 = *(unsigned int *)(a3 + v6); v9 = (unsigned long long)*(unsigned __int8 *)(a3 + v6 + 4) << 56; v10 = v11 << 24; goto LABEL_9; case 4: v8 = *(unsigned int *)(a3 + v6); v9 = (unsigned long long)*(unsigned __int16 *)(a3 + v6 + 4) << 48; v10 = v8 << 16; goto LABEL_9; case 5: v12 = *(unsigned int *)(a3 + v6); v13 = *(unsigned __int16 *)(a3 + v6 + 4); v9 = (unsigned long long)*(unsigned __int8 *)(a3 + v6 + 6) << 56; v10 = (v13 << 40) | (v12 << 8); LABEL_9: v14 = v9 | v10; goto LABEL_11; case 6: v14 = *(_QWORD *)(a3 + v6); LABEL_11: result = _byteswap_uint64(v14); break; default: result = 0LL; break; } if ( (*(_BYTE *)(v3 + 792) & 5) == 0 ) result *= *(_QWORD *)(v3 + 328); return result; }
_mi_dpos: PUSH RBP MOV RBP,RSP MOV RCX,qword ptr [RDI] MOV EDI,dword ptr [RCX + 0x338] LEA EAX,[RDI + -0x2] CMP EAX,0x6 JA 0x001845f3 ADD EDI,ESI NEG RDI LEA RSI,[0x1e1910] MOVSXD RAX,dword ptr [RSI + RAX*0x4] ADD RAX,RSI switchD: JMP RAX caseD_2: MOVZX EAX,word ptr [RDX + RDI*0x1] ROL AX,0x8 MOVZX EAX,AX JMP 0x00184637 caseD_6: MOV EAX,dword ptr [RDX + RDI*0x1] MOVZX EDX,word ptr [RDX + RDI*0x1 + 0x4] SHL RDX,0x30 SHL RAX,0x10 JMP 0x0018462b caseD_4: MOV EAX,dword ptr [RDX + RDI*0x1] BSWAP EAX JMP 0x00184637 caseD_5: MOV EAX,dword ptr [RDX + RDI*0x1] MOVZX EDX,byte ptr [RDX + RDI*0x1 + 0x4] SHL RDX,0x38 SHL RAX,0x18 JMP 0x0018462b LAB_001845f3: XOR EAX,EAX JMP 0x00184637 caseD_3: MOVZX EAX,word ptr [RDX + RDI*0x1 + 0x1] ROL AX,0x8 MOVZX ESI,AX MOVZX EAX,byte ptr [RDX + RDI*0x1] SHL EAX,0x10 OR RAX,RSI JMP 0x00184637 caseD_7: MOV EAX,dword ptr [RDX + RDI*0x1] MOVZX ESI,word ptr [RDX + RDI*0x1 + 0x4] MOVZX EDX,byte ptr [RDX + RDI*0x1 + 0x6] SHL RDX,0x38 SHL RSI,0x28 SHL RAX,0x8 OR RAX,RSI LAB_0018462b: OR RAX,RDX JMP 0x00184634 caseD_8: MOV RAX,qword ptr [RDX + RDI*0x1] LAB_00184634: BSWAP RAX LAB_00184637: TEST byte ptr [RCX + 0x318],0x5 JNZ 0x00184648 IMUL RAX,qword ptr [RCX + 0x148] LAB_00184648: POP RBP RET
ulong _mi_dpos(long *param_1,int param_2,long param_3) { ushort uVar1; int iVar2; uint uVar3; long lVar4; ulong uVar5; ulong uVar6; long lVar7; lVar4 = *param_1; iVar2 = *(int *)(lVar4 + 0x338); if (6 < iVar2 - 2U) { uVar5 = 0; goto LAB_00184637; } lVar7 = -(ulong)(uint)(iVar2 + param_2); switch(iVar2) { case 2: uVar5 = (ulong)(ushort)(*(ushort *)(param_3 + lVar7) << 8 | *(ushort *)(param_3 + lVar7) >> 8); goto LAB_00184637; case 3: uVar1 = *(ushort *)(param_3 + 1 + lVar7); uVar5 = (ulong)CONCAT12(*(int1 *)(param_3 + lVar7),uVar1 << 8 | uVar1 >> 8); goto LAB_00184637; case 4: uVar3 = *(uint *)(param_3 + lVar7); uVar5 = (ulong)(uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18) ; goto LAB_00184637; case 5: uVar6 = (ulong)*(byte *)(param_3 + 4 + lVar7) << 0x38; uVar5 = (ulong)*(uint *)(param_3 + lVar7) << 0x18; break; case 6: uVar6 = (ulong)*(ushort *)(param_3 + 4 + lVar7) << 0x30; uVar5 = (ulong)*(uint *)(param_3 + lVar7) << 0x10; break; case 7: uVar6 = (ulong)*(byte *)(param_3 + 6 + lVar7) << 0x38; uVar5 = (ulong)*(uint *)(param_3 + lVar7) << 8 | (ulong)*(ushort *)(param_3 + 4 + lVar7) << 0x28 ; break; case 8: uVar5 = *(ulong *)(param_3 + lVar7); goto LAB_00184634; } uVar5 = uVar5 | uVar6; LAB_00184634: uVar5 = uVar5 >> 0x38 | (uVar5 & 0xff000000000000) >> 0x28 | (uVar5 & 0xff0000000000) >> 0x18 | (uVar5 & 0xff00000000) >> 8 | (uVar5 & 0xff000000) << 8 | (uVar5 & 0xff0000) << 0x18 | (uVar5 & 0xff00) << 0x28 | uVar5 << 0x38; LAB_00184637: if ((*(byte *)(lVar4 + 0x318) & 5) == 0) { uVar5 = uVar5 * *(long *)(lVar4 + 0x148); } return uVar5; }
49,404
mi_state_info_read_dsk
eloqsql/storage/myisam/mi_open.c
uint mi_state_info_read_dsk(File file, MI_STATE_INFO *state, my_bool pRead) { uchar buff[MI_STATE_INFO_SIZE + MI_STATE_EXTRA_SIZE]; if (!myisam_single_user) { if (pRead) { if (mysql_file_pread(file, buff, state->state_length, 0L, MYF(MY_NABP))) return 1; } else if (mysql_file_read(file, buff, state->state_length, MYF(MY_NABP))) return 1; mi_state_info_read(buff, state); } return 0; }
O0
c
mi_state_info_read_dsk: pushq %rbp movq %rsp, %rbp subq $0x2360, %rsp # imm = 0x2360 movb %dl, %al movq %fs:0x28, %rcx movq %rcx, -0x8(%rbp) movl %edi, -0x2348(%rbp) movq %rsi, -0x2350(%rbp) movb %al, -0x2351(%rbp) leaq 0xbd38ae(%rip), %rax # 0xcafa82 cmpb $0x0, (%rax) jne 0xdc290 cmpb $0x0, -0x2351(%rbp) je 0xdc235 movl -0x2348(%rbp), %edx leaq -0x2340(%rbp), %rcx movq -0x2350(%rbp), %rax movl 0xf8(%rax), %eax movl %eax, %r8d leaq 0xa7f96(%rip), %rdi # 0x1841a0 movl $0x418, %esi # imm = 0x418 xorl %eax, %eax movl %eax, %r9d movq $0x4, (%rsp) callq 0xdc2d0 cmpq $0x0, %rax je 0xdc233 movl $0x1, -0x2344(%rbp) jmp 0xdc29a jmp 0xdc27d movl -0x2348(%rbp), %edx leaq -0x2340(%rbp), %rcx movq -0x2350(%rbp), %rax movl 0xf8(%rax), %eax movl %eax, %r8d leaq 0xa7f47(%rip), %rdi # 0x1841a0 movl $0x41b, %esi # imm = 0x41B movl $0x4, %r9d callq 0xd81e0 cmpq $0x0, %rax je 0xdc27b movl $0x1, -0x2344(%rbp) jmp 0xdc29a jmp 0xdc27d leaq -0x2340(%rbp), %rdi movq -0x2350(%rbp), %rsi callq 0xd8440 movl $0x0, -0x2344(%rbp) movl -0x2344(%rbp), %eax movl %eax, -0x2358(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xdc2c7 movl -0x2358(%rbp), %eax addq $0x2360, %rsp # imm = 0x2360 popq %rbp retq callq 0x2a290 nopl (%rax)
mi_state_info_read_dsk: push rbp mov rbp, rsp sub rsp, 2360h mov al, dl mov rcx, fs:28h mov [rbp+var_8], rcx mov [rbp+var_2348], edi mov [rbp+var_2350], rsi mov [rbp+var_2351], al lea rax, myisam_single_user cmp byte ptr [rax], 0 jnz loc_DC290 cmp [rbp+var_2351], 0 jz short loc_DC235 mov edx, [rbp+var_2348] lea rcx, [rbp+var_2340] mov rax, [rbp+var_2350] mov eax, [rax+0F8h] mov r8d, eax lea rdi, aWorkspaceLlm4b_38; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 418h xor eax, eax mov r9d, eax mov [rsp+2360h+var_2360], 4 call inline_mysql_file_pread_8 cmp rax, 0 jz short loc_DC233 mov [rbp+var_2344], 1 jmp short loc_DC29A loc_DC233: jmp short loc_DC27D loc_DC235: mov edx, [rbp+var_2348] lea rcx, [rbp+var_2340] mov rax, [rbp+var_2350] mov eax, [rax+0F8h] mov r8d, eax lea rdi, aWorkspaceLlm4b_38; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 41Bh mov r9d, 4 call inline_mysql_file_read_3 cmp rax, 0 jz short loc_DC27B mov [rbp+var_2344], 1 jmp short loc_DC29A loc_DC27B: jmp short $+2 loc_DC27D: lea rdi, [rbp+var_2340] mov rsi, [rbp+var_2350] call mi_state_info_read loc_DC290: mov [rbp+var_2344], 0 loc_DC29A: mov eax, [rbp+var_2344] mov [rbp+var_2358], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_DC2C7 mov eax, [rbp+var_2358] add rsp, 2360h pop rbp retn loc_DC2C7: call ___stack_chk_fail
long long mi_state_info_read_dsk(unsigned int a1, long long a2, char a3) { _BYTE v5[9016]; // [rsp+20h] [rbp-2340h] BYREF unsigned long long v6; // [rsp+2358h] [rbp-8h] v6 = __readfsqword(0x28u); if ( myisam_single_user ) return 0; if ( !a3 ) { if ( inline_mysql_file_read_3( (long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c", 0x41Bu, a1, (long long)v5, *(unsigned int *)(a2 + 248), 4LL) ) { return 1; } goto LABEL_8; } if ( !inline_mysql_file_pread_8( (unsigned int)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c", 1048, a1, (unsigned int)v5, *(_DWORD *)(a2 + 248), 0, 4LL) ) { LABEL_8: mi_state_info_read((long long)v5, a2); return 0; } return 1; }
mi_state_info_read_dsk: PUSH RBP MOV RBP,RSP SUB RSP,0x2360 MOV AL,DL MOV RCX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RCX MOV dword ptr [RBP + -0x2348],EDI MOV qword ptr [RBP + -0x2350],RSI MOV byte ptr [RBP + -0x2351],AL LEA RAX,[0xdafa82] CMP byte ptr [RAX],0x0 JNZ 0x001dc290 CMP byte ptr [RBP + -0x2351],0x0 JZ 0x001dc235 MOV EDX,dword ptr [RBP + -0x2348] LEA RCX,[RBP + -0x2340] MOV RAX,qword ptr [RBP + -0x2350] MOV EAX,dword ptr [RAX + 0xf8] MOV R8D,EAX LEA RDI,[0x2841a0] MOV ESI,0x418 XOR EAX,EAX MOV R9D,EAX MOV qword ptr [RSP],0x4 CALL 0x001dc2d0 CMP RAX,0x0 JZ 0x001dc233 MOV dword ptr [RBP + -0x2344],0x1 JMP 0x001dc29a LAB_001dc233: JMP 0x001dc27d LAB_001dc235: MOV EDX,dword ptr [RBP + -0x2348] LEA RCX,[RBP + -0x2340] MOV RAX,qword ptr [RBP + -0x2350] MOV EAX,dword ptr [RAX + 0xf8] MOV R8D,EAX LEA RDI,[0x2841a0] MOV ESI,0x41b MOV R9D,0x4 CALL 0x001d81e0 CMP RAX,0x0 JZ 0x001dc27b MOV dword ptr [RBP + -0x2344],0x1 JMP 0x001dc29a LAB_001dc27b: JMP 0x001dc27d LAB_001dc27d: LEA RDI,[RBP + -0x2340] MOV RSI,qword ptr [RBP + -0x2350] CALL 0x001d8440 LAB_001dc290: MOV dword ptr [RBP + -0x2344],0x0 LAB_001dc29a: MOV EAX,dword ptr [RBP + -0x2344] MOV dword ptr [RBP + -0x2358],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001dc2c7 MOV EAX,dword ptr [RBP + -0x2358] ADD RSP,0x2360 POP RBP RET LAB_001dc2c7: CALL 0x0012a290
int4 mi_state_info_read_dsk(int4 param_1,long param_2,char param_3) { long lVar1; long in_FS_OFFSET; int4 local_234c; int1 local_2348 [9016]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); if (myisam_single_user == '\0') { if (param_3 == '\0') { lVar1 = inline_mysql_file_read ("/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c",0x41b, param_1,local_2348,*(int4 *)(param_2 + 0xf8),4); if (lVar1 != 0) { local_234c = 1; goto LAB_001dc29a; } } else { lVar1 = inline_mysql_file_pread ("/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c",0x418, param_1,local_2348,*(int4 *)(param_2 + 0xf8),0,4); if (lVar1 != 0) { local_234c = 1; goto LAB_001dc29a; } } mi_state_info_read(local_2348,param_2); } local_234c = 0; LAB_001dc29a: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_234c; }
49,405
fs_get_cache_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/common.cpp
std::string fs_get_cache_file(const std::string & filename) { GGML_ASSERT(filename.find(DIRECTORY_SEPARATOR) == std::string::npos); std::string cache_directory = fs_get_cache_directory(); const bool success = fs_create_directory_with_parents(cache_directory); if (!success) { throw std::runtime_error("failed to create cache directory: " + cache_directory); } return cache_directory + filename; }
O2
cpp
fs_get_cache_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rsi, %r14 movq %rdi, %rbx pushq $0x2f popq %rsi movq %r14, %rdi xorl %edx, %edx callq 0x24b90 cmpq $-0x1, %rax jne 0x59b7b leaq 0x8(%rsp), %r15 movq %r15, %rdi callq 0x5993f movq %r15, %rdi callq 0x59861 testb %al, %al je 0x59b9c leaq 0x8(%rsp), %rsi movq %rbx, %rdi movq %r14, %rdx callq 0x5d603 leaq 0x8(%rsp), %rdi callq 0x25258 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x5e207(%rip), %rdi # 0xb7d89 leaq 0x54a3c(%rip), %rdx # 0xae5c5 leaq 0x5e3d2(%rip), %rcx # 0xb7f62 movl $0x378, %esi # imm = 0x378 xorl %eax, %eax callq 0x24f00 pushq $0x10 popq %rdi callq 0x24470 movq %rax, %rbx leaq 0x5e3ec(%rip), %rsi # 0xb7f9a leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x2da83 movb $0x1, %bpl leaq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0x24e80 xorl %ebp, %ebp movq 0xaa41a(%rip), %rsi # 0x103ff0 movq 0xaa37b(%rip), %rdx # 0x103f58 movq %rbx, %rdi callq 0x24f50 movq %rax, %r14 leaq 0x28(%rsp), %rdi callq 0x25258 testb %bpl, %bpl jne 0x59bfc jmp 0x59c09 movq %rax, %r14 movq %rbx, %rdi callq 0x246b0 jmp 0x59c09 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x25258 movq %r14, %rdi callq 0x24fe0
_Z17fs_get_cache_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push rbx sub rsp, 48h mov r14, rsi mov rbx, rdi push 2Fh ; '/' pop rsi mov rdi, r14 xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_59B7B lea r15, [rsp+68h+var_60] mov rdi, r15 call _Z22fs_get_cache_directoryB5cxx11v; fs_get_cache_directory(void) mov rdi, r15 call _Z32fs_create_directory_with_parentsRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; fs_create_directory_with_parents(std::string const&) test al, al jz short loc_59B9C lea rsi, [rsp+68h+var_60] mov rdi, rbx mov rdx, r14 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_SA_; std::operator+<char>(std::string const&,std::string const&) lea rdi, [rsp+68h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, rbx add rsp, 48h pop rbx pop r14 pop r15 pop rbp retn loc_59B7B: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aFilenameFindDi; "filename.find(DIRECTORY_SEPARATOR) == s"... mov esi, 378h xor eax, eax call _ggml_abort loc_59B9C: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aFailedToCreate; "failed to create cache directory: " lea rdi, [rsp+68h+var_40] lea rdx, [rsp+68h+var_60] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) mov bpl, 1 lea rsi, [rsp+68h+var_40] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+68h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_59BFC jmp short loc_59C09 mov r14, rax loc_59BFC: mov rdi, rbx; void * call ___cxa_free_exception jmp short loc_59C09 mov r14, rax loc_59C09: lea rdi, [rsp+68h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r14 call __Unwind_Resume
long long fs_get_cache_file(long long a1, long long a2) { void *exception; // rbx _QWORD v4[4]; // [rsp+8h] [rbp-60h] BYREF _BYTE v5[64]; // [rsp+28h] [rbp-40h] BYREF if ( std::string::find(a2, 47LL, 0LL) != -1 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp", 888LL, "GGML_ASSERT(%s) failed", "filename.find(DIRECTORY_SEPARATOR) == std::string::npos"); LABEL_5: exception = __cxa_allocate_exception(0x10uLL); std::operator+<char>((long long)v5, (long long)"failed to create cache directory: ", (long long)v4); std::runtime_error::runtime_error(exception, v5); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } fs_get_cache_directory[abi:cxx11]((long long)v4); if ( !(unsigned __int8)fs_create_directory_with_parents(v4) ) goto LABEL_5; std::operator+<char>(a1, v4, a2); std::string::~string(v4); return a1; }
fs_get_cache_file: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV R14,RSI MOV RBX,RDI PUSH 0x2f POP RSI MOV RDI,R14 XOR EDX,EDX CALL 0x00124b90 CMP RAX,-0x1 JNZ 0x00159b7b LEA R15,[RSP + 0x8] MOV RDI,R15 CALL 0x0015993f LAB_00159b47: MOV RDI,R15 CALL 0x00159861 TEST AL,AL JZ 0x00159b9c LEA RSI,[RSP + 0x8] MOV RDI,RBX MOV RDX,R14 CALL 0x0015d603 LAB_00159b63: LEA RDI,[RSP + 0x8] CALL 0x00125258 MOV RAX,RBX ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP RET LAB_00159b7b: LEA RDI,[0x1b7d89] LEA RDX,[0x1ae5c5] LEA RCX,[0x1b7f62] MOV ESI,0x378 XOR EAX,EAX CALL 0x00124f00 LAB_00159b9c: PUSH 0x10 POP RDI CALL 0x00124470 MOV RBX,RAX LAB_00159ba7: LEA RSI,[0x1b7f9a] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x8] CALL 0x0012da83 MOV BPL,0x1 LAB_00159bc0: LEA RSI,[RSP + 0x28] MOV RDI,RBX CALL 0x00124e80 XOR EBP,EBP MOV RSI,qword ptr [0x00203ff0] MOV RDX,qword ptr [0x00203f58] MOV RDI,RBX CALL 0x00124f50
/* fs_get_cache_file(std::__cxx11::string const&) */ string * fs_get_cache_file(string *param_1) { char cVar1; long lVar2; runtime_error *this; char in_SIL; string local_60 [32]; string local_40 [32]; lVar2 = std::__cxx11::string::find(in_SIL,0x2f); if (lVar2 != -1) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",0x378, "GGML_ASSERT(%s) failed","filename.find(DIRECTORY_SEPARATOR) == std::string::npos"); } fs_get_cache_directory_abi_cxx11_(); /* try { // try from 00159b47 to 00159b62 has its CatchHandler @ 00159c06 */ cVar1 = fs_create_directory_with_parents(local_60); if (cVar1 != '\0') { std::operator+(param_1,local_60); std::__cxx11::string::~string(local_60); return param_1; } this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00159ba7 to 00159bbc has its CatchHandler @ 00159bf9 */ std::operator+((char *)local_40,(string *)"failed to create cache directory: "); /* try { // try from 00159bc0 to 00159be4 has its CatchHandler @ 00159be5 */ std::runtime_error::runtime_error(this,local_40); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_00203ff0,PTR__runtime_error_00203f58); }
49,406
testing::internal::FormatDeathTestOutput(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
giladroyz[P]FindPeaks/build_O2/_deps/googletest-src/googletest/src/gtest-death-test.cc
static ::std::string FormatDeathTestOutput(const ::std::string& output) { ::std::string ret; for (size_t at = 0;;) { const size_t line_end = output.find('\n', at); ret += "[ DEATH ] "; if (line_end == ::std::string::npos) { ret += output.substr(at); break; } ret += output.substr(at, line_end + 1 - at); at = line_end + 1; } return ret; }
O2
cpp
testing::internal::FormatDeathTestOutput(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 $0x28, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x10(%rdi), %rax movq %rax, (%rdi) andq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) xorl %ebp, %ebp leaq 0x2604c(%rip), %r15 # 0x34b5c leaq 0x8(%rsp), %r12 movq %r14, %rdi pushq $0xa popq %rsi movq %rbp, %rdx callq 0x8730 movq %rax, %r13 movq %rbx, %rdi movq %r15, %rsi callq 0x8a60 cmpq $-0x1, %r13 je 0xeb66 incq %r13 movq %r13, %rcx subq %rbp, %rcx movq %r12, %rdi movq %r14, %rsi movq %rbp, %rdx callq 0x8520 movq %rbx, %rdi movq %r12, %rsi callq 0x8a90 movq %r12, %rdi callq 0x8ad8 movq %r13, %rbp jmp 0xeb15 leaq 0x8(%rsp), %rdi pushq $-0x1 popq %rcx movq %r14, %rsi movq %rbp, %rdx callq 0x8520 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x8a90 leaq 0x8(%rsp), %rdi callq 0x8ad8 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0xeba8 jmp 0xebb7 jmp 0xebb7 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x8ad8 jmp 0xebba movq %rax, %r14 movq %rbx, %rdi callq 0x8ad8 movq %r14, %rdi callq 0x89a0
_ZN7testing8internalL21FormatDeathTestOutputERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r14, rsi mov rbx, rdi lea rax, [rdi+10h] mov [rdi], rax and qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 xor ebp, ebp lea r15, aDeath; "[ DEATH ] " lea r12, [rsp+58h+var_50] loc_EB15: mov rdi, r14 push 0Ah pop rsi mov rdx, rbp call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong) mov r13, rax mov rdi, rbx mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) cmp r13, 0FFFFFFFFFFFFFFFFh jz short loc_EB66 inc r13 mov rcx, r13 sub rcx, rbp mov rdi, r12 mov rsi, r14 mov rdx, rbp call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rdi, rbx mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&) mov rdi, r12; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rbp, r13 jmp short loc_EB15 loc_EB66: lea rdi, [rsp+58h+var_50] push 0FFFFFFFFFFFFFFFFh pop rcx mov rsi, r14 mov rdx, rbp call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) lea rsi, [rsp+58h+var_50] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&) lea rdi, [rsp+58h+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_EBA8 jmp short loc_EBB7 jmp short loc_EBB7 loc_EBA8: mov r14, rax lea rdi, [rsp+arg_0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_EBBA loc_EBB7: mov r14, rax loc_EBBA: mov rdi, rbx; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r14 call __Unwind_Resume
long long testing::internal::FormatDeathTestOutput(long long a1, long long a2) { long long i; // rbp long long v3; // r13 long long v4; // r13 _BYTE v6[80]; // [rsp+8h] [rbp-50h] BYREF *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; for ( i = 0LL; ; i = v4 ) { v3 = std::string::find(a2, 10LL, i); std::string::append(a1, "[ DEATH ] "); if ( v3 == -1 ) break; v4 = v3 + 1; std::string::substr(v6, a2, i, v4 - i); std::string::append(a1, v6); std::string::~string(v6); } std::string::substr(v6, a2, i, -1LL); std::string::append(a1, v6); std::string::~string(v6); return a1; }
FormatDeathTestOutput: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R14,RSI MOV RBX,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RDI],RAX AND qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 XOR EBP,EBP LEA R15,[0x134b5c] LEA R12,[RSP + 0x8] LAB_0010eb15: MOV RDI,R14 PUSH 0xa POP RSI MOV RDX,RBP CALL 0x00108730 MOV R13,RAX LAB_0010eb26: MOV RDI,RBX MOV RSI,R15 CALL 0x00108a60 CMP R13,-0x1 JZ 0x0010eb66 INC R13 MOV RCX,R13 SUB RCX,RBP LAB_0010eb40: MOV RDI,R12 MOV RSI,R14 MOV RDX,RBP CALL 0x00108520 LAB_0010eb4e: MOV RDI,RBX MOV RSI,R12 CALL 0x00108a90 MOV RDI,R12 CALL 0x00108ad8 MOV RBP,R13 JMP 0x0010eb15 LAB_0010eb66: LEA RDI,[RSP + 0x8] PUSH -0x1 POP RCX MOV RSI,R14 MOV RDX,RBP CALL 0x00108520 LAB_0010eb79: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x00108a90 LAB_0010eb86: LEA RDI,[RSP + 0x8] CALL 0x00108ad8 MOV RAX,RBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* testing::internal::FormatDeathTestOutput(std::__cxx11::string const&) */ internal * __thiscall testing::internal::FormatDeathTestOutput(internal *this,string *param_1) { long lVar1; string local_50 [32]; *(internal **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (internal)0x0; while( true ) { lVar1 = std::__cxx11::string::find((char)param_1,10); /* try { // try from 0010eb26 to 0010eb30 has its CatchHandler @ 0010ebb7 */ std::__cxx11::string::append((char *)this); if (lVar1 == -1) break; /* try { // try from 0010eb40 to 0010eb4d has its CatchHandler @ 0010eba6 */ std::__cxx11::string::substr((ulong)local_50,(ulong)param_1); /* try { // try from 0010eb4e to 0010eb58 has its CatchHandler @ 0010eba8 */ std::__cxx11::string::append((string *)this); std::__cxx11::string::~string(local_50); } /* try { // try from 0010eb66 to 0010eb78 has its CatchHandler @ 0010eba4 */ std::__cxx11::string::substr((ulong)local_50,(ulong)param_1); /* try { // try from 0010eb79 to 0010eb85 has its CatchHandler @ 0010eba2 */ std::__cxx11::string::append((string *)this); std::__cxx11::string::~string(local_50); return this; }
49,407
delete_dynamic_with_callback
eloqsql/mysys/array.c
void delete_dynamic_with_callback(DYNAMIC_ARRAY *array, FREE_FUNC f) { uint i; char *ptr= (char*) array->buffer; for (i= 0; i < array->elements; i++, ptr+= array->size_of_element) { f(ptr); } delete_dynamic(array); }
O3
c
delete_dynamic_with_callback: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdi, %rbx cmpl $0x0, 0x8(%rdi) je 0x2c7de movq %rsi, %r14 movq (%rbx), %r15 xorl %r12d, %r12d movq %r15, %rdi callq *%r14 incl %r12d movl 0x14(%rbx), %eax addq %rax, %r15 cmpl 0x8(%rbx), %r12d jb 0x2c7c9 testb $0x1, 0x21(%rbx) jne 0x2c7f1 movq (%rbx), %rdi testq %rdi, %rdi je 0x2c7f1 callq 0x2b8fa xorps %xmm0, %xmm0 movups %xmm0, (%rbx) popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
delete_dynamic_with_callback: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rdi cmp dword ptr [rdi+8], 0 jz short loc_2C7DE mov r14, rsi mov r15, [rbx] xor r12d, r12d loc_2C7C9: mov rdi, r15 call r14 inc r12d mov eax, [rbx+14h] add r15, rax cmp r12d, [rbx+8] jb short loc_2C7C9 loc_2C7DE: test byte ptr [rbx+21h], 1 jnz short loc_2C7F1 mov rdi, [rbx] test rdi, rdi jz short loc_2C7F1 call my_free loc_2C7F1: xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long delete_dynamic_with_callback(long long a1, void ( *a2)(long long)) { long long v2; // r15 unsigned int v3; // r12d long long result; // rax if ( *(_DWORD *)(a1 + 8) ) { v2 = *(_QWORD *)a1; v3 = 0; do { a2(v2); ++v3; result = *(unsigned int *)(a1 + 20); v2 += result; } while ( v3 < *(_DWORD *)(a1 + 8) ); } if ( (*(_BYTE *)(a1 + 33) & 1) == 0 && *(_QWORD *)a1 ) result = my_free(*(_QWORD *)a1); *(_OWORD *)a1 = 0LL; return result; }
delete_dynamic_with_callback: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RDI CMP dword ptr [RDI + 0x8],0x0 JZ 0x0012c7de MOV R14,RSI MOV R15,qword ptr [RBX] XOR R12D,R12D LAB_0012c7c9: MOV RDI,R15 CALL R14 INC R12D MOV EAX,dword ptr [RBX + 0x14] ADD R15,RAX CMP R12D,dword ptr [RBX + 0x8] JC 0x0012c7c9 LAB_0012c7de: TEST byte ptr [RBX + 0x21],0x1 JNZ 0x0012c7f1 MOV RDI,qword ptr [RBX] TEST RDI,RDI JZ 0x0012c7f1 CALL 0x0012b8fa LAB_0012c7f1: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 POP RBX POP R12 POP R14 POP R15 POP RBP RET
void delete_dynamic_with_callback(long *param_1,code *param_2) { uint uVar1; long lVar2; if ((int)param_1[1] != 0) { lVar2 = *param_1; uVar1 = 0; do { (*param_2)(lVar2); uVar1 = uVar1 + 1; lVar2 = lVar2 + (ulong)*(uint *)((long)param_1 + 0x14); } while (uVar1 < *(uint *)(param_1 + 1)); } if (((*(byte *)((long)param_1 + 0x21) & 1) == 0) && (*param_1 != 0)) { my_free(); } *param_1 = 0; param_1[1] = 0; return; }
49,408
check_exact_power2n
bluesky950520[P]quickjs/libbf.c
static BOOL check_exact_power2n(bf_t *r, const bf_t *x, slimb_t n) { bf_context_t *s = r->ctx; bf_t T_s, *T = &T_s; slimb_t e, i, er; limb_t v; /* x = m*2^e with m odd integer */ e = bf_get_exp_min(x); /* fast check on the exponent */ if (n > (LIMB_BITS - 1)) { if (e != 0) return FALSE; er = 0; } else { if ((e & (((limb_t)1 << n) - 1)) != 0) return FALSE; er = e >> n; } /* every perfect odd square = 1 modulo 8 */ v = get_bits(x->tab, x->len, x->len * LIMB_BITS - x->expn + e); if ((v & 7) != 1) return FALSE; bf_init(s, T); bf_set(T, x); T->expn -= e; for(i = 0; i < n; i++) { if (i != 0) bf_set(T, r); if (bf_sqrtrem(r, NULL, T) != 0) return FALSE; } r->expn += er; return TRUE; }
O1
c
check_exact_power2n: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdx, %rbx movq %rdi, %r14 movq 0x18(%rsi), %rdx testq %rdx, %rdx je 0x8c307 movq 0x20(%rsi), %rcx movq %rdx, %rax shlq $0x6, %rax xorl %r13d, %r13d xorl %edi, %edi movq (%rcx,%rdi,8), %r8 testq %r8, %r8 jne 0x8c30c incq %rdi addq $-0x40, %rax cmpq %rdi, %rdx jne 0x8c2f0 jmp 0x8c317 xorl %r13d, %r13d jmp 0x8c317 bsfq %r8, %r13 addq 0x10(%rsi), %r13 subq %rax, %r13 movq (%r14), %rdi cmpq $0x40, %rbx jl 0x8c330 xorl %r12d, %r12d testq %r13, %r13 jne 0x8c41f xorl %ebp, %ebp jmp 0x8c350 movq $-0x1, %rax movl %ebx, %ecx shlq %cl, %rax notq %rax testq %rax, %r13 jne 0x8c41c movq %r13, %rbp movl %ebx, %ecx sarq %cl, %rbp movq 0x20(%rsi), %r9 movq %rdx, %rcx shlq $0x6, %rcx subq 0x10(%rsi), %rcx addq %r13, %rcx movq %rcx, %r10 sarq $0x6, %r10 movl %ecx, %eax andl $0x3f, %eax cmpq %rdx, %r10 jae 0x8c379 movq (%r9,%r10,8), %r8 jmp 0x8c37c xorl %r8d, %r8d testl %eax, %eax je 0x8c39f leaq 0x1(%r10), %r11 cmpq %rdx, %r11 jae 0x8c390 movq 0x8(%r9,%r10,8), %rdx jmp 0x8c392 xorl %edx, %edx shrq %cl, %r8 negb %al movl %eax, %ecx shlq %cl, %rdx orq %rdx, %r8 andl $0x7, %r8d cmpl $0x1, %r8d jne 0x8c41c movq %rsp, %r15 movq %rdi, (%r15) movl $0x0, 0x8(%r15) movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 movq %rax, 0x10(%r15) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%r15) movq %r15, %rdi callq 0x84c8d subq %r13, 0x10(%r15) testq %rbx, %rbx jle 0x8c410 xorl %r13d, %r13d movq %rsp, %r15 testq %r13, %r13 je 0x8c3f4 movq %r15, %rdi movq %r14, %rsi callq 0x84c8d xorl %r12d, %r12d movq %r14, %rdi xorl %esi, %esi movq %r15, %rdx callq 0x875c6 testl %eax, %eax jne 0x8c41f incq %r13 cmpq %r13, %rbx jne 0x8c3e4 addq %rbp, 0x10(%r14) movl $0x1, %r12d jmp 0x8c41f xorl %r12d, %r12d movl %r12d, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
check_exact_power2n: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rbx, rdx mov r14, rdi mov rdx, [rsi+18h] test rdx, rdx jz short loc_8C307 mov rcx, [rsi+20h] mov rax, rdx shl rax, 6 xor r13d, r13d xor edi, edi loc_8C2F0: mov r8, [rcx+rdi*8] test r8, r8 jnz short loc_8C30C inc rdi add rax, 0FFFFFFFFFFFFFFC0h cmp rdx, rdi jnz short loc_8C2F0 jmp short loc_8C317 loc_8C307: xor r13d, r13d jmp short loc_8C317 loc_8C30C: bsf r13, r8 add r13, [rsi+10h] sub r13, rax loc_8C317: mov rdi, [r14] cmp rbx, 40h ; '@' jl short loc_8C330 xor r12d, r12d test r13, r13 jnz loc_8C41F xor ebp, ebp jmp short loc_8C350 loc_8C330: mov rax, 0FFFFFFFFFFFFFFFFh mov ecx, ebx shl rax, cl not rax test r13, rax jnz loc_8C41C mov rbp, r13 mov ecx, ebx sar rbp, cl loc_8C350: mov r9, [rsi+20h] mov rcx, rdx shl rcx, 6 sub rcx, [rsi+10h] add rcx, r13 mov r10, rcx sar r10, 6 mov eax, ecx and eax, 3Fh cmp r10, rdx jnb short loc_8C379 mov r8, [r9+r10*8] jmp short loc_8C37C loc_8C379: xor r8d, r8d loc_8C37C: test eax, eax jz short loc_8C39F lea r11, [r10+1] cmp r11, rdx jnb short loc_8C390 mov rdx, [r9+r10*8+8] jmp short loc_8C392 loc_8C390: xor edx, edx loc_8C392: shr r8, cl neg al mov ecx, eax shl rdx, cl or r8, rdx loc_8C39F: and r8d, 7 cmp r8d, 1 jnz short loc_8C41C mov r15, rsp mov [r15], rdi mov dword ptr [r15+8], 0 mov rax, 8000000000000000h mov [r15+10h], rax xorps xmm0, xmm0 movups xmmword ptr [r15+18h], xmm0 mov rdi, r15 call bf_set sub [r15+10h], r13 test rbx, rbx jle short loc_8C410 xor r13d, r13d mov r15, rsp loc_8C3E4: test r13, r13 jz short loc_8C3F4 mov rdi, r15 mov rsi, r14 call bf_set loc_8C3F4: xor r12d, r12d mov rdi, r14 xor esi, esi mov rdx, r15 call bf_sqrtrem test eax, eax jnz short loc_8C41F inc r13 cmp rbx, r13 jnz short loc_8C3E4 loc_8C410: add [r14+10h], rbp mov r12d, 1 jmp short loc_8C41F loc_8C41C: xor r12d, r12d loc_8C41F: mov eax, r12d add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long check_exact_power2n(long long a1, _QWORD *a2, long long a3) { unsigned long long v5; // rdx unsigned long long v6; // rax long long v7; // r13 long long v8; // rdi unsigned long long v9; // r8 unsigned long long v10; // r13 unsigned int v11; // r12d long long v12; // rbp long long v13; // r9 long long v14; // rcx long long v15; // r10 char v16; // al unsigned long long v17; // r8 long long v18; // rdx long long v19; // r13 _QWORD *v21; // [rsp+0h] [rbp-58h] BYREF int v22; // [rsp+8h] [rbp-50h] unsigned long long v23; // [rsp+10h] [rbp-48h] __int128 v24; // [rsp+18h] [rbp-40h] v5 = a2[3]; if ( v5 ) { v6 = v5 << 6; v7 = 0LL; v8 = 0LL; while ( 1 ) { v9 = *(_QWORD *)(a2[4] + 8 * v8); if ( v9 ) break; ++v8; v6 -= 64LL; if ( v5 == v8 ) goto LABEL_8; } _BitScanForward64(&v10, v9); v7 = a2[2] + v10 - v6; } else { v7 = 0LL; } LABEL_8: if ( a3 < 64 ) { if ( (~(-1LL << a3) & v7) != 0 ) return 0; v12 = v7 >> a3; } else { v11 = 0; if ( v7 ) return v11; v12 = 0LL; } v13 = a2[4]; v14 = v7 + (v5 << 6) - a2[2]; v15 = v14 >> 6; v16 = (v7 + ((_BYTE)v5 << 6) - *((_BYTE *)a2 + 16)) & 0x3F; if ( v14 >> 6 >= v5 ) v17 = 0LL; else v17 = *(_QWORD *)(v13 + 8 * v15); if ( (((_BYTE)v7 + ((_BYTE)v5 << 6) - *((_BYTE *)a2 + 16)) & 0x3F) != 0 ) { if ( v15 + 1 >= v5 ) v18 = 0LL; else v18 = *(_QWORD *)(v13 + 8 * v15 + 8); v17 = (v18 << -v16) | (v17 >> v14); } if ( (v17 & 7) != 1 ) return 0; v21 = *(_QWORD **)a1; v22 = 0; v23 = 0x8000000000000000LL; v24 = 0LL; bf_set(&v21, (long long)a2); v23 -= v7; if ( a3 <= 0 ) { LABEL_28: *(_QWORD *)(a1 + 16) += v12; return 1; } else { v19 = 0LL; while ( 1 ) { if ( v19 ) bf_set(&v21, a1); v11 = 0; if ( (unsigned int)bf_sqrtrem((_QWORD **)a1, 0LL, (long long)&v21) ) break; if ( a3 == ++v19 ) goto LABEL_28; } } return v11; }
check_exact_power2n: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBX,RDX MOV R14,RDI MOV RDX,qword ptr [RSI + 0x18] TEST RDX,RDX JZ 0x0018c307 MOV RCX,qword ptr [RSI + 0x20] MOV RAX,RDX SHL RAX,0x6 XOR R13D,R13D XOR EDI,EDI LAB_0018c2f0: MOV R8,qword ptr [RCX + RDI*0x8] TEST R8,R8 JNZ 0x0018c30c INC RDI ADD RAX,-0x40 CMP RDX,RDI JNZ 0x0018c2f0 JMP 0x0018c317 LAB_0018c307: XOR R13D,R13D JMP 0x0018c317 LAB_0018c30c: BSF R13,R8 ADD R13,qword ptr [RSI + 0x10] SUB R13,RAX LAB_0018c317: MOV RDI,qword ptr [R14] CMP RBX,0x40 JL 0x0018c330 XOR R12D,R12D TEST R13,R13 JNZ 0x0018c41f XOR EBP,EBP JMP 0x0018c350 LAB_0018c330: MOV RAX,-0x1 MOV ECX,EBX SHL RAX,CL NOT RAX TEST R13,RAX JNZ 0x0018c41c MOV RBP,R13 MOV ECX,EBX SAR RBP,CL LAB_0018c350: MOV R9,qword ptr [RSI + 0x20] MOV RCX,RDX SHL RCX,0x6 SUB RCX,qword ptr [RSI + 0x10] ADD RCX,R13 MOV R10,RCX SAR R10,0x6 MOV EAX,ECX AND EAX,0x3f CMP R10,RDX JNC 0x0018c379 MOV R8,qword ptr [R9 + R10*0x8] JMP 0x0018c37c LAB_0018c379: XOR R8D,R8D LAB_0018c37c: TEST EAX,EAX JZ 0x0018c39f LEA R11,[R10 + 0x1] CMP R11,RDX JNC 0x0018c390 MOV RDX,qword ptr [R9 + R10*0x8 + 0x8] JMP 0x0018c392 LAB_0018c390: XOR EDX,EDX LAB_0018c392: SHR R8,CL NEG AL MOV ECX,EAX SHL RDX,CL OR R8,RDX LAB_0018c39f: AND R8D,0x7 CMP R8D,0x1 JNZ 0x0018c41c MOV R15,RSP MOV qword ptr [R15],RDI MOV dword ptr [R15 + 0x8],0x0 MOV RAX,-0x8000000000000000 MOV qword ptr [R15 + 0x10],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [R15 + 0x18],XMM0 MOV RDI,R15 CALL 0x00184c8d SUB qword ptr [R15 + 0x10],R13 TEST RBX,RBX JLE 0x0018c410 XOR R13D,R13D MOV R15,RSP LAB_0018c3e4: TEST R13,R13 JZ 0x0018c3f4 MOV RDI,R15 MOV RSI,R14 CALL 0x00184c8d LAB_0018c3f4: XOR R12D,R12D MOV RDI,R14 XOR ESI,ESI MOV RDX,R15 CALL 0x001875c6 TEST EAX,EAX JNZ 0x0018c41f INC R13 CMP RBX,R13 JNZ 0x0018c3e4 LAB_0018c410: ADD qword ptr [R14 + 0x10],RBP MOV R12D,0x1 JMP 0x0018c41f LAB_0018c41c: XOR R12D,R12D LAB_0018c41f: MOV EAX,R12D ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 check_exact_power2n(int8 *param_1,long param_2,long param_3) { ulong uVar1; int iVar2; long lVar3; ulong uVar4; ulong uVar5; ulong uVar6; ulong uVar7; long lVar8; int8 local_58; int4 local_50; long local_48; int8 local_40; int8 uStack_38; uVar1 = *(ulong *)(param_2 + 0x18); if (uVar1 == 0) { uVar7 = 0; } else { lVar3 = uVar1 << 6; uVar7 = 0; uVar4 = 0; do { uVar6 = *(ulong *)(*(long *)(param_2 + 0x20) + uVar4 * 8); if (uVar6 != 0) { lVar8 = 0; if (uVar6 != 0) { for (; (uVar6 >> lVar8 & 1) == 0; lVar8 = lVar8 + 1) { } } uVar7 = (lVar8 + *(long *)(param_2 + 0x10)) - lVar3; break; } uVar4 = uVar4 + 1; lVar3 = lVar3 + -0x40; } while (uVar1 != uVar4); } local_58 = *param_1; if (param_3 < 0x40) { if ((uVar7 & ~(-1L << ((byte)param_3 & 0x3f))) != 0) { return 0; } lVar3 = (long)uVar7 >> ((byte)param_3 & 0x3f); } else { if (uVar7 != 0) { return 0; } lVar3 = 0; } uVar4 = (uVar1 * 0x40 - *(long *)(param_2 + 0x10)) + uVar7; uVar6 = (long)uVar4 >> 6; if (uVar6 < uVar1) { uVar5 = *(ulong *)(*(long *)(param_2 + 0x20) + uVar6 * 8); } else { uVar5 = 0; } if ((uVar4 & 0x3f) != 0) { if (uVar6 + 1 < uVar1) { lVar8 = *(long *)(*(long *)(param_2 + 0x20) + 8 + uVar6 * 8); } else { lVar8 = 0; } uVar5 = uVar5 >> ((byte)uVar4 & 0x3f) | lVar8 << (-((byte)uVar4 & 0x3f) & 0x3f); } if (((uint)uVar5 & 7) != 1) { return 0; } local_50 = 0; local_48 = -0x8000000000000000; local_40 = 0; uStack_38 = 0; bf_set(&local_58); local_48 = local_48 - uVar7; if (0 < param_3) { lVar8 = 0; do { if (lVar8 != 0) { bf_set(&local_58,param_1); } iVar2 = bf_sqrtrem(param_1,0,&local_58); if (iVar2 != 0) { return 0; } lVar8 = lVar8 + 1; } while (param_3 != lVar8); } param_1[2] = param_1[2] + lVar3; return 1; }
49,409
Catch::RunContext::handleMessage(Catch::AssertionInfo const&, Catch::ResultWas::OfType, Catch::StringRef, Catch::AssertionReaction&)
AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp
void RunContext::handleMessage( AssertionInfo const& info, ResultWas::OfType resultType, StringRef message, AssertionReaction& reaction ) { m_reporter->assertionStarting( info ); m_lastAssertionInfo = info; AssertionResultData data( resultType, LazyExpression( false ) ); data.message = static_cast<std::string>(message); AssertionResult assertionResult{ m_lastAssertionInfo, CATCH_MOVE( data ) }; assertionEnded( assertionResult ); if ( !assertionResult.isOk() ) { populateReaction( reaction ); } else if ( resultType == ResultWas::ExplicitSkip ) { // TODO: Need to handle this explicitly, as ExplicitSkip is // considered "OK" reaction.shouldSkip = true; } }
O3
cpp
Catch::RunContext::handleMessage(Catch::AssertionInfo const&, Catch::ResultWas::OfType, Catch::StringRef, Catch::AssertionReaction&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xe8, %rsp movq %r9, %rbx movq %r8, %r15 movq %rcx, %r12 movl %edx, %ebp movq %rsi, %r13 movq %rdi, %r14 movq 0x110(%rdi), %rdi movq (%rdi), %rax callq *0x60(%rax) movl 0x30(%r13), %eax movl %eax, 0x178(%r14) movups (%r13), %xmm0 movups 0x10(%r13), %xmm1 movups 0x20(%r13), %xmm2 movups %xmm2, 0x168(%r14) movups %xmm1, 0x158(%r14) movups %xmm0, 0x148(%r14) movq %rsp, %rdx movq $0x0, (%rdx) movb $0x0, 0x8(%rdx) leaq 0x90(%rsp), %rdi movl %ebp, %esi callq 0x4ac20 leaq 0x10(%rsp), %r13 movq %r13, -0x10(%r13) addq %r12, %r15 movq %rsp, %rdi movq %r12, %rsi movq %r15, %rdx callq 0x37312 leaq 0x148(%r14), %r15 leaq 0x90(%rsp), %r12 movq %rsp, %rsi movq %r12, %rdi movq %r13, %rdx callq 0x18f6b movq %rsp, %rdi movq %r15, %rsi movq %r12, %rdx callq 0x4ad18 movq %rsp, %rsi movq %r14, %rdi callq 0x5f466 testb $0x10, 0x88(%rsp) je 0x60555 movl 0x30(%rsp), %eax andl $0x8, %eax jne 0x60555 movq 0xc8(%r14), %rdi movq (%rdi), %rax callq *0x28(%rax) movb %al, (%rbx) movq 0xc8(%r14), %rdi movq 0xd8(%r14), %r15 movq (%rdi), %rax callq *0x48(%rax) cltq movb 0x178(%r14), %cl andb $0x1, %cl cmpq %rax, %r15 movzbl %cl, %ecx movl $0x1, %eax cmovbl %ecx, %eax movl $0x1, %ecx jmp 0x60561 cmpl $0x4, %ebp jne 0x60564 movb $0x1, %al movl $0x2, %ecx movb %al, (%rbx,%rcx) leaq 0x68(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x6057f movq 0x68(%rsp), %rsi incq %rsi callq 0x17150 leaq 0x48(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x6059a movq 0x48(%rsp), %rsi incq %rsi callq 0x17150 leaq 0xc0(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x605bb movq 0xc0(%rsp), %rsi incq %rsi callq 0x17150 leaq 0xa0(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x605dc movq 0xa0(%rsp), %rsi incq %rsi callq 0x17150 addq $0xe8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x605fd movq %rax, %rbx movq %rsp, %rdi callq 0x774ea jmp 0x60600 movq %rax, %rbx leaq 0x90(%rsp), %rdi callq 0x78990 movq %rbx, %rdi callq 0x17740 nop
_ZN5Catch10RunContext13handleMessageERKNS_13AssertionInfoENS_9ResultWas6OfTypeENS_9StringRefERNS_17AssertionReactionE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0E8h mov rbx, r9 mov r15, r8 mov r12, rcx mov ebp, edx mov r13, rsi mov r14, rdi mov rdi, [rdi+110h] mov rax, [rdi] call qword ptr [rax+60h] mov eax, [r13+30h] mov [r14+178h], eax movups xmm0, xmmword ptr [r13+0] movups xmm1, xmmword ptr [r13+10h] movups xmm2, xmmword ptr [r13+20h] movups xmmword ptr [r14+168h], xmm2 movups xmmword ptr [r14+158h], xmm1 movups xmmword ptr [r14+148h], xmm0 mov rdx, rsp mov qword ptr [rdx], 0 mov byte ptr [rdx+8], 0 lea rdi, [rsp+118h+var_88] mov esi, ebp call _ZN5Catch19AssertionResultDataC2ENS_9ResultWas6OfTypeERKNS_14LazyExpressionE; Catch::AssertionResultData::AssertionResultData(Catch::ResultWas::OfType,Catch::LazyExpression const&) lea r13, [rsp+118h+var_108] mov [r13-10h], r13 add r15, r12 mov rdi, rsp mov rsi, r12 mov rdx, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea r15, [r14+148h] lea r12, [rsp+118h+var_88] mov rsi, rsp mov rdi, r12 mov rdx, r13 call _ZN5Catch10RunContext13handleMessageERKNS_13AssertionInfoENS_9ResultWas6OfTypeENS_9StringRefERNS_17AssertionReactionE_cold_1; Catch::RunContext::handleMessage(Catch::AssertionInfo const&,Catch::ResultWas::OfType,Catch::StringRef,Catch::AssertionReaction &) [clone] mov rdi, rsp mov rsi, r15 mov rdx, r12 call _ZN5Catch15AssertionResultC2ERKNS_13AssertionInfoEONS_19AssertionResultDataE; Catch::AssertionResult::AssertionResult(Catch::AssertionInfo const&,Catch::AssertionResultData &&) mov rsi, rsp; Catch::AssertionResult * mov rdi, r14; this call _ZN5Catch10RunContext14assertionEndedERKNS_15AssertionResultE; Catch::RunContext::assertionEnded(Catch::AssertionResult const&) test [rsp+118h+var_90], 10h jz short loc_60555 mov eax, [rsp+118h+var_E8] and eax, 8 jnz short loc_60555 mov rdi, [r14+0C8h] mov rax, [rdi] call qword ptr [rax+28h] mov [rbx], al mov rdi, [r14+0C8h] mov r15, [r14+0D8h] mov rax, [rdi] call qword ptr [rax+48h] cdqe mov cl, [r14+178h] and cl, 1 cmp r15, rax movzx ecx, cl mov eax, 1 cmovb eax, ecx mov ecx, 1 jmp short loc_60561 loc_60555: cmp ebp, 4 jnz short loc_60564 mov al, 1 mov ecx, 2 loc_60561: mov [rbx+rcx], al loc_60564: lea rax, [rsp+118h+var_B0] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_6057F mov rsi, [rsp+118h+var_B0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6057F: lea rax, [rsp+118h+var_D0] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_6059A mov rsi, [rsp+118h+var_D0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6059A: lea rax, [rsp+118h+var_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_605BB mov rsi, [rsp+118h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_605BB: lea rax, [rsp+118h+var_78] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_605DC mov rsi, [rsp+118h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_605DC: add rsp, 0E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_605FD mov rbx, rax mov rdi, rsp; this call _ZN5Catch15AssertionResultD2Ev; Catch::AssertionResult::~AssertionResult() jmp short loc_60600 loc_605FD: mov rbx, rax loc_60600: lea rdi, [rsp+arg_88]; this call _ZN5Catch19AssertionResultDataD2Ev; Catch::AssertionResultData::~AssertionResultData() mov rdi, rbx call __Unwind_Resume
void Catch::RunContext::handleMessage( Catch::RunContext *this, __int128 *a2, int a3, _BYTE *a4, long long a5, _BYTE *a6) { __int128 v10; // xmm0 __int128 v11; // xmm1 unsigned long long v12; // r15 bool v13; // cf char v14; // al long long v15; // rcx __int128 v16; // [rsp+0h] [rbp-118h] BYREF _QWORD v17[4]; // [rsp+10h] [rbp-108h] BYREF int v18; // [rsp+30h] [rbp-E8h] long long *v19; // [rsp+38h] [rbp-E0h] long long v20; // [rsp+48h] [rbp-D0h] BYREF long long *v21; // [rsp+58h] [rbp-C0h] long long v22; // [rsp+68h] [rbp-B0h] BYREF char v23; // [rsp+88h] [rbp-90h] void *v24[2]; // [rsp+90h] [rbp-88h] BYREF long long v25; // [rsp+A0h] [rbp-78h] BYREF long long *v26; // [rsp+B0h] [rbp-68h] long long v27; // [rsp+C0h] [rbp-58h] BYREF (*(void ( **)(_QWORD))(**((_QWORD **)this + 34) + 96LL))(*((_QWORD *)this + 34)); *((_DWORD *)this + 94) = *((_DWORD *)a2 + 12); v10 = *a2; v11 = a2[1]; *(_OWORD *)((char *)this + 360) = a2[2]; *(_OWORD *)((char *)this + 344) = v11; *(_OWORD *)((char *)this + 328) = v10; *(_QWORD *)&v16 = 0LL; BYTE8(v16) = 0; Catch::AssertionResultData::AssertionResultData((long long)v24, a3, &v16); *(_QWORD *)&v16 = v17; std::string::_M_construct<char const*>(&v16, a4, (long long)&a4[a5]); Catch::RunContext::handleMessage(v24, (void **)&v16, v17); Catch::AssertionResult::AssertionResult((long long)&v16, (__int128 *)((char *)this + 328), (long long)v24); Catch::RunContext::assertionEnded(this, (const Catch::AssertionResult *)&v16, *(double *)&v10); if ( (v23 & 0x10) == 0 || (v18 & 8) != 0 ) { if ( a3 != 4 ) goto LABEL_9; v14 = 1; v15 = 2LL; } else { *a6 = (*(long long ( **)(_QWORD))(**((_QWORD **)this + 25) + 40LL))(*((_QWORD *)this + 25)); v12 = *((_QWORD *)this + 27); v13 = v12 < (*(int ( **)(_QWORD))(**((_QWORD **)this + 25) + 72LL))(*((_QWORD *)this + 25)); v14 = 1; if ( v13 ) v14 = *((_BYTE *)this + 376) & 1; v15 = 1LL; } a6[v15] = v14; LABEL_9: if ( v21 != &v22 ) operator delete(v21, v22 + 1); if ( v19 != &v20 ) operator delete(v19, v20 + 1); if ( v26 != &v27 ) operator delete(v26, v27 + 1); if ( v24[0] != &v25 ) operator delete(v24[0], v25 + 1); }
handleMessage: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xe8 MOV RBX,R9 MOV R15,R8 MOV R12,RCX MOV EBP,EDX MOV R13,RSI MOV R14,RDI MOV RDI,qword ptr [RDI + 0x110] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x60] MOV EAX,dword ptr [R13 + 0x30] MOV dword ptr [R14 + 0x178],EAX MOVUPS XMM0,xmmword ptr [R13] MOVUPS XMM1,xmmword ptr [R13 + 0x10] MOVUPS XMM2,xmmword ptr [R13 + 0x20] MOVUPS xmmword ptr [R14 + 0x168],XMM2 MOVUPS xmmword ptr [R14 + 0x158],XMM1 MOVUPS xmmword ptr [R14 + 0x148],XMM0 MOV RDX,RSP MOV qword ptr [RDX],0x0 MOV byte ptr [RDX + 0x8],0x0 LEA RDI,[RSP + 0x90] MOV ESI,EBP CALL 0x0014ac20 LEA R13,[RSP + 0x10] MOV qword ptr [R13 + -0x10],R13 ADD R15,R12 LAB_001604ba: MOV RDI,RSP MOV RSI,R12 MOV RDX,R15 CALL 0x00137312 LAB_001604c8: LEA R15,[R14 + 0x148] LEA R12,[RSP + 0x90] MOV RSI,RSP MOV RDI,R12 MOV RDX,R13 CALL 0x00118f6b LAB_001604e5: MOV RDI,RSP MOV RSI,R15 MOV RDX,R12 CALL 0x0014ad18 LAB_001604f3: MOV RSI,RSP MOV RDI,R14 CALL 0x0015f466 TEST byte ptr [RSP + 0x88],0x10 JZ 0x00160555 MOV EAX,dword ptr [RSP + 0x30] AND EAX,0x8 JNZ 0x00160555 MOV RDI,qword ptr [R14 + 0xc8] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x28] MOV byte ptr [RBX],AL MOV RDI,qword ptr [R14 + 0xc8] MOV R15,qword ptr [R14 + 0xd8] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x48] LAB_00160534: CDQE MOV CL,byte ptr [R14 + 0x178] AND CL,0x1 CMP R15,RAX MOVZX ECX,CL MOV EAX,0x1 CMOVC EAX,ECX MOV ECX,0x1 JMP 0x00160561 LAB_00160555: CMP EBP,0x4 JNZ 0x00160564 MOV AL,0x1 MOV ECX,0x2 LAB_00160561: MOV byte ptr [RBX + RCX*0x1],AL LAB_00160564: LEA RAX,[RSP + 0x68] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0016057f MOV RSI,qword ptr [RSP + 0x68] INC RSI CALL 0x00117150 LAB_0016057f: LEA RAX,[RSP + 0x48] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0016059a MOV RSI,qword ptr [RSP + 0x48] INC RSI CALL 0x00117150 LAB_0016059a: LEA RAX,[RSP + 0xc0] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001605bb MOV RSI,qword ptr [RSP + 0xc0] INC RSI CALL 0x00117150 LAB_001605bb: LEA RAX,[RSP + 0xa0] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001605dc MOV RSI,qword ptr [RSP + 0xa0] INC RSI CALL 0x00117150 LAB_001605dc: ADD RSP,0xe8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* Catch::RunContext::handleMessage(Catch::AssertionInfo const&, Catch::ResultWas::OfType, Catch::StringRef, Catch::AssertionReaction&) */ void Catch::RunContext::handleMessage (RunContext *param_1,int4 *param_2,int param_3,long param_4,long param_5, int1 *param_6) { ulong uVar1; int4 uVar2; int4 uVar3; int4 uVar4; int4 uVar5; int4 uVar6; int4 uVar7; int4 uVar8; int4 uVar9; int4 uVar10; int4 uVar11; int4 uVar12; int1 uVar13; byte bVar14; int iVar15; long lVar16; int1 *local_118; int1 local_110; int1 local_108 [32]; uint local_e8; long *local_e0; long local_d0 [2]; long *local_c0; long local_b0 [4]; byte local_90; long *local_88 [2]; long local_78 [2]; long *local_68; long local_58 [5]; (**(code **)(**(long **)(param_1 + 0x110) + 0x60))(); *(int4 *)(param_1 + 0x178) = param_2[0xc]; uVar2 = *param_2; uVar3 = param_2[1]; uVar4 = param_2[2]; uVar5 = param_2[3]; uVar6 = param_2[4]; uVar7 = param_2[5]; uVar8 = param_2[6]; uVar9 = param_2[7]; uVar10 = param_2[9]; uVar11 = param_2[10]; uVar12 = param_2[0xb]; *(int4 *)(param_1 + 0x168) = param_2[8]; *(int4 *)(param_1 + 0x16c) = uVar10; *(int4 *)(param_1 + 0x170) = uVar11; *(int4 *)(param_1 + 0x174) = uVar12; *(int4 *)(param_1 + 0x158) = uVar6; *(int4 *)(param_1 + 0x15c) = uVar7; *(int4 *)(param_1 + 0x160) = uVar8; *(int4 *)(param_1 + 0x164) = uVar9; *(int4 *)(param_1 + 0x148) = uVar2; *(int4 *)(param_1 + 0x14c) = uVar3; *(int4 *)(param_1 + 0x150) = uVar4; *(int4 *)(param_1 + 0x154) = uVar5; local_118 = (int1 *)0x0; local_110 = 0; AssertionResultData::AssertionResultData((AssertionResultData *)local_88,param_3); local_118 = local_108; /* try { // try from 001604ba to 001604c7 has its CatchHandler @ 001605fd */ std::__cxx11::string::_M_construct<char_const*>(&local_118,param_4,param_5 + param_4); handleMessage((AssertionResultData *)local_88,&local_118,local_108); /* try { // try from 001604e5 to 001604f2 has its CatchHandler @ 001605ee */ AssertionResult::AssertionResult ((AssertionResult *)&local_118,(AssertionInfo *)(param_1 + 0x148), (AssertionResultData *)local_88); /* try { // try from 001604f3 to 00160533 has its CatchHandler @ 001605f0 */ assertionEnded(param_1,(AssertionResult *)&local_118); if (((local_90 & 0x10) == 0) || ((local_e8 & 8) != 0)) { if (param_3 != 4) goto LAB_00160564; bVar14 = 1; lVar16 = 2; } else { uVar13 = (**(code **)(**(long **)(param_1 + 200) + 0x28))(); *param_6 = uVar13; uVar1 = *(ulong *)(param_1 + 0xd8); iVar15 = (**(code **)(**(long **)(param_1 + 200) + 0x48))(); bVar14 = 1; if (uVar1 < (ulong)(long)iVar15) { bVar14 = (byte)param_1[0x178] & 1; } lVar16 = 1; } param_6[lVar16] = bVar14; LAB_00160564: if (local_c0 != local_b0) { operator_delete(local_c0,local_b0[0] + 1); } if (local_e0 != local_d0) { operator_delete(local_e0,local_d0[0] + 1); } if (local_68 != local_58) { operator_delete(local_68,local_58[0] + 1); } if (local_88[0] != local_78) { operator_delete(local_88[0],local_78[0] + 1); } return; }
49,410
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 0xb64e63(%rip), %rbx # 0xc0a570 movq %rbx, %rdi callq 0x297b0 movq %rbx, %rdi movl $0x3, %esi callq 0x29450 leaq 0xb64e4b(%rip), %rbx # 0xc0a574 movq %rbx, %rdi callq 0x297b0 movq %rbx, %rdi movl $0x2, %esi addq $0x8, %rsp popq %rbx popq %rbp jmp 0x29450
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,[0xd0a570] MOV RDI,RBX CALL 0x001297b0 MOV RDI,RBX MOV ESI,0x3 CALL 0x00129450 LEA RBX,[0xd0a574] MOV RDI,RBX CALL 0x001297b0 MOV RDI,RBX MOV ESI,0x2 ADD RSP,0x8 POP RBX POP RBP JMP 0x00129450
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; }
49,411
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>::insert(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, 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&)
monkey531[P]llama/common/json.hpp
iterator insert(const_iterator pos, const basic_json& val) { // insert only works for arrays if (JSON_HEDLEY_LIKELY(is_array())) { // check if iterator pos fits to this JSON value if (JSON_HEDLEY_UNLIKELY(pos.m_object != this)) { JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value", this)); } // insert to array and return iterator return insert_iterator(pos, val); } JSON_THROW(type_error::create(309, detail::concat("cannot use insert() with ", type_name()), this)); }
O1
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::insert(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, 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 %rbx subq $0x48, %rsp movq %rsi, %r14 cmpb $0x2, (%rsi) jne 0xb0ac2 movq (%rdx), %rsi cmpq %r14, %rsi jne 0xb0b1e movq %rdi, %rbx leaq 0x28(%rsp), %rax movq %rsi, (%rax) movups 0x8(%rdx), %xmm0 movups %xmm0, 0x8(%rax) movq 0x18(%rdx), %rdx movq %rdx, 0x18(%rax) movq %r14, %rsi movq %rax, %rdx callq 0xb0bc4 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x1b450 movq %rax, %rbx movq %r14, %rdi callq 0x714aa leaq 0x20(%rsp), %rdx movq %rax, (%rdx) leaq 0x485aa(%rip), %rsi # 0xf9090 movq %rsp, %rdi callq 0xb0c5f movb $0x1, %bpl movq %rsp, %rdx movq %rbx, %rdi movl $0x135, %esi # imm = 0x135 movq %r14, %rcx callq 0x71252 xorl %ebp, %ebp leaq 0x8169b(%rip), %rsi # 0x1321a8 leaq -0x4350c(%rip), %rdx # 0x6d608 movq %rbx, %rdi callq 0x1bf60 jmp 0xb0b78 movl $0x20, %edi callq 0x1b450 movq %rax, %rbx leaq 0x10(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x4529e(%rip), %rsi # 0xf5dd9 leaq 0x452ba(%rip), %rdx # 0xf5dfc movq %rsp, %rdi callq 0x28a68 movb $0x1, %bpl movq %rsp, %rdx movq %rbx, %rdi movl $0xca, %esi movq %r14, %rcx callq 0x70fea xorl %ebp, %ebp leaq 0x815ff(%rip), %rsi # 0x132168 leaq -0x43568(%rip), %rdx # 0x6d608 movq %rbx, %rdi callq 0x1bf60 movq %rax, %r14 movq (%rsp), %rdi cmpq %r15, %rdi jne 0xb0b99 jmp 0xb0bae jmp 0xb0ba8 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xb0bae movq 0x10(%rsp), %rsi incq %rsi callq 0x1b910 jmp 0xb0bae movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0xb0bbb movq %rbx, %rdi callq 0x1b690 movq %r14, %rdi callq 0x1bff0 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6insertENS0_6detail9iter_implIKSD_EERSG_: push rbp; char push r15; int push r14; int push rbx; int sub rsp, 48h mov r14, rsi cmp byte ptr [rsi], 2 jnz short loc_B0AC2 mov rsi, [rdx] cmp rsi, r14 jnz loc_B0B1E mov rbx, rdi lea rax, [rsp+68h+var_40] mov [rax], rsi movups xmm0, xmmword ptr [rdx+8] movups xmmword ptr [rax+8], xmm0 mov rdx, [rdx+18h] mov [rax+18h], rdx mov rsi, r14 mov rdx, rax call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE15insert_iteratorIJRKSD_EEENS0_6detail9iter_implISD_EENSI_ISF_EEDpOT_; 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>::insert_iterator<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::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov rax, rbx add rsp, 48h pop rbx pop r14 pop r15 pop rbp retn loc_B0AC2: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+68h+var_48] mov [rdx], rax lea rsi, aCannotUseInser; "cannot use insert() with " mov rdi, rsp call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA26_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[26],char const*>(char const(&)[26],char const* &&) mov bpl, 1 mov rdx, rsp mov rdi, rbx; this mov esi, 135h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_B0B78 loc_B0B1E: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r15, [rsp+68h+var_58] mov [r15-10h], r15 lea rsi, aIteratorDoesNo; "iterator does not fit current value" lea rdx, aIteratorDoesNo+23h; "" mov rdi, rsp call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov bpl, 1 mov rdx, rsp mov rdi, rbx; this mov esi, 0CAh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_B0B78: mov r14, rax mov rdi, [rsp+68h+var_68] cmp rdi, r15 jnz short loc_B0B99 jmp short loc_B0BAE jmp short loc_B0BA8 mov r14, rax lea rax, [rsp+68h+var_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_B0BAE loc_B0B99: mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_B0BAE loc_B0BA8: mov r14, rax mov bpl, 1 loc_B0BAE: test bpl, bpl jz short loc_B0BBB mov rdi, rbx; void * call ___cxa_free_exception loc_B0BBB: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::insert( long long a1, unsigned __int8 *a2, long long a3) { nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx nlohmann::json_abi_v3_11_3::detail::exception *v5; // rbx _QWORD v6[2]; // [rsp+0h] [rbp-68h] BYREF _QWORD v7[3]; // [rsp+10h] [rbp-58h] BYREF unsigned __int8 *v8; // [rsp+28h] [rbp-40h] BYREF __int128 v9; // [rsp+30h] [rbp-38h] long long v10; // [rsp+40h] [rbp-28h] if ( *a2 != 2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v7[2] = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(a2); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[26],char const*>( v6, "cannot use insert() with "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 309, v6); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } if ( *(unsigned __int8 **)a3 != a2 ) { v5 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v6[0] = v7; std::string::_M_construct<char const*>(v6, "iterator does not fit current value", (long long)""); ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( v5, 202, v6); __cxa_throw( v5, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::invalid_iterator, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } v8 = *(unsigned __int8 **)a3; v9 = *(_OWORD *)(a3 + 8); v10 = *(_QWORD *)(a3 + 24); 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>::insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&>( a1, a2, &v8); return a1; }
insert: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV R14,RSI CMP byte ptr [RSI],0x2 JNZ 0x001b0ac2 MOV RSI,qword ptr [RDX] CMP RSI,R14 JNZ 0x001b0b1e MOV RBX,RDI LEA RAX,[RSP + 0x28] MOV qword ptr [RAX],RSI MOVUPS XMM0,xmmword ptr [RDX + 0x8] MOVUPS xmmword ptr [RAX + 0x8],XMM0 MOV RDX,qword ptr [RDX + 0x18] MOV qword ptr [RAX + 0x18],RDX MOV RSI,R14 MOV RDX,RAX CALL 0x001b0bc4 MOV RAX,RBX ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP RET LAB_001b0ac2: MOV EDI,0x20 CALL 0x0011b450 MOV RBX,RAX MOV RDI,R14 CALL 0x001714aa LEA RDX,[RSP + 0x20] MOV qword ptr [RDX],RAX LAB_001b0adf: LEA RSI,[0x1f9090] MOV RDI,RSP CALL 0x001b0c5f MOV BPL,0x1 LAB_001b0af1: MOV RDX,RSP MOV RDI,RBX MOV ESI,0x135 MOV RCX,R14 CALL 0x00171252 XOR EBP,EBP LEA RSI,[0x2321a8] LEA RDX,[0x16d608] MOV RDI,RBX CALL 0x0011bf60 LAB_001b0b1e: MOV EDI,0x20 CALL 0x0011b450 MOV RBX,RAX LEA R15,[RSP + 0x10] MOV qword ptr [R15 + -0x10],R15 LAB_001b0b34: LEA RSI,[0x1f5dd9] LEA RDX,[0x1f5dfc] MOV RDI,RSP CALL 0x00128a68 MOV BPL,0x1 LAB_001b0b4d: MOV RDX,RSP MOV RDI,RBX MOV ESI,0xca MOV RCX,R14 CALL 0x00170fea XOR EBP,EBP LEA RSI,[0x232168] LEA RDX,[0x16d608] MOV RDI,RBX CALL 0x0011bf60
/* 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>::insert(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const>, 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&) */ basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> * __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::insert(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *param_2,long *param_3) { int8 uVar1; int1 *local_68 [2]; int1 local_58 [16]; char *local_48; 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_40; int4 local_38; int4 uStack_34; int4 uStack_30; int4 uStack_2c; long local_28; if (*param_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> )0x2) { uVar1 = __cxa_allocate_exception(0x20); local_48 = (char *)type_name(param_2); /* try { // try from 001b0adf to 001b0aed has its CatchHandler @ 001b0ba8 */ detail::concat<std::__cxx11::string,char_const(&)[26],char_const*> ((detail *)local_68,"cannot use insert() with ",&local_48); /* try { // try from 001b0af1 to 001b0b1b has its CatchHandler @ 001b0b88 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar1,0x135,local_68,param_2); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception); } local_40 = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)*param_3; if (local_40 == param_2) { local_38 = (int4)param_3[1]; uStack_34 = *(int4 *)((long)param_3 + 0xc); uStack_30 = (int4)param_3[2]; uStack_2c = *(int4 *)((long)param_3 + 0x14); local_28 = param_3[3]; insert_iterator<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&> (this,param_2,&local_40); return this; } uVar1 = __cxa_allocate_exception(0x20); local_68[0] = local_58; /* try { // try from 001b0b34 to 001b0b49 has its CatchHandler @ 001b0b86 */ std::__cxx11::string::_M_construct<char_const*>(local_68,"iterator does not fit current value","") ; /* try { // try from 001b0b4d to 001b0b77 has its CatchHandler @ 001b0b78 */ _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar1,0xca,local_68,param_2); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&detail::invalid_iterator::typeinfo,detail::exception::~exception); }
49,412
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>::insert(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, 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&)
monkey531[P]llama/common/json.hpp
iterator insert(const_iterator pos, const basic_json& val) { // insert only works for arrays if (JSON_HEDLEY_LIKELY(is_array())) { // check if iterator pos fits to this JSON value if (JSON_HEDLEY_UNLIKELY(pos.m_object != this)) { JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value", this)); } // insert to array and return iterator return insert_iterator(pos, val); } JSON_THROW(type_error::create(309, detail::concat("cannot use insert() with ", type_name()), this)); }
O2
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::insert(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, 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 %r14 pushq %rbx subq $0x50, %rsp movq %rsi, %r14 cmpb $0x2, (%rsi) jne 0x8213a movq (%rdx), %rsi cmpq %r14, %rsi jne 0x82198 movq %rdi, %rbx leaq 0x30(%rsp), %rax movq %rsi, (%rax) movups 0x8(%rdx), %xmm0 movups %xmm0, 0x8(%rax) movq 0x18(%rdx), %rdx movq %rdx, 0x18(%rax) movq %r14, %rsi movq %rax, %rdx callq 0x82214 movq %rbx, %rax addq $0x50, %rsp popq %rbx popq %r14 popq %rbp retq pushq $0x20 popq %rdi callq 0x24470 movq %rax, %rbx movq %r14, %rdi callq 0x537d6 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x37f34(%rip), %rsi # 0xba090 leaq 0x10(%rsp), %rdi callq 0x82285 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x135, %esi # imm = 0x135 movq %r14, %rcx callq 0x5368a xorl %ebp, %ebp leaq 0x80039(%rip), %rsi # 0x1021c0 leaq -0x31df8(%rip), %rdx # 0x50396 movq %rbx, %rdi callq 0x24f50 jmp 0x821e9 pushq $0x20 popq %rdi callq 0x24470 movq %rax, %rbx leaq 0x34c41(%rip), %rsi # 0xb6deb leaq 0x10(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x2a75e movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0xca, %esi movq %r14, %rcx callq 0x534f6 xorl %ebp, %ebp leaq 0x7ffa6(%rip), %rsi # 0x102180 leaq -0x31e4b(%rip), %rdx # 0x50396 movq %rbx, %rdi callq 0x24f50 jmp 0x821ed jmp 0x82201 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x25258 testb %bpl, %bpl jne 0x82204 jmp 0x8220c movq %rax, %r14 movq %rbx, %rdi callq 0x246b0 movq %r14, %rdi callq 0x24fe0
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6insertENS0_6detail9iter_implIKSD_EERSG_: push rbp; char push r14; int push rbx; int sub rsp, 50h mov r14, rsi cmp byte ptr [rsi], 2 jnz short loc_8213A mov rsi, [rdx] cmp rsi, r14 jnz loc_82198 mov rbx, rdi lea rax, [rsp+68h+var_38] mov [rax], rsi movups xmm0, xmmword ptr [rdx+8] movups xmmword ptr [rax+8], xmm0 mov rdx, [rdx+18h] mov [rax+18h], rdx mov rsi, r14 mov rdx, rax call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE15insert_iteratorIJRKSD_EEENS0_6detail9iter_implISD_EENSI_ISF_EEDpOT_; 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>::insert_iterator<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::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov rax, rbx add rsp, 50h pop rbx pop r14 pop rbp retn loc_8213A: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+68h+var_60] mov [rdx], rax lea rsi, aCannotUseInser; "cannot use insert() with " lea rdi, [rsp+68h+var_58] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA26_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[26],char const*>(char const(&)[26],char const* &&) mov bpl, 1 lea rdx, [rsp+68h+var_58] mov rdi, rbx; this mov esi, 135h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_821E9 loc_82198: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aIteratorDoesNo; "iterator does not fit current value" lea rdi, [rsp+68h+var_58] lea rdx, [rsp+68h+var_60] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov bpl, 1 lea rdx, [rsp+68h+var_58] mov rdi, rbx; this mov esi, 0CAh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_821E9: jmp short loc_821ED jmp short loc_82201 loc_821ED: mov r14, rax lea rdi, [rsp+68h+var_58]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_82204 jmp short loc_8220C loc_82201: mov r14, rax loc_82204: mov rdi, rbx; void * call ___cxa_free_exception loc_8220C: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::insert( long long a1, unsigned __int8 *a2, long long a3) { nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx nlohmann::json_abi_v3_11_3::detail::invalid_iterator *v5; // rbx _QWORD v6[4]; // [rsp+10h] [rbp-58h] BYREF unsigned __int8 *v7; // [rsp+30h] [rbp-38h] BYREF __int128 v8; // [rsp+38h] [rbp-30h] long long v9; // [rsp+48h] [rbp-20h] if ( *a2 != 2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(a2); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[26],char const*>( v6, "cannot use insert() with "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 309, (long long)v6); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } if ( *(unsigned __int8 **)a3 != a2 ) { v5 = (nlohmann::json_abi_v3_11_3::detail::invalid_iterator *)__cxa_allocate_exception(0x20uLL); std::string::basic_string<std::allocator<char>>(v6, (long long)"iterator does not fit current value"); ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( v5, 202, (long long)v6); __cxa_throw( v5, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::invalid_iterator, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } v7 = *(unsigned __int8 **)a3; v8 = *(_OWORD *)(a3 + 8); v9 = *(_QWORD *)(a3 + 24); 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>::insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&>( a1, a2, &v7); return a1; }
insert: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x50 MOV R14,RSI CMP byte ptr [RSI],0x2 JNZ 0x0018213a MOV RSI,qword ptr [RDX] CMP RSI,R14 JNZ 0x00182198 MOV RBX,RDI LEA RAX,[RSP + 0x30] MOV qword ptr [RAX],RSI MOVUPS XMM0,xmmword ptr [RDX + 0x8] MOVUPS xmmword ptr [RAX + 0x8],XMM0 MOV RDX,qword ptr [RDX + 0x18] MOV qword ptr [RAX + 0x18],RDX MOV RSI,R14 MOV RDX,RAX CALL 0x00182214 MOV RAX,RBX ADD RSP,0x50 POP RBX POP R14 POP RBP RET LAB_0018213a: PUSH 0x20 POP RDI CALL 0x00124470 MOV RBX,RAX MOV RDI,R14 CALL 0x001537d6 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_00182155: LEA RSI,[0x1ba090] LEA RDI,[RSP + 0x10] CALL 0x00182285 MOV BPL,0x1 LAB_00182169: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x135 MOV RCX,R14 CALL 0x0015368a XOR EBP,EBP LEA RSI,[0x2021c0] LEA RDX,[0x150396] MOV RDI,RBX CALL 0x00124f50 LAB_00182198: PUSH 0x20 POP RDI CALL 0x00124470 MOV RBX,RAX LAB_001821a3: LEA RSI,[0x1b6deb] LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0x8] CALL 0x0012a75e MOV BPL,0x1 LAB_001821bc: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0xca MOV RCX,R14 CALL 0x001534f6 XOR EBP,EBP LEA RSI,[0x202180] LEA RDX,[0x150396] MOV RDI,RBX CALL 0x00124f50
/* 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>::insert(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const>, 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&) */ basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> * __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::insert(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *param_2,long *param_3) { int8 uVar1; char *local_60; detail local_58 [32]; 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_38; int4 local_30; int4 uStack_2c; int4 uStack_28; int4 uStack_24; long local_20; if (*param_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> )0x2) { uVar1 = __cxa_allocate_exception(0x20); local_60 = (char *)type_name(param_2); /* try { // try from 00182155 to 00182165 has its CatchHandler @ 00182201 */ detail::concat<std::__cxx11::string,char_const(&)[26],char_const*> (local_58,"cannot use insert() with ",&local_60); /* try { // try from 00182169 to 00182195 has its CatchHandler @ 001821ed */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar1,0x135,local_58,param_2); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception); } local_38 = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)*param_3; if (local_38 == param_2) { local_30 = (int4)param_3[1]; uStack_2c = *(int4 *)((long)param_3 + 0xc); uStack_28 = (int4)param_3[2]; uStack_24 = *(int4 *)((long)param_3 + 0x14); local_20 = param_3[3]; insert_iterator<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&> (this,param_2,&local_38); return this; } uVar1 = __cxa_allocate_exception(0x20); /* try { // try from 001821a3 to 001821b8 has its CatchHandler @ 001821eb */ std::__cxx11::string::string<std::allocator<char>> ((string *)local_58,"iterator does not fit current value",(allocator *)&local_60); /* try { // try from 001821bc to 001821e8 has its CatchHandler @ 001821e9 */ _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar1,0xca,local_58,param_2); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&detail::invalid_iterator::typeinfo,detail::exception::~exception); }
49,413
mi_read_pack_record
eloqsql/storage/myisam/mi_packrec.c
int _mi_read_pack_record(MI_INFO *info, my_off_t filepos, uchar *buf) { MI_BLOCK_INFO block_info; File file; DBUG_ENTER("mi_read_pack_record"); if (filepos == HA_OFFSET_ERROR) DBUG_RETURN(-1); /* _search() didn't find record */ file=info->dfile; if (_mi_pack_get_block_info(info, &info->bit_buff, &block_info, &info->rec_buff, file, filepos)) goto err; if (mysql_file_read(file, (uchar*) info->rec_buff + block_info.offset, block_info.rec_len - block_info.offset, MYF(MY_NABP))) goto panic; info->update|= HA_STATE_AKTIV; info->rec_buff[block_info.rec_len]= 0; /* Keep valgrind happy */ DBUG_RETURN(_mi_pack_rec_unpack(info, &info->bit_buff, buf, info->rec_buff, block_info.rec_len)); panic: my_errno=HA_ERR_WRONG_IN_RECORD; err: DBUG_RETURN(-1); }
O0
c
mi_read_pack_record: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x70(%rbp) movq %rsi, -0x78(%rbp) movq %rdx, -0x80(%rbp) cmpq $-0x1, -0x78(%rbp) jne 0xde909 jmp 0xde8fd movl $0xffffffff, -0x64(%rbp) # imm = 0xFFFFFFFF jmp 0xde9f1 movq -0x70(%rbp), %rax movl 0x1c0(%rax), %eax movl %eax, -0x84(%rbp) movq -0x70(%rbp), %rdi movq -0x70(%rbp), %rsi addq $0x50, %rsi movq -0x70(%rbp), %rcx addq $0x120, %rcx # imm = 0x120 movl -0x84(%rbp), %r8d movq -0x78(%rbp), %r9 leaq -0x60(%rbp), %rdx callq 0xdea20 cmpl $0x0, %eax je 0xde94e jmp 0xde9e8 movl -0x84(%rbp), %edx movq -0x70(%rbp), %rax movq 0x120(%rax), %rcx movl -0xc(%rbp), %eax addq %rax, %rcx movq -0x48(%rbp), %r8 movl -0xc(%rbp), %eax subq %rax, %r8 leaq 0xa5871(%rip), %rdi # 0x1841e7 movl $0x2d5, %esi # imm = 0x2D5 movl $0x4, %r9d callq 0xdde90 cmpq $0x0, %rax je 0xde98e jmp 0xde9dd movq -0x70(%rbp), %rax movl 0x1d0(%rax), %ecx orl $0x2, %ecx movl %ecx, 0x1d0(%rax) movq -0x70(%rbp), %rax movq 0x120(%rax), %rax movq -0x48(%rbp), %rcx movb $0x0, (%rax,%rcx) movq -0x70(%rbp), %rdi movq -0x70(%rbp), %rsi addq $0x50, %rsi movq -0x80(%rbp), %rdx movq -0x70(%rbp), %rax movq 0x120(%rax), %rcx movq -0x48(%rbp), %r8 callq 0xdec20 movl %eax, -0x64(%rbp) jmp 0xde9f1 callq 0x122520 movl $0x7f, (%rax) jmp 0xde9ea movl $0xffffffff, -0x64(%rbp) # imm = 0xFFFFFFFF movl -0x64(%rbp), %eax movl %eax, -0x88(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xdea1b movl -0x88(%rbp), %eax addq $0x90, %rsp popq %rbp retq callq 0x2a290
_mi_read_pack_record: push rbp mov rbp, rsp sub rsp, 90h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_70], rdi mov [rbp+var_78], rsi mov [rbp+var_80], rdx cmp [rbp+var_78], 0FFFFFFFFFFFFFFFFh jnz short loc_DE909 jmp short $+2 loc_DE8FD: mov [rbp+var_64], 0FFFFFFFFh jmp loc_DE9F1 loc_DE909: mov rax, [rbp+var_70] mov eax, [rax+1C0h] mov [rbp+var_84], eax mov rdi, [rbp+var_70] mov rsi, [rbp+var_70] add rsi, 50h ; 'P' mov rcx, [rbp+var_70] add rcx, 120h mov r8d, [rbp+var_84] mov r9, [rbp+var_78] lea rdx, [rbp+var_60] call _mi_pack_get_block_info cmp eax, 0 jz short loc_DE94E jmp loc_DE9E8 loc_DE94E: mov edx, [rbp+var_84] mov rax, [rbp+var_70] mov rcx, [rax+120h] mov eax, [rbp+var_C] add rcx, rax mov r8, [rbp+var_48] mov eax, [rbp+var_C] sub r8, rax lea rdi, aWorkspaceLlm4b_39; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 2D5h mov r9d, 4 call inline_mysql_file_read_4 cmp rax, 0 jz short loc_DE98E jmp short loc_DE9DD loc_DE98E: mov rax, [rbp+var_70] mov ecx, [rax+1D0h] or ecx, 2 mov [rax+1D0h], ecx mov rax, [rbp+var_70] mov rax, [rax+120h] mov rcx, [rbp+var_48] mov byte ptr [rax+rcx], 0 mov rdi, [rbp+var_70] mov rsi, [rbp+var_70] add rsi, 50h ; 'P' mov rdx, [rbp+var_80] mov rax, [rbp+var_70] mov rcx, [rax+120h] mov r8, [rbp+var_48] call _mi_pack_rec_unpack mov [rbp+var_64], eax jmp short loc_DE9F1 loc_DE9DD: call _my_thread_var mov dword ptr [rax], 7Fh loc_DE9E8: jmp short $+2 loc_DE9EA: mov [rbp+var_64], 0FFFFFFFFh loc_DE9F1: mov eax, [rbp+var_64] mov [rbp+var_88], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_DEA1B mov eax, [rbp+var_88] add rsp, 90h pop rbp retn loc_DEA1B: call ___stack_chk_fail
long long mi_read_pack_record(long long a1, long long a2, long long a3) { long long v3; // rdx long long v4; // rcx long long v5; // r8 long long v6; // r9 unsigned int v8; // [rsp+Ch] [rbp-84h] _BYTE v11[24]; // [rsp+30h] [rbp-60h] BYREF long long v12; // [rsp+48h] [rbp-48h] unsigned int v13; // [rsp+84h] [rbp-Ch] unsigned long long v14; // [rsp+88h] [rbp-8h] v14 = __readfsqword(0x28u); if ( a2 != -1 ) { v8 = *(_DWORD *)(a1 + 448); if ( !(unsigned int)mi_pack_get_block_info(a1, a1 + 80, v11, a1 + 288, v8, a2) ) { if ( !inline_mysql_file_read_4( (long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c", 0x2D5u, v8, v13 + *(_QWORD *)(a1 + 288), v12 - v13, 4LL) ) { *(_DWORD *)(a1 + 464) |= 2u; *(_BYTE *)(*(_QWORD *)(a1 + 288) + v12) = 0; return (unsigned int)mi_pack_rec_unpack(a1, a1 + 80, a3, *(_QWORD *)(a1 + 288), v12); } *(_DWORD *)my_thread_var( "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c", 725LL, v3, v4, v5, v6) = 127; } return (unsigned int)-1; } return (unsigned int)-1; }
_mi_read_pack_record: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x70],RDI MOV qword ptr [RBP + -0x78],RSI MOV qword ptr [RBP + -0x80],RDX CMP qword ptr [RBP + -0x78],-0x1 JNZ 0x001de909 JMP 0x001de8fd LAB_001de8fd: MOV dword ptr [RBP + -0x64],0xffffffff JMP 0x001de9f1 LAB_001de909: MOV RAX,qword ptr [RBP + -0x70] MOV EAX,dword ptr [RAX + 0x1c0] MOV dword ptr [RBP + -0x84],EAX MOV RDI,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x70] ADD RSI,0x50 MOV RCX,qword ptr [RBP + -0x70] ADD RCX,0x120 MOV R8D,dword ptr [RBP + -0x84] MOV R9,qword ptr [RBP + -0x78] LEA RDX,[RBP + -0x60] CALL 0x001dea20 CMP EAX,0x0 JZ 0x001de94e JMP 0x001de9e8 LAB_001de94e: MOV EDX,dword ptr [RBP + -0x84] MOV RAX,qword ptr [RBP + -0x70] MOV RCX,qword ptr [RAX + 0x120] MOV EAX,dword ptr [RBP + -0xc] ADD RCX,RAX MOV R8,qword ptr [RBP + -0x48] MOV EAX,dword ptr [RBP + -0xc] SUB R8,RAX LEA RDI,[0x2841e7] MOV ESI,0x2d5 MOV R9D,0x4 CALL 0x001dde90 CMP RAX,0x0 JZ 0x001de98e JMP 0x001de9dd LAB_001de98e: MOV RAX,qword ptr [RBP + -0x70] MOV ECX,dword ptr [RAX + 0x1d0] OR ECX,0x2 MOV dword ptr [RAX + 0x1d0],ECX MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0x120] MOV RCX,qword ptr [RBP + -0x48] MOV byte ptr [RAX + RCX*0x1],0x0 MOV RDI,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x70] ADD RSI,0x50 MOV RDX,qword ptr [RBP + -0x80] MOV RAX,qword ptr [RBP + -0x70] MOV RCX,qword ptr [RAX + 0x120] MOV R8,qword ptr [RBP + -0x48] CALL 0x001dec20 MOV dword ptr [RBP + -0x64],EAX JMP 0x001de9f1 LAB_001de9dd: CALL 0x00222520 MOV dword ptr [RAX],0x7f LAB_001de9e8: JMP 0x001de9ea LAB_001de9ea: MOV dword ptr [RBP + -0x64],0xffffffff LAB_001de9f1: MOV EAX,dword ptr [RBP + -0x64] MOV dword ptr [RBP + -0x88],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001dea1b MOV EAX,dword ptr [RBP + -0x88] ADD RSP,0x90 POP RBP RET LAB_001dea1b: CALL 0x0012a290
int4 _mi_read_pack_record(long param_1,long param_2,int8 param_3) { int4 uVar1; int iVar2; long lVar3; int4 *puVar4; long in_FS_OFFSET; int4 local_6c; int1 local_68 [24]; long local_50; uint local_14; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); if (param_2 == -1) { local_6c = 0xffffffff; } else { uVar1 = *(int4 *)(param_1 + 0x1c0); iVar2 = _mi_pack_get_block_info(param_1,param_1 + 0x50,local_68,param_1 + 0x120,uVar1,param_2); if (iVar2 == 0) { lVar3 = inline_mysql_file_read ("/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c", 0x2d5,uVar1,*(long *)(param_1 + 0x120) + (ulong)local_14, local_50 - (ulong)local_14,4); if (lVar3 == 0) { *(uint *)(param_1 + 0x1d0) = *(uint *)(param_1 + 0x1d0) | 2; *(int1 *)(*(long *)(param_1 + 0x120) + local_50) = 0; local_6c = _mi_pack_rec_unpack(param_1,param_1 + 0x50,param_3, *(int8 *)(param_1 + 0x120),local_50); goto LAB_001de9f1; } puVar4 = (int4 *)_my_thread_var(); *puVar4 = 0x7f; } local_6c = 0xffffffff; } LAB_001de9f1: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_6c; }
49,414
mi_read_pack_record
eloqsql/storage/myisam/mi_packrec.c
int _mi_read_pack_record(MI_INFO *info, my_off_t filepos, uchar *buf) { MI_BLOCK_INFO block_info; File file; DBUG_ENTER("mi_read_pack_record"); if (filepos == HA_OFFSET_ERROR) DBUG_RETURN(-1); /* _search() didn't find record */ file=info->dfile; if (_mi_pack_get_block_info(info, &info->bit_buff, &block_info, &info->rec_buff, file, filepos)) goto err; if (mysql_file_read(file, (uchar*) info->rec_buff + block_info.offset, block_info.rec_len - block_info.offset, MYF(MY_NABP))) goto panic; info->update|= HA_STATE_AKTIV; info->rec_buff[block_info.rec_len]= 0; /* Keep valgrind happy */ DBUG_RETURN(_mi_pack_rec_unpack(info, &info->bit_buff, buf, info->rec_buff, block_info.rec_len)); panic: my_errno=HA_ERR_WRONG_IN_RECORD; err: DBUG_RETURN(-1); }
O3
c
mi_read_pack_record: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xb8, %rsp movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpq $-0x1, %rsi je 0x9c772 movq %rdx, %r12 movq %rsi, %r9 movq %rdi, %r15 movl 0x1c0(%rdi), %r13d leaq 0x50(%rdi), %rbx leaq 0x120(%rdi), %r14 leaq -0x88(%rbp), %rdx movq %rbx, %rsi movq %r14, %rcx movl %r13d, %r8d callq 0x9c839 testl %eax, %eax jne 0x9c76d movq %r12, -0x98(%rbp) movl -0x34(%rbp), %eax movq (%r14), %r12 addq %rax, %r12 movq -0x70(%rbp), %r14 subq %rax, %r14 leaq 0x3122f2(%rip), %rax # 0x3aea18 movq (%rax), %rax leaq -0xe0(%rbp), %rdi movl %r13d, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax jne 0x9c7cd movl $0x4, %ecx movl %r13d, %edi movq %r12, %rsi movq %r14, %rdx callq 0xbff8c movq %rax, %r12 testq %r12, %r12 je 0x9c797 callq 0xc14ee movl $0x7f, (%rax) movl $0xffffffff, %eax # imm = 0xFFFFFFFF movq %fs:0x28, %rcx cmpq -0x30(%rbp), %rcx jne 0x9c834 addq $0xb8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq orb $0x2, 0x1d0(%r15) movq 0x120(%r15), %rax movq -0x70(%rbp), %rcx movb $0x0, (%rax,%rcx) movq 0x120(%r15), %rcx movq -0x70(%rbp), %r8 movq %r15, %rdi movq %rbx, %rsi movq -0x98(%rbp), %rdx callq 0x9cad7 jmp 0x9c772 movq %rax, %rcx leaq 0x312241(%rip), %rax # 0x3aea18 movq (%rax), %rax leaq 0x629aa(%rip), %rdx # 0xff18b movq %rcx, -0x90(%rbp) movq %rcx, %rdi movq %r14, %rsi movl $0x2d5, %ecx # imm = 0x2D5 callq *0x210(%rax) movl $0x4, %ecx movl %r13d, %edi movq %r12, %rsi movq %r14, %rdx callq 0xbff8c movq %rax, %r12 xorl %esi, %esi testq %rax, %rax cmoveq %r14, %rsi leaq 0x3121f9(%rip), %rax # 0x3aea18 movq (%rax), %rax movq -0x90(%rbp), %rdi callq *0x218(%rax) jmp 0x9c75d callq 0x2a280
_mi_read_pack_record: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0B8h mov rax, fs:28h mov [rbp+var_30], rax mov eax, 0FFFFFFFFh cmp rsi, 0FFFFFFFFFFFFFFFFh jz loc_9C772 mov r12, rdx mov r9, rsi mov r15, rdi mov r13d, [rdi+1C0h] lea rbx, [rdi+50h] lea r14, [rdi+120h] lea rdx, [rbp+var_88] mov rsi, rbx mov rcx, r14 mov r8d, r13d call _mi_pack_get_block_info test eax, eax jnz short loc_9C76D mov [rbp+var_98], r12 mov eax, [rbp+var_34] mov r12, [r14] add r12, rax mov r14, [rbp+var_70] sub r14, rax lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_E0] mov esi, r13d mov edx, 6 call qword ptr [rax+158h] test rax, rax jnz loc_9C7CD mov ecx, 4 mov edi, r13d mov rsi, r12 mov rdx, r14 call my_read mov r12, rax loc_9C75D: test r12, r12 jz short loc_9C797 call _my_thread_var mov dword ptr [rax], 7Fh loc_9C76D: mov eax, 0FFFFFFFFh loc_9C772: mov rcx, fs:28h cmp rcx, [rbp+var_30] jnz loc_9C834 add rsp, 0B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_9C797: or byte ptr [r15+1D0h], 2 mov rax, [r15+120h] mov rcx, [rbp+var_70] mov byte ptr [rax+rcx], 0 mov rcx, [r15+120h] mov r8, [rbp+var_70] mov rdi, r15 mov rsi, rbx mov rdx, [rbp+var_98] call _mi_pack_rec_unpack jmp short loc_9C772 loc_9C7CD: mov rcx, rax lea rax, PSI_server mov rax, [rax] lea rdx, aWorkspaceLlm4b_22; "/workspace/llm4binary/github2025/eloqsq"... mov [rbp+var_90], rcx mov rdi, rcx mov rsi, r14 mov ecx, 2D5h call qword ptr [rax+210h] mov ecx, 4 mov edi, r13d mov rsi, r12 mov rdx, r14 call my_read mov r12, rax xor esi, esi test rax, rax cmovz rsi, r14 lea rax, PSI_server mov rax, [rax] mov rdi, [rbp+var_90] call qword ptr [rax+218h] jmp loc_9C75D loc_9C834: call ___stack_chk_fail
long long mi_read_pack_record(long long a1, long long a2, long long a3) { long long result; // rax unsigned int v6; // r13d long long v7; // rbx long long v8; // r12 long long v9; // r14 long long v10; // rax long long v11; // rdi long long v12; // r12 long long v13; // rsi char v14[72]; // [rsp+0h] [rbp-E0h] BYREF long long v15; // [rsp+48h] [rbp-98h] long long v16; // [rsp+50h] [rbp-90h] char v17[24]; // [rsp+58h] [rbp-88h] BYREF long long v18; // [rsp+70h] [rbp-70h] unsigned int v19; // [rsp+ACh] [rbp-34h] unsigned long long v20; // [rsp+B0h] [rbp-30h] v20 = __readfsqword(0x28u); result = 0xFFFFFFFFLL; if ( a2 != -1 ) { v6 = *(_DWORD *)(a1 + 448); v7 = a1 + 80; if ( !(unsigned int)mi_pack_get_block_info(a1, a1 + 80, v17, a1 + 288, v6, a2) ) { v15 = a3; v8 = v19 + *(_QWORD *)(a1 + 288); v9 = v18 - v19; v10 = ((long long ( *)(char *, _QWORD, long long))PSI_server[43])(v14, v6, 6LL); if ( v10 ) { v16 = v10; ((void ( *)(long long, long long, const char *, long long))PSI_server[66])( v10, v9, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c", 725LL); v12 = my_read(v6, v8, v9, 4LL); v13 = 0LL; if ( !v12 ) v13 = v9; v11 = v16; ((void ( *)(long long, long long))PSI_server[67])(v16, v13); } else { v11 = v6; v12 = my_read(v6, v8, v9, 4LL); } if ( !v12 ) { *(_BYTE *)(a1 + 464) |= 2u; *(_BYTE *)(*(_QWORD *)(a1 + 288) + v18) = 0; return mi_pack_rec_unpack(a1, v7, v15, *(_QWORD *)(a1 + 288), v18); } *(_DWORD *)my_thread_var(v11) = 127; } return 0xFFFFFFFFLL; } return result; }
_mi_read_pack_record: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xb8 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV EAX,0xffffffff CMP RSI,-0x1 JZ 0x0019c772 MOV R12,RDX MOV R9,RSI MOV R15,RDI MOV R13D,dword ptr [RDI + 0x1c0] LEA RBX,[RDI + 0x50] LEA R14,[RDI + 0x120] LEA RDX,[RBP + -0x88] MOV RSI,RBX MOV RCX,R14 MOV R8D,R13D CALL 0x0019c839 TEST EAX,EAX JNZ 0x0019c76d MOV qword ptr [RBP + -0x98],R12 MOV EAX,dword ptr [RBP + -0x34] MOV R12,qword ptr [R14] ADD R12,RAX MOV R14,qword ptr [RBP + -0x70] SUB R14,RAX LEA RAX,[0x4aea18] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0xe0] MOV ESI,R13D MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0019c7cd MOV ECX,0x4 MOV EDI,R13D MOV RSI,R12 MOV RDX,R14 CALL 0x001bff8c MOV R12,RAX LAB_0019c75d: TEST R12,R12 JZ 0x0019c797 CALL 0x001c14ee MOV dword ptr [RAX],0x7f LAB_0019c76d: MOV EAX,0xffffffff LAB_0019c772: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x30] JNZ 0x0019c834 ADD RSP,0xb8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0019c797: OR byte ptr [R15 + 0x1d0],0x2 MOV RAX,qword ptr [R15 + 0x120] MOV RCX,qword ptr [RBP + -0x70] MOV byte ptr [RAX + RCX*0x1],0x0 MOV RCX,qword ptr [R15 + 0x120] MOV R8,qword ptr [RBP + -0x70] MOV RDI,R15 MOV RSI,RBX MOV RDX,qword ptr [RBP + -0x98] CALL 0x0019cad7 JMP 0x0019c772 LAB_0019c7cd: MOV RCX,RAX LEA RAX,[0x4aea18] MOV RAX,qword ptr [RAX] LEA RDX,[0x1ff18b] MOV qword ptr [RBP + -0x90],RCX MOV RDI,RCX MOV RSI,R14 MOV ECX,0x2d5 CALL qword ptr [RAX + 0x210] MOV ECX,0x4 MOV EDI,R13D MOV RSI,R12 MOV RDX,R14 CALL 0x001bff8c MOV R12,RAX XOR ESI,ESI TEST RAX,RAX CMOVZ RSI,R14 LEA RAX,[0x4aea18] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RBP + -0x90] CALL qword ptr [RAX + 0x218] JMP 0x0019c75d LAB_0019c834: CALL 0x0012a280
int8 _mi_read_pack_record(long param_1,long param_2,int8 param_3) { int4 uVar1; int iVar2; int8 uVar3; long lVar4; int4 *puVar5; long lVar6; long lVar7; long in_FS_OFFSET; int1 local_e8 [72]; int8 local_a0; long local_98; int1 local_90 [24]; long local_78; uint local_3c; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); uVar3 = 0xffffffff; if (param_2 != -1) { uVar1 = *(int4 *)(param_1 + 0x1c0); iVar2 = _mi_pack_get_block_info (param_1,param_1 + 0x50,local_90,(long *)(param_1 + 0x120),uVar1,param_2); if (iVar2 == 0) { lVar6 = *(long *)(param_1 + 0x120) + (ulong)local_3c; lVar7 = local_78 - (ulong)local_3c; local_a0 = param_3; lVar4 = (**(code **)(PSI_server + 0x158))(local_e8,uVar1,6); if (lVar4 == 0) { lVar6 = my_read(uVar1,lVar6,lVar7,4); } else { local_98 = lVar4; (**(code **)(PSI_server + 0x210)) (lVar4,lVar7, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c",0x2d5); lVar6 = my_read(uVar1,lVar6,lVar7,4); lVar4 = 0; if (lVar6 == 0) { lVar4 = lVar7; } (**(code **)(PSI_server + 0x218))(local_98,lVar4); } if (lVar6 == 0) { *(byte *)(param_1 + 0x1d0) = *(byte *)(param_1 + 0x1d0) | 2; *(int1 *)(*(long *)(param_1 + 0x120) + local_78) = 0; uVar3 = _mi_pack_rec_unpack(param_1,param_1 + 0x50,local_a0,*(int8 *)(param_1 + 0x120) ,local_78); goto LAB_0019c772; } puVar5 = (int4 *)_my_thread_var(); *puVar5 = 0x7f; } uVar3 = 0xffffffff; } LAB_0019c772: if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return uVar3; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
49,415
LefDefParser::defiNet::setWidth(char const*, double)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiNet.cpp
void defiNet::setWidth(const char* layer, double d) { int len = strlen(layer) + 1; char* l = (char*)malloc(len); strcpy(l, defData->DEFCASE(layer)); if (numWidths_ >= widthsAllocated_) { int i; char** nl; double* nd; widthsAllocated_ = widthsAllocated_ ? widthsAllocated_ * 2 : 4 ; nl = (char**)malloc(sizeof(char*) * widthsAllocated_); nd = (double*)malloc(sizeof(double) * widthsAllocated_); for (i = 0; i < numWidths_; i++) { nl[i] = wlayers_[i]; nd[i] = wdist_[i]; } free((char*)(wlayers_)); free((char*)(wdist_)); wlayers_ = nl; wdist_ = nd; } wlayers_[numWidths_] = l; wdist_[numWidths_] = d; (numWidths_)++; }
O0
cpp
LefDefParser::defiNet::setWidth(char const*, double): subq $0x58, %rsp movq %rdi, 0x50(%rsp) movq %rsi, 0x48(%rsp) movsd %xmm0, 0x40(%rsp) movq 0x50(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x48(%rsp), %rdi callq 0x70e0 addq $0x1, %rax movl %eax, 0x3c(%rsp) movslq 0x3c(%rsp), %rdi callq 0x72d0 movq %rax, %rcx movq 0x10(%rsp), %rax movq %rcx, 0x30(%rsp) movq 0x30(%rsp), %rcx movq %rcx, 0x8(%rsp) movq 0x240(%rax), %rdi movq 0x48(%rsp), %rsi callq 0x27ed0 movq 0x8(%rsp), %rdi movq %rax, %rsi callq 0x7220 movq 0x10(%rsp), %rcx movl 0xf4(%rcx), %eax cmpl 0xf0(%rcx), %eax jl 0x3e19b movq 0x10(%rsp), %rax cmpl $0x0, 0xf0(%rax) je 0x3e0a7 movq 0x10(%rsp), %rax movl 0xf0(%rax), %eax shll %eax movl %eax, 0x4(%rsp) jmp 0x3e0b2 movl $0x4, %eax movl %eax, 0x4(%rsp) jmp 0x3e0b2 movq 0x10(%rsp), %rax movl 0x4(%rsp), %ecx movl %ecx, 0xf0(%rax) movslq 0xf0(%rax), %rdi shlq $0x3, %rdi callq 0x72d0 movq %rax, %rcx movq 0x10(%rsp), %rax movq %rcx, 0x20(%rsp) movslq 0xf0(%rax), %rdi shlq $0x3, %rdi callq 0x72d0 movq %rax, 0x18(%rsp) movl $0x0, 0x2c(%rsp) movq 0x10(%rsp), %rcx movl 0x2c(%rsp), %eax cmpl 0xf4(%rcx), %eax jge 0x3e15c movq 0x10(%rsp), %rax movq 0xf8(%rax), %rcx movslq 0x2c(%rsp), %rdx movq (%rcx,%rdx,8), %rsi movq 0x20(%rsp), %rcx movslq 0x2c(%rsp), %rdx movq %rsi, (%rcx,%rdx,8) movq 0x100(%rax), %rax movslq 0x2c(%rsp), %rcx movsd (%rax,%rcx,8), %xmm0 movq 0x18(%rsp), %rax movslq 0x2c(%rsp), %rcx movsd %xmm0, (%rax,%rcx,8) movl 0x2c(%rsp), %eax addl $0x1, %eax movl %eax, 0x2c(%rsp) jmp 0x3e0fb movq 0x10(%rsp), %rax movq 0xf8(%rax), %rdi callq 0x72a0 movq 0x10(%rsp), %rax movq 0x100(%rax), %rdi callq 0x72a0 movq 0x10(%rsp), %rax movq 0x20(%rsp), %rcx movq %rcx, 0xf8(%rax) movq 0x18(%rsp), %rcx movq %rcx, 0x100(%rax) movq 0x10(%rsp), %rax movq 0x30(%rsp), %rsi movq 0xf8(%rax), %rcx movslq 0xf4(%rax), %rdx movq %rsi, (%rcx,%rdx,8) movsd 0x40(%rsp), %xmm0 movq 0x100(%rax), %rcx movslq 0xf4(%rax), %rdx movsd %xmm0, (%rcx,%rdx,8) movl 0xf4(%rax), %ecx addl $0x1, %ecx movl %ecx, 0xf4(%rax) addq $0x58, %rsp retq nopw %cs:(%rax,%rax)
_ZN12LefDefParser7defiNet8setWidthEPKcd: sub rsp, 58h mov [rsp+58h+var_8], rdi mov [rsp+58h+var_10], rsi movsd [rsp+58h+var_18], xmm0 mov rax, [rsp+58h+var_8] mov [rsp+58h+var_48], rax mov rdi, [rsp+58h+var_10] call _strlen add rax, 1 mov [rsp+58h+var_1C], eax movsxd rdi, [rsp+58h+var_1C] call _malloc mov rcx, rax mov rax, [rsp+58h+var_48] mov [rsp+58h+var_28], rcx mov rcx, [rsp+58h+var_28] mov [rsp+58h+var_50], rcx mov rdi, [rax+240h]; this mov rsi, [rsp+58h+var_10]; char * call _ZN12LefDefParser8defrData7DEFCASEEPKc; LefDefParser::defrData::DEFCASE(char const*) mov rdi, [rsp+58h+var_50] mov rsi, rax call _strcpy mov rcx, [rsp+58h+var_48] mov eax, [rcx+0F4h] cmp eax, [rcx+0F0h] jl loc_3E19B mov rax, [rsp+58h+var_48] cmp dword ptr [rax+0F0h], 0 jz short loc_3E0A7 mov rax, [rsp+58h+var_48] mov eax, [rax+0F0h] shl eax, 1 mov [rsp+58h+var_54], eax jmp short loc_3E0B2 loc_3E0A7: mov eax, 4 mov [rsp+58h+var_54], eax jmp short $+2 loc_3E0B2: mov rax, [rsp+58h+var_48] mov ecx, [rsp+58h+var_54] mov [rax+0F0h], ecx movsxd rdi, dword ptr [rax+0F0h] shl rdi, 3 call _malloc mov rcx, rax mov rax, [rsp+58h+var_48] mov [rsp+58h+var_38], rcx movsxd rdi, dword ptr [rax+0F0h] shl rdi, 3 call _malloc mov [rsp+58h+var_40], rax mov [rsp+58h+var_2C], 0 loc_3E0FB: mov rcx, [rsp+58h+var_48] mov eax, [rsp+58h+var_2C] cmp eax, [rcx+0F4h] jge short loc_3E15C mov rax, [rsp+58h+var_48] mov rcx, [rax+0F8h] movsxd rdx, [rsp+58h+var_2C] mov rsi, [rcx+rdx*8] mov rcx, [rsp+58h+var_38] movsxd rdx, [rsp+58h+var_2C] mov [rcx+rdx*8], rsi mov rax, [rax+100h] movsxd rcx, [rsp+58h+var_2C] movsd xmm0, qword ptr [rax+rcx*8] mov rax, [rsp+58h+var_40] movsxd rcx, [rsp+58h+var_2C] movsd qword ptr [rax+rcx*8], xmm0 mov eax, [rsp+58h+var_2C] add eax, 1 mov [rsp+58h+var_2C], eax jmp short loc_3E0FB loc_3E15C: mov rax, [rsp+58h+var_48] mov rdi, [rax+0F8h] call _free mov rax, [rsp+58h+var_48] mov rdi, [rax+100h] call _free mov rax, [rsp+58h+var_48] mov rcx, [rsp+58h+var_38] mov [rax+0F8h], rcx mov rcx, [rsp+58h+var_40] mov [rax+100h], rcx loc_3E19B: mov rax, [rsp+58h+var_48] mov rsi, [rsp+58h+var_28] mov rcx, [rax+0F8h] movsxd rdx, dword ptr [rax+0F4h] mov [rcx+rdx*8], rsi movsd xmm0, [rsp+58h+var_18] mov rcx, [rax+100h] movsxd rdx, dword ptr [rax+0F4h] movsd qword ptr [rcx+rdx*8], xmm0 mov ecx, [rax+0F4h] add ecx, 1 mov [rax+0F4h], ecx add rsp, 58h retn
LefDefParser::defrData ** LefDefParser::defiNet::setWidth( LefDefParser::defrData **this, const char *a2, double a3) { const char *v3; // rax long long v4; // rdx LefDefParser::defrData **result; // rax int v6; // [rsp+4h] [rbp-54h] long long v7; // [rsp+18h] [rbp-40h] long long v8; // [rsp+20h] [rbp-38h] int i; // [rsp+2Ch] [rbp-2Ch] long long v10; // [rsp+30h] [rbp-28h] int v11; // [rsp+3Ch] [rbp-1Ch] v11 = strlen(a2) + 1; v10 = malloc(v11); v3 = LefDefParser::defrData::DEFCASE(this[72], a2); strcpy(v10, v3, v4); if ( *((_DWORD *)this + 61) >= *((_DWORD *)this + 60) ) { if ( *((_DWORD *)this + 60) ) v6 = 2 * *((_DWORD *)this + 60); else v6 = 4; *((_DWORD *)this + 60) = v6; v8 = malloc(8LL * *((int *)this + 60)); v7 = malloc(8LL * *((int *)this + 60)); for ( i = 0; i < *((_DWORD *)this + 61); ++i ) { *(_QWORD *)(v8 + 8LL * i) = *((_QWORD *)this[31] + i); *(_QWORD *)(v7 + 8LL * i) = *((_QWORD *)this[32] + i); } free(this[31]); free(this[32]); this[31] = (LefDefParser::defrData *)v8; this[32] = (LefDefParser::defrData *)v7; } result = this; *((_QWORD *)this[31] + *((int *)this + 61)) = v10; *((double *)this[32] + (int)(*((_DWORD *)this + 61))++) = a3; return result; }
setWidth: SUB RSP,0x58 MOV qword ptr [RSP + 0x50],RDI MOV qword ptr [RSP + 0x48],RSI MOVSD qword ptr [RSP + 0x40],XMM0 MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x10],RAX MOV RDI,qword ptr [RSP + 0x48] CALL 0x001070e0 ADD RAX,0x1 MOV dword ptr [RSP + 0x3c],EAX MOVSXD RDI,dword ptr [RSP + 0x3c] CALL 0x001072d0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x30],RCX MOV RCX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x8],RCX MOV RDI,qword ptr [RAX + 0x240] MOV RSI,qword ptr [RSP + 0x48] CALL 0x00127ed0 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,RAX CALL 0x00107220 MOV RCX,qword ptr [RSP + 0x10] MOV EAX,dword ptr [RCX + 0xf4] CMP EAX,dword ptr [RCX + 0xf0] JL 0x0013e19b MOV RAX,qword ptr [RSP + 0x10] CMP dword ptr [RAX + 0xf0],0x0 JZ 0x0013e0a7 MOV RAX,qword ptr [RSP + 0x10] MOV EAX,dword ptr [RAX + 0xf0] SHL EAX,0x1 MOV dword ptr [RSP + 0x4],EAX JMP 0x0013e0b2 LAB_0013e0a7: MOV EAX,0x4 MOV dword ptr [RSP + 0x4],EAX JMP 0x0013e0b2 LAB_0013e0b2: MOV RAX,qword ptr [RSP + 0x10] MOV ECX,dword ptr [RSP + 0x4] MOV dword ptr [RAX + 0xf0],ECX MOVSXD RDI,dword ptr [RAX + 0xf0] SHL RDI,0x3 CALL 0x001072d0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x20],RCX MOVSXD RDI,dword ptr [RAX + 0xf0] SHL RDI,0x3 CALL 0x001072d0 MOV qword ptr [RSP + 0x18],RAX MOV dword ptr [RSP + 0x2c],0x0 LAB_0013e0fb: MOV RCX,qword ptr [RSP + 0x10] MOV EAX,dword ptr [RSP + 0x2c] CMP EAX,dword ptr [RCX + 0xf4] JGE 0x0013e15c MOV RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RAX + 0xf8] MOVSXD RDX,dword ptr [RSP + 0x2c] MOV RSI,qword ptr [RCX + RDX*0x8] MOV RCX,qword ptr [RSP + 0x20] MOVSXD RDX,dword ptr [RSP + 0x2c] MOV qword ptr [RCX + RDX*0x8],RSI MOV RAX,qword ptr [RAX + 0x100] MOVSXD RCX,dword ptr [RSP + 0x2c] MOVSD XMM0,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RSP + 0x18] MOVSXD RCX,dword ptr [RSP + 0x2c] MOVSD qword ptr [RAX + RCX*0x8],XMM0 MOV EAX,dword ptr [RSP + 0x2c] ADD EAX,0x1 MOV dword ptr [RSP + 0x2c],EAX JMP 0x0013e0fb LAB_0013e15c: MOV RAX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RAX + 0xf8] CALL 0x001072a0 MOV RAX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RAX + 0x100] CALL 0x001072a0 MOV RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0xf8],RCX MOV RCX,qword ptr [RSP + 0x18] MOV qword ptr [RAX + 0x100],RCX LAB_0013e19b: MOV RAX,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x30] MOV RCX,qword ptr [RAX + 0xf8] MOVSXD RDX,dword ptr [RAX + 0xf4] MOV qword ptr [RCX + RDX*0x8],RSI MOVSD XMM0,qword ptr [RSP + 0x40] MOV RCX,qword ptr [RAX + 0x100] MOVSXD RDX,dword ptr [RAX + 0xf4] MOVSD qword ptr [RCX + RDX*0x8],XMM0 MOV ECX,dword ptr [RAX + 0xf4] ADD ECX,0x1 MOV dword ptr [RAX + 0xf4],ECX ADD RSP,0x58 RET
/* LefDefParser::defiNet::setWidth(char const*, double) */ void __thiscall LefDefParser::defiNet::setWidth(defiNet *this,char *param_1,double param_2) { size_t sVar1; char *__dest; char *__src; void *pvVar2; void *pvVar3; int local_54; int local_2c; sVar1 = strlen(param_1); __dest = (char *)malloc((long)((int)sVar1 + 1)); __src = (char *)defrData::DEFCASE(*(defrData **)(this + 0x240),param_1); strcpy(__dest,__src); if (*(int *)(this + 0xf0) <= *(int *)(this + 0xf4)) { if (*(int *)(this + 0xf0) == 0) { local_54 = 4; } else { local_54 = *(int *)(this + 0xf0) << 1; } *(int *)(this + 0xf0) = local_54; pvVar2 = malloc((long)*(int *)(this + 0xf0) << 3); pvVar3 = malloc((long)*(int *)(this + 0xf0) << 3); for (local_2c = 0; local_2c < *(int *)(this + 0xf4); local_2c = local_2c + 1) { *(int8 *)((long)pvVar2 + (long)local_2c * 8) = *(int8 *)(*(long *)(this + 0xf8) + (long)local_2c * 8); *(int8 *)((long)pvVar3 + (long)local_2c * 8) = *(int8 *)(*(long *)(this + 0x100) + (long)local_2c * 8); } free(*(void **)(this + 0xf8)); free(*(void **)(this + 0x100)); *(void **)(this + 0xf8) = pvVar2; *(void **)(this + 0x100) = pvVar3; } *(char **)(*(long *)(this + 0xf8) + (long)*(int *)(this + 0xf4) * 8) = __dest; *(double *)(*(long *)(this + 0x100) + (long)*(int *)(this + 0xf4) * 8) = param_2; *(int *)(this + 0xf4) = *(int *)(this + 0xf4) + 1; return; }
49,416
httplib::detail::BufferStream::read(char*, unsigned long)
nickolajgrishuk[P]metricz-cpp/build_O0/_deps/httplib-src/httplib.h
inline ssize_t BufferStream::read(char *ptr, size_t size) { #if defined(_MSC_VER) && _MSC_VER < 1910 auto len_read = buffer._Copy_s(ptr, size, size, position); #else auto len_read = buffer.copy(ptr, size, position); #endif position += static_cast<size_t>(len_read); return static_cast<ssize_t>(len_read); }
O0
c
httplib::detail::BufferStream::read(char*, unsigned long): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x28(%rbp) movq %rax, %rdi addq $0x8, %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movq 0x28(%rax), %rcx callq 0xa5b0 movq %rax, %rcx movq -0x28(%rbp), %rax movq %rcx, -0x20(%rbp) movq -0x20(%rbp), %rcx addq 0x28(%rax), %rcx movq %rcx, 0x28(%rax) movq -0x20(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nop
_ZN7httplib6detail12BufferStream4readEPcm: push rbp mov rbp, rsp sub rsp, 30h 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 rdi, rax add rdi, 8 mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rax+28h] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4copyEPcmm; std::string::copy(char *,ulong,ulong) mov rcx, rax mov rax, [rbp+var_28] mov [rbp+var_20], rcx mov rcx, [rbp+var_20] add rcx, [rax+28h] mov [rax+28h], rcx mov rax, [rbp+var_20] add rsp, 30h pop rbp retn
long long httplib::detail::BufferStream::read(httplib::detail::BufferStream *this, char *a2, long long a3) { long long result; // rax result = std::string::copy((char *)this + 8, a2, a3, *((_QWORD *)this + 5)); *((_QWORD *)this + 5) += result; return result; }
read: 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 RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x28],RAX MOV RDI,RAX ADD RDI,0x8 MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX + 0x28] CALL 0x0010a5b0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x20],RCX MOV RCX,qword ptr [RBP + -0x20] ADD RCX,qword ptr [RAX + 0x28] MOV qword ptr [RAX + 0x28],RCX MOV RAX,qword ptr [RBP + -0x20] ADD RSP,0x30 POP RBP RET
/* httplib::detail::BufferStream::read(char*, unsigned long) */ long __thiscall httplib::detail::BufferStream::read(BufferStream *this,char *param_1,ulong param_2) { long lVar1; lVar1 = std::__cxx11::string::copy((char *)(this + 8),(ulong)param_1,param_2); *(long *)(this + 0x28) = lVar1 + *(long *)(this + 0x28); return lVar1; }
49,417
my_hash_reset
eloqsql/mysys/hash.c
void my_hash_reset(HASH *hash) { DBUG_ENTER("my_hash_reset"); DBUG_PRINT("enter",("hash:%p", hash)); my_hash_free_elements(hash); reset_dynamic(&hash->array); /* Set row pointers so that the hash can be reused at once */ hash->blength= 1; DBUG_VOID_RETURN; }
O3
c
my_hash_reset: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl 0x18(%rdi), %r14d testq %r14, %r14 je 0x29b60 movq $0x0, 0x18(%rbx) cmpq $0x0, 0x60(%rbx) je 0x29b60 movq 0x28(%rbx), %r15 shlq $0x4, %r14 addq %r15, %r14 movq 0x8(%r15), %rdi addq $0x10, %r15 callq *0x60(%rbx) cmpq %r14, %r15 jb 0x29b50 movl $0x0, 0x30(%rbx) movq $0x1, 0x10(%rbx) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
my_hash_reset: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdi mov r14d, [rdi+18h] test r14, r14 jz short loc_29B60 mov qword ptr [rbx+18h], 0 cmp qword ptr [rbx+60h], 0 jz short loc_29B60 mov r15, [rbx+28h] shl r14, 4 add r14, r15 loc_29B50: mov rdi, [r15+8] add r15, 10h call qword ptr [rbx+60h] cmp r15, r14 jb short loc_29B50 loc_29B60: mov dword ptr [rbx+30h], 0 mov qword ptr [rbx+10h], 1 add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long my_hash_reset(long long a1) { long long v2; // r14 unsigned long long v3; // r15 unsigned long long v4; // r14 long long v5; // rdi long long result; // rax v2 = *(unsigned int *)(a1 + 24); if ( *(_DWORD *)(a1 + 24) ) { *(_QWORD *)(a1 + 24) = 0LL; if ( *(_QWORD *)(a1 + 96) ) { v3 = *(_QWORD *)(a1 + 40); v4 = v3 + 16 * v2; do { v5 = *(_QWORD *)(v3 + 8); v3 += 16LL; result = (*(long long ( **)(long long))(a1 + 96))(v5); } while ( v3 < v4 ); } } *(_DWORD *)(a1 + 48) = 0; *(_QWORD *)(a1 + 16) = 1LL; return result; }
my_hash_reset: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV R14D,dword ptr [RDI + 0x18] TEST R14,R14 JZ 0x00129b60 MOV qword ptr [RBX + 0x18],0x0 CMP qword ptr [RBX + 0x60],0x0 JZ 0x00129b60 MOV R15,qword ptr [RBX + 0x28] SHL R14,0x4 ADD R14,R15 LAB_00129b50: MOV RDI,qword ptr [R15 + 0x8] ADD R15,0x10 CALL qword ptr [RBX + 0x60] CMP R15,R14 JC 0x00129b50 LAB_00129b60: MOV dword ptr [RBX + 0x30],0x0 MOV qword ptr [RBX + 0x10],0x1 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
void my_hash_reset(long param_1) { int8 *puVar1; uint uVar2; ulong uVar3; ulong uVar4; uVar2 = *(uint *)(param_1 + 0x18); if (((ulong)uVar2 != 0) && (*(int8 *)(param_1 + 0x18) = 0, *(long *)(param_1 + 0x60) != 0)) { uVar4 = *(ulong *)(param_1 + 0x28); uVar3 = (ulong)uVar2 * 0x10 + uVar4; do { puVar1 = (int8 *)(uVar4 + 8); uVar4 = uVar4 + 0x10; (**(code **)(param_1 + 0x60))(*puVar1); } while (uVar4 < uVar3); } *(int4 *)(param_1 + 0x30) = 0; *(int8 *)(param_1 + 0x10) = 1; return; }
49,418
pack_dirname
eloqsql/mysys/mf_pack.c
void pack_dirname(char * to, const char *from) { int cwd_err; size_t d_length,length,UNINIT_VAR(buff_length); char * start; char buff[FN_REFLEN + 1]; DBUG_ENTER("pack_dirname"); (void) intern_filename(to,from); /* Change to intern name */ #ifdef FN_DEVCHAR if ((start=strrchr(to,FN_DEVCHAR)) != 0) /* Skip device part */ start++; else #endif start=to; if (!(cwd_err= my_getwd(buff,FN_REFLEN,MYF(0)))) { buff_length= strlen(buff); d_length= (size_t) (start-to); if ((start == to || (buff_length == d_length && !memcmp(buff,start,d_length))) && *start != FN_LIBCHAR && *start) { /* Put current dir before */ bchange((uchar*) to, d_length, (uchar*) buff, buff_length, strlen(to)+1); } } if ((d_length= cleanup_dirname(to,to)) != 0) { length=0; if (home_dir) { length= strlen(home_dir); if (home_dir[length-1] == FN_LIBCHAR) length--; /* Don't test last '/' */ } if (length > 1 && length < d_length) { /* test if /xx/yy -> ~/yy */ if (memcmp(to,home_dir,length) == 0 && to[length] == FN_LIBCHAR) { to[0]=FN_HOMELIB; /* Filename begins with ~ */ (void) strmov_overlapp(to+1,to+length); } } if (! cwd_err) { /* Test if cwd is ~/... */ if (length > 1 && length < buff_length) { if (memcmp(buff,home_dir,length) == 0 && buff[length] == FN_LIBCHAR) { buff[0]=FN_HOMELIB; (void) strmov_overlapp(buff+1,buff+length); } } if (is_prefix(to,buff)) { length= strlen(buff); if (to[length]) (void) strmov_overlapp(to,to+length); /* Remove everything before */ else { to[0]= FN_CURLIB; /* Put ./ instead of cwd */ to[1]= FN_LIBCHAR; to[2]= '\0'; } } } } DBUG_PRINT("exit",("to: '%s'",to)); DBUG_VOID_RETURN; }
O0
c
pack_dirname: pushq %rbp movq %rsp, %rbp subq $0x270, %rsp # imm = 0x270 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x218(%rbp) movq %rsi, -0x220(%rbp) movq -0x240(%rbp), %rax movq %rax, -0x240(%rbp) movq -0x218(%rbp), %rdi movq -0x220(%rbp), %rsi callq 0x64c90 movq -0x218(%rbp), %rax movq %rax, -0x248(%rbp) leaq -0x210(%rbp), %rdi movl $0x200, %esi # imm = 0x200 xorl %eax, %eax movl %eax, %edx callq 0x65df0 movl %eax, -0x224(%rbp) cmpl $0x0, %eax jne 0x64a57 leaq -0x210(%rbp), %rdi callq 0x26150 movq %rax, -0x240(%rbp) movq -0x248(%rbp), %rax movq -0x218(%rbp), %rcx subq %rcx, %rax movq %rax, -0x230(%rbp) movq -0x248(%rbp), %rax cmpq -0x218(%rbp), %rax je 0x649cb movq -0x240(%rbp), %rax cmpq -0x230(%rbp), %rax jne 0x64a55 leaq -0x210(%rbp), %rdi movq -0x248(%rbp), %rsi movq -0x230(%rbp), %rdx callq 0x26160 cmpl $0x0, %eax jne 0x64a55 movq -0x248(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax je 0x64a55 movq -0x248(%rbp), %rax movsbl (%rax), %eax cmpl $0x0, %eax je 0x64a55 movq -0x218(%rbp), %rax movq %rax, -0x268(%rbp) movq -0x230(%rbp), %rax movq %rax, -0x260(%rbp) leaq -0x210(%rbp), %rax movq %rax, -0x258(%rbp) movq -0x240(%rbp), %rax movq %rax, -0x250(%rbp) movq -0x218(%rbp), %rdi callq 0x26150 movq -0x268(%rbp), %rdi movq -0x260(%rbp), %rsi movq -0x258(%rbp), %rdx movq -0x250(%rbp), %rcx movq %rax, %r8 addq $0x1, %r8 callq 0x69e30 jmp 0x64a57 movq -0x218(%rbp), %rdi movq -0x218(%rbp), %rsi callq 0x64d80 movq %rax, -0x230(%rbp) cmpq $0x0, %rax je 0x64c5d movq $0x0, -0x238(%rbp) leaq 0x3aa8cb(%rip), %rax # 0x40f358 cmpq $0x0, (%rax) je 0x64adb leaq 0x3aa8be(%rip), %rax # 0x40f358 movq (%rax), %rdi callq 0x26150 movq %rax, -0x238(%rbp) leaq 0x3aa8a8(%rip), %rax # 0x40f358 movq (%rax), %rax movq -0x238(%rbp), %rcx subq $0x1, %rcx movsbl (%rax,%rcx), %eax cmpl $0x2f, %eax jne 0x64ad9 movq -0x238(%rbp), %rax addq $-0x1, %rax movq %rax, -0x238(%rbp) jmp 0x64adb cmpq $0x1, -0x238(%rbp) jbe 0x64b58 movq -0x238(%rbp), %rax cmpq -0x230(%rbp), %rax jae 0x64b58 movq -0x218(%rbp), %rdi leaq 0x3aa855(%rip), %rax # 0x40f358 movq (%rax), %rsi movq -0x238(%rbp), %rdx callq 0x26160 cmpl $0x0, %eax jne 0x64b56 movq -0x218(%rbp), %rax movq -0x238(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $0x2f, %eax jne 0x64b56 movq -0x218(%rbp), %rax movb $0x7e, (%rax) movq -0x218(%rbp), %rdi addq $0x1, %rdi movq -0x218(%rbp), %rsi addq -0x238(%rbp), %rsi callq 0xae730 jmp 0x64b58 cmpl $0x0, -0x224(%rbp) jne 0x64c5b cmpq $0x1, -0x238(%rbp) jbe 0x64bdc movq -0x238(%rbp), %rax cmpq -0x240(%rbp), %rax jae 0x64bdc leaq -0x210(%rbp), %rdi leaq 0x3aa7cb(%rip), %rax # 0x40f358 movq (%rax), %rsi movq -0x238(%rbp), %rdx callq 0x26160 cmpl $0x0, %eax jne 0x64bda movq -0x238(%rbp), %rax movsbl -0x210(%rbp,%rax), %eax cmpl $0x2f, %eax jne 0x64bda movb $0x7e, -0x210(%rbp) leaq -0x210(%rbp), %rdi addq $0x1, %rdi leaq -0x210(%rbp), %rsi addq -0x238(%rbp), %rsi callq 0xae730 jmp 0x64bdc movq -0x218(%rbp), %rdi leaq -0x210(%rbp), %rsi callq 0xa96b0 cmpl $0x0, %eax je 0x64c59 leaq -0x210(%rbp), %rdi callq 0x26150 movq %rax, -0x238(%rbp) movq -0x218(%rbp), %rax movq -0x238(%rbp), %rcx cmpb $0x0, (%rax,%rcx) je 0x64c37 movq -0x218(%rbp), %rdi movq -0x218(%rbp), %rsi addq -0x238(%rbp), %rsi callq 0xae730 jmp 0x64c57 movq -0x218(%rbp), %rax movb $0x2e, (%rax) movq -0x218(%rbp), %rax movb $0x2f, 0x1(%rax) movq -0x218(%rbp), %rax movb $0x0, 0x2(%rax) jmp 0x64c59 jmp 0x64c5b jmp 0x64c5d jmp 0x64c5f jmp 0x64c61 jmp 0x64c63 jmp 0x64c65 movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x64c80 addq $0x270, %rsp # imm = 0x270 popq %rbp retq callq 0x26360 nopw %cs:(%rax,%rax)
pack_dirname: push rbp mov rbp, rsp sub rsp, 270h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_218], rdi mov [rbp+var_220], rsi mov rax, [rbp+var_240] mov [rbp+var_240], rax mov rdi, [rbp+var_218] mov rsi, [rbp+var_220] call intern_filename mov rax, [rbp+var_218] mov [rbp+var_248], rax lea rdi, [rbp+var_210] mov esi, 200h xor eax, eax mov edx, eax call my_getwd mov [rbp+var_224], eax cmp eax, 0 jnz loc_64A57 lea rdi, [rbp+var_210] call _strlen mov [rbp+var_240], rax mov rax, [rbp+var_248] mov rcx, [rbp+var_218] sub rax, rcx mov [rbp+var_230], rax mov rax, [rbp+var_248] cmp rax, [rbp+var_218] jz short loc_649CB mov rax, [rbp+var_240] cmp rax, [rbp+var_230] jnz loc_64A55 lea rdi, [rbp+var_210] mov rsi, [rbp+var_248] mov rdx, [rbp+var_230] call _memcmp cmp eax, 0 jnz loc_64A55 loc_649CB: mov rax, [rbp+var_248] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jz short loc_64A55 mov rax, [rbp+var_248] movsx eax, byte ptr [rax] cmp eax, 0 jz short loc_64A55 mov rax, [rbp+var_218] mov [rbp+var_268], rax mov rax, [rbp+var_230] mov [rbp+var_260], rax lea rax, [rbp+var_210] mov [rbp+var_258], rax mov rax, [rbp+var_240] mov [rbp+var_250], rax mov rdi, [rbp+var_218] call _strlen mov rdi, [rbp+var_268] mov rsi, [rbp+var_260] mov rdx, [rbp+var_258] mov rcx, [rbp+var_250] mov r8, rax add r8, 1 call bchange loc_64A55: jmp short $+2 loc_64A57: mov rdi, [rbp+var_218] mov rsi, [rbp+var_218] call cleanup_dirname mov [rbp+var_230], rax cmp rax, 0 jz loc_64C5D mov [rbp+var_238], 0 lea rax, home_dir cmp qword ptr [rax], 0 jz short loc_64ADB lea rax, home_dir mov rdi, [rax] call _strlen mov [rbp+var_238], rax lea rax, home_dir mov rax, [rax] mov rcx, [rbp+var_238] sub rcx, 1 movsx eax, byte ptr [rax+rcx] cmp eax, 2Fh ; '/' jnz short loc_64AD9 mov rax, [rbp+var_238] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_238], rax loc_64AD9: jmp short $+2 loc_64ADB: cmp [rbp+var_238], 1 jbe short loc_64B58 mov rax, [rbp+var_238] cmp rax, [rbp+var_230] jnb short loc_64B58 mov rdi, [rbp+var_218] lea rax, home_dir mov rsi, [rax] mov rdx, [rbp+var_238] call _memcmp cmp eax, 0 jnz short loc_64B56 mov rax, [rbp+var_218] mov rcx, [rbp+var_238] movsx eax, byte ptr [rax+rcx] cmp eax, 2Fh ; '/' jnz short loc_64B56 mov rax, [rbp+var_218] mov byte ptr [rax], 7Eh ; '~' mov rdi, [rbp+var_218] add rdi, 1 mov rsi, [rbp+var_218] add rsi, [rbp+var_238] call strmov_overlapp loc_64B56: jmp short $+2 loc_64B58: cmp [rbp+var_224], 0 jnz loc_64C5B cmp [rbp+var_238], 1 jbe short loc_64BDC mov rax, [rbp+var_238] cmp rax, [rbp+var_240] jnb short loc_64BDC lea rdi, [rbp+var_210] lea rax, home_dir mov rsi, [rax] mov rdx, [rbp+var_238] call _memcmp cmp eax, 0 jnz short loc_64BDA mov rax, [rbp+var_238] movsx eax, [rbp+rax+var_210] cmp eax, 2Fh ; '/' jnz short loc_64BDA mov [rbp+var_210], 7Eh ; '~' lea rdi, [rbp+var_210] add rdi, 1 lea rsi, [rbp+var_210] add rsi, [rbp+var_238] call strmov_overlapp loc_64BDA: jmp short $+2 loc_64BDC: mov rdi, [rbp+var_218] lea rsi, [rbp+var_210] call is_prefix cmp eax, 0 jz short loc_64C59 lea rdi, [rbp+var_210] call _strlen mov [rbp+var_238], rax mov rax, [rbp+var_218] mov rcx, [rbp+var_238] cmp byte ptr [rax+rcx], 0 jz short loc_64C37 mov rdi, [rbp+var_218] mov rsi, [rbp+var_218] add rsi, [rbp+var_238] call strmov_overlapp jmp short loc_64C57 loc_64C37: mov rax, [rbp+var_218] mov byte ptr [rax], 2Eh ; '.' mov rax, [rbp+var_218] mov byte ptr [rax+1], 2Fh ; '/' mov rax, [rbp+var_218] mov byte ptr [rax+2], 0 loc_64C57: jmp short $+2 loc_64C59: jmp short $+2 loc_64C5B: jmp short $+2 loc_64C5D: jmp short $+2 loc_64C5F: jmp short $+2 loc_64C61: jmp short $+2 loc_64C63: jmp short $+2 loc_64C65: mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_64C80 add rsp, 270h pop rbp retn loc_64C80: call ___stack_chk_fail
unsigned long long pack_dirname(_BYTE *a1, long long a2) { long long v2; // rax unsigned long long v4; // [rsp+30h] [rbp-240h] unsigned long long v5; // [rsp+38h] [rbp-238h] long long v6; // [rsp+38h] [rbp-238h] long long v7; // [rsp+40h] [rbp-230h] unsigned long long v8; // [rsp+40h] [rbp-230h] int v9; // [rsp+4Ch] [rbp-224h] _BYTE *v10; // [rsp+58h] [rbp-218h] char v11; // [rsp+60h] [rbp-210h] BYREF _BYTE v12[527]; // [rsp+61h] [rbp-20Fh] BYREF *(_QWORD *)&v12[519] = __readfsqword(0x28u); v10 = a1; intern_filename(a1, a2); v9 = my_getwd(&v11, 512LL, 0LL); if ( !v9 ) { v4 = strlen(&v11); v7 = a1 - v10; if ( (a1 == v10 || v4 == v7 && !(unsigned int)memcmp(&v11, a1, v7)) && *a1 != 47 && *a1 ) { v2 = strlen(v10); bchange(v10, v7, &v11, v4, v2 + 1); } } v8 = cleanup_dirname(v10, v10); if ( v8 ) { v5 = 0LL; if ( home_dir ) { v5 = strlen(home_dir); if ( *(_BYTE *)(home_dir + v5 - 1) == 47 ) --v5; } if ( v5 > 1 && v5 < v8 && !(unsigned int)memcmp(v10, home_dir, v5) && v10[v5] == 47 ) { *v10 = 126; strmov_overlapp(v10 + 1, &v10[v5]); } if ( !v9 ) { if ( v5 > 1 && v5 < v4 && !(unsigned int)memcmp(&v11, home_dir, v5) && v12[v5 - 1] == 47 ) { v11 = 126; strmov_overlapp(v12, &v12[v5 - 1]); } if ( (unsigned int)is_prefix(v10, &v11) ) { v6 = strlen(&v11); if ( v10[v6] ) { strmov_overlapp(v10, &v10[v6]); } else { *v10 = 46; v10[1] = 47; v10[2] = 0; } } } } return __readfsqword(0x28u); }
pack_dirname: PUSH RBP MOV RBP,RSP SUB RSP,0x270 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x218],RDI MOV qword ptr [RBP + -0x220],RSI MOV RAX,qword ptr [RBP + -0x240] MOV qword ptr [RBP + -0x240],RAX MOV RDI,qword ptr [RBP + -0x218] MOV RSI,qword ptr [RBP + -0x220] CALL 0x00164c90 MOV RAX,qword ptr [RBP + -0x218] MOV qword ptr [RBP + -0x248],RAX LEA RDI,[RBP + -0x210] MOV ESI,0x200 XOR EAX,EAX MOV EDX,EAX CALL 0x00165df0 MOV dword ptr [RBP + -0x224],EAX CMP EAX,0x0 JNZ 0x00164a57 LEA RDI,[RBP + -0x210] CALL 0x00126150 MOV qword ptr [RBP + -0x240],RAX MOV RAX,qword ptr [RBP + -0x248] MOV RCX,qword ptr [RBP + -0x218] SUB RAX,RCX MOV qword ptr [RBP + -0x230],RAX MOV RAX,qword ptr [RBP + -0x248] CMP RAX,qword ptr [RBP + -0x218] JZ 0x001649cb MOV RAX,qword ptr [RBP + -0x240] CMP RAX,qword ptr [RBP + -0x230] JNZ 0x00164a55 LEA RDI,[RBP + -0x210] MOV RSI,qword ptr [RBP + -0x248] MOV RDX,qword ptr [RBP + -0x230] CALL 0x00126160 CMP EAX,0x0 JNZ 0x00164a55 LAB_001649cb: MOV RAX,qword ptr [RBP + -0x248] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f JZ 0x00164a55 MOV RAX,qword ptr [RBP + -0x248] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JZ 0x00164a55 MOV RAX,qword ptr [RBP + -0x218] MOV qword ptr [RBP + -0x268],RAX MOV RAX,qword ptr [RBP + -0x230] MOV qword ptr [RBP + -0x260],RAX LEA RAX,[RBP + -0x210] MOV qword ptr [RBP + -0x258],RAX MOV RAX,qword ptr [RBP + -0x240] MOV qword ptr [RBP + -0x250],RAX MOV RDI,qword ptr [RBP + -0x218] CALL 0x00126150 MOV RDI,qword ptr [RBP + -0x268] MOV RSI,qword ptr [RBP + -0x260] MOV RDX,qword ptr [RBP + -0x258] MOV RCX,qword ptr [RBP + -0x250] MOV R8,RAX ADD R8,0x1 CALL 0x00169e30 LAB_00164a55: JMP 0x00164a57 LAB_00164a57: MOV RDI,qword ptr [RBP + -0x218] MOV RSI,qword ptr [RBP + -0x218] CALL 0x00164d80 MOV qword ptr [RBP + -0x230],RAX CMP RAX,0x0 JZ 0x00164c5d MOV qword ptr [RBP + -0x238],0x0 LEA RAX,[0x50f358] CMP qword ptr [RAX],0x0 JZ 0x00164adb LEA RAX,[0x50f358] MOV RDI,qword ptr [RAX] CALL 0x00126150 MOV qword ptr [RBP + -0x238],RAX LEA RAX,[0x50f358] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x238] SUB RCX,0x1 MOVSX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x2f JNZ 0x00164ad9 MOV RAX,qword ptr [RBP + -0x238] ADD RAX,-0x1 MOV qword ptr [RBP + -0x238],RAX LAB_00164ad9: JMP 0x00164adb LAB_00164adb: CMP qword ptr [RBP + -0x238],0x1 JBE 0x00164b58 MOV RAX,qword ptr [RBP + -0x238] CMP RAX,qword ptr [RBP + -0x230] JNC 0x00164b58 MOV RDI,qword ptr [RBP + -0x218] LEA RAX,[0x50f358] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x238] CALL 0x00126160 CMP EAX,0x0 JNZ 0x00164b56 MOV RAX,qword ptr [RBP + -0x218] MOV RCX,qword ptr [RBP + -0x238] MOVSX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x2f JNZ 0x00164b56 MOV RAX,qword ptr [RBP + -0x218] MOV byte ptr [RAX],0x7e MOV RDI,qword ptr [RBP + -0x218] ADD RDI,0x1 MOV RSI,qword ptr [RBP + -0x218] ADD RSI,qword ptr [RBP + -0x238] CALL 0x001ae730 LAB_00164b56: JMP 0x00164b58 LAB_00164b58: CMP dword ptr [RBP + -0x224],0x0 JNZ 0x00164c5b CMP qword ptr [RBP + -0x238],0x1 JBE 0x00164bdc MOV RAX,qword ptr [RBP + -0x238] CMP RAX,qword ptr [RBP + -0x240] JNC 0x00164bdc LEA RDI,[RBP + -0x210] LEA RAX,[0x50f358] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x238] CALL 0x00126160 CMP EAX,0x0 JNZ 0x00164bda MOV RAX,qword ptr [RBP + -0x238] MOVSX EAX,byte ptr [RBP + RAX*0x1 + -0x210] CMP EAX,0x2f JNZ 0x00164bda MOV byte ptr [RBP + -0x210],0x7e LEA RDI,[RBP + -0x210] ADD RDI,0x1 LEA RSI,[RBP + -0x210] ADD RSI,qword ptr [RBP + -0x238] CALL 0x001ae730 LAB_00164bda: JMP 0x00164bdc LAB_00164bdc: MOV RDI,qword ptr [RBP + -0x218] LEA RSI,[RBP + -0x210] CALL 0x001a96b0 CMP EAX,0x0 JZ 0x00164c59 LEA RDI,[RBP + -0x210] CALL 0x00126150 MOV qword ptr [RBP + -0x238],RAX MOV RAX,qword ptr [RBP + -0x218] MOV RCX,qword ptr [RBP + -0x238] CMP byte ptr [RAX + RCX*0x1],0x0 JZ 0x00164c37 MOV RDI,qword ptr [RBP + -0x218] MOV RSI,qword ptr [RBP + -0x218] ADD RSI,qword ptr [RBP + -0x238] CALL 0x001ae730 JMP 0x00164c57 LAB_00164c37: MOV RAX,qword ptr [RBP + -0x218] MOV byte ptr [RAX],0x2e MOV RAX,qword ptr [RBP + -0x218] MOV byte ptr [RAX + 0x1],0x2f MOV RAX,qword ptr [RBP + -0x218] MOV byte ptr [RAX + 0x2],0x0 LAB_00164c57: JMP 0x00164c59 LAB_00164c59: JMP 0x00164c5b LAB_00164c5b: JMP 0x00164c5d LAB_00164c5d: JMP 0x00164c5f LAB_00164c5f: JMP 0x00164c61 LAB_00164c61: JMP 0x00164c63 LAB_00164c63: JMP 0x00164c65 LAB_00164c65: MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00164c80 ADD RSP,0x270 POP RBP RET LAB_00164c80: CALL 0x00126360
/* WARNING: Removing unreachable block (ram,0x00164994) */ /* WARNING: Removing unreachable block (ram,0x001649a8) */ void pack_dirname(char *param_1,int8 param_2) { int iVar1; int iVar2; size_t sVar3; ulong uVar4; long in_FS_OFFSET; ulong local_248; ulong local_240; char local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); intern_filename(param_1,param_2); iVar1 = my_getwd(local_218,0x200,0); if (((iVar1 == 0) && (local_248 = strlen(local_218), *param_1 != '/')) && (*param_1 != '\0')) { sVar3 = strlen(param_1); bchange(param_1,0,local_218,local_248,sVar3 + 1); } uVar4 = cleanup_dirname(param_1,param_1); if (uVar4 != 0) { local_240 = 0; if ((home_dir != (char *)0x0) && (local_240 = strlen(home_dir), home_dir[local_240 - 1] == '/')) { local_240 = local_240 - 1; } if (((1 < local_240) && (local_240 < uVar4)) && ((iVar2 = memcmp(param_1,home_dir,local_240), iVar2 == 0 && (param_1[local_240] == '/')))) { *param_1 = '~'; strmov_overlapp(param_1 + 1,param_1 + local_240); } if (iVar1 == 0) { if ((((1 < local_240) && (local_240 < local_248)) && (iVar1 = memcmp(local_218,home_dir,local_240), iVar1 == 0)) && (local_218[local_240] == '/')) { local_218[0] = '~'; strmov_overlapp(local_218 + 1,local_218 + local_240); } iVar1 = is_prefix(param_1,local_218); if (iVar1 != 0) { sVar3 = strlen(local_218); if (param_1[sVar3] == '\0') { *param_1 = '.'; param_1[1] = '/'; param_1[2] = '\0'; } else { strmov_overlapp(param_1,param_1 + sVar3); } } } } if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
49,419
parse_time
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
static int parse_time(const char *str, size_t length, const char **end_ptr, MYSQL_TIME *tm) { int err= 0; const char *p = str; const char *end = str + length; size_t frac_len; int ret=1; tm->hour = my_strtoui(p, end-p, &p, &err); if (err || tm->hour > 838 || p == end || *p != ':' ) goto end; p++; tm->minute = my_strtoui(p, end-p, &p, &err); if (err || tm->minute > 59 || p == end || *p != ':') goto end; p++; tm->second = my_strtoui(p, end-p, &p, &err); if (err || tm->second > 59) goto end; ret = 0; tm->second_part = 0; if (p == end) goto end; /* Check for fractional part*/ if (*p != '.') goto end; p++; frac_len = MIN(6,end-p); tm->second_part = my_strtoui(p, frac_len, &p, &err); if (err) goto end; if (frac_len < 6) tm->second_part *= frac_mul[frac_len]; ret = 0; /* Consume whole fractional part, even after 6 digits.*/ p += frac_len; while(p < *end_ptr) { if (*p < '0' || *p > '9') break; p++; } end: *end_ptr = p; return ret; }
O0
c
parse_time: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movl $0x0, -0x24(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x8(%rbp), %rax addq -0x10(%rbp), %rax movq %rax, -0x38(%rbp) movl $0x1, -0x44(%rbp) movq -0x30(%rbp), %rdi movq -0x38(%rbp), %rsi movq -0x30(%rbp), %rax subq %rax, %rsi leaq -0x30(%rbp), %rdx leaq -0x24(%rbp), %rcx callq 0x3ca90 movl %eax, %ecx movq -0x20(%rbp), %rax movl %ecx, 0xc(%rax) cmpl $0x0, -0x24(%rbp) jne 0x3b6f8 movq -0x20(%rbp), %rax cmpl $0x346, 0xc(%rax) # imm = 0x346 ja 0x3b6f8 movq -0x30(%rbp), %rax cmpq -0x38(%rbp), %rax je 0x3b6f8 movq -0x30(%rbp), %rax movsbl (%rax), %eax cmpl $0x3a, %eax je 0x3b6fd jmp 0x3b8ac movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rdi movq -0x38(%rbp), %rsi movq -0x30(%rbp), %rax subq %rax, %rsi leaq -0x30(%rbp), %rdx leaq -0x24(%rbp), %rcx callq 0x3ca90 movl %eax, %ecx movq -0x20(%rbp), %rax movl %ecx, 0x10(%rax) cmpl $0x0, -0x24(%rbp) jne 0x3b754 movq -0x20(%rbp), %rax cmpl $0x3b, 0x10(%rax) ja 0x3b754 movq -0x30(%rbp), %rax cmpq -0x38(%rbp), %rax je 0x3b754 movq -0x30(%rbp), %rax movsbl (%rax), %eax cmpl $0x3a, %eax je 0x3b759 jmp 0x3b8ac movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rdi movq -0x38(%rbp), %rsi movq -0x30(%rbp), %rax subq %rax, %rsi leaq -0x30(%rbp), %rdx leaq -0x24(%rbp), %rcx callq 0x3ca90 movl %eax, %ecx movq -0x20(%rbp), %rax movl %ecx, 0x14(%rax) cmpl $0x0, -0x24(%rbp) jne 0x3b79a movq -0x20(%rbp), %rax cmpl $0x3b, 0x14(%rax) jbe 0x3b79f jmp 0x3b8ac movl $0x0, -0x44(%rbp) movq -0x20(%rbp), %rax movq $0x0, 0x18(%rax) movq -0x30(%rbp), %rax cmpq -0x38(%rbp), %rax jne 0x3b7c1 jmp 0x3b8ac movq -0x30(%rbp), %rax movsbl (%rax), %eax cmpl $0x2e, %eax je 0x3b7d2 jmp 0x3b8ac movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) movq -0x38(%rbp), %rcx movq -0x30(%rbp), %rax subq %rax, %rcx movl $0x6, %eax cmpq %rcx, %rax jge 0x3b7fe movl $0x6, %eax movq %rax, -0x50(%rbp) jmp 0x3b80d movq -0x38(%rbp), %rax movq -0x30(%rbp), %rcx subq %rcx, %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x30(%rbp), %rdi movq -0x40(%rbp), %rsi leaq -0x30(%rbp), %rdx leaq -0x24(%rbp), %rcx callq 0x3ca90 movl %eax, %eax movl %eax, %ecx movq -0x20(%rbp), %rax movq %rcx, 0x18(%rax) cmpl $0x0, -0x24(%rbp) je 0x3b83e jmp 0x3b8ac cmpq $0x6, -0x40(%rbp) jae 0x3b862 movq -0x40(%rbp), %rcx leaq 0x17e40(%rip), %rax # 0x53690 movl (%rax,%rcx,4), %eax movl %eax, %ecx movq -0x20(%rbp), %rax imulq 0x18(%rax), %rcx movq %rcx, 0x18(%rax) movl $0x0, -0x44(%rbp) movq -0x40(%rbp), %rax addq -0x30(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movq -0x18(%rbp), %rcx cmpq (%rcx), %rax jae 0x3b8aa movq -0x30(%rbp), %rax movsbl (%rax), %eax cmpl $0x30, %eax jl 0x3b89a movq -0x30(%rbp), %rax movsbl (%rax), %eax cmpl $0x39, %eax jle 0x3b89c jmp 0x3b8aa movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) jmp 0x3b875 jmp 0x3b8ac movq -0x30(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl -0x44(%rbp), %eax addq $0x50, %rsp popq %rbp retq
parse_time: 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_24], 0 mov rax, [rbp+var_8] mov [rbp+var_30], rax mov rax, [rbp+var_8] add rax, [rbp+var_10] mov [rbp+var_38], rax mov [rbp+var_44], 1 mov rdi, [rbp+var_30] mov rsi, [rbp+var_38] mov rax, [rbp+var_30] sub rsi, rax lea rdx, [rbp+var_30] lea rcx, [rbp+var_24] call my_strtoui mov ecx, eax mov rax, [rbp+var_20] mov [rax+0Ch], ecx cmp [rbp+var_24], 0 jnz short loc_3B6F8 mov rax, [rbp+var_20] cmp dword ptr [rax+0Ch], 346h ja short loc_3B6F8 mov rax, [rbp+var_30] cmp rax, [rbp+var_38] jz short loc_3B6F8 mov rax, [rbp+var_30] movsx eax, byte ptr [rax] cmp eax, 3Ah ; ':' jz short loc_3B6FD loc_3B6F8: jmp loc_3B8AC loc_3B6FD: mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax mov rdi, [rbp+var_30] mov rsi, [rbp+var_38] mov rax, [rbp+var_30] sub rsi, rax lea rdx, [rbp+var_30] lea rcx, [rbp+var_24] call my_strtoui mov ecx, eax mov rax, [rbp+var_20] mov [rax+10h], ecx cmp [rbp+var_24], 0 jnz short loc_3B754 mov rax, [rbp+var_20] cmp dword ptr [rax+10h], 3Bh ; ';' ja short loc_3B754 mov rax, [rbp+var_30] cmp rax, [rbp+var_38] jz short loc_3B754 mov rax, [rbp+var_30] movsx eax, byte ptr [rax] cmp eax, 3Ah ; ':' jz short loc_3B759 loc_3B754: jmp loc_3B8AC loc_3B759: mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax mov rdi, [rbp+var_30] mov rsi, [rbp+var_38] mov rax, [rbp+var_30] sub rsi, rax lea rdx, [rbp+var_30] lea rcx, [rbp+var_24] call my_strtoui mov ecx, eax mov rax, [rbp+var_20] mov [rax+14h], ecx cmp [rbp+var_24], 0 jnz short loc_3B79A mov rax, [rbp+var_20] cmp dword ptr [rax+14h], 3Bh ; ';' jbe short loc_3B79F loc_3B79A: jmp loc_3B8AC loc_3B79F: mov [rbp+var_44], 0 mov rax, [rbp+var_20] mov qword ptr [rax+18h], 0 mov rax, [rbp+var_30] cmp rax, [rbp+var_38] jnz short loc_3B7C1 jmp loc_3B8AC loc_3B7C1: mov rax, [rbp+var_30] movsx eax, byte ptr [rax] cmp eax, 2Eh ; '.' jz short loc_3B7D2 jmp loc_3B8AC loc_3B7D2: mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax mov rcx, [rbp+var_38] mov rax, [rbp+var_30] sub rcx, rax mov eax, 6 cmp rax, rcx jge short loc_3B7FE mov eax, 6 mov [rbp+var_50], rax jmp short loc_3B80D loc_3B7FE: mov rax, [rbp+var_38] mov rcx, [rbp+var_30] sub rax, rcx mov [rbp+var_50], rax loc_3B80D: mov rax, [rbp+var_50] mov [rbp+var_40], rax mov rdi, [rbp+var_30] mov rsi, [rbp+var_40] lea rdx, [rbp+var_30] lea rcx, [rbp+var_24] call my_strtoui mov eax, eax mov ecx, eax mov rax, [rbp+var_20] mov [rax+18h], rcx cmp [rbp+var_24], 0 jz short loc_3B83E jmp short loc_3B8AC loc_3B83E: cmp [rbp+var_40], 6 jnb short loc_3B862 mov rcx, [rbp+var_40] lea rax, frac_mul mov eax, [rax+rcx*4] mov ecx, eax mov rax, [rbp+var_20] imul rcx, [rax+18h] mov [rax+18h], rcx loc_3B862: mov [rbp+var_44], 0 mov rax, [rbp+var_40] add rax, [rbp+var_30] mov [rbp+var_30], rax loc_3B875: mov rax, [rbp+var_30] mov rcx, [rbp+var_18] cmp rax, [rcx] jnb short loc_3B8AA mov rax, [rbp+var_30] movsx eax, byte ptr [rax] cmp eax, 30h ; '0' jl short loc_3B89A mov rax, [rbp+var_30] movsx eax, byte ptr [rax] cmp eax, 39h ; '9' jle short loc_3B89C loc_3B89A: jmp short loc_3B8AA loc_3B89C: mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax jmp short loc_3B875 loc_3B8AA: jmp short $+2 loc_3B8AC: mov rcx, [rbp+var_30] mov rax, [rbp+var_18] mov [rax], rcx mov eax, [rbp+var_44] add rsp, 50h pop rbp retn
long long parse_time(_BYTE *a1, long long a2, _QWORD *a3, long long a4) { int v4; // eax int v5; // eax int v6; // eax unsigned int v7; // eax unsigned long long v9; // [rsp+0h] [rbp-50h] unsigned int v10; // [rsp+Ch] [rbp-44h] _BYTE *v11; // [rsp+18h] [rbp-38h] _BYTE *v12; // [rsp+20h] [rbp-30h] BYREF int v13; // [rsp+2Ch] [rbp-24h] BYREF long long v14; // [rsp+30h] [rbp-20h] _QWORD *v15; // [rsp+38h] [rbp-18h] long long v16; // [rsp+40h] [rbp-10h] _BYTE *v17; // [rsp+48h] [rbp-8h] v17 = a1; v16 = a2; v15 = a3; v14 = a4; v13 = 0; v12 = a1; v11 = &a1[a2]; v10 = 1; v4 = my_strtoui(a1, a2, &v12, &v13); *(_DWORD *)(v14 + 12) = v4; if ( !v13 && *(_DWORD *)(v14 + 12) <= 0x346u && v12 != v11 && *v12 == 58 ) { ++v12; v5 = my_strtoui(v12, v11 - v12, &v12, &v13); *(_DWORD *)(v14 + 16) = v5; if ( !v13 && *(_DWORD *)(v14 + 16) <= 0x3Bu && v12 != v11 && *v12 == 58 ) { ++v12; v6 = my_strtoui(v12, v11 - v12, &v12, &v13); *(_DWORD *)(v14 + 20) = v6; if ( !v13 && *(_DWORD *)(v14 + 20) <= 0x3Bu ) { v10 = 0; *(_QWORD *)(v14 + 24) = 0LL; if ( v12 != v11 && *v12 == 46 ) { ++v12; v9 = v11 - v12 <= 6 ? v11 - v12 : 6LL; v7 = my_strtoui(v12, v9, &v12, &v13); *(_QWORD *)(v14 + 24) = v7; if ( !v13 ) { if ( v9 < 6 ) *(_QWORD *)(v14 + 24) *= frac_mul[v9]; v10 = 0; for ( v12 += v9; (unsigned long long)v12 < *v15 && (char)*v12 >= 48 && (char)*v12 <= 57; ++v12 ) ; } } } } } *v15 = v12; return v10; }
parse_time: 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 dword ptr [RBP + -0x24],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x8] ADD RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x38],RAX MOV dword ptr [RBP + -0x44],0x1 MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x30] SUB RSI,RAX LEA RDX,[RBP + -0x30] LEA RCX,[RBP + -0x24] CALL 0x0013ca90 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0xc],ECX CMP dword ptr [RBP + -0x24],0x0 JNZ 0x0013b6f8 MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX + 0xc],0x346 JA 0x0013b6f8 MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x38] JZ 0x0013b6f8 MOV RAX,qword ptr [RBP + -0x30] MOVSX EAX,byte ptr [RAX] CMP EAX,0x3a JZ 0x0013b6fd LAB_0013b6f8: JMP 0x0013b8ac LAB_0013b6fd: MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x30] SUB RSI,RAX LEA RDX,[RBP + -0x30] LEA RCX,[RBP + -0x24] CALL 0x0013ca90 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x10],ECX CMP dword ptr [RBP + -0x24],0x0 JNZ 0x0013b754 MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX + 0x10],0x3b JA 0x0013b754 MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x38] JZ 0x0013b754 MOV RAX,qword ptr [RBP + -0x30] MOVSX EAX,byte ptr [RAX] CMP EAX,0x3a JZ 0x0013b759 LAB_0013b754: JMP 0x0013b8ac LAB_0013b759: MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x30] SUB RSI,RAX LEA RDX,[RBP + -0x30] LEA RCX,[RBP + -0x24] CALL 0x0013ca90 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x14],ECX CMP dword ptr [RBP + -0x24],0x0 JNZ 0x0013b79a MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX + 0x14],0x3b JBE 0x0013b79f LAB_0013b79a: JMP 0x0013b8ac LAB_0013b79f: MOV dword ptr [RBP + -0x44],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x18],0x0 MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x38] JNZ 0x0013b7c1 JMP 0x0013b8ac LAB_0013b7c1: MOV RAX,qword ptr [RBP + -0x30] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2e JZ 0x0013b7d2 JMP 0x0013b8ac LAB_0013b7d2: MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x30] SUB RCX,RAX MOV EAX,0x6 CMP RAX,RCX JGE 0x0013b7fe MOV EAX,0x6 MOV qword ptr [RBP + -0x50],RAX JMP 0x0013b80d LAB_0013b7fe: MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x30] SUB RAX,RCX MOV qword ptr [RBP + -0x50],RAX LAB_0013b80d: MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x40] LEA RDX,[RBP + -0x30] LEA RCX,[RBP + -0x24] CALL 0x0013ca90 MOV EAX,EAX MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x18],RCX CMP dword ptr [RBP + -0x24],0x0 JZ 0x0013b83e JMP 0x0013b8ac LAB_0013b83e: CMP qword ptr [RBP + -0x40],0x6 JNC 0x0013b862 MOV RCX,qword ptr [RBP + -0x40] LEA RAX,[0x153690] MOV EAX,dword ptr [RAX + RCX*0x4] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x20] IMUL RCX,qword ptr [RAX + 0x18] MOV qword ptr [RAX + 0x18],RCX LAB_0013b862: MOV dword ptr [RBP + -0x44],0x0 MOV RAX,qword ptr [RBP + -0x40] ADD RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x30],RAX LAB_0013b875: MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RCX] JNC 0x0013b8aa MOV RAX,qword ptr [RBP + -0x30] MOVSX EAX,byte ptr [RAX] CMP EAX,0x30 JL 0x0013b89a MOV RAX,qword ptr [RBP + -0x30] MOVSX EAX,byte ptr [RAX] CMP EAX,0x39 JLE 0x0013b89c LAB_0013b89a: JMP 0x0013b8aa LAB_0013b89c: MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX JMP 0x0013b875 LAB_0013b8aa: JMP 0x0013b8ac LAB_0013b8ac: MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV EAX,dword ptr [RBP + -0x44] ADD RSP,0x50 POP RBP RET
int4 parse_time(char *param_1,long param_2,int8 *param_3,long param_4) { int4 uVar1; uint uVar2; char *pcVar3; ulong local_58; int4 local_4c; char *local_38; int local_2c; long local_28; int8 *local_20; long local_18; char *local_10; local_2c = 0; pcVar3 = param_1 + param_2; local_4c = 1; local_38 = param_1; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; uVar1 = my_strtoui(param_1,(long)pcVar3 - (long)param_1,&local_38,&local_2c); *(int4 *)(local_28 + 0xc) = uVar1; if ((((local_2c == 0) && (*(uint *)(local_28 + 0xc) < 0x347)) && (local_38 != pcVar3)) && (*local_38 == ':')) { local_38 = local_38 + 1; uVar1 = my_strtoui(local_38,(long)pcVar3 - (long)local_38,&local_38,&local_2c); *(int4 *)(local_28 + 0x10) = uVar1; if (((local_2c == 0) && (*(uint *)(local_28 + 0x10) < 0x3c)) && ((local_38 != pcVar3 && (*local_38 == ':')))) { local_38 = local_38 + 1; uVar1 = my_strtoui(local_38,(long)pcVar3 - (long)local_38,&local_38,&local_2c); *(int4 *)(local_28 + 0x14) = uVar1; if ((local_2c == 0) && (*(uint *)(local_28 + 0x14) < 0x3c)) { local_4c = 0; *(int8 *)(local_28 + 0x18) = 0; if ((local_38 != pcVar3) && (*local_38 == '.')) { local_38 = local_38 + 1; if ((long)pcVar3 - (long)local_38 < 7) { local_58 = (long)pcVar3 - (long)local_38; } else { local_58 = 6; } uVar2 = my_strtoui(local_38,local_58,&local_38,&local_2c); *(ulong *)(local_28 + 0x18) = (ulong)uVar2; if (local_2c == 0) { if (local_58 < 6) { *(ulong *)(local_28 + 0x18) = (ulong)*(uint *)(frac_mul + local_58 * 4) * *(long *)(local_28 + 0x18); } local_4c = 0; for (local_38 = local_38 + local_58; ((local_38 < (char *)*local_20 && ('/' < *local_38)) && (*local_38 < ':')); local_38 = local_38 + 1) { } } } } } } *local_20 = local_38; return local_4c; }
49,420
mi_enable_indexes
eloqsql/storage/myisam/mi_open.c
int mi_enable_indexes(MI_INFO *info) { int error= 0; MYISAM_SHARE *share= info->s; if (share->state.state.data_file_length || (share->state.state.key_file_length != share->base.keystart)) { mi_print_error(info->s, HA_ERR_CRASHED); error= HA_ERR_CRASHED; } else mi_set_all_keys_active(share->state.key_map, share->base.keys); return error; }
O0
c
mi_enable_indexes: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movl $0x0, -0xc(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax cmpq $0x0, 0x40(%rax) jne 0xb9eee movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movq -0x18(%rbp), %rcx cmpq 0x108(%rcx), %rax je 0xb9f0f movq -0x8(%rbp), %rax movq (%rax), %rax movq 0x268(%rax), %rsi movl $0x7e, %edi callq 0xae540 movl $0x7e, -0xc(%rbp) jmp 0xb9f56 movq -0x18(%rbp), %rax cmpl $0x40, 0x180(%rax) jae 0xb9f3a movq -0x18(%rbp), %rax movl 0x180(%rax), %eax movl %eax, %ecx movl $0x1, %eax shlq %cl, %rax subq $0x1, %rax movq %rax, -0x20(%rbp) jmp 0xb9f47 movq $-0x1, %rax movq %rax, -0x20(%rbp) jmp 0xb9f47 movq -0x20(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, 0xc0(%rax) movl -0xc(%rbp), %eax addq $0x20, %rsp popq %rbp retq nop
mi_enable_indexes: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_C], 0 mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_18], rax mov rax, [rbp+var_18] cmp qword ptr [rax+40h], 0 jnz short loc_B9EEE mov rax, [rbp+var_18] mov rax, [rax+38h] mov rcx, [rbp+var_18] cmp rax, [rcx+108h] jz short loc_B9F0F loc_B9EEE: mov rax, [rbp+var_8] mov rax, [rax] mov rsi, [rax+268h] mov edi, 7Eh ; '~' call mi_report_error mov [rbp+var_C], 7Eh ; '~' jmp short loc_B9F56 loc_B9F0F: mov rax, [rbp+var_18] cmp dword ptr [rax+180h], 40h ; '@' jnb short loc_B9F3A mov rax, [rbp+var_18] mov eax, [rax+180h] mov ecx, eax mov eax, 1 shl rax, cl sub rax, 1 mov [rbp+var_20], rax jmp short loc_B9F47 loc_B9F3A: mov rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_20], rax jmp short $+2 loc_B9F47: mov rcx, [rbp+var_20] mov rax, [rbp+var_18] mov [rax+0C0h], rcx loc_B9F56: mov eax, [rbp+var_C] add rsp, 20h pop rbp retn
long long mi_enable_indexes(long long *a1) { long long v2; // [rsp+0h] [rbp-20h] long long v3; // [rsp+8h] [rbp-18h] unsigned int v4; // [rsp+14h] [rbp-Ch] v4 = 0; v3 = *a1; if ( !*(_QWORD *)(*a1 + 64) && *(_QWORD *)(v3 + 56) == *(_QWORD *)(v3 + 264) ) { if ( *(_DWORD *)(v3 + 384) >= 0x40u ) v2 = -1LL; else v2 = (1LL << *(_DWORD *)(v3 + 384)) - 1; *(_QWORD *)(v3 + 192) = v2; } else { mi_report_error(126, *(_QWORD *)(*a1 + 616)); return 126; } return v4; }
mi_enable_indexes: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x40],0x0 JNZ 0x001b9eee MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV RCX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RCX + 0x108] JZ 0x001b9f0f LAB_001b9eee: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x268] MOV EDI,0x7e CALL 0x001ae540 MOV dword ptr [RBP + -0xc],0x7e JMP 0x001b9f56 LAB_001b9f0f: MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x180],0x40 JNC 0x001b9f3a MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x180] MOV ECX,EAX MOV EAX,0x1 SHL RAX,CL SUB RAX,0x1 MOV qword ptr [RBP + -0x20],RAX JMP 0x001b9f47 LAB_001b9f3a: MOV RAX,-0x1 MOV qword ptr [RBP + -0x20],RAX JMP 0x001b9f47 LAB_001b9f47: MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0xc0],RCX LAB_001b9f56: MOV EAX,dword ptr [RBP + -0xc] ADD RSP,0x20 POP RBP RET
int4 mi_enable_indexes(long *param_1) { long lVar1; int8 local_28; int4 local_14; local_14 = 0; lVar1 = *param_1; if ((*(long *)(lVar1 + 0x40) == 0) && (*(long *)(lVar1 + 0x38) == *(long *)(lVar1 + 0x108))) { if (*(uint *)(lVar1 + 0x180) < 0x40) { local_28 = (1L << ((byte)*(int4 *)(lVar1 + 0x180) & 0x3f)) + -1; } else { local_28 = -1; } *(long *)(lVar1 + 0xc0) = local_28; } else { mi_report_error(0x7e,*(int8 *)(*param_1 + 0x268)); local_14 = 0x7e; } return local_14; }
49,421
ulight::utf8::is_valid(std::array<char8_t, 4ul>, int)
ulight/include/ulight/impl/unicode.hpp
[[nodiscard]] constexpr bool is_valid(std::array<char8_t, 4> str, int length) { ULIGHT_ASSERT(length >= 1 && length <= 4); const auto str32 = std::bit_cast<std::uint32_t>(str); const auto mask = std::bit_cast<std::uint32_t>(detail::expectation_masks[length - 1]); const auto expected = std::bit_cast<std::uint32_t>(detail::expectation_values[length - 1]); // https://nrk.neocities.org/articles/utf8-pext return (str32 & mask) == expected; }
O0
cpp
ulight::utf8::is_valid(std::array<char8_t, 4ul>, int): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movl %edi, -0x4(%rbp) movl %esi, -0x8(%rbp) movl -0x8(%rbp), %eax movb $0x0, -0x11(%rbp) cmpl $0x1, %eax jl 0xccf2 cmpl $0x4, -0x8(%rbp) jg 0xccf2 jmp 0xcd3d movl $0x20, %edi callq 0x50a0 movq %rax, %rdi movq %rdi, -0x28(%rbp) movq %rdi, -0x10(%rbp) movb $0x1, -0x11(%rbp) movb $0x0, (%rdi) addq $0x8, %rdi leaq 0xf1d0(%rip), %rsi # 0x1bee9 callq 0x7340 movq -0x28(%rbp), %rdi leaq 0x1c70f(%rip), %rax # 0x29438 movq %rax, 0x18(%rdi) leaq 0x1b8ac(%rip), %rsi # 0x285e0 xorl %eax, %eax movl %eax, %edx callq 0x51f0 leaq -0x4(%rbp), %rdi callq 0xcfe0 movl %eax, -0x18(%rbp) movl -0x8(%rbp), %eax subl $0x1, %eax cltq leaq 0x10858(%rip), %rdi # 0x1d5b0 shlq $0x2, %rax addq %rax, %rdi callq 0xcff0 movl %eax, -0x1c(%rbp) movl -0x8(%rbp), %eax subl $0x1, %eax cltq leaq 0x1084a(%rip), %rdi # 0x1d5c0 shlq $0x2, %rax addq %rax, %rdi callq 0xcff0 movl %eax, -0x20(%rbp) movl -0x18(%rbp), %eax andl -0x1c(%rbp), %eax cmpl -0x20(%rbp), %eax sete %al andb $0x1, %al addq $0x30, %rsp popq %rbp retq nopl (%rax)
_ZN6ulight4utf88is_validESt5arrayIDuLm4EEi: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_4], edi mov [rbp+var_8], esi mov eax, [rbp+var_8] mov [rbp+var_11], 0 cmp eax, 1 jl short loc_CCF2 cmp [rbp+var_8], 4 jg short loc_CCF2 jmp short loc_CD3D loc_CCF2: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rdi, rax mov [rbp+var_28], rdi mov [rbp+var_10], rdi mov [rbp+var_11], 1 mov byte ptr [rdi], 0 add rdi, 8 lea rsi, aLength1Length4; "length >= 1 && length <= 4" call _ZNSt17basic_string_viewIDuSt11char_traitsIDuEEC2EPKDu; std::u8string_view::basic_string_view(char8_t const*) mov rdi, [rbp+var_28]; void * lea rax, off_29438; "/workspace/llm4binary/github2025/ulight"... mov [rdi+18h], rax lea rsi, _ZTIN6ulight15Assertion_ErrorE; lptinfo xor eax, eax mov edx, eax; void (*)(void *) call ___cxa_throw loc_CD3D: lea rdi, [rbp+var_4] call _ZSt8bit_castIjSt5arrayIDuLm4EEET_RKT0_QaaaaeqstS2_stS3_23is_trivially_copyable_vIS2_E23is_trivially_copyable_vIS3_E mov [rbp+var_18], eax mov eax, [rbp+var_8] sub eax, 1 cdqe lea rdi, _ZN6ulight4utf86detail17expectation_masksE; ulight::utf8::detail::expectation_masks shl rax, 2 add rdi, rax call _ZSt8bit_castIjA4_DuET_RKT0_QaaaaeqstS1_stS2_23is_trivially_copyable_vIS1_E23is_trivially_copyable_vIS2_E mov [rbp+var_1C], eax mov eax, [rbp+var_8] sub eax, 1 cdqe lea rdi, _ZN6ulight4utf86detail18expectation_valuesE; ulight::utf8::detail::expectation_values shl rax, 2 add rdi, rax call _ZSt8bit_castIjA4_DuET_RKT0_QaaaaeqstS1_stS2_23is_trivially_copyable_vIS1_E23is_trivially_copyable_vIS2_E mov [rbp+var_20], eax mov eax, [rbp+var_18] and eax, [rbp+var_1C] cmp eax, [rbp+var_20] setz al and al, 1 add rsp, 30h pop rbp retn
bool ulight::utf8::is_valid(int a1, int a2) { int v3; // [rsp+14h] [rbp-1Ch] int v4; // [rsp+18h] [rbp-18h] long long *exception; // [rsp+20h] [rbp-10h] int v6; // [rsp+2Ch] [rbp-4h] BYREF v6 = a1; if ( a2 < 1 || a2 > 4 ) { exception = (long long *)__cxa_allocate_exception(0x20uLL); *(_BYTE *)exception = 0; std::u8string_view::basic_string_view(exception + 1, (long long)"length >= 1 && length <= 4"); exception[3] = (long long)off_29438; __cxa_throw(exception, (struct type_info *)&`typeinfo for'ulight::Assertion_Error, 0LL); } v4 = std::bit_cast<unsigned int,std::array<char8_t,4ul>>(&v6); v3 = std::bit_cast<unsigned int,char8_t [4]>((char *)&ulight::utf8::detail::expectation_masks + 4 * a2 - 4); return (v3 & v4) == (unsigned int)std::bit_cast<unsigned int,char8_t [4]>((char *)&ulight::utf8::detail::expectation_values + 4 * a2 - 4); }
is_valid: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV dword ptr [RBP + -0x4],EDI MOV dword ptr [RBP + -0x8],ESI MOV EAX,dword ptr [RBP + -0x8] MOV byte ptr [RBP + -0x11],0x0 CMP EAX,0x1 JL 0x0010ccf2 CMP dword ptr [RBP + -0x8],0x4 JG 0x0010ccf2 JMP 0x0010cd3d LAB_0010ccf2: MOV EDI,0x20 CALL 0x001050a0 MOV RDI,RAX MOV qword ptr [RBP + -0x28],RDI MOV qword ptr [RBP + -0x10],RDI MOV byte ptr [RBP + -0x11],0x1 MOV byte ptr [RDI],0x0 ADD RDI,0x8 LEA RSI,[0x11bee9] CALL 0x00107340 MOV RDI,qword ptr [RBP + -0x28] LEA RAX,[0x129438] MOV qword ptr [RDI + 0x18],RAX LEA RSI,[0x1285e0] XOR EAX,EAX MOV EDX,EAX CALL 0x001051f0 LAB_0010cd3d: LEA RDI,[RBP + -0x4] CALL 0x0010cfe0 MOV dword ptr [RBP + -0x18],EAX MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x1 CDQE LEA RDI,[0x11d5b0] SHL RAX,0x2 ADD RDI,RAX CALL 0x0010cff0 MOV dword ptr [RBP + -0x1c],EAX MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x1 CDQE LEA RDI,[0x11d5c0] SHL RAX,0x2 ADD RDI,RAX CALL 0x0010cff0 MOV dword ptr [RBP + -0x20],EAX MOV EAX,dword ptr [RBP + -0x18] AND EAX,dword ptr [RBP + -0x1c] CMP EAX,dword ptr [RBP + -0x20] SETZ AL AND AL,0x1 ADD RSP,0x30 POP RBP RET
/* ulight::utf8::is_valid(std::array<char8_t, 4ul>, int) */ int4 ulight::utf8::is_valid(int4 param_1,int param_2) { uint uVar1; uint uVar2; uint uVar3; int1 *puVar4; int4 local_c; local_c = param_1; if ((0 < param_2) && (param_2 < 5)) { uVar1 = _ZSt8bit_castIjSt5arrayIDuLm4EEET_RKT0_QaaaaeqstS2_stS3_23is_trivially_copyable_vIS2_E23is_trivially_copyable_vIS3_E (&local_c); uVar2 = _ZSt8bit_castIjA4_DuET_RKT0_QaaaaeqstS1_stS2_23is_trivially_copyable_vIS1_E23is_trivially_copyable_vIS2_E (detail::expectation_masks + (long)(param_2 + -1) * 4); uVar3 = _ZSt8bit_castIjA4_DuET_RKT0_QaaaaeqstS1_stS2_23is_trivially_copyable_vIS1_E23is_trivially_copyable_vIS2_E (detail::expectation_values + (long)(param_2 + -1) * 4); return CONCAT31((int3)((uVar1 & uVar2) >> 8),(uVar1 & uVar2) == uVar3); } puVar4 = (int1 *)__cxa_allocate_exception(0x20); *puVar4 = 0; std::basic_string_view<char8_t,std::char_traits<char8_t>>::basic_string_view ((basic_string_view<char8_t,std::char_traits<char8_t>> *)(puVar4 + 8), (uchar *)"length >= 1 && length <= 4"); *(int ***)(puVar4 + 0x18) = &PTR_s__workspace_llm4binary_github2025_00129438; /* WARNING: Subroutine does not return */ __cxa_throw(puVar4,&Assertion_Error::typeinfo,0); }
49,422
coro::detail::make_task_self_deleting(coro::task<void>) (.resume)
AlayaLite/build_O3/_deps/libcoro-src/src/detail/task_self_deleting.cpp
auto make_task_self_deleting(coro::task<void> user_task) -> task_self_deleting { co_await user_task; co_return; }
O3
cpp
coro::detail::make_task_self_deleting(coro::task<void>) (.resume): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx addq $0x10, %rdi cmpb $0x1, 0x28(%rbx) jne 0x7e88 callq 0x7cc8 jmp 0x7e96 movq 0x20(%rbx), %r14 callq 0x7cc8 testq %r14, %r14 je 0x7e9d movq 0x20(%rbx), %rdi callq *0x8(%rdi) movl $0x30, %esi movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x3250 movq %rax, %rdi callq 0x40e0
_ZN4coro6detail23make_task_self_deletingENS_4taskIvEE_destroy: push r14 push rbx push rax mov rbx, rdi add rdi, 10h; this cmp byte ptr [rbx+28h], 1 jnz short loc_7E88 call _ZN4coro6detail21promise_self_deletingD2Ev; coro::detail::promise_self_deleting::~promise_self_deleting() jmp short loc_7E96 loc_7E88: mov r14, [rbx+20h] call _ZN4coro6detail21promise_self_deletingD2Ev; coro::detail::promise_self_deleting::~promise_self_deleting() test r14, r14 jz short loc_7E9D loc_7E96: mov rdi, [rbx+20h] call qword ptr [rdi+8] loc_7E9D: mov esi, 30h ; '0'; unsigned __int64 mov rdi, rbx; void * add rsp, 8 pop rbx pop r14 jmp __ZdlPvm; operator delete(void *,ulong) mov rdi, rax call __clang_call_terminate
void coro::detail::make_task_self_deleting(_QWORD *a1) { coro::detail::promise_self_deleting *v2; // rdi long long v3; // r14 v2 = (coro::detail::promise_self_deleting *)(a1 + 2); if ( *((_BYTE *)a1 + 40) == 1 ) { coro::detail::promise_self_deleting::~promise_self_deleting(v2); LABEL_4: (*(void ( **)(_QWORD))(a1[4] + 8LL))(a1[4]); goto LABEL_5; } v3 = a1[4]; coro::detail::promise_self_deleting::~promise_self_deleting(v2); if ( v3 ) goto LABEL_4; LABEL_5: operator delete(a1, 0x30uLL); }
make_task_self_deleting: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI ADD RDI,0x10 CMP byte ptr [RBX + 0x28],0x1 JNZ 0x00107e88 CALL 0x00107cc8 JMP 0x00107e96 LAB_00107e88: MOV R14,qword ptr [RBX + 0x20] CALL 0x00107cc8 TEST R14,R14 JZ 0x00107e9d LAB_00107e96: MOV RDI,qword ptr [RBX + 0x20] LAB_00107e9a: CALL qword ptr [RDI + 0x8] LAB_00107e9d: MOV ESI,0x30 MOV RDI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x00103250
/* coro::detail::make_task_self_deleting(coro::task<void>) [clone .destroy] */ void coro::detail::make_task_self_deleting(void *param_1) { long lVar1; if (*(char *)((long)param_1 + 0x28) == '\x01') { promise_self_deleting::~promise_self_deleting((promise_self_deleting *)((long)param_1 + 0x10)); } else { lVar1 = *(long *)((long)param_1 + 0x20); promise_self_deleting::~promise_self_deleting((promise_self_deleting *)((long)param_1 + 0x10)); if (lVar1 == 0) goto LAB_00107e9d; } /* try { // try from 00107e9a to 00107e9c has its CatchHandler @ 00107eb1 */ (**(code **)(*(long *)((long)param_1 + 0x20) + 8))(); LAB_00107e9d: operator_delete(param_1,0x30); return; }
49,423
unpack_dirname
eloqsql/mysys/mf_pack.c
size_t unpack_dirname(char * to, const char *from) { size_t length, h_length; char buff[FN_REFLEN+1+4],*suffix,*tilde_expansion; DBUG_ENTER("unpack_dirname"); length= normalize_dirname(buff, from); if (buff[0] == FN_HOMELIB) { suffix=buff+1; tilde_expansion=expand_tilde(&suffix); if (tilde_expansion) { length-= (size_t) (suffix-buff)-1; if (length+(h_length= strlen(tilde_expansion)) <= FN_REFLEN) { if ((h_length > 0) && (tilde_expansion[h_length-1] == FN_LIBCHAR)) h_length--; if (buff+h_length < suffix) bmove(buff+h_length,suffix,length); else bmove_upp((uchar*) buff+h_length+length, (uchar*) suffix+length, length); bmove(buff,tilde_expansion,h_length); } } } #ifdef USE_SYMDIR if (my_use_symdir) symdirget(buff); #endif DBUG_RETURN(system_filename(to,buff)); /* Fix for open */ }
O0
c
unpack_dirname: pushq %rbp movq %rsp, %rbp subq $0x250, %rsp # imm = 0x250 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x218(%rbp) movq %rsi, -0x220(%rbp) leaq -0x210(%rbp), %rdi movq -0x220(%rbp), %rsi callq 0xe8fd0 movq %rax, -0x228(%rbp) movsbl -0x210(%rbp), %eax cmpl $0x7e, %eax jne 0xe9281 leaq -0x210(%rbp), %rax addq $0x1, %rax movq %rax, -0x238(%rbp) leaq -0x238(%rbp), %rdi callq 0xe92d0 movq %rax, -0x240(%rbp) cmpq $0x0, -0x240(%rbp) je 0xe927f movq -0x238(%rbp), %rcx leaq -0x210(%rbp), %rax subq %rax, %rcx subq $0x1, %rcx movq -0x228(%rbp), %rax subq %rcx, %rax movq %rax, -0x228(%rbp) movq -0x228(%rbp), %rax movq %rax, -0x248(%rbp) movq -0x240(%rbp), %rdi callq 0x2a340 movq %rax, %rcx movq -0x248(%rbp), %rax movq %rcx, -0x230(%rbp) addq %rcx, %rax cmpq $0x200, %rax # imm = 0x200 ja 0xe927d cmpq $0x0, -0x230(%rbp) jbe 0xe91fa movq -0x240(%rbp), %rax movq -0x230(%rbp), %rcx subq $0x1, %rcx movsbl (%rax,%rcx), %eax cmpl $0x2f, %eax jne 0xe91fa movq -0x230(%rbp), %rax addq $-0x1, %rax movq %rax, -0x230(%rbp) leaq -0x210(%rbp), %rax addq -0x230(%rbp), %rax cmpq -0x238(%rbp), %rax jae 0xe9234 leaq -0x210(%rbp), %rdi addq -0x230(%rbp), %rdi movq -0x238(%rbp), %rsi movq -0x228(%rbp), %rdx callq 0x2a120 jmp 0xe9263 leaq -0x210(%rbp), %rdi addq -0x230(%rbp), %rdi addq -0x228(%rbp), %rdi movq -0x238(%rbp), %rsi addq -0x228(%rbp), %rsi movq -0x228(%rbp), %rdx callq 0x10ade0 leaq -0x210(%rbp), %rdi movq -0x240(%rbp), %rsi movq -0x230(%rbp), %rdx callq 0x2a120 jmp 0xe927f jmp 0xe9281 jmp 0xe9283 movq -0x218(%rbp), %rdi leaq -0x210(%rbp), %rsi callq 0xe9390 movq %rax, -0x250(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xe92bf movq -0x250(%rbp), %rax addq $0x250, %rsp # imm = 0x250 popq %rbp retq callq 0x2a250 nopw %cs:(%rax,%rax)
unpack_dirname: push rbp mov rbp, rsp sub rsp, 250h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_218], rdi mov [rbp+var_220], rsi lea rdi, [rbp+var_210] mov rsi, [rbp+var_220] call normalize_dirname mov [rbp+var_228], rax movsx eax, [rbp+var_210] cmp eax, 7Eh ; '~' jnz loc_E9281 lea rax, [rbp+var_210] add rax, 1 mov [rbp+var_238], rax lea rdi, [rbp+var_238] call expand_tilde mov [rbp+var_240], rax cmp [rbp+var_240], 0 jz loc_E927F mov rcx, [rbp+var_238] lea rax, [rbp+var_210] sub rcx, rax sub rcx, 1 mov rax, [rbp+var_228] sub rax, rcx mov [rbp+var_228], rax mov rax, [rbp+var_228] mov [rbp+var_248], rax mov rdi, [rbp+var_240] call _strlen mov rcx, rax mov rax, [rbp+var_248] mov [rbp+var_230], rcx add rax, rcx cmp rax, 200h ja loc_E927D cmp [rbp+var_230], 0 jbe short loc_E91FA mov rax, [rbp+var_240] mov rcx, [rbp+var_230] sub rcx, 1 movsx eax, byte ptr [rax+rcx] cmp eax, 2Fh ; '/' jnz short loc_E91FA mov rax, [rbp+var_230] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_230], rax loc_E91FA: lea rax, [rbp+var_210] add rax, [rbp+var_230] cmp rax, [rbp+var_238] jnb short loc_E9234 lea rdi, [rbp+var_210] add rdi, [rbp+var_230] mov rsi, [rbp+var_238] mov rdx, [rbp+var_228] call _memmove jmp short loc_E9263 loc_E9234: lea rdi, [rbp+var_210] add rdi, [rbp+var_230] add rdi, [rbp+var_228] mov rsi, [rbp+var_238] add rsi, [rbp+var_228] mov rdx, [rbp+var_228] call bmove_upp loc_E9263: lea rdi, [rbp+var_210] mov rsi, [rbp+var_240] mov rdx, [rbp+var_230] call _memmove loc_E927D: jmp short $+2 loc_E927F: jmp short $+2 loc_E9281: jmp short $+2 loc_E9283: mov rdi, [rbp+var_218] lea rsi, [rbp+var_210] call system_filename mov [rbp+var_250], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_E92BF mov rax, [rbp+var_250] add rsp, 250h pop rbp retn loc_E92BF: call ___stack_chk_fail
long long unpack_dirname(long long a1, _BYTE *a2) { long long v3; // [rsp+8h] [rbp-248h] long long v4; // [rsp+10h] [rbp-240h] _BYTE *v5; // [rsp+18h] [rbp-238h] BYREF long long v6; // [rsp+20h] [rbp-230h] long long v7; // [rsp+28h] [rbp-228h] _BYTE *v8; // [rsp+30h] [rbp-220h] long long v9; // [rsp+38h] [rbp-218h] char v10; // [rsp+40h] [rbp-210h] BYREF _BYTE v11[527]; // [rsp+41h] [rbp-20Fh] BYREF *(_QWORD *)&v11[519] = __readfsqword(0x28u); v9 = a1; v8 = a2; v7 = normalize_dirname((long long)&v10, a2); if ( v10 == 126 ) { v5 = v11; v4 = expand_tilde(&v5); if ( v4 ) { v7 -= v5 - &v10 - 1; v3 = v7; v6 = strlen(v4); if ( (unsigned long long)(v6 + v3) <= 0x200 ) { if ( v6 && *(_BYTE *)(v4 + v6 - 1) == 47 ) --v6; if ( &v11[v6 - 1] >= v5 ) bmove_upp(&v11[v6 - 1 + v7], &v5[v7], v7); else memmove(&v11[v6 - 1], v5, v7); memmove(&v10, v4, v6); } } } return system_filename(v9, &v10); }
unpack_dirname: PUSH RBP MOV RBP,RSP SUB RSP,0x250 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x218],RDI MOV qword ptr [RBP + -0x220],RSI LEA RDI,[RBP + -0x210] MOV RSI,qword ptr [RBP + -0x220] CALL 0x001e8fd0 MOV qword ptr [RBP + -0x228],RAX MOVSX EAX,byte ptr [RBP + -0x210] CMP EAX,0x7e JNZ 0x001e9281 LEA RAX,[RBP + -0x210] ADD RAX,0x1 MOV qword ptr [RBP + -0x238],RAX LEA RDI,[RBP + -0x238] CALL 0x001e92d0 MOV qword ptr [RBP + -0x240],RAX CMP qword ptr [RBP + -0x240],0x0 JZ 0x001e927f MOV RCX,qword ptr [RBP + -0x238] LEA RAX,[RBP + -0x210] SUB RCX,RAX SUB RCX,0x1 MOV RAX,qword ptr [RBP + -0x228] SUB RAX,RCX MOV qword ptr [RBP + -0x228],RAX MOV RAX,qword ptr [RBP + -0x228] MOV qword ptr [RBP + -0x248],RAX MOV RDI,qword ptr [RBP + -0x240] CALL 0x0012a340 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x248] MOV qword ptr [RBP + -0x230],RCX ADD RAX,RCX CMP RAX,0x200 JA 0x001e927d CMP qword ptr [RBP + -0x230],0x0 JBE 0x001e91fa MOV RAX,qword ptr [RBP + -0x240] MOV RCX,qword ptr [RBP + -0x230] SUB RCX,0x1 MOVSX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x2f JNZ 0x001e91fa MOV RAX,qword ptr [RBP + -0x230] ADD RAX,-0x1 MOV qword ptr [RBP + -0x230],RAX LAB_001e91fa: LEA RAX,[RBP + -0x210] ADD RAX,qword ptr [RBP + -0x230] CMP RAX,qword ptr [RBP + -0x238] JNC 0x001e9234 LEA RDI,[RBP + -0x210] ADD RDI,qword ptr [RBP + -0x230] MOV RSI,qword ptr [RBP + -0x238] MOV RDX,qword ptr [RBP + -0x228] CALL 0x0012a120 JMP 0x001e9263 LAB_001e9234: LEA RDI,[RBP + -0x210] ADD RDI,qword ptr [RBP + -0x230] ADD RDI,qword ptr [RBP + -0x228] MOV RSI,qword ptr [RBP + -0x238] ADD RSI,qword ptr [RBP + -0x228] MOV RDX,qword ptr [RBP + -0x228] CALL 0x0020ade0 LAB_001e9263: LEA RDI,[RBP + -0x210] MOV RSI,qword ptr [RBP + -0x240] MOV RDX,qword ptr [RBP + -0x230] CALL 0x0012a120 LAB_001e927d: JMP 0x001e927f LAB_001e927f: JMP 0x001e9281 LAB_001e9281: JMP 0x001e9283 LAB_001e9283: MOV RDI,qword ptr [RBP + -0x218] LEA RSI,[RBP + -0x210] CALL 0x001e9390 MOV qword ptr [RBP + -0x250],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001e92bf MOV RAX,qword ptr [RBP + -0x250] ADD RSP,0x250 POP RBP RET LAB_001e92bf: CALL 0x0012a250
int8 unpack_dirname(int8 param_1,int8 param_2) { char *__s; size_t sVar1; int8 uVar2; long in_FS_OFFSET; char *local_240; size_t local_238; size_t local_230; int8 local_228; int8 local_220; char local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_228 = param_2; local_220 = param_1; local_230 = normalize_dirname(local_218,param_2); if (local_218[0] == '~') { local_240 = local_218 + 1; __s = (char *)expand_tilde(&local_240); if (__s != (char *)0x0) { sVar1 = local_230 - (long)(local_240 + (-1 - (long)local_218)); local_230 = sVar1; local_238 = strlen(__s); if (sVar1 + local_238 < 0x201) { if ((local_238 != 0) && (__s[local_238 - 1] == '/')) { local_238 = local_238 - 1; } if (local_218 + local_238 < local_240) { memmove(local_218 + local_238,local_240,local_230); } else { bmove_upp(local_218 + local_230 + local_238,local_240 + local_230,local_230); } memmove(local_218,__s,local_238); } } } uVar2 = system_filename(local_220,local_218); if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return uVar2; }
49,424
mi_read_cache
eloqsql/storage/myisam/mi_cache.c
int _mi_read_cache(IO_CACHE *info, uchar *buff, my_off_t pos, size_t length, int flag) { size_t read_length,in_buff_length; my_off_t offset; uchar *in_buff_pos; DBUG_ENTER("_mi_read_cache"); DBUG_ASSERT(!(info->myflags & MY_ENCRYPT)); if (pos < info->pos_in_file) { read_length=length; if ((my_off_t) read_length > (my_off_t) (info->pos_in_file-pos)) read_length=(size_t)(info->pos_in_file-pos); info->seek_not_done=1; if (mysql_file_pread(info->file, buff, read_length, pos, MYF(MY_NABP))) DBUG_RETURN(1); if (!(length-=read_length)) DBUG_RETURN(0); pos+=read_length; buff+=read_length; } if (pos >= info->pos_in_file && (offset= (my_off_t) (pos - info->pos_in_file)) < (my_off_t) (info->read_end - info->request_pos)) { in_buff_pos=info->request_pos+ (uint)offset; in_buff_length= MY_MIN(length, (size_t)(info->read_end-in_buff_pos)); memcpy(buff,info->request_pos+(uint) offset, in_buff_length); if (!(length-=in_buff_length)) DBUG_RETURN(0); pos+=in_buff_length; buff+=in_buff_length; } else in_buff_length=0; if (flag & READING_NEXT) { if (pos != (info->pos_in_file + (uint) (info->read_end - info->request_pos))) { info->pos_in_file=pos; /* Force start here */ info->read_pos=info->read_end=info->request_pos; /* Everything used */ info->seek_not_done=1; } else info->read_pos=info->read_end; /* All block used */ if (!_my_b_read(info,buff,length)) DBUG_RETURN(0); read_length=info->error; } else { info->seek_not_done=1; if ((read_length= mysql_file_pread(info->file, buff, length, pos, MYF(0))) == length) DBUG_RETURN(0); } if (!(flag & READING_HEADER) || (int) read_length == -1 || read_length+in_buff_length < 3) { DBUG_PRINT("error", ("Error %d reading next-multi-part block (Got %d bytes)", my_errno, (int) read_length)); if (!my_errno || my_errno == -1 || my_errno == HA_ERR_FILE_TOO_SHORT) my_errno= HA_ERR_WRONG_IN_RECORD; DBUG_RETURN(1); } bzero(buff+read_length,MI_BLOCK_INFO_HEADER_LENGTH - in_buff_length - read_length); DBUG_RETURN(0); }
O0
c
mi_read_cache: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movl %r8d, -0x2c(%rbp) jmp 0xd61fe movq -0x20(%rbp), %rax movq -0x10(%rbp), %rcx cmpq (%rcx), %rax jae 0xd62c6 movq -0x28(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq -0x10(%rbp), %rcx movq (%rcx), %rcx subq -0x20(%rbp), %rcx cmpq %rcx, %rax jbe 0xd623a movq -0x10(%rbp), %rax movq (%rax), %rax subq -0x20(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax movl $0x1, 0xe0(%rax) movq -0x10(%rbp), %rax movl 0xd4(%rax), %edx movq -0x18(%rbp), %rcx movq -0x38(%rbp), %r8 movq -0x20(%rbp), %r9 leaq 0x83965(%rip), %rdi # 0x159bca movl $0x35, %esi movq $0x4, (%rsp) callq 0xd6550 cmpq $0x0, %rax je 0xd628b jmp 0xd627f movl $0x1, -0x4(%rbp) jmp 0xd653f movq -0x38(%rbp), %rcx movq -0x28(%rbp), %rax subq %rcx, %rax movq %rax, -0x28(%rbp) cmpq $0x0, %rax jne 0xd62ae jmp 0xd62a2 movl $0x0, -0x4(%rbp) jmp 0xd653f movq -0x38(%rbp), %rax addq -0x20(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x38(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x20(%rbp), %rax movq -0x10(%rbp), %rcx cmpq (%rcx), %rax jb 0xd63af movq -0x20(%rbp), %rax movq -0x10(%rbp), %rcx subq (%rcx), %rax movq %rax, -0x48(%rbp) movq -0x10(%rbp), %rcx movq 0x18(%rcx), %rcx movq -0x10(%rbp), %rdx movq 0x28(%rdx), %rdx subq %rdx, %rcx cmpq %rcx, %rax jae 0xd63af movq -0x10(%rbp), %rax movq 0x28(%rax), %rax movq -0x48(%rbp), %rcx movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x50(%rbp) movq -0x28(%rbp), %rax movq -0x10(%rbp), %rcx movq 0x18(%rcx), %rcx movq -0x50(%rbp), %rdx subq %rdx, %rcx cmpq %rcx, %rax jae 0xd6339 movq -0x28(%rbp), %rax movq %rax, -0x58(%rbp) jmp 0xd634c movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movq -0x50(%rbp), %rcx subq %rcx, %rax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rdi movq -0x10(%rbp), %rax movq 0x28(%rax), %rsi movq -0x48(%rbp), %rax movl %eax, %eax addq %rax, %rsi movq -0x40(%rbp), %rdx callq 0x2a0b0 movq -0x40(%rbp), %rcx movq -0x28(%rbp), %rax subq %rcx, %rax movq %rax, -0x28(%rbp) cmpq $0x0, %rax jne 0xd6395 jmp 0xd6389 movl $0x0, -0x4(%rbp) jmp 0xd653f movq -0x40(%rbp), %rax addq -0x20(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x40(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x18(%rbp) jmp 0xd63b7 movq $0x0, -0x40(%rbp) movl -0x2c(%rbp), %eax andl $0x1, %eax cmpl $0x0, %eax je 0xd6466 movq -0x20(%rbp), %rax movq -0x10(%rbp), %rcx movq (%rcx), %rcx movq -0x10(%rbp), %rdx movq 0x18(%rdx), %rdx movq -0x10(%rbp), %rsi movq 0x28(%rsi), %rsi subq %rsi, %rdx movl %edx, %edx addq %rdx, %rcx cmpq %rcx, %rax je 0xd6421 movq -0x20(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rax movq 0x28(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x18(%rax) movq -0x10(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x10(%rbp), %rax movl $0x1, 0xe0(%rax) jmp 0xd6431 movq -0x10(%rbp), %rax movq 0x18(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x28(%rbp), %rdx callq 0xe2db0 cmpl $0x0, %eax jne 0xd6455 jmp 0xd6449 movl $0x0, -0x4(%rbp) jmp 0xd653f movq -0x10(%rbp), %rax movslq 0xe4(%rax), %rax movq %rax, -0x38(%rbp) jmp 0xd64bf movq -0x10(%rbp), %rax movl $0x1, 0xe0(%rax) movq -0x10(%rbp), %rax movl 0xd4(%rax), %edx movq -0x18(%rbp), %rcx movq -0x28(%rbp), %r8 movq -0x20(%rbp), %r9 leaq 0x83739(%rip), %rdi # 0x159bca movl $0x5d, %esi xorl %eax, %eax movq $0x0, (%rsp) callq 0xd6550 movq %rax, -0x38(%rbp) cmpq -0x28(%rbp), %rax jne 0xd64bd jmp 0xd64b1 movl $0x0, -0x4(%rbp) jmp 0xd653f jmp 0xd64bf movl -0x2c(%rbp), %eax andl $0x2, %eax cmpl $0x0, %eax je 0xd64e1 movq -0x38(%rbp), %rax cmpl $-0x1, %eax je 0xd64e1 movq -0x38(%rbp), %rax addq -0x40(%rbp), %rax cmpq $0x3, %rax jae 0xd651c jmp 0xd64e3 jmp 0xd64e5 callq 0xfc1b0 cmpl $0x0, (%rax) je 0xd6506 callq 0xfc1b0 cmpl $-0x1, (%rax) je 0xd6506 callq 0xfc1b0 cmpl $0xaf, (%rax) jne 0xd6511 callq 0xfc1b0 movl $0x7f, (%rax) jmp 0xd6513 movl $0x1, -0x4(%rbp) jmp 0xd653f movq -0x18(%rbp), %rdi addq -0x38(%rbp), %rdi movl $0x14, %edx subq -0x40(%rbp), %rdx subq -0x38(%rbp), %rdx xorl %esi, %esi callq 0x2a2a0 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopl (%rax,%rax)
_mi_read_cache: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_2C], r8d jmp short $+2 loc_D61FE: mov rax, [rbp+var_20] mov rcx, [rbp+var_10] cmp rax, [rcx] jnb loc_D62C6 mov rax, [rbp+var_28] mov [rbp+var_38], rax mov rax, [rbp+var_38] mov rcx, [rbp+var_10] mov rcx, [rcx] sub rcx, [rbp+var_20] cmp rax, rcx jbe short loc_D623A mov rax, [rbp+var_10] mov rax, [rax] sub rax, [rbp+var_20] mov [rbp+var_38], rax loc_D623A: mov rax, [rbp+var_10] mov dword ptr [rax+0E0h], 1 mov rax, [rbp+var_10] mov edx, [rax+0D4h] mov rcx, [rbp+var_18] mov r8, [rbp+var_38] mov r9, [rbp+var_20] lea rdi, aWorkspaceLlm4b_32; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 35h ; '5' mov [rsp+60h+var_60], 4 call inline_mysql_file_pread_8 cmp rax, 0 jz short loc_D628B jmp short $+2 loc_D627F: mov [rbp+var_4], 1 jmp loc_D653F loc_D628B: mov rcx, [rbp+var_38] mov rax, [rbp+var_28] sub rax, rcx mov [rbp+var_28], rax cmp rax, 0 jnz short loc_D62AE jmp short $+2 loc_D62A2: mov [rbp+var_4], 0 jmp loc_D653F loc_D62AE: mov rax, [rbp+var_38] add rax, [rbp+var_20] mov [rbp+var_20], rax mov rax, [rbp+var_38] add rax, [rbp+var_18] mov [rbp+var_18], rax loc_D62C6: mov rax, [rbp+var_20] mov rcx, [rbp+var_10] cmp rax, [rcx] jb loc_D63AF mov rax, [rbp+var_20] mov rcx, [rbp+var_10] sub rax, [rcx] mov [rbp+var_48], rax mov rcx, [rbp+var_10] mov rcx, [rcx+18h] mov rdx, [rbp+var_10] mov rdx, [rdx+28h] sub rcx, rdx cmp rax, rcx jnb loc_D63AF mov rax, [rbp+var_10] mov rax, [rax+28h] mov rcx, [rbp+var_48] mov ecx, ecx add rax, rcx mov [rbp+var_50], rax mov rax, [rbp+var_28] mov rcx, [rbp+var_10] mov rcx, [rcx+18h] mov rdx, [rbp+var_50] sub rcx, rdx cmp rax, rcx jnb short loc_D6339 mov rax, [rbp+var_28] mov [rbp+var_58], rax jmp short loc_D634C loc_D6339: mov rax, [rbp+var_10] mov rax, [rax+18h] mov rcx, [rbp+var_50] sub rax, rcx mov [rbp+var_58], rax loc_D634C: mov rax, [rbp+var_58] mov [rbp+var_40], rax mov rdi, [rbp+var_18] mov rax, [rbp+var_10] mov rsi, [rax+28h] mov rax, [rbp+var_48] mov eax, eax add rsi, rax mov rdx, [rbp+var_40] call _memcpy mov rcx, [rbp+var_40] mov rax, [rbp+var_28] sub rax, rcx mov [rbp+var_28], rax cmp rax, 0 jnz short loc_D6395 jmp short $+2 loc_D6389: mov [rbp+var_4], 0 jmp loc_D653F loc_D6395: mov rax, [rbp+var_40] add rax, [rbp+var_20] mov [rbp+var_20], rax mov rax, [rbp+var_40] add rax, [rbp+var_18] mov [rbp+var_18], rax jmp short loc_D63B7 loc_D63AF: mov [rbp+var_40], 0 loc_D63B7: mov eax, [rbp+var_2C] and eax, 1 cmp eax, 0 jz loc_D6466 mov rax, [rbp+var_20] mov rcx, [rbp+var_10] mov rcx, [rcx] mov rdx, [rbp+var_10] mov rdx, [rdx+18h] mov rsi, [rbp+var_10] mov rsi, [rsi+28h] sub rdx, rsi mov edx, edx add rcx, rdx cmp rax, rcx jz short loc_D6421 mov rcx, [rbp+var_20] mov rax, [rbp+var_10] mov [rax], rcx mov rax, [rbp+var_10] mov rcx, [rax+28h] mov rax, [rbp+var_10] mov [rax+18h], rcx mov rax, [rbp+var_10] mov [rax+10h], rcx mov rax, [rbp+var_10] mov dword ptr [rax+0E0h], 1 jmp short loc_D6431 loc_D6421: mov rax, [rbp+var_10] mov rcx, [rax+18h] mov rax, [rbp+var_10] mov [rax+10h], rcx loc_D6431: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_28] call _my_b_read cmp eax, 0 jnz short loc_D6455 jmp short $+2 loc_D6449: mov [rbp+var_4], 0 jmp loc_D653F loc_D6455: mov rax, [rbp+var_10] movsxd rax, dword ptr [rax+0E4h] mov [rbp+var_38], rax jmp short loc_D64BF loc_D6466: mov rax, [rbp+var_10] mov dword ptr [rax+0E0h], 1 mov rax, [rbp+var_10] mov edx, [rax+0D4h] mov rcx, [rbp+var_18] mov r8, [rbp+var_28] mov r9, [rbp+var_20] lea rdi, aWorkspaceLlm4b_32; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 5Dh ; ']' xor eax, eax mov [rsp+60h+var_60], 0 call inline_mysql_file_pread_8 mov [rbp+var_38], rax cmp rax, [rbp+var_28] jnz short loc_D64BD jmp short $+2 loc_D64B1: mov [rbp+var_4], 0 jmp loc_D653F loc_D64BD: jmp short $+2 loc_D64BF: mov eax, [rbp+var_2C] and eax, 2 cmp eax, 0 jz short loc_D64E1 mov rax, [rbp+var_38] cmp eax, 0FFFFFFFFh jz short loc_D64E1 mov rax, [rbp+var_38] add rax, [rbp+var_40] cmp rax, 3 jnb short loc_D651C loc_D64E1: jmp short $+2 loc_D64E3: jmp short $+2 loc_D64E5: call _my_thread_var cmp dword ptr [rax], 0 jz short loc_D6506 call _my_thread_var cmp dword ptr [rax], 0FFFFFFFFh jz short loc_D6506 call _my_thread_var cmp dword ptr [rax], 0AFh jnz short loc_D6511 loc_D6506: call _my_thread_var mov dword ptr [rax], 7Fh loc_D6511: jmp short $+2 loc_D6513: mov [rbp+var_4], 1 jmp short loc_D653F loc_D651C: mov rdi, [rbp+var_18] add rdi, [rbp+var_38] mov edx, 14h sub rdx, [rbp+var_40] sub rdx, [rbp+var_38] xor esi, esi call _memset mov [rbp+var_4], 0 loc_D653F: mov eax, [rbp+var_4] add rsp, 60h pop rbp retn
long long mi_read_cache(char *a1, const char *a2, unsigned long long a3, unsigned long long a4, char a5) { long long v5; // rcx const char *v6; // rsi unsigned long long v8; // [rsp+8h] [rbp-58h] long long v9; // [rsp+10h] [rbp-50h] unsigned long long v10; // [rsp+18h] [rbp-48h] unsigned long long v11; // [rsp+20h] [rbp-40h] unsigned long long v12; // [rsp+28h] [rbp-38h] long long v13; // [rsp+28h] [rbp-38h] unsigned long long v15; // [rsp+38h] [rbp-28h] unsigned long long v16; // [rsp+40h] [rbp-20h] const char *v17; // [rsp+48h] [rbp-18h] char *v18; // [rsp+50h] [rbp-10h] v18 = a1; v17 = a2; v16 = a3; v15 = a4; if ( a3 < *(_QWORD *)a1 ) { v12 = a4; if ( a4 > *(_QWORD *)a1 - a3 ) v12 = *(_QWORD *)a1 - a3; *((_DWORD *)a1 + 56) = 1; if ( inline_mysql_file_pread_8( (unsigned int)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_cache.c", 53, *((_DWORD *)a1 + 53), (_DWORD)a2, v12, a3, 4LL) ) { return 1; } v15 -= v12; if ( !v15 ) return 0; v16 += v12; v17 = &a2[v12]; } if ( v16 < *(_QWORD *)a1 || (v10 = v16 - *(_QWORD *)a1, v10 >= *((_QWORD *)a1 + 3) - *((_QWORD *)a1 + 5)) ) { v11 = 0LL; } else { v9 = (unsigned int)v10 + *((_QWORD *)a1 + 5); if ( v15 >= *((_QWORD *)a1 + 3) - v9 ) v8 = *((_QWORD *)a1 + 3) - v9; else v8 = v15; v11 = v8; memcpy(v17, (unsigned int)v10 + *((_QWORD *)a1 + 5), v8); v15 -= v8; if ( !v15 ) return 0; v16 += v8; v17 += v8; } if ( (a5 & 1) != 0 ) { if ( v16 == (unsigned int)*((_QWORD *)a1 + 3) - (unsigned int)*((_QWORD *)a1 + 5) + *(_QWORD *)a1 ) { *((_QWORD *)a1 + 2) = *((_QWORD *)a1 + 3); } else { *(_QWORD *)a1 = v16; v5 = *((_QWORD *)a1 + 5); *((_QWORD *)a1 + 3) = v5; *((_QWORD *)a1 + 2) = v5; *((_DWORD *)a1 + 56) = 1; } v6 = v17; if ( !(unsigned int)my_b_read(a1, v17, v15) ) return 0; v13 = *((int *)a1 + 57); } else { *((_DWORD *)a1 + 56) = 1; a1 = "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_cache.c"; v6 = (_BYTE *)(&qword_58 + 5); v13 = inline_mysql_file_pread_8( (unsigned int)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_cache.c", 93, *((_DWORD *)v18 + 53), (_DWORD)v17, v15, v16, 0LL); if ( v13 == v15 ) return 0; } if ( (a5 & 2) != 0 && (_DWORD)v13 != -1 && v11 + v13 >= 3 ) { memset(&v17[v13], 0LL, 20 - v11 - v13); return 0; } else { if ( !*(_DWORD *)my_thread_var(a1, v6) || *(_DWORD *)my_thread_var(a1, v6) == -1 || *(_DWORD *)my_thread_var(a1, v6) == 175 ) { *(_DWORD *)my_thread_var(a1, v6) = 127; } return 1; } }
_mi_read_cache: PUSH RBP MOV RBP,RSP SUB RSP,0x60 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 dword ptr [RBP + -0x2c],R8D JMP 0x001d61fe LAB_001d61fe: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX] JNC 0x001d62c6 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX] SUB RCX,qword ptr [RBP + -0x20] CMP RAX,RCX JBE 0x001d623a MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] SUB RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x38],RAX LAB_001d623a: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xe0],0x1 MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0xd4] MOV RCX,qword ptr [RBP + -0x18] MOV R8,qword ptr [RBP + -0x38] MOV R9,qword ptr [RBP + -0x20] LEA RDI,[0x259bca] MOV ESI,0x35 MOV qword ptr [RSP],0x4 CALL 0x001d6550 CMP RAX,0x0 JZ 0x001d628b JMP 0x001d627f LAB_001d627f: MOV dword ptr [RBP + -0x4],0x1 JMP 0x001d653f LAB_001d628b: MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x28] SUB RAX,RCX MOV qword ptr [RBP + -0x28],RAX CMP RAX,0x0 JNZ 0x001d62ae JMP 0x001d62a2 LAB_001d62a2: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001d653f LAB_001d62ae: MOV RAX,qword ptr [RBP + -0x38] ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x38] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x18],RAX LAB_001d62c6: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX] JC 0x001d63af MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x10] SUB RAX,qword ptr [RCX] MOV qword ptr [RBP + -0x48],RAX MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x18] MOV RDX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RDX + 0x28] SUB RCX,RDX CMP RAX,RCX JNC 0x001d63af MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x28] MOV RCX,qword ptr [RBP + -0x48] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x18] MOV RDX,qword ptr [RBP + -0x50] SUB RCX,RDX CMP RAX,RCX JNC 0x001d6339 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x58],RAX JMP 0x001d634c LAB_001d6339: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RBP + -0x50] SUB RAX,RCX MOV qword ptr [RBP + -0x58],RAX LAB_001d634c: MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x28] MOV RAX,qword ptr [RBP + -0x48] MOV EAX,EAX ADD RSI,RAX MOV RDX,qword ptr [RBP + -0x40] CALL 0x0012a0b0 MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x28] SUB RAX,RCX MOV qword ptr [RBP + -0x28],RAX CMP RAX,0x0 JNZ 0x001d6395 JMP 0x001d6389 LAB_001d6389: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001d653f LAB_001d6395: MOV RAX,qword ptr [RBP + -0x40] ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x40] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x18],RAX JMP 0x001d63b7 LAB_001d63af: MOV qword ptr [RBP + -0x40],0x0 LAB_001d63b7: MOV EAX,dword ptr [RBP + -0x2c] AND EAX,0x1 CMP EAX,0x0 JZ 0x001d6466 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX] MOV RDX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RDX + 0x18] MOV RSI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RSI + 0x28] SUB RDX,RSI MOV EDX,EDX ADD RCX,RDX CMP RAX,RCX JZ 0x001d6421 MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x28] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xe0],0x1 JMP 0x001d6431 LAB_001d6421: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x10],RCX LAB_001d6431: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x28] CALL 0x001e2db0 CMP EAX,0x0 JNZ 0x001d6455 JMP 0x001d6449 LAB_001d6449: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001d653f LAB_001d6455: MOV RAX,qword ptr [RBP + -0x10] MOVSXD RAX,dword ptr [RAX + 0xe4] MOV qword ptr [RBP + -0x38],RAX JMP 0x001d64bf LAB_001d6466: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xe0],0x1 MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0xd4] MOV RCX,qword ptr [RBP + -0x18] MOV R8,qword ptr [RBP + -0x28] MOV R9,qword ptr [RBP + -0x20] LEA RDI,[0x259bca] MOV ESI,0x5d XOR EAX,EAX MOV qword ptr [RSP],0x0 CALL 0x001d6550 MOV qword ptr [RBP + -0x38],RAX CMP RAX,qword ptr [RBP + -0x28] JNZ 0x001d64bd JMP 0x001d64b1 LAB_001d64b1: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001d653f LAB_001d64bd: JMP 0x001d64bf LAB_001d64bf: MOV EAX,dword ptr [RBP + -0x2c] AND EAX,0x2 CMP EAX,0x0 JZ 0x001d64e1 MOV RAX,qword ptr [RBP + -0x38] CMP EAX,-0x1 JZ 0x001d64e1 MOV RAX,qword ptr [RBP + -0x38] ADD RAX,qword ptr [RBP + -0x40] CMP RAX,0x3 JNC 0x001d651c LAB_001d64e1: JMP 0x001d64e3 LAB_001d64e3: JMP 0x001d64e5 LAB_001d64e5: CALL 0x001fc1b0 CMP dword ptr [RAX],0x0 JZ 0x001d6506 CALL 0x001fc1b0 CMP dword ptr [RAX],-0x1 JZ 0x001d6506 CALL 0x001fc1b0 CMP dword ptr [RAX],0xaf JNZ 0x001d6511 LAB_001d6506: CALL 0x001fc1b0 MOV dword ptr [RAX],0x7f LAB_001d6511: JMP 0x001d6513 LAB_001d6513: MOV dword ptr [RBP + -0x4],0x1 JMP 0x001d653f LAB_001d651c: MOV RDI,qword ptr [RBP + -0x18] ADD RDI,qword ptr [RBP + -0x38] MOV EDX,0x14 SUB RDX,qword ptr [RBP + -0x40] SUB RDX,qword ptr [RBP + -0x38] XOR ESI,ESI CALL 0x0012a2a0 MOV dword ptr [RBP + -0x4],0x0 LAB_001d653f: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x60 POP RBP RET
int4 _mi_read_cache(ulong *param_1,void *param_2,ulong param_3,ulong param_4,uint param_5) { int iVar1; long lVar2; ulong uVar3; int *piVar4; int4 *puVar5; size_t local_60; size_t local_48; ulong local_40; ulong local_30; ulong local_28; void *local_20; int4 local_c; local_30 = param_4; local_28 = param_3; local_20 = param_2; if (param_3 < *param_1) { local_40 = param_4; if (*param_1 - param_3 < param_4) { local_40 = *param_1 - param_3; } *(int4 *)(param_1 + 0x1c) = 1; lVar2 = inline_mysql_file_pread ("/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_cache.c",0x35, *(int4 *)((long)param_1 + 0xd4),param_2,local_40,param_3,4); if (lVar2 != 0) { return 1; } local_30 = param_4 - local_40; if (local_30 == 0) { return 0; } local_28 = local_40 + param_3; local_20 = (void *)(local_40 + (long)param_2); } if ((local_28 < *param_1) || (uVar3 = local_28 - *param_1, param_1[3] - param_1[5] <= uVar3)) { local_48 = 0; } else { lVar2 = param_1[5] + (uVar3 & 0xffffffff); if (local_30 < param_1[3] - lVar2) { local_60 = local_30; } else { local_60 = param_1[3] - lVar2; } local_48 = local_60; memcpy(local_20,(void *)(param_1[5] + (uVar3 & 0xffffffff)),local_60); local_30 = local_30 - local_60; if (local_30 == 0) { return 0; } local_28 = local_60 + local_28; local_20 = (void *)(local_60 + (long)local_20); } if ((param_5 & 1) == 0) { *(int4 *)(param_1 + 0x1c) = 1; local_40 = inline_mysql_file_pread ("/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_cache.c",0x5d, *(int4 *)((long)param_1 + 0xd4),local_20,local_30,local_28,0); if (local_40 == local_30) { return 0; } } else { if (local_28 == *param_1 + (ulong)(uint)((int)param_1[3] - (int)param_1[5])) { param_1[2] = param_1[3]; } else { *param_1 = local_28; param_1[3] = param_1[5]; param_1[2] = param_1[5]; *(int4 *)(param_1 + 0x1c) = 1; } iVar1 = _my_b_read(param_1,local_20,local_30); if (iVar1 == 0) { return 0; } local_40 = (ulong)*(int *)((long)param_1 + 0xe4); } if ((((param_5 & 2) == 0) || ((int)local_40 == -1)) || (local_40 + local_48 < 3)) { piVar4 = (int *)_my_thread_var(); if (((*piVar4 == 0) || (piVar4 = (int *)_my_thread_var(), *piVar4 == -1)) || (piVar4 = (int *)_my_thread_var(), *piVar4 == 0xaf)) { puVar5 = (int4 *)_my_thread_var(); *puVar5 = 0x7f; } local_c = 1; } else { memset((void *)((long)local_20 + local_40),0,(0x14 - local_48) - local_40); local_c = 0; } return local_c; }
49,425
my_strnncoll_simple
eloqsql/strings/ctype-simple.c
int my_strnncoll_simple(CHARSET_INFO * cs, const uchar *s, size_t slen, const uchar *t, size_t tlen, my_bool t_is_prefix) { size_t len = ( slen > tlen ) ? tlen : slen; const uchar *map= cs->sort_order; if (t_is_prefix && slen > tlen) slen=tlen; while (len--) { if (map[*s++] != map[*t++]) return ((int) map[s[-1]] - (int) map[t[-1]]); } /* We can't use (slen - tlen) here as the result may be outside of the precision of a signed int */ return slen > tlen ? 1 : slen < tlen ? -1 : 0 ; }
O0
c
my_strnncoll_simple: pushq %rbp movq %rsp, %rbp movb %r9b, %al movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movb %al, -0x31(%rbp) movq -0x20(%rbp), %rax cmpq -0x30(%rbp), %rax jbe 0xf7152 movq -0x30(%rbp), %rax movq %rax, -0x50(%rbp) jmp 0xf715a movq -0x20(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rax movq 0x58(%rax), %rax movq %rax, -0x48(%rbp) movsbl -0x31(%rbp), %eax cmpl $0x0, %eax je 0xf7189 movq -0x20(%rbp), %rax cmpq -0x30(%rbp), %rax jbe 0xf7189 movq -0x30(%rbp), %rax movq %rax, -0x20(%rbp) jmp 0xf718b movq -0x40(%rbp), %rax movq %rax, %rcx addq $-0x1, %rcx movq %rcx, -0x40(%rbp) cmpq $0x0, %rax je 0xf7201 movq -0x48(%rbp), %rax movq -0x18(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x18(%rbp) movzbl (%rcx), %ecx movzbl (%rax,%rcx), %eax movq -0x48(%rbp), %rcx movq -0x28(%rbp), %rdx movq %rdx, %rsi addq $0x1, %rsi movq %rsi, -0x28(%rbp) movzbl (%rdx), %edx movzbl (%rcx,%rdx), %ecx cmpl %ecx, %eax je 0xf71ff movq -0x48(%rbp), %rax movq -0x18(%rbp), %rcx movzbl -0x1(%rcx), %ecx movzbl (%rax,%rcx), %eax movq -0x48(%rbp), %rcx movq -0x28(%rbp), %rdx movzbl -0x1(%rdx), %edx movzbl (%rcx,%rdx), %ecx subl %ecx, %eax movl %eax, -0x4(%rbp) jmp 0xf7233 jmp 0xf718b movq -0x20(%rbp), %rax cmpq -0x30(%rbp), %rax jbe 0xf7215 movl $0x1, %eax movl %eax, -0x54(%rbp) jmp 0xf722d movq -0x20(%rbp), %rdx movq -0x30(%rbp), %rsi xorl %eax, %eax movl $0xffffffff, %ecx # imm = 0xFFFFFFFF cmpq %rsi, %rdx cmovbl %ecx, %eax movl %eax, -0x54(%rbp) movl -0x54(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax,%rax)
my_strnncoll_simple: push rbp mov rbp, rsp mov al, r9b mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov [rbp+var_31], al mov rax, [rbp+var_20] cmp rax, [rbp+var_30] jbe short loc_F7152 mov rax, [rbp+var_30] mov [rbp+var_50], rax jmp short loc_F715A loc_F7152: mov rax, [rbp+var_20] mov [rbp+var_50], rax loc_F715A: mov rax, [rbp+var_50] mov [rbp+var_40], rax mov rax, [rbp+var_10] mov rax, [rax+58h] mov [rbp+var_48], rax movsx eax, [rbp+var_31] cmp eax, 0 jz short loc_F7189 mov rax, [rbp+var_20] cmp rax, [rbp+var_30] jbe short loc_F7189 mov rax, [rbp+var_30] mov [rbp+var_20], rax loc_F7189: jmp short $+2 loc_F718B: mov rax, [rbp+var_40] mov rcx, rax add rcx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_40], rcx cmp rax, 0 jz short loc_F7201 mov rax, [rbp+var_48] mov rcx, [rbp+var_18] mov rdx, rcx add rdx, 1 mov [rbp+var_18], rdx movzx ecx, byte ptr [rcx] movzx eax, byte ptr [rax+rcx] mov rcx, [rbp+var_48] mov rdx, [rbp+var_28] mov rsi, rdx add rsi, 1 mov [rbp+var_28], rsi movzx edx, byte ptr [rdx] movzx ecx, byte ptr [rcx+rdx] cmp eax, ecx jz short loc_F71FF mov rax, [rbp+var_48] mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx-1] movzx eax, byte ptr [rax+rcx] mov rcx, [rbp+var_48] mov rdx, [rbp+var_28] movzx edx, byte ptr [rdx-1] movzx ecx, byte ptr [rcx+rdx] sub eax, ecx mov [rbp+var_4], eax jmp short loc_F7233 loc_F71FF: jmp short loc_F718B loc_F7201: mov rax, [rbp+var_20] cmp rax, [rbp+var_30] jbe short loc_F7215 mov eax, 1 mov [rbp+var_54], eax jmp short loc_F722D loc_F7215: mov rdx, [rbp+var_20] mov rsi, [rbp+var_30] xor eax, eax mov ecx, 0FFFFFFFFh cmp rdx, rsi cmovb eax, ecx mov [rbp+var_54], eax loc_F722D: mov eax, [rbp+var_54] mov [rbp+var_4], eax loc_F7233: mov eax, [rbp+var_4] pop rbp retn
long long my_strnncoll_simple( long long a1, unsigned __int8 *a2, unsigned long long a3, unsigned __int8 *a4, unsigned long long a5, char a6) { unsigned __int8 *v7; // rcx unsigned __int8 *v8; // rdx unsigned int v9; // eax unsigned long long v12; // [rsp+4h] [rbp-50h] long long v13; // [rsp+Ch] [rbp-48h] unsigned long long v14; // [rsp+14h] [rbp-40h] unsigned long long v16; // [rsp+34h] [rbp-20h] v16 = a3; if ( a3 <= a5 ) v12 = a3; else v12 = a5; v14 = v12; v13 = *(_QWORD *)(a1 + 88); if ( a6 && a3 > a5 ) v16 = a5; while ( v14-- ) { v7 = a2++; v8 = a4++; if ( *(unsigned __int8 *)(v13 + *v7) != *(unsigned __int8 *)(v13 + *v8) ) return (unsigned int)(*(unsigned __int8 *)(v13 + *(a2 - 1)) - *(unsigned __int8 *)(v13 + *(a4 - 1))); } if ( v16 <= a5 ) { v9 = 0; if ( v16 < a5 ) v9 = -1; return v9; } else { return 1; } }
my_strnncoll_simple: PUSH RBP MOV RBP,RSP MOV AL,R9B MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV byte ptr [RBP + -0x31],AL MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x30] JBE 0x001f7152 MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x50],RAX JMP 0x001f715a LAB_001f7152: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x50],RAX LAB_001f715a: MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x58] MOV qword ptr [RBP + -0x48],RAX MOVSX EAX,byte ptr [RBP + -0x31] CMP EAX,0x0 JZ 0x001f7189 MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x30] JBE 0x001f7189 MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x20],RAX LAB_001f7189: JMP 0x001f718b LAB_001f718b: MOV RAX,qword ptr [RBP + -0x40] MOV RCX,RAX ADD RCX,-0x1 MOV qword ptr [RBP + -0x40],RCX CMP RAX,0x0 JZ 0x001f7201 MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x18] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0x18],RDX MOVZX ECX,byte ptr [RCX] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV RCX,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x28] MOV RSI,RDX ADD RSI,0x1 MOV qword ptr [RBP + -0x28],RSI MOVZX EDX,byte ptr [RDX] MOVZX ECX,byte ptr [RCX + RDX*0x1] CMP EAX,ECX JZ 0x001f71ff MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + -0x1] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV RCX,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x28] MOVZX EDX,byte ptr [RDX + -0x1] MOVZX ECX,byte ptr [RCX + RDX*0x1] SUB EAX,ECX MOV dword ptr [RBP + -0x4],EAX JMP 0x001f7233 LAB_001f71ff: JMP 0x001f718b LAB_001f7201: MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x30] JBE 0x001f7215 MOV EAX,0x1 MOV dword ptr [RBP + -0x54],EAX JMP 0x001f722d LAB_001f7215: MOV RDX,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x30] XOR EAX,EAX MOV ECX,0xffffffff CMP RDX,RSI CMOVC EAX,ECX MOV dword ptr [RBP + -0x54],EAX LAB_001f722d: MOV EAX,dword ptr [RBP + -0x54] MOV dword ptr [RBP + -0x4],EAX LAB_001f7233: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int my_strnncoll_simple(long param_1,byte *param_2,ulong param_3,byte *param_4,ulong param_5, char param_6) { long lVar1; byte *pbVar2; byte *pbVar3; int local_5c; ulong local_58; ulong local_48; byte *local_30; ulong local_28; byte *local_20; local_58 = param_3; if (param_5 < param_3) { local_58 = param_5; } local_48 = local_58; lVar1 = *(long *)(param_1 + 0x58); pbVar2 = param_4; pbVar3 = param_2; local_28 = param_3; if ((param_6 != '\0') && (pbVar2 = param_4, pbVar3 = param_2, param_5 < param_3)) { pbVar2 = param_4; pbVar3 = param_2; local_28 = param_5; } do { local_20 = pbVar3; local_30 = pbVar2; if (local_48 == 0) { if (param_5 < local_28) { local_5c = 1; } else { local_5c = 0; if (local_28 < param_5) { local_5c = -1; } } return local_5c; } local_48 = local_48 - 1; pbVar2 = local_30 + 1; pbVar3 = local_20 + 1; } while (*(char *)(lVar1 + (ulong)*local_20) == *(char *)(lVar1 + (ulong)*local_30)); return (uint)*(byte *)(lVar1 + (ulong)*local_20) - (uint)*(byte *)(lVar1 + (ulong)*local_30); }
49,426
my_strnncoll_simple
eloqsql/strings/ctype-simple.c
int my_strnncoll_simple(CHARSET_INFO * cs, const uchar *s, size_t slen, const uchar *t, size_t tlen, my_bool t_is_prefix) { size_t len = ( slen > tlen ) ? tlen : slen; const uchar *map= cs->sort_order; if (t_is_prefix && slen > tlen) slen=tlen; while (len--) { if (map[*s++] != map[*t++]) return ((int) map[s[-1]] - (int) map[t[-1]]); } /* We can't use (slen - tlen) here as the result may be outside of the precision of a signed int */ return slen > tlen ? 1 : slen < tlen ? -1 : 0 ; }
O3
c
my_strnncoll_simple: pushq %rbp movq %rsp, %rbp cmpq %r8, %rdx movq %r8, %r10 cmovbq %rdx, %r10 movq 0x58(%rdi), %rdi testb %r9b, %r9b cmovneq %r10, %rdx xorl %r9d, %r9d cmpq %r9, %r10 je 0xbac8e movzbl (%rsi,%r9), %eax movzbl (%rdi,%rax), %eax movzbl (%rcx,%r9), %r11d movzbl (%rdi,%r11), %r11d incq %r9 cmpb %r11b, %al je 0xbac69 subl %r11d, %eax jmp 0xbaca0 xorl %ecx, %ecx cmpq %r8, %rdx sbbl %ecx, %ecx cmpq %r8, %rdx movl $0x1, %eax cmovbel %ecx, %eax popq %rbp retq
my_strnncoll_simple: push rbp mov rbp, rsp cmp rdx, r8 mov r10, r8 cmovb r10, rdx mov rdi, [rdi+58h] test r9b, r9b cmovnz rdx, r10 xor r9d, r9d loc_BAC69: cmp r10, r9 jz short loc_BAC8E movzx eax, byte ptr [rsi+r9] movzx eax, byte ptr [rdi+rax] movzx r11d, byte ptr [rcx+r9] movzx r11d, byte ptr [rdi+r11] inc r9 cmp al, r11b jz short loc_BAC69 sub eax, r11d jmp short loc_BACA0 loc_BAC8E: xor ecx, ecx cmp rdx, r8 sbb ecx, ecx cmp rdx, r8 mov eax, 1 cmovbe eax, ecx loc_BACA0: pop rbp retn
long long my_strnncoll_simple( long long a1, long long a2, unsigned long long a3, long long a4, unsigned long long a5, char a6) { unsigned long long v6; // r10 long long v7; // rdi long long v8; // r9 int v9; // eax int v10; // r11d long long result; // rax v6 = a5; if ( a3 < a5 ) v6 = a3; v7 = *(_QWORD *)(a1 + 88); if ( a6 ) a3 = v6; v8 = 0LL; while ( v6 != v8 ) { v9 = *(unsigned __int8 *)(v7 + *(unsigned __int8 *)(a2 + v8)); v10 = *(unsigned __int8 *)(v7 + *(unsigned __int8 *)(a4 + v8++)); if ( (_BYTE)v9 != (_BYTE)v10 ) return (unsigned int)(v9 - v10); } result = 1LL; if ( a3 <= a5 ) return (unsigned int)-(a3 < a5); return result; }
my_strnncoll_simple: PUSH RBP MOV RBP,RSP CMP RDX,R8 MOV R10,R8 CMOVC R10,RDX MOV RDI,qword ptr [RDI + 0x58] TEST R9B,R9B CMOVNZ RDX,R10 XOR R9D,R9D LAB_001bac69: CMP R10,R9 JZ 0x001bac8e MOVZX EAX,byte ptr [RSI + R9*0x1] MOVZX EAX,byte ptr [RDI + RAX*0x1] MOVZX R11D,byte ptr [RCX + R9*0x1] MOVZX R11D,byte ptr [RDI + R11*0x1] INC R9 CMP AL,R11B JZ 0x001bac69 SUB EAX,R11D JMP 0x001baca0 LAB_001bac8e: XOR ECX,ECX CMP RDX,R8 SBB ECX,ECX CMP RDX,R8 MOV EAX,0x1 CMOVBE EAX,ECX LAB_001baca0: POP RBP RET
int my_strnncoll_simple(long param_1,long param_2,ulong param_3,long param_4,ulong param_5, char param_6) { byte bVar1; byte bVar2; ulong uVar3; ulong uVar4; uVar4 = param_5; if (param_3 < param_5) { uVar4 = param_3; } if (param_6 != '\0') { param_3 = uVar4; } uVar3 = 0; do { if (uVar4 == uVar3) { if (param_5 < param_3) { return 1; } return -(uint)(param_3 < param_5); } bVar1 = *(byte *)(*(long *)(param_1 + 0x58) + (ulong)*(byte *)(param_2 + uVar3)); bVar2 = *(byte *)(*(long *)(param_1 + 0x58) + (ulong)*(byte *)(param_4 + uVar3)); uVar3 = uVar3 + 1; } while (bVar1 == bVar2); return (uint)bVar1 - (uint)bVar2; }
49,427
chess::Board::zobrist() const
Razamindset[P]pawnstar-chess-engine/src/./engine/../chess-library/include/chess.hpp
[[nodiscard]] U64 zobrist() const { U64 hash_key = 0ULL; auto wPieces = us(Color::WHITE); auto bPieces = us(Color::BLACK); while (wPieces.getBits()) { const Square sq = wPieces.pop(); hash_key ^= Zobrist::piece(at(sq), sq); } while (bPieces.getBits()) { const Square sq = bPieces.pop(); hash_key ^= Zobrist::piece(at(sq), sq); } U64 ep_hash = 0ULL; if (ep_sq_ != Square::underlying::NO_SQ) ep_hash ^= Zobrist::enpassant(ep_sq_.file()); U64 stm_hash = 0ULL; if (stm_ == Color::WHITE) stm_hash ^= Zobrist::sideToMove(); U64 castling_hash = 0ULL; castling_hash ^= Zobrist::castling(cr_.hashIndex()); return hash_key ^ ep_hash ^ stm_hash ^ castling_hash; }
O0
cpp
chess::Board::zobrist() const: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x80(%rbp) movq $0x0, -0x10(%rbp) leaq -0x19(%rbp), %rdi xorl %esi, %esi callq 0x5e10 movq -0x80(%rbp), %rdi movzbl -0x19(%rbp), %esi callq 0xa790 movq %rax, -0x18(%rbp) leaq -0x29(%rbp), %rdi movl $0x1, %esi callq 0x5e10 movq -0x80(%rbp), %rdi movzbl -0x29(%rbp), %esi callq 0xa790 movq %rax, -0x28(%rbp) leaq -0x18(%rbp), %rdi callq 0x4dc0 cmpq $0x0, %rax je 0x8cf1 leaq -0x18(%rbp), %rdi callq 0xb9a0 movzbl %al, %esi leaq -0x30(%rbp), %rdi callq 0x43a0 movq -0x80(%rbp), %rdi movl -0x30(%rbp), %eax movl %eax, -0x38(%rbp) movl -0x38(%rbp), %esi callq 0xa5b0 movb %al, -0x31(%rbp) movl -0x30(%rbp), %eax movl %eax, -0x3c(%rbp) movb -0x31(%rbp), %al movl -0x3c(%rbp), %esi movzbl %al, %edi callq 0x8060 xorq -0x10(%rbp), %rax movq %rax, -0x10(%rbp) jmp 0x8c9a jmp 0x8cf3 leaq -0x28(%rbp), %rdi callq 0x4dc0 cmpq $0x0, %rax je 0x8d4a leaq -0x28(%rbp), %rdi callq 0xb9a0 movzbl %al, %esi leaq -0x40(%rbp), %rdi callq 0x43a0 movq -0x80(%rbp), %rdi movl -0x40(%rbp), %eax movl %eax, -0x48(%rbp) movl -0x48(%rbp), %esi callq 0xa5b0 movb %al, -0x41(%rbp) movl -0x40(%rbp), %eax movl %eax, -0x4c(%rbp) movb -0x41(%rbp), %al movl -0x4c(%rbp), %esi movzbl %al, %edi callq 0x8060 xorq -0x10(%rbp), %rax movq %rax, -0x10(%rbp) jmp 0x8cf3 movq -0x80(%rbp), %rax movq $0x0, -0x58(%rbp) addq $0xb0, %rax movq %rax, -0x88(%rbp) leaq -0x5c(%rbp), %rdi movl $0x40, %esi callq 0x5e80 movq -0x88(%rbp), %rdi leaq -0x5c(%rbp), %rsi callq 0x84a0 testb $0x1, %al jne 0x8d87 jmp 0x8dab movq -0x80(%rbp), %rdi addq $0xb0, %rdi callq 0x4d00 movb %al, -0x5d(%rbp) movzbl -0x5d(%rbp), %edi callq 0x8aa0 xorq -0x58(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x80(%rbp), %rax movq $0x0, -0x68(%rbp) addq $0xae, %rax movq %rax, -0x90(%rbp) leaq -0x69(%rbp), %rdi xorl %esi, %esi callq 0x5e10 movq -0x90(%rbp), %rdi leaq -0x69(%rbp), %rsi callq 0x7da0 testb $0x1, %al jne 0x8de5 jmp 0x8df2 callq 0x7dc0 xorq -0x68(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x80(%rbp), %rdi movq $0x0, -0x78(%rbp) addq $0xa8, %rdi callq 0x8b70 movl %eax, %edi callq 0x8b00 xorq -0x78(%rbp), %rax movq %rax, -0x78(%rbp) movq -0x10(%rbp), %rax xorq -0x58(%rbp), %rax xorq -0x68(%rbp), %rax xorq -0x78(%rbp), %rax addq $0x90, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
_ZNK5chess5Board7zobristEv: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_80], rax mov [rbp+var_10], 0 lea rdi, [rbp+var_19] xor esi, esi call _ZN5chess5ColorC2ENS0_10underlyingE; chess::Color::Color(chess::Color::underlying) mov rdi, [rbp+var_80] movzx esi, [rbp+var_19] call _ZNK5chess5Board2usENS_5ColorE; chess::Board::us(chess::Color) mov [rbp+var_18], rax lea rdi, [rbp+var_29] mov esi, 1 call _ZN5chess5ColorC2ENS0_10underlyingE; chess::Color::Color(chess::Color::underlying) mov rdi, [rbp+var_80] movzx esi, [rbp+var_29] call _ZNK5chess5Board2usENS_5ColorE; chess::Board::us(chess::Color) mov [rbp+var_28], rax loc_8C9A: lea rdi, [rbp+var_18]; this call _ZNK5chess8Bitboard7getBitsEv; chess::Bitboard::getBits(void) cmp rax, 0 jz short loc_8CF1 lea rdi, [rbp+var_18]; this call _ZN5chess8Bitboard3popEv; chess::Bitboard::pop(void) movzx esi, al; int lea rdi, [rbp+var_30]; this call _ZN5chess6SquareC2Ei; chess::Square::Square(int) mov rdi, [rbp+var_80] mov eax, [rbp+var_30] mov [rbp+var_38], eax mov esi, [rbp+var_38] call _ZNK5chess5Board2atINS_5PieceEEET_NS_6SquareE; chess::Board::at<chess::Piece>(chess::Square) mov [rbp+var_31], al mov eax, [rbp+var_30] mov [rbp+var_3C], eax mov al, [rbp+var_31] mov esi, [rbp+var_3C] movzx edi, al call _ZN5chess7Zobrist5pieceENS_5PieceENS_6SquareE; chess::Zobrist::piece(chess::Piece,chess::Square) xor rax, [rbp+var_10] mov [rbp+var_10], rax jmp short loc_8C9A loc_8CF1: jmp short $+2 loc_8CF3: lea rdi, [rbp+var_28]; this call _ZNK5chess8Bitboard7getBitsEv; chess::Bitboard::getBits(void) cmp rax, 0 jz short loc_8D4A lea rdi, [rbp+var_28]; this call _ZN5chess8Bitboard3popEv; chess::Bitboard::pop(void) movzx esi, al; int lea rdi, [rbp+var_40]; this call _ZN5chess6SquareC2Ei; chess::Square::Square(int) mov rdi, [rbp+var_80] mov eax, [rbp+var_40] mov [rbp+var_48], eax mov esi, [rbp+var_48] call _ZNK5chess5Board2atINS_5PieceEEET_NS_6SquareE; chess::Board::at<chess::Piece>(chess::Square) mov [rbp+var_41], al mov eax, [rbp+var_40] mov [rbp+var_4C], eax mov al, [rbp+var_41] mov esi, [rbp+var_4C] movzx edi, al call _ZN5chess7Zobrist5pieceENS_5PieceENS_6SquareE; chess::Zobrist::piece(chess::Piece,chess::Square) xor rax, [rbp+var_10] mov [rbp+var_10], rax jmp short loc_8CF3 loc_8D4A: mov rax, [rbp+var_80] mov [rbp+var_58], 0 add rax, 0B0h mov [rbp+var_88], rax lea rdi, [rbp+var_5C] mov esi, 40h ; '@' call _ZN5chess6SquareC2ENS0_10underlyingE; chess::Square::Square(chess::Square::underlying) mov rdi, [rbp+var_88] lea rsi, [rbp+var_5C] call _ZNK5chess6SquareneERKS0_; chess::Square::operator!=(chess::Square const&) test al, 1 jnz short loc_8D87 jmp short loc_8DAB loc_8D87: mov rdi, [rbp+var_80] add rdi, 0B0h; this call _ZNK5chess6Square4fileEv; chess::Square::file(void) mov [rbp+var_5D], al movzx edi, [rbp+var_5D] call _ZN5chess7Zobrist9enpassantENS_4FileE; chess::Zobrist::enpassant(chess::File) xor rax, [rbp+var_58] mov [rbp+var_58], rax loc_8DAB: mov rax, [rbp+var_80] mov qword ptr [rbp+var_69+1], 0 add rax, 0AEh mov [rbp+var_90], rax lea rdi, [rbp+var_69] xor esi, esi call _ZN5chess5ColorC2ENS0_10underlyingE; chess::Color::Color(chess::Color::underlying) mov rdi, [rbp+var_90]; this lea rsi, [rbp+var_69]; int call _ZNK5chess5ColoreqERKS0_; chess::Color::operator==(chess::Color const&) test al, 1 jnz short loc_8DE5 jmp short loc_8DF2 loc_8DE5: call _ZN5chess7Zobrist10sideToMoveEv; chess::Zobrist::sideToMove(void) xor rax, qword ptr [rbp+var_69+1] mov qword ptr [rbp+var_69+1], rax loc_8DF2: mov rdi, [rbp+var_80] mov [rbp+var_78], 0 add rdi, 0A8h; this call _ZNK5chess5Board14CastlingRights9hashIndexEv; chess::Board::CastlingRights::hashIndex(void) mov edi, eax; this call _ZN5chess7Zobrist8castlingEi; chess::Zobrist::castling(int) xor rax, [rbp+var_78] mov [rbp+var_78], rax mov rax, [rbp+var_10] xor rax, [rbp+var_58] xor rax, qword ptr [rbp+var_69+1] xor rax, [rbp+var_78] add rsp, 90h pop rbp retn
long long chess::Board::zobrist(chess::Board *this) { unsigned __int8 v1; // al unsigned __int8 v2; // al long long v3; // rax unsigned int v4; // eax _BYTE v6[12]; // [rsp+27h] [rbp-69h] BYREF char v7; // [rsp+33h] [rbp-5Dh] int v8; // [rsp+34h] [rbp-5Ch] BYREF long long v9; // [rsp+38h] [rbp-58h] int v10; // [rsp+44h] [rbp-4Ch] int v11; // [rsp+48h] [rbp-48h] char v12; // [rsp+4Fh] [rbp-41h] int v13[3]; // [rsp+50h] [rbp-40h] BYREF char v14; // [rsp+5Fh] [rbp-31h] unsigned int v15; // [rsp+60h] [rbp-30h] BYREF unsigned __int8 v16; // [rsp+67h] [rbp-29h] BYREF long long v17; // [rsp+68h] [rbp-28h] BYREF unsigned __int8 v18; // [rsp+77h] [rbp-19h] BYREF long long v19; // [rsp+78h] [rbp-18h] BYREF long long v20; // [rsp+80h] [rbp-10h] chess::Board *v21; // [rsp+88h] [rbp-8h] v21 = this; v20 = 0LL; chess::Color::Color(&v18, 0); v19 = chess::Board::us(this, v18); chess::Color::Color(&v16, 1); v17 = chess::Board::us(this, v16); while ( chess::Bitboard::getBits((chess::Bitboard *)&v19) ) { v1 = chess::Bitboard::pop((chess::Bitboard *)&v19); chess::Square::Square((chess::Square *)&v15, v1); v13[2] = v15; v14 = chess::Board::at<chess::Piece>(this, v15); v13[1] = v15; v20 ^= chess::Zobrist::piece(v14, v15); } while ( chess::Bitboard::getBits((chess::Bitboard *)&v17) ) { v2 = chess::Bitboard::pop((chess::Bitboard *)&v17); chess::Square::Square((chess::Square *)v13, v2); v11 = v13[0]; v12 = chess::Board::at<chess::Piece>(this, (unsigned int)v13[0]); v10 = v13[0]; v20 ^= chess::Zobrist::piece(v12, v13[0]); } v9 = 0LL; chess::Square::Square(&v8, 64); if ( chess::Square::operator!=((_DWORD *)this + 44, &v8) ) { v7 = chess::Square::file((chess::Board *)((char *)this + 176)); v9 ^= chess::Zobrist::enpassant(v7); } *(_QWORD *)&v6[1] = 0LL; chess::Color::Color(v6, 0); if ( chess::Color::operator==((_BYTE *)this + 174, v6) ) { v3 = chess::Zobrist::sideToMove((chess::Board *)((char *)this + 174)); *(_QWORD *)&v6[1] ^= v3; } v4 = chess::Board::CastlingRights::hashIndex((chess::Board *)((char *)this + 168)); return chess::Zobrist::castling((chess::Zobrist *)v4) ^ *(_QWORD *)&v6[1] ^ v9 ^ v20; }
zobrist: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x80],RAX MOV qword ptr [RBP + -0x10],0x0 LEA RDI,[RBP + -0x19] XOR ESI,ESI CALL 0x00105e10 MOV RDI,qword ptr [RBP + -0x80] MOVZX ESI,byte ptr [RBP + -0x19] CALL 0x0010a790 MOV qword ptr [RBP + -0x18],RAX LEA RDI,[RBP + -0x29] MOV ESI,0x1 CALL 0x00105e10 MOV RDI,qword ptr [RBP + -0x80] MOVZX ESI,byte ptr [RBP + -0x29] CALL 0x0010a790 MOV qword ptr [RBP + -0x28],RAX LAB_00108c9a: LEA RDI,[RBP + -0x18] CALL 0x00104dc0 CMP RAX,0x0 JZ 0x00108cf1 LEA RDI,[RBP + -0x18] CALL 0x0010b9a0 MOVZX ESI,AL LEA RDI,[RBP + -0x30] CALL 0x001043a0 MOV RDI,qword ptr [RBP + -0x80] MOV EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x38],EAX MOV ESI,dword ptr [RBP + -0x38] CALL 0x0010a5b0 MOV byte ptr [RBP + -0x31],AL MOV EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x3c],EAX MOV AL,byte ptr [RBP + -0x31] MOV ESI,dword ptr [RBP + -0x3c] MOVZX EDI,AL CALL 0x00108060 XOR RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108c9a LAB_00108cf1: JMP 0x00108cf3 LAB_00108cf3: LEA RDI,[RBP + -0x28] CALL 0x00104dc0 CMP RAX,0x0 JZ 0x00108d4a LEA RDI,[RBP + -0x28] CALL 0x0010b9a0 MOVZX ESI,AL LEA RDI,[RBP + -0x40] CALL 0x001043a0 MOV RDI,qword ptr [RBP + -0x80] MOV EAX,dword ptr [RBP + -0x40] MOV dword ptr [RBP + -0x48],EAX MOV ESI,dword ptr [RBP + -0x48] CALL 0x0010a5b0 MOV byte ptr [RBP + -0x41],AL MOV EAX,dword ptr [RBP + -0x40] MOV dword ptr [RBP + -0x4c],EAX MOV AL,byte ptr [RBP + -0x41] MOV ESI,dword ptr [RBP + -0x4c] MOVZX EDI,AL CALL 0x00108060 XOR RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x10],RAX JMP 0x00108cf3 LAB_00108d4a: MOV RAX,qword ptr [RBP + -0x80] MOV qword ptr [RBP + -0x58],0x0 ADD RAX,0xb0 MOV qword ptr [RBP + -0x88],RAX LEA RDI,[RBP + -0x5c] MOV ESI,0x40 CALL 0x00105e80 MOV RDI,qword ptr [RBP + -0x88] LEA RSI,[RBP + -0x5c] CALL 0x001084a0 TEST AL,0x1 JNZ 0x00108d87 JMP 0x00108dab LAB_00108d87: MOV RDI,qword ptr [RBP + -0x80] ADD RDI,0xb0 CALL 0x00104d00 MOV byte ptr [RBP + -0x5d],AL MOVZX EDI,byte ptr [RBP + -0x5d] CALL 0x00108aa0 XOR RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x58],RAX LAB_00108dab: MOV RAX,qword ptr [RBP + -0x80] MOV qword ptr [RBP + -0x68],0x0 ADD RAX,0xae MOV qword ptr [RBP + -0x90],RAX LEA RDI,[RBP + -0x69] XOR ESI,ESI CALL 0x00105e10 MOV RDI,qword ptr [RBP + -0x90] LEA RSI,[RBP + -0x69] CALL 0x00107da0 TEST AL,0x1 JNZ 0x00108de5 JMP 0x00108df2 LAB_00108de5: CALL 0x00107dc0 XOR RAX,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0x68],RAX LAB_00108df2: MOV RDI,qword ptr [RBP + -0x80] MOV qword ptr [RBP + -0x78],0x0 ADD RDI,0xa8 CALL 0x00108b70 MOV EDI,EAX CALL 0x00108b00 XOR RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x10] XOR RAX,qword ptr [RBP + -0x58] XOR RAX,qword ptr [RBP + -0x68] XOR RAX,qword ptr [RBP + -0x78] ADD RSP,0x90 POP RBP RET
/* chess::Board::zobrist() const */ ulong __thiscall chess::Board::zobrist(Board *this) { byte bVar1; int iVar2; long lVar3; ulong uVar4; Color local_71; ulong local_70; int1 local_65; Square local_64 [4]; ulong local_60; int4 local_54; int4 local_50; int1 local_49; int4 local_48; int4 local_44; int4 local_40; int1 local_39; int4 local_38; Color local_31; int8 local_30; Color local_21; int8 local_20; ulong local_18; Board *local_10; local_18 = 0; local_10 = this; Color::Color(&local_21,0); local_20 = us(this,local_21); Color::Color(&local_31,1); local_30 = us(this,local_31); while (lVar3 = Bitboard::getBits((Bitboard *)&local_20), lVar3 != 0) { bVar1 = Bitboard::pop((Bitboard *)&local_20); Square::Square((Square *)&local_38,(uint)bVar1); local_40 = local_38; local_39 = at<chess::Piece>(this,local_38); local_44 = local_38; uVar4 = Zobrist::piece(local_39,local_38); local_18 = uVar4 ^ local_18; } while (lVar3 = Bitboard::getBits((Bitboard *)&local_30), lVar3 != 0) { bVar1 = Bitboard::pop((Bitboard *)&local_30); Square::Square((Square *)&local_48,(uint)bVar1); local_50 = local_48; local_49 = at<chess::Piece>(this,local_48); local_54 = local_48; uVar4 = Zobrist::piece(local_49,local_48); local_18 = uVar4 ^ local_18; } local_60 = 0; Square::Square(local_64,0x40); uVar4 = Square::operator!=((Square *)(this + 0xb0),local_64); if ((uVar4 & 1) != 0) { local_65 = Square::file((Square *)(this + 0xb0)); uVar4 = Zobrist::enpassant(local_65); local_60 = uVar4 ^ local_60; } local_70 = 0; Color::Color(&local_71,0); uVar4 = Color::operator==((Color *)(this + 0xae),&local_71); if ((uVar4 & 1) != 0) { uVar4 = Zobrist::sideToMove(); local_70 = uVar4 ^ local_70; } iVar2 = CastlingRights::hashIndex((CastlingRights *)(this + 0xa8)); uVar4 = Zobrist::castling(iVar2); return local_18 ^ local_60 ^ local_70 ^ uVar4; }
49,428
chess::Board::zobrist() const
Razamindset[P]pawnstar-chess-engine/src/./engine/../chess-library/include/chess.hpp
[[nodiscard]] U64 zobrist() const { U64 hash_key = 0ULL; auto wPieces = us(Color::WHITE); auto bPieces = us(Color::BLACK); while (wPieces.getBits()) { const Square sq = wPieces.pop(); hash_key ^= Zobrist::piece(at(sq), sq); } while (bPieces.getBits()) { const Square sq = bPieces.pop(); hash_key ^= Zobrist::piece(at(sq), sq); } U64 ep_hash = 0ULL; if (ep_sq_ != Square::underlying::NO_SQ) ep_hash ^= Zobrist::enpassant(ep_sq_.file()); U64 stm_hash = 0ULL; if (stm_ == Color::WHITE) stm_hash ^= Zobrist::sideToMove(); U64 castling_hash = 0ULL; castling_hash ^= Zobrist::castling(cr_.hashIndex()); return hash_key ^ ep_hash ^ stm_hash ^ castling_hash; }
O1
cpp
chess::Board::zobrist() const: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdi, %rbx movq 0x50(%rdi), %r12 movq 0x58(%rdi), %r15 xorl %r14d, %r14d testq %r12, %r12 je 0x5025 bsfq %r12, %rsi leaq -0x1(%r12), %r13 movzbl 0x60(%rbx,%rsi), %edi callq 0x4a12 xorq %rax, %r14 andq %r13, %r12 jne 0x500a testq %r15, %r15 je 0x5044 bsfq %r15, %rsi leaq -0x1(%r15), %r12 movzbl 0x60(%rbx,%rsi), %edi callq 0x4a12 xorq %rax, %r14 andq %r12, %r15 jne 0x502a movl 0xb0(%rbx), %eax cmpq $0x40, %rax jne 0x5054 xorl %eax, %eax jmp 0x5066 andl $0x7, %eax leaq 0x9bb2(%rip), %rcx # 0xec10 movq 0x1820(%rcx,%rax,8), %rax xorl %edx, %edx cmpb $0x8, 0xa9(%rbx) setne %dl xorl %esi, %esi cmpb $0x8, 0xa8(%rbx) setne %sil xorl %edi, %edi cmpb $0x8, 0xaa(%rbx) setne %dil xorl %ecx, %ecx cmpb $0x8, 0xab(%rbx) setne %cl xorl %r8d, %r8d cmpb $0x0, 0xae(%rbx) movabsq $-0x729d95550d87af7, %r9 # imm = 0xF8D626AAAF278509 cmovneq %r8, %r9 shll $0x4, %edx leal (%rdx,%rsi,8), %edx shll $0x5, %edi orl %edx, %edi shll $0x6, %ecx orl %edi, %ecx leaq 0xb9e9(%rip), %rdx # 0x10ab0 xorq %r14, %rax xorq (%rcx,%rdx), %rax xorq %r9, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq nop
_ZNK5chess5Board7zobristEv: push r15 push r14 push r13 push r12 push rbx mov rbx, rdi mov r12, [rdi+50h] mov r15, [rdi+58h] xor r14d, r14d test r12, r12 jz short loc_5025 loc_500A: bsf rsi, r12 lea r13, [r12-1] movzx edi, byte ptr [rbx+rsi+60h] call _ZN5chess7Zobrist5pieceENS_5PieceENS_6SquareE; chess::Zobrist::piece(chess::Piece,chess::Square) xor r14, rax and r12, r13 jnz short loc_500A loc_5025: test r15, r15 jz short loc_5044 loc_502A: bsf rsi, r15 lea r12, [r15-1] movzx edi, byte ptr [rbx+rsi+60h] call _ZN5chess7Zobrist5pieceENS_5PieceENS_6SquareE; chess::Zobrist::piece(chess::Piece,chess::Square) xor r14, rax and r15, r12 jnz short loc_502A loc_5044: mov eax, [rbx+0B0h] cmp rax, 40h ; '@' jnz short loc_5054 xor eax, eax jmp short loc_5066 loc_5054: and eax, 7 lea rcx, _ZN5chess7Zobrist12RANDOM_ARRAYE; chess::Zobrist::RANDOM_ARRAY mov rax, [rcx+rax*8+1820h] loc_5066: xor edx, edx cmp byte ptr [rbx+0A9h], 8 setnz dl xor esi, esi cmp byte ptr [rbx+0A8h], 8 setnz sil xor edi, edi cmp byte ptr [rbx+0AAh], 8 setnz dil xor ecx, ecx cmp byte ptr [rbx+0ABh], 8 setnz cl xor r8d, r8d cmp byte ptr [rbx+0AEh], 0 mov r9, 0F8D626AAAF278509h cmovnz r9, r8 shl edx, 4 lea edx, [rdx+rsi*8] shl edi, 5 or edi, edx shl ecx, 6 or ecx, edi lea rdx, _ZN5chess7Zobrist11castlingKeyE; chess::Zobrist::castlingKey xor rax, r14 xor rax, [rcx+rdx] xor rax, r9 pop rbx pop r12 pop r13 pop r14 pop r15 retn
unsigned long long chess::Board::zobrist(chess::Board *this) { unsigned long long v2; // r12 unsigned long long v3; // r15 long long i; // r14 unsigned long long v5; // rsi unsigned long long v6; // rsi long long v7; // rax long long v8; // rax BOOL v9; // edx BOOL v10; // esi BOOL v11; // edi unsigned long long v12; // r9 v2 = *((_QWORD *)this + 10); v3 = *((_QWORD *)this + 11); for ( i = 0LL; v2; v2 &= v2 - 1 ) { _BitScanForward64(&v5, v2); i ^= chess::Zobrist::piece(*((_BYTE *)this + v5 + 96), v5); } for ( ; v3; v3 &= v3 - 1 ) { _BitScanForward64(&v6, v3); i ^= chess::Zobrist::piece(*((_BYTE *)this + v6 + 96), v6); } v7 = *((unsigned int *)this + 44); if ( v7 == 64 ) v8 = 0LL; else v8 = chess::Zobrist::RANDOM_ARRAY[(v7 & 7) + 772]; v9 = *((_BYTE *)this + 169) != 8; v10 = *((_BYTE *)this + 168) != 8; v11 = *((_BYTE *)this + 170) != 8; v12 = 0xF8D626AAAF278509LL; if ( *((_BYTE *)this + 174) ) v12 = 0LL; return v12 ^ *(_QWORD *)((char *)&chess::Zobrist::castlingKey + ((16 * v9 + 8 * v10) | (32 * v11) | ((unsigned __int8)(*((_BYTE *)this + 171) != 8) << 6))) ^ i ^ v8; }
zobrist: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV RBX,RDI MOV R12,qword ptr [RDI + 0x50] MOV R15,qword ptr [RDI + 0x58] XOR R14D,R14D TEST R12,R12 JZ 0x00105025 LAB_0010500a: BSF RSI,R12 LEA R13,[R12 + -0x1] MOVZX EDI,byte ptr [RBX + RSI*0x1 + 0x60] CALL 0x00104a12 XOR R14,RAX AND R12,R13 JNZ 0x0010500a LAB_00105025: TEST R15,R15 JZ 0x00105044 LAB_0010502a: BSF RSI,R15 LEA R12,[R15 + -0x1] MOVZX EDI,byte ptr [RBX + RSI*0x1 + 0x60] CALL 0x00104a12 XOR R14,RAX AND R15,R12 JNZ 0x0010502a LAB_00105044: MOV EAX,dword ptr [RBX + 0xb0] CMP RAX,0x40 JNZ 0x00105054 XOR EAX,EAX JMP 0x00105066 LAB_00105054: AND EAX,0x7 LEA RCX,[0x10ec10] MOV RAX,qword ptr [RCX + RAX*0x8 + 0x1820] LAB_00105066: XOR EDX,EDX CMP byte ptr [RBX + 0xa9],0x8 SETNZ DL XOR ESI,ESI CMP byte ptr [RBX + 0xa8],0x8 SETNZ SIL XOR EDI,EDI CMP byte ptr [RBX + 0xaa],0x8 SETNZ DIL XOR ECX,ECX CMP byte ptr [RBX + 0xab],0x8 SETNZ CL XOR R8D,R8D CMP byte ptr [RBX + 0xae],0x0 MOV R9,-0x729d95550d87af7 CMOVNZ R9,R8 SHL EDX,0x4 LEA EDX,[RDX + RSI*0x8] SHL EDI,0x5 OR EDI,EDX SHL ECX,0x6 OR ECX,EDI LEA RDX,[0x110ab0] XOR RAX,R14 XOR RAX,qword ptr [RCX + RDX*0x1] XOR RAX,R9 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* chess::Board::zobrist() const */ ulong __thiscall chess::Board::zobrist(Board *this) { long lVar1; ulong uVar2; ulong uVar3; ulong uVar4; ulong uVar5; uVar5 = *(ulong *)(this + 0x58); uVar4 = 0; for (uVar3 = *(ulong *)(this + 0x50); uVar3 != 0; uVar3 = uVar3 & uVar3 - 1) { lVar1 = 0; if (uVar3 != 0) { for (; (uVar3 >> lVar1 & 1) == 0; lVar1 = lVar1 + 1) { } } uVar2 = Zobrist::piece(this[lVar1 + 0x60]); uVar4 = uVar4 ^ uVar2; } for (; uVar5 != 0; uVar5 = uVar5 & uVar5 - 1) { lVar1 = 0; if (uVar5 != 0) { for (; (uVar5 >> lVar1 & 1) == 0; lVar1 = lVar1 + 1) { } } uVar3 = Zobrist::piece(this[lVar1 + 0x60]); uVar4 = uVar4 ^ uVar3; } if (*(uint *)(this + 0xb0) == 0x40) { uVar3 = 0; } else { uVar3 = *(ulong *)(Zobrist::RANDOM_ARRAY + (ulong)(*(uint *)(this + 0xb0) & 7) * 8 + 0x1820); } uVar5 = 0xf8d626aaaf278509; if (this[0xae] != (Board)0x0) { uVar5 = 0; } return uVar3 ^ uVar4 ^ *(ulong *)(Zobrist::castlingKey + ((uint)(this[0xab] != (Board)0x8) << 6 | (uint)(this[0xaa] != (Board)0x8) << 5 | (uint)(this[0xa9] != (Board)0x8) * 0x10 + (uint)(this[0xa8] != (Board)0x8) * 8)) ^ uVar5; }
49,429
chess::Board::zobrist() const
Razamindset[P]pawnstar-chess-engine/src/./engine/../chess-library/include/chess.hpp
[[nodiscard]] U64 zobrist() const { U64 hash_key = 0ULL; auto wPieces = us(Color::WHITE); auto bPieces = us(Color::BLACK); while (wPieces.getBits()) { const Square sq = wPieces.pop(); hash_key ^= Zobrist::piece(at(sq), sq); } while (bPieces.getBits()) { const Square sq = bPieces.pop(); hash_key ^= Zobrist::piece(at(sq), sq); } U64 ep_hash = 0ULL; if (ep_sq_ != Square::underlying::NO_SQ) ep_hash ^= Zobrist::enpassant(ep_sq_.file()); U64 stm_hash = 0ULL; if (stm_ == Color::WHITE) stm_hash ^= Zobrist::sideToMove(); U64 castling_hash = 0ULL; castling_hash ^= Zobrist::castling(cr_.hashIndex()); return hash_key ^ ep_hash ^ stm_hash ^ castling_hash; }
O2
cpp
chess::Board::zobrist() const: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x20, %rsp movq %rdi, %rbx movq 0x50(%rdi), %rax leaq 0x18(%rsp), %r14 movq %rax, (%r14) movq 0x58(%rdi), %r13 movq %r13, 0x10(%rsp) xorl %r12d, %r12d leaq 0xc(%rsp), %r15 testq %rax, %rax je 0x3f1b movq %r14, %rdi callq 0x48de movzbl %al, %esi movq %r15, %rdi callq 0x2b34 movl 0xc(%rsp), %esi movq %rbx, %rdi callq 0x43c4 movl 0xc(%rsp), %esi movzbl %al, %edi callq 0x3af2 xorq %rax, %r12 movq 0x18(%rsp), %rax jmp 0x3ee1 leaq 0x10(%rsp), %r14 leaq 0xc(%rsp), %r15 testq %r13, %r13 je 0x3f5f movq %r14, %rdi callq 0x48de movzbl %al, %esi movq %r15, %rdi callq 0x2b34 movl 0xc(%rsp), %esi movq %rbx, %rdi callq 0x43c4 movl 0xc(%rsp), %esi movzbl %al, %edi callq 0x3af2 xorq %rax, %r12 movq 0x10(%rsp), %r13 jmp 0x3f25 movl 0xb0(%rbx), %eax cmpl $0x40, %eax jne 0x3f6f xorl %r14d, %r14d jmp 0x3f7c andb $0x7, %al movzbl %al, %edi callq 0x3e18 movq %rax, %r14 xorl %eax, %eax cmpb $0x0, 0xae(%rbx) movabsq $-0x729d95550d87af7, %r15 # imm = 0xF8D626AAAF278509 cmovneq %rax, %r15 addq $0xa8, %rbx movq %rbx, %rdi callq 0x3e86 movl %eax, %edi callq 0x3e52 xorq %r14, %rax xorq %r12, %rax xorq %r15, %rax addq $0x20, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
_ZNK5chess5Board7zobristEv: push r15 push r14 push r13 push r12 push rbx sub rsp, 20h mov rbx, rdi mov rax, [rdi+50h] lea r14, [rsp+48h+var_30] mov [r14], rax mov r13, [rdi+58h] mov [rsp+48h+var_38], r13 xor r12d, r12d lea r15, [rsp+48h+var_3C] loc_3EE1: test rax, rax jz short loc_3F1B mov rdi, r14; this call _ZN5chess8Bitboard3popEv; chess::Bitboard::pop(void) movzx esi, al; int mov rdi, r15; this call _ZN5chess6SquareC2Ei; chess::Square::Square(int) mov esi, [rsp+48h+var_3C] mov rdi, rbx call _ZNK5chess5Board2atINS_5PieceEEET_NS_6SquareE; chess::Board::at<chess::Piece>(chess::Square) mov esi, [rsp+48h+var_3C] movzx edi, al call _ZN5chess7Zobrist5pieceENS_5PieceENS_6SquareE; chess::Zobrist::piece(chess::Piece,chess::Square) xor r12, rax mov rax, [rsp+48h+var_30] jmp short loc_3EE1 loc_3F1B: lea r14, [rsp+48h+var_38] lea r15, [rsp+48h+var_3C] loc_3F25: test r13, r13 jz short loc_3F5F mov rdi, r14; this call _ZN5chess8Bitboard3popEv; chess::Bitboard::pop(void) movzx esi, al; int mov rdi, r15; this call _ZN5chess6SquareC2Ei; chess::Square::Square(int) mov esi, [rsp+48h+var_3C] mov rdi, rbx call _ZNK5chess5Board2atINS_5PieceEEET_NS_6SquareE; chess::Board::at<chess::Piece>(chess::Square) mov esi, [rsp+48h+var_3C]; int movzx edi, al call _ZN5chess7Zobrist5pieceENS_5PieceENS_6SquareE; chess::Zobrist::piece(chess::Piece,chess::Square) xor r12, rax mov r13, [rsp+48h+var_38] jmp short loc_3F25 loc_3F5F: mov eax, [rbx+0B0h] cmp eax, 40h ; '@' jnz short loc_3F6F xor r14d, r14d jmp short loc_3F7C loc_3F6F: and al, 7 movzx edi, al call _ZN5chess7Zobrist9enpassantENS_4FileE; chess::Zobrist::enpassant(chess::File) mov r14, rax loc_3F7C: xor eax, eax cmp byte ptr [rbx+0AEh], 0 mov r15, 0F8D626AAAF278509h cmovnz r15, rax add rbx, 0A8h mov rdi, rbx; this call _ZNK5chess5Board14CastlingRights9hashIndexEv; chess::Board::CastlingRights::hashIndex(void) mov edi, eax; this call _ZN5chess7Zobrist8castlingEi; chess::Zobrist::castling(int) xor rax, r14 xor rax, r12 xor rax, r15 add rsp, 20h pop rbx pop r12 pop r13 pop r14 pop r15 retn
unsigned long long chess::Board::zobrist(chess::Board *this) { long long v1; // rax long long v2; // r13 long long v3; // r12 unsigned __int8 v4; // al unsigned __int8 v5; // al unsigned __int8 v6; // al unsigned __int8 v7; // al int v8; // eax long long v9; // r14 unsigned long long v10; // r15 unsigned int v11; // eax int v13; // [rsp+Ch] [rbp-3Ch] BYREF long long v14; // [rsp+10h] [rbp-38h] BYREF _QWORD v15[6]; // [rsp+18h] [rbp-30h] BYREF v1 = *((_QWORD *)this + 10); v15[0] = v1; v2 = *((_QWORD *)this + 11); v14 = v2; v3 = 0LL; while ( v1 ) { v4 = chess::Bitboard::pop((chess::Bitboard *)v15); chess::Square::Square((chess::Square *)&v13, v4); v5 = chess::Board::at<chess::Piece>(this, (unsigned int)v13); v3 ^= chess::Zobrist::piece(v5, v13); v1 = v15[0]; } while ( v2 ) { v6 = chess::Bitboard::pop((chess::Bitboard *)&v14); chess::Square::Square((chess::Square *)&v13, v6); v7 = chess::Board::at<chess::Piece>(this, (unsigned int)v13); v3 ^= chess::Zobrist::piece(v7, v13); v2 = v14; } v8 = *((_DWORD *)this + 44); if ( v8 == 64 ) v9 = 0LL; else v9 = chess::Zobrist::enpassant(v8 & 7); v10 = 0xF8D626AAAF278509LL; if ( *((_BYTE *)this + 174) ) v10 = 0LL; v11 = chess::Board::CastlingRights::hashIndex((chess::Board *)((char *)this + 168)); return v10 ^ v3 ^ v9 ^ chess::Zobrist::castling((chess::Zobrist *)v11); }
zobrist: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x20 MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x50] LEA R14,[RSP + 0x18] MOV qword ptr [R14],RAX MOV R13,qword ptr [RDI + 0x58] MOV qword ptr [RSP + 0x10],R13 XOR R12D,R12D LEA R15,[RSP + 0xc] LAB_00103ee1: TEST RAX,RAX JZ 0x00103f1b MOV RDI,R14 CALL 0x001048de MOVZX ESI,AL MOV RDI,R15 CALL 0x00102b34 MOV ESI,dword ptr [RSP + 0xc] MOV RDI,RBX CALL 0x001043c4 MOV ESI,dword ptr [RSP + 0xc] MOVZX EDI,AL CALL 0x00103af2 XOR R12,RAX MOV RAX,qword ptr [RSP + 0x18] JMP 0x00103ee1 LAB_00103f1b: LEA R14,[RSP + 0x10] LEA R15,[RSP + 0xc] LAB_00103f25: TEST R13,R13 JZ 0x00103f5f MOV RDI,R14 CALL 0x001048de MOVZX ESI,AL MOV RDI,R15 CALL 0x00102b34 MOV ESI,dword ptr [RSP + 0xc] MOV RDI,RBX CALL 0x001043c4 MOV ESI,dword ptr [RSP + 0xc] MOVZX EDI,AL CALL 0x00103af2 XOR R12,RAX MOV R13,qword ptr [RSP + 0x10] JMP 0x00103f25 LAB_00103f5f: MOV EAX,dword ptr [RBX + 0xb0] CMP EAX,0x40 JNZ 0x00103f6f XOR R14D,R14D JMP 0x00103f7c LAB_00103f6f: AND AL,0x7 MOVZX EDI,AL CALL 0x00103e18 MOV R14,RAX LAB_00103f7c: XOR EAX,EAX CMP byte ptr [RBX + 0xae],0x0 MOV R15,-0x729d95550d87af7 CMOVNZ R15,RAX ADD RBX,0xa8 MOV RDI,RBX CALL 0x00103e86 MOV EDI,EAX CALL 0x00103e52 XOR RAX,R14 XOR RAX,R12 XOR RAX,R15 ADD RSP,0x20 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* chess::Board::zobrist() const */ ulong __thiscall chess::Board::zobrist(Board *this) { byte bVar1; int1 uVar2; int iVar3; ulong uVar4; ulong uVar5; ulong uVar6; long lVar7; ulong uVar8; int4 local_3c; long local_38; long local_30; local_30 = *(long *)(this + 0x50); lVar7 = *(long *)(this + 0x58); uVar6 = 0; local_38 = lVar7; while (local_30 != 0) { bVar1 = Bitboard::pop((Bitboard *)&local_30); Square::Square((Square *)&local_3c,(uint)bVar1); uVar2 = at<chess::Piece>(this,local_3c); uVar4 = Zobrist::piece(uVar2,local_3c); uVar6 = uVar6 ^ uVar4; } while (lVar7 != 0) { bVar1 = Bitboard::pop((Bitboard *)&local_38); Square::Square((Square *)&local_3c,(uint)bVar1); uVar2 = at<chess::Piece>(this,local_3c); uVar4 = Zobrist::piece(uVar2,local_3c); uVar6 = uVar6 ^ uVar4; lVar7 = local_38; } if (*(int *)(this + 0xb0) == 0x40) { uVar4 = 0; } else { uVar4 = Zobrist::enpassant((byte)*(int *)(this + 0xb0) & 7); } uVar8 = 0xf8d626aaaf278509; if (this[0xae] != (Board)0x0) { uVar8 = 0; } iVar3 = CastlingRights::hashIndex((CastlingRights *)(this + 0xa8)); uVar5 = Zobrist::castling(iVar3); return uVar5 ^ uVar4 ^ uVar6 ^ uVar8; }
49,430
serial_cpp::Serial::readlines(unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
ami-iit[P]serial_cpp/src/serial.cc
vector<string> Serial::readlines (size_t size, string eol) { ScopedReadLock lock(this->pimpl_); std::vector<std::string> lines; size_t eol_len = eol.length (); uint8_t *buffer_ = static_cast<uint8_t*> (alloca (size * sizeof (uint8_t))); size_t read_so_far = 0; size_t start_of_line = 0; while (read_so_far < size) { size_t bytes_read = this->read_ (buffer_+read_so_far, 1); read_so_far += bytes_read; if (bytes_read == 0) { if (start_of_line != read_so_far) { lines.push_back ( string (reinterpret_cast<const char*> (buffer_ + start_of_line), read_so_far - start_of_line)); } break; // Timeout occured on reading 1 byte } if(read_so_far < eol_len) continue; if (string (reinterpret_cast<const char*> (buffer_ + read_so_far - eol_len), eol_len) == eol) { // EOL found lines.push_back( string(reinterpret_cast<const char*> (buffer_ + start_of_line), read_so_far - start_of_line)); start_of_line = read_so_far; } if (read_so_far == size) { if (start_of_line != read_so_far) { lines.push_back( string(reinterpret_cast<const char*> (buffer_ + start_of_line), read_so_far - start_of_line)); } break; // Reached the maximum read length } } return lines; }
O1
cpp
serial_cpp::Serial::readlines(unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rcx, %r14 movq %rdx, %r15 movq %rsi, %r13 movq %rdi, %rbx movq 0x8(%rsi), %rdi movq %rdi, -0x70(%rbp) callq 0x7bd6 xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movq %rbx, -0x50(%rbp) movq $0x0, 0x10(%rbx) movq %r14, -0x78(%rbp) movq 0x8(%r14), %rcx movq %rsp, %rdx leaq 0xf(%r15), %rax andq $-0x10, %rax subq %rax, %rdx movq %rdx, -0x58(%rbp) movq %rdx, %rsp movq %rcx, -0x88(%rbp) negq %rcx movq %rcx, -0x80(%rbp) xorl %ebx, %ebx leaq -0x48(%rbp), %r14 movq $0x0, -0x68(%rbp) movq %r13, -0x60(%rbp) cmpq %r15, %rbx jae 0x4af7 movq -0x58(%rbp), %rax leaq (%rax,%rbx), %rsi movq 0x8(%r13), %rdi movl $0x1, %edx callq 0x6434 addq %rax, %rbx testq %rax, %rax je 0x4967 cmpq -0x88(%rbp), %rbx jae 0x49c5 xorl %r12d, %r12d jmp 0x4aea movb $0x1, %r12b movq -0x68(%rbp), %rax cmpq %rbx, %rax je 0x4aea movq -0x58(%rbp), %rcx leaq (%rcx,%rax), %rsi leaq -0x38(%rbp), %rax movq %rax, -0x48(%rbp) leaq (%rcx,%rbx), %rdx leaq -0x48(%rbp), %r14 movq %r14, %rdi callq 0x42da movq -0x50(%rbp), %rdi movq %r14, %rsi callq 0x5152 movq -0x48(%rbp), %rdi leaq -0x38(%rbp), %rax cmpq %rax, %rdi je 0x4aea movq -0x38(%rbp), %rsi incq %rsi callq 0x32c0 jmp 0x4aea movq %r15, %r13 movq -0x58(%rbp), %rax leaq (%rax,%rbx), %r15 movq -0x80(%rbp), %rax leaq (%r15,%rax), %rsi leaq -0x38(%rbp), %rax movq %rax, -0x48(%rbp) movq %r14, %rdi movq %r15, %rdx callq 0x42da movq -0x40(%rbp), %rdx movq -0x78(%rbp), %rax cmpq 0x8(%rax), %rdx movq -0x68(%rbp), %r14 jne 0x4a1a testq %rdx, %rdx je 0x4a1f movq -0x78(%rbp), %rax movq (%rax), %rsi movq -0x48(%rbp), %rdi callq 0x32d0 testl %eax, %eax sete %r12b jmp 0x4a22 xorl %r12d, %r12d jmp 0x4a22 movb $0x1, %r12b movq -0x48(%rbp), %rdi leaq -0x38(%rbp), %rax cmpq %rax, %rdi je 0x4a3b movq -0x38(%rbp), %rsi incq %rsi callq 0x32c0 testb %r12b, %r12b je 0x4a86 addq -0x58(%rbp), %r14 leaq -0x38(%rbp), %rax movq %rax, -0x48(%rbp) movq %r14, %rsi leaq -0x48(%rbp), %r14 movq %r14, %rdi movq %r15, %rdx callq 0x42da movq -0x50(%rbp), %rdi movq %r14, %rsi callq 0x5152 movq -0x48(%rbp), %rdi leaq -0x38(%rbp), %rax cmpq %rax, %rdi je 0x4a83 movq -0x38(%rbp), %rsi incq %rsi callq 0x32c0 movq %rbx, %r14 cmpq %r13, %rbx movq %r14, -0x68(%rbp) jne 0x4ae0 movb $0x1, %r12b cmpq %rbx, %r14 je 0x4ae3 movq -0x58(%rbp), %rax leaq (%rax,%r14), %rsi leaq -0x38(%rbp), %rax movq %rax, -0x48(%rbp) leaq -0x48(%rbp), %r14 movq %r14, %rdi movq %r15, %rdx callq 0x42da movq -0x50(%rbp), %rdi movq %r14, %rsi callq 0x5152 movq -0x48(%rbp), %rdi leaq -0x38(%rbp), %rax cmpq %rax, %rdi movq %r13, %r15 je 0x4ae6 movq -0x38(%rbp), %rsi incq %rsi callq 0x32c0 jmp 0x4ae6 xorl %r12d, %r12d movq %r13, %r15 movq -0x60(%rbp), %r13 testb %r12b, %r12b leaq -0x48(%rbp), %r14 je 0x492f movq -0x70(%rbp), %rdi callq 0x7c90 movq -0x50(%rbp), %rax leaq -0x28(%rbp), %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x4b5c jmp 0x4b1d jmp 0x4b3f jmp 0x4b1d jmp 0x4b3f movq %rax, %rbx movq -0x48(%rbp), %rdi leaq -0x38(%rbp), %rax cmpq %rax, %rdi je 0x4b42 movq -0x38(%rbp), %rsi incq %rsi callq 0x32c0 jmp 0x4b42 jmp 0x4b3f jmp 0x4b3f movq %rax, %rbx movq -0x50(%rbp), %rdi callq 0x4f16 movq -0x70(%rbp), %rdi callq 0x7c90 movq %rbx, %rdi callq 0x34f0 movq %rax, %rdi callq 0x41cf
_ZN10serial_cpp6Serial9readlinesEmNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov r14, rcx mov r15, rdx mov r13, rsi mov rbx, rdi mov rdi, [rsi+8]; this mov [rbp+var_70], rdi call _ZN10serial_cpp6Serial10SerialImpl8readLockEv; serial_cpp::Serial::SerialImpl::readLock(void) xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 mov [rbp+var_50], rbx mov qword ptr [rbx+10h], 0 mov [rbp+var_78], r14 mov rcx, [r14+8] mov rdx, rsp lea rax, [r15+0Fh] and rax, 0FFFFFFFFFFFFFFF0h sub rdx, rax mov [rbp+var_58], rdx mov rsp, rdx mov [rbp+var_88], rcx neg rcx mov [rbp+var_80], rcx xor ebx, ebx lea r14, [rbp+var_48] mov [rbp+var_68], 0 mov [rbp+var_60], r13 loc_492F: cmp rbx, r15 jnb loc_4AF7 mov rax, [rbp+var_58] lea rsi, [rax+rbx]; unsigned __int8 * mov rdi, [r13+8]; this mov edx, 1; unsigned __int64 call _ZN10serial_cpp6Serial10SerialImpl4readEPhm; serial_cpp::Serial::SerialImpl::read(uchar *,ulong) add rbx, rax test rax, rax jz short loc_4967 cmp rbx, [rbp+var_88] jnb short loc_49C5 xor r12d, r12d jmp loc_4AEA loc_4967: mov r12b, 1 mov rax, [rbp+var_68] cmp rax, rbx jz loc_4AEA mov rcx, [rbp+var_58] lea rsi, [rcx+rax] lea rax, [rbp+var_38] mov [rbp+var_48], rax lea rdx, [rcx+rbx] lea r14, [rbp+var_48] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rdi, [rbp+var_50] mov rsi, r14 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) mov rdi, [rbp+var_48]; void * lea rax, [rbp+var_38] cmp rdi, rax jz loc_4AEA mov rsi, [rbp+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp loc_4AEA loc_49C5: mov r13, r15 mov rax, [rbp+var_58] lea r15, [rax+rbx] mov rax, [rbp+var_80] lea rsi, [r15+rax] lea rax, [rbp+var_38] mov [rbp+var_48], rax mov rdi, r14 mov rdx, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rdx, [rbp+var_40] mov rax, [rbp+var_78] cmp rdx, [rax+8] mov r14, [rbp+var_68] jnz short loc_4A1A test rdx, rdx jz short loc_4A1F mov rax, [rbp+var_78] mov rsi, [rax] mov rdi, [rbp+var_48] call _bcmp test eax, eax setz r12b jmp short loc_4A22 loc_4A1A: xor r12d, r12d jmp short loc_4A22 loc_4A1F: mov r12b, 1 loc_4A22: mov rdi, [rbp+var_48]; void * lea rax, [rbp+var_38] cmp rdi, rax jz short loc_4A3B mov rsi, [rbp+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4A3B: test r12b, r12b jz short loc_4A86 add r14, [rbp+var_58] lea rax, [rbp+var_38] mov [rbp+var_48], rax mov rsi, r14 lea r14, [rbp+var_48] mov rdi, r14 mov rdx, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rdi, [rbp+var_50] mov rsi, r14 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) mov rdi, [rbp+var_48]; void * lea rax, [rbp+var_38] cmp rdi, rax jz short loc_4A83 mov rsi, [rbp+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4A83: mov r14, rbx loc_4A86: cmp rbx, r13 mov [rbp+var_68], r14 jnz short loc_4AE0 mov r12b, 1 cmp r14, rbx jz short loc_4AE3 mov rax, [rbp+var_58] lea rsi, [rax+r14] lea rax, [rbp+var_38] mov [rbp+var_48], rax lea r14, [rbp+var_48] mov rdi, r14 mov rdx, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rdi, [rbp+var_50] mov rsi, r14 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) mov rdi, [rbp+var_48]; void * lea rax, [rbp+var_38] cmp rdi, rax mov r15, r13 jz short loc_4AE6 mov rsi, [rbp+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_4AE6 loc_4AE0: xor r12d, r12d loc_4AE3: mov r15, r13 loc_4AE6: mov r13, [rbp+var_60] loc_4AEA: test r12b, r12b lea r14, [rbp+var_48] jz loc_492F loc_4AF7: mov rdi, [rbp+var_70]; this call _ZN10serial_cpp6Serial10SerialImpl10readUnlockEv; serial_cpp::Serial::SerialImpl::readUnlock(void) mov rax, [rbp+var_50] lea rsp, [rbp-28h] pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_4B5C jmp short loc_4B1D jmp short loc_4B3F jmp short loc_4B1D jmp short loc_4B3F loc_4B1D: mov rbx, rax mov rdi, [rbp+var_48]; void * lea rax, [rbp+var_38] cmp rdi, rax jz short loc_4B42 mov rsi, [rbp+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_4B42 jmp short loc_4B3F jmp short $+2 loc_4B3F: mov rbx, rax loc_4B42: mov rdi, [rbp+var_50] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, [rbp+var_70]; this call _ZN10serial_cpp6Serial10SerialImpl10readUnlockEv; serial_cpp::Serial::SerialImpl::readUnlock(void) mov rdi, rbx call __Unwind_Resume loc_4B5C: mov rdi, rax call __clang_call_terminate
// bad sp value at call has been detected, the output may be wrong! long long serial_cpp::Serial::readlines(long long a1, long long a2, unsigned long long a3, _QWORD *a4) { long long v6; // r13 unsigned long long v7; // rcx unsigned long long v8; // rbx long long v9; // rax char v10; // r12 unsigned long long v11; // r13 long long v12; // r15 unsigned long long v13; // r14 bool v14; // r12 long long v16; // [rsp+0h] [rbp-90h] BYREF unsigned long long v17; // [rsp+8h] [rbp-88h] long long v18; // [rsp+10h] [rbp-80h] _QWORD *v19; // [rsp+18h] [rbp-78h] serial_cpp::Serial::SerialImpl *v20; // [rsp+20h] [rbp-70h] unsigned long long v21; // [rsp+28h] [rbp-68h] long long v22; // [rsp+30h] [rbp-60h] char *v23; // [rsp+38h] [rbp-58h] long long v24; // [rsp+40h] [rbp-50h] void *v25; // [rsp+48h] [rbp-48h] BYREF long long v26; // [rsp+50h] [rbp-40h] _QWORD v27[7]; // [rsp+58h] [rbp-38h] BYREF v6 = a2; v20 = *(serial_cpp::Serial::SerialImpl **)(a2 + 8); serial_cpp::Serial::SerialImpl::readLock(v20); *(_OWORD *)a1 = 0LL; v24 = a1; *(_QWORD *)(a1 + 16) = 0LL; v19 = a4; v7 = a4[1]; v23 = (char *)&v16 - ((a3 + 15) & 0xFFFFFFFFFFFFFFF0LL); v17 = v7; v18 = -(long long)v7; v8 = 0LL; v21 = 0LL; v22 = a2; while ( v8 < a3 ) { v9 = serial_cpp::Serial::SerialImpl::read( *(serial_cpp::Serial::SerialImpl **)(v6 + 8), (unsigned __int8 *)&v23[v8], 1uLL); v8 += v9; if ( !v9 ) { v10 = 1; if ( v21 != v8 ) { v25 = v27; std::string::_M_construct<char const*>(&v25, &v23[v21], (long long)&v23[v8]); std::vector<std::string>::emplace_back<std::string>(v24, &v25); if ( v25 != v27 ) operator delete(v25, v27[0] + 1LL); } goto LABEL_27; } if ( v8 >= v17 ) { v11 = a3; v12 = (long long)&v23[v8]; v25 = v27; std::string::_M_construct<char const*>(&v25, &v23[v8 + v18], (long long)&v23[v8]); v13 = v21; if ( v26 == v19[1] ) { if ( v26 ) v14 = (unsigned int)bcmp(v25, *v19) == 0; else v14 = 1; } else { v14 = 0; } if ( v25 != v27 ) operator delete(v25, v27[0] + 1LL); if ( v14 ) { v25 = v27; std::string::_M_construct<char const*>(&v25, &v23[v13], v12); std::vector<std::string>::emplace_back<std::string>(v24, &v25); if ( v25 != v27 ) operator delete(v25, v27[0] + 1LL); v13 = v8; } v21 = v13; if ( v8 == v11 ) { v10 = 1; if ( v13 != v8 ) { v25 = v27; std::string::_M_construct<char const*>(&v25, &v23[v13], v12); std::vector<std::string>::emplace_back<std::string>(v24, &v25); a3 = v11; if ( v25 != v27 ) operator delete(v25, v27[0] + 1LL); goto LABEL_26; } } else { v10 = 0; } a3 = v11; LABEL_26: v6 = v22; goto LABEL_27; } v10 = 0; LABEL_27: if ( v10 ) break; } serial_cpp::Serial::SerialImpl::readUnlock(v20); return v24; }
readlines: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R14,RCX MOV R15,RDX MOV R13,RSI MOV RBX,RDI MOV RDI,qword ptr [RSI + 0x8] MOV qword ptr [RBP + -0x70],RDI CALL 0x00107bd6 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOV qword ptr [RBP + -0x50],RBX MOV qword ptr [RBX + 0x10],0x0 MOV qword ptr [RBP + -0x78],R14 MOV RCX,qword ptr [R14 + 0x8] MOV RDX,RSP LEA RAX,[R15 + 0xf] AND RAX,-0x10 SUB RDX,RAX MOV qword ptr [RBP + -0x58],RDX MOV RSP,RDX MOV qword ptr [RBP + -0x88],RCX NEG RCX MOV qword ptr [RBP + -0x80],RCX XOR EBX,EBX LEA R14,[RBP + -0x48] MOV qword ptr [RBP + -0x68],0x0 MOV qword ptr [RBP + -0x60],R13 LAB_0010492f: CMP RBX,R15 JNC 0x00104af7 MOV RAX,qword ptr [RBP + -0x58] LEA RSI,[RAX + RBX*0x1] MOV RDI,qword ptr [R13 + 0x8] LAB_00104944: MOV EDX,0x1 CALL 0x00106434 ADD RBX,RAX TEST RAX,RAX JZ 0x00104967 CMP RBX,qword ptr [RBP + -0x88] JNC 0x001049c5 XOR R12D,R12D JMP 0x00104aea LAB_00104967: MOV R12B,0x1 MOV RAX,qword ptr [RBP + -0x68] CMP RAX,RBX JZ 0x00104aea MOV RCX,qword ptr [RBP + -0x58] LEA RSI,[RCX + RAX*0x1] LEA RAX,[RBP + -0x38] MOV qword ptr [RBP + -0x48],RAX LEA RDX,[RCX + RBX*0x1] LAB_0010498b: LEA R14,[RBP + -0x48] MOV RDI,R14 CALL 0x001042da LAB_00104997: MOV RDI,qword ptr [RBP + -0x50] MOV RSI,R14 CALL 0x00105152 MOV RDI,qword ptr [RBP + -0x48] LEA RAX,[RBP + -0x38] CMP RDI,RAX JZ 0x00104aea MOV RSI,qword ptr [RBP + -0x38] INC RSI CALL 0x001032c0 JMP 0x00104aea LAB_001049c5: MOV R13,R15 MOV RAX,qword ptr [RBP + -0x58] LEA R15,[RAX + RBX*0x1] MOV RAX,qword ptr [RBP + -0x80] LEA RSI,[R15 + RAX*0x1] LEA RAX,[RBP + -0x38] MOV qword ptr [RBP + -0x48],RAX LAB_001049e0: MOV RDI,R14 MOV RDX,R15 CALL 0x001042da MOV RDX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x78] CMP RDX,qword ptr [RAX + 0x8] MOV R14,qword ptr [RBP + -0x68] JNZ 0x00104a1a TEST RDX,RDX JZ 0x00104a1f MOV RAX,qword ptr [RBP + -0x78] MOV RSI,qword ptr [RAX] MOV RDI,qword ptr [RBP + -0x48] CALL 0x001032d0 TEST EAX,EAX SETZ R12B JMP 0x00104a22 LAB_00104a1a: XOR R12D,R12D JMP 0x00104a22 LAB_00104a1f: MOV R12B,0x1 LAB_00104a22: MOV RDI,qword ptr [RBP + -0x48] LEA RAX,[RBP + -0x38] CMP RDI,RAX JZ 0x00104a3b MOV RSI,qword ptr [RBP + -0x38] INC RSI CALL 0x001032c0 LAB_00104a3b: TEST R12B,R12B JZ 0x00104a86 ADD R14,qword ptr [RBP + -0x58] LEA RAX,[RBP + -0x38] MOV qword ptr [RBP + -0x48],RAX LAB_00104a4c: MOV RSI,R14 LEA R14,[RBP + -0x48] MOV RDI,R14 MOV RDX,R15 CALL 0x001042da LAB_00104a5e: MOV RDI,qword ptr [RBP + -0x50] MOV RSI,R14 CALL 0x00105152 MOV RDI,qword ptr [RBP + -0x48] LEA RAX,[RBP + -0x38] CMP RDI,RAX JZ 0x00104a83 MOV RSI,qword ptr [RBP + -0x38] INC RSI CALL 0x001032c0 LAB_00104a83: MOV R14,RBX LAB_00104a86: CMP RBX,R13 MOV qword ptr [RBP + -0x68],R14 JNZ 0x00104ae0 MOV R12B,0x1 CMP R14,RBX JZ 0x00104ae3 MOV RAX,qword ptr [RBP + -0x58] LEA RSI,[RAX + R14*0x1] LEA RAX,[RBP + -0x38] MOV qword ptr [RBP + -0x48],RAX LAB_00104aa7: LEA R14,[RBP + -0x48] MOV RDI,R14 MOV RDX,R15 CALL 0x001042da LAB_00104ab6: MOV RDI,qword ptr [RBP + -0x50] MOV RSI,R14 CALL 0x00105152 MOV RDI,qword ptr [RBP + -0x48] LEA RAX,[RBP + -0x38] CMP RDI,RAX MOV R15,R13 JZ 0x00104ae6 MOV RSI,qword ptr [RBP + -0x38] INC RSI CALL 0x001032c0 JMP 0x00104ae6 LAB_00104ae0: XOR R12D,R12D LAB_00104ae3: MOV R15,R13 LAB_00104ae6: MOV R13,qword ptr [RBP + -0x60] LAB_00104aea: TEST R12B,R12B LEA R14,[RBP + -0x48] JZ 0x0010492f LAB_00104af7: MOV RDI,qword ptr [RBP + -0x70] CALL 0x00107c90 MOV RAX,qword ptr [RBP + -0x50] LEA RSP,[RBP + -0x28] POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* serial_cpp::Serial::readlines(unsigned long, std::__cxx11::string) */ vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> * serial_cpp::Serial::readlines (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *param_1,long param_2, ulong param_3,int8 *param_4) { uchar *puVar1; int1 *puVar2; SerialImpl *pSVar3; void *__s2; long lVar4; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *pvVar5; long *plVar6; size_t __n; int iVar7; long lVar8; ulong uVar9; ulong uVar10; ulong uVar11; int1 *puVar12; bool bVar13; int8 uStack_a0; int1 auStack_98 [8]; ulong local_90; long local_88; int8 *local_80; SerialImpl *local_78; ulong local_70; long local_68; int1 *local_60; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_58; long *local_50; size_t local_48; long local_40 [2]; local_78 = *(SerialImpl **)(param_2 + 8); uStack_a0 = 0x1048e0; SerialImpl::readLock(local_78); *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; local_90 = param_4[1]; lVar4 = -(param_3 + 0xf & 0xfffffffffffffff0); local_60 = auStack_98 + lVar4; local_88 = -local_90; uVar9 = 0; local_70 = 0; local_80 = param_4; local_68 = param_2; local_58 = param_1; do { if (param_3 <= uVar9) break; puVar1 = local_60 + uVar9; pSVar3 = *(SerialImpl **)(param_2 + 8); /* try { // try from 00104944 to 0010494d has its CatchHandler @ 00104b3f */ *(int8 *)(auStack_98 + lVar4 + -8) = 0x10494e; lVar8 = SerialImpl::read(pSVar3,puVar1,1); uVar9 = uVar9 + lVar8; if (lVar8 == 0) { bVar13 = true; if (local_70 != uVar9) { puVar2 = local_60 + local_70; local_50 = local_40; puVar12 = local_60 + uVar9; /* try { // try from 0010498b to 00104996 has its CatchHandler @ 00104b3b */ *(int8 *)(auStack_98 + lVar4 + -8) = 0x104997; std::__cxx11::string::_M_construct<char_const*>((string *)&local_50,puVar2,puVar12); pvVar5 = local_58; /* try { // try from 00104997 to 001049a2 has its CatchHandler @ 00104b1d */ *(int8 *)(auStack_98 + lVar4 + -8) = 0x1049a3; std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string>(pvVar5,(string *)&local_50); plVar6 = local_50; if (local_50 != local_40) { uVar11 = local_40[0] + 1; *(int8 *)(auStack_98 + lVar4 + -8) = 0x1049c0; operator_delete(plVar6,uVar11); } } } else if (uVar9 < local_90) { bVar13 = false; } else { puVar2 = local_60 + uVar9; puVar12 = puVar2 + local_88; local_50 = local_40; /* try { // try from 001049e0 to 001049ea has its CatchHandler @ 00104b3d */ *(int8 *)(auStack_98 + lVar4 + -8) = 0x1049eb; std::__cxx11::string::_M_construct<char_const*>(&local_50,puVar12,puVar2); __n = local_48; plVar6 = local_50; uVar11 = local_70; if (local_48 == local_80[1]) { if (local_48 == 0) { bVar13 = true; } else { __s2 = (void *)*local_80; *(int8 *)(auStack_98 + lVar4 + -8) = 0x104a12; iVar7 = bcmp(plVar6,__s2,__n); bVar13 = iVar7 == 0; } } else { bVar13 = false; } plVar6 = local_50; if (local_50 != local_40) { uVar10 = local_40[0] + 1; *(int8 *)(auStack_98 + lVar4 + -8) = 0x104a3b; operator_delete(plVar6,uVar10); } if (bVar13) { puVar12 = local_60 + uVar11; local_50 = local_40; /* try { // try from 00104a4c to 00104a5d has its CatchHandler @ 00104b1b */ *(int8 *)(auStack_98 + lVar4 + -8) = 0x104a5e; std::__cxx11::string::_M_construct<char_const*>((string *)&local_50,puVar12,puVar2); pvVar5 = local_58; /* try { // try from 00104a5e to 00104a69 has its CatchHandler @ 00104b19 */ *(int8 *)(auStack_98 + lVar4 + -8) = 0x104a6a; std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string>(pvVar5,(string *)&local_50); plVar6 = local_50; uVar11 = uVar9; if (local_50 != local_40) { uVar10 = local_40[0] + 1; *(int8 *)(auStack_98 + lVar4 + -8) = 0x104a83; operator_delete(plVar6,uVar10); } } param_2 = local_68; local_70 = uVar11; if (uVar9 == param_3) { bVar13 = true; if (uVar11 != uVar9) { puVar12 = local_60 + uVar11; local_50 = local_40; /* try { // try from 00104aa7 to 00104ab5 has its CatchHandler @ 00104b17 */ *(int8 *)(auStack_98 + lVar4 + -8) = 0x104ab6; std::__cxx11::string::_M_construct<char_const*>((string *)&local_50,puVar12,puVar2); pvVar5 = local_58; /* try { // try from 00104ab6 to 00104ac1 has its CatchHandler @ 00104b15 */ *(int8 *)(auStack_98 + lVar4 + -8) = 0x104ac2; std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string>(pvVar5,(string *)&local_50); plVar6 = local_50; param_2 = local_68; bVar13 = true; if (local_50 != local_40) { uVar11 = local_40[0] + 1; *(int8 *)(auStack_98 + lVar4 + -8) = 0x104ade; operator_delete(plVar6,uVar11); param_2 = local_68; } } } else { bVar13 = false; } } } while (!bVar13); /* try { // try from 00104af7 to 00104aff has its CatchHandler @ 00104b13 */ pSVar3 = local_78; *(int8 *)(auStack_98 + lVar4 + -8) = 0x104b00; SerialImpl::readUnlock(pSVar3); return local_58; }
49,431
serial_cpp::Serial::readlines(unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
ami-iit[P]serial_cpp/src/serial.cc
vector<string> Serial::readlines (size_t size, string eol) { ScopedReadLock lock(this->pimpl_); std::vector<std::string> lines; size_t eol_len = eol.length (); uint8_t *buffer_ = static_cast<uint8_t*> (alloca (size * sizeof (uint8_t))); size_t read_so_far = 0; size_t start_of_line = 0; while (read_so_far < size) { size_t bytes_read = this->read_ (buffer_+read_so_far, 1); read_so_far += bytes_read; if (bytes_read == 0) { if (start_of_line != read_so_far) { lines.push_back ( string (reinterpret_cast<const char*> (buffer_ + start_of_line), read_so_far - start_of_line)); } break; // Timeout occured on reading 1 byte } if(read_so_far < eol_len) continue; if (string (reinterpret_cast<const char*> (buffer_ + read_so_far - eol_len), eol_len) == eol) { // EOL found lines.push_back( string(reinterpret_cast<const char*> (buffer_ + start_of_line), read_so_far - start_of_line)); start_of_line = read_so_far; } if (read_so_far == size) { if (start_of_line != read_so_far) { lines.push_back( string(reinterpret_cast<const char*> (buffer_ + start_of_line), read_so_far - start_of_line)); } break; // Reached the maximum read length } } return lines; }
O2
cpp
serial_cpp::Serial::readlines(unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rcx, %r15 movq %rdx, %r14 movq %rdi, %rbx movq %rsi, -0x88(%rbp) movq 0x8(%rsi), %rdi movq %rdi, -0x68(%rbp) callq 0x6f28 xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movq %rbx, -0x40(%rbp) andq $0x0, 0x10(%rbx) movq %r15, -0x78(%rbp) movq 0x8(%r15), %r15 movq %rsp, %rbx movq %r14, %r12 leaq 0xf(%r14), %rax andq $-0x10, %rax subq %rax, %rbx movq %rbx, %rsp movq %r15, %rax negq %rax movq %rax, -0x80(%rbp) xorl %r13d, %r13d leaq -0x60(%rbp), %rcx movq $0x0, -0x38(%rbp) cmpq %r12, %r13 jae 0x4599 movq %rcx, %r14 leaq (%rbx,%r13), %rsi movq -0x88(%rbp), %rdi pushq $0x1 popq %rdx callq 0x4094 addq %rax, %r13 testq %rax, %rax je 0x4560 movq %r14, %rcx cmpq %r15, %r13 jb 0x447a leaq (%rbx,%r13), %rdx movq -0x80(%rbp), %rax leaq (%rdx,%rax), %rsi leaq -0x50(%rbp), %rax movq %rax, -0x60(%rbp) movq %rcx, %rdi movq %rdx, -0x70(%rbp) callq 0x3eda leaq -0x60(%rbp), %rdi movq -0x78(%rbp), %rsi callq 0x499c movb %al, -0x29(%rbp) leaq -0x60(%rbp), %rdi callq 0x3140 cmpb $0x0, -0x29(%rbp) je 0x4522 movq -0x38(%rbp), %rsi addq %rbx, %rsi leaq -0x50(%rbp), %rax movq %rax, -0x60(%rbp) leaq -0x60(%rbp), %rdi movq -0x70(%rbp), %rdx callq 0x3eda movq -0x40(%rbp), %rdi leaq -0x60(%rbp), %rsi callq 0x4c6c leaq -0x60(%rbp), %rdi callq 0x3140 movq %r13, -0x38(%rbp) cmpq %r12, %r13 movq %r14, %rcx jne 0x447a cmpq %r12, -0x38(%rbp) je 0x4599 movq -0x38(%rbp), %rsi addq %rbx, %rsi leaq -0x60(%rbp), %rdi leaq -0x50(%rbp), %rax movq %rax, (%rdi) addq %rbx, %r12 movq %r12, %rdx callq 0x3eda leaq -0x60(%rbp), %rsi movq -0x40(%rbp), %rdi callq 0x4c6c jmp 0x4590 cmpq %r13, -0x38(%rbp) je 0x4599 movq -0x38(%rbp), %rsi addq %rbx, %rsi leaq -0x60(%rbp), %rdi leaq -0x50(%rbp), %rax movq %rax, (%rdi) addq %rbx, %r13 movq %r13, %rdx callq 0x3eda leaq -0x60(%rbp), %rsi movq -0x40(%rbp), %rdi callq 0x4c6c leaq -0x60(%rbp), %rdi callq 0x3140 leaq -0x68(%rbp), %rdi callq 0x4968 movq -0x40(%rbp), %rax leaq -0x28(%rbp), %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x45bd jmp 0x45cf jmp 0x45bd jmp 0x45cf movq %rax, %rbx leaq -0x60(%rbp), %rdi callq 0x3140 jmp 0x45d2 jmp 0x45cf jmp 0x45cf movq %rax, %rbx movq -0x40(%rbp), %rdi callq 0x49c6 leaq -0x68(%rbp), %rdi callq 0x4968 movq %rbx, %rdi callq 0x34d0
_ZN10serial_cpp6Serial9readlinesEmNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov r15, rcx mov r14, rdx mov rbx, rdi mov [rbp+var_88], rsi mov rdi, [rsi+8]; this mov [rbp+var_68], rdi call _ZN10serial_cpp6Serial10SerialImpl8readLockEv; serial_cpp::Serial::SerialImpl::readLock(void) xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 mov [rbp+var_40], rbx and qword ptr [rbx+10h], 0 mov [rbp+var_78], r15 mov r15, [r15+8] mov rbx, rsp mov r12, r14 lea rax, [r14+0Fh] and rax, 0FFFFFFFFFFFFFFF0h sub rbx, rax mov rsp, rbx mov rax, r15 neg rax mov [rbp+var_80], rax xor r13d, r13d lea rcx, [rbp+var_60] mov [rbp+var_38], 0 loc_447A: cmp r13, r12 jnb loc_4599 mov r14, rcx lea rsi, [rbx+r13]; unsigned __int8 * mov rdi, [rbp+var_88]; this push 1 pop rdx; unsigned __int64 call _ZN10serial_cpp6Serial5read_EPhm; serial_cpp::Serial::read_(uchar *,ulong) add r13, rax test rax, rax jz loc_4560 mov rcx, r14 cmp r13, r15 jb short loc_447A lea rdx, [rbx+r13] mov rax, [rbp+var_80] lea rsi, [rdx+rax] lea rax, [rbp+var_50] mov [rbp+var_60], rax mov rdi, rcx mov [rbp+var_70], rdx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rbp+var_60] mov rsi, [rbp+var_78] call _ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_ mov [rbp+var_29], al lea rdi, [rbp+var_60] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() cmp [rbp+var_29], 0 jz short loc_4522 mov rsi, [rbp+var_38] add rsi, rbx lea rax, [rbp+var_50] mov [rbp+var_60], rax lea rdi, [rbp+var_60] mov rdx, [rbp+var_70] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rdi, [rbp+var_40] lea rsi, [rbp+var_60] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) lea rdi, [rbp+var_60] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov [rbp+var_38], r13 loc_4522: cmp r13, r12 mov rcx, r14 jnz loc_447A cmp [rbp+var_38], r12 jz short loc_4599 mov rsi, [rbp+var_38] add rsi, rbx lea rdi, [rbp+var_60] lea rax, [rbp+var_50] mov [rdi], rax add r12, rbx mov rdx, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rsi, [rbp+var_60] mov rdi, [rbp+var_40] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) jmp short loc_4590 loc_4560: cmp [rbp+var_38], r13 jz short loc_4599 mov rsi, [rbp+var_38] add rsi, rbx lea rdi, [rbp+var_60] lea rax, [rbp+var_50] mov [rdi], rax add r13, rbx mov rdx, 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 rsi, [rbp+var_60] mov rdi, [rbp+var_40] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) loc_4590: lea rdi, [rbp+var_60] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_4599: lea rdi, [rbp+var_68]; this call _ZN10serial_cpp6Serial14ScopedReadLockD2Ev; serial_cpp::Serial::ScopedReadLock::~ScopedReadLock() mov rax, [rbp+var_40] lea rsp, [rbp-28h] pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_45BD jmp short loc_45CF jmp short loc_45BD jmp short loc_45CF loc_45BD: mov rbx, rax lea rdi, [rbp+var_60] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_45D2 jmp short loc_45CF jmp short $+2 loc_45CF: mov rbx, rax loc_45D2: mov rdi, [rbp+var_40] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea rdi, [rbp+var_68]; this call _ZN10serial_cpp6Serial14ScopedReadLockD2Ev; serial_cpp::Serial::ScopedReadLock::~ScopedReadLock() mov rdi, rbx call __Unwind_Resume
// bad sp value at call has been detected, the output may be wrong! long long serial_cpp::Serial::readlines(long long a1, serial_cpp::Serial *a2, unsigned long long a3, long long a4) { unsigned long long v6; // r15 unsigned long long v7; // r12 char *v8; // rbx unsigned long long v9; // r13 _QWORD *v10; // rcx long long v11; // r14 long long v12; // rax long long v14; // [rsp+0h] [rbp-90h] BYREF serial_cpp::Serial *v15; // [rsp+8h] [rbp-88h] long long v16; // [rsp+10h] [rbp-80h] long long v17; // [rsp+18h] [rbp-78h] char *v18; // [rsp+20h] [rbp-70h] serial_cpp::Serial::SerialImpl *v19; // [rsp+28h] [rbp-68h] BYREF _QWORD v20[2]; // [rsp+30h] [rbp-60h] BYREF _BYTE v21[16]; // [rsp+40h] [rbp-50h] BYREF long long v22; // [rsp+50h] [rbp-40h] unsigned long long v23; // [rsp+58h] [rbp-38h] char v24; // [rsp+67h] [rbp-29h] v15 = a2; v19 = (serial_cpp::Serial::SerialImpl *)*((_QWORD *)a2 + 1); serial_cpp::Serial::SerialImpl::readLock(v19); *(_OWORD *)a1 = 0LL; v22 = a1; *(_QWORD *)(a1 + 16) = 0LL; v17 = a4; v6 = *(_QWORD *)(a4 + 8); v7 = a3; v8 = (char *)&v14 - ((a3 + 15) & 0xFFFFFFFFFFFFFFF0LL); v16 = -(long long)v6; v9 = 0LL; v10 = v20; v23 = 0LL; while ( v9 < v7 ) { v11 = (long long)v10; v12 = serial_cpp::Serial::read_((serial_cpp::Serial::SerialImpl **)v15, (unsigned __int8 *)&v8[v9], 1uLL); v9 += v12; if ( !v12 ) { if ( v23 == v9 ) break; v20[0] = v21; std::string::_M_construct<char const*>((long long)v20, &v8[v23], (long long)&v8[v9]); std::vector<std::string>::emplace_back<std::string>(v22, v20); goto LABEL_12; } v10 = (_QWORD *)v11; if ( v9 >= v6 ) { v20[0] = v21; v18 = &v8[v9]; std::string::_M_construct<char const*>(v11, &v8[v9 + v16], (long long)&v8[v9]); v24 = std::operator==<char>(v20, v17); std::string::~string(v20); if ( v24 ) { v20[0] = v21; std::string::_M_construct<char const*>((long long)v20, &v8[v23], (long long)v18); std::vector<std::string>::emplace_back<std::string>(v22, v20); std::string::~string(v20); v23 = v9; } v10 = (_QWORD *)v11; if ( v9 == v7 ) { if ( v23 == v7 ) break; v20[0] = v21; std::string::_M_construct<char const*>((long long)v20, &v8[v23], (long long)&v8[v7]); std::vector<std::string>::emplace_back<std::string>(v22, v20); LABEL_12: std::string::~string(v20); break; } } } serial_cpp::Serial::ScopedReadLock::~ScopedReadLock((serial_cpp::Serial::ScopedReadLock *)&v19); return v22; }
readlines: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R15,RCX MOV R14,RDX MOV RBX,RDI MOV qword ptr [RBP + -0x88],RSI MOV RDI,qword ptr [RSI + 0x8] MOV qword ptr [RBP + -0x68],RDI CALL 0x00106f28 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOV qword ptr [RBP + -0x40],RBX AND qword ptr [RBX + 0x10],0x0 MOV qword ptr [RBP + -0x78],R15 MOV R15,qword ptr [R15 + 0x8] MOV RBX,RSP MOV R12,R14 LEA RAX,[R14 + 0xf] AND RAX,-0x10 SUB RBX,RAX MOV RSP,RBX MOV RAX,R15 NEG RAX MOV qword ptr [RBP + -0x80],RAX XOR R13D,R13D LEA RCX,[RBP + -0x60] MOV qword ptr [RBP + -0x38],0x0 LAB_0010447a: CMP R13,R12 JNC 0x00104599 MOV R14,RCX LEA RSI,[RBX + R13*0x1] LAB_0010448a: MOV RDI,qword ptr [RBP + -0x88] PUSH 0x1 POP RDX CALL 0x00104094 ADD R13,RAX TEST RAX,RAX JZ 0x00104560 MOV RCX,R14 CMP R13,R15 JC 0x0010447a LEA RDX,[RBX + R13*0x1] MOV RAX,qword ptr [RBP + -0x80] LEA RSI,[RDX + RAX*0x1] LEA RAX,[RBP + -0x50] MOV qword ptr [RBP + -0x60],RAX LAB_001044c1: MOV RDI,RCX MOV qword ptr [RBP + -0x70],RDX CALL 0x00103eda LEA RDI,[RBP + -0x60] MOV RSI,qword ptr [RBP + -0x78] CALL 0x0010499c MOV byte ptr [RBP + -0x29],AL LEA RDI,[RBP + -0x60] CALL 0x00103140 CMP byte ptr [RBP + -0x29],0x0 JZ 0x00104522 MOV RSI,qword ptr [RBP + -0x38] ADD RSI,RBX LEA RAX,[RBP + -0x50] MOV qword ptr [RBP + -0x60],RAX LAB_001044fb: LEA RDI,[RBP + -0x60] MOV RDX,qword ptr [RBP + -0x70] CALL 0x00103eda LAB_00104508: MOV RDI,qword ptr [RBP + -0x40] LEA RSI,[RBP + -0x60] CALL 0x00104c6c LEA RDI,[RBP + -0x60] CALL 0x00103140 MOV qword ptr [RBP + -0x38],R13 LAB_00104522: CMP R13,R12 MOV RCX,R14 JNZ 0x0010447a CMP qword ptr [RBP + -0x38],R12 JZ 0x00104599 MOV RSI,qword ptr [RBP + -0x38] ADD RSI,RBX LEA RDI,[RBP + -0x60] LEA RAX,[RBP + -0x50] MOV qword ptr [RDI],RAX ADD R12,RBX LAB_00104549: MOV RDX,R12 CALL 0x00103eda LAB_00104551: LEA RSI,[RBP + -0x60] MOV RDI,qword ptr [RBP + -0x40] CALL 0x00104c6c JMP 0x00104590 LAB_00104560: CMP qword ptr [RBP + -0x38],R13 JZ 0x00104599 MOV RSI,qword ptr [RBP + -0x38] ADD RSI,RBX LEA RDI,[RBP + -0x60] LEA RAX,[RBP + -0x50] MOV qword ptr [RDI],RAX ADD R13,RBX LAB_0010457b: MOV RDX,R13 CALL 0x00103eda LAB_00104583: LEA RSI,[RBP + -0x60] MOV RDI,qword ptr [RBP + -0x40] CALL 0x00104c6c LAB_00104590: LEA RDI,[RBP + -0x60] CALL 0x00103140 LAB_00104599: LEA RDI,[RBP + -0x68] CALL 0x00104968 MOV RAX,qword ptr [RBP + -0x40] LEA RSP,[RBP + -0x28] POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* serial_cpp::Serial::readlines(unsigned long, std::__cxx11::string) */ vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> * serial_cpp::Serial::readlines (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *param_1, Serial *param_2,ulong param_3,string *param_4) { uchar *puVar1; ulong uVar2; ulong uVar3; long lVar4; long lVar5; Serial *this; string *psVar6; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *pvVar7; long lVar8; uchar *puVar9; uchar *puVar10; uchar *puVar11; uchar *puVar12; uchar *puVar13; uchar *puVar14; uchar *puVar15; uchar *puVar16; uchar *puVar17; uchar *puVar18; uchar *puVar19; uchar *puVar20; uchar *puVar21; uchar *puVar22; ulong uVar23; ulong uStack_a0; uchar auStack_98 [8]; Serial *local_90; long local_88; string *local_80; uchar *local_78; SerialImpl *local_70; int1 *local_68 [2]; int1 local_58 [16]; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_48; ulong local_40; char local_31; local_70 = *(SerialImpl **)(param_2 + 8); uStack_a0 = 0x104436; local_90 = param_2; SerialImpl::readLock(local_70); *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; local_48 = param_1; *(int8 *)(param_1 + 0x10) = 0; local_80 = param_4; uVar2 = *(ulong *)(param_4 + 8); lVar4 = -(param_3 + 0xf & 0xfffffffffffffff0); lVar5 = lVar4 + -0x98; local_88 = -uVar2; uVar23 = 0; local_40 = 0; do { do { this = local_90; if (param_3 <= uVar23) goto LAB_00104599; puVar9 = auStack_98 + lVar4 + -8; /* try { // try from 0010448a to 00104498 has its CatchHandler @ 001045cf */ puVar9[0] = '\x01'; puVar9[1] = '\0'; puVar9[2] = '\0'; puVar9[3] = '\0'; puVar9[4] = '\0'; puVar9[5] = '\0'; puVar9[6] = '\0'; puVar9[7] = '\0'; uVar3 = *(ulong *)(auStack_98 + lVar4 + -8); puVar10 = auStack_98 + lVar4 + -8; puVar10[0] = 0x99; puVar10[1] = 'D'; puVar10[2] = '\x10'; puVar10[3] = '\0'; puVar10[4] = '\0'; puVar10[5] = '\0'; puVar10[6] = '\0'; puVar10[7] = '\0'; lVar8 = read_(this,auStack_98 + uVar23 + lVar5 + 0x98,uVar3); uVar23 = uVar23 + lVar8; if (lVar8 == 0) { if (local_40 == uVar23) goto LAB_00104599; lVar8 = local_40 + lVar5; local_68[0] = local_58; puVar19 = auStack_98 + lVar4 + -8; /* try { // try from 0010457b to 00104582 has its CatchHandler @ 001045cb */ puVar19[0] = 0x83; puVar19[1] = 'E'; puVar19[2] = '\x10'; puVar19[3] = '\0'; puVar19[4] = '\0'; puVar19[5] = '\0'; puVar19[6] = '\0'; puVar19[7] = '\0'; std::__cxx11::string::_M_construct<char_const*> (local_68,auStack_98 + lVar8 + 0x98,auStack_98 + uVar23 + lVar5 + 0x98); pvVar7 = local_48; /* try { // try from 00104583 to 0010458f has its CatchHandler @ 001045bd */ puVar20 = auStack_98 + lVar4 + -8; puVar20[0] = 0x90; puVar20[1] = 'E'; puVar20[2] = '\x10'; puVar20[3] = '\0'; puVar20[4] = '\0'; puVar20[5] = '\0'; puVar20[6] = '\0'; puVar20[7] = '\0'; std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string>(pvVar7,(string *)local_68); goto LAB_00104590; } } while (uVar23 < uVar2); local_78 = auStack_98 + uVar23 + lVar5 + 0x98; puVar1 = local_78 + local_88; local_68[0] = local_58; puVar11 = auStack_98 + lVar4 + -8; /* try { // try from 001044c1 to 001044cc has its CatchHandler @ 001045cd */ puVar11[0] = 0xcd; puVar11[1] = 'D'; puVar11[2] = '\x10'; puVar11[3] = '\0'; puVar11[4] = '\0'; puVar11[5] = '\0'; puVar11[6] = '\0'; puVar11[7] = '\0'; std::__cxx11::string::_M_construct<char_const*>(local_68,puVar1); psVar6 = local_80; puVar12 = auStack_98 + lVar4 + -8; puVar12[0] = 0xda; puVar12[1] = 'D'; puVar12[2] = '\x10'; puVar12[3] = '\0'; puVar12[4] = '\0'; puVar12[5] = '\0'; puVar12[6] = '\0'; puVar12[7] = '\0'; local_31 = std::operator==((string *)local_68,psVar6); puVar13 = auStack_98 + lVar4 + -8; puVar13[0] = 0xe6; puVar13[1] = 'D'; puVar13[2] = '\x10'; puVar13[3] = '\0'; puVar13[4] = '\0'; puVar13[5] = '\0'; puVar13[6] = '\0'; puVar13[7] = '\0'; std::__cxx11::string::~string((string *)local_68); puVar1 = local_78; if (local_31 != '\0') { lVar8 = local_40 + lVar5; local_68[0] = local_58; /* try { // try from 001044fb to 00104507 has its CatchHandler @ 001045bb */ puVar14 = auStack_98 + lVar4 + -8; builtin_memcpy(auStack_98 + lVar4 + -8,"\bE\x10",4); puVar14[4] = '\0'; puVar14[5] = '\0'; puVar14[6] = '\0'; puVar14[7] = '\0'; std::__cxx11::string::_M_construct<char_const*>(local_68,auStack_98 + lVar8 + 0x98,puVar1); pvVar7 = local_48; /* try { // try from 00104508 to 00104514 has its CatchHandler @ 001045b9 */ puVar15 = auStack_98 + lVar4 + -8; builtin_memcpy(auStack_98 + lVar4 + -8,"\x15E\x10",4); puVar15[4] = '\0'; puVar15[5] = '\0'; puVar15[6] = '\0'; puVar15[7] = '\0'; std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string>(pvVar7,(string *)local_68); puVar16 = auStack_98 + lVar4 + -8; builtin_memcpy(auStack_98 + lVar4 + -8,"\x1eE\x10",4); puVar16[4] = '\0'; puVar16[5] = '\0'; puVar16[6] = '\0'; puVar16[7] = '\0'; std::__cxx11::string::~string((string *)local_68); local_40 = uVar23; } } while (uVar23 != param_3); if (local_40 != param_3) { lVar8 = local_40 + lVar5; local_68[0] = local_58; puVar17 = auStack_98 + lVar4 + -8; builtin_memcpy(auStack_98 + lVar4 + -8,"QE\x10",4); puVar17[4] = '\0'; puVar17[5] = '\0'; puVar17[6] = '\0'; puVar17[7] = '\0'; /* try { // try from 00104549 to 00104550 has its CatchHandler @ 001045b7 */ std::__cxx11::string::_M_construct<char_const*> (local_68,auStack_98 + lVar8 + 0x98,auStack_98 + param_3 + lVar5 + 0x98); pvVar7 = local_48; /* try { // try from 00104551 to 0010455d has its CatchHandler @ 001045b5 */ puVar18 = auStack_98 + lVar4 + -8; builtin_memcpy(auStack_98 + lVar4 + -8,"^E\x10",4); puVar18[4] = '\0'; puVar18[5] = '\0'; puVar18[6] = '\0'; puVar18[7] = '\0'; std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string>(pvVar7,(string *)local_68); LAB_00104590: puVar21 = auStack_98 + lVar4 + -8; puVar21[0] = 0x99; puVar21[1] = 'E'; puVar21[2] = '\x10'; puVar21[3] = '\0'; puVar21[4] = '\0'; puVar21[5] = '\0'; puVar21[6] = '\0'; puVar21[7] = '\0'; std::__cxx11::string::~string((string *)local_68); } LAB_00104599: puVar22 = auStack_98 + lVar4 + -8; puVar22[0] = 0xa2; puVar22[1] = 'E'; puVar22[2] = '\x10'; puVar22[3] = '\0'; puVar22[4] = '\0'; puVar22[5] = '\0'; puVar22[6] = '\0'; puVar22[7] = '\0'; ScopedReadLock::~ScopedReadLock((ScopedReadLock *)&local_70); return local_48; }
49,432
serial_cpp::Serial::readlines(unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
ami-iit[P]serial_cpp/src/serial.cc
vector<string> Serial::readlines (size_t size, string eol) { ScopedReadLock lock(this->pimpl_); std::vector<std::string> lines; size_t eol_len = eol.length (); uint8_t *buffer_ = static_cast<uint8_t*> (alloca (size * sizeof (uint8_t))); size_t read_so_far = 0; size_t start_of_line = 0; while (read_so_far < size) { size_t bytes_read = this->read_ (buffer_+read_so_far, 1); read_so_far += bytes_read; if (bytes_read == 0) { if (start_of_line != read_so_far) { lines.push_back ( string (reinterpret_cast<const char*> (buffer_ + start_of_line), read_so_far - start_of_line)); } break; // Timeout occured on reading 1 byte } if(read_so_far < eol_len) continue; if (string (reinterpret_cast<const char*> (buffer_ + read_so_far - eol_len), eol_len) == eol) { // EOL found lines.push_back( string(reinterpret_cast<const char*> (buffer_ + start_of_line), read_so_far - start_of_line)); start_of_line = read_so_far; } if (read_so_far == size) { if (start_of_line != read_so_far) { lines.push_back( string(reinterpret_cast<const char*> (buffer_ + start_of_line), read_so_far - start_of_line)); } break; // Reached the maximum read length } } return lines; }
O3
cpp
serial_cpp::Serial::readlines(unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rcx, -0x68(%rbp) movq %rdx, %r15 movq %rsi, %r13 movq %rdi, %rbx movq 0x8(%rsi), %rdi movq %rdi, -0x70(%rbp) callq 0x7b98 xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movq %rbx, -0x58(%rbp) movq $0x0, 0x10(%rbx) movq %rsp, %rbx leaq 0xf(%r15), %rax andq $-0x10, %rax subq %rax, %rbx movq %rbx, %rsp testq %r15, %r15 je 0x4b00 movq -0x68(%rbp), %rax movq 0x8(%rax), %r12 movq %r12, %rax negq %rax movq %rax, -0x90(%rbp) movq $0x0, -0x50(%rbp) xorl %r14d, %r14d movq %r15, -0x88(%rbp) movq %rbx, -0x60(%rbp) movq %r12, -0x78(%rbp) movq %r13, -0x80(%rbp) leaq (%rbx,%r14), %rsi movq 0x8(%r13), %rdi movl $0x1, %edx callq 0x6468 addq %rax, %r14 testq %rax, %rax je 0x4a85 cmpq %r12, %r14 jb 0x4a7a leaq (%rbx,%r14), %r12 movq -0x90(%rbp), %rax leaq (%r12,%rax), %rsi leaq -0x38(%rbp), %rax movq %rax, -0x48(%rbp) leaq -0x48(%rbp), %rdi movq %r12, %rdx callq 0x42e0 movq -0x40(%rbp), %rdx movq -0x68(%rbp), %rax cmpq 0x8(%rax), %rdx jne 0x49dc movq -0x48(%rbp), %r13 testq %rdx, %rdx je 0x49e5 movq -0x68(%rbp), %rax movq (%rax), %rsi movq %r13, %rdi callq 0x32d0 testl %eax, %eax sete %r15b jmp 0x49e8 movq -0x48(%rbp), %r13 xorl %r15d, %r15d jmp 0x49e8 movb $0x1, %r15b leaq -0x38(%rbp), %rax cmpq %rax, %r13 je 0x4a00 movq -0x38(%rbp), %rsi incq %rsi movq %r13, %rdi callq 0x32c0 testb %r15b, %r15b je 0x4a62 movq -0x50(%rbp), %rsi addq -0x60(%rbp), %rsi leaq -0x38(%rbp), %rax movq %rax, -0x48(%rbp) leaq -0x48(%rbp), %rbx movq %rbx, %rdi movq %r12, %rdx callq 0x42e0 movq -0x88(%rbp), %r15 movq -0x80(%rbp), %r13 movq -0x58(%rbp), %rdi movq %rbx, %rsi callq 0x5166 movq -0x48(%rbp), %rdi leaq -0x38(%rbp), %rax cmpq %rax, %rdi movq -0x60(%rbp), %rbx movq -0x78(%rbp), %r12 je 0x4a5c movq -0x38(%rbp), %rsi incq %rsi callq 0x32c0 movq %r14, -0x50(%rbp) jmp 0x4a75 movq -0x88(%rbp), %r15 movq -0x80(%rbp), %r13 movq -0x60(%rbp), %rbx movq -0x78(%rbp), %r12 cmpq %r15, %r14 je 0x4ab7 cmpq %r15, %r14 jb 0x4964 jmp 0x4b00 cmpq %r14, -0x50(%rbp) je 0x4b00 movq -0x50(%rbp), %rsi addq %rbx, %rsi leaq -0x48(%rbp), %rdi leaq -0x38(%rbp), %rax movq %rax, (%rdi) addq %rbx, %r14 movq %r14, %rdx callq 0x42e0 leaq -0x48(%rbp), %rsi movq -0x58(%rbp), %rdi callq 0x5166 jmp 0x4ae7 cmpq %r15, -0x50(%rbp) je 0x4b00 movq -0x50(%rbp), %rsi addq %rbx, %rsi leaq -0x48(%rbp), %rdi leaq -0x38(%rbp), %rax movq %rax, (%rdi) addq %rbx, %r15 movq %r15, %rdx callq 0x42e0 leaq -0x48(%rbp), %rsi movq -0x58(%rbp), %rdi callq 0x5166 movq -0x48(%rbp), %rdi leaq -0x38(%rbp), %rax cmpq %rax, %rdi je 0x4b00 movq -0x38(%rbp), %rsi incq %rsi callq 0x32c0 movq -0x70(%rbp), %rdi callq 0x7c4e movq -0x58(%rbp), %rax leaq -0x28(%rbp), %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x4b26 jmp 0x4b48 jmp 0x4b26 jmp 0x4b48 jmp 0x4b65 movq %rax, %rbx movq -0x48(%rbp), %rdi leaq -0x38(%rbp), %rax cmpq %rax, %rdi je 0x4b4b movq -0x38(%rbp), %rsi incq %rsi callq 0x32c0 jmp 0x4b4b jmp 0x4b48 jmp 0x4b48 movq %rax, %rbx movq -0x58(%rbp), %rdi callq 0x4f20 movq -0x70(%rbp), %rdi callq 0x7c4e movq %rbx, %rdi callq 0x34f0 movq %rax, %rdi callq 0x41cf nop
_ZN10serial_cpp6Serial9readlinesEmNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov [rbp+var_68], rcx mov r15, rdx mov r13, rsi mov rbx, rdi mov rdi, [rsi+8]; this mov [rbp+var_70], rdi call _ZN10serial_cpp6Serial10SerialImpl8readLockEv; serial_cpp::Serial::SerialImpl::readLock(void) xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 mov [rbp+var_58], rbx mov qword ptr [rbx+10h], 0 mov rbx, rsp lea rax, [r15+0Fh] and rax, 0FFFFFFFFFFFFFFF0h sub rbx, rax mov rsp, rbx test r15, r15 jz loc_4B00 mov rax, [rbp+var_68] mov r12, [rax+8] mov rax, r12 neg rax mov [rbp+var_90], rax mov [rbp+var_50], 0 xor r14d, r14d mov [rbp+var_88], r15 mov [rbp+var_60], rbx mov [rbp+var_78], r12 mov [rbp+var_80], r13 loc_4964: lea rsi, [rbx+r14]; unsigned __int8 * mov rdi, [r13+8]; this mov edx, 1; unsigned __int64 call _ZN10serial_cpp6Serial10SerialImpl4readEPhm; serial_cpp::Serial::SerialImpl::read(uchar *,ulong) add r14, rax test rax, rax jz loc_4A85 cmp r14, r12 jb loc_4A7A lea r12, [rbx+r14] mov rax, [rbp+var_90] lea rsi, [r12+rax] lea rax, [rbp+var_38] mov [rbp+var_48], rax lea rdi, [rbp+var_48] mov rdx, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rdx, [rbp+var_40] mov rax, [rbp+var_68] cmp rdx, [rax+8] jnz short loc_49DC mov r13, [rbp+var_48] test rdx, rdx jz short loc_49E5 mov rax, [rbp+var_68] mov rsi, [rax] mov rdi, r13 call _bcmp test eax, eax setz r15b jmp short loc_49E8 loc_49DC: mov r13, [rbp+var_48] xor r15d, r15d jmp short loc_49E8 loc_49E5: mov r15b, 1 loc_49E8: lea rax, [rbp+var_38] cmp r13, rax jz short loc_4A00 mov rsi, [rbp+var_38] inc rsi; unsigned __int64 mov rdi, r13; void * call __ZdlPvm; operator delete(void *,ulong) loc_4A00: test r15b, r15b jz short loc_4A62 mov rsi, [rbp+var_50] add rsi, [rbp+var_60] lea rax, [rbp+var_38] mov [rbp+var_48], rax lea rbx, [rbp+var_48] mov rdi, rbx mov rdx, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov r15, [rbp+var_88] mov r13, [rbp+var_80] mov rdi, [rbp+var_58] mov rsi, rbx call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) mov rdi, [rbp+var_48]; void * lea rax, [rbp+var_38] cmp rdi, rax mov rbx, [rbp+var_60] mov r12, [rbp+var_78] jz short loc_4A5C mov rsi, [rbp+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4A5C: mov [rbp+var_50], r14 jmp short loc_4A75 loc_4A62: mov r15, [rbp+var_88] mov r13, [rbp+var_80] mov rbx, [rbp+var_60] mov r12, [rbp+var_78] loc_4A75: cmp r14, r15 jz short loc_4AB7 loc_4A7A: cmp r14, r15 jb loc_4964 jmp short loc_4B00 loc_4A85: cmp [rbp+var_50], r14 jz short loc_4B00 mov rsi, [rbp+var_50] add rsi, rbx lea rdi, [rbp+var_48] lea rax, [rbp+var_38] mov [rdi], rax add r14, rbx mov rdx, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rsi, [rbp+var_48] mov rdi, [rbp+var_58] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) jmp short loc_4AE7 loc_4AB7: cmp [rbp+var_50], r15 jz short loc_4B00 mov rsi, [rbp+var_50] add rsi, rbx lea rdi, [rbp+var_48] lea rax, [rbp+var_38] mov [rdi], rax add r15, rbx mov rdx, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rsi, [rbp+var_48] mov rdi, [rbp+var_58] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) loc_4AE7: mov rdi, [rbp+var_48]; void * lea rax, [rbp+var_38] cmp rdi, rax jz short loc_4B00 mov rsi, [rbp+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4B00: mov rdi, [rbp+var_70]; this call _ZN10serial_cpp6Serial10SerialImpl10readUnlockEv; serial_cpp::Serial::SerialImpl::readUnlock(void) mov rax, [rbp+var_58] lea rsp, [rbp-28h] pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_4B26 jmp short loc_4B48 jmp short loc_4B26 jmp short loc_4B48 jmp short loc_4B65 loc_4B26: mov rbx, rax mov rdi, [rbp+var_48]; void * lea rax, [rbp+var_38] cmp rdi, rax jz short loc_4B4B mov rsi, [rbp+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_4B4B jmp short loc_4B48 jmp short $+2 loc_4B48: mov rbx, rax loc_4B4B: mov rdi, [rbp+var_58] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, [rbp+var_70]; this call _ZN10serial_cpp6Serial10SerialImpl10readUnlockEv; serial_cpp::Serial::SerialImpl::readUnlock(void) mov rdi, rbx call __Unwind_Resume loc_4B65: mov rdi, rax call __clang_call_terminate
// bad sp value at call has been detected, the output may be wrong! long long serial_cpp::Serial::readlines(long long a1, long long a2, unsigned long long a3, _QWORD *a4) { long long v5; // r13 char *v6; // rbx unsigned long long v7; // r12 unsigned long long v8; // r14 long long v9; // rax _QWORD *v10; // r13 bool v11; // r15 long long v13; // [rsp+0h] [rbp-90h] BYREF unsigned long long v14; // [rsp+8h] [rbp-88h] long long v15; // [rsp+10h] [rbp-80h] unsigned long long v16; // [rsp+18h] [rbp-78h] serial_cpp::Serial::SerialImpl *v17; // [rsp+20h] [rbp-70h] _QWORD *v18; // [rsp+28h] [rbp-68h] char *v19; // [rsp+30h] [rbp-60h] long long v20; // [rsp+38h] [rbp-58h] unsigned long long v21; // [rsp+40h] [rbp-50h] void *v22; // [rsp+48h] [rbp-48h] BYREF long long v23; // [rsp+50h] [rbp-40h] _QWORD v24[7]; // [rsp+58h] [rbp-38h] BYREF v18 = a4; v5 = a2; v17 = *(serial_cpp::Serial::SerialImpl **)(a2 + 8); serial_cpp::Serial::SerialImpl::readLock(v17); *(_OWORD *)a1 = 0LL; v20 = a1; *(_QWORD *)(a1 + 16) = 0LL; v6 = (char *)&v13 - ((a3 + 15) & 0xFFFFFFFFFFFFFFF0LL); if ( a3 ) { v7 = v18[1]; v13 = -(long long)v7; v21 = 0LL; v8 = 0LL; v14 = a3; v19 = (char *)&v13 - ((a3 + 15) & 0xFFFFFFFFFFFFFFF0LL); v16 = v7; v15 = a2; while ( 1 ) { v9 = serial_cpp::Serial::SerialImpl::read( *(serial_cpp::Serial::SerialImpl **)(v5 + 8), (unsigned __int8 *)&v6[v8], 1uLL); v8 += v9; if ( !v9 ) { if ( v21 == v8 ) goto LABEL_26; v22 = v24; std::string::_M_construct<char const*>((long long)&v22, &v6[v21], (long long)&v6[v8]); std::vector<std::string>::emplace_back<std::string>(v20, &v22); goto LABEL_24; } if ( v8 >= v7 ) { v22 = v24; std::string::_M_construct<char const*>((long long)&v22, &v6[v8 + v13], (long long)&v6[v8]); if ( v23 == v18[1] ) { v10 = v22; if ( v23 ) v11 = (unsigned int)bcmp(v22, *v18) == 0; else v11 = 1; } else { v10 = v22; v11 = 0; } if ( v10 != v24 ) operator delete(v10, v24[0] + 1LL); if ( v11 ) { v22 = v24; std::string::_M_construct<char const*>((long long)&v22, &v19[v21], (long long)&v6[v8]); a3 = v14; v5 = v15; std::vector<std::string>::emplace_back<std::string>(v20, &v22); v6 = v19; v7 = v16; if ( v22 != v24 ) operator delete(v22, v24[0] + 1LL); v21 = v8; } else { a3 = v14; v5 = v15; v6 = v19; v7 = v16; } if ( v8 == a3 ) break; } if ( v8 >= a3 ) goto LABEL_26; } if ( v21 == a3 ) goto LABEL_26; v22 = v24; std::string::_M_construct<char const*>((long long)&v22, &v6[v21], (long long)&v6[a3]); std::vector<std::string>::emplace_back<std::string>(v20, &v22); LABEL_24: if ( v22 != v24 ) operator delete(v22, v24[0] + 1LL); } LABEL_26: serial_cpp::Serial::SerialImpl::readUnlock(v17); return v20; }
readlines: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV qword ptr [RBP + -0x68],RCX MOV R15,RDX MOV R13,RSI MOV RBX,RDI MOV RDI,qword ptr [RSI + 0x8] MOV qword ptr [RBP + -0x70],RDI CALL 0x00107b98 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOV qword ptr [RBP + -0x58],RBX MOV qword ptr [RBX + 0x10],0x0 MOV RBX,RSP LEA RAX,[R15 + 0xf] AND RAX,-0x10 SUB RBX,RAX MOV RSP,RBX TEST R15,R15 JZ 0x00104b00 MOV RAX,qword ptr [RBP + -0x68] MOV R12,qword ptr [RAX + 0x8] MOV RAX,R12 NEG RAX MOV qword ptr [RBP + -0x90],RAX MOV qword ptr [RBP + -0x50],0x0 XOR R14D,R14D MOV qword ptr [RBP + -0x88],R15 MOV qword ptr [RBP + -0x60],RBX MOV qword ptr [RBP + -0x78],R12 MOV qword ptr [RBP + -0x80],R13 LAB_00104964: LEA RSI,[RBX + R14*0x1] MOV RDI,qword ptr [R13 + 0x8] LAB_0010496c: MOV EDX,0x1 CALL 0x00106468 ADD R14,RAX TEST RAX,RAX JZ 0x00104a85 CMP R14,R12 JC 0x00104a7a LEA R12,[RBX + R14*0x1] MOV RAX,qword ptr [RBP + -0x90] LEA RSI,[R12 + RAX*0x1] LEA RAX,[RBP + -0x38] MOV qword ptr [RBP + -0x48],RAX LAB_001049a2: LEA RDI,[RBP + -0x48] MOV RDX,R12 CALL 0x001042e0 MOV RDX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x68] CMP RDX,qword ptr [RAX + 0x8] JNZ 0x001049dc MOV R13,qword ptr [RBP + -0x48] TEST RDX,RDX JZ 0x001049e5 MOV RAX,qword ptr [RBP + -0x68] MOV RSI,qword ptr [RAX] MOV RDI,R13 CALL 0x001032d0 TEST EAX,EAX SETZ R15B JMP 0x001049e8 LAB_001049dc: MOV R13,qword ptr [RBP + -0x48] XOR R15D,R15D JMP 0x001049e8 LAB_001049e5: MOV R15B,0x1 LAB_001049e8: LEA RAX,[RBP + -0x38] CMP R13,RAX JZ 0x00104a00 MOV RSI,qword ptr [RBP + -0x38] INC RSI MOV RDI,R13 CALL 0x001032c0 LAB_00104a00: TEST R15B,R15B JZ 0x00104a62 MOV RSI,qword ptr [RBP + -0x50] ADD RSI,qword ptr [RBP + -0x60] LEA RAX,[RBP + -0x38] MOV qword ptr [RBP + -0x48],RAX LAB_00104a15: LEA RBX,[RBP + -0x48] MOV RDI,RBX MOV RDX,R12 CALL 0x001042e0 MOV R15,qword ptr [RBP + -0x88] MOV R13,qword ptr [RBP + -0x80] LAB_00104a2f: MOV RDI,qword ptr [RBP + -0x58] MOV RSI,RBX CALL 0x00105166 MOV RDI,qword ptr [RBP + -0x48] LEA RAX,[RBP + -0x38] CMP RDI,RAX MOV RBX,qword ptr [RBP + -0x60] MOV R12,qword ptr [RBP + -0x78] JZ 0x00104a5c MOV RSI,qword ptr [RBP + -0x38] INC RSI CALL 0x001032c0 LAB_00104a5c: MOV qword ptr [RBP + -0x50],R14 JMP 0x00104a75 LAB_00104a62: MOV R15,qword ptr [RBP + -0x88] MOV R13,qword ptr [RBP + -0x80] MOV RBX,qword ptr [RBP + -0x60] MOV R12,qword ptr [RBP + -0x78] LAB_00104a75: CMP R14,R15 JZ 0x00104ab7 LAB_00104a7a: CMP R14,R15 JC 0x00104964 JMP 0x00104b00 LAB_00104a85: CMP qword ptr [RBP + -0x50],R14 JZ 0x00104b00 MOV RSI,qword ptr [RBP + -0x50] ADD RSI,RBX LEA RDI,[RBP + -0x48] LEA RAX,[RBP + -0x38] MOV qword ptr [RDI],RAX ADD R14,RBX LAB_00104aa0: MOV RDX,R14 CALL 0x001042e0 LAB_00104aa8: LEA RSI,[RBP + -0x48] MOV RDI,qword ptr [RBP + -0x58] CALL 0x00105166 JMP 0x00104ae7 LAB_00104ab7: CMP qword ptr [RBP + -0x50],R15 JZ 0x00104b00 MOV RSI,qword ptr [RBP + -0x50] ADD RSI,RBX LEA RDI,[RBP + -0x48] LEA RAX,[RBP + -0x38] MOV qword ptr [RDI],RAX ADD R15,RBX LAB_00104ad2: MOV RDX,R15 CALL 0x001042e0 LAB_00104ada: LEA RSI,[RBP + -0x48] MOV RDI,qword ptr [RBP + -0x58] CALL 0x00105166 LAB_00104ae7: MOV RDI,qword ptr [RBP + -0x48] LEA RAX,[RBP + -0x38] CMP RDI,RAX JZ 0x00104b00 MOV RSI,qword ptr [RBP + -0x38] INC RSI CALL 0x001032c0 LAB_00104b00: MOV RDI,qword ptr [RBP + -0x70] CALL 0x00107c4e MOV RAX,qword ptr [RBP + -0x58] LEA RSP,[RBP + -0x28] POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* serial_cpp::Serial::readlines(unsigned long, std::__cxx11::string) */ vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> * serial_cpp::Serial::readlines (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *param_1,long param_2, ulong param_3,int8 *param_4) { SerialImpl *pSVar1; void *__s2; long lVar2; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *pvVar3; long *plVar4; size_t __n; ulong uVar5; int iVar6; long lVar7; ulong uVar8; long lVar9; ulong uVar10; ulong uVar11; bool bVar12; int8 uStack_a0; long local_98; ulong local_90; long local_88; ulong local_80; SerialImpl *local_78; int8 *local_70; long local_68; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_60; ulong local_58; long *local_50; size_t local_48; long local_40 [2]; local_78 = *(SerialImpl **)(param_2 + 8); uStack_a0 = 0x104905; local_70 = param_4; SerialImpl::readLock(local_78); *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; lVar2 = -(param_3 + 0xf & 0xfffffffffffffff0); lVar9 = (long)&local_98 + lVar2; local_60 = param_1; if (param_3 != 0) { uVar8 = local_70[1]; local_98 = -uVar8; local_58 = 0; uVar11 = 0; local_90 = param_3; local_88 = param_2; local_80 = uVar8; local_68 = lVar9; do { pSVar1 = *(SerialImpl **)(param_2 + 8); /* try { // try from 0010496c to 00104975 has its CatchHandler @ 00104b48 */ *(int8 *)((long)&uStack_a0 + lVar2) = 0x104976; lVar7 = SerialImpl::read(pSVar1,(uchar *)(lVar9 + uVar11),1); uVar11 = uVar11 + lVar7; if (lVar7 == 0) { if (local_58 != uVar11) { lVar7 = local_58 + lVar9; local_50 = local_40; /* try { // try from 00104aa0 to 00104aa7 has its CatchHandler @ 00104b22 */ *(int8 *)((long)&uStack_a0 + lVar2) = 0x104aa8; std::__cxx11::string::_M_construct<char_const*>(&local_50,lVar7,uVar11 + lVar9); pvVar3 = local_60; /* try { // try from 00104aa8 to 00104ab4 has its CatchHandler @ 00104b20 */ *(int8 *)((long)&uStack_a0 + lVar2) = 0x104ab5; std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string>(pvVar3,(string *)&local_50); LAB_00104ae7: plVar4 = local_50; if (local_50 != local_40) { *(int8 *)((long)&uStack_a0 + lVar2) = 0x104b00; operator_delete(plVar4,local_40[0] + 1); } } break; } if (uVar8 <= uVar11) { lVar7 = lVar9 + uVar11; lVar9 = lVar7 + local_98; local_50 = local_40; /* try { // try from 001049a2 to 001049ad has its CatchHandler @ 00104b46 */ *(int8 *)((long)&uStack_a0 + lVar2) = 0x1049ae; std::__cxx11::string::_M_construct<char_const*>(&local_50,lVar9,lVar7); __n = local_48; plVar4 = local_50; if (local_48 == local_70[1]) { if (local_48 == 0) { bVar12 = true; } else { __s2 = (void *)*local_70; *(int8 *)((long)&uStack_a0 + lVar2) = 0x1049d4; iVar6 = bcmp(plVar4,__s2,__n); bVar12 = iVar6 == 0; } } else { bVar12 = false; } if (plVar4 != local_40) { uVar8 = local_40[0] + 1; *(int8 *)((long)&uStack_a0 + lVar2) = 0x104a00; operator_delete(plVar4,uVar8); } lVar9 = local_68; uVar8 = local_80; param_2 = local_88; param_3 = local_90; uVar5 = local_58; if (bVar12) { lVar9 = local_58 + local_68; local_50 = local_40; /* try { // try from 00104a15 to 00104a23 has its CatchHandler @ 00104b44 */ *(int8 *)((long)&uStack_a0 + lVar2) = 0x104a24; std::__cxx11::string::_M_construct<char_const*>((string *)&local_50,lVar9,lVar7); pvVar3 = local_60; param_2 = local_88; param_3 = local_90; /* try { // try from 00104a2f to 00104a3a has its CatchHandler @ 00104b26 */ *(int8 *)((long)&uStack_a0 + lVar2) = 0x104a3b; std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string>(pvVar3,(string *)&local_50); plVar4 = local_50; lVar9 = local_68; uVar8 = local_80; uVar5 = uVar11; if (local_50 != local_40) { uVar10 = local_40[0] + 1; *(int8 *)((long)&uStack_a0 + lVar2) = 0x104a5c; operator_delete(plVar4,uVar10); } } local_58 = uVar5; if (uVar11 == param_3) { if (local_58 != param_3) { lVar7 = local_58 + lVar9; local_50 = local_40; /* try { // try from 00104ad2 to 00104ad9 has its CatchHandler @ 00104b1e */ *(int8 *)((long)&uStack_a0 + lVar2) = 0x104ada; std::__cxx11::string::_M_construct<char_const*>(&local_50,lVar7,param_3 + lVar9); pvVar3 = local_60; /* try { // try from 00104ada to 00104ae6 has its CatchHandler @ 00104b1c */ *(int8 *)((long)&uStack_a0 + lVar2) = 0x104ae7; std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string>(pvVar3,(string *)&local_50); goto LAB_00104ae7; } break; } } } while (uVar11 < param_3); } /* try { // try from 00104b00 to 00104b08 has its CatchHandler @ 00104b24 */ pSVar1 = local_78; *(int8 *)((long)&uStack_a0 + lVar2) = 0x104b09; SerialImpl::readUnlock(pSVar1); return local_60; }
49,433
eth_ssz_verification_type
corpus-core[P]colibri-stateless/src/chains/eth/ssz/verify_types.c
const ssz_def_t* eth_ssz_verification_type(eth_ssz_type_t type) { switch (type) { case ETH_SSZ_VERIFY_LIGHT_CLIENT_UPDATE_LIST: return ARRAY_TYPE(C4_REQUEST_SYNCDATA_UNION, &LIGHT_CLIENT_UPDATE_CONTAINER); case ETH_SSZ_VERIFY_LIGHT_CLIENT_UPDATE: return &LIGHT_CLIENT_UPDATE_CONTAINER; case ETH_SSZ_VERIFY_REQUEST: return &C4_REQUEST_CONTAINER; case ETH_SSZ_VERIFY_ACCOUNT_PROOF: return ARRAY_TYPE(C4_REQUEST_PROOFS_UNION, ETH_ACCOUNT_PROOF); case ETH_SSZ_VERIFY_TRANSACTION_PROOF: return ARRAY_TYPE(C4_REQUEST_PROOFS_UNION, ETH_TRANSACTION_PROOF); case ETH_SSZ_VERIFY_RECEIPT_PROOF: return ARRAY_TYPE(C4_REQUEST_PROOFS_UNION, ETH_RECEIPT_PROOF); case ETH_SSZ_VERIFY_LOGS_PROOF: return ARRAY_TYPE(C4_REQUEST_PROOFS_UNION, &ETH_LOGS_BLOCK_CONTAINER); case ETH_SSZ_VERIFY_CALL_PROOF: return ARRAY_TYPE(C4_REQUEST_PROOFS_UNION, ETH_CALL_PROOF); case ETH_SSZ_VERIFY_SYNC_PROOF: return ARRAY_TYPE(C4_REQUEST_PROOFS_UNION, ETH_SYNC_PROOF); case ETH_SSZ_VERIFY_BLOCK_PROOF: return ARRAY_TYPE(C4_REQUEST_PROOFS_UNION, ETH_BLOCK_PROOF); case ETH_SSZ_VERIFY_STATE_PROOF: return &ETH_STATE_PROOF_CONTAINER; case ETH_SSZ_DATA_NONE: return C4_REQUEST_DATA_UNION; case ETH_SSZ_DATA_HASH32: return C4_REQUEST_DATA_UNION + 1; case ETH_SSZ_DATA_BYTES: return C4_REQUEST_DATA_UNION + 2; case ETH_SSZ_DATA_UINT256: return C4_REQUEST_DATA_UNION + 3; case ETH_SSZ_DATA_TX: return C4_REQUEST_DATA_UNION + 4; case ETH_SSZ_DATA_RECEIPT: return C4_REQUEST_DATA_UNION + 5; case ETH_SSZ_DATA_LOGS: return C4_REQUEST_DATA_UNION + 6; case ETH_SSZ_DATA_BLOCK: return C4_REQUEST_DATA_UNION + 7; case ETH_SSZ_DATA_PROOF: return C4_REQUEST_DATA_UNION + 8; default: return NULL; } }
O2
c
eth_ssz_verification_type: pushq %rbx addl $-0x4, %edi cmpl $0x14, %edi ja 0x1065c leaq 0x292bc(%rip), %rax # 0x3988c movslq (%rax,%rdi,4), %rcx addq %rax, %rcx jmpq *%rcx leaq 0x44060(%rip), %rax # 0x54640 jmp 0x106e7 leaq 0x44bf4(%rip), %rax # 0x551e0 jmp 0x106e7 leaq 0x44b48(%rip), %rax # 0x55140 jmp 0x106e7 leaq 0x4415c(%rip), %rbx # 0x54760 leaq 0x44a35(%rip), %rdx # 0x55040 jmp 0x106d5 leaq 0x44b09(%rip), %rax # 0x55120 jmp 0x106e7 leaq 0x44bdd(%rip), %rax # 0x55200 jmp 0x106e7 leaq 0x44131(%rip), %rbx # 0x54760 leaq 0x4442a(%rip), %rdx # 0x54a60 jmp 0x106d5 leaq 0x4405e(%rip), %rbx # 0x546a0 leaq 0x43fd7(%rip), %rdx # 0x54620 pushq $0x2 jmp 0x106d7 leaq 0x44aa9(%rip), %rax # 0x55100 jmp 0x106e7 xorl %eax, %eax jmp 0x106e7 leaq 0x440f6(%rip), %rbx # 0x54760 leaq 0x4420f(%rip), %rdx # 0x54880 jmp 0x106d5 leaq 0x43fa6(%rip), %rax # 0x54620 jmp 0x106e7 leaq 0x43ffd(%rip), %rax # 0x54680 jmp 0x106e7 leaq 0x44ad4(%rip), %rax # 0x55160 jmp 0x106e7 leaq 0x44aeb(%rip), %rax # 0x55180 jmp 0x106e7 leaq 0x440c2(%rip), %rbx # 0x54760 leaq 0x444db(%rip), %rdx # 0x54b80 jmp 0x106d5 leaq 0x440b2(%rip), %rbx # 0x54760 leaq 0x43fab(%rip), %rdx # 0x54660 jmp 0x106d5 leaq 0x440a2(%rip), %rbx # 0x54760 leaq 0x4485b(%rip), %rdx # 0x54f20 jmp 0x106d5 leaq 0x44092(%rip), %rbx # 0x54760 leaq 0x4474b(%rip), %rdx # 0x54e20 pushq $0x8 popq %rsi movq %rbx, %rdi callq 0x106fb shlq $0x5, %rax addq %rbx, %rax popq %rbx retq leaq 0x44ad0(%rip), %rax # 0x551c0 jmp 0x106e7 leaq 0x44aa7(%rip), %rax # 0x551a0 jmp 0x106e7
eth_ssz_verification_type: push rbx add edi, 0FFFFFFFCh; switch 21 cases cmp edi, 14h ja def_105D7; jumptable 00000000000105D7 default case, case 5 lea rax, jpt_105D7 movsxd rcx, ds:(jpt_105D7 - 3988Ch)[rax+rdi*4] add rcx, rax jmp rcx; switch jump loc_105D9: lea rax, C4_REQUEST_CONTAINER; jumptable 00000000000105D7 case 4 jmp loc_106E7 loc_105E5: lea rax, off_551E0; jumptable 00000000000105D7 case 23 jmp loc_106E7 loc_105F1: lea rax, off_55140; jumptable 00000000000105D7 case 18 jmp loc_106E7 loc_105FD: lea rbx, C4_REQUEST_PROOFS_UNION; jumptable 00000000000105D7 case 15 lea rdx, ETH_BLOCK_PROOF jmp loc_106D5 loc_10610: lea rax, off_55120; jumptable 00000000000105D7 case 17 jmp loc_106E7 loc_1061C: lea rax, off_55200; jumptable 00000000000105D7 case 24 jmp loc_106E7 loc_10628: lea rbx, C4_REQUEST_PROOFS_UNION; jumptable 00000000000105D7 case 7 lea rdx, ETH_TRANSACTION_PROOF jmp loc_106D5 loc_1063B: lea rbx, C4_REQUEST_SYNCDATA_UNION; jumptable 00000000000105D7 case 10 lea rdx, LIGHT_CLIENT_UPDATE_CONTAINER push 2 jmp loc_106D7 loc_10650: lea rax, C4_REQUEST_DATA_UNION; jumptable 00000000000105D7 case 16 jmp loc_106E7 def_105D7: xor eax, eax; jumptable 00000000000105D7 default case, case 5 jmp loc_106E7 loc_10663: lea rbx, C4_REQUEST_PROOFS_UNION; jumptable 00000000000105D7 case 6 lea rdx, ETH_ACCOUNT_PROOF jmp short loc_106D5 loc_10673: lea rax, LIGHT_CLIENT_UPDATE_CONTAINER; jumptable 00000000000105D7 case 11 jmp short loc_106E7 loc_1067C: lea rax, ETH_STATE_PROOF_CONTAINER; jumptable 00000000000105D7 case 12 jmp short loc_106E7 loc_10685: lea rax, off_55160; jumptable 00000000000105D7 case 19 jmp short loc_106E7 loc_1068E: lea rax, off_55180; jumptable 00000000000105D7 case 20 jmp short loc_106E7 loc_10697: lea rbx, C4_REQUEST_PROOFS_UNION; jumptable 00000000000105D7 case 8 lea rdx, ETH_RECEIPT_PROOF jmp short loc_106D5 loc_106A7: lea rbx, C4_REQUEST_PROOFS_UNION; jumptable 00000000000105D7 case 9 lea rdx, ETH_LOGS_BLOCK_CONTAINER jmp short loc_106D5 loc_106B7: lea rbx, C4_REQUEST_PROOFS_UNION; jumptable 00000000000105D7 case 14 lea rdx, ETH_SYNC_PROOF jmp short loc_106D5 loc_106C7: lea rbx, C4_REQUEST_PROOFS_UNION; jumptable 00000000000105D7 case 13 lea rdx, ETH_CALL_PROOF loc_106D5: push 8 loc_106D7: pop rsi mov rdi, rbx call array_idx shl rax, 5 add rax, rbx loc_106E7: pop rbx retn loc_106E9: lea rax, off_551C0; jumptable 00000000000105D7 case 22 jmp short loc_106E7 loc_106F2: lea rax, off_551A0; jumptable 00000000000105D7 case 21 jmp short loc_106E7
char ** eth_ssz_verification_type(int a1) { char **result; // rax char **v2; // rbx char **v3; // rdx long long v4; // rax switch ( a1 ) { case 4: return &C4_REQUEST_CONTAINER; case 6: v2 = &C4_REQUEST_PROOFS_UNION; v3 = &ETH_ACCOUNT_PROOF; goto LABEL_21; case 7: v2 = &C4_REQUEST_PROOFS_UNION; v3 = &ETH_TRANSACTION_PROOF; goto LABEL_21; case 8: v2 = &C4_REQUEST_PROOFS_UNION; v3 = &ETH_RECEIPT_PROOF; goto LABEL_21; case 9: v2 = &C4_REQUEST_PROOFS_UNION; v3 = &ETH_LOGS_BLOCK_CONTAINER; goto LABEL_21; case 10: v2 = &C4_REQUEST_SYNCDATA_UNION; v4 = array_idx(&C4_REQUEST_SYNCDATA_UNION, 2LL, &LIGHT_CLIENT_UPDATE_CONTAINER); goto LABEL_22; case 11: return &LIGHT_CLIENT_UPDATE_CONTAINER; case 12: return &ETH_STATE_PROOF_CONTAINER; case 13: v2 = &C4_REQUEST_PROOFS_UNION; v3 = &ETH_CALL_PROOF; goto LABEL_21; case 14: v2 = &C4_REQUEST_PROOFS_UNION; v3 = &ETH_SYNC_PROOF; goto LABEL_21; case 15: v2 = &C4_REQUEST_PROOFS_UNION; v3 = &ETH_BLOCK_PROOF; LABEL_21: v4 = array_idx(&C4_REQUEST_PROOFS_UNION, 8LL, v3); LABEL_22: result = &v2[4 * v4]; break; case 16: result = &C4_REQUEST_DATA_UNION; break; case 17: result = (char **)&off_55120; break; case 18: result = (char **)&off_55140; break; case 19: result = (char **)&off_55160; break; case 20: result = &off_55180; break; case 21: result = &off_551A0; break; case 22: result = &off_551C0; break; case 23: result = &off_551E0; break; case 24: result = &off_55200; break; default: result = 0LL; break; } return result; }
eth_ssz_verification_type: PUSH RBX ADD EDI,-0x4 CMP EDI,0x14 JA 0x0011065c LEA RAX,[0x13988c] MOVSXD RCX,dword ptr [RAX + RDI*0x4] ADD RCX,RAX switchD: JMP RCX caseD_4: LEA RAX,[0x154640] JMP 0x001106e7 caseD_17: LEA RAX,[0x1551e0] JMP 0x001106e7 caseD_12: LEA RAX,[0x155140] JMP 0x001106e7 caseD_f: LEA RBX,[0x154760] LEA RDX,[0x155040] JMP 0x001106d5 caseD_11: LEA RAX,[0x155120] JMP 0x001106e7 caseD_18: LEA RAX,[0x155200] JMP 0x001106e7 caseD_7: LEA RBX,[0x154760] LEA RDX,[0x154a60] JMP 0x001106d5 caseD_a: LEA RBX,[0x1546a0] LEA RDX,[0x154620] PUSH 0x2 JMP 0x001106d7 caseD_10: LEA RAX,[0x155100] JMP 0x001106e7 caseD_5: XOR EAX,EAX JMP 0x001106e7 caseD_6: LEA RBX,[0x154760] LEA RDX,[0x154880] JMP 0x001106d5 caseD_b: LEA RAX,[0x154620] JMP 0x001106e7 caseD_c: LEA RAX,[0x154680] JMP 0x001106e7 caseD_13: LEA RAX,[0x155160] JMP 0x001106e7 caseD_14: LEA RAX,[0x155180] JMP 0x001106e7 caseD_8: LEA RBX,[0x154760] LEA RDX,[0x154b80] JMP 0x001106d5 caseD_9: LEA RBX,[0x154760] LEA RDX,[0x154660] JMP 0x001106d5 caseD_e: LEA RBX,[0x154760] LEA RDX,[0x154f20] JMP 0x001106d5 caseD_d: LEA RBX,[0x154760] LEA RDX,[0x154e20] LAB_001106d5: PUSH 0x8 LAB_001106d7: POP RSI MOV RDI,RBX CALL 0x001106fb SHL RAX,0x5 ADD RAX,RBX LAB_001106e7: POP RBX RET caseD_16: LEA RAX,[0x1551c0] JMP 0x001106e7 caseD_15: LEA RAX,[0x1551a0] JMP 0x001106e7
int1 * eth_ssz_verification_type(int4 param_1) { int1 *puVar1; long lVar2; int1 *puVar3; int8 uStack_10; switch(param_1) { case 4: puVar1 = C4_REQUEST_CONTAINER; break; default: puVar1 = (int1 *)0x0; break; case 6: puVar3 = ETH_ACCOUNT_PROOF; goto LAB_001106d5; case 7: puVar3 = ETH_TRANSACTION_PROOF; goto LAB_001106d5; case 8: puVar3 = ETH_RECEIPT_PROOF; goto LAB_001106d5; case 9: puVar3 = ETH_LOGS_BLOCK_CONTAINER; goto LAB_001106d5; case 10: puVar1 = C4_REQUEST_SYNCDATA_UNION; puVar3 = LIGHT_CLIENT_UPDATE_CONTAINER; uStack_10 = 2; goto LAB_001106d7; case 0xb: puVar1 = LIGHT_CLIENT_UPDATE_CONTAINER; break; case 0xc: puVar1 = ETH_STATE_PROOF_CONTAINER; break; case 0xd: puVar3 = ETH_CALL_PROOF; goto LAB_001106d5; case 0xe: puVar3 = ETH_SYNC_PROOF; goto LAB_001106d5; case 0xf: puVar3 = ETH_BLOCK_PROOF; LAB_001106d5: puVar1 = C4_REQUEST_PROOFS_UNION; uStack_10 = 8; LAB_001106d7: lVar2 = array_idx(puVar1,uStack_10,puVar3); puVar1 = puVar1 + lVar2 * 0x20; break; case 0x10: puVar1 = C4_REQUEST_DATA_UNION; break; case 0x11: puVar1 = (int1 *)0x155120; break; case 0x12: puVar1 = (int1 *)0x155140; break; case 0x13: puVar1 = (int1 *)0x155160; break; case 0x14: puVar1 = (int1 *)0x155180; break; case 0x15: puVar1 = (int1 *)0x1551a0; break; case 0x16: puVar1 = (int1 *)0x1551c0; break; case 0x17: puVar1 = (int1 *)0x1551e0; break; case 0x18: puVar1 = (int1 *)0x155200; } return puVar1; }
49,434
void reaction::ObserverGraph::cascadeCloseDependents<reaction::ObserverDataNode>(std::shared_ptr<reaction::ObserverDataNode>, std::unordered_set<std::shared_ptr<void>, std::hash<std::shared_ptr<void>>, std::equal_to<std::shared_ptr<void>>, std::allocator<std::shared_ptr<void>>>&)
reaction/include/reaction/observerNode.h
void cascadeCloseDependents(std::shared_ptr<NodeType> node, std::unordered_set<std::shared_ptr<void>> &closedNodes) { if (!node || closedNodes.count(node)) return; closedNodes.insert(node); if constexpr (std::is_same_v<typename NodeType::SourceType, DataNode>) { auto dataNode = std::static_pointer_cast<ObserverDataNode>(node); auto dataObservers = m_dataObservers[dataNode]; auto actionObservers = m_actionObservers[dataNode]; for (auto &[ob, fun] : dataObservers) { cascadeCloseDependents(ob, closedNodes); } for (auto &[ob, fun] : actionObservers) { cascadeCloseDependents(ob, closedNodes); } } closeNodeInternal(node); }
O0
c
void reaction::ObserverGraph::cascadeCloseDependents<reaction::ObserverDataNode>(std::shared_ptr<reaction::ObserverDataNode>, std::unordered_set<std::shared_ptr<void>, std::hash<std::shared_ptr<void>>, std::equal_to<std::shared_ptr<void>>, std::allocator<std::shared_ptr<void>>>&): pushq %rbp movq %rsp, %rbp subq $0x200, %rsp # imm = 0x200 movq %rsi, -0x190(%rbp) movq %rdi, %rax movq -0x190(%rbp), %rdi movq %rdi, -0x188(%rbp) movq %rax, -0x8(%rbp) movq %rdi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x180(%rbp) callq 0x16650 movb %al, %cl movb $0x0, -0x29(%rbp) movb $0x1, %al testb $0x1, %cl movb %al, -0x171(%rbp) jne 0x1b984 jmp 0x1b9da movq -0x188(%rbp), %rsi movq -0x18(%rbp), %rax movq %rax, -0x1a8(%rbp) leaq -0x28(%rbp), %rdi movq %rdi, -0x1a0(%rbp) callq 0x1bf80 movq -0x1a8(%rbp), %rdi movq -0x1a0(%rbp), %rsi movb $0x1, -0x29(%rbp) callq 0x1bf50 movq %rax, -0x198(%rbp) jmp 0x1b9c6 movq -0x198(%rbp), %rax cmpq $0x0, %rax setne %al movb %al, -0x171(%rbp) movb -0x171(%rbp), %al movb %al, -0x1a9(%rbp) testb $0x1, -0x29(%rbp) jne 0x1b9ee jmp 0x1b9f7 leaq -0x28(%rbp), %rdi callq 0x1bfb0 movb -0x1a9(%rbp), %al testb $0x1, %al jne 0x1ba03 jmp 0x1ba2a jmp 0x1bd8e movq %rax, %rcx movl %edx, %eax movq %rcx, -0x38(%rbp) movl %eax, -0x3c(%rbp) testb $0x1, -0x29(%rbp) jne 0x1ba1c jmp 0x1ba25 leaq -0x28(%rbp), %rdi callq 0x1bfb0 jmp 0x1bdd2 movq -0x188(%rbp), %rsi movq -0x18(%rbp), %rax movq %rax, -0x1d0(%rbp) leaq -0x50(%rbp), %rdi movq %rdi, -0x1c8(%rbp) callq 0x1bf80 movq -0x1d0(%rbp), %rdi movq -0x1c8(%rbp), %rsi callq 0x1bfd0 movb %dl, -0x1b9(%rbp) movq %rax, -0x1b8(%rbp) jmp 0x1ba6e movb -0x1b9(%rbp), %al movq -0x1b8(%rbp), %rcx movq %rcx, -0x60(%rbp) movb %al, -0x58(%rbp) leaq -0x50(%rbp), %rdi callq 0x1bfb0 movq -0x188(%rbp), %rsi leaq -0x70(%rbp), %rdi movq %rdi, -0x1e0(%rbp) callq 0x1c010 movq -0x180(%rbp), %rdi movq -0x1e0(%rbp), %rsi addq $0x38, %rdi callq 0x13210 movq %rax, -0x1d8(%rbp) jmp 0x1bac2 movq -0x1d8(%rbp), %rsi leaq -0xa8(%rbp), %rdi callq 0x18cc0 jmp 0x1bad7 movq -0x180(%rbp), %rdi addq $0x70, %rdi leaq -0x70(%rbp), %rsi callq 0x194e0 movq %rax, -0x1e8(%rbp) jmp 0x1baf4 movq -0x1e8(%rbp), %rsi leaq -0xe0(%rbp), %rdi callq 0x19510 jmp 0x1bb09 leaq -0xa8(%rbp), %rax movq %rax, -0xe8(%rbp) movq -0xe8(%rbp), %rdi callq 0x18a00 movq %rax, -0xf0(%rbp) movq -0xe8(%rbp), %rdi callq 0x18a30 movq %rax, -0xf8(%rbp) leaq -0xf0(%rbp), %rdi leaq -0xf8(%rbp), %rsi callq 0x18a60 xorb $-0x1, %al testb $0x1, %al jne 0x1bb5b jmp 0x1bc3d leaq -0xf0(%rbp), %rdi callq 0x18a90 movq %rax, -0x100(%rbp) movq -0x100(%rbp), %rdi callq 0x17d90 movq %rax, -0x108(%rbp) movq -0x100(%rbp), %rdi callq 0x18ac0 movq %rax, -0x110(%rbp) movq -0x108(%rbp), %rsi leaq -0x120(%rbp), %rdi movq %rdi, -0x1f0(%rbp) callq 0x12890 movq -0x180(%rbp), %rdi movq -0x1f0(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x1b930 jmp 0x1bbc7 leaq -0x120(%rbp), %rdi callq 0xbed0 leaq -0xf0(%rbp), %rdi callq 0x18b10 jmp 0x1bb3d movq %rax, %rcx movl %edx, %eax movq %rcx, -0x38(%rbp) movl %eax, -0x3c(%rbp) leaq -0x50(%rbp), %rdi callq 0x1bfb0 jmp 0x1bdd2 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x38(%rbp) movl %eax, -0x3c(%rbp) jmp 0x1bdaf movq %rax, %rcx movl %edx, %eax movq %rcx, -0x38(%rbp) movl %eax, -0x3c(%rbp) jmp 0x1bda3 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x38(%rbp) movl %eax, -0x3c(%rbp) leaq -0x120(%rbp), %rdi callq 0xbed0 jmp 0x1bd97 leaq -0xe0(%rbp), %rax movq %rax, -0x128(%rbp) movq -0x128(%rbp), %rdi callq 0x18b90 movq %rax, -0x130(%rbp) movq -0x128(%rbp), %rdi callq 0x18bc0 movq %rax, -0x138(%rbp) leaq -0x130(%rbp), %rdi leaq -0x138(%rbp), %rsi callq 0x18bf0 xorb $-0x1, %al testb $0x1, %al jne 0x1bc8f jmp 0x1bd32 leaq -0x130(%rbp), %rdi callq 0x18c20 movq %rax, -0x140(%rbp) movq -0x140(%rbp), %rdi callq 0x18c50 movq %rax, -0x148(%rbp) movq -0x140(%rbp), %rdi callq 0x18c70 movq %rax, -0x150(%rbp) movq -0x148(%rbp), %rsi leaq -0x160(%rbp), %rdi movq %rdi, -0x1f8(%rbp) callq 0x1a150 movq -0x180(%rbp), %rdi movq -0x1f8(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x1c060 jmp 0x1bcfb leaq -0x160(%rbp), %rdi callq 0xbbf0 leaq -0x130(%rbp), %rdi callq 0x18c90 jmp 0x1bc71 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x38(%rbp) movl %eax, -0x3c(%rbp) leaq -0x160(%rbp), %rdi callq 0xbbf0 jmp 0x1bd97 leaq -0xe0(%rbp), %rdi callq 0xc800 leaq -0xa8(%rbp), %rdi callq 0xd210 leaq -0x70(%rbp), %rdi callq 0xbed0 movq -0x188(%rbp), %rsi leaq -0x170(%rbp), %rdi movq %rdi, -0x200(%rbp) callq 0x12890 movq -0x180(%rbp), %rdi movq -0x200(%rbp), %rsi callq 0x1c220 jmp 0x1bd82 leaq -0x170(%rbp), %rdi callq 0xbed0 addq $0x200, %rsp # imm = 0x200 popq %rbp retq leaq -0xe0(%rbp), %rdi callq 0xc800 leaq -0xa8(%rbp), %rdi callq 0xd210 leaq -0x70(%rbp), %rdi callq 0xbed0 jmp 0x1bdd2 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x38(%rbp) movl %eax, -0x3c(%rbp) leaq -0x170(%rbp), %rdi callq 0xbed0 movq -0x38(%rbp), %rdi callq 0x32a0 nopl (%rax,%rax)
_ZN8reaction13ObserverGraph22cascadeCloseDependentsITkNS_6NodeCCENS_16ObserverDataNodeEEEvSt10shared_ptrIT_ERSt13unordered_setIS3_IvESt4hashIS7_ESt8equal_toIS7_ESaIS7_EE: push rbp mov rbp, rsp sub rsp, 200h mov [rbp+var_190], rsi mov rax, rdi mov rdi, [rbp+var_190] mov [rbp+var_188], rdi mov [rbp+var_8], rax mov [rbp+var_10], rdi mov [rbp+var_18], rdx mov rax, [rbp+var_8] mov [rbp+var_180], rax call _ZNKSt12__shared_ptrIN8reaction16ObserverDataNodeELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<reaction::ObserverDataNode,(__gnu_cxx::_Lock_policy)2>::operator bool(void) mov cl, al mov [rbp+var_29], 0 mov al, 1 test cl, 1 mov [rbp+var_171], al jnz short loc_1B984 jmp short loc_1B9DA loc_1B984: mov rsi, [rbp+var_188] mov rax, [rbp+var_18] mov [rbp+var_1A8], rax lea rdi, [rbp+var_28] mov [rbp+var_1A0], rdi call _ZNSt10shared_ptrIvEC2IN8reaction16ObserverDataNodeEvEERKS_IT_E; std::shared_ptr<void>::shared_ptr<reaction::ObserverDataNode,void>(std::shared_ptr const&<reaction::ObserverDataNode>) mov rdi, [rbp+var_1A8] mov rsi, [rbp+var_1A0] mov [rbp+var_29], 1 call _ZNKSt13unordered_setISt10shared_ptrIvESt4hashIS1_ESt8equal_toIS1_ESaIS1_EE5countERKS1_; std::unordered_set<std::shared_ptr<void>>::count(std::shared_ptr<void> const&) mov [rbp+var_198], rax jmp short $+2 loc_1B9C6: mov rax, [rbp+var_198] cmp rax, 0 setnz al mov [rbp+var_171], al loc_1B9DA: mov al, [rbp+var_171] mov [rbp+var_1A9], al test [rbp+var_29], 1 jnz short loc_1B9EE jmp short loc_1B9F7 loc_1B9EE: lea rdi, [rbp+var_28] call _ZNSt10shared_ptrIvED2Ev; std::shared_ptr<void>::~shared_ptr() loc_1B9F7: mov al, [rbp+var_1A9] test al, 1 jnz short loc_1BA03 jmp short loc_1BA2A loc_1BA03: jmp loc_1BD8E mov rcx, rax mov eax, edx mov [rbp+var_38], rcx mov [rbp+var_3C], eax test [rbp+var_29], 1 jnz short loc_1BA1C jmp short loc_1BA25 loc_1BA1C: lea rdi, [rbp+var_28] call _ZNSt10shared_ptrIvED2Ev; std::shared_ptr<void>::~shared_ptr() loc_1BA25: jmp loc_1BDD2 loc_1BA2A: mov rsi, [rbp+var_188] mov rax, [rbp+var_18] mov [rbp+var_1D0], rax lea rdi, [rbp+var_50] mov [rbp+var_1C8], rdi call _ZNSt10shared_ptrIvEC2IN8reaction16ObserverDataNodeEvEERKS_IT_E; std::shared_ptr<void>::shared_ptr<reaction::ObserverDataNode,void>(std::shared_ptr const&<reaction::ObserverDataNode>) mov rdi, [rbp+var_1D0] mov rsi, [rbp+var_1C8] call _ZNSt13unordered_setISt10shared_ptrIvESt4hashIS1_ESt8equal_toIS1_ESaIS1_EE6insertEOS1_; std::unordered_set<std::shared_ptr<void>>::insert(std::shared_ptr<void>&&) mov [rbp+var_1B9], dl mov [rbp+var_1B8], rax jmp short $+2 loc_1BA6E: mov al, [rbp+var_1B9] mov rcx, [rbp+var_1B8] mov [rbp+var_60], rcx mov [rbp+var_58], al lea rdi, [rbp+var_50] call _ZNSt10shared_ptrIvED2Ev; std::shared_ptr<void>::~shared_ptr() mov rsi, [rbp+var_188] lea rdi, [rbp+var_70] mov [rbp+var_1E0], rdi call _ZSt19static_pointer_castIN8reaction16ObserverDataNodeES1_ESt10shared_ptrIT_ERKS2_IT0_E; std::static_pointer_cast<reaction::ObserverDataNode,reaction::ObserverDataNode>(std::shared_ptr const&<reaction::ObserverDataNode>) mov rdi, [rbp+var_180] mov rsi, [rbp+var_1E0] add rdi, 38h ; '8' call _ZNSt13unordered_mapISt10shared_ptrIN8reaction16ObserverDataNodeEES_IS3_St8functionIFvbEESt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_S6_EEES8_SA_SaISB_ISC_SF_EEEixERSC_; std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void ()(bool)>>>::operator[](std::shared_ptr<reaction::ObserverDataNode> const&) mov [rbp+var_1D8], rax jmp short $+2 loc_1BAC2: mov rsi, [rbp+var_1D8] lea rdi, [rbp+var_A8] call _ZNSt13unordered_mapISt10shared_ptrIN8reaction16ObserverDataNodeEESt8functionIFvbEESt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_S6_EEEC2ERKSF_; std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void ()(bool)>>::unordered_map(std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void ()(bool)>> const&) jmp short $+2 loc_1BAD7: mov rdi, [rbp+var_180] add rdi, 70h ; 'p' lea rsi, [rbp+var_70] call _ZNSt13unordered_mapISt10shared_ptrIN8reaction16ObserverDataNodeEES_IS0_INS1_18ObserverActionNodeEESt8functionIFvbEESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S8_EEES9_IS3_ESB_IS3_ESaISD_IKS3_SH_EEEixERSK_; std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::unordered_map<std::shared_ptr<reaction::ObserverActionNode>,std::function<void ()(bool)>>>::operator[](std::shared_ptr<reaction::ObserverDataNode> const&) mov [rbp+var_1E8], rax jmp short $+2 loc_1BAF4: mov rsi, [rbp+var_1E8] lea rdi, [rbp+var_E0] call _ZNSt13unordered_mapISt10shared_ptrIN8reaction18ObserverActionNodeEESt8functionIFvbEESt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_S6_EEEC2ERKSF_; std::unordered_map<std::shared_ptr<reaction::ObserverActionNode>,std::function<void ()(bool)>>::unordered_map(std::unordered_map<std::shared_ptr<reaction::ObserverActionNode>,std::function<void ()(bool)>> const&) jmp short $+2 loc_1BB09: lea rax, [rbp+var_A8] mov [rbp+var_E8], rax mov rdi, [rbp+var_E8] call _ZNSt13unordered_mapISt10shared_ptrIN8reaction16ObserverDataNodeEESt8functionIFvbEESt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_S6_EEE5beginEv; std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void ()(bool)>>::begin(void) mov [rbp+var_F0], rax mov rdi, [rbp+var_E8] call _ZNSt13unordered_mapISt10shared_ptrIN8reaction16ObserverDataNodeEESt8functionIFvbEESt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_S6_EEE3endEv; std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void ()(bool)>>::end(void) mov [rbp+var_F8], rax loc_1BB3D: lea rdi, [rbp+var_F0] lea rsi, [rbp+var_F8] call _ZNSt8__detaileqERKNS_19_Node_iterator_baseISt4pairIKSt10shared_ptrIN8reaction16ObserverDataNodeEESt8functionIFvbEEELb0EEESD_; std::__detail::operator==(std::__detail::_Node_iterator_base<std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::function<void ()(bool)>>,false> const&,std::__detail::_Node_iterator_base<std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::function<void ()(bool)>>,false> const&) xor al, 0FFh test al, 1 jnz short loc_1BB5B jmp loc_1BC3D loc_1BB5B: lea rdi, [rbp+var_F0] call _ZNKSt8__detail14_Node_iteratorISt4pairIKSt10shared_ptrIN8reaction16ObserverDataNodeEESt8functionIFvbEEELb0ELb0EEdeEv; std::__detail::_Node_iterator<std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::function<void ()(bool)>>,false,false>::operator*(void) mov [rbp+var_100], rax mov rdi, [rbp+var_100] call _ZSt3getILm0EKSt10shared_ptrIN8reaction16ObserverDataNodeEESt8functionIFvbEEERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERSC_; std::get<0ul,std::shared_ptr<reaction::ObserverDataNode> const,std::function<void ()(bool)>>(std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::function<void ()(bool)>>&) mov [rbp+var_108], rax mov rdi, [rbp+var_100] call _ZSt3getILm1EKSt10shared_ptrIN8reaction16ObserverDataNodeEESt8functionIFvbEEERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERSC_; std::get<1ul,std::shared_ptr<reaction::ObserverDataNode> const,std::function<void ()(bool)>>(std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::function<void ()(bool)>>&) mov [rbp+var_110], rax mov rsi, [rbp+var_108] lea rdi, [rbp+var_120] mov [rbp+var_1F0], rdi call _ZNSt10shared_ptrIN8reaction16ObserverDataNodeEEC2ERKS2_; std::shared_ptr<reaction::ObserverDataNode>::shared_ptr(std::shared_ptr<reaction::ObserverDataNode> const&) mov rdi, [rbp+var_180] mov rsi, [rbp+var_1F0] mov rdx, [rbp+var_18] call _ZN8reaction13ObserverGraph22cascadeCloseDependentsITkNS_6NodeCCENS_16ObserverDataNodeEEEvSt10shared_ptrIT_ERSt13unordered_setIS3_IvESt4hashIS7_ESt8equal_toIS7_ESaIS7_EE jmp short $+2 loc_1BBC7: lea rdi, [rbp+var_120] call _ZNSt10shared_ptrIN8reaction16ObserverDataNodeEED2Ev; std::shared_ptr<reaction::ObserverDataNode>::~shared_ptr() lea rdi, [rbp+var_F0] call _ZNSt8__detail14_Node_iteratorISt4pairIKSt10shared_ptrIN8reaction16ObserverDataNodeEESt8functionIFvbEEELb0ELb0EEppEv; std::__detail::_Node_iterator<std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::function<void ()(bool)>>,false,false>::operator++(void) jmp loc_1BB3D mov rcx, rax mov eax, edx mov [rbp+var_38], rcx mov [rbp+var_3C], eax lea rdi, [rbp+var_50] call _ZNSt10shared_ptrIvED2Ev; std::shared_ptr<void>::~shared_ptr() jmp loc_1BDD2 mov rcx, rax mov eax, edx mov [rbp+var_38], rcx mov [rbp+var_3C], eax jmp loc_1BDAF mov rcx, rax mov eax, edx mov [rbp+var_38], rcx mov [rbp+var_3C], eax jmp loc_1BDA3 mov rcx, rax mov eax, edx mov [rbp+var_38], rcx mov [rbp+var_3C], eax lea rdi, [rbp+var_120] call _ZNSt10shared_ptrIN8reaction16ObserverDataNodeEED2Ev; std::shared_ptr<reaction::ObserverDataNode>::~shared_ptr() jmp loc_1BD97 loc_1BC3D: lea rax, [rbp+var_E0] mov [rbp+var_128], rax mov rdi, [rbp+var_128] call _ZNSt13unordered_mapISt10shared_ptrIN8reaction18ObserverActionNodeEESt8functionIFvbEESt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_S6_EEE5beginEv; std::unordered_map<std::shared_ptr<reaction::ObserverActionNode>,std::function<void ()(bool)>>::begin(void) mov [rbp+var_130], rax mov rdi, [rbp+var_128] call _ZNSt13unordered_mapISt10shared_ptrIN8reaction18ObserverActionNodeEESt8functionIFvbEESt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_S6_EEE3endEv; std::unordered_map<std::shared_ptr<reaction::ObserverActionNode>,std::function<void ()(bool)>>::end(void) mov [rbp+var_138], rax loc_1BC71: lea rdi, [rbp+var_130] lea rsi, [rbp+var_138] call _ZNSt8__detaileqERKNS_19_Node_iterator_baseISt4pairIKSt10shared_ptrIN8reaction18ObserverActionNodeEESt8functionIFvbEEELb0EEESD_; std::__detail::operator==(std::__detail::_Node_iterator_base<std::pair<std::shared_ptr<reaction::ObserverActionNode> const,std::function<void ()(bool)>>,false> const&,std::__detail::_Node_iterator_base<std::pair<std::shared_ptr<reaction::ObserverActionNode> const,std::function<void ()(bool)>>,false> const&) xor al, 0FFh test al, 1 jnz short loc_1BC8F jmp loc_1BD32 loc_1BC8F: lea rdi, [rbp+var_130] call _ZNKSt8__detail14_Node_iteratorISt4pairIKSt10shared_ptrIN8reaction18ObserverActionNodeEESt8functionIFvbEEELb0ELb0EEdeEv; std::__detail::_Node_iterator<std::pair<std::shared_ptr<reaction::ObserverActionNode> const,std::function<void ()(bool)>>,false,false>::operator*(void) mov [rbp+var_140], rax mov rdi, [rbp+var_140] call _ZSt3getILm0EKSt10shared_ptrIN8reaction18ObserverActionNodeEESt8functionIFvbEEERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERSC_; std::get<0ul,std::shared_ptr<reaction::ObserverActionNode> const,std::function<void ()(bool)>>(std::pair<std::shared_ptr<reaction::ObserverActionNode> const,std::function<void ()(bool)>>&) mov [rbp+var_148], rax mov rdi, [rbp+var_140] call _ZSt3getILm1EKSt10shared_ptrIN8reaction18ObserverActionNodeEESt8functionIFvbEEERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERSC_; std::get<1ul,std::shared_ptr<reaction::ObserverActionNode> const,std::function<void ()(bool)>>(std::pair<std::shared_ptr<reaction::ObserverActionNode> const,std::function<void ()(bool)>>&) mov [rbp+var_150], rax mov rsi, [rbp+var_148] lea rdi, [rbp+var_160] mov [rbp+var_1F8], rdi call _ZNSt10shared_ptrIN8reaction18ObserverActionNodeEEC2ERKS2_; std::shared_ptr<reaction::ObserverActionNode>::shared_ptr(std::shared_ptr<reaction::ObserverActionNode> const&) mov rdi, [rbp+var_180] mov rsi, [rbp+var_1F8] mov rdx, [rbp+var_18] call _ZN8reaction13ObserverGraph22cascadeCloseDependentsITkNS_6NodeCCENS_18ObserverActionNodeEEEvSt10shared_ptrIT_ERSt13unordered_setIS3_IvESt4hashIS7_ESt8equal_toIS7_ESaIS7_EE jmp short $+2 loc_1BCFB: lea rdi, [rbp+var_160] call _ZNSt10shared_ptrIN8reaction18ObserverActionNodeEED2Ev; std::shared_ptr<reaction::ObserverActionNode>::~shared_ptr() lea rdi, [rbp+var_130] call _ZNSt8__detail14_Node_iteratorISt4pairIKSt10shared_ptrIN8reaction18ObserverActionNodeEESt8functionIFvbEEELb0ELb0EEppEv; std::__detail::_Node_iterator<std::pair<std::shared_ptr<reaction::ObserverActionNode> const,std::function<void ()(bool)>>,false,false>::operator++(void) jmp loc_1BC71 mov rcx, rax mov eax, edx mov [rbp+var_38], rcx mov [rbp+var_3C], eax lea rdi, [rbp+var_160] call _ZNSt10shared_ptrIN8reaction18ObserverActionNodeEED2Ev; std::shared_ptr<reaction::ObserverActionNode>::~shared_ptr() jmp short loc_1BD97 loc_1BD32: lea rdi, [rbp+var_E0] call _ZNSt13unordered_mapISt10shared_ptrIN8reaction18ObserverActionNodeEESt8functionIFvbEESt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_S6_EEED2Ev; std::unordered_map<std::shared_ptr<reaction::ObserverActionNode>,std::function<void ()(bool)>>::~unordered_map() lea rdi, [rbp+var_A8] call _ZNSt13unordered_mapISt10shared_ptrIN8reaction16ObserverDataNodeEESt8functionIFvbEESt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_S6_EEED2Ev; std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void ()(bool)>>::~unordered_map() lea rdi, [rbp+var_70] call _ZNSt10shared_ptrIN8reaction16ObserverDataNodeEED2Ev; std::shared_ptr<reaction::ObserverDataNode>::~shared_ptr() mov rsi, [rbp+var_188] lea rdi, [rbp+var_170] mov [rbp+var_200], rdi call _ZNSt10shared_ptrIN8reaction16ObserverDataNodeEEC2ERKS2_; std::shared_ptr<reaction::ObserverDataNode>::shared_ptr(std::shared_ptr<reaction::ObserverDataNode> const&) mov rdi, [rbp+var_180] mov rsi, [rbp+var_200] call _ZN8reaction13ObserverGraph17closeNodeInternalITkNS_6NodeCCENS_16ObserverDataNodeEEEvSt10shared_ptrIT_E jmp short $+2 loc_1BD82: lea rdi, [rbp+var_170] call _ZNSt10shared_ptrIN8reaction16ObserverDataNodeEED2Ev; std::shared_ptr<reaction::ObserverDataNode>::~shared_ptr() loc_1BD8E: add rsp, 200h pop rbp retn loc_1BD97: lea rdi, [rbp+var_E0] call _ZNSt13unordered_mapISt10shared_ptrIN8reaction18ObserverActionNodeEESt8functionIFvbEESt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_S6_EEED2Ev; std::unordered_map<std::shared_ptr<reaction::ObserverActionNode>,std::function<void ()(bool)>>::~unordered_map() loc_1BDA3: lea rdi, [rbp+var_A8] call _ZNSt13unordered_mapISt10shared_ptrIN8reaction16ObserverDataNodeEESt8functionIFvbEESt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_S6_EEED2Ev; std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void ()(bool)>>::~unordered_map() loc_1BDAF: lea rdi, [rbp+var_70] call _ZNSt10shared_ptrIN8reaction16ObserverDataNodeEED2Ev; std::shared_ptr<reaction::ObserverDataNode>::~shared_ptr() jmp short loc_1BDD2 mov rcx, rax mov eax, edx mov [rbp+var_38], rcx mov [rbp+var_3C], eax lea rdi, [rbp+var_170] call _ZNSt10shared_ptrIN8reaction16ObserverDataNodeEED2Ev; std::shared_ptr<reaction::ObserverDataNode>::~shared_ptr() loc_1BDD2: mov rdi, [rbp+var_38] call __Unwind_Resume
char ZN8reaction13ObserverGraph22cascadeCloseDependentsITkNS_6NodeCCENS_16ObserverDataNodeEEEvSt10shared_ptrIT_ERSt13unordered_setIS3_IvESt4hashIS7_ESt8equal_toIS7_ESaIS7_EE( long long a1, _QWORD *a2, long long a3) { char result; // al char v4; // dl long long v5; // [rsp+18h] [rbp-1E8h] long long v6; // [rsp+28h] [rbp-1D8h] long long v7; // [rsp+30h] [rbp-1D0h] long long v8; // [rsp+58h] [rbp-1A8h] bool v9; // [rsp+8Fh] [rbp-171h] _BYTE v10[16]; // [rsp+90h] [rbp-170h] BYREF _BYTE v11[16]; // [rsp+A0h] [rbp-160h] BYREF long long v12; // [rsp+B0h] [rbp-150h] long long v13; // [rsp+B8h] [rbp-148h] long long v14; // [rsp+C0h] [rbp-140h] long long v15; // [rsp+C8h] [rbp-138h] BYREF _QWORD v16[2]; // [rsp+D0h] [rbp-130h] BYREF _BYTE v17[16]; // [rsp+E0h] [rbp-120h] BYREF long long v18; // [rsp+F0h] [rbp-110h] long long v19; // [rsp+F8h] [rbp-108h] long long v20; // [rsp+100h] [rbp-100h] long long v21; // [rsp+108h] [rbp-F8h] BYREF _QWORD v22[2]; // [rsp+110h] [rbp-F0h] BYREF _BYTE v23[56]; // [rsp+120h] [rbp-E0h] BYREF _BYTE v24[56]; // [rsp+158h] [rbp-A8h] BYREF _BYTE v25[16]; // [rsp+190h] [rbp-70h] BYREF long long v26; // [rsp+1A0h] [rbp-60h] char v27; // [rsp+1A8h] [rbp-58h] _BYTE v28[20]; // [rsp+1B0h] [rbp-50h] BYREF char v29; // [rsp+1D7h] [rbp-29h] _BYTE v30[16]; // [rsp+1D8h] [rbp-28h] BYREF long long v31; // [rsp+1E8h] [rbp-18h] _QWORD *v32; // [rsp+1F0h] [rbp-10h] long long v33; // [rsp+1F8h] [rbp-8h] v33 = a1; v32 = a2; v31 = a3; v29 = 0; v9 = 1; if ( std::__shared_ptr<reaction::ObserverDataNode,(__gnu_cxx::_Lock_policy)2>::operator bool(a2) ) { v8 = v31; std::shared_ptr<void>::shared_ptr<reaction::ObserverDataNode,void>(v30, a2); v29 = 1; v9 = std::unordered_set<std::shared_ptr<void>>::count(v8, v30) != 0; } if ( (v29 & 1) != 0 ) std::shared_ptr<void>::~shared_ptr(v30); result = v9; if ( !v9 ) { v7 = v31; std::shared_ptr<void>::shared_ptr<reaction::ObserverDataNode,void>(v28, a2); v26 = std::unordered_set<std::shared_ptr<void>>::insert(v7, v28); v27 = v4; std::shared_ptr<void>::~shared_ptr(v28); std::static_pointer_cast<reaction::ObserverDataNode,reaction::ObserverDataNode>(v25, a2); v6 = std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void ()(bool)>>>::operator[]( a1 + 56, (long long)v25); std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void ()(bool)>>::unordered_map( (long long)v24, v6); v5 = std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::unordered_map<std::shared_ptr<reaction::ObserverActionNode>,std::function<void ()(bool)>>>::operator[]( a1 + 112, (long long)v25); std::unordered_map<std::shared_ptr<reaction::ObserverActionNode>,std::function<void ()(bool)>>::unordered_map( (long long)v23, v5); v22[1] = v24; v22[0] = std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void ()(bool)>>::begin((long long)v24); v21 = std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void ()(bool)>>::end((long long)v24); while ( !std::__detail::operator==(v22, &v21) ) { v20 = std::__detail::_Node_iterator<std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::function<void ()(bool)>>,false,false>::operator*(v22); v19 = std::get<0ul,std::shared_ptr<reaction::ObserverDataNode> const,std::function<void ()(bool)>>(v20); v18 = std::get<1ul,std::shared_ptr<reaction::ObserverDataNode> const,std::function<void ()(bool)>>(v20); std::shared_ptr<reaction::ObserverDataNode>::shared_ptr((long long)v17, v19); ZN8reaction13ObserverGraph22cascadeCloseDependentsITkNS_6NodeCCENS_16ObserverDataNodeEEEvSt10shared_ptrIT_ERSt13unordered_setIS3_IvESt4hashIS7_ESt8equal_toIS7_ESaIS7_EE( a1, v17, v31); std::shared_ptr<reaction::ObserverDataNode>::~shared_ptr((long long)v17); std::__detail::_Node_iterator<std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::function<void ()(bool)>>,false,false>::operator++((long long)v22); } v16[1] = v23; v16[0] = std::unordered_map<std::shared_ptr<reaction::ObserverActionNode>,std::function<void ()(bool)>>::begin((long long)v23); v15 = std::unordered_map<std::shared_ptr<reaction::ObserverActionNode>,std::function<void ()(bool)>>::end((long long)v23); while ( !std::__detail::operator==(v16, &v15) ) { v14 = std::__detail::_Node_iterator<std::pair<std::shared_ptr<reaction::ObserverActionNode> const,std::function<void ()(bool)>>,false,false>::operator*(v16); v13 = std::get<0ul,std::shared_ptr<reaction::ObserverActionNode> const,std::function<void ()(bool)>>(v14); v12 = std::get<1ul,std::shared_ptr<reaction::ObserverActionNode> const,std::function<void ()(bool)>>(v14); std::shared_ptr<reaction::ObserverActionNode>::shared_ptr((long long)v11, v13); ZN8reaction13ObserverGraph22cascadeCloseDependentsITkNS_6NodeCCENS_18ObserverActionNodeEEEvSt10shared_ptrIT_ERSt13unordered_setIS3_IvESt4hashIS7_ESt8equal_toIS7_ESaIS7_EE( a1, v11, v31); std::shared_ptr<reaction::ObserverActionNode>::~shared_ptr((long long)v11); std::__detail::_Node_iterator<std::pair<std::shared_ptr<reaction::ObserverActionNode> const,std::function<void ()(bool)>>,false,false>::operator++((long long)v16); } std::unordered_map<std::shared_ptr<reaction::ObserverActionNode>,std::function<void ()(bool)>>::~unordered_map((long long)v23); std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void ()(bool)>>::~unordered_map((long long)v24); std::shared_ptr<reaction::ObserverDataNode>::~shared_ptr((long long)v25); std::shared_ptr<reaction::ObserverDataNode>::shared_ptr((long long)v10, (long long)a2); ZN8reaction13ObserverGraph17closeNodeInternalITkNS_6NodeCCENS_16ObserverDataNodeEEEvSt10shared_ptrIT_E(a1, v10); return std::shared_ptr<reaction::ObserverDataNode>::~shared_ptr((long long)v10); } return result; }
_ZN8reaction13ObserverGraph22cascadeCloseDependentsITkNS_6NodeCCENS_16ObserverDataNodeEEEvSt10shared_ptrIT_ERSt13unordered_setIS3_IvESt4hashIS7_ESt8equal_toIS7_ESaIS7_EE: PUSH RBP MOV RBP,RSP SUB RSP,0x200 MOV qword ptr [RBP + -0x190],RSI MOV RAX,RDI MOV RDI,qword ptr [RBP + -0x190] MOV qword ptr [RBP + -0x188],RDI MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x180],RAX CALL 0x00116650 MOV CL,AL MOV byte ptr [RBP + -0x29],0x0 MOV AL,0x1 TEST CL,0x1 MOV byte ptr [RBP + -0x171],AL JNZ 0x0011b984 JMP 0x0011b9da LAB_0011b984: MOV RSI,qword ptr [RBP + -0x188] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x1a8],RAX LEA RDI,[RBP + -0x28] MOV qword ptr [RBP + -0x1a0],RDI CALL 0x0011bf80 MOV RDI,qword ptr [RBP + -0x1a8] MOV RSI,qword ptr [RBP + -0x1a0] MOV byte ptr [RBP + -0x29],0x1 LAB_0011b9b8: CALL 0x0011bf50 MOV qword ptr [RBP + -0x198],RAX JMP 0x0011b9c6 LAB_0011b9c6: MOV RAX,qword ptr [RBP + -0x198] CMP RAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x171],AL LAB_0011b9da: MOV AL,byte ptr [RBP + -0x171] MOV byte ptr [RBP + -0x1a9],AL TEST byte ptr [RBP + -0x29],0x1 JNZ 0x0011b9ee JMP 0x0011b9f7 LAB_0011b9ee: LEA RDI,[RBP + -0x28] CALL 0x0011bfb0 LAB_0011b9f7: MOV AL,byte ptr [RBP + -0x1a9] TEST AL,0x1 JNZ 0x0011ba03 JMP 0x0011ba2a LAB_0011ba03: JMP 0x0011bd8e LAB_0011ba2a: MOV RSI,qword ptr [RBP + -0x188] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x1d0],RAX LEA RDI,[RBP + -0x50] MOV qword ptr [RBP + -0x1c8],RDI CALL 0x0011bf80 MOV RDI,qword ptr [RBP + -0x1d0] MOV RSI,qword ptr [RBP + -0x1c8] LAB_0011ba5a: CALL 0x0011bfd0 MOV byte ptr [RBP + -0x1b9],DL MOV qword ptr [RBP + -0x1b8],RAX JMP 0x0011ba6e LAB_0011ba6e: MOV AL,byte ptr [RBP + -0x1b9] MOV RCX,qword ptr [RBP + -0x1b8] MOV qword ptr [RBP + -0x60],RCX MOV byte ptr [RBP + -0x58],AL LEA RDI,[RBP + -0x50] CALL 0x0011bfb0 MOV RSI,qword ptr [RBP + -0x188] LEA RDI,[RBP + -0x70] MOV qword ptr [RBP + -0x1e0],RDI CALL 0x0011c010 MOV RDI,qword ptr [RBP + -0x180] MOV RSI,qword ptr [RBP + -0x1e0] ADD RDI,0x38 LAB_0011bab4: CALL 0x00113210 MOV qword ptr [RBP + -0x1d8],RAX JMP 0x0011bac2 LAB_0011bac2: MOV RSI,qword ptr [RBP + -0x1d8] LEA RDI,[RBP + -0xa8] CALL 0x00118cc0 JMP 0x0011bad7 LAB_0011bad7: MOV RDI,qword ptr [RBP + -0x180] ADD RDI,0x70 LAB_0011bae2: LEA RSI,[RBP + -0x70] CALL 0x001194e0 MOV qword ptr [RBP + -0x1e8],RAX JMP 0x0011baf4 LAB_0011baf4: MOV RSI,qword ptr [RBP + -0x1e8] LEA RDI,[RBP + -0xe0] CALL 0x00119510 JMP 0x0011bb09 LAB_0011bb09: LEA RAX,[RBP + -0xa8] MOV qword ptr [RBP + -0xe8],RAX MOV RDI,qword ptr [RBP + -0xe8] CALL 0x00118a00 MOV qword ptr [RBP + -0xf0],RAX MOV RDI,qword ptr [RBP + -0xe8] CALL 0x00118a30 MOV qword ptr [RBP + -0xf8],RAX LAB_0011bb3d: LEA RDI,[RBP + -0xf0] LEA RSI,[RBP + -0xf8] CALL 0x00118a60 XOR AL,0xff TEST AL,0x1 JNZ 0x0011bb5b JMP 0x0011bc3d LAB_0011bb5b: LEA RDI,[RBP + -0xf0] CALL 0x00118a90 MOV qword ptr [RBP + -0x100],RAX MOV RDI,qword ptr [RBP + -0x100] CALL 0x00117d90 MOV qword ptr [RBP + -0x108],RAX MOV RDI,qword ptr [RBP + -0x100] CALL 0x00118ac0 MOV qword ptr [RBP + -0x110],RAX MOV RSI,qword ptr [RBP + -0x108] LEA RDI,[RBP + -0x120] MOV qword ptr [RBP + -0x1f0],RDI CALL 0x00112890 MOV RDI,qword ptr [RBP + -0x180] MOV RSI,qword ptr [RBP + -0x1f0] MOV RDX,qword ptr [RBP + -0x18] LAB_0011bbc0: CALL 0x0011b930 JMP 0x0011bbc7 LAB_0011bbc7: LEA RDI,[RBP + -0x120] CALL 0x0010bed0 LEA RDI,[RBP + -0xf0] CALL 0x00118b10 JMP 0x0011bb3d LAB_0011bc3d: LEA RAX,[RBP + -0xe0] MOV qword ptr [RBP + -0x128],RAX MOV RDI,qword ptr [RBP + -0x128] CALL 0x00118b90 MOV qword ptr [RBP + -0x130],RAX MOV RDI,qword ptr [RBP + -0x128] CALL 0x00118bc0 MOV qword ptr [RBP + -0x138],RAX LAB_0011bc71: LEA RDI,[RBP + -0x130] LEA RSI,[RBP + -0x138] CALL 0x00118bf0 XOR AL,0xff TEST AL,0x1 JNZ 0x0011bc8f JMP 0x0011bd32 LAB_0011bc8f: LEA RDI,[RBP + -0x130] CALL 0x00118c20 MOV qword ptr [RBP + -0x140],RAX MOV RDI,qword ptr [RBP + -0x140] CALL 0x00118c50 MOV qword ptr [RBP + -0x148],RAX MOV RDI,qword ptr [RBP + -0x140] CALL 0x00118c70 MOV qword ptr [RBP + -0x150],RAX MOV RSI,qword ptr [RBP + -0x148] LEA RDI,[RBP + -0x160] MOV qword ptr [RBP + -0x1f8],RDI CALL 0x0011a150 MOV RDI,qword ptr [RBP + -0x180] MOV RSI,qword ptr [RBP + -0x1f8] MOV RDX,qword ptr [RBP + -0x18] LAB_0011bcf4: CALL 0x0011c060 JMP 0x0011bcfb LAB_0011bcfb: LEA RDI,[RBP + -0x160] CALL 0x0010bbf0 LEA RDI,[RBP + -0x130] CALL 0x00118c90 JMP 0x0011bc71 LAB_0011bd32: LEA RDI,[RBP + -0xe0] CALL 0x0010c800 LEA RDI,[RBP + -0xa8] CALL 0x0010d210 LEA RDI,[RBP + -0x70] CALL 0x0010bed0 MOV RSI,qword ptr [RBP + -0x188] LEA RDI,[RBP + -0x170] MOV qword ptr [RBP + -0x200],RDI CALL 0x00112890 MOV RDI,qword ptr [RBP + -0x180] MOV RSI,qword ptr [RBP + -0x200] LAB_0011bd7b: CALL 0x0011c220 LAB_0011bd80: JMP 0x0011bd82 LAB_0011bd82: LEA RDI,[RBP + -0x170] CALL 0x0010bed0 LAB_0011bd8e: ADD RSP,0x200 POP RBP RET
void _ZN8reaction13ObserverGraph22cascadeCloseDependentsITkNS_6NodeCCENS_16ObserverDataNodeEEEvSt10shared_ptrIT_ERSt13unordered_setIS3_IvESt4hashIS7_ESt8equal_toIS7_ESaIS7_EE (long param_1,__shared_ptr *param_2, unordered_set<std::shared_ptr<void>,std::hash<std::shared_ptr<void>>,std::equal_to<std::shared_ptr<void>>,std::allocator<std::shared_ptr<void>>> *param_3) { unordered_set<std::shared_ptr<void>,std::hash<std::shared_ptr<void>>,std::equal_to<std::shared_ptr<void>>,std::allocator<std::shared_ptr<void>>> *puVar1; bool bVar2; byte bVar3; long lVar4; unordered_map *puVar5; int1 extraout_DL; bool bVar6; shared_ptr<reaction::ObserverDataNode> local_178 [16]; shared_ptr<reaction::ObserverActionNode> local_168 [16]; type *local_158; type *local_150; pair *local_148; int8 local_140; int8 local_138; unordered_map<std::shared_ptr<reaction::ObserverActionNode>,std::function<void(bool)>,std::hash<std::shared_ptr<reaction::ObserverActionNode>>,std::equal_to<std::shared_ptr<reaction::ObserverActionNode>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverActionNode>const,std::function<void(bool)>>>> *local_130; shared_ptr<reaction::ObserverDataNode> local_128 [16]; type *local_118; type *local_110; pair *local_108; int8 local_100; int8 local_f8; unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void(bool)>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::function<void(bool)>>>> *local_f0; unordered_map<std::shared_ptr<reaction::ObserverActionNode>,std::function<void(bool)>,std::hash<std::shared_ptr<reaction::ObserverActionNode>>,std::equal_to<std::shared_ptr<reaction::ObserverActionNode>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverActionNode>const,std::function<void(bool)>>>> local_e8 [56]; unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void(bool)>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::function<void(bool)>>>> local_b0 [56]; shared_ptr<reaction::ObserverDataNode> local_78 [16]; int8 local_68; int1 local_60; shared_ptr<void> local_58 [39]; byte local_31; shared_ptr<void> local_30 [16]; unordered_set<std::shared_ptr<void>,std::hash<std::shared_ptr<void>>,std::equal_to<std::shared_ptr<void>>,std::allocator<std::shared_ptr<void>>> *local_20; __shared_ptr *local_18; long local_10; local_20 = param_3; local_18 = param_2; local_10 = param_1; bVar2 = std::__shared_ptr::operator_cast_to_bool(param_2); puVar1 = local_20; local_31 = 0; bVar6 = true; if (bVar2) { std::shared_ptr<void>::shared_ptr<reaction::ObserverDataNode,void>(local_30,param_2); local_31 = 1; /* try { // try from 0011b9b8 to 0011b9bc has its CatchHandler @ 0011ba08 */ lVar4 = std:: unordered_set<std::shared_ptr<void>,std::hash<std::shared_ptr<void>>,std::equal_to<std::shared_ptr<void>>,std::allocator<std::shared_ptr<void>>> ::count(puVar1,local_30); bVar6 = lVar4 != 0; } if ((local_31 & 1) != 0) { std::shared_ptr<void>::~shared_ptr(local_30); } puVar1 = local_20; if (!bVar6) { std::shared_ptr<void>::shared_ptr<reaction::ObserverDataNode,void>(local_58,param_2); /* try { // try from 0011ba5a to 0011ba5e has its CatchHandler @ 0011bbe4 */ local_68 = std:: unordered_set<std::shared_ptr<void>,std::hash<std::shared_ptr<void>>,std::equal_to<std::shared_ptr<void>>,std::allocator<std::shared_ptr<void>>> ::insert(puVar1,local_58); local_60 = extraout_DL; std::shared_ptr<void>::~shared_ptr(local_58); std::static_pointer_cast<reaction::ObserverDataNode,reaction::ObserverDataNode>(local_78); /* try { // try from 0011bab4 to 0011bad4 has its CatchHandler @ 0011bbfe */ puVar5 = (unordered_map *) std:: unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void(bool)>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::function<void(bool)>>>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void(bool)>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::function<void(bool)>>>>>>> ::operator[]((unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void(bool)>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::function<void(bool)>>>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void(bool)>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::function<void(bool)>>>>>>> *)(param_1 + 0x38),local_78); std:: unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void(bool)>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::function<void(bool)>>>> ::unordered_map(local_b0,puVar5); /* try { // try from 0011bae2 to 0011bb06 has its CatchHandler @ 0011bc0f */ puVar5 = (unordered_map *) std:: unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::unordered_map<std::shared_ptr<reaction::ObserverActionNode>,std::function<void(bool)>,std::hash<std::shared_ptr<reaction::ObserverActionNode>>,std::equal_to<std::shared_ptr<reaction::ObserverActionNode>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverActionNode>const,std::function<void(bool)>>>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::unordered_map<std::shared_ptr<reaction::ObserverActionNode>,std::function<void(bool)>,std::hash<std::shared_ptr<reaction::ObserverActionNode>>,std::equal_to<std::shared_ptr<reaction::ObserverActionNode>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverActionNode>const,std::function<void(bool)>>>>>>> ::operator[]((unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::unordered_map<std::shared_ptr<reaction::ObserverActionNode>,std::function<void(bool)>,std::hash<std::shared_ptr<reaction::ObserverActionNode>>,std::equal_to<std::shared_ptr<reaction::ObserverActionNode>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverActionNode>const,std::function<void(bool)>>>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::unordered_map<std::shared_ptr<reaction::ObserverActionNode>,std::function<void(bool)>,std::hash<std::shared_ptr<reaction::ObserverActionNode>>,std::equal_to<std::shared_ptr<reaction::ObserverActionNode>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverActionNode>const,std::function<void(bool)>>>>>>> *)(param_1 + 0x70),local_78); std:: unordered_map<std::shared_ptr<reaction::ObserverActionNode>,std::function<void(bool)>,std::hash<std::shared_ptr<reaction::ObserverActionNode>>,std::equal_to<std::shared_ptr<reaction::ObserverActionNode>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverActionNode>const,std::function<void(bool)>>>> ::unordered_map(local_e8,puVar5); local_f0 = local_b0; local_f8 = std:: unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void(bool)>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::function<void(bool)>>>> ::begin(local_f0); local_100 = std:: unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void(bool)>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::function<void(bool)>>>> ::end(); while (bVar3 = std::__detail::operator== ((_Node_iterator_base *)&local_f8,(_Node_iterator_base *)&local_100), ((bVar3 ^ 0xff) & 1) != 0) { local_108 = (pair *)std::__detail:: _Node_iterator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::function<void(bool)>>,false,false> ::operator*((_Node_iterator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::function<void(bool)>>,false,false> *)&local_f8); local_110 = std:: get<0ul,std::shared_ptr<reaction::ObserverDataNode>const,std::function<void(bool)>> (local_108); local_118 = std:: get<1ul,std::shared_ptr<reaction::ObserverDataNode>const,std::function<void(bool)>> (local_108); std::shared_ptr<reaction::ObserverDataNode>::shared_ptr(local_128,local_110); /* try { // try from 0011bbc0 to 0011bbc4 has its CatchHandler @ 0011bc20 */ _ZN8reaction13ObserverGraph22cascadeCloseDependentsITkNS_6NodeCCENS_16ObserverDataNodeEEEvSt10shared_ptrIT_ERSt13unordered_setIS3_IvESt4hashIS7_ESt8equal_toIS7_ESaIS7_EE (param_1,local_128,local_20); std::shared_ptr<reaction::ObserverDataNode>::~shared_ptr(local_128); std::__detail:: _Node_iterator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::function<void(bool)>>,false,false> ::operator++((_Node_iterator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::function<void(bool)>>,false,false> *)&local_f8); } local_130 = local_e8; local_138 = std:: unordered_map<std::shared_ptr<reaction::ObserverActionNode>,std::function<void(bool)>,std::hash<std::shared_ptr<reaction::ObserverActionNode>>,std::equal_to<std::shared_ptr<reaction::ObserverActionNode>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverActionNode>const,std::function<void(bool)>>>> ::begin(local_130); local_140 = std:: unordered_map<std::shared_ptr<reaction::ObserverActionNode>,std::function<void(bool)>,std::hash<std::shared_ptr<reaction::ObserverActionNode>>,std::equal_to<std::shared_ptr<reaction::ObserverActionNode>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverActionNode>const,std::function<void(bool)>>>> ::end(); while (bVar3 = std::__detail::operator== ((_Node_iterator_base *)&local_138,(_Node_iterator_base *)&local_140), ((bVar3 ^ 0xff) & 1) != 0) { local_148 = (pair *)std::__detail:: _Node_iterator<std::pair<std::shared_ptr<reaction::ObserverActionNode>const,std::function<void(bool)>>,false,false> ::operator*((_Node_iterator<std::pair<std::shared_ptr<reaction::ObserverActionNode>const,std::function<void(bool)>>,false,false> *)&local_138); local_150 = std:: get<0ul,std::shared_ptr<reaction::ObserverActionNode>const,std::function<void(bool)>> (local_148); local_158 = std:: get<1ul,std::shared_ptr<reaction::ObserverActionNode>const,std::function<void(bool)>> (local_148); std::shared_ptr<reaction::ObserverActionNode>::shared_ptr(local_168,local_150); /* try { // try from 0011bcf4 to 0011bcf8 has its CatchHandler @ 0011bd18 */ _ZN8reaction13ObserverGraph22cascadeCloseDependentsITkNS_6NodeCCENS_18ObserverActionNodeEEEvSt10shared_ptrIT_ERSt13unordered_setIS3_IvESt4hashIS7_ESt8equal_toIS7_ESaIS7_EE (param_1,local_168,local_20); std::shared_ptr<reaction::ObserverActionNode>::~shared_ptr(local_168); std::__detail:: _Node_iterator<std::pair<std::shared_ptr<reaction::ObserverActionNode>const,std::function<void(bool)>>,false,false> ::operator++((_Node_iterator<std::pair<std::shared_ptr<reaction::ObserverActionNode>const,std::function<void(bool)>>,false,false> *)&local_138); } std:: unordered_map<std::shared_ptr<reaction::ObserverActionNode>,std::function<void(bool)>,std::hash<std::shared_ptr<reaction::ObserverActionNode>>,std::equal_to<std::shared_ptr<reaction::ObserverActionNode>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverActionNode>const,std::function<void(bool)>>>> ::~unordered_map(local_e8); std:: unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void(bool)>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::function<void(bool)>>>> ::~unordered_map(local_b0); std::shared_ptr<reaction::ObserverDataNode>::~shared_ptr(local_78); std::shared_ptr<reaction::ObserverDataNode>::shared_ptr(local_178,param_2); /* try { // try from 0011bd7b to 0011bd7f has its CatchHandler @ 0011bdba */ _ZN8reaction13ObserverGraph17closeNodeInternalITkNS_6NodeCCENS_16ObserverDataNodeEEEvSt10shared_ptrIT_E (param_1,local_178); std::shared_ptr<reaction::ObserverDataNode>::~shared_ptr(local_178); } return; }
49,435
fill_update_undo_parts
eloqsql/storage/maria/ma_blockrec.c
static size_t fill_update_undo_parts(MARIA_HA *info, const uchar *oldrec, const uchar *newrec, LEX_CUSTRING *log_parts, uint *log_parts_count) { MARIA_SHARE *share= info->s; MARIA_COLUMNDEF *column, *end_column; MARIA_ROW *old_row= &info->cur_row, *new_row= &info->new_row; uchar *field_data, *start_field_data, *length_str; uchar *old_field_lengths= old_row->field_lengths; uchar *new_field_lengths= new_row->field_lengths; size_t row_length= 0; uint field_lengths; LEX_CUSTRING *start_log_parts; my_bool new_column_is_empty; DBUG_ENTER("fill_update_undo_parts"); start_log_parts= log_parts; /* First log part is for number of fields, field numbers and lengths The +4 is to reserve place for the number of changed fields. */ start_field_data= field_data= info->update_field_data + 4; log_parts++; if (memcmp(oldrec, newrec, share->base.null_bytes)) { /* Store changed null bits */ *field_data++= (uchar) 255; /* Special case */ log_parts->str= oldrec; log_parts->length= share->base.null_bytes; row_length= log_parts->length; log_parts++; } /* Handle constant length fields */ for (column= share->columndef, end_column= column+ share->base.fixed_not_null_fields; column < end_column; column++) { if (memcmp(oldrec + column->offset, newrec + column->offset, column->length)) { field_data= ma_store_length(field_data, (uint) (column - share->columndef)); log_parts->str= oldrec + column->offset; log_parts->length= column->length; row_length+= column->length; log_parts++; } } /* Handle the rest: NULL fields and CHAR/VARCHAR fields and BLOB's */ for (end_column= share->columndef + share->base.fields; column < end_column; column++) { const uchar *new_column_pos, *old_column_pos; size_t new_column_length, old_column_length; /* First check if old column is null or empty */ if (oldrec[column->null_pos] & column->null_bit) { /* It's safe to skip this one as either the new column is also null (no change) or the new_column is not null, in which case the null-bit maps differed and we have already stored the null bitmap. */ continue; } if (old_row->empty_bits[column->empty_pos] & column->empty_bit) { if (new_row->empty_bits[column->empty_pos] & column->empty_bit) continue; /* Both are empty; skip */ /* Store null length column */ field_data= ma_store_length(field_data, (uint) (column - share->columndef)); field_data= ma_store_length(field_data, 0); continue; } /* Remember if the 'new' value is empty (as in this case we must always log the original value */ new_column_is_empty= ((newrec[column->null_pos] & column->null_bit) || (new_row->empty_bits[column->empty_pos] & column->empty_bit)); old_column_pos= oldrec + column->offset; new_column_pos= newrec + column->offset; old_column_length= new_column_length= column->length; switch (column->type) { case FIELD_CHECK: case FIELD_NORMAL: /* Fixed length field */ case FIELD_ZERO: case FIELD_SKIP_PRESPACE: /* Not packed */ case FIELD_SKIP_ZERO: /* Fixed length field */ break; case FIELD_VARCHAR: new_column_length--; /* Skip length prefix */ old_column_pos+= column->fill_length; new_column_pos+= column->fill_length; /* Fall through */ case FIELD_SKIP_ENDSPACE: /* CHAR */ { if (new_column_length <= 255) { old_column_length= *old_field_lengths++; if (!new_column_is_empty) new_column_length= *new_field_lengths++; } else { old_column_length= uint2korr(old_field_lengths); old_field_lengths+= 2; if (!new_column_is_empty) { new_column_length= uint2korr(new_field_lengths); new_field_lengths+= 2; } } break; } case FIELD_BLOB: { uint size_length= column->length - portable_sizeof_char_ptr; old_column_length= _ma_calc_blob_length(size_length, old_column_pos); memcpy((void*) &old_column_pos, oldrec + column->offset + size_length, sizeof(old_column_pos)); if (!new_column_is_empty) { new_column_length= _ma_calc_blob_length(size_length, new_column_pos); memcpy((void*) &new_column_pos, newrec + column->offset + size_length, sizeof(old_column_pos)); } break; } default: DBUG_ASSERT(0); } if (new_column_is_empty || new_column_length != old_column_length || memcmp(old_column_pos, new_column_pos, new_column_length)) { field_data= ma_store_length(field_data, (ulong) (column - share->columndef)); field_data= ma_store_length(field_data, (ulong) old_column_length); log_parts->str= old_column_pos; log_parts->length= old_column_length; row_length+= old_column_length; log_parts++; } } *log_parts_count= (uint) (log_parts - start_log_parts); /* Store length of field length data before the field/field_lengths */ field_lengths= (uint) (field_data - start_field_data); length_str= start_field_data - ma_calc_length_for_store_length(field_lengths); start_log_parts->str= length_str; ma_store_length(length_str, field_lengths); start_log_parts->length= (size_t) (field_data - start_log_parts->str); row_length+= start_log_parts->length; DBUG_RETURN(row_length); }
O3
c
fill_update_undo_parts: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %r8, -0x98(%rbp) movq %rcx, %rbx movq %rdx, %rax movq %rsi, %r14 movq (%rdi), %r13 movq 0xd0(%rdi), %rcx movq %rcx, -0x48(%rbp) movq 0x190(%rdi), %rcx movq %rcx, -0x40(%rbp) movq %rdi, -0x78(%rbp) movq 0x3c8(%rdi), %r15 leaq 0x4(%r15), %rcx movq %rcx, -0x80(%rbp) movl 0x3fc(%r13), %edx movq %rsi, %rdi movq %rax, -0x60(%rbp) movq %rax, %rsi callq 0x2a560 testl %eax, %eax movq %rbx, -0xa0(%rbp) je 0x504b0 movb $-0x1, 0x4(%r15) addq $0x5, %r15 movq %r14, 0x10(%rbx) movl 0x3fc(%r13), %eax movq %rax, -0x50(%rbp) movq %rax, 0x18(%rbx) leaq 0x20(%rbx), %r12 jmp 0x504c0 leaq 0x10(%rbx), %r12 movq $0x0, -0x50(%rbp) movq -0x80(%rbp), %r15 movq %r14, %r8 movq %r15, -0x30(%rbp) movq 0x588(%r13), %rbx movl 0x3cc(%r13), %eax testq %rax, %rax movq %r13, -0x58(%rbp) je 0x50568 imulq $0x38, %rax, %r14 addq %rbx, %r14 movq %rbx, %r15 movl 0x4(%rbx), %esi leaq (%r8,%rsi), %rdi addq -0x60(%rbp), %rsi movzwl 0x8(%rbx), %edx movq %r8, %r13 callq 0x2a560 testl %eax, %eax je 0x5054b movq %r15, %rax movq -0x58(%rbp), %rcx subq 0x588(%rcx), %rax shrq $0x3, %rax imull $0xb6db6db7, %eax, %esi # imm = 0xB6DB6DB7 movq -0x30(%rbp), %rdi callq 0x4bad6 movq %rax, -0x30(%rbp) movl 0x4(%rbx), %eax addq %r13, %rax movq %rax, (%r12) movzwl 0x8(%rbx), %eax movq %rax, 0x8(%r12) movzwl 0x8(%rbx), %eax addq %rax, -0x50(%rbp) addq $0x10, %r12 movq %r13, %r8 addq $0x38, %rbx addq $0x38, %r15 cmpq %r14, %rbx jb 0x504ec movq -0x58(%rbp), %r13 movq 0x588(%r13), %rax jmp 0x5056b movq %rbx, %rax movl 0x3c8(%r13), %ecx imulq $0x38, %rcx, %r9 addq %rax, %r9 cmpq %r9, %rbx movq -0x78(%rbp), %r14 jae 0x50798 movq %rbx, %r15 movq %r8, -0x70(%rbp) movq %r9, -0x68(%rbp) movzwl 0xe(%rbx), %eax movb 0x12(%rbx), %dl testb %dl, (%r8,%rax) je 0x505b0 addq $0x38, %rbx addq $0x38, %r15 cmpq %r9, %rbx jb 0x50591 jmp 0x50798 movq 0xc8(%r14), %rdi movzwl 0x10(%rbx), %ecx movb 0x13(%rbx), %sil testb %sil, (%rdi,%rcx) je 0x50607 movq 0x188(%r14), %rax testb %sil, (%rax,%rcx) jne 0x5059e movq %r15, %rax movq -0x58(%rbp), %rcx subq 0x588(%rcx), %rax shrq $0x3, %rax imull $0xb6db6db7, %eax, %esi # imm = 0xB6DB6DB7 movq -0x30(%rbp), %rdi callq 0x4bad6 movq -0x68(%rbp), %r9 movq -0x70(%rbp), %r8 movb $0x0, (%rax) incq %rax movq %rax, -0x30(%rbp) jmp 0x5059e movq -0x60(%rbp), %rdi testb %dl, (%rdi,%rax) je 0x50614 xorl %ecx, %ecx jmp 0x50622 movq 0x188(%r14), %rax testb %sil, (%rax,%rcx) sete %cl movl (%rbx), %eax movl 0x4(%rbx), %esi leaq (%r8,%rsi), %rdx addq -0x60(%rbp), %rsi movzwl 0x8(%rbx), %r14d cmpl $0x1, %eax je 0x50654 cmpl $0x4, %eax je 0x50687 cmpl $0x8, %eax jne 0x5070f decq %r14 movzwl 0xc(%rbx), %eax addq %rax, %rdx addq %rax, %rsi cmpq $0xff, %r14 ja 0x506ea movq -0x48(%rbp), %rax movzbl (%rax), %edi incq %rax movq %rax, -0x48(%rbp) testb %cl, %cl je 0x50733 movq -0x40(%rbp), %rax movzbl (%rax), %r14d incq %rax jmp 0x50709 movq %rsi, -0x90(%rbp) addl $-0x8, %r14d movl %r14d, %edi movq %rdx, %rsi movq %r8, %r13 movl %ecx, -0x34(%rbp) callq 0x4750b movl 0x4(%rbx), %ecx addq %r13, %rcx movq (%r14,%rcx), %r13 cmpb $0x0, -0x34(%rbp) je 0x50793 movq %rax, -0x88(%rbp) movl %r14d, %edi movq -0x90(%rbp), %rsi callq 0x4750b movq -0x88(%rbp), %rdi movl 0x4(%rbx), %ecx addq -0x60(%rbp), %rcx movq (%r14,%rcx), %rsi movl -0x34(%rbp), %ecx movq %rax, %r14 movq %r13, %rdx jmp 0x50712 movq -0x48(%rbp), %rax movzwl (%rax), %edi addq $0x2, %rax movq %rax, -0x48(%rbp) testb %cl, %cl je 0x50733 movq -0x40(%rbp), %rax movzwl (%rax), %r14d addq $0x2, %rax movq %rax, -0x40(%rbp) jmp 0x50712 movq %r14, %rdi cmpq %rdi, %r14 sete %al andb %al, %cl cmpb $0x1, %cl jne 0x50733 movq %rdx, %r13 movq %rdx, %rdi movq %r14, %rdx callq 0x2a560 testl %eax, %eax jne 0x50739 jmp 0x50782 movq %rdx, %r13 movq %rdi, %r14 movq %r15, %rsi movq -0x58(%rbp), %rax subq 0x588(%rax), %rsi sarq $0x3, %rsi movabsq $0x6db6db6db6db6db7, %rax # imm = 0x6DB6DB6DB6DB6DB7 imulq %rax, %rsi movq -0x30(%rbp), %rdi callq 0x4bad6 movq %rax, %rdi movq %r14, %rsi callq 0x4bad6 movq %rax, -0x30(%rbp) movq %r13, (%r12) movq %r14, 0x8(%r12) addq %r14, -0x50(%rbp) addq $0x10, %r12 movq -0x78(%rbp), %r14 movq -0x70(%rbp), %r8 movq -0x68(%rbp), %r9 jmp 0x5059e movq %rax, %r14 jmp 0x50739 movq -0xa0(%rbp), %rbx subq %rbx, %r12 shrq $0x4, %r12 movq -0x98(%rbp), %rax movl %r12d, (%rax) movq -0x30(%rbp), %r14 movl %r14d, %esi movq -0x80(%rbp), %rdi subl %edi, %esi movq $-0x1, %rax cmpl $0xfb, %esi jb 0x507ec xorl %eax, %eax cmpl $0xffff, %esi # imm = 0xFFFF ja 0x507e2 cmpl $0x100, %esi # imm = 0x100 adcq $-0x3, %rax jmp 0x507ec cmpl $0x1000000, %esi # imm = 0x1000000 adcq $-0x5, %rax addq %rax, %rdi movq %rdi, (%rbx) callq 0x4bad6 subq (%rbx), %r14 movq %r14, 0x8(%rbx) addq -0x50(%rbp), %r14 movq %r14, %rax addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
fill_update_undo_parts: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov [rbp+var_98], r8 mov rbx, rcx mov rax, rdx mov r14, rsi mov r13, [rdi] mov rcx, [rdi+0D0h] mov [rbp+var_48], rcx mov rcx, [rdi+190h] mov [rbp+var_40], rcx mov [rbp+var_78], rdi mov r15, [rdi+3C8h] lea rcx, [r15+4] mov [rbp+var_80], rcx mov edx, [r13+3FCh] mov rdi, rsi mov [rbp+var_60], rax mov rsi, rax call _bcmp test eax, eax mov [rbp+var_A0], rbx jz short loc_504B0 mov byte ptr [r15+4], 0FFh add r15, 5 mov [rbx+10h], r14 mov eax, [r13+3FCh] mov [rbp+var_50], rax mov [rbx+18h], rax lea r12, [rbx+20h] jmp short loc_504C0 loc_504B0: lea r12, [rbx+10h] mov [rbp+var_50], 0 mov r15, [rbp+var_80] loc_504C0: mov r8, r14 mov [rbp+var_30], r15 mov rbx, [r13+588h] mov eax, [r13+3CCh] test rax, rax mov [rbp+var_58], r13 jz loc_50568 imul r14, rax, 38h ; '8' add r14, rbx mov r15, rbx loc_504EC: mov esi, [rbx+4] lea rdi, [r8+rsi] add rsi, [rbp+var_60] movzx edx, word ptr [rbx+8] mov r13, r8 call _bcmp test eax, eax jz short loc_5054B mov rax, r15 mov rcx, [rbp+var_58] sub rax, [rcx+588h] shr rax, 3 imul esi, eax, 0B6DB6DB7h mov rdi, [rbp+var_30] call ma_store_length mov [rbp+var_30], rax mov eax, [rbx+4] add rax, r13 mov [r12], rax movzx eax, word ptr [rbx+8] mov [r12+8], rax movzx eax, word ptr [rbx+8] add [rbp+var_50], rax add r12, 10h loc_5054B: mov r8, r13 add rbx, 38h ; '8' add r15, 38h ; '8' cmp rbx, r14 jb short loc_504EC mov r13, [rbp+var_58] mov rax, [r13+588h] jmp short loc_5056B loc_50568: mov rax, rbx loc_5056B: mov ecx, [r13+3C8h] imul r9, rcx, 38h ; '8' add r9, rax cmp rbx, r9 mov r14, [rbp+var_78] jnb loc_50798 mov r15, rbx mov [rbp+var_70], r8 mov [rbp+var_68], r9 loc_50591: movzx eax, word ptr [rbx+0Eh] mov dl, [rbx+12h] test [r8+rax], dl jz short loc_505B0 loc_5059E: add rbx, 38h ; '8' add r15, 38h ; '8' cmp rbx, r9 jb short loc_50591 jmp loc_50798 loc_505B0: mov rdi, [r14+0C8h] movzx ecx, word ptr [rbx+10h] mov sil, [rbx+13h] test [rdi+rcx], sil jz short loc_50607 mov rax, [r14+188h] test [rax+rcx], sil jnz short loc_5059E mov rax, r15 mov rcx, [rbp+var_58] sub rax, [rcx+588h] shr rax, 3 imul esi, eax, 0B6DB6DB7h mov rdi, [rbp+var_30] call ma_store_length mov r9, [rbp+var_68] mov r8, [rbp+var_70] mov byte ptr [rax], 0 inc rax mov [rbp+var_30], rax jmp short loc_5059E loc_50607: mov rdi, [rbp+var_60] test [rdi+rax], dl jz short loc_50614 xor ecx, ecx jmp short loc_50622 loc_50614: mov rax, [r14+188h] test [rax+rcx], sil setz cl loc_50622: mov eax, [rbx] mov esi, [rbx+4] lea rdx, [r8+rsi] add rsi, [rbp+var_60] movzx r14d, word ptr [rbx+8] cmp eax, 1 jz short loc_50654 cmp eax, 4 jz short loc_50687 cmp eax, 8 jnz loc_5070F dec r14 movzx eax, word ptr [rbx+0Ch] add rdx, rax add rsi, rax loc_50654: cmp r14, 0FFh ja loc_506EA mov rax, [rbp+var_48] movzx edi, byte ptr [rax] inc rax mov [rbp+var_48], rax test cl, cl jz loc_50733 mov rax, [rbp+var_40] movzx r14d, byte ptr [rax] inc rax jmp loc_50709 loc_50687: mov [rbp+var_90], rsi add r14d, 0FFFFFFF8h mov edi, r14d mov rsi, rdx mov r13, r8 mov [rbp+var_34], ecx call _ma_calc_blob_length mov ecx, [rbx+4] add rcx, r13 mov r13, [r14+rcx] cmp byte ptr [rbp+var_34], 0 jz loc_50793 mov [rbp+var_88], rax mov edi, r14d mov rsi, [rbp+var_90] call _ma_calc_blob_length mov rdi, [rbp+var_88] mov ecx, [rbx+4] add rcx, [rbp+var_60] mov rsi, [r14+rcx] mov ecx, [rbp+var_34] mov r14, rax mov rdx, r13 jmp short loc_50712 loc_506EA: mov rax, [rbp+var_48] movzx edi, word ptr [rax] add rax, 2 mov [rbp+var_48], rax test cl, cl jz short loc_50733 mov rax, [rbp+var_40] movzx r14d, word ptr [rax] add rax, 2 loc_50709: mov [rbp+var_40], rax jmp short loc_50712 loc_5070F: mov rdi, r14 loc_50712: cmp r14, rdi setz al and cl, al cmp cl, 1 jnz short loc_50733 mov r13, rdx mov rdi, rdx mov rdx, r14 call _bcmp test eax, eax jnz short loc_50739 jmp short loc_50782 loc_50733: mov r13, rdx mov r14, rdi loc_50739: mov rsi, r15 mov rax, [rbp+var_58] sub rsi, [rax+588h] sar rsi, 3 mov rax, 6DB6DB6DB6DB6DB7h imul rsi, rax mov rdi, [rbp+var_30] call ma_store_length mov rdi, rax mov rsi, r14 call ma_store_length mov [rbp+var_30], rax mov [r12], r13 mov [r12+8], r14 add [rbp+var_50], r14 add r12, 10h loc_50782: mov r14, [rbp+var_78] mov r8, [rbp+var_70] mov r9, [rbp+var_68] jmp loc_5059E loc_50793: mov r14, rax jmp short loc_50739 loc_50798: mov rbx, [rbp+var_A0] sub r12, rbx shr r12, 4 mov rax, [rbp+var_98] mov [rax], r12d mov r14, [rbp+var_30] mov esi, r14d mov rdi, [rbp+var_80] sub esi, edi mov rax, 0FFFFFFFFFFFFFFFFh cmp esi, 0FBh jb short loc_507EC xor eax, eax cmp esi, 0FFFFh ja short loc_507E2 cmp esi, 100h adc rax, 0FFFFFFFFFFFFFFFDh jmp short loc_507EC loc_507E2: cmp esi, 1000000h adc rax, 0FFFFFFFFFFFFFFFBh loc_507EC: add rdi, rax mov [rbx], rdi call ma_store_length sub r14, [rbx] mov [rbx+8], r14 add r14, [rbp+var_50] mov rax, r14 add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long fill_update_undo_parts(_QWORD *a1, long long a2, long long a3, char *a4, _DWORD *a5) { long long v6; // r13 long long v7; // r15 long long v8; // r15 char *v9; // r12 long long v10; // r8 int *v11; // rbx unsigned long long v12; // r14 long long v13; // r15 long long v14; // r13 long long v15; // rax long long v16; // rcx unsigned long long v17; // r9 _QWORD *v18; // r14 int *v19; // r15 long long v20; // rax unsigned __int8 v21; // dl long long v22; // rcx unsigned __int8 v23; // si _BYTE *v24; // rax bool v25; // cl int v26; // eax long long v27; // rsi unsigned __int8 *v28; // rdx unsigned __int8 *v29; // rsi unsigned long long v30; // r14 long long v31; // rax unsigned long long v32; // rdi unsigned __int16 *v33; // rax long long v34; // r14 long long v35; // r13 unsigned long long v36; // rax unsigned __int8 *v37; // r13 unsigned long long v38; // rax long long v39; // rax unsigned long long v40; // rsi long long v41; // rax long long v42; // r14 unsigned long long v46; // [rsp+18h] [rbp-88h] long long v47; // [rsp+20h] [rbp-80h] long long v49; // [rsp+30h] [rbp-70h] unsigned long long v50; // [rsp+38h] [rbp-68h] long long v52; // [rsp+48h] [rbp-58h] long long v53; // [rsp+50h] [rbp-50h] unsigned __int16 *v54; // [rsp+58h] [rbp-48h] unsigned __int16 *v55; // [rsp+60h] [rbp-40h] bool v56; // [rsp+6Ch] [rbp-34h] long long v57; // [rsp+70h] [rbp-30h] v6 = *a1; v54 = (unsigned __int16 *)a1[26]; v55 = (unsigned __int16 *)a1[50]; v7 = a1[121]; v47 = v7 + 4; if ( (unsigned int)bcmp(a2, a3, *(unsigned int *)(*a1 + 1020LL)) ) { *(_BYTE *)(v7 + 4) = -1; v8 = v7 + 5; *((_QWORD *)a4 + 2) = a2; v53 = *(unsigned int *)(v6 + 1020); *((_QWORD *)a4 + 3) = v53; v9 = a4 + 32; } else { v9 = a4 + 16; v53 = 0LL; v8 = v7 + 4; } v10 = a2; v57 = v8; v11 = *(int **)(v6 + 1416); v52 = v6; if ( *(_DWORD *)(v6 + 972) ) { v12 = (unsigned long long)&v11[14 * *(unsigned int *)(v6 + 972)]; v13 = *(_QWORD *)(v6 + 1416); do { v14 = v10; if ( (unsigned int)bcmp(v10 + (unsigned int)v11[1], a3 + (unsigned int)v11[1], *((unsigned __int16 *)v11 + 4)) ) { v57 = ma_store_length(v57, -1227133513 * (unsigned int)((unsigned long long)(v13 - *(_QWORD *)(v52 + 1416)) >> 3)); *(_QWORD *)v9 = v14 + (unsigned int)v11[1]; *((_QWORD *)v9 + 1) = *((unsigned __int16 *)v11 + 4); v53 += *((unsigned __int16 *)v11 + 4); v9 += 16; } v10 = v14; v11 += 14; v13 += 56LL; } while ( (unsigned long long)v11 < v12 ); v6 = v52; v15 = *(_QWORD *)(v52 + 1416); } else { v15 = *(_QWORD *)(v6 + 1416); } v16 = *(unsigned int *)(v6 + 968); v17 = v15 + 56 * v16; v18 = a1; if ( (unsigned long long)v11 < v17 ) { v19 = v11; v49 = v10; v50 = v15 + 56 * v16; while ( 1 ) { v20 = *((unsigned __int16 *)v11 + 7); v21 = *((_BYTE *)v11 + 18); if ( (v21 & *(_BYTE *)(v10 + v20)) == 0 ) break; LABEL_14: v11 += 14; v19 += 14; if ( (unsigned long long)v11 >= v17 ) goto LABEL_42; } v22 = *((unsigned __int16 *)v11 + 8); v23 = *((_BYTE *)v11 + 19); if ( (v23 & *(_BYTE *)(v18[25] + v22)) != 0 ) { if ( (v23 & *(_BYTE *)(v18[49] + v22)) == 0 ) { v24 = (_BYTE *)ma_store_length( v57, -1227133513 * (unsigned int)(((unsigned long long)v19 - *(_QWORD *)(v52 + 1416)) >> 3)); v17 = v50; v10 = v49; *v24 = 0; v57 = (long long)(v24 + 1); } goto LABEL_14; } v25 = (v21 & *(_BYTE *)(a3 + v20)) == 0 && (v23 & *(_BYTE *)(v18[49] + v22)) == 0; v26 = *v11; v27 = (unsigned int)v11[1]; v28 = (unsigned __int8 *)(v10 + v27); v29 = (unsigned __int8 *)(a3 + v27); v30 = *((unsigned __int16 *)v11 + 4); if ( *v11 != 1 ) { if ( v26 == 4 ) { v34 = (unsigned int)(v30 - 8); v35 = v10; v56 = v25; v36 = ma_calc_blob_length(v34, v28); v37 = *(unsigned __int8 **)(v34 + v35 + (unsigned int)v11[1]); if ( !v56 ) { v30 = v36; goto LABEL_39; } v46 = v36; v38 = ma_calc_blob_length(v34, v29); v32 = v46; v29 = *(unsigned __int8 **)(v34 + a3 + (unsigned int)v11[1]); v25 = v56; v30 = v38; v28 = v37; goto LABEL_35; } if ( v26 != 8 ) { v32 = *((unsigned __int16 *)v11 + 4); LABEL_35: if ( v30 == v32 && v25 ) { v37 = v28; if ( !(unsigned int)bcmp(v28, v29, v30) ) goto LABEL_40; goto LABEL_39; } goto LABEL_38; } --v30; v31 = *((unsigned __int16 *)v11 + 6); v28 += v31; v29 += v31; } if ( v30 > 0xFF ) { v32 = *v54++; if ( v25 ) { v30 = *v55; v33 = v55 + 1; goto LABEL_33; } } else { v32 = *(unsigned __int8 *)v54; v54 = (unsigned __int16 *)((char *)v54 + 1); if ( v25 ) { v30 = *(unsigned __int8 *)v55; v33 = (unsigned __int16 *)((char *)v55 + 1); LABEL_33: v55 = v33; goto LABEL_35; } } LABEL_38: v37 = v28; v30 = v32; LABEL_39: v39 = ma_store_length(v57, 0x6DB6DB6DB6DB6DB7LL * (((long long)v19 - *(_QWORD *)(v52 + 1416)) >> 3)); v57 = ma_store_length(v39, v30); *(_QWORD *)v9 = v37; *((_QWORD *)v9 + 1) = v30; v53 += v30; v9 += 16; LABEL_40: v18 = a1; v10 = v49; v17 = v50; goto LABEL_14; } LABEL_42: *a5 = (unsigned long long)(v9 - a4) >> 4; v40 = (unsigned int)(v57 - v47); v41 = -1LL; if ( (unsigned int)v40 >= 0xFB ) { if ( (unsigned int)v40 > 0xFFFF ) v41 = ((unsigned int)v40 < 0x1000000) - 5LL; else v41 = ((unsigned int)v40 < 0x100) - 3LL; } *(_QWORD *)a4 = v41 + v47; ma_store_length(v41 + v47, v40); v42 = v57 - *(_QWORD *)a4; *((_QWORD *)a4 + 1) = v42; return v53 + v42; }
fill_update_undo_parts: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV qword ptr [RBP + -0x98],R8 MOV RBX,RCX MOV RAX,RDX MOV R14,RSI MOV R13,qword ptr [RDI] MOV RCX,qword ptr [RDI + 0xd0] MOV qword ptr [RBP + -0x48],RCX MOV RCX,qword ptr [RDI + 0x190] MOV qword ptr [RBP + -0x40],RCX MOV qword ptr [RBP + -0x78],RDI MOV R15,qword ptr [RDI + 0x3c8] LEA RCX,[R15 + 0x4] MOV qword ptr [RBP + -0x80],RCX MOV EDX,dword ptr [R13 + 0x3fc] MOV RDI,RSI MOV qword ptr [RBP + -0x60],RAX MOV RSI,RAX CALL 0x0012a560 TEST EAX,EAX MOV qword ptr [RBP + -0xa0],RBX JZ 0x001504b0 MOV byte ptr [R15 + 0x4],0xff ADD R15,0x5 MOV qword ptr [RBX + 0x10],R14 MOV EAX,dword ptr [R13 + 0x3fc] MOV qword ptr [RBP + -0x50],RAX MOV qword ptr [RBX + 0x18],RAX LEA R12,[RBX + 0x20] JMP 0x001504c0 LAB_001504b0: LEA R12,[RBX + 0x10] MOV qword ptr [RBP + -0x50],0x0 MOV R15,qword ptr [RBP + -0x80] LAB_001504c0: MOV R8,R14 MOV qword ptr [RBP + -0x30],R15 MOV RBX,qword ptr [R13 + 0x588] MOV EAX,dword ptr [R13 + 0x3cc] TEST RAX,RAX MOV qword ptr [RBP + -0x58],R13 JZ 0x00150568 IMUL R14,RAX,0x38 ADD R14,RBX MOV R15,RBX LAB_001504ec: MOV ESI,dword ptr [RBX + 0x4] LEA RDI,[R8 + RSI*0x1] ADD RSI,qword ptr [RBP + -0x60] MOVZX EDX,word ptr [RBX + 0x8] MOV R13,R8 CALL 0x0012a560 TEST EAX,EAX JZ 0x0015054b MOV RAX,R15 MOV RCX,qword ptr [RBP + -0x58] SUB RAX,qword ptr [RCX + 0x588] SHR RAX,0x3 IMUL ESI,EAX,-0x49249249 MOV RDI,qword ptr [RBP + -0x30] CALL 0x0014bad6 MOV qword ptr [RBP + -0x30],RAX MOV EAX,dword ptr [RBX + 0x4] ADD RAX,R13 MOV qword ptr [R12],RAX MOVZX EAX,word ptr [RBX + 0x8] MOV qword ptr [R12 + 0x8],RAX MOVZX EAX,word ptr [RBX + 0x8] ADD qword ptr [RBP + -0x50],RAX ADD R12,0x10 LAB_0015054b: MOV R8,R13 ADD RBX,0x38 ADD R15,0x38 CMP RBX,R14 JC 0x001504ec MOV R13,qword ptr [RBP + -0x58] MOV RAX,qword ptr [R13 + 0x588] JMP 0x0015056b LAB_00150568: MOV RAX,RBX LAB_0015056b: MOV ECX,dword ptr [R13 + 0x3c8] IMUL R9,RCX,0x38 ADD R9,RAX CMP RBX,R9 MOV R14,qword ptr [RBP + -0x78] JNC 0x00150798 MOV R15,RBX MOV qword ptr [RBP + -0x70],R8 MOV qword ptr [RBP + -0x68],R9 LAB_00150591: MOVZX EAX,word ptr [RBX + 0xe] MOV DL,byte ptr [RBX + 0x12] TEST byte ptr [R8 + RAX*0x1],DL JZ 0x001505b0 LAB_0015059e: ADD RBX,0x38 ADD R15,0x38 CMP RBX,R9 JC 0x00150591 JMP 0x00150798 LAB_001505b0: MOV RDI,qword ptr [R14 + 0xc8] MOVZX ECX,word ptr [RBX + 0x10] MOV SIL,byte ptr [RBX + 0x13] TEST byte ptr [RDI + RCX*0x1],SIL JZ 0x00150607 MOV RAX,qword ptr [R14 + 0x188] TEST byte ptr [RAX + RCX*0x1],SIL JNZ 0x0015059e MOV RAX,R15 MOV RCX,qword ptr [RBP + -0x58] SUB RAX,qword ptr [RCX + 0x588] SHR RAX,0x3 IMUL ESI,EAX,-0x49249249 MOV RDI,qword ptr [RBP + -0x30] CALL 0x0014bad6 MOV R9,qword ptr [RBP + -0x68] MOV R8,qword ptr [RBP + -0x70] MOV byte ptr [RAX],0x0 INC RAX MOV qword ptr [RBP + -0x30],RAX JMP 0x0015059e LAB_00150607: MOV RDI,qword ptr [RBP + -0x60] TEST byte ptr [RDI + RAX*0x1],DL JZ 0x00150614 XOR ECX,ECX JMP 0x00150622 LAB_00150614: MOV RAX,qword ptr [R14 + 0x188] TEST byte ptr [RAX + RCX*0x1],SIL SETZ CL LAB_00150622: MOV EAX,dword ptr [RBX] MOV ESI,dword ptr [RBX + 0x4] LEA RDX,[R8 + RSI*0x1] ADD RSI,qword ptr [RBP + -0x60] MOVZX R14D,word ptr [RBX + 0x8] CMP EAX,0x1 JZ 0x00150654 CMP EAX,0x4 JZ 0x00150687 CMP EAX,0x8 JNZ 0x0015070f DEC R14 MOVZX EAX,word ptr [RBX + 0xc] ADD RDX,RAX ADD RSI,RAX LAB_00150654: CMP R14,0xff JA 0x001506ea MOV RAX,qword ptr [RBP + -0x48] MOVZX EDI,byte ptr [RAX] INC RAX MOV qword ptr [RBP + -0x48],RAX TEST CL,CL JZ 0x00150733 MOV RAX,qword ptr [RBP + -0x40] MOVZX R14D,byte ptr [RAX] INC RAX JMP 0x00150709 LAB_00150687: MOV qword ptr [RBP + -0x90],RSI ADD R14D,-0x8 MOV EDI,R14D MOV RSI,RDX MOV R13,R8 MOV dword ptr [RBP + -0x34],ECX CALL 0x0014750b MOV ECX,dword ptr [RBX + 0x4] ADD RCX,R13 MOV R13,qword ptr [R14 + RCX*0x1] CMP byte ptr [RBP + -0x34],0x0 JZ 0x00150793 MOV qword ptr [RBP + -0x88],RAX MOV EDI,R14D MOV RSI,qword ptr [RBP + -0x90] CALL 0x0014750b MOV RDI,qword ptr [RBP + -0x88] MOV ECX,dword ptr [RBX + 0x4] ADD RCX,qword ptr [RBP + -0x60] MOV RSI,qword ptr [R14 + RCX*0x1] MOV ECX,dword ptr [RBP + -0x34] MOV R14,RAX MOV RDX,R13 JMP 0x00150712 LAB_001506ea: MOV RAX,qword ptr [RBP + -0x48] MOVZX EDI,word ptr [RAX] ADD RAX,0x2 MOV qword ptr [RBP + -0x48],RAX TEST CL,CL JZ 0x00150733 MOV RAX,qword ptr [RBP + -0x40] MOVZX R14D,word ptr [RAX] ADD RAX,0x2 LAB_00150709: MOV qword ptr [RBP + -0x40],RAX JMP 0x00150712 LAB_0015070f: MOV RDI,R14 LAB_00150712: CMP R14,RDI SETZ AL AND CL,AL CMP CL,0x1 JNZ 0x00150733 MOV R13,RDX MOV RDI,RDX MOV RDX,R14 CALL 0x0012a560 TEST EAX,EAX JNZ 0x00150739 JMP 0x00150782 LAB_00150733: MOV R13,RDX MOV R14,RDI LAB_00150739: MOV RSI,R15 MOV RAX,qword ptr [RBP + -0x58] SUB RSI,qword ptr [RAX + 0x588] SAR RSI,0x3 MOV RAX,0x6db6db6db6db6db7 IMUL RSI,RAX MOV RDI,qword ptr [RBP + -0x30] CALL 0x0014bad6 MOV RDI,RAX MOV RSI,R14 CALL 0x0014bad6 MOV qword ptr [RBP + -0x30],RAX MOV qword ptr [R12],R13 MOV qword ptr [R12 + 0x8],R14 ADD qword ptr [RBP + -0x50],R14 ADD R12,0x10 LAB_00150782: MOV R14,qword ptr [RBP + -0x78] MOV R8,qword ptr [RBP + -0x70] MOV R9,qword ptr [RBP + -0x68] JMP 0x0015059e LAB_00150793: MOV R14,RAX JMP 0x00150739 LAB_00150798: MOV RBX,qword ptr [RBP + -0xa0] SUB R12,RBX SHR R12,0x4 MOV RAX,qword ptr [RBP + -0x98] MOV dword ptr [RAX],R12D MOV R14,qword ptr [RBP + -0x30] MOV ESI,R14D MOV RDI,qword ptr [RBP + -0x80] SUB ESI,EDI MOV RAX,-0x1 CMP ESI,0xfb JC 0x001507ec XOR EAX,EAX CMP ESI,0xffff JA 0x001507e2 CMP ESI,0x100 ADC RAX,-0x3 JMP 0x001507ec LAB_001507e2: CMP ESI,0x1000000 ADC RAX,-0x5 LAB_001507ec: ADD RDI,RAX MOV qword ptr [RBX],RDI CALL 0x0014bad6 SUB R14,qword ptr [RBX] MOV qword ptr [RBX + 0x8],R14 ADD R14,qword ptr [RBP + -0x50] MOV RAX,R14 ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long fill_update_undo_parts (long *param_1,void *param_2,void *param_3,long *param_4,int4 *param_5) { int1 *puVar1; byte bVar2; long lVar3; ushort uVar4; int iVar5; int *piVar6; size_t __n; int8 uVar7; long lVar8; ulong uVar9; void *__s1; int *piVar10; uint uVar11; void *__s2; long *plVar12; uint uVar13; int *piVar14; size_t sVar15; bool bVar16; ulong local_58; ushort *local_50; ushort *local_48; int1 *local_38; lVar8 = *param_1; local_50 = (ushort *)param_1[0x1a]; local_48 = (ushort *)param_1[0x32]; lVar3 = param_1[0x79]; puVar1 = (int1 *)(lVar3 + 4); iVar5 = bcmp(param_2,param_3,(ulong)*(uint *)(lVar8 + 0x3fc)); if (iVar5 == 0) { plVar12 = param_4 + 2; local_58 = 0; local_38 = puVar1; } else { *(int1 *)(lVar3 + 4) = 0xff; param_4[2] = (long)param_2; local_58 = (ulong)*(uint *)(lVar8 + 0x3fc); param_4[3] = local_58; plVar12 = param_4 + 4; local_38 = (int1 *)(lVar3 + 5); } piVar6 = *(int **)(lVar8 + 0x588); piVar10 = piVar6; if ((ulong)*(uint *)(lVar8 + 0x3cc) != 0) { piVar14 = piVar6 + (ulong)*(uint *)(lVar8 + 0x3cc) * 0xe; do { iVar5 = bcmp((void *)((long)param_2 + (ulong)(uint)piVar10[1]), (void *)((ulong)(uint)piVar10[1] + (long)param_3),(ulong)*(ushort *)(piVar10 + 2) ); if (iVar5 != 0) { local_38 = (int1 *) ma_store_length(local_38,(int)((ulong)((long)piVar6 - *(long *)(lVar8 + 0x588)) >> 3) * -0x49249249); *plVar12 = (ulong)(uint)piVar10[1] + (long)param_2; plVar12[1] = (ulong)*(ushort *)(piVar10 + 2); local_58 = local_58 + *(ushort *)(piVar10 + 2); plVar12 = plVar12 + 2; } piVar10 = piVar10 + 0xe; piVar6 = piVar6 + 0xe; } while (piVar10 < piVar14); piVar6 = *(int **)(lVar8 + 0x588); } uVar11 = *(uint *)(lVar8 + 0x3c8); piVar14 = piVar10; do { if (piVar6 + (ulong)uVar11 * 0xe <= piVar10) { *param_5 = (int)((ulong)((long)plVar12 - (long)param_4) >> 4); uVar11 = (int)local_38 - (int)puVar1; lVar8 = -1; if (0xfa < uVar11) { if (uVar11 < 0x10000) { lVar8 = (ulong)(uVar11 < 0x100) - 3; } else { lVar8 = (ulong)(uVar11 < 0x1000000) - 5; } } *param_4 = (long)(puVar1 + lVar8); ma_store_length(); param_4[1] = (long)local_38 - *param_4; return ((long)local_38 - *param_4) + local_58; } if ((*(byte *)((long)param_2 + (ulong)*(ushort *)((long)piVar10 + 0xe)) & *(byte *)((long)piVar10 + 0x12)) == 0) { uVar9 = (ulong)*(ushort *)(piVar10 + 4); bVar2 = *(byte *)((long)piVar10 + 0x13); if ((*(byte *)(param_1[0x19] + uVar9) & bVar2) == 0) { if ((*(byte *)((long)param_3 + (ulong)*(ushort *)((long)piVar10 + 0xe)) & *(byte *)((long)piVar10 + 0x12)) == 0) { bVar16 = (*(byte *)(param_1[0x31] + uVar9) & bVar2) == 0; } else { bVar16 = false; } iVar5 = *piVar10; __s1 = (void *)((long)param_2 + (ulong)(uint)piVar10[1]); __s2 = (void *)((ulong)(uint)piVar10[1] + (long)param_3); sVar15 = (size_t)*(ushort *)(piVar10 + 2); if (iVar5 == 1) { LAB_00150654: if (sVar15 < 0x100) { sVar15 = (size_t)(byte)*local_50; local_50 = (ushort *)((long)local_50 + 1); if (bVar16) { uVar4 = *local_48; local_48 = (ushort *)((long)local_48 + 1); __n = (ulong)(byte)uVar4; goto LAB_00150712; } } else { sVar15 = (size_t)*local_50; local_50 = local_50 + 1; if (bVar16) { uVar4 = *local_48; local_48 = local_48 + 1; __n = (ulong)uVar4; goto LAB_00150712; } } } else { if (iVar5 == 4) { uVar13 = *(ushort *)(piVar10 + 2) - 8; uVar9 = (ulong)uVar13; sVar15 = _ma_calc_blob_length(uVar9,__s1); __s1 = *(void **)((long)param_2 + uVar9 + (uint)piVar10[1]); if (!bVar16) goto LAB_00150739; __n = _ma_calc_blob_length(uVar13,__s2); __s2 = *(void **)((long)param_3 + uVar9 + (uint)piVar10[1]); } else { __n = sVar15; if (iVar5 == 8) { sVar15 = sVar15 - 1; __s1 = (void *)((long)__s1 + (ulong)*(ushort *)(piVar10 + 3)); __s2 = (void *)((long)__s2 + (ulong)*(ushort *)(piVar10 + 3)); goto LAB_00150654; } } LAB_00150712: if (((bool)(bVar16 & __n == sVar15)) && (iVar5 = bcmp(__s1,__s2,__n), sVar15 = __n, iVar5 == 0)) goto LAB_0015059e; } LAB_00150739: uVar7 = ma_store_length(local_38,((long)piVar14 - *(long *)(lVar8 + 0x588) >> 3) * 0x6db6db6db6db6db7); local_38 = (int1 *)ma_store_length(uVar7,sVar15); *plVar12 = (long)__s1; plVar12[1] = sVar15; local_58 = local_58 + sVar15; plVar12 = plVar12 + 2; } else if ((*(byte *)(param_1[0x31] + uVar9) & bVar2) == 0) { local_38 = (int1 *) ma_store_length(local_38,(int)((ulong)((long)piVar14 - *(long *)(lVar8 + 0x588)) >> 3) * -0x49249249); *local_38 = 0; local_38 = local_38 + 1; } } LAB_0015059e: piVar10 = piVar10 + 0xe; piVar14 = piVar14 + 0xe; } while( true ); }
49,436
ma_unique_comp
eloqsql/storage/maria/ma_unique.c
my_bool _ma_unique_comp(MARIA_UNIQUEDEF *def, const uchar *a, const uchar *b, my_bool null_are_equal) { const uchar *pos_a, *pos_b, *end; HA_KEYSEG *keyseg; for (keyseg=def->seg ; keyseg < def->end ; keyseg++) { enum ha_base_keytype type=(enum ha_base_keytype) keyseg->type; uint a_length, b_length; a_length= b_length= keyseg->length; /* If part is NULL it's regarded as different */ if (keyseg->null_bit) { uint tmp; if ((tmp=(a[keyseg->null_pos] & keyseg->null_bit)) != (uint) (b[keyseg->null_pos] & keyseg->null_bit)) return 1; if (tmp) { if (!null_are_equal) return 1; continue; } } pos_a= a+keyseg->start; pos_b= b+keyseg->start; if (keyseg->flag & HA_VAR_LENGTH_PART) { uint pack_length= keyseg->bit_start; if (pack_length == 1) { a_length= (uint) *pos_a++; b_length= (uint) *pos_b++; } else { a_length= uint2korr(pos_a); b_length= uint2korr(pos_b); pos_a+= 2; /* Skip VARCHAR length */ pos_b+= 2; } set_if_smaller(a_length, keyseg->length); /* Safety */ set_if_smaller(b_length, keyseg->length); /* safety */ } else if (keyseg->flag & HA_BLOB_PART) { /* Only compare 'length' characters if length != 0 */ a_length= _ma_calc_blob_length(keyseg->bit_start,pos_a); b_length= _ma_calc_blob_length(keyseg->bit_start,pos_b); /* Check that a and b are of equal length */ if (keyseg->length) { /* This is used in some cases when we are not interested in comparing the whole length of the blob. */ set_if_smaller(a_length, keyseg->length); set_if_smaller(b_length, keyseg->length); } memcpy((void*) &pos_a, pos_a+keyseg->bit_start, sizeof(char*)); memcpy((void*) &pos_b, pos_b+keyseg->bit_start, sizeof(char*)); } if (type == HA_KEYTYPE_TEXT || type == HA_KEYTYPE_VARTEXT1 || type == HA_KEYTYPE_VARTEXT2) { if (ha_compare_text(keyseg->charset, pos_a, a_length, pos_b, b_length, 0)) return 1; } else { if (a_length != b_length) return 1; end= pos_a+a_length; while (pos_a != end) { if (*pos_a++ != *pos_b++) return 1; } } } return 0; }
O0
c
ma_unique_comp: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movb %cl, %al movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movb %al, -0x21(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movq -0x10(%rbp), %rcx cmpq 0x10(%rcx), %rax jae 0x45dfb movq -0x48(%rbp), %rax movzbl 0x18(%rax), %eax movl %eax, -0x4c(%rbp) movq -0x48(%rbp), %rax movzwl 0x14(%rax), %eax movl %eax, -0x54(%rbp) movl %eax, -0x50(%rbp) movq -0x48(%rbp), %rax cmpb $0x0, 0x19(%rax) je 0x45bb8 movq -0x18(%rbp), %rax movq -0x48(%rbp), %rcx movl 0xc(%rcx), %ecx movzbl (%rax,%rcx), %eax movq -0x48(%rbp), %rcx movzbl 0x19(%rcx), %ecx andl %ecx, %eax movl %eax, -0x58(%rbp) movq -0x20(%rbp), %rcx movq -0x48(%rbp), %rdx movl 0xc(%rdx), %edx movzbl (%rcx,%rdx), %ecx movq -0x48(%rbp), %rdx movzbl 0x19(%rdx), %edx andl %edx, %ecx cmpl %ecx, %eax je 0x45b9c movb $0x1, -0x1(%rbp) jmp 0x45dff cmpl $0x0, -0x58(%rbp) je 0x45bb6 cmpb $0x0, -0x21(%rbp) jne 0x45bb1 movb $0x1, -0x1(%rbp) jmp 0x45dff jmp 0x45dea jmp 0x45bb8 movq -0x18(%rbp), %rax movq -0x48(%rbp), %rcx movl 0x8(%rcx), %ecx addq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x20(%rbp), %rax movq -0x48(%rbp), %rcx movl 0x8(%rcx), %ecx addq %rcx, %rax movq %rax, -0x38(%rbp) movq -0x48(%rbp), %rax movzwl 0x12(%rax), %eax andl $0x8, %eax cmpl $0x0, %eax je 0x45c9a movq -0x48(%rbp), %rax movzbl 0x1a(%rax), %eax movl %eax, -0x5c(%rbp) cmpl $0x1, -0x5c(%rbp) jne 0x45c2d movq -0x30(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x30(%rbp) movzbl (%rax), %eax movl %eax, -0x50(%rbp) movq -0x38(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x38(%rbp) movzbl (%rax), %eax movl %eax, -0x54(%rbp) jmp 0x45c59 movq -0x30(%rbp), %rax movzwl (%rax), %eax movl %eax, -0x50(%rbp) movq -0x38(%rbp), %rax movzwl (%rax), %eax movl %eax, -0x54(%rbp) movq -0x30(%rbp), %rax addq $0x2, %rax movq %rax, -0x30(%rbp) movq -0x38(%rbp), %rax addq $0x2, %rax movq %rax, -0x38(%rbp) jmp 0x45c5b movl -0x50(%rbp), %eax movq -0x48(%rbp), %rcx movzwl 0x14(%rcx), %ecx cmpl %ecx, %eax jbe 0x45c75 movq -0x48(%rbp), %rax movzwl 0x14(%rax), %eax movl %eax, -0x50(%rbp) jmp 0x45c77 jmp 0x45c79 movl -0x54(%rbp), %eax movq -0x48(%rbp), %rcx movzwl 0x14(%rcx), %ecx cmpl %ecx, %eax jbe 0x45c93 movq -0x48(%rbp), %rax movzwl 0x14(%rax), %eax movl %eax, -0x54(%rbp) jmp 0x45c95 jmp 0x45d4f movq -0x48(%rbp), %rax movzwl 0x12(%rax), %eax andl $0x20, %eax cmpl $0x0, %eax je 0x45d4d movq -0x48(%rbp), %rax movzbl 0x1a(%rax), %edi movq -0x30(%rbp), %rsi callq 0x3eef0 movl %eax, -0x50(%rbp) movq -0x48(%rbp), %rax movzbl 0x1a(%rax), %edi movq -0x38(%rbp), %rsi callq 0x3eef0 movl %eax, -0x54(%rbp) movq -0x48(%rbp), %rax cmpw $0x0, 0x14(%rax) je 0x45d1f jmp 0x45ce3 movl -0x50(%rbp), %eax movq -0x48(%rbp), %rcx movzwl 0x14(%rcx), %ecx cmpl %ecx, %eax jbe 0x45cfd movq -0x48(%rbp), %rax movzwl 0x14(%rax), %eax movl %eax, -0x50(%rbp) jmp 0x45cff jmp 0x45d01 movl -0x54(%rbp), %eax movq -0x48(%rbp), %rcx movzwl 0x14(%rcx), %ecx cmpl %ecx, %eax jbe 0x45d1b movq -0x48(%rbp), %rax movzwl 0x14(%rax), %eax movl %eax, -0x54(%rbp) jmp 0x45d1d jmp 0x45d1f movq -0x30(%rbp), %rax movq -0x48(%rbp), %rcx movzbl 0x1a(%rcx), %ecx movslq %ecx, %rcx movq (%rax,%rcx), %rax movq %rax, -0x30(%rbp) movq -0x38(%rbp), %rax movq -0x48(%rbp), %rcx movzbl 0x1a(%rcx), %ecx movslq %ecx, %rcx movq (%rax,%rcx), %rax movq %rax, -0x38(%rbp) jmp 0x45d4f cmpl $0x1, -0x4c(%rbp) je 0x45d61 cmpl $0xf, -0x4c(%rbp) je 0x45d61 cmpl $0x11, -0x4c(%rbp) jne 0x45d90 movq -0x48(%rbp), %rax movq (%rax), %rdi movq -0x30(%rbp), %rsi movl -0x50(%rbp), %eax movl %eax, %edx movq -0x38(%rbp), %rcx movl -0x54(%rbp), %eax movl %eax, %r8d xorl %r9d, %r9d callq 0xefe60 cmpl $0x0, %eax je 0x45d8e movb $0x1, -0x1(%rbp) jmp 0x45dff jmp 0x45de8 movl -0x50(%rbp), %eax cmpl -0x54(%rbp), %eax je 0x45d9e movb $0x1, -0x1(%rbp) jmp 0x45dff movq -0x30(%rbp), %rax movl -0x50(%rbp), %ecx addq %rcx, %rax movq %rax, -0x40(%rbp) movq -0x30(%rbp), %rax cmpq -0x40(%rbp), %rax je 0x45de6 movq -0x30(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x30(%rbp) movzbl (%rax), %eax movq -0x38(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x38(%rbp) movzbl (%rcx), %ecx cmpl %ecx, %eax je 0x45de4 movb $0x1, -0x1(%rbp) jmp 0x45dff jmp 0x45dac jmp 0x45de8 jmp 0x45dea movq -0x48(%rbp), %rax addq $0x20, %rax movq %rax, -0x48(%rbp) jmp 0x45b25 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x60, %rsp popq %rbp retq nopl (%rax,%rax)
_ma_unique_comp: push rbp mov rbp, rsp sub rsp, 60h mov al, cl mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_21], al mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_48], rax loc_45B25: mov rax, [rbp+var_48] mov rcx, [rbp+var_10] cmp rax, [rcx+10h] jnb loc_45DFB mov rax, [rbp+var_48] movzx eax, byte ptr [rax+18h] mov [rbp+var_4C], eax mov rax, [rbp+var_48] movzx eax, word ptr [rax+14h] mov [rbp+var_54], eax mov [rbp+var_50], eax mov rax, [rbp+var_48] cmp byte ptr [rax+19h], 0 jz short loc_45BB8 mov rax, [rbp+var_18] mov rcx, [rbp+var_48] mov ecx, [rcx+0Ch] movzx eax, byte ptr [rax+rcx] mov rcx, [rbp+var_48] movzx ecx, byte ptr [rcx+19h] and eax, ecx mov [rbp+var_58], eax mov rcx, [rbp+var_20] mov rdx, [rbp+var_48] mov edx, [rdx+0Ch] movzx ecx, byte ptr [rcx+rdx] mov rdx, [rbp+var_48] movzx edx, byte ptr [rdx+19h] and ecx, edx cmp eax, ecx jz short loc_45B9C mov [rbp+var_1], 1 jmp loc_45DFF loc_45B9C: cmp [rbp+var_58], 0 jz short loc_45BB6 cmp [rbp+var_21], 0 jnz short loc_45BB1 mov [rbp+var_1], 1 jmp loc_45DFF loc_45BB1: jmp loc_45DEA loc_45BB6: jmp short $+2 loc_45BB8: mov rax, [rbp+var_18] mov rcx, [rbp+var_48] mov ecx, [rcx+8] add rax, rcx mov [rbp+var_30], rax mov rax, [rbp+var_20] mov rcx, [rbp+var_48] mov ecx, [rcx+8] add rax, rcx mov [rbp+var_38], rax mov rax, [rbp+var_48] movzx eax, word ptr [rax+12h] and eax, 8 cmp eax, 0 jz loc_45C9A mov rax, [rbp+var_48] movzx eax, byte ptr [rax+1Ah] mov [rbp+var_5C], eax cmp [rbp+var_5C], 1 jnz short loc_45C2D mov rax, [rbp+var_30] mov rcx, rax add rcx, 1 mov [rbp+var_30], rcx movzx eax, byte ptr [rax] mov [rbp+var_50], eax mov rax, [rbp+var_38] mov rcx, rax add rcx, 1 mov [rbp+var_38], rcx movzx eax, byte ptr [rax] mov [rbp+var_54], eax jmp short loc_45C59 loc_45C2D: mov rax, [rbp+var_30] movzx eax, word ptr [rax] mov [rbp+var_50], eax mov rax, [rbp+var_38] movzx eax, word ptr [rax] mov [rbp+var_54], eax mov rax, [rbp+var_30] add rax, 2 mov [rbp+var_30], rax mov rax, [rbp+var_38] add rax, 2 mov [rbp+var_38], rax loc_45C59: jmp short $+2 loc_45C5B: mov eax, [rbp+var_50] mov rcx, [rbp+var_48] movzx ecx, word ptr [rcx+14h] cmp eax, ecx jbe short loc_45C75 mov rax, [rbp+var_48] movzx eax, word ptr [rax+14h] mov [rbp+var_50], eax loc_45C75: jmp short $+2 loc_45C77: jmp short $+2 loc_45C79: mov eax, [rbp+var_54] mov rcx, [rbp+var_48] movzx ecx, word ptr [rcx+14h] cmp eax, ecx jbe short loc_45C93 mov rax, [rbp+var_48] movzx eax, word ptr [rax+14h] mov [rbp+var_54], eax loc_45C93: jmp short $+2 loc_45C95: jmp loc_45D4F loc_45C9A: mov rax, [rbp+var_48] movzx eax, word ptr [rax+12h] and eax, 20h cmp eax, 0 jz loc_45D4D mov rax, [rbp+var_48] movzx edi, byte ptr [rax+1Ah] mov rsi, [rbp+var_30] call _ma_calc_blob_length mov [rbp+var_50], eax mov rax, [rbp+var_48] movzx edi, byte ptr [rax+1Ah] mov rsi, [rbp+var_38] call _ma_calc_blob_length mov [rbp+var_54], eax mov rax, [rbp+var_48] cmp word ptr [rax+14h], 0 jz short loc_45D1F jmp short $+2 loc_45CE3: mov eax, [rbp+var_50] mov rcx, [rbp+var_48] movzx ecx, word ptr [rcx+14h] cmp eax, ecx jbe short loc_45CFD mov rax, [rbp+var_48] movzx eax, word ptr [rax+14h] mov [rbp+var_50], eax loc_45CFD: jmp short $+2 loc_45CFF: jmp short $+2 loc_45D01: mov eax, [rbp+var_54] mov rcx, [rbp+var_48] movzx ecx, word ptr [rcx+14h] cmp eax, ecx jbe short loc_45D1B mov rax, [rbp+var_48] movzx eax, word ptr [rax+14h] mov [rbp+var_54], eax loc_45D1B: jmp short $+2 loc_45D1D: jmp short $+2 loc_45D1F: mov rax, [rbp+var_30] mov rcx, [rbp+var_48] movzx ecx, byte ptr [rcx+1Ah] movsxd rcx, ecx mov rax, [rax+rcx] mov [rbp+var_30], rax mov rax, [rbp+var_38] mov rcx, [rbp+var_48] movzx ecx, byte ptr [rcx+1Ah] movsxd rcx, ecx mov rax, [rax+rcx] mov [rbp+var_38], rax loc_45D4D: jmp short $+2 loc_45D4F: cmp [rbp+var_4C], 1 jz short loc_45D61 cmp [rbp+var_4C], 0Fh jz short loc_45D61 cmp [rbp+var_4C], 11h jnz short loc_45D90 loc_45D61: mov rax, [rbp+var_48] mov rdi, [rax] mov rsi, [rbp+var_30] mov eax, [rbp+var_50] mov edx, eax mov rcx, [rbp+var_38] mov eax, [rbp+var_54] mov r8d, eax xor r9d, r9d call ha_compare_text cmp eax, 0 jz short loc_45D8E mov [rbp+var_1], 1 jmp short loc_45DFF loc_45D8E: jmp short loc_45DE8 loc_45D90: mov eax, [rbp+var_50] cmp eax, [rbp+var_54] jz short loc_45D9E mov [rbp+var_1], 1 jmp short loc_45DFF loc_45D9E: mov rax, [rbp+var_30] mov ecx, [rbp+var_50] add rax, rcx mov [rbp+var_40], rax loc_45DAC: mov rax, [rbp+var_30] cmp rax, [rbp+var_40] jz short loc_45DE6 mov rax, [rbp+var_30] mov rcx, rax add rcx, 1 mov [rbp+var_30], rcx movzx eax, byte ptr [rax] mov rcx, [rbp+var_38] mov rdx, rcx add rdx, 1 mov [rbp+var_38], rdx movzx ecx, byte ptr [rcx] cmp eax, ecx jz short loc_45DE4 mov [rbp+var_1], 1 jmp short loc_45DFF loc_45DE4: jmp short loc_45DAC loc_45DE6: jmp short $+2 loc_45DE8: jmp short $+2 loc_45DEA: mov rax, [rbp+var_48] add rax, 20h ; ' ' mov [rbp+var_48], rax jmp loc_45B25 loc_45DFB: mov [rbp+var_1], 0 loc_45DFF: mov al, [rbp+var_1] add rsp, 60h pop rbp retn
char ma_unique_comp(long long a1, long long a2, long long a3, char a4) { unsigned __int8 *v4; // rax unsigned __int8 *v5; // rcx unsigned int v7; // [rsp+Ch] [rbp-54h] unsigned int v8; // [rsp+10h] [rbp-50h] int v9; // [rsp+14h] [rbp-4Ch] unsigned long long i; // [rsp+18h] [rbp-48h] unsigned __int8 *v11; // [rsp+20h] [rbp-40h] unsigned __int8 *v12; // [rsp+28h] [rbp-38h] unsigned __int8 *v13; // [rsp+30h] [rbp-30h] for ( i = *(_QWORD *)(a1 + 8); i < *(_QWORD *)(a1 + 16); i += 32LL ) { v9 = *(unsigned __int8 *)(i + 24); v7 = *(unsigned __int16 *)(i + 20); v8 = v7; if ( !*(_BYTE *)(i + 25) ) goto LABEL_10; if ( (unsigned __int8)(*(_BYTE *)(i + 25) & *(_BYTE *)(a2 + *(unsigned int *)(i + 12))) != (unsigned __int8)(*(_BYTE *)(i + 25) & *(_BYTE *)(a3 + *(unsigned int *)(i + 12))) ) return 1; if ( (*(_BYTE *)(i + 25) & *(_BYTE *)(a2 + *(unsigned int *)(i + 12))) != 0 ) { if ( !a4 ) return 1; } else { LABEL_10: v13 = (unsigned __int8 *)(*(unsigned int *)(i + 8) + a2); v12 = (unsigned __int8 *)(*(unsigned int *)(i + 8) + a3); if ( (*(_WORD *)(i + 18) & 8) != 0 ) { if ( *(_BYTE *)(i + 26) == 1 ) { ++v13; v8 = *(unsigned __int8 *)(*(unsigned int *)(i + 8) + a2); ++v12; v7 = *(unsigned __int8 *)(*(unsigned int *)(i + 8) + a3); } else { v8 = *(unsigned __int16 *)v13; v7 = *(unsigned __int16 *)v12; v13 += 2; v12 += 2; } if ( v8 > *(unsigned __int16 *)(i + 20) ) v8 = *(unsigned __int16 *)(i + 20); if ( v7 > *(unsigned __int16 *)(i + 20) ) v7 = *(unsigned __int16 *)(i + 20); } else if ( (*(_WORD *)(i + 18) & 0x20) != 0 ) { v8 = ma_calc_blob_length(*(unsigned __int8 *)(i + 26), v13); v7 = ma_calc_blob_length(*(unsigned __int8 *)(i + 26), v12); if ( *(_WORD *)(i + 20) ) { if ( v8 > *(unsigned __int16 *)(i + 20) ) v8 = *(unsigned __int16 *)(i + 20); if ( v7 > *(unsigned __int16 *)(i + 20) ) v7 = *(unsigned __int16 *)(i + 20); } v13 = *(unsigned __int8 **)&v13[*(unsigned __int8 *)(i + 26)]; v12 = *(unsigned __int8 **)&v12[*(unsigned __int8 *)(i + 26)]; } if ( v9 == 1 || v9 == 15 || v9 == 17 ) { if ( (unsigned int)ha_compare_text(*(_QWORD *)i, v13, v8, v12, v7, 0LL) ) return 1; } else { if ( v8 != v7 ) return 1; v11 = &v13[v8]; while ( v13 != v11 ) { v4 = v13++; v5 = v12++; if ( *v4 != *v5 ) return 1; } } } } return 0; }
_ma_unique_comp: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV AL,CL MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RBP + -0x21],AL MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x48],RAX LAB_00145b25: MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x10] JNC 0x00145dfb MOV RAX,qword ptr [RBP + -0x48] MOVZX EAX,byte ptr [RAX + 0x18] MOV dword ptr [RBP + -0x4c],EAX MOV RAX,qword ptr [RBP + -0x48] MOVZX EAX,word ptr [RAX + 0x14] MOV dword ptr [RBP + -0x54],EAX MOV dword ptr [RBP + -0x50],EAX MOV RAX,qword ptr [RBP + -0x48] CMP byte ptr [RAX + 0x19],0x0 JZ 0x00145bb8 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x48] MOV ECX,dword ptr [RCX + 0xc] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV RCX,qword ptr [RBP + -0x48] MOVZX ECX,byte ptr [RCX + 0x19] AND EAX,ECX MOV dword ptr [RBP + -0x58],EAX MOV RCX,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x48] MOV EDX,dword ptr [RDX + 0xc] MOVZX ECX,byte ptr [RCX + RDX*0x1] MOV RDX,qword ptr [RBP + -0x48] MOVZX EDX,byte ptr [RDX + 0x19] AND ECX,EDX CMP EAX,ECX JZ 0x00145b9c MOV byte ptr [RBP + -0x1],0x1 JMP 0x00145dff LAB_00145b9c: CMP dword ptr [RBP + -0x58],0x0 JZ 0x00145bb6 CMP byte ptr [RBP + -0x21],0x0 JNZ 0x00145bb1 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00145dff LAB_00145bb1: JMP 0x00145dea LAB_00145bb6: JMP 0x00145bb8 LAB_00145bb8: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x48] MOV ECX,dword ptr [RCX + 0x8] ADD RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x48] MOV ECX,dword ptr [RCX + 0x8] ADD RAX,RCX MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x48] MOVZX EAX,word ptr [RAX + 0x12] AND EAX,0x8 CMP EAX,0x0 JZ 0x00145c9a MOV RAX,qword ptr [RBP + -0x48] MOVZX EAX,byte ptr [RAX + 0x1a] MOV dword ptr [RBP + -0x5c],EAX CMP dword ptr [RBP + -0x5c],0x1 JNZ 0x00145c2d MOV RAX,qword ptr [RBP + -0x30] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x30],RCX MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x50],EAX MOV RAX,qword ptr [RBP + -0x38] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x38],RCX MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x54],EAX JMP 0x00145c59 LAB_00145c2d: MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,word ptr [RAX] MOV dword ptr [RBP + -0x50],EAX MOV RAX,qword ptr [RBP + -0x38] MOVZX EAX,word ptr [RAX] MOV dword ptr [RBP + -0x54],EAX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x2 MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x2 MOV qword ptr [RBP + -0x38],RAX LAB_00145c59: JMP 0x00145c5b LAB_00145c5b: MOV EAX,dword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x48] MOVZX ECX,word ptr [RCX + 0x14] CMP EAX,ECX JBE 0x00145c75 MOV RAX,qword ptr [RBP + -0x48] MOVZX EAX,word ptr [RAX + 0x14] MOV dword ptr [RBP + -0x50],EAX LAB_00145c75: JMP 0x00145c77 LAB_00145c77: JMP 0x00145c79 LAB_00145c79: MOV EAX,dword ptr [RBP + -0x54] MOV RCX,qword ptr [RBP + -0x48] MOVZX ECX,word ptr [RCX + 0x14] CMP EAX,ECX JBE 0x00145c93 MOV RAX,qword ptr [RBP + -0x48] MOVZX EAX,word ptr [RAX + 0x14] MOV dword ptr [RBP + -0x54],EAX LAB_00145c93: JMP 0x00145c95 LAB_00145c95: JMP 0x00145d4f LAB_00145c9a: MOV RAX,qword ptr [RBP + -0x48] MOVZX EAX,word ptr [RAX + 0x12] AND EAX,0x20 CMP EAX,0x0 JZ 0x00145d4d MOV RAX,qword ptr [RBP + -0x48] MOVZX EDI,byte ptr [RAX + 0x1a] MOV RSI,qword ptr [RBP + -0x30] CALL 0x0013eef0 MOV dword ptr [RBP + -0x50],EAX MOV RAX,qword ptr [RBP + -0x48] MOVZX EDI,byte ptr [RAX + 0x1a] MOV RSI,qword ptr [RBP + -0x38] CALL 0x0013eef0 MOV dword ptr [RBP + -0x54],EAX MOV RAX,qword ptr [RBP + -0x48] CMP word ptr [RAX + 0x14],0x0 JZ 0x00145d1f JMP 0x00145ce3 LAB_00145ce3: MOV EAX,dword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x48] MOVZX ECX,word ptr [RCX + 0x14] CMP EAX,ECX JBE 0x00145cfd MOV RAX,qword ptr [RBP + -0x48] MOVZX EAX,word ptr [RAX + 0x14] MOV dword ptr [RBP + -0x50],EAX LAB_00145cfd: JMP 0x00145cff LAB_00145cff: JMP 0x00145d01 LAB_00145d01: MOV EAX,dword ptr [RBP + -0x54] MOV RCX,qword ptr [RBP + -0x48] MOVZX ECX,word ptr [RCX + 0x14] CMP EAX,ECX JBE 0x00145d1b MOV RAX,qword ptr [RBP + -0x48] MOVZX EAX,word ptr [RAX + 0x14] MOV dword ptr [RBP + -0x54],EAX LAB_00145d1b: JMP 0x00145d1d LAB_00145d1d: JMP 0x00145d1f LAB_00145d1f: MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x48] MOVZX ECX,byte ptr [RCX + 0x1a] MOVSXD RCX,ECX MOV RAX,qword ptr [RAX + RCX*0x1] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x48] MOVZX ECX,byte ptr [RCX + 0x1a] MOVSXD RCX,ECX MOV RAX,qword ptr [RAX + RCX*0x1] MOV qword ptr [RBP + -0x38],RAX LAB_00145d4d: JMP 0x00145d4f LAB_00145d4f: CMP dword ptr [RBP + -0x4c],0x1 JZ 0x00145d61 CMP dword ptr [RBP + -0x4c],0xf JZ 0x00145d61 CMP dword ptr [RBP + -0x4c],0x11 JNZ 0x00145d90 LAB_00145d61: MOV RAX,qword ptr [RBP + -0x48] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RBP + -0x50] MOV EDX,EAX MOV RCX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RBP + -0x54] MOV R8D,EAX XOR R9D,R9D CALL 0x001efe60 CMP EAX,0x0 JZ 0x00145d8e MOV byte ptr [RBP + -0x1],0x1 JMP 0x00145dff LAB_00145d8e: JMP 0x00145de8 LAB_00145d90: MOV EAX,dword ptr [RBP + -0x50] CMP EAX,dword ptr [RBP + -0x54] JZ 0x00145d9e MOV byte ptr [RBP + -0x1],0x1 JMP 0x00145dff LAB_00145d9e: MOV RAX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RBP + -0x50] ADD RAX,RCX MOV qword ptr [RBP + -0x40],RAX LAB_00145dac: MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x40] JZ 0x00145de6 MOV RAX,qword ptr [RBP + -0x30] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x30],RCX MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x38] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0x38],RDX MOVZX ECX,byte ptr [RCX] CMP EAX,ECX JZ 0x00145de4 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00145dff LAB_00145de4: JMP 0x00145dac LAB_00145de6: JMP 0x00145de8 LAB_00145de8: JMP 0x00145dea LAB_00145dea: MOV RAX,qword ptr [RBP + -0x48] ADD RAX,0x20 MOV qword ptr [RBP + -0x48],RAX JMP 0x00145b25 LAB_00145dfb: MOV byte ptr [RBP + -0x1],0x0 LAB_00145dff: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x60 POP RBP RET
int1 _ma_unique_comp(long param_1,long param_2,long param_3,char param_4) { char cVar1; byte bVar2; ushort uVar3; ushort uVar4; int iVar5; ushort *puVar6; uint local_5c; uint local_58; int8 *local_50; ushort *local_40; ushort *local_38; local_50 = *(int8 **)(param_1 + 8); do { if (*(int8 **)(param_1 + 0x10) <= local_50) { return 0; } cVar1 = *(char *)(local_50 + 3); local_5c = (uint)*(ushort *)((long)local_50 + 0x14); if (*(char *)((long)local_50 + 0x19) == '\0') { LAB_00145bb8: local_38 = (ushort *)(param_2 + (ulong)*(uint *)(local_50 + 1)); local_40 = (ushort *)(param_3 + (ulong)*(uint *)(local_50 + 1)); if ((*(ushort *)((long)local_50 + 0x12) & 8) == 0) { local_58 = local_5c; if ((*(ushort *)((long)local_50 + 0x12) & 0x20) != 0) { local_58 = _ma_calc_blob_length(*(int1 *)((long)local_50 + 0x1a),local_38); local_5c = _ma_calc_blob_length(*(int1 *)((long)local_50 + 0x1a),local_40); if (*(short *)((long)local_50 + 0x14) != 0) { if (*(ushort *)((long)local_50 + 0x14) < local_58) { local_58 = (uint)*(ushort *)((long)local_50 + 0x14); } if (*(ushort *)((long)local_50 + 0x14) < local_5c) { local_5c = (uint)*(ushort *)((long)local_50 + 0x14); } } local_38 = *(ushort **) ((long)local_38 + (long)(int)(uint)*(byte *)((long)local_50 + 0x1a)); local_40 = *(ushort **) ((long)local_40 + (long)(int)(uint)*(byte *)((long)local_50 + 0x1a)); } } else { if (*(char *)((long)local_50 + 0x1a) == '\x01') { local_58 = (uint)(byte)*local_38; local_5c = (uint)(byte)*local_40; local_40 = (ushort *)((long)local_40 + 1); local_38 = (ushort *)((long)local_38 + 1); } else { local_58 = (uint)*local_38; local_5c = (uint)*local_40; local_38 = local_38 + 1; local_40 = local_40 + 1; } if (*(ushort *)((long)local_50 + 0x14) < local_58) { local_58 = (uint)*(ushort *)((long)local_50 + 0x14); } if (*(ushort *)((long)local_50 + 0x14) < local_5c) { local_5c = (uint)*(ushort *)((long)local_50 + 0x14); } } if (((cVar1 == '\x01') || (cVar1 == '\x0f')) || (cVar1 == '\x11')) { iVar5 = ha_compare_text(*local_50,local_38,local_58,local_40,local_5c,0); if (iVar5 != 0) { return 1; } } else { if (local_58 != local_5c) { return 1; } puVar6 = (ushort *)((long)local_38 + (ulong)local_58); while (local_38 != puVar6) { uVar3 = *local_38; uVar4 = *local_40; local_40 = (ushort *)((long)local_40 + 1); local_38 = (ushort *)((long)local_38 + 1); if ((byte)uVar3 != (byte)uVar4) { return 1; } } } } else { bVar2 = *(byte *)(param_2 + (ulong)*(uint *)((long)local_50 + 0xc)) & *(byte *)((long)local_50 + 0x19); if (bVar2 != (*(byte *)(param_3 + (ulong)*(uint *)((long)local_50 + 0xc)) & *(byte *)((long)local_50 + 0x19))) { return 1; } if (bVar2 == 0) goto LAB_00145bb8; if (param_4 == '\0') { return 1; } } local_50 = local_50 + 4; } while( true ); }
49,437
void testing::internal::PrintWithFallback<unsigned int>(unsigned int const&, std::ostream*)
AlayaLite/build_O0/_deps/googletest-src/googletest/include/gtest/gtest-printers.h
void PrintWithFallback(const T& value, ::std::ostream* os) { using Printer = typename FindFirstPrinter< T, void, ContainerPrinter, FunctionPointerPrinter, PointerPrinter, ProtobufPrinter, #ifdef GTEST_HAS_ABSL ConvertibleToAbslStringifyPrinter, #endif // GTEST_HAS_ABSL internal_stream_operator_without_lexical_name_lookup::StreamPrinter, ConvertibleToIntegerPrinter, ConvertibleToStringViewPrinter, RawBytesPrinter, FallbackPrinter>::type; Printer::PrintValue(value, os); }
O0
c
void testing::internal::PrintWithFallback<unsigned int>(unsigned int const&, std::ostream*): subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq %rsi, 0x8(%rsp) movq 0x10(%rsp), %rdi movq 0x8(%rsp), %rsi callq 0x20e40 addq $0x18, %rsp retq nopw %cs:(%rax,%rax) nopl (%rax)
_ZN7testing8internal17PrintWithFallbackIjEEvRKT_PSo: sub rsp, 18h mov [rsp+18h+var_8], rdi mov [rsp+18h+var_10], rsi mov rdi, [rsp+18h+var_8] mov rsi, [rsp+18h+var_10] call _ZN7testing8internal52internal_stream_operator_without_lexical_name_lookup13StreamPrinter10PrintValueIjvEEDTcvvlsdefp0_fp_ERKT_PSo add rsp, 18h retn
long long testing::internal::PrintWithFallback<unsigned int>(long long a1, long long a2) { return testing::internal::internal_stream_operator_without_lexical_name_lookup::StreamPrinter::PrintValue<unsigned int,void>( a1, a2); }
PrintWithFallback<unsigned_int>: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV qword ptr [RSP + 0x8],RSI MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x8] CALL 0x00120e40 ADD RSP,0x18 RET
/* void testing::internal::PrintWithFallback<unsigned int>(unsigned int const&, std::ostream*) */ void testing::internal::PrintWithFallback<unsigned_int>(uint *param_1,ostream *param_2) { ((void)((*{parm#2})<<{parm#1}))testing::internal:: internal_stream_operator_without_lexical_name_lookup::StreamPrinter::PrintValue<unsigned_int,void> (param_1,param_2); return; }
49,438
fill_buffer
eloqsql/storage/myisam/mi_packrec.c
static void fill_buffer(MI_BIT_BUFF *bit_buff) { if (bit_buff->pos >= bit_buff->end) { bit_buff->error= 1; bit_buff->current_byte=0; return; } #if BITS_SAVED == 64 bit_buff->current_byte= ((((uint) ((uchar) bit_buff->pos[7]))) | (((uint) ((uchar) bit_buff->pos[6])) << 8) | (((uint) ((uchar) bit_buff->pos[5])) << 16) | (((uint) ((uchar) bit_buff->pos[4])) << 24) | ((ulonglong) ((((uint) ((uchar) bit_buff->pos[3]))) | (((uint) ((uchar) bit_buff->pos[2])) << 8) | (((uint) ((uchar) bit_buff->pos[1])) << 16) | (((uint) ((uchar) bit_buff->pos[0])) << 24)) << 32)); bit_buff->pos+=8; #else #if BITS_SAVED == 32 bit_buff->current_byte= (((uint) ((uchar) bit_buff->pos[3])) | (((uint) ((uchar) bit_buff->pos[2])) << 8) | (((uint) ((uchar) bit_buff->pos[1])) << 16) | (((uint) ((uchar) bit_buff->pos[0])) << 24)); bit_buff->pos+=4; #else bit_buff->current_byte= (uint) (((uint) ((uchar) bit_buff->pos[1])) | (((uint) ((uchar) bit_buff->pos[0])) << 8)); bit_buff->pos+=2; #endif #endif }
O0
c
fill_buffer: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq -0x8(%rbp), %rcx cmpq 0x10(%rcx), %rax jb 0xbc3d1 movq -0x8(%rbp), %rax movl $0x1, 0x28(%rax) movq -0x8(%rbp), %rax movl $0x0, (%rax) jmp 0xbc425 movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movzbl 0x3(%rax), %ecx movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movzbl 0x2(%rax), %eax shll $0x8, %eax orl %eax, %ecx movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movzbl 0x1(%rax), %eax shll $0x10, %eax orl %eax, %ecx movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movzbl (%rax), %eax shll $0x18, %eax orl %eax, %ecx movq -0x8(%rbp), %rax movl %ecx, (%rax) movq -0x8(%rbp), %rax movq 0x8(%rax), %rcx addq $0x4, %rcx movq %rcx, 0x8(%rax) popq %rbp retq nopw (%rax,%rax)
fill_buffer_0: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rax, [rax+8] mov rcx, [rbp+var_8] cmp rax, [rcx+10h] jb short loc_BC3D1 mov rax, [rbp+var_8] mov dword ptr [rax+28h], 1 mov rax, [rbp+var_8] mov dword ptr [rax], 0 jmp short loc_BC425 loc_BC3D1: mov rax, [rbp+var_8] mov rax, [rax+8] movzx ecx, byte ptr [rax+3] mov rax, [rbp+var_8] mov rax, [rax+8] movzx eax, byte ptr [rax+2] shl eax, 8 or ecx, eax mov rax, [rbp+var_8] mov rax, [rax+8] movzx eax, byte ptr [rax+1] shl eax, 10h or ecx, eax mov rax, [rbp+var_8] mov rax, [rax+8] movzx eax, byte ptr [rax] shl eax, 18h or ecx, eax mov rax, [rbp+var_8] mov [rax], ecx mov rax, [rbp+var_8] mov rcx, [rax+8] add rcx, 4 mov [rax+8], rcx loc_BC425: pop rbp retn
long long fill_buffer_0(long long a1) { long long result; // rax if ( *(_QWORD *)(a1 + 8) < *(_QWORD *)(a1 + 16) ) { *(_DWORD *)a1 = _byteswap_ulong(**(_DWORD **)(a1 + 8)); result = a1; *(_QWORD *)(a1 + 8) += 4LL; } else { *(_DWORD *)(a1 + 40) = 1; result = a1; *(_DWORD *)a1 = 0; } return result; }
fill_buffer: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x10] JC 0x001bc3d1 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x28],0x1 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX],0x0 JMP 0x001bc425 LAB_001bc3d1: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOVZX ECX,byte ptr [RAX + 0x3] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOVZX EAX,byte ptr [RAX + 0x2] SHL EAX,0x8 OR ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOVZX EAX,byte ptr [RAX + 0x1] SHL EAX,0x10 OR ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOVZX EAX,byte ptr [RAX] SHL EAX,0x18 OR ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x8] ADD RCX,0x4 MOV qword ptr [RAX + 0x8],RCX LAB_001bc425: POP RBP RET
void fill_buffer(int4 *param_1) { if (*(ulong *)(param_1 + 2) < *(ulong *)(param_1 + 4)) { *param_1 = CONCAT13(**(int1 **)(param_1 + 2), CONCAT12(*(int1 *)(*(long *)(param_1 + 2) + 1), CONCAT11(*(int1 *)(*(long *)(param_1 + 2) + 2), *(int1 *)(*(long *)(param_1 + 2) + 3)))); *(long *)(param_1 + 2) = *(long *)(param_1 + 2) + 4; } else { param_1[10] = 1; *param_1 = 0; } return; }
49,439
VoxelInfoBuilder::add_texture_default(char const*)
untodesu[P]voxelius/game/shared/voxel_registry.cc
VoxelInfoBuilder &VoxelInfoBuilder::add_texture_default(const char *texture) { default_texture.paths.push_back(texture); return *this; }
O1
cpp
VoxelInfoBuilder::add_texture_default(char const*): pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx leaq 0x8(%rsp), %r14 leaq 0x7(%rsp), %rdx movq %r14, %rdi callq 0x1ccb6 leaq 0x8(%rbx), %rdi movq %r14, %rsi callq 0x47e06 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x4bc75 movq 0x18(%rsp), %rsi incq %rsi callq 0x176b0 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r14 retq movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x4bc9e movq 0x18(%rsp), %rsi incq %rsi callq 0x176b0 movq %rbx, %rdi callq 0x17c80
_ZN16VoxelInfoBuilder19add_texture_defaultEPKc: push r14 push rbx sub rsp, 28h mov rbx, rdi lea r14, [rsp+38h+var_30] lea rdx, [rsp+38h+var_31] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rbx+8] mov rsi, r14 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) lea rax, [rsp+38h+var_20] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_4BC75 mov rsi, [rsp+38h+var_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4BC75: mov rax, rbx add rsp, 28h pop rbx pop r14 retn mov rbx, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_4BC9E mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4BC9E: mov rdi, rbx call __Unwind_Resume
VoxelInfoBuilder * VoxelInfoBuilder::add_texture_default(VoxelInfoBuilder *this, const char *a2) { void *v3[2]; // [rsp+8h] [rbp-30h] BYREF long long v4; // [rsp+18h] [rbp-20h] BYREF std::string::basic_string<std::allocator<char>>(v3, (long long)a2); std::vector<std::string>::emplace_back<std::string>((long long)this + 8, (long long)v3); if ( v3[0] != &v4 ) operator delete(v3[0], v4 + 1); return this; }
add_texture_default: PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,RDI LEA R14,[RSP + 0x8] LEA RDX,[RSP + 0x7] MOV RDI,R14 CALL 0x0011ccb6 LEA RDI,[RBX + 0x8] LAB_0014bc52: MOV RSI,R14 CALL 0x00147e06 LAB_0014bc5a: LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0014bc75 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001176b0 LAB_0014bc75: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R14 RET
/* VoxelInfoBuilder::add_texture_default(char const*) */ VoxelInfoBuilder * __thiscall VoxelInfoBuilder::add_texture_default(VoxelInfoBuilder *this,char *param_1) { allocator local_31; long *local_30 [2]; long local_20 [2]; std::__cxx11::string::string<std::allocator<char>>((string *)local_30,param_1,&local_31); /* try { // try from 0014bc52 to 0014bc59 has its CatchHandler @ 0014bc80 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string> ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 8), (string *)local_30); if (local_30[0] != local_20) { operator_delete(local_30[0],local_20[0] + 1); } return this; }
49,440
parse_cpu_mask(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool (&) [512])
monkey531[P]llama/common/common.cpp
bool parse_cpu_mask(const std::string & mask, bool (&boolmask)[GGML_MAX_N_THREADS]) { // Discard potential 0x prefix size_t start_i = 0; if (mask.length() >= 2 && mask.substr(0, 2) == "0x") { start_i = 2; } size_t num_digits = mask.length() - start_i; if (num_digits > 128) num_digits = 128; size_t end_i = num_digits + start_i; for (size_t i = start_i, n = (num_digits*4 - 1); i < end_i; i++, n-=4) { char c = mask.at(i); int8_t id = c; if ((c >= '0' && c <= '9')) { id -= '0'; } else if (c >= 'a' && c <= 'f') { id -= 'a' - 10; } else if (c >= 'A' && c <= 'F') { id -= 'A' - 10; } else { LOG_ERR("Invalid hex character '%c' at position %d\n", c, int32_t(i)); return false; } boolmask[ n ] = boolmask[ n ] || ((id & 8) != 0); boolmask[n - 1] = boolmask[n - 1] || ((id & 4) != 0); boolmask[n - 2] = boolmask[n - 2] || ((id & 2) != 0); boolmask[n - 3] = boolmask[n - 3] || ((id & 1) != 0); } return true; }
O2
cpp
parse_cpu_mask(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool (&) [512]): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rsi, %r15 movq %rdi, %rbx movq 0x8(%rdi), %rax cmpq $0x2, %rax jb 0x549f7 leaq 0x8(%rsp), %r14 pushq $0x2 popq %rcx movq %r14, %rdi movq %rbx, %rsi xorl %edx, %edx callq 0x23940 leaq 0x61b42(%rip), %rsi # 0xb651a movq %r14, %rdi callq 0x3a932 movl %eax, %ebp movq %r14, %rdi callq 0x241c8 movzbl %bpl, %r14d addl %r14d, %r14d movq 0x8(%rbx), %rax jmp 0x549fa xorl %r14d, %r14d subq %r14, %rax movl $0x80, %ecx cmpq %rcx, %rax cmovaeq %rcx, %rax leaq (%rax,%r14), %r12 movl %eax, %eax leaq (%r15,%rax,4), %r13 addq $-0x4, %r13 cmpq %r12, %r14 jae 0x54acf movq %rbx, %rdi movq %r14, %rsi callq 0x23a60 movsbl (%rax), %r15d leal -0x30(%r15), %eax cmpb $0xa, %al jb 0x54a54 leal -0x61(%r15), %eax cmpb $0x5, %al ja 0x54a45 addb $-0x57, %r15b jmp 0x54a51 leal -0x41(%r15), %eax cmpb $0x5, %al ja 0x54aa4 addb $-0x37, %r15b movl %r15d, %eax movzbl %al, %eax movd (%r13), %xmm0 punpcklbw %xmm0, %xmm0 # xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7] punpcklwd %xmm0, %xmm0 # xmm0 = xmm0[0,0,1,1,2,2,3,3] movd %eax, %xmm1 pshufd $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] movdqa 0x5eeea(%rip), %xmm2 # 0xb3960 pand %xmm2, %xmm1 pcmpeqd %xmm2, %xmm1 por %xmm0, %xmm1 pand 0x5eee6(%rip), %xmm1 # 0xb3970 packuswb %xmm1, %xmm1 packuswb %xmm1, %xmm1 movd %xmm1, (%r13) incq %r14 addq $-0x4, %r13 jmp 0x54a17 leaq 0xab98d(%rip), %rax # 0x100438 cmpl $0x0, (%rax) js 0x54acf callq 0x97716 leaq 0x5f1f6(%rip), %rdx # 0xb3cb2 pushq $0x4 popq %rsi movq %rax, %rdi movl %r15d, %ecx movl %r14d, %r8d xorl %eax, %eax callq 0x977ae cmpq %r12, %r14 setae %al addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_Z14parse_cpu_maskRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA512_b: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r15, rsi mov rbx, rdi mov rax, [rdi+8] cmp rax, 2 jb short loc_549F7 lea r14, [rsp+58h+var_50] push 2 pop rcx mov rdi, r14 mov rsi, rbx xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) lea rsi, aIncompleteUtf8+24h; "0x" mov rdi, r14 call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) mov ebp, eax mov rdi, r14; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() movzx r14d, bpl add r14d, r14d mov rax, [rbx+8] jmp short loc_549FA loc_549F7: xor r14d, r14d loc_549FA: sub rax, r14 mov ecx, 80h cmp rax, rcx cmovnb rax, rcx lea r12, [rax+r14] mov eax, eax lea r13, [r15+rax*4] add r13, 0FFFFFFFFFFFFFFFCh loc_54A17: cmp r14, r12 jnb loc_54ACF mov rdi, rbx mov rsi, r14 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE2atEm; std::string::at(ulong) movsx r15d, byte ptr [rax] lea eax, [r15-30h] cmp al, 0Ah jb short loc_54A54 lea eax, [r15-61h] cmp al, 5 ja short loc_54A45 add r15b, 0A9h jmp short loc_54A51 loc_54A45: lea eax, [r15-41h] cmp al, 5 ja short loc_54AA4 add r15b, 0C9h loc_54A51: mov eax, r15d loc_54A54: movzx eax, al movd xmm0, dword ptr [r13+0] punpcklbw xmm0, xmm0 punpcklwd xmm0, xmm0 movd xmm1, eax pshufd xmm1, xmm1, 0 movdqa xmm2, cs:xmmword_B3960 pand xmm1, xmm2 pcmpeqd xmm1, xmm2 por xmm1, xmm0 pand xmm1, cs:xmmword_B3970 packuswb xmm1, xmm1 packuswb xmm1, xmm1 movd dword ptr [r13+0], xmm1 inc r14 add r13, 0FFFFFFFFFFFFFFFCh jmp loc_54A17 loc_54AA4: lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js short loc_54ACF call _Z15common_log_mainv; common_log_main(void) lea rdx, aInvalidHexChar; "Invalid hex character '%c' at position "... push 4 pop rsi mov rdi, rax mov ecx, r15d mov r8d, r14d xor eax, eax call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) loc_54ACF: cmp r14, r12 setnb al add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
bool parse_cpu_mask(long long a1, long long a2) { unsigned long long v2; // rax bool v3; // bp unsigned long long v4; // r14 unsigned long long v5; // rax unsigned long long v6; // r12 unsigned int *v7; // r13 int v8; // r15d unsigned __int8 v9; // al unsigned __int8 v10; // r15 __m128i v11; // xmm0 __m128i v12; // xmm0 __m128i si128; // xmm2 __m128i v14; // xmm1 __m128i v15; // xmm1 int v16; // eax int v17; // r9d _BYTE v19[80]; // [rsp+8h] [rbp-50h] BYREF v2 = *(_QWORD *)(a1 + 8); if ( v2 < 2 ) { v4 = 0LL; } else { std::string::substr(v19, a1, 0LL, 2LL); v3 = std::operator==<char>((long long)v19); std::string::~string(v19); v4 = 2 * (unsigned int)v3; v2 = *(_QWORD *)(a1 + 8); } v5 = v2 - v4; if ( v5 >= 0x80 ) v5 = 128LL; v6 = v5 + v4; v7 = (unsigned int *)(a2 + 4LL * (unsigned int)v5 - 4); while ( v4 < v6 ) { v8 = *(char *)std::string::at(a1, v4); v9 = v8 - 48; if ( (unsigned __int8)(v8 - 48) >= 0xAu ) { if ( (unsigned __int8)(v8 - 97) > 5u ) { if ( (unsigned __int8)(v8 - 65) > 5u ) { if ( common_log_verbosity_thold >= 0 ) { v16 = common_log_main(); common_log_add(v16, 4, (unsigned int)"Invalid hex character '%c' at position %d\n", v8, v4, v17); } return v4 >= v6; } v10 = v8 - 55; } else { v10 = v8 - 87; } v9 = v10; } v11 = _mm_cvtsi32_si128(*v7); v12 = _mm_unpacklo_epi8(v11, v11); si128 = _mm_load_si128((const __m128i *)&xmmword_B3960); v14 = _mm_and_si128( _mm_or_si128( _mm_cmpeq_epi32(_mm_and_si128(_mm_shuffle_epi32(_mm_cvtsi32_si128(v9), 0), si128), si128), _mm_unpacklo_epi16(v12, v12)), (__m128i)xmmword_B3970); v15 = _mm_packus_epi16(v14, v14); *v7 = _mm_cvtsi128_si32(_mm_packus_epi16(v15, v15)); ++v4; --v7; } return v4 >= v6; }
parse_cpu_mask: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R15,RSI MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x8] CMP RAX,0x2 JC 0x001549f7 LEA R14,[RSP + 0x8] PUSH 0x2 POP RCX MOV RDI,R14 MOV RSI,RBX XOR EDX,EDX CALL 0x00123940 LEA RSI,[0x1b651a] MOV RDI,R14 CALL 0x0013a932 MOV EBP,EAX MOV RDI,R14 CALL 0x001241c8 MOVZX R14D,BPL ADD R14D,R14D MOV RAX,qword ptr [RBX + 0x8] JMP 0x001549fa LAB_001549f7: XOR R14D,R14D LAB_001549fa: SUB RAX,R14 MOV ECX,0x80 CMP RAX,RCX CMOVNC RAX,RCX LEA R12,[RAX + R14*0x1] MOV EAX,EAX LEA R13,[R15 + RAX*0x4] ADD R13,-0x4 LAB_00154a17: CMP R14,R12 JNC 0x00154acf MOV RDI,RBX MOV RSI,R14 CALL 0x00123a60 MOVSX R15D,byte ptr [RAX] LEA EAX,[R15 + -0x30] CMP AL,0xa JC 0x00154a54 LEA EAX,[R15 + -0x61] CMP AL,0x5 JA 0x00154a45 ADD R15B,0xa9 JMP 0x00154a51 LAB_00154a45: LEA EAX,[R15 + -0x41] CMP AL,0x5 JA 0x00154aa4 ADD R15B,0xc9 LAB_00154a51: MOV EAX,R15D LAB_00154a54: MOVZX EAX,AL MOVD XMM0,dword ptr [R13] PUNPCKLBW XMM0,XMM0 PUNPCKLWD XMM0,XMM0 MOVD XMM1,EAX PSHUFD XMM1,XMM1,0x0 MOVDQA XMM2,xmmword ptr [0x001b3960] PAND XMM1,XMM2 PCMPEQD XMM1,XMM2 POR XMM1,XMM0 PAND XMM1,xmmword ptr [0x001b3970] PACKUSWB XMM1,XMM1 PACKUSWB XMM1,XMM1 MOVD dword ptr [R13],XMM1 INC R14 ADD R13,-0x4 JMP 0x00154a17 LAB_00154aa4: LEA RAX,[0x200438] CMP dword ptr [RAX],0x0 JS 0x00154acf CALL 0x00197716 LEA RDX,[0x1b3cb2] PUSH 0x4 POP RSI MOV RDI,RAX MOV ECX,R15D MOV R8D,R14D XOR EAX,EAX CALL 0x001977ae LAB_00154acf: CMP R14,R12 SETNC AL ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* parse_cpu_mask(std::__cxx11::string const&, bool (&) [512]) */ bool parse_cpu_mask(string *param_1,bool *param_2) { ulong uVar1; char cVar2; char cVar3; short sVar6; short sVar7; short sVar8; bool bVar9; ulong uVar10; char *pcVar11; int8 uVar12; bool *pbVar13; ulong uVar14; byte bVar15; int1 uVar19; int1 auVar16 [16]; short sVar21; int1 auVar24 [16]; int1 auVar25 [16]; int1 auVar26 [16]; string local_50 [32]; char cVar4; char cVar5; int1 auVar17 [16]; int1 auVar18 [16]; int2 uVar20; int4 uVar22; int6 uVar23; uVar10 = *(ulong *)(param_1 + 8); if (uVar10 < 2) { uVar14 = 0; } else { std::__cxx11::string::substr((ulong)local_50,(ulong)param_1); bVar9 = std::operator==(local_50,"0x"); std::__cxx11::string::~string(local_50); uVar14 = (ulong)((uint)bVar9 * 2); uVar10 = *(ulong *)(param_1 + 8); } uVar10 = uVar10 - uVar14; if (0x7f < uVar10) { uVar10 = 0x80; } uVar1 = uVar10 + uVar14; pbVar13 = param_2 + (uVar10 & 0xffffffff) * 4; do { pbVar13 = pbVar13 + -4; if (uVar1 <= uVar14) { LAB_00154acf: return uVar1 <= uVar14; } pcVar11 = (char *)std::__cxx11::string::at((ulong)param_1); cVar2 = *pcVar11; bVar15 = cVar2 - 0x30; if (9 < bVar15) { if ((byte)(cVar2 + 0x9fU) < 6) { bVar15 = cVar2 + 0xa9; } else { if (5 < (byte)(cVar2 + 0xbfU)) { if (-1 < common_log_verbosity_thold) { uVar12 = common_log_main(); common_log_add(uVar12,4,"Invalid hex character \'%c\' at position %d\n",(int)cVar2, uVar14 & 0xffffffff); } goto LAB_00154acf; } bVar15 = cVar2 - 0x37; } } uVar22 = *(int4 *)pbVar13; uVar19 = (int1)((uint)uVar22 >> 0x18); uVar20 = CONCAT11(uVar19,uVar19); uVar19 = (int1)((uint)uVar22 >> 0x10); uVar12 = CONCAT35(CONCAT21(uVar20,uVar19),CONCAT14(uVar19,uVar22)); uVar19 = (int1)((uint)uVar22 >> 8); uVar23 = CONCAT51(CONCAT41((int)((ulong)uVar12 >> 0x20),uVar19),uVar19); auVar26._0_2_ = CONCAT11((char)uVar22,(char)uVar22); uVar10 = CONCAT62(uVar23,auVar26._0_2_); auVar18._8_4_ = 0; auVar18._0_8_ = uVar10; auVar18._12_2_ = uVar20; auVar18._14_2_ = uVar20; uVar20 = (int2)((ulong)uVar12 >> 0x20); auVar17._12_4_ = auVar18._12_4_; auVar17._8_2_ = 0; auVar17._0_8_ = uVar10; auVar17._10_2_ = uVar20; auVar16._10_6_ = auVar17._10_6_; auVar16._8_2_ = uVar20; auVar16._0_8_ = uVar10; uVar20 = (int2)uVar23; auVar26._8_8_ = auVar16._8_8_; auVar26._6_2_ = uVar20; auVar26._4_2_ = uVar20; auVar26._2_2_ = auVar26._0_2_; auVar24._1_3_ = 0; auVar24[0] = bVar15; auVar24[4] = bVar15; auVar24._5_3_ = 0; auVar24[8] = bVar15; auVar24._9_3_ = 0; auVar24[0xc] = bVar15; auVar24._13_3_ = 0; auVar24 = auVar24 & _DAT_001b3960; auVar25._0_4_ = -(uint)(auVar24._0_4_ == SUB164(_DAT_001b3960,0)); auVar25._4_4_ = -(uint)(auVar24._4_4_ == SUB164(_DAT_001b3960,4)); auVar25._8_4_ = -(uint)(auVar24._8_4_ == SUB164(_DAT_001b3960,8)); auVar25._12_4_ = -(uint)(auVar24._12_4_ == SUB164(_DAT_001b3960,0xc)); auVar26 = (auVar25 | auVar26) & _DAT_001b3970; sVar6 = auVar26._0_2_; cVar2 = (0 < sVar6) * (sVar6 < 0x100) * auVar26[0] - (0xff < sVar6); sVar6 = auVar26._2_2_; sVar21 = CONCAT11((0 < sVar6) * (sVar6 < 0x100) * auVar26[2] - (0xff < sVar6),cVar2); sVar6 = auVar26._4_2_; cVar3 = (0 < sVar6) * (sVar6 < 0x100) * auVar26[4] - (0xff < sVar6); sVar6 = auVar26._6_2_; uVar22 = CONCAT13((0 < sVar6) * (sVar6 < 0x100) * auVar26[6] - (0xff < sVar6), CONCAT12(cVar3,sVar21)); sVar6 = auVar26._8_2_; cVar4 = (0 < sVar6) * (sVar6 < 0x100) * auVar26[8] - (0xff < sVar6); sVar6 = auVar26._10_2_; uVar23 = CONCAT15((0 < sVar6) * (sVar6 < 0x100) * auVar26[10] - (0xff < sVar6), CONCAT14(cVar4,uVar22)); sVar6 = auVar26._12_2_; cVar5 = (0 < sVar6) * (sVar6 < 0x100) * auVar26[0xc] - (0xff < sVar6); sVar8 = auVar26._14_2_; sVar6 = (short)((uint)uVar22 >> 0x10); sVar7 = (short)((uint6)uVar23 >> 0x20); sVar8 = (short)(CONCAT17((0 < sVar8) * (sVar8 < 0x100) * auVar26[0xe] - (0xff < sVar8), CONCAT16(cVar5,uVar23)) >> 0x30); *(uint *)pbVar13 = CONCAT13((0 < sVar8) * (sVar8 < 0x100) * cVar5 - (0xff < sVar8), CONCAT12((0 < sVar7) * (sVar7 < 0x100) * cVar4 - (0xff < sVar7), CONCAT11((0 < sVar6) * (sVar6 < 0x100) * cVar3 - (0xff < sVar6), (0 < sVar21) * (sVar21 < 0x100) * cVar2 - (0xff < sVar21)))); uVar14 = uVar14 + 1; } while( true ); }
49,441
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)
monkey531[P]llama/common/./json.hpp
reference emplace_back(Args&& ... args) { // emplace_back only works for null objects or arrays if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_array()))) { JSON_THROW(type_error::create(311, detail::concat("cannot use emplace_back() with ", type_name()), this)); } // transform null object into an array if (is_null()) { m_data.m_type = value_t::array; m_data.m_value = value_t::array; assert_invariant(); } // add element to array (perfect forwarding) const auto old_capacity = m_data.m_value.array->capacity(); m_data.m_value.array->emplace_back(std::forward<Args>(args)...); return set_parent(m_data.m_value.array->back(), old_capacity); }
O2
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %rbx movq %rdi, %r14 movzbl (%rdi), %eax testl %eax, %eax jne 0xc4573 movb $0x2, (%r14) callq 0x64ee2 movq %rax, %rdi movq %rax, 0x8(%r14) jmp 0xc457c cmpl $0x2, %eax jne 0xc4599 movq 0x8(%r14), %rdi movq %rbx, %rsi callq 0xc467a movq 0x8(%r14), %rax movq 0x8(%rax), %rax addq $-0x10, %rax addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq pushq $0x20 popq %rdi callq 0x265e0 movq %rax, %rbx movq %r14, %rdi callq 0x6a48e leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x13b97(%rip), %rsi # 0xd8152 leaq 0x10(%rsp), %rdi callq 0xc461c movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x137, %esi # imm = 0x137 movq %r14, %rcx callq 0x6a342 xorl %ebp, %ebp leaq 0x5abb2(%rip), %rsi # 0x11f198 leaq -0x5d447(%rip), %rdx # 0x671a6 movq %rbx, %rdi callq 0x275b0 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x27998 testb %bpl, %bpl jne 0xc460c jmp 0xc4614 movq %rax, %r14 movq %rbx, %rdi callq 0x268f0 movq %r14, %rdi callq 0x27660
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE12emplace_backIJRSD_EEESF_DpOT_: push rbp; char push r14; int push rbx; int sub rsp, 30h mov rbx, rsi mov r14, rdi movzx eax, byte ptr [rdi] test eax, eax jnz short loc_C4573 mov byte ptr [r14], 2 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS3_ISD_SaISD_EEJEEEPT_DpOT0_; 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>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>() mov rdi, rax mov [r14+8], rax jmp short loc_C457C loc_C4573: cmp eax, 2 jnz short loc_C4599 mov rdi, [r14+8] loc_C457C: mov rsi, rbx call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJRSD_EEESH_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&) mov rax, [r14+8] mov rax, [rax+8] add rax, 0FFFFFFFFFFFFFFF0h add rsp, 30h pop rbx pop r14 pop rbp retn loc_C4599: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aCannotUseEmpla; "cannot use emplace_back() with " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA32_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[32],char const*>(char const(&)[32],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 137h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+48h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_C460C jmp short loc_C4614 mov r14, rax loc_C460C: mov rdi, rbx; void * call ___cxa_free_exception loc_C4614: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>&>( long long a1, long long a2) { long long v3; // rdi nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx _BYTE v6[56]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 ) { if ( *(_BYTE *)a1 != 2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[32],char const*>( v6, "cannot use emplace_back() with "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 311, (long long)v6); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } v3 = *(_QWORD *)(a1 + 8); } else { *(_BYTE *)a1 = 2; v3 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>(); *(_QWORD *)(a1 + 8) = v3; } std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>&>( v3, a2); return *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) - 16LL; }
emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&>: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV RBX,RSI MOV R14,RDI MOVZX EAX,byte ptr [RDI] TEST EAX,EAX JNZ 0x001c4573 MOV byte ptr [R14],0x2 CALL 0x00164ee2 MOV RDI,RAX MOV qword ptr [R14 + 0x8],RAX JMP 0x001c457c LAB_001c4573: CMP EAX,0x2 JNZ 0x001c4599 MOV RDI,qword ptr [R14 + 0x8] LAB_001c457c: MOV RSI,RBX CALL 0x001c467a MOV RAX,qword ptr [R14 + 0x8] MOV RAX,qword ptr [RAX + 0x8] ADD RAX,-0x10 ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_001c4599: PUSH 0x20 POP RDI CALL 0x001265e0 MOV RBX,RAX MOV RDI,R14 CALL 0x0016a48e LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_001c45b4: LEA RSI,[0x1d8152] LEA RDI,[RSP + 0x10] CALL 0x001c461c MOV BPL,0x1 LAB_001c45c8: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x137 MOV RCX,R14 CALL 0x0016a342 XOR EBP,EBP LEA RSI,[0x21f198] LEA RDX,[0x1671a6] MOV RDI,RBX CALL 0x001275b0
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&>(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 * __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> :: emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&> (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,basic_json *param_1) { vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *this_00; int8 uVar1; char *local_40; detail local_38 [32]; if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0) { *this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2; this_00 = (vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *)create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> (); *(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> **)(this + 8) = this_00; } else { if (*this != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2) { uVar1 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 001c45b4 to 001c45c4 has its CatchHandler @ 001c4609 */ detail::concat<std::__cxx11::string,char_const(&)[32],char_const*> (local_38,"cannot use emplace_back() with ",&local_40); /* try { // try from 001c45c8 to 001c45f4 has its CatchHandler @ 001c45f5 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar1,0x137,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception); } this_00 = *(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> **)(this + 8); } std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> :: emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&> (this_00,param_1); return (basic_json *)(*(long *)(*(long *)(this + 8) + 8) + -0x10); }
49,442
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>>::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, unsigned long)
monkey531[P]llama/common/json.hpp
explicit iteration_proxy_value(IteratorType it, std::size_t array_index_ = 0) noexcept(std::is_nothrow_move_constructible<IteratorType>::value && std::is_nothrow_default_constructible<string_type>::value) : anchor(std::move(it)) , array_index(array_index_) {}
O2
cpp
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>>::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, unsigned long): pushq %rbx subq $0x10, %rsp movq %rdi, %rbx movups (%rsi), %xmm0 movups 0x10(%rsi), %xmm1 movups %xmm1, 0x10(%rdi) movups %xmm0, (%rdi) movq %rdx, 0x20(%rdi) andq $0x0, 0x28(%rdi) addq $0x30, %rdi leaq 0x30237(%rip), %rsi # 0xb5773 leaq 0xf(%rsp), %rdx callq 0x275c8 leaq 0x60(%rbx), %rax movq %rax, 0x50(%rbx) andq $0x0, 0x58(%rbx) movb $0x0, 0x60(%rbx) addq $0x10, %rsp popq %rbx retq movq %rax, %rdi callq 0x27867 nop
_ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEEC2ESI_m: push rbx sub rsp, 10h mov rbx, rdi movups xmm0, xmmword ptr [rsi] movups xmm1, xmmword ptr [rsi+10h] movups xmmword ptr [rdi+10h], xmm1 movups xmmword ptr [rdi], xmm0 mov [rdi+20h], rdx and qword ptr [rdi+28h], 0 add rdi, 30h ; '0' lea rsi, aMinExp0+0Ah; "0" lea rdx, [rsp+18h+var_9] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rax, [rbx+60h] mov [rbx+50h], rax and qword ptr [rbx+58h], 0 mov byte ptr [rbx+60h], 0 add rsp, 10h pop rbx retn mov rdi, rax call __clang_call_terminate
long long nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>>::iteration_proxy_value( long long a1, __int128 *a2, long long a3) { __int128 v3; // xmm0 long long result; // rax v3 = *a2; *(_OWORD *)(a1 + 16) = a2[1]; *(_OWORD *)a1 = v3; *(_QWORD *)(a1 + 32) = a3; *(_QWORD *)(a1 + 40) = 0LL; std::string::basic_string<std::allocator<char>>((_QWORD *)(a1 + 48), (long long)"0"); result = a1 + 96; *(_QWORD *)(a1 + 80) = a1 + 96; *(_QWORD *)(a1 + 88) = 0LL; *(_BYTE *)(a1 + 96) = 0; return result; }
iteration_proxy_value: PUSH RBX SUB RSP,0x10 MOV RBX,RDI MOVUPS XMM0,xmmword ptr [RSI] MOVUPS XMM1,xmmword ptr [RSI + 0x10] MOVUPS xmmword ptr [RDI + 0x10],XMM1 MOVUPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x20],RDX AND qword ptr [RDI + 0x28],0x0 ADD RDI,0x30 LAB_00185535: LEA RSI,[0x1b5773] LEA RDX,[RSP + 0xf] CALL 0x001275c8 LEA RAX,[RBX + 0x60] MOV qword ptr [RBX + 0x50],RAX AND qword ptr [RBX + 0x58],0x0 MOV byte ptr [RBX + 0x60],0x0 ADD RSP,0x10 POP RBX RET
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const> >::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>, unsigned long) */ void __thiscall nlohmann::json_abi_v3_11_3::detail:: iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> ::iteration_proxy_value (iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> *this,int8 *param_2,int8 param_3) { int8 uVar1; int8 uVar2; int8 uVar3; allocator local_9; uVar1 = *param_2; uVar2 = param_2[1]; uVar3 = param_2[3]; *(int8 *)(this + 0x10) = param_2[2]; *(int8 *)(this + 0x18) = uVar3; *(int8 *)this = uVar1; *(int8 *)(this + 8) = uVar2; *(int8 *)(this + 0x20) = param_3; *(int8 *)(this + 0x28) = 0; /* try { // try from 00185535 to 00185545 has its CatchHandler @ 0018555d */ std::__cxx11::string::string<std::allocator<char>>((string *)(this + 0x30),"0",&local_9); *(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> **)(this + 0x50) = this + 0x60; *(int8 *)(this + 0x58) = 0; this[0x60] = (iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> )0x0; return; }
49,443
get_collation_number
eloqsql/mysys/charset.c
uint get_collation_number(const char *name, myf flags) { uint id; char alias[64]; my_pthread_once(&charsets_initialized, init_available_charsets); if ((id= get_collation_number_internal(name))) return id; if ((name= get_collation_name_alias(name, alias, sizeof(alias),flags))) return get_collation_number_internal(name); return 0; }
O0
c
get_collation_number: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x60(%rbp) movq %rsi, -0x68(%rbp) leaq 0x329190(%rip), %rdi # 0x39aae4 leaq 0x85(%rip), %rsi # 0x719e0 callq 0x2a280 movq -0x60(%rbp), %rdi callq 0x71b70 movl %eax, -0x6c(%rbp) cmpl $0x0, %eax je 0x71979 movl -0x6c(%rbp), %eax movl %eax, -0x54(%rbp) jmp 0x719ae movq -0x60(%rbp), %rdi leaq -0x50(%rbp), %rsi movq -0x68(%rbp), %rcx movl $0x40, %edx callq 0x71c10 movq %rax, -0x60(%rbp) cmpq $0x0, %rax je 0x719a7 movq -0x60(%rbp), %rdi callq 0x71b70 movl %eax, -0x54(%rbp) jmp 0x719ae movl $0x0, -0x54(%rbp) movl -0x54(%rbp), %eax movl %eax, -0x70(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x719cf movl -0x70(%rbp), %eax addq $0x70, %rsp popq %rbp retq callq 0x2a2e0 nopw %cs:(%rax,%rax)
get_collation_number: push rbp mov rbp, rsp sub rsp, 70h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_60], rdi mov [rbp+var_68], rsi lea rdi, charsets_initialized lea rsi, init_available_charsets call _pthread_once mov rdi, [rbp+var_60] call get_collation_number_internal mov [rbp+var_6C], eax cmp eax, 0 jz short loc_71979 mov eax, [rbp+var_6C] mov [rbp+var_54], eax jmp short loc_719AE loc_71979: mov rdi, [rbp+var_60] lea rsi, [rbp+var_50] mov rcx, [rbp+var_68] mov edx, 40h ; '@' call get_collation_name_alias mov [rbp+var_60], rax cmp rax, 0 jz short loc_719A7 mov rdi, [rbp+var_60] call get_collation_number_internal mov [rbp+var_54], eax jmp short loc_719AE loc_719A7: mov [rbp+var_54], 0 loc_719AE: mov eax, [rbp+var_54] mov [rbp+var_70], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_719CF mov eax, [rbp+var_70] add rsp, 70h pop rbp retn loc_719CF: call ___stack_chk_fail
long long get_collation_number(long long a1, long long a2) { unsigned int collation_number_internal; // [rsp+4h] [rbp-6Ch] long long collation_name_alias; // [rsp+10h] [rbp-60h] _BYTE v6[72]; // [rsp+20h] [rbp-50h] BYREF unsigned long long v7; // [rsp+68h] [rbp-8h] v7 = __readfsqword(0x28u); pthread_once(&charsets_initialized, init_available_charsets); collation_number_internal = get_collation_number_internal(a1); if ( collation_number_internal ) { return collation_number_internal; } else { collation_name_alias = get_collation_name_alias(a1, v6, 64LL, a2); if ( collation_name_alias ) return (unsigned int)get_collation_number_internal(collation_name_alias); else return 0; } }
get_collation_number: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x60],RDI MOV qword ptr [RBP + -0x68],RSI LEA RDI,[0x49aae4] LEA RSI,[0x1719e0] CALL 0x0012a280 MOV RDI,qword ptr [RBP + -0x60] CALL 0x00171b70 MOV dword ptr [RBP + -0x6c],EAX CMP EAX,0x0 JZ 0x00171979 MOV EAX,dword ptr [RBP + -0x6c] MOV dword ptr [RBP + -0x54],EAX JMP 0x001719ae LAB_00171979: MOV RDI,qword ptr [RBP + -0x60] LEA RSI,[RBP + -0x50] MOV RCX,qword ptr [RBP + -0x68] MOV EDX,0x40 CALL 0x00171c10 MOV qword ptr [RBP + -0x60],RAX CMP RAX,0x0 JZ 0x001719a7 MOV RDI,qword ptr [RBP + -0x60] CALL 0x00171b70 MOV dword ptr [RBP + -0x54],EAX JMP 0x001719ae LAB_001719a7: MOV dword ptr [RBP + -0x54],0x0 LAB_001719ae: MOV EAX,dword ptr [RBP + -0x54] MOV dword ptr [RBP + -0x70],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001719cf MOV EAX,dword ptr [RBP + -0x70] ADD RSP,0x70 POP RBP RET LAB_001719cf: CALL 0x0012a2e0
int get_collation_number(int8 param_1,int8 param_2) { long lVar1; long in_FS_OFFSET; int local_5c; int1 local_58 [72]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); pthread_once(&charsets_initialized,init_available_charsets); local_5c = get_collation_number_internal(param_1); if (local_5c == 0) { lVar1 = get_collation_name_alias(param_1,local_58,0x40,param_2); if (lVar1 == 0) { local_5c = 0; } else { local_5c = get_collation_number_internal(lVar1); } } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_5c; }
49,444
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>::basic_json(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>&&)
hkr04[P]cpp-mcp/common/json.hpp
basic_json(basic_json&& other) noexcept : json_base_class_t(std::forward<json_base_class_t>(other)), m_data(std::move(other.m_data)) { // check that passed value is valid other.assert_invariant(false); // invalidate payload other.m_data.m_type = value_t::null; other.m_data.m_value = {}; set_parents(); assert_invariant(); }
O0
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::basic_json(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>&&): subq $0x28, %rsp movq %rdi, 0x20(%rsp) movq %rsi, 0x18(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x18(%rsp), %rcx movups (%rcx), %xmm0 movups %xmm0, (%rax) movq 0x18(%rsp), %rdi xorl %esi, %esi callq 0x6ad00 movq 0x8(%rsp), %rdi movq 0x18(%rsp), %rax movb $0x0, (%rax) movq $0x0, 0x10(%rsp) movq 0x18(%rsp), %rax movq 0x10(%rsp), %rcx movq %rcx, 0x8(%rax) callq 0x6c6f0 jmp 0x6b77a movq 0x8(%rsp), %rdi movl $0x1, %esi callq 0x6ad00 addq $0x28, %rsp retq movq %rax, %rdi callq 0xef10 nopw %cs:(%rax,%rax)
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2EOSD_: sub rsp, 28h mov [rsp+28h+var_8], rdi mov [rsp+28h+var_10], rsi mov rax, [rsp+28h+var_8] mov [rsp+28h+var_20], rax mov rcx, [rsp+28h+var_10] movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rax], xmm0 mov rdi, [rsp+28h+var_10] 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, [rsp+28h+var_20] mov rax, [rsp+28h+var_10] mov byte ptr [rax], 0 mov [rsp+28h+var_18], 0 mov rax, [rsp+28h+var_10] mov rcx, [rsp+28h+var_18] mov [rax+8], rcx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE11set_parentsEv; 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>::set_parents(void) jmp short $+2 loc_6B77A: mov rdi, [rsp+28h+var_20] 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) add rsp, 28h retn mov rdi, rax call __clang_call_terminate
char 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( _OWORD *a1, long long a2) { *a1 = *(_OWORD *)a2; 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( a2, 0); *(_BYTE *)a2 = 0; *(_QWORD *)(a2 + 8) = 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>::set_parents(a1); 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>::assert_invariant( (long long)a1, 1); }
basic_json: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x18],RSI MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x8],RAX MOV RCX,qword ptr [RSP + 0x18] MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RAX],XMM0 MOV RDI,qword ptr [RSP + 0x18] XOR ESI,ESI CALL 0x0016ad00 MOV RDI,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RSP + 0x18] MOV byte ptr [RAX],0x0 MOV qword ptr [RSP + 0x10],0x0 MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0x8],RCX LAB_0016b773: CALL 0x0016c6f0 JMP 0x0016b77a LAB_0016b77a: MOV RDI,qword ptr [RSP + 0x8] MOV ESI,0x1 CALL 0x0016ad00 ADD RSP,0x28 RET
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::basic_json(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>&&) */ void __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::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> *this,basic_json *param_1) { int8 uVar1; uVar1 = *(int8 *)(param_1 + 8); *(int8 *)this = *(int8 *)param_1; *(int8 *)(this + 8) = uVar1; assert_invariant(SUB81(param_1,0)); *param_1 = (basic_json)0x0; *(int8 *)(param_1 + 8) = 0; /* try { // try from 0016b773 to 0016b777 has its CatchHandler @ 0016b78e */ set_parents(); assert_invariant(SUB81(this,0)); return; }
49,445
bitmap_fast_test_and_set
eloqsql/mysys/my_bitmap.c
my_bool bitmap_fast_test_and_set(MY_BITMAP *map, uint bitmap_bit) { uchar *value= ((uchar*) map->bitmap) + (bitmap_bit / 8); uchar bit= 1 << ((bitmap_bit) & 7); uchar res= (*value) & bit; *value|= bit; return res; }
O3
c
bitmap_fast_test_and_set: pushq %rbp movq %rsp, %rbp movl %esi, %ecx movl %esi, %edx andb $0x7, %cl movl $0x1, %esi shll %cl, %esi movq (%rdi), %rcx shrl $0x3, %edx movb (%rcx,%rdx), %dil movl %edi, %eax andb %sil, %al orb %sil, %dil movb %dil, (%rcx,%rdx) popq %rbp retq
bitmap_fast_test_and_set: push rbp mov rbp, rsp mov ecx, esi mov edx, esi and cl, 7 mov esi, 1 shl esi, cl mov rcx, [rdi] shr edx, 3 mov dil, [rcx+rdx] mov eax, edi and al, sil or dil, sil mov [rcx+rdx], dil pop rbp retn
char bitmap_fast_test_and_set(long long *a1, unsigned int a2) { int v3; // esi long long v4; // rcx long long v5; // rdx char v6; // di char result; // al v3 = 1 << (a2 & 7); v4 = *a1; v5 = a2 >> 3; v6 = *(_BYTE *)(*a1 + v5); result = v3 & v6; *(_BYTE *)(v4 + v5) = v3 | v6; return result; }
bitmap_fast_test_and_set: PUSH RBP MOV RBP,RSP MOV ECX,ESI MOV EDX,ESI AND CL,0x7 MOV ESI,0x1 SHL ESI,CL MOV RCX,qword ptr [RDI] SHR EDX,0x3 MOV DIL,byte ptr [RCX + RDX*0x1] MOV EAX,EDI AND AL,SIL OR DIL,SIL MOV byte ptr [RCX + RDX*0x1],DIL POP RBP RET
byte bitmap_fast_test_and_set(long *param_1,uint param_2) { byte bVar1; byte bVar2; bVar1 = *(byte *)(*param_1 + (ulong)(param_2 >> 3)); bVar2 = (byte)(1 << ((byte)param_2 & 7)); *(byte *)(*param_1 + (ulong)(param_2 >> 3)) = bVar1 | bVar2; return bVar1 & bVar2; }
49,446
lunasvg::SVGRadialGradientAttributes::setDefaultValues(lunasvg::SVGRadialGradientElement const*)
dmazzella[P]pylunasvg/lunasvg/source/svgpaintelement.h
void setDefaultValues(const SVGRadialGradientElement* element) { SVGGradientAttributes::setDefaultValues(element); if(!m_cx) { m_cx = element; } if(!m_cy) { m_cy = element; } if(!m_r) { m_r = element; } }
O0
c
lunasvg::SVGRadialGradientAttributes::setDefaultValues(lunasvg::SVGRadialGradientElement const*): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x18(%rbp) movq -0x10(%rbp), %rsi callq 0x386b0 movq -0x18(%rbp), %rax cmpq $0x0, 0x20(%rax) jne 0x37e58 movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx movq %rcx, 0x20(%rax) movq -0x18(%rbp), %rax cmpq $0x0, 0x28(%rax) jne 0x37e6f movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx movq %rcx, 0x28(%rax) movq -0x18(%rbp), %rax cmpq $0x0, 0x30(%rax) jne 0x37e86 movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx movq %rcx, 0x30(%rax) addq $0x20, %rsp popq %rbp retq nopl (%rax)
_ZN7lunasvg27SVGRadialGradientAttributes16setDefaultValuesEPKNS_24SVGRadialGradientElementE: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rdi, [rbp+var_8]; this mov [rbp+var_18], rdi mov rsi, [rbp+var_10]; lunasvg::SVGGradientElement * call _ZN7lunasvg21SVGGradientAttributes16setDefaultValuesEPKNS_18SVGGradientElementE; lunasvg::SVGGradientAttributes::setDefaultValues(lunasvg::SVGGradientElement const*) mov rax, [rbp+var_18] cmp qword ptr [rax+20h], 0 jnz short loc_37E58 mov rax, [rbp+var_18] mov rcx, [rbp+var_10] mov [rax+20h], rcx loc_37E58: mov rax, [rbp+var_18] cmp qword ptr [rax+28h], 0 jnz short loc_37E6F mov rax, [rbp+var_18] mov rcx, [rbp+var_10] mov [rax+28h], rcx loc_37E6F: mov rax, [rbp+var_18] cmp qword ptr [rax+30h], 0 jnz short loc_37E86 mov rax, [rbp+var_18] mov rcx, [rbp+var_10] mov [rax+30h], rcx loc_37E86: add rsp, 20h pop rbp retn
lunasvg::SVGRadialGradientAttributes * lunasvg::SVGRadialGradientAttributes::setDefaultValues( lunasvg::SVGRadialGradientAttributes *this, const lunasvg::SVGRadialGradientElement *a2) { lunasvg::SVGRadialGradientAttributes *result; // rax lunasvg::SVGGradientAttributes::setDefaultValues(this, a2); if ( !*((_QWORD *)this + 4) ) *((_QWORD *)this + 4) = a2; if ( !*((_QWORD *)this + 5) ) *((_QWORD *)this + 5) = a2; result = this; if ( !*((_QWORD *)this + 6) ) { result = this; *((_QWORD *)this + 6) = a2; } return result; }
setDefaultValues: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RDI MOV RSI,qword ptr [RBP + -0x10] CALL 0x001386b0 MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x20],0x0 JNZ 0x00137e58 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x20],RCX LAB_00137e58: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x28],0x0 JNZ 0x00137e6f MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x28],RCX LAB_00137e6f: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x30],0x0 JNZ 0x00137e86 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x30],RCX LAB_00137e86: ADD RSP,0x20 POP RBP RET
/* lunasvg::SVGRadialGradientAttributes::setDefaultValues(lunasvg::SVGRadialGradientElement const*) */ void __thiscall lunasvg::SVGRadialGradientAttributes::setDefaultValues (SVGRadialGradientAttributes *this,SVGRadialGradientElement *param_1) { SVGGradientAttributes::setDefaultValues ((SVGGradientAttributes *)this,(SVGGradientElement *)param_1); if (*(long *)(this + 0x20) == 0) { *(SVGRadialGradientElement **)(this + 0x20) = param_1; } if (*(long *)(this + 0x28) == 0) { *(SVGRadialGradientElement **)(this + 0x28) = param_1; } if (*(long *)(this + 0x30) == 0) { *(SVGRadialGradientElement **)(this + 0x30) = param_1; } return; }
49,447
my_strxfrm_pad_desc_and_reverse_nopad
eloqsql/strings/ctype-simple.c
size_t my_strxfrm_pad_desc_and_reverse_nopad(CHARSET_INFO *cs, uchar *str, uchar *frmend, uchar *strend, uint nweights, uint flags, uint level) { if (nweights && frmend < strend && (flags & MY_STRXFRM_PAD_WITH_SPACE)) { uint fill_length= MY_MIN((uint) (strend - frmend), nweights * cs->mbminlen); memset(frmend, 0x00, fill_length); frmend+= fill_length; } my_strxfrm_desc_and_reverse(str, frmend, flags, level); if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && frmend < strend) { size_t fill_length= strend - frmend; memset(frmend, 0x00, fill_length); frmend= strend; } return frmend - str; }
O3
c
my_strxfrm_pad_desc_and_reverse_nopad: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %r9d, %r12d movq %rcx, %r15 movq %rdx, %r14 movq %rsi, %rbx movl 0x10(%rbp), %ecx testl %r8d, %r8d sete %al cmpq %r15, %rdx setae %sil testb $0x40, %r12b sete %dl orb %al, %dl orb %sil, %dl jne 0x57bd1 movl %r8d, %r13d movl %r15d, %eax imull 0x98(%rdi), %r13d subl %r14d, %eax cmpl %eax, %r13d cmovael %eax, %r13d movq %r14, %rdi xorl %esi, %esi movq %r13, %rdx callq 0x261c0 movl 0x10(%rbp), %ecx addq %r13, %r14 movq %rbx, %rdi movq %r14, %rsi movl %r12d, %edx callq 0x59412 testb %r12b, %r12b jns 0x57bfc cmpq %r15, %r14 jae 0x57bfc movq %r15, %rdx subq %r14, %rdx movq %r14, %rdi xorl %esi, %esi callq 0x261c0 movq %r15, %r14 subq %rbx, %r14 movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_strxfrm_pad_desc_and_reverse_nopad: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r12d, r9d mov r15, rcx mov r14, rdx mov rbx, rsi mov ecx, [rbp+arg_0] test r8d, r8d setz al cmp rdx, r15 setnb sil test r12b, 40h setz dl or dl, al or dl, sil jnz short loc_57BD1 mov r13d, r8d mov eax, r15d imul r13d, [rdi+98h] sub eax, r14d cmp r13d, eax cmovnb r13d, eax mov rdi, r14 xor esi, esi mov rdx, r13 call _memset mov ecx, [rbp+arg_0] add r14, r13 loc_57BD1: mov rdi, rbx mov rsi, r14 mov edx, r12d call my_strxfrm_desc_and_reverse test r12b, r12b jns short loc_57BFC cmp r14, r15 jnb short loc_57BFC mov rdx, r15 sub rdx, r14 mov rdi, r14 xor esi, esi call _memset mov r14, r15 loc_57BFC: sub r14, rbx mov rax, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_strxfrm_pad_desc_and_reverse_nopad( long long a1, long long a2, unsigned long long a3, unsigned long long a4, int a5, unsigned int a6, unsigned int a7) { unsigned long long v9; // r14 long long v10; // rcx long long v11; // r13 v9 = a3; v10 = a7; if ( a3 < a4 && a5 != 0 && (a6 & 0x40) != 0 ) { v11 = (unsigned int)(*(_DWORD *)(a1 + 152) * a5); if ( (unsigned int)v11 >= (int)a4 - (int)a3 ) v11 = (unsigned int)(a4 - a3); memset(a3, 0LL, v11); v10 = a7; v9 += v11; } my_strxfrm_desc_and_reverse(a2, v9, a6, v10); if ( (a6 & 0x80u) != 0 && v9 < a4 ) { memset(v9, 0LL, a4 - v9); v9 = a4; } return v9 - a2; }
my_strxfrm_pad_desc_and_reverse_nopad: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R12D,R9D MOV R15,RCX MOV R14,RDX MOV RBX,RSI MOV ECX,dword ptr [RBP + 0x10] TEST R8D,R8D SETZ AL CMP RDX,R15 SETNC SIL TEST R12B,0x40 SETZ DL OR DL,AL OR DL,SIL JNZ 0x00157bd1 MOV R13D,R8D MOV EAX,R15D IMUL R13D,dword ptr [RDI + 0x98] SUB EAX,R14D CMP R13D,EAX CMOVNC R13D,EAX MOV RDI,R14 XOR ESI,ESI MOV RDX,R13 CALL 0x001261c0 MOV ECX,dword ptr [RBP + 0x10] ADD R14,R13 LAB_00157bd1: MOV RDI,RBX MOV RSI,R14 MOV EDX,R12D CALL 0x00159412 TEST R12B,R12B JNS 0x00157bfc CMP R14,R15 JNC 0x00157bfc MOV RDX,R15 SUB RDX,R14 MOV RDI,R14 XOR ESI,ESI CALL 0x001261c0 MOV R14,R15 LAB_00157bfc: SUB R14,RBX MOV RAX,R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_strxfrm_pad_desc_and_reverse_nopad (long param_1,long param_2,void *param_3,void *param_4,int param_5,uint param_6, int4 param_7) { uint uVar1; uint uVar2; if (((param_6 & 0x40) != 0 && param_5 != 0) && param_3 < param_4) { uVar2 = param_5 * *(int *)(param_1 + 0x98); uVar1 = (int)param_4 - (int)param_3; if (uVar1 <= uVar2) { uVar2 = uVar1; } memset(param_3,0,(ulong)uVar2); param_3 = (void *)((long)param_3 + (ulong)uVar2); } my_strxfrm_desc_and_reverse(param_2,param_3,param_6,param_7); if (((char)param_6 < '\0') && (param_3 < param_4)) { memset(param_3,0,(long)param_4 - (long)param_3); param_3 = param_4; } return (long)param_3 - param_2; }
49,448
write_hook_for_undo_row_update
eloqsql/storage/maria/ma_blockrec.c
my_bool write_hook_for_undo_row_update(enum translog_record_type type __attribute__ ((unused)), TRN *trn, MARIA_HA *tbl_info, LSN *lsn, void *hook_arg) { MARIA_SHARE *share= tbl_info->s; share->state.state.checksum+= *(ha_checksum *)hook_arg; return write_hook_for_undo(type, trn, tbl_info, lsn, hook_arg); }
O3
c
write_hook_for_undo_row_update: pushq %rbp movq %rsp, %rbp movq (%rdx), %rax movl (%r8), %edx addl %edx, 0x48(%rax) movq (%rcx), %rax movq %rax, 0x98(%rsi) movq 0xa0(%rsi), %rcx movq %rcx, %rdx shlq $0x8, %rdx je 0x3784b xorl %eax, %eax popq %rbp retq orq %rax, %rcx movq %rcx, 0xa0(%rsi) jmp 0x37847
write_hook_for_undo_row_update: push rbp mov rbp, rsp mov rax, [rdx] mov edx, [r8] add [rax+48h], edx mov rax, [rcx] mov [rsi+98h], rax mov rcx, [rsi+0A0h] mov rdx, rcx shl rdx, 8 jz short loc_3784B loc_37847: xor eax, eax pop rbp retn loc_3784B: or rcx, rax mov [rsi+0A0h], rcx jmp short loc_37847
long long write_hook_for_undo_row_update(long long a1, long long a2, long long a3, long long *a4, _DWORD *a5) { long long v5; // rax *(_DWORD *)(*(_QWORD *)a3 + 72LL) += *a5; v5 = *a4; *(_QWORD *)(a2 + 152) = *a4; if ( !(*(_QWORD *)(a2 + 160) << 8) ) *(_QWORD *)(a2 + 160) |= v5; return 0LL; }
write_hook_for_undo_row_update: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDX] MOV EDX,dword ptr [R8] ADD dword ptr [RAX + 0x48],EDX MOV RAX,qword ptr [RCX] MOV qword ptr [RSI + 0x98],RAX MOV RCX,qword ptr [RSI + 0xa0] MOV RDX,RCX SHL RDX,0x8 JZ 0x0013784b LAB_00137847: XOR EAX,EAX POP RBP RET LAB_0013784b: OR RCX,RAX MOV qword ptr [RSI + 0xa0],RCX JMP 0x00137847
int8 write_hook_for_undo_row_update (int8 param_1,long param_2,long *param_3,ulong *param_4,int *param_5) { ulong uVar1; *(int *)(*param_3 + 0x48) = *(int *)(*param_3 + 0x48) + *param_5; uVar1 = *param_4; *(ulong *)(param_2 + 0x98) = uVar1; if ((*(ulong *)(param_2 + 0xa0) & 0xffffffffffffff) == 0) { *(ulong *)(param_2 + 0xa0) = *(ulong *)(param_2 + 0xa0) | uVar1; } return 0; }
49,449
alaya::SQ8QuantizerTest_Fit_Test::~SQ8QuantizerTest_Fit_Test()
AlayaLite/tests/space/quant/sq8_test.cpp
TEST_F(SQ8QuantizerTest, Fit) { float data[] = {1.0, 2.0, 3.0, 4.0, 0.5, 1.5, 2.5, 3.5}; quantizer_.fit(data, 2); EXPECT_FLOAT_EQ(quantizer_.min_vector_[0], 0.5); EXPECT_FLOAT_EQ(quantizer_.max_vector_[0], 1.0); EXPECT_FLOAT_EQ(quantizer_.min_vector_[1], 1.5); EXPECT_FLOAT_EQ(quantizer_.max_vector_[1], 2.0); EXPECT_FLOAT_EQ(quantizer_.min_vector_[2], 2.5); EXPECT_FLOAT_EQ(quantizer_.max_vector_[2], 3.0); EXPECT_FLOAT_EQ(quantizer_.min_vector_[3], 3.5); EXPECT_FLOAT_EQ(quantizer_.max_vector_[3], 4.0); }
O0
cpp
alaya::SQ8QuantizerTest_Fit_Test::~SQ8QuantizerTest_Fit_Test(): subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq 0x10(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0x24280 movq 0x8(%rsp), %rdi movl $0x50, %esi callq 0x16720 addq $0x18, %rsp retq nopl (%rax)
_ZN5alaya25SQ8QuantizerTest_Fit_TestD0Ev: sub rsp, 18h mov [rsp+18h+var_8], rdi mov rdi, [rsp+18h+var_8]; this mov [rsp+18h+var_10], rdi call _ZN5alaya25SQ8QuantizerTest_Fit_TestD2Ev; alaya::SQ8QuantizerTest_Fit_Test::~SQ8QuantizerTest_Fit_Test() mov rdi, [rsp+18h+var_10]; void * mov esi, 50h ; 'P'; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) add rsp, 18h retn
void alaya::SQ8QuantizerTest_Fit_Test::~SQ8QuantizerTest_Fit_Test(alaya::SQ8QuantizerTest_Fit_Test *this) { alaya::SQ8QuantizerTest_Fit_Test::~SQ8QuantizerTest_Fit_Test(this); operator delete(this, 0x50uLL); }
~SQ8QuantizerTest_Fit_Test: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV RDI,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x8],RDI CALL 0x00124280 MOV RDI,qword ptr [RSP + 0x8] MOV ESI,0x50 CALL 0x00116720 ADD RSP,0x18 RET
/* alaya::SQ8QuantizerTest_Fit_Test::~SQ8QuantizerTest_Fit_Test() */ void __thiscall alaya::SQ8QuantizerTest_Fit_Test::~SQ8QuantizerTest_Fit_Test(SQ8QuantizerTest_Fit_Test *this) { ~SQ8QuantizerTest_Fit_Test(this); operator_delete(this,0x50); return; }
49,450
my_wc_to_printable_8bit
eloqsql/strings/ctype.c
int my_wc_to_printable_8bit(CHARSET_INFO *cs, my_wc_t wc, uchar *str, uchar *end) { /* Special case: swe7 does not have the backslash character. Use dot instead of backslash for escaping. */ uint bs= cs->tab_to_uni && cs->tab_to_uni['\\'] != '\\' ? '.' : '\\'; DBUG_ASSERT(cs->mbminlen == 1); /* Additionally, if the original swe7 string contains backslashes, replace them to dots, so this error message: Invalid swe7 character string: '\xEF\xBC\xB4' is displayed as: Invalid swe7 character string: '.xEF.xBC.xB4' which is more readable than what would happen without '\'-to-dot mapping: Invalid swe7 character string: '.005CxEF.005CxBC.005CxB4' */ if (bs == '.' && wc == '\\') wc= '.'; return my_wc_to_printable_ex(cs, wc, str, end, bs, 1, 1); }
O3
c
my_wc_to_printable_8bit: movq 0x68(%rdi), %rax testq %rax, %rax je 0x54fa9 cmpw $0x5c, 0xb8(%rax) setne %al movl $0x2e, %r9d movl $0x5c, %r8d cmovnel %r9d, %r8d jmp 0x54fb1 movl $0x5c, %r8d xorl %eax, %eax pushq %rbp movq %rsp, %rbp subq $0x10, %rsp testb %al, %al movl $0x2e, %eax cmoveq %rsi, %rax cmpq $0x5c, %rsi cmovneq %rsi, %rax movl $0x1, (%rsp) movq %rax, %rsi movl $0x1, %r9d callq 0x54ddc addq $0x10, %rsp popq %rbp retq
my_wc_to_printable_8bit: mov rax, [rdi+68h] test rax, rax jz short loc_54FA9 cmp word ptr [rax+0B8h], 5Ch ; '\' setnz al mov r9d, 2Eh ; '.' mov r8d, 5Ch ; '\' cmovnz r8d, r9d jmp short loc_54FB1 loc_54FA9: mov r8d, 5Ch ; '\' xor eax, eax loc_54FB1: push rbp mov rbp, rsp sub rsp, 10h test al, al mov eax, 2Eh ; '.' cmovz rax, rsi cmp rsi, 5Ch ; '\' cmovnz rax, rsi mov [rsp+18h+var_18], 1 mov rsi, rax mov r9d, 1 call my_wc_to_printable_ex add rsp, 10h pop rbp retn
long long my_wc_to_printable_8bit(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4) { long long v4; // rax bool v5; // zf bool v6; // al char v7; // r8 unsigned long long v8; // rax v4 = *(_QWORD *)(a1 + 104); if ( v4 ) { v5 = *(_WORD *)(v4 + 184) == 92; v6 = *(_WORD *)(v4 + 184) != 92; v7 = 92; if ( !v5 ) v7 = 46; } else { v7 = 92; v6 = 0; } v5 = !v6; v8 = 46LL; if ( v5 ) v8 = a2; if ( a2 != 92 ) v8 = a2; return my_wc_to_printable_ex(a1, v8, a3, a4, v7, 1u, 1u); }
my_wc_to_printable_8bit: MOV RAX,qword ptr [RDI + 0x68] TEST RAX,RAX JZ 0x00154fa9 CMP word ptr [RAX + 0xb8],0x5c SETNZ AL MOV R9D,0x2e MOV R8D,0x5c CMOVNZ R8D,R9D JMP 0x00154fb1 LAB_00154fa9: MOV R8D,0x5c XOR EAX,EAX LAB_00154fb1: PUSH RBP MOV RBP,RSP SUB RSP,0x10 TEST AL,AL MOV EAX,0x2e CMOVZ RAX,RSI CMP RSI,0x5c CMOVNZ RAX,RSI MOV dword ptr [RSP],0x1 MOV RSI,RAX MOV R9D,0x1 CALL 0x00154ddc ADD RSP,0x10 POP RBP RET
void my_wc_to_printable_8bit(long param_1,long param_2,int8 param_3,int8 param_4) { long lVar1; int8 uVar2; bool bVar3; if (*(long *)(param_1 + 0x68) == 0) { uVar2 = 0x5c; bVar3 = false; } else { bVar3 = *(short *)(*(long *)(param_1 + 0x68) + 0xb8) != 0x5c; uVar2 = 0x5c; if (bVar3) { uVar2 = 0x2e; } } lVar1 = 0x2e; if (!bVar3) { lVar1 = param_2; } if (param_2 != 0x5c) { lVar1 = param_2; } my_wc_to_printable_ex(param_1,lVar1,param_3,param_4,uVar2,1,1); return; }
49,451
ggml_graph_print
monkey531[P]llama/ggml/src/ggml.c
void ggml_graph_print(const struct ggml_cgraph * cgraph) { GGML_LOG_INFO("=== GRAPH ===\n"); GGML_LOG_INFO("n_nodes = %d\n", cgraph->n_nodes); for (int i = 0; i < cgraph->n_nodes; i++) { struct ggml_tensor * node = cgraph->nodes[i]; GGML_LOG_INFO(" - %3d: [ %5" PRId64 ", %5" PRId64 ", %5" PRId64 "] %16s %s\n", i, node->ne[0], node->ne[1], node->ne[2], ggml_op_name(node->op), (node->flags & GGML_TENSOR_FLAG_PARAM) ? "x" : ggml_graph_get_grad(cgraph, node) ? "g" : " "); } GGML_LOG_INFO("n_leafs = %d\n", cgraph->n_leafs); for (int i = 0; i < cgraph->n_leafs; i++) { struct ggml_tensor * node = cgraph->leafs[i]; GGML_LOG_INFO(" - %3d: [ %5" PRId64 ", %5" PRId64 "] %8s %16s\n", i, node->ne[0], node->ne[1], ggml_op_name(node->op), ggml_get_name(node)); } GGML_LOG_INFO("========================================\n"); }
O0
c
ggml_graph_print: subq $0x88, %rsp movq %rdi, 0x80(%rsp) movl $0x2, %edi leaq 0x5d4b3(%rip), %rsi # 0xb58ae movb $0x0, %al callq 0x41c30 movq 0x80(%rsp), %rax movl 0x4(%rax), %edx movl $0x2, %edi leaq 0x5d4a4(%rip), %rsi # 0xb58bd movb $0x0, %al callq 0x41c30 movl $0x0, 0x7c(%rsp) movl 0x7c(%rsp), %eax movq 0x80(%rsp), %rcx cmpl 0x4(%rcx), %eax jge 0x58535 movq 0x80(%rsp), %rax movq 0x10(%rax), %rax movslq 0x7c(%rsp), %rcx movq (%rax,%rcx,8), %rax movq %rax, 0x70(%rsp) movl 0x7c(%rsp), %eax movl %eax, 0x3c(%rsp) movq 0x70(%rsp), %rax movq 0x10(%rax), %rax movq %rax, 0x40(%rsp) movq 0x70(%rsp), %rax movq 0x18(%rax), %rax movq %rax, 0x48(%rsp) movq 0x70(%rsp), %rax movq 0x20(%rax), %rax movq %rax, 0x50(%rsp) movq 0x70(%rsp), %rax movl 0x50(%rax), %edi callq 0x44490 movq %rax, 0x58(%rsp) movq 0x70(%rsp), %rax movl 0x94(%rax), %eax andl $0x4, %eax cmpl $0x0, %eax je 0x584bc leaq 0x5dc3d(%rip), %rax # 0xb60f2 movq %rax, 0x30(%rsp) jmp 0x584ec movq 0x80(%rsp), %rdi movq 0x70(%rsp), %rsi callq 0x423b0 movq %rax, %rdx leaq 0x5fd9f(%rip), %rax # 0xb8277 leaq 0x5c93f(%rip), %rcx # 0xb4e1e cmpq $0x0, %rdx cmovneq %rcx, %rax movq %rax, 0x30(%rsp) movq 0x58(%rsp), %r10 movq 0x50(%rsp), %r9 movq 0x48(%rsp), %r8 movq 0x40(%rsp), %rcx movl 0x3c(%rsp), %edx movq 0x30(%rsp), %rax movl $0x2, %edi leaq 0x5d3b6(%rip), %rsi # 0xb58cb movq %r10, (%rsp) movq %rax, 0x8(%rsp) movb $0x0, %al callq 0x41c30 movl 0x7c(%rsp), %eax addl $0x1, %eax movl %eax, 0x7c(%rsp) jmp 0x58428 movq 0x80(%rsp), %rax movl 0x8(%rax), %edx movl $0x2, %edi leaq 0x5d3a4(%rip), %rsi # 0xb58f0 movb $0x0, %al callq 0x41c30 movl $0x0, 0x6c(%rsp) movl 0x6c(%rsp), %eax movq 0x80(%rsp), %rcx cmpl 0x8(%rcx), %eax jge 0x58604 movq 0x80(%rsp), %rax movq 0x28(%rax), %rax movslq 0x6c(%rsp), %rcx movq (%rax,%rcx,8), %rax movq %rax, 0x60(%rsp) movl 0x6c(%rsp), %eax movl %eax, 0x14(%rsp) movq 0x60(%rsp), %rax movq 0x10(%rax), %rax movq %rax, 0x18(%rsp) movq 0x60(%rsp), %rax movq 0x18(%rax), %rax movq %rax, 0x20(%rsp) movq 0x60(%rsp), %rax movl 0x50(%rax), %edi callq 0x44490 movq %rax, 0x28(%rsp) movq 0x60(%rsp), %rdi callq 0x44410 movl 0x14(%rsp), %edx movq 0x18(%rsp), %rcx movq 0x20(%rsp), %r8 movq 0x28(%rsp), %r9 movl $0x2, %edi leaq 0x5d315(%rip), %rsi # 0xb58fe movq %rax, (%rsp) movb $0x0, %al callq 0x41c30 movl 0x6c(%rsp), %eax addl $0x1, %eax movl %eax, 0x6c(%rsp) jmp 0x5855b movl $0x2, %edi leaq 0x5d30e(%rip), %rsi # 0xb591e movb $0x0, %al callq 0x41c30 addq $0x88, %rsp retq nop
ggml_graph_print: sub rsp, 88h mov [rsp+88h+var_8], rdi mov edi, 2 lea rsi, aGraph; "=== GRAPH ===\n" mov al, 0 call _ggml_log_internal mov rax, [rsp+88h+var_8] mov edx, [rax+4] mov edi, 2 lea rsi, aNNodesD; "n_nodes = %d\n" mov al, 0 call _ggml_log_internal mov [rsp+88h+var_C], 0 loc_58428: mov eax, [rsp+88h+var_C] mov rcx, [rsp+88h+var_8] cmp eax, [rcx+4] jge loc_58535 mov rax, [rsp+88h+var_8] mov rax, [rax+10h] movsxd rcx, [rsp+88h+var_C] mov rax, [rax+rcx*8] mov [rsp+88h+var_18], rax mov eax, [rsp+88h+var_C] mov [rsp+88h+var_4C], eax mov rax, [rsp+88h+var_18] mov rax, [rax+10h] mov [rsp+88h+var_48], rax mov rax, [rsp+88h+var_18] mov rax, [rax+18h] mov [rsp+88h+var_40], rax mov rax, [rsp+88h+var_18] mov rax, [rax+20h] mov [rsp+88h+var_38], rax mov rax, [rsp+88h+var_18] mov edi, [rax+50h] call _ggml_op_name mov [rsp+88h+var_30], rax mov rax, [rsp+88h+var_18] mov eax, [rax+94h] and eax, 4 cmp eax, 0 jz short loc_584BC lea rax, aViewXNbOffsetY+16h; "x" mov [rsp+88h+var_58], rax jmp short loc_584EC loc_584BC: mov rdi, [rsp+88h+var_8] mov rsi, [rsp+88h+var_18] call _ggml_graph_get_grad mov rdx, rax lea rax, aVal+6; " " lea rcx, aTheFlashAttent+67h; "g" cmp rdx, 0 cmovnz rax, rcx mov [rsp+88h+var_58], rax loc_584EC: mov r10, [rsp+88h+var_30] mov r9, [rsp+88h+var_38] mov r8, [rsp+88h+var_40] mov rcx, [rsp+88h+var_48] mov edx, [rsp+88h+var_4C] mov rax, [rsp+88h+var_58] mov edi, 2 lea rsi, a3d5ld5ld5ld16s; " - %3d: [ %5ld, %5ld, %5ld] %16s %s\n" mov [rsp+88h+var_88], r10 mov [rsp+88h+var_80], rax mov al, 0 call _ggml_log_internal mov eax, [rsp+88h+var_C] add eax, 1 mov [rsp+88h+var_C], eax jmp loc_58428 loc_58535: mov rax, [rsp+88h+var_8] mov edx, [rax+8] mov edi, 2 lea rsi, aNLeafsD; "n_leafs = %d\n" mov al, 0 call _ggml_log_internal mov [rsp+88h+var_1C], 0 loc_5855B: mov eax, [rsp+88h+var_1C] mov rcx, [rsp+88h+var_8] cmp eax, [rcx+8] jge loc_58604 mov rax, [rsp+88h+var_8] mov rax, [rax+28h] movsxd rcx, [rsp+88h+var_1C] mov rax, [rax+rcx*8] mov [rsp+88h+var_28], rax mov eax, [rsp+88h+var_1C] mov [rsp+88h+var_74], eax mov rax, [rsp+88h+var_28] mov rax, [rax+10h] mov [rsp+88h+var_70], rax mov rax, [rsp+88h+var_28] mov rax, [rax+18h] mov [rsp+88h+var_68], rax mov rax, [rsp+88h+var_28] mov edi, [rax+50h] call _ggml_op_name mov [rsp+88h+var_60], rax mov rdi, [rsp+88h+var_28] call _ggml_get_name mov edx, [rsp+88h+var_74] mov rcx, [rsp+88h+var_70] mov r8, [rsp+88h+var_68] mov r9, [rsp+88h+var_60] mov edi, 2 lea rsi, a3d5ld5ld8s16s; " - %3d: [ %5ld, %5ld] %8s %16s\n" mov [rsp+88h+var_88], rax mov al, 0 call _ggml_log_internal mov eax, [rsp+88h+var_1C] add eax, 1 mov [rsp+88h+var_1C], eax jmp loc_5855B loc_58604: mov edi, 2 lea rsi, asc_B591E; "======================================="... mov al, 0 call _ggml_log_internal add rsp, 88h retn
long long ggml_graph_print(long long a1) { long long grad; // rdx const char *v2; // rax const char *name; // rax long long v5; // [rsp+18h] [rbp-70h] long long v6; // [rsp+20h] [rbp-68h] char *v7; // [rsp+28h] [rbp-60h] long long v8; // [rsp+40h] [rbp-48h] long long v9; // [rsp+48h] [rbp-40h] long long v10; // [rsp+50h] [rbp-38h] char *v11; // [rsp+58h] [rbp-30h] long long v12; // [rsp+60h] [rbp-28h] int j; // [rsp+6Ch] [rbp-1Ch] long long v14; // [rsp+70h] [rbp-18h] int i; // [rsp+7Ch] [rbp-Ch] ggml_log_internal(2u, (long long)"=== GRAPH ===\n"); ggml_log_internal(2u, (long long)"n_nodes = %d\n", *(_DWORD *)(a1 + 4)); for ( i = 0; i < *(_DWORD *)(a1 + 4); ++i ) { v14 = *(_QWORD *)(*(_QWORD *)(a1 + 16) + 8LL * i); v8 = *(_QWORD *)(v14 + 16); v9 = *(_QWORD *)(v14 + 24); v10 = *(_QWORD *)(v14 + 32); v11 = ggml_op_name(*(_DWORD *)(v14 + 80)); if ( (*(_DWORD *)(v14 + 148) & 4) != 0 ) { ggml_log_internal(2u, (long long)" - %3d: [ %5ld, %5ld, %5ld] %16s %s\n", i, v8, v9, v10, v11, "x"); } else { grad = ggml_graph_get_grad(a1, v14); v2 = " "; if ( grad ) v2 = "g"; ggml_log_internal(2u, (long long)" - %3d: [ %5ld, %5ld, %5ld] %16s %s\n", i, v8, v9, v10, v11, v2); } } ggml_log_internal(2u, (long long)"n_leafs = %d\n", *(_DWORD *)(a1 + 8)); for ( j = 0; j < *(_DWORD *)(a1 + 8); ++j ) { v12 = *(_QWORD *)(*(_QWORD *)(a1 + 40) + 8LL * j); v5 = *(_QWORD *)(v12 + 16); v6 = *(_QWORD *)(v12 + 24); v7 = ggml_op_name(*(_DWORD *)(v12 + 80)); name = (const char *)ggml_get_name(v12); ggml_log_internal(2u, (long long)" - %3d: [ %5ld, %5ld] %8s %16s\n", j, v5, v6, v7, name); } return ggml_log_internal(2u, (long long)"========================================\n"); }
ggml_graph_print: SUB RSP,0x88 MOV qword ptr [RSP + 0x80],RDI MOV EDI,0x2 LEA RSI,[0x1b58ae] MOV AL,0x0 CALL 0x00141c30 MOV RAX,qword ptr [RSP + 0x80] MOV EDX,dword ptr [RAX + 0x4] MOV EDI,0x2 LEA RSI,[0x1b58bd] MOV AL,0x0 CALL 0x00141c30 MOV dword ptr [RSP + 0x7c],0x0 LAB_00158428: MOV EAX,dword ptr [RSP + 0x7c] MOV RCX,qword ptr [RSP + 0x80] CMP EAX,dword ptr [RCX + 0x4] JGE 0x00158535 MOV RAX,qword ptr [RSP + 0x80] MOV RAX,qword ptr [RAX + 0x10] MOVSXD RCX,dword ptr [RSP + 0x7c] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP + 0x70],RAX MOV EAX,dword ptr [RSP + 0x7c] MOV dword ptr [RSP + 0x3c],EAX MOV RAX,qword ptr [RSP + 0x70] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x40],RAX MOV RAX,qword ptr [RSP + 0x70] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0x48],RAX MOV RAX,qword ptr [RSP + 0x70] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RSP + 0x50],RAX MOV RAX,qword ptr [RSP + 0x70] MOV EDI,dword ptr [RAX + 0x50] CALL 0x00144490 MOV qword ptr [RSP + 0x58],RAX MOV RAX,qword ptr [RSP + 0x70] MOV EAX,dword ptr [RAX + 0x94] AND EAX,0x4 CMP EAX,0x0 JZ 0x001584bc LEA RAX,[0x1b60f2] MOV qword ptr [RSP + 0x30],RAX JMP 0x001584ec LAB_001584bc: MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0x70] CALL 0x001423b0 MOV RDX,RAX LEA RAX,[0x1b8277] LEA RCX,[0x1b4e1e] CMP RDX,0x0 CMOVNZ RAX,RCX MOV qword ptr [RSP + 0x30],RAX LAB_001584ec: MOV R10,qword ptr [RSP + 0x58] MOV R9,qword ptr [RSP + 0x50] MOV R8,qword ptr [RSP + 0x48] MOV RCX,qword ptr [RSP + 0x40] MOV EDX,dword ptr [RSP + 0x3c] MOV RAX,qword ptr [RSP + 0x30] MOV EDI,0x2 LEA RSI,[0x1b58cb] MOV qword ptr [RSP],R10 MOV qword ptr [RSP + 0x8],RAX MOV AL,0x0 CALL 0x00141c30 MOV EAX,dword ptr [RSP + 0x7c] ADD EAX,0x1 MOV dword ptr [RSP + 0x7c],EAX JMP 0x00158428 LAB_00158535: MOV RAX,qword ptr [RSP + 0x80] MOV EDX,dword ptr [RAX + 0x8] MOV EDI,0x2 LEA RSI,[0x1b58f0] MOV AL,0x0 CALL 0x00141c30 MOV dword ptr [RSP + 0x6c],0x0 LAB_0015855b: MOV EAX,dword ptr [RSP + 0x6c] MOV RCX,qword ptr [RSP + 0x80] CMP EAX,dword ptr [RCX + 0x8] JGE 0x00158604 MOV RAX,qword ptr [RSP + 0x80] MOV RAX,qword ptr [RAX + 0x28] MOVSXD RCX,dword ptr [RSP + 0x6c] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP + 0x60],RAX MOV EAX,dword ptr [RSP + 0x6c] MOV dword ptr [RSP + 0x14],EAX MOV RAX,qword ptr [RSP + 0x60] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x60] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x60] MOV EDI,dword ptr [RAX + 0x50] CALL 0x00144490 MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x60] CALL 0x00144410 MOV EDX,dword ptr [RSP + 0x14] MOV RCX,qword ptr [RSP + 0x18] MOV R8,qword ptr [RSP + 0x20] MOV R9,qword ptr [RSP + 0x28] MOV EDI,0x2 LEA RSI,[0x1b58fe] MOV qword ptr [RSP],RAX MOV AL,0x0 CALL 0x00141c30 MOV EAX,dword ptr [RSP + 0x6c] ADD EAX,0x1 MOV dword ptr [RSP + 0x6c],EAX JMP 0x0015855b LAB_00158604: MOV EDI,0x2 LEA RSI,[0x1b591e] MOV AL,0x0 CALL 0x00141c30 ADD RSP,0x88 RET
void ggml_graph_print(long param_1) { int8 uVar1; int8 uVar2; int8 uVar3; long lVar4; int8 uVar5; char *local_58; int local_1c; int local_c; ggml_log_internal(2,"=== GRAPH ===\n"); ggml_log_internal(2,"n_nodes = %d\n",*(int4 *)(param_1 + 4)); for (local_c = 0; local_c < *(int *)(param_1 + 4); local_c = local_c + 1) { lVar4 = *(long *)(*(long *)(param_1 + 0x10) + (long)local_c * 8); uVar1 = *(int8 *)(lVar4 + 0x10); uVar2 = *(int8 *)(lVar4 + 0x18); uVar5 = *(int8 *)(lVar4 + 0x20); uVar3 = ggml_op_name(*(int4 *)(lVar4 + 0x50)); if ((*(uint *)(lVar4 + 0x94) & 4) == 0) { lVar4 = ggml_graph_get_grad(param_1,lVar4); local_58 = " "; if (lVar4 != 0) { local_58 = "g"; } } else { local_58 = "x"; } ggml_log_internal(2," - %3d: [ %5ld, %5ld, %5ld] %16s %s\n",local_c,uVar1,uVar2,uVar5,uVar3, local_58); } ggml_log_internal(2,"n_leafs = %d\n",*(int4 *)(param_1 + 8)); for (local_1c = 0; local_1c < *(int *)(param_1 + 8); local_1c = local_1c + 1) { lVar4 = *(long *)(*(long *)(param_1 + 0x28) + (long)local_1c * 8); uVar1 = *(int8 *)(lVar4 + 0x10); uVar2 = *(int8 *)(lVar4 + 0x18); uVar5 = ggml_op_name(*(int4 *)(lVar4 + 0x50)); uVar3 = ggml_get_name(lVar4); ggml_log_internal(2," - %3d: [ %5ld, %5ld] %8s %16s\n",local_1c,uVar1,uVar2,uVar5,uVar3); } ggml_log_internal(2,"========================================\n"); return; }
49,452
el::base::utils::DateTime::buildTimeInfo(timeval*, tm*)
opengl-water/src/easylogging++.cc
struct ::tm* DateTime::buildTimeInfo(struct timeval* currTime, struct ::tm* timeInfo) { #if ELPP_OS_UNIX time_t rawTime = currTime->tv_sec; ::elpptime_r(&rawTime, timeInfo); return timeInfo; #else # if ELPP_COMPILER_MSVC ELPP_UNUSED(currTime); time_t t; # if defined(_USE_32BIT_TIME_T) _time32(&t); # else _time64(&t); # endif elpptime_s(timeInfo, &t); return timeInfo; # else // For any other compilers that don't have CRT warnings issue e.g, MinGW or TDM GCC- we use different method time_t rawTime = currTime->tv_sec; struct tm* tmInf = elpptime(&rawTime); *timeInfo = *tmInf; return timeInfo; # endif // ELPP_COMPILER_MSVC #endif // ELPP_OS_UNIX }
O3
cpp
el::base::utils::DateTime::buildTimeInfo(timeval*, tm*): pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rsi, %rbx movq (%rdi), %rax leaq -0x10(%rbp), %rdi movq %rax, (%rdi) callq 0x23180 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %rbp retq
_ZN2el4base5utils8DateTime13buildTimeInfoEP7timevalP2tm: push rbp mov rbp, rsp push rbx push rax mov rbx, rsi mov rax, [rdi] lea rdi, [rbp+var_10] mov [rdi], rax call _localtime_r mov rax, rbx add rsp, 8 pop rbx pop rbp retn
long long el::base::utils::DateTime::buildTimeInfo(long long *a1, long long a2) { long long v2; // rax long long v4; // [rsp+0h] [rbp-10h] BYREF v4 = v2; v4 = *a1; localtime_r(&v4, a2); return a2; }
buildTimeInfo: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RSI MOV RAX,qword ptr [RDI] LEA RDI,[RBP + -0x10] MOV qword ptr [RDI],RAX CALL 0x00123180 MOV RAX,RBX ADD RSP,0x8 POP RBX POP RBP RET
/* el::base::utils::DateTime::buildTimeInfo(timeval*, tm*) */ tm * el::base::utils::DateTime::buildTimeInfo(timeval *param_1,tm *param_2) { __time_t local_18; local_18 = param_1->tv_sec; localtime_r(&local_18,param_2); return param_2; }
49,453
ms3_library_init
eloqsql/storage/maria/libmarias3/src/marias3.c
void ms3_library_init(void) { if (curl_needs_openssl_locking()) { int i; mutex_buf = malloc(openssl_num_locks() * sizeof(pthread_mutex_t)); if(mutex_buf) { for(i = 0; i < openssl_num_locks(); i++) pthread_mutex_init(&(mutex_buf[i]), NULL); openssl_set_id_callback(id_function); openssl_set_locking_callback(locking_function); } } curl_global_init(CURL_GLOBAL_DEFAULT); }
O3
c
ms3_library_init: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx callq 0xfa63 testl %eax, %eax je 0xef4f callq *0xcbf2(%rip) # 0x1bad8 cltq shlq $0x3, %rax leaq (%rax,%rax,4), %rdi callq 0xa730 movq %rax, 0xcbe4(%rip) # 0x1bae0 testq %rax, %rax je 0xef4f callq *0xcbd1(%rip) # 0x1bad8 testl %eax, %eax jle 0xef35 xorl %ebx, %ebx xorl %r14d, %r14d movq 0xcbc9(%rip), %rdi # 0x1bae0 addq %rbx, %rdi xorl %esi, %esi callq 0xa810 incq %r14 callq *0xcbae(%rip) # 0x1bad8 cltq addq $0x28, %rbx cmpq %rax, %r14 jl 0xef10 leaq -0x9e(%rip), %rdi # 0xee9e callq *0xcba6(%rip) # 0x1bae8 leaq -0xa1(%rip), %rdi # 0xeea8 callq *0xcba1(%rip) # 0x1baf0 movl $0x3, %edi popq %rbx popq %r14 popq %rbp jmp 0xa130
ms3_library_init: push rbp mov rbp, rsp push r14 push rbx call curl_needs_openssl_locking test eax, eax jz short loc_EF4F call cs:openssl_num_locks cdqe shl rax, 3 lea rdi, [rax+rax*4] call _malloc mov cs:mutex_buf, rax test rax, rax jz short loc_EF4F call cs:openssl_num_locks test eax, eax jle short loc_EF35 xor ebx, ebx xor r14d, r14d loc_EF10: mov rdi, cs:mutex_buf add rdi, rbx xor esi, esi call _pthread_mutex_init inc r14 call cs:openssl_num_locks cdqe add rbx, 28h ; '(' cmp r14, rax jl short loc_EF10 loc_EF35: lea rdi, id_function call cs:openssl_set_id_callback lea rdi, locking_function call cs:openssl_set_locking_callback loc_EF4F: mov edi, 3 pop rbx pop r14 pop rbp jmp _curl_global_init
long long ms3_library_init() { int v0; // eax long long v1; // rbx long long v2; // r14 if ( (unsigned int)curl_needs_openssl_locking() ) { v0 = openssl_num_locks(); mutex_buf = malloc(40LL * v0); if ( mutex_buf ) { if ( (int)openssl_num_locks() > 0 ) { v1 = 0LL; v2 = 0LL; do { pthread_mutex_init(v1 + mutex_buf, 0LL); ++v2; v1 += 40LL; } while ( v2 < (int)openssl_num_locks() ); } openssl_set_id_callback(id_function); openssl_set_locking_callback(locking_function); } } return curl_global_init(3LL); }
ms3_library_init: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX CALL 0x0010fa63 TEST EAX,EAX JZ 0x0010ef4f CALL qword ptr [0x0011bad8] CDQE SHL RAX,0x3 LEA RDI,[RAX + RAX*0x4] CALL 0x0010a730 MOV qword ptr [0x0011bae0],RAX TEST RAX,RAX JZ 0x0010ef4f CALL qword ptr [0x0011bad8] TEST EAX,EAX JLE 0x0010ef35 XOR EBX,EBX XOR R14D,R14D LAB_0010ef10: MOV RDI,qword ptr [0x0011bae0] ADD RDI,RBX XOR ESI,ESI CALL 0x0010a810 INC R14 CALL qword ptr [0x0011bad8] CDQE ADD RBX,0x28 CMP R14,RAX JL 0x0010ef10 LAB_0010ef35: LEA RDI,[0x10ee9e] CALL qword ptr [0x0011bae8] LEA RDI,[0x10eea8] CALL qword ptr [0x0011baf0] LAB_0010ef4f: MOV EDI,0x3 POP RBX POP R14 POP RBP JMP 0x0010a130
void ms3_library_init(void) { int iVar1; long lVar2; long lVar3; iVar1 = curl_needs_openssl_locking(); if (iVar1 != 0) { iVar1 = (*openssl_num_locks)(); mutex_buf = malloc((long)iVar1 * 0x28); if (mutex_buf != (void *)0x0) { iVar1 = (*openssl_num_locks)(); if (0 < iVar1) { lVar2 = 0; lVar3 = 0; do { pthread_mutex_init((pthread_mutex_t *)((long)mutex_buf + lVar2),(pthread_mutexattr_t *)0x0 ); lVar3 = lVar3 + 1; iVar1 = (*openssl_num_locks)(); lVar2 = lVar2 + 0x28; } while (lVar3 < iVar1); } (*openssl_set_id_callback)(id_function); (*openssl_set_locking_callback)(locking_function); } } curl_global_init(3); return; }
49,454
my_wc_mb_cp932
eloqsql/strings/ctype-cp932.c
static int my_wc_mb_cp932(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { int code; if ((int) wc < 0x80) /* ASCII: [U+0000..U+007F] -> [00-7F] */ { /* This branch is for performance purposes on ASCII range, to avoid using unicode_to_cp932[]: about 10% improvement. */ if (s >= e) return MY_CS_TOOSMALL; s[0]= (uchar) wc; return 1; } if (wc > 0xFFFF || !(code= unicode_to_cp932[wc])) /* Bad Unicode code point */ return MY_CS_ILUNI; if (code <= 0xFF) { /* JIS-X-0201 HALF WIDTH KATAKANA [U+FF61..U+FF9F] -> [A1..DF] */ if (s >= e) return MY_CS_TOOSMALL; s[0]= code; return 1; } if (s + 2 > e) return MY_CS_TOOSMALL2; MY_PUT_MB2(s, code); /* JIS-X-0208(MS) */ return 2; }
O0
c
my_wc_mb_cp932: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x18(%rbp), %rax cmpl $0x80, %eax jge 0x3729d movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0x37285 movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x37334 movq -0x18(%rbp), %rax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl $0x1, -0x4(%rbp) jmp 0x37334 cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF ja 0x372be movq -0x18(%rbp), %rcx leaq 0x7d71e(%rip), %rax # 0xb49d0 movzwl (%rax,%rcx,2), %eax movl %eax, -0x2c(%rbp) cmpl $0x0, %eax jne 0x372c7 movl $0x0, -0x4(%rbp) jmp 0x37334 cmpl $0xff, -0x2c(%rbp) jg 0x372f7 movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0x372e3 movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x37334 movl -0x2c(%rbp), %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl $0x1, -0x4(%rbp) jmp 0x37334 movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x3730e movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x37334 movl -0x2c(%rbp), %eax sarl $0x8, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl -0x2c(%rbp), %eax andl $0xff, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, 0x1(%rax) movl $0x2, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax)
my_wc_mb_cp932: 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_18] cmp eax, 80h jge short loc_3729D mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_37285 mov [rbp+var_4], 0FFFFFF9Bh jmp loc_37334 loc_37285: mov rax, [rbp+var_18] mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov [rbp+var_4], 1 jmp loc_37334 loc_3729D: cmp [rbp+var_18], 0FFFFh ja short loc_372BE mov rcx, [rbp+var_18] lea rax, unicode_to_cp932 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_2C], eax cmp eax, 0 jnz short loc_372C7 loc_372BE: mov [rbp+var_4], 0 jmp short loc_37334 loc_372C7: cmp [rbp+var_2C], 0FFh jg short loc_372F7 mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_372E3 mov [rbp+var_4], 0FFFFFF9Bh jmp short loc_37334 loc_372E3: mov eax, [rbp+var_2C] mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov [rbp+var_4], 1 jmp short loc_37334 loc_372F7: mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_3730E mov [rbp+var_4], 0FFFFFF9Ah jmp short loc_37334 loc_3730E: mov eax, [rbp+var_2C] sar eax, 8 mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov eax, [rbp+var_2C] and eax, 0FFh mov cl, al mov rax, [rbp+var_20] mov [rax+1], cl mov [rbp+var_4], 2 loc_37334: mov eax, [rbp+var_4] pop rbp retn
long long my_wc_mb_cp932(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4) { unsigned __int16 v5; // [rsp+0h] [rbp-2Ch] if ( (int)a2 >= 128 ) { if ( a2 <= 0xFFFF && (v5 = unicode_to_cp932[a2]) != 0 ) { if ( unicode_to_cp932[a2] > 0xFFu ) { if ( (unsigned long long)(a3 + 2) <= a4 ) { *a3 = HIBYTE(v5); a3[1] = v5; return 2; } else { return (unsigned int)-102; } } else if ( (unsigned long long)a3 < a4 ) { *a3 = v5; return 1; } else { return (unsigned int)-101; } } else { return 0; } } else if ( (unsigned long long)a3 < a4 ) { *a3 = a2; return 1; } else { return (unsigned int)-101; } }
my_wc_mb_cp932: 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 + -0x18] CMP EAX,0x80 JGE 0x0013729d MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JC 0x00137285 MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x00137334 LAB_00137285: MOV RAX,qword ptr [RBP + -0x18] MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x1 JMP 0x00137334 LAB_0013729d: CMP qword ptr [RBP + -0x18],0xffff JA 0x001372be MOV RCX,qword ptr [RBP + -0x18] LEA RAX,[0x1b49d0] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x0 JNZ 0x001372c7 LAB_001372be: MOV dword ptr [RBP + -0x4],0x0 JMP 0x00137334 LAB_001372c7: CMP dword ptr [RBP + -0x2c],0xff JG 0x001372f7 MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JC 0x001372e3 MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x00137334 LAB_001372e3: MOV EAX,dword ptr [RBP + -0x2c] MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x1 JMP 0x00137334 LAB_001372f7: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x0013730e MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x00137334 LAB_0013730e: MOV EAX,dword ptr [RBP + -0x2c] SAR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV EAX,dword ptr [RBP + -0x2c] AND EAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x1],CL MOV dword ptr [RBP + -0x4],0x2 LAB_00137334: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_wc_mb_cp932(int8 param_1,ulong param_2,int1 *param_3,int1 *param_4) { ushort uVar1; int4 local_c; if ((int)param_2 < 0x80) { if (param_3 < param_4) { *param_3 = (char)param_2; local_c = 1; } else { local_c = 0xffffff9b; } } else if ((param_2 < 0x10000) && (uVar1 = *(ushort *)(unicode_to_cp932 + param_2 * 2), uVar1 != 0)) { if (uVar1 < 0x100) { if (param_3 < param_4) { *param_3 = (char)uVar1; local_c = 1; } else { local_c = 0xffffff9b; } } else if (param_4 < param_3 + 2) { local_c = 0xffffff9a; } else { *param_3 = (char)(uVar1 >> 8); param_3[1] = (char)uVar1; local_c = 2; } } else { local_c = 0; } return local_c; }
49,455
translog_read_file_header
eloqsql/storage/maria/ma_loghandler.c
my_bool translog_read_file_header(LOGHANDLER_FILE_INFO *desc, File file) { uchar page_buff[LOG_HEADER_DATA_SIZE]; DBUG_ENTER("translog_read_file_header"); if (mysql_file_pread(file, page_buff, sizeof(page_buff), 0, MYF(MY_FNABP | MY_WME))) { DBUG_PRINT("info", ("log read fail error: %d", my_errno)); DBUG_RETURN(1); } translog_interpret_file_header(desc, page_buff); DBUG_PRINT("info", ("timestamp: %llu aria ver: %lu mysql ver: %lu " "server id %lu page size %lu file number %lu " "max lsn: " LSN_FMT, (ulonglong) desc->timestamp, (ulong) desc->maria_version, (ulong) desc->mysql_version, (ulong) desc->server_id, desc->page_size, (ulong) desc->file_number, LSN_IN_PARTS(desc->max_lsn))); DBUG_RETURN(0); }
O0
c
translog_read_file_header: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x50(%rbp) movl %esi, -0x54(%rbp) movl -0x54(%rbp), %edx leaq -0x40(%rbp), %rcx leaq 0x10178e(%rip), %rdi # 0x150b58 movl $0x4e0, %esi # imm = 0x4E0 movl $0x2c, %r8d xorl %eax, %eax movl %eax, %r9d movq $0x12, (%rsp) callq 0x4f440 cmpq $0x0, %rax je 0x4f3f9 jmp 0x4f3ef jmp 0x4f3f1 jmp 0x4f3f3 movb $0x1, -0x41(%rbp) jmp 0x4f40e movq -0x50(%rbp), %rdi leaq -0x40(%rbp), %rsi callq 0x4f280 jmp 0x4f408 jmp 0x4f40a movb $0x0, -0x41(%rbp) movb -0x41(%rbp), %al movb %al, -0x55(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x4f42f movb -0x55(%rbp), %al addq $0x60, %rsp popq %rbp retq callq 0x2a270 nopw %cs:(%rax,%rax)
translog_read_file_header: push rbp mov rbp, rsp sub rsp, 60h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_50], rdi mov [rbp+var_54], esi mov edx, [rbp+var_54] lea rcx, [rbp+var_40] lea rdi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 4E0h mov r8d, 2Ch ; ',' xor eax, eax mov r9d, eax mov [rsp+60h+var_60], 12h call inline_mysql_file_pread_3 cmp rax, 0 jz short loc_4F3F9 jmp short $+2 loc_4F3EF: jmp short $+2 loc_4F3F1: jmp short $+2 loc_4F3F3: mov [rbp+var_41], 1 jmp short loc_4F40E loc_4F3F9: mov rdi, [rbp+var_50] lea rsi, [rbp+var_40] call translog_interpret_file_header jmp short $+2 loc_4F408: jmp short $+2 loc_4F40A: mov [rbp+var_41], 0 loc_4F40E: mov al, [rbp+var_41] mov [rbp+var_55], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_4F42F mov al, [rbp+var_55] add rsp, 60h pop rbp retn loc_4F42F: call ___stack_chk_fail
char translog_read_file_header(unsigned long long *a1, int a2) { _BYTE v4[56]; // [rsp+20h] [rbp-40h] BYREF unsigned long long v5; // [rsp+58h] [rbp-8h] v5 = __readfsqword(0x28u); if ( inline_mysql_file_pread_3( (unsigned int)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 1248, a2, (unsigned int)v4, 44, 0, 18LL) ) { return 1; } translog_interpret_file_header(a1, (long long)v4); return 0; }
translog_read_file_header: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x50],RDI MOV dword ptr [RBP + -0x54],ESI MOV EDX,dword ptr [RBP + -0x54] LEA RCX,[RBP + -0x40] LEA RDI,[0x250b58] MOV ESI,0x4e0 MOV R8D,0x2c XOR EAX,EAX MOV R9D,EAX MOV qword ptr [RSP],0x12 CALL 0x0014f440 CMP RAX,0x0 JZ 0x0014f3f9 JMP 0x0014f3ef LAB_0014f3ef: JMP 0x0014f3f1 LAB_0014f3f1: JMP 0x0014f3f3 LAB_0014f3f3: MOV byte ptr [RBP + -0x41],0x1 JMP 0x0014f40e LAB_0014f3f9: MOV RDI,qword ptr [RBP + -0x50] LEA RSI,[RBP + -0x40] CALL 0x0014f280 JMP 0x0014f408 LAB_0014f408: JMP 0x0014f40a LAB_0014f40a: MOV byte ptr [RBP + -0x41],0x0 LAB_0014f40e: MOV AL,byte ptr [RBP + -0x41] MOV byte ptr [RBP + -0x55],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0014f42f MOV AL,byte ptr [RBP + -0x55] ADD RSP,0x60 POP RBP RET LAB_0014f42f: CALL 0x0012a270
int8 translog_read_file_header(int8 param_1,int4 param_2) { long lVar1; long in_FS_OFFSET; bool local_49; int1 local_48 [56]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); lVar1 = inline_mysql_file_pread ("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",0x4e0, param_2,local_48,0x2c,0,0x12); if (lVar1 == 0) { translog_interpret_file_header(param_1,local_48); } local_49 = lVar1 != 0; if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_49); }
49,456
cpu_get_num_physical_cores()
monkey531[P]llama/common/common.cpp
int32_t cpu_get_num_physical_cores() { #ifdef __linux__ // enumerate the set of thread siblings, num entries is num cores std::unordered_set<std::string> siblings; for (uint32_t cpu=0; cpu < UINT32_MAX; ++cpu) { std::ifstream thread_siblings("/sys/devices/system/cpu/cpu" + std::to_string(cpu) + "/topology/thread_siblings"); if (!thread_siblings.is_open()) { break; // no more cpus } std::string line; if (std::getline(thread_siblings, line)) { siblings.insert(line); } } if (!siblings.empty()) { return static_cast<int32_t>(siblings.size()); } #elif defined(__APPLE__) && defined(__MACH__) int32_t num_physical_cores; size_t len = sizeof(num_physical_cores); int result = sysctlbyname("hw.perflevel0.physicalcpu", &num_physical_cores, &len, NULL, 0); if (result == 0) { return num_physical_cores; } result = sysctlbyname("hw.physicalcpu", &num_physical_cores, &len, NULL, 0); if (result == 0) { return num_physical_cores; } #elif defined(_WIN32) && (_WIN32_WINNT >= 0x0601) && !defined(__MINGW64__) // windows 7 and later // TODO: windows + arm64 + mingw64 unsigned int n_threads_win = std::thread::hardware_concurrency(); unsigned int default_threads = n_threads_win > 0 ? (n_threads_win <= 4 ? n_threads_win : n_threads_win / 2) : 4; DWORD buffer_size = 0; if (!GetLogicalProcessorInformationEx(RelationProcessorCore, nullptr, &buffer_size)) { if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) { return default_threads; } } std::vector<char> buffer(buffer_size); if (!GetLogicalProcessorInformationEx(RelationProcessorCore, reinterpret_cast<PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX>(buffer.data()), &buffer_size)) { return default_threads; } int32_t num_physical_cores = 0; PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX info = reinterpret_cast<PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX>(buffer.data()); while (buffer_size > 0) { if (info->Relationship == RelationProcessorCore) { num_physical_cores += info->Processor.GroupCount; } buffer_size -= info->Size; info = reinterpret_cast<PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX>(reinterpret_cast<char*>(info) + info->Size); } return num_physical_cores > 0 ? num_physical_cores : default_threads; #endif unsigned int n_threads = std::thread::hardware_concurrency(); return n_threads > 0 ? (n_threads <= 4 ? n_threads : n_threads / 2) : 4; }
O0
cpp
cpu_get_num_physical_cores(): subq $0x328, %rsp # imm = 0x328 leaq 0x2e8(%rsp), %rdi callq 0xf8480 movl $0x0, 0x2e4(%rsp) cmpl $-0x1, 0x2e4(%rsp) jae 0xec540 movl 0x2e4(%rsp), %esi leaq 0x78(%rsp), %rdi callq 0xf84e0 jmp 0xec330 leaq 0x12410d(%rip), %rsi # 0x210444 leaq 0x98(%rsp), %rdi leaq 0x78(%rsp), %rdx callq 0xf8490 jmp 0xec34b leaq 0x12410e(%rip), %rdx # 0x210460 leaq 0xb8(%rsp), %rdi leaq 0x98(%rsp), %rsi callq 0x8ab70 jmp 0xec369 leaq 0xd8(%rsp), %rdi leaq 0xb8(%rsp), %rsi movl $0x8, %edx callq 0x5b280 jmp 0xec385 leaq 0xb8(%rsp), %rdi callq 0x5b588 leaq 0x98(%rsp), %rdi callq 0x5b588 leaq 0x78(%rsp), %rdi callq 0x5b588 leaq 0xd8(%rsp), %rdi callq 0x5b060 movb %al, 0x33(%rsp) jmp 0xec3bc movb 0x33(%rsp), %al testb $0x1, %al jne 0xec454 jmp 0xec3ca movl $0x2, 0x68(%rsp) jmp 0xec4fd movq %rax, %rcx movl %edx, %eax movq %rcx, 0x70(%rsp) movl %eax, 0x6c(%rsp) jmp 0xec5de movq %rax, %rcx movl %edx, %eax movq %rcx, 0x70(%rsp) movl %eax, 0x6c(%rsp) jmp 0xec432 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x70(%rsp) movl %eax, 0x6c(%rsp) jmp 0xec425 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x70(%rsp) movl %eax, 0x6c(%rsp) leaq 0xb8(%rsp), %rdi callq 0x5b588 leaq 0x98(%rsp), %rdi callq 0x5b588 leaq 0x78(%rsp), %rdi callq 0x5b588 jmp 0xec5de movq %rax, %rcx movl %edx, %eax movq %rcx, 0x70(%rsp) movl %eax, 0x6c(%rsp) jmp 0xec52e leaq 0x48(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0x5a610 movq 0x20(%rsp), %rsi leaq 0xd8(%rsp), %rdi callq 0x5a900 movq %rax, 0x28(%rsp) jmp 0xec47c movq 0x28(%rsp), %rdi movq (%rdi), %rax movq -0x18(%rax), %rax addq %rax, %rdi callq 0x5a650 movb %al, 0x1f(%rsp) jmp 0xec496 movb 0x1f(%rsp), %al testb $0x1, %al jne 0xec4a0 jmp 0xec4eb leaq 0x2e8(%rsp), %rdi leaq 0x48(%rsp), %rsi callq 0xf85e0 movb %dl, 0xf(%rsp) movq %rax, 0x10(%rsp) jmp 0xec4bd movb 0xf(%rsp), %al movq 0x10(%rsp), %rcx movq %rcx, 0x38(%rsp) movb %al, 0x40(%rsp) jmp 0xec4eb movq %rax, %rcx movl %edx, %eax movq %rcx, 0x70(%rsp) movl %eax, 0x6c(%rsp) leaq 0x48(%rsp), %rdi callq 0x5b588 jmp 0xec52e leaq 0x48(%rsp), %rdi callq 0x5b588 movl $0x0, 0x68(%rsp) leaq 0xd8(%rsp), %rdi callq 0x5a0b0 movl 0x68(%rsp), %eax testl %eax, %eax je 0xec516 jmp 0xec514 jmp 0xec540 jmp 0xec518 movl 0x2e4(%rsp), %eax addl $0x1, %eax movl %eax, 0x2e4(%rsp) jmp 0xec30f leaq 0xd8(%rsp), %rdi callq 0x5a0b0 jmp 0xec5de leaq 0x2e8(%rsp), %rdi callq 0xf8630 testb $0x1, %al jne 0xec56f leaq 0x2e8(%rsp), %rdi callq 0xf8650 movl %eax, 0x324(%rsp) movl $0x1, 0x68(%rsp) jmp 0xec5c2 callq 0x5ae60 movl %eax, 0x34(%rsp) cmpl $0x0, 0x34(%rsp) jbe 0xec5a4 cmpl $0x4, 0x34(%rsp) ja 0xec590 movl 0x34(%rsp), %eax movl %eax, 0x8(%rsp) jmp 0xec59a movl 0x34(%rsp), %eax shrl %eax movl %eax, 0x8(%rsp) movl 0x8(%rsp), %eax movl %eax, 0x4(%rsp) jmp 0xec5af movl $0x4, %eax movl %eax, 0x4(%rsp) jmp 0xec5af movl 0x4(%rsp), %eax movl %eax, 0x324(%rsp) movl $0x1, 0x68(%rsp) leaq 0x2e8(%rsp), %rdi callq 0xf8660 movl 0x324(%rsp), %eax addq $0x328, %rsp # imm = 0x328 retq leaq 0x2e8(%rsp), %rdi callq 0xf8660 movq 0x70(%rsp), %rdi callq 0x5abf0 nopw %cs:(%rax,%rax)
_Z26cpu_get_num_physical_coresv: sub rsp, 328h lea rdi, [rsp+328h+var_40] call _ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EEC2Ev; std::unordered_set<std::string>::unordered_set(void) mov [rsp+328h+var_44], 0 loc_EC30F: cmp [rsp+328h+var_44], 0FFFFFFFFh jnb loc_EC540 mov esi, [rsp+328h+var_44]; unsigned int lea rdi, [rsp+328h+var_2B0]; this call _ZNSt7__cxx119to_stringEj; std::to_string(uint) jmp short $+2 loc_EC330: lea rsi, aSysDevicesSyst; "/sys/devices/system/cpu/cpu" lea rdi, [rsp+328h+var_290] lea rdx, [rsp+328h+var_2B0] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) jmp short $+2 loc_EC34B: lea rdx, aTopologyThread; "/topology/thread_siblings" lea rdi, [rsp+328h+var_270] lea rsi, [rsp+328h+var_290] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) jmp short $+2 loc_EC369: lea rdi, [rsp+328h+var_250] lea rsi, [rsp+328h+var_270] mov edx, 8 call __ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode; std::ifstream::basic_ifstream(std::string const&,std::_Ios_Openmode) jmp short $+2 loc_EC385: lea rdi, [rsp+328h+var_270]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+328h+var_290]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+328h+var_2B0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+328h+var_250] call __ZNSt14basic_ifstreamIcSt11char_traitsIcEE7is_openEv; std::ifstream::is_open(void) mov [rsp+328h+var_2F5], al jmp short $+2 loc_EC3BC: mov al, [rsp+328h+var_2F5] test al, 1 jnz loc_EC454 jmp short $+2 loc_EC3CA: mov [rsp+328h+var_2C0], 2 jmp loc_EC4FD mov rcx, rax mov eax, edx mov [rsp+arg_68], rcx mov [rsp+arg_64], eax jmp loc_EC5DE mov rcx, rax mov eax, edx mov [rsp+arg_68], rcx mov [rsp+arg_64], eax jmp short loc_EC432 mov rcx, rax mov eax, edx mov [rsp+arg_68], rcx mov [rsp+arg_64], eax jmp short loc_EC425 mov rcx, rax mov eax, edx mov [rsp+arg_68], rcx mov [rsp+arg_64], eax lea rdi, [rsp+arg_B0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_EC425: lea rdi, [rsp+arg_90]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_EC432: lea rdi, [rsp+arg_70]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_EC5DE mov rcx, rax mov eax, edx mov [rsp+arg_68], rcx mov [rsp+arg_64], eax jmp loc_EC52E loc_EC454: lea rdi, [rsp+328h+var_2E0] mov [rsp+328h+var_308], rdi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void) mov rsi, [rsp+328h+var_308] lea rdi, [rsp+328h+var_250] call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &) mov [rsp+328h+var_300], rax jmp short $+2 loc_EC47C: mov rdi, [rsp+328h+var_300] mov rax, [rdi] mov rax, [rax-18h] add rdi, rax call __ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv; std::ios::operator bool(void) mov [rsp+328h+var_309], al jmp short $+2 loc_EC496: mov al, [rsp+328h+var_309] test al, 1 jnz short loc_EC4A0 jmp short loc_EC4EB loc_EC4A0: lea rdi, [rsp+328h+var_40] lea rsi, [rsp+328h+var_2E0] call _ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE6insertERKS5_; std::unordered_set<std::string>::insert(std::string const&) mov [rsp+328h+var_319], dl mov [rsp+328h+var_318], rax jmp short $+2 loc_EC4BD: mov al, [rsp+328h+var_319] mov rcx, [rsp+328h+var_318] mov [rsp+328h+var_2F0], rcx mov [rsp+328h+var_2E8], al jmp short loc_EC4EB mov rcx, rax mov eax, edx mov [rsp+arg_68], rcx mov [rsp+arg_64], eax lea rdi, [rsp+arg_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_EC52E loc_EC4EB: lea rdi, [rsp+328h+var_2E0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov [rsp+328h+var_2C0], 0 loc_EC4FD: lea rdi, [rsp+328h+var_250] call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream() mov eax, [rsp+328h+var_2C0] test eax, eax jz short loc_EC516 jmp short $+2 loc_EC514: jmp short loc_EC540 loc_EC516: jmp short $+2 loc_EC518: mov eax, [rsp+328h+var_44] add eax, 1 mov [rsp+328h+var_44], eax jmp loc_EC30F loc_EC52E: lea rdi, [rsp+arg_D0] call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream() jmp loc_EC5DE loc_EC540: lea rdi, [rsp+328h+var_40]; this call _ZNKSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE5emptyEv; std::unordered_set<std::string>::empty(void) test al, 1 jnz short loc_EC56F lea rdi, [rsp+328h+var_40] call _ZNKSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE4sizeEv; std::unordered_set<std::string>::size(void) mov [rsp+328h+var_4], eax mov [rsp+328h+var_2C0], 1 jmp short loc_EC5C2 loc_EC56F: call __ZNSt6thread20hardware_concurrencyEv; std::thread::hardware_concurrency(void) mov [rsp+328h+var_2F4], eax cmp [rsp+328h+var_2F4], 0 jbe short loc_EC5A4 cmp [rsp+328h+var_2F4], 4 ja short loc_EC590 mov eax, [rsp+328h+var_2F4] mov [rsp+328h+var_320], eax jmp short loc_EC59A loc_EC590: mov eax, [rsp+328h+var_2F4] shr eax, 1 mov [rsp+328h+var_320], eax loc_EC59A: mov eax, [rsp+328h+var_320] mov [rsp+328h+var_324], eax jmp short loc_EC5AF loc_EC5A4: mov eax, 4 mov [rsp+328h+var_324], eax jmp short $+2 loc_EC5AF: mov eax, [rsp+328h+var_324] mov [rsp+328h+var_4], eax mov [rsp+328h+var_2C0], 1 loc_EC5C2: lea rdi, [rsp+328h+var_40]; void * call _ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EED2Ev; std::unordered_set<std::string>::~unordered_set() mov eax, [rsp+328h+var_4] add rsp, 328h retn loc_EC5DE: lea rdi, [rsp+arg_2E0]; void * call _ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EED2Ev; std::unordered_set<std::string>::~unordered_set() mov rdi, [rsp+arg_68] call __Unwind_Resume
long long cpu_get_num_physical_cores(void) { int v1; // [rsp+4h] [rbp-324h] unsigned int v2; // [rsp+8h] [rbp-320h] _QWORD *v3; // [rsp+28h] [rbp-300h] unsigned int v4; // [rsp+34h] [rbp-2F4h] _BYTE v5[32]; // [rsp+48h] [rbp-2E0h] BYREF int v6; // [rsp+68h] [rbp-2C0h] _BYTE v7[32]; // [rsp+78h] [rbp-2B0h] BYREF _BYTE v8[32]; // [rsp+98h] [rbp-290h] BYREF _BYTE v9[32]; // [rsp+B8h] [rbp-270h] BYREF _BYTE v10[524]; // [rsp+D8h] [rbp-250h] BYREF unsigned int i; // [rsp+2E4h] [rbp-44h] _BYTE v12[60]; // [rsp+2E8h] [rbp-40h] BYREF unsigned int v13; // [rsp+324h] [rbp-4h] std::unordered_set<std::string>::unordered_set(v12); for ( i = 0; i != -1; ++i ) { std::to_string((std::__cxx11 *)v7, i); std::operator+<char>(v8, "/sys/devices/system/cpu/cpu", v7); std::operator+<char>((long long)v9, (long long)v8, (long long)"/topology/thread_siblings"); std::ifstream::basic_ifstream(v10, v9, 8LL); std::string::~string(v9); std::string::~string(v8); std::string::~string(v7); if ( (std::ifstream::is_open(v10) & 1) != 0 ) { std::string::basic_string(v5); v3 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(v10, v5); if ( (std::ios::operator bool((char *)v3 + *(_QWORD *)(*v3 - 24LL)) & 1) != 0 ) std::unordered_set<std::string>::insert(v12, v5); std::string::~string(v5); v6 = 0; } else { v6 = 2; } std::ifstream::~ifstream(v10); if ( v6 ) break; } if ( (std::unordered_set<std::string>::empty(v12) & 1) != 0 ) { v4 = std::thread::hardware_concurrency((std::thread *)v12); if ( v4 ) { if ( v4 > 4 ) v2 = v4 >> 1; else v2 = v4; v1 = v2; } else { v1 = 4; } v13 = v1; v6 = 1; } else { v13 = std::unordered_set<std::string>::size(v12); v6 = 1; } std::unordered_set<std::string>::~unordered_set(v12); return v13; }
cpu_get_num_physical_cores: SUB RSP,0x328 LEA RDI,[RSP + 0x2e8] CALL 0x001f8480 MOV dword ptr [RSP + 0x2e4],0x0 LAB_001ec30f: CMP dword ptr [RSP + 0x2e4],-0x1 JNC 0x001ec540 MOV ESI,dword ptr [RSP + 0x2e4] LAB_001ec324: LEA RDI,[RSP + 0x78] CALL 0x001f84e0 JMP 0x001ec330 LAB_001ec330: LEA RSI,[0x310444] LEA RDI,[RSP + 0x98] LEA RDX,[RSP + 0x78] CALL 0x001f8490 JMP 0x001ec34b LAB_001ec34b: LEA RDX,[0x310460] LEA RDI,[RSP + 0xb8] LEA RSI,[RSP + 0x98] CALL 0x0018ab70 JMP 0x001ec369 LAB_001ec369: LEA RDI,[RSP + 0xd8] LEA RSI,[RSP + 0xb8] MOV EDX,0x8 CALL 0x0015b280 JMP 0x001ec385 LAB_001ec385: LEA RDI,[RSP + 0xb8] CALL 0x0015b588 LEA RDI,[RSP + 0x98] CALL 0x0015b588 LEA RDI,[RSP + 0x78] CALL 0x0015b588 LAB_001ec3a9: LEA RDI,[RSP + 0xd8] CALL 0x0015b060 MOV byte ptr [RSP + 0x33],AL JMP 0x001ec3bc LAB_001ec3bc: MOV AL,byte ptr [RSP + 0x33] TEST AL,0x1 JNZ 0x001ec454 JMP 0x001ec3ca LAB_001ec3ca: MOV dword ptr [RSP + 0x68],0x2 JMP 0x001ec4fd LAB_001ec454: LEA RDI,[RSP + 0x48] MOV qword ptr [RSP + 0x20],RDI CALL 0x0015a610 MOV RSI,qword ptr [RSP + 0x20] LAB_001ec468: LEA RDI,[RSP + 0xd8] CALL 0x0015a900 MOV qword ptr [RSP + 0x28],RAX JMP 0x001ec47c LAB_001ec47c: MOV RDI,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + -0x18] ADD RDI,RAX CALL 0x0015a650 MOV byte ptr [RSP + 0x1f],AL JMP 0x001ec496 LAB_001ec496: MOV AL,byte ptr [RSP + 0x1f] TEST AL,0x1 JNZ 0x001ec4a0 JMP 0x001ec4eb LAB_001ec4a0: LEA RDI,[RSP + 0x2e8] LEA RSI,[RSP + 0x48] CALL 0x001f85e0 LAB_001ec4b2: MOV byte ptr [RSP + 0xf],DL MOV qword ptr [RSP + 0x10],RAX JMP 0x001ec4bd LAB_001ec4bd: MOV AL,byte ptr [RSP + 0xf] MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x38],RCX MOV byte ptr [RSP + 0x40],AL JMP 0x001ec4eb LAB_001ec4eb: LEA RDI,[RSP + 0x48] CALL 0x0015b588 MOV dword ptr [RSP + 0x68],0x0 LAB_001ec4fd: LEA RDI,[RSP + 0xd8] CALL 0x0015a0b0 MOV EAX,dword ptr [RSP + 0x68] TEST EAX,EAX JZ 0x001ec516 JMP 0x001ec514 LAB_001ec514: JMP 0x001ec540 LAB_001ec516: JMP 0x001ec518 LAB_001ec518: MOV EAX,dword ptr [RSP + 0x2e4] ADD EAX,0x1 MOV dword ptr [RSP + 0x2e4],EAX JMP 0x001ec30f LAB_001ec540: LEA RDI,[RSP + 0x2e8] CALL 0x001f8630 TEST AL,0x1 JNZ 0x001ec56f LEA RDI,[RSP + 0x2e8] CALL 0x001f8650 MOV dword ptr [RSP + 0x324],EAX MOV dword ptr [RSP + 0x68],0x1 JMP 0x001ec5c2 LAB_001ec56f: CALL 0x0015ae60 MOV dword ptr [RSP + 0x34],EAX CMP dword ptr [RSP + 0x34],0x0 JBE 0x001ec5a4 CMP dword ptr [RSP + 0x34],0x4 JA 0x001ec590 MOV EAX,dword ptr [RSP + 0x34] MOV dword ptr [RSP + 0x8],EAX JMP 0x001ec59a LAB_001ec590: MOV EAX,dword ptr [RSP + 0x34] SHR EAX,0x1 MOV dword ptr [RSP + 0x8],EAX LAB_001ec59a: MOV EAX,dword ptr [RSP + 0x8] MOV dword ptr [RSP + 0x4],EAX JMP 0x001ec5af LAB_001ec5a4: MOV EAX,0x4 MOV dword ptr [RSP + 0x4],EAX JMP 0x001ec5af LAB_001ec5af: MOV EAX,dword ptr [RSP + 0x4] MOV dword ptr [RSP + 0x324],EAX MOV dword ptr [RSP + 0x68],0x1 LAB_001ec5c2: LEA RDI,[RSP + 0x2e8] CALL 0x001f8660 MOV EAX,dword ptr [RSP + 0x324] ADD RSP,0x328 RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* cpu_get_num_physical_cores() */ uint cpu_get_num_physical_cores(void) { byte bVar1; bool bVar2; istream *piVar3; ulong uVar4; uint local_324; uint local_320; string local_2e0 [32]; int local_2c0; __cxx11 local_2b0 [32]; string local_290 [32]; string local_270 [32]; ifstream local_250 [524]; uint local_44; unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>> local_40 [60]; uint local_4; std:: unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>> ::unordered_set(local_40); for (local_44 = 0; local_44 != 0xffffffff; local_44 = local_44 + 1) { /* try { // try from 001ec324 to 001ec32d has its CatchHandler @ 001ec3d7 */ std::__cxx11::to_string(local_2b0,local_44); /* try { // try from 001ec330 to 001ec348 has its CatchHandler @ 001ec3ea */ std::operator+((char *)local_290,(string *)"/sys/devices/system/cpu/cpu"); /* try { // try from 001ec34b to 001ec366 has its CatchHandler @ 001ec3fa */ std::operator+(local_270,(char *)local_290); /* try { // try from 001ec369 to 001ec382 has its CatchHandler @ 001ec40a */ std::ifstream::ifstream(local_250,local_270,8); std::__cxx11::string::~string(local_270); std::__cxx11::string::~string(local_290); std::__cxx11::string::~string((string *)local_2b0); /* try { // try from 001ec3a9 to 001ec3b5 has its CatchHandler @ 001ec441 */ bVar1 = std::ifstream::is_open(); if ((bVar1 & 1) == 0) { local_2c0 = 2; } else { std::__cxx11::string::string(local_2e0); /* try { // try from 001ec468 to 001ec4b1 has its CatchHandler @ 001ec4d1 */ piVar3 = std::getline<char,std::char_traits<char>,std::allocator<char>> ((istream *)local_250,local_2e0); bVar2 = std::ios::operator_cast_to_bool((ios *)(piVar3 + *(long *)(*(long *)piVar3 + -0x18))); if (bVar2) { std:: unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>> ::insert(local_40,local_2e0); } std::__cxx11::string::~string(local_2e0); local_2c0 = 0; } std::ifstream::~ifstream(local_250); if (local_2c0 != 0) break; } uVar4 = std:: unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>> ::empty(local_40); if ((uVar4 & 1) == 0) { local_4 = std:: unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>> ::size(local_40); } else { local_320 = std::thread::hardware_concurrency(); if (local_320 == 0) { local_324 = 4; } else { if (4 < local_320) { local_320 = local_320 >> 1; } local_324 = local_320; } local_4 = local_324; } local_2c0 = 1; std:: unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>> ::~unordered_set(local_40); return local_4; }
49,457
mysql_stmt_send_long_data_start
eloqsql/libmariadb/libmariadb/mariadb_async.c
int STDCALL mysql_stmt_send_long_data_start(my_bool *ret, MYSQL_STMT *stmt, unsigned int param_number, const char *data, unsigned long length) { MK_ASYNC_START_BODY( mysql_stmt_send_long_data, stmt->mysql, { WIN_SET_NONBLOCKING(stmt->mysql) parms.stmt= stmt; parms.param_number= param_number; parms.data= data; parms.length= length; }, TRUE, r_my_bool, /* If stmt->mysql==NULL then we will not block so can call directly. */ if (!stmt->mysql) { *ret= mysql_stmt_send_long_data(stmt, param_number, data, length); return 0; }) }
O3
c
mysql_stmt_send_long_data_start: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp movq %rsi, %r14 movq %rdi, %rbx movq 0x38(%rsi), %rax testq %rax, %rax je 0x4db10 movq 0x480(%rax), %rax movq 0x28(%rax), %r15 leaq -0x38(%rbp), %rax movq %r14, (%rax) movl %edx, 0x8(%rax) movq %rcx, 0x10(%rax) movq %r8, 0x18(%rax) movb $0x1, 0x14(%r15) leaq 0x38(%r15), %rdi leaq 0xad(%rip), %rsi # 0x4db9d movq %rax, %rdx callq 0x4e720 movw $0x0, 0x14(%r15) testl %eax, %eax jle 0x4db22 movb $0x1, 0x15(%r15) movl (%r15), %eax jmp 0x4db92 movq %r14, %rdi movl %edx, %esi movq %rcx, %rdx movq %r8, %rcx callq 0x42e6c jmp 0x4db8e js 0x4db2a movb 0x8(%r15), %al jmp 0x4db8e movq 0x38(%r14), %rax movl $0x7d8, 0x90(%rax) # imm = 0x7D8 movl $0x297, %edi # imm = 0x297 addq 0x38(%r14), %rdi leaq 0x2dfe78(%rip), %rax # 0x32d9c0 movq (%rax), %rsi movl $0x5, %edx callq 0x35110 movq 0x38(%r14), %rax xorl %r15d, %r15d movb %r15b, 0x29c(%rax) movl $0x97, %edi addq 0x38(%r14), %rdi leaq 0x2dfe5d(%rip), %rax # 0x32d9d0 movq 0x40(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x35110 movq 0x38(%r14), %rax movb %r15b, 0x296(%rax) movb $0x1, %al movb %al, (%rbx) xorl %eax, %eax addq $0x28, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
mysql_stmt_send_long_data_start: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 28h mov r14, rsi mov rbx, rdi mov rax, [rsi+38h] test rax, rax jz short loc_4DB10 mov rax, [rax+480h] mov r15, [rax+28h] lea rax, [rbp+var_38] mov [rax], r14 mov [rax+8], edx mov [rax+10h], rcx mov [rax+18h], r8 mov byte ptr [r15+14h], 1 lea rdi, [r15+38h] lea rsi, mysql_stmt_send_long_data_start_internal mov rdx, rax call my_context_spawn mov word ptr [r15+14h], 0 test eax, eax jle short loc_4DB22 mov byte ptr [r15+15h], 1 mov eax, [r15] jmp loc_4DB92 loc_4DB10: mov rdi, r14 mov esi, edx mov rdx, rcx mov rcx, r8 call mysql_stmt_send_long_data jmp short loc_4DB8E loc_4DB22: js short loc_4DB2A mov al, [r15+8] jmp short loc_4DB8E loc_4DB2A: mov rax, [r14+38h] mov dword ptr [rax+90h], 7D8h mov edi, 297h add rdi, [r14+38h] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [r14+38h] xor r15d, r15d mov [rax+29Ch], r15b mov edi, 97h add rdi, [r14+38h] lea rax, client_errors mov rsi, [rax+40h] mov edx, 1FFh call _strncpy mov rax, [r14+38h] mov [rax+296h], r15b mov al, 1 loc_4DB8E: mov [rbx], al xor eax, eax loc_4DB92: add rsp, 28h pop rbx pop r14 pop r15 pop rbp retn
long long mysql_stmt_send_long_data_start(char *a1, long long a2, unsigned int a3, long long a4, long long a5) { long long v5; // rax _BYTE *v6; // r15 int v7; // eax char v9; // al long long v10; // [rsp+8h] [rbp-38h] BYREF unsigned int v11; // [rsp+10h] [rbp-30h] long long v12; // [rsp+18h] [rbp-28h] long long v13; // [rsp+20h] [rbp-20h] v5 = *(_QWORD *)(a2 + 56); if ( v5 ) { v6 = *(_BYTE **)(*(_QWORD *)(v5 + 1152) + 40LL); v10 = a2; v11 = a3; v12 = a4; v13 = a5; v6[20] = 1; v7 = my_context_spawn(v6 + 56, mysql_stmt_send_long_data_start_internal, &v10); *((_WORD *)v6 + 10) = 0; if ( v7 > 0 ) { v6[21] = 1; return *(unsigned int *)v6; } if ( v7 < 0 ) { *(_DWORD *)(*(_QWORD *)(a2 + 56) + 144LL) = 2008; strncpy(*(_QWORD *)(a2 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(*(_QWORD *)(a2 + 56) + 668LL) = 0; strncpy(*(_QWORD *)(a2 + 56) + 151LL, client_errors[8], 511LL); *(_BYTE *)(*(_QWORD *)(a2 + 56) + 662LL) = 0; v9 = 1; } else { v9 = v6[8]; } } else { v9 = mysql_stmt_send_long_data(a2, a3, a4, a5); } *a1 = v9; return 0LL; }
mysql_stmt_send_long_data_start: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x28 MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr [RSI + 0x38] TEST RAX,RAX JZ 0x0014db10 MOV RAX,qword ptr [RAX + 0x480] MOV R15,qword ptr [RAX + 0x28] LEA RAX,[RBP + -0x38] MOV qword ptr [RAX],R14 MOV dword ptr [RAX + 0x8],EDX MOV qword ptr [RAX + 0x10],RCX MOV qword ptr [RAX + 0x18],R8 MOV byte ptr [R15 + 0x14],0x1 LEA RDI,[R15 + 0x38] LEA RSI,[0x14db9d] MOV RDX,RAX CALL 0x0014e720 MOV word ptr [R15 + 0x14],0x0 TEST EAX,EAX JLE 0x0014db22 MOV byte ptr [R15 + 0x15],0x1 MOV EAX,dword ptr [R15] JMP 0x0014db92 LAB_0014db10: MOV RDI,R14 MOV ESI,EDX MOV RDX,RCX MOV RCX,R8 CALL 0x00142e6c JMP 0x0014db8e LAB_0014db22: JS 0x0014db2a MOV AL,byte ptr [R15 + 0x8] JMP 0x0014db8e LAB_0014db2a: MOV RAX,qword ptr [R14 + 0x38] MOV dword ptr [RAX + 0x90],0x7d8 MOV EDI,0x297 ADD RDI,qword ptr [R14 + 0x38] LEA RAX,[0x42d9c0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00135110 MOV RAX,qword ptr [R14 + 0x38] XOR R15D,R15D MOV byte ptr [RAX + 0x29c],R15B MOV EDI,0x97 ADD RDI,qword ptr [R14 + 0x38] LEA RAX,[0x42d9d0] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1ff CALL 0x00135110 MOV RAX,qword ptr [R14 + 0x38] MOV byte ptr [RAX + 0x296],R15B MOV AL,0x1 LAB_0014db8e: MOV byte ptr [RBX],AL XOR EAX,EAX LAB_0014db92: ADD RSP,0x28 POP RBX POP R14 POP R15 POP RBP RET
int4 mysql_stmt_send_long_data_start (int1 *param_1,long param_2,int4 param_3,int8 param_4,int8 param_5 ) { int4 *puVar1; int1 uVar2; int iVar3; long local_40; int4 local_38; int8 local_30; int8 local_28; if (*(long *)(param_2 + 0x38) == 0) { uVar2 = mysql_stmt_send_long_data(param_2,param_3,param_4,param_5); } else { puVar1 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28); *(int1 *)(puVar1 + 5) = 1; local_40 = param_2; local_38 = param_3; local_30 = param_4; local_28 = param_5; iVar3 = my_context_spawn(puVar1 + 0xe,mysql_stmt_send_long_data_start_internal,&local_40); *(int2 *)(puVar1 + 5) = 0; if (0 < iVar3) { *(int1 *)((long)puVar1 + 0x15) = 1; return *puVar1; } if (iVar3 < 0) { *(int4 *)(*(long *)(param_2 + 0x38) + 0x90) = 0x7d8; strncpy((char *)(*(long *)(param_2 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(*(long *)(param_2 + 0x38) + 0x29c) = 0; strncpy((char *)(*(long *)(param_2 + 0x38) + 0x97),PTR_s_Client_run_out_of_memory_0042da10, 0x1ff); *(int1 *)(*(long *)(param_2 + 0x38) + 0x296) = 0; uVar2 = 1; } else { uVar2 = *(int1 *)(puVar1 + 2); } } *param_1 = uVar2; return 0; }
49,458
translog_prev_buffer_flush_wait
eloqsql/storage/maria/ma_loghandler.c
my_bool translog_prev_buffer_flush_wait(struct st_translog_buffer *buffer) { TRANSLOG_ADDRESS offset= buffer->offset; TRANSLOG_FILE *file= buffer->file; uint8 ver= buffer->ver; DBUG_ENTER("translog_prev_buffer_flush_wait"); DBUG_PRINT("enter", ("buffer: %p #%u offset: " LSN_FMT " " "prev sent: " LSN_FMT " prev offset: " LSN_FMT, buffer, (uint) buffer->buffer_no, LSN_IN_PARTS(buffer->offset), LSN_IN_PARTS(buffer->prev_sent_to_disk), LSN_IN_PARTS(buffer->prev_buffer_offset))); translog_buffer_lock_assert_owner(buffer); if (buffer->prev_buffer_offset != buffer->prev_sent_to_disk) { do { mysql_cond_wait(&buffer->prev_sent_to_disk_cond, &buffer->mutex); if (buffer->file != file || buffer->offset != offset || buffer->ver != ver) DBUG_RETURN(1); /* some the thread flushed the buffer already */ } while(buffer->prev_buffer_offset != buffer->prev_sent_to_disk); } DBUG_RETURN(0); }
O3
c
translog_prev_buffer_flush_wait: movq 0x100020(%rdi), %rax cmpq 0x1000e0(%rdi), %rax jne 0x48e69 xorl %eax, %eax retq pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x100010(%rdi), %rax movq %rax, -0x30(%rbp) movq 0x100038(%rdi), %r12 movb 0x1000d9(%rdi), %r13b leaq 0x1000e8(%rdi), %r14 leaq 0x100090(%rdi), %r15 cmpq $0x0, 0x100118(%rbx) jne 0x48ee9 movq %r14, %rdi movq %r15, %rsi callq 0x29430 movb $0x1, %al cmpq %r12, 0x100038(%rbx) jne 0x48f04 movq -0x30(%rbp), %rcx cmpq %rcx, 0x100010(%rbx) jne 0x48f04 cmpb %r13b, 0x1000d9(%rbx) jne 0x48f04 movq 0x100020(%rbx), %rax cmpq 0x1000e0(%rbx), %rax jne 0x48ea1 jmp 0x48f02 movq %r14, %rdi movq %r15, %rsi leaq 0x90f51(%rip), %rdx # 0xd9e47 movl $0xa24, %ecx # imm = 0xA24 callq 0x2eea0 jmp 0x48eb6 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
translog_prev_buffer_flush_wait: mov rax, ds:qword_100020[rdi] cmp rax, ds:qword_1000E0[rdi] jnz short loc_48E69 xor eax, eax retn loc_48E69: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi mov rax, ds:qword_100010[rdi] mov [rbp-30h], rax mov r12, ds:qword_100038[rdi] mov r13b, ds:byte_1000D9[rdi] lea r14, unk_1000E8[rdi] lea r15, unk_100090[rdi] loc_48EA1: cmp ds:qword_100118[rbx], 0 jnz short loc_48EE9 mov rdi, r14 mov rsi, r15 call _pthread_cond_wait loc_48EB6: mov al, 1 cmp ds:qword_100038[rbx], r12 jnz short loc_48F04 mov rcx, [rbp-30h] cmp ds:qword_100010[rbx], rcx jnz short loc_48F04 cmp ds:byte_1000D9[rbx], r13b jnz short loc_48F04 mov rax, ds:qword_100020[rbx] cmp rax, ds:qword_1000E0[rbx] jnz short loc_48EA1 jmp short loc_48F02 loc_48EE9: mov rdi, r14 mov rsi, r15 lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 0A24h call psi_cond_wait jmp short loc_48EB6 loc_48F02: xor eax, eax loc_48F04: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
char translog_prev_buffer_flush_wait(long long a1) { char result; // al long long v2; // r12 char v3; // r13 char *v4; // r14 char *v5; // r15 long long v6; // [rsp-38h] [rbp-38h] if ( *(long long *)((char *)&qword_100020 + a1) == *(long long *)((char *)&qword_1000E0 + a1) ) return 0; v6 = *(long long *)((char *)&qword_100010 + a1); v2 = *(long long *)((char *)&qword_100038 + a1); v3 = byte_1000D9[a1]; v4 = (char *)&unk_1000E8 + a1; v5 = (char *)&unk_100090 + a1; while ( 1 ) { if ( *(long long *)((char *)&qword_100118 + a1) ) psi_cond_wait( (long long)v4, (long long)v5, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0xA24u); else pthread_cond_wait(v4, v5); result = 1; if ( *(long long *)((char *)&qword_100038 + a1) != v2 || *(long long *)((char *)&qword_100010 + a1) != v6 || byte_1000D9[a1] != v3 ) { break; } if ( *(long long *)((char *)&qword_100020 + a1) == *(long long *)((char *)&qword_1000E0 + a1) ) return 0; } return result; }
translog_prev_buffer_flush_wait: MOV RAX,qword ptr [RDI + 0x100020] CMP RAX,qword ptr [RDI + 0x1000e0] JNZ 0x00148e69 XOR EAX,EAX RET LAB_00148e69: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x100010] MOV qword ptr [RBP + -0x30],RAX MOV R12,qword ptr [RDI + 0x100038] MOV R13B,byte ptr [RDI + 0x1000d9] LEA R14,[RDI + 0x1000e8] LEA R15,[RDI + 0x100090] LAB_00148ea1: CMP qword ptr [RBX + 0x100118],0x0 JNZ 0x00148ee9 MOV RDI,R14 MOV RSI,R15 CALL 0x00129430 LAB_00148eb6: MOV AL,0x1 CMP qword ptr [RBX + 0x100038],R12 JNZ 0x00148f04 MOV RCX,qword ptr [RBP + -0x30] CMP qword ptr [RBX + 0x100010],RCX JNZ 0x00148f04 CMP byte ptr [RBX + 0x1000d9],R13B JNZ 0x00148f04 MOV RAX,qword ptr [RBX + 0x100020] CMP RAX,qword ptr [RBX + 0x1000e0] JNZ 0x00148ea1 JMP 0x00148f02 LAB_00148ee9: MOV RDI,R14 MOV RSI,R15 LEA RDX,[0x1d9e47] MOV ECX,0xa24 CALL 0x0012eea0 JMP 0x00148eb6 LAB_00148f02: XOR EAX,EAX LAB_00148f04: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 translog_prev_buffer_flush_wait(long param_1) { pthread_cond_t *__cond; pthread_mutex_t *__mutex; char cVar1; long lVar2; long lVar3; if (*(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x17) == *(long *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_align + param_1)) { return 0; } lVar2 = *(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 7); lVar3 = *(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f); cVar1 = *(char *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_memsz + param_1 + 1); __cond = (pthread_cond_t *)((long)&Elf64_Phdr_ARRAY_00100040[3].p_type + param_1); __mutex = (pthread_mutex_t *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_paddr + param_1); while( true ) { if (*(long *)((long)&Elf64_Phdr_ARRAY_00100040[3].p_align + param_1) == 0) { pthread_cond_wait(__cond,__mutex); } else { psi_cond_wait(__cond,__mutex, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",0xa24); } if (*(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f) != lVar3) { return 1; } if (*(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 7) != lVar2) { return 1; } if (*(char *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_memsz + param_1 + 1) != cVar1) break; if (*(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x17) == *(long *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_align + param_1)) { return 0; } } return 1; }
49,459
get_length
eloqsql/strings/my_vsnprintf.c
static const char *get_length(const char *fmt, size_t *length, uint *pre_zero) { for (; my_isdigit(&my_charset_latin1, *fmt); fmt++) { *length= *length * 10 + (uint)(*fmt - '0'); if (!*length) *pre_zero|= PREZERO_ARG; /* first digit was 0 */ } return fmt; }
O0
c
get_length: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) leaq 0x200ec9(%rip), %rax # 0x27a840 movq 0x40(%rax), %rax movq -0x8(%rbp), %rcx movzbl (%rcx), %ecx movzbl 0x1(%rax,%rcx), %eax andl $0x4, %eax cmpl $0x0, %eax je 0x799d2 movq -0x10(%rbp), %rax imulq $0xa, (%rax), %rcx movq -0x8(%rbp), %rax movsbl (%rax), %eax subl $0x30, %eax movl %eax, %eax addq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rax cmpq $0x0, (%rax) jne 0x799c2 movq -0x18(%rbp), %rax movl (%rax), %ecx orl $0x4, %ecx movl %ecx, (%rax) jmp 0x799c4 movq -0x8(%rbp), %rax addq $0x1, %rax movq %rax, -0x8(%rbp) jmp 0x79970 movq -0x8(%rbp), %rax popq %rbp retq nopl (%rax,%rax)
get_length: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx loc_79970: lea rax, my_charset_latin1 mov rax, [rax+40h] mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx] movzx eax, byte ptr [rax+rcx+1] and eax, 4 cmp eax, 0 jz short loc_799D2 mov rax, [rbp+var_10] imul rcx, [rax], 0Ah mov rax, [rbp+var_8] movsx eax, byte ptr [rax] sub eax, 30h ; '0' mov eax, eax add rcx, rax mov rax, [rbp+var_10] mov [rax], rcx mov rax, [rbp+var_10] cmp qword ptr [rax], 0 jnz short loc_799C2 mov rax, [rbp+var_18] mov ecx, [rax] or ecx, 4 mov [rax], ecx loc_799C2: jmp short $+2 loc_799C4: mov rax, [rbp+var_8] add rax, 1 mov [rbp+var_8], rax jmp short loc_79970 loc_799D2: mov rax, [rbp+var_8] pop rbp retn
unsigned __int8 * get_length(unsigned __int8 *a1, _QWORD *a2, _DWORD *a3) { while ( (*(_BYTE *)(*(_QWORD *)&my_charset_latin1[16] + *a1 + 1LL) & 4) != 0 ) { *a2 = (unsigned int)((char)*a1 - 48) + 10LL * *a2; if ( !*a2 ) *a3 |= 4u; ++a1; } return a1; }
get_length: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX LAB_00179970: LEA RAX,[0x37a840] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX] MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1] AND EAX,0x4 CMP EAX,0x0 JZ 0x001799d2 MOV RAX,qword ptr [RBP + -0x10] IMUL RCX,qword ptr [RAX],0xa MOV RAX,qword ptr [RBP + -0x8] MOVSX EAX,byte ptr [RAX] SUB EAX,0x30 MOV EAX,EAX ADD RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX],0x0 JNZ 0x001799c2 MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RAX] OR ECX,0x4 MOV dword ptr [RAX],ECX LAB_001799c2: JMP 0x001799c4 LAB_001799c4: MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x1 MOV qword ptr [RBP + -0x8],RAX JMP 0x00179970 LAB_001799d2: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
byte * get_length(byte *param_1,long *param_2,uint *param_3) { byte *local_10; local_10 = param_1; while ((PTR_ctype_latin1_0037a880[(ulong)*local_10 + 1] & 4) != 0) { *param_2 = *param_2 * 10 + (ulong)((int)(char)*local_10 - 0x30); if (*param_2 == 0) { *param_3 = *param_3 | 4; } local_10 = local_10 + 1; } return local_10; }
49,460
translog_write_variable_record_chunk2_page
eloqsql/storage/maria/ma_loghandler.c
static my_bool translog_write_variable_record_chunk2_page(struct st_translog_parts *parts, TRANSLOG_ADDRESS *horizon, struct st_buffer_cursor *cursor) { uchar chunk2_header[1]; DBUG_ENTER("translog_write_variable_record_chunk2_page"); chunk2_header[0]= TRANSLOG_CHUNK_NOHDR; if (translog_chaser_page_next(horizon, cursor)) DBUG_RETURN(1); /* Puts chunk type */ translog_write_data_on_page(horizon, cursor, 1, chunk2_header); /* Puts chunk body */ translog_write_parts_on_page(horizon, cursor, log_descriptor.page_capacity_chunk_2, parts); DBUG_RETURN(0); }
O0
c
translog_write_variable_record_chunk2_page: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movb $-0x80, -0x21(%rbp) movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0x61190 cmpb $0x0, %al je 0x60de1 jmp 0x60ddb movb $0x1, -0x1(%rbp) jmp 0x60e13 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi leaq -0x21(%rbp), %rcx movl $0x1, %edx callq 0x61210 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi movzwl 0x3e11c0(%rip), %edx # 0x441fc6 movq -0x10(%rbp), %rcx callq 0x60750 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nopl (%rax)
translog_write_variable_record_chunk2_page: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_21], 80h mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] call translog_chaser_page_next cmp al, 0 jz short loc_60DE1 jmp short $+2 loc_60DDB: mov [rbp+var_1], 1 jmp short loc_60E13 loc_60DE1: mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] lea rcx, [rbp+var_21] mov edx, 1 call translog_write_data_on_page mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] movzx edx, cs:word_441FC6 mov rcx, [rbp+var_10] call translog_write_parts_on_page mov [rbp+var_1], 0 loc_60E13: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char translog_write_variable_record_chunk2_page(long long a1, _QWORD *a2, long long a3) { char v4; // [rsp+Fh] [rbp-21h] BYREF long long v5; // [rsp+10h] [rbp-20h] _QWORD *v6; // [rsp+18h] [rbp-18h] long long v7; // [rsp+20h] [rbp-10h] v7 = a1; v6 = a2; v5 = a3; v4 = 0x80; if ( (unsigned __int8)translog_chaser_page_next(a2, a3) ) return 1; translog_write_data_on_page(v6, v5, 1LL, &v4); translog_write_parts_on_page(v6, v5, (unsigned __int16)word_441FC6, v7); return 0; }
translog_write_variable_record_chunk2_page: 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 byte ptr [RBP + -0x21],0x80 MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] CALL 0x00161190 CMP AL,0x0 JZ 0x00160de1 JMP 0x00160ddb LAB_00160ddb: MOV byte ptr [RBP + -0x1],0x1 JMP 0x00160e13 LAB_00160de1: MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] LEA RCX,[RBP + -0x21] MOV EDX,0x1 CALL 0x00161210 MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOVZX EDX,word ptr [0x00541fc6] MOV RCX,qword ptr [RBP + -0x10] CALL 0x00160750 MOV byte ptr [RBP + -0x1],0x0 LAB_00160e13: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
bool translog_write_variable_record_chunk2_page (int8 param_1,int8 param_2,int8 param_3) { char cVar1; int1 local_29; int8 local_28; int8 local_20; int8 local_18; bool local_9; local_29 = 0x80; local_28 = param_3; local_20 = param_2; local_18 = param_1; cVar1 = translog_chaser_page_next(param_2,param_3); if (cVar1 == '\0') { translog_write_data_on_page(local_20,local_28,1,&local_29); translog_write_parts_on_page(local_20,local_28,DAT_00541fc6,local_18); } local_9 = cVar1 != '\0'; return local_9; }
49,461
minja::Value::operator>(minja::Value const&) const
llama.cpp/common/minja/minja.hpp
bool operator>(const Value & other) const { if (is_null()) throw std::runtime_error("Undefined value or reference"); if (is_number() && other.is_number()) return get<double>() > other.get<double>(); if (is_string() && other.is_string()) return get<std::string>() > other.get<std::string>(); throw std::runtime_error("Cannot compare values: " + dump() + " > " + other.dump()); }
O3
cpp
minja::Value::operator>(minja::Value const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0xa8, %rsp movq %rsi, %r14 movq %rdi, %r15 cmpq $0x0, 0x20(%rdi) movb 0x40(%rdi), %al jne 0xec415 cmpq $0x0, 0x10(%r15) jne 0xec415 testb %al, %al jne 0xec415 cmpq $0x0, 0x30(%r15) je 0xec519 leal -0x5(%rax), %ecx cmpb $0x2, %cl ja 0xec454 movb 0x40(%r14), %al addb $-0x5, %al cmpb $0x2, %al ja 0xec54b movq %r15, %rdi callq 0xbd9cc movsd %xmm0, 0x40(%rsp) movq %r14, %rdi callq 0xbd9cc movsd 0x40(%rsp), %xmm1 ucomisd %xmm0, %xmm1 seta %bpl jmp 0xec509 cmpb $0x3, %al jne 0xec54b cmpb $0x3, 0x40(%r14) jne 0xec54b movq %rsp, %rdi movq %r15, %rsi callq 0xbdae2 leaq 0x20(%rsp), %rdi movq %r14, %rsi callq 0xbdae2 movq 0x8(%rsp), %r14 movq 0x20(%rsp), %rbx movq 0x28(%rsp), %r15 cmpq %r14, %r15 movq %r14, %rdx cmovbq %r15, %rdx testq %rdx, %rdx je 0xec4ad movq (%rsp), %rdi movq %rbx, %rsi callq 0x211e0 testl %eax, %eax jne 0xec4ce subq %r15, %r14 cmpq $-0x7fffffff, %r14 # imm = 0x80000001 movq $-0x80000000, %rax # imm = 0x80000000 cmovgeq %r14, %rax movl $0x7fffffff, %ecx # imm = 0x7FFFFFFF cmpq %rcx, %rax cmovgeq %rcx, %rax testl %eax, %eax setg %bpl leaq 0x30(%rsp), %rax cmpq %rax, %rbx je 0xec4ee movq 0x30(%rsp), %rsi incq %rsi movq %rbx, %rdi callq 0x20170 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xec509 movq 0x10(%rsp), %rsi incq %rsi callq 0x20170 movl %ebp, %eax addq $0xa8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x20610 movq %rax, %rbx leaq 0x32171(%rip), %rsi # 0x11e69e movq %rax, %rdi callq 0x203f0 movq 0x74a84(%rip), %rsi # 0x160fc0 movq 0x74a3d(%rip), %rdx # 0x160f80 movq %rbx, %rdi callq 0x20a10 movl $0x10, %edi callq 0x20610 movq %rax, %rbx leaq 0x48(%rsp), %rdi movq %r15, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0xb4ad4 leaq 0x323df(%rip), %rsi # 0x11e952 leaq 0x88(%rsp), %rdi leaq 0x48(%rsp), %rdx callq 0xae374 leaq 0x343bb(%rip), %rdx # 0x120947 leaq 0x20(%rsp), %rdi leaq 0x88(%rsp), %rsi callq 0xaed61 leaq 0x68(%rsp), %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0xb4ad4 movq %rsp, %rdi leaq 0x20(%rsp), %rsi leaq 0x68(%rsp), %rdx callq 0xafb3d movb $0x1, %bpl movq %rsp, %rsi movq %rbx, %rdi callq 0x20440 xorl %ebp, %ebp movq 0x749e5(%rip), %rsi # 0x160fc0 movq 0x7499e(%rip), %rdx # 0x160f80 movq %rbx, %rdi callq 0x20a10 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xec610 movq 0x10(%rsp), %rsi incq %rsi callq 0x20170 jmp 0xec610 movq %rax, %r14 movb $0x1, %bpl leaq 0x78(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xec633 movq 0x78(%rsp), %rsi incq %rsi callq 0x20170 jmp 0xec633 movq %rax, %r14 movb $0x1, %bpl leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xec656 movq 0x30(%rsp), %rsi incq %rsi callq 0x20170 jmp 0xec656 movq %rax, %r14 movb $0x1, %bpl leaq 0x98(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xec677 movq 0x98(%rsp), %rsi incq %rsi callq 0x20170 leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xec692 movq 0x58(%rsp), %rsi incq %rsi callq 0x20170 testb %bpl, %bpl jne 0xec6de jmp 0xec6e6 movq %rax, %r14 leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xec6de movq 0x58(%rsp), %rsi incq %rsi callq 0x20170 jmp 0xec6de movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xec6e6 movq 0x10(%rsp), %rsi incq %rsi callq 0x20170 jmp 0xec6e6 jmp 0xec6db movq %rax, %r14 movq %rbx, %rdi callq 0x20e90 movq %r14, %rdi callq 0x20ab0
_ZNK5minja5ValuegtERKS0_: push rbp push r15 push r14 push rbx sub rsp, 0A8h mov r14, rsi mov r15, rdi cmp qword ptr [rdi+20h], 0 mov al, [rdi+40h] jnz short loc_EC415 cmp qword ptr [r15+10h], 0 jnz short loc_EC415 test al, al jnz short loc_EC415 cmp qword ptr [r15+30h], 0 jz loc_EC519 loc_EC415: lea ecx, [rax-5] cmp cl, 2 ja short loc_EC454 mov al, [r14+40h] add al, 0FBh cmp al, 2 ja loc_EC54B mov rdi, r15 call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void) movsd [rsp+0C8h+var_88], xmm0 mov rdi, r14 call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void) movsd xmm1, [rsp+0C8h+var_88] ucomisd xmm1, xmm0 setnbe bpl jmp loc_EC509 loc_EC454: cmp al, 3 jnz loc_EC54B cmp byte ptr [r14+40h], 3 jnz loc_EC54B mov rdi, rsp mov rsi, r15 call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void) lea rdi, [rsp+0C8h+var_A8] mov rsi, r14 call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void) mov r14, [rsp+0C8h+var_C0] mov rbx, [rsp+0C8h+var_A8] mov r15, [rsp+0C8h+var_A0] cmp r15, r14 mov rdx, r14 cmovb rdx, r15 test rdx, rdx jz short loc_EC4AD mov rdi, [rsp+0C8h+var_C8] mov rsi, rbx call _memcmp test eax, eax jnz short loc_EC4CE loc_EC4AD: sub r14, r15 cmp r14, 0FFFFFFFF80000001h mov rax, 0FFFFFFFF80000000h cmovge rax, r14 mov ecx, 7FFFFFFFh cmp rax, rcx cmovge rax, rcx loc_EC4CE: test eax, eax setnle bpl lea rax, [rsp+0C8h+var_98] cmp rbx, rax jz short loc_EC4EE mov rsi, [rsp+0C8h+var_98] inc rsi; unsigned __int64 mov rdi, rbx; void * call __ZdlPvm; operator delete(void *,ulong) loc_EC4EE: lea rax, [rsp+0C8h+var_B8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_EC509 mov rsi, [rsp+0C8h+var_B8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_EC509: mov eax, ebp add rsp, 0A8h pop rbx pop r14 pop r15 pop rbp retn loc_EC519: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aUndefinedValue; "Undefined value or reference" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_EC54B: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+0C8h+var_80] mov rsi, r15 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aCannotCompareV; "Cannot compare values: " lea rdi, [rsp+0C8h+var_40] lea rdx, [rsp+0C8h+var_80] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) lea rdx, asc_120947; " > " lea rdi, [rsp+0C8h+var_A8] lea rsi, [rsp+0C8h+var_40] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) lea rdi, [rsp+0C8h+var_60] mov rsi, r14 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) mov rdi, rsp lea rsi, [rsp+0C8h+var_A8] lea rdx, [rsp+0C8h+var_60] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) mov bpl, 1 mov rsi, rsp mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+0C8h+var_B8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_EC610 mov rsi, [rsp+0C8h+var_B8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_EC610 mov r14, rax mov bpl, 1 loc_EC610: lea rax, [rsp+0C8h+var_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_EC633 mov rsi, [rsp+0C8h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_EC633 mov r14, rax mov bpl, 1 loc_EC633: lea rax, [rsp+0C8h+var_98] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_EC656 mov rsi, [rsp+0C8h+var_98] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_EC656 mov r14, rax mov bpl, 1 loc_EC656: lea rax, [rsp+0C8h+var_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_EC677 mov rsi, [rsp+0C8h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_EC677: lea rax, [rsp+0C8h+var_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_EC692 mov rsi, [rsp+0C8h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_EC692: test bpl, bpl jnz short loc_EC6DE jmp short loc_EC6E6 mov r14, rax lea rax, [rsp+0C8h+var_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_EC6DE mov rsi, [rsp+0C8h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_EC6DE mov r14, rax lea rax, [rsp+0C8h+var_B8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_EC6E6 mov rsi, [rsp+0C8h+var_B8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_EC6E6 jmp short $+2 loc_EC6DB: mov r14, rax loc_EC6DE: mov rdi, rbx; void * call ___cxa_free_exception loc_EC6E6: mov rdi, r14 call __Unwind_Resume
long long minja::Value::operator>(long long a1, long long a2) { unsigned int v2; // ebp char v3; // al unsigned long long v4; // r14 long long *v5; // rbx unsigned long long v6; // r15 unsigned long long v7; // rdx long long v8; // rax long long v9; // r14 std::runtime_error *exception; // rbx void *v12; // rbx long long *v13; // [rsp+0h] [rbp-C8h] BYREF unsigned long long v14; // [rsp+8h] [rbp-C0h] long long v15; // [rsp+10h] [rbp-B8h] BYREF void *v16; // [rsp+20h] [rbp-A8h] BYREF unsigned long long v17; // [rsp+28h] [rbp-A0h] long long v18; // [rsp+30h] [rbp-98h] BYREF double v19; // [rsp+40h] [rbp-88h] _BYTE v20[16]; // [rsp+48h] [rbp-80h] BYREF _QWORD v21[2]; // [rsp+68h] [rbp-60h] BYREF _QWORD v22[2]; // [rsp+88h] [rbp-40h] BYREF v3 = *(_BYTE *)(a1 + 64); if ( !*(_QWORD *)(a1 + 32) && !*(_QWORD *)(a1 + 16) && !v3 && !*(_QWORD *)(a1 + 48) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Undefined value or reference"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( (unsigned __int8)(v3 - 5) <= 2u ) { if ( (unsigned __int8)(*(_BYTE *)(a2 + 64) - 5) <= 2u ) { v19 = minja::Value::get<double>((_QWORD *)a1); LOBYTE(v2) = v19 > minja::Value::get<double>((_QWORD *)a2); return v2; } LABEL_24: v12 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v20, a1, 0xFFFFFFFF, 0); std::operator+<char>(v22, (long long)"Cannot compare values: ", (long long)v20); std::operator+<char>(&v16, (long long)v22, (long long)" > "); minja::Value::dump[abi:cxx11]((long long)v21, a2, 0xFFFFFFFF, 0); std::operator+<char>(&v13, &v16, v21); std::runtime_error::runtime_error(v12, &v13); __cxa_throw( v12, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( v3 != 3 || *(_BYTE *)(a2 + 64) != 3 ) goto LABEL_24; minja::Value::get<std::string>((long long)&v13, (_QWORD *)a1); minja::Value::get<std::string>((long long)&v16, (_QWORD *)a2); v4 = v14; v5 = (long long *)v16; v6 = v17; v7 = v14; if ( v17 < v14 ) v7 = v17; if ( !v7 || (LODWORD(v8) = memcmp(v13, v16), !(_DWORD)v8) ) { v9 = v4 - v6; v8 = 0xFFFFFFFF80000000LL; if ( v9 >= -2147483647 ) v8 = v9; if ( v8 >= 0x7FFFFFFF ) LODWORD(v8) = 0x7FFFFFFF; } LOBYTE(v2) = (int)v8 > 0; if ( v5 != &v18 ) operator delete(v5, v18 + 1); if ( v13 != &v15 ) operator delete(v13, v15 + 1); return v2; }
operator>: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0xa8 MOV R14,RSI MOV R15,RDI CMP qword ptr [RDI + 0x20],0x0 MOV AL,byte ptr [RDI + 0x40] JNZ 0x001ec415 CMP qword ptr [R15 + 0x10],0x0 JNZ 0x001ec415 TEST AL,AL JNZ 0x001ec415 CMP qword ptr [R15 + 0x30],0x0 JZ 0x001ec519 LAB_001ec415: LEA ECX,[RAX + -0x5] CMP CL,0x2 JA 0x001ec454 MOV AL,byte ptr [R14 + 0x40] ADD AL,0xfb CMP AL,0x2 JA 0x001ec54b MOV RDI,R15 CALL 0x001bd9cc MOVSD qword ptr [RSP + 0x40],XMM0 MOV RDI,R14 CALL 0x001bd9cc MOVSD XMM1,qword ptr [RSP + 0x40] UCOMISD XMM1,XMM0 SETA BPL JMP 0x001ec509 LAB_001ec454: CMP AL,0x3 JNZ 0x001ec54b CMP byte ptr [R14 + 0x40],0x3 JNZ 0x001ec54b MOV RDI,RSP MOV RSI,R15 CALL 0x001bdae2 LAB_001ec472: LEA RDI,[RSP + 0x20] MOV RSI,R14 CALL 0x001bdae2 LAB_001ec47f: MOV R14,qword ptr [RSP + 0x8] MOV RBX,qword ptr [RSP + 0x20] MOV R15,qword ptr [RSP + 0x28] CMP R15,R14 MOV RDX,R14 CMOVC RDX,R15 TEST RDX,RDX JZ 0x001ec4ad MOV RDI,qword ptr [RSP] MOV RSI,RBX CALL 0x001211e0 TEST EAX,EAX JNZ 0x001ec4ce LAB_001ec4ad: SUB R14,R15 CMP R14,-0x7fffffff MOV RAX,-0x80000000 CMOVGE RAX,R14 MOV ECX,0x7fffffff CMP RAX,RCX CMOVGE RAX,RCX LAB_001ec4ce: TEST EAX,EAX SETG BPL LEA RAX,[RSP + 0x30] CMP RBX,RAX JZ 0x001ec4ee MOV RSI,qword ptr [RSP + 0x30] INC RSI MOV RDI,RBX CALL 0x00120170 LAB_001ec4ee: LEA RAX,[RSP + 0x10] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001ec509 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x00120170 LAB_001ec509: MOV EAX,EBP ADD RSP,0xa8 POP RBX POP R14 POP R15 POP RBP RET LAB_001ec519: MOV EDI,0x10 CALL 0x00120610 MOV RBX,RAX LAB_001ec526: LEA RSI,[0x21e69e] MOV RDI,RAX CALL 0x001203f0 LAB_001ec535: MOV RSI,qword ptr [0x00260fc0] MOV RDX,qword ptr [0x00260f80] MOV RDI,RBX CALL 0x00120a10 LAB_001ec54b: MOV EDI,0x10 CALL 0x00120610 MOV RBX,RAX LAB_001ec558: LEA RDI,[RSP + 0x48] MOV RSI,R15 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x001b4ad4 LAB_001ec56c: LEA RSI,[0x21e952] LEA RDI,[RSP + 0x88] LEA RDX,[RSP + 0x48] CALL 0x001ae374 LAB_001ec585: LEA RDX,[0x220947] LEA RDI,[RSP + 0x20] LEA RSI,[RSP + 0x88] CALL 0x001aed61 LAB_001ec59e: LEA RDI,[RSP + 0x68] MOV RSI,R14 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x001b4ad4 LAB_001ec5b2: MOV RDI,RSP LEA RSI,[RSP + 0x20] LEA RDX,[RSP + 0x68] CALL 0x001afb3d MOV BPL,0x1 LAB_001ec5c7: MOV RSI,RSP MOV RDI,RBX CALL 0x00120440 XOR EBP,EBP MOV RSI,qword ptr [0x00260fc0] MOV RDX,qword ptr [0x00260f80] MOV RDI,RBX CALL 0x00120a10
/* minja::Value::TEMPNAMEPLACEHOLDERVALUE(minja::Value const&) const */ ulong __thiscall minja::Value::operator>(Value *this,Value *param_1) { Value VVar1; uint uVar2; ulong uVar3; runtime_error *prVar4; int8 unaff_RBP; int7 uVar5; double dVar6; long *local_c8; ulong local_c0; long local_b8 [2]; long *local_a8; ulong local_a0; long local_98 [2]; double local_88; int1 local_80 [32]; int1 local_60 [32]; char local_40 [32]; VVar1 = this[0x40]; if ((((*(long *)(this + 0x20) == 0) && (*(long *)(this + 0x10) == 0)) && (VVar1 == (Value)0x0)) && (*(long *)(this + 0x30) == 0)) { prVar4 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001ec526 to 001ec534 has its CatchHandler @ 001ec6db */ std::runtime_error::runtime_error(prVar4,"Undefined value or reference"); /* WARNING: Subroutine does not return */ __cxa_throw(prVar4,PTR_typeinfo_00260fc0,PTR__runtime_error_00260f80); } uVar5 = (int7)((ulong)unaff_RBP >> 8); if ((byte)((char)VVar1 - 5U) < 3) { if (2 < (byte)((char)param_1[0x40] - 5U)) { LAB_001ec54b: prVar4 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001ec558 to 001ec56b has its CatchHandler @ 001ec6d9 */ dump_abi_cxx11_((int)local_80,SUB81(this,0)); /* try { // try from 001ec56c to 001ec584 has its CatchHandler @ 001ec699 */ std::operator+(local_40,(string *)"Cannot compare values: "); /* try { // try from 001ec585 to 001ec59d has its CatchHandler @ 001ec650 */ std::operator+((string *)&local_a8,local_40); /* try { // try from 001ec59e to 001ec5b1 has its CatchHandler @ 001ec62d */ dump_abi_cxx11_((int)local_60,SUB81(param_1,0)); /* try { // try from 001ec5b2 to 001ec5c3 has its CatchHandler @ 001ec60a */ std::operator+((string *)&local_c8,(string *)&local_a8); /* try { // try from 001ec5c7 to 001ec5e9 has its CatchHandler @ 001ec5ea */ std::runtime_error::runtime_error(prVar4,(string *)&local_c8); /* WARNING: Subroutine does not return */ __cxa_throw(prVar4,PTR_typeinfo_00260fc0,PTR__runtime_error_00260f80); } local_88 = get<double>(this); dVar6 = get<double>(param_1); uVar3 = CONCAT71(uVar5,dVar6 < local_88); goto LAB_001ec509; } if ((VVar1 != (Value)0x3) || (param_1[0x40] != (Value)0x3)) goto LAB_001ec54b; get<std::__cxx11::string>(); /* try { // try from 001ec472 to 001ec47e has its CatchHandler @ 001ec6b9 */ get<std::__cxx11::string>(); uVar3 = local_c0; if (local_a0 < local_c0) { uVar3 = local_a0; } if (uVar3 == 0) { LAB_001ec4ad: uVar3 = 0xffffffff80000000; if (-0x80000000 < (long)(local_c0 - local_a0)) { uVar3 = local_c0 - local_a0; } if (0x7ffffffe < (long)uVar3) { uVar3 = 0x7fffffff; } } else { uVar2 = memcmp(local_c8,local_a8,uVar3); uVar3 = (ulong)uVar2; if (uVar2 == 0) goto LAB_001ec4ad; } uVar3 = CONCAT71(uVar5,0 < (int)uVar3); if (local_a8 != local_98) { operator_delete(local_a8,local_98[0] + 1); } if (local_c8 != local_b8) { operator_delete(local_c8,local_b8[0] + 1); } LAB_001ec509: return uVar3 & 0xffffffff; }
49,462
nglog::LogDestination::LogToStderr()
ng-log[P]ng-log/src/logging.cc
inline void LogDestination::LogToStderr() { // *Don't* put this stuff in a mutex lock, since SetStderrLogging & // SetLogDestination already do the locking! SetStderrLogging(NGLOG_INFO); // thus everything is "also" logged to stderr for (int i = 0; i < NUM_SEVERITIES; ++i) { SetLogDestination(static_cast<LogSeverity>(i), ""); // "" turns off logging to a logfile } }
O2
cpp
nglog::LogDestination::LogToStderr(): pushq %r14 pushq %rbx pushq %rax xorl %ebx, %ebx xorl %edi, %edi callq 0x1ca8e leaq 0x11507(%rip), %r14 # 0x2e029 cmpl $0x4, %ebx je 0x1cb35 movl %ebx, %edi movq %r14, %rsi callq 0x1c67e incl %ebx jmp 0x1cb22 addq $0x8, %rsp popq %rbx popq %r14 retq nop
_ZN5nglog14LogDestination11LogToStderrEv: push r14 push rbx push rax xor ebx, ebx xor edi, edi call _ZN5nglog14LogDestination16SetStderrLoggingENS_11LogSeverityE; nglog::LogDestination::SetStderrLogging(nglog::LogSeverity) lea r14, asc_2E027+2; "" loc_1CB22: cmp ebx, 4 jz short loc_1CB35 mov edi, ebx mov rsi, r14 call _ZN5nglog14LogDestination17SetLogDestinationENS_11LogSeverityEPKc; nglog::LogDestination::SetLogDestination(nglog::LogSeverity,char const*) inc ebx jmp short loc_1CB22 loc_1CB35: add rsp, 8 pop rbx pop r14 retn
long long nglog::LogDestination::LogToStderr(nglog::LogDestination *this) { int v1; // ebx long long result; // rax v1 = 0; result = nglog::LogDestination::SetStderrLogging(0); while ( v1 != 4 ) result = nglog::LogDestination::SetLogDestination(v1++, (long long)""); return result; }
LogToStderr: PUSH R14 PUSH RBX PUSH RAX XOR EBX,EBX XOR EDI,EDI CALL 0x0011ca8e LEA R14,[0x12e029] LAB_0011cb22: CMP EBX,0x4 JZ 0x0011cb35 MOV EDI,EBX MOV RSI,R14 CALL 0x0011c67e INC EBX JMP 0x0011cb22 LAB_0011cb35: ADD RSP,0x8 POP RBX POP R14 RET
/* nglog::LogDestination::LogToStderr() */ void nglog::LogDestination::LogToStderr(void) { int iVar1; SetStderrLogging(0); for (iVar1 = 0; iVar1 != 4; iVar1 = iVar1 + 1) { SetLogDestination(iVar1,&DAT_0012e029); } return; }
49,463
calc_hashnr_caseup
eloqsql/libmariadb/libmariadb/ma_hashtbl.c
static uint calc_hashnr_caseup(const uchar *key,uint length) { register uint nr=1, nr2=4; while (length--) { nr^= (((nr & 63)+nr2)*((uint) (uchar) toupper(*key++)))+ (nr << 8); nr2+=3; } return((uint) nr); }
O0
c
calc_hashnr_caseup: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl $0x1, -0x10(%rbp) movl $0x4, -0x14(%rbp) movl -0xc(%rbp), %eax movl %eax, %ecx addl $-0x1, %ecx movl %ecx, -0xc(%rbp) cmpl $0x0, %eax je 0x5f184 movl -0x10(%rbp), %eax andl $0x3f, %eax addl -0x14(%rbp), %eax movl %eax, -0x18(%rbp) movq -0x8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x8(%rbp) movzbl (%rax), %edi callq 0x147d0 movl %eax, %ecx movl -0x18(%rbp), %eax movzbl %cl, %ecx imull %ecx, %eax movl -0x10(%rbp), %ecx shll $0x8, %ecx addl %ecx, %eax xorl -0x10(%rbp), %eax movl %eax, -0x10(%rbp) movl -0x14(%rbp), %eax addl $0x3, %eax movl %eax, -0x14(%rbp) jmp 0x5f12d movl -0x10(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopl (%rax)
calc_hashnr_caseup: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_10], 1 mov [rbp+var_14], 4 loc_5F12D: mov eax, [rbp+var_C] mov ecx, eax add ecx, 0FFFFFFFFh mov [rbp+var_C], ecx cmp eax, 0 jz short loc_5F184 mov eax, [rbp+var_10] and eax, 3Fh add eax, [rbp+var_14] mov [rbp+var_18], eax mov rax, [rbp+var_8] mov rcx, rax add rcx, 1 mov [rbp+var_8], rcx movzx edi, byte ptr [rax] call _toupper mov ecx, eax mov eax, [rbp+var_18] movzx ecx, cl imul eax, ecx mov ecx, [rbp+var_10] shl ecx, 8 add eax, ecx xor eax, [rbp+var_10] mov [rbp+var_10], eax mov eax, [rbp+var_14] add eax, 3 mov [rbp+var_14], eax jmp short loc_5F12D loc_5F184: mov eax, [rbp+var_10] add rsp, 20h pop rbp retn
long long calc_hashnr_caseup(unsigned __int8 *a1, int a2) { unsigned __int8 *v3; // rax int i; // [rsp+Ch] [rbp-14h] unsigned int v6; // [rsp+10h] [rbp-10h] v6 = 1; for ( i = 4; a2--; i += 3 ) { v3 = a1++; v6 ^= (v6 << 8) + (unsigned __int8)toupper(*v3) * (i + (v6 & 0x3F)); } return v6; }
calc_hashnr_caseup: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV dword ptr [RBP + -0x10],0x1 MOV dword ptr [RBP + -0x14],0x4 LAB_0015f12d: MOV EAX,dword ptr [RBP + -0xc] MOV ECX,EAX ADD ECX,-0x1 MOV dword ptr [RBP + -0xc],ECX CMP EAX,0x0 JZ 0x0015f184 MOV EAX,dword ptr [RBP + -0x10] AND EAX,0x3f ADD EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x18],EAX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x8],RCX MOVZX EDI,byte ptr [RAX] CALL 0x001147d0 MOV ECX,EAX MOV EAX,dword ptr [RBP + -0x18] MOVZX ECX,CL IMUL EAX,ECX MOV ECX,dword ptr [RBP + -0x10] SHL ECX,0x8 ADD EAX,ECX XOR EAX,dword ptr [RBP + -0x10] MOV dword ptr [RBP + -0x10],EAX MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x3 MOV dword ptr [RBP + -0x14],EAX JMP 0x0015f12d LAB_0015f184: MOV EAX,dword ptr [RBP + -0x10] ADD RSP,0x20 POP RBP RET
uint calc_hashnr_caseup(byte *param_1,int param_2) { uint uVar1; int local_1c; uint local_18; int local_14; byte *local_10; local_18 = 1; local_1c = 4; local_14 = param_2; local_10 = param_1; while (local_14 != 0) { uVar1 = toupper((uint)*local_10); local_18 = ((local_18 & 0x3f) + local_1c) * (uVar1 & 0xff) + local_18 * 0x100 ^ local_18; local_1c = local_1c + 3; local_14 = local_14 + -1; local_10 = local_10 + 1; } return local_18; }
49,464
common_sampler_print[abi:cxx11](common_sampler const*)
monkey531[P]llama/common/sampling.cpp
std::string common_sampler_print(const struct common_sampler * gsmpl) { std::string result = "logits "; for (int i = 0; i < llama_sampler_chain_n(gsmpl->chain); i++) { const auto * smpl = llama_sampler_chain_get(gsmpl->chain, i); result += std::string("-> ") + llama_sampler_name(smpl) + " "; } return result; }
O2
cpp
common_sampler_print[abi:cxx11](common_sampler const*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rsi, %r14 leaq 0x1a935(%rip), %rsi # 0xb4aee leaq 0x58(%rsp), %r15 movq %rdi, 0x10(%rsp) movq %r15, %rdx callq 0x27852 xorl %ebp, %ebp leaq 0x18(%rsp), %r13 leaq 0x38(%rsp), %r12 movq 0x140(%r14), %rdi callq 0x24f40 cmpl %eax, %ebp jge 0x9a260 movq 0x140(%r14), %rdi movl %ebp, %esi callq 0x249a0 movq %rax, %rbx movq %r13, %rdi leaq 0x21226(%rip), %rsi # 0xbb428 leaq 0xf(%rsp), %rdx callq 0x27852 movq %rbx, %rdi callq 0x24360 movq %r12, %rdi movq %r13, %rsi movq %rax, %rdx callq 0x38598 movq %r15, %rdi movq %r12, %rsi leaq 0x1b0de(%rip), %rdx # 0xb530d callq 0x38598 movq 0x10(%rsp), %rdi movq %r15, %rsi callq 0x25120 movq %r15, %rdi callq 0x251b8 movq %r12, %rdi callq 0x251b8 movq %r13, %rdi callq 0x251b8 incl %ebp jmp 0x9a1d7 movq 0x10(%rsp), %rax addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x9a296 movq %rax, %r14 leaq 0x58(%rsp), %rdi callq 0x251b8 jmp 0x9a288 movq %rax, %r14 leaq 0x38(%rsp), %rdi callq 0x251b8 jmp 0x9a29e jmp 0x9a296 movq %rax, %r14 jmp 0x9a2a8 movq %rax, %r14 leaq 0x18(%rsp), %rdi callq 0x251b8 movq 0x10(%rsp), %rdi callq 0x251b8 movq %r14, %rdi callq 0x24f60
_Z20common_sampler_printB5cxx11PK14common_sampler: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov r14, rsi lea rsi, aLogits+2; "logits " lea r15, [rsp+0A8h+var_50] mov [rsp+0A8h+var_98], rdi mov rdx, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) xor ebp, ebp lea r13, [rsp+0A8h+var_90] lea r12, [rsp+0A8h+var_70] loc_9A1D7: mov rdi, [r14+140h] call _llama_sampler_chain_n cmp ebp, eax jge short loc_9A260 mov rdi, [r14+140h] mov esi, ebp call _llama_sampler_chain_get mov rbx, rax mov rdi, r13 lea rsi, asc_BB428; "-> " lea rdx, [rsp+0A8h+var_99] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rdi, rbx call _llama_sampler_name mov rdi, r12 mov rsi, r13 mov rdx, rax call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) mov rdi, r15 mov rsi, r12 lea rdx, aForMessageInMe+144h; " " call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) mov rdi, [rsp+0A8h+var_98] mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&) mov rdi, r15; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r12; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r13; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() inc ebp jmp loc_9A1D7 loc_9A260: mov rax, [rsp+0A8h+var_98] add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_9A296 mov r14, rax lea rdi, [rsp+arg_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_9A288 mov r14, rax loc_9A288: lea rdi, [rsp+arg_30]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_9A29E jmp short $+2 loc_9A296: mov r14, rax jmp short loc_9A2A8 mov r14, rax loc_9A29E: lea rdi, [rsp+arg_10]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_9A2A8: mov rdi, [rsp+arg_8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r14 call __Unwind_Resume
_QWORD * common_sampler_print[abi:cxx11](_QWORD *a1, long long a2) { int i; // ebp long long v3; // rbx long long v4; // rax _QWORD v6[4]; // [rsp+18h] [rbp-90h] BYREF _BYTE v7[32]; // [rsp+38h] [rbp-70h] BYREF _BYTE v8[80]; // [rsp+58h] [rbp-50h] BYREF std::string::basic_string<std::allocator<char>>(a1, (long long)"logits "); for ( i = 0; i < (int)llama_sampler_chain_n(*(_QWORD *)(a2 + 320)); ++i ) { v3 = llama_sampler_chain_get(*(_QWORD *)(a2 + 320), (unsigned int)i); std::string::basic_string<std::allocator<char>>(v6, (long long)"-> "); v4 = llama_sampler_name(v3); std::operator+<char>((long long)v7, (long long)v6, v4); std::operator+<char>((long long)v8, (long long)v7, (long long)" "); std::string::append(a1, v8); std::string::~string(v8); std::string::~string(v7); std::string::~string(v6); } return a1; }
common_sampler_print[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV R14,RSI LEA RSI,[0x1b4aee] LEA R15,[RSP + 0x58] MOV qword ptr [RSP + 0x10],RDI MOV RDX,R15 CALL 0x00127852 XOR EBP,EBP LEA R13,[RSP + 0x18] LEA R12,[RSP + 0x38] LAB_0019a1d7: MOV RDI,qword ptr [R14 + 0x140] LAB_0019a1de: CALL 0x00124f40 CMP EBP,EAX JGE 0x0019a260 MOV RDI,qword ptr [R14 + 0x140] LAB_0019a1ee: MOV ESI,EBP CALL 0x001249a0 LAB_0019a1f5: MOV RBX,RAX MOV RDI,R13 LEA RSI,[0x1bb428] LEA RDX,[RSP + 0xf] CALL 0x00127852 LAB_0019a20c: MOV RDI,RBX CALL 0x00124360 MOV RDI,R12 MOV RSI,R13 MOV RDX,RAX CALL 0x00138598 LAB_0019a222: MOV RDI,R15 MOV RSI,R12 LEA RDX,[0x1b530d] CALL 0x00138598 LAB_0019a234: MOV RDI,qword ptr [RSP + 0x10] MOV RSI,R15 CALL 0x00125120 LAB_0019a241: MOV RDI,R15 CALL 0x001251b8 MOV RDI,R12 CALL 0x001251b8 MOV RDI,R13 CALL 0x001251b8 INC EBP JMP 0x0019a1d7 LAB_0019a260: MOV RAX,qword ptr [RSP + 0x10] ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_sampler_print[abi:cxx11](common_sampler const*) */ common_sampler * common_sampler_print_abi_cxx11_(common_sampler *param_1) { int iVar1; int8 uVar2; int iVar3; long in_RSI; allocator local_99; common_sampler *local_98; string local_90 [32]; string local_70 [32]; string local_50 [32]; local_98 = param_1; std::__cxx11::string::string<std::allocator<char>> ((string *)param_1,"logits ",(allocator *)local_50); iVar3 = 0; while( true ) { /* try { // try from 0019a1de to 0019a1e2 has its CatchHandler @ 0019a296 */ iVar1 = llama_sampler_chain_n(*(int8 *)(in_RSI + 0x140)); if (iVar1 <= iVar3) break; /* try { // try from 0019a1ee to 0019a1f4 has its CatchHandler @ 0019a274 */ uVar2 = llama_sampler_chain_get(*(int8 *)(in_RSI + 0x140),iVar3); /* try { // try from 0019a1f5 to 0019a20b has its CatchHandler @ 0019a294 */ std::__cxx11::string::string<std::allocator<char>>(local_90,"-> ",&local_99); /* try { // try from 0019a20c to 0019a221 has its CatchHandler @ 0019a29b */ llama_sampler_name(uVar2); std::operator+(local_70,(char *)local_90); /* try { // try from 0019a222 to 0019a233 has its CatchHandler @ 0019a285 */ std::operator+(local_50,(char *)local_70); /* try { // try from 0019a234 to 0019a240 has its CatchHandler @ 0019a276 */ std::__cxx11::string::append((string *)local_98); std::__cxx11::string::~string(local_50); std::__cxx11::string::~string(local_70); std::__cxx11::string::~string(local_90); iVar3 = iVar3 + 1; } return local_98; }
49,465
common_sampler_print[abi:cxx11](common_sampler const*)
monkey531[P]llama/common/sampling.cpp
std::string common_sampler_print(const struct common_sampler * gsmpl) { std::string result = "logits "; for (int i = 0; i < llama_sampler_chain_n(gsmpl->chain); i++) { const auto * smpl = llama_sampler_chain_get(gsmpl->chain, i); result += std::string("-> ") + llama_sampler_name(smpl) + " "; } return result; }
O3
cpp
common_sampler_print[abi:cxx11](common_sampler const*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rsi, %r14 leaq 0x10(%rdi), %rax movq %rax, 0x8(%rsp) movq %rax, (%rdi) leaq 0x211ae(%rip), %rsi # 0xf0afe leaq 0x211ae(%rip), %rdx # 0xf0b05 movq %rdi, 0x10(%rsp) callq 0x21ce4 leaq 0x48(%rsp), %rbx xorl %ebp, %ebp leaq 0x28(%rsp), %r12 leaq 0x58(%rsp), %r13 movq 0x140(%r14), %rdi callq 0x1bf60 cmpl %eax, %ebp jge 0xcfac4 movq 0x140(%r14), %rdi movl %ebp, %esi callq 0x1b980 movq %rax, %r15 leaq 0x68(%rsp), %rax movq %rax, 0x58(%rsp) movq %r13, %rdi leaq 0x27aad(%rip), %rsi # 0xf7458 leaq 0x27aa9(%rip), %rdx # 0xf745b callq 0x21ce4 movq %r15, %rdi callq 0x1b360 movq %r13, %rdi movq %rax, %rsi callq 0x1c0d0 movq %rbx, 0x38(%rsp) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0xcf9ed movq %rdx, 0x38(%rsp) movq (%rcx), %rdx movq %rdx, 0x48(%rsp) jmp 0xcf9f3 movups (%rcx), %xmm0 movups %xmm0, (%rbx) movq 0x8(%rax), %rdx movq %rdx, 0x40(%rsp) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) leaq 0x38(%rsp), %rdi leaq 0x21906(%rip), %rsi # 0xf131d callq 0x1c0d0 movq %r12, 0x18(%rsp) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0xcfa3f movq %rdx, 0x18(%rsp) movq (%rcx), %rdx movq %rdx, 0x28(%rsp) jmp 0xcfa47 movups (%rcx), %xmm0 movups %xmm0, (%r12) movq 0x8(%rax), %rdx movq %rdx, 0x20(%rsp) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdx movq 0x10(%rsp), %rdi callq 0x1b260 movq 0x18(%rsp), %rdi cmpq %r12, %rdi je 0xcfa8a movq 0x28(%rsp), %rsi incq %rsi callq 0x1b8b0 movq 0x38(%rsp), %rdi cmpq %rbx, %rdi je 0xcfaa1 movq 0x48(%rsp), %rsi incq %rsi callq 0x1b8b0 movq 0x58(%rsp), %rdi leaq 0x68(%rsp), %rax cmpq %rax, %rdi je 0xcfabd movq 0x68(%rsp), %rsi incq %rsi callq 0x1b8b0 incl %ebp jmp 0xcf972 movq 0x10(%rsp), %rax addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0xcfb14 movq %rax, %r14 movq 0x18(%rsp), %rdi cmpq %r12, %rdi je 0xcfaf9 movq 0x28(%rsp), %rsi incq %rsi callq 0x1b8b0 jmp 0xcfaf9 movq %rax, %r14 movq 0x38(%rsp), %rdi cmpq %rbx, %rdi je 0xcfb1c movq 0x48(%rsp), %rsi incq %rsi callq 0x1b8b0 jmp 0xcfb1c jmp 0xcfb14 movq %rax, %r14 jmp 0xcfb38 movq %rax, %r14 movq 0x58(%rsp), %rdi leaq 0x68(%rsp), %rax cmpq %rax, %rdi je 0xcfb38 movq 0x68(%rsp), %rsi incq %rsi callq 0x1b8b0 movq 0x8(%rsp), %rax movq 0x10(%rsp), %rcx movq (%rcx), %rdi cmpq %rax, %rdi je 0xcfb55 movq (%rax), %rsi incq %rsi callq 0x1b8b0 movq %r14, %rdi callq 0x1bf70
_Z20common_sampler_printB5cxx11PK14common_sampler: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov r14, rsi lea rax, [rdi+10h] mov [rsp+0A8h+var_A0], rax mov [rdi], rax lea rsi, aLogits+2; "logits " lea rdx, aLogits+9; "" mov [rsp+0A8h+var_98], rdi 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 rbx, [rsp+0A8h+var_60] xor ebp, ebp lea r12, [rsp+0A8h+var_80] lea r13, [rsp+0A8h+var_50] loc_CF972: mov rdi, [r14+140h] call _llama_sampler_chain_n cmp ebp, eax jge loc_CFAC4 mov rdi, [r14+140h] mov esi, ebp call _llama_sampler_chain_get mov r15, rax lea rax, [rsp+0A8h+var_40] mov [rsp+0A8h+var_50], rax mov rdi, r13 lea rsi, asc_F7458; "-> " lea rdx, asc_F7458+3; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rdi, r15 call _llama_sampler_name mov rdi, r13 mov rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov [rsp+0A8h+var_70], rbx mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jz short loc_CF9ED mov [rsp+0A8h+var_70], rdx mov rdx, [rcx] mov [rsp+0A8h+var_60], rdx jmp short loc_CF9F3 loc_CF9ED: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rbx], xmm0 loc_CF9F3: mov rdx, [rax+8] mov [rsp+0A8h+var_68], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 lea rdi, [rsp+0A8h+var_70] lea rsi, aForMessageInMe+144h; " " call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov [rsp+0A8h+var_90], r12 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jz short loc_CFA3F mov [rsp+0A8h+var_90], rdx mov rdx, [rcx] mov [rsp+0A8h+var_80], rdx jmp short loc_CFA47 loc_CFA3F: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r12], xmm0 loc_CFA47: mov rdx, [rax+8] mov [rsp+0A8h+var_88], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov rsi, [rsp+0A8h+var_90] mov rdx, [rsp+0A8h+var_88] mov rdi, [rsp+0A8h+var_98] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rdi, [rsp+0A8h+var_90]; void * cmp rdi, r12 jz short loc_CFA8A mov rsi, [rsp+0A8h+var_80] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_CFA8A: mov rdi, [rsp+0A8h+var_70]; void * cmp rdi, rbx jz short loc_CFAA1 mov rsi, [rsp+0A8h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_CFAA1: mov rdi, [rsp+0A8h+var_50]; void * lea rax, [rsp+0A8h+var_40] cmp rdi, rax jz short loc_CFABD mov rsi, [rsp+0A8h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_CFABD: inc ebp jmp loc_CF972 loc_CFAC4: mov rax, [rsp+0A8h+var_98] add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_CFB14 mov r14, rax mov rdi, [rsp+arg_10]; void * cmp rdi, r12 jz short loc_CFAF9 mov rsi, [rsp+arg_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_CFAF9 mov r14, rax loc_CFAF9: mov rdi, [rsp+arg_30]; void * cmp rdi, rbx jz short loc_CFB1C mov rsi, [rsp+arg_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_CFB1C jmp short $+2 loc_CFB14: mov r14, rax jmp short loc_CFB38 mov r14, rax loc_CFB1C: mov rdi, [rsp+arg_50]; void * lea rax, [rsp+arg_60] cmp rdi, rax jz short loc_CFB38 mov rsi, [rsp+arg_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_CFB38: mov rax, [rsp+arg_0] mov rcx, [rsp+arg_8] mov rdi, [rcx]; void * cmp rdi, rax jz short loc_CFB55 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_CFB55: mov rdi, r14 call __Unwind_Resume
_QWORD * common_sampler_print[abi:cxx11](_QWORD *a1, long long a2) { int i; // ebp long long v3; // r15 long long v4; // rax long long v5; // rax __int128 *v6; // rcx long long v7; // rax __int128 *v8; // rcx __int128 *v10; // [rsp+18h] [rbp-90h] long long v11; // [rsp+20h] [rbp-88h] __int128 v12; // [rsp+28h] [rbp-80h] BYREF void *v13[2]; // [rsp+38h] [rbp-70h] BYREF __int128 v14; // [rsp+48h] [rbp-60h] BYREF void *v15[2]; // [rsp+58h] [rbp-50h] BYREF _QWORD v16[8]; // [rsp+68h] [rbp-40h] BYREF *a1 = a1 + 2; std::string::_M_construct<char const*>((long long)a1, "logits ", (long long)""); for ( i = 0; i < (int)llama_sampler_chain_n(*(_QWORD *)(a2 + 320)); ++i ) { v3 = llama_sampler_chain_get(*(_QWORD *)(a2 + 320), (unsigned int)i); v15[0] = v16; std::string::_M_construct<char const*>((long long)v15, "-> ", (long long)""); v4 = llama_sampler_name(v3); v5 = std::string::append(v15, v4); v13[0] = &v14; v6 = (__int128 *)(v5 + 16); if ( *(_QWORD *)v5 == v5 + 16 ) { v14 = *v6; } else { v13[0] = *(void **)v5; *(_QWORD *)&v14 = *(_QWORD *)v6; } v13[1] = *(void **)(v5 + 8); *(_QWORD *)v5 = v6; *(_QWORD *)(v5 + 8) = 0LL; *(_BYTE *)(v5 + 16) = 0; v7 = std::string::append(v13, " "); v10 = &v12; v8 = (__int128 *)(v7 + 16); if ( *(_QWORD *)v7 == v7 + 16 ) { v12 = *v8; } else { v10 = *(__int128 **)v7; *(_QWORD *)&v12 = *(_QWORD *)v8; } v11 = *(_QWORD *)(v7 + 8); *(_QWORD *)v7 = v8; *(_QWORD *)(v7 + 8) = 0LL; *(_BYTE *)(v7 + 16) = 0; std::string::_M_append(a1, v10, v11); if ( v10 != &v12 ) operator delete(v10, v12 + 1); if ( v13[0] != &v14 ) operator delete(v13[0], v14 + 1); if ( v15[0] != v16 ) operator delete(v15[0], v16[0] + 1LL); } return a1; }
common_sampler_print[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV R14,RSI LEA RAX,[RDI + 0x10] MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RDI],RAX LEA RSI,[0x1f0afe] LEA RDX,[0x1f0b05] MOV qword ptr [RSP + 0x10],RDI CALL 0x00121ce4 LEA RBX,[RSP + 0x48] XOR EBP,EBP LEA R12,[RSP + 0x28] LEA R13,[RSP + 0x58] LAB_001cf972: MOV RDI,qword ptr [R14 + 0x140] LAB_001cf979: CALL 0x0011bf60 CMP EBP,EAX JGE 0x001cfac4 MOV RDI,qword ptr [R14 + 0x140] LAB_001cf98d: MOV ESI,EBP CALL 0x0011b980 MOV R15,RAX LEA RAX,[RSP + 0x68] MOV qword ptr [RSP + 0x58],RAX LAB_001cf9a1: MOV RDI,R13 LEA RSI,[0x1f7458] LEA RDX,[0x1f745b] CALL 0x00121ce4 LAB_001cf9b7: MOV RDI,R15 CALL 0x0011b360 MOV RDI,R13 MOV RSI,RAX CALL 0x0011c0d0 MOV qword ptr [RSP + 0x38],RBX MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x001cf9ed MOV qword ptr [RSP + 0x38],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x48],RDX JMP 0x001cf9f3 LAB_001cf9ed: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RBX],XMM0 LAB_001cf9f3: MOV RDX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x40],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 LAB_001cfa0b: LEA RDI,[RSP + 0x38] LEA RSI,[0x1f131d] CALL 0x0011c0d0 MOV qword ptr [RSP + 0x18],R12 MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x001cfa3f MOV qword ptr [RSP + 0x18],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x28],RDX JMP 0x001cfa47 LAB_001cfa3f: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R12],XMM0 LAB_001cfa47: MOV RDX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x20],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] LAB_001cfa69: MOV RDI,qword ptr [RSP + 0x10] CALL 0x0011b260 LAB_001cfa73: MOV RDI,qword ptr [RSP + 0x18] CMP RDI,R12 JZ 0x001cfa8a MOV RSI,qword ptr [RSP + 0x28] INC RSI CALL 0x0011b8b0 LAB_001cfa8a: MOV RDI,qword ptr [RSP + 0x38] CMP RDI,RBX JZ 0x001cfaa1 MOV RSI,qword ptr [RSP + 0x48] INC RSI CALL 0x0011b8b0 LAB_001cfaa1: MOV RDI,qword ptr [RSP + 0x58] LEA RAX,[RSP + 0x68] CMP RDI,RAX JZ 0x001cfabd MOV RSI,qword ptr [RSP + 0x68] INC RSI CALL 0x0011b8b0 LAB_001cfabd: INC EBP JMP 0x001cf972 LAB_001cfac4: MOV RAX,qword ptr [RSP + 0x10] ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_sampler_print[abi:cxx11](common_sampler const*) */ common_sampler * common_sampler_print_abi_cxx11_(common_sampler *param_1) { int iVar1; int8 uVar2; long *plVar3; long *plVar4; int iVar5; long in_RSI; long *local_90; long local_80; long lStack_78; long *local_70; long local_68; long local_60; long lStack_58; long *local_50 [2]; long local_40 [2]; *(common_sampler **)param_1 = param_1 + 0x10; std::__cxx11::string::_M_construct<char_const*>(param_1,"logits ",""); iVar5 = 0; while( true ) { /* try { // try from 001cf979 to 001cf97d has its CatchHandler @ 001cfb14 */ iVar1 = llama_sampler_chain_n(*(int8 *)(in_RSI + 0x140)); if (iVar1 <= iVar5) break; /* try { // try from 001cf98d to 001cf993 has its CatchHandler @ 001cfad8 */ uVar2 = llama_sampler_chain_get(*(int8 *)(in_RSI + 0x140),iVar5); local_50[0] = local_40; /* try { // try from 001cf9a1 to 001cf9b6 has its CatchHandler @ 001cfb12 */ std::__cxx11::string::_M_construct<char_const*>(local_50,&DAT_001f7458,&DAT_001f745b); /* try { // try from 001cf9b7 to 001cf9c9 has its CatchHandler @ 001cfb19 */ llama_sampler_name(uVar2); plVar3 = (long *)std::__cxx11::string::append((char *)local_50); plVar4 = plVar3 + 2; if ((long *)*plVar3 == plVar4) { local_60 = *plVar4; lStack_58 = plVar3[3]; local_70 = &local_60; } else { local_60 = *plVar4; local_70 = (long *)*plVar3; } local_68 = plVar3[1]; *plVar3 = (long)plVar4; plVar3[1] = 0; *(int1 *)(plVar3 + 2) = 0; /* try { // try from 001cfa0b to 001cfa1b has its CatchHandler @ 001cfaf6 */ plVar3 = (long *)std::__cxx11::string::append((char *)&local_70); plVar4 = plVar3 + 2; if ((long *)*plVar3 == plVar4) { local_80 = *plVar4; lStack_78 = plVar3[3]; local_90 = &local_80; } else { local_80 = *plVar4; local_90 = (long *)*plVar3; } *plVar3 = (long)plVar4; plVar3[1] = 0; *(int1 *)(plVar3 + 2) = 0; /* try { // try from 001cfa69 to 001cfa72 has its CatchHandler @ 001cfada */ std::__cxx11::string::_M_append((char *)param_1,(ulong)local_90); if (local_90 != &local_80) { operator_delete(local_90,local_80 + 1); } if (local_70 != &local_60) { operator_delete(local_70,local_60 + 1); } if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } iVar5 = iVar5 + 1; } return param_1; }
49,466
gc_scan_incref_child
bluesky950520[P]quickjs/quickjs.c
static void gc_scan_incref_child(JSRuntime *rt, JSGCObjectHeader *p) { p->ref_count++; if (p->ref_count == 1) { /* ref_count was 0: remove from tmp_obj_list and add at the end of gc_obj_list */ list_del(&p->link); list_add_tail(&p->link, &rt->gc_obj_list); p->mark = 0; /* reset the mark for the next GC call */ } }
O0
c
gc_scan_incref_child: subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq %rsi, 0x8(%rsp) movq 0x8(%rsp), %rax movl (%rax), %ecx addl $0x1, %ecx movl %ecx, (%rax) movq 0x8(%rsp), %rax cmpl $0x1, (%rax) jne 0x65f7d movq 0x8(%rsp), %rdi addq $0x8, %rdi callq 0x29f20 movq 0x8(%rsp), %rdi addq $0x8, %rdi movq 0x10(%rsp), %rsi addq $0x98, %rsi callq 0x29d40 movq 0x8(%rsp), %rax movb 0x4(%rax), %cl andb $0xf, %cl orb $0x0, %cl movb %cl, 0x4(%rax) addq $0x18, %rsp retq nopw %cs:(%rax,%rax)
gc_scan_incref_child: sub rsp, 18h mov [rsp+18h+var_8], rdi mov [rsp+18h+var_10], rsi mov rax, [rsp+18h+var_10] mov ecx, [rax] add ecx, 1 mov [rax], ecx mov rax, [rsp+18h+var_10] cmp dword ptr [rax], 1 jnz short loc_65F7D mov rdi, [rsp+18h+var_10] add rdi, 8 call list_del_1 mov rdi, [rsp+18h+var_10] add rdi, 8 mov rsi, [rsp+18h+var_8] add rsi, 98h call list_add_tail_1 mov rax, [rsp+18h+var_10] mov cl, [rax+4] and cl, 0Fh or cl, 0 mov [rax+4], cl loc_65F7D: add rsp, 18h retn
long long gc_scan_incref_child(long long a1, long long a2) { long long result; // rax ++*(_DWORD *)a2; result = a2; if ( *(_DWORD *)a2 == 1 ) { list_del_1((_QWORD *)(a2 + 8)); list_add_tail_1(a2 + 8, (_QWORD *)(a1 + 152)); result = a2; *(_BYTE *)(a2 + 4) &= 0xFu; } return result; }
gc_scan_incref_child: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV qword ptr [RSP + 0x8],RSI MOV RAX,qword ptr [RSP + 0x8] MOV ECX,dword ptr [RAX] ADD ECX,0x1 MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RSP + 0x8] CMP dword ptr [RAX],0x1 JNZ 0x00165f7d MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x8 CALL 0x00129f20 MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x8 MOV RSI,qword ptr [RSP + 0x10] ADD RSI,0x98 CALL 0x00129d40 MOV RAX,qword ptr [RSP + 0x8] MOV CL,byte ptr [RAX + 0x4] AND CL,0xf OR CL,0x0 MOV byte ptr [RAX + 0x4],CL LAB_00165f7d: ADD RSP,0x18 RET
void gc_scan_incref_child(long param_1,int *param_2) { *param_2 = *param_2 + 1; if (*param_2 == 1) { list_del(param_2 + 2); list_add_tail(param_2 + 2,param_1 + 0x98); *(byte *)(param_2 + 1) = *(byte *)(param_2 + 1) & 0xf; } return; }
49,467
gc_scan_incref_child
bluesky950520[P]quickjs/quickjs.c
static void gc_scan_incref_child(JSRuntime *rt, JSGCObjectHeader *p) { p->ref_count++; if (p->ref_count == 1) { /* ref_count was 0: remove from tmp_obj_list and add at the end of gc_obj_list */ list_del(&p->link); list_add_tail(&p->link, &rt->gc_obj_list); p->mark = 0; /* reset the mark for the next GC call */ } }
O2
c
gc_scan_incref_child: movl (%rsi), %eax leal 0x1(%rax), %ecx movl %ecx, (%rsi) testl %eax, %eax je 0x3986e retq leaq 0x8(%rsi), %rax movq 0x8(%rsi), %rcx movq 0x10(%rsi), %rdx movq %rdx, 0x8(%rcx) movq %rcx, (%rdx) xorps %xmm0, %xmm0 movups %xmm0, 0x8(%rsi) leaq 0x98(%rdi), %rcx movq 0x98(%rdi), %rdx movq %rax, 0x8(%rdx) movq %rdx, 0x8(%rsi) movq %rcx, 0x10(%rsi) movq %rax, 0x98(%rdi) andb $0xf, 0x4(%rsi) retq
gc_scan_incref_child: mov eax, [rsi] lea ecx, [rax+1] mov [rsi], ecx test eax, eax jz short loc_3986E retn loc_3986E: lea rax, [rsi+8] mov rcx, [rsi+8] mov rdx, [rsi+10h] mov [rcx+8], rdx mov [rdx], rcx xorps xmm0, xmm0 movups xmmword ptr [rsi+8], xmm0 lea rcx, [rdi+98h] mov rdx, [rdi+98h] mov [rdx+8], rax mov [rsi+8], rdx mov [rsi+10h], rcx mov [rdi+98h], rax and byte ptr [rsi+4], 0Fh retn
unsigned int * gc_scan_incref_child(long long a1, unsigned int *a2) { unsigned int *result; // rax long long v3; // rcx _QWORD *v4; // rdx long long v5; // rdx result = (unsigned int *)*a2; *a2 = (_DWORD)result + 1; if ( !(_DWORD)result ) { result = a2 + 2; v3 = *((_QWORD *)a2 + 1); v4 = (_QWORD *)*((_QWORD *)a2 + 2); *(_QWORD *)(v3 + 8) = v4; *v4 = v3; *(_OWORD *)(a2 + 2) = 0LL; v5 = *(_QWORD *)(a1 + 152); *(_QWORD *)(v5 + 8) = a2 + 2; *((_QWORD *)a2 + 1) = v5; *((_QWORD *)a2 + 2) = a1 + 152; *(_QWORD *)(a1 + 152) = a2 + 2; *((_BYTE *)a2 + 4) &= 0xFu; } return result; }
gc_scan_incref_child: MOV EAX,dword ptr [RSI] LEA ECX,[RAX + 0x1] MOV dword ptr [RSI],ECX TEST EAX,EAX JZ 0x0013986e RET LAB_0013986e: LEA RAX,[RSI + 0x8] MOV RCX,qword ptr [RSI + 0x8] MOV RDX,qword ptr [RSI + 0x10] MOV qword ptr [RCX + 0x8],RDX MOV qword ptr [RDX],RCX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSI + 0x8],XMM0 LEA RCX,[RDI + 0x98] MOV RDX,qword ptr [RDI + 0x98] MOV qword ptr [RDX + 0x8],RAX MOV qword ptr [RSI + 0x8],RDX MOV qword ptr [RSI + 0x10],RCX MOV qword ptr [RDI + 0x98],RAX AND byte ptr [RSI + 0x4],0xf RET
void gc_scan_incref_child(long param_1,int *param_2) { int iVar1; long lVar2; long *plVar3; iVar1 = *param_2; *param_2 = iVar1 + 1; if (iVar1 != 0) { return; } lVar2 = *(long *)(param_2 + 2); plVar3 = *(long **)(param_2 + 4); *(long **)(lVar2 + 8) = plVar3; *plVar3 = lVar2; param_2[2] = 0; param_2[3] = 0; param_2[4] = 0; param_2[5] = 0; lVar2 = *(long *)(param_1 + 0x98); *(int **)(lVar2 + 8) = param_2 + 2; *(long *)(param_2 + 2) = lVar2; *(long *)(param_2 + 4) = param_1 + 0x98; *(int **)(param_1 + 0x98) = param_2 + 2; *(byte *)(param_2 + 1) = *(byte *)(param_2 + 1) & 0xf; return; }
49,468
my_thread_global_reinit
eloqsql/mysys/my_thr_init.c
void my_thread_global_reinit(void) { struct st_my_thread_var *tmp; DBUG_ASSERT(my_thread_global_init_done); #ifdef HAVE_PSI_INTERFACE my_init_mysys_psi_keys(); #endif my_thread_destroy_common_mutex(); my_thread_init_common_mutex(); my_thread_destroy_internal_mutex(); my_thread_init_internal_mutex(); tmp= my_thread_var; DBUG_ASSERT(tmp); my_thread_destory_thr_mutex(tmp); my_thread_init_thr_mutex(tmp); }
O0
c
my_thread_global_reinit: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp jmp 0x1223aa callq 0x11eb40 callq 0x122250 callq 0x1223f0 callq 0x122300 callq 0x1224c0 callq 0x122520 movq %rax, -0x8(%rbp) jmp 0x1223ce movq -0x8(%rbp), %rdi callq 0x122540 movq -0x8(%rbp), %rdi callq 0x122570 addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_thread_global_reinit: push rbp mov rbp, rsp sub rsp, 10h jmp short $+2 loc_1223AA: call my_init_mysys_psi_keys call my_thread_destroy_common_mutex call my_thread_init_common_mutex call my_thread_destroy_internal_mutex call my_thread_init_internal_mutex call _my_thread_var mov [rbp+var_8], rax jmp short $+2 loc_1223CE: mov rdi, [rbp+var_8] call my_thread_destory_thr_mutex mov rdi, [rbp+var_8] call my_thread_init_thr_mutex add rsp, 10h pop rbp retn
long long my_thread_global_reinit(long long a1, long long a2) { long long v2; // rdx long long v3; // rcx long long v4; // r8 long long v5; // r9 long long v7; // [rsp+8h] [rbp-8h] my_init_mysys_psi_keys(); my_thread_destroy_common_mutex(); my_thread_init_common_mutex(); my_thread_destroy_internal_mutex(); my_thread_init_internal_mutex(); v7 = my_thread_var(a1, a2, v2, v3, v4, v5); my_thread_destory_thr_mutex(v7); return my_thread_init_thr_mutex(v7); }
49,469
my_thread_global_reinit
eloqsql/mysys/my_thr_init.c
void my_thread_global_reinit(void) { struct st_my_thread_var *tmp; DBUG_ASSERT(my_thread_global_init_done); #ifdef HAVE_PSI_INTERFACE my_init_mysys_psi_keys(); #endif my_thread_destroy_common_mutex(); my_thread_init_common_mutex(); my_thread_destroy_internal_mutex(); my_thread_init_internal_mutex(); tmp= my_thread_var; DBUG_ASSERT(tmp); my_thread_destory_thr_mutex(tmp); my_thread_init_thr_mutex(tmp); }
O3
c
my_thread_global_reinit: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax callq 0xbec6b callq 0xc1078 callq 0xc12b2 callq 0xc11db callq 0xc143f leaq 0xb70092(%rip), %rax # 0xc31324 movl (%rax), %edi callq 0x2a930 movq %rax, %rbx movq %rax, %rdi callq 0xc1501 movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %rbp jmp 0xc156b
my_thread_global_reinit: push rbp mov rbp, rsp push rbx push rax call my_init_mysys_psi_keys call my_thread_destroy_common_mutex call my_thread_init_common_mutex call my_thread_destroy_internal_mutex call my_thread_init_internal_mutex lea rax, THR_KEY_mysys mov edi, [rax] call _pthread_getspecific mov rbx, rax mov rdi, rax call my_thread_destory_thr_mutex mov rdi, rbx add rsp, 8 pop rbx pop rbp jmp my_thread_init_thr_mutex
long long my_thread_global_reinit(long long a1) { long long v1; // rbx my_init_mysys_psi_keys(a1); my_thread_destroy_common_mutex(); my_thread_init_common_mutex(); my_thread_destroy_internal_mutex(); my_thread_init_internal_mutex(); v1 = pthread_getspecific(THR_KEY_mysys); my_thread_destory_thr_mutex(v1); return my_thread_init_thr_mutex(v1); }
my_thread_global_reinit: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX CALL 0x001bec6b CALL 0x001c1078 CALL 0x001c12b2 CALL 0x001c11db CALL 0x001c143f LEA RAX,[0xd31324] MOV EDI,dword ptr [RAX] CALL 0x0012a930 MOV RBX,RAX MOV RDI,RAX CALL 0x001c1501 MOV RDI,RBX ADD RSP,0x8 POP RBX POP RBP JMP 0x001c156b
void my_thread_global_reinit(void) { void *pvVar1; my_init_mysys_psi_keys(); my_thread_destroy_common_mutex(); my_thread_init_common_mutex(); my_thread_destroy_internal_mutex(); my_thread_init_internal_mutex(); pvVar1 = pthread_getspecific(THR_KEY_mysys); my_thread_destory_thr_mutex(pvVar1); my_thread_init_thr_mutex(pvVar1); return; }
49,470
JS_SetUncatchableError
bluesky950520[P]quickjs/quickjs.c
void JS_SetUncatchableError(JSContext *ctx, JSValue val, BOOL flag) { JSObject *p; if (JS_VALUE_GET_TAG(val) != JS_TAG_OBJECT) return; p = JS_VALUE_GET_OBJ(val); if (p->class_id == JS_CLASS_ERROR) p->is_uncatchable_error = flag; }
O2
c
JS_SetUncatchableError: cmpl $-0x1, %edx jne 0x211bb cmpw $0x3, 0x6(%rsi) jne 0x211bb movb 0x5(%rsi), %al shlb $0x5, %cl andb $0x20, %cl andb $-0x21, %al orb %cl, %al movb %al, 0x5(%rsi) retq
JS_SetUncatchableError: cmp edx, 0FFFFFFFFh jnz short locret_211BB cmp word ptr [rsi+6], 3 jnz short locret_211BB mov al, [rsi+5] shl cl, 5 and cl, 20h and al, 0DFh or al, cl mov [rsi+5], al locret_211BB: retn
char JS_SetUncatchableError(long long a1, long long a2, int a3, char a4) { char result; // al if ( a3 == -1 && *(_WORD *)(a2 + 6) == 3 ) { result = (32 * a4) & 0x20 | *(_BYTE *)(a2 + 5) & 0xDF; *(_BYTE *)(a2 + 5) = result; } return result; }
JS_SetUncatchableError: CMP EDX,-0x1 JNZ 0x001211bb CMP word ptr [RSI + 0x6],0x3 JNZ 0x001211bb MOV AL,byte ptr [RSI + 0x5] SHL CL,0x5 AND CL,0x20 AND AL,0xdf OR AL,CL MOV byte ptr [RSI + 0x5],AL LAB_001211bb: RET
void JS_SetUncatchableError(int8 param_1,long param_2,int param_3,byte param_4) { if ((param_3 == -1) && (*(short *)(param_2 + 6) == 3)) { *(byte *)(param_2 + 5) = *(byte *)(param_2 + 5) & 0xdf | (param_4 & 1) << 5; } return; }
49,471
my_chsize
eloqsql/mysys/my_chsize.c
int my_chsize(File fd, my_off_t newlength, int filler, myf MyFlags) { my_off_t oldsize; uchar buff[IO_SIZE]; DBUG_ENTER("my_chsize"); DBUG_PRINT("my",("fd: %d length: %lu MyFlags: %lu",fd,(ulong) newlength, MyFlags)); if ((oldsize= my_seek(fd, 0L, MY_SEEK_END, MYF(MY_WME+MY_FAE))) == newlength) DBUG_RETURN(0); DBUG_PRINT("info",("old_size: %ld", (ulong) oldsize)); if (oldsize > newlength) { #ifdef _WIN32 if (my_win_chsize(fd, newlength)) { my_errno= errno; goto err; } DBUG_RETURN(0); #elif defined(HAVE_FTRUNCATE) if (ftruncate(fd, (off_t) newlength)) { my_errno= errno; goto err; } DBUG_RETURN(0); #else /* Fill space between requested length and true length with 'filler' We should never come here on any modern machine */ if (my_seek(fd, newlength, MY_SEEK_SET, MYF(MY_WME+MY_FAE)) == MY_FILEPOS_ERROR) { goto err; } swap_variables(my_off_t, newlength, oldsize); #endif } /* Full file with 'filler' until it's as big as requested */ bfill(buff, IO_SIZE, filler); while (newlength-oldsize > IO_SIZE) { if (my_write(fd, buff, IO_SIZE, MYF(MY_NABP))) goto err; oldsize+= IO_SIZE; } if (my_write(fd,buff,(size_t) (newlength-oldsize), MYF(MY_NABP))) goto err; DBUG_RETURN(0); err: DBUG_PRINT("error", ("errno: %d", errno)); if (MyFlags & MY_WME) my_error(EE_CANT_CHSIZE, MYF(ME_BELL), my_errno); DBUG_RETURN(1); }
O3
c
my_chsize: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1018, %rsp # imm = 0x1018 movq %rcx, -0x1038(%rbp) movl %edx, %r13d movq %rsi, %r14 movl %edi, %r15d movq %fs:0x28, %rax movq %rax, -0x30(%rbp) xorl %ebx, %ebx movl $0x18, %ecx xorl %esi, %esi movl $0x2, %edx callq 0xa0b30 movq %r14, %r12 subq %rax, %r12 je 0x9dc99 jae 0x9dc09 movl %r15d, %edi movq %r14, %rsi callq 0x294f0 testl %eax, %eax je 0x9dc99 callq 0x29790 movl (%rax), %ebx callq 0xa1ab2 movl %ebx, (%rax) jmp 0x9dc73 leaq -0x1030(%rbp), %rdi movl $0x1000, %edx # imm = 0x1000 movl %r13d, %esi callq 0x292a0 cmpq $0x1001, %r12 # imm = 0x1001 jb 0x9dc57 leaq -0x1030(%rbp), %r13 movl $0x1000, %edx # imm = 0x1000 movl $0x4, %ecx movl %r15d, %edi movq %r13, %rsi callq 0x2efe4 testq %rax, %rax jne 0x9dc73 addq $-0x1000, %r12 # imm = 0xF000 cmpq $0x1001, %r12 # imm = 0x1001 jae 0x9dc2d leaq -0x1030(%rbp), %rsi movl $0x4, %ecx movl %r15d, %edi movq %r12, %rdx callq 0x2efe4 testq %rax, %rax je 0x9dc99 movl $0x1, %ebx testb $0x10, -0x1038(%rbp) je 0x9dc99 callq 0xa1ab2 movl (%rax), %edx movl $0x4, %esi movl $0xe, %edi xorl %eax, %eax callq 0x9dfc3 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x9dcbc movl %ebx, %eax addq $0x1018, %rsp # imm = 0x1018 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29250 nopl (%rax)
my_chsize: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 1018h mov [rbp+var_1038], rcx mov r13d, edx mov r14, rsi mov r15d, edi mov rax, fs:28h mov [rbp+var_30], rax xor ebx, ebx mov ecx, 18h xor esi, esi mov edx, 2 call my_seek mov r12, r14 sub r12, rax jz loc_9DC99 jnb short loc_9DC09 mov edi, r15d mov rsi, r14 call _ftruncate64 test eax, eax jz loc_9DC99 call ___errno_location mov ebx, [rax] call _my_thread_var mov [rax], ebx jmp short loc_9DC73 loc_9DC09: lea rdi, [rbp+var_1030] mov edx, 1000h mov esi, r13d call _memset cmp r12, 1001h jb short loc_9DC57 lea r13, [rbp+var_1030] loc_9DC2D: mov edx, 1000h mov ecx, 4 mov edi, r15d mov rsi, r13 call my_write test rax, rax jnz short loc_9DC73 add r12, 0FFFFFFFFFFFFF000h cmp r12, 1001h jnb short loc_9DC2D loc_9DC57: lea rsi, [rbp+var_1030] mov ecx, 4 mov edi, r15d mov rdx, r12 call my_write test rax, rax jz short loc_9DC99 loc_9DC73: mov ebx, 1 test byte ptr [rbp+var_1038], 10h jz short loc_9DC99 call _my_thread_var mov edx, [rax] mov esi, 4 mov edi, 0Eh xor eax, eax call my_error loc_9DC99: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_9DCBC mov eax, ebx add rsp, 1018h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_9DCBC: call ___stack_chk_fail
long long my_chsize(long long a1, unsigned long long a2, unsigned int a3, char a4) { unsigned int v5; // r15d unsigned int v6; // ebx unsigned long long v7; // rax unsigned long long v8; // r12 int v9; // ebx _DWORD *v10; // rax int v11; // ecx int v12; // r8d int v13; // r9d _BYTE v16[4096]; // [rsp+10h] [rbp-1030h] BYREF unsigned long long v17; // [rsp+1010h] [rbp-30h] v5 = a1; v17 = __readfsqword(0x28u); v6 = 0; v7 = my_seek(a1, 0LL, 2LL, 24LL); v8 = a2 - v7; if ( a2 != v7 ) { if ( a2 >= v7 ) { memset(v16, a3, sizeof(v16)); if ( v8 < 0x1001 ) { LABEL_8: a1 = v5; if ( !my_write(v5, (long long)v16, v8, 4LL) ) return v6; } else { while ( 1 ) { a1 = v5; if ( my_write(v5, (long long)v16, 4096LL, 4LL) ) break; v8 -= 4096LL; if ( v8 < 0x1001 ) goto LABEL_8; } } } else { a1 = (unsigned int)a1; if ( !(unsigned int)ftruncate64((unsigned int)a1, a2) ) return v6; v9 = *(_DWORD *)__errno_location((unsigned int)a1); *(_DWORD *)my_thread_var((unsigned int)a1) = v9; } v6 = 1; if ( (a4 & 0x10) != 0 ) { v10 = (_DWORD *)my_thread_var(a1); my_error(14, 4, *v10, v11, v12, v13); } } return v6; }
my_chsize: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1018 MOV qword ptr [RBP + -0x1038],RCX MOV R13D,EDX MOV R14,RSI MOV R15D,EDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX XOR EBX,EBX MOV ECX,0x18 XOR ESI,ESI MOV EDX,0x2 CALL 0x001a0b30 MOV R12,R14 SUB R12,RAX JZ 0x0019dc99 JNC 0x0019dc09 MOV EDI,R15D MOV RSI,R14 CALL 0x001294f0 TEST EAX,EAX JZ 0x0019dc99 CALL 0x00129790 MOV EBX,dword ptr [RAX] CALL 0x001a1ab2 MOV dword ptr [RAX],EBX JMP 0x0019dc73 LAB_0019dc09: LEA RDI,[RBP + -0x1030] MOV EDX,0x1000 MOV ESI,R13D CALL 0x001292a0 CMP R12,0x1001 JC 0x0019dc57 LEA R13,[RBP + -0x1030] LAB_0019dc2d: MOV EDX,0x1000 MOV ECX,0x4 MOV EDI,R15D MOV RSI,R13 CALL 0x0012efe4 TEST RAX,RAX JNZ 0x0019dc73 ADD R12,-0x1000 CMP R12,0x1001 JNC 0x0019dc2d LAB_0019dc57: LEA RSI,[RBP + -0x1030] MOV ECX,0x4 MOV EDI,R15D MOV RDX,R12 CALL 0x0012efe4 TEST RAX,RAX JZ 0x0019dc99 LAB_0019dc73: MOV EBX,0x1 TEST byte ptr [RBP + -0x1038],0x10 JZ 0x0019dc99 CALL 0x001a1ab2 MOV EDX,dword ptr [RAX] MOV ESI,0x4 MOV EDI,0xe XOR EAX,EAX CALL 0x0019dfc3 LAB_0019dc99: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0019dcbc MOV EAX,EBX ADD RSP,0x1018 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0019dcbc: CALL 0x00129250
int8 my_chsize(ulong param_1,ulong param_2,int param_3,ulong param_4) { int iVar1; ulong uVar2; int *piVar3; long lVar4; int4 *puVar5; int8 uVar6; ulong uVar7; long in_FS_OFFSET; int1 local_1038 [4096]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); uVar6 = 0; uVar2 = my_seek(param_1,0,2,0x18); uVar7 = param_2 - uVar2; if (uVar7 != 0) { if (param_2 < uVar2) { iVar1 = ftruncate64((int)param_1,param_2); if (iVar1 == 0) goto LAB_0019dc99; piVar3 = __errno_location(); iVar1 = *piVar3; piVar3 = (int *)_my_thread_var(); *piVar3 = iVar1; } else { memset(local_1038,param_3,0x1000); if (0x1000 < uVar7) { do { lVar4 = my_write(param_1 & 0xffffffff,local_1038,0x1000,4); if (lVar4 != 0) goto LAB_0019dc73; uVar7 = uVar7 - 0x1000; } while (0x1000 < uVar7); } lVar4 = my_write(param_1 & 0xffffffff,local_1038,uVar7,4); if (lVar4 == 0) goto LAB_0019dc99; } LAB_0019dc73: uVar6 = 1; if ((param_4 & 0x10) != 0) { puVar5 = (int4 *)_my_thread_var(); my_error(0xe,4,*puVar5); } } LAB_0019dc99: if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return uVar6; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
49,472
mi_store_blob_length
eloqsql/storage/myisam/mi_dynrec.c
void _mi_store_blob_length(uchar *pos,uint pack_length,uint length) { switch (pack_length) { case 1: *pos= (uchar) length; break; case 2: int2store(pos,length); break; case 3: int3store(pos,length); break; case 4: int4store(pos,length); default: break; } return; }
O0
c
mi_store_blob_length: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl %edx, -0x10(%rbp) movl -0xc(%rbp), %eax decl %eax movl %eax, %ecx movq %rcx, -0x28(%rbp) subl $0x3, %eax ja 0x3172a movq -0x28(%rbp), %rax leaq 0xace2f(%rip), %rcx # 0xde4e8 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movl -0x10(%rbp), %eax movb %al, %cl movq -0x8(%rbp), %rax movb %cl, (%rax) jmp 0x3172c jmp 0x316d1 movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) movl -0x10(%rbp), %eax movw %ax, %cx movq -0x18(%rbp), %rax movw %cx, (%rax) jmp 0x3172c jmp 0x316ea movl -0x10(%rbp), %eax movb %al, %cl movq -0x8(%rbp), %rax movb %cl, (%rax) movl -0x10(%rbp), %eax shrl $0x8, %eax movb %al, %cl movq -0x8(%rbp), %rax movb %cl, 0x1(%rax) movl -0x10(%rbp), %eax shrl $0x10, %eax movb %al, %cl movq -0x8(%rbp), %rax movb %cl, 0x2(%rax) jmp 0x3172c jmp 0x31717 movq -0x8(%rbp), %rax movq %rax, -0x20(%rbp) movl -0x10(%rbp), %ecx movq -0x20(%rbp), %rax movl %ecx, (%rax) jmp 0x3172a jmp 0x3172c popq %rbp retq nop
_mi_store_blob_length: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_10], edx mov eax, [rbp+var_C] dec eax; switch 4 cases mov ecx, eax mov [rbp+var_28], rcx sub eax, 3 ja short def_316C0; jumptable 00000000000316C0 default case mov rax, [rbp+var_28] lea rcx, jpt_316C0 movsxd rax, ds:(jpt_316C0 - 0DE4E8h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_316C2: mov eax, [rbp+var_10]; jumptable 00000000000316C0 case 1 mov cl, al mov rax, [rbp+var_8] mov [rax], cl jmp short loc_3172C loc_316CF: jmp short $+2; jumptable 00000000000316C0 case 2 loc_316D1: mov rax, [rbp+var_8] mov [rbp+var_18], rax mov eax, [rbp+var_10] mov cx, ax mov rax, [rbp+var_18] mov [rax], cx jmp short loc_3172C loc_316E8: jmp short $+2; jumptable 00000000000316C0 case 3 loc_316EA: mov eax, [rbp+var_10] mov cl, al mov rax, [rbp+var_8] mov [rax], cl mov eax, [rbp+var_10] shr eax, 8 mov cl, al mov rax, [rbp+var_8] mov [rax+1], cl mov eax, [rbp+var_10] shr eax, 10h mov cl, al mov rax, [rbp+var_8] mov [rax+2], cl jmp short loc_3172C loc_31715: jmp short $+2; jumptable 00000000000316C0 case 4 loc_31717: mov rax, [rbp+var_8] mov [rbp+var_20], rax mov ecx, [rbp+var_10] mov rax, [rbp+var_20] mov [rax], ecx jmp short $+2; jumptable 00000000000316C0 default case def_316C0: jmp short $+2; jumptable 00000000000316C0 default case loc_3172C: pop rbp retn
unsigned long long mi_store_blob_length(_BYTE *a1, int a2, int a3) { unsigned long long result; // rax result = (unsigned int)(a2 - 1); switch ( a2 ) { case 1: result = (unsigned long long)a1; *a1 = a3; break; case 2: result = (unsigned long long)a1; *(_WORD *)a1 = a3; break; case 3: *(_WORD *)a1 = a3; result = (unsigned long long)a1; a1[2] = BYTE2(a3); break; case 4: result = (unsigned long long)a1; *(_DWORD *)a1 = a3; break; default: return result; } return result; }
_mi_store_blob_length: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV dword ptr [RBP + -0x10],EDX MOV EAX,dword ptr [RBP + -0xc] DEC EAX MOV ECX,EAX MOV qword ptr [RBP + -0x28],RCX SUB EAX,0x3 JA 0x0013172a MOV RAX,qword ptr [RBP + -0x28] LEA RCX,[0x1de4e8] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: MOV EAX,dword ptr [RBP + -0x10] MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX],CL JMP 0x0013172c caseD_2: JMP 0x001316d1 LAB_001316d1: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RAX MOV EAX,dword ptr [RBP + -0x10] MOV CX,AX MOV RAX,qword ptr [RBP + -0x18] MOV word ptr [RAX],CX JMP 0x0013172c caseD_3: JMP 0x001316ea LAB_001316ea: MOV EAX,dword ptr [RBP + -0x10] MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX],CL MOV EAX,dword ptr [RBP + -0x10] SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x1],CL MOV EAX,dword ptr [RBP + -0x10] SHR EAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x2],CL JMP 0x0013172c caseD_4: JMP 0x00131717 LAB_00131717: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x20],RAX MOV ECX,dword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],ECX JMP 0x0013172a LAB_0013172a: JMP 0x0013172c default: POP RBP RET
void _mi_store_blob_length(int4 *param_1,int4 param_2,int4 param_3) { switch(param_2) { case 1: *(char *)param_1 = (char)param_3; break; case 2: *(short *)param_1 = (short)param_3; break; case 3: *(char *)param_1 = (char)param_3; *(char *)((long)param_1 + 1) = (char)((uint)param_3 >> 8); *(char *)((long)param_1 + 2) = (char)((uint)param_3 >> 0x10); break; case 4: *param_1 = param_3; } return; }
49,473
my_strnncollsp_tis620
eloqsql/strings/ctype-tis620.c
static int my_strnncollsp_tis620(CHARSET_INFO * cs __attribute__((unused)), const uchar *a0, size_t a_length, const uchar *b0, size_t b_length) { uchar buf[80], *end, *a, *b, *alloced= NULL; size_t length; int res= 0; a= buf; if ((a_length + b_length +2) > (int) sizeof(buf)) alloced= a= (uchar*) my_malloc(PSI_INSTRUMENT_ME, a_length+b_length+2, MYF(MY_FAE)); b= a + a_length+1; if (a_length) memcpy((char*) a, (char*) a0, a_length); a[a_length]= 0; /* if length(a0)> len1, need to put 'end of string' */ if (b_length) memcpy((char *)b, (char *)b0, b_length); b[b_length]= 0; /* put end of string */ a_length= thai2sortable(a, a_length); b_length= thai2sortable(b, b_length); end= a + (length= MY_MIN(a_length, b_length)); while (a < end) { if (*a++ != *b++) { res= ((int) a[-1] - (int) b[-1]); goto ret; } } res= a_length == b_length ? 0 : a_length < b_length ? -my_strnncollsp_padspace_bin(b, b_length - length) : my_strnncollsp_padspace_bin(a, a_length - length); ret: if (alloced) my_free(alloced); return res; }
O0
c
my_strnncollsp_tis620: pushq %rbp movq %rsp, %rbp subq $0xe0, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x68(%rbp) movq %rsi, -0x70(%rbp) movq %rdx, -0x78(%rbp) movq %rcx, -0x80(%rbp) movq %r8, -0x88(%rbp) movq $0x0, -0xa8(%rbp) movl $0x0, -0xb4(%rbp) leaq -0x60(%rbp), %rax movq %rax, -0x98(%rbp) movq -0x78(%rbp), %rax addq -0x88(%rbp), %rax addq $0x2, %rax cmpq $0x50, %rax jbe 0x484ad movq -0x78(%rbp), %rsi addq -0x88(%rbp), %rsi addq $0x2, %rsi xorl %edi, %edi movl $0x8, %edx callq 0x2f560 movq %rax, -0x98(%rbp) movq %rax, -0xa8(%rbp) movq -0x98(%rbp), %rax addq -0x78(%rbp), %rax addq $0x1, %rax movq %rax, -0xa0(%rbp) cmpq $0x0, -0x78(%rbp) je 0x484de movq -0x98(%rbp), %rdi movq -0x70(%rbp), %rsi movq -0x78(%rbp), %rdx callq 0x24230 movq -0x98(%rbp), %rax movq -0x78(%rbp), %rcx movb $0x0, (%rax,%rcx) cmpq $0x0, -0x88(%rbp) je 0x4850e movq -0xa0(%rbp), %rdi movq -0x80(%rbp), %rsi movq -0x88(%rbp), %rdx callq 0x24230 movq -0xa0(%rbp), %rax movq -0x88(%rbp), %rcx movb $0x0, (%rax,%rcx) movq -0x98(%rbp), %rdi movq -0x78(%rbp), %rsi callq 0x48810 movq %rax, -0x78(%rbp) movq -0xa0(%rbp), %rdi movq -0x88(%rbp), %rsi callq 0x48810 movq %rax, -0x88(%rbp) movq -0x98(%rbp), %rax movq %rax, -0xc0(%rbp) movq -0x78(%rbp), %rax cmpq -0x88(%rbp), %rax jae 0x48576 movq -0x78(%rbp), %rax movq %rax, -0xc8(%rbp) jmp 0x48584 movq -0x88(%rbp), %rax movq %rax, -0xc8(%rbp) movq -0xc0(%rbp), %rax movq -0xc8(%rbp), %rcx movq %rcx, -0xb0(%rbp) addq %rcx, %rax movq %rax, -0x90(%rbp) movq -0x98(%rbp), %rax cmpq -0x90(%rbp), %rax jae 0x4860c movq -0x98(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x98(%rbp) movzbl (%rax), %eax movq -0xa0(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0xa0(%rbp) movzbl (%rcx), %ecx cmpl %ecx, %eax je 0x4860a movq -0x98(%rbp), %rax movzbl -0x1(%rax), %eax movq -0xa0(%rbp), %rcx movzbl -0x1(%rcx), %ecx subl %ecx, %eax movl %eax, -0xb4(%rbp) jmp 0x4868d jmp 0x485a3 movq -0x78(%rbp), %rax cmpq -0x88(%rbp), %rax jne 0x48623 xorl %eax, %eax movl %eax, -0xcc(%rbp) jmp 0x48681 movq -0x78(%rbp), %rax cmpq -0x88(%rbp), %rax jae 0x48658 movq -0xa0(%rbp), %rdi movq -0x88(%rbp), %rsi subq -0xb0(%rbp), %rsi callq 0x36710 movl %eax, %ecx xorl %eax, %eax subl %ecx, %eax movl %eax, -0xd0(%rbp) jmp 0x48675 movq -0x98(%rbp), %rdi movq -0x78(%rbp), %rsi subq -0xb0(%rbp), %rsi callq 0x36710 movl %eax, -0xd0(%rbp) movl -0xd0(%rbp), %eax movl %eax, -0xcc(%rbp) movl -0xcc(%rbp), %eax movl %eax, -0xb4(%rbp) cmpq $0x0, -0xa8(%rbp) je 0x486a3 movq -0xa8(%rbp), %rdi callq 0x2f8e0 movl -0xb4(%rbp), %eax movl %eax, -0xd4(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x486d0 movl -0xd4(%rbp), %eax addq $0xe0, %rsp popq %rbp retq callq 0x24320 nopw %cs:(%rax,%rax)
my_strnncollsp_tis620: push rbp mov rbp, rsp sub rsp, 0E0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_68], rdi mov [rbp+var_70], rsi mov [rbp+var_78], rdx mov [rbp+var_80], rcx mov [rbp+var_88], r8 mov [rbp+var_A8], 0 mov [rbp+var_B4], 0 lea rax, [rbp+var_60] mov [rbp+var_98], rax mov rax, [rbp+var_78] add rax, [rbp+var_88] add rax, 2 cmp rax, 50h ; 'P' jbe short loc_484AD mov rsi, [rbp+var_78] add rsi, [rbp+var_88] add rsi, 2 xor edi, edi mov edx, 8 call my_malloc mov [rbp+var_98], rax mov [rbp+var_A8], rax loc_484AD: mov rax, [rbp+var_98] add rax, [rbp+var_78] add rax, 1 mov [rbp+var_A0], rax cmp [rbp+var_78], 0 jz short loc_484DE mov rdi, [rbp+var_98] mov rsi, [rbp+var_70] mov rdx, [rbp+var_78] call _memcpy loc_484DE: mov rax, [rbp+var_98] mov rcx, [rbp+var_78] mov byte ptr [rax+rcx], 0 cmp [rbp+var_88], 0 jz short loc_4850E mov rdi, [rbp+var_A0] mov rsi, [rbp+var_80] mov rdx, [rbp+var_88] call _memcpy loc_4850E: mov rax, [rbp+var_A0] mov rcx, [rbp+var_88] mov byte ptr [rax+rcx], 0 mov rdi, [rbp+var_98] mov rsi, [rbp+var_78] call thai2sortable mov [rbp+var_78], rax mov rdi, [rbp+var_A0] mov rsi, [rbp+var_88] call thai2sortable mov [rbp+var_88], rax mov rax, [rbp+var_98] mov [rbp+var_C0], rax mov rax, [rbp+var_78] cmp rax, [rbp+var_88] jnb short loc_48576 mov rax, [rbp+var_78] mov [rbp+var_C8], rax jmp short loc_48584 loc_48576: mov rax, [rbp+var_88] mov [rbp+var_C8], rax loc_48584: mov rax, [rbp+var_C0] mov rcx, [rbp+var_C8] mov [rbp+var_B0], rcx add rax, rcx mov [rbp+var_90], rax loc_485A3: mov rax, [rbp+var_98] cmp rax, [rbp+var_90] jnb short loc_4860C mov rax, [rbp+var_98] mov rcx, rax add rcx, 1 mov [rbp+var_98], rcx movzx eax, byte ptr [rax] mov rcx, [rbp+var_A0] mov rdx, rcx add rdx, 1 mov [rbp+var_A0], rdx movzx ecx, byte ptr [rcx] cmp eax, ecx jz short loc_4860A mov rax, [rbp+var_98] movzx eax, byte ptr [rax-1] mov rcx, [rbp+var_A0] movzx ecx, byte ptr [rcx-1] sub eax, ecx mov [rbp+var_B4], eax jmp loc_4868D loc_4860A: jmp short loc_485A3 loc_4860C: mov rax, [rbp+var_78] cmp rax, [rbp+var_88] jnz short loc_48623 xor eax, eax mov [rbp+var_CC], eax jmp short loc_48681 loc_48623: mov rax, [rbp+var_78] cmp rax, [rbp+var_88] jnb short loc_48658 mov rdi, [rbp+var_A0] mov rsi, [rbp+var_88] sub rsi, [rbp+var_B0] call my_strnncollsp_padspace_bin mov ecx, eax xor eax, eax sub eax, ecx mov [rbp+var_D0], eax jmp short loc_48675 loc_48658: mov rdi, [rbp+var_98] mov rsi, [rbp+var_78] sub rsi, [rbp+var_B0] call my_strnncollsp_padspace_bin mov [rbp+var_D0], eax loc_48675: mov eax, [rbp+var_D0] mov [rbp+var_CC], eax loc_48681: mov eax, [rbp+var_CC] mov [rbp+var_B4], eax loc_4868D: cmp [rbp+var_A8], 0 jz short loc_486A3 mov rdi, [rbp+var_A8] call my_free loc_486A3: mov eax, [rbp+var_B4] mov [rbp+var_D4], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_486D0 mov eax, [rbp+var_D4] add rsp, 0E0h pop rbp retn loc_486D0: call ___stack_chk_fail
long long my_strnncollsp_tis620(long long a1, long long a2, long long a3, long long a4, long long a5) { unsigned __int8 *v5; // rax unsigned __int8 *v6; // rcx int v8; // [rsp+10h] [rbp-D0h] unsigned int v9; // [rsp+14h] [rbp-CCh] unsigned long long v10; // [rsp+18h] [rbp-C8h] unsigned __int8 *v11; // [rsp+20h] [rbp-C0h] unsigned int v12; // [rsp+2Ch] [rbp-B4h] long long v13; // [rsp+38h] [rbp-A8h] unsigned __int8 *v14; // [rsp+40h] [rbp-A0h] unsigned __int8 *v15; // [rsp+48h] [rbp-98h] unsigned long long v17; // [rsp+58h] [rbp-88h] unsigned long long v20; // [rsp+68h] [rbp-78h] char v21; // [rsp+80h] [rbp-60h] BYREF unsigned long long v22; // [rsp+D8h] [rbp-8h] v22 = __readfsqword(0x28u); v13 = 0LL; v15 = (unsigned __int8 *)&v21; if ( (unsigned long long)(a5 + a3 + 2) > 0x50 ) { v15 = (unsigned __int8 *)my_malloc(0, a5 + a3 + 2, 8); v13 = (long long)v15; } v14 = &v15[a3 + 1]; if ( a3 ) memcpy(v15, a2, a3); v15[a3] = 0; if ( a5 ) memcpy(v14, a4, a5); v14[a5] = 0; v20 = thai2sortable(v15, a3); v17 = thai2sortable(v14, a5); v11 = v15; if ( v20 >= v17 ) v10 = v17; else v10 = v20; while ( v15 < &v11[v10] ) { v5 = v15++; v6 = v14++; if ( *v5 != *v6 ) { v12 = *(v15 - 1) - *(v14 - 1); goto LABEL_21; } } if ( v20 == v17 ) { v9 = 0; } else { if ( v20 >= v17 ) v8 = my_strnncollsp_padspace_bin(v15, v20 - v10); else v8 = -(int)my_strnncollsp_padspace_bin(v14, v17 - v10); v9 = v8; } v12 = v9; LABEL_21: if ( v13 ) my_free(v13); return v12; }
my_strnncollsp_tis620: PUSH RBP MOV RBP,RSP SUB RSP,0xe0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x68],RDI MOV qword ptr [RBP + -0x70],RSI MOV qword ptr [RBP + -0x78],RDX MOV qword ptr [RBP + -0x80],RCX MOV qword ptr [RBP + -0x88],R8 MOV qword ptr [RBP + -0xa8],0x0 MOV dword ptr [RBP + -0xb4],0x0 LEA RAX,[RBP + -0x60] MOV qword ptr [RBP + -0x98],RAX MOV RAX,qword ptr [RBP + -0x78] ADD RAX,qword ptr [RBP + -0x88] ADD RAX,0x2 CMP RAX,0x50 JBE 0x001484ad MOV RSI,qword ptr [RBP + -0x78] ADD RSI,qword ptr [RBP + -0x88] ADD RSI,0x2 XOR EDI,EDI MOV EDX,0x8 CALL 0x0012f560 MOV qword ptr [RBP + -0x98],RAX MOV qword ptr [RBP + -0xa8],RAX LAB_001484ad: MOV RAX,qword ptr [RBP + -0x98] ADD RAX,qword ptr [RBP + -0x78] ADD RAX,0x1 MOV qword ptr [RBP + -0xa0],RAX CMP qword ptr [RBP + -0x78],0x0 JZ 0x001484de MOV RDI,qword ptr [RBP + -0x98] MOV RSI,qword ptr [RBP + -0x70] MOV RDX,qword ptr [RBP + -0x78] CALL 0x00124230 LAB_001484de: MOV RAX,qword ptr [RBP + -0x98] MOV RCX,qword ptr [RBP + -0x78] MOV byte ptr [RAX + RCX*0x1],0x0 CMP qword ptr [RBP + -0x88],0x0 JZ 0x0014850e MOV RDI,qword ptr [RBP + -0xa0] MOV RSI,qword ptr [RBP + -0x80] MOV RDX,qword ptr [RBP + -0x88] CALL 0x00124230 LAB_0014850e: MOV RAX,qword ptr [RBP + -0xa0] MOV RCX,qword ptr [RBP + -0x88] MOV byte ptr [RAX + RCX*0x1],0x0 MOV RDI,qword ptr [RBP + -0x98] MOV RSI,qword ptr [RBP + -0x78] CALL 0x00148810 MOV qword ptr [RBP + -0x78],RAX MOV RDI,qword ptr [RBP + -0xa0] MOV RSI,qword ptr [RBP + -0x88] CALL 0x00148810 MOV qword ptr [RBP + -0x88],RAX MOV RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0xc0],RAX MOV RAX,qword ptr [RBP + -0x78] CMP RAX,qword ptr [RBP + -0x88] JNC 0x00148576 MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0xc8],RAX JMP 0x00148584 LAB_00148576: MOV RAX,qword ptr [RBP + -0x88] MOV qword ptr [RBP + -0xc8],RAX LAB_00148584: MOV RAX,qword ptr [RBP + -0xc0] MOV RCX,qword ptr [RBP + -0xc8] MOV qword ptr [RBP + -0xb0],RCX ADD RAX,RCX MOV qword ptr [RBP + -0x90],RAX LAB_001485a3: MOV RAX,qword ptr [RBP + -0x98] CMP RAX,qword ptr [RBP + -0x90] JNC 0x0014860c MOV RAX,qword ptr [RBP + -0x98] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x98],RCX MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0xa0] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0xa0],RDX MOVZX ECX,byte ptr [RCX] CMP EAX,ECX JZ 0x0014860a MOV RAX,qword ptr [RBP + -0x98] MOVZX EAX,byte ptr [RAX + -0x1] MOV RCX,qword ptr [RBP + -0xa0] MOVZX ECX,byte ptr [RCX + -0x1] SUB EAX,ECX MOV dword ptr [RBP + -0xb4],EAX JMP 0x0014868d LAB_0014860a: JMP 0x001485a3 LAB_0014860c: MOV RAX,qword ptr [RBP + -0x78] CMP RAX,qword ptr [RBP + -0x88] JNZ 0x00148623 XOR EAX,EAX MOV dword ptr [RBP + -0xcc],EAX JMP 0x00148681 LAB_00148623: MOV RAX,qword ptr [RBP + -0x78] CMP RAX,qword ptr [RBP + -0x88] JNC 0x00148658 MOV RDI,qword ptr [RBP + -0xa0] MOV RSI,qword ptr [RBP + -0x88] SUB RSI,qword ptr [RBP + -0xb0] CALL 0x00136710 MOV ECX,EAX XOR EAX,EAX SUB EAX,ECX MOV dword ptr [RBP + -0xd0],EAX JMP 0x00148675 LAB_00148658: MOV RDI,qword ptr [RBP + -0x98] MOV RSI,qword ptr [RBP + -0x78] SUB RSI,qword ptr [RBP + -0xb0] CALL 0x00136710 MOV dword ptr [RBP + -0xd0],EAX LAB_00148675: MOV EAX,dword ptr [RBP + -0xd0] MOV dword ptr [RBP + -0xcc],EAX LAB_00148681: MOV EAX,dword ptr [RBP + -0xcc] MOV dword ptr [RBP + -0xb4],EAX LAB_0014868d: CMP qword ptr [RBP + -0xa8],0x0 JZ 0x001486a3 MOV RDI,qword ptr [RBP + -0xa8] CALL 0x0012f8e0 LAB_001486a3: MOV EAX,dword ptr [RBP + -0xb4] MOV dword ptr [RBP + -0xd4],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001486d0 MOV EAX,dword ptr [RBP + -0xd4] ADD RSP,0xe0 POP RBP RET LAB_001486d0: CALL 0x00124320
int my_strnncollsp_tis620 (int8 param_1,void *param_2,size_t param_3,void *param_4,size_t param_5) { byte *pbVar1; byte *__dest; ulong uVar2; ulong uVar3; byte *pbVar4; long in_FS_OFFSET; int local_d8; int local_d4; ulong local_d0; int local_bc; byte *local_b0; byte *local_a8; byte *local_a0; byte local_68 [88]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_b0 = (byte *)0x0; local_a0 = local_68; if (0x50 < param_3 + param_5 + 2) { local_b0 = (byte *)my_malloc(0,param_3 + param_5 + 2,8); local_a0 = local_b0; } __dest = local_a0 + param_3 + 1; if (param_3 != 0) { memcpy(local_a0,param_2,param_3); } local_a0[param_3] = 0; if (param_5 != 0) { memcpy(__dest,param_4,param_5); } __dest[param_5] = 0; uVar2 = thai2sortable(local_a0,param_3); uVar3 = thai2sortable(__dest,param_5); local_d0 = uVar3; if (uVar2 < uVar3) { local_d0 = uVar2; } pbVar4 = local_a0 + local_d0; pbVar1 = local_a0; do { local_a0 = pbVar1; local_a8 = __dest; if (pbVar4 <= local_a0) { if (uVar2 == uVar3) { local_d4 = 0; } else { if (uVar2 < uVar3) { local_d8 = my_strnncollsp_padspace_bin(local_a8,uVar3 - local_d0); local_d8 = -local_d8; } else { local_d8 = my_strnncollsp_padspace_bin(local_a0,uVar2 - local_d0); } local_d4 = local_d8; } local_bc = local_d4; goto LAB_0014868d; } __dest = local_a8 + 1; pbVar1 = local_a0 + 1; } while (*local_a0 == *local_a8); local_bc = (uint)*local_a0 - (uint)*local_a8; LAB_0014868d: if (local_b0 != (byte *)0x0) { my_free(local_b0); } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_bc; }
49,474
testing::internal::StringStreamToString(std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char>>*)
giladroyz[P]FindPeaks/build_O0/_deps/googletest-src/googletest/src/gtest.cc
std::string StringStreamToString(::std::stringstream* ss) { const ::std::string& str = ss->str(); const char* const start = str.c_str(); const char* const end = start + str.length(); std::string result; result.reserve(static_cast<size_t>(2 * (end - start))); for (const char* ch = start; ch != end; ++ch) { if (*ch == '\0') { result += "\\0"; // Replaces NUL with "\\0"; } else { result += *ch; } } return result; }
O0
cpp
testing::internal::StringStreamToString(std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char>>*): pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x70(%rbp) movq %rdi, %rax movq %rax, -0x88(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rsi leaq -0x38(%rbp), %rdi movq %rdi, -0x80(%rbp) callq 0xa5f0 movq -0x80(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rdi callq 0xa260 movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq %rax, -0x78(%rbp) movq -0x18(%rbp), %rdi callq 0xaab0 movq -0x70(%rbp), %rdi movq %rax, %rcx movq -0x78(%rbp), %rax addq %rcx, %rax movq %rax, -0x48(%rbp) movb $0x0, -0x49(%rbp) callq 0xa9d0 movq -0x70(%rbp), %rdi movq -0x48(%rbp), %rsi movq -0x40(%rbp), %rax subq %rax, %rsi addq %rsi, %rsi callq 0xab00 jmp 0x2632c movq -0x40(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x68(%rbp), %rax cmpq -0x48(%rbp), %rax je 0x263a2 movq -0x68(%rbp), %rax movsbl (%rax), %eax cmpl $0x0, %eax jne 0x2637e movq -0x70(%rbp), %rdi leaq 0x54fff(%rip), %rsi # 0x7b354 callq 0xa5e0 jmp 0x2635c jmp 0x26392 movq -0x70(%rbp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) callq 0xad98 leaq -0x38(%rbp), %rdi callq 0xad98 jmp 0x263ce movq -0x70(%rbp), %rdi movq -0x68(%rbp), %rax movsbl (%rax), %esi callq 0xa3a0 jmp 0x26390 jmp 0x26392 jmp 0x26394 movq -0x68(%rbp), %rax addq $0x1, %rax movq %rax, -0x68(%rbp) jmp 0x26334 movb $0x1, -0x49(%rbp) testb $0x1, -0x49(%rbp) jne 0x263b5 movq -0x70(%rbp), %rdi callq 0xad98 leaq -0x38(%rbp), %rdi callq 0xad98 movq -0x88(%rbp), %rax addq $0x90, %rsp popq %rbp retq movq -0x58(%rbp), %rdi callq 0xac00 nopw (%rax,%rax)
_ZN7testing8internal20StringStreamToStringEPNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_70], rdi mov rax, rdi mov [rbp+var_88], rax mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rsi, [rbp+var_10] lea rdi, [rbp+var_38] mov [rbp+var_80], rdi call __ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(void) mov rax, [rbp+var_80] mov [rbp+var_18], rax mov rdi, [rbp+var_18] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov [rbp+var_40], rax mov rax, [rbp+var_40] mov [rbp+var_78], rax mov rdi, [rbp+var_18] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void) mov rdi, [rbp+var_70] mov rcx, rax mov rax, [rbp+var_78] add rax, rcx mov [rbp+var_48], rax mov [rbp+var_49], 0 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void) mov rdi, [rbp+var_70] mov rsi, [rbp+var_48] mov rax, [rbp+var_40] sub rsi, rax add rsi, rsi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) jmp short $+2 loc_2632C: mov rax, [rbp+var_40] mov [rbp+var_68], rax loc_26334: mov rax, [rbp+var_68] cmp rax, [rbp+var_48] jz short loc_263A2 mov rax, [rbp+var_68] movsx eax, byte ptr [rax] cmp eax, 0 jnz short loc_2637E mov rdi, [rbp+var_70] lea rsi, a0; "\\0" call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*) jmp short $+2 loc_2635C: jmp short loc_26392 mov rdi, [rbp+var_70]; void * mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_263CE loc_2637E: mov rdi, [rbp+var_70] mov rax, [rbp+var_68] movsx esi, byte ptr [rax] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc; std::string::operator+=(char) jmp short $+2 loc_26390: jmp short $+2 loc_26392: jmp short $+2 loc_26394: mov rax, [rbp+var_68] add rax, 1 mov [rbp+var_68], rax jmp short loc_26334 loc_263A2: mov [rbp+var_49], 1 test [rbp+var_49], 1 jnz short loc_263B5 mov rdi, [rbp+var_70]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_263B5: lea rdi, [rbp+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rax, [rbp+var_88] add rsp, 90h pop rbp retn loc_263CE: mov rdi, [rbp+var_58] call __Unwind_Resume
long long testing::internal::StringStreamToString(long long a1, long long a2) { long long v3; // [rsp+18h] [rbp-78h] _BYTE *i; // [rsp+28h] [rbp-68h] _BYTE *v5; // [rsp+48h] [rbp-48h] _BYTE v6[32]; // [rsp+58h] [rbp-38h] BYREF _BYTE *v7; // [rsp+78h] [rbp-18h] long long v8; // [rsp+80h] [rbp-10h] long long v9; // [rsp+88h] [rbp-8h] v9 = a1; v8 = a2; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(v6, a2); v7 = v6; v3 = std::string::c_str(v6); v5 = (_BYTE *)(std::string::length(v7) + v3); std::string::basic_string(a1); std::string::reserve(a1, 2LL * (_QWORD)&v5[-v3]); for ( i = (_BYTE *)v3; i != v5; ++i ) { if ( *i ) std::string::operator+=(a1, (unsigned int)(char)*i); else std::string::operator+=(a1, "\\0"); } std::string::~string(v6); return a1; }
StringStreamToString: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV qword ptr [RBP + -0x70],RDI MOV RAX,RDI MOV qword ptr [RBP + -0x88],RAX MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RSI,qword ptr [RBP + -0x10] LEA RDI,[RBP + -0x38] MOV qword ptr [RBP + -0x80],RDI CALL 0x0010a5f0 MOV RAX,qword ptr [RBP + -0x80] MOV qword ptr [RBP + -0x18],RAX MOV RDI,qword ptr [RBP + -0x18] CALL 0x0010a260 MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x78],RAX MOV RDI,qword ptr [RBP + -0x18] CALL 0x0010aab0 MOV RDI,qword ptr [RBP + -0x70] MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x78] ADD RAX,RCX MOV qword ptr [RBP + -0x48],RAX MOV byte ptr [RBP + -0x49],0x0 CALL 0x0010a9d0 MOV RDI,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x40] SUB RSI,RAX ADD RSI,RSI LAB_00126325: CALL 0x0010ab00 JMP 0x0012632c LAB_0012632c: MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x68],RAX LAB_00126334: MOV RAX,qword ptr [RBP + -0x68] CMP RAX,qword ptr [RBP + -0x48] JZ 0x001263a2 MOV RAX,qword ptr [RBP + -0x68] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JNZ 0x0012637e MOV RDI,qword ptr [RBP + -0x70] LEA RSI,[0x17b354] CALL 0x0010a5e0 JMP 0x0012635c LAB_0012635c: JMP 0x00126392 LAB_0012637e: MOV RDI,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RBP + -0x68] MOVSX ESI,byte ptr [RAX] CALL 0x0010a3a0 LAB_0012638e: JMP 0x00126390 LAB_00126390: JMP 0x00126392 LAB_00126392: JMP 0x00126394 LAB_00126394: MOV RAX,qword ptr [RBP + -0x68] ADD RAX,0x1 MOV qword ptr [RBP + -0x68],RAX JMP 0x00126334 LAB_001263a2: MOV byte ptr [RBP + -0x49],0x1 TEST byte ptr [RBP + -0x49],0x1 JNZ 0x001263b5 MOV RDI,qword ptr [RBP + -0x70] CALL 0x0010ad98 LAB_001263b5: LEA RDI,[RBP + -0x38] CALL 0x0010ad98 MOV RAX,qword ptr [RBP + -0x88] ADD RSP,0x90 POP RBP RET
/* WARNING: Removing unreachable block (ram,0x001263ac) */ /* testing::internal::StringStreamToString(std::__cxx11::stringstream*) */ internal * __thiscall testing::internal::StringStreamToString(internal *this,stringstream *param_1) { long lVar1; char *pcVar2; char *local_70; string local_40 [32]; string *local_20; stringstream *local_18; internal *local_10; local_18 = param_1; local_10 = this; std::__cxx11::stringstream::str(); local_20 = local_40; local_70 = (char *)std::__cxx11::string::c_str(); lVar1 = std::__cxx11::string::length(); pcVar2 = local_70 + lVar1; std::__cxx11::string::string((string *)this); /* try { // try from 00126325 to 0012638d has its CatchHandler @ 0012635e */ std::__cxx11::string::reserve((ulong)this); for (; local_70 != pcVar2; local_70 = local_70 + 1) { if (*local_70 == '\0') { std::__cxx11::string::operator+=((string *)this,"\\0"); } else { std::__cxx11::string::operator+=((string *)this,*local_70); } } std::__cxx11::string::~string(local_40); return this; }
49,475
inline_mysql_cond_init
eloqsql/include/mysql/psi/mysql_thread.h
static inline int inline_mysql_cond_init( #ifdef HAVE_PSI_COND_INTERFACE PSI_cond_key key, #endif mysql_cond_t *that, const pthread_condattr_t *attr) { #ifdef HAVE_PSI_COND_INTERFACE that->m_psi= PSI_COND_CALL(init_cond)(key, &that->m_cond); #else that->m_psi= NULL; #endif return pthread_cond_init(&that->m_cond, attr); }
O0
c
inline_mysql_cond_init: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) leaq 0x1a62f6(%rip), %rax # 0x1cd8d0 movq (%rax), %rax movq 0x60(%rax), %rax movl -0x4(%rbp), %edi movq -0x10(%rbp), %rsi callq *%rax movq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x30(%rax) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x24370 addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
inline_mysql_cond_init: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx lea rax, PSI_server mov rax, [rax] mov rax, [rax+60h] mov edi, [rbp+var_4] mov rsi, [rbp+var_10] call rax mov rcx, rax mov rax, [rbp+var_10] mov [rax+30h], rcx mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call _pthread_cond_init add rsp, 20h pop rbp retn
long long inline_mysql_cond_init(unsigned int a1, long long a2, long long a3) { *(_QWORD *)(a2 + 48) = (*((long long ( **)(_QWORD, long long))PSI_server[0] + 12))(a1, a2); return pthread_cond_init(a2, a3); }
inline_mysql_cond_init: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX LEA RAX,[0x2cd8d0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x60] MOV EDI,dword ptr [RBP + -0x4] MOV RSI,qword ptr [RBP + -0x10] CALL RAX MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x30],RCX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00124370 ADD RSP,0x20 POP RBP RET
void inline_mysql_cond_init(int4 param_1,pthread_cond_t *param_2,pthread_condattr_t *param_3) { longlong lVar1; lVar1 = (**(code **)(PSI_server + 0x60))(param_1,param_2); param_2[1].__align = lVar1; pthread_cond_init(param_2,param_3); return; }
49,476
my_long10_to_str_8bit
eloqsql/strings/ctype-simple.c
size_t my_long10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)), char *dst, size_t len, int radix, long int val) { char buffer[66]; register char *p, *e; long int new_val; uint sign=0; unsigned long int uval = (unsigned long int) val; e = p = &buffer[sizeof(buffer)-1]; *p= 0; if (radix < 0) { if (val < 0) { /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */ uval= (unsigned long int)0 - uval; *dst++= '-'; len--; sign= 1; } } new_val = (long) (uval / 10); *--p = '0'+ (char) (uval - (unsigned long) new_val * 10); val = new_val; while (val != 0) { new_val=val/10; *--p = '0' + (char) (val-new_val*10); val= new_val; } len= MY_MIN(len, (size_t) (e-p)); memcpy(dst, p, len); return len+sign; }
O3
c
my_long10_to_str_8bit: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x50, %rsp movq %rdx, %r10 movq %rsi, %rdi movq %fs:0x28, %rax movq %rax, -0x18(%rbp) movb $0x0, -0x1f(%rbp) testl %ecx, %ecx setns %al testq %r8, %r8 setns %cl orb %al, %cl jne 0xb53eb negq %r8 movb $0x2d, (%rdi) incq %rdi decq %r10 movl $0x1, %r14d jmp 0xb53ee xorl %r14d, %r14d leaq -0x1f(%rbp), %rbx movabsq $-0x3333333333333333, %rcx # imm = 0xCCCCCCCCCCCCCCCD movq %r8, %rax mulq %rcx movq %rdx, %r9 shrq $0x3, %r9 imull $0xf6, %r9d, %eax addl %r8d, %eax addb $0x30, %al leaq -0x20(%rbp), %rsi movb %al, (%rsi) cmpq $0xa, %r8 jb 0xb5445 movq %r9, %rax mulq %rcx shrq $0x3, %rdx imull $0xf6, %edx, %eax addl %r9d, %eax addb $0x30, %al movb %al, -0x1(%rsi) decq %rsi cmpq $0x9, %r9 movq %rdx, %r9 ja 0xb5421 subq %rsi, %rbx cmpq %rbx, %r10 cmovbq %r10, %rbx movq %rbx, %rdx callq 0x29080 movq %fs:0x28, %rax cmpq -0x18(%rbp), %rax jne 0xb5475 addq %r14, %rbx movq %rbx, %rax addq $0x50, %rsp popq %rbx popq %r14 popq %rbp retq callq 0x29270
my_long10_to_str_8bit: push rbp mov rbp, rsp push r14 push rbx sub rsp, 50h mov r10, rdx mov rdi, rsi mov rax, fs:28h mov [rbp+var_18], rax mov [rbp+var_1F], 0 test ecx, ecx setns al test r8, r8 setns cl or cl, al jnz short loc_B53EB neg r8 mov byte ptr [rdi], 2Dh ; '-' inc rdi dec r10 mov r14d, 1 jmp short loc_B53EE loc_B53EB: xor r14d, r14d loc_B53EE: lea rbx, [rbp+var_1F] mov rcx, 0CCCCCCCCCCCCCCCDh mov rax, r8 mul rcx mov r9, rdx shr r9, 3 imul eax, r9d, 0F6h add eax, r8d add al, 30h ; '0' lea rsi, [rbp+var_20] mov [rsi], al cmp r8, 0Ah jb short loc_B5445 loc_B5421: mov rax, r9 mul rcx shr rdx, 3 imul eax, edx, 0F6h add eax, r9d add al, 30h ; '0' mov [rsi-1], al dec rsi cmp r9, 9 mov r9, rdx ja short loc_B5421 loc_B5445: sub rbx, rsi cmp r10, rbx cmovb rbx, r10 mov rdx, rbx call _memcpy mov rax, fs:28h cmp rax, [rbp+var_18] jnz short loc_B5475 add rbx, r14 mov rax, rbx add rsp, 50h pop rbx pop r14 pop rbp retn loc_B5475: call ___stack_chk_fail
_BYTE * my_long10_to_str_8bit(long long a1, _BYTE *a2, _BYTE *a3, int a4, unsigned long long a5) { _BYTE *v5; // r10 _BYTE *v6; // rdi long long v7; // r14 unsigned long long v8; // r9 char *v9; // rsi bool v10; // cf bool v11; // zf _BYTE *v12; // rbx char v14; // [rsp+40h] [rbp-20h] BYREF _BYTE v15[7]; // [rsp+41h] [rbp-1Fh] BYREF unsigned long long v16; // [rsp+48h] [rbp-18h] v5 = a3; v6 = a2; v16 = __readfsqword(0x28u); v15[0] = 0; if ( a4 >= 0 || (a5 & 0x8000000000000000LL) == 0LL ) { v7 = 0LL; } else { a5 = -(long long)a5; *a2 = 45; v6 = a2 + 1; v5 = a3 - 1; v7 = 1LL; } v8 = a5 / 0xA; v9 = &v14; v14 = a5 % 0xA + 48; if ( a5 >= 0xA ) { do { *--v9 = v8 % 0xA + 48; v10 = v8 < 9; v11 = v8 == 9; v8 /= 0xAuLL; } while ( !v10 && !v11 ); } v12 = (_BYTE *)(v15 - v9); if ( (unsigned long long)v5 < v15 - v9 ) v12 = v5; memcpy(v6, v9, v12); return &v12[v7]; }
my_long10_to_str_8bit: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x50 MOV R10,RDX MOV RDI,RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX MOV byte ptr [RBP + -0x1f],0x0 TEST ECX,ECX SETNS AL TEST R8,R8 SETNS CL OR CL,AL JNZ 0x001b53eb NEG R8 MOV byte ptr [RDI],0x2d INC RDI DEC R10 MOV R14D,0x1 JMP 0x001b53ee LAB_001b53eb: XOR R14D,R14D LAB_001b53ee: LEA RBX,[RBP + -0x1f] MOV RCX,-0x3333333333333333 MOV RAX,R8 MUL RCX MOV R9,RDX SHR R9,0x3 IMUL EAX,R9D,0xf6 ADD EAX,R8D ADD AL,0x30 LEA RSI,[RBP + -0x20] MOV byte ptr [RSI],AL CMP R8,0xa JC 0x001b5445 LAB_001b5421: MOV RAX,R9 MUL RCX SHR RDX,0x3 IMUL EAX,EDX,0xf6 ADD EAX,R9D ADD AL,0x30 MOV byte ptr [RSI + -0x1],AL DEC RSI CMP R9,0x9 MOV R9,RDX JA 0x001b5421 LAB_001b5445: SUB RBX,RSI CMP R10,RBX CMOVC RBX,R10 MOV RDX,RBX CALL 0x00129080 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x18] JNZ 0x001b5475 ADD RBX,R14 MOV RAX,RBX ADD RSP,0x50 POP RBX POP R14 POP RBP RET LAB_001b5475: CALL 0x00129270
char * my_long10_to_str_8bit (int8 param_1,int1 *param_2,char *param_3,int param_4,ulong param_5) { ulong uVar1; ulong uVar2; char *__n; char *__src; long in_FS_OFFSET; bool bVar3; char local_29 [9]; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); local_29[2] = 0; bVar3 = (long)param_5 < 0; if (bVar3 && param_4 < 0) { param_5 = -param_5; *param_2 = 0x2d; param_2 = param_2 + 1; param_3 = param_3 + -1; } local_29[1] = (char)(param_5 / 10) * -10 + (char)param_5 + '0'; __src = local_29 + 1; uVar2 = param_5 / 10; while (uVar1 = uVar2, 9 < param_5) { __src[-1] = (char)(uVar1 / 10) * -10 + (char)uVar1 + '0'; __src = __src + -1; uVar2 = uVar1 / 10; param_5 = uVar1; } __n = local_29 + (2 - (long)__src); if (param_3 < local_29 + (2 - (long)__src)) { __n = param_3; } memcpy(param_2,__src,(size_t)__n); if (*(long *)(in_FS_OFFSET + 0x28) == local_20) { return __n + (bVar3 && param_4 < 0); } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
49,477
my_realpath
eloqsql/mysys/my_symlink.c
int my_realpath(char *to, const char *filename, myf MyFlags) { #if defined(HAVE_REALPATH) && !defined(HAVE_BROKEN_REALPATH) int result=0; char buff[BUFF_LEN]; char *ptr; DBUG_ENTER("my_realpath"); DBUG_PRINT("info",("executing realpath")); if ((ptr=realpath(filename,buff))) strmake(to, ptr, FN_REFLEN-1); else { /* Realpath didn't work; Use my_load_path() which is a poor substitute original name but will at least be able to resolve paths that starts with '.'. */ if (MyFlags) DBUG_PRINT("error",("realpath failed with errno: %d", errno)); my_errno=errno; if (MyFlags & MY_WME) my_error(EE_REALPATH, MYF(0), filename, my_errno); my_load_path(to, filename, NullS); if (my_errno == ENOENT) result= 1; else result= -1; } DBUG_RETURN(result); #elif defined(_WIN32) int ret= GetFullPathName(filename,FN_REFLEN, to, NULL); if (ret == 0 || ret > FN_REFLEN) { my_errno= (ret > FN_REFLEN) ? ENAMETOOLONG : GetLastError(); if (MyFlags & MY_WME) my_error(EE_REALPATH, MYF(0), filename, my_errno); /* GetFullPathName didn't work : use my_load_path() which is a poor substitute original name but will at least be able to resolve paths that starts with '.'. */ my_load_path(to, filename, NullS); return -1; } #else my_load_path(to, filename, NullS); #endif return 0; }
O3
c
my_realpath: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x1010, %rsp # imm = 0x1010 movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x28(%rbp) leaq -0x1030(%rbp), %rsi movq %r14, %rdi callq 0x240c0 testq %rax, %rax je 0x2b039 movl $0x1ff, %edx # imm = 0x1FF movq %rbx, %rdi movq %rax, %rsi callq 0x5930c xorl %eax, %eax jmp 0x2b088 callq 0x24050 movl (%rax), %r12d callq 0x26e1e movl %r12d, (%rax) testb $0x10, %r15b je 0x2b067 callq 0x26e1e movl (%rax), %ecx movl $0x1a, %edi xorl %esi, %esi movq %r14, %rdx xorl %eax, %eax callq 0x2a01b movq %rbx, %rdi movq %r14, %rsi xorl %edx, %edx callq 0x2be90 callq 0x26e1e xorl %ecx, %ecx cmpl $0x2, (%rax) sete %cl leal -0x1(,%rcx,2), %eax movq %fs:0x28, %rcx cmpq -0x28(%rbp), %rcx jne 0x2b0a7 addq $0x1010, %rsp # imm = 0x1010 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq callq 0x242e0
my_realpath: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 1010h mov r15, rdx mov r14, rsi mov rbx, rdi mov rax, fs:28h mov [rbp+var_28], rax lea rsi, [rbp+var_1030] mov rdi, r14 call _realpath test rax, rax jz short loc_2B039 mov edx, 1FFh mov rdi, rbx mov rsi, rax call strmake xor eax, eax jmp short loc_2B088 loc_2B039: call ___errno_location mov r12d, [rax] call _my_thread_var mov [rax], r12d test r15b, 10h jz short loc_2B067 call _my_thread_var mov ecx, [rax] mov edi, 1Ah xor esi, esi mov rdx, r14 xor eax, eax call my_error loc_2B067: mov rdi, rbx mov rsi, r14 xor edx, edx call my_load_path call _my_thread_var xor ecx, ecx cmp dword ptr [rax], 2 setz cl lea eax, ds:0FFFFFFFFFFFFFFFFh[rcx*2] loc_2B088: mov rcx, fs:28h cmp rcx, [rbp+var_28] jnz short loc_2B0A7 add rsp, 1010h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_2B0A7: call ___stack_chk_fail
long long my_realpath(long long a1, long long a2, char a3) { long long v4; // rax int v6; // r12d unsigned int *v7; // rax _BYTE v8[4104]; // [rsp+0h] [rbp-1030h] BYREF unsigned long long v9; // [rsp+1008h] [rbp-28h] v9 = __readfsqword(0x28u); v4 = realpath(a2, v8); if ( v4 ) { strmake(a1, v4, 511LL); return 0LL; } else { v6 = *(_DWORD *)__errno_location(a2); *(_DWORD *)my_thread_var() = v6; if ( (a3 & 0x10) != 0 ) { v7 = (unsigned int *)my_thread_var(); my_error(0x1Au, 0, a2, *v7); } my_load_path(a1, a2, 0LL); return 2 * (unsigned int)(*(_DWORD *)my_thread_var() == 2) - 1; } }
my_realpath: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x1010 MOV R15,RDX MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX LEA RSI,[RBP + -0x1030] MOV RDI,R14 CALL 0x001240c0 TEST RAX,RAX JZ 0x0012b039 MOV EDX,0x1ff MOV RDI,RBX MOV RSI,RAX CALL 0x0015930c XOR EAX,EAX JMP 0x0012b088 LAB_0012b039: CALL 0x00124050 MOV R12D,dword ptr [RAX] CALL 0x00126e1e MOV dword ptr [RAX],R12D TEST R15B,0x10 JZ 0x0012b067 CALL 0x00126e1e MOV ECX,dword ptr [RAX] MOV EDI,0x1a XOR ESI,ESI MOV RDX,R14 XOR EAX,EAX CALL 0x0012a01b LAB_0012b067: MOV RDI,RBX MOV RSI,R14 XOR EDX,EDX CALL 0x0012be90 CALL 0x00126e1e XOR ECX,ECX CMP dword ptr [RAX],0x2 SETZ CL LEA EAX,[-0x1 + RCX*0x2] LAB_0012b088: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x28] JNZ 0x0012b0a7 ADD RSP,0x1010 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0012b0a7: CALL 0x001242e0
int my_realpath(int8 param_1,char *param_2,ulong param_3) { int iVar1; char *pcVar2; int *piVar3; int4 *puVar4; long in_FS_OFFSET; char local_1038 [4104]; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); pcVar2 = realpath(param_2,local_1038); if (pcVar2 == (char *)0x0) { piVar3 = __errno_location(); iVar1 = *piVar3; piVar3 = (int *)_my_thread_var(); *piVar3 = iVar1; if ((param_3 & 0x10) != 0) { puVar4 = (int4 *)_my_thread_var(); my_error(0x1a,0,param_2,*puVar4); } my_load_path(param_1,param_2,0); piVar3 = (int *)_my_thread_var(); iVar1 = (uint)(*piVar3 == 2) * 2 + -1; } else { strmake(param_1,pcVar2,0x1ff); iVar1 = 0; } if (*(long *)(in_FS_OFFSET + 0x28) == local_30) { return iVar1; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
49,478
testing::internal::(anonymous namespace)::ContainsUnprintableControlCodes(char const*, unsigned long)
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-printers.cc
bool ContainsUnprintableControlCodes(const char* str, size_t length) { const unsigned char* s = reinterpret_cast<const unsigned char*>(str); for (size_t i = 0; i < length; i++) { unsigned char ch = *s++; if (std::iscntrl(ch)) { switch (ch) { case '\t': case '\n': case '\r': break; default: return true; } } } return false; }
O0
cpp
testing::internal::(anonymous namespace)::ContainsUnprintableControlCodes(char const*, unsigned long): subq $0x38, %rsp movq %rdi, 0x28(%rsp) movq %rsi, 0x20(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x18(%rsp) movq $0x0, 0x10(%rsp) movq 0x10(%rsp), %rax cmpq 0x20(%rsp), %rax jae 0x3f93e movq 0x18(%rsp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, 0x18(%rsp) movb (%rax), %al movb %al, 0xf(%rsp) movzbl 0xf(%rsp), %edi callq 0xb7e0 cmpl $0x0, %eax je 0x3f92c movzbl 0xf(%rsp), %eax movl %eax, 0x8(%rsp) addl $-0x9, %eax subl $0x2, %eax jb 0x3f921 jmp 0x3f916 movl 0x8(%rsp), %eax subl $0xd, %eax jne 0x3f923 jmp 0x3f921 jmp 0x3f92a movb $0x1, 0x37(%rsp) jmp 0x3f943 jmp 0x3f92c jmp 0x3f92e movq 0x10(%rsp), %rax addq $0x1, %rax movq %rax, 0x10(%rsp) jmp 0x3f8d1 movb $0x0, 0x37(%rsp) movb 0x37(%rsp), %al andb $0x1, %al addq $0x38, %rsp retq nop
_ZN7testing8internal12_GLOBAL__N_131ContainsUnprintableControlCodesEPKcm: sub rsp, 38h mov [rsp+38h+var_10], rdi mov [rsp+38h+var_18], rsi mov rax, [rsp+38h+var_10] mov [rsp+38h+var_20], rax mov [rsp+38h+var_28], 0 loc_3F8D1: mov rax, [rsp+38h+var_28] cmp rax, [rsp+38h+var_18] jnb short loc_3F93E mov rax, [rsp+38h+var_20] mov rcx, rax add rcx, 1 mov [rsp+38h+var_20], rcx mov al, [rax] mov [rsp+38h+var_29], al movzx edi, [rsp+38h+var_29] call _iscntrl cmp eax, 0 jz short loc_3F92C movzx eax, [rsp+38h+var_29] mov [rsp+38h+var_30], eax add eax, 0FFFFFFF7h sub eax, 2 jb short loc_3F921 jmp short $+2 loc_3F916: mov eax, [rsp+38h+var_30] sub eax, 0Dh jnz short loc_3F923 jmp short $+2 loc_3F921: jmp short loc_3F92A loc_3F923: mov [rsp+38h+var_1], 1 jmp short loc_3F943 loc_3F92A: jmp short $+2 loc_3F92C: jmp short $+2 loc_3F92E: mov rax, [rsp+38h+var_28] add rax, 1 mov [rsp+38h+var_28], rax jmp short loc_3F8D1 loc_3F93E: mov [rsp+38h+var_1], 0 loc_3F943: mov al, [rsp+38h+var_1] and al, 1 add rsp, 38h retn
char testing::internal::`anonymous namespace'::ContainsUnprintableControlCodes( testing::internal::_anonymous_namespace_ *this, const char *a2) { testing::internal::_anonymous_namespace_ *v2; // rax unsigned __int8 v4; // [rsp+Fh] [rbp-29h] unsigned long long i; // [rsp+10h] [rbp-28h] for ( i = 0LL; i < (unsigned long long)a2; ++i ) { v2 = this; this = (testing::internal::_anonymous_namespace_ *)((char *)this + 1); v4 = *(_BYTE *)v2; if ( (unsigned int)iscntrl(*(unsigned __int8 *)v2) && (unsigned int)v4 - 9 >= 2 && v4 != 13 ) return 1; } return 0; }
ContainsUnprintableControlCodes: SUB RSP,0x38 MOV qword ptr [RSP + 0x28],RDI MOV qword ptr [RSP + 0x20],RSI MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x10],0x0 LAB_0013f8d1: MOV RAX,qword ptr [RSP + 0x10] CMP RAX,qword ptr [RSP + 0x20] JNC 0x0013f93e MOV RAX,qword ptr [RSP + 0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RSP + 0x18],RCX MOV AL,byte ptr [RAX] MOV byte ptr [RSP + 0xf],AL MOVZX EDI,byte ptr [RSP + 0xf] CALL 0x0010b7e0 CMP EAX,0x0 JZ 0x0013f92c MOVZX EAX,byte ptr [RSP + 0xf] MOV dword ptr [RSP + 0x8],EAX ADD EAX,-0x9 SUB EAX,0x2 JC 0x0013f921 JMP 0x0013f916 LAB_0013f916: MOV EAX,dword ptr [RSP + 0x8] SUB EAX,0xd JNZ 0x0013f923 JMP 0x0013f921 LAB_0013f921: JMP 0x0013f92a LAB_0013f923: MOV byte ptr [RSP + 0x37],0x1 JMP 0x0013f943 LAB_0013f92a: JMP 0x0013f92c LAB_0013f92c: JMP 0x0013f92e LAB_0013f92e: MOV RAX,qword ptr [RSP + 0x10] ADD RAX,0x1 MOV qword ptr [RSP + 0x10],RAX JMP 0x0013f8d1 LAB_0013f93e: MOV byte ptr [RSP + 0x37],0x0 LAB_0013f943: MOV AL,byte ptr [RSP + 0x37] AND AL,0x1 ADD RSP,0x38 RET
/* testing::internal::(anonymous namespace)::ContainsUnprintableControlCodes(char const*, unsigned long) */ int8 testing::internal::(anonymous_namespace)::ContainsUnprintableControlCodes (char *param_1,ulong param_2) { byte bVar1; int iVar2; uint uVar3; ulong local_28; byte *local_20; int1 local_1; local_28 = 0; local_20 = (byte *)param_1; do { if (param_2 <= local_28) { local_1 = 0; LAB_0013f943: return CONCAT71((int7)(local_28 >> 8),local_1); } bVar1 = *local_20; iVar2 = iscntrl((uint)bVar1); if (((iVar2 != 0) && (1 < bVar1 - 9)) && (uVar3 = bVar1 - 0xd, uVar3 != 0)) { local_1 = 1; local_28 = (ulong)uVar3; goto LAB_0013f943; } local_28 = local_28 + 1; local_20 = local_20 + 1; } while( true ); }
49,479
compare_bin
eloqsql/mysys/my_compare.c
static int compare_bin(const uchar *a, uint a_length, const uchar *b, uint b_length, my_bool part_key, my_bool skip_end_space) { uint length= MY_MIN(a_length,b_length); const uchar *end= a+ length; int flag; while (a < end) if ((flag= (int) *a++ - (int) *b++)) return flag; if (part_key && b_length < a_length) return 0; if (skip_end_space && a_length != b_length) { int swap= 1; /* We are using space compression. We have to check if longer key has next character < ' ', in which case it's less than the shorter key that has an implicite space afterwards. This code is identical to the one in strings/ctype-simple.c:my_strnncollsp_simple */ if (a_length < b_length) { /* put shorter key in a */ a_length= b_length; a= b; swap= -1; /* swap sign of result */ } for (end= a + a_length-length; a < end ; a++) { if (*a != ' ') return (*a < ' ') ? -swap : swap; } return 0; } return (int) (a_length-b_length); }
O0
c
compare_bin: pushq %rbp movq %rsp, %rbp movl %r8d, -0x58(%rbp) movl %ecx, %eax movl -0x58(%rbp), %ecx movl %eax, -0x54(%rbp) movq %rdx, %rax movl -0x54(%rbp), %edx movq %rax, -0x50(%rbp) movl %esi, %eax movq -0x50(%rbp), %rsi movl %eax, -0x44(%rbp) movq %rdi, %r8 movl -0x44(%rbp), %edi movb %r9b, %al movq %r8, -0x10(%rbp) movl %edi, -0x14(%rbp) movq %rsi, -0x20(%rbp) movl %edx, -0x24(%rbp) movb %cl, -0x25(%rbp) movb %al, -0x26(%rbp) movl -0x14(%rbp), %eax cmpl -0x24(%rbp), %eax jae 0xfabe0 movl -0x14(%rbp), %eax movl %eax, -0x5c(%rbp) jmp 0xfabe6 movl -0x24(%rbp), %eax movl %eax, -0x5c(%rbp) movl -0x5c(%rbp), %eax movl %eax, -0x2c(%rbp) movq -0x10(%rbp), %rax movl -0x2c(%rbp), %ecx addq %rcx, %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax cmpq -0x38(%rbp), %rax jae 0xfac3f movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x10(%rbp) movzbl (%rax), %eax movq -0x20(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movzbl (%rcx), %ecx subl %ecx, %eax movl %eax, -0x3c(%rbp) cmpl $0x0, %eax je 0xfac3d movl -0x3c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0xfad10 jmp 0xfabfa movsbl -0x25(%rbp), %eax cmpl $0x0, %eax je 0xfac5c movl -0x24(%rbp), %eax cmpl -0x14(%rbp), %eax jae 0xfac5c movl $0x0, -0x4(%rbp) jmp 0xfad10 movsbl -0x26(%rbp), %eax cmpl $0x0, %eax je 0xfad07 movl -0x14(%rbp), %eax cmpl -0x24(%rbp), %eax je 0xfad07 movl $0x1, -0x40(%rbp) movl -0x14(%rbp), %eax cmpl -0x24(%rbp), %eax jae 0xfac99 movl -0x24(%rbp), %eax movl %eax, -0x14(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x10(%rbp) movl $0xffffffff, -0x40(%rbp) # imm = 0xFFFFFFFF movq -0x10(%rbp), %rax movl -0x14(%rbp), %ecx addq %rcx, %rax movl -0x2c(%rbp), %ecx movl %ecx, %edx xorl %ecx, %ecx subq %rdx, %rcx addq %rcx, %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax cmpq -0x38(%rbp), %rax jae 0xfacfe movq -0x10(%rbp), %rax movzbl (%rax), %eax cmpl $0x20, %eax je 0xfacee movq -0x10(%rbp), %rax movzbl (%rax), %eax cmpl $0x20, %eax jge 0xface0 xorl %eax, %eax subl -0x40(%rbp), %eax movl %eax, -0x60(%rbp) jmp 0xface6 movl -0x40(%rbp), %eax movl %eax, -0x60(%rbp) movl -0x60(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0xfad10 jmp 0xfacf0 movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0xfacb4 movl $0x0, -0x4(%rbp) jmp 0xfad10 movl -0x14(%rbp), %eax subl -0x24(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw %cs:(%rax,%rax)
compare_bin: push rbp mov rbp, rsp mov [rbp+var_58], r8d mov eax, ecx mov ecx, [rbp+var_58] mov [rbp+var_54], eax mov rax, rdx mov edx, [rbp+var_54] mov [rbp+var_50], rax mov eax, esi mov rsi, [rbp+var_50] mov [rbp+var_44], eax mov r8, rdi mov edi, [rbp+var_44] mov al, r9b mov [rbp+var_10], r8 mov [rbp+var_14], edi mov [rbp+var_20], rsi mov [rbp+var_24], edx mov [rbp+var_25], cl mov [rbp+var_26], al mov eax, [rbp+var_14] cmp eax, [rbp+var_24] jnb short loc_FABE0 mov eax, [rbp+var_14] mov [rbp+var_5C], eax jmp short loc_FABE6 loc_FABE0: mov eax, [rbp+var_24] mov [rbp+var_5C], eax loc_FABE6: mov eax, [rbp+var_5C] mov [rbp+var_2C], eax mov rax, [rbp+var_10] mov ecx, [rbp+var_2C] add rax, rcx mov [rbp+var_38], rax loc_FABFA: mov rax, [rbp+var_10] cmp rax, [rbp+var_38] jnb short loc_FAC3F mov rax, [rbp+var_10] mov rcx, rax add rcx, 1 mov [rbp+var_10], rcx movzx eax, byte ptr [rax] mov rcx, [rbp+var_20] mov rdx, rcx add rdx, 1 mov [rbp+var_20], rdx movzx ecx, byte ptr [rcx] sub eax, ecx mov [rbp+var_3C], eax cmp eax, 0 jz short loc_FAC3D mov eax, [rbp+var_3C] mov [rbp+var_4], eax jmp loc_FAD10 loc_FAC3D: jmp short loc_FABFA loc_FAC3F: movsx eax, [rbp+var_25] cmp eax, 0 jz short loc_FAC5C mov eax, [rbp+var_24] cmp eax, [rbp+var_14] jnb short loc_FAC5C mov [rbp+var_4], 0 jmp loc_FAD10 loc_FAC5C: movsx eax, [rbp+var_26] cmp eax, 0 jz loc_FAD07 mov eax, [rbp+var_14] cmp eax, [rbp+var_24] jz loc_FAD07 mov [rbp+var_40], 1 mov eax, [rbp+var_14] cmp eax, [rbp+var_24] jnb short loc_FAC99 mov eax, [rbp+var_24] mov [rbp+var_14], eax mov rax, [rbp+var_20] mov [rbp+var_10], rax mov [rbp+var_40], 0FFFFFFFFh loc_FAC99: mov rax, [rbp+var_10] mov ecx, [rbp+var_14] add rax, rcx mov ecx, [rbp+var_2C] mov edx, ecx xor ecx, ecx sub rcx, rdx add rax, rcx mov [rbp+var_38], rax loc_FACB4: mov rax, [rbp+var_10] cmp rax, [rbp+var_38] jnb short loc_FACFE mov rax, [rbp+var_10] movzx eax, byte ptr [rax] cmp eax, 20h ; ' ' jz short loc_FACEE mov rax, [rbp+var_10] movzx eax, byte ptr [rax] cmp eax, 20h ; ' ' jge short loc_FACE0 xor eax, eax sub eax, [rbp+var_40] mov [rbp+var_60], eax jmp short loc_FACE6 loc_FACE0: mov eax, [rbp+var_40] mov [rbp+var_60], eax loc_FACE6: mov eax, [rbp+var_60] mov [rbp+var_4], eax jmp short loc_FAD10 loc_FACEE: jmp short $+2 loc_FACF0: mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp short loc_FACB4 loc_FACFE: mov [rbp+var_4], 0 jmp short loc_FAD10 loc_FAD07: mov eax, [rbp+var_14] sub eax, [rbp+var_24] mov [rbp+var_4], eax loc_FAD10: mov eax, [rbp+var_4] pop rbp retn
long long compare_bin( unsigned __int8 *a1, unsigned int a2, unsigned __int8 *a3, unsigned int a4, char a5, char a6) { unsigned __int8 *v6; // rax unsigned __int8 *v7; // rcx unsigned int v10; // [rsp+4h] [rbp-5Ch] unsigned int v11; // [rsp+20h] [rbp-40h] unsigned __int8 *v12; // [rsp+28h] [rbp-38h] unsigned int v15; // [rsp+4Ch] [rbp-14h] unsigned __int8 *v16; // [rsp+50h] [rbp-10h] v16 = a1; v15 = a2; if ( a2 >= a4 ) v10 = a4; else v10 = a2; while ( v16 < &a1[v10] ) { v6 = v16++; v7 = a3++; if ( *v6 != *v7 ) return (unsigned int)(*v6 - *v7); } if ( a5 && a4 < a2 ) { return 0; } else if ( !a6 || a2 == a4 ) { return a2 - a4; } else { v11 = 1; if ( a2 < a4 ) { v15 = a4; v16 = a3; v11 = -1; } v12 = &v16[v15 - v10]; while ( 1 ) { if ( v16 >= v12 ) return 0; if ( *v16 != 32 ) break; ++v16; } if ( *v16 >= 0x20u ) return v11; else return -v11; } }
compare_bin: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x58],R8D MOV EAX,ECX MOV ECX,dword ptr [RBP + -0x58] MOV dword ptr [RBP + -0x54],EAX MOV RAX,RDX MOV EDX,dword ptr [RBP + -0x54] MOV qword ptr [RBP + -0x50],RAX MOV EAX,ESI MOV RSI,qword ptr [RBP + -0x50] MOV dword ptr [RBP + -0x44],EAX MOV R8,RDI MOV EDI,dword ptr [RBP + -0x44] MOV AL,R9B MOV qword ptr [RBP + -0x10],R8 MOV dword ptr [RBP + -0x14],EDI MOV qword ptr [RBP + -0x20],RSI MOV dword ptr [RBP + -0x24],EDX MOV byte ptr [RBP + -0x25],CL MOV byte ptr [RBP + -0x26],AL MOV EAX,dword ptr [RBP + -0x14] CMP EAX,dword ptr [RBP + -0x24] JNC 0x001fabe0 MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x5c],EAX JMP 0x001fabe6 LAB_001fabe0: MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x5c],EAX LAB_001fabe6: MOV EAX,dword ptr [RBP + -0x5c] MOV dword ptr [RBP + -0x2c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x2c] ADD RAX,RCX MOV qword ptr [RBP + -0x38],RAX LAB_001fabfa: MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x38] JNC 0x001fac3f MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x10],RCX MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x20] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOVZX ECX,byte ptr [RCX] SUB EAX,ECX MOV dword ptr [RBP + -0x3c],EAX CMP EAX,0x0 JZ 0x001fac3d MOV EAX,dword ptr [RBP + -0x3c] MOV dword ptr [RBP + -0x4],EAX JMP 0x001fad10 LAB_001fac3d: JMP 0x001fabfa LAB_001fac3f: MOVSX EAX,byte ptr [RBP + -0x25] CMP EAX,0x0 JZ 0x001fac5c MOV EAX,dword ptr [RBP + -0x24] CMP EAX,dword ptr [RBP + -0x14] JNC 0x001fac5c MOV dword ptr [RBP + -0x4],0x0 JMP 0x001fad10 LAB_001fac5c: MOVSX EAX,byte ptr [RBP + -0x26] CMP EAX,0x0 JZ 0x001fad07 MOV EAX,dword ptr [RBP + -0x14] CMP EAX,dword ptr [RBP + -0x24] JZ 0x001fad07 MOV dword ptr [RBP + -0x40],0x1 MOV EAX,dword ptr [RBP + -0x14] CMP EAX,dword ptr [RBP + -0x24] JNC 0x001fac99 MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x14],EAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x10],RAX MOV dword ptr [RBP + -0x40],0xffffffff LAB_001fac99: MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x14] ADD RAX,RCX MOV ECX,dword ptr [RBP + -0x2c] MOV EDX,ECX XOR ECX,ECX SUB RCX,RDX ADD RAX,RCX MOV qword ptr [RBP + -0x38],RAX LAB_001facb4: MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x38] JNC 0x001facfe MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX] CMP EAX,0x20 JZ 0x001facee MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX] CMP EAX,0x20 JGE 0x001face0 XOR EAX,EAX SUB EAX,dword ptr [RBP + -0x40] MOV dword ptr [RBP + -0x60],EAX JMP 0x001face6 LAB_001face0: MOV EAX,dword ptr [RBP + -0x40] MOV dword ptr [RBP + -0x60],EAX LAB_001face6: MOV EAX,dword ptr [RBP + -0x60] MOV dword ptr [RBP + -0x4],EAX JMP 0x001fad10 LAB_001facee: JMP 0x001facf0 LAB_001facf0: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX JMP 0x001facb4 LAB_001facfe: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001fad10 LAB_001fad07: MOV EAX,dword ptr [RBP + -0x14] SUB EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x4],EAX LAB_001fad10: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int compare_bin(byte *param_1,uint param_2,byte *param_3,uint param_4,char param_5,char param_6) { byte bVar1; byte bVar2; byte *pbVar3; int local_68; uint local_64; int local_48; byte *local_28; uint local_1c; byte *local_18; local_64 = param_4; if (param_2 < param_4) { local_64 = param_2; } local_28 = param_3; local_18 = param_1; while (local_18 < param_1 + local_64) { bVar1 = *local_18; bVar2 = *local_28; local_28 = local_28 + 1; local_18 = local_18 + 1; if ((uint)bVar1 - (uint)bVar2 != 0) { return (uint)bVar1 - (uint)bVar2; } } if ((param_5 != '\0') && (param_4 < param_2)) { return 0; } if ((param_6 != '\0') && (param_2 != param_4)) { local_48 = 1; local_1c = param_2; if (param_2 < param_4) { local_18 = local_28; local_48 = -1; local_1c = param_4; } pbVar3 = local_18 + ((ulong)local_1c - (ulong)local_64); while( true ) { if (pbVar3 <= local_18) { return 0; } if (*local_18 != 0x20) break; local_18 = local_18 + 1; } if (*local_18 < 0x20) { local_68 = -local_48; } else { local_68 = local_48; } return local_68; } return param_2 - param_4; }
49,480
my_round_up_to_next_power
eloqsql/include/my_bit.h
static inline uint32 my_round_up_to_next_power(uint32 v) { v--; /* 01100000000000000000000000001010 */ v|= v >> 1; /* 01110000000000000000000000001111 */ v|= v >> 2; /* 01111100000000000000000000001111 */ v|= v >> 4; /* 01111111110000000000000000001111 */ v|= v >> 8; /* 01111111111111111100000000001111 */ v|= v >> 16; /* 01111111111111111111111111111111 */ return v+1; /* 10000000000000000000000000000000 */ }
O0
c
my_round_up_to_next_power: pushq %rbp movq %rsp, %rbp movl %edi, -0x4(%rbp) movl -0x4(%rbp), %eax addl $-0x1, %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax shrl %eax orl -0x4(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax shrl $0x2, %eax orl -0x4(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax shrl $0x4, %eax orl -0x4(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax shrl $0x8, %eax orl -0x4(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax shrl $0x10, %eax orl -0x4(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addl $0x1, %eax popq %rbp retq nopw %cs:(%rax,%rax)
my_round_up_to_next_power_0: push rbp mov rbp, rsp mov [rbp+var_4], edi mov eax, [rbp+var_4] add eax, 0FFFFFFFFh mov [rbp+var_4], eax mov eax, [rbp+var_4] shr eax, 1 or eax, [rbp+var_4] mov [rbp+var_4], eax mov eax, [rbp+var_4] shr eax, 2 or eax, [rbp+var_4] mov [rbp+var_4], eax mov eax, [rbp+var_4] shr eax, 4 or eax, [rbp+var_4] mov [rbp+var_4], eax mov eax, [rbp+var_4] shr eax, 8 or eax, [rbp+var_4] mov [rbp+var_4], eax mov eax, [rbp+var_4] shr eax, 10h or eax, [rbp+var_4] mov [rbp+var_4], eax mov eax, [rbp+var_4] add eax, 1 pop rbp retn
long long my_round_up_to_next_power_0(int a1) { unsigned int v2; // [rsp+0h] [rbp-4h] unsigned int v3; // [rsp+0h] [rbp-4h] v2 = (a1 - 1) | ((unsigned int)(a1 - 1) >> 1) | (((a1 - 1) | ((unsigned int)(a1 - 1) >> 1)) >> 2); v3 = v2 | (v2 >> 4) | ((v2 | (v2 >> 4)) >> 8); return (v3 | HIWORD(v3)) + 1; }
my_round_up_to_next_power: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x4],EDI MOV EAX,dword ptr [RBP + -0x4] ADD EAX,-0x1 MOV dword ptr [RBP + -0x4],EAX MOV EAX,dword ptr [RBP + -0x4] SHR EAX,0x1 OR EAX,dword ptr [RBP + -0x4] MOV dword ptr [RBP + -0x4],EAX MOV EAX,dword ptr [RBP + -0x4] SHR EAX,0x2 OR EAX,dword ptr [RBP + -0x4] MOV dword ptr [RBP + -0x4],EAX MOV EAX,dword ptr [RBP + -0x4] SHR EAX,0x4 OR EAX,dword ptr [RBP + -0x4] MOV dword ptr [RBP + -0x4],EAX MOV EAX,dword ptr [RBP + -0x4] SHR EAX,0x8 OR EAX,dword ptr [RBP + -0x4] MOV dword ptr [RBP + -0x4],EAX MOV EAX,dword ptr [RBP + -0x4] SHR EAX,0x10 OR EAX,dword ptr [RBP + -0x4] MOV dword ptr [RBP + -0x4],EAX MOV EAX,dword ptr [RBP + -0x4] ADD EAX,0x1 POP RBP RET
int my_round_up_to_next_power(int param_1) { uint uVar1; uVar1 = param_1 - 1U >> 1 | param_1 - 1U; uVar1 = uVar1 >> 2 | uVar1; uVar1 = uVar1 >> 4 | uVar1; uVar1 = uVar1 >> 8 | uVar1; return (uVar1 >> 0x10 | uVar1) + 1; }
49,481
getEGLErrorString
untodesu[P]riteg/build_O3/_deps/glfw-src/src/egl_context.c
static const char* getEGLErrorString(EGLint error) { switch (error) { case EGL_SUCCESS: return "Success"; case EGL_NOT_INITIALIZED: return "EGL is not or could not be initialized"; case EGL_BAD_ACCESS: return "EGL cannot access a requested resource"; case EGL_BAD_ALLOC: return "EGL failed to allocate resources for the requested operation"; case EGL_BAD_ATTRIBUTE: return "An unrecognized attribute or attribute value was passed in the attribute list"; case EGL_BAD_CONTEXT: return "An EGLContext argument does not name a valid EGL rendering context"; case EGL_BAD_CONFIG: return "An EGLConfig argument does not name a valid EGL frame buffer configuration"; case EGL_BAD_CURRENT_SURFACE: return "The current surface of the calling thread is a window, pixel buffer or pixmap that is no longer valid"; case EGL_BAD_DISPLAY: return "An EGLDisplay argument does not name a valid EGL display connection"; case EGL_BAD_SURFACE: return "An EGLSurface argument does not name a valid surface configured for GL rendering"; case EGL_BAD_MATCH: return "Arguments are inconsistent"; case EGL_BAD_PARAMETER: return "One or more argument values are invalid"; case EGL_BAD_NATIVE_PIXMAP: return "A NativePixmapType argument does not refer to a valid native pixmap"; case EGL_BAD_NATIVE_WINDOW: return "A NativeWindowType argument does not refer to a valid native window"; case EGL_CONTEXT_LOST: return "The application must destroy all contexts and reinitialise"; default: return "ERROR: UNKNOWN EGL ERROR"; } }
O3
c
getEGLErrorString: addl $0xffffd000, %edi # imm = 0xFFFFD000 cmpl $0xe, %edi ja 0x274c8 movl %edi, %eax leaq 0x60708(%rip), %rcx # 0x87bc8 movslq (%rcx,%rax,4), %rax addq %rcx, %rax retq leaq 0x60626(%rip), %rax # 0x87af5 retq
getEGLErrorString: add edi, 0FFFFD000h cmp edi, 0Eh ja short loc_274C8 mov eax, edi lea rcx, unk_87BC8 movsxd rax, dword ptr [rcx+rax*4] add rax, rcx retn loc_274C8: lea rax, aErrorUnknownEg; "ERROR: UNKNOWN EGL ERROR" retn
const char * getEGLErrorString(int a1) { unsigned int v1; // edi v1 = a1 - 12288; if ( v1 > 0xE ) return "ERROR: UNKNOWN EGL ERROR"; else return (char *)dword_87BC8 + dword_87BC8[v1]; }
getEGLErrorString: ADD EDI,0xffffd000 CMP EDI,0xe JA 0x001274c8 MOV EAX,EDI LEA RCX,[0x187bc8] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX RET LAB_001274c8: LEA RAX,[0x187af5] RET
char * getEGLErrorString(int param_1) { if (param_1 - 0x3000U < 0xf) { return &DAT_00187bc8 + *(int *)(&DAT_00187bc8 + (ulong)(param_1 - 0x3000U) * 4); } return "ERROR: UNKNOWN EGL ERROR"; }
49,482
ma_insert_dynamic
eloqsql/libmariadb/libmariadb/ma_array.c
my_bool ma_insert_dynamic(DYNAMIC_ARRAY *array, void *element) { void *buffer; if (array->elements == array->max_element) { /* Call only when necessary */ if (!(buffer=ma_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
ma_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 0x746bb movq -0x10(%rbp), %rdi callq 0x74710 movq %rax, -0x20(%rbp) cmpq $0x0, %rax jne 0x746b9 movb $0x1, -0x1(%rbp) jmp 0x74701 jmp 0x746e7 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 0x380b0 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
ma_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_746BB mov rdi, [rbp+var_10] call ma_alloc_dynamic mov [rbp+var_20], rax cmp rax, 0 jnz short loc_746B9 mov [rbp+var_1], 1 jmp short loc_74701 loc_746B9: jmp short loc_746E7 loc_746BB: 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_746E7: 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_74701: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char ma_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 = ma_alloc_dynamic(a1); if ( v3 ) goto LABEL_6; return 1; }
ma_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 0x001746bb MOV RDI,qword ptr [RBP + -0x10] CALL 0x00174710 MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JNZ 0x001746b9 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00174701 LAB_001746b9: JMP 0x001746e7 LAB_001746bb: 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_001746e7: 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 0x001380b0 MOV byte ptr [RBP + -0x1],0x0 LAB_00174701: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 ma_insert_dynamic(long *param_1,void *param_2) { void *local_28; if ((int)param_1[1] == *(int *)((long)param_1 + 0xc)) { local_28 = (void *)ma_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; }
49,483
CLI::Formatter::make_positionals[abi:cxx11](CLI::App const*) const
MikePodsytnik[P]TCRtrie/build_O1/_deps/cli11-src/include/CLI/impl/Formatter_inl.hpp
CLI11_INLINE std::string Formatter::make_positionals(const App *app) const { std::vector<const Option *> opts = app->get_options([](const Option *opt) { return !opt->get_group().empty() && opt->get_positional(); }); if(opts.empty()) return {}; return make_group(get_label("Positionals"), true, opts); }
O1
cpp
CLI::Formatter::make_positionals[abi:cxx11](CLI::App const*) const: pushq %r15 pushq %r14 pushq %rbx subq $0xa0, %rsp movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx xorps %xmm0, %xmm0 movaps %xmm0, 0x20(%rsp) leaq 0x1e45c(%rip), %rax # 0x2c982 movq %rax, 0x38(%rsp) leaq 0x1e46a(%rip), %rax # 0x2c99c movq %rax, 0x30(%rsp) movq 0xe0(%rdx), %rsi subq 0xd8(%rdx), %rsi sarq $0x3, %rsi leaq 0x8(%rsp), %rdi leaq 0x7(%rsp), %rdx callq 0x130c0 movq 0xd8(%r15), %rax movq 0xe0(%r15), %rcx cmpq %rcx, %rax je 0xe583 movq 0x8(%rsp), %rdx movq (%rax), %rsi movq %rsi, (%rdx) addq $0x8, %rax addq $0x8, %rdx cmpq %rcx, %rax jne 0xe570 cmpq $0x0, 0x30(%rsp) je 0xe5ab movq 0x8(%rsp), %rdi movq 0x10(%rsp), %rsi leaq 0x20(%rsp), %rdx callq 0x13165 cmpq 0x10(%rsp), %rax je 0xe5ab movq %rax, 0x10(%rsp) movq 0x30(%rsp), %rax testq %rax, %rax je 0xe5c4 leaq 0x20(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x8(%rsp), %rax cmpq 0x10(%rsp), %rax je 0xe688 leaq 0x70(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x2978a(%rip), %rsi # 0x37d6e leaq 0x2978e(%rip), %rdx # 0x37d79 leaq 0x60(%rsp), %rdi callq 0x12040 leaq 0x80(%rsp), %rdi leaq 0x60(%rsp), %rdx movq %r14, %rsi callq 0x2c8e6 leaq 0x48(%rsp), %rdi leaq 0x8(%rsp), %rsi callq 0x2c75a movq (%r14), %rax leaq 0x80(%rsp), %rdx leaq 0x48(%rsp), %r8 movq %rbx, %rdi movq %r14, %rsi movl $0x1, %ecx callq *0x18(%rax) movq 0x48(%rsp), %rdi testq %rdi, %rdi je 0xe64e movq 0x58(%rsp), %rsi subq %rdi, %rsi callq 0x7430 leaq 0x90(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xe66f movq 0x90(%rsp), %rsi incq %rsi callq 0x7430 movq 0x60(%rsp), %rdi cmpq %r15, %rdi je 0xe69b movq 0x70(%rsp), %rsi incq %rsi callq 0x7430 jmp 0xe69b leaq 0x10(%rbx), %rax movq %rax, (%rbx) movq $0x0, 0x8(%rbx) movb $0x0, 0x10(%rbx) movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0xe6b2 movq 0x18(%rsp), %rsi subq %rdi, %rsi callq 0x7430 movq %rbx, %rax addq $0xa0, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx movq 0x48(%rsp), %rdi testq %rdi, %rdi je 0xe6e1 movq 0x58(%rsp), %rsi subq %rdi, %rsi callq 0x7430 jmp 0xe6e1 movq %rax, %rbx leaq 0x90(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xe707 movq 0x90(%rsp), %rsi incq %rsi callq 0x7430 jmp 0xe707 movq %rax, %rbx movq 0x60(%rsp), %rdi cmpq %r15, %rdi je 0xe723 movq 0x70(%rsp), %rsi incq %rsi callq 0x7430 jmp 0xe723 movq %rax, %rbx movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0xe776 movq 0x18(%rsp), %rsi subq %rdi, %rsi callq 0x7430 jmp 0xe776 jmp 0xe77e movq %rax, %rbx movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0xe75d movq 0x18(%rsp), %rsi subq %rdi, %rsi callq 0x7430 jmp 0xe75d movq %rax, %rbx movq 0x30(%rsp), %rax testq %rax, %rax je 0xe776 leaq 0x20(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq %rbx, %rdi callq 0x7780 movq %rax, %rdi callq 0xc892
_ZNK3CLI9Formatter16make_positionalsB5cxx11EPKNS_3AppE: push r15 push r14 push rbx sub rsp, 0A0h mov r15, rdx mov r14, rsi mov rbx, rdi xorps xmm0, xmm0 movaps [rsp+0B8h+var_98], xmm0 lea rax, _ZNSt17_Function_handlerIFbPKN3CLI6OptionEEZNKS0_9Formatter16make_positionalsB5cxx11EPKNS0_3AppEEUlS3_E_E9_M_invokeERKSt9_Any_dataOS3_; std::_Function_handler<bool ()(CLI::Option const*),CLI::Formatter::make_positionals(CLI::App const*)::{lambda(CLI::Option const*)#1}>::_M_invoke(std::_Any_data const&,CLI::Option const*&&) mov [rsp+0B8h+var_80], rax lea rax, _ZNSt17_Function_handlerIFbPKN3CLI6OptionEEZNKS0_9Formatter16make_positionalsB5cxx11EPKNS0_3AppEEUlS3_E_E10_M_managerERSt9_Any_dataRKSB_St18_Manager_operation; std::_Function_handler<bool ()(CLI::Option const*),CLI::Formatter::make_positionals(CLI::App const*)::{lambda(CLI::Option const*)#1}>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsp+0B8h+var_88], rax mov rsi, [rdx+0E0h] sub rsi, [rdx+0D8h] sar rsi, 3 lea rdi, [rsp+0B8h+var_B0] lea rdx, [rsp+0B8h+var_B1] call _ZNSt6vectorIPKN3CLI6OptionESaIS3_EEC2EmRKS4_; std::vector<CLI::Option const*>::vector(ulong,std::allocator<CLI::Option const*> const&) mov rax, [r15+0D8h] mov rcx, [r15+0E0h] cmp rax, rcx jz short loc_E583 mov rdx, [rsp+0B8h+var_B0] loc_E570: mov rsi, [rax] mov [rdx], rsi add rax, 8 add rdx, 8 cmp rax, rcx jnz short loc_E570 loc_E583: cmp [rsp+0B8h+var_88], 0 jz short loc_E5AB mov rdi, [rsp+0B8h+var_B0] mov rsi, [rsp+0B8h+var_A8] lea rdx, [rsp+0B8h+var_98] call _ZSt11__remove_ifIN9__gnu_cxx17__normal_iteratorIPPKN3CLI6OptionESt6vectorIS5_SaIS5_EEEENS0_5__ops10_Iter_predIZNKS2_3App11get_optionsESt8functionIFbS5_EEEUlS5_E_EEET_SJ_SJ_T0_; std::__remove_if<__gnu_cxx::__normal_iterator<CLI::Option const**,std::vector<CLI::Option const*>>,__gnu_cxx::__ops::_Iter_pred<CLI::App::get_options(std::function<bool ()(CLI::Option const*)>)::{lambda(CLI::Option const*)#1}>>(__gnu_cxx::__normal_iterator<CLI::Option const**,std::vector<CLI::Option const*>>,__gnu_cxx::__normal_iterator<CLI::Option const**,std::vector<CLI::Option const*>>,__gnu_cxx::__ops::_Iter_pred<CLI::App::get_options(std::function<bool ()(CLI::Option const*)>)::{lambda(CLI::Option const*)#1}>) cmp rax, [rsp+0B8h+var_A8] jz short loc_E5AB mov [rsp+0B8h+var_A8], rax loc_E5AB: mov rax, [rsp+0B8h+var_88] test rax, rax jz short loc_E5C4 lea rdi, [rsp+0B8h+var_98] mov rsi, rdi mov edx, 3 call rax loc_E5C4: mov rax, [rsp+0B8h+var_B0] cmp rax, [rsp+0B8h+var_A8] jz loc_E688 lea r15, [rsp+0B8h+var_48] mov [r15-10h], r15 lea rsi, aPositionals; "Positionals" lea rdx, aPositionals+0Bh; "" lea rdi, [rsp+0B8h+var_58] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+0B8h+var_38] lea rdx, [rsp+0B8h+var_58] mov rsi, r14 call _ZNK3CLI13FormatterBase9get_labelENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::FormatterBase::get_label(std::string) lea rdi, [rsp+0B8h+var_70] lea rsi, [rsp+0B8h+var_B0] call _ZNSt6vectorIPKN3CLI6OptionESaIS3_EEC2ERKS5_; std::vector<CLI::Option const*>::vector(std::vector<CLI::Option const*> const&) mov rax, [r14] lea rdx, [rsp+0B8h+var_38] lea r8, [rsp+0B8h+var_70] mov rdi, rbx mov rsi, r14 mov ecx, 1 call qword ptr [rax+18h] mov rdi, [rsp+0B8h+var_70]; void * test rdi, rdi jz short loc_E64E mov rsi, [rsp+0B8h+var_60] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_E64E: lea rax, [rsp+0B8h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_E66F mov rsi, [rsp+0B8h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_E66F: mov rdi, [rsp+0B8h+var_58]; void * cmp rdi, r15 jz short loc_E69B mov rsi, [rsp+0B8h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_E69B loc_E688: lea rax, [rbx+10h] mov [rbx], rax mov qword ptr [rbx+8], 0 mov byte ptr [rbx+10h], 0 loc_E69B: mov rdi, [rsp+0B8h+var_B0]; void * test rdi, rdi jz short loc_E6B2 mov rsi, [rsp+0B8h+var_A0] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_E6B2: mov rax, rbx add rsp, 0A0h pop rbx pop r14 pop r15 retn mov rbx, rax mov rdi, [rsp+0B8h+var_70]; void * test rdi, rdi jz short loc_E6E1 mov rsi, [rsp+0B8h+var_60] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_E6E1 mov rbx, rax loc_E6E1: lea rax, [rsp+0B8h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_E707 mov rsi, [rsp+0B8h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_E707 mov rbx, rax loc_E707: mov rdi, [rsp+0B8h+var_58]; void * cmp rdi, r15 jz short loc_E723 mov rsi, [rsp+0B8h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_E723 mov rbx, rax loc_E723: mov rdi, [rsp+0B8h+var_B0]; void * test rdi, rdi jz short loc_E776 mov rsi, [rsp+0B8h+var_A0] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_E776 jmp short loc_E77E mov rbx, rax mov rdi, [rsp+0B8h+var_B0]; void * test rdi, rdi jz short loc_E75D mov rsi, [rsp+0B8h+var_A0] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_E75D mov rbx, rax loc_E75D: mov rax, [rsp+0B8h+var_88] test rax, rax jz short loc_E776 lea rdi, [rsp+0B8h+var_98] mov rsi, rdi mov edx, 3 call rax loc_E776: mov rdi, rbx call __Unwind_Resume loc_E77E: mov rdi, rax call __clang_call_terminate
long long CLI::Formatter::make_positionals[abi:cxx11](long long a1, long long a2, long long a3) { _QWORD *v4; // rax _QWORD *v5; // rcx _QWORD *v6; // rdx long long v7; // rax char v9; // [rsp+7h] [rbp-B1h] BYREF void *v10; // [rsp+8h] [rbp-B0h] BYREF void *v11; // [rsp+10h] [rbp-A8h] long long v12; // [rsp+18h] [rbp-A0h] __int128 v13; // [rsp+20h] [rbp-98h] BYREF long long ( *v14)(); // [rsp+30h] [rbp-88h] long long ( *v15)(); // [rsp+38h] [rbp-80h] void *v16[3]; // [rsp+48h] [rbp-70h] BYREF void *v17[2]; // [rsp+60h] [rbp-58h] BYREF _QWORD v18[2]; // [rsp+70h] [rbp-48h] BYREF void *v19[2]; // [rsp+80h] [rbp-38h] BYREF long long v20; // [rsp+90h] [rbp-28h] BYREF v13 = 0LL; v15 = std::_Function_handler<bool ()(CLI::Option const*),CLI::Formatter::make_positionals[abi:cxx11](CLI::App const*)::{lambda(CLI::Option const*)#1}>::_M_invoke; v14 = std::_Function_handler<bool ()(CLI::Option const*),CLI::Formatter::make_positionals[abi:cxx11](CLI::App const*)::{lambda(CLI::Option const*)#1}>::_M_manager; std::vector<CLI::Option const*>::vector(&v10, (long long)(*(_QWORD *)(a3 + 224) - *(_QWORD *)(a3 + 216)) >> 3, &v9); v4 = *(_QWORD **)(a3 + 216); v5 = *(_QWORD **)(a3 + 224); if ( v4 != v5 ) { v6 = v10; do *v6++ = *v4++; while ( v4 != v5 ); } if ( v14 ) { v7 = std::__remove_if<__gnu_cxx::__normal_iterator<CLI::Option const**,std::vector<CLI::Option const*>>,__gnu_cxx::__ops::_Iter_pred<CLI::App::get_options(std::function<bool ()(CLI::Option const*)>)::{lambda(CLI::Option const*)#1}>>( v10, v11, &v13); if ( (void *)v7 != v11 ) v11 = (void *)v7; } if ( v14 ) ((void ( *)(__int128 *, __int128 *, long long))v14)(&v13, &v13, 3LL); if ( v10 == v11 ) { *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; } else { v17[0] = v18; std::string::_M_construct<char const*>(v17, "Positionals", ""); CLI::FormatterBase::get_label(v19, a2, v17); std::vector<CLI::Option const*>::vector(v16, &v10); (*(void ( **)(long long, long long, void **, long long, void **))(*(_QWORD *)a2 + 24LL))(a1, a2, v19, 1LL, v16); if ( v16[0] ) operator delete(v16[0], (char *)v16[2] - (char *)v16[0]); if ( v19[0] != &v20 ) operator delete(v19[0], v20 + 1); if ( v17[0] != v18 ) operator delete(v17[0], v18[0] + 1LL); } if ( v10 ) operator delete(v10, v12 - (_QWORD)v10); return a1; }
make_positionals[abi:cxx11]: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0xa0 MOV R15,RDX MOV R14,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x20],XMM0 LEA RAX,[0x12c982] MOV qword ptr [RSP + 0x38],RAX LEA RAX,[0x12c99c] MOV qword ptr [RSP + 0x30],RAX MOV RSI,qword ptr [RDX + 0xe0] SUB RSI,qword ptr [RDX + 0xd8] SAR RSI,0x3 LAB_0010e549: LEA RDI,[RSP + 0x8] LEA RDX,[RSP + 0x7] CALL 0x001130c0 MOV RAX,qword ptr [R15 + 0xd8] MOV RCX,qword ptr [R15 + 0xe0] CMP RAX,RCX JZ 0x0010e583 MOV RDX,qword ptr [RSP + 0x8] LAB_0010e570: MOV RSI,qword ptr [RAX] MOV qword ptr [RDX],RSI ADD RAX,0x8 ADD RDX,0x8 CMP RAX,RCX JNZ 0x0010e570 LAB_0010e583: CMP qword ptr [RSP + 0x30],0x0 JZ 0x0010e5ab MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x10] LAB_0010e595: LEA RDX,[RSP + 0x20] CALL 0x00113165 CMP RAX,qword ptr [RSP + 0x10] JZ 0x0010e5ab MOV qword ptr [RSP + 0x10],RAX LAB_0010e5ab: MOV RAX,qword ptr [RSP + 0x30] TEST RAX,RAX JZ 0x0010e5c4 LAB_0010e5b5: LEA RDI,[RSP + 0x20] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_0010e5c4: MOV RAX,qword ptr [RSP + 0x8] CMP RAX,qword ptr [RSP + 0x10] JZ 0x0010e688 LEA R15,[RSP + 0x70] MOV qword ptr [R15 + -0x10],R15 LAB_0010e5dd: LEA RSI,[0x137d6e] LEA RDX,[0x137d79] LEA RDI,[RSP + 0x60] CALL 0x00112040 LAB_0010e5f5: LEA RDI,[RSP + 0x80] LEA RDX,[RSP + 0x60] MOV RSI,R14 CALL 0x0012c8e6 LAB_0010e60a: LEA RDI,[RSP + 0x48] LEA RSI,[RSP + 0x8] CALL 0x0012c75a MOV RAX,qword ptr [R14] LAB_0010e61c: LEA RDX,[RSP + 0x80] LEA R8,[RSP + 0x48] MOV RDI,RBX MOV RSI,R14 MOV ECX,0x1 CALL qword ptr [RAX + 0x18] MOV RDI,qword ptr [RSP + 0x48] TEST RDI,RDI JZ 0x0010e64e MOV RSI,qword ptr [RSP + 0x58] SUB RSI,RDI CALL 0x00107430 LAB_0010e64e: LEA RAX,[RSP + 0x90] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0010e66f MOV RSI,qword ptr [RSP + 0x90] INC RSI CALL 0x00107430 LAB_0010e66f: MOV RDI,qword ptr [RSP + 0x60] CMP RDI,R15 JZ 0x0010e69b MOV RSI,qword ptr [RSP + 0x70] INC RSI CALL 0x00107430 JMP 0x0010e69b LAB_0010e688: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX MOV qword ptr [RBX + 0x8],0x0 MOV byte ptr [RBX + 0x10],0x0 LAB_0010e69b: MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x0010e6b2 MOV RSI,qword ptr [RSP + 0x18] SUB RSI,RDI CALL 0x00107430 LAB_0010e6b2: MOV RAX,RBX ADD RSP,0xa0 POP RBX POP R14 POP R15 RET
/* CLI::Formatter::make_positionals[abi:cxx11](CLI::App const*) const */ App * CLI::Formatter::make_positionals_abi_cxx11_(App *param_1) { int8 *puVar1; int8 *puVar2; long in_RDX; int8 *puVar3; long *in_RSI; int8 *local_b0; int8 *local_a8; long local_a0; int8 local_98; int8 uStack_90; code *local_88; code *local_80; void *local_70 [2]; long local_60; long *local_58 [2]; long local_48 [2]; long *local_38 [2]; long local_28 [2]; local_98 = 0; uStack_90 = 0; local_80 = std:: _Function_handler<bool(CLI::Option_const*),CLI::Formatter::make_positionals[abi:cxx11](CLI::App_const*)const::{lambda(CLI::Option_const*)#1}> ::_M_invoke; local_88 = std:: _Function_handler<bool(CLI::Option_const*),CLI::Formatter::make_positionals[abi:cxx11](CLI::App_const*)const::{lambda(CLI::Option_const*)#1}> ::_M_manager; /* try { // try from 0010e549 to 0010e557 has its CatchHandler @ 0010e75a */ std::vector<CLI::Option_const*,std::allocator<CLI::Option_const*>>::vector ((ulong)&local_b0, (allocator *)(*(long *)(in_RDX + 0xe0) - *(long *)(in_RDX + 0xd8) >> 3)); puVar1 = *(int8 **)(in_RDX + 0xe0); puVar3 = local_b0; for (puVar2 = *(int8 **)(in_RDX + 0xd8); puVar2 != puVar1; puVar2 = puVar2 + 1) { *puVar3 = *puVar2; puVar3 = puVar3 + 1; } /* try { // try from 0010e595 to 0010e59e has its CatchHandler @ 0010e73e */ if ((local_88 != (code *)0x0) && (puVar2 = (int8 *) std:: __remove_if<__gnu_cxx::__normal_iterator<CLI::Option_const**,std::vector<CLI::Option_const*,std::allocator<CLI::Option_const*>>>,__gnu_cxx::__ops::_Iter_pred<CLI::App::get_options(std::function<bool(CLI::Option_const*)>)const::_lambda(CLI::Option_const*)_1_>> (local_b0,local_a8,&local_98), puVar2 != local_a8)) { local_a8 = puVar2; } if (local_88 != (code *)0x0) { /* try { // try from 0010e5b5 to 0010e5c3 has its CatchHandler @ 0010e73c */ (*local_88)(&local_98,&local_98,3); } if (local_b0 == local_a8) { *(App **)param_1 = param_1 + 0x10; *(int8 *)(param_1 + 8) = 0; param_1[0x10] = (App)0x0; } else { /* try { // try from 0010e5dd to 0010e5f4 has its CatchHandler @ 0010e720 */ local_58[0] = local_48; std::__cxx11::string::_M_construct<char_const*>(local_58,"Positionals",""); /* try { // try from 0010e5f5 to 0010e609 has its CatchHandler @ 0010e704 */ FormatterBase::get_label(local_38); /* try { // try from 0010e60a to 0010e618 has its CatchHandler @ 0010e6de */ std::vector<CLI::Option_const*,std::allocator<CLI::Option_const*>>::vector ((vector<CLI::Option_const*,std::allocator<CLI::Option_const*>> *)local_70, (vector *)&local_b0); /* try { // try from 0010e61c to 0010e636 has its CatchHandler @ 0010e6c2 */ (**(code **)(*in_RSI + 0x18))(param_1); if (local_70[0] != (void *)0x0) { operator_delete(local_70[0],local_60 - (long)local_70[0]); } if (local_38[0] != local_28) { operator_delete(local_38[0],local_28[0] + 1); } if (local_58[0] != local_48) { operator_delete(local_58[0],local_48[0] + 1); } } if (local_b0 != (int8 *)0x0) { operator_delete(local_b0,local_a0 - (long)local_b0); } return param_1; }
49,484
my_lengthsp_utf32
eloqsql/strings/ctype-ucs2.c
static size_t my_lengthsp_utf32(CHARSET_INFO *cs __attribute__((unused)), const char *ptr, size_t length) { const char *end= ptr + length; DBUG_ASSERT((length % 4) == 0); while (end > ptr + 3 && end[-1] == ' ' && !end[-2] && !end[-3] && !end[-4]) end-= 4; return (size_t) (end - ptr); }
O0
c
my_lengthsp_utf32: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x20(%rbp) jmp 0xb973e jmp 0xb9740 movq -0x20(%rbp), %rcx movq -0x10(%rbp), %rdx addq $0x3, %rdx xorl %eax, %eax cmpq %rdx, %rcx movb %al, -0x21(%rbp) jbe 0xb9796 movq -0x20(%rbp), %rax movsbl -0x1(%rax), %ecx xorl %eax, %eax cmpl $0x20, %ecx movb %al, -0x21(%rbp) jne 0xb9796 movq -0x20(%rbp), %rcx xorl %eax, %eax cmpb $0x0, -0x2(%rcx) movb %al, -0x21(%rbp) jne 0xb9796 movq -0x20(%rbp), %rcx xorl %eax, %eax cmpb $0x0, -0x3(%rcx) movb %al, -0x21(%rbp) jne 0xb9796 movq -0x20(%rbp), %rax cmpb $0x0, -0x4(%rax) setne %al xorb $-0x1, %al movb %al, -0x21(%rbp) movb -0x21(%rbp), %al testb $0x1, %al jne 0xb979f jmp 0xb97ad movq -0x20(%rbp), %rax addq $-0x4, %rax movq %rax, -0x20(%rbp) jmp 0xb9740 movq -0x20(%rbp), %rax movq -0x10(%rbp), %rcx subq %rcx, %rax popq %rbp retq nopw (%rax,%rax)
my_lengthsp_utf32: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_20], rax jmp short $+2 loc_B973E: jmp short $+2 loc_B9740: mov rcx, [rbp+var_20] mov rdx, [rbp+var_10] add rdx, 3 xor eax, eax cmp rcx, rdx mov [rbp+var_21], al jbe short loc_B9796 mov rax, [rbp+var_20] movsx ecx, byte ptr [rax-1] xor eax, eax cmp ecx, 20h ; ' ' mov [rbp+var_21], al jnz short loc_B9796 mov rcx, [rbp+var_20] xor eax, eax cmp byte ptr [rcx-2], 0 mov [rbp+var_21], al jnz short loc_B9796 mov rcx, [rbp+var_20] xor eax, eax cmp byte ptr [rcx-3], 0 mov [rbp+var_21], al jnz short loc_B9796 mov rax, [rbp+var_20] cmp byte ptr [rax-4], 0 setnz al xor al, 0FFh mov [rbp+var_21], al loc_B9796: mov al, [rbp+var_21] test al, 1 jnz short loc_B979F jmp short loc_B97AD loc_B979F: mov rax, [rbp+var_20] add rax, 0FFFFFFFFFFFFFFFCh mov [rbp+var_20], rax jmp short loc_B9740 loc_B97AD: mov rax, [rbp+var_20] mov rcx, [rbp+var_10] sub rax, rcx pop rbp retn
long long my_lengthsp_utf32(long long a1, long long a2, long long a3) { char v4; // [rsp+1h] [rbp-21h] unsigned long long i; // [rsp+2h] [rbp-20h] for ( i = a3 + a2; ; i -= 4LL ) { v4 = 0; if ( i > a2 + 3 ) { v4 = 0; if ( *(_BYTE *)(i - 1) == 32 ) { v4 = 0; if ( !*(_BYTE *)(i - 2) ) { v4 = 0; if ( !*(_BYTE *)(i - 3) ) v4 = ~(*(_BYTE *)(i - 4) != 0); } } } if ( (v4 & 1) == 0 ) break; } return i - a2; }
my_lengthsp_utf32: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x20],RAX JMP 0x001b973e LAB_001b973e: JMP 0x001b9740 LAB_001b9740: MOV RCX,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x10] ADD RDX,0x3 XOR EAX,EAX CMP RCX,RDX MOV byte ptr [RBP + -0x21],AL JBE 0x001b9796 MOV RAX,qword ptr [RBP + -0x20] MOVSX ECX,byte ptr [RAX + -0x1] XOR EAX,EAX CMP ECX,0x20 MOV byte ptr [RBP + -0x21],AL JNZ 0x001b9796 MOV RCX,qword ptr [RBP + -0x20] XOR EAX,EAX CMP byte ptr [RCX + -0x2],0x0 MOV byte ptr [RBP + -0x21],AL JNZ 0x001b9796 MOV RCX,qword ptr [RBP + -0x20] XOR EAX,EAX CMP byte ptr [RCX + -0x3],0x0 MOV byte ptr [RBP + -0x21],AL JNZ 0x001b9796 MOV RAX,qword ptr [RBP + -0x20] CMP byte ptr [RAX + -0x4],0x0 SETNZ AL XOR AL,0xff MOV byte ptr [RBP + -0x21],AL LAB_001b9796: MOV AL,byte ptr [RBP + -0x21] TEST AL,0x1 JNZ 0x001b979f JMP 0x001b97ad LAB_001b979f: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,-0x4 MOV qword ptr [RBP + -0x20],RAX JMP 0x001b9740 LAB_001b97ad: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x10] SUB RAX,RCX POP RBP RET
long my_lengthsp_utf32(int8 param_1,long param_2,long param_3) { bool bVar1; int8 local_28; local_28 = param_2 + param_3; while( true ) { bVar1 = false; if ((((param_2 + 3U < local_28) && (bVar1 = false, *(char *)(local_28 - 1) == ' ')) && (bVar1 = false, *(char *)(local_28 - 2) == '\0')) && (bVar1 = false, *(char *)(local_28 - 3) == '\0')) { bVar1 = *(char *)(local_28 - 4) == '\0'; } if (!bVar1) break; local_28 = local_28 - 4; } return local_28 - param_2; }
49,485
testing::TestInfo* testing::RegisterTest<testing::internal::InsertSyntheticTestCase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, testing::internal::CodeLocation, bool)::$_0>(char const*, char const*, char const*, char const*, char const*, int, testing::internal::InsertSyntheticTestCase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, testing::internal::CodeLocation, bool)::$_0)::FactoryImpl::CreateTest()
giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/include/gtest/gtest.h
Test* CreateTest() override { return factory_(); }
O3
c
testing::TestInfo* testing::RegisterTest<testing::internal::InsertSyntheticTestCase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, testing::internal::CodeLocation, bool)::$_0>(char const*, char const*, char const*, char const*, char const*, int, testing::internal::InsertSyntheticTestCase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, testing::internal::CodeLocation, bool)::$_0)::FactoryImpl::CreateTest(): pushq %r15 pushq %r14 pushq %rbx subq $0x20, %rsp movq %rdi, %r14 movl $0x60, %edi callq 0x84b0 movq %rax, %rbx leaq 0x10(%rsp), %r15 movq %r15, -0x10(%r15) movq 0x8(%r14), %rsi movq 0x10(%r14), %rdx addq %rsi, %rdx movq %rsp, %rdi callq 0x391b4 addq $0x28, %r14 movq %rsp, %rdx movq %rbx, %rdi movq %r14, %rsi callq 0x304d8 movq (%rsp), %rdi cmpq %r15, %rdi je 0x30497 movq 0x10(%rsp), %rsi incq %rsi callq 0x84e0 movq %rbx, %rax addq $0x20, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movq (%rsp), %rdi cmpq %r15, %rdi je 0x304c2 movq 0x10(%rsp), %rsi incq %rsi callq 0x84e0 jmp 0x304c2 movq %rax, %r14 movl $0x60, %esi movq %rbx, %rdi callq 0x84e0 movq %r14, %rdi callq 0x8990 nop
_ZZN7testing12RegisterTestITpTnRiJEZNS_8internal23InsertSyntheticTestCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS2_12CodeLocationEbE3$_0EEPNS_8TestInfoEPKcSG_SG_SG_SG_iT0_EN11FactoryImpl10CreateTestEv: push r15 push r14 push rbx sub rsp, 20h mov r14, rdi mov edi, 60h ; '`'; unsigned __int64 call __Znwm; operator new(ulong) mov rbx, rax lea r15, [rsp+38h+var_28] mov [r15-10h], r15 mov rsi, [r14+8] mov rdx, [r14+10h] add rdx, rsi mov rdi, rsp call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) add r14, 28h ; '(' mov rdx, rsp mov rdi, rbx mov rsi, r14 call _ZN7testing8internal12_GLOBAL__N_111FailureTestC2ERKNS0_12CodeLocationENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb; testing::internal::`anonymous namespace'::FailureTest::FailureTest(testing::internal::CodeLocation const&,std::string,bool) mov rdi, [rsp+38h+var_38]; void * cmp rdi, r15 jz short loc_30497 mov rsi, [rsp+38h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_30497: mov rax, rbx add rsp, 20h pop rbx pop r14 pop r15 retn mov r14, rax mov rdi, [rsp+0]; void * cmp rdi, r15 jz short loc_304C2 mov rsi, [rsp+arg_8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_304C2 mov r14, rax loc_304C2: mov esi, 60h ; '`'; unsigned __int64 mov rdi, rbx; void * call __ZdlPvm; operator delete(void *,ulong) mov rdi, r14 call __Unwind_Resume
long long ZZN7testing12RegisterTestITpTnRiJEZNS_8internal23InsertSyntheticTestCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS2_12CodeLocationEbE3__0EEPNS_8TestInfoEPKcSG_SG_SG_SG_iT0_EN11FactoryImpl10CreateTestEv( long long a1) { long long v1; // rbx void *v3[2]; // [rsp+0h] [rbp-38h] BYREF _QWORD v4[5]; // [rsp+10h] [rbp-28h] BYREF v1 = operator new(0x60uLL); v3[0] = v4; std::string::_M_construct<char *>(v3, *(_QWORD *)(a1 + 8), *(_QWORD *)(a1 + 8) + *(_QWORD *)(a1 + 16)); testing::internal::`anonymous namespace'::FailureTest::FailureTest(v1, a1 + 40, v3); if ( v3[0] != v4 ) operator delete(v3[0], v4[0] + 1LL); return v1; }
_ZZN7testing12RegisterTestITpTnRiJEZNS_8internal23InsertSyntheticTestCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS2_12CodeLocationEbE3$_0EEPNS_8TestInfoEPKcSG_SG_SG_SG_iT0_EN11FactoryImpl10CreateTestEv: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x20 MOV R14,RDI MOV EDI,0x60 CALL 0x001084b0 MOV RBX,RAX LEA R15,[RSP + 0x10] MOV qword ptr [R15 + -0x10],R15 MOV RSI,qword ptr [R14 + 0x8] MOV RDX,qword ptr [R14 + 0x10] ADD RDX,RSI LAB_00130467: MOV RDI,RSP CALL 0x001391b4 ADD R14,0x28 LAB_00130473: MOV RDX,RSP MOV RDI,RBX MOV RSI,R14 CALL 0x001304d8 LAB_00130481: MOV RDI,qword ptr [RSP] CMP RDI,R15 JZ 0x00130497 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x001084e0 LAB_00130497: MOV RAX,RBX ADD RSP,0x20 POP RBX POP R14 POP R15 RET
FailureTest * _ZZN7testing12RegisterTestITpTnRiJEZNS_8internal23InsertSyntheticTestCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS2_12CodeLocationEbE3__0EEPNS_8TestInfoEPKcSG_SG_SG_SG_iT0_EN11FactoryImpl10CreateTestEv (long param_1) { FailureTest *pFVar1; long *local_38 [2]; long local_28 [2]; pFVar1 = (FailureTest *)operator_new(0x60); local_38[0] = local_28; /* try { // try from 00130467 to 0013046e has its CatchHandler @ 001304bf */ std::__cxx11::string::_M_construct<char*> (local_38,*(long *)(param_1 + 8),*(long *)(param_1 + 0x10) + *(long *)(param_1 + 8)); /* try { // try from 00130473 to 00130480 has its CatchHandler @ 001304a4 */ testing::internal::(anonymous_namespace)::FailureTest::FailureTest(pFVar1,param_1 + 0x28,local_38) ; if (local_38[0] != local_28) { operator_delete(local_38[0],local_28[0] + 1); } return pFVar1; }
49,486
minja::Parser::parseNumber(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>&, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&)
monkey531[P]llama/common/minja.hpp
json parseNumber(CharIterator& it, const CharIterator& end) { auto before = it; consumeSpaces(); auto start = it; bool hasDecimal = false; bool hasExponent = false; if (it != end && (*it == '-' || *it == '+')) ++it; while (it != end) { if (std::isdigit(*it)) { ++it; } else if (*it == '.') { if (hasDecimal) throw std::runtime_error("Multiple decimal points"); hasDecimal = true; ++it; } else if (it != start && (*it == 'e' || *it == 'E')) { if (hasExponent) throw std::runtime_error("Multiple exponents"); hasExponent = true; ++it; } else { break; } } if (start == it) { it = before; return json(); // No valid characters found } std::string str(start, it); try { return json::parse(str); } catch (json::parse_error& e) { throw std::runtime_error("Failed to parse number: '" + str + "' (" + std::string(e.what()) + ")"); return json(); } }
O3
cpp
minja::Parser::parseNumber(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>&, __gnu_cxx::__normal_iterator<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 $0xf8, %rsp movq %rcx, %r15 movq %rdx, %r14 movq %rsi, %r12 movq %rdi, %rbx movq (%rdx), %r9 movq 0x18(%rsi), %rbp movq 0x20(%rsi), %r13 movq %r9, %rsi cmpq %rbp, %r13 je 0x44e0c movq %rbx, 0x8(%rsp) movq %r9, %rbx movsbl (%r13), %edi callq 0x180b0 testl %eax, %eax je 0x44e01 incq %r13 movq %r13, 0x20(%r12) cmpq %rbp, %r13 jne 0x44de6 movq (%r14), %rsi movq %rbx, %r9 movq 0x8(%rsp), %rbx movq (%r15), %rax cmpq %rsi, %rax je 0x44ef6 movzbl (%rsi), %ecx cmpl $0x2d, %ecx je 0x44e28 movq %rsi, %rdx cmpl $0x2b, %ecx jne 0x44e32 leaq 0x1(%rsi), %rdx movq %rdx, (%r14) movq (%r15), %rax cmpq %rax, %rdx je 0x44e7f xorl %eax, %eax xorl %ecx, %ecx movsbl (%rdx), %edi leal -0x30(%rdi), %r8d cmpl $0xa, %r8d jb 0x44e74 movzbl %dil, %edi cmpl $0x2e, %edi jne 0x44e5c testb $0x1, %al movb $0x1, %al je 0x44e74 jmp 0x44f33 cmpq %rsi, %rdx je 0x44e7f orl $0x20, %edi cmpl $0x65, %edi jne 0x44e7f testb $0x1, %cl movb $0x1, %cl jne 0x44f51 incq %rdx movq %rdx, (%r14) cmpq (%r15), %rdx jne 0x44e3b cmpq %rsi, %rdx je 0x44ef6 leaq 0x20(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x10(%rsp), %rdi callq 0x5d5f2 xorps %xmm0, %xmm0 leaq 0x90(%rsp), %rdx movaps %xmm0, 0x10(%rdx) movaps %xmm0, (%rdx) leaq 0x10(%rsp), %rsi movq %rbx, %rdi movl $0x1, %ecx xorl %r8d, %r8d callq 0x457aa movq 0xa0(%rsp), %rax testq %rax, %rax je 0x44edd leaq 0x90(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x10(%rsp), %rdi cmpq %r15, %rdi je 0x44f1e movq 0x20(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x44f1e movq %r9, (%r14) movb $0x0, (%rbx) movq $0x0, 0x8(%rbx) movq %rbx, %rdi movl $0x1, %esi callq 0x3ecbc movq %rbx, %rdi movl $0x1, %esi callq 0x3ecbc movq %rbx, %rax addq $0xf8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x18350 movq %rax, %rbx leaq 0x65ea1(%rip), %rsi # 0xaade8 movq %rax, %rdi callq 0x18260 jmp 0x44f6d movl $0x10, %edi callq 0x18350 movq %rax, %rbx leaq 0x65e9b(%rip), %rsi # 0xaae00 movq %rax, %rdi callq 0x18260 movq 0x9907c(%rip), %rsi # 0xddff0 movq 0x98ff5(%rip), %rdx # 0xddf70 movq %rbx, %rdi callq 0x18b50 jmp 0x451f8 movq %rdx, %rbx movq %rax, %r14 movq 0xa0(%rsp), %rax testq %rax, %rax je 0x44fad leaq 0x90(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax cmpl $0x1, %ebx jne 0x451dd movq %r14, %rdi callq 0x182a0 movq %rax, %r14 movl $0x10, %edi callq 0x18350 movq %rax, %rbx leaq 0x65e3e(%rip), %rsi # 0xaae13 leaq 0x50(%rsp), %rdi leaq 0x10(%rsp), %rdx callq 0x264ee leaq 0x65e42(%rip), %rsi # 0xaae2d leaq 0x50(%rsp), %rdi callq 0x18ce0 leaq 0x40(%rsp), %r12 movq %r12, -0x10(%r12) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx jne 0x45018 movups (%rcx), %xmm0 movups %xmm0, (%r12) jmp 0x45025 movq %rdx, 0x30(%rsp) movq (%rcx), %rdx movq %rdx, 0x40(%rsp) movq 0x8(%rax), %rdx movq %rdx, 0x38(%rsp) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movq (%r14), %rax movq %r14, %rdi callq *0x10(%rax) leaq 0xb8(%rsp), %rdi leaq 0x7(%rsp), %rdx movq %rax, %rsi callq 0x1d6de leaq 0xd8(%rsp), %rdi leaq 0x30(%rsp), %rsi leaq 0xb8(%rsp), %rdx callq 0x263f6 leaq 0x6da33(%rip), %rsi # 0xb2aaf leaq 0xd8(%rsp), %rdi callq 0x18ce0 leaq 0x80(%rsp), %r13 movq %r13, -0x10(%r13) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx jne 0x450ae movups (%rcx), %xmm0 movups %xmm0, (%r13) jmp 0x450be movq %rdx, 0x70(%rsp) movq (%rcx), %rdx movq %rdx, 0x80(%rsp) movq 0x8(%rax), %rdx leaq 0x70(%rsp), %rsi movq %rdx, 0x8(%rsi) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movb $0x1, %bpl movq %rbx, %rdi callq 0x18aa0 xorl %ebp, %ebp movq 0x98f02(%rip), %rsi # 0xddff0 movq 0x98e7b(%rip), %rdx # 0xddf70 movq %rbx, %rdi callq 0x18b50 movq %rax, %r14 movq 0x70(%rsp), %rdi cmpq %r13, %rdi je 0x45122 movq 0x80(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x45122 movq %rax, %r14 movb $0x1, %bpl leaq 0xe8(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x4514b movq 0xe8(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x4514b movq %rax, %r14 movb $0x1, %bpl leaq 0xc8(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x45174 movq 0xc8(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x45174 movq %rax, %r14 movb $0x1, %bpl movq 0x30(%rsp), %rdi cmpq %r12, %rdi je 0x4518b movq 0x40(%rsp), %rsi incq %rsi callq 0x186a0 leaq 0x60(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x451a6 movq 0x60(%rsp), %rsi incq %rsi callq 0x186a0 testb %bpl, %bpl jne 0x451d0 jmp 0x451d8 movq %rax, %r14 leaq 0x60(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x451d0 movq 0x60(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x451d0 movq %rax, %r14 movq %rbx, %rdi callq 0x184f0 callq 0x18ad0 movq 0x10(%rsp), %rdi cmpq %r15, %rdi je 0x45212 movq 0x20(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x45212 jmp 0x451f8 movq %rax, %rdi callq 0x1d81b movq %rax, %r14 jmp 0x45212 jmp 0x45207 movq %rax, %r14 movq %rbx, %rdi callq 0x184f0 movq %r14, %rdi callq 0x18bc0
_ZN5minja6Parser11parseNumberERN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERKSB_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0F8h mov r15, rcx mov r14, rdx mov r12, rsi mov rbx, rdi mov r9, [rdx] mov rbp, [rsi+18h] mov r13, [rsi+20h] mov rsi, r9 cmp r13, rbp jz short loc_44E0C mov [rsp+128h+var_120], rbx mov rbx, r9 loc_44DE6: movsx edi, byte ptr [r13+0] call _isspace test eax, eax jz short loc_44E01 inc r13 mov [r12+20h], r13 cmp r13, rbp jnz short loc_44DE6 loc_44E01: mov rsi, [r14] mov r9, rbx mov rbx, [rsp+128h+var_120] loc_44E0C: mov rax, [r15] cmp rax, rsi jz loc_44EF6 movzx ecx, byte ptr [rsi] cmp ecx, 2Dh ; '-' jz short loc_44E28 mov rdx, rsi cmp ecx, 2Bh ; '+' jnz short loc_44E32 loc_44E28: lea rdx, [rsi+1] mov [r14], rdx mov rax, [r15] loc_44E32: cmp rdx, rax jz short loc_44E7F xor eax, eax xor ecx, ecx loc_44E3B: movsx edi, byte ptr [rdx] lea r8d, [rdi-30h] cmp r8d, 0Ah jb short loc_44E74 movzx edi, dil cmp edi, 2Eh ; '.' jnz short loc_44E5C test al, 1 mov al, 1 jz short loc_44E74 jmp loc_44F33 loc_44E5C: cmp rdx, rsi jz short loc_44E7F or edi, 20h cmp edi, 65h ; 'e' jnz short loc_44E7F test cl, 1 mov cl, 1 jnz loc_44F51 loc_44E74: inc rdx mov [r14], rdx cmp rdx, [r15] jnz short loc_44E3B loc_44E7F: cmp rdx, rsi jz short loc_44EF6 lea r15, [rsp+128h+var_108] mov [r15-10h], r15 lea rdi, [rsp+128h+var_118] 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) xorps xmm0, xmm0 lea rdx, [rsp+128h+var_98] movaps xmmword ptr [rdx+10h], xmm0 movaps xmmword ptr [rdx], xmm0 lea rsi, [rsp+128h+var_118] mov rdi, rbx mov ecx, 1 xor r8d, r8d call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5parseIRS9_EESD_OT_St8functionIFbiNS0_6detail13parse_event_tERSD_EEbb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::parse<std::string&>(std::string&,std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)>,bool,bool) mov rax, [rsp+128h+var_88] test rax, rax jz short loc_44EDD lea rdi, [rsp+128h+var_98] mov rsi, rdi mov edx, 3 call rax loc_44EDD: mov rdi, [rsp+128h+var_118]; void * cmp rdi, r15 jz short loc_44F1E mov rsi, [rsp+128h+var_108] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_44F1E loc_44EF6: mov [r14], r9 mov byte ptr [rbx], 0 mov qword ptr [rbx+8], 0 mov rdi, rbx 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, rbx 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) loc_44F1E: mov rax, rbx add rsp, 0F8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_44F33: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aMultipleDecima; "Multiple decimal points" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short loc_44F6D loc_44F51: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aMultipleExpone; "Multiple exponents" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) loc_44F6D: mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp loc_451F8 mov rbx, rdx mov r14, rax mov rax, [rsp+128h+var_88] test rax, rax jz short loc_44FAD lea rdi, [rsp+128h+var_98] mov rsi, rdi mov edx, 3 call rax loc_44FAD: cmp ebx, 1 jnz loc_451DD mov rdi, r14; void * call ___cxa_begin_catch mov r14, rax mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aFailedToParseN; "Failed to parse number: '" lea rdi, [rsp+128h+var_D8] lea rdx, [rsp+128h+var_118] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) lea rsi, asc_AAE2D; "' (" lea rdi, [rsp+128h+var_D8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea r12, [rsp+128h+var_E8] mov [r12-10h], r12 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jnz short loc_45018 movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r12], xmm0 jmp short loc_45025 loc_45018: mov [rsp+128h+var_F8], rdx mov rdx, [rcx] mov [rsp+128h+var_E8], rdx loc_45025: mov rdx, [rax+8] mov [rsp+128h+var_F0], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov rax, [r14] mov rdi, r14 call qword ptr [rax+10h] lea rdi, [rsp+128h+var_70] lea rdx, [rsp+128h+var_121] mov rsi, rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+128h+var_50] lea rsi, [rsp+128h+var_F8] lea rdx, [rsp+128h+var_70] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) lea rsi, a09401910201912+51h; ")" lea rdi, [rsp+128h+var_50] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea r13, [rsp+128h+var_A8] mov [r13-10h], r13 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jnz short loc_450AE movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r13+0], xmm0 jmp short loc_450BE loc_450AE: mov [rsp+128h+var_B8], rdx mov rdx, [rcx] mov [rsp+128h+var_A8], rdx loc_450BE: mov rdx, [rax+8] lea rsi, [rsp+128h+var_B8] mov [rsi+8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov bpl, 1 mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax mov rdi, [rsp+128h+var_B8]; void * cmp rdi, r13 jz short loc_45122 mov rsi, [rsp+128h+var_A8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_45122 mov r14, rax mov bpl, 1 loc_45122: lea rax, [rsp+128h+var_40] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_4514B mov rsi, [rsp+128h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_4514B mov r14, rax mov bpl, 1 loc_4514B: lea rax, [rsp+128h+var_60] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_45174 mov rsi, [rsp+128h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_45174 mov r14, rax mov bpl, 1 loc_45174: mov rdi, [rsp+128h+var_F8]; void * cmp rdi, r12 jz short loc_4518B mov rsi, [rsp+128h+var_E8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4518B: lea rax, [rsp+128h+var_C8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_451A6 mov rsi, [rsp+128h+var_C8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_451A6: test bpl, bpl jnz short loc_451D0 jmp short loc_451D8 mov r14, rax lea rax, [rsp+128h+var_C8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_451D0 mov rsi, [rsp+128h+var_C8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_451D0 mov r14, rax loc_451D0: mov rdi, rbx; void * call ___cxa_free_exception loc_451D8: call ___cxa_end_catch loc_451DD: mov rdi, [rsp+128h+var_118]; void * cmp rdi, r15 jz short loc_45212 mov rsi, [rsp+128h+var_108] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_45212 jmp short $+2 loc_451F8: mov rdi, rax call __clang_call_terminate mov r14, rax jmp short loc_45212 jmp short $+2 loc_45207: mov r14, rax mov rdi, rbx; void * call ___cxa_free_exception loc_45212: mov rdi, r14 call __Unwind_Resume
long long minja::Parser::parseNumber(long long a1, long long a2, unsigned __int8 **a3, char **a4) { long long v7; // rbx unsigned __int8 *v8; // r9 char *v9; // rbp char *v10; // r13 unsigned __int8 *v11; // rsi unsigned __int8 *v12; // rbx char *v13; // rax int v14; // ecx char *v15; // rdx char v16; // al char v17; // cl int v18; // edi bool v19; // zf std::runtime_error *exception; // rbx void *v22[2]; // [rsp+10h] [rbp-118h] BYREF _QWORD v23[2]; // [rsp+20h] [rbp-108h] BYREF __int128 v24; // [rsp+90h] [rbp-98h] BYREF __int128 v25; // [rsp+A0h] [rbp-88h] v7 = a1; v8 = *a3; v9 = *(char **)(a2 + 24); v10 = *(char **)(a2 + 32); v11 = *a3; if ( v10 != v9 ) { v12 = *a3; do { if ( !(unsigned int)isspace((unsigned int)*v10) ) break; *(_QWORD *)(a2 + 32) = ++v10; } while ( v10 != v9 ); v11 = *a3; v8 = v12; v7 = a1; } v13 = *a4; if ( *a4 == (char *)v11 ) goto LABEL_25; v14 = *v11; if ( v14 == 45 || (v15 = (char *)v11, v14 == 43) ) { v15 = (char *)(v11 + 1); *a3 = v11 + 1; v13 = *a4; } if ( v15 != v13 ) { v16 = 0; v17 = 0; do { v18 = *v15; if ( (unsigned int)(v18 - 48) >= 0xA ) { if ( (unsigned __int8)v18 == 46 ) { v19 = (v16 & 1) == 0; v16 = 1; if ( !v19 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Multiple decimal points"); goto LABEL_28; } } else { if ( v15 == (char *)v11 || ((unsigned __int8)v18 | 0x20) != 0x65 ) break; v19 = (v17 & 1) == 0; v17 = 1; if ( !v19 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Multiple exponents"); LABEL_28: __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } } } *a3 = (unsigned __int8 *)++v15; } while ( v15 != *a4 ); } if ( v15 == (char *)v11 ) { LABEL_25: *a3 = v8; *(_BYTE *)v7 = 0; *(_QWORD *)(v7 + 8) = 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((char *)v7); 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((char *)v7); } else { v22[0] = v23; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(v22, v11, v15); v25 = 0LL; 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>::parse<std::string&>( v7, v22, &v24, 1LL, 0LL); if ( (_QWORD)v25 ) ((void ( *)(__int128 *, __int128 *, long long))v25)(&v24, &v24, 3LL); if ( v22[0] != v23 ) operator delete(v22[0], v23[0] + 1LL); } return v7; }
parseNumber: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xf8 MOV R15,RCX MOV R14,RDX MOV R12,RSI MOV RBX,RDI MOV R9,qword ptr [RDX] MOV RBP,qword ptr [RSI + 0x18] MOV R13,qword ptr [RSI + 0x20] MOV RSI,R9 CMP R13,RBP JZ 0x00144e0c MOV qword ptr [RSP + 0x8],RBX MOV RBX,R9 LAB_00144de6: MOVSX EDI,byte ptr [R13] CALL 0x001180b0 TEST EAX,EAX JZ 0x00144e01 INC R13 MOV qword ptr [R12 + 0x20],R13 CMP R13,RBP JNZ 0x00144de6 LAB_00144e01: MOV RSI,qword ptr [R14] MOV R9,RBX MOV RBX,qword ptr [RSP + 0x8] LAB_00144e0c: MOV RAX,qword ptr [R15] CMP RAX,RSI JZ 0x00144ef6 MOVZX ECX,byte ptr [RSI] CMP ECX,0x2d JZ 0x00144e28 MOV RDX,RSI CMP ECX,0x2b JNZ 0x00144e32 LAB_00144e28: LEA RDX,[RSI + 0x1] MOV qword ptr [R14],RDX MOV RAX,qword ptr [R15] LAB_00144e32: CMP RDX,RAX JZ 0x00144e7f XOR EAX,EAX XOR ECX,ECX LAB_00144e3b: MOVSX EDI,byte ptr [RDX] LEA R8D,[RDI + -0x30] CMP R8D,0xa JC 0x00144e74 MOVZX EDI,DIL CMP EDI,0x2e JNZ 0x00144e5c TEST AL,0x1 MOV AL,0x1 JZ 0x00144e74 JMP 0x00144f33 LAB_00144e5c: CMP RDX,RSI JZ 0x00144e7f OR EDI,0x20 CMP EDI,0x65 JNZ 0x00144e7f TEST CL,0x1 MOV CL,0x1 JNZ 0x00144f51 LAB_00144e74: INC RDX MOV qword ptr [R14],RDX CMP RDX,qword ptr [R15] JNZ 0x00144e3b LAB_00144e7f: CMP RDX,RSI JZ 0x00144ef6 LEA R15,[RSP + 0x20] MOV qword ptr [R15 + -0x10],R15 LAB_00144e8d: LEA RDI,[RSP + 0x10] CALL 0x0015d5f2 XORPS XMM0,XMM0 LEA RDX,[RSP + 0x90] MOVAPS xmmword ptr [RDX + 0x10],XMM0 MOVAPS xmmword ptr [RDX],XMM0 LAB_00144ea9: LEA RSI,[RSP + 0x10] MOV RDI,RBX MOV ECX,0x1 XOR R8D,R8D CALL 0x001457aa MOV RAX,qword ptr [RSP + 0xa0] TEST RAX,RAX JZ 0x00144edd LAB_00144ecb: LEA RDI,[RSP + 0x90] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_00144edd: MOV RDI,qword ptr [RSP + 0x10] CMP RDI,R15 JZ 0x00144f1e MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x001186a0 JMP 0x00144f1e LAB_00144ef6: MOV qword ptr [R14],R9 MOV byte ptr [RBX],0x0 MOV qword ptr [RBX + 0x8],0x0 MOV RDI,RBX MOV ESI,0x1 CALL 0x0013ecbc MOV RDI,RBX MOV ESI,0x1 CALL 0x0013ecbc LAB_00144f1e: MOV RAX,RBX ADD RSP,0xf8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00144f33: MOV EDI,0x10 CALL 0x00118350 MOV RBX,RAX LAB_00144f40: LEA RSI,[0x1aade8] MOV RDI,RAX CALL 0x00118260 LAB_00144f4f: JMP 0x00144f6d LAB_00144f51: MOV EDI,0x10 CALL 0x00118350 MOV RBX,RAX LAB_00144f5e: LEA RSI,[0x1aae00] MOV RDI,RAX CALL 0x00118260 LAB_00144f6d: MOV RSI,qword ptr [0x001ddff0] MOV RDX,qword ptr [0x001ddf70] MOV RDI,RBX CALL 0x00118b50
/* minja::Parser::parseNumber(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string >&, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > const&) */ __normal_iterator * minja::Parser::parseNumber(__normal_iterator *param_1,__normal_iterator *param_2) { byte bVar1; byte *pbVar2; char *pcVar3; bool bVar4; bool bVar5; bool bVar6; int iVar7; byte *pbVar8; runtime_error *this; bool bVar9; int8 *in_RCX; long *in_RDX; byte *pbVar10; byte *pbVar11; char *pcVar12; long *local_118 [2]; long local_108 [14]; int8 local_98; int8 uStack_90; code *local_88; int8 uStack_80; pbVar2 = (byte *)*in_RDX; pcVar3 = *(char **)(param_2 + 0x18); pcVar12 = *(char **)(param_2 + 0x20); pbVar11 = pbVar2; if (pcVar12 != pcVar3) { do { iVar7 = isspace((int)*pcVar12); if (iVar7 == 0) break; pcVar12 = pcVar12 + 1; *(char **)(param_2 + 0x20) = pcVar12; } while (pcVar12 != pcVar3); pbVar11 = (byte *)*in_RDX; } pbVar8 = (byte *)*in_RCX; if (pbVar8 != pbVar11) { if ((*pbVar11 == 0x2d) || (pbVar10 = pbVar11, *pbVar11 == 0x2b)) { pbVar10 = pbVar11 + 1; *in_RDX = (long)pbVar10; pbVar8 = (byte *)*in_RCX; } if (pbVar10 != pbVar8) { bVar6 = false; bVar9 = false; do { bVar1 = *pbVar10; bVar4 = bVar6; bVar5 = bVar9; if (9 < (int)(char)bVar1 - 0x30U) { if (bVar1 == 0x2e) { bVar4 = true; if (bVar6) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00144f40 to 00144f4e has its CatchHandler @ 00145207 */ std::runtime_error::runtime_error(this,"Multiple decimal points"); LAB_00144f6d: /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001ddff0,PTR__runtime_error_001ddf70); } } else { if ((pbVar10 == pbVar11) || ((bVar1 | 0x20) != 0x65)) break; bVar5 = true; if (bVar9) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00144f5e to 00144f6c has its CatchHandler @ 00145205 */ std::runtime_error::runtime_error(this,"Multiple exponents"); goto LAB_00144f6d; } } } bVar9 = bVar5; bVar6 = bVar4; pbVar10 = pbVar10 + 1; *in_RDX = (long)pbVar10; } while (pbVar10 != (byte *)*in_RCX); } if (pbVar10 != pbVar11) { /* try { // try from 00144e8d to 00144e96 has its CatchHandler @ 00145200 */ local_118[0] = local_108; std::__cxx11::string:: _M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>(local_118); local_88 = (code *)0x0; uStack_80 = 0; local_98 = 0; uStack_90 = 0; /* try { // try from 00144ea9 to 00144ebd has its CatchHandler @ 00144f88 */ nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::parse<std::__cxx11::string&> ((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)param_1,local_118,&local_98,1,0); if (local_88 != (code *)0x0) { /* try { // try from 00144ecb to 00144edc has its CatchHandler @ 00144f83 */ (*local_88)(&local_98,&local_98,3); } if (local_118[0] == local_108) { return param_1; } operator_delete(local_118[0],local_108[0] + 1); return param_1; } } *in_RDX = (long)pbVar2; *param_1 = 0; *(int8 *)(param_1 + 8) = 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(param_1,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(param_1,0)); return param_1; }
49,487
testing::internal::DefaultGlobalTestPartResultReporter::ReportTestPartResult(testing::TestPartResult const&)
seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/src/gtest.cc
void DefaultGlobalTestPartResultReporter::ReportTestPartResult( const TestPartResult& result) { unit_test_->current_test_result()->AddTestPartResult(result); unit_test_->listeners()->repeater()->OnTestPartResult(result); }
O1
cpp
testing::internal::DefaultGlobalTestPartResultReporter::ReportTestPartResult(testing::TestPartResult const&): pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movq 0x8(%rdi), %rax movq 0x170(%rax), %rdi testq %rdi, %rdi je 0x205a3 addq $0x90, %rdi jmp 0x205c1 movq 0x168(%rax), %rdi testq %rdi, %rdi je 0x205b8 addq $0x88, %rdi jmp 0x205c1 addq $0x178, %rax # imm = 0x178 movq %rax, %rdi addq $0x38, %rdi movq %rbx, %rsi callq 0x35d3c movq 0x8(%r14), %rax movq 0x1f8(%rax), %rdi movq (%rdi), %rax movq 0x50(%rax), %rax movq %rbx, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmpq *%rax nop
_ZN7testing8internal35DefaultGlobalTestPartResultReporter20ReportTestPartResultERKNS_14TestPartResultE: push r14 push rbx push rax mov rbx, rsi mov r14, rdi mov rax, [rdi+8] mov rdi, [rax+170h] test rdi, rdi jz short loc_205A3 add rdi, 90h jmp short loc_205C1 loc_205A3: mov rdi, [rax+168h] test rdi, rdi jz short loc_205B8 add rdi, 88h jmp short loc_205C1 loc_205B8: add rax, 178h mov rdi, rax loc_205C1: add rdi, 38h ; '8' mov rsi, rbx call _ZNSt6vectorIN7testing14TestPartResultESaIS1_EE9push_backERKS1_; std::vector<testing::TestPartResult>::push_back(testing::TestPartResult const&) mov rax, [r14+8] mov rdi, [rax+1F8h] mov rax, [rdi] mov rax, [rax+50h] mov rsi, rbx add rsp, 8 pop rbx pop r14 jmp rax
long long testing::internal::DefaultGlobalTestPartResultReporter::ReportTestPartResult( testing::internal::DefaultGlobalTestPartResultReporter *this, const testing::TestPartResult *a2) { long long v3; // rax long long v4; // rdi long long v5; // rdi long long v6; // rdi v3 = *((_QWORD *)this + 1); v4 = *(_QWORD *)(v3 + 368); if ( v4 ) { v5 = v4 + 144; } else { v6 = *(_QWORD *)(v3 + 360); if ( v6 ) v5 = v6 + 136; else v5 = v3 + 376; } std::vector<testing::TestPartResult>::push_back((testing::TestPartResultArray *)(v5 + 56), a2); return (*(long long ( **)(_QWORD, const testing::TestPartResult *))(**(_QWORD **)(*((_QWORD *)this + 1) + 504LL) + 80LL))( *(_QWORD *)(*((_QWORD *)this + 1) + 504LL), a2); }
ReportTestPartResult: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI MOV RAX,qword ptr [RDI + 0x8] MOV RDI,qword ptr [RAX + 0x170] TEST RDI,RDI JZ 0x001205a3 ADD RDI,0x90 JMP 0x001205c1 LAB_001205a3: MOV RDI,qword ptr [RAX + 0x168] TEST RDI,RDI JZ 0x001205b8 ADD RDI,0x88 JMP 0x001205c1 LAB_001205b8: ADD RAX,0x178 MOV RDI,RAX LAB_001205c1: ADD RDI,0x38 MOV RSI,RBX CALL 0x00135d3c MOV RAX,qword ptr [R14 + 0x8] MOV RDI,qword ptr [RAX + 0x1f8] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x50] MOV RSI,RBX ADD RSP,0x8 POP RBX POP R14 JMP RAX
/* testing::internal::DefaultGlobalTestPartResultReporter::ReportTestPartResult(testing::TestPartResult const&) */ void __thiscall testing::internal::DefaultGlobalTestPartResultReporter::ReportTestPartResult (DefaultGlobalTestPartResultReporter *this,TestPartResult *param_1) { long lVar1; lVar1 = *(long *)(this + 8); if (*(long *)(lVar1 + 0x170) == 0) { if (*(long *)(lVar1 + 0x168) == 0) { lVar1 = lVar1 + 0x178; } else { lVar1 = *(long *)(lVar1 + 0x168) + 0x88; } } else { lVar1 = *(long *)(lVar1 + 0x170) + 0x90; } std::vector<testing::TestPartResult,std::allocator<testing::TestPartResult>>::push_back ((vector<testing::TestPartResult,std::allocator<testing::TestPartResult>> *) (lVar1 + 0x38),param_1); /* WARNING: Could not recover jumptable at 0x001205e9. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(**(long **)(*(long *)(this + 8) + 0x1f8) + 0x50)) (*(long **)(*(long *)(this + 8) + 0x1f8),param_1); return; }
49,488
mysql_free_result
eloqsql/libmariadb/libmariadb/mariadb_lib.c
void STDCALL mysql_free_result(MYSQL_RES *result) { if (result) { if (result->handle && result->handle->status == MYSQL_STATUS_USE_RESULT) { result->handle->methods->db_skip_result(result->handle); result->handle->status=MYSQL_STATUS_READY; } free_rows(result->data); if (result->fields) ma_free_root(&result->field_alloc,MYF(0)); if (result->row) free(result->row); free(result); } return; }
O0
c
mysql_free_result: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) cmpq $0x0, -0x8(%rbp) je 0x48daa movq -0x8(%rbp), %rax cmpq $0x0, 0x78(%rax) je 0x48d62 movq -0x8(%rbp), %rax movq 0x78(%rax), %rax cmpl $0x2, 0x488(%rax) jne 0x48d62 movq -0x8(%rbp), %rax movq 0x78(%rax), %rax movq 0x4d0(%rax), %rax movq 0x18(%rax), %rax movq -0x8(%rbp), %rcx movq 0x78(%rcx), %rdi callq *%rax movq -0x8(%rbp), %rax movq 0x78(%rax), %rax movl $0x0, 0x488(%rax) movq -0x8(%rbp), %rax movq 0x18(%rax), %rdi callq 0x48020 movq -0x8(%rbp), %rax cmpq $0x0, 0x10(%rax) je 0x48d89 movq -0x8(%rbp), %rdi addq $0x28, %rdi xorl %esi, %esi callq 0x56820 movq -0x8(%rbp), %rax cmpq $0x0, 0x60(%rax) je 0x48da1 movq -0x8(%rbp), %rax movq 0x60(%rax), %rdi callq 0x381b0 movq -0x8(%rbp), %rdi callq 0x381b0 addq $0x10, %rsp popq %rbp retq
mysql_free_result: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi cmp [rbp+var_8], 0 jz loc_48DAA mov rax, [rbp+var_8] cmp qword ptr [rax+78h], 0 jz short loc_48D62 mov rax, [rbp+var_8] mov rax, [rax+78h] cmp dword ptr [rax+488h], 2 jnz short loc_48D62 mov rax, [rbp+var_8] mov rax, [rax+78h] mov rax, [rax+4D0h] mov rax, [rax+18h] mov rcx, [rbp+var_8] mov rdi, [rcx+78h] call rax mov rax, [rbp+var_8] mov rax, [rax+78h] mov dword ptr [rax+488h], 0 loc_48D62: mov rax, [rbp+var_8] mov rdi, [rax+18h] call free_rows mov rax, [rbp+var_8] cmp qword ptr [rax+10h], 0 jz short loc_48D89 mov rdi, [rbp+var_8] add rdi, 28h ; '(' xor esi, esi call ma_free_root loc_48D89: mov rax, [rbp+var_8] cmp qword ptr [rax+60h], 0 jz short loc_48DA1 mov rax, [rbp+var_8] mov rdi, [rax+60h] call _free loc_48DA1: mov rdi, [rbp+var_8] call _free loc_48DAA: add rsp, 10h pop rbp retn
long long mysql_free_result(_QWORD *a1) { long long result; // rax if ( a1 ) { if ( a1[15] && *(_DWORD *)(a1[15] + 1160LL) == 2 ) { (*(void ( **)(_QWORD))(*(_QWORD *)(a1[15] + 1232LL) + 24LL))(a1[15]); *(_DWORD *)(a1[15] + 1160LL) = 0; } free_rows(a1[3]); if ( a1[2] ) ma_free_root(a1 + 5, 0LL); if ( a1[12] ) free(a1[12]); return free(a1); } return result; }
mysql_free_result: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI CMP qword ptr [RBP + -0x8],0x0 JZ 0x00148daa MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x78],0x0 JZ 0x00148d62 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x78] CMP dword ptr [RAX + 0x488],0x2 JNZ 0x00148d62 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x78] MOV RAX,qword ptr [RAX + 0x4d0] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x78] CALL RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x78] MOV dword ptr [RAX + 0x488],0x0 LAB_00148d62: MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x18] CALL 0x00148020 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x10],0x0 JZ 0x00148d89 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x28 XOR ESI,ESI CALL 0x00156820 LAB_00148d89: MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x60],0x0 JZ 0x00148da1 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x60] CALL 0x001381b0 LAB_00148da1: MOV RDI,qword ptr [RBP + -0x8] CALL 0x001381b0 LAB_00148daa: ADD RSP,0x10 POP RBP RET
void mysql_free_result(void *param_1) { if (param_1 != (void *)0x0) { if ((*(long *)((long)param_1 + 0x78) != 0) && (*(int *)(*(long *)((long)param_1 + 0x78) + 0x488) == 2)) { (**(code **)(*(long *)(*(long *)((long)param_1 + 0x78) + 0x4d0) + 0x18)) (*(int8 *)((long)param_1 + 0x78)); *(int4 *)(*(long *)((long)param_1 + 0x78) + 0x488) = 0; } free_rows(*(int8 *)((long)param_1 + 0x18)); if (*(long *)((long)param_1 + 0x10) != 0) { ma_free_root((long)param_1 + 0x28,0); } if (*(long *)((long)param_1 + 0x60) != 0) { free(*(void **)((long)param_1 + 0x60)); } free(param_1); } return; }
49,489
end_simple_key_cache
eloqsql/mysys/mf_keycache.c
static void end_simple_key_cache(SIMPLE_KEY_CACHE_CB *keycache, my_bool cleanup) { DBUG_ENTER("end_simple_key_cache"); DBUG_PRINT("enter", ("key_cache: %p", keycache)); if (!keycache->key_cache_inited) DBUG_VOID_RETURN; if (keycache->disk_blocks > 0) { if (keycache->block_mem) { my_large_free((uchar*) keycache->block_mem, keycache->allocated_mem_size); keycache->block_mem= NULL; my_free(keycache->block_root); keycache->block_root= NULL; } keycache->disk_blocks= -1; /* Reset blocks_changed to be safe if flush_all_key_blocks is called */ keycache->blocks_changed= 0; } DBUG_PRINT("status", ("used: %lu changed: %lu w_requests: %lu " "writes: %lu r_requests: %lu reads: %lu", keycache->blocks_used, keycache->global_blocks_changed, (ulong) keycache->global_cache_w_requests, (ulong) keycache->global_cache_write, (ulong) keycache->global_cache_r_requests, (ulong) keycache->global_cache_read)); /* Reset these values to be able to detect a disabled key cache. See Bug#44068 (RESTORE can disable the MyISAM Key Cache). */ keycache->blocks_used= 0; keycache->blocks_unused= 0; if (cleanup) { mysql_mutex_destroy(&keycache->cache_lock); keycache->key_cache_inited= keycache->can_be_used= 0; KEYCACHE_DEBUG_CLOSE; } DBUG_VOID_RETURN; }
O0
c
end_simple_key_cache: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movb %sil, %al movq %rdi, -0x8(%rbp) movb %al, -0x9(%rbp) jmp 0x74664 movq -0x8(%rbp), %rax cmpb $0x0, (%rax) jne 0x74674 jmp 0x7466f jmp 0x7472e movq -0x8(%rbp), %rax cmpl $0x0, 0x48(%rax) jle 0x746e9 movq -0x8(%rbp), %rax cmpq $0x0, 0xa8(%rax) je 0x746d2 movq -0x8(%rbp), %rax movq 0xa8(%rax), %rdi movq -0x8(%rbp), %rax movq 0x10(%rax), %rsi callq 0x89ae0 movq -0x8(%rbp), %rax movq $0x0, 0xa8(%rax) movq -0x8(%rbp), %rax movq 0xa0(%rax), %rdi callq 0x7ff70 movq -0x8(%rbp), %rax movq $0x0, 0xa0(%rax) movq -0x8(%rbp), %rax movl $0xffffffff, 0x48(%rax) # imm = 0xFFFFFFFF movq -0x8(%rbp), %rax movq $0x0, 0x60(%rax) jmp 0x746eb jmp 0x746ed movq -0x8(%rbp), %rax movq $0x0, 0x50(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x58(%rax) cmpb $0x0, -0x9(%rbp) je 0x7472a movq -0x8(%rbp), %rdi addq $0xc0, %rdi callq 0x75760 movq -0x8(%rbp), %rax movb $0x0, 0x3(%rax) movq -0x8(%rbp), %rax movb $0x0, (%rax) jmp 0x7472c jmp 0x7472e addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
end_simple_key_cache: push rbp mov rbp, rsp sub rsp, 10h mov al, sil mov [rbp+var_8], rdi mov [rbp+var_9], al jmp short $+2 loc_74664: mov rax, [rbp+var_8] cmp byte ptr [rax], 0 jnz short loc_74674 jmp short $+2 loc_7466F: jmp loc_7472E loc_74674: mov rax, [rbp+var_8] cmp dword ptr [rax+48h], 0 jle short loc_746E9 mov rax, [rbp+var_8] cmp qword ptr [rax+0A8h], 0 jz short loc_746D2 mov rax, [rbp+var_8] mov rdi, [rax+0A8h] mov rax, [rbp+var_8] mov rsi, [rax+10h] call my_large_free mov rax, [rbp+var_8] mov qword ptr [rax+0A8h], 0 mov rax, [rbp+var_8] mov rdi, [rax+0A0h] call my_free mov rax, [rbp+var_8] mov qword ptr [rax+0A0h], 0 loc_746D2: mov rax, [rbp+var_8] mov dword ptr [rax+48h], 0FFFFFFFFh mov rax, [rbp+var_8] mov qword ptr [rax+60h], 0 loc_746E9: jmp short $+2 loc_746EB: jmp short $+2 loc_746ED: mov rax, [rbp+var_8] mov qword ptr [rax+50h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+58h], 0 cmp [rbp+var_9], 0 jz short loc_7472A mov rdi, [rbp+var_8] add rdi, 0C0h call inline_mysql_mutex_destroy_1 mov rax, [rbp+var_8] mov byte ptr [rax+3], 0 mov rax, [rbp+var_8] mov byte ptr [rax], 0 loc_7472A: jmp short $+2 loc_7472C: jmp short $+2 loc_7472E: add rsp, 10h pop rbp retn
long long end_simple_key_cache(long long a1, char a2) { long long result; // rax result = a1; if ( *(_BYTE *)a1 ) { if ( *(int *)(a1 + 72) > 0 ) { if ( *(_QWORD *)(a1 + 168) ) { my_large_free(*(_QWORD *)(a1 + 168), *(_QWORD *)(a1 + 16)); *(_QWORD *)(a1 + 168) = 0LL; my_free(*(_QWORD *)(a1 + 160)); *(_QWORD *)(a1 + 160) = 0LL; } *(_DWORD *)(a1 + 72) = -1; *(_QWORD *)(a1 + 96) = 0LL; } *(_QWORD *)(a1 + 80) = 0LL; result = a1; *(_QWORD *)(a1 + 88) = 0LL; if ( a2 ) { inline_mysql_mutex_destroy_1(a1 + 192); *(_BYTE *)(a1 + 3) = 0; result = a1; *(_BYTE *)a1 = 0; } } return result; }
end_simple_key_cache: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV AL,SIL MOV qword ptr [RBP + -0x8],RDI MOV byte ptr [RBP + -0x9],AL JMP 0x00174664 LAB_00174664: MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX],0x0 JNZ 0x00174674 JMP 0x0017466f LAB_0017466f: JMP 0x0017472e LAB_00174674: MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x48],0x0 JLE 0x001746e9 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0xa8],0x0 JZ 0x001746d2 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0xa8] MOV RAX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RAX + 0x10] CALL 0x00189ae0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xa8],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0xa0] CALL 0x0017ff70 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xa0],0x0 LAB_001746d2: MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x48],0xffffffff MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x60],0x0 LAB_001746e9: JMP 0x001746eb LAB_001746eb: JMP 0x001746ed LAB_001746ed: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x50],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x58],0x0 CMP byte ptr [RBP + -0x9],0x0 JZ 0x0017472a MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xc0 CALL 0x00175760 MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x3],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX],0x0 LAB_0017472a: JMP 0x0017472c LAB_0017472c: JMP 0x0017472e LAB_0017472e: ADD RSP,0x10 POP RBP RET
void end_simple_key_cache(char *param_1,char param_2) { if (*param_1 != '\0') { if (0 < *(int *)(param_1 + 0x48)) { if (*(long *)(param_1 + 0xa8) != 0) { my_large_free(*(int8 *)(param_1 + 0xa8),*(int8 *)(param_1 + 0x10)); param_1[0xa8] = '\0'; param_1[0xa9] = '\0'; param_1[0xaa] = '\0'; param_1[0xab] = '\0'; param_1[0xac] = '\0'; param_1[0xad] = '\0'; param_1[0xae] = '\0'; param_1[0xaf] = '\0'; my_free(*(int8 *)(param_1 + 0xa0)); param_1[0xa0] = '\0'; param_1[0xa1] = '\0'; param_1[0xa2] = '\0'; param_1[0xa3] = '\0'; param_1[0xa4] = '\0'; param_1[0xa5] = '\0'; param_1[0xa6] = '\0'; param_1[0xa7] = '\0'; } param_1[0x48] = -1; param_1[0x49] = -1; param_1[0x4a] = -1; param_1[0x4b] = -1; param_1[0x60] = '\0'; param_1[0x61] = '\0'; param_1[0x62] = '\0'; param_1[99] = '\0'; param_1[100] = '\0'; param_1[0x65] = '\0'; param_1[0x66] = '\0'; param_1[0x67] = '\0'; } param_1[0x50] = '\0'; param_1[0x51] = '\0'; param_1[0x52] = '\0'; param_1[0x53] = '\0'; param_1[0x54] = '\0'; param_1[0x55] = '\0'; param_1[0x56] = '\0'; param_1[0x57] = '\0'; param_1[0x58] = '\0'; param_1[0x59] = '\0'; param_1[0x5a] = '\0'; param_1[0x5b] = '\0'; param_1[0x5c] = '\0'; param_1[0x5d] = '\0'; param_1[0x5e] = '\0'; param_1[0x5f] = '\0'; if (param_2 != '\0') { inline_mysql_mutex_destroy(param_1 + 0xc0); param_1[3] = '\0'; *param_1 = '\0'; } } return; }
49,490
google::protobuf::compiler::objectivec::(anonymous namespace)::NameFromFieldDescriptor[abi:cxx11](google::protobuf::FieldDescriptor const*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc
std::string NameFromFieldDescriptor(const FieldDescriptor* field) { if (field->type() == FieldDescriptor::TYPE_GROUP) { return field->message_type()->name(); } else { return field->name(); } }
O3
cpp
google::protobuf::compiler::objectivec::(anonymous namespace)::NameFromFieldDescriptor[abi:cxx11](google::protobuf::FieldDescriptor const*): pushq %r14 pushq %rbx subq $0x18, %rsp movq %rsi, %r14 movq %rdi, %rbx movq 0x18(%rsi), %rdi testq %rdi, %rdi je 0x4c240 leaq 0xeda09(%rip), %rax # 0x139c34 leaq 0x10(%rsp), %rsi movq %rax, (%rsi) leaq 0x8(%rsp), %rdx movq %r14, (%rdx) callq 0x2f19d cmpb $0xa, 0x2(%r14) jne 0x4c252 movq %r14, %rdi callq 0x11d7ce movq %rax, %r14 movq 0x8(%r14), %rax leaq 0x10(%rbx), %rcx movq %rcx, (%rbx) movq (%rax), %rsi movq 0x8(%rax), %rdx addq %rsi, %rdx movq %rbx, %rdi callq 0x2586a addq $0x18, %rsp popq %rbx popq %r14 retq
_ZN6google8protobuf8compiler10objectivec12_GLOBAL__N_123NameFromFieldDescriptorB5cxx11EPKNS0_15FieldDescriptorE: push r14 push rbx sub rsp, 18h mov r14, rsi mov rbx, rdi mov rdi, [rsi+18h] test rdi, rdi jz short loc_4C240 lea rax, _ZN6google8protobuf15FieldDescriptor12TypeOnceInitEPKS1_; google::protobuf::FieldDescriptor::TypeOnceInit(google::protobuf::FieldDescriptor const*) lea rsi, [rsp+28h+var_18] mov [rsi], rax lea rdx, [rsp+28h+var_20] mov [rdx], r14 call _ZSt9call_onceIPFvPKN6google8protobuf15FieldDescriptorEEJS4_EEvRSt9once_flagOT_DpOT0_; std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(std::once_flag &,void (*)(google::protobuf::FieldDescriptor const*) &&,google::protobuf::FieldDescriptor const* &&) loc_4C240: cmp byte ptr [r14+2], 0Ah jnz short loc_4C252 mov rdi, r14; this call _ZNK6google8protobuf15FieldDescriptor12message_typeEv; google::protobuf::FieldDescriptor::message_type(void) mov r14, rax loc_4C252: mov rax, [r14+8] lea rcx, [rbx+10h] mov [rbx], rcx mov rsi, [rax] mov rdx, [rax+8] add rdx, rsi mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) add rsp, 18h pop rbx pop r14 retn
long long google::protobuf::compiler::objectivec::`anonymous namespace'::NameFromFieldDescriptor[abi:cxx11]( _QWORD *a1, long long a2) { long long v2; // r14 long long v4; // rdi long long v5; // rax long long v7; // [rsp+8h] [rbp-20h] BYREF long long ( *v8[3])(google::protobuf::FieldDescriptor *__hidden, const google::protobuf::FieldDescriptor *); // [rsp+10h] [rbp-18h] BYREF v2 = a2; v4 = *(_QWORD *)(a2 + 24); if ( v4 ) { v8[0] = google::protobuf::FieldDescriptor::TypeOnceInit; v7 = a2; std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>( v4, (long long)v8, (long long)&v7); } if ( *(_BYTE *)(a2 + 2) == 10 ) v2 = google::protobuf::FieldDescriptor::message_type((google::protobuf::FieldDescriptor *)a2); v5 = *(_QWORD *)(v2 + 8); *a1 = a1 + 2; return std::string::_M_construct<char *>((long long)a1, *(_BYTE **)v5, *(_QWORD *)v5 + *(_QWORD *)(v5 + 8)); }
NameFromFieldDescriptor[abi:cxx11]: PUSH R14 PUSH RBX SUB RSP,0x18 MOV R14,RSI MOV RBX,RDI MOV RDI,qword ptr [RSI + 0x18] TEST RDI,RDI JZ 0x0014c240 LEA RAX,[0x239c34] LEA RSI,[RSP + 0x10] MOV qword ptr [RSI],RAX LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],R14 CALL 0x0012f19d LAB_0014c240: CMP byte ptr [R14 + 0x2],0xa JNZ 0x0014c252 MOV RDI,R14 CALL 0x0021d7ce MOV R14,RAX LAB_0014c252: MOV RAX,qword ptr [R14 + 0x8] LEA RCX,[RBX + 0x10] MOV qword ptr [RBX],RCX MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] ADD RDX,RSI MOV RDI,RBX CALL 0x0012586a ADD RSP,0x18 POP RBX POP R14 RET
/* google::protobuf::compiler::objectivec::(anonymous namespace)::NameFromFieldDescriptor[abi:cxx11](google::protobuf::FieldDescriptor const*) */ void __thiscall google::protobuf::compiler::objectivec::(anonymous_namespace)::NameFromFieldDescriptor_abi_cxx11_ (_anonymous_namespace_ *this,FieldDescriptor *param_1) { long *plVar1; long lVar2; FieldDescriptor *local_20; code *local_18; if (*(once_flag **)(param_1 + 0x18) != (once_flag *)0x0) { local_18 = FieldDescriptor::TypeOnceInit; local_20 = param_1; std:: call_once<void(*)(google::protobuf::FieldDescriptor_const*),google::protobuf::FieldDescriptor_const*> (*(once_flag **)(param_1 + 0x18),(_func_void_FieldDescriptor_ptr *)&local_18,&local_20 ); } if (param_1[2] == (FieldDescriptor)0xa) { param_1 = (FieldDescriptor *)FieldDescriptor::message_type(param_1); } plVar1 = *(long **)(param_1 + 8); *(_anonymous_namespace_ **)this = this + 0x10; lVar2 = *plVar1; std::__cxx11::string::_M_construct<char*>(this,lVar2,plVar1[1] + lVar2); return; }
49,491
rapidcsv::SeparatorParams::SeparatorParams(char, bool, bool, bool, bool, char)
Andrewchistyakov[P]flashcards_lyc/src/rapidcsv.h
explicit SeparatorParams(const char pSeparator = ',', const bool pTrim = false, const bool pHasCR = sPlatformHasCR, const bool pQuotedLinebreaks = false, const bool pAutoQuote = true, const char pQuoteChar = '"') : mSeparator(pSeparator) , mTrim(pTrim) , mHasCR(pHasCR) , mQuotedLinebreaks(pQuotedLinebreaks) , mAutoQuote(pAutoQuote) , mQuoteChar(pQuoteChar) { }
O0
c
rapidcsv::SeparatorParams::SeparatorParams(char, bool, bool, bool, bool, char): pushq %rbp movq %rsp, %rbp movl %r8d, -0x20(%rbp) movl %ecx, %eax movl -0x20(%rbp), %ecx movl %eax, -0x1c(%rbp) movl %edx, %eax movl -0x1c(%rbp), %edx movl %eax, -0x18(%rbp) movl %esi, %eax movl -0x18(%rbp), %esi movl %eax, -0x14(%rbp) movq %rdi, %r8 movl -0x14(%rbp), %edi movb %r9b, %al movb 0x10(%rbp), %r9b movq %r8, -0x8(%rbp) movb %dil, -0x9(%rbp) andb $0x1, %sil movb %sil, -0xa(%rbp) andb $0x1, %dl movb %dl, -0xb(%rbp) andb $0x1, %cl movb %cl, -0xc(%rbp) andb $0x1, %al movb %al, -0xd(%rbp) movq -0x8(%rbp), %rax movb -0x9(%rbp), %cl movb %cl, (%rax) movb -0xa(%rbp), %cl andb $0x1, %cl movb %cl, 0x1(%rax) movb -0xb(%rbp), %cl andb $0x1, %cl movb %cl, 0x2(%rax) movb -0xc(%rbp), %cl andb $0x1, %cl movb %cl, 0x3(%rax) movb -0xd(%rbp), %cl andb $0x1, %cl movb %cl, 0x4(%rax) movb 0x10(%rbp), %cl movb %cl, 0x5(%rax) popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
_ZN8rapidcsv15SeparatorParamsC2Ecbbbbc: push rbp mov rbp, rsp mov [rbp+var_20], r8d mov eax, ecx mov ecx, [rbp+var_20] mov [rbp+var_1C], eax mov eax, edx mov edx, [rbp+var_1C] mov [rbp+var_18], eax mov eax, esi mov esi, [rbp+var_18] mov [rbp+var_14], eax mov r8, rdi mov edi, [rbp+var_14] mov al, r9b mov r9b, [rbp+arg_0] mov [rbp+var_8], r8 mov [rbp+var_9], dil and sil, 1 mov [rbp+var_A], sil and dl, 1 mov [rbp+var_B], dl and cl, 1 mov [rbp+var_C], cl and al, 1 mov [rbp+var_D], al mov rax, [rbp+var_8] mov cl, [rbp+var_9] mov [rax], cl mov cl, [rbp+var_A] and cl, 1 mov [rax+1], cl mov cl, [rbp+var_B] and cl, 1 mov [rax+2], cl mov cl, [rbp+var_C] and cl, 1 mov [rax+3], cl mov cl, [rbp+var_D] and cl, 1 mov [rax+4], cl mov cl, [rbp+arg_0] mov [rax+5], cl pop rbp retn
rapidcsv::SeparatorParams * rapidcsv::SeparatorParams::SeparatorParams( rapidcsv::SeparatorParams *this, char a2, char a3, char a4, char a5, char a6, char a7) { rapidcsv::SeparatorParams *result; // rax result = this; *(_BYTE *)this = a2; *((_BYTE *)this + 1) = a3 & 1; *((_BYTE *)this + 2) = a4 & 1; *((_BYTE *)this + 3) = a5 & 1; *((_BYTE *)this + 4) = a6 & 1; *((_BYTE *)this + 5) = a7; return result; }
SeparatorParams: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x20],R8D MOV EAX,ECX MOV ECX,dword ptr [RBP + -0x20] MOV dword ptr [RBP + -0x1c],EAX MOV EAX,EDX MOV EDX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x18],EAX MOV EAX,ESI MOV ESI,dword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x14],EAX MOV R8,RDI MOV EDI,dword ptr [RBP + -0x14] MOV AL,R9B MOV R9B,byte ptr [RBP + 0x10] MOV qword ptr [RBP + -0x8],R8 MOV byte ptr [RBP + -0x9],DIL AND SIL,0x1 MOV byte ptr [RBP + -0xa],SIL AND DL,0x1 MOV byte ptr [RBP + -0xb],DL AND CL,0x1 MOV byte ptr [RBP + -0xc],CL AND AL,0x1 MOV byte ptr [RBP + -0xd],AL MOV RAX,qword ptr [RBP + -0x8] MOV CL,byte ptr [RBP + -0x9] MOV byte ptr [RAX],CL MOV CL,byte ptr [RBP + -0xa] AND CL,0x1 MOV byte ptr [RAX + 0x1],CL MOV CL,byte ptr [RBP + -0xb] AND CL,0x1 MOV byte ptr [RAX + 0x2],CL MOV CL,byte ptr [RBP + -0xc] AND CL,0x1 MOV byte ptr [RAX + 0x3],CL MOV CL,byte ptr [RBP + -0xd] AND CL,0x1 MOV byte ptr [RAX + 0x4],CL MOV CL,byte ptr [RBP + 0x10] MOV byte ptr [RAX + 0x5],CL POP RBP RET
/* rapidcsv::SeparatorParams::SeparatorParams(char, bool, bool, bool, bool, char) */ void __thiscall rapidcsv::SeparatorParams::SeparatorParams (SeparatorParams *this,char param_1,bool param_2,bool param_3,bool param_4,bool param_5, char param_6) { *this = (SeparatorParams)param_1; this[1] = (SeparatorParams)param_2; this[2] = (SeparatorParams)param_3; this[3] = (SeparatorParams)param_4; this[4] = (SeparatorParams)param_5; this[5] = (SeparatorParams)param_6; return; }
49,492
testing::internal::GetNextRandomSeed(int)
giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest-internal-inl.h
inline int GetNextRandomSeed(int seed) { GTEST_CHECK_(1 <= seed && seed <= kMaxRandomSeed) << "Invalid random seed " << seed << " - must be in [1, " << kMaxRandomSeed << "]."; const int next_seed = seed + 1; return (next_seed > kMaxRandomSeed) ? 1 : next_seed; }
O3
c
testing::internal::GetNextRandomSeed(int): pushq %r14 pushq %rbx pushq %rax movl %edi, %ebx leal -0x1(%rbx), %eax cmpl $0x1869f, %eax # imm = 0x1869F jb 0x34edb leaq 0xf391(%rip), %rdx # 0x441d8 leaq 0x4(%rsp), %rdi movl $0x3, %esi movl $0x84, %ecx callq 0x16b08 movq 0x24186(%rip), %rdi # 0x58fe8 leaq 0xf76a(%rip), %rsi # 0x445d3 movl $0x36, %edx callq 0x85b0 movq 0x2416e(%rip), %rdi # 0x58fe8 leaq 0xf789(%rip), %rsi # 0x4460a movl $0x14, %edx callq 0x85b0 movq 0x24156(%rip), %rdi # 0x58fe8 movl %ebx, %esi callq 0x8950 movq %rax, %r14 leaq 0xf77c(%rip), %rsi # 0x4461f movl $0x12, %edx movq %rax, %rdi callq 0x85b0 movq %r14, %rdi movl $0x1869f, %esi # imm = 0x1869F callq 0x8950 leaq 0xf76e(%rip), %rsi # 0x44632 movl $0x2, %edx movq %rax, %rdi callq 0x85b0 leaq 0x4(%rsp), %rdi callq 0x16c4a leal 0x1(%rbx), %ecx cmpl $0x1869f, %ebx # imm = 0x1869F movl $0x1, %eax cmovll %ecx, %eax addq $0x8, %rsp popq %rbx popq %r14 retq movq %rax, %rbx leaq 0x4(%rsp), %rdi callq 0x16c4a movq %rbx, %rdi callq 0x8990 nop
_ZN7testing8internal17GetNextRandomSeedEi: push r14 push rbx push rax mov ebx, edi lea eax, [rbx-1] cmp eax, 1869Fh jb loc_34EDB lea rdx, aWorkspaceLlm4b_6; "/workspace/llm4binary/github/2025_star3"... lea rdi, [rsp+18h+var_14] mov esi, 3 mov ecx, 84h call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int) mov rdi, cs:_ZSt4cerr_ptr lea rsi, aCondition1Seed; "Condition 1 <= seed && seed <= kMaxRand"... mov edx, 36h ; '6' call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, cs:_ZSt4cerr_ptr lea rsi, aInvalidRandomS; "Invalid random seed " mov edx, 14h call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, cs:_ZSt4cerr_ptr mov esi, ebx call __ZNSolsEi; std::ostream::operator<<(int) mov r14, rax lea rsi, aMustBeIn1; " - must be in [1, " mov edx, 12h mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, r14 mov esi, 1869Fh call __ZNSolsEi; std::ostream::operator<<(int) lea rsi, asc_44632; "]." mov edx, 2 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rdi, [rsp+18h+var_14]; this call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog() loc_34EDB: lea ecx, [rbx+1] cmp ebx, 1869Fh mov eax, 1 cmovl eax, ecx add rsp, 8 pop rbx pop r14 retn mov rbx, rax lea rdi, [rsp+4]; this call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog() mov rdi, rbx call __Unwind_Resume
long long testing::internal::GetNextRandomSeed(testing::internal *this) { long long v1; // rax long long v2; // r14 long long v3; // rax long long v4; // rdx long long v5; // rcx long long result; // rax _DWORD v7[5]; // [rsp+0h] [rbp-14h] BYREF v7[0] = HIDWORD(v1); if ( (unsigned int)((_DWORD)this - 1) >= 0x1869F ) { testing::internal::GTestLog::GTestLog( v7, 3, "/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest-internal-inl.h", 132); std::__ostream_insert<char,std::char_traits<char>>( &std::cerr, "Condition 1 <= seed && seed <= kMaxRandomSeed failed. ", 54LL); std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, "Invalid random seed ", 20LL); v2 = std::ostream::operator<<(&std::cerr, (unsigned int)this); std::__ostream_insert<char,std::char_traits<char>>(v2, " - must be in [1, ", 18LL); v3 = std::ostream::operator<<(v2, 99999LL); std::__ostream_insert<char,std::char_traits<char>>(v3, "].", 2LL); testing::internal::GTestLog::~GTestLog((testing::internal::GTestLog *)v7, (long long)"].", v4, v5); } result = 1LL; if ( (int)this < 99999 ) return (unsigned int)((_DWORD)this + 1); return result; }
GetNextRandomSeed: PUSH R14 PUSH RBX PUSH RAX MOV EBX,EDI LEA EAX,[RBX + -0x1] CMP EAX,0x1869f JC 0x00134edb LEA RDX,[0x1441d8] LEA RDI,[RSP + 0x4] MOV ESI,0x3 MOV ECX,0x84 CALL 0x00116b08 LAB_00134e5b: MOV RDI,qword ptr [0x00158fe8] LEA RSI,[0x1445d3] MOV EDX,0x36 CALL 0x001085b0 MOV RDI,qword ptr [0x00158fe8] LEA RSI,[0x14460a] MOV EDX,0x14 CALL 0x001085b0 MOV RDI,qword ptr [0x00158fe8] MOV ESI,EBX CALL 0x00108950 MOV R14,RAX LEA RSI,[0x14461f] MOV EDX,0x12 MOV RDI,RAX CALL 0x001085b0 MOV RDI,R14 MOV ESI,0x1869f CALL 0x00108950 LEA RSI,[0x144632] MOV EDX,0x2 MOV RDI,RAX CALL 0x001085b0 LAB_00134ed1: LEA RDI,[RSP + 0x4] CALL 0x00116c4a LAB_00134edb: LEA ECX,[RBX + 0x1] CMP EBX,0x1869f MOV EAX,0x1 CMOVL EAX,ECX ADD RSP,0x8 POP RBX POP R14 RET
/* testing::internal::GetNextRandomSeed(int) */ int testing::internal::GetNextRandomSeed(int param_1) { int iVar1; ostream *poVar2; GTestLog local_14 [4]; if (0x1869e < param_1 - 1U) { GTestLog::GTestLog(local_14,3, "/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest-internal-inl.h" ,0x84); /* try { // try from 00134e5b to 00134ed0 has its CatchHandler @ 00134ef4 */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cerr_00158fe8,"Condition 1 <= seed && seed <= kMaxRandomSeed failed. " ,0x36); std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cerr_00158fe8,"Invalid random seed ",0x14); poVar2 = (ostream *)std::ostream::operator<<((ostream *)PTR_cerr_00158fe8,param_1); std::__ostream_insert<char,std::char_traits<char>>(poVar2," - must be in [1, ",0x12); poVar2 = (ostream *)std::ostream::operator<<(poVar2,99999); std::__ostream_insert<char,std::char_traits<char>>(poVar2,"].",2); GTestLog::~GTestLog(local_14); } iVar1 = 1; if (param_1 < 99999) { iVar1 = param_1 + 1; } return iVar1; }
49,493
DetachAudioStreamProcessor
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raudio.c
void DetachAudioStreamProcessor(AudioStream stream, AudioCallback process) { ma_mutex_lock(&AUDIO.System.lock); rAudioProcessor *processor = stream.buffer->processor; while (processor) { rAudioProcessor *next = processor->next; rAudioProcessor *prev = processor->prev; if (processor->process == process) { if (stream.buffer->processor == processor) stream.buffer->processor = next; if (prev) prev->next = next; if (next) next->prev = prev; RL_FREE(processor); } processor = next; } ma_mutex_unlock(&AUDIO.System.lock); }
O0
c
DetachAudioStreamProcessor: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp leaq 0x10(%rbp), %rax movq %rax, -0x28(%rbp) movq %rdi, -0x8(%rbp) leaq 0x198ad5(%rip), %rdi # 0x216930 addq $0x12b8, %rdi # imm = 0x12B8 callq 0x1d970 movq -0x28(%rbp), %rax movq (%rax), %rax movq 0x140(%rax), %rax movq %rax, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) je 0x7df0b movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax cmpq -0x8(%rbp), %rax jne 0x7defe movq -0x28(%rbp), %rax movq (%rax), %rax movq 0x140(%rax), %rax cmpq -0x10(%rbp), %rax jne 0x7decf movq -0x28(%rbp), %rax movq -0x18(%rbp), %rcx movq (%rax), %rax movq %rcx, 0x140(%rax) cmpq $0x0, -0x20(%rbp) je 0x7dee2 movq -0x18(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, 0x8(%rax) cmpq $0x0, -0x18(%rbp) je 0x7def5 movq -0x20(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x10(%rbp), %rdi callq 0xa640 movq -0x18(%rbp), %rax movq %rax, -0x10(%rbp) jmp 0x7de79 leaq 0x198a1e(%rip), %rdi # 0x216930 addq $0x12b8, %rdi # imm = 0x12B8 callq 0x1d9e0 addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
DetachAudioStreamProcessor: push rbp mov rbp, rsp sub rsp, 30h lea rax, [rbp+arg_0] mov [rbp+var_28], rax mov [rbp+var_8], rdi lea rdi, AUDIO add rdi, 12B8h call ma_mutex_lock mov rax, [rbp+var_28] mov rax, [rax] mov rax, [rax+140h] mov [rbp+var_10], rax loc_7DE79: cmp [rbp+var_10], 0 jz loc_7DF0B mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_18], rax mov rax, [rbp+var_10] mov rax, [rax+10h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rax, [rax] cmp rax, [rbp+var_8] jnz short loc_7DEFE mov rax, [rbp+var_28] mov rax, [rax] mov rax, [rax+140h] cmp rax, [rbp+var_10] jnz short loc_7DECF mov rax, [rbp+var_28] mov rcx, [rbp+var_18] mov rax, [rax] mov [rax+140h], rcx loc_7DECF: cmp [rbp+var_20], 0 jz short loc_7DEE2 mov rcx, [rbp+var_18] mov rax, [rbp+var_20] mov [rax+8], rcx loc_7DEE2: cmp [rbp+var_18], 0 jz short loc_7DEF5 mov rcx, [rbp+var_20] mov rax, [rbp+var_18] mov [rax+10h], rcx loc_7DEF5: mov rdi, [rbp+var_10] call _free loc_7DEFE: mov rax, [rbp+var_18] mov [rbp+var_10], rax jmp loc_7DE79 loc_7DF0B: lea rdi, AUDIO add rdi, 12B8h call ma_mutex_unlock add rsp, 30h pop rbp retn
long long DetachAudioStreamProcessor( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, long long a7) { long long v8; // [rsp+10h] [rbp-20h] _QWORD *v9; // [rsp+18h] [rbp-18h] _QWORD *i; // [rsp+20h] [rbp-10h] ma_mutex_lock((long long)&AUDIO + 4792); for ( i = *(_QWORD **)(a7 + 320); i; i = v9 ) { v9 = (_QWORD *)i[1]; v8 = i[2]; if ( *i == a1 ) { if ( *(_QWORD **)(a7 + 320) == i ) *(_QWORD *)(a7 + 320) = v9; if ( v8 ) *(_QWORD *)(v8 + 8) = v9; if ( v9 ) v9[2] = v8; free(i); } } return ma_mutex_unlock((long long)&AUDIO + 4792); }
DetachAudioStreamProcessor: PUSH RBP MOV RBP,RSP SUB RSP,0x30 LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0x28],RAX MOV qword ptr [RBP + -0x8],RDI LEA RDI,[0x316930] ADD RDI,0x12b8 CALL 0x0011d970 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x140] MOV qword ptr [RBP + -0x10],RAX LAB_0017de79: CMP qword ptr [RBP + -0x10],0x0 JZ 0x0017df0b MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] CMP RAX,qword ptr [RBP + -0x8] JNZ 0x0017defe MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x140] CMP RAX,qword ptr [RBP + -0x10] JNZ 0x0017decf MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x140],RCX LAB_0017decf: CMP qword ptr [RBP + -0x20],0x0 JZ 0x0017dee2 MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x8],RCX LAB_0017dee2: CMP qword ptr [RBP + -0x18],0x0 JZ 0x0017def5 MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x10],RCX LAB_0017def5: MOV RDI,qword ptr [RBP + -0x10] CALL 0x0010a640 LAB_0017defe: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x10],RAX JMP 0x0017de79 LAB_0017df0b: LEA RDI,[0x316930] ADD RDI,0x12b8 CALL 0x0011d9e0 ADD RSP,0x30 POP RBP RET
void DetachAudioStreamProcessor(long param_1) { long *plVar1; long lVar2; long in_stack_00000008; long *local_18; ma_mutex_lock(0x317be8); plVar1 = *(long **)(in_stack_00000008 + 0x140); while (local_18 = plVar1, local_18 != (long *)0x0) { plVar1 = (long *)local_18[1]; lVar2 = local_18[2]; if (*local_18 == param_1) { if (*(long **)(in_stack_00000008 + 0x140) == local_18) { *(long **)(in_stack_00000008 + 0x140) = plVar1; } if (lVar2 != 0) { *(long **)(lVar2 + 8) = plVar1; } if (plVar1 != (long *)0x0) { plVar1[2] = lVar2; } free(local_18); } } ma_mutex_unlock(0x317be8); return; }
49,494
DetachAudioStreamProcessor
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raudio.c
void DetachAudioStreamProcessor(AudioStream stream, AudioCallback process) { ma_mutex_lock(&AUDIO.System.lock); rAudioProcessor *processor = stream.buffer->processor; while (processor) { rAudioProcessor *next = processor->next; rAudioProcessor *prev = processor->prev; if (processor->process == process) { if (stream.buffer->processor == processor) stream.buffer->processor = next; if (prev) prev->next = next; if (next) next->prev = prev; RL_FREE(processor); } processor = next; } ma_mutex_unlock(&AUDIO.System.lock); }
O2
c
DetachAudioStreamProcessor: pushq %r15 pushq %r14 pushq %rbx movq %rdi, %rbx leaq 0xe7cce(%rip), %rdi # 0x124b48 callq 0x97c0 movq 0x20(%rsp), %r14 movq 0x140(%r14), %r15 testq %r15, %r15 je 0x3cec9 movq %r15, %rdi movq 0x8(%r15), %r15 cmpq %rbx, (%rdi) jne 0x3ce8b movq 0x10(%rdi), %rax cmpq %rdi, 0x140(%r14) jne 0x3ceb0 movq %r15, 0x140(%r14) testq %rax, %rax je 0x3ceb9 movq %r15, 0x8(%rax) testq %r15, %r15 je 0x3cec2 movq %rax, 0x10(%r15) callq 0x9640 jmp 0x3ce8b leaq 0xe7c78(%rip), %rdi # 0x124b48 popq %rbx popq %r14 popq %r15 jmp 0x93b0
DetachAudioStreamProcessor: push r15 push r14 push rbx mov rbx, rdi lea rdi, unk_124B48 call _pthread_mutex_lock mov r14, [rsp+18h+arg_0] mov r15, [r14+140h] loc_3CE8B: test r15, r15 jz short loc_3CEC9 mov rdi, r15 mov r15, [r15+8] cmp [rdi], rbx jnz short loc_3CE8B mov rax, [rdi+10h] cmp [r14+140h], rdi jnz short loc_3CEB0 mov [r14+140h], r15 loc_3CEB0: test rax, rax jz short loc_3CEB9 mov [rax+8], r15 loc_3CEB9: test r15, r15 jz short loc_3CEC2 mov [r15+10h], rax loc_3CEC2: call _free jmp short loc_3CE8B loc_3CEC9: lea rdi, unk_124B48 pop rbx pop r14 pop r15 jmp _pthread_mutex_unlock
long long DetachAudioStreamProcessor( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, long long a7) { _QWORD *v8; // r15 _QWORD *v9; // rdi long long v10; // rax pthread_mutex_lock(&unk_124B48); v8 = *(_QWORD **)(a7 + 320); while ( v8 ) { v9 = v8; v8 = (_QWORD *)v8[1]; if ( *v9 == a1 ) { v10 = v9[2]; if ( *(_QWORD **)(a7 + 320) == v9 ) *(_QWORD *)(a7 + 320) = v8; if ( v10 ) *(_QWORD *)(v10 + 8) = v8; if ( v8 ) v8[2] = v10; free(v9); } } return pthread_mutex_unlock(&unk_124B48); }
DetachAudioStreamProcessor: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RDI LEA RDI,[0x224b48] CALL 0x001097c0 MOV R14,qword ptr [RSP + 0x20] MOV R15,qword ptr [R14 + 0x140] LAB_0013ce8b: TEST R15,R15 JZ 0x0013cec9 MOV RDI,R15 MOV R15,qword ptr [R15 + 0x8] CMP qword ptr [RDI],RBX JNZ 0x0013ce8b MOV RAX,qword ptr [RDI + 0x10] CMP qword ptr [R14 + 0x140],RDI JNZ 0x0013ceb0 MOV qword ptr [R14 + 0x140],R15 LAB_0013ceb0: TEST RAX,RAX JZ 0x0013ceb9 MOV qword ptr [RAX + 0x8],R15 LAB_0013ceb9: TEST R15,R15 JZ 0x0013cec2 MOV qword ptr [R15 + 0x10],RAX LAB_0013cec2: CALL 0x00109640 JMP 0x0013ce8b LAB_0013cec9: LEA RDI,[0x224b48] POP RBX POP R14 POP R15 JMP 0x001093b0
void DetachAudioStreamProcessor(long param_1) { long *plVar1; long lVar2; long *__ptr; long in_stack_00000008; pthread_mutex_lock((pthread_mutex_t *)(AUDIO + 0x12b8)); plVar1 = *(long **)(in_stack_00000008 + 0x140); while (__ptr = plVar1, __ptr != (long *)0x0) { plVar1 = (long *)__ptr[1]; if (*__ptr == param_1) { lVar2 = __ptr[2]; if (*(long **)(in_stack_00000008 + 0x140) == __ptr) { *(long **)(in_stack_00000008 + 0x140) = plVar1; } if (lVar2 != 0) { *(long **)(lVar2 + 8) = plVar1; } if (plVar1 != (long *)0x0) { plVar1[2] = lVar2; } free(__ptr); } } pthread_mutex_unlock((pthread_mutex_t *)(AUDIO + 0x12b8)); return; }
49,495
DetachAudioStreamProcessor
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raudio.c
void DetachAudioStreamProcessor(AudioStream stream, AudioCallback process) { ma_mutex_lock(&AUDIO.System.lock); rAudioProcessor *processor = stream.buffer->processor; while (processor) { rAudioProcessor *next = processor->next; rAudioProcessor *prev = processor->prev; if (processor->process == process) { if (stream.buffer->processor == processor) stream.buffer->processor = next; if (prev) prev->next = next; if (next) next->prev = prev; RL_FREE(processor); } processor = next; } ma_mutex_unlock(&AUDIO.System.lock); }
O3
c
DetachAudioStreamProcessor: pushq %r15 pushq %r14 pushq %rbx movq %rdi, %rbx leaq 0xf38a7(%rip), %rdi # 0x138b28 callq 0xa7d0 movq 0x20(%rsp), %r14 movq 0x140(%r14), %rdi testq %rdi, %rdi je 0x452d3 movq 0x8(%rdi), %r15 cmpq %rbx, (%rdi) jne 0x452cb movq 0x10(%rdi), %rax cmpq %rdi, 0x140(%r14) jne 0x452b4 movq %r15, 0x140(%r14) testq %rax, %rax je 0x452bd movq %r15, 0x8(%rax) testq %r15, %r15 je 0x452c6 movq %rax, 0x10(%r15) callq 0xa650 movq %r15, %rdi testq %r15, %r15 jne 0x45297 leaq 0xf384e(%rip), %rdi # 0x138b28 popq %rbx popq %r14 popq %r15 jmp 0xa3c0
DetachAudioStreamProcessor: push r15 push r14 push rbx mov rbx, rdi lea rdi, unk_138B28 call _pthread_mutex_lock mov r14, [rsp+18h+arg_0] mov rdi, [r14+140h] test rdi, rdi jz short loc_452D3 loc_45297: mov r15, [rdi+8] cmp [rdi], rbx jnz short loc_452CB mov rax, [rdi+10h] cmp [r14+140h], rdi jnz short loc_452B4 mov [r14+140h], r15 loc_452B4: test rax, rax jz short loc_452BD mov [rax+8], r15 loc_452BD: test r15, r15 jz short loc_452C6 mov [r15+10h], rax loc_452C6: call _free loc_452CB: mov rdi, r15 test r15, r15 jnz short loc_45297 loc_452D3: lea rdi, unk_138B28 pop rbx pop r14 pop r15 jmp _pthread_mutex_unlock
long long DetachAudioStreamProcessor( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, long long a7) { _QWORD *v8; // rdi _QWORD *v9; // r15 long long v10; // rax pthread_mutex_lock(&unk_138B28); v8 = *(_QWORD **)(a7 + 320); if ( v8 ) { do { v9 = (_QWORD *)v8[1]; if ( *v8 == a1 ) { v10 = v8[2]; if ( *(_QWORD **)(a7 + 320) == v8 ) *(_QWORD *)(a7 + 320) = v9; if ( v10 ) *(_QWORD *)(v10 + 8) = v9; if ( v9 ) v9[2] = v10; free(v8); } v8 = v9; } while ( v9 ); } return pthread_mutex_unlock(&unk_138B28); }
DetachAudioStreamProcessor: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RDI LEA RDI,[0x238b28] CALL 0x0010a7d0 MOV R14,qword ptr [RSP + 0x20] MOV RDI,qword ptr [R14 + 0x140] TEST RDI,RDI JZ 0x001452d3 LAB_00145297: MOV R15,qword ptr [RDI + 0x8] CMP qword ptr [RDI],RBX JNZ 0x001452cb MOV RAX,qword ptr [RDI + 0x10] CMP qword ptr [R14 + 0x140],RDI JNZ 0x001452b4 MOV qword ptr [R14 + 0x140],R15 LAB_001452b4: TEST RAX,RAX JZ 0x001452bd MOV qword ptr [RAX + 0x8],R15 LAB_001452bd: TEST R15,R15 JZ 0x001452c6 MOV qword ptr [R15 + 0x10],RAX LAB_001452c6: CALL 0x0010a650 LAB_001452cb: MOV RDI,R15 TEST R15,R15 JNZ 0x00145297 LAB_001452d3: LEA RDI,[0x238b28] POP RBX POP R14 POP R15 JMP 0x0010a3c0
void DetachAudioStreamProcessor(long param_1) { long *plVar1; long lVar2; long *__ptr; long in_stack_00000008; pthread_mutex_lock((pthread_mutex_t *)(AUDIO + 0x12b8)); plVar1 = *(long **)(in_stack_00000008 + 0x140); while (__ptr = plVar1, __ptr != (long *)0x0) { plVar1 = (long *)__ptr[1]; if (*__ptr == param_1) { lVar2 = __ptr[2]; if (*(long **)(in_stack_00000008 + 0x140) == __ptr) { *(long **)(in_stack_00000008 + 0x140) = plVar1; } if (lVar2 != 0) { *(long **)(lVar2 + 8) = plVar1; } if (plVar1 != (long *)0x0) { plVar1[2] = lVar2; } free(__ptr); } } pthread_mutex_unlock((pthread_mutex_t *)(AUDIO + 0x12b8)); return; }
49,496
ma_ft_add
eloqsql/storage/maria/ma_ft_update.c
int _ma_ft_add(MARIA_HA *info, uint keynr, uchar *keybuf, const uchar *record, my_off_t pos) { int error= -1; FT_WORD *wlist; DBUG_ENTER("_ma_ft_add"); DBUG_PRINT("enter",("keynr: %d",keynr)); if ((wlist= _ma_ft_parserecord(info, keynr, record, &info->ft_memroot))) error= _ma_ft_store(info,keynr,keybuf,wlist,pos); free_root(&info->ft_memroot, MYF(MY_MARK_BLOCKS_FREE)); DBUG_PRINT("exit",("Return: %d",error)); DBUG_RETURN(error); }
O0
c
ma_ft_add: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movl $0xffffffff, -0x2c(%rbp) # imm = 0xFFFFFFFF jmp 0x79c64 movq -0x8(%rbp), %rdi movl -0xc(%rbp), %esi movq -0x20(%rbp), %rdx movq -0x8(%rbp), %rcx addq $0x328, %rcx # imm = 0x328 callq 0x79560 movq %rax, -0x38(%rbp) cmpq $0x0, %rax je 0x79ca4 movq -0x8(%rbp), %rdi movl -0xc(%rbp), %esi movq -0x18(%rbp), %rdx movq -0x38(%rbp), %rcx movq -0x28(%rbp), %r8 callq 0x79bc0 movl %eax, -0x2c(%rbp) movq -0x8(%rbp), %rdi addq $0x328, %rdi # imm = 0x328 movl $0x2, %esi callq 0xf7fb0 jmp 0x79cbb jmp 0x79cbd movl -0x2c(%rbp), %eax movl %eax, -0x3c(%rbp) movl -0x3c(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopl (%rax)
_ma_ft_add: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_2C], 0FFFFFFFFh jmp short $+2 loc_79C64: mov rdi, [rbp+var_8] mov esi, [rbp+var_C] mov rdx, [rbp+var_20] mov rcx, [rbp+var_8] add rcx, 328h call _ma_ft_parserecord mov [rbp+var_38], rax cmp rax, 0 jz short loc_79CA4 mov rdi, [rbp+var_8] mov esi, [rbp+var_C] mov rdx, [rbp+var_18] mov rcx, [rbp+var_38] mov r8, [rbp+var_28] call _ma_ft_store mov [rbp+var_2C], eax loc_79CA4: mov rdi, [rbp+var_8] add rdi, 328h mov esi, 2 call free_root jmp short $+2 loc_79CBB: jmp short $+2 loc_79CBD: mov eax, [rbp+var_2C] mov [rbp+var_3C], eax mov eax, [rbp+var_3C] add rsp, 40h pop rbp retn
long long ma_ft_add(_QWORD *a1, unsigned int a2, _BYTE *a3, long long a4, long long a5) { _QWORD *v6; // [rsp+8h] [rbp-38h] unsigned int v7; // [rsp+14h] [rbp-2Ch] v7 = -1; v6 = (_QWORD *)ma_ft_parserecord(a1, a2, a4, (long long)(a1 + 101)); if ( v6 ) v7 = ma_ft_store((long long)a1, a2, a3, v6, a5); free_root(a1 + 101, 2LL); return v7; }
_ma_ft_add: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV dword ptr [RBP + -0x2c],0xffffffff JMP 0x00179c64 LAB_00179c64: 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,0x328 CALL 0x00179560 MOV qword ptr [RBP + -0x38],RAX CMP RAX,0x0 JZ 0x00179ca4 MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0xc] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x38] MOV R8,qword ptr [RBP + -0x28] CALL 0x00179bc0 MOV dword ptr [RBP + -0x2c],EAX LAB_00179ca4: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x328 MOV ESI,0x2 CALL 0x001f7fb0 JMP 0x00179cbb LAB_00179cbb: JMP 0x00179cbd LAB_00179cbd: MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x3c],EAX MOV EAX,dword ptr [RBP + -0x3c] ADD RSP,0x40 POP RBP RET
int4 _ma_ft_add(long param_1,int4 param_2,int8 param_3,int8 param_4,int8 param_5) { long lVar1; int4 local_34; local_34 = 0xffffffff; lVar1 = _ma_ft_parserecord(param_1,param_2,param_4,param_1 + 0x328); if (lVar1 != 0) { local_34 = _ma_ft_store(param_1,param_2,param_3,lVar1,param_5); } free_root(param_1 + 0x328,2); return local_34; }
49,497
my_xml_enter
eloqsql/strings/xml.c
static int my_xml_enter(MY_XML_PARSER *st, const char *str, size_t len) { if (my_xml_attr_ensure_space(st, len + 1 /* the separator char */)) return MY_XML_ERROR; if (st->attr.end > st->attr.start) { st->attr.end[0]= '/'; st->attr.end++; } memcpy(st->attr.end, str, len); st->attr.end+= len; st->attr.end[0]= '\0'; if (st->flags & MY_XML_FLAG_RELATIVE_NAMES) return st->enter ? st->enter(st, str, len) : MY_XML_OK; else return st->enter ? st->enter(st, st->attr.start, st->attr.end - st->attr.start) : MY_XML_OK; }
O0
c
my_xml_enter: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi addq $0x1, %rsi callq 0x78b90 cmpl $0x0, %eax je 0x786c6 movl $0x1, -0x4(%rbp) jmp 0x787dc movq -0x10(%rbp), %rax movq 0x120(%rax), %rax movq -0x10(%rbp), %rcx cmpq 0x118(%rcx), %rax jbe 0x78702 movq -0x10(%rbp), %rax movq 0x120(%rax), %rax movb $0x2f, (%rax) movq -0x10(%rbp), %rax movq 0x120(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x120(%rax) movq -0x10(%rbp), %rax movq 0x120(%rax), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x24210 movq -0x20(%rbp), %rcx movq -0x10(%rbp), %rax addq 0x120(%rax), %rcx movq %rcx, 0x120(%rax) movq -0x10(%rbp), %rax movq 0x120(%rax), %rax movb $0x0, (%rax) movq -0x10(%rbp), %rax movl (%rax), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x78787 movq -0x10(%rbp), %rax cmpq $0x0, 0x148(%rax) je 0x78778 movq -0x10(%rbp), %rax movq 0x148(%rax), %rax movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq *%rax movl %eax, -0x24(%rbp) jmp 0x7877f xorl %eax, %eax movl %eax, -0x24(%rbp) jmp 0x7877f movl -0x24(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x787dc movq -0x10(%rbp), %rax cmpq $0x0, 0x148(%rax) je 0x787cf movq -0x10(%rbp), %rax movq 0x148(%rax), %rax movq -0x10(%rbp), %rdi movq -0x10(%rbp), %rcx movq 0x118(%rcx), %rsi movq -0x10(%rbp), %rcx movq 0x120(%rcx), %rdx movq -0x10(%rbp), %rcx movq 0x118(%rcx), %rcx subq %rcx, %rdx callq *%rax movl %eax, -0x28(%rbp) jmp 0x787d6 xorl %eax, %eax movl %eax, -0x28(%rbp) jmp 0x787d6 movl -0x28(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_xml_enter: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] add rsi, 1 call my_xml_attr_ensure_space cmp eax, 0 jz short loc_786C6 mov [rbp+var_4], 1 jmp loc_787DC loc_786C6: mov rax, [rbp+var_10] mov rax, [rax+120h] mov rcx, [rbp+var_10] cmp rax, [rcx+118h] jbe short loc_78702 mov rax, [rbp+var_10] mov rax, [rax+120h] mov byte ptr [rax], 2Fh ; '/' mov rax, [rbp+var_10] mov rcx, [rax+120h] add rcx, 1 mov [rax+120h], rcx loc_78702: mov rax, [rbp+var_10] mov rdi, [rax+120h] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call _memcpy mov rcx, [rbp+var_20] mov rax, [rbp+var_10] add rcx, [rax+120h] mov [rax+120h], rcx mov rax, [rbp+var_10] mov rax, [rax+120h] mov byte ptr [rax], 0 mov rax, [rbp+var_10] mov eax, [rax] and eax, 1 cmp eax, 0 jz short loc_78787 mov rax, [rbp+var_10] cmp qword ptr [rax+148h], 0 jz short loc_78778 mov rax, [rbp+var_10] mov rax, [rax+148h] mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call rax mov [rbp+var_24], eax jmp short loc_7877F loc_78778: xor eax, eax mov [rbp+var_24], eax jmp short $+2 loc_7877F: mov eax, [rbp+var_24] mov [rbp+var_4], eax jmp short loc_787DC loc_78787: mov rax, [rbp+var_10] cmp qword ptr [rax+148h], 0 jz short loc_787CF mov rax, [rbp+var_10] mov rax, [rax+148h] mov rdi, [rbp+var_10] mov rcx, [rbp+var_10] mov rsi, [rcx+118h] mov rcx, [rbp+var_10] mov rdx, [rcx+120h] mov rcx, [rbp+var_10] mov rcx, [rcx+118h] sub rdx, rcx call rax mov [rbp+var_28], eax jmp short loc_787D6 loc_787CF: xor eax, eax mov [rbp+var_28], eax jmp short $+2 loc_787D6: mov eax, [rbp+var_28] mov [rbp+var_4], eax loc_787DC: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long my_xml_enter(long long a1, long long a2, long long a3) { if ( (unsigned int)my_xml_attr_ensure_space(a1, a3 + 1) ) { return 1; } else { if ( *(_QWORD *)(a1 + 288) > *(_QWORD *)(a1 + 280) ) *(_BYTE *)(*(_QWORD *)(a1 + 288))++ = 47; memcpy(*(_QWORD *)(a1 + 288), a2, a3); *(_QWORD *)(a1 + 288) += a3; **(_BYTE **)(a1 + 288) = 0; if ( (*(_DWORD *)a1 & 1) != 0 ) { if ( *(_QWORD *)(a1 + 328) ) return (unsigned int)(*(long long ( **)(long long, long long, long long))(a1 + 328))(a1, a2, a3); else return 0; } else if ( *(_QWORD *)(a1 + 328) ) { return (unsigned int)(*(long long ( **)(long long, _QWORD, _QWORD))(a1 + 328))( a1, *(_QWORD *)(a1 + 280), *(_QWORD *)(a1 + 288) - *(_QWORD *)(a1 + 280)); } else { return 0; } } }
my_xml_enter: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] ADD RSI,0x1 CALL 0x00178b90 CMP EAX,0x0 JZ 0x001786c6 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001787dc LAB_001786c6: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x120] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x118] JBE 0x00178702 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x120] MOV byte ptr [RAX],0x2f MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x120] ADD RCX,0x1 MOV qword ptr [RAX + 0x120],RCX LAB_00178702: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x120] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x00124210 MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] ADD RCX,qword ptr [RAX + 0x120] MOV qword ptr [RAX + 0x120],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x120] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] AND EAX,0x1 CMP EAX,0x0 JZ 0x00178787 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x148],0x0 JZ 0x00178778 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x148] MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL RAX MOV dword ptr [RBP + -0x24],EAX JMP 0x0017877f LAB_00178778: XOR EAX,EAX MOV dword ptr [RBP + -0x24],EAX JMP 0x0017877f LAB_0017877f: MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x4],EAX JMP 0x001787dc LAB_00178787: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x148],0x0 JZ 0x001787cf MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x148] MOV RDI,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RCX + 0x118] MOV RCX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RCX + 0x120] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x118] SUB RDX,RCX CALL RAX MOV dword ptr [RBP + -0x28],EAX JMP 0x001787d6 LAB_001787cf: XOR EAX,EAX MOV dword ptr [RBP + -0x28],EAX JMP 0x001787d6 LAB_001787d6: MOV EAX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x4],EAX LAB_001787dc: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 my_xml_enter(uint *param_1,void *param_2,size_t param_3) { int iVar1; int4 local_30; int4 local_2c; int4 local_c; iVar1 = my_xml_attr_ensure_space(param_1,param_3 + 1); if (iVar1 == 0) { if (*(ulong *)(param_1 + 0x46) < *(ulong *)(param_1 + 0x48)) { **(int1 **)(param_1 + 0x48) = 0x2f; *(long *)(param_1 + 0x48) = *(long *)(param_1 + 0x48) + 1; } memcpy(*(void **)(param_1 + 0x48),param_2,param_3); *(size_t *)(param_1 + 0x48) = param_3 + *(long *)(param_1 + 0x48); **(int1 **)(param_1 + 0x48) = 0; if ((*param_1 & 1) == 0) { if (*(long *)(param_1 + 0x52) == 0) { local_30 = 0; } else { local_30 = (**(code **)(param_1 + 0x52)) (param_1,*(int8 *)(param_1 + 0x46), *(long *)(param_1 + 0x48) - *(long *)(param_1 + 0x46)); } local_c = local_30; } else { if (*(long *)(param_1 + 0x52) == 0) { local_2c = 0; } else { local_2c = (**(code **)(param_1 + 0x52))(param_1,param_2,param_3); } local_c = local_2c; } } else { local_c = 1; } return local_c; }
49,498
my_xml_enter
eloqsql/strings/xml.c
static int my_xml_enter(MY_XML_PARSER *st, const char *str, size_t len) { if (my_xml_attr_ensure_space(st, len + 1 /* the separator char */)) return MY_XML_ERROR; if (st->attr.end > st->attr.start) { st->attr.end[0]= '/'; st->attr.end++; } memcpy(st->attr.end, str, len); st->attr.end+= len; st->attr.end[0]= '\0'; if (st->flags & MY_XML_FLAG_RELATIVE_NAMES) return st->enter ? st->enter(st, str, len) : MY_XML_OK; else return st->enter ? st->enter(st, st->attr.start, st->attr.end - st->attr.start) : MY_XML_OK; }
O3
c
my_xml_enter: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movq 0x120(%rdi), %rdi movq 0x110(%rbx), %rcx movq 0x118(%rbx), %rax movq %rdi, %r12 subq %rax, %r12 addq %r12, %rdx addq $0x2, %rdx cmpq %rcx, %rdx jbe 0x5b0cd leaq 0x2(%r14), %rax movq $-0x3, %rdx subq %r14, %rdx shrq %rdx cmpq %rcx, %rdx leaq (%rax,%rcx,2), %rax movq $-0x1, %rdx cmovaq %rax, %rdx movq %rdx, 0x110(%rbx) movq 0x108(%rbx), %rsi xorl %edi, %edi testq %rsi, %rsi je 0x5b07b xorl %ecx, %ecx callq 0x2b5f8 movq %rax, 0x108(%rbx) jmp 0x5b0b0 movq %rdx, %rsi xorl %edx, %edx callq 0x2b4d5 movq %rax, 0x108(%rbx) testq %rax, %rax je 0x5b14b leaq 0x88(%rbx), %rsi leaq 0x1(%r12), %rdx movq %rax, %rdi callq 0x24220 movq 0x108(%rbx), %rax movq %rax, 0x118(%rbx) addq %rax, %r12 movq %r12, 0x120(%rbx) movq %r12, %rdi testq %rax, %rax je 0x5b15d cmpq %rax, %rdi jbe 0x5b0e6 movb $0x2f, (%rdi) movq 0x120(%rbx), %rdi incq %rdi movq %rdi, 0x120(%rbx) movq %r15, %rsi movq %r14, %rdx callq 0x24220 movq 0x120(%rbx), %rax leaq (%rax,%r14), %rcx movq %rcx, 0x120(%rbx) movb $0x0, (%rax,%r14) testb $0x1, (%rbx) movq 0x148(%rbx), %rax jne 0x5b12f testq %rax, %rax je 0x5b147 movq 0x118(%rbx), %rsi movq 0x120(%rbx), %rdx subq %rsi, %rdx movq %rbx, %rdi jmp 0x5b13d testq %rax, %rax je 0x5b147 movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmpq *%rax xorl %eax, %eax jmp 0x5b162 movq $0x0, 0x118(%rbx) movq %r12, 0x120(%rbx) movl $0x1, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
my_xml_enter: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov r14, rdx mov r15, rsi mov rbx, rdi mov rdi, [rdi+120h] mov rcx, [rbx+110h] mov rax, [rbx+118h] mov r12, rdi sub r12, rax add rdx, r12 add rdx, 2 cmp rdx, rcx jbe loc_5B0CD lea rax, [r14+2] mov rdx, 0FFFFFFFFFFFFFFFDh sub rdx, r14 shr rdx, 1 cmp rdx, rcx lea rax, [rax+rcx*2] mov rdx, 0FFFFFFFFFFFFFFFFh cmova rdx, rax mov [rbx+110h], rdx mov rsi, [rbx+108h] xor edi, edi test rsi, rsi jz short loc_5B07B xor ecx, ecx call my_realloc mov [rbx+108h], rax jmp short loc_5B0B0 loc_5B07B: mov rsi, rdx xor edx, edx call my_malloc mov [rbx+108h], rax test rax, rax jz loc_5B14B lea rsi, [rbx+88h] lea rdx, [r12+1] mov rdi, rax call _memcpy mov rax, [rbx+108h] loc_5B0B0: mov [rbx+118h], rax add r12, rax mov [rbx+120h], r12 mov rdi, r12 test rax, rax jz loc_5B15D loc_5B0CD: cmp rdi, rax jbe short loc_5B0E6 mov byte ptr [rdi], 2Fh ; '/' mov rdi, [rbx+120h] inc rdi mov [rbx+120h], rdi loc_5B0E6: mov rsi, r15 mov rdx, r14 call _memcpy mov rax, [rbx+120h] lea rcx, [rax+r14] mov [rbx+120h], rcx mov byte ptr [rax+r14], 0 test byte ptr [rbx], 1 mov rax, [rbx+148h] jnz short loc_5B12F test rax, rax jz short loc_5B147 mov rsi, [rbx+118h] mov rdx, [rbx+120h] sub rdx, rsi mov rdi, rbx jmp short loc_5B13D loc_5B12F: test rax, rax jz short loc_5B147 mov rdi, rbx mov rsi, r15 mov rdx, r14 loc_5B13D: pop rbx pop r12 pop r14 pop r15 pop rbp jmp rax loc_5B147: xor eax, eax jmp short loc_5B162 loc_5B14B: mov qword ptr [rbx+118h], 0 mov [rbx+120h], r12 loc_5B15D: mov eax, 1 loc_5B162: pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long my_xml_enter(long long a1, long long a2, long long a3) { _BYTE *v6; // rdi unsigned long long v7; // rcx unsigned long long v8; // rax _BYTE *v9; // r12 bool v10; // cc unsigned long long v11; // rdx long long v12; // rsi long long v13; // rax _BYTE *v14; // r12 _BYTE *v15; // rcx long long ( *v16)(long long, long long, long long); // rax long long v17; // rsi long long v18; // rdx long long v19; // rdi v6 = *(_BYTE **)(a1 + 288); v7 = *(_QWORD *)(a1 + 272); v8 = *(_QWORD *)(a1 + 280); v9 = &v6[-v8]; if ( (unsigned long long)&v6[a3 - v8 + 2] > v7 ) { v10 = (unsigned long long)(-3 - a3) >> 1 <= v7; v11 = -1LL; if ( !v10 ) v11 = a3 + 2 + 2 * v7; *(_QWORD *)(a1 + 272) = v11; v12 = *(_QWORD *)(a1 + 264); if ( v12 ) { v8 = my_realloc(0, v12, v11, 0); *(_QWORD *)(a1 + 264) = v8; } else { v13 = my_malloc(0, v11, 0); *(_QWORD *)(a1 + 264) = v13; if ( !v13 ) { *(_QWORD *)(a1 + 280) = 0LL; *(_QWORD *)(a1 + 288) = v9; return 1LL; } memcpy(v13, a1 + 136, v9 + 1); v8 = *(_QWORD *)(a1 + 264); } *(_QWORD *)(a1 + 280) = v8; v14 = &v9[v8]; *(_QWORD *)(a1 + 288) = v14; v6 = v14; if ( v8 ) goto LABEL_9; return 1LL; } LABEL_9: if ( (unsigned long long)v6 > v8 ) { *v6 = 47; v6 = (_BYTE *)(*(_QWORD *)(a1 + 288) + 1LL); *(_QWORD *)(a1 + 288) = v6; } memcpy(v6, a2, a3); v15 = (_BYTE *)(*(_QWORD *)(a1 + 288) + a3); *(_QWORD *)(a1 + 288) = v15; *v15 = 0; v16 = *(long long ( **)(long long, long long, long long))(a1 + 328); if ( (*(_BYTE *)a1 & 1) != 0 ) { if ( v16 ) { v19 = a1; v17 = a2; v18 = a3; return v16(v19, v17, v18); } } else if ( v16 ) { v17 = *(_QWORD *)(a1 + 280); v18 = *(_QWORD *)(a1 + 288) - v17; v19 = a1; return v16(v19, v17, v18); } return 0LL; }
my_xml_enter: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x120] MOV RCX,qword ptr [RBX + 0x110] MOV RAX,qword ptr [RBX + 0x118] MOV R12,RDI SUB R12,RAX ADD RDX,R12 ADD RDX,0x2 CMP RDX,RCX JBE 0x0015b0cd LEA RAX,[R14 + 0x2] MOV RDX,-0x3 SUB RDX,R14 SHR RDX,0x1 CMP RDX,RCX LEA RAX,[RAX + RCX*0x2] MOV RDX,-0x1 CMOVA RDX,RAX MOV qword ptr [RBX + 0x110],RDX MOV RSI,qword ptr [RBX + 0x108] XOR EDI,EDI TEST RSI,RSI JZ 0x0015b07b XOR ECX,ECX CALL 0x0012b5f8 MOV qword ptr [RBX + 0x108],RAX JMP 0x0015b0b0 LAB_0015b07b: MOV RSI,RDX XOR EDX,EDX CALL 0x0012b4d5 MOV qword ptr [RBX + 0x108],RAX TEST RAX,RAX JZ 0x0015b14b LEA RSI,[RBX + 0x88] LEA RDX,[R12 + 0x1] MOV RDI,RAX CALL 0x00124220 MOV RAX,qword ptr [RBX + 0x108] LAB_0015b0b0: MOV qword ptr [RBX + 0x118],RAX ADD R12,RAX MOV qword ptr [RBX + 0x120],R12 MOV RDI,R12 TEST RAX,RAX JZ 0x0015b15d LAB_0015b0cd: CMP RDI,RAX JBE 0x0015b0e6 MOV byte ptr [RDI],0x2f MOV RDI,qword ptr [RBX + 0x120] INC RDI MOV qword ptr [RBX + 0x120],RDI LAB_0015b0e6: MOV RSI,R15 MOV RDX,R14 CALL 0x00124220 MOV RAX,qword ptr [RBX + 0x120] LEA RCX,[RAX + R14*0x1] MOV qword ptr [RBX + 0x120],RCX MOV byte ptr [RAX + R14*0x1],0x0 TEST byte ptr [RBX],0x1 MOV RAX,qword ptr [RBX + 0x148] JNZ 0x0015b12f TEST RAX,RAX JZ 0x0015b147 MOV RSI,qword ptr [RBX + 0x118] MOV RDX,qword ptr [RBX + 0x120] SUB RDX,RSI MOV RDI,RBX JMP 0x0015b13d LAB_0015b12f: TEST RAX,RAX JZ 0x0015b147 MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 LAB_0015b13d: POP RBX POP R12 POP R14 POP R15 POP RBP JMP RAX LAB_0015b147: XOR EAX,EAX JMP 0x0015b162 LAB_0015b14b: MOV qword ptr [RBX + 0x118],0x0 MOV qword ptr [RBX + 0x120],R12 LAB_0015b15d: MOV EAX,0x1 LAB_0015b162: POP RBX POP R12 POP R14 POP R15 POP RBP RET
int8 my_xml_enter(byte *param_1,void *param_2,size_t param_3) { ulong uVar1; code *UNRECOVERED_JUMPTABLE; int1 *puVar2; void *__dest; int8 uVar3; long lVar4; long lVar5; int1 *__dest_00; __dest_00 = *(int1 **)(param_1 + 0x120); uVar1 = *(ulong *)(param_1 + 0x110); puVar2 = *(int1 **)(param_1 + 0x118); lVar5 = (long)__dest_00 - (long)puVar2; if (uVar1 < param_3 + lVar5 + 2) { lVar4 = -1; if (uVar1 < -param_3 - 3 >> 1) { lVar4 = param_3 + 2 + uVar1 * 2; } *(long *)(param_1 + 0x110) = lVar4; if (*(long *)(param_1 + 0x108) == 0) { __dest = (void *)my_malloc(0,lVar4,0); *(void **)(param_1 + 0x108) = __dest; if (__dest != (void *)0x0) { memcpy(__dest,param_1 + 0x88,lVar5 + 1); puVar2 = *(int1 **)(param_1 + 0x108); goto LAB_0015b0b0; } param_1[0x118] = 0; param_1[0x119] = 0; param_1[0x11a] = 0; param_1[0x11b] = 0; param_1[0x11c] = 0; param_1[0x11d] = 0; param_1[0x11e] = 0; param_1[0x11f] = 0; *(long *)(param_1 + 0x120) = lVar5; } else { puVar2 = (int1 *)my_realloc(); *(int1 **)(param_1 + 0x108) = puVar2; LAB_0015b0b0: *(int1 **)(param_1 + 0x118) = puVar2; __dest_00 = puVar2 + lVar5; *(int1 **)(param_1 + 0x120) = __dest_00; if (puVar2 != (int1 *)0x0) goto LAB_0015b0cd; } uVar3 = 1; } else { LAB_0015b0cd: if (puVar2 < __dest_00) { *__dest_00 = 0x2f; __dest_00 = (int1 *)(*(long *)(param_1 + 0x120) + 1); *(int1 **)(param_1 + 0x120) = __dest_00; } memcpy(__dest_00,param_2,param_3); lVar5 = *(long *)(param_1 + 0x120); *(size_t *)(param_1 + 0x120) = lVar5 + param_3; *(int1 *)(lVar5 + param_3) = 0; UNRECOVERED_JUMPTABLE = *(code **)(param_1 + 0x148); if ((*param_1 & 1) == 0) { if (UNRECOVERED_JUMPTABLE != (code *)0x0) { param_2 = *(void **)(param_1 + 0x118); param_3 = *(long *)(param_1 + 0x120) - (long)param_2; LAB_0015b13d: /* WARNING: Could not recover jumptable at 0x0015b145. Too many branches */ /* WARNING: Treating indirect jump as call */ uVar3 = (*UNRECOVERED_JUMPTABLE)(param_1,param_2,param_3); return uVar3; } } else if (UNRECOVERED_JUMPTABLE != (code *)0x0) goto LAB_0015b13d; uVar3 = 0; } return uVar3; }
49,499
copy_typelib
eloqsql/mysys/typelib.c
TYPELIB *copy_typelib(MEM_ROOT *root, const TYPELIB *from) { TYPELIB *to; uint i; if (!from) return NULL; if (!(to= (TYPELIB*) alloc_root(root, sizeof(TYPELIB)))) return NULL; if (!(to->type_names= (const char **) alloc_root(root, (sizeof(char *) + sizeof(int)) * (from->count + 1)))) return NULL; to->type_lengths= (unsigned int *)(to->type_names + from->count + 1); to->count= from->count; if (from->name) { if (!(to->name= strdup_root(root, from->name))) return NULL; } else to->name= NULL; for (i= 0; i < from->count; i++) { if (!(to->type_names[i]= strmake_root(root, from->type_names[i], from->type_lengths[i]))) return NULL; to->type_lengths[i]= from->type_lengths[i]; } to->type_names[to->count]= NULL; to->type_lengths[to->count]= 0; return to; }
O0
c
copy_typelib: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) jne 0x2c874 movq $0x0, -0x8(%rbp) jmp 0x2c9f1 movq -0x10(%rbp), %rdi movl $0x20, %esi callq 0x35b50 movq %rax, -0x20(%rbp) cmpq $0x0, %rax jne 0x2c899 movq $0x0, -0x8(%rbp) jmp 0x2c9f1 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rax movl (%rax), %eax addl $0x1, %eax movl %eax, %eax imulq $0xc, %rax, %rsi callq 0x35b50 movq -0x20(%rbp), %rcx movq %rax, 0x10(%rcx) cmpq $0x0, %rax jne 0x2c8cc movq $0x0, -0x8(%rbp) jmp 0x2c9f1 movq -0x20(%rbp), %rax movq 0x10(%rax), %rcx movq -0x18(%rbp), %rax movl (%rax), %eax shlq $0x3, %rax addq %rax, %rcx addq $0x8, %rcx movq -0x20(%rbp), %rax movq %rcx, 0x18(%rax) movq -0x18(%rbp), %rax movl (%rax), %ecx movq -0x20(%rbp), %rax movl %ecx, (%rax) movq -0x18(%rbp), %rax cmpq $0x0, 0x8(%rax) je 0x2c932 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rax movq 0x8(%rax), %rsi callq 0x363c0 movq -0x20(%rbp), %rcx movq %rax, 0x8(%rcx) cmpq $0x0, %rax jne 0x2c930 movq $0x0, -0x8(%rbp) jmp 0x2c9f1 jmp 0x2c93e movq -0x20(%rbp), %rax movq $0x0, 0x8(%rax) movl $0x0, -0x24(%rbp) movl -0x24(%rbp), %eax movq -0x18(%rbp), %rcx cmpl (%rcx), %eax jae 0x2c9be movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rax movq 0x10(%rax), %rax movl -0x24(%rbp), %ecx movq (%rax,%rcx,8), %rsi movq -0x18(%rbp), %rax movq 0x18(%rax), %rax movl -0x24(%rbp), %ecx movl (%rax,%rcx,4), %eax movl %eax, %edx callq 0x36400 movq -0x20(%rbp), %rcx movq 0x10(%rcx), %rcx movl -0x24(%rbp), %edx movq %rax, (%rcx,%rdx,8) cmpq $0x0, %rax jne 0x2c997 movq $0x0, -0x8(%rbp) jmp 0x2c9f1 movq -0x18(%rbp), %rax movq 0x18(%rax), %rax movl -0x24(%rbp), %ecx movl (%rax,%rcx,4), %edx movq -0x20(%rbp), %rax movq 0x18(%rax), %rax movl -0x24(%rbp), %ecx movl %edx, (%rax,%rcx,4) movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) jmp 0x2c945 movq -0x20(%rbp), %rax movq 0x10(%rax), %rax movq -0x20(%rbp), %rcx movl (%rcx), %ecx movq $0x0, (%rax,%rcx,8) movq -0x20(%rbp), %rax movq 0x18(%rax), %rax movq -0x20(%rbp), %rcx movl (%rcx), %ecx movl $0x0, (%rax,%rcx,4) movq -0x20(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
copy_typelib: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi cmp [rbp+var_18], 0 jnz short loc_2C874 mov [rbp+var_8], 0 jmp loc_2C9F1 loc_2C874: mov rdi, [rbp+var_10] mov esi, 20h ; ' ' call alloc_root mov [rbp+var_20], rax cmp rax, 0 jnz short loc_2C899 mov [rbp+var_8], 0 jmp loc_2C9F1 loc_2C899: mov rdi, [rbp+var_10] mov rax, [rbp+var_18] mov eax, [rax] add eax, 1 mov eax, eax imul rsi, rax, 0Ch call alloc_root mov rcx, [rbp+var_20] mov [rcx+10h], rax cmp rax, 0 jnz short loc_2C8CC mov [rbp+var_8], 0 jmp loc_2C9F1 loc_2C8CC: mov rax, [rbp+var_20] mov rcx, [rax+10h] mov rax, [rbp+var_18] mov eax, [rax] shl rax, 3 add rcx, rax add rcx, 8 mov rax, [rbp+var_20] mov [rax+18h], rcx mov rax, [rbp+var_18] mov ecx, [rax] mov rax, [rbp+var_20] mov [rax], ecx mov rax, [rbp+var_18] cmp qword ptr [rax+8], 0 jz short loc_2C932 mov rdi, [rbp+var_10] mov rax, [rbp+var_18] mov rsi, [rax+8] call strdup_root mov rcx, [rbp+var_20] mov [rcx+8], rax cmp rax, 0 jnz short loc_2C930 mov [rbp+var_8], 0 jmp loc_2C9F1 loc_2C930: jmp short loc_2C93E loc_2C932: mov rax, [rbp+var_20] mov qword ptr [rax+8], 0 loc_2C93E: mov [rbp+var_24], 0 loc_2C945: mov eax, [rbp+var_24] mov rcx, [rbp+var_18] cmp eax, [rcx] jnb short loc_2C9BE mov rdi, [rbp+var_10] mov rax, [rbp+var_18] mov rax, [rax+10h] mov ecx, [rbp+var_24] mov rsi, [rax+rcx*8] mov rax, [rbp+var_18] mov rax, [rax+18h] mov ecx, [rbp+var_24] mov eax, [rax+rcx*4] mov edx, eax call strmake_root mov rcx, [rbp+var_20] mov rcx, [rcx+10h] mov edx, [rbp+var_24] mov [rcx+rdx*8], rax cmp rax, 0 jnz short loc_2C997 mov [rbp+var_8], 0 jmp short loc_2C9F1 loc_2C997: mov rax, [rbp+var_18] mov rax, [rax+18h] mov ecx, [rbp+var_24] mov edx, [rax+rcx*4] mov rax, [rbp+var_20] mov rax, [rax+18h] mov ecx, [rbp+var_24] mov [rax+rcx*4], edx mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax jmp short loc_2C945 loc_2C9BE: mov rax, [rbp+var_20] mov rax, [rax+10h] mov rcx, [rbp+var_20] mov ecx, [rcx] mov qword ptr [rax+rcx*8], 0 mov rax, [rbp+var_20] mov rax, [rax+18h] mov rcx, [rbp+var_20] mov ecx, [rcx] mov dword ptr [rax+rcx*4], 0 mov rax, [rbp+var_20] mov [rbp+var_8], rax loc_2C9F1: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
unsigned int * copy_typelib(long long a1, unsigned int *a2) { long long v2; // rax long long v3; // rax long long v4; // rax unsigned int i; // [rsp+Ch] [rbp-24h] unsigned int *v7; // [rsp+10h] [rbp-20h] if ( !a2 ) return 0LL; v7 = (unsigned int *)alloc_root(a1, 32LL); if ( !v7 ) return 0LL; v2 = alloc_root(a1, 12LL * (*a2 + 1)); *((_QWORD *)v7 + 2) = v2; if ( !v2 ) return 0LL; *((_QWORD *)v7 + 3) = 8LL * *a2 + *((_QWORD *)v7 + 2) + 8; *v7 = *a2; if ( *((_QWORD *)a2 + 1) ) { v3 = strdup_root(a1, *((_QWORD *)a2 + 1)); *((_QWORD *)v7 + 1) = v3; if ( !v3 ) return 0LL; } else { *((_QWORD *)v7 + 1) = 0LL; } for ( i = 0; i < *a2; ++i ) { v4 = strmake_root(a1, *(_QWORD *)(*((_QWORD *)a2 + 2) + 8LL * i), *(unsigned int *)(*((_QWORD *)a2 + 3) + 4LL * i)); *(_QWORD *)(*((_QWORD *)v7 + 2) + 8LL * i) = v4; if ( !v4 ) return 0LL; *(_DWORD *)(*((_QWORD *)v7 + 3) + 4LL * i) = *(_DWORD *)(*((_QWORD *)a2 + 3) + 4LL * i); } *(_QWORD *)(*((_QWORD *)v7 + 2) + 8LL * *v7) = 0LL; *(_DWORD *)(*((_QWORD *)v7 + 3) + 4LL * *v7) = 0; return v7; }
copy_typelib: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI CMP qword ptr [RBP + -0x18],0x0 JNZ 0x0012c874 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0012c9f1 LAB_0012c874: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x20 CALL 0x00135b50 MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JNZ 0x0012c899 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0012c9f1 LAB_0012c899: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] ADD EAX,0x1 MOV EAX,EAX IMUL RSI,RAX,0xc CALL 0x00135b50 MOV RCX,qword ptr [RBP + -0x20] MOV qword ptr [RCX + 0x10],RAX CMP RAX,0x0 JNZ 0x0012c8cc MOV qword ptr [RBP + -0x8],0x0 JMP 0x0012c9f1 LAB_0012c8cc: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] SHL RAX,0x3 ADD RCX,RAX ADD RCX,0x8 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x8],0x0 JZ 0x0012c932 MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0x8] CALL 0x001363c0 MOV RCX,qword ptr [RBP + -0x20] MOV qword ptr [RCX + 0x8],RAX CMP RAX,0x0 JNZ 0x0012c930 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0012c9f1 LAB_0012c930: JMP 0x0012c93e LAB_0012c932: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x8],0x0 LAB_0012c93e: MOV dword ptr [RBP + -0x24],0x0 LAB_0012c945: MOV EAX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x18] CMP EAX,dword ptr [RCX] JNC 0x0012c9be MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x10] MOV ECX,dword ptr [RBP + -0x24] MOV RSI,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x18] MOV ECX,dword ptr [RBP + -0x24] MOV EAX,dword ptr [RAX + RCX*0x4] MOV EDX,EAX CALL 0x00136400 MOV RCX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX + 0x10] MOV EDX,dword ptr [RBP + -0x24] MOV qword ptr [RCX + RDX*0x8],RAX CMP RAX,0x0 JNZ 0x0012c997 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0012c9f1 LAB_0012c997: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x18] MOV ECX,dword ptr [RBP + -0x24] MOV EDX,dword ptr [RAX + RCX*0x4] MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x18] MOV ECX,dword ptr [RBP + -0x24] MOV dword ptr [RAX + RCX*0x4],EDX MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOV dword ptr [RBP + -0x24],EAX JMP 0x0012c945 LAB_0012c9be: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RCX] MOV qword ptr [RAX + RCX*0x8],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RCX] MOV dword ptr [RAX + RCX*0x4],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x8],RAX LAB_0012c9f1: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
uint * copy_typelib(int8 param_1,uint *param_2) { long lVar1; uint local_2c; uint *local_10; if (param_2 == (uint *)0x0) { local_10 = (uint *)0x0; } else { local_10 = (uint *)alloc_root(param_1,0x20); if (local_10 == (uint *)0x0) { local_10 = (uint *)0x0; } else { lVar1 = alloc_root(param_1,(ulong)(*param_2 + 1) * 0xc); *(long *)(local_10 + 4) = lVar1; if (lVar1 == 0) { local_10 = (uint *)0x0; } else { *(ulong *)(local_10 + 6) = *(long *)(local_10 + 4) + (ulong)*param_2 * 8 + 8; *local_10 = *param_2; if (*(long *)(param_2 + 2) == 0) { local_10[2] = 0; local_10[3] = 0; } else { lVar1 = strdup_root(param_1,*(int8 *)(param_2 + 2)); *(long *)(local_10 + 2) = lVar1; if (lVar1 == 0) { return (uint *)0x0; } } for (local_2c = 0; local_2c < *param_2; local_2c = local_2c + 1) { lVar1 = strmake_root(param_1,*(int8 *)(*(long *)(param_2 + 4) + (ulong)local_2c * 8) ,*(int4 *)(*(long *)(param_2 + 6) + (ulong)local_2c * 4)); *(long *)(*(long *)(local_10 + 4) + (ulong)local_2c * 8) = lVar1; if (lVar1 == 0) { return (uint *)0x0; } *(int4 *)(*(long *)(local_10 + 6) + (ulong)local_2c * 4) = *(int4 *)(*(long *)(param_2 + 6) + (ulong)local_2c * 4); } *(int8 *)(*(long *)(local_10 + 4) + (ulong)*local_10 * 8) = 0; *(int4 *)(*(long *)(local_10 + 6) + (ulong)*local_10 * 4) = 0; } } } return local_10; }