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
7,382
func0
#include <stdio.h> #include <stdbool.h> #include <assert.h>
bool func0(int list1[][2], int size1, int list2[][2], int size2) { for (int i = 0; i < size2; i++) { bool found = false; for (int j = 0; j < size1; j++) { if (list1[j][0] == list2[i][0] && list1[j][1] == list2[i][1]) { found = true; break; ...
int main() { int list1[][2] = {{1, 3}, {5, 7}, {9, 11}, {13, 15}}; int list2[][2] = {{1, 3}, {13, 15}}; assert(func0(list1, 4, list2, 2) == true); int list3[][2] = {{1, 2}, {2, 3}, {3, 4}, {5, 6}}; int list4[][2] = {{3, 4}, {5, 6}}; assert(func0(list3, 4, list4, 2) == true); int l...
O2
c
func0: endbr64 test %ecx,%ecx jle 1420 <func0+0x50> lea -0x1(%rcx),%eax mov %rdx,%r8 lea 0x8(%rdx,%rax,8),%r9 lea -0x1(%rsi),%eax lea 0x8(%rdi,%rax,8),%rcx nopl 0x0(%rax,%rax,1) test %esi,%esi jle 1430 <func0+0x60> mov (%r8),%edx mov %rdi,%rax jmp 1409 <func0+0x39> nopl 0x0(%rax) a...
func0: endbr64 mov r8, rdi test ecx, ecx jle short loc_1380 lea eax, [rcx-1] mov rdi, rdx lea r9, [rdx+rax*8+8] lea eax, [rsi-1] lea rcx, [r8+rax*8+8] xchg ax, ax loc_1350: test esi, esi jle short loc_1390 mov edx, [rdi] mov rax, r8 jmp short loc_1369 loc_1360: add ...
long long func0(_DWORD *a1, int a2, _DWORD *a3, int a4) { _DWORD *v5; // rdi _DWORD *v6; // rax if ( a4 <= 0 ) return 1LL; v5 = a3; while ( a2 > 0 ) { v6 = a1; while ( *v6 != *v5 || v6[1] != v5[1] ) { v6 += 2; if ( v6 == &a1[2 * (a2 - 1) + 2] ) return 0LL; } v5 ...
func0: ENDBR64 MOV R8,RDI TEST ECX,ECX JLE 0x00101380 LEA EAX,[RCX + -0x1] MOV RDI,RDX LEA R9,[RDX + RAX*0x8 + 0x8] LEA EAX,[RSI + -0x1] LEA RCX,[R8 + RAX*0x8 + 0x8] NOP LAB_00101350: TEST ESI,ESI JLE 0x00101390 MOV EDX,dword ptr [RDI] MOV RAX,R8 JMP 0x00101369 LAB_00101360: ADD RAX,0x8 CMP RAX,RCX JZ 0x00101390 LAB_00...
int8 func0(int *param_1,int param_2,int *param_3,int param_4) { int *piVar1; int *piVar2; if (0 < param_4) { piVar1 = param_3 + (ulong)(param_4 - 1) * 2 + 2; do { if (param_2 < 1) { return 0; } piVar2 = param_1; while ((*piVar2 != *param_3 || (piVar2[1] != param_3[1])))...
7,383
func0
#include <stdio.h> #include <stdbool.h> #include <assert.h>
bool func0(int list1[][2], int size1, int list2[][2], int size2) { for (int i = 0; i < size2; i++) { bool found = false; for (int j = 0; j < size1; j++) { if (list1[j][0] == list2[i][0] && list1[j][1] == list2[i][1]) { found = true; break; ...
int main() { int list1[][2] = {{1, 3}, {5, 7}, {9, 11}, {13, 15}}; int list2[][2] = {{1, 3}, {13, 15}}; assert(func0(list1, 4, list2, 2) == true); int list3[][2] = {{1, 2}, {2, 3}, {3, 4}, {5, 6}}; int list4[][2] = {{3, 4}, {5, 6}}; assert(func0(list3, 4, list4, 2) == true); int l...
O3
c
func0: endbr64 test %ecx,%ecx jle 13e0 <func0+0x50> lea -0x1(%rcx),%eax mov %rdx,%r8 lea 0x8(%rdx,%rax,8),%r9 lea -0x1(%rsi),%eax lea 0x8(%rdi,%rax,8),%rcx nopl 0x0(%rax,%rax,1) test %esi,%esi jle 13f0 <func0+0x60> mov (%r8),%edx mov %rdi,%rax jmp 13c9 <func0+0x39> nopl 0x0(%rax) a...
func0: endbr64 mov r8, rdi test ecx, ecx jle short loc_118E movsxd rcx, ecx movsxd rax, esi mov rdi, rdx lea r9, [rdx+rcx*8] lea rcx, [r8+rax*8] test esi, esi jle short loc_1198 loc_1160: mov edx, [rdi] mov rax, r8 jmp short loc_1179 loc_1170: add rax, 8 cmp rcx, rax ...
long long func0(_DWORD *a1, int a2, _DWORD *a3, int a4) { _DWORD *v5; // rdi _DWORD *v6; // rax if ( a4 <= 0 ) return 1LL; v5 = a3; if ( a2 > 0 ) { do { v6 = a1; while ( *v6 != *v5 || v6[1] != v5[1] ) { v6 += 2; if ( &a1[2 * a2] == v6 ) return 0LL; ...
func0: ENDBR64 MOV R8,RDI TEST ECX,ECX JLE 0x0010118e MOVSXD RCX,ECX MOVSXD RAX,ESI MOV RDI,RDX LEA R9,[RDX + RCX*0x8] LEA RCX,[R8 + RAX*0x8] TEST ESI,ESI JLE 0x00101198 LAB_00101160: MOV EDX,dword ptr [RDI] MOV RAX,R8 JMP 0x00101179 LAB_00101170: ADD RAX,0x8 CMP RCX,RAX JZ 0x00101198 LAB_00101179: CMP dword ptr [RAX],...
int8 func0(int *param_1,int param_2,int *param_3,int param_4) { int *piVar1; int *piVar2; if (0 < param_4) { piVar1 = param_3 + (long)param_4 * 2; if (param_2 < 1) { return 0; } do { piVar2 = param_1; while ((*piVar2 != *param_3 || (piVar2[1] != param_3[1]))) { piVar2...
7,384
func0
#include <assert.h>
int func0(int n) { if (n == 1 || n == 2) { return 1; } else { return (func0(n - 1) + func0(n - 2)); } }
int main() { assert(func0(7) == 13); assert(func0(8) == 21); assert(func0(9) == 34); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x18,%rsp mov %edi,-0x14(%rbp) cmpl $0x1,-0x14(%rbp) je 1165 <func0+0x1c> cmpl $0x2,-0x14(%rbp) jne 116c <func0+0x23> mov $0x1,%eax jmp 118a <func0+0x41> mov -0x14(%rbp),%eax sub $0x1,%eax mov %eax,%edi callq 1149 <func0> mov ...
func0: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 18h mov [rbp+var_14], edi cmp [rbp+var_14], 1 jz short loc_1165 cmp [rbp+var_14], 2 jnz short loc_116C loc_1165: mov eax, 1 jmp short loc_118A loc_116C: mov eax, [rbp+var_14] sub eax, 1 mov edi, eax call fun...
long long func0(int a1) { int v2; // ebx if ( a1 == 1 || a1 == 2 ) return 1LL; v2 = func0((unsigned int)(a1 - 1)); return v2 + (unsigned int)func0((unsigned int)(a1 - 2)); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x18 MOV dword ptr [RBP + -0x14],EDI CMP dword ptr [RBP + -0x14],0x1 JZ 0x00101165 CMP dword ptr [RBP + -0x14],0x2 JNZ 0x0010116c LAB_00101165: MOV EAX,0x1 JMP 0x0010118a LAB_0010116c: MOV EAX,dword ptr [RBP + -0x14] SUB EAX,0x1 MOV EDI,EAX CALL 0x00101149 MOV EBX,EA...
int func0(int param_1) { int iVar1; int iVar2; if ((param_1 == 1) || (param_1 == 2)) { iVar2 = 1; } else { iVar1 = func0(param_1 + -1); iVar2 = func0(param_1 + -2); iVar2 = iVar2 + iVar1; } return iVar2; }
7,385
func0
#include <assert.h>
int func0(int n) { if (n == 1 || n == 2) { return 1; } else { return (func0(n - 1) + func0(n - 2)); } }
int main() { assert(func0(7) == 13); assert(func0(8) == 21); assert(func0(9) == 34); return 0; }
O1
c
func0: endbr64 lea -0x1(%rdi),%edx mov $0x1,%eax cmp $0x1,%edx ja 115b <func0+0x12> retq push %rbp push %rbx sub $0x8,%rsp mov %edi,%ebx mov %edx,%edi callq 1149 <func0> mov %eax,%ebp lea -0x2(%rbx),%edi callq 1149 <func0> add %ebp,%eax add $0x8,%rsp pop %rbx pop %rbp retq
func0: endbr64 lea edx, [rdi-1] mov eax, 1 cmp edx, 1 ja short loc_115B retn loc_115B: push rbp push rbx sub rsp, 8 mov ebx, edi mov edi, edx call func0 mov ebp, eax lea edi, [rbx-2] call func0 add eax, ebp add rsp, 8 pop rbx pop rbp retn
long long func0(int a1) { long long result; // rax int v2; // ebp result = 1LL; if ( (unsigned int)(a1 - 1) > 1 ) { v2 = func0((unsigned int)(a1 - 1)); return v2 + (unsigned int)func0((unsigned int)(a1 - 2)); } return result; }
func0: ENDBR64 LEA EDX,[RDI + -0x1] MOV EAX,0x1 CMP EDX,0x1 JA 0x0010115b RET LAB_0010115b: PUSH RBP PUSH RBX SUB RSP,0x8 MOV EBX,EDI MOV EDI,EDX CALL 0x00101149 MOV EBP,EAX LEA EDI,[RBX + -0x2] CALL 0x00101149 ADD EAX,EBP ADD RSP,0x8 POP RBX POP RBP RET
int func0(int param_1) { int iVar1; int iVar2; if (param_1 - 1U < 2) { return 1; } iVar1 = func0(param_1 - 1U); iVar2 = func0(param_1 + -2); return iVar2 + iVar1; }
7,386
func0
#include <assert.h>
int func0(int n) { if (n == 1 || n == 2) { return 1; } else { return (func0(n - 1) + func0(n - 2)); } }
int main() { assert(func0(7) == 13); assert(func0(8) == 21); assert(func0(9) == 34); return 0; }
O2
c
func0: endbr64 push %rbp mov $0x1,%eax push %rbx lea -0x1(%rdi),%ebx sub $0x8,%rsp cmp $0x1,%ebx jbe 127d <func0+0x2d> xor %ebp,%ebp mov %ebx,%edi sub $0x2,%ebx callq 1250 <func0> add %eax,%ebp cmp $0x1,%ebx ja 1269 <func0+0x19> lea 0x1(%rbp),%eax add $0x8,%rsp pop %rbx p...
func0: endbr64 push r15 mov eax, edi lea edx, [rdi-1] push r14 sub eax, 2 push r13 push r12 push rbp push rbx sub rsp, 38h mov [rsp+68h+var_68], eax mov eax, 1 mov [rsp+68h+var_64], 0 cmp edx, 1 jbe loc_146F loc_1223: mov eax, [rsp+68h+var_68] mov [rsp+68h+v...
long long func0(int a1) { long long result; // rax unsigned int v2; // esi unsigned int v3; // r8d int v4; // esi unsigned int v5; // r9d unsigned int v6; // ecx int v7; // edx int v8; // r12d unsigned int v9; // ebx unsigned int v10; // r15d unsigned int v11; // r10d int v12; // r14d unsigne...
func0: ENDBR64 PUSH R15 MOV EAX,EDI LEA EDX,[RDI + -0x1] PUSH R14 SUB EAX,0x2 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x38 MOV dword ptr [RSP],EAX MOV EAX,0x1 MOV dword ptr [RSP + 0x4],0x0 CMP EDX,0x1 JBE 0x0010146f LAB_00101223: MOV EAX,dword ptr [RSP] MOV dword ptr [RSP + 0x8],0x0 MOV ESI,EAX CMP EAX,0x1 JBE 0x00...
int func0(int param_1) { int iVar1; uint uVar2; uint uVar3; uint uVar4; uint uVar5; uint uVar6; int iVar7; uint uVar8; int iVar9; int iVar10; uint uVar11; int iVar12; int iVar13; int iVar14; uint uVar15; uint local_68; int local_64; int local_60; int local_5c; iVar10 = 1; l...
7,387
func0
#include <assert.h>
int func0(int n) { if (n == 1 || n == 2) { return 1; } else { return (func0(n - 1) + func0(n - 2)); } }
int main() { assert(func0(7) == 13); assert(func0(8) == 21); assert(func0(9) == 34); return 0; }
O3
c
func0: endbr64 push %rbp mov $0x1,%eax push %rbx lea -0x1(%rdi),%ebx sub $0x8,%rsp cmp $0x1,%ebx jbe 12dd <func0+0x2d> xor %ebp,%ebp mov %ebx,%edi sub $0x2,%ebx callq 12b0 <func0> add %eax,%ebp cmp $0x1,%ebx ja 12c9 <func0+0x19> lea 0x1(%rbp),%eax add $0x8,%rsp pop %rbx p...
func0: endbr64 push r15 lea edx, [rdi-1] push r14 push r13 mov r13d, 1 push r12 push rbp push rbx sub rsp, 58h cmp edx, 1 jbe loc_155C lea r15d, [rdi-2] xor r13d, r13d loc_128B: cmp r15d, 1 jz loc_1558 lea ebp, [r15-1] mov [rsp+88h+var_70], r13d xor r14...
long long func0(int a1) { unsigned int v1; // r13d int v2; // r15d int v3; // r13d int v4; // ebp int v5; // r14d int v6; // ecx int v7; // r13d int v8; // r15d int v9; // edi int v10; // r12d int v11; // esi int v12; // ebx int v13; // r10d int v14; // r11d int v15; // r14d int v16; //...
func0: ENDBR64 PUSH R15 LEA EDX,[RDI + -0x1] PUSH R14 PUSH R13 MOV R13D,0x1 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x58 CMP EDX,0x1 JBE 0x0010155c LEA R15D,[RDI + -0x2] XOR R13D,R13D LAB_0010128b: CMP R15D,0x1 JZ 0x00101558 LEA EBP,[R15 + -0x1] MOV dword ptr [RSP + 0x18],R13D XOR R14D,R14D MOV dword ptr [RSP + 0x1c],EBP MO...
int func0(int param_1) { int iVar1; uint uVar2; uint uVar3; uint uVar4; uint uVar5; int iVar6; int iVar7; uint uVar8; int iVar9; uint uVar10; int iVar11; int iVar12; int iVar13; int iVar14; int iVar15; uint uVar16; uint uVar17; int iVar18; uint uVar19; int iVar20; int iVar21; ...
7,388
func0
#include <assert.h> #include <string.h> #include <stdbool.h>
bool func0(const char* str1, const char* str2) { int N = strlen(str1); int M = strlen(str2); if (N % M != 0) { return false; } for (int i = 0; i < N; i++) { if (str1[i] != str2[i % M]) { return false; } } return true; }
int main() { assert(func0("abcabcabc", "abc") == true); assert(func0("abcab", "abc") == false); assert(func0("aba", "ab") == false); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x20,%rsp mov %rdi,-0x18(%rbp) mov %rsi,-0x20(%rbp) mov -0x18(%rbp),%rax mov %rax,%rdi callq 1060 <strlen@plt> mov %eax,-0x8(%rbp) mov -0x20(%rbp),%rax mov %rax,%rdi callq 1060 <strlen@plt> mov %eax,-0x4(%rbp) mov -0x8(%rbp),%eax cltd idiv...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 20h mov [rbp+s], rdi mov [rbp+var_20], rsi mov rax, [rbp+s] mov rdi, rax; s call _strlen mov [rbp+var_8], eax mov rax, [rbp+var_20] mov rdi, rax; s call _strlen mov [rbp+var_4], eax mov eax, [rbp+var_8] cdq idiv [rbp+v...
long long func0(const char *a1, const char *a2) { int i; // [rsp+14h] [rbp-Ch] int v4; // [rsp+18h] [rbp-8h] int v5; // [rsp+1Ch] [rbp-4h] v4 = strlen(a1); v5 = strlen(a2); if ( v4 % v5 ) return 0LL; for ( i = 0; i < v4; ++i ) { if ( a1[i] != a2[i % v5] ) return 0LL; } return 1LL; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI MOV RAX,qword ptr [RBP + -0x18] MOV RDI,RAX CALL 0x00101060 MOV dword ptr [RBP + -0x8],EAX MOV RAX,qword ptr [RBP + -0x20] MOV RDI,RAX CALL 0x00101060 MOV dword ptr [RBP + -0x4],EAX MOV EAX,dword ptr [RBP + ...
int8 func0(char *param_1,char *param_2) { size_t sVar1; size_t sVar2; int8 uVar3; int local_14; sVar1 = strlen(param_1); sVar2 = strlen(param_2); if ((int)sVar1 % (int)sVar2 == 0) { for (local_14 = 0; local_14 < (int)sVar1; local_14 = local_14 + 1) { if (param_1[local_14] != param_2[local_14...
7,389
func0
#include <assert.h> #include <string.h> #include <stdbool.h>
bool func0(const char* str1, const char* str2) { int N = strlen(str1); int M = strlen(str2); if (N % M != 0) { return false; } for (int i = 0; i < N; i++) { if (str1[i] != str2[i % M]) { return false; } } return true; }
int main() { assert(func0("abcabcabc", "abc") == true); assert(func0("abcab", "abc") == false); assert(func0("aba", "ab") == false); return 0; }
O1
c
func0: endbr64 mov %rdi,%r8 mov $0xffffffffffffffff,%rdx mov $0x0,%eax mov %rdx,%rcx repnz scas %es:(%rdi),%al not %rcx lea -0x1(%rcx),%r9 mov %rdx,%rcx mov %rsi,%rdi repnz scas %es:(%rdi),%al mov %rcx,%rax not %rax lea -0x1(%rax),%edi mov %r9d,%eax cltd idiv %edi mov $0x0,%eax ...
func0: endbr64 push r13 push r12 push rbp push rbx sub rsp, 8 mov rbx, rdi mov rbp, rsi call _strlen mov r12, rax mov rdi, rbp call _strlen mov esi, eax mov eax, r12d cdq idiv esi mov eax, 0 test edx, edx jnz short loc_11E0 test r12d, r12d jle short loc...
long long func0(long long a1, long long a2) { int v3; // r12d int v4; // esi long long result; // rax long long i; // rcx v3 = ((long long (*)(void))strlen)(); v4 = strlen(a2); result = 0LL; if ( !(v3 % v4) ) { if ( v3 <= 0 ) { return 1LL; } else { for ( i = 0LL; *(_B...
func0: ENDBR64 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x8 MOV RBX,RDI MOV RBP,RSI CALL 0x00101060 MOV R12,RAX MOV RDI,RBP CALL 0x00101060 MOV ESI,EAX MOV EAX,R12D CDQ IDIV ESI MOV EAX,0x0 TEST EDX,EDX JNZ 0x001011e0 TEST R12D,R12D JLE 0x001011d4 LEA EDI,[R12 + -0x1] MOV ECX,0x0 JMP 0x001011b2 LAB_001011af: MOV RCX...
int8 func0(char *param_1,char *param_2) { size_t sVar1; size_t sVar2; int8 uVar3; ulong uVar4; int iVar5; bool bVar6; sVar1 = strlen(param_1); sVar2 = strlen(param_2); iVar5 = (int)sVar1; uVar3 = 0; if ((int)((long)((ulong)(uint)(iVar5 >> 0x1f) << 0x20 | sVar1 & 0xffffffff) % (long)(int)sVar2)...
7,390
func0
#include <assert.h> #include <string.h> #include <stdbool.h>
bool func0(const char* str1, const char* str2) { int N = strlen(str1); int M = strlen(str2); if (N % M != 0) { return false; } for (int i = 0; i < N; i++) { if (str1[i] != str2[i % M]) { return false; } } return true; }
int main() { assert(func0("abcabcabc", "abc") == true); assert(func0("abcab", "abc") == false); assert(func0("aba", "ab") == false); return 0; }
O2
c
func0: endbr64 push %r13 push %r12 push %rbp mov %rsi,%rbp push %rbx mov %rdi,%rbx sub $0x8,%rsp callq 1060 <strlen@plt> mov %rbp,%rdi mov %rax,%r12 callq 1060 <strlen@plt> mov %eax,%edi mov %r12d,%eax cltd idiv %edi xor %eax,%eax test %edx,%edx jne 1290 <func0+0x60> test %r12...
func0: endbr64 push r13 push r12 push rbp mov rbp, rsi push rbx mov rbx, rdi sub rsp, 8 call _strlen mov rdi, rbp mov r12, rax call _strlen mov esi, eax mov eax, r12d cdq idiv esi xor eax, eax test edx, edx jnz short loc_1280 test r12d, r12d jle short l...
long long func0(long long a1, long long a2) { int v3; // r12d int v4; // esi long long result; // rax long long i; // rcx v3 = ((long long (*)(void))strlen)(); v4 = strlen(a2); result = 0LL; if ( !(v3 % v4) ) { if ( v3 <= 0 ) { return 1LL; } else { for ( i = 0LL; *(_B...
func0: ENDBR64 PUSH R13 PUSH R12 PUSH RBP MOV RBP,RSI PUSH RBX MOV RBX,RDI SUB RSP,0x8 CALL 0x00101060 MOV RDI,RBP MOV R12,RAX CALL 0x00101060 MOV ESI,EAX MOV EAX,R12D CDQ IDIV ESI XOR EAX,EAX TEST EDX,EDX JNZ 0x00101280 TEST R12D,R12D JLE 0x00101290 LEA EDI,[R12 + -0x1] XOR ECX,ECX JMP 0x0010126c LAB_00101260: LEA RAX...
int8 func0(char *param_1,char *param_2) { size_t sVar1; size_t sVar2; ulong uVar3; int iVar4; bool bVar5; sVar1 = strlen(param_1); sVar2 = strlen(param_2); iVar4 = (int)sVar1; if ((int)((long)((ulong)(uint)(iVar4 >> 0x1f) << 0x20 | sVar1 & 0xffffffff) % (long)(int)sVar2) != 0) { return 0...
7,391
func0
#include <assert.h> #include <string.h> #include <stdbool.h>
bool func0(const char* str1, const char* str2) { int N = strlen(str1); int M = strlen(str2); if (N % M != 0) { return false; } for (int i = 0; i < N; i++) { if (str1[i] != str2[i % M]) { return false; } } return true; }
int main() { assert(func0("abcabcabc", "abc") == true); assert(func0("abcab", "abc") == false); assert(func0("aba", "ab") == false); return 0; }
O3
c
func0: endbr64 push %r13 push %r12 push %rbp mov %rsi,%rbp push %rbx mov %rdi,%rbx sub $0x8,%rsp callq 1060 <strlen@plt> mov %rbp,%rdi mov %rax,%r12 callq 1060 <strlen@plt> mov %eax,%edi mov %r12d,%eax cltd idiv %edi xor %eax,%eax test %edx,%edx jne 1290 <func0+0x60> test %r12...
func0: endbr64 push r13 push r12 push rbp mov rbp, rsi push rbx mov rbx, rdi sub rsp, 8 call _strlen mov rdi, rbp; s mov r12, rax call _strlen mov esi, eax mov eax, r12d cdq idiv esi xor eax, eax test edx, edx jnz short loc_1280 test r12d, r12d jle shor...
long long func0(const char *a1, const char *a2) { int v3; // r12d int v4; // esi long long result; // rax long long i; // rcx v3 = strlen(a1); v4 = strlen(a2); result = 0LL; if ( !(v3 % v4) ) { if ( v3 <= 0 ) { return 1LL; } else { for ( i = 0LL; a1[i] == a2[(int)i % ...
func0: ENDBR64 PUSH R13 PUSH R12 PUSH RBP MOV RBP,RSI PUSH RBX MOV RBX,RDI SUB RSP,0x8 CALL 0x00101060 MOV RDI,RBP MOV R12,RAX CALL 0x00101060 MOV ESI,EAX MOV EAX,R12D CDQ IDIV ESI XOR EAX,EAX TEST EDX,EDX JNZ 0x00101280 TEST R12D,R12D JLE 0x00101290 LEA EDI,[R12 + -0x1] XOR ECX,ECX JMP 0x0010126c LAB_00101260: LEA RAX...
int8 func0(char *param_1,char *param_2) { size_t sVar1; size_t sVar2; ulong uVar3; int iVar4; bool bVar5; sVar1 = strlen(param_1); sVar2 = strlen(param_2); iVar4 = (int)sVar1; if ((int)((long)((ulong)(uint)(iVar4 >> 0x1f) << 0x20 | sVar1 & 0xffffffff) % (long)(int)sVar2) != 0) { return 0...
7,392
func0
#include <stdio.h> #include <assert.h> #include <stdlib.h>
int func0(int test_list[][2], int len) { int* temp = (int*)malloc(sizeof(int) * len); for (int i = 0; i < len; i++) { temp[i] = abs(test_list[i][1] - test_list[i][0]); } int res = temp[0]; for (int i = 1; i < len; i++) { if (temp[i] < res) { res = temp[i]; ...
int main() { int arr1[][2] = {{3, 5}, {1, 7}, {10, 3}, {1, 2}}; int arr2[][2] = {{4, 6}, {12, 8}, {11, 4}, {2, 13}}; int arr3[][2] = {{5, 17}, {3, 9}, {12, 5}, {3, 24}}; assert(func0(arr1, 4) == 1); assert(func0(arr2, 4) == 2); assert(func0(arr3, 4) == 6); return 0; }
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,-0x8(%rbp) movl $0x0,-0x14(%rbp) jmp 122b <func0+0x82> mov -0x14(%rbp),%eax cltq lea 0x0(,%rax,8),%...
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_14], 0 jmp short loc_122C loc_11DA: mov eax, [rbp+var_14] cdqe lea rdx...
long long func0(long long a1, int a2) { int v2; // eax int i; // [rsp+1Ch] [rbp-14h] unsigned int v5; // [rsp+20h] [rbp-10h] int j; // [rsp+24h] [rbp-Ch] unsigned int *ptr; // [rsp+28h] [rbp-8h] ptr = (unsigned int *)malloc(4LL * a2); for ( i = 0; i < a2; ++i ) { v2 = *(_DWORD *)(8LL * i + a1 + 4)...
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 + -0x8],RAX MOV dword ptr [RBP + -0x14],0x0 JMP 0x0010122c LAB_001011da: MOV EAX,dword ptr [RBP + -0x14] CDQE L...
int func0(long param_1,int param_2) { int iVar1; int *__ptr; int local_1c; int local_18; int local_14; __ptr = (int *)malloc((long)param_2 << 2); for (local_1c = 0; local_1c < param_2; local_1c = local_1c + 1) { iVar1 = *(int *)(param_1 + (long)local_1c * 8 + 4) - *(int *)(param_1 + (long)local_1c...
7,393
func0
#include <stdio.h> #include <assert.h> #include <stdlib.h>
int func0(int test_list[][2], int len) { int* temp = (int*)malloc(sizeof(int) * len); for (int i = 0; i < len; i++) { temp[i] = abs(test_list[i][1] - test_list[i][0]); } int res = temp[0]; for (int i = 1; i < len; i++) { if (temp[i] < res) { res = temp[i]; ...
int main() { int arr1[][2] = {{3, 5}, {1, 7}, {10, 3}, {1, 2}}; int arr2[][2] = {{4, 6}, {12, 8}, {11, 4}, {2, 13}}; int arr3[][2] = {{5, 17}, {3, 9}, {12, 5}, {3, 24}}; assert(func0(arr1, 4) == 1); assert(func0(arr2, 4) == 2); assert(func0(arr3, 4) == 6); return 0; }
O1
c
func0: endbr64 push %rbp push %rbx sub $0x8,%rsp mov %rdi,%rbp mov %esi,%ebx movslq %esi,%rdi shl $0x2,%rdi callq 10b0 <malloc@plt> mov %rax,%rdi test %ebx,%ebx jle 11f4 <func0+0x4b> lea -0x1(%rbx),%esi mov $0x0,%edx mov 0x4(%rbp,%rdx,8),%ecx sub 0x0(%rbp,%rdx,8),%ecx mov %ecx,%e...
func0: endbr64 push rbp push rbx sub rsp, 8 mov rbp, rdi mov ebx, esi movsxd rdi, esi shl rdi, 2 call _malloc mov rdi, rax test ebx, ebx jle short loc_11ED mov eax, ebx mov edx, 0 loc_11D2: mov ecx, [rbp+rdx*8+4] sub ecx, [rbp+rdx*8+0] mov esi, ecx neg esi cm...
long long func0(long long a1, int a2) { unsigned int *v3; // rdi long long i; // rdx int v5; // ecx unsigned int v6; // ebp unsigned int *v7; // rdx v3 = (unsigned int *)malloc(4LL * a2); if ( a2 > 0 ) { for ( i = 0LL; i != a2; v3[i++] = v5 ) { v5 = *(_DWORD *)(a1 + 8 * i + 4) - *(_DWORD...
func0: ENDBR64 PUSH RBP PUSH RBX SUB RSP,0x8 MOV RBP,RDI MOV EBX,ESI MOVSXD RDI,ESI SHL RDI,0x2 CALL 0x001010b0 MOV RDI,RAX TEST EBX,EBX JLE 0x001011ed MOV EAX,EBX MOV EDX,0x0 LAB_001011d2: MOV ECX,dword ptr [RBP + RDX*0x8 + 0x4] SUB ECX,dword ptr [RBP + RDX*0x8] MOV ESI,ECX NEG ESI CMOVNS ECX,ESI MOV dword ptr [RDI + ...
int func0(long param_1,uint param_2) { int *__ptr; int iVar1; ulong uVar2; int *piVar3; __ptr = (int *)malloc((long)(int)param_2 << 2); if (0 < (int)param_2) { uVar2 = 0; do { iVar1 = *(int *)(param_1 + 4 + uVar2 * 8) - *(int *)(param_1 + uVar2 * 8); if (iVar1 < 1) { iVar1 = ...
7,394
func0
#include <stdio.h> #include <assert.h> #include <stdlib.h>
int func0(int test_list[][2], int len) { int* temp = (int*)malloc(sizeof(int) * len); for (int i = 0; i < len; i++) { temp[i] = abs(test_list[i][1] - test_list[i][0]); } int res = temp[0]; for (int i = 1; i < len; i++) { if (temp[i] < res) { res = temp[i]; ...
int main() { int arr1[][2] = {{3, 5}, {1, 7}, {10, 3}, {1, 2}}; int arr2[][2] = {{4, 6}, {12, 8}, {11, 4}, {2, 13}}; int arr3[][2] = {{5, 17}, {3, 9}, {12, 5}, {3, 24}}; assert(func0(arr1, 4) == 1); assert(func0(arr2, 4) == 2); assert(func0(arr3, 4) == 6); return 0; }
O2
c
func0: endbr64 push %r12 mov %rdi,%r12 movslq %esi,%rdi push %rbx mov %rdi,%rbx shl $0x2,%rdi sub $0x8,%rsp callq 10b0 <malloc@plt> mov %rax,%rdi test %ebx,%ebx jle 13c8 <func0+0x98> lea -0x1(%rbx),%r8d xor %edx,%edx nopw 0x0(%rax,%rax,1) mov 0x4(%r12,%rdx,8),%ecx sub (%r12,%rdx,8...
func0: endbr64 push r12 mov r12, rdi push rbp push rbx movsxd rbx, esi lea rdi, ds:0[rbx*4] call _malloc mov rdi, rax test ebx, ebx jle short loc_13C0 mov rbp, rbx xor edx, edx nop word ptr [rax+rax+00000000h] loc_1360: mov ecx, [r12+rdx*8+4] sub ecx, [r12+rdx*8] mov ...
long long func0(long long a1, int a2) { _DWORD *v3; // rax _DWORD *v4; // rdi long long i; // rdx int v6; // ecx unsigned int v7; // r12d unsigned int *v8; // rdx long long v9; // rax unsigned int v11; // r12d v3 = (_DWORD *)malloc(4LL * a2); v4 = v3; if ( a2 <= 0 ) { v11 = *v3; free(v...
func0: ENDBR64 PUSH R12 MOV R12,RDI PUSH RBP PUSH RBX MOVSXD RBX,ESI LEA RDI,[RBX*0x4] CALL 0x001010b0 MOV RDI,RAX TEST EBX,EBX JLE 0x001013c0 MOV RBP,RBX XOR EDX,EDX NOP word ptr [RAX + RAX*0x1] LAB_00101360: MOV ECX,dword ptr [R12 + RDX*0x8 + 0x4] SUB ECX,dword ptr [R12 + RDX*0x8] MOV R8D,ECX NEG R8D CMOVNS ECX,R8D M...
int func0(long param_1,int param_2) { int *__ptr; int iVar1; long lVar2; int *piVar3; __ptr = (int *)malloc((long)param_2 * 4); if (0 < param_2) { lVar2 = 0; do { iVar1 = *(int *)(param_1 + 4 + lVar2 * 8) - *(int *)(param_1 + lVar2 * 8); if (iVar1 < 1) { iVar1 = -iVar1; ...
7,395
func0
#include <stdio.h> #include <assert.h> #include <stdlib.h>
int func0(int test_list[][2], int len) { int* temp = (int*)malloc(sizeof(int) * len); for (int i = 0; i < len; i++) { temp[i] = abs(test_list[i][1] - test_list[i][0]); } int res = temp[0]; for (int i = 1; i < len; i++) { if (temp[i] < res) { res = temp[i]; ...
int main() { int arr1[][2] = {{3, 5}, {1, 7}, {10, 3}, {1, 2}}; int arr2[][2] = {{4, 6}, {12, 8}, {11, 4}, {2, 13}}; int arr3[][2] = {{5, 17}, {3, 9}, {12, 5}, {3, 24}}; assert(func0(arr1, 4) == 1); assert(func0(arr2, 4) == 2); assert(func0(arr3, 4) == 6); return 0; }
O3
c
func0: endbr64 push %r12 mov %rdi,%r12 movslq %esi,%rdi push %rbx mov %rdi,%rbx shl $0x2,%rdi sub $0x8,%rsp callq 10b0 <malloc@plt> mov %rax,%rdi test %ebx,%ebx jle 14a0 <func0+0x1d0> lea -0x1(%rbx),%ecx cmp $0x2,%ecx jbe 14b3 <func0+0x1e3> mov %ebx,%eax xor %edx,%edx shr $0x2...
func0: endbr64 push rbp push rbx mov rbx, rdi movsxd rdi, esi mov rbp, rdi shl rdi, 2; size sub rsp, 8 call _malloc mov rdi, rax; ptr test ebp, ebp jle loc_14A0 lea ecx, [rbp-1] cmp ecx, 2 jbe loc_14B0 mov edx, ebp xor eax, eax shr edx, 2 shl rdx, 4 xchg ...
long long func0(long long a1, int a2) { signed int *v3; // rax signed int *v4; // rdi unsigned int v5; // ecx unsigned long long v6; // rax __m128 v7; // xmm3 __m128 v8; // xmm0 __m128i v9; // xmm0 __m128i v10; // xmm1 int v11; // edx long long v12; // r10 long long v13; // r8 int v14; // eax ...
func0: ENDBR64 PUSH RBP PUSH RBX MOV RBX,RDI MOVSXD RDI,ESI MOV RBP,RDI SHL RDI,0x2 SUB RSP,0x8 CALL 0x001010b0 MOV RDI,RAX TEST EBP,EBP JLE 0x001014a0 LEA ECX,[RBP + -0x1] CMP ECX,0x2 JBE 0x001014b0 MOV EDX,EBP XOR EAX,EAX SHR EDX,0x2 SHL RDX,0x4 NOP LAB_00101310: MOVDQU XMM1,xmmword ptr [RBX + RAX*0x2] MOVDQU XMM3,xm...
uint func0(long param_1,uint param_2) { uint *puVar1; uint *puVar2; int *piVar3; int *piVar4; int iVar5; int iVar6; int iVar7; int iVar8; int iVar9; uint *puVar10; uint *puVar11; uint *puVar12; uint *puVar13; uint *puVar14; uint *puVar15; int iVar16; uint *__ptr; long lVar17; uint...
7,396
func0
#include <assert.h>
int func0(int x, int y) { int z; if (x > y) { z = x; } else { z = y; } while (1) { if ((z % x == 0) && (z % y == 0)) { return z; } z += 1; } }
int main() { assert(func0(4, 6) == 12); assert(func0(15, 17) == 255); assert(func0(2, 6) == 6); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x14(%rbp) mov %esi,-0x18(%rbp) mov -0x14(%rbp),%eax cmp -0x18(%rbp),%eax jle 1167 <func0+0x1e> mov -0x14(%rbp),%eax mov %eax,-0x4(%rbp) jmp 116d <func0+0x24> mov -0x18(%rbp),%eax mov %eax,-0x4(%rbp) mov -0x4(%rbp),%eax cltd idivl -...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_14], edi mov [rbp+var_18], esi mov eax, [rbp+var_14] cmp eax, [rbp+var_18] jle short loc_1167 mov eax, [rbp+var_14] mov [rbp+var_4], eax jmp short loc_116D loc_1167: mov eax, [rbp+var_18] mov [rbp+var_4], eax loc_116D: mov ...
long long func0(signed int a1, signed int a2) { signed int v3; // [rsp+14h] [rbp-4h] if ( a1 <= a2 ) v3 = a2; else v3 = a1; while ( v3 % a1 || v3 % a2 ) ++v3; return (unsigned int)v3; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x14],EDI MOV dword ptr [RBP + -0x18],ESI MOV EAX,dword ptr [RBP + -0x14] CMP EAX,dword ptr [RBP + -0x18] JLE 0x00101167 MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x4],EAX JMP 0x0010116d LAB_00101167: MOV EAX,dword ptr [RBP + -0x18] MOV dword ptr [RB...
int func0(int param_1,int param_2) { int local_c; local_c = param_2; if (param_2 < param_1) { local_c = param_1; } for (; (local_c % param_1 != 0 || (local_c % param_2 != 0)); local_c = local_c + 1) { } return local_c; }
7,397
func0
#include <assert.h>
int func0(int x, int y) { int z; if (x > y) { z = x; } else { z = y; } while (1) { if ((z % x == 0) && (z % y == 0)) { return z; } z += 1; } }
int main() { assert(func0(4, 6) == 12); assert(func0(15, 17) == 255); assert(func0(2, 6) == 6); return 0; }
O1
c
func0: endbr64 cmp %esi,%edi mov %esi,%ecx cmovge %edi,%ecx jmp 1159 <func0+0x10> add $0x1,%ecx mov %ecx,%eax cltd idiv %edi test %edx,%edx jne 1156 <func0+0xd> mov %ecx,%eax cltd idiv %esi test %edx,%edx jne 1156 <func0+0xd> mov %ecx,%eax retq
func0: endbr64 cmp edi, esi mov ecx, esi cmovge ecx, edi jmp short loc_1159 loc_1156: add ecx, 1 loc_1159: mov eax, ecx cdq idiv edi test edx, edx jnz short loc_1156 mov eax, ecx cdq idiv esi test edx, edx jnz short loc_1156 mov eax, ecx retn
long long func0(signed int a1, signed int a2) { signed int v2; // ecx v2 = a2; if ( a1 >= a2 ) v2 = a1; while ( v2 % a1 || v2 % a2 ) ++v2; return (unsigned int)v2; }
func0: ENDBR64 CMP EDI,ESI MOV ECX,ESI CMOVGE ECX,EDI JMP 0x00101159 LAB_00101156: ADD ECX,0x1 LAB_00101159: MOV EAX,ECX CDQ IDIV EDI TEST EDX,EDX JNZ 0x00101156 MOV EAX,ECX CDQ IDIV ESI TEST EDX,EDX JNZ 0x00101156 MOV EAX,ECX RET
int func0(int param_1,int param_2) { int iVar1; iVar1 = param_2; if (param_2 <= param_1) { iVar1 = param_1; } for (; (iVar1 % param_1 != 0 || (iVar1 % param_2 != 0)); iVar1 = iVar1 + 1) { } return iVar1; }
7,398
func0
#include <assert.h>
int func0(int x, int y) { int z; if (x > y) { z = x; } else { z = y; } while (1) { if ((z % x == 0) && (z % y == 0)) { return z; } z += 1; } }
int main() { assert(func0(4, 6) == 12); assert(func0(15, 17) == 255); assert(func0(2, 6) == 6); return 0; }
O2
c
func0: endbr64 cmp %esi,%edi mov %esi,%r8d cmovge %edi,%r8d jmp 1244 <func0+0x14> add $0x1,%r8d mov %r8d,%eax cltd idiv %edi test %edx,%edx jne 1240 <func0+0x10> mov %r8d,%eax cltd idiv %esi test %edx,%edx jne 1240 <func0+0x10> mov %r8d,%eax retq nopl 0x0(%rax)
func0: endbr64 cmp edi, esi mov r8d, esi cmovge r8d, edi jmp short loc_1214 loc_1210: add r8d, 1 loc_1214: mov eax, r8d cdq idiv edi test edx, edx jnz short loc_1210 mov eax, r8d cdq idiv esi test edx, edx jnz short loc_1210 mov eax, r8d retn
long long func0(signed int a1, signed int a2) { signed int v2; // r8d v2 = a2; if ( a1 >= a2 ) v2 = a1; while ( v2 % a1 || v2 % a2 ) ++v2; return (unsigned int)v2; }
func0: ENDBR64 CMP EDI,ESI MOV R8D,ESI CMOVGE R8D,EDI JMP 0x00101214 LAB_00101210: ADD R8D,0x1 LAB_00101214: MOV EAX,R8D CDQ IDIV EDI TEST EDX,EDX JNZ 0x00101210 MOV EAX,R8D CDQ IDIV ESI TEST EDX,EDX JNZ 0x00101210 MOV EAX,R8D RET
int func0(int param_1,int param_2) { int iVar1; iVar1 = param_2; if (param_2 <= param_1) { iVar1 = param_1; } for (; (iVar1 % param_1 != 0 || (iVar1 % param_2 != 0)); iVar1 = iVar1 + 1) { } return iVar1; }
7,399
func0
#include <assert.h>
int func0(int x, int y) { int z; if (x > y) { z = x; } else { z = y; } while (1) { if ((z % x == 0) && (z % y == 0)) { return z; } z += 1; } }
int main() { assert(func0(4, 6) == 12); assert(func0(15, 17) == 255); assert(func0(2, 6) == 6); return 0; }
O3
c
func0: endbr64 cmp %esi,%edi mov %esi,%r8d cmovge %edi,%r8d jmp 1244 <func0+0x14> add $0x1,%r8d mov %r8d,%eax cltd idiv %edi test %edx,%edx jne 1240 <func0+0x10> mov %r8d,%eax cltd idiv %esi test %edx,%edx jne 1240 <func0+0x10> mov %r8d,%eax retq nopl 0x0(%rax)
func0: endbr64 cmp edi, esi mov ecx, esi cmovge ecx, edi jmp short loc_1233 loc_1230: add ecx, 1 loc_1233: mov eax, ecx cdq idiv edi test edx, edx jnz short loc_1230 mov eax, ecx cdq idiv esi test edx, edx jnz short loc_1230 mov eax, ecx retn
long long func0(signed int a1, signed int a2) { signed int v2; // ecx v2 = a2; if ( a1 >= a2 ) v2 = a1; while ( v2 % a1 || v2 % a2 ) ++v2; return (unsigned int)v2; }
func0: ENDBR64 CMP EDI,ESI MOV ECX,ESI CMOVGE ECX,EDI JMP 0x00101233 LAB_00101230: ADD ECX,0x1 LAB_00101233: MOV EAX,ECX CDQ IDIV EDI TEST EDX,EDX JNZ 0x00101230 MOV EAX,ECX CDQ IDIV ESI TEST EDX,EDX JNZ 0x00101230 MOV EAX,ECX RET
int func0(int param_1,int param_2) { int iVar1; iVar1 = param_2; if (param_2 <= param_1) { iVar1 = param_1; } for (; (iVar1 % param_1 != 0 || (iVar1 % param_2 != 0)); iVar1 = iVar1 + 1) { } return iVar1; }
7,400
func0
#include <stdio.h> #include <string.h> #include <assert.h>
void func0(char *str) { int n = strlen(str); char temp; for (int i = 0; i < n-1; i++) { for (int j = i+1; j < n; j++) { if (str[i] > str[j]) { temp = str[i]; str[i] = str[j]; str[j] = temp; } } } }
int main() { char str1[] = "cba"; char str2[] = "data"; char str3[] = "zxy"; func0(str1); func0(str2); func0(str3); assert(strcmp(str1, "abc") == 0); assert(strcmp(str2, "aadt") == 0); assert(strcmp(str3, "xyz") == 0); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x20,%rsp mov %rdi,-0x18(%rbp) mov -0x18(%rbp),%rax mov %rax,%rdi callq 1080 <strlen@plt> mov %eax,-0x4(%rbp) movl $0x0,-0xc(%rbp) jmpq 1258 <func0+0xaf> mov -0xc(%rbp),%eax add $0x1,%eax mov %eax,-0x8(%rbp) jmp 124c <func0+0xa3> mov -0...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 20h mov [rbp+s], rdi mov rax, [rbp+s] mov rdi, rax; s call _strlen mov [rbp+var_4], eax mov [rbp+var_C], 0 jmp loc_1258 loc_11D4: mov eax, [rbp+var_C] add eax, 1 mov [rbp+var_8], eax jmp short loc_124C loc_11DF: mov ...
long long func0(const char *a1) { long long result; // rax char v2; // [rsp+13h] [rbp-Dh] int i; // [rsp+14h] [rbp-Ch] int j; // [rsp+18h] [rbp-8h] int v5; // [rsp+1Ch] [rbp-4h] v5 = strlen(a1); for ( i = 0; ; ++i ) { result = (unsigned int)(v5 - 1); if ( i >= (int)result ) break; fo...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x18],RDI MOV RAX,qword ptr [RBP + -0x18] MOV RDI,RAX CALL 0x00101080 MOV dword ptr [RBP + -0x4],EAX MOV dword ptr [RBP + -0xc],0x0 JMP 0x00101258 LAB_001011d4: MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0x1 MOV dword ptr [RBP + -0x8],EAX JMP 0x0010124c...
void func0(char *param_1) { char cVar1; size_t sVar2; int local_14; int local_10; sVar2 = strlen(param_1); for (local_14 = 0; local_10 = local_14, local_14 < (int)sVar2 + -1; local_14 = local_14 + 1) { while (local_10 = local_10 + 1, local_10 < (int)sVar2) { if (param_1[local_10] < param_1[loc...
7,401
func0
#include <stdio.h> #include <string.h> #include <assert.h>
void func0(char *str) { int n = strlen(str); char temp; for (int i = 0; i < n-1; i++) { for (int j = i+1; j < n; j++) { if (str[i] > str[j]) { temp = str[i]; str[i] = str[j]; str[j] = temp; } } } }
int main() { char str1[] = "cba"; char str2[] = "data"; char str3[] = "zxy"; func0(str1); func0(str2); func0(str3); assert(strcmp(str1, "abc") == 0); assert(strcmp(str2, "aadt") == 0); assert(strcmp(str3, "xyz") == 0); return 0; }
O1
c
func0: endbr64 mov %rdi,%r8 mov $0xffffffffffffffff,%rcx mov $0x0,%eax repnz scas %es:(%rdi),%al mov %rcx,%rax not %rax sub $0x1,%rax mov %eax,%edi cmp $0x1,%eax jle 11d5 <func0+0x6c> mov %r8,%rsi lea -0x2(%rax),%r10d add $0x2,%r10 mov $0x1,%r9d jmp 11cb <func0+0x62> add $0x...
func0: endbr64 push rbx mov rbx, rdi call _strlen cmp eax, 1 jle short loc_1209 mov r10d, eax mov rdi, rbx lea r9d, [rax-1] mov r8d, 0 jmp short loc_11EF loc_11CD: add rax, 1 cmp rax, rsi jz short loc_11E6 loc_11D6: movzx edx, byte ptr [rdi] movzx ecx, byte ptr [ra...
char * func0(char *a1) { char *result; // rax int v2; // r10d int v3; // r9d int v4; // r8d char v5; // dl result = (char *)strlen(); if ( (int)result > 1 ) { v2 = (int)result; v3 = (_DWORD)result - 1; v4 = 0; do { if ( v2 > ++v4 ) { result = a1 + 1; do ...
func0: ENDBR64 PUSH RBX MOV RBX,RDI CALL 0x00101080 CMP EAX,0x1 JLE 0x00101209 MOV R10D,EAX MOV RDI,RBX LEA R9D,[RAX + -0x1] MOV R8D,0x0 JMP 0x001011ef LAB_001011cd: ADD RAX,0x1 CMP RAX,RSI JZ 0x001011e6 LAB_001011d6: MOVZX EDX,byte ptr [RDI] MOVZX ECX,byte ptr [RAX] CMP DL,CL JLE 0x001011cd MOV byte ptr [RDI],CL MOV b...
void func0(char *param_1) { char cVar1; int iVar2; size_t sVar3; char *pcVar4; int iVar5; sVar3 = strlen(param_1); iVar2 = (int)sVar3; if (1 < iVar2) { iVar5 = 0; do { iVar5 = iVar5 + 1; if (iVar5 < iVar2) { pcVar4 = param_1 + 1; do { cVar1 = *param_1; ...
7,402
func0
#include <stdio.h> #include <string.h> #include <assert.h>
void func0(char *str) { int n = strlen(str); char temp; for (int i = 0; i < n-1; i++) { for (int j = i+1; j < n; j++) { if (str[i] > str[j]) { temp = str[i]; str[i] = str[j]; str[j] = temp; } } } }
int main() { char str1[] = "cba"; char str2[] = "data"; char str3[] = "zxy"; func0(str1); func0(str2); func0(str3); assert(strcmp(str1, "abc") == 0); assert(strcmp(str2, "aadt") == 0); assert(strcmp(str3, "xyz") == 0); return 0; }
O2
c
func0: endbr64 push %rbx mov %rdi,%rbx callq 1070 <strlen@plt> cmp $0x1,%eax jle 131f <func0+0x5f> mov %eax,%r11d mov %rbx,%rdi lea -0x1(%rax),%r10d xor %r8d,%r8d add $0x1,%r8d lea 0x1(%rdi),%r9 cmp %r8d,%r11d jle 1317 <func0+0x57> mov %r10d,%edx mov %r9,%rax sub %r8d,%edx l...
func0: endbr64 push rbx mov rbx, rdi call _strlen cmp eax, 1 jle short loc_132F mov r11d, eax mov rdi, rbx lea r10d, [rax-1] xor r8d, r8d nop loc_12F0: add r8d, 1 lea r9, [rdi+1] cmp r11d, r8d jle short loc_1327 mov edx, r10d mov rax, r9 sub edx, r8d lea ...
char * func0(char *a1) { char *result; // rax int v2; // r11d int v3; // r10d int v4; // r8d char v5; // dl result = (char *)strlen(); if ( (int)result > 1 ) { v2 = (int)result; v3 = (_DWORD)result - 1; v4 = 0; do { if ( v2 > ++v4 ) { result = a1 + 1; do ...
func0: ENDBR64 PUSH RBX MOV RBX,RDI CALL 0x00101080 CMP EAX,0x1 JLE 0x0010132f MOV R11D,EAX MOV RDI,RBX LEA R10D,[RAX + -0x1] XOR R8D,R8D NOP LAB_001012f0: ADD R8D,0x1 LEA R9,[RDI + 0x1] CMP R11D,R8D JLE 0x00101327 MOV EDX,R10D MOV RAX,R9 SUB EDX,R8D LEA RSI,[RDI + RDX*0x1 + 0x2] NOP dword ptr [RAX + RAX*0x1] LAB_00101...
void func0(char *param_1) { char cVar1; int iVar2; size_t sVar3; char *pcVar4; int iVar5; sVar3 = strlen(param_1); iVar2 = (int)sVar3; if (1 < iVar2) { iVar5 = 0; do { iVar5 = iVar5 + 1; if (iVar5 < iVar2) { pcVar4 = param_1 + 1; do { cVar1 = *param_1; ...
7,403
func0
#include <stdio.h> #include <string.h> #include <assert.h>
void func0(char *str) { int n = strlen(str); char temp; for (int i = 0; i < n-1; i++) { for (int j = i+1; j < n; j++) { if (str[i] > str[j]) { temp = str[i]; str[i] = str[j]; str[j] = temp; } } } }
int main() { char str1[] = "cba"; char str2[] = "data"; char str3[] = "zxy"; func0(str1); func0(str2); func0(str3); assert(strcmp(str1, "abc") == 0); assert(strcmp(str2, "aadt") == 0); assert(strcmp(str3, "xyz") == 0); return 0; }
O3
c
func0: endbr64 push %rbx mov %rdi,%rbx callq 1070 <strlen@plt> cmp $0x1,%eax jle 131f <func0+0x5f> mov %eax,%r11d mov %rbx,%rdi lea -0x1(%rax),%r10d xor %r8d,%r8d add $0x1,%r8d lea 0x1(%rdi),%r9 cmp %r8d,%r11d jle 1317 <func0+0x57> mov %r10d,%edx mov %r9,%rax sub %r8d,%edx l...
func0: endbr64 push rbx mov rbx, rdi call _strlen cmp eax, 1 jle short loc_132F mov r11d, eax mov rdi, rbx lea r10d, [rax-1] xor r8d, r8d nop loc_12F0: add r8d, 1 lea r9, [rdi+1] cmp r11d, r8d jle short loc_1327 mov edx, r10d mov rax, r9 sub edx, r8d lea ...
char * func0(char *a1) { char *result; // rax int v2; // r11d int v3; // r10d int v4; // r8d char v5; // dl result = (char *)strlen(a1); if ( (int)result > 1 ) { v2 = (int)result; v3 = (_DWORD)result - 1; v4 = 0; do { if ( v2 > ++v4 ) { result = a1 + 1; d...
func0: ENDBR64 PUSH RBX MOV RBX,RDI CALL 0x00101080 CMP EAX,0x1 JLE 0x0010132f MOV R11D,EAX MOV RDI,RBX LEA R10D,[RAX + -0x1] XOR R8D,R8D NOP LAB_001012f0: ADD R8D,0x1 LEA R9,[RDI + 0x1] CMP R11D,R8D JLE 0x00101327 MOV EDX,R10D MOV RAX,R9 SUB EDX,R8D LEA RSI,[RDI + RDX*0x1 + 0x2] NOP dword ptr [RAX + RAX*0x1] LAB_00101...
void func0(char *param_1) { char cVar1; int iVar2; size_t sVar3; char *pcVar4; int iVar5; sVar3 = strlen(param_1); iVar2 = (int)sVar3; if (1 < iVar2) { iVar5 = 0; do { iVar5 = iVar5 + 1; if (iVar5 < iVar2) { pcVar4 = param_1 + 1; do { cVar1 = *param_1; ...
7,404
func0
#include <stdbool.h> #include <assert.h>
bool func0(int test_tuple[], int tuple_size, int K[], int K_size) { for (int i = 0; i < tuple_size; i++) { bool found = false; for (int j = 0; j < K_size; j++) { if (test_tuple[i] == K[j]) { found = true; break; } } if ...
int main() { int tuple1[] = {3, 5, 6, 5, 3, 6}; int K1[] = {3, 6, 5}; assert(func0(tuple1, 6, K1, 3) == true); int tuple2[] = {4, 5, 6, 4, 6, 5}; int K2[] = {4, 5, 6}; assert(func0(tuple2, 6, K2, 3) == true); int tuple3[] = {9, 8, 7, 6, 8, 9}; int K3[] = {9, 8, 1}; asser...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) mov %rdx,-0x28(%rbp) mov %ecx,-0x20(%rbp) movl $0x0,-0x8(%rbp) jmp 11ed <func0+0x84> movb $0x0,-0x9(%rbp) movl $0x0,-0x4(%rbp) jmp 11cf <func0+0x66> mov -0x8(%rbp),%eax cltq lea 0x0(,%rax,4),%rdx mov -...
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_20], ecx mov [rbp+var_8], 0 jmp short loc_11ED loc_1188: mov [rbp+var_9], 0 mov [rbp+var_4], 0 jmp short loc_11CF loc_1195: mov eax, [rbp+var_8] cdqe lea ...
long long func0(long long a1, int a2, long long a3, int a4) { char v5; // [rsp+1Fh] [rbp-9h] int i; // [rsp+20h] [rbp-8h] int j; // [rsp+24h] [rbp-4h] for ( i = 0; i < a2; ++i ) { v5 = 0; for ( j = 0; j < a4; ++j ) { if ( *(_DWORD *)(4LL * i + a1) == *(_DWORD *)(4LL * j + a3) ) { ...
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 + -0x20],ECX MOV dword ptr [RBP + -0x8],0x0 JMP 0x001011ed LAB_00101188: MOV byte ptr [RBP + -0x9],0x0 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001011cf LAB_00101195: MOV EA...
int8 func0(long param_1,int param_2,long param_3,int param_4) { bool bVar1; int local_10; int local_c; local_10 = 0; do { if (param_2 <= local_10) { return 1; } bVar1 = false; for (local_c = 0; local_c < param_4; local_c = local_c + 1) { if (*(int *)(param_1 + (long)local_10 * ...
7,405
func0
#include <stdbool.h> #include <assert.h>
bool func0(int test_tuple[], int tuple_size, int K[], int K_size) { for (int i = 0; i < tuple_size; i++) { bool found = false; for (int j = 0; j < K_size; j++) { if (test_tuple[i] == K[j]) { found = true; break; } } if ...
int main() { int tuple1[] = {3, 5, 6, 5, 3, 6}; int K1[] = {3, 6, 5}; assert(func0(tuple1, 6, K1, 3) == true); int tuple2[] = {4, 5, 6, 4, 6, 5}; int K2[] = {4, 5, 6}; assert(func0(tuple2, 6, K2, 3) == true); int tuple3[] = {9, 8, 7, 6, 8, 9}; int K3[] = {9, 8, 1}; asser...
O1
c
func0: endbr64 test %esi,%esi jle 1189 <func0+0x20> mov %rdi,%r8 lea -0x1(%rsi),%eax lea 0x4(%rdi,%rax,4),%r9 mov %rdx,%rdi lea -0x1(%rcx),%eax lea 0x4(%rdx,%rax,4),%rsi jmp 119e <func0+0x35> mov $0x1,%eax retq mov $0x0,%eax retq add $0x4,%r8 cmp %r9,%r8 je 11bb <func0+0x52> te...
func0: endbr64 test esi, esi jle short loc_1186 mov r8, rdi lea eax, [rsi-1] lea r9, [rdi+rax*4+4] lea eax, [rcx-1] lea rdi, [rdx+rax*4+4] jmp short loc_119B loc_1186: mov eax, 1 retn loc_118C: mov eax, 0 retn loc_1192: add r8, 4 cmp r8, r9 jz short loc_11B8 loc_119B:...
long long func0(_DWORD *a1, int a2, _DWORD *a3, int a4) { _DWORD *v4; // r8 _DWORD *v6; // rax if ( a2 <= 0 ) return 1LL; v4 = a1; while ( 2 ) { if ( a4 <= 0 ) return 0LL; v6 = a3; while ( *v4 != *v6 ) { if ( ++v6 == &a3[a4 - 1 + 1] ) return 0LL; } if ( ++v4...
func0: ENDBR64 TEST ESI,ESI JLE 0x00101186 MOV R8,RDI LEA EAX,[RSI + -0x1] LEA R9,[RDI + RAX*0x4 + 0x4] LEA EAX,[RCX + -0x1] LEA RDI,[RDX + RAX*0x4 + 0x4] JMP 0x0010119b LAB_00101186: MOV EAX,0x1 RET LAB_0010118c: MOV EAX,0x0 RET LAB_00101192: ADD R8,0x4 CMP R8,R9 JZ 0x001011b8 LAB_0010119b: TEST ECX,ECX JLE 0x0010118c...
int8 func0(int *param_1,int param_2,int *param_3,int param_4) { int *piVar1; int *piVar2; if (param_2 < 1) { return 1; } piVar1 = param_1 + (ulong)(param_2 - 1) + 1; do { if (param_4 < 1) { return 0; } piVar2 = param_3; while (*param_1 != *piVar2) { piVar2 = piVar2 + 1; ...
7,406
func0
#include <stdbool.h> #include <assert.h>
bool func0(int test_tuple[], int tuple_size, int K[], int K_size) { for (int i = 0; i < tuple_size; i++) { bool found = false; for (int j = 0; j < K_size; j++) { if (test_tuple[i] == K[j]) { found = true; break; } } if ...
int main() { int tuple1[] = {3, 5, 6, 5, 3, 6}; int K1[] = {3, 6, 5}; assert(func0(tuple1, 6, K1, 3) == true); int tuple2[] = {4, 5, 6, 4, 6, 5}; int K2[] = {4, 5, 6}; assert(func0(tuple2, 6, K2, 3) == true); int tuple3[] = {9, 8, 7, 6, 8, 9}; int K3[] = {9, 8, 1}; asser...
O2
c
func0: endbr64 test %esi,%esi jle 1336 <func0+0x46> lea -0x1(%rsi),%eax mov %rdi,%r8 lea 0x4(%rdi,%rax,4),%r9 lea -0x1(%rcx),%eax lea 0x4(%rdx,%rax,4),%rdi nopl 0x0(%rax,%rax,1) test %ecx,%ecx jle 1340 <func0+0x50> mov (%r8),%esi mov %rdx,%rax jmp 1329 <func0+0x39> nopl 0x0(%rax) a...
func0: endbr64 test esi, esi jle short loc_1366 lea eax, [rsi-1] lea r9, [rdi+rax*4+4] lea eax, [rcx-1] lea r8, [rdx+rax*4+4] nop dword ptr [rax+rax+00000000h] loc_1340: test ecx, ecx jle short loc_1370 mov esi, [rdi] mov rax, rdx jmp short loc_1359 loc_1350: add rax, 4...
long long func0(_DWORD *a1, int a2, _DWORD *a3, int a4) { long long v4; // r9 _DWORD *v5; // rax if ( a2 <= 0 ) return 1LL; v4 = (long long)&a1[a2 - 1 + 1]; while ( a4 > 0 ) { v5 = a3; while ( *a1 != *v5 ) { if ( ++v5 == &a3[a4 - 1 + 1] ) return 0LL; } if ( ++a1 == (_...
func0: ENDBR64 TEST ESI,ESI JLE 0x00101366 LEA EAX,[RSI + -0x1] LEA R9,[RDI + RAX*0x4 + 0x4] LEA EAX,[RCX + -0x1] LEA R8,[RDX + RAX*0x4 + 0x4] NOP dword ptr [RAX + RAX*0x1] LAB_00101340: TEST ECX,ECX JLE 0x00101370 MOV ESI,dword ptr [RDI] MOV RAX,RDX JMP 0x00101359 LAB_00101350: ADD RAX,0x4 CMP RAX,R8 JZ 0x00101370 LAB...
int8 func0(int *param_1,int param_2,int *param_3,int param_4) { int *piVar1; int *piVar2; if (0 < param_2) { piVar1 = param_1 + (ulong)(param_2 - 1) + 1; do { if (param_4 < 1) { return 0; } piVar2 = param_3; while (*param_1 != *piVar2) { piVar2 = piVar2 + 1; ...
7,407
func0
#include <stdbool.h> #include <assert.h>
bool func0(int test_tuple[], int tuple_size, int K[], int K_size) { for (int i = 0; i < tuple_size; i++) { bool found = false; for (int j = 0; j < K_size; j++) { if (test_tuple[i] == K[j]) { found = true; break; } } if ...
int main() { int tuple1[] = {3, 5, 6, 5, 3, 6}; int K1[] = {3, 6, 5}; assert(func0(tuple1, 6, K1, 3) == true); int tuple2[] = {4, 5, 6, 4, 6, 5}; int K2[] = {4, 5, 6}; assert(func0(tuple2, 6, K2, 3) == true); int tuple3[] = {9, 8, 7, 6, 8, 9}; int K3[] = {9, 8, 1}; asser...
O3
c
func0: endbr64 test %esi,%esi jle 12f6 <func0+0x46> lea -0x1(%rsi),%eax mov %rdi,%r8 lea 0x4(%rdi,%rax,4),%r9 lea -0x1(%rcx),%eax lea 0x4(%rdx,%rax,4),%rdi nopl 0x0(%rax,%rax,1) test %ecx,%ecx jle 1300 <func0+0x50> mov (%r8),%esi mov %rdx,%rax jmp 12e9 <func0+0x39> nopl 0x0(%rax) a...
func0: endbr64 test esi, esi jle short loc_1186 movsxd rsi, esi movsxd rax, ecx lea r8, [rdi+rsi*4] lea rsi, [rdx+rax*4] test ecx, ecx jle short loc_1190 nop word ptr [rax+rax+00h] loc_1160: mov ecx, [rdi] mov rax, rdx jmp short loc_1179 loc_1170: add rax, 4 cmp rsi, rax ...
long long func0(_DWORD *a1, int a2, _DWORD *a3, int a4) { _DWORD *v4; // r8 _DWORD *v5; // rax if ( a2 <= 0 ) return 1LL; v4 = &a1[a2]; if ( a4 > 0 ) { do { v5 = a3; while ( *a1 != *v5 ) { if ( &a3[a4] == ++v5 ) return 0LL; } ++a1; } whil...
func0: ENDBR64 TEST ESI,ESI JLE 0x00101186 MOVSXD RSI,ESI MOVSXD RAX,ECX LEA R8,[RDI + RSI*0x4] LEA RSI,[RDX + RAX*0x4] TEST ECX,ECX JLE 0x00101190 NOP word ptr [RAX + RAX*0x1] LAB_00101160: MOV ECX,dword ptr [RDI] MOV RAX,RDX JMP 0x00101179 LAB_00101170: ADD RAX,0x4 CMP RSI,RAX JZ 0x00101190 LAB_00101179: CMP ECX,dwor...
int8 func0(int *param_1,int param_2,int *param_3,int param_4) { int *piVar1; int *piVar2; if (0 < param_2) { piVar1 = param_1 + param_2; if (param_4 < 1) { return 0; } do { piVar2 = param_3; while (*param_1 != *piVar2) { piVar2 = piVar2 + 1; if (param_3 + para...
7,408
func0
#include <stdio.h> #include <assert.h> #include <regex.h> #include <string.h>
char* func0(const char *text) { regex_t regex; int result; char *pattern = "a.*?b$"; // Compile the regular expression result = regcomp(&regex, pattern, REG_EXTENDED); if (result) { return ("Regex compilation failed."); } // Execute the regular expression resu...
int main() { assert(strcmp(func0("aabbbbd"), "Not matched!") == 0); assert(strcmp(func0("aabAbbbc"), "Not matched!") == 0); assert(strcmp(func0("accddbbjjjb"), "Found a match!") == 0); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x70,%rsp mov %rdi,-0x68(%rbp) mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax lea 0xe19(%rip),%rax mov %rax,-0x58(%rbp) mov -0x58(%rbp),%rcx lea -0x50(%rbp),%rax mov $0x1,%edx mov %rcx,%rsi mov %rax,%rdi callq 10b0 <regcomp@plt> ...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 70h mov [rbp+string], rdi mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax lea rax, aAB; "a.*?b$" mov [rbp+pattern], rax mov rcx, [rbp+pattern] lea rax, [rbp+preg] mov edx, 1; cflags mov rsi, rcx; pattern mov rdi, rax;...
const char * func0(const char *a1) { int v2; // [rsp+14h] [rbp-5Ch] regex_t preg; // [rsp+20h] [rbp-50h] BYREF unsigned long long v4; // [rsp+68h] [rbp-8h] v4 = __readfsqword(0x28u); if ( regcomp(&preg, "a.*?b$", 1) ) return "Regex compilation failed."; v2 = regexec(&preg, a1, 0LL, 0LL, 0); if ( !v2 ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x68],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX LEA RAX,[0x102008] MOV qword ptr [RBP + -0x58],RAX MOV RCX,qword ptr [RBP + -0x58] LEA RAX,[RBP + -0x50] MOV EDX,0x1 MOV RSI,RCX MOV RDI,RAX CALL 0x001010b0 MOV dword p...
char * func0(char *param_1) { int iVar1; char *pcVar2; long in_FS_OFFSET; regex_t local_58; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); iVar1 = regcomp(&local_58,"a.*?b$",1); if (iVar1 == 0) { iVar1 = regexec(&local_58,param_1,0,(regmatch_t *)0x0,0); if (iVar1 == 0) { pcV...
7,409
func0
#include <stdio.h> #include <assert.h> #include <regex.h> #include <string.h>
char* func0(const char *text) { regex_t regex; int result; char *pattern = "a.*?b$"; // Compile the regular expression result = regcomp(&regex, pattern, REG_EXTENDED); if (result) { return ("Regex compilation failed."); } // Execute the regular expression resu...
int main() { assert(strcmp(func0("aabbbbd"), "Not matched!") == 0); assert(strcmp(func0("aabAbbbc"), "Not matched!") == 0); assert(strcmp(func0("accddbbjjjb"), "Found a match!") == 0); return 0; }
O1
c
func0: endbr64 push %rbx sub $0x50,%rsp mov %rdi,%rbx mov %fs:0x28,%rax mov %rax,0x48(%rsp) xor %eax,%eax mov %rsp,%rdi mov $0x1,%edx lea 0xe7a(%rip),%rsi callq 10a0 <regcomp@plt> mov %eax,%edx lea 0xe3e(%rip),%rax test %edx,%edx je 11fc <func0+0x53> mov 0x48(%rsp),%rcx xor ...
func0: endbr64 push rbx sub rsp, 50h mov rbx, rdi mov rax, fs:28h mov [rsp+58h+var_10], rax xor eax, eax mov rdi, rsp mov edx, 1 lea rsi, aAB; "a.*?b$" call _regcomp mov edx, eax lea rax, aRegexCompilati; "Regex compilation failed." test edx, edx jz short loc_121C l...
const char * func0(long long a1) { int v1; // edx const char *result; // rax int v3; // edx _QWORD v4[11]; // [rsp+0h] [rbp-58h] BYREF v4[9] = __readfsqword(0x28u); v1 = regcomp(v4, "a.*?b$", 1LL); result = "Regex compilation failed."; if ( !v1 ) { v3 = regexec(v4, a1, 0LL, 0LL, 0LL); result ...
func0: ENDBR64 PUSH RBX SUB RSP,0x50 MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x48],RAX XOR EAX,EAX MOV RDI,RSP MOV EDX,0x1 LEA RSI,[0x10204e] CALL 0x001010b0 MOV EDX,EAX LEA RAX,[0x102004] TEST EDX,EDX JZ 0x0010121c LAB_00101206: MOV RDX,qword ptr [RSP + 0x48] SUB RDX,qword ptr FS:[0x28] JNZ 0x0010...
char * func0(char *param_1) { int iVar1; char *pcVar2; long in_FS_OFFSET; regex_t rStack_58; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); iVar1 = regcomp(&rStack_58,"a.*?b$",1); pcVar2 = "Regex compilation failed."; if (iVar1 == 0) { iVar1 = regexec(&rStack_58,param_1,0,(regmatch_...
7,410
func0
#include <stdio.h> #include <assert.h> #include <regex.h> #include <string.h>
char* func0(const char *text) { regex_t regex; int result; char *pattern = "a.*?b$"; // Compile the regular expression result = regcomp(&regex, pattern, REG_EXTENDED); if (result) { return ("Regex compilation failed."); } // Execute the regular expression resu...
int main() { assert(strcmp(func0("aabbbbd"), "Not matched!") == 0); assert(strcmp(func0("aabAbbbc"), "Not matched!") == 0); assert(strcmp(func0("accddbbjjjb"), "Found a match!") == 0); return 0; }
O2
c
func0: endbr64 push %r12 mov $0x1,%edx lea 0xdac(%rip),%rsi push %rbp mov %rdi,%rbp sub $0x58,%rsp mov %fs:0x28,%rax mov %rax,0x48(%rsp) xor %eax,%eax mov %rsp,%r12 mov %r12,%rdi callq 10a0 <regcomp@plt> mov %eax,%r8d lea 0xd51(%rip),%rax test %r8d,%r8d je 12f0 <func0+0x60> m...
func0: endbr64 push r12 mov edx, 1 lea rsi, aAB; "a.*?b$" push rbp mov rbp, rdi sub rsp, 58h mov rax, fs:28h mov [rsp+68h+var_20], rax xor eax, eax mov r12, rsp mov rdi, r12 call _regcomp mov r8d, eax lea rax, aRegexCompilati; "Regex compilation failed." test r8d,...
const char * func0(long long a1) { int v1; // r8d const char *result; // rax int v3; // edx _QWORD v4[13]; // [rsp+0h] [rbp-68h] BYREF v4[9] = __readfsqword(0x28u); v1 = regcomp(v4, "a.*?b$", 1LL); result = "Regex compilation failed."; if ( !v1 ) { v3 = regexec(v4, a1, 0LL, 0LL); result = "Fo...
func0: ENDBR64 PUSH R12 MOV EDX,0x1 LEA RSI,[0x10204e] PUSH RBP MOV RBP,RDI SUB RSP,0x58 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x48],RAX XOR EAX,EAX MOV R12,RSP MOV RDI,R12 CALL 0x001010b0 MOV R8D,EAX LEA RAX,[0x102004] TEST R8D,R8D JZ 0x00101300 LAB_001012e4: MOV RDX,qword ptr [RSP + 0x48] SUB RDX,qword ptr...
char * func0(char *param_1) { int iVar1; char *pcVar2; long in_FS_OFFSET; regex_t rStack_68; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); iVar1 = regcomp(&rStack_68,"a.*?b$",1); pcVar2 = "Regex compilation failed."; if (iVar1 == 0) { iVar1 = regexec(&rStack_68,param_1,0,(regmatch_...
7,411
func0
#include <stdio.h> #include <assert.h> #include <regex.h> #include <string.h>
char* func0(const char *text) { regex_t regex; int result; char *pattern = "a.*?b$"; // Compile the regular expression result = regcomp(&regex, pattern, REG_EXTENDED); if (result) { return ("Regex compilation failed."); } // Execute the regular expression resu...
int main() { assert(strcmp(func0("aabbbbd"), "Not matched!") == 0); assert(strcmp(func0("aabAbbbc"), "Not matched!") == 0); assert(strcmp(func0("accddbbjjjb"), "Found a match!") == 0); return 0; }
O3
c
func0: endbr64 push %r12 mov $0x1,%edx lea 0xdac(%rip),%rsi push %rbp mov %rdi,%rbp sub $0x58,%rsp mov %fs:0x28,%rax mov %rax,0x48(%rsp) xor %eax,%eax mov %rsp,%r12 mov %r12,%rdi callq 10a0 <regcomp@plt> mov %eax,%r8d lea 0xd51(%rip),%rax test %r8d,%r8d je 12f0 <func0+0x60> m...
func0: endbr64 push rbp mov edx, 1; cflags lea rsi, pattern; "a.*?b$" push rbx mov rbx, rdi sub rsp, 58h mov rax, fs:28h mov [rsp+var_s48], rax xor eax, eax mov rbp, rsp mov rdi, rbp; preg call _regcomp mov edx, eax lea rax, aRegexCompilati; "Regex compilation failed...
const char * func0(char *string) { int v1; // edx const char *result; // rax int v3; // edx regex_t _0; // [rsp+0h] [rbp+0h] BYREF unsigned long long vars48; // [rsp+48h] [rbp+48h] vars48 = __readfsqword(0x28u); v1 = regcomp(&_0, "a.*?b$", 1); result = "Regex compilation failed."; if ( !v1 ) { ...
func0: ENDBR64 PUSH RBP MOV EDX,0x1 LEA RSI,[0x10204e] PUSH RBX MOV RBX,RDI SUB RSP,0x58 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x48],RAX XOR EAX,EAX MOV RBP,RSP MOV RDI,RBP CALL 0x001010b0 MOV EDX,EAX LEA RAX,[0x102004] TEST EDX,EDX JZ 0x00101300 LAB_001012e1: MOV RDX,qword ptr [RSP + 0x48] SUB RDX,qword ptr...
char * func0(char *param_1) { int iVar1; char *pcVar2; long in_FS_OFFSET; regex_t rStack_68; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); iVar1 = regcomp(&rStack_68,"a.*?b$",1); pcVar2 = "Regex compilation failed."; if (iVar1 == 0) { iVar1 = regexec(&rStack_68,param_1,0,(regmatch_...
7,412
func0
#include <stdio.h> #include <assert.h>
const char* func0(int a, int b, int c) { if ((b*b) - (4*a*c) > 0) { return "2 solutions"; } else if ((b*b) - (4*a*c) == 0) { return "1 solution"; } else { return "No solutions"; } }
int main() { assert(func0(2, 5, 2) == "2 solutions"); assert(func0(1, 1, 1) == "No solutions"); assert(func0(1, 2, 1) == "1 solution"); 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 mov %eax,%edx mov -0x4(%rbp),%eax imul -0xc(%rbp),%eax shl $0x2,%eax sub %eax,%edx mov %edx,%eax test %eax,%eax jle 117d <func0+0x34> lea 0xe8...
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 mov ecx, eax mov eax, [rbp+var_4] imul eax, [rbp+var_C] lea edx, ds:0[rax*4] mov eax, ecx sub eax, edx test eax, eax jle short lo...
const char * func0(int a1, int a2, int a3) { if ( a2 * a2 - 4 * a3 * a1 > 0 ) return "2 solutions"; if ( a2 * a2 == 4 * a3 * a1 ) return "1 solution"; return "No solutions"; }
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 MOV ECX,EAX MOV EAX,dword ptr [RBP + -0x4] IMUL EAX,dword ptr [RBP + -0xc] LEA EDX,[RAX*0x4] MOV EAX,ECX SUB EAX,EDX TEST EAX,EAX JLE 0x00101181 LE...
char * func0(int param_1,int param_2,int param_3) { char *pcVar1; if (param_2 * param_2 + param_1 * param_3 * -4 < 1) { if (param_2 * param_2 == param_1 * param_3 * 4) { pcVar1 = "1 solution"; } else { pcVar1 = "No solutions"; } } else { pcVar1 = "2 solutions"; } return p...
7,413
func0
#include <stdio.h> #include <assert.h>
const char* func0(int a, int b, int c) { if ((b*b) - (4*a*c) > 0) { return "2 solutions"; } else if ((b*b) - (4*a*c) == 0) { return "1 solution"; } else { return "No solutions"; } }
int main() { assert(func0(2, 5, 2) == "2 solutions"); assert(func0(1, 1, 1) == "No solutions"); assert(func0(1, 2, 1) == "1 solution"); return 0; }
O1
c
func0: endbr64 imul %esi,%esi imul %edx,%edi lea 0x0(,%rdi,4),%edx mov %esi,%ecx sub %edx,%ecx lea 0xebf(%rip),%rax test %ecx,%ecx jg 115d <func0+0x34> cmp %edx,%esi lea 0xebe(%rip),%rax lea 0xec2(%rip),%rdx cmovne %rdx,%rax retq
func0: endbr64 imul esi, esi imul edi, edx shl edi, 2 lea rax, a2Solutions; "2 solutions" cmp esi, edi jg short locret_1153 lea rax, a1Solution; "1 solution" lea rdx, aNoSolutions; "No solutions" cmovnz rax, rdx locret_1153: retn
const char * func0(int a1, int a2, int a3) { int v3; // esi int v4; // edi const char *result; // rax v3 = a2 * a2; v4 = 4 * a3 * a1; result = "2 solutions"; if ( v3 <= v4 ) { result = "1 solution"; if ( v3 != v4 ) return "No solutions"; } return result; }
func0: ENDBR64 IMUL ESI,ESI IMUL EDI,EDX SHL EDI,0x2 LEA RAX,[0x102004] CMP ESI,EDI JG 0x00101153 LEA RAX,[0x102010] LEA RDX,[0x10201b] CMOVNZ RAX,RDX LAB_00101153: RET
char * func0(int param_1,int param_2,int param_3) { char *pcVar1; int iVar2; iVar2 = param_1 * param_3 * 4; pcVar1 = "2 solutions"; if ((param_2 * param_2 <= iVar2) && (pcVar1 = "1 solution", param_2 * param_2 != iVar2)) { pcVar1 = "No solutions"; } return pcVar1; }
7,414
func0
#include <stdio.h> #include <assert.h>
const char* func0(int a, int b, int c) { if ((b*b) - (4*a*c) > 0) { return "2 solutions"; } else if ((b*b) - (4*a*c) == 0) { return "1 solution"; } else { return "No solutions"; } }
int main() { assert(func0(2, 5, 2) == "2 solutions"); assert(func0(1, 1, 1) == "No solutions"); assert(func0(1, 2, 1) == "1 solution"); return 0; }
O2
c
func0: endbr64 imul %esi,%esi lea 0xeb6(%rip),%rax imul %edx,%edi mov %esi,%ecx lea 0x0(,%rdi,4),%edx sub %edx,%ecx test %ecx,%ecx jg 1174 <func0+0x34> cmp %edx,%esi lea 0xea7(%rip),%rax lea 0xeab(%rip),%rdx cmovne %rdx,%rax retq nopw %cs:0x0(%rax,%rax,1)
func0: endbr64 imul edi, edx lea rax, a2Solutions; "2 solutions" imul esi, esi shl edi, 2 cmp esi, edi jg short locret_116A lea rax, a1Solution; "1 solution" lea rdx, aNoSolutions; "No solutions" cmovnz rax, rdx locret_116A: retn
const char * func0(int a1, int a2, int a3) { const char *result; // rax int v4; // esi int v5; // edi result = "2 solutions"; v4 = a2 * a2; v5 = 4 * a3 * a1; if ( v4 <= v5 ) { result = "1 solution"; if ( v4 != v5 ) return "No solutions"; } return result; }
func0: ENDBR64 IMUL EDI,EDX LEA RAX,[0x102004] IMUL ESI,ESI SHL EDI,0x2 CMP ESI,EDI JG 0x0010116a LEA RAX,[0x102010] LEA RDX,[0x10201b] CMOVNZ RAX,RDX LAB_0010116a: RET
char * func0(int param_1,int param_2,int param_3) { char *pcVar1; int iVar2; pcVar1 = "2 solutions"; iVar2 = param_1 * param_3 * 4; if ((param_2 * param_2 <= iVar2) && (pcVar1 = "1 solution", param_2 * param_2 != iVar2)) { pcVar1 = "No solutions"; } return pcVar1; }
7,415
func0
#include <stdio.h> #include <assert.h>
const char* func0(int a, int b, int c) { if ((b*b) - (4*a*c) > 0) { return "2 solutions"; } else if ((b*b) - (4*a*c) == 0) { return "1 solution"; } else { return "No solutions"; } }
int main() { assert(func0(2, 5, 2) == "2 solutions"); assert(func0(1, 1, 1) == "No solutions"); assert(func0(1, 2, 1) == "1 solution"); return 0; }
O3
c
func0: endbr64 imul %esi,%esi lea 0xeb6(%rip),%rax imul %edx,%edi mov %esi,%ecx lea 0x0(,%rdi,4),%edx sub %edx,%ecx test %ecx,%ecx jg 1174 <func0+0x34> cmp %edx,%esi lea 0xea7(%rip),%rax lea 0xeab(%rip),%rdx cmovne %rdx,%rax retq nopw %cs:0x0(%rax,%rax,1)
func0: endbr64 imul edi, edx lea rax, a2Solutions; "2 solutions" imul esi, esi shl edi, 2 cmp esi, edi jg short locret_116A lea rax, aNoSolutions; "No solutions" lea rdx, a1Solution; "1 solution" cmovz rax, rdx locret_116A: retn
const char * func0(int a1, int a2, int a3) { const char *result; // rax int v4; // esi int v5; // edi result = "2 solutions"; v4 = a2 * a2; v5 = 4 * a3 * a1; if ( v4 <= v5 ) { result = "No solutions"; if ( v4 == v5 ) return "1 solution"; } return result; }
func0: ENDBR64 IMUL EDI,EDX LEA RAX,[0x102004] IMUL ESI,ESI SHL EDI,0x2 CMP ESI,EDI JG 0x0010116a LEA RAX,[0x10201b] LEA RDX,[0x102010] CMOVZ RAX,RDX LAB_0010116a: RET
char * func0(int param_1,int param_2,int param_3) { char *pcVar1; int iVar2; pcVar1 = "2 solutions"; iVar2 = param_1 * param_3 * 4; if ((param_2 * param_2 <= iVar2) && (pcVar1 = "No solutions", param_2 * param_2 == iVar2)) { pcVar1 = "1 solution"; } return pcVar1; }
7,416
func0
#include <assert.h>
int func0(int list1[], int size) { int first_even = -1; int first_odd = -1; for (int i = 0; i < size; i++) { if (list1[i] % 2 == 0) { first_even = list1[i]; break; } } for (int i = 0; i < size; i++) { if (list1[i] % 2 != 0) { fir...
int main() { int list1[] = {1, 3, 5, 7, 4, 1, 6, 8}; int list2[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; int list3[] = {1, 5, 7, 9, 10}; assert(func0(list1, 8) == 5); assert(func0(list2, 10) == 3); assert(func0(list3, 5) == 11); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) movl $0xffffffff,-0x10(%rbp) movl $0xffffffff,-0xc(%rbp) movl $0x0,-0x8(%rbp) jmp 11cb <func0+0x62> mov -0x8(%rbp),%eax cltq lea 0x0(,%rax,4),%rdx mov -0x18(%rbp),%rax add %rdx,%rax mov (%rax),%eax and ...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_10], 0FFFFFFFFh mov [rbp+var_C], 0FFFFFFFFh mov [rbp+var_8], 0 jmp short loc_11CB loc_118F: mov eax, [rbp+var_8] cdqe lea rdx, ds:0[rax*4] mov rax, [rbp+var_18] add rax, rdx mov ...
long long func0(long long a1, int a2) { int v3; // [rsp+Ch] [rbp-10h] int v4; // [rsp+10h] [rbp-Ch] int i; // [rsp+14h] [rbp-8h] int j; // [rsp+18h] [rbp-4h] v3 = -1; v4 = -1; for ( i = 0; i < a2; ++i ) { if ( (*(_DWORD *)(4LL * i + a1) & 1) == 0 ) { v3 = *(_DWORD *)(4LL * 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 + -0x10],0xffffffff MOV dword ptr [RBP + -0xc],0xffffffff MOV dword ptr [RBP + -0x8],0x0 JMP 0x001011cb LAB_0010118f: MOV EAX,dword ptr [RBP + -0x8] CDQE LEA RDX,[RAX*0x4] MOV RAX,qword ptr [RBP + -0x1...
int func0(long param_1,int param_2) { int4 local_18; int4 local_14; int4 local_10; int4 local_c; local_18 = -1; local_14 = -1; for (local_10 = 0; local_10 < param_2; local_10 = local_10 + 1) { if ((*(uint *)(param_1 + (long)local_10 * 4) & 1) == 0) { local_18 = *(int *)(param_1 + (long)local...
7,417
func0
#include <assert.h>
int func0(int list1[], int size) { int first_even = -1; int first_odd = -1; for (int i = 0; i < size; i++) { if (list1[i] % 2 == 0) { first_even = list1[i]; break; } } for (int i = 0; i < size; i++) { if (list1[i] % 2 != 0) { fir...
int main() { int list1[] = {1, 3, 5, 7, 4, 1, 6, 8}; int list2[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; int list3[] = {1, 5, 7, 9, 10}; assert(func0(list1, 8) == 5); assert(func0(list2, 10) == 3); assert(func0(list3, 5) == 11); return 0; }
O1
c
func0: endbr64 test %esi,%esi jle 11a8 <func0+0x3f> mov %rdi,%rdx lea -0x1(%rsi),%eax lea 0x4(%rdi,%rax,4),%rsi mov (%rdi),%ecx test $0x1,%cl je 1191 <func0+0x28> add $0x4,%rdi cmp %rsi,%rdi jne 117c <func0+0x13> mov $0xffffffff,%ecx mov (%rdx),%eax test $0x1,%al jne 11a5 <fun...
func0: endbr64 test esi, esi jle short loc_11A8 mov rdx, rdi lea eax, [rsi-1] lea rsi, [rdi+rax*4+4] loc_117C: mov ecx, [rdi] test cl, 1 jz short loc_1191 add rdi, 4 cmp rdi, rsi jnz short loc_117C mov ecx, 0FFFFFFFFh loc_1191: mov eax, [rdx] test al, 1 jnz shor...
long long func0(int *a1, int a2) { int *v2; // rdx long long v3; // rsi int v4; // ecx int v5; // eax if ( a2 <= 0 ) { v4 = -1; v5 = -1; } else { v2 = a1; v3 = (long long)&a1[a2 - 1 + 1]; do { v4 = *a1; if ( (*a1 & 1) == 0 ) goto LABEL_6; ++a1; }...
func0: ENDBR64 TEST ESI,ESI JLE 0x001011a8 MOV RDX,RDI LEA EAX,[RSI + -0x1] LEA RSI,[RDI + RAX*0x4 + 0x4] LAB_0010117c: MOV ECX,dword ptr [RDI] TEST CL,0x1 JZ 0x00101191 ADD RDI,0x4 CMP RDI,RSI JNZ 0x0010117c MOV ECX,0xffffffff LAB_00101191: MOV EAX,dword ptr [RDX] TEST AL,0x1 JNZ 0x001011a5 ADD RDX,0x4 CMP RDX,RSI JNZ...
int func0(uint *param_1,int param_2) { uint *puVar1; uint uVar2; uint uVar3; uint *puVar4; if (param_2 < 1) { uVar3 = 0xffffffff; uVar2 = 0xffffffff; } else { puVar1 = param_1 + (ulong)(param_2 - 1) + 1; puVar4 = param_1; do { uVar3 = *puVar4; if ((uVar3 & 1) == 0) goto...
7,418
func0
#include <assert.h>
int func0(int list1[], int size) { int first_even = -1; int first_odd = -1; for (int i = 0; i < size; i++) { if (list1[i] % 2 == 0) { first_even = list1[i]; break; } } for (int i = 0; i < size; i++) { if (list1[i] % 2 != 0) { fir...
int main() { int list1[] = {1, 3, 5, 7, 4, 1, 6, 8}; int list2[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; int list3[] = {1, 5, 7, 9, 10}; assert(func0(list1, 8) == 5); assert(func0(list2, 10) == 3); assert(func0(list3, 5) == 11); return 0; }
O2
c
func0: endbr64 test %esi,%esi jle 1344 <func0+0x54> lea -0x1(%rsi),%eax mov %rdi,%rdx lea 0x4(%rdi,%rax,4),%rcx jmp 1311 <func0+0x21> nopl (%rax) add $0x4,%rdx cmp %rcx,%rdx je 1338 <func0+0x48> mov (%rdx),%eax test $0x1,%al jne 1308 <func0+0x18> jmp 1329 <func0+0x39> nopl 0x0(...
func0: endbr64 test esi, esi jle short loc_1344 lea eax, [rsi-1] mov rdx, rdi lea rcx, [rdi+rax*4+4] jmp short loc_1311 loc_1308: add rdx, 4 cmp rdx, rcx jz short loc_1338 loc_1311: mov eax, [rdx] test al, 1 jnz short loc_1308 jmp short loc_1329 loc_1320: add rdi, ...
long long func0(int *a1, int a2) { int *v2; // rdx long long v3; // rcx int v4; // eax if ( a2 <= 0 ) return 4294967294LL; v2 = a1; v3 = (long long)&a1[a2 - 1 + 1]; while ( 1 ) { v4 = *v2; if ( (*v2 & 1) == 0 ) break; if ( ++v2 == (int *)v3 ) { v4 = -1; goto LABEL...
func0: ENDBR64 TEST ESI,ESI JLE 0x00101344 LEA EAX,[RSI + -0x1] MOV RDX,RDI LEA RCX,[RDI + RAX*0x4 + 0x4] JMP 0x00101311 LAB_00101308: ADD RDX,0x4 CMP RDX,RCX JZ 0x00101338 LAB_00101311: MOV EAX,dword ptr [RDX] TEST AL,0x1 JNZ 0x00101308 JMP 0x00101329 LAB_00101320: ADD RDI,0x4 CMP RDI,RCX JZ 0x00101340 LAB_00101329: M...
int func0(uint *param_1,int param_2) { uint *puVar1; uint uVar2; uint *puVar3; if (param_2 < 1) { return -2; } puVar1 = param_1 + (ulong)(param_2 - 1) + 1; puVar3 = param_1; do { uVar2 = *puVar3; if ((uVar2 & 1) == 0) goto LAB_00101329; puVar3 = puVar3 + 1; } while (puVar3 != puVar...
7,419
func0
#include <assert.h>
int func0(int list1[], int size) { int first_even = -1; int first_odd = -1; for (int i = 0; i < size; i++) { if (list1[i] % 2 == 0) { first_even = list1[i]; break; } } for (int i = 0; i < size; i++) { if (list1[i] % 2 != 0) { fir...
int main() { int list1[] = {1, 3, 5, 7, 4, 1, 6, 8}; int list2[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; int list3[] = {1, 5, 7, 9, 10}; assert(func0(list1, 8) == 5); assert(func0(list2, 10) == 3); assert(func0(list3, 5) == 11); return 0; }
O3
c
func0: endbr64 test %esi,%esi jle 12f4 <func0+0x54> lea -0x1(%rsi),%eax mov %rdi,%rdx lea 0x4(%rdi,%rax,4),%rcx jmp 12c1 <func0+0x21> nopl (%rax) add $0x4,%rdx cmp %rcx,%rdx je 12e8 <func0+0x48> mov (%rdx),%eax test $0x1,%al jne 12b8 <func0+0x18> jmp 12d9 <func0+0x39> nopl 0x0(...
func0: endbr64 test esi, esi jle short loc_12E4 movsxd rsi, esi mov rdx, rdi lea rcx, [rdi+rsi*4] jmp short loc_12B1 loc_12A8: add rdx, 4 cmp rdx, rcx jz short loc_12D8 loc_12B1: mov eax, [rdx] test al, 1 jnz short loc_12A8 jmp short loc_12C9 loc_12C0: add rdi, 4 cmp ...
long long func0(int *a1, int a2) { int *v2; // rdx int *v3; // rcx int v4; // eax if ( a2 <= 0 ) return 4294967294LL; v2 = a1; v3 = &a1[a2]; while ( 1 ) { v4 = *v2; if ( (*v2 & 1) == 0 ) break; if ( ++v2 == v3 ) { v4 = -1; goto LABEL_7; } } do { LABEL_7:...
func0: ENDBR64 TEST ESI,ESI JLE 0x001012e4 MOVSXD RSI,ESI MOV RDX,RDI LEA RCX,[RDI + RSI*0x4] JMP 0x001012b1 LAB_001012a8: ADD RDX,0x4 CMP RDX,RCX JZ 0x001012d8 LAB_001012b1: MOV EAX,dword ptr [RDX] TEST AL,0x1 JNZ 0x001012a8 JMP 0x001012c9 LAB_001012c0: ADD RDI,0x4 CMP RDI,RCX JZ 0x001012e0 LAB_001012c9: MOV EDX,dword...
int func0(uint *param_1,int param_2) { uint *puVar1; uint uVar2; uint *puVar3; if (param_2 < 1) { return -2; } puVar1 = param_1 + param_2; puVar3 = param_1; do { uVar2 = *puVar3; if ((uVar2 & 1) == 0) goto LAB_001012c9; puVar3 = puVar3 + 1; } while (puVar3 != puVar1); uVar2 = 0xf...
7,420
func0
#include <assert.h>
int func0(int b, int h) { int perimeter = 2 * (b + h); return perimeter; }
int main() { assert(func0(10, 20) == 60); assert(func0(15, 20) == 70); assert(func0(8, 9) == 34); 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 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 edx, [rbp+var_14] mov eax, [rbp+var_18] add eax, edx add eax, eax mov [rbp+var_4], eax mov eax, [rbp+var_4] pop rbp retn
long long func0(int a1, int a2) { return (unsigned int)(2 * (a1 + a2)); }
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 EAX,EDX ADD EAX,EAX MOV dword ptr [RBP + -0x4],EAX MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int func0(int param_1,int param_2) { return (param_2 + param_1) * 2; }
7,421
func0
#include <assert.h>
int func0(int b, int h) { int perimeter = 2 * (b + h); return perimeter; }
int main() { assert(func0(10, 20) == 60); assert(func0(15, 20) == 70); assert(func0(8, 9) == 34); return 0; }
O1
c
func0: endbr64 add %esi,%edi lea (%rdi,%rdi,1),%eax retq
func0: endbr64 add edi, esi lea eax, [rdi+rdi] retn
long long func0(int a1, int a2) { return (unsigned int)(2 * (a2 + a1)); }
func0: ENDBR64 ADD EDI,ESI LEA EAX,[RDI + RDI*0x1] RET
int func0(int param_1,int param_2) { return (param_1 + param_2) * 2; }
7,422
func0
#include <assert.h>
int func0(int b, int h) { int perimeter = 2 * (b + h); return perimeter; }
int main() { assert(func0(10, 20) == 60); assert(func0(15, 20) == 70); assert(func0(8, 9) == 34); return 0; }
O2
c
func0: endbr64 add %esi,%edi lea (%rdi,%rdi,1),%eax retq nopw 0x0(%rax,%rax,1)
func0: endbr64 add edi, esi lea eax, [rdi+rdi] retn
long long func0(int a1, int a2) { return (unsigned int)(2 * (a2 + a1)); }
func0: ENDBR64 ADD EDI,ESI LEA EAX,[RDI + RDI*0x1] RET
int func0(int param_1,int param_2) { return (param_1 + param_2) * 2; }
7,423
func0
#include <assert.h>
int func0(int b, int h) { int perimeter = 2 * (b + h); return perimeter; }
int main() { assert(func0(10, 20) == 60); assert(func0(15, 20) == 70); assert(func0(8, 9) == 34); return 0; }
O3
c
func0: endbr64 add %esi,%edi lea (%rdi,%rdi,1),%eax retq nopw 0x0(%rax,%rax,1)
func0: endbr64 add edi, esi lea eax, [rdi+rdi] retn
long long func0(int a1, int a2) { return (unsigned int)(2 * (a2 + a1)); }
func0: ENDBR64 ADD EDI,ESI LEA EAX,[RDI + RDI*0x1] RET
int func0(int param_1,int param_2) { return (param_1 + param_2) * 2; }
7,424
func0
#include <stdio.h> #include <assert.h>
int* func0(int nums[], int size, int m, int n, int *result_size) { static int result[100]; int count = 0; for (int i = 0; i < size; i++) { if (nums[i] % m == 0 && nums[i] % n == 0) { result[count++] = nums[i]; } } *result_size = count; return result; }
int main() { int size; int result1_size; int arr1[] = {19, 65, 57, 39, 152, 639, 121, 44, 90, 190}; int expected1[] = {152, 44}; int* result1 = func0(arr1, 10, 2, 4, &result1_size); assert(result1_size == 2); for (int i = 0; i < result1_size; i++) { assert(result1[i] == expec...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) mov %edx,-0x20(%rbp) mov %ecx,-0x24(%rbp) mov %r8,-0x30(%rbp) movl $0x0,-0x8(%rbp) movl $0x0,-0x4(%rbp) jmp 120a <func0+0xa1> mov -0x4(%rbp),%eax cltq lea 0x0(,%rax,4),%rdx mov -0x18(%rbp),%rax add %r...
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_24], ecx mov [rbp+var_30], r8 mov [rbp+var_8], 0 mov [rbp+var_4], 0 jmp short loc_120A loc_1192: mov eax, [rbp+var_4] cdqe lea rdx, ds:0[rax*4] mov rax, ...
_DWORD * func0(long long a1, int a2, int a3, int a4, _DWORD *a5) { int v5; // eax int v7; // [rsp+28h] [rbp-8h] int i; // [rsp+2Ch] [rbp-4h] v7 = 0; for ( i = 0; i < a2; ++i ) { if ( !(*(_DWORD *)(4LL * i + a1) % a3) && !(*(_DWORD *)(4LL * i + a1) % a4) ) { v5 = v7++; result_1[v5] = *(_...
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 + -0x24],ECX MOV qword ptr [RBP + -0x30],R8 MOV dword ptr [RBP + -0x8],0x0 MOV dword ptr [RBP + -0x4],0x0 JMP 0x0010120a LAB_00101192: MOV EAX,dword ptr [RBP + -0x4] CDQ...
int1 * func0(long param_1,int param_2,int param_3,int param_4,int *param_5) { int local_10; int local_c; local_10 = 0; for (local_c = 0; local_c < param_2; local_c = local_c + 1) { if ((*(int *)(param_1 + (long)local_c * 4) % param_3 == 0) && (*(int *)(param_1 + (long)local_c * 4) % param_4 == 0)...
7,425
func0
#include <stdio.h> #include <assert.h>
int* func0(int nums[], int size, int m, int n, int *result_size) { static int result[100]; int count = 0; for (int i = 0; i < size; i++) { if (nums[i] % m == 0 && nums[i] % n == 0) { result[count++] = nums[i]; } } *result_size = count; return result; }
int main() { int size; int result1_size; int arr1[] = {19, 65, 57, 39, 152, 639, 121, 44, 90, 190}; int expected1[] = {152, 44}; int* result1 = func0(arr1, 10, 2, 4, &result1_size); assert(result1_size == 2); for (int i = 0; i < result1_size; i++) { assert(result1[i] == expec...
O1
c
func0: endbr64 test %esi,%esi jle 11ba <func0+0x51> push %rbx mov %edx,%r10d mov %rdi,%r9 lea -0x1(%rsi),%eax lea 0x4(%rdi,%rax,4),%rdi mov $0x0,%r11d lea 0x2eb3(%rip),%rbx jmp 1198 <func0+0x2f> add $0x4,%r9 cmp %rdi,%r9 je 11cb <func0+0x62> mov (%r9),%esi mov %esi,%eax cltd ...
func0: endbr64 test esi, esi jle short loc_11BC push rbx mov r10d, edx mov r11d, ecx mov r9, rdi lea eax, [rsi-1] lea rsi, [rdi+rax*4+4] mov edi, 0 lea rbx, result_1 jmp short loc_119A loc_1191: add r9, 4 cmp r9, rsi jz short loc_11CC loc_119A: mov ecx, [r9] mo...
_DWORD * func0(int *a1, int a2, int a3, int a4, _DWORD *a5) { int *v6; // r9 long long v7; // rsi int v8; // edi int v9; // ecx if ( a2 <= 0 ) { *a5 = 0; return result_1; } else { v6 = a1; v7 = (long long)&a1[a2 - 1 + 1]; v8 = 0; do { v9 = *v6; if ( !(*v6 % a3)...
func0: ENDBR64 TEST ESI,ESI JLE 0x001011bc PUSH RBX MOV R10D,EDX MOV R11D,ECX MOV R9,RDI LEA EAX,[RSI + -0x1] LEA RSI,[RDI + RAX*0x4 + 0x4] MOV EDI,0x0 LEA RBX,[0x104040] JMP 0x0010119a LAB_00101191: ADD R9,0x4 CMP R9,RSI JZ 0x001011cc LAB_0010119a: MOV ECX,dword ptr [R9] MOV EAX,ECX CDQ IDIV R10D TEST EDX,EDX JNZ 0x00...
int4 * func0(int *param_1,int param_2,int param_3,int param_4,int *param_5) { int *piVar1; int iVar2; int iVar3; if (0 < param_2) { piVar1 = param_1 + (ulong)(param_2 - 1) + 1; iVar3 = 0; do { iVar2 = *param_1; if ((iVar2 % param_3 == 0) && (iVar2 % param_4 == 0)) { (&result_...
7,426
func0
#include <stdio.h> #include <assert.h>
int* func0(int nums[], int size, int m, int n, int *result_size) { static int result[100]; int count = 0; for (int i = 0; i < size; i++) { if (nums[i] % m == 0 && nums[i] % n == 0) { result[count++] = nums[i]; } } *result_size = count; return result; }
int main() { int size; int result1_size; int arr1[] = {19, 65, 57, 39, 152, 639, 121, 44, 90, 190}; int expected1[] = {152, 44}; int* result1 = func0(arr1, 10, 2, 4, &result1_size); assert(result1_size == 2); for (int i = 0; i < result1_size; i++) { assert(result1[i] == expec...
O2
c
func0: endbr64 test %esi,%esi jle 14c8 <func0+0x58> lea -0x1(%rsi),%eax push %rbx mov %edx,%r11d xor %r10d,%r10d lea 0x4(%rdi,%rax,4),%r9 lea 0x2bb2(%rip),%rbx xchg %ax,%ax mov (%rdi),%esi mov %esi,%eax cltd idiv %r11d test %edx,%edx jne 14af <func0+0x3f> mov %esi,%eax cltd idiv ...
func0: endbr64 push r12 test esi, esi jle short loc_1420 lea eax, [rsi-1] mov r9d, edx mov r10d, ecx xor r11d, r11d lea rsi, [rdi+rax*4+4] lea r12, result_1 nop word ptr [rax+rax+00h] loc_13E8: mov ecx, [rdi] mov eax, ecx cdq idiv r9d test edx, edx jnz short loc_1...
_DWORD * func0(int *a1, int a2, int a3, int a4, _DWORD *a5) { int v6; // r11d long long v7; // rsi int v8; // ecx long long v9; // rax _DWORD *result; // rax if ( a2 <= 0 ) { result = result_1; *a5 = 0; } else { v6 = 0; v7 = (long long)&a1[a2 - 1 + 1]; do { v8 = *a1; ...
func0: ENDBR64 PUSH R12 TEST ESI,ESI JLE 0x00101420 LEA EAX,[RSI + -0x1] MOV R9D,EDX MOV R10D,ECX XOR R11D,R11D LEA RSI,[RDI + RAX*0x4 + 0x4] LEA R12,[0x104040] NOP word ptr [RAX + RAX*0x1] LAB_001013e8: MOV ECX,dword ptr [RDI] MOV EAX,ECX CDQ IDIV R9D TEST EDX,EDX JNZ 0x00101409 MOV EAX,ECX CDQ IDIV R10D TEST EDX,EDX ...
int4 * func0(int *param_1,int param_2,int param_3,int param_4,int *param_5) { int *piVar1; int iVar2; long lVar3; int iVar4; if (0 < param_2) { iVar4 = 0; piVar1 = param_1 + (ulong)(param_2 - 1) + 1; do { iVar2 = *param_1; if ((iVar2 % param_3 == 0) && (iVar2 % param_4 == 0)) { ...
7,427
func0
#include <stdio.h> #include <assert.h>
int* func0(int nums[], int size, int m, int n, int *result_size) { static int result[100]; int count = 0; for (int i = 0; i < size; i++) { if (nums[i] % m == 0 && nums[i] % n == 0) { result[count++] = nums[i]; } } *result_size = count; return result; }
int main() { int size; int result1_size; int arr1[] = {19, 65, 57, 39, 152, 639, 121, 44, 90, 190}; int expected1[] = {152, 44}; int* result1 = func0(arr1, 10, 2, 4, &result1_size); assert(result1_size == 2); for (int i = 0; i < result1_size; i++) { assert(result1[i] == expec...
O3
c
func0: endbr64 test %esi,%esi jle 15e8 <func0+0x58> lea -0x1(%rsi),%eax push %rbx mov %edx,%r11d xor %r10d,%r10d lea 0x4(%rdi,%rax,4),%r9 lea 0x2a92(%rip),%rbx xchg %ax,%ax mov (%rdi),%esi mov %esi,%eax cltd idiv %r11d test %edx,%edx jne 15cf <func0+0x3f> mov %esi,%eax cltd idiv ...
func0: endbr64 push rbx test esi, esi jle short loc_11A8 movsxd rsi, esi mov r9d, edx mov r10d, ecx xor r11d, r11d lea rsi, [rdi+rsi*4] lea rbx, result_1 loc_1170: mov ecx, [rdi] mov eax, ecx cdq idiv r9d test edx, edx jnz short loc_1190 mov eax, ecx cdq idiv r10d...
long long * func0(int *a1, int a2, int a3, int a4, _DWORD *a5) { int v6; // r11d int *v7; // rsi int v8; // ecx long long v9; // rax long long *result; // rax if ( a2 <= 0 ) { result = &result_1; *a5 = 0; } else { v6 = 0; v7 = &a1[a2]; do { v8 = *a1; if ( !(*a1 %...
func0: ENDBR64 PUSH RBX TEST ESI,ESI JLE 0x001011a8 MOVSXD RSI,ESI MOV R9D,EDX MOV R10D,ECX XOR R11D,R11D LEA RSI,[RDI + RSI*0x4] LEA RBX,[0x104040] LAB_00101170: MOV ECX,dword ptr [RDI] MOV EAX,ECX CDQ IDIV R9D TEST EDX,EDX JNZ 0x00101190 MOV EAX,ECX CDQ IDIV R10D TEST EDX,EDX JNZ 0x00101190 MOVSXD RAX,R11D ADD R11D,0...
int4 * func0(int *param_1,int param_2,int param_3,int param_4,int *param_5) { int *piVar1; int iVar2; long lVar3; int iVar4; if (0 < param_2) { iVar4 = 0; piVar1 = param_1 + param_2; do { iVar2 = *param_1; if ((iVar2 % param_3 == 0) && (iVar2 % param_4 == 0)) { lVar3 = (lon...
7,428
func0
#include <assert.h>
int func0(int n, int l, int r) { int num = ((1 << r) - 1) ^ ((1 << (l - 1)) - 1); int new_num = n & num; if (num == new_num) { return 1; // true } return 0; // false }
int main() { assert(func0(10, 2, 1) == 1); assert(func0(5, 2, 4) == 0); assert(func0(22, 2, 3) == 1); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x14(%rbp) mov %esi,-0x18(%rbp) mov %edx,-0x1c(%rbp) mov -0x1c(%rbp),%eax mov $0x1,%edx mov %eax,%ecx shl %cl,%edx mov %edx,%eax lea -0x1(%rax),%edx mov -0x18(%rbp),%eax sub $0x1,%eax mov $0x1,%esi mov %eax,%ecx shl %cl,%esi...
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_1C] mov edx, 1 mov ecx, eax shl edx, cl mov eax, edx lea edx, [rax-1] mov eax, [rbp+var_18] sub eax, 1 mov esi, 1 mov ecx, eax shl esi, ...
_BOOL8 func0(int a1, char a2, char a3) { int v4; // [rsp+14h] [rbp-8h] v4 = ((1 << a3) - 1) ^ ((1 << (a2 - 1)) - 1); return v4 == (v4 & 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 + -0x1c] MOV EDX,0x1 MOV ECX,EAX SHL EDX,CL MOV EAX,EDX LEA EDX,[RAX + -0x1] MOV EAX,dword ptr [RBP + -0x18] SUB EAX,0x1 MOV ESI,0x1 MOV ECX,EAX SHL ESI,CL MOV EAX,E...
bool func0(uint param_1,char param_2,byte param_3) { uint uVar1; uVar1 = (1 << (param_2 - 1U & 0x1f)) - 1U ^ (1 << (param_3 & 0x1f)) - 1U; return uVar1 == (param_1 & uVar1); }
7,429
func0
#include <assert.h>
int func0(int n, int l, int r) { int num = ((1 << r) - 1) ^ ((1 << (l - 1)) - 1); int new_num = n & num; if (num == new_num) { return 1; // true } return 0; // false }
int main() { assert(func0(10, 2, 1) == 1); assert(func0(5, 2, 4) == 0); assert(func0(22, 2, 3) == 1); return 0; }
O1
c
func0: endbr64 lea -0x1(%rsi),%ecx mov $0x1,%r8d mov %r8d,%eax shl %cl,%eax sub $0x1,%eax mov %edx,%ecx shl %cl,%r8d sub $0x1,%r8d xor %r8d,%eax and %eax,%edi cmp %eax,%edi sete %al movzbl %al,%eax retq
func0: endbr64 lea ecx, [rsi-1] mov r8d, 1 mov eax, r8d shl eax, cl sub eax, 1 mov ecx, edx shl r8d, cl sub r8d, 1 xor eax, r8d and edi, eax cmp edi, eax setz al movzx eax, al retn
_BOOL8 func0(int a1, char a2, char a3) { int v3; // eax v3 = ((1 << a3) - 1) ^ ((1 << (a2 - 1)) - 1); return (v3 & a1) == v3; }
func0: ENDBR64 LEA ECX,[RSI + -0x1] MOV R8D,0x1 MOV EAX,R8D SHL EAX,CL SUB EAX,0x1 MOV ECX,EDX SHL R8D,CL SUB R8D,0x1 XOR EAX,R8D AND EDI,EAX CMP EDI,EAX SETZ AL MOVZX EAX,AL RET
bool func0(uint param_1,char param_2,byte param_3) { uint uVar1; uVar1 = (1 << (param_2 - 1U & 0x1f)) - 1U ^ (1 << (param_3 & 0x1f)) - 1U; return (param_1 & uVar1) == uVar1; }
7,430
func0
#include <assert.h>
int func0(int n, int l, int r) { int num = ((1 << r) - 1) ^ ((1 << (l - 1)) - 1); int new_num = n & num; if (num == new_num) { return 1; // true } return 0; // false }
int main() { assert(func0(10, 2, 1) == 1); assert(func0(5, 2, 4) == 0); assert(func0(22, 2, 3) == 1); return 0; }
O2
c
func0: endbr64 mov $0x1,%r8d lea -0x1(%rsi),%ecx mov %r8d,%eax shl %cl,%eax mov %edx,%ecx shl %cl,%r8d sub $0x1,%eax sub $0x1,%r8d xor %r8d,%eax and %eax,%edi cmp %eax,%edi sete %al movzbl %al,%eax retq nopl 0x0(%rax)
func0: endbr64 mov r8d, 1 lea ecx, [rsi-1] mov eax, r8d shl eax, cl mov ecx, edx shl r8d, cl sub eax, 1 sub r8d, 1 xor eax, r8d and edi, eax cmp edi, eax setz al movzx eax, al retn
_BOOL8 func0(int a1, char a2, char a3) { int v3; // eax v3 = ((1 << a3) - 1) ^ ((1 << (a2 - 1)) - 1); return (v3 & a1) == v3; }
func0: ENDBR64 MOV R8D,0x1 LEA ECX,[RSI + -0x1] MOV EAX,R8D SHL EAX,CL MOV ECX,EDX SHL R8D,CL SUB EAX,0x1 SUB R8D,0x1 XOR EAX,R8D AND EDI,EAX CMP EDI,EAX SETZ AL MOVZX EAX,AL RET
bool func0(uint param_1,char param_2,byte param_3) { uint uVar1; uVar1 = (1 << (param_2 - 1U & 0x1f)) - 1U ^ (1 << (param_3 & 0x1f)) - 1U; return (param_1 & uVar1) == uVar1; }
7,431
func0
#include <assert.h>
int func0(int n, int l, int r) { int num = ((1 << r) - 1) ^ ((1 << (l - 1)) - 1); int new_num = n & num; if (num == new_num) { return 1; // true } return 0; // false }
int main() { assert(func0(10, 2, 1) == 1); assert(func0(5, 2, 4) == 0); assert(func0(22, 2, 3) == 1); return 0; }
O3
c
func0: endbr64 mov $0x1,%r8d lea -0x1(%rsi),%ecx mov %r8d,%eax shl %cl,%eax mov %edx,%ecx shl %cl,%r8d sub $0x1,%eax sub $0x1,%r8d xor %r8d,%eax and %eax,%edi cmp %eax,%edi sete %al movzbl %al,%eax retq nopl 0x0(%rax)
func0: endbr64 mov eax, 1 lea ecx, [rsi-1] not edi mov esi, eax shl esi, cl mov ecx, edx shl eax, cl sub esi, 1 sub eax, 1 xor esi, eax xor eax, eax test edi, esi setz al retn
_BOOL8 func0(int a1, char a2, char a3) { return ((((1 << a3) - 1) ^ ((1 << (a2 - 1)) - 1)) & ~a1) == 0; }
func0: ENDBR64 MOV EAX,0x1 LEA ECX,[RSI + -0x1] NOT EDI MOV ESI,EAX SHL ESI,CL MOV ECX,EDX SHL EAX,CL SUB ESI,0x1 SUB EAX,0x1 XOR ESI,EAX XOR EAX,EAX TEST EDI,ESI SETZ AL RET
bool func0(uint param_1,char param_2,byte param_3) { return (~param_1 & ((1 << (param_2 - 1U & 0x1f)) - 1U ^ (1 << (param_3 & 0x1f)) - 1U)) == 0; }
7,432
func0
#include <stdio.h> #include <string.h> #include <assert.h>
int func0(const char *str1, const char *str2) { if (strlen(str1) != strlen(str2)) { return 0; } int dict_str1[256][1000]; int counts_str1[256] = {0}; int dict_str2[256][1000]; int counts_str2[256] = {0}; int n = strlen(str1); for (int i = 0; i < n; i++) { un...
int main() { assert(func0("paper", "title") == 1); assert(func0("ab", "ba") == 1); assert(func0("ab", "aa") == 0); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp push %rbx lea -0x1f4000(%rsp),%r11 sub $0x1000,%rsp orq $0x0,(%rsp) cmp %r11,%rsp jne 119a <func0+0x11> sub $0x858,%rsp mov %rdi,-0x1f4858(%rbp) mov %rsi,-0x1f4860(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax mov -0x1f4858(%...
func0: endbr64 push rbp mov rbp, rsp push rbx lea r11, [rsp+8+var_1F4008] loc_119A: sub rsp, 1000h or [rsp+1008h+var_1008], 0 cmp rsp, r11 jnz short loc_119A sub rsp, 858h mov [rbp+s], rdi mov [rbp+var_1F4860], rsi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX LEA R11,[RSP + -0x1f4000] LAB_0010119a: SUB RSP,0x1000 OR qword ptr [RSP],0x0 CMP RSP,R11 JNZ 0x0010119a SUB RSP,0x858 MOV qword ptr [RBP + -0x1f4858],RDI MOV qword ptr [RBP + -0x1f4860],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV RAX,qwor...
int8 func0(char *param_1,char *param_2) { long lVar1; bool bVar2; bool bVar3; int *puVar4; size_t sVar5; size_t sVar6; int8 uVar7; long lVar8; int *puVar9; int8 *puVar10; long in_FS_OFFSET; byte bVar11; int iVar12; int iVar13; int iVar14; bVar11 = 0; puVar4 = &stack0xffffffffffffff...
7,433
func0
#include <stdio.h> #include <string.h> #include <assert.h>
int func0(const char *str1, const char *str2) { if (strlen(str1) != strlen(str2)) { return 0; } int dict_str1[256][1000]; int counts_str1[256] = {0}; int dict_str2[256][1000]; int counts_str2[256] = {0}; int n = strlen(str1); for (int i = 0; i < n; i++) { un...
int main() { assert(func0("paper", "title") == 1); assert(func0("ab", "ba") == 1); assert(func0("ab", "aa") == 0); return 0; }
O1
c
func0: endbr64 push %rbp push %rbx lea -0x1f4000(%rsp),%r11 sub $0x1000,%rsp orq $0x0,(%rsp) cmp %r11,%rsp jne 1177 <func0+0xe> sub $0x818,%rsp mov %rdi,%r8 mov %fs:0x28,%rax mov %rax,0x1f4808(%rsp) xor %eax,%eax mov $0xffffffffffffffff,%r9 mov %r9,%rcx repnz scas %es:(%rdi),%al ...
func0: endbr64 push r12 push rbp push rbx lea r11, [rsp+18h+var_1F4018] loc_1199: sub rsp, 1000h or [rsp+1018h+var_1018], 0 cmp rsp, r11 jnz short loc_1199 sub rsp, 810h mov rbx, rdi mov rbp, rsi mov rax, fs:28h mov [rsp+1828h+arg_1F2FD8], rax xor eax, eax call _...
func0: ENDBR64 PUSH R12 PUSH RBP PUSH RBX LEA R11,[RSP + -0x1f4000] LAB_00101199: SUB RSP,0x1000 OR qword ptr [RSP],0x0 CMP RSP,R11 JNZ 0x00101199 SUB RSP,0x810 MOV RBX,RDI MOV RBP,RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x1f4808],RAX XOR EAX,EAX CALL 0x00101070 MOV R12,RAX MOV RDI,RBP CALL 0x00101070 MOV ...
int8 func0(char *param_1,char *param_2) { uint uVar1; size_t sVar2; size_t sVar3; int8 uVar4; ulong uVar5; ulong uVar6; int iVar7; long lVar8; uint *puVar9; int iVar10; int1 *puVar11; int1 *puVar12; int1 *puVar13; int8 *puVar14; uint *puVar15; long in_FS_OFFSET; bool bVar16; byte bV...
7,434
func0
#include <stdio.h> #include <string.h> #include <assert.h>
int func0(const char *str1, const char *str2) { if (strlen(str1) != strlen(str2)) { return 0; } int dict_str1[256][1000]; int counts_str1[256] = {0}; int dict_str2[256][1000]; int counts_str2[256] = {0}; int n = strlen(str1); for (int i = 0; i < n; i++) { un...
int main() { assert(func0("paper", "title") == 1); assert(func0("ab", "ba") == 1); assert(func0("ab", "aa") == 0); return 0; }
O2
c
func0: endbr64 push %r12 mov %rsi,%r12 push %rbp mov %rdi,%rbp push %rbx callq 1070 <strlen@plt> mov %r12,%rdi mov %rax,%rbx callq 1070 <strlen@plt> cmp %rax,%rbx jne 1488 <func0+0x38> pop %rbx mov %r12,%rsi mov %rbp,%rdi pop %rbp pop %r12 jmpq 1250 <func0.part.0> nopw 0x0(%...
func0_part_0: push r13 push r12 push rbp push rbx lea r11, [rsp+20h+var_1F4020] loc_124E: sub rsp, 1000h or [rsp+1020h+var_1020], 0 cmp rsp, r11 jnz short loc_124E sub rsp, 818h mov ecx, 80h mov rax, fs:28h mov [rsp+1838h+arg_1F2FC8], rax xor eax, eax mov rbp, rs...
func0.part.0: PUSH R13 PUSH R12 PUSH RBP PUSH RBX LEA R11,[RSP + -0x1f4000] LAB_0010124e: SUB RSP,0x1000 OR qword ptr [RSP],0x0 CMP RSP,R11 JNZ 0x0010124e SUB RSP,0x818 MOV ECX,0x80 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x1f4808],RAX XOR EAX,EAX MOV RBP,RSP MOV R12,RDI LEA RBX,[RSP + 0x400] MOV RDI,RBP MOV R...
int8 func0_part_0(char *param_1,long param_2) { int iVar1; size_t sVar2; ulong uVar3; long lVar4; int8 uVar5; int iVar6; long lVar7; int *piVar8; int iVar9; ulong uVar10; int1 *puVar11; int1 *puVar12; int *piVar13; int iVar14; int1 *puVar15; int8 *puVar16; int iVar17; int iVar18; ...
7,435
func0
#include <stdio.h> #include <string.h> #include <assert.h>
int func0(const char *str1, const char *str2) { if (strlen(str1) != strlen(str2)) { return 0; } int dict_str1[256][1000]; int counts_str1[256] = {0}; int dict_str2[256][1000]; int counts_str2[256] = {0}; int n = strlen(str1); for (int i = 0; i < n; i++) { un...
int main() { assert(func0("paper", "title") == 1); assert(func0("ab", "ba") == 1); assert(func0("ab", "aa") == 0); return 0; }
O3
c
func0: endbr64 push %r12 mov %rsi,%r12 push %rbp mov %rdi,%rbp push %rbx callq 1070 <strlen@plt> mov %r12,%rdi mov %rax,%rbx callq 1070 <strlen@plt> cmp %rax,%rbx jne 14a8 <func0+0x38> pop %rbx mov %r12,%rsi mov %rbp,%rdi pop %rbp pop %r12 jmpq 1250 <func0.part.0> nopw 0x0(%...
func0: endbr64 push r12 push rbp push rbx lea r11, [rsp+18h+var_1F4018] loc_1250: sub rsp, 1000h or [rsp+1018h+var_1018], 0 cmp rsp, r11 jnz short loc_1250 sub rsp, 810h mov rax, fs:28h mov [rsp+1828h+arg_1F2FD8], rax xor eax, eax mov rbp, rsi mov rbx, rdi call _...
func0: ENDBR64 PUSH R12 PUSH RBP PUSH RBX LEA R11,[RSP + -0x1f4000] LAB_00101250: SUB RSP,0x1000 OR qword ptr [RSP],0x0 CMP RSP,R11 JNZ 0x00101250 SUB RSP,0x810 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x1f4808],RAX XOR EAX,EAX MOV RBP,RSI MOV RBX,RDI CALL 0x00101070 MOV RDI,RBP MOV R12,RAX CALL 0x00101070 CMP ...
int8 func0(char *param_1,char *param_2) { int *piVar1; size_t sVar2; size_t sVar3; ulong uVar4; long lVar5; int8 uVar6; long lVar7; int *piVar8; ulong uVar9; int *puVar10; int *puVar11; int *puVar12; int8 *puVar13; int *piVar14; long in_FS_OFFSET; bool bVar15; byte bVar16; int iVar1...
7,436
func0
#include <assert.h>
double func0(int numbers[], int size) { int total = 0; for (int i = 0; i < size; i++) { total += numbers[i]; } return (double)total / size; }
int main() { int arr1[] = {8, 2, 3, 0, 7}; int arr2[] = {-10, -20, -30}; int arr3[] = {19, 15, 18}; assert(func0(arr1, 5) == 4.0); assert(func0(arr2, 3) == -20.0); assert(func0(arr3, 3) == 17.333333333333332); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) movl $0x0,-0x8(%rbp) movl $0x0,-0x4(%rbp) jmp 11a5 <func0+0x3c> mov -0x4(%rbp),%eax cltq lea 0x0(,%rax,4),%rdx mov -0x18(%rbp),%rax add %rdx,%rax mov (%rax),%eax add %eax,-0x8(%rbp) addl $0x1,-0x4(%rbp...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_8], 0 mov [rbp+var_4], 0 jmp short loc_11A5 loc_1188: mov eax, [rbp+var_4] cdqe lea rdx, ds:0[rax*4] mov rax, [rbp+var_18] add rax, rdx mov eax, [rax] add [rbp+var_8], eax add...
double func0(long long a1, int a2) { int v3; // [rsp+14h] [rbp-8h] int i; // [rsp+18h] [rbp-4h] v3 = 0; for ( i = 0; i < a2; ++i ) v3 += *(_DWORD *)(4LL * i + a1); return (double)v3 / (double)a2; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV dword ptr [RBP + -0x8],0x0 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001011a5 LAB_00101188: MOV EAX,dword ptr [RBP + -0x4] CDQE LEA RDX,[RAX*0x4] MOV RAX,qword ptr [RBP + -0x18] ADD RAX,RDX MOV EAX,dword ptr [RAX] ADD dwo...
double func0(long param_1,int param_2) { int4 local_10; int4 local_c; local_10 = 0; for (local_c = 0; local_c < param_2; local_c = local_c + 1) { local_10 = local_10 + *(int *)(param_1 + (long)local_c * 4); } return (double)local_10 / (double)param_2; }
7,437
func0
#include <assert.h>
double func0(int numbers[], int size) { int total = 0; for (int i = 0; i < size; i++) { total += numbers[i]; } return (double)total / size; }
int main() { int arr1[] = {8, 2, 3, 0, 7}; int arr2[] = {-10, -20, -30}; int arr3[] = {19, 15, 18}; assert(func0(arr1, 5) == 4.0); assert(func0(arr2, 3) == -20.0); assert(func0(arr3, 3) == 17.333333333333332); return 0; }
O1
c
func0: endbr64 test %esi,%esi jle 11a1 <func0+0x38> mov %rdi,%rax lea -0x1(%rsi),%edx lea 0x4(%rdi,%rdx,4),%rcx mov $0x0,%edx add (%rax),%edx add $0x4,%rax cmp %rcx,%rax jne 1181 <func0+0x18> pxor %xmm0,%xmm0 cvtsi2sd %edx,%xmm0 pxor %xmm1,%xmm1 cvtsi2sd %esi,%xmm1 divsd %xmm1,%xmm0 re...
func0: endbr64 test esi, esi jle short loc_11A1 mov rax, rdi lea edx, [rsi-1] lea rcx, [rdi+rdx*4+4] mov edx, 0 loc_1181: add edx, [rax] add rax, 4 cmp rax, rcx jnz short loc_1181 loc_118C: pxor xmm0, xmm0 cvtsi2sd xmm0, edx pxor xmm1, xmm1 cvtsi2sd xmm1, esi divsd xmm0, x...
double func0(_DWORD *a1, int a2) { _DWORD *v2; // rax int v3; // edx if ( a2 <= 0 ) { v3 = 0; } else { v2 = a1; v3 = 0; do v3 += *v2++; while ( v2 != &a1[a2 - 1 + 1] ); } return (double)v3 / (double)a2; }
func0: ENDBR64 TEST ESI,ESI JLE 0x001011a1 MOV RAX,RDI LEA EDX,[RSI + -0x1] LEA RCX,[RDI + RDX*0x4 + 0x4] MOV EDX,0x0 LAB_00101181: ADD EDX,dword ptr [RAX] ADD RAX,0x4 CMP RAX,RCX JNZ 0x00101181 LAB_0010118c: PXOR XMM0,XMM0 CVTSI2SD XMM0,EDX PXOR XMM1,XMM1 CVTSI2SD XMM1,ESI DIVSD XMM0,XMM1 RET LAB_001011a1: MOV EDX,0x0...
double func0(int *param_1,int param_2) { int *piVar1; int iVar2; if (param_2 < 1) { iVar2 = 0; } else { piVar1 = param_1 + (ulong)(param_2 - 1) + 1; iVar2 = 0; do { iVar2 = iVar2 + *param_1; param_1 = param_1 + 1; } while (param_1 != piVar1); } return (double)iVar2 / (d...
7,438
func0
#include <assert.h>
double func0(int numbers[], int size) { int total = 0; for (int i = 0; i < size; i++) { total += numbers[i]; } return (double)total / size; }
int main() { int arr1[] = {8, 2, 3, 0, 7}; int arr2[] = {-10, -20, -30}; int arr3[] = {19, 15, 18}; assert(func0(arr1, 5) == 4.0); assert(func0(arr2, 3) == -20.0); assert(func0(arr3, 3) == 17.333333333333332); return 0; }
O2
c
func0: endbr64 test %esi,%esi jle 1180 <func0+0x40> lea -0x1(%rsi),%eax lea 0x4(%rdi,%rax,4),%rdx xor %eax,%eax nopw 0x0(%rax,%rax,1) add (%rdi),%eax add $0x4,%rdi cmp %rdx,%rdi jne 1158 <func0+0x18> pxor %xmm0,%xmm0 pxor %xmm1,%xmm1 cvtsi2sd %eax,%xmm0 cvtsi2sd %esi,%xmm1 divsd %xmm1,%...
func0: endbr64 test esi, esi jle short loc_1180 lea eax, [rsi-1] lea rdx, [rdi+rax*4+4] xor eax, eax nop word ptr [rax+rax+00h] loc_1158: add eax, [rdi] add rdi, 4 cmp rdi, rdx jnz short loc_1158 pxor xmm0, xmm0 pxor xmm1, xmm1 cvtsi2sd xmm0, eax cvtsi2sd xmm1, esi divsd x...
double func0(_DWORD *a1, int a2) { long long v2; // rdx int v3; // eax if ( a2 <= 0 ) return 0.0 / (double)a2; v2 = (long long)&a1[a2 - 1 + 1]; v3 = 0; do v3 += *a1++; while ( a1 != (_DWORD *)v2 ); return (double)v3 / (double)a2; }
func0: ENDBR64 TEST ESI,ESI JLE 0x00101180 LEA EAX,[RSI + -0x1] LEA RDX,[RDI + RAX*0x4 + 0x4] XOR EAX,EAX NOP word ptr [RAX + RAX*0x1] LAB_00101158: ADD EAX,dword ptr [RDI] ADD RDI,0x4 CMP RDI,RDX JNZ 0x00101158 PXOR XMM0,XMM0 PXOR XMM1,XMM1 CVTSI2SD XMM0,EAX CVTSI2SD XMM1,ESI DIVSD XMM0,XMM1 RET LAB_00101180: PXOR XMM...
double func0(int *param_1,int param_2) { int *piVar1; int iVar2; if (0 < param_2) { piVar1 = param_1 + (ulong)(param_2 - 1) + 1; iVar2 = 0; do { iVar2 = iVar2 + *param_1; param_1 = param_1 + 1; } while (param_1 != piVar1); return (double)iVar2 / (double)param_2; } return 0....
7,439
func0
#include <assert.h>
double func0(int numbers[], int size) { int total = 0; for (int i = 0; i < size; i++) { total += numbers[i]; } return (double)total / size; }
int main() { int arr1[] = {8, 2, 3, 0, 7}; int arr2[] = {-10, -20, -30}; int arr3[] = {19, 15, 18}; assert(func0(arr1, 5) == 4.0); assert(func0(arr2, 3) == -20.0); assert(func0(arr3, 3) == 17.333333333333332); return 0; }
O3
c
func0: endbr64 test %esi,%esi jle 11f0 <func0+0xb0> lea -0x1(%rsi),%eax cmp $0x3,%eax jbe 1201 <func0+0xc1> mov %esi,%edx mov %rdi,%rax pxor %xmm0,%xmm0 shr $0x2,%edx shl $0x4,%rdx add %rdi,%rdx nopl 0x0(%rax,%rax,1) movdqu (%rax),%xmm2 add $0x10,%rax paddd %xmm2,%xmm0 cmp %rdx,%...
func0: endbr64 mov rcx, rdi test esi, esi jle loc_11E8 lea eax, [rsi-1] cmp eax, 2 jbe loc_11F9 mov edx, esi mov rax, rdi pxor xmm0, xmm0 shr edx, 2 shl rdx, 4 add rdx, rdi xchg ax, ax loc_1170: movdqu xmm2, xmmword ptr [rax] add rax, 10h paddd xmm0, xmm2 cmp ...
double func0(const __m128i *a1, int a2) { const __m128i *v2; // rax __m128i v3; // xmm0 __m128i v4; // xmm2 int v5; // edx __m128i v6; // xmm0 int v7; // eax long long v8; // r8 if ( a2 > 0 ) { if ( (unsigned int)(a2 - 1) <= 2 ) { v5 = 0; v7 = 0; } else { v2 = a...
func0: ENDBR64 MOV RCX,RDI TEST ESI,ESI JLE 0x001011e8 LEA EAX,[RSI + -0x1] CMP EAX,0x2 JBE 0x001011f9 MOV EDX,ESI MOV RAX,RDI PXOR XMM0,XMM0 SHR EDX,0x2 SHL RDX,0x4 ADD RDX,RDI NOP LAB_00101170: MOVDQU XMM2,xmmword ptr [RAX] ADD RAX,0x10 PADDD XMM0,XMM2 CMP RAX,RDX JNZ 0x00101170 MOVDQA XMM1,XMM0 MOV EDX,ESI PSRLDQ XM...
double func0(int *param_1,uint param_2) { int iVar1; int *piVar2; int *piVar3; int *piVar4; int *piVar5; uint uVar6; int iVar7; int iVar8; int iVar9; int iVar10; if ((int)param_2 < 1) { return 0.0 / (double)(int)param_2; } if (param_2 - 1 < 3) { uVar6 = 0; iVar7 = 0; } else...
7,440
func0
#include <stdbool.h> #include <assert.h>
bool func0(int n) { if ((n ^ 1) == n - 1) return true; else return false; }
int main() { assert(func0(5) == true); assert(func0(6) == false); assert(func0(7) == true); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x4(%rbp) mov -0x4(%rbp),%eax xor $0x1,%eax mov %eax,%edx mov -0x4(%rbp),%eax sub $0x1,%eax cmp %eax,%edx jne 116d <func0+0x24> mov $0x1,%eax jmp 1172 <func0+0x29> mov $0x0,%eax pop %rbp retq
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_4], edi mov eax, [rbp+var_4] xor eax, 1 mov edx, eax mov eax, [rbp+var_4] sub eax, 1 cmp edx, eax jnz short loc_116D mov eax, 1 jmp short loc_1172 loc_116D: mov eax, 0 loc_1172: pop rbp retn
_BOOL8 func0(int a1) { return (a1 ^ 1) == a1 - 1; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x4],EDI MOV EAX,dword ptr [RBP + -0x4] XOR EAX,0x1 MOV EDX,EAX MOV EAX,dword ptr [RBP + -0x4] SUB EAX,0x1 CMP EDX,EAX JNZ 0x0010116d MOV EAX,0x1 JMP 0x00101172 LAB_0010116d: MOV EAX,0x0 LAB_00101172: POP RBP RET
bool func0(uint param_1) { return (param_1 ^ 1) == param_1 - 1; }
7,441
func0
#include <stdbool.h> #include <assert.h>
bool func0(int n) { if ((n ^ 1) == n - 1) return true; else return false; }
int main() { assert(func0(5) == true); assert(func0(6) == false); assert(func0(7) == true); return 0; }
O1
c
func0: endbr64 mov %edi,%eax xor $0x1,%eax sub $0x1,%edi cmp %edi,%eax sete %al retq
func0: endbr64 mov eax, edi xor eax, 1 sub edi, 1 cmp eax, edi setz al retn
bool func0(int a1) { return (a1 ^ 1) == a1 - 1; }
func0: ENDBR64 MOV EAX,EDI XOR EAX,0x1 SUB EDI,0x1 CMP EAX,EDI SETZ AL RET
bool func0(uint param_1) { return (param_1 ^ 1) == param_1 - 1; }
7,442
func0
#include <stdbool.h> #include <assert.h>
bool func0(int n) { if ((n ^ 1) == n - 1) return true; else return false; }
int main() { assert(func0(5) == true); assert(func0(6) == false); assert(func0(7) == true); return 0; }
O2
c
func0: endbr64 mov %edi,%eax sub $0x1,%edi xor $0x1,%eax cmp %edi,%eax sete %al retq nopw %cs:0x0(%rax,%rax,1) nopl 0x0(%rax)
func0: endbr64 mov eax, edi sub edi, 1 xor eax, 1 cmp eax, edi setz al retn
bool func0(int a1) { return (a1 ^ 1) == a1 - 1; }
func0: ENDBR64 MOV EAX,EDI SUB EDI,0x1 XOR EAX,0x1 CMP EAX,EDI SETZ AL RET
bool func0(uint param_1) { return (param_1 ^ 1) == param_1 - 1; }
7,443
func0
#include <stdbool.h> #include <assert.h>
bool func0(int n) { if ((n ^ 1) == n - 1) return true; else return false; }
int main() { assert(func0(5) == true); assert(func0(6) == false); assert(func0(7) == true); return 0; }
O3
c
func0: endbr64 mov %edi,%eax sub $0x1,%edi xor $0x1,%eax cmp %edi,%eax sete %al retq nopw %cs:0x0(%rax,%rax,1) nopl 0x0(%rax)
func0: endbr64 mov eax, edi sub edi, 1 xor eax, 1 cmp eax, edi setz al retn
bool func0(int a1) { return (a1 ^ 1) == a1 - 1; }
func0: ENDBR64 MOV EAX,EDI SUB EDI,0x1 XOR EAX,0x1 CMP EAX,EDI SETZ AL RET
bool func0(uint param_1) { return (param_1 ^ 1) == param_1 - 1; }
7,444
func0
#include <assert.h>
void func0(const int test_tup1[][2], const int test_tup2[][2], int n, int res[][2]) { for (int i = 0; i < n; i++) { for (int j = 0; j < 2; j++) { res[i][j] = test_tup1[i][j] - test_tup2[i][j]; } } }
int main() { int res[4][2]; int test1_1[4][2] = {{1, 3}, {4, 5}, {2, 9}, {1, 10}}; int test1_2[4][2] = {{6, 7}, {3, 9}, {1, 1}, {7, 3}}; int expected1[4][2] = {{-5, -4}, {1, -4}, {1, 8}, {-6, 7}}; func0(test1_1, test1_2, 4, res); for (int i = 0; i < 4; i++) for (int j = 0; j < 2...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x18(%rbp) mov %rsi,-0x20(%rbp) mov %edx,-0x24(%rbp) mov %rcx,-0x30(%rbp) movl $0x0,-0x8(%rbp) jmp 11f7 <func0+0x8e> movl $0x0,-0x4(%rbp) jmp 11ed <func0+0x84> mov -0x8(%rbp),%eax cltq lea 0x0(,%rax,8),%rdx mov -0x18(%rbp),%rax add ...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_18], rdi mov [rbp+var_20], rsi mov [rbp+var_24], edx mov [rbp+var_30], rcx mov [rbp+var_8], 0 jmp short loc_11F7 loc_1189: mov [rbp+var_4], 0 jmp short loc_11ED loc_1192: mov eax, [rbp+var_8] cdqe lea rdx, ds:0[rax*8] mov ...
long long func0(long long a1, long long a2, int a3, long long a4) { long long result; // rax unsigned int i; // [rsp+28h] [rbp-8h] int j; // [rsp+2Ch] [rbp-4h] for ( i = 0; ; ++i ) { result = i; if ( (int)i >= a3 ) break; for ( j = 0; j <= 1; ++j ) *(_DWORD *)(8LL * (int)i + a4 + 4LL...
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI MOV dword ptr [RBP + -0x24],EDX MOV qword ptr [RBP + -0x30],RCX MOV dword ptr [RBP + -0x8],0x0 JMP 0x001011f7 LAB_00101189: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001011ed LAB_00101192: MOV EAX,dword ptr [RBP + -0x8] CDQE ...
void func0(long param_1,long param_2,int param_3,long param_4) { int4 local_10; int4 local_c; for (local_10 = 0; local_10 < param_3; local_10 = local_10 + 1) { for (local_c = 0; local_c < 2; local_c = local_c + 1) { *(int *)(param_4 + (long)local_10 * 8 + (long)local_c * 4) = *(int *)((lo...
7,445
func0
#include <assert.h>
void func0(const int test_tup1[][2], const int test_tup2[][2], int n, int res[][2]) { for (int i = 0; i < n; i++) { for (int j = 0; j < 2; j++) { res[i][j] = test_tup1[i][j] - test_tup2[i][j]; } } }
int main() { int res[4][2]; int test1_1[4][2] = {{1, 3}, {4, 5}, {2, 9}, {1, 10}}; int test1_2[4][2] = {{6, 7}, {3, 9}, {1, 1}, {7, 3}}; int expected1[4][2] = {{-5, -4}, {1, -4}, {1, 8}, {-6, 7}}; func0(test1_1, test1_2, 4, res); for (int i = 0; i < 4; i++) for (int j = 0; j < 2...
O1
c
func0: endbr64 test %edx,%edx jle 119b <func0+0x32> lea -0x1(%rdx),%r8d mov $0x0,%eax mov (%rdi,%rax,8),%edx sub (%rsi,%rax,8),%edx mov %edx,(%rcx,%rax,8) mov 0x4(%rdi,%rax,8),%edx sub 0x4(%rsi,%rax,8),%edx mov %edx,0x4(%rcx,%rax,8) mov %rax,%rdx add $0x1,%rax cmp %r8,%rdx jne 1...
func0: endbr64 test edx, edx jle short locret_1197 mov r8d, edx mov eax, 0 loc_1179: mov edx, [rdi+rax*8] sub edx, [rsi+rax*8] mov [rcx+rax*8], edx mov edx, [rdi+rax*8+4] sub edx, [rsi+rax*8+4] mov [rcx+rax*8+4], edx add rax, 1 cmp rax, r8 jnz short loc_1179 locret_119...
void func0(long long a1, long long a2, int a3, long long a4) { long long i; // rax if ( a3 > 0 ) { for ( i = 0LL; i != a3; ++i ) { *(_DWORD *)(a4 + 8 * i) = *(_DWORD *)(a1 + 8 * i) - *(_DWORD *)(a2 + 8 * i); *(_DWORD *)(a4 + 8 * i + 4) = *(_DWORD *)(a1 + 8 * i + 4) - *(_DWORD *)(a2 + 8 * i +...
func0: ENDBR64 TEST EDX,EDX JLE 0x00101197 MOV R8D,EDX MOV EAX,0x0 LAB_00101179: MOV EDX,dword ptr [RDI + RAX*0x8] SUB EDX,dword ptr [RSI + RAX*0x8] MOV dword ptr [RCX + RAX*0x8],EDX MOV EDX,dword ptr [RDI + RAX*0x8 + 0x4] SUB EDX,dword ptr [RSI + RAX*0x8 + 0x4] MOV dword ptr [RCX + RAX*0x8 + 0x4],EDX ADD RAX,0x1 CMP R...
void func0(long param_1,long param_2,uint param_3,long param_4) { ulong uVar1; if (0 < (int)param_3) { uVar1 = 0; do { *(int *)(param_4 + uVar1 * 8) = *(int *)(param_1 + uVar1 * 8) - *(int *)(param_2 + uVar1 * 8); *(int *)(param_4 + 4 + uVar1 * 8) = *(int *)(param_1 + 4 + uVar1 * ...
7,446
func0
#include <assert.h>
void func0(const int test_tup1[][2], const int test_tup2[][2], int n, int res[][2]) { for (int i = 0; i < n; i++) { for (int j = 0; j < 2; j++) { res[i][j] = test_tup1[i][j] - test_tup2[i][j]; } } }
int main() { int res[4][2]; int test1_1[4][2] = {{1, 3}, {4, 5}, {2, 9}, {1, 10}}; int test1_2[4][2] = {{6, 7}, {3, 9}, {1, 1}, {7, 3}}; int expected1[4][2] = {{-5, -4}, {1, -4}, {1, 8}, {-6, 7}}; func0(test1_1, test1_2, 4, res); for (int i = 0; i < 4; i++) for (int j = 0; j < 2...
O2
c
func0: endbr64 test %edx,%edx jle 1581 <func0+0x31> lea -0x1(%rdx),%r8d xor %eax,%eax xchg %ax,%ax mov (%rdi,%rax,8),%edx sub (%rsi,%rax,8),%edx mov %edx,(%rcx,%rax,8) mov 0x4(%rdi,%rax,8),%edx sub 0x4(%rsi,%rax,8),%edx mov %edx,0x4(%rcx,%rax,8) mov %rax,%rdx add $0x1,%rax cmp %r...
func0: endbr64 test edx, edx jle short locret_154E movsxd r8, edx xor eax, eax nop dword ptr [rax] loc_1530: mov edx, [rdi+rax*8] sub edx, [rsi+rax*8] mov [rcx+rax*8], edx mov edx, [rdi+rax*8+4] sub edx, [rsi+rax*8+4] mov [rcx+rax*8+4], edx add rax, 1 cmp r8, rax jnz ...
void func0(long long a1, long long a2, int a3, long long a4) { long long i; // rax if ( a3 > 0 ) { for ( i = 0LL; i != a3; ++i ) { *(_DWORD *)(a4 + 8 * i) = *(_DWORD *)(a1 + 8 * i) - *(_DWORD *)(a2 + 8 * i); *(_DWORD *)(a4 + 8 * i + 4) = *(_DWORD *)(a1 + 8 * i + 4) - *(_DWORD *)(a2 + 8 * i +...
func0: ENDBR64 TEST EDX,EDX JLE 0x0010154e MOVSXD R8,EDX XOR EAX,EAX NOP dword ptr [RAX] LAB_00101530: MOV EDX,dword ptr [RDI + RAX*0x8] SUB EDX,dword ptr [RSI + RAX*0x8] MOV dword ptr [RCX + RAX*0x8],EDX MOV EDX,dword ptr [RDI + RAX*0x8 + 0x4] SUB EDX,dword ptr [RSI + RAX*0x8 + 0x4] MOV dword ptr [RCX + RAX*0x8 + 0x4]...
void func0(long param_1,long param_2,int param_3,long param_4) { long lVar1; if (0 < param_3) { lVar1 = 0; do { *(int *)(param_4 + lVar1 * 8) = *(int *)(param_1 + lVar1 * 8) - *(int *)(param_2 + lVar1 * 8); *(int *)(param_4 + 4 + lVar1 * 8) = *(int *)(param_1 + 4 + lVar1 * 8) - *(...
7,447
func0
#include <assert.h>
void func0(const int test_tup1[][2], const int test_tup2[][2], int n, int res[][2]) { for (int i = 0; i < n; i++) { for (int j = 0; j < 2; j++) { res[i][j] = test_tup1[i][j] - test_tup2[i][j]; } } }
int main() { int res[4][2]; int test1_1[4][2] = {{1, 3}, {4, 5}, {2, 9}, {1, 10}}; int test1_2[4][2] = {{6, 7}, {3, 9}, {1, 1}, {7, 3}}; int expected1[4][2] = {{-5, -4}, {1, -4}, {1, 8}, {-6, 7}}; func0(test1_1, test1_2, 4, res); for (int i = 0; i < 4; i++) for (int j = 0; j < 2...
O3
c
func0: endbr64 test %edx,%edx jle 1511 <func0+0xb1> lea 0xf(%rsi),%rax sub %rcx,%rax cmp $0x1e,%rax seta %r8b cmp $0x1,%edx setne %al test %al,%r8b je 14e5 <func0+0x85> lea 0xf(%rdi),%rax sub %rcx,%rax cmp $0x1e,%rax jbe 14e5 <func0+0x85> mov %edx,%eax xor %r8d,%r8d shr %e...
func0: endbr64 test edx, edx jle locret_11EC lea rax, [rdi+0Fh] sub rax, rcx cmp rax, 1Eh jbe short loc_11B9 lea rax, [rsi+0Fh] sub rax, rcx cmp rax, 1Eh jbe short loc_11B9 cmp edx, 1 jz loc_11EE mov r8d, edx xor eax, eax shr r8d, 1 shl r8, 4 nop dword...
void func0(long long a1, long long a2, int a3, long long a4) { long long v4; // rax long long v5; // rax long long v6; // rax long long v7; // rdx if ( a3 > 0 ) { if ( (unsigned long long)(a1 + 15 - a4) <= 0x1E || (unsigned long long)(a2 + 15 - a4) <= 0x1E ) { v6 = 0LL; v7 = 8LL * a3; ...
func0: ENDBR64 TEST EDX,EDX JLE 0x001011ec LEA RAX,[RDI + 0xf] SUB RAX,RCX CMP RAX,0x1e JBE 0x001011b9 LEA RAX,[RSI + 0xf] SUB RAX,RCX CMP RAX,0x1e JBE 0x001011b9 CMP EDX,0x1 JZ 0x001011ee MOV R8D,EDX XOR EAX,EAX SHR R8D,0x1 SHL R8,0x4 NOP dword ptr [RAX + RAX*0x1] LAB_00101180: MOVDQU XMM0,xmmword ptr [RDI + RAX*0x1] ...
void func0(long param_1,long param_2,uint param_3,long param_4) { int *piVar1; int *piVar2; int *piVar3; int8 uVar4; int8 uVar5; int iVar6; int iVar7; int iVar8; int iVar9; int iVar10; int iVar11; long lVar12; ulong uVar13; if (0 < (int)param_3) { if ((0x1e < (ulong)((param_1 + 0xf) ...
7,448
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> #include <string.h> int compare_desc(const void* a, const void* b) { return (*(int*)b - *(int*)a); }
void func0(int** lists, int* sizes, int num_lists) { for(int i = 0; i < num_lists; i++) { qsort(lists[i], sizes[i], sizeof(int), compare_desc); } }
int main() { // First test case int list1_1[] = {1, 2, 3, 4}; int list1_2[] = {5, 6, 7, 8}; int list1_3[] = {9, 10, 11, 12}; int list1_4[] = {13, 14, 15, 16}; int* lists1[] = {list1_1, list1_2, list1_3, list1_4}; int sizes1[] = {4, 4, 4, 4}; func0(lists1, sizes1, 4); int exp...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x30,%rsp mov %rdi,-0x18(%rbp) mov %rsi,-0x20(%rbp) mov %edx,-0x24(%rbp) movl $0x0,-0x4(%rbp) jmp 1233 <func0+0x68> mov -0x4(%rbp),%eax cltq lea 0x0(,%rax,4),%rdx mov -0x20(%rbp),%rax add %rdx,%rax mov (%rax),%eax movslq %eax,%rsi mov -...
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 [rbp+var_4], 0 jmp short loc_1236 loc_11EB: mov eax, [rbp+var_4] cdqe lea rdx, ds:0[rax*4] mov rax, [rbp+var_20] add rax, rdx mov eax, [rax] movsxd ...
long long func0(long long a1, long long a2, int a3) { long long result; // rax unsigned int i; // [rsp+2Ch] [rbp-4h] for ( i = 0; ; ++i ) { result = i; if ( (int)i >= a3 ) break; qsort(*(void **)(8LL * (int)i + a1), *(int *)(4LL * (int)i + a2), 4uLL, compare_desc); } return result; }
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 dword ptr [RBP + -0x4],0x0 JMP 0x00101236 LAB_001011eb: MOV EAX,dword ptr [RBP + -0x4] CDQE LEA RDX,[RAX*0x4] MOV RAX,qword ptr [RBP + -0x20] ADD RAX,RDX MOV EAX,dword ptr...
void func0(long param_1,long param_2,int param_3) { int local_c; for (local_c = 0; local_c < param_3; local_c = local_c + 1) { qsort(*(void **)(param_1 + (long)local_c * 8),(long)*(int *)(param_2 + (long)local_c * 4),4, compare_desc); } return; }
7,449
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> #include <string.h> int compare_desc(const void* a, const void* b) { return (*(int*)b - *(int*)a); }
void func0(int** lists, int* sizes, int num_lists) { for(int i = 0; i < num_lists; i++) { qsort(lists[i], sizes[i], sizeof(int), compare_desc); } }
int main() { // First test case int list1_1[] = {1, 2, 3, 4}; int list1_2[] = {5, 6, 7, 8}; int list1_3[] = {9, 10, 11, 12}; int list1_4[] = {13, 14, 15, 16}; int* lists1[] = {list1_1, list1_2, list1_3, list1_4}; int sizes1[] = {4, 4, 4, 4}; func0(lists1, sizes1, 4); int exp...
O1
c
func0: endbr64 test %edx,%edx jle 1203 <func0+0x51> push %r14 push %r13 push %r12 push %rbp push %rbx mov %rdi,%rbp mov %rsi,%r12 lea -0x1(%rdx),%r14d mov $0x0,%ebx lea -0x2f(%rip),%r13 movslq (%r12,%rbx,4),%rsi mov 0x0(%rbp,%rbx,8),%rdi mov %r13,%rcx mov $0x4,%edx callq 1080 <qs...
func0: endbr64 test edx, edx jle short locret_11FE push r14 push r13 push r12 push rbp push rbx mov r12, rdi mov r13, rsi mov ebp, edx mov ebx, 0 lea r14, compare_desc loc_11D6: movsxd rsi, dword ptr [r13+rbx*4+0] mov rdi, [r12+rbx*8] mov rcx, r14 mov edx, 4 call ...
long long func0(long long a1, long long a2, int a3) { long long v3; // rbp long long i; // rbx long long result; // rax if ( a3 > 0 ) { v3 = (unsigned int)a3; for ( i = 0LL; i != v3; ++i ) result = qsort(*(_QWORD *)(a1 + 8 * i), *(int *)(a2 + 4 * i), 4LL, compare_desc); } return result; }
func0: ENDBR64 TEST EDX,EDX JLE 0x001011fe PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV R12,RDI MOV R13,RSI MOV EBP,EDX MOV EBX,0x0 LEA R14,[0x1011a9] LAB_001011d6: MOVSXD RSI,dword ptr [R13 + RBX*0x4] MOV RDI,qword ptr [R12 + RBX*0x8] MOV RCX,R14 MOV EDX,0x4 CALL 0x00101080 ADD RBX,0x1 CMP RBX,RBP JNZ 0x001011d6 P...
void func0(long param_1,long param_2,uint param_3) { ulong uVar1; if (0 < (int)param_3) { uVar1 = 0; do { qsort(*(void **)(param_1 + uVar1 * 8),(long)*(int *)(param_2 + uVar1 * 4),4,compare_desc); uVar1 = uVar1 + 1; } while (uVar1 != param_3); return; } return; }
7,450
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> #include <string.h> int compare_desc(const void* a, const void* b) { return (*(int*)b - *(int*)a); }
void func0(int** lists, int* sizes, int num_lists) { for(int i = 0; i < num_lists; i++) { qsort(lists[i], sizes[i], sizeof(int), compare_desc); } }
int main() { // First test case int list1_1[] = {1, 2, 3, 4}; int list1_2[] = {5, 6, 7, 8}; int list1_3[] = {9, 10, 11, 12}; int list1_4[] = {13, 14, 15, 16}; int* lists1[] = {list1_1, list1_2, list1_3, list1_4}; int sizes1[] = {4, 4, 4, 4}; func0(lists1, sizes1, 4); int exp...
O2
c
func0: endbr64 test %edx,%edx jle 16d8 <func0+0x58> push %r14 mov %rdi,%r14 push %r13 lea -0x1(%rdx),%r13d push %r12 lea -0x2c(%rip),%r12 push %rbp mov %rsi,%rbp push %rbx xor %ebx,%ebx nopl 0x0(%rax,%rax,1) movslq 0x0(%rbp,%rbx,4),%rsi mov (%r14,%rbx,8),%rdi mov %r12,%rcx mov $...
func0: endbr64 test edx, edx jle short locret_1690 push r14 mov r14, rdi push r13 lea r13, compare_desc push r12 mov r12, rsi push rbp movsxd rbp, edx push rbx xor ebx, ebx nop word ptr [rax+rax+00h] loc_1668: movsxd rsi, dword ptr [r12+rbx*4] mov rdi, [r14+rbx*8] mov ...
long long func0(long long a1, long long a2, int a3) { long long v5; // rbp long long i; // rbx long long v7; // rsi long long v8; // rdi long long result; // rax if ( a3 > 0 ) { v5 = a3; for ( i = 0LL; i != v5; ++i ) { v7 = *(int *)(a2 + 4 * i); v8 = *(_QWORD *)(a1 + 8 * i); ...
func0: ENDBR64 TEST EDX,EDX JLE 0x00101690 PUSH R14 MOV R14,RDI PUSH R13 LEA R13,[0x101630] PUSH R12 MOV R12,RSI PUSH RBP MOVSXD RBP,EDX PUSH RBX XOR EBX,EBX NOP word ptr [RAX + RAX*0x1] LAB_00101668: MOVSXD RSI,dword ptr [R12 + RBX*0x4] MOV RDI,qword ptr [R14 + RBX*0x8] MOV RCX,R13 MOV EDX,0x4 ADD RBX,0x1 CALL 0x00101...
void func0(long param_1,long param_2,int param_3) { long lVar1; long lVar2; long lVar3; if (0 < param_3) { lVar3 = 0; do { lVar1 = lVar3 * 4; lVar2 = lVar3 * 8; lVar3 = lVar3 + 1; qsort(*(void **)(param_1 + lVar2),(long)*(int *)(param_2 + lVar1),4,compare_desc); } while (...
7,451
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> #include <string.h> int compare_desc(const void* a, const void* b) { return (*(int*)b - *(int*)a); }
void func0(int** lists, int* sizes, int num_lists) { for(int i = 0; i < num_lists; i++) { qsort(lists[i], sizes[i], sizeof(int), compare_desc); } }
int main() { // First test case int list1_1[] = {1, 2, 3, 4}; int list1_2[] = {5, 6, 7, 8}; int list1_3[] = {9, 10, 11, 12}; int list1_4[] = {13, 14, 15, 16}; int* lists1[] = {list1_1, list1_2, list1_3, list1_4}; int sizes1[] = {4, 4, 4, 4}; func0(lists1, sizes1, 4); int exp...
O3
c
func0: endbr64 test %edx,%edx jle 1658 <func0+0x58> push %r14 mov %rdi,%r14 push %r13 lea -0x1(%rdx),%r13d push %r12 lea -0x2c(%rip),%r12 push %rbp mov %rsi,%rbp push %rbx xor %ebx,%ebx nopl 0x0(%rax,%rax,1) movslq 0x0(%rbp,%rbx,4),%rsi mov (%r14,%rbx,8),%rdi mov %r12,%rcx mov $...
func0: endbr64 test edx, edx jle short locret_1620 push r13 movsxd rdx, edx push r12 lea r13, [rsi+rdx*4] lea r12, compare_desc push rbp mov rbp, rdi push rbx mov rbx, rsi sub rsp, 8 nop word ptr [rax+rax+00000000h] loc_15F0: movsxd rsi, dword ptr [rbx]; nmemb mov rdi, [...
void func0(void **a1, int *a2, int a3) { int *v3; // r13 int *v5; // rbx size_t v6; // rsi void *v7; // rdi if ( a3 > 0 ) { v3 = &a2[a3]; v5 = a2; do { v6 = *v5; v7 = *a1; ++v5; ++a1; qsort(v7, v6, 4uLL, compare_desc); } while ( v5 != v3 ); } }
func0: ENDBR64 TEST EDX,EDX JLE 0x00101620 PUSH R13 MOVSXD RDX,EDX PUSH R12 LEA R13,[RSI + RDX*0x4] LEA R12,[0x1015b0] PUSH RBP MOV RBP,RDI PUSH RBX MOV RBX,RSI SUB RSP,0x8 NOP word ptr CS:[RAX + RAX*0x1] LAB_001015f0: MOVSXD RSI,dword ptr [RBX] MOV RDI,qword ptr [RBP] MOV RCX,R12 MOV EDX,0x4 ADD RBX,0x4 ADD RBP,0x8 CA...
void func0(int8 *param_1,int *param_2,int param_3) { int *piVar1; int iVar2; void *__base; if (0 < param_3) { piVar1 = param_2 + param_3; do { iVar2 = *param_2; __base = (void *)*param_1; param_2 = param_2 + 1; param_1 = param_1 + 1; qsort(__base,(long)iVar2,4,compare_d...
7,452
func0
#include <assert.h>
int func0(int arr1[], int arr2[], int n) { for (int i = 0; i < n; i++) { if (arr1[i] != arr2[i]) { return i; } } return n; }
int main() { int arr1_1[] = {1, 2, 3, 4}; int arr2_1[] = {1, 2, 3}; int arr1_2[] = {2, 4, 6, 8, 10}; int arr2_2[] = {2, 4, 6, 8}; int arr1_3[] = {1, 3, 5, 7, 9, 11}; int arr2_3[] = {1, 3, 5, 7, 9}; assert(func0(arr1_1, arr2_1, 3) == 3); assert(func0(arr1_2, arr2_2, 4) == 4); ...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x18(%rbp) mov %rsi,-0x20(%rbp) mov %edx,-0x24(%rbp) movl $0x0,-0x4(%rbp) jmp 11be <func0+0x55> mov -0x4(%rbp),%eax cltq lea 0x0(,%rax,4),%rdx mov -0x18(%rbp),%rax add %rdx,%rax mov (%rax),%edx mov -0x4(%rbp),%eax cltq lea 0x0(,%ra...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_18], rdi mov [rbp+var_20], rsi mov [rbp+var_24], edx mov [rbp+var_4], 0 jmp short loc_11BE loc_1185: mov eax, [rbp+var_4] cdqe lea rdx, ds:0[rax*4] mov rax, [rbp+var_18] add rax, rdx mov edx, [rax] mov eax, [rbp+var_4] ...
long long func0(long long a1, long long a2, unsigned int a3) { unsigned int i; // [rsp+20h] [rbp-4h] for ( i = 0; (int)i < (int)a3; ++i ) { if ( *(_DWORD *)(4LL * (int)i + a1) != *(_DWORD *)(4LL * (int)i + a2) ) return i; } return a3; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI MOV dword ptr [RBP + -0x24],EDX MOV dword ptr [RBP + -0x4],0x0 JMP 0x001011be LAB_00101185: MOV EAX,dword ptr [RBP + -0x4] CDQE LEA RDX,[RAX*0x4] MOV RAX,qword ptr [RBP + -0x18] ADD RAX,RDX MOV EDX,dword ptr [RAX] MOV EA...
int func0(long param_1,long param_2,int param_3) { int iVar1; int local_c; local_c = 0; while ((iVar1 = param_3, local_c < param_3 && (iVar1 = local_c, *(int *)(param_1 + (long)local_c * 4) == *(int *)(param_2 + (long)local_c * 4)))) { local_c = local_c + 1; } return iVar1; }
7,453
func0
#include <assert.h>
int func0(int arr1[], int arr2[], int n) { for (int i = 0; i < n; i++) { if (arr1[i] != arr2[i]) { return i; } } return n; }
int main() { int arr1_1[] = {1, 2, 3, 4}; int arr2_1[] = {1, 2, 3}; int arr1_2[] = {2, 4, 6, 8, 10}; int arr2_2[] = {2, 4, 6, 8}; int arr1_3[] = {1, 3, 5, 7, 9, 11}; int arr2_3[] = {1, 3, 5, 7, 9}; assert(func0(arr1_1, arr2_1, 3) == 3); assert(func0(arr1_2, arr2_2, 4) == 4); ...
O1
c
func0: endbr64 mov %edx,%eax test %edx,%edx jle 1195 <func0+0x2c> lea -0x1(%rdx),%r9d mov $0x0,%ecx jmp 1181 <func0+0x18> mov %r8,%rcx mov (%rsi,%rcx,4),%edx cmp %edx,(%rdi,%rcx,4) jne 1193 <func0+0x2a> lea 0x1(%rcx),%r8 cmp %r9,%rcx jne 117e <func0+0x15> retq mov %ecx,%eax retq...
func0: endbr64 mov eax, edx test edx, edx jle short locret_118F mov r9d, edx mov ecx, 0 loc_117B: mov edx, [rsi+rcx*4] cmp [rdi+rcx*4], edx jnz short loc_118D add rcx, 1 cmp rcx, r9 jnz short loc_117B retn loc_118D: mov eax, ecx locret_118F: retn
long long func0(long long a1, long long a2, int a3) { long long result; // rax long long v4; // rcx result = (unsigned int)a3; if ( a3 > 0 ) { v4 = 0LL; while ( *(_DWORD *)(a1 + 4 * v4) == *(_DWORD *)(a2 + 4 * v4) ) { if ( ++v4 == a3 ) return result; } return (unsigned int)...
func0: ENDBR64 MOV EAX,EDX TEST EDX,EDX JLE 0x0010118f MOV R9D,EDX MOV ECX,0x0 LAB_0010117b: MOV EDX,dword ptr [RSI + RCX*0x4] CMP dword ptr [RDI + RCX*0x4],EDX JNZ 0x0010118d ADD RCX,0x1 CMP RCX,R9 JNZ 0x0010117b RET LAB_0010118d: MOV EAX,ECX LAB_0010118f: RET
ulong func0(long param_1,long param_2,ulong param_3) { ulong uVar1; ulong uVar2; uVar1 = param_3 & 0xffffffff; if (0 < (int)param_3) { uVar2 = 0; while (*(int *)(param_1 + uVar2 * 4) == *(int *)(param_2 + uVar2 * 4)) { uVar2 = uVar2 + 1; if (uVar2 == (param_3 & 0xffffffff)) { ret...
7,454
func0
#include <assert.h>
int func0(int arr1[], int arr2[], int n) { for (int i = 0; i < n; i++) { if (arr1[i] != arr2[i]) { return i; } } return n; }
int main() { int arr1_1[] = {1, 2, 3, 4}; int arr2_1[] = {1, 2, 3}; int arr1_2[] = {2, 4, 6, 8, 10}; int arr2_2[] = {2, 4, 6, 8}; int arr1_3[] = {1, 3, 5, 7, 9, 11}; int arr2_3[] = {1, 3, 5, 7, 9}; assert(func0(arr1_1, arr2_1, 3) == 3); assert(func0(arr1_2, arr2_2, 4) == 4); ...
O2
c
func0: endbr64 mov %edx,%eax test %edx,%edx jle 116e <func0+0x2e> lea -0x1(%rdx),%r9d xor %ecx,%ecx jmp 1164 <func0+0x24> nopw 0x0(%rax,%rax,1) lea 0x1(%rcx),%r8 cmp %r9,%rcx je 1170 <func0+0x30> mov %r8,%rcx mov (%rsi,%rcx,4),%edx cmp %edx,(%rdi,%rcx,4) je 1158 <func0+0x18> mo...
func0: endbr64 mov eax, edx test edx, edx jle short locret_12DB movsxd r8, edx xor ecx, ecx jmp short loc_12D1 loc_12C8: add rcx, 1 cmp rcx, r8 jz short locret_12E0 loc_12D1: mov edx, [rsi+rcx*4] cmp [rdi+rcx*4], edx jz short loc_12C8 mov eax, ecx locret_12DB: retn locr...
long long func0(long long a1, long long a2, int a3) { long long result; // rax long long v4; // rcx result = (unsigned int)a3; if ( a3 > 0 ) { v4 = 0LL; while ( *(_DWORD *)(a1 + 4 * v4) == *(_DWORD *)(a2 + 4 * v4) ) { if ( ++v4 == a3 ) return result; } return (unsigned int)...
func0: ENDBR64 MOV EAX,EDX TEST EDX,EDX JLE 0x001012db MOVSXD R8,EDX XOR ECX,ECX JMP 0x001012d1 LAB_001012c8: ADD RCX,0x1 CMP RCX,R8 JZ 0x001012e0 LAB_001012d1: MOV EDX,dword ptr [RSI + RCX*0x4] CMP dword ptr [RDI + RCX*0x4],EDX JZ 0x001012c8 MOV EAX,ECX LAB_001012db: RET LAB_001012e0: RET
ulong func0(long param_1,long param_2,ulong param_3) { ulong uVar1; ulong uVar2; uVar1 = param_3 & 0xffffffff; if (0 < (int)param_3) { uVar2 = 0; while (*(int *)(param_1 + uVar2 * 4) == *(int *)(param_2 + uVar2 * 4)) { uVar2 = uVar2 + 1; if (uVar2 == (long)(int)param_3) { return ...
7,455
func0
#include <assert.h>
int func0(int arr1[], int arr2[], int n) { for (int i = 0; i < n; i++) { if (arr1[i] != arr2[i]) { return i; } } return n; }
int main() { int arr1_1[] = {1, 2, 3, 4}; int arr2_1[] = {1, 2, 3}; int arr1_2[] = {2, 4, 6, 8, 10}; int arr2_2[] = {2, 4, 6, 8}; int arr1_3[] = {1, 3, 5, 7, 9, 11}; int arr2_3[] = {1, 3, 5, 7, 9}; assert(func0(arr1_1, arr2_1, 3) == 3); assert(func0(arr1_2, arr2_2, 4) == 4); ...
O3
c
func0: endbr64 mov %edx,%eax test %edx,%edx jle 122e <func0+0x2e> lea -0x1(%rdx),%r9d xor %ecx,%ecx jmp 1224 <func0+0x24> nopw 0x0(%rax,%rax,1) lea 0x1(%rcx),%r8 cmp %r9,%rcx je 1230 <func0+0x30> mov %r8,%rcx mov (%rsi,%rcx,4),%edx cmp %edx,(%rdi,%rcx,4) je 1218 <func0+0x18> mo...
func0: endbr64 mov eax, edx test edx, edx jle short locret_1170 movsxd r8, edx xor ecx, ecx jmp short loc_1161 loc_1158: add rcx, 1 cmp rcx, r8 jz short locret_1170 loc_1161: mov edx, [rsi+rcx*4] cmp [rdi+rcx*4], edx jz short loc_1158 mov eax, ecx retn locret_1170: retn
long long func0(long long a1, long long a2, int a3) { long long result; // rax long long v4; // rcx result = (unsigned int)a3; if ( a3 > 0 ) { v4 = 0LL; while ( *(_DWORD *)(a1 + 4 * v4) == *(_DWORD *)(a2 + 4 * v4) ) { if ( ++v4 == a3 ) return result; } return (unsigned int)...
func0: ENDBR64 MOV EAX,EDX TEST EDX,EDX JLE 0x00101170 MOVSXD R8,EDX XOR ECX,ECX JMP 0x00101161 LAB_00101158: ADD RCX,0x1 CMP RCX,R8 JZ 0x00101170 LAB_00101161: MOV EDX,dword ptr [RSI + RCX*0x4] CMP dword ptr [RDI + RCX*0x4],EDX JZ 0x00101158 MOV EAX,ECX RET LAB_00101170: RET
ulong func0(long param_1,long param_2,ulong param_3) { ulong uVar1; if (0 < (int)param_3) { uVar1 = 0; do { if (*(int *)(param_1 + uVar1 * 4) != *(int *)(param_2 + uVar1 * 4)) { return uVar1 & 0xffffffff; } uVar1 = uVar1 + 1; } while (uVar1 != (long)(int)param_3); } ret...
7,456
func0
#include <assert.h> #include <stdbool.h>
bool func0(int A, int B) { while (A > 0 && B > 0) { A = A / 10; B = B / 10; } if (A == 0 && B == 0) { return true; } return false; }
int main() { assert(func0(12, 1) == false); assert(func0(2, 2) == true); assert(func0(10, 20) == true); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x4(%rbp) mov %esi,-0x8(%rbp) jmp 1195 <func0+0x4c> mov -0x4(%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,-0x4(%rbp) mov -0x8(%rbp),%eax mov...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_4], edi mov [rbp+var_8], esi jmp short loc_1195 loc_1159: mov eax, [rbp+var_4] 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_4], eax mov eax, [rb...
_BOOL8 func0(int a1, int a2) { while ( a1 > 0 && a2 > 0 ) { a1 /= 10; a2 /= 10; } return !a1 && !a2; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x4],EDI MOV dword ptr [RBP + -0x8],ESI JMP 0x00101195 LAB_00101159: MOV EAX,dword ptr [RBP + -0x4] 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 + -0x4],EAX MOV EAX,dword ptr [RBP + -0...
int8 func0(int param_1,int param_2) { int8 uVar1; int4 local_10; int4 local_c; local_c = param_1; for (local_10 = param_2; (0 < local_c && (0 < local_10)); local_10 = local_10 / 10) { local_c = local_c / 10; } if ((local_c == 0) && (local_10 == 0)) { uVar1 = 1; } else { uVar1 = 0; } ...
7,457
func0
#include <assert.h> #include <stdbool.h>
bool func0(int A, int B) { while (A > 0 && B > 0) { A = A / 10; B = B / 10; } if (A == 0 && B == 0) { return true; } return false; }
int main() { assert(func0(12, 1) == false); assert(func0(2, 2) == true); assert(func0(10, 20) == true); return 0; }
O1
c
func0: endbr64 test %edi,%edi jle 118d <func0+0x44> test %esi,%esi jle 118d <func0+0x44> mov %edi,%edx movslq %edi,%rax imul $0x66666667,%rax,%rax sar $0x22,%rax sar $0x1f,%edi sub %edi,%eax mov %eax,%edi mov %esi,%ecx movslq %esi,%rax imul $0x66666667,%rax,%rax sar $0x22,%rax sar ...
func0: endbr64 test edi, edi jle short loc_1191 test esi, esi jle short loc_1191 loc_1155: mov edx, edi movsxd rax, edi imul rax, 66666667h sar rax, 22h mov ecx, edi sar ecx, 1Fh sub eax, ecx mov edi, eax mov r8d, esi movsxd rax, esi imul rax, 66666667h sar rax, 22h...
bool func0(int a1, int a2) { int v2; // edx int v3; // r8d if ( a1 > 0 && a2 > 0 ) { do { v2 = a1; a1 /= 10; v3 = a2; a2 /= 10; } while ( v2 > 9 && v3 > 9 ); } return (a2 | a1) == 0; }
func0: ENDBR64 TEST EDI,EDI JLE 0x00101191 TEST ESI,ESI JLE 0x00101191 LAB_00101155: MOV EDX,EDI MOVSXD RAX,EDI IMUL RAX,RAX,0x66666667 SAR RAX,0x22 MOV ECX,EDI SAR ECX,0x1f SUB EAX,ECX MOV EDI,EAX MOV R8D,ESI MOVSXD RAX,ESI IMUL RAX,RAX,0x66666667 SAR RAX,0x22 SAR ESI,0x1f SUB EAX,ESI MOV ESI,EAX CMP EDX,0x9 JLE 0x001...
bool func0(int param_1,int param_2) { bool bVar1; int iVar2; int iVar3; if ((0 < param_1) && (iVar3 = param_1, iVar2 = param_2, 0 < param_2)) { do { param_1 = iVar3 / 10; param_2 = iVar2 / 10; if (iVar3 < 10) break; bVar1 = 9 < iVar2; iVar3 = param_1; iVar2 = param_2;...
7,458
func0
#include <assert.h> #include <stdbool.h>
bool func0(int A, int B) { while (A > 0 && B > 0) { A = A / 10; B = B / 10; } if (A == 0 && B == 0) { return true; } return false; }
int main() { assert(func0(12, 1) == false); assert(func0(2, 2) == true); assert(func0(10, 20) == true); return 0; }
O2
c
func0: endbr64 test %esi,%esi jle 120c <func0+0x3c> test %edi,%edi jle 120c <func0+0x3c> mov $0xcccccccd,%ecx nopl 0x0(%rax) mov %edi,%edi mov %esi,%esi mov %rdi,%rax imul %rcx,%rdi mov %rsi,%rdx imul %rcx,%rsi shr $0x23,%rdi shr $0x23,%rsi cmp $0x9,%eax jle 120c <func0+0x3c> ...
func0: endbr64 test esi, esi jle short loc_120C test edi, edi jle short loc_120C mov ecx, 0CCCCCCCDh nop dword ptr [rax+00000000h] loc_11E8: mov edi, edi mov esi, esi mov rax, rdi imul rdi, rcx mov rdx, rsi imul rsi, rcx shr rdi, 23h shr rsi, 23h cmp eax, 9 jle ...
bool func0(int a1, int a2) { int v2; // eax int v3; // edx if ( a2 > 0 && a1 > 0 ) { do { v2 = a1; v3 = a2; a1 /= 0xAu; a2 /= 0xAu; } while ( v2 > 9 && v3 > 9 ); } return (a2 | a1) == 0; }
func0: ENDBR64 TEST ESI,ESI JLE 0x0010120c TEST EDI,EDI JLE 0x0010120c MOV ECX,0xcccccccd NOP dword ptr [RAX] LAB_001011e8: MOV EDI,EDI MOV ESI,ESI MOV RAX,RDI IMUL RDI,RCX MOV RDX,RSI IMUL RSI,RCX SHR RDI,0x23 SHR RSI,0x23 CMP EAX,0x9 JLE 0x0010120c CMP EDX,0x9 JG 0x001011e8 LAB_0010120c: OR EDI,ESI SETZ AL RET
bool func0(ulong param_1,uint param_2) { bool bVar1; uint uVar2; int iVar3; ulong uVar4; iVar3 = (int)param_1; if ((0 < (int)param_2) && (uVar2 = param_2, 0 < iVar3)) { do { uVar4 = (param_1 & 0xffffffff) / 10; iVar3 = (int)uVar4; param_2 = uVar2 / 10; if ((int)param_1 < 10) ...
7,459
func0
#include <assert.h> #include <stdbool.h>
bool func0(int A, int B) { while (A > 0 && B > 0) { A = A / 10; B = B / 10; } if (A == 0 && B == 0) { return true; } return false; }
int main() { assert(func0(12, 1) == false); assert(func0(2, 2) == true); assert(func0(10, 20) == true); return 0; }
O3
c
func0: endbr64 test %esi,%esi jle 120c <func0+0x3c> test %edi,%edi jle 120c <func0+0x3c> mov $0xcccccccd,%ecx nopl 0x0(%rax) mov %edi,%edi mov %esi,%esi mov %rdi,%rax imul %rcx,%rdi mov %rsi,%rdx imul %rcx,%rsi shr $0x23,%rdi shr $0x23,%rsi cmp $0x9,%eax jle 120c <func0+0x3c> ...
func0: endbr64 test edi, edi jle short loc_117C test esi, esi jle short loc_117C mov ecx, 0CCCCCCCDh nop dword ptr [rax+00000000h] loc_1158: mov edi, edi mov esi, esi mov rax, rdi imul rdi, rcx mov rdx, rsi imul rsi, rcx shr rdi, 23h shr rsi, 23h cmp eax, 9 jle ...
bool func0(int a1, int a2) { int v2; // eax int v3; // edx if ( a1 > 0 && a2 > 0 ) { do { v2 = a1; v3 = a2; a1 /= 0xAu; a2 /= 0xAu; } while ( v2 > 9 && v3 > 9 ); } return (a2 | a1) == 0; }
func0: ENDBR64 TEST EDI,EDI JLE 0x0010117c TEST ESI,ESI JLE 0x0010117c MOV ECX,0xcccccccd NOP dword ptr [RAX] LAB_00101158: MOV EDI,EDI MOV ESI,ESI MOV RAX,RDI IMUL RDI,RCX MOV RDX,RSI IMUL RSI,RCX SHR RDI,0x23 SHR RSI,0x23 CMP EAX,0x9 JLE 0x0010117c CMP EDX,0x9 JG 0x00101158 LAB_0010117c: OR EDI,ESI SETZ AL RET
bool func0(ulong param_1,ulong param_2) { int iVar1; int iVar2; ulong uVar3; int iVar4; ulong uVar5; iVar4 = (int)param_1; iVar2 = (int)param_2; if ((0 < iVar4) && (0 < iVar2)) { do { uVar5 = (param_1 & 0xffffffff) / 10; iVar4 = (int)uVar5; uVar3 = (param_2 & 0xffffffff) / 10; ...
7,460
func0
#include <assert.h> #include <stdio.h> #include <string.h> #include <regex.h>
char* func0(const char* text) { static char buffer[1024]; regex_t regex; regmatch_t match; const char *cursor = text; char *bufptr = buffer; int err; err = regcomp(&regex, " +", REG_EXTENDED); if (err != 0) { return NULL; } while (*cursor != '\0') { ...
int main() { assert(strcmp(func0("python program"), "python program") == 0); assert(strcmp(func0("python programming language"), "python programming language") == 0); assert(strcmp(func0("python program"), "python program") == 0); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp add $0xffffffffffffff80,%rsp mov %rdi,-0x78(%rbp) mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax mov -0x78(%rbp),%rax mov %rax,-0x68(%rbp) lea 0x2de9(%rip),%rax mov %rax,-0x60(%rbp) lea -0x50(%rbp),%rax mov $0x1,%edx lea 0xd9d(%rip),%r...
func0: endbr64 push rbp mov rbp, rsp add rsp, 0FFFFFFFFFFFFFF80h mov [rbp+var_78], rdi mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax mov rax, [rbp+var_78] mov [rbp+string], rax lea rax, buffer_1 mov [rbp+dest], rax lea rax, [rbp+preg] mov edx, 1; cflags lea rcx...
void * func0(const char *a1) { char *v2; // rax char *dest; // [rsp+20h] [rbp-60h] regmatch_t pmatch; // [rsp+28h] [rbp-58h] BYREF regex_t preg; // [rsp+30h] [rbp-50h] BYREF unsigned long long v7; // [rsp+78h] [rbp-8h] v7 = __readfsqword(0x28u); dest = (char *)&buffer_1; if ( regcomp(&preg, " +", 1) ) ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP ADD RSP,-0x80 MOV qword ptr [RBP + -0x78],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x68],RAX LEA RAX,[0x104040] MOV qword ptr [RBP + -0x60],RAX LEA RAX,[RBP + -0x50] MOV EDX,0x1 LEA RCX,[0x102008]...
int1 * func0(char *param_1) { char *pcVar1; int iVar2; int1 *puVar3; long in_FS_OFFSET; char *local_70; char *local_68; regmatch_t local_60; regex_t local_58; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_68 = buffer_1; iVar2 = regcomp(&local_58," +",1); local_70 = param_...
7,461
func0
#include <assert.h> #include <stdio.h> #include <string.h> #include <regex.h>
char* func0(const char* text) { static char buffer[1024]; regex_t regex; regmatch_t match; const char *cursor = text; char *bufptr = buffer; int err; err = regcomp(&regex, " +", REG_EXTENDED); if (err != 0) { return NULL; } while (*cursor != '\0') { ...
int main() { assert(strcmp(func0("python program"), "python program") == 0); assert(strcmp(func0("python programming language"), "python programming language") == 0); assert(strcmp(func0("python program"), "python program") == 0); return 0; }
O1
c
func0: endbr64 push %r13 push %r12 push %rbp push %rbx sub $0x68,%rsp mov %rdi,%rbp mov %fs:0x28,%rax mov %rax,0x58(%rsp) xor %eax,%eax lea 0x10(%rsp),%rdi mov $0x1,%edx lea 0xdc9(%rip),%rsi callq 10f0 <regcomp@plt> test %eax,%eax jne 12dd <func0+0xd4> lea 0x2df1(%rip),%r12 lea ...
func0: endbr64 push r13 push r12 push rbp push rbx sub rsp, 68h mov rbp, rdi mov rax, fs:28h mov [rsp+88h+var_30], rax xor eax, eax lea rdi, [rsp+88h+var_78] mov edx, 1 lea rsi, unk_2004 call _regcomp test eax, eax jnz loc_12FD lea r12, buffer_1 lea r13, [rs...
void * func0(_BYTE *a1) { _BYTE *v1; // rbp char *v2; // r12 long long v3; // rbx char *v4; // rbx _DWORD v6[2]; // [rsp+8h] [rbp-80h] BYREF _BYTE v7[72]; // [rsp+10h] [rbp-78h] BYREF unsigned long long v8; // [rsp+58h] [rbp-30h] v1 = a1; v8 = __readfsqword(0x28u); if ( (unsigned int)regcomp(v7, &u...
func0: ENDBR64 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x68 MOV RBP,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x58],RAX XOR EAX,EAX LEA RDI,[RSP + 0x10] MOV EDX,0x1 LEA RSI,[0x102004] CALL 0x00101100 TEST EAX,EAX JNZ 0x001012fd LEA R12,[0x104040] LEA R13,[RSP + 0x8] CMP byte ptr [RBP],0x0 JZ 0x001012d1 L...
int1 * func0(char *param_1) { char cVar1; int iVar2; size_t __n; char *pcVar3; int1 *puVar4; long in_FS_OFFSET; regmatch_t local_80; regex_t local_78; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); iVar2 = regcomp(&local_78," +",1); if (iVar2 == 0) { puVar4 = buffer_1; cVa...
7,462
func0
#include <assert.h> #include <stdio.h> #include <string.h> #include <regex.h>
char* func0(const char* text) { static char buffer[1024]; regex_t regex; regmatch_t match; const char *cursor = text; char *bufptr = buffer; int err; err = regcomp(&regex, " +", REG_EXTENDED); if (err != 0) { return NULL; } while (*cursor != '\0') { ...
int main() { assert(strcmp(func0("python program"), "python program") == 0); assert(strcmp(func0("python programming language"), "python programming language") == 0); assert(strcmp(func0("python program"), "python program") == 0); return 0; }
O2
c
func0: endbr64 push %r14 mov $0x1,%edx lea 0xd02(%rip),%rsi push %r13 push %r12 push %rbp mov %rdi,%rbp push %rbx sub $0x60,%rsp mov %fs:0x28,%rax mov %rax,0x58(%rsp) xor %eax,%eax lea 0x10(%rsp),%r13 mov %r13,%rdi callq 10f0 <regcomp@plt> test %eax,%eax jne 13d0 <func0+0xe0> ...
func0: endbr64 push r14 mov edx, 1 lea rsi, unk_2004 push r13 push r12 push rbp mov rbp, rdi push rbx sub rsp, 60h mov rax, fs:28h mov [rsp+88h+var_30], rax xor eax, eax lea r13, [rsp+88h+var_78] mov rdi, r13 call _regcomp test eax, eax jnz loc_13E0 cmp b...
void * func0(_BYTE *a1) { _BYTE *v1; // rbp char *v2; // r12 char *v3; // rbx long long v4; // rax _DWORD v6[2]; // [rsp+8h] [rbp-80h] BYREF _BYTE v7[72]; // [rsp+10h] [rbp-78h] BYREF unsigned long long v8; // [rsp+58h] [rbp-30h] v1 = a1; v8 = __readfsqword(0x28u); if ( (unsigned int)regcomp(v7, &u...
func0: ENDBR64 PUSH R14 MOV EDX,0x1 LEA RSI,[0x102004] PUSH R13 PUSH R12 PUSH RBP MOV RBP,RDI PUSH RBX SUB RSP,0x60 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x58],RAX XOR EAX,EAX LEA R13,[RSP + 0x10] MOV RDI,R13 CALL 0x00101100 TEST EAX,EAX JNZ 0x001013e0 CMP byte ptr [RBP],0x0 LEA R12,[0x104040] LEA R14,[RSP +...
int1 * func0(char *param_1) { char cVar1; int iVar2; size_t __n; int1 *puVar3; long in_FS_OFFSET; regmatch_t local_80; regex_t local_78; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); iVar2 = regcomp(&local_78," +",1); if (iVar2 == 0) { puVar3 = buffer_1; cVar1 = *param_1; ...
7,463
func0
#include <assert.h> #include <stdio.h> #include <string.h> #include <regex.h>
char* func0(const char* text) { static char buffer[1024]; regex_t regex; regmatch_t match; const char *cursor = text; char *bufptr = buffer; int err; err = regcomp(&regex, " +", REG_EXTENDED); if (err != 0) { return NULL; } while (*cursor != '\0') { ...
int main() { assert(strcmp(func0("python program"), "python program") == 0); assert(strcmp(func0("python programming language"), "python programming language") == 0); assert(strcmp(func0("python program"), "python program") == 0); return 0; }
O3
c
func0: endbr64 push %r14 mov $0x1,%edx lea 0xd02(%rip),%rsi push %r13 push %r12 push %rbp mov %rdi,%rbp push %rbx sub $0x60,%rsp mov %fs:0x28,%rax mov %rax,0x58(%rsp) xor %eax,%eax lea 0x10(%rsp),%r13 mov %r13,%rdi callq 10f0 <regcomp@plt> test %eax,%eax jne 13d0 <func0+0xe0> ...
func0: endbr64 push r15 mov edx, 1; cflags lea rsi, pattern; " +" push r14 mov r14, rdi push r13 push r12 push rbp push rbx sub rsp, 68h mov rax, fs:28h mov [rsp+98h+var_40], rax xor eax, eax lea rbp, [rsp+98h+preg] mov rdi, rbp; preg call _regcomp test eax, e...
void * func0(char *string) { char *v1; // r14 unsigned long long v2; // rbx char *v3; // r13 long long rm_so; // r15 unsigned long long v5; // rdx long long v6; // rcx unsigned long long v7; // rax unsigned long long v8; // rdx char *v9; // r15 unsigned long long v10; // rax unsigned long long v11...
func0: ENDBR64 PUSH R15 MOV EDX,0x1 LEA RSI,[0x102004] PUSH R14 MOV R14,RDI PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x68 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x58],RAX XOR EAX,EAX LEA RBP,[RSP + 0x10] MOV RDI,RBP CALL 0x001010f0 TEST EAX,EAX JNZ 0x00101448 CMP byte ptr [R14],0x0 MOV EBX,0x400 LEA R12,[R...
int1 * func0(char *param_1) { char cVar1; int iVar2; ulong uVar3; ulong uVar4; ulong uVar5; int1 *puVar6; long lVar7; long in_FS_OFFSET; regmatch_t local_90; regex_t local_88; long local_40; local_40 = *(long *)(in_FS_OFFSET + 0x28); iVar2 = regcomp(&local_88," +",1); if (iVar2 == 0) { ...
7,464
func0
#include <assert.h> #include <stdlib.h>
int *func0(int **lst, int *sizes, int rows) { int *result = malloc(rows * sizeof(int)); for (int i = 0; i < rows; ++i) { result[i] = lst[i][sizes[i] - 1]; } return result; }
int main() { // Test case 1 int row1[] = {1, 2, 3}; int row2[] = {4, 5}; int row3[] = {6, 7, 8, 9}; int *list1[] = {row1, row2, row3}; int sizes1[] = {3, 2, 4}; int *result1 = func0(list1, sizes1, 3); assert(result1[0] == 3 && result1[1] == 5 && result1[2] == 9); free(result...
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 1237 <func0+0x8e> 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_1237 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 * *(int *)(4LL * i + a2) - 4 + *(_QWORD *)(8LL * i + a1)); 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 0x00101237 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) { *(int4 *)((long)pvVar1 + (long)local_14 * 4) = *(int4 *) (*(long *)(param_1 + (long)local_14 * 8) +...
7,465
func0
#include <assert.h> #include <stdlib.h>
int *func0(int **lst, int *sizes, int rows) { int *result = malloc(rows * sizeof(int)); for (int i = 0; i < rows; ++i) { result[i] = lst[i][sizes[i] - 1]; } return result; }
int main() { // Test case 1 int row1[] = {1, 2, 3}; int row2[] = {4, 5}; int row3[] = {6, 7, 8, 9}; int *list1[] = {row1, row2, row3}; int sizes1[] = {3, 2, 4}; int *result1 = func0(list1, sizes1, 3); assert(result1[0] == 3 && result1[1] == 5 && result1[2] == 9); free(result...
O1
c
func0: endbr64 push %r12 push %rbp push %rbx mov %rdi,%rbx mov %rsi,%rbp mov %edx,%r12d movslq %edx,%rdi shl $0x2,%rdi callq 10b0 <malloc@plt> test %r12d,%r12d jle 11f1 <func0+0x48> lea -0x1(%r12),%edi mov $0x0,%edx movslq 0x0(%rbp,%rdx,4),%rsi mov (%rbx,%rdx,8),%rcx mov -0x4(%rcx,%r...
func0: endbr64 push r12 push rbp push rbx mov rbx, rdi mov rbp, rsi mov r12d, edx movsxd rdi, edx shl rdi, 2 call _malloc test r12d, r12d jle short loc_11EC mov edi, r12d mov edx, 0 loc_11D3: movsxd rsi, dword ptr [rbp+rdx*4+0] mov rcx, [rbx+rdx*8] mov ecx, [rcx+rsi*...
long long func0(long long a1, long long a2, int a3) { long long result; // rax long long v5; // rdx result = malloc(4LL * a3); if ( a3 > 0 ) { v5 = 0LL; do { *(_DWORD *)(result + 4 * v5) = *(_DWORD *)(*(_QWORD *)(a1 + 8 * v5) + 4LL * *(int *)(a2 + 4 * v5) - 4); ++v5; } while ...
func0: ENDBR64 PUSH R12 PUSH RBP PUSH RBX MOV RBX,RDI MOV RBP,RSI MOV R12D,EDX MOVSXD RDI,EDX SHL RDI,0x2 CALL 0x001010b0 TEST R12D,R12D JLE 0x001011ec MOV EDI,R12D MOV EDX,0x0 LAB_001011d3: MOVSXD RSI,dword ptr [RBP + RDX*0x4] MOV RCX,qword ptr [RBX + RDX*0x8] MOV ECX,dword ptr [RCX + RSI*0x4 + -0x4] MOV dword ptr [RA...
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 { *(int4 *)((long)pvVar1 + uVar2 * 4) = *(int4 *) (*(long *)(param_1 + uVar2 * 8) + -4 + (long)*(int *)(param_2...
7,466
func0
#include <assert.h> #include <stdlib.h>
int *func0(int **lst, int *sizes, int rows) { int *result = malloc(rows * sizeof(int)); for (int i = 0; i < rows; ++i) { result[i] = lst[i][sizes[i] - 1]; } return result; }
int main() { // Test case 1 int row1[] = {1, 2, 3}; int row2[] = {4, 5}; int row3[] = {6, 7, 8, 9}; int *list1[] = {row1, row2, row3}; int sizes1[] = {3, 2, 4}; int *result1 = func0(list1, sizes1, 3); assert(result1[0] == 3 && result1[1] == 5 && result1[2] == 9); free(result...
O2
c
func0: endbr64 push %r12 push %rbp mov %rsi,%rbp push %rbx mov %rdi,%rbx movslq %edx,%rdi mov %rdi,%r12 shl $0x2,%rdi callq 10b0 <malloc@plt> test %r12d,%r12d jle 149c <func0+0x4c> lea -0x1(%r12),%esi xor %edx,%edx nopl 0x0(%rax) movslq 0x0(%rbp,%rdx,4),%rdi mov (%rbx,%rdx,8),%rcx mov...
func0: endbr64 push r13 push r12 movsxd r12, edx push rbp mov rbp, rsi push rbx mov rbx, rdi lea rdi, ds:0[r12*4] sub rsp, 8 call _malloc test r12d, r12d jle short loc_1499 xor edx, edx nop dword ptr [rax+rax+00h] loc_1480: movsxd rdi, dword ptr [rbp+rdx*4+0] mov rcx,...
long long func0(long long a1, long long a2, int a3) { long long v3; // r12 long long result; // rax long long i; // rdx v3 = a3; result = malloc(4LL * a3); if ( (int)v3 > 0 ) { for ( i = 0LL; i != v3; ++i ) *(_DWORD *)(result + 4 * i) = *(_DWORD *)(*(_QWORD *)(a1 + 8 * i) + 4LL * *(int *)(a2 +...
func0: ENDBR64 PUSH R13 PUSH R12 MOVSXD R12,EDX PUSH RBP MOV RBP,RSI PUSH RBX MOV RBX,RDI LEA RDI,[R12*0x4] SUB RSP,0x8 CALL 0x001010b0 TEST R12D,R12D JLE 0x00101499 XOR EDX,EDX NOP dword ptr [RAX + RAX*0x1] LAB_00101480: MOVSXD RDI,dword ptr [RBP + RDX*0x4] MOV RCX,qword ptr [RBX + RDX*0x8] MOV ECX,dword ptr [RCX + RD...
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 { *(int4 *)((long)pvVar1 + lVar2 * 4) = *(int4 *) (*(long *)(param_1 + lVar2 * 8) + -4 + (long)*(int *)(param_2 + lVar2 * 4)...
7,467
func0
#include <assert.h> #include <stdlib.h>
int *func0(int **lst, int *sizes, int rows) { int *result = malloc(rows * sizeof(int)); for (int i = 0; i < rows; ++i) { result[i] = lst[i][sizes[i] - 1]; } return result; }
int main() { // Test case 1 int row1[] = {1, 2, 3}; int row2[] = {4, 5}; int row3[] = {6, 7, 8, 9}; int *list1[] = {row1, row2, row3}; int sizes1[] = {3, 2, 4}; int *result1 = func0(list1, sizes1, 3); assert(result1[0] == 3 && result1[1] == 5 && result1[2] == 9); free(result...
O3
c
func0: endbr64 push %r12 push %rbp mov %rsi,%rbp push %rbx mov %rdi,%rbx movslq %edx,%rdi mov %rdi,%r12 shl $0x2,%rdi callq 10b0 <malloc@plt> test %r12d,%r12d jle 148c <func0+0x4c> lea -0x1(%r12),%esi xor %edx,%edx nopl 0x0(%rax) movslq 0x0(%rbp,%rdx,4),%rdi mov (%rbx,%rdx,8),%rcx mov...
func0: endbr64 push r13 push r12 mov r12, rsi push rbp mov rbp, rdi push rbx movsxd rbx, edx mov r13, rbx shl rbx, 2 mov rdi, rbx; size sub rsp, 8 call _malloc test r13d, r13d jle short loc_14A9 xor edx, edx nop dword ptr [rax] loc_1490: movsxd rdi, dword ptr [r12...
char * func0(long long a1, long long a2, int a3) { size_t v4; // rbx char *result; // rax long long v6; // rdx v4 = 4LL * a3; result = (char *)malloc(v4); if ( a3 > 0 ) { v6 = 0LL; do { *(_DWORD *)&result[v6] = *(_DWORD *)(*(_QWORD *)(a1 + 2 * v6) + 4LL * *(int *)(a2 + v6) - 4); v...
func0: ENDBR64 PUSH R13 PUSH R12 MOV R12,RSI PUSH RBP MOV RBP,RDI PUSH RBX MOVSXD RBX,EDX MOV R13,RBX SHL RBX,0x2 MOV RDI,RBX SUB RSP,0x8 CALL 0x001010b0 TEST R13D,R13D JLE 0x001014a9 XOR EDX,EDX NOP dword ptr [RAX] LAB_00101490: MOVSXD RDI,dword ptr [R12 + RDX*0x1] MOV RCX,qword ptr [RBP + RDX*0x2] MOV ECX,dword ptr [...
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 { *(int4 *)((long)pvVar1 + sVar2) = *(int4 *) (*(long *)(param_1 + sVar2 * 2) + -4 + (long)*(int *)(param_2 + sVar2) * 4);...
7,468
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> typedef struct { float *elements; int size; } FloatTuple;
FloatTuple func0(const char *test_str) { FloatTuple res; int estimate_size = 10; res.elements = malloc(estimate_size * sizeof(float)); res.size = 0; char *token = strtok(strdup(test_str), ", "); while (token != NULL) { if (res.size >= estimate_size) { estimate_size ...
int main() { FloatTuple result1 = func0("1.2, 1.3, 2.3, 2.4, 6.5"); FloatTuple expected1 = {.elements = (float[]){1.2, 1.3, 2.3, 2.4, 6.5}, .size = 5}; assert(result1.size == expected1.size && memcmp(result1.elements, expected1.elements, result1.size * sizeof(float)) == 0); FloatTuple result2 = fu...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x30,%rsp mov %rdi,-0x28(%rbp) movl $0xa,-0x1c(%rbp) mov -0x1c(%rbp),%eax cltq shl $0x2,%rax mov %rax,%rdi callq 1120 <malloc@plt> mov %rax,-0x10(%rbp) movl $0x0,-0x8(%rbp) mov -0x28(%rbp),%rax mov %rax,%rdi callq 1150 <strdup@plt> lea 0x...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 30h mov [rbp+s], rdi mov [rbp+var_1C], 0Ah mov eax, [rbp+var_1C] cdqe shl rax, 2 mov rdi, rax; size call _malloc mov [rbp+ptr], rax mov dword ptr [rbp+var_8], 0 mov rax, [rbp+s] mov rdi, rax; s call _strdup mov rdx, r...
void * func0(const char *a1) { char *v1; // rax double v2; // xmm0_8 int v3; // eax int v5; // [rsp+14h] [rbp-1Ch] const char *nptr; // [rsp+18h] [rbp-18h] void *ptr; // [rsp+20h] [rbp-10h] int v8; // [rsp+28h] [rbp-8h] v5 = 10; ptr = malloc(0x28uLL); v8 = 0; v1 = strdup(a1); for ( nptr = strto...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x28],RDI MOV dword ptr [RBP + -0x1c],0xa MOV EAX,dword ptr [RBP + -0x1c] CDQE SHL RAX,0x2 MOV RDI,RAX CALL 0x00101120 MOV qword ptr [RBP + -0x10],RAX MOV dword ptr [RBP + -0x8],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV RDI,RAX CALL 0x00101150 MOV RDX...
int [16] func0(char *param_1) { int auVar1 [16]; char *__s; double dVar2; int local_24; char *local_20; void *local_18; int local_10; int4 uStack_c; local_24 = 10; local_18 = malloc(0x28); local_10 = 0; __s = strdup(param_1); local_20 = strtok(__s,", "); while (local_20 != (char *)0x0) ...
7,469
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> typedef struct { float *elements; int size; } FloatTuple;
FloatTuple func0(const char *test_str) { FloatTuple res; int estimate_size = 10; res.elements = malloc(estimate_size * sizeof(float)); res.size = 0; char *token = strtok(strdup(test_str), ", "); while (token != NULL) { if (res.size >= estimate_size) { estimate_size ...
int main() { FloatTuple result1 = func0("1.2, 1.3, 2.3, 2.4, 6.5"); FloatTuple expected1 = {.elements = (float[]){1.2, 1.3, 2.3, 2.4, 6.5}, .size = 5}; assert(result1.size == expected1.size && memcmp(result1.elements, expected1.elements, result1.size * sizeof(float)) == 0); FloatTuple result2 = fu...
O1
c
func0: endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x8,%rsp mov %rdi,%rbx mov $0x28,%edi callq 1120 <malloc@plt> mov %rax,%r12 mov %rbx,%rdi callq 1150 <strdup@plt> mov %rax,%rdi lea 0xd87(%rip),%rsi callq 1140 <strtok@plt> mov %rax,%rbx mov $0x0,%e...
func0: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 8 mov rbx, rdi mov edi, 28h ; '(' call _malloc mov r12, rax mov rdi, rbx call _strdup mov rdi, rax lea rsi, unk_2004 call _strtok mov rbx, rax mov ebp, 0 mov r14d, 0Ah lea ...
long long func0(long long a1) { long long v1; // r12 long long v2; // rax long long v3; // rbx long long v4; // rbp int v5; // r14d float v7; // xmm0_4 v1 = malloc(40LL); v2 = strdup(a1); v3 = strtok(v2, &unk_2004); v4 = 0LL; v5 = 10; if ( v3 ) { while ( 1 ) { v7 = strtod(v3, 0...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x8 MOV RBX,RDI MOV EDI,0x28 CALL 0x00101120 MOV R12,RAX MOV RDI,RBX CALL 0x00101150 MOV RDI,RAX LEA RSI,[0x102004] CALL 0x00101140 MOV RBX,RAX MOV EBP,0x0 MOV R14D,0xa LEA R15,[0x102004] MOV R13D,0x0 TEST RAX,RAX JNZ 0x001012bb LAB_001012a2: ...
int1 [16] func0(char *param_1) { void *__ptr; char *pcVar1; long lVar2; uint uVar3; ulong uVar4; int iVar5; double dVar6; int1 auVar7 [16]; __ptr = malloc(0x28); pcVar1 = strdup(param_1); pcVar1 = strtok(pcVar1,", "); lVar2 = 0; iVar5 = 10; uVar4 = 0; if (pcVar1 != (char *)0x0) { ...
7,470
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> typedef struct { float *elements; int size; } FloatTuple;
FloatTuple func0(const char *test_str) { FloatTuple res; int estimate_size = 10; res.elements = malloc(estimate_size * sizeof(float)); res.size = 0; char *token = strtok(strdup(test_str), ", "); while (token != NULL) { if (res.size >= estimate_size) { estimate_size ...
int main() { FloatTuple result1 = func0("1.2, 1.3, 2.3, 2.4, 6.5"); FloatTuple expected1 = {.elements = (float[]){1.2, 1.3, 2.3, 2.4, 6.5}, .size = 5}; assert(result1.size == expected1.size && memcmp(result1.elements, expected1.elements, result1.size * sizeof(float)) == 0); FloatTuple result2 = fu...
O2
c
func0: endbr64 push %r15 push %r14 push %r13 xor %r13d,%r13d push %r12 push %rbp mov %rdi,%rbp mov $0x28,%edi push %rbx sub $0x8,%rsp callq 1100 <malloc@plt> mov %rbp,%rdi mov %rax,%r12 callq 1130 <strdup@plt> lea 0xbf0(%rip),%rsi mov %rax,%rdi callq 1120 <strtok@plt> test %rax,...
func0: endbr64 push r15 lea r15, unk_2004 push r14 push r13 xor r13d, r13d push r12 push rbp mov rbp, rdi mov edi, 28h ; '(' push rbx sub rsp, 8 call _malloc mov rdi, rbp mov r12, rax call _strdup mov rsi, r15 mov rdi, rax call _strtok test rax, rax jz ...
long long func0(long long a1) { long long v1; // r12 long long v2; // rax long long v3; // rax long long v4; // rbp long long v5; // rbx int v6; // r14d float v7; // xmm0_4 v1 = malloc(40LL); v2 = strdup(a1); v3 = strtok(v2, &unk_2004); if ( v3 ) { v4 = v3; v5 = 0LL; v6 = 10; w...
func0: ENDBR64 PUSH R15 LEA R15,[0x102004] PUSH R14 PUSH R13 XOR R13D,R13D PUSH R12 PUSH RBP MOV RBP,RDI MOV EDI,0x28 PUSH RBX SUB RSP,0x8 CALL 0x00101100 MOV RDI,RBP MOV R12,RAX CALL 0x00101130 MOV RSI,R15 MOV RDI,RAX CALL 0x00101120 TEST RAX,RAX JZ 0x00101480 MOV RBP,RAX XOR EBX,EBX MOV R14D,0xa JMP 0x00101456 LAB_00...
int1 [16] func0(char *param_1) { void *__ptr; char *pcVar1; long lVar2; int iVar3; int iVar4; double dVar5; int1 auVar6 [16]; iVar3 = 0; __ptr = malloc(0x28); pcVar1 = strdup(param_1); pcVar1 = strtok(pcVar1,", "); if (pcVar1 != (char *)0x0) { lVar2 = 0; iVar4 = 10; while( true ...
7,471
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> typedef struct { float *elements; int size; } FloatTuple;
FloatTuple func0(const char *test_str) { FloatTuple res; int estimate_size = 10; res.elements = malloc(estimate_size * sizeof(float)); res.size = 0; char *token = strtok(strdup(test_str), ", "); while (token != NULL) { if (res.size >= estimate_size) { estimate_size ...
int main() { FloatTuple result1 = func0("1.2, 1.3, 2.3, 2.4, 6.5"); FloatTuple expected1 = {.elements = (float[]){1.2, 1.3, 2.3, 2.4, 6.5}, .size = 5}; assert(result1.size == expected1.size && memcmp(result1.elements, expected1.elements, result1.size * sizeof(float)) == 0); FloatTuple result2 = fu...
O3
c
func0: endbr64 push %r15 push %r14 push %r13 xor %r13d,%r13d push %r12 push %rbp mov %rdi,%rbp mov $0x28,%edi push %rbx sub $0x8,%rsp callq 1100 <malloc@plt> mov %rbp,%rdi mov %rax,%r12 callq 1130 <strdup@plt> lea 0xc20(%rip),%rsi mov %rax,%rdi callq 1120 <strtok@plt> test %rax,...
func0: endbr64 push r14 push r13 push r12 lea r12, delim; ", " push rbp push rbx mov rbx, rdi mov edi, 28h ; '('; size call _malloc mov rdi, rbx; s mov rbp, rax call _strdup mov rsi, r12; delim mov rdi, rax; s call _strtok test rax, rax jz short loc_1460 mov ...
void * func0(char *s) { void *v1; // rbp char *v2; // rax char *v3; // rax char *v4; // rbx long long v5; // r14 int v6; // r13d float v7; // xmm0_4 v1 = malloc(0x28uLL); v2 = strdup(s); v3 = strtok(v2, ", "); if ( !v3 ) return v1; v4 = v3; v5 = 0LL; v6 = 10; while ( 1 ) { if ( ...
func0: ENDBR64 PUSH R14 PUSH R13 PUSH R12 LEA R12,[0x102004] PUSH RBP PUSH RBX MOV RBX,RDI MOV EDI,0x28 CALL 0x00101100 MOV RDI,RBX MOV RBP,RAX CALL 0x00101130 MOV RSI,R12 MOV RDI,RAX CALL 0x00101120 TEST RAX,RAX JZ 0x00101460 MOV RBX,RAX XOR R14D,R14D MOV R13D,0xa JMP 0x0010142e LAB_00101400: MOV RDI,RBX XOR ESI,ESI C...
int [16] func0(char *param_1) { char *pcVar1; int iVar2; int iVar3; long lVar4; double dVar5; int auVar6 [16]; int auVar7 [16]; auVar7._0_8_ = malloc(0x28); pcVar1 = strdup(param_1); pcVar1 = strtok(pcVar1,", "); if (pcVar1 == (char *)0x0) { auVar7._8_8_ = 0; return auVar7; } lVar...
7,472
func0
#include <assert.h>
int func0(int A[], int n) { if (n == 1) { return A[0]; } int look_up[n]; look_up[0] = A[0]; look_up[1] = A[0] > A[1] ? A[0] : A[1]; for (int i = 2; i < n; i++) { int option1 = look_up[i - 1]; int option2 = look_up[i - 2] + A[i]; int option3 = A[i...
int main() { int arr1[] = {1, 2, 9, 4, 5, 0, 4, 11, 6}; int arr2[] = {1, 2, 9, 5, 6, 0, 5, 12, 7}; int arr3[] = {1, 3, 10, 5, 6, 0, 6, 14, 21}; assert(func0(arr1, 9) == 26); assert(func0(arr2, 9) == 28); assert(func0(arr3, 9) == 44); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x48,%rsp mov %rdi,-0x48(%rbp) mov %esi,-0x4c(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax mov %rsp,%rax mov %rax,%rsi cmpl $0x1,-0x4c(%rbp) jne 11a3 <func0+0x3a> mov -0x48(%rbp),%rax mov (%rax),%eax jmpq 133...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_38], rdi mov [rbp+var_3C], esi mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax mov rax, rsp mov rsi, rax cmp [rbp+var_3C], 1 jnz short loc_11A2 mov rax, [rbp+var_38] mov eax, [rax] jmp loc_1324 lo...
long long func0(unsigned int *a1, int a2) { unsigned long long v3; // rax void *v4; // rsp signed int v5; // edx int v6; // eax signed int v7; // eax signed int v8; // [rsp+8h] [rbp-40h] BYREF int v9; // [rsp+Ch] [rbp-3Ch] signed int *v10; // [rsp+10h] [rbp-38h] int i; // [rsp+20h] [rbp-28h] int v1...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x38],RDI MOV dword ptr [RBP + -0x3c],ESI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX MOV RAX,RSP MOV RSI,RAX CMP dword ptr [RBP + -0x3c],0x1 JNZ 0x001011a2 MOV RAX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RAX] JMP 0x001...
int func0(int *param_1,int param_2) { long lVar1; int iVar2; ulong uVar3; int *puVar4; long in_FS_OFFSET; int auStack_48 [4]; int local_44; int *local_40; int local_30; int local_2c; int local_28; int local_24; long local_20; int *local_18; long local_10; puVar4 = auStack_48; local...
7,473
func0
#include <assert.h>
int func0(int A[], int n) { if (n == 1) { return A[0]; } int look_up[n]; look_up[0] = A[0]; look_up[1] = A[0] > A[1] ? A[0] : A[1]; for (int i = 2; i < n; i++) { int option1 = look_up[i - 1]; int option2 = look_up[i - 2] + A[i]; int option3 = A[i...
int main() { int arr1[] = {1, 2, 9, 4, 5, 0, 4, 11, 6}; int arr2[] = {1, 2, 9, 5, 6, 0, 5, 12, 7}; int arr3[] = {1, 3, 10, 5, 6, 0, 6, 14, 21}; assert(func0(arr1, 9) == 26); assert(func0(arr2, 9) == 28); assert(func0(arr3, 9) == 44); return 0; }
O1
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x10,%rsp mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax cmp $0x1,%esi je 11c1 <func0+0x58> movslq %esi,%rax lea 0xf(,%rax,4),%rax mov %rax,%rdx and $0xfffffffffffffff0,%rdx and $0xfffffffffffff000,%rax mov %rsp,%rcx sub %rax,%rc...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 10h mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax cmp esi, 1 jz short loc_11C1 mov r8d, esi movsxd rax, esi lea rax, ds:0Fh[rax*4] mov rcx, rax and rcx, 0FFFFFFFFFFFFFFF0h and rax, 0FFFFFFFFFFFFF000h mov rdx, rsp ...
long long func0(unsigned int *a1, int a2) { signed long long v3; // rax void *v4; // rsp signed int v5; // edx signed int v6; // eax long long i; // rdx signed int v8; // ecx signed int v9; // eax signed int v10; // ecx _DWORD v12[2]; // [rsp+8h] [rbp-10h] BYREF unsigned long long v13; // [rsp+10h]...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX CMP ESI,0x1 JZ 0x001011c1 MOV R8D,ESI MOVSXD RAX,ESI LEA RAX,[0xf + RAX*0x4] MOV RCX,RAX AND RCX,-0x10 AND RAX,-0x1000 MOV RDX,RSP SUB RDX,RAX LAB_001011aa: CMP RSP,RDX JZ 0x001011c5 SUB RSP,0x1000 OR...
int func0(int *param_1,uint param_2) { int iVar1; long lVar2; int iVar3; ulong uVar4; int1 *puVar5; int1 *puVar6; long in_FS_OFFSET; int1 auStack_18 [8]; long local_10; puVar6 = auStack_18; puVar5 = auStack_18; local_10 = *(long *)(in_FS_OFFSET + 0x28); if (param_2 == 1) { iVar1 = *par...
7,474
func0
#include <assert.h>
int func0(int A[], int n) { if (n == 1) { return A[0]; } int look_up[n]; look_up[0] = A[0]; look_up[1] = A[0] > A[1] ? A[0] : A[1]; for (int i = 2; i < n; i++) { int option1 = look_up[i - 1]; int option2 = look_up[i - 2] + A[i]; int option3 = A[i...
int main() { int arr1[] = {1, 2, 9, 4, 5, 0, 4, 11, 6}; int arr2[] = {1, 2, 9, 5, 6, 0, 5, 12, 7}; int arr3[] = {1, 3, 10, 5, 6, 0, 6, 14, 21}; assert(func0(arr1, 9) == 26); assert(func0(arr2, 9) == 28); assert(func0(arr3, 9) == 44); return 0; }
O2
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x10,%rsp mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax cmp $0x1,%esi je 13f8 <func0+0xf8> movslq %esi,%rax mov %rsp,%rcx lea 0xf(,%rax,4),%rax mov %rax,%rdx and $0xfffffffffffff000,%rax sub %rax,%rcx and $0xfffffffffffffff0,%rd...
func0: endbr64 push rbp mov r8, rdi mov rbp, rsp sub rsp, 10h mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax cmp esi, 1 jz loc_13F0 movsxd rax, esi mov rcx, rsp mov r9d, esi lea rax, ds:0Fh[rax*4] mov rdx, rax and rax, 0FFFFFFFFFFFFF000h sub rcx, rax and ...
long long func0(signed int *a1, int a2) { long long v3; // rdx _DWORD *v4; // rcx __int16 v5; // dx signed long long v6; // rdx void *v7; // rsp signed int v8; // eax signed int v9; // ecx unsigned long long v10; // rdx long long v11; // r10 signed int v12; // esi signed int v13; // eax _DWORD ...
func0: ENDBR64 PUSH RBP MOV R8,RDI MOV RBP,RSP SUB RSP,0x10 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX CMP ESI,0x1 JZ 0x001013f0 MOVSXD RAX,ESI MOV RCX,RSP MOV R9D,ESI LEA RAX,[0xf + RAX*0x4] MOV RDX,RAX AND RAX,-0x1000 SUB RCX,RAX AND RDX,-0x10 CMP RSP,RCX JZ 0x00101362 LAB_0010134d: SUB RS...
int func0(int *param_1,int param_2) { int iVar1; long lVar2; int1 *puVar3; int iVar4; int iVar5; int iVar6; ulong uVar7; long lVar8; int1 *puVar9; int1 *puVar11; long in_FS_OFFSET; int1 auStack_18 [8]; long local_10; int1 *puVar10; puVar11 = auStack_18; puVar9 = auStack_18; puVar10...
7,475
func0
#include <assert.h>
int func0(int A[], int n) { if (n == 1) { return A[0]; } int look_up[n]; look_up[0] = A[0]; look_up[1] = A[0] > A[1] ? A[0] : A[1]; for (int i = 2; i < n; i++) { int option1 = look_up[i - 1]; int option2 = look_up[i - 2] + A[i]; int option3 = A[i...
int main() { int arr1[] = {1, 2, 9, 4, 5, 0, 4, 11, 6}; int arr2[] = {1, 2, 9, 5, 6, 0, 5, 12, 7}; int arr3[] = {1, 3, 10, 5, 6, 0, 6, 14, 21}; assert(func0(arr1, 9) == 26); assert(func0(arr2, 9) == 28); assert(func0(arr3, 9) == 44); return 0; }
O3
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x10,%rsp mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax cmp $0x1,%esi je 13f8 <func0+0x148> movslq %esi,%rax mov %rsp,%rcx lea 0xf(,%rax,4),%rax mov %rax,%rdx and $0xfffffffffffff000,%rax sub %rax,%rcx and $0xfffffffffffffff0,%r...
func0: endbr64 push rbp mov r8, rdi mov rbp, rsp sub rsp, 10h mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax cmp esi, 1 jz loc_1400 movsxd rax, esi mov rcx, rsp mov edi, esi lea rax, ds:0Fh[rax*4] mov rdx, rax and rax, 0FFFFFFFFFFFFF000h sub rcx, rax and ...
long long func0(unsigned int *a1, int a2) { long long v2; // rdx _QWORD *v3; // rcx __int16 v4; // dx signed long long v5; // rdx void *v6; // rsp signed int v7; // r9d signed int v8; // eax __m128i v9; // xmm0 long long v10; // rcx signed int v11; // edx signed int v12; // r11d int v13; // edx...
func0: ENDBR64 PUSH RBP MOV R8,RDI MOV RBP,RSP SUB RSP,0x10 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX CMP ESI,0x1 JZ 0x00101400 MOVSXD RAX,ESI MOV RCX,RSP MOV EDI,ESI LEA RAX,[0xf + RAX*0x4] MOV RDX,RAX AND RAX,-0x1000 SUB RCX,RAX AND RDX,-0x10 CMP RSP,RCX JZ 0x00101311 LAB_001012fc: SUB RS...
int func0(int *param_1,int param_2) { long lVar1; int *puVar2; int iVar3; long lVar4; int iVar5; int iVar6; ulong uVar7; int *puVar8; int *puVar10; int iVar11; long in_FS_OFFSET; int auStack_18 [8]; long local_10; int *puVar9; puVar10 = auStack_18; puVar8 = auStack_18; puVar9 = auS...
7,476
func0
#include <stdio.h> #include <assert.h> #include <stdlib.h> typedef struct { int first; int second; } Tuple; int compare_tuples(const void *a, const void *b) { Tuple *tuple_a = (Tuple *)a; Tuple *tuple_b = (Tuple *)b; return tuple_a->second - tuple_b->second; }
void func0(Tuple *tuples, int length) { qsort(tuples, length, sizeof(Tuple), compare_tuples); }
int main() { Tuple list1[5] = {{2, 5}, {1, 2}, {4, 4}, {2, 3}, {2, 1}}; Tuple list2[5] = {{9, 8}, {4, 7}, {3, 5}, {7, 9}, {1, 2}}; Tuple list3[3] = {{20, 50}, {10, 20}, {40, 40}}; func0(list1, 5); func0(list2, 5); func0(list3, 3); assert(list1[0].first == 2 && list1[0].second == 1...
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 -0x58(%rip),%rcx mov $0x8,%edx mov %rax,%rdi callq 1090 <qsort@plt> 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, 8; size mov rdi, rax; base call _qsort nop leave retn
void func0(void *a1, int a2) { qsort(a1, a2, 8uLL, compare_tuples); }
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,[0x1011a9] MOV RCX,RDX MOV EDX,0x8 MOV RDI,RAX CALL 0x00101090 NOP LEAVE RET
void func0(void *param_1,int param_2) { qsort(param_1,(long)param_2,8,compare_tuples); return; }
7,477
func0
#include <stdio.h> #include <assert.h> #include <stdlib.h> typedef struct { int first; int second; } Tuple; int compare_tuples(const void *a, const void *b) { Tuple *tuple_a = (Tuple *)a; Tuple *tuple_b = (Tuple *)b; return tuple_a->second - tuple_b->second; }
void func0(Tuple *tuples, int length) { qsort(tuples, length, sizeof(Tuple), compare_tuples); }
int main() { Tuple list1[5] = {{2, 5}, {1, 2}, {4, 4}, {2, 3}, {2, 1}}; Tuple list2[5] = {{9, 8}, {4, 7}, {3, 5}, {7, 9}, {1, 2}}; Tuple list3[3] = {{20, 50}, {10, 20}, {40, 40}}; func0(list1, 5); func0(list2, 5); func0(list3, 3); assert(list1[0].first == 2 && list1[0].second == 1...
O1
c
func0: endbr64 sub $0x8,%rsp movslq %esi,%rsi lea -0x1d(%rip),%rcx mov $0x8,%edx callq 1090 <qsort@plt> add $0x8,%rsp retq
func0: endbr64 sub rsp, 8 movsxd rsi, esi lea rcx, compare_tuples mov edx, 8 call _qsort add rsp, 8 retn
long long func0(long long a1, int a2) { return qsort(a1, a2, 8LL, compare_tuples); }
func0: ENDBR64 SUB RSP,0x8 MOVSXD RSI,ESI LEA RCX,[0x1011a9] MOV EDX,0x8 CALL 0x00101090 ADD RSP,0x8 RET
void func0(void *param_1,int param_2) { qsort(param_1,(long)param_2,8,compare_tuples); return; }
7,478
func0
#include <stdio.h> #include <assert.h> #include <stdlib.h> typedef struct { int first; int second; } Tuple; int compare_tuples(const void *a, const void *b) { Tuple *tuple_a = (Tuple *)a; Tuple *tuple_b = (Tuple *)b; return tuple_a->second - tuple_b->second; }
void func0(Tuple *tuples, int length) { qsort(tuples, length, sizeof(Tuple), compare_tuples); }
int main() { Tuple list1[5] = {{2, 5}, {1, 2}, {4, 4}, {2, 3}, {2, 1}}; Tuple list2[5] = {{9, 8}, {4, 7}, {3, 5}, {7, 9}, {1, 2}}; Tuple list3[3] = {{20, 50}, {10, 20}, {40, 40}}; func0(list1, 5); func0(list2, 5); func0(list3, 3); assert(list1[0].first == 2 && list1[0].second == 1...
O2
c
func0: endbr64 movslq %esi,%rsi lea -0x1e(%rip),%rcx mov $0x8,%edx jmpq 1090 <qsort@plt> nopl 0x0(%rax,%rax,1)
func0: endbr64 movsxd rsi, esi lea rcx, compare_tuples mov edx, 8 jmp _qsort
long long func0(long long a1, int a2) { return qsort(a1, a2, 8LL, compare_tuples); }
func0: ENDBR64 MOVSXD RSI,ESI LEA RCX,[0x1015a0] MOV EDX,0x8 JMP 0x00101090
void func0(void *param_1,int param_2) { qsort(param_1,(long)param_2,8,compare_tuples); return; }
7,479
func0
#include <stdio.h> #include <assert.h> #include <stdlib.h> typedef struct { int first; int second; } Tuple; int compare_tuples(const void *a, const void *b) { Tuple *tuple_a = (Tuple *)a; Tuple *tuple_b = (Tuple *)b; return tuple_a->second - tuple_b->second; }
void func0(Tuple *tuples, int length) { qsort(tuples, length, sizeof(Tuple), compare_tuples); }
int main() { Tuple list1[5] = {{2, 5}, {1, 2}, {4, 4}, {2, 3}, {2, 1}}; Tuple list2[5] = {{9, 8}, {4, 7}, {3, 5}, {7, 9}, {1, 2}}; Tuple list3[3] = {{20, 50}, {10, 20}, {40, 40}}; func0(list1, 5); func0(list2, 5); func0(list3, 3); assert(list1[0].first == 2 && list1[0].second == 1...
O3
c
func0: endbr64 movslq %esi,%rsi lea -0x1e(%rip),%rcx mov $0x8,%edx jmpq 1090 <qsort@plt> nopl 0x0(%rax,%rax,1)
func0: endbr64 movsxd rsi, esi; nmemb lea rcx, compare_tuples; compar mov edx, 8; size jmp _qsort
void func0(void *a1, int a2) { qsort(a1, a2, 8uLL, compare_tuples); }
func0: ENDBR64 MOVSXD RSI,ESI LEA RCX,[0x101550] MOV EDX,0x8 JMP 0x00101090
void func0(void *param_1,int param_2) { qsort(param_1,(long)param_2,8,compare_tuples); return; }
7,480
func0
#include <assert.h> #include <string.h> #include <stdlib.h> #include <stdbool.h>
bool func0(const char* sentence, const char* word) { char* token; char* toFree; char* sentenceCopy = strdup(sentence); if (!sentenceCopy) return false; toFree = sentenceCopy; token = strtok(sentenceCopy, " "); while (token != NULL) { if (strcmp(token, word) == 0) { ...
int main() { assert(func0("machine learning", "machine") == true); assert(func0("easy", "fun") == false); assert(func0("python language", "code") == false); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x30,%rsp mov %rdi,-0x28(%rbp) mov %rsi,-0x30(%rbp) mov -0x28(%rbp),%rax mov %rax,%rdi callq 10d0 <strdup@plt> mov %rax,-0x10(%rbp) cmpq $0x0,-0x10(%rbp) jne 11fb <func0+0x32> mov $0x0,%eax jmp 1273 <func0+0xaa> mov -0x10(%rbp),%rax mov ...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 30h mov [rbp+s], rdi mov [rbp+s2], rsi mov rax, [rbp+s] mov rdi, rax; s call _strdup mov [rbp+var_10], rax cmp [rbp+var_10], 0 jnz short loc_11FB mov eax, 0 jmp short locret_1279 loc_11FB: mov rax, [rbp+var_10] mov [...
long long func0(const char *a1, const char *a2) { const char *s1; // [rsp+18h] [rbp-18h] char *v4; // [rsp+20h] [rbp-10h] v4 = strdup(a1); if ( !v4 ) return 0LL; for ( s1 = strtok(v4, " "); s1; s1 = strtok(0LL, " ") ) { if ( !strcmp(s1, a2) ) { free(v4); return 1LL; } } fre...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x28],RDI MOV qword ptr [RBP + -0x30],RSI MOV RAX,qword ptr [RBP + -0x28] MOV RDI,RAX CALL 0x001010d0 MOV qword ptr [RBP + -0x10],RAX CMP qword ptr [RBP + -0x10],0x0 JNZ 0x001011fb MOV EAX,0x0 JMP 0x00101279 LAB_001011fb: MOV RAX,qword ptr [RBP + -0...
int8 func0(char *param_1,char *param_2) { int iVar1; char *__s; char *local_20; __s = strdup(param_1); if (__s != (char *)0x0) { local_20 = strtok(__s," "); while (local_20 != (char *)0x0) { iVar1 = strcmp(local_20,param_2); if (iVar1 == 0) { free(__s); return 1; ...
7,481
func0
#include <assert.h> #include <string.h> #include <stdlib.h> #include <stdbool.h>
bool func0(const char* sentence, const char* word) { char* token; char* toFree; char* sentenceCopy = strdup(sentence); if (!sentenceCopy) return false; toFree = sentenceCopy; token = strtok(sentenceCopy, " "); while (token != NULL) { if (strcmp(token, word) == 0) { ...
int main() { assert(func0("machine learning", "machine") == true); assert(func0("easy", "fun") == false); assert(func0("python language", "code") == false); return 0; }
O1
c
func0: endbr64 push %r12 push %rbp push %rbx mov %rsi,%rbx callq 10d0 <strdup@plt> test %rax,%rax je 1241 <func0+0x78> mov %rax,%rbp lea 0xe1c(%rip),%rsi mov %rax,%rdi callq 10c0 <strtok@plt> mov %rax,%rdi test %rax,%rax je 1220 <func0+0x57> lea 0xe05(%rip),%r12 mov %rbx,%rsi ca...
func0: endbr64 push r12 push rbp push rbx mov rbx, rsi call _strdup test rax, rax jz short loc_1241 mov rbp, rax lea rsi, unk_2004 mov rdi, rax call _strtok mov rdi, rax test rax, rax jz short loc_1220 lea r12, unk_2004 loc_11FF: mov rsi, rbx call _strcmp te...
long long func0(long long a1, long long a2) { long long v2; // rax long long v3; // rbp long long v4; // rdi v2 = strdup(); if ( !v2 ) return 0LL; v3 = v2; v4 = strtok(v2, &unk_2004); if ( v4 ) { while ( (unsigned int)strcmp(v4, a2) ) { v4 = strtok(0LL, &unk_2004); if ( !v4 )...
func0: ENDBR64 PUSH R12 PUSH RBP PUSH RBX MOV RBX,RSI CALL 0x001010d0 TEST RAX,RAX JZ 0x00101241 MOV RBP,RAX LEA RSI,[0x102004] MOV RDI,RAX CALL 0x001010c0 MOV RDI,RAX TEST RAX,RAX JZ 0x00101220 LEA R12,[0x102004] LAB_001011ff: MOV RSI,RBX CALL 0x001010b0 TEST EAX,EAX JZ 0x00101232 MOV RSI,R12 MOV EDI,0x0 CALL 0x001010...
int8 func0(char *param_1,char *param_2) { int iVar1; char *__s; char *__s1; __s = strdup(param_1); if (__s != (char *)0x0) { __s1 = strtok(__s," "); while (__s1 != (char *)0x0) { iVar1 = strcmp(__s1,param_2); if (iVar1 == 0) { free(__s); return 1; } __s1 = s...