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
20,400
translog_scanner_eol
eloqsql/storage/maria/ma_loghandler.c
static my_bool translog_scanner_eol(TRANSLOG_SCANNER_DATA *scanner) { DBUG_ENTER("translog_scanner_eol"); DBUG_PRINT("enter", ("Horizon: " LSN_FMT " Current: (%u, 0x%x+0x%x=0x%x)", LSN_IN_PARTS(scanner->horizon), LSN_IN_PARTS(scanner->page_addr), (uint) scanner->page_offset, (uint) (LSN_OFFSET(scanner->page_addr) + scanner->page_offset))); if (scanner->horizon > (scanner->page_addr + scanner->page_offset)) { DBUG_PRINT("info", ("Horizon is not reached")); DBUG_RETURN(0); } if (scanner->fixed_horizon) { DBUG_PRINT("info", ("Horizon is fixed and reached")); DBUG_RETURN(1); } scanner->horizon= translog_get_horizon(); DBUG_PRINT("info", ("Horizon is re-read, EOL: %d", scanner->horizon <= (scanner->page_addr + scanner->page_offset))); DBUG_RETURN(scanner->horizon <= (scanner->page_addr + scanner->page_offset)); }
O3
c
translog_scanner_eol: movl 0x2028(%rdi), %eax addq 0x2000(%rdi), %rax cmpq %rax, 0x2008(%rdi) jle 0x4fce0 xorl %eax, %eax retq pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx movb $0x1, %al cmpb $0x0, 0x202c(%rdi) jne 0x4fd13 callq 0x4bb48 movq %rax, 0x2008(%rbx) movl 0x2028(%rbx), %ecx addq 0x2000(%rbx), %rcx cmpq %rcx, %rax setle %al addq $0x8, %rsp popq %rbx popq %rbp retq
translog_scanner_eol: mov eax, [rdi+2028h] add rax, [rdi+2000h] cmp [rdi+2008h], rax jle short loc_4FCE0 xor eax, eax retn loc_4FCE0: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi mov al, 1 cmp byte ptr [rdi+202Ch], 0 jnz short loc_4FD13 call translog_get_horizon mov [rbx+2008h], rax mov ecx, [rbx+2028h] add rcx, [rbx+2000h] cmp rax, rcx setle al loc_4FD13: add rsp, 8 pop rbx pop rbp retn
bool translog_scanner_eol(long long a1) { bool result; // al long long horizon; // rax if ( *(_QWORD *)(a1 + 8200) > (signed long long)(*(_QWORD *)(a1 + 0x2000) + *(unsigned int *)(a1 + 8232)) ) return 0; result = 1; if ( !*(_BYTE *)(a1 + 8236) ) { horizon = translog_get_horizon(); *(_QWORD *)(a1 + 8200) = horizon; return horizon <= *(_QWORD *)(a1 + 0x2000) + *(unsigned int *)(a1 + 8232); } return result; }
translog_scanner_eol: MOV EAX,dword ptr [RDI + 0x2028] ADD RAX,qword ptr [RDI + 0x2000] CMP qword ptr [RDI + 0x2008],RAX JLE 0x0014fce0 XOR EAX,EAX RET LAB_0014fce0: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI MOV AL,0x1 CMP byte ptr [RDI + 0x202c],0x0 JNZ 0x0014fd13 CALL 0x0014bb48 MOV qword ptr [RBX + 0x2008],RAX MOV ECX,dword ptr [RBX + 0x2028] ADD RCX,qword ptr [RBX + 0x2000] CMP RAX,RCX SETLE AL LAB_0014fd13: ADD RSP,0x8 POP RBX POP RBP RET
bool translog_scanner_eol(long param_1) { bool bVar1; long lVar2; if ((long)((ulong)*(uint *)(param_1 + 0x2028) + *(long *)(param_1 + 0x2000)) < *(long *)(param_1 + 0x2008)) { return false; } bVar1 = true; if (*(char *)(param_1 + 0x202c) == '\0') { lVar2 = translog_get_horizon(); *(long *)(param_1 + 0x2008) = lVar2; bVar1 = lVar2 <= (long)((ulong)*(uint *)(param_1 + 0x2028) + *(long *)(param_1 + 0x2000)); } return bVar1; }
20,401
JS_GetPrototypePrimitive
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_GetPrototypePrimitive(JSContext *ctx, JSValue val) { switch(JS_VALUE_GET_NORM_TAG(val)) { case JS_TAG_BIG_INT: val = ctx->class_proto[JS_CLASS_BIG_INT]; break; case JS_TAG_INT: case JS_TAG_FLOAT64: val = ctx->class_proto[JS_CLASS_NUMBER]; break; case JS_TAG_BOOL: val = ctx->class_proto[JS_CLASS_BOOLEAN]; break; case JS_TAG_STRING: val = ctx->class_proto[JS_CLASS_STRING]; break; case JS_TAG_SYMBOL: val = ctx->class_proto[JS_CLASS_SYMBOL]; break; case JS_TAG_OBJECT: case JS_TAG_NULL: case JS_TAG_UNDEFINED: default: val = JS_NULL; break; } return val; }
O0
c
JS_GetPrototypePrimitive: movq %rsi, -0x28(%rsp) movq %rdx, -0x20(%rsp) movq %rdi, -0x30(%rsp) movl -0x20(%rsp), %eax addl $0x9, %eax movl %eax, %ecx movq %rcx, -0x48(%rsp) subl $0x10, %eax ja 0x2cc17 movq -0x48(%rsp), %rax leaq 0xdc37e(%rip), %rcx # 0x108ef0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x30(%rsp), %rax movq 0x40(%rax), %rax movq 0x220(%rax), %rcx movq %rcx, -0x28(%rsp) movq 0x228(%rax), %rax movq %rax, -0x20(%rsp) jmp 0x2cc3c movq -0x30(%rsp), %rax movq 0x40(%rax), %rax movq 0x40(%rax), %rcx movq %rcx, -0x28(%rsp) movq 0x48(%rax), %rax movq %rax, -0x20(%rsp) jmp 0x2cc3c movq -0x30(%rsp), %rax movq 0x40(%rax), %rax movq 0x60(%rax), %rcx movq %rcx, -0x28(%rsp) movq 0x68(%rax), %rax movq %rax, -0x20(%rsp) jmp 0x2cc3c movq -0x30(%rsp), %rax movq 0x40(%rax), %rax movq 0x50(%rax), %rcx movq %rcx, -0x28(%rsp) movq 0x58(%rax), %rax movq %rax, -0x20(%rsp) jmp 0x2cc3c movq -0x30(%rsp), %rax movq 0x40(%rax), %rax movq 0x70(%rax), %rcx movq %rcx, -0x28(%rsp) movq 0x78(%rax), %rax movq %rax, -0x20(%rsp) jmp 0x2cc3c jmp 0x2cc17 movl $0x0, -0x40(%rsp) movq $0x2, -0x38(%rsp) movq -0x40(%rsp), %rax movq %rax, -0x28(%rsp) movq -0x38(%rsp), %rax movq %rax, -0x20(%rsp) movups -0x28(%rsp), %xmm0 movaps %xmm0, -0x18(%rsp) movq -0x18(%rsp), %rax movq -0x10(%rsp), %rdx retq nopw %cs:(%rax,%rax)
JS_GetPrototypePrimitive: mov qword ptr [rsp+var_28], rsi mov qword ptr [rsp+var_28+8], rdx mov [rsp+var_30], rdi mov eax, dword ptr [rsp+var_28+8] add eax, 9; switch 17 cases mov ecx, eax mov [rsp+var_48], rcx sub eax, 10h ja def_2CB79; jumptable 000000000002CB79 default case, cases -6--2,4-6 mov rax, [rsp+var_48] lea rcx, jpt_2CB79 movsxd rax, ds:(jpt_2CB79 - 108EF0h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_2CB7B: mov rax, [rsp+var_30]; jumptable 000000000002CB79 case -9 mov rax, [rax+40h] mov rcx, [rax+220h] mov qword ptr [rsp+var_28], rcx mov rax, [rax+228h] mov qword ptr [rsp+var_28+8], rax jmp loc_2CC3C loc_2CBA1: mov rax, [rsp+var_30]; jumptable 000000000002CB79 cases 0,7 mov rax, [rax+40h] mov rcx, [rax+40h] mov qword ptr [rsp+var_28], rcx mov rax, [rax+48h] mov qword ptr [rsp+var_28+8], rax jmp short loc_2CC3C loc_2CBBE: mov rax, [rsp+var_30]; jumptable 000000000002CB79 case 1 mov rax, [rax+40h] mov rcx, [rax+60h] mov qword ptr [rsp+var_28], rcx mov rax, [rax+68h] mov qword ptr [rsp+var_28+8], rax jmp short loc_2CC3C loc_2CBDB: mov rax, [rsp+var_30]; jumptable 000000000002CB79 case -7 mov rax, [rax+40h] mov rcx, [rax+50h] mov qword ptr [rsp+var_28], rcx mov rax, [rax+58h] mov qword ptr [rsp+var_28+8], rax jmp short loc_2CC3C loc_2CBF8: mov rax, [rsp+var_30]; jumptable 000000000002CB79 case -8 mov rax, [rax+40h] mov rcx, [rax+70h] mov qword ptr [rsp+var_28], rcx mov rax, [rax+78h] mov qword ptr [rsp+var_28+8], rax jmp short loc_2CC3C loc_2CC15: jmp short $+2; jumptable 000000000002CB79 cases -1,2,3 def_2CB79: mov dword ptr [rsp+var_40], 0; jumptable 000000000002CB79 default case, cases -6--2,4-6 mov [rsp+var_38], 2 mov rax, [rsp+var_40] mov qword ptr [rsp+var_28], rax mov rax, [rsp+var_38] mov qword ptr [rsp+var_28+8], rax loc_2CC3C: movups xmm0, [rsp+var_28] movaps [rsp+var_18], xmm0 mov rax, qword ptr [rsp+var_18] mov rdx, qword ptr [rsp+var_18+8] retn
long long JS_GetPrototypePrimitive(long long a1, long long a2, int a3) { long long v4; // [rsp+8h] [rbp-40h] __int128 v5; // [rsp+20h] [rbp-28h] switch ( a3 ) { case -9: v5 = *(_OWORD *)(*(_QWORD *)(a1 + 64) + 544LL); break; case -8: v5 = *(_OWORD *)(*(_QWORD *)(a1 + 64) + 112LL); break; case -7: v5 = *(_OWORD *)(*(_QWORD *)(a1 + 64) + 80LL); break; case 0: case 7: v5 = *(_OWORD *)(*(_QWORD *)(a1 + 64) + 64LL); break; case 1: v5 = *(_OWORD *)(*(_QWORD *)(a1 + 64) + 96LL); break; default: LODWORD(v4) = 0; *(_QWORD *)&v5 = v4; break; } return v5; }
JS_GetPrototypePrimitive: MOV qword ptr [RSP + -0x28],RSI MOV qword ptr [RSP + -0x20],RDX MOV qword ptr [RSP + -0x30],RDI MOV EAX,dword ptr [RSP + -0x20] ADD EAX,0x9 MOV ECX,EAX MOV qword ptr [RSP + -0x48],RCX SUB EAX,0x10 JA 0x0012cc17 MOV RAX,qword ptr [RSP + -0x48] LEA RCX,[0x208ef0] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_fffffff7: MOV RAX,qword ptr [RSP + -0x30] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RAX + 0x220] MOV qword ptr [RSP + -0x28],RCX MOV RAX,qword ptr [RAX + 0x228] MOV qword ptr [RSP + -0x20],RAX JMP 0x0012cc3c caseD_0: MOV RAX,qword ptr [RSP + -0x30] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RAX + 0x40] MOV qword ptr [RSP + -0x28],RCX MOV RAX,qword ptr [RAX + 0x48] MOV qword ptr [RSP + -0x20],RAX JMP 0x0012cc3c caseD_1: MOV RAX,qword ptr [RSP + -0x30] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RAX + 0x60] MOV qword ptr [RSP + -0x28],RCX MOV RAX,qword ptr [RAX + 0x68] MOV qword ptr [RSP + -0x20],RAX JMP 0x0012cc3c caseD_fffffff9: MOV RAX,qword ptr [RSP + -0x30] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RAX + 0x50] MOV qword ptr [RSP + -0x28],RCX MOV RAX,qword ptr [RAX + 0x58] MOV qword ptr [RSP + -0x20],RAX JMP 0x0012cc3c caseD_fffffff8: MOV RAX,qword ptr [RSP + -0x30] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RAX + 0x70] MOV qword ptr [RSP + -0x28],RCX MOV RAX,qword ptr [RAX + 0x78] MOV qword ptr [RSP + -0x20],RAX JMP 0x0012cc3c caseD_ffffffff: JMP 0x0012cc17 caseD_fffffffa: MOV dword ptr [RSP + -0x40],0x0 MOV qword ptr [RSP + -0x38],0x2 MOV RAX,qword ptr [RSP + -0x40] MOV qword ptr [RSP + -0x28],RAX MOV RAX,qword ptr [RSP + -0x38] MOV qword ptr [RSP + -0x20],RAX LAB_0012cc3c: MOVUPS XMM0,xmmword ptr [RSP + -0x28] MOVAPS xmmword ptr [RSP + -0x18],XMM0 MOV RAX,qword ptr [RSP + -0x18] MOV RDX,qword ptr [RSP + -0x10] RET
int1 [16] JS_GetPrototypePrimitive(long param_1,int8 param_2,int4 param_3) { int1 auVar1 [16]; uint uStack_3c; long local_28; int8 uStack_20; switch(param_3) { case 0: case 7: local_28 = *(long *)(*(long *)(param_1 + 0x40) + 0x40); uStack_20 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x48); break; case 1: local_28 = *(long *)(*(long *)(param_1 + 0x40) + 0x60); uStack_20 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x68); break; case 0xfffffff7: local_28 = *(long *)(*(long *)(param_1 + 0x40) + 0x220); uStack_20 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x228); break; case 0xfffffff8: local_28 = *(long *)(*(long *)(param_1 + 0x40) + 0x70); uStack_20 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x78); break; case 0xfffffff9: local_28 = *(long *)(*(long *)(param_1 + 0x40) + 0x50); uStack_20 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x58); break; case 0xffffffff: case 2: case 3: default: local_28 = (ulong)uStack_3c << 0x20; uStack_20 = 2; } auVar1._8_8_ = uStack_20; auVar1._0_8_ = local_28; return auVar1; }
20,402
JS_GetPrototypePrimitive
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_GetPrototypePrimitive(JSContext *ctx, JSValue val) { switch(JS_VALUE_GET_NORM_TAG(val)) { case JS_TAG_BIG_INT: val = ctx->class_proto[JS_CLASS_BIG_INT]; break; case JS_TAG_INT: case JS_TAG_FLOAT64: val = ctx->class_proto[JS_CLASS_NUMBER]; break; case JS_TAG_BOOL: val = ctx->class_proto[JS_CLASS_BOOLEAN]; break; case JS_TAG_STRING: val = ctx->class_proto[JS_CLASS_STRING]; break; case JS_TAG_SYMBOL: val = ctx->class_proto[JS_CLASS_SYMBOL]; break; case JS_TAG_OBJECT: case JS_TAG_NULL: case JS_TAG_UNDEFINED: default: val = JS_NULL; break; } return val; }
O1
c
JS_GetPrototypePrimitive: movl $0x2, %edx xorl %eax, %eax leal 0x9(%rsi), %ecx cmpl $0xa, %ecx ja 0x21e7a leaq 0x78fbf(%rip), %rsi # 0x9ae24 movslq (%rsi,%rcx,4), %rcx addq %rsi, %rcx jmpq *%rcx movl $0x228, %ecx # imm = 0x228 movl $0x220, %eax # imm = 0x220 jmp 0x21ead cmpl $0x7, %esi jne 0x21eb9 movl $0x48, %ecx movl $0x40, %eax jmp 0x21ead movl $0x68, %ecx movl $0x60, %eax jmp 0x21ead movl $0x78, %ecx movl $0x70, %eax jmp 0x21ead movl $0x58, %ecx movl $0x50, %eax movq 0x40(%rdi), %rdx movq (%rdx,%rax), %rax movq (%rdx,%rcx), %rdx retq
JS_GetPrototypePrimitive: mov edx, 2 xor eax, eax lea ecx, [rsi+9]; switch 11 cases cmp ecx, 0Ah ja short def_21E6C; jumptable 0000000000021E6C default case lea rsi, jpt_21E6C movsxd rcx, ds:(jpt_21E6C - 9AE24h)[rsi+rcx*4] add rcx, rsi jmp rcx; switch jump loc_21E6E: mov ecx, 228h; jumptable 0000000000021E6C case -9 mov eax, 220h jmp short loc_21EAD def_21E6C: cmp esi, 7; jumptable 0000000000021E6C default case jnz short locret_21EB9; jumptable 0000000000021E6C cases -6--1 loc_21E7F: mov ecx, 48h ; 'H'; jumptable 0000000000021E6C case 0 mov eax, 40h ; '@' jmp short loc_21EAD loc_21E8B: mov ecx, 68h ; 'h'; jumptable 0000000000021E6C case 1 mov eax, 60h ; '`' jmp short loc_21EAD loc_21E97: mov ecx, 78h ; 'x'; jumptable 0000000000021E6C case -8 mov eax, 70h ; 'p' jmp short loc_21EAD loc_21EA3: mov ecx, 58h ; 'X'; jumptable 0000000000021E6C case -7 mov eax, 50h ; 'P' loc_21EAD: mov rdx, [rdi+40h] mov rax, [rdx+rax] mov rdx, [rdx+rcx] locret_21EB9: retn; jumptable 0000000000021E6C cases -6--1
long long JS_GetPrototypePrimitive(long long a1, int a2) { long long result; // rax long long v3; // rax result = 0LL; switch ( a2 ) { case -9: v3 = 544LL; return *(_QWORD *)(*(_QWORD *)(a1 + 64) + v3); case -8: v3 = 112LL; return *(_QWORD *)(*(_QWORD *)(a1 + 64) + v3); case -7: v3 = 80LL; return *(_QWORD *)(*(_QWORD *)(a1 + 64) + v3); case -6: case -5: case -4: case -3: case -2: case -1: return result; case 0: goto LABEL_4; case 1: v3 = 96LL; return *(_QWORD *)(*(_QWORD *)(a1 + 64) + v3); default: if ( a2 == 7 ) { LABEL_4: v3 = 64LL; return *(_QWORD *)(*(_QWORD *)(a1 + 64) + v3); } return result; } }
JS_GetPrototypePrimitive: MOV EDX,0x2 XOR EAX,EAX LEA ECX,[RSI + 0x9] CMP ECX,0xa JA 0x00121e7a LEA RSI,[0x19ae24] MOVSXD RCX,dword ptr [RSI + RCX*0x4] ADD RCX,RSI switchD: JMP RCX caseD_fffffff7: MOV ECX,0x228 MOV EAX,0x220 JMP 0x00121ead default: CMP ESI,0x7 JNZ 0x00121eb9 caseD_0: MOV ECX,0x48 MOV EAX,0x40 JMP 0x00121ead caseD_1: MOV ECX,0x68 MOV EAX,0x60 JMP 0x00121ead caseD_fffffff8: MOV ECX,0x78 MOV EAX,0x70 JMP 0x00121ead caseD_fffffff9: MOV ECX,0x58 MOV EAX,0x50 LAB_00121ead: MOV RDX,qword ptr [RDI + 0x40] MOV RAX,qword ptr [RDX + RAX*0x1] MOV RDX,qword ptr [RDX + RCX*0x1] caseD_fffffffa: RET
int1 [16] JS_GetPrototypePrimitive(long param_1,int param_2) { int8 uVar1; long lVar2; long lVar3; int8 uVar4; int1 auVar5 [16]; uVar4 = 2; uVar1 = 0; switch(param_2) { case 1: lVar3 = 0x68; lVar2 = 0x60; break; case -9: lVar3 = 0x228; lVar2 = 0x220; break; case -8: lVar3 = 0x78; lVar2 = 0x70; break; case -7: lVar3 = 0x58; lVar2 = 0x50; break; case -6: case -5: case -4: case -3: case -2: case -1: goto switchD_00121e6c_caseD_fffffffa; default: if (param_2 != 7) goto switchD_00121e6c_caseD_fffffffa; case 0: lVar3 = 0x48; lVar2 = 0x40; } uVar1 = *(int8 *)(*(long *)(param_1 + 0x40) + lVar2); uVar4 = *(int8 *)(*(long *)(param_1 + 0x40) + lVar3); switchD_00121e6c_caseD_fffffffa: auVar5._8_8_ = uVar4; auVar5._0_8_ = uVar1; return auVar5; }
20,403
JS_GetPrototypePrimitive
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_GetPrototypePrimitive(JSContext *ctx, JSValue val) { switch(JS_VALUE_GET_NORM_TAG(val)) { case JS_TAG_BIG_INT: val = ctx->class_proto[JS_CLASS_BIG_INT]; break; case JS_TAG_INT: case JS_TAG_FLOAT64: val = ctx->class_proto[JS_CLASS_NUMBER]; break; case JS_TAG_BOOL: val = ctx->class_proto[JS_CLASS_BOOLEAN]; break; case JS_TAG_STRING: val = ctx->class_proto[JS_CLASS_STRING]; break; case JS_TAG_SYMBOL: val = ctx->class_proto[JS_CLASS_SYMBOL]; break; case JS_TAG_OBJECT: case JS_TAG_NULL: case JS_TAG_UNDEFINED: default: val = JS_NULL; break; } return val; }
O3
c
JS_GetPrototypePrimitive: movl $0x2, %edx xorl %eax, %eax leal 0x9(%rsi), %ecx cmpl $0xa, %ecx ja 0x22691 leaq 0x7b788(%rip), %rsi # 0x9de04 movslq (%rsi,%rcx,4), %rcx addq %rsi, %rcx jmpq *%rcx movl $0x228, %ecx # imm = 0x228 movl $0x220, %eax # imm = 0x220 jmp 0x226c4 cmpl $0x7, %esi jne 0x226d0 movl $0x48, %ecx movl $0x40, %eax jmp 0x226c4 movl $0x68, %ecx movl $0x60, %eax jmp 0x226c4 movl $0x78, %ecx movl $0x70, %eax jmp 0x226c4 movl $0x58, %ecx movl $0x50, %eax movq 0x40(%rdi), %rdx movq (%rdx,%rax), %rax movq (%rdx,%rcx), %rdx retq
JS_GetPrototypePrimitive: mov edx, 2 xor eax, eax lea ecx, [rsi+9]; switch 11 cases cmp ecx, 0Ah ja short def_22683; jumptable 0000000000022683 default case lea rsi, jpt_22683 movsxd rcx, ds:(jpt_22683 - 9DE04h)[rsi+rcx*4] add rcx, rsi jmp rcx; switch jump loc_22685: mov ecx, 228h; jumptable 0000000000022683 case -9 mov eax, 220h jmp short loc_226C4 def_22683: cmp esi, 7; jumptable 0000000000022683 default case jnz short locret_226D0; jumptable 0000000000022683 cases -6--1 loc_22696: mov ecx, 48h ; 'H'; jumptable 0000000000022683 case 0 mov eax, 40h ; '@' jmp short loc_226C4 loc_226A2: mov ecx, 68h ; 'h'; jumptable 0000000000022683 case 1 mov eax, 60h ; '`' jmp short loc_226C4 loc_226AE: mov ecx, 78h ; 'x'; jumptable 0000000000022683 case -8 mov eax, 70h ; 'p' jmp short loc_226C4 loc_226BA: mov ecx, 58h ; 'X'; jumptable 0000000000022683 case -7 mov eax, 50h ; 'P' loc_226C4: mov rdx, [rdi+40h] mov rax, [rdx+rax] mov rdx, [rdx+rcx] locret_226D0: retn; jumptable 0000000000022683 cases -6--1
long long JS_GetPrototypePrimitive(long long a1, int a2) { long long result; // rax long long v3; // rax result = 0LL; switch ( a2 ) { case -9: v3 = 544LL; return *(_QWORD *)(*(_QWORD *)(a1 + 64) + v3); case -8: v3 = 112LL; return *(_QWORD *)(*(_QWORD *)(a1 + 64) + v3); case -7: v3 = 80LL; return *(_QWORD *)(*(_QWORD *)(a1 + 64) + v3); case -6: case -5: case -4: case -3: case -2: case -1: return result; case 0: goto LABEL_4; case 1: v3 = 96LL; return *(_QWORD *)(*(_QWORD *)(a1 + 64) + v3); default: if ( a2 == 7 ) { LABEL_4: v3 = 64LL; return *(_QWORD *)(*(_QWORD *)(a1 + 64) + v3); } return result; } }
JS_GetPrototypePrimitive: MOV EDX,0x2 XOR EAX,EAX LEA ECX,[RSI + 0x9] CMP ECX,0xa JA 0x00122691 LEA RSI,[0x19de04] MOVSXD RCX,dword ptr [RSI + RCX*0x4] ADD RCX,RSI switchD: JMP RCX caseD_fffffff7: MOV ECX,0x228 MOV EAX,0x220 JMP 0x001226c4 default: CMP ESI,0x7 JNZ 0x001226d0 caseD_0: MOV ECX,0x48 MOV EAX,0x40 JMP 0x001226c4 caseD_1: MOV ECX,0x68 MOV EAX,0x60 JMP 0x001226c4 caseD_fffffff8: MOV ECX,0x78 MOV EAX,0x70 JMP 0x001226c4 caseD_fffffff9: MOV ECX,0x58 MOV EAX,0x50 LAB_001226c4: MOV RDX,qword ptr [RDI + 0x40] MOV RAX,qword ptr [RDX + RAX*0x1] MOV RDX,qword ptr [RDX + RCX*0x1] caseD_fffffffa: RET
int1 [16] JS_GetPrototypePrimitive(long param_1,int param_2) { int8 uVar1; long lVar2; long lVar3; int8 uVar4; int1 auVar5 [16]; uVar4 = 2; uVar1 = 0; switch(param_2) { case 1: lVar3 = 0x68; lVar2 = 0x60; break; case -9: lVar3 = 0x228; lVar2 = 0x220; break; case -8: lVar3 = 0x78; lVar2 = 0x70; break; case -7: lVar3 = 0x58; lVar2 = 0x50; break; case -6: case -5: case -4: case -3: case -2: case -1: goto switchD_00122683_caseD_fffffffa; default: if (param_2 != 7) goto switchD_00122683_caseD_fffffffa; case 0: lVar3 = 0x48; lVar2 = 0x40; } uVar1 = *(int8 *)(*(long *)(param_1 + 0x40) + lVar2); uVar4 = *(int8 *)(*(long *)(param_1 + 0x40) + lVar3); switchD_00122683_caseD_fffffffa: auVar5._8_8_ = uVar4; auVar5._0_8_ = uVar1; return auVar5; }
20,404
lunasvg::SVGElement::cloneChildren(lunasvg::SVGElement*) const
dmazzella[P]pylunasvg/lunasvg/source/svgelement.cpp
void SVGElement::cloneChildren(SVGElement* parentElement) const { for(const auto& child : m_children) { parentElement->addChild(child->clone(true)); } }
O0
cpp
lunasvg::SVGElement::cloneChildren(lunasvg::SVGElement*) const: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax addq $0x58, %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rdi callq 0xe970 movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rdi callq 0xe9a0 movq %rax, -0x28(%rbp) leaq -0x20(%rbp), %rdi leaq -0x28(%rbp), %rsi callq 0xe9d0 testb $0x1, %al jne 0x19c49 jmp 0x19cba leaq -0x20(%rbp), %rdi callq 0xea00 movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x30(%rbp), %rdi callq 0x1fc50 movq %rax, %rsi movq (%rsi), %rax movq 0x40(%rax), %rax leaq -0x38(%rbp), %rdi movq %rdi, -0x50(%rbp) movl $0x1, %edx callq *%rax movq -0x58(%rbp), %rdi movq -0x50(%rbp), %rsi callq 0x19170 jmp 0x19c8f leaq -0x38(%rbp), %rdi callq 0xfea0 leaq -0x20(%rbp), %rdi callq 0xea90 jmp 0x19c36 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) leaq -0x38(%rbp), %rdi callq 0xfea0 jmp 0x19cc0 addq $0x60, %rsp popq %rbp retq movq -0x40(%rbp), %rdi callq 0xb6c0 nopl (%rax)
_ZNK7lunasvg10SVGElement13cloneChildrenEPS0_: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] add rax, 58h ; 'X' mov [rbp+var_18], rax mov rdi, [rbp+var_18] call _ZNKSt7__cxx114listISt10unique_ptrIN7lunasvg7SVGNodeESt14default_deleteIS3_EESaIS6_EE5beginEv; std::list<std::unique_ptr<lunasvg::SVGNode>>::begin(void) mov [rbp+var_20], rax mov rdi, [rbp+var_18] call _ZNKSt7__cxx114listISt10unique_ptrIN7lunasvg7SVGNodeESt14default_deleteIS3_EESaIS6_EE3endEv; std::list<std::unique_ptr<lunasvg::SVGNode>>::end(void) mov [rbp+var_28], rax loc_19C36: lea rdi, [rbp+var_20] lea rsi, [rbp+var_28] call _ZStneRKSt20_List_const_iteratorISt10unique_ptrIN7lunasvg7SVGNodeESt14default_deleteIS2_EEES8_; std::operator!=(std::_List_const_iterator<std::unique_ptr<lunasvg::SVGNode>> const&,std::_List_const_iterator<std::unique_ptr<lunasvg::SVGNode>> const&) test al, 1 jnz short loc_19C49 jmp short loc_19CBA loc_19C49: lea rdi, [rbp+var_20] call _ZNKSt20_List_const_iteratorISt10unique_ptrIN7lunasvg7SVGNodeESt14default_deleteIS2_EEEdeEv; std::_List_const_iterator<std::unique_ptr<lunasvg::SVGNode>>::operator*(void) mov [rbp+var_30], rax mov rax, [rbp+var_10] mov [rbp+var_58], rax mov rdi, [rbp+var_30] call _ZNKSt10unique_ptrIN7lunasvg7SVGNodeESt14default_deleteIS1_EEptEv; std::unique_ptr<lunasvg::SVGNode>::operator->(void) mov rsi, rax mov rax, [rsi] mov rax, [rax+40h] lea rdi, [rbp+var_38] mov [rbp+var_50], rdi mov edx, 1 call rax mov rdi, [rbp+var_58] mov rsi, [rbp+var_50] call _ZN7lunasvg10SVGElement8addChildESt10unique_ptrINS_7SVGNodeESt14default_deleteIS2_EE; lunasvg::SVGElement::addChild(std::unique_ptr<lunasvg::SVGNode>) jmp short $+2 loc_19C8F: lea rdi, [rbp+var_38] call _ZNSt10unique_ptrIN7lunasvg7SVGNodeESt14default_deleteIS1_EED2Ev; std::unique_ptr<lunasvg::SVGNode>::~unique_ptr() lea rdi, [rbp+var_20] call _ZNSt20_List_const_iteratorISt10unique_ptrIN7lunasvg7SVGNodeESt14default_deleteIS2_EEEppEv; std::_List_const_iterator<std::unique_ptr<lunasvg::SVGNode>>::operator++(void) jmp short loc_19C36 mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax lea rdi, [rbp+var_38] call _ZNSt10unique_ptrIN7lunasvg7SVGNodeESt14default_deleteIS1_EED2Ev; std::unique_ptr<lunasvg::SVGNode>::~unique_ptr() jmp short loc_19CC0 loc_19CBA: add rsp, 60h pop rbp retn loc_19CC0: mov rdi, [rbp+var_40] call __Unwind_Resume
bool lunasvg::SVGElement::cloneChildren(lunasvg::SVGElement *this, lunasvg::SVGElement *a2) { bool result; // al long long v3; // rax lunasvg::SVGElement *v4; // [rsp+8h] [rbp-58h] _BYTE v5[8]; // [rsp+28h] [rbp-38h] BYREF long long v6; // [rsp+30h] [rbp-30h] long long v7; // [rsp+38h] [rbp-28h] BYREF _QWORD *v8[2]; // [rsp+40h] [rbp-20h] BYREF lunasvg::SVGElement *v9; // [rsp+50h] [rbp-10h] lunasvg::SVGElement *v10; // [rsp+58h] [rbp-8h] v10 = this; v9 = a2; v8[1] = (_QWORD *)((char *)this + 88); v8[0] = (_QWORD *)std::list<std::unique_ptr<lunasvg::SVGNode>>::begin((_QWORD *)this + 11); v7 = std::list<std::unique_ptr<lunasvg::SVGNode>>::end((long long)this + 88); while ( 1 ) { result = std::operator!=(v8, &v7); if ( !result ) break; v6 = std::_List_const_iterator<std::unique_ptr<lunasvg::SVGNode>>::operator*(v8); v4 = v9; v3 = std::unique_ptr<lunasvg::SVGNode>::operator->(v6); (*(void ( **)(_BYTE *, long long, long long))(*(_QWORD *)v3 + 64LL))(v5, v3, 1LL); lunasvg::SVGElement::addChild(v4, (long long)v5); std::unique_ptr<lunasvg::SVGNode>::~unique_ptr((long long)v5); std::_List_const_iterator<std::unique_ptr<lunasvg::SVGNode>>::operator++(v8); } return result; }
cloneChildren: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x58 MOV qword ptr [RBP + -0x18],RAX MOV RDI,qword ptr [RBP + -0x18] CALL 0x0010e970 MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x18] CALL 0x0010e9a0 MOV qword ptr [RBP + -0x28],RAX LAB_00119c36: LEA RDI,[RBP + -0x20] LEA RSI,[RBP + -0x28] CALL 0x0010e9d0 TEST AL,0x1 JNZ 0x00119c49 JMP 0x00119cba LAB_00119c49: LEA RDI,[RBP + -0x20] CALL 0x0010ea00 MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x58],RAX MOV RDI,qword ptr [RBP + -0x30] CALL 0x0011fc50 MOV RSI,RAX MOV RAX,qword ptr [RSI] MOV RAX,qword ptr [RAX + 0x40] LEA RDI,[RBP + -0x38] MOV qword ptr [RBP + -0x50],RDI MOV EDX,0x1 CALL RAX MOV RDI,qword ptr [RBP + -0x58] MOV RSI,qword ptr [RBP + -0x50] LAB_00119c88: CALL 0x00119170 LAB_00119c8d: JMP 0x00119c8f LAB_00119c8f: LEA RDI,[RBP + -0x38] CALL 0x0010fea0 LEA RDI,[RBP + -0x20] CALL 0x0010ea90 JMP 0x00119c36 LAB_00119cba: ADD RSP,0x60 POP RBP RET
/* lunasvg::SVGElement::cloneChildren(lunasvg::SVGElement*) const */ void __thiscall lunasvg::SVGElement::cloneChildren(SVGElement *this,SVGElement *param_1) { SVGElement *pSVar1; ulong uVar2; long *plVar3; unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>> local_40 [8]; unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>> *local_38; int8 local_30; int8 local_28; list<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>,std::allocator<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>>> *local_20; SVGElement *local_18; SVGElement *local_10; local_20 = (list<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>,std::allocator<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>>> *)(this + 0x58); local_18 = param_1; local_10 = this; local_28 = std::__cxx11:: list<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>,std::allocator<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>>> ::begin(local_20); local_30 = std::__cxx11:: list<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>,std::allocator<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>>> ::end(local_20); while( true ) { uVar2 = std::operator!=((_List_const_iterator *)&local_28,(_List_const_iterator *)&local_30); if ((uVar2 & 1) == 0) break; local_38 = (unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>> *) std:: _List_const_iterator<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>> ::operator*((_List_const_iterator<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>> *)&local_28); pSVar1 = local_18; plVar3 = (long *)std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>:: operator->(local_38); (**(code **)(*plVar3 + 0x40))(local_40,plVar3,1); /* try { // try from 00119c88 to 00119c8c has its CatchHandler @ 00119ca3 */ addChild(pSVar1,local_40); std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>::~unique_ptr(local_40); std:: _List_const_iterator<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>>:: operator++((_List_const_iterator<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>> *)&local_28); } return; }
20,405
BeginTextureMode
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcore.c
void BeginTextureMode(RenderTexture2D target) { rlDrawRenderBatchActive(); // Update and draw internal render batch rlEnableFramebuffer(target.id); // Enable render target // Set viewport and RLGL internal framebuffer size rlViewport(0, 0, target.texture.width, target.texture.height); rlSetFramebufferWidth(target.texture.width); rlSetFramebufferHeight(target.texture.height); rlMatrixMode(RL_PROJECTION); // Switch to projection matrix rlLoadIdentity(); // Reset current matrix (projection) // Set orthographic projection to current framebuffer size // NOTE: Configured top-left corner as (0, 0) rlOrtho(0, target.texture.width, target.texture.height, 0, 0.0f, 1.0f); rlMatrixMode(RL_MODELVIEW); // Switch back to modelview matrix rlLoadIdentity(); // Reset current matrix (modelview) //rlScalef(0.0f, -1.0f, 0.0f); // Flip Y-drawing (?) // Setup current width/height for proper aspect ratio // calculation when using BeginMode3D() CORE.Window.currentFbo.width = target.texture.width; CORE.Window.currentFbo.height = target.texture.height; CORE.Window.usingFbo = true; }
O1
c
BeginTextureMode: pushq %rbp pushq %r14 pushq %rbx movq 0xc9838(%rip), %rdi # 0x141108 callq 0x6246c movl 0x20(%rsp), %esi movl $0x8d40, %edi # imm = 0x8D40 callq *0xc795c(%rip) # 0x13f240 movl 0x28(%rsp), %ebx movl 0x2c(%rsp), %ebp xorl %edi, %edi xorl %esi, %esi movl %ebx, %edx movl %ebp, %ecx callq *0xc97e6(%rip) # 0x1410e0 movl %ebx, 0xca288(%rip) # 0x141b88 movl %ebp, 0xca286(%rip) # 0x141b8c leaq 0xc988b(%rip), %rax # 0x141198 movq %rax, 0xc983c(%rip) # 0x141150 movl $0x1701, 0xc982e(%rip) # imm = 0x1701 movl $0x3f800000, %r14d # imm = 0x3F800000 movl %r14d, 0xc986d(%rip) # 0x141198 xorps %xmm0, %xmm0 movups %xmm0, 0xc9867(%rip) # 0x14119c movl %r14d, 0xc9870(%rip) # 0x1411ac movups %xmm0, 0xc986d(%rip) # 0x1411b0 movl %r14d, 0xc9876(%rip) # 0x1411c0 movups %xmm0, 0xc9873(%rip) # 0x1411c4 movl %r14d, 0xc987c(%rip) # 0x1411d4 cvtsi2sd %ebx, %xmm1 cvtsi2sd %ebp, %xmm2 movsd 0x62150(%rip), %xmm5 # 0xd9ab8 xorps %xmm0, %xmm0 xorps %xmm3, %xmm3 xorps %xmm4, %xmm4 callq 0x620ae leaq 0xc97db(%rip), %rax # 0x141158 movq %rax, 0xc97cc(%rip) # 0x141150 movl $0x1700, 0xc97be(%rip) # imm = 0x1700 movl %r14d, 0xc97c3(%rip) # 0x141158 xorps %xmm0, %xmm0 movups %xmm0, 0xc97bd(%rip) # 0x14115c movl %r14d, 0xc97c6(%rip) # 0x14116c movups %xmm0, 0xc97c3(%rip) # 0x141170 movl %r14d, 0xc97cc(%rip) # 0x141180 movups %xmm0, 0xc97c9(%rip) # 0x141184 movl %r14d, 0xc97d2(%rip) # 0x141194 movl %ebx, 0xca224(%rip) # 0x141bec movl %ebp, 0xca222(%rip) # 0x141bf0 movb $0x1, 0xca1ec(%rip) # 0x141bc1 popq %rbx popq %r14 popq %rbp retq
BeginTextureMode: push rbp push r14 push rbx mov rdi, cs:RLGL call rlDrawRenderBatch mov esi, [rsp+18h+arg_0] mov edi, 8D40h call cs:glad_glBindFramebuffer mov ebx, [rsp+18h+arg_8] mov ebp, [rsp+18h+arg_C] xor edi, edi xor esi, esi mov edx, ebx mov ecx, ebp call cs:glad_glViewport mov cs:dword_141B88, ebx mov cs:dword_141B8C, ebp lea rax, xmmword_141198 mov cs:qword_141150, rax mov cs:dword_14114C, 1701h mov r14d, 3F800000h mov dword ptr cs:xmmword_141198, r14d xorps xmm0, xmm0 movups cs:xmmword_141198+4, xmm0 mov dword ptr cs:xmmword_1411A8+4, r14d movups cs:xmmword_1411A8+8, xmm0 mov dword ptr cs:xmmword_1411B8+8, r14d movups cs:xmmword_1411B8+0Ch, xmm0 mov dword ptr cs:xmmword_1411C8+0Ch, r14d cvtsi2sd xmm1, ebx cvtsi2sd xmm2, ebp movsd xmm5, cs:qword_D9AB8 xorps xmm0, xmm0 xorps xmm3, xmm3 xorps xmm4, xmm4 call rlOrtho lea rax, xmmword_141158 mov cs:qword_141150, rax mov cs:dword_14114C, 1700h mov dword ptr cs:xmmword_141158, r14d xorps xmm0, xmm0 movups cs:xmmword_141158+4, xmm0 mov dword ptr cs:xmmword_141168+4, r14d movups cs:xmmword_141168+8, xmm0 mov dword ptr cs:xmmword_141178+8, r14d movups cs:xmmword_141178+0Ch, xmm0 mov dword ptr cs:xmmword_141188+0Ch, r14d mov cs:dword_141BEC, ebx mov cs:dword_141BF0, ebp mov cs:byte_141BC1, 1 pop rbx pop r14 pop rbp retn
__int128 * BeginTextureMode( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, unsigned int a7, long long a8) { long long v8; // rdx long long v9; // rcx long long v10; // r8 long long v11; // r9 __int128 *result; // rax rlDrawRenderBatch(RLGL[0], a2); glad_glBindFramebuffer(36160LL, a7); glad_glViewport(0LL, 0LL, (unsigned int)a8, HIDWORD(a8)); qword_141B88 = a8; qword_141150 = (long long)&xmmword_141198; dword_14114C = 5889; LODWORD(xmmword_141198) = 1065353216; *(__int128 *)((char *)&xmmword_141198 + 4) = 0LL; DWORD1(xmmword_1411A8) = 1065353216; *(__int128 *)((char *)&xmmword_1411A8 + 8) = 0LL; DWORD2(xmmword_1411B8) = 1065353216; *(__int128 *)((char *)&xmmword_1411B8 + 12) = 0LL; HIDWORD(xmmword_1411C8) = 1065353216; rlOrtho(0.0, (double)(int)a8, (double)SHIDWORD(a8), 0.0, 0.0, 1.0, 0LL, 0LL, v8, v9, v10, v11); result = &xmmword_141158; qword_141150 = (long long)&xmmword_141158; dword_14114C = 5888; LODWORD(xmmword_141158) = 1065353216; *(__int128 *)((char *)&xmmword_141158 + 4) = 0LL; DWORD1(xmmword_141168) = 1065353216; *(__int128 *)((char *)&xmmword_141168 + 8) = 0LL; DWORD2(xmmword_141178) = 1065353216; *(__int128 *)((char *)&xmmword_141178 + 12) = 0LL; HIDWORD(xmmword_141188) = 1065353216; qword_141BEC = a8; byte_141BC1 = 1; return result; }
BeginTextureMode: PUSH RBP PUSH R14 PUSH RBX MOV RDI,qword ptr [0x00241108] CALL 0x0016246c MOV ESI,dword ptr [RSP + 0x20] MOV EDI,0x8d40 CALL qword ptr [0x0023f240] MOV EBX,dword ptr [RSP + 0x28] MOV EBP,dword ptr [RSP + 0x2c] XOR EDI,EDI XOR ESI,ESI MOV EDX,EBX MOV ECX,EBP CALL qword ptr [0x002410e0] MOV dword ptr [0x00241b88],EBX MOV dword ptr [0x00241b8c],EBP LEA RAX,[0x241198] MOV qword ptr [0x00241150],RAX MOV dword ptr [0x0024114c],0x1701 MOV R14D,0x3f800000 MOV dword ptr [0x00241198],R14D XORPS XMM0,XMM0 MOVUPS xmmword ptr [0x0024119c],XMM0 MOV dword ptr [0x002411ac],R14D MOVUPS xmmword ptr [0x002411b0],XMM0 MOV dword ptr [0x002411c0],R14D MOVUPS xmmword ptr [0x002411c4],XMM0 MOV dword ptr [0x002411d4],R14D CVTSI2SD XMM1,EBX CVTSI2SD XMM2,EBP MOVSD XMM5,qword ptr [0x001d9ab8] XORPS XMM0,XMM0 XORPS XMM3,XMM3 XORPS XMM4,XMM4 CALL 0x001620ae LEA RAX,[0x241158] MOV qword ptr [0x00241150],RAX MOV dword ptr [0x0024114c],0x1700 MOV dword ptr [0x00241158],R14D XORPS XMM0,XMM0 MOVUPS xmmword ptr [0x0024115c],XMM0 MOV dword ptr [0x0024116c],R14D MOVUPS xmmword ptr [0x00241170],XMM0 MOV dword ptr [0x00241180],R14D MOVUPS xmmword ptr [0x00241184],XMM0 MOV dword ptr [0x00241194],R14D MOV dword ptr [0x00241bec],EBX MOV dword ptr [0x00241bf0],EBP MOV byte ptr [0x00241bc1],0x1 POP RBX POP R14 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void BeginTextureMode(void) { int4 in_stack_00000008; int iStack0000000000000010; int iStack0000000000000014; rlDrawRenderBatch(RLGL); (*glad_glBindFramebuffer)(0x8d40,in_stack_00000008); (*glad_glViewport)(0,0,iStack0000000000000010,iStack0000000000000014); DAT_00241b88 = iStack0000000000000010; DAT_00241b8c = iStack0000000000000014; DAT_00241150 = &DAT_00241198; DAT_0024114c = 0x1701; DAT_00241198 = 0x3f800000; _DAT_0024119c = 0; _DAT_002411a4 = 0; DAT_002411ac = 0x3f800000; _DAT_002411b0 = 0; _DAT_002411b8 = 0; DAT_002411c0 = 0x3f800000; _DAT_002411c4 = 0; _DAT_002411cc = 0; DAT_002411d4 = 0x3f800000; rlOrtho(0,(double)iStack0000000000000010,(double)iStack0000000000000014,0,0,DAT_001d9ab8); DAT_00241150 = &DAT_00241158; DAT_0024114c = 0x1700; DAT_00241158 = 0x3f800000; _DAT_0024115c = 0; _DAT_00241164 = 0; DAT_0024116c = 0x3f800000; _DAT_00241170 = 0; _DAT_00241178 = 0; DAT_00241180 = 0x3f800000; _DAT_00241184 = 0; _DAT_0024118c = 0; DAT_00241194 = 0x3f800000; _DAT_00241bec = iStack0000000000000010; _DAT_00241bf0 = iStack0000000000000014; DAT_00241bc1 = 1; return; }
20,406
BeginTextureMode
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcore.c
void BeginTextureMode(RenderTexture2D target) { rlDrawRenderBatchActive(); // Update and draw internal render batch rlEnableFramebuffer(target.id); // Enable render target // Set viewport and RLGL internal framebuffer size rlViewport(0, 0, target.texture.width, target.texture.height); rlSetFramebufferWidth(target.texture.width); rlSetFramebufferHeight(target.texture.height); rlMatrixMode(RL_PROJECTION); // Switch to projection matrix rlLoadIdentity(); // Reset current matrix (projection) // Set orthographic projection to current framebuffer size // NOTE: Configured top-left corner as (0, 0) rlOrtho(0, target.texture.width, target.texture.height, 0, 0.0f, 1.0f); rlMatrixMode(RL_MODELVIEW); // Switch back to modelview matrix rlLoadIdentity(); // Reset current matrix (modelview) //rlScalef(0.0f, -1.0f, 0.0f); // Flip Y-drawing (?) // Setup current width/height for proper aspect ratio // calculation when using BeginMode3D() CORE.Window.currentFbo.width = target.texture.width; CORE.Window.currentFbo.height = target.texture.height; CORE.Window.usingFbo = true; }
O3
c
BeginTextureMode: pushq %rbp pushq %r14 pushq %rbx movq 0xc75ad(%rip), %rdi # 0x13b118 callq 0x61150 movl 0x20(%rsp), %esi movl $0x8d40, %edi # imm = 0x8D40 callq *0xc56d1(%rip) # 0x139250 movl 0x28(%rsp), %ebx movl 0x2c(%rsp), %ebp xorl %edi, %edi xorl %esi, %esi movl %ebx, %edx movl %ebp, %ecx callq *0xc755b(%rip) # 0x13b0f0 movl %ebx, 0xc7ffd(%rip) # 0x13bb98 movl %ebp, 0xc7ffb(%rip) # 0x13bb9c leaq 0xc7600(%rip), %rax # 0x13b1a8 movq %rax, 0xc75b1(%rip) # 0x13b160 movl $0x1701, 0xc75a3(%rip) # imm = 0x1701 movl $0x3f800000, %r14d # imm = 0x3F800000 movl %r14d, 0xc75e2(%rip) # 0x13b1a8 xorps %xmm0, %xmm0 movups %xmm0, 0xc75dc(%rip) # 0x13b1ac movl %r14d, 0xc75e5(%rip) # 0x13b1bc movups %xmm0, 0xc75e2(%rip) # 0x13b1c0 movl %r14d, 0xc75eb(%rip) # 0x13b1d0 movups %xmm0, 0xc75e8(%rip) # 0x13b1d4 movl %r14d, 0xc75f1(%rip) # 0x13b1e4 cvtsi2sd %ebx, %xmm1 cvtsi2sd %ebp, %xmm2 movsd 0x6007d(%rip), %xmm5 # 0xd3c80 xorps %xmm0, %xmm0 xorps %xmm3, %xmm3 xorps %xmm4, %xmm4 callq 0x60dc8 leaq 0xc7550(%rip), %rax # 0x13b168 movq %rax, 0xc7541(%rip) # 0x13b160 movl $0x1700, 0xc7533(%rip) # imm = 0x1700 movl %r14d, 0xc7538(%rip) # 0x13b168 xorps %xmm0, %xmm0 movups %xmm0, 0xc7532(%rip) # 0x13b16c movl %r14d, 0xc753b(%rip) # 0x13b17c movups %xmm0, 0xc7538(%rip) # 0x13b180 movl %r14d, 0xc7541(%rip) # 0x13b190 movups %xmm0, 0xc753e(%rip) # 0x13b194 movl %r14d, 0xc7547(%rip) # 0x13b1a4 movl %ebx, 0xc7f99(%rip) # 0x13bbfc movl %ebp, 0xc7f97(%rip) # 0x13bc00 movb $0x1, 0xc7f61(%rip) # 0x13bbd1 popq %rbx popq %r14 popq %rbp retq
BeginTextureMode: push rbp push r14 push rbx mov rdi, cs:RLGL call rlDrawRenderBatch mov esi, [rsp+18h+arg_0] mov edi, 8D40h call cs:glad_glBindFramebuffer mov ebx, [rsp+18h+arg_8] mov ebp, [rsp+18h+arg_C] xor edi, edi xor esi, esi mov edx, ebx mov ecx, ebp call cs:glad_glViewport mov cs:dword_13BB98, ebx mov cs:dword_13BB9C, ebp lea rax, xmmword_13B1A8 mov cs:qword_13B160, rax mov cs:dword_13B15C, 1701h mov r14d, 3F800000h mov dword ptr cs:xmmword_13B1A8, r14d xorps xmm0, xmm0 movups cs:xmmword_13B1A8+4, xmm0 mov dword ptr cs:xmmword_13B1B8+4, r14d movups cs:xmmword_13B1B8+8, xmm0 mov dword ptr cs:xmmword_13B1C8+8, r14d movups cs:xmmword_13B1C8+0Ch, xmm0 mov dword ptr cs:xmmword_13B1D8+0Ch, r14d cvtsi2sd xmm1, ebx cvtsi2sd xmm2, ebp movsd xmm5, cs:qword_D3C80 xorps xmm0, xmm0 xorps xmm3, xmm3 xorps xmm4, xmm4 call rlOrtho lea rax, xmmword_13B168 mov cs:qword_13B160, rax mov cs:dword_13B15C, 1700h mov dword ptr cs:xmmword_13B168, r14d xorps xmm0, xmm0 movups cs:xmmword_13B168+4, xmm0 mov dword ptr cs:xmmword_13B178+4, r14d movups cs:xmmword_13B178+8, xmm0 mov dword ptr cs:xmmword_13B188+8, r14d movups cs:xmmword_13B188+0Ch, xmm0 mov dword ptr cs:xmmword_13B198+0Ch, r14d mov dword ptr cs:qword_13BBFC, ebx mov dword ptr cs:qword_13BBFC+4, ebp mov cs:byte_13BBD1, 1 pop rbx pop r14 pop rbp retn
__int128 * BeginTextureMode( double a1, __m128 a2, __m128 a3, __m128 a4, double a5, double a6, __m128 a7, __m128 a8, long long a9, long long a10, long long a11, long long a12, long long a13, long long a14, unsigned int a15, long long a16) { long long v16; // rdx long long v17; // rcx long long v18; // r8 long long v19; // r9 __int128 *result; // rax rlDrawRenderBatch(RLGL[0], a10, a1, a2, a3, a4, a5, a6, a7, a8); glad_glBindFramebuffer(36160LL, a15); glad_glViewport(0LL, 0LL, (unsigned int)a16, HIDWORD(a16)); qword_13BB98 = a16; qword_13B160 = (long long)&xmmword_13B1A8; dword_13B15C = 5889; LODWORD(xmmword_13B1A8) = 1065353216; *(__int128 *)((char *)&xmmword_13B1A8 + 4) = 0LL; DWORD1(xmmword_13B1B8) = 1065353216; *(__int128 *)((char *)&xmmword_13B1B8 + 8) = 0LL; DWORD2(xmmword_13B1C8) = 1065353216; *(__int128 *)((char *)&xmmword_13B1C8 + 12) = 0LL; HIDWORD(xmmword_13B1D8) = 1065353216; rlOrtho( 0.0, (double)(int)a16, (double)SHIDWORD(a16), 0.0, (__m128)0LL, (__m128)0x3FF0000000000000uLL, a7, a8, 0LL, 0LL, v16, v17, v18, v19); result = &xmmword_13B168; qword_13B160 = (long long)&xmmword_13B168; dword_13B15C = 5888; LODWORD(xmmword_13B168) = 1065353216; *(__int128 *)((char *)&xmmword_13B168 + 4) = 0LL; DWORD1(xmmword_13B178) = 1065353216; *(__int128 *)((char *)&xmmword_13B178 + 8) = 0LL; DWORD2(xmmword_13B188) = 1065353216; *(__int128 *)((char *)&xmmword_13B188 + 12) = 0LL; HIDWORD(xmmword_13B198) = 1065353216; qword_13BBFC = a16; byte_13BBD1 = 1; return result; }
BeginTextureMode: PUSH RBP PUSH R14 PUSH RBX MOV RDI,qword ptr [0x0023b118] CALL 0x00161150 MOV ESI,dword ptr [RSP + 0x20] MOV EDI,0x8d40 CALL qword ptr [0x00239250] MOV EBX,dword ptr [RSP + 0x28] MOV EBP,dword ptr [RSP + 0x2c] XOR EDI,EDI XOR ESI,ESI MOV EDX,EBX MOV ECX,EBP CALL qword ptr [0x0023b0f0] MOV dword ptr [0x0023bb98],EBX MOV dword ptr [0x0023bb9c],EBP LEA RAX,[0x23b1a8] MOV qword ptr [0x0023b160],RAX MOV dword ptr [0x0023b15c],0x1701 MOV R14D,0x3f800000 MOV dword ptr [0x0023b1a8],R14D XORPS XMM0,XMM0 MOVUPS xmmword ptr [0x0023b1ac],XMM0 MOV dword ptr [0x0023b1bc],R14D MOVUPS xmmword ptr [0x0023b1c0],XMM0 MOV dword ptr [0x0023b1d0],R14D MOVUPS xmmword ptr [0x0023b1d4],XMM0 MOV dword ptr [0x0023b1e4],R14D CVTSI2SD XMM1,EBX CVTSI2SD XMM2,EBP MOVSD XMM5,qword ptr [0x001d3c80] XORPS XMM0,XMM0 XORPS XMM3,XMM3 XORPS XMM4,XMM4 CALL 0x00160dc8 LEA RAX,[0x23b168] MOV qword ptr [0x0023b160],RAX MOV dword ptr [0x0023b15c],0x1700 MOV dword ptr [0x0023b168],R14D XORPS XMM0,XMM0 MOVUPS xmmword ptr [0x0023b16c],XMM0 MOV dword ptr [0x0023b17c],R14D MOVUPS xmmword ptr [0x0023b180],XMM0 MOV dword ptr [0x0023b190],R14D MOVUPS xmmword ptr [0x0023b194],XMM0 MOV dword ptr [0x0023b1a4],R14D MOV dword ptr [0x0023bbfc],EBX MOV dword ptr [0x0023bc00],EBP MOV byte ptr [0x0023bbd1],0x1 POP RBX POP R14 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void BeginTextureMode(void) { int4 in_stack_00000008; int iStack0000000000000010; int iStack0000000000000014; rlDrawRenderBatch(RLGL); (*glad_glBindFramebuffer)(0x8d40,in_stack_00000008); (*glad_glViewport)(0,0,iStack0000000000000010,iStack0000000000000014); DAT_0023bb98 = iStack0000000000000010; DAT_0023bb9c = iStack0000000000000014; DAT_0023b160 = &DAT_0023b1a8; DAT_0023b15c = 0x1701; DAT_0023b1a8 = 0x3f800000; _DAT_0023b1ac = 0; _DAT_0023b1b4 = 0; DAT_0023b1bc = 0x3f800000; _DAT_0023b1c0 = 0; _DAT_0023b1c8 = 0; DAT_0023b1d0 = 0x3f800000; _DAT_0023b1d4 = 0; _DAT_0023b1dc = 0; DAT_0023b1e4 = 0x3f800000; rlOrtho(0,(double)iStack0000000000000010,(double)iStack0000000000000014,0,0,DAT_001d3c80); DAT_0023b160 = &DAT_0023b168; DAT_0023b15c = 0x1700; DAT_0023b168 = 0x3f800000; _DAT_0023b16c = 0; _DAT_0023b174 = 0; DAT_0023b17c = 0x3f800000; _DAT_0023b180 = 0; _DAT_0023b188 = 0; DAT_0023b190 = 0x3f800000; _DAT_0023b194 = 0; _DAT_0023b19c = 0; DAT_0023b1a4 = 0x3f800000; _DAT_0023bbfc = iStack0000000000000010; _DAT_0023bc00 = iStack0000000000000014; DAT_0023bbd1 = 1; return; }
20,407
strmake
eloqsql/strings/strmake.c
char *strmake(register char *dst, register const char *src, size_t length) { while (length--) { if (! (*dst++ = *src++)) { #ifdef EXTRA_DEBUG /* 'length' is the maximum length of the string; the buffer needs to be one character larger to accommodate the terminating '\0'. This is easy to get wrong, so we make sure we write to the entire length of the buffer to identify incorrect buffer-sizes. We only initialism the "unused" part of the buffer here, a) for efficiency, and b) because dst==src is allowed, so initializing the entire buffer would overwrite the source-string. Also, we write a character rather than '\0' as this makes spotting these problems in the results easier. If we are using purify/valgrind, we only set one character at end to be able to detect also wrong accesses after the end of dst. */ if (length) { #ifdef HAVE_valgrind dst[length-1]= 'Z'; #else bfill(dst, length-1, (int) 'Z'); #endif /* HAVE_valgrind */ } #endif /* EXTRA_DEBUG */ return dst-1; } } *dst=0; return dst; }
O0
c
strmake: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x20(%rbp), %rax movq %rax, %rcx addq $-0x1, %rcx movq %rcx, -0x20(%rbp) cmpq $0x0, %rax je 0x79d1b movq -0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x18(%rbp) movb (%rax), %al movq -0x10(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x10(%rbp) movb %al, (%rcx) cmpb $0x0, %al jne 0x79d19 movq -0x10(%rbp), %rax addq $-0x1, %rax movq %rax, -0x8(%rbp) jmp 0x79d2a jmp 0x79cd0 movq -0x10(%rbp), %rax movb $0x0, (%rax) movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax popq %rbp retq
strmake: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx loc_79CD0: mov rax, [rbp+var_20] mov rcx, rax add rcx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_20], rcx cmp rax, 0 jz short loc_79D1B mov rax, [rbp+var_18] mov rcx, rax add rcx, 1 mov [rbp+var_18], rcx mov al, [rax] mov rcx, [rbp+var_10] mov rdx, rcx add rdx, 1 mov [rbp+var_10], rdx mov [rcx], al cmp al, 0 jnz short loc_79D19 mov rax, [rbp+var_10] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_8], rax jmp short loc_79D2A loc_79D19: jmp short loc_79CD0 loc_79D1B: mov rax, [rbp+var_10] mov byte ptr [rax], 0 mov rax, [rbp+var_10] mov [rbp+var_8], rax loc_79D2A: mov rax, [rbp+var_8] pop rbp retn
_BYTE * strmake(_BYTE *a1, _BYTE *a2, long long a3) { _BYTE *v4; // rax _BYTE *v5; // rcx while ( a3-- ) { v4 = a2++; LOBYTE(v4) = *v4; v5 = a1++; *v5 = (_BYTE)v4; if ( !(_BYTE)v4 ) return a1 - 1; } *a1 = 0; return a1; }
strmake: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX LAB_00179cd0: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,RAX ADD RCX,-0x1 MOV qword ptr [RBP + -0x20],RCX CMP RAX,0x0 JZ 0x00179d1b MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x18],RCX MOV AL,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x10] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0x10],RDX MOV byte ptr [RCX],AL CMP AL,0x0 JNZ 0x00179d19 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,-0x1 MOV qword ptr [RBP + -0x8],RAX JMP 0x00179d2a LAB_00179d19: JMP 0x00179cd0 LAB_00179d1b: MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x8],RAX LAB_00179d2a: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
char * strmake(char *param_1,char *param_2,long param_3) { char cVar1; char *pcVar2; long local_28; char *local_20; char *local_18; local_28 = param_3; local_20 = param_2; pcVar2 = param_1; do { local_18 = pcVar2; if (local_28 == 0) { *local_18 = '\0'; return local_18; } cVar1 = *local_20; *local_18 = cVar1; local_28 = local_28 + -1; local_20 = local_20 + 1; pcVar2 = local_18 + 1; } while (cVar1 != '\0'); return local_18; }
20,408
strmake
eloqsql/strings/strmake.c
char *strmake(register char *dst, register const char *src, size_t length) { while (length--) { if (! (*dst++ = *src++)) { #ifdef EXTRA_DEBUG /* 'length' is the maximum length of the string; the buffer needs to be one character larger to accommodate the terminating '\0'. This is easy to get wrong, so we make sure we write to the entire length of the buffer to identify incorrect buffer-sizes. We only initialism the "unused" part of the buffer here, a) for efficiency, and b) because dst==src is allowed, so initializing the entire buffer would overwrite the source-string. Also, we write a character rather than '\0' as this makes spotting these problems in the results easier. If we are using purify/valgrind, we only set one character at end to be able to detect also wrong accesses after the end of dst. */ if (length) { #ifdef HAVE_valgrind dst[length-1]= 'Z'; #else bfill(dst, length-1, (int) 'Z'); #endif /* HAVE_valgrind */ } #endif /* EXTRA_DEBUG */ return dst-1; } } *dst=0; return dst; }
O3
c
strmake: pushq %rbp movq %rsp, %rbp movq %rdi, %rax xorl %edi, %edi movq %rdi, %rcx cmpq %rdi, %rdx je 0x5bb40 movb (%rsi,%rcx), %r8b movb %r8b, (%rax,%rcx) leaq 0x1(%rcx), %rdi testb %r8b, %r8b jne 0x5bb25 jmp 0x5bb44 movb $0x0, (%rax,%rcx) addq %rcx, %rax popq %rbp retq nopl (%rax)
strmake: push rbp mov rbp, rsp mov rax, rdi xor edi, edi loc_5BB25: mov rcx, rdi cmp rdx, rdi jz short loc_5BB40 mov r8b, [rsi+rcx] mov [rax+rcx], r8b lea rdi, [rcx+1] test r8b, r8b jnz short loc_5BB25 jmp short loc_5BB44 loc_5BB40: mov byte ptr [rax+rcx], 0 loc_5BB44: add rax, rcx pop rbp retn
long long strmake(long long a1, long long a2, long long a3) { long long v4; // rdi long long v5; // rcx char v6; // r8 v4 = 0LL; while ( 1 ) { v5 = v4; if ( a3 == v4 ) break; v6 = *(_BYTE *)(a2 + v4); *(_BYTE *)(a1 + v4++) = v6; if ( !v6 ) return v5 + a1; } *(_BYTE *)(a1 + v4) = 0; return v5 + a1; }
strmake: PUSH RBP MOV RBP,RSP MOV RAX,RDI XOR EDI,EDI LAB_0015bb25: MOV RCX,RDI CMP RDX,RDI JZ 0x0015bb40 MOV R8B,byte ptr [RSI + RCX*0x1] MOV byte ptr [RAX + RCX*0x1],R8B LEA RDI,[RCX + 0x1] TEST R8B,R8B JNZ 0x0015bb25 JMP 0x0015bb44 LAB_0015bb40: MOV byte ptr [RAX + RCX*0x1],0x0 LAB_0015bb44: ADD RAX,RCX POP RBP RET
long strmake(long param_1,long param_2,long param_3) { char cVar1; long lVar2; long lVar3; lVar2 = 0; do { lVar3 = lVar2; if (param_3 == lVar3) { *(int1 *)(param_1 + lVar3) = 0; break; } cVar1 = *(char *)(param_2 + lVar3); *(char *)(param_1 + lVar3) = cVar1; lVar2 = lVar3 + 1; } while (cVar1 != '\0'); return param_1 + lVar3; }
20,409
minja::Value::contains(minja::Value const&) const
monkey531[P]llama/common/minja.hpp
bool contains(const Value & value) const { if (is_null()) throw std::runtime_error("Undefined value or reference"); if (array_) { for (const auto& item : *array_) { if (item.to_bool() && item == value) return true; } return false; } else if (object_) { if (!value.is_hashable()) throw std::runtime_error("Unashable type: " + value.dump()); return object_->find(value.primitive_) != object_->end(); } else { throw std::runtime_error("contains can only be called on arrays and objects: " + dump()); } }
O0
cpp
minja::Value::contains(minja::Value const&) const: subq $0x108, %rsp # imm = 0x108 movq %rdi, 0xf8(%rsp) movq %rsi, 0xf0(%rsp) movq 0xf8(%rsp), %rdi movq %rdi, 0x18(%rsp) callq 0x113460 testb $0x1, %al jne 0x13140f jmp 0x13146d movl $0x10, %edi callq 0x5a680 movq %rax, %rdi movq %rdi, %rax movq %rax, 0x10(%rsp) leaq 0xdf3c6(%rip), %rsi # 0x2107f1 callq 0x5a460 jmp 0x131432 movq 0x10(%rsp), %rdi movq 0x170b72(%rip), %rsi # 0x2a1fb0 movq 0x170b33(%rip), %rdx # 0x2a1f78 callq 0x5aae0 movq 0x10(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0xe8(%rsp) movl %eax, 0xe4(%rsp) callq 0x5af50 jmp 0x1317bd movq 0x18(%rsp), %rdi addq $0x10, %rdi callq 0x1127c0 testb $0x1, %al jne 0x131484 jmp 0x13154d movq 0x18(%rsp), %rdi addq $0x10, %rdi callq 0x1135f0 movq %rax, 0xd8(%rsp) movq 0xd8(%rsp), %rdi callq 0x123230 movq %rax, 0xd0(%rsp) movq 0xd8(%rsp), %rdi callq 0x123050 movq %rax, 0xc8(%rsp) leaq 0xd0(%rsp), %rdi leaq 0xc8(%rsp), %rsi callq 0x131060 testb $0x1, %al jne 0x1314df jmp 0x131540 leaq 0xd0(%rsp), %rdi callq 0x123600 movq %rax, 0xc0(%rsp) movq 0xc0(%rsp), %rdi callq 0x112070 testb $0x1, %al jne 0x131507 jmp 0x13152f movq 0xc0(%rsp), %rdi movq 0xf0(%rsp), %rsi callq 0x135020 testb $0x1, %al jne 0x131522 jmp 0x13152f movb $0x1, 0x107(%rsp) jmp 0x1317ac jmp 0x131531 leaq 0xd0(%rsp), %rdi callq 0x1313c0 jmp 0x1314c4 movb $0x0, 0x107(%rsp) jmp 0x1317ac movq 0x18(%rsp), %rdi addq $0x20, %rdi callq 0x1127e0 testb $0x1, %al jne 0x131564 jmp 0x1316d0 movq 0xf0(%rsp), %rdi callq 0x126fe0 testb $0x1, %al jne 0x131671 movb $0x1, 0x7f(%rsp) movl $0x10, %edi callq 0x5a680 movq %rax, 0x8(%rsp) movq 0xf0(%rsp), %rsi leaq 0x80(%rsp), %rdi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x1126f0 jmp 0x1315ab leaq 0xdf843(%rip), %rsi # 0x210df5 leaq 0xa0(%rsp), %rdi leaq 0x80(%rsp), %rdx callq 0xf6d00 jmp 0x1315c9 movq 0x8(%rsp), %rdi leaq 0xa0(%rsp), %rsi callq 0x5a4b0 jmp 0x1315dd movq 0x8(%rsp), %rdi movb $0x0, 0x7f(%rsp) movq 0x1709c2(%rip), %rsi # 0x2a1fb0 movq 0x170983(%rip), %rdx # 0x2a1f78 callq 0x5aae0 jmp 0x1317ca movq %rax, %rcx movl %edx, %eax movq %rcx, 0xe8(%rsp) movl %eax, 0xe4(%rsp) jmp 0x131659 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xe8(%rsp) movl %eax, 0xe4(%rsp) jmp 0x13164c movq %rax, %rcx movl %edx, %eax movq %rcx, 0xe8(%rsp) movl %eax, 0xe4(%rsp) leaq 0xa0(%rsp), %rdi callq 0x5b528 leaq 0x80(%rsp), %rdi callq 0x5b528 testb $0x1, 0x7f(%rsp) jne 0x131662 jmp 0x13166c movq 0x8(%rsp), %rdi callq 0x5af50 jmp 0x1317bd movq 0x18(%rsp), %rdi addq $0x20, %rdi callq 0x113640 movq %rax, %rdi movq 0xf0(%rsp), %rsi addq $0x40, %rsi callq 0x12b8d0 movq 0x18(%rsp), %rdi movq %rax, 0x70(%rsp) addq $0x20, %rdi callq 0x113640 movq %rax, %rdi callq 0x1136c0 movq %rax, 0x68(%rsp) leaq 0x70(%rsp), %rdi leaq 0x68(%rsp), %rsi callq 0x113680 andb $0x1, %al movb %al, 0x107(%rsp) jmp 0x1317ac movb $0x1, 0x27(%rsp) movl $0x10, %edi callq 0x5a680 movq 0x18(%rsp), %rsi movq %rax, (%rsp) leaq 0x28(%rsp), %rdi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x1126f0 jmp 0x1316fb leaq 0xdfba3(%rip), %rsi # 0x2112a5 leaq 0x48(%rsp), %rdi leaq 0x28(%rsp), %rdx callq 0xf6d00 jmp 0x131713 movq (%rsp), %rdi leaq 0x48(%rsp), %rsi callq 0x5a4b0 jmp 0x131723 movq (%rsp), %rdi movb $0x0, 0x27(%rsp) movq 0x17087d(%rip), %rsi # 0x2a1fb0 movq 0x17083e(%rip), %rdx # 0x2a1f78 callq 0x5aae0 jmp 0x1317ca movq %rax, %rcx movl %edx, %eax movq %rcx, 0xe8(%rsp) movl %eax, 0xe4(%rsp) jmp 0x131798 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xe8(%rsp) movl %eax, 0xe4(%rsp) jmp 0x13178e movq %rax, %rcx movl %edx, %eax movq %rcx, 0xe8(%rsp) movl %eax, 0xe4(%rsp) leaq 0x48(%rsp), %rdi callq 0x5b528 leaq 0x28(%rsp), %rdi callq 0x5b528 testb $0x1, 0x27(%rsp) jne 0x1317a1 jmp 0x1317aa movq (%rsp), %rdi callq 0x5af50 jmp 0x1317bd movb 0x107(%rsp), %al andb $0x1, %al addq $0x108, %rsp # imm = 0x108 retq movq 0xe8(%rsp), %rdi callq 0x5aba0 nopw (%rax,%rax)
_ZNK5minja5Value8containsERKS0_: sub rsp, 108h mov [rsp+108h+var_10], rdi mov [rsp+108h+var_18], rsi mov rdi, [rsp+108h+var_10]; this mov [rsp+108h+var_F0], rdi call _ZNK5minja5Value7is_nullEv; minja::Value::is_null(void) test al, 1 jnz short loc_13140F jmp short loc_13146D loc_13140F: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rdi, rax; this mov rax, rdi mov [rsp+108h+var_F8], rax lea rsi, aUndefinedValue; "Undefined value or reference" call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short $+2 loc_131432: mov rdi, [rsp+108h+var_F8]; void * mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) call ___cxa_throw mov rdi, [rsp+108h+var_F8]; void * mov rcx, rax mov eax, edx mov [rsp+108h+var_20], rcx mov [rsp+108h+var_24], eax call ___cxa_free_exception jmp loc_1317BD loc_13146D: mov rdi, [rsp+108h+var_F0] add rdi, 10h call _ZNKSt12__shared_ptrISt6vectorIN5minja5ValueESaIS2_EELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<std::vector<minja::Value>,(__gnu_cxx::_Lock_policy)2>::operator bool(void) test al, 1 jnz short loc_131484 jmp loc_13154D loc_131484: mov rdi, [rsp+108h+var_F0] add rdi, 10h call _ZNKSt19__shared_ptr_accessISt6vectorIN5minja5ValueESaIS2_EELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv; std::__shared_ptr_access<std::vector<minja::Value>,(__gnu_cxx::_Lock_policy)2,false,false>::operator*(void) mov [rsp+108h+var_30], rax mov rdi, [rsp+108h+var_30] call _ZNSt6vectorIN5minja5ValueESaIS1_EE5beginEv; std::vector<minja::Value>::begin(void) mov [rsp+108h+var_38], rax mov rdi, [rsp+108h+var_30] call _ZNSt6vectorIN5minja5ValueESaIS1_EE3endEv; std::vector<minja::Value>::end(void) mov [rsp+108h+var_40], rax loc_1314C4: lea rdi, [rsp+108h+var_38] lea rsi, [rsp+108h+var_40] call _ZN9__gnu_cxxneIPN5minja5ValueESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_; __gnu_cxx::operator!=<minja::Value *,std::vector<minja::Value>>(__gnu_cxx::__normal_iterator<minja::Value *,std::vector<minja::Value>> const&,__gnu_cxx::__normal_iterator<minja::Value *,std::vector<minja::Value>> const&) test al, 1 jnz short loc_1314DF jmp short loc_131540 loc_1314DF: lea rdi, [rsp+108h+var_38] call _ZNK9__gnu_cxx17__normal_iteratorIPN5minja5ValueESt6vectorIS2_SaIS2_EEEdeEv; __gnu_cxx::__normal_iterator<minja::Value *,std::vector<minja::Value>>::operator*(void) mov [rsp+108h+var_48], rax mov rdi, [rsp+108h+var_48]; this call _ZNK5minja5Value7to_boolEv; minja::Value::to_bool(void) test al, 1 jnz short loc_131507 jmp short loc_13152F loc_131507: mov rdi, [rsp+108h+var_48] mov rsi, [rsp+108h+var_18] call _ZNK5minja5ValueeqERKS0_; minja::Value::operator==(minja::Value const&) test al, 1 jnz short loc_131522 jmp short loc_13152F loc_131522: mov [rsp+108h+var_1], 1 jmp loc_1317AC loc_13152F: jmp short $+2 loc_131531: lea rdi, [rsp+108h+var_38] call _ZN9__gnu_cxx17__normal_iteratorIPN5minja5ValueESt6vectorIS2_SaIS2_EEEppEv; __gnu_cxx::__normal_iterator<minja::Value *,std::vector<minja::Value>>::operator++(void) jmp short loc_1314C4 loc_131540: mov [rsp+108h+var_1], 0 jmp loc_1317AC loc_13154D: mov rdi, [rsp+108h+var_F0] add rdi, 20h ; ' ' call _ZNKSt12__shared_ptrIN8nlohmann16json_abi_v3_11_311ordered_mapINS1_10basic_jsonIS2_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueESt4lessISE_ESaISt4pairIKSE_SG_EEEELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<nlohmann::json_abi_v3_11_3::ordered_map<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>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<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,minja::Value>>>,(__gnu_cxx::_Lock_policy)2>::operator bool(void) test al, 1 jnz short loc_131564 jmp loc_1316D0 loc_131564: mov rdi, [rsp+108h+var_18]; this call _ZNK5minja5Value11is_hashableEv; minja::Value::is_hashable(void) test al, 1 jnz loc_131671 mov [rsp+108h+var_89], 1 mov edi, 10h; thrown_size call ___cxa_allocate_exception mov [rsp+108h+var_100], rax mov rsi, [rsp+108h+var_18] lea rdi, [rsp+108h+var_88] mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) jmp short $+2 loc_1315AB: lea rsi, aUnashableType; "Unashable type: " lea rdi, [rsp+108h+var_68] lea rdx, [rsp+108h+var_88] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) jmp short $+2 loc_1315C9: mov rdi, [rsp+108h+var_100] lea rsi, [rsp+108h+var_68] call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) jmp short $+2 loc_1315DD: mov rdi, [rsp+108h+var_100]; void * mov [rsp+108h+var_89], 0 mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) call ___cxa_throw jmp loc_1317CA mov rcx, rax mov eax, edx mov [rsp+108h+var_20], rcx mov [rsp+108h+var_24], eax jmp short loc_131659 mov rcx, rax mov eax, edx mov [rsp+108h+var_20], rcx mov [rsp+108h+var_24], eax jmp short loc_13164C mov rcx, rax mov eax, edx mov [rsp+108h+var_20], rcx mov [rsp+108h+var_24], eax lea rdi, [rsp+108h+var_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_13164C: lea rdi, [rsp+108h+var_88]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_131659: test [rsp+108h+var_89], 1 jnz short loc_131662 jmp short loc_13166C loc_131662: mov rdi, [rsp+108h+var_100]; void * call ___cxa_free_exception loc_13166C: jmp loc_1317BD loc_131671: mov rdi, [rsp+108h+var_F0] add rdi, 20h ; ' ' call _ZNKSt19__shared_ptr_accessIN8nlohmann16json_abi_v3_11_311ordered_mapINS1_10basic_jsonIS2_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueESt4lessISE_ESaISt4pairIKSE_SG_EEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::ordered_map<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>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<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,minja::Value>>>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rdi, rax mov rsi, [rsp+108h+var_18] add rsi, 40h ; '@' call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE4findERSJ_; nlohmann::json_abi_v3_11_3::ordered_map<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>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<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,minja::Value>>>::find(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov rdi, [rsp+108h+var_F0] mov [rsp+108h+var_98], rax add rdi, 20h ; ' ' call _ZNKSt19__shared_ptr_accessIN8nlohmann16json_abi_v3_11_311ordered_mapINS1_10basic_jsonIS2_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueESt4lessISE_ESaISt4pairIKSE_SG_EEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::ordered_map<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>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<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,minja::Value>>>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rdi, rax call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE3endEv; std::vector<std::pair<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,minja::Value>>::end(void) mov [rsp+108h+var_A0], rax lea rdi, [rsp+108h+var_98] lea rsi, [rsp+108h+var_A0] call _ZN9__gnu_cxxneIPSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEEbRKNS_17__normal_iteratorIT_T0_EEST_; __gnu_cxx::operator!=<std::pair<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,minja::Value> *,std::vector<std::pair<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,minja::Value>>>(__gnu_cxx::__normal_iterator<std::pair<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,minja::Value> *,std::vector<std::pair<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,minja::Value>>> const&,__gnu_cxx::__normal_iterator<std::pair<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,minja::Value> *,std::vector<std::pair<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,minja::Value>>> const&) and al, 1 mov [rsp+108h+var_1], al jmp loc_1317AC loc_1316D0: mov [rsp+108h+var_E1], 1 mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rsi, [rsp+108h+var_F0] mov [rsp+108h+var_108], rax lea rdi, [rsp+108h+var_E0] mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) jmp short $+2 loc_1316FB: lea rsi, aContainsCanOnl; "contains can only be called on arrays a"... lea rdi, [rsp+108h+var_C0] lea rdx, [rsp+108h+var_E0] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) jmp short $+2 loc_131713: mov rdi, [rsp+108h+var_108] lea rsi, [rsp+108h+var_C0] call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) jmp short $+2 loc_131723: mov rdi, [rsp+108h+var_108]; void * mov [rsp+108h+var_E1], 0 mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) call ___cxa_throw jmp loc_1317CA mov rcx, rax mov eax, edx mov [rsp+108h+var_20], rcx mov [rsp+108h+var_24], eax jmp short loc_131798 mov rcx, rax mov eax, edx mov [rsp+108h+var_20], rcx mov [rsp+108h+var_24], eax jmp short loc_13178E mov rcx, rax mov eax, edx mov [rsp+108h+var_20], rcx mov [rsp+108h+var_24], eax lea rdi, [rsp+108h+var_C0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_13178E: lea rdi, [rsp+108h+var_E0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_131798: test [rsp+108h+var_E1], 1 jnz short loc_1317A1 jmp short loc_1317AA loc_1317A1: mov rdi, [rsp+108h+var_108]; void * call ___cxa_free_exception loc_1317AA: jmp short loc_1317BD loc_1317AC: mov al, [rsp+108h+var_1] and al, 1 add rsp, 108h retn loc_1317BD: mov rdi, [rsp+108h+var_20] call __Unwind_Resume loc_1317CA: nop word ptr [rax+rax+00h]
bool minja::Value::contains(minja::Value *this, const minja::Value *a2) { long long v2; // rax long long v3; // rax void *v5; // [rsp+0h] [rbp-108h] void *v6; // [rsp+8h] [rbp-100h] std::runtime_error *exception; // [rsp+10h] [rbp-F8h] _BYTE v8[32]; // [rsp+28h] [rbp-E0h] BYREF _BYTE v9[32]; // [rsp+48h] [rbp-C0h] BYREF long long v10; // [rsp+68h] [rbp-A0h] BYREF long long v11; // [rsp+70h] [rbp-98h] BYREF char v12; // [rsp+7Fh] [rbp-89h] _BYTE v13[32]; // [rsp+80h] [rbp-88h] BYREF _BYTE v14[32]; // [rsp+A0h] [rbp-68h] BYREF minja::Value *v15; // [rsp+C0h] [rbp-48h] long long v16; // [rsp+C8h] [rbp-40h] BYREF long long v17; // [rsp+D0h] [rbp-38h] BYREF long long v18; // [rsp+D8h] [rbp-30h] minja::Value *v19; // [rsp+F0h] [rbp-18h] minja::Value *v20; // [rsp+F8h] [rbp-10h] v20 = this; v19 = a2; if ( (minja::Value::is_null(this) & 1) != 0 ) { 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 ( std::__shared_ptr<std::vector<minja::Value>,(__gnu_cxx::_Lock_policy)2>::operator bool((_QWORD *)this + 2) ) { v18 = std::__shared_ptr_access<std::vector<minja::Value>,(__gnu_cxx::_Lock_policy)2,false,false>::operator*((long long)this + 16); v17 = std::vector<minja::Value>::begin(v18); v16 = std::vector<minja::Value>::end(v18); while ( __gnu_cxx::operator!=<minja::Value *,std::vector<minja::Value>>((long long)&v17, (long long)&v16) ) { v15 = (minja::Value *)__gnu_cxx::__normal_iterator<minja::Value *,std::vector<minja::Value>>::operator*((long long)&v17); if ( (minja::Value::to_bool(v15) & 1) != 0 && (minja::Value::operator==(v15, v19) & 1) != 0 ) return 1; __gnu_cxx::__normal_iterator<minja::Value *,std::vector<minja::Value>>::operator++(&v17); } return 0; } else { if ( !std::__shared_ptr<nlohmann::json_abi_v3_11_3::ordered_map<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>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<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,minja::Value>>>,(__gnu_cxx::_Lock_policy)2>::operator bool((_QWORD *)this + 4) ) { v5 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v8, (long long)this, 0xFFFFFFFF, 0); std::operator+<char>((long long)v9, (long long)"contains can only be called on arrays and objects: ", (long long)v8); std::runtime_error::runtime_error(v5, v9); __cxa_throw( v5, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( (minja::Value::is_hashable(v19) & 1) == 0 ) { v6 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v13, (long long)v19, 0xFFFFFFFF, 0); std::operator+<char>((long long)v14, (long long)"Unashable type: ", (long long)v13); std::runtime_error::runtime_error(v6, v14); v12 = 0; __cxa_throw( v6, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v2 = std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::ordered_map<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>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<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,minja::Value>>>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->((long long)this + 32); v11 = nlohmann::json_abi_v3_11_3::ordered_map<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>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<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,minja::Value>>>::find( v2, (long long)v19 + 64); v3 = std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::ordered_map<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>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<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,minja::Value>>>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->((long long)this + 32); v10 = std::vector<std::pair<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,minja::Value>>::end(v3); return __gnu_cxx::operator!=<std::pair<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,minja::Value> *,std::vector<std::pair<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,minja::Value>>>( (long long)&v11, (long long)&v10); } }
20,410
minja::Value::contains(minja::Value const&) const
monkey531[P]llama/common/minja.hpp
bool contains(const Value & value) const { if (is_null()) throw std::runtime_error("Undefined value or reference"); if (array_) { for (const auto& item : *array_) { if (item.to_bool() && item == value) return true; } return false; } else if (object_) { if (!value.is_hashable()) throw std::runtime_error("Unashable type: " + value.dump()); return object_->find(value.primitive_) != object_->end(); } else { throw std::runtime_error("contains can only be called on arrays and objects: " + dump()); } }
O3
cpp
minja::Value::contains(minja::Value const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x40, %rsp movq %rsi, %rbx movq %rdi, %r15 movq 0x10(%rdi), %rax movq 0x20(%rdi), %r12 testq %r12, %r12 jne 0x93030 testq %rax, %rax jne 0x93030 cmpb $0x0, 0x40(%r15) jne 0x93030 cmpq $0x0, 0x30(%r15) je 0x930e0 testq %rax, %rax je 0x93066 movq (%rax), %r14 movq 0x8(%rax), %r15 cmpq %r15, %r14 je 0x93062 movq %r14, %rdi callq 0x85c94 testb %al, %al je 0x9305c movq %r14, %rdi movq %rbx, %rsi callq 0x9450e testb %al, %al jne 0x930d1 addq $0x50, %r14 jmp 0x9303c xorl %eax, %eax jmp 0x930d3 testq %r12, %r12 je 0x93112 cmpq $0x0, 0x10(%rbx) jne 0x9316f cmpq $0x0, 0x20(%rbx) jne 0x9316f cmpq $0x0, 0x30(%rbx) jne 0x9316f movq (%r12), %r14 cmpq 0x8(%r12), %r14 je 0x930c6 addq $0x40, %rbx movq %r14, %rdi movq %rbx, %rsi callq 0x8cd76 testb %al, %al jne 0x930b9 addq $0x60, %r14 cmpq 0x8(%r12), %r14 jne 0x9309f movq %r14, %rax movq 0x20(%r15), %rcx movq 0x8(%rcx), %r14 jmp 0x930c9 movq %r14, %rax cmpq %r14, %rax setne %al jmp 0x930d3 movb $0x1, %al addq $0x40, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x1a430 movq %rax, %r14 leaq 0x5bd26(%rip), %rsi # 0xeee1a movq %rax, %rdi callq 0x1a310 movq 0x97eed(%rip), %rsi # 0x12aff0 movq 0x97e56(%rip), %rdx # 0x12af60 movq %r14, %rdi callq 0x1aee0 movl $0x10, %edi callq 0x1a430 movq %rax, %r14 movq %rsp, %rdi movq %r15, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x860aa leaq 0x5c796(%rip), %rsi # 0xef8ce leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x78771 movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %r14, %rdi callq 0x1adf0 xorl %ebp, %ebp movq 0x97e92(%rip), %rsi # 0x12aff0 movq 0x97dfb(%rip), %rdx # 0x12af60 movq %r14, %rdi callq 0x1aee0 jmp 0x931ca movl $0x10, %edi callq 0x1a430 movq %rax, %r14 movq %rsp, %rdi movq %rbx, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x860aa leaq 0x5c289(%rip), %rsi # 0xef41e leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x78771 movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %r14, %rdi callq 0x1adf0 xorl %ebp, %ebp movq 0x97e35(%rip), %rsi # 0x12aff0 movq 0x97d9e(%rip), %rdx # 0x12af60 movq %r14, %rdi callq 0x1aee0 jmp 0x931ce jmp 0x9320e movq %rax, %rbx leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x931ec movq 0x30(%rsp), %rsi incq %rsi callq 0x1a8b0 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x93207 movq 0x10(%rsp), %rsi incq %rsi callq 0x1a8b0 testb %bpl, %bpl jne 0x93235 jmp 0x9323d movq %rax, %rbx leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x93235 movq 0x10(%rsp), %rsi incq %rsi callq 0x1a8b0 jmp 0x93235 jmp 0x93232 jmp 0x93232 movq %rax, %rbx movq %r14, %rdi callq 0x1a660 movq %rbx, %rdi callq 0x1af70 nop
_ZNK5minja5Value8containsERKS0_: push rbp push r15 push r14 push r12 push rbx sub rsp, 40h mov rbx, rsi mov r15, rdi mov rax, [rdi+10h] mov r12, [rdi+20h] test r12, r12 jnz short loc_93030 test rax, rax jnz short loc_93030 cmp byte ptr [r15+40h], 0 jnz short loc_93030 cmp qword ptr [r15+30h], 0 jz loc_930E0 loc_93030: test rax, rax jz short loc_93066 mov r14, [rax] mov r15, [rax+8] loc_9303C: cmp r14, r15 jz short loc_93062 mov rdi, r14; this call _ZNK5minja5Value7to_boolEv; minja::Value::to_bool(void) test al, al jz short loc_9305C mov rdi, r14 mov rsi, rbx call _ZNK5minja5ValueeqERKS0_; minja::Value::operator==(minja::Value const&) test al, al jnz short loc_930D1 loc_9305C: add r14, 50h ; 'P' jmp short loc_9303C loc_93062: xor eax, eax jmp short loc_930D3 loc_93066: test r12, r12 jz loc_93112 cmp qword ptr [rbx+10h], 0 jnz loc_9316F cmp qword ptr [rbx+20h], 0 jnz loc_9316F cmp qword ptr [rbx+30h], 0 jnz loc_9316F mov r14, [r12] cmp r14, [r12+8] jz short loc_930C6 add rbx, 40h ; '@' loc_9309F: mov rdi, r14 mov rsi, rbx call _ZN8nlohmann16json_abi_v3_11_3eqERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_; nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) test al, al jnz short loc_930B9 add r14, 60h ; '`' cmp r14, [r12+8] jnz short loc_9309F loc_930B9: mov rax, r14 mov rcx, [r15+20h] mov r14, [rcx+8] jmp short loc_930C9 loc_930C6: mov rax, r14 loc_930C9: cmp rax, r14 setnz al jmp short loc_930D3 loc_930D1: mov al, 1 loc_930D3: add rsp, 40h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_930E0: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, 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:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r14; void * call ___cxa_throw loc_93112: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax mov rdi, rsp mov rsi, r15 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aContainsCanOnl; "contains can only be called on arrays a"... lea rdi, [rsp+68h+var_48] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+68h+var_48] mov rdi, r14 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:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp short loc_931CA loc_9316F: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax mov rdi, rsp mov rsi, rbx mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aUnashableType; "Unashable type: " lea rdi, [rsp+68h+var_48] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+68h+var_48] mov rdi, r14 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:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r14; void * call ___cxa_throw loc_931CA: jmp short loc_931CE jmp short loc_9320E loc_931CE: mov rbx, rax lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_931EC mov rsi, [rsp+68h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_931EC: lea rax, [rsp+68h+var_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_93207 mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_93207: test bpl, bpl jnz short loc_93235 jmp short loc_9323D loc_9320E: mov rbx, rax lea rax, [rsp+68h+var_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_93235 mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_93235 jmp short loc_93232 jmp short $+2 loc_93232: mov rbx, rax loc_93235: mov rdi, r14; void * call ___cxa_free_exception loc_9323D: mov rdi, rbx call __Unwind_Resume
bool minja::Value::contains(minja::Value *this, const minja::Value *a2, __m128d a3) { minja::Value **v3; // rax unsigned __int8 **v4; // r12 minja::Value *v5; // r14 minja::Value *v6; // r15 unsigned __int8 *v8; // r14 unsigned __int8 *v9; // rax std::runtime_error *exception; // r14 void *v11; // r14 void *v12; // r14 _BYTE v13[16]; // [rsp+0h] [rbp-68h] BYREF _BYTE v14[16]; // [rsp+20h] [rbp-48h] BYREF v3 = (minja::Value **)*((_QWORD *)this + 2); v4 = (unsigned __int8 **)*((_QWORD *)this + 4); if ( !v4 && !v3 && !*((_BYTE *)this + 64) && !*((_QWORD *)this + 6) ) { 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 ( v3 ) { v5 = *v3; v6 = v3[1]; while ( 1 ) { if ( v5 == v6 ) return 0; if ( (unsigned __int8)minja::Value::to_bool(v5) && (unsigned __int8)minja::Value::operator==(v5, a2) ) break; v5 = (minja::Value *)((char *)v5 + 80); } return 1; } else { if ( !v4 ) { v11 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v13, (long long)this, 0xFFFFFFFF, 0); std::operator+<char>((long long)v14, (long long)"contains can only be called on arrays and objects: ", (long long)v13); std::runtime_error::runtime_error(v11, v14); __cxa_throw( v11, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( *((_QWORD *)a2 + 2) || *((_QWORD *)a2 + 4) || *((_QWORD *)a2 + 6) ) { v12 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v13, (long long)a2, 0xFFFFFFFF, 0); std::operator+<char>((long long)v14, (long long)"Unashable type: ", (long long)v13); std::runtime_error::runtime_error(v12, v14); __cxa_throw( v12, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v8 = *v4; if ( *v4 == v4[1] ) { v9 = *v4; } else { do { if ( (unsigned __int8)nlohmann::json_abi_v3_11_3::operator==(v8, (unsigned __int8 *)a2 + 64, a3) ) break; v8 += 96; } while ( v8 != v4[1] ); v9 = v8; v8 = *(unsigned __int8 **)(*((_QWORD *)this + 4) + 8LL); } return v9 != v8; } }
contains: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x40 MOV RBX,RSI MOV R15,RDI MOV RAX,qword ptr [RDI + 0x10] MOV R12,qword ptr [RDI + 0x20] TEST R12,R12 JNZ 0x00193030 TEST RAX,RAX JNZ 0x00193030 CMP byte ptr [R15 + 0x40],0x0 JNZ 0x00193030 CMP qword ptr [R15 + 0x30],0x0 JZ 0x001930e0 LAB_00193030: TEST RAX,RAX JZ 0x00193066 MOV R14,qword ptr [RAX] MOV R15,qword ptr [RAX + 0x8] LAB_0019303c: CMP R14,R15 JZ 0x00193062 MOV RDI,R14 CALL 0x00185c94 TEST AL,AL JZ 0x0019305c MOV RDI,R14 MOV RSI,RBX CALL 0x0019450e TEST AL,AL JNZ 0x001930d1 LAB_0019305c: ADD R14,0x50 JMP 0x0019303c LAB_00193062: XOR EAX,EAX JMP 0x001930d3 LAB_00193066: TEST R12,R12 JZ 0x00193112 CMP qword ptr [RBX + 0x10],0x0 JNZ 0x0019316f CMP qword ptr [RBX + 0x20],0x0 JNZ 0x0019316f CMP qword ptr [RBX + 0x30],0x0 JNZ 0x0019316f MOV R14,qword ptr [R12] CMP R14,qword ptr [R12 + 0x8] JZ 0x001930c6 ADD RBX,0x40 LAB_0019309f: MOV RDI,R14 MOV RSI,RBX CALL 0x0018cd76 TEST AL,AL JNZ 0x001930b9 ADD R14,0x60 CMP R14,qword ptr [R12 + 0x8] JNZ 0x0019309f LAB_001930b9: MOV RAX,R14 MOV RCX,qword ptr [R15 + 0x20] MOV R14,qword ptr [RCX + 0x8] JMP 0x001930c9 LAB_001930c6: MOV RAX,R14 LAB_001930c9: CMP RAX,R14 SETNZ AL JMP 0x001930d3 LAB_001930d1: MOV AL,0x1 LAB_001930d3: ADD RSP,0x40 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001930e0: MOV EDI,0x10 CALL 0x0011a430 MOV R14,RAX LAB_001930ed: LEA RSI,[0x1eee1a] MOV RDI,RAX CALL 0x0011a310 LAB_001930fc: MOV RSI,qword ptr [0x0022aff0] MOV RDX,qword ptr [0x0022af60] MOV RDI,R14 CALL 0x0011aee0 LAB_00193112: MOV EDI,0x10 CALL 0x0011a430 MOV R14,RAX LAB_0019311f: MOV RDI,RSP MOV RSI,R15 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x001860aa LAB_00193131: LEA RSI,[0x1ef8ce] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x00178771 MOV BPL,0x1 LAB_00193148: LEA RSI,[RSP + 0x20] MOV RDI,R14 CALL 0x0011adf0 XOR EBP,EBP MOV RSI,qword ptr [0x0022aff0] MOV RDX,qword ptr [0x0022af60] MOV RDI,R14 CALL 0x0011aee0 LAB_0019316f: MOV EDI,0x10 CALL 0x0011a430 MOV R14,RAX LAB_0019317c: MOV RDI,RSP MOV RSI,RBX MOV EDX,0xffffffff XOR ECX,ECX CALL 0x001860aa LAB_0019318e: LEA RSI,[0x1ef41e] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x00178771 MOV BPL,0x1 LAB_001931a5: LEA RSI,[RSP + 0x20] MOV RDI,R14 CALL 0x0011adf0 XOR EBP,EBP MOV RSI,qword ptr [0x0022aff0] MOV RDX,qword ptr [0x0022af60] MOV RDI,R14 CALL 0x0011aee0
/* minja::Value::contains(minja::Value const&) const */ bool __thiscall minja::Value::contains(Value *this,Value *param_1) { int8 *puVar1; long *plVar2; Value *pVVar3; char cVar4; runtime_error *prVar5; Value *this_00; basic_json *pbVar6; basic_json *pbVar7; bool bVar8; int1 auStack_68 [32]; string local_48 [32]; puVar1 = *(int8 **)(this + 0x10); plVar2 = *(long **)(this + 0x20); if ((((plVar2 == (long *)0x0) && (puVar1 == (int8 *)0x0)) && (this[0x40] == (Value)0x0)) && (*(long *)(this + 0x30) == 0)) { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001930ed to 001930fb has its CatchHandler @ 00193232 */ std::runtime_error::runtime_error(prVar5,"Undefined value or reference"); /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_0022aff0,PTR__runtime_error_0022af60); } if (puVar1 == (int8 *)0x0) { if (plVar2 == (long *)0x0) { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0019311f to 00193130 has its CatchHandler @ 00193230 */ dump_abi_cxx11_((int)auStack_68,SUB81(this,0)); /* try { // try from 00193131 to 00193144 has its CatchHandler @ 0019320e */ std::operator+((char *)local_48, (string *)"contains can only be called on arrays and objects: "); /* try { // try from 00193148 to 0019316c has its CatchHandler @ 001931ce */ std::runtime_error::runtime_error(prVar5,local_48); /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_0022aff0,PTR__runtime_error_0022af60); } if (((*(long *)(param_1 + 0x10) != 0) || (*(long *)(param_1 + 0x20) != 0)) || (*(long *)(param_1 + 0x30) != 0)) { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0019317c to 0019318d has its CatchHandler @ 0019322e */ dump_abi_cxx11_((int)auStack_68,SUB81(param_1,0)); /* try { // try from 0019318e to 001931a1 has its CatchHandler @ 001931cc */ std::operator+((char *)local_48,(string *)"Unashable type: "); /* try { // try from 001931a5 to 001931c9 has its CatchHandler @ 001931ca */ std::runtime_error::runtime_error(prVar5,local_48); /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_0022aff0,PTR__runtime_error_0022af60); } pbVar6 = (basic_json *)*plVar2; pbVar7 = pbVar6; if (pbVar6 != (basic_json *)plVar2[1]) { do { cVar4 = nlohmann::json_abi_v3_11_3::operator==(pbVar6,(basic_json *)(param_1 + 0x40)); if (cVar4 != '\0') break; pbVar6 = pbVar6 + 0x60; } while (pbVar6 != (basic_json *)plVar2[1]); pbVar7 = *(basic_json **)(*(long *)(this + 0x20) + 8); } bVar8 = pbVar6 != pbVar7; } else { pVVar3 = (Value *)puVar1[1]; for (this_00 = (Value *)*puVar1; this_00 != pVVar3; this_00 = this_00 + 0x50) { cVar4 = to_bool(this_00); if ((cVar4 != '\0') && (cVar4 = operator==(this_00,param_1), cVar4 != '\0')) { return true; } } bVar8 = false; } return bVar8; }
20,411
test_bug11718
eloqsql/libmariadb/unittest/libmariadb/result.c
static int test_bug11718(MYSQL *mysql) { MYSQL_RES *res; int rc; const char *query= "select str_to_date(concat(f3),'%Y%m%d') from t1,t2 " "where f1=f2 order by f1"; rc= mysql_query(mysql, "drop table if exists t1, t2"); check_mysql_rc(rc, mysql); rc= mysql_query(mysql, "create table t1 (f1 int)"); check_mysql_rc(rc, mysql); rc= mysql_query(mysql, "create table t2 (f2 int, f3 numeric(8))"); check_mysql_rc(rc, mysql); rc= mysql_query(mysql, "insert into t1 values (1), (2)"); check_mysql_rc(rc, mysql); rc= mysql_query(mysql, "insert into t2 values (1,20050101), (2,20050202)"); check_mysql_rc(rc, mysql); rc= mysql_query(mysql, query); check_mysql_rc(rc, mysql); res = mysql_store_result(mysql); FAIL_UNLESS(res->fields[0].type == MYSQL_TYPE_DATE, "type != MYSQL_TYPE_DATE"); mysql_free_result(res); rc= mysql_query(mysql, "drop table t1, t2"); check_mysql_rc(rc, mysql); return OK; }
O3
c
test_bug11718: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0x22374(%rip), %rsi # 0x38b69 callq 0x1dee1 testl %eax, %eax je 0x16835 movl %eax, %r14d movq %rbx, %rdi callq 0x1ff5a movq %rax, %r15 movq %rbx, %rdi callq 0x1ff45 leaq 0x21932(%rip), %rdi # 0x3814d leaq 0x21f56(%rip), %r8 # 0x38778 movl %r14d, %esi movq %r15, %rdx movl %eax, %ecx movl $0x204, %r9d # imm = 0x204 jmp 0x1699f leaq 0x22349(%rip), %rsi # 0x38b85 movq %rbx, %rdi callq 0x1dee1 testl %eax, %eax je 0x1687f movl %eax, %r14d movq %rbx, %rdi callq 0x1ff5a movq %rax, %r15 movq %rbx, %rdi callq 0x1ff45 leaq 0x218e8(%rip), %rdi # 0x3814d leaq 0x21f0c(%rip), %r8 # 0x38778 movl %r14d, %esi movq %r15, %rdx movl %eax, %ecx movl $0x206, %r9d # imm = 0x206 jmp 0x1699f leaq 0x22318(%rip), %rsi # 0x38b9e movq %rbx, %rdi callq 0x1dee1 testl %eax, %eax je 0x168c9 movl %eax, %r14d movq %rbx, %rdi callq 0x1ff5a movq %rax, %r15 movq %rbx, %rdi callq 0x1ff45 leaq 0x2189e(%rip), %rdi # 0x3814d leaq 0x21ec2(%rip), %r8 # 0x38778 movl %r14d, %esi movq %r15, %rdx movl %eax, %ecx movl $0x208, %r9d # imm = 0x208 jmp 0x1699f leaq 0x222f6(%rip), %rsi # 0x38bc6 movq %rbx, %rdi callq 0x1dee1 testl %eax, %eax je 0x16913 movl %eax, %r14d movq %rbx, %rdi callq 0x1ff5a movq %rax, %r15 movq %rbx, %rdi callq 0x1ff45 leaq 0x21854(%rip), %rdi # 0x3814d leaq 0x21e78(%rip), %r8 # 0x38778 movl %r14d, %esi movq %r15, %rdx movl %eax, %ecx movl $0x20a, %r9d # imm = 0x20A jmp 0x1699f leaq 0x222cb(%rip), %rsi # 0x38be5 movq %rbx, %rdi callq 0x1dee1 testl %eax, %eax je 0x1695a movl %eax, %r14d movq %rbx, %rdi callq 0x1ff5a movq %rax, %r15 movq %rbx, %rdi callq 0x1ff45 leaq 0x2180a(%rip), %rdi # 0x3814d leaq 0x21e2e(%rip), %r8 # 0x38778 movl %r14d, %esi movq %r15, %rdx movl %eax, %ecx movl $0x20c, %r9d # imm = 0x20C jmp 0x1699f leaq 0x221bd(%rip), %rsi # 0x38b1e movq %rbx, %rdi callq 0x1dee1 testl %eax, %eax je 0x169b6 movl %eax, %r14d movq %rbx, %rdi callq 0x1ff5a movq %rax, %r15 movq %rbx, %rdi callq 0x1ff45 leaq 0x217c3(%rip), %rdi # 0x3814d leaq 0x21de7(%rip), %r8 # 0x38778 movl %r14d, %esi movq %r15, %rdx movl %eax, %ecx movl $0x20e, %r9d # imm = 0x20E xorl %eax, %eax callq 0x187d7 movl $0x1, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rbx, %rdi callq 0x1edd9 movq 0x10(%rax), %rcx cmpl $0xa, 0x70(%rcx) jne 0x16a17 movq %rax, %rdi callq 0x19b8e leaq 0x22257(%rip), %rsi # 0x38c2e movq %rbx, %rdi callq 0x1dee1 testl %eax, %eax je 0x16a3d movl %eax, %r14d movq %rbx, %rdi callq 0x1ff5a movq %rax, %r15 movq %rbx, %rdi callq 0x1ff45 leaq 0x2174d(%rip), %rdi # 0x3814d leaq 0x21d71(%rip), %r8 # 0x38778 movl %r14d, %esi movq %r15, %rdx movl %eax, %ecx movl $0x214, %r9d # imm = 0x214 jmp 0x1699f leaq 0x215ea(%rip), %rdi # 0x38008 leaq 0x221f1(%rip), %rsi # 0x38c16 leaq 0x21d4c(%rip), %rdx # 0x38778 movl $0x211, %ecx # imm = 0x211 xorl %eax, %eax callq 0x187d7 jmp 0x169a6 xorl %eax, %eax jmp 0x169ab
test_bug11718: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdi lea rsi, aDropTableIfExi_1; "drop table if exists t1, t2" call mysql_query test eax, eax jz short loc_16835 mov r14d, eax mov rdi, rbx call mysql_error mov r15, rax mov rdi, rbx call mysql_errno lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, r14d mov rdx, r15 mov ecx, eax mov r9d, 204h jmp loc_1699F loc_16835: lea rsi, aCreateTableT1F; "create table t1 (f1 int)" mov rdi, rbx call mysql_query test eax, eax jz short loc_1687F mov r14d, eax mov rdi, rbx call mysql_error mov r15, rax mov rdi, rbx call mysql_errno lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, r14d mov rdx, r15 mov ecx, eax mov r9d, 206h jmp loc_1699F loc_1687F: lea rsi, aCreateTableT2F; "create table t2 (f2 int, f3 numeric(8))" mov rdi, rbx call mysql_query test eax, eax jz short loc_168C9 mov r14d, eax mov rdi, rbx call mysql_error mov r15, rax mov rdi, rbx call mysql_errno lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, r14d mov rdx, r15 mov ecx, eax mov r9d, 208h jmp loc_1699F loc_168C9: lea rsi, aInsertIntoT1Va; "insert into t1 values (1), (2)" mov rdi, rbx call mysql_query test eax, eax jz short loc_16913 mov r14d, eax mov rdi, rbx call mysql_error mov r15, rax mov rdi, rbx call mysql_errno lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, r14d mov rdx, r15 mov ecx, eax mov r9d, 20Ah jmp loc_1699F loc_16913: lea rsi, aInsertIntoT2Va; "insert into t2 values (1,20050101), (2,"... mov rdi, rbx call mysql_query test eax, eax jz short loc_1695A mov r14d, eax mov rdi, rbx call mysql_error mov r15, rax mov rdi, rbx call mysql_errno lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, r14d mov rdx, r15 mov ecx, eax mov r9d, 20Ch jmp short loc_1699F loc_1695A: lea rsi, aSelectStrToDat; "select str_to_date(concat(f3),'%Y%m%d')"... mov rdi, rbx call mysql_query test eax, eax jz short loc_169B6 mov r14d, eax mov rdi, rbx call mysql_error mov r15, rax mov rdi, rbx call mysql_errno lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, r14d mov rdx, r15 mov ecx, eax mov r9d, 20Eh loc_1699F: xor eax, eax call diag loc_169A6: mov eax, 1 loc_169AB: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_169B6: mov rdi, rbx call mysql_store_result mov rcx, [rax+10h] cmp dword ptr [rcx+70h], 0Ah jnz short loc_16A17 mov rdi, rax call mysql_free_result lea rsi, aDropTableT1T2; "drop table t1, t2" mov rdi, rbx call mysql_query test eax, eax jz short loc_16A3D mov r14d, eax mov rdi, rbx call mysql_error mov r15, rax mov rdi, rbx call mysql_errno lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, r14d mov rdx, r15 mov ecx, eax mov r9d, 214h jmp short loc_1699F loc_16A17: lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rsi, aTypeMysqlTypeD; "type != MYSQL_TYPE_DATE" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 211h xor eax, eax call diag jmp loc_169A6 loc_16A3D: xor eax, eax jmp loc_169AB
long long test_bug11718(long long a1) { int v1; // eax int v2; // r14d int v3; // r15d int v4; // eax int v5; // esi int v6; // edx int v7; // ecx int v8; // r9d int v9; // eax int v10; // r14d int v11; // r15d int v12; // eax int v13; // eax int v14; // r14d int v15; // r15d int v16; // eax int v17; // eax int v18; // r14d int v19; // r15d int v20; // eax int v21; // eax int v22; // r14d int v23; // r15d int v24; // eax int v25; // eax int v26; // r14d int v27; // r15d int v28; // eax long long v30; // rax int v31; // r8d int v32; // r9d int v33; // eax int v34; // r14d int v35; // r15d int v36; // eax v1 = mysql_query(a1, "drop table if exists t1, t2"); if ( v1 ) { v2 = v1; v3 = mysql_error(a1); v4 = mysql_errno(a1); v5 = v2; v6 = v3; v7 = v4; v8 = 516; } else { v9 = mysql_query(a1, "create table t1 (f1 int)"); if ( v9 ) { v10 = v9; v11 = mysql_error(a1); v12 = mysql_errno(a1); v5 = v10; v6 = v11; v7 = v12; v8 = 518; } else { v13 = mysql_query(a1, "create table t2 (f2 int, f3 numeric(8))"); if ( v13 ) { v14 = v13; v15 = mysql_error(a1); v16 = mysql_errno(a1); v5 = v14; v6 = v15; v7 = v16; v8 = 520; } else { v17 = mysql_query(a1, "insert into t1 values (1), (2)"); if ( v17 ) { v18 = v17; v19 = mysql_error(a1); v20 = mysql_errno(a1); v5 = v18; v6 = v19; v7 = v20; v8 = 522; } else { v21 = mysql_query(a1, "insert into t2 values (1,20050101), (2,20050202)"); if ( v21 ) { v22 = v21; v23 = mysql_error(a1); v24 = mysql_errno(a1); v5 = v22; v6 = v23; v7 = v24; v8 = 524; } else { v25 = mysql_query(a1, "select str_to_date(concat(f3),'%Y%m%d') from t1,t2 where f1=f2 order by f1"); if ( v25 ) { v26 = v25; v27 = mysql_error(a1); v28 = mysql_errno(a1); v5 = v26; v6 = v27; v7 = v28; v8 = 526; } else { v30 = mysql_store_result(a1); if ( *(_DWORD *)(*(_QWORD *)(v30 + 16) + 112LL) != 10 ) { diag( (unsigned int)"Error: %s (%s: %d)", (unsigned int)"type != MYSQL_TYPE_DATE", (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/result.c", 529, v31, v32); return 1LL; } mysql_free_result(v30); v33 = mysql_query(a1, "drop table t1, t2"); if ( !v33 ) return 0LL; v34 = v33; v35 = mysql_error(a1); v36 = mysql_errno(a1); v5 = v34; v6 = v35; v7 = v36; v8 = 532; } } } } } } diag( (unsigned int)"Error (%d): %s (%d) in %s line %d", v5, v6, v7, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/result.c", v8); return 1LL; }
test_bug11718: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI LEA RSI,[0x138b69] CALL 0x0011dee1 TEST EAX,EAX JZ 0x00116835 MOV R14D,EAX MOV RDI,RBX CALL 0x0011ff5a MOV R15,RAX MOV RDI,RBX CALL 0x0011ff45 LEA RDI,[0x13814d] LEA R8,[0x138778] MOV ESI,R14D MOV RDX,R15 MOV ECX,EAX MOV R9D,0x204 JMP 0x0011699f LAB_00116835: LEA RSI,[0x138b85] MOV RDI,RBX CALL 0x0011dee1 TEST EAX,EAX JZ 0x0011687f MOV R14D,EAX MOV RDI,RBX CALL 0x0011ff5a MOV R15,RAX MOV RDI,RBX CALL 0x0011ff45 LEA RDI,[0x13814d] LEA R8,[0x138778] MOV ESI,R14D MOV RDX,R15 MOV ECX,EAX MOV R9D,0x206 JMP 0x0011699f LAB_0011687f: LEA RSI,[0x138b9e] MOV RDI,RBX CALL 0x0011dee1 TEST EAX,EAX JZ 0x001168c9 MOV R14D,EAX MOV RDI,RBX CALL 0x0011ff5a MOV R15,RAX MOV RDI,RBX CALL 0x0011ff45 LEA RDI,[0x13814d] LEA R8,[0x138778] MOV ESI,R14D MOV RDX,R15 MOV ECX,EAX MOV R9D,0x208 JMP 0x0011699f LAB_001168c9: LEA RSI,[0x138bc6] MOV RDI,RBX CALL 0x0011dee1 TEST EAX,EAX JZ 0x00116913 MOV R14D,EAX MOV RDI,RBX CALL 0x0011ff5a MOV R15,RAX MOV RDI,RBX CALL 0x0011ff45 LEA RDI,[0x13814d] LEA R8,[0x138778] MOV ESI,R14D MOV RDX,R15 MOV ECX,EAX MOV R9D,0x20a JMP 0x0011699f LAB_00116913: LEA RSI,[0x138be5] MOV RDI,RBX CALL 0x0011dee1 TEST EAX,EAX JZ 0x0011695a MOV R14D,EAX MOV RDI,RBX CALL 0x0011ff5a MOV R15,RAX MOV RDI,RBX CALL 0x0011ff45 LEA RDI,[0x13814d] LEA R8,[0x138778] MOV ESI,R14D MOV RDX,R15 MOV ECX,EAX MOV R9D,0x20c JMP 0x0011699f LAB_0011695a: LEA RSI,[0x138b1e] MOV RDI,RBX CALL 0x0011dee1 TEST EAX,EAX JZ 0x001169b6 MOV R14D,EAX MOV RDI,RBX CALL 0x0011ff5a MOV R15,RAX MOV RDI,RBX CALL 0x0011ff45 LEA RDI,[0x13814d] LEA R8,[0x138778] MOV ESI,R14D MOV RDX,R15 MOV ECX,EAX MOV R9D,0x20e LAB_0011699f: XOR EAX,EAX CALL 0x001187d7 LAB_001169a6: MOV EAX,0x1 LAB_001169ab: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_001169b6: MOV RDI,RBX CALL 0x0011edd9 MOV RCX,qword ptr [RAX + 0x10] CMP dword ptr [RCX + 0x70],0xa JNZ 0x00116a17 MOV RDI,RAX CALL 0x00119b8e LEA RSI,[0x138c2e] MOV RDI,RBX CALL 0x0011dee1 TEST EAX,EAX JZ 0x00116a3d MOV R14D,EAX MOV RDI,RBX CALL 0x0011ff5a MOV R15,RAX MOV RDI,RBX CALL 0x0011ff45 LEA RDI,[0x13814d] LEA R8,[0x138778] MOV ESI,R14D MOV RDX,R15 MOV ECX,EAX MOV R9D,0x214 JMP 0x0011699f LAB_00116a17: LEA RDI,[0x138008] LEA RSI,[0x138c16] LEA RDX,[0x138778] MOV ECX,0x211 XOR EAX,EAX CALL 0x001187d7 JMP 0x001169a6 LAB_00116a3d: XOR EAX,EAX JMP 0x001169ab
int8 test_bug11718(int8 param_1) { int iVar1; int4 uVar2; int8 uVar3; long lVar4; int8 uVar5; iVar1 = mysql_query(param_1,"drop table if exists t1, t2"); if (iVar1 == 0) { iVar1 = mysql_query(param_1,"create table t1 (f1 int)"); if (iVar1 == 0) { iVar1 = mysql_query(param_1,"create table t2 (f2 int, f3 numeric(8))"); if (iVar1 == 0) { iVar1 = mysql_query(param_1,"insert into t1 values (1), (2)"); if (iVar1 == 0) { iVar1 = mysql_query(param_1,"insert into t2 values (1,20050101), (2,20050202)"); if (iVar1 == 0) { iVar1 = mysql_query(param_1, "select str_to_date(concat(f3),\'%Y%m%d\') from t1,t2 where f1=f2 order by f1" ); if (iVar1 == 0) { lVar4 = mysql_store_result(param_1); if (*(int *)(*(long *)(lVar4 + 0x10) + 0x70) != 10) { diag("Error: %s (%s: %d)","type != MYSQL_TYPE_DATE", "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/result.c" ,0x211); return 1; } mysql_free_result(lVar4); iVar1 = mysql_query(param_1,"drop table t1, t2"); if (iVar1 == 0) { return 0; } uVar3 = mysql_error(param_1); uVar2 = mysql_errno(param_1); uVar5 = 0x214; } else { uVar3 = mysql_error(param_1); uVar2 = mysql_errno(param_1); uVar5 = 0x20e; } } else { uVar3 = mysql_error(param_1); uVar2 = mysql_errno(param_1); uVar5 = 0x20c; } } else { uVar3 = mysql_error(param_1); uVar2 = mysql_errno(param_1); uVar5 = 0x20a; } } else { uVar3 = mysql_error(param_1); uVar2 = mysql_errno(param_1); uVar5 = 0x208; } } else { uVar3 = mysql_error(param_1); uVar2 = mysql_errno(param_1); uVar5 = 0x206; } } else { uVar3 = mysql_error(param_1); uVar2 = mysql_errno(param_1); uVar5 = 0x204; } diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/result.c",uVar5); return 1; }
20,412
test_fetch_long
eloqsql/libmariadb/unittest/libmariadb/fetch.c
static int test_fetch_long(MYSQL *mysql) { int rc; rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_bind_fetch"); check_mysql_rc(rc, mysql); rc= mysql_query(mysql, "CREATE TABLE test_bind_fetch(c1 int unsigned, \ c2 int unsigned, \ c3 int, \ c4 int, \ c5 int, \ c6 int unsigned, \ c7 int)"); check_mysql_rc(rc, mysql); rc= bind_fetch(mysql, 4); mysql_query(mysql, "DROP TABLE IF EXISTS test_bind_fetch"); return rc; }
O3
c
test_fetch_long: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0x213e5(%rip), %rsi # 0x38353 callq 0x1d541 testl %eax, %eax je 0x16fab movl %eax, %r14d movq %rbx, %rdi callq 0x1f5ba movq %rax, %r15 movq %rbx, %rdi callq 0x1f5a5 leaq 0x202c1(%rip), %rdi # 0x37255 leaq 0x208bc(%rip), %r8 # 0x37857 movl %r14d, %esi movq %r15, %rdx movl %eax, %ecx movl $0x322, %r9d # imm = 0x322 jmp 0x16ff0 leaq 0x216bd(%rip), %rsi # 0x3866f movq %rbx, %rdi callq 0x1d541 testl %eax, %eax je 0x17007 movl %eax, %r14d movq %rbx, %rdi callq 0x1f5ba movq %rax, %r15 movq %rbx, %rdi callq 0x1f5a5 leaq 0x2027a(%rip), %rdi # 0x37255 leaq 0x20875(%rip), %r8 # 0x37857 movl %r14d, %esi movq %r15, %rdx movl %eax, %ecx movl $0x32a, %r9d # imm = 0x32A xorl %eax, %eax callq 0x17e37 movl $0x1, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rbx, %rdi movl $0x4, %esi callq 0x17515 movl %eax, %r14d leaq 0x21335(%rip), %rsi # 0x38353 movq %rbx, %rdi callq 0x1d541 movl %r14d, %eax jmp 0x16ffc
test_fetch_long: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdi lea rsi, aDropTableIfExi_3; "DROP TABLE IF EXISTS test_bind_fetch" call mysql_query test eax, eax jz short loc_16FAB mov r14d, eax mov rdi, rbx call mysql_error mov r15, rax mov rdi, rbx call mysql_errno lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, r14d mov rdx, r15 mov ecx, eax mov r9d, 322h jmp short loc_16FF0 loc_16FAB: lea rsi, aCreateTableTes_2; "CREATE TABLE test_bind_fetch(c1 int uns"... mov rdi, rbx call mysql_query test eax, eax jz short loc_17007 mov r14d, eax mov rdi, rbx call mysql_error mov r15, rax mov rdi, rbx call mysql_errno lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, r14d mov rdx, r15 mov ecx, eax mov r9d, 32Ah loc_16FF0: xor eax, eax call diag mov eax, 1 loc_16FFC: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_17007: mov rdi, rbx mov esi, 4 call bind_fetch mov r14d, eax lea rsi, aDropTableIfExi_3; "DROP TABLE IF EXISTS test_bind_fetch" mov rdi, rbx call mysql_query mov eax, r14d jmp short loc_16FFC
long long test_fetch_long(long long a1) { int v1; // eax int v2; // r14d int v3; // r15d int v4; // eax int v5; // esi int v6; // edx int v7; // ecx int v8; // r9d int v9; // eax int v10; // r14d int v11; // r15d int v12; // eax unsigned int v14; // r14d v1 = mysql_query(a1, "DROP TABLE IF EXISTS test_bind_fetch"); if ( v1 ) { v2 = v1; v3 = mysql_error(a1); v4 = mysql_errno(a1); v5 = v2; v6 = v3; v7 = v4; v8 = 802; } else { v9 = mysql_query( a1, "CREATE TABLE test_bind_fetch(c1 int unsigned, c2 int uns" "igned, c3 int, " " c4 int, c5 int, " " c6 int unsigned, c7 int)"); if ( !v9 ) { v14 = bind_fetch(a1, 4LL); mysql_query(a1, "DROP TABLE IF EXISTS test_bind_fetch"); return v14; } v10 = v9; v11 = mysql_error(a1); v12 = mysql_errno(a1); v5 = v10; v6 = v11; v7 = v12; v8 = 810; } diag( (unsigned int)"Error (%d): %s (%d) in %s line %d", v5, v6, v7, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/fetch.c", v8); return 1LL; }
test_fetch_long: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI LEA RSI,[0x138353] CALL 0x0011d541 TEST EAX,EAX JZ 0x00116fab MOV R14D,EAX MOV RDI,RBX CALL 0x0011f5ba MOV R15,RAX MOV RDI,RBX CALL 0x0011f5a5 LEA RDI,[0x137255] LEA R8,[0x137857] MOV ESI,R14D MOV RDX,R15 MOV ECX,EAX MOV R9D,0x322 JMP 0x00116ff0 LAB_00116fab: LEA RSI,[0x13866f] MOV RDI,RBX CALL 0x0011d541 TEST EAX,EAX JZ 0x00117007 MOV R14D,EAX MOV RDI,RBX CALL 0x0011f5ba MOV R15,RAX MOV RDI,RBX CALL 0x0011f5a5 LEA RDI,[0x137255] LEA R8,[0x137857] MOV ESI,R14D MOV RDX,R15 MOV ECX,EAX MOV R9D,0x32a LAB_00116ff0: XOR EAX,EAX CALL 0x00117e37 MOV EAX,0x1 LAB_00116ffc: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_00117007: MOV RDI,RBX MOV ESI,0x4 CALL 0x00117515 MOV R14D,EAX LEA RSI,[0x138353] MOV RDI,RBX CALL 0x0011d541 MOV EAX,R14D JMP 0x00116ffc
int4 test_fetch_long(int8 param_1) { int iVar1; int4 uVar2; int8 uVar3; int8 uVar4; iVar1 = mysql_query(param_1,"DROP TABLE IF EXISTS test_bind_fetch"); if (iVar1 == 0) { iVar1 = mysql_query(param_1, "CREATE TABLE test_bind_fetch(c1 int unsigned, c2 int unsigned, c3 int, c4 int, c5 int, c6 int unsigned, c7 int)" ); if (iVar1 == 0) { uVar2 = bind_fetch(param_1,4); mysql_query(param_1,"DROP TABLE IF EXISTS test_bind_fetch"); return uVar2; } uVar3 = mysql_error(param_1); uVar2 = mysql_errno(param_1); uVar4 = 0x32a; } else { uVar3 = mysql_error(param_1); uVar2 = mysql_errno(param_1); uVar4 = 0x322; } diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/fetch.c",uVar4); return 1; }
20,413
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::parse<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool, bool)
llama.cpp/common/json.hpp
JSON_HEDLEY_WARN_UNUSED_RESULT static basic_json parse(InputType&& i, const parser_callback_t cb = nullptr, const bool allow_exceptions = true, const bool ignore_comments = false) { basic_json result; parser(detail::input_adapter(std::forward<InputType>(i)), cb, allow_exceptions, ignore_comments).parse(true, result); return result; }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::parse<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xe8, %rsp movl %r8d, %ebp movl %ecx, %r14d movq %rdx, %r13 movq %rsi, %r12 movq %rdi, %rbx movb $0x0, (%rdi) movq $0x0, 0x8(%rdi) movl $0x1, %esi callq 0x84452 movq %rbx, %rdi movl $0x1, %esi callq 0x84452 movq (%r12), %r15 movq 0x8(%r12), %r12 movq %rsp, %rdi movq %r13, %rsi callq 0x83df4 addq %r15, %r12 movzbl %r14b, %r8d movzbl %bpl, %r9d leaq 0x20(%rsp), %rdi movq %rsp, %rcx movq %r15, %rsi movq %r12, %rdx callq 0x83d48 leaq 0x20(%rsp), %rdi movl $0x1, %esi movq %rbx, %rdx callq 0x83e52 leaq 0x48(%rsp), %r14 movq %r14, %rdi callq 0x8469a movq -0x18(%r14), %rax testq %rax, %rax je 0xb5e8d leaq 0x20(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x10(%rsp), %rax testq %rax, %rax je 0xb5ea4 movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq %rbx, %rax addq $0xe8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0xb5ee8 jmp 0xb5ee8 movq %rax, %r14 leaq 0x20(%rsp), %rdi callq 0x84424 jmp 0xb5ecf movq %rax, %r14 movq 0x10(%rsp), %rax testq %rax, %rax je 0xb5ef3 movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax jmp 0xb5ef3 movq %rax, %rdi callq 0x27dc5 movq %rax, %r14 movq %rbx, %rdi xorl %esi, %esi callq 0x84452 movq %rbx, %rdi callq 0x88b6c movq %r14, %rdi callq 0x20ad0 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5parseIS9_EESD_OT_St8functionIFbiNS0_6detail13parse_event_tERSD_EEbb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0E8h mov ebp, r8d mov r14d, ecx mov r13, rdx mov r12, rsi mov rbx, rdi mov byte ptr [rdi], 0 mov qword ptr [rdi+8], 0 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) mov r15, [r12] mov r12, [r12+8] mov rdi, rsp mov rsi, r13 call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEC2ERKSJ_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::function(std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)> const&) add r12, r15 movzx r8d, r14b movzx r9d, bpl lea rdi, [rsp+118h+var_F8] mov rcx, rsp mov rsi, r15 mov rdx, r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6parserINS0_6detail22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcS9_EEEEEENSF_6parserISD_T_EESO_St8functionIFbiNSF_13parse_event_tERSD_EEbb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)>,bool,bool) lea rdi, [rsp+118h+var_F8]; int mov esi, 1 mov rdx, rbx call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5parseEbRSF_; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parse(bool,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&) lea r14, [rsp+118h+var_D0] mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~lexer() mov rax, [r14-18h] test rax, rax jz short loc_B5E8D lea rdi, [rsp+118h+var_F8] mov rsi, rdi mov edx, 3 call rax loc_B5E8D: mov rax, [rsp+118h+var_108] test rax, rax jz short loc_B5EA4 mov rdi, rsp mov rsi, rdi mov edx, 3 call rax loc_B5EA4: mov rax, rbx add rsp, 0E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_B5EE8 jmp short loc_B5EE8 mov r14, rax lea rdi, [rsp+118h+var_F8] call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~parser() jmp short loc_B5ECF mov r14, rax loc_B5ECF: mov rax, [rsp+118h+var_108] test rax, rax jz short loc_B5EF3 mov rdi, rsp mov rsi, rdi mov edx, 3 call rax jmp short loc_B5EF3 loc_B5EE8: mov rdi, rax call __clang_call_terminate mov r14, rax loc_B5EF3: mov rdi, rbx xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::parse<std::string>( long long a1, long long *a2, long long a3, unsigned __int8 a4, unsigned __int8 a5) { long long v8; // r15 long long v9; // r12 __int128 v11; // [rsp+0h] [rbp-118h] BYREF void ( *v12)(__int128 *, __int128 *, long long); // [rsp+10h] [rbp-108h] int v13[4]; // [rsp+20h] [rbp-F8h] BYREF void ( *v14)(int *, int *, long long); // [rsp+30h] [rbp-E8h] _QWORD v15[26]; // [rsp+48h] [rbp-D0h] BYREF *(_BYTE *)a1 = 0; *(_QWORD *)(a1 + 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 *)a1); 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 *)a1); v8 = *a2; v9 = a2[1]; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::function( &v11, a3); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>( (long long)v13, v8, v8 + v9, &v11, a4, a5); nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parse( (long long)v13, 1, (_BYTE *)a1); nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~lexer(v15); if ( v14 ) v14(v13, v13, 3LL); if ( v12 ) v12(&v11, &v11, 3LL); return a1; }
parse<std::__cxx11::string>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xe8 MOV EBP,R8D MOV R14D,ECX MOV R13,RDX MOV R12,RSI MOV RBX,RDI MOV byte ptr [RDI],0x0 MOV qword ptr [RDI + 0x8],0x0 MOV ESI,0x1 CALL 0x00184452 MOV RDI,RBX MOV ESI,0x1 CALL 0x00184452 MOV R15,qword ptr [R12] MOV R12,qword ptr [R12 + 0x8] LAB_001b5e2d: MOV RDI,RSP MOV RSI,R13 CALL 0x00183df4 ADD R12,R15 LAB_001b5e3b: MOVZX R8D,R14B MOVZX R9D,BPL LEA RDI,[RSP + 0x20] MOV RCX,RSP MOV RSI,R15 MOV RDX,R12 CALL 0x00183d48 LAB_001b5e56: LEA RDI,[RSP + 0x20] MOV ESI,0x1 MOV RDX,RBX CALL 0x00183e52 LEA R14,[RSP + 0x48] MOV RDI,R14 CALL 0x0018469a MOV RAX,qword ptr [R14 + -0x18] TEST RAX,RAX JZ 0x001b5e8d LAB_001b5e7e: LEA RDI,[RSP + 0x20] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001b5e8d: MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX JZ 0x001b5ea4 LAB_001b5e97: MOV RDI,RSP MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001b5ea4: MOV RAX,RBX ADD RSP,0xe8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::parse<std::__cxx11::string >(std::__cxx11::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::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&)>, bool, bool) */ basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> * __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::parse<std::__cxx11::string> (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,long *param_1,function *param_3,int1 param_4,int1 param_5) { long lVar1; long lVar2; function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)> afStack_118 [16]; code *local_108; parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> local_f8 [16]; code *local_e8; lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> local_d0 [160]; *this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0; *(int8 *)(this + 8) = 0; assert_invariant(SUB81(this,0)); assert_invariant(SUB81(this,0)); lVar1 = *param_1; lVar2 = param_1[1]; /* try { // try from 001b5e2d to 001b5e37 has its CatchHandler @ 001b5ef0 */ std:: function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)> ::function(afStack_118,param_3); /* try { // try from 001b5e3b to 001b5e55 has its CatchHandler @ 001b5ecc */ parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> (local_f8,lVar1,lVar2 + lVar1,afStack_118,param_4,param_5); /* try { // try from 001b5e56 to 001b5e67 has its CatchHandler @ 001b5ebd */ detail:: parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::parse(local_f8,true,(basic_json *)this); detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::~lexer(local_d0); if (local_e8 != (code *)0x0) { /* try { // try from 001b5e7e to 001b5e8c has its CatchHandler @ 001b5ebb */ (*local_e8)(local_f8,local_f8,3); } if (local_108 != (code *)0x0) { /* try { // try from 001b5e97 to 001b5ea3 has its CatchHandler @ 001b5eb9 */ (*local_108)(afStack_118,afStack_118,3); } return this; }
20,414
ftxui::ComponentBase::DetachAllChildren()
Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/component/component.cpp
void ComponentBase::DetachAllChildren() { while (!children_.empty()) { children_[0]->Detach(); } }
O2
cpp
ftxui::ComponentBase::DetachAllChildren(): pushq %rbx movq %rdi, %rbx movq 0x8(%rbx), %rax cmpq 0x10(%rbx), %rax je 0x21a80 movq (%rax), %rdi callq 0x21b16 jmp 0x21a6c popq %rbx retq
_ZN5ftxui13ComponentBase17DetachAllChildrenEv: push rbx mov rbx, rdi loc_21A6C: mov rax, [rbx+8] cmp rax, [rbx+10h] jz short loc_21A80 mov rdi, [rax]; this call _ZN5ftxui13ComponentBase6DetachEv; ftxui::ComponentBase::Detach(void) jmp short loc_21A6C loc_21A80: pop rbx retn
ftxui::ComponentBase ** ftxui::ComponentBase::DetachAllChildren(ftxui::ComponentBase *this) { ftxui::ComponentBase **result; // rax while ( 1 ) { result = (ftxui::ComponentBase **)*((_QWORD *)this + 1); if ( result == *((ftxui::ComponentBase ***)this + 2) ) break; ftxui::ComponentBase::Detach(*result); } return result; }
DetachAllChildren: PUSH RBX MOV RBX,RDI LAB_00121a6c: MOV RAX,qword ptr [RBX + 0x8] CMP RAX,qword ptr [RBX + 0x10] JZ 0x00121a80 MOV RDI,qword ptr [RAX] CALL 0x00121b16 JMP 0x00121a6c LAB_00121a80: POP RBX RET
/* ftxui::ComponentBase::DetachAllChildren() */ void __thiscall ftxui::ComponentBase::DetachAllChildren(ComponentBase *this) { while (*(int8 **)(this + 8) != *(int8 **)(this + 0x10)) { Detach((ComponentBase *)**(int8 **)(this + 8)); } return; }
20,415
LefDefParser::lefiLayer::propIsString(int) const
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiLayer.cpp
int lefiLayer::propIsString(int i) const { char msg[160]; if (i < 0 || i >= numProps_) { sprintf(msg, "ERROR (LEFPARS-1300): The index number %d given for the layer property is invalid.\nValid index is from 0 to %d", i, numProps_); lefiError(0, 1300, msg); return 0; } return dvalues_[i] ? 0 : 1; }
O0
cpp
LefDefParser::lefiLayer::propIsString(int) const: subq $0xc8, %rsp movq %rdi, 0xb8(%rsp) movl %esi, 0xb4(%rsp) movq 0xb8(%rsp), %rax movq %rax, 0x8(%rsp) cmpl $0x0, 0xb4(%rsp) jl 0x25191 movq 0x8(%rsp), %rcx movl 0xb4(%rsp), %eax cmpl 0x350(%rcx), %eax jl 0x251d4 movq 0x8(%rsp), %rax leaq 0x10(%rsp), %rdi movl 0xb4(%rsp), %edx movl 0x350(%rax), %ecx leaq 0x52d18(%rip), %rsi # 0x77ec7 movb $0x0, %al callq 0x2050 leaq 0x10(%rsp), %rdx xorl %edi, %edi movl $0x514, %esi # imm = 0x514 callq 0x3f4e0 movl $0x0, 0xc4(%rsp) jmp 0x2520f movq 0x8(%rsp), %rax movq 0x368(%rax), %rax movslq 0xb4(%rsp), %rcx movsd (%rax,%rcx,8), %xmm0 xorps %xmm1, %xmm1 movl $0x1, %eax xorl %ecx, %ecx ucomisd %xmm1, %xmm0 setp %sil setne %dl orb %sil, %dl cmovnel %ecx, %eax movl %eax, 0xc4(%rsp) movl 0xc4(%rsp), %eax addq $0xc8, %rsp retq nop
_ZNK12LefDefParser9lefiLayer12propIsStringEi: sub rsp, 0C8h mov [rsp+0C8h+var_10], rdi mov [rsp+0C8h+var_14], esi mov rax, [rsp+0C8h+var_10] mov [rsp+0C8h+var_C0], rax cmp [rsp+0C8h+var_14], 0 jl short loc_25191 mov rcx, [rsp+0C8h+var_C0] mov eax, [rsp+0C8h+var_14] cmp eax, [rcx+350h] jl short loc_251D4 loc_25191: mov rax, [rsp+0C8h+var_C0] lea rdi, [rsp+0C8h+var_B8] mov edx, [rsp+0C8h+var_14] mov ecx, [rax+350h] lea rsi, aErrorLefpars13_17; "ERROR (LEFPARS-1300): The index number "... mov al, 0 call _sprintf lea rdx, [rsp+0C8h+var_B8]; int xor edi, edi; this mov esi, 514h; int call _ZN12LefDefParser9lefiErrorEiiPKc; LefDefParser::lefiError(int,int,char const*) mov [rsp+0C8h+var_4], 0 jmp short loc_2520F loc_251D4: mov rax, [rsp+0C8h+var_C0] mov rax, [rax+368h] movsxd rcx, [rsp+0C8h+var_14] movsd xmm0, qword ptr [rax+rcx*8] xorps xmm1, xmm1 mov eax, 1 xor ecx, ecx ucomisd xmm0, xmm1 setp sil setnz dl or dl, sil cmovnz eax, ecx mov [rsp+0C8h+var_4], eax loc_2520F: mov eax, [rsp+0C8h+var_4] add rsp, 0C8h retn
_BOOL8 LefDefParser::lefiLayer::propIsString(LefDefParser::lefiLayer *this, int a2) { const char *v2; // rcx int v4[41]; // [rsp+10h] [rbp-B8h] BYREF int v5; // [rsp+B4h] [rbp-14h] LefDefParser::lefiLayer *v6; // [rsp+B8h] [rbp-10h] v6 = this; v5 = a2; if ( a2 >= 0 && v5 < *((_DWORD *)this + 212) ) { return *(double *)(*((_QWORD *)this + 109) + 8LL * v5) == 0.0; } else { sprintf( v4, "ERROR (LEFPARS-1300): The index number %d given for the layer property is invalid.\nValid index is from 0 to %d", v5, *((_DWORD *)this + 212)); LefDefParser::lefiError(0LL, 1300, (int)v4, v2); return 0; } }
propIsString: SUB RSP,0xc8 MOV qword ptr [RSP + 0xb8],RDI MOV dword ptr [RSP + 0xb4],ESI MOV RAX,qword ptr [RSP + 0xb8] MOV qword ptr [RSP + 0x8],RAX CMP dword ptr [RSP + 0xb4],0x0 JL 0x00125191 MOV RCX,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RSP + 0xb4] CMP EAX,dword ptr [RCX + 0x350] JL 0x001251d4 LAB_00125191: MOV RAX,qword ptr [RSP + 0x8] LEA RDI,[RSP + 0x10] MOV EDX,dword ptr [RSP + 0xb4] MOV ECX,dword ptr [RAX + 0x350] LEA RSI,[0x177ec7] MOV AL,0x0 CALL 0x00102050 LEA RDX,[RSP + 0x10] XOR EDI,EDI MOV ESI,0x514 CALL 0x0013f4e0 MOV dword ptr [RSP + 0xc4],0x0 JMP 0x0012520f LAB_001251d4: MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x368] MOVSXD RCX,dword ptr [RSP + 0xb4] MOVSD XMM0,qword ptr [RAX + RCX*0x8] XORPS XMM1,XMM1 MOV EAX,0x1 XOR ECX,ECX UCOMISD XMM0,XMM1 SETP SIL SETNZ DL OR DL,SIL CMOVNZ EAX,ECX MOV dword ptr [RSP + 0xc4],EAX LAB_0012520f: MOV EAX,dword ptr [RSP + 0xc4] ADD RSP,0xc8 RET
/* LefDefParser::lefiLayer::propIsString(int) const */ bool __thiscall LefDefParser::lefiLayer::propIsString(lefiLayer *this,int param_1) { bool bVar1; char local_b8 [164]; int local_14; lefiLayer *local_10; if ((param_1 < 0) || (*(int *)(this + 0x350) <= param_1)) { local_14 = param_1; local_10 = this; sprintf(local_b8, "ERROR (LEFPARS-1300): The index number %d given for the layer property is invalid.\nValid index is from 0 to %d" ,(ulong)(uint)param_1,(ulong)*(uint *)(this + 0x350)); lefiError(0,0x514,local_b8); bVar1 = false; } else { bVar1 = *(double *)(*(long *)(this + 0x368) + (long)param_1 * 8) == 0.0; } return bVar1; }
20,416
my_b_write
eloqsql/include/my_sys.h
static inline int my_b_write(IO_CACHE *info, const uchar *Buffer, size_t Count) { MEM_CHECK_DEFINED(Buffer, Count); if (info->write_pos + Count <= info->write_end) { if (Count) { memcpy(info->write_pos, Buffer, Count); info->write_pos+= Count; } return 0; } return _my_b_write(info, Buffer, Count); }
O0
c
my_b_write: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x40(%rax), %rax addq -0x20(%rbp), %rax movq -0x10(%rbp), %rcx cmpq 0x48(%rcx), %rax ja 0x488ff cmpq $0x0, -0x20(%rbp) je 0x488f6 movq -0x10(%rbp), %rax movq 0x40(%rax), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x29090 movq -0x20(%rbp), %rcx movq -0x10(%rbp), %rax addq 0x40(%rax), %rcx movq %rcx, 0x40(%rax) movl $0x0, -0x4(%rbp) jmp 0x48913 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0xe8a30 movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopl (%rax)
my_b_write: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_10] mov rax, [rax+40h] add rax, [rbp+var_20] mov rcx, [rbp+var_10] cmp rax, [rcx+48h] ja short loc_488FF cmp [rbp+var_20], 0 jz short loc_488F6 mov rax, [rbp+var_10] mov rdi, [rax+40h] 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+40h] mov [rax+40h], rcx loc_488F6: mov [rbp+var_4], 0 jmp short loc_48913 loc_488FF: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call _my_b_write mov [rbp+var_4], eax loc_48913: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long my_b_write(long long a1, long long a2, long long a3) { if ( (unsigned long long)(a3 + *(_QWORD *)(a1 + 64)) > *(_QWORD *)(a1 + 72) ) { return (unsigned int)my_b_write(a1, a2, a3); } else { if ( a3 ) { memcpy(*(_QWORD *)(a1 + 64), a2, a3); *(_QWORD *)(a1 + 64) += a3; } return 0; } }
my_b_write: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] ADD RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x48] JA 0x001488ff CMP qword ptr [RBP + -0x20],0x0 JZ 0x001488f6 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x40] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x00129090 MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] ADD RCX,qword ptr [RAX + 0x40] MOV qword ptr [RAX + 0x40],RCX LAB_001488f6: MOV dword ptr [RBP + -0x4],0x0 JMP 0x00148913 LAB_001488ff: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x001e8a30 MOV dword ptr [RBP + -0x4],EAX LAB_00148913: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 my_b_write(long param_1,void *param_2,size_t param_3) { int4 local_c; if (*(ulong *)(param_1 + 0x48) < *(long *)(param_1 + 0x40) + param_3) { local_c = _my_b_write(param_1,param_2,param_3); } else { if (param_3 != 0) { memcpy(*(void **)(param_1 + 0x40),param_2,param_3); *(size_t *)(param_1 + 0x40) = param_3 + *(long *)(param_1 + 0x40); } local_c = 0; } return local_c; }
20,417
_gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> 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>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> 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>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> 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>>>>> nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> 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>>>>::find<char const (&) [13], 0>(char const (&) [13])
monkey531[P]llama/common/json.hpp
iterator find(KeyType && key) // NOLINT(cppcoreguidelines-missing-std-forward) { for (auto it = this->begin(); it != this->end(); ++it) { if (m_compare(it->first, key)) { return it; } } return Container::end(); }
O0
cpp
_gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> 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>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> 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>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> 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>>>>> nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> 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>>>>::find<char const (&) [13], 0>(char const (&) [13]): subq $0x38, %rsp movq %rdi, 0x28(%rsp) movq %rsi, 0x20(%rsp) movq 0x28(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0xbd2b0 movq %rax, 0x30(%rsp) movq 0x10(%rsp), %rdi callq 0xbd2e0 movq %rax, 0x18(%rsp) leaq 0x30(%rsp), %rdi leaq 0x18(%rsp), %rsi callq 0xbd310 testb $0x1, %al jne 0x1c37a6 jmp 0x1c37e6 movq 0x10(%rsp), %rax addq $0x18, %rax movq %rax, 0x8(%rsp) leaq 0x30(%rsp), %rdi callq 0xbe480 movq 0x8(%rsp), %rdi movq %rax, %rsi movq 0x20(%rsp), %rdx callq 0x1c3800 testb $0x1, %al jne 0x1c37d6 jmp 0x1c37d8 jmp 0x1c37f5 jmp 0x1c37da leaq 0x30(%rsp), %rdi callq 0xbd390 jmp 0x1c3782 movq 0x10(%rsp), %rdi callq 0xbd2e0 movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rax addq $0x38, %rsp retq nop
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA17_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_: sub rsp, 38h mov [rsp+38h+var_10], rdi mov [rsp+38h+var_18], rsi mov rdi, [rsp+38h+var_10] mov [rsp+38h+var_28], rdi call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE5beginEv; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::begin(void) mov [rsp+38h+var_8], rax loc_1C3782: mov rdi, [rsp+38h+var_28] call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE3endEv; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::end(void) mov [rsp+38h+var_20], rax lea rdi, [rsp+38h+var_8] lea rsi, [rsp+38h+var_20] call _ZN9__gnu_cxxneIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEEbRKNS_17__normal_iteratorIT_T0_EESR_; __gnu_cxx::operator!=<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>(__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&,__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&) test al, 1 jnz short loc_1C37A6 jmp short loc_1C37E6 loc_1C37A6: mov rax, [rsp+38h+var_28] add rax, 18h mov [rsp+38h+var_30], rax lea rdi, [rsp+38h+var_8] call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEptEv; __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator->(void) mov rdi, [rsp+38h+var_30] mov rsi, rax mov rdx, [rsp+38h+var_18] call _ZNKSt8equal_toIvEclIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA17_KcEEDTeqclsr3stdE7forwardIT_Efp_Eclsr3stdE7forwardIT0_Efp0_EEOSD_OSE_ test al, 1 jnz short loc_1C37D6 jmp short loc_1C37D8 loc_1C37D6: jmp short loc_1C37F5 loc_1C37D8: jmp short $+2 loc_1C37DA: lea rdi, [rsp+38h+var_8] call _ZN9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEppEv; __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator++(void) jmp short loc_1C3782 loc_1C37E6: mov rdi, [rsp+38h+var_28] call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE3endEv; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::end(void) mov [rsp+38h+var_8], rax loc_1C37F5: mov rax, [rsp+38h+var_8] add rsp, 38h retn
long long ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA17_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_( long long a1, long long a2) { long long v2; // rax long long v4; // [rsp+18h] [rbp-20h] BYREF long long v5; // [rsp+20h] [rbp-18h] long long v6; // [rsp+28h] [rbp-10h] long long i; // [rsp+30h] [rbp-8h] BYREF v6 = a1; v5 = a2; for ( i = std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::begin(a1); ; __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator++(&i) ) { v4 = std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::end(a1); if ( !__gnu_cxx::operator!=<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>( (long long)&i, (long long)&v4) ) break; v2 = __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator->((long long)&i); if ( (std::equal_to<void>::operator()<std::string const&,char const(&)[17]>(a1 + 24, v2, v5) & 1) != 0 ) return i; } return std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::end(a1); }
20,418
_gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> 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>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> 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>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> 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>>>>> nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> 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>>>>::find<char const (&) [13], 0>(char const (&) [13])
monkey531[P]llama/common/json.hpp
iterator find(KeyType && key) // NOLINT(cppcoreguidelines-missing-std-forward) { for (auto it = this->begin(); it != this->end(); ++it) { if (m_compare(it->first, key)) { return it; } } return Container::end(); }
O2
cpp
_gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> 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>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> 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>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> 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>>>>> nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> 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>>>>::find<char const (&) [13], 0>(char const (&) [13]): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r15 movq (%rdi), %r14 movq 0x8(%r15), %rax cmpq %rax, %r14 je 0x8155d movq %r14, %rdi movq %rbx, %rsi callq 0x2aa4b testb %al, %al jne 0x8155a addq $0x30, %r14 jmp 0x8153c movq %r14, %rax popq %rbx popq %r14 popq %r15 retq nop
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA11_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_: push r15 push r14 push rbx mov rbx, rsi mov r15, rdi mov r14, [rdi] loc_8153C: mov rax, [r15+8] cmp r14, rax jz short loc_8155D mov rdi, r14 mov rsi, rbx call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jnz short loc_8155A add r14, 30h ; '0' jmp short loc_8153C loc_8155A: mov rax, r14 loc_8155D: pop rbx pop r14 pop r15 retn
long long ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA11_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_( long long *a1) { long long i; // r14 long long result; // rax for ( i = *a1; ; i += 48LL ) { result = a1[1]; if ( i == result ) break; if ( std::operator==<char>(i) ) return i; } return result; }
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA11_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RSI MOV R15,RDI MOV R14,qword ptr [RDI] LAB_0018153c: MOV RAX,qword ptr [R15 + 0x8] CMP R14,RAX JZ 0x0018155d MOV RDI,R14 MOV RSI,RBX CALL 0x0012aa4b TEST AL,AL JNZ 0x0018155a ADD R14,0x30 JMP 0x0018153c LAB_0018155a: MOV RAX,R14 LAB_0018155d: POP RBX POP R14 POP R15 RET
string * _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA11_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_ (int8 *param_1,char *param_2) { bool bVar1; string *psVar2; string *psVar3; psVar3 = (string *)*param_1; while ((psVar2 = (string *)param_1[1], psVar3 != (string *)param_1[1] && (bVar1 = std::operator==(psVar3,param_2), psVar2 = psVar3, !bVar1))) { psVar3 = psVar3 + 0x30; } return psVar2; }
20,419
minja::Context::make(minja::Value&&, std::shared_ptr<minja::Context> const&)
monkey531[P]llama/common/minja.hpp
inline std::shared_ptr<Context> Context::make(Value && values, const std::shared_ptr<Context> & parent) { return std::make_shared<Context>(values.is_null() ? Value::object() : std::move(values), parent); }
O1
cpp
minja::Context::make(minja::Value&&, std::shared_ptr<minja::Context> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rdx, %r14 movq %rsi, %r15 movq 0x10(%rsi), %rdx movq 0x20(%rsi), %rax movq %rax, %rcx orq %rdx, %rcx sete %cl cmpb $0x0, 0x40(%rsi) movq %rdi, %rbx sete %sil andb %cl, %sil movq 0x30(%r15), %rcx testq %rcx, %rcx sete %bpl andb %sil, %bpl cmpb $0x1, %bpl jne 0x9dd34 xorl %r12d, %r12d leaq 0x10(%rsp), %r15 movq %r12, (%r15) movl $0x30, %edi callq 0x1b8d0 movabsq $0x100000001, %rcx # imm = 0x100000001 movq %rcx, 0x8(%rax) leaq 0x8f743(%rip), %rcx # 0x12d448 addq $0x10, %rcx movq %rcx, (%rax) leaq 0x10(%rax), %rcx xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rax) movq %r12, 0x20(%rax) movq %rax, 0x8(%r15) movq %rcx, (%r15) leaq 0x20(%rsp), %rdi movq %r15, %rsi callq 0x90602 jmp 0x9ddbf leaq 0x40(%r15), %rdi xorps %xmm0, %xmm0 leaq 0x60(%rsp), %r12 movaps %xmm0, -0x40(%r12) movq %rdx, -0x30(%r12) xorl %r13d, %r13d movq %r13, -0x28(%r12) movq 0x18(%r15), %rdx movq %r13, 0x18(%r15) movq %rdx, -0x28(%r12) movq %r13, 0x10(%r15) movq %rax, -0x20(%r12) movq %r13, -0x18(%r12) movq 0x28(%r15), %rax movq %r13, 0x28(%r15) movq %rax, -0x18(%r12) movq %r13, 0x20(%r15) movq %rcx, -0x10(%r12) movq %r13, -0x8(%r12) movq 0x38(%r15), %rax movq %r13, 0x38(%r15) movq %rax, -0x8(%r12) movq %r13, 0x30(%r15) movups (%rdi), %xmm0 movaps %xmm0, (%r12) xorl %esi, %esi callq 0x5907a movb $0x0, 0x40(%r15) movq %r13, 0x48(%r15) movq %r12, %rdi movl $0x1, %esi callq 0x5907a movq $0x0, (%rbx) leaq 0x8(%rbx), %rdi leaq 0xf(%rsp), %rdx leaq 0x20(%rsp), %rcx movq %rbx, %rsi movq %r14, %r8 callq 0x9e12e movq (%rbx), %rsi movq %rbx, %rdi callq 0x9e1b0 leaq 0x60(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x5907a movq %r14, %rdi callq 0x5e7f4 movq -0x8(%r14), %rdi testq %rdi, %rdi je 0x9de0f callq 0x6e160 movq 0x48(%rsp), %rdi testq %rdi, %rdi je 0x9de1e callq 0x6e160 movq 0x38(%rsp), %rdi testq %rdi, %rdi je 0x9de2d callq 0x6e160 movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x9de63 movq 0x9114a(%rip), %rax # 0x12ef88 cmpb $0x0, (%rax) je 0x9de4e movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x9de58 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x9de63 movq (%rdi), %rax callq *0x18(%rax) testb %bpl, %bpl je 0x9de77 movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x9de77 callq 0x6e160 movq %rbx, %rax addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x87984 testb %bpl, %bpl je 0x9deaa movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x9deaa callq 0x6e160 movq %rbx, %rdi callq 0x1bfd0
_ZN5minja7Context4makeEONS_5ValueERKSt10shared_ptrIS0_E: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov r14, rdx mov r15, rsi mov rdx, [rsi+10h] mov rax, [rsi+20h] mov rcx, rax or rcx, rdx setz cl cmp byte ptr [rsi+40h], 0 mov rbx, rdi setz sil and sil, cl mov rcx, [r15+30h] test rcx, rcx setz bpl and bpl, sil cmp bpl, 1 jnz short loc_9DD34 xor r12d, r12d lea r15, [rsp+0A8h+var_98] mov [r15], r12 mov edi, 30h ; '0'; unsigned __int64 call __Znwm; operator new(ulong) mov rcx, 100000001h mov [rax+8], rcx lea rcx, _ZTVSt23_Sp_counted_ptr_inplaceIN8nlohmann16json_abi_v3_11_311ordered_mapINS1_10basic_jsonIS2_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueESt4lessISE_ESaISt4pairIKSE_SG_EEEESaISN_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<nlohmann::json_abi_v3_11_3::ordered_map<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>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<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,minja::Value>>>,std::allocator<nlohmann::json_abi_v3_11_3::ordered_map<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>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<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,minja::Value>>>>,(__gnu_cxx::_Lock_policy)2> add rcx, 10h mov [rax], rcx lea rcx, [rax+10h] xorps xmm0, xmm0 movups xmmword ptr [rax+10h], xmm0 mov [rax+20h], r12 mov [r15+8], rax mov [r15], rcx lea rdi, [rsp+0A8h+var_88] mov rsi, r15 call _ZN5minja5ValueC2ERKSt10shared_ptrIN8nlohmann16json_abi_v3_11_311ordered_mapINS3_10basic_jsonIS4_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEES0_St4lessISG_ESaISt4pairIKSG_S0_EEEEE; minja::Value::Value(std::shared_ptr<nlohmann::json_abi_v3_11_3::ordered_map<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>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<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,minja::Value>>>> const&) jmp loc_9DDBF loc_9DD34: lea rdi, [r15+40h] xorps xmm0, xmm0 lea r12, [rsp+0A8h+var_48] movaps xmmword ptr [r12-40h], xmm0 mov [r12-30h], rdx xor r13d, r13d mov [r12-28h], r13 mov rdx, [r15+18h] mov [r15+18h], r13 mov [r12-28h], rdx mov [r15+10h], r13 mov [r12-20h], rax mov [r12-18h], r13 mov rax, [r15+28h] mov [r15+28h], r13 mov [r12-18h], rax mov [r15+20h], r13 mov [r12-10h], rcx mov [r12-8], r13 mov rax, [r15+38h] mov [r15+38h], r13 mov [r12-8], rax mov [r15+30h], r13 movups xmm0, xmmword ptr [rdi] movaps xmmword ptr [r12], xmm0 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 byte ptr [r15+40h], 0 mov [r15+48h], r13 mov rdi, r12 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_9DDBF: mov qword ptr [rbx], 0 lea rdi, [rbx+8] lea rdx, [rsp+0A8h+var_99] lea rcx, [rsp+0A8h+var_88] mov rsi, rbx mov r8, r14 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN5minja7ContextESaIS5_EJNS4_5ValueERKSt10shared_ptrIS5_EEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::Context,std::allocator<minja::Context>,minja::Value,std::shared_ptr<minja::Context> const&>(minja::Context *&,std::_Sp_alloc_shared_tag<std::allocator<minja::Context>>,minja::Value,std::shared_ptr<minja::Context> const&) mov rsi, [rbx] mov rdi, rbx call _ZNSt12__shared_ptrIN5minja7ContextELN9__gnu_cxx12_Lock_policyE2EE31_M_enable_shared_from_this_withIS1_S1_EENSt9enable_ifIXsr15__has_esft_baseIT0_EE5valueEvE4typeEPT_ lea r14, [rsp+0A8h+var_48] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [r14-8] test rdi, rdi jz short loc_9DE0F call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9DE0F: mov rdi, [rsp+0A8h+var_60] test rdi, rdi jz short loc_9DE1E call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9DE1E: mov rdi, [rsp+0A8h+var_70] test rdi, rdi jz short loc_9DE2D call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9DE2D: mov rdi, [rsp+0A8h+var_80] test rdi, rdi jz short loc_9DE63 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_9DE4E mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_9DE58 loc_9DE4E: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_9DE58: cmp eax, 1 jnz short loc_9DE63 mov rax, [rdi] call qword ptr [rax+18h] loc_9DE63: test bpl, bpl jz short loc_9DE77 mov rdi, [rsp+0A8h+var_90] test rdi, rdi jz short loc_9DE77 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9DE77: mov rax, rbx add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax lea rdi, [rsp+arg_18]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() test bpl, bpl jz short loc_9DEAA mov rdi, [rsp+arg_10] test rdi, rdi jz short loc_9DEAA call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9DEAA: mov rdi, rbx call __Unwind_Resume
_QWORD * minja::Context::make(_QWORD *a1, long long a2, long long a3) { __int128 v4; // rax long long v6; // rcx bool v7; // bp long long v8; // rax volatile signed __int32 *v9; // rax volatile signed __int32 *v10; // rax long long v11; // rdi signed __int32 v12; // eax char v14; // [rsp+Fh] [rbp-99h] BYREF long long v15; // [rsp+10h] [rbp-98h] BYREF volatile signed __int32 *v16; // [rsp+18h] [rbp-90h] __int128 v17; // [rsp+20h] [rbp-88h] BYREF long long v18; // [rsp+30h] [rbp-78h] volatile signed __int32 *v19; // [rsp+38h] [rbp-70h] long long v20; // [rsp+40h] [rbp-68h] volatile signed __int32 *v21; // [rsp+48h] [rbp-60h] long long v22; // [rsp+50h] [rbp-58h] volatile signed __int32 *v23; // [rsp+58h] [rbp-50h] _OWORD v24[4]; // [rsp+60h] [rbp-48h] BYREF *((_QWORD *)&v4 + 1) = *(_QWORD *)(a2 + 16); *(_QWORD *)&v4 = *(_QWORD *)(a2 + 32); v6 = *(_QWORD *)(a2 + 48); v7 = v4 == 0 && *(_BYTE *)(a2 + 64) == 0 && v6 == 0; if ( v7 ) { v15 = 0LL; v8 = operator new(0x30uLL); *(_QWORD *)(v8 + 8) = 0x100000001LL; *(_QWORD *)v8 = &`vtable for'std::_Sp_counted_ptr_inplace<nlohmann::json_abi_v3_11_3::ordered_map<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>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<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,minja::Value>>>,std::allocator<nlohmann::json_abi_v3_11_3::ordered_map<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>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<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,minja::Value>>>>,(__gnu_cxx::_Lock_policy)2> + 2; *(_OWORD *)(v8 + 16) = 0LL; *(_QWORD *)(v8 + 32) = 0LL; v16 = (volatile signed __int32 *)v8; v15 = v8 + 16; minja::Value::Value((long long)&v17, &v15); } else { v17 = 0LL; v18 = *((_QWORD *)&v4 + 1); v19 = 0LL; *((_QWORD *)&v4 + 1) = *(_QWORD *)(a2 + 24); *(_QWORD *)(a2 + 24) = 0LL; v19 = (volatile signed __int32 *)*((_QWORD *)&v4 + 1); *(_QWORD *)(a2 + 16) = 0LL; v20 = v4; v21 = 0LL; v9 = *(volatile signed __int32 **)(a2 + 40); *(_QWORD *)(a2 + 40) = 0LL; v21 = v9; *(_QWORD *)(a2 + 32) = 0LL; v22 = v6; v23 = 0LL; v10 = *(volatile signed __int32 **)(a2 + 56); *(_QWORD *)(a2 + 56) = 0LL; v23 = v10; *(_QWORD *)(a2 + 48) = 0LL; v24[0] = *(_OWORD *)(a2 + 64); 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 *)(a2 + 64)); *(_BYTE *)(a2 + 64) = 0; *(_QWORD *)(a2 + 72) = 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 *)v24); } *a1 = 0LL; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::Context,std::allocator<minja::Context>,minja::Value,std::shared_ptr<minja::Context> const&>( a1 + 1, a1, &v14, &v17, a3); std::__shared_ptr<minja::Context,(__gnu_cxx::_Lock_policy)2>::_M_enable_shared_from_this_with<minja::Context,minja::Context>( a1, *a1); 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 *)v24); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v24); if ( v23 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v23); if ( v21 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v21); if ( v19 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v19); v11 = *((_QWORD *)&v17 + 1); if ( *((_QWORD *)&v17 + 1) ) { if ( _libc_single_threaded ) { v12 = *(_DWORD *)(*((_QWORD *)&v17 + 1) + 12LL); *(_DWORD *)(*((_QWORD *)&v17 + 1) + 12LL) = v12 - 1; } else { v12 = _InterlockedExchangeAdd((volatile signed __int32 *)(*((_QWORD *)&v17 + 1) + 12LL), 0xFFFFFFFF); } if ( v12 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v11 + 24LL))(v11, 0LL); } if ( v7 && v16 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v16); return a1; }
make: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV R14,RDX MOV R15,RSI MOV RDX,qword ptr [RSI + 0x10] MOV RAX,qword ptr [RSI + 0x20] MOV RCX,RAX OR RCX,RDX SETZ CL CMP byte ptr [RSI + 0x40],0x0 MOV RBX,RDI SETZ SIL AND SIL,CL MOV RCX,qword ptr [R15 + 0x30] TEST RCX,RCX SETZ BPL AND BPL,SIL CMP BPL,0x1 JNZ 0x0019dd34 XOR R12D,R12D LEA R15,[RSP + 0x10] MOV qword ptr [R15],R12 MOV EDI,0x30 CALL 0x0011b8d0 MOV RCX,0x100000001 MOV qword ptr [RAX + 0x8],RCX LEA RCX,[0x22d448] ADD RCX,0x10 MOV qword ptr [RAX],RCX LEA RCX,[RAX + 0x10] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + 0x10],XMM0 MOV qword ptr [RAX + 0x20],R12 MOV qword ptr [R15 + 0x8],RAX MOV qword ptr [R15],RCX LEA RDI,[RSP + 0x20] MOV RSI,R15 CALL 0x00190602 JMP 0x0019ddbf LAB_0019dd34: LEA RDI,[R15 + 0x40] XORPS XMM0,XMM0 LEA R12,[RSP + 0x60] MOVAPS xmmword ptr [R12 + -0x40],XMM0 MOV qword ptr [R12 + -0x30],RDX XOR R13D,R13D MOV qword ptr [R12 + -0x28],R13 MOV RDX,qword ptr [R15 + 0x18] MOV qword ptr [R15 + 0x18],R13 MOV qword ptr [R12 + -0x28],RDX MOV qword ptr [R15 + 0x10],R13 MOV qword ptr [R12 + -0x20],RAX MOV qword ptr [R12 + -0x18],R13 MOV RAX,qword ptr [R15 + 0x28] MOV qword ptr [R15 + 0x28],R13 MOV qword ptr [R12 + -0x18],RAX MOV qword ptr [R15 + 0x20],R13 MOV qword ptr [R12 + -0x10],RCX MOV qword ptr [R12 + -0x8],R13 MOV RAX,qword ptr [R15 + 0x38] MOV qword ptr [R15 + 0x38],R13 MOV qword ptr [R12 + -0x8],RAX MOV qword ptr [R15 + 0x30],R13 MOVUPS XMM0,xmmword ptr [RDI] MOVAPS xmmword ptr [R12],XMM0 XOR ESI,ESI CALL 0x0015907a MOV byte ptr [R15 + 0x40],0x0 MOV qword ptr [R15 + 0x48],R13 MOV RDI,R12 MOV ESI,0x1 CALL 0x0015907a LAB_0019ddbf: MOV qword ptr [RBX],0x0 LEA RDI,[RBX + 0x8] LAB_0019ddca: LEA RDX,[RSP + 0xf] LEA RCX,[RSP + 0x20] MOV RSI,RBX MOV R8,R14 CALL 0x0019e12e LAB_0019dddf: MOV RSI,qword ptr [RBX] MOV RDI,RBX CALL 0x0019e1b0 LEA R14,[RSP + 0x60] MOV RDI,R14 XOR ESI,ESI CALL 0x0015907a MOV RDI,R14 CALL 0x0015e7f4 MOV RDI,qword ptr [R14 + -0x8] TEST RDI,RDI JZ 0x0019de0f CALL 0x0016e160 LAB_0019de0f: MOV RDI,qword ptr [RSP + 0x48] TEST RDI,RDI JZ 0x0019de1e CALL 0x0016e160 LAB_0019de1e: MOV RDI,qword ptr [RSP + 0x38] TEST RDI,RDI JZ 0x0019de2d CALL 0x0016e160 LAB_0019de2d: MOV RDI,qword ptr [RSP + 0x28] TEST RDI,RDI JZ 0x0019de63 MOV RAX,qword ptr [0x0022ef88] CMP byte ptr [RAX],0x0 JZ 0x0019de4e MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x0019de58 LAB_0019de4e: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_0019de58: CMP EAX,0x1 JNZ 0x0019de63 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_0019de63: TEST BPL,BPL JZ 0x0019de77 MOV RDI,qword ptr [RSP + 0x18] TEST RDI,RDI JZ 0x0019de77 CALL 0x0016e160 LAB_0019de77: MOV RAX,RBX ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* minja::Context::make(minja::Value&&, std::shared_ptr<minja::Context> const&) */ Context * __thiscall minja::Context::make(Context *this,Value *param_1,shared_ptr *param_2) { int *piVar1; Value VVar2; long lVar3; long lVar4; long lVar5; int iVar6; int1 local_99; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_98; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_90; int8 local_88; long *plStack_80; long local_78; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_70; long local_68; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_60; long local_58; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_50; int8 local_48; int8 uStack_40; lVar3 = *(long *)(param_1 + 0x10); lVar4 = *(long *)(param_1 + 0x20); VVar2 = param_1[0x40]; lVar5 = *(long *)(param_1 + 0x30); if (lVar5 != 0 || (VVar2 != (Value)0x0 || (lVar4 != 0 || lVar3 != 0))) { local_88 = 0; plStack_80 = (long *)0x0; local_70 = *(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(param_1 + 0x18); *(int8 *)(param_1 + 0x18) = 0; *(int8 *)(param_1 + 0x10) = 0; local_60 = *(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(param_1 + 0x28); *(int8 *)(param_1 + 0x28) = 0; *(int8 *)(param_1 + 0x20) = 0; local_50 = *(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(param_1 + 0x38); *(int8 *)(param_1 + 0x38) = 0; *(int8 *)(param_1 + 0x30) = 0; local_48 = *(int8 *)(param_1 + 0x40); uStack_40 = *(int8 *)(param_1 + 0x48); local_78 = lVar3; local_68 = lVar4; local_58 = lVar5; 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 + 0x40,0)); param_1[0x40] = (Value)0x0; *(int8 *)(param_1 + 0x48) = 0; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(&local_48,0)); } else { local_98 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0; local_90 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)operator_new(0x30); *(int8 *)(local_90 + 8) = 0x100000001; *(int ***)local_90 = &PTR___Sp_counted_ptr_inplace_0022d458; local_98 = local_90 + 0x10; *(int8 *)(local_90 + 0x10) = 0; *(int8 *)(local_90 + 0x18) = 0; *(int8 *)(local_90 + 0x20) = 0; Value::Value((Value *)&local_88,(shared_ptr *)&local_98); } *(int8 *)this = 0; /* try { // try from 0019ddca to 0019ddde has its CatchHandler @ 0019de89 */ std::__shared_count<(__gnu_cxx::_Lock_policy)2>:: __shared_count<minja::Context,std::allocator<minja::Context>,minja::Value,std::shared_ptr<minja::Context>const&> ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(this + 8),this,&local_99,&local_88, param_2); std::__shared_ptr<minja::Context,(__gnu_cxx::_Lock_policy)2>:: _M_enable_shared_from_this_with<minja::Context,minja::Context> ((__shared_ptr<minja::Context,(__gnu_cxx::_Lock_policy)2> *)this,*(Context **)this); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81((data *)&local_48,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)&local_48); if (local_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_50); } if (local_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_60); } if (local_70 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_70); } if (plStack_80 != (long *)0x0) { if (*PTR___libc_single_threaded_0022ef88 == '\0') { LOCK(); piVar1 = (int *)((long)plStack_80 + 0xc); iVar6 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar6 = *(int *)((long)plStack_80 + 0xc); *(int *)((long)plStack_80 + 0xc) = iVar6 + -1; } if (iVar6 == 1) { (**(code **)(*plStack_80 + 0x18))(); } } if ((lVar5 == 0 && (VVar2 == (Value)0x0 && (lVar4 == 0 && lVar3 == 0))) && (local_90 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0)) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_90); } return this; }
20,420
my_getcputime
eloqsql/mysys/my_getsystime.c
ulonglong my_getcputime() { #ifdef CLOCK_THREAD_CPUTIME_ID struct timespec tp; if (clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tp)) return 0; return (ulonglong)tp.tv_sec*10000000+(ulonglong)tp.tv_nsec/100; #elif defined(__NR_clock_gettime) struct timespec tp; if (syscall(__NR_clock_gettime, CLOCK_THREAD_CPUTIME_ID, &tp)) return 0; return (ulonglong)tp.tv_sec*10000000+(ulonglong)tp.tv_nsec/100; #endif /* CLOCK_THREAD_CPUTIME_ID */ return 0; }
O3
c
my_getcputime: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp leaq -0x10(%rbp), %rsi movl $0x3, %edi callq 0x36340 testl %eax, %eax je 0x64910 xorl %eax, %eax jmp 0x64937 imulq $0x989680, -0x10(%rbp), %rcx # imm = 0x989680 movq -0x8(%rbp), %rax shrq $0x2, %rax movabsq $0x28f5c28f5c28f5c3, %rdx # imm = 0x28F5C28F5C28F5C3 mulq %rdx movq %rdx, %rax shrq $0x2, %rax addq %rcx, %rax addq $0x10, %rsp popq %rbp retq nopl (%rax)
my_getcputime: push rbp mov rbp, rsp sub rsp, 10h lea rsi, [rbp+var_10] mov edi, 3 call _clock_gettime test eax, eax jz short loc_64910 xor eax, eax jmp short loc_64937 loc_64910: imul rcx, [rbp+var_10], 989680h mov rax, [rbp+var_8] shr rax, 2 mov rdx, 28F5C28F5C28F5C3h mul rdx mov rax, rdx shr rax, 2 add rax, rcx loc_64937: add rsp, 10h pop rbp retn
unsigned long long my_getcputime() { long long v1; // [rsp+0h] [rbp-10h] BYREF unsigned long long v2; // [rsp+8h] [rbp-8h] if ( (unsigned int)clock_gettime(3LL, &v1) ) return 0LL; else return 10000000 * v1 + v2 / 0x64; }
my_getcputime: PUSH RBP MOV RBP,RSP SUB RSP,0x10 LEA RSI,[RBP + -0x10] MOV EDI,0x3 CALL 0x00136340 TEST EAX,EAX JZ 0x00164910 XOR EAX,EAX JMP 0x00164937 LAB_00164910: IMUL RCX,qword ptr [RBP + -0x10],0x989680 MOV RAX,qword ptr [RBP + -0x8] SHR RAX,0x2 MOV RDX,0x28f5c28f5c28f5c3 MUL RDX MOV RAX,RDX SHR RAX,0x2 ADD RAX,RCX LAB_00164937: ADD RSP,0x10 POP RBP RET
long my_getcputime(void) { int iVar1; long lVar2; timespec local_18; iVar1 = clock_gettime(3,&local_18); if (iVar1 == 0) { lVar2 = (ulong)local_18.tv_nsec / 100 + local_18.tv_sec * 10000000; } else { lVar2 = 0; } return lVar2; }
20,421
httplib::detail::file_extension(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
nickolajgrishuk[P]metricz-cpp/build_O2/_deps/httplib-src/httplib.h
inline std::string file_extension(const std::string &path) { std::smatch m; static auto re = std::regex("\\.([a-zA-Z0-9]+)$"); if (std::regex_search(path, m, re)) { return m[1].str(); } return std::string(); }
O2
c
httplib::detail::file_extension(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r14 pushq %rbx subq $0x28, %rsp movq %rsi, %r14 movq %rdi, %rbx xorps %xmm0, %xmm0 movaps %xmm0, 0x10(%rsp) movaps %xmm0, (%rsp) movb 0x1f02d(%rip), %al # 0x40af8 testb %al, %al je 0x21b44 leaq 0x1f002(%rip), %rdx # 0x40ad8 movq %rsp, %rsi movq %r14, %rdi xorl %ecx, %ecx callq 0x21bbd testb %al, %al je 0x21b10 movq (%rsp), %rsi movq 0x8(%rsp), %rcx subq %rsi, %rcx je 0x21b22 pushq $0x18 popq %rdi movq %rcx, %rax cqto idivq %rdi addq $-0x5, %rax cmpq $-0x3, %rax ja 0x21b22 addq $0x18, %rsi jmp 0x21b29 leaq 0x10(%rbx), %rax movq %rax, (%rbx) andq $0x0, 0x8(%rbx) movb $0x0, 0x10(%rbx) jmp 0x21b31 addq %rcx, %rsi addq $-0x48, %rsi movq %rbx, %rdi callq 0x21bd8 movq %rsp, %rdi callq 0x1cff2 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r14 retq leaq 0x1efad(%rip), %rdi # 0x40af8 callq 0x8a10 testl %eax, %eax je 0x21acf leaq 0x1ef79(%rip), %rdi # 0x40ad8 leaq 0x7f31(%rip), %rsi # 0x29a97 pushq $0x10 popq %rdx callq 0x1caac leaq -0x16ee1(%rip), %rdi # 0xac94 leaq 0x1ef5c(%rip), %rsi # 0x40ad8 leaq 0x1e9e5(%rip), %rdx # 0x40568 callq 0x84e0 leaq 0x1ef69(%rip), %rdi # 0x40af8 callq 0x83a0 jmp 0x21acf movq %rax, %rbx leaq 0x1ef55(%rip), %rdi # 0x40af8 callq 0x8390 jmp 0x21bad movq %rax, %rbx movq %rsp, %rdi callq 0x1cff2 movq %rbx, %rdi callq 0x89d0
_ZN7httplib6detail14file_extensionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r14 push rbx sub rsp, 28h mov r14, rsi mov rbx, rdi xorps xmm0, xmm0 movaps [rsp+38h+var_28], xmm0 movaps [rsp+38h+var_38], xmm0 mov al, cs:_ZGVZN7httplib6detail14file_extensionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE2reB5cxx11; `guard variable for'httplib::detail::file_extension(std::string const&)::re test al, al jz short loc_21B44 loc_21ACF: lea rdx, _ZZN7httplib6detail14file_extensionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE2reB5cxx11; httplib::detail::file_extension(std::string const&)::re mov rsi, rsp mov rdi, r14 xor ecx, ecx call _ZSt12regex_searchISt11char_traitsIcESaIcESaINSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS3_12basic_stringIcS1_S2_EEEEEEEcNS3_12regex_traitsIcEEEbRKNS9_IT2_T_T0_EERNS3_13match_resultsINSJ_14const_iteratorET1_EERKNS3_11basic_regexISG_T3_EENSt15regex_constants15match_flag_typeE; std::regex_search<std::char_traits<char>,std::allocator<char>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>>(std::string const&,std::match_results<std::string::const_iterator> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type) test al, al jz short loc_21B10 mov rsi, qword ptr [rsp+38h+var_38] mov rcx, qword ptr [rsp+38h+var_38+8] sub rcx, rsi jz short loc_21B22 push 18h pop rdi mov rax, rcx cqo idiv rdi add rax, 0FFFFFFFFFFFFFFFBh cmp rax, 0FFFFFFFFFFFFFFFDh ja short loc_21B22 add rsi, 18h jmp short loc_21B29 loc_21B10: lea rax, [rbx+10h] mov [rbx], rax and qword ptr [rbx+8], 0 mov byte ptr [rbx+10h], 0 jmp short loc_21B31 loc_21B22: add rsi, rcx add rsi, 0FFFFFFFFFFFFFFB8h loc_21B29: mov rdi, rbx call _ZNKSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEEE3strEv; std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>::str(void) loc_21B31: mov rdi, rsp call _ZNSt12_Vector_baseINSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS0_12basic_stringIcSt11char_traitsIcESaIcEEEEEEESaISC_EED2Ev; std::_Vector_base<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~_Vector_base() mov rax, rbx add rsp, 28h pop rbx pop r14 retn loc_21B44: lea rdi, _ZGVZN7httplib6detail14file_extensionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE2reB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_21ACF lea rdi, _ZZN7httplib6detail14file_extensionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE2reB5cxx11; httplib::detail::file_extension(std::string const&)::re lea rsi, aAZaZ09; "\\.([a-zA-Z0-9]+)$" push 10h pop rdx call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc lea rsi, _ZZN7httplib6detail14file_extensionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE2reB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN7httplib6detail14file_extensionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE2reB5cxx11; __guard * call ___cxa_guard_release jmp loc_21ACF mov rbx, rax lea rdi, _ZGVZN7httplib6detail14file_extensionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE2reB5cxx11; __guard * call ___cxa_guard_abort jmp short loc_21BAD mov rbx, rax loc_21BAD: mov rdi, rsp call _ZNSt12_Vector_baseINSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS0_12basic_stringIcSt11char_traitsIcESaIcEEEEEEESaISC_EED2Ev; std::_Vector_base<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~_Vector_base() mov rdi, rbx call __Unwind_Resume
long long httplib::detail::file_extension(long long a1, long long a2) { long long v2; // rdx long long v3; // rcx long long v4; // rsi _OWORD v6[3]; // [rsp+0h] [rbp-38h] BYREF memset(v6, 0, 32); if ( !(_BYTE)`guard variable for'httplib::detail::file_extension(std::string const&)::re[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'httplib::detail::file_extension(std::string const&)::re[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&httplib::detail::file_extension(std::string const&)::re[abi:cxx11], (long long)"\\.([a-zA-Z0-9]+)$", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &httplib::detail::file_extension(std::string const&)::re[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'httplib::detail::file_extension(std::string const&)::re[abi:cxx11]); } if ( (unsigned __int8)std::regex_search<std::char_traits<char>,std::allocator<char>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>>( a2, v6, &httplib::detail::file_extension(std::string const&)::re[abi:cxx11], 0LL) ) { v3 = *((_QWORD *)&v6[0] + 1) - *(_QWORD *)&v6[0]; if ( *((_QWORD *)&v6[0] + 1) == *(_QWORD *)&v6[0] || (v2 = v3 % 24, (unsigned long long)(v3 / 24 - 5) > 0xFFFFFFFFFFFFFFFDLL) ) { v4 = *((_QWORD *)&v6[0] + 1) - 72LL; } else { v4 = *(_QWORD *)&v6[0] + 24LL; } std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>::str(a1, v4, v2); } else { *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; } std::_Vector_base<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~_Vector_base((void **)v6); return a1; }
file_extension: PUSH R14 PUSH RBX SUB RSP,0x28 MOV R14,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOVAPS xmmword ptr [RSP],XMM0 MOV AL,byte ptr [0x00140af8] TEST AL,AL JZ 0x00121b44 LAB_00121acf: LEA RDX,[0x140ad8] MOV RSI,RSP MOV RDI,R14 XOR ECX,ECX CALL 0x00121bbd TEST AL,AL JZ 0x00121b10 MOV RSI,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x8] SUB RCX,RSI JZ 0x00121b22 PUSH 0x18 POP RDI MOV RAX,RCX CQO IDIV RDI ADD RAX,-0x5 CMP RAX,-0x3 JA 0x00121b22 ADD RSI,0x18 JMP 0x00121b29 LAB_00121b10: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX AND qword ptr [RBX + 0x8],0x0 MOV byte ptr [RBX + 0x10],0x0 JMP 0x00121b31 LAB_00121b22: ADD RSI,RCX ADD RSI,-0x48 LAB_00121b29: MOV RDI,RBX CALL 0x00121bd8 LAB_00121b31: MOV RDI,RSP CALL 0x0011cff2 MOV RAX,RBX ADD RSP,0x28 POP RBX POP R14 RET LAB_00121b44: LEA RDI,[0x140af8] CALL 0x00108a10 TEST EAX,EAX JZ 0x00121acf LAB_00121b58: LEA RDI,[0x140ad8] LEA RSI,[0x129a97] PUSH 0x10 POP RDX CALL 0x0011caac LAB_00121b6e: LEA RDI,[0x10ac94] LEA RSI,[0x140ad8] LEA RDX,[0x140568] CALL 0x001084e0 LEA RDI,[0x140af8] CALL 0x001083a0 JMP 0x00121acf
/* httplib::detail::file_extension(std::__cxx11::string const&) */ detail * __thiscall httplib::detail::file_extension(detail *this,string *param_1) { bool bVar1; int iVar2; long local_38 [5]; local_38[2] = 0; local_38[3] = 0; local_38[0] = 0; local_38[1] = 0; if ((file_extension(std::__cxx11::string_const&)::re_abi_cxx11_ == '\0') && (iVar2 = __cxa_guard_acquire(&file_extension(std::__cxx11::string_const&)::re_abi_cxx11_), iVar2 != 0)) { /* try { // try from 00121b58 to 00121b6d has its CatchHandler @ 00121b99 */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex ((basic_regex<char,std::__cxx11::regex_traits<char>> *) file_extension(std::__cxx11::string_const&)::re_abi_cxx11_,"\\.([a-zA-Z0-9]+)$",0x10) ; __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, file_extension(std::__cxx11::string_const&)::re_abi_cxx11_,&__dso_handle); __cxa_guard_release(&file_extension(std::__cxx11::string_const&)::re_abi_cxx11_); } /* try { // try from 00121acf to 00121b30 has its CatchHandler @ 00121baa */ bVar1 = std:: regex_search<std::char_traits<char>,std::allocator<char>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>,char,std::__cxx11::regex_traits<char>> (param_1,local_38,file_extension(std::__cxx11::string_const&)::re_abi_cxx11_,0); if (bVar1) { std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>::str(); } else { *(detail **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (detail)0x0; } std:: _Vector_base<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>> ::~_Vector_base((_Vector_base<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>> *)local_38); return this; }
20,422
mp_sub_mul1_dec
bluesky950520[P]quickjs/libbf.c
limb_t mp_sub_mul1_dec(limb_t *tabr, const limb_t *taba, mp_size_t n, limb_t b) { limb_t base = BF_DEC_BASE; mp_size_t i; limb_t l, t0, t1, r, a, v, c; /* XXX: optimize */ l = 0; for(i = 0; i < n; i++) { muldq(t1, t0, taba[i], b); adddq(t1, t0, 0, l); divdq_base(l, r, t1, t0); v = tabr[i]; a = v - r; c = a > v; if (c) a += base; /* never bigger than base because r = 0 when l = base - 1 */ l += c; tabr[i] = a; } return l; }
O1
c
mp_sub_mul1_dec: testq %rdx, %rdx jle 0x91bef pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdx, %r8 movabsq $-0x7538dcfb76180000, %r14 # imm = 0x8AC7230489E80000 xorl %r15d, %r15d movabsq $-0x13e1b582496a9e5b, %r12 # imm = 0xEC1E4A7DB69561A5 movabsq $0x158e460913d00000, %r13 # imm = 0x158E460913D00000 xorl %r9d, %r9d movq %rcx, %rax mulq (%rsi,%r15,8) movq %rdx, %r10 movq %rax, %r11 addq %r9, %r11 adcq $0x0, %r10 movq %r10, %rax shldq $0x1, %r11, %rax mulq %r12 movq %rdx, %rbx movq %rdx, %rax mulq %r14 subq %rax, %r11 sbbq %rdx, %r10 subq %r13, %r11 movq $-0x1, %r9 sbbq $0x0, %r9 leaq (%r10,%r9), %rax sarq %rax leaq (%rbx,%rax), %rdx addq $0x2, %rdx andq %r14, %rax addq %r11, %rax adcq %r10, %r9 movq %r9, %r10 andq %r14, %r10 addq %r10, %rax movq (%rdi,%r15,8), %r10 subq %rax, %r10 leaq (%r10,%r14), %rax cmovaeq %r10, %rax adcq %rdx, %r9 movq %rax, (%rdi,%r15,8) incq %r15 cmpq %r15, %r8 jne 0x91b69 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 jmp 0x91bf2 xorl %r9d, %r9d movq %r9, %rax retq
mp_sub_mul1_dec: test rdx, rdx jle loc_91BEF push r15 push r14 push r13 push r12 push rbx mov r8, rdx mov r14, 8AC7230489E80000h xor r15d, r15d mov r12, 0EC1E4A7DB69561A5h mov r13, 158E460913D00000h xor r9d, r9d loc_91B69: mov rax, rcx mul qword ptr [rsi+r15*8] mov r10, rdx mov r11, rax add r11, r9 adc r10, 0 mov rax, r10 shld rax, r11, 1 mul r12 mov rbx, rdx mov rax, rdx mul r14 sub r11, rax sbb r10, rdx sub r11, r13 mov r9, 0FFFFFFFFFFFFFFFFh sbb r9, 0 lea rax, [r10+r9] sar rax, 1 lea rdx, [rbx+rax] add rdx, 2 and rax, r14 add rax, r11 adc r9, r10 mov r10, r9 and r10, r14 add rax, r10 mov r10, [rdi+r15*8] sub r10, rax lea rax, [r10+r14] cmovnb rax, r10 adc r9, rdx mov [rdi+r15*8], rax inc r15 cmp r8, r15 jnz short loc_91B69 pop rbx pop r12 pop r13 pop r14 pop r15 jmp short loc_91BF2 loc_91BEF: xor r9d, r9d loc_91BF2: mov rax, r9 retn
long long mp_sub_mul1_dec(long long a1, long long a2, long long a3, unsigned long long a4) { long long v5; // r15 long long v6; // r9 signed __int128 v7; // kr00_16 unsigned long long v8; // rbx unsigned long long v9; // r10 unsigned __int128 v10; // kr20_16 long long v11; // rax long long v12; // rdx long long v13; // r9 unsigned long long v14; // rax unsigned long long v15; // r10 bool v16; // cf unsigned long long v17; // r10 unsigned long long v18; // rax if ( a3 <= 0 ) return 0LL; v5 = 0LL; v6 = 0LL; do { v7 = (unsigned long long)v6 + *(unsigned long long *)(a2 + 8 * v5) * (unsigned __int128)a4; v8 = (0xEC1E4A7DB69561A5LL * (unsigned __int128)(unsigned long long)(v7 >> 63)) >> 64; v9 = (v7 - 0x8AC7230489E80000LL * (unsigned __int128)v8) >> 64; v10 = __PAIR128__(-1LL, (unsigned long long)v7 - 0x8AC7230489E80000LL * v8) - 0x158E460913D00000LL; v11 = (long long)(v9 + *((_QWORD *)&v10 + 1)) >> 1; v12 = v8 + v11 + 2; v13 = (v10 + __PAIR128__(v9, v11 & 0x8AC7230489E80000LL)) >> 64; v14 = (v13 & 0x8AC7230489E80000LL) + v10 + (v11 & 0x8AC7230489E80000LL); v15 = *(_QWORD *)(a1 + 8 * v5); v16 = v15 < v14; v17 = v15 - v14; v18 = v17 - 0x7538DCFB76180000LL; if ( !v16 ) v18 = v17; v6 = v12 + v16 + v13; *(_QWORD *)(a1 + 8 * v5++) = v18; } while ( a3 != v5 ); return v6; }
mp_sub_mul1_dec: TEST RDX,RDX JLE 0x00191bef PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R8,RDX MOV R14,-0x7538dcfb76180000 XOR R15D,R15D MOV R12,-0x13e1b582496a9e5b MOV R13,0x158e460913d00000 XOR R9D,R9D LAB_00191b69: MOV RAX,RCX MUL qword ptr [RSI + R15*0x8] MOV R10,RDX MOV R11,RAX ADD R11,R9 ADC R10,0x0 MOV RAX,R10 SHLD RAX,R11,0x1 MUL R12 MOV RBX,RDX MOV RAX,RDX MUL R14 SUB R11,RAX SBB R10,RDX SUB R11,R13 MOV R9,-0x1 SBB R9,0x0 LEA RAX,[R10 + R9*0x1] SAR RAX,0x1 LEA RDX,[RBX + RAX*0x1] ADD RDX,0x2 AND RAX,R14 ADD RAX,R11 ADC R9,R10 MOV R10,R9 AND R10,R14 ADD RAX,R10 MOV R10,qword ptr [RDI + R15*0x8] SUB R10,RAX LEA RAX,[R10 + R14*0x1] CMOVNC RAX,R10 ADC R9,RDX MOV qword ptr [RDI + R15*0x8],RAX INC R15 CMP R8,R15 JNZ 0x00191b69 POP RBX POP R12 POP R13 POP R14 POP R15 JMP 0x00191bf2 LAB_00191bef: XOR R9D,R9D LAB_00191bf2: MOV RAX,R9 RET
ulong mp_sub_mul1_dec(long param_1,long param_2,long param_3,ulong param_4) { int1 auVar1 [16]; int1 auVar2 [16]; int1 auVar3 [16]; int1 auVar4 [16]; int1 auVar5 [16]; ulong uVar6; ulong uVar7; long lVar8; ulong uVar9; long lVar10; ulong uVar11; ulong uVar12; long lVar13; if (param_3 < 1) { uVar11 = 0; } else { lVar13 = 0; uVar11 = 0; do { auVar5._8_8_ = 0; auVar5._0_8_ = uVar11; auVar1._8_8_ = 0; auVar1._0_8_ = param_4; auVar4._8_8_ = 0; auVar4._0_8_ = *(ulong *)(param_2 + lVar13 * 8); auVar5 = auVar1 * auVar4 + auVar5; auVar2._8_8_ = 0; auVar2._0_8_ = auVar5._8_8_ << 1 | auVar5._0_8_ >> 0x3f; uVar7 = SUB168(auVar2 * ZEXT816(0xec1e4a7db69561a5),8); auVar3._8_8_ = 0; auVar3._0_8_ = uVar7; auVar5 = auVar5 - auVar3 * ZEXT816(10000000000000000000); uVar11 = auVar5._0_8_; lVar10 = auVar5._8_8_; uVar12 = uVar11 + 0xea71b9f6ec300000; lVar8 = -1 - (ulong)(uVar11 < 0x158e460913d00000); uVar6 = lVar10 + lVar8 >> 1; uVar11 = uVar6 & 10000000000000000000; uVar9 = lVar8 + lVar10 + (ulong)CARRY8(uVar11,uVar12); uVar12 = uVar11 + uVar12 + (uVar9 & 10000000000000000000); uVar11 = *(ulong *)(param_1 + lVar13 * 8); lVar8 = (uVar11 - uVar12) + -0x7538dcfb76180000; if (uVar11 >= uVar12) { lVar8 = uVar11 - uVar12; } uVar11 = uVar9 + uVar7 + uVar6 + 2 + (ulong)(uVar11 < uVar12); *(long *)(param_1 + lVar13 * 8) = lVar8; lVar13 = lVar13 + 1; } while (param_3 != lVar13); } return uVar11; }
20,423
mp_sub_mul1_dec
bluesky950520[P]quickjs/libbf.c
limb_t mp_sub_mul1_dec(limb_t *tabr, const limb_t *taba, mp_size_t n, limb_t b) { limb_t base = BF_DEC_BASE; mp_size_t i; limb_t l, t0, t1, r, a, v, c; /* XXX: optimize */ l = 0; for(i = 0; i < n; i++) { muldq(t1, t0, taba[i], b); adddq(t1, t0, 0, l); divdq_base(l, r, t1, t0); v = tabr[i]; a = v - r; c = a > v; if (c) a += base; /* never bigger than base because r = 0 when l = base - 1 */ l += c; tabr[i] = a; } return l; }
O2
c
mp_sub_mul1_dec: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdx, %r8 movabsq $-0x7538dcfb76180000, %rbx # imm = 0x8AC7230489E80000 xorl %r9d, %r9d testq %rdx, %rdx cmovleq %r9, %r8 movabsq $-0x13e1b582496a9e5b, %r14 # imm = 0xEC1E4A7DB69561A5 movabsq $0x158e460913d00000, %r15 # imm = 0x158E460913D00000 movabsq $-0x1, %r12 xorl %r13d, %r13d cmpq %r13, %r8 je 0x7a1c6 movq %rcx, %rax mulq (%rsi,%r13,8) movq %rdx, %r10 addq %rax, %r9 adcq $0x0, %r10 movq %r10, %rax shldq $0x1, %r9, %rax mulq %r14 movq %rdx, %r11 movq %rdx, %rax mulq %rbx subq %rax, %r9 sbbq %rdx, %r10 subq %r15, %r9 movq %r12, %rax sbbq $0x0, %rax leaq (%r10,%rax), %rdx sarq %rdx addq %rdx, %r11 addq $0x2, %r11 andq %rbx, %rdx addq %r9, %rdx adcq %r10, %rax movq %rax, %r9 andq %rbx, %r9 addq %r9, %rdx movq (%rdi,%r13,8), %r9 subq %rdx, %r9 leaq (%r9,%rbx), %rdx cmovaeq %r9, %rdx adcq %r11, %rax movq %rdx, (%rdi,%r13,8) incq %r13 movq %rax, %r9 jmp 0x7a14e movq %r9, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
mp_sub_mul1_dec: push r15 push r14 push r13 push r12 push rbx mov r8, rdx mov rbx, 8AC7230489E80000h xor r9d, r9d test rdx, rdx cmovle r8, r9 mov r14, 0EC1E4A7DB69561A5h mov r15, 158E460913D00000h mov r12, 0FFFFFFFFFFFFFFFFh xor r13d, r13d loc_7A14E: cmp r8, r13 jz short loc_7A1C6 mov rax, rcx mul qword ptr [rsi+r13*8] mov r10, rdx add r9, rax adc r10, 0 mov rax, r10 shld rax, r9, 1 mul r14 mov r11, rdx mov rax, rdx mul rbx sub r9, rax sbb r10, rdx sub r9, r15 mov rax, r12 sbb rax, 0 lea rdx, [r10+rax] sar rdx, 1 add r11, rdx add r11, 2 and rdx, rbx add rdx, r9 adc rax, r10 mov r9, rax and r9, rbx add rdx, r9 mov r9, [rdi+r13*8] sub r9, rdx lea rdx, [r9+rbx] cmovnb rdx, r9 adc rax, r11 mov [rdi+r13*8], rdx inc r13 mov r9, rax jmp short loc_7A14E loc_7A1C6: mov rax, r9 pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long mp_sub_mul1_dec(long long a1, long long a2, long long a3, unsigned long long a4) { long long v4; // r8 long long v5; // r9 long long i; // r13 signed __int128 v7; // kr00_16 unsigned long long v8; // r11 unsigned long long v9; // r10 unsigned __int128 v10; // kr20_16 long long v11; // rdx long long v12; // r11 long long v13; // rax unsigned long long v14; // rdx unsigned long long v15; // r9 bool v16; // cf unsigned long long v17; // r9 unsigned long long v18; // rdx v4 = a3; v5 = 0LL; if ( a3 <= 0 ) v4 = 0LL; for ( i = 0LL; v4 != i; ++i ) { v7 = *(unsigned long long *)(a2 + 8 * i) * (unsigned __int128)a4 + (unsigned long long)v5; v8 = (0xEC1E4A7DB69561A5LL * (unsigned __int128)(unsigned long long)(v7 >> 63)) >> 64; v9 = (v7 - 0x8AC7230489E80000LL * (unsigned __int128)v8) >> 64; v10 = __PAIR128__(-1LL, (unsigned long long)v7 - 0x8AC7230489E80000LL * v8) - 0x158E460913D00000LL; v11 = (long long)(v9 + *((_QWORD *)&v10 + 1)) >> 1; v12 = v11 + v8 + 2; v13 = (v10 + __PAIR128__(v9, v11 & 0x8AC7230489E80000LL)) >> 64; v14 = (v13 & 0x8AC7230489E80000LL) + v10 + (v11 & 0x8AC7230489E80000LL); v15 = *(_QWORD *)(a1 + 8 * i); v16 = v15 < v14; v17 = v15 - v14; v18 = v17 - 0x7538DCFB76180000LL; if ( !v16 ) v18 = v17; *(_QWORD *)(a1 + 8 * i) = v18; v5 = v12 + v16 + v13; } return v5; }
mp_sub_mul1_dec: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R8,RDX MOV RBX,-0x7538dcfb76180000 XOR R9D,R9D TEST RDX,RDX CMOVLE R8,R9 MOV R14,-0x13e1b582496a9e5b MOV R15,0x158e460913d00000 MOV R12,-0x1 XOR R13D,R13D LAB_0017a14e: CMP R8,R13 JZ 0x0017a1c6 MOV RAX,RCX MUL qword ptr [RSI + R13*0x8] MOV R10,RDX ADD R9,RAX ADC R10,0x0 MOV RAX,R10 SHLD RAX,R9,0x1 MUL R14 MOV R11,RDX MOV RAX,RDX MUL RBX SUB R9,RAX SBB R10,RDX SUB R9,R15 MOV RAX,R12 SBB RAX,0x0 LEA RDX,[R10 + RAX*0x1] SAR RDX,0x1 ADD R11,RDX ADD R11,0x2 AND RDX,RBX ADD RDX,R9 ADC RAX,R10 MOV R9,RAX AND R9,RBX ADD RDX,R9 MOV R9,qword ptr [RDI + R13*0x8] SUB R9,RDX LEA RDX,[R9 + RBX*0x1] CMOVNC RDX,R9 ADC RAX,R11 MOV qword ptr [RDI + R13*0x8],RDX INC R13 MOV R9,RAX JMP 0x0017a14e LAB_0017a1c6: MOV RAX,R9 POP RBX POP R12 POP R13 POP R14 POP R15 RET
ulong mp_sub_mul1_dec(long param_1,long param_2,ulong param_3,ulong param_4) { int1 auVar1 [16]; int1 auVar2 [16]; int1 auVar3 [16]; int1 auVar4 [16]; int1 auVar5 [16]; long lVar6; ulong uVar7; ulong uVar8; ulong uVar9; ulong uVar10; ulong uVar11; long lVar12; ulong uVar13; uVar10 = 0; if ((long)param_3 < 1) { param_3 = uVar10; } for (uVar13 = 0; auVar5._8_8_ = 0, auVar5._0_8_ = uVar10, param_3 != uVar13; uVar13 = uVar13 + 1) { auVar1._8_8_ = 0; auVar1._0_8_ = param_4; auVar4._8_8_ = 0; auVar4._0_8_ = *(ulong *)(param_2 + uVar13 * 8); auVar5 = auVar1 * auVar4 + auVar5; auVar2._8_8_ = 0; auVar2._0_8_ = auVar5._8_8_ << 1 | auVar5._0_8_ >> 0x3f; uVar8 = SUB168(auVar2 * ZEXT816(0xec1e4a7db69561a5),8); auVar3._8_8_ = 0; auVar3._0_8_ = uVar8; auVar5 = auVar5 - auVar3 * ZEXT816(10000000000000000000); uVar10 = auVar5._0_8_; lVar12 = auVar5._8_8_; uVar11 = uVar10 + 0xea71b9f6ec300000; lVar6 = -1 - (ulong)(uVar10 < 0x158e460913d00000); uVar9 = lVar12 + lVar6 >> 1; uVar10 = uVar9 & 10000000000000000000; uVar7 = lVar6 + lVar12 + (ulong)CARRY8(uVar10,uVar11); uVar11 = uVar10 + uVar11 + (uVar7 & 10000000000000000000); uVar10 = *(ulong *)(param_1 + uVar13 * 8); lVar6 = (uVar10 - uVar11) + -0x7538dcfb76180000; if (uVar10 >= uVar11) { lVar6 = uVar10 - uVar11; } uVar10 = uVar7 + uVar8 + uVar9 + 2 + (ulong)(uVar10 < uVar11); *(long *)(param_1 + uVar13 * 8) = lVar6; } return uVar10; }
20,424
my_convert
eloqsql/strings/ctype.c
uint32 my_convert(char *to, uint32 to_length, CHARSET_INFO *to_cs, const char *from, uint32 from_length, CHARSET_INFO *from_cs, uint *errors) { uint32 length, length2; /* If any of the character sets is not ASCII compatible, immediately switch to slow mb_wc->wc_mb method. */ if ((to_cs->state | from_cs->state) & MY_CS_NONASCII) return my_convert_using_func(to, to_length, to_cs, to_cs->cset->wc_mb, from, from_length, from_cs, from_cs->cset->mb_wc, errors); length= length2= MY_MIN(to_length, from_length); #if defined(__i386__) || defined(__x86_64__) /* Special loop for i386, it allows to refer to a non-aligned memory block as UINT32, which makes it possible to copy four bytes at once. This gives about 10% performance improvement comparing to byte-by-byte loop. */ for ( ; length >= 4; length-= 4, from+= 4, to+= 4) { if ((*(uint32*)from) & 0x80808080) break; *((uint32*) to)= *((const uint32*) from); } #endif /* __i386__ */ for (; ; *to++= *from++, length--) { if (!length) { *errors= 0; return length2; } if (*((unsigned char*) from) > 0x7F) /* A non-ASCII character */ { uint32 copied_length= length2 - length; to_length-= copied_length; from_length-= copied_length; return copied_length + my_convert_using_func(to, to_length, to_cs, to_cs->cset->wc_mb, from, from_length, from_cs, from_cs->cset->mb_wc, errors); } } DBUG_ASSERT(FALSE); // Should never get to here return 0; // Make compiler happy }
O0
c
my_convert: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq 0x10(%rbp), %rax movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movl %r8d, -0x2c(%rbp) movq %r9, -0x38(%rbp) movq -0x20(%rbp), %rax movl 0xc(%rax), %eax movq -0x38(%rbp), %rcx orl 0xc(%rcx), %eax andl $0x2000, %eax # imm = 0x2000 cmpl $0x0, %eax je 0xa4493 movq -0x10(%rbp), %rdi movl -0x14(%rbp), %eax movl %eax, %esi movq -0x20(%rbp), %rdx movq -0x20(%rbp), %rax movq 0xb8(%rax), %rax movq 0x30(%rax), %rcx movq -0x28(%rbp), %r8 movl -0x2c(%rbp), %eax movl %eax, %r9d movq -0x38(%rbp), %r11 movq -0x38(%rbp), %rax movq 0xb8(%rax), %rax movq 0x28(%rax), %r10 movq 0x10(%rbp), %rax movq %r11, (%rsp) movq %r10, 0x8(%rsp) movq %rax, 0x10(%rsp) callq 0xa4280 movl %eax, -0x4(%rbp) jmp 0xa45d9 movl -0x14(%rbp), %eax cmpl -0x2c(%rbp), %eax jae 0xa44a3 movl -0x14(%rbp), %eax movl %eax, -0x48(%rbp) jmp 0xa44a9 movl -0x2c(%rbp), %eax movl %eax, -0x48(%rbp) movl -0x48(%rbp), %eax movl %eax, -0x40(%rbp) movl %eax, -0x3c(%rbp) cmpl $0x4, -0x3c(%rbp) jb 0xa44f9 movq -0x28(%rbp), %rax movl (%rax), %eax andl $0x80808080, %eax # imm = 0x80808080 cmpl $0x0, %eax je 0xa44ca jmp 0xa44f9 movq -0x28(%rbp), %rax movl (%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movl -0x3c(%rbp), %eax subl $0x4, %eax movl %eax, -0x3c(%rbp) movq -0x28(%rbp), %rax addq $0x4, %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax addq $0x4, %rax movq %rax, -0x10(%rbp) jmp 0xa44b2 jmp 0xa44fb cmpl $0x0, -0x3c(%rbp) jne 0xa4516 movq 0x10(%rbp), %rax movl $0x0, (%rax) movl -0x40(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0xa45d9 movq -0x28(%rbp), %rax movzbl (%rax), %eax cmpl $0x7f, %eax jle 0xa45a7 movl -0x40(%rbp), %eax subl -0x3c(%rbp), %eax movl %eax, -0x44(%rbp) movl -0x44(%rbp), %ecx movl -0x14(%rbp), %eax subl %ecx, %eax movl %eax, -0x14(%rbp) movl -0x44(%rbp), %ecx movl -0x2c(%rbp), %eax subl %ecx, %eax movl %eax, -0x2c(%rbp) movl -0x44(%rbp), %eax movl %eax, -0x4c(%rbp) movq -0x10(%rbp), %rdi movl -0x14(%rbp), %eax movl %eax, %esi movq -0x20(%rbp), %rdx movq -0x20(%rbp), %rax movq 0xb8(%rax), %rax movq 0x30(%rax), %rcx movq -0x28(%rbp), %r8 movl -0x2c(%rbp), %eax movl %eax, %r9d movq -0x38(%rbp), %r11 movq -0x38(%rbp), %rax movq 0xb8(%rax), %rax movq 0x28(%rax), %r10 movq 0x10(%rbp), %rax movq %r11, (%rsp) movq %r10, 0x8(%rsp) movq %rax, 0x10(%rsp) callq 0xa4280 movl %eax, %ecx movl -0x4c(%rbp), %eax addl %ecx, %eax movl %eax, -0x4(%rbp) jmp 0xa45d9 jmp 0xa45a9 movq -0x28(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x28(%rbp) movb (%rax), %cl movq -0x10(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x10(%rbp) movb %cl, (%rax) movl -0x3c(%rbp), %eax addl $-0x1, %eax movl %eax, -0x3c(%rbp) jmp 0xa44fb movl -0x4(%rbp), %eax addq $0x70, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_convert: push rbp mov rbp, rsp sub rsp, 70h mov rax, [rbp+arg_0] mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_2C], r8d mov [rbp+var_38], r9 mov rax, [rbp+var_20] mov eax, [rax+0Ch] mov rcx, [rbp+var_38] or eax, [rcx+0Ch] and eax, 2000h cmp eax, 0 jz short loc_A4493 mov rdi, [rbp+var_10] mov eax, [rbp+var_14] mov esi, eax mov rdx, [rbp+var_20] mov rax, [rbp+var_20] mov rax, [rax+0B8h] mov rcx, [rax+30h] mov r8, [rbp+var_28] mov eax, [rbp+var_2C] mov r9d, eax mov r11, [rbp+var_38] mov rax, [rbp+var_38] mov rax, [rax+0B8h] mov r10, [rax+28h] mov rax, [rbp+arg_0] mov [rsp+70h+var_70], r11 mov [rsp+70h+var_68], r10 mov [rsp+70h+var_60], rax call my_convert_using_func mov [rbp+var_4], eax jmp loc_A45D9 loc_A4493: mov eax, [rbp+var_14] cmp eax, [rbp+var_2C] jnb short loc_A44A3 mov eax, [rbp+var_14] mov [rbp+var_48], eax jmp short loc_A44A9 loc_A44A3: mov eax, [rbp+var_2C] mov [rbp+var_48], eax loc_A44A9: mov eax, [rbp+var_48] mov [rbp+var_40], eax mov [rbp+var_3C], eax loc_A44B2: cmp [rbp+var_3C], 4 jb short loc_A44F9 mov rax, [rbp+var_28] mov eax, [rax] and eax, 80808080h cmp eax, 0 jz short loc_A44CA jmp short loc_A44F9 loc_A44CA: mov rax, [rbp+var_28] mov ecx, [rax] mov rax, [rbp+var_10] mov [rax], ecx mov eax, [rbp+var_3C] sub eax, 4 mov [rbp+var_3C], eax mov rax, [rbp+var_28] add rax, 4 mov [rbp+var_28], rax mov rax, [rbp+var_10] add rax, 4 mov [rbp+var_10], rax jmp short loc_A44B2 loc_A44F9: jmp short $+2 loc_A44FB: cmp [rbp+var_3C], 0 jnz short loc_A4516 mov rax, [rbp+arg_0] mov dword ptr [rax], 0 mov eax, [rbp+var_40] mov [rbp+var_4], eax jmp loc_A45D9 loc_A4516: mov rax, [rbp+var_28] movzx eax, byte ptr [rax] cmp eax, 7Fh jle loc_A45A7 mov eax, [rbp+var_40] sub eax, [rbp+var_3C] mov [rbp+var_44], eax mov ecx, [rbp+var_44] mov eax, [rbp+var_14] sub eax, ecx mov [rbp+var_14], eax mov ecx, [rbp+var_44] mov eax, [rbp+var_2C] sub eax, ecx mov [rbp+var_2C], eax mov eax, [rbp+var_44] mov [rbp+var_4C], eax mov rdi, [rbp+var_10] mov eax, [rbp+var_14] mov esi, eax mov rdx, [rbp+var_20] mov rax, [rbp+var_20] mov rax, [rax+0B8h] mov rcx, [rax+30h] mov r8, [rbp+var_28] mov eax, [rbp+var_2C] mov r9d, eax mov r11, [rbp+var_38] mov rax, [rbp+var_38] mov rax, [rax+0B8h] mov r10, [rax+28h] mov rax, [rbp+arg_0] mov [rsp+70h+var_70], r11 mov [rsp+70h+var_68], r10 mov [rsp+70h+var_60], rax call my_convert_using_func mov ecx, eax mov eax, [rbp+var_4C] add eax, ecx mov [rbp+var_4], eax jmp short loc_A45D9 loc_A45A7: jmp short $+2 loc_A45A9: mov rax, [rbp+var_28] mov rcx, rax add rcx, 1 mov [rbp+var_28], rcx mov cl, [rax] mov rax, [rbp+var_10] mov rdx, rax add rdx, 1 mov [rbp+var_10], rdx mov [rax], cl mov eax, [rbp+var_3C] add eax, 0FFFFFFFFh mov [rbp+var_3C], eax jmp loc_A44FB loc_A45D9: mov eax, [rbp+var_4] add rsp, 70h pop rbp retn
long long my_convert( long long a1, unsigned int a2, long long a3, unsigned long long a4, unsigned int a5, long long a6, _DWORD *a7) { char *v7; // rax char v8; // cl _BYTE *v9; // rax unsigned int v11; // [rsp+28h] [rbp-48h] unsigned int i; // [rsp+34h] [rbp-3Ch] _DWORD *v13; // [rsp+48h] [rbp-28h] _DWORD *v14; // [rsp+60h] [rbp-10h] v14 = (_DWORD *)a1; v13 = (_DWORD *)a4; if ( ((*(_DWORD *)(a6 + 12) | *(_DWORD *)(a3 + 12)) & 0x2000) != 0 ) { return (unsigned int)my_convert_using_func( a1, a2, a3, *(long long ( **)(long long, long long, long long, long long))(*(_QWORD *)(a3 + 184) + 48LL), a4, a5, a6, *(long long ( **)(long long, long long *, unsigned long long, unsigned long long))(*(_QWORD *)(a6 + 184) + 40LL), a7); } else { if ( a2 >= a5 ) v11 = a5; else v11 = a2; for ( i = v11; i >= 4 && (*v13 & 0x80808080) == 0; i -= 4 ) *v14++ = *v13++; while ( 1 ) { if ( !i ) { *a7 = 0; return v11; } if ( *(unsigned __int8 *)v13 > 0x7Fu ) break; v7 = (char *)v13; v13 = (_DWORD *)((char *)v13 + 1); v8 = *v7; v9 = v14; v14 = (_DWORD *)((char *)v14 + 1); *v9 = v8; --i; } return (unsigned int)(my_convert_using_func( (long long)v14, a2 - (v11 - i), a3, *(long long ( **)(long long, long long, long long, long long))(*(_QWORD *)(a3 + 184) + 48LL), (unsigned long long)v13, a5 - (v11 - i), a6, *(long long ( **)(long long, long long *, unsigned long long, unsigned long long))(*(_QWORD *)(a6 + 184) + 40LL), a7) + v11 - i); } }
my_convert: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV dword ptr [RBP + -0x2c],R8D MOV qword ptr [RBP + -0x38],R9 MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0xc] MOV RCX,qword ptr [RBP + -0x38] OR EAX,dword ptr [RCX + 0xc] AND EAX,0x2000 CMP EAX,0x0 JZ 0x001a4493 MOV RDI,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RBP + -0x14] MOV ESI,EAX MOV RDX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0xb8] MOV RCX,qword ptr [RAX + 0x30] MOV R8,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RBP + -0x2c] MOV R9D,EAX MOV R11,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0xb8] MOV R10,qword ptr [RAX + 0x28] MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RSP],R11 MOV qword ptr [RSP + 0x8],R10 MOV qword ptr [RSP + 0x10],RAX CALL 0x001a4280 MOV dword ptr [RBP + -0x4],EAX JMP 0x001a45d9 LAB_001a4493: MOV EAX,dword ptr [RBP + -0x14] CMP EAX,dword ptr [RBP + -0x2c] JNC 0x001a44a3 MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x48],EAX JMP 0x001a44a9 LAB_001a44a3: MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x48],EAX LAB_001a44a9: MOV EAX,dword ptr [RBP + -0x48] MOV dword ptr [RBP + -0x40],EAX MOV dword ptr [RBP + -0x3c],EAX LAB_001a44b2: CMP dword ptr [RBP + -0x3c],0x4 JC 0x001a44f9 MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX] AND EAX,0x80808080 CMP EAX,0x0 JZ 0x001a44ca JMP 0x001a44f9 LAB_001a44ca: MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV EAX,dword ptr [RBP + -0x3c] SUB EAX,0x4 MOV dword ptr [RBP + -0x3c],EAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x4 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x4 MOV qword ptr [RBP + -0x10],RAX JMP 0x001a44b2 LAB_001a44f9: JMP 0x001a44fb LAB_001a44fb: CMP dword ptr [RBP + -0x3c],0x0 JNZ 0x001a4516 MOV RAX,qword ptr [RBP + 0x10] MOV dword ptr [RAX],0x0 MOV EAX,dword ptr [RBP + -0x40] MOV dword ptr [RBP + -0x4],EAX JMP 0x001a45d9 LAB_001a4516: MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX] CMP EAX,0x7f JLE 0x001a45a7 MOV EAX,dword ptr [RBP + -0x40] SUB EAX,dword ptr [RBP + -0x3c] MOV dword ptr [RBP + -0x44],EAX MOV ECX,dword ptr [RBP + -0x44] MOV EAX,dword ptr [RBP + -0x14] SUB EAX,ECX MOV dword ptr [RBP + -0x14],EAX MOV ECX,dword ptr [RBP + -0x44] MOV EAX,dword ptr [RBP + -0x2c] SUB EAX,ECX MOV dword ptr [RBP + -0x2c],EAX MOV EAX,dword ptr [RBP + -0x44] MOV dword ptr [RBP + -0x4c],EAX MOV RDI,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RBP + -0x14] MOV ESI,EAX MOV RDX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0xb8] MOV RCX,qword ptr [RAX + 0x30] MOV R8,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RBP + -0x2c] MOV R9D,EAX MOV R11,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0xb8] MOV R10,qword ptr [RAX + 0x28] MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RSP],R11 MOV qword ptr [RSP + 0x8],R10 MOV qword ptr [RSP + 0x10],RAX CALL 0x001a4280 MOV ECX,EAX MOV EAX,dword ptr [RBP + -0x4c] ADD EAX,ECX MOV dword ptr [RBP + -0x4],EAX JMP 0x001a45d9 LAB_001a45a7: JMP 0x001a45a9 LAB_001a45a9: MOV RAX,qword ptr [RBP + -0x28] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x28],RCX MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x10],RDX MOV byte ptr [RAX],CL MOV EAX,dword ptr [RBP + -0x3c] ADD EAX,-0x1 MOV dword ptr [RBP + -0x3c],EAX JMP 0x001a44fb LAB_001a45d9: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x70 POP RBP RET
uint my_convert(uint *param_1,uint param_2,long param_3,uint *param_4,uint param_5,long param_6, int4 *param_7) { int iVar1; int iVar2; uint local_50; uint local_44; uint *local_30; uint *local_18; uint local_c; if (((*(uint *)(param_3 + 0xc) | *(uint *)(param_6 + 0xc)) & 0x2000) == 0) { local_50 = param_5; if (param_2 < param_5) { local_50 = param_2; } local_44 = local_50; local_18 = param_1; for (local_30 = param_4; (3 < local_44 && ((*local_30 & 0x80808080) == 0)); local_30 = local_30 + 1) { *local_18 = *local_30; local_44 = local_44 - 4; local_18 = local_18 + 1; } for (; local_44 != 0; local_44 = local_44 - 1) { if (0x7f < (byte)*local_30) { iVar1 = local_50 - local_44; iVar2 = my_convert_using_func (local_18,param_2 - iVar1,param_3, *(int8 *)(*(long *)(param_3 + 0xb8) + 0x30),local_30, param_5 - iVar1,param_6,*(int8 *)(*(long *)(param_6 + 0xb8) + 0x28) ,param_7); return iVar1 + iVar2; } *(byte *)local_18 = (byte)*local_30; local_30 = (uint *)((long)local_30 + 1); local_18 = (uint *)((long)local_18 + 1); } *param_7 = 0; local_c = local_50; } else { local_c = my_convert_using_func (param_1,param_2,param_3,*(int8 *)(*(long *)(param_3 + 0xb8) + 0x30), param_4,param_5,param_6,*(int8 *)(*(long *)(param_6 + 0xb8) + 0x28), param_7); } return local_c; }
20,425
my_convert
eloqsql/strings/ctype.c
uint32 my_convert(char *to, uint32 to_length, CHARSET_INFO *to_cs, const char *from, uint32 from_length, CHARSET_INFO *from_cs, uint *errors) { uint32 length, length2; /* If any of the character sets is not ASCII compatible, immediately switch to slow mb_wc->wc_mb method. */ if ((to_cs->state | from_cs->state) & MY_CS_NONASCII) return my_convert_using_func(to, to_length, to_cs, to_cs->cset->wc_mb, from, from_length, from_cs, from_cs->cset->mb_wc, errors); length= length2= MY_MIN(to_length, from_length); #if defined(__i386__) || defined(__x86_64__) /* Special loop for i386, it allows to refer to a non-aligned memory block as UINT32, which makes it possible to copy four bytes at once. This gives about 10% performance improvement comparing to byte-by-byte loop. */ for ( ; length >= 4; length-= 4, from+= 4, to+= 4) { if ((*(uint32*)from) & 0x80808080) break; *((uint32*) to)= *((const uint32*) from); } #endif /* __i386__ */ for (; ; *to++= *from++, length--) { if (!length) { *errors= 0; return length2; } if (*((unsigned char*) from) > 0x7F) /* A non-ASCII character */ { uint32 copied_length= length2 - length; to_length-= copied_length; from_length-= copied_length; return copied_length + my_convert_using_func(to, to_length, to_cs, to_cs->cset->wc_mb, from, from_length, from_cs, from_cs->cset->mb_wc, errors); } } DBUG_ASSERT(FALSE); // Should never get to here return 0; // Make compiler happy }
O3
c
my_convert: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %r9, %rax movl %r8d, %r9d movq %rcx, %r8 movq 0x10(%rbp), %r10 movl 0xc(%rax), %ecx orl 0xc(%rdx), %ecx btl $0xd, %ecx jb 0x76910 cmpl %r9d, %esi movl %r9d, %ebx cmovbl %esi, %ebx movl %ebx, %ecx cmpl $0x4, %ebx jb 0x768e9 movl (%r8), %r11d testl $0x80808080, %r11d # imm = 0x80808080 jne 0x768ed movl %r11d, (%rdi) addl $-0x4, %ecx addq $0x4, %r8 addq $0x4, %rdi cmpl $0x3, %ecx ja 0x768ca testl %ecx, %ecx je 0x76907 movl %ecx, %r14d xorl %r15d, %r15d movb (%r8,%r15), %cl testb %cl, %cl js 0x7693d movb %cl, (%rdi,%r15) incq %r15 cmpl %r15d, %r14d jne 0x768f3 movl $0x0, (%r10) jmp 0x76982 movl %esi, %esi movq 0xb8(%rdx), %rcx movq 0x30(%rcx), %rcx movl %r9d, %r9d movq 0xb8(%rax), %r11 subq $0x8, %rsp pushq %r10 pushq 0x28(%r11) pushq %rax callq 0x7679f addq $0x28, %rsp jmp 0x76988 addl %r14d, %esi subl %ebx, %esi subl %r15d, %esi addl %r14d, %r9d subl %ebx, %r9d subl %r15d, %r9d movq 0xb8(%rdx), %rcx movq 0x30(%rcx), %rcx movq 0xb8(%rax), %r11 addq %r15, %rdi addq %r15, %r8 subq $0x8, %rsp pushq %r10 pushq 0x28(%r11) pushq %rax callq 0x7679f addq $0x20, %rsp subl %r14d, %ebx addl %r15d, %ebx addl %eax, %ebx movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
my_convert: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rax, r9 mov r9d, r8d mov r8, rcx mov r10, [rbp+arg_0] mov ecx, [rax+0Ch] or ecx, [rdx+0Ch] bt ecx, 0Dh jb short loc_76910 cmp esi, r9d mov ebx, r9d cmovb ebx, esi mov ecx, ebx cmp ebx, 4 jb short loc_768E9 loc_768CA: mov r11d, [r8] test r11d, 80808080h jnz short loc_768ED mov [rdi], r11d add ecx, 0FFFFFFFCh add r8, 4 add rdi, 4 cmp ecx, 3 ja short loc_768CA loc_768E9: test ecx, ecx jz short loc_76907 loc_768ED: mov r14d, ecx xor r15d, r15d loc_768F3: mov cl, [r8+r15] test cl, cl js short loc_7693D mov [rdi+r15], cl inc r15 cmp r14d, r15d jnz short loc_768F3 loc_76907: mov dword ptr [r10], 0 jmp short loc_76982 loc_76910: mov esi, esi mov rcx, [rdx+0B8h] mov rcx, [rcx+30h] mov r9d, r9d mov r11, [rax+0B8h] sub rsp, 8 push r10 push qword ptr [r11+28h] push rax call my_convert_using_func add rsp, 28h jmp short loc_76988 loc_7693D: add esi, r14d sub esi, ebx sub esi, r15d add r9d, r14d sub r9d, ebx sub r9d, r15d mov rcx, [rdx+0B8h] mov rcx, [rcx+30h] mov r11, [rax+0B8h] add rdi, r15 add r8, r15 sub rsp, 8 push r10 push qword ptr [r11+28h] push rax call my_convert_using_func add rsp, 20h sub ebx, r14d add ebx, r15d add ebx, eax loc_76982: mov eax, ebx add rsp, 8 loc_76988: pop rbx pop r14 pop r15 pop rbp retn
long long my_convert( _DWORD *a1, unsigned int a2, long long a3, long long a4, unsigned int a5, long long a6, _DWORD *a7) { _DWORD *v9; // r8 unsigned int v10; // ebx unsigned int v11; // ecx unsigned int v12; // r14d long long v13; // r15 char v14; // cl v9 = (_DWORD *)a4; if ( ((*(_DWORD *)(a3 + 12) | *(_DWORD *)(a6 + 12)) & 0x2000) != 0 ) return my_convert_using_func( (long long)a1, a2, a3, *(long long ( **)(long long, long long, long long, long long))(*(_QWORD *)(a3 + 184) + 48LL), a4, a5, a6, *(long long ( **)(long long, long long *, long long, unsigned long long))(*(_QWORD *)(a6 + 184) + 40LL), a7); v10 = a5; if ( a2 < a5 ) v10 = a2; v11 = v10; if ( v10 >= 4 ) { while ( (*v9 & 0x80808080) == 0 ) { *a1 = *v9; v11 -= 4; ++v9; ++a1; if ( v11 <= 3 ) goto LABEL_7; } goto LABEL_8; } LABEL_7: if ( v11 ) { LABEL_8: v12 = v11; v13 = 0LL; do { v14 = *((_BYTE *)v9 + v13); if ( v14 < 0 ) return (unsigned int)my_convert_using_func( (long long)a1 + v13, v12 + a2 - v10 - (unsigned int)v13, a3, *(long long ( **)(long long, long long, long long, long long))(*(_QWORD *)(a3 + 184) + 48LL), (long long)v9 + v13, v12 + a5 - v10 - (unsigned int)v13, a6, *(long long ( **)(long long, long long *, long long, unsigned long long))(*(_QWORD *)(a6 + 184) + 40LL), a7) + (_DWORD)v13 + v10 - v12; *((_BYTE *)a1 + v13++) = v14; } while ( v12 != (_DWORD)v13 ); } *a7 = 0; return v10; }
my_convert: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RAX,R9 MOV R9D,R8D MOV R8,RCX MOV R10,qword ptr [RBP + 0x10] MOV ECX,dword ptr [RAX + 0xc] OR ECX,dword ptr [RDX + 0xc] BT ECX,0xd JC 0x00176910 CMP ESI,R9D MOV EBX,R9D CMOVC EBX,ESI MOV ECX,EBX CMP EBX,0x4 JC 0x001768e9 LAB_001768ca: MOV R11D,dword ptr [R8] TEST R11D,0x80808080 JNZ 0x001768ed MOV dword ptr [RDI],R11D ADD ECX,-0x4 ADD R8,0x4 ADD RDI,0x4 CMP ECX,0x3 JA 0x001768ca LAB_001768e9: TEST ECX,ECX JZ 0x00176907 LAB_001768ed: MOV R14D,ECX XOR R15D,R15D LAB_001768f3: MOV CL,byte ptr [R8 + R15*0x1] TEST CL,CL JS 0x0017693d MOV byte ptr [RDI + R15*0x1],CL INC R15 CMP R14D,R15D JNZ 0x001768f3 LAB_00176907: MOV dword ptr [R10],0x0 JMP 0x00176982 LAB_00176910: MOV ESI,ESI MOV RCX,qword ptr [RDX + 0xb8] MOV RCX,qword ptr [RCX + 0x30] MOV R9D,R9D MOV R11,qword ptr [RAX + 0xb8] SUB RSP,0x8 PUSH R10 PUSH qword ptr [R11 + 0x28] PUSH RAX CALL 0x0017679f ADD RSP,0x28 JMP 0x00176988 LAB_0017693d: ADD ESI,R14D SUB ESI,EBX SUB ESI,R15D ADD R9D,R14D SUB R9D,EBX SUB R9D,R15D MOV RCX,qword ptr [RDX + 0xb8] MOV RCX,qword ptr [RCX + 0x30] MOV R11,qword ptr [RAX + 0xb8] ADD RDI,R15 ADD R8,R15 SUB RSP,0x8 PUSH R10 PUSH qword ptr [R11 + 0x28] PUSH RAX CALL 0x0017679f ADD RSP,0x20 SUB EBX,R14D ADD EBX,R15D ADD EBX,EAX LAB_00176982: MOV EAX,EBX ADD RSP,0x8 LAB_00176988: POP RBX POP R14 POP R15 POP RBP RET
ulong my_convert(uint *param_1,uint param_2,long param_3,uint *param_4,uint param_5,long param_6, int4 *param_7) { int iVar1; ulong uVar2; uint uVar3; uint uVar5; int iVar6; long lVar7; ulong uVar4; uVar2 = (ulong)param_5; if (((*(uint *)(param_6 + 0xc) | *(uint *)(param_3 + 0xc)) >> 0xd & 1) == 0) { if (param_2 < param_5) { uVar2 = (ulong)param_2; } uVar5 = (uint)uVar2; uVar3 = uVar5; uVar4 = uVar2; while (3 < uVar3) { uVar3 = (uint)uVar4; if ((*param_4 & 0x80808080) != 0) goto LAB_001768ed; *param_1 = *param_4; uVar3 = uVar3 - 4; uVar4 = (ulong)uVar3; param_4 = param_4 + 1; param_1 = param_1 + 1; } if (uVar3 != 0) { LAB_001768ed: lVar7 = 0; do { if (*(char *)((long)param_4 + lVar7) < '\0') { iVar6 = (int)lVar7; iVar1 = my_convert_using_func ((long)param_1 + lVar7,((param_2 + uVar3) - uVar5) - iVar6,param_3, *(int8 *)(*(long *)(param_3 + 0xb8) + 0x30),(long)param_4 + lVar7 ,((param_5 + uVar3) - uVar5) - iVar6,param_6, *(int8 *)(*(long *)(param_6 + 0xb8) + 0x28),param_7); return (ulong)((uVar5 - uVar3) + iVar6 + iVar1); } *(char *)((long)param_1 + lVar7) = *(char *)((long)param_4 + lVar7); lVar7 = lVar7 + 1; } while (uVar3 != (uint)lVar7); } *param_7 = 0; } else { uVar2 = my_convert_using_func (param_1,param_2,param_3,*(int8 *)(*(long *)(param_3 + 0xb8) + 0x30), param_4,uVar2,param_6,*(int8 *)(*(long *)(param_6 + 0xb8) + 0x28), param_7); } return uVar2; }
20,426
my_collation_get_by_name
eloqsql/mysys/charset.c
CHARSET_INFO * my_collation_get_by_name(MY_CHARSET_LOADER *loader, const char *name, myf flags) { uint cs_number; CHARSET_INFO *cs; my_pthread_once(&charsets_initialized, init_available_charsets); cs_number= get_collation_number(name,flags); my_charset_loader_init_mysys(loader); cs= cs_number ? get_internal_charset(loader, cs_number, flags) : NULL; if (!cs && (flags & MY_WME)) { char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)]; strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX); my_error(EE_UNKNOWN_COLLATION, MYF(ME_BELL), name, index_file); } return cs; }
O3
c
my_collation_get_by_name: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x218, %rsp # imm = 0x218 movq %rdx, %r14 movq %rsi, %rbx movq %rdi, %r15 movq %fs:0x28, %rax movq %rax, -0x20(%rbp) leaq 0x347cc3(%rip), %rdi # 0x372c00 leaq -0x7e1(%rip), %rsi # 0x2a763 callq 0x242a0 movq %rbx, %rdi movq %r14, %rsi callq 0x2a6b7 movb $0x0, (%r15) leaq -0xfc9(%rip), %rcx # 0x29f96 movq %rcx, 0x80(%r15) leaq -0xfc8(%rip), %rcx # 0x29fa5 movq %rcx, 0x88(%r15) leaq -0xfbb(%rip), %rcx # 0x29fc0 movq %rcx, 0x90(%r15) leaq -0x2ad3(%rip), %rcx # 0x284b6 movq %rcx, 0x98(%r15) leaq 0x2c8b39(%rip), %rcx # 0x2f3ad0 movq (%rcx), %rcx movq %rcx, 0xa0(%r15) leaq -0xfca(%rip), %rcx # 0x29fde movq %rcx, 0xa8(%r15) testl %eax, %eax je 0x2afc5 movq %r15, %rdi movl %eax, %esi movq %r14, %rdx callq 0x2abf2 movq %rax, %r15 jmp 0x2afc8 xorl %r15d, %r15d testq %r15, %r15 setne %al testb $0x10, %r14b sete %cl orb %al, %cl jne 0x2b012 leaq -0x230(%rbp), %r14 movq %r14, %rdi callq 0x2a523 movabsq $0x6d782e7865646e49, %rcx # imm = 0x6D782E7865646E49 movq %rcx, (%rax) movw $0x6c, 0x8(%rax) movl $0x4, %esi movl $0x1c, %edi movq %rbx, %rdx movq %r14, %rcx xorl %eax, %eax callq 0x2e7bf movq %fs:0x28, %rax cmpq -0x20(%rbp), %rax jne 0x2b032 movq %r15, %rax addq $0x218, %rsp # imm = 0x218 popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x24370
my_collation_get_by_name: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 218h mov r14, rdx mov rbx, rsi mov r15, rdi mov rax, fs:28h mov [rbp+var_20], rax lea rdi, charsets_initialized lea rsi, init_available_charsets call _pthread_once mov rdi, rbx mov rsi, r14 call get_collation_number mov byte ptr [r15], 0 lea rcx, my_once_alloc_c mov [r15+80h], rcx lea rcx, my_malloc_c mov [r15+88h], rcx lea rcx, my_realloc_c mov [r15+90h], rcx lea rcx, my_free mov [r15+98h], rcx lea rcx, my_charset_error_reporter mov rcx, [rcx] mov [r15+0A0h], rcx lea rcx, add_collation mov [r15+0A8h], rcx test eax, eax jz short loc_2AFC5 mov rdi, r15 mov esi, eax mov rdx, r14 call get_internal_charset mov r15, rax jmp short loc_2AFC8 loc_2AFC5: xor r15d, r15d loc_2AFC8: test r15, r15 setnz al test r14b, 10h setz cl or cl, al jnz short loc_2B012 lea r14, [rbp+var_230] mov rdi, r14 call get_charsets_dir mov rcx, 6D782E7865646E49h mov [rax], rcx mov word ptr [rax+8], 6Ch ; 'l' mov esi, 4 mov edi, 1Ch mov rdx, rbx mov rcx, r14 xor eax, eax call my_error loc_2B012: mov rax, fs:28h cmp rax, [rbp+var_20] jnz short loc_2B032 mov rax, r15 add rsp, 218h pop rbx pop r14 pop r15 pop rbp retn loc_2B032: call ___stack_chk_fail
long long my_collation_get_by_name(long long a1, long long a2, long long a3) { unsigned int collation_number; // eax long long internal_charset; // r15 int v6; // r8d int v7; // r9d _BYTE v9[528]; // [rsp+0h] [rbp-230h] BYREF unsigned long long v10; // [rsp+210h] [rbp-20h] v10 = __readfsqword(0x28u); pthread_once(&charsets_initialized, init_available_charsets); collation_number = get_collation_number(a2, a3); *(_BYTE *)a1 = 0; *(_QWORD *)(a1 + 128) = my_once_alloc_c; *(_QWORD *)(a1 + 136) = my_malloc_c; *(_QWORD *)(a1 + 144) = my_realloc_c; *(_QWORD *)(a1 + 152) = my_free; *(_QWORD *)(a1 + 160) = my_charset_error_reporter; *(_QWORD *)(a1 + 168) = add_collation; if ( collation_number ) internal_charset = get_internal_charset(a1, collation_number, a3); else internal_charset = 0LL; if ( internal_charset == 0 && (a3 & 0x10) != 0 ) { strcpy((char *)get_charsets_dir((long long)v9), "Index.xml"); my_error(28, 4, a2, (unsigned int)v9, v6, v7); } return internal_charset; }
my_collation_get_by_name: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x218 MOV R14,RDX MOV RBX,RSI MOV R15,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x20],RAX LEA RDI,[0x472c00] LEA RSI,[0x12a763] CALL 0x001242a0 MOV RDI,RBX MOV RSI,R14 CALL 0x0012a6b7 MOV byte ptr [R15],0x0 LEA RCX,[0x129f96] MOV qword ptr [R15 + 0x80],RCX LEA RCX,[0x129fa5] MOV qword ptr [R15 + 0x88],RCX LEA RCX,[0x129fc0] MOV qword ptr [R15 + 0x90],RCX LEA RCX,[0x1284b6] MOV qword ptr [R15 + 0x98],RCX LEA RCX,[0x3f3ad0] MOV RCX,qword ptr [RCX] MOV qword ptr [R15 + 0xa0],RCX LEA RCX,[0x129fde] MOV qword ptr [R15 + 0xa8],RCX TEST EAX,EAX JZ 0x0012afc5 MOV RDI,R15 MOV ESI,EAX MOV RDX,R14 CALL 0x0012abf2 MOV R15,RAX JMP 0x0012afc8 LAB_0012afc5: XOR R15D,R15D LAB_0012afc8: TEST R15,R15 SETNZ AL TEST R14B,0x10 SETZ CL OR CL,AL JNZ 0x0012b012 LEA R14,[RBP + -0x230] MOV RDI,R14 CALL 0x0012a523 MOV RCX,0x6d782e7865646e49 MOV qword ptr [RAX],RCX MOV word ptr [RAX + 0x8],0x6c MOV ESI,0x4 MOV EDI,0x1c MOV RDX,RBX MOV RCX,R14 XOR EAX,EAX CALL 0x0012e7bf LAB_0012b012: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x0012b032 MOV RAX,R15 ADD RSP,0x218 POP RBX POP R14 POP R15 POP RBP RET LAB_0012b032: CALL 0x00124370
long my_collation_get_by_name(int1 *param_1,int8 param_2,ulong param_3) { int iVar1; long lVar2; int8 *puVar3; long in_FS_OFFSET; int1 local_238 [528]; long local_28; local_28 = *(long *)(in_FS_OFFSET + 0x28); pthread_once(&charsets_initialized,init_available_charsets); iVar1 = get_collation_number(param_2,param_3); *param_1 = 0; *(code **)(param_1 + 0x80) = my_once_alloc_c; *(code **)(param_1 + 0x88) = my_malloc_c; *(code **)(param_1 + 0x90) = my_realloc_c; *(code **)(param_1 + 0x98) = my_free; *(int **)(param_1 + 0xa0) = my_charset_error_reporter; *(code **)(param_1 + 0xa8) = add_collation; if (iVar1 == 0) { lVar2 = 0; } else { lVar2 = get_internal_charset(param_1,iVar1,param_3); } if ((param_3 & 0x10) != 0 && lVar2 == 0) { puVar3 = (int8 *)get_charsets_dir(local_238); *puVar3 = 0x6d782e7865646e49; *(int2 *)(puVar3 + 1) = 0x6c; my_error(0x1c,4,param_2,local_238); } if (*(long *)(in_FS_OFFSET + 0x28) == local_28) { return lVar2; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
20,427
unlink_deleted_block
eloqsql/storage/maria/ma_dynrec.c
static my_bool unlink_deleted_block(MARIA_HA *info, MARIA_BLOCK_INFO *block_info) { DBUG_ENTER("unlink_deleted_block"); if (block_info->filepos == info->s->state.dellink) { /* First deleted block; We can just use this ! */ info->s->state.dellink=block_info->next_filepos; } else { MARIA_BLOCK_INFO tmp; tmp.second_read=0; /* Unlink block from the previous block */ if (!(_ma_get_block_info(info, &tmp, info->dfile.file, block_info->prev_filepos) & BLOCK_DELETED)) DBUG_RETURN(1); /* Something is wrong */ mi_sizestore(tmp.header+4,block_info->next_filepos); if (info->s->file_write(info, tmp.header+4,8, block_info->prev_filepos+4, MYF(MY_NABP))) DBUG_RETURN(1); /* Unlink block from next block */ if (block_info->next_filepos != HA_OFFSET_ERROR) { if (!(_ma_get_block_info(info, &tmp, info->dfile.file, block_info->next_filepos) & BLOCK_DELETED)) DBUG_RETURN(1); /* Something is wrong */ mi_sizestore(tmp.header+12,block_info->prev_filepos); if (info->s->file_write(info, tmp.header+12,8, block_info->next_filepos+12, MYF(MY_NABP))) DBUG_RETURN(1); } } /* We now have one less deleted block */ info->state->del--; info->state->empty-= block_info->block_len; info->s->state.split--; /* If this was a block that we where accessing through table scan (maria_rrnd() or maria_scan(), then ensure that we skip over this block when doing next maria_rrnd() or maria_scan(). */ if (info->cur_row.nextpos == block_info->filepos) info->cur_row.nextpos+= block_info->block_len; DBUG_RETURN(0); }
O0
c
unlink_deleted_block: pushq %rbp movq %rsp, %rbp subq $0xc0, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x70(%rbp) movq %rsi, -0x78(%rbp) movq -0x78(%rbp), %rax movq 0x38(%rax), %rax movq -0x70(%rbp), %rcx movq (%rcx), %rcx cmpq 0xc8(%rcx), %rax jne 0x52a93 movq -0x78(%rbp), %rax movq 0x40(%rax), %rcx movq -0x70(%rbp), %rax movq (%rax), %rax movq %rcx, 0xc8(%rax) jmp 0x52cdf movl $0x0, -0x10(%rbp) movq -0x70(%rbp), %rdi movq -0x70(%rbp), %rax movl 0x480(%rax), %edx movq -0x78(%rbp), %rax movq 0x48(%rax), %rcx leaq -0x60(%rbp), %rsi callq 0x52010 andl $0x4, %eax cmpl $0x0, %eax jne 0x52acc jmp 0x52ac3 movb $0x1, -0x61(%rbp) jmp 0x52d5c movq -0x78(%rbp), %rax movq 0x40(%rax), %rax movq %rax, -0x80(%rbp) movq -0x78(%rbp), %rax movq 0x40(%rax), %rax shrq $0x20, %rax movq %rax, -0x88(%rbp) movq -0x88(%rbp), %rax movq %rax, -0x90(%rbp) movq -0x90(%rbp), %rax movb %al, -0x59(%rbp) movq -0x90(%rbp), %rax shrq $0x8, %rax movb %al, -0x5a(%rbp) movq -0x90(%rbp), %rax shrq $0x10, %rax movb %al, -0x5b(%rbp) movq -0x90(%rbp), %rax shrq $0x18, %rax movb %al, -0x5c(%rbp) movq -0x80(%rbp), %rax movq %rax, -0x98(%rbp) movq -0x98(%rbp), %rax movb %al, -0x55(%rbp) movq -0x98(%rbp), %rax shrq $0x8, %rax movb %al, -0x56(%rbp) movq -0x98(%rbp), %rax shrq $0x10, %rax movb %al, -0x57(%rbp) movq -0x98(%rbp), %rax shrq $0x18, %rax movb %al, -0x58(%rbp) movq -0x70(%rbp), %rax movq (%rax), %rax movq 0x6e8(%rax), %rax movq -0x70(%rbp), %rdi leaq -0x60(%rbp), %rsi addq $0x4, %rsi movq -0x78(%rbp), %rcx movq 0x48(%rcx), %rcx addq $0x4, %rcx movl $0x8, %edx movl $0x4, %r8d callq *%rax cmpq $0x0, %rax je 0x52bb0 jmp 0x52ba7 movb $0x1, -0x61(%rbp) jmp 0x52d5c movq -0x78(%rbp), %rax cmpq $-0x1, 0x40(%rax) je 0x52cdd movq -0x70(%rbp), %rdi movq -0x70(%rbp), %rax movl 0x480(%rax), %edx movq -0x78(%rbp), %rax movq 0x40(%rax), %rcx leaq -0x60(%rbp), %rsi callq 0x52010 andl $0x4, %eax cmpl $0x0, %eax jne 0x52bf1 jmp 0x52be8 movb $0x1, -0x61(%rbp) jmp 0x52d5c movq -0x78(%rbp), %rax movq 0x48(%rax), %rax movq %rax, -0xa0(%rbp) movq -0x78(%rbp), %rax movq 0x48(%rax), %rax shrq $0x20, %rax movq %rax, -0xa8(%rbp) movq -0xa8(%rbp), %rax movq %rax, -0xb0(%rbp) movq -0xb0(%rbp), %rax movb %al, -0x51(%rbp) movq -0xb0(%rbp), %rax shrq $0x8, %rax movb %al, -0x52(%rbp) movq -0xb0(%rbp), %rax shrq $0x10, %rax movb %al, -0x53(%rbp) movq -0xb0(%rbp), %rax shrq $0x18, %rax movb %al, -0x54(%rbp) movq -0xa0(%rbp), %rax movq %rax, -0xb8(%rbp) movq -0xb8(%rbp), %rax movb %al, -0x4d(%rbp) movq -0xb8(%rbp), %rax shrq $0x8, %rax movb %al, -0x4e(%rbp) movq -0xb8(%rbp), %rax shrq $0x10, %rax movb %al, -0x4f(%rbp) movq -0xb8(%rbp), %rax shrq $0x18, %rax movb %al, -0x50(%rbp) movq -0x70(%rbp), %rax movq (%rax), %rax movq 0x6e8(%rax), %rax movq -0x70(%rbp), %rdi leaq -0x60(%rbp), %rsi addq $0xc, %rsi movq -0x78(%rbp), %rcx movq 0x40(%rcx), %rcx addq $0xc, %rcx movl $0x8, %edx movl $0x4, %r8d callq *%rax cmpq $0x0, %rax je 0x52cdb jmp 0x52cd2 movb $0x1, -0x61(%rbp) jmp 0x52d5c jmp 0x52cdd jmp 0x52cdf movq -0x70(%rbp), %rax movq 0x20(%rax), %rax movq 0x8(%rax), %rcx addq $-0x1, %rcx movq %rcx, 0x8(%rax) movq -0x78(%rbp), %rax movq 0x28(%rax), %rdx movq -0x70(%rbp), %rax movq 0x20(%rax), %rax movq 0x10(%rax), %rcx subq %rdx, %rcx movq %rcx, 0x10(%rax) movq -0x70(%rbp), %rax movq (%rax), %rax movq 0xc0(%rax), %rcx addq $-0x1, %rcx movq %rcx, 0xc0(%rax) movq -0x70(%rbp), %rax movq 0xa0(%rax), %rax movq -0x78(%rbp), %rcx cmpq 0x38(%rcx), %rax jne 0x52d56 movq -0x78(%rbp), %rax movq 0x28(%rax), %rcx movq -0x70(%rbp), %rax addq 0xa0(%rax), %rcx movq %rcx, 0xa0(%rax) jmp 0x52d58 movb $0x0, -0x61(%rbp) movb -0x61(%rbp), %al movb %al, -0xb9(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x52d86 movb -0xb9(%rbp), %al addq $0xc0, %rsp popq %rbp retq callq 0x2a260 nopl (%rax,%rax)
unlink_deleted_block: push rbp mov rbp, rsp sub rsp, 0C0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_70], rdi mov [rbp+var_78], rsi mov rax, [rbp+var_78] mov rax, [rax+38h] mov rcx, [rbp+var_70] mov rcx, [rcx] cmp rax, [rcx+0C8h] jnz short loc_52A93 mov rax, [rbp+var_78] mov rcx, [rax+40h] mov rax, [rbp+var_70] mov rax, [rax] mov [rax+0C8h], rcx jmp loc_52CDF loc_52A93: mov [rbp+var_10], 0 mov rdi, [rbp+var_70] mov rax, [rbp+var_70] mov edx, [rax+480h] mov rax, [rbp+var_78] mov rcx, [rax+48h] lea rsi, [rbp+var_60] call _ma_get_block_info and eax, 4 cmp eax, 0 jnz short loc_52ACC jmp short $+2 loc_52AC3: mov [rbp+var_61], 1 jmp loc_52D5C loc_52ACC: mov rax, [rbp+var_78] mov rax, [rax+40h] mov [rbp+var_80], rax mov rax, [rbp+var_78] mov rax, [rax+40h] shr rax, 20h mov [rbp+var_88], rax mov rax, [rbp+var_88] mov [rbp+var_90], rax mov rax, [rbp+var_90] mov [rbp+var_59], al mov rax, [rbp+var_90] shr rax, 8 mov [rbp+var_5A], al mov rax, [rbp+var_90] shr rax, 10h mov [rbp+var_5B], al mov rax, [rbp+var_90] shr rax, 18h mov [rbp+var_5C], al mov rax, [rbp+var_80] mov [rbp+var_98], rax mov rax, [rbp+var_98] mov [rbp+var_55], al mov rax, [rbp+var_98] shr rax, 8 mov [rbp+var_56], al mov rax, [rbp+var_98] shr rax, 10h mov [rbp+var_57], al mov rax, [rbp+var_98] shr rax, 18h mov [rbp+var_58], al mov rax, [rbp+var_70] mov rax, [rax] mov rax, [rax+6E8h] mov rdi, [rbp+var_70] lea rsi, [rbp+var_60] add rsi, 4 mov rcx, [rbp+var_78] mov rcx, [rcx+48h] add rcx, 4 mov edx, 8 mov r8d, 4 call rax cmp rax, 0 jz short loc_52BB0 jmp short $+2 loc_52BA7: mov [rbp+var_61], 1 jmp loc_52D5C loc_52BB0: mov rax, [rbp+var_78] cmp qword ptr [rax+40h], 0FFFFFFFFFFFFFFFFh jz loc_52CDD mov rdi, [rbp+var_70] mov rax, [rbp+var_70] mov edx, [rax+480h] mov rax, [rbp+var_78] mov rcx, [rax+40h] lea rsi, [rbp+var_60] call _ma_get_block_info and eax, 4 cmp eax, 0 jnz short loc_52BF1 jmp short $+2 loc_52BE8: mov [rbp+var_61], 1 jmp loc_52D5C loc_52BF1: mov rax, [rbp+var_78] mov rax, [rax+48h] mov [rbp+var_A0], rax mov rax, [rbp+var_78] mov rax, [rax+48h] shr rax, 20h mov [rbp+var_A8], rax mov rax, [rbp+var_A8] mov [rbp+var_B0], rax mov rax, [rbp+var_B0] mov [rbp+var_51], al mov rax, [rbp+var_B0] shr rax, 8 mov [rbp+var_52], al mov rax, [rbp+var_B0] shr rax, 10h mov [rbp+var_53], al mov rax, [rbp+var_B0] shr rax, 18h mov [rbp+var_54], al mov rax, [rbp+var_A0] mov [rbp+var_B8], rax mov rax, [rbp+var_B8] mov [rbp+var_4D], al mov rax, [rbp+var_B8] shr rax, 8 mov [rbp+var_4E], al mov rax, [rbp+var_B8] shr rax, 10h mov [rbp+var_4F], al mov rax, [rbp+var_B8] shr rax, 18h mov [rbp+var_50], al mov rax, [rbp+var_70] mov rax, [rax] mov rax, [rax+6E8h] mov rdi, [rbp+var_70] lea rsi, [rbp+var_60] add rsi, 0Ch mov rcx, [rbp+var_78] mov rcx, [rcx+40h] add rcx, 0Ch mov edx, 8 mov r8d, 4 call rax cmp rax, 0 jz short loc_52CDB jmp short $+2 loc_52CD2: mov [rbp+var_61], 1 jmp loc_52D5C loc_52CDB: jmp short $+2 loc_52CDD: jmp short $+2 loc_52CDF: mov rax, [rbp+var_70] mov rax, [rax+20h] mov rcx, [rax+8] add rcx, 0FFFFFFFFFFFFFFFFh mov [rax+8], rcx mov rax, [rbp+var_78] mov rdx, [rax+28h] mov rax, [rbp+var_70] mov rax, [rax+20h] mov rcx, [rax+10h] sub rcx, rdx mov [rax+10h], rcx mov rax, [rbp+var_70] mov rax, [rax] mov rcx, [rax+0C0h] add rcx, 0FFFFFFFFFFFFFFFFh mov [rax+0C0h], rcx mov rax, [rbp+var_70] mov rax, [rax+0A0h] mov rcx, [rbp+var_78] cmp rax, [rcx+38h] jnz short loc_52D56 mov rax, [rbp+var_78] mov rcx, [rax+28h] mov rax, [rbp+var_70] add rcx, [rax+0A0h] mov [rax+0A0h], rcx loc_52D56: jmp short $+2 loc_52D58: mov [rbp+var_61], 0 loc_52D5C: mov al, [rbp+var_61] mov [rbp+var_B9], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_52D86 mov al, [rbp+var_B9] add rsp, 0C0h pop rbp retn loc_52D86: call ___stack_chk_fail
char unlink_deleted_block(_QWORD *a1, _QWORD *a2, long long a3, long long a4, long long a5, int a6) { long long v6; // r8 int v7; // r9d long long v9; // [rsp+20h] [rbp-A0h] long long v10; // [rsp+40h] [rbp-80h] unsigned __int8 v12[4]; // [rsp+60h] [rbp-60h] BYREF _BYTE v13[8]; // [rsp+64h] [rbp-5Ch] BYREF _BYTE v14[68]; // [rsp+6Ch] [rbp-54h] BYREF int v15; // [rsp+B0h] [rbp-10h] unsigned long long v16; // [rsp+B8h] [rbp-8h] v16 = __readfsqword(0x28u); if ( a2[7] == *(_QWORD *)(*a1 + 200LL) ) { *(_QWORD *)(*a1 + 200LL) = a2[8]; } else { v15 = 0; if ( (ma_get_block_info((long long)a1, v12, *((unsigned int *)a1 + 288), a2[9], a5, a6) & 4) == 0 ) return 1; v10 = a2[8]; v13[2] = BYTE5(v10); v13[3] = BYTE4(v10); v13[0] = HIBYTE(v10); v13[1] = BYTE6(v10); v13[6] = BYTE1(v10); v13[7] = v10; v13[4] = BYTE3(v10); v13[5] = BYTE2(v10); if ( (*(long long ( **)(_QWORD *, _BYTE *, long long, long long, long long))(*a1 + 1768LL))( a1, v13, 8LL, a2[9] + 4LL, 4LL) ) { return 1; } if ( a2[8] != -1LL ) { if ( (ma_get_block_info((long long)a1, v12, *((unsigned int *)a1 + 288), a2[8], v6, v7) & 4) == 0 ) return 1; v9 = a2[9]; v14[2] = BYTE5(v9); v14[3] = BYTE4(v9); v14[0] = HIBYTE(v9); v14[1] = BYTE6(v9); v14[6] = BYTE1(v9); v14[7] = v9; v14[4] = BYTE3(v9); v14[5] = BYTE2(v9); if ( (*(long long ( **)(_QWORD *, _BYTE *, long long, long long, long long))(*a1 + 1768LL))( a1, v14, 8LL, a2[8] + 12LL, 4LL) ) { return 1; } } } --*(_QWORD *)(a1[4] + 8LL); *(_QWORD *)(a1[4] + 16LL) -= a2[5]; --*(_QWORD *)(*a1 + 192LL); if ( a1[20] == a2[7] ) a1[20] += a2[5]; return 0; }
unlink_deleted_block: PUSH RBP MOV RBP,RSP SUB RSP,0xc0 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 RAX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RAX + 0x38] MOV RCX,qword ptr [RBP + -0x70] MOV RCX,qword ptr [RCX] CMP RAX,qword ptr [RCX + 0xc8] JNZ 0x00152a93 MOV RAX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RAX + 0x40] MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0xc8],RCX JMP 0x00152cdf LAB_00152a93: MOV dword ptr [RBP + -0x10],0x0 MOV RDI,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RBP + -0x70] MOV EDX,dword ptr [RAX + 0x480] MOV RAX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RAX + 0x48] LEA RSI,[RBP + -0x60] CALL 0x00152010 AND EAX,0x4 CMP EAX,0x0 JNZ 0x00152acc JMP 0x00152ac3 LAB_00152ac3: MOV byte ptr [RBP + -0x61],0x1 JMP 0x00152d5c LAB_00152acc: MOV RAX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RAX + 0x40] SHR RAX,0x20 MOV qword ptr [RBP + -0x88],RAX MOV RAX,qword ptr [RBP + -0x88] MOV qword ptr [RBP + -0x90],RAX MOV RAX,qword ptr [RBP + -0x90] MOV byte ptr [RBP + -0x59],AL MOV RAX,qword ptr [RBP + -0x90] SHR RAX,0x8 MOV byte ptr [RBP + -0x5a],AL MOV RAX,qword ptr [RBP + -0x90] SHR RAX,0x10 MOV byte ptr [RBP + -0x5b],AL MOV RAX,qword ptr [RBP + -0x90] SHR RAX,0x18 MOV byte ptr [RBP + -0x5c],AL MOV RAX,qword ptr [RBP + -0x80] MOV qword ptr [RBP + -0x98],RAX MOV RAX,qword ptr [RBP + -0x98] MOV byte ptr [RBP + -0x55],AL MOV RAX,qword ptr [RBP + -0x98] SHR RAX,0x8 MOV byte ptr [RBP + -0x56],AL MOV RAX,qword ptr [RBP + -0x98] SHR RAX,0x10 MOV byte ptr [RBP + -0x57],AL MOV RAX,qword ptr [RBP + -0x98] SHR RAX,0x18 MOV byte ptr [RBP + -0x58],AL MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x6e8] MOV RDI,qword ptr [RBP + -0x70] LEA RSI,[RBP + -0x60] ADD RSI,0x4 MOV RCX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RCX + 0x48] ADD RCX,0x4 MOV EDX,0x8 MOV R8D,0x4 CALL RAX CMP RAX,0x0 JZ 0x00152bb0 JMP 0x00152ba7 LAB_00152ba7: MOV byte ptr [RBP + -0x61],0x1 JMP 0x00152d5c LAB_00152bb0: MOV RAX,qword ptr [RBP + -0x78] CMP qword ptr [RAX + 0x40],-0x1 JZ 0x00152cdd MOV RDI,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RBP + -0x70] MOV EDX,dword ptr [RAX + 0x480] MOV RAX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RAX + 0x40] LEA RSI,[RBP + -0x60] CALL 0x00152010 AND EAX,0x4 CMP EAX,0x0 JNZ 0x00152bf1 JMP 0x00152be8 LAB_00152be8: MOV byte ptr [RBP + -0x61],0x1 JMP 0x00152d5c LAB_00152bf1: MOV RAX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RAX + 0x48] MOV qword ptr [RBP + -0xa0],RAX MOV RAX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RAX + 0x48] SHR RAX,0x20 MOV qword ptr [RBP + -0xa8],RAX MOV RAX,qword ptr [RBP + -0xa8] MOV qword ptr [RBP + -0xb0],RAX MOV RAX,qword ptr [RBP + -0xb0] MOV byte ptr [RBP + -0x51],AL MOV RAX,qword ptr [RBP + -0xb0] SHR RAX,0x8 MOV byte ptr [RBP + -0x52],AL MOV RAX,qword ptr [RBP + -0xb0] SHR RAX,0x10 MOV byte ptr [RBP + -0x53],AL MOV RAX,qword ptr [RBP + -0xb0] SHR RAX,0x18 MOV byte ptr [RBP + -0x54],AL MOV RAX,qword ptr [RBP + -0xa0] MOV qword ptr [RBP + -0xb8],RAX MOV RAX,qword ptr [RBP + -0xb8] MOV byte ptr [RBP + -0x4d],AL MOV RAX,qword ptr [RBP + -0xb8] SHR RAX,0x8 MOV byte ptr [RBP + -0x4e],AL MOV RAX,qword ptr [RBP + -0xb8] SHR RAX,0x10 MOV byte ptr [RBP + -0x4f],AL MOV RAX,qword ptr [RBP + -0xb8] SHR RAX,0x18 MOV byte ptr [RBP + -0x50],AL MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x6e8] MOV RDI,qword ptr [RBP + -0x70] LEA RSI,[RBP + -0x60] ADD RSI,0xc MOV RCX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RCX + 0x40] ADD RCX,0xc MOV EDX,0x8 MOV R8D,0x4 CALL RAX CMP RAX,0x0 JZ 0x00152cdb JMP 0x00152cd2 LAB_00152cd2: MOV byte ptr [RBP + -0x61],0x1 JMP 0x00152d5c LAB_00152cdb: JMP 0x00152cdd LAB_00152cdd: JMP 0x00152cdf LAB_00152cdf: MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RAX + 0x8] ADD RCX,-0x1 MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x78] MOV RDX,qword ptr [RAX + 0x28] MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RAX + 0x10] SUB RCX,RDX MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0xc0] ADD RCX,-0x1 MOV qword ptr [RAX + 0xc0],RCX MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0xa0] MOV RCX,qword ptr [RBP + -0x78] CMP RAX,qword ptr [RCX + 0x38] JNZ 0x00152d56 MOV RAX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RAX + 0x28] MOV RAX,qword ptr [RBP + -0x70] ADD RCX,qword ptr [RAX + 0xa0] MOV qword ptr [RAX + 0xa0],RCX LAB_00152d56: JMP 0x00152d58 LAB_00152d58: MOV byte ptr [RBP + -0x61],0x0 LAB_00152d5c: MOV AL,byte ptr [RBP + -0x61] MOV byte ptr [RBP + -0xb9],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00152d86 MOV AL,byte ptr [RBP + -0xb9] ADD RSP,0xc0 POP RBP RET LAB_00152d86: CALL 0x0012a260
int8 unlink_deleted_block(long *param_1,long param_2) { int8 uVar1; int8 uVar2; uint uVar3; long lVar4; long in_FS_OFFSET; int1 local_69; int1 local_68 [4]; int1 local_64; int1 local_63; int1 local_62; int1 local_61; int1 local_60; int1 local_5f; int1 local_5e; int1 local_5d; int1 local_5c; int1 local_5b; int1 local_5a; int1 local_59; int1 local_58; int1 local_57; int1 local_56; int1 local_55; int4 local_18; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); if (*(long *)(param_2 + 0x38) == *(long *)(*param_1 + 200)) { *(int8 *)(*param_1 + 200) = *(int8 *)(param_2 + 0x40); } else { local_18 = 0; uVar3 = _ma_get_block_info(param_1,local_68,(int)param_1[0x90],*(int8 *)(param_2 + 0x48)); if ((uVar3 & 4) == 0) { local_69 = 1; goto LAB_00152d5c; } uVar1 = *(int8 *)(param_2 + 0x40); uVar2 = *(int8 *)(param_2 + 0x40); local_61 = (int1)((ulong)uVar2 >> 0x20); local_62 = (int1)((ulong)uVar2 >> 0x28); local_63 = (int1)((ulong)uVar2 >> 0x30); local_64 = (int1)((ulong)uVar2 >> 0x38); local_5d = (int1)uVar1; local_5e = (int1)((ulong)uVar1 >> 8); local_5f = (int1)((ulong)uVar1 >> 0x10); local_60 = (int1)((ulong)uVar1 >> 0x18); lVar4 = (**(code **)(*param_1 + 0x6e8))(param_1,&local_64,8,*(long *)(param_2 + 0x48) + 4,4); if (lVar4 != 0) { local_69 = 1; goto LAB_00152d5c; } if (*(long *)(param_2 + 0x40) != -1) { uVar3 = _ma_get_block_info(param_1,local_68,(int)param_1[0x90],*(int8 *)(param_2 + 0x40) ); if ((uVar3 & 4) == 0) { local_69 = 1; goto LAB_00152d5c; } uVar1 = *(int8 *)(param_2 + 0x48); uVar2 = *(int8 *)(param_2 + 0x48); local_59 = (int1)((ulong)uVar2 >> 0x20); local_5a = (int1)((ulong)uVar2 >> 0x28); local_5b = (int1)((ulong)uVar2 >> 0x30); local_5c = (int1)((ulong)uVar2 >> 0x38); local_55 = (int1)uVar1; local_56 = (int1)((ulong)uVar1 >> 8); local_57 = (int1)((ulong)uVar1 >> 0x10); local_58 = (int1)((ulong)uVar1 >> 0x18); lVar4 = (**(code **)(*param_1 + 0x6e8))(param_1,&local_5c,8,*(long *)(param_2 + 0x40) + 0xc,4) ; if (lVar4 != 0) { local_69 = 1; goto LAB_00152d5c; } } } *(long *)(param_1[4] + 8) = *(long *)(param_1[4] + 8) + -1; *(long *)(param_1[4] + 0x10) = *(long *)(param_1[4] + 0x10) - *(long *)(param_2 + 0x28); *(long *)(*param_1 + 0xc0) = *(long *)(*param_1 + 0xc0) + -1; if (param_1[0x14] == *(long *)(param_2 + 0x38)) { param_1[0x14] = *(long *)(param_2 + 0x28) + param_1[0x14]; } local_69 = 0; LAB_00152d5c: 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_69); }
20,428
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 0xd8662 movq -0x30(%rbp), %rax movq %rax, -0x50(%rbp) jmp 0xd866a 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 0xd8699 movq -0x20(%rbp), %rax cmpq -0x30(%rbp), %rax jbe 0xd8699 movq -0x30(%rbp), %rax movq %rax, -0x20(%rbp) jmp 0xd869b movq -0x40(%rbp), %rax movq %rax, %rcx addq $-0x1, %rcx movq %rcx, -0x40(%rbp) cmpq $0x0, %rax je 0xd8711 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 0xd870f 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 0xd8743 jmp 0xd869b movq -0x20(%rbp), %rax cmpq -0x30(%rbp), %rax jbe 0xd8725 movl $0x1, %eax movl %eax, -0x54(%rbp) jmp 0xd873d 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_D8662 mov rax, [rbp+var_30] mov [rbp+var_50], rax jmp short loc_D866A loc_D8662: mov rax, [rbp+var_20] mov [rbp+var_50], rax loc_D866A: 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_D8699 mov rax, [rbp+var_20] cmp rax, [rbp+var_30] jbe short loc_D8699 mov rax, [rbp+var_30] mov [rbp+var_20], rax loc_D8699: jmp short $+2 loc_D869B: mov rax, [rbp+var_40] mov rcx, rax add rcx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_40], rcx cmp rax, 0 jz short loc_D8711 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_D870F 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_D8743 loc_D870F: jmp short loc_D869B loc_D8711: mov rax, [rbp+var_20] cmp rax, [rbp+var_30] jbe short loc_D8725 mov eax, 1 mov [rbp+var_54], eax jmp short loc_D873D loc_D8725: 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_D873D: mov eax, [rbp+var_54] mov [rbp+var_4], eax loc_D8743: 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 0x001d8662 MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x50],RAX JMP 0x001d866a LAB_001d8662: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x50],RAX LAB_001d866a: 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 0x001d8699 MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x30] JBE 0x001d8699 MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x20],RAX LAB_001d8699: JMP 0x001d869b LAB_001d869b: MOV RAX,qword ptr [RBP + -0x40] MOV RCX,RAX ADD RCX,-0x1 MOV qword ptr [RBP + -0x40],RCX CMP RAX,0x0 JZ 0x001d8711 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 0x001d870f 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 0x001d8743 LAB_001d870f: JMP 0x001d869b LAB_001d8711: MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x30] JBE 0x001d8725 MOV EAX,0x1 MOV dword ptr [RBP + -0x54],EAX JMP 0x001d873d LAB_001d8725: 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_001d873d: MOV EAX,dword ptr [RBP + -0x54] MOV dword ptr [RBP + -0x4],EAX LAB_001d8743: 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); }
20,429
get_collation_number_internal
eloqsql/mysys/charset.c
static uint get_collation_number_internal(const char *name) { CHARSET_INFO **cs; for (cs= all_charsets; cs < all_charsets + array_elements(all_charsets); cs++) { if (cs[0] && cs[0]->coll_name.str && !my_strcasecmp(&my_charset_latin1, cs[0]->coll_name.str, name)) return cs[0]->number; } return 0; }
O3
c
get_collation_number_internal: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdi, %rbx movq $-0x8, %r15 leaq 0x340291(%rip), %r12 # 0x36ab90 leaq 0x2ef10a(%rip), %r14 # 0x319a10 movq 0x8(%r12,%r15), %rax testq %rax, %rax je 0x2a92d movq 0x20(%rax), %rsi testq %rsi, %rsi je 0x2a92d movq 0xc0(%r14), %rax movq %r14, %rdi movq %rbx, %rdx callq *0x40(%rax) testl %eax, %eax je 0x2a93e addq $0x8, %r15 cmpq $0x3ff8, %r15 # imm = 0x3FF8 jb 0x2a906 xorl %eax, %eax jmp 0x2a945 movq 0x8(%r12,%r15), %rax movl (%rax), %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
get_collation_number_internal: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rdi mov r15, 0FFFFFFFFFFFFFFF8h lea r12, all_charsets lea r14, my_charset_latin1 loc_2A906: mov rax, [r12+r15+8] test rax, rax jz short loc_2A92D mov rsi, [rax+20h] test rsi, rsi jz short loc_2A92D mov rax, [r14+0C0h] mov rdi, r14 mov rdx, rbx call qword ptr [rax+40h] test eax, eax jz short loc_2A93E loc_2A92D: add r15, 8 cmp r15, 3FF8h jb short loc_2A906 xor eax, eax jmp short loc_2A945 loc_2A93E: mov rax, [r12+r15+8] mov eax, [rax] loc_2A945: pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long get_collation_number_internal(long long a1) { long long v1; // r15 long long v2; // rax long long v3; // rsi v1 = 0x1FFFFFFFFFFFFFFFLL; while ( 1 ) { v2 = all_charsets[v1 + 1]; if ( v2 ) { v3 = *(_QWORD *)(v2 + 32); if ( v3 ) { if ( !(*(unsigned int ( **)(void *, long long, long long))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))( &my_charset_latin1, v3, a1) ) break; } } if ( (unsigned long long)++v1 >= 2047 ) return 0LL; } return *(unsigned int *)all_charsets[v1 + 1]; }
get_collation_number_internal: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RDI MOV R15,-0x8 LEA R12,[0x46ab90] LEA R14,[0x419a10] LAB_0012a906: MOV RAX,qword ptr [R12 + R15*0x1 + 0x8] TEST RAX,RAX JZ 0x0012a92d MOV RSI,qword ptr [RAX + 0x20] TEST RSI,RSI JZ 0x0012a92d MOV RAX,qword ptr [R14 + 0xc0] MOV RDI,R14 MOV RDX,RBX CALL qword ptr [RAX + 0x40] TEST EAX,EAX JZ 0x0012a93e LAB_0012a92d: ADD R15,0x8 CMP R15,0x3ff8 JC 0x0012a906 XOR EAX,EAX JMP 0x0012a945 LAB_0012a93e: MOV RAX,qword ptr [R12 + R15*0x1 + 0x8] MOV EAX,dword ptr [RAX] LAB_0012a945: POP RBX POP R12 POP R14 POP R15 POP RBP RET
int4 get_collation_number_internal(int8 param_1) { long lVar1; int iVar2; ulong uVar3; uVar3 = 0xfffffffffffffff8; while (((*(long *)((long)&DAT_0046ab98 + uVar3) == 0 || (lVar1 = *(long *)(*(long *)((long)&DAT_0046ab98 + uVar3) + 0x20), lVar1 == 0)) || (iVar2 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_00419ad0 + 0x40)) (&my_charset_latin1,lVar1,param_1), iVar2 != 0))) { uVar3 = uVar3 + 8; if (0x3ff7 < uVar3) { return 0; } } return **(int4 **)((long)&DAT_0046ab98 + uVar3); }
20,430
Generator::gen_term(NodeTerm const*)
BhuvanGudi[P]LexiParse/src/generation.hpp
void gen_term(const NodeTerm* term) { struct TermVisitor { Generator& gen; void operator()(const NodeTermIntLit* term_int_lit) const { gen.m_output << " mov rax, " << term_int_lit->int_lit.value.value() << "\n"; gen.push("rax"); } void operator()(const NodeTermIdent* term_ident) const { const auto it = std::ranges::find_if(std::as_const(gen.m_vars), [&](const Var& var) { return var.name == term_ident->ident.value.value(); }); if (it == gen.m_vars.cend()) { std::cerr << "Undeclared identifier: " << term_ident->ident.value.value() << std::endl; exit(EXIT_FAILURE); } std::stringstream offset; offset << "QWORD [rsp + " << (gen.m_stack_size - it->stack_loc - 1) * 8 << "]"; gen.push(offset.str()); } void operator()(const NodeTermParen* term_paren) const { gen.gen_expr(term_paren->expr); } }; TermVisitor visitor({ .gen = *this }); std::visit(visitor, term->var); }
O0
cpp
Generator::gen_term(NodeTerm const*): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rsi leaq -0x18(%rbp), %rdi callq 0x117a0 addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
_ZN9Generator8gen_termEPK8NodeTerm: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_18], rax mov rsi, [rbp+var_10] lea rdi, [rbp+var_18] call _ZSt5visitIRZN9Generator8gen_termEPK8NodeTermE11TermVisitorJRKSt7variantIJP14NodeTermIntLitP13NodeTermIdentP13NodeTermParenEEEENSt13invoke_resultIT_JDpNSt11conditionalIX21is_lvalue_reference_vIT0_EERNSt19variant_alternativeILm0ENSt16remove_referenceIDTclsr9__variantE4__asclsr3stdE7declvalISJ_EEEEE4typeEE4typeEOSQ_E4typeEEE4typeEOSH_DpOSJ_ add rsp, 20h pop rbp retn
long long Generator::gen_term(long long a1, long long a2) { _QWORD v3[3]; // [rsp+8h] [rbp-18h] BYREF v3[2] = a1; v3[1] = a2; v3[0] = a1; return std::visit<Generator::gen_term(NodeTerm const*)::TermVisitor &,std::variant<NodeTermIntLit *,NodeTermIdent *,NodeTermParen *> const&>( v3, a2); }
gen_term: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RAX MOV RSI,qword ptr [RBP + -0x10] LEA RDI,[RBP + -0x18] CALL 0x001117a0 ADD RSP,0x20 POP RBP RET
/* Generator::gen_term(NodeTerm const*) */ void __thiscall Generator::gen_term(Generator *this,NodeTerm *param_1) { Generator *local_20; NodeTerm *local_18; Generator *local_10; local_20 = this; local_18 = param_1; local_10 = this; std:: visit<Generator::gen_term(NodeTerm_const*)::TermVisitor&,std::variant<NodeTermIntLit*,NodeTermIdent*,NodeTermParen*>const&> ((TermVisitor *)&local_20,(variant *)param_1); return; }
20,431
DisableCursor
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/platforms/rcore_desktop_glfw.c
void DisableCursor(void) { glfwSetInputMode(platform.handle, GLFW_CURSOR, GLFW_CURSOR_DISABLED); // Set cursor position in the middle SetMousePosition(CORE.Window.screen.width/2, CORE.Window.screen.height/2); if (glfwRawMouseMotionSupported()) glfwSetInputMode(platform.handle, GLFW_RAW_MOUSE_MOTION, GLFW_TRUE); CORE.Input.Mouse.cursorHidden = true; }
O3
c
DisableCursor: pushq %rax movq 0xcc054(%rip), %rdi # 0x13c6a8 movl $0x33001, %esi # imm = 0x33001 movl $0x34003, %edx # imm = 0x34003 callq 0xbcedd movq 0xcb581(%rip), %xmm0 # 0x13bbec psrld $0x1, %xmm0 cvtdq2ps %xmm0, %xmm1 movaps %xmm1, %xmm0 movlhps %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0] movups %xmm0, 0xcbc9c(%rip) # 0x13c31c movq 0xcc021(%rip), %rdi # 0x13c6a8 xorps %xmm0, %xmm0 cvtss2sd %xmm1, %xmm0 shufps $0x55, %xmm1, %xmm1 # xmm1 = xmm1[1,1,1,1] cvtss2sd %xmm1, %xmm1 callq 0xbd456 callq 0xbd1ba testl %eax, %eax je 0x706ba movq 0xcbffd(%rip), %rdi # 0x13c6a8 movl $0x33005, %esi # imm = 0x33005 movl $0x1, %edx callq 0xbcedd movb $0x1, 0xcbc6f(%rip) # 0x13c330 popq %rax retq
DisableCursor: push rax mov rdi, cs:platform_0 mov esi, offset loc_33001 mov edx, 34003h call glfwSetInputMode movq xmm0, cs:qword_13BBEC psrld xmm0, 1 cvtdq2ps xmm1, xmm0 movaps xmm0, xmm1 movlhps xmm0, xmm1 movups cs:xmmword_13C31C, xmm0 mov rdi, cs:platform_0 xorps xmm0, xmm0 cvtss2sd xmm0, xmm1 shufps xmm1, xmm1, 55h ; 'U' cvtss2sd xmm1, xmm1 call glfwSetCursorPos call glfwRawMouseMotionSupported test eax, eax jz short loc_706BA mov rdi, cs:platform_0 mov esi, 33005h mov edx, 1 call glfwSetInputMode loc_706BA: mov cs:byte_13C330, 1 pop rax retn
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm0,xmm4,xmm5> DisableCursor() { __m128 v0; // xmm1 glfwSetInputMode(platform_0, &loc_33001, 212995LL); v0 = _mm_cvtepi32_ps(_mm_srli_epi32(_mm_loadl_epi64((const __m128i *)&qword_13BBEC), 1u)); xmmword_13C31C = (__int128)_mm_movelh_ps(v0, v0); glfwSetCursorPos(platform_0, v0.m128_f32[0], _mm_shuffle_ps(v0, v0, 85).m128_f32[0]); if ( (unsigned int)glfwRawMouseMotionSupported() ) glfwSetInputMode(platform_0, 208901LL, 1LL); byte_13C330 = 1; }
DisableCursor: PUSH RAX MOV RDI,qword ptr [0x0023c6a8] MOV ESI,0x33001 MOV EDX,0x34003 CALL 0x001bcedd MOVQ XMM0,qword ptr [0x0023bbec] PSRLD XMM0,0x1 CVTDQ2PS XMM1,XMM0 MOVAPS XMM0,XMM1 MOVLHPS XMM0,XMM1 MOVUPS xmmword ptr [0x0023c31c],XMM0 MOV RDI,qword ptr [0x0023c6a8] XORPS XMM0,XMM0 CVTSS2SD XMM0,XMM1 SHUFPS XMM1,XMM1,0x55 CVTSS2SD XMM1,XMM1 CALL 0x001bd456 CALL 0x001bd1ba TEST EAX,EAX JZ 0x001706ba MOV RDI,qword ptr [0x0023c6a8] MOV ESI,0x33005 MOV EDX,0x1 CALL 0x001bcedd LAB_001706ba: MOV byte ptr [0x0023c330],0x1 POP RAX RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int8 DisableCursor(void) { int iVar1; int8 in_RAX; float fVar2; float fVar3; glfwSetInputMode(platform_0,0x33001,0x34003); fVar2 = (float)(DAT_0023bbec >> 1); fVar3 = (float)(DAT_0023bbf0 >> 1); _DAT_0023c324 = CONCAT44(fVar3,fVar2); DAT_0023c31c = CONCAT44(fVar3,fVar2); glfwSetCursorPos((double)(DAT_0023bbec >> 1),(double)(DAT_0023bbf0 >> 1),platform_0); iVar1 = glfwRawMouseMotionSupported(); if (iVar1 != 0) { glfwSetInputMode(platform_0,0x33005,1); } DAT_0023c330 = 1; return in_RAX; }
20,432
hash_params_parse(int, char const**, hash_params&)
monkey531[P]llama/examples/gguf-hash/gguf-hash.cpp
static bool hash_params_parse(int argc, const char ** argv, hash_params & params) { bool result = true; try { hash_params_parse_ex(argc, argv, params); } catch (const std::invalid_argument & ex) { fprintf(stderr, "%s\n", ex.what()); hash_print_usage(argv[0]); exit(EXIT_FAILURE); } return result; }
O0
cpp
hash_params_parse(int, char const**, hash_params&): subq $0x48, %rsp movl %edi, 0x44(%rsp) movq %rsi, 0x38(%rsp) movq %rdx, 0x30(%rsp) movb $0x1, 0x2f(%rsp) movl 0x44(%rsp), %edi movq 0x38(%rsp), %rsi movq 0x30(%rsp), %rdx callq 0x5800 jmp 0x388c jmp 0x391e movq %rax, %rcx movl %edx, %eax movq %rcx, 0x20(%rsp) movl %eax, 0x1c(%rsp) movl 0x1c(%rsp), %eax movl $0x1, %ecx cmpl %ecx, %eax jne 0x3929 movq 0x20(%rsp), %rdi callq 0x30d0 movq %rax, 0x10(%rsp) movq 0x1170e(%rip), %rax # 0x14fd0 movq (%rax), %rax movq %rax, 0x8(%rsp) movq 0x10(%rsp), %rdi movq (%rdi), %rax movq 0x10(%rax), %rax callq *%rax movq 0x8(%rsp), %rdi movq %rax, %rdx leaq 0xda63(%rip), %rsi # 0x1134a xorl %eax, %eax callq 0x3340 movq 0x38(%rsp), %rax movq (%rax), %rdi callq 0x5ec0 jmp 0x38fd movl $0x1, %edi callq 0x3290 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x20(%rsp) movl %eax, 0x1c(%rsp) callq 0x33b0 jmp 0x391c jmp 0x3929 movb 0x2f(%rsp), %al andb $0x1, %al addq $0x48, %rsp retq movq 0x20(%rsp), %rdi callq 0x3410 movq %rax, %rdi callq 0x6510 nopl (%rax,%rax)
_ZL17hash_params_parseiPPKcR11hash_params: sub rsp, 48h mov [rsp+48h+var_4], edi mov [rsp+48h+var_10], rsi mov [rsp+48h+var_18], rdx mov [rsp+48h+var_19], 1 mov edi, [rsp+48h+var_4]; int mov rsi, [rsp+48h+var_10]; char ** mov rdx, [rsp+48h+var_18]; hash_params * call _ZL20hash_params_parse_exiPPKcR11hash_params; hash_params_parse_ex(int,char const**,hash_params &) jmp short $+2 loc_388C: jmp loc_391E mov rcx, rax mov eax, edx mov [rsp+48h+var_28], rcx mov [rsp+48h+var_2C], eax mov eax, [rsp+48h+var_2C] mov ecx, 1 cmp eax, ecx jnz short loc_3929 mov rdi, [rsp+48h+var_28]; void * call ___cxa_begin_catch mov [rsp+48h+var_38], rax mov rax, cs:stderr_ptr mov rax, [rax] mov [rsp+48h+var_40], rax mov rdi, [rsp+48h+var_38] mov rax, [rdi] mov rax, [rax+10h] call rax mov rdi, [rsp+48h+var_40] mov rdx, rax lea rsi, a8sSSS+12h; "%s\n" xor eax, eax call _fprintf mov rax, [rsp+48h+var_10] mov rdi, [rax]; char * call _ZL16hash_print_usagePKc; hash_print_usage(char const*) jmp short $+2 loc_38FD: mov edi, 1 call _exit mov rcx, rax mov eax, edx mov [rsp+48h+var_28], rcx mov [rsp+48h+var_2C], eax call ___cxa_end_catch jmp short $+2 loc_391C: jmp short loc_3929 loc_391E: mov al, [rsp+48h+var_19] and al, 1 add rsp, 48h retn loc_3929: mov rdi, [rsp+48h+var_28] call __Unwind_Resume mov rdi, rax call __clang_call_terminate
char hash_params_parse(int a1, const char **a2, hash_params *a3) { hash_params_parse_ex(a1, a2, a3); return 1; }
hash_params_parse: SUB RSP,0x48 MOV dword ptr [RSP + 0x44],EDI MOV qword ptr [RSP + 0x38],RSI MOV qword ptr [RSP + 0x30],RDX MOV byte ptr [RSP + 0x2f],0x1 MOV EDI,dword ptr [RSP + 0x44] MOV RSI,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x30] LAB_00103885: CALL 0x00105800 LAB_0010388a: JMP 0x0010388c LAB_0010388c: JMP 0x0010391e LAB_0010391e: MOV AL,byte ptr [RSP + 0x2f] AND AL,0x1 ADD RSP,0x48 RET
/* hash_params_parse(int, char const**, hash_params&) */ int1 hash_params_parse(int param_1,char **param_2,hash_params *param_3) { /* try { // try from 00103885 to 00103889 has its CatchHandler @ 00103891 */ hash_params_parse_ex(param_1,param_2,param_3); return 1; }
20,433
pfs_start_table_io_wait_v1
eloqsql/storage/perfschema/pfs.cc
PSI_table_locker* pfs_start_table_io_wait_v1(PSI_table_locker_state *state, PSI_table *table, PSI_table_io_operation op, uint index, const char *src_file, uint src_line) { assert(static_cast<int> (op) >= 0); assert(static_cast<uint> (op) < array_elements(table_io_operation_map)); assert(state != NULL); PFS_table *pfs_table= reinterpret_cast<PFS_table*> (table); assert(pfs_table != NULL); assert(pfs_table->m_share != NULL); if (! pfs_table->m_io_enabled) return NULL; PFS_thread *pfs_thread= my_thread_get_THR_PFS(); uint flags; ulonglong timer_start= 0; if (flag_thread_instrumentation) { if (pfs_thread == NULL) return NULL; if (! pfs_thread->m_enabled) return NULL; state->m_thread= reinterpret_cast<PSI_thread *> (pfs_thread); flags= STATE_FLAG_THREAD; if (pfs_table->m_io_timed) { timer_start= get_timer_raw_value_and_function(wait_timer, & state->m_timer); state->m_timer_start= timer_start; flags|= STATE_FLAG_TIMED; } if (flag_events_waits_current) { if (unlikely(pfs_thread->m_events_waits_current >= & pfs_thread->m_events_waits_stack[WAIT_STACK_SIZE])) { locker_lost++; return NULL; } PFS_events_waits *wait= pfs_thread->m_events_waits_current; state->m_wait= wait; flags|= STATE_FLAG_EVENT; PFS_events_waits *parent_event= wait - 1; wait->m_event_type= EVENT_TYPE_WAIT; wait->m_nesting_event_id= parent_event->m_event_id; wait->m_nesting_event_type= parent_event->m_event_type; PFS_table_share *share= pfs_table->m_share; wait->m_thread_internal_id= pfs_thread->m_thread_internal_id; wait->m_class= &global_table_io_class; wait->m_timer_start= timer_start; wait->m_timer_end= 0; wait->m_object_instance_addr= pfs_table->m_identity; wait->m_event_id= pfs_thread->m_event_id++; wait->m_end_event_id= 0; wait->m_operation= table_io_operation_map[static_cast<int> (op)]; wait->m_flags= 0; wait->m_object_type= share->get_object_type(); wait->m_weak_table_share= share; wait->m_weak_version= share->get_version(); wait->m_index= index; wait->m_source_file= src_file; wait->m_source_line= src_line; wait->m_wait_class= WAIT_CLASS_TABLE; pfs_thread->m_events_waits_current++; } } else { if (pfs_table->m_io_timed) { timer_start= get_timer_raw_value_and_function(wait_timer, & state->m_timer); state->m_timer_start= timer_start; flags= STATE_FLAG_TIMED; } else { /* TODO: consider a shortcut here */ flags= 0; } } state->m_flags= flags; state->m_table= table; state->m_io_operation= op; state->m_index= index; return reinterpret_cast<PSI_table_locker*> (state); }
O0
cpp
pfs_start_table_io_wait_v1: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movl %ecx, -0x20(%rbp) movq %r8, -0x28(%rbp) movl %r9d, -0x2c(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax testb $0x1, (%rax) jne 0x4713c movq $0x0, -0x8(%rbp) jmp 0x4742f callq 0x455e0 movq %rax, -0x40(%rbp) movq $0x0, -0x50(%rbp) leaq 0x3c6e6c(%rip), %rax # 0x40dfc0 testb $0x1, (%rax) je 0x473bc cmpq $0x0, -0x40(%rbp) jne 0x47171 movq $0x0, -0x8(%rbp) jmp 0x4742f movq -0x40(%rbp), %rax testb $0x1, 0x7e0(%rax) jne 0x4718b movq $0x0, -0x8(%rbp) jmp 0x4742f movq -0x40(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x18(%rax) movl $0x2, -0x44(%rbp) movq -0x38(%rbp), %rax testb $0x1, 0x2(%rax) je 0x471d7 leaq 0x1cc20d(%rip), %rax # 0x2133bc movl (%rax), %edi movq -0x10(%rbp), %rsi addq $0x28, %rsi callq 0x42c00 movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x20(%rax) movl -0x44(%rbp), %eax orl $0x1, %eax movl %eax, -0x44(%rbp) leaq 0x3c6ce2(%rip), %rax # 0x40dec0 testb $0x1, (%rax) je 0x473ba movq -0x40(%rbp), %rax movq 0x7f0(%rax), %rax movq -0x40(%rbp), %rcx addq $0x878, %rcx # imm = 0x878 addq $0x420, %rcx # imm = 0x420 cmpq %rcx, %rax setae %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x47239 leaq 0x3c2c2d(%rip), %rax # 0x409e48 movq (%rax), %rcx addq $0x1, %rcx leaq 0x3c2c1f(%rip), %rax # 0x409e48 movq %rcx, (%rax) movq $0x0, -0x8(%rbp) jmp 0x4742f movq -0x40(%rbp), %rax movq 0x7f0(%rax), %rax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x30(%rax) movl -0x44(%rbp), %eax orl $0x4, %eax movl %eax, -0x44(%rbp) movq -0x58(%rbp), %rax addq $-0xb0, %rax movq %rax, -0x60(%rbp) movq -0x58(%rbp), %rax movl $0x4, 0x18(%rax) movq -0x60(%rbp), %rax movq 0x8(%rax), %rcx movq -0x58(%rbp), %rax movq %rcx, 0x20(%rax) movq -0x60(%rbp), %rax movl 0x18(%rax), %ecx movq -0x58(%rbp), %rax movl %ecx, 0x28(%rax) movq -0x38(%rbp), %rax movq 0x20(%rax), %rax movq %rax, -0x68(%rbp) movq -0x40(%rbp), %rax movq 0x850(%rax), %rcx movq -0x58(%rbp), %rax movq %rcx, (%rax) movq -0x58(%rbp), %rax leaq 0x3c3183(%rip), %rcx # 0x40a440 movq %rcx, 0x30(%rax) movq -0x50(%rbp), %rcx movq -0x58(%rbp), %rax movq %rcx, 0x38(%rax) movq -0x58(%rbp), %rax movq $0x0, 0x40(%rax) movq -0x38(%rbp), %rax movq 0x28(%rax), %rcx movq -0x58(%rbp), %rax movq %rcx, 0x88(%rax) movq -0x40(%rbp), %rax movq 0x7f8(%rax), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, 0x7f8(%rax) movq -0x58(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x58(%rbp), %rax movq $0x0, 0x10(%rax) movslq -0x1c(%rbp), %rcx leaq 0x1cc0ec(%rip), %rax # 0x213410 movl (%rax,%rcx,4), %ecx movq -0x58(%rbp), %rax movl %ecx, 0x90(%rax) movq -0x58(%rbp), %rax movq $0x0, 0xa8(%rax) movq -0x68(%rbp), %rdi callq 0x4e2c0 movl %eax, %ecx movq -0x58(%rbp), %rax movl %ecx, 0x5c(%rax) movq -0x68(%rbp), %rcx movq -0x58(%rbp), %rax movq %rcx, 0x60(%rax) movq -0x68(%rbp), %rdi callq 0x4e2e0 movl %eax, %ecx movq -0x58(%rbp), %rax movl %ecx, 0x80(%rax) movl -0x20(%rbp), %ecx movq -0x58(%rbp), %rax movl %ecx, 0xa0(%rax) movq -0x28(%rbp), %rcx movq -0x58(%rbp), %rax movq %rcx, 0x48(%rax) movl -0x2c(%rbp), %ecx movq -0x58(%rbp), %rax movl %ecx, 0x50(%rax) movq -0x58(%rbp), %rax movl $0x4, 0x58(%rax) movq -0x40(%rbp), %rax movq 0x7f0(%rax), %rcx addq $0xb0, %rcx movq %rcx, 0x7f0(%rax) jmp 0x473fe movq -0x38(%rbp), %rax testb $0x1, 0x2(%rax) je 0x473f5 leaq 0x1cbfef(%rip), %rax # 0x2133bc movl (%rax), %edi movq -0x10(%rbp), %rsi addq $0x28, %rsi callq 0x42c00 movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x20(%rax) movl $0x1, -0x44(%rbp) jmp 0x473fc movl $0x0, -0x44(%rbp) jmp 0x473fe movl -0x44(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movq -0x18(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movl -0x1c(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x4(%rax) movl -0x20(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x38(%rax) movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x70, %rsp popq %rbp retq nopl (%rax)
pfs_start_table_io_wait_v1: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_20], ecx mov [rbp+var_28], r8 mov [rbp+var_2C], r9d mov rax, [rbp+var_18] mov [rbp+var_38], rax mov rax, [rbp+var_38] test byte ptr [rax], 1 jnz short loc_4713C mov [rbp+var_8], 0 jmp loc_4742F loc_4713C: call _ZL21my_thread_get_THR_PFSv; my_thread_get_THR_PFS(void) mov [rbp+var_40], rax mov [rbp+var_50], 0 lea rax, flag_thread_instrumentation test byte ptr [rax], 1 jz loc_473BC cmp [rbp+var_40], 0 jnz short loc_47171 mov [rbp+var_8], 0 jmp loc_4742F loc_47171: mov rax, [rbp+var_40] test byte ptr [rax+7E0h], 1 jnz short loc_4718B mov [rbp+var_8], 0 jmp loc_4742F loc_4718B: mov rcx, [rbp+var_40] mov rax, [rbp+var_10] mov [rax+18h], rcx mov [rbp+var_44], 2 mov rax, [rbp+var_38] test byte ptr [rax+2], 1 jz short loc_471D7 lea rax, wait_timer mov edi, [rax] mov rsi, [rbp+var_10] add rsi, 28h ; '(' call _Z32get_timer_raw_value_and_function15enum_timer_namePPFyvE; get_timer_raw_value_and_function(enum_timer_name,ulong long (**)(void)) mov [rbp+var_50], rax mov rcx, [rbp+var_50] mov rax, [rbp+var_10] mov [rax+20h], rcx mov eax, [rbp+var_44] or eax, 1 mov [rbp+var_44], eax loc_471D7: lea rax, flag_events_waits_current test byte ptr [rax], 1 jz loc_473BA mov rax, [rbp+var_40] mov rax, [rax+7F0h] mov rcx, [rbp+var_40] add rcx, 878h add rcx, 420h cmp rax, rcx setnb al and al, 1 movzx eax, al cmp eax, 0 jz short loc_47239 lea rax, locker_lost mov rcx, [rax] add rcx, 1 lea rax, locker_lost mov [rax], rcx mov [rbp+var_8], 0 jmp loc_4742F loc_47239: mov rax, [rbp+var_40] mov rax, [rax+7F0h] mov [rbp+var_58], rax mov rcx, [rbp+var_58] mov rax, [rbp+var_10] mov [rax+30h], rcx mov eax, [rbp+var_44] or eax, 4 mov [rbp+var_44], eax mov rax, [rbp+var_58] add rax, 0FFFFFFFFFFFFFF50h mov [rbp+var_60], rax mov rax, [rbp+var_58] mov dword ptr [rax+18h], 4 mov rax, [rbp+var_60] mov rcx, [rax+8] mov rax, [rbp+var_58] mov [rax+20h], rcx mov rax, [rbp+var_60] mov ecx, [rax+18h] mov rax, [rbp+var_58] mov [rax+28h], ecx mov rax, [rbp+var_38] mov rax, [rax+20h] mov [rbp+var_68], rax mov rax, [rbp+var_40] mov rcx, [rax+850h] mov rax, [rbp+var_58] mov [rax], rcx mov rax, [rbp+var_58] lea rcx, global_table_io_class mov [rax+30h], rcx mov rcx, [rbp+var_50] mov rax, [rbp+var_58] mov [rax+38h], rcx mov rax, [rbp+var_58] mov qword ptr [rax+40h], 0 mov rax, [rbp+var_38] mov rcx, [rax+28h] mov rax, [rbp+var_58] mov [rax+88h], rcx mov rax, [rbp+var_40] mov rcx, [rax+7F8h] mov rdx, rcx add rdx, 1 mov [rax+7F8h], rdx mov rax, [rbp+var_58] mov [rax+8], rcx mov rax, [rbp+var_58] mov qword ptr [rax+10h], 0 movsxd rcx, [rbp+var_1C] lea rax, _ZL22table_io_operation_map; table_io_operation_map mov ecx, [rax+rcx*4] mov rax, [rbp+var_58] mov [rax+90h], ecx mov rax, [rbp+var_58] mov qword ptr [rax+0A8h], 0 mov rdi, [rbp+var_68]; this call _ZN15PFS_table_share15get_object_typeEv; PFS_table_share::get_object_type(void) mov ecx, eax mov rax, [rbp+var_58] mov [rax+5Ch], ecx mov rcx, [rbp+var_68] mov rax, [rbp+var_58] mov [rax+60h], rcx mov rdi, [rbp+var_68]; this call _ZN15PFS_table_share11get_versionEv; PFS_table_share::get_version(void) mov ecx, eax mov rax, [rbp+var_58] mov [rax+80h], ecx mov ecx, [rbp+var_20] mov rax, [rbp+var_58] mov [rax+0A0h], ecx mov rcx, [rbp+var_28] mov rax, [rbp+var_58] mov [rax+48h], rcx mov ecx, [rbp+var_2C] mov rax, [rbp+var_58] mov [rax+50h], ecx mov rax, [rbp+var_58] mov dword ptr [rax+58h], 4 mov rax, [rbp+var_40] mov rcx, [rax+7F0h] add rcx, 0B0h mov [rax+7F0h], rcx loc_473BA: jmp short loc_473FE loc_473BC: mov rax, [rbp+var_38] test byte ptr [rax+2], 1 jz short loc_473F5 lea rax, wait_timer mov edi, [rax] mov rsi, [rbp+var_10] add rsi, 28h ; '(' call _Z32get_timer_raw_value_and_function15enum_timer_namePPFyvE; get_timer_raw_value_and_function(enum_timer_name,ulong long (**)(void)) mov [rbp+var_50], rax mov rcx, [rbp+var_50] mov rax, [rbp+var_10] mov [rax+20h], rcx mov [rbp+var_44], 1 jmp short loc_473FC loc_473F5: mov [rbp+var_44], 0 loc_473FC: jmp short $+2 loc_473FE: mov ecx, [rbp+var_44] mov rax, [rbp+var_10] mov [rax], ecx mov rcx, [rbp+var_18] mov rax, [rbp+var_10] mov [rax+8], rcx mov ecx, [rbp+var_1C] mov rax, [rbp+var_10] mov [rax+4], ecx mov ecx, [rbp+var_20] mov rax, [rbp+var_10] mov [rax+38h], ecx mov rax, [rbp+var_10] mov [rbp+var_8], rax loc_4742F: mov rax, [rbp+var_8] add rsp, 70h pop rbp retn
long long pfs_start_table_io_wait_v1(long long a1, long long a2, int a3, int a4, long long a5, int a6) { long long v6; // rcx PFS_table_share *v8; // [rsp+8h] [rbp-68h] long long v9; // [rsp+18h] [rbp-58h] unsigned long long timer_raw_value_and_function; // [rsp+20h] [rbp-50h] int v11; // [rsp+2Ch] [rbp-44h] long long THR_PFS; // [rsp+30h] [rbp-40h] if ( (*(_BYTE *)a2 & 1) != 0 ) { THR_PFS = my_thread_get_THR_PFS(); timer_raw_value_and_function = 0LL; if ( (flag_thread_instrumentation & 1) != 0 ) { if ( !THR_PFS ) return 0LL; if ( (*(_BYTE *)(THR_PFS + 2016) & 1) == 0 ) return 0LL; *(_QWORD *)(a1 + 24) = THR_PFS; v11 = 2; if ( (*(_BYTE *)(a2 + 2) & 1) != 0 ) { timer_raw_value_and_function = get_timer_raw_value_and_function( (unsigned int)wait_timer, (unsigned long long (**)(void))(a1 + 40)); *(_QWORD *)(a1 + 32) = timer_raw_value_and_function; v11 = 3; } if ( (flag_events_waits_current & 1) != 0 ) { if ( *(_QWORD *)(THR_PFS + 2032) >= (unsigned long long)(THR_PFS + 3224) ) { ++locker_lost; return 0LL; } v9 = *(_QWORD *)(THR_PFS + 2032); *(_QWORD *)(a1 + 48) = v9; v11 |= 4u; *(_DWORD *)(v9 + 24) = 4; *(_QWORD *)(v9 + 32) = *(_QWORD *)(v9 - 176 + 8); *(_DWORD *)(v9 + 40) = *(_DWORD *)(v9 - 176 + 24); v8 = *(PFS_table_share **)(a2 + 32); *(_QWORD *)v9 = *(_QWORD *)(THR_PFS + 2128); *(_QWORD *)(v9 + 48) = global_table_io_class; *(_QWORD *)(v9 + 56) = timer_raw_value_and_function; *(_QWORD *)(v9 + 64) = 0LL; *(_QWORD *)(v9 + 136) = *(_QWORD *)(a2 + 40); v6 = *(_QWORD *)(THR_PFS + 2040); *(_QWORD *)(THR_PFS + 2040) = v6 + 1; *(_QWORD *)(v9 + 8) = v6; *(_QWORD *)(v9 + 16) = 0LL; *(_DWORD *)(v9 + 144) = table_io_operation_map[a3]; *(_QWORD *)(v9 + 168) = 0LL; *(_DWORD *)(v9 + 92) = PFS_table_share::get_object_type(v8); *(_QWORD *)(v9 + 96) = v8; *(_DWORD *)(v9 + 128) = PFS_table_share::get_version(v8); *(_DWORD *)(v9 + 160) = a4; *(_QWORD *)(v9 + 72) = a5; *(_DWORD *)(v9 + 80) = a6; *(_DWORD *)(v9 + 88) = 4; *(_QWORD *)(THR_PFS + 2032) += 176LL; } } else if ( (*(_BYTE *)(a2 + 2) & 1) != 0 ) { *(_QWORD *)(a1 + 32) = get_timer_raw_value_and_function( (unsigned int)wait_timer, (unsigned long long (**)(void))(a1 + 40)); v11 = 1; } else { v11 = 0; } *(_DWORD *)a1 = v11; *(_QWORD *)(a1 + 8) = a2; *(_DWORD *)(a1 + 4) = a3; *(_DWORD *)(a1 + 56) = a4; return a1; } return 0LL; }
pfs_start_table_io_wait_v1: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV dword ptr [RBP + -0x20],ECX MOV qword ptr [RBP + -0x28],R8 MOV dword ptr [RBP + -0x2c],R9D MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] TEST byte ptr [RAX],0x1 JNZ 0x0014713c MOV qword ptr [RBP + -0x8],0x0 JMP 0x0014742f LAB_0014713c: CALL 0x001455e0 MOV qword ptr [RBP + -0x40],RAX MOV qword ptr [RBP + -0x50],0x0 LEA RAX,[0x50dfc0] TEST byte ptr [RAX],0x1 JZ 0x001473bc CMP qword ptr [RBP + -0x40],0x0 JNZ 0x00147171 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0014742f LAB_00147171: MOV RAX,qword ptr [RBP + -0x40] TEST byte ptr [RAX + 0x7e0],0x1 JNZ 0x0014718b MOV qword ptr [RBP + -0x8],0x0 JMP 0x0014742f LAB_0014718b: MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x18],RCX MOV dword ptr [RBP + -0x44],0x2 MOV RAX,qword ptr [RBP + -0x38] TEST byte ptr [RAX + 0x2],0x1 JZ 0x001471d7 LEA RAX,[0x3133bc] MOV EDI,dword ptr [RAX] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x28 CALL 0x00142c00 MOV qword ptr [RBP + -0x50],RAX MOV RCX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x20],RCX MOV EAX,dword ptr [RBP + -0x44] OR EAX,0x1 MOV dword ptr [RBP + -0x44],EAX LAB_001471d7: LEA RAX,[0x50dec0] TEST byte ptr [RAX],0x1 JZ 0x001473ba MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0x7f0] MOV RCX,qword ptr [RBP + -0x40] ADD RCX,0x878 ADD RCX,0x420 CMP RAX,RCX SETNC AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 JZ 0x00147239 LEA RAX,[0x509e48] MOV RCX,qword ptr [RAX] ADD RCX,0x1 LEA RAX,[0x509e48] MOV qword ptr [RAX],RCX MOV qword ptr [RBP + -0x8],0x0 JMP 0x0014742f LAB_00147239: MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0x7f0] MOV qword ptr [RBP + -0x58],RAX MOV RCX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x30],RCX MOV EAX,dword ptr [RBP + -0x44] OR EAX,0x4 MOV dword ptr [RBP + -0x44],EAX MOV RAX,qword ptr [RBP + -0x58] ADD RAX,-0xb0 MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x58] MOV dword ptr [RAX + 0x18],0x4 MOV RAX,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RAX + 0x20],RCX MOV RAX,qword ptr [RBP + -0x60] MOV ECX,dword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x58] MOV dword ptr [RAX + 0x28],ECX MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RAX + 0x850] MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x58] LEA RCX,[0x50a440] MOV qword ptr [RAX + 0x30],RCX MOV RCX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RAX + 0x38],RCX MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RAX + 0x40],0x0 MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RAX + 0x28] MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RAX + 0x88],RCX MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RAX + 0x7f8] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RAX + 0x7f8],RDX MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RAX + 0x10],0x0 MOVSXD RCX,dword ptr [RBP + -0x1c] LEA RAX,[0x313410] MOV ECX,dword ptr [RAX + RCX*0x4] MOV RAX,qword ptr [RBP + -0x58] MOV dword ptr [RAX + 0x90],ECX MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RAX + 0xa8],0x0 MOV RDI,qword ptr [RBP + -0x68] CALL 0x0014e2c0 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x58] MOV dword ptr [RAX + 0x5c],ECX MOV RCX,qword ptr [RBP + -0x68] MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RAX + 0x60],RCX MOV RDI,qword ptr [RBP + -0x68] CALL 0x0014e2e0 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x58] MOV dword ptr [RAX + 0x80],ECX MOV ECX,dword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x58] MOV dword ptr [RAX + 0xa0],ECX MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RAX + 0x48],RCX MOV ECX,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RBP + -0x58] MOV dword ptr [RAX + 0x50],ECX MOV RAX,qword ptr [RBP + -0x58] MOV dword ptr [RAX + 0x58],0x4 MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RAX + 0x7f0] ADD RCX,0xb0 MOV qword ptr [RAX + 0x7f0],RCX LAB_001473ba: JMP 0x001473fe LAB_001473bc: MOV RAX,qword ptr [RBP + -0x38] TEST byte ptr [RAX + 0x2],0x1 JZ 0x001473f5 LEA RAX,[0x3133bc] MOV EDI,dword ptr [RAX] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x28 CALL 0x00142c00 MOV qword ptr [RBP + -0x50],RAX MOV RCX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x20],RCX MOV dword ptr [RBP + -0x44],0x1 JMP 0x001473fc LAB_001473f5: MOV dword ptr [RBP + -0x44],0x0 LAB_001473fc: JMP 0x001473fe LAB_001473fe: MOV ECX,dword ptr [RBP + -0x44] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV ECX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4],ECX MOV ECX,dword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x38],ECX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x8],RAX LAB_0014742f: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x70 POP RBP RET
uint * pfs_start_table_io_wait_v1 (uint *param_1,byte *param_2,uint param_3,uint param_4,int8 param_5, int4 param_6) { int8 *puVar1; PFS_table_share *this; long lVar2; int4 uVar3; long lVar4; int8 uVar5; bool bVar6; int8 local_58; uint local_4c; if ((*param_2 & 1) == 0) { return (uint *)0x0; } lVar4 = my_thread_get_THR_PFS(); local_58 = 0; if ((flag_thread_instrumentation & 1) == 0) { bVar6 = (param_2[2] & 1) != 0; if (bVar6) { uVar5 = get_timer_raw_value_and_function(wait_timer,param_1 + 10); *(int8 *)(param_1 + 8) = uVar5; } local_4c = (uint)bVar6; } else { if (lVar4 == 0) { return (uint *)0x0; } if ((*(byte *)(lVar4 + 0x7e0) & 1) == 0) { return (uint *)0x0; } *(long *)(param_1 + 6) = lVar4; local_4c = 2; if ((param_2[2] & 1) != 0) { local_58 = get_timer_raw_value_and_function(wait_timer,param_1 + 10); *(int8 *)(param_1 + 8) = local_58; local_4c = 3; } if ((flag_events_waits_current & 1) != 0) { if (lVar4 + 0xc98U <= *(ulong *)(lVar4 + 0x7f0)) { locker_lost = locker_lost + 1; return (uint *)0x0; } puVar1 = *(int8 **)(lVar4 + 0x7f0); *(int8 **)(param_1 + 0xc) = puVar1; local_4c = local_4c | 4; *(int4 *)(puVar1 + 3) = 4; puVar1[4] = puVar1[-0x15]; *(int4 *)(puVar1 + 5) = *(int4 *)(puVar1 + -0x13); this = *(PFS_table_share **)(param_2 + 0x20); *puVar1 = *(int8 *)(lVar4 + 0x850); puVar1[6] = global_table_io_class; puVar1[7] = local_58; puVar1[8] = 0; puVar1[0x11] = *(int8 *)(param_2 + 0x28); lVar2 = *(long *)(lVar4 + 0x7f8); *(long *)(lVar4 + 0x7f8) = lVar2 + 1; puVar1[1] = lVar2; puVar1[2] = 0; *(int4 *)(puVar1 + 0x12) = *(int4 *)(table_io_operation_map + (long)(int)param_3 * 4); puVar1[0x15] = 0; uVar3 = PFS_table_share::get_object_type(this); *(int4 *)((long)puVar1 + 0x5c) = uVar3; puVar1[0xc] = this; uVar3 = PFS_table_share::get_version(this); *(int4 *)(puVar1 + 0x10) = uVar3; *(uint *)(puVar1 + 0x14) = param_4; puVar1[9] = param_5; *(int4 *)(puVar1 + 10) = param_6; *(int4 *)(puVar1 + 0xb) = 4; *(long *)(lVar4 + 0x7f0) = *(long *)(lVar4 + 0x7f0) + 0xb0; } } *param_1 = local_4c; *(byte **)(param_1 + 2) = param_2; param_1[1] = param_3; param_1[0xe] = param_4; return param_1; }
20,434
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::skip_bom()
monkey531[P]llama/common/./json.hpp
bool skip_bom() { if (get() == 0xEF) { // check if we completely parse the BOM return get() == 0xBB && get() == 0xBF; } // the first character is not the beginning of the BOM; unget it to // process is later unget(); return true; }
O0
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::skip_bom(): subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq 0x18(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x91640 cmpl $0xef, %eax jne 0x9011b movq 0x10(%rsp), %rdi callq 0x91640 movl %eax, %ecx xorl %eax, %eax cmpl $0xbb, %ecx movb %al, 0xf(%rsp) jne 0x9010f movq 0x10(%rsp), %rdi callq 0x91640 cmpl $0xbf, %eax sete %al movb %al, 0xf(%rsp) movb 0xf(%rsp), %al andb $0x1, %al movb %al, 0x27(%rsp) jmp 0x9012a movq 0x10(%rsp), %rdi callq 0x91720 movb $0x1, 0x27(%rsp) movb 0x27(%rsp), %al andb $0x1, %al addq $0x28, %rsp retq nopw %cs:(%rax,%rax) nop
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE8skip_bomEv: sub rsp, 28h mov [rsp+28h+var_10], rdi mov rdi, [rsp+28h+var_10] mov [rsp+28h+var_18], rdi call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) cmp eax, 0EFh jnz short loc_9011B mov rdi, [rsp+28h+var_18] call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) mov ecx, eax xor eax, eax cmp ecx, 0BBh mov [rsp+28h+var_19], al jnz short loc_9010F mov rdi, [rsp+28h+var_18] call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) cmp eax, 0BFh setz al mov [rsp+28h+var_19], al loc_9010F: mov al, [rsp+28h+var_19] and al, 1 mov [rsp+28h+var_1], al jmp short loc_9012A loc_9011B: mov rdi, [rsp+28h+var_18] call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(void) mov [rsp+28h+var_1], 1 loc_9012A: mov al, [rsp+28h+var_1] and al, 1 add rsp, 28h retn
char nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::skip_bom( long long a1) { bool v2; // [rsp+Fh] [rbp-19h] if ( (unsigned int)((long long (*)(void))nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get)() == 239 ) { v2 = 0; if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) == 187 ) return (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) == 191; return v2; } else { nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(a1); return 1; } }
skip_bom: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV RDI,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x10],RDI CALL 0x00191640 CMP EAX,0xef JNZ 0x0019011b MOV RDI,qword ptr [RSP + 0x10] CALL 0x00191640 MOV ECX,EAX XOR EAX,EAX CMP ECX,0xbb MOV byte ptr [RSP + 0xf],AL JNZ 0x0019010f MOV RDI,qword ptr [RSP + 0x10] CALL 0x00191640 CMP EAX,0xbf SETZ AL MOV byte ptr [RSP + 0xf],AL LAB_0019010f: MOV AL,byte ptr [RSP + 0xf] AND AL,0x1 MOV byte ptr [RSP + 0x27],AL JMP 0x0019012a LAB_0019011b: MOV RDI,qword ptr [RSP + 0x10] CALL 0x00191720 MOV byte ptr [RSP + 0x27],0x1 LAB_0019012a: MOV AL,byte ptr [RSP + 0x27] AND AL,0x1 ADD RSP,0x28 RET
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::skip_bom() */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::skip_bom(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *this) { int iVar1; int8 uVar2; int7 uVar3; int7 extraout_var; int1 local_19; int1 local_1; iVar1 = get(this); if (iVar1 == 0xef) { iVar1 = get(this); uVar3 = 0; local_19 = false; if (iVar1 == 0xbb) { uVar2 = get(this); local_19 = (int)uVar2 == 0xbf; uVar3 = (int7)((ulong)uVar2 >> 8); } local_1 = local_19; } else { unget(this); local_1 = true; uVar3 = extraout_var; } return CONCAT71(uVar3,local_1); }
20,435
my_wc_to_printable_ex
eloqsql/strings/ctype.c
int my_wc_to_printable_ex(CHARSET_INFO *cs, my_wc_t wc, uchar *str, uchar *end, uint bs, uint bslen, uint diglen) { uchar *str0; uint i, length; uchar tmp[MY_CS_PRINTABLE_CHAR_LENGTH * MY_CS_MBMAXLEN]; if (my_is_printable(wc)) { int mblen= my_ci_wc_mb(cs, wc, str, end); if (mblen > 0) return mblen; } if (str + my_printable_length(bslen, diglen) > end) return MY_CS_TOOSMALLN(my_printable_length(bslen, diglen)); if ((cs->state & MY_CS_NONASCII) == 0) return to_printable_8bit(str, wc, bs); length= to_printable_8bit(tmp, wc, bs); str0= str; for (i= 0; i < length; i++) { uint expected_length= i == 0 ? bslen : diglen; if (my_ci_wc_mb(cs, tmp[i], str, end) != (int) expected_length) { DBUG_ASSERT(0); return MY_CS_ILSEQ; } str+= expected_length; } return (int) (str - str0); }
O0
c
my_wc_to_printable_ex: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movl 0x10(%rbp), %eax movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x40(%rbp) movq %rsi, -0x48(%rbp) movq %rdx, -0x50(%rbp) movq %rcx, -0x58(%rbp) movl %r8d, -0x5c(%rbp) movl %r9d, -0x60(%rbp) movq -0x48(%rbp), %rdi callq 0x73a60 cmpb $0x0, %al je 0x73917 movq -0x40(%rbp), %rax movq 0xb8(%rax), %rax movq 0x30(%rax), %rax movq -0x40(%rbp), %rdi movq -0x48(%rbp), %rsi movq -0x50(%rbp), %rdx movq -0x58(%rbp), %rcx callq *%rax movl %eax, -0x74(%rbp) cmpl $0x0, -0x74(%rbp) jle 0x73915 movl -0x74(%rbp), %eax movl %eax, -0x34(%rbp) jmp 0x73a2f jmp 0x73917 movq -0x50(%rbp), %rax movq %rax, -0x80(%rbp) movl -0x60(%rbp), %edi movl 0x10(%rbp), %esi callq 0x73ae0 movl %eax, %ecx movq -0x80(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax cmpq -0x58(%rbp), %rax jbe 0x73957 movl -0x60(%rbp), %edi movl 0x10(%rbp), %esi callq 0x73ae0 movl %eax, %ecx movl $0xffffff9c, %eax # imm = 0xFFFFFF9C subl %ecx, %eax movl %eax, -0x34(%rbp) jmp 0x73a2f movq -0x40(%rbp), %rax movl 0xc(%rax), %eax andl $0x2000, %eax # imm = 0x2000 cmpl $0x0, %eax jne 0x73980 movq -0x50(%rbp), %rdi movq -0x48(%rbp), %rsi movl -0x5c(%rbp), %edx callq 0x73b00 movl %eax, -0x34(%rbp) jmp 0x73a2f leaq -0x30(%rbp), %rdi movq -0x48(%rbp), %rsi movl -0x5c(%rbp), %edx callq 0x73b00 movl %eax, -0x70(%rbp) movq -0x50(%rbp), %rax movq %rax, -0x68(%rbp) movl $0x0, -0x6c(%rbp) movl -0x6c(%rbp), %eax cmpl -0x70(%rbp), %eax jae 0x73a21 cmpl $0x0, -0x6c(%rbp) jne 0x739bb movl -0x60(%rbp), %eax movl %eax, -0x84(%rbp) jmp 0x739c4 movl 0x10(%rbp), %eax movl %eax, -0x84(%rbp) movl -0x84(%rbp), %eax movl %eax, -0x78(%rbp) movq -0x40(%rbp), %rax movq 0xb8(%rax), %rax movq 0x30(%rax), %rax movq -0x40(%rbp), %rdi movl -0x6c(%rbp), %ecx movzbl -0x30(%rbp,%rcx), %ecx movl %ecx, %esi movq -0x50(%rbp), %rdx movq -0x58(%rbp), %rcx callq *%rax cmpl -0x78(%rbp), %eax je 0x73a06 jmp 0x739fb jmp 0x739fd movl $0x0, -0x34(%rbp) jmp 0x73a2f movl -0x78(%rbp), %ecx movq -0x50(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x50(%rbp) movl -0x6c(%rbp), %eax addl $0x1, %eax movl %eax, -0x6c(%rbp) jmp 0x739a2 movq -0x50(%rbp), %rax movq -0x68(%rbp), %rcx subq %rcx, %rax movl %eax, -0x34(%rbp) movl -0x34(%rbp), %eax movl %eax, -0x88(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x73a59 movl -0x88(%rbp), %eax addq $0x90, %rsp popq %rbp retq callq 0x24300 nop
my_wc_to_printable_ex: push rbp mov rbp, rsp sub rsp, 90h mov eax, [rbp+arg_0] mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_40], rdi mov [rbp+var_48], rsi mov [rbp+var_50], rdx mov [rbp+var_58], rcx mov [rbp+var_5C], r8d mov [rbp+var_60], r9d mov rdi, [rbp+var_48] call my_is_printable cmp al, 0 jz short loc_73917 mov rax, [rbp+var_40] mov rax, [rax+0B8h] mov rax, [rax+30h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_48] mov rdx, [rbp+var_50] mov rcx, [rbp+var_58] call rax mov [rbp+var_74], eax cmp [rbp+var_74], 0 jle short loc_73915 mov eax, [rbp+var_74] mov [rbp+var_34], eax jmp loc_73A2F loc_73915: jmp short $+2 loc_73917: mov rax, [rbp+var_50] mov [rbp+var_80], rax mov edi, [rbp+var_60] mov esi, [rbp+arg_0] call my_printable_length mov ecx, eax mov rax, [rbp+var_80] mov ecx, ecx add rax, rcx cmp rax, [rbp+var_58] jbe short loc_73957 mov edi, [rbp+var_60] mov esi, [rbp+arg_0] call my_printable_length mov ecx, eax mov eax, 0FFFFFF9Ch sub eax, ecx mov [rbp+var_34], eax jmp loc_73A2F loc_73957: mov rax, [rbp+var_40] mov eax, [rax+0Ch] and eax, 2000h cmp eax, 0 jnz short loc_73980 mov rdi, [rbp+var_50] mov rsi, [rbp+var_48] mov edx, [rbp+var_5C] call to_printable_8bit mov [rbp+var_34], eax jmp loc_73A2F loc_73980: lea rdi, [rbp+var_30] mov rsi, [rbp+var_48] mov edx, [rbp+var_5C] call to_printable_8bit mov [rbp+var_70], eax mov rax, [rbp+var_50] mov [rbp+var_68], rax mov [rbp+var_6C], 0 loc_739A2: mov eax, [rbp+var_6C] cmp eax, [rbp+var_70] jnb short loc_73A21 cmp [rbp+var_6C], 0 jnz short loc_739BB mov eax, [rbp+var_60] mov [rbp+var_84], eax jmp short loc_739C4 loc_739BB: mov eax, [rbp+arg_0] mov [rbp+var_84], eax loc_739C4: mov eax, [rbp+var_84] mov [rbp+var_78], eax mov rax, [rbp+var_40] mov rax, [rax+0B8h] mov rax, [rax+30h] mov rdi, [rbp+var_40] mov ecx, [rbp+var_6C] movzx ecx, [rbp+rcx+var_30] mov esi, ecx mov rdx, [rbp+var_50] mov rcx, [rbp+var_58] call rax cmp eax, [rbp+var_78] jz short loc_73A06 jmp short $+2 loc_739FB: jmp short $+2 loc_739FD: mov [rbp+var_34], 0 jmp short loc_73A2F loc_73A06: mov ecx, [rbp+var_78] mov rax, [rbp+var_50] mov ecx, ecx add rax, rcx mov [rbp+var_50], rax mov eax, [rbp+var_6C] add eax, 1 mov [rbp+var_6C], eax jmp short loc_739A2 loc_73A21: mov rax, [rbp+var_50] mov rcx, [rbp+var_68] sub rax, rcx mov [rbp+var_34], eax loc_73A2F: mov eax, [rbp+var_34] mov [rbp+var_88], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_73A59 mov eax, [rbp+var_88] add rsp, 90h pop rbp retn loc_73A59: call ___stack_chk_fail
long long my_wc_to_printable_ex( long long a1, long long a2, long long a3, unsigned long long a4, unsigned int a5, unsigned int a6, unsigned int a7) { unsigned int v8; // [rsp+Ch] [rbp-84h] int v9; // [rsp+1Ch] [rbp-74h] unsigned int v10; // [rsp+20h] [rbp-70h] unsigned int i; // [rsp+24h] [rbp-6Ch] int v12; // [rsp+28h] [rbp-68h] _BYTE v18[40]; // [rsp+60h] [rbp-30h] BYREF unsigned long long v19; // [rsp+88h] [rbp-8h] v19 = __readfsqword(0x28u); if ( (unsigned __int8)my_is_printable(a2) && (v9 = (*(long long ( **)(long long, long long, long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 48LL))( a1, a2, a3, a4), v9 > 0) ) { return (unsigned int)v9; } else if ( (unsigned long long)(unsigned int)my_printable_length(a6, a7) + a3 <= a4 ) { if ( (*(_DWORD *)(a1 + 12) & 0x2000) != 0 ) { v10 = to_printable_8bit(v18, a2, a5); v12 = a3; for ( i = 0; i < v10; ++i ) { if ( i ) v8 = a7; else v8 = a6; if ( (*(unsigned int ( **)(long long, _QWORD, long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 48LL))( a1, (unsigned __int8)v18[i], a3, a4) != v8 ) return 0; a3 += v8; } return (unsigned int)(a3 - v12); } else { return (unsigned int)to_printable_8bit(a3, a2, a5); } } else { return (unsigned int)(-100 - my_printable_length(a6, a7)); } }
my_wc_to_printable_ex: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV EAX,dword ptr [RBP + 0x10] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x40],RDI MOV qword ptr [RBP + -0x48],RSI MOV qword ptr [RBP + -0x50],RDX MOV qword ptr [RBP + -0x58],RCX MOV dword ptr [RBP + -0x5c],R8D MOV dword ptr [RBP + -0x60],R9D MOV RDI,qword ptr [RBP + -0x48] CALL 0x00173a60 CMP AL,0x0 JZ 0x00173917 MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RAX + 0x30] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x58] CALL RAX MOV dword ptr [RBP + -0x74],EAX CMP dword ptr [RBP + -0x74],0x0 JLE 0x00173915 MOV EAX,dword ptr [RBP + -0x74] MOV dword ptr [RBP + -0x34],EAX JMP 0x00173a2f LAB_00173915: JMP 0x00173917 LAB_00173917: MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x80],RAX MOV EDI,dword ptr [RBP + -0x60] MOV ESI,dword ptr [RBP + 0x10] CALL 0x00173ae0 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x80] MOV ECX,ECX ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x58] JBE 0x00173957 MOV EDI,dword ptr [RBP + -0x60] MOV ESI,dword ptr [RBP + 0x10] CALL 0x00173ae0 MOV ECX,EAX MOV EAX,0xffffff9c SUB EAX,ECX MOV dword ptr [RBP + -0x34],EAX JMP 0x00173a2f LAB_00173957: MOV RAX,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RAX + 0xc] AND EAX,0x2000 CMP EAX,0x0 JNZ 0x00173980 MOV RDI,qword ptr [RBP + -0x50] MOV RSI,qword ptr [RBP + -0x48] MOV EDX,dword ptr [RBP + -0x5c] CALL 0x00173b00 MOV dword ptr [RBP + -0x34],EAX JMP 0x00173a2f LAB_00173980: LEA RDI,[RBP + -0x30] MOV RSI,qword ptr [RBP + -0x48] MOV EDX,dword ptr [RBP + -0x5c] CALL 0x00173b00 MOV dword ptr [RBP + -0x70],EAX MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x68],RAX MOV dword ptr [RBP + -0x6c],0x0 LAB_001739a2: MOV EAX,dword ptr [RBP + -0x6c] CMP EAX,dword ptr [RBP + -0x70] JNC 0x00173a21 CMP dword ptr [RBP + -0x6c],0x0 JNZ 0x001739bb MOV EAX,dword ptr [RBP + -0x60] MOV dword ptr [RBP + -0x84],EAX JMP 0x001739c4 LAB_001739bb: MOV EAX,dword ptr [RBP + 0x10] MOV dword ptr [RBP + -0x84],EAX LAB_001739c4: MOV EAX,dword ptr [RBP + -0x84] MOV dword ptr [RBP + -0x78],EAX MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RAX + 0x30] MOV RDI,qword ptr [RBP + -0x40] MOV ECX,dword ptr [RBP + -0x6c] MOVZX ECX,byte ptr [RBP + RCX*0x1 + -0x30] MOV ESI,ECX MOV RDX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x58] CALL RAX CMP EAX,dword ptr [RBP + -0x78] JZ 0x00173a06 JMP 0x001739fb LAB_001739fb: JMP 0x001739fd LAB_001739fd: MOV dword ptr [RBP + -0x34],0x0 JMP 0x00173a2f LAB_00173a06: MOV ECX,dword ptr [RBP + -0x78] MOV RAX,qword ptr [RBP + -0x50] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX MOV EAX,dword ptr [RBP + -0x6c] ADD EAX,0x1 MOV dword ptr [RBP + -0x6c],EAX JMP 0x001739a2 LAB_00173a21: MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x68] SUB RAX,RCX MOV dword ptr [RBP + -0x34],EAX LAB_00173a2f: MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x88],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00173a59 MOV EAX,dword ptr [RBP + -0x88] ADD RSP,0x90 POP RBP RET LAB_00173a59: CALL 0x00124300
int my_wc_to_printable_ex (long param_1,int8 param_2,long param_3,ulong param_4,int4 param_5, uint param_6,uint param_7) { char cVar1; uint uVar2; uint uVar3; long in_FS_OFFSET; uint local_8c; uint local_74; long local_58; int local_3c; int1 local_38 [40]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); cVar1 = my_is_printable(param_2); if ((cVar1 == '\0') || (local_3c = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30))(param_1,param_2,param_3,param_4), local_3c < 1)) { uVar2 = my_printable_length(param_6,param_7); if (param_4 < param_3 + (ulong)uVar2) { local_3c = my_printable_length(param_6,param_7); local_3c = -100 - local_3c; } else if ((*(uint *)(param_1 + 0xc) & 0x2000) == 0) { local_3c = to_printable_8bit(param_3,param_2,param_5); } else { uVar2 = to_printable_8bit(local_38,param_2,param_5); local_58 = param_3; for (local_74 = 0; local_74 < uVar2; local_74 = local_74 + 1) { local_8c = param_6; if (local_74 != 0) { local_8c = param_7; } uVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30)) (param_1,local_38[local_74],local_58,param_4); if (uVar3 != local_8c) { local_3c = 0; goto LAB_00173a2f; } local_58 = local_58 + (ulong)local_8c; } local_3c = (int)local_58 - (int)param_3; } } LAB_00173a2f: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_3c; }
20,436
nglog::tools::(anonymous namespace)::DemangleInplace(char*, unsigned long)
ng-log[P]ng-log/src/symbolize.cc
ATTRIBUTE_NOINLINE void DemangleInplace(char* out, size_t out_size) { char demangled[256]; // Big enough for sane demangled symbols. if (Demangle(out, demangled, sizeof(demangled))) { // Demangling succeeded. Copy to out if the space allows. size_t len = strlen(demangled); if (len + 1 <= out_size) { // +1 for '\0'. NGLOG_SAFE_ASSERT(len < sizeof(demangled)); memmove(out, demangled, len + 1); } } }
O1
cpp
nglog::tools::(anonymous namespace)::DemangleInplace(char*, unsigned long): pushq %r14 pushq %rbx subq $0x108, %rsp # imm = 0x108 movq %rsi, %r14 movq %rdi, %rbx movq %rsp, %rsi movl $0x100, %edx # imm = 0x100 callq 0x934c testb %al, %al je 0x20d4f movq %rsp, %rdi callq 0x71f0 leaq 0x1(%rax), %rdx cmpq %r14, %rdx ja 0x20d4f cmpq $0x100, %rax # imm = 0x100 jae 0x20d5a movq %rsp, %rsi movq %rbx, %rdi callq 0x7400 addq $0x108, %rsp # imm = 0x108 popq %rbx popq %r14 retq callq 0x72c0
_ZN5nglog5tools12_GLOBAL__N_115DemangleInplaceEPcm: push r14 push rbx sub rsp, 108h mov r14, rsi mov rbx, rdi mov rsi, rsp; char * mov edx, offset qword_100; char * call _ZN5nglog5tools8DemangleEPKcPcm; nglog::tools::Demangle(char const*,char *,ulong) test al, al jz short loc_20D4F mov rdi, rsp call _strlen lea rdx, [rax+1] cmp rdx, r14 ja short loc_20D4F cmp rax, 100h jnb short loc_20D5A mov rsi, rsp mov rdi, rbx call _memcpy loc_20D4F: add rsp, 108h pop rbx pop r14 retn loc_20D5A: call _abort
unsigned long long nglog::tools::`anonymous namespace'::DemangleInplace( nglog::tools::_anonymous_namespace_ *this, char *a2) { unsigned long long result; // rax char v3[280]; // [rsp+0h] [rbp-118h] BYREF result = nglog::tools::Demangle(this, v3, (char *)qword_100); if ( (_BYTE)result ) { result = strlen(v3); if ( result + 1 <= (unsigned long long)a2 ) { if ( result >= 0x100 ) abort(v3); return memcpy(this, v3, result + 1); } } return result; }
DemangleInplace: PUSH R14 PUSH RBX SUB RSP,0x108 MOV R14,RSI MOV RBX,RDI MOV RSI,RSP MOV EDX,0x100 CALL 0x0010934c TEST AL,AL JZ 0x00120d4f MOV RDI,RSP CALL 0x001071f0 LEA RDX,[RAX + 0x1] CMP RDX,R14 JA 0x00120d4f CMP RAX,0x100 JNC 0x00120d5a MOV RSI,RSP MOV RDI,RBX CALL 0x00107400 LAB_00120d4f: ADD RSP,0x108 POP RBX POP R14 RET LAB_00120d5a: CALL 0x001072c0
/* nglog::tools::(anonymous namespace)::DemangleInplace(char*, unsigned long) */ void nglog::tools::(anonymous_namespace)::DemangleInplace(char *param_1,ulong param_2) { char cVar1; size_t sVar2; char acStack_118 [264]; cVar1 = Demangle(param_1,acStack_118,0x100); if (cVar1 != '\0') { sVar2 = strlen(acStack_118); if (sVar2 + 1 <= param_2) { if (0xff < sVar2) { /* WARNING: Subroutine does not return */ abort(); } memcpy(param_1,acStack_118,sVar2 + 1); } } return; }
20,437
char const* google::protobuf::internal::EpsCopyInputStream::ReadPackedVarint<char const* google::protobuf::internal::PackedEnumParserArg<google::protobuf::UnknownFieldSet>(void*, char const*, google::protobuf::internal::ParseContext*, bool (*)(void const*, int), void const*, google::protobuf::internal::InternalMetadata*, int)::'lambda'(unsigned long)>(char const*, char const* google::protobuf::internal::PackedEnumParserArg<google::protobuf::UnknownFieldSet>(void*, char const*, google::protobuf::internal::ParseContext*, bool (*)(void const*, int), void const*, google::protobuf::internal::InternalMetadata*, int)::'lambda'(unsigned long))
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/parse_context.h
const char* EpsCopyInputStream::ReadPackedVarint(const char* ptr, Add add) { int size = ReadSize(&ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); int chunk_size = buffer_end_ - ptr; while (size > chunk_size) { ptr = ReadPackedVarintArray(ptr, buffer_end_, add); if (ptr == nullptr) return nullptr; int overrun = ptr - buffer_end_; GOOGLE_DCHECK(overrun >= 0 && overrun <= kSlopBytes); if (size - chunk_size <= kSlopBytes) { // The current buffer contains all the information needed, we don't need // to flip buffers. However we must parse from a buffer with enough space // so we are not prone to a buffer overflow. char buf[kSlopBytes + 10] = {}; std::memcpy(buf, buffer_end_, kSlopBytes); GOOGLE_CHECK_LE(size - chunk_size, kSlopBytes); auto end = buf + (size - chunk_size); auto res = ReadPackedVarintArray(buf + overrun, end, add); if (res == nullptr || res != end) return nullptr; return buffer_end_ + (res - buf); } size -= overrun + chunk_size; GOOGLE_DCHECK_GT(size, 0); // We must flip buffers if (limit_ <= kSlopBytes) return nullptr; ptr = Next(); if (ptr == nullptr) return nullptr; ptr += overrun; chunk_size = buffer_end_ - ptr; } auto end = ptr + size; ptr = ReadPackedVarintArray(ptr, end, add); return end == ptr ? ptr : nullptr; }
O0
c
char const* google::protobuf::internal::EpsCopyInputStream::ReadPackedVarint<char const* google::protobuf::internal::PackedEnumParserArg<google::protobuf::UnknownFieldSet>(void*, char const*, google::protobuf::internal::ParseContext*, bool (*)(void const*, int), void const*, google::protobuf::internal::InternalMetadata*, int)::'lambda'(unsigned long)>(char const*, char const* google::protobuf::internal::PackedEnumParserArg<google::protobuf::UnknownFieldSet>(void*, char const*, google::protobuf::internal::ParseContext*, bool (*)(void const*, int), void const*, google::protobuf::internal::InternalMetadata*, int)::'lambda'(unsigned long)): subq $0x198, %rsp # imm = 0x198 movq %rdx, 0x188(%rsp) movq %rdi, 0x180(%rsp) movq %rsi, 0x178(%rsp) movq 0x180(%rsp), %rax movq %rax, 0x40(%rsp) leaq 0x178(%rsp), %rdi callq 0x107ee0 movl %eax, 0x174(%rsp) cmpq $0x0, 0x178(%rsp) jne 0x1b7fac movq $0x0, 0x190(%rsp) jmp 0x1b84b5 movq 0x40(%rsp), %rax movq 0x8(%rax), %rax movq 0x178(%rsp), %rcx subq %rcx, %rax movl %eax, 0x170(%rsp) movl 0x174(%rsp), %eax cmpl 0x170(%rsp), %eax jle 0x1b843d movq 0x40(%rsp), %rax movq 0x178(%rsp), %rdi movq 0x8(%rax), %rsi movq 0x188(%rsp), %rax movq %rax, 0x168(%rsp) movq 0x168(%rsp), %rdx callq 0x1b84e0 movq %rax, 0x178(%rsp) cmpq $0x0, 0x178(%rsp) jne 0x1b802d movq $0x0, 0x190(%rsp) jmp 0x1b84b5 movq 0x40(%rsp), %rcx movq 0x178(%rsp), %rax movq 0x8(%rcx), %rcx subq %rcx, %rax movl %eax, 0x164(%rsp) xorl %eax, %eax testb $0x1, %al jne 0x1b8053 jmp 0x1b811c movl 0x164(%rsp), %eax movb $0x0, 0x127(%rsp) cmpl $0x0, %eax jl 0x1b8073 cmpl $0x10, 0x164(%rsp) jg 0x1b8073 jmp 0x1b80cc leaq 0x39112(%rip), %rdx # 0x1f118c leaq 0x128(%rsp), %rdi movq %rdi, 0x30(%rsp) movl $0x3, %esi movl $0x349, %ecx # imm = 0x349 callq 0x237e0 movq 0x30(%rsp), %rdi movb $0x1, 0x127(%rsp) leaq 0x39c70(%rip), %rsi # 0x1f1d1a callq 0x230a0 movq %rax, 0x38(%rsp) jmp 0x1b80b6 movq 0x38(%rsp), %rsi leaq 0x113(%rsp), %rdi callq 0x23250 jmp 0x1b80ca jmp 0x1b80cc testb $0x1, 0x127(%rsp) jne 0x1b80d8 jmp 0x1b80e5 leaq 0x128(%rsp), %rdi callq 0x23820 jmp 0x1b8048 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x118(%rsp) movl %eax, 0x114(%rsp) testb $0x1, 0x127(%rsp) jne 0x1b810a jmp 0x1b8117 leaq 0x128(%rsp), %rdi callq 0x23820 jmp 0x1b84c5 movl 0x174(%rsp), %eax subl 0x170(%rsp), %eax cmpl $0x10, %eax jg 0x1b82e6 leaq 0xf0(%rsp), %rdi xorl %esi, %esi movl $0x1a, %edx callq 0x13200 movq 0x40(%rsp), %rax movq 0x8(%rax), %rax movq (%rax), %rcx movq %rcx, 0xf0(%rsp) movq 0x8(%rax), %rax movq %rax, 0xf8(%rsp) movl 0x174(%rsp), %eax subl 0x170(%rsp), %eax movb $0x0, 0xb7(%rsp) cmpl $0x10, %eax jg 0x1b8184 jmp 0x1b81dd leaq 0x39001(%rip), %rdx # 0x1f118c leaq 0xb8(%rsp), %rdi movq %rdi, 0x20(%rsp) movl $0x3, %esi movl $0x350, %ecx # imm = 0x350 callq 0x237e0 movq 0x20(%rsp), %rdi movb $0x1, 0xb7(%rsp) leaq 0x39b95(%rip), %rsi # 0x1f1d50 callq 0x230a0 movq %rax, 0x28(%rsp) jmp 0x1b81c7 movq 0x28(%rsp), %rsi leaq 0xb6(%rsp), %rdi callq 0x23250 jmp 0x1b81db jmp 0x1b81dd testb $0x1, 0xb7(%rsp) jne 0x1b81e9 jmp 0x1b81f6 leaq 0xb8(%rsp), %rdi callq 0x23820 leaq 0xf0(%rsp), %rax movl 0x174(%rsp), %ecx subl 0x170(%rsp), %ecx movslq %ecx, %rcx addq %rcx, %rax movq %rax, 0xa8(%rsp) leaq 0xf0(%rsp), %rdi movslq 0x164(%rsp), %rax addq %rax, %rdi movq 0xa8(%rsp), %rsi movq 0x188(%rsp), %rax movq %rax, 0x98(%rsp) movq 0x98(%rsp), %rdx callq 0x1b84e0 movq %rax, 0xa0(%rsp) cmpq $0x0, 0xa0(%rsp) je 0x1b8277 movq 0xa0(%rsp), %rax cmpq 0xa8(%rsp), %rax je 0x1b82ba movq $0x0, 0x190(%rsp) jmp 0x1b84b5 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x118(%rsp) movl %eax, 0x114(%rsp) testb $0x1, 0xb7(%rsp) jne 0x1b82a8 jmp 0x1b82b5 leaq 0xb8(%rsp), %rdi callq 0x23820 jmp 0x1b84c5 movq 0x40(%rsp), %rax movq 0x8(%rax), %rax movq 0xa0(%rsp), %rcx leaq 0xf0(%rsp), %rdx subq %rdx, %rcx addq %rcx, %rax movq %rax, 0x190(%rsp) jmp 0x1b84b5 movl 0x164(%rsp), %ecx addl 0x170(%rsp), %ecx movl 0x174(%rsp), %eax subl %ecx, %eax movl %eax, 0x174(%rsp) xorl %eax, %eax testb $0x1, %al jne 0x1b830f jmp 0x1b83b6 movl 0x174(%rsp), %eax movb $0x0, 0x5f(%rsp) cmpl $0x0, %eax jle 0x1b8322 jmp 0x1b8372 leaq 0x38e63(%rip), %rdx # 0x1f118c leaq 0x60(%rsp), %rdi movq %rdi, 0x10(%rsp) movl $0x3, %esi movl $0x357, %ecx # imm = 0x357 callq 0x237e0 movq 0x10(%rsp), %rdi movb $0x1, 0x5f(%rsp) leaq 0x39a31(%rip), %rsi # 0x1f1d84 callq 0x230a0 movq %rax, 0x18(%rsp) jmp 0x1b835f movq 0x18(%rsp), %rsi leaq 0x5e(%rsp), %rdi callq 0x23250 jmp 0x1b8370 jmp 0x1b8372 testb $0x1, 0x5f(%rsp) jne 0x1b837b jmp 0x1b8385 leaq 0x60(%rsp), %rdi callq 0x23820 jmp 0x1b8304 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x118(%rsp) movl %eax, 0x114(%rsp) testb $0x1, 0x5f(%rsp) jne 0x1b83a7 jmp 0x1b83b1 leaq 0x60(%rsp), %rdi callq 0x23820 jmp 0x1b84c5 movq 0x40(%rsp), %rax cmpl $0x10, 0x1c(%rax) jg 0x1b83d2 movq $0x0, 0x190(%rsp) jmp 0x1b84b5 movq 0x40(%rsp), %rdi callq 0x1b2f90 movq %rax, 0x178(%rsp) cmpq $0x0, 0x178(%rsp) jne 0x1b8400 movq $0x0, 0x190(%rsp) jmp 0x1b84b5 movq 0x40(%rsp), %rax movl 0x164(%rsp), %edx movq 0x178(%rsp), %rcx movslq %edx, %rdx addq %rdx, %rcx movq %rcx, 0x178(%rsp) movq 0x8(%rax), %rax movq 0x178(%rsp), %rcx subq %rcx, %rax movl %eax, 0x170(%rsp) jmp 0x1b7fc7 movq 0x178(%rsp), %rax movslq 0x174(%rsp), %rcx addq %rcx, %rax movq %rax, 0x50(%rsp) movq 0x178(%rsp), %rdi movq 0x50(%rsp), %rsi movq 0x188(%rsp), %rax movq %rax, 0x48(%rsp) movq 0x48(%rsp), %rdx callq 0x1b84e0 movq %rax, 0x178(%rsp) movq 0x50(%rsp), %rax cmpq 0x178(%rsp), %rax jne 0x1b849f movq 0x178(%rsp), %rax movq %rax, 0x8(%rsp) jmp 0x1b84a8 xorl %eax, %eax movq %rax, 0x8(%rsp) jmp 0x1b84a8 movq 0x8(%rsp), %rax movq %rax, 0x190(%rsp) movq 0x190(%rsp), %rax addq $0x198, %rsp # imm = 0x198 retq movq 0x118(%rsp), %rdi callq 0x13750 nopw %cs:(%rax,%rax) nopl (%rax)
_ZN6google8protobuf8internal18EpsCopyInputStream16ReadPackedVarintIZNS1_12VarintParserIlLb1EEEPKcPvS6_PNS1_12ParseContextEEUlmE_EES6_S6_T_: sub rsp, 198h mov [rsp+198h+var_10], rdx mov [rsp+198h+var_18], rdi mov [rsp+198h+var_20], rsi mov rax, [rsp+198h+var_18] mov [rsp+198h+var_158], rax lea rdi, [rsp+198h+var_20]; this call _ZN6google8protobuf8internal8ReadSizeEPPKc; google::protobuf::internal::ReadSize(char const**) mov [rsp+198h+var_24], eax cmp [rsp+198h+var_20], 0 jnz short loc_1B7FAC mov [rsp+198h+var_8], 0 jmp loc_1B84B5 loc_1B7FAC: mov rax, [rsp+198h+var_158] mov rax, [rax+8] mov rcx, [rsp+198h+var_20] sub rax, rcx mov [rsp+198h+var_28], eax loc_1B7FC7: mov eax, [rsp+198h+var_24] cmp eax, [rsp+198h+var_28] jle loc_1B843D mov rax, [rsp+198h+var_158] mov rdi, [rsp+198h+var_20] mov rsi, [rax+8] mov rax, [rsp+198h+var_10] mov [rsp+198h+var_30], rax mov rdx, [rsp+198h+var_30] call _ZN6google8protobuf8internal21ReadPackedVarintArrayIZNS1_12VarintParserIlLb1EEEPKcPvS5_PNS1_12ParseContextEEUlmE_EES5_S5_S5_T_; google::protobuf::internal::ReadPackedVarintArray<google::protobuf::internal::VarintParser<long,true>(void *,char const*,google::protobuf::internal::ParseContext *)::{lambda(ulong)#1}>(char const*,char const*,google::protobuf::internal::VarintParser<long,true>(void *,char const*,google::protobuf::internal::ParseContext *)::{lambda(ulong)#1}) mov [rsp+198h+var_20], rax cmp [rsp+198h+var_20], 0 jnz short loc_1B802D mov [rsp+198h+var_8], 0 jmp loc_1B84B5 loc_1B802D: mov rcx, [rsp+198h+var_158] mov rax, [rsp+198h+var_20] mov rcx, [rcx+8] sub rax, rcx mov [rsp+198h+var_34], eax loc_1B8048: xor eax, eax test al, 1 jnz short loc_1B8053 jmp loc_1B811C loc_1B8053: mov eax, [rsp+198h+var_34] mov [rsp+198h+var_71], 0 cmp eax, 0 jl short loc_1B8073 cmp [rsp+198h+var_34], 10h jg short loc_1B8073 jmp short loc_1B80CC loc_1B8073: lea rdx, aWorkspaceLlm4b_10; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+198h+var_70] mov [rsp+198h+var_168], rdi mov esi, 3 mov ecx, 349h call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, [rsp+198h+var_168] mov [rsp+198h+var_71], 1 lea rsi, aCheckFailedOve_2; "CHECK failed: overrun >= 0 && overrun <"... call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+198h+var_160], rax jmp short $+2 loc_1B80B6: mov rsi, [rsp+198h+var_160] lea rdi, [rsp+198h+var_85] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_1B80CA: jmp short $+2 loc_1B80CC: test [rsp+198h+var_71], 1 jnz short loc_1B80D8 jmp short loc_1B80E5 loc_1B80D8: lea rdi, [rsp+198h+var_70]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_1B80E5: jmp loc_1B8048 mov rcx, rax mov eax, edx mov [rsp+arg_110], rcx mov [rsp+arg_10C], eax test [rsp+arg_11F], 1 jnz short loc_1B810A jmp short loc_1B8117 loc_1B810A: lea rdi, [rsp+arg_120]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_1B8117: jmp loc_1B84C5 loc_1B811C: mov eax, [rsp+198h+var_24] sub eax, [rsp+198h+var_28] cmp eax, 10h jg loc_1B82E6 lea rdi, [rsp+198h+var_A8] xor esi, esi mov edx, 1Ah call _memset mov rax, [rsp+198h+var_158] mov rax, [rax+8] mov rcx, [rax] mov [rsp+198h+var_A8], rcx mov rax, [rax+8] mov [rsp+198h+var_A0], rax mov eax, [rsp+198h+var_24] sub eax, [rsp+198h+var_28] mov [rsp+198h+var_E1], 0 cmp eax, 10h jg short loc_1B8184 jmp short loc_1B81DD loc_1B8184: lea rdx, aWorkspaceLlm4b_10; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+198h+var_E0] mov [rsp+198h+var_178], rdi mov esi, 3 mov ecx, 350h call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, [rsp+198h+var_178] mov [rsp+198h+var_E1], 1 lea rsi, aCheckFailedSiz_1; "CHECK failed: (size - chunk_size) <= (k"... call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+198h+var_170], rax jmp short $+2 loc_1B81C7: mov rsi, [rsp+198h+var_170] lea rdi, [rsp+198h+var_E2] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_1B81DB: jmp short $+2 loc_1B81DD: test [rsp+198h+var_E1], 1 jnz short loc_1B81E9 jmp short loc_1B81F6 loc_1B81E9: lea rdi, [rsp+198h+var_E0]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_1B81F6: lea rax, [rsp+198h+var_A8] mov ecx, [rsp+198h+var_24] sub ecx, [rsp+198h+var_28] movsxd rcx, ecx add rax, rcx mov [rsp+198h+var_F0], rax lea rdi, [rsp+198h+var_A8] movsxd rax, [rsp+198h+var_34] add rdi, rax mov rsi, [rsp+198h+var_F0] mov rax, [rsp+198h+var_10] mov [rsp+198h+var_100], rax mov rdx, [rsp+198h+var_100] call _ZN6google8protobuf8internal21ReadPackedVarintArrayIZNS1_12VarintParserIlLb1EEEPKcPvS5_PNS1_12ParseContextEEUlmE_EES5_S5_S5_T_; google::protobuf::internal::ReadPackedVarintArray<google::protobuf::internal::VarintParser<long,true>(void *,char const*,google::protobuf::internal::ParseContext *)::{lambda(ulong)#1}>(char const*,char const*,google::protobuf::internal::VarintParser<long,true>(void *,char const*,google::protobuf::internal::ParseContext *)::{lambda(ulong)#1}) mov [rsp+198h+var_F8], rax cmp [rsp+198h+var_F8], 0 jz short loc_1B8277 mov rax, [rsp+198h+var_F8] cmp rax, [rsp+198h+var_F0] jz short loc_1B82BA loc_1B8277: mov [rsp+198h+var_8], 0 jmp loc_1B84B5 mov rcx, rax mov eax, edx mov [rsp+arg_110], rcx mov [rsp+arg_10C], eax test [rsp+arg_AF], 1 jnz short loc_1B82A8 jmp short loc_1B82B5 loc_1B82A8: lea rdi, [rsp+arg_B0]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_1B82B5: jmp loc_1B84C5 loc_1B82BA: mov rax, [rsp+198h+var_158] mov rax, [rax+8] mov rcx, [rsp+198h+var_F8] lea rdx, [rsp+198h+var_A8] sub rcx, rdx add rax, rcx mov [rsp+198h+var_8], rax jmp loc_1B84B5 loc_1B82E6: mov ecx, [rsp+198h+var_34] add ecx, [rsp+198h+var_28] mov eax, [rsp+198h+var_24] sub eax, ecx mov [rsp+198h+var_24], eax loc_1B8304: xor eax, eax test al, 1 jnz short loc_1B830F jmp loc_1B83B6 loc_1B830F: mov eax, [rsp+198h+var_24] mov [rsp+198h+var_139], 0 cmp eax, 0 jle short loc_1B8322 jmp short loc_1B8372 loc_1B8322: lea rdx, aWorkspaceLlm4b_10; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+198h+var_138] mov [rsp+198h+var_188], rdi mov esi, 3 mov ecx, 357h call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, [rsp+198h+var_188] mov [rsp+198h+var_139], 1 lea rsi, aCheckFailedSiz_2; "CHECK failed: (size) > (0): " call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+198h+var_180], rax jmp short $+2 loc_1B835F: mov rsi, [rsp+198h+var_180] lea rdi, [rsp+198h+var_13A] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_1B8370: jmp short $+2 loc_1B8372: test [rsp+198h+var_139], 1 jnz short loc_1B837B jmp short loc_1B8385 loc_1B837B: lea rdi, [rsp+198h+var_138]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_1B8385: jmp loc_1B8304 mov rcx, rax mov eax, edx mov [rsp+arg_110], rcx mov [rsp+arg_10C], eax test [rsp+arg_57], 1 jnz short loc_1B83A7 jmp short loc_1B83B1 loc_1B83A7: lea rdi, [rsp+arg_58]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_1B83B1: jmp loc_1B84C5 loc_1B83B6: mov rax, [rsp+198h+var_158] cmp dword ptr [rax+1Ch], 10h jg short loc_1B83D2 mov [rsp+198h+var_8], 0 jmp loc_1B84B5 loc_1B83D2: mov rdi, [rsp+198h+var_158]; this call _ZN6google8protobuf8internal18EpsCopyInputStream4NextEv; google::protobuf::internal::EpsCopyInputStream::Next(void) mov [rsp+198h+var_20], rax cmp [rsp+198h+var_20], 0 jnz short loc_1B8400 mov [rsp+198h+var_8], 0 jmp loc_1B84B5 loc_1B8400: mov rax, [rsp+198h+var_158] mov edx, [rsp+198h+var_34] mov rcx, [rsp+198h+var_20] movsxd rdx, edx add rcx, rdx mov [rsp+198h+var_20], rcx mov rax, [rax+8] mov rcx, [rsp+198h+var_20] sub rax, rcx mov [rsp+198h+var_28], eax jmp loc_1B7FC7 loc_1B843D: mov rax, [rsp+198h+var_20] movsxd rcx, [rsp+198h+var_24] add rax, rcx mov [rsp+198h+var_148], rax mov rdi, [rsp+198h+var_20] mov rsi, [rsp+198h+var_148] mov rax, [rsp+198h+var_10] mov [rsp+198h+var_150], rax mov rdx, [rsp+198h+var_150] call _ZN6google8protobuf8internal21ReadPackedVarintArrayIZNS1_12VarintParserIlLb1EEEPKcPvS5_PNS1_12ParseContextEEUlmE_EES5_S5_S5_T_; google::protobuf::internal::ReadPackedVarintArray<google::protobuf::internal::VarintParser<long,true>(void *,char const*,google::protobuf::internal::ParseContext *)::{lambda(ulong)#1}>(char const*,char const*,google::protobuf::internal::VarintParser<long,true>(void *,char const*,google::protobuf::internal::ParseContext *)::{lambda(ulong)#1}) mov [rsp+198h+var_20], rax mov rax, [rsp+198h+var_148] cmp rax, [rsp+198h+var_20] jnz short loc_1B849F mov rax, [rsp+198h+var_20] mov [rsp+198h+var_190], rax jmp short loc_1B84A8 loc_1B849F: xor eax, eax mov [rsp+198h+var_190], rax jmp short $+2 loc_1B84A8: mov rax, [rsp+198h+var_190] mov [rsp+198h+var_8], rax loc_1B84B5: mov rax, [rsp+198h+var_8] add rsp, 198h retn loc_1B84C5: mov rdi, [rsp+arg_110] call __Unwind_Resume
google::protobuf::internal * google::protobuf::internal::EpsCopyInputStream::ReadPackedVarint<char const* google::protobuf::internal::VarintParser<long,true>(void *,char const*,google::protobuf::internal::ParseContext *)::{lambda(unsigned long)#1}>( long long a1, google::protobuf::internal *a2, long long a3) { long long v3; // rsi _QWORD *v4; // rax google::protobuf::internal::LogMessage *v7; // [rsp+28h] [rbp-170h] google::protobuf::internal *v8; // [rsp+50h] [rbp-148h] long long v9; // [rsp+A0h] [rbp-F8h] char *v10; // [rsp+A8h] [rbp-F0h] char v11; // [rsp+B6h] [rbp-E2h] BYREF char v12; // [rsp+B7h] [rbp-E1h] _BYTE v13[56]; // [rsp+B8h] [rbp-E0h] BYREF _QWORD v14[4]; // [rsp+F0h] [rbp-A8h] BYREF int v15; // [rsp+164h] [rbp-34h] long long v16; // [rsp+168h] [rbp-30h] int i; // [rsp+170h] [rbp-28h] int Size; // [rsp+174h] [rbp-24h] google::protobuf::internal *v19[2]; // [rsp+178h] [rbp-20h] BYREF long long v20; // [rsp+188h] [rbp-10h] v20 = a3; v19[1] = (google::protobuf::internal *)a1; v19[0] = a2; Size = google::protobuf::internal::ReadSize(v19, (const char **)a2, a3); if ( !v19[0] ) return 0LL; for ( i = *(_QWORD *)(a1 + 8) - LODWORD(v19[0]); ; i = *(_QWORD *)(a1 + 8) - LODWORD(v19[0]) ) { if ( Size <= i ) { v8 = (google::protobuf::internal *)((char *)v19[0] + Size); v19[0] = (google::protobuf::internal *)google::protobuf::internal::ReadPackedVarintArray<char const* google::protobuf::internal::VarintParser<long,true>(void *,char const*,google::protobuf::internal::ParseContext *)::{lambda(unsigned long)#1}>( v19[0], v8, v20); if ( v8 == v19[0] ) return v19[0]; else return 0LL; } v3 = *(_QWORD *)(a1 + 8); v16 = v20; v19[0] = (google::protobuf::internal *)google::protobuf::internal::ReadPackedVarintArray<char const* google::protobuf::internal::VarintParser<long,true>(void *,char const*,google::protobuf::internal::ParseContext *)::{lambda(unsigned long)#1}>( v19[0], v3, v20); if ( !v19[0] ) return 0LL; v15 = LODWORD(v19[0]) - *(_QWORD *)(a1 + 8); if ( Size - i <= 16 ) break; Size -= i + v15; if ( *(int *)(a1 + 28) <= 16 ) return 0LL; v19[0] = (google::protobuf::internal *)google::protobuf::internal::EpsCopyInputStream::Next((google::protobuf::internal::EpsCopyInputStream *)a1); if ( !v19[0] ) return 0LL; v19[0] = (google::protobuf::internal *)((char *)v19[0] + v15); } memset(v14, 0LL, 26LL); v4 = *(_QWORD **)(a1 + 8); v14[0] = *v4; v14[1] = v4[1]; v12 = 0; if ( Size - i > 16 ) { google::protobuf::internal::LogMessage::LogMessage( (long long)v13, 3, (long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/parse_context.h", 848); v12 = 1; v7 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<( (long long)v13, (long long)"CHECK failed: (size - chunk_size) <= (kSlopBytes): "); google::protobuf::internal::LogFinisher::operator=((long long)&v11, v7); } if ( (v12 & 1) != 0 ) google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v13); v10 = (char *)v14 + Size - i; v9 = google::protobuf::internal::ReadPackedVarintArray<char const* google::protobuf::internal::VarintParser<long,true>(void *,char const*,google::protobuf::internal::ParseContext *)::{lambda(unsigned long)#1}>( (char *)v14 + v15, v10, v20); if ( v9 && (char *)v9 == v10 ) return (google::protobuf::internal *)(v9 - (_QWORD)v14 + *(_QWORD *)(a1 + 8)); else return 0LL; }
20,438
char const* google::protobuf::internal::EpsCopyInputStream::ReadPackedVarint<char const* google::protobuf::internal::PackedEnumParserArg<google::protobuf::UnknownFieldSet>(void*, char const*, google::protobuf::internal::ParseContext*, bool (*)(void const*, int), void const*, google::protobuf::internal::InternalMetadata*, int)::'lambda'(unsigned long)>(char const*, char const* google::protobuf::internal::PackedEnumParserArg<google::protobuf::UnknownFieldSet>(void*, char const*, google::protobuf::internal::ParseContext*, bool (*)(void const*, int), void const*, google::protobuf::internal::InternalMetadata*, int)::'lambda'(unsigned long))
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/parse_context.h
const char* EpsCopyInputStream::ReadPackedVarint(const char* ptr, Add add) { int size = ReadSize(&ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); int chunk_size = buffer_end_ - ptr; while (size > chunk_size) { ptr = ReadPackedVarintArray(ptr, buffer_end_, add); if (ptr == nullptr) return nullptr; int overrun = ptr - buffer_end_; GOOGLE_DCHECK(overrun >= 0 && overrun <= kSlopBytes); if (size - chunk_size <= kSlopBytes) { // The current buffer contains all the information needed, we don't need // to flip buffers. However we must parse from a buffer with enough space // so we are not prone to a buffer overflow. char buf[kSlopBytes + 10] = {}; std::memcpy(buf, buffer_end_, kSlopBytes); GOOGLE_CHECK_LE(size - chunk_size, kSlopBytes); auto end = buf + (size - chunk_size); auto res = ReadPackedVarintArray(buf + overrun, end, add); if (res == nullptr || res != end) return nullptr; return buffer_end_ + (res - buf); } size -= overrun + chunk_size; GOOGLE_DCHECK_GT(size, 0); // We must flip buffers if (limit_ <= kSlopBytes) return nullptr; ptr = Next(); if (ptr == nullptr) return nullptr; ptr += overrun; chunk_size = buffer_end_ - ptr; } auto end = ptr + size; ptr = ReadPackedVarintArray(ptr, end, add); return end == ptr ? ptr : nullptr; }
O3
c
char const* google::protobuf::internal::EpsCopyInputStream::ReadPackedVarint<char const* google::protobuf::internal::PackedEnumParserArg<google::protobuf::UnknownFieldSet>(void*, char const*, google::protobuf::internal::ParseContext*, bool (*)(void const*, int), void const*, google::protobuf::internal::InternalMetadata*, int)::'lambda'(unsigned long)>(char const*, char const* google::protobuf::internal::PackedEnumParserArg<google::protobuf::UnknownFieldSet>(void*, char const*, google::protobuf::internal::ParseContext*, bool (*)(void const*, int), void const*, google::protobuf::internal::InternalMetadata*, int)::'lambda'(unsigned long)): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdx, %rbx movq %rsi, %rax movq %rdi, %r14 movzbl (%rsi), %ebp testb %bpl, %bpl js 0x9fd7a incq %rax movq 0x8(%r14), %rsi movl %esi, %r13d subl %eax, %r13d cmpl %r13d, %ebp jle 0x9fd03 xorl %r15d, %r15d movq %rax, %rdi movq %rbx, %rdx callq 0x9fd95 testq %rax, %rax je 0x9fd21 movq %rax, %r12 movq 0x8(%r14), %rax subq %rax, %r12 movl %ebp, %ecx subl %r13d, %ecx cmpl $0x10, %ecx jle 0x9fd33 cmpl $0x11, 0x1c(%r14) jl 0x9fd21 movq %r14, %rdi callq 0x9ed98 testq %rax, %rax je 0x9fd21 addl %r12d, %r13d subl %r13d, %ebp movslq %r12d, %rcx addq %rcx, %rax movq 0x8(%r14), %rsi movl %esi, %r13d subl %eax, %r13d cmpl %r13d, %ebp jg 0x9fcb0 movslq %ebp, %r14 addq %rax, %r14 movq %rax, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x9fd95 xorl %r15d, %r15d cmpq %rax, %r14 cmoveq %rax, %r15 movq %r15, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq xorl %edx, %edx movq %rsp, %rbp movq %rdx, 0x10(%rbp) movw $0x0, 0x18(%rbp) movups (%rax), %xmm0 movaps %xmm0, (%rbp) movslq %ecx, %rax leaq (%rsp,%rax), %r13 movslq %r12d, %rax leaq (%rsp,%rax), %rdi movq %r13, %rsi movq %rbx, %rdx callq 0x9fd95 movq %rax, %r15 subq %rbp, %r15 addq 0x8(%r14), %r15 cmpq %r13, %rax movl $0x0, %eax cmovneq %rax, %r15 jmp 0x9fd21 movq %rax, %rdi movl %ebp, %esi callq 0x10e3c testq %rax, %rax je 0x9fd90 movl %edx, %ebp jmp 0x9fc9e xorl %r15d, %r15d jmp 0x9fd21
_ZN6google8protobuf8internal18EpsCopyInputStream16ReadPackedVarintIZNS1_12VarintParserIlLb0EEEPKcPvS6_PNS1_12ParseContextEEUlmE_EES6_S6_T_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rbx, rdx mov rax, rsi mov r14, rdi movzx ebp, byte ptr [rsi] test bpl, bpl js loc_9FD7A inc rax loc_9FC9E: mov rsi, [r14+8] mov r13d, esi sub r13d, eax cmp ebp, r13d jle short loc_9FD03 xor r15d, r15d loc_9FCB0: mov rdi, rax; this mov rdx, rbx call _ZN6google8protobuf8internal21ReadPackedVarintArrayIZNS1_12VarintParserIlLb0EEEPKcPvS5_PNS1_12ParseContextEEUlmE_EES5_S5_S5_T_; google::protobuf::internal::ReadPackedVarintArray<google::protobuf::internal::VarintParser<long,false>(void *,char const*,google::protobuf::internal::ParseContext *)::{lambda(ulong)#1}>(char const*,char const*,google::protobuf::internal::VarintParser<long,false>(void *,char const*,google::protobuf::internal::ParseContext *)::{lambda(ulong)#1}) test rax, rax jz short loc_9FD21 mov r12, rax mov rax, [r14+8] sub r12, rax mov ecx, ebp sub ecx, r13d cmp ecx, 10h jle short loc_9FD33 cmp dword ptr [r14+1Ch], 11h jl short loc_9FD21 mov rdi, r14; this call _ZN6google8protobuf8internal18EpsCopyInputStream4NextEv; google::protobuf::internal::EpsCopyInputStream::Next(void) test rax, rax jz short loc_9FD21 add r13d, r12d sub ebp, r13d movsxd rcx, r12d add rax, rcx mov rsi, [r14+8] mov r13d, esi sub r13d, eax cmp ebp, r13d jg short loc_9FCB0 loc_9FD03: movsxd r14, ebp add r14, rax mov rdi, rax; this mov rsi, r14 mov rdx, rbx call _ZN6google8protobuf8internal21ReadPackedVarintArrayIZNS1_12VarintParserIlLb0EEEPKcPvS5_PNS1_12ParseContextEEUlmE_EES5_S5_S5_T_; google::protobuf::internal::ReadPackedVarintArray<google::protobuf::internal::VarintParser<long,false>(void *,char const*,google::protobuf::internal::ParseContext *)::{lambda(ulong)#1}>(char const*,char const*,google::protobuf::internal::VarintParser<long,false>(void *,char const*,google::protobuf::internal::ParseContext *)::{lambda(ulong)#1}) xor r15d, r15d cmp r14, rax cmovz r15, rax loc_9FD21: mov rax, r15 add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_9FD33: xor edx, edx mov rbp, rsp mov [rbp+10h], rdx mov word ptr [rbp+18h], 0 movups xmm0, xmmword ptr [rax] movaps xmmword ptr [rbp+0], xmm0 movsxd rax, ecx lea r13, [rsp+rax+58h+var_58] movsxd rax, r12d lea rdi, [rsp+rax+58h+var_58]; this mov rsi, r13 mov rdx, rbx call _ZN6google8protobuf8internal21ReadPackedVarintArrayIZNS1_12VarintParserIlLb0EEEPKcPvS5_PNS1_12ParseContextEEUlmE_EES5_S5_S5_T_; google::protobuf::internal::ReadPackedVarintArray<google::protobuf::internal::VarintParser<long,false>(void *,char const*,google::protobuf::internal::ParseContext *)::{lambda(ulong)#1}>(char const*,char const*,google::protobuf::internal::VarintParser<long,false>(void *,char const*,google::protobuf::internal::ParseContext *)::{lambda(ulong)#1}) mov r15, rax sub r15, rbp add r15, [r14+8] cmp rax, r13 mov eax, 0 cmovnz r15, rax jmp short loc_9FD21 loc_9FD7A: mov rdi, rax; this mov esi, ebp; char * call _ZN6google8protobuf8internal16ReadSizeFallbackEPKcj; google::protobuf::internal::ReadSizeFallback(char const*,uint) test rax, rax jz short loc_9FD90 mov ebp, edx jmp loc_9FC9E loc_9FD90: xor r15d, r15d jmp short loc_9FD21
long long google::protobuf::internal::EpsCopyInputStream::ReadPackedVarint<char const* google::protobuf::internal::VarintParser<long,false>(void *,char const*,google::protobuf::internal::ParseContext *)::{lambda(unsigned long)#1}>( google::protobuf::internal::EpsCopyInputStream *this, google::protobuf::internal *a2) { int v2; // ebp char *SizeFallback; // rax int v4; // r13d signed long long v5; // r15 long long v6; // rax int v7; // r12d __int128 *v8; // rax int v9; // r12d google::protobuf::internal::EpsCopyInputStream *v10; // rax char *v11; // r14 long long v12; // rax char *v14; // rax int v15; // edx __int128 v16; // [rsp+0h] [rbp-58h] BYREF long long v17; // [rsp+10h] [rbp-48h] __int16 v18; // [rsp+18h] [rbp-40h] v2 = *(unsigned __int8 *)a2; if ( (v2 & 0x80u) != 0 ) { SizeFallback = google::protobuf::internal::ReadSizeFallback(a2, (const char *)*(unsigned __int8 *)a2); if ( !SizeFallback ) return 0LL; v2 = v15; } else { SizeFallback = (char *)a2 + 1; } v4 = *((_QWORD *)this + 1) - (_DWORD)SizeFallback; if ( v2 <= v4 ) { LABEL_10: v11 = &SizeFallback[v2]; v12 = google::protobuf::internal::ReadPackedVarintArray<char const* google::protobuf::internal::VarintParser<long,false>(void *,char const*,google::protobuf::internal::ParseContext *)::{lambda(unsigned long)#1}>((google::protobuf::internal *)SizeFallback); v5 = 0LL; if ( v11 == (char *)v12 ) return v12; } else { v5 = 0LL; while ( 1 ) { v6 = google::protobuf::internal::ReadPackedVarintArray<char const* google::protobuf::internal::VarintParser<long,false>(void *,char const*,google::protobuf::internal::ParseContext *)::{lambda(unsigned long)#1}>((google::protobuf::internal *)SizeFallback); if ( !v6 ) break; v7 = v6; v8 = (__int128 *)*((_QWORD *)this + 1); v9 = v7 - (_DWORD)v8; if ( v2 - v4 <= 16 ) { v17 = 0LL; v18 = 0; v16 = *v8; v14 = (char *)google::protobuf::internal::ReadPackedVarintArray<char const* google::protobuf::internal::VarintParser<long,false>(void *,char const*,google::protobuf::internal::ParseContext *)::{lambda(unsigned long)#1}>((google::protobuf::internal *)((char *)&v16 + v9)); v5 = *((_QWORD *)this + 1) + v14 - (char *)&v16; if ( v14 != (char *)&v16 + v2 - v4 ) return 0LL; return v5; } if ( *((int *)this + 7) < 17 ) return v5; v10 = google::protobuf::internal::EpsCopyInputStream::Next(this); if ( !v10 ) return v5; v2 -= v9 + v4; SizeFallback = (char *)v10 + v9; v4 = *((_QWORD *)this + 1) - (_DWORD)SizeFallback; if ( v2 <= v4 ) goto LABEL_10; } } return v5; }
ReadPackedVarint<google::protobuf::internal::VarintParser<long,false>(void*,char_const*,google::protobuf::internal::ParseContext*)::{lambda(unsigned_long)#1}>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBX,RDX MOV RAX,RSI MOV R14,RDI MOVZX EBP,byte ptr [RSI] TEST BPL,BPL JS 0x0019fd7a INC RAX LAB_0019fc9e: MOV RSI,qword ptr [R14 + 0x8] MOV R13D,ESI SUB R13D,EAX CMP EBP,R13D JLE 0x0019fd03 XOR R15D,R15D LAB_0019fcb0: MOV RDI,RAX MOV RDX,RBX CALL 0x0019fd95 TEST RAX,RAX JZ 0x0019fd21 MOV R12,RAX MOV RAX,qword ptr [R14 + 0x8] SUB R12,RAX MOV ECX,EBP SUB ECX,R13D CMP ECX,0x10 JLE 0x0019fd33 CMP dword ptr [R14 + 0x1c],0x11 JL 0x0019fd21 MOV RDI,R14 CALL 0x0019ed98 TEST RAX,RAX JZ 0x0019fd21 ADD R13D,R12D SUB EBP,R13D MOVSXD RCX,R12D ADD RAX,RCX MOV RSI,qword ptr [R14 + 0x8] MOV R13D,ESI SUB R13D,EAX CMP EBP,R13D JG 0x0019fcb0 LAB_0019fd03: MOVSXD R14,EBP ADD R14,RAX MOV RDI,RAX MOV RSI,R14 MOV RDX,RBX CALL 0x0019fd95 XOR R15D,R15D CMP R14,RAX CMOVZ R15,RAX LAB_0019fd21: MOV RAX,R15 ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0019fd33: XOR EDX,EDX MOV RBP,RSP MOV qword ptr [RBP + 0x10],RDX MOV word ptr [RBP + 0x18],0x0 MOVUPS XMM0,xmmword ptr [RAX] MOVAPS xmmword ptr [RBP],XMM0 MOVSXD RAX,ECX LEA R13,[RSP + RAX*0x1] MOVSXD RAX,R12D LEA RDI,[RSP + RAX*0x1] MOV RSI,R13 MOV RDX,RBX CALL 0x0019fd95 MOV R15,RAX SUB R15,RBP ADD R15,qword ptr [R14 + 0x8] CMP RAX,R13 MOV EAX,0x0 CMOVNZ R15,RAX JMP 0x0019fd21 LAB_0019fd7a: MOV RDI,RAX MOV ESI,EBP CALL 0x00110e3c TEST RAX,RAX JZ 0x0019fd90 MOV EBP,EDX JMP 0x0019fc9e LAB_0019fd90: XOR R15D,R15D JMP 0x0019fd21
/* char const* google::protobuf::internal::EpsCopyInputStream::ReadPackedVarint<google::protobuf::internal::VarintParser<long, false>(void*, char const*, google::protobuf::internal::ParseContext*)::{lambda(unsigned long)#1}>(char const*, google::protobuf::internal::VarintParser<long, false>(void*, char const*, google::protobuf::internal::ParseContext*)::{lambda(unsigned long)#1}) */ char * __thiscall google::protobuf::internal::EpsCopyInputStream:: ReadPackedVarint<google::protobuf::internal::VarintParser<long,false>(void*,char_const*,google::protobuf::internal::ParseContext*)::_lambda(unsigned_long)_1_> (EpsCopyInputStream *this,byte *param_1,int8 param_3) { byte bVar1; int4 *puVar2; char *pcVar3; long lVar4; char *pcVar5; int iVar6; int8 uVar7; int iVar8; int iVar9; char *pcVar10; int1 auVar11 [12]; int4 local_58; int4 uStack_54; int4 uStack_50; int4 uStack_4c; int8 local_48; int2 local_40; bVar1 = *param_1; if ((char)bVar1 < '\0') { auVar11 = ReadSizeFallback((char *)param_1,(uint)bVar1); if (auVar11._0_8_ == 0) { return (char *)0x0; } } else { auVar11[8] = bVar1; auVar11._0_8_ = param_1 + 1; auVar11._9_3_ = 0; } uVar7 = *(int8 *)(this + 8); iVar9 = (int)uVar7 - auVar11._0_4_; if (iVar9 < auVar11._8_4_) { do { pcVar3 = ReadPackedVarintArray<google::protobuf::internal::VarintParser<long,false>(void*,char_const*,google::protobuf::internal::ParseContext*)::_lambda(unsigned_long)_1_> (auVar11._0_8_,uVar7,param_3); if (pcVar3 == (char *)0x0) { return (char *)0x0; } puVar2 = *(int4 **)(this + 8); iVar8 = (int)pcVar3 - (int)puVar2; iVar6 = auVar11._8_4_ - iVar9; if (iVar6 < 0x11) { local_48 = 0; local_40 = 0; local_58 = *puVar2; uStack_54 = puVar2[1]; uStack_50 = puVar2[2]; uStack_4c = puVar2[3]; pcVar3 = (char *)((long)&local_58 + (long)iVar6); pcVar5 = ReadPackedVarintArray<google::protobuf::internal::VarintParser<long,false>(void*,char_const*,google::protobuf::internal::ParseContext*)::_lambda(unsigned_long)_1_> ((long)&local_58 + (long)iVar8,pcVar3,param_3); if (pcVar5 != pcVar3) { return (char *)0x0; } return pcVar5 + (*(long *)(this + 8) - (long)&local_58); } if (*(int *)(this + 0x1c) < 0x11) { return (char *)0x0; } lVar4 = Next(this); if (lVar4 == 0) { return (char *)0x0; } iVar6 = auVar11._8_4_ - (iVar9 + iVar8); auVar11._8_4_ = iVar6; auVar11._0_8_ = lVar4 + iVar8; uVar7 = *(int8 *)(this + 8); iVar9 = (int)uVar7 - (int)(lVar4 + iVar8); } while (iVar9 < iVar6); } pcVar10 = (char *)(auVar11._0_8_ + (long)auVar11._8_4_); pcVar5 = ReadPackedVarintArray<google::protobuf::internal::VarintParser<long,false>(void*,char_const*,google::protobuf::internal::ParseContext*)::_lambda(unsigned_long)_1_> (auVar11._0_8_,pcVar10,param_3); pcVar3 = (char *)0x0; if (pcVar10 == pcVar5) { pcVar3 = pcVar5; } return pcVar3; }
20,439
req_client_update
corpus-core[P]colibri-stateless/src/chains/eth/proofer/proof_sync.c
static c4_status_t req_client_update(proofer_ctx_t* ctx, uint32_t period, uint32_t count, chain_id_t chain_id, bytes_t* data) { buffer_t tmp = {0}; bprintf(&tmp, "eth/v1/beacon/light_client/updates?start_period=%d&count=%d", period, count); data_request_t* req = c4_state_get_data_request_by_url(&ctx->state, (char*) tmp.data.data); if (req) buffer_free(&tmp); if (req && req->response.data) { *data = req->response; return C4_SUCCESS; } else if (req && req->error) { ctx->state.error = strdup(req->error); return C4_ERROR; } data_request_t* new_req = safe_calloc(1, sizeof(data_request_t)); new_req->chain_id = chain_id; new_req->url = (char*) tmp.data.data; new_req->encoding = C4_DATA_ENCODING_SSZ; new_req->type = C4_DATA_TYPE_BEACON_API; c4_state_add_request(&ctx->state, new_req); return C4_PENDING; }
O0
c
req_client_update: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movq %r8, -0x28(%rbp) leaq -0x40(%rbp), %rdi xorl %esi, %esi movl $0x18, %edx callq 0x5110 movl -0x14(%rbp), %edx movl -0x18(%rbp), %ecx leaq -0x40(%rbp), %rdi leaq 0x444de(%rip), %rsi # 0x53048 movb $0x0, %al callq 0x19740 movq -0x10(%rbp), %rdi addq $0x38, %rdi movq -0x38(%rbp), %rsi callq 0x22360 movq %rax, -0x48(%rbp) cmpq $0x0, -0x48(%rbp) je 0xeb96 leaq -0x40(%rbp), %rdi callq 0x18d90 cmpq $0x0, -0x48(%rbp) je 0xebcb movq -0x48(%rbp), %rax cmpq $0x0, 0x38(%rax) je 0xebcb movq -0x28(%rbp), %rax movq -0x48(%rbp), %rcx movq 0x30(%rcx), %rdx movq %rdx, (%rax) movq 0x38(%rcx), %rcx movq %rcx, 0x8(%rax) movl $0x0, -0x4(%rbp) jmp 0xec56 cmpq $0x0, -0x48(%rbp) je 0xebfe movq -0x48(%rbp), %rax cmpq $0x0, 0x48(%rax) je 0xebfe movq -0x48(%rbp), %rax movq 0x48(%rax), %rdi callq 0x5030 movq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x40(%rax) movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xec56 jmp 0xec00 movl $0x1, %edi movl $0x80, %esi callq 0x18620 movq %rax, -0x50(%rbp) movl -0x1c(%rbp), %ecx movq -0x50(%rbp), %rax movl %ecx, (%rax) movq -0x38(%rbp), %rcx movq -0x50(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x50(%rbp), %rax movl $0x1, 0x8(%rax) movq -0x50(%rbp), %rax movl $0x0, 0x4(%rax) movq -0x10(%rbp), %rdi addq $0x38, %rdi movq -0x50(%rbp), %rsi callq 0x22400 movl $0x2, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nop
req_client_update: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov [rbp+var_1C], ecx mov [rbp+var_28], r8 lea rdi, [rbp+var_40] xor esi, esi mov edx, 18h call _memset mov edx, [rbp+var_14] mov ecx, [rbp+var_18] lea rdi, [rbp+var_40] lea rsi, aEthV1BeaconLig; "eth/v1/beacon/light_client/updates?star"... mov al, 0 call bprintf mov rdi, [rbp+var_10] add rdi, 38h ; '8' mov rsi, [rbp+var_38] call c4_state_get_data_request_by_url mov [rbp+var_48], rax cmp [rbp+var_48], 0 jz short loc_EB96 lea rdi, [rbp+var_40] call buffer_free loc_EB96: cmp [rbp+var_48], 0 jz short loc_EBCB mov rax, [rbp+var_48] cmp qword ptr [rax+38h], 0 jz short loc_EBCB mov rax, [rbp+var_28] mov rcx, [rbp+var_48] mov rdx, [rcx+30h] mov [rax], rdx mov rcx, [rcx+38h] mov [rax+8], rcx mov [rbp+var_4], 0 jmp loc_EC56 loc_EBCB: cmp [rbp+var_48], 0 jz short loc_EBFE mov rax, [rbp+var_48] cmp qword ptr [rax+48h], 0 jz short loc_EBFE mov rax, [rbp+var_48] mov rdi, [rax+48h] call _strdup mov rcx, rax mov rax, [rbp+var_10] mov [rax+40h], rcx mov [rbp+var_4], 0FFFFFFFFh jmp short loc_EC56 loc_EBFE: jmp short $+2 loc_EC00: mov edi, 1 mov esi, 80h call safe_calloc mov [rbp+var_50], rax mov ecx, [rbp+var_1C] mov rax, [rbp+var_50] mov [rax], ecx mov rcx, [rbp+var_38] mov rax, [rbp+var_50] mov [rax+10h], rcx mov rax, [rbp+var_50] mov dword ptr [rax+8], 1 mov rax, [rbp+var_50] mov dword ptr [rax+4], 0 mov rdi, [rbp+var_10] add rdi, 38h ; '8' mov rsi, [rbp+var_50] call c4_state_add_request mov [rbp+var_4], 2 loc_EC56: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long req_client_update(long long a1, int a2, int a3, int a4, _QWORD *a5) { int v5; // r8d int v6; // r9d _QWORD *v7; // rax long long v8; // rax long long v10; // [rsp+0h] [rbp-50h] _QWORD *data_request_by_url; // [rsp+8h] [rbp-48h] _BYTE v12[8]; // [rsp+10h] [rbp-40h] BYREF long long v13; // [rsp+18h] [rbp-38h] _QWORD *v14; // [rsp+28h] [rbp-28h] int v15; // [rsp+34h] [rbp-1Ch] int v16; // [rsp+38h] [rbp-18h] int v17; // [rsp+3Ch] [rbp-14h] long long v18; // [rsp+40h] [rbp-10h] v18 = a1; v17 = a2; v16 = a3; v15 = a4; v14 = a5; memset(v12, 0LL, 24LL); bprintf( (unsigned int)v12, (unsigned int)"eth/v1/beacon/light_client/updates?start_period=%d&count=%d", v17, v16, v5, v6); data_request_by_url = (_QWORD *)c4_state_get_data_request_by_url(v18 + 56, v13); if ( data_request_by_url && (buffer_free(v12), data_request_by_url[7]) ) { v7 = v14; *v14 = data_request_by_url[6]; v7[1] = data_request_by_url[7]; return 0; } else if ( data_request_by_url && data_request_by_url[9] ) { v8 = strdup(data_request_by_url[9]); *(_QWORD *)(v18 + 64) = v8; return (unsigned int)-1; } else { v10 = safe_calloc(1LL, 128LL); *(_DWORD *)v10 = v15; *(_QWORD *)(v10 + 16) = v13; *(_DWORD *)(v10 + 8) = 1; *(_DWORD *)(v10 + 4) = 0; c4_state_add_request(v18 + 56, v10); return 2; } }
req_client_update: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV dword ptr [RBP + -0x1c],ECX MOV qword ptr [RBP + -0x28],R8 LEA RDI,[RBP + -0x40] XOR ESI,ESI MOV EDX,0x18 CALL 0x00105110 MOV EDX,dword ptr [RBP + -0x14] MOV ECX,dword ptr [RBP + -0x18] LEA RDI,[RBP + -0x40] LEA RSI,[0x153048] MOV AL,0x0 CALL 0x00119740 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x38 MOV RSI,qword ptr [RBP + -0x38] CALL 0x00122360 MOV qword ptr [RBP + -0x48],RAX CMP qword ptr [RBP + -0x48],0x0 JZ 0x0010eb96 LEA RDI,[RBP + -0x40] CALL 0x00118d90 LAB_0010eb96: CMP qword ptr [RBP + -0x48],0x0 JZ 0x0010ebcb MOV RAX,qword ptr [RBP + -0x48] CMP qword ptr [RAX + 0x38],0x0 JZ 0x0010ebcb MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RCX + 0x30] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x38] MOV qword ptr [RAX + 0x8],RCX MOV dword ptr [RBP + -0x4],0x0 JMP 0x0010ec56 LAB_0010ebcb: CMP qword ptr [RBP + -0x48],0x0 JZ 0x0010ebfe MOV RAX,qword ptr [RBP + -0x48] CMP qword ptr [RAX + 0x48],0x0 JZ 0x0010ebfe MOV RAX,qword ptr [RBP + -0x48] MOV RDI,qword ptr [RAX + 0x48] CALL 0x00105030 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x40],RCX MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0010ec56 LAB_0010ebfe: JMP 0x0010ec00 LAB_0010ec00: MOV EDI,0x1 MOV ESI,0x80 CALL 0x00118620 MOV qword ptr [RBP + -0x50],RAX MOV ECX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],ECX MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX + 0x8],0x1 MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX + 0x4],0x0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x38 MOV RSI,qword ptr [RBP + -0x50] CALL 0x00122400 MOV dword ptr [RBP + -0x4],0x2 LAB_0010ec56: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
int4 req_client_update(long param_1,int4 param_2,int4 param_3,int4 param_4, int8 *param_5) { long lVar1; char *pcVar2; int4 *puVar3; int1 local_48 [8]; int8 local_40; int8 *local_30; int4 local_24; int4 local_20; int4 local_1c; long local_18; int4 local_c; local_30 = param_5; local_24 = param_4; local_20 = param_3; local_1c = param_2; local_18 = param_1; memset(local_48,0,0x18); bprintf(local_48,"eth/v1/beacon/light_client/updates?start_period=%d&count=%d",local_1c,local_20); lVar1 = c4_state_get_data_request_by_url(local_18 + 0x38,local_40); if ((lVar1 == 0) || (buffer_free(local_48), *(long *)(lVar1 + 0x38) == 0)) { if ((lVar1 == 0) || (*(long *)(lVar1 + 0x48) == 0)) { puVar3 = (int4 *)safe_calloc(1,0x80); *puVar3 = local_24; *(int8 *)(puVar3 + 4) = local_40; puVar3[2] = 1; puVar3[1] = 0; c4_state_add_request(local_18 + 0x38,puVar3); local_c = 2; } else { pcVar2 = strdup(*(char **)(lVar1 + 0x48)); *(char **)(local_18 + 0x40) = pcVar2; local_c = 0xffffffff; } } else { *local_30 = *(int8 *)(lVar1 + 0x30); local_30[1] = *(int8 *)(lVar1 + 0x38); local_c = 0; } return local_c; }
20,440
fn_same
eloqsql/mysys/mf_same.c
char * fn_same(char *to, const char *name, int flag) { char dev[FN_REFLEN]; const char *ext; size_t dev_length; DBUG_ENTER("fn_same"); DBUG_PRINT("enter",("to: %s name: %s flag: %d",to,name,flag)); if ((ext=strrchr(name+dirname_part(dev, name, &dev_length),FN_EXTCHAR)) == 0) ext=""; DBUG_RETURN(fn_format(to,to,dev,ext,flag)); }
O0
c
fn_same: 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) movl %edx, -0x224(%rbp) jmp 0x8b73e movq -0x220(%rbp), %rax movq %rax, -0x240(%rbp) leaq -0x210(%rbp), %rdi movq -0x220(%rbp), %rsi leaq -0x238(%rbp), %rdx callq 0x6db30 movq -0x240(%rbp), %rdi addq %rax, %rdi movl $0x2e, %esi callq 0x28380 movq %rax, -0x230(%rbp) cmpq $0x0, %rax jne 0x8b795 leaq 0x51c7d(%rip), %rax # 0xdd40b movq %rax, -0x230(%rbp) jmp 0x8b797 movq -0x218(%rbp), %rdi movq -0x218(%rbp), %rsi leaq -0x210(%rbp), %rdx movq -0x230(%rbp), %rcx movl -0x224(%rbp), %r8d callq 0x6dc50 movq %rax, -0x248(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x8b7e8 movq -0x248(%rbp), %rax addq $0x250, %rsp # imm = 0x250 popq %rbp retq callq 0x28390 nopl (%rax)
fn_same: 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 mov [rbp+var_224], edx jmp short $+2 loc_8B73E: mov rax, [rbp+var_220] mov [rbp+var_240], rax lea rdi, [rbp+var_210] mov rsi, [rbp+var_220] lea rdx, [rbp+var_238] call dirname_part mov rdi, [rbp+var_240] add rdi, rax mov esi, 2Eh ; '.' call _strrchr mov [rbp+var_230], rax cmp rax, 0 jnz short loc_8B795 lea rax, asc_DD407+4; "" mov [rbp+var_230], rax loc_8B795: jmp short $+2 loc_8B797: mov rdi, [rbp+var_218] mov rsi, [rbp+var_218] lea rdx, [rbp+var_210] mov rcx, [rbp+var_230] mov r8d, [rbp+var_224] call fn_format mov [rbp+var_248], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_8B7E8 mov rax, [rbp+var_248] add rsp, 250h pop rbp retn loc_8B7E8: call ___stack_chk_fail
_BYTE * fn_same(_BYTE *a1, _BYTE *a2, int a3) { long long v3; // rax long long v5; // [rsp+18h] [rbp-238h] BYREF char *v6; // [rsp+20h] [rbp-230h] int v7; // [rsp+2Ch] [rbp-224h] _BYTE *v8; // [rsp+30h] [rbp-220h] _BYTE *v9; // [rsp+38h] [rbp-218h] _BYTE v10[520]; // [rsp+40h] [rbp-210h] BYREF unsigned long long v11; // [rsp+248h] [rbp-8h] v11 = __readfsqword(0x28u); v9 = a1; v8 = a2; v7 = a3; v3 = dirname_part((long long)v10, a2, &v5); v6 = (char *)strrchr(&a2[v3], 46LL); if ( !v6 ) v6 = ""; return fn_format(v9, v9, (long long)v10, v6, v7); }
fn_same: 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 MOV dword ptr [RBP + -0x224],EDX JMP 0x0018b73e LAB_0018b73e: MOV RAX,qword ptr [RBP + -0x220] MOV qword ptr [RBP + -0x240],RAX LEA RDI,[RBP + -0x210] MOV RSI,qword ptr [RBP + -0x220] LEA RDX,[RBP + -0x238] CALL 0x0016db30 MOV RDI,qword ptr [RBP + -0x240] ADD RDI,RAX MOV ESI,0x2e CALL 0x00128380 MOV qword ptr [RBP + -0x230],RAX CMP RAX,0x0 JNZ 0x0018b795 LEA RAX,[0x1dd40b] MOV qword ptr [RBP + -0x230],RAX LAB_0018b795: JMP 0x0018b797 LAB_0018b797: MOV RDI,qword ptr [RBP + -0x218] MOV RSI,qword ptr [RBP + -0x218] LEA RDX,[RBP + -0x210] MOV RCX,qword ptr [RBP + -0x230] MOV R8D,dword ptr [RBP + -0x224] CALL 0x0016dc50 MOV qword ptr [RBP + -0x248],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0018b7e8 MOV RAX,qword ptr [RBP + -0x248] ADD RSP,0x250 POP RBP RET LAB_0018b7e8: CALL 0x00128390
int8 fn_same(int8 param_1,long param_2,int4 param_3) { long lVar1; int8 uVar2; long in_FS_OFFSET; int1 local_240 [8]; char *local_238; int4 local_22c; long local_228; int8 local_220; int1 local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_22c = param_3; local_228 = param_2; local_220 = param_1; lVar1 = dirname_part(local_218,param_2,local_240); local_238 = strrchr((char *)(param_2 + lVar1),0x2e); if (local_238 == (char *)0x0) { local_238 = ""; } uVar2 = fn_format(local_220,local_220,local_218,local_238,local_22c); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return uVar2; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
20,441
ma_bitmap_reset_cache
eloqsql/storage/maria/ma_bitmap.c
void _ma_bitmap_reset_cache(MARIA_SHARE *share) { MARIA_FILE_BITMAP *bitmap= &share->bitmap; if (bitmap->map) /* If using bitmap */ { /* Forget changes in current bitmap page */ bitmap->changed= 0; /* We can't read a page yet, as in some case we don't have an active page cache yet. Pretend we have a dummy, full and not changed bitmap page in memory. We set bitmap->page to a value so that if we use it in move_to_next_bitmap() it will point to page 0. (This can only happen if writing to a bitmap page fails) */ bitmap->page= ((pgcache_page_no_t) 0) - bitmap->pages_covered; bitmap->used_size= bitmap->total_size= bitmap->max_total_size; bitmap->full_head_size= bitmap->full_tail_size= bitmap->max_total_size; bfill(bitmap->map, share->block_size, 255); #ifndef DBUG_OFF memcpy(bitmap->map + bitmap->block_size, bitmap->map, bitmap->block_size); #endif /* Start scanning for free space from start of file */ share->state.first_bitmap_with_space = 0; } }
O3
c
ma_bitmap_reset_cache: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx movq 0xa18(%rdi), %rdi testq %rdi, %rdi je 0x52714 movb $0x0, 0xa30(%rbx) xorl %eax, %eax subq 0xb48(%rbx), %rax movq %rax, 0xa20(%rbx) movl 0xb3c(%rbx), %eax movl %eax, 0xb38(%rbx) movl %eax, 0xa34(%rbx) movl %eax, 0xa3c(%rbx) movl %eax, 0xa38(%rbx) movl 0x7bc(%rbx), %edx movl $0xff, %esi callq 0x292b0 movq $0x0, 0xd0(%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq
_ma_bitmap_reset_cache: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi mov rdi, [rdi+0A18h] test rdi, rdi jz short loc_52714 mov byte ptr [rbx+0A30h], 0 xor eax, eax sub rax, [rbx+0B48h] mov [rbx+0A20h], rax mov eax, [rbx+0B3Ch] mov [rbx+0B38h], eax mov [rbx+0A34h], eax mov [rbx+0A3Ch], eax mov [rbx+0A38h], eax mov edx, [rbx+7BCh] mov esi, 0FFh call _memset mov qword ptr [rbx+0D0h], 0 loc_52714: add rsp, 8 pop rbx pop rbp retn
long long ma_bitmap_reset_cache(long long a1) { long long v2; // rdi int v3; // eax long long result; // rax v2 = *(_QWORD *)(a1 + 2584); if ( v2 ) { *(_BYTE *)(a1 + 2608) = 0; *(_QWORD *)(a1 + 2592) = -*(_QWORD *)(a1 + 2888); v3 = *(_DWORD *)(a1 + 2876); *(_DWORD *)(a1 + 2872) = v3; *(_DWORD *)(a1 + 2612) = v3; *(_DWORD *)(a1 + 2620) = v3; *(_DWORD *)(a1 + 2616) = v3; result = memset(v2, 255LL, *(unsigned int *)(a1 + 1980)); *(_QWORD *)(a1 + 208) = 0LL; } return result; }
_ma_bitmap_reset_cache: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0xa18] TEST RDI,RDI JZ 0x00152714 MOV byte ptr [RBX + 0xa30],0x0 XOR EAX,EAX SUB RAX,qword ptr [RBX + 0xb48] MOV qword ptr [RBX + 0xa20],RAX MOV EAX,dword ptr [RBX + 0xb3c] MOV dword ptr [RBX + 0xb38],EAX MOV dword ptr [RBX + 0xa34],EAX MOV dword ptr [RBX + 0xa3c],EAX MOV dword ptr [RBX + 0xa38],EAX MOV EDX,dword ptr [RBX + 0x7bc] MOV ESI,0xff CALL 0x001292b0 MOV qword ptr [RBX + 0xd0],0x0 LAB_00152714: ADD RSP,0x8 POP RBX POP RBP RET
void _ma_bitmap_reset_cache(long param_1) { int4 uVar1; if (*(void **)(param_1 + 0xa18) != (void *)0x0) { *(int1 *)(param_1 + 0xa30) = 0; *(long *)(param_1 + 0xa20) = -*(long *)(param_1 + 0xb48); uVar1 = *(int4 *)(param_1 + 0xb3c); *(int4 *)(param_1 + 0xb38) = uVar1; *(int4 *)(param_1 + 0xa34) = uVar1; *(int4 *)(param_1 + 0xa3c) = uVar1; *(int4 *)(param_1 + 0xa38) = uVar1; memset(*(void **)(param_1 + 0xa18),0xff,(ulong)*(uint *)(param_1 + 0x7bc)); *(int8 *)(param_1 + 0xd0) = 0; } return; }
20,442
mz_zip_end
7CodeWizard[P]stablediffusion/thirdparty/miniz.h
mz_bool mz_zip_end(mz_zip_archive *pZip) { if (!pZip) return MZ_FALSE; if (pZip->m_zip_mode == MZ_ZIP_MODE_READING) return mz_zip_reader_end(pZip); #ifndef MINIZ_NO_ARCHIVE_WRITING_APIS else if ((pZip->m_zip_mode == MZ_ZIP_MODE_WRITING) || (pZip->m_zip_mode == MZ_ZIP_MODE_WRITING_HAS_BEEN_FINALIZED)) return mz_zip_writer_end(pZip); #endif return MZ_FALSE; }
O1
c
mz_zip_end: testq %rdi, %rdi je 0x8a6d7 movl 0x14(%rdi), %eax leal -0x2(%rax), %ecx cmpl $0x2, %ecx jae 0x8a6c8 movl $0x1, %esi jmp 0x868d1 cmpl $0x1, %eax jne 0x8a6d7 movl $0x1, %esi jmp 0x83479 xorl %eax, %eax retq
mz_zip_end: test rdi, rdi jz short loc_8A6D7 mov eax, [rdi+14h] lea ecx, [rax-2] cmp ecx, 2 jnb short loc_8A6C8 mov esi, 1 jmp mz_zip_writer_end_internal loc_8A6C8: cmp eax, 1 jnz short loc_8A6D7 mov esi, 1 jmp mz_zip_reader_end_internal loc_8A6D7: xor eax, eax retn
long long mz_zip_end(long long a1) { int v1; // eax if ( !a1 ) return 0LL; v1 = *(_DWORD *)(a1 + 20); if ( (unsigned int)(v1 - 2) < 2 ) return mz_zip_writer_end_internal(a1, 1); if ( v1 == 1 ) return mz_zip_reader_end_internal(a1, 1); else return 0LL; }
20,443
mz_zip_end
7CodeWizard[P]stablediffusion/thirdparty/miniz.h
mz_bool mz_zip_end(mz_zip_archive *pZip) { if (!pZip) return MZ_FALSE; if (pZip->m_zip_mode == MZ_ZIP_MODE_READING) return mz_zip_reader_end(pZip); #ifndef MINIZ_NO_ARCHIVE_WRITING_APIS else if ((pZip->m_zip_mode == MZ_ZIP_MODE_WRITING) || (pZip->m_zip_mode == MZ_ZIP_MODE_WRITING_HAS_BEEN_FINALIZED)) return mz_zip_writer_end(pZip); #endif return MZ_FALSE; }
O2
c
mz_zip_end: testq %rdi, %rdi je 0x64886 movl 0x14(%rdi), %eax leal -0x2(%rax), %ecx cmpl $0x2, %ecx jb 0x611bf cmpl $0x1, %eax je 0x5d926 xorl %eax, %eax retq
mz_zip_end: test rdi, rdi jz short loc_64886 mov eax, [rdi+14h] lea ecx, [rax-2] cmp ecx, 2 jb mz_zip_writer_end cmp eax, 1 jz mz_zip_reader_end loc_64886: xor eax, eax retn
long long mz_zip_end(long long a1) { int v1; // eax if ( !a1 ) return 0LL; v1 = *(_DWORD *)(a1 + 20); if ( (unsigned int)(v1 - 2) < 2 ) return mz_zip_writer_end(a1); if ( v1 != 1 ) return 0LL; return mz_zip_reader_end(a1); }
mz_zip_end: TEST RDI,RDI JZ 0x00164886 MOV EAX,dword ptr [RDI + 0x14] LEA ECX,[RAX + -0x2] CMP ECX,0x2 JC 0x001611bf CMP EAX,0x1 JZ 0x0015d926 LAB_00164886: XOR EAX,EAX RET
int8 mz_zip_end(long param_1) { int8 uVar1; if (param_1 != 0) { if (*(int *)(param_1 + 0x14) - 2U < 2) { uVar1 = mz_zip_writer_end_internal(param_1,1); return uVar1; } if (*(int *)(param_1 + 0x14) == 1) { uVar1 = mz_zip_reader_end_internal(param_1,1); return uVar1; } } return 0; }
20,444
mz_zip_end
7CodeWizard[P]stablediffusion/thirdparty/miniz.h
mz_bool mz_zip_end(mz_zip_archive *pZip) { if (!pZip) return MZ_FALSE; if (pZip->m_zip_mode == MZ_ZIP_MODE_READING) return mz_zip_reader_end(pZip); #ifndef MINIZ_NO_ARCHIVE_WRITING_APIS else if ((pZip->m_zip_mode == MZ_ZIP_MODE_WRITING) || (pZip->m_zip_mode == MZ_ZIP_MODE_WRITING_HAS_BEEN_FINALIZED)) return mz_zip_writer_end(pZip); #endif return MZ_FALSE; }
O3
c
mz_zip_end: testq %rdi, %rdi je 0x89426 movl 0x14(%rdi), %eax leal -0x2(%rax), %ecx cmpl $0x2, %ecx jae 0x89417 movl $0x1, %esi jmp 0x8585a cmpl $0x1, %eax jne 0x89426 movl $0x1, %esi jmp 0x824b0 xorl %eax, %eax retq
mz_zip_end: test rdi, rdi jz short loc_89426 mov eax, [rdi+14h] lea ecx, [rax-2] cmp ecx, 2 jnb short loc_89417 mov esi, 1 jmp mz_zip_writer_end_internal loc_89417: cmp eax, 1 jnz short loc_89426 mov esi, 1 jmp mz_zip_reader_end_internal loc_89426: xor eax, eax retn
long long mz_zip_end(long long a1) { int v1; // eax if ( !a1 ) return 0LL; v1 = *(_DWORD *)(a1 + 20); if ( (unsigned int)(v1 - 2) < 2 ) return mz_zip_writer_end_internal(a1, 1); if ( v1 == 1 ) return mz_zip_reader_end_internal(a1, 1); else return 0LL; }
20,445
glfwPlatformGetGammaRamp
untodesu[P]riteg/build_O0/_deps/glfw-src/src/x11_monitor.c
GLFWbool _glfwPlatformGetGammaRamp(_GLFWmonitor* monitor, GLFWgammaramp* ramp) { if (_glfw.x11.randr.available && !_glfw.x11.randr.gammaBroken) { const size_t size = XRRGetCrtcGammaSize(_glfw.x11.display, monitor->x11.crtc); XRRCrtcGamma* gamma = XRRGetCrtcGamma(_glfw.x11.display, monitor->x11.crtc); _glfwAllocGammaArrays(ramp, size); memcpy(ramp->red, gamma->red, size * sizeof(unsigned short)); memcpy(ramp->green, gamma->green, size * sizeof(unsigned short)); memcpy(ramp->blue, gamma->blue, size * sizeof(unsigned short)); XRRFreeGamma(gamma); return GLFW_TRUE; } else if (_glfw.x11.vidmode.available) { int size; XF86VidModeGetGammaRampSize(_glfw.x11.display, _glfw.x11.screen, &size); _glfwAllocGammaArrays(ramp, size); XF86VidModeGetGammaRamp(_glfw.x11.display, _glfw.x11.screen, ramp->size, ramp->red, ramp->green, ramp->blue); return GLFW_TRUE; } else { _glfwInputError(GLFW_PLATFORM_ERROR, "X11: Gamma ramp access not supported by server"); return GLFW_FALSE; } }
O0
c
glfwPlatformGetGammaRamp: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) leaq 0xb11f1(%rip), %rax # 0xe0c68 cmpl $0x0, 0x20570(%rax) je 0x2fb76 leaq 0xb11dd(%rip), %rax # 0xe0c68 cmpl $0x0, 0x20590(%rax) jne 0x2fb76 leaq 0xb11c9(%rip), %rax # 0xe0c68 movq 0x205c8(%rax), %rax leaq 0xb11bb(%rip), %rcx # 0xe0c68 movq 0x1fec0(%rcx), %rdi movq -0x10(%rbp), %rcx movq 0x90(%rcx), %rsi callq *%rax cltq movq %rax, -0x20(%rbp) leaq 0xb119a(%rip), %rax # 0xe0c68 movq 0x205c0(%rax), %rax leaq 0xb118c(%rip), %rcx # 0xe0c68 movq 0x1fec0(%rcx), %rdi movq -0x10(%rbp), %rcx movq 0x90(%rcx), %rsi callq *%rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rax movl %eax, %esi callq 0x26630 movq -0x18(%rbp), %rax movq (%rax), %rdi movq -0x28(%rbp), %rax movq 0x8(%rax), %rsi movq -0x20(%rbp), %rdx shlq %rdx callq 0xc730 movq -0x18(%rbp), %rax movq 0x8(%rax), %rdi movq -0x28(%rbp), %rax movq 0x10(%rax), %rsi movq -0x20(%rbp), %rdx shlq %rdx callq 0xc730 movq -0x18(%rbp), %rax movq 0x10(%rax), %rdi movq -0x28(%rbp), %rax movq 0x18(%rax), %rsi movq -0x20(%rbp), %rdx shlq %rdx callq 0xc730 leaq 0xb110b(%rip), %rax # 0xe0c68 movq 0x205a8(%rax), %rax movq -0x28(%rbp), %rdi callq *%rax movl $0x1, -0x4(%rbp) jmp 0x2fc31 leaq 0xb10eb(%rip), %rax # 0xe0c68 cmpl $0x0, 0x206c8(%rax) je 0x2fc17 leaq 0xb10d7(%rip), %rax # 0xe0c68 movq 0x206f8(%rax), %rax leaq 0xb10c9(%rip), %rcx # 0xe0c68 movq 0x1fec0(%rcx), %rdi leaq 0xb10bb(%rip), %rcx # 0xe0c68 movl 0x1fec8(%rcx), %esi leaq -0x2c(%rbp), %rdx callq *%rax movq -0x18(%rbp), %rdi movl -0x2c(%rbp), %esi callq 0x26630 leaq 0xb109c(%rip), %rax # 0xe0c68 movq 0x206e8(%rax), %rax leaq 0xb108e(%rip), %rcx # 0xe0c68 movq 0x1fec0(%rcx), %rdi leaq 0xb1080(%rip), %rcx # 0xe0c68 movl 0x1fec8(%rcx), %esi movq -0x18(%rbp), %rcx movl 0x18(%rcx), %edx movq -0x18(%rbp), %rcx movq (%rcx), %rcx movq -0x18(%rbp), %r8 movq 0x8(%r8), %r8 movq -0x18(%rbp), %r9 movq 0x10(%r9), %r9 callq *%rax movl $0x1, -0x4(%rbp) jmp 0x2fc31 movl $0x10008, %edi # imm = 0x10008 leaq 0x8a822(%rip), %rsi # 0xba445 movb $0x0, %al callq 0x221a0 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
_glfwPlatformGetGammaRamp: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi lea rax, _glfw cmp dword ptr ds:loc_20570[rax], 0 jz loc_2FB76 lea rax, _glfw cmp dword ptr ds:_ZNSt6vectorIPKcSaIS1_EE19_M_range_initializeIPKS1_EEvT_S7_St20forward_iterator_tag[rax], 0; std::vector<char const*>::_M_range_initialize<char const* const*>(char const* const*,char const* const*,std::forward_iterator_tag) jnz loc_2FB76 lea rax, _glfw mov rax, [rax+205C8h] lea rcx, _glfw mov rdi, qword ptr ds:loc_1FEC0[rcx] mov rcx, [rbp+var_10] mov rsi, [rcx+90h] call rax cdqe mov [rbp+var_20], rax lea rax, _glfw mov rax, [rax+205C0h] lea rcx, _glfw mov rdi, qword ptr ds:loc_1FEC0[rcx] mov rcx, [rbp+var_10] mov rsi, [rcx+90h] call rax mov [rbp+var_28], rax mov rdi, [rbp+var_18] mov rax, [rbp+var_20] mov esi, eax call _glfwAllocGammaArrays mov rax, [rbp+var_18] mov rdi, [rax] mov rax, [rbp+var_28] mov rsi, [rax+8] mov rdx, [rbp+var_20] shl rdx, 1 call _memcpy mov rax, [rbp+var_18] mov rdi, [rax+8] mov rax, [rbp+var_28] mov rsi, [rax+10h] mov rdx, [rbp+var_20] shl rdx, 1 call _memcpy mov rax, [rbp+var_18] mov rdi, [rax+10h] mov rax, [rbp+var_28] mov rsi, [rax+18h] mov rdx, [rbp+var_20] shl rdx, 1 call _memcpy lea rax, _glfw mov rax, qword ptr ds:loc_205A8[rax] mov rdi, [rbp+var_28] call rax mov [rbp+var_4], 1 jmp loc_2FC31 loc_2FB76: lea rax, _glfw cmp dword ptr [rax+206C8h], 0 jz loc_2FC17 lea rax, _glfw mov rax, qword ptr ds:loc_206F8[rax] lea rcx, _glfw mov rdi, qword ptr ds:loc_1FEC0[rcx] lea rcx, _glfw mov esi, [rcx+1FEC8h] lea rdx, [rbp+var_2C] call rax mov rdi, [rbp+var_18] mov esi, [rbp+var_2C] call _glfwAllocGammaArrays lea rax, _glfw mov rax, qword ptr ds:loc_206E8[rax] lea rcx, _glfw mov rdi, qword ptr ds:loc_1FEC0[rcx] lea rcx, _glfw mov esi, [rcx+1FEC8h] mov rcx, [rbp+var_18] mov edx, [rcx+18h] mov rcx, [rbp+var_18] mov rcx, [rcx] mov r8, [rbp+var_18] mov r8, [r8+8] mov r9, [rbp+var_18] mov r9, [r9+10h] call rax mov [rbp+var_4], 1 jmp short loc_2FC31 loc_2FC17: mov edi, 10008h lea rsi, aX11GammaRampAc; "X11: Gamma ramp access not supported by"... mov al, 0 call _glfwInputError mov [rbp+var_4], 0 loc_2FC31: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long glfwPlatformGetGammaRamp(long long a1, _QWORD *a2) { unsigned int v3; // [rsp+4h] [rbp-2Ch] BYREF _QWORD *v4; // [rsp+8h] [rbp-28h] long long v5; // [rsp+10h] [rbp-20h] _QWORD *v6; // [rsp+18h] [rbp-18h] long long v7; // [rsp+20h] [rbp-10h] v7 = a1; v6 = a2; if ( !*(_DWORD *)((char *)&loc_20570 + (_QWORD)glfw) || *(_DWORD *)((char *)std::vector<char const*>::_M_range_initialize<char const* const*> + (_QWORD)glfw) ) { if ( glfw[33202] ) { (*(void ( **)(_QWORD, _QWORD, unsigned int *))((char *)&loc_206F8 + (_QWORD)glfw))( *(_QWORD *)((char *)&loc_1FEC0 + (_QWORD)glfw), (unsigned int)glfw[32690], &v3); glfwAllocGammaArrays((long long)v6, v3); (*(void ( **)(_QWORD, _QWORD, _QWORD, _QWORD, _QWORD, _QWORD))((char *)&loc_206E8 + (_QWORD)glfw))( *(_QWORD *)((char *)&loc_1FEC0 + (_QWORD)glfw), (unsigned int)glfw[32690], *((unsigned int *)v6 + 6), *v6, v6[1], v6[2]); return 1; } else { glfwInputError(0x10008u, (long long)"X11: Gamma ramp access not supported by server"); return 0; } } else { v5 = (*(int ( **)(_QWORD, _QWORD))&glfw[33138])( *(_QWORD *)((char *)&loc_1FEC0 + (_QWORD)glfw), *(_QWORD *)(v7 + 144)); v4 = (_QWORD *)(*(long long ( **)(_QWORD, _QWORD))&glfw[33136])( *(_QWORD *)((char *)&loc_1FEC0 + (_QWORD)glfw), *(_QWORD *)(v7 + 144)); glfwAllocGammaArrays((long long)v6, v5); memcpy(*v6, v4[1], 2 * v5); memcpy(v6[1], v4[2], 2 * v5); memcpy(v6[2], v4[3], 2 * v5); (*(void ( **)(_QWORD *))((char *)&loc_205A8 + (_QWORD)glfw))(v4); return 1; } }
_glfwPlatformGetGammaRamp: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI LEA RAX,[0x1e0c68] CMP dword ptr [RAX + 0x20570],0x0 JZ 0x0012fb76 LEA RAX,[0x1e0c68] CMP dword ptr [RAX + 0x20590],0x0 JNZ 0x0012fb76 LEA RAX,[0x1e0c68] MOV RAX,qword ptr [RAX + 0x205c8] LEA RCX,[0x1e0c68] MOV RDI,qword ptr [RCX + 0x1fec0] MOV RCX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RCX + 0x90] CALL RAX CDQE MOV qword ptr [RBP + -0x20],RAX LEA RAX,[0x1e0c68] MOV RAX,qword ptr [RAX + 0x205c0] LEA RCX,[0x1e0c68] MOV RDI,qword ptr [RCX + 0x1fec0] MOV RCX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RCX + 0x90] CALL RAX MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x20] MOV ESI,EAX CALL 0x00126630 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RAX + 0x8] MOV RDX,qword ptr [RBP + -0x20] SHL RDX,0x1 CALL 0x0010c730 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RBP + -0x20] SHL RDX,0x1 CALL 0x0010c730 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RAX + 0x18] MOV RDX,qword ptr [RBP + -0x20] SHL RDX,0x1 CALL 0x0010c730 LEA RAX,[0x1e0c68] MOV RAX,qword ptr [RAX + 0x205a8] MOV RDI,qword ptr [RBP + -0x28] CALL RAX MOV dword ptr [RBP + -0x4],0x1 JMP 0x0012fc31 LAB_0012fb76: LEA RAX,[0x1e0c68] CMP dword ptr [RAX + 0x206c8],0x0 JZ 0x0012fc17 LEA RAX,[0x1e0c68] MOV RAX,qword ptr [RAX + 0x206f8] LEA RCX,[0x1e0c68] MOV RDI,qword ptr [RCX + 0x1fec0] LEA RCX,[0x1e0c68] MOV ESI,dword ptr [RCX + 0x1fec8] LEA RDX,[RBP + -0x2c] CALL RAX MOV RDI,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RBP + -0x2c] CALL 0x00126630 LEA RAX,[0x1e0c68] MOV RAX,qword ptr [RAX + 0x206e8] LEA RCX,[0x1e0c68] MOV RDI,qword ptr [RCX + 0x1fec0] LEA RCX,[0x1e0c68] MOV ESI,dword ptr [RCX + 0x1fec8] MOV RCX,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RCX + 0x18] MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOV R8,qword ptr [RBP + -0x18] MOV R8,qword ptr [R8 + 0x8] MOV R9,qword ptr [RBP + -0x18] MOV R9,qword ptr [R9 + 0x10] CALL RAX MOV dword ptr [RBP + -0x4],0x1 JMP 0x0012fc31 LAB_0012fc17: MOV EDI,0x10008 LEA RSI,[0x1ba445] MOV AL,0x0 CALL 0x001221a0 MOV dword ptr [RBP + -0x4],0x0 LAB_0012fc31: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 _glfwPlatformGetGammaRamp(long param_1,int8 *param_2) { int iVar1; int4 local_34; long local_30; ulong local_28; int8 *local_20; long local_18; int4 local_c; local_20 = param_2; local_18 = param_1; if ((DAT_002011d8 == 0) || (DAT_002011f8 != 0)) { if (DAT_00201330 == 0) { _glfwInputError(0x10008,"X11: Gamma ramp access not supported by server"); local_c = 0; } else { (*DAT_00201360)(DAT_00200b28,DAT_00200b30,&local_34); _glfwAllocGammaArrays(local_20,local_34); (*DAT_00201350)(DAT_00200b28,DAT_00200b30,*(int4 *)(local_20 + 3),*local_20,local_20[1], local_20[2]); local_c = 1; } } else { iVar1 = (*DAT_00201230)(DAT_00200b28,*(int8 *)(param_1 + 0x90)); local_28 = (ulong)iVar1; local_30 = (*DAT_00201228)(DAT_00200b28,*(int8 *)(local_18 + 0x90)); _glfwAllocGammaArrays(local_20,local_28 & 0xffffffff); memcpy((void *)*local_20,*(void **)(local_30 + 8),local_28 << 1); memcpy((void *)local_20[1],*(void **)(local_30 + 0x10),local_28 << 1); memcpy((void *)local_20[2],*(void **)(local_30 + 0x18),local_28 << 1); (*DAT_00201210)(local_30); local_c = 1; } return local_c; }
20,446
parse_array_or_object(String*, unsigned char const*, unsigned long, bool, bool, unsigned long)
eloqsql/plugin/type_mysql_json/mysql_json.cc
static bool parse_array_or_object(String *buffer, const uchar *data, size_t len, bool handle_as_object, bool large, size_t depth) { if (++depth > JSON_DOCUMENT_MAX_DEPTH) return true; /* Make sure the document is long enough to contain the two length fields (both number of elements or members, and number of bytes). */ const size_t offset_size= large ? LARGE_OFFSET_SIZE : SMALL_OFFSET_SIZE; /* The length has to be at least double offset size (header). */ if (len < 2 * offset_size) return true; /* Every JSON Object or Array contains two numbers in the header: - The number of elements in the Object / Array (Keys) - The total number of bytes occupied by the JSON Object / Array, including the two numbers in the header. Depending on the Object / Array type (small / large) the numbers are stored in 2 bytes or 4 bytes each. */ const size_t element_count= read_offset_or_size(data, large); const size_t bytes= read_offset_or_size(data + offset_size, large); /* The value can't have more bytes than what's available in the buffer. */ if (bytes > len) return true; if (buffer->append(handle_as_object ? '{' : '[')) return true; for (size_t i= 0; i < element_count; i++) { if (handle_as_object) { /* The JSON Object is stored as a header part and a data part. Header consists of: - two length fields, - an array of pointers to keys. - an array of tuples (type, pointer to values) * For certain types, the pointer to values is replaced by the actual value. (see type_is_stored_inline) Data consists of: - All Key data, in order - All Value data, in order */ const size_t key_offset= 2 * offset_size + i * key_size(large); const size_t key_start= read_offset_or_size(data + key_offset, large); /* The length of keys is always stored in 2 bytes (large == false) */ const size_t key_len= read_offset_or_size( data + key_offset + offset_size, false); const size_t value_type_offset=(2 * offset_size + element_count * key_size(large) + i * value_size(large)); /* First print the key. */ if (buffer->append('"') || append_string_json(buffer, data + key_start, key_len) || buffer->append(STRING_WITH_LEN("\": "))) { return true; } /* Then print the value. */ if (parse_mysql_scalar_or_value(buffer, data, bytes, value_type_offset, large, depth)) return true; } else { /* Arrays do not have the keys vector and its associated data. We jump straight to reading values. */ const size_t value_type_offset= 2 * offset_size + value_size(large) * i; if (parse_mysql_scalar_or_value(buffer, data, bytes, value_type_offset, large, depth)) return true; } if (i != element_count - 1 && buffer->append(STRING_WITH_LEN(", "))) return true; } return buffer->append(handle_as_object ? '}' : ']'); }
O3
cpp
parse_array_or_object(String*, unsigned char const*, unsigned long, bool, bool, unsigned long): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movq %r9, %r12 incq %r12 movb $0x1, %al cmpq $0x96, %r12 ja 0xb607 movl %r8d, %r15d movq %rsi, %r13 movq %rdi, %r14 movzbl %r15b, %esi movq %rsi, -0x50(%rbp) leaq 0x2(,%rsi,2), %rbx leal (%rbx,%rbx), %edi movq %rdi, -0x40(%rbp) cmpq %rdx, %rdi ja 0xb607 testb %r15b, %r15b je 0xb3c5 movl (%r13), %esi movq %rsi, -0x38(%rbp) movl 0x4(%r13), %esi jmp 0xb3d3 movzwl (%r13), %esi movq %rsi, -0x38(%rbp) movzwl 0x2(%r13), %esi movl %esi, %esi movq %rsi, -0x68(%rbp) cmpq %rdx, %rsi ja 0xb607 leaq 0x8(%r14), %rdi movl 0x10(%r14), %esi cmpl 0x14(%r14), %esi movl %ecx, -0x2c(%rbp) movl %r15d, -0x58(%rbp) movq %r13, -0x48(%rbp) movq %rdi, -0x60(%rbp) jb 0xb415 incl %esi callq 0xb290 testb %al, %al jne 0xb605 movl 0x10(%r14), %esi movl -0x2c(%rbp), %ecx movl %ecx, %eax shlb $0x5, %al movq %rax, -0x70(%rbp) addl $0x5b, %eax movq 0x8(%r14), %rdi leal 0x1(%rsi), %edx movl %edx, 0x10(%r14) movl %esi, %edx movb %al, (%rdi,%rdx) movq -0x38(%rbp), %r13 testq %r13, %r13 je 0xb5cb movq -0x50(%rbp), %rax addl %eax, %eax leaq 0x3(%rax), %rdx movq %rdx, -0x90(%rbp) orq $0x4, %rax movq %r13, %rdx movq %rax, -0x98(%rbp) imulq %rax, %rdx movq -0x40(%rbp), %rax addq %rax, %rdx movq %rdx, -0x78(%rbp) leaq -0x1(%r13), %rdx movq %rdx, -0xa0(%rbp) leaq (%rbx,%rbx,2), %rdx movq %rdx, -0x88(%rbp) xorl %ebx, %ebx movq -0x48(%rbp), %r15 movq %r12, -0x80(%rbp) testb %cl, %cl movq %rax, -0xa8(%rbp) je 0xb4a9 cmpb $0x0, -0x58(%rbp) je 0xb4d0 movq -0x40(%rbp), %rax movl (%r15,%rax), %ecx pushq $0x5 jmp 0xb4db movq %r14, %rdi movq -0x48(%rbp), %rsi movq -0x68(%rbp), %rdx movq %rax, %rcx movq -0x50(%rbp), %r8 movq %r12, %r9 callq 0xbe71 testb %al, %al je 0xb588 jmp 0xb605 movq -0x40(%rbp), %rax movzwl (%r15,%rax), %ecx pushq $0x3 popq %r12 movq -0x88(%rbp), %rax movzwl (%r15,%rax), %edx movl 0x10(%r14), %esi cmpl 0x14(%r14), %esi jb 0xb516 movl %ecx, -0x54(%rbp) movq %rdx, %r13 incl %esi movq -0x60(%rbp), %rdi callq 0xb290 testb %al, %al jne 0xb605 movl 0x10(%r14), %esi movq %r13, %rdx movl -0x54(%rbp), %ecx movl %ecx, %eax movq 0x8(%r14), %rcx leal 0x1(%rsi), %edi movl %edi, 0x10(%r14) movl %esi, %esi movb $0x22, (%rcx,%rsi) movq %r14, %r13 movq -0x48(%rbp), %r14 addq %r14, %rax movq %r13, %rdi movq %rax, %rsi callq 0xbe5d movq %r13, %rdi leaq 0x2b28(%rip), %rsi # 0xe070 pushq $0x3 popq %rdx callq 0xb050 testb %al, %al jne 0xb605 imulq %rbx, %r12 addq -0x78(%rbp), %r12 movq %r13, %rdi movq %r14, %rsi movq -0x68(%rbp), %rdx movq %r12, %rcx movq -0x50(%rbp), %r8 movq -0x80(%rbp), %r12 movq %r12, %r9 callq 0xbe71 testb %al, %al movq %r13, %r14 movq -0x38(%rbp), %r13 jne 0xb605 cmpq %rbx, -0xa0(%rbp) je 0xb5a7 movq %r14, %rdi leaq 0x2ad9(%rip), %rsi # 0xe074 pushq $0x2 popq %rdx callq 0xb050 testb %al, %al jne 0xb605 incq %rbx movq -0xa8(%rbp), %rax addq -0x90(%rbp), %rax addq -0x98(%rbp), %r15 cmpq %rbx, %r13 movl -0x2c(%rbp), %ecx jne 0xb48c movl 0x10(%r14), %esi cmpl 0x14(%r14), %esi jb 0xb5ea incl %esi movq -0x60(%rbp), %rdi callq 0xb290 testb %al, %al movb $0x1, %al jne 0xb607 movl 0x10(%r14), %esi movq -0x70(%rbp), %rdx orb $0x5d, %dl movq 0x8(%r14), %rax leal 0x1(%rsi), %ecx movl %ecx, 0x10(%r14) movl %esi, %ecx movb %dl, (%rax,%rcx) xorl %eax, %eax jmp 0xb607 movb $0x1, %al addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZL21parse_array_or_objectP6StringPKhmbbm: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 88h mov r12, r9 inc r12 mov al, 1 cmp r12, 96h ja loc_B607 mov r15d, r8d mov r13, rsi mov r14, rdi movzx esi, r15b mov qword ptr [rbp+var_50], rsi lea rbx, ds:2[rsi*2] lea edi, [rbx+rbx] mov [rbp+var_40], rdi cmp rdi, rdx ja loc_B607 test r15b, r15b jz short loc_B3C5 mov esi, [r13+0] mov [rbp+var_38], rsi mov esi, [r13+4] jmp short loc_B3D3 loc_B3C5: movzx esi, word ptr [r13+0] mov [rbp+var_38], rsi movzx esi, word ptr [r13+2] loc_B3D3: mov esi, esi mov [rbp+var_68], rsi cmp rsi, rdx ja loc_B607 lea rdi, [r14+8]; this mov esi, [r14+10h] cmp esi, [r14+14h] mov [rbp+var_2C], ecx mov [rbp+var_58], r15d mov [rbp+var_48], r13 mov [rbp+var_60], rdi jb short loc_B415 inc esi; unsigned __int64 call __ZN13Binary_string18realloc_with_extraEm; Binary_string::realloc_with_extra(ulong) test al, al jnz loc_B605 mov esi, [r14+10h] mov ecx, [rbp+var_2C] loc_B415: mov eax, ecx shl al, 5 mov [rbp+var_70], rax add eax, 5Bh ; '[' mov rdi, [r14+8] lea edx, [rsi+1] mov [r14+10h], edx mov edx, esi mov [rdi+rdx], al mov r13, [rbp+var_38] test r13, r13 jz loc_B5CB mov rax, qword ptr [rbp+var_50] add eax, eax lea rdx, [rax+3] mov [rbp+var_90], rdx or rax, 4 mov rdx, r13 mov [rbp+var_98], rax imul rdx, rax mov rax, [rbp+var_40] add rdx, rax mov [rbp+var_78], rdx lea rdx, [r13-1] mov [rbp+var_A0], rdx lea rdx, [rbx+rbx*2] mov [rbp+var_88], rdx xor ebx, ebx mov r15, [rbp+var_48] mov [rbp+var_80], r12 loc_B48C: test cl, cl mov [rbp+var_A8], rax jz short loc_B4A9 cmp byte ptr [rbp+var_58], 0 jz short loc_B4D0 mov rax, [rbp+var_40] mov ecx, [r15+rax] push 5 jmp short loc_B4DB loc_B4A9: mov rdi, r14; String * mov rsi, [rbp+var_48]; unsigned __int8 * mov rdx, [rbp+var_68]; unsigned __int64 mov rcx, rax; unsigned __int64 mov r8, qword ptr [rbp+var_50]; bool mov r9, r12; unsigned __int64 call _ZL27parse_mysql_scalar_or_valueP6StringPKhmmbm; parse_mysql_scalar_or_value(String *,uchar const*,ulong,ulong,bool,ulong) test al, al jz loc_B588 jmp loc_B605 loc_B4D0: mov rax, [rbp+var_40] movzx ecx, word ptr [r15+rax] push 3 loc_B4DB: pop r12 mov rax, [rbp+var_88] movzx edx, word ptr [r15+rax] mov esi, [r14+10h] cmp esi, [r14+14h] jb short loc_B516 mov [rbp+var_54], ecx mov r13, rdx inc esi; unsigned __int64 mov rdi, [rbp+var_60]; this call __ZN13Binary_string18realloc_with_extraEm; Binary_string::realloc_with_extra(ulong) test al, al jnz loc_B605 mov esi, [r14+10h] mov rdx, r13; unsigned __int64 mov ecx, [rbp+var_54] loc_B516: mov eax, ecx mov rcx, [r14+8] lea edi, [rsi+1] mov [r14+10h], edi mov esi, esi mov byte ptr [rcx+rsi], 22h ; '"' mov r13, r14 mov r14, [rbp+var_48] add rax, r14 mov rdi, r13; String * mov rsi, rax; unsigned __int8 * call _ZL18append_string_jsonP6StringPKhm; append_string_json(String *,uchar const*,ulong) mov rdi, r13; this lea rsi, asc_E070; "\": " push 3 pop rdx; unsigned __int64 call __ZN6String6appendEPKcm; String::append(char const*,ulong) test al, al jnz loc_B605 imul r12, rbx add r12, [rbp+var_78] mov rdi, r13; String * mov rsi, r14; unsigned __int8 * mov rdx, [rbp+var_68]; unsigned __int64 mov rcx, r12; unsigned __int64 mov r8, qword ptr [rbp+var_50]; bool mov r12, [rbp+var_80] mov r9, r12; unsigned __int64 call _ZL27parse_mysql_scalar_or_valueP6StringPKhmmbm; parse_mysql_scalar_or_value(String *,uchar const*,ulong,ulong,bool,ulong) test al, al mov r14, r13 mov r13, [rbp+var_38] jnz short loc_B605 loc_B588: cmp [rbp+var_A0], rbx jz short loc_B5A7 mov rdi, r14; this lea rsi, asc_E074; ", " push 2 pop rdx; unsigned __int64 call __ZN6String6appendEPKcm; String::append(char const*,ulong) test al, al jnz short loc_B605 loc_B5A7: inc rbx mov rax, [rbp+var_A8] add rax, [rbp+var_90] add r15, [rbp+var_98] cmp r13, rbx mov ecx, [rbp+var_2C] jnz loc_B48C loc_B5CB: mov esi, [r14+10h] cmp esi, [r14+14h] jb short loc_B5EA inc esi; unsigned __int64 mov rdi, [rbp+var_60]; this call __ZN13Binary_string18realloc_with_extraEm; Binary_string::realloc_with_extra(ulong) test al, al mov al, 1 jnz short loc_B607 mov esi, [r14+10h] loc_B5EA: mov rdx, [rbp+var_70] or dl, 5Dh mov rax, [r14+8] lea ecx, [rsi+1] mov [r14+10h], ecx mov ecx, esi mov [rax+rcx], dl xor eax, eax jmp short loc_B607 loc_B605: mov al, 1 loc_B607: add rsp, 88h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
char parse_array_or_object( String *a1, unsigned __int8 *a2, unsigned long long a3, char a4, unsigned __int8 a5, long long a6) { unsigned long long v6; // r12 char result; // al long long v10; // rbx unsigned int v11; // esi Binary_string *v12; // rdi unsigned int v13; // esi long long v14; // rdi long long v15; // r13 long long v16; // rax long long v17; // rdx unsigned long long v18; // rax long long v19; // rbx unsigned __int8 *v20; // r15 unsigned int v21; // ecx unsigned long long v22; // rdx unsigned int v23; // esi unsigned long long v24; // r13 long long v25; // rax long long v26; // rcx unsigned int v27; // esi bool v28; // zf long long v29; // rax long long v30; // [rsp-8h] [rbp-B8h] unsigned long long v31; // [rsp+8h] [rbp-A8h] long long v32; // [rsp+18h] [rbp-98h] long long v33; // [rsp+20h] [rbp-90h] long long v34; // [rsp+28h] [rbp-88h] unsigned long long v35; // [rsp+30h] [rbp-80h] unsigned long long v36; // [rsp+38h] [rbp-78h] char v37; // [rsp+40h] [rbp-70h] unsigned long long v38; // [rsp+48h] [rbp-68h] Binary_string *v39; // [rsp+50h] [rbp-60h] unsigned int v41; // [rsp+5Ch] [rbp-54h] int v42; // [rsp+60h] [rbp-50h] unsigned __int8 *v43; // [rsp+68h] [rbp-48h] unsigned long long v44; // [rsp+70h] [rbp-40h] long long v45; // [rsp+78h] [rbp-38h] char v46; // [rsp+84h] [rbp-2Ch] v6 = a6 + 1; result = 1; if ( (unsigned long long)(a6 + 1) <= 0x96 ) { v42 = a5; v10 = 2LL * a5 + 2; v44 = (unsigned int)(2 * v10); if ( v44 <= a3 ) { if ( a5 ) { v45 = *(unsigned int *)a2; v11 = *((_DWORD *)a2 + 1); } else { v45 = *(unsigned __int16 *)a2; v11 = *((unsigned __int16 *)a2 + 1); } v38 = v11; if ( v11 <= a3 ) { v12 = (String *)((char *)a1 + 8); v13 = *((_DWORD *)a1 + 4); v46 = a4; v43 = a2; v39 = (String *)((char *)a1 + 8); if ( v13 >= *((_DWORD *)a1 + 5) ) { if ( (unsigned __int8)Binary_string::realloc_with_extra(v12, v13 + 1) ) return 1; v13 = *((_DWORD *)a1 + 4); a4 = v46; } v37 = 32 * a4; v14 = *((_QWORD *)a1 + 1); *((_DWORD *)a1 + 4) = v13 + 1; *(_BYTE *)(v14 + v13) = 32 * a4 + 91; v15 = v45; if ( v45 ) { v16 = (unsigned int)(2 * v42); v33 = v16 + 3; v32 = v16 | 4; v17 = (v16 | 4) * v45; v18 = (unsigned int)(2 * v10); v36 = v44 + v17; v34 = 3 * v10; v19 = 0LL; v20 = v43; v35 = v6; do { v31 = v18; if ( a4 ) { if ( a5 ) { v21 = *(_DWORD *)&v20[v44]; v30 = 5LL; } else { v21 = *(unsigned __int16 *)&v20[v44]; v30 = 3LL; } v22 = *(unsigned __int16 *)&v20[v34]; v23 = *((_DWORD *)a1 + 4); if ( v23 >= *((_DWORD *)a1 + 5) ) { v41 = v21; v24 = *(unsigned __int16 *)&v20[v34]; if ( (unsigned __int8)Binary_string::realloc_with_extra(v39, v23 + 1) ) return 1; v23 = *((_DWORD *)a1 + 4); v22 = v24; v21 = v41; } v25 = v21; v26 = *((_QWORD *)a1 + 1); *((_DWORD *)a1 + 4) = v23 + 1; *(_BYTE *)(v26 + v23) = 34; append_string_json(a1, &v43[v25], v22); if ( (unsigned __int8)String::append(a1, "\": ", 3uLL) ) return 1; v6 = v35; v15 = v45; if ( (unsigned __int8)parse_mysql_scalar_or_value(a1, v43, v38, v36 + v19 * v30, v42, v35) ) return 1; } else if ( (unsigned __int8)parse_mysql_scalar_or_value(a1, v43, v38, v18, v42, v6) ) { return 1; } if ( v45 - 1 != v19 && (unsigned __int8)String::append(a1, ", ", 2uLL) ) return 1; ++v19; v18 = v33 + v31; v20 += v32; a4 = v46; } while ( v15 != v19 ); } v27 = *((_DWORD *)a1 + 4); if ( v27 >= *((_DWORD *)a1 + 5) ) { v28 = (unsigned __int8)Binary_string::realloc_with_extra(v39, v27 + 1) == 0; result = 1; if ( !v28 ) return result; v27 = *((_DWORD *)a1 + 4); } v29 = *((_QWORD *)a1 + 1); *((_DWORD *)a1 + 4) = v27 + 1; *(_BYTE *)(v29 + v27) = v37 | 0x5D; return 0; } } } return result; }
parse_array_or_object: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x88 MOV R12,R9 INC R12 MOV AL,0x1 CMP R12,0x96 JA 0x0010b607 MOV R15D,R8D MOV R13,RSI MOV R14,RDI MOVZX ESI,R15B MOV qword ptr [RBP + -0x50],RSI LEA RBX,[0x2 + RSI*0x2] LEA EDI,[RBX + RBX*0x1] MOV qword ptr [RBP + -0x40],RDI CMP RDI,RDX JA 0x0010b607 TEST R15B,R15B JZ 0x0010b3c5 MOV ESI,dword ptr [R13] MOV qword ptr [RBP + -0x38],RSI MOV ESI,dword ptr [R13 + 0x4] JMP 0x0010b3d3 LAB_0010b3c5: MOVZX ESI,word ptr [R13] MOV qword ptr [RBP + -0x38],RSI MOVZX ESI,word ptr [R13 + 0x2] LAB_0010b3d3: MOV ESI,ESI MOV qword ptr [RBP + -0x68],RSI CMP RSI,RDX JA 0x0010b607 LEA RDI,[R14 + 0x8] MOV ESI,dword ptr [R14 + 0x10] CMP ESI,dword ptr [R14 + 0x14] MOV dword ptr [RBP + -0x2c],ECX MOV dword ptr [RBP + -0x58],R15D MOV qword ptr [RBP + -0x48],R13 MOV qword ptr [RBP + -0x60],RDI JC 0x0010b415 INC ESI CALL 0x0010b290 TEST AL,AL JNZ 0x0010b605 MOV ESI,dword ptr [R14 + 0x10] MOV ECX,dword ptr [RBP + -0x2c] LAB_0010b415: MOV EAX,ECX SHL AL,0x5 MOV qword ptr [RBP + -0x70],RAX ADD EAX,0x5b MOV RDI,qword ptr [R14 + 0x8] LEA EDX,[RSI + 0x1] MOV dword ptr [R14 + 0x10],EDX MOV EDX,ESI MOV byte ptr [RDI + RDX*0x1],AL MOV R13,qword ptr [RBP + -0x38] TEST R13,R13 JZ 0x0010b5cb MOV RAX,qword ptr [RBP + -0x50] ADD EAX,EAX LEA RDX,[RAX + 0x3] MOV qword ptr [RBP + -0x90],RDX OR RAX,0x4 MOV RDX,R13 MOV qword ptr [RBP + -0x98],RAX IMUL RDX,RAX MOV RAX,qword ptr [RBP + -0x40] ADD RDX,RAX MOV qword ptr [RBP + -0x78],RDX LEA RDX,[R13 + -0x1] MOV qword ptr [RBP + -0xa0],RDX LEA RDX,[RBX + RBX*0x2] MOV qword ptr [RBP + -0x88],RDX XOR EBX,EBX MOV R15,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x80],R12 LAB_0010b48c: TEST CL,CL MOV qword ptr [RBP + -0xa8],RAX JZ 0x0010b4a9 CMP byte ptr [RBP + -0x58],0x0 JZ 0x0010b4d0 MOV RAX,qword ptr [RBP + -0x40] MOV ECX,dword ptr [R15 + RAX*0x1] PUSH 0x5 JMP 0x0010b4db LAB_0010b4a9: MOV RDI,R14 MOV RSI,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x68] MOV RCX,RAX MOV R8,qword ptr [RBP + -0x50] MOV R9,R12 CALL 0x0010be71 TEST AL,AL JZ 0x0010b588 JMP 0x0010b605 LAB_0010b4d0: MOV RAX,qword ptr [RBP + -0x40] MOVZX ECX,word ptr [R15 + RAX*0x1] PUSH 0x3 LAB_0010b4db: POP R12 MOV RAX,qword ptr [RBP + -0x88] MOVZX EDX,word ptr [R15 + RAX*0x1] MOV ESI,dword ptr [R14 + 0x10] CMP ESI,dword ptr [R14 + 0x14] JC 0x0010b516 MOV dword ptr [RBP + -0x54],ECX MOV R13,RDX INC ESI MOV RDI,qword ptr [RBP + -0x60] CALL 0x0010b290 TEST AL,AL JNZ 0x0010b605 MOV ESI,dword ptr [R14 + 0x10] MOV RDX,R13 MOV ECX,dword ptr [RBP + -0x54] LAB_0010b516: MOV EAX,ECX MOV RCX,qword ptr [R14 + 0x8] LEA EDI,[RSI + 0x1] MOV dword ptr [R14 + 0x10],EDI MOV ESI,ESI MOV byte ptr [RCX + RSI*0x1],0x22 MOV R13,R14 MOV R14,qword ptr [RBP + -0x48] ADD RAX,R14 MOV RDI,R13 MOV RSI,RAX CALL 0x0010be5d MOV RDI,R13 LEA RSI,[0x10e070] PUSH 0x3 POP RDX CALL 0x0010b050 TEST AL,AL JNZ 0x0010b605 IMUL R12,RBX ADD R12,qword ptr [RBP + -0x78] MOV RDI,R13 MOV RSI,R14 MOV RDX,qword ptr [RBP + -0x68] MOV RCX,R12 MOV R8,qword ptr [RBP + -0x50] MOV R12,qword ptr [RBP + -0x80] MOV R9,R12 CALL 0x0010be71 TEST AL,AL MOV R14,R13 MOV R13,qword ptr [RBP + -0x38] JNZ 0x0010b605 LAB_0010b588: CMP qword ptr [RBP + -0xa0],RBX JZ 0x0010b5a7 MOV RDI,R14 LEA RSI,[0x10e074] PUSH 0x2 POP RDX CALL 0x0010b050 TEST AL,AL JNZ 0x0010b605 LAB_0010b5a7: INC RBX MOV RAX,qword ptr [RBP + -0xa8] ADD RAX,qword ptr [RBP + -0x90] ADD R15,qword ptr [RBP + -0x98] CMP R13,RBX MOV ECX,dword ptr [RBP + -0x2c] JNZ 0x0010b48c LAB_0010b5cb: MOV ESI,dword ptr [R14 + 0x10] CMP ESI,dword ptr [R14 + 0x14] JC 0x0010b5ea INC ESI MOV RDI,qword ptr [RBP + -0x60] CALL 0x0010b290 TEST AL,AL MOV AL,0x1 JNZ 0x0010b607 MOV ESI,dword ptr [R14 + 0x10] LAB_0010b5ea: MOV RDX,qword ptr [RBP + -0x70] OR DL,0x5d MOV RAX,qword ptr [R14 + 0x8] LEA ECX,[RSI + 0x1] MOV dword ptr [R14 + 0x10],ECX MOV ECX,ESI MOV byte ptr [RAX + RCX*0x1],DL XOR EAX,EAX JMP 0x0010b607 LAB_0010b605: MOV AL,0x1 LAB_0010b607: ADD RSP,0x88 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* parse_array_or_object(String*, unsigned char const*, unsigned long, bool, bool, unsigned long) */ int8 parse_array_or_object (String *param_1,uchar *param_2,ulong param_3,bool param_4,bool param_5,ulong param_6) { Binary_string *this; long lVar1; ushort uVar2; char cVar3; int8 uVar4; ulong uVar5; ulong uVar6; uint uVar7; ulong uVar8; uint uVar9; ulong uVar10; ulong uVar11; ulong uVar12; uchar *puVar13; long lStack_c0; ulong local_40; uVar12 = param_6 + 1; uVar4 = 1; if (uVar12 < 0x97) { lVar1 = (ulong)param_5 * 2 + 2; uVar11 = (ulong)(uint)((int)lVar1 * 2); if (uVar11 <= param_3) { if (param_5) { local_40 = (ulong)*(uint *)param_2; uVar7 = *(uint *)(param_2 + 4); } else { local_40 = (ulong)*(ushort *)param_2; uVar7 = (uint)*(ushort *)(param_2 + 2); } uVar10 = (ulong)uVar7; if (uVar10 <= param_3) { this = (Binary_string *)(param_1 + 8); uVar7 = *(uint *)(param_1 + 0x10); if (*(uint *)(param_1 + 0x14) <= uVar7) { cVar3 = Binary_string::realloc_with_extra(this,(ulong)(uVar7 + 1)); if (cVar3 != '\0') { return 1; } uVar7 = *(uint *)(param_1 + 0x10); } *(uint *)(param_1 + 0x10) = uVar7 + 1; *(byte *)(*(long *)(param_1 + 8) + (ulong)uVar7) = param_4 * ' ' + 0x5b; if (local_40 != 0) { uVar5 = (ulong)((uint)param_5 * 2) | 4; uVar8 = 0; uVar6 = uVar11; puVar13 = param_2; do { if (param_4) { if (param_5) { uVar7 = *(uint *)(puVar13 + uVar11); lStack_c0 = 5; } else { uVar7 = (uint)*(ushort *)(puVar13 + uVar11); lStack_c0 = 3; } uVar2 = *(ushort *)(puVar13 + lVar1 * 3); uVar9 = *(uint *)(param_1 + 0x10); if (*(uint *)(param_1 + 0x14) <= uVar9) { cVar3 = Binary_string::realloc_with_extra(this,(ulong)(uVar9 + 1)); if (cVar3 != '\0') { return 1; } uVar9 = *(uint *)(param_1 + 0x10); } *(uint *)(param_1 + 0x10) = uVar9 + 1; *(int1 *)(*(long *)(param_1 + 8) + (ulong)uVar9) = 0x22; append_string_json(param_1,param_2 + uVar7,(ulong)uVar2); cVar3 = String::append((char *)param_1,0x10e070); if (cVar3 != '\0') { return 1; } cVar3 = parse_mysql_scalar_or_value (param_1,param_2,uVar10, lStack_c0 * uVar8 + local_40 * uVar5 + uVar11,param_5,uVar12); } else { cVar3 = parse_mysql_scalar_or_value(param_1,param_2,uVar10,uVar6,param_5,uVar12); } if (cVar3 != '\0') { return 1; } if ((local_40 - 1 != uVar8) && (cVar3 = String::append((char *)param_1,0x10e074), cVar3 != '\0')) { return 1; } uVar8 = uVar8 + 1; uVar6 = uVar6 + (ulong)((uint)param_5 * 2) + 3; puVar13 = puVar13 + uVar5; } while (local_40 != uVar8); } uVar7 = *(uint *)(param_1 + 0x10); if (*(uint *)(param_1 + 0x14) <= uVar7) { cVar3 = Binary_string::realloc_with_extra(this,(ulong)(uVar7 + 1)); if (cVar3 != '\0') { return 1; } uVar7 = *(uint *)(param_1 + 0x10); } *(uint *)(param_1 + 0x10) = uVar7 + 1; *(byte *)(*(long *)(param_1 + 8) + (ulong)uVar7) = param_4 * ' ' | 0x5d; uVar4 = 0; } } } return uVar4; }
20,447
nlohmann::json_abi_v3_11_3::detail::out_of_range nlohmann::json_abi_v3_11_3::detail::out_of_range::create<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*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> 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
static out_of_range create(int id_, const std::string& what_arg, BasicJsonContext context) { const std::string w = concat(exception::name("out_of_range", id_), exception::diagnostics(context), what_arg); return {id_, w.c_str()}; }
O1
cpp
nlohmann::json_abi_v3_11_3::detail::out_of_range nlohmann::json_abi_v3_11_3::detail::out_of_range::create<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*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> 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 %r13 pushq %r12 pushq %rbx subq $0x98, %rsp movq %rdx, %r15 movl %esi, %ebp movq %rdi, %rbx leaq 0x38(%rsp), %r13 movq %r13, -0x10(%r13) leaq 0x431de(%rip), %rsi # 0xf3b77 leaq 0x431e3(%rip), %rdx # 0xf3b83 leaq 0x28(%rsp), %rdi callq 0x26900 leaq 0x48(%rsp), %rdi leaq 0x28(%rsp), %rsi movl %ebp, %edx callq 0x5cdf0 leaq 0x78(%rsp), %r14 movq %r14, -0x10(%r14) xorl %eax, %eax movq %rax, -0x8(%r14) movb %al, (%r14) leaq 0x18(%rsp), %r12 movq %r12, -0x10(%r12) movq %rax, -0x8(%r12) movb %al, (%r12) movq 0x8(%r15), %rsi addq 0x50(%rsp), %rsi leaq 0x8(%rsp), %rdi callq 0x1be70 movq 0x48(%rsp), %rsi movq 0x50(%rsp), %rdx leaq 0x8(%rsp), %rdi callq 0x1b270 movq 0x68(%rsp), %rsi movq 0x70(%rsp), %rdx leaq 0x8(%rsp), %rdi callq 0x1b270 movq (%r15), %rsi movq 0x8(%r15), %rdx leaq 0x8(%rsp), %rdi callq 0x1b270 movq 0x68(%rsp), %rdi cmpq %r14, %rdi je 0xb0a43 movq 0x78(%rsp), %rsi incq %rsi callq 0x1b930 leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xb0a5e movq 0x58(%rsp), %rsi incq %rsi callq 0x1b930 movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0xb0a75 movq 0x38(%rsp), %rsi incq %rsi callq 0x1b930 movq 0x8(%rsp), %rdx movq %rbx, %rdi movl %ebp, %esi callq 0x5d05e leaq 0x80415(%rip), %rax # 0x130ea0 addq $0x10, %rax movq %rax, (%rbx) movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0xb0aa9 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b930 movq %rbx, %rax addq $0x98, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0xb0b37 movq 0x18(%rsp), %rsi jmp 0xb0b2f movq %rax, %rbx jmp 0xb0b20 movq %rax, %rbx jmp 0xb0b37 movq %rdx, %rbx movq %rax, %r15 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0xb0af9 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b930 leaq 0x68(%rsp), %rdi leaq 0x48(%rsp), %rdx leaq 0x88(%rsp), %r12 movq %r14, %rsi movq %r15, %rcx movl %ebx, %r8d movq %r12, %r9 callq 0x1d0cb movq (%r12), %rbx movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0xb0b37 movq 0x38(%rsp), %rsi incq %rsi callq 0x1b930 movq %rbx, %rdi callq 0x1c0d0 nop
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 98h mov r15, rdx mov ebp, esi mov rbx, rdi lea r13, [rsp+0C8h+var_90] mov [r13-10h], r13 lea rsi, aOutOfRange; "out_of_range" lea rdx, aOutOfRange+0Ch; "" lea rdi, [rsp+0C8h+var_A0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+0C8h+var_80]; int lea rsi, [rsp+0C8h+var_A0]; int mov edx, ebp; int call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int) lea r14, [rsp+0C8h+var_50] mov [r14-10h], r14 xor eax, eax mov [r14-8], rax mov [r14], al lea r12, [rsp+0C8h+var_B0] mov [r12-10h], r12 mov [r12-8], rax mov [r12], al mov rsi, [r15+8] add rsi, [rsp+0C8h+var_78] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rsi, qword ptr [rsp+0C8h+var_80] mov rdx, [rsp+0C8h+var_78] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rsi, [rsp+0C8h+var_60] mov rdx, [rsp+0C8h+var_58] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rsi, [r15] mov rdx, [r15+8] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rdi, [rsp+0C8h+var_60]; void * cmp rdi, r14 jz short loc_B0A43 mov rsi, [rsp+0C8h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B0A43: lea rax, [rsp+0C8h+var_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_B0A5E mov rsi, [rsp+0C8h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B0A5E: mov rdi, [rsp+0C8h+var_A0]; void * cmp rdi, r13 jz short loc_B0A75 mov rsi, [rsp+0C8h+var_90] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B0A75: mov rdx, [rsp+0C8h+var_C0]; char * mov rdi, rbx; this mov esi, ebp; int call _ZN8nlohmann16json_abi_v3_11_36detail9exceptionC2EiPKc; nlohmann::json_abi_v3_11_3::detail::exception::exception(int,char const*) lea rax, _ZTVN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; `vtable for'nlohmann::json_abi_v3_11_3::detail::out_of_range add rax, 10h mov [rbx], rax mov rdi, [rsp+0C8h+var_C0]; void * cmp rdi, r12 jz short loc_B0AA9 mov rsi, [rsp+0C8h+var_B0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B0AA9: mov rax, rbx add rsp, 98h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, [rsp+arg_0] cmp rdi, r12 jz short loc_B0B37 mov rsi, [rsp+arg_10] jmp short loc_B0B2F mov rbx, rax jmp short loc_B0B20 mov rbx, rax jmp short loc_B0B37 mov rbx, rdx mov r15, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r12 jz short loc_B0AF9 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B0AF9: lea rdi, [rsp+arg_60] lea rdx, [rsp+arg_40] lea r12, [rsp+arg_80] mov rsi, r14 mov rcx, r15 mov r8d, ebx mov r9, r12 call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK__cold_1 mov rbx, [r12] loc_B0B20: mov rdi, [rsp+arg_20]; void * cmp rdi, r13 jz short loc_B0B37 mov rsi, [rsp+arg_30] loc_B0B2F: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B0B37: mov rdi, rbx call __Unwind_Resume
nlohmann::json_abi_v3_11_3::detail::exception * ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( nlohmann::json_abi_v3_11_3::detail::exception *this, int a2, _QWORD *a3) { char *v5[2]; // [rsp+8h] [rbp-C0h] BYREF _QWORD v6[2]; // [rsp+18h] [rbp-B0h] BYREF void *v7[2]; // [rsp+28h] [rbp-A0h] BYREF _QWORD v8[2]; // [rsp+38h] [rbp-90h] BYREF int v9[2]; // [rsp+48h] [rbp-80h] BYREF long long v10; // [rsp+50h] [rbp-78h] long long v11; // [rsp+58h] [rbp-70h] BYREF void *v12; // [rsp+68h] [rbp-60h] long long v13; // [rsp+70h] [rbp-58h] _QWORD v14[10]; // [rsp+78h] [rbp-50h] BYREF v7[0] = v8; std::string::_M_construct<char const*>(v7, "out_of_range", (long long)""); nlohmann::json_abi_v3_11_3::detail::exception::name((long long)v9, (long long)v7, a2); v12 = v14; v13 = 0LL; LOBYTE(v14[0]) = 0; v5[0] = (char *)v6; v5[1] = 0LL; LOBYTE(v6[0]) = 0; std::string::reserve(v5, v10 + a3[1]); std::string::_M_append(v5, *(_QWORD *)v9, v10); std::string::_M_append(v5, v12, v13); std::string::_M_append(v5, *a3, a3[1]); if ( v12 != v14 ) operator delete(v12, v14[0] + 1LL); if ( *(long long **)v9 != &v11 ) operator delete(*(void **)v9, v11 + 1); if ( v7[0] != v8 ) operator delete(v7[0], v8[0] + 1LL); nlohmann::json_abi_v3_11_3::detail::exception::exception(this, a2, v5[0]); *(_QWORD *)this = &`vtable for'nlohmann::json_abi_v3_11_3::detail::out_of_range + 2; if ( (_QWORD *)v5[0] != v6 ) operator delete(v5[0], v6[0] + 1LL); return this; }
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x98 MOV R15,RDX MOV EBP,ESI MOV RBX,RDI LEA R13,[RSP + 0x38] MOV qword ptr [R13 + -0x10],R13 LAB_001b0992: LEA RSI,[0x1f3b77] LEA RDX,[0x1f3b83] LEA RDI,[RSP + 0x28] CALL 0x00126900 LAB_001b09aa: LEA RDI,[RSP + 0x48] LEA RSI,[RSP + 0x28] MOV EDX,EBP CALL 0x0015cdf0 LEA R14,[RSP + 0x78] MOV qword ptr [R14 + -0x10],R14 XOR EAX,EAX MOV qword ptr [R14 + -0x8],RAX MOV byte ptr [R14],AL LEA R12,[RSP + 0x18] MOV qword ptr [R12 + -0x10],R12 MOV qword ptr [R12 + -0x8],RAX MOV byte ptr [R12],AL MOV RSI,qword ptr [R15 + 0x8] ADD RSI,qword ptr [RSP + 0x50] LAB_001b09e9: LEA RDI,[RSP + 0x8] CALL 0x0011be70 MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] LEA RDI,[RSP + 0x8] CALL 0x0011b270 MOV RSI,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] LEA RDI,[RSP + 0x8] CALL 0x0011b270 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] LEA RDI,[RSP + 0x8] CALL 0x0011b270 MOV RDI,qword ptr [RSP + 0x68] CMP RDI,R14 JZ 0x001b0a43 MOV RSI,qword ptr [RSP + 0x78] INC RSI CALL 0x0011b930 LAB_001b0a43: LEA RAX,[RSP + 0x58] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001b0a5e MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x0011b930 LAB_001b0a5e: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R13 JZ 0x001b0a75 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x0011b930 LAB_001b0a75: MOV RDX,qword ptr [RSP + 0x8] LAB_001b0a7a: MOV RDI,RBX MOV ESI,EBP CALL 0x0015d05e LAB_001b0a84: LEA RAX,[0x230ea0] ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R12 JZ 0x001b0aa9 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011b930 LAB_001b0aa9: MOV RAX,RBX ADD RSP,0x98 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
exception * _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (exception *param_1,int param_2,ulong *param_3) { char *local_c0; int8 local_b8; char local_b0; int7 uStack_af; long *local_a0 [2]; long local_90 [2]; long *local_80 [2]; long local_70 [2]; int1 *local_60; int8 local_58; int1 local_50; int7 uStack_4f; /* try { // try from 001b0992 to 001b09a9 has its CatchHandler @ 001b0ad7 */ local_a0[0] = local_90; std::__cxx11::string::_M_construct<char_const*>(local_a0,"out_of_range",""); /* try { // try from 001b09aa to 001b09ba has its CatchHandler @ 001b0ad2 */ nlohmann::json_abi_v3_11_3::detail::exception::name ((exception *)local_80,(string *)local_a0,param_2); local_58 = 0; local_50 = 0; local_b8 = 0; local_b0 = '\0'; /* try { // try from 001b09e9 to 001b0a2b has its CatchHandler @ 001b0adc */ local_c0 = &local_b0; local_60 = &local_50; std::__cxx11::string::reserve((ulong)&local_c0); std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_80[0]); std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_60); std::__cxx11::string::_M_append((char *)&local_c0,*param_3); if (local_60 != &local_50) { operator_delete(local_60,CONCAT71(uStack_4f,local_50) + 1); } if (local_80[0] != local_70) { operator_delete(local_80[0],local_70[0] + 1); } if (local_a0[0] != local_90) { operator_delete(local_a0[0],local_90[0] + 1); } /* try { // try from 001b0a7a to 001b0a83 has its CatchHandler @ 001b0abe */ nlohmann::json_abi_v3_11_3::detail::exception::exception(param_1,param_2,local_c0); *(int ***)param_1 = &PTR__exception_00230eb0; if (local_c0 != &local_b0) { operator_delete(local_c0,CONCAT71(uStack_af,local_b0) + 1); } return param_1; }
20,448
nlohmann::json_abi_v3_11_3::detail::out_of_range nlohmann::json_abi_v3_11_3::detail::out_of_range::create<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*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> 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
static out_of_range create(int id_, const std::string& what_arg, BasicJsonContext context) { const std::string w = concat(exception::name("out_of_range", id_), exception::diagnostics(context), what_arg); return {id_, w.c_str()}; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::out_of_range nlohmann::json_abi_v3_11_3::detail::out_of_range::create<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*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> 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 %r13 pushq %r12 pushq %rbx subq $0x98, %rsp movq %rdx, %r15 movl %esi, %ebp movq %rdi, %rbx leaq 0x38(%rsp), %r13 movq %r13, -0x10(%r13) leaq 0x90102(%rip), %rsi # 0xf1b77 leaq 0x90107(%rip), %rdx # 0xf1b83 leaq 0x28(%rsp), %rdi callq 0x2695a leaq 0x48(%rsp), %rdi leaq 0x28(%rsp), %rsi movl %ebp, %edx callq 0x5d874 leaq 0x78(%rsp), %r14 movq %r14, -0x10(%r14) xorl %eax, %eax movq %rax, -0x8(%r14) movb %al, (%r14) leaq 0x18(%rsp), %r12 movq %r12, -0x10(%r12) movq %rax, -0x8(%r12) movb %al, (%r12) movq 0x8(%r15), %rsi addq 0x50(%rsp), %rsi leaq 0x8(%rsp), %rdi callq 0x1be70 movq 0x48(%rsp), %rsi movq 0x50(%rsp), %rdx leaq 0x8(%rsp), %rdi callq 0x1b270 movq 0x68(%rsp), %rsi movq 0x70(%rsp), %rdx leaq 0x8(%rsp), %rdi callq 0x1b270 movq (%r15), %rsi movq 0x8(%r15), %rdx leaq 0x8(%rsp), %rdi callq 0x1b270 movq 0x68(%rsp), %rdi cmpq %r14, %rdi je 0x61b1f movq 0x78(%rsp), %rsi incq %rsi callq 0x1b930 leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x61b3a movq 0x58(%rsp), %rsi incq %rsi callq 0x1b930 movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x61b51 movq 0x38(%rsp), %rsi incq %rsi callq 0x1b930 movq 0x8(%rsp), %rdx movq %rbx, %rdi movl %ebp, %esi callq 0x5dae2 leaq 0xcd379(%rip), %rax # 0x12eee0 addq $0x10, %rax movq %rax, (%rbx) movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x61b85 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b930 movq %rbx, %rax addq $0x98, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x61c13 movq 0x18(%rsp), %rsi jmp 0x61c0b movq %rax, %rbx jmp 0x61bfc movq %rax, %rbx jmp 0x61c13 movq %rdx, %rbx movq %rax, %r15 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x61bd5 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b930 leaq 0x68(%rsp), %rdi leaq 0x48(%rsp), %rdx leaq 0x88(%rsp), %r12 movq %r14, %rsi movq %r15, %rcx movl %ebx, %r8d movq %r12, %r9 callq 0x1c65d movq (%r12), %rbx movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x61c13 movq 0x38(%rsp), %rsi incq %rsi callq 0x1b930 movq %rbx, %rdi callq 0x1c0d0
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 98h mov r15, rdx mov ebp, esi mov rbx, rdi lea r13, [rsp+0C8h+var_90] mov [r13-10h], r13 lea rsi, aOutOfRange; "out_of_range" lea rdx, aOutOfRange+0Ch; "" lea rdi, [rsp+0C8h+var_A0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+0C8h+var_80]; int lea rsi, [rsp+0C8h+var_A0]; int mov edx, ebp; int call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int) lea r14, [rsp+0C8h+var_50] mov [r14-10h], r14 xor eax, eax mov [r14-8], rax mov [r14], al lea r12, [rsp+0C8h+var_B0] mov [r12-10h], r12 mov [r12-8], rax mov [r12], al mov rsi, [r15+8] add rsi, [rsp+0C8h+var_78] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rsi, qword ptr [rsp+0C8h+var_80] mov rdx, [rsp+0C8h+var_78] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rsi, [rsp+0C8h+var_60] mov rdx, [rsp+0C8h+var_58] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rsi, [r15] mov rdx, [r15+8] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rdi, [rsp+0C8h+var_60]; void * cmp rdi, r14 jz short loc_61B1F mov rsi, [rsp+0C8h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_61B1F: lea rax, [rsp+0C8h+var_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_61B3A mov rsi, [rsp+0C8h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_61B3A: mov rdi, [rsp+0C8h+var_A0]; void * cmp rdi, r13 jz short loc_61B51 mov rsi, [rsp+0C8h+var_90] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_61B51: mov rdx, [rsp+0C8h+var_C0]; char * mov rdi, rbx; this mov esi, ebp; int call _ZN8nlohmann16json_abi_v3_11_36detail9exceptionC2EiPKc; nlohmann::json_abi_v3_11_3::detail::exception::exception(int,char const*) lea rax, _ZTVN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; `vtable for'nlohmann::json_abi_v3_11_3::detail::out_of_range add rax, 10h mov [rbx], rax mov rdi, [rsp+0C8h+var_C0]; void * cmp rdi, r12 jz short loc_61B85 mov rsi, [rsp+0C8h+var_B0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_61B85: mov rax, rbx add rsp, 98h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, [rsp+arg_0] cmp rdi, r12 jz short loc_61C13 mov rsi, [rsp+arg_10] jmp short loc_61C0B mov rbx, rax jmp short loc_61BFC mov rbx, rax jmp short loc_61C13 mov rbx, rdx mov r15, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r12 jz short loc_61BD5 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_61BD5: lea rdi, [rsp+arg_60] lea rdx, [rsp+arg_40] lea r12, [rsp+arg_80] mov rsi, r14 mov rcx, r15 mov r8d, ebx mov r9, r12 call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5__cold_1 mov rbx, [r12] loc_61BFC: mov rdi, [rsp+arg_20]; void * cmp rdi, r13 jz short loc_61C13 mov rsi, [rsp+arg_30] loc_61C0B: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_61C13: mov rdi, rbx call __Unwind_Resume
nlohmann::json_abi_v3_11_3::detail::exception * ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_( nlohmann::json_abi_v3_11_3::detail::exception *this, int a2, _QWORD *a3) { char *v5[2]; // [rsp+8h] [rbp-C0h] BYREF _QWORD v6[2]; // [rsp+18h] [rbp-B0h] BYREF void *v7[2]; // [rsp+28h] [rbp-A0h] BYREF _QWORD v8[2]; // [rsp+38h] [rbp-90h] BYREF int v9[2]; // [rsp+48h] [rbp-80h] BYREF long long v10; // [rsp+50h] [rbp-78h] long long v11; // [rsp+58h] [rbp-70h] BYREF void *v12; // [rsp+68h] [rbp-60h] long long v13; // [rsp+70h] [rbp-58h] _QWORD v14[10]; // [rsp+78h] [rbp-50h] BYREF v7[0] = v8; std::string::_M_construct<char const*>((long long)v7, "out_of_range", (long long)""); nlohmann::json_abi_v3_11_3::detail::exception::name((long long)v9, (long long)v7, a2); v12 = v14; v13 = 0LL; LOBYTE(v14[0]) = 0; v5[0] = (char *)v6; v5[1] = 0LL; LOBYTE(v6[0]) = 0; std::string::reserve(v5, v10 + a3[1]); std::string::_M_append(v5, *(_QWORD *)v9, v10); std::string::_M_append(v5, v12, v13); std::string::_M_append(v5, *a3, a3[1]); if ( v12 != v14 ) operator delete(v12, v14[0] + 1LL); if ( *(long long **)v9 != &v11 ) operator delete(*(void **)v9, v11 + 1); if ( v7[0] != v8 ) operator delete(v7[0], v8[0] + 1LL); nlohmann::json_abi_v3_11_3::detail::exception::exception(this, a2, v5[0]); *(_QWORD *)this = &`vtable for'nlohmann::json_abi_v3_11_3::detail::out_of_range + 2; if ( (_QWORD *)v5[0] != v6 ) operator delete(v5[0], v6[0] + 1LL); return this; }
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x98 MOV R15,RDX MOV EBP,ESI MOV RBX,RDI LEA R13,[RSP + 0x38] MOV qword ptr [R13 + -0x10],R13 LAB_00161a6e: LEA RSI,[0x1f1b77] LEA RDX,[0x1f1b83] LEA RDI,[RSP + 0x28] CALL 0x0012695a LAB_00161a86: LEA RDI,[RSP + 0x48] LEA RSI,[RSP + 0x28] MOV EDX,EBP CALL 0x0015d874 LEA R14,[RSP + 0x78] MOV qword ptr [R14 + -0x10],R14 XOR EAX,EAX MOV qword ptr [R14 + -0x8],RAX MOV byte ptr [R14],AL LEA R12,[RSP + 0x18] MOV qword ptr [R12 + -0x10],R12 MOV qword ptr [R12 + -0x8],RAX MOV byte ptr [R12],AL MOV RSI,qword ptr [R15 + 0x8] ADD RSI,qword ptr [RSP + 0x50] LAB_00161ac5: LEA RDI,[RSP + 0x8] CALL 0x0011be70 MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] LEA RDI,[RSP + 0x8] CALL 0x0011b270 MOV RSI,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] LEA RDI,[RSP + 0x8] CALL 0x0011b270 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] LEA RDI,[RSP + 0x8] CALL 0x0011b270 MOV RDI,qword ptr [RSP + 0x68] CMP RDI,R14 JZ 0x00161b1f MOV RSI,qword ptr [RSP + 0x78] INC RSI CALL 0x0011b930 LAB_00161b1f: LEA RAX,[RSP + 0x58] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00161b3a MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x0011b930 LAB_00161b3a: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R13 JZ 0x00161b51 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x0011b930 LAB_00161b51: MOV RDX,qword ptr [RSP + 0x8] LAB_00161b56: MOV RDI,RBX MOV ESI,EBP CALL 0x0015dae2 LAB_00161b60: LEA RAX,[0x22eee0] ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R12 JZ 0x00161b85 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011b930 LAB_00161b85: MOV RAX,RBX ADD RSP,0x98 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
exception * _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ (exception *param_1,int param_2,ulong *param_3) { char *local_c0; int8 local_b8; char local_b0; int7 uStack_af; long *local_a0 [2]; long local_90 [2]; long *local_80 [2]; long local_70 [2]; int1 *local_60; int8 local_58; int1 local_50; int7 uStack_4f; /* try { // try from 00161a6e to 00161a85 has its CatchHandler @ 00161bb3 */ local_a0[0] = local_90; std::__cxx11::string::_M_construct<char_const*>(local_a0,"out_of_range",""); /* try { // try from 00161a86 to 00161a96 has its CatchHandler @ 00161bae */ nlohmann::json_abi_v3_11_3::detail::exception::name ((exception *)local_80,(string *)local_a0,param_2); local_58 = 0; local_50 = 0; local_b8 = 0; local_b0 = '\0'; /* try { // try from 00161ac5 to 00161b07 has its CatchHandler @ 00161bb8 */ local_c0 = &local_b0; local_60 = &local_50; std::__cxx11::string::reserve((ulong)&local_c0); std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_80[0]); std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_60); std::__cxx11::string::_M_append((char *)&local_c0,*param_3); if (local_60 != &local_50) { operator_delete(local_60,CONCAT71(uStack_4f,local_50) + 1); } if (local_80[0] != local_70) { operator_delete(local_80[0],local_70[0] + 1); } if (local_a0[0] != local_90) { operator_delete(local_a0[0],local_90[0] + 1); } /* try { // try from 00161b56 to 00161b5f has its CatchHandler @ 00161b9a */ nlohmann::json_abi_v3_11_3::detail::exception::exception(param_1,param_2,local_c0); *(int ***)param_1 = &PTR__exception_0022eef0; if (local_c0 != &local_b0) { operator_delete(local_c0,CONCAT71(uStack_af,local_b0) + 1); } return param_1; }
20,449
ma_ft_erase
eloqsql/storage/maria/ma_ft_update.c
static int _ma_ft_erase(MARIA_HA *info, uint keynr, uchar *keybuf, FT_WORD *wlist, my_off_t filepos) { uint err=0; DBUG_ENTER("_ma_ft_erase"); for (; wlist->pos; wlist++) { MARIA_KEY key; _ma_ft_make_key(info, &key, keynr, keybuf, wlist, filepos); if (_ma_ck_delete(info, &key)) err=1; } DBUG_RETURN(err); }
O0
c
ma_ft_erase: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movl $0x0, -0x2c(%rbp) movq -0x20(%rbp), %rax cmpq $0x0, (%rax) je 0x793b0 movq -0x8(%rbp), %rdi movl -0xc(%rbp), %edx movq -0x18(%rbp), %rcx movq -0x20(%rbp), %r8 movq -0x28(%rbp), %r9 leaq -0x50(%rbp), %rsi callq 0x791d0 movq -0x8(%rbp), %rdi leaq -0x50(%rbp), %rsi callq 0x6c7c0 cmpb $0x0, %al je 0x793a0 movl $0x1, -0x2c(%rbp) jmp 0x793a2 movq -0x20(%rbp), %rax addq $0x18, %rax movq %rax, -0x20(%rbp) jmp 0x79362 jmp 0x793b2 movl -0x2c(%rbp), %eax movl %eax, -0x54(%rbp) movl -0x54(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ma_ft_erase: push rbp mov rbp, rsp sub rsp, 60h 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], 0 loc_79362: mov rax, [rbp+var_20] cmp qword ptr [rax], 0 jz short loc_793B0 mov rdi, [rbp+var_8] mov edx, [rbp+var_C] mov rcx, [rbp+var_18] mov r8, [rbp+var_20] mov r9, [rbp+var_28] lea rsi, [rbp+var_50] call _ma_ft_make_key mov rdi, [rbp+var_8] lea rsi, [rbp+var_50] call _ma_ck_delete cmp al, 0 jz short loc_793A0 mov [rbp+var_2C], 1 loc_793A0: jmp short $+2 loc_793A2: mov rax, [rbp+var_20] add rax, 18h mov [rbp+var_20], rax jmp short loc_79362 loc_793B0: jmp short $+2 loc_793B2: mov eax, [rbp+var_2C] mov [rbp+var_54], eax mov eax, [rbp+var_54] add rsp, 60h pop rbp retn
long long ma_ft_erase(long long *a1, unsigned int a2, _BYTE *a3, _QWORD *a4, long long a5) { long long v6[4]; // [rsp+10h] [rbp-50h] BYREF unsigned int v7; // [rsp+34h] [rbp-2Ch] long long v8; // [rsp+38h] [rbp-28h] _QWORD *v9; // [rsp+40h] [rbp-20h] _BYTE *v10; // [rsp+48h] [rbp-18h] unsigned int v11; // [rsp+54h] [rbp-Ch] long long *v12; // [rsp+58h] [rbp-8h] v12 = a1; v11 = a2; v10 = a3; v9 = a4; v8 = a5; v7 = 0; while ( *v9 ) { ma_ft_make_key((long long)v12, (long long)v6, v11, v10, (long long)v9, v8); if ( ma_ck_delete(v12, v6) ) v7 = 1; v9 += 3; } return v7; }
_ma_ft_erase: PUSH RBP MOV RBP,RSP SUB RSP,0x60 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],0x0 LAB_00179362: MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX],0x0 JZ 0x001793b0 MOV RDI,qword ptr [RBP + -0x8] MOV EDX,dword ptr [RBP + -0xc] MOV RCX,qword ptr [RBP + -0x18] MOV R8,qword ptr [RBP + -0x20] MOV R9,qword ptr [RBP + -0x28] LEA RSI,[RBP + -0x50] CALL 0x001791d0 MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[RBP + -0x50] CALL 0x0016c7c0 CMP AL,0x0 JZ 0x001793a0 MOV dword ptr [RBP + -0x2c],0x1 LAB_001793a0: JMP 0x001793a2 LAB_001793a2: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x18 MOV qword ptr [RBP + -0x20],RAX JMP 0x00179362 LAB_001793b0: JMP 0x001793b2 LAB_001793b2: MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x54],EAX MOV EAX,dword ptr [RBP + -0x54] ADD RSP,0x60 POP RBP RET
int4 _ma_ft_erase(int8 param_1,int4 param_2,int8 param_3,long *param_4, int8 param_5) { char cVar1; int1 local_58 [36]; int4 local_34; int8 local_30; long *local_28; int8 local_20; int4 local_14; int8 local_10; local_34 = 0; local_30 = param_5; local_20 = param_3; local_14 = param_2; local_10 = param_1; for (local_28 = param_4; *local_28 != 0; local_28 = local_28 + 3) { _ma_ft_make_key(local_10,local_58,local_14,local_20,local_28,local_30); cVar1 = _ma_ck_delete(local_10,local_58); if (cVar1 != '\0') { local_34 = 1; } } return local_34; }
20,450
Cache::initCache()
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/Cache.cpp
void Cache::initCache() { this->blocks = std::vector<Block>(policy.blockNum); for (uint32_t i = 0; i < this->blocks.size(); ++i) { Block &b = this->blocks[i]; b.valid = false; b.modified = false; b.size = policy.blockSize; b.tag = 0; b.id = i / policy.associativity; b.lastReference = 0; b.data = std::vector<uint8_t>(b.size); } }
O0
cpp
Cache::initCache(): subq $0x98, %rsp movq %rdi, 0x90(%rsp) movq 0x90(%rsp), %rax movq %rax, 0x20(%rsp) movl 0x38(%rax), %eax movq %rax, 0x28(%rsp) leaq 0x77(%rsp), %rdi movq %rdi, 0x30(%rsp) callq 0x9680 movq 0x28(%rsp), %rsi movq 0x30(%rsp), %rdx leaq 0x78(%rsp), %rdi callq 0x9690 jmp 0x84d9 movq 0x20(%rsp), %rdi addq $0x48, %rdi leaq 0x78(%rsp), %rsi callq 0x9710 leaq 0x78(%rsp), %rdi callq 0x72b0 leaq 0x77(%rsp), %rdi callq 0x76f0 movl $0x0, 0x60(%rsp) movq 0x20(%rsp), %rdi movl 0x60(%rsp), %eax movq %rax, 0x18(%rsp) addq $0x48, %rdi callq 0x9660 movq %rax, %rcx movq 0x18(%rsp), %rax cmpq %rcx, %rax jae 0x8634 movq 0x20(%rsp), %rdi addq $0x48, %rdi movl 0x60(%rsp), %eax movl %eax, %esi callq 0x9620 movq 0x20(%rsp), %rcx movq %rax, 0x58(%rsp) movq 0x58(%rsp), %rax movb $0x0, (%rax) movq 0x58(%rsp), %rax movb $0x0, 0x1(%rax) movl 0x34(%rcx), %edx movq 0x58(%rsp), %rax movl %edx, 0xc(%rax) movq 0x58(%rsp), %rax movl $0x0, 0x4(%rax) movl 0x60(%rsp), %eax movl 0x3c(%rcx), %ecx xorl %edx, %edx divl %ecx movl %eax, %ecx movq 0x58(%rsp), %rax movl %ecx, 0x8(%rax) movq 0x58(%rsp), %rax movl $0x0, 0x10(%rax) movq 0x58(%rsp), %rax movl 0xc(%rax), %eax movq %rax, 0x8(%rsp) leaq 0x3f(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x9750 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x40(%rsp), %rdi callq 0x9760 jmp 0x85c9 movq 0x58(%rsp), %rdi addq $0x18, %rdi leaq 0x40(%rsp), %rsi callq 0x97e0 leaq 0x40(%rsp), %rdi callq 0x7450 leaq 0x3f(%rsp), %rdi callq 0x7620 movl 0x60(%rsp), %eax addl $0x1, %eax movl %eax, 0x60(%rsp) jmp 0x8508 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x68(%rsp) movl %eax, 0x64(%rsp) leaq 0x77(%rsp), %rdi callq 0x76f0 jmp 0x863c movq %rax, %rcx movl %edx, %eax movq %rcx, 0x68(%rsp) movl %eax, 0x64(%rsp) leaq 0x3f(%rsp), %rdi callq 0x7620 jmp 0x863c addq $0x98, %rsp retq movq 0x68(%rsp), %rdi callq 0x62c0 nopw %cs:(%rax,%rax)
_ZN5Cache9initCacheEv: sub rsp, 98h mov [rsp+98h+var_8], rdi mov rax, [rsp+98h+var_8] mov [rsp+98h+var_78], rax mov eax, [rax+38h] mov [rsp+98h+var_70], rax lea rdi, [rsp+98h+var_21] mov [rsp+98h+var_68], rdi call _ZNSaIN5Cache5BlockEEC2Ev; std::allocator<Cache::Block>::allocator(void) mov rsi, [rsp+98h+var_70] mov rdx, [rsp+98h+var_68] lea rdi, [rsp+98h+var_20] call _ZNSt6vectorIN5Cache5BlockESaIS1_EEC2EmRKS2_; std::vector<Cache::Block>::vector(ulong,std::allocator<Cache::Block> const&) jmp short $+2 loc_84D9: mov rdi, [rsp+98h+var_78] add rdi, 48h ; 'H' lea rsi, [rsp+98h+var_20] call _ZNSt6vectorIN5Cache5BlockESaIS1_EEaSEOS3_; std::vector<Cache::Block>::operator=(std::vector<Cache::Block>&&) lea rdi, [rsp+98h+var_20] call _ZNSt6vectorIN5Cache5BlockESaIS1_EED2Ev; std::vector<Cache::Block>::~vector() lea rdi, [rsp+98h+var_21] call _ZNSaIN5Cache5BlockEED2Ev; std::allocator<Cache::Block>::~allocator() mov [rsp+98h+var_38], 0 loc_8508: mov rdi, [rsp+98h+var_78] mov eax, [rsp+98h+var_38] mov [rsp+98h+var_80], rax add rdi, 48h ; 'H' call _ZNKSt6vectorIN5Cache5BlockESaIS1_EE4sizeEv; std::vector<Cache::Block>::size(void) mov rcx, rax mov rax, [rsp+98h+var_80] cmp rax, rcx jnb loc_8634 mov rdi, [rsp+98h+var_78] add rdi, 48h ; 'H' mov eax, [rsp+98h+var_38] mov esi, eax call _ZNSt6vectorIN5Cache5BlockESaIS1_EEixEm; std::vector<Cache::Block>::operator[](ulong) mov rcx, [rsp+98h+var_78] mov [rsp+98h+var_40], rax mov rax, [rsp+98h+var_40] mov byte ptr [rax], 0 mov rax, [rsp+98h+var_40] mov byte ptr [rax+1], 0 mov edx, [rcx+34h] mov rax, [rsp+98h+var_40] mov [rax+0Ch], edx mov rax, [rsp+98h+var_40] mov dword ptr [rax+4], 0 mov eax, [rsp+98h+var_38] mov ecx, [rcx+3Ch] xor edx, edx div ecx mov ecx, eax mov rax, [rsp+98h+var_40] mov [rax+8], ecx mov rax, [rsp+98h+var_40] mov dword ptr [rax+10h], 0 mov rax, [rsp+98h+var_40] mov eax, [rax+0Ch] mov [rsp+98h+var_90], rax lea rdi, [rsp+98h+var_59] mov [rsp+98h+var_88], rdi call _ZNSaIhEC2Ev; std::allocator<uchar>::allocator(void) mov rsi, [rsp+98h+var_90] mov rdx, [rsp+98h+var_88] lea rdi, [rsp+98h+var_58] call _ZNSt6vectorIhSaIhEEC2EmRKS0_; std::vector<uchar>::vector(ulong,std::allocator<uchar> const&) jmp short $+2 loc_85C9: mov rdi, [rsp+98h+var_40] add rdi, 18h lea rsi, [rsp+98h+var_58] call _ZNSt6vectorIhSaIhEEaSEOS1_; std::vector<uchar>::operator=(std::vector<uchar>&&) lea rdi, [rsp+98h+var_58] call _ZNSt6vectorIhSaIhEED2Ev; std::vector<uchar>::~vector() lea rdi, [rsp+98h+var_59] call _ZNSaIhED2Ev; std::allocator<uchar>::~allocator() mov eax, [rsp+98h+var_38] add eax, 1 mov [rsp+98h+var_38], eax jmp loc_8508 mov rcx, rax mov eax, edx mov [rsp+arg_60], rcx mov [rsp+arg_5C], eax lea rdi, [rsp+arg_6F] call _ZNSaIN5Cache5BlockEED2Ev; std::allocator<Cache::Block>::~allocator() jmp short loc_863C mov rcx, rax mov eax, edx mov [rsp+arg_60], rcx mov [rsp+arg_5C], eax lea rdi, [rsp+arg_37] call _ZNSaIhED2Ev; std::allocator<uchar>::~allocator() jmp short loc_863C loc_8634: add rsp, 98h retn loc_863C: mov rdi, [rsp+arg_60] call __Unwind_Resume
unsigned long long Cache::initCache(Cache *this) { int v1; // ecx int v2; // r8d int v3; // r9d unsigned long long v4; // rcx unsigned long long result; // rax long long v6; // rsi unsigned int v7; // ecx unsigned int v8; // edx int v9; // ecx int v10; // r8d int v11; // r9d long long v12; // [rsp+0h] [rbp-98h] int v13; // [rsp+8h] [rbp-90h] unsigned long long v14; // [rsp+18h] [rbp-80h] int v15; // [rsp+28h] [rbp-70h] char v16; // [rsp+3Fh] [rbp-59h] BYREF long long v17[3]; // [rsp+40h] [rbp-58h] BYREF long long v18; // [rsp+58h] [rbp-40h] unsigned int i; // [rsp+60h] [rbp-38h] char v20; // [rsp+77h] [rbp-21h] BYREF long long v21[4]; // [rsp+78h] [rbp-20h] BYREF v21[3] = (long long)this; v15 = *((_DWORD *)this + 14); std::allocator<Cache::Block>::allocator(); std::vector<Cache::Block>::vector((unsigned int)v21, v15, (unsigned int)&v20, v1, v2, v3); std::vector<Cache::Block>::operator=((char *)this + 72, v21); std::vector<Cache::Block>::~vector(v21); std::allocator<Cache::Block>::~allocator((long long)&v20); for ( i = 0; ; ++i ) { v14 = i; v4 = std::vector<Cache::Block>::size((char *)this + 72); result = v14; if ( v14 >= v4 ) break; v6 = i; v18 = std::vector<Cache::Block>::operator[]((char *)this + 72, i); *(_BYTE *)v18 = 0; *(_BYTE *)(v18 + 1) = 0; *(_DWORD *)(v18 + 12) = *((_DWORD *)this + 13); *(_DWORD *)(v18 + 4) = 0; v7 = *((_DWORD *)this + 15); v8 = i % v7; *(_DWORD *)(v18 + 8) = i / v7; *(_DWORD *)(v18 + 16) = 0; v13 = *(_DWORD *)(v18 + 12); std::allocator<unsigned char>::allocator(&v16, v6, v8); std::vector<unsigned char>::vector( (unsigned int)v17, v13, (unsigned int)&v16, v9, v10, v11, v12, v13, (long long)&v16); std::vector<unsigned char>::operator=(v18 + 24, v17); std::vector<unsigned char>::~vector(v17); std::allocator<unsigned char>::~allocator((long long)&v16); } return result; }
initCache: SUB RSP,0x98 MOV qword ptr [RSP + 0x90],RDI MOV RAX,qword ptr [RSP + 0x90] MOV qword ptr [RSP + 0x20],RAX MOV EAX,dword ptr [RAX + 0x38] MOV qword ptr [RSP + 0x28],RAX LEA RDI,[RSP + 0x77] MOV qword ptr [RSP + 0x30],RDI CALL 0x00109680 MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x30] LAB_001084cd: LEA RDI,[RSP + 0x78] CALL 0x00109690 JMP 0x001084d9 LAB_001084d9: MOV RDI,qword ptr [RSP + 0x20] ADD RDI,0x48 LEA RSI,[RSP + 0x78] CALL 0x00109710 LEA RDI,[RSP + 0x78] CALL 0x001072b0 LEA RDI,[RSP + 0x77] CALL 0x001076f0 MOV dword ptr [RSP + 0x60],0x0 LAB_00108508: MOV RDI,qword ptr [RSP + 0x20] MOV EAX,dword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x18],RAX ADD RDI,0x48 CALL 0x00109660 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x18] CMP RAX,RCX JNC 0x00108634 MOV RDI,qword ptr [RSP + 0x20] ADD RDI,0x48 MOV EAX,dword ptr [RSP + 0x60] MOV ESI,EAX CALL 0x00109620 MOV RCX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x58],RAX MOV RAX,qword ptr [RSP + 0x58] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RSP + 0x58] MOV byte ptr [RAX + 0x1],0x0 MOV EDX,dword ptr [RCX + 0x34] MOV RAX,qword ptr [RSP + 0x58] MOV dword ptr [RAX + 0xc],EDX MOV RAX,qword ptr [RSP + 0x58] MOV dword ptr [RAX + 0x4],0x0 MOV EAX,dword ptr [RSP + 0x60] MOV ECX,dword ptr [RCX + 0x3c] XOR EDX,EDX DIV ECX MOV ECX,EAX MOV RAX,qword ptr [RSP + 0x58] MOV dword ptr [RAX + 0x8],ECX MOV RAX,qword ptr [RSP + 0x58] MOV dword ptr [RAX + 0x10],0x0 MOV RAX,qword ptr [RSP + 0x58] MOV EAX,dword ptr [RAX + 0xc] MOV qword ptr [RSP + 0x8],RAX LEA RDI,[RSP + 0x3f] MOV qword ptr [RSP + 0x10],RDI CALL 0x00109750 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_001085bd: LEA RDI,[RSP + 0x40] CALL 0x00109760 LAB_001085c7: JMP 0x001085c9 LAB_001085c9: MOV RDI,qword ptr [RSP + 0x58] ADD RDI,0x18 LEA RSI,[RSP + 0x40] CALL 0x001097e0 LEA RDI,[RSP + 0x40] CALL 0x00107450 LEA RDI,[RSP + 0x3f] CALL 0x00107620 MOV EAX,dword ptr [RSP + 0x60] ADD EAX,0x1 MOV dword ptr [RSP + 0x60],EAX JMP 0x00108508 LAB_00108634: ADD RSP,0x98 RET
/* Cache::initCache() */ void __thiscall Cache::initCache(Cache *this) { uint uVar1; ulong uVar2; ulong uVar3; allocator<unsigned_char> local_59; vector<unsigned_char,std::allocator<unsigned_char>> local_58 [24]; int1 *local_40; uint local_38; allocator<Cache::Block> local_21; vector<Cache::Block,std::allocator<Cache::Block>> local_20 [24]; Cache *local_8; uVar1 = *(uint *)(this + 0x38); local_8 = this; std::allocator<Cache::Block>::allocator(&local_21); /* try { // try from 001084cd to 001084d6 has its CatchHandler @ 00108600 */ std::vector<Cache::Block,std::allocator<Cache::Block>>::vector (local_20,(ulong)uVar1,(allocator *)&local_21); std::vector<Cache::Block,std::allocator<Cache::Block>>::operator= ((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x48),(vector *)local_20); std::vector<Cache::Block,std::allocator<Cache::Block>>::~vector(local_20); std::allocator<Cache::Block>::~allocator(&local_21); local_38 = 0; while( true ) { uVar2 = (ulong)local_38; uVar3 = std::vector<Cache::Block,std::allocator<Cache::Block>>::size ((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x48)); if (uVar3 <= uVar2) break; local_40 = (int1 *) std::vector<Cache::Block,std::allocator<Cache::Block>>::operator[] ((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x48), (ulong)local_38); *local_40 = 0; local_40[1] = 0; *(int4 *)(local_40 + 0xc) = *(int4 *)(this + 0x34); *(int4 *)(local_40 + 4) = 0; *(uint *)(local_40 + 8) = local_38 / *(uint *)(this + 0x3c); *(int4 *)(local_40 + 0x10) = 0; uVar1 = *(uint *)(local_40 + 0xc); std::allocator<unsigned_char>::allocator(&local_59); /* try { // try from 001085bd to 001085c6 has its CatchHandler @ 0010861a */ std::vector<unsigned_char,std::allocator<unsigned_char>>::vector (local_58,(ulong)uVar1,(allocator *)&local_59); std::vector<unsigned_char,std::allocator<unsigned_char>>::operator= ((vector<unsigned_char,std::allocator<unsigned_char>> *)(local_40 + 0x18), (vector *)local_58); std::vector<unsigned_char,std::allocator<unsigned_char>>::~vector(local_58); std::allocator<unsigned_char>::~allocator(&local_59); local_38 = local_38 + 1; } return; }
20,451
Cache::initCache()
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/Cache.cpp
void Cache::initCache() { this->blocks = std::vector<Block>(policy.blockNum); for (uint32_t i = 0; i < this->blocks.size(); ++i) { Block &b = this->blocks[i]; b.valid = false; b.modified = false; b.size = policy.blockSize; b.tag = 0; b.id = i / policy.associativity; b.lastReference = 0; b.data = std::vector<uint8_t>(b.size); } }
O3
cpp
Cache::initCache(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdi, %rbx movl 0x38(%rdi), %esi leaq 0x30(%rsp), %r14 leaq 0xf(%rsp), %rdx movq %r14, %rdi callq 0x4e84 movq 0x58(%rbx), %rax movaps (%r14), %xmm0 movq 0x10(%r14), %rcx movq %rcx, 0x58(%rbx) movups 0x48(%rbx), %xmm1 movups %xmm0, 0x48(%rbx) leaq 0x10(%rsp), %rdi movaps %xmm1, (%rdi) movq %rax, 0x10(%rdi) xorps %xmm0, %xmm0 movaps %xmm0, (%r14) movq $0x0, 0x10(%r14) callq 0x3d18 movq %r14, %rdi callq 0x3d18 movq 0x48(%rbx), %r14 cmpq %r14, 0x50(%rbx) je 0x45af xorl %r13d, %r13d movabsq $-0x5555555555555555, %rbp # imm = 0xAAAAAAAAAAAAAAAB xorl %eax, %eax xorl %r12d, %r12d leaq (%rax,%rax,2), %r15 shlq $0x4, %r15 movw $0x0, (%r14,%r15) movl 0x34(%rbx), %esi movl %esi, 0xc(%r14,%r15) movl %r13d, 0x4(%r14,%r15) movl %r12d, %eax xorl %edx, %edx divl 0x3c(%rbx) movl %eax, 0x8(%r14,%r15) movl %r13d, 0x10(%r14,%r15) leaq 0x10(%rsp), %rdi leaq 0x30(%rsp), %rdx callq 0x4f0e movq 0x18(%r14,%r15), %rdi movaps 0x10(%rsp), %xmm0 movups %xmm0, 0x18(%r14,%r15) movq 0x20(%rsp), %rax movq %rax, 0x28(%r14,%r15) xorps %xmm0, %xmm0 movaps %xmm0, 0x10(%rsp) movq $0x0, 0x20(%rsp) testq %rdi, %rdi je 0x458d callq 0x3150 movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x458d callq 0x3150 incl %r12d movq 0x48(%rbx), %r14 movq 0x50(%rbx), %rcx subq %r14, %rcx sarq $0x4, %rcx imulq %rbp, %rcx movq %r12, %rax cmpq %r12, %rcx ja 0x450c addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN5Cache9initCacheEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov rbx, rdi mov esi, [rdi+38h] lea r14, [rsp+78h+var_48] lea rdx, [rsp+78h+var_69] mov rdi, r14 call _ZNSt6vectorIN5Cache5BlockESaIS1_EEC2EmRKS2_; std::vector<Cache::Block>::vector(ulong,std::allocator<Cache::Block> const&) mov rax, [rbx+58h] movaps xmm0, xmmword ptr [r14] mov rcx, [r14+10h] mov [rbx+58h], rcx movups xmm1, xmmword ptr [rbx+48h] movups xmmword ptr [rbx+48h], xmm0 lea rdi, [rsp+78h+var_68] movaps xmmword ptr [rdi], xmm1 mov [rdi+10h], rax xorps xmm0, xmm0 movaps xmmword ptr [r14], xmm0 mov qword ptr [r14+10h], 0 call _ZNSt6vectorIN5Cache5BlockESaIS1_EED2Ev; std::vector<Cache::Block>::~vector() mov rdi, r14 call _ZNSt6vectorIN5Cache5BlockESaIS1_EED2Ev; std::vector<Cache::Block>::~vector() mov r14, [rbx+48h] cmp [rbx+50h], r14 jz loc_45AF xor r13d, r13d mov rbp, 0AAAAAAAAAAAAAAABh xor eax, eax xor r12d, r12d loc_450C: lea r15, [rax+rax*2] shl r15, 4 mov word ptr [r14+r15], 0 mov esi, [rbx+34h] mov [r14+r15+0Ch], esi mov [r14+r15+4], r13d mov eax, r12d xor edx, edx div dword ptr [rbx+3Ch] mov [r14+r15+8], eax mov [r14+r15+10h], r13d lea rdi, [rsp+78h+var_68] lea rdx, [rsp+78h+var_48] call _ZNSt6vectorIhSaIhEEC2EmRKS0_; std::vector<uchar>::vector(ulong,std::allocator<uchar> const&) mov rdi, [r14+r15+18h]; void * movaps xmm0, xmmword ptr [rsp+78h+var_68] movups xmmword ptr [r14+r15+18h], xmm0 mov rax, [rsp+78h+var_58] mov [r14+r15+28h], rax xorps xmm0, xmm0 movaps xmmword ptr [rsp+78h+var_68], xmm0 mov [rsp+78h+var_58], 0 test rdi, rdi jz short loc_458D call __ZdlPv; operator delete(void *) mov rdi, [rsp+78h+var_68]; void * test rdi, rdi jz short loc_458D call __ZdlPv; operator delete(void *) loc_458D: inc r12d mov r14, [rbx+48h] mov rcx, [rbx+50h] sub rcx, r14 sar rcx, 4 imul rcx, rbp mov rax, r12 cmp rcx, r12 ja loc_450C loc_45AF: add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
void Cache::initCache(Cache *this) { long long v2; // rax __int128 v3; // xmm0 __int128 v4; // xmm1 long long v5; // r14 unsigned long long v6; // rax unsigned long long v7; // r12 long long v8; // r15 long long v9; // rsi void *v10; // rdi char v11; // [rsp+Fh] [rbp-69h] BYREF void *v12[2]; // [rsp+10h] [rbp-68h] BYREF long long v13; // [rsp+20h] [rbp-58h] __int128 v14; // [rsp+30h] [rbp-48h] BYREF long long v15; // [rsp+40h] [rbp-38h] std::vector<Cache::Block>::vector(&v14, *((unsigned int *)this + 14), &v11); v2 = *((_QWORD *)this + 11); v3 = v14; *((_QWORD *)this + 11) = v15; v4 = *(_OWORD *)((char *)this + 72); *(_OWORD *)((char *)this + 72) = v3; *(_OWORD *)v12 = v4; v13 = v2; v14 = 0LL; v15 = 0LL; std::vector<Cache::Block>::~vector((long long)v12); std::vector<Cache::Block>::~vector((long long)&v14); v5 = *((_QWORD *)this + 9); if ( *((_QWORD *)this + 10) != v5 ) { v6 = 0LL; LODWORD(v7) = 0; do { v8 = 48 * v6; *(_WORD *)(v5 + v8) = 0; v9 = *((unsigned int *)this + 13); *(_DWORD *)(v5 + v8 + 12) = v9; *(_DWORD *)(v5 + v8 + 4) = 0; *(_DWORD *)(v5 + v8 + 8) = (unsigned int)v7 / *((_DWORD *)this + 15); *(_DWORD *)(v5 + v8 + 16) = 0; std::vector<unsigned char>::vector(v12, v9, &v14); v10 = *(void **)(v5 + v8 + 24); *(_OWORD *)(v5 + v8 + 24) = *(_OWORD *)v12; *(_QWORD *)(v5 + v8 + 40) = v13; *(_OWORD *)v12 = 0LL; v13 = 0LL; if ( v10 ) { operator delete(v10); if ( v12[0] ) operator delete(v12[0]); } v7 = (unsigned int)(v7 + 1); v5 = *((_QWORD *)this + 9); v6 = v7; } while ( 0xAAAAAAAAAAAAAAABLL * ((*((_QWORD *)this + 10) - v5) >> 4) > v7 ); } }
initCache: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV RBX,RDI MOV ESI,dword ptr [RDI + 0x38] LEA R14,[RSP + 0x30] LEA RDX,[RSP + 0xf] MOV RDI,R14 CALL 0x00104e84 MOV RAX,qword ptr [RBX + 0x58] MOVAPS XMM0,xmmword ptr [R14] MOV RCX,qword ptr [R14 + 0x10] MOV qword ptr [RBX + 0x58],RCX MOVUPS XMM1,xmmword ptr [RBX + 0x48] MOVUPS xmmword ptr [RBX + 0x48],XMM0 LEA RDI,[RSP + 0x10] MOVAPS xmmword ptr [RDI],XMM1 MOV qword ptr [RDI + 0x10],RAX XORPS XMM0,XMM0 MOVAPS xmmword ptr [R14],XMM0 MOV qword ptr [R14 + 0x10],0x0 CALL 0x00103d18 MOV RDI,R14 CALL 0x00103d18 MOV R14,qword ptr [RBX + 0x48] CMP qword ptr [RBX + 0x50],R14 JZ 0x001045af XOR R13D,R13D MOV RBP,-0x5555555555555555 XOR EAX,EAX XOR R12D,R12D LAB_0010450c: LEA R15,[RAX + RAX*0x2] SHL R15,0x4 MOV word ptr [R14 + R15*0x1],0x0 MOV ESI,dword ptr [RBX + 0x34] MOV dword ptr [R14 + R15*0x1 + 0xc],ESI MOV dword ptr [R14 + R15*0x1 + 0x4],R13D MOV EAX,R12D XOR EDX,EDX DIV dword ptr [RBX + 0x3c] MOV dword ptr [R14 + R15*0x1 + 0x8],EAX MOV dword ptr [R14 + R15*0x1 + 0x10],R13D LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0x30] CALL 0x00104f0e MOV RDI,qword ptr [R14 + R15*0x1 + 0x18] MOVAPS XMM0,xmmword ptr [RSP + 0x10] MOVUPS xmmword ptr [R14 + R15*0x1 + 0x18],XMM0 MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [R14 + R15*0x1 + 0x28],RAX XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOV qword ptr [RSP + 0x20],0x0 TEST RDI,RDI JZ 0x0010458d CALL 0x00103150 MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x0010458d CALL 0x00103150 LAB_0010458d: INC R12D MOV R14,qword ptr [RBX + 0x48] MOV RCX,qword ptr [RBX + 0x50] SUB RCX,R14 SAR RCX,0x4 IMUL RCX,RBP MOV RAX,R12 CMP RCX,R12 JA 0x0010450c LAB_001045af: ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* Cache::initCache() */ void __thiscall Cache::initCache(Cache *this) { int8 *puVar1; uint uVar2; void *pvVar3; ulong uVar4; ulong uVar5; long lVar6; long lVar7; void *local_68; int8 uStack_60; int8 local_58; int8 local_48; int8 uStack_40; int8 local_38; std::vector<Cache::Block,std::allocator<Cache::Block>>::vector ((ulong)&local_48,(allocator *)(ulong)*(uint *)(this + 0x38)); local_58 = *(int8 *)(this + 0x58); *(int8 *)(this + 0x58) = local_38; local_68 = *(void **)(this + 0x48); uStack_60 = *(int8 *)(this + 0x50); *(int8 *)(this + 0x48) = local_48; *(int8 *)(this + 0x50) = uStack_40; local_48 = 0; uStack_40 = 0; local_38 = 0; std::vector<Cache::Block,std::allocator<Cache::Block>>::~vector ((vector<Cache::Block,std::allocator<Cache::Block>> *)&local_68); std::vector<Cache::Block,std::allocator<Cache::Block>>::~vector ((vector<Cache::Block,std::allocator<Cache::Block>> *)&local_48); lVar6 = *(long *)(this + 0x48); if (*(long *)(this + 0x50) != lVar6) { uVar5 = 0; do { lVar7 = uVar5 * 0x30; *(int2 *)(lVar6 + lVar7) = 0; uVar2 = *(uint *)(this + 0x34); *(uint *)(lVar6 + 0xc + lVar7) = uVar2; *(int4 *)(lVar6 + 4 + lVar7) = 0; *(int *)(lVar6 + 8 + lVar7) = (int)(uVar5 / *(uint *)(this + 0x3c)); *(int4 *)(lVar6 + 0x10 + lVar7) = 0; std::vector<unsigned_char,std::allocator<unsigned_char>>::vector ((ulong)&local_68,(allocator *)(ulong)uVar2); pvVar3 = *(void **)(lVar6 + 0x18 + lVar7); puVar1 = (int8 *)(lVar6 + 0x18 + lVar7); *puVar1 = local_68; puVar1[1] = uStack_60; *(int8 *)(lVar6 + 0x28 + lVar7) = local_58; local_68 = (void *)0x0; uStack_60 = 0; local_58 = 0; if (pvVar3 != (void *)0x0) { operator_delete(pvVar3); if (local_68 != (void *)0x0) { operator_delete(local_68); } } uVar5 = (ulong)((int)uVar5 + 1); lVar6 = *(long *)(this + 0x48); uVar4 = (*(long *)(this + 0x50) - lVar6 >> 4) * -0x5555555555555555; } while (uVar5 <= uVar4 && uVar4 - uVar5 != 0); } return; }
20,452
minja::FilterNode::FilterNode(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::TemplateNode>&&)
monkey531[P]llama/common/minja.hpp
FilterNode(const Location & location, std::shared_ptr<Expression> && f, std::shared_ptr<TemplateNode> && b) : TemplateNode(location), filter(std::move(f)), body(std::move(b)) {}
O2
cpp
minja::FilterNode::FilterNode(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::TemplateNode>&&): pushq %r15 pushq %r14 pushq %rbx movq %rcx, %rbx movq %rdx, %r14 movq %rdi, %r15 callq 0x7320c leaq 0x87c1a(%rip), %rax # 0xff4f8 addq $0x10, %rax movq %rax, (%r15) andq $0x0, 0x28(%r15) movups (%r14), %xmm0 andq $0x0, 0x8(%r14) movups %xmm0, 0x20(%r15) andq $0x0, (%r14) andq $0x0, 0x38(%r15) movups (%rbx), %xmm0 andq $0x0, 0x8(%rbx) movups %xmm0, 0x30(%r15) andq $0x0, (%rbx) popq %rbx popq %r14 popq %r15 retq
_ZN5minja10FilterNodeC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEEOS4_INS_12TemplateNodeEE: push r15 push r14 push rbx mov rbx, rcx mov r14, rdx mov r15, rdi call _ZN5minja12TemplateNodeC2ERKNS_8LocationE; minja::TemplateNode::TemplateNode(minja::Location const&) lea rax, _ZTVN5minja10FilterNodeE; `vtable for'minja::FilterNode add rax, 10h mov [r15], rax and qword ptr [r15+28h], 0 movups xmm0, xmmword ptr [r14] and qword ptr [r14+8], 0 movups xmmword ptr [r15+20h], xmm0 and qword ptr [r14], 0 and qword ptr [r15+38h], 0 movups xmm0, xmmword ptr [rbx] and qword ptr [rbx+8], 0 movups xmmword ptr [r15+30h], xmm0 and qword ptr [rbx], 0 pop rbx pop r14 pop r15 retn
long long * minja::FilterNode::FilterNode(long long a1, _QWORD *a2, __int128 *a3, __int128 *a4) { long long *result; // rax __int128 v7; // xmm0 __int128 v8; // xmm0 minja::TemplateNode::TemplateNode((_QWORD *)a1, a2); result = &`vtable for'minja::FilterNode + 2; *(_QWORD *)a1 = &`vtable for'minja::FilterNode + 2; *(_QWORD *)(a1 + 40) = 0LL; v7 = *a3; *((_QWORD *)a3 + 1) = 0LL; *(_OWORD *)(a1 + 32) = v7; *(_QWORD *)a3 = 0LL; *(_QWORD *)(a1 + 56) = 0LL; v8 = *a4; *((_QWORD *)a4 + 1) = 0LL; *(_OWORD *)(a1 + 48) = v8; *(_QWORD *)a4 = 0LL; return result; }
FilterNode: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RCX MOV R14,RDX MOV R15,RDI CALL 0x0017320c LEA RAX,[0x1ff4f8] ADD RAX,0x10 MOV qword ptr [R15],RAX AND qword ptr [R15 + 0x28],0x0 MOVUPS XMM0,xmmword ptr [R14] AND qword ptr [R14 + 0x8],0x0 MOVUPS xmmword ptr [R15 + 0x20],XMM0 AND qword ptr [R14],0x0 AND qword ptr [R15 + 0x38],0x0 MOVUPS XMM0,xmmword ptr [RBX] AND qword ptr [RBX + 0x8],0x0 MOVUPS xmmword ptr [R15 + 0x30],XMM0 AND qword ptr [RBX],0x0 POP RBX POP R14 POP R15 RET
/* minja::FilterNode::FilterNode(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::TemplateNode>&&) */ void __thiscall minja::FilterNode::FilterNode (FilterNode *this,Location *param_1,shared_ptr *param_2,shared_ptr *param_3) { int8 uVar1; TemplateNode::TemplateNode((TemplateNode *)this,param_1); *(int ***)this = &PTR_do_render_001ff508; *(int8 *)(this + 0x28) = 0; uVar1 = *(int8 *)(param_2 + 8); *(int8 *)(param_2 + 8) = 0; *(int8 *)(this + 0x20) = *(int8 *)param_2; *(int8 *)(this + 0x28) = uVar1; *(int8 *)param_2 = 0; *(int8 *)(this + 0x38) = 0; uVar1 = *(int8 *)(param_3 + 8); *(int8 *)(param_3 + 8) = 0; *(int8 *)(this + 0x30) = *(int8 *)param_3; *(int8 *)(this + 0x38) = uVar1; *(int8 *)param_3 = 0; return; }
20,453
find_recurse
eloqsql/build_O3/extra/pcre2/src/pcre2/src/pcre2_compile.c
static PCRE2_SPTR find_recurse(PCRE2_SPTR code, BOOL utf) { for (;;) { PCRE2_UCHAR c = *code; if (c == OP_END) return NULL; if (c == OP_RECURSE) return code; /* XCLASS is used for classes that cannot be represented just by a bit map. This includes negated single high-valued characters. CALLOUT_STR is used for callouts with string arguments. In both cases the length in the table is zero; the actual length is stored in the compiled code. */ if (c == OP_XCLASS) code += GET(code, 1); else if (c == OP_CALLOUT_STR) code += GET(code, 1 + 2*LINK_SIZE); /* Otherwise, we can get the item's length from the table, except that for repeated character types, we have to test for \p and \P, which have an extra two code units of parameters, and for MARK/PRUNE/SKIP/THEN with an argument, we must add in its length. */ else { switch(c) { case OP_TYPESTAR: case OP_TYPEMINSTAR: case OP_TYPEPLUS: case OP_TYPEMINPLUS: case OP_TYPEQUERY: case OP_TYPEMINQUERY: case OP_TYPEPOSSTAR: case OP_TYPEPOSPLUS: case OP_TYPEPOSQUERY: if (code[1] == OP_PROP || code[1] == OP_NOTPROP) code += 2; break; case OP_TYPEPOSUPTO: case OP_TYPEUPTO: case OP_TYPEMINUPTO: case OP_TYPEEXACT: if (code[1 + IMM2_SIZE] == OP_PROP || code[1 + IMM2_SIZE] == OP_NOTPROP) code += 2; break; case OP_MARK: case OP_COMMIT_ARG: case OP_PRUNE_ARG: case OP_SKIP_ARG: case OP_THEN_ARG: code += code[1]; break; } /* Add in the fixed length from the table */ code += PRIV(OP_lengths)[c]; /* In UTF-8 and UTF-16 modes, opcodes that are followed by a character may be followed by a multi-unit character. The length in the table is a minimum, so we have to arrange to skip the extra units. */ #ifdef MAYBE_UTF_MULTI if (utf) switch(c) { case OP_CHAR: case OP_CHARI: case OP_NOT: case OP_NOTI: case OP_EXACT: case OP_EXACTI: case OP_NOTEXACT: case OP_NOTEXACTI: case OP_UPTO: case OP_UPTOI: case OP_NOTUPTO: case OP_NOTUPTOI: case OP_MINUPTO: case OP_MINUPTOI: case OP_NOTMINUPTO: case OP_NOTMINUPTOI: case OP_POSUPTO: case OP_POSUPTOI: case OP_NOTPOSUPTO: case OP_NOTPOSUPTOI: case OP_STAR: case OP_STARI: case OP_NOTSTAR: case OP_NOTSTARI: case OP_MINSTAR: case OP_MINSTARI: case OP_NOTMINSTAR: case OP_NOTMINSTARI: case OP_POSSTAR: case OP_POSSTARI: case OP_NOTPOSSTAR: case OP_NOTPOSSTARI: case OP_PLUS: case OP_PLUSI: case OP_NOTPLUS: case OP_NOTPLUSI: case OP_MINPLUS: case OP_MINPLUSI: case OP_NOTMINPLUS: case OP_NOTMINPLUSI: case OP_POSPLUS: case OP_POSPLUSI: case OP_NOTPOSPLUS: case OP_NOTPOSPLUSI: case OP_QUERY: case OP_QUERYI: case OP_NOTQUERY: case OP_NOTQUERYI: case OP_MINQUERY: case OP_MINQUERYI: case OP_NOTMINQUERY: case OP_NOTMINQUERYI: case OP_POSQUERY: case OP_POSQUERYI: case OP_NOTPOSQUERY: case OP_NOTPOSQUERYI: if (HAS_EXTRALEN(code[-1])) code += GET_EXTRALEN(code[-1]); break; } #else (void)(utf); /* Keep compiler happy by referencing function argument */ #endif /* MAYBE_UTF_MULTI */ } } }
O3
c
find_recurse: pushq %rbp movq %rsp, %rbp movq %rdi, %rax movl $0x155, %ecx # imm = 0x155 leaq 0x6e5d5(%rip), %rdx # 0x118c50 leaq 0x6e7ae(%rip), %rdi # 0x118e30 leaq 0x6cd4f(%rip), %r8 # 0x1173d8 movzbl (%rax), %r9d leal -0x55(%r9), %r10d cmpl $0x22, %r10d ja 0xaa6a7 movslq (%r8,%r10,4), %r10 addq %r8, %r10 jmpq *%r10 movb 0x1(%rax), %r11b jmp 0xaa6c5 leal -0x99(%r9), %r10d cmpl $0x8, %r10d ja 0xaa6fe btl %r10d, %ecx jae 0xaa6fe movzbl 0x1(%rax), %r10d jmp 0xaa6d7 movb 0x3(%rax), %r11b addb $-0xf, %r11b xorl %r10d, %r10d cmpb $0x2, %r11b setb %r10b addl %r10d, %r10d addq %r10, %rax movzbl (%rdx,%r9), %r9d addq %r9, %rax jmp 0xaa689 movzwl 0x5(%rax), %r9d jmp 0xaa6f0 movzwl 0x1(%rax), %r9d rolw $0x8, %r9w movzwl %r9w, %r9d addq %r9, %rax jmp 0xaa689 testl %r9d, %r9d je 0xaa744 movzbl (%rdx,%r9), %r10d addq %r10, %rax testl %esi, %esi je 0xaa689 addl $-0x1d, %r9d cmpb $0x37, %r9b ja 0xaa689 movzbl -0x1(%rax), %r9d cmpq $0xc0, %r9 jb 0xaa689 andl $0x3f, %r9d movzbl (%rdi,%r9), %r9d addq %r9, %rax jmp 0xaa689 xorl %eax, %eax popq %rbp retq
find_recurse: push rbp mov rbp, rsp mov rax, rdi mov ecx, 155h lea rdx, _pcre2_OP_lengths_8 lea rdi, _pcre2_utf8_table4 lea r8, jpt_AA69E loc_AA689: movzx r9d, byte ptr [rax] lea r10d, [r9-55h]; switch 35 cases cmp r10d, 22h ja short def_AA69E; jumptable 00000000000AA69E default case movsxd r10, ds:(jpt_AA69E - 1173D8h)[r8+r10*4] add r10, r8 jmp r10; switch jump loc_AA6A1: mov r11b, [rax+1]; jumptable 00000000000AA69E cases 85-90,94-96 jmp short loc_AA6C5 def_AA69E: lea r10d, [r9-99h]; jumptable 00000000000AA69E default case cmp r10d, 8 ja short loc_AA6FE bt ecx, r10d jnb short loc_AA6FE movzx r10d, byte ptr [rax+1] jmp short loc_AA6D7 loc_AA6C1: mov r11b, [rax+3]; jumptable 00000000000AA69E cases 91-93,97 loc_AA6C5: add r11b, 0F1h xor r10d, r10d cmp r11b, 2 setb r10b add r10d, r10d loc_AA6D7: add rax, r10 movzx r9d, byte ptr [rdx+r9] add rax, r9 jmp short loc_AA689 loc_AA6E4: movzx r9d, word ptr [rax+5]; jumptable 00000000000AA69E case 119 jmp short loc_AA6F0 loc_AA6EB: movzx r9d, word ptr [rax+1]; jumptable 00000000000AA69E case 112 loc_AA6F0: rol r9w, 8 movzx r9d, r9w add rax, r9 jmp short loc_AA689 loc_AA6FE: test r9d, r9d jz short loc_AA744 loc_AA703: movzx r10d, byte ptr [rdx+r9]; jumptable 00000000000AA69E cases 98-111,113-116,118 add rax, r10 test esi, esi jz loc_AA689 add r9d, 0FFFFFFE3h cmp r9b, 37h ; '7' ja loc_AA689 movzx r9d, byte ptr [rax-1] cmp r9, 0C0h jb loc_AA689 and r9d, 3Fh movzx r9d, byte ptr [rdi+r9] add rax, r9 jmp loc_AA689 loc_AA744: xor eax, eax loc_AA746: pop rbp; jumptable 00000000000AA69E case 117 retn
unsigned __int8 * find_recurse(unsigned __int8 *a1, int a2) { unsigned __int8 *result; // rax int v3; // ecx long long v4; // r9 unsigned __int8 v5; // r11 long long v6; // r10 __int16 v7; // r9 unsigned long long v8; // r9 result = a1; v3 = 341; while ( 2 ) { v4 = *result; switch ( *result ) { case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case '^': case '_': case '`': v5 = result[1]; goto LABEL_8; case '[': case '\\': case ']': case 'a': v5 = result[3]; LABEL_8: v6 = 2 * (unsigned int)((unsigned __int8)(v5 - 15) < 2u); goto LABEL_9; case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'q': case 'r': case 's': case 't': case 'v': goto LABEL_14; case 'p': v7 = *(_WORD *)(result + 1); goto LABEL_12; case 'u': return result; case 'w': v7 = *(_WORD *)(result + 5); LABEL_12: result += (unsigned __int16)__ROL2__(v7, 8); continue; default: if ( (unsigned int)(v4 - 153) <= 8 && _bittest(&v3, v4 - 153) ) { v6 = result[1]; LABEL_9: result += pcre2_OP_lengths_8[v4] + v6; continue; } if ( *result ) { LABEL_14: result += pcre2_OP_lengths_8[v4]; if ( a2 && (unsigned __int8)(v4 - 29) <= 0x37u ) { v8 = *(result - 1); if ( v8 >= 0xC0 ) result += pcre2_utf8_table4[v8 & 0x3F]; } continue; } return 0LL; } } }
find_recurse: PUSH RBP MOV RBP,RSP MOV RAX,RDI MOV ECX,0x155 LEA RDX,[0x218c50] LEA RDI,[0x218e30] LEA R8,[0x2173d8] LAB_001aa689: MOVZX R9D,byte ptr [RAX] LEA R10D,[R9 + -0x55] CMP R10D,0x22 JA 0x001aa6a7 MOVSXD R10,dword ptr [R8 + R10*0x4] ADD R10,R8 switchD: JMP R10 caseD_55: MOV R11B,byte ptr [RAX + 0x1] JMP 0x001aa6c5 default: LEA R10D,[R9 + -0x99] CMP R10D,0x8 JA 0x001aa6fe BT ECX,R10D JNC 0x001aa6fe MOVZX R10D,byte ptr [RAX + 0x1] JMP 0x001aa6d7 caseD_5b: MOV R11B,byte ptr [RAX + 0x3] LAB_001aa6c5: ADD R11B,0xf1 XOR R10D,R10D CMP R11B,0x2 SETC R10B ADD R10D,R10D LAB_001aa6d7: ADD RAX,R10 MOVZX R9D,byte ptr [RDX + R9*0x1] ADD RAX,R9 JMP 0x001aa689 caseD_77: MOVZX R9D,word ptr [RAX + 0x5] JMP 0x001aa6f0 caseD_70: MOVZX R9D,word ptr [RAX + 0x1] LAB_001aa6f0: ROL R9W,0x8 MOVZX R9D,R9W ADD RAX,R9 JMP 0x001aa689 LAB_001aa6fe: TEST R9D,R9D JZ 0x001aa744 caseD_62: MOVZX R10D,byte ptr [RDX + R9*0x1] ADD RAX,R10 TEST ESI,ESI JZ 0x001aa689 ADD R9D,-0x1d CMP R9B,0x37 JA 0x001aa689 MOVZX R9D,byte ptr [RAX + -0x1] CMP R9,0xc0 JC 0x001aa689 AND R9D,0x3f MOVZX R9D,byte ptr [RDI + R9*0x1] ADD RAX,R9 JMP 0x001aa689 LAB_001aa744: XOR EAX,EAX caseD_75: POP RBP RET
byte * find_recurse(byte *param_1,int param_2) { byte bVar1; ushort uVar2; ulong uVar3; byte bVar4; LAB_001aa689: bVar1 = *param_1; switch(bVar1) { case 0x55: case 0x56: case 0x57: case 0x58: case 0x59: case 0x5a: case 0x5e: case 0x5f: case 0x60: bVar4 = param_1[1]; break; case 0x5b: case 0x5c: case 0x5d: case 0x61: bVar4 = param_1[3]; break; case 0x62: case 99: case 100: case 0x65: case 0x66: case 0x67: case 0x68: case 0x69: case 0x6a: case 0x6b: case 0x6c: case 0x6d: case 0x6e: case 0x6f: case 0x71: case 0x72: case 0x73: case 0x74: case 0x76: switchD_001aa69e_caseD_62: param_1 = param_1 + (byte)_pcre2_OP_lengths_8[bVar1]; if (((param_2 != 0) && ((byte)(bVar1 - 0x1d) < 0x38)) && (0xbf < param_1[-1])) { param_1 = param_1 + (byte)_pcre2_utf8_table4[param_1[-1] & 0x3f]; } goto LAB_001aa689; case 0x70: uVar2 = *(ushort *)(param_1 + 1); goto LAB_001aa6f0; case 0x75: goto switchD_001aa69e_caseD_75; case 0x77: uVar2 = *(ushort *)(param_1 + 5); LAB_001aa6f0: param_1 = param_1 + (ushort)(uVar2 << 8 | uVar2 >> 8); goto LAB_001aa689; default: if ((bVar1 - 0x99 < 9) && ((0x155U >> (bVar1 - 0x99 & 0x1f) & 1) != 0)) { uVar3 = (ulong)param_1[1]; goto LAB_001aa6d7; } if (bVar1 != 0) goto switchD_001aa69e_caseD_62; param_1 = (byte *)0x0; goto switchD_001aa69e_caseD_75; } uVar3 = (ulong)((uint)((byte)(bVar4 - 0xf) < 2) * 2); LAB_001aa6d7: param_1 = param_1 + (byte)_pcre2_OP_lengths_8[bVar1] + uVar3; goto LAB_001aa689; switchD_001aa69e_caseD_75: return param_1; }
20,454
llama_batch_free
llama.cpp/src/llama-batch.cpp
void llama_batch_free(struct llama_batch batch) { if (batch.token) free(batch.token); if (batch.embd) free(batch.embd); if (batch.pos) free(batch.pos); if (batch.n_seq_id) free(batch.n_seq_id); if (batch.seq_id) { for (int i = 0; batch.seq_id[i] != nullptr; ++i) { free(batch.seq_id[i]); } free(batch.seq_id); } if (batch.logits) free(batch.logits); }
O3
cpp
llama_batch_free: pushq %r15 pushq %r14 pushq %rbx leaq 0x20(%rsp), %r14 movq 0x8(%r14), %rdi testq %rdi, %rdi je 0x886eb callq 0x79780 movq 0x10(%r14), %rdi testq %rdi, %rdi je 0x886f9 callq 0x79780 movq 0x18(%r14), %rdi testq %rdi, %rdi je 0x88707 callq 0x79780 movq 0x20(%r14), %rdi testq %rdi, %rdi je 0x88715 callq 0x79780 movq 0x28(%r14), %rbx testq %rbx, %rbx je 0x88743 movq (%rbx), %rdi testq %rdi, %rdi je 0x8873b leaq 0x8(%rbx), %r15 callq 0x79780 movq (%r15), %rdi addq $0x8, %r15 testq %rdi, %rdi jne 0x8872a movq %rbx, %rdi callq 0x79780 movq 0x30(%r14), %rdi testq %rdi, %rdi je 0x88756 popq %rbx popq %r14 popq %r15 jmp 0x79780 popq %rbx popq %r14 popq %r15 retq
llama_batch_free: push r15 push r14 push rbx lea r14, [rsp+18h+arg_0] mov rdi, [r14+8] test rdi, rdi jz short loc_886EB call _free loc_886EB: mov rdi, [r14+10h] test rdi, rdi jz short loc_886F9 call _free loc_886F9: mov rdi, [r14+18h] test rdi, rdi jz short loc_88707 call _free loc_88707: mov rdi, [r14+20h] test rdi, rdi jz short loc_88715 call _free loc_88715: mov rbx, [r14+28h] test rbx, rbx jz short loc_88743 mov rdi, [rbx] test rdi, rdi jz short loc_8873B lea r15, [rbx+8] loc_8872A: call _free mov rdi, [r15] add r15, 8 test rdi, rdi jnz short loc_8872A loc_8873B: mov rdi, rbx call _free loc_88743: mov rdi, [r14+30h] test rdi, rdi jz short loc_88756 pop rbx pop r14 pop r15 jmp _free loc_88756: pop rbx pop r14 pop r15 retn
long long llama_batch_free( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, char a7, long long a8, long long a9, long long a10, long long a11, _QWORD *a12, long long a13) { long long result; // rax _QWORD *v14; // r15 if ( a8 ) result = ((long long (*)(void))free)(); if ( a9 ) result = ((long long (*)(void))free)(); if ( a10 ) result = ((long long (*)(void))free)(); if ( a11 ) result = ((long long (*)(void))free)(); if ( a12 ) { if ( *a12 ) { v14 = a12 + 1; do ((void (*)(void))free)(); while ( *v14++ ); } result = free(a12); } if ( a13 ) return free(a13); return result; }
llama_batch_free: PUSH R15 PUSH R14 PUSH RBX LEA R14,[RSP + 0x20] MOV RDI,qword ptr [R14 + 0x8] TEST RDI,RDI JZ 0x001886eb CALL 0x00179780 LAB_001886eb: MOV RDI,qword ptr [R14 + 0x10] TEST RDI,RDI JZ 0x001886f9 CALL 0x00179780 LAB_001886f9: MOV RDI,qword ptr [R14 + 0x18] TEST RDI,RDI JZ 0x00188707 CALL 0x00179780 LAB_00188707: MOV RDI,qword ptr [R14 + 0x20] TEST RDI,RDI JZ 0x00188715 CALL 0x00179780 LAB_00188715: MOV RBX,qword ptr [R14 + 0x28] TEST RBX,RBX JZ 0x00188743 MOV RDI,qword ptr [RBX] TEST RDI,RDI JZ 0x0018873b LEA R15,[RBX + 0x8] LAB_0018872a: CALL 0x00179780 MOV RDI,qword ptr [R15] ADD R15,0x8 TEST RDI,RDI JNZ 0x0018872a LAB_0018873b: MOV RDI,RBX CALL 0x00179780 LAB_00188743: MOV RDI,qword ptr [R14 + 0x30] TEST RDI,RDI JZ 0x00188756 POP RBX POP R14 POP R15 JMP 0x00179780 LAB_00188756: POP RBX POP R14 POP R15 RET
void llama_batch_free(void) { void *__ptr; int8 *puVar1; void *in_stack_00000010; void *in_stack_00000018; void *in_stack_00000020; void *in_stack_00000028; int8 *in_stack_00000030; void *in_stack_00000038; if (in_stack_00000010 != (void *)0x0) { free(in_stack_00000010); } if (in_stack_00000018 != (void *)0x0) { free(in_stack_00000018); } if (in_stack_00000020 != (void *)0x0) { free(in_stack_00000020); } if (in_stack_00000028 != (void *)0x0) { free(in_stack_00000028); } if (in_stack_00000030 != (int8 *)0x0) { __ptr = (void *)*in_stack_00000030; puVar1 = in_stack_00000030; while (__ptr != (void *)0x0) { puVar1 = puVar1 + 1; free(__ptr); __ptr = (void *)*puVar1; } free(in_stack_00000030); } if (in_stack_00000038 != (void *)0x0) { free(in_stack_00000038); return; } return; }
20,455
my_uuid2str
eloqsql/mysys/my_uuid.c
void my_uuid2str(const uchar *guid, char *s) { int i; for (i=0; i < MY_UUID_SIZE; i++) { *s++= _dig_vec_lower[guid[i] >>4]; *s++= _dig_vec_lower[guid[i] & 15]; /* Set '-' at intervals 3, 5, 7 and 9 */ if ((1 << i) & ((1 << 3) | (1 << 5) | (1 << 7) | (1 << 9))) *s++= '-'; } }
O3
c
my_uuid2str: pushq %rbp movq %rsp, %rbp xorl %eax, %eax leaq 0x2b9d39(%rip), %rcx # 0x380210 movl $0x2a8, %edx # imm = 0x2A8 movzbl (%rdi,%rax), %r8d shrl $0x4, %r8d movb (%rcx,%r8), %r8b movb %r8b, (%rsi) movzbl (%rdi,%rax), %r8d andl $0xf, %r8d movb (%rcx,%r8), %r8b movb %r8b, 0x1(%rsi) btl %eax, %edx jae 0xc650c movb $0x2d, 0x2(%rsi) addq $0x3, %rsi jmp 0xc6510 addq $0x2, %rsi incq %rax cmpq $0x10, %rax jne 0xc64dc popq %rbp retq
my_uuid2str: push rbp mov rbp, rsp xor eax, eax lea rcx, _dig_vec_lower; "0123456789abcdefghijklmnopqrstuvwxyz" mov edx, 2A8h loc_C64DC: movzx r8d, byte ptr [rdi+rax] shr r8d, 4 mov r8b, [rcx+r8] mov [rsi], r8b movzx r8d, byte ptr [rdi+rax] and r8d, 0Fh mov r8b, [rcx+r8] mov [rsi+1], r8b bt edx, eax jnb short loc_C650C mov byte ptr [rsi+2], 2Dh ; '-' add rsi, 3 jmp short loc_C6510 loc_C650C: add rsi, 2 loc_C6510: inc rax cmp rax, 10h jnz short loc_C64DC pop rbp retn
long long my_uuid2str(long long a1, _BYTE *a2) { long long result; // rax int v3; // edx result = 0LL; v3 = 680; do { *a2 = dig_vec_lower[*(unsigned __int8 *)(a1 + result) >> 4]; a2[1] = dig_vec_lower[*(_BYTE *)(a1 + result) & 0xF]; if ( _bittest(&v3, result) ) { a2[2] = 45; a2 += 3; } else { a2 += 2; } ++result; } while ( result != 16 ); return result; }
my_uuid2str: PUSH RBP MOV RBP,RSP XOR EAX,EAX LEA RCX,[0x480210] MOV EDX,0x2a8 LAB_001c64dc: MOVZX R8D,byte ptr [RDI + RAX*0x1] SHR R8D,0x4 MOV R8B,byte ptr [RCX + R8*0x1] MOV byte ptr [RSI],R8B MOVZX R8D,byte ptr [RDI + RAX*0x1] AND R8D,0xf MOV R8B,byte ptr [RCX + R8*0x1] MOV byte ptr [RSI + 0x1],R8B BT EDX,EAX JNC 0x001c650c MOV byte ptr [RSI + 0x2],0x2d ADD RSI,0x3 JMP 0x001c6510 LAB_001c650c: ADD RSI,0x2 LAB_001c6510: INC RAX CMP RAX,0x10 JNZ 0x001c64dc POP RBP RET
void my_uuid2str(long param_1,char *param_2) { long lVar1; lVar1 = 0; do { *param_2 = "0123456789abcdefghijklmnopqrstuvwxyz"[*(byte *)(param_1 + lVar1) >> 4]; param_2[1] = "0123456789abcdefghijklmnopqrstuvwxyz"[*(byte *)(param_1 + lVar1) & 0xf]; if ((0x2a8U >> ((uint)lVar1 & 0x1f) & 1) == 0) { param_2 = param_2 + 2; } else { param_2[2] = '-'; param_2 = param_2 + 3; } lVar1 = lVar1 + 1; } while (lVar1 != 0x10); return; }
20,456
my_strnxfrm_unicode_full_nopad_bin
eloqsql/strings/ctype-utf8.c
size_t my_strnxfrm_unicode_full_nopad_bin(CHARSET_INFO *cs, uchar *dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags) { uchar *dst0= dst; uchar *de= dst + dstlen; dst+= my_strnxfrm_unicode_full_bin_internal(cs, dst, de, &nweights, src, src + srclen); DBUG_ASSERT(dst <= de); /* Safety */ if (dst < de && nweights && (flags & MY_STRXFRM_PAD_WITH_SPACE)) { size_t len= de - dst; set_if_smaller(len, nweights * 3); memset(dst, 0x00, len); dst+= len; } my_strxfrm_desc_and_reverse(dst0, dst, flags, 0); if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && dst < de) { memset(dst, 0x00, de - dst); dst= de; } return dst - dst0; }
O0
c
my_strnxfrm_unicode_full_nopad_bin: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movl 0x10(%rbp), %eax movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x40(%rbp), %rdx movq -0x28(%rbp), %r8 movq -0x28(%rbp), %r9 addq -0x30(%rbp), %r9 leaq -0x1c(%rbp), %rcx callq 0x719d0 addq -0x10(%rbp), %rax movq %rax, -0x10(%rbp) jmp 0x71cf1 movq -0x10(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0x71d51 cmpl $0x0, -0x1c(%rbp) je 0x71d51 movl 0x10(%rbp), %eax andl $0x40, %eax cmpl $0x0, %eax je 0x71d51 movq -0x40(%rbp), %rax movq -0x10(%rbp), %rcx subq %rcx, %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax imull $0x3, -0x1c(%rbp), %ecx movl %ecx, %ecx cmpq %rcx, %rax jbe 0x71d34 imull $0x3, -0x1c(%rbp), %eax movl %eax, %eax movq %rax, -0x48(%rbp) jmp 0x71d36 movq -0x10(%rbp), %rdi movq -0x48(%rbp), %rdx xorl %esi, %esi callq 0x24190 movq -0x48(%rbp), %rax addq -0x10(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x38(%rbp), %rdi movq -0x10(%rbp), %rsi movl 0x10(%rbp), %edx xorl %ecx, %ecx callq 0x52ed0 movl 0x10(%rbp), %eax andl $0x80, %eax cmpl $0x0, %eax je 0x71d98 movq -0x10(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0x71d98 movq -0x10(%rbp), %rdi movq -0x40(%rbp), %rdx movq -0x10(%rbp), %rax subq %rax, %rdx xorl %esi, %esi callq 0x24190 movq -0x40(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq -0x38(%rbp), %rcx subq %rcx, %rax addq $0x50, %rsp popq %rbp retq nopl (%rax)
my_strnxfrm_unicode_full_nopad_bin: push rbp mov rbp, rsp sub rsp, 50h mov eax, [rbp+arg_0] mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx mov [rbp+var_28], r8 mov [rbp+var_30], r9 mov rax, [rbp+var_10] mov [rbp+var_38], rax mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_40], rax mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_40] mov r8, [rbp+var_28] mov r9, [rbp+var_28] add r9, [rbp+var_30] lea rcx, [rbp+var_1C] call my_strnxfrm_unicode_full_bin_internal add rax, [rbp+var_10] mov [rbp+var_10], rax jmp short $+2 loc_71CF1: mov rax, [rbp+var_10] cmp rax, [rbp+var_40] jnb short loc_71D51 cmp [rbp+var_1C], 0 jz short loc_71D51 mov eax, [rbp+arg_0] and eax, 40h cmp eax, 0 jz short loc_71D51 mov rax, [rbp+var_40] mov rcx, [rbp+var_10] sub rax, rcx mov [rbp+var_48], rax mov rax, [rbp+var_48] imul ecx, [rbp+var_1C], 3 mov ecx, ecx cmp rax, rcx jbe short loc_71D34 imul eax, [rbp+var_1C], 3 mov eax, eax mov [rbp+var_48], rax loc_71D34: jmp short $+2 loc_71D36: mov rdi, [rbp+var_10] mov rdx, [rbp+var_48] xor esi, esi call _memset mov rax, [rbp+var_48] add rax, [rbp+var_10] mov [rbp+var_10], rax loc_71D51: mov rdi, [rbp+var_38] mov rsi, [rbp+var_10] mov edx, [rbp+arg_0] xor ecx, ecx call my_strxfrm_desc_and_reverse mov eax, [rbp+arg_0] and eax, 80h cmp eax, 0 jz short loc_71D98 mov rax, [rbp+var_10] cmp rax, [rbp+var_40] jnb short loc_71D98 mov rdi, [rbp+var_10] mov rdx, [rbp+var_40] mov rax, [rbp+var_10] sub rdx, rax xor esi, esi call _memset mov rax, [rbp+var_40] mov [rbp+var_10], rax loc_71D98: mov rax, [rbp+var_10] mov rcx, [rbp+var_38] sub rax, rcx add rsp, 50h pop rbp retn
signed long long my_strnxfrm_unicode_full_nopad_bin( long long a1, char *a2, long long a3, int a4, long long a5, long long a6, unsigned int a7) { _BYTE *v7; // rax unsigned long long v9; // [rsp+8h] [rbp-48h] unsigned long long v10; // [rsp+10h] [rbp-40h] int v11; // [rsp+34h] [rbp-1Ch] BYREF long long v12; // [rsp+38h] [rbp-18h] char *v13; // [rsp+40h] [rbp-10h] long long v14; // [rsp+48h] [rbp-8h] v14 = a1; v13 = a2; v12 = a3; v11 = a4; v10 = (unsigned long long)&a2[a3]; v7 = my_strnxfrm_unicode_full_bin_internal(a1, a2, (unsigned long long)&a2[a3], &v11, a5, a6 + a5); v13 = &v7[(_QWORD)v13]; if ( (unsigned long long)v13 < v10 && v11 && (a7 & 0x40) != 0 ) { v9 = v10 - (_QWORD)v13; if ( v10 - (unsigned long long)v13 > (unsigned int)(3 * v11) ) v9 = (unsigned int)(3 * v11); memset(v13, 0LL, v9); v13 += v9; } my_strxfrm_desc_and_reverse(a2, (unsigned long long)v13, a7, 0); if ( (a7 & 0x80) != 0 && (unsigned long long)v13 < v10 ) { memset(v13, 0LL, v10 - (_QWORD)v13); v13 = (char *)v10; } return v13 - a2; }
my_strnxfrm_unicode_full_nopad_bin: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV EAX,dword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],ECX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x40] MOV R8,qword ptr [RBP + -0x28] MOV R9,qword ptr [RBP + -0x28] ADD R9,qword ptr [RBP + -0x30] LEA RCX,[RBP + -0x1c] CALL 0x001719d0 ADD RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x10],RAX JMP 0x00171cf1 LAB_00171cf1: MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x40] JNC 0x00171d51 CMP dword ptr [RBP + -0x1c],0x0 JZ 0x00171d51 MOV EAX,dword ptr [RBP + 0x10] AND EAX,0x40 CMP EAX,0x0 JZ 0x00171d51 MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x10] SUB RAX,RCX MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x48] IMUL ECX,dword ptr [RBP + -0x1c],0x3 MOV ECX,ECX CMP RAX,RCX JBE 0x00171d34 IMUL EAX,dword ptr [RBP + -0x1c],0x3 MOV EAX,EAX MOV qword ptr [RBP + -0x48],RAX LAB_00171d34: JMP 0x00171d36 LAB_00171d36: MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x48] XOR ESI,ESI CALL 0x00124190 MOV RAX,qword ptr [RBP + -0x48] ADD RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x10],RAX LAB_00171d51: MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + 0x10] XOR ECX,ECX CALL 0x00152ed0 MOV EAX,dword ptr [RBP + 0x10] AND EAX,0x80 CMP EAX,0x0 JZ 0x00171d98 MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x40] JNC 0x00171d98 MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x10] SUB RDX,RAX XOR ESI,ESI CALL 0x00124190 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x10],RAX LAB_00171d98: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x38] SUB RAX,RCX ADD RSP,0x50 POP RBP RET
long my_strnxfrm_unicode_full_nopad_bin (int8 param_1,long param_2,long param_3,int param_4,long param_5,long param_6, uint param_7) { void *pvVar1; long lVar2; size_t local_50; int local_24; long local_20; void *local_18; int8 local_10; pvVar1 = (void *)(param_2 + param_3); local_24 = param_4; local_20 = param_3; local_18 = (void *)param_2; local_10 = param_1; lVar2 = my_strnxfrm_unicode_full_bin_internal (param_1,param_2,pvVar1,&local_24,param_5,param_5 + param_6); local_18 = (void *)(lVar2 + (long)local_18); if (((local_18 < pvVar1) && (local_24 != 0)) && ((param_7 & 0x40) != 0)) { local_50 = (long)pvVar1 - (long)local_18; if ((uint)(local_24 * 3) < local_50) { local_50 = (size_t)(uint)(local_24 * 3); } memset(local_18,0,local_50); local_18 = (void *)(local_50 + (long)local_18); } my_strxfrm_desc_and_reverse(param_2,local_18,param_7,0); if (((param_7 & 0x80) != 0) && (local_18 < pvVar1)) { memset(local_18,0,(long)pvVar1 - (long)local_18); local_18 = pvVar1; } return (long)local_18 - param_2; }
20,457
yoyo::Logger::createlogDir()
isyoCode[P]yoyologger/test/../src/logger.hpp
void createlogDir() { std::string logdir = getLogDirName(); std::filesystem::path dir(logdir); if (!std::filesystem::exists(dir)) { std::filesystem::create_directories(dir); } }
O1
cpp
yoyo::Logger::createlogDir(): pushq %rbx subq $0x50, %rsp movq %rdi, %rsi leaq 0x8(%rsp), %rbx movq %rbx, %rdi callq 0x50b2 leaq 0x28(%rsp), %rdi movq %rbx, %rsi movl $0x2, %edx callq 0x516e leaq 0x28(%rsp), %rdi callq 0x30b0 cmpb $-0x1, %al je 0x4882 movzbl %al, %eax testl %eax, %eax jne 0x488c leaq 0x28(%rsp), %rdi callq 0x3180 leaq 0x28(%rsp), %rdi callq 0x51ee leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x48b1 movq 0x18(%rsp), %rsi incq %rsi callq 0x3290 addq $0x50, %rsp popq %rbx retq movq %rax, %rbx jmp 0x48c9 movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x51ee leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x48e4 movq 0x18(%rsp), %rsi incq %rsi callq 0x3290 movq %rbx, %rdi callq 0x33a0
_ZN4yoyo6Logger12createlogDirEv: push rbx sub rsp, 50h mov rsi, rdi lea rbx, [rsp+58h+var_50] mov rdi, rbx call _ZNK4yoyo6Logger13getLogDirNameB5cxx11Ev; yoyo::Logger::getLogDirName(void) lea rdi, [rsp+58h+var_30]; this mov rsi, rbx; std::filesystem::__cxx11::path * mov edx, 2 call _ZNSt10filesystem7__cxx114pathC2INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES1_EERKT_NS1_6formatE; std::filesystem::__cxx11::path::path<std::string,std::filesystem::__cxx11::path>(std::string const&,std::filesystem::__cxx11::path::format) lea rdi, [rsp+58h+var_30]; this call __ZNSt10filesystem6statusERKNS_7__cxx114pathE; std::filesystem::status(std::filesystem::__cxx11::path const&) cmp al, 0FFh jz short loc_4882 movzx eax, al test eax, eax jnz short loc_488C loc_4882: lea rdi, [rsp+58h+var_30]; this call __ZNSt10filesystem18create_directoriesERKNS_7__cxx114pathE; std::filesystem::create_directories(std::filesystem::__cxx11::path const&) loc_488C: lea rdi, [rsp+58h+var_30]; this call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path() lea rax, [rsp+58h+var_40] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_48B1 mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_48B1: add rsp, 50h pop rbx retn mov rbx, rax jmp short loc_48C9 mov rbx, rax lea rdi, [rsp+arg_20]; this call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path() loc_48C9: lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_48E4 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_48E4: mov rdi, rbx call __Unwind_Resume
void yoyo::Logger::createlogDir(yoyo::Logger *this, long long a2, int a3, int a4, int a5, int a6) { char v6; // al void *v7[2]; // [rsp+8h] [rbp-50h] BYREF long long v8; // [rsp+18h] [rbp-40h] BYREF _BYTE v9[48]; // [rsp+28h] [rbp-30h] BYREF yoyo::Logger::getLogDirName[abi:cxx11]((unsigned int)v7, (_DWORD)this, a3, a4, a5, a6); std::filesystem::__cxx11::path::path<std::string,std::filesystem::__cxx11::path>((std::filesystem::__cxx11::path *)v9); v6 = std::filesystem::status((std::filesystem *)v9, (const std::filesystem::__cxx11::path *)v7); if ( v6 == -1 || !v6 ) std::filesystem::create_directories((std::filesystem *)v9, (const std::filesystem::__cxx11::path *)v7); std::filesystem::__cxx11::path::~path((std::filesystem::__cxx11::path *)v9); if ( v7[0] != &v8 ) operator delete(v7[0], v8 + 1); }
createlogDir: PUSH RBX SUB RSP,0x50 MOV RSI,RDI LEA RBX,[RSP + 0x8] MOV RDI,RBX CALL 0x001050b2 LAB_0010485b: LEA RDI,[RSP + 0x28] MOV RSI,RBX MOV EDX,0x2 CALL 0x0010516e LAB_0010486d: LEA RDI,[RSP + 0x28] CALL 0x001030b0 CMP AL,0xff JZ 0x00104882 MOVZX EAX,AL TEST EAX,EAX JNZ 0x0010488c LAB_00104882: LEA RDI,[RSP + 0x28] CALL 0x00103180 LAB_0010488c: LEA RDI,[RSP + 0x28] CALL 0x001051ee LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001048b1 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00103290 LAB_001048b1: ADD RSP,0x50 POP RBX RET
/* yoyo::Logger::createlogDir() */ void yoyo::Logger::createlogDir(void) { char cVar1; long *local_50 [2]; long local_40 [2]; path local_30 [40]; getLogDirName_abi_cxx11_(); /* try { // try from 0010485b to 0010486c has its CatchHandler @ 001048b7 */ std::filesystem::__cxx11::path::path<std::__cxx11::string,std::filesystem::__cxx11::path> (local_30,local_50,2); /* try { // try from 0010486d to 0010488b has its CatchHandler @ 001048bc */ cVar1 = std::filesystem::status(local_30); if ((cVar1 == -1) || (cVar1 == '\0')) { std::filesystem::create_directories(local_30); } std::filesystem::__cxx11::path::~path(local_30); if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } return; }
20,458
js_regexp_constructor
bluesky950520[P]quickjs/quickjs.c
static JSValue js_regexp_constructor(JSContext *ctx, JSValue new_target, int argc, JSValue *argv) { JSValue pattern, flags, bc, val; JSValue pat, flags1; JSRegExp *re; int pat_is_regexp; pat = argv[0]; flags1 = argv[1]; pat_is_regexp = js_is_regexp(ctx, pat); if (pat_is_regexp < 0) return JS_EXCEPTION; if (JS_IsUndefined(new_target)) { /* called as a function */ new_target = JS_GetActiveFunction(ctx); if (pat_is_regexp && JS_IsUndefined(flags1)) { JSValue ctor; BOOL res; ctor = JS_GetProperty(ctx, pat, JS_ATOM_constructor); if (JS_IsException(ctor)) return ctor; res = js_same_value(ctx, ctor, new_target); JS_FreeValue(ctx, ctor); if (res) return js_dup(pat); } } re = js_get_regexp(ctx, pat, FALSE); if (re) { pattern = js_dup(JS_MKPTR(JS_TAG_STRING, re->pattern)); if (JS_IsUndefined(flags1)) { bc = js_dup(JS_MKPTR(JS_TAG_STRING, re->bytecode)); goto no_compilation; } else { flags = JS_ToString(ctx, flags1); if (JS_IsException(flags)) goto fail; } } else { flags = JS_UNDEFINED; if (pat_is_regexp) { pattern = JS_GetProperty(ctx, pat, JS_ATOM_source); if (JS_IsException(pattern)) goto fail; if (JS_IsUndefined(flags1)) { flags = JS_GetProperty(ctx, pat, JS_ATOM_flags); if (JS_IsException(flags)) goto fail; } else { flags = js_dup(flags1); } } else { pattern = js_dup(pat); flags = js_dup(flags1); } if (JS_IsUndefined(pattern)) { pattern = JS_AtomToString(ctx, JS_ATOM_empty_string); } else { val = pattern; pattern = JS_ToString(ctx, val); JS_FreeValue(ctx, val); if (JS_IsException(pattern)) goto fail; } } bc = js_compile_regexp(ctx, pattern, flags); if (JS_IsException(bc)) goto fail; JS_FreeValue(ctx, flags); no_compilation: return js_regexp_constructor_internal(ctx, new_target, pattern, bc); fail: JS_FreeValue(ctx, pattern); JS_FreeValue(ctx, flags); return JS_EXCEPTION; }
O1
c
js_regexp_constructor: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdx, %r13 movq %rsi, %rbx movq (%r8), %r15 movq 0x8(%r8), %r12 movq 0x10(%r8), %rax movq %rax, 0x20(%rsp) movq 0x18(%r8), %rax movq %rax, 0x8(%rsp) movq %rdi, 0x40(%rsp) movq %r15, %rsi movq %r12, %rdx callq 0x4c627 movl $0x6, %ebp testl %eax, %eax js 0x338c5 movl %eax, %r14d movq %rbx, 0x28(%rsp) movq %r13, 0x30(%rsp) cmpl $0x3, %r13d jne 0x33931 movq 0x40(%rsp), %rbx movq 0x18(%rbx), %rax movq 0x108(%rax), %rax movq 0x8(%rax), %rcx movq %rcx, 0x28(%rsp) movq 0x10(%rax), %rax movq %rax, 0x30(%rsp) testl %r14d, %r14d setne %al cmpl $0x3, 0x8(%rsp) sete %cl andb %al, %cl cmpb $0x1, %cl jne 0x338cd movq %rbx, %rdi movq %r15, %rsi movq %r12, %rdx movl $0x3d, %ecx movq %r15, %r8 movq %r12, %r9 pushq $0x0 pushq $0x0 callq 0x22fa3 addq $0x10, %rsp movq %rax, %r13 movq %rdx, %rbp cmpl $0x6, %ebp jne 0x338cf movq %r13, %rbx shrq $0x20, %rbx xorl %eax, %eax jmp 0x33929 xorl %r13d, %r13d jmp 0x33b6b jmp 0x33931 movq %rbx, %rdi movq %r13, %rsi movq %rbp, %rdx movq 0x28(%rsp), %rcx movq 0x30(%rsp), %r8 callq 0x26461 movl %eax, 0x3c(%rsp) movq 0x18(%rbx), %rdi movq %r13, %rsi movq %rbp, %rdx callq 0x1d8c6 cmpl $0x0, 0x3c(%rsp) je 0x33924 movq %r15, 0x10(%rsp) cmpl $-0x9, %r12d jb 0x33913 movq 0x10(%rsp), %rax incl (%rax) movq %r15, %rbx shrq $0x20, %rbx xorl %eax, %eax movq %r15, %r13 movq %r12, %rbp jmp 0x33929 movb $0x1, %al xorl %r13d, %r13d testb %al, %al je 0x33b6b movq %r15, 0x10(%rsp) cmpl $-0x1, %r12d jne 0x3394e movq 0x10(%rsp), %rax cmpw $0x12, 0x6(%rax) jne 0x3394e addq $0x30, %rax jmp 0x33950 xorl %eax, %eax testq %rax, %rax movq 0x40(%rsp), %rbp je 0x3398b movq (%rax), %r13 incl (%r13) movq 0x8(%rsp), %rdx cmpl $0x3, %edx jne 0x339cf movq 0x8(%rax), %rax incl (%rax) movq %rax, 0x10(%rsp) movq $-0x7, 0x18(%rsp) movq $-0x7, %r14 jmp 0x33b35 testl %r14d, %r14d je 0x339fa movq %rbp, %rdi movq %r15, %rsi movq %r12, %rdx movl $0x6d, %ecx movq %r15, %r8 movq %r12, %r9 pushq $0x0 pushq $0x0 callq 0x22fa3 addq $0x10, %rsp movq %rax, %r13 movq %rdx, %r14 cmpl $0x6, %r14d jne 0x33a59 movl $0x3, %r15d xorl %r12d, %r12d jmp 0x33afe movq %rbp, %rdi movq 0x20(%rsp), %rsi xorl %ecx, %ecx callq 0x27add movq %rax, %r12 movq %rdx, %r15 movq $-0x7, %r14 cmpl $0x6, %r15d jne 0x33adb jmp 0x33afe movq %r15, 0x10(%rsp) cmpl $-0x9, %r12d jb 0x33a0c movq 0x10(%rsp), %rax incl (%rax) movq 0x20(%rsp), %rax movq %rax, 0x10(%rsp) cmpl $-0x9, 0x8(%rsp) jb 0x33a24 movq 0x10(%rsp), %rax incl (%rax) movq %r15, %r13 movq %r12, %r14 movq 0x8(%rsp), %r15 movq 0x20(%rsp), %r12 cmpl $0x3, %r14d jne 0x33a96 movq 0x18(%rbp), %rax movq 0x68(%rax), %rax movq 0x178(%rax), %r13 incl (%r13) movq $-0x7, %r14 jmp 0x33adb movq 0x8(%rsp), %rax cmpl $0x3, %eax jne 0x33b87 movq %rbp, %rdi movq %r15, %rsi movq %r12, %rdx movl $0x6e, %ecx movq %r15, %r8 movq %r12, %r9 pushq $0x0 pushq $0x0 callq 0x22fa3 addq $0x10, %rsp movq %rax, %r12 movq %rdx, %r15 cmpl $0x6, %r15d jne 0x33a34 jmp 0x33afe movq %rbp, %rdi movq %r13, %rsi movq %r14, %rdx xorl %ecx, %ecx callq 0x27add movq %r15, 0x8(%rsp) movq %rax, %r15 movq %r12, 0x20(%rsp) movq %rdx, %r12 movq 0x18(%rbp), %rdi movq %r13, %rsi movq %r14, %rdx callq 0x1d8c6 movq %r15, %r13 movq 0x8(%rsp), %r15 movq %r12, %r14 cmpl $0x6, %r12d movq 0x20(%rsp), %r12 je 0x33afe movq %rbp, %rdi movq %r13, %rsi movq %r14, %rdx movq %r12, %rcx movq %r15, %r8 callq 0x33562 movq %rax, 0x10(%rsp) movq %rdx, 0x18(%rsp) cmpl $0x6, %edx jne 0x33b26 movq 0x18(%rbp), %rdi movq %r13, %rsi movq %r14, %rdx callq 0x1d8c6 movq 0x18(%rbp), %rdi movq %r12, %rsi movq %r15, %rdx callq 0x1d8c6 xorl %r13d, %r13d movl $0x6, %ebp jmp 0x33b6b movq 0x18(%rbp), %rdi movq %r12, %rsi movq %r15, %rdx callq 0x1d8c6 subq $0x10, %rsp movups 0x20(%rsp), %xmm0 movups %xmm0, (%rsp) movq %rbp, %rdi movq 0x38(%rsp), %rsi movq 0x40(%rsp), %rdx movq %r13, %rcx movq %r14, %r8 callq 0x3f71a addq $0x10, %rsp movq %rax, %r13 movq %rdx, %rbp movq %rax, %rbx shrq $0x20, %rbx shlq $0x20, %rbx movl %r13d, %eax orq %rbx, %rax movq %rbp, %rdx addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x20(%rsp), %r12 movq %r12, 0x10(%rsp) cmpl $-0x9, %eax movq %rax, %r15 jb 0x33a34 movq 0x10(%rsp), %rax incl (%rax) jmp 0x33a34
js_regexp_constructor: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r13, rdx mov rbx, rsi mov r15, [r8] mov r12, [r8+8] mov rax, [r8+10h] mov [rsp+78h+var_58], rax mov rax, [r8+18h] mov [rsp+78h+var_70], rax mov [rsp+78h+var_38], rdi mov rsi, r15 mov rdx, r12 call js_is_regexp mov ebp, 6 test eax, eax js loc_338C5 mov r14d, eax mov [rsp+78h+var_50], rbx mov [rsp+78h+var_48], r13 cmp r13d, 3 jnz loc_33931 mov rbx, [rsp+78h+var_38] mov rax, [rbx+18h] mov rax, [rax+108h] mov rcx, [rax+8] mov [rsp+78h+var_50], rcx mov rax, [rax+10h] mov [rsp+78h+var_48], rax test r14d, r14d setnz al cmp dword ptr [rsp+78h+var_70], 3 setz cl and cl, al cmp cl, 1 jnz short loc_338CD mov rdi, rbx mov rsi, r15 mov rdx, r12 mov ecx, 3Dh ; '=' mov r8, r15 mov r9, r12 push 0 push 0 call JS_GetPropertyInternal2 add rsp, 10h mov r13, rax mov rbp, rdx cmp ebp, 6 jnz short loc_338CF mov rbx, r13 shr rbx, 20h xor eax, eax jmp short loc_33929 loc_338C5: xor r13d, r13d jmp loc_33B6B loc_338CD: jmp short loc_33931 loc_338CF: mov rdi, rbx mov rsi, r13 mov rdx, rbp mov rcx, [rsp+78h+var_50] mov r8, [rsp+78h+var_48] call js_same_value mov [rsp+78h+var_3C], eax mov rdi, [rbx+18h] mov rsi, r13 mov rdx, rbp call JS_FreeValueRT cmp [rsp+78h+var_3C], 0 jz short loc_33924 mov qword ptr [rsp+78h+var_68], r15 cmp r12d, 0FFFFFFF7h jb short loc_33913 mov rax, qword ptr [rsp+78h+var_68] inc dword ptr [rax] loc_33913: mov rbx, r15 shr rbx, 20h xor eax, eax mov r13, r15 mov rbp, r12 jmp short loc_33929 loc_33924: mov al, 1 xor r13d, r13d loc_33929: test al, al jz loc_33B6B loc_33931: mov qword ptr [rsp+78h+var_68], r15 cmp r12d, 0FFFFFFFFh jnz short loc_3394E mov rax, qword ptr [rsp+78h+var_68] cmp word ptr [rax+6], 12h jnz short loc_3394E add rax, 30h ; '0' jmp short loc_33950 loc_3394E: xor eax, eax loc_33950: test rax, rax mov rbp, [rsp+78h+var_38] jz short loc_3398B mov r13, [rax] inc dword ptr [r13+0] mov rdx, [rsp+78h+var_70] cmp edx, 3 jnz short loc_339CF mov rax, [rax+8] inc dword ptr [rax] mov qword ptr [rsp+78h+var_68], rax mov qword ptr [rsp+78h+var_68+8], 0FFFFFFFFFFFFFFF9h mov r14, 0FFFFFFFFFFFFFFF9h jmp loc_33B35 loc_3398B: test r14d, r14d jz short loc_339FA mov rdi, rbp mov rsi, r15 mov rdx, r12 mov ecx, 6Dh ; 'm' mov r8, r15 mov r9, r12 push 0 push 0 call JS_GetPropertyInternal2 add rsp, 10h mov r13, rax mov r14, rdx cmp r14d, 6 jnz loc_33A59 mov r15d, 3 xor r12d, r12d jmp loc_33AFE loc_339CF: mov rdi, rbp mov rsi, [rsp+78h+var_58] xor ecx, ecx call JS_ToStringInternal mov r12, rax mov r15, rdx mov r14, 0FFFFFFFFFFFFFFF9h cmp r15d, 6 jnz loc_33ADB jmp loc_33AFE loc_339FA: mov qword ptr [rsp+78h+var_68], r15 cmp r12d, 0FFFFFFF7h jb short loc_33A0C mov rax, qword ptr [rsp+78h+var_68] inc dword ptr [rax] loc_33A0C: mov rax, [rsp+78h+var_58] mov qword ptr [rsp+78h+var_68], rax cmp dword ptr [rsp+78h+var_70], 0FFFFFFF7h jb short loc_33A24 mov rax, qword ptr [rsp+78h+var_68] inc dword ptr [rax] loc_33A24: mov r13, r15 mov r14, r12 mov r15, [rsp+78h+var_70] mov r12, [rsp+78h+var_58] loc_33A34: cmp r14d, 3 jnz short loc_33A96 mov rax, [rbp+18h] mov rax, [rax+68h] mov r13, [rax+178h] inc dword ptr [r13+0] mov r14, 0FFFFFFFFFFFFFFF9h jmp loc_33ADB loc_33A59: mov rax, [rsp+78h+var_70] cmp eax, 3 jnz loc_33B87 mov rdi, rbp mov rsi, r15 mov rdx, r12 mov ecx, 6Eh ; 'n' mov r8, r15 mov r9, r12 push 0 push 0 call JS_GetPropertyInternal2 add rsp, 10h mov r12, rax mov r15, rdx cmp r15d, 6 jnz short loc_33A34 jmp short loc_33AFE loc_33A96: mov rdi, rbp mov rsi, r13 mov rdx, r14 xor ecx, ecx call JS_ToStringInternal mov [rsp+78h+var_70], r15 mov r15, rax mov [rsp+78h+var_58], r12 mov r12, rdx mov rdi, [rbp+18h] mov rsi, r13 mov rdx, r14 call JS_FreeValueRT mov r13, r15 mov r15, [rsp+78h+var_70] mov r14, r12 cmp r12d, 6 mov r12, [rsp+78h+var_58] jz short loc_33AFE loc_33ADB: mov rdi, rbp mov rsi, r13 mov rdx, r14 mov rcx, r12 mov r8, r15 call js_compile_regexp mov qword ptr [rsp+78h+var_68], rax mov qword ptr [rsp+78h+var_68+8], rdx cmp edx, 6 jnz short loc_33B26 loc_33AFE: mov rdi, [rbp+18h] mov rsi, r13 mov rdx, r14 call JS_FreeValueRT mov rdi, [rbp+18h] mov rsi, r12 mov rdx, r15 call JS_FreeValueRT xor r13d, r13d mov ebp, 6 jmp short loc_33B6B loc_33B26: mov rdi, [rbp+18h] mov rsi, r12 mov rdx, r15 call JS_FreeValueRT loc_33B35: sub rsp, 10h movups xmm0, [rsp+88h+var_68] movups [rsp+88h+var_88], xmm0 mov rdi, rbp mov rsi, [rsp+88h+var_50] mov rdx, [rsp+88h+var_48] mov rcx, r13 mov r8, r14 call js_regexp_constructor_internal add rsp, 10h mov r13, rax mov rbp, rdx mov rbx, rax shr rbx, 20h loc_33B6B: shl rbx, 20h mov eax, r13d or rax, rbx mov rdx, rbp add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_33B87: mov r12, [rsp+78h+var_58] mov qword ptr [rsp+78h+var_68], r12 cmp eax, 0FFFFFFF7h mov r15, rax jb loc_33A34 mov rax, qword ptr [rsp+78h+var_68] inc dword ptr [rax] jmp loc_33A34
unsigned long long js_regexp_constructor( long long a1, unsigned long long a2, int a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11, long long a12, unsigned long long *a13) { unsigned long long v14; // rbx unsigned long long v15; // r15 long long v16; // r12 int is_regexp; // eax long long v18; // r8 long long v19; // r9 __m128 v20; // xmm4 __m128 v21; // xmm5 int v22; // r14d long long v23; // rax unsigned long long PropertyInternal2; // rax long long v25; // rdx _DWORD *v26; // r13 long long v27; // rbp char v28; // al unsigned long long v29; // rax _DWORD *v30; // rax long long v31; // r14 long long v32; // rdx long long v33; // r15 _DWORD *v34; // r12 long long v35; // rdx long long v36; // rdx unsigned long long v37; // r15 long long v38; // rdx long long v39; // r12 bool v40; // zf __int128 v41; // rax unsigned long long v42; // rax long long v44; // [rsp+18h] [rbp-70h] long long v45; // [rsp+18h] [rbp-70h] __int128 v46; // [rsp+20h] [rbp-68h] _DWORD *v47; // [rsp+30h] [rbp-58h] _DWORD *v48; // [rsp+30h] [rbp-58h] _DWORD *v49; // [rsp+38h] [rbp-50h] long long v50; // [rsp+40h] [rbp-48h] int v51; // [rsp+4Ch] [rbp-3Ch] v14 = a2; v15 = *a13; v16 = a13[1]; v47 = (_DWORD *)a13[2]; v44 = a13[3]; is_regexp = js_is_regexp(a1, *a13, v16); if ( is_regexp < 0 ) { LODWORD(v26) = 0; } else { v22 = is_regexp; LODWORD(v49) = a2; LODWORD(v50) = a3; if ( a3 != 3 ) goto LABEL_15; v14 = a1; v23 = *(_QWORD *)(*(_QWORD *)(a1 + 24) + 264LL); v49 = *(_DWORD **)(v23 + 8); v50 = *(_QWORD *)(v23 + 16); if ( v22 == 0 || (_DWORD)v44 != 3 ) goto LABEL_15; PropertyInternal2 = JS_GetPropertyInternal2(a1, v15, v16, 0x3Du, v15, v16, 0LL, 0); v26 = (_DWORD *)PropertyInternal2; v27 = v25; if ( (_DWORD)v25 == 6 ) { v14 = HIDWORD(PropertyInternal2); v28 = 0; } else { v51 = js_same_value(a1, (_DWORD *)PropertyInternal2, v25, v49, v50); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v26, v27); if ( v51 ) { if ( (unsigned int)v16 >= 0xFFFFFFF7 ) ++*(_DWORD *)v15; v14 = HIDWORD(v15); v28 = 0; LODWORD(v26) = v15; } else { v28 = 1; LODWORD(v26) = 0; } } if ( v28 ) { LABEL_15: if ( (_DWORD)v16 == -1 && *(_WORD *)(v15 + 6) == 18 ) v29 = v15 + 48; else v29 = 0LL; if ( v29 ) { v26 = *(_DWORD **)v29; ++**(_DWORD **)v29; if ( (_DWORD)v44 == 3 ) { v30 = *(_DWORD **)(v29 + 8); ++*v30; *(_QWORD *)&v46 = v30; *((_QWORD *)&v46 + 1) = -7LL; LODWORD(v31) = -7; LABEL_40: v42 = js_regexp_constructor_internal(a1, (_DWORD)v49, v50, (_DWORD)v26, v31, v19, v46); LODWORD(v26) = v42; v14 = HIDWORD(v42); return (v14 << 32) | (unsigned int)v26; } v34 = (_DWORD *)JS_ToStringInternal(a1, (long long)v47, v44, 0, v18, v19, a4, a5, a6, a7, v20, v21, a10, a11); v33 = v35; v31 = -7LL; if ( (_DWORD)v35 == 6 ) goto LABEL_38; goto LABEL_37; } if ( v22 ) { v26 = (_DWORD *)JS_GetPropertyInternal2(a1, v15, v16, 0x6Du, v15, v16, 0LL, 0); v31 = v32; if ( (_DWORD)v32 == 6 ) { v33 = 3LL; v34 = 0LL; LABEL_38: JS_FreeValueRT(*(_QWORD *)(a1 + 24), v26, v31); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v34, v33); LODWORD(v26) = 0; return (v14 << 32) | (unsigned int)v26; } if ( (_DWORD)v44 == 3 ) { v34 = (_DWORD *)JS_GetPropertyInternal2(a1, v15, v16, 0x6Eu, v15, v16, 0LL, 0); v33 = v36; if ( (_DWORD)v36 == 6 ) goto LABEL_38; } else { v34 = v47; v33 = v44; if ( (unsigned int)v44 >= 0xFFFFFFF7 ) ++*v47; } } else { if ( (unsigned int)v16 >= 0xFFFFFFF7 ) ++*(_DWORD *)v15; if ( (unsigned int)v44 >= 0xFFFFFFF7 ) ++*v47; v26 = (_DWORD *)v15; v31 = v16; v33 = v44; v34 = v47; } if ( (_DWORD)v31 == 3 ) { v26 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 104LL) + 376LL); ++*v26; v31 = -7LL; } else { v45 = v33; v37 = JS_ToStringInternal(a1, (long long)v26, v31, 0, v18, v19, a4, a5, a6, a7, v20, v21, a10, a11); v48 = v34; v39 = v38; JS_FreeValueRT(*(_QWORD *)(a1 + 24), v26, v31); v26 = (_DWORD *)v37; v33 = v45; v31 = v39; v40 = (_DWORD)v39 == 6; v34 = v48; if ( v40 ) goto LABEL_38; } LABEL_37: *(_QWORD *)&v41 = js_compile_regexp( a1, (long long)v26, v31, (long long)v34, v33, v19, a4, a5, a6, a7, v20, v21, a10, a11); v46 = v41; if ( DWORD2(v41) != 6 ) { JS_FreeValueRT(*(_QWORD *)(a1 + 24), v34, v33); goto LABEL_40; } goto LABEL_38; } } return (v14 << 32) | (unsigned int)v26; }
js_regexp_constructor: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R13,RDX MOV RBX,RSI MOV R15,qword ptr [R8] MOV R12,qword ptr [R8 + 0x8] MOV RAX,qword ptr [R8 + 0x10] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [R8 + 0x18] MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x40],RDI MOV RSI,R15 MOV RDX,R12 CALL 0x0014c627 MOV EBP,0x6 TEST EAX,EAX JS 0x001338c5 MOV R14D,EAX MOV qword ptr [RSP + 0x28],RBX MOV qword ptr [RSP + 0x30],R13 CMP R13D,0x3 JNZ 0x00133931 MOV RBX,qword ptr [RSP + 0x40] MOV RAX,qword ptr [RBX + 0x18] MOV RAX,qword ptr [RAX + 0x108] MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x28],RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x30],RAX TEST R14D,R14D SETNZ AL CMP dword ptr [RSP + 0x8],0x3 SETZ CL AND CL,AL CMP CL,0x1 JNZ 0x001338cd MOV RDI,RBX MOV RSI,R15 MOV RDX,R12 MOV ECX,0x3d MOV R8,R15 MOV R9,R12 PUSH 0x0 PUSH 0x0 CALL 0x00122fa3 ADD RSP,0x10 MOV R13,RAX MOV RBP,RDX CMP EBP,0x6 JNZ 0x001338cf MOV RBX,R13 SHR RBX,0x20 XOR EAX,EAX JMP 0x00133929 LAB_001338c5: XOR R13D,R13D JMP 0x00133b6b LAB_001338cd: JMP 0x00133931 LAB_001338cf: MOV RDI,RBX MOV RSI,R13 MOV RDX,RBP MOV RCX,qword ptr [RSP + 0x28] MOV R8,qword ptr [RSP + 0x30] CALL 0x00126461 MOV dword ptr [RSP + 0x3c],EAX MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R13 MOV RDX,RBP CALL 0x0011d8c6 CMP dword ptr [RSP + 0x3c],0x0 JZ 0x00133924 MOV qword ptr [RSP + 0x10],R15 CMP R12D,-0x9 JC 0x00133913 MOV RAX,qword ptr [RSP + 0x10] INC dword ptr [RAX] LAB_00133913: MOV RBX,R15 SHR RBX,0x20 XOR EAX,EAX MOV R13,R15 MOV RBP,R12 JMP 0x00133929 LAB_00133924: MOV AL,0x1 XOR R13D,R13D LAB_00133929: TEST AL,AL JZ 0x00133b6b LAB_00133931: MOV qword ptr [RSP + 0x10],R15 CMP R12D,-0x1 JNZ 0x0013394e MOV RAX,qword ptr [RSP + 0x10] CMP word ptr [RAX + 0x6],0x12 JNZ 0x0013394e ADD RAX,0x30 JMP 0x00133950 LAB_0013394e: XOR EAX,EAX LAB_00133950: TEST RAX,RAX MOV RBP,qword ptr [RSP + 0x40] JZ 0x0013398b MOV R13,qword ptr [RAX] INC dword ptr [R13] MOV RDX,qword ptr [RSP + 0x8] CMP EDX,0x3 JNZ 0x001339cf MOV RAX,qword ptr [RAX + 0x8] INC dword ptr [RAX] MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x18],-0x7 MOV R14,-0x7 JMP 0x00133b35 LAB_0013398b: TEST R14D,R14D JZ 0x001339fa MOV RDI,RBP MOV RSI,R15 MOV RDX,R12 MOV ECX,0x6d MOV R8,R15 MOV R9,R12 PUSH 0x0 PUSH 0x0 CALL 0x00122fa3 ADD RSP,0x10 MOV R13,RAX MOV R14,RDX CMP R14D,0x6 JNZ 0x00133a59 MOV R15D,0x3 XOR R12D,R12D JMP 0x00133afe LAB_001339cf: MOV RDI,RBP MOV RSI,qword ptr [RSP + 0x20] XOR ECX,ECX CALL 0x00127add MOV R12,RAX MOV R15,RDX MOV R14,-0x7 CMP R15D,0x6 JNZ 0x00133adb JMP 0x00133afe LAB_001339fa: MOV qword ptr [RSP + 0x10],R15 CMP R12D,-0x9 JC 0x00133a0c MOV RAX,qword ptr [RSP + 0x10] INC dword ptr [RAX] LAB_00133a0c: MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x10],RAX CMP dword ptr [RSP + 0x8],-0x9 JC 0x00133a24 MOV RAX,qword ptr [RSP + 0x10] INC dword ptr [RAX] LAB_00133a24: MOV R13,R15 MOV R14,R12 MOV R15,qword ptr [RSP + 0x8] MOV R12,qword ptr [RSP + 0x20] LAB_00133a34: CMP R14D,0x3 JNZ 0x00133a96 MOV RAX,qword ptr [RBP + 0x18] MOV RAX,qword ptr [RAX + 0x68] MOV R13,qword ptr [RAX + 0x178] INC dword ptr [R13] MOV R14,-0x7 JMP 0x00133adb LAB_00133a59: MOV RAX,qword ptr [RSP + 0x8] CMP EAX,0x3 JNZ 0x00133b87 MOV RDI,RBP MOV RSI,R15 MOV RDX,R12 MOV ECX,0x6e MOV R8,R15 MOV R9,R12 PUSH 0x0 PUSH 0x0 CALL 0x00122fa3 ADD RSP,0x10 MOV R12,RAX MOV R15,RDX CMP R15D,0x6 JNZ 0x00133a34 JMP 0x00133afe LAB_00133a96: MOV RDI,RBP MOV RSI,R13 MOV RDX,R14 XOR ECX,ECX CALL 0x00127add MOV qword ptr [RSP + 0x8],R15 MOV R15,RAX MOV qword ptr [RSP + 0x20],R12 MOV R12,RDX MOV RDI,qword ptr [RBP + 0x18] MOV RSI,R13 MOV RDX,R14 CALL 0x0011d8c6 MOV R13,R15 MOV R15,qword ptr [RSP + 0x8] MOV R14,R12 CMP R12D,0x6 MOV R12,qword ptr [RSP + 0x20] JZ 0x00133afe LAB_00133adb: MOV RDI,RBP MOV RSI,R13 MOV RDX,R14 MOV RCX,R12 MOV R8,R15 CALL 0x00133562 MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x18],RDX CMP EDX,0x6 JNZ 0x00133b26 LAB_00133afe: MOV RDI,qword ptr [RBP + 0x18] MOV RSI,R13 MOV RDX,R14 CALL 0x0011d8c6 MOV RDI,qword ptr [RBP + 0x18] MOV RSI,R12 MOV RDX,R15 CALL 0x0011d8c6 XOR R13D,R13D MOV EBP,0x6 JMP 0x00133b6b LAB_00133b26: MOV RDI,qword ptr [RBP + 0x18] MOV RSI,R12 MOV RDX,R15 CALL 0x0011d8c6 LAB_00133b35: SUB RSP,0x10 MOVUPS XMM0,xmmword ptr [RSP + 0x20] MOVUPS xmmword ptr [RSP],XMM0 MOV RDI,RBP MOV RSI,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x40] MOV RCX,R13 MOV R8,R14 CALL 0x0013f71a ADD RSP,0x10 MOV R13,RAX MOV RBP,RDX MOV RBX,RAX SHR RBX,0x20 LAB_00133b6b: SHL RBX,0x20 MOV EAX,R13D OR RAX,RBX MOV RDX,RBP ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00133b87: MOV R12,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x10],R12 CMP EAX,-0x9 MOV R15,RAX JC 0x00133a34 MOV RAX,qword ptr [RSP + 0x10] INC dword ptr [RAX] JMP 0x00133a34
int1 [16] js_regexp_constructor (ulong param_1,ulong param_2,int8 param_3,int8 param_4, int1 (*param_5) [16]) { int1 (*pauVar1) [16]; int *piVar2; int *piVar3; long lVar4; bool bVar5; int1 auVar6 [16]; int1 auVar7 [16]; int1 auVar8 [16]; int iVar9; int iVar10; int *piVar12; int extraout_EDX; uint uVar14; int8 uVar15; int8 uVar16; int1 auVar17 [16]; int1 auVar18 [16]; int1 auVar19 [16]; uint local_70; ulong local_50; int8 local_48; ulong uVar11; ulong uVar13; piVar2 = *(int **)*param_5; uVar15 = *(int8 *)(*param_5 + 8); auVar18 = *param_5; pauVar1 = param_5 + 1; piVar3 = *(int **)*pauVar1; uVar16 = *(int8 *)(param_5[1] + 8); auVar8 = *pauVar1; auVar19 = *pauVar1; auVar7 = *pauVar1; auVar6 = *pauVar1; iVar9 = js_is_regexp(param_1,piVar2,uVar15); if (iVar9 < 0) { auVar17 = ZEXT816(6) << 0x40; goto LAB_00133b6b; } uVar14 = (uint)uVar15; local_70 = (uint)uVar16; local_50 = param_2; local_48 = param_3; if ((int)param_3 == 3) { lVar4 = *(long *)(*(long *)(param_1 + 0x18) + 0x108); local_50 = *(ulong *)(lVar4 + 8); local_48 = *(int8 *)(lVar4 + 0x10); param_2 = param_1; if (local_70 == 3 && iVar9 != 0) { auVar17 = JS_GetPropertyInternal2(param_1,piVar2,uVar15,0x3d,piVar2,uVar15,0,0); uVar13 = auVar17._8_8_; uVar11 = auVar17._0_8_; if (auVar17._8_4_ == 6) { bVar5 = false; param_2 = uVar11 >> 0x20; } else { iVar10 = js_same_value(param_1,uVar11,uVar13,local_50,local_48); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar11,uVar13); if (iVar10 == 0) { bVar5 = true; auVar17._8_8_ = 0; auVar17._0_8_ = uVar13; auVar17 = auVar17 << 0x40; } else { if (0xfffffff6 < uVar14) { *piVar2 = *piVar2 + 1; } bVar5 = false; param_2 = (ulong)piVar2 >> 0x20; auVar17 = auVar18; } } if (!bVar5) goto LAB_00133b6b; } } if ((uVar14 == 0xffffffff) && (*(short *)((long)piVar2 + 6) == 0x12)) { piVar12 = piVar2 + 0xc; } else { piVar12 = (int *)0x0; } if (piVar12 == (int *)0x0) { if (iVar9 == 0) { if (0xfffffff6 < uVar14) { *piVar2 = *piVar2 + 1; } if (0xfffffff6 < local_70) { *piVar3 = *piVar3 + 1; auVar19 = auVar8; } LAB_00133a34: uVar16 = auVar18._8_8_; uVar15 = auVar18._0_8_; if (auVar18._8_4_ != 3) { auVar18 = JS_ToStringInternal(param_1,uVar15,uVar16,0); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar15,uVar16); iVar9 = auVar18._8_4_; goto joined_r0x00133ad9; } piVar2 = *(int **)(*(long *)(*(long *)(param_1 + 0x18) + 0x68) + 0x178); *piVar2 = *piVar2 + 1; auVar18._8_8_ = 0xfffffffffffffff9; auVar18._0_8_ = piVar2; LAB_00133adb: js_compile_regexp(param_1,auVar18._0_8_,auVar18._8_8_,auVar19._0_8_,auVar19._8_8_); if (extraout_EDX != 6) { JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar19._0_8_,auVar19._8_8_); goto LAB_00133b35; } } else { auVar18 = JS_GetPropertyInternal2(param_1,piVar2,uVar15,0x6d,piVar2,uVar15,0,0); if (auVar18._8_4_ != 6) { if (local_70 == 3) { auVar19 = JS_GetPropertyInternal2(param_1,piVar2,uVar15,0x6e,piVar2,uVar15,0,0); if (auVar19._8_4_ == 6) goto LAB_00133afe; } else { auVar19 = auVar6; if (0xfffffff6 < local_70) { *piVar3 = *piVar3 + 1; auVar19 = auVar7; } } goto LAB_00133a34; } auVar19 = ZEXT816(3) << 0x40; } } else { piVar2 = *(int **)piVar12; *piVar2 = *piVar2 + 1; if (local_70 == 3) { **(int **)(piVar12 + 2) = **(int **)(piVar12 + 2) + 1; auVar18._8_8_ = 0xfffffffffffffff9; auVar18._0_8_ = piVar2; LAB_00133b35: auVar17 = js_regexp_constructor_internal (param_1,local_50,local_48,auVar18._0_8_,auVar18._8_8_); param_2 = auVar17._0_8_ >> 0x20; goto LAB_00133b6b; } auVar19 = JS_ToStringInternal(param_1,piVar3,uVar16,0); auVar18._8_8_ = 0xfffffffffffffff9; auVar18._0_8_ = piVar2; iVar9 = auVar19._8_4_; joined_r0x00133ad9: if (iVar9 != 6) goto LAB_00133adb; } LAB_00133afe: JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar18._0_8_,auVar18._8_8_); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar19._0_8_,auVar19._8_8_); auVar17 = ZEXT816(6) << 0x40; LAB_00133b6b: auVar19._0_8_ = auVar17._0_8_ & 0xffffffff | param_2 << 0x20; auVar19._8_8_ = auVar17._8_8_; return auVar19; }
20,459
ankerl::nanobench::detail::printStabilityInformationOnce(std::ostream*)
BadAccessGuards/build_O0/_deps/nanobench-src/src/include/nanobench.h
void printStabilityInformationOnce(std::ostream* outStream) { static bool shouldPrint = true; if (shouldPrint && (nullptr != outStream) && isWarningsEnabled()) { auto& os = *outStream; shouldPrint = false; std::vector<std::string> warnings; std::vector<std::string> recommendations; gatherStabilityInformation(warnings, recommendations); if (warnings.empty()) { return; } os << "Warning, results might be unstable:" << std::endl; for (auto const& w : warnings) { os << "* " << w << std::endl; } os << std::endl << "Recommendations" << std::endl; for (auto const& r : recommendations) { os << "* " << r << std::endl; } } }
O0
c
ankerl::nanobench::detail::printStabilityInformationOnce(std::ostream*): pushq %rbp movq %rsp, %rbp subq $0xe0, %rsp movq %rdi, -0x8(%rbp) testb $0x1, 0x38b8a(%rip) # 0x4d460 je 0x14b4e xorl %eax, %eax cmpq -0x8(%rbp), %rax je 0x14b4e callq 0x13fc0 testb $0x1, %al jne 0x148f6 jmp 0x14b4e movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movb $0x0, 0x38b5b(%rip) # 0x4d460 leaq -0x28(%rbp), %rdi movq %rdi, -0xa0(%rbp) callq 0x1c550 leaq -0x40(%rbp), %rdi movq %rdi, -0x98(%rbp) callq 0x1c550 movq -0xa0(%rbp), %rdi movq -0x98(%rbp), %rsi callq 0x140c0 jmp 0x1493a leaq -0x28(%rbp), %rdi callq 0x1c570 testb $0x1, %al jne 0x14949 jmp 0x14978 movl $0x1, -0x50(%rbp) jmp 0x14b2f movq %rax, %rcx movl %edx, %eax movq %rcx, -0x48(%rbp) movl %eax, -0x4c(%rbp) leaq -0x40(%rbp), %rdi callq 0x1c690 leaq -0x28(%rbp), %rdi callq 0x1c690 jmp 0x14b57 movq -0x10(%rbp), %rdi leaq 0x21ab7(%rip), %rsi # 0x3643a callq 0x4430 movq %rax, -0xa8(%rbp) jmp 0x14991 movq -0xa8(%rbp), %rdi movq 0x385f9(%rip), %rsi # 0x4cf98 callq 0x4490 jmp 0x149a6 leaq -0x28(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rdi callq 0x1c5b0 movq %rax, -0x60(%rbp) movq -0x58(%rbp), %rdi callq 0x1c5e0 movq %rax, -0x68(%rbp) leaq -0x60(%rbp), %rdi leaq -0x68(%rbp), %rsi callq 0x1c610 testb $0x1, %al jne 0x149db jmp 0x14a3c leaq -0x60(%rbp), %rdi callq 0x1c650 movq %rax, -0x70(%rbp) movq -0x10(%rbp), %rdi leaq 0x21b5e(%rip), %rsi # 0x36551 callq 0x4430 movq %rax, -0xb0(%rbp) jmp 0x14a01 movq -0xb0(%rbp), %rdi movq -0x70(%rbp), %rsi callq 0x43e0 movq %rax, -0xb8(%rbp) jmp 0x14a1a movq -0xb8(%rbp), %rdi movq 0x38570(%rip), %rsi # 0x4cf98 callq 0x4490 jmp 0x14a2f jmp 0x14a31 leaq -0x60(%rbp), %rdi callq 0x1c670 jmp 0x149c8 movq -0x10(%rbp), %rdi movq 0x38551(%rip), %rsi # 0x4cf98 callq 0x4490 movq %rax, -0xc0(%rbp) jmp 0x14a55 movq -0xc0(%rbp), %rdi leaq 0x219fb(%rip), %rsi # 0x3645e callq 0x4430 movq %rax, -0xc8(%rbp) jmp 0x14a71 movq -0xc8(%rbp), %rdi movq 0x38519(%rip), %rsi # 0x4cf98 callq 0x4490 jmp 0x14a86 leaq -0x40(%rbp), %rax movq %rax, -0x78(%rbp) movq -0x78(%rbp), %rdi callq 0x1c5b0 movq %rax, -0x80(%rbp) movq -0x78(%rbp), %rdi callq 0x1c5e0 movq %rax, -0x88(%rbp) leaq -0x80(%rbp), %rdi leaq -0x88(%rbp), %rsi callq 0x1c610 testb $0x1, %al jne 0x14ac1 jmp 0x14b28 leaq -0x80(%rbp), %rdi callq 0x1c650 movq %rax, -0x90(%rbp) movq -0x10(%rbp), %rdi leaq 0x21a75(%rip), %rsi # 0x36551 callq 0x4430 movq %rax, -0xd0(%rbp) jmp 0x14aea movq -0xd0(%rbp), %rdi movq -0x90(%rbp), %rsi callq 0x43e0 movq %rax, -0xd8(%rbp) jmp 0x14b06 movq -0xd8(%rbp), %rdi movq 0x38484(%rip), %rsi # 0x4cf98 callq 0x4490 jmp 0x14b1b jmp 0x14b1d leaq -0x80(%rbp), %rdi callq 0x1c670 jmp 0x14aab movl $0x0, -0x50(%rbp) leaq -0x40(%rbp), %rdi callq 0x1c690 leaq -0x28(%rbp), %rdi callq 0x1c690 movl -0x50(%rbp), %eax testl %eax, %eax je 0x14b4c jmp 0x14b4a jmp 0x14b4e jmp 0x14b4e addq $0xe0, %rsp popq %rbp retq movq -0x48(%rbp), %rdi callq 0x47a0
_ZN6ankerl9nanobench6detail29printStabilityInformationOnceEPSo: push rbp mov rbp, rsp sub rsp, 0E0h mov [rbp+var_8], rdi test cs:_ZZN6ankerl9nanobench6detail29printStabilityInformationOnceEPSoE11shouldPrint, 1; ankerl::nanobench::detail::printStabilityInformationOnce(std::ostream *)::shouldPrint jz loc_14B4E xor eax, eax cmp rax, [rbp+var_8] jz loc_14B4E call _ZN6ankerl9nanobench6detail17isWarningsEnabledEv; ankerl::nanobench::detail::isWarningsEnabled(void) test al, 1 jnz short loc_148F6 jmp loc_14B4E loc_148F6: mov rax, [rbp+var_8] mov [rbp+var_10], rax mov cs:_ZZN6ankerl9nanobench6detail29printStabilityInformationOnceEPSoE11shouldPrint, 0; ankerl::nanobench::detail::printStabilityInformationOnce(std::ostream *)::shouldPrint lea rdi, [rbp+var_28] mov [rbp+var_A0], rdi call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2Ev; std::vector<std::string>::vector(void) lea rdi, [rbp+var_40] mov [rbp+var_98], rdi call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2Ev; std::vector<std::string>::vector(void) mov rdi, [rbp+var_A0] mov rsi, [rbp+var_98] call _ZN6ankerl9nanobench6detail26gatherStabilityInformationERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EESB_; ankerl::nanobench::detail::gatherStabilityInformation(std::vector<std::string> &,std::vector<std::string> &) jmp short $+2 loc_1493A: lea rdi, [rbp+var_28] call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5emptyEv; std::vector<std::string>::empty(void) test al, 1 jnz short loc_14949 jmp short loc_14978 loc_14949: mov [rbp+var_50], 1 jmp loc_14B2F mov rcx, rax mov eax, edx mov [rbp+var_48], rcx mov [rbp+var_4C], eax lea rdi, [rbp+var_40] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea rdi, [rbp+var_28] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() jmp loc_14B57 loc_14978: mov rdi, [rbp+var_10] lea rsi, aWarningResults; "Warning, results might be unstable:" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_A8], rax jmp short $+2 loc_14991: mov rdi, [rbp+var_A8] mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &)) jmp short $+2 loc_149A6: lea rax, [rbp+var_28] mov [rbp+var_58], rax mov rdi, [rbp+var_58] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5beginEv; std::vector<std::string>::begin(void) mov [rbp+var_60], rax mov rdi, [rbp+var_58] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE3endEv; std::vector<std::string>::end(void) mov [rbp+var_68], rax loc_149C8: lea rdi, [rbp+var_60] lea rsi, [rbp+var_68] call _ZN9__gnu_cxxneIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_; __gnu_cxx::operator!=<std::string *,std::vector<std::string>>(__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>> const&,__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>> const&) test al, 1 jnz short loc_149DB jmp short loc_14A3C loc_149DB: lea rdi, [rbp+var_60] call _ZNK9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEdeEv; __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator*(void) mov [rbp+var_70], rax mov rdi, [rbp+var_10] lea rsi, asc_36550+1; "* " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_B0], rax jmp short $+2 loc_14A01: mov rdi, [rbp+var_B0] mov rsi, [rbp+var_70] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov [rbp+var_B8], rax jmp short $+2 loc_14A1A: mov rdi, [rbp+var_B8] mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &)) jmp short $+2 loc_14A2F: jmp short $+2 loc_14A31: lea rdi, [rbp+var_60] call _ZN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEppEv; __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator++(void) jmp short loc_149C8 loc_14A3C: mov rdi, [rbp+var_10] mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &)) mov [rbp+var_C0], rax jmp short $+2 loc_14A55: mov rdi, [rbp+var_C0] lea rsi, aRecommendation; "Recommendations" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_C8], rax jmp short $+2 loc_14A71: mov rdi, [rbp+var_C8] mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &)) jmp short $+2 loc_14A86: lea rax, [rbp+var_40] mov [rbp+var_78], rax mov rdi, [rbp+var_78] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5beginEv; std::vector<std::string>::begin(void) mov [rbp+var_80], rax mov rdi, [rbp+var_78] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE3endEv; std::vector<std::string>::end(void) mov [rbp+var_88], rax loc_14AAB: lea rdi, [rbp+var_80] lea rsi, [rbp+var_88] call _ZN9__gnu_cxxneIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_; __gnu_cxx::operator!=<std::string *,std::vector<std::string>>(__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>> const&,__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>> const&) test al, 1 jnz short loc_14AC1 jmp short loc_14B28 loc_14AC1: lea rdi, [rbp+var_80] call _ZNK9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEdeEv; __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator*(void) mov [rbp+var_90], rax mov rdi, [rbp+var_10] lea rsi, asc_36550+1; "* " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_D0], rax jmp short $+2 loc_14AEA: mov rdi, [rbp+var_D0] mov rsi, [rbp+var_90] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov [rbp+var_D8], rax jmp short $+2 loc_14B06: mov rdi, [rbp+var_D8] mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &)) jmp short $+2 loc_14B1B: jmp short $+2 loc_14B1D: lea rdi, [rbp+var_80] call _ZN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEppEv; __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator++(void) jmp short loc_14AAB loc_14B28: mov [rbp+var_50], 0 loc_14B2F: lea rdi, [rbp+var_40] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea rdi, [rbp+var_28] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov eax, [rbp+var_50] test eax, eax jz short loc_14B4C jmp short $+2 loc_14B4A: jmp short loc_14B4E loc_14B4C: jmp short $+2 loc_14B4E: add rsp, 0E0h pop rbp retn loc_14B57: mov rdi, [rbp+var_48] call __Unwind_Resume
void ankerl::nanobench::detail::printStabilityInformationOnce( ankerl::nanobench::detail *this, std::ostream *a2) { long long v2; // [rsp+8h] [rbp-D8h] long long v3; // [rsp+10h] [rbp-D0h] long long v4; // [rsp+18h] [rbp-C8h] long long v5; // [rsp+20h] [rbp-C0h] long long v6; // [rsp+28h] [rbp-B8h] long long v7; // [rsp+30h] [rbp-B0h] long long v8; // [rsp+38h] [rbp-A8h] long long v9; // [rsp+50h] [rbp-90h] long long v10; // [rsp+58h] [rbp-88h] BYREF _QWORD v11[2]; // [rsp+60h] [rbp-80h] BYREF long long v12; // [rsp+70h] [rbp-70h] long long v13; // [rsp+78h] [rbp-68h] BYREF _QWORD v14[2]; // [rsp+80h] [rbp-60h] BYREF int v15; // [rsp+90h] [rbp-50h] _BYTE v16[24]; // [rsp+A0h] [rbp-40h] BYREF _BYTE v17[24]; // [rsp+B8h] [rbp-28h] BYREF ankerl::nanobench::detail *v18; // [rsp+D0h] [rbp-10h] ankerl::nanobench::detail *v19; // [rsp+D8h] [rbp-8h] v19 = this; if ( (ankerl::nanobench::detail::printStabilityInformationOnce(std::ostream *)::shouldPrint & 1) != 0 && v19 && (ankerl::nanobench::detail::isWarningsEnabled(this, (const char *)a2) & 1) != 0 ) { v18 = v19; ankerl::nanobench::detail::printStabilityInformationOnce(std::ostream *)::shouldPrint = 0; std::vector<std::string>::vector(v17); std::vector<std::string>::vector(v16); ankerl::nanobench::detail::gatherStabilityInformation((long long)v17, (long long)v16); if ( (std::vector<std::string>::empty(v17) & 1) != 0 ) { v15 = 1; } else { v8 = std::operator<<<std::char_traits<char>>(v18, "Warning, results might be unstable:"); std::ostream::operator<<(v8, &std::endl<char,std::char_traits<char>>); v14[1] = v17; v14[0] = std::vector<std::string>::begin(v17); v13 = std::vector<std::string>::end(v17); while ( (__gnu_cxx::operator!=<std::string *,std::vector<std::string>>(v14, &v13) & 1) != 0 ) { v12 = __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator*(v14); v7 = std::operator<<<std::char_traits<char>>(v18, "* "); v6 = std::operator<<<char>(v7, v12); std::ostream::operator<<(v6, &std::endl<char,std::char_traits<char>>); __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator++(v14); } v5 = std::ostream::operator<<(v18, &std::endl<char,std::char_traits<char>>); v4 = std::operator<<<std::char_traits<char>>(v5, "Recommendations"); std::ostream::operator<<(v4, &std::endl<char,std::char_traits<char>>); v11[1] = v16; v11[0] = std::vector<std::string>::begin(v16); v10 = std::vector<std::string>::end(v16); while ( (__gnu_cxx::operator!=<std::string *,std::vector<std::string>>(v11, &v10) & 1) != 0 ) { v9 = __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator*(v11); v3 = std::operator<<<std::char_traits<char>>(v18, "* "); v2 = std::operator<<<char>(v3, v9); std::ostream::operator<<(v2, &std::endl<char,std::char_traits<char>>); __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator++(v11); } v15 = 0; } std::vector<std::string>::~vector(v16); std::vector<std::string>::~vector(v17); } }
printStabilityInformationOnce: PUSH RBP MOV RBP,RSP SUB RSP,0xe0 MOV qword ptr [RBP + -0x8],RDI TEST byte ptr [0x0014d460],0x1 JZ 0x00114b4e XOR EAX,EAX CMP RAX,qword ptr [RBP + -0x8] JZ 0x00114b4e CALL 0x00113fc0 TEST AL,0x1 JNZ 0x001148f6 JMP 0x00114b4e LAB_001148f6: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV byte ptr [0x0014d460],0x0 LEA RDI,[RBP + -0x28] MOV qword ptr [RBP + -0xa0],RDI CALL 0x0011c550 LEA RDI,[RBP + -0x40] MOV qword ptr [RBP + -0x98],RDI CALL 0x0011c550 MOV RDI,qword ptr [RBP + -0xa0] MOV RSI,qword ptr [RBP + -0x98] LAB_00114933: CALL 0x001140c0 JMP 0x0011493a LAB_0011493a: LEA RDI,[RBP + -0x28] CALL 0x0011c570 TEST AL,0x1 JNZ 0x00114949 JMP 0x00114978 LAB_00114949: MOV dword ptr [RBP + -0x50],0x1 JMP 0x00114b2f LAB_00114978: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x13643a] CALL 0x00104430 MOV qword ptr [RBP + -0xa8],RAX JMP 0x00114991 LAB_00114991: MOV RDI,qword ptr [RBP + -0xa8] MOV RSI,qword ptr [0x0014cf98] CALL 0x00104490 JMP 0x001149a6 LAB_001149a6: LEA RAX,[RBP + -0x28] MOV qword ptr [RBP + -0x58],RAX MOV RDI,qword ptr [RBP + -0x58] CALL 0x0011c5b0 MOV qword ptr [RBP + -0x60],RAX MOV RDI,qword ptr [RBP + -0x58] CALL 0x0011c5e0 MOV qword ptr [RBP + -0x68],RAX LAB_001149c8: LEA RDI,[RBP + -0x60] LEA RSI,[RBP + -0x68] CALL 0x0011c610 TEST AL,0x1 JNZ 0x001149db JMP 0x00114a3c LAB_001149db: LEA RDI,[RBP + -0x60] CALL 0x0011c650 MOV qword ptr [RBP + -0x70],RAX MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x136551] CALL 0x00104430 MOV qword ptr [RBP + -0xb0],RAX JMP 0x00114a01 LAB_00114a01: MOV RDI,qword ptr [RBP + -0xb0] MOV RSI,qword ptr [RBP + -0x70] CALL 0x001043e0 MOV qword ptr [RBP + -0xb8],RAX JMP 0x00114a1a LAB_00114a1a: MOV RDI,qword ptr [RBP + -0xb8] MOV RSI,qword ptr [0x0014cf98] CALL 0x00104490 JMP 0x00114a2f LAB_00114a2f: JMP 0x00114a31 LAB_00114a31: LEA RDI,[RBP + -0x60] CALL 0x0011c670 JMP 0x001149c8 LAB_00114a3c: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [0x0014cf98] CALL 0x00104490 MOV qword ptr [RBP + -0xc0],RAX JMP 0x00114a55 LAB_00114a55: MOV RDI,qword ptr [RBP + -0xc0] LEA RSI,[0x13645e] CALL 0x00104430 MOV qword ptr [RBP + -0xc8],RAX JMP 0x00114a71 LAB_00114a71: MOV RDI,qword ptr [RBP + -0xc8] MOV RSI,qword ptr [0x0014cf98] CALL 0x00104490 JMP 0x00114a86 LAB_00114a86: LEA RAX,[RBP + -0x40] MOV qword ptr [RBP + -0x78],RAX MOV RDI,qword ptr [RBP + -0x78] CALL 0x0011c5b0 MOV qword ptr [RBP + -0x80],RAX MOV RDI,qword ptr [RBP + -0x78] CALL 0x0011c5e0 MOV qword ptr [RBP + -0x88],RAX LAB_00114aab: LEA RDI,[RBP + -0x80] LEA RSI,[RBP + -0x88] CALL 0x0011c610 TEST AL,0x1 JNZ 0x00114ac1 JMP 0x00114b28 LAB_00114ac1: LEA RDI,[RBP + -0x80] CALL 0x0011c650 MOV qword ptr [RBP + -0x90],RAX MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x136551] CALL 0x00104430 MOV qword ptr [RBP + -0xd0],RAX JMP 0x00114aea LAB_00114aea: MOV RDI,qword ptr [RBP + -0xd0] MOV RSI,qword ptr [RBP + -0x90] CALL 0x001043e0 MOV qword ptr [RBP + -0xd8],RAX JMP 0x00114b06 LAB_00114b06: MOV RDI,qword ptr [RBP + -0xd8] MOV RSI,qword ptr [0x0014cf98] CALL 0x00104490 LAB_00114b19: JMP 0x00114b1b LAB_00114b1b: JMP 0x00114b1d LAB_00114b1d: LEA RDI,[RBP + -0x80] CALL 0x0011c670 JMP 0x00114aab LAB_00114b28: MOV dword ptr [RBP + -0x50],0x0 LAB_00114b2f: LEA RDI,[RBP + -0x40] CALL 0x0011c690 LEA RDI,[RBP + -0x28] CALL 0x0011c690 MOV EAX,dword ptr [RBP + -0x50] TEST EAX,EAX JZ 0x00114b4c JMP 0x00114b4a LAB_00114b4a: JMP 0x00114b4e LAB_00114b4c: JMP 0x00114b4e LAB_00114b4e: ADD RSP,0xe0 POP RBP RET
/* ankerl::nanobench::detail::printStabilityInformationOnce(std::ostream*) */ void ankerl::nanobench::detail::printStabilityInformationOnce(ostream *param_1) { bool bVar1; ulong uVar2; ostream *poVar3; string *psVar4; int8 local_90; int8 local_88; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_80; string *local_78; int8 local_70; int8 local_68; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_60; int4 local_58; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_48 [24]; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_30 [24]; ostream *local_18; ostream *local_10; if ((((printStabilityInformationOnce(std::ostream*)::shouldPrint & 1) != 0) && (param_1 != (ostream *)0x0)) && (local_10 = param_1, uVar2 = isWarningsEnabled(), (uVar2 & 1) != 0)) { local_18 = local_10; printStabilityInformationOnce(std::ostream*)::shouldPrint = 0; std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector(local_30); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector(local_48); /* try { // try from 00114933 to 00114b18 has its CatchHandler @ 00114955 */ gatherStabilityInformation((vector *)local_30,(vector *)local_48); uVar2 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::empty(local_30); if ((uVar2 & 1) == 0) { poVar3 = std::operator<<(local_18,"Warning, results might be unstable:"); std::ostream::operator<< (poVar3,(_func_ostream_ptr_ostream_ptr *) PTR_endl<char,std_char_traits<char>>_0014cf98); local_60 = local_30; local_68 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::begin (local_60); local_70 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::end (local_60); while (bVar1 = __gnu_cxx::operator!= ((__normal_iterator *)&local_68,(__normal_iterator *)&local_70), bVar1) { local_78 = (string *) __gnu_cxx:: __normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> ::operator*((__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> *)&local_68); poVar3 = std::operator<<(local_18,"* "); poVar3 = std::operator<<(poVar3,local_78); std::ostream::operator<< (poVar3,(_func_ostream_ptr_ostream_ptr *) PTR_endl<char,std_char_traits<char>>_0014cf98); __gnu_cxx:: __normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> ::operator++((__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> *)&local_68); } poVar3 = (ostream *) std::ostream::operator<< (local_18,(_func_ostream_ptr_ostream_ptr *) PTR_endl<char,std_char_traits<char>>_0014cf98); poVar3 = std::operator<<(poVar3,"Recommendations"); std::ostream::operator<< (poVar3,(_func_ostream_ptr_ostream_ptr *) PTR_endl<char,std_char_traits<char>>_0014cf98); local_80 = local_48; local_88 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::begin (local_80); local_90 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::end (local_80); while (bVar1 = __gnu_cxx::operator!= ((__normal_iterator *)&local_88,(__normal_iterator *)&local_90), bVar1) { psVar4 = (string *) __gnu_cxx:: __normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> ::operator*((__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> *)&local_88); poVar3 = std::operator<<(local_18,"* "); poVar3 = std::operator<<(poVar3,psVar4); std::ostream::operator<< (poVar3,(_func_ostream_ptr_ostream_ptr *) PTR_endl<char,std_char_traits<char>>_0014cf98); __gnu_cxx:: __normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> ::operator++((__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> *)&local_88); } local_58 = 0; } else { local_58 = 1; } std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_48); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_30); } return; }
20,460
check_mb_gb18030_valid
eloqsql/libmariadb/libmariadb/ma_charset.c
static unsigned int check_mb_gb18030_valid(const char * start, const char * end) { if (end - start <= 1 || !is_gb18030_odd(start[0])) { return 0; } if (is_gb18030_even_2(start[1])) { return 2; } else if (end - start > 3 && is_gb18030_even_4(start[1]) && is_gb18030_odd(start[2]) && is_gb18030_even_4(start[3])) { return 4; } return 0; }
O3
c
check_mb_gb18030_valid: pushq %rbp movq %rsp, %rbp subq %rdi, %rsi xorl %eax, %eax cmpq $0x2, %rsi jl 0x31bb4 movb (%rdi), %cl incb %cl cmpb $-0x7e, %cl jb 0x31bb4 movb 0x1(%rdi), %cl leal -0x7f(%rcx), %eax cmpb $-0x3f, %al setae %dl cmpb $-0x1, %cl setl %r8b movl $0x2, %eax orb %dl, %r8b jne 0x31bb4 cmpq $0x4, %rsi setb %al addb $-0x30, %cl cmpb $0xa, %cl setae %cl orb %al, %cl jne 0x31bb2 movb 0x2(%rdi), %al incb %al cmpb $-0x7e, %al jb 0x31bb2 movb 0x3(%rdi), %cl addb $-0x30, %cl movl $0x4, %eax cmpb $0xa, %cl jb 0x31bb4 xorl %eax, %eax popq %rbp retq
check_mb_gb18030_valid: push rbp mov rbp, rsp sub rsi, rdi xor eax, eax cmp rsi, 2 jl short loc_31BB4 mov cl, [rdi] inc cl cmp cl, 82h jb short loc_31BB4 mov cl, [rdi+1] lea eax, [rcx-7Fh] cmp al, 0C1h setnb dl cmp cl, 0FFh setl r8b mov eax, 2 or r8b, dl jnz short loc_31BB4 cmp rsi, 4 setb al add cl, 0D0h cmp cl, 0Ah setnb cl or cl, al jnz short loc_31BB2 mov al, [rdi+2] inc al cmp al, 82h jb short loc_31BB2 mov cl, [rdi+3] add cl, 0D0h mov eax, 4 cmp cl, 0Ah jb short loc_31BB4 loc_31BB2: xor eax, eax loc_31BB4: pop rbp retn
long long check_mb_gb18030_valid(_BYTE *a1, long long a2) { long long v2; // rsi long long result; // rax char v4; // cl v2 = a2 - (_QWORD)a1; result = 0LL; if ( v2 >= 2 && (unsigned __int8)(*a1 + 1) >= 0x82u ) { v4 = a1[1]; result = 2LL; if ( (unsigned __int8)(v4 - 127) < 0xC1u && v4 >= -1 ) { if ( (unsigned long long)v2 < 4 || (unsigned __int8)(v4 - 48) >= 0xAu ) return 0LL; if ( (unsigned __int8)(a1[2] + 1) < 0x82u ) return 0LL; result = 4LL; if ( (unsigned __int8)(a1[3] - 48) >= 0xAu ) return 0LL; } } return result; }
check_mb_gb18030_valid: PUSH RBP MOV RBP,RSP SUB RSI,RDI XOR EAX,EAX CMP RSI,0x2 JL 0x00131bb4 MOV CL,byte ptr [RDI] INC CL CMP CL,0x82 JC 0x00131bb4 MOV CL,byte ptr [RDI + 0x1] LEA EAX,[RCX + -0x7f] CMP AL,0xc1 SETNC DL CMP CL,0xff SETL R8B MOV EAX,0x2 OR R8B,DL JNZ 0x00131bb4 CMP RSI,0x4 SETC AL ADD CL,0xd0 CMP CL,0xa SETNC CL OR CL,AL JNZ 0x00131bb2 MOV AL,byte ptr [RDI + 0x2] INC AL CMP AL,0x82 JC 0x00131bb2 MOV CL,byte ptr [RDI + 0x3] ADD CL,0xd0 MOV EAX,0x4 CMP CL,0xa JC 0x00131bb4 LAB_00131bb2: XOR EAX,EAX LAB_00131bb4: POP RBP RET
int8 check_mb_gb18030_valid(char *param_1,long param_2) { char cVar1; int8 uVar2; uVar2 = 0; if ((1 < param_2 - (long)param_1) && (0x81 < (byte)(*param_1 + 1U))) { cVar1 = param_1[1]; uVar2 = 2; if ((-2 < cVar1 && (byte)(cVar1 + 0x81U) < 0xc1) && (((9 < (byte)(cVar1 - 0x30U) || (ulong)(param_2 - (long)param_1) < 4 || ((byte)(param_1[2] + 1U) < 0x82)) || (uVar2 = 4, 9 < (byte)(param_1[3] - 0x30U))))) { uVar2 = 0; } } return uVar2; }
20,461
my_strnncollsp_padspace_bin
eloqsql/strings/ctype-bin.c
int my_strnncollsp_padspace_bin(const uchar *str, size_t length) { for ( ; length ; str++, length--) { if (*str < ' ') return -1; else if (*str > ' ') return 1; } return 0; }
O0
c
my_strnncollsp_padspace_bin: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0x34b0b movq -0x10(%rbp), %rax movzbl (%rax), %eax cmpl $0x20, %eax jge 0x34ad8 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x34b12 movq -0x10(%rbp), %rax movzbl (%rax), %eax cmpl $0x20, %eax jle 0x34aed movl $0x1, -0x4(%rbp) jmp 0x34b12 jmp 0x34aef jmp 0x34af1 movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) movq -0x18(%rbp), %rax addq $-0x1, %rax movq %rax, -0x18(%rbp) jmp 0x34abc movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw (%rax,%rax)
my_strnncollsp_padspace_bin: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi loc_34ABC: cmp [rbp+var_18], 0 jz short loc_34B0B mov rax, [rbp+var_10] movzx eax, byte ptr [rax] cmp eax, 20h ; ' ' jge short loc_34AD8 mov [rbp+var_4], 0FFFFFFFFh jmp short loc_34B12 loc_34AD8: mov rax, [rbp+var_10] movzx eax, byte ptr [rax] cmp eax, 20h ; ' ' jle short loc_34AED mov [rbp+var_4], 1 jmp short loc_34B12 loc_34AED: jmp short $+2 loc_34AEF: jmp short $+2 loc_34AF1: mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax mov rax, [rbp+var_18] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_18], rax jmp short loc_34ABC loc_34B0B: mov [rbp+var_4], 0 loc_34B12: mov eax, [rbp+var_4] pop rbp retn
long long my_strnncollsp_padspace_bin(unsigned __int8 *a1, long long a2) { while ( a2 ) { if ( *a1 < 0x20u ) return (unsigned int)-1; if ( *a1 > 0x20u ) return 1; ++a1; --a2; } return 0; }
my_strnncollsp_padspace_bin: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI LAB_00134abc: CMP qword ptr [RBP + -0x18],0x0 JZ 0x00134b0b MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX] CMP EAX,0x20 JGE 0x00134ad8 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x00134b12 LAB_00134ad8: MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX] CMP EAX,0x20 JLE 0x00134aed MOV dword ptr [RBP + -0x4],0x1 JMP 0x00134b12 LAB_00134aed: JMP 0x00134aef LAB_00134aef: JMP 0x00134af1 LAB_00134af1: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,-0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x00134abc LAB_00134b0b: MOV dword ptr [RBP + -0x4],0x0 LAB_00134b12: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_strnncollsp_padspace_bin(byte *param_1,long param_2) { long local_20; byte *local_18; local_20 = param_2; local_18 = param_1; while( true ) { if (local_20 == 0) { return 0; } if (*local_18 < 0x20) break; if (0x20 < *local_18) { return 1; } local_18 = local_18 + 1; local_20 = local_20 + -1; } return 0xffffffff; }
20,462
js_strict_eq2
bluesky950520[P]quickjs/quickjs.c
static BOOL js_strict_eq2(JSContext *ctx, JSValue op1, JSValue op2, JSStrictEqModeEnum eq_mode) { BOOL res; int tag1, tag2; double d1, d2; tag1 = JS_VALUE_GET_NORM_TAG(op1); tag2 = JS_VALUE_GET_NORM_TAG(op2); switch(tag1) { case JS_TAG_BOOL: if (tag1 != tag2) { res = FALSE; } else { res = JS_VALUE_GET_INT(op1) == JS_VALUE_GET_INT(op2); goto done_no_free; } break; case JS_TAG_NULL: case JS_TAG_UNDEFINED: res = (tag1 == tag2); break; case JS_TAG_STRING: { JSString *p1, *p2; if (tag1 != tag2) { res = FALSE; } else { p1 = JS_VALUE_GET_STRING(op1); p2 = JS_VALUE_GET_STRING(op2); res = js_string_eq(p1, p2); } } break; case JS_TAG_SYMBOL: { JSAtomStruct *p1, *p2; if (tag1 != tag2) { res = FALSE; } else { p1 = JS_VALUE_GET_PTR(op1); p2 = JS_VALUE_GET_PTR(op2); res = (p1 == p2); } } break; case JS_TAG_OBJECT: if (tag1 != tag2) res = FALSE; else res = JS_VALUE_GET_OBJ(op1) == JS_VALUE_GET_OBJ(op2); break; case JS_TAG_INT: d1 = JS_VALUE_GET_INT(op1); if (tag2 == JS_TAG_INT) { d2 = JS_VALUE_GET_INT(op2); goto number_test; } else if (tag2 == JS_TAG_FLOAT64) { d2 = JS_VALUE_GET_FLOAT64(op2); goto number_test; } else { res = FALSE; } break; case JS_TAG_FLOAT64: d1 = JS_VALUE_GET_FLOAT64(op1); if (tag2 == JS_TAG_FLOAT64) { d2 = JS_VALUE_GET_FLOAT64(op2); } else if (tag2 == JS_TAG_INT) { d2 = JS_VALUE_GET_INT(op2); } else { res = FALSE; break; } number_test: if (unlikely(eq_mode >= JS_EQ_SAME_VALUE)) { JSFloat64Union u1, u2; /* NaN is not always normalized, so this test is necessary */ if (isnan(d1) || isnan(d2)) { res = isnan(d1) == isnan(d2); } else if (eq_mode == JS_EQ_SAME_VALUE_ZERO) { res = (d1 == d2); /* +0 == -0 */ } else { u1.d = d1; u2.d = d2; res = (u1.u64 == u2.u64); /* +0 != -0 */ } } else { res = (d1 == d2); /* if NaN return false and +0 == -0 */ } goto done_no_free; case JS_TAG_BIG_INT: { bf_t a_s, *a, b_s, *b; if (tag1 != tag2) { res = FALSE; break; } a = JS_ToBigInt1(ctx, &a_s, op1); b = JS_ToBigInt1(ctx, &b_s, op2); res = bf_cmp_eq(a, b); if (a == &a_s) bf_delete(a); if (b == &b_s) bf_delete(b); } break; default: res = FALSE; break; } JS_FreeValue(ctx, op1); JS_FreeValue(ctx, op2); done_no_free: return res; }
O3
c
js_strict_eq2: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %r8, %r14 movq %rcx, %rbx movq %rdx, %r13 movq %rsi, %r12 movq %rdi, %r15 leal 0x9(%rdx), %eax cmpl $0x10, %eax ja 0x3abbf movq %rbx, %xmm0 leaq 0x639d6(%rip), %rcx # 0x9e404 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax cmpl %r14d, %r13d sete %bpl jmp 0x3ab85 cmpl $-0x7, %r14d jne 0x3ab0e movl $0x7fffffff, %eax # imm = 0x7FFFFFFF movl 0x4(%r12), %edx andl %eax, %edx andl 0x4(%rbx), %eax cmpl %eax, %edx jne 0x3ab0e movq %r12, %rdi movq %rbx, %rsi callq 0x3c614 testl %eax, %eax sete %bpl jmp 0x3ab29 cmpl $0x1, %r14d jne 0x3ab83 cmpl %ebx, %r12d sete %bpl jmp 0x3aba9 cmpl $-0x9, %r14d jne 0x3ab0e leaq 0x30(%rsp), %rsi movq %r15, %rdi movq %r12, %rdx movq %r13, %rcx callq 0x440e1 movq %rax, %rbp leaq 0x8(%rsp), %rsi movq %r15, %rdi movq %rbx, %rdx movq %r14, %rcx callq 0x440e1 movq %rbp, %rdi movq %rax, (%rsp) movq %rax, %rsi callq 0x872f9 movq %rbp, %rcx testl %eax, %eax sete %bpl leaq 0x30(%rsp), %rax cmpq %rax, %rcx je 0x3abd1 movq (%rsp), %rcx leaq 0x8(%rsp), %rax cmpq %rax, %rcx jne 0x3ab29 movq (%rcx), %rax testq %rax, %rax je 0x3ab29 movq 0x20(%rcx), %rsi testq %rsi, %rsi je 0x3ab29 movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) jmp 0x3ab29 xorl %ebp, %ebp jmp 0x3ab29 cmpl $-0x8, %r14d jmp 0x3ab1c cmpl $-0x1, %r14d sete %al cmpq %rbx, %r12 sete %bpl andb %al, %bpl addq $0x18, %r15 movq (%r15), %rdi movl (%r12), %eax leal -0x1(%rax), %ecx movl %ecx, (%r12) cmpl $0x1, %eax jg 0x3ab89 movq %r12, %rsi movq %r13, %rdx callq 0x20d90 jmp 0x3ab89 movq %r12, %xmm1 jmp 0x3ab59 cvtsi2sd %r12d, %xmm1 cmpl $0x7, %r14d je 0x3ab6b testl %r14d, %r14d jne 0x3ab83 xorps %xmm0, %xmm0 cvtsi2sd %ebx, %xmm0 testl %r9d, %r9d jne 0x3abf7 cmpeqsd %xmm0, %xmm1 movq %xmm1, %rbp andl $0x1, %ebp jmp 0x3aba9 xorl %ebp, %ebp addq $0x18, %r15 cmpl $-0x9, %r14d jb 0x3aba9 movq (%r15), %rdi movl (%rbx), %eax leal -0x1(%rax), %ecx movl %ecx, (%rbx) cmpl $0x1, %eax jg 0x3aba9 movq %rbx, %rsi movq %r14, %rdx callq 0x20d90 movzbl %bpl, %eax andl $0x1, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq addq $0x18, %r15 xorl %ebp, %ebp cmpl $-0x9, %r13d jae 0x3ab2d jmp 0x3ab89 movq (%rcx), %rax testq %rax, %rax je 0x3aae5 movq 0x20(%rcx), %rsi testq %rsi, %rsi je 0x3aae5 movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) jmp 0x3aae5 ucomisd %xmm1, %xmm1 jp 0x3ac1f ucomisd %xmm0, %xmm0 jp 0x3ac1f cmpl $0x2, %r9d je 0x3ab74 movq %xmm1, %rax movq %xmm0, %rcx cmpq %rcx, %rax jmp 0x3aa87 xorpd %xmm2, %xmm2 cmpunordpd %xmm2, %xmm1 cmpordpd %xmm2, %xmm0 xorpd %xmm1, %xmm0 movd %xmm0, %ebp jmp 0x3aba9
js_strict_eq2: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r14, r8 mov rbx, rcx mov r13, rdx mov r12, rsi mov r15, rdi lea eax, [rdx+9]; switch 17 cases cmp eax, 10h ja def_3AA35; jumptable 000000000003AA35 default case, cases -6--2,4-6 movq xmm0, rbx lea rcx, jpt_3AA35 movsxd rax, ds:(jpt_3AA35 - 9E404h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_3AA37: cmp r13d, r14d; jumptable 000000000003AA35 cases 2,3 setz bpl jmp loc_3AB85 loc_3AA43: cmp r14d, 0FFFFFFF9h; jumptable 000000000003AA35 case -7 jnz loc_3AB0E mov eax, 7FFFFFFFh mov edx, [r12+4] and edx, eax and eax, [rbx+4] cmp edx, eax jnz loc_3AB0E mov rdi, r12 mov rsi, rbx call js_string_memcmp test eax, eax setz bpl jmp loc_3AB29 loc_3AA7A: cmp r14d, 1; jumptable 000000000003AA35 case 1 jnz loc_3AB83 cmp r12d, ebx loc_3AA87: setz bpl jmp loc_3ABA9 loc_3AA90: cmp r14d, 0FFFFFFF7h; jumptable 000000000003AA35 case -9 jnz short loc_3AB0E lea rsi, [rsp+88h+var_58] mov rdi, r15 mov rdx, r12 mov rcx, r13 call JS_ToBigInt1 mov rbp, rax lea rsi, [rsp+88h+var_80] mov rdi, r15 mov rdx, rbx mov rcx, r14 call JS_ToBigInt1 mov rdi, rbp mov [rsp+88h+var_88], rax mov rsi, rax call bf_cmp mov rcx, rbp test eax, eax setz bpl lea rax, [rsp+88h+var_58] cmp rcx, rax jz loc_3ABD1 loc_3AAE5: mov rcx, [rsp+88h+var_88] lea rax, [rsp+88h+var_80] cmp rcx, rax jnz short loc_3AB29 mov rax, [rcx] test rax, rax jz short loc_3AB29 mov rsi, [rcx+20h] test rsi, rsi jz short loc_3AB29 mov rdi, [rax] xor edx, edx call qword ptr [rax+8] jmp short loc_3AB29 loc_3AB0E: xor ebp, ebp jmp short loc_3AB29 loc_3AB12: cmp r14d, 0FFFFFFF8h; jumptable 000000000003AA35 case -8 jmp short loc_3AB1C loc_3AB18: cmp r14d, 0FFFFFFFFh; jumptable 000000000003AA35 case -1 loc_3AB1C: setz al cmp r12, rbx setz bpl and bpl, al loc_3AB29: add r15, 18h loc_3AB2D: mov rdi, [r15] mov eax, [r12] lea ecx, [rax-1] mov [r12], ecx cmp eax, 1 jg short loc_3AB89 mov rsi, r12 mov rdx, r13 call js_free_value_rt jmp short loc_3AB89 loc_3AB4D: movq xmm1, r12; jumptable 000000000003AA35 case 7 jmp short loc_3AB59 loc_3AB54: cvtsi2sd xmm1, r12d; jumptable 000000000003AA35 case 0 loc_3AB59: cmp r14d, 7 jz short loc_3AB6B test r14d, r14d jnz short loc_3AB83 xorps xmm0, xmm0 cvtsi2sd xmm0, ebx loc_3AB6B: test r9d, r9d jnz loc_3ABF7 loc_3AB74: cmpeqsd xmm1, xmm0 movq rbp, xmm1 and ebp, 1 jmp short loc_3ABA9 loc_3AB83: xor ebp, ebp loc_3AB85: add r15, 18h loc_3AB89: cmp r14d, 0FFFFFFF7h jb short loc_3ABA9 mov rdi, [r15] mov eax, [rbx] lea ecx, [rax-1] mov [rbx], ecx cmp eax, 1 jg short loc_3ABA9 mov rsi, rbx mov rdx, r14 call js_free_value_rt loc_3ABA9: movzx eax, bpl and eax, 1 add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn def_3AA35: add r15, 18h; jumptable 000000000003AA35 default case, cases -6--2,4-6 xor ebp, ebp cmp r13d, 0FFFFFFF7h jnb loc_3AB2D jmp short loc_3AB89 loc_3ABD1: mov rax, [rcx] test rax, rax jz loc_3AAE5 mov rsi, [rcx+20h] test rsi, rsi jz loc_3AAE5 mov rdi, [rax] xor edx, edx call qword ptr [rax+8] jmp loc_3AAE5 loc_3ABF7: ucomisd xmm1, xmm1 jp short loc_3AC1F ucomisd xmm0, xmm0 jp short loc_3AC1F cmp r9d, 2 jz loc_3AB74 movq rax, xmm1 movq rcx, xmm0 cmp rax, rcx jmp loc_3AA87 loc_3AC1F: xorpd xmm2, xmm2 cmpunordpd xmm1, xmm2 cmpordpd xmm0, xmm2 xorpd xmm0, xmm1 movd ebp, xmm0 jmp loc_3ABA9
_BOOL8 js_strict_eq2( long long a1, int *a2, long long a3, int *a4, long long a5, long long a6, double a7, __m128d a8) { __m128d v12; // xmm0 bool v13; // bp long long v14; // rdx long long v16; // rbp int v17; // eax _QWORD **v18; // rcx _QWORD *v19; // rsi bool v20; // zf long long *v21; // r15 long long v22; // rdi int v23; // eax long long v24; // rcx long long v25; // rdi int v26; // eax long long v27; // rcx _QWORD *v29; // rsi _QWORD **v30; // [rsp+0h] [rbp-88h] _BYTE v31[40]; // [rsp+8h] [rbp-80h] BYREF _BYTE v32[88]; // [rsp+30h] [rbp-58h] BYREF *(_QWORD *)&v12.m128d_f64[0] = a4; switch ( (int)a3 ) { case -9: if ( (_DWORD)a5 != -9 ) goto LABEL_15; v16 = JS_ToBigInt1(a1, v32, a2, a3); v30 = (_QWORD **)JS_ToBigInt1(a1, v31, a4, a5); v17 = bf_cmp(v16, v30); v18 = (_QWORD **)v16; v13 = v17 == 0; if ( v18 == (_QWORD **)v32 ) { if ( *v18 ) { v29 = v18[4]; if ( v29 ) ((void ( *)(_QWORD, _QWORD *, _QWORD, double))(*v18)[1])(**v18, v29, 0LL, v12.m128d_f64[0]); } } if ( v30 == (_QWORD **)v31 ) { if ( *v30 ) { v19 = v30[4]; if ( v19 ) ((void ( *)(_QWORD, _QWORD *, _QWORD, double))(*v30)[1])(**v30, v19, 0LL, v12.m128d_f64[0]); } } goto LABEL_19; case -8: v20 = (_DWORD)a5 == -8; goto LABEL_18; case -7: if ( (_DWORD)a5 == -7 && (v14 = a2[1] & 0x7FFFFFFF, (_DWORD)v14 == (a4[1] & 0x7FFFFFFF)) ) v13 = (unsigned int)js_string_memcmp(a2, a4, v14) == 0; else LABEL_15: v13 = 0; goto LABEL_19; case -1: v20 = (_DWORD)a5 == -1; LABEL_18: v13 = v20 && a2 == a4; LABEL_19: v21 = (long long *)(a1 + 24); goto LABEL_20; case 0: a8.m128d_f64[0] = (double)(int)a2; goto LABEL_24; case 1: if ( (_DWORD)a5 != 1 ) goto LABEL_29; return (_DWORD)a2 == (_DWORD)a4; case 2: case 3: v13 = (_DWORD)a3 == (_DWORD)a5; goto LABEL_30; case 7: a8 = (__m128d)(unsigned long long)a2; LABEL_24: if ( (_DWORD)a5 == 7 ) goto LABEL_27; if ( (_DWORD)a5 ) { LABEL_29: v13 = 0; LABEL_30: v21 = (long long *)(a1 + 24); LABEL_31: if ( (unsigned int)a5 >= 0xFFFFFFF7 ) { v25 = *v21; v26 = *a4; v27 = (unsigned int)(*a4 - 1); *a4 = v27; if ( v26 <= 1 ) js_free_value_rt(v25, a4, a5, v27, a5, a6); } } else { v12.m128d_f64[0] = (double)(int)a4; LABEL_27: if ( !(_DWORD)a6 || (_DWORD)a6 == 2 ) return *(_OWORD *)&_mm_cmpeq_sd(a8, v12) & 1; else return *(_QWORD *)&a8.m128d_f64[0] == *(_QWORD *)&v12.m128d_f64[0]; } return v13; default: v21 = (long long *)(a1 + 24); v13 = 0; if ( (unsigned int)a3 >= 0xFFFFFFF7 ) { LABEL_20: v22 = *v21; v23 = *a2; v24 = (unsigned int)(*a2 - 1); *a2 = v24; if ( v23 <= 1 ) js_free_value_rt(v22, a2, a3, v24, a5, a6); } goto LABEL_31; } }
js_strict_eq2: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R14,R8 MOV RBX,RCX MOV R13,RDX MOV R12,RSI MOV R15,RDI LEA EAX,[RDX + 0x9] CMP EAX,0x10 JA 0x0013abbf MOVQ XMM0,RBX LEA RCX,[0x19e404] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_2: CMP R13D,R14D SETZ BPL JMP 0x0013ab85 caseD_fffffff9: CMP R14D,-0x7 JNZ 0x0013ab0e MOV EAX,0x7fffffff MOV EDX,dword ptr [R12 + 0x4] AND EDX,EAX AND EAX,dword ptr [RBX + 0x4] CMP EDX,EAX JNZ 0x0013ab0e MOV RDI,R12 MOV RSI,RBX CALL 0x0013c614 TEST EAX,EAX SETZ BPL JMP 0x0013ab29 caseD_1: CMP R14D,0x1 JNZ 0x0013ab83 CMP R12D,EBX LAB_0013aa87: SETZ BPL JMP 0x0013aba9 caseD_fffffff7: CMP R14D,-0x9 JNZ 0x0013ab0e LEA RSI,[RSP + 0x30] MOV RDI,R15 MOV RDX,R12 MOV RCX,R13 CALL 0x001440e1 MOV RBP,RAX LEA RSI,[RSP + 0x8] MOV RDI,R15 MOV RDX,RBX MOV RCX,R14 CALL 0x001440e1 MOV RDI,RBP MOV qword ptr [RSP],RAX MOV RSI,RAX CALL 0x001872f9 MOV RCX,RBP TEST EAX,EAX SETZ BPL LEA RAX,[RSP + 0x30] CMP RCX,RAX JZ 0x0013abd1 LAB_0013aae5: MOV RCX,qword ptr [RSP] LEA RAX,[RSP + 0x8] CMP RCX,RAX JNZ 0x0013ab29 MOV RAX,qword ptr [RCX] TEST RAX,RAX JZ 0x0013ab29 MOV RSI,qword ptr [RCX + 0x20] TEST RSI,RSI JZ 0x0013ab29 MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] JMP 0x0013ab29 LAB_0013ab0e: XOR EBP,EBP JMP 0x0013ab29 caseD_fffffff8: CMP R14D,-0x8 JMP 0x0013ab1c caseD_ffffffff: CMP R14D,-0x1 LAB_0013ab1c: SETZ AL CMP R12,RBX SETZ BPL AND BPL,AL LAB_0013ab29: ADD R15,0x18 LAB_0013ab2d: MOV RDI,qword ptr [R15] MOV EAX,dword ptr [R12] LEA ECX,[RAX + -0x1] MOV dword ptr [R12],ECX CMP EAX,0x1 JG 0x0013ab89 MOV RSI,R12 MOV RDX,R13 CALL 0x00120d90 JMP 0x0013ab89 caseD_7: MOVQ XMM1,R12 JMP 0x0013ab59 caseD_0: CVTSI2SD XMM1,R12D LAB_0013ab59: CMP R14D,0x7 JZ 0x0013ab6b TEST R14D,R14D JNZ 0x0013ab83 XORPS XMM0,XMM0 CVTSI2SD XMM0,EBX LAB_0013ab6b: TEST R9D,R9D JNZ 0x0013abf7 LAB_0013ab74: CMPEQSD XMM1,XMM0 MOVQ RBP,XMM1 AND EBP,0x1 JMP 0x0013aba9 LAB_0013ab83: XOR EBP,EBP LAB_0013ab85: ADD R15,0x18 LAB_0013ab89: CMP R14D,-0x9 JC 0x0013aba9 MOV RDI,qword ptr [R15] MOV EAX,dword ptr [RBX] LEA ECX,[RAX + -0x1] MOV dword ptr [RBX],ECX CMP EAX,0x1 JG 0x0013aba9 MOV RSI,RBX MOV RDX,R14 CALL 0x00120d90 LAB_0013aba9: MOVZX EAX,BPL AND EAX,0x1 ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET caseD_fffffffa: ADD R15,0x18 XOR EBP,EBP CMP R13D,-0x9 JNC 0x0013ab2d JMP 0x0013ab89 LAB_0013abd1: MOV RAX,qword ptr [RCX] TEST RAX,RAX JZ 0x0013aae5 MOV RSI,qword ptr [RCX + 0x20] TEST RSI,RSI JZ 0x0013aae5 MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] JMP 0x0013aae5 LAB_0013abf7: UCOMISD XMM1,XMM1 JP 0x0013ac1f UCOMISD XMM0,XMM0 JP 0x0013ac1f CMP R9D,0x2 JZ 0x0013ab74 MOVQ RAX,XMM1 MOVQ RCX,XMM0 CMP RAX,RCX JMP 0x0013aa87 LAB_0013ac1f: XORPD XMM2,XMM2 CMPUNORDPD XMM1,XMM2 CMPORDPD XMM0,XMM2 XORPD XMM0,XMM1 MOVD EBP,XMM0 JMP 0x0013aba9
bool js_strict_eq2(long param_1,int *param_2,int8 param_3,int *param_4,int8 param_5, int param_6) { int8 *puVar1; int8 uVar2; uint uVar3; int iVar4; long *plVar5; long *plVar6; uint uVar7; bool bVar8; bool bVar9; long local_80 [5]; long local_58 [5]; uVar3 = (uint)param_3; uVar7 = (uint)param_5; switch(uVar3) { case 0: param_2 = (int *)(double)(int)param_2; goto LAB_0013ab59; case 1: if (uVar7 == 1) { return (int)param_2 == (int)param_4; } goto LAB_0013ab83; case 2: case 3: bVar8 = uVar3 == uVar7; goto LAB_0013ab89; case 7: LAB_0013ab59: if (uVar7 == 7) { LAB_0013ab6b: if (param_6 != 0) { if ((NAN((double)param_2)) || (NAN((double)param_4))) { return !NAN((double)param_4) != NAN((double)param_2); } if (param_6 != 2) { return param_2 == param_4; } } return (double)param_2 == (double)param_4; } if (uVar7 == 0) { param_4 = (int *)(double)(int)param_4; goto LAB_0013ab6b; } LAB_0013ab83: bVar8 = false; goto LAB_0013ab89; case 0xfffffff7: if (uVar7 == 0xfffffff7) { plVar5 = (long *)JS_ToBigInt1(param_1,local_58,param_2,param_3); plVar6 = (long *)JS_ToBigInt1(param_1,local_80,param_4,param_5); iVar4 = bf_cmp(plVar5,plVar6); bVar9 = iVar4 == 0; if (((plVar5 == local_58) && (puVar1 = (int8 *)*plVar5, puVar1 != (int8 *)0x0)) && (plVar5[4] != 0)) { (*(code *)puVar1[1])(*puVar1,plVar5[4],0); } if (((plVar6 == local_80) && (puVar1 = (int8 *)*plVar6, puVar1 != (int8 *)0x0)) && (plVar6[4] != 0)) { (*(code *)puVar1[1])(*puVar1,plVar6[4],0); } } else { LAB_0013ab0e: bVar9 = false; } break; case 0xfffffff8: bVar8 = uVar7 == 0xfffffff8; goto LAB_0013ab1c; case 0xfffffff9: if ((uVar7 != 0xfffffff9) || ((param_2[1] & 0x7fffffffU) != (param_4[1] & 0x7fffffffU))) goto LAB_0013ab0e; iVar4 = js_string_memcmp(param_2,param_4); bVar9 = iVar4 == 0; break; default: bVar8 = false; bVar9 = false; if (uVar3 < 0xfffffff7) goto LAB_0013ab89; break; case 0xffffffff: bVar8 = uVar7 == 0xffffffff; LAB_0013ab1c: bVar9 = (bool)(param_2 == param_4 & bVar8); } bVar8 = bVar9; uVar2 = *(int8 *)(param_1 + 0x18); iVar4 = *param_2; *param_2 = iVar4 + -1; if (iVar4 < 2) { js_free_value_rt(uVar2,param_2,param_3); } LAB_0013ab89: if (0xfffffff6 < uVar7) { uVar2 = *(int8 *)(param_1 + 0x18); iVar4 = *param_4; *param_4 = iVar4 + -1; if (iVar4 < 2) { js_free_value_rt(uVar2,param_4,param_5); } } return bVar8; }
20,463
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [5], 0>(char const (&) [5]) const
llama.cpp/common/json.hpp
const_reference at(KeyType && key) const { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return it->second; }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [5], 0>(char const (&) [5]) const: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x40, %rsp movq %rdi, %r14 cmpb $0x1, (%rdi) jne 0x66ef5 movq %rsi, %r15 movq 0x8(%r14), %r12 movq (%r12), %rbx movq 0x8(%r12), %rax cmpq %rax, %rbx je 0x66edf movq %rbx, %rdi movq %r15, %rsi callq 0x1cad0 testl %eax, %eax je 0x66ed4 addq $0x30, %rbx movq 0x8(%r12), %rax cmpq %rax, %rbx jne 0x66eb5 jmp 0x66ed7 movq %rbx, %rax movq 0x8(%r14), %rcx movq 0x8(%rcx), %rbx cmpq %rbx, %rax je 0x66f53 addq $0x20, %rax addq $0x40, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x1c460 movq %rax, %rbx movq %r14, %rdi callq 0x30fda movq %rsp, %rdx movq %rax, (%rdx) leaq 0x64f19(%rip), %rsi # 0xcbe30 leaq 0x20(%rsp), %rdi callq 0x73b07 movb $0x1, %bpl leaq 0x20(%rsp), %rdx movq %rbx, %rdi movl $0x130, %esi # imm = 0x130 movq %r14, %rcx callq 0x72d1c xorl %ebp, %ebp leaq 0x96f9e(%rip), %rsi # 0xfdee0 leaq -0x39743(%rip), %rdx # 0x2d806 movq %rbx, %rdi callq 0x1c7b0 jmp 0x66fcc movl $0x20, %edi callq 0x1c460 movq %rax, %rbx leaq 0x10(%rsp), %r12 movq %r12, -0x10(%r12) movq %r15, %rdi callq 0x1c490 leaq (%rax,%r15), %rdx movq %rsp, %rdi movq %r15, %rsi callq 0x3fe82 leaq 0x6508b(%rip), %rsi # 0xcc013 leaq 0x6508a(%rip), %rcx # 0xcc019 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x763c5 movb $0x1, %bpl leaq 0x20(%rsp), %rdx movq %rbx, %rdi movl $0x193, %esi # imm = 0x193 movq %r14, %rcx callq 0x87c24 xorl %ebp, %ebp leaq 0x96ea3(%rip), %rsi # 0xfde60 leaq -0x397be(%rip), %rdx # 0x2d806 movq %rbx, %rdi callq 0x1c7b0 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x66fea movq 0x30(%rsp), %rsi incq %rsi callq 0x1c110 movq (%rsp), %rdi cmpq %r12, %rdi je 0x67035 movq 0x10(%rsp), %rsi jmp 0x6702d movq %rax, %r14 movq (%rsp), %rdi cmpq %r12, %rdi je 0x6703f movq 0x10(%rsp), %rsi incq %rsi callq 0x1c110 jmp 0x6703f jmp 0x6703c movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x67035 movq 0x30(%rsp), %rsi incq %rsi callq 0x1c110 testb %bpl, %bpl jne 0x6703f jmp 0x67047 movq %rax, %r14 movq %rbx, %rdi callq 0x1caa0 movq %r14, %rdi callq 0x1c7d0 nop
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: push rbp; void * push r15; int push r14; __int64 push r12; int push rbx; void * sub rsp, 40h mov r14, rdi cmp byte ptr [rdi], 1 jnz short loc_66EF5 mov r15, rsi mov r12, [r14+8] mov rbx, [r12] mov rax, [r12+8] cmp rbx, rax jz short loc_66EDF loc_66EB5: mov rdi, rbx mov rsi, r15 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_66ED4 add rbx, 30h ; '0' mov rax, [r12+8] cmp rbx, rax jnz short loc_66EB5 jmp short loc_66ED7 loc_66ED4: mov rax, rbx loc_66ED7: mov rcx, [r14+8] mov rbx, [rcx+8] loc_66EDF: cmp rax, rbx jz short loc_66F53 add rax, 20h ; ' ' add rsp, 40h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_66EF5: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) mov rdx, rsp mov [rdx], rax lea rsi, aCannotUseAtWit; "cannot use at() with " lea rdi, [rsp+68h+var_48] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) mov bpl, 1 lea rdx, [rsp+68h+var_48] mov rdi, rbx; this mov esi, 130h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_66FCC loc_66F53: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r12, [rsp+68h+var_58] mov [r12-10h], r12 mov rdi, r15 call _strlen lea rdx, [rax+r15] mov rdi, rsp mov rsi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rsi, aKey; "key '" lea rcx, aNotFound; "' not found" lea rdi, [rsp+68h+var_48] mov rdx, rsp call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) mov bpl, 1 lea rdx, [rsp+68h+var_48] mov rdi, rbx; this mov esi, 193h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_66FCC: mov r14, rax lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_66FEA mov rsi, [rsp+68h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_66FEA: mov rdi, [rsp+68h+var_68] cmp rdi, r12 jz short loc_67035 mov rsi, [rsp+68h+var_58] jmp short loc_6702D mov r14, rax mov rdi, [rsp+68h+var_68]; void * cmp rdi, r12 jz short loc_6703F mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_6703F jmp short loc_6703C mov r14, rax lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_67035 mov rsi, [rsp+68h+var_38] loc_6702D: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_67035: test bpl, bpl jnz short loc_6703F jmp short loc_67047 loc_6703C: mov r14, rax loc_6703F: mov rdi, rbx; void * call ___cxa_free_exception loc_67047: mov rdi, r14 call __Unwind_Resume
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x40 MOV R14,RDI CMP byte ptr [RDI],0x1 JNZ 0x00166ef5 MOV R15,RSI MOV R12,qword ptr [R14 + 0x8] MOV RBX,qword ptr [R12] MOV RAX,qword ptr [R12 + 0x8] CMP RBX,RAX JZ 0x00166edf LAB_00166eb5: MOV RDI,RBX MOV RSI,R15 CALL 0x0011cad0 TEST EAX,EAX JZ 0x00166ed4 ADD RBX,0x30 MOV RAX,qword ptr [R12 + 0x8] CMP RBX,RAX JNZ 0x00166eb5 JMP 0x00166ed7 LAB_00166ed4: MOV RAX,RBX LAB_00166ed7: MOV RCX,qword ptr [R14 + 0x8] MOV RBX,qword ptr [RCX + 0x8] LAB_00166edf: CMP RAX,RBX JZ 0x00166f53 ADD RAX,0x20 ADD RSP,0x40 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00166ef5: MOV EDI,0x20 CALL 0x0011c460 MOV RBX,RAX MOV RDI,R14 CALL 0x00130fda MOV RDX,RSP MOV qword ptr [RDX],RAX LAB_00166f10: LEA RSI,[0x1cbe30] LEA RDI,[RSP + 0x20] CALL 0x00173b07 MOV BPL,0x1 LAB_00166f24: LEA RDX,[RSP + 0x20] MOV RDI,RBX MOV ESI,0x130 MOV RCX,R14 CALL 0x00172d1c XOR EBP,EBP LEA RSI,[0x1fdee0] LEA RDX,[0x12d806] MOV RDI,RBX CALL 0x0011c7b0 LAB_00166f53: MOV EDI,0x20 CALL 0x0011c460 MOV RBX,RAX LEA R12,[RSP + 0x10] MOV qword ptr [R12 + -0x10],R12 MOV RDI,R15 CALL 0x0011c490 LEA RDX,[RAX + R15*0x1] LAB_00166f76: MOV RDI,RSP MOV RSI,R15 CALL 0x0013fe82 LAB_00166f81: LEA RSI,[0x1cc013] LEA RCX,[0x1cc019] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x001763c5 MOV BPL,0x1 LAB_00166f9f: LEA RDX,[RSP + 0x20] MOV RDI,RBX MOV ESI,0x193 MOV RCX,R14 CALL 0x00187c24 XOR EBP,EBP LEA RSI,[0x1fde60] LEA RDX,[0x12d806] MOV RDI,RBX CALL 0x0011c7b0
char * _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_ (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *param_1,char *param_2) { long *plVar1; int iVar2; char *pcVar3; int8 uVar4; size_t sVar5; char *pcVar6; char *local_68 [2]; char local_58 [16]; detail local_48 [32]; if (*param_1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar4 = __cxa_allocate_exception(0x20); local_68[0] = (char *)nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::type_name(param_1); /* try { // try from 00166f10 to 00166f20 has its CatchHandler @ 0016703c */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*> (local_48,"cannot use at() with ",local_68); /* try { // try from 00166f24 to 00166f50 has its CatchHandler @ 00167017 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar4,0x130,local_48,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } plVar1 = *(long **)(param_1 + 8); pcVar6 = (char *)*plVar1; pcVar3 = (char *)plVar1[1]; if (pcVar6 != pcVar3) { do { pcVar3 = pcVar6; iVar2 = std::__cxx11::string::compare(pcVar3); if (iVar2 == 0) break; pcVar6 = pcVar3 + 0x30; pcVar3 = (char *)plVar1[1]; } while (pcVar6 != pcVar3); pcVar6 = *(char **)(*(long *)(param_1 + 8) + 8); } if (pcVar3 == pcVar6) { uVar4 = __cxa_allocate_exception(0x20); local_68[0] = local_58; sVar5 = strlen(param_2); /* try { // try from 00166f76 to 00166f80 has its CatchHandler @ 00167015 */ std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5); /* try { // try from 00166f81 to 00166f9b has its CatchHandler @ 00166ffa */ nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]> (local_48,"key \'",(string *)local_68,"\' not found"); /* try { // try from 00166f9f to 00166fcb has its CatchHandler @ 00166fcc */ _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar4,0x193,local_48,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return pcVar3 + 0x20; }
20,464
my_hash_sort_simple
eloqsql/strings/ctype-simple.c
void my_hash_sort_simple(CHARSET_INFO *cs, const uchar *key, size_t len, ulong *nr1, ulong *nr2) { register const uchar *sort_order=cs->sort_order; const uchar *end; uint16 space_weight= sort_order[' ']; /* Remove all trailing characters that are equal to space. We have to do this to be able to compare 'A ' and 'A' as identical. If the key is long enough, cut the trailing spaces (0x20) using an optimized function implemented in skip_trailing_spaces(). "len > 16" is just some heuristic here. Calling skip_triling_space() for short values is not desirable, because its initialization block may be more expensive than the performance gained. */ end= len > 16 ? skip_trailing_space(key, len) : key + len; /* We removed all trailing characters that are binary equal to space 0x20. Now remove all trailing characters that have weights equal to space. Some 8bit simple collations may have such characters: - cp1250_general_ci 0xA0 NO-BREAK SPACE == 0x20 SPACE - cp1251_ukrainian_ci 0x60 GRAVE ACCENT == 0x20 SPACE - koi8u_general_ci 0x60 GRAVE ACCENT == 0x20 SPACE */ for ( ; key < end ; ) { if (sort_order[*--end] != space_weight) { end++; break; } } my_hash_sort_simple_nopad(cs, key, end - key, nr1, nr2); }
O0
c
my_hash_sort_simple: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x8(%rbp), %rax movq 0x58(%rax), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movzbl 0x20(%rax), %eax movw %ax, -0x3a(%rbp) cmpq $0x10, -0x18(%rbp) jbe 0x53cce movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x53d50 movq %rax, -0x48(%rbp) jmp 0x53cda movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax cmpq -0x38(%rbp), %rax jae 0x53d1f movq -0x30(%rbp), %rax movq -0x38(%rbp), %rcx movq %rcx, %rdx addq $-0x1, %rdx movq %rdx, -0x38(%rbp) movzbl -0x1(%rcx), %ecx movzbl (%rax,%rcx), %eax movzwl -0x3a(%rbp), %ecx cmpl %ecx, %eax je 0x53d1d movq -0x38(%rbp), %rax addq $0x1, %rax movq %rax, -0x38(%rbp) jmp 0x53d1f jmp 0x53ce2 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x38(%rbp), %rdx movq -0x10(%rbp), %rax subq %rax, %rdx movq -0x20(%rbp), %rcx movq -0x28(%rbp), %r8 callq 0x53bc0 addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_hash_sort_simple: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rax, [rbp+var_8] mov rax, [rax+58h] mov [rbp+var_30], rax mov rax, [rbp+var_30] movzx eax, byte ptr [rax+20h] mov [rbp+var_3A], ax cmp [rbp+var_18], 10h jbe short loc_53CCE mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call skip_trailing_space_2 mov [rbp+var_48], rax jmp short loc_53CDA loc_53CCE: mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_48], rax loc_53CDA: mov rax, [rbp+var_48] mov [rbp+var_38], rax loc_53CE2: mov rax, [rbp+var_10] cmp rax, [rbp+var_38] jnb short loc_53D1F mov rax, [rbp+var_30] mov rcx, [rbp+var_38] mov rdx, rcx add rdx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_38], rdx movzx ecx, byte ptr [rcx-1] movzx eax, byte ptr [rax+rcx] movzx ecx, [rbp+var_3A] cmp eax, ecx jz short loc_53D1D mov rax, [rbp+var_38] add rax, 1 mov [rbp+var_38], rax jmp short loc_53D1F loc_53D1D: jmp short loc_53CE2 loc_53D1F: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_38] mov rax, [rbp+var_10] sub rdx, rax mov rcx, [rbp+var_20] mov r8, [rbp+var_28] call my_hash_sort_simple_nopad add rsp, 50h pop rbp retn
_QWORD * my_hash_sort_simple(long long a1, unsigned __int8 *a2, unsigned long long a3, long long *a4, _QWORD *a5) { unsigned long long v5; // rcx long long v7; // [rsp+8h] [rbp-48h] __int16 v8; // [rsp+16h] [rbp-3Ah] unsigned long long v9; // [rsp+18h] [rbp-38h] long long v10; // [rsp+20h] [rbp-30h] v10 = *(_QWORD *)(a1 + 88); v8 = *(unsigned __int8 *)(v10 + 32); if ( a3 <= 0x10 ) v7 = (long long)&a2[a3]; else v7 = skip_trailing_space_2(a2, a3); v9 = v7; while ( (unsigned long long)a2 < v9 ) { v5 = v9--; if ( *(unsigned __int8 *)(v10 + *(unsigned __int8 *)(v5 - 1)) != v8 ) return my_hash_sort_simple_nopad(a1, a2, ++v9 - (_QWORD)a2, a4, a5); } return my_hash_sort_simple_nopad(a1, a2, v9 - (_QWORD)a2, a4, a5); }
my_hash_sort_simple: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x58] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,byte ptr [RAX + 0x20] MOV word ptr [RBP + -0x3a],AX CMP qword ptr [RBP + -0x18],0x10 JBE 0x00153cce MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00153d50 MOV qword ptr [RBP + -0x48],RAX JMP 0x00153cda LAB_00153cce: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x48],RAX LAB_00153cda: MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x38],RAX LAB_00153ce2: MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x38] JNC 0x00153d1f MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x38] MOV RDX,RCX ADD RDX,-0x1 MOV qword ptr [RBP + -0x38],RDX MOVZX ECX,byte ptr [RCX + -0x1] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOVZX ECX,word ptr [RBP + -0x3a] CMP EAX,ECX JZ 0x00153d1d MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x1 MOV qword ptr [RBP + -0x38],RAX JMP 0x00153d1f LAB_00153d1d: JMP 0x00153ce2 LAB_00153d1f: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x10] SUB RDX,RAX MOV RCX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x28] CALL 0x00153bc0 ADD RSP,0x50 POP RBP RET
void my_hash_sort_simple(long param_1,ulong param_2,ulong param_3,int8 param_4, int8 param_5) { char cVar1; long lVar2; ulong uVar3; ulong local_50; ulong local_40; lVar2 = *(long *)(param_1 + 0x58); cVar1 = *(char *)(lVar2 + 0x20); if (param_3 < 0x11) { local_50 = param_2 + param_3; } else { local_50 = skip_trailing_space(param_2,param_3); } local_40 = local_50; uVar3 = local_40; do { local_40 = uVar3; if (local_40 <= param_2) break; uVar3 = local_40 - 1; } while (*(char *)(lVar2 + (ulong)*(byte *)(local_40 - 1)) == cVar1); my_hash_sort_simple_nopad(param_1,param_2,local_40 - param_2,param_4,param_5); return; }
20,465
ELFIO::section_impl<ELFIO::Elf64_Shdr>::save(std::ostream&, std::fpos<__mbstate_t>, std::fpos<__mbstate_t>)
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/include/elfio/elfio_section.hpp
void save( std::ostream& f, std::streampos header_offset, std::streampos data_offset ) { if ( 0 != get_index() ) { header.sh_offset = data_offset; header.sh_offset = (*convertor)( header.sh_offset ); } save_header( f, header_offset ); if ( get_type() != SHT_NOBITS && get_type() != SHT_NULL && get_size() != 0 && data != 0 ) { save_data( f, data_offset ); } }
O0
cpp
ELFIO::section_impl<ELFIO::Elf64_Shdr>::save(std::ostream&, std::fpos<__mbstate_t>, std::fpos<__mbstate_t>): subq $0x58, %rsp movq %rdx, 0x48(%rsp) movq %rcx, 0x50(%rsp) movq %r8, 0x38(%rsp) movq %r9, 0x40(%rsp) movq %rdi, 0x30(%rsp) movq %rsi, 0x28(%rsp) movq 0x30(%rsp), %rdi movq %rdi, (%rsp) movq (%rdi), %rax callq *0x10(%rax) movzwl %ax, %ecx xorl %eax, %eax cmpl %ecx, %eax je 0x1aab3 leaq 0x38(%rsp), %rdi callq 0x19e10 movq %rax, %rcx movq (%rsp), %rax movl %ecx, 0x20(%rax) movq 0x70(%rax), %rdi movl 0x20(%rax), %esi callq 0x17980 movl %eax, %ecx movq (%rsp), %rax movl %ecx, 0x20(%rax) movq (%rsp), %rdi movq 0x28(%rsp), %rsi movq 0x48(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x50(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x18(%rsp), %rdx movq 0x20(%rsp), %rcx callq 0x1ab60 movq (%rsp), %rdi movq (%rdi), %rax callq *0x28(%rax) cmpl $0x8, %eax je 0x1ab47 movq (%rsp), %rdi movq (%rdi), %rax callq *0x28(%rax) cmpl $0x0, %eax je 0x1ab47 movq (%rsp), %rdi movq (%rdi), %rax callq *0x98(%rax) cmpq $0x0, %rax je 0x1ab47 movq (%rsp), %rax cmpq $0x0, 0x60(%rax) je 0x1ab47 movq (%rsp), %rdi movq 0x28(%rsp), %rsi movq 0x38(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x40(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x8(%rsp), %rdx movq 0x10(%rsp), %rcx callq 0x1abd0 addq $0x58, %rsp retq nopl (%rax)
_ZN5ELFIO12section_implINS_10Elf32_ShdrEE4saveERSoSt4fposI11__mbstate_tES6_: sub rsp, 58h mov [rsp+58h+var_10], rdx mov [rsp+58h+var_8], rcx mov [rsp+58h+var_20], r8 mov [rsp+58h+var_18], r9 mov [rsp+58h+var_28], rdi mov [rsp+58h+var_30], rsi mov rdi, [rsp+58h+var_28] mov [rsp+58h+var_58], rdi mov rax, [rdi] call qword ptr [rax+10h] movzx ecx, ax xor eax, eax cmp eax, ecx jz short loc_1AAB3 lea rdi, [rsp+58h+var_20] call _ZNKSt4fposI11__mbstate_tEcvlEv; std::fpos<__mbstate_t>::operator long(void) mov rcx, rax mov rax, [rsp+58h+var_58] mov [rax+20h], ecx mov rdi, [rax+70h] mov esi, [rax+20h] call _ZNK5ELFIO19endianess_convertorclEj; ELFIO::endianess_convertor::operator()(uint) mov ecx, eax mov rax, [rsp+58h+var_58] mov [rax+20h], ecx loc_1AAB3: mov rdi, [rsp+58h+var_58] mov rsi, [rsp+58h+var_30] mov rax, [rsp+58h+var_10] mov [rsp+58h+var_40], rax mov rax, [rsp+58h+var_8] mov [rsp+58h+var_38], rax mov rdx, [rsp+58h+var_40] mov rcx, [rsp+58h+var_38] call _ZNK5ELFIO12section_implINS_10Elf32_ShdrEE11save_headerERSoSt4fposI11__mbstate_tE; ELFIO::section_impl<ELFIO::Elf32_Shdr>::save_header(std::ostream &,std::fpos<__mbstate_t>) mov rdi, [rsp+58h+var_58] mov rax, [rdi] call qword ptr [rax+28h] cmp eax, 8 jz short loc_1AB47 mov rdi, [rsp+58h+var_58] mov rax, [rdi] call qword ptr [rax+28h] cmp eax, 0 jz short loc_1AB47 mov rdi, [rsp+58h+var_58] mov rax, [rdi] call qword ptr [rax+98h] cmp rax, 0 jz short loc_1AB47 mov rax, [rsp+58h+var_58] cmp qword ptr [rax+60h], 0 jz short loc_1AB47 mov rdi, [rsp+58h+var_58] mov rsi, [rsp+58h+var_30] mov rax, [rsp+58h+var_20] mov [rsp+58h+var_50], rax mov rax, [rsp+58h+var_18] mov [rsp+58h+var_48], rax mov rdx, [rsp+58h+var_50] mov rcx, [rsp+58h+var_48] call _ZNK5ELFIO12section_implINS_10Elf32_ShdrEE9save_dataERSoSt4fposI11__mbstate_tE; ELFIO::section_impl<ELFIO::Elf32_Shdr>::save_data(std::ostream &,std::fpos<__mbstate_t>) loc_1AB47: add rsp, 58h retn
long long ELFIO::section_impl<ELFIO::Elf32_Shdr>::save( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6) { long long result; // rax long long v7; // [rsp+38h] [rbp-20h] BYREF long long v8; // [rsp+40h] [rbp-18h] long long v9; // [rsp+48h] [rbp-10h] long long v10; // [rsp+50h] [rbp-8h] v9 = a3; v10 = a4; v7 = a5; v8 = a6; if ( (*(unsigned __int16 ( **)(long long))(*(_QWORD *)a1 + 16LL))(a1) ) { *(_DWORD *)(a1 + 32) = std::fpos<__mbstate_t>::operator long((long long)&v7); *(_DWORD *)(a1 + 32) = ELFIO::endianess_convertor::operator()(*(_BYTE **)(a1 + 112), *(_DWORD *)(a1 + 32)); } ELFIO::section_impl<ELFIO::Elf32_Shdr>::save_header(a1, a2, v9, v10); result = (*(long long ( **)(long long))(*(_QWORD *)a1 + 40LL))(a1); if ( (_DWORD)result != 8 ) { result = (*(long long ( **)(long long))(*(_QWORD *)a1 + 40LL))(a1); if ( (_DWORD)result ) { result = (*(long long ( **)(long long))(*(_QWORD *)a1 + 152LL))(a1); if ( result ) { result = a1; if ( *(_QWORD *)(a1 + 96) ) return ELFIO::section_impl<ELFIO::Elf32_Shdr>::save_data(a1, a2, v7, v8); } } } return result; }
save: SUB RSP,0x58 MOV qword ptr [RSP + 0x48],RDX MOV qword ptr [RSP + 0x50],RCX MOV qword ptr [RSP + 0x38],R8 MOV qword ptr [RSP + 0x40],R9 MOV qword ptr [RSP + 0x30],RDI MOV qword ptr [RSP + 0x28],RSI MOV RDI,qword ptr [RSP + 0x30] MOV qword ptr [RSP],RDI MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x10] MOVZX ECX,AX XOR EAX,EAX CMP EAX,ECX JZ 0x0011aab3 LEA RDI,[RSP + 0x38] CALL 0x00119e10 MOV RCX,RAX MOV RAX,qword ptr [RSP] MOV dword ptr [RAX + 0x20],ECX MOV RDI,qword ptr [RAX + 0x70] MOV ESI,dword ptr [RAX + 0x20] CALL 0x00117980 MOV ECX,EAX MOV RAX,qword ptr [RSP] MOV dword ptr [RAX + 0x20],ECX LAB_0011aab3: MOV RDI,qword ptr [RSP] MOV RSI,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x20],RAX MOV RDX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x20] CALL 0x0011ab60 MOV RDI,qword ptr [RSP] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x28] CMP EAX,0x8 JZ 0x0011ab47 MOV RDI,qword ptr [RSP] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x28] CMP EAX,0x0 JZ 0x0011ab47 MOV RDI,qword ptr [RSP] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x98] CMP RAX,0x0 JZ 0x0011ab47 MOV RAX,qword ptr [RSP] CMP qword ptr [RAX + 0x60],0x0 JZ 0x0011ab47 MOV RDI,qword ptr [RSP] MOV RSI,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x10],RAX MOV RDX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x10] CALL 0x0011abd0 LAB_0011ab47: ADD RSP,0x58 RET
/* ELFIO::section_impl<ELFIO::Elf32_Shdr>::save(std::ostream&, std::fpos<__mbstate_t>, std::fpos<__mbstate_t>) */ void ELFIO::section_impl<ELFIO::Elf32_Shdr>::save (long *param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6) { short sVar1; int4 uVar2; int iVar3; long lVar4; int8 local_20; int8 local_18; int8 local_10; int8 local_8; local_20 = param_5; local_18 = param_6; local_10 = param_3; local_8 = param_4; sVar1 = (**(code **)(*param_1 + 0x10))(); if (sVar1 != 0) { lVar4 = std::fpos::operator_cast_to_long((fpos *)&local_20); *(int *)(param_1 + 4) = (int)lVar4; uVar2 = endianess_convertor::operator() ((endianess_convertor *)param_1[0xe],*(uint *)(param_1 + 4)); *(int4 *)(param_1 + 4) = uVar2; } save_header(param_1,param_2,local_10,local_8); iVar3 = (**(code **)(*param_1 + 0x28))(); if (iVar3 != 8) { iVar3 = (**(code **)(*param_1 + 0x28))(); if (iVar3 != 0) { lVar4 = (**(code **)(*param_1 + 0x98))(); if ((lVar4 != 0) && (param_1[0xc] != 0)) { save_data(param_1,param_2,local_20,local_18); } } } return; }
20,466
ELFIO::section_impl<ELFIO::Elf64_Shdr>::save(std::ostream&, std::fpos<__mbstate_t>, std::fpos<__mbstate_t>)
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/include/elfio/elfio_section.hpp
void save( std::ostream& f, std::streampos header_offset, std::streampos data_offset ) { if ( 0 != get_index() ) { header.sh_offset = data_offset; header.sh_offset = (*convertor)( header.sh_offset ); } save_header( f, header_offset ); if ( get_type() != SHT_NOBITS && get_type() != SHT_NULL && get_size() != 0 && data != 0 ) { save_data( f, data_offset ); } }
O1
cpp
ELFIO::section_impl<ELFIO::Elf64_Shdr>::save(std::ostream&, std::fpos<__mbstate_t>, std::fpos<__mbstate_t>): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r9, %rbx movq %r8, %r14 movq %rcx, %r13 movq %rdx, %rbp movq %rsi, %r15 movq %rdi, %r12 movq (%rdi), %rax callq *0x10(%rax) testw %ax, %ax je 0xd8c3 movl %r14d, 0x20(%r12) movq 0x70(%r12), %rax movl %r14d, %ecx cmpb $0x0, (%rax) bswapl %ecx cmovel %r14d, %ecx movl %ecx, 0x20(%r12) movq %r15, %rdi movq %rbp, %rsi movq %r13, %rdx callq 0xb230 leaq 0x10(%r12), %rsi movl $0x28, %edx movq %r15, %rdi callq 0xb290 movq (%r12), %rax movq %r12, %rdi callq *0x28(%rax) cmpl $0x8, %eax je 0xd939 movq (%r12), %rax movq %r12, %rdi callq *0x28(%rax) testl %eax, %eax je 0xd939 movq (%r12), %rax movq %r12, %rdi callq *0x98(%rax) testq %rax, %rax je 0xd939 cmpq $0x0, 0x60(%r12) je 0xd939 movq %r12, %rdi movq %r15, %rsi movq %r14, %rdx movq %rbx, %rcx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0xd94c addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN5ELFIO12section_implINS_10Elf32_ShdrEE4saveERSoSt4fposI11__mbstate_tES6_: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, r9 mov r14, r8 mov r13, rcx mov rbp, rdx mov r15, rsi mov r12, rdi mov rax, [rdi] call qword ptr [rax+10h] test ax, ax jz short loc_D8C3 mov [r12+20h], r14d mov rax, [r12+70h] mov ecx, r14d cmp byte ptr [rax], 0 bswap ecx cmovz ecx, r14d mov [r12+20h], ecx loc_D8C3: mov rdi, r15 mov rsi, rbp mov rdx, r13 call __ZNSo5seekpESt4fposI11__mbstate_tE; std::ostream::seekp(std::fpos<__mbstate_t>) lea rsi, [r12+10h]; char * mov edx, 28h ; '('; __int64 mov rdi, r15; this call __ZNSo5writeEPKcl; std::ostream::write(char const*,long) mov rax, [r12] mov rdi, r12 call qword ptr [rax+28h] cmp eax, 8 jz short loc_D939 mov rax, [r12] mov rdi, r12 call qword ptr [rax+28h] test eax, eax jz short loc_D939 mov rax, [r12] mov rdi, r12 call qword ptr [rax+98h] test rax, rax jz short loc_D939 cmp qword ptr [r12+60h], 0 jz short loc_D939 mov rdi, r12 mov rsi, r15 mov rdx, r14 mov rcx, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _ZNK5ELFIO12section_implINS_10Elf32_ShdrEE9save_dataERSoSt4fposI11__mbstate_tE; ELFIO::section_impl<ELFIO::Elf32_Shdr>::save_data(std::ostream &,std::fpos<__mbstate_t>) loc_D939: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ELFIO::section_impl<ELFIO::Elf32_Shdr>::save( long long a1, std::ostream *a2, long long a3, long long a4, long long a5, long long a6) { unsigned __int32 v10; // ecx long long result; // rax if ( (*(unsigned __int16 ( **)(long long))(*(_QWORD *)a1 + 16LL))(a1) ) { *(_DWORD *)(a1 + 32) = a5; v10 = _byteswap_ulong(a5); if ( !**(_BYTE **)(a1 + 112) ) v10 = a5; *(_DWORD *)(a1 + 32) = v10; } std::ostream::seekp(a2, a3, a4); std::ostream::write(a2, (const char *)(a1 + 16), 40LL); result = (*(long long ( **)(long long))(*(_QWORD *)a1 + 40LL))(a1); if ( (_DWORD)result != 8 ) { result = (*(long long ( **)(long long))(*(_QWORD *)a1 + 40LL))(a1); if ( (_DWORD)result ) { result = (*(long long ( **)(long long))(*(_QWORD *)a1 + 152LL))(a1); if ( result ) { if ( *(_QWORD *)(a1 + 96) ) return ELFIO::section_impl<ELFIO::Elf32_Shdr>::save_data(a1, a2, a5, a6); } } } return result; }
save: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,R9 MOV R14,R8 MOV R13,RCX MOV RBP,RDX MOV R15,RSI MOV R12,RDI MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x10] TEST AX,AX JZ 0x0010d8c3 MOV dword ptr [R12 + 0x20],R14D MOV RAX,qword ptr [R12 + 0x70] MOV ECX,R14D CMP byte ptr [RAX],0x0 BSWAP ECX CMOVZ ECX,R14D MOV dword ptr [R12 + 0x20],ECX LAB_0010d8c3: MOV RDI,R15 MOV RSI,RBP MOV RDX,R13 CALL 0x0010b230 LEA RSI,[R12 + 0x10] MOV EDX,0x28 MOV RDI,R15 CALL 0x0010b290 MOV RAX,qword ptr [R12] MOV RDI,R12 CALL qword ptr [RAX + 0x28] CMP EAX,0x8 JZ 0x0010d939 MOV RAX,qword ptr [R12] MOV RDI,R12 CALL qword ptr [RAX + 0x28] TEST EAX,EAX JZ 0x0010d939 MOV RAX,qword ptr [R12] MOV RDI,R12 CALL qword ptr [RAX + 0x98] TEST RAX,RAX JZ 0x0010d939 CMP qword ptr [R12 + 0x60],0x0 JZ 0x0010d939 MOV RDI,R12 MOV RSI,R15 MOV RDX,R14 MOV RCX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0010d94c LAB_0010d939: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* ELFIO::section_impl<ELFIO::Elf32_Shdr>::save(std::ostream&, std::fpos<__mbstate_t>, std::fpos<__mbstate_t>) */ void ELFIO::section_impl<ELFIO::Elf32_Shdr>::save (long *param_1,char *param_2,int8 param_3,int8 param_4,int8 param_5 ,int8 param_6) { short sVar1; int iVar2; long lVar3; uint uVar4; uint uVar5; sVar1 = (**(code **)(*param_1 + 0x10))(); if (sVar1 != 0) { uVar5 = (uint)param_5; *(uint *)(param_1 + 4) = uVar5; uVar4 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18; if (*(char *)param_1[0xe] == '\0') { uVar4 = uVar5; } *(uint *)(param_1 + 4) = uVar4; } std::ostream::seekp(param_2,param_3,param_4); std::ostream::write(param_2,(long)(param_1 + 2)); iVar2 = (**(code **)(*param_1 + 0x28))(param_1); if (iVar2 != 8) { iVar2 = (**(code **)(*param_1 + 0x28))(param_1); if (iVar2 != 0) { lVar3 = (**(code **)(*param_1 + 0x98))(param_1); if ((lVar3 != 0) && (param_1[0xc] != 0)) { save_data(param_1,param_2,param_5,param_6); return; } } } return; }
20,467
ELFIO::section_impl<ELFIO::Elf64_Shdr>::save(std::ostream&, std::fpos<__mbstate_t>, std::fpos<__mbstate_t>)
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/include/elfio/elfio_section.hpp
void save( std::ostream& f, std::streampos header_offset, std::streampos data_offset ) { if ( 0 != get_index() ) { header.sh_offset = data_offset; header.sh_offset = (*convertor)( header.sh_offset ); } save_header( f, header_offset ); if ( get_type() != SHT_NOBITS && get_type() != SHT_NULL && get_size() != 0 && data != 0 ) { save_data( f, data_offset ); } }
O3
cpp
ELFIO::section_impl<ELFIO::Elf64_Shdr>::save(std::ostream&, std::fpos<__mbstate_t>, std::fpos<__mbstate_t>): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r9, %rbx movq %r8, %r14 movq %rcx, %r13 movq %rdx, %rbp movq %rsi, %r15 movq %rdi, %r12 movq (%rdi), %rax callq *0x10(%rax) testw %ax, %ax je 0xd874 movq 0x70(%r12), %rax movl %r14d, %ecx cmpb $0x0, (%rax) bswapl %ecx cmovel %r14d, %ecx movl %ecx, 0x20(%r12) movq %r15, %rdi movq %rbp, %rsi movq %r13, %rdx callq 0xb230 leaq 0x10(%r12), %rsi movl $0x28, %edx movq %r15, %rdi callq 0xb290 movq (%r12), %rax movq %r12, %rdi callq *0x28(%rax) cmpl $0x8, %eax je 0xd8ea movq (%r12), %rax movq %r12, %rdi callq *0x28(%rax) testl %eax, %eax je 0xd8ea movq (%r12), %rax movq %r12, %rdi callq *0x98(%rax) testq %rax, %rax je 0xd8ea cmpq $0x0, 0x60(%r12) je 0xd8ea movq %r12, %rdi movq %r15, %rsi movq %r14, %rdx movq %rbx, %rcx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0xd8fe addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN5ELFIO12section_implINS_10Elf32_ShdrEE4saveERSoSt4fposI11__mbstate_tES6_: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, r9 mov r14, r8 mov r13, rcx mov rbp, rdx mov r15, rsi mov r12, rdi mov rax, [rdi] call qword ptr [rax+10h] test ax, ax jz short loc_D874 mov rax, [r12+70h] mov ecx, r14d cmp byte ptr [rax], 0 bswap ecx cmovz ecx, r14d mov [r12+20h], ecx loc_D874: mov rdi, r15 mov rsi, rbp mov rdx, r13 call __ZNSo5seekpESt4fposI11__mbstate_tE; std::ostream::seekp(std::fpos<__mbstate_t>) lea rsi, [r12+10h]; char * mov edx, 28h ; '('; __int64 mov rdi, r15; this call __ZNSo5writeEPKcl; std::ostream::write(char const*,long) mov rax, [r12] mov rdi, r12 call qword ptr [rax+28h] cmp eax, 8 jz short loc_D8EA mov rax, [r12] mov rdi, r12 call qword ptr [rax+28h] test eax, eax jz short loc_D8EA mov rax, [r12] mov rdi, r12 call qword ptr [rax+98h] test rax, rax jz short loc_D8EA cmp qword ptr [r12+60h], 0 jz short loc_D8EA mov rdi, r12 mov rsi, r15 mov rdx, r14 mov rcx, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _ZNK5ELFIO12section_implINS_10Elf32_ShdrEE9save_dataERSoSt4fposI11__mbstate_tE; ELFIO::section_impl<ELFIO::Elf32_Shdr>::save_data(std::ostream &,std::fpos<__mbstate_t>) loc_D8EA: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ELFIO::section_impl<ELFIO::Elf32_Shdr>::save( long long a1, std::ostream *a2, long long a3, long long a4, long long a5, long long a6) { unsigned __int32 v10; // ecx long long result; // rax if ( (*(unsigned __int16 ( **)(long long))(*(_QWORD *)a1 + 16LL))(a1) ) { v10 = _byteswap_ulong(a5); if ( !**(_BYTE **)(a1 + 112) ) v10 = a5; *(_DWORD *)(a1 + 32) = v10; } std::ostream::seekp(a2, a3, a4); std::ostream::write(a2, (const char *)(a1 + 16), 40LL); result = (*(long long ( **)(long long))(*(_QWORD *)a1 + 40LL))(a1); if ( (_DWORD)result != 8 ) { result = (*(long long ( **)(long long))(*(_QWORD *)a1 + 40LL))(a1); if ( (_DWORD)result ) { result = (*(long long ( **)(long long))(*(_QWORD *)a1 + 152LL))(a1); if ( result ) { if ( *(_QWORD *)(a1 + 96) ) return ELFIO::section_impl<ELFIO::Elf32_Shdr>::save_data(a1, a2, a5, a6); } } } return result; }
save: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,R9 MOV R14,R8 MOV R13,RCX MOV RBP,RDX MOV R15,RSI MOV R12,RDI MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x10] TEST AX,AX JZ 0x0010d874 MOV RAX,qword ptr [R12 + 0x70] MOV ECX,R14D CMP byte ptr [RAX],0x0 BSWAP ECX CMOVZ ECX,R14D MOV dword ptr [R12 + 0x20],ECX LAB_0010d874: MOV RDI,R15 MOV RSI,RBP MOV RDX,R13 CALL 0x0010b230 LEA RSI,[R12 + 0x10] MOV EDX,0x28 MOV RDI,R15 CALL 0x0010b290 MOV RAX,qword ptr [R12] MOV RDI,R12 CALL qword ptr [RAX + 0x28] CMP EAX,0x8 JZ 0x0010d8ea MOV RAX,qword ptr [R12] MOV RDI,R12 CALL qword ptr [RAX + 0x28] TEST EAX,EAX JZ 0x0010d8ea MOV RAX,qword ptr [R12] MOV RDI,R12 CALL qword ptr [RAX + 0x98] TEST RAX,RAX JZ 0x0010d8ea CMP qword ptr [R12 + 0x60],0x0 JZ 0x0010d8ea MOV RDI,R12 MOV RSI,R15 MOV RDX,R14 MOV RCX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0010d8fe LAB_0010d8ea: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* ELFIO::section_impl<ELFIO::Elf32_Shdr>::save(std::ostream&, std::fpos<__mbstate_t>, std::fpos<__mbstate_t>) */ void ELFIO::section_impl<ELFIO::Elf32_Shdr>::save (long *param_1,char *param_2,int8 param_3,int8 param_4,int8 param_5 ,int8 param_6) { short sVar1; int iVar2; long lVar3; uint uVar4; uint uVar5; sVar1 = (**(code **)(*param_1 + 0x10))(); if (sVar1 != 0) { uVar5 = (uint)param_5; uVar4 = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18; if (*(char *)param_1[0xe] == '\0') { uVar4 = uVar5; } *(uint *)(param_1 + 4) = uVar4; } std::ostream::seekp(param_2,param_3,param_4); std::ostream::write(param_2,(long)(param_1 + 2)); iVar2 = (**(code **)(*param_1 + 0x28))(param_1); if (iVar2 != 8) { iVar2 = (**(code **)(*param_1 + 0x28))(param_1); if (iVar2 != 0) { lVar3 = (**(code **)(*param_1 + 0x98))(param_1); if ((lVar3 != 0) && (param_1[0xc] != 0)) { save_data(param_1,param_2,param_5,param_6); return; } } } return; }
20,468
my_strxfrm_flag_normalize
eloqsql/strings/ctype-simple.c
uint my_strxfrm_flag_normalize(uint flags, uint maximum) { DBUG_ASSERT(maximum >= 1 && maximum <= MY_STRXFRM_NLEVELS); /* If levels are omitted, then 1-maximum is assumed*/ if (!(flags & MY_STRXFRM_LEVEL_ALL)) { static uint def_level_flags[]= {0, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F }; uint flag_pad= flags & (MY_STRXFRM_PAD_WITH_SPACE | MY_STRXFRM_PAD_TO_MAXLEN); flags= def_level_flags[maximum] | flag_pad; } else { uint i; uint flag_lev= flags & MY_STRXFRM_LEVEL_ALL; uint flag_dsc= (flags >> MY_STRXFRM_DESC_SHIFT) & MY_STRXFRM_LEVEL_ALL; uint flag_rev= (flags >> MY_STRXFRM_REVERSE_SHIFT) & MY_STRXFRM_LEVEL_ALL; uint flag_pad= flags & (MY_STRXFRM_PAD_WITH_SPACE | MY_STRXFRM_PAD_TO_MAXLEN); /* If any level number is greater than the maximum, it is treated as the maximum. */ for (maximum--, flags= 0, i= 0; i < MY_STRXFRM_NLEVELS; i++) { uint src_bit= 1 << i; if (flag_lev & src_bit) { uint dst_bit= 1 << MY_MIN(i, maximum); flags|= dst_bit; flags|= (flag_dsc & dst_bit) << MY_STRXFRM_DESC_SHIFT; flags|= (flag_rev & dst_bit) << MY_STRXFRM_REVERSE_SHIFT; } } flags|= flag_pad; } return flags; }
O0
c
my_strxfrm_flag_normalize: pushq %rbp movq %rsp, %rbp movl %edi, -0x4(%rbp) movl %esi, -0x8(%rbp) jmp 0x4603c movl -0x4(%rbp), %eax andl $0x3f, %eax cmpl $0x0, %eax jne 0x4606c movl -0x4(%rbp), %eax andl $0xc0, %eax movl %eax, -0xc(%rbp) movl -0x8(%rbp), %eax movl %eax, %ecx leaq 0x22ebb2(%rip), %rax # 0x274c10 movl (%rax,%rcx,4), %eax orl -0xc(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x4612d movl -0x4(%rbp), %eax andl $0x3f, %eax movl %eax, -0x14(%rbp) movl -0x4(%rbp), %eax shrl $0x8, %eax andl $0x3f, %eax movl %eax, -0x18(%rbp) movl -0x4(%rbp), %eax shrl $0x10, %eax andl $0x3f, %eax movl %eax, -0x1c(%rbp) movl -0x4(%rbp), %eax andl $0xc0, %eax movl %eax, -0x20(%rbp) movl -0x8(%rbp), %eax addl $-0x1, %eax movl %eax, -0x8(%rbp) movl $0x0, -0x4(%rbp) movl $0x0, -0x10(%rbp) cmpl $0x6, -0x10(%rbp) jae 0x46124 movl -0x10(%rbp), %ecx movl $0x1, %eax shll %cl, %eax movl %eax, -0x24(%rbp) movl -0x14(%rbp), %eax andl -0x24(%rbp), %eax cmpl $0x0, %eax je 0x46117 movl -0x10(%rbp), %eax cmpl -0x8(%rbp), %eax jae 0x460dd movl -0x10(%rbp), %eax movl %eax, -0x2c(%rbp) jmp 0x460e3 movl -0x8(%rbp), %eax movl %eax, -0x2c(%rbp) movl -0x2c(%rbp), %ecx movl $0x1, %eax shll %cl, %eax movl %eax, -0x28(%rbp) movl -0x28(%rbp), %eax orl -0x4(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x18(%rbp), %eax andl -0x28(%rbp), %eax shll $0x8, %eax orl -0x4(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x1c(%rbp), %eax andl -0x28(%rbp), %eax shll $0x10, %eax orl -0x4(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x46119 movl -0x10(%rbp), %eax addl $0x1, %eax movl %eax, -0x10(%rbp) jmp 0x460af movl -0x20(%rbp), %eax orl -0x4(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw %cs:(%rax,%rax)
my_strxfrm_flag_normalize: push rbp mov rbp, rsp mov [rbp+var_4], edi mov [rbp+var_8], esi jmp short $+2 loc_4603C: mov eax, [rbp+var_4] and eax, 3Fh cmp eax, 0 jnz short loc_4606C mov eax, [rbp+var_4] and eax, 0C0h mov [rbp+var_C], eax mov eax, [rbp+var_8] mov ecx, eax lea rax, my_strxfrm_flag_normalize_def_level_flags mov eax, [rax+rcx*4] or eax, [rbp+var_C] mov [rbp+var_4], eax jmp loc_4612D loc_4606C: mov eax, [rbp+var_4] and eax, 3Fh mov [rbp+var_14], eax mov eax, [rbp+var_4] shr eax, 8 and eax, 3Fh mov [rbp+var_18], eax mov eax, [rbp+var_4] shr eax, 10h and eax, 3Fh mov [rbp+var_1C], eax mov eax, [rbp+var_4] and eax, 0C0h mov [rbp+var_20], eax mov eax, [rbp+var_8] add eax, 0FFFFFFFFh mov [rbp+var_8], eax mov [rbp+var_4], 0 mov [rbp+var_10], 0 loc_460AF: cmp [rbp+var_10], 6 jnb short loc_46124 mov ecx, [rbp+var_10] mov eax, 1 shl eax, cl mov [rbp+var_24], eax mov eax, [rbp+var_14] and eax, [rbp+var_24] cmp eax, 0 jz short loc_46117 mov eax, [rbp+var_10] cmp eax, [rbp+var_8] jnb short loc_460DD mov eax, [rbp+var_10] mov [rbp+var_2C], eax jmp short loc_460E3 loc_460DD: mov eax, [rbp+var_8] mov [rbp+var_2C], eax loc_460E3: mov ecx, [rbp+var_2C] mov eax, 1 shl eax, cl mov [rbp+var_28], eax mov eax, [rbp+var_28] or eax, [rbp+var_4] mov [rbp+var_4], eax mov eax, [rbp+var_18] and eax, [rbp+var_28] shl eax, 8 or eax, [rbp+var_4] mov [rbp+var_4], eax mov eax, [rbp+var_1C] and eax, [rbp+var_28] shl eax, 10h or eax, [rbp+var_4] mov [rbp+var_4], eax loc_46117: jmp short $+2 loc_46119: mov eax, [rbp+var_10] add eax, 1 mov [rbp+var_10], eax jmp short loc_460AF loc_46124: mov eax, [rbp+var_20] or eax, [rbp+var_4] mov [rbp+var_4], eax loc_4612D: mov eax, [rbp+var_4] pop rbp retn
long long my_strxfrm_flag_normalize(unsigned int a1, int a2) { char v3; // [rsp+0h] [rbp-2Ch] unsigned int i; // [rsp+1Ch] [rbp-10h] int v6; // [rsp+28h] [rbp-4h] if ( (a1 & 0x3F) != 0 ) { v6 = 0; for ( i = 0; i < 6; ++i ) { if ( ((1 << i) & a1 & 0x3F) != 0 ) { if ( i >= a2 - 1 ) v3 = a2 - 1; else v3 = i; v6 |= (1 << v3) | (((1 << v3) & (a1 >> 8) & 0x3F) << 8) | (((1 << v3) & HIWORD(a1) & 0x3F) << 16); } } return v6 | a1 & 0xC0; } else { return a1 & 0xC0 | my_strxfrm_flag_normalize_def_level_flags[a2]; } }
my_strxfrm_flag_normalize: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x4],EDI MOV dword ptr [RBP + -0x8],ESI JMP 0x0014603c LAB_0014603c: MOV EAX,dword ptr [RBP + -0x4] AND EAX,0x3f CMP EAX,0x0 JNZ 0x0014606c MOV EAX,dword ptr [RBP + -0x4] AND EAX,0xc0 MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0x8] MOV ECX,EAX LEA RAX,[0x374c10] MOV EAX,dword ptr [RAX + RCX*0x4] OR EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x4],EAX JMP 0x0014612d LAB_0014606c: MOV EAX,dword ptr [RBP + -0x4] AND EAX,0x3f MOV dword ptr [RBP + -0x14],EAX MOV EAX,dword ptr [RBP + -0x4] SHR EAX,0x8 AND EAX,0x3f MOV dword ptr [RBP + -0x18],EAX MOV EAX,dword ptr [RBP + -0x4] SHR EAX,0x10 AND EAX,0x3f MOV dword ptr [RBP + -0x1c],EAX MOV EAX,dword ptr [RBP + -0x4] AND EAX,0xc0 MOV dword ptr [RBP + -0x20],EAX MOV EAX,dword ptr [RBP + -0x8] ADD EAX,-0x1 MOV dword ptr [RBP + -0x8],EAX MOV dword ptr [RBP + -0x4],0x0 MOV dword ptr [RBP + -0x10],0x0 LAB_001460af: CMP dword ptr [RBP + -0x10],0x6 JNC 0x00146124 MOV ECX,dword ptr [RBP + -0x10] MOV EAX,0x1 SHL EAX,CL MOV dword ptr [RBP + -0x24],EAX MOV EAX,dword ptr [RBP + -0x14] AND EAX,dword ptr [RBP + -0x24] CMP EAX,0x0 JZ 0x00146117 MOV EAX,dword ptr [RBP + -0x10] CMP EAX,dword ptr [RBP + -0x8] JNC 0x001460dd MOV EAX,dword ptr [RBP + -0x10] MOV dword ptr [RBP + -0x2c],EAX JMP 0x001460e3 LAB_001460dd: MOV EAX,dword ptr [RBP + -0x8] MOV dword ptr [RBP + -0x2c],EAX LAB_001460e3: MOV ECX,dword ptr [RBP + -0x2c] MOV EAX,0x1 SHL EAX,CL MOV dword ptr [RBP + -0x28],EAX MOV EAX,dword ptr [RBP + -0x28] OR EAX,dword ptr [RBP + -0x4] MOV dword ptr [RBP + -0x4],EAX MOV EAX,dword ptr [RBP + -0x18] AND EAX,dword ptr [RBP + -0x28] SHL EAX,0x8 OR EAX,dword ptr [RBP + -0x4] MOV dword ptr [RBP + -0x4],EAX MOV EAX,dword ptr [RBP + -0x1c] AND EAX,dword ptr [RBP + -0x28] SHL EAX,0x10 OR EAX,dword ptr [RBP + -0x4] MOV dword ptr [RBP + -0x4],EAX LAB_00146117: JMP 0x00146119 LAB_00146119: MOV EAX,dword ptr [RBP + -0x10] ADD EAX,0x1 MOV dword ptr [RBP + -0x10],EAX JMP 0x001460af LAB_00146124: MOV EAX,dword ptr [RBP + -0x20] OR EAX,dword ptr [RBP + -0x4] MOV dword ptr [RBP + -0x4],EAX LAB_0014612d: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
uint my_strxfrm_flag_normalize(uint param_1,uint param_2) { uint uVar1; uint local_34; uint local_18; uint local_c; if ((param_1 & 0x3f) == 0) { local_c = *(uint *)(my_strxfrm_flag_normalize_def_level_flags + (ulong)param_2 * 4) | param_1 & 0xc0; } else { local_c = 0; for (local_18 = 0; local_18 < 6; local_18 = local_18 + 1) { if ((param_1 & 0x3f & 1 << ((byte)local_18 & 0x1f)) != 0) { local_34 = param_2 - 1; if (local_18 < param_2 - 1) { local_34 = local_18; } uVar1 = 1 << ((byte)local_34 & 0x1f); local_c = (param_1 >> 0x10 & 0x3f & uVar1) << 0x10 | (param_1 >> 8 & 0x3f & uVar1) << 8 | uVar1 | local_c; } } local_c = param_1 & 0xc0 | local_c; } return local_c; }
20,469
Catch::handleSignal(int)
AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp
static void handleSignal( int sig ) { char const * name = "<unknown signal>"; for (auto const& def : signalDefs) { if (sig == def.id) { name = def.name; break; } } // We need to restore previous signal handlers and let them do // their thing, so that the users can have the debugger break // when a signal is raised, and so on. restorePreviousSignalHandlers(); reportFatal( name ); raise( sig ); }
O3
cpp
Catch::handleSignal(int): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x18, %rsp movl %edi, %ebx movl $0x8, %eax leaq 0xd0c62(%rip), %rcx # 0x12d560 leaq 0x8232c(%rip), %r14 # 0xdec31 cmpl %ebx, -0x8(%rax,%rcx) je 0x5c917 addq $0x10, %rax cmpq $0x68, %rax jne 0x5c905 jmp 0x5c91b movq (%rax,%rcx), %r14 callq 0x5c996 leaq 0xd7739(%rip), %r15 # 0x134060 movq (%r15), %rdi testq %rdi, %rdi je 0x5c934 movq (%rdi), %rax jmp 0x5c959 movl $0x18, %edi callq 0x171f0 movq %rax, %rdi leaq 0xd2510(%rip), %rax # 0x12ee58 addq $0x10, %rax movq %rax, (%rdi) xorps %xmm0, %xmm0 movups %xmm0, 0x8(%rdi) movq %rdi, (%r15) callq *0x10(%rax) movq %rax, %r15 leaq 0x8(%rsp), %r12 movq %r12, %rdi movq %r14, %rsi callq 0x61348 movq (%r12), %rsi movq 0x8(%r12), %rdx movq (%r15), %rax movq %r15, %rdi callq *0x70(%rax) movl %ebx, %edi callq 0x17a80 addq $0x18, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
_ZN5CatchL12handleSignalEi: push r15 push r14 push r12 push rbx sub rsp, 18h mov ebx, edi mov eax, 8 lea rcx, _ZN5CatchL10signalDefsE; Catch::signalDefs lea r14, aUnknownSignal; "<unknown signal>" loc_5C905: cmp [rax+rcx-8], ebx jz short loc_5C917 add rax, 10h cmp rax, 68h ; 'h' jnz short loc_5C905 jmp short loc_5C91B loc_5C917: mov r14, [rax+rcx] loc_5C91B: call _ZN5CatchL29restorePreviousSignalHandlersEv; Catch::restorePreviousSignalHandlers(void) lea r15, _ZN5Catch15IMutableContext14currentContextE; Catch::IMutableContext::currentContext mov rdi, [r15] test rdi, rdi jz short loc_5C934 mov rax, [rdi] jmp short loc_5C959 loc_5C934: mov edi, 18h; unsigned __int64 call __Znwm; operator new(ulong) mov rdi, rax lea rax, _ZTVN5Catch7ContextE; `vtable for'Catch::Context add rax, 10h mov [rdi], rax xorps xmm0, xmm0 movups xmmword ptr [rdi+8], xmm0 mov [r15], rdi loc_5C959: call qword ptr [rax+10h] mov r15, rax lea r12, [rsp+38h+var_30] mov rdi, r12; this mov rsi, r14; char * call _ZN5Catch9StringRefC2EPKc; Catch::StringRef::StringRef(char const*) mov rsi, [r12] mov rdx, [r12+8] mov rax, [r15] mov rdi, r15 call qword ptr [rax+70h] mov edi, ebx call _raise add rsp, 18h pop rbx pop r12 pop r14 pop r15 retn
long long Catch::handleSignal(Catch *this) { unsigned int v1; // ebx long long v2; // rax const char *v3; // r14 long long *v4; // rax long long v5; // rdi long long v6; // r15 _QWORD v8[6]; // [rsp+8h] [rbp-30h] BYREF v1 = (unsigned int)this; v2 = 8LL; v3 = "<unknown signal>"; while ( *(_DWORD *)((char *)&Catch::signalDefs + v2 - 8) != (_DWORD)this ) { v2 += 16LL; if ( v2 == 104 ) goto LABEL_6; } v3 = *(const char **)((char *)&Catch::signalDefs + v2); LABEL_6: Catch::restorePreviousSignalHandlers(this); if ( Catch::IMutableContext::currentContext ) { v4 = (long long *)*Catch::IMutableContext::currentContext; } else { v5 = operator new(0x18uLL); v4 = &`vtable for'Catch::Context + 2; *(_QWORD *)v5 = &`vtable for'Catch::Context + 2; *(_OWORD *)(v5 + 8) = 0LL; Catch::IMutableContext::currentContext = (_QWORD *)v5; } v6 = ((long long (*)(void))v4[2])(); Catch::StringRef::StringRef((Catch::StringRef *)v8, v3); (*(void ( **)(long long, _QWORD, _QWORD))(*(_QWORD *)v6 + 112LL))(v6, v8[0], v8[1]); return raise(v1); }
handleSignal: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x18 MOV EBX,EDI MOV EAX,0x8 LEA RCX,[0x22d560] LEA R14,[0x1dec31] LAB_0015c905: CMP dword ptr [RAX + RCX*0x1 + -0x8],EBX JZ 0x0015c917 ADD RAX,0x10 CMP RAX,0x68 JNZ 0x0015c905 JMP 0x0015c91b LAB_0015c917: MOV R14,qword ptr [RAX + RCX*0x1] LAB_0015c91b: CALL 0x0015c996 LEA R15,[0x234060] MOV RDI,qword ptr [R15] TEST RDI,RDI JZ 0x0015c934 MOV RAX,qword ptr [RDI] JMP 0x0015c959 LAB_0015c934: MOV EDI,0x18 CALL 0x001171f0 MOV RDI,RAX LEA RAX,[0x22ee58] ADD RAX,0x10 MOV qword ptr [RDI],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x8],XMM0 MOV qword ptr [R15],RDI LAB_0015c959: CALL qword ptr [RAX + 0x10] MOV R15,RAX LEA R12,[RSP + 0x8] MOV RDI,R12 MOV RSI,R14 CALL 0x00161348 MOV RSI,qword ptr [R12] MOV RDX,qword ptr [R12 + 0x8] MOV RAX,qword ptr [R15] MOV RDI,R15 CALL qword ptr [RAX + 0x70] MOV EDI,EBX CALL 0x00117a80 ADD RSP,0x18 POP RBX POP R12 POP R14 POP R15 RET
/* Catch::handleSignal(int) */ void Catch::handleSignal(int param_1) { long lVar1; int **ppuVar2; long *plVar3; char *pcVar4; int8 local_30; int8 local_28; lVar1 = 8; pcVar4 = "<unknown signal>"; do { if (*(int *)((long)&PTR_translateActiveException_abi_cxx11__0022d558 + lVar1) == param_1) { pcVar4 = *(char **)((long)&signalDefs + lVar1); break; } lVar1 = lVar1 + 0x10; } while (lVar1 != 0x68); restorePreviousSignalHandlers(); if (IMutableContext::currentContext == (int8 *)0x0) { IMutableContext::currentContext = (int8 *)operator_new(0x18); ppuVar2 = &PTR__IContext_0022ee68; *IMutableContext::currentContext = &PTR__IContext_0022ee68; IMutableContext::currentContext[1] = 0; IMutableContext::currentContext[2] = 0; } else { ppuVar2 = (int **)*IMutableContext::currentContext; } plVar3 = (long *)(*(code *)ppuVar2[2])(); StringRef::StringRef((StringRef *)&local_30,pcVar4); (**(code **)(*plVar3 + 0x70))(plVar3,local_30,local_28); raise(param_1); return; }
20,470
aimrt::runtime::core::channel::ChannelBackendManager::GetFilterRules(std::basic_string_view<char, std::char_traits<char>>, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>>> const&)
aimrt_mujoco_sim/_deps/aimrt-src/src/runtime/core/channel/channel_backend_manager.cc
std::vector<std::string> ChannelBackendManager::GetFilterRules( std::string_view topic_name, const std::vector<std::pair<std::string, std::vector<std::string>>>& rules) { for (const auto& item : rules) { const auto& topic_regex = item.first; const auto& filters = item.second; try { if (std::regex_match(topic_name.begin(), topic_name.end(), std::regex(topic_regex, std::regex::ECMAScript))) { return filters; } } catch (const std::exception& e) { AIMRT_WARN("Regex get exception, expr: {}, string: {}, exception info: {}", topic_regex, topic_name, e.what()); } } return {}; }
O0
cpp
aimrt::runtime::core::channel::ChannelBackendManager::GetFilterRules(std::basic_string_view<char, std::char_traits<char>>, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>>> const&): subq $0x238, %rsp # imm = 0x238 movq %rdi, 0x70(%rsp) movq %rdi, %rax movq %rax, 0x78(%rsp) movq %rdi, 0x158(%rsp) movq %rdx, 0x148(%rsp) movq %rcx, 0x150(%rsp) movq %rsi, 0x140(%rsp) movq %r8, 0x138(%rsp) movq 0x140(%rsp), %rax movq %rax, 0x80(%rsp) movq 0x138(%rsp), %rax movq %rax, 0x130(%rsp) movq 0x130(%rsp), %rdi callq 0x87480 movq %rax, 0x128(%rsp) movq 0x130(%rsp), %rdi callq 0x93de0 movq %rax, 0x120(%rsp) leaq 0x128(%rsp), %rdi leaq 0x120(%rsp), %rsi callq 0x93730 xorb $-0x1, %al testb $0x1, %al jne 0xe8c66 jmp 0xe9090 leaq 0x128(%rsp), %rdi callq 0x88e70 movq %rax, 0x118(%rsp) movq 0x118(%rsp), %rax movq %rax, 0x110(%rsp) movq 0x118(%rsp), %rax addq $0x20, %rax movq %rax, 0x108(%rsp) leaq 0x148(%rsp), %rdi movq %rdi, 0x58(%rsp) callq 0x908f0 movq 0x58(%rsp), %rdi movq %rax, 0x60(%rsp) callq 0x93c80 movq %rax, 0x68(%rsp) movq 0x110(%rsp), %rsi leaq 0xe8(%rsp), %rdi movl $0x10, %edx callq 0x88a50 jmp 0xe8ce1 movq 0x68(%rsp), %rsi movq 0x60(%rsp), %rdi leaq 0xe8(%rsp), %rdx xorl %ecx, %ecx callq 0x87b50 movb %al, 0x57(%rsp) jmp 0xe8d00 leaq 0xe8(%rsp), %rdi callq 0x8d460 movb 0x57(%rsp), %al testb $0x1, %al jne 0xe8d1a jmp 0xe902f movq 0x70(%rsp), %rdi movq 0x108(%rsp), %rsi callq 0x90470 jmp 0xe8d2e jmp 0xe90ab movq %rax, %rcx movl %edx, %eax movq %rcx, 0xe0(%rsp) movl %eax, 0xdc(%rsp) jmp 0xe8d6a movq %rax, %rcx movl %edx, %eax movq %rcx, 0xe0(%rsp) movl %eax, 0xdc(%rsp) leaq 0xe8(%rsp), %rdi callq 0x8d460 movl 0xdc(%rsp), %eax movl $0x1, %ecx cmpl %ecx, %eax jne 0xe90b8 movq 0xe0(%rsp), %rdi callq 0x89210 movq %rax, 0xd0(%rsp) movq 0x80(%rsp), %rdi callq 0xf18d0 movq %rax, 0x48(%rsp) jmp 0xe8da7 movq 0x48(%rsp), %rax movq %rax, 0xc8(%rsp) movq 0xc8(%rsp), %rdi callq 0xf18f0 movl %eax, 0x44(%rsp) jmp 0xe8dc7 movl 0x44(%rsp), %ecx movl $0x3, %eax cmpl %ecx, %eax jb 0xe906a leaq 0xc7d8d(%rip), %rax # 0x1b0b6c movq %rax, 0x98(%rsp) movq $0x3d, 0xa0(%rsp) movq 0x110(%rsp), %rax movq %rax, 0x38(%rsp) movq 0xd0(%rsp), %rdi movq (%rdi), %rax movq 0x10(%rax), %rax callq *%rax movq %rax, %rcx movq 0x38(%rsp), %rax movq %rcx, 0x90(%rsp) movq 0x98(%rsp), %rdx movq 0xa0(%rsp), %rcx leaq 0xa8(%rsp), %rsi movq %rsi, 0x1e0(%rsp) movq %rdx, 0x1d0(%rsp) movq %rcx, 0x1d8(%rsp) movq %rax, 0x1c8(%rsp) leaq 0x148(%rsp), %rax movq %rax, 0x1c0(%rsp) leaq 0x90(%rsp), %rax movq %rax, 0x1b8(%rsp) leaq 0x1d0(%rsp), %rax movq %rax, 0x1e8(%rsp) movq 0x1e8(%rsp), %rax movups (%rax), %xmm0 movaps %xmm0, 0x1f0(%rsp) movq 0x1f0(%rsp), %rcx movq 0x1f8(%rsp), %rax movq %rcx, 0x1a8(%rsp) movq %rax, 0x1b0(%rsp) movq 0x1c8(%rsp), %rsi movq 0x1c0(%rsp), %rdx movq 0x1b8(%rsp), %rcx leaq 0x160(%rsp), %rdi callq 0x1298a0 jmp 0xe8ee3 leaq 0x198(%rsp), %rax movq %rax, 0x210(%rsp) leaq 0x160(%rsp), %rax movq %rax, 0x208(%rsp) movq 0x210(%rsp), %rcx movq 0x208(%rsp), %rax movq %rax, 0x230(%rsp) movq 0x230(%rsp), %rax movq %rcx, 0x228(%rsp) movq $0xcdd, 0x220(%rsp) # imm = 0xCDD movq %rax, 0x218(%rsp) movq 0x228(%rsp), %rax movq 0x220(%rsp), %rcx movq %rcx, (%rax) movq 0x218(%rsp), %rcx movq %rcx, 0x8(%rax) movq 0x1a8(%rsp), %rsi movq 0x1b0(%rsp), %rdx movq 0x198(%rsp), %rcx movq 0x1a0(%rsp), %r8 leaq 0xa8(%rsp), %rdi callq 0xa0350 jmp 0xe8f8d jmp 0xe8f8f movq 0x1290d2(%rip), %rax # 0x212068 movq %rax, 0x88(%rsp) movq 0xc8(%rsp), %rax movq %rax, 0x18(%rsp) leaq 0x88(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0x9aa80 movq 0x8(%rsp), %rdi movl %eax, 0x24(%rsp) callq 0x9aac0 movq %rax, 0x28(%rsp) leaq 0xa8(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x93d80 movq 0x10(%rsp), %rdi movq %rax, 0x30(%rsp) callq 0x8c200 movq 0x18(%rsp), %rdi movl 0x24(%rsp), %edx movq 0x28(%rsp), %rcx movq 0x30(%rsp), %r9 movq %rax, %rsi movq %rsp, %rax movq %rsi, (%rax) leaq 0xc7c4d(%rip), %r8 # 0x1b0c61 movl $0x3, %esi callq 0xf1900 jmp 0xe9020 leaq 0xa8(%rsp), %rdi callq 0x94218 jmp 0xe906a jmp 0xe9073 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xe0(%rsp) movl %eax, 0xdc(%rsp) jmp 0xe9087 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xe0(%rsp) movl %eax, 0xdc(%rsp) leaq 0xa8(%rsp), %rdi callq 0x94218 jmp 0xe9087 jmp 0xe906c jmp 0xe906e callq 0x91cd0 jmp 0xe9075 leaq 0x128(%rsp), %rdi callq 0x8b8b0 jmp 0xe8c46 callq 0x91cd0 jmp 0xe908e jmp 0xe90b8 movq 0x70(%rsp), %rdi xorl %esi, %esi movl $0x18, %edx callq 0x8a250 movq 0x70(%rsp), %rdi callq 0x92be0 movq 0x78(%rsp), %rax addq $0x238, %rsp # imm = 0x238 retq movq 0xe0(%rsp), %rdi callq 0x92a70 movq %rax, %rdi callq 0x9b180 nopl (%rax)
_ZN5aimrt7runtime4core7channel21ChannelBackendManager14GetFilterRulesESt17basic_string_viewIcSt11char_traitsIcEERKSt6vectorISt4pairINSt7__cxx1112basic_stringIcS6_SaIcEEES8_ISD_SaISD_EEESaISG_EE: sub rsp, 238h mov [rsp+238h+var_1C8], rdi mov rax, rdi mov [rsp+238h+var_1C0], rax mov [rsp+238h+var_E0], rdi mov [rsp+238h+var_F0], rdx mov [rsp+238h+var_E8], rcx mov [rsp+238h+var_F8], rsi mov [rsp+238h+var_100], r8 mov rax, [rsp+238h+var_F8] mov [rsp+238h+var_1B8], rax mov rax, [rsp+238h+var_100] mov [rsp+238h+var_108], rax mov rdi, [rsp+238h+var_108] call __ZNKSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES_IS6_SaIS6_EEESaIS9_EE5beginEv; std::vector<std::pair<std::string,std::vector<std::string>>>::begin(void) mov [rsp+238h+var_110], rax mov rdi, [rsp+238h+var_108] call __ZNKSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES_IS6_SaIS6_EEESaIS9_EE3endEv; std::vector<std::pair<std::string,std::vector<std::string>>>::end(void) mov [rsp+238h+var_118], rax loc_E8C46: lea rdi, [rsp+238h+var_110] lea rsi, [rsp+238h+var_118] call __ZN9__gnu_cxxeqIPKSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS7_SaIS7_EEES8_ISB_SaISB_EEEEbRKNS_17__normal_iteratorIT_T0_EESL_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE xor al, 0FFh test al, 1 jnz short loc_E8C66 jmp loc_E9090 loc_E8C66: lea rdi, [rsp+238h+var_110] call __ZNK9__gnu_cxx17__normal_iteratorIPKSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS7_SaIS7_EEES8_ISB_SaISB_EEEdeEv; __gnu_cxx::__normal_iterator<std::pair<std::string,std::vector<std::string>> const*,std::vector<std::pair<std::string,std::vector<std::string>>>>::operator*(void) mov [rsp+238h+var_120], rax mov rax, [rsp+238h+var_120] mov qword ptr [rsp+238h+var_128], rax mov rax, [rsp+238h+var_120] add rax, 20h ; ' ' mov [rsp+238h+var_130], rax lea rdi, [rsp+238h+var_F0] mov [rsp+238h+var_1E0], rdi call __ZNKSt17basic_string_viewIcSt11char_traitsIcEE5beginEv; std::string_view::begin(void) mov rdi, [rsp+238h+var_1E0] mov [rsp+238h+var_1D8], rax call __ZNKSt17basic_string_viewIcSt11char_traitsIcEE3endEv; std::string_view::end(void) mov [rsp+238h+var_1D0], rax mov rsi, qword ptr [rsp+238h+var_128]; int lea rdi, [rsp+238h+var_150]; int mov edx, 10h; int call __ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2ISt11char_traitsIcESaIcEEERKNS_12basic_stringIcT_T0_EENSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex<std::char_traits<char>,std::allocator<char>>(std::string const&,std::regex_constants::syntax_option_type) jmp short $+2 loc_E8CE1: mov rsi, [rsp+238h+var_1D0] mov rdi, [rsp+238h+var_1D8] lea rdx, [rsp+238h+var_150] xor ecx, ecx call __ZSt11regex_matchIPKccNSt7__cxx1112regex_traitsIcEEEbT_S5_RKNS2_11basic_regexIT0_T1_EENSt15regex_constants15match_flag_typeE; std::regex_match<char const*,char,std::regex_traits<char>>(char const*,char const*,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type) mov [rsp+238h+var_1E1], al jmp short $+2 loc_E8D00: lea rdi, [rsp+238h+var_150] call __ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; std::basic_regex<char,std::regex_traits<char>>::~basic_regex() mov al, [rsp+238h+var_1E1] test al, 1 jnz short loc_E8D1A jmp loc_E902F loc_E8D1A: mov rdi, [rsp+238h+var_1C8] mov rsi, [rsp+238h+var_130] call __ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&) jmp short $+2 loc_E8D2E: jmp loc_E90AB mov rcx, rax mov eax, edx mov [rsp+238h+var_158], rcx mov [rsp+238h+var_15C], eax jmp short loc_E8D6A mov rcx, rax mov eax, edx mov [rsp+238h+var_158], rcx mov [rsp+238h+var_15C], eax lea rdi, [rsp+238h+var_150] call __ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; std::basic_regex<char,std::regex_traits<char>>::~basic_regex() loc_E8D6A: mov eax, [rsp+238h+var_15C] mov ecx, 1 cmp eax, ecx jnz loc_E90B8 mov rdi, [rsp+238h+var_158]; void * call ___cxa_begin_catch mov [rsp+238h+var_168], rax mov rdi, [rsp+238h+var_1B8]; this call _ZNK5aimrt7runtime4core7channel21ChannelBackendManager9GetLoggerEv; aimrt::runtime::core::channel::ChannelBackendManager::GetLogger(void) mov [rsp+238h+var_1F0], rax jmp short $+2 loc_E8DA7: mov rax, [rsp+238h+var_1F0] mov [rsp+238h+var_170], rax mov rdi, [rsp+238h+var_170]; this call _ZNK5aimrt6common4util13LoggerWrapper11GetLogLevelEv; aimrt::common::util::LoggerWrapper::GetLogLevel(void) mov [rsp+238h+var_1F4], eax jmp short $+2 loc_E8DC7: mov ecx, [rsp+238h+var_1F4] mov eax, 3 cmp eax, ecx jb loc_E906A lea rax, aRegexGetExcept; "Regex get exception, expr: {}, string: "... mov [rsp+238h+var_1A0], rax mov [rsp+238h+var_198], 3Dh ; '=' mov rax, qword ptr [rsp+238h+var_128] mov [rsp+238h+var_200], rax mov rdi, [rsp+238h+var_168] mov rax, [rdi] mov rax, [rax+10h] call rax mov rcx, rax mov rax, [rsp+238h+var_200] mov [rsp+238h+var_1A8], rcx mov rdx, [rsp+238h+var_1A0] mov rcx, [rsp+238h+var_198] lea rsi, [rsp+238h+var_190] mov [rsp+238h+var_58], rsi mov [rsp+238h+var_68], rdx mov [rsp+238h+var_60], rcx mov [rsp+238h+var_70], rax lea rax, [rsp+238h+var_F0] mov [rsp+238h+var_78], rax lea rax, [rsp+238h+var_1A8] mov [rsp+238h+var_80], rax lea rax, [rsp+238h+var_68] mov [rsp+238h+var_50], rax mov rax, [rsp+238h+var_50] movups xmm0, xmmword ptr [rax] movaps [rsp+238h+var_48], xmm0 mov rcx, qword ptr [rsp+238h+var_48] mov rax, qword ptr [rsp+238h+var_48+8] mov [rsp+238h+var_90], rcx mov [rsp+238h+var_88], rax mov rsi, [rsp+238h+var_70] mov rdx, [rsp+238h+var_78] mov rcx, [rsp+238h+var_80] lea rdi, [rsp+238h+var_D8] call _ZN3fmt3v1016make_format_argsINS0_20basic_format_contextINS0_8appenderEcEEJKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt17basic_string_viewIcS8_EPKcEEENS0_16format_arg_storeIT_JDpNSt9remove_cvINSt16remove_referenceIT0_E4typeEE4typeEEEEDpRSK_; fmt::v10::make_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>,std::string const,std::string_view,char const*>(std::string const,std::string_view,char const*&) jmp short $+2 loc_E8EE3: lea rax, [rsp+238h+var_A0] mov [rsp+238h+var_28], rax lea rax, [rsp+238h+var_D8] mov [rsp+238h+var_30], rax mov rcx, [rsp+238h+var_28] mov rax, [rsp+238h+var_30] mov [rsp+238h+var_8], rax mov rax, [rsp+238h+var_8] mov [rsp+238h+var_10], rcx mov [rsp+238h+var_18], 0CDDh mov [rsp+238h+var_20], rax mov rax, [rsp+238h+var_10] mov rcx, [rsp+238h+var_18] mov [rax], rcx mov rcx, [rsp+238h+var_20] mov [rax+8], rcx mov rsi, [rsp+238h+var_90] mov rdx, [rsp+238h+var_88] mov rcx, [rsp+238h+var_A0] mov r8, [rsp+238h+var_98] lea rdi, [rsp+238h+var_190] call _ZN3fmt3v107vformatB5cxx11ENS0_17basic_string_viewIcEENS0_17basic_format_argsINS0_20basic_format_contextINS0_8appenderEcEEEE; fmt::v10::vformat(fmt::v10::basic_string_view<char>,fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>) jmp short $+2 loc_E8F8D: jmp short $+2 loc_E8F8F: mov rax, cs:off_212068 mov [rsp+238h+var_1B0], rax mov rax, [rsp+238h+var_170] mov [rsp+238h+var_220], rax lea rdi, [rsp+238h+var_1B0]; this mov [rsp+238h+var_230], rdi call _ZNKSt15source_location4lineEv; std::source_location::line(void) mov rdi, [rsp+238h+var_230]; this mov [rsp+238h+var_214], eax call _ZNKSt15source_location9file_nameEv; std::source_location::file_name(void) mov [rsp+238h+var_210], rax lea rdi, [rsp+238h+var_190] mov [rsp+238h+var_228], rdi call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov rdi, [rsp+238h+var_228] mov [rsp+238h+var_208], rax call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void) mov rdi, [rsp+238h+var_220]; this mov edx, [rsp+238h+var_214]; unsigned int mov rcx, [rsp+238h+var_210]; char * mov r9, [rsp+238h+var_208]; char * mov rsi, rax mov rax, rsp mov [rax], rsi lea r8, aGetfilterrules; "GetFilterRules" mov esi, 3; unsigned int call _ZNK5aimrt6common4util13LoggerWrapper3LogEjjPKcS4_S4_m; aimrt::common::util::LoggerWrapper::Log(uint,uint,char const*,char const*,char const*,ulong) jmp short $+2 loc_E9020: lea rdi, [rsp+238h+var_190]; void * call j__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_E906A loc_E902F: jmp short loc_E9073 mov rcx, rax mov eax, edx mov [rsp+238h+var_158], rcx mov [rsp+238h+var_15C], eax jmp short loc_E9087 mov rcx, rax mov eax, edx mov [rsp+238h+var_158], rcx mov [rsp+238h+var_15C], eax lea rdi, [rsp+238h+var_190]; void * call j__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_E9087 loc_E906A: jmp short $+2 loc_E906C: jmp short $+2 loc_E906E: call ___cxa_end_catch loc_E9073: jmp short $+2 loc_E9075: lea rdi, [rsp+238h+var_110] call __ZN9__gnu_cxx17__normal_iteratorIPKSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS7_SaIS7_EEES8_ISB_SaISB_EEEppEv; __gnu_cxx::__normal_iterator<std::pair<std::string,std::vector<std::string>> const*,std::vector<std::pair<std::string,std::vector<std::string>>>>::operator++(void) jmp loc_E8C46 loc_E9087: call ___cxa_end_catch jmp short $+2 loc_E908E: jmp short loc_E90B8 loc_E9090: mov rdi, [rsp+238h+var_1C8] xor esi, esi mov edx, 18h call _memset mov rdi, [rsp+238h+var_1C8] call __ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2Ev; std::vector<std::string>::vector(void) loc_E90AB: mov rax, [rsp+238h+var_1C0] add rsp, 238h retn loc_E90B8: mov rdi, [rsp+238h+var_158] call __Unwind_Resume mov rdi, rax call __clang_call_terminate
long long aimrt::runtime::core::channel::ChannelBackendManager::GetFilterRules( long long a1, long long a2, long long a3, long long a4, long long a5) { int v5; // ecx int v6; // r8d int v7; // r9d int v8; // r8d int v9; // r9d int v10; // edx int v11; // ecx int v12; // r8d int v13; // r9d std::locale *v15; // [rsp+0h] [rbp-238h] int v16; // [rsp+0h] [rbp-238h] std::source_location *v17; // [rsp+8h] [rbp-230h] std::source_location *v18; // [rsp+8h] [rbp-230h] long long v19; // [rsp+10h] [rbp-228h] char v20; // [rsp+10h] [rbp-228h] int v21; // [rsp+18h] [rbp-220h] int v22; // [rsp+20h] [rbp-218h] int v23; // [rsp+28h] [rbp-210h] char *v24; // [rsp+30h] [rbp-208h] char v25; // [rsp+57h] [rbp-1E1h] int v26; // [rsp+60h] [rbp-1D8h] int v27; // [rsp+68h] [rbp-1D0h] int v28[8]; // [rsp+E8h] [rbp-150h] BYREF long long v29; // [rsp+108h] [rbp-130h] int v30[2]; // [rsp+110h] [rbp-128h] long long v31; // [rsp+118h] [rbp-120h] long long v32; // [rsp+120h] [rbp-118h] BYREF long long v33; // [rsp+128h] [rbp-110h] BYREF long long v34; // [rsp+130h] [rbp-108h] long long v35; // [rsp+138h] [rbp-100h] long long v36; // [rsp+140h] [rbp-F8h] _QWORD v37[3]; // [rsp+148h] [rbp-F0h] BYREF v37[2] = a1; v37[0] = a3; v37[1] = a4; v36 = a2; v35 = a5; v34 = a5; v33 = std::vector<std::pair<std::string,std::vector<std::string>>>::begin(a5); v32 = std::vector<std::pair<std::string,std::vector<std::string>>>::end(v34); while ( (__gnu_cxx::operator==<std::pair<std::string,std::vector<std::string>> const*,std::vector<std::pair<std::string,std::vector<std::string>>>>( &v33, &v32) & 1) == 0 ) { v31 = __gnu_cxx::__normal_iterator<std::pair<std::string,std::vector<std::string>> const*,std::vector<std::pair<std::string,std::vector<std::string>>>>::operator*(&v33); *(_QWORD *)v30 = v31; v29 = v31 + 32; v26 = std::string_view::begin(); v27 = std::string_view::end(v37); std::basic_regex<char,std::regex_traits<char>>::basic_regex<std::char_traits<char>,std::allocator<char>>( (int)v28, v30[0], 16, v5, v6, v7, v15, (long long)v17, v19, v21, v22, v23, (long long)v24); v25 = std::regex_match<char const*,char,std::regex_traits<char>>( v26, v27, (unsigned int)v28, 0, v8, v9, v16, (long long)v18, v20); std::basic_regex<char,std::regex_traits<char>>::~basic_regex(v28); if ( (v25 & 1) != 0 ) { std::vector<std::string>::vector( a1, v29, v10, v11, v12, v13, (_DWORD)v15, (_DWORD)v17, v19, v21, v22, v23, (_DWORD)v24); return a1; } __gnu_cxx::__normal_iterator<std::pair<std::string,std::vector<std::string>> const*,std::vector<std::pair<std::string,std::vector<std::string>>>>::operator++(&v33); } memset(a1, 0LL, 24LL); std::vector<std::string>::vector(a1); return a1; }
GetFilterRules: SUB RSP,0x238 MOV qword ptr [RSP + 0x70],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x78],RAX MOV qword ptr [RSP + 0x158],RDI MOV qword ptr [RSP + 0x148],RDX MOV qword ptr [RSP + 0x150],RCX MOV qword ptr [RSP + 0x140],RSI MOV qword ptr [RSP + 0x138],R8 MOV RAX,qword ptr [RSP + 0x140] MOV qword ptr [RSP + 0x80],RAX MOV RAX,qword ptr [RSP + 0x138] MOV qword ptr [RSP + 0x130],RAX MOV RDI,qword ptr [RSP + 0x130] CALL 0x00187480 MOV qword ptr [RSP + 0x128],RAX MOV RDI,qword ptr [RSP + 0x130] CALL 0x00193de0 MOV qword ptr [RSP + 0x120],RAX LAB_001e8c46: LEA RDI,[RSP + 0x128] LEA RSI,[RSP + 0x120] CALL 0x00193730 XOR AL,0xff TEST AL,0x1 JNZ 0x001e8c66 JMP 0x001e9090 LAB_001e8c66: LEA RDI,[RSP + 0x128] CALL 0x00188e70 MOV qword ptr [RSP + 0x118],RAX MOV RAX,qword ptr [RSP + 0x118] MOV qword ptr [RSP + 0x110],RAX MOV RAX,qword ptr [RSP + 0x118] ADD RAX,0x20 MOV qword ptr [RSP + 0x108],RAX LEA RDI,[RSP + 0x148] MOV qword ptr [RSP + 0x58],RDI CALL 0x001908f0 MOV RDI,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x60],RAX CALL 0x00193c80 MOV qword ptr [RSP + 0x68],RAX MOV RSI,qword ptr [RSP + 0x110] LAB_001e8ccd: LEA RDI,[RSP + 0xe8] MOV EDX,0x10 CALL 0x00188a50 JMP 0x001e8ce1 LAB_001e8ce1: MOV RSI,qword ptr [RSP + 0x68] MOV RDI,qword ptr [RSP + 0x60] LEA RDX,[RSP + 0xe8] XOR ECX,ECX CALL 0x00187b50 MOV byte ptr [RSP + 0x57],AL JMP 0x001e8d00 LAB_001e8d00: LEA RDI,[RSP + 0xe8] CALL 0x0018d460 MOV AL,byte ptr [RSP + 0x57] TEST AL,0x1 JNZ 0x001e8d1a JMP 0x001e902f LAB_001e8d1a: MOV RDI,qword ptr [RSP + 0x70] MOV RSI,qword ptr [RSP + 0x108] LAB_001e8d27: CALL 0x00190470 LAB_001e8d2c: JMP 0x001e8d2e LAB_001e8d2e: JMP 0x001e90ab LAB_001e902f: JMP 0x001e9073 LAB_001e9073: JMP 0x001e9075 LAB_001e9075: LEA RDI,[RSP + 0x128] CALL 0x0018b8b0 JMP 0x001e8c46 LAB_001e9090: MOV RDI,qword ptr [RSP + 0x70] XOR ESI,ESI MOV EDX,0x18 CALL 0x0018a250 MOV RDI,qword ptr [RSP + 0x70] CALL 0x00192be0 LAB_001e90ab: MOV RAX,qword ptr [RSP + 0x78] ADD RSP,0x238 RET
/* aimrt::runtime::core::channel::ChannelBackendManager::GetFilterRules(std::basic_string_view<char, std::char_traits<char> >, std::vector<std::pair<std::__cxx11::string, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > >, std::allocator<std::pair<std::__cxx11::string, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > > > > const&) */ vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> * aimrt::runtime::core::channel::ChannelBackendManager::GetFilterRules (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *param_1, int8 param_2,int8 param_3,int8 param_4, vector<std::pair<std::__cxx11::string,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>,std::allocator<std::pair<std::__cxx11::string,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>>> *param_5) { byte bVar1; bool bVar2; int8 uVar3; int8 uVar4; basic_regex<char,std::__cxx11::regex_traits<char>> local_150 [32]; vector *local_130; long local_128; long local_120; int8 local_118; int8 local_110; vector<std::pair<std::__cxx11::string,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>,std::allocator<std::pair<std::__cxx11::string,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>>> *local_108; vector<std::pair<std::__cxx11::string,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>,std::allocator<std::pair<std::__cxx11::string,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>>> *local_100; int8 local_f8; int8 local_f0; int8 local_e8; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_e0; local_108 = param_5; local_100 = param_5; local_f8 = param_2; local_f0 = param_3; local_e8 = param_4; local_e0 = param_1; local_110 = std:: vector<std::pair<std::__cxx11::string,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>,std::allocator<std::pair<std::__cxx11::string,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>>> ::begin(param_5); local_118 = std:: vector<std::pair<std::__cxx11::string,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>,std::allocator<std::pair<std::__cxx11::string,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>>> ::end(local_108); while( true ) { bVar1 = _ZN9__gnu_cxxeqIPKSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS7_SaIS7_EEES8_ISB_SaISB_EEEEbRKNS_17__normal_iteratorIT_T0_EESL_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE (&local_110); if (((bVar1 ^ 0xff) & 1) == 0) { memset(param_1,0,0x18); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector(param_1); return param_1; } local_128 = __gnu_cxx:: __normal_iterator<std::pair<std::__cxx11::string,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>const*,std::vector<std::pair<std::__cxx11::string,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>,std::allocator<std::pair<std::__cxx11::string,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>>>> ::operator*((__normal_iterator<std::pair<std::__cxx11::string,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>const*,std::vector<std::pair<std::__cxx11::string,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>,std::allocator<std::pair<std::__cxx11::string,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>>>> *)&local_110); local_130 = (vector *)(local_128 + 0x20); local_120 = local_128; uVar3 = std::basic_string_view<char,std::char_traits<char>>::begin ((basic_string_view<char,std::char_traits<char>> *)&local_f0); uVar4 = std::basic_string_view<char,std::char_traits<char>>::end ((basic_string_view<char,std::char_traits<char>> *)&local_f0); /* try { // try from 001e8ccd to 001e8cde has its CatchHandler @ 001e8d33 */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>:: basic_regex<std::char_traits<char>,std::allocator<char>>(local_150,local_128,0x10); /* try { // try from 001e8ce1 to 001e8cf9 has its CatchHandler @ 001e8d49 */ bVar2 = std::regex_match<char_const*,char,std::__cxx11::regex_traits<char>> (uVar3,uVar4,local_150,0); std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex(local_150); if (bVar2) break; __gnu_cxx:: __normal_iterator<std::pair<std::__cxx11::string,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>const*,std::vector<std::pair<std::__cxx11::string,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>,std::allocator<std::pair<std::__cxx11::string,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>>>> ::operator++((__normal_iterator<std::pair<std::__cxx11::string,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>const*,std::vector<std::pair<std::__cxx11::string,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>,std::allocator<std::pair<std::__cxx11::string,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>>>> *)&local_110); } /* try { // try from 001e8d27 to 001e8d2b has its CatchHandler @ 001e8d33 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector(param_1,local_130); return param_1; }
20,471
aimrt::runtime::core::channel::ChannelBackendManager::GetFilterRules(std::basic_string_view<char, std::char_traits<char>>, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>>> const&)
aimrt_mujoco_sim/_deps/aimrt-src/src/runtime/core/channel/channel_backend_manager.cc
std::vector<std::string> ChannelBackendManager::GetFilterRules( std::string_view topic_name, const std::vector<std::pair<std::string, std::vector<std::string>>>& rules) { for (const auto& item : rules) { const auto& topic_regex = item.first; const auto& filters = item.second; try { if (std::regex_match(topic_name.begin(), topic_name.end(), std::regex(topic_regex, std::regex::ECMAScript))) { return filters; } } catch (const std::exception& e) { AIMRT_WARN("Regex get exception, expr: {}, string: {}, exception info: {}", topic_regex, topic_name, e.what()); } } return {}; }
O3
cpp
aimrt::runtime::core::channel::ChannelBackendManager::GetFilterRules(std::basic_string_view<char, std::char_traits<char>>, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rdx, 0x18(%rsp) movq %rsi, 0x78(%rsp) movq %rdi, %rbx movq (%r8), %r13 movq 0x8(%r8), %rbp cmpq %rbp, %r13 je 0x3f7ac movq %rcx, %r14 movq 0x18(%rsp), %rax leaq (%rcx,%rax), %r15 leaq 0x20(%rsp), %r12 movq %r15, 0x80(%rsp) movq %r12, %rdi movq %r13, %rsi movl $0x10, %edx callq 0x1e480 xorps %xmm0, %xmm0 movaps %xmm0, 0x50(%rsp) movaps %xmm0, 0x40(%rsp) movq %r14, %rdi movq %r15, %rsi leaq 0x40(%rsp), %rdx movq %r12, %rcx xorl %r8d, %r8d callq 0x1e1c0 movl %eax, %r15d movq 0x40(%rsp), %rdi testq %rdi, %rdi je 0x3f668 movq 0x50(%rsp), %rsi subq %rdi, %rsi callq 0x1f250 movq %r12, %rdi callq 0x1f1c0 testb %r15b, %r15b je 0x3f797 leaq 0x20(%r13), %rsi movq %rbx, %rdi callq 0x1f8e0 jmp 0x3f7ba movq %rdx, 0x10(%rsp) movq %rax, %r15 movq 0x40(%rsp), %rdi testq %rdi, %rdi je 0x3f6a9 movq 0x50(%rsp), %rsi subq %rdi, %rsi callq 0x1f250 movq %r12, %rdi callq 0x1f1c0 jmp 0x3f6bd jmp 0x3f6b5 movq %rdx, 0x10(%rsp) movq %rax, %r15 cmpl $0x1, 0x10(%rsp) jne 0x3f801 movq %r15, %rdi callq 0x1e670 movq %rax, %r15 movq 0x78(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x10(%rsp) cmpq $0x0, 0x10(%rax) je 0x3f7cf movq 0x10(%rsp), %rdi callq *0x18(%rdi) cmpl $0x3, %eax ja 0x3f792 movq (%r15), %rax movq %r15, %rdi callq *0x10(%rax) movups (%r13), %xmm0 movaps %xmm0, 0x40(%rsp) movq %r14, 0x50(%rsp) movq 0x18(%rsp), %rcx movq %rcx, 0x58(%rsp) movq %rax, 0x60(%rsp) movl $0x3d, %edx movl $0xcdd, %ecx # imm = 0xCDD movq %r12, %rdi leaq 0x46675(%rip), %rsi # 0x85dad leaq 0x40(%rsp), %r8 callq 0x25059 movq 0x20(%rsp), %r9 movq 0x28(%rsp), %rax movq 0x10(%rsp), %rdi addq $0x20, %rdi movq %rax, (%rsp) movl $0x3, %esi movl $0x1ff, %edx # imm = 0x1FF leaq 0x46258(%rip), %rcx # 0x859c2 leaq 0x4667a(%rip), %r8 # 0x85deb callq 0x1ff80 movq 0x20(%rsp), %rdi leaq 0x30(%rsp), %rax cmpq %rax, %rdi je 0x3f792 movq 0x30(%rsp), %rsi incq %rsi callq 0x1f250 callq 0x1fd80 addq $0x38, %r13 cmpq %rbp, %r13 movq 0x80(%rsp), %r15 jne 0x3f61b xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movq $0x0, 0x10(%rbx) movq %rbx, %rax addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x1e580 jmp 0x3f7f9 movq %rax, %r15 movq 0x20(%rsp), %rdi leaq 0x30(%rsp), %rax cmpq %rax, %rdi je 0x3f7fc movq 0x30(%rsp), %rsi incq %rsi callq 0x1f250 jmp 0x3f7fc jmp 0x3f7f9 movq %rax, %r15 callq 0x1fd80 movq %r15, %rdi callq 0x1ffd0 movq %rax, %rdi callq 0x23e15 nop
_ZN5aimrt7runtime4core7channel21ChannelBackendManager14GetFilterRulesESt17basic_string_viewIcSt11char_traitsIcEERKSt6vectorISt4pairINSt7__cxx1112basic_stringIcS6_SaIcEEES8_ISD_SaISD_EEESaISG_EE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 88h mov [rsp+0B8h+var_A0], rdx mov [rsp+0B8h+var_40], rsi mov rbx, rdi mov r13, [r8] mov rbp, [r8+8] cmp r13, rbp jz loc_3F7AC mov r14, rcx mov rax, [rsp+0B8h+var_A0] lea r15, [rcx+rax] lea r12, [rsp+0B8h+var_98] mov [rsp+0B8h+var_38], r15 loc_3F61B: mov rdi, r12 mov rsi, r13 mov edx, 10h call __ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2ISt11char_traitsIcESaIcEEERKNS_12basic_stringIcT_T0_EENSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex<std::char_traits<char>,std::allocator<char>>(std::string const&,std::regex_constants::syntax_option_type) xorps xmm0, xmm0 movaps [rsp+0B8h+var_68], xmm0 movaps xmmword ptr [rsp+0B8h+var_78], xmm0 mov rdi, r14 mov rsi, r15 lea rdx, [rsp+0B8h+var_78] mov rcx, r12 xor r8d, r8d call __ZNSt8__detail17__regex_algo_implIPKcSaINSt7__cxx119sub_matchIS2_EEEcNS3_12regex_traitsIcEELNS_20_RegexExecutorPolicyE0ELb1EEEbT_SA_RNS3_13match_resultsISA_T0_EERKNS3_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeE; std::__detail::__regex_algo_impl<char const*,std::allocator<std::sub_match<char const*>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,true>(char const*,char const*,std::match_results<char const*> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type) mov r15d, eax mov rdi, [rsp+0B8h+var_78]; void * test rdi, rdi jz short loc_3F668 mov rsi, qword ptr [rsp+0B8h+var_68] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3F668: mov rdi, r12 call __ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; std::basic_regex<char,std::regex_traits<char>>::~basic_regex() test r15b, r15b jz loc_3F797 lea rsi, [r13+20h] mov rdi, rbx call __ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&) jmp loc_3F7BA mov [rsp+0B8h+var_A8], rdx mov r15, rax mov rdi, [rsp+0B8h+var_78]; void * test rdi, rdi jz short loc_3F6A9 mov rsi, qword ptr [rsp+0B8h+var_68] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3F6A9: mov rdi, r12 call __ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; std::basic_regex<char,std::regex_traits<char>>::~basic_regex() jmp short loc_3F6BD jmp short $+2 loc_3F6B5: mov [rsp+0B8h+var_A8], rdx mov r15, rax loc_3F6BD: cmp dword ptr [rsp+0B8h+var_A8], 1 jnz loc_3F801 mov rdi, r15; void * call ___cxa_begin_catch mov r15, rax mov rax, [rsp+0B8h+var_40] mov rax, [rax+8] mov [rsp+0B8h+var_A8], rax; unsigned __int64 cmp qword ptr [rax+10h], 0 jz loc_3F7CF mov rdi, [rsp+0B8h+var_A8] call qword ptr [rdi+18h] cmp eax, 3 ja loc_3F792 mov rax, [r15] mov rdi, r15 call qword ptr [rax+10h] movups xmm0, xmmword ptr [r13+0] movaps xmmword ptr [rsp+0B8h+var_78], xmm0 mov qword ptr [rsp+0B8h+var_68], r14 mov rcx, [rsp+0B8h+var_A0] mov qword ptr [rsp+0B8h+var_68+8], rcx mov [rsp+0B8h+var_58], rax mov edx, 3Dh ; '='; int mov ecx, 0CDDh; int mov rdi, r12; int lea rsi, aRegexGetExcept_0; "Regex get exception, expr: {}, string: "... lea r8, [rsp+0B8h+var_78]; int call _ZN3fmt3v107vformatB5cxx11ENS0_17basic_string_viewIcEENS0_17basic_format_argsINS0_20basic_format_contextINS0_8appenderEcEEEE; fmt::v10::vformat(fmt::v10::basic_string_view<char>,fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>) mov r9, [rsp+0B8h+var_98] mov rax, [rsp+0B8h+var_90] mov rdi, [rsp+0B8h+var_A8] add rdi, 20h ; ' ' mov [rsp+0B8h+var_B8], rax mov esi, 3 mov edx, 1FFh lea rcx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/aimrt_"... lea r8, aGetfilterrules; "GetFilterRules" call __ZNKSt8functionIFvjjPKcS1_S1_mEEclEjjS1_S1_S1_m; std::function<void ()(uint,uint,char const*,char const*,char const*,ulong)>::operator()(uint,uint,char const*,char const*,char const*,ulong) mov rdi, [rsp+0B8h+var_98]; void * lea rax, [rsp+0B8h+var_88] cmp rdi, rax jz short loc_3F792 mov rsi, [rsp+0B8h+var_88] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3F792: call ___cxa_end_catch loc_3F797: add r13, 38h ; '8' cmp r13, rbp mov r15, [rsp+0B8h+var_38] jnz loc_3F61B loc_3F7AC: xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 mov qword ptr [rbx+10h], 0 loc_3F7BA: mov rax, rbx add rsp, 88h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3F7CF: call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void) jmp short loc_3F7F9 mov r15, rax mov rdi, [rsp+0B8h+var_98]; void * lea rax, [rsp+0B8h+var_88] cmp rdi, rax jz short loc_3F7FC mov rsi, [rsp+0B8h+var_88] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_3F7FC jmp short $+2 loc_3F7F9: mov r15, rax loc_3F7FC: call ___cxa_end_catch loc_3F801: mov rdi, r15 call __Unwind_Resume mov rdi, rax call __clang_call_terminate
long long aimrt::runtime::core::channel::ChannelBackendManager::GetFilterRules( long long a1, long long a2, long long a3, long long a4, long long *a5) { long long v5; // r13 long long v6; // rbp long long v8; // r15 char v9; // r15 void *v11; // [rsp+20h] [rbp-98h] BYREF void *v12[2]; // [rsp+40h] [rbp-78h] BYREF __int128 v13; // [rsp+50h] [rbp-68h] long long v14; // [rsp+78h] [rbp-40h] long long v15; // [rsp+80h] [rbp-38h] v14 = a2; v5 = *a5; v6 = a5[1]; if ( *a5 == v6 ) { LABEL_8: *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; } else { v8 = a4 + a3; v15 = a4 + a3; while ( 1 ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex<std::char_traits<char>,std::allocator<char>>( &v11, v5, 16LL); v13 = 0LL; *(_OWORD *)v12 = 0LL; v9 = std::__detail::__regex_algo_impl<char const*,std::allocator<std::sub_match<char const*>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,true>( a4, v8, v12, &v11, 0LL); if ( v12[0] ) operator delete(v12[0], v13 - (unsigned long long)v12[0]); std::basic_regex<char,std::regex_traits<char>>::~basic_regex(&v11); if ( v9 ) break; v5 += 56LL; v8 = v15; if ( v5 == v6 ) goto LABEL_8; } std::vector<std::string>::vector(a1, v5 + 32); } return a1; }
GetFilterRules: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x88 MOV qword ptr [RSP + 0x18],RDX MOV qword ptr [RSP + 0x78],RSI MOV RBX,RDI MOV R13,qword ptr [R8] MOV RBP,qword ptr [R8 + 0x8] CMP R13,RBP JZ 0x0013f7ac MOV R14,RCX MOV RAX,qword ptr [RSP + 0x18] LEA R15,[RCX + RAX*0x1] LEA R12,[RSP + 0x20] MOV qword ptr [RSP + 0x80],R15 LAB_0013f61b: MOV RDI,R12 MOV RSI,R13 MOV EDX,0x10 CALL 0x0011e480 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x50],XMM0 MOVAPS xmmword ptr [RSP + 0x40],XMM0 LAB_0013f638: MOV RDI,R14 MOV RSI,R15 LEA RDX,[RSP + 0x40] MOV RCX,R12 XOR R8D,R8D CALL 0x0011e1c0 MOV R15D,EAX MOV RDI,qword ptr [RSP + 0x40] TEST RDI,RDI JZ 0x0013f668 MOV RSI,qword ptr [RSP + 0x50] SUB RSI,RDI CALL 0x0011f250 LAB_0013f668: MOV RDI,R12 CALL 0x0011f1c0 TEST R15B,R15B JZ 0x0013f797 LAB_0013f679: LEA RSI,[R13 + 0x20] MOV RDI,RBX CALL 0x0011f8e0 LAB_0013f685: JMP 0x0013f7ba LAB_0013f797: ADD R13,0x38 CMP R13,RBP MOV R15,qword ptr [RSP + 0x80] JNZ 0x0013f61b LAB_0013f7ac: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOV qword ptr [RBX + 0x10],0x0 LAB_0013f7ba: MOV RAX,RBX ADD RSP,0x88 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* aimrt::runtime::core::channel::ChannelBackendManager::GetFilterRules(std::basic_string_view<char, std::char_traits<char> >, std::vector<std::pair<std::__cxx11::string, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > >, std::allocator<std::pair<std::__cxx11::string, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > > > > const&) */ vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> * aimrt::runtime::core::channel::ChannelBackendManager::GetFilterRules (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *param_1, int8 param_2,long param_3,long param_4,long *param_5) { long lVar1; long lVar2; bool bVar3; long lVar4; basic_regex<char,std::__cxx11::regex_traits<char>> local_98 [32]; void *local_78; int8 uStack_70; long local_68; int8 uStack_60; int8 local_40; long local_38; lVar4 = *param_5; lVar1 = param_5[1]; if (lVar4 != lVar1) { local_38 = param_4 + param_3; local_40 = param_2; do { /* try { // try from 0013f61b to 0013f62a has its CatchHandler @ 0013f6b3 */ lVar2 = local_38; std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>:: basic_regex<std::char_traits<char>,std::allocator<char>>(local_98,lVar4,0x10); local_68 = 0; uStack_60 = 0; local_78 = (void *)0x0; uStack_70 = 0; /* try { // try from 0013f638 to 0013f64d has its CatchHandler @ 0013f68a */ bVar3 = std::__detail:: __regex_algo_impl<char_const*,std::allocator<std::__cxx11::sub_match<char_const*>>,char,std::__cxx11::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,true> (param_4,lVar2,&local_78,local_98,0); if (local_78 != (void *)0x0) { operator_delete(local_78,local_68 - (long)local_78); } std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex(local_98); if (bVar3) { /* try { // try from 0013f679 to 0013f684 has its CatchHandler @ 0013f6b5 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector (param_1,(vector *)(lVar4 + 0x20)); return param_1; } lVar4 = lVar4 + 0x38; } while (lVar4 != lVar1); } *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; return param_1; }
20,472
minja::simple_function(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&)
monkey531[P]llama/common/minja.hpp
static Value simple_function(const std::string & fn_name, const std::vector<std::string> & params, const std::function<Value(const std::shared_ptr<Context> &, Value & args)> & fn) { std::map<std::string, size_t> named_positions; for (size_t i = 0, n = params.size(); i < n; i++) named_positions[params[i]] = i; return Value::callable([=](const std::shared_ptr<Context> & context, ArgumentsValue & args) -> Value { auto args_obj = Value::object(); std::vector<bool> provided_args(params.size()); for (size_t i = 0, n = args.args.size(); i < n; i++) { auto & arg = args.args[i]; if (i < params.size()) { args_obj.set(params[i], arg); provided_args[i] = true; } else { throw std::runtime_error("Too many positional params for " + fn_name); } } for (auto & [name, value] : args.kwargs) { auto named_pos_it = named_positions.find(name); if (named_pos_it == named_positions.end()) { throw std::runtime_error("Unknown argument " + name + " for function " + fn_name); } provided_args[named_pos_it->second] = true; args_obj.set(name, value); } return fn(context, args_obj); }); }
O2
cpp
minja::simple_function(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xe8, %rsp movq %rcx, 0x8(%rsp) movq %rdx, %r15 movq %rsi, %r12 leaq 0x38(%rsp), %rax andl $0x0, (%rax) andq $0x0, 0x8(%rax) movq %rax, 0x10(%rax) movq %rax, 0x18(%rax) andq $0x0, 0x20(%rax) movq %rdi, (%rsp) movq 0x8(%rdx), %rbp subq (%rdx), %rbp sarq $0x5, %rbp xorl %ebx, %ebx leaq 0x30(%rsp), %r13 xorl %r14d, %r14d cmpq %r14, %rbp je 0x57e40 movq (%r15), %rsi addq %rbx, %rsi movq %r13, %rdi callq 0x7ed78 movq %r14, (%rax) incq %r14 addq $0x20, %rbx jmp 0x57e21 leaq 0x60(%rsp), %rdi movq %r15, %rsi callq 0x397de leaq 0x78(%rsp), %r15 movq %r15, %rdi movq %r12, %rsi callq 0x23c00 leaq 0x98(%rsp), %r13 leaq 0x30(%rsp), %rsi movq %r13, %rdi callq 0x7f1c2 leaq 0xc8(%rsp), %r12 movq %r12, %rdi movq 0x8(%rsp), %rsi callq 0x7edde xorps %xmm0, %xmm0 movaps %xmm0, 0x20(%rsp) movaps %xmm0, 0x10(%rsp) movl $0x88, %edi callq 0x238c0 movq %rax, %r14 leaq 0x60(%rsp), %rsi movq %rax, %rdi callq 0x397de leaq 0x18(%r14), %r13 movq %r13, %rdi movq %r15, %rsi callq 0x23c00 leaq 0x40(%r14), %rdi leaq 0xa0(%rsp), %rsi callq 0x3c354 leaq 0x68(%r14), %rdi movq %r12, %rsi callq 0x7edde leaq 0x10(%rsp), %rsi movq %r14, (%rsi) leaq 0x109(%rip), %rax # 0x57ff2 movq %rax, 0x18(%rsi) leaq 0x42c(%rip), %rax # 0x58320 movq %rax, 0x10(%rsi) movq (%rsp), %rbx movq %rbx, %rdi callq 0x6f678 leaq 0x10(%rsp), %rdi callq 0x47a12 leaq 0x60(%rsp), %rdi callq 0x57fca leaq 0x30(%rsp), %rdi callq 0x7f408 movq %rbx, %rax addq $0xe8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x57f71 movq %rax, %rbx movq %r14, %rdi addq $0x38, %rdi callq 0x7f408 movq %r13, %rdi callq 0x241b8 jmp 0x57f55 movq %rax, %rbx movq %r14, %rdi callq 0x26e4a jmp 0x57f62 movq %rax, %rbx movl $0x88, %esi movq %r14, %rdi callq 0x238e0 jmp 0x57f74 movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x47a12 leaq 0x60(%rsp), %rdi callq 0x57fca jmp 0x57fb8 movq %rax, %rbx movq %r13, %rdi callq 0x7f408 jmp 0x57f9a movq %rax, %rbx movq %r15, %rdi callq 0x241b8 jmp 0x57fa7 movq %rax, %rbx leaq 0x60(%rsp), %rdi callq 0x26e4a jmp 0x57fb8 jmp 0x57fb5 movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x7f408 movq %rbx, %rdi callq 0x23f80
_ZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0E8h mov [rsp+118h+var_110], rcx mov r15, rdx mov r12, rsi lea rax, [rsp+118h+var_E0] and dword ptr [rax], 0 and qword ptr [rax+8], 0 mov [rax+10h], rax mov [rax+18h], rax and qword ptr [rax+20h], 0 mov [rsp+118h+var_118], rdi mov rbp, [rdx+8] sub rbp, [rdx] sar rbp, 5 xor ebx, ebx lea r13, [rsp+118h+var_E8] xor r14d, r14d loc_57E21: cmp rbp, r14 jz short loc_57E40 mov rsi, [r15] add rsi, rbx mov rdi, r13 call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEEixERS9_; std::map<std::string,ulong>::operator[](std::string const&) mov [rax], r14 inc r14 add rbx, 20h ; ' ' jmp short loc_57E21 loc_57E40: lea rdi, [rsp+118h+var_B8] mov rsi, r15 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&) lea r15, [rsp+118h+var_A0] mov rdi, r15 mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) lea r13, [rsp+118h+var_80] lea rsi, [rsp+118h+var_E8] mov rdi, r13 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EEC2ERKSE_; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::_Rb_tree(std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>> const&) lea r12, [rsp+118h+var_50] mov rdi, r12 mov rsi, [rsp+118h+var_110] call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERS1_EEC2ERKS9_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&) xorps xmm0, xmm0 movaps [rsp+118h+var_F8], xmm0 movaps [rsp+118h+var_108], xmm0 mov edi, 88h; unsigned __int64 call __Znwm; operator new(ulong) mov r14, rax lea rsi, [rsp+118h+var_B8] mov rdi, rax call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&) lea r13, [r14+18h] mov rdi, r13 mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) lea rdi, [r14+40h] lea rsi, [rsp+118h+var_78] call _ZNSt15_Rb_tree_headerC2EOS_; std::_Rb_tree_header::_Rb_tree_header(std::_Rb_tree_header&&) lea rdi, [r14+68h] mov rsi, r12 call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERS1_EEC2ERKS9_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&) lea rsi, [rsp+118h+var_108] mov [rsi], r14 lea rax, _ZNSt17_Function_handlerIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEZNS0_L15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorISF_SaISF_EERKSt8functionIFS1_S6_RS1_EEE3$_0E9_M_invokeERKSt9_Any_dataS6_S8_; std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_invoke(std::_Any_data const&,std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &) mov [rsi+18h], rax lea rax, _ZNSt17_Function_handlerIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEZNS0_L15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorISF_SaISF_EERKSt8functionIFS1_S6_RS1_EEE3$_0E10_M_managerERSt9_Any_dataRKSV_St18_Manager_operation; std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsi+10h], rax mov rbx, [rsp+118h+var_118] mov rdi, rbx call _ZN5minja5Value8callableERKSt8functionIFS0_RKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueEEE; minja::Value::callable(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&) lea rdi, [rsp+118h+var_108]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() lea rdi, [rsp+118h+var_B8] call _ZZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EEEN3$_0D2Ev; minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0::~$_0() lea rdi, [rsp+118h+var_E8] call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree() mov rax, rbx add rsp, 0E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_57F71 mov rbx, rax mov rdi, r14 add rdi, 38h ; '8' call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree() mov rdi, r13; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_57F55 mov rbx, rax loc_57F55: mov rdi, r14 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() jmp short loc_57F62 mov rbx, rax loc_57F62: mov esi, 88h; unsigned __int64 mov rdi, r14; void * call __ZdlPvm; operator delete(void *,ulong) jmp short loc_57F74 loc_57F71: mov rbx, rax loc_57F74: lea rdi, [rsp+arg_8]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() lea rdi, [rsp+arg_58] call _ZZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EEEN3$_0D2Ev; minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0::~$_0() jmp short loc_57FB8 mov rbx, rax mov rdi, r13 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree() jmp short loc_57F9A mov rbx, rax loc_57F9A: mov rdi, r15; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_57FA7 mov rbx, rax loc_57FA7: lea rdi, [rsp+arg_58] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() jmp short loc_57FB8 jmp short $+2 loc_57FB5: mov rbx, rax loc_57FB8: lea rdi, [rsp+arg_28] call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree() mov rdi, rbx call __Unwind_Resume
long long minja::simple_function(long long a1, long long a2, _QWORD *a3, long long a4) { long long v5; // rbp long long v6; // rbx long long i; // r14 long long *v8; // r14 int v9; // edx int v10; // ecx int v11; // r8d int v12; // r9d __int128 v15; // [rsp+10h] [rbp-108h] BYREF long long ( *v16)(); // [rsp+20h] [rbp-F8h] long long ( *v17)(); // [rsp+28h] [rbp-F0h] _BYTE v18[8]; // [rsp+30h] [rbp-E8h] BYREF int v19; // [rsp+38h] [rbp-E0h] BYREF long long v20; // [rsp+40h] [rbp-D8h] int *v21; // [rsp+48h] [rbp-D0h] int *v22; // [rsp+50h] [rbp-C8h] long long v23; // [rsp+58h] [rbp-C0h] long long v24[3]; // [rsp+60h] [rbp-B8h] BYREF _BYTE v25[32]; // [rsp+78h] [rbp-A0h] BYREF _BYTE v26[8]; // [rsp+98h] [rbp-80h] BYREF _BYTE v27[40]; // [rsp+A0h] [rbp-78h] BYREF _BYTE v28[80]; // [rsp+C8h] [rbp-50h] BYREF v19 = 0; v20 = 0LL; v21 = &v19; v22 = &v19; v23 = 0LL; v5 = (long long)(a3[1] - *a3) >> 5; v6 = 0LL; for ( i = 0LL; v5 != i; ++i ) { *(_QWORD *)std::map<std::string,unsigned long>::operator[](v18, v6 + *a3) = i; v6 += 32LL; } std::vector<std::string>::vector(v24, a3); std::string::basic_string(v25, a2); std::_Rb_tree<std::string,std::pair<std::string const,unsigned long>,std::_Select1st<std::pair<std::string const,unsigned long>>,std::less<std::string>,std::allocator<std::pair<std::string const,unsigned long>>>::_Rb_tree( v26, v18); std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(v28, a4); v15 = 0LL; v8 = (long long *)operator new(0x88uLL); std::vector<std::string>::vector(v8, v24); std::string::basic_string(v8 + 3, v25); std::_Rb_tree_header::_Rb_tree_header((long long)(v8 + 8), (long long)v27); std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(v8 + 13, v28); *(_QWORD *)&v15 = v8; v17 = std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_invoke; v16 = std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_manager; minja::Value::callable(a1, (unsigned int)&v15, v9, v10, v11, v12, a1, a4); std::_Function_base::~_Function_base((std::_Function_base *)&v15); minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0::~$_0(v24); std::_Rb_tree<std::string,std::pair<std::string const,unsigned long>,std::_Select1st<std::pair<std::string const,unsigned long>>,std::less<std::string>,std::allocator<std::pair<std::string const,unsigned long>>>::~_Rb_tree(v18); return a1; }
simple_function: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xe8 MOV qword ptr [RSP + 0x8],RCX MOV R15,RDX MOV R12,RSI LEA RAX,[RSP + 0x38] AND dword ptr [RAX],0x0 AND qword ptr [RAX + 0x8],0x0 MOV qword ptr [RAX + 0x10],RAX MOV qword ptr [RAX + 0x18],RAX AND qword ptr [RAX + 0x20],0x0 MOV qword ptr [RSP],RDI MOV RBP,qword ptr [RDX + 0x8] SUB RBP,qword ptr [RDX] SAR RBP,0x5 XOR EBX,EBX LEA R13,[RSP + 0x30] XOR R14D,R14D LAB_00157e21: CMP RBP,R14 JZ 0x00157e40 MOV RSI,qword ptr [R15] ADD RSI,RBX LAB_00157e2c: MOV RDI,R13 CALL 0x0017ed78 MOV qword ptr [RAX],R14 INC R14 ADD RBX,0x20 JMP 0x00157e21 LAB_00157e40: LEA RDI,[RSP + 0x60] MOV RSI,R15 CALL 0x001397de LEA R15,[RSP + 0x78] LAB_00157e52: MOV RDI,R15 MOV RSI,R12 CALL 0x00123c00 LEA R13,[RSP + 0x98] LAB_00157e65: LEA RSI,[RSP + 0x30] MOV RDI,R13 CALL 0x0017f1c2 LEA R12,[RSP + 0xc8] LAB_00157e7a: MOV RDI,R12 MOV RSI,qword ptr [RSP + 0x8] CALL 0x0017edde XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM0 LAB_00157e94: MOV EDI,0x88 CALL 0x001238c0 LAB_00157e9e: MOV R14,RAX LEA RSI,[RSP + 0x60] MOV RDI,RAX CALL 0x001397de LEA R13,[R14 + 0x18] LAB_00157eb2: MOV RDI,R13 MOV RSI,R15 CALL 0x00123c00 LEA RDI,[R14 + 0x40] LEA RSI,[RSP + 0xa0] CALL 0x0013c354 LEA RDI,[R14 + 0x68] LAB_00157ed2: MOV RSI,R12 CALL 0x0017edde LEA RSI,[RSP + 0x10] MOV qword ptr [RSI],R14 LEA RAX,[0x157ff2] MOV qword ptr [RSI + 0x18],RAX LEA RAX,[0x158320] MOV qword ptr [RSI + 0x10],RAX LAB_00157ef8: MOV RBX,qword ptr [RSP] MOV RDI,RBX CALL 0x0016f678 LAB_00157f04: LEA RDI,[RSP + 0x10] CALL 0x00147a12 LEA RDI,[RSP + 0x60] CALL 0x00157fca LEA RDI,[RSP + 0x30] CALL 0x0017f408 MOV RAX,RBX ADD RSP,0xe8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* minja::simple_function(std::__cxx11::string const&, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&, std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&) */ minja * __thiscall minja::simple_function(minja *this,string *param_1,vector *param_2,function *param_3) { long lVar1; long lVar2; long *plVar3; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *this_00; long lVar4; long lVar5; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_108; int8 uStack_100; code *local_f8; code *pcStack_f0; map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> local_e8 [8]; int4 local_e0 [2]; int8 local_d8; int4 *local_d0; int4 *local_c8; int8 local_c0; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_b8 [24]; string local_a0 [32]; _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> local_80 [8]; _Rb_tree_header local_78 [40]; function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)> local_50 [32]; local_d0 = local_e0; local_e0[0] = 0; local_d8 = 0; local_c0 = 0; lVar1 = *(long *)(param_2 + 8); lVar2 = *(long *)param_2; lVar4 = 0; local_c8 = local_d0; for (lVar5 = 0; lVar1 - lVar2 >> 5 != lVar5; lVar5 = lVar5 + 1) { /* try { // try from 00157e2c to 00157e33 has its CatchHandler @ 00157fb5 */ plVar3 = (long *)std:: map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> ::operator[](local_e8,(string *)(*(long *)param_2 + lVar4)); *plVar3 = lVar5; lVar4 = lVar4 + 0x20; } /* try { // try from 00157e40 to 00157e4c has its CatchHandler @ 00157fb3 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector(local_b8,param_2); /* try { // try from 00157e52 to 00157e5c has its CatchHandler @ 00157fa4 */ std::__cxx11::string::string(local_a0,param_1); /* try { // try from 00157e65 to 00157e71 has its CatchHandler @ 00157f97 */ std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> ::_Rb_tree(local_80,(_Rb_tree *)local_e8); /* try { // try from 00157e7a to 00157e86 has its CatchHandler @ 00157f8a */ std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>::function (local_50,param_3); local_f8 = (code *)0x0; pcStack_f0 = (code *)0x0; local_108 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)0x0; uStack_100 = 0; /* try { // try from 00157e94 to 00157e9d has its CatchHandler @ 00157f71 */ this_00 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)operator_new(0x88); /* try { // try from 00157e9e to 00157ead has its CatchHandler @ 00157f5f */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector (this_00,(vector *)local_b8); /* try { // try from 00157eb2 to 00157ebc has its CatchHandler @ 00157f52 */ std::__cxx11::string::string((string *)(this_00 + 0x18),local_a0); std::_Rb_tree_header::_Rb_tree_header((_Rb_tree_header *)(this_00 + 0x40),local_78); /* try { // try from 00157ed2 to 00157ed9 has its CatchHandler @ 00157f39 */ std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>::function ((function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)> *) (this_00 + 0x68),local_50); pcStack_f0 = std:: _Function_handler<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&),minja::simple_function(std::__cxx11::string_const&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&,std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>const&)::$_0> ::_M_invoke; local_f8 = std:: _Function_handler<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&),minja::simple_function(std::__cxx11::string_const&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&,std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>const&)::$_0> ::_M_manager; local_108 = this_00; /* try { // try from 00157ef8 to 00157f03 has its CatchHandler @ 00157f37 */ Value::callable(this); std::_Function_base::~_Function_base((_Function_base *)&local_108); simple_function(std::__cxx11::string_const&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&,std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>const&) ::$_0::~__0((__0 *)local_b8); std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> ::~_Rb_tree((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> *)local_e8); return this; }
20,473
my_once_free
eloqsql/mysys/my_once.c
void my_once_free(void) { reg1 USED_MEM *next,*old; DBUG_ENTER("my_once_free"); for (next=my_once_root_block ; next ; ) { old=next; next= next->next ; free((uchar*) old); } my_once_root_block=0; DBUG_VOID_RETURN; }
O0
c
my_once_free: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp leaq 0x373ac1(%rip), %rax # 0x3a66b0 movq (%rax), %rax movq %rax, -0x8(%rbp) cmpq $0x0, -0x8(%rbp) je 0x32c1b movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x8(%rbp) movq -0x10(%rbp), %rdi callq 0x253b0 jmp 0x32bf6 leaq 0x373a8e(%rip), %rax # 0x3a66b0 movq $0x0, (%rax) jmp 0x32c2b addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax,%rax)
my_once_free: push rbp mov rbp, rsp sub rsp, 10h lea rax, my_once_root_block mov rax, [rax] mov [rbp+var_8], rax loc_32BF6: cmp [rbp+var_8], 0 jz short loc_32C1B mov rax, [rbp+var_8] mov [rbp+var_10], rax mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_8], rax mov rdi, [rbp+var_10] call _free jmp short loc_32BF6 loc_32C1B: lea rax, my_once_root_block mov qword ptr [rax], 0 jmp short $+2 loc_32C2B: add rsp, 10h pop rbp retn
_QWORD *my_once_free() { _QWORD *result; // rax _QWORD *v1; // [rsp+0h] [rbp-10h] _QWORD *v2; // [rsp+8h] [rbp-8h] v2 = (_QWORD *)my_once_root_block; while ( v2 ) { v1 = v2; v2 = (_QWORD *)*v2; free(v1); } result = &my_once_root_block; my_once_root_block = 0LL; return result; }
my_once_free: PUSH RBP MOV RBP,RSP SUB RSP,0x10 LEA RAX,[0x4a66b0] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x8],RAX LAB_00132bf6: CMP qword ptr [RBP + -0x8],0x0 JZ 0x00132c1b MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x8],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x001253b0 JMP 0x00132bf6 LAB_00132c1b: LEA RAX,[0x4a66b0] MOV qword ptr [RAX],0x0 JMP 0x00132c2b LAB_00132c2b: ADD RSP,0x10 POP RBP RET
void my_once_free(void) { int8 *puVar1; int8 local_10; local_10 = my_once_root_block; while (local_10 != (int8 *)0x0) { puVar1 = (int8 *)*local_10; free(local_10); local_10 = puVar1; } my_once_root_block = (int8 *)0x0; return; }
20,474
ma_pvio_write_async
eloqsql/libmariadb/libmariadb/ma_pvio.c
static ssize_t ma_pvio_write_async(MARIADB_PVIO *pvio, const uchar *buffer, size_t length) { ssize_t res; struct mysql_async_context *b= pvio->mysql->options.extension->async_context; int timeout= pvio->timeout[PVIO_WRITE_TIMEOUT]; for (;;) { res= pvio->methods->async_write(pvio, buffer, length); if (res >= 0 || IS_BLOCKING_ERROR()) return res; b->events_to_wait_for= MYSQL_WAIT_WRITE; if (timeout >= 0) { b->events_to_wait_for|= MYSQL_WAIT_TIMEOUT; b->timeout_value= timeout; } if (b->suspend_resume_hook) (*b->suspend_resume_hook)(TRUE, b->suspend_resume_hook_user_data); my_context_yield(&b->async_context); if (b->suspend_resume_hook) (*b->suspend_resume_hook)(FALSE, b->suspend_resume_hook_user_data); if (b->events_occurred & MYSQL_WAIT_TIMEOUT) return -1; } }
O0
c
ma_pvio_write_async: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movl 0x2c(%rax), %eax movl %eax, -0x34(%rbp) movq -0x10(%rbp), %rax movq 0x48(%rax), %rax movq 0x28(%rax), %rax movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq *%rax movq %rax, -0x28(%rbp) cmpq $0x0, -0x28(%rbp) jge 0x8852e callq 0x60ba0 cmpl $0xb, (%rax) je 0x8853b callq 0x60ba0 cmpl $0x4, (%rax) je 0x8853b movq -0x28(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x885cc movq -0x30(%rbp), %rax movl $0x2, (%rax) cmpl $0x0, -0x34(%rbp) jl 0x88560 movq -0x30(%rbp), %rax movl (%rax), %ecx orl $0x8, %ecx movl %ecx, (%rax) movl -0x34(%rbp), %ecx movq -0x30(%rbp), %rax movl %ecx, 0x10(%rax) movq -0x30(%rbp), %rax cmpq $0x0, 0x20(%rax) je 0x88582 movq -0x30(%rbp), %rax movq 0x20(%rax), %rax movq -0x30(%rbp), %rcx movq 0x28(%rcx), %rsi movl $0x1, %edi callq *%rax movq -0x30(%rbp), %rdi addq $0x38, %rdi callq 0xa3ea0 movq -0x30(%rbp), %rax cmpq $0x0, 0x20(%rax) je 0x885ae movq -0x30(%rbp), %rax movq 0x20(%rax), %rax movq -0x30(%rbp), %rcx movq 0x28(%rcx), %rsi xorl %edi, %edi callq *%rax movq -0x30(%rbp), %rax movl 0x4(%rax), %eax andl $0x8, %eax cmpl $0x0, %eax je 0x885c7 movq $-0x1, -0x8(%rbp) jmp 0x885cc jmp 0x884f5 movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ma_pvio_write_async: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_10] mov rax, [rax+40h] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_30], rax mov rax, [rbp+var_10] mov eax, [rax+2Ch] mov [rbp+var_34], eax loc_884F5: mov rax, [rbp+var_10] mov rax, [rax+48h] mov rax, [rax+28h] mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call rax mov [rbp+var_28], rax cmp [rbp+var_28], 0 jge short loc_8852E call ___errno_location cmp dword ptr [rax], 0Bh jz short loc_8853B call ___errno_location cmp dword ptr [rax], 4 jz short loc_8853B loc_8852E: mov rax, [rbp+var_28] mov [rbp+var_8], rax jmp loc_885CC loc_8853B: mov rax, [rbp+var_30] mov dword ptr [rax], 2 cmp [rbp+var_34], 0 jl short loc_88560 mov rax, [rbp+var_30] mov ecx, [rax] or ecx, 8 mov [rax], ecx mov ecx, [rbp+var_34] mov rax, [rbp+var_30] mov [rax+10h], ecx loc_88560: mov rax, [rbp+var_30] cmp qword ptr [rax+20h], 0 jz short loc_88582 mov rax, [rbp+var_30] mov rax, [rax+20h] mov rcx, [rbp+var_30] mov rsi, [rcx+28h] mov edi, 1 call rax loc_88582: mov rdi, [rbp+var_30] add rdi, 38h ; '8' call my_context_yield mov rax, [rbp+var_30] cmp qword ptr [rax+20h], 0 jz short loc_885AE mov rax, [rbp+var_30] mov rax, [rax+20h] mov rcx, [rbp+var_30] mov rsi, [rcx+28h] xor edi, edi call rax loc_885AE: mov rax, [rbp+var_30] mov eax, [rax+4] and eax, 8 cmp eax, 0 jz short loc_885C7 mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh jmp short loc_885CC loc_885C7: jmp loc_884F5 loc_885CC: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
long long ma_pvio_write_async(long long a1, long long a2, long long a3) { int v4; // [rsp+Ch] [rbp-34h] long long v5; // [rsp+10h] [rbp-30h] long long v6; // [rsp+18h] [rbp-28h] v5 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 64) + 1152LL) + 40LL); v4 = *(_DWORD *)(a1 + 44); do { v6 = (*(long long ( **)(long long, long long, long long))(*(_QWORD *)(a1 + 72) + 40LL))(a1, a2, a3); if ( v6 >= 0 || *(_DWORD *)__errno_location() != 11 && *(_DWORD *)__errno_location() != 4 ) return v6; *(_DWORD *)v5 = 2; if ( v4 >= 0 ) { *(_DWORD *)v5 |= 8u; *(_DWORD *)(v5 + 16) = v4; } if ( *(_QWORD *)(v5 + 32) ) (*(void ( **)(long long, _QWORD))(v5 + 32))(1LL, *(_QWORD *)(v5 + 40)); my_context_yield(v5 + 56); if ( *(_QWORD *)(v5 + 32) ) (*(void ( **)(_QWORD, _QWORD))(v5 + 32))(0LL, *(_QWORD *)(v5 + 40)); } while ( (*(_DWORD *)(v5 + 4) & 8) == 0 ); return -1LL; }
ma_pvio_write_async: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x2c] MOV dword ptr [RBP + -0x34],EAX LAB_001884f5: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x48] MOV RAX,qword ptr [RAX + 0x28] MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL RAX MOV qword ptr [RBP + -0x28],RAX CMP qword ptr [RBP + -0x28],0x0 JGE 0x0018852e CALL 0x00160ba0 CMP dword ptr [RAX],0xb JZ 0x0018853b CALL 0x00160ba0 CMP dword ptr [RAX],0x4 JZ 0x0018853b LAB_0018852e: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x8],RAX JMP 0x001885cc LAB_0018853b: MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX],0x2 CMP dword ptr [RBP + -0x34],0x0 JL 0x00188560 MOV RAX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RAX] OR ECX,0x8 MOV dword ptr [RAX],ECX MOV ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x10],ECX LAB_00188560: MOV RAX,qword ptr [RBP + -0x30] CMP qword ptr [RAX + 0x20],0x0 JZ 0x00188582 MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RCX + 0x28] MOV EDI,0x1 CALL RAX LAB_00188582: MOV RDI,qword ptr [RBP + -0x30] ADD RDI,0x38 CALL 0x001a3ea0 MOV RAX,qword ptr [RBP + -0x30] CMP qword ptr [RAX + 0x20],0x0 JZ 0x001885ae MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RCX + 0x28] XOR EDI,EDI CALL RAX LAB_001885ae: MOV RAX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RAX + 0x4] AND EAX,0x8 CMP EAX,0x0 JZ 0x001885c7 MOV qword ptr [RBP + -0x8],-0x1 JMP 0x001885cc LAB_001885c7: JMP 0x001884f5 LAB_001885cc: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
long ma_pvio_write_async(long param_1,int8 param_2,int8 param_3) { uint uVar1; uint *puVar2; long lVar3; int *piVar4; puVar2 = *(uint **)(*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x28); uVar1 = *(uint *)(param_1 + 0x2c); while( true ) { lVar3 = (**(code **)(*(long *)(param_1 + 0x48) + 0x28))(param_1,param_2,param_3); if (-1 < lVar3) { return lVar3; } piVar4 = __errno_location(); if ((*piVar4 != 0xb) && (piVar4 = __errno_location(), *piVar4 != 4)) break; *puVar2 = 2; if (-1 < (int)uVar1) { *puVar2 = *puVar2 | 8; puVar2[4] = uVar1; } if (*(long *)(puVar2 + 8) != 0) { (**(code **)(puVar2 + 8))(1,*(int8 *)(puVar2 + 10)); } my_context_yield(puVar2 + 0xe); if (*(long *)(puVar2 + 8) != 0) { (**(code **)(puVar2 + 8))(0,*(int8 *)(puVar2 + 10)); } if ((puVar2[1] & 8) != 0) { return -1; } } return lVar3; }
20,475
POINTonE2_affine_Serialize_BE
corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/e2.c
static limb_t POINTonE2_affine_Serialize_BE(unsigned char out[192], const POINTonE2_affine *in) { vec384x temp; from_fp(temp[1], in->X[1]); be_bytes_from_limbs(out, temp[1], sizeof(temp[1])); from_fp(temp[0], in->X[0]); be_bytes_from_limbs(out + 48, temp[0], sizeof(temp[0])); from_fp(temp[1], in->Y[1]); be_bytes_from_limbs(out + 96, temp[1], sizeof(temp[1])); from_fp(temp[0], in->Y[0]); be_bytes_from_limbs(out + 144, temp[0], sizeof(temp[0])); return sgn0_pty_mod_384x(temp, BLS12_381_P); }
O3
c
POINTonE2_affine_Serialize_BE: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x60, %rsp movq %rsi, %r15 movq %rdi, %rbx movabsq $-0x760c000300030003, %r14 # imm = 0x89F3FFFCFFFCFFFD leaq -0x50(%rbp), %r12 addq $0x30, %rsi leaq 0x23ed5(%rip), %rdx # 0x3fb10 movq %r12, %rdi movq %r14, %rcx callq 0x33e00 movl $0x2f, %eax movl $0x178, %edx # imm = 0x178 movq %rbx, %rsi movq %rax, %rcx andq $-0x8, %rcx movq -0x50(%rbp,%rcx), %rdi movl %edx, %ecx andb $0x38, %cl shrq %cl, %rdi movb %dil, (%rsi) incq %rsi addq $-0x8, %rdx addq $-0x1, %rax jb 0x1bc53 leaq 0x23e92(%rip), %rdx # 0x3fb10 leaq -0x80(%rbp), %rdi movq %r15, %rsi movq %r14, %rcx callq 0x33e00 leaq 0x30(%rbx), %rax movl $0x2f, %edx movl $0x178, %esi # imm = 0x178 movq %rdx, %rcx andq $-0x8, %rcx movq -0x80(%rbp,%rcx), %rdi movl %esi, %ecx andb $0x38, %cl shrq %cl, %rdi movb %dil, (%rax) incq %rax addq $-0x8, %rsi addq $-0x1, %rdx jb 0x1bc9b leaq 0x90(%r15), %rsi leaq 0x23e43(%rip), %rdx # 0x3fb10 movq %r12, %rdi movq %r14, %rcx callq 0x33e00 leaq 0x60(%rbx), %rax movl $0x2f, %edx movl $0x178, %esi # imm = 0x178 movq %rdx, %rcx andq $-0x8, %rcx movq -0x50(%rbp,%rcx), %rdi movl %esi, %ecx andb $0x38, %cl shrq %cl, %rdi movb %dil, (%rax) incq %rax addq $-0x8, %rsi addq $-0x1, %rdx jb 0x1bce6 addq $0x60, %r15 leaq 0x23dfb(%rip), %rdx # 0x3fb10 leaq -0x80(%rbp), %rdi movq %r15, %rsi movq %r14, %rcx callq 0x33e00 addq $0x90, %rbx movl $0x2f, %eax movl $0x178, %edx # imm = 0x178 movq %rax, %rcx andq $-0x8, %rcx movq -0x80(%rbp,%rcx), %rsi movl %edx, %ecx andb $0x38, %cl shrq %cl, %rsi movb %sil, (%rbx) incq %rbx addq $-0x8, %rdx addq $-0x1, %rax jb 0x1bd35 leaq 0x23db0(%rip), %rsi # 0x3fb10 leaq -0x80(%rbp), %rdi callq 0x2f720 addq $0x60, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
POINTonE2_affine_Serialize_BE: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 60h mov r15, rsi mov rbx, rdi mov r14, 89F3FFFCFFFCFFFDh lea r12, [rbp+var_50] add rsi, 30h ; '0' lea rdx, BLS12_381_P mov rdi, r12 mov rcx, r14 call from_mont_384 mov eax, 2Fh ; '/' mov edx, 178h mov rsi, rbx loc_1BC53: mov rcx, rax and rcx, 0FFFFFFFFFFFFFFF8h mov rdi, [rbp+rcx+var_50] mov ecx, edx and cl, 38h shr rdi, cl mov [rsi], dil inc rsi add rdx, 0FFFFFFFFFFFFFFF8h add rax, 0FFFFFFFFFFFFFFFFh jb short loc_1BC53 lea rdx, BLS12_381_P lea rdi, [rbp+var_80] mov rsi, r15 mov rcx, r14 call from_mont_384 lea rax, [rbx+30h] mov edx, 2Fh ; '/' mov esi, 178h loc_1BC9B: mov rcx, rdx and rcx, 0FFFFFFFFFFFFFFF8h mov rdi, [rbp+rcx+var_80] mov ecx, esi and cl, 38h shr rdi, cl mov [rax], dil inc rax add rsi, 0FFFFFFFFFFFFFFF8h add rdx, 0FFFFFFFFFFFFFFFFh jb short loc_1BC9B lea rsi, [r15+90h] lea rdx, BLS12_381_P mov rdi, r12 mov rcx, r14 call from_mont_384 lea rax, [rbx+60h] mov edx, 2Fh ; '/' mov esi, 178h loc_1BCE6: mov rcx, rdx and rcx, 0FFFFFFFFFFFFFFF8h mov rdi, [rbp+rcx+var_50] mov ecx, esi and cl, 38h shr rdi, cl mov [rax], dil inc rax add rsi, 0FFFFFFFFFFFFFFF8h add rdx, 0FFFFFFFFFFFFFFFFh jb short loc_1BCE6 add r15, 60h ; '`' lea rdx, BLS12_381_P lea rdi, [rbp+var_80] mov rsi, r15 mov rcx, r14 call from_mont_384 add rbx, 90h mov eax, 2Fh ; '/' mov edx, 178h loc_1BD35: mov rcx, rax and rcx, 0FFFFFFFFFFFFFFF8h mov rsi, [rbp+rcx+var_80] mov ecx, edx and cl, 38h shr rsi, cl mov [rbx], sil inc rbx add rdx, 0FFFFFFFFFFFFFFF8h add rax, 0FFFFFFFFFFFFFFFFh jb short loc_1BD35 lea rsi, BLS12_381_P lea rdi, [rbp+var_80] call sgn0_pty_mod_384x add rsp, 60h pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long POINTonE2_affine_Serialize_BE(_BYTE *a1, long long a2) { long long v3; // rax long long v4; // rdx _BYTE *v5; // rsi bool v6; // cf _BYTE *v7; // rax long long v8; // rdx long long v9; // rsi _BYTE *v10; // rax long long v11; // rdx long long v12; // rsi _BYTE *v13; // rbx long long v14; // rax long long v15; // rdx _QWORD v17[6]; // [rsp+0h] [rbp-80h] BYREF _QWORD v18[10]; // [rsp+30h] [rbp-50h] BYREF from_mont_384(v18, a2 + 48, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); v3 = 47LL; v4 = 376LL; v5 = a1; do { *v5++ = *(_QWORD *)((char *)v18 + (v3 & 0xFFFFFFFFFFFFFFF8LL)) >> (v4 & 0x38); v4 -= 8LL; v6 = v3-- != 0; } while ( v6 ); from_mont_384(v17, a2, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); v7 = a1 + 48; v8 = 47LL; v9 = 376LL; do { *v7++ = *(_QWORD *)((char *)v17 + (v8 & 0xFFFFFFFFFFFFFFF8LL)) >> (v9 & 0x38); v9 -= 8LL; v6 = v8-- != 0; } while ( v6 ); from_mont_384(v18, a2 + 144, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); v10 = a1 + 96; v11 = 47LL; v12 = 376LL; do { *v10++ = *(_QWORD *)((char *)v18 + (v11 & 0xFFFFFFFFFFFFFFF8LL)) >> (v12 & 0x38); v12 -= 8LL; v6 = v11-- != 0; } while ( v6 ); from_mont_384(v17, a2 + 96, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); v13 = a1 + 144; v14 = 47LL; v15 = 376LL; do { *v13++ = *(_QWORD *)((char *)v17 + (v14 & 0xFFFFFFFFFFFFFFF8LL)) >> (v15 & 0x38); v15 -= 8LL; v6 = v14-- != 0; } while ( v6 ); return sgn0_pty_mod_384x(v17, &BLS12_381_P, v15); }
POINTonE2_affine_Serialize_BE: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x60 MOV R15,RSI MOV RBX,RDI MOV R14,-0x760c000300030003 LEA R12,[RBP + -0x50] ADD RSI,0x30 LEA RDX,[0x13fb10] MOV RDI,R12 MOV RCX,R14 CALL 0x00133e00 MOV EAX,0x2f MOV EDX,0x178 MOV RSI,RBX LAB_0011bc53: MOV RCX,RAX AND RCX,-0x8 MOV RDI,qword ptr [RBP + RCX*0x1 + -0x50] MOV ECX,EDX AND CL,0x38 SHR RDI,CL MOV byte ptr [RSI],DIL INC RSI ADD RDX,-0x8 ADD RAX,-0x1 JC 0x0011bc53 LEA RDX,[0x13fb10] LEA RDI,[RBP + -0x80] MOV RSI,R15 MOV RCX,R14 CALL 0x00133e00 LEA RAX,[RBX + 0x30] MOV EDX,0x2f MOV ESI,0x178 LAB_0011bc9b: MOV RCX,RDX AND RCX,-0x8 MOV RDI,qword ptr [RBP + RCX*0x1 + -0x80] MOV ECX,ESI AND CL,0x38 SHR RDI,CL MOV byte ptr [RAX],DIL INC RAX ADD RSI,-0x8 ADD RDX,-0x1 JC 0x0011bc9b LEA RSI,[R15 + 0x90] LEA RDX,[0x13fb10] MOV RDI,R12 MOV RCX,R14 CALL 0x00133e00 LEA RAX,[RBX + 0x60] MOV EDX,0x2f MOV ESI,0x178 LAB_0011bce6: MOV RCX,RDX AND RCX,-0x8 MOV RDI,qword ptr [RBP + RCX*0x1 + -0x50] MOV ECX,ESI AND CL,0x38 SHR RDI,CL MOV byte ptr [RAX],DIL INC RAX ADD RSI,-0x8 ADD RDX,-0x1 JC 0x0011bce6 ADD R15,0x60 LEA RDX,[0x13fb10] LEA RDI,[RBP + -0x80] MOV RSI,R15 MOV RCX,R14 CALL 0x00133e00 ADD RBX,0x90 MOV EAX,0x2f MOV EDX,0x178 LAB_0011bd35: MOV RCX,RAX AND RCX,-0x8 MOV RSI,qword ptr [RBP + RCX*0x1 + -0x80] MOV ECX,EDX AND CL,0x38 SHR RSI,CL MOV byte ptr [RBX],SIL INC RBX ADD RDX,-0x8 ADD RAX,-0x1 JC 0x0011bd35 LEA RSI,[0x13fb10] LEA RDI,[RBP + -0x80] CALL 0x0012f720 ADD RSP,0x60 POP RBX POP R12 POP R14 POP R15 POP RBP RET
void POINTonE2_affine_Serialize_BE(int1 *param_1,long param_2) { ulong uVar1; byte bVar2; int1 *puVar3; bool bVar4; ulong local_88 [6]; ulong local_58 [6]; from_mont_384(local_58,param_2 + 0x30,BLS12_381_P,0x89f3fffcfffcfffd); uVar1 = 0x2f; bVar2 = 0x78; puVar3 = param_1; do { *puVar3 = (char)(*(ulong *)((long)local_58 + (uVar1 & 0xfffffffffffffff8)) >> (bVar2 & 0x38)); puVar3 = puVar3 + 1; bVar2 = bVar2 - 8; bVar4 = uVar1 != 0; uVar1 = uVar1 - 1; } while (bVar4); from_mont_384(local_88,param_2,BLS12_381_P,0x89f3fffcfffcfffd); puVar3 = param_1 + 0x30; uVar1 = 0x2f; bVar2 = 0x78; do { *puVar3 = (char)(*(ulong *)((long)local_88 + (uVar1 & 0xfffffffffffffff8)) >> (bVar2 & 0x38)); puVar3 = puVar3 + 1; bVar2 = bVar2 - 8; bVar4 = uVar1 != 0; uVar1 = uVar1 - 1; } while (bVar4); from_mont_384(local_58,param_2 + 0x90,BLS12_381_P,0x89f3fffcfffcfffd); puVar3 = param_1 + 0x60; uVar1 = 0x2f; bVar2 = 0x78; do { *puVar3 = (char)(*(ulong *)((long)local_58 + (uVar1 & 0xfffffffffffffff8)) >> (bVar2 & 0x38)); puVar3 = puVar3 + 1; bVar2 = bVar2 - 8; bVar4 = uVar1 != 0; uVar1 = uVar1 - 1; } while (bVar4); from_mont_384(local_88,param_2 + 0x60,BLS12_381_P,0x89f3fffcfffcfffd); param_1 = param_1 + 0x90; uVar1 = 0x2f; bVar2 = 0x78; do { *param_1 = (char)(*(ulong *)((long)local_88 + (uVar1 & 0xfffffffffffffff8)) >> (bVar2 & 0x38)); param_1 = param_1 + 1; bVar2 = bVar2 - 8; bVar4 = uVar1 != 0; uVar1 = uVar1 - 1; } while (bVar4); sgn0_pty_mod_384x(local_88,BLS12_381_P); return; }
20,476
Json::CharReaderBuilder::ecma404Mode(Json::Value*)
aimrt_mujoco_sim/_deps/jsoncpp-src/src/lib_json/json_reader.cpp
void CharReaderBuilder::ecma404Mode(Json::Value* settings) { //! [CharReaderBuilderECMA404Mode] (*settings)["allowComments"] = false; (*settings)["allowTrailingCommas"] = false; (*settings)["strictRoot"] = false; (*settings)["allowDroppedNullPlaceholders"] = false; (*settings)["allowNumericKeys"] = false; (*settings)["allowSingleQuotes"] = false; (*settings)["stackLimit"] = 1000; (*settings)["failIfExtra"] = true; (*settings)["rejectDupKeys"] = false; (*settings)["allowSpecialFloats"] = false; (*settings)["skipBom"] = false; //! [CharReaderBuilderECMA404Mode] }
O0
cpp
Json::CharReaderBuilder::ecma404Mode(Json::Value*): subq $0x278, %rsp # imm = 0x278 movq %rdi, 0x270(%rsp) leaq 0x248(%rsp), %rdi xorl %esi, %esi callq 0x186b80 movq 0x270(%rsp), %rdi leaq 0x3a07f(%rip), %rsi # 0x1b502c callq 0x18b140 movq %rax, 0xa0(%rsp) jmp 0x17afbc movq 0xa0(%rsp), %rdi leaq 0x248(%rsp), %rsi movq %rsi, 0x90(%rsp) callq 0x187050 movq 0x90(%rsp), %rdi callq 0x186ef0 leaq 0x210(%rsp), %rdi xorl %esi, %esi callq 0x186b80 movq 0x270(%rsp), %rdi leaq 0x3a036(%rip), %rsi # 0x1b503a callq 0x18b140 movq %rax, 0x98(%rsp) jmp 0x17b013 movq 0x98(%rsp), %rdi leaq 0x210(%rsp), %rsi movq %rsi, 0x80(%rsp) callq 0x187050 movq 0x80(%rsp), %rdi callq 0x186ef0 leaq 0x1e8(%rsp), %rdi xorl %esi, %esi callq 0x186b80 movq 0x270(%rsp), %rdi leaq 0x39ff3(%rip), %rsi # 0x1b504e callq 0x18b140 movq %rax, 0x88(%rsp) jmp 0x17b06a movq 0x88(%rsp), %rdi leaq 0x1e8(%rsp), %rsi movq %rsi, 0x70(%rsp) callq 0x187050 movq 0x70(%rsp), %rdi callq 0x186ef0 leaq 0x1c0(%rsp), %rdi xorl %esi, %esi callq 0x186b80 movq 0x270(%rsp), %rdi leaq 0x39fad(%rip), %rsi # 0x1b5059 callq 0x18b140 movq %rax, 0x78(%rsp) jmp 0x17b0b8 movq 0x78(%rsp), %rdi leaq 0x1c0(%rsp), %rsi movq %rsi, 0x60(%rsp) callq 0x187050 movq 0x60(%rsp), %rdi callq 0x186ef0 leaq 0x198(%rsp), %rdi xorl %esi, %esi callq 0x186b80 movq 0x270(%rsp), %rdi leaq 0x39f7f(%rip), %rsi # 0x1b5076 callq 0x18b140 movq %rax, 0x68(%rsp) jmp 0x17b103 movq 0x68(%rsp), %rdi leaq 0x198(%rsp), %rsi movq %rsi, 0x50(%rsp) callq 0x187050 movq 0x50(%rsp), %rdi callq 0x186ef0 leaq 0x170(%rsp), %rdi xorl %esi, %esi callq 0x186b80 movq 0x270(%rsp), %rdi leaq 0x39f45(%rip), %rsi # 0x1b5087 callq 0x18b140 movq %rax, 0x58(%rsp) jmp 0x17b14e movq 0x58(%rsp), %rdi leaq 0x170(%rsp), %rsi movq %rsi, 0x40(%rsp) callq 0x187050 movq 0x40(%rsp), %rdi callq 0x186ef0 leaq 0x148(%rsp), %rdi movl $0x3e8, %esi # imm = 0x3E8 callq 0x1864c0 movq 0x270(%rsp), %rdi leaq 0x39f09(%rip), %rsi # 0x1b5099 callq 0x18b140 movq %rax, 0x48(%rsp) jmp 0x17b19c movq 0x48(%rsp), %rdi leaq 0x148(%rsp), %rsi movq %rsi, 0x30(%rsp) callq 0x187050 movq 0x30(%rsp), %rdi callq 0x186ef0 leaq 0x120(%rsp), %rdi movl $0x1, %esi callq 0x186b80 movq 0x270(%rsp), %rdi leaq 0x39ec6(%rip), %rsi # 0x1b50a4 callq 0x18b140 movq %rax, 0x38(%rsp) jmp 0x17b1ea movq 0x38(%rsp), %rdi leaq 0x120(%rsp), %rsi movq %rsi, 0x20(%rsp) callq 0x187050 movq 0x20(%rsp), %rdi callq 0x186ef0 leaq 0xf8(%rsp), %rdi xorl %esi, %esi callq 0x186b80 movq 0x270(%rsp), %rdi leaq 0x39e87(%rip), %rsi # 0x1b50b0 callq 0x18b140 movq %rax, 0x28(%rsp) jmp 0x17b235 movq 0x28(%rsp), %rdi leaq 0xf8(%rsp), %rsi movq %rsi, 0x10(%rsp) callq 0x187050 movq 0x10(%rsp), %rdi callq 0x186ef0 leaq 0xd0(%rsp), %rdi xorl %esi, %esi callq 0x186b80 movq 0x270(%rsp), %rdi leaq 0x39e4a(%rip), %rsi # 0x1b50be callq 0x18b140 movq %rax, 0x18(%rsp) jmp 0x17b280 movq 0x18(%rsp), %rdi leaq 0xd0(%rsp), %rsi movq %rsi, (%rsp) callq 0x187050 movq (%rsp), %rdi callq 0x186ef0 leaq 0xa8(%rsp), %rdi xorl %esi, %esi callq 0x186b80 movq 0x270(%rsp), %rdi leaq 0x39e14(%rip), %rsi # 0x1b50d1 callq 0x18b140 movq %rax, 0x8(%rsp) jmp 0x17b2c9 movq 0x8(%rsp), %rdi leaq 0xa8(%rsp), %rsi callq 0x187050 leaq 0xa8(%rsp), %rdi callq 0x186ef0 addq $0x278, %rsp # imm = 0x278 retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x240(%rsp) movl %eax, 0x23c(%rsp) leaq 0x248(%rsp), %rdi callq 0x186ef0 jmp 0x17b484 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x240(%rsp) movl %eax, 0x23c(%rsp) leaq 0x210(%rsp), %rdi callq 0x186ef0 jmp 0x17b484 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x240(%rsp) movl %eax, 0x23c(%rsp) leaq 0x1e8(%rsp), %rdi callq 0x186ef0 jmp 0x17b484 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x240(%rsp) movl %eax, 0x23c(%rsp) leaq 0x1c0(%rsp), %rdi callq 0x186ef0 jmp 0x17b484 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x240(%rsp) movl %eax, 0x23c(%rsp) leaq 0x198(%rsp), %rdi callq 0x186ef0 jmp 0x17b484 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x240(%rsp) movl %eax, 0x23c(%rsp) leaq 0x170(%rsp), %rdi callq 0x186ef0 jmp 0x17b484 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x240(%rsp) movl %eax, 0x23c(%rsp) leaq 0x148(%rsp), %rdi callq 0x186ef0 jmp 0x17b484 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x240(%rsp) movl %eax, 0x23c(%rsp) leaq 0x120(%rsp), %rdi callq 0x186ef0 jmp 0x17b484 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x240(%rsp) movl %eax, 0x23c(%rsp) leaq 0xf8(%rsp), %rdi callq 0x186ef0 jmp 0x17b484 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x240(%rsp) movl %eax, 0x23c(%rsp) leaq 0xd0(%rsp), %rdi callq 0x186ef0 jmp 0x17b484 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x240(%rsp) movl %eax, 0x23c(%rsp) leaq 0xa8(%rsp), %rdi callq 0x186ef0 movq 0x240(%rsp), %rdi callq 0x92a70 nopw %cs:(%rax,%rax)
_ZN4Json17CharReaderBuilder11ecma404ModeEPNS_5ValueE: sub rsp, 278h mov [rsp+278h+var_8], rdi lea rdi, [rsp+278h+var_30]; this xor esi, esi; bool call _ZN4Json5ValueC2Eb; Json::Value::Value(bool) mov rdi, [rsp+278h+var_8] lea rsi, aAllowcomments; "allowComments" call _ZN4Json5ValueixEPKc; Json::Value::operator[](char const*) mov [rsp+278h+var_1D8], rax jmp short $+2 loc_17AFBC: mov rdi, [rsp+278h+var_1D8] lea rsi, [rsp+278h+var_30] mov [rsp+278h+var_1E8], rsi call _ZN4Json5ValueaSEOS0_; Json::Value::operator=(Json::Value&&) mov rdi, [rsp+278h+var_1E8]; void * call _ZN4Json5ValueD2Ev; Json::Value::~Value() lea rdi, [rsp+278h+var_68]; this xor esi, esi; bool call _ZN4Json5ValueC2Eb; Json::Value::Value(bool) mov rdi, [rsp+278h+var_8] lea rsi, aAllowtrailingc; "allowTrailingCommas" call _ZN4Json5ValueixEPKc; Json::Value::operator[](char const*) mov [rsp+278h+var_1E0], rax jmp short $+2 loc_17B013: mov rdi, [rsp+278h+var_1E0] lea rsi, [rsp+278h+var_68] mov [rsp+278h+var_1F8], rsi call _ZN4Json5ValueaSEOS0_; Json::Value::operator=(Json::Value&&) mov rdi, [rsp+278h+var_1F8]; void * call _ZN4Json5ValueD2Ev; Json::Value::~Value() lea rdi, [rsp+278h+var_90]; this xor esi, esi; bool call _ZN4Json5ValueC2Eb; Json::Value::Value(bool) mov rdi, [rsp+278h+var_8] lea rsi, aStrictroot; "strictRoot" call _ZN4Json5ValueixEPKc; Json::Value::operator[](char const*) mov [rsp+278h+var_1F0], rax jmp short $+2 loc_17B06A: mov rdi, [rsp+278h+var_1F0] lea rsi, [rsp+278h+var_90] mov [rsp+278h+var_208], rsi call _ZN4Json5ValueaSEOS0_; Json::Value::operator=(Json::Value&&) mov rdi, [rsp+278h+var_208]; void * call _ZN4Json5ValueD2Ev; Json::Value::~Value() lea rdi, [rsp+278h+var_B8]; this xor esi, esi; bool call _ZN4Json5ValueC2Eb; Json::Value::Value(bool) mov rdi, [rsp+278h+var_8] lea rsi, aAllowdroppednu; "allowDroppedNullPlaceholders" call _ZN4Json5ValueixEPKc; Json::Value::operator[](char const*) mov [rsp+278h+var_200], rax jmp short $+2 loc_17B0B8: mov rdi, [rsp+278h+var_200] lea rsi, [rsp+278h+var_B8] mov [rsp+278h+var_218], rsi call _ZN4Json5ValueaSEOS0_; Json::Value::operator=(Json::Value&&) mov rdi, [rsp+278h+var_218]; void * call _ZN4Json5ValueD2Ev; Json::Value::~Value() lea rdi, [rsp+278h+var_E0]; this xor esi, esi; bool call _ZN4Json5ValueC2Eb; Json::Value::Value(bool) mov rdi, [rsp+278h+var_8] lea rsi, aAllownumericke; "allowNumericKeys" call _ZN4Json5ValueixEPKc; Json::Value::operator[](char const*) mov [rsp+278h+var_210], rax jmp short $+2 loc_17B103: mov rdi, [rsp+278h+var_210] lea rsi, [rsp+278h+var_E0] mov [rsp+278h+var_228], rsi call _ZN4Json5ValueaSEOS0_; Json::Value::operator=(Json::Value&&) mov rdi, [rsp+278h+var_228]; void * call _ZN4Json5ValueD2Ev; Json::Value::~Value() lea rdi, [rsp+278h+var_108]; this xor esi, esi; bool call _ZN4Json5ValueC2Eb; Json::Value::Value(bool) mov rdi, [rsp+278h+var_8] lea rsi, aAllowsinglequo; "allowSingleQuotes" call _ZN4Json5ValueixEPKc; Json::Value::operator[](char const*) mov [rsp+278h+var_220], rax jmp short $+2 loc_17B14E: mov rdi, [rsp+278h+var_220] lea rsi, [rsp+278h+var_108] mov [rsp+278h+var_238], rsi call _ZN4Json5ValueaSEOS0_; Json::Value::operator=(Json::Value&&) mov rdi, [rsp+278h+var_238]; void * call _ZN4Json5ValueD2Ev; Json::Value::~Value() lea rdi, [rsp+278h+var_130]; this mov esi, 3E8h; int call _ZN4Json5ValueC2Ei; Json::Value::Value(int) mov rdi, [rsp+278h+var_8] lea rsi, aStacklimit; "stackLimit" call _ZN4Json5ValueixEPKc; Json::Value::operator[](char const*) mov [rsp+278h+var_230], rax jmp short $+2 loc_17B19C: mov rdi, [rsp+278h+var_230] lea rsi, [rsp+278h+var_130] mov [rsp+278h+var_248], rsi call _ZN4Json5ValueaSEOS0_; Json::Value::operator=(Json::Value&&) mov rdi, [rsp+278h+var_248]; void * call _ZN4Json5ValueD2Ev; Json::Value::~Value() lea rdi, [rsp+278h+var_158]; this mov esi, 1; bool call _ZN4Json5ValueC2Eb; Json::Value::Value(bool) mov rdi, [rsp+278h+var_8] lea rsi, aFailifextra; "failIfExtra" call _ZN4Json5ValueixEPKc; Json::Value::operator[](char const*) mov [rsp+278h+var_240], rax jmp short $+2 loc_17B1EA: mov rdi, [rsp+278h+var_240] lea rsi, [rsp+278h+var_158] mov [rsp+278h+var_258], rsi call _ZN4Json5ValueaSEOS0_; Json::Value::operator=(Json::Value&&) mov rdi, [rsp+278h+var_258]; void * call _ZN4Json5ValueD2Ev; Json::Value::~Value() lea rdi, [rsp+278h+var_180]; this xor esi, esi; bool call _ZN4Json5ValueC2Eb; Json::Value::Value(bool) mov rdi, [rsp+278h+var_8] lea rsi, aRejectdupkeys; "rejectDupKeys" call _ZN4Json5ValueixEPKc; Json::Value::operator[](char const*) mov [rsp+278h+var_250], rax jmp short $+2 loc_17B235: mov rdi, [rsp+278h+var_250] lea rsi, [rsp+278h+var_180] mov [rsp+278h+var_268], rsi call _ZN4Json5ValueaSEOS0_; Json::Value::operator=(Json::Value&&) mov rdi, [rsp+278h+var_268]; void * call _ZN4Json5ValueD2Ev; Json::Value::~Value() lea rdi, [rsp+278h+var_1A8]; this xor esi, esi; bool call _ZN4Json5ValueC2Eb; Json::Value::Value(bool) mov rdi, [rsp+278h+var_8] lea rsi, aAllowspecialfl; "allowSpecialFloats" call _ZN4Json5ValueixEPKc; Json::Value::operator[](char const*) mov [rsp+278h+var_260], rax jmp short $+2 loc_17B280: mov rdi, [rsp+278h+var_260] lea rsi, [rsp+278h+var_1A8] mov [rsp+278h+var_278], rsi call _ZN4Json5ValueaSEOS0_; Json::Value::operator=(Json::Value&&) mov rdi, [rsp+278h+var_278]; void * call _ZN4Json5ValueD2Ev; Json::Value::~Value() lea rdi, [rsp+278h+var_1D0]; this xor esi, esi; bool call _ZN4Json5ValueC2Eb; Json::Value::Value(bool) mov rdi, [rsp+278h+var_8] lea rsi, aSkipbom; "skipBom" call _ZN4Json5ValueixEPKc; Json::Value::operator[](char const*) mov [rsp+278h+var_270], rax jmp short $+2 loc_17B2C9: mov rdi, [rsp+278h+var_270] lea rsi, [rsp+278h+var_1D0] call _ZN4Json5ValueaSEOS0_; Json::Value::operator=(Json::Value&&) lea rdi, [rsp+278h+var_1D0]; void * call _ZN4Json5ValueD2Ev; Json::Value::~Value() add rsp, 278h retn mov rcx, rax mov eax, edx mov [rsp+arg_238], rcx mov [rsp+arg_234], eax lea rdi, [rsp+arg_240]; void * call _ZN4Json5ValueD2Ev; Json::Value::~Value() jmp loc_17B484 mov rcx, rax mov eax, edx mov [rsp+arg_238], rcx mov [rsp+arg_234], eax lea rdi, [rsp+arg_208]; void * call _ZN4Json5ValueD2Ev; Json::Value::~Value() jmp loc_17B484 mov rcx, rax mov eax, edx mov [rsp+arg_238], rcx mov [rsp+arg_234], eax lea rdi, [rsp+arg_1E0]; void * call _ZN4Json5ValueD2Ev; Json::Value::~Value() jmp loc_17B484 mov rcx, rax mov eax, edx mov [rsp+arg_238], rcx mov [rsp+arg_234], eax lea rdi, [rsp+arg_1B8]; void * call _ZN4Json5ValueD2Ev; Json::Value::~Value() jmp loc_17B484 mov rcx, rax mov eax, edx mov [rsp+arg_238], rcx mov [rsp+arg_234], eax lea rdi, [rsp+arg_190]; void * call _ZN4Json5ValueD2Ev; Json::Value::~Value() jmp loc_17B484 mov rcx, rax mov eax, edx mov [rsp+arg_238], rcx mov [rsp+arg_234], eax lea rdi, [rsp+arg_168]; void * call _ZN4Json5ValueD2Ev; Json::Value::~Value() jmp loc_17B484 mov rcx, rax mov eax, edx mov [rsp+arg_238], rcx mov [rsp+arg_234], eax lea rdi, [rsp+arg_140]; void * call _ZN4Json5ValueD2Ev; Json::Value::~Value() jmp loc_17B484 mov rcx, rax mov eax, edx mov [rsp+arg_238], rcx mov [rsp+arg_234], eax lea rdi, [rsp+arg_118]; void * call _ZN4Json5ValueD2Ev; Json::Value::~Value() jmp short loc_17B484 mov rcx, rax mov eax, edx mov [rsp+arg_238], rcx mov [rsp+arg_234], eax lea rdi, [rsp+arg_F0]; void * call _ZN4Json5ValueD2Ev; Json::Value::~Value() jmp short loc_17B484 mov rcx, rax mov eax, edx mov [rsp+arg_238], rcx mov [rsp+arg_234], eax lea rdi, [rsp+arg_C8]; void * call _ZN4Json5ValueD2Ev; Json::Value::~Value() jmp short loc_17B484 mov rcx, rax mov eax, edx mov [rsp+arg_238], rcx mov [rsp+arg_234], eax lea rdi, [rsp+arg_A0]; void * call _ZN4Json5ValueD2Ev; Json::Value::~Value() loc_17B484: mov rdi, [rsp+arg_238] call __Unwind_Resume
void Json::CharReaderBuilder::ecma404Mode(Json::CharReaderBuilder *this, Json::Value *a2) { long long v2; // [rsp+8h] [rbp-270h] long long v3; // [rsp+18h] [rbp-260h] long long v4; // [rsp+28h] [rbp-250h] long long v5; // [rsp+38h] [rbp-240h] long long v6; // [rsp+48h] [rbp-230h] long long v7; // [rsp+58h] [rbp-220h] long long v8; // [rsp+68h] [rbp-210h] long long v9; // [rsp+78h] [rbp-200h] long long v10; // [rsp+88h] [rbp-1F0h] long long v11; // [rsp+98h] [rbp-1E0h] long long v12; // [rsp+A0h] [rbp-1D8h] _BYTE v13[40]; // [rsp+A8h] [rbp-1D0h] BYREF _BYTE v14[40]; // [rsp+D0h] [rbp-1A8h] BYREF _BYTE v15[40]; // [rsp+F8h] [rbp-180h] BYREF _BYTE v16[40]; // [rsp+120h] [rbp-158h] BYREF _BYTE v17[40]; // [rsp+148h] [rbp-130h] BYREF _BYTE v18[40]; // [rsp+170h] [rbp-108h] BYREF _BYTE v19[40]; // [rsp+198h] [rbp-E0h] BYREF _BYTE v20[40]; // [rsp+1C0h] [rbp-B8h] BYREF _BYTE v21[40]; // [rsp+1E8h] [rbp-90h] BYREF _BYTE v22[56]; // [rsp+210h] [rbp-68h] BYREF _BYTE v23[40]; // [rsp+248h] [rbp-30h] BYREF Json::CharReaderBuilder *v24; // [rsp+270h] [rbp-8h] v24 = this; Json::Value::Value((Json::Value *)v23, 0); v12 = Json::Value::operator[](v24, "allowComments"); Json::Value::operator=(v12, v23); Json::Value::~Value(v23); Json::Value::Value((Json::Value *)v22, 0); v11 = Json::Value::operator[](v24, "allowTrailingCommas"); Json::Value::operator=(v11, v22); Json::Value::~Value(v22); Json::Value::Value((Json::Value *)v21, 0); v10 = Json::Value::operator[](v24, "strictRoot"); Json::Value::operator=(v10, v21); Json::Value::~Value(v21); Json::Value::Value((Json::Value *)v20, 0); v9 = Json::Value::operator[](v24, "allowDroppedNullPlaceholders"); Json::Value::operator=(v9, v20); Json::Value::~Value(v20); Json::Value::Value((Json::Value *)v19, 0); v8 = Json::Value::operator[](v24, "allowNumericKeys"); Json::Value::operator=(v8, v19); Json::Value::~Value(v19); Json::Value::Value((Json::Value *)v18, 0); v7 = Json::Value::operator[](v24, "allowSingleQuotes"); Json::Value::operator=(v7, v18); Json::Value::~Value(v18); Json::Value::Value((Json::Value *)v17, 1000); v6 = Json::Value::operator[](v24, "stackLimit"); Json::Value::operator=(v6, v17); Json::Value::~Value(v17); Json::Value::Value((Json::Value *)v16, 1); v5 = Json::Value::operator[](v24, "failIfExtra"); Json::Value::operator=(v5, v16); Json::Value::~Value(v16); Json::Value::Value((Json::Value *)v15, 0); v4 = Json::Value::operator[](v24, "rejectDupKeys"); Json::Value::operator=(v4, v15); Json::Value::~Value(v15); Json::Value::Value((Json::Value *)v14, 0); v3 = Json::Value::operator[](v24, "allowSpecialFloats"); Json::Value::operator=(v3, v14); Json::Value::~Value(v14); Json::Value::Value((Json::Value *)v13, 0); v2 = Json::Value::operator[](v24, "skipBom"); Json::Value::operator=(v2, v13); Json::Value::~Value(v13); }
20,477
Json::CharReaderBuilder::ecma404Mode(Json::Value*)
aimrt_mujoco_sim/_deps/jsoncpp-src/src/lib_json/json_reader.cpp
void CharReaderBuilder::ecma404Mode(Json::Value* settings) { //! [CharReaderBuilderECMA404Mode] (*settings)["allowComments"] = false; (*settings)["allowTrailingCommas"] = false; (*settings)["strictRoot"] = false; (*settings)["allowDroppedNullPlaceholders"] = false; (*settings)["allowNumericKeys"] = false; (*settings)["allowSingleQuotes"] = false; (*settings)["stackLimit"] = 1000; (*settings)["failIfExtra"] = true; (*settings)["rejectDupKeys"] = false; (*settings)["allowSpecialFloats"] = false; (*settings)["skipBom"] = false; //! [CharReaderBuilderECMA404Mode] }
O3
cpp
Json::CharReaderBuilder::ecma404Mode(Json::Value*): pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx movq %rsp, %rdi xorl %esi, %esi callq 0x76af2 leaq 0x15875(%rip), %rsi # 0x88dd0 movq %rbx, %rdi callq 0x78de6 movq %rsp, %r14 movq %rax, %rdi movq %r14, %rsi callq 0x76d86 movq %r14, %rdi callq 0x76cde movq %rsp, %rdi xorl %esi, %esi callq 0x76af2 leaq 0x15854(%rip), %rsi # 0x88dde movq %rbx, %rdi callq 0x78de6 movq %rsp, %r14 movq %rax, %rdi movq %r14, %rsi callq 0x76d86 movq %r14, %rdi callq 0x76cde movq %rsp, %rdi xorl %esi, %esi callq 0x76af2 leaq 0x15839(%rip), %rsi # 0x88df2 movq %rbx, %rdi callq 0x78de6 movq %rsp, %r14 movq %rax, %rdi movq %r14, %rsi callq 0x76d86 movq %r14, %rdi callq 0x76cde movq %rsp, %rdi xorl %esi, %esi callq 0x76af2 leaq 0x15815(%rip), %rsi # 0x88dfd movq %rbx, %rdi callq 0x78de6 movq %rsp, %r14 movq %rax, %rdi movq %r14, %rsi callq 0x76d86 movq %r14, %rdi callq 0x76cde movq %rsp, %rdi xorl %esi, %esi callq 0x76af2 leaq 0x15803(%rip), %rsi # 0x88e1a movq %rbx, %rdi callq 0x78de6 movq %rsp, %r14 movq %rax, %rdi movq %r14, %rsi callq 0x76d86 movq %r14, %rdi callq 0x76cde movq %rsp, %rdi xorl %esi, %esi callq 0x76af2 leaq 0x157e5(%rip), %rsi # 0x88e2b movq %rbx, %rdi callq 0x78de6 movq %rsp, %r14 movq %rax, %rdi movq %r14, %rsi callq 0x76d86 movq %r14, %rdi callq 0x76cde movq %rsp, %rdi movl $0x3e8, %esi # imm = 0x3E8 callq 0x7674e leaq 0x157c5(%rip), %rsi # 0x88e3d movq %rbx, %rdi callq 0x78de6 movq %rsp, %r14 movq %rax, %rdi movq %r14, %rsi callq 0x76d86 movq %r14, %rdi callq 0x76cde movq %rsp, %rdi movl $0x1, %esi callq 0x76af2 leaq 0x1579e(%rip), %rsi # 0x88e48 movq %rbx, %rdi callq 0x78de6 movq %rsp, %r14 movq %rax, %rdi movq %r14, %rsi callq 0x76d86 movq %r14, %rdi callq 0x76cde movq %rsp, %rdi xorl %esi, %esi callq 0x76af2 leaq 0x1577b(%rip), %rsi # 0x88e54 movq %rbx, %rdi callq 0x78de6 movq %rsp, %r14 movq %rax, %rdi movq %r14, %rsi callq 0x76d86 movq %r14, %rdi callq 0x76cde movq %rsp, %rdi xorl %esi, %esi callq 0x76af2 leaq 0x1575a(%rip), %rsi # 0x88e62 movq %rbx, %rdi callq 0x78de6 movq %rsp, %r14 movq %rax, %rdi movq %r14, %rsi callq 0x76d86 movq %r14, %rdi callq 0x76cde movq %rsp, %rdi xorl %esi, %esi callq 0x76af2 leaq 0x1573e(%rip), %rsi # 0x88e75 movq %rbx, %rdi callq 0x78de6 movq %rsp, %rbx movq %rax, %rdi movq %rbx, %rsi callq 0x76d86 movq %rbx, %rdi callq 0x76cde addq $0x28, %rsp popq %rbx popq %r14 retq jmp 0x73771 jmp 0x73771 jmp 0x73771 jmp 0x73771 jmp 0x73771 jmp 0x73771 jmp 0x73771 jmp 0x73771 jmp 0x73771 jmp 0x73771 movq %rax, %rbx movq %rsp, %rdi callq 0x76cde movq %rbx, %rdi callq 0x1ffd0
_ZN4Json17CharReaderBuilder11ecma404ModeEPNS_5ValueE: push r14 push rbx sub rsp, 28h mov rbx, rdi mov rdi, rsp; this xor esi, esi; bool call _ZN4Json5ValueC2Eb; Json::Value::Value(bool) lea rsi, aAllowcomments; "allowComments" mov rdi, rbx; this call _ZN4Json5ValueixEPKc; Json::Value::operator[](char const*) mov r14, rsp mov rdi, rax; Json::Value * mov rsi, r14; this call _ZN4Json5ValueaSEOS0_; Json::Value::operator=(Json::Value&&) mov rdi, r14; void * call _ZN4Json5ValueD2Ev; Json::Value::~Value() mov rdi, rsp; this xor esi, esi; bool call _ZN4Json5ValueC2Eb; Json::Value::Value(bool) lea rsi, aAllowtrailingc; "allowTrailingCommas" mov rdi, rbx; this call _ZN4Json5ValueixEPKc; Json::Value::operator[](char const*) mov r14, rsp mov rdi, rax; Json::Value * mov rsi, r14; this call _ZN4Json5ValueaSEOS0_; Json::Value::operator=(Json::Value&&) mov rdi, r14; void * call _ZN4Json5ValueD2Ev; Json::Value::~Value() mov rdi, rsp; this xor esi, esi; bool call _ZN4Json5ValueC2Eb; Json::Value::Value(bool) lea rsi, aStrictroot; "strictRoot" mov rdi, rbx; this call _ZN4Json5ValueixEPKc; Json::Value::operator[](char const*) mov r14, rsp mov rdi, rax; Json::Value * mov rsi, r14; this call _ZN4Json5ValueaSEOS0_; Json::Value::operator=(Json::Value&&) mov rdi, r14; void * call _ZN4Json5ValueD2Ev; Json::Value::~Value() mov rdi, rsp; this xor esi, esi; bool call _ZN4Json5ValueC2Eb; Json::Value::Value(bool) lea rsi, aAllowdroppednu; "allowDroppedNullPlaceholders" mov rdi, rbx; this call _ZN4Json5ValueixEPKc; Json::Value::operator[](char const*) mov r14, rsp mov rdi, rax; Json::Value * mov rsi, r14; this call _ZN4Json5ValueaSEOS0_; Json::Value::operator=(Json::Value&&) mov rdi, r14; void * call _ZN4Json5ValueD2Ev; Json::Value::~Value() mov rdi, rsp; this xor esi, esi; bool call _ZN4Json5ValueC2Eb; Json::Value::Value(bool) lea rsi, aAllownumericke; "allowNumericKeys" mov rdi, rbx; this call _ZN4Json5ValueixEPKc; Json::Value::operator[](char const*) mov r14, rsp mov rdi, rax; Json::Value * mov rsi, r14; this call _ZN4Json5ValueaSEOS0_; Json::Value::operator=(Json::Value&&) mov rdi, r14; void * call _ZN4Json5ValueD2Ev; Json::Value::~Value() mov rdi, rsp; this xor esi, esi; bool call _ZN4Json5ValueC2Eb; Json::Value::Value(bool) lea rsi, aAllowsinglequo; "allowSingleQuotes" mov rdi, rbx; this call _ZN4Json5ValueixEPKc; Json::Value::operator[](char const*) mov r14, rsp mov rdi, rax; Json::Value * mov rsi, r14; this call _ZN4Json5ValueaSEOS0_; Json::Value::operator=(Json::Value&&) mov rdi, r14; void * call _ZN4Json5ValueD2Ev; Json::Value::~Value() mov rdi, rsp; this mov esi, 3E8h; int call _ZN4Json5ValueC2Ei; Json::Value::Value(int) lea rsi, aStacklimit; "stackLimit" mov rdi, rbx; this call _ZN4Json5ValueixEPKc; Json::Value::operator[](char const*) mov r14, rsp mov rdi, rax; Json::Value * mov rsi, r14; this call _ZN4Json5ValueaSEOS0_; Json::Value::operator=(Json::Value&&) mov rdi, r14; void * call _ZN4Json5ValueD2Ev; Json::Value::~Value() mov rdi, rsp; this mov esi, 1; bool call _ZN4Json5ValueC2Eb; Json::Value::Value(bool) lea rsi, aFailifextra; "failIfExtra" mov rdi, rbx; this call _ZN4Json5ValueixEPKc; Json::Value::operator[](char const*) mov r14, rsp mov rdi, rax; Json::Value * mov rsi, r14; this call _ZN4Json5ValueaSEOS0_; Json::Value::operator=(Json::Value&&) mov rdi, r14; void * call _ZN4Json5ValueD2Ev; Json::Value::~Value() mov rdi, rsp; this xor esi, esi; bool call _ZN4Json5ValueC2Eb; Json::Value::Value(bool) lea rsi, aRejectdupkeys; "rejectDupKeys" mov rdi, rbx; this call _ZN4Json5ValueixEPKc; Json::Value::operator[](char const*) mov r14, rsp mov rdi, rax; Json::Value * mov rsi, r14; this call _ZN4Json5ValueaSEOS0_; Json::Value::operator=(Json::Value&&) mov rdi, r14; void * call _ZN4Json5ValueD2Ev; Json::Value::~Value() mov rdi, rsp; this xor esi, esi; bool call _ZN4Json5ValueC2Eb; Json::Value::Value(bool) lea rsi, aAllowspecialfl; "allowSpecialFloats" mov rdi, rbx; this call _ZN4Json5ValueixEPKc; Json::Value::operator[](char const*) mov r14, rsp mov rdi, rax; Json::Value * mov rsi, r14; this call _ZN4Json5ValueaSEOS0_; Json::Value::operator=(Json::Value&&) mov rdi, r14; void * call _ZN4Json5ValueD2Ev; Json::Value::~Value() mov rdi, rsp; this xor esi, esi; bool call _ZN4Json5ValueC2Eb; Json::Value::Value(bool) lea rsi, aSkipbom; "skipBom" mov rdi, rbx; this call _ZN4Json5ValueixEPKc; Json::Value::operator[](char const*) mov rbx, rsp mov rdi, rax; Json::Value * mov rsi, rbx; this call _ZN4Json5ValueaSEOS0_; Json::Value::operator=(Json::Value&&) mov rdi, rbx; void * call _ZN4Json5ValueD2Ev; Json::Value::~Value() add rsp, 28h pop rbx pop r14 retn jmp short loc_73771 jmp short loc_73771 jmp short loc_73771 jmp short loc_73771 jmp short loc_73771 jmp short loc_73771 jmp short loc_73771 jmp short loc_73771 jmp short loc_73771 jmp short $+2 loc_73771: mov rbx, rax mov rdi, rsp; void * call _ZN4Json5ValueD2Ev; Json::Value::~Value() mov rdi, rbx call __Unwind_Resume
void Json::CharReaderBuilder::ecma404Mode(Json::CharReaderBuilder *this, Json::Value *a2) { Json::Value *v2; // rax Json::Value *v3; // rax Json::Value *v4; // rax Json::Value *v5; // rax Json::Value *v6; // rax Json::Value *v7; // rax Json::Value *v8; // rax Json::Value *v9; // rax Json::Value *v10; // rax Json::Value *v11; // rax Json::Value *v12; // rax _BYTE v13[56]; // [rsp+0h] [rbp-38h] BYREF Json::Value::Value((Json::Value *)v13, 0); v2 = (Json::Value *)Json::Value::operator[](this, "allowComments"); Json::Value::operator=(v2, (Json::Value *)v13); Json::Value::~Value(v13); Json::Value::Value((Json::Value *)v13, 0); v3 = (Json::Value *)Json::Value::operator[](this, "allowTrailingCommas"); Json::Value::operator=(v3, (Json::Value *)v13); Json::Value::~Value(v13); Json::Value::Value((Json::Value *)v13, 0); v4 = (Json::Value *)Json::Value::operator[](this, "strictRoot"); Json::Value::operator=(v4, (Json::Value *)v13); Json::Value::~Value(v13); Json::Value::Value((Json::Value *)v13, 0); v5 = (Json::Value *)Json::Value::operator[](this, "allowDroppedNullPlaceholders"); Json::Value::operator=(v5, (Json::Value *)v13); Json::Value::~Value(v13); Json::Value::Value((Json::Value *)v13, 0); v6 = (Json::Value *)Json::Value::operator[](this, "allowNumericKeys"); Json::Value::operator=(v6, (Json::Value *)v13); Json::Value::~Value(v13); Json::Value::Value((Json::Value *)v13, 0); v7 = (Json::Value *)Json::Value::operator[](this, "allowSingleQuotes"); Json::Value::operator=(v7, (Json::Value *)v13); Json::Value::~Value(v13); Json::Value::Value((Json::Value *)v13, 1000); v8 = (Json::Value *)Json::Value::operator[](this, "stackLimit"); Json::Value::operator=(v8, (Json::Value *)v13); Json::Value::~Value(v13); Json::Value::Value((Json::Value *)v13, 1); v9 = (Json::Value *)Json::Value::operator[](this, "failIfExtra"); Json::Value::operator=(v9, (Json::Value *)v13); Json::Value::~Value(v13); Json::Value::Value((Json::Value *)v13, 0); v10 = (Json::Value *)Json::Value::operator[](this, "rejectDupKeys"); Json::Value::operator=(v10, (Json::Value *)v13); Json::Value::~Value(v13); Json::Value::Value((Json::Value *)v13, 0); v11 = (Json::Value *)Json::Value::operator[](this, "allowSpecialFloats"); Json::Value::operator=(v11, (Json::Value *)v13); Json::Value::~Value(v13); Json::Value::Value((Json::Value *)v13, 0); v12 = (Json::Value *)Json::Value::operator[](this, "skipBom"); Json::Value::operator=(v12, (Json::Value *)v13); Json::Value::~Value(v13); }
ecma404Mode: PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,RDI MOV RDI,RSP XOR ESI,ESI CALL 0x00176af2 LAB_00173554: LEA RSI,[0x188dd0] MOV RDI,RBX CALL 0x00178de6 LAB_00173563: MOV R14,RSP MOV RDI,RAX MOV RSI,R14 CALL 0x00176d86 MOV RDI,R14 CALL 0x00176cde MOV RDI,RSP XOR ESI,ESI CALL 0x00176af2 LAB_00173583: LEA RSI,[0x188dde] MOV RDI,RBX CALL 0x00178de6 LAB_00173592: MOV R14,RSP MOV RDI,RAX MOV RSI,R14 CALL 0x00176d86 MOV RDI,R14 CALL 0x00176cde MOV RDI,RSP XOR ESI,ESI CALL 0x00176af2 LAB_001735b2: LEA RSI,[0x188df2] MOV RDI,RBX CALL 0x00178de6 LAB_001735c1: MOV R14,RSP MOV RDI,RAX MOV RSI,R14 CALL 0x00176d86 MOV RDI,R14 CALL 0x00176cde MOV RDI,RSP XOR ESI,ESI CALL 0x00176af2 LAB_001735e1: LEA RSI,[0x188dfd] MOV RDI,RBX CALL 0x00178de6 LAB_001735f0: MOV R14,RSP MOV RDI,RAX MOV RSI,R14 CALL 0x00176d86 MOV RDI,R14 CALL 0x00176cde MOV RDI,RSP XOR ESI,ESI CALL 0x00176af2 LAB_00173610: LEA RSI,[0x188e1a] MOV RDI,RBX CALL 0x00178de6 LAB_0017361f: MOV R14,RSP MOV RDI,RAX MOV RSI,R14 CALL 0x00176d86 MOV RDI,R14 CALL 0x00176cde MOV RDI,RSP XOR ESI,ESI CALL 0x00176af2 LAB_0017363f: LEA RSI,[0x188e2b] MOV RDI,RBX CALL 0x00178de6 LAB_0017364e: MOV R14,RSP MOV RDI,RAX MOV RSI,R14 CALL 0x00176d86 MOV RDI,R14 CALL 0x00176cde MOV RDI,RSP MOV ESI,0x3e8 CALL 0x0017674e LAB_00173671: LEA RSI,[0x188e3d] MOV RDI,RBX CALL 0x00178de6 LAB_00173680: MOV R14,RSP MOV RDI,RAX MOV RSI,R14 CALL 0x00176d86 MOV RDI,R14 CALL 0x00176cde MOV RDI,RSP MOV ESI,0x1 CALL 0x00176af2 LAB_001736a3: LEA RSI,[0x188e48] MOV RDI,RBX CALL 0x00178de6 LAB_001736b2: MOV R14,RSP MOV RDI,RAX MOV RSI,R14 CALL 0x00176d86 MOV RDI,R14 CALL 0x00176cde MOV RDI,RSP XOR ESI,ESI CALL 0x00176af2 LAB_001736d2: LEA RSI,[0x188e54] MOV RDI,RBX CALL 0x00178de6 LAB_001736e1: MOV R14,RSP MOV RDI,RAX MOV RSI,R14 CALL 0x00176d86 MOV RDI,R14 CALL 0x00176cde MOV RDI,RSP XOR ESI,ESI CALL 0x00176af2 LAB_00173701: LEA RSI,[0x188e62] MOV RDI,RBX CALL 0x00178de6 LAB_00173710: MOV R14,RSP MOV RDI,RAX MOV RSI,R14 CALL 0x00176d86 MOV RDI,R14 CALL 0x00176cde MOV RDI,RSP XOR ESI,ESI CALL 0x00176af2 LAB_00173730: LEA RSI,[0x188e75] MOV RDI,RBX CALL 0x00178de6 LAB_0017373f: MOV RBX,RSP MOV RDI,RAX MOV RSI,RBX CALL 0x00176d86 MOV RDI,RBX CALL 0x00176cde ADD RSP,0x28 POP RBX POP R14 RET
/* Json::CharReaderBuilder::ecma404Mode(Json::Value*) */ void Json::CharReaderBuilder::ecma404Mode(Value *param_1) { Value *pVVar1; Value aVStack_38 [40]; Value::Value(aVStack_38,false); /* try { // try from 00173554 to 00173562 has its CatchHandler @ 00173771 */ pVVar1 = (Value *)Value::operator[](param_1,"allowComments"); Value::operator=(pVVar1,aVStack_38); Value::~Value(aVStack_38); Value::Value(aVStack_38,false); /* try { // try from 00173583 to 00173591 has its CatchHandler @ 0017376f */ pVVar1 = (Value *)Value::operator[](param_1,"allowTrailingCommas"); Value::operator=(pVVar1,aVStack_38); Value::~Value(aVStack_38); Value::Value(aVStack_38,false); /* try { // try from 001735b2 to 001735c0 has its CatchHandler @ 0017376d */ pVVar1 = (Value *)Value::operator[](param_1,"strictRoot"); Value::operator=(pVVar1,aVStack_38); Value::~Value(aVStack_38); Value::Value(aVStack_38,false); /* try { // try from 001735e1 to 001735ef has its CatchHandler @ 0017376b */ pVVar1 = (Value *)Value::operator[](param_1,"allowDroppedNullPlaceholders"); Value::operator=(pVVar1,aVStack_38); Value::~Value(aVStack_38); Value::Value(aVStack_38,false); /* try { // try from 00173610 to 0017361e has its CatchHandler @ 00173769 */ pVVar1 = (Value *)Value::operator[](param_1,"allowNumericKeys"); Value::operator=(pVVar1,aVStack_38); Value::~Value(aVStack_38); Value::Value(aVStack_38,false); /* try { // try from 0017363f to 0017364d has its CatchHandler @ 00173767 */ pVVar1 = (Value *)Value::operator[](param_1,"allowSingleQuotes"); Value::operator=(pVVar1,aVStack_38); Value::~Value(aVStack_38); Value::Value(aVStack_38,1000); /* try { // try from 00173671 to 0017367f has its CatchHandler @ 00173765 */ pVVar1 = (Value *)Value::operator[](param_1,"stackLimit"); Value::operator=(pVVar1,aVStack_38); Value::~Value(aVStack_38); Value::Value(aVStack_38,true); /* try { // try from 001736a3 to 001736b1 has its CatchHandler @ 00173763 */ pVVar1 = (Value *)Value::operator[](param_1,"failIfExtra"); Value::operator=(pVVar1,aVStack_38); Value::~Value(aVStack_38); Value::Value(aVStack_38,false); /* try { // try from 001736d2 to 001736e0 has its CatchHandler @ 00173761 */ pVVar1 = (Value *)Value::operator[](param_1,"rejectDupKeys"); Value::operator=(pVVar1,aVStack_38); Value::~Value(aVStack_38); Value::Value(aVStack_38,false); /* try { // try from 00173701 to 0017370f has its CatchHandler @ 0017375f */ pVVar1 = (Value *)Value::operator[](param_1,"allowSpecialFloats"); Value::operator=(pVVar1,aVStack_38); Value::~Value(aVStack_38); Value::Value(aVStack_38,false); /* try { // try from 00173730 to 0017373e has its CatchHandler @ 0017375d */ pVVar1 = (Value *)Value::operator[](param_1,"skipBom"); Value::operator=(pVVar1,aVStack_38); Value::~Value(aVStack_38); return; }
20,478
set_process_priority(ggml_sched_priority)
monkey531[P]llama/common/common.cpp
bool set_process_priority(enum ggml_sched_priority prio) { if (prio == GGML_SCHED_PRIO_NORMAL) { return true; } int p = 0; switch (prio) { case GGML_SCHED_PRIO_NORMAL: p = 0; break; case GGML_SCHED_PRIO_MEDIUM: p = -5; break; case GGML_SCHED_PRIO_HIGH: p = -10; break; case GGML_SCHED_PRIO_REALTIME: p = -20; break; } if (!setpriority(PRIO_PROCESS, 0, p)) { LOG_WRN("failed to set process priority %d : %s (%d)\n", prio, strerror(errno), errno); return false; } return true; }
O1
cpp
set_process_priority(ggml_sched_priority): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %edi, %ebx cmpl $0x3, %edi ja 0x70d03 movl %ebx, %eax leaq 0x817d0(%rip), %rcx # 0xf24b0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movb $0x1, %bpl jmp 0x70d57 movl $0xfffffff6, %edx # imm = 0xFFFFFFF6 jmp 0x70d05 movl $0xffffffec, %edx # imm = 0xFFFFFFEC jmp 0x70d05 movl $0xfffffffb, %edx # imm = 0xFFFFFFFB jmp 0x70d05 xorl %edx, %edx xorl %edi, %edi xorl %esi, %esi callq 0x1b200 testl %eax, %eax setne %bpl jne 0x70d57 leaq 0xc06fb(%rip), %rax # 0x131418 cmpl $0x0, (%rax) js 0x70d57 callq 0xcc6a3 movq %rax, %r14 callq 0x1b060 movq %rax, %r15 movl (%rax), %edi callq 0x1b2c0 movl (%r15), %r9d leaq 0x81ba3(%rip), %rdx # 0xf28e6 movq %r14, %rdi movl $0x3, %esi movl %ebx, %ecx movq %rax, %r8 xorl %eax, %eax callq 0xcc73e movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
_Z20set_process_priority19ggml_sched_priority: push rbp push r15 push r14 push rbx push rax mov ebx, edi cmp edi, 3; switch 4 cases ja short def_70CE7; jumptable 0000000000070CE7 default case mov eax, ebx lea rcx, jpt_70CE7 movsxd rax, ds:(jpt_70CE7 - 0F24B0h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_70CE9: mov bpl, 1; jumptable 0000000000070CE7 case 0 jmp short loc_70D57 loc_70CEE: mov edx, 0FFFFFFF6h; jumptable 0000000000070CE7 case 2 jmp short loc_70D05 loc_70CF5: mov edx, 0FFFFFFECh; jumptable 0000000000070CE7 case 3 jmp short loc_70D05 loc_70CFC: mov edx, 0FFFFFFFBh; jumptable 0000000000070CE7 case 1 jmp short loc_70D05 def_70CE7: xor edx, edx; jumptable 0000000000070CE7 default case loc_70D05: xor edi, edi xor esi, esi call _setpriority test eax, eax setnz bpl jnz short loc_70D57 lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js short loc_70D57 call _Z15common_log_mainv; common_log_main(void) mov r14, rax call ___errno_location mov r15, rax mov edi, [rax] call _strerror mov r9d, [r15] lea rdx, aFailedToSetPro; "failed to set process priority %d : %s "... mov rdi, r14 mov esi, 3 mov ecx, ebx mov r8, rax xor eax, eax call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) loc_70D57: mov eax, ebp add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long set_process_priority(int a1, double a2) { char v2; // al unsigned int v3; // ebp long long v4; // rdx int v5; // eax int v6; // r14d unsigned int *v7; // r15 int v8; // eax char v10; // [rsp-8h] [rbp-28h] v10 = v2; switch ( a1 ) { case 0: LOBYTE(v3) = 1; return v3; case 1: v4 = 4294967291LL; goto LABEL_7; case 2: v4 = 4294967286LL; goto LABEL_7; case 3: v4 = 4294967276LL; goto LABEL_7; default: v4 = 0LL; LABEL_7: v5 = setpriority(0LL, 0LL, v4); LOBYTE(v3) = v5 != 0; if ( !v5 && common_log_verbosity_thold >= 0 ) { v6 = common_log_main(); v7 = (unsigned int *)__errno_location(a2); v8 = strerror(*v7); common_log_add(v6, 3, (unsigned int)"failed to set process priority %d : %s (%d)\n", a1, v8, *v7, v10); } return v3; } }
set_process_priority: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBX,EDI CMP EDI,0x3 JA 0x00170d03 MOV EAX,EBX LEA RCX,[0x1f24b0] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: MOV BPL,0x1 JMP 0x00170d57 caseD_2: MOV EDX,0xfffffff6 JMP 0x00170d05 caseD_3: MOV EDX,0xffffffec JMP 0x00170d05 caseD_1: MOV EDX,0xfffffffb JMP 0x00170d05 default: XOR EDX,EDX LAB_00170d05: XOR EDI,EDI XOR ESI,ESI CALL 0x0011b200 TEST EAX,EAX SETNZ BPL JNZ 0x00170d57 LEA RAX,[0x231418] CMP dword ptr [RAX],0x0 JS 0x00170d57 CALL 0x001cc6a3 MOV R14,RAX CALL 0x0011b060 MOV R15,RAX MOV EDI,dword ptr [RAX] CALL 0x0011b2c0 MOV R9D,dword ptr [R15] LEA RDX,[0x1f28e6] MOV RDI,R14 MOV ESI,0x3 MOV ECX,EBX MOV R8,RAX XOR EAX,EAX CALL 0x001cc73e LAB_00170d57: MOV EAX,EBP ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
/* set_process_priority(ggml_sched_priority) */ ulong set_process_priority(int4 param_1) { int iVar1; int8 uVar2; int *piVar3; char *pcVar4; int8 unaff_RBP; int7 uVar6; ulong uVar5; uVar6 = (int7)((ulong)unaff_RBP >> 8); switch(param_1) { case 0: uVar5 = CONCAT71(uVar6,1); goto LAB_00170d57; case 1: iVar1 = -5; break; case 2: iVar1 = -10; break; case 3: iVar1 = -0x14; break; default: iVar1 = 0; } iVar1 = setpriority(PRIO_PROCESS,0,iVar1); uVar5 = CONCAT71(uVar6,iVar1 != 0); if ((iVar1 == 0) && (-1 < common_log_verbosity_thold)) { uVar2 = common_log_main(); piVar3 = __errno_location(); pcVar4 = strerror(*piVar3); common_log_add(uVar2,3,"failed to set process priority %d : %s (%d)\n",param_1,pcVar4,*piVar3); } LAB_00170d57: return uVar5 & 0xffffffff; }
20,479
ggml_conv_transpose_1d
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
ggml_tensor * ggml_conv_transpose_1d( struct ggml_context * ctx, struct ggml_tensor * a, struct ggml_tensor * b, int s0, int p0, int d0) { GGML_ASSERT(ggml_is_matrix(b)); GGML_ASSERT(a->ne[2] == b->ne[1]); GGML_ASSERT(a->ne[3] == 1); GGML_ASSERT(p0 == 0); GGML_ASSERT(d0 == 1); bool is_node = false; if (a->grad || b->grad) { GGML_ASSERT(false); // TODO: implement backward is_node = true; } const int64_t ne[4] = { ggml_calc_conv_transpose_1d_output_size(b->ne[0], a->ne[0], s0, 0 /*p0*/, 1 /*d0*/), a->ne[1], b->ne[2], 1, }; struct ggml_tensor * result = ggml_new_tensor(ctx, GGML_TYPE_F32, 4, ne); int32_t params[] = { s0, p0, d0 }; ggml_set_op_params(result, params, sizeof(params)); result->op = GGML_OP_CONV_TRANSPOSE_1D; result->grad = is_node ? ggml_dup_tensor(ctx, result) : NULL; result->src[0] = a; result->src[1] = b; return result; }
O1
c
ggml_conv_transpose_1d: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x38, %rsp movq 0x20(%rdx), %rax cmpq $0x1, %rax jne 0x9445c movq %rdx, %rbx cmpq $0x1, 0x28(%rdx) jne 0x9445c movq %rsi, %r14 movq 0x20(%rsi), %rdx cmpq 0x18(%rbx), %rdx jne 0x94466 cmpq $0x1, 0x28(%r14) jne 0x9446b testl %r8d, %r8d jne 0x94470 cmpl $0x1, %r9d jne 0x94475 cmpq $0x0, 0x98(%r14) jne 0x94461 cmpq $0x0, 0x98(%rbx) jne 0x94461 movq 0x10(%rbx), %rdx decq %rdx movslq %ecx, %r12 imulq %r12, %rdx addq 0x10(%r14), %rdx leaq 0x10(%rsp), %rcx movq %rdx, (%rcx) movq 0x18(%r14), %rdx movq %rdx, 0x8(%rcx) movq %rax, 0x10(%rcx) movq $0x1, 0x18(%rcx) xorl %esi, %esi movl $0x4, %edx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x8e8b7 movq %rax, %r15 leaq 0x4(%rsp), %rsi movl %r12d, (%rsi) movabsq $0x100000000, %rax # imm = 0x100000000 movq %rax, 0x4(%rsi) movl $0xc, %edx movq %r15, %rdi callq 0x91e91 movl $0x2d, 0x50(%r15) movq $0x0, 0x98(%r15) movq %r14, 0xa0(%r15) movq %rbx, 0xa8(%r15) movq %r15, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq callq 0xe27c callq 0xe3d5 callq 0xe2c1 callq 0xe306 callq 0xe34b callq 0xe390
ggml_conv_transpose_1d: push r15 push r14 push r12 push rbx sub rsp, 38h mov rax, [rdx+20h] cmp rax, 1 jnz loc_9445C mov rbx, rdx cmp qword ptr [rdx+28h], 1 jnz loc_9445C mov r14, rsi mov rdx, [rsi+20h] cmp rdx, [rbx+18h] jnz loc_94466 cmp qword ptr [r14+28h], 1 jnz loc_9446B test r8d, r8d jnz loc_94470 cmp r9d, 1 jnz loc_94475 cmp qword ptr [r14+98h], 0 jnz loc_94461 cmp qword ptr [rbx+98h], 0 jnz loc_94461 mov rdx, [rbx+10h] dec rdx movsxd r12, ecx imul rdx, r12 add rdx, [r14+10h] lea rcx, [rsp+58h+var_48] mov [rcx], rdx mov rdx, [r14+18h] mov [rcx+8], rdx mov [rcx+10h], rax mov qword ptr [rcx+18h], 1 xor esi, esi mov edx, 4 xor r8d, r8d xor r9d, r9d call ggml_new_tensor_impl mov r15, rax lea rsi, [rsp+58h+var_54] mov [rsi], r12d mov rax, 100000000h mov [rsi+4], rax mov edx, 0Ch mov rdi, r15 call ggml_set_op_params mov dword ptr [r15+50h], 2Dh ; '-' mov qword ptr [r15+98h], 0 mov [r15+0A0h], r14 mov [r15+0A8h], rbx mov rax, r15 add rsp, 38h pop rbx pop r12 pop r14 pop r15 retn loc_9445C: call ggml_conv_transpose_1d_cold_1 loc_94461: call ggml_conv_transpose_1d_cold_6 loc_94466: call ggml_conv_transpose_1d_cold_2 loc_9446B: call ggml_conv_transpose_1d_cold_3 loc_94470: call ggml_conv_transpose_1d_cold_4 loc_94475: call ggml_conv_transpose_1d_cold_5
long long ggml_conv_transpose_1d( long long a1, _QWORD *a2, _QWORD *a3, int a4, int a5, int a6, __m128 a7, __m128 a8) { long long v10; // r15 int v12; // [rsp+4h] [rbp-54h] BYREF long long v13; // [rsp+8h] [rbp-50h] _QWORD v14[9]; // [rsp+10h] [rbp-48h] BYREF if ( a3[4] != 1LL || a3[5] != 1LL ) ggml_conv_transpose_1d_cold_1(); if ( a2[4] != a3[3] ) ggml_conv_transpose_1d_cold_2(); if ( a2[5] != 1LL ) ggml_conv_transpose_1d_cold_3(); if ( a5 ) ggml_conv_transpose_1d_cold_4(); if ( a6 != 1 ) ggml_conv_transpose_1d_cold_5(); if ( a2[19] || a3[19] ) ggml_conv_transpose_1d_cold_6(); v14[0] = a2[2] + a4 * (a3[2] - 1LL); v14[1] = a2[3]; v14[2] = 1LL; v14[3] = 1LL; v10 = ggml_new_tensor_impl(a1, 0, 4, v14, 0LL, 0LL, a7, a8); v12 = a4; v13 = 0x100000000LL; ggml_set_op_params(v10, (long long)&v12, 12LL); *(_DWORD *)(v10 + 80) = 45; *(_QWORD *)(v10 + 152) = 0LL; *(_QWORD *)(v10 + 160) = a2; *(_QWORD *)(v10 + 168) = a3; return v10; }
20,480
ggml_conv_transpose_1d
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
ggml_tensor * ggml_conv_transpose_1d( struct ggml_context * ctx, struct ggml_tensor * a, struct ggml_tensor * b, int s0, int p0, int d0) { GGML_ASSERT(ggml_is_matrix(b)); GGML_ASSERT(a->ne[2] == b->ne[1]); GGML_ASSERT(a->ne[3] == 1); GGML_ASSERT(p0 == 0); GGML_ASSERT(d0 == 1); bool is_node = false; if (a->grad || b->grad) { GGML_ASSERT(false); // TODO: implement backward is_node = true; } const int64_t ne[4] = { ggml_calc_conv_transpose_1d_output_size(b->ne[0], a->ne[0], s0, 0 /*p0*/, 1 /*d0*/), a->ne[1], b->ne[2], 1, }; struct ggml_tensor * result = ggml_new_tensor(ctx, GGML_TYPE_F32, 4, ne); int32_t params[] = { s0, p0, d0 }; ggml_set_op_params(result, params, sizeof(params)); result->op = GGML_OP_CONV_TRANSPOSE_1D; result->grad = is_node ? ggml_dup_tensor(ctx, result) : NULL; result->src[0] = a; result->src[1] = b; return result; }
O2
c
ggml_conv_transpose_1d: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x38, %rsp cmpq $0x1, 0x20(%rdx) jne 0x6d8a0 movq %rdx, %rbx cmpq $0x1, 0x28(%rdx) jne 0x6d8a0 movq %rsi, %r14 movq 0x20(%rsi), %rax cmpq 0x18(%rbx), %rax jne 0x6d910 cmpq $0x1, 0x28(%r14) jne 0x6d948 testl %r8d, %r8d jne 0x6d97d cmpl $0x1, %r9d jne 0x6d9b2 cmpq $0x0, 0x98(%r14) jne 0x6d8d8 cmpq $0x0, 0x98(%rbx) jne 0x6d8d8 movq 0x10(%rbx), %rax decq %rax movslq %ecx, %r12 imulq %r12, %rax addq 0x10(%r14), %rax leaq 0x10(%rsp), %rcx movq %rax, (%rcx) movq 0x18(%r14), %rax movq %rax, 0x8(%rcx) pushq $0x1 popq %rax movq %rax, 0x10(%rcx) movq %rax, 0x18(%rcx) pushq $0x4 popq %rdx xorl %esi, %esi callq 0x6835b movq %rax, %r15 leaq 0x4(%rsp), %rsi movl %r12d, (%rsi) movabsq $0x100000000, %rax # imm = 0x100000000 movq %rax, 0x4(%rsi) pushq $0xc popq %rdx movq %r15, %rdi callq 0x6ab3d movl $0x2d, 0x50(%r15) andq $0x0, 0x98(%r15) movq %r14, 0xa0(%r15) movq %rbx, 0xa8(%r15) movq %r15, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq 0x686a1(%rip), %rax # 0xd5f48 movq (%rax), %rdi callq 0xa6f0 movq 0x686f2(%rip), %rax # 0xd5fa8 movq (%rax), %rdi leaq 0x2c95e(%rip), %rsi # 0x9a21e leaq 0x33fb7(%rip), %rdx # 0xa187e leaq 0x34722(%rip), %r8 # 0xa1ff0 movl $0x14a5, %ecx # imm = 0x14A5 jmp 0x6d9e5 movq 0x68669(%rip), %rax # 0xd5f48 movq (%rax), %rdi callq 0xa6f0 movq 0x686ba(%rip), %rax # 0xd5fa8 movq (%rax), %rdi leaq 0x2c926(%rip), %rsi # 0x9a21e leaq 0x33f7f(%rip), %rdx # 0xa187e leaq 0x2a739(%rip), %r8 # 0x9803f movl $0x14af, %ecx # imm = 0x14AF jmp 0x6d9e5 movq 0x68631(%rip), %rax # 0xd5f48 movq (%rax), %rdi callq 0xa6f0 movq 0x68682(%rip), %rax # 0xd5fa8 movq (%rax), %rdi leaq 0x2c8ee(%rip), %rsi # 0x9a21e leaq 0x33f47(%rip), %rdx # 0xa187e leaq 0x34599(%rip), %r8 # 0xa1ed7 movl $0x14a6, %ecx # imm = 0x14A6 jmp 0x6d9e5 movq 0x685f9(%rip), %rax # 0xd5f48 movq (%rax), %rdi callq 0xa6f0 movq 0x6864a(%rip), %rax # 0xd5fa8 movq (%rax), %rdi leaq 0x2c8b6(%rip), %rsi # 0x9a21e leaq 0x33f0f(%rip), %rdx # 0xa187e leaq 0x3468c(%rip), %r8 # 0xa2002 movl $0x14a7, %ecx # imm = 0x14A7 jmp 0x6d9e5 movq 0x685c4(%rip), %rax # 0xd5f48 movq (%rax), %rdi callq 0xa6f0 movq 0x68615(%rip), %rax # 0xd5fa8 movq (%rax), %rdi leaq 0x2c881(%rip), %rsi # 0x9a21e leaq 0x33eda(%rip), %rdx # 0xa187e leaq 0x34665(%rip), %r8 # 0xa2010 movl $0x14a9, %ecx # imm = 0x14A9 jmp 0x6d9e5 movq 0x6858f(%rip), %rax # 0xd5f48 movq (%rax), %rdi callq 0xa6f0 movq 0x685e0(%rip), %rax # 0xd5fa8 movq (%rax), %rdi leaq 0x2c84c(%rip), %rsi # 0x9a21e leaq 0x33ea5(%rip), %rdx # 0xa187e leaq 0x34638(%rip), %r8 # 0xa2018 movl $0x14aa, %ecx # imm = 0x14AA xorl %eax, %eax callq 0xa8b0 callq 0x67550 callq 0xa300
ggml_conv_transpose_1d: push r15 push r14 push r12 push rbx sub rsp, 38h cmp qword ptr [rdx+20h], 1 jnz loc_6D8A0 mov rbx, rdx cmp qword ptr [rdx+28h], 1 jnz loc_6D8A0 mov r14, rsi mov rax, [rsi+20h] cmp rax, [rbx+18h] jnz loc_6D910 cmp qword ptr [r14+28h], 1 jnz loc_6D948 test r8d, r8d jnz loc_6D97D cmp r9d, 1 jnz loc_6D9B2 cmp qword ptr [r14+98h], 0 jnz loc_6D8D8 cmp qword ptr [rbx+98h], 0 jnz loc_6D8D8 mov rax, [rbx+10h] dec rax movsxd r12, ecx imul rax, r12 add rax, [r14+10h] lea rcx, [rsp+58h+var_48] mov [rcx], rax mov rax, [r14+18h] mov [rcx+8], rax push 1 pop rax mov [rcx+10h], rax mov [rcx+18h], rax push 4 pop rdx xor esi, esi call ggml_new_tensor mov r15, rax lea rsi, [rsp+58h+var_54] mov [rsi], r12d mov rax, 100000000h mov [rsi+4], rax push 0Ch pop rdx mov rdi, r15 call ggml_set_op_params mov dword ptr [r15+50h], 2Dh ; '-' and qword ptr [r15+98h], 0 mov [r15+0A0h], r14 mov [r15+0A8h], rbx mov rax, r15 add rsp, 38h pop rbx pop r12 pop r14 pop r15 retn loc_6D8A0: mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n" lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"... lea r8, aGgmlIsMatrixB; "ggml_is_matrix(b)" mov ecx, 14A5h jmp loc_6D9E5 loc_6D8D8: mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n" lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"... lea r8, aFalse; "false" mov ecx, 14AFh jmp loc_6D9E5 loc_6D910: mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n" lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"... lea r8, aANe2BNe1; "a->ne[2] == b->ne[1]" mov ecx, 14A6h jmp loc_6D9E5 loc_6D948: mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n" lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"... lea r8, aANe31; "a->ne[3] == 1" mov ecx, 14A7h jmp short loc_6D9E5 loc_6D97D: mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n" lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"... lea r8, aP00; "p0 == 0" mov ecx, 14A9h jmp short loc_6D9E5 loc_6D9B2: mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n" lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"... lea r8, aD01; "d0 == 1" mov ecx, 14AAh loc_6D9E5: xor eax, eax call _fprintf call ggml_print_backtrace call _abort
long long ggml_conv_transpose_1d(long long a1, _QWORD *a2, _QWORD *a3, int a4, int a5, int a6) { long long v8; // r15 long long v10; // rdi int v11; // [rsp+4h] [rbp-54h] BYREF long long v12; // [rsp+8h] [rbp-50h] _QWORD v13[9]; // [rsp+10h] [rbp-48h] BYREF if ( a3[4] != 1LL || a3[5] != 1LL ) { fflush(stdout); v10 = stderr; fprintf( stderr, "GGML_ASSERT: %s:%d: %s\n", "/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c", 5285LL, "ggml_is_matrix(b)"); goto LABEL_16; } if ( a2[4] != a3[3] ) { fflush(stdout); v10 = stderr; fprintf( stderr, "GGML_ASSERT: %s:%d: %s\n", "/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c", 5286LL, "a->ne[2] == b->ne[1]"); goto LABEL_16; } if ( a2[5] != 1LL ) { fflush(stdout); v10 = stderr; fprintf( stderr, "GGML_ASSERT: %s:%d: %s\n", "/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c", 5287LL, "a->ne[3] == 1"); goto LABEL_16; } if ( a5 ) { fflush(stdout); v10 = stderr; fprintf( stderr, "GGML_ASSERT: %s:%d: %s\n", "/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c", 5289LL, "p0 == 0"); goto LABEL_16; } if ( a6 != 1 ) { fflush(stdout); v10 = stderr; fprintf( stderr, "GGML_ASSERT: %s:%d: %s\n", "/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c", 5290LL, "d0 == 1"); LABEL_16: ggml_print_backtrace(); abort(v10); } if ( a2[19] || a3[19] ) { fflush(stdout); v10 = stderr; fprintf( stderr, "GGML_ASSERT: %s:%d: %s\n", "/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c", 5295LL, "false"); goto LABEL_16; } v13[0] = a2[2] + a4 * (a3[2] - 1LL); v13[1] = a2[3]; v13[2] = 1LL; v13[3] = 1LL; v8 = ggml_new_tensor(a1, 0LL, 4LL, (long long)v13); v11 = a4; v12 = 0x100000000LL; ggml_set_op_params(v8, (long long)&v11, 12LL); *(_DWORD *)(v8 + 80) = 45; *(_QWORD *)(v8 + 152) = 0LL; *(_QWORD *)(v8 + 160) = a2; *(_QWORD *)(v8 + 168) = a3; return v8; }
ggml_conv_transpose_1d: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x38 CMP qword ptr [RDX + 0x20],0x1 JNZ 0x0016d8a0 MOV RBX,RDX CMP qword ptr [RDX + 0x28],0x1 JNZ 0x0016d8a0 MOV R14,RSI MOV RAX,qword ptr [RSI + 0x20] CMP RAX,qword ptr [RBX + 0x18] JNZ 0x0016d910 CMP qword ptr [R14 + 0x28],0x1 JNZ 0x0016d948 TEST R8D,R8D JNZ 0x0016d97d CMP R9D,0x1 JNZ 0x0016d9b2 CMP qword ptr [R14 + 0x98],0x0 JNZ 0x0016d8d8 CMP qword ptr [RBX + 0x98],0x0 JNZ 0x0016d8d8 MOV RAX,qword ptr [RBX + 0x10] DEC RAX MOVSXD R12,ECX IMUL RAX,R12 ADD RAX,qword ptr [R14 + 0x10] LEA RCX,[RSP + 0x10] MOV qword ptr [RCX],RAX MOV RAX,qword ptr [R14 + 0x18] MOV qword ptr [RCX + 0x8],RAX PUSH 0x1 POP RAX MOV qword ptr [RCX + 0x10],RAX MOV qword ptr [RCX + 0x18],RAX PUSH 0x4 POP RDX XOR ESI,ESI CALL 0x0016835b MOV R15,RAX LEA RSI,[RSP + 0x4] MOV dword ptr [RSI],R12D MOV RAX,0x100000000 MOV qword ptr [RSI + 0x4],RAX PUSH 0xc POP RDX MOV RDI,R15 CALL 0x0016ab3d MOV dword ptr [R15 + 0x50],0x2d AND qword ptr [R15 + 0x98],0x0 MOV qword ptr [R15 + 0xa0],R14 MOV qword ptr [R15 + 0xa8],RBX MOV RAX,R15 ADD RSP,0x38 POP RBX POP R12 POP R14 POP R15 RET LAB_0016d8a0: MOV RAX,qword ptr [0x001d5f48] MOV RDI,qword ptr [RAX] CALL 0x0010a6f0 MOV RAX,qword ptr [0x001d5fa8] MOV RDI,qword ptr [RAX] LEA RSI,[0x19a21e] LEA RDX,[0x1a187e] LEA R8,[0x1a1ff0] MOV ECX,0x14a5 JMP 0x0016d9e5 LAB_0016d8d8: MOV RAX,qword ptr [0x001d5f48] MOV RDI,qword ptr [RAX] CALL 0x0010a6f0 MOV RAX,qword ptr [0x001d5fa8] MOV RDI,qword ptr [RAX] LEA RSI,[0x19a21e] LEA RDX,[0x1a187e] LEA R8,[0x19803f] MOV ECX,0x14af JMP 0x0016d9e5 LAB_0016d910: MOV RAX,qword ptr [0x001d5f48] MOV RDI,qword ptr [RAX] CALL 0x0010a6f0 MOV RAX,qword ptr [0x001d5fa8] MOV RDI,qword ptr [RAX] LEA RSI,[0x19a21e] LEA RDX,[0x1a187e] LEA R8,[0x1a1ed7] MOV ECX,0x14a6 JMP 0x0016d9e5 LAB_0016d948: MOV RAX,qword ptr [0x001d5f48] MOV RDI,qword ptr [RAX] CALL 0x0010a6f0 MOV RAX,qword ptr [0x001d5fa8] MOV RDI,qword ptr [RAX] LEA RSI,[0x19a21e] LEA RDX,[0x1a187e] LEA R8,[0x1a2002] MOV ECX,0x14a7 JMP 0x0016d9e5 LAB_0016d97d: MOV RAX,qword ptr [0x001d5f48] MOV RDI,qword ptr [RAX] CALL 0x0010a6f0 MOV RAX,qword ptr [0x001d5fa8] MOV RDI,qword ptr [RAX] LEA RSI,[0x19a21e] LEA RDX,[0x1a187e] LEA R8,[0x1a2010] MOV ECX,0x14a9 JMP 0x0016d9e5 LAB_0016d9b2: MOV RAX,qword ptr [0x001d5f48] MOV RDI,qword ptr [RAX] CALL 0x0010a6f0 MOV RAX,qword ptr [0x001d5fa8] MOV RDI,qword ptr [RAX] LEA RSI,[0x19a21e] LEA RDX,[0x1a187e] LEA R8,[0x1a2018] MOV ECX,0x14aa LAB_0016d9e5: XOR EAX,EAX CALL 0x0010a8b0 CALL 0x00167550 CALL 0x0010a300
long ggml_conv_transpose_1d (int8 param_1,long param_2,long param_3,int param_4,int param_5,int param_6) { long lVar1; int8 uVar2; FILE *__stream; char *pcVar3; int local_54 [3]; long local_48; int8 local_40; int8 local_38; int8 local_30; if ((*(long *)(param_3 + 0x20) == 1) && (*(long *)(param_3 + 0x28) == 1)) { if (*(long *)(param_2 + 0x20) == *(long *)(param_3 + 0x18)) { if (*(long *)(param_2 + 0x28) == 1) { if (param_5 == 0) { if (param_6 == 1) { if ((*(long *)(param_2 + 0x98) == 0) && (*(long *)(param_3 + 0x98) == 0)) { local_48 = (*(long *)(param_3 + 0x10) + -1) * (long)param_4 + *(long *)(param_2 + 0x10); local_40 = *(int8 *)(param_2 + 0x18); local_38 = 1; local_30 = 1; lVar1 = ggml_new_tensor(param_1,0,4); local_54[1] = 0; local_54[2] = 1; local_54[0] = param_4; ggml_set_op_params(lVar1,local_54,0xc); *(int4 *)(lVar1 + 0x50) = 0x2d; *(int8 *)(lVar1 + 0x98) = 0; *(long *)(lVar1 + 0xa0) = param_2; *(long *)(lVar1 + 0xa8) = param_3; return lVar1; } fflush(*(FILE **)PTR_stdout_001d5f48); __stream = *(FILE **)PTR_stderr_001d5fa8; pcVar3 = "false"; uVar2 = 0x14af; } else { fflush(*(FILE **)PTR_stdout_001d5f48); __stream = *(FILE **)PTR_stderr_001d5fa8; pcVar3 = "d0 == 1"; uVar2 = 0x14aa; } } else { fflush(*(FILE **)PTR_stdout_001d5f48); __stream = *(FILE **)PTR_stderr_001d5fa8; pcVar3 = "p0 == 0"; uVar2 = 0x14a9; } } else { fflush(*(FILE **)PTR_stdout_001d5f48); __stream = *(FILE **)PTR_stderr_001d5fa8; pcVar3 = "a->ne[3] == 1"; uVar2 = 0x14a7; } } else { fflush(*(FILE **)PTR_stdout_001d5f48); __stream = *(FILE **)PTR_stderr_001d5fa8; pcVar3 = "a->ne[2] == b->ne[1]"; uVar2 = 0x14a6; } } else { fflush(*(FILE **)PTR_stdout_001d5f48); __stream = *(FILE **)PTR_stderr_001d5fa8; pcVar3 = "ggml_is_matrix(b)"; uVar2 = 0x14a5; } fprintf(__stream,"GGML_ASSERT: %s:%d: %s\n", "/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c", uVar2,pcVar3); ggml_print_backtrace(); /* WARNING: Subroutine does not return */ abort(); }
20,481
ggml_conv_transpose_1d
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
ggml_tensor * ggml_conv_transpose_1d( struct ggml_context * ctx, struct ggml_tensor * a, struct ggml_tensor * b, int s0, int p0, int d0) { GGML_ASSERT(ggml_is_matrix(b)); GGML_ASSERT(a->ne[2] == b->ne[1]); GGML_ASSERT(a->ne[3] == 1); GGML_ASSERT(p0 == 0); GGML_ASSERT(d0 == 1); bool is_node = false; if (a->grad || b->grad) { GGML_ASSERT(false); // TODO: implement backward is_node = true; } const int64_t ne[4] = { ggml_calc_conv_transpose_1d_output_size(b->ne[0], a->ne[0], s0, 0 /*p0*/, 1 /*d0*/), a->ne[1], b->ne[2], 1, }; struct ggml_tensor * result = ggml_new_tensor(ctx, GGML_TYPE_F32, 4, ne); int32_t params[] = { s0, p0, d0 }; ggml_set_op_params(result, params, sizeof(params)); result->op = GGML_OP_CONV_TRANSPOSE_1D; result->grad = is_node ? ggml_dup_tensor(ctx, result) : NULL; result->src[0] = a; result->src[1] = b; return result; }
O3
c
ggml_conv_transpose_1d: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x38, %rsp cmpq $0x1, 0x20(%rdx) jne 0x932a9 movq %rdx, %rbx cmpq $0x1, 0x28(%rdx) jne 0x932a9 movq %rsi, %r14 movq 0x20(%rsi), %rax cmpq 0x18(%rbx), %rax jne 0x932b3 cmpq $0x1, 0x28(%r14) jne 0x932b8 testl %r8d, %r8d jne 0x932bd cmpl $0x1, %r9d jne 0x932c2 cmpq $0x0, 0x98(%r14) jne 0x932ae cmpq $0x0, 0x98(%rbx) jne 0x932ae movq 0x10(%rbx), %rax decq %rax movslq %ecx, %r12 imulq %r12, %rax addq 0x10(%r14), %rax leaq 0x10(%rsp), %rcx movq %rax, (%rcx) movq 0x18(%r14), %rax movq %rax, 0x8(%rcx) movl $0x1, %eax movq %rax, 0x10(%rcx) movq %rax, 0x18(%rcx) xorl %esi, %esi movl $0x4, %edx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x8d64f movq %rax, %r15 leaq 0x4(%rsp), %rsi movl %r12d, (%rsi) movabsq $0x100000000, %rax # imm = 0x100000000 movq %rax, 0x4(%rsi) movl $0xc, %edx movq %r15, %rdi callq 0x90cc8 movl $0x2d, 0x50(%r15) movq $0x0, 0x98(%r15) movq %r14, 0xa0(%r15) movq %rbx, 0xa8(%r15) movq %r15, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq callq 0xe19d callq 0xe2f6 callq 0xe1e2 callq 0xe227 callq 0xe26c callq 0xe2b1
ggml_conv_transpose_1d: push r15 push r14 push r12 push rbx sub rsp, 38h cmp qword ptr [rdx+20h], 1 jnz loc_932A9 mov rbx, rdx cmp qword ptr [rdx+28h], 1 jnz loc_932A9 mov r14, rsi mov rax, [rsi+20h] cmp rax, [rbx+18h] jnz loc_932B3 cmp qword ptr [r14+28h], 1 jnz loc_932B8 test r8d, r8d jnz loc_932BD cmp r9d, 1 jnz loc_932C2 cmp qword ptr [r14+98h], 0 jnz loc_932AE cmp qword ptr [rbx+98h], 0 jnz loc_932AE mov rax, [rbx+10h] dec rax movsxd r12, ecx imul rax, r12 add rax, [r14+10h] lea rcx, [rsp+58h+var_48] mov [rcx], rax mov rax, [r14+18h] mov [rcx+8], rax mov eax, 1 mov [rcx+10h], rax mov [rcx+18h], rax xor esi, esi mov edx, 4 xor r8d, r8d xor r9d, r9d call ggml_new_tensor_impl mov r15, rax lea rsi, [rsp+58h+var_54] mov [rsi], r12d mov rax, 100000000h mov [rsi+4], rax mov edx, 0Ch mov rdi, r15 call ggml_set_op_params mov dword ptr [r15+50h], 2Dh ; '-' mov qword ptr [r15+98h], 0 mov [r15+0A0h], r14 mov [r15+0A8h], rbx mov rax, r15 add rsp, 38h pop rbx pop r12 pop r14 pop r15 retn loc_932A9: call ggml_conv_transpose_1d_cold_1 loc_932AE: call ggml_conv_transpose_1d_cold_6 loc_932B3: call ggml_conv_transpose_1d_cold_2 loc_932B8: call ggml_conv_transpose_1d_cold_3 loc_932BD: call ggml_conv_transpose_1d_cold_4 loc_932C2: call ggml_conv_transpose_1d_cold_5
long long ggml_conv_transpose_1d( long long a1, _QWORD *a2, _QWORD *a3, int a4, int a5, int a6, __m128 a7, __m128 a8) { long long v10; // r15 int v12; // [rsp+4h] [rbp-54h] BYREF long long v13; // [rsp+8h] [rbp-50h] _QWORD v14[9]; // [rsp+10h] [rbp-48h] BYREF if ( a3[4] != 1LL || a3[5] != 1LL ) ggml_conv_transpose_1d_cold_1(); if ( a2[4] != a3[3] ) ggml_conv_transpose_1d_cold_2(); if ( a2[5] != 1LL ) ggml_conv_transpose_1d_cold_3(); if ( a5 ) ggml_conv_transpose_1d_cold_4(); if ( a6 != 1 ) ggml_conv_transpose_1d_cold_5(); if ( a2[19] || a3[19] ) ggml_conv_transpose_1d_cold_6(); v14[0] = a2[2] + a4 * (a3[2] - 1LL); v14[1] = a2[3]; v14[2] = 1LL; v14[3] = 1LL; v10 = ggml_new_tensor_impl(a1, 0, 4, v14, 0LL, 0LL, a7, a8); v12 = a4; v13 = 0x100000000LL; ggml_set_op_params(v10, (long long)&v12, 12LL); *(_DWORD *)(v10 + 80) = 45; *(_QWORD *)(v10 + 152) = 0LL; *(_QWORD *)(v10 + 160) = a2; *(_QWORD *)(v10 + 168) = a3; return v10; }
20,482
JS_SetGlobalVar
bluesky950520[P]quickjs/quickjs.c
static int JS_SetGlobalVar(JSContext *ctx, JSAtom prop, JSValue val, int flag) { JSObject *p; JSShapeProperty *prs; JSProperty *pr; int flags; /* no exotic behavior is possible in global_var_obj */ p = JS_VALUE_GET_OBJ(ctx->global_var_obj); prs = find_own_property(&pr, p, prop); if (prs) { /* XXX: should handle JS_PROP_AUTOINIT properties? */ if (flag != 1) { if (unlikely(JS_IsUninitialized(pr->u.value))) { JS_FreeValue(ctx, val); JS_ThrowReferenceErrorUninitialized(ctx, prs->atom); return -1; } if (unlikely(!(prs->flags & JS_PROP_WRITABLE))) { JS_FreeValue(ctx, val); return JS_ThrowTypeErrorReadOnly(ctx, JS_PROP_THROW, prop); } } set_value(ctx, &pr->u.value, val); return 0; } flags = JS_PROP_THROW_STRICT; if (is_strict_mode(ctx)) flags |= JS_PROP_NO_ADD; return JS_SetPropertyInternal(ctx, ctx->global_obj, prop, val, flags); }
O0
c
JS_SetGlobalVar: subq $0xa8, %rsp movq %rdx, 0x50(%rsp) movq %rcx, 0x58(%rsp) movq %rdi, 0x48(%rsp) movl %esi, 0x44(%rsp) movl %r8d, 0x40(%rsp) movq 0x48(%rsp), %rax movq 0x1b0(%rax), %rax movq %rax, 0x38(%rsp) movq 0x38(%rsp), %rcx movl 0x44(%rsp), %eax leaq 0x28(%rsp), %rdx movq %rdx, 0x98(%rsp) movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) movq 0x90(%rsp), %rax movq 0x18(%rax), %rax movq %rax, 0x80(%rsp) movl 0x8c(%rsp), %eax movq 0x80(%rsp), %rcx movl 0x20(%rcx), %ecx andq %rcx, %rax movq %rax, 0x68(%rsp) movq 0x80(%rsp), %rdi callq 0x5d8b0 xorl %ecx, %ecx subq 0x68(%rsp), %rcx subq $0x1, %rcx movl (%rax,%rcx,4), %eax movq %rax, 0x68(%rsp) movq 0x80(%rsp), %rdi callq 0x2c280 movq %rax, 0x70(%rsp) cmpq $0x0, 0x68(%rsp) je 0x66751 movq 0x70(%rsp), %rax movq 0x68(%rsp), %rcx subq $0x1, %rcx shlq $0x3, %rcx addq %rcx, %rax movq %rax, 0x78(%rsp) movq 0x78(%rsp), %rax movl 0x4(%rax), %eax cmpl 0x8c(%rsp), %eax sete %al testb $0x1, %al jne 0x66703 jmp 0x66739 movq 0x90(%rsp), %rax movq 0x20(%rax), %rcx movq 0x68(%rsp), %rax subq $0x1, %rax shlq $0x4, %rax addq %rax, %rcx movq 0x98(%rsp), %rax movq %rcx, (%rax) movq 0x78(%rsp), %rax movq %rax, 0xa0(%rsp) jmp 0x6676c movq 0x78(%rsp), %rax movl (%rax), %eax andl $0x3ffffff, %eax # imm = 0x3FFFFFF movl %eax, %eax movq %rax, 0x68(%rsp) jmp 0x666c5 movq 0x98(%rsp), %rax movq $0x0, (%rax) movq $0x0, 0xa0(%rsp) movq 0xa0(%rsp), %rax movq %rax, 0x30(%rsp) cmpq $0x0, 0x30(%rsp) je 0x6686d cmpl $0x1, 0x40(%rsp) je 0x6684a movq 0x28(%rsp), %rax movq (%rax), %rdi movq 0x8(%rax), %rsi callq 0x2d000 cmpl $0x0, %eax setne %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x667f5 movq 0x48(%rsp), %rdi movq 0x50(%rsp), %rsi movq 0x58(%rsp), %rdx callq 0x23c90 movq 0x48(%rsp), %rdi movq 0x30(%rsp), %rax movl 0x4(%rax), %esi callq 0x604d0 movq %rax, 0x10(%rsp) movq %rdx, 0x18(%rsp) movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF jmp 0x668c7 movq 0x30(%rsp), %rax movl (%rax), %eax shrl $0x1a, %eax andl $0x2, %eax cmpl $0x0, %eax setne %al xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x66848 movq 0x48(%rsp), %rdi movq 0x50(%rsp), %rsi movq 0x58(%rsp), %rdx callq 0x23c90 movq 0x48(%rsp), %rdi movl 0x44(%rsp), %edx movl $0x4000, %esi # imm = 0x4000 callq 0x60fd0 movl %eax, 0x64(%rsp) jmp 0x668c7 jmp 0x6684a movq 0x48(%rsp), %rdi movq 0x28(%rsp), %rsi movq 0x50(%rsp), %rdx movq 0x58(%rsp), %rcx callq 0x27a40 movl $0x0, 0x64(%rsp) jmp 0x668c7 movl $0x8000, 0x24(%rsp) # imm = 0x8000 movq 0x48(%rsp), %rdi callq 0x37f40 cmpl $0x0, %eax je 0x66891 movl 0x24(%rsp), %eax orl $0x10000, %eax # imm = 0x10000 movl %eax, 0x24(%rsp) movq 0x48(%rsp), %rdi movq 0x48(%rsp), %rdx movl 0x44(%rsp), %ecx movl 0x24(%rsp), %eax movq 0x1a0(%rdx), %rsi movq 0x1a8(%rdx), %rdx movq 0x50(%rsp), %r8 movq 0x58(%rsp), %r9 movl %eax, (%rsp) callq 0x33d60 movl %eax, 0x64(%rsp) movl 0x64(%rsp), %eax addq $0xa8, %rsp retq nopw %cs:(%rax,%rax)
JS_SetGlobalVar: sub rsp, 0A8h mov [rsp+0A8h+var_58], rdx mov [rsp+0A8h+var_50], rcx mov [rsp+0A8h+var_60], rdi mov [rsp+0A8h+var_64], esi mov [rsp+0A8h+var_68], r8d mov rax, [rsp+0A8h+var_60] mov rax, [rax+1B0h] mov [rsp+0A8h+var_70], rax mov rcx, [rsp+0A8h+var_70] mov eax, [rsp+0A8h+var_64] lea rdx, [rsp+0A8h+var_80] mov [rsp+0A8h+var_10], rdx mov [rsp+0A8h+var_18], rcx mov [rsp+0A8h+var_1C], eax mov rax, [rsp+0A8h+var_18] mov rax, [rax+18h] mov [rsp+0A8h+var_28], rax mov eax, [rsp+0A8h+var_1C] mov rcx, [rsp+0A8h+var_28] mov ecx, [rcx+20h] and rax, rcx mov [rsp+0A8h+var_40], rax mov rdi, [rsp+0A8h+var_28] call prop_hash_end xor ecx, ecx sub rcx, [rsp+0A8h+var_40] sub rcx, 1 mov eax, [rax+rcx*4] mov [rsp+0A8h+var_40], rax mov rdi, [rsp+0A8h+var_28] call get_shape_prop mov [rsp+0A8h+var_38], rax loc_666C5: cmp [rsp+0A8h+var_40], 0 jz loc_66751 mov rax, [rsp+0A8h+var_38] mov rcx, [rsp+0A8h+var_40] sub rcx, 1 shl rcx, 3 add rax, rcx mov [rsp+0A8h+var_30], rax mov rax, [rsp+0A8h+var_30] mov eax, [rax+4] cmp eax, [rsp+0A8h+var_1C] setz al test al, 1 jnz short loc_66703 jmp short loc_66739 loc_66703: mov rax, [rsp+0A8h+var_18] mov rcx, [rax+20h] mov rax, [rsp+0A8h+var_40] sub rax, 1 shl rax, 4 add rcx, rax mov rax, [rsp+0A8h+var_10] mov [rax], rcx mov rax, [rsp+0A8h+var_30] mov [rsp+0A8h+var_8], rax jmp short loc_6676C loc_66739: mov rax, [rsp+0A8h+var_30] mov eax, [rax] and eax, 3FFFFFFh mov eax, eax mov [rsp+0A8h+var_40], rax jmp loc_666C5 loc_66751: mov rax, [rsp+0A8h+var_10] mov qword ptr [rax], 0 mov [rsp+0A8h+var_8], 0 loc_6676C: mov rax, [rsp+0A8h+var_8] mov [rsp+0A8h+var_78], rax cmp [rsp+0A8h+var_78], 0 jz loc_6686D cmp [rsp+0A8h+var_68], 1 jz loc_6684A mov rax, [rsp+0A8h+var_80] mov rdi, [rax] mov rsi, [rax+8] call JS_IsUninitialized cmp eax, 0 setnz al xor al, 0FFh xor al, 0FFh and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_667F5 mov rdi, [rsp+0A8h+var_60] mov rsi, [rsp+0A8h+var_58] mov rdx, [rsp+0A8h+var_50] call JS_FreeValue mov rdi, [rsp+0A8h+var_60] mov rax, [rsp+0A8h+var_78] mov esi, [rax+4] call JS_ThrowReferenceErrorUninitialized mov [rsp+0A8h+var_98], rax mov [rsp+0A8h+var_90], rdx mov [rsp+0A8h+var_44], 0FFFFFFFFh jmp loc_668C7 loc_667F5: mov rax, [rsp+0A8h+var_78] mov eax, [rax] shr eax, 1Ah and eax, 2 cmp eax, 0 setnz al xor al, 0FFh xor al, 0FFh xor al, 0FFh and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_66848 mov rdi, [rsp+0A8h+var_60] mov rsi, [rsp+0A8h+var_58] mov rdx, [rsp+0A8h+var_50] call JS_FreeValue mov rdi, [rsp+0A8h+var_60] mov edx, [rsp+0A8h+var_64] mov esi, 4000h call JS_ThrowTypeErrorReadOnly mov [rsp+0A8h+var_44], eax jmp short loc_668C7 loc_66848: jmp short $+2 loc_6684A: mov rdi, [rsp+0A8h+var_60] mov rsi, [rsp+0A8h+var_80] mov rdx, [rsp+0A8h+var_58] mov rcx, [rsp+0A8h+var_50] call set_value mov [rsp+0A8h+var_44], 0 jmp short loc_668C7 loc_6686D: mov [rsp+0A8h+var_84], 8000h mov rdi, [rsp+0A8h+var_60] call is_strict_mode cmp eax, 0 jz short loc_66891 mov eax, [rsp+0A8h+var_84] or eax, 10000h mov [rsp+0A8h+var_84], eax loc_66891: mov rdi, [rsp+0A8h+var_60] mov rdx, [rsp+0A8h+var_60] mov ecx, [rsp+0A8h+var_64] mov eax, [rsp+0A8h+var_84] mov rsi, [rdx+1A0h] mov rdx, [rdx+1A8h] mov r8, [rsp+0A8h+var_58] mov r9, [rsp+0A8h+var_50] mov [rsp+0A8h+var_A8], eax call JS_SetPropertyInternal mov [rsp+0A8h+var_44], eax loc_668C7: mov eax, [rsp+0A8h+var_44] add rsp, 0A8h retn
long long JS_SetGlobalVar( long long a1, unsigned int a2, long long a3, long long a4, int a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, double a10, double a11, __m128 a12, __m128 a13) { long long v13; // rax long long v14; // rdx long long v15; // rcx long long v16; // r8 long long v17; // r9 __m128 v18; // xmm4 __m128 v19; // xmm5 double v20; // xmm4_8 double v21; // xmm5_8 unsigned int v23; // [rsp+24h] [rbp-84h] long long *v24; // [rsp+28h] [rbp-80h] BYREF _DWORD *v25; // [rsp+30h] [rbp-78h] long long v26; // [rsp+38h] [rbp-70h] int v27; // [rsp+40h] [rbp-68h] unsigned int v28; // [rsp+44h] [rbp-64h] long long v29; // [rsp+48h] [rbp-60h] long long v30; // [rsp+50h] [rbp-58h] long long v31; // [rsp+58h] [rbp-50h] long long v33; // [rsp+68h] [rbp-40h] long long shape_prop; // [rsp+70h] [rbp-38h] _DWORD *v35; // [rsp+78h] [rbp-30h] long long v36; // [rsp+80h] [rbp-28h] unsigned int v37; // [rsp+8Ch] [rbp-1Ch] long long v38; // [rsp+90h] [rbp-18h] long long **v39; // [rsp+98h] [rbp-10h] _DWORD *v40; // [rsp+A0h] [rbp-8h] v30 = a3; v31 = a4; v29 = a1; v28 = a2; v27 = a5; v26 = *(_QWORD *)(a1 + 432); v39 = &v24; v38 = v26; v37 = a2; v36 = *(_QWORD *)(v26 + 24); v33 = *(_DWORD *)(v36 + 32) & a2; v13 = prop_hash_end(v36); v33 = *(unsigned int *)(v13 + 4 * (-v33 - 1)); shape_prop = get_shape_prop(v36); while ( v33 ) { v35 = (_DWORD *)(8 * (v33 - 1) + shape_prop); if ( v35[1] == v37 ) { *v39 = (long long *)(16 * (v33 - 1) + *(_QWORD *)(v38 + 32)); v40 = v35; goto LABEL_7; } v33 = *v35 & 0x3FFFFFF; } *v39 = 0LL; v40 = 0LL; LABEL_7: v25 = v40; if ( v40 ) { if ( v27 != 1 ) { if ( JS_IsUninitialized(*v24, v24[1]) ) { JS_FreeValue(v29, v30, v31); JS_ThrowReferenceErrorUninitialized(v29, v25[1], a6, a7, a8, a9, v18, v19, a12, a13, v14, v15, v16, v17); return (unsigned int)-1; } if ( ((*v25 >> 26) & 2) == 0 ) { JS_FreeValue(v29, v30, v31); return (unsigned int)JS_ThrowTypeErrorReadOnly(v29, 0x4000, v28, a6, a7, a8, a9, v20, v21, a12, a13); } } set_value(v29, v24, v30, v31); return 0; } v23 = 0x8000; if ( is_strict_mode(v29) ) v23 = 98304; return (unsigned int)JS_SetPropertyInternal(v29, *(_DWORD **)(v29 + 416), *(_QWORD *)(v29 + 424), v28, v30, v31, v23); }
JS_SetGlobalVar: SUB RSP,0xa8 MOV qword ptr [RSP + 0x50],RDX MOV qword ptr [RSP + 0x58],RCX MOV qword ptr [RSP + 0x48],RDI MOV dword ptr [RSP + 0x44],ESI MOV dword ptr [RSP + 0x40],R8D MOV RAX,qword ptr [RSP + 0x48] MOV RAX,qword ptr [RAX + 0x1b0] MOV qword ptr [RSP + 0x38],RAX MOV RCX,qword ptr [RSP + 0x38] MOV EAX,dword ptr [RSP + 0x44] LEA RDX,[RSP + 0x28] MOV qword ptr [RSP + 0x98],RDX MOV qword ptr [RSP + 0x90],RCX MOV dword ptr [RSP + 0x8c],EAX MOV RAX,qword ptr [RSP + 0x90] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0x80],RAX MOV EAX,dword ptr [RSP + 0x8c] MOV RCX,qword ptr [RSP + 0x80] MOV ECX,dword ptr [RCX + 0x20] AND RAX,RCX MOV qword ptr [RSP + 0x68],RAX MOV RDI,qword ptr [RSP + 0x80] CALL 0x0015d8b0 XOR ECX,ECX SUB RCX,qword ptr [RSP + 0x68] SUB RCX,0x1 MOV EAX,dword ptr [RAX + RCX*0x4] MOV qword ptr [RSP + 0x68],RAX MOV RDI,qword ptr [RSP + 0x80] CALL 0x0012c280 MOV qword ptr [RSP + 0x70],RAX LAB_001666c5: CMP qword ptr [RSP + 0x68],0x0 JZ 0x00166751 MOV RAX,qword ptr [RSP + 0x70] MOV RCX,qword ptr [RSP + 0x68] SUB RCX,0x1 SHL RCX,0x3 ADD RAX,RCX MOV qword ptr [RSP + 0x78],RAX MOV RAX,qword ptr [RSP + 0x78] MOV EAX,dword ptr [RAX + 0x4] CMP EAX,dword ptr [RSP + 0x8c] SETZ AL TEST AL,0x1 JNZ 0x00166703 JMP 0x00166739 LAB_00166703: MOV RAX,qword ptr [RSP + 0x90] MOV RCX,qword ptr [RAX + 0x20] MOV RAX,qword ptr [RSP + 0x68] SUB RAX,0x1 SHL RAX,0x4 ADD RCX,RAX MOV RAX,qword ptr [RSP + 0x98] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0xa0],RAX JMP 0x0016676c LAB_00166739: MOV RAX,qword ptr [RSP + 0x78] MOV EAX,dword ptr [RAX] AND EAX,0x3ffffff MOV EAX,EAX MOV qword ptr [RSP + 0x68],RAX JMP 0x001666c5 LAB_00166751: MOV RAX,qword ptr [RSP + 0x98] MOV qword ptr [RAX],0x0 MOV qword ptr [RSP + 0xa0],0x0 LAB_0016676c: MOV RAX,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0x30],RAX CMP qword ptr [RSP + 0x30],0x0 JZ 0x0016686d CMP dword ptr [RSP + 0x40],0x1 JZ 0x0016684a MOV RAX,qword ptr [RSP + 0x28] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x8] CALL 0x0012d000 CMP EAX,0x0 SETNZ AL XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x001667f5 MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x50] MOV RDX,qword ptr [RSP + 0x58] CALL 0x00123c90 MOV RDI,qword ptr [RSP + 0x48] MOV RAX,qword ptr [RSP + 0x30] MOV ESI,dword ptr [RAX + 0x4] CALL 0x001604d0 MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x18],RDX MOV dword ptr [RSP + 0x64],0xffffffff JMP 0x001668c7 LAB_001667f5: MOV RAX,qword ptr [RSP + 0x30] MOV EAX,dword ptr [RAX] SHR EAX,0x1a AND EAX,0x2 CMP EAX,0x0 SETNZ AL XOR AL,0xff XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x00166848 MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x50] MOV RDX,qword ptr [RSP + 0x58] CALL 0x00123c90 MOV RDI,qword ptr [RSP + 0x48] MOV EDX,dword ptr [RSP + 0x44] MOV ESI,0x4000 CALL 0x00160fd0 MOV dword ptr [RSP + 0x64],EAX JMP 0x001668c7 LAB_00166848: JMP 0x0016684a LAB_0016684a: MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x50] MOV RCX,qword ptr [RSP + 0x58] CALL 0x00127a40 MOV dword ptr [RSP + 0x64],0x0 JMP 0x001668c7 LAB_0016686d: MOV dword ptr [RSP + 0x24],0x8000 MOV RDI,qword ptr [RSP + 0x48] CALL 0x00137f40 CMP EAX,0x0 JZ 0x00166891 MOV EAX,dword ptr [RSP + 0x24] OR EAX,0x10000 MOV dword ptr [RSP + 0x24],EAX LAB_00166891: MOV RDI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x48] MOV ECX,dword ptr [RSP + 0x44] MOV EAX,dword ptr [RSP + 0x24] MOV RSI,qword ptr [RDX + 0x1a0] MOV RDX,qword ptr [RDX + 0x1a8] MOV R8,qword ptr [RSP + 0x50] MOV R9,qword ptr [RSP + 0x58] MOV dword ptr [RSP],EAX CALL 0x00133d60 MOV dword ptr [RSP + 0x64],EAX LAB_001668c7: MOV EAX,dword ptr [RSP + 0x64] ADD RSP,0xa8 RET
int4 JS_SetGlobalVar(long param_1,uint param_2,int8 param_3,int8 param_4,int param_5) { int iVar1; int4 uVar2; long lVar3; int4 local_84; int8 *local_80; uint *local_78; long local_70; int local_68; uint local_64; long local_60; int8 local_58; int8 local_50; ulong local_40; long local_38; uint *local_30; long local_28; uint local_1c; long local_18; int8 **local_10; uint *local_8; local_70 = *(long *)(param_1 + 0x1b0); local_10 = &local_80; local_28 = *(long *)(local_70 + 0x18); local_40 = (ulong)(param_2 & *(uint *)(local_28 + 0x20)); local_68 = param_5; local_64 = param_2; local_60 = param_1; local_58 = param_3; local_50 = param_4; local_1c = param_2; local_18 = local_70; lVar3 = prop_hash_end(local_28); local_40 = (ulong)*(uint *)(lVar3 + (-1 - local_40) * 4); local_38 = get_shape_prop(local_28); do { if (local_40 == 0) { *local_10 = (int8 *)0x0; local_8 = (uint *)0x0; LAB_0016676c: local_78 = local_8; if (local_8 == (uint *)0x0) { local_84 = 0x8000; iVar1 = is_strict_mode(local_60); if (iVar1 != 0) { local_84 = 0x18000; } uVar2 = JS_SetPropertyInternal (local_60,*(int8 *)(local_60 + 0x1a0), *(int8 *)(local_60 + 0x1a8),local_64,local_58,local_50,local_84); return uVar2; } if (local_68 != 1) { iVar1 = JS_IsUninitialized(*local_80,local_80[1]); if (iVar1 != 0) { JS_FreeValue(local_60,local_58,local_50); JS_ThrowReferenceErrorUninitialized(local_60,local_78[1]); return 0xffffffff; } if ((*local_78 >> 0x1a & 2) == 0) { JS_FreeValue(local_60,local_58,local_50); uVar2 = JS_ThrowTypeErrorReadOnly(local_60,0x4000,local_64); return uVar2; } } set_value(local_60,local_80,local_58,local_50); return 0; } local_30 = (uint *)(local_38 + (local_40 - 1) * 8); if (local_30[1] == local_1c) { *local_10 = (int8 *)(*(long *)(local_18 + 0x20) + (local_40 - 1) * 0x10); local_8 = local_30; goto LAB_0016676c; } local_40 = (ulong)(*local_30 & 0x3ffffff); } while( true ); }
20,483
JS_SetGlobalVar
bluesky950520[P]quickjs/quickjs.c
static int JS_SetGlobalVar(JSContext *ctx, JSAtom prop, JSValue val, int flag) { JSObject *p; JSShapeProperty *prs; JSProperty *pr; int flags; /* no exotic behavior is possible in global_var_obj */ p = JS_VALUE_GET_OBJ(ctx->global_var_obj); prs = find_own_property(&pr, p, prop); if (prs) { /* XXX: should handle JS_PROP_AUTOINIT properties? */ if (flag != 1) { if (unlikely(JS_IsUninitialized(pr->u.value))) { JS_FreeValue(ctx, val); JS_ThrowReferenceErrorUninitialized(ctx, prs->atom); return -1; } if (unlikely(!(prs->flags & JS_PROP_WRITABLE))) { JS_FreeValue(ctx, val); return JS_ThrowTypeErrorReadOnly(ctx, JS_PROP_THROW, prop); } } set_value(ctx, &pr->u.value, val); return 0; } flags = JS_PROP_THROW_STRICT; if (is_strict_mode(ctx)) flags |= JS_PROP_NO_ADD; return JS_SetPropertyInternal(ctx, ctx->global_obj, prop, val, flags); }
O1
c
JS_SetGlobalVar: pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rcx, %r9 movq %rdx, %rax movl %esi, %ebp movq %rdi, %rbx movq 0x1b0(%rdi), %rdx movq 0x18(%rdx), %rsi movl 0x20(%rsi), %ecx andl %ebp, %ecx notq %rcx movl (%rsi,%rcx,4), %r10d testl %r10d, %r10d je 0x3f868 addq $0x40, %rsi xorl %ecx, %ecx movl $0x3ffffff, %edi # imm = 0x3FFFFFF movl %r10d, %r10d leaq (%rsi,%r10,8), %r14 addq $-0x8, %r14 cmpl %ebp, 0x4(%r14) je 0x3f858 movl (%r14), %r10d movl $0x0, %r14d andl %edi, %r10d jne 0x3f837 jmp 0x3f86d decq %r10 shlq $0x4, %r10 addq 0x20(%rdx), %r10 movq %r10, %rcx jmp 0x3f86d xorl %ecx, %ecx xorl %r14d, %r14d testq %r14, %r14 je 0x3f8a8 cmpl $0x1, %r8d je 0x3f88d cmpl $0x4, 0x8(%rcx) je 0x3f915 testb $0x8, 0x3(%r14) je 0x3f932 movq (%rcx), %rsi movq 0x8(%rcx), %rdx movq %rax, (%rcx) movq %r9, 0x8(%rcx) movq 0x18(%rbx), %rdi callq 0x1d8c6 xorl %eax, %eax jmp 0x3f90c movq 0x18(%rbx), %rcx movq 0x108(%rcx), %rcx testq %rcx, %rcx je 0x3f8cc movl 0x40(%rcx), %ecx shrl $0xf, %ecx andl $0x10000, %ecx # imm = 0x10000 orl $0x8000, %ecx # imm = 0x8000 jmp 0x3f8d1 movl $0x8000, %ecx # imm = 0x8000 movq 0x1a0(%rbx), %rsi movq 0x1a8(%rbx), %rdx movq %rsi, 0x20(%rsp) movq %rdx, 0x28(%rsp) movups 0x20(%rsp), %xmm0 movups %xmm0, (%rsp) movl %ecx, 0x10(%rsp) movq $0x0, 0x18(%rsp) movq %rbx, %rdi movl %ebp, %ecx movq %rax, %r8 callq 0x24388 addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq movq 0x18(%rbx), %rdi movq %rax, %rsi movq %r9, %rdx callq 0x1d8c6 movl 0x4(%r14), %esi movq %rbx, %rdi callq 0x3d5ee jmp 0x3f952 movq 0x18(%rbx), %rdi movq %rax, %rsi movq %r9, %rdx callq 0x1d8c6 leaq 0x5f7eb(%rip), %rdx # 0x9f133 movq %rbx, %rdi movl %ebp, %esi callq 0x3d55b movl $0xffffffff, %eax # imm = 0xFFFFFFFF jmp 0x3f90c
JS_SetGlobalVar: push rbp push r14 push rbx sub rsp, 30h mov r9, rcx mov rax, rdx mov ebp, esi mov rbx, rdi mov rdx, [rdi+1B0h] mov rsi, [rdx+18h] mov ecx, [rsi+20h] and ecx, ebp not rcx mov r10d, [rsi+rcx*4] test r10d, r10d jz short loc_3F868 add rsi, 40h ; '@' xor ecx, ecx mov edi, 3FFFFFFh loc_3F837: mov r10d, r10d lea r14, [rsi+r10*8] add r14, 0FFFFFFFFFFFFFFF8h cmp [r14+4], ebp jz short loc_3F858 mov r10d, [r14] mov r14d, 0 and r10d, edi jnz short loc_3F837 jmp short loc_3F86D loc_3F858: dec r10 shl r10, 4 add r10, [rdx+20h] mov rcx, r10 jmp short loc_3F86D loc_3F868: xor ecx, ecx xor r14d, r14d loc_3F86D: test r14, r14 jz short loc_3F8A8 cmp r8d, 1 jz short loc_3F88D cmp dword ptr [rcx+8], 4 jz loc_3F915 test byte ptr [r14+3], 8 jz loc_3F932 loc_3F88D: mov rsi, [rcx] mov rdx, [rcx+8] mov [rcx], rax mov [rcx+8], r9 mov rdi, [rbx+18h] call JS_FreeValueRT xor eax, eax jmp short loc_3F90C loc_3F8A8: mov rcx, [rbx+18h] mov rcx, [rcx+108h] test rcx, rcx jz short loc_3F8CC mov ecx, [rcx+40h] shr ecx, 0Fh and ecx, 10000h or ecx, 8000h jmp short loc_3F8D1 loc_3F8CC: mov ecx, 8000h loc_3F8D1: mov rsi, [rbx+1A0h] mov rdx, [rbx+1A8h] mov qword ptr [rsp+48h+var_28], rsi mov qword ptr [rsp+48h+var_28+8], rdx movups xmm0, [rsp+48h+var_28] movups [rsp+48h+var_48], xmm0 mov [rsp+48h+var_38], ecx mov [rsp+48h+var_30], 0 mov rdi, rbx mov ecx, ebp mov r8, rax call JS_SetPropertyInternal2 loc_3F90C: add rsp, 30h pop rbx pop r14 pop rbp retn loc_3F915: mov rdi, [rbx+18h] mov rsi, rax mov rdx, r9 call JS_FreeValueRT mov esi, [r14+4] mov rdi, rbx call JS_ThrowReferenceErrorUninitialized jmp short loc_3F952 loc_3F932: mov rdi, [rbx+18h] mov rsi, rax mov rdx, r9 call JS_FreeValueRT lea rdx, aSIsReadOnly; "'%s' is read-only" mov rdi, rbx mov esi, ebp call __JS_ThrowTypeErrorAtom loc_3F952: mov eax, 0FFFFFFFFh jmp short loc_3F90C
long long JS_SetGlobalVar( long long a1, unsigned int a2, _DWORD *a3, long long a4, int a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, double a10, double a11, __m128 a12, __m128 a13) { long long v16; // rdx long long v17; // rsi unsigned int v18; // r10d long long v19; // rsi long long v20; // rcx long long v21; // r14 int v22; // r10d _DWORD *v23; // rsi long long v24; // rdx long long v26; // rcx unsigned int v27; // ecx long long v28; // rdx long long v29; // rcx long long v30; // r8 long long v31; // r9 __m128 v32; // xmm4 __m128 v33; // xmm5 double v34; // xmm4_8 double v35; // xmm5_8 __m128 v36; // [rsp+20h] [rbp-28h] v16 = *(_QWORD *)(a1 + 432); v17 = *(_QWORD *)(v16 + 24); v18 = *(_DWORD *)(v17 + 4 * ~(unsigned long long)(a2 & *(_DWORD *)(v17 + 32))); if ( v18 ) { v19 = v17 + 64; v20 = 0LL; while ( 1 ) { v21 = v19 + 8LL * v18 - 8; if ( *(_DWORD *)(v21 + 4) == a2 ) break; v22 = *(_DWORD *)v21; v21 = 0LL; v18 = v22 & 0x3FFFFFF; if ( !v18 ) goto LABEL_8; } v20 = *(_QWORD *)(v16 + 32) + 16 * (v18 - 1LL); } else { v20 = 0LL; v21 = 0LL; } LABEL_8: if ( v21 ) { if ( a5 == 1 ) { LABEL_12: v23 = *(_DWORD **)v20; v24 = *(_QWORD *)(v20 + 8); *(_QWORD *)v20 = a3; *(_QWORD *)(v20 + 8) = a4; JS_FreeValueRT(*(_QWORD *)(a1 + 24), v23, v24); return 0LL; } if ( *(_DWORD *)(v20 + 8) == 4 ) { JS_FreeValueRT(*(_QWORD *)(a1 + 24), a3, a4); JS_ThrowReferenceErrorUninitialized( a1, *(_DWORD *)(v21 + 4), a6, a7, a8, a9, v32, v33, a12, a13, v28, v29, v30, v31); } else { if ( (*(_BYTE *)(v21 + 3) & 8) != 0 ) goto LABEL_12; JS_FreeValueRT(*(_QWORD *)(a1 + 24), a3, a4); _JS_ThrowTypeErrorAtom(a1, a2, (long long)"'%s' is read-only", a6, a7, a8, a9, v34, v35, a12, a13); } return 0xFFFFFFFFLL; } else { v26 = *(_QWORD *)(*(_QWORD *)(a1 + 24) + 264LL); if ( v26 ) v27 = (*(_DWORD *)(v26 + 64) >> 15) & 0x10000 | 0x8000; else v27 = 0x8000; v36 = *(__m128 *)(a1 + 416); return JS_SetPropertyInternal2( a1, v36.m128_i64[0], v36.m128_i64[1], a2, a3, a4, v36, a7, a8, a9, a10, a11, a12, a13, v36.m128_i64[0], v36.m128_i32[2], v27, 0LL); } }
20,484
JS_SetGlobalVar
bluesky950520[P]quickjs/quickjs.c
static int JS_SetGlobalVar(JSContext *ctx, JSAtom prop, JSValue val, int flag) { JSObject *p; JSShapeProperty *prs; JSProperty *pr; int flags; /* no exotic behavior is possible in global_var_obj */ p = JS_VALUE_GET_OBJ(ctx->global_var_obj); prs = find_own_property(&pr, p, prop); if (prs) { /* XXX: should handle JS_PROP_AUTOINIT properties? */ if (flag != 1) { if (unlikely(JS_IsUninitialized(pr->u.value))) { JS_FreeValue(ctx, val); JS_ThrowReferenceErrorUninitialized(ctx, prs->atom); return -1; } if (unlikely(!(prs->flags & JS_PROP_WRITABLE))) { JS_FreeValue(ctx, val); return JS_ThrowTypeErrorReadOnly(ctx, JS_PROP_THROW, prop); } } set_value(ctx, &pr->u.value, val); return 0; } flags = JS_PROP_THROW_STRICT; if (is_strict_mode(ctx)) flags |= JS_PROP_NO_ADD; return JS_SetPropertyInternal(ctx, ctx->global_obj, prop, val, flags); }
O2
c
JS_SetGlobalVar: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rcx, %r9 movq %rdx, %rax movl %esi, %ebp movq %rdi, %rbx movq 0x1b0(%rdi), %rcx movq 0x18(%rcx), %r14 movl 0x20(%r14), %edx andl %esi, %edx notq %rdx movl (%r14,%rdx,4), %esi movl $0x3ffffff, %edx # imm = 0x3FFFFFF testl %esi, %esi je 0x37b45 movl %esi, %r15d cmpl %ebp, 0x3c(%r14,%r15,8) je 0x37b0a movl 0x38(%r14,%r15,8), %esi andl %edx, %esi jmp 0x37af3 leaq -0x1(%r15), %rsi shlq $0x4, %rsi addq 0x20(%rcx), %rsi cmpl $0x1, %r8d je 0x37b2a cmpl $0x4, 0x8(%rsi) je 0x37b87 testb $0x8, 0x3b(%r14,%r15,8) je 0x37ba7 movq %rbx, %rdi movq %rax, %rdx movq %r9, %rcx callq 0x19eec xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq 0x18(%rbx), %rcx movq 0x108(%rcx), %rcx testq %rcx, %rcx je 0x37b5b cmpl $0x0, 0x40(%rcx) js 0x37b62 movl $0x8000, %ecx # imm = 0x8000 jmp 0x37b67 movl $0x18000, %ecx # imm = 0x18000 movq 0x1a0(%rbx), %rsi movq 0x1a8(%rbx), %rdx movl %ecx, (%rsp) movq %rbx, %rdi movl %ebp, %ecx movq %rax, %r8 callq 0x1f1af jmp 0x37b3a movq %rbx, %rdi movq %rax, %rsi movq %r9, %rdx callq 0x1801e movl 0x3c(%r14,%r15,8), %esi movq %rbx, %rdi callq 0x35ece pushq $-0x1 popq %rax jmp 0x37b3a movq %rbx, %rdi movq %rax, %rsi movq %r9, %rdx callq 0x1801e movq %rbx, %rdi movl $0x4000, %esi # imm = 0x4000 movl %ebp, %edx addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x36367
JS_SetGlobalVar: push rbp push r15 push r14 push rbx push rax mov r9, rcx mov rax, rdx mov ebp, esi mov rbx, rdi mov rcx, [rdi+1B0h] mov r14, [rcx+18h] mov edx, [r14+20h] and edx, esi not rdx mov esi, [r14+rdx*4] mov edx, 3FFFFFFh loc_37AF3: test esi, esi jz short loc_37B45 mov r15d, esi cmp [r14+r15*8+3Ch], ebp jz short loc_37B0A mov esi, [r14+r15*8+38h] and esi, edx jmp short loc_37AF3 loc_37B0A: lea rsi, [r15-1] shl rsi, 4 add rsi, [rcx+20h] cmp r8d, 1 jz short loc_37B2A cmp dword ptr [rsi+8], 4 jz short loc_37B87 test byte ptr [r14+r15*8+3Bh], 8 jz short loc_37BA7 loc_37B2A: mov rdi, rbx mov rdx, rax mov rcx, r9 call set_value xor eax, eax loc_37B3A: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_37B45: mov rcx, [rbx+18h] mov rcx, [rcx+108h] test rcx, rcx jz short loc_37B5B cmp dword ptr [rcx+40h], 0 js short loc_37B62 loc_37B5B: mov ecx, 8000h jmp short loc_37B67 loc_37B62: mov ecx, 18000h loc_37B67: mov rsi, [rbx+1A0h] mov rdx, [rbx+1A8h] mov [rsp+28h+var_28], ecx mov rdi, rbx mov ecx, ebp mov r8, rax call JS_SetPropertyInternal jmp short loc_37B3A loc_37B87: mov rdi, rbx mov rsi, rax mov rdx, r9 call JS_FreeValue mov esi, [r14+r15*8+3Ch] mov rdi, rbx call JS_ThrowReferenceErrorUninitialized push 0FFFFFFFFFFFFFFFFh pop rax jmp short loc_37B3A loc_37BA7: mov rdi, rbx mov rsi, rax mov rdx, r9 call JS_FreeValue mov rdi, rbx mov esi, 4000h mov edx, ebp add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp JS_ThrowTypeErrorReadOnly
long long JS_SetGlobalVar( _QWORD *a1, unsigned int a2, unsigned int *a3, long long a4, int a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, double a10, double a11, __m128 a12, __m128 a13) { long long v15; // rcx long long v16; // r14 unsigned int i; // esi long long v18; // r15 long long v19; // rsi long long v21; // rcx int v22; // ecx long long v23; // rdx long long v24; // rcx long long v25; // r8 long long v26; // r9 __m128 v27; // xmm4 __m128 v28; // xmm5 double v29; // xmm4_8 double v30; // xmm5_8 v15 = a1[54]; v16 = *(_QWORD *)(v15 + 24); for ( i = *(_DWORD *)(v16 + 4 * ~(unsigned long long)(a2 & *(_DWORD *)(v16 + 32))); ; i = *(_DWORD *)(v16 + 8LL * i + 56) & 0x3FFFFFF ) { if ( !i ) { v21 = *(_QWORD *)(a1[3] + 264LL); if ( v21 && *(int *)(v21 + 64) < 0 ) v22 = 98304; else v22 = 0x8000; return JS_SetPropertyInternal((long long)a1, a1[52], a1[53], a2, a3, a4, v22); } v18 = i; if ( *(_DWORD *)(v16 + 8LL * i + 60) == a2 ) break; } v19 = *(_QWORD *)(v15 + 32) + 16 * (i - 1LL); if ( a5 == 1 ) { LABEL_8: set_value((long long)a1, (long long *)v19, (long long)a3, a4); return 0LL; } if ( *(_DWORD *)(v19 + 8) == 4 ) { JS_FreeValue((long long)a1, (long long)a3, a4); JS_ThrowReferenceErrorUninitialized( (long long)a1, *(_DWORD *)(v16 + 8 * v18 + 60), a6, a7, a8, a9, v27, v28, a12, a13, v23, v24, v25, v26); return -1LL; } else { if ( (*(_BYTE *)(v16 + 8 * v18 + 59) & 8) != 0 ) goto LABEL_8; JS_FreeValue((long long)a1, (long long)a3, a4); return JS_ThrowTypeErrorReadOnly((long long)a1, 0x4000, a2, a6, a7, a8, a9, v29, v30, a12, a13); } }
JS_SetGlobalVar: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R9,RCX MOV RAX,RDX MOV EBP,ESI MOV RBX,RDI MOV RCX,qword ptr [RDI + 0x1b0] MOV R14,qword ptr [RCX + 0x18] MOV EDX,dword ptr [R14 + 0x20] AND EDX,ESI NOT RDX MOV ESI,dword ptr [R14 + RDX*0x4] MOV EDX,0x3ffffff LAB_00137af3: TEST ESI,ESI JZ 0x00137b45 MOV R15D,ESI CMP dword ptr [R14 + R15*0x8 + 0x3c],EBP JZ 0x00137b0a MOV ESI,dword ptr [R14 + R15*0x8 + 0x38] AND ESI,EDX JMP 0x00137af3 LAB_00137b0a: LEA RSI,[R15 + -0x1] SHL RSI,0x4 ADD RSI,qword ptr [RCX + 0x20] CMP R8D,0x1 JZ 0x00137b2a CMP dword ptr [RSI + 0x8],0x4 JZ 0x00137b87 TEST byte ptr [R14 + R15*0x8 + 0x3b],0x8 JZ 0x00137ba7 LAB_00137b2a: MOV RDI,RBX MOV RDX,RAX MOV RCX,R9 CALL 0x00119eec XOR EAX,EAX LAB_00137b3a: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_00137b45: MOV RCX,qword ptr [RBX + 0x18] MOV RCX,qword ptr [RCX + 0x108] TEST RCX,RCX JZ 0x00137b5b CMP dword ptr [RCX + 0x40],0x0 JS 0x00137b62 LAB_00137b5b: MOV ECX,0x8000 JMP 0x00137b67 LAB_00137b62: MOV ECX,0x18000 LAB_00137b67: MOV RSI,qword ptr [RBX + 0x1a0] MOV RDX,qword ptr [RBX + 0x1a8] MOV dword ptr [RSP],ECX MOV RDI,RBX MOV ECX,EBP MOV R8,RAX CALL 0x0011f1af JMP 0x00137b3a LAB_00137b87: MOV RDI,RBX MOV RSI,RAX MOV RDX,R9 CALL 0x0011801e MOV ESI,dword ptr [R14 + R15*0x8 + 0x3c] MOV RDI,RBX CALL 0x00135ece PUSH -0x1 POP RAX JMP 0x00137b3a LAB_00137ba7: MOV RDI,RBX MOV RSI,RAX MOV RDX,R9 CALL 0x0011801e MOV RDI,RBX MOV ESI,0x4000 MOV EDX,EBP ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x00136367
int8 JS_SetGlobalVar(long param_1,uint param_2,int8 param_3,int8 param_4,int param_5) { long lVar1; int8 uVar2; int4 uVar3; uint uVar4; long lVar5; ulong uVar6; lVar1 = *(long *)(*(long *)(param_1 + 0x1b0) + 0x18); uVar4 = *(uint *)(lVar1 + ~(ulong)(*(uint *)(lVar1 + 0x20) & param_2) * 4); while( true ) { if (uVar4 == 0) { lVar1 = *(long *)(*(long *)(param_1 + 0x18) + 0x108); if ((lVar1 == 0) || (-1 < *(int *)(lVar1 + 0x40))) { uVar3 = 0x8000; } else { uVar3 = 0x18000; } uVar2 = JS_SetPropertyInternal (param_1,*(int8 *)(param_1 + 0x1a0),*(int8 *)(param_1 + 0x1a8), param_2,param_3,param_4,uVar3); return uVar2; } uVar6 = (ulong)uVar4; if (*(uint *)(lVar1 + 0x3c + uVar6 * 8) == param_2) break; uVar4 = *(uint *)(lVar1 + 0x38 + uVar6 * 8) & 0x3ffffff; } lVar5 = (uVar6 - 1) * 0x10 + *(long *)(*(long *)(param_1 + 0x1b0) + 0x20); if (param_5 != 1) { if (*(int *)(lVar5 + 8) == 4) { JS_FreeValue(param_1,param_3,param_4); JS_ThrowReferenceErrorUninitialized(param_1,*(int4 *)(lVar1 + 0x3c + uVar6 * 8)); return 0xffffffffffffffff; } if ((*(byte *)(lVar1 + 0x3b + uVar6 * 8) & 8) == 0) { JS_FreeValue(param_1,param_3,param_4); uVar2 = JS_ThrowTypeErrorReadOnly(param_1,0x4000,param_2); return uVar2; } } set_value(param_1,lVar5,param_3,param_4); return 0; }
20,485
JS_SetGlobalVar
bluesky950520[P]quickjs/quickjs.c
static int JS_SetGlobalVar(JSContext *ctx, JSAtom prop, JSValue val, int flag) { JSObject *p; JSShapeProperty *prs; JSProperty *pr; int flags; /* no exotic behavior is possible in global_var_obj */ p = JS_VALUE_GET_OBJ(ctx->global_var_obj); prs = find_own_property(&pr, p, prop); if (prs) { /* XXX: should handle JS_PROP_AUTOINIT properties? */ if (flag != 1) { if (unlikely(JS_IsUninitialized(pr->u.value))) { JS_FreeValue(ctx, val); JS_ThrowReferenceErrorUninitialized(ctx, prs->atom); return -1; } if (unlikely(!(prs->flags & JS_PROP_WRITABLE))) { JS_FreeValue(ctx, val); return JS_ThrowTypeErrorReadOnly(ctx, JS_PROP_THROW, prop); } } set_value(ctx, &pr->u.value, val); return 0; } flags = JS_PROP_THROW_STRICT; if (is_strict_mode(ctx)) flags |= JS_PROP_NO_ADD; return JS_SetPropertyInternal(ctx, ctx->global_obj, prop, val, flags); }
O3
c
JS_SetGlobalVar: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x38, %rsp movq %rcx, %r9 movq %rdx, %rax movl %esi, %ecx movq %rdi, %rbx movq 0x1b0(%rdi), %rdx movq 0x18(%rdx), %r14 movl 0x20(%r14), %esi andl %ecx, %esi notq %rsi movl (%r14,%rsi,4), %edi testl %edi, %edi je 0x41093 movl $0x3ffffff, %esi # imm = 0x3FFFFFF movl %edi, %r15d cmpl %ecx, 0x3c(%r14,%r15,8) je 0x410b0 movl 0x38(%r14,%r15,8), %edi andl %esi, %edi jne 0x41080 movq 0x18(%rbx), %rdx movq 0x108(%rdx), %rdx testq %rdx, %rdx je 0x410a9 cmpl $0x0, 0x40(%rdx) js 0x41109 movl $0x8000, %edi # imm = 0x8000 jmp 0x4110e leaq -0x1(%r15), %rsi movq 0x20(%rdx), %rdi shlq $0x4, %rsi movq 0x8(%rdi,%rsi), %rdx cmpl $0x1, %r8d je 0x410dc cmpl $0x4, %edx je 0x41152 testb $0x8, 0x3b(%r14,%r15,8) je 0x41184 addq %rsi, %rdi movq (%rdi), %rsi movq %rax, (%rdi) movq %r9, 0x8(%rdi) xorl %ebp, %ebp cmpl $-0x9, %edx jb 0x41105 movq 0x18(%rbx), %rdi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x41105 callq 0x219cc movl %ebp, %eax jmp 0x41147 movl $0x18000, %edi # imm = 0x18000 movq 0x1a0(%rbx), %rsi movq 0x1a8(%rbx), %rdx movq %rsi, 0x28(%rsp) movq %rdx, 0x30(%rsp) movups 0x28(%rsp), %xmm0 movups %xmm0, (%rsp) movl %edi, 0x10(%rsp) movq $0x0, 0x18(%rsp) movq %rbx, %rdi movq %rax, %r8 callq 0x249bb addq $0x38, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq cmpl $-0x9, %r9d jb 0x41178 movq 0x18(%rbx), %rdi movl (%rax), %edx leal -0x1(%rdx), %esi movl %esi, (%rax) cmpl $0x1, %edx jg 0x41178 movq %rax, %rsi movq %r9, %rdx callq 0x219cc movl 0x3c(%r14,%r15,8), %ecx movq %rbx, %rdi movl %ecx, %esi callq 0x3ebee jmp 0x41192 movq %rbx, %rdi movq %r9, %rsi movq %rax, %rdx callq 0x13b4b movl $0xffffffff, %ebp # imm = 0xFFFFFFFF jmp 0x41105
JS_SetGlobalVar: push rbp push r15 push r14 push rbx sub rsp, 38h mov r9, rcx mov rax, rdx mov ecx, esi mov rbx, rdi mov rdx, [rdi+1B0h] mov r14, [rdx+18h] mov esi, [r14+20h] and esi, ecx not rsi mov edi, [r14+rsi*4] test edi, edi jz short loc_41093 mov esi, 3FFFFFFh loc_41080: mov r15d, edi cmp [r14+r15*8+3Ch], ecx jz short loc_410B0 mov edi, [r14+r15*8+38h] and edi, esi jnz short loc_41080 loc_41093: mov rdx, [rbx+18h] mov rdx, [rdx+108h] test rdx, rdx jz short loc_410A9 cmp dword ptr [rdx+40h], 0 js short loc_41109 loc_410A9: mov edi, 8000h jmp short loc_4110E loc_410B0: lea rsi, [r15-1] mov rdi, [rdx+20h] shl rsi, 4 mov rdx, [rdi+rsi+8] cmp r8d, 1 jz short loc_410DC cmp edx, 4 jz loc_41152 test byte ptr [r14+r15*8+3Bh], 8 jz loc_41184 loc_410DC: add rdi, rsi mov rsi, [rdi] mov [rdi], rax mov [rdi+8], r9 xor ebp, ebp cmp edx, 0FFFFFFF7h jb short loc_41105 mov rdi, [rbx+18h] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short loc_41105 call js_free_value_rt loc_41105: mov eax, ebp jmp short loc_41147 loc_41109: mov edi, 18000h loc_4110E: mov rsi, [rbx+1A0h] mov rdx, [rbx+1A8h] mov qword ptr [rsp+58h+var_30], rsi mov qword ptr [rsp+58h+var_30+8], rdx movups xmm0, [rsp+58h+var_30] movups [rsp+58h+var_58], xmm0 mov [rsp+58h+var_48], edi mov [rsp+58h+var_40], 0 mov rdi, rbx mov r8, rax call JS_SetPropertyInternal2 loc_41147: add rsp, 38h pop rbx pop r14 pop r15 pop rbp retn loc_41152: cmp r9d, 0FFFFFFF7h jb short loc_41178 mov rdi, [rbx+18h] mov edx, [rax] lea esi, [rdx-1] mov [rax], esi cmp edx, 1 jg short loc_41178 mov rsi, rax mov rdx, r9 call js_free_value_rt mov ecx, [r14+r15*8+3Ch] loc_41178: mov rdi, rbx mov esi, ecx call JS_ThrowReferenceErrorUninitialized jmp short loc_41192 loc_41184: mov rdi, rbx mov rsi, r9 mov rdx, rax call JS_SetGlobalVar_cold_1 loc_41192: mov ebp, 0FFFFFFFFh jmp loc_41105
long long JS_SetGlobalVar( long long a1, unsigned int a2, int *a3, long long a4, long long a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13) { long long v13; // r9 unsigned long long v15; // rcx long long v17; // rdx long long v18; // r14 unsigned int v19; // edi long long v20; // r15 long long v21; // rdx unsigned int v22; // edi long long v23; // rdi long long v24; // rsi long long v25; // rdx long long v26; // rdi _QWORD *v27; // rsi unsigned int v28; // ebp long long v29; // rdi int v30; // eax long long v32; // rdi __m128 v33; // [rsp+28h] [rbp-30h] v13 = a4; v15 = a2; v17 = *(_QWORD *)(a1 + 432); v18 = *(_QWORD *)(v17 + 24); v19 = *(_DWORD *)(v18 + 4 * ~(unsigned long long)(a2 & *(_DWORD *)(v18 + 32))); if ( v19 ) { while ( 1 ) { v20 = v19; if ( *(_DWORD *)(v18 + 8LL * v19 + 60) == a2 ) break; v19 = *(_DWORD *)(v18 + 8LL * v19 + 56) & 0x3FFFFFF; if ( (*(_DWORD *)(v18 + 8 * v20 + 56) & 0x3FFFFFF) == 0 ) goto LABEL_4; } v23 = *(_QWORD *)(v17 + 32); v24 = 16 * (v20 - 1); v25 = *(_QWORD *)(v23 + v24 + 8); if ( (_DWORD)a5 == 1 ) goto LABEL_10; if ( (_DWORD)v25 == 4 ) { if ( (unsigned int)v13 >= 0xFFFFFFF7 ) { v32 = *(_QWORD *)(a1 + 24); v25 = (unsigned int)*a3; *a3 = v25 - 1; if ( (int)v25 <= 1 ) { js_free_value_rt(v32, a3, v13); v15 = *(unsigned int *)(v18 + 8 * v20 + 60); } } JS_ThrowReferenceErrorUninitialized(a1, v15, a6, a7, a8, a9, a10, a11, a12, a13, v25, v15, a5, v13); } else { if ( (*(_BYTE *)(v18 + 8 * v20 + 59) & 8) != 0 ) { LABEL_10: v26 = v24 + v23; v27 = *(_QWORD **)v26; *(_QWORD *)v26 = a3; *(_QWORD *)(v26 + 8) = v13; v28 = 0; if ( (unsigned int)v25 >= 0xFFFFFFF7 ) { v29 = *(_QWORD *)(a1 + 24); v30 = (*(_DWORD *)v27)--; if ( v30 <= 1 ) js_free_value_rt(v29, v27, v25); } return v28; } JS_SetGlobalVar_cold_1(a1, v13, a3, v15); } return (unsigned int)-1; } LABEL_4: v21 = *(_QWORD *)(*(_QWORD *)(a1 + 24) + 264LL); if ( v21 && *(int *)(v21 + 64) < 0 ) v22 = 98304; else v22 = 0x8000; v33 = *(__m128 *)(a1 + 416); return JS_SetPropertyInternal2( a1, v33.m128_i64[0], v33.m128_i64[1], a2, a3, v13, v33, a7, a8, a9, *(double *)a10.m128_u64, *(double *)a11.m128_u64, a12, a13, v33.m128_i64[0], v33.m128_i64[1], v22, 0LL); }
JS_SetGlobalVar: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x38 MOV R9,RCX MOV RAX,RDX MOV ECX,ESI MOV RBX,RDI MOV RDX,qword ptr [RDI + 0x1b0] MOV R14,qword ptr [RDX + 0x18] MOV ESI,dword ptr [R14 + 0x20] AND ESI,ECX NOT RSI MOV EDI,dword ptr [R14 + RSI*0x4] TEST EDI,EDI JZ 0x00141093 MOV ESI,0x3ffffff LAB_00141080: MOV R15D,EDI CMP dword ptr [R14 + R15*0x8 + 0x3c],ECX JZ 0x001410b0 MOV EDI,dword ptr [R14 + R15*0x8 + 0x38] AND EDI,ESI JNZ 0x00141080 LAB_00141093: MOV RDX,qword ptr [RBX + 0x18] MOV RDX,qword ptr [RDX + 0x108] TEST RDX,RDX JZ 0x001410a9 CMP dword ptr [RDX + 0x40],0x0 JS 0x00141109 LAB_001410a9: MOV EDI,0x8000 JMP 0x0014110e LAB_001410b0: LEA RSI,[R15 + -0x1] MOV RDI,qword ptr [RDX + 0x20] SHL RSI,0x4 MOV RDX,qword ptr [RDI + RSI*0x1 + 0x8] CMP R8D,0x1 JZ 0x001410dc CMP EDX,0x4 JZ 0x00141152 TEST byte ptr [R14 + R15*0x8 + 0x3b],0x8 JZ 0x00141184 LAB_001410dc: ADD RDI,RSI MOV RSI,qword ptr [RDI] MOV qword ptr [RDI],RAX MOV qword ptr [RDI + 0x8],R9 XOR EBP,EBP CMP EDX,-0x9 JC 0x00141105 MOV RDI,qword ptr [RBX + 0x18] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x00141105 CALL 0x001219cc LAB_00141105: MOV EAX,EBP JMP 0x00141147 LAB_00141109: MOV EDI,0x18000 LAB_0014110e: MOV RSI,qword ptr [RBX + 0x1a0] MOV RDX,qword ptr [RBX + 0x1a8] MOV qword ptr [RSP + 0x28],RSI MOV qword ptr [RSP + 0x30],RDX MOVUPS XMM0,xmmword ptr [RSP + 0x28] MOVUPS xmmword ptr [RSP],XMM0 MOV dword ptr [RSP + 0x10],EDI MOV qword ptr [RSP + 0x18],0x0 MOV RDI,RBX MOV R8,RAX CALL 0x001249bb LAB_00141147: ADD RSP,0x38 POP RBX POP R14 POP R15 POP RBP RET LAB_00141152: CMP R9D,-0x9 JC 0x00141178 MOV RDI,qword ptr [RBX + 0x18] MOV EDX,dword ptr [RAX] LEA ESI,[RDX + -0x1] MOV dword ptr [RAX],ESI CMP EDX,0x1 JG 0x00141178 MOV RSI,RAX MOV RDX,R9 CALL 0x001219cc MOV ECX,dword ptr [R14 + R15*0x8 + 0x3c] LAB_00141178: MOV RDI,RBX MOV ESI,ECX CALL 0x0013ebee JMP 0x00141192 LAB_00141184: MOV RDI,RBX MOV RSI,R9 MOV RDX,RAX CALL 0x00113b4b LAB_00141192: MOV EBP,0xffffffff JMP 0x00141105
int8 JS_SetGlobalVar(long param_1,uint param_2,int *param_3,int8 param_4,int param_5) { int iVar1; long lVar2; long lVar3; int *piVar4; int8 uVar5; long lVar6; uint uVar7; int8 *puVar8; ulong uVar9; lVar2 = *(long *)(*(long *)(param_1 + 0x1b0) + 0x18); uVar7 = *(uint *)(lVar2 + ~(ulong)(*(uint *)(lVar2 + 0x20) & param_2) * 4); while( true ) { if (uVar7 == 0) { uVar5 = JS_SetPropertyInternal2(param_1); return uVar5; } uVar9 = (ulong)uVar7; if (*(uint *)(lVar2 + 0x3c + uVar9 * 8) == param_2) break; uVar7 = *(uint *)(lVar2 + 0x38 + uVar9 * 8) & 0x3ffffff; } lVar3 = *(long *)(*(long *)(param_1 + 0x1b0) + 0x20); lVar6 = (uVar9 - 1) * 0x10; uVar7 = (uint)*(int8 *)(lVar3 + 8 + lVar6); if (param_5 != 1) { if (uVar7 == 4) { if (0xfffffff6 < (uint)param_4) { uVar5 = *(int8 *)(param_1 + 0x18); iVar1 = *param_3; *param_3 = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(uVar5,param_3,param_4); param_2 = *(uint *)(lVar2 + 0x3c + uVar9 * 8); } } JS_ThrowReferenceErrorUninitialized(param_1,param_2); } else { if ((*(byte *)(lVar2 + 0x3b + uVar9 * 8) & 8) != 0) goto LAB_001410dc; JS_SetGlobalVar_cold_1(param_1,param_4,param_3); } return 0xffffffff; } LAB_001410dc: puVar8 = (int8 *)(lVar3 + lVar6); piVar4 = (int *)*puVar8; *puVar8 = param_3; puVar8[1] = param_4; if (uVar7 < 0xfffffff7) { return 0; } uVar5 = *(int8 *)(param_1 + 0x18); iVar1 = *piVar4; *piVar4 = iVar1 + -1; if (1 < iVar1) { return 0; } js_free_value_rt(uVar5); return 0; }
20,486
SchemaConverter::SchemaConverter(std::function<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)> const&, bool, bool)
monkey531[P]llama/common/json-schema-to-grammar.cpp
SchemaConverter( const std::function<json(const std::string &)> & fetch_json, bool dotall, bool compact_spaces) : _fetch_json(fetch_json), _dotall(dotall) { _rules["space"] = compact_spaces ? "\" \"?" : SPACE_RULE; }
O1
cpp
SchemaConverter::SchemaConverter(std::function<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)> const&, bool, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movl %ecx, %ebp movl %edx, %r14d movq %rdi, %rbx callq 0xbe9f2 movb %r14b, 0x20(%rbx) leaq 0x28(%rbx), %r14 leaq 0x30(%rbx), %rax movl $0x0, 0x30(%rbx) xorl %ecx, %ecx movq %rcx, 0x38(%rbx) movq %rax, 0x40(%rbx) movq %rax, 0x48(%rbx) movq %rcx, 0x50(%rbx) leaq 0x88(%rbx), %rax movq %rax, 0x58(%rbx) movl $0x1, %eax movq %rax, 0x60(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x68(%rbx) movl $0x3f800000, %ecx # imm = 0x3F800000 movl %ecx, 0x78(%rbx) movups %xmm0, 0x80(%rbx) leaq 0xc0(%rbx), %rdx movq %rdx, 0x90(%rbx) movq %rax, 0x98(%rbx) movups %xmm0, 0xa0(%rbx) movl %ecx, 0xb0(%rbx) movups %xmm0, 0xb8(%rbx) movups %xmm0, 0xc8(%rbx) movups %xmm0, 0xd8(%rbx) movups %xmm0, 0xe8(%rbx) leaq 0x18(%rsp), %r12 movq %r12, -0x10(%r12) testl %ebp, %ebp je 0xbe362 leaq 0x3730e(%rip), %rsi # 0xf565d leaq 0x3730b(%rip), %rdx # 0xf5661 leaq 0x8(%rsp), %rdi callq 0x21530 jmp 0xbe37d movq 0x6eea7(%rip), %rsi # 0x12d210 movq 0x6eea8(%rip), %rdx # 0x12d218 addq %rsi, %rdx leaq 0x8(%rsp), %rdi callq 0x210f0 leaq 0x38(%rsp), %r13 movq %r13, -0x10(%r13) leaq 0x374f3(%rip), %rsi # 0xf5880 leaq 0x374f1(%rip), %rdx # 0xf5885 leaq 0x28(%rsp), %rdi callq 0x21530 leaq 0x28(%rsp), %rsi movq %r14, %rdi callq 0xbea50 leaq 0x8(%rsp), %rsi movq %rax, %rdi callq 0x1a490 movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0xbe3cf movq 0x38(%rsp), %rsi incq %rsi callq 0x1a890 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0xbe3e6 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a890 addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r15 jmp 0xbe419 movq %rax, %r15 jmp 0xbe430 movq %rax, %r15 movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0xbe419 movq 0x38(%rsp), %rsi incq %rsi callq 0x1a890 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0xbe430 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a890 leaq 0x58(%rbx), %r12 leaq 0x90(%rbx), %r13 leaq 0xc8(%rbx), %rbp leaq 0xe0(%rbx), %rdi callq 0x20c6a movq %rbp, %rdi callq 0x20c6a movq %r13, %rdi callq 0x7dcfc movq %r12, %rdi callq 0xbee5e movq %r14, %rdi callq 0xbef40 movq 0x10(%rbx), %rax testq %rax, %rax je 0xbe484 movq %rbx, %rdi movq %rbx, %rsi movl $0x3, %edx callq *%rax movq %r15, %rdi callq 0x1af20 movq %rax, %rdi callq 0x20749
_ZN15SchemaConverterC2ERKSt8functionIFN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEERKSB_EEbb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov ebp, ecx mov r14d, edx mov rbx, rdi call _ZNSt8functionIFN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_EEC2ERKSI_; std::function<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> ()(std::string const&)>::function(std::function<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> ()(std::string const&)> const&) mov [rbx+20h], r14b lea r14, [rbx+28h] lea rax, [rbx+30h] mov dword ptr [rbx+30h], 0 xor ecx, ecx mov [rbx+38h], rcx mov [rbx+40h], rax mov [rbx+48h], rax mov [rbx+50h], rcx lea rax, [rbx+88h] mov [rbx+58h], rax mov eax, 1 mov [rbx+60h], rax xorps xmm0, xmm0 movups xmmword ptr [rbx+68h], xmm0 mov ecx, 3F800000h mov [rbx+78h], ecx movups xmmword ptr [rbx+80h], xmm0 lea rdx, [rbx+0C0h] mov [rbx+90h], rdx mov [rbx+98h], rax movups xmmword ptr [rbx+0A0h], xmm0 mov [rbx+0B0h], ecx movups xmmword ptr [rbx+0B8h], xmm0 movups xmmword ptr [rbx+0C8h], xmm0 movups xmmword ptr [rbx+0D8h], xmm0 movups xmmword ptr [rbx+0E8h], xmm0 lea r12, [rsp+78h+var_60] mov [r12-10h], r12 test ebp, ebp jz short loc_BE362 lea rsi, asc_F565D; "\" \"?" lea rdx, asc_F565D+4; "" lea rdi, [rsp+78h+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) jmp short loc_BE37D loc_BE362: mov rsi, cs:_ZL10SPACE_RULEB5cxx11; SPACE_RULE mov rdx, cs:qword_12D218 add rdx, rsi lea rdi, [rsp+78h+var_70] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) loc_BE37D: lea r13, [rsp+78h+var_40] mov [r13-10h], r13 lea rsi, aSpace+7; "space" lea rdx, aSpace+0Ch; "" lea rdi, [rsp+78h+var_50] 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, [rsp+78h+var_50] mov rdi, r14 call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixEOS5_; std::map<std::string,std::string>::operator[](std::string&&) lea rsi, [rsp+78h+var_70] mov rdi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) mov rdi, [rsp+78h+var_50]; void * cmp rdi, r13 jz short loc_BE3CF mov rsi, [rsp+78h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_BE3CF: mov rdi, [rsp+78h+var_70]; void * cmp rdi, r12 jz short loc_BE3E6 mov rsi, [rsp+78h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_BE3E6: add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r15, rax jmp short loc_BE419 mov r15, rax jmp short loc_BE430 mov r15, rax mov rdi, [rsp+arg_20]; void * cmp rdi, r13 jz short loc_BE419 mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_BE419: mov rdi, [rsp+arg_0]; void * cmp rdi, r12 jz short loc_BE430 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_BE430: lea r12, [rbx+58h] lea r13, [rbx+90h] lea rbp, [rbx+0C8h] lea rdi, [rbx+0E0h] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, rbp call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, r13 call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable() mov rdi, r12 call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEESaISH_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSJ_18_Mod_range_hashingENSJ_20_Default_ranged_hashENSJ_20_Prime_rehash_policyENSJ_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable() mov rdi, r14 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree() mov rax, [rbx+10h] test rax, rax jz short loc_BE484 mov rdi, rbx mov rsi, rbx mov edx, 3 call rax loc_BE484: mov rdi, r15 call __Unwind_Resume mov rdi, rax call __clang_call_terminate
void SchemaConverter::SchemaConverter(long long a1, int a2, char a3, int a4) { long long v6; // rax void *v7[2]; // [rsp+8h] [rbp-70h] BYREF _QWORD v8[2]; // [rsp+18h] [rbp-60h] BYREF void *v9[2]; // [rsp+28h] [rbp-50h] BYREF _QWORD v10[8]; // [rsp+38h] [rbp-40h] BYREF std::function<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> ()(std::string const&)>::function(); *(_BYTE *)(a1 + 32) = a3; *(_DWORD *)(a1 + 48) = 0; *(_QWORD *)(a1 + 56) = 0LL; *(_QWORD *)(a1 + 64) = a1 + 48; *(_QWORD *)(a1 + 72) = a1 + 48; *(_QWORD *)(a1 + 80) = 0LL; *(_QWORD *)(a1 + 88) = a1 + 136; *(_QWORD *)(a1 + 96) = 1LL; *(_OWORD *)(a1 + 104) = 0LL; *(_DWORD *)(a1 + 120) = 1065353216; *(_OWORD *)(a1 + 128) = 0LL; *(_QWORD *)(a1 + 144) = a1 + 192; *(_QWORD *)(a1 + 152) = 1LL; *(_OWORD *)(a1 + 160) = 0LL; *(_DWORD *)(a1 + 176) = 1065353216; *(_OWORD *)(a1 + 184) = 0LL; *(_OWORD *)(a1 + 200) = 0LL; *(_OWORD *)(a1 + 216) = 0LL; *(_OWORD *)(a1 + 232) = 0LL; v7[0] = v8; if ( a4 ) std::string::_M_construct<char const*>(v7, "\" \"?", (long long)""); else std::string::_M_construct<char *>(v7, (_BYTE *)SPACE_RULE[abi:cxx11], SPACE_RULE[abi:cxx11] + qword_12D218); v9[0] = v10; std::string::_M_construct<char const*>(v9, "space", (long long)""); v6 = std::map<std::string,std::string>::operator[](a1 + 40, v9); std::string::_M_assign(v6, v7); if ( v9[0] != v10 ) operator delete(v9[0], v10[0] + 1LL); if ( v7[0] != v8 ) operator delete(v7[0], v8[0] + 1LL); }
SchemaConverter: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV EBP,ECX MOV R14D,EDX MOV RBX,RDI CALL 0x001be9f2 MOV byte ptr [RBX + 0x20],R14B LEA R14,[RBX + 0x28] LEA RAX,[RBX + 0x30] MOV dword ptr [RBX + 0x30],0x0 XOR ECX,ECX MOV qword ptr [RBX + 0x38],RCX MOV qword ptr [RBX + 0x40],RAX MOV qword ptr [RBX + 0x48],RAX MOV qword ptr [RBX + 0x50],RCX LEA RAX,[RBX + 0x88] MOV qword ptr [RBX + 0x58],RAX MOV EAX,0x1 MOV qword ptr [RBX + 0x60],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x68],XMM0 MOV ECX,0x3f800000 MOV dword ptr [RBX + 0x78],ECX MOVUPS xmmword ptr [RBX + 0x80],XMM0 LEA RDX,[RBX + 0xc0] MOV qword ptr [RBX + 0x90],RDX MOV qword ptr [RBX + 0x98],RAX MOVUPS xmmword ptr [RBX + 0xa0],XMM0 MOV dword ptr [RBX + 0xb0],ECX MOVUPS xmmword ptr [RBX + 0xb8],XMM0 MOVUPS xmmword ptr [RBX + 0xc8],XMM0 MOVUPS xmmword ptr [RBX + 0xd8],XMM0 MOVUPS xmmword ptr [RBX + 0xe8],XMM0 LEA R12,[RSP + 0x18] MOV qword ptr [R12 + -0x10],R12 TEST EBP,EBP JZ 0x001be362 LAB_001be348: LEA RSI,[0x1f565d] LEA RDX,[0x1f5661] LEA RDI,[RSP + 0x8] CALL 0x00121530 JMP 0x001be37d LAB_001be362: MOV RSI,qword ptr [0x0022d210] MOV RDX,qword ptr [0x0022d218] ADD RDX,RSI LEA RDI,[RSP + 0x8] CALL 0x001210f0 LAB_001be37d: LEA R13,[RSP + 0x38] MOV qword ptr [R13 + -0x10],R13 LAB_001be386: LEA RSI,[0x1f5880] LEA RDX,[0x1f5885] LEA RDI,[RSP + 0x28] CALL 0x00121530 LAB_001be39e: LEA RSI,[RSP + 0x28] MOV RDI,R14 CALL 0x001bea50 LEA RSI,[RSP + 0x8] MOV RDI,RAX CALL 0x0011a490 MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R13 JZ 0x001be3cf MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x0011a890 LAB_001be3cf: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R12 JZ 0x001be3e6 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011a890 LAB_001be3e6: ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* SchemaConverter::SchemaConverter(std::function<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> (std::__cxx11::string const&)> const&, bool, bool) */ void __thiscall SchemaConverter::SchemaConverter(SchemaConverter *this,function *param_1,bool param_2,bool param_3) { string *psVar1; int7 in_register_00000009; long *local_70 [2]; long local_60 [2]; long *local_50 [2]; long local_40 [2]; std:: function<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>(std::__cxx11::string_const&)> ::function((function<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>(std::__cxx11::string_const&)> *)this,param_1); this[0x20] = (SchemaConverter)param_2; *(int4 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(SchemaConverter **)(this + 0x40) = this + 0x30; *(SchemaConverter **)(this + 0x48) = this + 0x30; *(int8 *)(this + 0x50) = 0; *(SchemaConverter **)(this + 0x58) = this + 0x88; *(int8 *)(this + 0x60) = 1; *(int8 *)(this + 0x68) = 0; *(int8 *)(this + 0x70) = 0; *(int4 *)(this + 0x78) = 0x3f800000; *(int8 *)(this + 0x80) = 0; *(int8 *)(this + 0x88) = 0; *(SchemaConverter **)(this + 0x90) = this + 0xc0; *(int8 *)(this + 0x98) = 1; *(int8 *)(this + 0xa0) = 0; *(int8 *)(this + 0xa8) = 0; *(int4 *)(this + 0xb0) = 0x3f800000; *(int8 *)(this + 0xb8) = 0; *(int8 *)(this + 0xc0) = 0; *(int8 *)(this + 200) = 0; *(int8 *)(this + 0xd0) = 0; *(int8 *)(this + 0xd8) = 0; *(int8 *)(this + 0xe0) = 0; *(int8 *)(this + 0xe8) = 0; *(int8 *)(this + 0xf0) = 0; local_70[0] = local_60; if ((int)CONCAT71(in_register_00000009,param_3) == 0) { std::__cxx11::string::_M_construct<char*> (local_70,SPACE_RULE_abi_cxx11_,DAT_0022d218 + SPACE_RULE_abi_cxx11_); } else { /* try { // try from 001be348 to 001be37c has its CatchHandler @ 001be3fa */ std::__cxx11::string::_M_construct<char_const*>(local_70,&DAT_001f565d,&DAT_001f5661); } /* try { // try from 001be386 to 001be39d has its CatchHandler @ 001be3f5 */ local_50[0] = local_40; std::__cxx11::string::_M_construct<char_const*>(local_50,"space",""); /* try { // try from 001be39e to 001be3b7 has its CatchHandler @ 001be3ff */ psVar1 = (string *) std:: map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::operator[]((map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> *)(this + 0x28),(string *)local_50); std::__cxx11::string::_M_assign(psVar1); if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } if (local_70[0] != local_60) { operator_delete(local_70[0],local_60[0] + 1); } return; }
20,487
my_hash_sort_utf16_nopad_bin
eloqsql/strings/ctype-ucs2.c
static void my_hash_sort_utf16_nopad_bin(CHARSET_INFO *cs __attribute__((unused)), const uchar *pos, size_t len, ulong *nr1, ulong *nr2) { const uchar *end= pos + len; register ulong m1= *nr1, m2= *nr2; for ( ; pos < end ; pos++) { MY_HASH_ADD(m1, m2, (uint)*pos); } *nr1= m1; *nr2= m2; }
O3
c
my_hash_sort_utf16_nopad_bin: movq (%rcx), %rax movq (%r8), %rdi testq %rdx, %rdx jle 0xd0f34 pushq %rbp movq %rsp, %rbp addq %rsi, %rdx movl %eax, %r9d andl $0x3f, %r9d addq %rdi, %r9 movzbl (%rsi), %r10d imulq %r9, %r10 movq %rax, %r9 shlq $0x8, %r9 addq %r10, %r9 xorq %r9, %rax addq $0x3, %rdi incq %rsi cmpq %rdx, %rsi jb 0xd0f08 popq %rbp movq %rax, (%rcx) movq %rdi, (%r8) retq
my_hash_sort_utf16_nopad_bin: mov rax, [rcx] mov rdi, [r8] test rdx, rdx jle short loc_D0F34 push rbp mov rbp, rsp add rdx, rsi loc_D0F08: mov r9d, eax and r9d, 3Fh add r9, rdi movzx r10d, byte ptr [rsi] imul r10, r9 mov r9, rax shl r9, 8 add r9, r10 xor rax, r9 add rdi, 3 inc rsi cmp rsi, rdx jb short loc_D0F08 pop rbp loc_D0F34: mov [rcx], rax mov [r8], rdi retn
long long my_hash_sort_utf16_nopad_bin(long long a1, unsigned __int8 *a2, long long a3, long long *a4, long long *a5) { long long result; // rax long long v6; // rdi unsigned __int8 *v7; // rdx result = *a4; v6 = *a5; if ( a3 > 0 ) { v7 = &a2[a3]; do { result ^= (v6 + (result & 0x3F)) * *a2 + (result << 8); v6 += 3LL; ++a2; } while ( a2 < v7 ); } *a4 = result; *a5 = v6; return result; }
my_hash_sort_utf16_nopad_bin: MOV RAX,qword ptr [RCX] MOV RDI,qword ptr [R8] TEST RDX,RDX JLE 0x001d0f34 PUSH RBP MOV RBP,RSP ADD RDX,RSI LAB_001d0f08: MOV R9D,EAX AND R9D,0x3f ADD R9,RDI MOVZX R10D,byte ptr [RSI] IMUL R10,R9 MOV R9,RAX SHL R9,0x8 ADD R9,R10 XOR RAX,R9 ADD RDI,0x3 INC RSI CMP RSI,RDX JC 0x001d0f08 POP RBP LAB_001d0f34: MOV qword ptr [RCX],RAX MOV qword ptr [R8],RDI RET
void my_hash_sort_utf16_nopad_bin (int8 param_1,byte *param_2,long param_3,ulong *param_4,long *param_5) { ulong uVar1; byte *pbVar2; long lVar3; uVar1 = *param_4; lVar3 = *param_5; if (0 < param_3) { pbVar2 = param_2 + param_3; do { uVar1 = uVar1 ^ uVar1 * 0x100 + (ulong)*param_2 * ((ulong)((uint)uVar1 & 0x3f) + lVar3); lVar3 = lVar3 + 3; param_2 = param_2 + 1; } while (param_2 < pbVar2); } *param_4 = uVar1; *param_5 = lVar3; return; }
20,488
mark_eval_captured_variables
bluesky950520[P]quickjs/quickjs.c
static void mark_eval_captured_variables(JSContext *ctx, JSFunctionDef *s, int scope_level) { int idx; JSVarDef *vd; for (idx = s->scopes[scope_level].first; idx >= 0;) { vd = &s->vars[idx]; vd->is_captured = 1; idx = vd->scope_next; } }
O0
c
mark_eval_captured_variables: movq %rdi, -0x8(%rsp) movq %rsi, -0x10(%rsp) movl %edx, -0x14(%rsp) movq -0x10(%rsp), %rax movq 0xf8(%rax), %rax movslq -0x14(%rsp), %rcx movl 0x4(%rax,%rcx,8), %eax movl %eax, -0x18(%rsp) cmpl $0x0, -0x18(%rsp) jl 0xbf15a movq -0x10(%rsp), %rax movq 0x90(%rax), %rax movslq -0x18(%rsp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x20(%rsp) movq -0x20(%rsp), %rax movl 0xc(%rax), %ecx andl $-0x5, %ecx orl $0x4, %ecx movl %ecx, 0xc(%rax) movq -0x20(%rsp), %rax movl 0x8(%rax), %eax movl %eax, -0x18(%rsp) jmp 0xbf117 retq nopl (%rax,%rax)
mark_eval_captured_variables: mov [rsp+var_8], rdi mov [rsp+var_10], rsi mov [rsp+var_14], edx mov rax, [rsp+var_10] mov rax, [rax+0F8h] movsxd rcx, [rsp+var_14] mov eax, [rax+rcx*8+4] mov [rsp+var_18], eax loc_BF117: cmp [rsp+var_18], 0 jl short locret_BF15A mov rax, [rsp+var_10] mov rax, [rax+90h] movsxd rcx, [rsp+var_18] shl rcx, 4 add rax, rcx mov [rsp+var_20], rax mov rax, [rsp+var_20] mov ecx, [rax+0Ch] and ecx, 0FFFFFFFBh or ecx, 4 mov [rax+0Ch], ecx mov rax, [rsp+var_20] mov eax, [rax+8] mov [rsp+var_18], eax jmp short loc_BF117 locret_BF15A: retn
long long mark_eval_captured_variables(long long a1, long long a2, int a3) { long long result; // rax long long v4; // [rsp+0h] [rbp-20h] int i; // [rsp+8h] [rbp-18h] result = *(unsigned int *)(*(_QWORD *)(a2 + 248) + 8LL * a3 + 4); for ( i = *(_DWORD *)(*(_QWORD *)(a2 + 248) + 8LL * a3 + 4); i >= 0; i = *(_DWORD *)(v4 + 8) ) { v4 = 16LL * i + *(_QWORD *)(a2 + 144); *(_DWORD *)(v4 + 12) = *(_DWORD *)(v4 + 12) & 0xFFFFFFFB | 4; result = *(unsigned int *)(v4 + 8); } return result; }
mark_eval_captured_variables: MOV qword ptr [RSP + -0x8],RDI MOV qword ptr [RSP + -0x10],RSI MOV dword ptr [RSP + -0x14],EDX MOV RAX,qword ptr [RSP + -0x10] MOV RAX,qword ptr [RAX + 0xf8] MOVSXD RCX,dword ptr [RSP + -0x14] MOV EAX,dword ptr [RAX + RCX*0x8 + 0x4] MOV dword ptr [RSP + -0x18],EAX LAB_001bf117: CMP dword ptr [RSP + -0x18],0x0 JL 0x001bf15a MOV RAX,qword ptr [RSP + -0x10] MOV RAX,qword ptr [RAX + 0x90] MOVSXD RCX,dword ptr [RSP + -0x18] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RSP + -0x20],RAX MOV RAX,qword ptr [RSP + -0x20] MOV ECX,dword ptr [RAX + 0xc] AND ECX,0xfffffffb OR ECX,0x4 MOV dword ptr [RAX + 0xc],ECX MOV RAX,qword ptr [RSP + -0x20] MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RSP + -0x18],EAX JMP 0x001bf117 LAB_001bf15a: RET
void mark_eval_captured_variables(int8 param_1,long param_2,int param_3) { long lVar1; int4 local_18; local_18 = *(int *)(*(long *)(param_2 + 0xf8) + 4 + (long)param_3 * 8); while (-1 < local_18) { lVar1 = *(long *)(param_2 + 0x90) + (long)local_18 * 0x10; *(uint *)(lVar1 + 0xc) = *(uint *)(lVar1 + 0xc) & 0xfffffffb | 4; local_18 = *(int *)(lVar1 + 8); } return; }
20,489
mark_eval_captured_variables
bluesky950520[P]quickjs/quickjs.c
static void mark_eval_captured_variables(JSContext *ctx, JSFunctionDef *s, int scope_level) { int idx; JSVarDef *vd; for (idx = s->scopes[scope_level].first; idx >= 0;) { vd = &s->vars[idx]; vd->is_captured = 1; idx = vd->scope_next; } }
O2
c
mark_eval_captured_variables: movq 0xf8(%rdi), %rax movl %esi, %ecx leaq (%rax,%rcx,8), %rax addq $0x4, %rax movslq (%rax), %rax testq %rax, %rax js 0x5fe25 movq 0x90(%rdi), %rcx shlq $0x4, %rax addq %rcx, %rax addq $0x8, %rax orl $0x4, 0x4(%rax) jmp 0x5fe05 retq
mark_eval_captured_variables: mov rax, [rdi+0F8h] mov ecx, esi lea rax, [rax+rcx*8] add rax, 4 loc_5FE05: movsxd rax, dword ptr [rax] test rax, rax js short locret_5FE25 mov rcx, [rdi+90h] shl rax, 4 add rax, rcx add rax, 8 or dword ptr [rax+4], 4 jmp short loc_5FE05 locret_5FE25: retn
long long mark_eval_captured_variables(long long a1, unsigned int a2) { int *i; // rax long long result; // rax for ( i = (int *)(*(_QWORD *)(a1 + 248) + 8LL * a2 + 4); ; i[1] |= 4u ) { result = *i; if ( result < 0 ) break; i = (int *)(*(_QWORD *)(a1 + 144) + 16 * result + 8); } return result; }
mark_eval_captured_variables: MOV RAX,qword ptr [RDI + 0xf8] MOV ECX,ESI LEA RAX,[RAX + RCX*0x8] ADD RAX,0x4 LAB_0015fe05: MOVSXD RAX,dword ptr [RAX] TEST RAX,RAX JS 0x0015fe25 MOV RCX,qword ptr [RDI + 0x90] SHL RAX,0x4 ADD RAX,RCX ADD RAX,0x8 OR dword ptr [RAX + 0x4],0x4 JMP 0x0015fe05 LAB_0015fe25: RET
void mark_eval_captured_variables(long param_1,uint param_2) { uint *puVar1; int *piVar2; long lVar3; piVar2 = (int *)(*(long *)(param_1 + 0xf8) + (ulong)param_2 * 8 + 4); while (-1 < (long)*piVar2) { lVar3 = (long)*piVar2 * 0x10 + *(long *)(param_1 + 0x90); puVar1 = (uint *)(lVar3 + 0xc); *puVar1 = *puVar1 | 4; piVar2 = (int *)(lVar3 + 8); } return; }
20,490
nglog::LogMessage::WriteToStringAndLog()
ng-log[P]ng-log/src/logging.cc
EXCLUSIVE_LOCKS_REQUIRED(log_mutex) { if (data_->message_ != nullptr) { RAW_DCHECK(data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == '\n', ""); // Omit prefix of message and trailing newline when writing to message_. const char* start = data_->message_text_ + data_->num_prefix_chars_; size_t len = data_->num_chars_to_log_ - data_->num_prefix_chars_ - 1; data_->message_->assign(start, len); } SendToLog(); }
O0
cpp
nglog::LogMessage::WriteToStringAndLog(): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x20(%rbp) movq 0x8(%rax), %rax cmpq $0x0, 0x76b0(%rax) je 0x1117f jmp 0x110c8 movq -0x20(%rbp), %rax movq 0x8(%rax), %rax cmpq $0x0, 0x76c0(%rax) jbe 0x110fb movq -0x20(%rbp), %rcx movq 0x8(%rcx), %rax movq 0x8(%rcx), %rcx movq 0x76c0(%rcx), %rcx subq $0x1, %rcx movsbl 0x4(%rax,%rcx), %eax cmpl $0xa, %eax je 0x1112c jmp 0x110fd movl $0x3, %edi leaq 0x3d621(%rip), %rsi # 0x4e72a movl $0x78c, %edx # imm = 0x78C leaq 0x3d65c(%rip), %rcx # 0x4e771 leaq 0x3d669(%rip), %r8 # 0x4e785 leaq 0x3db84(%rip), %r9 # 0x4eca7 movb $0x0, %al callq 0x48db0 jmp 0x1112c jmp 0x1112e movq -0x20(%rbp), %rax movq 0x8(%rax), %rcx addq $0x4, %rcx movq 0x8(%rax), %rdx addq 0x76b8(%rdx), %rcx movq %rcx, -0x10(%rbp) movq 0x8(%rax), %rcx movq 0x76c0(%rcx), %rcx movq 0x8(%rax), %rdx subq 0x76b8(%rdx), %rcx subq $0x1, %rcx movq %rcx, -0x18(%rbp) movq 0x8(%rax), %rax movq 0x76b0(%rax), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x99b0 movq -0x20(%rbp), %rdi callq 0x106c0 addq $0x20, %rsp popq %rbp retq nop
_ZN5nglog10LogMessage19WriteToStringAndLogEv: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_20], rax mov rax, [rax+8] cmp qword ptr [rax+76B0h], 0 jz loc_1117F jmp short $+2 loc_110C8: mov rax, [rbp+var_20] mov rax, [rax+8] cmp qword ptr [rax+76C0h], 0 jbe short loc_110FB mov rcx, [rbp+var_20] mov rax, [rcx+8] mov rcx, [rcx+8] mov rcx, [rcx+76C0h] sub rcx, 1 movsx eax, byte ptr [rax+rcx+4] cmp eax, 0Ah jz short loc_1112C loc_110FB: jmp short $+2 loc_110FD: mov edi, 3 lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... mov edx, 78Ch lea rcx, aCheckSFailedS; "Check %s failed: %s" lea r8, aDataNumCharsTo; "data_->num_chars_to_log_ > 0 && data_->"... lea r9, asc_4ECA5+2; "" mov al, 0 call _ZN5nglog6RawLogENS_11LogSeverityEPKciS2_z; nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...) jmp short $+2 loc_1112C: jmp short $+2 loc_1112E: mov rax, [rbp+var_20] mov rcx, [rax+8] add rcx, 4 mov rdx, [rax+8] add rcx, [rdx+76B8h] mov [rbp+var_10], rcx mov rcx, [rax+8] mov rcx, [rcx+76C0h] mov rdx, [rax+8] sub rcx, [rdx+76B8h] sub rcx, 1 mov [rbp+var_18], rcx mov rax, [rax+8] mov rdi, [rax+76B0h] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKcm; std::string::assign(char const*,ulong) loc_1117F: mov rdi, [rbp+var_20]; this call _ZN5nglog10LogMessage9SendToLogEv; nglog::LogMessage::SendToLog(void) add rsp, 20h pop rbp retn
nglog::LogDestination * nglog::LogMessage::WriteToStringAndLog(nglog::LogMessage *this) { if ( *(_QWORD *)(*((_QWORD *)this + 1) + 30384LL) ) { if ( !*(_QWORD *)(*((_QWORD *)this + 1) + 30400LL) || *(_BYTE *)(*((_QWORD *)this + 1) + *(_QWORD *)(*((_QWORD *)this + 1) + 30400LL) - 1LL + 4) != 10 ) { nglog::RawLog( 3, (unsigned int)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc", 1932, (unsigned int)"Check %s failed: %s", (unsigned int)"data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == '\\n'", (unsigned int)""); } std::string::assign( *(_QWORD *)(*((_QWORD *)this + 1) + 30384LL), *(_QWORD *)(*((_QWORD *)this + 1) + 30392LL) + *((_QWORD *)this + 1) + 4LL, *(_QWORD *)(*((_QWORD *)this + 1) + 30400LL) - *(_QWORD *)(*((_QWORD *)this + 1) + 30392LL) - 1LL); } return nglog::LogMessage::SendToLog(this); }
WriteToStringAndLog: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RAX + 0x8] CMP qword ptr [RAX + 0x76b0],0x0 JZ 0x0011117f JMP 0x001110c8 LAB_001110c8: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x8] CMP qword ptr [RAX + 0x76c0],0x0 JBE 0x001110fb MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RCX + 0x8] MOV RCX,qword ptr [RCX + 0x8] MOV RCX,qword ptr [RCX + 0x76c0] SUB RCX,0x1 MOVSX EAX,byte ptr [RAX + RCX*0x1 + 0x4] CMP EAX,0xa JZ 0x0011112c LAB_001110fb: JMP 0x001110fd LAB_001110fd: MOV EDI,0x3 LEA RSI,[0x14e72a] MOV EDX,0x78c LEA RCX,[0x14e771] LEA R8,[0x14e785] LEA R9,[0x14eca7] MOV AL,0x0 CALL 0x00148db0 JMP 0x0011112c LAB_0011112c: JMP 0x0011112e LAB_0011112e: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX + 0x8] ADD RCX,0x4 MOV RDX,qword ptr [RAX + 0x8] ADD RCX,qword ptr [RDX + 0x76b8] MOV qword ptr [RBP + -0x10],RCX MOV RCX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RCX + 0x76c0] MOV RDX,qword ptr [RAX + 0x8] SUB RCX,qword ptr [RDX + 0x76b8] SUB RCX,0x1 MOV qword ptr [RBP + -0x18],RCX MOV RAX,qword ptr [RAX + 0x8] MOV RDI,qword ptr [RAX + 0x76b0] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] CALL 0x001099b0 LAB_0011117f: MOV RDI,qword ptr [RBP + -0x20] CALL 0x001106c0 ADD RSP,0x20 POP RBP RET
/* nglog::LogMessage::WriteToStringAndLog() */ void __thiscall nglog::LogMessage::WriteToStringAndLog(LogMessage *this) { if (*(long *)(*(long *)(this + 8) + 0x76b0) != 0) { if ((*(long *)(*(long *)(this + 8) + 0x76c0) == 0) || (*(char *)(*(long *)(this + 8) + *(long *)(*(long *)(this + 8) + 0x76c0) + 3) != '\n')) { RawLog(3,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",0x78c, "Check %s failed: %s", "data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == \'\\n\'" ,&DAT_0014eca7); } std::__cxx11::string::assign (*(char **)(*(long *)(this + 8) + 0x76b0), *(long *)(this + 8) + 4 + *(long *)(*(long *)(this + 8) + 0x76b8)); } SendToLog(this); return; }
20,491
nglog::LogMessage::WriteToStringAndLog()
ng-log[P]ng-log/src/logging.cc
EXCLUSIVE_LOCKS_REQUIRED(log_mutex) { if (data_->message_ != nullptr) { RAW_DCHECK(data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == '\n', ""); // Omit prefix of message and trailing newline when writing to message_. const char* start = data_->message_text_ + data_->num_prefix_chars_; size_t len = data_->num_chars_to_log_ - data_->num_prefix_chars_ - 1; data_->message_->assign(start, len); } SendToLog(); }
O2
cpp
nglog::LogMessage::WriteToStringAndLog(): pushq %rbx movq %rdi, %rbx movq 0x8(%rdi), %rax movq 0x76b0(%rax), %rdi testq %rdi, %rdi je 0xa35c movq 0x76c0(%rax), %rcx testq %rcx, %rcx je 0xa305 cmpb $0xa, 0x3(%rcx,%rax) je 0xa342 leaq 0x1434e(%rip), %rsi # 0x1e65a leaq 0x1438e(%rip), %rcx # 0x1e6a1 leaq 0x1439b(%rip), %r8 # 0x1e6b5 leaq 0x148aa(%rip), %r9 # 0x1ebcb pushq $0x3 popq %rdi movl $0x78c, %edx # imm = 0x78C xorl %eax, %eax callq 0x1b2b4 movq 0x8(%rbx), %rax movq 0x76b0(%rax), %rdi movq 0x76c0(%rax), %rcx movq 0x76b8(%rax), %rdx leaq (%rax,%rdx), %rsi addq $0x4, %rsi notq %rdx addq %rcx, %rdx callq 0x7780 movq %rbx, %rdi popq %rbx jmp 0x9cf4 nop
_ZN5nglog10LogMessage19WriteToStringAndLogEv: push rbx mov rbx, rdi mov rax, [rdi+8] mov rdi, [rax+76B0h] test rdi, rdi jz short loc_A35C mov rcx, [rax+76C0h] test rcx, rcx jz short loc_A305 cmp byte ptr [rcx+rax+3], 0Ah jz short loc_A342 loc_A305: lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rcx, aCheckSFailedS; "Check %s failed: %s" lea r8, aDataNumCharsTo; "data_->num_chars_to_log_ > 0 && data_->"... lea r9, asc_1EBC9+2; "" push 3 pop rdi mov edx, 78Ch xor eax, eax call _ZN5nglog6RawLogENS_11LogSeverityEPKciS2_z; nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...) mov rax, [rbx+8] mov rdi, [rax+76B0h] mov rcx, [rax+76C0h] loc_A342: mov rdx, [rax+76B8h] lea rsi, [rax+rdx] add rsi, 4 not rdx add rdx, rcx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKcm; std::string::assign(char const*,ulong) loc_A35C: mov rdi, rbx; this pop rbx jmp _ZN5nglog10LogMessage9SendToLogEv; nglog::LogMessage::SendToLog(void)
long long nglog::LogMessage::WriteToStringAndLog(nglog::LogMessage *this) { _QWORD *v2; // rax long long v3; // rdi long long v4; // rcx v2 = (_QWORD *)*((_QWORD *)this + 1); v3 = v2[3798]; if ( v3 ) { v4 = v2[3800]; if ( !v4 || *((_BYTE *)v2 + v4 + 3) != 10 ) { nglog::RawLog( 3LL, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc", 1932LL, "Check %s failed: %s", "data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == '\\n'", ""); v2 = (_QWORD *)*((_QWORD *)this + 1); v3 = v2[3798]; v4 = v2[3800]; } std::string::assign(v3, (char *)v2 + v2[3799] + 4, v4 + ~v2[3799]); } return nglog::LogMessage::SendToLog(this); }
WriteToStringAndLog: PUSH RBX MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x8] MOV RDI,qword ptr [RAX + 0x76b0] TEST RDI,RDI JZ 0x0010a35c MOV RCX,qword ptr [RAX + 0x76c0] TEST RCX,RCX JZ 0x0010a305 CMP byte ptr [RCX + RAX*0x1 + 0x3],0xa JZ 0x0010a342 LAB_0010a305: LEA RSI,[0x11e65a] LEA RCX,[0x11e6a1] LEA R8,[0x11e6b5] LEA R9,[0x11ebcb] PUSH 0x3 POP RDI MOV EDX,0x78c XOR EAX,EAX CALL 0x0011b2b4 MOV RAX,qword ptr [RBX + 0x8] MOV RDI,qword ptr [RAX + 0x76b0] MOV RCX,qword ptr [RAX + 0x76c0] LAB_0010a342: MOV RDX,qword ptr [RAX + 0x76b8] LEA RSI,[RAX + RDX*0x1] ADD RSI,0x4 NOT RDX ADD RDX,RCX CALL 0x00107780 LAB_0010a35c: MOV RDI,RBX POP RBX JMP 0x00109cf4
/* nglog::LogMessage::WriteToStringAndLog() */ void __thiscall nglog::LogMessage::WriteToStringAndLog(LogMessage *this) { long lVar1; char *pcVar2; lVar1 = *(long *)(this + 8); pcVar2 = *(char **)(lVar1 + 0x76b0); if (pcVar2 != (char *)0x0) { if ((*(long *)(lVar1 + 0x76c0) == 0) || (*(char *)(*(long *)(lVar1 + 0x76c0) + 3 + lVar1) != '\n')) { RawLog(3,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",0x78c, "Check %s failed: %s", "data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == \'\\n\'" ,&DAT_0011ebcb); lVar1 = *(long *)(this + 8); pcVar2 = *(char **)(lVar1 + 0x76b0); } std::__cxx11::string::assign(pcVar2,lVar1 + *(long *)(lVar1 + 0x76b8) + 4); } SendToLog(this); return; }
20,492
eprint
eloqsql/storage/maria/ma_recovery_util.c
void eprint(FILE *trace_file __attribute__ ((unused)), const char *format __attribute__ ((unused)), ...) { va_list args; va_start(args, format); DBUG_PRINT("error", ("%s", format)); if (!trace_file) trace_file= stderr; if (procent_printed) { procent_printed= 0; /* In silent mode, print on another line than the 0% 10% 20% line */ fputc('\n', stderr); fflush(stderr); } vfprintf(trace_file , format, args); fputc('\n', trace_file); if (trace_file != stderr) { va_start(args, format); my_printv_error(HA_ERR_INITIALIZATION, format, MYF(0), args); } va_end(args); fflush(trace_file); }
O3
c
eprint: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xc8, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq -0xf0(%rbp), %r15 movq %rdx, 0x10(%r15) movq %rcx, 0x18(%r15) movq %r8, 0x20(%r15) movq %r9, 0x28(%r15) testb %al, %al je 0x50719 movaps %xmm0, -0xc0(%rbp) movaps %xmm1, -0xb0(%rbp) movaps %xmm2, -0xa0(%rbp) movaps %xmm3, -0x90(%rbp) movaps %xmm4, -0x80(%rbp) movaps %xmm5, -0x70(%rbp) movaps %xmm6, -0x60(%rbp) movaps %xmm7, -0x50(%rbp) movq %r15, -0x30(%rbp) leaq 0x10(%rbp), %rax movq %rax, -0x38(%rbp) movabsq $0x3000000010, %r13 # imm = 0x3000000010 movq %r13, -0x40(%rbp) testq %rdi, %rdi movq 0x333873(%rip), %r12 # 0x383fb0 movq (%r12), %rsi cmoveq %rsi, %rbx cmpb $0x0, 0xbaf034(%rip) # 0xbff780 je 0x50768 movb $0x0, 0xbaf02b(%rip) # 0xbff780 movl $0xa, %edi callq 0x296d0 movq (%r12), %rdi callq 0x29400 leaq -0x40(%rbp), %rcx movq %rbx, %rdi movl $0x1, %esi movq %r14, %rdx callq 0x29750 movl $0xa, %edi movq %rbx, %rsi callq 0x296d0 cmpq (%r12), %rbx je 0x507b1 leaq -0x40(%rbp), %rcx movq %r15, 0x10(%rcx) leaq 0x10(%rbp), %rax movq %rax, 0x8(%rcx) movq %r13, (%rcx) movl $0xae, %edi movq %r14, %rsi xorl %edx, %edx callq 0x9e3d8 movq %rbx, %rdi callq 0x29400 addq $0xc8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
eprint: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0C8h mov r14, rsi mov rbx, rdi lea r15, [rbp+var_F0] mov [r15+10h], rdx mov [r15+18h], rcx mov [r15+20h], r8 mov [r15+28h], r9 test al, al jz short loc_50719 movaps [rbp+var_C0], xmm0 movaps [rbp+var_B0], xmm1 movaps [rbp+var_A0], xmm2 movaps [rbp+var_90], xmm3 movaps [rbp+var_80], xmm4 movaps [rbp+var_70], xmm5 movaps [rbp+var_60], xmm6 movaps [rbp+var_50], xmm7 loc_50719: mov [rbp+var_30], r15 lea rax, [rbp+arg_0] mov [rbp+var_38], rax mov r13, 3000000010h mov [rbp+var_40], r13 test rdi, rdi mov r12, cs:stderr_ptr mov rsi, [r12] cmovz rbx, rsi cmp cs:procent_printed, 0 jz short loc_50768 mov cs:procent_printed, 0 mov edi, 0Ah call _fputc mov rdi, [r12] call _fflush loc_50768: lea rcx, [rbp+var_40] mov rdi, rbx mov esi, 1 mov rdx, r14 call ___vfprintf_chk mov edi, 0Ah mov rsi, rbx call _fputc cmp rbx, [r12] jz short loc_507B1 lea rcx, [rbp+var_40] mov [rcx+10h], r15 lea rax, [rbp+arg_0] mov [rcx+8], rax mov [rcx], r13 mov edi, 0AEh mov rsi, r14 xor edx, edx call my_printv_error loc_507B1: mov rdi, rbx call _fflush add rsp, 0C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long eprint( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, char a15) { long long v15; // rbx _BYTE v17[16]; // [rsp+0h] [rbp-F0h] BYREF long long v18; // [rsp+10h] [rbp-E0h] long long v19; // [rsp+18h] [rbp-D8h] long long v20; // [rsp+20h] [rbp-D0h] long long v21; // [rsp+28h] [rbp-C8h] __m128 v22; // [rsp+30h] [rbp-C0h] __m128 v23; // [rsp+40h] [rbp-B0h] __m128 v24; // [rsp+50h] [rbp-A0h] __m128 v25; // [rsp+60h] [rbp-90h] __m128 v26; // [rsp+70h] [rbp-80h] __m128 v27; // [rsp+80h] [rbp-70h] __m128 v28; // [rsp+90h] [rbp-60h] __m128 v29; // [rsp+A0h] [rbp-50h] long long v30; // [rsp+B0h] [rbp-40h] BYREF char *v31; // [rsp+B8h] [rbp-38h] _BYTE *v32; // [rsp+C0h] [rbp-30h] v22 = a7; v23 = a8; v24 = a9; v25 = a10; v26 = a11; v27 = a12; v28 = a13; v29 = a14; v15 = a1; v18 = a3; v19 = a4; v20 = a5; v21 = a6; v32 = v17; v31 = &a15; v30 = 0x3000000010LL; if ( !a1 ) v15 = stderr; if ( procent_printed ) { procent_printed = 0; fputc(10LL); fflush(stderr); } __vfprintf_chk(v15, 1LL, a2, &v30); fputc(10LL); if ( v15 != stderr ) { v32 = v17; v31 = &a15; v30 = 0x3000000010LL; my_printv_error(174LL, a2, 0LL, &v30); } return fflush(v15); }
eprint: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xc8 MOV R14,RSI MOV RBX,RDI LEA R15,[RBP + -0xf0] MOV qword ptr [R15 + 0x10],RDX MOV qword ptr [R15 + 0x18],RCX MOV qword ptr [R15 + 0x20],R8 MOV qword ptr [R15 + 0x28],R9 TEST AL,AL JZ 0x00150719 MOVAPS xmmword ptr [RBP + -0xc0],XMM0 MOVAPS xmmword ptr [RBP + -0xb0],XMM1 MOVAPS xmmword ptr [RBP + -0xa0],XMM2 MOVAPS xmmword ptr [RBP + -0x90],XMM3 MOVAPS xmmword ptr [RBP + -0x80],XMM4 MOVAPS xmmword ptr [RBP + -0x70],XMM5 MOVAPS xmmword ptr [RBP + -0x60],XMM6 MOVAPS xmmword ptr [RBP + -0x50],XMM7 LAB_00150719: MOV qword ptr [RBP + -0x30],R15 LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0x38],RAX MOV R13,0x3000000010 MOV qword ptr [RBP + -0x40],R13 TEST RDI,RDI MOV R12,qword ptr [0x00483fb0] MOV RSI,qword ptr [R12] CMOVZ RBX,RSI CMP byte ptr [0x00cff780],0x0 JZ 0x00150768 MOV byte ptr [0x00cff780],0x0 MOV EDI,0xa CALL 0x001296d0 MOV RDI,qword ptr [R12] CALL 0x00129400 LAB_00150768: LEA RCX,[RBP + -0x40] MOV RDI,RBX MOV ESI,0x1 MOV RDX,R14 CALL 0x00129750 MOV EDI,0xa MOV RSI,RBX CALL 0x001296d0 CMP RBX,qword ptr [R12] JZ 0x001507b1 LEA RCX,[RBP + -0x40] MOV qword ptr [RCX + 0x10],R15 LEA RAX,[RBP + 0x10] MOV qword ptr [RCX + 0x8],RAX MOV qword ptr [RCX],R13 MOV EDI,0xae MOV RSI,R14 XOR EDX,EDX CALL 0x0019e3d8 LAB_001507b1: MOV RDI,RBX CALL 0x00129400 ADD RSP,0xc8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void eprint(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8,FILE *param_9 ,int8 param_10,int8 param_11,int8 param_12,int8 param_13, int8 param_14) { int *puVar1; char in_AL; int1 local_f8 [16]; int8 local_e8; int8 local_e0; int8 local_d8; int8 local_d0; int8 local_c8; int8 local_b8; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; int1 *local_40; int1 *local_38; puVar1 = PTR_stderr_00483fb0; if (in_AL != '\0') { local_c8 = param_1; local_b8 = param_2; local_a8 = param_3; local_98 = param_4; local_88 = param_5; local_78 = param_6; local_68 = param_7; local_58 = param_8; } local_40 = &stack0x00000008; local_48 = 0x3000000010; if (param_9 == (FILE *)0x0) { param_9 = *(FILE **)PTR_stderr_00483fb0; } local_e8 = param_11; local_e0 = param_12; local_d8 = param_13; local_d0 = param_14; local_38 = local_f8; if (procent_printed != '\0') { procent_printed = '\0'; fputc(10,*(FILE **)PTR_stderr_00483fb0); fflush(*(FILE **)puVar1); } __vfprintf_chk(param_9,1,param_10,&local_48); fputc(10,param_9); if (param_9 != *(FILE **)puVar1) { local_40 = &stack0x00000008; local_48 = 0x3000000010; local_38 = local_f8; my_printv_error(0xae,param_10,0); } fflush(param_9); return; }
20,493
FindPeaksCppTest_NoisySignal_Test::~FindPeaksCppTest_NoisySignal_Test()
giladroyz[P]FindPeaks/tests/test_find_peaks_cpp.cpp
TEST_F(FindPeaksCppTest, NoisySignal) { auto peaks = find_peaks(noisy_signal); // Verify that peaks are correctly identified in noisy signal ASSERT_GT(peaks.size(), 0); // Check if the highest peak is detected (index 8, value 3.2) bool found_max_peak = false; for (const auto& peak : peaks) { if (peak.peak == 8) { found_max_peak = true; EXPECT_DOUBLE_EQ(3.2, peak.peak_height); break; } } EXPECT_TRUE(found_max_peak); }
O3
cpp
FindPeaksCppTest_NoisySignal_Test::~FindPeaksCppTest_NoisySignal_Test(): pushq %rbx movq %rdi, %rbx callq 0xd92e movl $0x88, %esi movq %rbx, %rdi popq %rbx jmp 0x84e0 nop
_ZN33FindPeaksCppTest_NoisySignal_TestD0Ev: push rbx mov rbx, rdi call _ZN16FindPeaksCppTestD2Ev; FindPeaksCppTest::~FindPeaksCppTest() mov esi, 88h; unsigned __int64 mov rdi, rbx; void * pop rbx jmp __ZdlPvm; operator delete(void *,ulong)
void FindPeaksCppTest_NoisySignal_Test::~FindPeaksCppTest_NoisySignal_Test( FindPeaksCppTest_NoisySignal_Test *this) { FindPeaksCppTest::~FindPeaksCppTest(this); operator delete(this, 0x88uLL); }
~FindPeaksCppTest_NoisySignal_Test: PUSH RBX MOV RBX,RDI CALL 0x0010d92e MOV ESI,0x88 MOV RDI,RBX POP RBX JMP 0x001084e0
/* FindPeaksCppTest_NoisySignal_Test::~FindPeaksCppTest_NoisySignal_Test() */ void __thiscall FindPeaksCppTest_NoisySignal_Test::~FindPeaksCppTest_NoisySignal_Test (FindPeaksCppTest_NoisySignal_Test *this) { FindPeaksCppTest::~FindPeaksCppTest((FindPeaksCppTest *)this); operator_delete(this,0x88); return; }
20,494
LefDefParser::lefiGeometries::getLayer(int) const
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiMisc.cpp
char * lefiGeometries::getLayer(int index) const { char msg[160]; if (index < 0 || index >= numItems_) { sprintf(msg, "ERROR (LEFPARS-1365): The index number %d given for the geometry LAYER is invalid.\nValid index is from 0 to %d", index, numItems_); lefiError(0, 1365, msg); return 0; } return (char*) (items_[index]); }
O3
cpp
LefDefParser::lefiGeometries::getLayer(int) const: pushq %r14 pushq %rbx subq $0xa8, %rsp movl %esi, %edx testl %esi, %esi setns %al movl (%rdi), %ecx cmpl %esi, %ecx setg %sil testb %sil, %al je 0xc34e movq 0x10(%rdi), %rax movl %edx, %ecx movq (%rax,%rcx,8), %rbx jmp 0xc373 leaq 0x4d866(%rip), %rsi # 0x59bbb xorl %ebx, %ebx movq %rsp, %r14 movq %r14, %rdi xorl %eax, %eax callq 0x2050 xorl %edi, %edi movl $0x555, %esi # imm = 0x555 movq %r14, %rdx callq 0x33d78 movq %rbx, %rax addq $0xa8, %rsp popq %rbx popq %r14 retq nop
_ZNK12LefDefParser14lefiGeometries8getLayerEi: push r14 push rbx sub rsp, 0A8h mov edx, esi test esi, esi setns al mov ecx, [rdi] cmp ecx, esi setnle sil test al, sil jz short loc_C34E mov rax, [rdi+10h] mov ecx, edx mov rbx, [rax+rcx*8] jmp short loc_C373 loc_C34E: lea rsi, aErrorLefpars13_4; "ERROR (LEFPARS-1365): The index number "... xor ebx, ebx mov r14, rsp mov rdi, r14 xor eax, eax call _sprintf xor edi, edi; this mov esi, 555h; int mov rdx, r14; int call _ZN12LefDefParser9lefiErrorEiiPKc; LefDefParser::lefiError(int,int,char const*) loc_C373: mov rax, rbx add rsp, 0A8h pop rbx pop r14 retn
long long LefDefParser::lefiGeometries::getLayer(LefDefParser::lefiGeometries *this, unsigned int a2) { long long v2; // rbx const char *v3; // rcx _BYTE v5[184]; // [rsp+0h] [rbp-B8h] BYREF if ( *(_DWORD *)this > (int)a2 && (a2 & 0x80000000) == 0 ) return *(_QWORD *)(*((_QWORD *)this + 2) + 8LL * a2); v2 = 0LL; sprintf( v5, "ERROR (LEFPARS-1365): The index number %d given for the geometry LAYER is invalid.\nValid index is from 0 to %d", a2); LefDefParser::lefiError(0LL, 1365, (int)v5, v3); return v2; }
getLayer: PUSH R14 PUSH RBX SUB RSP,0xa8 MOV EDX,ESI TEST ESI,ESI SETNS AL MOV ECX,dword ptr [RDI] CMP ECX,ESI SETG SIL TEST AL,SIL JZ 0x0010c34e MOV RAX,qword ptr [RDI + 0x10] MOV ECX,EDX MOV RBX,qword ptr [RAX + RCX*0x8] JMP 0x0010c373 LAB_0010c34e: LEA RSI,[0x159bbb] XOR EBX,EBX MOV R14,RSP MOV RDI,R14 XOR EAX,EAX CALL 0x00102050 XOR EDI,EDI MOV ESI,0x555 MOV RDX,R14 CALL 0x00133d78 LAB_0010c373: MOV RAX,RBX ADD RSP,0xa8 POP RBX POP R14 RET
/* LefDefParser::lefiGeometries::getLayer(int) const */ int8 __thiscall LefDefParser::lefiGeometries::getLayer(lefiGeometries *this,int param_1) { int8 uVar1; char acStack_b8 [168]; if (param_1 < 0 || *(int *)this <= param_1) { uVar1 = 0; sprintf(acStack_b8, "ERROR (LEFPARS-1365): The index number %d given for the geometry LAYER is invalid.\nValid index is from 0 to %d" ); lefiError(0,0x555,acStack_b8); } else { uVar1 = *(int8 *)(*(long *)(this + 0x10) + (ulong)(uint)param_1 * 8); } return uVar1; }
20,495
JS_AddIntrinsicRegExp
bluesky950520[P]quickjs/quickjs.c
void JS_AddIntrinsicRegExp(JSContext *ctx) { JSValue obj; JS_AddIntrinsicRegExpCompiler(ctx); ctx->class_proto[JS_CLASS_REGEXP] = JS_NewObject(ctx); JS_SetPropertyFunctionList(ctx, ctx->class_proto[JS_CLASS_REGEXP], js_regexp_proto_funcs, countof(js_regexp_proto_funcs)); obj = JS_NewGlobalCConstructor(ctx, "RegExp", js_regexp_constructor, 2, ctx->class_proto[JS_CLASS_REGEXP]); ctx->regexp_ctor = js_dup(obj); JS_SetPropertyFunctionList(ctx, obj, js_regexp_funcs, countof(js_regexp_funcs)); ctx->class_proto[JS_CLASS_REGEXP_STRING_ITERATOR] = JS_NewObjectProto(ctx, ctx->class_proto[JS_CLASS_ITERATOR]); JS_SetPropertyFunctionList(ctx, ctx->class_proto[JS_CLASS_REGEXP_STRING_ITERATOR], js_regexp_string_iterator_proto_funcs, countof(js_regexp_string_iterator_proto_funcs)); }
O0
c
JS_AddIntrinsicRegExp: subq $0x78, %rsp movq %rdi, 0x70(%rsp) movq 0x70(%rsp), %rdi callq 0x4dd60 movq 0x70(%rsp), %rax movq 0x40(%rax), %rax movq %rax, 0x8(%rsp) movq 0x70(%rsp), %rdi callq 0x2a570 movq %rax, %rcx movq 0x8(%rsp), %rax movq %rcx, 0x50(%rsp) movq %rdx, 0x58(%rsp) movq 0x50(%rsp), %rcx movq %rcx, 0x120(%rax) movq 0x58(%rsp), %rcx movq %rcx, 0x128(%rax) movq 0x70(%rsp), %rdi movq 0x70(%rsp), %rax movq 0x40(%rax), %rax movq 0x120(%rax), %rsi movq 0x128(%rax), %rdx leaq 0x10bc98(%rip), %rcx # 0x131d60 movl $0x13, %r8d callq 0x4cb00 movq 0x70(%rsp), %rdi movq 0x70(%rsp), %rax movq 0x40(%rax), %rax movq 0x120(%rax), %r8 movq 0x128(%rax), %r9 leaq 0xe7d3b(%rip), %rsi # 0x10de31 leaq 0x28103(%rip), %rdx # 0x4e200 movl $0x2, %ecx callq 0x4e170 movq %rax, 0x40(%rsp) movq %rdx, 0x48(%rsp) movq 0x40(%rsp), %rax movq %rax, 0x60(%rsp) movq 0x48(%rsp), %rax movq %rax, 0x68(%rsp) movq 0x70(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x60(%rsp), %rdi movq 0x68(%rsp), %rsi callq 0x216d0 movq %rax, %rcx movq 0x10(%rsp), %rax movq %rcx, 0x30(%rsp) movq %rdx, 0x38(%rsp) movq 0x30(%rsp), %rcx movq %rcx, 0x78(%rax) movq 0x38(%rsp), %rcx movq %rcx, 0x80(%rax) movq 0x70(%rsp), %rdi movq 0x60(%rsp), %rsi movq 0x68(%rsp), %rdx leaq 0x10be45(%rip), %rcx # 0x131fc0 movl $0x2, %r8d callq 0x4cb00 movq 0x70(%rsp), %rax movq 0x40(%rax), %rax movq %rax, 0x18(%rsp) movq 0x70(%rsp), %rdi movq 0x70(%rsp), %rax movq 0x40(%rax), %rax movq 0x270(%rax), %rsi movq 0x278(%rax), %rdx callq 0x2a4d0 movq %rax, %rcx movq 0x18(%rsp), %rax movq %rcx, 0x20(%rsp) movq %rdx, 0x28(%rsp) movq 0x20(%rsp), %rcx movq %rcx, 0x2e0(%rax) movq 0x28(%rsp), %rcx movq %rcx, 0x2e8(%rax) movq 0x70(%rsp), %rdi movq 0x70(%rsp), %rax movq 0x40(%rax), %rax movq 0x2e0(%rax), %rsi movq 0x2e8(%rax), %rdx leaq 0x10bdfe(%rip), %rcx # 0x132000 movl $0x2, %r8d callq 0x4cb00 addq $0x78, %rsp retq nopw %cs:(%rax,%rax)
JS_AddIntrinsicRegExp: sub rsp, 78h mov [rsp+78h+var_8], rdi mov rdi, [rsp+78h+var_8] call JS_AddIntrinsicRegExpCompiler mov rax, [rsp+78h+var_8] mov rax, [rax+40h] mov [rsp+78h+var_70], rax mov rdi, [rsp+78h+var_8] call JS_NewObject mov rcx, rax mov rax, [rsp+78h+var_70] mov [rsp+78h+var_28], rcx mov [rsp+78h+var_20], rdx mov rcx, [rsp+78h+var_28] mov [rax+120h], rcx mov rcx, [rsp+78h+var_20] mov [rax+128h], rcx mov rdi, [rsp+78h+var_8] mov rax, [rsp+78h+var_8] mov rax, [rax+40h] mov rsi, [rax+120h] mov rdx, [rax+128h] lea rcx, js_regexp_proto_funcs mov r8d, 13h call JS_SetPropertyFunctionList mov rdi, [rsp+78h+var_8] mov rax, [rsp+78h+var_8] mov rax, [rax+40h] mov r8, [rax+120h] mov r9, [rax+128h] lea rsi, aRegexp; "RegExp" lea rdx, js_regexp_constructor mov ecx, 2 call JS_NewGlobalCConstructor mov [rsp+78h+var_38], rax mov [rsp+78h+var_30], rdx mov rax, [rsp+78h+var_38] mov [rsp+78h+var_18], rax mov rax, [rsp+78h+var_30] mov [rsp+78h+var_10], rax mov rax, [rsp+78h+var_8] mov [rsp+78h+var_68], rax mov rdi, [rsp+78h+var_18] mov rsi, [rsp+78h+var_10] call js_dup mov rcx, rax mov rax, [rsp+78h+var_68] mov [rsp+78h+var_48], rcx mov [rsp+78h+var_40], rdx mov rcx, [rsp+78h+var_48] mov [rax+78h], rcx mov rcx, [rsp+78h+var_40] mov [rax+80h], rcx mov rdi, [rsp+78h+var_8] mov rsi, [rsp+78h+var_18] mov rdx, [rsp+78h+var_10] lea rcx, js_regexp_funcs mov r8d, 2 call JS_SetPropertyFunctionList mov rax, [rsp+78h+var_8] mov rax, [rax+40h] mov [rsp+78h+var_60], rax mov rdi, [rsp+78h+var_8] mov rax, [rsp+78h+var_8] mov rax, [rax+40h] mov rsi, [rax+270h] mov rdx, [rax+278h] call JS_NewObjectProto mov rcx, rax mov rax, [rsp+78h+var_60] mov [rsp+78h+var_58], rcx mov [rsp+78h+var_50], rdx mov rcx, [rsp+78h+var_58] mov [rax+2E0h], rcx mov rcx, [rsp+78h+var_50] mov [rax+2E8h], rcx mov rdi, [rsp+78h+var_8] mov rax, [rsp+78h+var_8] mov rax, [rax+40h] mov rsi, [rax+2E0h] mov rdx, [rax+2E8h] lea rcx, js_regexp_string_iterator_proto_funcs mov r8d, 2 call JS_SetPropertyFunctionList add rsp, 78h retn
long long JS_AddIntrinsicRegExp(_QWORD *a1) { long long v1; // rdx long long v2; // rdx long long v3; // rdx long long v4; // rdx long long v6; // [rsp+8h] [rbp-70h] _QWORD *v7; // [rsp+18h] [rbp-60h] _DWORD *v8; // [rsp+40h] [rbp-38h] long long v9; // [rsp+68h] [rbp-10h] JS_AddIntrinsicRegExpCompiler(a1); v6 = a1[8]; *(_QWORD *)(v6 + 288) = JS_NewObject(a1); *(_QWORD *)(v6 + 296) = v1; JS_SetPropertyFunctionList(a1, *(_QWORD *)(a1[8] + 288LL), *(_QWORD *)(a1[8] + 296LL), &js_regexp_proto_funcs, 19LL); v8 = (_DWORD *)JS_NewGlobalCConstructor( a1, "RegExp", js_regexp_constructor, 2LL, *(_QWORD *)(a1[8] + 288LL), *(_QWORD *)(a1[8] + 296LL)); v9 = v2; a1[15] = js_dup(v8, v2); a1[16] = v3; JS_SetPropertyFunctionList(a1, v8, v9, &js_regexp_funcs, 2LL); v7 = (_QWORD *)a1[8]; v7[92] = JS_NewObjectProto(a1, v7[78], v7[79]); v7[93] = v4; return JS_SetPropertyFunctionList( a1, *(_QWORD *)(a1[8] + 736LL), *(_QWORD *)(a1[8] + 744LL), &js_regexp_string_iterator_proto_funcs, 2LL); }
JS_AddIntrinsicRegExp: SUB RSP,0x78 MOV qword ptr [RSP + 0x70],RDI MOV RDI,qword ptr [RSP + 0x70] CALL 0x0014dd60 MOV RAX,qword ptr [RSP + 0x70] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x70] CALL 0x0012a570 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x50],RCX MOV qword ptr [RSP + 0x58],RDX MOV RCX,qword ptr [RSP + 0x50] MOV qword ptr [RAX + 0x120],RCX MOV RCX,qword ptr [RSP + 0x58] MOV qword ptr [RAX + 0x128],RCX MOV RDI,qword ptr [RSP + 0x70] MOV RAX,qword ptr [RSP + 0x70] MOV RAX,qword ptr [RAX + 0x40] MOV RSI,qword ptr [RAX + 0x120] MOV RDX,qword ptr [RAX + 0x128] LEA RCX,[0x231d60] MOV R8D,0x13 CALL 0x0014cb00 MOV RDI,qword ptr [RSP + 0x70] MOV RAX,qword ptr [RSP + 0x70] MOV RAX,qword ptr [RAX + 0x40] MOV R8,qword ptr [RAX + 0x120] MOV R9,qword ptr [RAX + 0x128] LEA RSI,[0x20de31] LEA RDX,[0x14e200] MOV ECX,0x2 CALL 0x0014e170 MOV qword ptr [RSP + 0x40],RAX MOV qword ptr [RSP + 0x48],RDX MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x60],RAX MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x68],RAX MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x10],RAX MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x68] CALL 0x001216d0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x30],RCX MOV qword ptr [RSP + 0x38],RDX MOV RCX,qword ptr [RSP + 0x30] MOV qword ptr [RAX + 0x78],RCX MOV RCX,qword ptr [RSP + 0x38] MOV qword ptr [RAX + 0x80],RCX MOV RDI,qword ptr [RSP + 0x70] MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x68] LEA RCX,[0x231fc0] MOV R8D,0x2 CALL 0x0014cb00 MOV RAX,qword ptr [RSP + 0x70] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RSP + 0x18],RAX MOV RDI,qword ptr [RSP + 0x70] MOV RAX,qword ptr [RSP + 0x70] MOV RAX,qword ptr [RAX + 0x40] MOV RSI,qword ptr [RAX + 0x270] MOV RDX,qword ptr [RAX + 0x278] CALL 0x0012a4d0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x20],RCX MOV qword ptr [RSP + 0x28],RDX MOV RCX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x2e0],RCX MOV RCX,qword ptr [RSP + 0x28] MOV qword ptr [RAX + 0x2e8],RCX MOV RDI,qword ptr [RSP + 0x70] MOV RAX,qword ptr [RSP + 0x70] MOV RAX,qword ptr [RAX + 0x40] MOV RSI,qword ptr [RAX + 0x2e0] MOV RDX,qword ptr [RAX + 0x2e8] LEA RCX,[0x232000] MOV R8D,0x2 CALL 0x0014cb00 ADD RSP,0x78 RET
void JS_AddIntrinsicRegExp(long param_1) { long lVar1; int1 auVar2 [16]; int1 auVar3 [16]; JS_AddIntrinsicRegExpCompiler(param_1); lVar1 = *(long *)(param_1 + 0x40); auVar2 = JS_NewObject(param_1); *(int1 (*) [16])(lVar1 + 0x120) = auVar2; JS_SetPropertyFunctionList (param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x120), *(int8 *)(*(long *)(param_1 + 0x40) + 0x128),js_regexp_proto_funcs,0x13); auVar2 = JS_NewGlobalCConstructor (param_1,"RegExp",js_regexp_constructor,2, *(int8 *)(*(long *)(param_1 + 0x40) + 0x120), *(int8 *)(*(long *)(param_1 + 0x40) + 0x128)); auVar3 = js_dup(auVar2._0_8_,auVar2._8_8_); *(int1 (*) [16])(param_1 + 0x78) = auVar3; JS_SetPropertyFunctionList(param_1,auVar2._0_8_,auVar2._8_8_,js_regexp_funcs,2); lVar1 = *(long *)(param_1 + 0x40); auVar2 = JS_NewObjectProto(param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x270), *(int8 *)(*(long *)(param_1 + 0x40) + 0x278)); *(int1 (*) [16])(lVar1 + 0x2e0) = auVar2; JS_SetPropertyFunctionList (param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x2e0), *(int8 *)(*(long *)(param_1 + 0x40) + 0x2e8), js_regexp_string_iterator_proto_funcs,2); return; }
20,496
JS_AddIntrinsicRegExp
bluesky950520[P]quickjs/quickjs.c
void JS_AddIntrinsicRegExp(JSContext *ctx) { JSValue obj; JS_AddIntrinsicRegExpCompiler(ctx); ctx->class_proto[JS_CLASS_REGEXP] = JS_NewObject(ctx); JS_SetPropertyFunctionList(ctx, ctx->class_proto[JS_CLASS_REGEXP], js_regexp_proto_funcs, countof(js_regexp_proto_funcs)); obj = JS_NewGlobalCConstructor(ctx, "RegExp", js_regexp_constructor, 2, ctx->class_proto[JS_CLASS_REGEXP]); ctx->regexp_ctor = js_dup(obj); JS_SetPropertyFunctionList(ctx, obj, js_regexp_funcs, countof(js_regexp_funcs)); ctx->class_proto[JS_CLASS_REGEXP_STRING_ITERATOR] = JS_NewObjectProto(ctx, ctx->class_proto[JS_CLASS_ITERATOR]); JS_SetPropertyFunctionList(ctx, ctx->class_proto[JS_CLASS_REGEXP_STRING_ITERATOR], js_regexp_string_iterator_proto_funcs, countof(js_regexp_string_iterator_proto_funcs)); }
O1
c
JS_AddIntrinsicRegExp: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx leaq 0x14be0(%rip), %rax # 0x33562 movq %rax, 0x1f0(%rdi) movq 0x40(%rdi), %r14 movq 0x10(%r14), %rsi movq 0x18(%r14), %rdx movl $0x1, %ecx callq 0x20f05 movq %rax, 0x120(%r14) movq %rdx, 0x128(%r14) movq 0x40(%rbx), %rax movq 0x120(%rax), %rsi movq 0x128(%rax), %rdx leaq 0xaa2ba(%rip), %rcx # 0xc8c80 movq %rbx, %rdi movl $0x13, %r8d callq 0x32c67 movq 0x40(%rbx), %rax movq 0x120(%rax), %r12 movq 0x128(%rax), %r13 movups 0x48(%rbx), %xmm0 movups %xmm0, (%rsp) leaq 0x14e01(%rip), %rsi # 0x337f6 leaq 0x803d1(%rip), %rbp # 0x9edcd movq %rbx, %rdi movq %rbp, %rdx movl $0x2, %ecx movl $0x4, %r8d xorl %r9d, %r9d callq 0x21006 movq %rax, %r14 movq %rdx, %r15 movq %rbx, %rdi movq %rax, %rsi movq %rbp, %rcx movq %r12, %r8 movq %r13, %r9 callq 0x361aa movq %r14, 0x10(%rsp) cmpl $-0x9, %r15d jb 0x1ea41 movq 0x10(%rsp), %rax incl (%rax) movq %r14, 0x78(%rbx) movq %r15, 0x80(%rbx) leaq 0xaa48d(%rip), %rcx # 0xc8ee0 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx movl $0x2, %r8d callq 0x32c67 movq 0x40(%rbx), %r14 movq 0x270(%r14), %rsi movq 0x278(%r14), %rdx movq %rbx, %rdi movl $0x1, %ecx callq 0x20f05 movq %rax, 0x2e0(%r14) movq %rdx, 0x2e8(%r14) movq 0x40(%rbx), %rax movq 0x2e0(%rax), %rsi movq 0x2e8(%rax), %rdx leaq 0xaa473(%rip), %rcx # 0xc8f20 movq %rbx, %rdi movl $0x2, %r8d addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x32c67
JS_AddIntrinsicRegExp: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rdi lea rax, js_compile_regexp mov [rdi+1F0h], rax mov r14, [rdi+40h] mov rsi, [r14+10h] mov rdx, [r14+18h] mov ecx, 1 call JS_NewObjectProtoClass mov [r14+120h], rax mov [r14+128h], rdx mov rax, [rbx+40h] mov rsi, [rax+120h] mov rdx, [rax+128h] lea rcx, js_regexp_proto_funcs mov rdi, rbx mov r8d, 13h call JS_SetPropertyFunctionList mov rax, [rbx+40h] mov r12, [rax+120h] mov r13, [rax+128h] movups xmm0, xmmword ptr [rbx+48h] movups [rsp+48h+var_48], xmm0 lea rsi, js_regexp_constructor lea rbp, aRegexp; "RegExp" mov rdi, rbx mov rdx, rbp mov ecx, 2 mov r8d, 4 xor r9d, r9d call JS_NewCFunction3 mov r14, rax mov r15, rdx mov rdi, rbx mov rsi, rax mov rcx, rbp mov r8, r12 mov r9, r13 call JS_NewGlobalCConstructor2 mov [rsp+48h+var_38], r14 cmp r15d, 0FFFFFFF7h jb short loc_1EA41 mov rax, [rsp+48h+var_38] inc dword ptr [rax] loc_1EA41: mov [rbx+78h], r14 mov [rbx+80h], r15 lea rcx, js_regexp_funcs mov rdi, rbx mov rsi, r14 mov rdx, r15 mov r8d, 2 call JS_SetPropertyFunctionList mov r14, [rbx+40h] mov rsi, [r14+270h] mov rdx, [r14+278h] mov rdi, rbx mov ecx, 1 call JS_NewObjectProtoClass mov [r14+2E0h], rax mov [r14+2E8h], rdx mov rax, [rbx+40h] mov rsi, [rax+2E0h] mov rdx, [rax+2E8h] lea rcx, js_regexp_string_iterator_proto_funcs mov rdi, rbx mov r8d, 2 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp JS_SetPropertyFunctionList
long long JS_AddIntrinsicRegExp(_QWORD *a1) { _QWORD *v1; // r14 long long v2; // rdx long long v3; // rax long long v4; // r12 long long v5; // r13 _DWORD *v6; // r14 long long v7; // rdx long long v8; // r15 _QWORD *v9; // r14 long long v10; // rdx a1[62] = js_compile_regexp; v1 = (_QWORD *)a1[8]; v1[36] = JS_NewObjectProtoClass(a1, v1[2], v1[3], 1LL); v1[37] = v2; JS_SetPropertyFunctionList(a1, *(_QWORD *)(a1[8] + 288LL), *(_QWORD *)(a1[8] + 296LL), &js_regexp_proto_funcs, 19LL); v3 = a1[8]; v4 = *(_QWORD *)(v3 + 288); v5 = *(_QWORD *)(v3 + 296); v6 = (_DWORD *)JS_NewCFunction3( (_DWORD)a1, (unsigned int)js_regexp_constructor, (unsigned int)"RegExp", 2, 4, 0, a1[9], a1[10]); v8 = v7; JS_NewGlobalCConstructor2(a1, v6, v7, "RegExp", v4, v5); if ( (unsigned int)v8 >= 0xFFFFFFF7 ) ++*v6; a1[15] = v6; a1[16] = v8; JS_SetPropertyFunctionList(a1, v6, v8, &js_regexp_funcs, 2LL); v9 = (_QWORD *)a1[8]; v9[92] = JS_NewObjectProtoClass(a1, v9[78], v9[79], 1LL); v9[93] = v10; return JS_SetPropertyFunctionList( a1, *(_QWORD *)(a1[8] + 736LL), *(_QWORD *)(a1[8] + 744LL), &js_regexp_string_iterator_proto_funcs, 2LL); }
JS_AddIntrinsicRegExp: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDI LEA RAX,[0x133562] MOV qword ptr [RDI + 0x1f0],RAX MOV R14,qword ptr [RDI + 0x40] MOV RSI,qword ptr [R14 + 0x10] MOV RDX,qword ptr [R14 + 0x18] MOV ECX,0x1 CALL 0x00120f05 MOV qword ptr [R14 + 0x120],RAX MOV qword ptr [R14 + 0x128],RDX MOV RAX,qword ptr [RBX + 0x40] MOV RSI,qword ptr [RAX + 0x120] MOV RDX,qword ptr [RAX + 0x128] LEA RCX,[0x1c8c80] MOV RDI,RBX MOV R8D,0x13 CALL 0x00132c67 MOV RAX,qword ptr [RBX + 0x40] MOV R12,qword ptr [RAX + 0x120] MOV R13,qword ptr [RAX + 0x128] MOVUPS XMM0,xmmword ptr [RBX + 0x48] MOVUPS xmmword ptr [RSP],XMM0 LEA RSI,[0x1337f6] LEA RBP,[0x19edcd] MOV RDI,RBX MOV RDX,RBP MOV ECX,0x2 MOV R8D,0x4 XOR R9D,R9D CALL 0x00121006 MOV R14,RAX MOV R15,RDX MOV RDI,RBX MOV RSI,RAX MOV RCX,RBP MOV R8,R12 MOV R9,R13 CALL 0x001361aa MOV qword ptr [RSP + 0x10],R14 CMP R15D,-0x9 JC 0x0011ea41 MOV RAX,qword ptr [RSP + 0x10] INC dword ptr [RAX] LAB_0011ea41: MOV qword ptr [RBX + 0x78],R14 MOV qword ptr [RBX + 0x80],R15 LEA RCX,[0x1c8ee0] MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 MOV R8D,0x2 CALL 0x00132c67 MOV R14,qword ptr [RBX + 0x40] MOV RSI,qword ptr [R14 + 0x270] MOV RDX,qword ptr [R14 + 0x278] MOV RDI,RBX MOV ECX,0x1 CALL 0x00120f05 MOV qword ptr [R14 + 0x2e0],RAX MOV qword ptr [R14 + 0x2e8],RDX MOV RAX,qword ptr [RBX + 0x40] MOV RSI,qword ptr [RAX + 0x2e0] MOV RDX,qword ptr [RAX + 0x2e8] LEA RCX,[0x1c8f20] MOV RDI,RBX MOV R8D,0x2 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00132c67
void JS_AddIntrinsicRegExp(long param_1) { long lVar1; int8 uVar2; int8 uVar3; int *piVar4; int1 auVar5 [16]; *(code **)(param_1 + 0x1f0) = js_compile_regexp; lVar1 = *(long *)(param_1 + 0x40); auVar5 = JS_NewObjectProtoClass (param_1,*(int8 *)(lVar1 + 0x10),*(int8 *)(lVar1 + 0x18),1); *(int1 (*) [16])(lVar1 + 0x120) = auVar5; JS_SetPropertyFunctionList (param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x120), *(int8 *)(*(long *)(param_1 + 0x40) + 0x128),js_regexp_proto_funcs,0x13); uVar2 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x120); uVar3 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x128); auVar5 = JS_NewCFunction3(param_1,js_regexp_constructor,"RegExp",2,4,0, *(int4 *)(param_1 + 0x48),*(int4 *)(param_1 + 0x50)); piVar4 = auVar5._0_8_; JS_NewGlobalCConstructor2(param_1,piVar4,auVar5._8_8_,"RegExp",uVar2,uVar3); if (0xfffffff6 < auVar5._8_4_) { *piVar4 = *piVar4 + 1; } *(int1 (*) [16])(param_1 + 0x78) = auVar5; JS_SetPropertyFunctionList(param_1,piVar4,auVar5._8_8_,js_regexp_funcs,2); lVar1 = *(long *)(param_1 + 0x40); auVar5 = JS_NewObjectProtoClass (param_1,*(int8 *)(lVar1 + 0x270),*(int8 *)(lVar1 + 0x278),1); *(int1 (*) [16])(lVar1 + 0x2e0) = auVar5; JS_SetPropertyFunctionList (param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x2e0), *(int8 *)(*(long *)(param_1 + 0x40) + 0x2e8), js_regexp_string_iterator_proto_funcs,2); return; }
20,497
JS_AddIntrinsicRegExp
bluesky950520[P]quickjs/quickjs.c
void JS_AddIntrinsicRegExp(JSContext *ctx) { JSValue obj; JS_AddIntrinsicRegExpCompiler(ctx); ctx->class_proto[JS_CLASS_REGEXP] = JS_NewObject(ctx); JS_SetPropertyFunctionList(ctx, ctx->class_proto[JS_CLASS_REGEXP], js_regexp_proto_funcs, countof(js_regexp_proto_funcs)); obj = JS_NewGlobalCConstructor(ctx, "RegExp", js_regexp_constructor, 2, ctx->class_proto[JS_CLASS_REGEXP]); ctx->regexp_ctor = js_dup(obj); JS_SetPropertyFunctionList(ctx, obj, js_regexp_funcs, countof(js_regexp_funcs)); ctx->class_proto[JS_CLASS_REGEXP_STRING_ITERATOR] = JS_NewObjectProto(ctx, ctx->class_proto[JS_CLASS_ITERATOR]); JS_SetPropertyFunctionList(ctx, ctx->class_proto[JS_CLASS_REGEXP_STRING_ITERATOR], js_regexp_string_iterator_proto_funcs, countof(js_regexp_string_iterator_proto_funcs)); }
O2
c
JS_AddIntrinsicRegExp: pushq %rbp pushq %r14 pushq %rbx movq %rdi, %rbx leaq 0x139f4(%rip), %rax # 0x2cbbd movq %rax, 0x1f0(%rdi) movq 0x40(%rdi), %r14 callq 0x1b2c9 movq %rax, 0x120(%r14) movq %rdx, 0x128(%r14) movq 0x40(%rbx), %rax movq 0x120(%rax), %rsi movq 0x128(%rax), %rdx leaq 0x9da80(%rip), %rcx # 0xb6c80 pushq $0x13 popq %r8 movq %rbx, %rdi callq 0x2c3ff movq 0x40(%rbx), %rax movq 0x120(%rax), %r8 movq 0x128(%rax), %r9 leaq 0x6caf8(%rip), %rsi # 0x85d1d leaq 0x13bb8(%rip), %rdx # 0x2cde4 pushq $0x2 popq %rcx movq %rbx, %rdi callq 0x2cd8c cmpl $-0x9, %edx jb 0x1923e incl (%rax) movq %rax, 0x78(%rbx) movq %rdx, 0x80(%rbx) leaq 0x9dc90(%rip), %rcx # 0xb6ee0 pushq $0x2 popq %rbp movq %rbx, %rdi movq %rax, %rsi movl %ebp, %r8d callq 0x2c3ff movq 0x40(%rbx), %r14 movq 0x270(%r14), %rsi movq 0x278(%r14), %rdx movq %rbx, %rdi callq 0x1b2b3 movq %rax, 0x2e0(%r14) movq %rdx, 0x2e8(%r14) movq 0x40(%rbx), %rax movq 0x2e0(%rax), %rsi movq 0x2e8(%rax), %rdx leaq 0x9dc7e(%rip), %rcx # 0xb6f20 movq %rbx, %rdi movl %ebp, %r8d popq %rbx popq %r14 popq %rbp jmp 0x2c3ff
JS_AddIntrinsicRegExp: push rbp push r14 push rbx mov rbx, rdi lea rax, js_compile_regexp mov [rdi+1F0h], rax mov r14, [rdi+40h] call JS_NewObject mov [r14+120h], rax mov [r14+128h], rdx mov rax, [rbx+40h] mov rsi, [rax+120h] mov rdx, [rax+128h] lea rcx, js_regexp_proto_funcs push 13h pop r8 mov rdi, rbx call JS_SetPropertyFunctionList mov rax, [rbx+40h] mov r8, [rax+120h] mov r9, [rax+128h] lea rsi, aRegexp; "RegExp" lea rdx, js_regexp_constructor push 2 pop rcx mov rdi, rbx call JS_NewGlobalCConstructor cmp edx, 0FFFFFFF7h jb short loc_1923E inc dword ptr [rax] loc_1923E: mov [rbx+78h], rax mov [rbx+80h], rdx lea rcx, js_regexp_funcs push 2 pop rbp mov rdi, rbx mov rsi, rax mov r8d, ebp call JS_SetPropertyFunctionList mov r14, [rbx+40h] mov rsi, [r14+270h] mov rdx, [r14+278h] mov rdi, rbx call JS_NewObjectProto mov [r14+2E0h], rax mov [r14+2E8h], rdx mov rax, [rbx+40h] mov rsi, [rax+2E0h] mov rdx, [rax+2E8h] lea rcx, js_regexp_string_iterator_proto_funcs mov rdi, rbx mov r8d, ebp pop rbx pop r14 pop rbp jmp JS_SetPropertyFunctionList
long long JS_AddIntrinsicRegExp(_QWORD *a1) { long long v1; // r14 long long v2; // rdx _DWORD *v3; // rax long long v4; // rdx _QWORD *v5; // r14 long long v6; // rdx a1[62] = js_compile_regexp; v1 = a1[8]; *(_QWORD *)(v1 + 288) = JS_NewObject(a1); *(_QWORD *)(v1 + 296) = v2; JS_SetPropertyFunctionList(a1, *(_QWORD *)(a1[8] + 288LL), *(_QWORD *)(a1[8] + 296LL), &js_regexp_proto_funcs, 19LL); v3 = (_DWORD *)JS_NewGlobalCConstructor( a1, "RegExp", js_regexp_constructor, 2LL, *(_QWORD *)(a1[8] + 288LL), *(_QWORD *)(a1[8] + 296LL)); if ( (unsigned int)v4 >= 0xFFFFFFF7 ) ++*v3; a1[15] = v3; a1[16] = v4; JS_SetPropertyFunctionList(a1, v3, v4, &js_regexp_funcs, 2LL); v5 = (_QWORD *)a1[8]; v5[92] = JS_NewObjectProto(a1, v5[78]); v5[93] = v6; return JS_SetPropertyFunctionList( a1, *(_QWORD *)(a1[8] + 736LL), *(_QWORD *)(a1[8] + 744LL), &js_regexp_string_iterator_proto_funcs, 2LL); }
JS_AddIntrinsicRegExp: PUSH RBP PUSH R14 PUSH RBX MOV RBX,RDI LEA RAX,[0x12cbbd] MOV qword ptr [RDI + 0x1f0],RAX MOV R14,qword ptr [RDI + 0x40] CALL 0x0011b2c9 MOV qword ptr [R14 + 0x120],RAX MOV qword ptr [R14 + 0x128],RDX MOV RAX,qword ptr [RBX + 0x40] MOV RSI,qword ptr [RAX + 0x120] MOV RDX,qword ptr [RAX + 0x128] LEA RCX,[0x1b6c80] PUSH 0x13 POP R8 MOV RDI,RBX CALL 0x0012c3ff MOV RAX,qword ptr [RBX + 0x40] MOV R8,qword ptr [RAX + 0x120] MOV R9,qword ptr [RAX + 0x128] LEA RSI,[0x185d1d] LEA RDX,[0x12cde4] PUSH 0x2 POP RCX MOV RDI,RBX CALL 0x0012cd8c CMP EDX,-0x9 JC 0x0011923e INC dword ptr [RAX] LAB_0011923e: MOV qword ptr [RBX + 0x78],RAX MOV qword ptr [RBX + 0x80],RDX LEA RCX,[0x1b6ee0] PUSH 0x2 POP RBP MOV RDI,RBX MOV RSI,RAX MOV R8D,EBP CALL 0x0012c3ff MOV R14,qword ptr [RBX + 0x40] MOV RSI,qword ptr [R14 + 0x270] MOV RDX,qword ptr [R14 + 0x278] MOV RDI,RBX CALL 0x0011b2b3 MOV qword ptr [R14 + 0x2e0],RAX MOV qword ptr [R14 + 0x2e8],RDX MOV RAX,qword ptr [RBX + 0x40] MOV RSI,qword ptr [RAX + 0x2e0] MOV RDX,qword ptr [RAX + 0x2e8] LEA RCX,[0x1b6f20] MOV RDI,RBX MOV R8D,EBP POP RBX POP R14 POP RBP JMP 0x0012c3ff
void JS_AddIntrinsicRegExp(long param_1) { long lVar1; int *piVar2; int1 auVar3 [16]; *(code **)(param_1 + 0x1f0) = js_compile_regexp; lVar1 = *(long *)(param_1 + 0x40); auVar3 = JS_NewObject(); *(int1 (*) [16])(lVar1 + 0x120) = auVar3; JS_SetPropertyFunctionList (param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x120), *(int8 *)(*(long *)(param_1 + 0x40) + 0x128),js_regexp_proto_funcs,0x13); auVar3 = JS_NewGlobalCConstructor (param_1,"RegExp",js_regexp_constructor,2, *(int8 *)(*(long *)(param_1 + 0x40) + 0x120), *(int8 *)(*(long *)(param_1 + 0x40) + 0x128)); piVar2 = auVar3._0_8_; if (0xfffffff6 < auVar3._8_4_) { *piVar2 = *piVar2 + 1; } *(int1 (*) [16])(param_1 + 0x78) = auVar3; JS_SetPropertyFunctionList(param_1,piVar2,auVar3._8_8_,js_regexp_funcs,2); lVar1 = *(long *)(param_1 + 0x40); auVar3 = JS_NewObjectProto(param_1,*(int8 *)(lVar1 + 0x270),*(int8 *)(lVar1 + 0x278)); *(int1 (*) [16])(lVar1 + 0x2e0) = auVar3; JS_SetPropertyFunctionList (param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x2e0), *(int8 *)(*(long *)(param_1 + 0x40) + 0x2e8), js_regexp_string_iterator_proto_funcs,2); return; }
20,498
common_chat_templates_from_model(llama_model const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/common.cpp
common_chat_templates common_chat_templates_from_model(const struct llama_model * model, const std::string & chat_template_override) { auto vocab = llama_model_get_vocab(model); std::string default_template_src = chat_template_override; std::string template_tool_use_src = chat_template_override; bool has_explicit_template = !chat_template_override.empty(); if (chat_template_override.empty()) { auto str = llama_model_chat_template(model, /* name */ nullptr); if (str) { default_template_src = str; has_explicit_template = true; } str = llama_model_chat_template(model, /* name */ "tool_use"); if (str) { template_tool_use_src = str; has_explicit_template = true; } } if (default_template_src.empty() || default_template_src == "chatml") { if (!template_tool_use_src.empty()) { default_template_src = template_tool_use_src; } else { default_template_src = R"( {%- for message in messages -%} {{- "<|im_start|>" + message.role + "\n" + message.content + "<|im_end|>\n" -}} {%- endfor -%} {%- if add_generation_prompt -%} {{- "<|im_start|>assistant\n" -}} {%- endif -%} )"; } } const auto get_token = [&](llama_token token, const char * name, const char * jinja_variable_name) { if (token == LLAMA_TOKEN_NULL) { if (default_template_src.find(jinja_variable_name) != std::string::npos || template_tool_use_src.find(jinja_variable_name) != std::string::npos) { LOG_WRN("%s: warning: vocab does not have a %s token, jinja template won't work as intended.\n", __func__, name); } return std::string(); } else { return common_token_to_piece(vocab, token, true); } }; auto token_bos = get_token(llama_vocab_bos(vocab), "BOS", "bos_token"); auto token_eos = get_token(llama_vocab_eos(vocab), "EOS", "eos_token"); return { has_explicit_template, std::make_unique<minja::chat_template>(default_template_src, token_bos, token_eos), template_tool_use_src.empty() ? nullptr : std::make_unique<minja::chat_template>(template_tool_use_src, token_bos, token_eos) }; }
O0
cpp
common_chat_templates_from_model(llama_model const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): subq $0x118, %rsp # imm = 0x118 movq %rdi, 0x38(%rsp) movq %rdi, %rax movq %rax, 0x40(%rsp) movq %rdi, 0x110(%rsp) movq %rsi, 0x108(%rsp) movq %rdx, 0x100(%rsp) movq 0x108(%rsp), %rdi callq 0x5b200 movq %rax, 0xf8(%rsp) movq 0x100(%rsp), %rsi leaq 0xd8(%rsp), %rdi callq 0x5a210 movq 0x100(%rsp), %rsi leaq 0xb8(%rsp), %rdi callq 0x5a210 jmp 0xf32dd movq 0x100(%rsp), %rdi callq 0x5a4f0 xorb $-0x1, %al andb $0x1, %al movb %al, 0xab(%rsp) movq 0x100(%rsp), %rdi callq 0x5a4f0 testb $0x1, %al jne 0xf330b jmp 0xf33e2 movq 0x108(%rsp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x5adc0 movq %rax, 0x30(%rsp) jmp 0xf3323 movq 0x30(%rsp), %rax movq %rax, 0xa0(%rsp) cmpq $0x0, 0xa0(%rsp) je 0xf338e movq 0xa0(%rsp), %rsi leaq 0xd8(%rsp), %rdi callq 0x5a6e0 jmp 0xf3352 movb $0x1, 0xab(%rsp) jmp 0xf338e movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb0(%rsp) movl %eax, 0xac(%rsp) jmp 0xf3626 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb0(%rsp) movl %eax, 0xac(%rsp) jmp 0xf3619 movq 0x108(%rsp), %rdi leaq 0x11c940(%rip), %rsi # 0x20fcdd callq 0x5adc0 movq %rax, 0x28(%rsp) jmp 0xf33a9 movq 0x28(%rsp), %rax movq %rax, 0xa0(%rsp) cmpq $0x0, 0xa0(%rsp) je 0xf33e0 movq 0xa0(%rsp), %rsi leaq 0xb8(%rsp), %rdi callq 0x5a6e0 jmp 0xf33d8 movb $0x1, 0xab(%rsp) jmp 0xf33e2 leaq 0xd8(%rsp), %rdi callq 0x5a4f0 testb $0x1, %al jne 0xf3417 leaq 0x11c8ec(%rip), %rsi # 0x20fce6 leaq 0xd8(%rsp), %rdi callq 0x8ba30 movb %al, 0x27(%rsp) jmp 0xf340d movb 0x27(%rsp), %al testb $0x1, %al jne 0xf3417 jmp 0xf345b leaq 0xb8(%rsp), %rdi callq 0x5a4f0 testb $0x1, %al jne 0xf3441 leaq 0xd8(%rsp), %rdi leaq 0xb8(%rsp), %rsi callq 0x5b410 jmp 0xf343f jmp 0xf3459 leaq 0x11c8a5(%rip), %rsi # 0x20fced leaq 0xd8(%rsp), %rdi callq 0x5a6e0 jmp 0xf3457 jmp 0xf3459 jmp 0xf345b leaq 0xd8(%rsp), %rax movq %rax, 0x88(%rsp) leaq 0xb8(%rsp), %rax movq %rax, 0x90(%rsp) leaq 0xf8(%rsp), %rax movq %rax, 0x98(%rsp) movq 0xf8(%rsp), %rdi callq 0x5b4c0 movl %eax, 0x20(%rsp) jmp 0xf349e movl 0x20(%rsp), %edx leaq 0x11c98a(%rip), %rcx # 0x20fe33 leaq 0x11c987(%rip), %r8 # 0x20fe37 leaq 0x68(%rsp), %rdi leaq 0x88(%rsp), %rsi callq 0xf3640 jmp 0xf34c4 movq 0xf8(%rsp), %rdi callq 0x5af60 movl %eax, 0x1c(%rsp) jmp 0xf34d7 movl 0x1c(%rsp), %edx leaq 0x11c95f(%rip), %rcx # 0x20fe41 leaq 0x11c95c(%rip), %r8 # 0x20fe45 leaq 0x48(%rsp), %rdi leaq 0x88(%rsp), %rsi callq 0xf3640 jmp 0xf34fd movq 0x38(%rsp), %rdi movb 0xab(%rsp), %al andb $0x1, %al movb %al, (%rdi) addq $0x8, %rdi movq %rdi, 0x10(%rsp) leaq 0xd8(%rsp), %rsi leaq 0x68(%rsp), %rdx leaq 0x48(%rsp), %rcx callq 0x101ad0 jmp 0xf352f movq 0x38(%rsp), %rax addq $0x10, %rax movq %rax, 0x8(%rsp) leaq 0xb8(%rsp), %rdi callq 0x5a4f0 testb $0x1, %al jne 0xf3550 jmp 0xf3560 movq 0x8(%rsp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x101b60 jmp 0xf3580 movq 0x8(%rsp), %rdi leaq 0xb8(%rsp), %rsi leaq 0x68(%rsp), %rdx leaq 0x48(%rsp), %rcx callq 0x101ad0 jmp 0xf357e jmp 0xf3580 leaq 0x48(%rsp), %rdi callq 0x5b558 leaq 0x68(%rsp), %rdi callq 0x5b558 leaq 0xb8(%rsp), %rdi callq 0x5b558 leaq 0xd8(%rsp), %rdi callq 0x5b558 movq 0x40(%rsp), %rax addq $0x118, %rsp # imm = 0x118 retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb0(%rsp) movl %eax, 0xac(%rsp) jmp 0xf360f movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb0(%rsp) movl %eax, 0xac(%rsp) jmp 0xf3605 movq 0x10(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb0(%rsp) movl %eax, 0xac(%rsp) callq 0x101ba0 leaq 0x48(%rsp), %rdi callq 0x5b558 leaq 0x68(%rsp), %rdi callq 0x5b558 leaq 0xb8(%rsp), %rdi callq 0x5b558 leaq 0xd8(%rsp), %rdi callq 0x5b558 movq 0xb0(%rsp), %rdi callq 0x5abc0
_Z32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: sub rsp, 118h mov [rsp+118h+var_E0], rdi mov rax, rdi mov [rsp+118h+var_D8], rax mov [rsp+118h+var_8], rdi mov [rsp+118h+var_10], rsi mov [rsp+118h+var_18], rdx mov rdi, [rsp+118h+var_10] call _llama_model_get_vocab mov [rsp+118h+var_20], rax mov rsi, [rsp+118h+var_18] lea rdi, [rsp+118h+var_40] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&) mov rsi, [rsp+118h+var_18] lea rdi, [rsp+118h+var_60] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&) jmp short $+2 loc_F32DD: mov rdi, [rsp+118h+var_18] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) xor al, 0FFh and al, 1 mov [rsp+118h+var_6D], al mov rdi, [rsp+118h+var_18] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) test al, 1 jnz short loc_F330B jmp loc_F33E2 loc_F330B: mov rdi, [rsp+118h+var_10] xor eax, eax mov esi, eax call _llama_model_chat_template mov [rsp+118h+var_E8], rax jmp short $+2 loc_F3323: mov rax, [rsp+118h+var_E8] mov [rsp+118h+var_78], rax cmp [rsp+118h+var_78], 0 jz short loc_F338E mov rsi, [rsp+118h+var_78] lea rdi, [rsp+118h+var_40] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*) jmp short $+2 loc_F3352: mov [rsp+118h+var_6D], 1 jmp short loc_F338E mov rcx, rax mov eax, edx mov [rsp+arg_A8], rcx mov [rsp+arg_A4], eax jmp loc_F3626 mov rcx, rax mov eax, edx mov [rsp+arg_A8], rcx mov [rsp+arg_A4], eax jmp loc_F3619 loc_F338E: mov rdi, [rsp+118h+var_10] lea rsi, aToolUse; "tool_use" call _llama_model_chat_template mov [rsp+118h+var_F0], rax jmp short $+2 loc_F33A9: mov rax, [rsp+118h+var_F0] mov [rsp+118h+var_78], rax cmp [rsp+118h+var_78], 0 jz short loc_F33E0 mov rsi, [rsp+118h+var_78] lea rdi, [rsp+118h+var_60] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*) jmp short $+2 loc_F33D8: mov [rsp+118h+var_6D], 1 loc_F33E0: jmp short $+2 loc_F33E2: lea rdi, [rsp+118h+var_40] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) test al, 1 jnz short loc_F3417 lea rsi, aChatml; "chatml" lea rdi, [rsp+118h+var_40] call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) mov [rsp+118h+var_F1], al jmp short $+2 loc_F340D: mov al, [rsp+118h+var_F1] test al, 1 jnz short loc_F3417 jmp short loc_F345B loc_F3417: lea rdi, [rsp+118h+var_60] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) test al, 1 jnz short loc_F3441 lea rdi, [rsp+118h+var_40] lea rsi, [rsp+118h+var_60] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&) jmp short $+2 loc_F343F: jmp short loc_F3459 loc_F3441: lea rsi, aForMessageInMe; "\n {%- for message in me"... lea rdi, [rsp+118h+var_40] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*) jmp short $+2 loc_F3457: jmp short $+2 loc_F3459: jmp short $+2 loc_F345B: lea rax, [rsp+118h+var_40] mov [rsp+118h+var_90], rax lea rax, [rsp+118h+var_60] mov [rsp+118h+var_88], rax lea rax, [rsp+118h+var_20] mov [rsp+118h+var_80], rax mov rdi, [rsp+118h+var_20] call _llama_vocab_bos mov [rsp+118h+var_F8], eax jmp short $+2 loc_F349E: mov edx, [rsp+118h+var_F8] lea rcx, aBos; "BOS" lea r8, aBosToken; "bos_token" lea rdi, [rsp+118h+var_B0] lea rsi, [rsp+118h+var_90] call _ZZ32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clB5cxx11EiPKcSC_; common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()(int,char const*,char const*) jmp short $+2 loc_F34C4: mov rdi, [rsp+118h+var_20] call _llama_vocab_eos mov [rsp+118h+var_FC], eax jmp short $+2 loc_F34D7: mov edx, [rsp+118h+var_FC] lea rcx, aEos; "EOS" lea r8, aEosToken; "eos_token" lea rdi, [rsp+118h+var_D0] lea rsi, [rsp+118h+var_90] call _ZZ32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clB5cxx11EiPKcSC_; common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()(int,char const*,char const*) jmp short $+2 loc_F34FD: mov rdi, [rsp+118h+var_E0] mov al, [rsp+118h+var_6D] and al, 1 mov [rdi], al add rdi, 8; int mov qword ptr [rsp+118h+var_108], rdi; int lea rsi, [rsp+118h+var_40]; int lea rdx, [rsp+118h+var_B0]; int lea rcx, [rsp+118h+var_D0]; int call _ZSt11make_uniqueIN5minja13chat_templateEJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_EENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<minja::chat_template,std::string &,std::string &,std::string &>(std::string &,std::string &,std::string &) jmp short $+2 loc_F352F: mov rax, [rsp+118h+var_E0] add rax, 10h mov [rsp+118h+var_110], rax; void * lea rdi, [rsp+118h+var_60] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) test al, 1 jnz short loc_F3550 jmp short loc_F3560 loc_F3550: mov rdi, [rsp+118h+var_110] xor eax, eax mov esi, eax call _ZNSt10unique_ptrIN5minja13chat_templateESt14default_deleteIS1_EEC2IS3_vEEDn; std::unique_ptr<minja::chat_template>::unique_ptr<std::default_delete<minja::chat_template>,void>(decltype(nullptr)) jmp short loc_F3580 loc_F3560: mov rdi, [rsp+118h+var_110]; int lea rsi, [rsp+118h+var_60]; int lea rdx, [rsp+118h+var_B0]; int lea rcx, [rsp+118h+var_D0]; int call _ZSt11make_uniqueIN5minja13chat_templateEJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_EENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<minja::chat_template,std::string &,std::string &,std::string &>(std::string &,std::string &,std::string &) jmp short $+2 loc_F357E: jmp short $+2 loc_F3580: lea rdi, [rsp+118h+var_D0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+118h+var_B0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+118h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+118h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rax, [rsp+118h+var_D8] add rsp, 118h retn mov rcx, rax mov eax, edx mov [rsp+arg_A8], rcx mov [rsp+arg_A4], eax jmp short loc_F360F mov rcx, rax mov eax, edx mov [rsp+arg_A8], rcx mov [rsp+arg_A4], eax jmp short loc_F3605 mov rdi, [rsp+arg_8] mov rcx, rax mov eax, edx mov [rsp+arg_A8], rcx mov [rsp+arg_A4], eax call _ZNSt10unique_ptrIN5minja13chat_templateESt14default_deleteIS1_EED2Ev; std::unique_ptr<minja::chat_template>::~unique_ptr() loc_F3605: lea rdi, [rsp+arg_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_F360F: lea rdi, [rsp+arg_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_F3619: lea rdi, [rsp+arg_B0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_F3626: lea rdi, [rsp+arg_D0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rdi, [rsp+arg_A8] call __Unwind_Resume
bool * common_chat_templates_from_model(bool *a1, long long a2, long long a3) { int v3; // r8d int v4; // r9d int v5; // r8d int v6; // r9d int v8; // [rsp+0h] [rbp-118h] int v9; // [rsp+0h] [rbp-118h] void *v10; // [rsp+8h] [rbp-110h] void *v11; // [rsp+8h] [rbp-110h] int v12; // [rsp+10h] [rbp-108h] long long v13; // [rsp+18h] [rbp-100h] long long v14; // [rsp+18h] [rbp-100h] unsigned int v15; // [rsp+20h] [rbp-F8h] int v16[8]; // [rsp+48h] [rbp-D0h] BYREF int v17[8]; // [rsp+68h] [rbp-B0h] BYREF _QWORD v18[3]; // [rsp+88h] [rbp-90h] BYREF const char *v19; // [rsp+A0h] [rbp-78h] bool v20; // [rsp+ABh] [rbp-6Dh] int v21[8]; // [rsp+B8h] [rbp-60h] BYREF int v22[8]; // [rsp+D8h] [rbp-40h] BYREF long long vocab; // [rsp+F8h] [rbp-20h] BYREF long long v24; // [rsp+100h] [rbp-18h] long long v25; // [rsp+108h] [rbp-10h] bool *v26; // [rsp+110h] [rbp-8h] v26 = a1; v25 = a2; v24 = a3; vocab = llama_model_get_vocab(a2); std::string::basic_string(v22, v24); std::string::basic_string(v21, v24); v20 = (std::string::empty(v24) & 1) == 0; if ( (std::string::empty(v24) & 1) != 0 ) { v19 = (const char *)llama_model_chat_template(v25, 0LL); if ( v19 ) { std::string::operator=(v22, v19); v20 = 1; } v19 = (const char *)llama_model_chat_template(v25, "tool_use"); if ( v19 ) { std::string::operator=(v21, v19); v20 = 1; } } if ( (std::string::empty(v22) & 1) != 0 || std::operator==<char>((long long)v22, (long long)"chatml") ) { if ( (std::string::empty(v21) & 1) != 0 ) std::string::operator=( v22, "\n" " {%- for message in messages -%}\n" " {{- \"<|im_start|>\" + message.role + \"\\n\" + message.content + \"<|im_end|>\\n\" -}}\n" " {%- endfor -%}\n" " {%- if add_generation_prompt -%}\n" " {{- \"<|im_start|>assistant\\n\" -}}\n" " {%- endif -%}\n" " "); else std::string::operator=(v22, v21); } v18[0] = v22; v18[1] = v21; v18[2] = &vocab; v15 = llama_vocab_bos(vocab); common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()[abi:cxx11]( v17, v18, v15, "BOS", "bos_token"); HIDWORD(v13) = llama_vocab_eos(vocab); common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()[abi:cxx11]( v16, v18, HIDWORD(v13), "EOS", "eos_token"); *a1 = v20; std::make_unique<minja::chat_template,std::string &,std::string &,std::string &>( (_DWORD)a1 + 8, (int)v22, (int)v17, (int)v16, v3, v4, v8, v10, (_DWORD)a1 + 8, v13); v11 = a1 + 16; if ( (std::string::empty(v21) & 1) != 0 ) std::unique_ptr<minja::chat_template>::unique_ptr<std::default_delete<minja::chat_template>,void>(v11, 0LL); else std::make_unique<minja::chat_template,std::string &,std::string &,std::string &>( (int)v11, (int)v21, (int)v17, (int)v16, v5, v6, v9, v11, v12, v14); std::string::~string(v16); std::string::~string(v17); std::string::~string(v21); std::string::~string(v22); return a1; }
common_chat_templates_from_model: SUB RSP,0x118 MOV qword ptr [RSP + 0x38],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x40],RAX MOV qword ptr [RSP + 0x110],RDI MOV qword ptr [RSP + 0x108],RSI MOV qword ptr [RSP + 0x100],RDX MOV RDI,qword ptr [RSP + 0x108] CALL 0x0015b200 MOV qword ptr [RSP + 0xf8],RAX MOV RSI,qword ptr [RSP + 0x100] LEA RDI,[RSP + 0xd8] CALL 0x0015a210 MOV RSI,qword ptr [RSP + 0x100] LAB_001f32ce: LEA RDI,[RSP + 0xb8] CALL 0x0015a210 JMP 0x001f32dd LAB_001f32dd: MOV RDI,qword ptr [RSP + 0x100] CALL 0x0015a4f0 XOR AL,0xff AND AL,0x1 MOV byte ptr [RSP + 0xab],AL MOV RDI,qword ptr [RSP + 0x100] CALL 0x0015a4f0 TEST AL,0x1 JNZ 0x001f330b JMP 0x001f33e2 LAB_001f330b: MOV RDI,qword ptr [RSP + 0x108] LAB_001f3313: XOR EAX,EAX MOV ESI,EAX CALL 0x0015adc0 MOV qword ptr [RSP + 0x30],RAX JMP 0x001f3323 LAB_001f3323: MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0xa0],RAX CMP qword ptr [RSP + 0xa0],0x0 JZ 0x001f338e MOV RSI,qword ptr [RSP + 0xa0] LEA RDI,[RSP + 0xd8] CALL 0x0015a6e0 JMP 0x001f3352 LAB_001f3352: MOV byte ptr [RSP + 0xab],0x1 JMP 0x001f338e LAB_001f338e: MOV RDI,qword ptr [RSP + 0x108] LEA RSI,[0x30fcdd] CALL 0x0015adc0 MOV qword ptr [RSP + 0x28],RAX JMP 0x001f33a9 LAB_001f33a9: MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0xa0],RAX CMP qword ptr [RSP + 0xa0],0x0 JZ 0x001f33e0 MOV RSI,qword ptr [RSP + 0xa0] LEA RDI,[RSP + 0xb8] CALL 0x0015a6e0 JMP 0x001f33d8 LAB_001f33d8: MOV byte ptr [RSP + 0xab],0x1 LAB_001f33e0: JMP 0x001f33e2 LAB_001f33e2: LEA RDI,[RSP + 0xd8] CALL 0x0015a4f0 TEST AL,0x1 JNZ 0x001f3417 LEA RSI,[0x30fce6] LEA RDI,[RSP + 0xd8] CALL 0x0018ba30 MOV byte ptr [RSP + 0x27],AL JMP 0x001f340d LAB_001f340d: MOV AL,byte ptr [RSP + 0x27] TEST AL,0x1 JNZ 0x001f3417 JMP 0x001f345b LAB_001f3417: LEA RDI,[RSP + 0xb8] CALL 0x0015a4f0 TEST AL,0x1 JNZ 0x001f3441 LEA RDI,[RSP + 0xd8] LEA RSI,[RSP + 0xb8] CALL 0x0015b410 JMP 0x001f343f LAB_001f343f: JMP 0x001f3459 LAB_001f3441: LEA RSI,[0x30fced] LEA RDI,[RSP + 0xd8] CALL 0x0015a6e0 JMP 0x001f3457 LAB_001f3457: JMP 0x001f3459 LAB_001f3459: JMP 0x001f345b LAB_001f345b: LEA RAX,[RSP + 0xd8] MOV qword ptr [RSP + 0x88],RAX LEA RAX,[RSP + 0xb8] MOV qword ptr [RSP + 0x90],RAX LEA RAX,[RSP + 0xf8] MOV qword ptr [RSP + 0x98],RAX MOV RDI,qword ptr [RSP + 0xf8] CALL 0x0015b4c0 MOV dword ptr [RSP + 0x20],EAX JMP 0x001f349e LAB_001f349e: MOV EDX,dword ptr [RSP + 0x20] LEA RCX,[0x30fe33] LEA R8,[0x30fe37] LEA RDI,[RSP + 0x68] LEA RSI,[RSP + 0x88] CALL 0x001f3640 JMP 0x001f34c4 LAB_001f34c4: MOV RDI,qword ptr [RSP + 0xf8] LAB_001f34cc: CALL 0x0015af60 MOV dword ptr [RSP + 0x1c],EAX JMP 0x001f34d7 LAB_001f34d7: MOV EDX,dword ptr [RSP + 0x1c] LEA RCX,[0x30fe41] LEA R8,[0x30fe45] LEA RDI,[RSP + 0x48] LEA RSI,[RSP + 0x88] CALL 0x001f3640 JMP 0x001f34fd LAB_001f34fd: MOV RDI,qword ptr [RSP + 0x38] MOV AL,byte ptr [RSP + 0xab] AND AL,0x1 MOV byte ptr [RDI],AL ADD RDI,0x8 MOV qword ptr [RSP + 0x10],RDI LAB_001f3516: LEA RSI,[RSP + 0xd8] LEA RDX,[RSP + 0x68] LEA RCX,[RSP + 0x48] CALL 0x00201ad0 JMP 0x001f352f LAB_001f352f: MOV RAX,qword ptr [RSP + 0x38] ADD RAX,0x10 MOV qword ptr [RSP + 0x8],RAX LEA RDI,[RSP + 0xb8] CALL 0x0015a4f0 TEST AL,0x1 JNZ 0x001f3550 JMP 0x001f3560 LAB_001f3550: MOV RDI,qword ptr [RSP + 0x8] XOR EAX,EAX MOV ESI,EAX CALL 0x00201b60 JMP 0x001f3580 LAB_001f3560: MOV RDI,qword ptr [RSP + 0x8] LEA RSI,[RSP + 0xb8] LEA RDX,[RSP + 0x68] LEA RCX,[RSP + 0x48] CALL 0x00201ad0 LAB_001f357c: JMP 0x001f357e LAB_001f357e: JMP 0x001f3580 LAB_001f3580: LEA RDI,[RSP + 0x48] CALL 0x0015b558 LEA RDI,[RSP + 0x68] CALL 0x0015b558 LEA RDI,[RSP + 0xb8] CALL 0x0015b558 LEA RDI,[RSP + 0xd8] CALL 0x0015b558 MOV RAX,qword ptr [RSP + 0x40] ADD RSP,0x118 RET
/* common_chat_templates_from_model(llama_model const*, std::__cxx11::string const&) */ llama_model * common_chat_templates_from_model(llama_model *param_1,string *param_2) { byte bVar1; bool bVar2; uint uVar3; ulong uVar4; string *in_RDX; string local_d0 [32]; string local_b0 [32]; string *local_90; string *local_88; int8 *local_80; char *local_78; byte local_6d; string local_60 [32]; string local_40 [32]; int8 local_20; string *local_18; string *local_10; llama_model *local_8; local_18 = in_RDX; local_10 = param_2; local_8 = param_1; local_20 = llama_model_get_vocab(param_2); std::__cxx11::string::string(local_40,local_18); /* try { // try from 001f32ce to 001f32da has its CatchHandler @ 001f335c */ std::__cxx11::string::string(local_60,local_18); bVar1 = std::__cxx11::string::empty(); local_6d = (bVar1 ^ 0xff) & 1; uVar4 = std::__cxx11::string::empty(); if ((uVar4 & 1) != 0) { /* try { // try from 001f3313 to 001f34c1 has its CatchHandler @ 001f3375 */ local_78 = (char *)llama_model_chat_template(local_10,0); if (local_78 != (char *)0x0) { std::__cxx11::string::operator=(local_40,local_78); local_6d = 1; } local_78 = (char *)llama_model_chat_template(local_10,"tool_use"); if (local_78 != (char *)0x0) { std::__cxx11::string::operator=(local_60,local_78); local_6d = 1; } } uVar4 = std::__cxx11::string::empty(); if (((uVar4 & 1) != 0) || (bVar2 = std::operator==(local_40,"chatml"), bVar2)) { uVar4 = std::__cxx11::string::empty(); if ((uVar4 & 1) == 0) { std::__cxx11::string::operator=(local_40,local_60); } else { std::__cxx11::string::operator= (local_40, "\n {%- for message in messages -%}\n {{- \"<|im_start|>\" + message.role + \"\\n\" + message.content + \"<|im_end|>\\n\" -}}\n {%- endfor -%}\n {%- if add_generation_prompt -%}\n {{- \"<|im_start|>assistant\\n\" -}}\n {%- endif -%}\n " ); } } local_90 = local_40; local_88 = local_60; local_80 = &local_20; uVar3 = llama_vocab_bos(local_20); common_chat_templates_from_model(llama_model_const*,std::__cxx11::string_const&)::$_0:: operator()[abi_cxx11_((int)local_b0,(char *)&local_90,(char *)(ulong)uVar3); /* try { // try from 001f34cc to 001f34fa has its CatchHandler @ 001f35bb */ uVar3 = llama_vocab_eos(local_20); common_chat_templates_from_model(llama_model_const*,std::__cxx11::string_const&)::$_0:: operator()[abi_cxx11_((int)local_d0,(char *)&local_90,(char *)(ulong)uVar3); *param_1 = (llama_model)(local_6d & 1); /* try { // try from 001f3516 to 001f352c has its CatchHandler @ 001f35d1 */ std:: make_unique<minja::chat_template,std::__cxx11::string&,std::__cxx11::string&,std::__cxx11::string&> ((string *)(param_1 + 8),local_40,local_b0); uVar4 = std::__cxx11::string::empty(); if ((uVar4 & 1) == 0) { /* try { // try from 001f3560 to 001f357b has its CatchHandler @ 001f35e7 */ std:: make_unique<minja::chat_template,std::__cxx11::string&,std::__cxx11::string&,std::__cxx11::string&> ((string *)(param_1 + 0x10),local_60,local_b0); } else { std::unique_ptr<minja::chat_template,std::default_delete<minja::chat_template>>:: unique_ptr<std::default_delete<minja::chat_template>,void> ((_func_decltype_nullptr *)(param_1 + 0x10)); } std::__cxx11::string::~string(local_d0); std::__cxx11::string::~string(local_b0); std::__cxx11::string::~string(local_60); std::__cxx11::string::~string(local_40); return param_1; }
20,499
common_chat_templates_from_model(llama_model const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/common.cpp
common_chat_templates common_chat_templates_from_model(const struct llama_model * model, const std::string & chat_template_override) { auto vocab = llama_model_get_vocab(model); std::string default_template_src = chat_template_override; std::string template_tool_use_src = chat_template_override; bool has_explicit_template = !chat_template_override.empty(); if (chat_template_override.empty()) { auto str = llama_model_chat_template(model, /* name */ nullptr); if (str) { default_template_src = str; has_explicit_template = true; } str = llama_model_chat_template(model, /* name */ "tool_use"); if (str) { template_tool_use_src = str; has_explicit_template = true; } } if (default_template_src.empty() || default_template_src == "chatml") { if (!template_tool_use_src.empty()) { default_template_src = template_tool_use_src; } else { default_template_src = R"( {%- for message in messages -%} {{- "<|im_start|>" + message.role + "\n" + message.content + "<|im_end|>\n" -}} {%- endfor -%} {%- if add_generation_prompt -%} {{- "<|im_start|>assistant\n" -}} {%- endif -%} )"; } } const auto get_token = [&](llama_token token, const char * name, const char * jinja_variable_name) { if (token == LLAMA_TOKEN_NULL) { if (default_template_src.find(jinja_variable_name) != std::string::npos || template_tool_use_src.find(jinja_variable_name) != std::string::npos) { LOG_WRN("%s: warning: vocab does not have a %s token, jinja template won't work as intended.\n", __func__, name); } return std::string(); } else { return common_token_to_piece(vocab, token, true); } }; auto token_bos = get_token(llama_vocab_bos(vocab), "BOS", "bos_token"); auto token_eos = get_token(llama_vocab_eos(vocab), "EOS", "eos_token"); return { has_explicit_template, std::make_unique<minja::chat_template>(default_template_src, token_bos, token_eos), template_tool_use_src.empty() ? nullptr : std::make_unique<minja::chat_template>(template_tool_use_src, token_bos, token_eos) }; }
O3
cpp
common_chat_templates_from_model(llama_model 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 $0xa8, %rsp movq %rdx, %r13 movq %rsi, %r12 movq %rdi, %rbx movq %rsi, %rdi callq 0x1b150 movq %rax, 0x48(%rsp) leaq 0x38(%rsp), %rbp movq %rbp, -0x10(%rbp) movq (%r13), %rsi movq 0x8(%r13), %rdx addq %rsi, %rdx leaq 0x28(%rsp), %r14 movq %r14, %rdi callq 0x213b2 leaq 0x18(%rsp), %rax movq %rax, -0x10(%rax) movq (%r13), %rsi movq 0x8(%r13), %rdx addq %rsi, %rdx leaq 0x8(%rsp), %rdi callq 0x213b2 movb $0x1, %r15b cmpq $0x0, 0x8(%r13) jne 0x767ef movq %r12, %rdi xorl %esi, %esi callq 0x1a3d0 movq %rax, %r13 testq %rax, %rax setne %r15b je 0x767ab leaq 0x28(%rsp), %rbp movq 0x8(%rbp), %r14 movq %r13, %rdi callq 0x1a3e0 movq %rbp, %rdi leaq 0x38(%rsp), %rbp xorl %esi, %esi movq %r14, %rdx leaq 0x28(%rsp), %r14 movq %r13, %rcx movq %rax, %r8 callq 0x1ad70 leaq 0x77b57(%rip), %rsi # 0xee309 movq %r12, %rdi callq 0x1a3d0 movq %rax, %r12 testq %rax, %rax je 0x767ef movq %r14, %r15 leaq 0x8(%rsp), %r14 movq 0x8(%r14), %r13 movq %r12, %rdi callq 0x1a3e0 movq %r14, %rdi movq %r15, %r14 xorl %esi, %esi movq %r13, %rdx movq %r12, %rcx movq %rax, %r8 callq 0x1ad70 movb $0x1, %r15b cmpq $0x0, 0x30(%rsp) je 0x7680c leaq 0x77b14(%rip), %rsi # 0xee312 leaq 0x28(%rsp), %rdi callq 0x1a220 testl %eax, %eax jne 0x76842 cmpq $0x0, 0x10(%rsp) je 0x76825 leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rsi callq 0x1a4a0 jmp 0x76842 leaq 0x28(%rsp), %rdi movq 0x8(%rdi), %rdx leaq 0x77ae4(%rip), %rcx # 0xee319 movl $0x145, %r8d # imm = 0x145 xorl %esi, %esi callq 0x1ad70 movq %r14, 0x90(%rsp) leaq 0x8(%rsp), %rax movq %rax, 0x98(%rsp) leaq 0x48(%rsp), %rax movq %rax, 0xa0(%rsp) movq (%rax), %rdi callq 0x1a7a0 leaq 0x77bec(%rip), %rcx # 0xee45f leaq 0x77be9(%rip), %r8 # 0xee463 leaq 0x70(%rsp), %rdi leaq 0x90(%rsp), %rsi movl %eax, %edx callq 0x76a6e movq 0x48(%rsp), %rdi callq 0x1a0a0 leaq 0x77bce(%rip), %rcx # 0xee46d leaq 0x77bcb(%rip), %r8 # 0xee471 leaq 0x50(%rsp), %rdi leaq 0x90(%rsp), %rsi movl %eax, %edx callq 0x76a6e movb %r15b, (%rbx) movl $0x80, %edi callq 0x1a8c0 movq %rax, %r15 leaq 0x28(%rsp), %rsi leaq 0x70(%rsp), %rdx leaq 0x50(%rsp), %rcx movq %rax, %rdi callq 0x78860 movq %r15, 0x8(%rbx) cmpq $0x0, 0x10(%rsp) je 0x76913 movl $0x80, %edi callq 0x1a8c0 movq %rax, %r12 leaq 0x8(%rsp), %rsi leaq 0x70(%rsp), %rdx leaq 0x50(%rsp), %rcx movq %rax, %rdi callq 0x78860 jmp 0x76916 xorl %r12d, %r12d movq %r12, 0x10(%rbx) leaq 0x60(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x76935 movq 0x60(%rsp), %rsi incq %rsi callq 0x1a8e0 leaq 0x80(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x76956 movq 0x80(%rsp), %rsi incq %rsi callq 0x1a8e0 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x76972 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8e0 movq 0x28(%rsp), %rdi cmpq %rbp, %rdi je 0x76989 movq 0x38(%rsp), %rsi incq %rsi callq 0x1a8e0 movq %rbx, %rax addq $0xa8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x76a2f movq %rax, %r14 movl $0x80, %esi movq %r12, %rdi callq 0x1a8e0 jmp 0x769b8 movq %rax, %r14 addq $0x8, %rbx movq %rbx, %rdi movq %r15, %rsi callq 0xb9e56 movq $0x0, (%rbx) jmp 0x769e5 movq %rax, %r14 movl $0x80, %esi movq %r15, %rdi callq 0x1a8e0 jmp 0x769e5 movq %rax, %r14 leaq 0x60(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x76a0c movq 0x60(%rsp), %rsi incq %rsi callq 0x1a8e0 jmp 0x76a0c movq %rax, %r14 jmp 0x76a4e jmp 0x76a2f movq %rax, %r14 leaq 0x80(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x76a32 movq 0x80(%rsp), %rsi incq %rsi callq 0x1a8e0 jmp 0x76a32 movq %rax, %r14 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x76a4e movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8e0 movq 0x28(%rsp), %rdi cmpq %rbp, %rdi je 0x76a65 movq 0x38(%rsp), %rsi incq %rsi callq 0x1a8e0 movq %r14, %rdi callq 0x1afa0 nop
_Z32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp; int push r15; int push r14; int push r13; int push r12; int push rbx; int sub rsp, 0A8h mov r13, rdx mov r12, rsi mov rbx, rdi mov rdi, rsi call _llama_model_get_vocab mov qword ptr [rsp+0D8h+var_90], rax; __int64 lea rbp, [rsp+0D8h+var_A0] mov [rbp-10h], rbp mov rsi, [r13+0] mov rdx, [r13+8] add rdx, rsi lea r14, [rsp+0D8h+var_B0] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rax, [rsp+0D8h+var_C0] mov [rax-10h], rax mov rsi, [r13+0] mov rdx, [r13+8] add rdx, rsi lea rdi, [rsp+0D8h+var_D0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov r15b, 1 cmp qword ptr [r13+8], 0 jnz loc_767EF mov rdi, r12 xor esi, esi call _llama_model_chat_template mov r13, rax test rax, rax setnz r15b jz short loc_767AB lea rbp, [rsp+0D8h+var_B0] mov r14, [rbp+8] mov rdi, r13 call _strlen mov rdi, rbp lea rbp, [rsp+0D8h+var_A0] xor esi, esi mov rdx, r14 lea r14, [rsp+0D8h+var_B0] mov rcx, r13 mov r8, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) loc_767AB: lea rsi, aToolUse; "tool_use" mov rdi, r12 call _llama_model_chat_template mov r12, rax test rax, rax jz short loc_767EF mov r15, r14 lea r14, [rsp+0D8h+var_D0] mov r13, [r14+8] mov rdi, r12 call _strlen mov rdi, r14 mov r14, r15 xor esi, esi mov rdx, r13 mov rcx, r12 mov r8, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) mov r15b, 1 loc_767EF: cmp [rsp+0D8h+var_A8], 0 jz short loc_7680C lea rsi, aChatml; "chatml" lea rdi, [rsp+0D8h+var_B0] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jnz short loc_76842 loc_7680C: cmp [rsp+0D8h+var_C8], 0 jz short loc_76825 lea rdi, [rsp+0D8h+var_B0] lea rsi, [rsp+0D8h+var_D0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) jmp short loc_76842 loc_76825: lea rdi, [rsp+0D8h+var_B0] mov rdx, [rdi+8] lea rcx, aForMessageInMe; "\n {%- for message in me"... mov r8d, 145h xor esi, esi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) loc_76842: mov qword ptr [rsp+0D8h+var_48], r14; int lea rax, [rsp+0D8h+var_D0] mov qword ptr [rsp+0D8h+var_40], rax; int lea rax, [rsp+0D8h+var_90] mov qword ptr [rsp+0D8h+var_38], rax; char mov rdi, [rax] call _llama_vocab_bos lea rcx, aBos; "BOS" lea r8, aBosToken; "bos_token" lea rdi, [rsp+0D8h+var_68] lea rsi, [rsp+0D8h+var_48] mov edx, eax call _ZZ32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clB5cxx11EiPKcSC_; common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()(int,char const*,char const*) mov rdi, qword ptr [rsp+0D8h+var_90] call _llama_vocab_eos lea rcx, aEos; "EOS" lea r8, aEosToken; "eos_token" lea rdi, [rsp+0D8h+var_88] lea rsi, [rsp+0D8h+var_48] mov edx, eax call _ZZ32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clB5cxx11EiPKcSC_; common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()(int,char const*,char const*) mov [rbx], r15b mov edi, 80h; unsigned __int64 call __Znwm; operator new(ulong) mov r15, rax lea rsi, [rsp+0D8h+var_B0]; int lea rdx, [rsp+0D8h+var_68]; int lea rcx, [rsp+0D8h+var_88]; int mov rdi, rax; int call _ZN5minja13chat_templateC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_; minja::chat_template::chat_template(std::string const&,std::string const&,std::string const&) mov [rbx+8], r15 cmp [rsp+0D8h+var_C8], 0 jz short loc_76913 mov edi, 80h; unsigned __int64 call __Znwm; operator new(ulong) mov r12, rax lea rsi, [rsp+0D8h+var_D0]; int lea rdx, [rsp+0D8h+var_68]; int lea rcx, [rsp+0D8h+var_88]; int mov rdi, rax; int call _ZN5minja13chat_templateC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_; minja::chat_template::chat_template(std::string const&,std::string const&,std::string const&) jmp short loc_76916 loc_76913: xor r12d, r12d loc_76916: mov [rbx+10h], r12 lea rax, [rsp+0D8h+var_78] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_76935 mov rsi, [rsp+0D8h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_76935: lea rax, [rsp+0D8h+var_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_76956 mov rsi, [rsp+0D8h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_76956: mov rdi, [rsp+0D8h+var_D0]; void * lea rax, [rsp+0D8h+var_C0] cmp rdi, rax jz short loc_76972 mov rsi, [rsp+0D8h+var_C0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_76972: mov rdi, [rsp+0D8h+var_B0]; void * cmp rdi, rbp jz short loc_76989 mov rsi, [rsp+0D8h+var_A0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_76989: mov rax, rbx add rsp, 0A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp loc_76A2F mov r14, rax mov esi, 80h; unsigned __int64 mov rdi, r12; void * call __ZdlPvm; operator delete(void *,ulong) jmp short loc_769B8 mov r14, rax loc_769B8: add rbx, 8 mov rdi, rbx mov rsi, r15 call _ZNKSt14default_deleteIN5minja13chat_templateEEclEPS1_; std::default_delete<minja::chat_template>::operator()(minja::chat_template*) mov qword ptr [rbx], 0 jmp short loc_769E5 mov r14, rax mov esi, 80h; unsigned __int64 mov rdi, r15; void * call __ZdlPvm; operator delete(void *,ulong) jmp short loc_769E5 mov r14, rax loc_769E5: lea rax, [rsp+arg_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_76A0C mov rsi, [rsp+arg_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_76A0C mov r14, rax jmp short loc_76A4E jmp short loc_76A2F mov r14, rax loc_76A0C: lea rax, [rsp+arg_78] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_76A32 mov rsi, [rsp+arg_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_76A32 loc_76A2F: mov r14, rax loc_76A32: mov rdi, [rsp+arg_0]; void * lea rax, [rsp+arg_10] cmp rdi, rax jz short loc_76A4E mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_76A4E: mov rdi, [rsp+arg_20]; void * cmp rdi, rbp jz short loc_76A65 mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_76A65: mov rdi, r14 call __Unwind_Resume
long long common_chat_templates_from_model(long long a1, long long a2, _BYTE **a3) { bool v4; // r15 long long v5; // rax long long v6; // r13 long long v7; // r14 long long v8; // rax long long v9; // rax long long v10; // r12 long long v11; // r13 long long v12; // rax unsigned int v13; // eax unsigned int v14; // eax long long v15; // r15 long long v16; // r12 void *v18; // [rsp+8h] [rbp-D0h] BYREF long long v19; // [rsp+10h] [rbp-C8h] _QWORD v20[2]; // [rsp+18h] [rbp-C0h] BYREF void *v21; // [rsp+28h] [rbp-B0h] BYREF long long v22; // [rsp+30h] [rbp-A8h] _QWORD v23[2]; // [rsp+38h] [rbp-A0h] BYREF char v24[8]; // [rsp+48h] [rbp-90h] BYREF int v25[4]; // [rsp+50h] [rbp-88h] BYREF long long v26; // [rsp+60h] [rbp-78h] BYREF int v27[4]; // [rsp+70h] [rbp-68h] BYREF long long v28; // [rsp+80h] [rbp-58h] BYREF int v29[2]; // [rsp+90h] [rbp-48h] BYREF int v30[2]; // [rsp+98h] [rbp-40h] char v31[8]; // [rsp+A0h] [rbp-38h] *(_QWORD *)v24 = llama_model_get_vocab(a2); v21 = v23; std::string::_M_construct<char *>((long long)&v21, *a3, (long long)&a3[1][(_QWORD)*a3]); v18 = v20; std::string::_M_construct<char *>((long long)&v18, *a3, (long long)&a3[1][(_QWORD)*a3]); v4 = 1; if ( !a3[1] ) { v5 = llama_model_chat_template(a2, 0LL); v6 = v5; v4 = v5 != 0; if ( v5 ) { v7 = v22; v8 = strlen(v5); std::string::_M_replace(&v21, 0LL, v7, v6, v8); } v9 = llama_model_chat_template(a2, "tool_use"); v10 = v9; if ( v9 ) { v11 = v19; v12 = strlen(v9); std::string::_M_replace(&v18, 0LL, v11, v10, v12); v4 = 1; } } if ( !v22 || !(unsigned int)std::string::compare(&v21, "chatml") ) { if ( v19 ) std::string::_M_assign(&v21, &v18); else std::string::_M_replace( &v21, 0LL, v22, "\n" " {%- for message in messages -%}\n" " {{- \"<|im_start|>\" + message.role + \"\\n\" + message.content + \"<|im_end|>\\n\" -}}\n" " {%- endfor -%}\n" " {%- if add_generation_prompt -%}\n" " {{- \"<|im_start|>assistant\\n\" -}}\n" " {%- endif -%}\n" " ", 325LL); } *(_QWORD *)v29 = &v21; *(_QWORD *)v30 = &v18; *(_QWORD *)v31 = v24; v13 = llama_vocab_bos(*(_QWORD *)v24); common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()[abi:cxx11]( v27, v29, v13, "BOS", "bos_token"); v14 = llama_vocab_eos(*(_QWORD *)v24); common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()[abi:cxx11]( v25, v29, v14, "EOS", "eos_token"); *(_BYTE *)a1 = v4; v15 = operator new(0x80uLL); minja::chat_template::chat_template(v15, &v21, v27, v25); *(_QWORD *)(a1 + 8) = v15; if ( v19 ) { v16 = operator new(0x80uLL); minja::chat_template::chat_template(v16, &v18, v27, v25); } else { v16 = 0LL; } *(_QWORD *)(a1 + 16) = v16; if ( *(long long **)v25 != &v26 ) operator delete(*(void **)v25, v26 + 1); if ( *(long long **)v27 != &v28 ) operator delete(*(void **)v27, v28 + 1); if ( v18 != v20 ) operator delete(v18, v20[0] + 1LL); if ( v21 != v23 ) operator delete(v21, v23[0] + 1LL); return a1; }
common_chat_templates_from_model: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa8 MOV R13,RDX MOV R12,RSI MOV RBX,RDI MOV RDI,RSI CALL 0x0011b150 MOV qword ptr [RSP + 0x48],RAX LEA RBP,[RSP + 0x38] MOV qword ptr [RBP + -0x10],RBP MOV RSI,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] ADD RDX,RSI LEA R14,[RSP + 0x28] MOV RDI,R14 CALL 0x001213b2 LEA RAX,[RSP + 0x18] MOV qword ptr [RAX + -0x10],RAX MOV RSI,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] ADD RDX,RSI LAB_0017674f: LEA RDI,[RSP + 0x8] CALL 0x001213b2 MOV R15B,0x1 CMP qword ptr [R13 + 0x8],0x0 JNZ 0x001767ef LAB_00176767: MOV RDI,R12 XOR ESI,ESI CALL 0x0011a3d0 MOV R13,RAX TEST RAX,RAX SETNZ R15B JZ 0x001767ab LEA RBP,[RSP + 0x28] MOV R14,qword ptr [RBP + 0x8] MOV RDI,R13 CALL 0x0011a3e0 MOV RDI,RBP LEA RBP,[RSP + 0x38] XOR ESI,ESI MOV RDX,R14 LEA R14,[RSP + 0x28] MOV RCX,R13 MOV R8,RAX CALL 0x0011ad70 LAB_001767ab: LEA RSI,[0x1ee309] MOV RDI,R12 CALL 0x0011a3d0 MOV R12,RAX TEST RAX,RAX JZ 0x001767ef MOV R15,R14 LEA R14,[RSP + 0x8] MOV R13,qword ptr [R14 + 0x8] MOV RDI,R12 CALL 0x0011a3e0 MOV RDI,R14 MOV R14,R15 XOR ESI,ESI MOV RDX,R13 MOV RCX,R12 MOV R8,RAX CALL 0x0011ad70 MOV R15B,0x1 LAB_001767ef: CMP qword ptr [RSP + 0x30],0x0 JZ 0x0017680c LEA RSI,[0x1ee312] LEA RDI,[RSP + 0x28] CALL 0x0011a220 TEST EAX,EAX JNZ 0x00176842 LAB_0017680c: CMP qword ptr [RSP + 0x10],0x0 JZ 0x00176825 LAB_00176814: LEA RDI,[RSP + 0x28] LEA RSI,[RSP + 0x8] CALL 0x0011a4a0 JMP 0x00176842 LAB_00176825: LEA RDI,[RSP + 0x28] MOV RDX,qword ptr [RDI + 0x8] LEA RCX,[0x1ee319] MOV R8D,0x145 XOR ESI,ESI CALL 0x0011ad70 LAB_00176842: MOV qword ptr [RSP + 0x90],R14 LEA RAX,[RSP + 0x8] MOV qword ptr [RSP + 0x98],RAX LEA RAX,[RSP + 0x48] MOV qword ptr [RSP + 0xa0],RAX MOV RDI,qword ptr [RAX] LAB_00176867: CALL 0x0011a7a0 LEA RCX,[0x1ee45f] LEA R8,[0x1ee463] LEA RDI,[RSP + 0x70] LEA RSI,[RSP + 0x90] MOV EDX,EAX CALL 0x00176a6e MOV RDI,qword ptr [RSP + 0x48] LAB_00176893: CALL 0x0011a0a0 LEA RCX,[0x1ee46d] LEA R8,[0x1ee471] LEA RDI,[RSP + 0x50] LEA RSI,[RSP + 0x90] MOV EDX,EAX CALL 0x00176a6e MOV byte ptr [RBX],R15B LAB_001768bd: MOV EDI,0x80 CALL 0x0011a8c0 LAB_001768c7: MOV R15,RAX LEA RSI,[RSP + 0x28] LEA RDX,[RSP + 0x70] LEA RCX,[RSP + 0x50] MOV RDI,RAX CALL 0x00178860 MOV qword ptr [RBX + 0x8],R15 CMP qword ptr [RSP + 0x10],0x0 JZ 0x00176913 LAB_001768ed: MOV EDI,0x80 CALL 0x0011a8c0 LAB_001768f7: MOV R12,RAX LEA RSI,[RSP + 0x8] LEA RDX,[RSP + 0x70] LEA RCX,[RSP + 0x50] MOV RDI,RAX CALL 0x00178860 LAB_00176911: JMP 0x00176916 LAB_00176913: XOR R12D,R12D LAB_00176916: MOV qword ptr [RBX + 0x10],R12 LEA RAX,[RSP + 0x60] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00176935 MOV RSI,qword ptr [RSP + 0x60] INC RSI CALL 0x0011a8e0 LAB_00176935: LEA RAX,[RSP + 0x80] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00176956 MOV RSI,qword ptr [RSP + 0x80] INC RSI CALL 0x0011a8e0 LAB_00176956: MOV RDI,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x00176972 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011a8e0 LAB_00176972: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,RBP JZ 0x00176989 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x0011a8e0 LAB_00176989: MOV RAX,RBX ADD RSP,0xa8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_chat_templates_from_model(llama_model const*, std::__cxx11::string const&) */ llama_model * common_chat_templates_from_model(llama_model *param_1,string *param_2) { char *pcVar1; int iVar2; uint uVar3; char *pcVar4; chat_template *pcVar5; long *in_RDX; llama_model lVar6; long *local_d0; char *local_c8; long local_c0 [2]; long *local_b0; char *local_a8; long local_a0 [2]; int8 local_90; long *local_88 [2]; long local_78 [2]; long *local_68 [2]; long local_58 [2]; int8 **local_48; int8 **local_40; int8 *local_38; local_90 = llama_model_get_vocab(param_2); local_b0 = local_a0; std::__cxx11::string::_M_construct<char*>(&local_b0,*in_RDX,in_RDX[1] + *in_RDX); local_d0 = local_c0; /* try { // try from 0017674f to 00176758 has its CatchHandler @ 00176a02 */ std::__cxx11::string::_M_construct<char*>(&local_d0,*in_RDX,in_RDX[1] + *in_RDX); lVar6 = (llama_model)0x1; if (in_RDX[1] == 0) { /* try { // try from 00176767 to 001767eb has its CatchHandler @ 00176a07 */ pcVar4 = (char *)llama_model_chat_template(param_2); pcVar1 = local_a8; lVar6 = (llama_model)(pcVar4 != (char *)0x0); if ((bool)lVar6) { strlen(pcVar4); std::__cxx11::string::_M_replace((ulong)&local_b0,0,pcVar1,(ulong)pcVar4); } pcVar4 = (char *)llama_model_chat_template(param_2); pcVar1 = local_c8; if (pcVar4 != (char *)0x0) { strlen(pcVar4); std::__cxx11::string::_M_replace((ulong)&local_d0,0,pcVar1,(ulong)pcVar4); lVar6 = (llama_model)0x1; } } if (local_a8 != (char *)0x0) { iVar2 = std::__cxx11::string::compare((char *)&local_b0); if (iVar2 != 0) goto LAB_00176842; } if (local_c8 == (char *)0x0) { std::__cxx11::string::_M_replace((ulong)&local_b0,0,local_a8,0x1ee319); } else { /* try { // try from 00176814 to 00176841 has its CatchHandler @ 0017699e */ std::__cxx11::string::_M_assign((string *)&local_b0); } LAB_00176842: local_40 = &local_d0; local_38 = &local_90; local_48 = &local_b0; /* try { // try from 00176867 to 0017688d has its CatchHandler @ 00176a2f */ uVar3 = llama_vocab_bos(local_90); common_chat_templates_from_model(llama_model_const*,std::__cxx11::string_const&)::$_0:: operator()[abi_cxx11_((int)local_68,(char *)&local_48,(char *)(ulong)uVar3); /* try { // try from 00176893 to 001768b9 has its CatchHandler @ 00176a09 */ uVar3 = llama_vocab_eos(local_90); common_chat_templates_from_model(llama_model_const*,std::__cxx11::string_const&)::$_0:: operator()[abi_cxx11_((int)local_88,(char *)&local_48,(char *)(ulong)uVar3); *param_1 = lVar6; /* try { // try from 001768bd to 001768c6 has its CatchHandler @ 001769e2 */ pcVar5 = (chat_template *)operator_new(0x80); /* try { // try from 001768c7 to 001768e0 has its CatchHandler @ 001769d0 */ minja::chat_template::chat_template (pcVar5,(string *)&local_b0,(string *)local_68,(string *)local_88); *(chat_template **)(param_1 + 8) = pcVar5; if (local_c8 == (char *)0x0) { pcVar5 = (chat_template *)0x0; } else { /* try { // try from 001768ed to 001768f6 has its CatchHandler @ 001769b5 */ pcVar5 = (chat_template *)operator_new(0x80); /* try { // try from 001768f7 to 00176910 has its CatchHandler @ 001769a3 */ minja::chat_template::chat_template (pcVar5,(string *)&local_d0,(string *)local_68,(string *)local_88); } *(chat_template **)(param_1 + 0x10) = pcVar5; if (local_88[0] != local_78) { operator_delete(local_88[0],local_78[0] + 1); } if (local_68[0] != local_58) { operator_delete(local_68[0],local_58[0] + 1); } if (local_d0 != local_c0) { operator_delete(local_d0,local_c0[0] + 1); } if (local_b0 != local_a0) { operator_delete(local_b0,local_a0[0] + 1); } return param_1; }