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
5,282
func0
#include <assert.h>
int func0(int m, int n) { if (n < m) { int temp = m; m = n; n = temp; } return n * (n + 1) * (3 * m - n + 1) / 6; }
int main() { assert(func0(4, 3) == 20); assert(func0(1, 2) == 2); assert(func0(2, 2) == 5); return 0; }
O2
c
func0: endbr64 mov %esi,%eax cmp %edi,%esi jge 1150 <func0+0x10> mov %edi,%edx mov %esi,%edi mov %edx,%eax lea (%rdi,%rdi,2),%esi lea 0x1(%rax),%edx sub %eax,%esi imul %edx,%eax add $0x1,%esi imul %eax,%esi movslq %esi,%rax sar $0x1f,%esi imul $0x2aaaaaab,%rax,%rax shr $0x20,%r...
func0: endbr64 mov eax, esi cmp esi, edi jge short loc_1150 mov edx, edi mov edi, esi mov eax, edx loc_1150: lea esi, [rdi+rdi*2] lea edx, [rax+1] sub esi, eax imul eax, edx add esi, 1 imul esi, eax movsxd rax, esi sar esi, 1Fh imul rax, 2AAAAAABh shr rax, 20h s...
long long func0(int a1, int a2) { int v2; // eax int v3; // edx v2 = a2; if ( a2 < a1 ) { v3 = a1; a1 = a2; v2 = v3; } return (unsigned int)((v2 + 1) * v2 * (3 * a1 - v2 + 1) / 6); }
func0: ENDBR64 MOV EAX,ESI CMP ESI,EDI JGE 0x00101150 MOV EDX,EDI MOV EDI,ESI MOV EAX,EDX LAB_00101150: LEA ESI,[RDI + RDI*0x2] LEA EDX,[RAX + 0x1] SUB ESI,EAX IMUL EAX,EDX ADD ESI,0x1 IMUL ESI,EAX MOVSXD RAX,ESI SAR ESI,0x1f IMUL RAX,RAX,0x2aaaaaab SHR RAX,0x20 SUB EAX,ESI RET
int func0(int param_1,int param_2) { int iVar1; iVar1 = param_2; if (param_2 < param_1) { iVar1 = param_1; param_1 = param_2; } return (((param_1 * 3 - iVar1) + 1) * iVar1 * (iVar1 + 1)) / 6; }
5,283
func0
#include <assert.h>
int func0(int m, int n) { if (n < m) { int temp = m; m = n; n = temp; } return n * (n + 1) * (3 * m - n + 1) / 6; }
int main() { assert(func0(4, 3) == 20); assert(func0(1, 2) == 2); assert(func0(2, 2) == 5); return 0; }
O3
c
func0: endbr64 mov %esi,%eax cmp %edi,%esi jge 1150 <func0+0x10> mov %edi,%edx mov %esi,%edi mov %edx,%eax lea (%rdi,%rdi,2),%esi lea 0x1(%rax),%edx sub %eax,%esi imul %edx,%eax add $0x1,%esi imul %eax,%esi movslq %esi,%rax sar $0x1f,%esi imul $0x2aaaaaab,%rax,%rax shr $0x20,%r...
func0: endbr64 mov eax, edi cmp esi, edi jl short loc_1150 mov edx, esi mov esi, edi mov eax, edx loc_1150: lea edi, [rsi+rsi*2] lea edx, [rax+1] sub edi, eax imul eax, edx add edi, 1 imul edi, eax movsxd rax, edi sar edi, 1Fh imul rax, 2AAAAAABh shr rax, 20h s...
long long func0(int a1, int a2) { int v2; // eax int v3; // edx v2 = a1; if ( a2 >= a1 ) { v3 = a2; a2 = a1; v2 = v3; } return (unsigned int)((v2 + 1) * v2 * (3 * a2 - v2 + 1) / 6); }
func0: ENDBR64 MOV EAX,EDI CMP ESI,EDI JL 0x00101150 MOV EDX,ESI MOV ESI,EDI MOV EAX,EDX LAB_00101150: LEA EDI,[RSI + RSI*0x2] LEA EDX,[RAX + 0x1] SUB EDI,EAX IMUL EAX,EDX ADD EDI,0x1 IMUL EDI,EAX MOVSXD RAX,EDI SAR EDI,0x1f IMUL RAX,RAX,0x2aaaaaab SHR RAX,0x20 SUB EAX,EDI RET
int func0(int param_1,int param_2) { int iVar1; iVar1 = param_1; if (param_1 <= param_2) { iVar1 = param_2; param_2 = param_1; } return (((param_2 * 3 - iVar1) + 1) * iVar1 * (iVar1 + 1)) / 6; }
5,284
func0
#include <assert.h> long bin_coff(int n, int r) { long val = 1; if (r > (n - r)) { r = (n - r); } for (int i = 0; i < r; i++) { val *= (n - i); val /= (i + 1); } return val; }
long func0(int M) { int n = M / 2; long a = bin_coff(2 * n, n); long b = a / (n + 1); return b; }
int main() { assert(func0(4) == 2); assert(func0(6) == 5); assert(func0(8) == 14); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x28,%rsp mov %edi,-0x24(%rbp) mov -0x24(%rbp),%eax mov %eax,%edx shr $0x1f,%edx add %edx,%eax sar %eax mov %eax,-0x14(%rbp) mov -0x14(%rbp),%eax lea (%rax,%rax,1),%edx mov -0x14(%rbp),%eax mov %eax,%esi mov %edx,%edi callq 1149 <b...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 28h mov [rbp+var_24], edi mov eax, [rbp+var_24] mov edx, eax shr edx, 1Fh add eax, edx sar eax, 1 mov [rbp+var_14], eax mov eax, [rbp+var_14] lea edx, [rax+rax] mov eax, [rbp+var_14] mov esi, eax mov edi, edx call ...
long long func0(int a1) { return bin_coff((unsigned int)(2 * (a1 / 2)), (unsigned int)(a1 / 2)) / (a1 / 2 + 1); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x28 MOV dword ptr [RBP + -0x24],EDI MOV EAX,dword ptr [RBP + -0x24] MOV EDX,EAX SHR EDX,0x1f ADD EAX,EDX SAR EAX,0x1 MOV dword ptr [RBP + -0x14],EAX MOV EAX,dword ptr [RBP + -0x14] LEA EDX,[RAX + RAX*0x1] MOV EAX,dword ptr [RBP + -0x14] MOV ESI,EAX MOV EDI,EDX CALL 0x0010114...
long func0(int param_1) { long lVar1; param_1 = param_1 / 2; lVar1 = bin_coff(param_1 * 2,param_1); return lVar1 / (long)(param_1 + 1); }
5,285
func0
#include <assert.h> long bin_coff(int n, int r) { long val = 1; if (r > (n - r)) { r = (n - r); } for (int i = 0; i < r; i++) { val *= (n - i); val /= (i + 1); } return val; }
long func0(int M) { int n = M / 2; long a = bin_coff(2 * n, n); long b = a / (n + 1); return b; }
int main() { assert(func0(4) == 2); assert(func0(6) == 5); assert(func0(8) == 14); return 0; }
O1
c
func0: endbr64 push %rbx mov %edi,%eax shr $0x1f,%eax lea (%rax,%rdi,1),%edi mov %edi,%ebx sar %ebx and $0xfffffffe,%edi mov %ebx,%esi callq 1149 <bin_coff> add $0x1,%ebx movslq %ebx,%rbx cqto idiv %rbx pop %rbx retq
func0: endbr64 push rbx mov eax, edi shr eax, 1Fh lea edi, [rax+rdi] mov ebx, edi sar ebx, 1 and edi, 0FFFFFFFEh mov esi, ebx call bin_coff add ebx, 1 movsxd rbx, ebx cqo idiv rbx pop rbx retn
long long func0(unsigned int a1) { return bin_coff(((a1 >> 31) + a1) & 0xFFFFFFFE, (unsigned int)((int)a1 / 2)) / ((int)a1 / 2 + 1); }
func0: ENDBR64 PUSH RBX MOV EAX,EDI SHR EAX,0x1f LEA EDI,[RAX + RDI*0x1] MOV EBX,EDI SAR EBX,0x1 AND EDI,0xfffffffe MOV ESI,EBX CALL 0x00101149 ADD EBX,0x1 MOVSXD RBX,EBX CQO IDIV RBX POP RBX RET
long func0(int param_1) { long lVar1; lVar1 = bin_coff(param_1 - (param_1 >> 0x1f) & 0xfffffffe,param_1 / 2); return lVar1 / (long)(param_1 / 2 + 1); }
5,286
func0
#include <assert.h> long bin_coff(int n, int r) { long val = 1; if (r > (n - r)) { r = (n - r); } for (int i = 0; i < r; i++) { val *= (n - i); val /= (i + 1); } return val; }
long func0(int M) { int n = M / 2; long a = bin_coff(2 * n, n); long b = a / (n + 1); return b; }
int main() { assert(func0(4) == 2); assert(func0(6) == 5); assert(func0(8) == 14); return 0; }
O2
c
func0: endbr64 mov %edi,%eax shr $0x1f,%eax lea (%rax,%rdi,1),%esi mov %esi,%r8d and $0xfffffffe,%esi sar %r8d mov %esi,%eax sub %r8d,%eax cmp %r8d,%eax cmovg %r8d,%eax test %eax,%eax jle 1208 <func0+0x68> lea -0x1(%rax),%edi movslq %esi,%rsi mov $0x1,%ecx mov $0x1,%eax add ...
func0: endbr64 mov eax, edi shr eax, 1Fh add eax, edi mov edi, eax and eax, 0FFFFFFFEh sar edi, 1 mov edx, eax sub eax, edi cmp eax, edi cmovg eax, edi test eax, eax jle short loc_1200 lea esi, [rdx+1] lea r8d, [rax+1] mov ecx, 1 mov eax, 1 movsxd rsi, esi n...
long long func0(unsigned int a1) { unsigned int v1; // eax int v2; // edi unsigned int v3; // edx int v4; // eax long long v5; // r8 long long v6; // rcx long long v7; // rax v1 = (a1 + (a1 >> 31)) & 0xFFFFFFFE; v2 = (int)a1 / 2; v3 = v1; v4 = v1 - v2; if ( v4 > v2 ) v4 = v2; if ( v4 <= ...
func0: ENDBR64 MOV EAX,EDI SHR EAX,0x1f ADD EAX,EDI MOV EDI,EAX AND EAX,0xfffffffe SAR EDI,0x1 MOV EDX,EAX SUB EAX,EDI CMP EAX,EDI CMOVG EAX,EDI TEST EAX,EAX JLE 0x00101200 LEA ESI,[RDX + 0x1] LEA R8D,[RAX + 0x1] MOV ECX,0x1 MOV EAX,0x1 MOVSXD RSI,ESI NOP dword ptr [RAX + RAX*0x1] LAB_001011d8: MOV RDX,RSI SUB RDX,RCX ...
long func0(int param_1) { int1 auVar1 [16]; uint uVar2; int iVar3; long lVar4; ulong uVar5; uVar2 = param_1 - (param_1 >> 0x1f) & 0xfffffffe; param_1 = param_1 / 2; iVar3 = uVar2 - param_1; if (param_1 < iVar3) { iVar3 = param_1; } if (0 < iVar3) { uVar5 = 1; lVar4 = 1; do { ...
5,287
func0
#include <assert.h> long bin_coff(int n, int r) { long val = 1; if (r > (n - r)) { r = (n - r); } for (int i = 0; i < r; i++) { val *= (n - i); val /= (i + 1); } return val; }
long func0(int M) { int n = M / 2; long a = bin_coff(2 * n, n); long b = a / (n + 1); return b; }
int main() { assert(func0(4) == 2); assert(func0(6) == 5); assert(func0(8) == 14); return 0; }
O3
c
func0: endbr64 mov %edi,%eax shr $0x1f,%eax lea (%rax,%rdi,1),%esi mov %esi,%r8d and $0xfffffffe,%esi sar %r8d mov %esi,%eax sub %r8d,%eax cmp %r8d,%eax cmovg %r8d,%eax test %eax,%eax jle 1208 <func0+0x68> lea -0x1(%rax),%edi movslq %esi,%rsi mov $0x1,%ecx mov $0x1,%eax add ...
func0: endbr64 mov esi, edi shr esi, 1Fh add esi, edi sar esi, 1 cmp edi, 1 jle short loc_11E0 movsxd rdi, esi mov ecx, 1 mov eax, 1 lea r8, [rdi+rdi+1] nop dword ptr [rax+00h] loc_11B8: mov rdx, r8 sub rdx, rcx imul rax, rdx cqo idiv rcx mov rdx, rcx add r...
long long func0(int a1) { int v1; // esi long long v2; // rcx long long v3; // rax long long v4; // rdx v1 = a1 / 2; if ( a1 <= 1 ) return 1LL / (v1 + 1); v2 = 1LL; v3 = 1LL; do { v3 = (2LL * v1 + 1 - v2) * v3 / v2; v4 = v2++; } while ( v1 != v4 ); return v3 / (v1 + 1); }
func0: ENDBR64 MOV ESI,EDI SHR ESI,0x1f ADD ESI,EDI SAR ESI,0x1 CMP EDI,0x1 JLE 0x001011e0 MOVSXD RDI,ESI MOV ECX,0x1 MOV EAX,0x1 LEA R8,[RDI + RDI*0x1 + 0x1] NOP dword ptr [RAX] LAB_001011b8: MOV RDX,R8 SUB RDX,RCX IMUL RAX,RDX CQO IDIV RCX MOV RDX,RCX ADD RCX,0x1 CMP RDI,RDX JNZ 0x001011b8 LEA ECX,[RSI + 0x1] CQO MOV...
long func0(int param_1) { int auVar1 [16]; long lVar2; long lVar3; int iVar4; bool bVar5; iVar4 = param_1 / 2; if (1 < param_1) { lVar2 = 1; lVar3 = 1; do { lVar2 = (lVar2 * (((long)iVar4 * 2 + 1) - lVar3)) / lVar3; bVar5 = iVar4 != lVar3; lVar3 = lVar3 + 1; } while (...
5,288
func0
#include <stdio.h> #include <string.h> #include <assert.h>
char* func0(char* string) { int has0 = 0; int has1 = 0; int hasOther = 0; for (int i = 0; i < strlen(string); i++) { if (string[i] == '0') { has0 = 1; } else if (string[i] == '1') { has1 = 1; } else { hasOther = 1; brea...
int main() { assert(strcmp(func0("01010101010"), "Yes") == 0); assert(strcmp(func0("name0"), "No") == 0); assert(strcmp(func0("101"), "Yes") == 0); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x28,%rsp mov %rdi,-0x28(%rbp) movl $0x0,-0x20(%rbp) movl $0x0,-0x1c(%rbp) movl $0x0,-0x18(%rbp) movl $0x0,-0x14(%rbp) jmp 11ff <func0+0x76> mov -0x14(%rbp),%eax movslq %eax,%rdx mov -0x28(%rbp),%rax add %rdx,%rax movzbl (%rax),%eax ...
func0: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 28h mov [rbp+s], rdi mov [rbp+var_20], 0 mov [rbp+var_1C], 0 mov [rbp+var_18], 0 mov [rbp+var_14], 0 jmp short loc_11FF loc_11B8: mov eax, [rbp+var_14] movsxd rdx, eax mov rax, [rbp+s] add rax, rdx movzx eax, byt...
const char * func0(const char *a1) { int v2; // [rsp+10h] [rbp-20h] int v3; // [rsp+14h] [rbp-1Ch] int v4; // [rsp+18h] [rbp-18h] int i; // [rsp+1Ch] [rbp-14h] v2 = 0; v3 = 0; v4 = 0; for ( i = 0; i < strlen(a1); ++i ) { if ( a1[i] == 48 ) { v2 = 1; } else { if ( a1[i]...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x28 MOV qword ptr [RBP + -0x28],RDI MOV dword ptr [RBP + -0x20],0x0 MOV dword ptr [RBP + -0x1c],0x0 MOV dword ptr [RBP + -0x18],0x0 MOV dword ptr [RBP + -0x14],0x0 JMP 0x001011ff LAB_001011b8: MOV EAX,dword ptr [RBP + -0x14] MOVSXD RDX,EAX MOV RAX,qword ptr [RBP + -...
int * func0(char *param_1) { bool bVar1; bool bVar2; bool bVar3; size_t sVar4; int *puVar5; int local_1c; bVar1 = false; bVar2 = false; bVar3 = false; local_1c = 0; do { sVar4 = strlen(param_1); if (sVar4 <= (ulong)(long)local_1c) { LAB_00101216: if (((!bVar1) && (!bVar2)) || (bV...
5,289
func0
#include <stdio.h> #include <string.h> #include <assert.h>
char* func0(char* string) { int has0 = 0; int has1 = 0; int hasOther = 0; for (int i = 0; i < strlen(string); i++) { if (string[i] == '0') { has0 = 1; } else if (string[i] == '1') { has1 = 1; } else { hasOther = 1; brea...
int main() { assert(strcmp(func0("01010101010"), "Yes") == 0); assert(strcmp(func0("name0"), "No") == 0); assert(strcmp(func0("101"), "Yes") == 0); return 0; }
O1
c
func0: endbr64 mov %rdi,%rsi mov $0xffffffffffffffff,%rcx mov $0x0,%eax repnz scas %es:(%rdi),%al not %rcx mov %rsi,%rdx lea -0x1(%rsi,%rcx,1),%rcx mov $0x0,%edi mov $0x0,%r8d mov $0x1,%esi jmp 1182 <func0+0x39> mov %esi,%r8d add $0x1,%rdx cmp %rcx,%rdx je 1196 <func0+0x4d> mo...
func0: endbr64 push rbx mov rbx, rdi call _strlen mov rdi, rax mov rax, rbx add rdi, rbx mov esi, 0 mov r8d, 0 mov ecx, 1 jmp short loc_11B8 loc_11B1: mov r8d, ecx loc_11B4: add rax, 1 loc_11B8: cmp rax, rdi jz short loc_11CE movzx edx, byte ptr [rax] cmp dl,...
void * func0(_BYTE *a1) { long long v2; // rdi _BYTE *v3; // rax _BYTE *v4; // rdi int v5; // esi int v6; // r8d void *result; // rax v2 = strlen(); v3 = a1; v4 = &a1[v2]; v5 = 0; v6 = 0; while ( v3 != v4 ) { if ( *v3 == 48 ) { v6 = 1; } else { if ( *v3 != 49 )...
func0: ENDBR64 PUSH RBX MOV RBX,RDI CALL 0x00101070 MOV RDI,RAX MOV RAX,RBX ADD RDI,RBX MOV ESI,0x0 MOV R8D,0x0 MOV ECX,0x1 JMP 0x001011b8 LAB_001011b1: MOV R8D,ECX LAB_001011b4: ADD RAX,0x1 LAB_001011b8: CMP RAX,RDI JZ 0x001011ce MOVZX EDX,byte ptr [RAX] CMP DL,0x30 JZ 0x001011b1 CMP DL,0x31 JNZ 0x001011e5 MOV ESI,ECX...
int * func0(char *param_1) { byte bVar1; byte bVar2; size_t sVar3; int *puVar4; char *pcVar5; sVar3 = strlen(param_1); pcVar5 = param_1 + sVar3; bVar1 = 0; bVar2 = 0; do { if (param_1 == pcVar5) { puVar4 = &DAT_00102004; if (!(bool)(bVar2 | bVar1)) { puVar4 = &DAT_0010200...
5,290
func0
#include <stdio.h> #include <string.h> #include <assert.h>
char* func0(char* string) { int has0 = 0; int has1 = 0; int hasOther = 0; for (int i = 0; i < strlen(string); i++) { if (string[i] == '0') { has0 = 1; } else if (string[i] == '1') { has1 = 1; } else { hasOther = 1; brea...
int main() { assert(strcmp(func0("01010101010"), "Yes") == 0); assert(strcmp(func0("name0"), "No") == 0); assert(strcmp(func0("101"), "Yes") == 0); return 0; }
O2
c
func0: endbr64 push %rbx mov %rdi,%rbx callq 1060 <strlen@plt> mov %rbx,%rdi xor %ecx,%ecx xor %esi,%esi add %rbx,%rax jmp 127e <func0+0x2e> nopl 0x0(%rax) cmp $0x31,%dl jne 12b0 <func0+0x60> mov $0x1,%ecx add $0x1,%rdi cmp %rdi,%rax je 1298 <func0+0x48> movzbl (%rdi),%edx cmp ...
func0: endbr64 push rbx mov rbx, rdi call _strlen mov rdi, rbx xor ecx, ecx xor esi, esi add rax, rbx jmp short loc_127E loc_1270: cmp dl, 31h ; '1' jnz short loc_12B0 mov ecx, 1 loc_127A: add rdi, 1 loc_127E: cmp rax, rdi jz short loc_1298 movzx edx, byte ptr [r...
void * func0(_BYTE *a1) { long long v1; // rax int v2; // ecx int v3; // esi _BYTE *v4; // rax void *result; // rax v1 = strlen(); v2 = 0; v3 = 0; v4 = &a1[v1]; while ( v4 != a1 ) { if ( *a1 == 48 ) { v3 = 1; } else { if ( *a1 != 49 ) return &unk_2008; ...
func0: ENDBR64 PUSH RBX MOV RBX,RDI CALL 0x00101070 MOV RDI,RBX XOR ECX,ECX XOR ESI,ESI ADD RAX,RBX JMP 0x0010127e LAB_00101270: CMP DL,0x31 JNZ 0x001012b0 MOV ECX,0x1 LAB_0010127a: ADD RDI,0x1 LAB_0010127e: CMP RAX,RDI JZ 0x00101298 MOVZX EDX,byte ptr [RDI] CMP DL,0x30 JNZ 0x00101270 MOV ESI,0x1 JMP 0x0010127a LAB_001...
int * func0(char *param_1) { bool bVar1; bool bVar2; size_t sVar3; char *pcVar4; int *puVar5; sVar3 = strlen(param_1); bVar2 = false; bVar1 = false; pcVar4 = param_1 + sVar3; do { if (pcVar4 == param_1) { puVar5 = &DAT_00102008; if (bVar1 || bVar2) { puVar5 = &DAT_0010200...
5,291
func0
#include <stdio.h> #include <string.h> #include <assert.h>
char* func0(char* string) { int has0 = 0; int has1 = 0; int hasOther = 0; for (int i = 0; i < strlen(string); i++) { if (string[i] == '0') { has0 = 1; } else if (string[i] == '1') { has1 = 1; } else { hasOther = 1; brea...
int main() { assert(strcmp(func0("01010101010"), "Yes") == 0); assert(strcmp(func0("name0"), "No") == 0); assert(strcmp(func0("101"), "Yes") == 0); return 0; }
O3
c
func0: endbr64 push %rbx mov %rdi,%rbx callq 1060 <strlen@plt> mov %rbx,%rdi xor %ecx,%ecx xor %esi,%esi add %rbx,%rax jmp 127e <func0+0x2e> nopl 0x0(%rax) cmp $0x31,%dl jne 12b0 <func0+0x60> mov $0x1,%ecx add $0x1,%rdi cmp %rdi,%rax je 1298 <func0+0x48> movzbl (%rdi),%edx cmp ...
func0: endbr64 push rbx mov rbx, rdi call _strlen mov rdi, rbx xor ecx, ecx xor esi, esi add rax, rbx jmp short loc_127E loc_1270: cmp dl, 31h ; '1' jnz short loc_12B0 mov ecx, 1 loc_127A: add rdi, 1 loc_127E: cmp rdi, rax jz short loc_1298 movzx edx, byte ptr [r...
const char * func0(const char *a1) { size_t v1; // rax int v2; // ecx int v3; // esi const char *v4; // rax const char *result; // rax v1 = strlen(a1); v2 = 0; v3 = 0; v4 = &a1[v1]; while ( a1 != v4 ) { if ( *a1 == 48 ) { v3 = 1; } else { if ( *a1 != 49 ) r...
func0: ENDBR64 PUSH RBX MOV RBX,RDI CALL 0x00101070 MOV RDI,RBX XOR ECX,ECX XOR ESI,ESI ADD RAX,RBX JMP 0x0010127e LAB_00101270: CMP DL,0x31 JNZ 0x001012b0 MOV ECX,0x1 LAB_0010127a: ADD RDI,0x1 LAB_0010127e: CMP RDI,RAX JZ 0x00101298 MOVZX EDX,byte ptr [RDI] CMP DL,0x30 JNZ 0x00101270 MOV ESI,0x1 JMP 0x0010127a LAB_001...
int * func0(char *param_1) { bool bVar1; bool bVar2; size_t sVar3; char *pcVar4; int *puVar5; sVar3 = strlen(param_1); bVar2 = false; bVar1 = false; pcVar4 = param_1 + sVar3; do { if (param_1 == pcVar4) { puVar5 = &DAT_00102004; if (!bVar1 && !bVar2) { puVar5 = &DAT_00102...
5,292
func0
#include <assert.h> #include <string.h>
int func0(const char* s) { int maxOcc = 0; int n = strlen(s); int arr[26] = {0}; for (int i = 0; i < n; i++) { arr[s[i] - 'a']++; } for (int i = 0; i < 26; i++) { if (arr[i] > maxOcc) { maxOcc = arr[i]; } } return n - maxOcc; }
int main() { assert(func0("mnm") == 1); assert(func0("abcda") == 3); assert(func0("abcb") == 2); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x90,%rsp mov %rdi,-0x88(%rbp) mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax movl $0x0,-0x80(%rbp) mov -0x88(%rbp),%rax mov %rax,%rdi callq 1070 <strlen@plt> mov %eax,-0x74(%rbp) lea -0x70(%rbp),%rdx mov $0x0,%eax mov $0xd,%ecx m...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 90h mov [rbp+s], rdi mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax mov [rbp+var_80], 0 mov rax, [rbp+s] mov rdi, rax; s call _strlen mov [rbp+var_74], eax lea rdx, [rbp+var_70] mov eax, 0 mov ecx, 0Dh mov rdi...
long long func0(const char *a1) { int v1; // eax int v3; // [rsp+10h] [rbp-80h] int i; // [rsp+14h] [rbp-7Ch] int j; // [rsp+18h] [rbp-78h] int v6; // [rsp+1Ch] [rbp-74h] _DWORD v7[26]; // [rsp+20h] [rbp-70h] BYREF unsigned long long v8; // [rsp+88h] [rbp-8h] v8 = __readfsqword(0x28u); v3 = 0; v6 ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV qword ptr [RBP + -0x88],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX MOV dword ptr [RBP + -0x80],0x0 MOV RAX,qword ptr [RBP + -0x88] MOV RDI,RAX CALL 0x00101070 MOV dword ptr [RBP + -0x74],EAX LEA RDX,[RBP + -0x70] MOV EAX,0x0 MOV ECX,0x...
int func0(char *param_1) { size_t sVar1; long lVar2; int *piVar3; long in_FS_OFFSET; byte bVar4; int local_88; int local_84; int local_80; int local_78 [26]; long local_10; bVar4 = 0; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_88 = 0; sVar1 = strlen(param_1); piVar3 = local_78; ...
5,293
func0
#include <assert.h> #include <string.h>
int func0(const char* s) { int maxOcc = 0; int n = strlen(s); int arr[26] = {0}; for (int i = 0; i < n; i++) { arr[s[i] - 'a']++; } for (int i = 0; i < 26; i++) { if (arr[i] > maxOcc) { maxOcc = arr[i]; } } return n - maxOcc; }
int main() { assert(func0("mnm") == 1); assert(func0("abcda") == 3); assert(func0("abcb") == 2); return 0; }
O1
c
func0: endbr64 sub $0x78,%rsp mov %rdi,%rsi mov %fs:0x28,%rax mov %rax,0x68(%rsp) xor %eax,%eax mov $0xffffffffffffffff,%rcx repnz scas %es:(%rdi),%al not %rcx lea -0x1(%rcx),%r8 mov %rsp,%rdi mov $0xd,%ecx mov $0x0,%eax rep stos %rax,%es:(%rdi) test %r8d,%r8d jle 11ca <func0+0x61>...
func0: endbr64 push rbx sub rsp, 70h mov rbx, rdi mov rax, fs:28h mov [rsp+78h+var_10], rax xor eax, eax call _strlen mov r8, rax mov rdi, rsp mov ecx, 0Dh mov eax, 0 rep stosq test r8d, r8d jle short loc_11E3 mov rdx, rbx lea eax, [r8-1] lea rcx, [rbx+rax+1]...
long long func0(char *a1) { int v1; // r8d char *v2; // rdx unsigned long long *v3; // rax int v4; // edx _DWORD v6[26]; // [rsp+0h] [rbp-78h] BYREF unsigned long long v7; // [rsp+68h] [rbp-10h] BYREF v7 = __readfsqword(0x28u); v1 = strlen(); memset(v6, 0, sizeof(v6)); if ( v1 > 0 ) { v2 = a...
func0: ENDBR64 PUSH RBX SUB RSP,0x70 MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x68],RAX XOR EAX,EAX CALL 0x00101070 MOV R8,RAX MOV RDI,RSP MOV ECX,0xd MOV EAX,0x0 STOSQ.REP RDI TEST R8D,R8D JLE 0x001011e3 MOV RDX,RBX LEA EAX,[R8 + -0x1] LEA RCX,[RBX + RAX*0x1 + 0x1] LAB_001011ce: MOVSX EAX,byte ptr ...
int func0(char *param_1) { int *piVar1; char *pcVar2; size_t sVar3; long *plVar4; long lVar5; int iVar6; long *plVar7; int iVar8; long in_FS_OFFSET; byte bVar9; long local_78 [13]; long local_10; bVar9 = 0; plVar4 = local_78; local_10 = *(long *)(in_FS_OFFSET + 0x28); sVar3 = strlen(...
5,294
func0
#include <assert.h> #include <string.h>
int func0(const char* s) { int maxOcc = 0; int n = strlen(s); int arr[26] = {0}; for (int i = 0; i < n; i++) { arr[s[i] - 'a']++; } for (int i = 0; i < 26; i++) { if (arr[i] > maxOcc) { maxOcc = arr[i]; } } return n - maxOcc; }
int main() { assert(func0("mnm") == 1); assert(func0("abcda") == 3); assert(func0("abcb") == 2); return 0; }
O2
c
func0: endbr64 push %rbx mov %rdi,%rbx sub $0x70,%rsp mov %fs:0x28,%rax mov %rax,0x68(%rsp) xor %eax,%eax callq 1070 <strlen@plt> mov %rsp,%rdi mov $0xd,%ecx mov %rax,%r8 xor %eax,%eax rep stos %rax,%es:(%rdi) test %r8d,%r8d jle 12cb <func0+0x9b> lea -0x1(%r8),%eax mov %rbx,%rdi...
func0: endbr64 push rbx mov rbx, rdi sub rsp, 70h mov rax, fs:28h mov [rsp+78h+var_10], rax xor eax, eax call _strlen mov rdi, rsp mov ecx, 0Dh mov r8, rax xor eax, eax rep stosq test r8d, r8d jle short loc_12CB lea eax, [r8-1] mov rdi, rbx lea rdx, [rbx+rax+...
long long func0(char *a1) { int v1; // r8d long long v2; // rdx int v3; // eax int v4; // ecx unsigned long long *v5; // rax int v6; // edx _DWORD v8[26]; // [rsp+0h] [rbp-78h] BYREF unsigned long long v9; // [rsp+68h] [rbp-10h] BYREF v9 = __readfsqword(0x28u); v1 = strlen(); memset(v8, 0, sizeo...
func0: ENDBR64 PUSH RBX MOV RBX,RDI SUB RSP,0x70 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x68],RAX XOR EAX,EAX CALL 0x00101070 MOV RDI,RSP MOV ECX,0xd MOV R8,RAX XOR EAX,EAX STOSQ.REP RDI TEST R8D,R8D JLE 0x001012cb LEA EAX,[R8 + -0x1] MOV RDI,RBX LEA RDX,[RBX + RAX*0x1 + 0x1] NOP word ptr [RAX + RAX*0x1] LAB_...
int func0(char *param_1) { int *piVar1; char *pcVar2; char cVar3; size_t sVar4; long lVar5; int iVar6; long *plVar7; int8 *puVar8; int iVar9; long in_FS_OFFSET; byte bVar10; int8 local_78; long local_10; bVar10 = 0; plVar7 = &local_78; local_10 = *(long *)(in_FS_OFFSET + 0x28); sVa...
5,295
func0
#include <assert.h> #include <string.h>
int func0(const char* s) { int maxOcc = 0; int n = strlen(s); int arr[26] = {0}; for (int i = 0; i < n; i++) { arr[s[i] - 'a']++; } for (int i = 0; i < 26; i++) { if (arr[i] > maxOcc) { maxOcc = arr[i]; } } return n - maxOcc; }
int main() { assert(func0("mnm") == 1); assert(func0("abcda") == 3); assert(func0("abcb") == 2); return 0; }
O3
c
func0: endbr64 push %rbx mov %rdi,%rbx sub $0x70,%rsp mov %fs:0x28,%rax mov %rax,0x68(%rsp) xor %eax,%eax callq 1070 <strlen@plt> mov %rsp,%rdi mov $0xd,%ecx mov %rax,%rsi xor %eax,%eax rep stos %rax,%es:(%rdi) test %esi,%esi jle 1285 <func0+0x55> lea -0x1(%rsi),%eax mov %rbx,%r...
func0: endbr64 push rbx mov rbx, rdi sub rsp, 70h mov rax, fs:28h mov [rsp+78h+var_10], rax xor eax, eax call _strlen mov rdi, rsp mov ecx, 0Dh mov rsi, rax xor eax, eax rep stosq test esi, esi jle short loc_1285 lea eax, [rsi-1] mov rdi, rbx lea rdx, [rbx+ra...
long long func0(const char *a1) { int v1; // esi long long v2; // rdx int v3; // eax __m128i si128; // xmm1 int v5; // edx __m128i v6; // xmm0 __m128i v7; // xmm0 __m128i v8; // xmm1 __m128i v9; // xmm2 __m128i v10; // xmm2 __m128i v11; // xmm1 __m128i v12; // xmm0 __m128i v13; // xmm1 __m1...
func0: ENDBR64 PUSH RBX MOV RBX,RDI SUB RSP,0x70 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x68],RAX XOR EAX,EAX CALL 0x00101070 MOV RDI,RSP MOV ECX,0xd MOV RSI,RAX XOR EAX,EAX STOSQ.REP RDI TEST ESI,ESI JLE 0x00101285 LEA EAX,[RSI + -0x1] MOV RDI,RBX LEA RDX,[RBX + RAX*0x1 + 0x1] LAB_00101270: MOVSX EAX,byte pt...
int func0(char *param_1) { char *pcVar1; char cVar2; int auVar3 [16]; int auVar4 [16]; size_t sVar5; long lVar6; int iVar7; int *piVar8; long in_FS_OFFSET; byte bVar9; uint uVar10; int auVar12 [16]; int auVar13 [16]; uint uVar14; int auVar15 [16]; int auVar16 [16]; int auVar17 [16]; ...
5,296
func0
#include <assert.h>
int func0(int arr[], int n, int k) { int count_map[256] = {0}; // Assuming the range of elements in array is 0-255 int i; for (i = 0; i < n; i++) { count_map[arr[i]]++; } for (i = 0; i < n; i++) { if (count_map[arr[i]] == k) { return arr[i]; } ...
int main() { assert(func0((int[]){0,1,2,3,4,5},6,1) == 0); assert(func0((int[]){1,2,1,3,4},5,2) == 1); assert(func0((int[]){2,3,4,3,5,7,1,2,3,5},10,2) == 2); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x430,%rsp mov %rdi,-0x428(%rbp) mov %esi,-0x42c(%rbp) mov %edx,-0x430(%rbp) mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax lea -0x410(%rbp),%rdx mov $0x0,%eax mov $0x80,%ecx mov %rdx,%rdi rep stos %rax,%es:(%rdi) movl $0x0,-0x414(...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 430h mov [rbp+var_428], rdi mov [rbp+var_42C], esi mov [rbp+var_430], edx mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax lea rdx, [rbp+var_410] mov eax, 0 mov ecx, 80h mov rdi, rdx rep stosq mov [rbp+var_414], 0 jmp ...
long long func0(long long a1, int a2, int a3) { int i; // [rsp+1Ch] [rbp-414h] int j; // [rsp+1Ch] [rbp-414h] _DWORD v6[258]; // [rsp+20h] [rbp-410h] BYREF unsigned long long v7; // [rsp+428h] [rbp-8h] v7 = __readfsqword(0x28u); memset(v6, 0, 0x400uLL); for ( i = 0; i < a2; ++i ) ++v6[*(int *)(4LL *...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x430 MOV qword ptr [RBP + -0x428],RDI MOV dword ptr [RBP + -0x42c],ESI MOV dword ptr [RBP + -0x430],EDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX LEA RDX,[RBP + -0x410] MOV EAX,0x0 MOV ECX,0x80 MOV RDI,RDX STOSQ.REP RDI MOV dword ptr [RBP + -0x41...
int4 func0(long param_1,int param_2,int param_3) { int iVar1; int4 uVar2; long lVar3; int *piVar4; long in_FS_OFFSET; int local_41c; int local_418 [258]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); piVar4 = local_418; for (lVar3 = 0x80; lVar3 != 0; lVar3 = lVar3 + -1) { piVar...
5,297
func0
#include <assert.h>
int func0(int arr[], int n, int k) { int count_map[256] = {0}; // Assuming the range of elements in array is 0-255 int i; for (i = 0; i < n; i++) { count_map[arr[i]]++; } for (i = 0; i < n; i++) { if (count_map[arr[i]] == k) { return arr[i]; } ...
int main() { assert(func0((int[]){0,1,2,3,4,5},6,1) == 0); assert(func0((int[]){1,2,1,3,4},5,2) == 1); assert(func0((int[]){2,3,4,3,5,7,1,2,3,5},10,2) == 2); return 0; }
O1
c
func0: endbr64 sub $0x418,%rsp mov %rdi,%r8 mov %fs:0x28,%rax mov %rax,0x408(%rsp) xor %eax,%eax mov %rsp,%rdi mov $0x80,%ecx rep stos %rax,%es:(%rdi) test %esi,%esi jle 11ec <func0+0x83> mov %r8,%rax lea -0x1(%rsi),%ecx lea 0x4(%r8,%rcx,4),%r9 mov %r8,%rdi movslq (%rdi),%rcx addl ...
func0: endbr64 sub rsp, 418h mov r8, rdi mov rax, fs:28h mov [rsp+418h+var_10], rax xor eax, eax mov rdi, rsp mov ecx, 80h rep stosq test esi, esi jle short loc_11EE mov r9d, edx mov rdx, r8 lea eax, [rsi-1] lea rsi, [r8+rax*4+4] mov rax, r8 loc_11AA: movsxd rcx, ...
long long func0(int *a1, int a2, int a3) { unsigned int *v4; // rdx long long v5; // rsi int *v6; // rax long long result; // rax _DWORD v8[258]; // [rsp+0h] [rbp-418h] BYREF unsigned long long v9; // [rsp+408h] [rbp-10h] v9 = __readfsqword(0x28u); memset(v8, 0, 0x400uLL); if ( a2 <= 0 ) return ...
func0: ENDBR64 SUB RSP,0x418 MOV R8,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x408],RAX XOR EAX,EAX MOV RDI,RSP MOV ECX,0x80 STOSQ.REP RDI TEST ESI,ESI JLE 0x001011ee MOV R9D,EDX MOV RDX,R8 LEA EAX,[RSI + -0x1] LEA RSI,[R8 + RAX*0x4 + 0x4] MOV RAX,R8 LAB_001011aa: MOVSXD RCX,dword ptr [RAX] ADD dword ptr [R...
int func0(int *param_1,int param_2,int param_3) { int iVar1; int *piVar2; long lVar3; int *piVar4; long in_FS_OFFSET; int aiStack_418 [258]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); piVar4 = aiStack_418; for (lVar3 = 0x80; lVar3 != 0; lVar3 = lVar3 + -1) { *(int8 *)piVar4 = ...
5,298
func0
#include <assert.h>
int func0(int arr[], int n, int k) { int count_map[256] = {0}; // Assuming the range of elements in array is 0-255 int i; for (i = 0; i < n; i++) { count_map[arr[i]]++; } for (i = 0; i < n; i++) { if (count_map[arr[i]] == k) { return arr[i]; } ...
int main() { assert(func0((int[]){0,1,2,3,4,5},6,1) == 0); assert(func0((int[]){1,2,1,3,4},5,2) == 1); assert(func0((int[]){2,3,4,3,5,7,1,2,3,5},10,2) == 2); return 0; }
O2
c
func0: endbr64 sub $0x418,%rsp mov %rdi,%r8 mov $0x80,%ecx mov %fs:0x28,%rax mov %rax,0x408(%rsp) xor %eax,%eax mov %rsp,%rdi rep stos %rax,%es:(%rdi) test %esi,%esi jle 1370 <func0+0x90> lea -0x1(%rsi),%eax mov %r8,%rdi lea 0x4(%r8,%rax,4),%rsi mov %r8,%rax xchg %ax,%ax movslq (...
func0: endbr64 sub rsp, 418h mov r8, rdi mov ecx, 80h mov rax, fs:28h mov [rsp+418h+var_10], rax xor eax, eax mov rdi, rsp rep stosq test esi, esi jle short loc_1380 lea eax, [rsi-1] mov r9d, edx mov rdi, r8 lea rcx, [r8+rax*4+4] mov rax, r8 nop dword ptr [rax+...
long long func0(int *a1, int a2, int a3) { long long v4; // rcx int *v5; // rax long long v6; // rdx long long result; // rax _DWORD v8[258]; // [rsp+0h] [rbp-418h] BYREF unsigned long long v9; // [rsp+408h] [rbp-10h] v9 = __readfsqword(0x28u); memset(v8, 0, 0x400uLL); if ( a2 <= 0 ) return 0xFF...
func0: ENDBR64 SUB RSP,0x418 MOV R8,RDI MOV ECX,0x80 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x408],RAX XOR EAX,EAX MOV RDI,RSP STOSQ.REP RDI TEST ESI,ESI JLE 0x00101380 LEA EAX,[RSI + -0x1] MOV R9D,EDX MOV RDI,R8 LEA RCX,[R8 + RAX*0x4 + 0x4] MOV RAX,R8 NOP dword ptr [RAX] LAB_00101328: MOVSXD RDX,dword ptr [R...
long func0(int *param_1,int param_2,int param_3) { int iVar1; int *piVar2; long lVar3; int *piVar4; long in_FS_OFFSET; int aiStack_418 [258]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); piVar4 = aiStack_418; for (lVar3 = 0x80; lVar3 != 0; lVar3 = lVar3 + -1) { *(int8 *)piVar4 =...
5,299
func0
#include <assert.h>
int func0(int arr[], int n, int k) { int count_map[256] = {0}; // Assuming the range of elements in array is 0-255 int i; for (i = 0; i < n; i++) { count_map[arr[i]]++; } for (i = 0; i < n; i++) { if (count_map[arr[i]] == k) { return arr[i]; } ...
int main() { assert(func0((int[]){0,1,2,3,4,5},6,1) == 0); assert(func0((int[]){1,2,1,3,4},5,2) == 1); assert(func0((int[]){2,3,4,3,5,7,1,2,3,5},10,2) == 2); return 0; }
O3
c
func0: endbr64 sub $0x418,%rsp mov %rdi,%r8 mov $0x80,%ecx mov %fs:0x28,%rax mov %rax,0x408(%rsp) xor %eax,%eax mov %rsp,%rdi rep stos %rax,%es:(%rdi) test %esi,%esi jle 1340 <func0+0x90> lea -0x1(%rsi),%eax mov %r8,%rdi lea 0x4(%r8,%rax,4),%rsi mov %r8,%rax xchg %ax,%ax movslq (...
func0: endbr64 sub rsp, 418h mov r8, rdi mov ecx, 80h mov rax, fs:28h mov [rsp+418h+var_10], rax xor eax, eax mov rdi, rsp rep stosq test esi, esi jle short loc_1340 movsxd rsi, esi mov r9d, edx mov rdi, r8 mov rax, r8 lea rcx, [r8+rsi*4] loc_12F0: movsxd rdx, dword ...
long long func0(int *a1, int a2, int a3) { int *v4; // rax int *v5; // rcx long long v6; // rdx long long result; // rax _DWORD v8[258]; // [rsp+0h] [rbp-418h] BYREF unsigned long long v9; // [rsp+408h] [rbp-10h] v9 = __readfsqword(0x28u); memset(v8, 0, 0x400uLL); if ( a2 <= 0 ) return 0xFFFFFFF...
func0: ENDBR64 SUB RSP,0x418 MOV R8,RDI MOV ECX,0x80 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x408],RAX XOR EAX,EAX MOV RDI,RSP STOSQ.REP RDI TEST ESI,ESI JLE 0x00101340 MOVSXD RSI,ESI MOV R9D,EDX MOV RDI,R8 MOV RAX,R8 LEA RCX,[R8 + RSI*0x4] LAB_001012f0: MOVSXD RDX,dword ptr [RAX] ADD RAX,0x4 ADD dword ptr [R...
long func0(int *param_1,int param_2,int param_3) { int iVar1; int *piVar2; long lVar3; int *piVar4; long in_FS_OFFSET; int aiStack_418 [258]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); piVar4 = aiStack_418; for (lVar3 = 0x80; lVar3 != 0; lVar3 = lVar3 + -1) { *(int8 *)piVar4 =...
5,300
func0
#include <stdbool.h> #include <assert.h> #include <string.h>
bool func0(const char* str) { for (int i = 0; i < strlen(str); i++) { for (int j = i + 1; j < strlen(str); j++) { if (str[i] == str[j]) { return false; } } } return true; }
int main() { assert(func0("aba") == false); assert(func0("abc") == true); assert(func0("abab") == false); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x28,%rsp mov %rdi,-0x28(%rbp) movl $0x0,-0x18(%rbp) jmp 11d8 <func0+0x6f> mov -0x18(%rbp),%eax add $0x1,%eax mov %eax,-0x14(%rbp) jmp 11bd <func0+0x54> mov -0x18(%rbp),%eax movslq %eax,%rdx mov -0x28(%rbp),%rax add %rdx,%rax m...
func0: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 28h mov [rbp+s], rdi mov [rbp+var_18], 0 jmp short loc_11D8 loc_1183: mov eax, [rbp+var_18] add eax, 1 mov [rbp+var_14], eax jmp short loc_11BD loc_118E: mov eax, [rbp+var_18] movsxd rdx, eax mov rax, [rbp+s] add ...
long long func0(const char *a1) { int i; // [rsp+18h] [rbp-18h] int j; // [rsp+1Ch] [rbp-14h] for ( i = 0; i < strlen(a1); ++i ) { for ( j = i + 1; j < strlen(a1); ++j ) { if ( a1[i] == a1[j] ) return 0LL; } } return 1LL; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x28 MOV qword ptr [RBP + -0x28],RDI MOV dword ptr [RBP + -0x18],0x0 JMP 0x001011d8 LAB_00101183: MOV EAX,dword ptr [RBP + -0x18] ADD EAX,0x1 MOV dword ptr [RBP + -0x14],EAX JMP 0x001011bd LAB_0010118e: MOV EAX,dword ptr [RBP + -0x18] MOVSXD RDX,EAX MOV RAX,qword ptr...
int8 func0(char *param_1) { size_t sVar1; int local_20; int local_1c; local_20 = 0; do { sVar1 = strlen(param_1); local_1c = local_20; if (sVar1 <= (ulong)(long)local_20) { return 1; } while( true ) { local_1c = local_1c + 1; sVar1 = strlen(param_1); if (sVar1 <...
5,301
func0
#include <stdbool.h> #include <assert.h> #include <string.h>
bool func0(const char* str) { for (int i = 0; i < strlen(str); i++) { for (int j = i + 1; j < strlen(str); j++) { if (str[i] == str[j]) { return false; } } } return true; }
int main() { assert(func0("aba") == false); assert(func0("abc") == true); assert(func0("abab") == false); return 0; }
O1
c
func0: endbr64 mov %rdi,%r8 mov $0xffffffffffffffff,%rcx mov $0x0,%eax repnz scas %es:(%rdi),%al not %rcx lea -0x1(%rcx),%r9 mov $0x1,%edi lea (%r8,%r9,1),%rsi cmp %rcx,%rdi je 1197 <func0+0x4e> cmp %rdi,%r9 jbe 1191 <func0+0x48> movzbl -0x1(%r8,%rdi,1),%edx movslq %edi,%rax add %r8...
func0: endbr64 push rbx mov rbx, rdi call _strlen lea r8, [rax+1] mov edi, 1 lea rsi, [rbx+rax] loc_1183: cmp rdi, r8 jz short loc_11AB cmp rax, rdi jbe short loc_11A5 movzx ecx, byte ptr [rbx+rdi-1] movsxd rdx, edi add rdx, rbx loc_1198: cmp cl, [rdx] jz short loc...
long long func0(long long a1) { unsigned long long v2; // rax unsigned long long i; // rdi _BYTE *v4; // rdx v2 = strlen(); for ( i = 1LL; ; ++i ) { if ( i == v2 + 1 ) return 1LL; if ( v2 > i ) break; LABEL_7: ; } v4 = (_BYTE *)(a1 + (int)i); while ( *(_BYTE *)(a1 + i - 1) !=...
func0: ENDBR64 PUSH RBX MOV RBX,RDI CALL 0x00101060 LEA R8,[RAX + 0x1] MOV EDI,0x1 LEA RSI,[RBX + RAX*0x1] LAB_00101183: CMP RDI,R8 JZ 0x001011ab CMP RAX,RDI JBE 0x001011a5 MOVZX ECX,byte ptr [RBX + RDI*0x1 + -0x1] MOVSXD RDX,EDI ADD RDX,RBX LAB_00101198: CMP CL,byte ptr [RDX] JZ 0x001011b2 ADD RDX,0x1 CMP RDX,RSI JNZ ...
int8 func0(char *param_1) { size_t sVar1; char *pcVar2; ulong uVar3; sVar1 = strlen(param_1); uVar3 = 1; do { if (uVar3 == sVar1 + 1) { return 1; } if (uVar3 < sVar1) { pcVar2 = param_1 + (int)uVar3; do { if (param_1[uVar3 - 1] == *pcVar2) { return 0; ...
5,302
func0
#include <stdbool.h> #include <assert.h> #include <string.h>
bool func0(const char* str) { for (int i = 0; i < strlen(str); i++) { for (int j = i + 1; j < strlen(str); j++) { if (str[i] == str[j]) { return false; } } } return true; }
int main() { assert(func0("aba") == false); assert(func0("abc") == true); assert(func0("abab") == false); return 0; }
O2
c
func0: endbr64 push %rbx mov %rdi,%rbx callq 1060 <strlen@plt> mov $0x1,%r8d lea 0x1(%rax),%rdi lea (%rbx,%rax,1),%rsi cmp %rdi,%r8 je 1269 <func0+0x59> cmp %r8,%rax jbe 1260 <func0+0x50> movslq %r8d,%rdx movzbl -0x1(%rbx,%r8,1),%ecx add %rbx,%rdx jmp 1251 <func0+0x41> nopl 0x0(%rax,...
func0: endbr64 push rbx mov rbx, rdi call _strlen mov r8d, 1 lea rdi, [rax+1] lea rsi, [rbx+rax] cmp r8, rdi jz short loc_1269 loc_1230: cmp rax, r8 jbe short loc_1260 movsxd rdx, r8d movzx ecx, byte ptr [rbx+r8-1] add rdx, rbx jmp short loc_1251 loc_1248: add rdx, ...
long long func0(long long a1) { unsigned long long v1; // rax unsigned long long v2; // r8 _BYTE *v3; // rdx v1 = strlen(); v2 = 1LL; if ( !v1 ) return 1LL; while ( v1 <= v2 ) { LABEL_7: if ( ++v2 == v1 + 1 ) return 1LL; } v3 = (_BYTE *)(a1 + (int)v2); while ( *(_BYTE *)(a1 + v2 - ...
func0: ENDBR64 PUSH RBX MOV RBX,RDI CALL 0x00101060 MOV R8D,0x1 LEA RDI,[RAX + 0x1] LEA RSI,[RBX + RAX*0x1] CMP R8,RDI JZ 0x00101269 LAB_00101230: CMP RAX,R8 JBE 0x00101260 MOVSXD RDX,R8D MOVZX ECX,byte ptr [RBX + R8*0x1 + -0x1] ADD RDX,RBX JMP 0x00101251 LAB_00101248: ADD RDX,0x1 CMP RDX,RSI JZ 0x00101260 LAB_00101251...
int8 func0(char *param_1) { size_t sVar1; char *pcVar2; ulong uVar3; sVar1 = strlen(param_1); uVar3 = 1; if (sVar1 + 1 != 1) { do { if (uVar3 < sVar1) { pcVar2 = param_1 + (int)uVar3; do { if (param_1[uVar3 - 1] == *pcVar2) { return 0; } ...
5,303
func0
#include <stdbool.h> #include <assert.h> #include <string.h>
bool func0(const char* str) { for (int i = 0; i < strlen(str); i++) { for (int j = i + 1; j < strlen(str); j++) { if (str[i] == str[j]) { return false; } } } return true; }
int main() { assert(func0("aba") == false); assert(func0("abc") == true); assert(func0("abab") == false); return 0; }
O3
c
func0: endbr64 push %rbx mov %rdi,%rbx callq 1060 <strlen@plt> mov $0x1,%r8d lea 0x1(%rax),%rdi lea (%rbx,%rax,1),%rsi cmp %rdi,%r8 je 1269 <func0+0x59> cmp %r8,%rax jbe 1260 <func0+0x50> movslq %r8d,%rdx movzbl -0x1(%rbx,%r8,1),%ecx add %rbx,%rdx jmp 1251 <func0+0x41> nopl 0x0(%rax,...
func0: endbr64 push rbx mov rbx, rdi call _strlen mov r8d, 1 lea rdi, [rax+1] lea rsi, [rbx+rax] cmp r8, rdi jz short loc_1269 loc_1230: cmp r8, rax jnb short loc_1260 movsxd rdx, r8d movzx ecx, byte ptr [rbx+r8-1] add rdx, rbx jmp short loc_1251 loc_1248: add rdx, ...
long long func0(const char *a1) { size_t v1; // rax unsigned long long v2; // r8 const char *v3; // rdx v1 = strlen(a1); v2 = 1LL; if ( !v1 ) return 1LL; while ( v2 >= v1 ) { LABEL_7: if ( ++v2 == v1 + 1 ) return 1LL; } v3 = &a1[(int)v2]; while ( a1[v2 - 1] != *v3 ) { if ( ++...
func0: ENDBR64 PUSH RBX MOV RBX,RDI CALL 0x00101060 MOV R8D,0x1 LEA RDI,[RAX + 0x1] LEA RSI,[RBX + RAX*0x1] CMP R8,RDI JZ 0x00101269 LAB_00101230: CMP R8,RAX JNC 0x00101260 MOVSXD RDX,R8D MOVZX ECX,byte ptr [RBX + R8*0x1 + -0x1] ADD RDX,RBX JMP 0x00101251 LAB_00101248: ADD RDX,0x1 CMP RDX,RSI JZ 0x00101260 LAB_00101251...
int8 func0(char *param_1) { size_t sVar1; char *pcVar2; ulong uVar3; sVar1 = strlen(param_1); uVar3 = 1; if (sVar1 + 1 != 1) { do { if (uVar3 < sVar1) { pcVar2 = param_1 + (int)uVar3; do { if (param_1[uVar3 - 1] == *pcVar2) { return 0; } ...
5,304
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> #include <string.h> typedef struct { int* data; int length; } Row;
Row* func0(Row list1[], int num_rows, int n) { for(int i = 0; i < num_rows; i++) { if(n < list1[i].length) { for(int j = n; j < list1[i].length -1; j++) { list1[i].data[j] = list1[i].data[j+1]; } list1[i].length -=1; } } return lis...
int main() { // Test case 1 { int row0[] = {1, 2, 3}; int row1[] = {2, 4, 5}; int row2[] = {1, 1, 1}; Row list1[3]; list1[0].data = row0; list1[0].length = 3; list1[1].data = row1; list1[1].length = 3; list1[2].data = row2; ...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) mov %edx,-0x20(%rbp) movl $0x0,-0x8(%rbp) jmpq 1272 <func0+0xe9> mov -0x8(%rbp),%eax cltq shl $0x4,%rax mov %rax,%rdx mov -0x18(%rbp),%rax add %rdx,%rax mov 0x8(%rax),%eax cmp %eax,-0x20(%rbp) jge ...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_20], edx mov [rbp+var_8], 0 jmp loc_1272 loc_11A7: mov eax, [rbp+var_8] cdqe shl rax, 4 mov rdx, rax mov rax, [rbp+var_18] add rax, rdx mov eax, [rax+8] cmp [rbp+var_20], ...
long long func0(long long a1, int a2, int a3) { int i; // [rsp+18h] [rbp-8h] int j; // [rsp+1Ch] [rbp-4h] for ( i = 0; i < a2; ++i ) { if ( a3 < *(_DWORD *)(16LL * i + a1 + 8) ) { for ( j = a3; j < *(_DWORD *)(16LL * i + a1 + 8) - 1; ++j ) *(_DWORD *)(4LL * j + *(_QWORD *)(16LL * i + a1)...
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV dword ptr [RBP + -0x20],EDX MOV dword ptr [RBP + -0x8],0x0 JMP 0x00101272 LAB_001011a7: MOV EAX,dword ptr [RBP + -0x8] CDQE SHL RAX,0x4 MOV RDX,RAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,RDX MOV EAX,dword ptr [RAX +...
long func0(long param_1,int param_2,int param_3) { int4 local_10; int4 local_c; for (local_10 = 0; local_10 < param_2; local_10 = local_10 + 1) { local_c = param_3; if (param_3 < *(int *)(param_1 + (long)local_10 * 0x10 + 8)) { for (; local_c < *(int *)(param_1 + (long)local_10 * 0x10 + 8) + -1;...
5,305
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> #include <string.h> typedef struct { int* data; int length; } Row;
Row* func0(Row list1[], int num_rows, int n) { for(int i = 0; i < num_rows; i++) { if(n < list1[i].length) { for(int j = n; j < list1[i].length -1; j++) { list1[i].data[j] = list1[i].data[j+1]; } list1[i].length -=1; } } return lis...
int main() { // Test case 1 { int row0[] = {1, 2, 3}; int row1[] = {2, 4, 5}; int row2[] = {1, 1, 1}; Row list1[3]; list1[0].data = row0; list1[0].length = 3; list1[1].data = row1; list1[1].length = 3; list1[2].data = row2; ...
O1
c
func0: endbr64 test %esi,%esi jle 11f6 <func0+0x6d> push %rbx lea 0x8(%rdi),%r9 lea -0x1(%rsi),%eax shl $0x4,%rax lea 0x18(%rdi,%rax,1),%r11 movslq %edx,%rax lea 0x4(,%rax,4),%rbx jmp 11bb <func0+0x32> mov %eax,(%r8) add $0x10,%r9 cmp %r11,%r9 je 11f1 <func0+0x68> mov %r9,%r8 mo...
func0: endbr64 mov r11, rdi test esi, esi jle short loc_11FC push rbx mov r9d, edx lea rdi, [rdi+8] lea eax, [rsi-1] shl rax, 4 lea r10, [r11+rax+18h] movsxd rax, edx lea rbx, ds:4[rax*4] jmp short loc_11C0 loc_11B5: mov [rsi], eax loc_11B7: add rdi, 10h cmp rdi, r...
long long func0(long long a1, int a2, int a3) { int *v5; // rdi long long v6; // rbx int v7; // eax long long v8; // rdx int v9; // ecx if ( a2 <= 0 ) return a1; v5 = (int *)(a1 + 8); v6 = 4LL * a3 + 4; do { if ( *v5 > a3 ) { v7 = *v5 - 1; if ( a3 < v7 ) { v8 ...
func0: ENDBR64 MOV R11,RDI TEST ESI,ESI JLE 0x001011fc PUSH RBX MOV R9D,EDX LEA RDI,[RDI + 0x8] LEA EAX,[RSI + -0x1] SHL RAX,0x4 LEA R10,[R11 + RAX*0x1 + 0x18] MOVSXD RAX,EDX LEA RBX,[0x4 + RAX*0x4] JMP 0x001011c0 LAB_001011b5: MOV dword ptr [RSI],EAX LAB_001011b7: ADD RDI,0x10 CMP RDI,R10 JZ 0x001011f7 LAB_001011c0: M...
long func0(long param_1,int param_2,int param_3) { int iVar1; int iVar2; long lVar3; int *piVar4; if (param_2 < 1) { return param_1; } piVar4 = (int *)(param_1 + 8); do { if (param_3 < *piVar4) { iVar1 = *piVar4 + -1; lVar3 = (long)param_3 * 4; iVar2 = param_3; if (pa...
5,306
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> #include <string.h> typedef struct { int* data; int length; } Row;
Row* func0(Row list1[], int num_rows, int n) { for(int i = 0; i < num_rows; i++) { if(n < list1[i].length) { for(int j = n; j < list1[i].length -1; j++) { list1[i].data[j] = list1[i].data[j+1]; } list1[i].length -=1; } } return lis...
int main() { // Test case 1 { int row0[] = {1, 2, 3}; int row1[] = {2, 4, 5}; int row2[] = {1, 1, 1}; Row list1[3]; list1[0].data = row0; list1[0].length = 3; list1[1].data = row1; list1[1].length = 3; list1[2].data = row2; ...
O2
c
func0: endbr64 mov %rdi,%r10 test %esi,%esi jle 17d1 <func0+0x61> lea -0x1(%rsi),%eax lea 0x8(%rdi),%r8 shl $0x4,%rax lea 0x18(%rdi,%rax,1),%r9 jmp 1799 <func0+0x29> nopl (%rax) add $0x10,%r8 cmp %r9,%r8 je 17d1 <func0+0x61> mov (%r8),%eax cmp %edx,%eax jle 1790 <func0+0x20> ...
func0: endbr64 mov r9, rdi test esi, esi jle short loc_179F lea eax, [rsi-1] lea rdi, [rdi+8] shl rax, 4 lea r8, [r9+rax+18h] jmp short loc_1769 loc_1760: add rdi, 10h cmp rdi, r8 jz short loc_179F loc_1769: mov eax, [rdi] cmp eax, edx jle short loc_1760 sub e...
long long func0(long long a1, int a2, int a3) { int *v4; // rdi long long v5; // r8 int v6; // eax long long v7; // rsi long long v8; // rcx if ( a2 > 0 ) { v4 = (int *)(a1 + 8); v5 = a1 + 16LL * (unsigned int)(a2 - 1) + 24; do { while ( *v4 <= a3 ) { v4 += 4; ...
func0: ENDBR64 MOV R9,RDI TEST ESI,ESI JLE 0x0010179f LEA EAX,[RSI + -0x1] LEA RDI,[RDI + 0x8] SHL RAX,0x4 LEA R8,[R9 + RAX*0x1 + 0x18] JMP 0x00101769 LAB_00101760: ADD RDI,0x10 CMP RDI,R8 JZ 0x0010179f LAB_00101769: MOV EAX,dword ptr [RDI] CMP EAX,EDX JLE 0x00101760 SUB EAX,0x1 CMP EDX,EAX JGE 0x00101794 MOV RSI,qword...
long func0(long param_1,int param_2,int param_3) { int *piVar1; long lVar2; int iVar3; long lVar4; int *piVar5; if (0 < param_2) { piVar5 = (int *)(param_1 + 8); piVar1 = (int *)(param_1 + 0x18 + (ulong)(param_2 - 1) * 0x10); do { while (param_3 < *piVar5) { iVar3 = *piVar5 + -...
5,307
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> #include <string.h> typedef struct { int* data; int length; } Row;
Row* func0(Row list1[], int num_rows, int n) { for(int i = 0; i < num_rows; i++) { if(n < list1[i].length) { for(int j = n; j < list1[i].length -1; j++) { list1[i].data[j] = list1[i].data[j+1]; } list1[i].length -=1; } } return lis...
int main() { // Test case 1 { int row0[] = {1, 2, 3}; int row1[] = {2, 4, 5}; int row2[] = {1, 1, 1}; Row list1[3]; list1[0].data = row0; list1[0].length = 3; list1[1].data = row1; list1[1].length = 3; list1[2].data = row2; ...
O3
c
func0: endbr64 mov %rdi,%r10 test %esi,%esi jle 1631 <func0+0x61> lea -0x1(%rsi),%eax lea 0x8(%rdi),%r8 shl $0x4,%rax lea 0x18(%rdi,%rax,1),%r9 jmp 15f9 <func0+0x29> nopl (%rax) add $0x10,%r8 cmp %r8,%r9 je 1631 <func0+0x61> mov (%r8),%eax cmp %edx,%eax jle 15f0 <func0+0x20> ...
func0: endbr64 mov r9, rdi test esi, esi jle short loc_15D1 movsxd rsi, esi shl rsi, 4 lea r8, [rsi+rdi] jmp short loc_1599 loc_1590: add rdi, 10h cmp r8, rdi jz short loc_15D1 loc_1599: mov eax, [rdi+8] cmp eax, edx jle short loc_1590 sub eax, 1 cmp edx, eax jge...
long long * func0(long long *a1, int a2, int a3) { long long *v3; // r9 long long *v4; // r8 int v5; // eax int v6; // eax long long v7; // rsi long long v8; // rcx v3 = a1; if ( a2 > 0 ) { v4 = &a1[2 * a2]; do { while ( 1 ) { v5 = *((_DWORD *)a1 + 2); if ( v5 ...
func0: ENDBR64 MOV R9,RDI TEST ESI,ESI JLE 0x001015d1 MOVSXD RSI,ESI SHL RSI,0x4 LEA R8,[RSI + RDI*0x1] JMP 0x00101599 LAB_00101590: ADD RDI,0x10 CMP R8,RDI JZ 0x001015d1 LAB_00101599: MOV EAX,dword ptr [RDI + 0x8] CMP EAX,EDX JLE 0x00101590 SUB EAX,0x1 CMP EDX,EAX JGE 0x001015c5 MOV RSI,qword ptr [RDI] MOVSXD RCX,EDX ...
long * func0(long *param_1,int param_2,int param_3) { long lVar1; int iVar2; long lVar3; long *plVar4; if (0 < param_2) { plVar4 = param_1; do { while (param_3 < *(int *)(plVar4 + 1)) { iVar2 = *(int *)(plVar4 + 1) + -1; if (param_3 < iVar2) { lVar1 = *plVar4; ...
5,308
func0
#include <assert.h>
int func0(int a, int n, int d) { int tn = a + (n - 1) * d; return tn; }
int main() { assert(func0(1, 5, 2) == 9); assert(func0(2, 6, 4) == 22); assert(func0(1, 4, 5) == 16); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x14(%rbp) mov %esi,-0x18(%rbp) mov %edx,-0x1c(%rbp) mov -0x18(%rbp),%eax sub $0x1,%eax imul -0x1c(%rbp),%eax mov %eax,%edx mov -0x14(%rbp),%eax add %edx,%eax mov %eax,-0x4(%rbp) mov -0x4(%rbp),%eax pop %rbp retq
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_14], edi mov [rbp+var_18], esi mov [rbp+var_1C], edx mov eax, [rbp+var_18] sub eax, 1 imul eax, [rbp+var_1C] mov edx, eax mov eax, [rbp+var_14] add eax, edx mov [rbp+var_4], eax mov eax, [rbp+var_4] pop rbp retn
long long func0(int a1, int a2, int a3) { return (unsigned int)(a3 * (a2 - 1) + a1); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x14],EDI MOV dword ptr [RBP + -0x18],ESI MOV dword ptr [RBP + -0x1c],EDX MOV EAX,dword ptr [RBP + -0x18] SUB EAX,0x1 IMUL EAX,dword ptr [RBP + -0x1c] MOV EDX,EAX MOV EAX,dword ptr [RBP + -0x14] ADD EAX,EDX MOV dword ptr [RBP + -0x4],EAX MOV EAX,dword ptr [RBP +...
int func0(int param_1,int param_2,int param_3) { return param_1 + (param_2 + -1) * param_3; }
5,309
func0
#include <assert.h>
int func0(int a, int n, int d) { int tn = a + (n - 1) * d; return tn; }
int main() { assert(func0(1, 5, 2) == 9); assert(func0(2, 6, 4) == 22); assert(func0(1, 4, 5) == 16); return 0; }
O1
c
func0: endbr64 sub $0x1,%esi imul %edx,%esi lea (%rsi,%rdi,1),%eax retq
func0: endbr64 sub esi, 1 imul esi, edx lea eax, [rsi+rdi] retn
long long func0(int a1, int a2, int a3) { return (unsigned int)(a3 * (a2 - 1) + a1); }
func0: ENDBR64 SUB ESI,0x1 IMUL ESI,EDX LEA EAX,[RSI + RDI*0x1] RET
int func0(int param_1,int param_2,int param_3) { return (param_2 + -1) * param_3 + param_1; }
5,310
func0
#include <assert.h>
int func0(int a, int n, int d) { int tn = a + (n - 1) * d; return tn; }
int main() { assert(func0(1, 5, 2) == 9); assert(func0(2, 6, 4) == 22); assert(func0(1, 4, 5) == 16); return 0; }
O2
c
func0: endbr64 sub $0x1,%esi imul %edx,%esi lea (%rsi,%rdi,1),%eax retq xchg %ax,%ax
func0: endbr64 sub esi, 1 imul esi, edx lea eax, [rsi+rdi] retn
long long func0(int a1, int a2, int a3) { return (unsigned int)(a3 * (a2 - 1) + a1); }
func0: ENDBR64 SUB ESI,0x1 IMUL ESI,EDX LEA EAX,[RSI + RDI*0x1] RET
int func0(int param_1,int param_2,int param_3) { return (param_2 + -1) * param_3 + param_1; }
5,311
func0
#include <assert.h>
int func0(int a, int n, int d) { int tn = a + (n - 1) * d; return tn; }
int main() { assert(func0(1, 5, 2) == 9); assert(func0(2, 6, 4) == 22); assert(func0(1, 4, 5) == 16); return 0; }
O3
c
func0: endbr64 sub $0x1,%esi imul %edx,%esi lea (%rsi,%rdi,1),%eax retq xchg %ax,%ax
func0: endbr64 sub esi, 1 imul esi, edx lea eax, [rsi+rdi] retn
long long func0(int a1, int a2, int a3) { return (unsigned int)(a3 * (a2 - 1) + a1); }
func0: ENDBR64 SUB ESI,0x1 IMUL ESI,EDX LEA EAX,[RSI + RDI*0x1] RET
int func0(int param_1,int param_2,int param_3) { return (param_2 + -1) * param_3 + param_1; }
5,312
func0
#include <assert.h>
int func0(int radius) { int rectangles = 0; int diameter = 2 * radius; int diameterSquare = diameter * diameter; for (int a = 1; a < 2 * radius; a++) { for (int b = 1; b < 2 * radius; b++) { int diagnalLengthSquare = (a * a + b * b); if (diagnalLengthSquare <...
int main() { assert(func0(2) == 8); assert(func0(1) == 1); assert(func0(0) == 0); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x24(%rbp) movl $0x0,-0x18(%rbp) mov -0x24(%rbp),%eax add %eax,%eax mov %eax,-0xc(%rbp) mov -0xc(%rbp),%eax imul %eax,%eax mov %eax,-0x8(%rbp) movl $0x1,-0x14(%rbp) jmp 11af <func0+0x66> movl $0x1,-0x10(%rbp) jmp 11a1 <func0+0x58> mov...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_24], edi mov [rbp+var_18], 0 mov eax, [rbp+var_24] add eax, eax mov [rbp+var_C], eax mov eax, [rbp+var_C] imul eax, eax mov [rbp+var_8], eax mov [rbp+var_14], 1 jmp short loc_11AF loc_1175: mov [rbp+var_10], 1 jmp sh...
long long func0(int a1) { unsigned int v2; // [rsp+Ch] [rbp-18h] int i; // [rsp+10h] [rbp-14h] int j; // [rsp+14h] [rbp-10h] v2 = 0; for ( i = 1; i < 2 * a1; ++i ) { for ( j = 1; j < 2 * a1; ++j ) { if ( i * i + j * j <= 2 * a1 * 2 * a1 ) ++v2; } } return v2; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x24],EDI MOV dword ptr [RBP + -0x18],0x0 MOV EAX,dword ptr [RBP + -0x24] ADD EAX,EAX MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0xc] IMUL EAX,EAX MOV dword ptr [RBP + -0x8],EAX MOV dword ptr [RBP + -0x14],0x1 JMP 0x001011af LAB_00101175: MOV dword...
int func0(int param_1) { int4 local_20; int4 local_1c; int4 local_18; local_20 = 0; for (local_1c = 1; local_1c < param_1 * 2; local_1c = local_1c + 1) { for (local_18 = 1; local_18 < param_1 * 2; local_18 = local_18 + 1) { if (local_18 * local_18 + local_1c * local_1c <= param_1 * 2 * param_1 *...
5,313
func0
#include <assert.h>
int func0(int radius) { int rectangles = 0; int diameter = 2 * radius; int diameterSquare = diameter * diameter; for (int a = 1; a < 2 * radius; a++) { for (int b = 1; b < 2 * radius; b++) { int diagnalLengthSquare = (a * a + b * b); if (diagnalLengthSquare <...
int main() { assert(func0(2) == 8); assert(func0(1) == 1); assert(func0(0) == 0); return 0; }
O1
c
func0: endbr64 lea (%rdi,%rdi,1),%esi mov %esi,%r8d imul %esi,%r8d mov $0x1,%r9d mov $0x0,%ecx cmp $0x1,%esi jg 1173 <func0+0x2a> mov %ecx,%eax retq add $0x1,%r9d cmp %r9d,%esi je 1167 <func0+0x1e> mov %r9d,%edi imul %r9d,%edi mov $0x1,%eax mov %eax,%edx imul %eax,%edx add...
func0: endbr64 lea esi, [rdi+rdi] mov r8d, esi imul r8d, esi mov r9d, 1 mov ecx, 0 cmp esi, 1 jle short loc_1195 loc_1167: mov edi, r9d imul edi, r9d mov eax, 1 loc_1173: mov edx, eax imul edx, eax add edx, edi cmp r8d, edx setnl dl movzx edx, dl add ecx, edx...
long long func0(int a1) { int v1; // esi int v2; // r9d unsigned int v3; // ecx int v4; // eax v1 = 2 * a1; v2 = 1; v3 = 0; if ( 2 * a1 > 1 ) { do { v4 = 1; do { v3 += v1 * v1 >= v2 * v2 + v4 * v4; ++v4; } while ( v1 != v4 ); ++v2; } ...
func0: ENDBR64 LEA ESI,[RDI + RDI*0x1] MOV R8D,ESI IMUL R8D,ESI MOV R9D,0x1 MOV ECX,0x0 CMP ESI,0x1 JLE 0x00101195 LAB_00101167: MOV EDI,R9D IMUL EDI,R9D MOV EAX,0x1 LAB_00101173: MOV EDX,EAX IMUL EDX,EAX ADD EDX,EDI CMP R8D,EDX SETGE DL MOVZX EDX,DL ADD ECX,EDX ADD EAX,0x1 CMP ESI,EAX JNZ 0x00101173 ADD R9D,0x1 CMP ES...
int func0(int param_1) { int iVar1; int iVar2; int iVar3; param_1 = param_1 * 2; iVar3 = 1; iVar2 = 0; if (1 < param_1) { do { iVar1 = 1; do { iVar2 = iVar2 + (uint)(iVar1 * iVar1 + iVar3 * iVar3 <= param_1 * param_1); iVar1 = iVar1 + 1; } while (param_1 != iVar1)...
5,314
func0
#include <assert.h>
int func0(int radius) { int rectangles = 0; int diameter = 2 * radius; int diameterSquare = diameter * diameter; for (int a = 1; a < 2 * radius; a++) { for (int b = 1; b < 2 * radius; b++) { int diagnalLengthSquare = (a * a + b * b); if (diagnalLengthSquare <...
int main() { assert(func0(2) == 8); assert(func0(1) == 1); assert(func0(0) == 0); return 0; }
O2
c
func0: endbr64 lea (%rdi,%rdi,1),%ecx mov %ecx,%edi imul %ecx,%edi cmp $0x1,%ecx jle 1196 <func0+0x56> mov $0x1,%r9d xor %r8d,%r8d nopw 0x0(%rax,%rax,1) mov %r9d,%esi mov $0x1,%eax imul %r9d,%esi nopl 0x0(%rax) mov %eax,%edx imul %eax,%edx add %esi,%edx cmp %edx,%edi setge %d...
func0: endbr64 lea ecx, [rdi+rdi] mov r9d, 1 xor r8d, r8d mov edi, ecx imul edi, ecx cmp ecx, 1 jle short loc_1242 nop word ptr [rax+rax+00h] loc_1210: mov esi, r9d mov eax, 1 imul esi, r9d nop dword ptr [rax+00h] loc_1220: mov edx, eax imul edx, eax add edx, esi...
long long func0(int a1) { int v1; // ecx int v2; // r9d unsigned int v3; // r8d int v4; // eax bool v5; // dl v1 = 2 * a1; v2 = 1; v3 = 0; if ( 2 * a1 > 1 ) { do { v4 = 1; do { v5 = v1 * v1 >= v2 * v2 + v4 * v4; ++v4; v3 += v5; } while ...
func0: ENDBR64 LEA ECX,[RDI + RDI*0x1] MOV R9D,0x1 XOR R8D,R8D MOV EDI,ECX IMUL EDI,ECX CMP ECX,0x1 JLE 0x00101242 NOP word ptr [RAX + RAX*0x1] LAB_00101210: MOV ESI,R9D MOV EAX,0x1 IMUL ESI,R9D NOP dword ptr [RAX] LAB_00101220: MOV EDX,EAX IMUL EDX,EAX ADD EDX,ESI CMP EDI,EDX SETGE DL ADD EAX,0x1 MOVZX EDX,DL ADD R8D,...
int func0(int param_1) { int iVar1; int iVar2; int iVar3; int iVar4; param_1 = param_1 * 2; iVar4 = 1; iVar3 = 0; if (1 < param_1) { do { iVar1 = 1; do { iVar2 = iVar1 * iVar1; iVar1 = iVar1 + 1; iVar3 = iVar3 + (uint)(iVar2 + iVar4 * iVar4 <= param_1 * param_...
5,315
func0
#include <assert.h>
int func0(int radius) { int rectangles = 0; int diameter = 2 * radius; int diameterSquare = diameter * diameter; for (int a = 1; a < 2 * radius; a++) { for (int b = 1; b < 2 * radius; b++) { int diagnalLengthSquare = (a * a + b * b); if (diagnalLengthSquare <...
int main() { assert(func0(2) == 8); assert(func0(1) == 1); assert(func0(0) == 0); return 0; }
O3
c
func0: endbr64 lea (%rdi,%rdi,1),%ecx mov %ecx,%edi imul %ecx,%edi cmp $0x1,%ecx jle 1286 <func0+0x146> lea -0x2(%rcx),%eax lea -0x1(%rcx),%r10d cmp $0x2,%eax jbe 128d <func0+0x14d> movd %edi,%xmm6 mov %r10d,%esi pxor %xmm2,%xmm2 xor %edx,%edx movdqa 0xea6(%rip),%xmm5 pshufd $0x0,%xm...
func0: endbr64 lea esi, [rdi+rdi] mov r8d, esi imul r8d, esi cmp esi, 1 jle loc_127D lea eax, [rsi-2] lea r9d, [rsi-1] cmp eax, 2 jbe loc_1282 movd xmm6, r8d mov ecx, r9d pxor xmm3, xmm3 xor edx, edx movdqa xmm5, cs:xmmword_2010 pshufd xmm7, xmm6, 0 shr ecx, 2 movd...
long long func0(int a1) { int v1; // esi signed int v2; // r8d unsigned int v3; // r9d __m128i v4; // xmm3 int v5; // edx __m128i si128; // xmm5 __m128i v7; // xmm7 __m128i v8; // xmm8 __m128i v9; // xmm9 __m128i v10; // xmm0 __m128i v11; // xmm2 int v12; // eax __m128i v13; // xmm4 __m128i...
func0: ENDBR64 LEA ESI,[RDI + RDI*0x1] MOV R8D,ESI IMUL R8D,ESI CMP ESI,0x1 JLE 0x0010127d LEA EAX,[RSI + -0x2] LEA R9D,[RSI + -0x1] CMP EAX,0x2 JBE 0x00101282 MOVD XMM6,R8D MOV ECX,R9D PXOR XMM3,XMM3 XOR EDX,EDX MOVDQA XMM5,xmmword ptr [0x00102010] PSHUFD XMM7,XMM6,0x0 SHR ECX,0x2 MOVDQA XMM8,xmmword ptr [0x00102020] ...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int func0(int param_1) { int iVar1; uint uVar2; int iVar3; ulong uVar4; ulong uVar5; int auVar7 [16]; int auVar8 [16]; int iVar10; int iVar11; int iVar12; int iVar13; int auVar15 [16]; int auVar16 [16]; in...
5,316
func0
#include <assert.h>
int func0(int a, int b) { int c = 180 - (a + b); return c; }
int main() { assert(func0(47, 89) == 44); assert(func0(45, 95) == 40); assert(func0(50, 40) == 90); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x14(%rbp) mov %esi,-0x18(%rbp) mov -0x14(%rbp),%edx mov -0x18(%rbp),%eax add %edx,%eax mov $0xb4,%edx sub %eax,%edx mov %edx,%eax mov %eax,-0x4(%rbp) mov -0x4(%rbp),%eax pop %rbp retq
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_14], edi mov [rbp+var_18], esi mov edx, [rbp+var_14] mov eax, [rbp+var_18] add edx, eax mov eax, 0B4h sub eax, edx mov [rbp+var_4], eax mov eax, [rbp+var_4] pop rbp retn
long long func0(int a1, int a2) { return (unsigned int)(180 - (a2 + a1)); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x14],EDI MOV dword ptr [RBP + -0x18],ESI MOV EDX,dword ptr [RBP + -0x14] MOV EAX,dword ptr [RBP + -0x18] ADD EDX,EAX MOV EAX,0xb4 SUB EAX,EDX MOV dword ptr [RBP + -0x4],EAX MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int func0(int param_1,int param_2) { return 0xb4 - (param_1 + param_2); }
5,317
func0
#include <assert.h>
int func0(int a, int b) { int c = 180 - (a + b); return c; }
int main() { assert(func0(47, 89) == 44); assert(func0(45, 95) == 40); assert(func0(50, 40) == 90); return 0; }
O1
c
func0: endbr64 add %esi,%edi mov $0xb4,%eax sub %edi,%eax retq
func0: endbr64 add edi, esi mov eax, 0B4h sub eax, edi retn
long long func0(int a1, int a2) { return (unsigned int)(180 - (a2 + a1)); }
func0: ENDBR64 ADD EDI,ESI MOV EAX,0xb4 SUB EAX,EDI RET
int func0(int param_1,int param_2) { return 0xb4 - (param_1 + param_2); }
5,318
func0
#include <assert.h>
int func0(int a, int b) { int c = 180 - (a + b); return c; }
int main() { assert(func0(47, 89) == 44); assert(func0(45, 95) == 40); assert(func0(50, 40) == 90); return 0; }
O2
c
func0: endbr64 add %esi,%edi mov $0xb4,%eax sub %edi,%eax retq xchg %ax,%ax
func0: endbr64 add edi, esi mov eax, 0B4h sub eax, edi retn
long long func0(int a1, int a2) { return (unsigned int)(180 - (a2 + a1)); }
func0: ENDBR64 ADD EDI,ESI MOV EAX,0xb4 SUB EAX,EDI RET
int func0(int param_1,int param_2) { return 0xb4 - (param_1 + param_2); }
5,319
func0
#include <assert.h>
int func0(int a, int b) { int c = 180 - (a + b); return c; }
int main() { assert(func0(47, 89) == 44); assert(func0(45, 95) == 40); assert(func0(50, 40) == 90); return 0; }
O3
c
func0: endbr64 add %esi,%edi mov $0xb4,%eax sub %edi,%eax retq xchg %ax,%ax
func0: endbr64 add edi, esi mov eax, 0B4h sub eax, edi retn
long long func0(int a1, int a2) { return (unsigned int)(180 - (a2 + a1)); }
func0: ENDBR64 ADD EDI,ESI MOV EAX,0xb4 SUB EAX,EDI RET
int func0(int param_1,int param_2) { return 0xb4 - (param_1 + param_2); }
5,320
func0
#include <stdio.h> #include <assert.h>
int func0(int test_list[][2], int n) { int res = test_list[0][0]; for (int i = 0; i < n; i++) { for (int j = 0; j < 2; j++) { if (test_list[i][j] > res) { res = test_list[i][j]; } } } return res; }
int main() { int list1[5][2] = {{2, 4}, {6, 7}, {5, 1}, {6, 10}, {8, 7}}; int list2[5][2] = {{3, 5}, {7, 8}, {6, 2}, {7, 11}, {9, 8}}; int list3[5][2] = {{4, 6}, {8, 9}, {7, 3}, {8, 12}, {10, 9}}; assert(func0(list1, 5) == 10); assert(func0(list2, 5) == 11); assert(func0(list3, 5) == 12); ...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) mov -0x18(%rbp),%rax mov (%rax),%eax mov %eax,-0xc(%rbp) movl $0x0,-0x8(%rbp) jmp 11e1 <func0+0x78> movl $0x0,-0x4(%rbp) jmp 11d7 <func0+0x6e> mov -0x8(%rbp),%eax cltq lea 0x0(,%rax,8),%rdx mov -0x18(...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov rax, [rbp+var_18] mov eax, [rax] mov [rbp+var_C], eax mov [rbp+var_8], 0 jmp short loc_11E1 loc_118A: mov [rbp+var_4], 0 jmp short loc_11D7 loc_1193: mov eax, [rbp+var_8] cdqe lea rdx,...
long long func0(unsigned int *a1, int a2) { unsigned int v3; // [rsp+10h] [rbp-Ch] int i; // [rsp+14h] [rbp-8h] int j; // [rsp+18h] [rbp-4h] v3 = *a1; for ( i = 0; i < a2; ++i ) { for ( j = 0; j <= 1; ++j ) { if ( (int)v3 < (int)a1[2 * i + j] ) v3 = a1[2 * i + j]; } } return ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0xc],EAX MOV dword ptr [RBP + -0x8],0x0 JMP 0x001011e1 LAB_0010118a: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001011d7 LAB_00101193: MOV EAX,dword...
int func0(int *param_1,int param_2) { int local_14; int local_10; int local_c; local_14 = *param_1; for (local_10 = 0; local_10 < param_2; local_10 = local_10 + 1) { for (local_c = 0; local_c < 2; local_c = local_c + 1) { if (local_14 < param_1[(long)local_10 * 2 + (long)local_c]) { loca...
5,321
func0
#include <stdio.h> #include <assert.h>
int func0(int test_list[][2], int n) { int res = test_list[0][0]; for (int i = 0; i < n; i++) { for (int j = 0; j < 2; j++) { if (test_list[i][j] > res) { res = test_list[i][j]; } } } return res; }
int main() { int list1[5][2] = {{2, 4}, {6, 7}, {5, 1}, {6, 10}, {8, 7}}; int list2[5][2] = {{3, 5}, {7, 8}, {6, 2}, {7, 11}, {9, 8}}; int list3[5][2] = {{4, 6}, {8, 9}, {7, 3}, {8, 12}, {10, 9}}; assert(func0(list1, 5) == 10); assert(func0(list2, 5) == 11); assert(func0(list3, 5) == 12); ...
O1
c
func0: endbr64 mov (%rdi),%ecx test %esi,%esi jle 1195 <func0+0x2c> mov %rdi,%rax lea -0x1(%rsi),%edx lea 0x8(%rdi,%rdx,8),%rsi mov (%rax),%edx cmp %edx,0x4(%rax) cmovge 0x4(%rax),%edx cmp %edx,%ecx cmovl %edx,%ecx add $0x8,%rax cmp %rsi,%rax jne 117e <func0+0x15> mov %ecx,%eax re...
func0: endbr64 mov ecx, [rdi] test esi, esi jle short loc_1196 mov rdx, rdi lea eax, [rsi-1] lea rdi, [rdi+rax*8+8] loc_117E: mov eax, [rdx+4] mov esi, [rdx] cmp eax, esi cmovl eax, esi cmp ecx, eax cmovl ecx, eax add rdx, 8 cmp rdx, rdi jnz short loc_117E loc_1196...
long long func0(unsigned int *a1, int a2) { unsigned int v2; // ecx int *v3; // rdx long long v4; // rdi int v5; // eax v2 = *a1; if ( a2 > 0 ) { v3 = (int *)a1; v4 = (long long)&a1[2 * (a2 - 1) + 2]; do { v5 = v3[1]; if ( v5 < *v3 ) v5 = *v3; if ( (int)v2 < v5 ...
func0: ENDBR64 MOV ECX,dword ptr [RDI] TEST ESI,ESI JLE 0x00101196 MOV RDX,RDI LEA EAX,[RSI + -0x1] LEA RDI,[RDI + RAX*0x8 + 0x8] LAB_0010117e: MOV EAX,dword ptr [RDX + 0x4] MOV ESI,dword ptr [RDX] CMP EAX,ESI CMOVL EAX,ESI CMP ECX,EAX CMOVL ECX,EAX ADD RDX,0x8 CMP RDX,RDI JNZ 0x0010117e LAB_00101196: MOV EAX,ECX RET
int func0(int *param_1,int param_2) { int *piVar1; int iVar2; int iVar3; iVar3 = *param_1; if (0 < param_2) { piVar1 = param_1 + (ulong)(param_2 - 1) * 2 + 2; do { iVar2 = param_1[1]; if (param_1[1] < *param_1) { iVar2 = *param_1; } if (iVar3 < iVar2) { iVar...
5,322
func0
#include <stdio.h> #include <assert.h>
int func0(int test_list[][2], int n) { int res = test_list[0][0]; for (int i = 0; i < n; i++) { for (int j = 0; j < 2; j++) { if (test_list[i][j] > res) { res = test_list[i][j]; } } } return res; }
int main() { int list1[5][2] = {{2, 4}, {6, 7}, {5, 1}, {6, 10}, {8, 7}}; int list2[5][2] = {{3, 5}, {7, 8}, {6, 2}, {7, 11}, {9, 8}}; int list3[5][2] = {{4, 6}, {8, 9}, {7, 3}, {8, 12}, {10, 9}}; assert(func0(list1, 5) == 10); assert(func0(list2, 5) == 11); assert(func0(list3, 5) == 12); ...
O2
c
func0: endbr64 mov (%rdi),%eax test %esi,%esi jle 13e6 <func0+0x36> lea -0x1(%rsi),%ecx lea 0x4(%rdi),%rdx lea 0xc(%rdi,%rcx,8),%rsi mov %eax,%ecx jmp 13d3 <func0+0x23> nopw 0x0(%rax,%rax,1) mov -0x4(%rdx),%ecx cmp %ecx,%eax cmovl %ecx,%eax cmp %eax,(%rdx) cmovge (%rdx),%eax add $0...
func0: endbr64 mov eax, [rdi] test esi, esi jle short locret_1368 lea ecx, [rsi-1] lea rdx, [rdi+4] lea rsi, [rdi+rcx*8+0Ch] mov ecx, eax jmp short loc_1353 loc_1350: mov ecx, [rdx-4] loc_1353: cmp eax, ecx cmovl eax, ecx mov ecx, [rdx] cmp eax, ecx cmovl eax, ecx add ...
long long func0(int *a1, int a2) { long long result; // rax _DWORD *v3; // rdx long long v4; // rsi int i; // ecx result = (unsigned int)*a1; if ( a2 > 0 ) { v3 = a1 + 1; v4 = (long long)&a1[2 * (a2 - 1) + 3]; for ( i = *a1; ; i = *(v3 - 1) ) { if ( (int)result < i ) result...
func0: ENDBR64 MOV EAX,dword ptr [RDI] TEST ESI,ESI JLE 0x00101368 LEA ECX,[RSI + -0x1] LEA RDX,[RDI + 0x4] LEA RSI,[RDI + RCX*0x8 + 0xc] MOV ECX,EAX JMP 0x00101353 LAB_00101350: MOV ECX,dword ptr [RDX + -0x4] LAB_00101353: CMP EAX,ECX CMOVL EAX,ECX MOV ECX,dword ptr [RDX] CMP EAX,ECX CMOVL EAX,ECX ADD RDX,0x8 CMP RDX,...
void func0(int *param_1,int param_2) { int iVar1; int iVar2; int *piVar3; iVar1 = *param_1; if (0 < param_2) { piVar3 = param_1 + 1; iVar2 = iVar1; while( true ) { if (iVar1 < iVar2) { iVar1 = iVar2; } if (iVar1 < *piVar3) { iVar1 = *piVar3; } if (...
5,323
func0
#include <stdio.h> #include <assert.h>
int func0(int test_list[][2], int n) { int res = test_list[0][0]; for (int i = 0; i < n; i++) { for (int j = 0; j < 2; j++) { if (test_list[i][j] > res) { res = test_list[i][j]; } } } return res; }
int main() { int list1[5][2] = {{2, 4}, {6, 7}, {5, 1}, {6, 10}, {8, 7}}; int list2[5][2] = {{3, 5}, {7, 8}, {6, 2}, {7, 11}, {9, 8}}; int list3[5][2] = {{4, 6}, {8, 9}, {7, 3}, {8, 12}, {10, 9}}; assert(func0(list1, 5) == 10); assert(func0(list2, 5) == 11); assert(func0(list3, 5) == 12); ...
O3
c
func0: endbr64 mov (%rdi),%eax test %esi,%esi jle 125c <func0+0x11c> lea -0x1(%rsi),%edx cmp $0x2,%edx jbe 125e <func0+0x11e> mov %esi,%edx movd %eax,%xmm6 mov %rdi,%rax shr $0x2,%edx pshufd $0x0,%xmm6,%xmm3 shl $0x5,%rdx add %rdi,%rdx nopw 0x0(%rax,%rax,1) movdqu (%rax),%xmm2 movdqu...
func0: endbr64 mov eax, [rdi] mov ecx, esi test esi, esi jle locret_1262 lea edx, [rsi-1] cmp edx, 2 jbe loc_1264 mov edx, esi movd xmm6, eax mov rax, rdi shr edx, 2 pshufd xmm3, xmm6, 0 shl rdx, 5 add rdx, rdi nop dword ptr [rax+00h] loc_1178: movdqu xmm1, xmmwor...
long long func0(const __m128i *a1, int a2) { long long result; // rax __m128i v4; // xmm6 const __m128i *v5; // rax __m128i v6; // xmm3 __m128 v7; // xmm1 __m128 v8; // xmm4 __m128 v9; // xmm2 __m128i v10; // xmm1 __m128i v11; // xmm2 __m128i v12; // xmm0 __m128i v13; // xmm0 __m128i v14; // xm...
func0: ENDBR64 MOV EAX,dword ptr [RDI] MOV ECX,ESI TEST ESI,ESI JLE 0x00101262 LEA EDX,[RSI + -0x1] CMP EDX,0x2 JBE 0x00101264 MOV EDX,ESI MOVD XMM6,EAX MOV RAX,RDI SHR EDX,0x2 PSHUFD XMM3,XMM6,0x0 SHL RDX,0x5 ADD RDX,RDI NOP dword ptr [RAX] LAB_00101178: MOVDQU XMM1,xmmword ptr [RAX] MOVDQU XMM4,xmmword ptr [RAX + 0x1...
uint func0(uint *param_1,uint param_2) { uint *puVar1; uint *puVar2; uint *puVar3; uint *puVar4; uint *puVar5; uint *puVar6; uint *puVar7; uint uVar8; uint *puVar9; uint uVar10; uint uVar11; long lVar12; uint uVar13; uint uVar14; uint uVar15; uint uVar16; uint uVar17; uint uVar18; ...
5,324
func0
#include <assert.h> #include <stdlib.h>
int *func0(int *nums1, int *nums2, int size) { int *result = malloc(size * sizeof(int)); for (int i = 0; i < size; i++) { result[i] = nums1[i] % nums2[i]; } return result; }
int main() { int nums1_1[] = {4, 5, 6}; int nums2_1[] = {1, 2, 3}; int *result1 = func0(nums1_1, nums2_1, 3); assert(result1[0] == 0 && result1[1] == 1 && result1[2] == 0); free(result1); int nums1_2[] = {3, 2}; int nums2_2[] = {1, 4}; int *result2 = func0(nums1_2, nums2_2, 2);...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x30,%rsp mov %rdi,-0x18(%rbp) mov %rsi,-0x20(%rbp) mov %edx,-0x24(%rbp) mov -0x24(%rbp),%eax cltq shl $0x2,%rax mov %rax,%rdi callq 10b0 <malloc@plt> mov %rax,-0x8(%rbp) movl $0x0,-0xc(%rbp) jmp 122b <func0+0x82> mov -0xc(%rbp),%eax cltq...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_18], rdi mov [rbp+var_20], rsi mov [rbp+var_24], edx mov eax, [rbp+var_24] cdqe shl rax, 2 mov rdi, rax; size call _malloc mov [rbp+var_8], rax mov [rbp+var_C], 0 jmp short loc_122D loc_11DE: mov eax, [r...
_DWORD * func0(long long a1, long long a2, int a3) { int i; // [rsp+24h] [rbp-Ch] _DWORD *v6; // [rsp+28h] [rbp-8h] v6 = malloc(4LL * a3); for ( i = 0; i < a3; ++i ) v6[i] = *(_DWORD *)(4LL * i + a1) % *(_DWORD *)(4LL * i + a2); return v6; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI MOV dword ptr [RBP + -0x24],EDX MOV EAX,dword ptr [RBP + -0x24] CDQE SHL RAX,0x2 MOV RDI,RAX CALL 0x001010b0 MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0xc],0x0 JMP 0x0010122d LAB_001011de: MOV EAX...
void * func0(long param_1,long param_2,int param_3) { void *pvVar1; int4 local_14; pvVar1 = malloc((long)param_3 << 2); for (local_14 = 0; local_14 < param_3; local_14 = local_14 + 1) { *(int *)((long)pvVar1 + (long)local_14 * 4) = *(int *)(param_1 + (long)local_14 * 4) % *(int *)(param_2 + (lo...
5,325
func0
#include <assert.h> #include <stdlib.h>
int *func0(int *nums1, int *nums2, int size) { int *result = malloc(size * sizeof(int)); for (int i = 0; i < size; i++) { result[i] = nums1[i] % nums2[i]; } return result; }
int main() { int nums1_1[] = {4, 5, 6}; int nums2_1[] = {1, 2, 3}; int *result1 = func0(nums1_1, nums2_1, 3); assert(result1[0] == 0 && result1[1] == 1 && result1[2] == 0); free(result1); int nums1_2[] = {3, 2}; int nums2_2[] = {1, 4}; int *result2 = func0(nums1_2, nums2_2, 2);...
O1
c
func0: endbr64 push %r12 push %rbp push %rbx mov %rdi,%rbp mov %rsi,%rbx mov %edx,%r12d movslq %edx,%rdi shl $0x2,%rdi callq 10b0 <malloc@plt> mov %rax,%rsi test %r12d,%r12d jle 11ef <func0+0x46> lea -0x1(%r12),%edi mov $0x0,%ecx mov 0x0(%rbp,%rcx,4),%eax cltd idivl (%rbx,%rcx,4) mo...
func0: endbr64 push r12 push rbp push rbx mov rbp, rdi mov rbx, rsi mov r12d, edx movsxd rdi, edx shl rdi, 2 call _malloc mov rdi, rax test r12d, r12d jle short loc_11EA mov esi, r12d mov ecx, 0 loc_11D6: mov eax, [rbp+rcx*4+0] cdq idiv dword ptr [rbx+rcx*4] mov ...
long long func0(long long a1, long long a2, int a3) { long long v5; // rdi long long v6; // rcx v5 = malloc(4LL * a3); if ( a3 > 0 ) { v6 = 0LL; do { *(_DWORD *)(v5 + 4 * v6) = *(_DWORD *)(a1 + 4 * v6) % *(_DWORD *)(a2 + 4 * v6); ++v6; } while ( v6 != a3 ); } return v5; }
func0: ENDBR64 PUSH R12 PUSH RBP PUSH RBX MOV RBP,RDI MOV RBX,RSI MOV R12D,EDX MOVSXD RDI,EDX SHL RDI,0x2 CALL 0x001010b0 MOV RDI,RAX TEST R12D,R12D JLE 0x001011ea MOV ESI,R12D MOV ECX,0x0 LAB_001011d6: MOV EAX,dword ptr [RBP + RCX*0x4] CDQ IDIV dword ptr [RBX + RCX*0x4] MOV dword ptr [RDI + RCX*0x4],EDX ADD RCX,0x1 CM...
void * func0(long param_1,long param_2,uint param_3) { void *pvVar1; ulong uVar2; pvVar1 = malloc((long)(int)param_3 << 2); if (0 < (int)param_3) { uVar2 = 0; do { *(int *)((long)pvVar1 + uVar2 * 4) = *(int *)(param_1 + uVar2 * 4) % *(int *)(param_2 + uVar2 * 4); uVar2 = uVar2...
5,326
func0
#include <assert.h> #include <stdlib.h>
int *func0(int *nums1, int *nums2, int size) { int *result = malloc(size * sizeof(int)); for (int i = 0; i < size; i++) { result[i] = nums1[i] % nums2[i]; } return result; }
int main() { int nums1_1[] = {4, 5, 6}; int nums2_1[] = {1, 2, 3}; int *result1 = func0(nums1_1, nums2_1, 3); assert(result1[0] == 0 && result1[1] == 1 && result1[2] == 0); free(result1); int nums1_2[] = {3, 2}; int nums2_2[] = {1, 4}; int *result2 = func0(nums1_2, nums2_2, 2);...
O2
c
func0: endbr64 push %r12 push %rbp mov %rdi,%rbp movslq %edx,%rdi push %rbx mov %rdi,%r12 shl $0x2,%rdi mov %rsi,%rbx callq 10b0 <malloc@plt> mov %rax,%r8 test %r12d,%r12d jle 1388 <func0+0x48> lea -0x1(%r12),%esi xor %ecx,%ecx nopl 0x0(%rax) mov 0x0(%rbp,%rcx,4),%eax cltd idivl (...
func0: endbr64 push r13 push r12 movsxd r12, edx push rbp mov rbp, rdi lea rdi, ds:0[r12*4] push rbx mov rbx, rsi sub rsp, 8 call _malloc mov r8, rax test r12d, r12d jle short loc_1385 xor ecx, ecx xchg ax, ax loc_1370: mov eax, [rbp+rcx*4+0] cdq idiv dword ptr [...
long long func0(long long a1, long long a2, int a3) { long long v3; // r12 long long v4; // r8 long long i; // rcx v3 = a3; v4 = malloc(4LL * a3); if ( (int)v3 > 0 ) { for ( i = 0LL; i != v3; ++i ) *(_DWORD *)(v4 + 4 * i) = *(_DWORD *)(a1 + 4 * i) % *(_DWORD *)(a2 + 4 * i); } return v4; }
func0: ENDBR64 PUSH R13 PUSH R12 MOVSXD R12,EDX PUSH RBP MOV RBP,RDI LEA RDI,[R12*0x4] PUSH RBX MOV RBX,RSI SUB RSP,0x8 CALL 0x001010b0 MOV R8,RAX TEST R12D,R12D JLE 0x00101385 XOR ECX,ECX NOP LAB_00101370: MOV EAX,dword ptr [RBP + RCX*0x4] CDQ IDIV dword ptr [RBX + RCX*0x4] MOV dword ptr [R8 + RCX*0x4],EDX ADD RCX,0x1...
void * func0(long param_1,long param_2,int param_3) { void *pvVar1; long lVar2; pvVar1 = malloc((long)param_3 * 4); if (0 < param_3) { lVar2 = 0; do { *(int *)((long)pvVar1 + lVar2 * 4) = *(int *)(param_1 + lVar2 * 4) % *(int *)(param_2 + lVar2 * 4); lVar2 = lVar2 + 1; } w...
5,327
func0
#include <assert.h> #include <stdlib.h>
int *func0(int *nums1, int *nums2, int size) { int *result = malloc(size * sizeof(int)); for (int i = 0; i < size; i++) { result[i] = nums1[i] % nums2[i]; } return result; }
int main() { int nums1_1[] = {4, 5, 6}; int nums2_1[] = {1, 2, 3}; int *result1 = func0(nums1_1, nums2_1, 3); assert(result1[0] == 0 && result1[1] == 1 && result1[2] == 0); free(result1); int nums1_2[] = {3, 2}; int nums2_2[] = {1, 4}; int *result2 = func0(nums1_2, nums2_2, 2);...
O3
c
func0: endbr64 push %r12 push %rbp mov %rdi,%rbp movslq %edx,%rdi push %rbx mov %rdi,%r12 shl $0x2,%rdi mov %rsi,%rbx callq 10b0 <malloc@plt> mov %rax,%r8 test %r12d,%r12d jle 1388 <func0+0x48> lea -0x1(%r12),%esi xor %ecx,%ecx nopl 0x0(%rax) mov 0x0(%rbp,%rcx,4),%eax cltd idivl (...
func0: endbr64 push r13 push r12 mov r12, rdi push rbp movsxd rbp, edx push rbx mov r13, rbp shl rbp, 2 mov rbx, rsi mov rdi, rbp; size sub rsp, 8 call _malloc mov rsi, rax test r13d, r13d jle short loc_1374 xor ecx, ecx loc_1360: mov eax, [r12+rcx] cdq idiv ...
char * func0(long long a1, long long a2, int a3) { size_t v4; // rbp char *v6; // rsi long long v7; // rcx v4 = 4LL * a3; v6 = (char *)malloc(v4); if ( a3 > 0 ) { v7 = 0LL; do { *(_DWORD *)&v6[v7] = *(_DWORD *)(a1 + v7) % *(_DWORD *)(a2 + v7); v7 += 4LL; } while ( v4 != v7...
func0: ENDBR64 PUSH R13 PUSH R12 MOV R12,RDI PUSH RBP MOVSXD RBP,EDX PUSH RBX MOV R13,RBP SHL RBP,0x2 MOV RBX,RSI MOV RDI,RBP SUB RSP,0x8 CALL 0x001010b0 MOV RSI,RAX TEST R13D,R13D JLE 0x00101374 XOR ECX,ECX LAB_00101360: MOV EAX,dword ptr [R12 + RCX*0x1] CDQ IDIV dword ptr [RBX + RCX*0x1] MOV dword ptr [RSI + RCX*0x1]...
void * func0(long param_1,long param_2,int param_3) { void *pvVar1; size_t sVar2; pvVar1 = malloc((long)param_3 * 4); if (0 < param_3) { sVar2 = 0; do { *(int *)((long)pvVar1 + sVar2) = *(int *)(param_1 + sVar2) % *(int *)(param_2 + sVar2); sVar2 = sVar2 + 4; } while ((long)param_3 *...
5,328
func0
#include <assert.h> #include <string.h>
char* func0(int a, int b, int c) { if (2*b*b == 9*a*c) { return "Yes"; } else { return "No"; } }
int main() { assert(strcmp(func0(1, 3, 2), "Yes") == 0); assert(strcmp(func0(1, 2, 3), "No") == 0); assert(strcmp(func0(1, -5, 6), "No") == 0); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x4(%rbp) mov %esi,-0x8(%rbp) mov %edx,-0xc(%rbp) mov -0x8(%rbp),%eax imul %eax,%eax lea (%rax,%rax,1),%ecx mov -0x4(%rbp),%eax imul -0xc(%rbp),%eax mov %eax,%edx mov %edx,%eax shl $0x3,%eax add %edx,%eax cmp %eax,%ecx jne 11a...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_4], edi mov [rbp+var_8], esi mov [rbp+var_C], edx mov eax, [rbp+var_8] imul eax, eax lea ecx, [rax+rax] mov eax, [rbp+var_4] imul eax, [rbp+var_C] mov edx, eax mov eax, edx shl eax, 3 add eax, edx cmp ecx, eax jnz...
const char * func0(int a1, int a2, int a3) { if ( 2 * a2 * a2 == 9 * a3 * a1 ) return "Yes"; else return "No"; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x4],EDI MOV dword ptr [RBP + -0x8],ESI MOV dword ptr [RBP + -0xc],EDX MOV EAX,dword ptr [RBP + -0x8] IMUL EAX,EAX LEA ECX,[RAX + RAX*0x1] MOV EAX,dword ptr [RBP + -0x4] IMUL EAX,dword ptr [RBP + -0xc] MOV EDX,EAX MOV EAX,EDX SHL EAX,0x3 ADD EAX,EDX CMP ECX,EAX ...
int * func0(int param_1,int param_2,int param_3) { int *puVar1; if (param_2 * param_2 * 2 == param_1 * param_3 * 9) { puVar1 = &DAT_00102008; } else { puVar1 = &DAT_0010200c; } return puVar1; }
5,329
func0
#include <assert.h> #include <string.h>
char* func0(int a, int b, int c) { if (2*b*b == 9*a*c) { return "Yes"; } else { return "No"; } }
int main() { assert(strcmp(func0(1, 3, 2), "Yes") == 0); assert(strcmp(func0(1, 2, 3), "No") == 0); assert(strcmp(func0(1, -5, 6), "No") == 0); return 0; }
O1
c
func0: endbr64 imul %esi,%esi add %esi,%esi imul %edi,%edx lea (%rdx,%rdx,8),%eax cmp %eax,%esi lea 0xec3(%rip),%rax lea 0xec0(%rip),%rdx cmovne %rdx,%rax retq
func0: endbr64 imul esi, esi add esi, esi imul edi, edx lea eax, [rdi+rdi*8] cmp esi, eax lea rax, unk_2004 lea rdx, unk_2008 cmovnz rax, rdx retn
void * func0(int a1, int a2, int a3) { void *result; // rax result = &unk_2004; if ( 2 * a2 * a2 != 9 * a3 * a1 ) return &unk_2008; return result; }
func0: ENDBR64 IMUL ESI,ESI ADD ESI,ESI IMUL EDI,EDX LEA EAX,[RDI + RDI*0x8] CMP ESI,EAX LEA RAX,[0x102004] LEA RDX,[0x102008] CMOVNZ RAX,RDX RET
int * func0(int param_1,int param_2,int param_3) { int *puVar1; puVar1 = &DAT_00102004; if (param_2 * param_2 * 2 != param_1 * param_3 * 9) { puVar1 = &DAT_00102008; } return puVar1; }
5,330
func0
#include <assert.h> #include <string.h>
char* func0(int a, int b, int c) { if (2*b*b == 9*a*c) { return "Yes"; } else { return "No"; } }
int main() { assert(strcmp(func0(1, 3, 2), "Yes") == 0); assert(strcmp(func0(1, 2, 3), "No") == 0); assert(strcmp(func0(1, -5, 6), "No") == 0); return 0; }
O2
c
func0: endbr64 imul %edi,%edx imul %esi,%esi lea (%rdx,%rdx,8),%eax lea 0xeb4(%rip),%rdx add %esi,%esi cmp %eax,%esi lea 0xea5(%rip),%rax cmovne %rdx,%rax retq nopw %cs:0x0(%rax,%rax,1) xchg %ax,%ax
func0: endbr64 imul edi, edx lea rdx, unk_2008 imul esi, esi lea eax, [rdi+rdi*8] add esi, esi cmp esi, eax lea rax, unk_2004 cmovnz rax, rdx retn
void * func0(int a1, int a2, int a3) { void *result; // rax result = &unk_2004; if ( 2 * a2 * a2 != 9 * a3 * a1 ) return &unk_2008; return result; }
func0: ENDBR64 IMUL EDI,EDX LEA RDX,[0x102008] IMUL ESI,ESI LEA EAX,[RDI + RDI*0x8] ADD ESI,ESI CMP ESI,EAX LEA RAX,[0x102004] CMOVNZ RAX,RDX RET
int * func0(int param_1,int param_2,int param_3) { int *puVar1; puVar1 = &DAT_00102004; if (param_2 * param_2 * 2 != param_1 * param_3 * 9) { puVar1 = &DAT_00102008; } return puVar1; }
5,331
func0
#include <assert.h> #include <string.h>
char* func0(int a, int b, int c) { if (2*b*b == 9*a*c) { return "Yes"; } else { return "No"; } }
int main() { assert(strcmp(func0(1, 3, 2), "Yes") == 0); assert(strcmp(func0(1, 2, 3), "No") == 0); assert(strcmp(func0(1, -5, 6), "No") == 0); return 0; }
O3
c
func0: endbr64 imul %edi,%edx imul %esi,%esi lea (%rdx,%rdx,8),%eax lea 0xeb4(%rip),%rdx add %esi,%esi cmp %eax,%esi lea 0xea5(%rip),%rax cmovne %rdx,%rax retq nopw %cs:0x0(%rax,%rax,1) xchg %ax,%ax
func0: endbr64 imul edi, edx lea rdx, unk_2004 imul esi, esi lea eax, [rdi+rdi*8] add esi, esi cmp esi, eax lea rax, unk_2008 cmovz rax, rdx retn
void * func0(int a1, int a2, int a3) { void *result; // rax result = &unk_2008; if ( 2 * a2 * a2 == 9 * a3 * a1 ) return &unk_2004; return result; }
func0: ENDBR64 IMUL EDI,EDX LEA RDX,[0x102004] IMUL ESI,ESI LEA EAX,[RDI + RDI*0x8] ADD ESI,ESI CMP ESI,EAX LEA RAX,[0x102008] CMOVZ RAX,RDX RET
int * func0(int param_1,int param_2,int param_3) { int *puVar1; puVar1 = &DAT_00102008; if (param_2 * param_2 * 2 == param_1 * param_3 * 9) { puVar1 = &DAT_00102004; } return puVar1; }
5,332
func0
#include <stdio.h> #include <assert.h> #include <math.h>
int func0(int n) { int result = pow(2, n) - 1; return result * result - 2; }
int main() { assert(func0(2) == 7); assert(func0(4) == 223); assert(func0(5) == 959); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x20,%rsp mov %edi,-0x14(%rbp) cvtsi2sdl -0x14(%rbp),%xmm0 mov 0xef4(%rip),%rax movapd %xmm0,%xmm1 movq %rax,%xmm0 callq 1060 <pow@plt> movsd 0xee6(%rip),%xmm1 subsd %xmm1,%xmm0 cvttsd2si %xmm0,%eax mov %eax,-0x4(%rbp) mov -0x4(%rbp),%eax imul %eax,...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_14], edi pxor xmm0, xmm0 cvtsi2sd xmm0, [rbp+var_14] mov rax, cs:x movapd xmm1, xmm0; y movq xmm0, rax; x call _pow movq rax, xmm0 movsd xmm0, cs:qword_2068 movq xmm1, rax subsd xmm1, xmm0 cvttsd2si eax, xmm1 mov [...
long long func0(int a1) { double v1; // rax v1 = pow(2.0, (double)a1); return (unsigned int)((int)(v1 - 1.0) * (int)(v1 - 1.0) - 2); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x14],EDI PXOR XMM0,XMM0 CVTSI2SD XMM0,dword ptr [RBP + -0x14] MOV RAX,qword ptr [0x00102060] MOVAPD XMM1,XMM0 MOVQ XMM0,RAX CALL 0x00101060 MOVQ RAX,XMM0 MOVSD XMM0,qword ptr [0x00102068] MOVQ XMM1,RAX SUBSD XMM1,XMM0 CVTTSD2SI EAX,XMM1 MOV dword p...
int func0(int param_1) { double dVar1; dVar1 = pow(DAT_00102060,(double)param_1); return (int)(dVar1 - DAT_00102068) * (int)(dVar1 - DAT_00102068) + -2; }
5,333
func0
#include <stdio.h> #include <assert.h> #include <math.h>
int func0(int n) { int result = pow(2, n) - 1; return result * result - 2; }
int main() { assert(func0(2) == 7); assert(func0(4) == 223); assert(func0(5) == 959); return 0; }
O1
c
func0: endbr64 sub $0x8,%rsp pxor %xmm1,%xmm1 cvtsi2sd %edi,%xmm1 movsd 0xef7(%rip),%xmm0 callq 1060 <pow@plt> subsd 0xef2(%rip),%xmm0 cvttsd2si %xmm0,%eax imul %eax,%eax sub $0x2,%eax add $0x8,%rsp retq
func0: endbr64 sub rsp, 8 pxor xmm1, xmm1 cvtsi2sd xmm1, edi movsd xmm0, cs:qword_2058 call _pow subsd xmm0, cs:qword_2060 cvttsd2si eax, xmm0 imul eax, eax sub eax, 2 add rsp, 8 retn
long long func0(int a1) { double v1; // xmm0_8 v1 = pow(2.0, (double)a1); return (unsigned int)((int)(v1 - 1.0) * (int)(v1 - 1.0) - 2); }
func0: ENDBR64 SUB RSP,0x8 PXOR XMM1,XMM1 CVTSI2SD XMM1,EDI MOVSD XMM0,qword ptr [0x00102058] CALL 0x00101060 SUBSD XMM0,qword ptr [0x00102060] CVTTSD2SI EAX,XMM0 IMUL EAX,EAX SUB EAX,0x2 ADD RSP,0x8 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int func0(int param_1) { double dVar1; dVar1 = pow(DAT_00102058,(double)param_1); return (int)(dVar1 - _DAT_00102060) * (int)(dVar1 - _DAT_00102060) + -2; }
5,334
func0
#include <stdio.h> #include <assert.h> #include <math.h>
int func0(int n) { int result = pow(2, n) - 1; return result * result - 2; }
int main() { assert(func0(2) == 7); assert(func0(4) == 223); assert(func0(5) == 959); return 0; }
O2
c
func0: endbr64 pxor %xmm1,%xmm1 sub $0x8,%rsp movsd 0xe94(%rip),%xmm0 cvtsi2sd %edi,%xmm1 callq 1050 <pow@plt> subsd 0xe8b(%rip),%xmm0 add $0x8,%rsp cvttsd2si %xmm0,%eax imul %eax,%eax sub $0x2,%eax retq nopw %cs:0x0(%rax,%rax,1) xchg %ax,%ax
func0: endbr64 pxor xmm1, xmm1 sub rsp, 8 movsd xmm0, cs:qword_2058 cvtsi2sd xmm1, edi call _pow subsd xmm0, cs:qword_2060 add rsp, 8 cvttsd2si eax, xmm0 imul eax, eax sub eax, 2 retn
long long func0(int a1) { double v1; // xmm0_8 v1 = pow(2.0, (double)a1); return (unsigned int)((int)(v1 - 1.0) * (int)(v1 - 1.0) - 2); }
func0: ENDBR64 PXOR XMM1,XMM1 SUB RSP,0x8 MOVSD XMM0,qword ptr [0x00102058] CVTSI2SD XMM1,EDI CALL 0x00101060 SUBSD XMM0,qword ptr [0x00102060] ADD RSP,0x8 CVTTSD2SI EAX,XMM0 IMUL EAX,EAX SUB EAX,0x2 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int func0(int param_1) { double dVar1; dVar1 = pow(DAT_00102058,(double)param_1); return (int)(dVar1 - _DAT_00102060) * (int)(dVar1 - _DAT_00102060) + -2; }
5,335
func0
#include <stdio.h> #include <assert.h> #include <math.h>
int func0(int n) { int result = pow(2, n) - 1; return result * result - 2; }
int main() { assert(func0(2) == 7); assert(func0(4) == 223); assert(func0(5) == 959); return 0; }
O3
c
func0: endbr64 pxor %xmm1,%xmm1 sub $0x8,%rsp movsd 0xe94(%rip),%xmm0 cvtsi2sd %edi,%xmm1 callq 1050 <pow@plt> subsd 0xe8b(%rip),%xmm0 add $0x8,%rsp cvttsd2si %xmm0,%eax imul %eax,%eax sub $0x2,%eax retq nopw %cs:0x0(%rax,%rax,1) xchg %ax,%ax
func0: endbr64 pxor xmm1, xmm1 sub rsp, 8 movsd xmm0, cs:x; x cvtsi2sd xmm1, edi; y call _pow subsd xmm0, cs:qword_2010 add rsp, 8 cvttsd2si eax, xmm0 imul eax, eax sub eax, 2 retn
long long func0(int a1) { double v1; // xmm0_8 v1 = pow(2.0, (double)a1); return (unsigned int)((int)(v1 - 1.0) * (int)(v1 - 1.0) - 2); }
func0: ENDBR64 PXOR XMM1,XMM1 SUB RSP,0x8 MOVSD XMM0,qword ptr [0x00102008] CVTSI2SD XMM1,EDI CALL 0x00101050 SUBSD XMM0,qword ptr [0x00102010] ADD RSP,0x8 CVTTSD2SI EAX,XMM0 IMUL EAX,EAX SUB EAX,0x2 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int func0(int param_1) { double dVar1; dVar1 = pow(DAT_00102008,(double)param_1); return (int)(dVar1 - _DAT_00102010) * (int)(dVar1 - _DAT_00102010) + -2; }
5,336
func0
#include <stdio.h> #include <assert.h> #include <string.h>
int func0(char* list1[], int size, char* result[]) { int k = 0; for (int i = 0; i < size; i++) { if (strcmp(list1[i], "") != 0) { // Checking if the string is not empty result[k++] = list1[i]; } } return k; }
int main() { // Test data char* list1[] = {"", "", "", "Red", "Green", "12", "Blue", "", ""}; char* expected1[] = {"Red", "Green", "12", "Blue"}; char* result1[4]; char* list2[] = {"", "", "", "", "", "Green", "12", "Blue", "", ""}; char* expected2[] = {"Green", "12", "Blue"}; char*...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) mov %rdx,-0x28(%rbp) movl $0x0,-0x8(%rbp) movl $0x0,-0x4(%rbp) jmp 1206 <func0+0x7d> mov -0x4(%rbp),%eax cltq lea 0x0(,%rax,8),%rdx mov -0x18(%rbp),%rax add %rdx,%rax mov (%rax),%rax movzbl (%rax),%eax m...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_28], rdx mov [rbp+var_8], 0 mov [rbp+var_4], 0 jmp short loc_1206 loc_11AC: mov eax, [rbp+var_4] cdqe lea rdx, ds:0[rax*8] mov rax, [rbp+var_18] add rax, rdx mov rax, [rax] mo...
long long func0(long long a1, int a2, long long a3) { int v3; // eax unsigned int v5; // [rsp+20h] [rbp-8h] int i; // [rsp+24h] [rbp-4h] v5 = 0; for ( i = 0; i < a2; ++i ) { if ( **(_BYTE **)(8LL * i + a1) ) { v3 = v5++; *(_QWORD *)(a3 + 8LL * v3) = *(_QWORD *)(8LL * i + a1); } }...
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV qword ptr [RBP + -0x28],RDX MOV dword ptr [RBP + -0x8],0x0 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00101206 LAB_001011ac: MOV EAX,dword ptr [RBP + -0x4] CDQE LEA RDX,[RAX*0x8] MOV RAX,qword ptr [RBP + -0x18] ADD RAX,RDX...
int func0(long param_1,int param_2,long param_3) { int4 local_10; int4 local_c; local_10 = 0; for (local_c = 0; local_c < param_2; local_c = local_c + 1) { if (**(char **)(param_1 + (long)local_c * 8) != '\0') { *(int8 *)((long)local_10 * 8 + param_3) = *(int8 *)((long)local_c * 8 + param_1); ...
5,337
func0
#include <stdio.h> #include <assert.h> #include <string.h>
int func0(char* list1[], int size, char* result[]) { int k = 0; for (int i = 0; i < size; i++) { if (strcmp(list1[i], "") != 0) { // Checking if the string is not empty result[k++] = list1[i]; } } return k; }
int main() { // Test data char* list1[] = {"", "", "", "Red", "Green", "12", "Blue", "", ""}; char* expected1[] = {"Red", "Green", "12", "Blue"}; char* result1[4]; char* list2[] = {"", "", "", "", "", "Green", "12", "Blue", "", ""}; char* expected2[] = {"Green", "12", "Blue"}; char*...
O1
c
func0: endbr64 test %esi,%esi jle 11c0 <func0+0x37> mov %rdi,%rax lea -0x1(%rsi),%ecx lea 0x8(%rdi,%rcx,8),%rdi mov $0x0,%esi jmp 11ac <func0+0x23> add $0x8,%rax cmp %rdi,%rax je 11c5 <func0+0x3c> mov (%rax),%rcx cmpb $0x0,(%rcx) je 11a3 <func0+0x1a> movslq %esi,%r8 mov %rcx,(%...
func0: endbr64 test esi, esi jle short loc_11C0 mov rax, rdi lea ecx, [rsi-1] lea rdi, [rdi+rcx*8+8] mov esi, 0 jmp short loc_11AC loc_11A3: add rax, 8 cmp rax, rdi jz short loc_11C5 loc_11AC: mov rcx, [rax] cmp byte ptr [rcx], 0 jz short loc_11A3 movsxd r8, esi mov...
long long func0(_QWORD *a1, int a2, long long a3) { _QWORD *v3; // rax long long v4; // rdi unsigned int v5; // esi if ( a2 <= 0 ) { return 0; } else { v3 = a1; v4 = (long long)&a1[(unsigned int)(a2 - 1) + 1]; v5 = 0; do { if ( *(_BYTE *)*v3 ) *(_QWORD *)(a3 + 8LL...
func0: ENDBR64 TEST ESI,ESI JLE 0x001011c0 MOV RAX,RDI LEA ECX,[RSI + -0x1] LEA RDI,[RDI + RCX*0x8 + 0x8] MOV ESI,0x0 JMP 0x001011ac LAB_001011a3: ADD RAX,0x8 CMP RAX,RDI JZ 0x001011c5 LAB_001011ac: MOV RCX,qword ptr [RAX] CMP byte ptr [RCX],0x0 JZ 0x001011a3 MOVSXD R8,ESI MOV qword ptr [RDX + R8*0x8],RCX LEA ESI,[RSI ...
int func0(int8 *param_1,int param_2,long param_3) { int8 *puVar1; int iVar2; if (param_2 < 1) { iVar2 = 0; } else { puVar1 = param_1 + (ulong)(param_2 - 1) + 1; iVar2 = 0; do { if (*(char *)*param_1 != '\0') { *(char **)(param_3 + (long)iVar2 * 8) = (char *)*param_1; ...
5,338
func0
#include <stdio.h> #include <assert.h> #include <string.h>
int func0(char* list1[], int size, char* result[]) { int k = 0; for (int i = 0; i < size; i++) { if (strcmp(list1[i], "") != 0) { // Checking if the string is not empty result[k++] = list1[i]; } } return k; }
int main() { // Test data char* list1[] = {"", "", "", "Red", "Green", "12", "Blue", "", ""}; char* expected1[] = {"Red", "Green", "12", "Blue"}; char* result1[4]; char* list2[] = {"", "", "", "", "", "Green", "12", "Blue", "", ""}; char* expected2[] = {"Green", "12", "Blue"}; char*...
O2
c
func0: endbr64 test %esi,%esi jle 15c0 <func0+0x40> lea -0x1(%rsi),%eax xor %r8d,%r8d lea 0x8(%rdi,%rax,8),%rcx nopl 0x0(%rax,%rax,1) mov (%rdi),%rax cmpb $0x0,(%rax) je 15ab <func0+0x2b> movslq %r8d,%rsi add $0x1,%r8d mov %rax,(%rdx,%rsi,8) add $0x8,%rdi cmp %rcx,%rdi jne 1598 <...
func0: endbr64 test esi, esi jle short loc_1550 lea eax, [rsi-1] xor r8d, r8d lea rcx, [rdi+rax*8+8] nop dword ptr [rax+rax+00h] loc_1528: mov rax, [rdi] cmp byte ptr [rax], 0 jz short loc_153B movsxd rsi, r8d add r8d, 1 mov [rdx+rsi*8], rax loc_153B: add rdi, 8 cmp ...
long long func0(_QWORD *a1, int a2, long long a3) { unsigned int v3; // r8d long long v4; // rcx long long v5; // rsi if ( a2 <= 0 ) return 0LL; v3 = 0; v4 = (long long)&a1[(unsigned int)(a2 - 1) + 1]; do { if ( *(_BYTE *)*a1 ) { v5 = (int)v3++; *(_QWORD *)(a3 + 8 * v5) = *a1; ...
func0: ENDBR64 TEST ESI,ESI JLE 0x00101550 LEA EAX,[RSI + -0x1] XOR R8D,R8D LEA RCX,[RDI + RAX*0x8 + 0x8] NOP dword ptr [RAX + RAX*0x1] LAB_00101528: MOV RAX,qword ptr [RDI] CMP byte ptr [RAX],0x0 JZ 0x0010153b MOVSXD RSI,R8D ADD R8D,0x1 MOV qword ptr [RDX + RSI*0x8],RAX LAB_0010153b: ADD RDI,0x8 CMP RDI,RCX JNZ 0x0010...
int func0(int8 *param_1,int param_2,long param_3) { int8 *puVar1; long lVar2; int iVar3; if (0 < param_2) { iVar3 = 0; puVar1 = param_1 + (ulong)(param_2 - 1) + 1; do { if (*(char *)*param_1 != '\0') { lVar2 = (long)iVar3; iVar3 = iVar3 + 1; *(char **)(param_3 + lVa...
5,339
func0
#include <stdio.h> #include <assert.h> #include <string.h>
int func0(char* list1[], int size, char* result[]) { int k = 0; for (int i = 0; i < size; i++) { if (strcmp(list1[i], "") != 0) { // Checking if the string is not empty result[k++] = list1[i]; } } return k; }
int main() { // Test data char* list1[] = {"", "", "", "Red", "Green", "12", "Blue", "", ""}; char* expected1[] = {"Red", "Green", "12", "Blue"}; char* result1[4]; char* list2[] = {"", "", "", "", "", "Green", "12", "Blue", "", ""}; char* expected2[] = {"Green", "12", "Blue"}; char*...
O3
c
func0: endbr64 test %esi,%esi jle 17e0 <func0+0x40> lea -0x1(%rsi),%eax xor %r8d,%r8d lea 0x8(%rdi,%rax,8),%rcx nopl 0x0(%rax,%rax,1) mov (%rdi),%rax cmpb $0x0,(%rax) je 17cb <func0+0x2b> movslq %r8d,%rsi add $0x1,%r8d mov %rax,(%rdx,%rsi,8) add $0x8,%rdi cmp %rdi,%rcx jne 17b8 <...
func0: endbr64 test esi, esi jle short loc_1180 movsxd rsi, esi xor ecx, ecx lea rsi, [rdi+rsi*8] nop dword ptr [rax+00000000h] loc_1158: mov rax, [rdi] cmp byte ptr [rax], 0 jz short loc_116A movsxd r8, ecx add ecx, 1 mov [rdx+r8*8], rax loc_116A: add rdi, 8 cmp rdi, r...
long long func0(_QWORD *a1, int a2, long long a3) { unsigned int v3; // ecx _QWORD *v4; // rsi long long v5; // r8 if ( a2 <= 0 ) return 0LL; v3 = 0; v4 = &a1[a2]; do { if ( *(_BYTE *)*a1 ) { v5 = (int)v3++; *(_QWORD *)(a3 + 8 * v5) = *a1; } ++a1; } while ( a1 != v4...
func0: ENDBR64 TEST ESI,ESI JLE 0x00101180 MOVSXD RSI,ESI XOR ECX,ECX LEA RSI,[RDI + RSI*0x8] NOP dword ptr [RAX] LAB_00101158: MOV RAX,qword ptr [RDI] CMP byte ptr [RAX],0x0 JZ 0x0010116a MOVSXD R8,ECX ADD ECX,0x1 MOV qword ptr [RDX + R8*0x8],RAX LAB_0010116a: ADD RDI,0x8 CMP RDI,RSI JNZ 0x00101158 MOV EAX,ECX RET LAB...
int func0(int8 *param_1,int param_2,long param_3) { int8 *puVar1; int iVar2; long lVar3; if (0 < param_2) { iVar2 = 0; puVar1 = param_1 + param_2; do { if (*(char *)*param_1 != '\0') { lVar3 = (long)iVar2; iVar2 = iVar2 + 1; *(char **)(param_3 + lVar3 * 8) = (char *...
5,340
func0
#include <stdio.h> #include <assert.h>
int func0(int nums[], int size) { int max_val = 0; int result = nums[0]; for (int i = 0; i < size; i++) { int occu = 0; for (int j = 0; j < size; j++) { if (nums[j] == nums[i]) { occu++; } } if (occu > max_val) { ...
int main() { int arr1[] = {1,2,3,1,2,3,12,4,2}; int arr2[] = {1,2,6,7,0,1,0,1,0}; int arr3[] = {1,2,3,1,2,4,1}; assert(func0(arr1, 9) == 2); assert(func0(arr2, 9) == 1); assert(func0(arr3, 7) == 1); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x28(%rbp) mov %esi,-0x2c(%rbp) movl $0x0,-0x14(%rbp) mov -0x28(%rbp),%rax mov (%rax),%eax mov %eax,-0x10(%rbp) movl $0x0,-0xc(%rbp) jmp 120c <func0+0xa3> movl $0x0,-0x8(%rbp) movl $0x0,-0x4(%rbp) jmp 11d9 <func0+0x70> mov -0x4(%rbp),...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_28], rdi mov [rbp+var_2C], esi mov [rbp+var_14], 0 mov rax, [rbp+var_28] mov eax, [rax] mov [rbp+var_10], eax mov [rbp+var_C], 0 jmp short loc_120C loc_1191: mov [rbp+var_8], 0 mov [rbp+var_4], 0 jmp short loc_11D9 loc_...
long long func0(unsigned int *a1, int a2) { int v3; // [rsp+18h] [rbp-14h] unsigned int v4; // [rsp+1Ch] [rbp-10h] int i; // [rsp+20h] [rbp-Ch] int v6; // [rsp+24h] [rbp-8h] int j; // [rsp+28h] [rbp-4h] v3 = 0; v4 = *a1; for ( i = 0; i < a2; ++i ) { v6 = 0; for ( j = 0; j < a2; ++j ) { ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x28],RDI MOV dword ptr [RBP + -0x2c],ESI MOV dword ptr [RBP + -0x14],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x10],EAX MOV dword ptr [RBP + -0xc],0x0 JMP 0x0010120c LAB_00101191: MOV dword ptr [RBP + -0x8],0x0 MOV dword...
int4 func0(int4 *param_1,int param_2) { int local_1c; int4 local_18; int local_14; int local_10; int local_c; local_1c = 0; local_18 = *param_1; for (local_14 = 0; local_14 < param_2; local_14 = local_14 + 1) { local_10 = 0; for (local_c = 0; local_c < param_2; local_c = local_c + 1) { ...
5,341
func0
#include <stdio.h> #include <assert.h>
int func0(int nums[], int size) { int max_val = 0; int result = nums[0]; for (int i = 0; i < size; i++) { int occu = 0; for (int j = 0; j < size; j++) { if (nums[j] == nums[i]) { occu++; } } if (occu > max_val) { ...
int main() { int arr1[] = {1,2,3,1,2,3,12,4,2}; int arr2[] = {1,2,6,7,0,1,0,1,0}; int arr3[] = {1,2,3,1,2,4,1}; assert(func0(arr1, 9) == 2); assert(func0(arr2, 9) == 1); assert(func0(arr3, 7) == 1); return 0; }
O1
c
func0: endbr64 mov (%rdi),%r11d test %esi,%esi jle 11ba <func0+0x51> mov %rdi,%r10 lea -0x1(%rsi),%eax lea 0x4(%rdi,%rax,4),%r8 mov $0x0,%r9d jmp 1190 <func0+0x27> add $0x4,%rdi cmp %r8,%rdi je 11ba <func0+0x51> mov (%rdi),%esi mov %r10,%rax mov $0x0,%edx cmp %esi,(%rax) set...
func0: endbr64 mov r11d, [rdi] test esi, esi jle short loc_11BB lea eax, [rsi-1] lea r8, [rdi+rax*4+4] mov r9, rdi mov r10d, 0 jmp short loc_1190 loc_1187: add r9, 4 cmp r9, r8 jz short loc_11BB loc_1190: mov esi, [r9] mov rax, rdi mov edx, 0 loc_119B: cmp [ra...
long long func0(unsigned int *a1, int a2) { unsigned int v2; // r11d long long v3; // r8 unsigned int *v4; // r9 int v5; // r10d unsigned int *v6; // rax int v7; // edx v2 = *a1; if ( a2 > 0 ) { v3 = (long long)&a1[a2 - 1 + 1]; v4 = a1; v5 = 0; do { v6 = a1; v7 = 0; ...
func0: ENDBR64 MOV R11D,dword ptr [RDI] TEST ESI,ESI JLE 0x001011bb LEA EAX,[RSI + -0x1] LEA R8,[RDI + RAX*0x4 + 0x4] MOV R9,RDI MOV R10D,0x0 JMP 0x00101190 LAB_00101187: ADD R9,0x4 CMP R9,R8 JZ 0x001011bb LAB_00101190: MOV ESI,dword ptr [R9] MOV RAX,RDI MOV EDX,0x0 LAB_0010119b: CMP dword ptr [RAX],ESI SETZ CL MOVZX E...
int func0(int *param_1,int param_2) { int *piVar1; int iVar2; int *piVar3; int iVar4; int iVar5; iVar5 = *param_1; if (0 < param_2) { iVar4 = 0; piVar3 = param_1; do { iVar2 = 0; piVar1 = param_1; do { iVar2 = iVar2 + (uint)(*piVar1 == *piVar3); piVar1 = p...
5,342
func0
#include <stdio.h> #include <assert.h>
int func0(int nums[], int size) { int max_val = 0; int result = nums[0]; for (int i = 0; i < size; i++) { int occu = 0; for (int j = 0; j < size; j++) { if (nums[j] == nums[i]) { occu++; } } if (occu > max_val) { ...
int main() { int arr1[] = {1,2,3,1,2,3,12,4,2}; int arr2[] = {1,2,6,7,0,1,0,1,0}; int arr3[] = {1,2,3,1,2,4,1}; assert(func0(arr1, 9) == 2); assert(func0(arr2, 9) == 1); assert(func0(arr3, 7) == 1); return 0; }
O2
c
func0: endbr64 push %r12 mov (%rdi),%r11d test %esi,%esi jle 1346 <func0+0x66> lea 0x4(%rdi),%r9 lea -0x1(%rsi),%eax mov %r11d,%r12d mov %r11d,%esi lea (%r9,%rax,4),%rdi mov %r9,%r8 xor %r10d,%r10d nopl 0x0(%rax) mov %r9,%rax mov %r11d,%ecx xor %edx,%edx jmp 131e <func0+0x3e...
func0: endbr64 push r12 mov r11d, [rdi] test esi, esi jle short loc_1346 lea r9, [rdi+4] lea eax, [rsi-1] mov r12d, r11d mov esi, r11d lea rdi, [r9+rax*4] mov r8, r9 xor r10d, r10d nop dword ptr [rax+00h] loc_1308: mov rax, r9 mov ecx, r11d xor edx, edx jmp ...
long long func0(unsigned int *a1, int a2) { unsigned int v2; // r11d unsigned int *v3; // r9 long long v4; // rax unsigned int v5; // r12d unsigned int v6; // esi long long v7; // rdi unsigned int *v8; // r8 int v9; // r10d unsigned int *v10; // rax unsigned int v11; // ecx int v12; // edx v2 ...
func0: ENDBR64 PUSH R12 MOV R11D,dword ptr [RDI] TEST ESI,ESI JLE 0x00101346 LEA R9,[RDI + 0x4] LEA EAX,[RSI + -0x1] MOV R12D,R11D MOV ESI,R11D LEA RDI,[R9 + RAX*0x4] MOV R8,R9 XOR R10D,R10D NOP dword ptr [RAX] LAB_00101308: MOV RAX,R9 MOV ECX,R11D XOR EDX,EDX JMP 0x0010131e LAB_00101318: MOV ECX,dword ptr [RAX] ADD RA...
int func0(int *param_1,int param_2) { int iVar1; int *piVar2; int iVar3; int iVar4; int iVar5; int *piVar6; int iVar7; int iVar8; iVar1 = *param_1; iVar8 = iVar1; if (0 < param_2) { param_1 = param_1 + 1; iVar7 = 0; piVar6 = param_1; iVar5 = iVar1; while( true ) { iVa...
5,343
func0
#include <stdio.h> #include <assert.h>
int func0(int nums[], int size) { int max_val = 0; int result = nums[0]; for (int i = 0; i < size; i++) { int occu = 0; for (int j = 0; j < size; j++) { if (nums[j] == nums[i]) { occu++; } } if (occu > max_val) { ...
int main() { int arr1[] = {1,2,3,1,2,3,12,4,2}; int arr2[] = {1,2,6,7,0,1,0,1,0}; int arr3[] = {1,2,3,1,2,4,1}; assert(func0(arr1, 9) == 2); assert(func0(arr2, 9) == 1); assert(func0(arr3, 7) == 1); return 0; }
O3
c
func0: endbr64 push %r14 push %r13 mov (%rdi),%r13d push %r12 push %rbp push %rbx test %esi,%esi jle 13a6 <func0+0x106> mov %esi,%edx lea -0x1(%rsi),%eax mov %esi,%r11d mov %rdi,%r9 shr $0x2,%edx mov %rax,%rbp lea 0x4(%rdi,%rax,4),%r12 and $0xfffffffc,%r11d shl $0x4,%rdx xor...
func0: endbr64 push r14 push r13 mov r13d, [rdi] push r12 push rbp push rbx test esi, esi jle loc_138A mov edx, esi movsxd rax, esi mov r11d, esi mov r8, rdi shr edx, 2 mov r9d, esi lea r12, [rdi+rax*4] and r11d, 0FFFFFFFCh shl rdx, 4 lea ebp, [rsi-1] xor ...
long long func0(unsigned int *a1, int a2) { unsigned int v2; // r13d const __m128i *v3; // r8 unsigned int *v5; // r12 unsigned int v6; // r11d unsigned int v7; // ebp int v8; // ebx const __m128i *v9; // rdx unsigned int v10; // esi const __m128i *v11; // rax __m128i v12; // xmm1 __m128i v13; //...
func0: ENDBR64 PUSH R14 PUSH R13 MOV R13D,dword ptr [RDI] PUSH R12 PUSH RBP PUSH RBX TEST ESI,ESI JLE 0x0010138a MOV EDX,ESI MOVSXD RAX,ESI MOV R11D,ESI MOV R8,RDI SHR EDX,0x2 MOV R9D,ESI LEA R12,[RDI + RAX*0x4] AND R11D,0xfffffffc SHL RDX,0x4 LEA EBP,[RSI + -0x1] XOR EBX,EBX ADD RDX,RDI NOP dword ptr [RAX] LAB_001012e...
int func0(int *param_1,uint param_2) { int iVar1; int iVar2; int *piVar3; int *piVar4; int *piVar5; int *piVar6; uint uVar7; int iVar8; int *piVar9; int iVar10; int iVar11; int iVar12; int iVar13; int iVar14; iVar10 = *param_1; if (0 < (int)param_2) { iVar8 = 0; piVar9 = para...
5,344
func0
#include <stdio.h> #include <assert.h>
void func0(int test_list[][3], int size, int K, int result[][3]) { for(int i = 0; i < size; i++) { for(int j = 0; j < 3; j++) { result[i][j] = test_list[i][j] + K; } } }
int main() { int test_list1[3][3] = {{1, 3, 4}, {2, 4, 6}, {3, 8, 1}}; int result1[3][3]; func0(test_list1, 3, 4, result1); int expected1[3][3] = {{5, 7, 8}, {6, 8, 10}, {7, 12, 5}}; for(int i = 0; i < 3; i++) { for(int j = 0; j < 3; j++) { assert(result1[i][j] == expected...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) mov %edx,-0x20(%rbp) mov %rcx,-0x28(%rbp) movl $0x0,-0x8(%rbp) jmp 11ee <func0+0x85> movl $0x0,-0x4(%rbp) jmp 11e4 <func0+0x7b> mov -0x8(%rbp),%eax movslq %eax,%rdx mov %rdx,%rax add %rax,%rax add %rd...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_20], edx mov [rbp+var_28], rcx mov [rbp+var_8], 0 jmp short loc_11EE loc_1188: mov [rbp+var_4], 0 jmp short loc_11E4 loc_1191: mov eax, [rbp+var_8] movsxd rdx, eax mov rax, rdx a...
long long func0(long long a1, int a2, int a3, long long a4) { long long result; // rax unsigned int i; // [rsp+20h] [rbp-8h] int j; // [rsp+24h] [rbp-4h] for ( i = 0; ; ++i ) { result = i; if ( (int)i >= a2 ) break; for ( j = 0; j <= 2; ++j ) *(_DWORD *)(a4 + 12LL * (int)i + 4LL * j)...
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV dword ptr [RBP + -0x20],EDX MOV qword ptr [RBP + -0x28],RCX MOV dword ptr [RBP + -0x8],0x0 JMP 0x001011ee LAB_00101188: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001011e4 LAB_00101191: MOV EAX,dword ptr [RBP + -0x8] MOVSX...
void func0(long param_1,int param_2,int param_3,long param_4) { int4 local_10; int4 local_c; for (local_10 = 0; local_10 < param_2; local_10 = local_10 + 1) { for (local_c = 0; local_c < 3; local_c = local_c + 1) { *(int *)((long)local_10 * 0xc + param_4 + (long)local_c * 4) = *(int *)((l...
5,345
func0
#include <stdio.h> #include <assert.h>
void func0(int test_list[][3], int size, int K, int result[][3]) { for(int i = 0; i < size; i++) { for(int j = 0; j < 3; j++) { result[i][j] = test_list[i][j] + K; } } }
int main() { int test_list1[3][3] = {{1, 3, 4}, {2, 4, 6}, {3, 8, 1}}; int result1[3][3]; func0(test_list1, 3, 4, result1); int expected1[3][3] = {{5, 7, 8}, {6, 8, 10}, {7, 12, 5}}; for(int i = 0; i < 3; i++) { for(int j = 0; j < 3; j++) { assert(result1[i][j] == expected...
O1
c
func0: endbr64 test %esi,%esi jle 11a3 <func0+0x3a> mov %rdi,%rax lea -0x1(%rsi),%esi lea (%rsi,%rsi,2),%rsi lea 0xc(%rdi,%rsi,4),%rdi mov %edx,%esi add (%rax),%esi mov %esi,(%rcx) mov %edx,%esi add 0x4(%rax),%esi mov %esi,0x4(%rcx) mov %edx,%esi add 0x8(%rax),%esi mov %esi,0...
func0: endbr64 test esi, esi jle short locret_11A3 mov rax, rdi lea esi, [rsi-1] lea rsi, [rsi+rsi*2] lea rdi, [rdi+rsi*4+0Ch] loc_1180: mov esi, edx add esi, [rax] mov [rcx], esi mov esi, edx add esi, [rax+4] mov [rcx+4], esi mov esi, edx add esi, [rax+8] mov ...
void func0(_DWORD *a1, int a2, int a3, _DWORD *a4) { _DWORD *v4; // rax long long v5; // rdi if ( a2 > 0 ) { v4 = a1; v5 = (long long)&a1[3 * (a2 - 1) + 3]; do { *a4 = *v4 + a3; a4[1] = v4[1] + a3; a4[2] = v4[2] + a3; v4 += 3; a4 += 3; } while ( v4 != (_DW...
func0: ENDBR64 TEST ESI,ESI JLE 0x001011a3 MOV RAX,RDI LEA ESI,[RSI + -0x1] LEA RSI,[RSI + RSI*0x2] LEA RDI,[RDI + RSI*0x4 + 0xc] LAB_00101180: MOV ESI,EDX ADD ESI,dword ptr [RAX] MOV dword ptr [RCX],ESI MOV ESI,EDX ADD ESI,dword ptr [RAX + 0x4] MOV dword ptr [RCX + 0x4],ESI MOV ESI,EDX ADD ESI,dword ptr [RAX + 0x8] MO...
void func0(int *param_1,int param_2,int param_3,int *param_4) { int *piVar1; if (0 < param_2) { piVar1 = param_1 + (ulong)(param_2 - 1) * 3 + 3; do { *param_4 = param_3 + *param_1; param_4[1] = param_3 + param_1[1]; param_4[2] = param_3 + param_1[2]; param_1 = param_1 + 3; ...
5,346
func0
#include <stdio.h> #include <assert.h>
void func0(int test_list[][3], int size, int K, int result[][3]) { for(int i = 0; i < size; i++) { for(int j = 0; j < 3; j++) { result[i][j] = test_list[i][j] + K; } } }
int main() { int test_list1[3][3] = {{1, 3, 4}, {2, 4, 6}, {3, 8, 1}}; int result1[3][3]; func0(test_list1, 3, 4, result1); int expected1[3][3] = {{5, 7, 8}, {6, 8, 10}, {7, 12, 5}}; for(int i = 0; i < 3; i++) { for(int j = 0; j < 3; j++) { assert(result1[i][j] == expected...
O2
c
func0: endbr64 test %esi,%esi jle 15bc <func0+0x3c> lea -0x1(%rsi),%eax lea (%rax,%rax,2),%rax lea 0xc(%rdi,%rax,4),%rsi nopl 0x0(%rax) mov (%rdi),%eax add $0xc,%rdi add $0xc,%rcx add %edx,%eax mov %eax,-0xc(%rcx) mov -0x8(%rdi),%eax add %edx,%eax mov %eax,-0x8(%rcx) mov -0x4(...
func0: endbr64 test esi, esi jle short locret_152C lea eax, [rsi-1] lea rax, [rax+rax*2] lea rsi, [rdi+rax*4+0Ch] nop dword ptr [rax+00h] loc_1508: mov eax, [rdi] add rdi, 0Ch add rcx, 0Ch add eax, edx mov [rcx-0Ch], eax mov eax, [rdi-8] add eax, edx mov [rcx-8], e...
long long func0(int *a1, int a2, int a3, long long a4) { long long v4; // rsi int v5; // eax long long result; // rax if ( a2 > 0 ) { v4 = (long long)&a1[3 * (a2 - 1) + 3]; do { v5 = *a1; a1 += 3; a4 += 12LL; *(_DWORD *)(a4 - 12) = a3 + v5; *(_DWORD *)(a4 - 8) = a3 ...
func0: ENDBR64 TEST ESI,ESI JLE 0x0010152c LEA EAX,[RSI + -0x1] LEA RAX,[RAX + RAX*0x2] LEA RSI,[RDI + RAX*0x4 + 0xc] NOP dword ptr [RAX] LAB_00101508: MOV EAX,dword ptr [RDI] ADD RDI,0xc ADD RCX,0xc ADD EAX,EDX MOV dword ptr [RCX + -0xc],EAX MOV EAX,dword ptr [RDI + -0x8] ADD EAX,EDX MOV dword ptr [RCX + -0x8],EAX MOV...
void func0(int *param_1,int param_2,int param_3,int *param_4) { int *piVar1; int *piVar2; if (0 < param_2) { piVar1 = param_1; do { piVar2 = piVar1 + 3; *param_4 = *piVar1 + param_3; param_4[1] = piVar1[1] + param_3; param_4[2] = piVar1[2] + param_3; param_4 = param_4 + 3...
5,347
func0
#include <stdio.h> #include <assert.h>
void func0(int test_list[][3], int size, int K, int result[][3]) { for(int i = 0; i < size; i++) { for(int j = 0; j < 3; j++) { result[i][j] = test_list[i][j] + K; } } }
int main() { int test_list1[3][3] = {{1, 3, 4}, {2, 4, 6}, {3, 8, 1}}; int result1[3][3]; func0(test_list1, 3, 4, result1); int expected1[3][3] = {{5, 7, 8}, {6, 8, 10}, {7, 12, 5}}; for(int i = 0; i < 3; i++) { for(int j = 0; j < 3; j++) { assert(result1[i][j] == expected...
O3
c
func0: endbr64 test %esi,%esi jle 160c <func0+0x15c> lea 0x2f(%rdi),%rax lea -0x1(%rsi),%r8d sub %rcx,%rax cmp $0x5e,%rax jbe 15d8 <func0+0x128> cmp $0x2,%r8d jbe 15d8 <func0+0x128> mov %esi,%r9d movd %edx,%xmm4 mov %rdi,%rax mov %rcx,%r8 shr $0x2,%r9d pshufd $0x0,%xmm4,%xmm3 lea...
func0: endbr64 movsxd r8, esi mov rax, rdi mov esi, edx mov rdx, rcx test r8d, r8d jle short locret_1194 cmp r8d, 1 jz short loc_1167 lea rcx, [rdi+2Fh] sub rcx, rdx cmp rcx, 5Eh ; '^' ja short loc_1198 loc_1167: lea rcx, [r8+r8*2] lea rdi, [rax+rcx*4] nop loc_1170:...
const __m128i * func0(const __m128i *a1, int a2, unsigned int a3, long long a4) { long long v4; // r8 const __m128i *result; // rax long long v7; // rdx __int32 *v8; // rdi __int32 v9; // ecx int v10; // r9d const __m128i *v11; // rcx long long v12; // rdi __m128i v13; // xmm3 __m128i v14; // xmm1 ...
func0: ENDBR64 MOVSXD R8,ESI MOV RAX,RDI MOV ESI,EDX MOV RDX,RCX TEST R8D,R8D JLE 0x00101194 CMP R8D,0x1 JZ 0x00101167 LEA RCX,[RDI + 0x2f] SUB RCX,RDX CMP RCX,0x5e JA 0x00101198 LAB_00101167: LEA RCX,[R8 + R8*0x2] LEA RDI,[RAX + RCX*0x4] NOP LAB_00101170: MOV ECX,dword ptr [RAX] ADD RAX,0xc ADD RDX,0xc ADD ECX,ESI MOV...
void func0(int *param_1,uint param_2,int param_3,int *param_4) { int8 uVar1; int8 uVar2; int iVar3; int iVar4; int iVar5; int iVar6; int iVar7; int iVar8; int iVar9; int iVar10; int iVar11; int iVar12; int iVar13; int *piVar14; uint uVar15; int *piVar16; int *piVar17; ulong uVar18; ...
5,348
func0
#include <assert.h> #include <string.h> char make_flip(char ch) { return (ch == '0') ? '1' : '0'; } int get_flip_with_starting_character(const char *str, char expected) { int flip_count = 0; int length = strlen(str); for (int i = 0; i < length; i++) { if (str[i] != expected) { ...
int func0(const char *str) { return (get_flip_with_starting_character(str, '0') < get_flip_with_starting_character(str, '1')) ? get_flip_with_starting_character(str, '0') : get_flip_with_starting_character(str, '1'); }
int main() { assert(func0("0001010111") == 2); assert(func0("001") == 1); assert(func0("010111011") == 2); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x18,%rsp mov %rdi,-0x18(%rbp) mov -0x18(%rbp),%rax mov $0x30,%esi mov %rax,%rdi callq 118a <get_flip_with_starting_character> mov %eax,%ebx mov -0x18(%rbp),%rax mov $0x31,%esi mov %rax,%rdi callq 118a <get_flip_with_starting_char...
func0: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 18h mov [rbp+var_18], rdi mov rax, [rbp+var_18] mov esi, 30h ; '0' mov rdi, rax call get_flip_with_starting_character mov ebx, eax mov rax, [rbp+var_18] mov esi, 31h ; '1' mov rdi, rax call get_flip_with_starting_...
long long func0(long long a1) { int flip_with_starting_character; // ebx flip_with_starting_character = get_flip_with_starting_character(a1, 48LL); if ( flip_with_starting_character >= (int)get_flip_with_starting_character(a1, 49LL) ) return get_flip_with_starting_character(a1, 49LL); else return get_...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x18 MOV qword ptr [RBP + -0x18],RDI MOV RAX,qword ptr [RBP + -0x18] MOV ESI,0x30 MOV RDI,RAX CALL 0x0010118a MOV EBX,EAX MOV RAX,qword ptr [RBP + -0x18] MOV ESI,0x31 MOV RDI,RAX CALL 0x0010118a CMP EBX,EAX JGE 0x00101242 MOV RAX,qword ptr [RBP + -0x18] MOV ESI,0x30 ...
void func0(int8 param_1) { int iVar1; int iVar2; iVar1 = get_flip_with_starting_character(param_1,0x30); iVar2 = get_flip_with_starting_character(param_1,0x31); if (iVar1 < iVar2) { get_flip_with_starting_character(param_1,0x30); } else { get_flip_with_starting_character(param_1,0x31); } r...
5,349
func0
#include <assert.h> #include <string.h> char make_flip(char ch) { return (ch == '0') ? '1' : '0'; } int get_flip_with_starting_character(const char *str, char expected) { int flip_count = 0; int length = strlen(str); for (int i = 0; i < length; i++) { if (str[i] != expected) { ...
int func0(const char *str) { return (get_flip_with_starting_character(str, '0') < get_flip_with_starting_character(str, '1')) ? get_flip_with_starting_character(str, '0') : get_flip_with_starting_character(str, '1'); }
int main() { assert(func0("0001010111") == 2); assert(func0("001") == 1); assert(func0("010111011") == 2); return 0; }
O1
c
func0: endbr64 push %rbp push %rbx mov %rdi,%rbp mov $0x30,%esi callq 1158 <get_flip_with_starting_character> mov %eax,%ebx mov $0x31,%esi mov %rbp,%rdi callq 1158 <get_flip_with_starting_character> cmp %eax,%ebx cmovle %ebx,%eax pop %rbx pop %rbp retq
func0: endbr64 push rbp push rbx sub rsp, 8 mov rbp, rdi mov esi, 30h ; '0' call get_flip_with_starting_character mov ebx, eax mov esi, 31h ; '1' mov rdi, rbp call get_flip_with_starting_character cmp ebx, eax cmovle eax, ebx add rsp, 8 pop rbx pop rbp retn
long long func0(long long a1) { int flip_with_starting_character; // ebx long long result; // rax flip_with_starting_character = get_flip_with_starting_character(a1, 48LL); result = get_flip_with_starting_character(a1, 49LL); if ( flip_with_starting_character <= (int)result ) return (unsigned int)flip_w...
func0: ENDBR64 PUSH RBP PUSH RBX SUB RSP,0x8 MOV RBP,RDI MOV ESI,0x30 CALL 0x00101178 MOV EBX,EAX MOV ESI,0x31 MOV RDI,RBP CALL 0x00101178 CMP EBX,EAX CMOVLE EAX,EBX ADD RSP,0x8 POP RBX POP RBP RET
int func0(int8 param_1) { int iVar1; int iVar2; iVar1 = get_flip_with_starting_character(param_1,0x30); iVar2 = get_flip_with_starting_character(param_1,0x31); if (iVar1 <= iVar2) { iVar2 = iVar1; } return iVar2; }
5,350
func0
#include <assert.h> #include <string.h> char make_flip(char ch) { return (ch == '0') ? '1' : '0'; } int get_flip_with_starting_character(const char *str, char expected) { int flip_count = 0; int length = strlen(str); for (int i = 0; i < length; i++) { if (str[i] != expected) { ...
int func0(const char *str) { return (get_flip_with_starting_character(str, '0') < get_flip_with_starting_character(str, '1')) ? get_flip_with_starting_character(str, '0') : get_flip_with_starting_character(str, '1'); }
int main() { assert(func0("0001010111") == 2); assert(func0("001") == 1); assert(func0("010111011") == 2); return 0; }
O2
c
func0: endbr64 push %rbp mov $0x30,%esi mov %rdi,%rbp push %rbx sub $0x8,%rsp callq 1220 <get_flip_with_starting_character> mov %rbp,%rdi mov $0x31,%esi mov %eax,%ebx callq 1220 <get_flip_with_starting_character> cmp %eax,%ebx cmovle %ebx,%eax add $0x8,%rsp pop %rbx pop %rbp retq nop...
func0: endbr64 push rbx mov rbx, rdi call _strlen test eax, eax jle short loc_1308 sub eax, 1 mov rdi, rbx xor ecx, ecx mov edx, 30h ; '0' lea rsi, [rbx+rax+1] mov r9d, 61h ; 'a' mov rax, rbx nop dword ptr [rax+00h] loc_12B0: xor r8d, r8d mov ebx, r9d cmp [ra...
long long func0(_BYTE *a1) { int v1; // eax int v2; // ecx int v3; // edx long long v4; // rsi _BYTE *v5; // rax int v6; // r8d long long result; // rax int v8; // edx BOOL v9; // r8d v1 = strlen(); if ( v1 <= 0 ) return 0LL; v2 = 0; v3 = 48; v4 = (long long)&a1[v1 - 1 + 1]; v5 = a1;...
func0: ENDBR64 PUSH RBX MOV RBX,RDI CALL 0x00101060 TEST EAX,EAX JLE 0x00101308 SUB EAX,0x1 MOV RDI,RBX XOR ECX,ECX MOV EDX,0x30 LEA RSI,[RBX + RAX*0x1 + 0x1] MOV R9D,0x61 MOV RAX,RBX NOP dword ptr [RAX] LAB_001012b0: XOR R8D,R8D MOV EBX,R9D CMP byte ptr [RAX],DL SETNZ R8B SUB EBX,EDX ADD RAX,0x1 ADD ECX,R8D MOV EDX,EB...
int func0(char *param_1) { char *pcVar1; int iVar2; size_t sVar3; char *pcVar4; int iVar5; char cVar6; bool bVar7; sVar3 = strlen(param_1); if (0 < (int)sVar3) { iVar5 = 0; cVar6 = '0'; pcVar1 = param_1 + (ulong)((int)sVar3 - 1) + 1; pcVar4 = param_1; do { bVar7 = *pcVar4...
5,351
func0
#include <assert.h> #include <string.h> char make_flip(char ch) { return (ch == '0') ? '1' : '0'; } int get_flip_with_starting_character(const char *str, char expected) { int flip_count = 0; int length = strlen(str); for (int i = 0; i < length; i++) { if (str[i] != expected) { ...
int func0(const char *str) { return (get_flip_with_starting_character(str, '0') < get_flip_with_starting_character(str, '1')) ? get_flip_with_starting_character(str, '0') : get_flip_with_starting_character(str, '1'); }
int main() { assert(func0("0001010111") == 2); assert(func0("001") == 1); assert(func0("010111011") == 2); return 0; }
O3
c
func0: endbr64 push %rbx mov %rdi,%rbx callq 1060 <strlen@plt> test %eax,%eax jle 1308 <func0+0x88> sub $0x1,%eax mov %rbx,%rdi mov %rbx,%rdx xor %ecx,%ecx lea 0x1(%rbx,%rax,1),%rsi mov $0x61,%r9d mov $0x30,%eax nopl 0x0(%rax) xor %r8d,%r8d mov %r9d,%ebx cmp (%rdx),%al setne ...
func0: endbr64 push rbx mov rbx, rdi call _strlen test eax, eax jle short loc_1308 sub eax, 1 mov rdi, rbx xor ecx, ecx mov edx, 30h ; '0' lea rsi, [rbx+rax+1] mov r9d, 61h ; 'a' mov rax, rbx nop dword ptr [rax+00h] loc_12B0: xor r8d, r8d mov ebx, r9d cmp dl,...
long long func0(const char *a1) { int v1; // eax int v2; // ecx int v3; // edx long long v4; // rsi const char *v5; // rax int v6; // r8d long long result; // rax int v8; // edx _BOOL4 v9; // r8d v1 = strlen(a1); if ( v1 <= 0 ) return 0LL; v2 = 0; v3 = 48; v4 = (long long)&a1[v1 - 1 + ...
func0: ENDBR64 PUSH RBX MOV RBX,RDI CALL 0x00101060 TEST EAX,EAX JLE 0x00101308 SUB EAX,0x1 MOV RDI,RBX XOR ECX,ECX MOV EDX,0x30 LEA RSI,[RBX + RAX*0x1 + 0x1] MOV R9D,0x61 MOV RAX,RBX NOP dword ptr [RAX] LAB_001012b0: XOR R8D,R8D MOV EBX,R9D CMP DL,byte ptr [RAX] SETNZ R8B SUB EBX,EDX ADD RAX,0x1 ADD ECX,R8D MOV EDX,EB...
int func0(char *param_1) { char *pcVar1; int iVar2; size_t sVar3; char *pcVar4; int iVar5; char cVar6; bool bVar7; sVar3 = strlen(param_1); if (0 < (int)sVar3) { iVar5 = 0; cVar6 = '0'; pcVar1 = param_1 + (ulong)((int)sVar3 - 1) + 1; pcVar4 = param_1; do { bVar7 = cVar6 !...
5,352
func0
#include <assert.h>
int func0(int n) { int count = 0; while (n != 0) { n /= 10; count += 1; } return count; }
int main() { assert(func0(12345) == 5); assert(func0(11223305) == 8); assert(func0(4123459) == 7); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x14(%rbp) movl $0x0,-0x4(%rbp) jmp 117f <func0+0x36> mov -0x14(%rbp),%eax movslq %eax,%rdx imul $0x66666667,%rdx,%rdx shr $0x20,%rdx sar $0x2,%edx sar $0x1f,%eax sub %eax,%edx mov %edx,%eax mov %eax,-0x14(%rbp) addl $0x1,-0x4(%rbp) ...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_14], edi mov [rbp+var_4], 0 jmp short loc_117F loc_115D: mov eax, [rbp+var_14] movsxd rdx, eax imul rdx, 66666667h shr rdx, 20h mov ecx, edx sar ecx, 2 cdq mov eax, ecx sub eax, edx mov [rbp+var_14], eax add [rbp+va...
long long func0(int a1) { unsigned int v3; // [rsp+10h] [rbp-4h] v3 = 0; while ( a1 ) { a1 /= 10; ++v3; } return v3; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x14],EDI MOV dword ptr [RBP + -0x4],0x0 JMP 0x0010117f LAB_0010115d: MOV EAX,dword ptr [RBP + -0x14] MOVSXD RDX,EAX IMUL RDX,RDX,0x66666667 SHR RDX,0x20 MOV ECX,EDX SAR ECX,0x2 CDQ MOV EAX,ECX SUB EAX,EDX MOV dword ptr [RBP + -0x14],EAX ADD dword ptr [RBP + -0x...
int func0(int param_1) { int4 local_1c; int4 local_c; local_c = 0; for (local_1c = param_1; local_1c != 0; local_1c = local_1c / 10) { local_c = local_c + 1; } return local_c; }
5,353
func0
#include <assert.h>
int func0(int n) { int count = 0; while (n != 0) { n /= 10; count += 1; } return count; }
int main() { assert(func0(12345) == 5); assert(func0(11223305) == 8); assert(func0(4123459) == 7); return 0; }
O1
c
func0: endbr64 test %edi,%edi je 1175 <func0+0x2c> mov $0x0,%edx movslq %edi,%rax imul $0x66666667,%rax,%rax sar $0x22,%rax sar $0x1f,%edi sub %edi,%eax mov %eax,%edi add $0x1,%edx test %eax,%eax jne 1156 <func0+0xd> mov %edx,%eax retq mov %edi,%edx jmp 1172 <func0+0x29>
func0: endbr64 test edi, edi jz short loc_1175 mov edx, 0 loc_1156: movsxd rax, edi imul rax, 66666667h sar rax, 22h sar edi, 1Fh sub eax, edi mov edi, eax add edx, 1 test eax, eax jnz short loc_1156 loc_1172: mov eax, edx retn loc_1175: mov edx, edi jmp short loc_...
long long func0(int a1) { unsigned int v1; // edx if ( a1 ) { v1 = 0; do { a1 /= 10; ++v1; } while ( a1 ); } else { return 0; } return v1; }
func0: ENDBR64 TEST EDI,EDI JZ 0x00101175 MOV EDX,0x0 LAB_00101156: MOVSXD RAX,EDI IMUL RAX,RAX,0x66666667 SAR RAX,0x22 SAR EDI,0x1f SUB EAX,EDI MOV EDI,EAX ADD EDX,0x1 TEST EAX,EAX JNZ 0x00101156 LAB_00101172: MOV EAX,EDX RET LAB_00101175: MOV EDX,EDI JMP 0x00101172
int func0(int param_1) { int iVar1; if (param_1 == 0) { iVar1 = 0; } else { iVar1 = 0; do { param_1 = param_1 / 10; iVar1 = iVar1 + 1; } while (param_1 != 0); } return iVar1; }
5,354
func0
#include <assert.h>
int func0(int n) { int count = 0; while (n != 0) { n /= 10; count += 1; } return count; }
int main() { assert(func0(12345) == 5); assert(func0(11223305) == 8); assert(func0(4123459) == 7); return 0; }
O2
c
func0: endbr64 xor %r8d,%r8d test %edi,%edi je 116b <func0+0x2b> nopl 0x0(%rax,%rax,1) movslq %edi,%rax sar $0x1f,%edi add $0x1,%r8d imul $0x66666667,%rax,%rax sar $0x22,%rax sub %edi,%eax mov %eax,%edi jne 1150 <func0+0x10> mov %r8d,%eax retq
func0: endbr64 xor r8d, r8d test edi, edi jz short loc_116D nop dword ptr [rax+rax+00h] loc_1150: movsxd rax, edi mov edx, edi add r8d, 1 imul rax, 66666667h sar edx, 1Fh sar rax, 22h sub eax, edx mov edi, eax jnz short loc_1150 loc_116D: mov eax, r8d retn
long long func0(int a1) { unsigned int i; // r8d for ( i = 0; a1; a1 /= 10 ) ++i; return i; }
func0: ENDBR64 XOR R8D,R8D TEST EDI,EDI JZ 0x0010116d NOP dword ptr [RAX + RAX*0x1] LAB_00101150: MOVSXD RAX,EDI MOV EDX,EDI ADD R8D,0x1 IMUL RAX,RAX,0x66666667 SAR EDX,0x1f SAR RAX,0x22 SUB EAX,EDX MOV EDI,EAX JNZ 0x00101150 LAB_0010116d: MOV EAX,R8D RET
int func0(int param_1) { int iVar1; iVar1 = 0; if (param_1 != 0) { do { iVar1 = iVar1 + 1; param_1 = param_1 / 10; } while (param_1 != 0); } return iVar1; }
5,355
func0
#include <assert.h>
int func0(int n) { int count = 0; while (n != 0) { n /= 10; count += 1; } return count; }
int main() { assert(func0(12345) == 5); assert(func0(11223305) == 8); assert(func0(4123459) == 7); return 0; }
O3
c
func0: endbr64 xor %r8d,%r8d test %edi,%edi je 116b <func0+0x2b> nopl 0x0(%rax,%rax,1) movslq %edi,%rax sar $0x1f,%edi add $0x1,%r8d imul $0x66666667,%rax,%rax sar $0x22,%rax sub %edi,%eax mov %eax,%edi jne 1150 <func0+0x10> mov %r8d,%eax retq
func0: endbr64 xor ecx, ecx test edi, edi jz short loc_116C nop word ptr [rax+rax+00h] loc_1150: movsxd rax, edi mov edx, edi add ecx, 1 imul rax, 66666667h sar edx, 1Fh sar rax, 22h sub eax, edx mov edi, eax jnz short loc_1150 loc_116C: mov eax, ecx retn
long long func0(int a1) { unsigned int i; // ecx for ( i = 0; a1; a1 /= 10 ) ++i; return i; }
func0: ENDBR64 XOR ECX,ECX TEST EDI,EDI JZ 0x0010116c NOP word ptr [RAX + RAX*0x1] LAB_00101150: MOVSXD RAX,EDI MOV EDX,EDI ADD ECX,0x1 IMUL RAX,RAX,0x66666667 SAR EDX,0x1f SAR RAX,0x22 SUB EAX,EDX MOV EDI,EAX JNZ 0x00101150 LAB_0010116c: MOV EAX,ECX RET
int func0(int param_1) { int iVar1; iVar1 = 0; if (param_1 != 0) { do { iVar1 = iVar1 + 1; param_1 = param_1 / 10; } while (param_1 != 0); } return iVar1; }
5,356
func0
#include <assert.h> #include <stddef.h>
int func0(int list_nums[], size_t list_length) { int max_product = list_nums[0] * list_nums[1]; for (size_t i = 1; i < list_length - 1; i++) { int product = list_nums[i] * list_nums[i + 1]; if (product > max_product) { max_product = product; } } re...
int main() { int list1[] = {1, 2, 3, 4, 5, 6}; int list2[] = {1, 2, 3, 4, 5}; int list3[] = {2, 3}; assert(func0(list1, sizeof(list1)/sizeof(list1[0])) == 30); assert(func0(list2, sizeof(list2)/sizeof(list2[0])) == 20); assert(func0(list3, sizeof(list3)/sizeof(list3[0])) == 6); re...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x18(%rbp) mov %rsi,-0x20(%rbp) mov -0x18(%rbp),%rax mov (%rax),%edx mov -0x18(%rbp),%rax add $0x4,%rax mov (%rax),%eax imul %edx,%eax mov %eax,-0x10(%rbp) movq $0x1,-0x8(%rbp) jmp 11e0 <func0+0x77> mov -0x8(%rbp),%rax lea 0x0(,%...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_18], rdi mov [rbp+var_20], rsi mov rax, [rbp+var_18] mov edx, [rax] mov rax, [rbp+var_18] add rax, 4 mov eax, [rax] imul eax, edx mov [rbp+var_10], eax mov [rbp+var_8], 1 jmp short loc_11E0 loc_1199: mov rax, [rbp+va...
long long func0(_DWORD *a1, long long a2) { int v3; // [rsp+10h] [rbp-10h] unsigned long long i; // [rsp+18h] [rbp-8h] v3 = *a1 * a1[1]; for ( i = 1LL; i < a2 - 1; ++i ) { if ( a1[i] * a1[i + 1] > v3 ) v3 = a1[i] * a1[i + 1]; } return (unsigned int)v3; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI MOV RAX,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x4 MOV EAX,dword ptr [RAX] IMUL EAX,EDX MOV dword ptr [RBP + -0x10],EAX MOV qword ptr [RBP + -0x8],0x1 JMP 0x001011e0 LAB_0...
int func0(int *param_1,long param_2) { int local_18; ulong local_10; local_18 = param_1[1] * *param_1; for (local_10 = 1; local_10 < param_2 - 1U; local_10 = local_10 + 1) { if (local_18 < param_1[local_10 + 1] * param_1[local_10]) { local_18 = param_1[local_10 + 1] * param_1[local_10]; } } ...
5,357
func0
#include <assert.h> #include <stddef.h>
int func0(int list_nums[], size_t list_length) { int max_product = list_nums[0] * list_nums[1]; for (size_t i = 1; i < list_length - 1; i++) { int product = list_nums[i] * list_nums[i + 1]; if (product > max_product) { max_product = product; } } re...
int main() { int list1[] = {1, 2, 3, 4, 5, 6}; int list2[] = {1, 2, 3, 4, 5}; int list3[] = {2, 3}; assert(func0(list1, sizeof(list1)/sizeof(list1[0])) == 30); assert(func0(list2, sizeof(list2)/sizeof(list2[0])) == 20); assert(func0(list3, sizeof(list3)/sizeof(list3[0])) == 6); re...
O1
c
func0: endbr64 mov (%rdi),%eax imul 0x4(%rdi),%eax lea -0x1(%rsi),%rdx cmp $0x1,%rdx jbe 119a <func0+0x31> lea 0x4(%rdi),%rdx lea -0x4(%rdi,%rsi,4),%rsi mov (%rdx),%ecx imul 0x4(%rdx),%ecx cmp %ecx,%eax cmovl %ecx,%eax add $0x4,%rdx cmp %rsi,%rdx jne 1186 <func0+0x1d> retq
func0: endbr64 mov eax, [rdi] imul eax, [rdi+4] lea rdx, [rsi-1] cmp rdx, 1 jbe short locret_119A lea rdx, [rdi+4] lea rsi, [rdi+rsi*4-4] loc_1186: mov ecx, [rdx] imul ecx, [rdx+4] cmp eax, ecx cmovl eax, ecx add rdx, 4 cmp rdx, rsi jnz short loc_1186 locret_119A: ret...
long long func0(_DWORD *a1, long long a2) { long long result; // rax _DWORD *v3; // rdx long long v4; // rsi int v5; // ecx result = (unsigned int)(a1[1] * *a1); if ( (unsigned long long)(a2 - 1) > 1 ) { v3 = a1 + 1; v4 = (long long)&a1[a2 - 1]; do { v5 = v3[1] * *v3; if ( (i...
func0: ENDBR64 MOV EAX,dword ptr [RDI] IMUL EAX,dword ptr [RDI + 0x4] LEA RDX,[RSI + -0x1] CMP RDX,0x1 JBE 0x0010119a LEA RDX,[RDI + 0x4] LEA RSI,[RDI + RSI*0x4 + -0x4] LAB_00101186: MOV ECX,dword ptr [RDX] IMUL ECX,dword ptr [RDX + 0x4] CMP EAX,ECX CMOVL EAX,ECX ADD RDX,0x4 CMP RDX,RSI JNZ 0x00101186 LAB_0010119a: RET
void func0(int *param_1,long param_2) { int iVar1; int *piVar2; iVar1 = *param_1 * param_1[1]; if (1 < param_2 - 1U) { piVar2 = param_1 + 1; do { if (iVar1 < *piVar2 * piVar2[1]) { iVar1 = *piVar2 * piVar2[1]; } piVar2 = piVar2 + 1; } while (piVar2 != param_1 + param_2 ...
5,358
func0
#include <assert.h> #include <stddef.h>
int func0(int list_nums[], size_t list_length) { int max_product = list_nums[0] * list_nums[1]; for (size_t i = 1; i < list_length - 1; i++) { int product = list_nums[i] * list_nums[i + 1]; if (product > max_product) { max_product = product; } } re...
int main() { int list1[] = {1, 2, 3, 4, 5, 6}; int list2[] = {1, 2, 3, 4, 5}; int list3[] = {2, 3}; assert(func0(list1, sizeof(list1)/sizeof(list1[0])) == 30); assert(func0(list2, sizeof(list2)/sizeof(list2[0])) == 20); assert(func0(list3, sizeof(list3)/sizeof(list3[0])) == 6); re...
O2
c
func0: endbr64 lea -0x1(%rsi),%rdx mov (%rdi),%eax imul 0x4(%rdi),%eax cmp $0x1,%rdx jbe 1178 <func0+0x38> mov 0x4(%rdi),%r8d lea 0x8(%rdi),%rcx lea (%rdi,%rsi,4),%rsi mov %r8d,%edx mov (%rcx),%r8d imul %r8d,%edx cmp %edx,%eax cmovl %edx,%eax add $0x4,%rcx cmp %rcx,%rsi jne 1...
func0: endbr64 mov ecx, [rdi+4] mov r8d, [rdi] lea rax, [rsi-1] imul r8d, ecx cmp rax, 1 jbe short loc_12C7 lea rdx, [rdi+8] lea rsi, [rdi+rsi*4] loc_12B0: mov eax, ecx mov ecx, [rdx] imul eax, ecx cmp r8d, eax cmovl r8d, eax add rdx, 4 cmp rsi, rdx jnz short ...
long long func0(_DWORD *a1, long long a2) { int v2; // ecx int v3; // r8d int *v4; // rdx int *v5; // rsi int v6; // eax int v7; // eax v2 = a1[1]; v3 = v2 * *a1; if ( (unsigned long long)(a2 - 1) > 1 ) { v4 = a1 + 2; v5 = &a1[a2]; do { v6 = v2; v2 = *v4; v7 = *v4...
func0: ENDBR64 MOV ECX,dword ptr [RDI + 0x4] MOV R8D,dword ptr [RDI] LEA RAX,[RSI + -0x1] IMUL R8D,ECX CMP RAX,0x1 JBE 0x001012c7 LEA RDX,[RDI + 0x8] LEA RSI,[RDI + RSI*0x4] LAB_001012b0: MOV EAX,ECX MOV ECX,dword ptr [RDX] IMUL EAX,ECX CMP R8D,EAX CMOVL R8D,EAX ADD RDX,0x4 CMP RSI,RDX JNZ 0x001012b0 LAB_001012c7: MOV ...
int func0(int *param_1,long param_2) { int iVar1; int iVar2; int *piVar3; int iVar4; iVar4 = *param_1 * param_1[1]; if (1 < param_2 - 1U) { piVar3 = param_1 + 2; iVar2 = param_1[1]; do { iVar1 = *piVar3; iVar2 = iVar2 * iVar1; if (iVar4 < iVar2) { iVar4 = iVar2; ...
5,359
func0
#include <assert.h> #include <stddef.h>
int func0(int list_nums[], size_t list_length) { int max_product = list_nums[0] * list_nums[1]; for (size_t i = 1; i < list_length - 1; i++) { int product = list_nums[i] * list_nums[i + 1]; if (product > max_product) { max_product = product; } } re...
int main() { int list1[] = {1, 2, 3, 4, 5, 6}; int list2[] = {1, 2, 3, 4, 5}; int list3[] = {2, 3}; assert(func0(list1, sizeof(list1)/sizeof(list1[0])) == 30); assert(func0(list2, sizeof(list2)/sizeof(list2[0])) == 20); assert(func0(list3, sizeof(list3)/sizeof(list3[0])) == 6); re...
O3
c
func0: endbr64 lea -0x1(%rsi),%r8 mov (%rdi),%eax imul 0x4(%rdi),%eax cmp $0x1,%r8 jbe 1262 <func0+0x122> lea -0x2(%rsi),%rcx sub $0x3,%rsi cmp $0x2,%rsi jbe 1269 <func0+0x129> mov %rcx,%rdx movd %eax,%xmm5 mov %rdi,%rax shr $0x2,%rdx pshufd $0x0,%xmm5,%xmm2 shl $0x4,%rdx add ...
func0: endbr64 lea r8, [rsi-1] mov eax, [rdi] imul eax, [rdi+4] cmp r8, 1 jbe locret_126A lea rdx, [rsi-2] sub rsi, 3 cmp rsi, 2 jbe loc_126B mov rcx, rdx movd xmm5, eax mov rax, rdi shr rcx, 2 pshufd xmm3, xmm5, 0 shl rcx, 4 add rcx, rdi nop dword ptr [rax...
long long func0(_DWORD *a1, long long a2) { unsigned long long v2; // r8 long long result; // rax unsigned long long v4; // rdx __m128i v5; // xmm5 _DWORD *v6; // rax __m128i v7; // xmm3 __m128i v8; // xmm1 __m128i v9; // xmm2 __m128i v10; // xmm0 __m128i v11; // xmm1 __m128i v12; // xmm1 __m12...
func0: ENDBR64 LEA R8,[RSI + -0x1] MOV EAX,dword ptr [RDI] IMUL EAX,dword ptr [RDI + 0x4] CMP R8,0x1 JBE 0x0010126a LEA RDX,[RSI + -0x2] SUB RSI,0x3 CMP RSI,0x2 JBE 0x0010126b MOV RCX,RDX MOVD XMM5,EAX MOV RAX,RDI SHR RCX,0x2 PSHUFD XMM3,XMM5,0x0 SHL RCX,0x4 ADD RCX,RDI NOP dword ptr [RAX] LAB_00101188: MOVDQU XMM1,xmm...
uint func0(int *param_1,long param_2) { ulong uVar1; ulong uVar2; uint uVar3; int *piVar4; int *piVar5; long lVar6; uint uVar7; uint uVar8; uint uVar9; uint uVar10; uint uVar11; uint uVar12; uint uVar13; uint uVar14; uint uVar15; uint uVar16; uint uVar17; uVar1 = param_2 - 1; u...
5,360
func0
#include <stdbool.h> #include <stdlib.h> #include <assert.h> typedef struct Node { int data; struct Node *left; struct Node *right; } Node; Node* newNode(int data) { Node* node = (Node*)malloc(sizeof(Node)); node->data = data; node->left = NULL; node->right = NULL; ret...
bool func0(Node* root) { if (root == NULL) { return true; } int lh = get_height(root->left); int rh = get_height(root->right); if (abs(lh - rh) <= 1 && func0(root->left) && func0(root->right)) { return true; } return false; }
int main() { Node* root = newNode(1); root->left = newNode(2); root->right = newNode(3); root->left->left = newNode(4); root->left->right = newNode(5); root->left->left->left = newNode(8); Node* root1 = newNode(1); root1->left = newNode(2); root1->right = newNode(3); ...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x20,%rsp mov %rdi,-0x18(%rbp) cmpq $0x0,-0x18(%rbp) jne 121e <func0+0x1e> mov $0x1,%eax jmp 128e <func0+0x8e> mov -0x18(%rbp),%rax mov 0x8(%rax),%rax mov %rax,%rdi callq 11ad <get_height> mov %eax,-0x8(%rbp) mov -0x18(%rbp),%rax mov 0...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_18], rdi cmp [rbp+var_18], 0 jnz short loc_121F mov eax, 1 jmp short locret_128F loc_121F: mov rax, [rbp+var_18] mov rax, [rax+8] mov rdi, rax call get_height mov [rbp+var_8], eax mov rax, [rbp+var_18] m...
_BOOL8 func0(long long a1) { int height; // [rsp+18h] [rbp-8h] int v3; // [rsp+1Ch] [rbp-4h] if ( !a1 ) return 1LL; height = get_height(*(_QWORD *)(a1 + 8)); v3 = get_height(*(_QWORD *)(a1 + 16)); return height - v3 >= -1 && height - v3 <= 1 && (unsigned __int8)func0(*(_QWORD *)(a1 + 8)) ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x18],RDI CMP qword ptr [RBP + -0x18],0x0 JNZ 0x0010121f MOV EAX,0x1 JMP 0x0010128f LAB_0010121f: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOV RDI,RAX CALL 0x001011ad MOV dword ptr [RBP + -0x8],EAX MOV RAX,qword ptr [RBP + -0x18...
int8 func0(long param_1) { char cVar1; int iVar2; int iVar3; int8 uVar4; if (param_1 == 0) { uVar4 = 1; } else { iVar2 = get_height(*(int8 *)(param_1 + 8)); iVar3 = get_height(*(int8 *)(param_1 + 0x10)); if ((((-2 < iVar2 - iVar3) && (iVar2 - iVar3 < 2)) && (cVar1 = func0(*(int...
5,361
func0
#include <stdbool.h> #include <stdlib.h> #include <assert.h> typedef struct Node { int data; struct Node *left; struct Node *right; } Node; Node* newNode(int data) { Node* node = (Node*)malloc(sizeof(Node)); node->data = data; node->left = NULL; node->right = NULL; ret...
bool func0(Node* root) { if (root == NULL) { return true; } int lh = get_height(root->left); int rh = get_height(root->right); if (abs(lh - rh) <= 1 && func0(root->left) && func0(root->right)) { return true; } return false; }
int main() { Node* root = newNode(1); root->left = newNode(2); root->right = newNode(3); root->left->left = newNode(4); root->left->right = newNode(5); root->left->left->left = newNode(8); Node* root1 = newNode(1); root1->left = newNode(2); root1->right = newNode(3); ...
O1
c
func0: endbr64 mov $0x1,%eax test %rdi,%rdi je 1222 <func0+0x59> push %r12 push %rbp push %rbx mov %rdi,%rbp mov 0x8(%rdi),%r12 mov %r12,%rdi callq 118e <get_height> mov %eax,%ebx mov 0x10(%rbp),%rbp mov %rbp,%rdi callq 118e <get_height> sub %eax,%ebx add $0x1,%ebx mov $0x0,%...
func0: endbr64 mov eax, 1 test rdi, rdi jz short locret_1222 push r12 push rbp push rbx mov rbp, rdi mov r12, [rdi+8] mov rdi, r12 call get_height mov ebx, eax mov rbp, [rbp+10h] mov rdi, rbp call get_height sub ebx, eax add ebx, 1 mov eax, 0 cmp ebx, 2...
long long func0(long long a1) { long long result; // rax long long v2; // r12 int height; // ebx long long v4; // rbp unsigned int v5; // ebx result = 1LL; if ( a1 ) { v2 = *(_QWORD *)(a1 + 8); height = get_height(v2); v4 = *(_QWORD *)(a1 + 16); v5 = height - get_height(v4) + 1; re...
func0: ENDBR64 MOV EAX,0x1 TEST RDI,RDI JZ 0x00101222 PUSH R12 PUSH RBP PUSH RBX MOV RBP,RDI MOV R12,qword ptr [RDI + 0x8] MOV RDI,R12 CALL 0x0010118e MOV EBX,EAX MOV RBP,qword ptr [RBP + 0x10] MOV RDI,RBP CALL 0x0010118e SUB EBX,EAX ADD EBX,0x1 MOV EAX,0x0 CMP EBX,0x2 JBE 0x0010120c LAB_00101207: POP RBX POP RBP POP R...
int8 func0(long param_1) { int8 uVar1; int8 uVar2; int iVar3; int iVar4; int8 uVar5; if (param_1 != 0) { uVar1 = *(int8 *)(param_1 + 8); iVar3 = get_height(uVar1); uVar2 = *(int8 *)(param_1 + 0x10); iVar4 = get_height(uVar2); uVar5 = 0; if ((iVar3 - iVar4) + 1U < 3) { uVar5...
5,362
func0
#include <stdbool.h> #include <stdlib.h> #include <assert.h> typedef struct Node { int data; struct Node *left; struct Node *right; } Node; Node* newNode(int data) { Node* node = (Node*)malloc(sizeof(Node)); node->data = data; node->left = NULL; node->right = NULL; ret...
bool func0(Node* root) { if (root == NULL) { return true; } int lh = get_height(root->left); int rh = get_height(root->right); if (abs(lh - rh) <= 1 && func0(root->left) && func0(root->right)) { return true; } return false; }
int main() { Node* root = newNode(1); root->left = newNode(2); root->right = newNode(3); root->left->left = newNode(4); root->left->right = newNode(5); root->left->left->left = newNode(8); Node* root1 = newNode(1); root1->left = newNode(2); root1->right = newNode(3); ...
O2
c
func0: endbr64 push %r12 push %rbp push %rbx mov %rdi,%rbx test %rbx,%rbx je 1540 <func0+0x70> mov 0x8(%rbx),%r12 test %r12,%r12 je 1518 <func0+0x48> mov %r12,%rdi callq 14a0 <get_height.part.0> mov 0x10(%rbx),%rbx mov %eax,%ebp test %rbx,%rbx je 1506 <func0+0x36> mov %rbx,%rd...
func0: endbr64 push rbx mov rbx, rdi loc_1A48: test rbx, rbx jz loc_1C98 mov r8, [rbx+8] test r8, r8 jz loc_1C60 mov r9, [r8+8] xor esi, esi test r9, r9 jz short loc_1AD7 mov rsi, [r9+8] xor ecx, ecx test rsi, rsi jz short loc_1A9C mov rdi, [rsi+8] test ...
long long func0(long long a1, long long a2, long long a3) { long long v4; // r8 long long v5; // r9 long long v6; // rsi long long v7; // rsi long long v8; // rcx long long v9; // rdi long long v10; // rdi int v11; // eax long long v12; // r9 long long v13; // rsi long long v14; // rdi long lon...
func0: ENDBR64 PUSH RBX MOV RBX,RDI LAB_00101a48: TEST RBX,RBX JZ 0x00101c98 MOV R8,qword ptr [RBX + 0x8] TEST R8,R8 JZ 0x00101c60 MOV R9,qword ptr [R8 + 0x8] XOR ESI,ESI TEST R9,R9 JZ 0x00101ad7 MOV RSI,qword ptr [R9 + 0x8] XOR ECX,ECX TEST RSI,RSI JZ 0x00101a9c MOV RDI,qword ptr [RSI + 0x8] TEST RDI,RDI JZ 0x00101a84...
int8 func0(long param_1) { int iVar1; int iVar2; int iVar3; int iVar4; int iVar5; int8 uVar6; long lVar7; long lVar8; long lVar9; do { if (param_1 == 0) { return 1; } lVar8 = *(long *)(param_1 + 8); if (lVar8 == 0) { param_1 = *(long *)(param_1 + 0x10); if (para...
5,363
func0
#include <stdbool.h> #include <stdlib.h> #include <assert.h> typedef struct Node { int data; struct Node *left; struct Node *right; } Node; Node* newNode(int data) { Node* node = (Node*)malloc(sizeof(Node)); node->data = data; node->left = NULL; node->right = NULL; ret...
bool func0(Node* root) { if (root == NULL) { return true; } int lh = get_height(root->left); int rh = get_height(root->right); if (abs(lh - rh) <= 1 && func0(root->left) && func0(root->right)) { return true; } return false; }
int main() { Node* root = newNode(1); root->left = newNode(2); root->right = newNode(3); root->left->left = newNode(4); root->left->right = newNode(5); root->left->left->left = newNode(8); Node* root1 = newNode(1); root1->left = newNode(2); root1->right = newNode(3); ...
O3
c
func0: endbr64 push %rbp push %rbx mov %rdi,%rbx sub $0x8,%rsp test %rbx,%rbx je 22b0 <func0+0x980> mov 0x8(%rbx),%r8 mov 0x10(%rbx),%rbx test %r8,%r8 je 2288 <func0+0x958> mov 0x8(%r8),%rsi xor %ecx,%ecx test %rsi,%rsi je 1b84 <func0+0x254> mov 0x8(%rsi),%r10 test %r10,%r10...
func0: endbr64 push rbx mov rbx, rdi loc_19F8: test rbx, rbx jz loc_1C48 mov r8, [rbx+8] test r8, r8 jz loc_1C10 mov r9, [r8+8] xor esi, esi test r9, r9 jz short loc_1A87 mov rsi, [r9+8] xor ecx, ecx test rsi, rsi jz short loc_1A4C mov rdi, [rsi+8] test ...
long long func0(long long a1, long long a2, long long a3) { long long v4; // r8 long long v5; // r9 long long v6; // rsi long long v7; // rsi long long v8; // rcx long long v9; // rdi long long v10; // rdi int v11; // eax long long v12; // r9 long long v13; // rsi long long v14; // rdi long lon...
func0: ENDBR64 PUSH RBX MOV RBX,RDI LAB_001019f8: TEST RBX,RBX JZ 0x00101c48 MOV R8,qword ptr [RBX + 0x8] TEST R8,R8 JZ 0x00101c10 MOV R9,qword ptr [R8 + 0x8] XOR ESI,ESI TEST R9,R9 JZ 0x00101a87 MOV RSI,qword ptr [R9 + 0x8] XOR ECX,ECX TEST RSI,RSI JZ 0x00101a4c MOV RDI,qword ptr [RSI + 0x8] TEST RDI,RDI JZ 0x00101a34...
int8 func0(long param_1) { int iVar1; int iVar2; int iVar3; int iVar4; int iVar5; int8 uVar6; long lVar7; long lVar8; long lVar9; do { if (param_1 == 0) { return 1; } lVar8 = *(long *)(param_1 + 8); if (lVar8 == 0) { param_1 = *(long *)(param_1 + 0x10); if (para...
5,364
func0
#include <assert.h> #include <stdlib.h> typedef struct { int a; int b; } repeat_tuples_result;
repeat_tuples_result* func0(repeat_tuples_result test_tup, int N) { repeat_tuples_result* res = malloc(N * sizeof(repeat_tuples_result)); for(int i = 0; i < N; i++) { res[i] = test_tup; } return res; }
int main() { // First test repeat_tuples_result t1 = {1, 3}; int N1 = 4; repeat_tuples_result* res1 = func0(t1, N1); repeat_tuples_result expected1[4] = { {1,3}, {1,3}, {1,3}, {1,3} }; for(int i = 0; i < N1; i++) { assert(res1[i].a == expected1[i].a && res1[i].b == expected1[i].b)...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x20,%rsp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) mov -0x1c(%rbp),%eax cltq shl $0x3,%rax mov %rax,%rdi callq 10b0 <malloc@plt> mov %rax,-0x8(%rbp) movl $0x0,-0xc(%rbp) jmp 11f9 <func0+0x50> mov -0xc(%rbp),%eax cltq lea 0x0(,%rax,8),%rd...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov eax, [rbp+var_1C] cdqe shl rax, 3 mov rdi, rax; size call _malloc mov [rbp+var_8], rax mov [rbp+var_C], 0 jmp short loc_11F9 loc_11DA: mov eax, [rbp+var_C] cdqe lea rdx...
_QWORD * func0(long long a1, int a2) { int i; // [rsp+14h] [rbp-Ch] _QWORD *v4; // [rsp+18h] [rbp-8h] v4 = malloc(8LL * a2); for ( i = 0; i < a2; ++i ) v4[i] = a1; return v4; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV EAX,dword ptr [RBP + -0x1c] CDQE SHL RAX,0x3 MOV RDI,RAX CALL 0x001010b0 MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0xc],0x0 JMP 0x001011f9 LAB_001011da: MOV EAX,dword ptr [RBP + -0xc] CDQE LEA...
void * func0(int8 param_1,int param_2) { void *pvVar1; int4 local_14; pvVar1 = malloc((long)param_2 << 3); for (local_14 = 0; local_14 < param_2; local_14 = local_14 + 1) { *(int8 *)((long)local_14 * 8 + (long)pvVar1) = param_1; } return pvVar1; }
5,365
func0
#include <assert.h> #include <stdlib.h> typedef struct { int a; int b; } repeat_tuples_result;
repeat_tuples_result* func0(repeat_tuples_result test_tup, int N) { repeat_tuples_result* res = malloc(N * sizeof(repeat_tuples_result)); for(int i = 0; i < N; i++) { res[i] = test_tup; } return res; }
int main() { // First test repeat_tuples_result t1 = {1, 3}; int N1 = 4; repeat_tuples_result* res1 = func0(t1, N1); repeat_tuples_result expected1[4] = { {1,3}, {1,3}, {1,3}, {1,3} }; for(int i = 0; i < N1; i++) { assert(res1[i].a == expected1[i].a && res1[i].b == expected1[i].b)...
O1
c
func0: endbr64 push %rbp push %rbx sub $0x8,%rsp mov %rdi,%rbx mov %esi,%ebp movslq %esi,%rdi shl $0x3,%rdi callq 10b0 <malloc@plt> test %ebp,%ebp jle 11df <func0+0x36> mov %rax,%rdx lea -0x1(%rbp),%ecx lea 0x8(%rax,%rcx,8),%rcx mov %rbx,(%rdx) add $0x8,%rdx cmp %rcx,%rdx jne ...
func0: endbr64 push rbp push rbx sub rsp, 8 mov rbx, rdi mov ebp, esi movsxd rdi, esi shl rdi, 3 call _malloc test ebp, ebp jle short loc_11DD mov rdx, rax mov ebp, ebp lea rcx, [rax+rbp*8] loc_11D1: mov [rdx], rbx add rdx, 8 cmp rdx, rcx jnz short loc_11D1 l...
long long func0(long long a1, int a2) { long long result; // rax _QWORD *v3; // rdx result = malloc(8LL * a2); if ( a2 > 0 ) { v3 = (_QWORD *)result; do *v3++ = a1; while ( v3 != (_QWORD *)(result + 8LL * (unsigned int)a2) ); } return result; }
func0: ENDBR64 PUSH RBP PUSH RBX SUB RSP,0x8 MOV RBX,RDI MOV EBP,ESI MOVSXD RDI,ESI SHL RDI,0x3 CALL 0x001010b0 TEST EBP,EBP JLE 0x001011dd MOV RDX,RAX MOV EBP,EBP LEA RCX,[RAX + RBP*0x8] LAB_001011d1: MOV qword ptr [RDX],RBX ADD RDX,0x8 CMP RDX,RCX JNZ 0x001011d1 LAB_001011dd: ADD RSP,0x8 POP RBX POP RBP RET
void func0(int8 param_1,uint param_2) { int8 *puVar1; int8 *puVar2; puVar2 = (int8 *)malloc((long)(int)param_2 << 3); if (0 < (int)param_2) { puVar1 = puVar2 + param_2; do { *puVar2 = param_1; puVar2 = puVar2 + 1; } while (puVar2 != puVar1); } return; }
5,366
func0
#include <assert.h> #include <stdlib.h> typedef struct { int a; int b; } repeat_tuples_result;
repeat_tuples_result* func0(repeat_tuples_result test_tup, int N) { repeat_tuples_result* res = malloc(N * sizeof(repeat_tuples_result)); for(int i = 0; i < N; i++) { res[i] = test_tup; } return res; }
int main() { // First test repeat_tuples_result t1 = {1, 3}; int N1 = 4; repeat_tuples_result* res1 = func0(t1, N1); repeat_tuples_result expected1[4] = { {1,3}, {1,3}, {1,3}, {1,3} }; for(int i = 0; i < N1; i++) { assert(res1[i].a == expected1[i].a && res1[i].b == expected1[i].b)...
O2
c
func0: endbr64 push %rbp push %rbx mov %rdi,%rbx movslq %esi,%rdi mov %rdi,%rbp shl $0x3,%rdi sub $0x8,%rsp callq 10b0 <malloc@plt> test %ebp,%ebp jle 13dc <func0+0x3c> lea -0x1(%rbp),%ecx mov %rax,%rdx lea 0x8(%rax,%rcx,8),%rcx nopl 0x0(%rax,%rax,1) mov %rbx,(%rdx) add $0x8,%rdx ...
func0: endbr64 push rbp push rbx mov rbx, rdi movsxd rdi, esi mov rbp, rdi shl rdi, 3 sub rsp, 8 call _malloc test ebp, ebp jle short loc_13AC mov ebp, ebp mov rdx, rax lea rcx, [rax+rbp*8] nop dword ptr [rax+00000000h] loc_13A0: mov [rdx], rbx add rdx, 8 cmp ...
long long func0(long long a1, int a2) { long long result; // rax _QWORD *v3; // rdx result = malloc(8LL * a2); if ( a2 > 0 ) { v3 = (_QWORD *)result; do *v3++ = a1; while ( v3 != (_QWORD *)(result + 8LL * (unsigned int)a2) ); } return result; }
func0: ENDBR64 PUSH RBP PUSH RBX MOV RBX,RDI MOVSXD RDI,ESI MOV RBP,RDI SHL RDI,0x3 SUB RSP,0x8 CALL 0x001010b0 TEST EBP,EBP JLE 0x001013ac MOV EBP,EBP MOV RDX,RAX LEA RCX,[RAX + RBP*0x8] NOP dword ptr [RAX] LAB_001013a0: MOV qword ptr [RDX],RBX ADD RDX,0x8 CMP RDX,RCX JNZ 0x001013a0 LAB_001013ac: ADD RSP,0x8 POP RBX P...
void func0(int8 param_1,uint param_2) { int8 *puVar1; int8 *puVar2; puVar2 = (int8 *)malloc((long)(int)param_2 << 3); if (0 < (int)param_2) { puVar1 = puVar2 + param_2; do { *puVar2 = param_1; puVar2 = puVar2 + 1; } while (puVar2 != puVar1); } return; }
5,367
func0
#include <assert.h> #include <stdlib.h> typedef struct { int a; int b; } repeat_tuples_result;
repeat_tuples_result* func0(repeat_tuples_result test_tup, int N) { repeat_tuples_result* res = malloc(N * sizeof(repeat_tuples_result)); for(int i = 0; i < N; i++) { res[i] = test_tup; } return res; }
int main() { // First test repeat_tuples_result t1 = {1, 3}; int N1 = 4; repeat_tuples_result* res1 = func0(t1, N1); repeat_tuples_result expected1[4] = { {1,3}, {1,3}, {1,3}, {1,3} }; for(int i = 0; i < N1; i++) { assert(res1[i].a == expected1[i].a && res1[i].b == expected1[i].b)...
O3
c
func0: endbr64 push %rbp push %rbx mov %rdi,%rbx movslq %esi,%rdi mov %rdi,%rbp shl $0x3,%rdi sub $0x8,%rsp callq 10b0 <malloc@plt> test %ebp,%ebp jle 13fc <func0+0x3c> lea -0x1(%rbp),%ecx mov %rax,%rdx lea 0x8(%rax,%rcx,8),%rcx nopl 0x0(%rax,%rax,1) mov %rbx,(%rdx) add $0x8,%rdx ...
func0: endbr64 push r12 push rbp movsxd rbp, esi push rbx mov r12, rbp shl rbp, 3 mov rbx, rdi mov rdi, rbp; size call _malloc test r12d, r12d jle short loc_11B0 lea rcx, [rbp+rax+0] and ebp, 8 mov rdx, rax jz short loc_11A0 lea rdx, [rax+8] mov [rax], rbx cm...
_QWORD * func0(long long a1, int a2) { size_t v2; // rbp _QWORD *result; // rax _QWORD *v4; // rcx _QWORD *v5; // rdx v2 = 8LL * a2; result = malloc(v2); if ( a2 > 0 ) { v4 = &result[v2 / 8]; v5 = result; if ( (v2 & 8) == 0 || (v5 = result + 1, *result = a1, result + 1 != v4) ) { ...
func0: ENDBR64 PUSH R12 PUSH RBP MOVSXD RBP,ESI PUSH RBX MOV R12,RBP SHL RBP,0x3 MOV RBX,RDI MOV RDI,RBP CALL 0x00101050 TEST R12D,R12D JLE 0x001011b0 LEA RCX,[RBP + RAX*0x1] AND EBP,0x8 MOV RDX,RAX JZ 0x001011a0 LEA RDX,[RAX + 0x8] MOV qword ptr [RAX],RBX CMP RDX,RCX JZ 0x001011b0 NOP dword ptr [RAX + RAX*0x1] LAB_001...
void func0(int8 param_1,int param_2) { int8 *puVar1; int8 *puVar2; int8 *puVar3; size_t __size; __size = (long)param_2 * 8; puVar1 = (int8 *)malloc(__size); if (0 < param_2) { puVar2 = puVar1; if ((__size & 8) != 0) { puVar2 = puVar1 + 1; *puVar1 = param_1; if (puVar2 == puVa...
5,368
func0
#include <assert.h>
int func0(int l, int w, int h) { int LSA = 2 * h * (l + w); return LSA; }
int main() { assert(func0(8, 5, 6) == 156); assert(func0(7, 9, 10) == 320); assert(func0(10, 20, 30) == 1800); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x14(%rbp) mov %esi,-0x18(%rbp) mov %edx,-0x1c(%rbp) mov -0x14(%rbp),%edx mov -0x18(%rbp),%eax add %edx,%eax imul -0x1c(%rbp),%eax add %eax,%eax mov %eax,-0x4(%rbp) mov -0x4(%rbp),%eax pop %rbp retq
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_14], edi mov [rbp+var_18], esi mov [rbp+var_1C], edx mov edx, [rbp+var_14] mov eax, [rbp+var_18] add eax, edx imul eax, [rbp+var_1C] add eax, eax mov [rbp+var_4], eax mov eax, [rbp+var_4] pop rbp retn
long long func0(int a1, int a2, int a3) { return (unsigned int)(2 * a3 * (a1 + a2)); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x14],EDI MOV dword ptr [RBP + -0x18],ESI MOV dword ptr [RBP + -0x1c],EDX MOV EDX,dword ptr [RBP + -0x14] MOV EAX,dword ptr [RBP + -0x18] ADD EAX,EDX IMUL EAX,dword ptr [RBP + -0x1c] ADD EAX,EAX MOV dword ptr [RBP + -0x4],EAX MOV EAX,dword ptr [RBP + -0x4] POP R...
int func0(int param_1,int param_2,int param_3) { return (param_2 + param_1) * param_3 * 2; }
5,369
func0
#include <assert.h>
int func0(int l, int w, int h) { int LSA = 2 * h * (l + w); return LSA; }
int main() { assert(func0(8, 5, 6) == 156); assert(func0(7, 9, 10) == 320); assert(func0(10, 20, 30) == 1800); return 0; }
O1
c
func0: endbr64 add %esi,%edi imul %edx,%edi lea (%rdi,%rdi,1),%eax retq
func0: endbr64 add edi, esi imul edi, edx lea eax, [rdi+rdi] retn
long long func0(int a1, int a2, int a3) { return (unsigned int)(2 * a3 * (a2 + a1)); }
func0: ENDBR64 ADD EDI,ESI IMUL EDI,EDX LEA EAX,[RDI + RDI*0x1] RET
int func0(int param_1,int param_2,int param_3) { return (param_1 + param_2) * param_3 * 2; }
5,370
func0
#include <assert.h>
int func0(int l, int w, int h) { int LSA = 2 * h * (l + w); return LSA; }
int main() { assert(func0(8, 5, 6) == 156); assert(func0(7, 9, 10) == 320); assert(func0(10, 20, 30) == 1800); return 0; }
O2
c
func0: endbr64 add %esi,%edi imul %edx,%edi lea (%rdi,%rdi,1),%eax retq nopl (%rax)
func0: endbr64 add edi, esi imul edi, edx lea eax, [rdi+rdi] retn
long long func0(int a1, int a2, int a3) { return (unsigned int)(2 * a3 * (a2 + a1)); }
func0: ENDBR64 ADD EDI,ESI IMUL EDI,EDX LEA EAX,[RDI + RDI*0x1] RET
int func0(int param_1,int param_2,int param_3) { return (param_1 + param_2) * param_3 * 2; }
5,371
func0
#include <assert.h>
int func0(int l, int w, int h) { int LSA = 2 * h * (l + w); return LSA; }
int main() { assert(func0(8, 5, 6) == 156); assert(func0(7, 9, 10) == 320); assert(func0(10, 20, 30) == 1800); return 0; }
O3
c
func0: endbr64 add %esi,%edi imul %edx,%edi lea (%rdi,%rdi,1),%eax retq nopl (%rax)
func0: endbr64 add edi, esi imul edi, edx lea eax, [rdi+rdi] retn
long long func0(int a1, int a2, int a3) { return (unsigned int)(2 * a3 * (a2 + a1)); }
func0: ENDBR64 ADD EDI,ESI IMUL EDI,EDX LEA EAX,[RDI + RDI*0x1] RET
int func0(int param_1,int param_2,int param_3) { return (param_1 + param_2) * param_3 * 2; }
5,372
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> typedef struct { char *item; char *price; } Tuple; int compare_tuples(const void *a, const void *b) { const Tuple *tuple_a = (const Tuple *)a; const Tuple *tuple_b = (const Tuple *)b; float price_a = atof(t...
Tuple* func0(Tuple arr[], int len) { qsort(arr, len, sizeof(Tuple), compare_tuples); return arr; }
int main() { Tuple arr1[3] = {{"item1", "12.20"}, {"item2", "15.10"}, {"item3", "24.5"}}; Tuple arr2[3] = {{"item1", "15"}, {"item2", "10"}, {"item3", "20"}}; Tuple arr3[3] = {{"item1", "5"}, {"item2", "10"}, {"item3", "14"}}; Tuple *sorted_arr1 = func0(arr1, 3); assert(strcmp(sorted_arr1...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x10,%rsp mov %rdi,-0x8(%rbp) mov %esi,-0xc(%rbp) mov -0xc(%rbp),%eax movslq %eax,%rsi mov -0x8(%rbp),%rax lea -0x9e(%rip),%rcx mov $0x10,%edx mov %rax,%rdi callq 1090 <qsort@plt> mov -0x8(%rbp),%rax leaveq retq
func0: endbr64 push rbp mov rbp, rsp sub rsp, 10h mov [rbp+base], rdi mov [rbp+var_C], esi mov eax, [rbp+var_C] movsxd rsi, eax; nmemb mov rax, [rbp+base] lea rdx, compare_tuples mov rcx, rdx; compar mov edx, 10h; size mov rdi, rax; base call _qsort mov rax, [rbp+base]...
void * func0(void *a1, int a2) { qsort(a1, a2, 0x10uLL, compare_tuples); return a1; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV EAX,dword ptr [RBP + -0xc] MOVSXD RSI,EAX MOV RAX,qword ptr [RBP + -0x8] LEA RDX,[0x1011c9] MOV RCX,RDX MOV EDX,0x10 MOV RDI,RAX CALL 0x00101090 MOV RAX,qword ptr [RBP + -0x8] LEAVE RET
void * func0(void *param_1,int param_2) { qsort(param_1,(long)param_2,0x10,compare_tuples); return param_1; }
5,373
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> typedef struct { char *item; char *price; } Tuple; int compare_tuples(const void *a, const void *b) { const Tuple *tuple_a = (const Tuple *)a; const Tuple *tuple_b = (const Tuple *)b; float price_a = atof(t...
Tuple* func0(Tuple arr[], int len) { qsort(arr, len, sizeof(Tuple), compare_tuples); return arr; }
int main() { Tuple arr1[3] = {{"item1", "12.20"}, {"item2", "15.10"}, {"item3", "24.5"}}; Tuple arr2[3] = {{"item1", "15"}, {"item2", "10"}, {"item3", "20"}}; Tuple arr3[3] = {{"item1", "5"}, {"item2", "10"}, {"item3", "14"}}; Tuple *sorted_arr1 = func0(arr1, 3); assert(strcmp(sorted_arr1...
O1
c
func0: endbr64 push %rbx mov %rdi,%rbx movslq %esi,%rsi lea -0x6c(%rip),%rcx mov $0x10,%edx callq 1080 <qsort@plt> mov %rbx,%rax pop %rbx retq
func0: endbr64 push rbx mov rbx, rdi movsxd rsi, esi lea rcx, compare_tuples mov edx, 10h call _qsort mov rax, rbx pop rbx retn
long long func0(long long a1, int a2) { qsort(a1, a2, 16LL, compare_tuples); return a1; }
func0: ENDBR64 PUSH RBX MOV RBX,RDI MOVSXD RSI,ESI LEA RCX,[0x1011c9] MOV EDX,0x10 CALL 0x00101090 MOV RAX,RBX POP RBX RET
void * func0(void *param_1,int param_2) { qsort(param_1,(long)param_2,0x10,compare_tuples); return param_1; }
5,374
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> typedef struct { char *item; char *price; } Tuple; int compare_tuples(const void *a, const void *b) { const Tuple *tuple_a = (const Tuple *)a; const Tuple *tuple_b = (const Tuple *)b; float price_a = atof(t...
Tuple* func0(Tuple arr[], int len) { qsort(arr, len, sizeof(Tuple), compare_tuples); return arr; }
int main() { Tuple arr1[3] = {{"item1", "12.20"}, {"item2", "15.10"}, {"item3", "24.5"}}; Tuple arr2[3] = {{"item1", "15"}, {"item2", "10"}, {"item3", "20"}}; Tuple arr3[3] = {{"item1", "5"}, {"item2", "10"}, {"item3", "14"}}; Tuple *sorted_arr1 = func0(arr1, 3); assert(strcmp(sorted_arr1...
O2
c
func0: endbr64 push %r12 movslq %esi,%rsi mov %rdi,%r12 mov $0x10,%edx lea -0x78(%rip),%rcx callq 1080 <qsort@plt> mov %r12,%rax pop %r12 retq nopw %cs:0x0(%rax,%rax,1) nopl (%rax)
func0: endbr64 push r12 movsxd rsi, esi mov r12, rdi mov edx, 10h lea rcx, compare_tuples call _qsort mov rax, r12 pop r12 retn
long long func0(long long a1, int a2) { qsort(a1, a2, 16LL, compare_tuples); return a1; }
func0: ENDBR64 PUSH R12 MOVSXD RSI,ESI MOV R12,RDI MOV EDX,0x10 LEA RCX,[0x101430] CALL 0x00101090 MOV RAX,R12 POP R12 RET
void * func0(void *param_1,int param_2) { qsort(param_1,(long)param_2,0x10,compare_tuples); return param_1; }
5,375
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> typedef struct { char *item; char *price; } Tuple; int compare_tuples(const void *a, const void *b) { const Tuple *tuple_a = (const Tuple *)a; const Tuple *tuple_b = (const Tuple *)b; float price_a = atof(t...
Tuple* func0(Tuple arr[], int len) { qsort(arr, len, sizeof(Tuple), compare_tuples); return arr; }
int main() { Tuple arr1[3] = {{"item1", "12.20"}, {"item2", "15.10"}, {"item3", "24.5"}}; Tuple arr2[3] = {{"item1", "15"}, {"item2", "10"}, {"item3", "20"}}; Tuple arr3[3] = {{"item1", "5"}, {"item2", "10"}, {"item3", "14"}}; Tuple *sorted_arr1 = func0(arr1, 3); assert(strcmp(sorted_arr1...
O3
c
func0: endbr64 push %r12 movslq %esi,%rsi mov %rdi,%r12 mov $0x10,%edx lea -0x78(%rip),%rcx callq 1080 <qsort@plt> mov %r12,%rax pop %r12 retq nopw %cs:0x0(%rax,%rax,1) nopl (%rax)
func0: endbr64 push rbx movsxd rsi, esi; nmemb mov rbx, rdi lea rcx, compare_tuples; compar mov edx, 10h; size call _qsort mov rax, rbx pop rbx retn
void * func0(void *a1, int a2) { qsort(a1, a2, 0x10uLL, compare_tuples); return a1; }
func0: ENDBR64 PUSH RBX MOVSXD RSI,ESI MOV RBX,RDI LEA RCX,[0x101470] MOV EDX,0x10 CALL 0x00101090 MOV RAX,RBX POP RBX RET
void * func0(void *param_1,int param_2) { qsort(param_1,(long)param_2,0x10,compare_tuples); return param_1; }
5,376
func0
#include <stdio.h> #include <assert.h>
int func0(int A[], int left_element, int right_element) { if (left_element > right_element) { return left_element; } int mid = left_element + (right_element - left_element) / 2; if (A[mid] == mid) { return func0(A, mid + 1, right_element); } else { return func0(A, lef...
int main() { int test_array1[] = {0, 1, 2, 3, 4, 5, 6}; int test_array2[] = {0, 1, 2, 6, 9, 11, 15}; int test_array3[] = {1, 2, 3, 4, 6, 9, 11, 15}; assert(func0(test_array1, 0, 6) == 7); assert(func0(test_array2, 0, 6) == 3); assert(func0(test_array3, 0, 7) == 0); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x20,%rsp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) mov %edx,-0x20(%rbp) mov -0x1c(%rbp),%eax cmp -0x20(%rbp),%eax jle 118c <func0+0x23> mov -0x1c(%rbp),%eax jmp 11f0 <func0+0x87> mov -0x20(%rbp),%eax sub -0x1c(%rbp),%eax mov %eax,%edx...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_20], edx mov eax, [rbp+var_1C] cmp eax, [rbp+var_20] jle short loc_118C mov eax, [rbp+var_1C] jmp short locret_11F0 loc_118C: mov eax, [rbp+var_20] sub eax, [rbp+...
long long func0(long long a1, unsigned int a2, unsigned int a3) { unsigned int v4; // [rsp+1Ch] [rbp-4h] if ( (int)a2 > (int)a3 ) return a2; v4 = (int)(a3 - a2) / 2 + a2; if ( v4 == *(_DWORD *)(4LL * (int)v4 + a1) ) return func0(a1, v4 + 1, a3); else return func0(a1, a2, v4 - 1); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV dword ptr [RBP + -0x20],EDX MOV EAX,dword ptr [RBP + -0x1c] CMP EAX,dword ptr [RBP + -0x20] JLE 0x0010118c MOV EAX,dword ptr [RBP + -0x1c] JMP 0x001011f0 LAB_0010118c: MOV EAX,dword ptr [RBP + -0x20] SUB...
ulong func0(long param_1,uint param_2,int param_3) { int iVar1; ulong uVar2; if (param_3 < (int)param_2) { uVar2 = (ulong)param_2; } else { iVar1 = param_2 + (int)(param_3 - param_2) / 2; if (iVar1 == *(int *)(param_1 + (long)iVar1 * 4)) { uVar2 = func0(param_1,iVar1 + 1,param_3); } ...
5,377
func0
#include <stdio.h> #include <assert.h>
int func0(int A[], int left_element, int right_element) { if (left_element > right_element) { return left_element; } int mid = left_element + (right_element - left_element) / 2; if (A[mid] == mid) { return func0(A, mid + 1, right_element); } else { return func0(A, lef...
int main() { int test_array1[] = {0, 1, 2, 3, 4, 5, 6}; int test_array2[] = {0, 1, 2, 6, 9, 11, 15}; int test_array3[] = {1, 2, 3, 4, 6, 9, 11, 15}; assert(func0(test_array1, 0, 6) == 7); assert(func0(test_array2, 0, 6) == 3); assert(func0(test_array3, 0, 7) == 0); return 0; }
O1
c
func0: endbr64 mov %esi,%eax cmp %edx,%esi jg 11a5 <func0+0x3c> sub $0x8,%rsp mov %edx,%ecx sub %esi,%ecx mov %ecx,%eax shr $0x1f,%eax add %ecx,%eax sar %eax add %esi,%eax movslq %eax,%rcx cmp %eax,(%rdi,%rcx,4) je 119b <func0+0x32> lea -0x1(%rax),%edx callq 1169 <func0> add...
func0: endbr64 mov eax, esi cmp esi, edx jg short locret_11A5 sub rsp, 8 mov ecx, edx sub ecx, esi mov eax, ecx shr eax, 1Fh add eax, ecx sar eax, 1 add eax, esi movsxd rcx, eax cmp [rdi+rcx*4], eax jz short loc_119B lea edx, [rax-1] call func0 loc_1196: add...
long long func0(long long a1, long long a2, int a3) { long long result; // rax int v4; // eax result = (unsigned int)a2; if ( (int)a2 <= a3 ) { v4 = a2 + (a3 - (int)a2) / 2; if ( *(_DWORD *)(a1 + 4LL * v4) == v4 ) return func0(a1, (unsigned int)(v4 + 1)); else return func0(a1, a2); ...
func0: ENDBR64 MOV EAX,ESI CMP ESI,EDX JG 0x001011a5 SUB RSP,0x8 MOV ECX,EDX SUB ECX,ESI MOV EAX,ECX SHR EAX,0x1f ADD EAX,ECX SAR EAX,0x1 ADD EAX,ESI MOVSXD RCX,EAX CMP dword ptr [RDI + RCX*0x4],EAX JZ 0x0010119b LEA EDX,[RAX + -0x1] CALL 0x00101169 LAB_00101196: ADD RSP,0x8 RET LAB_0010119b: LEA ESI,[RAX + 0x1] CALL 0...
ulong func0(long param_1,ulong param_2,int param_3) { int iVar1; ulong uVar2; iVar1 = (int)param_2; if (iVar1 <= param_3) { iVar1 = (param_3 - iVar1) / 2 + iVar1; if (*(int *)(param_1 + (long)iVar1 * 4) == iVar1) { uVar2 = func0(param_1,iVar1 + 1); } else { uVar2 = func0(param_1,...
5,378
func0
#include <stdio.h> #include <assert.h>
int func0(int A[], int left_element, int right_element) { if (left_element > right_element) { return left_element; } int mid = left_element + (right_element - left_element) / 2; if (A[mid] == mid) { return func0(A, mid + 1, right_element); } else { return func0(A, lef...
int main() { int test_array1[] = {0, 1, 2, 3, 4, 5, 6}; int test_array2[] = {0, 1, 2, 6, 9, 11, 15}; int test_array3[] = {1, 2, 3, 4, 6, 9, 11, 15}; assert(func0(test_array1, 0, 6) == 7); assert(func0(test_array2, 0, 6) == 3); assert(func0(test_array3, 0, 7) == 0); return 0; }
O2
c
func0: endbr64 mov %esi,%eax cmp %edx,%esi jle 1347 <func0+0x17> jmp 1360 <func0+0x30> nopl 0x0(%rax) lea -0x1(%rcx),%edx cmp %edx,%eax jg 135e <func0+0x2e> mov %edx,%ecx sub %eax,%ecx sar %ecx add %eax,%ecx movslq %ecx,%rsi cmp %ecx,(%rdi,%rsi,4) jne 1340 <func0+0x10> lea 0...
func0: endbr64 mov eax, esi cmp esi, edx jle short loc_12F7 jmp short locret_1310 loc_12F0: lea edx, [rcx-1] cmp edx, eax jl short locret_130E loc_12F7: mov ecx, edx sub ecx, eax sar ecx, 1 add ecx, eax movsxd rsi, ecx cmp [rdi+rsi*4], ecx jnz short loc_12F0 lea ...
long long func0(long long a1, int a2, int a3) { long long result; // rax int v4; // ecx result = (unsigned int)a2; if ( a2 <= a3 ) { do { while ( 1 ) { v4 = result + ((a3 - (int)result) >> 1); if ( *(_DWORD *)(a1 + 4LL * v4) == v4 ) break; a3 = v4 - 1; ...
func0: ENDBR64 MOV EAX,ESI CMP ESI,EDX JLE 0x001012f7 JMP 0x00101310 LAB_001012f0: LEA EDX,[RCX + -0x1] CMP EDX,EAX JL 0x0010130e LAB_001012f7: MOV ECX,EDX SUB ECX,EAX SAR ECX,0x1 ADD ECX,EAX MOVSXD RSI,ECX CMP dword ptr [RDI + RSI*0x4],ECX JNZ 0x001012f0 LEA EAX,[RCX + 0x1] CMP EDX,EAX JGE 0x001012f7 LAB_0010130e: RET...
void func0(long param_1,int param_2,int param_3) { int iVar1; if (param_3 < param_2) { return; } do { while (iVar1 = (param_3 - param_2 >> 1) + param_2, *(int *)(param_1 + (long)iVar1 * 4) == iVar1) { param_2 = iVar1 + 1; if (param_3 < param_2) { return; } } par...
5,379
func0
#include <stdio.h> #include <assert.h>
int func0(int A[], int left_element, int right_element) { if (left_element > right_element) { return left_element; } int mid = left_element + (right_element - left_element) / 2; if (A[mid] == mid) { return func0(A, mid + 1, right_element); } else { return func0(A, lef...
int main() { int test_array1[] = {0, 1, 2, 3, 4, 5, 6}; int test_array2[] = {0, 1, 2, 6, 9, 11, 15}; int test_array3[] = {1, 2, 3, 4, 6, 9, 11, 15}; assert(func0(test_array1, 0, 6) == 7); assert(func0(test_array2, 0, 6) == 3); assert(func0(test_array3, 0, 7) == 0); return 0; }
O3
c
func0: endbr64 mov %esi,%eax cmp %edx,%esi jg 1337 <func0+0x27> nopw 0x0(%rax,%rax,1) mov %edx,%ecx sub %eax,%ecx sar %ecx add %eax,%ecx movslq %ecx,%rsi cmp %ecx,(%rdi,%rsi,4) je 1340 <func0+0x30> lea -0x1(%rcx),%edx cmp %eax,%edx jge 1320 <func0+0x10> retq nopl 0x0(%rax,%rax,...
func0: endbr64 mov eax, esi cmp esi, edx jg short locret_1337 nop word ptr [rax+rax+00h] loc_1320: mov ecx, edx sub ecx, eax sar ecx, 1 add ecx, eax movsxd rsi, ecx cmp [rdi+rsi*4], ecx jz short loc_1340 lea edx, [rcx-1] cmp edx, eax jge short loc_1320 locret_1337:...
long long func0(long long a1, int a2, int a3) { long long result; // rax int v4; // ecx result = (unsigned int)a2; if ( a2 <= a3 ) { do { while ( 1 ) { v4 = result + ((a3 - (int)result) >> 1); if ( *(_DWORD *)(a1 + 4LL * v4) == v4 ) break; a3 = v4 - 1; ...
func0: ENDBR64 MOV EAX,ESI CMP ESI,EDX JG 0x00101337 NOP word ptr [RAX + RAX*0x1] LAB_00101320: MOV ECX,EDX SUB ECX,EAX SAR ECX,0x1 ADD ECX,EAX MOVSXD RSI,ECX CMP dword ptr [RDI + RSI*0x4],ECX JZ 0x00101340 LEA EDX,[RCX + -0x1] CMP EDX,EAX JGE 0x00101320 LAB_00101337: RET LAB_00101340: LEA EAX,[RCX + 0x1] CMP EAX,EDX J...
void func0(long param_1,int param_2,int param_3) { int iVar1; if (param_2 <= param_3) { do { while (iVar1 = (param_3 - param_2 >> 1) + param_2, *(int *)(param_1 + (long)iVar1 * 4) == iVar1) { param_2 = iVar1 + 1; if (param_3 < param_2) { return; } } ...
5,380
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> // Function to maintain the min heap property void min_heapify(int* heap, int size, int i) { int smallest = i; int left = 2*i +1; int right = 2*i +2; if(left < size && heap[left] < heap[smallest]) smallest = left; if(...
int* func0(int* nums, int size) { // Copy nums to heap array int* heap = malloc(size * sizeof(int)); for(int i=0; i<size; i++) heap[i] = nums[i]; // Heapify for(int i=(size/2)-1; i>=0; i--) min_heapify(heap, size, i); // Extract elements int* sorted = malloc(size...
int main() { // Test Case 1 int test1[] = {18, 14, 10, 9, 8, 7, 9, 3, 2, 4, 1}; int expected1[] = {1, 2, 3, 4, 7, 8, 9, 9, 10, 14, 18}; int size1 = sizeof(test1)/sizeof(test1[0]); int* result1 = func0(test1, size1); for(int i=0; i<size1; i++) assert(result1[i] == expected1[i]); ...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x30,%rsp mov %rdi,-0x28(%rbp) mov %esi,-0x2c(%rbp) mov -0x2c(%rbp),%eax cltq shl $0x2,%rax mov %rax,%rdi callq 10b0 <malloc@plt> mov %rax,-0x10(%rbp) movl $0x0,-0x20(%rbp) jmp 1337 <func0+0x62> mov -0x20(%rbp),%eax cltq lea 0x0(,%rax,4),...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_28], rdi mov [rbp+var_2C], esi mov eax, [rbp+var_2C] cdqe shl rax, 2 mov rdi, rax; size call _malloc mov [rbp+ptr], rax mov [rbp+var_20], 0 jmp short loc_1337 loc_1306: mov eax, [rbp+var_20] cdqe lea rdx...
_DWORD * func0(long long a1, signed int a2) { int i; // [rsp+10h] [rbp-20h] int j; // [rsp+14h] [rbp-1Ch] unsigned int v5; // [rsp+18h] [rbp-18h] int k; // [rsp+1Ch] [rbp-14h] _DWORD *ptr; // [rsp+20h] [rbp-10h] _DWORD *v8; // [rsp+28h] [rbp-8h] ptr = malloc(4LL * a2); for ( i = 0; i < a2; ++i ) pt...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x28],RDI MOV dword ptr [RBP + -0x2c],ESI MOV EAX,dword ptr [RBP + -0x2c] CDQE SHL RAX,0x2 MOV RDI,RAX CALL 0x001010b0 MOV qword ptr [RBP + -0x10],RAX MOV dword ptr [RBP + -0x20],0x0 JMP 0x00101337 LAB_00101306: MOV EAX,dword ptr [RBP + -0x20] CDQE ...
void * func0(long param_1,int param_2) { int4 *__ptr; void *pvVar1; int local_28; int local_24; int local_20; int local_1c; __ptr = (int4 *)malloc((long)param_2 << 2); for (local_28 = 0; local_28 < param_2; local_28 = local_28 + 1) { __ptr[local_28] = *(int4 *)(param_1 + (long)local_28 * 4); }...
5,381
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> // Function to maintain the min heap property void min_heapify(int* heap, int size, int i) { int smallest = i; int left = 2*i +1; int right = 2*i +2; if(left < size && heap[left] < heap[smallest]) smallest = left; if(...
int* func0(int* nums, int size) { // Copy nums to heap array int* heap = malloc(size * sizeof(int)); for(int i=0; i<size; i++) heap[i] = nums[i]; // Heapify for(int i=(size/2)-1; i>=0; i--) min_heapify(heap, size, i); // Extract elements int* sorted = malloc(size...
int main() { // Test Case 1 int test1[] = {18, 14, 10, 9, 8, 7, 9, 3, 2, 4, 1}; int expected1[] = {1, 2, 3, 4, 7, 8, 9, 9, 10, 14, 18}; int size1 = sizeof(test1)/sizeof(test1[0]); int* result1 = func0(test1, size1); for(int i=0; i<size1; i++) assert(result1[i] == expected1[i]); ...
O1
c
func0: endbr64 push %r14 push %r13 push %r12 push %rbp push %rbx mov %rdi,%rbp mov %esi,%r12d movslq %esi,%r13 shl $0x2,%r13 mov %r13,%rdi callq 10b0 <malloc@plt> mov %rax,%rbx test %r12d,%r12d jle 12f7 <func0+0xd2> lea -0x1(%r12),%ecx mov $0x0,%eax mov 0x0(%rbp,%rax,4),%edx mov ...
func0: endbr64 push r14 push r13 push r12 push rbp push rbx mov rbp, rdi mov r12d, esi movsxd r13, esi shl r13, 2 mov rdi, r13 call _malloc mov rbx, rax test r12d, r12d jle loc_12F2 mov ecx, r12d mov eax, 0 loc_125A: mov edx, [rbp+rax*4+0] mov [rbx+rax*4], e...
long long func0(long long a1, int a2) { _DWORD *v2; // rbx long long v3; // rcx long long i; // rax int j; // ebp long long v6; // rcx long long v7; // r14 long long v8; // rbp long long v9; // r13 v2 = (_DWORD *)malloc(4LL * a2); if ( a2 <= 0 ) { v7 = malloc(4LL * a2); } else { v3...
func0: ENDBR64 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV RBP,RDI MOV R12D,ESI MOVSXD R13,ESI SHL R13,0x2 MOV RDI,R13 CALL 0x001010b0 MOV RBX,RAX TEST R12D,R12D JLE 0x001012f2 MOV ECX,R12D MOV EAX,0x0 LAB_0010125a: MOV EDX,dword ptr [RBP + RAX*0x4] MOV dword ptr [RBX + RAX*0x4],EDX ADD RAX,0x1 CMP RAX,RCX JNZ 0x0...
void * func0(long param_1,uint param_2) { int4 *__ptr; ulong uVar1; void *pvVar2; int iVar3; size_t __size; long lVar4; __size = (long)(int)param_2 << 2; __ptr = (int4 *)malloc(__size); if ((int)param_2 < 1) { pvVar2 = malloc(__size); } else { uVar1 = 0; do { __ptr[uVar1] = *...