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,682
func0
#include <assert.h> #include <string.h>
int func0(char *list1[], int n) { int min = strlen(list1[0]); for (int i = 0; i < n; i++) { if (strlen(list1[i]) < min) { min = strlen(list1[i]); } } return min; }
int main() { char *list1[] = {"win", "lose", "great"}; char *list2[] = {"a", "ab", "abc"}; char *list3[] = {"12", "12", "1234"}; assert(func0(list1, 3) == 3); assert(func0(list2, 3) == 1); assert(func0(list3, 3) == 2); return 0; }
O2
c
func0: endbr64 push %r12 push %rbp mov %esi,%ebp push %rbx mov %rdi,%rbx mov (%rdi),%rdi callq 1070 <strlen@plt> mov %eax,%r12d test %ebp,%ebp jle 130b <func0+0x4b> add $0x8,%rbx lea -0x1(%rbp),%edx lea (%rbx,%rdx,8),%rbp jmp 12fc <func0+0x3c> nopl 0x0(%rax) mov (%rbx),%rdi add ...
func0: endbr64 push r12 push rbp mov ebp, esi push rbx mov rbx, rdi mov rdi, [rdi] call _strlen mov r12d, eax test ebp, ebp jle short loc_130B add rbx, 8 lea edx, [rbp-1] lea rbp, [rbx+rdx*8] jmp short loc_12FC loc_12F0: mov rdi, [rbx] add rbx, 8 call _strle...
long long func0(_QWORD *a1, int a2) { unsigned long long v2; // rax unsigned int v3; // r12d long long *v4; // rbx long long v5; // rbp long long v6; // rdi v2 = strlen(*a1); v3 = v2; if ( a2 > 0 ) { v4 = a1 + 1; v5 = (long long)&a1[(unsigned int)(a2 - 1) + 1]; while ( 1 ) { if...
func0: ENDBR64 PUSH R12 PUSH RBP MOV EBP,ESI PUSH RBX MOV RBX,RDI MOV RDI,qword ptr [RDI] CALL 0x00101070 MOV R12D,EAX TEST EBP,EBP JLE 0x0010130b ADD RBX,0x8 LEA EDX,[RBP + -0x1] LEA RBP,[RBX + RDX*0x8] JMP 0x001012fc LAB_001012f0: MOV RDI,qword ptr [RBX] ADD RBX,0x8 CALL 0x00101070 LAB_001012fc: MOVSXD RDX,R12D CMP R...
ulong func0(int8 *param_1,int param_2) { int8 *puVar1; char *__s; ulong uVar2; ulong uVar3; uVar2 = strlen((char *)*param_1); uVar3 = uVar2 & 0xffffffff; if (0 < param_2) { param_1 = param_1 + 1; puVar1 = param_1 + (param_2 - 1); while( true ) { if (uVar2 < (ulong)(long)(int)uVar3) {...
7,683
func0
#include <assert.h> #include <string.h>
int func0(char *list1[], int n) { int min = strlen(list1[0]); for (int i = 0; i < n; i++) { if (strlen(list1[i]) < min) { min = strlen(list1[i]); } } return min; }
int main() { char *list1[] = {"win", "lose", "great"}; char *list2[] = {"a", "ab", "abc"}; char *list3[] = {"12", "12", "1234"}; assert(func0(list1, 3) == 3); assert(func0(list2, 3) == 1); assert(func0(list3, 3) == 2); return 0; }
O3
c
func0: endbr64 push %r12 push %rbp mov %esi,%ebp push %rbx mov %rdi,%rbx mov (%rdi),%rdi callq 1070 <strlen@plt> mov %eax,%r12d test %ebp,%ebp jle 132b <func0+0x4b> add $0x8,%rbx lea -0x1(%rbp),%edx lea (%rbx,%rdx,8),%rbp jmp 131c <func0+0x3c> nopl 0x0(%rax) mov (%rbx),%rdi add ...
func0: endbr64 push r12 movsxd r12, esi push rbp push rbx mov rbx, rdi mov rdi, [rdi]; s call _strlen mov ebp, eax test r12d, r12d jle short loc_1322 lea r12, [rbx+r12*8] jmp short loc_1310 loc_1308: mov rdi, [rbx]; s call _strlen loc_1310: movsxd rdx, ebp cmp rax, rd...
long long func0(const char **a1, int a2) { const char **v2; // rbx size_t v3; // rax unsigned int v4; // ebp v2 = a1; v3 = strlen(*a1); v4 = v3; if ( a2 > 0 ) { while ( 1 ) { if ( v3 < (int)v4 ) v4 = v3; if ( ++v2 == &a1[a2] ) break; v3 = strlen(*v2); } ...
func0: ENDBR64 PUSH R12 MOVSXD R12,ESI PUSH RBP PUSH RBX MOV RBX,RDI MOV RDI,qword ptr [RDI] CALL 0x00101070 MOV EBP,EAX TEST R12D,R12D JLE 0x00101322 LEA R12,[RBX + R12*0x8] JMP 0x00101310 LAB_00101308: MOV RDI,qword ptr [RBX] CALL 0x00101070 LAB_00101310: MOVSXD RDX,EBP CMP RAX,RDX CMOVC EBP,EAX ADD RBX,0x8 CMP RBX,R...
ulong func0(int8 *param_1,int param_2) { int8 *puVar1; ulong uVar2; ulong uVar3; uVar2 = strlen((char *)*param_1); uVar3 = uVar2 & 0xffffffff; if (0 < param_2) { puVar1 = param_1 + param_2; while( true ) { if (uVar2 < (ulong)(long)(int)uVar3) { uVar3 = uVar2 & 0xffffffff; } ...
7,684
func0
#include <assert.h>
char func0(char tup1[], int index, int size) { if (index < 0) { index = size + index; } return tup1[index]; }
int main() { char tuple1[] = {'w', 3, 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e'}; int size = sizeof(tuple1) / sizeof(tuple1[0]); assert(func0(tuple1, 3, size) == 'e'); assert(func0(tuple1, -4, size) == 'u'); assert(func0(tuple1, -3, size) == 'r'); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x8(%rbp) mov %esi,-0xc(%rbp) mov %edx,-0x10(%rbp) cmpl $0x0,-0xc(%rbp) jns 1187 <func0+0x1e> mov -0x10(%rbp),%eax add %eax,-0xc(%rbp) mov -0xc(%rbp),%eax movslq %eax,%rdx mov -0x8(%rbp),%rax add %rdx,%rax movzbl (%rax),%eax pop %rbp ...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_10], edx cmp [rbp+var_C], 0 jns short loc_1187 mov eax, [rbp+var_10] add [rbp+var_C], eax loc_1187: mov eax, [rbp+var_C] movsxd rdx, eax mov rax, [rbp+var_8] add rax, rdx movzx e...
long long func0(long long a1, int a2, int a3) { int v4; // [rsp+4h] [rbp-Ch] v4 = a2; if ( a2 < 0 ) v4 = a3 + a2; return *(unsigned __int8 *)(v4 + a1); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV dword ptr [RBP + -0x10],EDX CMP dword ptr [RBP + -0xc],0x0 JNS 0x00101187 MOV EAX,dword ptr [RBP + -0x10] ADD dword ptr [RBP + -0xc],EAX LAB_00101187: MOV EAX,dword ptr [RBP + -0xc] MOVSXD RDX,EAX MOV RAX,qword ptr [RB...
int func0(long param_1,int param_2,int param_3) { int4 local_14; local_14 = param_2; if (param_2 < 0) { local_14 = param_2 + param_3; } return *(int *)(param_1 + local_14); }
7,685
func0
#include <assert.h>
char func0(char tup1[], int index, int size) { if (index < 0) { index = size + index; } return tup1[index]; }
int main() { char tuple1[] = {'w', 3, 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e'}; int size = sizeof(tuple1) / sizeof(tuple1[0]); assert(func0(tuple1, 3, size) == 'e'); assert(func0(tuple1, -4, size) == 'u'); assert(func0(tuple1, -3, size) == 'r'); return 0; }
O1
c
func0: endbr64 add %esi,%edx test %esi,%esi cmovs %edx,%esi movslq %esi,%rsi movzbl (%rdi,%rsi,1),%eax retq
func0: endbr64 add edx, esi test esi, esi cmovs esi, edx movsxd rsi, esi movzx eax, byte ptr [rdi+rsi] retn
long long func0(long long a1, int a2, int a3) { int v3; // edx v3 = a2 + a3; if ( a2 < 0 ) a2 = v3; return *(unsigned __int8 *)(a1 + a2); }
func0: ENDBR64 ADD EDX,ESI TEST ESI,ESI CMOVS ESI,EDX MOVSXD RSI,ESI MOVZX EAX,byte ptr [RDI + RSI*0x1] RET
int1 func0(long param_1,int param_2,int param_3) { if (param_2 < 0) { param_2 = param_3 + param_2; } return *(int1 *)(param_1 + param_2); }
7,686
func0
#include <assert.h>
char func0(char tup1[], int index, int size) { if (index < 0) { index = size + index; } return tup1[index]; }
int main() { char tuple1[] = {'w', 3, 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e'}; int size = sizeof(tuple1) / sizeof(tuple1[0]); assert(func0(tuple1, 3, size) == 'e'); assert(func0(tuple1, -4, size) == 'u'); assert(func0(tuple1, -3, size) == 'r'); return 0; }
O2
c
func0: endbr64 add %esi,%edx test %esi,%esi cmovs %edx,%esi movslq %esi,%rsi movzbl (%rdi,%rsi,1),%eax retq nopw %cs:0x0(%rax,%rax,1) nopl (%rax)
func0: endbr64 add edx, esi test esi, esi cmovs esi, edx movsxd rsi, esi movzx eax, byte ptr [rdi+rsi] retn
long long func0(long long a1, int a2, int a3) { int v3; // edx v3 = a2 + a3; if ( a2 < 0 ) a2 = v3; return *(unsigned __int8 *)(a1 + a2); }
func0: ENDBR64 ADD EDX,ESI TEST ESI,ESI CMOVS ESI,EDX MOVSXD RSI,ESI MOVZX EAX,byte ptr [RDI + RSI*0x1] RET
int1 func0(long param_1,int param_2,int param_3) { if (param_2 < 0) { param_2 = param_3 + param_2; } return *(int1 *)(param_1 + param_2); }
7,687
func0
#include <assert.h>
char func0(char tup1[], int index, int size) { if (index < 0) { index = size + index; } return tup1[index]; }
int main() { char tuple1[] = {'w', 3, 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e'}; int size = sizeof(tuple1) / sizeof(tuple1[0]); assert(func0(tuple1, 3, size) == 'e'); assert(func0(tuple1, -4, size) == 'u'); assert(func0(tuple1, -3, size) == 'r'); return 0; }
O3
c
func0: endbr64 add %esi,%edx test %esi,%esi cmovs %edx,%esi movslq %esi,%rsi movzbl (%rdi,%rsi,1),%eax retq nopw %cs:0x0(%rax,%rax,1) nopl (%rax)
func0: endbr64 add edx, esi test esi, esi cmovs esi, edx movsxd rsi, esi movzx eax, byte ptr [rdi+rsi] retn
long long func0(long long a1, int a2, int a3) { int v3; // edx v3 = a2 + a3; if ( a2 < 0 ) a2 = v3; return *(unsigned __int8 *)(a1 + a2); }
func0: ENDBR64 ADD EDX,ESI TEST ESI,ESI CMOVS ESI,EDX MOVSXD RSI,ESI MOVZX EAX,byte ptr [RDI + RSI*0x1] RET
int func0(long param_1,int param_2,int param_3) { if (param_2 < 0) { param_2 = param_3 + param_2; } return *(int *)(param_1 + param_2); }
7,688
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> // Define a tuple structure typedef struct { int *elements; int size; } Tuple; // Function to count the total number of digits in a tuple int count_digs(Tuple tup) { int total = 0; for(int i = 0; i < tup.siz...
char* func0(Tuple *list, int list_size) { // Sort the list based on digit counts qsort(list, list_size, sizeof(Tuple), compare_tuples); // Allocate memory for the resulting string // Assuming maximum size, adjust as needed static char result[1000]; result[0] = '\0'; strcat(resul...
int main() { // First test case Tuple list1[4]; int elems1_0[] = {3, 4, 6, 723}; list1[0].elements = elems1_0; list1[0].size = 4; int elems1_1[] = {1, 2}; list1[1].elements = elems1_1; list1[1].size = 2; int elems1_2[] = {12345}; list1[2].elements = elems1_2; list1...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x40,%rsp mov %rdi,-0x38(%rbp) mov %esi,-0x3c(%rbp) mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax mov -0x3c(%rbp),%eax movslq %eax,%rsi mov -0x38(%rbp),%rax lea -0x91(%rip),%rcx mov $0x10,%edx mov %rax,%rdi callq 10a0 <qsort@plt> m...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 40h mov [rbp+base], rdi mov [rbp+var_3C], esi mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax mov eax, [rbp+var_3C] movsxd rsi, eax; nmemb mov rax, [rbp+base] lea rdx, compare_tuples mov rcx, rdx; compar mov edx, 10h; si...
char * func0(void *a1, int a2) { int i; // [rsp+18h] [rbp-28h] int j; // [rsp+1Ch] [rbp-24h] char s[24]; // [rsp+20h] [rbp-20h] BYREF unsigned long long v6; // [rsp+38h] [rbp-8h] v6 = __readfsqword(0x28u); qsort(a1, a2, 0x10uLL, compare_tuples); result_1[0] = 0; *(_WORD *)&result_1[strlen(result_1)] = ...
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 EAX,dword ptr [RBP + -0x3c] MOVSXD RSI,EAX MOV RAX,qword ptr [RBP + -0x38] LEA RDX,[0x10128d] MOV RCX,RDX MOV EDX,0x10 MOV RDI,RAX C...
int1 * func0(void *param_1,int param_2) { size_t sVar1; long in_FS_OFFSET; int local_30; int local_2c; char local_28 [24]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); qsort(param_1,(long)param_2,0x10,compare_tuples); result_1[0] = 0; sVar1 = strlen(result_1); *(int2 *)(result_1 +...
7,689
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> // Define a tuple structure typedef struct { int *elements; int size; } Tuple; // Function to count the total number of digits in a tuple int count_digs(Tuple tup) { int total = 0; for(int i = 0; i < tup.siz...
char* func0(Tuple *list, int list_size) { // Sort the list based on digit counts qsort(list, list_size, sizeof(Tuple), compare_tuples); // Allocate memory for the resulting string // Assuming maximum size, adjust as needed static char result[1000]; result[0] = '\0'; strcat(resul...
int main() { // First test case Tuple list1[4]; int elems1_0[] = {3, 4, 6, 723}; list1[0].elements = elems1_0; list1[0].size = 4; int elems1_1[] = {1, 2}; list1[1].elements = elems1_1; list1[1].size = 2; int elems1_2[] = {12345}; list1[2].elements = elems1_2; list1...
O1
c
func0: endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x28,%rsp mov %rdi,%r13 mov %esi,%r15d mov %fs:0x28,%rax mov %rax,0x18(%rsp) xor %eax,%eax movslq %esi,%rsi lea -0x60(%rip),%rcx mov $0x10,%edx callq 10a0 <qsort@plt> movb $0x0,0x2db5(%rip) mov $0x3...
func0: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 38h mov r15, rdi mov ebx, esi mov [rsp+68h+var_5C], esi mov rax, fs:28h mov [rsp+68h+var_40], rax xor eax, eax movsxd rsi, esi lea rcx, compare_tuples mov edx, 10h call _qsort mov ...
char * func0(long long a1, int a2) { _DWORD *v2; // r15 long long v3; // rbx int i; // [rsp+8h] [rbp-60h] _BYTE v6[24]; // [rsp+10h] [rbp-58h] BYREF unsigned long long v7; // [rsp+28h] [rbp-40h] v7 = __readfsqword(0x28u); qsort(a1, a2, 16LL, compare_tuples); result_1 = 0; __strcat_chk(&result_1, &unk...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x38 MOV R15,RDI MOV EBX,ESI MOV dword ptr [RSP + 0xc],ESI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x28],RAX XOR EAX,EAX MOVSXD RSI,ESI LEA RCX,[0x10123a] MOV EDX,0x10 CALL 0x001010b0 MOV byte ptr [0x00104040],0x0 MOV EDX,0x3e8 LEA RS...
int1 * func0(void *param_1,int param_2) { long lVar1; int *piVar2; long in_FS_OFFSET; int local_60; int1 local_58 [24]; long local_40; local_40 = *(long *)(in_FS_OFFSET + 0x28); qsort(param_1,(long)param_2,0x10,compare_tuples); result_1[0] = 0; __strcat_chk(result_1,&DAT_00102004,1000); if (0 ...
7,690
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> // Define a tuple structure typedef struct { int *elements; int size; } Tuple; // Function to count the total number of digits in a tuple int count_digs(Tuple tup) { int total = 0; for(int i = 0; i < tup.siz...
char* func0(Tuple *list, int list_size) { // Sort the list based on digit counts qsort(list, list_size, sizeof(Tuple), compare_tuples); // Allocate memory for the resulting string // Assuming maximum size, adjust as needed static char result[1000]; result[0] = '\0'; strcat(resul...
int main() { // First test case Tuple list1[4]; int elems1_0[] = {3, 4, 6, 723}; list1[0].elements = elems1_0; list1[0].size = 4; int elems1_1[] = {1, 2}; list1[1].elements = elems1_1; list1[1].size = 2; int elems1_2[] = {12345}; list1[2].elements = elems1_2; list1...
O2
c
func0: endbr64 push %r15 movslq %esi,%rsi mov $0x10,%edx xor %r15d,%r15d push %r14 lea -0x13a(%rip),%rcx push %r13 push %r12 push %rbp mov %rdi,%rbp push %rbx mov %rsi,%rbx add $0x8,%rbp sub $0x38,%rsp mov %esi,0xc(%rsp) mov %fs:0x28,%rax mov %rax,0x28(%rsp) xor %eax,%eax ca...
func0: endbr64 push r15 movsxd rsi, esi mov edx, 10h mov r15, rdi push r14 lea rcx, compare_tuples push r13 push r12 push rbp push rbx mov rbx, rsi sub rsp, 38h mov [rsp+68h+var_60], esi mov rax, fs:28h mov [rsp+68h+var_40], rax xor eax, eax call _qsort mov ...
__int16 * func0(long long a1, int a2) { _DWORD *v2; // r15 long long v3; // r13 long long v4; // rax long long v5; // rax _WORD *v6; // rax int v8; // [rsp+4h] [rbp-64h] _BYTE v9[24]; // [rsp+10h] [rbp-58h] BYREF unsigned long long v10; // [rsp+28h] [rbp-40h] v10 = __readfsqword(0x28u); qsort(a1, a...
func0: ENDBR64 PUSH R15 MOVSXD RSI,ESI MOV EDX,0x10 MOV R15,RDI PUSH R14 LEA RCX,[0x101540] PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV RBX,RSI SUB RSP,0x38 MOV dword ptr [RSP + 0x8],ESI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x28],RAX XOR EAX,EAX CALL 0x001010e0 MOV ESI,0x5b MOV word ptr [0x00104040],SI TEST EBX...
int1 * func0(void *param_1,int param_2) { long lVar1; size_t sVar2; long lVar3; int *piVar4; long in_FS_OFFSET; int local_64; int1 local_58 [24]; long local_40; local_40 = *(long *)(in_FS_OFFSET + 0x28); qsort(param_1,(long)param_2,0x10,compare_tuples); result_1._0_2_ = 0x5b; if (0 < param_2...
7,691
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> // Define a tuple structure typedef struct { int *elements; int size; } Tuple; // Function to count the total number of digits in a tuple int count_digs(Tuple tup) { int total = 0; for(int i = 0; i < tup.siz...
char* func0(Tuple *list, int list_size) { // Sort the list based on digit counts qsort(list, list_size, sizeof(Tuple), compare_tuples); // Allocate memory for the resulting string // Assuming maximum size, adjust as needed static char result[1000]; result[0] = '\0'; strcat(resul...
int main() { // First test case Tuple list1[4]; int elems1_0[] = {3, 4, 6, 723}; list1[0].elements = elems1_0; list1[0].size = 4; int elems1_1[] = {1, 2}; list1[1].elements = elems1_1; list1[1].size = 2; int elems1_2[] = {12345}; list1[2].elements = elems1_2; list1...
O3
c
func0: endbr64 push %r15 movslq %esi,%rsi mov $0x10,%edx lea -0x135(%rip),%rcx push %r14 push %r13 push %r12 push %rbp push %rbx mov %rsi,%rbx sub $0x38,%rsp mov %esi,0x4(%rsp) mov %rdi,0x8(%rsp) mov %fs:0x28,%rax mov %rax,0x28(%rsp) xor %eax,%eax callq 10c0 <qsort@plt> mov $0...
func0: endbr64 push r15 movsxd rsi, esi; nmemb mov edx, 10h; size lea rcx, compare_tuples; compar push r14 push r13 push r12 push rbp push rbx mov rbx, rsi sub rsp, 38h mov [rsp+68h+var_68], esi mov [rsp+68h+var_60], rdi mov rax, fs:28h mov [rsp+68h+var_40], rax xor ...
char * func0(_DWORD *a1, int a2) { int v2; // r13d int v3; // esi char *v4; // r14 long long v5; // rbp size_t v6; // rax long long v7; // rax int v8; // edx _DWORD *v10; // r14 long long v11; // rbp size_t v12; // rax long long v13; // rax size_t v14; // rax _BYTE v16[24]; // [rsp+10h] [rbp-5...
func0: ENDBR64 PUSH R15 MOVSXD RSI,ESI MOV EDX,0x10 LEA RCX,[0x101520] PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV RBX,RSI SUB RSP,0x38 MOV dword ptr [RSP],ESI MOV qword ptr [RSP + 0x8],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x28],RAX XOR EAX,EAX CALL 0x001010e0 MOV ESI,0x5b MOV word ptr [0x00104040]...
int1 * func0(void *param_1,int param_2) { size_t sVar1; long lVar2; long lVar3; int iVar4; long *plVar5; int *piVar6; long in_FS_OFFSET; int local_58 [24]; long local_40; local_40 = *(long *)(in_FS_OFFSET + 0x28); qsort(param_1,(long)param_2,0x10,compare_tuples); result_1._0_2_ = 0x5b; if ...
7,692
func0
#include <assert.h> #include <string.h>
const char* func0(int year) { const char* sign; int remainder = (year - 2000) % 12; if (remainder < 0) { remainder += 12; } switch (remainder) { case 0: sign = "Dragon"; break; case 1: sign = "Snake"; break; ...
int main() { assert(strcmp(func0(1997), "Ox") == 0); assert(strcmp(func0(1998), "Tiger") == 0); assert(strcmp(func0(1994), "Dog") == 0); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x14(%rbp) mov -0x14(%rbp),%eax lea -0x7d0(%rax),%edx movslq %edx,%rax imul $0x2aaaaaab,%rax,%rax shr $0x20,%rax mov %eax,%ecx sar %ecx mov %edx,%eax sar $0x1f,%eax sub %eax,%ecx mov %ecx,%eax mov %eax,-0xc(%rbp) mov -0xc(%rbp),...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_14], edi mov eax, [rbp+var_14] lea edx, [rax-7D0h] movsxd rax, edx imul rax, 2AAAAAABh shr rax, 20h sar eax, 1 mov ecx, edx sar ecx, 1Fh sub eax, ecx mov [rbp+var_C], eax mov ecx, [rbp+var_C] mov eax, ecx add ea...
const char * func0(int a1) { const char *v2; // [rsp+Ch] [rbp-8h] switch ( (a1 - 2000) % 12 + ((a1 - 2000) % 12 < 0 ? 0xC : 0) ) { case 0: v2 = "Dragon"; break; case 1: v2 = "Snake"; break; case 2: v2 = "Horse"; break; case 3: v2 = "sheep"; break; ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x14],EDI MOV EAX,dword ptr [RBP + -0x14] LEA EDX,[RAX + -0x7d0] MOVSXD RAX,EDX IMUL RAX,RAX,0x2aaaaaab SHR RAX,0x20 SAR EAX,0x1 MOV ECX,EDX SAR ECX,0x1f SUB EAX,ECX MOV dword ptr [RBP + -0xc],EAX MOV ECX,dword ptr [RBP + -0xc] MOV EAX,ECX ADD EAX,EAX ADD EAX,EC...
char * func0(int param_1) { int local_14; char *local_10; local_14 = param_1 + -2000; local_14 = local_14 + ((local_14 / 6 + (local_14 >> 0x1f) >> 1) - (local_14 >> 0x1f)) * -0xc; if (local_14 < 0) { local_14 = local_14 + 0xc; } switch(local_14) { case 0: local_10 = "Dragon"; break; ca...
7,693
func0
#include <assert.h> #include <string.h>
const char* func0(int year) { const char* sign; int remainder = (year - 2000) % 12; if (remainder < 0) { remainder += 12; } switch (remainder) { case 0: sign = "Dragon"; break; case 1: sign = "Snake"; break; ...
int main() { assert(strcmp(func0(1997), "Ox") == 0); assert(strcmp(func0(1998), "Tiger") == 0); assert(strcmp(func0(1994), "Dog") == 0); return 0; }
O1
c
func0: endbr64 sub $0x7d0,%edi movslq %edi,%rax imul $0x2aaaaaab,%rax,%rax sar $0x21,%rax mov %edi,%edx sar $0x1f,%edx sub %edx,%eax lea (%rax,%rax,2),%eax shl $0x2,%eax sub %eax,%edi mov %edi,%eax lea 0xc(%rdi),%edx cmovs %edx,%eax cmp $0xa,%eax ja 11c0 <func0+0x97> mov %eax,...
func0: endbr64 sub edi, 7D0h movsxd rax, edi imul rax, 2AAAAAABh sar rax, 21h mov edx, edi sar edx, 1Fh sub eax, edx lea edx, [rax+rax*2] shl edx, 2 mov eax, edi sub eax, edx lea edx, [rax+0Ch] cmovs eax, edx cmp eax, 0Ah; switch 11 cases ja short def_116D; jumptab...
const char * func0(int a1) { const char *result; // rax switch ( (a1 - 2000) % 12 + ((a1 - 2000) % 12 < 0 ? 0xC : 0) ) { case 0: result = "Dragon"; break; case 1: result = "Snake"; break; case 2: result = "Horse"; break; case 3: result = "sheep"; br...
func0: ENDBR64 SUB EDI,0x7d0 MOVSXD RAX,EDI IMUL RAX,RAX,0x2aaaaaab SAR RAX,0x21 MOV EDX,EDI SAR EDX,0x1f SUB EAX,EDX LEA EDX,[RAX + RAX*0x2] SHL EDX,0x2 MOV EAX,EDI SUB EAX,EDX LEA EDX,[RAX + 0xc] CMOVS EAX,EDX CMP EAX,0xa JA 0x001011c0 MOV EAX,EAX LEA RDX,[0x102048] MOVSXD RAX,dword ptr [RDX + RAX*0x4] ADD RAX,RDX sw...
char * func0(int param_1) { int iVar1; iVar1 = (param_1 + -2000) % 0xc; if (iVar1 < 0) { iVar1 = iVar1 + 0xc; } switch(iVar1) { case 0: return "Dragon"; case 1: return "Snake"; case 2: return "Horse"; case 3: return "sheep"; case 4: return "Monkey"; case 5: return "...
7,694
func0
#include <assert.h> #include <string.h>
const char* func0(int year) { const char* sign; int remainder = (year - 2000) % 12; if (remainder < 0) { remainder += 12; } switch (remainder) { case 0: sign = "Dragon"; break; case 1: sign = "Snake"; break; ...
int main() { assert(strcmp(func0(1997), "Ox") == 0); assert(strcmp(func0(1998), "Tiger") == 0); assert(strcmp(func0(1994), "Dog") == 0); return 0; }
O2
c
func0: endbr64 sub $0x7d0,%edi movslq %edi,%rax mov %edi,%edx imul $0x2aaaaaab,%rax,%rax sar $0x1f,%edx sar $0x21,%rax sub %edx,%eax lea (%rax,%rax,2),%eax shl $0x2,%eax sub %eax,%edi mov %edi,%eax lea 0xc(%rax),%edx test %eax,%eax cmovs %rdx,%rax cmp $0xa,%eax ja 1238 <func0+0...
func0: endbr64 sub edi, 7D0h movsxd rax, edi mov edx, edi imul rax, 2AAAAAABh sar edx, 1Fh sar rax, 21h sub eax, edx lea edx, [rax+rax*2] mov eax, edi shl edx, 2 sub eax, edx lea edx, [rax+0Ch] cmovs rax, rdx cmp eax, 0Ah; switch 11 cases ja def_1187; jumptable 000...
const char * func0(int a1) { const char *result; // rax switch ( (a1 - 2000) % 12 + ((a1 - 2000) % 12 < 0 ? 0xC : 0) ) { case 0: result = "Dragon"; break; case 1: result = "Snake"; break; case 2: result = "Horse"; break; case 3: result = "sheep"; br...
func0: ENDBR64 SUB EDI,0x7d0 MOVSXD RAX,EDI MOV EDX,EDI IMUL RAX,RAX,0x2aaaaaab SAR EDX,0x1f SAR RAX,0x21 SUB EAX,EDX LEA EDX,[RAX + RAX*0x2] MOV EAX,EDI SHL EDX,0x2 SUB EAX,EDX LEA EDX,[RAX + 0xc] CMOVS RAX,RDX CMP EAX,0xa JA 0x00101238 LEA RDX,[0x102048] MOVSXD RAX,dword ptr [RDX + RAX*0x4] ADD RAX,RDX switchD: JMP R...
char * func0(int param_1) { int iVar1; iVar1 = (param_1 + -2000) % 0xc; if (iVar1 < 0) { iVar1 = iVar1 + 0xc; } switch(iVar1) { case 0: return "Dragon"; case 1: return "Snake"; case 2: return "Horse"; case 3: return "sheep"; case 4: return "Monkey"; case 5: return "...
7,695
func0
#include <assert.h> #include <string.h>
const char* func0(int year) { const char* sign; int remainder = (year - 2000) % 12; if (remainder < 0) { remainder += 12; } switch (remainder) { case 0: sign = "Dragon"; break; case 1: sign = "Snake"; break; ...
int main() { assert(strcmp(func0(1997), "Ox") == 0); assert(strcmp(func0(1998), "Tiger") == 0); assert(strcmp(func0(1994), "Dog") == 0); return 0; }
O3
c
func0: endbr64 sub $0x7d0,%edi movslq %edi,%rax mov %edi,%edx imul $0x2aaaaaab,%rax,%rax sar $0x1f,%edx sar $0x21,%rax sub %edx,%eax lea (%rax,%rax,2),%eax shl $0x2,%eax sub %eax,%edi mov %edi,%eax lea 0xc(%rax),%edx test %eax,%eax cmovs %rdx,%rax cmp $0xa,%eax ja 1238 <func0+0...
func0: endbr64 sub edi, 7D0h movsxd rax, edi mov edx, edi imul rax, 2AAAAAABh sar edx, 1Fh sar rax, 21h sub eax, edx lea edx, [rax+rax*2] mov eax, edi shl edx, 2 sub eax, edx lea edx, [rax+0Ch] cmovs rax, rdx cmp eax, 0Ah; switch 11 cases ja def_1187; jumptable 000...
const char * func0(int a1) { const char *result; // rax switch ( (a1 - 2000) % 12 + ((a1 - 2000) % 12 < 0 ? 0xC : 0) ) { case 0: result = "Dragon"; break; case 1: result = "Snake"; break; case 2: result = "Horse"; break; case 3: result = "sheep"; br...
func0: ENDBR64 SUB EDI,0x7d0 MOVSXD RAX,EDI MOV EDX,EDI IMUL RAX,RAX,0x2aaaaaab SAR EDX,0x1f SAR RAX,0x21 SUB EAX,EDX LEA EDX,[RAX + RAX*0x2] MOV EAX,EDI SHL EDX,0x2 SUB EAX,EDX LEA EDX,[RAX + 0xc] CMOVS RAX,RDX CMP EAX,0xa JA 0x00101238 LEA RDX,[0x102048] MOVSXD RAX,dword ptr [RDX + RAX*0x4] ADD RAX,RDX switchD: JMP R...
char * func0(int param_1) { int iVar1; iVar1 = (param_1 + -2000) % 0xc; if (iVar1 < 0) { iVar1 = iVar1 + 0xc; } switch(iVar1) { case 0: return "Dragon"; case 1: return "Snake"; case 2: return "Horse"; case 3: return "sheep"; case 4: return "Monkey"; case 5: return "...
7,696
func0
#include <stdio.h> #include <assert.h> typedef struct { int first; int second; } Pair;
Pair* func0(Pair *test_list1, Pair *test_list2, int size) { static Pair res[3]; for (int i = 0; i < size; i++) { res[i].first = test_list1[i].first > test_list2[i].first ? test_list1[i].first : test_list2[i].first; res[i].second = test_list1[i].second > test_list2[i].second ? test_list1[i].s...
int main() { Pair test_list1[3] = {{2, 4}, {6, 7}, {5, 1}}; Pair test_list2[3] = {{5, 4}, {8, 10}, {8, 14}}; Pair expected1[3] = {{5, 4}, {8, 10}, {8, 14}}; Pair *result1 = func0(test_list1, test_list2, 3); for (int i = 0; i < 3; i++) { assert(result1[i].first == expected1[i].first && ...
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) jmpq 1220 <func0+0xb7> mov -0x4(%rbp),%eax cltq lea 0x0(,%rax,8),%rdx mov -0x20(%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 loc_1220 loc_1188: mov eax, [rbp+var_4] cdqe lea rdx, ds:0[rax*8] mov rax, [rbp+var_20] add rax, rdx mov edx, [rax] mov eax, [rbp+var_4] cdqe l...
void * func0(long long a1, long long a2, int a3) { int v3; // eax int v4; // eax int i; // [rsp+20h] [rbp-4h] for ( i = 0; i < a3; ++i ) { v3 = *(_DWORD *)(8LL * i + a1); if ( *(_DWORD *)(8LL * i + a2) >= v3 ) v3 = *(_DWORD *)(8LL * i + a2); *((_DWORD *)&res_1 + 2 * i) = v3; v4 = *(_DWO...
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 0x00101220 LAB_00101188: MOV EAX,dword ptr [RBP + -0x4] CDQE LEA RDX,[RAX*0x8] MOV RAX,qword ptr [RBP + -0x20] ADD RAX,RDX MOV EDX,dword ptr [RAX] MOV EA...
int1 * func0(long param_1,long param_2,int param_3) { int iVar1; int iVar2; int local_c; for (local_c = 0; local_c < param_3; local_c = local_c + 1) { iVar1 = *(int *)(param_2 + (long)local_c * 8); iVar2 = *(int *)(param_1 + (long)local_c * 8); if (iVar2 <= iVar1) { iVar2 = iVar1; } ...
7,697
func0
#include <stdio.h> #include <assert.h> typedef struct { int first; int second; } Pair;
Pair* func0(Pair *test_list1, Pair *test_list2, int size) { static Pair res[3]; for (int i = 0; i < size; i++) { res[i].first = test_list1[i].first > test_list2[i].first ? test_list1[i].first : test_list2[i].first; res[i].second = test_list1[i].second > test_list2[i].second ? test_list1[i].s...
int main() { Pair test_list1[3] = {{2, 4}, {6, 7}, {5, 1}}; Pair test_list2[3] = {{5, 4}, {8, 10}, {8, 14}}; Pair expected1[3] = {{5, 4}, {8, 10}, {8, 14}}; Pair *result1 = func0(test_list1, test_list2, 3); for (int i = 0; i < 3; i++) { assert(result1[i].first == expected1[i].first && ...
O1
c
func0: endbr64 test %edx,%edx jle 11a8 <func0+0x3f> mov $0x0,%eax lea 0x2ea3(%rip),%r9 lea 0x4(%r9),%r8 mov (%rdi,%rax,8),%ecx cmp %ecx,(%rsi,%rax,8) cmovge (%rsi,%rax,8),%ecx mov %ecx,(%r9,%rax,8) mov 0x4(%rdi,%rax,8),%ecx cmp %ecx,0x4(%rsi,%rax,8) cmovge 0x4(%rsi,%rax,8),%ecx mov %ecx,...
func0: endbr64 test edx, edx jle short loc_11AF mov eax, 0 lea r10, res_1 lea r9, [r10+4] loc_1181: mov ecx, [rsi+rax*8] mov r8d, [rdi+rax*8] cmp ecx, r8d cmovl ecx, r8d mov [r10+rax*8], ecx mov ecx, [rsi+rax*8+4] mov r8d, [rdi+rax*8+4] cmp ecx, r8d cmovl ecx, r8d mov ...
_DWORD * func0(long long a1, long long a2, int a3) { long long v3; // rax int v4; // ecx int v5; // ecx if ( a3 > 0 ) { v3 = 0LL; do { v4 = *(_DWORD *)(a2 + 8 * v3); if ( v4 < *(_DWORD *)(a1 + 8 * v3) ) v4 = *(_DWORD *)(a1 + 8 * v3); res_1[2 * v3] = v4; v5 = *(_DWO...
func0: ENDBR64 TEST EDX,EDX JLE 0x001011af MOV EAX,0x0 LEA R10,[0x104020] LEA R9,[R10 + 0x4] LAB_00101181: MOV ECX,dword ptr [RSI + RAX*0x8] MOV R8D,dword ptr [RDI + RAX*0x8] CMP ECX,R8D CMOVL ECX,R8D MOV dword ptr [R10 + RAX*0x8],ECX MOV ECX,dword ptr [RSI + RAX*0x8 + 0x4] MOV R8D,dword ptr [RDI + RAX*0x8 + 0x4] CMP E...
int4 * func0(long param_1,long param_2,int param_3) { int iVar1; long lVar2; int iVar3; if (0 < param_3) { lVar2 = 0; do { iVar3 = *(int *)(param_2 + lVar2 * 8); iVar1 = *(int *)(param_1 + lVar2 * 8); if (iVar3 < iVar1) { iVar3 = iVar1; } (&res_1)[lVar2 * 2] = i...
7,698
func0
#include <stdio.h> #include <assert.h> typedef struct { int first; int second; } Pair;
Pair* func0(Pair *test_list1, Pair *test_list2, int size) { static Pair res[3]; for (int i = 0; i < size; i++) { res[i].first = test_list1[i].first > test_list2[i].first ? test_list1[i].first : test_list2[i].first; res[i].second = test_list1[i].second > test_list2[i].second ? test_list1[i].s...
int main() { Pair test_list1[3] = {{2, 4}, {6, 7}, {5, 1}}; Pair test_list2[3] = {{5, 4}, {8, 10}, {8, 14}}; Pair expected1[3] = {{5, 4}, {8, 10}, {8, 14}}; Pair *result1 = func0(test_list1, test_list2, 3); for (int i = 0; i < 3; i++) { assert(result1[i].first == expected1[i].first && ...
O2
c
func0: endbr64 test %edx,%edx jle 147c <func0+0x3c> lea 0x2bd1(%rip),%r9 xor %eax,%eax lea 0x4(%r9),%r8 mov (%rdi,%rax,8),%ecx cmp %ecx,(%rsi,%rax,8) cmovge (%rsi,%rax,8),%ecx mov %ecx,(%r9,%rax,8) mov 0x4(%rdi,%rax,8),%ecx cmp %ecx,0x4(%rsi,%rax,8) cmovge 0x4(%rsi,%rax,8),%ecx mov %ecx,...
func0: endbr64 lea r9, res_1 test edx, edx jle short loc_1493 xor eax, eax lea r10, [r9+4] loc_1465: mov r8d, [rdi+rax*8] mov ecx, [rsi+rax*8] cmp ecx, r8d cmovl ecx, r8d mov [r9+rax*8], ecx mov ecx, [rsi+rax*8+4] mov r8d, [rdi+rax*8+4] cmp ecx, r8d cmovl ecx, r8d mov ...
_DWORD * func0(long long a1, long long a2, int a3) { long long v3; // rax int v4; // ecx int v5; // ecx if ( a3 > 0 ) { v3 = 0LL; do { v4 = *(_DWORD *)(a2 + 8 * v3); if ( v4 < *(_DWORD *)(a1 + 8 * v3) ) v4 = *(_DWORD *)(a1 + 8 * v3); res_1[2 * v3] = v4; v5 = *(_DWO...
func0: ENDBR64 LEA R9,[0x104020] TEST EDX,EDX JLE 0x00101493 XOR EAX,EAX LEA R10,[R9 + 0x4] LAB_00101465: MOV R8D,dword ptr [RDI + RAX*0x8] MOV ECX,dword ptr [RSI + RAX*0x8] CMP ECX,R8D CMOVL ECX,R8D MOV dword ptr [R9 + RAX*0x8],ECX MOV ECX,dword ptr [RSI + RAX*0x8 + 0x4] MOV R8D,dword ptr [RDI + RAX*0x8 + 0x4] CMP ECX...
int4 * func0(long param_1,long param_2,int param_3) { long lVar1; int iVar2; int iVar3; if (0 < param_3) { lVar1 = 0; do { iVar3 = *(int *)(param_1 + lVar1 * 8); iVar2 = *(int *)(param_2 + lVar1 * 8); if (iVar2 < iVar3) { iVar2 = iVar3; } (&res_1)[lVar1 * 2] = i...
7,699
func0
#include <stdio.h> #include <assert.h> typedef struct { int first; int second; } Pair;
Pair* func0(Pair *test_list1, Pair *test_list2, int size) { static Pair res[3]; for (int i = 0; i < size; i++) { res[i].first = test_list1[i].first > test_list2[i].first ? test_list1[i].first : test_list2[i].first; res[i].second = test_list1[i].second > test_list2[i].second ? test_list1[i].s...
int main() { Pair test_list1[3] = {{2, 4}, {6, 7}, {5, 1}}; Pair test_list2[3] = {{5, 4}, {8, 10}, {8, 14}}; Pair expected1[3] = {{5, 4}, {8, 10}, {8, 14}}; Pair *result1 = func0(test_list1, test_list2, 3); for (int i = 0; i < 3; i++) { assert(result1[i].first == expected1[i].first && ...
O3
c
func0: endbr64 mov %rdi,%r8 test %edx,%edx jle 1431 <func0+0x91> lea 0xf(%rdi),%rax lea 0x2c66(%rip),%rcx sub %rcx,%rax cmp $0x1e,%rax seta %dil cmp $0x1,%edx setne %al test %al,%dil je 1440 <func0+0xa0> lea 0xf(%rsi),%rax sub %rcx,%rax cmp $0x1e,%rax jbe 1440 <func0+0xa0> mo...
func0: endbr64 mov rax, rsi lea r8, res_1 test edx, edx jle short loc_11EA cmp edx, 1 jz loc_1260 mov rcx, r8 sub rcx, rsi sub rcx, 4 cmp rcx, 8 jbe short loc_11F0 mov rcx, r8 sub rcx, rdi sub rcx, 4 cmp rcx, 8 jbe short loc_11F0 movdqu xmm1, xmmword ptr ...
__int128 * func0(const __m128i *a1, const __m128i *a2, int a3) { __m128i v4; // xmm1 __m128i v5; // xmm2 unsigned int v6; // ecx __m128i v7; // xmm0 __int32 v8; // edx __int32 v9; // eax __int32 v11; // esi __int32 v12; // ecx __int32 v13; // esi __int32 v14; // ecx __int32 v15; // esi __int32 v...
func0: ENDBR64 MOV RAX,RSI LEA R8,[0x104020] TEST EDX,EDX JLE 0x001011ea CMP EDX,0x1 JZ 0x00101260 MOV RCX,R8 SUB RCX,RSI SUB RCX,0x4 CMP RCX,0x8 JBE 0x001011f0 MOV RCX,R8 SUB RCX,RDI SUB RCX,0x4 CMP RCX,0x8 JBE 0x001011f0 MOVDQU XMM1,xmmword ptr [RSI] MOVDQU XMM2,xmmword ptr [RDI] MOV ECX,EDX AND ECX,0xfffffffe AND ED...
int1 * func0(uint *param_1,uint *param_2,uint param_3) { uint uVar1; uint uVar2; uint uVar3; uint uVar4; if (0 < (int)param_3) { if (param_3 == 1) { res_1._0_4_ = *param_1; if ((int)*param_1 < (int)*param_2) { res_1._0_4_ = *param_2; } res_1._4_4_ = param_2[1]; if...
7,700
func0
#include <assert.h>
int func0(int n, int r, int p) { if (r > n - r) r = n - r; int C[r + 1]; for (int i = 0; i <= r; i++) C[i] = 0; C[0] = 1; for (int i = 1; i <= n; i++) { for (int j = (i < r ? i : r); j > 0; j--) { C[j] = (C[j] + C[j - 1]) % p; } } retur...
int main() { assert(func0(10, 2, 13) == 6); assert(func0(11, 3, 14) == 11); assert(func0(18, 14, 19) == 1); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x48,%rsp mov %edi,-0x44(%rbp) mov %esi,-0x48(%rbp) mov %edx,-0x4c(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax mov %rsp,%rax mov %rax,%rsi mov -0x44(%rbp),%eax sub -0x48(%rbp),%eax cmp %eax,-0x48(%rbp) jle ...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_34], edi mov [rbp+var_38], esi mov [rbp+var_3C], edx mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax mov rax, rsp mov rsi, rax mov eax, [rbp+var_34] sub eax, [rbp+var_38] cmp [rbp+var_38], eax jle ...
long long func0(int a1, int a2, int a3) { unsigned long long v3; // rax void *v4; // rsp int v5; // eax _BYTE v7[4]; // [rsp+8h] [rbp-40h] BYREF int v8; // [rsp+Ch] [rbp-3Ch] int v9; // [rsp+10h] [rbp-38h] int v10; // [rsp+14h] [rbp-34h] int i; // [rsp+24h] [rbp-24h] int j; // [rsp+28h] [rbp-20h] i...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV dword ptr [RBP + -0x34],EDI MOV dword ptr [RBP + -0x38],ESI MOV dword ptr [RBP + -0x3c],EDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX MOV RAX,RSP MOV RSI,RAX MOV EAX,dword ptr [RBP + -0x34] SUB EAX,dword ptr [RBP + -0x38] CMP dword ptr [R...
int4 func0(int param_1,int param_2,int param_3) { long lVar1; ulong uVar2; int *puVar3; long in_FS_OFFSET; int auStack_48 [4]; int local_44; int local_40; int local_3c; int local_2c; int local_28; int local_24; long local_20; int *local_18; long local_10; puVar3 = auStack_48; local_3...
7,701
func0
#include <assert.h>
int func0(int n, int r, int p) { if (r > n - r) r = n - r; int C[r + 1]; for (int i = 0; i <= r; i++) C[i] = 0; C[0] = 1; for (int i = 1; i <= n; i++) { for (int j = (i < r ? i : r); j > 0; j--) { C[j] = (C[j] + C[j - 1]) % p; } } retur...
int main() { assert(func0(10, 2, 13) == 6); assert(func0(11, 3, 14) == 11); assert(func0(18, 14, 19) == 1); return 0; }
O1
c
func0: endbr64 push %rbp mov %rsp,%rbp push %r12 push %rbx sub $0x10,%rsp mov %edx,%r8d mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax mov %edi,%r9d sub %esi,%r9d cmp %esi,%r9d cmovg %esi,%r9d lea 0x1(%r9),%eax cltq lea 0xf(,%rax,4),%rax mov %rax,%rdx and $0xfffffffff...
func0: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 18h mov r10d, edi mov eax, esi mov esi, edx mov rdx, fs:28h mov [rbp+var_18], rdx xor edx, edx mov r9d, edi sub r9d, eax cmp r9d, eax cmovg r9d, eax lea eax, [r9+1] cdqe lea rax, ds:0Fh[rax*4] mov rcx,...
long long func0(int a1, int a2, int a3) { int v3; // r9d signed long long v4; // rax void *v5; // rsp _DWORD *v6; // rax int v7; // r10d int v8; // r8d int v9; // eax long long v10; // rdi int *v11; // rcx int *v12; // rdi _DWORD v15[2]; // [rsp+8h] [rbp-20h] BYREF unsigned long long v16; // [r...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x18 MOV R10D,EDI MOV EAX,ESI MOV ESI,EDX MOV RDX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RDX XOR EDX,EDX MOV R9D,EDI SUB R9D,EAX CMP R9D,EAX CMOVG R9D,EAX LEA EAX,[R9 + 0x1] CDQE LEA RAX,[0xf + RAX*0x4] MOV RCX,RAX AND RCX,-0x10 AND RAX,-0x1000 MOV RDX,RSP S...
int4 func0(int param_1,int param_2,int param_3) { int iVar1; long lVar2; int iVar3; ulong uVar4; int4 *puVar5; int *piVar6; int1 *puVar7; int iVar8; long in_FS_OFFSET; int1 auStack_28 [8]; long local_20; puVar7 = auStack_28; local_20 = *(long *)(in_FS_OFFSET + 0x28); iVar1 = param_1 - pa...
7,702
func0
#include <assert.h>
int func0(int n, int r, int p) { if (r > n - r) r = n - r; int C[r + 1]; for (int i = 0; i <= r; i++) C[i] = 0; C[0] = 1; for (int i = 1; i <= n; i++) { for (int j = (i < r ? i : r); j > 0; j--) { C[j] = (C[j] + C[j - 1]) % p; } } retur...
int main() { assert(func0(10, 2, 13) == 6); assert(func0(11, 3, 14) == 11); assert(func0(18, 14, 19) == 1); return 0; }
O2
c
func0: endbr64 push %rbp mov %edi,%r9d mov %edx,%r8d sub %esi,%r9d mov %rsp,%rbp push %r12 push %rbx sub $0x10,%rsp mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax cmp %esi,%r9d mov %rsp,%rbx cmovg %esi,%r9d lea 0x1(%r9),%eax cltq lea 0xf(,%rax,4),%rax mov %rax,%rdx an...
func0: endbr64 push rbp mov rbp, rsp push r15 mov r15d, edi push r14 push r13 push r12 mov r12d, edi push rbx sub r12d, esi mov ebx, edx sub rsp, 18h mov rax, fs:28h mov [rbp+var_38], rax xor eax, eax cmp r12d, esi mov rcx, rsp cmovg r12d, esi lea eax,...
long long func0(int a1, int a2, int a3) { int v4; // r12d long long v6; // rdx _DWORD *v7; // rcx __int16 v8; // dx signed long long v9; // rdx void *v10; // rsp _DWORD *v11; // r9 int v12; // edi int v13; // eax long long v14; // rsi _DWORD *v15; // rcx long long v16; // rsi int v17; // eax ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R15 MOV R15D,EDI PUSH R14 PUSH R13 PUSH R12 MOV R12D,EDI PUSH RBX SUB R12D,ESI MOV EBX,EDX SUB RSP,0x18 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x38],RAX XOR EAX,EAX CMP R12D,ESI MOV RCX,RSP CMOVG R12D,ESI LEA EAX,[R12 + 0x1] CDQE LEA RAX,[0xf + RAX*0x4] MOV RDX,RAX AN...
int4 func0(int param_1,int param_2,int param_3) { long lVar1; int iVar2; int1 *puVar3; int *piVar4; int *piVar5; ulong uVar6; int1 *puVar7; int iVar9; int iVar10; long in_FS_OFFSET; int1 auStack_48 [8]; long local_40; int1 *puVar8; puVar7 = auStack_48; puVar8 = auStack_48; local_40 =...
7,703
func0
#include <assert.h>
int func0(int n, int r, int p) { if (r > n - r) r = n - r; int C[r + 1]; for (int i = 0; i <= r; i++) C[i] = 0; C[0] = 1; for (int i = 1; i <= n; i++) { for (int j = (i < r ? i : r); j > 0; j--) { C[j] = (C[j] + C[j - 1]) % p; } } retur...
int main() { assert(func0(10, 2, 13) == 6); assert(func0(11, 3, 14) == 11); assert(func0(18, 14, 19) == 1); return 0; }
O3
c
func0: endbr64 push %rbp mov %rsp,%rbp push %r15 mov %edi,%r15d push %r14 push %r13 push %r12 mov %edi,%r12d push %rbx sub %esi,%r12d mov %edx,%ebx sub $0x18,%rsp mov %fs:0x28,%rax mov %rax,-0x38(%rbp) xor %eax,%eax cmp %esi,%r12d mov %rsp,%rdi cmovg %esi,%r12d lea 0x1(%...
func0: endbr64 push rbp mov rbp, rsp push r15 mov r15d, edi push r14 push r13 push r12 mov r12d, edi push rbx sub r12d, esi mov ebx, edx sub rsp, 18h mov rax, fs:28h mov [rbp+var_38], rax xor eax, eax cmp r12d, esi mov rcx, rsp cmovg r12d, esi lea eax,...
long long func0(int a1, int a2, int a3) { int v3; // r12d long long v5; // rdx _DWORD *v6; // rcx __int16 v7; // dx signed long long v8; // rdx void *v9; // rsp _DWORD *v10; // r10 int v11; // r9d int v12; // r8d int v13; // eax long long v14; // rdi _DWORD *v15; // rcx int v16; // esi long...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R15 MOV R15D,EDI PUSH R14 PUSH R13 PUSH R12 MOV R12D,EDI PUSH RBX SUB R12D,ESI MOV EBX,EDX SUB RSP,0x18 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x38],RAX XOR EAX,EAX CMP R12D,ESI MOV RCX,RSP CMOVG R12D,ESI LEA EAX,[R12 + 0x1] CDQE LEA RAX,[0xf + RAX*0x4] MOV RDX,RAX AN...
int4 func0(int param_1,int param_2,int param_3) { int *piVar1; long lVar2; int iVar3; int *puVar4; int *piVar5; int *piVar6; ulong uVar7; int *puVar8; int iVar10; int iVar11; int iVar12; long in_FS_OFFSET; int auStack_48 [8]; long local_40; int *puVar9; puVar8 = auStack_48; puVar9 ...
7,704
func0
#include <stdio.h> #include <assert.h> #include <stdlib.h>
int func0(int ar[], int n) { int res = 0; int i, count; // Sorting the array for (int step = 0; step < n - 1; ++step) { for (int i = 0; i < n - step - 1; ++i) { if (ar[i] > ar[i + 1]) { int temp = ar[i]; ar[i] = ar[i + 1]; ...
int main() { int ar1[] = {1, 2, 3, 4}; int ar2[] = {5, 6, 9, 3, 4, 3, 4}; int ar3[] = {1, 2, 3}; assert(func0(ar1, 4) == 1); assert(func0(ar2, 7) == 2); assert(func0(ar3, 3) == 1); printf("All test cases passed!\n"); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x28(%rbp) mov %esi,-0x2c(%rbp) movl $0x0,-0x18(%rbp) movl $0x0,-0xc(%rbp) jmpq 126c <func0+0xe3> movl $0x0,-0x8(%rbp) jmpq 1256 <func0+0xcd> mov -0x8(%rbp),%eax cltq lea 0x0(,%rax,4),%rdx mov -0x28(%rbp),%rax add %rdx,%rax mov (%rax),...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_28], rdi mov [rbp+var_2C], esi mov [rbp+var_18], 0 mov [rbp+var_C], 0 jmp loc_126C loc_11AB: mov [rbp+var_8], 0 jmp loc_1256 loc_11B7: mov eax, [rbp+var_8] cdqe lea rdx, ds:0[rax*4] mov rax, [rbp+var_28] add rax, rdx mo...
long long func0(long long a1, int a2) { int v3; // [rsp+14h] [rbp-18h] int k; // [rsp+18h] [rbp-14h] int v5; // [rsp+1Ch] [rbp-10h] int i; // [rsp+20h] [rbp-Ch] int j; // [rsp+24h] [rbp-8h] int v8; // [rsp+28h] [rbp-4h] v3 = 0; for ( i = 0; i < a2 - 1; ++i ) { for ( j = 0; j < a2 - i - 1; ++j ) ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x28],RDI MOV dword ptr [RBP + -0x2c],ESI MOV dword ptr [RBP + -0x18],0x0 MOV dword ptr [RBP + -0xc],0x0 JMP 0x0010126c LAB_001011ab: MOV dword ptr [RBP + -0x8],0x0 JMP 0x00101256 LAB_001011b7: MOV EAX,dword ptr [RBP + -0x8] CDQE LEA RDX,[RAX*0x4] MOV RAX,qword ...
int func0(long param_1,int param_2) { int4 uVar1; int4 local_20; int4 local_1c; int4 local_18; int4 local_14; int4 local_10; local_20 = 0; for (local_14 = 0; local_14 < param_2 + -1; local_14 = local_14 + 1) { for (local_10 = 0; local_10 < (param_2 - local_14) + -1; local_10 = local_10 + 1) { ...
7,705
func0
#include <stdio.h> #include <assert.h> #include <stdlib.h>
int func0(int ar[], int n) { int res = 0; int i, count; // Sorting the array for (int step = 0; step < n - 1; ++step) { for (int i = 0; i < n - step - 1; ++i) { if (ar[i] > ar[i + 1]) { int temp = ar[i]; ar[i] = ar[i + 1]; ...
int main() { int ar1[] = {1, 2, 3, 4}; int ar2[] = {5, 6, 9, 3, 4, 3, 4}; int ar3[] = {1, 2, 3}; assert(func0(ar1, 4) == 1); assert(func0(ar2, 7) == 2); assert(func0(ar3, 3) == 1); printf("All test cases passed!\n"); return 0; }
O1
c
func0: endbr64 lea -0x1(%rsi),%r9d test %r9d,%r9d jle 11cd <func0+0x44> lea 0x4(%rdi),%r10 jmp 11bb <func0+0x32> add $0x4,%rax cmp %r8,%rax je 11b5 <func0+0x2c> mov (%rax),%edx mov 0x4(%rax),%ecx cmp %ecx,%edx jle 119c <func0+0x13> mov %ecx,(%rax) mov %edx,0x4(%rax) jmp 119c...
func0: endbr64 mov r10, rdi mov r8d, esi lea edi, [rsi-1] test edi, edi jle short loc_11CE lea r9, [r10+4] jmp short loc_11BE loc_11A0: add rax, 4 cmp rax, rsi jz short loc_11B9 loc_11A9: mov edx, [rax] mov ecx, [rax+4] cmp edx, ecx jle short loc_11A0 mov [rax...
long long func0(int *a1, int a2) { int v4; // edi int *v5; // rax int v6; // edx int v7; // ecx int v8; // ecx int v9; // r9d int *v10; // rdx int v11; // esi int v12; // edi int v13; // eax v4 = a2 - 1; if ( a2 - 1 > 0 ) { do { if ( v4 > 0 ) { v5 = a1; do...
func0: ENDBR64 MOV R10,RDI MOV R8D,ESI LEA EDI,[RSI + -0x1] TEST EDI,EDI JLE 0x001011ce LEA R9,[R10 + 0x4] JMP 0x001011be LAB_001011a0: ADD RAX,0x4 CMP RAX,RSI JZ 0x001011b9 LAB_001011a9: MOV EDX,dword ptr [RAX] MOV ECX,dword ptr [RAX + 0x4] CMP EDX,ECX JLE 0x001011a0 MOV dword ptr [RAX],ECX MOV dword ptr [RAX + 0x4],E...
int func0(int *param_1,int param_2) { int iVar1; int iVar2; int *piVar3; int iVar4; int iVar5; iVar4 = param_2 + -1; if (0 < iVar4) { do { if (0 < iVar4) { piVar3 = param_1; do { iVar5 = *piVar3; if (piVar3[1] < iVar5) { *piVar3 = piVar3[1]; ...
7,706
func0
#include <stdio.h> #include <assert.h> #include <stdlib.h>
int func0(int ar[], int n) { int res = 0; int i, count; // Sorting the array for (int step = 0; step < n - 1; ++step) { for (int i = 0; i < n - step - 1; ++i) { if (ar[i] > ar[i + 1]) { int temp = ar[i]; ar[i] = ar[i + 1]; ...
int main() { int ar1[] = {1, 2, 3, 4}; int ar2[] = {5, 6, 9, 3, 4, 3, 4}; int ar3[] = {1, 2, 3}; assert(func0(ar1, 4) == 1); assert(func0(ar2, 7) == 2); assert(func0(ar3, 3) == 1); printf("All test cases passed!\n"); return 0; }
O2
c
func0: endbr64 lea -0x1(%rsi),%edx test %edx,%edx jle 130f <func0+0x3f> lea 0x4(%rdi),%r10 sub $0x1,%edx mov %rdi,%rax mov %rdx,%r9 lea (%r10,%rdx,4),%r8 nopl (%rax) mov (%rax),%edx mov 0x4(%rax),%ecx cmp %ecx,%edx jle 12fe <func0+0x2e> mov %ecx,(%rax) mov %edx,0x4(%rax) add ...
func0: endbr64 lea edx, [rsi-1] mov r9, rdi mov r8d, esi test edx, edx jle short loc_1315 lea r10, [rdi+4] nop dword ptr [rax] loc_12E8: sub edx, 1 mov rax, r9 mov rdi, rdx lea rsi, [r10+rdx*4] nop dword ptr [rax] loc_12F8: mov edx, [rax] mov ecx, [rax+4] cmp e...
long long func0(int *a1, int a2) { int v2; // edx _DWORD *v5; // r10 int *v6; // rax int v7; // edi int *v8; // rsi int v9; // edx int v10; // ecx int v11; // ecx int v12; // r10d int v13; // esi int *v14; // rdx int v15; // edi int v16; // eax v2 = a2 - 1; if ( a2 - 1 > 0 ) { v5 =...
func0: ENDBR64 LEA EDX,[RSI + -0x1] MOV R9,RDI MOV R8D,ESI TEST EDX,EDX JLE 0x00101315 LEA R10,[RDI + 0x4] NOP dword ptr [RAX] LAB_001012e8: SUB EDX,0x1 MOV RAX,R9 MOV RDI,RDX LEA RSI,[R10 + RDX*0x4] NOP dword ptr [RAX] LAB_001012f8: MOV EDX,dword ptr [RAX] MOV ECX,dword ptr [RAX + 0x4] CMP EDX,ECX JLE 0x00101306 MOV d...
int func0(int *param_1,int param_2) { int iVar1; int *piVar2; int iVar3; int iVar4; uint uVar5; int iVar6; int iVar7; uVar5 = param_2 - 1; if (0 < (int)uVar5) { do { uVar5 = uVar5 - 1; piVar2 = param_1; do { iVar3 = *piVar2; if (piVar2[1] < iVar3) { ...
7,707
func0
#include <stdio.h> #include <assert.h> #include <stdlib.h>
int func0(int ar[], int n) { int res = 0; int i, count; // Sorting the array for (int step = 0; step < n - 1; ++step) { for (int i = 0; i < n - step - 1; ++i) { if (ar[i] > ar[i + 1]) { int temp = ar[i]; ar[i] = ar[i + 1]; ...
int main() { int ar1[] = {1, 2, 3, 4}; int ar2[] = {5, 6, 9, 3, 4, 3, 4}; int ar3[] = {1, 2, 3}; assert(func0(ar1, 4) == 1); assert(func0(ar2, 7) == 2); assert(func0(ar3, 3) == 1); printf("All test cases passed!\n"); return 0; }
O3
c
func0: endbr64 lea -0x1(%rsi),%edx test %edx,%edx jle 12ff <func0+0x3f> lea 0x4(%rdi),%r10 sub $0x1,%edx mov %rdi,%rax mov %rdx,%r9 lea (%r10,%rdx,4),%r8 nopl (%rax) mov (%rax),%edx mov 0x4(%rax),%ecx cmp %ecx,%edx jle 12ee <func0+0x2e> mov %ecx,(%rax) mov %edx,0x4(%rax) add ...
func0: endbr64 mov r9, rdi mov r10d, esi cmp esi, 1 jle loc_1388 mov edi, esi lea r8, [r9+4] nop dword ptr [rax+00000000h] loc_12D0: cmp edi, 1 jle loc_1370 lea edx, [rdi-2] mov rax, r9 lea rsi, [r8+rdx*4] nop dword ptr [rax+rax+00h] loc_12E8: movq xmm0, qword ptr ...
long long func0(__m128i *a1, int a2) { int i; // edi __m128i *v5; // rax __m128i v6; // xmm0 int v7; // r8d int v8; // r11d int v9; // edx __int32 *v10; // rax int v11; // edi __int32 v12; // ecx int v13; // esi if ( a2 <= 1 ) { if ( a2 != 1 ) return 0LL; v11 = 1; v8 = 0; }...
func0: ENDBR64 MOV R9,RDI MOV R10D,ESI CMP ESI,0x1 JLE 0x00101388 MOV EDI,ESI LEA R8,[R9 + 0x4] NOP dword ptr [RAX] LAB_001012d0: CMP EDI,0x1 JLE 0x00101370 LEA EDX,[RDI + -0x2] MOV RAX,R9 LEA RSI,[R8 + RDX*0x4] NOP dword ptr [RAX + RAX*0x1] LAB_001012e8: MOVQ XMM0,qword ptr [RAX] PSHUFD XMM1,XMM0,0xe5 MOVD EDX,XMM0 MO...
int func0(int8 *param_1,int param_2) { int *piVar1; int8 *puVar2; int *piVar3; int iVar4; int iVar5; int iVar6; int iVar7; int iVar8; iVar6 = param_2; if (param_2 < 2) { if (param_2 != 1) { return 0; } iVar7 = 1; iVar6 = 0; } else { do { for (; iVar6 < 2; iVar...
7,708
func0
#include <assert.h> #include <stdlib.h>
int func0(int actual_cost, int sale_amount) { if (actual_cost > sale_amount) { return actual_cost - sale_amount; } else { return -1; // using -1 to represent None because C does not have a None value } }
int main() { assert(func0(1500, 1200) == 300); assert(func0(100, 200) == -1); assert(func0(2000, 5000) == -1); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x4(%rbp) mov %esi,-0x8(%rbp) mov -0x4(%rbp),%eax cmp -0x8(%rbp),%eax jle 1167 <func0+0x1e> mov -0x4(%rbp),%eax sub -0x8(%rbp),%eax jmp 116c <func0+0x23> mov $0xffffffff,%eax pop %rbp retq
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_4], edi mov [rbp+var_8], esi mov eax, [rbp+var_4] cmp eax, [rbp+var_8] jle short loc_1167 mov eax, [rbp+var_4] sub eax, [rbp+var_8] jmp short loc_116C loc_1167: mov eax, 0FFFFFFFFh loc_116C: pop rbp retn
long long func0(int a1, int a2) { if ( a1 <= a2 ) return 0xFFFFFFFFLL; else return (unsigned int)(a1 - a2); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x4],EDI MOV dword ptr [RBP + -0x8],ESI MOV EAX,dword ptr [RBP + -0x4] CMP EAX,dword ptr [RBP + -0x8] JLE 0x00101167 MOV EAX,dword ptr [RBP + -0x4] SUB EAX,dword ptr [RBP + -0x8] JMP 0x0010116c LAB_00101167: MOV EAX,0xffffffff LAB_0010116c: POP RBP RET
int func0(int param_1,int param_2) { if (param_2 < param_1) { param_1 = param_1 - param_2; } else { param_1 = -1; } return param_1; }
7,709
func0
#include <assert.h> #include <stdlib.h>
int func0(int actual_cost, int sale_amount) { if (actual_cost > sale_amount) { return actual_cost - sale_amount; } else { return -1; // using -1 to represent None because C does not have a None value } }
int main() { assert(func0(1500, 1200) == 300); assert(func0(100, 200) == -1); assert(func0(2000, 5000) == -1); return 0; }
O1
c
func0: endbr64 cmp %esi,%edi jle 1136 <func0+0xd> mov %edi,%eax sub %esi,%eax retq mov $0xffffffff,%eax retq
func0: endbr64 cmp edi, esi jle short loc_1136 mov eax, edi sub eax, esi retn loc_1136: mov eax, 0FFFFFFFFh retn
long long func0(int a1, int a2) { if ( a1 <= a2 ) return 0xFFFFFFFFLL; else return (unsigned int)(a1 - a2); }
func0: ENDBR64 CMP EDI,ESI JLE 0x00101136 MOV EAX,EDI SUB EAX,ESI RET LAB_00101136: MOV EAX,0xffffffff RET
int func0(int param_1,int param_2) { if (param_2 < param_1) { return param_1 - param_2; } return -1; }
7,710
func0
#include <assert.h> #include <stdlib.h>
int func0(int actual_cost, int sale_amount) { if (actual_cost > sale_amount) { return actual_cost - sale_amount; } else { return -1; // using -1 to represent None because C does not have a None value } }
int main() { assert(func0(1500, 1200) == 300); assert(func0(100, 200) == -1); assert(func0(2000, 5000) == -1); return 0; }
O2
c
func0: endbr64 cmp %esi,%edi jle 1150 <func0+0x10> mov %edi,%eax sub %esi,%eax retq nopl (%rax) mov $0xffffffff,%eax retq nopw %cs:0x0(%rax,%rax,1)
func0: endbr64 cmp edi, esi jle short loc_1150 mov eax, edi sub eax, esi retn loc_1150: mov eax, 0FFFFFFFFh retn
long long func0(int a1, int a2) { if ( a1 <= a2 ) return 0xFFFFFFFFLL; else return (unsigned int)(a1 - a2); }
func0: ENDBR64 CMP EDI,ESI JLE 0x00101150 MOV EAX,EDI SUB EAX,ESI RET LAB_00101150: MOV EAX,0xffffffff RET
int func0(int param_1,int param_2) { if (param_2 < param_1) { return param_1 - param_2; } return -1; }
7,711
func0
#include <assert.h> #include <stdlib.h>
int func0(int actual_cost, int sale_amount) { if (actual_cost > sale_amount) { return actual_cost - sale_amount; } else { return -1; // using -1 to represent None because C does not have a None value } }
int main() { assert(func0(1500, 1200) == 300); assert(func0(100, 200) == -1); assert(func0(2000, 5000) == -1); return 0; }
O3
c
func0: endbr64 cmp %esi,%edi jle 1150 <func0+0x10> mov %edi,%eax sub %esi,%eax retq nopl (%rax) mov $0xffffffff,%eax retq nopw %cs:0x0(%rax,%rax,1)
func0: endbr64 cmp edi, esi jle short loc_1150 mov eax, edi sub eax, esi retn loc_1150: mov eax, 0FFFFFFFFh retn
long long func0(int a1, int a2) { if ( a1 <= a2 ) return 0xFFFFFFFFLL; else return (unsigned int)(a1 - a2); }
func0: ENDBR64 CMP EDI,ESI JLE 0x00101150 MOV EAX,EDI SUB EAX,ESI RET LAB_00101150: MOV EAX,0xffffffff RET
int func0(int param_1,int param_2) { if (param_2 < param_1) { return param_1 - param_2; } return -1; }
7,712
func0
#include <stdio.h> #include <assert.h>
int func0(int n) { int fctrsum = 0; for (int fctr = 1; fctr < n; fctr++) { if (n % fctr == 0) { fctrsum += fctr; } } return fctrsum > n; }
int main() { assert(func0(12) == 1); assert(func0(13) == 0); assert(func0(9) == 0); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x14(%rbp) movl $0x0,-0x8(%rbp) movl $0x1,-0x4(%rbp) jmp 117b <func0+0x32> mov -0x14(%rbp),%eax cltd idivl -0x4(%rbp) mov %edx,%eax test %eax,%eax jne 1177 <func0+0x2e> mov -0x4(%rbp),%eax add %eax,-0x8(%rbp) addl $0x1,-0x4(%rbp) mov ...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_14], edi mov [rbp+var_8], 0 mov [rbp+var_4], 1 jmp short loc_117B loc_1164: mov eax, [rbp+var_14] cdq idiv [rbp+var_4] mov eax, edx test eax, eax jnz short loc_1177 mov eax, [rbp+var_4] add [rbp+var_8], eax loc_1177: add ...
_BOOL8 func0(int a1) { int v2; // [rsp+Ch] [rbp-8h] int i; // [rsp+10h] [rbp-4h] v2 = 0; for ( i = 1; i < a1; ++i ) { if ( !(a1 % i) ) v2 += i; } return v2 > a1; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x14],EDI MOV dword ptr [RBP + -0x8],0x0 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0010117b LAB_00101164: MOV EAX,dword ptr [RBP + -0x14] CDQ IDIV dword ptr [RBP + -0x4] MOV EAX,EDX TEST EAX,EAX JNZ 0x00101177 MOV EAX,dword ptr [RBP + -0x4] ADD dword ptr [RBP + -0x8]...
bool func0(int param_1) { int4 local_10; int4 local_c; local_10 = 0; for (local_c = 1; local_c < param_1; local_c = local_c + 1) { if (param_1 % local_c == 0) { local_10 = local_10 + local_c; } } return param_1 < local_10; }
7,713
func0
#include <stdio.h> #include <assert.h>
int func0(int n) { int fctrsum = 0; for (int fctr = 1; fctr < n; fctr++) { if (n % fctr == 0) { fctrsum += fctr; } } return fctrsum > n; }
int main() { assert(func0(12) == 1); assert(func0(13) == 0); assert(func0(9) == 0); return 0; }
O1
c
func0: endbr64 cmp $0x1,%edi jle 1179 <func0+0x30> mov $0x1,%ecx mov $0x0,%esi mov %edi,%eax cltd idiv %ecx lea (%rsi,%rcx,1),%eax test %edx,%edx cmove %eax,%esi add $0x1,%ecx cmp %ecx,%edi jne 115c <func0+0x13> cmp %esi,%edi setl %al movzbl %al,%eax retq mov $0x0,%esi jmp 117...
func0: endbr64 cmp edi, 1 jle short loc_1179 mov ecx, 1 mov esi, 0 loc_115C: mov eax, edi cdq idiv ecx lea eax, [rsi+rcx] test edx, edx cmovz esi, eax add ecx, 1 cmp edi, ecx jnz short loc_115C loc_1170: cmp edi, esi setl al movzx eax, al retn loc_1179: mov esi, ...
_BOOL8 func0(int a1) { int v1; // ecx int v2; // esi if ( a1 <= 1 ) { v2 = 0; } else { v1 = 1; v2 = 0; do { if ( !(a1 % v1) ) v2 += v1; ++v1; } while ( a1 != v1 ); } return a1 < v2; }
func0: ENDBR64 CMP EDI,0x1 JLE 0x00101179 MOV ECX,0x1 MOV ESI,0x0 LAB_0010115c: MOV EAX,EDI CDQ IDIV ECX LEA EAX,[RSI + RCX*0x1] TEST EDX,EDX CMOVZ ESI,EAX ADD ECX,0x1 CMP EDI,ECX JNZ 0x0010115c LAB_00101170: CMP EDI,ESI SETL AL MOVZX EAX,AL RET LAB_00101179: MOV ESI,0x0 JMP 0x00101170
bool func0(int param_1) { int iVar1; int iVar2; if (param_1 < 2) { iVar2 = 0; } else { iVar1 = 1; iVar2 = 0; do { if (param_1 % iVar1 == 0) { iVar2 = iVar2 + iVar1; } iVar1 = iVar1 + 1; } while (param_1 != iVar1); } return param_1 < iVar2; }
7,714
func0
#include <stdio.h> #include <assert.h>
int func0(int n) { int fctrsum = 0; for (int fctr = 1; fctr < n; fctr++) { if (n % fctr == 0) { fctrsum += fctr; } } return fctrsum > n; }
int main() { assert(func0(12) == 1); assert(func0(13) == 0); assert(func0(9) == 0); return 0; }
O2
c
func0: endbr64 cmp $0x1,%edi jle 1270 <func0+0x30> mov $0x1,%ecx xor %esi,%esi mov %edi,%eax cltd idiv %ecx lea (%rsi,%rcx,1),%eax test %edx,%edx cmove %eax,%esi add $0x1,%ecx cmp %ecx,%edi jne 1250 <func0+0x10> xor %eax,%eax cmp %esi,%edi setl %al retq nopl 0x0(%rax) xor %e...
func0: endbr64 cmp edi, 1 jle short loc_1270 mov ecx, 1 xor esi, esi loc_1250: mov eax, edi cdq idiv ecx lea eax, [rsi+rcx] test edx, edx cmovz esi, eax add ecx, 1 cmp edi, ecx jnz short loc_1250 xor eax, eax cmp edi, esi setl al retn loc_1270: xor esi, esi xor...
_BOOL8 func0(int a1) { int v1; // ecx int v2; // esi if ( a1 <= 1 ) return a1 < 0; v1 = 1; v2 = 0; do { if ( !(a1 % v1) ) v2 += v1; ++v1; } while ( a1 != v1 ); return a1 < v2; }
func0: ENDBR64 CMP EDI,0x1 JLE 0x00101270 MOV ECX,0x1 XOR ESI,ESI LAB_00101250: MOV EAX,EDI CDQ IDIV ECX LEA EAX,[RSI + RCX*0x1] TEST EDX,EDX CMOVZ ESI,EAX ADD ECX,0x1 CMP EDI,ECX JNZ 0x00101250 XOR EAX,EAX CMP EDI,ESI SETL AL RET LAB_00101270: XOR ESI,ESI XOR EAX,EAX CMP EDI,ESI SETL AL RET
bool func0(int param_1) { int iVar1; int iVar2; if (1 < param_1) { iVar1 = 1; iVar2 = 0; do { if (param_1 % iVar1 == 0) { iVar2 = iVar2 + iVar1; } iVar1 = iVar1 + 1; } while (param_1 != iVar1); return param_1 < iVar2; } return param_1 < 0; }
7,715
func0
#include <stdio.h> #include <assert.h>
int func0(int n) { int fctrsum = 0; for (int fctr = 1; fctr < n; fctr++) { if (n % fctr == 0) { fctrsum += fctr; } } return fctrsum > n; }
int main() { assert(func0(12) == 1); assert(func0(13) == 0); assert(func0(9) == 0); return 0; }
O3
c
func0: endbr64 cmp $0x1,%edi jle 1170 <func0+0x30> mov $0x1,%ecx xor %esi,%esi mov %edi,%eax cltd idiv %ecx lea (%rsi,%rcx,1),%eax test %edx,%edx cmove %eax,%esi add $0x1,%ecx cmp %ecx,%edi jne 1150 <func0+0x10> xor %eax,%eax cmp %esi,%edi setl %al retq nopl 0x0(%rax) xor %e...
func0: endbr64 cmp edi, 1 jle short loc_1170 mov ecx, 1 xor esi, esi loc_1150: mov eax, edi cdq idiv ecx lea eax, [rsi+rcx] test edx, edx cmovz esi, eax add ecx, 1 cmp edi, ecx jnz short loc_1150 xor eax, eax cmp edi, esi setl al retn loc_1170: xor esi, esi xor...
_BOOL8 func0(int a1) { int v1; // ecx int v2; // esi if ( a1 <= 1 ) return a1 < 0; v1 = 1; v2 = 0; do { if ( !(a1 % v1) ) v2 += v1; ++v1; } while ( a1 != v1 ); return a1 < v2; }
func0: ENDBR64 CMP EDI,0x1 JLE 0x00101170 MOV ECX,0x1 XOR ESI,ESI LAB_00101150: MOV EAX,EDI CDQ IDIV ECX LEA EAX,[RSI + RCX*0x1] TEST EDX,EDX CMOVZ ESI,EAX ADD ECX,0x1 CMP EDI,ECX JNZ 0x00101150 XOR EAX,EAX CMP EDI,ESI SETL AL RET LAB_00101170: XOR ESI,ESI XOR EAX,EAX CMP EDI,ESI SETL AL RET
bool func0(int param_1) { int iVar1; int iVar2; if (1 < param_1) { iVar1 = 1; iVar2 = 0; do { if (param_1 % iVar1 == 0) { iVar2 = iVar2 + iVar1; } iVar1 = iVar1 + 1; } while (param_1 != iVar1); return param_1 < iVar2; } return param_1 < 0; }
7,716
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include <ctype.h>
char** func0(const char* text, int* count) { int n = strlen(text); char** result = malloc(n * sizeof(char*)); *count = 0; int word_start = 0; for (int i = 1; i <= n; i++) { if (i == n || (isupper(text[i]) && !isupper(text[i-1]))) { int word_length = i - word_start; ...
int main() { int count1, count2, count3; char** result1 = func0("LearnToBuildAnythingWithGoogle", &count1); char** result2 = func0("ApmlifyingTheBlack+DeveloperCommunity", &count2); char** result3 = func0("UpdateInTheGoEcoSystem", &count3); assert(count1 == 6); assert(strcmp(result1[0], ...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x38,%rsp mov %rdi,-0x38(%rbp) mov %rsi,-0x40(%rbp) mov -0x38(%rbp),%rax mov %rax,%rdi callq 10e0 <strlen@plt> mov %eax,-0x20(%rbp) mov -0x20(%rbp),%eax cltq shl $0x3,%rax mov %rax,%rdi callq 1120 <malloc@plt> mov %rax,-0x18(%r...
func0: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 38h mov [rbp+s], rdi mov [rbp+var_40], rsi mov rax, [rbp+s] mov rdi, rax; s call _strlen mov [rbp+var_20], eax mov eax, [rbp+var_20] cdqe shl rax, 3 mov rdi, rax; size call _malloc mov [rbp+var_18], rax mov ...
char ** func0(const char *a1, int *a2) { void **v2; // rbx int v4; // [rsp+18h] [rbp-28h] int i; // [rsp+1Ch] [rbp-24h] int v6; // [rsp+20h] [rbp-20h] char **v7; // [rsp+28h] [rbp-18h] v6 = strlen(a1); v7 = (char **)malloc(8LL * v6); *a2 = 0; v4 = 0; for ( i = 1; i <= v6; ++i ) { if ( i == v6...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x38 MOV qword ptr [RBP + -0x38],RDI MOV qword ptr [RBP + -0x40],RSI MOV RAX,qword ptr [RBP + -0x38] MOV RDI,RAX CALL 0x001010e0 MOV dword ptr [RBP + -0x20],EAX MOV EAX,dword ptr [RBP + -0x20] CDQE SHL RAX,0x3 MOV RDI,RAX CALL 0x00101120 MOV qword ptr [RBP + -0x18],R...
void * func0(char *param_1,int *param_2) { int iVar1; int iVar2; int iVar3; size_t sVar4; void *pvVar5; ushort **ppuVar6; void *pvVar7; int local_30; int local_2c; sVar4 = strlen(param_1); iVar2 = (int)sVar4; pvVar5 = malloc((long)iVar2 << 3); *param_2 = 0; local_30 = 0; local_2c = 1; ...
7,717
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include <ctype.h>
char** func0(const char* text, int* count) { int n = strlen(text); char** result = malloc(n * sizeof(char*)); *count = 0; int word_start = 0; for (int i = 1; i <= n; i++) { if (i == n || (isupper(text[i]) && !isupper(text[i-1]))) { int word_length = i - word_start; ...
int main() { int count1, count2, count3; char** result1 = func0("LearnToBuildAnythingWithGoogle", &count1); char** result2 = func0("ApmlifyingTheBlack+DeveloperCommunity", &count2); char** result3 = func0("UpdateInTheGoEcoSystem", &count3); assert(count1 == 6); assert(strcmp(result1[0], ...
O1
c
func0: endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x28,%rsp mov %rdi,%r12 mov %rsi,%rbp mov $0xffffffffffffffff,%rcx mov $0x0,%eax repnz scas %es:(%rdi),%al not %rcx lea -0x1(%rcx),%rbx mov %ebx,0x14(%rsp) movslq %ebx,%rdi shl $0x3,%rdi callq 10e0 <m...
func0: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 28h mov rbp, rdi mov r13, rsi call _strlen mov rbx, rax mov [rsp+58h+var_40], eax movsxd rdi, eax shl rdi, 3 call _malloc mov [rsp+58h+var_48], rax mov dword ptr [r13+0], 0 test ebx,...
long long func0(long long a1, int *a2) { int v2; // ebx long long v3; // r14 long long v4; // rbx _QWORD *v5; // r15 long long v6; // r15 long long v7; // rax int v9; // [rsp+Ch] [rbp-4Ch] long long v10; // [rsp+10h] [rbp-48h] int v11; // [rsp+18h] [rbp-40h] int v12; // [rsp+1Ch] [rbp-3Ch] v2 = ...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x28 MOV RBP,RDI MOV R13,RSI CALL 0x001010e0 MOV RBX,RAX MOV dword ptr [RSP + 0x18],EAX MOVSXD RDI,EAX SHL RDI,0x3 CALL 0x00101120 MOV qword ptr [RSP + 0x10],RAX MOV dword ptr [R13],0x0 TEST EBX,EBX JLE 0x00101329 LEA R14D,[RBX + -0x1] ADD R14...
void * func0(char *param_1,int *param_2) { int iVar1; char *__dest; int iVar2; size_t sVar3; void *pvVar4; void *pvVar5; ushort **ppuVar6; int iVar7; long lVar8; int iVar9; int local_4c; sVar3 = strlen(param_1); iVar2 = (int)sVar3; pvVar4 = malloc((long)iVar2 << 3); *param_2 = 0; if ...
7,718
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include <ctype.h>
char** func0(const char* text, int* count) { int n = strlen(text); char** result = malloc(n * sizeof(char*)); *count = 0; int word_start = 0; for (int i = 1; i <= n; i++) { if (i == n || (isupper(text[i]) && !isupper(text[i-1]))) { int word_length = i - word_start; ...
int main() { int count1, count2, count3; char** result1 = func0("LearnToBuildAnythingWithGoogle", &count1); char** result2 = func0("ApmlifyingTheBlack+DeveloperCommunity", &count2); char** result3 = func0("UpdateInTheGoEcoSystem", &count3); assert(count1 == 6); assert(strcmp(result1[0], ...
O2
c
func0: endbr64 push %r15 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp mov %rsi,%rbp push %rbx sub $0x28,%rsp callq 10d0 <strlen@plt> movslq %eax,%rdi mov %eax,0x4(%rsp) mov %rax,%rbx shl $0x3,%rdi callq 1100 <malloc@plt> movl $0x0,0x0(%rbp) mov %rax,%r14 test %ebx,%ebx jl...
func0: endbr64 push r15 push r14 push r13 mov r13, rsi push r12 push rbp mov rbp, rdi push rbx sub rsp, 28h call _strlen movsxd rdi, eax mov [rsp+58h+var_54], eax mov rbx, rax shl rdi, 3 call _malloc mov dword ptr [r13+0], 0 mov r14, rax test ebx, ebx jle ...
long long func0(long long a1, int *a2) { long long v3; // rax long long v4; // r14 long long v5; // r15 int v6; // ebx long long v7; // rax long long v8; // rsi int v10; // [rsp+4h] [rbp-54h] int v11; // [rsp+10h] [rbp-48h] _QWORD *v12; // [rsp+18h] [rbp-40h] v10 = strlen(); v3 = malloc(8LL * v1...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 MOV R13,RSI PUSH R12 PUSH RBP MOV RBP,RDI PUSH RBX SUB RSP,0x28 CALL 0x001010e0 MOVSXD RDI,EAX MOV dword ptr [RSP + 0x4],EAX MOV RBX,RAX SHL RDI,0x3 CALL 0x00101120 MOV dword ptr [R13],0x0 MOV R14,RAX TEST EBX,EBX JLE 0x0010184e LEA EAX,[RBX + -0x1] MOV R15D,0x1 XOR EBX,EBX ADD...
void * func0(char *param_1,int *param_2) { int iVar1; int iVar2; size_t sVar3; void *pvVar4; ushort **ppuVar5; void *pvVar6; char *pcVar7; int iVar8; int iVar9; int iVar10; long lVar11; sVar3 = strlen(param_1); iVar2 = (int)sVar3; pvVar4 = malloc((long)iVar2 << 3); *param_2 = 0; if (...
7,719
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include <ctype.h>
char** func0(const char* text, int* count) { int n = strlen(text); char** result = malloc(n * sizeof(char*)); *count = 0; int word_start = 0; for (int i = 1; i <= n; i++) { if (i == n || (isupper(text[i]) && !isupper(text[i-1]))) { int word_length = i - word_start; ...
int main() { int count1, count2, count3; char** result1 = func0("LearnToBuildAnythingWithGoogle", &count1); char** result2 = func0("ApmlifyingTheBlack+DeveloperCommunity", &count2); char** result3 = func0("UpdateInTheGoEcoSystem", &count3); assert(count1 == 6); assert(strcmp(result1[0], ...
O3
c
func0: endbr64 push %r15 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp mov %rsi,%rbp push %rbx sub $0x28,%rsp callq 10d0 <strlen@plt> movslq %eax,%rdi mov %eax,0x4(%rsp) mov %rax,%rbx shl $0x3,%rdi callq 1100 <malloc@plt> movl $0x0,0x0(%rbp) mov %rax,%r14 test %ebx,%ebx jl...
func0: endbr64 push r15 push r14 push r13 push r12 mov r12, rsi push rbp mov rbp, rdi push rbx sub rsp, 28h call _strlen movsxd rdi, eax mov rbx, rax mov r15d, eax shl rdi, 3; size call _malloc mov dword ptr [r12], 0 mov [rsp+58h+var_50], rax test ebx, ebx jle...
char ** func0(const char *a1, int *a2) { int v3; // ebx int v4; // r15d char **v5; // rax long long v6; // r13 long long v7; // r14 int v8; // ebx long long v9; // r13 const unsigned __int16 *v10; // rax long long v11; // rsi char **v13; // [rsp+8h] [rbp-50h] int v14; // [rsp+10h] [rbp-48h] void...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 MOV R12,RSI PUSH RBP MOV RBP,RDI PUSH RBX SUB RSP,0x28 CALL 0x001010e0 MOVSXD RDI,EAX MOV RBX,RAX MOV R15D,EAX SHL RDI,0x3 CALL 0x00101120 MOV dword ptr [R12],0x0 MOV qword ptr [RSP + 0x8],RAX TEST EBX,EBX JLE 0x00101849 LEA R13D,[RBX + -0x1] MOV R14D,0x1 XOR EBX,EBX A...
void * func0(char *param_1,int *param_2) { int iVar1; int iVar2; size_t sVar3; void *pvVar4; ushort **ppuVar5; void *pvVar6; char *pcVar7; int iVar8; int iVar9; int iVar10; long lVar11; sVar3 = strlen(param_1); iVar2 = (int)sVar3; pvVar4 = malloc((long)iVar2 << 3); *param_2 = 0; if (...
7,720
func0
#include <math.h> #include <assert.h>
int func0(int n) { return (int)(log2(n & -n) + 1); }
int main() { assert(func0(12) == 3); assert(func0(18) == 2); assert(func0(16) == 5); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x10,%rsp mov %edi,-0x4(%rbp) mov -0x4(%rbp),%eax neg %eax and -0x4(%rbp),%eax cvtsi2sd %eax,%xmm0 callq 1060 <log2@plt> movsd 0xee7(%rip),%xmm1 addsd %xmm1,%xmm0 cvttsd2si %xmm0,%eax leaveq retq
func0: endbr64 push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_4], edi mov eax, [rbp+var_4] neg eax and eax, [rbp+var_4] pxor xmm2, xmm2 cvtsi2sd xmm2, eax movq rax, xmm2 movq xmm0, rax; x call _log2 movsd xmm1, cs:qword_2058 addsd xmm0, xmm1 cvttsd2si eax, xmm0 leave retn
long long func0(int a1) { return (unsigned int)(int)(log2((double)(a1 & -a1)) + 1.0); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV dword ptr [RBP + -0x4],EDI MOV EAX,dword ptr [RBP + -0x4] NEG EAX AND EAX,dword ptr [RBP + -0x4] PXOR XMM2,XMM2 CVTSI2SD XMM2,EAX MOVQ RAX,XMM2 MOVQ XMM0,RAX CALL 0x00101060 MOVSD XMM1,qword ptr [0x00102058] ADDSD XMM0,XMM1 CVTTSD2SI EAX,XMM0 LEAVE RET
int func0(uint param_1) { double dVar1; dVar1 = log2((double)(int)(-param_1 & param_1)); return (int)(dVar1 + DAT_00102058); }
7,721
func0
#include <math.h> #include <assert.h>
int func0(int n) { return (int)(log2(n & -n) + 1); }
int main() { assert(func0(12) == 3); assert(func0(18) == 2); assert(func0(16) == 5); return 0; }
O1
c
func0: endbr64 sub $0x8,%rsp mov %edi,%eax neg %edi and %eax,%edi pxor %xmm0,%xmm0 cvtsi2sd %edi,%xmm0 callq 1060 <log2@plt> addsd 0xeec(%rip),%xmm0 cvttsd2si %xmm0,%eax add $0x8,%rsp retq
func0: endbr64 sub rsp, 8 mov eax, edi neg eax and eax, edi pxor xmm0, xmm0 cvtsi2sd xmm0, eax call _log2 addsd xmm0, cs:qword_2058 cvttsd2si eax, xmm0 add rsp, 8 retn
long long func0(int a1) { return (unsigned int)(int)(log2((double)(a1 & -a1)) + 1.0); }
func0: ENDBR64 SUB RSP,0x8 MOV EAX,EDI NEG EAX AND EAX,EDI PXOR XMM0,XMM0 CVTSI2SD XMM0,EAX CALL 0x00101060 ADDSD XMM0,qword ptr [0x00102058] CVTTSD2SI EAX,XMM0 ADD RSP,0x8 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int func0(uint param_1) { double dVar1; dVar1 = log2((double)(int)(-param_1 & param_1)); return (int)(dVar1 + _DAT_00102058); }
7,722
func0
#include <math.h> #include <assert.h>
int func0(int n) { return (int)(log2(n & -n) + 1); }
int main() { assert(func0(12) == 3); assert(func0(18) == 2); assert(func0(16) == 5); return 0; }
O2
c
func0: endbr64 mov %edi,%r8d neg %edi pxor %xmm0,%xmm0 sub $0x8,%rsp and %r8d,%edi cvtsi2sd %edi,%xmm0 callq 1050 <log2@plt> addsd 0xe83(%rip),%xmm0 add $0x8,%rsp cvttsd2si %xmm0,%eax retq xchg %ax,%ax
func0: endbr64 mov eax, edi pxor xmm0, xmm0 sub rsp, 8 neg eax and eax, edi cvtsi2sd xmm0, eax call _log2 addsd xmm0, cs:qword_2008 add rsp, 8 cvttsd2si eax, xmm0 retn
long long func0(int a1) { return (unsigned int)(int)(log2((double)(a1 & -a1)) + 1.0); }
func0: ENDBR64 MOV EAX,EDI PXOR XMM0,XMM0 SUB RSP,0x8 NEG EAX AND EAX,EDI CVTSI2SD XMM0,EAX CALL 0x00101050 ADDSD XMM0,qword ptr [0x00102008] ADD RSP,0x8 CVTTSD2SI EAX,XMM0 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int func0(uint param_1) { double dVar1; dVar1 = log2((double)(int)(-param_1 & param_1)); return (int)(dVar1 + _DAT_00102008); }
7,723
func0
#include <math.h> #include <assert.h>
int func0(int n) { return (int)(log2(n & -n) + 1); }
int main() { assert(func0(12) == 3); assert(func0(18) == 2); assert(func0(16) == 5); return 0; }
O3
c
func0: endbr64 mov %edi,%r8d neg %edi pxor %xmm0,%xmm0 sub $0x8,%rsp and %r8d,%edi cvtsi2sd %edi,%xmm0 callq 1050 <log2@plt> addsd 0xe83(%rip),%xmm0 add $0x8,%rsp cvttsd2si %xmm0,%eax retq xchg %ax,%ax
func0: endbr64 mov eax, edi pxor xmm0, xmm0 sub rsp, 8 neg eax and eax, edi cvtsi2sd xmm0, eax; x call _log2 addsd xmm0, cs:qword_2008 add rsp, 8 cvttsd2si eax, xmm0 retn
long long func0(int a1) { return (unsigned int)(int)(log2((double)(a1 & -a1)) + 1.0); }
func0: ENDBR64 MOV EAX,EDI PXOR XMM0,XMM0 SUB RSP,0x8 NEG EAX AND EAX,EDI CVTSI2SD XMM0,EAX CALL 0x00101050 ADDSD XMM0,qword ptr [0x00102008] ADD RSP,0x8 CVTTSD2SI EAX,XMM0 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int func0(uint param_1) { double dVar1; dVar1 = log2((double)(int)(-param_1 & param_1)); return (int)(dVar1 + _DAT_00102008); }
7,724
func0
#include <stdio.h> #include <assert.h> #include <string.h>
char* func0(int num) { static char roman_num[100]; int val[] = {1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1}; char* syb[] = {"M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V", "IV", "I"}; roman_num[0] = '\0'; int i = 0; while (num > 0) { while (num >= val[i]) { ...
int main() { assert(strcmp(func0(1), "I") == 0); assert(strcmp(func0(50), "L") == 0); assert(strcmp(func0(4), "IV") == 0); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0xd0,%rsp mov %edi,-0xc4(%rbp) mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax movl $0x3e8,-0xb0(%rbp) movl $0x384,-0xac(%rbp) movl $0x1f4,-0xa8(%rbp) movl $0x190,-0xa4(%rbp) movl $0x64,-0xa0(%rbp) movl $0x5a,-0x9c(%rbp) movl $0x32,-0x98(...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 0D0h mov [rbp+var_C4], edi mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax mov [rbp+var_B0], 3E8h mov [rbp+var_AC], 384h mov [rbp+var_A8], 1F4h mov [rbp+var_A4], 190h mov [rbp+var_A0], 64h ; 'd' mov [rbp+var_9C], 5Ah ; 'Z...
char * func0(int a1) { int v3; // [rsp+1Ch] [rbp-B4h] _DWORD v4[16]; // [rsp+20h] [rbp-B0h] char *src[14]; // [rsp+60h] [rbp-70h] src[13] = (char *)__readfsqword(0x28u); v4[0] = 1000; v4[1] = 900; v4[2] = 500; v4[3] = 400; v4[4] = 100; v4[5] = 90; v4[6] = 50; v4[7] = 40; v4[8] = 10; v4[9] =...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0xd0 MOV dword ptr [RBP + -0xc4],EDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX MOV dword ptr [RBP + -0xb0],0x3e8 MOV dword ptr [RBP + -0xac],0x384 MOV dword ptr [RBP + -0xa8],0x1f4 MOV dword ptr [RBP + -0xa4],0x190 MOV dword ptr [RBP + -0xa0],0x64...
int1 * func0(int param_1) { long in_FS_OFFSET; int local_cc; int local_bc; int local_b8 [16]; int *local_78 [4]; int *local_58; int *local_50; int *local_48; int *local_40; int *local_38; int *local_30; int *local_28; int *local_20; int *local_18; long local_10; local_10 = *(long *)(...
7,725
func0
#include <stdio.h> #include <assert.h> #include <string.h>
char* func0(int num) { static char roman_num[100]; int val[] = {1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1}; char* syb[] = {"M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V", "IV", "I"}; roman_num[0] = '\0'; int i = 0; while (num > 0) { while (num >= val[i]) { ...
int main() { assert(strcmp(func0(1), "I") == 0); assert(strcmp(func0(50), "L") == 0); assert(strcmp(func0(4), "IV") == 0); return 0; }
O1
c
func0: endbr64 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0xb0,%rsp mov %fs:0x28,%rax mov %rax,0xa8(%rsp) xor %eax,%eax movl $0x3e8,(%rsp) movl $0x384,0x4(%rsp) movl $0x1f4,0x8(%rsp) movl $0x190,0xc(%rsp) movl $0x64,0x10(%rsp) movl $0x5a,0x14(%rsp) movl $0x32,0x18(%rsp) m...
func0: endbr64 push r14 push r13 push r12 push rbp push rbx sub rsp, 0B0h mov rax, fs:28h mov [rsp+0D8h+var_30], rax xor eax, eax mov [rsp+0D8h+var_D8], 3E8h mov [rsp+0D8h+var_D4], 384h mov [rsp+0D8h+var_D0], 1F4h mov [rsp+0D8h+var_CC], 190h mov [rsp+0D8h+var_C8], 64h ...
char * func0(int a1, long long a2, long long a3, long long a4, long long a5, long long a6) { int v6; // ebx long long *v7; // r14 _QWORD *v8; // r12 int i; // ebp long long v11; // [rsp+0h] [rbp-D8h] BYREF long long v12; // [rsp+8h] [rbp-D0h] long long v13; // [rsp+10h] [rbp-C8h] long long v14; // [rsp+...
func0: ENDBR64 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0xb0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0xa8],RAX XOR EAX,EAX MOV dword ptr [RSP],0x3e8 MOV dword ptr [RSP + 0x4],0x384 MOV dword ptr [RSP + 0x8],0x1f4 MOV dword ptr [RSP + 0xc],0x190 MOV dword ptr [RSP + 0x10],0x64 MOV dword ptr [RSP + 0...
int1 * func0(int param_1) { int iVar1; int **ppuVar2; int *piVar3; long in_FS_OFFSET; int local_d8 [16]; int *local_98 [4]; int *local_78; int *local_70; int *local_68; int *local_60; int *local_58; int *local_50; int *local_48; int *local_40; int *local_38; long local_30; piVar3 =...
7,726
func0
#include <stdio.h> #include <assert.h> #include <string.h>
char* func0(int num) { static char roman_num[100]; int val[] = {1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1}; char* syb[] = {"M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V", "IV", "I"}; roman_num[0] = '\0'; int i = 0; while (num > 0) { while (num >= val[i]) { ...
int main() { assert(strcmp(func0(1), "I") == 0); assert(strcmp(func0(50), "L") == 0); assert(strcmp(func0(4), "IV") == 0); return 0; }
O2
c
func0: endbr64 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0xb0,%rsp mov %fs:0x28,%rax mov %rax,0xa8(%rsp) xor %eax,%eax movb $0x0,0x2dc3(%rip) movabs $0x1f400000384,%rax mov %rax,0x4(%rsp) movabs $0x6400000190,%rax mov %rax,0xc(%rsp) movabs $0x320000005a,%rax mov %rax,0x14(%...
func0: endbr64 push r14 lea r8, roman_num_1 push r13 push r12 push rbp push rbx sub rsp, 0B0h mov rax, fs:28h mov [rsp+0D8h+var_30], rax mov rax, 1F400000384h mov cs:roman_num_1, 0 mov [rsp+0D8h+var_D4], rax mov rax, 6400000190h mov [rsp+0D8h+var_CC], rax mov rax, ...
char * func0(int a1) { char *v1; // r8 int v2; // ebx int v3; // ebp long long v4; // r13 long long v5; // r12 int v7; // [rsp+0h] [rbp-D8h] long long v8; // [rsp+4h] [rbp-D4h] long long v9; // [rsp+Ch] [rbp-CCh] long long v10; // [rsp+14h] [rbp-C4h] long long v11; // [rsp+1Ch] [rbp-BCh] long long...
func0: ENDBR64 PUSH R14 LEA R8,[0x104040] PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0xb0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0xa8],RAX MOV RAX,0x1f400000384 MOV byte ptr [0x00104040],0x0 MOV qword ptr [RSP + 0x4],RAX MOV RAX,0x6400000190 MOV qword ptr [RSP + 0xc],RAX MOV RAX,0x320000005a MOV qword ptr [R...
int1 * func0(int param_1) { int8 uVar1; int iVar2; int1 *puVar3; long lVar4; long lVar5; long in_FS_OFFSET; int local_d4 [15]; int *local_98 [4]; int *local_78; int *local_70; int *local_68; int *local_60; int *local_58; int *local_50; int *local_48; int *local_40; int *local_38; lo...
7,727
func0
#include <stdio.h> #include <assert.h> #include <string.h>
char* func0(int num) { static char roman_num[100]; int val[] = {1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1}; char* syb[] = {"M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V", "IV", "I"}; roman_num[0] = '\0'; int i = 0; while (num > 0) { while (num >= val[i]) { ...
int main() { assert(strcmp(func0(1), "I") == 0); assert(strcmp(func0(50), "L") == 0); assert(strcmp(func0(4), "IV") == 0); return 0; }
O3
c
func0: endbr64 push %r15 lea 0xda8(%rip),%rdx lea 0xda4(%rip),%rsi push %r14 lea 0x2dd3(%rip),%rcx push %r13 xor %r13d,%r13d push %r12 push %rbp push %rbx mov %edi,%ebx lea 0xd92(%rip),%rdi sub $0xb8,%rsp movdqa 0xe32(%rip),%xmm0 mov %fs:0x28,%rax mov %rax,0xa8(%rsp) xor %eax,%...
func0: endbr64 push r15 lea rdx, unk_2005 lea rsi, unk_2008 push r14 lea rcx, roman_num_1 push r13 push r12 push rbp push rbx mov ebx, edi lea rdi, unk_2011 sub rsp, 0B8h movdqa xmm0, cs:xmmword_2090 mov rax, fs:28h mov [rsp+0E8h+var_40], rax xor eax, eax lea r...
char * func0(int a1, long long a2, long long a3, long long a4, long long a5, long long a6) { char *v6; // rcx int v7; // ebx long long v8; // r13 __int32 v9; // ebp long long v10; // r12 __m128i si128; // [rsp+0h] [rbp-E8h] __m128i v13; // [rsp+10h] [rbp-D8h] __m128i v14; // [rsp+20h] [rbp-C8h] int v1...
func0: ENDBR64 PUSH R15 LEA RDX,[0x102005] LEA RSI,[0x102008] PUSH R14 LEA RCX,[0x104040] PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV EBX,EDI LEA RDI,[0x102011] SUB RSP,0xb8 MOVDQA XMM0,xmmword ptr [0x00102090] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0xa8],RAX XOR EAX,EAX LEA RAX,[0x102004] MOV byte ptr [0x0010404...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int1 * func0(int param_1) { int iVar1; int *puVar2; int1 *puVar3; long lVar4; long in_FS_OFFSET; int8 local_e8; int8 uStack_e0; int8 local_d8; int8 uStack_d0; int8 local_c8; int8 uStack_c0; int4 local_b8; in...
7,728
func0
#include <stdio.h> #include <assert.h>
double func0(int lst[], int len) { int sum = 0; for (int i = 0; i < len; i++) { sum += lst[i]; } return (double)sum / len; }
int main() { int a[] = {15, 9, 55, 41, 35, 20, 62, 49}; int b[] = {4, 5, 1, 2, 9, 7, 10, 8}; int c[] = {1, 2, 3}; assert(func0(a, 8) == 35.75); assert(func0(b, 8) == 5.75); assert(func0(c, 3) == 2); 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,729
func0
#include <stdio.h> #include <assert.h>
double func0(int lst[], int len) { int sum = 0; for (int i = 0; i < len; i++) { sum += lst[i]; } return (double)sum / len; }
int main() { int a[] = {15, 9, 55, 41, 35, 20, 62, 49}; int b[] = {4, 5, 1, 2, 9, 7, 10, 8}; int c[] = {1, 2, 3}; assert(func0(a, 8) == 35.75); assert(func0(b, 8) == 5.75); assert(func0(c, 3) == 2); 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,730
func0
#include <stdio.h> #include <assert.h>
double func0(int lst[], int len) { int sum = 0; for (int i = 0; i < len; i++) { sum += lst[i]; } return (double)sum / len; }
int main() { int a[] = {15, 9, 55, 41, 35, 20, 62, 49}; int b[] = {4, 5, 1, 2, 9, 7, 10, 8}; int c[] = {1, 2, 3}; assert(func0(a, 8) == 35.75); assert(func0(b, 8) == 5.75); assert(func0(c, 3) == 2); return 0; }
O2
c
func0: endbr64 test %esi,%esi jle 1320 <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 12f8 <func0+0x18> pxor %xmm0,%xmm0 pxor %xmm1,%xmm1 cvtsi2sd %eax,%xmm0 cvtsi2sd %esi,%xmm1 divsd %xmm1,%...
func0: endbr64 test esi, esi jle short loc_1310 lea eax, [rsi-1] lea rdx, [rdi+rax*4+4] xor eax, eax nop word ptr [rax+rax+00h] loc_12E8: add eax, [rdi] add rdi, 4 cmp rdi, rdx jnz short loc_12E8 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 0x00101310 LEA EAX,[RSI + -0x1] LEA RDX,[RDI + RAX*0x4 + 0x4] XOR EAX,EAX NOP word ptr [RAX + RAX*0x1] LAB_001012e8: ADD EAX,dword ptr [RDI] ADD RDI,0x4 CMP RDI,RDX JNZ 0x001012e8 PXOR XMM0,XMM0 PXOR XMM1,XMM1 CVTSI2SD XMM0,EAX CVTSI2SD XMM1,ESI DIVSD XMM0,XMM1 RET LAB_00101310: 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,731
func0
#include <stdio.h> #include <assert.h>
double func0(int lst[], int len) { int sum = 0; for (int i = 0; i < len; i++) { sum += lst[i]; } return (double)sum / len; }
int main() { int a[] = {15, 9, 55, 41, 35, 20, 62, 49}; int b[] = {4, 5, 1, 2, 9, 7, 10, 8}; int c[] = {1, 2, 3}; assert(func0(a, 8) == 35.75); assert(func0(b, 8) == 5.75); assert(func0(c, 3) == 2); 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,732
func0
#include <assert.h>
int func0(int n) { if (n == 0) return 0; if (n == 1) return 1; return func0(n - 1) + func0(n - 2); }
int main() { assert(func0(4) == 3); assert(func0(3) == 2); assert(func0(5) == 5); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x18,%rsp mov %edi,-0x14(%rbp) cmpl $0x0,-0x14(%rbp) jne 1166 <func0+0x1d> mov $0x0,%eax jmp 1191 <func0+0x48> cmpl $0x1,-0x14(%rbp) jne 1173 <func0+0x2a> mov $0x1,%eax jmp 1191 <func0+0x48> mov -0x14(%rbp),%eax sub $0x1,%eax...
func0: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 18h mov [rbp+var_14], edi cmp [rbp+var_14], 0 jnz short loc_1166 mov eax, 0 jmp short loc_1191 loc_1166: cmp [rbp+var_14], 1 jnz short loc_1173 mov eax, 1 jmp short loc_1191 loc_1173: mov eax, [rbp+var_14] sub ...
long long func0(int a1) { int v2; // ebx if ( !a1 ) return 0LL; if ( a1 == 1 ) 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],0x0 JNZ 0x00101166 MOV EAX,0x0 JMP 0x00101191 LAB_00101166: CMP dword ptr [RBP + -0x14],0x1 JNZ 0x00101173 MOV EAX,0x1 JMP 0x00101191 LAB_00101173: MOV EAX,dword ptr [RBP + -0x14] SUB EAX,0x1 MOV EDI,EA...
int func0(int param_1) { int iVar1; int iVar2; if (param_1 == 0) { iVar2 = 0; } else if (param_1 == 1) { iVar2 = 1; } else { iVar1 = func0(param_1 + -1); iVar2 = func0(param_1 + -2); iVar2 = iVar2 + iVar1; } return iVar2; }
7,733
func0
#include <assert.h>
int func0(int n) { if (n == 0) return 0; if (n == 1) return 1; return func0(n - 1) + func0(n - 2); }
int main() { assert(func0(4) == 3); assert(func0(3) == 2); assert(func0(5) == 5); return 0; }
O1
c
func0: endbr64 push %rbp push %rbx sub $0x8,%rsp mov %edi,%ebx test %edi,%edi je 1174 <func0+0x2b> cmp $0x1,%edi je 1174 <func0+0x2b> lea -0x1(%rdi),%edi callq 1149 <func0> mov %eax,%ebp lea -0x2(%rbx),%edi callq 1149 <func0> lea 0x0(%rbp,%rax,1),%ebx mov %ebx,%eax add $0x8,%r...
func0: endbr64 push rbp push rbx sub rsp, 8 mov ebx, edi test edi, edi jz short loc_1174 cmp edi, 1 jz short loc_1174 lea edi, [rdi-1] call func0 mov ebp, eax lea edi, [rbx-2] call func0 lea ebx, [rbp+rax+0] loc_1174: mov eax, ebx add rsp, 8 pop rbx pop ...
long long func0(unsigned int a1) { unsigned int v1; // ebx int v2; // ebp v1 = a1; if ( a1 >= 2 ) { v2 = func0(a1 - 1); return v2 + (unsigned int)func0(a1 - 2); } return v1; }
func0: ENDBR64 PUSH RBP PUSH RBX SUB RSP,0x8 MOV EBX,EDI TEST EDI,EDI JZ 0x00101174 CMP EDI,0x1 JZ 0x00101174 LEA EDI,[RDI + -0x1] CALL 0x00101149 MOV EBP,EAX LEA EDI,[RBX + -0x2] CALL 0x00101149 LEA EBX,[RBP + RAX*0x1] LAB_00101174: MOV EAX,EBX ADD RSP,0x8 POP RBX POP RBP RET
int func0(int param_1) { int iVar1; if ((param_1 != 0) && (param_1 != 1)) { iVar1 = func0(param_1 + -1); param_1 = func0(param_1 + -2); param_1 = iVar1 + param_1; } return param_1; }
7,734
func0
#include <assert.h>
int func0(int n) { if (n == 0) return 0; if (n == 1) return 1; return func0(n - 1) + func0(n - 2); }
int main() { assert(func0(4) == 3); assert(func0(3) == 2); assert(func0(5) == 5); return 0; }
O2
c
func0: endbr64 push %r12 push %rbx sub $0x8,%rsp test %edi,%edi je 1230 <func0+0x40> mov %edi,%ebx cmp $0x1,%edi je 1240 <func0+0x50> xor %r12d,%r12d lea -0x1(%rbx),%edi callq 11f0 <func0> add %eax,%r12d sub $0x2,%ebx je 1222 <func0+0x32> cmp $0x1,%ebx jne 1209 <func0+0x19>...
func0: endbr64 mov r10d, edi test edi, edi jz loc_1512 cmp edi, 1 jz loc_1512 push r15 lea eax, [rdi-2] xor r10d, r10d push r14 push r13 push r12 push rbp push rbx sub rsp, 38h mov [rsp+68h+var_60], eax mov [rsp+68h+var_58], r10d loc_1225: mov edi, [rsp+68h...
long long func0(unsigned int a1) { unsigned int i; // ecx unsigned int j; // r15d unsigned int v3; // r12d int v4; // ecx unsigned int v5; // esi unsigned int v6; // ebp unsigned int v7; // edx int v8; // r12d unsigned int v9; // eax unsigned int v10; // ebx int v11; // r14d int v12; // ebp u...
func0: ENDBR64 MOV R10D,EDI TEST EDI,EDI JZ 0x00101512 CMP EDI,0x1 JZ 0x00101512 PUSH R15 LEA EAX,[RDI + -0x2] XOR R10D,R10D PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x38 MOV dword ptr [RSP + 0x8],EAX MOV dword ptr [RSP + 0x10],R10D LAB_00101225: MOV EDI,dword ptr [RSP + 0x8] MOV EAX,EDI ADD EAX,0x1 JZ 0x00...
int func0(int param_1) { int iVar1; int iVar2; int iVar3; int iVar4; int iVar5; int iVar6; int iVar7; int iVar8; int iVar9; int iVar10; int iVar11; int local_68; int local_64; int local_60; int local_5c; int local_58; int local_54; int local_50; int local_4c; if ((param_1 == ...
7,735
func0
#include <assert.h>
int func0(int n) { if (n == 0) return 0; if (n == 1) return 1; return func0(n - 1) + func0(n - 2); }
int main() { assert(func0(4) == 3); assert(func0(3) == 2); assert(func0(5) == 5); return 0; }
O3
c
func0: endbr64 push %r12 push %rbx sub $0x8,%rsp test %edi,%edi je 1230 <func0+0x40> mov %edi,%ebx cmp $0x1,%edi je 1240 <func0+0x50> xor %r12d,%r12d lea -0x1(%rbx),%edi callq 11f0 <func0> add %eax,%r12d sub $0x2,%ebx je 1222 <func0+0x32> cmp $0x1,%ebx jne 1209 <func0+0x19>...
func0: endbr64 push r15 push r14 push r13 push r12 mov r12d, edi push rbp push rbx sub rsp, 58h test edi, edi jz loc_1429 cmp edi, 1 jz loc_1429 lea r15d, [rdi-1] xor r12d, r12d loc_121D: cmp r15d, 1 jz loc_1425 lea r13d, [r15-1] xor r14d, r14d mov ...
long long func0(unsigned int a1) { unsigned int v1; // r12d unsigned int v2; // r15d int v3; // r12d unsigned int v4; // ebp int v5; // r12d unsigned int v6; // ecx int v7; // r14d unsigned int v8; // ebp unsigned int v9; // edi int v10; // r15d unsigned int v11; // r13d unsigned int v12; // r1...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 MOV R12D,EDI PUSH RBP PUSH RBX SUB RSP,0x58 TEST EDI,EDI JZ 0x00101429 CMP EDI,0x1 JZ 0x00101429 LEA R15D,[RDI + -0x1] XOR R12D,R12D LAB_0010121d: CMP R15D,0x1 JZ 0x00101425 LEA R13D,[R15 + -0x1] XOR R14D,R14D MOV dword ptr [RSP + 0x1c],R12D MOV dword ptr [RSP + 0x20],...
int func0(int param_1) { int iVar1; int iVar2; int iVar3; int iVar4; int iVar5; int iVar6; int iVar7; int iVar8; int iVar9; int iVar10; int iVar11; int iVar12; int iVar13; int iVar14; int iVar15; int iVar16; int iVar17; int iVar18; int iVar19; int iVar20; int iVar21; int iVa...
7,736
func0
#include <stdio.h> #include <assert.h> #include <string.h>
int func0(char *s) { int rom_val[256] = {0}; rom_val['I'] = 1; rom_val['V'] = 5; rom_val['X'] = 10; rom_val['L'] = 50; rom_val['C'] = 100; rom_val['D'] = 500; rom_val['M'] = 1000; int int_val = 0; int len = strlen(s); for (int i = 0; i < len; i++) { if (...
int main() { assert(func0("MMMCMLXXXVI") == 3986); assert(func0("MMMM") == 4000); assert(func0("C") == 100); printf("All tests passed successfully.\n"); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x430,%rsp mov %rdi,-0x428(%rbp) mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax lea -0x410(%rbp),%rdx mov $0x0,%eax mov $0x80,%ecx mov %rdx,%rdi rep stos %rax,%es:(%rdi) movl $0x1,-0x2ec(%rbp) movl $0x5,-0x2b8(%rbp) movl $0xa,-0x2b0(...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 430h mov [rbp+s], rdi mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax lea rdx, [rbp+var_410] mov eax, 0 mov ecx, 80h mov rdi, rdx rep stosq mov [rbp+var_2EC], 1 mov [rbp+var_2B8], 5 mov [rbp+var_2B0], 0Ah mov [rbp...
long long func0(const char *a1) { unsigned int v2; // [rsp+14h] [rbp-41Ch] int i; // [rsp+18h] [rbp-418h] int v4; // [rsp+1Ch] [rbp-414h] _DWORD v5[258]; // [rsp+20h] [rbp-410h] BYREF unsigned long long v6; // [rsp+428h] [rbp-8h] v6 = __readfsqword(0x28u); memset(v5, 0, 0x400uLL); v5[73] = 1; v5[86]...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x430 MOV qword ptr [RBP + -0x428],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX LEA RDX,[RBP + -0x410] MOV EAX,0x0 MOV ECX,0x80 MOV RDI,RDX STOSQ.REP RDI MOV dword ptr [RBP + -0x2ec],0x1 MOV dword ptr [RBP + -0x2b8],0x5 MOV dword ptr [RBP + -0x2b...
int func0(char *param_1) { int iVar1; size_t sVar2; long lVar3; int *piVar4; long in_FS_OFFSET; int local_424; int local_420; int local_418 [67]; int4 local_30c; int4 local_308; int4 local_2f4; int4 local_2e8; int4 local_2e4; int4 local_2c0; int4 local_2b8; long local_10; local_10 ...
7,737
func0
#include <stdio.h> #include <assert.h> #include <string.h>
int func0(char *s) { int rom_val[256] = {0}; rom_val['I'] = 1; rom_val['V'] = 5; rom_val['X'] = 10; rom_val['L'] = 50; rom_val['C'] = 100; rom_val['D'] = 500; rom_val['M'] = 1000; int int_val = 0; int len = strlen(s); for (int i = 0; i < len; i++) { if (...
int main() { assert(func0("MMMCMLXXXVI") == 3986); assert(func0("MMMM") == 4000); assert(func0("C") == 100); printf("All tests passed successfully.\n"); return 0; }
O1
c
func0: endbr64 sub $0x418,%rsp mov %rdi,%rdx mov %fs:0x28,%rax mov %rax,0x408(%rsp) xor %eax,%eax mov %rsp,%rdi mov $0x80,%ecx rep stos %rax,%es:(%rdi) movl $0x1,0x124(%rsp) movl $0x5,0x158(%rsp) movl $0xa,0x160(%rsp) movl $0x32,0x130(%rsp) movl $0x64,0x10c(%rsp) movl $0x1f4,0x110(%rsp)...
func0: endbr64 push rbx sub rsp, 410h mov rbx, rdi mov rax, fs:28h mov [rsp+418h+var_10], rax xor eax, eax mov rdi, rsp mov ecx, 80h rep stosq mov [rsp+418h+var_2F4], 1 mov [rsp+418h+var_2C0], 5 mov [rsp+418h+var_2B8], 0Ah mov [rsp+418h+var_2E8], 32h ; '2' mov [rsp+418...
long long func0(long long a1) { int v2; // eax long long v3; // rdi long long v4; // rax unsigned int v5; // esi int v6; // edx int v7; // ecx _DWORD v9[258]; // [rsp+0h] [rbp-418h] BYREF unsigned long long v10; // [rsp+408h] [rbp-10h] v10 = __readfsqword(0x28u); memset(v9, 0, 0x400uLL); v9[73] ...
func0: ENDBR64 PUSH RBX SUB RSP,0x410 MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x408],RAX XOR EAX,EAX MOV RDI,RSP MOV ECX,0x80 STOSQ.REP RDI MOV dword ptr [RSP + 0x124],0x1 MOV dword ptr [RSP + 0x158],0x5 MOV dword ptr [RSP + 0x160],0xa MOV dword ptr [RSP + 0x130],0x32 MOV dword ptr [RSP + 0x10c],0x...
int func0(char *param_1) { size_t sVar1; ulong uVar2; long lVar3; int iVar4; int iVar5; int *piVar6; long in_FS_OFFSET; bool bVar7; int aiStack_418 [67]; int4 local_30c; int4 local_308; int4 local_2f4; int4 local_2e8; int4 local_2e4; int4 local_2c0; int4 local_2b8; long local_10; ...
7,738
func0
#include <stdio.h> #include <assert.h> #include <string.h>
int func0(char *s) { int rom_val[256] = {0}; rom_val['I'] = 1; rom_val['V'] = 5; rom_val['X'] = 10; rom_val['L'] = 50; rom_val['C'] = 100; rom_val['D'] = 500; rom_val['M'] = 1000; int int_val = 0; int len = strlen(s); for (int i = 0; i < len; i++) { if (...
int main() { assert(func0("MMMCMLXXXVI") == 3986); assert(func0("MMMM") == 4000); assert(func0("C") == 100); printf("All tests passed successfully.\n"); return 0; }
O2
c
func0: endbr64 push %rbx mov $0x80,%ecx mov %rdi,%rbx sub $0x410,%rsp mov %fs:0x28,%rax mov %rax,0x408(%rsp) xor %eax,%eax mov %rsp,%rdi rep stos %rax,%es:(%rdi) mov %rbx,%rdi movabs $0x1f400000064,%rax movl $0x1,0x124(%rsp) mov %rax,0x10c(%rsp) movabs $0x3e800000032,%rax movl $0x5,0x15...
func0: endbr64 push rbx mov ecx, 80h mov rbx, rdi sub rsp, 410h mov rax, fs:28h mov [rsp+418h+var_10], rax xor eax, eax mov rdi, rsp rep stosq mov rdi, rbx mov rax, 1F400000064h mov [rsp+418h+var_2F4], 1 mov [rsp+418h+var_30C], rax mov rax, 3E800000032h mov [rsp+41...
long long func0(char *a1) { int v2; // eax long long v3; // rdi unsigned int v4; // r8d long long i; // rax long long v6; // rdx int v7; // esi int v8; // ecx long long v9; // rdx _QWORD v11[131]; // [rsp+0h] [rbp-418h] BYREF v11[129] = __readfsqword(0x28u); memset(v11, 0, 0x400uLL); HIDWORD(v...
func0: ENDBR64 PUSH RBX MOV ECX,0x80 MOV RBX,RDI SUB RSP,0x410 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x408],RAX XOR EAX,EAX MOV RDI,RSP STOSQ.REP RDI MOV RDI,RBX MOV RAX,0x1f400000064 MOV dword ptr [RSP + 0x124],0x1 MOV qword ptr [RSP + 0x10c],RAX MOV RAX,0x3e800000032 MOV qword ptr [RSP + 0x130],RAX MOV dwo...
int func0(char *param_1) { size_t sVar1; int iVar2; long lVar3; ulong uVar4; int *piVar5; int iVar6; long in_FS_OFFSET; int aiStack_418 [67]; int8 local_30c; int4 local_2f4; int8 local_2e8; int4 local_2c0; int4 local_2b8; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); piVa...
7,739
func0
#include <stdio.h> #include <assert.h> #include <string.h>
int func0(char *s) { int rom_val[256] = {0}; rom_val['I'] = 1; rom_val['V'] = 5; rom_val['X'] = 10; rom_val['L'] = 50; rom_val['C'] = 100; rom_val['D'] = 500; rom_val['M'] = 1000; int int_val = 0; int len = strlen(s); for (int i = 0; i < len; i++) { if (...
int main() { assert(func0("MMMCMLXXXVI") == 3986); assert(func0("MMMM") == 4000); assert(func0("C") == 100); printf("All tests passed successfully.\n"); return 0; }
O3
c
func0: endbr64 push %rbx mov $0x80,%ecx mov %rdi,%rbx sub $0x410,%rsp mov %fs:0x28,%rax mov %rax,0x408(%rsp) xor %eax,%eax mov %rsp,%rdi rep stos %rax,%es:(%rdi) mov %rbx,%rdi movabs $0x1f400000064,%rax movl $0x1,0x124(%rsp) mov %rax,0x10c(%rsp) movabs $0x3e800000032,%rax movl $0x5,0x15...
func0: endbr64 push rbx mov ecx, 80h mov rbx, rdi sub rsp, 410h mov rax, fs:28h mov [rsp+418h+var_10], rax xor eax, eax mov rdi, rsp rep stosq mov rax, cs:qword_20A8 mov rdi, rbx; s mov [rsp+418h+var_2F4], 1 mov [rsp+418h+var_2C0], 5 mov [rsp+418h+var_30C], rax mov ...
long long func0(char *s) { int v2; // eax long long v3; // r8 unsigned int v4; // ecx long long i; // rax long long v6; // rdx int v7; // edi int v8; // esi long long v9; // rdx _QWORD v11[131]; // [rsp+0h] [rbp-418h] BYREF v11[129] = __readfsqword(0x28u); memset(v11, 0, 0x400uLL); HIDWORD(v11...
func0: ENDBR64 PUSH RBX MOV ECX,0x80 MOV RBX,RDI SUB RSP,0x410 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x408],RAX XOR EAX,EAX MOV RDI,RSP STOSQ.REP RDI MOV RAX,qword ptr [0x001020a8] MOV RDI,RBX MOV dword ptr [RSP + 0x124],0x1 MOV dword ptr [RSP + 0x158],0x5 MOV qword ptr [RSP + 0x10c],RAX MOV RAX,qword ptr [0...
int func0(char *param_1) { size_t sVar1; int iVar2; long lVar3; ulong uVar4; int iVar5; int *piVar6; long in_FS_OFFSET; int aiStack_418 [67]; int8 local_30c; int4 local_2f4; int8 local_2e8; int4 local_2c0; int4 local_2b8; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); piVa...
7,740
func0
#include <assert.h>
int func0(int l, int r) { return r / 2 * (r / 2 + 1) - (l - 1) / 2 * (l + 1) / 2; }
int main() { assert(func0(2, 5) == 6); assert(func0(3, 8) == 18); assert(func0(4, 6) == 10); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x4(%rbp) mov %esi,-0x8(%rbp) mov -0x8(%rbp),%eax mov %eax,%edx shr $0x1f,%edx add %edx,%eax sar %eax mov %eax,%ecx mov -0x8(%rbp),%eax mov %eax,%edx shr $0x1f,%edx add %edx,%eax sar %eax add $0x1,%eax imul %eax,%ecx mov ...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_4], edi mov [rbp+var_8], esi mov eax, [rbp+var_8] mov edx, eax shr edx, 1Fh add eax, edx sar eax, 1 mov ecx, eax mov eax, [rbp+var_8] mov edx, eax shr edx, 1Fh add eax, edx sar eax, 1 add eax, 1 imul ecx,...
long long func0(int a1, int a2) { return (unsigned int)((a2 / 2 + 1) * (a2 / 2) + (a1 - 1) / 2 * (a1 + 1) / -2); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x4],EDI MOV dword ptr [RBP + -0x8],ESI MOV EAX,dword ptr [RBP + -0x8] MOV EDX,EAX SHR EDX,0x1f ADD EAX,EDX SAR EAX,0x1 MOV ECX,EAX MOV EAX,dword ptr [RBP + -0x8] MOV EDX,EAX SHR EDX,0x1f ADD EAX,EDX SAR EAX,0x1 ADD EAX,0x1 IMUL ECX,EAX MOV EDX,ECX MOV EAX,dword...
int func0(int param_1,int param_2) { return (param_2 / 2) * (param_2 / 2 + 1) - ((param_1 + 1) * ((param_1 + -1) / 2)) / 2; }
7,741
func0
#include <assert.h>
int func0(int l, int r) { return r / 2 * (r / 2 + 1) - (l - 1) / 2 * (l + 1) / 2; }
int main() { assert(func0(2, 5) == 6); assert(func0(3, 8) == 18); assert(func0(4, 6) == 10); return 0; }
O1
c
func0: endbr64 mov %edi,%edx mov %esi,%eax shr $0x1f,%eax lea (%rax,%rsi,1),%eax sar %eax mov %eax,%ecx lea -0x1(%rdi),%eax mov %eax,%edi shr $0x1f,%edi add %eax,%edi sar %edi add $0x1,%edx imul %edx,%edi mov %edi,%edx shr $0x1f,%edx add %edx,%edi sar %edi lea 0x1(%r...
func0: endbr64 mov edx, edi mov eax, esi shr eax, 1Fh lea ecx, [rax+rsi] sar ecx, 1 lea eax, [rdi-1] mov edi, eax shr edi, 1Fh add edi, eax sar edi, 1 add edx, 1 imul edi, edx mov edx, edi shr edx, 1Fh add edx, edi sar edx, 1 lea eax, [rcx+1] imul ea...
long long func0(int a1, int a2) { return (unsigned int)(a2 / 2 * (a2 / 2 + 1) - (a1 + 1) * ((a1 - 1) / 2) / 2); }
func0: ENDBR64 MOV EDX,EDI MOV EAX,ESI SHR EAX,0x1f LEA ECX,[RAX + RSI*0x1] SAR ECX,0x1 LEA EAX,[RDI + -0x1] MOV EDI,EAX SHR EDI,0x1f ADD EDI,EAX SAR EDI,0x1 ADD EDX,0x1 IMUL EDI,EDX MOV EDX,EDI SHR EDX,0x1f ADD EDX,EDI SAR EDX,0x1 LEA EAX,[RCX + 0x1] IMUL EAX,ECX SUB EAX,EDX RET
int func0(int param_1,int param_2) { return (param_2 / 2 + 1) * (param_2 / 2) - (((param_1 + -1) / 2) * (param_1 + 1)) / 2; }
7,742
func0
#include <assert.h>
int func0(int l, int r) { return r / 2 * (r / 2 + 1) - (l - 1) / 2 * (l + 1) / 2; }
int main() { assert(func0(2, 5) == 6); assert(func0(3, 8) == 18); assert(func0(4, 6) == 10); return 0; }
O2
c
func0: endbr64 mov %esi,%eax mov %edi,%edx shr $0x1f,%eax add $0x1,%edx add %esi,%eax sar %eax mov %eax,%ecx lea -0x1(%rdi),%eax mov %eax,%edi shr $0x1f,%edi add %eax,%edi lea 0x1(%rcx),%eax sar %edi imul %ecx,%eax imul %edx,%edi mov %edi,%edx shr $0x1f,%edx add %edx,...
func0: endbr64 mov eax, esi mov edx, edi shr eax, 1Fh add edx, 1 lea ecx, [rax+rsi] lea eax, [rdi-1] mov edi, eax sar ecx, 1 shr edi, 1Fh add edi, eax lea eax, [rcx+1] sar edi, 1 imul eax, ecx imul edi, edx mov edx, edi shr edx, 1Fh add edx, edi sar ...
long long func0(int a1, int a2) { return (unsigned int)(a2 / 2 * (a2 / 2 + 1) - (a1 + 1) * ((a1 - 1) / 2) / 2); }
func0: ENDBR64 MOV EAX,ESI MOV EDX,EDI SHR EAX,0x1f ADD EDX,0x1 LEA ECX,[RAX + RSI*0x1] LEA EAX,[RDI + -0x1] MOV EDI,EAX SAR ECX,0x1 SHR EDI,0x1f ADD EDI,EAX LEA EAX,[RCX + 0x1] SAR EDI,0x1 IMUL EAX,ECX IMUL EDI,EDX MOV EDX,EDI SHR EDX,0x1f ADD EDX,EDI SAR EDX,0x1 SUB EAX,EDX RET
int func0(int param_1,int param_2) { return (param_2 / 2 + 1) * (param_2 / 2) - (((param_1 + -1) / 2) * (param_1 + 1)) / 2; }
7,743
func0
#include <assert.h>
int func0(int l, int r) { return r / 2 * (r / 2 + 1) - (l - 1) / 2 * (l + 1) / 2; }
int main() { assert(func0(2, 5) == 6); assert(func0(3, 8) == 18); assert(func0(4, 6) == 10); return 0; }
O3
c
func0: endbr64 mov %esi,%eax mov %edi,%edx shr $0x1f,%eax add $0x1,%edx add %esi,%eax sar %eax mov %eax,%ecx lea -0x1(%rdi),%eax mov %eax,%edi shr $0x1f,%edi add %eax,%edi lea 0x1(%rcx),%eax sar %edi imul %ecx,%eax imul %edx,%edi mov %edi,%edx shr $0x1f,%edx add %edx,...
func0: endbr64 mov eax, esi mov edx, edi shr eax, 1Fh add edx, 1 lea ecx, [rax+rsi] lea eax, [rdi-1] mov edi, eax sar ecx, 1 shr edi, 1Fh add edi, eax lea eax, [rcx+1] sar edi, 1 imul eax, ecx imul edi, edx mov edx, edi shr edx, 1Fh add edx, edi sar ...
long long func0(int a1, int a2) { return (unsigned int)(a2 / 2 * (a2 / 2 + 1) - (a1 + 1) * ((a1 - 1) / 2) / 2); }
func0: ENDBR64 MOV EAX,ESI MOV EDX,EDI SHR EAX,0x1f ADD EDX,0x1 LEA ECX,[RAX + RSI*0x1] LEA EAX,[RDI + -0x1] MOV EDI,EAX SAR ECX,0x1 SHR EDI,0x1f ADD EDI,EAX LEA EAX,[RCX + 0x1] SAR EDI,0x1 IMUL EAX,ECX IMUL EDI,EDX MOV EDX,EDI SHR EDX,0x1f ADD EDX,EDI SAR EDX,0x1 SUB EAX,EDX RET
int func0(int param_1,int param_2) { return (param_2 / 2 + 1) * (param_2 / 2) - (((param_1 + -1) / 2) * (param_1 + 1)) / 2; }
7,744
func0
#include <assert.h> #include <stdio.h> #include <string.h> typedef struct { char *description; int value; } Result;
Result func0(int x, int y, int z) { int discriminant = (y * y) - (4 * x * z); Result result; if (discriminant > 0) { result.description = "Two solutions"; result.value = discriminant; } else if (discriminant == 0) { result.description = "one solution"; resul...
int main() { Result res; res = func0(4, 8, 2); assert(res.value == 32 && strcmp(res.description, "Two solutions") == 0); res = func0(5, 7, 9); assert(res.value == -131 && strcmp(res.description, "no real solution") == 0); res = func0(0, 0, 9); assert(res.value == 0 && strcmp(r...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x24(%rbp) mov %esi,-0x28(%rbp) mov %edx,-0x2c(%rbp) mov -0x28(%rbp),%eax imul %eax,%eax mov %eax,%edx mov -0x24(%rbp),%eax imul -0x2c(%rbp),%eax shl $0x2,%eax sub %eax,%edx mov %edx,%eax mov %eax,-0x14(%rbp) cmpl $0x0,-0x14(%rbp)...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_24], edi mov [rbp+var_28], esi mov [rbp+var_2C], edx mov eax, [rbp+var_28] imul eax, eax mov ecx, eax mov eax, [rbp+var_24] imul eax, [rbp+var_2C] lea edx, ds:0[rax*4] mov eax, ecx sub eax, edx mov [rbp+var_14], eax c...
const char * func0(int a1, int a2, int a3) { int v4; // [rsp+18h] [rbp-14h] v4 = a2 * a2 - 4 * a3 * a1; if ( v4 > 0 ) return "Two solutions"; if ( v4 ) return "no real solution"; return "one solution"; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x24],EDI MOV dword ptr [RBP + -0x28],ESI MOV dword ptr [RBP + -0x2c],EDX MOV EAX,dword ptr [RBP + -0x28] IMUL EAX,EAX MOV ECX,EAX MOV EAX,dword ptr [RBP + -0x24] IMUL EAX,dword ptr [RBP + -0x2c] LEA EDX,[RAX*0x4] MOV EAX,ECX SUB EAX,EDX MOV dword ptr [RBP + -0x...
int [16] func0(int param_1,int param_2,int param_3) { int auVar1 [16]; int iVar2; char *local_18; int4 uStack_c; iVar2 = param_2 * param_2 + param_1 * param_3 * -4; if (iVar2 < 1) { if (iVar2 == 0) { local_18 = "one solution"; } else { local_18 = "no real solution"; } } ...
7,745
func0
#include <assert.h> #include <stdio.h> #include <string.h> typedef struct { char *description; int value; } Result;
Result func0(int x, int y, int z) { int discriminant = (y * y) - (4 * x * z); Result result; if (discriminant > 0) { result.description = "Two solutions"; result.value = discriminant; } else if (discriminant == 0) { result.description = "one solution"; resul...
int main() { Result res; res = func0(4, 8, 2); assert(res.value == 32 && strcmp(res.description, "Two solutions") == 0); res = func0(5, 7, 9); assert(res.value == -131 && strcmp(res.description, "no real solution") == 0); res = func0(0, 0, 9); assert(res.value == 0 && strcmp(r...
O1
c
func0: endbr64 imul %esi,%esi imul %edx,%edi shl $0x2,%edi sub %edi,%esi lea 0xec5(%rip),%rax test %esi,%esi jle 1146 <func0+0x1d> mov %esi,%edx retq lea 0xec5(%rip),%rax lea 0xecb(%rip),%rdx cmovne %rdx,%rax jmp 1143 <func0+0x1a>
func0: endbr64 imul esi, esi imul edi, edx shl edi, 2 sub esi, edi lea rax, aTwoSolutions; "Two solutions" test esi, esi jle short loc_1146 loc_1143: mov edx, esi retn loc_1146: lea rax, aOneSolution; "one solution" lea rdx, aNoRealSolution; "no real solution" cmovnz rax, rdx jmp ...
const char * func0(int a1, int a2, int a3) { int v3; // esi const char *result; // rax v3 = a2 * a2 - 4 * a3 * a1; result = "Two solutions"; if ( v3 <= 0 ) { result = "one solution"; if ( v3 ) return "no real solution"; } return result; }
func0: ENDBR64 IMUL ESI,ESI IMUL EDI,EDX SHL EDI,0x2 SUB ESI,EDI LEA RAX,[0x102004] TEST ESI,ESI JLE 0x00101146 LAB_00101143: MOV EDX,ESI RET LAB_00101146: LEA RAX,[0x102012] LEA RDX,[0x10201f] CMOVNZ RAX,RDX JMP 0x00101143
int1 [16] func0(int param_1,int param_2,int param_3) { char *pcVar1; int iVar2; int1 auVar3 [16]; iVar2 = param_2 * param_2 + param_1 * param_3 * -4; pcVar1 = "Two solutions"; if ((iVar2 < 1) && (pcVar1 = "one solution", iVar2 != 0)) { pcVar1 = "no real solution"; } auVar3._8_4_ = iVar2; auVa...
7,746
func0
#include <assert.h> #include <stdio.h> #include <string.h> typedef struct { char *description; int value; } Result;
Result func0(int x, int y, int z) { int discriminant = (y * y) - (4 * x * z); Result result; if (discriminant > 0) { result.description = "Two solutions"; result.value = discriminant; } else if (discriminant == 0) { result.description = "one solution"; resul...
int main() { Result res; res = func0(4, 8, 2); assert(res.value == 32 && strcmp(res.description, "Two solutions") == 0); res = func0(5, 7, 9); assert(res.value == -131 && strcmp(res.description, "no real solution") == 0); res = func0(0, 0, 9); assert(res.value == 0 && strcmp(r...
O2
c
func0: endbr64 imul %edx,%edi lea 0xeb6(%rip),%rax imul %esi,%esi shl $0x2,%edi sub %edi,%esi test %esi,%esi jg 116c <func0+0x2c> lea 0xeb1(%rip),%rax lea 0xeb7(%rip),%rdx cmovne %rdx,%rax mov %esi,%edx retq
func0: endbr64 imul edi, edx lea rax, aTwoSolutions; "Two solutions" imul esi, esi shl edi, 2 sub esi, edi test esi, esi jg short loc_116C lea rax, aOneSolution; "one solution" lea rdx, aNoRealSolution; "no real solution" cmovnz rax, rdx loc_116C: mov edx, esi retn
const char * func0(int a1, int a2, int a3) { const char *result; // rax int v4; // esi result = "Two solutions"; v4 = a2 * a2 - 4 * a3 * a1; if ( v4 <= 0 ) { result = "one solution"; if ( v4 ) return "no real solution"; } return result; }
func0: ENDBR64 IMUL EDI,EDX LEA RAX,[0x102004] IMUL ESI,ESI SHL EDI,0x2 SUB ESI,EDI TEST ESI,ESI JG 0x0010116c LEA RAX,[0x102012] LEA RDX,[0x10201f] CMOVNZ RAX,RDX LAB_0010116c: MOV EDX,ESI RET
int1 [16] func0(int param_1,int param_2,int param_3) { char *pcVar1; int iVar2; int1 auVar3 [16]; pcVar1 = "Two solutions"; iVar2 = param_2 * param_2 + param_1 * param_3 * -4; if ((iVar2 < 1) && (pcVar1 = "one solution", iVar2 != 0)) { pcVar1 = "no real solution"; } auVar3._8_4_ = iVar2; auVa...
7,747
func0
#include <assert.h> #include <stdio.h> #include <string.h> typedef struct { char *description; int value; } Result;
Result func0(int x, int y, int z) { int discriminant = (y * y) - (4 * x * z); Result result; if (discriminant > 0) { result.description = "Two solutions"; result.value = discriminant; } else if (discriminant == 0) { result.description = "one solution"; resul...
int main() { Result res; res = func0(4, 8, 2); assert(res.value == 32 && strcmp(res.description, "Two solutions") == 0); res = func0(5, 7, 9); assert(res.value == -131 && strcmp(res.description, "no real solution") == 0); res = func0(0, 0, 9); assert(res.value == 0 && strcmp(r...
O3
c
func0: endbr64 imul %edx,%edi lea 0xeb6(%rip),%rax imul %esi,%esi shl $0x2,%edi sub %edi,%esi test %esi,%esi jg 116c <func0+0x2c> lea 0xeb1(%rip),%rax lea 0xeb7(%rip),%rdx cmovne %rdx,%rax mov %esi,%edx retq
func0: endbr64 imul edi, edx lea rax, aTwoSolutions; "Two solutions" imul esi, esi shl edi, 2 sub esi, edi test esi, esi jg short loc_116C lea rax, aNoRealSolution; "no real solution" lea rdx, aOneSolution; "one solution" cmovz rax, rdx loc_116C: mov edx, esi retn
const char * func0(int a1, int a2, int a3) { const char *result; // rax int v4; // esi result = "Two solutions"; v4 = a2 * a2 - 4 * a3 * a1; if ( v4 <= 0 ) { result = "no real solution"; if ( !v4 ) return "one solution"; } return result; }
func0: ENDBR64 IMUL EDI,EDX LEA RAX,[0x102004] IMUL ESI,ESI SHL EDI,0x2 SUB ESI,EDI TEST ESI,ESI JG 0x0010116c LEA RAX,[0x10201f] LEA RDX,[0x102012] CMOVZ RAX,RDX LAB_0010116c: MOV EDX,ESI RET
int [16] func0(int param_1,int param_2,int param_3) { char *pcVar1; int iVar2; int auVar3 [16]; pcVar1 = "Two solutions"; iVar2 = param_2 * param_2 + param_1 * param_3 * -4; if ((iVar2 < 1) && (pcVar1 = "no real solution", iVar2 == 0)) { pcVar1 = "one solution"; } auVar3._8_4_ = iVar2; auVar3...
7,748
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h>
int func0(char* s) { char *word = strtok(s, " "); while(word != NULL) { if(strlen(word) % 2 == 0) { return 1; } else { return 0; } word = strtok(NULL, " "); } return 0; }
int main() { assert(func0("program") == 0); assert(func0("solution") == 1); assert(func0("data") == 1); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x20,%rsp mov %rdi,-0x18(%rbp) mov -0x18(%rbp),%rax lea 0xe64(%rip),%rsi mov %rax,%rdi callq 1090 <strtok@plt> mov %rax,-0x8(%rbp) cmpq $0x0,-0x8(%rbp) je 11d9 <func0+0x50> mov -0x8(%rbp),%rax mov %rax,%rdi callq 1070 <strlen@plt> and $...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 20h mov [rbp+s], rdi mov rax, [rbp+s] lea rdx, delim; " " mov rsi, rdx; delim mov rdi, rax; s call _strtok mov [rbp+var_8], rax nop cmp [rbp+var_8], 0 jz short loc_11DD mov rax, [rbp+var_8] mov rdi, rax; s call _strl...
_BOOL8 func0(char *a1) { const char *v2; // [rsp+18h] [rbp-8h] v2 = strtok(a1, " "); return v2 && (strlen(v2) & 1) == 0; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x18],RDI MOV RAX,qword ptr [RBP + -0x18] LEA RDX,[0x102004] MOV RSI,RDX MOV RDI,RAX CALL 0x00101090 MOV qword ptr [RBP + -0x8],RAX NOP CMP qword ptr [RBP + -0x8],0x0 JZ 0x001011dd MOV RAX,qword ptr [RBP + -0x8] MOV RDI,RAX CALL 0x00101070 AND EAX,0...
int8 func0(char *param_1) { char *__s; size_t sVar1; int8 uVar2; __s = strtok(param_1," "); if (__s == (char *)0x0) { uVar2 = 0; } else { sVar1 = strlen(__s); if ((sVar1 & 1) == 0) { uVar2 = 1; } else { uVar2 = 0; } } return uVar2; }
7,749
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h>
int func0(char* s) { char *word = strtok(s, " "); while(word != NULL) { if(strlen(word) % 2 == 0) { return 1; } else { return 0; } word = strtok(NULL, " "); } return 0; }
int main() { assert(func0("program") == 0); assert(func0("solution") == 1); assert(func0("data") == 1); return 0; }
O1
c
func0: endbr64 sub $0x8,%rsp lea 0xe8c(%rip),%rsi callq 1070 <strtok@plt> mov %rax,%rdi mov $0x0,%eax test %rdi,%rdi je 119c <func0+0x33> mov $0xffffffffffffffff,%rcx repnz scas %es:(%rdi),%al mov %rcx,%rax not %rax and $0x1,%eax add $0x8,%rsp retq
func0: endbr64 sub rsp, 8 lea rsi, unk_2004 call _strtok mov rdi, rax mov eax, 0 test rdi, rdi jz short loc_11B6 call _strlen xor rax, 1 and eax, 1 loc_11B6: add rsp, 8 retn
long long func0(long long a1) { long long v1; // rdi long long result; // rax v1 = strtok(a1, &unk_2004); result = 0LL; if ( v1 ) return ((unsigned __int8)strlen() ^ 1) & 1; return result; }
func0: ENDBR64 SUB RSP,0x8 LEA RSI,[0x102004] CALL 0x00101090 MOV RDI,RAX MOV EAX,0x0 TEST RDI,RDI JZ 0x001011b6 CALL 0x00101070 XOR RAX,0x1 AND EAX,0x1 LAB_001011b6: ADD RSP,0x8 RET
uint func0(char *param_1) { uint uVar1; char *__s; size_t sVar2; __s = strtok(param_1," "); uVar1 = 0; if (__s != (char *)0x0) { sVar2 = strlen(__s); uVar1 = ((uint)sVar2 ^ 1) & 1; } return uVar1; }
7,750
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h>
int func0(char* s) { char *word = strtok(s, " "); while(word != NULL) { if(strlen(word) % 2 == 0) { return 1; } else { return 0; } word = strtok(NULL, " "); } return 0; }
int main() { assert(func0("program") == 0); assert(func0("solution") == 1); assert(func0("data") == 1); return 0; }
O2
c
func0: endbr64 sub $0x8,%rsp lea 0xdc5(%rip),%rsi callq 1090 <strtok@plt> mov %rax,%rdi xor %eax,%eax test %rdi,%rdi je 1259 <func0+0x29> callq 1070 <strlen@plt> not %rax and $0x1,%eax add $0x8,%rsp retq xchg %ax,%ax
func0: endbr64 sub rsp, 8 lea rsi, unk_2004 call _strtok mov rdi, rax xor eax, eax test rdi, rdi jz short loc_1259 call _strlen not rax and eax, 1 loc_1259: add rsp, 8 retn
_BOOL8 func0(long long a1) { long long v1; // rdi _BOOL8 result; // rax v1 = strtok(a1, &unk_2004); result = 0LL; if ( v1 ) return (strlen() & 1) == 0; return result; }
func0: ENDBR64 SUB RSP,0x8 LEA RSI,[0x102004] CALL 0x00101090 MOV RDI,RAX XOR EAX,EAX TEST RDI,RDI JZ 0x00101259 CALL 0x00101070 NOT RAX AND EAX,0x1 LAB_00101259: ADD RSP,0x8 RET
uint func0(char *param_1) { uint uVar1; char *__s; size_t sVar2; __s = strtok(param_1," "); uVar1 = 0; if (__s != (char *)0x0) { sVar2 = strlen(__s); uVar1 = ~(uint)sVar2 & 1; } return uVar1; }
7,751
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h>
int func0(char* s) { char *word = strtok(s, " "); while(word != NULL) { if(strlen(word) % 2 == 0) { return 1; } else { return 0; } word = strtok(NULL, " "); } return 0; }
int main() { assert(func0("program") == 0); assert(func0("solution") == 1); assert(func0("data") == 1); return 0; }
O3
c
func0: endbr64 sub $0x8,%rsp lea 0xdc5(%rip),%rsi callq 1090 <strtok@plt> mov %rax,%rdi xor %eax,%eax test %rdi,%rdi je 1259 <func0+0x29> callq 1070 <strlen@plt> not %rax and $0x1,%eax add $0x8,%rsp retq xchg %ax,%ax
func0: endbr64 sub rsp, 8 lea rsi, delim; " " call _strtok mov rdi, rax; s xor eax, eax test rdi, rdi jz short loc_1259 call _strlen not rax and eax, 1 loc_1259: add rsp, 8 retn
_BOOL8 func0(char *a1) { char *v1; // rdi _BOOL8 result; // rax v1 = strtok(a1, " "); result = 0LL; if ( v1 ) return (strlen(v1) & 1) == 0; return result; }
func0: ENDBR64 SUB RSP,0x8 LEA RSI,[0x102004] CALL 0x00101090 MOV RDI,RAX XOR EAX,EAX TEST RDI,RDI JZ 0x00101259 CALL 0x00101070 NOT RAX AND EAX,0x1 LAB_00101259: ADD RSP,0x8 RET
uint func0(char *param_1) { uint uVar1; char *__s; size_t sVar2; __s = strtok(param_1," "); uVar1 = 0; if (__s != (char *)0x0) { sVar2 = strlen(__s); uVar1 = ~(uint)sVar2 & 1; } return uVar1; }
7,752
func0
#include <stdio.h> #include <string.h> #include <assert.h> #include <ctype.h>
char* func0(const char* text) { static char buffer[100]; int i = 0, j = 0; while (text[i] != '\0') { if (isupper(text[i])) { if (i != 0 && (islower(text[i-1]) || isdigit(text[i-1]))) { buffer[j++] = '_'; } buffer[j++] = tolower(text[i]); ...
int main() { assert(strcmp(func0("PythonProgram"), "python_program") == 0); assert(strcmp(func0("pythonLanguage"), "python_language") == 0); assert(strcmp(func0("ProgrammingLanguage"), "programming_language") == 0); printf("All assertions passed!\n"); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x20,%rsp mov %rdi,-0x18(%rbp) movl $0x0,-0x8(%rbp) movl $0x0,-0x4(%rbp) jmpq 1308 <func0+0x13f> callq 10d0 <__ctype_b_loc@plt> mov (%rax),%rax mov -0x8(%rbp),%edx movslq %edx,%rcx mov -0x18(%rbp),%rdx add %rcx,%rdx movzbl (%rdx),%edx movsbq %dl,...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_18], rdi mov [rbp+var_8], 0 mov [rbp+var_4], 0 jmp loc_1308 loc_11EC: call ___ctype_b_loc mov rax, [rax] mov edx, [rbp+var_8] movsxd rcx, edx mov rdx, [rbp+var_18] add rdx, rcx movzx edx, byte ptr [rdx] movsx...
_BYTE * func0(long long a1) { int v1; // eax char v2; // cl int v3; // eax int v4; // eax int v6; // [rsp+18h] [rbp-8h] int v7; // [rsp+1Ch] [rbp-4h] v6 = 0; v7 = 0; while ( *(_BYTE *)(v6 + a1) ) { if ( ((*__ctype_b_loc())[*(char *)(v6 + a1)] & 0x100) != 0 ) { if ( v6 && (((*_...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x8],0x0 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00101308 LAB_001011ec: CALL 0x001010d0 MOV RAX,qword ptr [RAX] MOV EDX,dword ptr [RBP + -0x8] MOVSXD RCX,EDX MOV RDX,qword ptr [RBP + -0x18] ADD RDX,RCX MOVZX EDX,byte ptr...
int1 * func0(long param_1) { int iVar1; ushort **ppuVar2; int local_10; int local_c; local_10 = 0; local_c = 0; do { if (*(char *)(param_1 + local_10) == '\0') { buffer_1[local_c] = 0; return buffer_1; } ppuVar2 = __ctype_b_loc(); if (((*ppuVar2)[*(char *)(param_1 + local_1...
7,753
func0
#include <stdio.h> #include <string.h> #include <assert.h> #include <ctype.h>
char* func0(const char* text) { static char buffer[100]; int i = 0, j = 0; while (text[i] != '\0') { if (isupper(text[i])) { if (i != 0 && (islower(text[i-1]) || isdigit(text[i-1]))) { buffer[j++] = '_'; } buffer[j++] = tolower(text[i]); ...
int main() { assert(strcmp(func0("PythonProgram"), "python_program") == 0); assert(strcmp(func0("pythonLanguage"), "python_language") == 0); assert(strcmp(func0("ProgrammingLanguage"), "programming_language") == 0); printf("All assertions passed!\n"); return 0; }
O1
c
func0: endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x8,%rsp movzbl (%rdi),%r12d test %r12b,%r12b je 124c <func0+0xa3> mov %rdi,%r13 callq 10b0 <__ctype_b_loc@plt> mov %rax,%r14 mov $0x0,%ebx mov $0x0,%ebp lea 0x2e5c(%rip),%r15 jmp 1213 <func0+0x6a> ca...
func0: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 8 movzx r12d, byte ptr [rdi] test r12b, r12b jz loc_126C mov r13, rdi call ___ctype_b_loc mov r14, rax mov ebx, 0 mov ebp, 0 lea r15, buffer_1 jmp short loc_1233 loc_1206: call ___...
_BYTE * func0(char *a1) { char v1; // r12 _QWORD *v2; // r14 long long v3; // rbx int v4; // ebp _BYTE *result; // rax v1 = *a1; if ( *a1 ) { v2 = (_QWORD *)__ctype_b_loc(); v3 = 0LL; v4 = 0; do { if ( (*(_BYTE *)(*v2 + 2LL * v1 + 1) & 1) != 0 ) { if ( (_DWORD)v3...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x8 MOVZX R12D,byte ptr [RDI] TEST R12B,R12B JZ 0x0010126c MOV R13,RDI CALL 0x001010d0 MOV R14,RAX MOV EBX,0x0 MOV EBP,0x0 LEA R15,[0x104040] JMP 0x00101233 LAB_00101206: CALL 0x001010c0 MOV RDX,RAX MOVSXD RAX,EBP MOVSX RCX,byte ptr [R13 + RBX...
void func0(char *param_1) { ushort **ppuVar1; __int32_t **pp_Var2; long lVar3; int iVar4; char cVar5; cVar5 = *param_1; if (cVar5 == '\0') { iVar4 = 0; } else { ppuVar1 = __ctype_b_loc(); lVar3 = 0; iVar4 = 0; do { if ((*(byte *)((long)*ppuVar1 + (long)cVar5 * 2 + 1) & 1)...
7,754
func0
#include <stdio.h> #include <string.h> #include <assert.h> #include <ctype.h>
char* func0(const char* text) { static char buffer[100]; int i = 0, j = 0; while (text[i] != '\0') { if (isupper(text[i])) { if (i != 0 && (islower(text[i-1]) || isdigit(text[i-1]))) { buffer[j++] = '_'; } buffer[j++] = tolower(text[i]); ...
int main() { assert(strcmp(func0("PythonProgram"), "python_program") == 0); assert(strcmp(func0("pythonLanguage"), "python_language") == 0); assert(strcmp(func0("ProgrammingLanguage"), "programming_language") == 0); printf("All assertions passed!\n"); return 0; }
O2
c
func0: endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x18,%rsp movzbl (%rdi),%r12d test %r12b,%r12b je 1378 <func0+0xd8> mov %rdi,%r14 xor %ebp,%ebp lea 0x2d75(%rip),%r15 xor %ebx,%ebx callq 10b0 <__ctype_b_loc@plt> mov %rax,%rcx jmp 1333 <func0+0x93> n...
func0: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 18h movzx r12d, byte ptr [rdi] test r12b, r12b jz loc_1380 mov r14, rdi xor ebp, ebp lea r15, buffer_1 xor ebx, ebx call ___ctype_b_loc mov rcx, rax jmp short loc_133E loc_12F0: test ...
_BYTE * func0(char *a1) { char v1; // r12 long long v2; // rbp long long v3; // rbx _QWORD *v4; // rcx int v5; // r13d _QWORD *v6; // rax long long v7; // rdx _QWORD *v9; // [rsp+8h] [rbp-40h] v1 = *a1; if ( *a1 ) { v2 = 0LL; v3 = 0LL; v4 = (_QWORD *)__ctype_b_loc(); do { ...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x18 MOVZX R12D,byte ptr [RDI] TEST R12B,R12B JZ 0x00101380 MOV R14,RDI XOR EBP,EBP LEA R15,[0x104040] XOR EBX,EBX CALL 0x001010d0 MOV RCX,RAX JMP 0x0010133e LAB_001012f0: TEST RBP,RBP JZ 0x0010130f MOVSX RDX,byte ptr [R14 + RBP*0x1 + -0x1] TE...
int1 * func0(char *param_1) { char *pcVar1; int iVar2; ushort **ppuVar3; __int32_t **pp_Var4; long lVar5; long lVar6; char cVar7; int iVar8; cVar7 = *param_1; if (cVar7 == '\0') { lVar5 = 0; } else { lVar6 = 0; lVar5 = 0; ppuVar3 = __ctype_b_loc(); do { while( true ...
7,755
func0
#include <stdio.h> #include <string.h> #include <assert.h> #include <ctype.h>
char* func0(const char* text) { static char buffer[100]; int i = 0, j = 0; while (text[i] != '\0') { if (isupper(text[i])) { if (i != 0 && (islower(text[i-1]) || isdigit(text[i-1]))) { buffer[j++] = '_'; } buffer[j++] = tolower(text[i]); ...
int main() { assert(strcmp(func0("PythonProgram"), "python_program") == 0); assert(strcmp(func0("pythonLanguage"), "python_language") == 0); assert(strcmp(func0("ProgrammingLanguage"), "programming_language") == 0); printf("All assertions passed!\n"); return 0; }
O3
c
func0: endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x18,%rsp movzbl (%rdi),%r12d test %r12b,%r12b je 1380 <func0+0xe0> mov %rdi,%r15 xor %ebp,%ebp xor %ebx,%ebx callq 10b0 <__ctype_b_loc@plt> lea 0x2d6e(%rip),%rdx mov %rax,%rcx jmp 133a <func0+0x9a> n...
func0: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 18h movzx r12d, byte ptr [rdi] test r12b, r12b jz loc_1388 mov r15, rdi xor ebp, ebp xor ebx, ebx call ___ctype_b_loc lea rdx, buffer_1 mov rcx, rax jmp short loc_1345 loc_12F0: test ...
_BYTE * func0(char *a1) { char v1; // r12 long long v2; // rbp long long v3; // rbx const unsigned __int16 **v4; // rax _BYTE *v5; // rdx const unsigned __int16 **v6; // rcx long long v7; // r13 int v8; // r14d const __int32_t **v9; // rax const unsigned __int16 **v11; // [rsp+0h] [rbp-48h] _BYTE ...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x18 MOVZX R12D,byte ptr [RDI] TEST R12B,R12B JZ 0x00101388 MOV R15,RDI XOR EBP,EBP XOR EBX,EBX CALL 0x001010d0 LEA RDX,[0x104040] MOV RCX,RAX JMP 0x00101345 LAB_001012f0: TEST RBP,RBP JZ 0x00101313 MOVSX RSI,byte ptr [R15 + RBP*0x1 + -0x1] TE...
int1 * func0(char *param_1) { int iVar1; ushort **ppuVar2; __int32_t **pp_Var3; long lVar4; long lVar5; char cVar6; long lVar7; int iVar8; cVar6 = *param_1; if (cVar6 == '\0') { lVar4 = 0; } else { lVar5 = 0; lVar4 = 0; ppuVar2 = __ctype_b_loc(); do { while( true ) ...
7,756
func0
#include <assert.h> #include <stdio.h> #include <stdlib.h> // Function to remove empty elements
char** func0(char** tuple1, int size, int* new_size) { char** result = malloc(size * sizeof(char*)); int j = 0; for(int i = 0; i < size; i++) { if(tuple1[i] != NULL) { result[j++] = tuple1[i]; } } *new_size = j; return result; }
int main() { // First test case char* input1[] = {NULL, NULL, "", "a,b", "a,b,c", "d"}; char* expected1[] = {"", "a,b", "a,b,c", "d"}; int new_size1; char** output1 = func0(input1, 6, &new_size1); assert(new_size1 == 4); for(int i = 0; i < new_size1; i++) { assert(output1[i] ...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x30,%rsp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) mov %rdx,-0x28(%rbp) mov -0x1c(%rbp),%eax cltq shl $0x3,%rax mov %rax,%rdi callq 10b0 <malloc@plt> mov %rax,-0x8(%rbp) movl $0x0,-0x10(%rbp) movl $0x0,-0xc(%rbp) jmp 123a <func0+0x91> mov...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_28], rdx mov eax, [rbp+var_1C] cdqe shl rax, 3 mov rdi, rax; size call _malloc mov [rbp+var_8], rax mov [rbp+var_10], 0 mov [rbp+var_C], 0 jmp short loc_123A l...
_QWORD * func0(long long a1, int a2, _DWORD *a3) { int v3; // eax int v6; // [rsp+20h] [rbp-10h] int i; // [rsp+24h] [rbp-Ch] _QWORD *v8; // [rsp+28h] [rbp-8h] v8 = malloc(8LL * a2); v6 = 0; for ( i = 0; i < a2; ++i ) { if ( *(_QWORD *)(8LL * i + a1) ) { v3 = v6++; v8[v3] = *(_QWORD...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV qword ptr [RBP + -0x28],RDX MOV EAX,dword ptr [RBP + -0x1c] CDQE SHL RAX,0x3 MOV RDI,RAX CALL 0x001010b0 MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0x10],0x0 MOV dword ptr [RBP + -0xc],0x0 JMP ...
void * func0(long param_1,int param_2,int *param_3) { void *pvVar1; int4 local_18; int4 local_14; pvVar1 = malloc((long)param_2 << 3); local_18 = 0; for (local_14 = 0; local_14 < param_2; local_14 = local_14 + 1) { if (*(long *)(param_1 + (long)local_14 * 8) != 0) { *(int8 *)((long)local_18 * ...
7,757
func0
#include <assert.h> #include <stdio.h> #include <stdlib.h> // Function to remove empty elements
char** func0(char** tuple1, int size, int* new_size) { char** result = malloc(size * sizeof(char*)); int j = 0; for(int i = 0; i < size; i++) { if(tuple1[i] != NULL) { result[j++] = tuple1[i]; } } *new_size = j; return result; }
int main() { // First test case char* input1[] = {NULL, NULL, "", "a,b", "a,b,c", "d"}; char* expected1[] = {"", "a,b", "a,b,c", "d"}; int new_size1; char** output1 = func0(input1, 6, &new_size1); assert(new_size1 == 4); for(int i = 0; i < new_size1; i++) { assert(output1[i] ...
O1
c
func0: endbr64 push %r12 push %rbp push %rbx mov %rdi,%r12 mov %esi,%ebp mov %rdx,%rbx movslq %esi,%rdi shl $0x3,%rdi callq 10b0 <malloc@plt> test %ebp,%ebp jle 11f8 <func0+0x4f> mov %r12,%rdx lea -0x1(%rbp),%ecx lea 0x8(%r12,%rcx,8),%r8 mov $0x0,%esi jmp 11e4 <func0+0x3b> add ...
func0: endbr64 push r12 push rbp push rbx mov r12, rdi mov ebp, esi mov rbx, rdx movsxd rdi, esi shl rdi, 3 call _malloc test ebp, ebp jle short loc_11F8 mov rdx, r12 lea ecx, [rbp-1] lea r8, [r12+rcx*8+8] mov esi, 0 jmp short loc_11EE loc_11DB: movsxd rdi, esi m...
long long func0(_QWORD *a1, int a2, _DWORD *a3) { long long result; // rax _QWORD *v6; // rdx int v7; // esi result = malloc(8LL * a2); if ( a2 <= 0 ) { v7 = 0; } else { v6 = a1; v7 = 0; do { if ( *v6 ) *(_QWORD *)(result + 8LL * v7++) = *v6; ++v6; } w...
func0: ENDBR64 PUSH R12 PUSH RBP PUSH RBX MOV R12,RDI MOV EBP,ESI MOV RBX,RDX MOVSXD RDI,ESI SHL RDI,0x3 CALL 0x001010b0 TEST EBP,EBP JLE 0x001011f8 MOV RDX,R12 LEA ECX,[RBP + -0x1] LEA R8,[R12 + RCX*0x8 + 0x8] MOV ESI,0x0 JMP 0x001011ee LAB_001011db: MOVSXD RDI,ESI MOV qword ptr [RAX + RDI*0x8],RCX LEA ESI,[RSI + 0x1]...
void func0(long *param_1,int param_2,int *param_3) { long *plVar1; void *pvVar2; int iVar3; pvVar2 = malloc((long)param_2 << 3); if (param_2 < 1) { iVar3 = 0; } else { plVar1 = param_1 + (ulong)(param_2 - 1) + 1; iVar3 = 0; do { if (*param_1 != 0) { *(long *)((long)pvVar2...
7,758
func0
#include <assert.h> #include <stdio.h> #include <stdlib.h> // Function to remove empty elements
char** func0(char** tuple1, int size, int* new_size) { char** result = malloc(size * sizeof(char*)); int j = 0; for(int i = 0; i < size; i++) { if(tuple1[i] != NULL) { result[j++] = tuple1[i]; } } *new_size = j; return result; }
int main() { // First test case char* input1[] = {NULL, NULL, "", "a,b", "a,b,c", "d"}; char* expected1[] = {"", "a,b", "a,b,c", "d"}; int new_size1; char** output1 = func0(input1, 6, &new_size1); assert(new_size1 == 4); for(int i = 0; i < new_size1; i++) { assert(output1[i] ...
O2
c
func0: endbr64 push %r12 mov %rdx,%r12 push %rbp push %rbx mov %rdi,%rbx movslq %esi,%rdi mov %rdi,%rbp shl $0x3,%rdi callq 10b0 <malloc@plt> test %ebp,%ebp jle 1498 <func0+0x58> lea -0x1(%rbp),%edx mov %rbx,%rdi xor %esi,%esi lea 0x8(%rbx,%rdx,8),%r9 xchg %ax,%ax mov (%rdi),%rc...
func0: endbr64 push r12 mov r12, rdx push rbp push rbx mov rbx, rdi movsxd rdi, esi mov rbp, rdi shl rdi, 3 call _malloc test ebp, ebp jle short loc_1498 lea edx, [rbp-1] mov rcx, rbx xor edi, edi lea r9, [rbx+rdx*8+8] xchg ax, ax loc_1470: mov rsi, [rcx] test ...
long long func0(_QWORD *a1, int a2, _DWORD *a3) { long long result; // rax _QWORD *v6; // rcx int v7; // edi long long v8; // r8 result = malloc(8LL * a2); if ( a2 <= 0 ) { *a3 = 0; } else { v6 = a1; v7 = 0; do { if ( *v6 ) { v8 = v7++; *(_QWORD *)(r...
func0: ENDBR64 PUSH R12 MOV R12,RDX PUSH RBP PUSH RBX MOV RBX,RDI MOVSXD RDI,ESI MOV RBP,RDI SHL RDI,0x3 CALL 0x001010b0 TEST EBP,EBP JLE 0x00101498 LEA EDX,[RBP + -0x1] MOV RCX,RBX XOR EDI,EDI LEA R9,[RBX + RDX*0x8 + 0x8] NOP LAB_00101470: MOV RSI,qword ptr [RCX] TEST RSI,RSI JZ 0x00101482 MOVSXD R8,EDI ADD EDI,0x1 MO...
void func0(long *param_1,int param_2,int *param_3) { long *plVar1; void *pvVar2; int iVar3; long lVar4; pvVar2 = malloc((long)param_2 << 3); if (0 < param_2) { iVar3 = 0; plVar1 = param_1 + (ulong)(param_2 - 1) + 1; do { if (*param_1 != 0) { lVar4 = (long)iVar3; iVar3 =...
7,759
func0
#include <assert.h> #include <stdio.h> #include <stdlib.h> // Function to remove empty elements
char** func0(char** tuple1, int size, int* new_size) { char** result = malloc(size * sizeof(char*)); int j = 0; for(int i = 0; i < size; i++) { if(tuple1[i] != NULL) { result[j++] = tuple1[i]; } } *new_size = j; return result; }
int main() { // First test case char* input1[] = {NULL, NULL, "", "a,b", "a,b,c", "d"}; char* expected1[] = {"", "a,b", "a,b,c", "d"}; int new_size1; char** output1 = func0(input1, 6, &new_size1); assert(new_size1 == 4); for(int i = 0; i < new_size1; i++) { assert(output1[i] ...
O3
c
func0: endbr64 push %r12 mov %rdx,%r12 push %rbp push %rbx mov %rdi,%rbx movslq %esi,%rdi mov %rdi,%rbp shl $0x3,%rdi callq 10b0 <malloc@plt> test %ebp,%ebp jle 14c8 <func0+0x58> lea -0x1(%rbp),%edx mov %rbx,%rdi xor %esi,%esi lea 0x8(%rbx,%rdx,8),%r9 xchg %ax,%ax mov (%rdi),%rc...
func0: endbr64 push r13 movsxd r8, esi mov r13, rdx push r12 mov r12, r8 push rbp lea rbp, ds:0[r8*8] push rbx mov rbx, rdi mov rdi, rbp; size sub rsp, 8 call _malloc test r12d, r12d jle short loc_14C0 mov rcx, rbx lea r8, [rbx+rbp] xor edi, edi nop dword p...
_QWORD * func0(_QWORD *a1, int a2, _DWORD *a3) { _QWORD *result; // rax _QWORD *v6; // rcx int v7; // edi long long v8; // r9 result = malloc(8LL * a2); if ( a2 <= 0 ) { *a3 = 0; } else { v6 = a1; v7 = 0; do { if ( *v6 ) { v8 = v7++; result[v8] = *v6;...
func0: ENDBR64 PUSH R13 MOVSXD R8,ESI MOV R13,RDX PUSH R12 MOV R12,R8 PUSH RBP LEA RBP,[R8*0x8] PUSH RBX MOV RBX,RDI MOV RDI,RBP SUB RSP,0x8 CALL 0x001010b0 TEST R12D,R12D JLE 0x001014c0 MOV RCX,RBX LEA R8,[RBX + RBP*0x1] XOR EDI,EDI NOP dword ptr [RAX + RAX*0x1] LAB_00101490: MOV RSI,qword ptr [RCX] TEST RSI,RSI JZ 0x...
void func0(long *param_1,int param_2,int *param_3) { long *plVar1; void *pvVar2; int iVar3; long lVar4; pvVar2 = malloc((long)param_2 * 8); if (0 < param_2) { plVar1 = param_1 + param_2; iVar3 = 0; do { if (*param_1 != 0) { lVar4 = (long)iVar3; iVar3 = iVar3 + 1; ...
7,760
func0
#include <stdio.h> #include <string.h> #include <assert.h>
const char* func0(const char* string) { char vowels[] = "AEIOUaeiou"; int count = 0; int found[10] = {0}; // to track which vowels have been found for (int i = 0; string[i] != '\0'; i++) { for (int j = 0; j < 10; j++) { if (string[i] == vowels[j] && found[j] == 0) { ...
int main() { assert(strcmp(func0("SEEquoiaL"), "accepted") == 0); assert(strcmp(func0("program"), "not accepted") == 0); assert(strcmp(func0("fine"), "not accepted") == 0); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x60,%rsp mov %rdi,-0x58(%rbp) mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax movabs $0x696561554f494541,%rax mov %rax,-0x13(%rbp) movw $0x756f,-0xb(%rbp) movb $0x0,-0x9(%rbp) movl $0x0,-0x4c(%rbp) movq $0x0,-0x40(%rbp) movq $0x0,-0x38(%r...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_58], rdi mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax mov rax, 696561554F494541h mov [rbp+var_13], rax mov dword ptr [rbp+var_13+7], 756F69h mov [rbp+var_4C], 0 pxor xmm0, xmm0 movaps [rbp+var_40], xmm0 mo...
const char * func0(long long a1) { int v2; // [rsp+14h] [rbp-4Ch] int i; // [rsp+18h] [rbp-48h] int j; // [rsp+1Ch] [rbp-44h] _OWORD v5[2]; // [rsp+20h] [rbp-40h] BYREF long long v6; // [rsp+40h] [rbp-20h] _BYTE v7[19]; // [rsp+4Dh] [rbp-13h] BYREF *(_QWORD *)&v7[11] = __readfsqword(0x28u); strcpy(v7, ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x58],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX MOV RAX,0x696561554f494541 MOV qword ptr [RBP + -0x13],RAX MOV dword ptr [RBP + -0xc],0x756f69 MOV dword ptr [RBP + -0x4c],0x0 PXOR XMM0,XMM0 MOVAPS xmmword ptr [RBP + ...
char * func0(long param_1) { char *pcVar1; long in_FS_OFFSET; int local_54; int local_50; int local_4c; int local_48 [16]; int local_38 [16]; int8 local_28; char local_1b [11]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); builtin_strncpy(local_1b,"AEIOUaeiou",0xb); local_54 = ...
7,761
func0
#include <stdio.h> #include <string.h> #include <assert.h>
const char* func0(const char* string) { char vowels[] = "AEIOUaeiou"; int count = 0; int found[10] = {0}; // to track which vowels have been found for (int i = 0; string[i] != '\0'; i++) { for (int j = 0; j < 10; j++) { if (string[i] == vowels[j] && found[j] == 0) { ...
int main() { assert(strcmp(func0("SEEquoiaL"), "accepted") == 0); assert(strcmp(func0("program"), "not accepted") == 0); assert(strcmp(func0("fine"), "not accepted") == 0); return 0; }
O1
c
func0: endbr64 sub $0x48,%rsp mov %fs:0x28,%rax mov %rax,0x38(%rsp) xor %eax,%eax movabs $0x696561554f494541,%rax mov %rax,0x2d(%rsp) movw $0x756f,0x35(%rsp) movb $0x0,0x37(%rsp) movq $0x0,(%rsp) movq $0x0,0x8(%rsp) movq $0x0,0x10(%rsp) movq $0x0,0x18(%rsp) movq $0x0,0x20(%rsp) movzbl (%rdi...
func0: endbr64 sub rsp, 48h mov rax, fs:28h mov [rsp+48h+var_10], rax xor eax, eax mov rax, 696561554F494541h mov [rsp+48h+var_1B], rax mov [rsp+48h+var_13], 756Fh mov [rsp+48h+var_11], 0 mov [rsp+48h+var_48], 0 mov [rsp+48h+var_40], 0 mov [rsp+48h+var_38], 0 mov [rsp+48h...
char * func0(char *a1) { char v1; // dl char *result; // rax char *v3; // rdi int v4; // r9d long long v5; // rax _QWORD v6[5]; // [rsp+0h] [rbp-48h] BYREF _QWORD v7[3]; // [rsp+2Dh] [rbp-1Bh] BYREF *(_QWORD *)((char *)&v7[1] + 3) = __readfsqword(0x28u); strcpy((char *)v7, "AEIOUaeiou"); memset(v6,...
func0: ENDBR64 SUB RSP,0x48 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x38],RAX XOR EAX,EAX MOV RAX,0x696561554f494541 MOV qword ptr [RSP + 0x2d],RAX MOV word ptr [RSP + 0x35],0x756f MOV byte ptr [RSP + 0x37],0x0 MOV qword ptr [RSP],0x0 MOV qword ptr [RSP + 0x8],0x0 MOV qword ptr [RSP + 0x10],0x0 MOV qword ptr [...
char * func0(char *param_1) { char *pcVar1; long lVar2; char cVar3; int iVar4; long in_FS_OFFSET; int local_48 [11]; char local_1b [11]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); builtin_strncpy(local_1b,"AEIOUaeiou",0xb); local_48[0] = 0; local_48[1] = 0; local_48[2] = 0; ...
7,762
func0
#include <stdio.h> #include <string.h> #include <assert.h>
const char* func0(const char* string) { char vowels[] = "AEIOUaeiou"; int count = 0; int found[10] = {0}; // to track which vowels have been found for (int i = 0; string[i] != '\0'; i++) { for (int j = 0; j < 10; j++) { if (string[i] == vowels[j] && found[j] == 0) { ...
int main() { assert(strcmp(func0("SEEquoiaL"), "accepted") == 0); assert(strcmp(func0("program"), "not accepted") == 0); assert(strcmp(func0("fine"), "not accepted") == 0); return 0; }
O2
c
func0: endbr64 sub $0x48,%rsp mov $0x756f,%ecx pxor %xmm0,%xmm0 xor %r9d,%r9d mov %fs:0x28,%rax mov %rax,0x38(%rsp) xor %eax,%eax mov %cx,0x35(%rsp) movzbl (%rdi),%ecx mov %rsp,%r8 movabs $0x696561554f494541,%rax movb $0x0,0x37(%rsp) add $0x1,%rdi mov %rax,0x2d(%rsp) movq $0x0,0x20(%...
func0: endbr64 sub rsp, 48h mov ecx, 756Fh pxor xmm0, xmm0 xor r9d, r9d mov rax, fs:28h mov [rsp+48h+var_10], rax mov rax, 696561554F494541h mov [rsp+48h+var_13], cx movzx ecx, byte ptr [rdi] mov r8, rsp mov [rsp+48h+var_11], 0 add rdi, 1 mov [rsp+48h+var_28], 0 movaps ...
char * func0(char *a1) { int v1; // r9d char v2; // cl char *v3; // rdi long long v4; // rax char i; // dl _OWORD v7[2]; // [rsp+0h] [rbp-48h] BYREF long long v8; // [rsp+20h] [rbp-28h] _QWORD v9[3]; // [rsp+2Dh] [rbp-1Bh] BYREF v1 = 0; *(_QWORD *)((char *)&v9[1] + 3) = __readfsqword(0x28u); v2 =...
func0: ENDBR64 SUB RSP,0x48 MOV ECX,0x756f PXOR XMM0,XMM0 XOR R9D,R9D MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x38],RAX MOV RAX,0x696561554f494541 MOV word ptr [RSP + 0x35],CX MOVZX ECX,byte ptr [RDI] MOV R8,RSP MOV byte ptr [RSP + 0x37],0x0 ADD RDI,0x1 MOV qword ptr [RSP + 0x20],0x0 MOVAPS xmmword ptr [RSP],X...
char * func0(char *param_1) { long lVar1; char *pcVar2; char cVar3; char cVar4; int iVar5; long in_FS_OFFSET; int1 local_48 [16]; int1 local_38 [16]; int8 local_28; int8 local_1b; int2 local_13; int1 local_11; long local_10; iVar5 = 0; local_10 = *(long *)(in_FS_OFFSET + 0x28); local...
7,763
func0
#include <stdio.h> #include <string.h> #include <assert.h>
const char* func0(const char* string) { char vowels[] = "AEIOUaeiou"; int count = 0; int found[10] = {0}; // to track which vowels have been found for (int i = 0; string[i] != '\0'; i++) { for (int j = 0; j < 10; j++) { if (string[i] == vowels[j] && found[j] == 0) { ...
int main() { assert(strcmp(func0("SEEquoiaL"), "accepted") == 0); assert(strcmp(func0("program"), "not accepted") == 0); assert(strcmp(func0("fine"), "not accepted") == 0); return 0; }
O3
c
func0: endbr64 sub $0x38,%rsp pxor %xmm0,%xmm0 mov %fs:0x28,%rax mov %rax,0x28(%rsp) xor %eax,%eax movzbl (%rdi),%eax movaps %xmm0,(%rsp) movq $0x0,0x20(%rsp) movaps %xmm0,0x10(%rsp) test %al,%al je 1478 <func0+0x228> lea 0x1(%rdi),%rdx xor %ecx,%ecx jmp 12f3 <func0+0xa3> nopl 0x0(%rax)...
func0: endbr64 sub rsp, 38h pxor xmm0, xmm0 mov rax, fs:28h mov [rsp+38h+var_10], rax xor eax, eax movzx eax, byte ptr [rdi] movaps [rsp+38h+var_38], xmm0 mov [rsp+38h+var_18], 0 movaps [rsp+38h+var_28], xmm0 test al, al jz loc_13B0 lea rdx, [rdi+1] xor ecx, ecx jmp short ...
const char * func0(char *a1) { char v1; // al char *v2; // rdx int v3; // ecx long long v4; // rax __int128 v6; // [rsp+0h] [rbp-38h] __int128 v7; // [rsp+10h] [rbp-28h] long long v8; // [rsp+20h] [rbp-18h] unsigned long long v9; // [rsp+28h] [rbp-10h] v9 = __readfsqword(0x28u); v1 = *a1; v6 = 0L...
func0: ENDBR64 SUB RSP,0x38 PXOR XMM0,XMM0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x28],RAX XOR EAX,EAX MOVZX EAX,byte ptr [RDI] MOVAPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x20],0x0 MOVAPS xmmword ptr [RSP + 0x10],XMM0 TEST AL,AL JZ 0x001013b0 LEA RDX,[RDI + 0x1] XOR ECX,ECX JMP 0x001012cb LAB_001012a...
char * func0(char *param_1) { char cVar1; long lVar2; char *pcVar3; int iVar4; long in_FS_OFFSET; int local_38 [16]; int local_28 [16]; int8 local_18; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); cVar1 = *param_1; local_38 = (int [16])0x0; local_18 = 0; local_28 = (int [16...
7,764
func0
#include <stdio.h> #include <assert.h>
int func0(int A, int B, int N) { int x = (B - 1 < N) ? (B - 1) : N; return (A * x) / B; }
int main() { assert(func0(11, 10, 9) == 9); assert(func0(5, 7, 4) == 2); assert(func0(2, 2, 1) == 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 -0x18(%rbp),%eax cmp -0x1c(%rbp),%eax jg 116a <func0+0x21> mov -0x18(%rbp),%eax sub $0x1,%eax jmp 116d <func0+0x24> mov -0x1c(%rbp),%eax mov %eax,-0x4(%rbp) mov -0x14(%rbp)...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_14], edi mov [rbp+var_18], esi mov [rbp+var_1C], edx mov eax, [rbp+var_18] cmp eax, [rbp+var_1C] jg short loc_116A mov eax, [rbp+var_18] sub eax, 1 jmp short loc_116D loc_116A: mov eax, [rbp+var_1C] loc_116D: mov [rbp+...
long long func0(int a1, int a2, int a3) { int v3; // eax if ( a2 > a3 ) v3 = a3; else v3 = a2 - 1; return (unsigned int)(v3 * a1 / a2); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x14],EDI MOV dword ptr [RBP + -0x18],ESI MOV dword ptr [RBP + -0x1c],EDX MOV EAX,dword ptr [RBP + -0x18] CMP EAX,dword ptr [RBP + -0x1c] JG 0x0010116a MOV EAX,dword ptr [RBP + -0x18] SUB EAX,0x1 JMP 0x0010116d LAB_0010116a: MOV EAX,dword ptr [RBP + -0x1c] LAB_0...
int [16] func0(int param_1,int param_2,int param_3) { int auVar1 [16]; if (param_2 <= param_3) { param_3 = param_2 + -1; } auVar1._0_8_ = (long)(param_1 * param_3) / (long)param_2 & 0xffffffff; auVar1._8_8_ = (long)(param_1 * param_3) % (long)param_2 & 0xffffffff; return auVar1; }
7,765
func0
#include <stdio.h> #include <assert.h>
int func0(int A, int B, int N) { int x = (B - 1 < N) ? (B - 1) : N; return (A * x) / B; }
int main() { assert(func0(11, 10, 9) == 9); assert(func0(5, 7, 4) == 2); assert(func0(2, 2, 1) == 1); return 0; }
O1
c
func0: endbr64 lea -0x1(%rsi),%eax cmp %edx,%esi cmovle %eax,%edx mov %edx,%eax imul %edi,%eax cltd idiv %esi retq
func0: endbr64 mov eax, edx lea edx, [rsi-1] cmp esi, eax cmovle eax, edx imul eax, edi cdq idiv esi retn
long long func0(int a1, int a2, int a3) { int v3; // eax v3 = a3; if ( a2 <= a3 ) v3 = a2 - 1; return (unsigned int)(a1 * v3 / a2); }
func0: ENDBR64 MOV EAX,EDX LEA EDX,[RSI + -0x1] CMP ESI,EAX CMOVLE EAX,EDX IMUL EAX,EDI CDQ IDIV ESI RET
int1 [16] func0(int param_1,int param_2,int param_3) { int1 auVar1 [16]; if (param_2 <= param_3) { param_3 = param_2 + -1; } auVar1._0_8_ = (long)(param_3 * param_1) / (long)param_2 & 0xffffffff; auVar1._8_8_ = (long)(param_3 * param_1) % (long)param_2 & 0xffffffff; return auVar1; }
7,766
func0
#include <stdio.h> #include <assert.h>
int func0(int A, int B, int N) { int x = (B - 1 < N) ? (B - 1) : N; return (A * x) / B; }
int main() { assert(func0(11, 10, 9) == 9); assert(func0(5, 7, 4) == 2); assert(func0(2, 2, 1) == 1); return 0; }
O2
c
func0: endbr64 cmp %edx,%esi lea -0x1(%rsi),%eax cmovle %eax,%edx mov %edx,%eax imul %edi,%eax cltd idiv %esi retq nopw %cs:0x0(%rax,%rax,1)
func0: endbr64 mov eax, edx lea edx, [rsi-1] cmp esi, eax cmovle eax, edx imul eax, edi cdq idiv esi retn
long long func0(int a1, int a2, int a3) { int v3; // eax v3 = a3; if ( a2 <= a3 ) v3 = a2 - 1; return (unsigned int)(a1 * v3 / a2); }
func0: ENDBR64 MOV EAX,EDX LEA EDX,[RSI + -0x1] CMP ESI,EAX CMOVLE EAX,EDX IMUL EAX,EDI CDQ IDIV ESI RET
int1 [16] func0(int param_1,int param_2,int param_3) { int1 auVar1 [16]; if (param_2 <= param_3) { param_3 = param_2 + -1; } auVar1._0_8_ = (long)(param_3 * param_1) / (long)param_2 & 0xffffffff; auVar1._8_8_ = (long)(param_3 * param_1) % (long)param_2 & 0xffffffff; return auVar1; }
7,767
func0
#include <stdio.h> #include <assert.h>
int func0(int A, int B, int N) { int x = (B - 1 < N) ? (B - 1) : N; return (A * x) / B; }
int main() { assert(func0(11, 10, 9) == 9); assert(func0(5, 7, 4) == 2); assert(func0(2, 2, 1) == 1); return 0; }
O3
c
func0: endbr64 cmp %edx,%esi lea -0x1(%rsi),%eax cmovle %eax,%edx mov %edx,%eax imul %edi,%eax cltd idiv %esi retq nopw %cs:0x0(%rax,%rax,1)
func0: endbr64 mov eax, edx lea edx, [rsi-1] cmp esi, eax cmovle eax, edx imul eax, edi cdq idiv esi retn
long long func0(int a1, int a2, int a3) { int v3; // eax v3 = a3; if ( a2 <= a3 ) v3 = a2 - 1; return (unsigned int)(a1 * v3 / a2); }
func0: ENDBR64 MOV EAX,EDX LEA EDX,[RSI + -0x1] CMP ESI,EAX CMOVLE EAX,EDX IMUL EAX,EDI CDQ IDIV ESI RET
int [16] func0(int param_1,int param_2,int param_3) { int auVar1 [16]; if (param_2 <= param_3) { param_3 = param_2 + -1; } auVar1._0_8_ = (long)(param_3 * param_1) / (long)param_2 & 0xffffffff; auVar1._8_8_ = (long)(param_3 * param_1) % (long)param_2 & 0xffffffff; return auVar1; }
7,768
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> typedef struct { int size; int *elements; } tuple;
tuple* func0(tuple test_list[], int list_size) { tuple *res = malloc(sizeof(tuple) * list_size); int res_size = 0; for (int i = 0; i < list_size; i++) { if (res_size > 0 && res[res_size - 1].elements[0] == test_list[i].elements[0]) { // Resize the last tuple in res to accommod...
int main() { tuple list1[] = {{2, (int[]){5, 6}}, {2, (int[]){5, 7}}, {2, (int[]){6, 8}}, {2, (int[]){6, 10}}, {2, (int[]){7, 13}}}; tuple *result1 = func0(list1, 5); assert(result1[0].size == 3 && (result1[0].elements[0] == 5 && result1[0].elements[1] == 6 && result1[0].elements[2] == 7)); assert(r...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x38,%rsp mov %rdi,-0x38(%rbp) mov %esi,-0x3c(%rbp) mov -0x3c(%rbp),%eax cltq shl $0x4,%rax mov %rax,%rdi callq 10c0 <malloc@plt> mov %rax,-0x18(%rbp) movl $0x0,-0x30(%rbp) movl $0x0,-0x2c(%rbp) jmpq 1442 <func0+0x279> cmpl $0x0,...
func0: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 38h mov [rbp+var_38], rdi mov [rbp+var_3C], esi mov eax, [rbp+var_3C] cdqe shl rax, 4 mov rdi, rax; size call _malloc mov [rbp+var_18], rax mov [rbp+var_30], 0 mov [rbp+var_2C], 0 jmp loc_1442 loc_1205: cmp [...
_DWORD * func0(long long a1, int a2) { int v3; // [rsp+10h] [rbp-30h] int i; // [rsp+14h] [rbp-2Ch] int j; // [rsp+18h] [rbp-28h] int k; // [rsp+1Ch] [rbp-24h] int v7; // [rsp+20h] [rbp-20h] int v8; // [rsp+24h] [rbp-1Ch] _DWORD *v9; // [rsp+28h] [rbp-18h] v9 = malloc(16LL * a2); v3 = 0; for ( i = ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x38 MOV qword ptr [RBP + -0x38],RDI MOV dword ptr [RBP + -0x3c],ESI MOV EAX,dword ptr [RBP + -0x3c] CDQE SHL RAX,0x4 MOV RDI,RAX CALL 0x001010c0 MOV qword ptr [RBP + -0x18],RAX MOV dword ptr [RBP + -0x30],0x0 MOV dword ptr [RBP + -0x2c],0x0 JMP 0x00101442 LAB_001012...
void * func0(long param_1,int param_2) { int iVar1; int iVar2; void *pvVar3; void *pvVar4; int local_38; int local_34; int local_30; int local_2c; pvVar3 = malloc((long)param_2 << 4); local_38 = 0; for (local_34 = 0; local_34 < param_2; local_34 = local_34 + 1) { if ((local_38 < 1) || ...
7,769
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> typedef struct { int size; int *elements; } tuple;
tuple* func0(tuple test_list[], int list_size) { tuple *res = malloc(sizeof(tuple) * list_size); int res_size = 0; for (int i = 0; i < list_size; i++) { if (res_size > 0 && res[res_size - 1].elements[0] == test_list[i].elements[0]) { // Resize the last tuple in res to accommod...
int main() { tuple list1[] = {{2, (int[]){5, 6}}, {2, (int[]){5, 7}}, {2, (int[]){6, 8}}, {2, (int[]){6, 10}}, {2, (int[]){7, 13}}}; tuple *result1 = func0(list1, 5); assert(result1[0].size == 3 && (result1[0].elements[0] == 5 && result1[0].elements[1] == 6 && result1[0].elements[2] == 7)); assert(r...
O1
c
func0: endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x18,%rsp mov %rdi,%rbp mov %esi,%ebx movslq %esi,%rdi shl $0x4,%rdi callq 10c0 <malloc@plt> mov %rax,%r15 test %ebx,%ebx jle 12f9 <func0+0x130> mov %rbp,%r13 lea -0x1(%rbx),%eax shl $0x4,%rax lea ...
func0: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 18h mov rbp, rdi mov ebx, esi movsxd rdi, esi shl rdi, 4 call _malloc mov r15, rax test ebx, ebx jle loc_12F3 mov r13, rbp lea eax, [rbx-1] shl rax, 4 lea rax, [rbp+rax+10h] mov...
long long func0(int *a1, int a2) { long long v2; // r15 int *v3; // r13 int v4; // r14d int v5; // ebx long long v6; // r12 long long v7; // rax long long v8; // rbx _DWORD *v9; // rdi int v10; // r12d long long v11; // r12 long long v12; // rax long long v14; // [rsp+0h] [rbp-48h] int v15; /...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x18 MOV RBP,RDI MOV EBX,ESI MOVSXD RDI,ESI SHL RDI,0x4 CALL 0x001010c0 MOV R15,RAX TEST EBX,EBX JLE 0x001012f3 MOV R13,RBP LEA EAX,[RBX + -0x1] SHL RAX,0x4 LEA RAX,[RBP + RAX*0x1 + 0x10] MOV qword ptr [RSP],RAX MOV R14D,0x0 JMP 0x0010126d LAB...
void * func0(uint *param_1,int param_2) { int iVar1; uint *puVar2; int *piVar3; int iVar4; void *pvVar5; void *pvVar6; long lVar7; uint uVar8; uint *puVar9; int iVar10; pvVar5 = malloc((long)param_2 << 4); if (0 < param_2) { puVar2 = param_1 + (ulong)(param_2 - 1) * 4 + 4; iVar10 = 0...
7,770
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> typedef struct { int size; int *elements; } tuple;
tuple* func0(tuple test_list[], int list_size) { tuple *res = malloc(sizeof(tuple) * list_size); int res_size = 0; for (int i = 0; i < list_size; i++) { if (res_size > 0 && res[res_size - 1].elements[0] == test_list[i].elements[0]) { // Resize the last tuple in res to accommod...
int main() { tuple list1[] = {{2, (int[]){5, 6}}, {2, (int[]){5, 7}}, {2, (int[]){6, 8}}, {2, (int[]){6, 10}}, {2, (int[]){7, 13}}}; tuple *result1 = func0(list1, 5); assert(result1[0].size == 3 && (result1[0].elements[0] == 5 && result1[0].elements[1] == 6 && result1[0].elements[2] == 7)); assert(r...
O2
c
func0: endbr64 push %r15 push %r14 push %r13 mov %rdi,%r13 movslq %esi,%rdi push %r12 push %rbp push %rbx mov %rdi,%rbx shl $0x4,%rdi sub $0x18,%rsp callq 10c0 <malloc@plt> mov %rax,%r12 test %ebx,%ebx jle 17f2 <func0+0xb2> lea -0x1(%rbx),%eax lea 0x8(%r13),%rbp shl $0x4,%rax l...
func0: endbr64 push r15 push r14 push r13 push r12 push rbp mov rbp, rdi movsxd rdi, esi push rbx mov rbx, rdi shl rdi, 4 sub rsp, 18h call _malloc mov r12, rax test ebx, ebx jle loc_1801 lea eax, [rbx-1] lea r13, [rbp+8] xor r14d, r14d shl rax, 4 lea ...
long long func0(long long a1, int a2) { long long v2; // r12 _QWORD *v3; // r13 int v4; // r14d long long v5; // r15 long long v6; // rax long long v7; // rbx _DWORD *v8; // rdi long long v9; // rbp long long v10; // rax _DWORD *v11; // rsi long long v12; // rdx int v14; // ebp long long v15;...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP MOV RBP,RDI MOVSXD RDI,ESI PUSH RBX MOV RBX,RDI SHL RDI,0x4 SUB RSP,0x18 CALL 0x001010c0 MOV R12,RAX TEST EBX,EBX JLE 0x00101801 LEA EAX,[RBX + -0x1] LEA R13,[RBP + 0x8] XOR R14D,R14D SHL RAX,0x4 LEA RAX,[RBP + RAX*0x1 + 0x18] MOV qword ptr [RSP],RAX NOP word ...
void * func0(long param_1,int param_2) { int *piVar1; int iVar2; int iVar3; long lVar4; void *pvVar5; void *pvVar6; long lVar7; int iVar8; long *plVar9; int iVar10; pvVar5 = malloc((long)param_2 << 4); if (0 < param_2) { plVar9 = (long *)(param_1 + 8); iVar10 = 0; do { iVar...
7,771
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> typedef struct { int size; int *elements; } tuple;
tuple* func0(tuple test_list[], int list_size) { tuple *res = malloc(sizeof(tuple) * list_size); int res_size = 0; for (int i = 0; i < list_size; i++) { if (res_size > 0 && res[res_size - 1].elements[0] == test_list[i].elements[0]) { // Resize the last tuple in res to accommod...
int main() { tuple list1[] = {{2, (int[]){5, 6}}, {2, (int[]){5, 7}}, {2, (int[]){6, 8}}, {2, (int[]){6, 10}}, {2, (int[]){7, 13}}}; tuple *result1 = func0(list1, 5); assert(result1[0].size == 3 && (result1[0].elements[0] == 5 && result1[0].elements[1] == 6 && result1[0].elements[2] == 7)); assert(r...
O3
c
func0: endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp mov %rdi,%rbp movslq %esi,%rdi push %rbx mov %rdi,%rbx shl $0x4,%rdi sub $0x18,%rsp callq 10c0 <malloc@plt> mov %rax,%r12 test %ebx,%ebx jle 1858 <func0+0x118> lea -0x1(%rbx),%eax lea 0x8(%rbp),%r13 xor %r14d,%r14...
func0: endbr64 push r15 push r14 mov r14, rdi push r13 push r12 push rbp movsxd rbp, esi push rbx mov r12, rbp shl rbp, 4 mov rdi, rbp; size sub rsp, 28h call _malloc mov rbx, rax lea rax, [r14+rbp] mov [rsp+58h+var_50], rax test r12d, r12d jle loc_17D7 xor ...
char * func0(unsigned int *a1, int a2) { unsigned int *v2; // r14 char *v3; // rbx int v4; // ebp long long v5; // rdx long long v6; // r12 long long v7; // r15 long long v8; // r13 _DWORD *v9; // rdi char *v10; // r15 char *v11; // rax char *v12; // rdx long long v13; // rsi long long v14; //...
func0: ENDBR64 PUSH R15 PUSH R14 MOV R14,RDI PUSH R13 PUSH R12 PUSH RBP MOVSXD RBP,ESI PUSH RBX MOV R12,RBP SHL RBP,0x4 MOV RDI,RBP SUB RSP,0x28 CALL 0x001010c0 MOV RBX,RAX LEA RAX,[R14 + RBP*0x1] MOV qword ptr [RSP + 0x8],RAX TEST R12D,R12D JLE 0x001017d7 XOR EBP,EBP NOP LAB_00101740: MOVSXD RDX,EBP MOV R12D,dword ptr...
void * func0(uint *param_1,int param_2) { int iVar1; uint *puVar2; int8 *puVar3; int *piVar4; int8 *puVar5; int iVar6; int iVar7; int8 uVar8; uint uVar9; void *pvVar10; void *pvVar11; size_t sVar12; long lVar13; ulong uVar14; long lVar15; int iVar16; ulong uVar17; uint uVar18; int...
7,772
func0
#include <assert.h>
int func0(int x, int y) { if (x < y) { return x; } return y; }
int main() { assert(func0(10, 20) == 10); assert(func0(19, 15) == 15); assert(func0(-10, -20) == -20); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x4(%rbp) mov %esi,-0x8(%rbp) mov -0x4(%rbp),%eax cmp -0x8(%rbp),%eax jge 1164 <func0+0x1b> mov -0x4(%rbp),%eax jmp 1167 <func0+0x1e> mov -0x8(%rbp),%eax pop %rbp retq
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_4], edi mov [rbp+var_8], esi mov eax, [rbp+var_4] cmp eax, [rbp+var_8] jge short loc_1164 mov eax, [rbp+var_4] jmp short loc_1167 loc_1164: mov eax, [rbp+var_8] loc_1167: pop rbp retn
long long func0(unsigned int a1, unsigned int a2) { if ( (int)a1 >= (int)a2 ) return a2; else return a1; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x4],EDI MOV dword ptr [RBP + -0x8],ESI MOV EAX,dword ptr [RBP + -0x4] CMP EAX,dword ptr [RBP + -0x8] JGE 0x00101164 MOV EAX,dword ptr [RBP + -0x4] JMP 0x00101167 LAB_00101164: MOV EAX,dword ptr [RBP + -0x8] LAB_00101167: POP RBP RET
int func0(int param_1,int param_2) { if (param_1 < param_2) { param_2 = param_1; } return param_2; }
7,773
func0
#include <assert.h>
int func0(int x, int y) { if (x < y) { return x; } return y; }
int main() { assert(func0(10, 20) == 10); assert(func0(19, 15) == 15); assert(func0(-10, -20) == -20); return 0; }
O1
c
func0: endbr64 cmp %esi,%edi mov %esi,%eax cmovle %edi,%eax retq
func0: endbr64 cmp edi, esi mov eax, esi cmovle eax, edi retn
long long func0(unsigned int a1, unsigned int a2) { long long result; // rax result = a2; if ( (int)a1 <= (int)a2 ) return a1; return result; }
func0: ENDBR64 CMP EDI,ESI MOV EAX,ESI CMOVLE EAX,EDI RET
int func0(int param_1,int param_2) { if (param_1 <= param_2) { param_2 = param_1; } return param_2; }
7,774
func0
#include <assert.h>
int func0(int x, int y) { if (x < y) { return x; } return y; }
int main() { assert(func0(10, 20) == 10); assert(func0(19, 15) == 15); assert(func0(-10, -20) == -20); return 0; }
O2
c
func0: endbr64 cmp %esi,%edi mov %esi,%eax cmovle %edi,%eax retq nopl 0x0(%rax)
func0: endbr64 cmp edi, esi mov eax, esi cmovle eax, edi retn
long long func0(unsigned int a1, unsigned int a2) { long long result; // rax result = a2; if ( (int)a1 <= (int)a2 ) return a1; return result; }
func0: ENDBR64 CMP EDI,ESI MOV EAX,ESI CMOVLE EAX,EDI RET
int func0(int param_1,int param_2) { if (param_1 <= param_2) { param_2 = param_1; } return param_2; }
7,775
func0
#include <assert.h>
int func0(int x, int y) { if (x < y) { return x; } return y; }
int main() { assert(func0(10, 20) == 10); assert(func0(19, 15) == 15); assert(func0(-10, -20) == -20); return 0; }
O3
c
func0: endbr64 cmp %esi,%edi mov %esi,%eax cmovle %edi,%eax retq nopl 0x0(%rax)
func0: endbr64 cmp edi, esi mov eax, esi cmovle eax, edi retn
long long func0(unsigned int a1, unsigned int a2) { long long result; // rax result = a2; if ( (int)a1 <= (int)a2 ) return a1; return result; }
func0: ENDBR64 CMP EDI,ESI MOV EAX,ESI CMOVLE EAX,EDI RET
int func0(int param_1,int param_2) { if (param_1 <= param_2) { param_2 = param_1; } return param_2; }
7,776
func0
#include <stdio.h> #include <assert.h>
int func0(int n, int a, int b, int c) { int dp[n + 10]; for (int i = 0; i < n + 10; i++) { dp[i] = -1; } dp[0] = 0; for (int i = 0; i <= n; i++) { if (dp[i] != -1) { if (i + a <= n) { dp[i + a] = (dp[i] + 1 > dp[i + a]) ? dp[i] + 1 : dp[i + ...
int main() { assert(func0(7, 5, 2, 5) == 2); assert(func0(17, 2, 1, 3) == 17); assert(func0(18, 16, 3, 6) == 6); printf("All test cases passed.\n"); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x30,%rsp mov %edi,-0x24(%rbp) mov %esi,-0x28(%rbp) mov %edx,-0x2c(%rbp) mov %ecx,-0x30(%rbp) mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax mov %rsp,%rax mov %rax,%rsi mov -0x24(%rbp),%eax add $0xa,%eax movslq %eax,%rdx sub $0...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_24], edi mov [rbp+var_28], esi mov [rbp+var_2C], edx mov [rbp+var_30], ecx mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax mov rax, rsp mov rsi, rax mov eax, [rbp+var_24] add eax, 0Ah movsxd rdx, eax...
long long func0(int a1, int a2, int a3, int a4) { unsigned long long v4; // rax void *v5; // rsp int v6; // eax int v7; // eax int v8; // eax int v10; // [rsp+8h] [rbp-30h] BYREF int v11; // [rsp+Ch] [rbp-2Ch] int v12; // [rsp+10h] [rbp-28h] int v13; // [rsp+14h] [rbp-24h] int i; // [rsp+18h] [rbp-...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV dword ptr [RBP + -0x24],EDI MOV dword ptr [RBP + -0x28],ESI MOV dword ptr [RBP + -0x2c],EDX MOV dword ptr [RBP + -0x30],ECX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX MOV RAX,RSP MOV RSI,RAX MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0xa MOVS...
int4 func0(int param_1,int param_2,int param_3,int param_4) { long lVar1; int iVar2; ulong uVar3; int *piVar4; long in_FS_OFFSET; int local_38; int local_34; int local_30; int local_2c; int local_28; int local_24; long local_20; int *local_18; long local_10; local_2c = param_1; local...
7,777
func0
#include <stdio.h> #include <assert.h>
int func0(int n, int a, int b, int c) { int dp[n + 10]; for (int i = 0; i < n + 10; i++) { dp[i] = -1; } dp[0] = 0; for (int i = 0; i <= n; i++) { if (dp[i] != -1) { if (i + a <= n) { dp[i + a] = (dp[i] + 1 > dp[i + a]) ? dp[i] + 1 : dp[i + ...
int main() { assert(func0(7, 5, 2, 5) == 2); assert(func0(17, 2, 1, 3) == 17); assert(func0(18, 16, 3, 6) == 6); printf("All test cases passed.\n"); return 0; }
O1
c
func0: endbr64 push %rbp mov %rsp,%rbp push %r14 push %r13 push %r12 push %rbx sub $0x10,%rsp mov %fs:0x28,%rax mov %rax,-0x28(%rbp) xor %eax,%eax lea 0xa(%rdi),%eax cltq lea 0xf(,%rax,4),%rax mov %rax,%r8 and $0xfffffffffffffff0,%r8 and $0xfffffffffffff000,%rax mov %rsp,%rbx ...
func0: endbr64 push rbp mov rbp, rsp push r13 push r12 push rbx sub rsp, 18h mov r10d, esi mov r8d, ecx mov rax, fs:28h mov [rbp+var_28], rax xor eax, eax lea eax, [rdi+0Ah] cdqe lea rax, ds:0Fh[rax*4] mov rsi, rax and rsi, 0FFFFFFFFFFFFFFF0h and rax, 0FFFFFFF...
long long func0(int a1, int a2, int a3, int a4) { signed long long v6; // rax void *v7; // rsp _DWORD *v8; // rax int *v9; // rsi int v10; // eax int v12; // edx int v13; // ebx int v14; // r8d int v15; // r12d int v16; // r11d int v17; // r10d _DWORD v20[2]; // [rsp+8h] [rbp-30h] BYREF unsig...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R10D,ESI MOV R8D,ECX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX XOR EAX,EAX LEA EAX,[RDI + 0xa] CDQE LEA RAX,[0xf + RAX*0x4] MOV RSI,RAX AND RSI,-0x10 AND RAX,-0x1000 MOV RCX,RSP SUB RCX,RAX LAB_001011cf: CMP RSP,RCX JZ 0x0...
int4 func0(int param_1,int param_2,int param_3,int param_4) { long lVar1; int iVar2; ulong uVar3; int4 *puVar4; int iVar5; int1 *puVar6; int *piVar7; int iVar8; long in_FS_OFFSET; int1 auStack_38 [8]; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); uVar3 = (long)(param_1 + 10) * ...
7,778
func0
#include <stdio.h> #include <assert.h>
int func0(int n, int a, int b, int c) { int dp[n + 10]; for (int i = 0; i < n + 10; i++) { dp[i] = -1; } dp[0] = 0; for (int i = 0; i <= n; i++) { if (dp[i] != -1) { if (i + a <= n) { dp[i + a] = (dp[i] + 1 > dp[i + a]) ? dp[i] + 1 : dp[i + ...
int main() { assert(func0(7, 5, 2, 5) == 2); assert(func0(17, 2, 1, 3) == 17); assert(func0(18, 16, 3, 6) == 6); printf("All test cases passed.\n"); return 0; }
O2
c
func0: endbr64 push %rbp mov %rsp,%rbp push %r13 push %r12 push %rbx sub $0x18,%rsp mov %fs:0x28,%rax mov %rax,-0x28(%rbp) xor %eax,%eax lea 0xa(%rdi),%eax mov %rsp,%rbx cltq lea 0xf(,%rax,4),%rax mov %rax,%r8 and $0xfffffffffffff000,%rax sub %rax,%rbx and $0xfffffffffffffff0...
func0: endbr64 push rbp mov rbp, rsp push r15 push r14 mov r14d, edi push r13 mov r13d, ecx push r12 mov r12d, edx push rbx mov ebx, esi sub rsp, 18h mov rax, fs:28h mov [rbp+var_38], rax xor eax, eax lea eax, [rdi+0Ah] mov rcx, rsp cdqe lea rax, ds:0Fh[...
long long func0(int a1, int a2, int a3, int a4) { long long v7; // rdx _DWORD *v8; // rcx __int16 v9; // dx signed long long v10; // rdx void *v11; // rsp int *v12; // r8 long long v14; // rbx int *v15; // rax int v16; // esi int v17; // ecx int v18; // edi int v19; // r9d int v20; // edi i...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 MOV R14D,EDI PUSH R13 MOV R13D,ECX PUSH R12 MOV R12D,EDX PUSH RBX MOV EBX,ESI SUB RSP,0x18 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x38],RAX XOR EAX,EAX LEA EAX,[RDI + 0xa] MOV RCX,RSP CDQE LEA RAX,[0xf + RAX*0x4] MOV RDX,RAX AND RAX,-0x1000 SUB RCX,RAX AN...
int func0(int param_1,int param_2,int param_3,int param_4) { long lVar1; int1 *puVar2; int *piVar3; int *piVar4; ulong uVar5; int1 *puVar6; int iVar8; int iVar9; long in_FS_OFFSET; int1 auStack_48 [8]; long local_40; int1 *puVar7; puVar6 = auStack_48; local_40 = *(long *)(in_FS_OFFSET + ...
7,779
func0
#include <stdio.h> #include <assert.h>
int func0(int n, int a, int b, int c) { int dp[n + 10]; for (int i = 0; i < n + 10; i++) { dp[i] = -1; } dp[0] = 0; for (int i = 0; i <= n; i++) { if (dp[i] != -1) { if (i + a <= n) { dp[i + a] = (dp[i] + 1 > dp[i + a]) ? dp[i] + 1 : dp[i + ...
int main() { assert(func0(7, 5, 2, 5) == 2); assert(func0(17, 2, 1, 3) == 17); assert(func0(18, 16, 3, 6) == 6); printf("All test cases passed.\n"); return 0; }
O3
c
func0: endbr64 push %rbp mov %rsp,%rbp push %r15 mov %ecx,%r15d push %r14 push %r13 mov %edx,%r13d push %r12 mov %esi,%r12d push %rbx mov %edi,%ebx sub $0x18,%rsp mov %fs:0x28,%rax mov %rax,-0x38(%rbp) xor %eax,%eax lea 0xa(%rdi),%eax mov %rsp,%rdi cltq lea 0xf(,%rax,4),%...
func0: endbr64 push rbp mov rbp, rsp push r15 push r14 movsxd r14, edi push r13 mov r13d, edx lea edx, [r14+0Ah] push r12 mov r12d, esi push rbx mov ebx, ecx sub rsp, 18h mov rax, fs:28h mov [rbp+var_38], rax xor eax, eax movsxd rax, edx mov rsi, rsp lea r...
long long func0(int a1, int a2, int a3, int a4) { long long v4; // r14 long long v8; // rcx _DWORD *v9; // rsi __int16 v10; // cx signed long long v11; // rcx void *v12; // rsp _DWORD *v13; // rcx _DWORD *v14; // rax int *v15; // rdx int v16; // eax int v17; // esi int v18; // edi int v19; //...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 MOVSXD R14,EDI PUSH R13 MOV R13D,EDX LEA EDX,[R14 + 0xa] PUSH R12 MOV R12D,ESI PUSH RBX MOV EBX,ECX SUB RSP,0x18 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x38],RAX XOR EAX,EAX MOVSXD RAX,EDX MOV RSI,RSP LEA RAX,[0xf + RAX*0x4] MOV RCX,RAX AND RAX,-0x1000 SU...
int func0(int param_1,int param_2,int param_3,int param_4) { long lVar1; int iVar2; int *puVar3; int *piVar4; ulong uVar5; int *piVar6; int *puVar7; int iVar9; int iVar10; long in_FS_OFFSET; int auStack_48 [8]; long local_40; int *puVar8; puVar7 = auStack_48; local_40 = *(long *)(in_FS...
7,780
func0
#include <stdio.h> #include <assert.h> typedef struct { int a; int b; int c; int d; } Tuple;
Tuple func0(Tuple test_tup1, Tuple test_tup2) { Tuple res; res.a = test_tup1.a; res.b = test_tup1.b; res = (Tuple){res.a, res.b, test_tup2.a, test_tup2.b}; return res; }
int main() { Tuple t1 = {3, 4}; Tuple t2 = {5, 6}; Tuple result = func0(t1, t2); assert(result.a == 3 && result.b == 4 && result.c == 5 && result.d == 6); Tuple t3 = {1, 2}; Tuple t4 = {3, 4}; result = func0(t3, t4); assert(result.a == 1 && result.b == 2 && result.c == 3 &&...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp push %rbx mov %rsi,%rax mov %rdi,%r8 mov %r8,%rsi mov %r9,%rdi mov %rax,%rdi mov %rsi,-0x30(%rbp) mov %rdi,-0x28(%rbp) mov %rdx,-0x40(%rbp) mov %rcx,-0x38(%rbp) mov -0x30(%rbp),%eax mov %eax,-0x20(%rbp) mov -0x2c(%rbp),%eax mov %eax,-0...
func0: endbr64 push rbp mov rbp, rsp push rbx mov rax, rdi mov r8, rsi mov rsi, rax mov rdi, rdx mov rdi, r8 mov [rbp+var_30], rsi mov [rbp+var_28], rdi mov [rbp+var_40], rdx mov [rbp+var_38], rcx mov eax, dword ptr [rbp+var_30] mov dword ptr [rbp+var_20], eax mov ...
long long func0(long long a1) { return a1; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX MOV RAX,RDI MOV R8,RSI MOV RSI,RAX MOV RDI,RDX MOV RDI,R8 MOV qword ptr [RBP + -0x30],RSI MOV qword ptr [RBP + -0x28],RDI MOV qword ptr [RBP + -0x40],RDX MOV qword ptr [RBP + -0x38],RCX MOV EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x20],EAX MOV EAX,dword ptr [RBP + ...
int [16] func0(int8 param_1,int8 param_2,int8 param_3) { int auVar1 [16]; int4 local_48; int4 uStack_44; local_48 = (int4)param_3; uStack_44 = (int4)((ulong)param_3 >> 0x20); auVar1._8_4_ = local_48; auVar1._0_8_ = param_1; auVar1._12_4_ = uStack_44; return auVar1; }
7,781
func0
#include <stdio.h> #include <assert.h> typedef struct { int a; int b; int c; int d; } Tuple;
Tuple func0(Tuple test_tup1, Tuple test_tup2) { Tuple res; res.a = test_tup1.a; res.b = test_tup1.b; res = (Tuple){res.a, res.b, test_tup2.a, test_tup2.b}; return res; }
int main() { Tuple t1 = {3, 4}; Tuple t2 = {5, 6}; Tuple result = func0(t1, t2); assert(result.a == 3 && result.b == 4 && result.c == 5 && result.d == 6); Tuple t3 = {1, 2}; Tuple t4 = {3, 4}; result = func0(t3, t4); assert(result.a == 1 && result.b == 2 && result.c == 3 &&...
O1
c
func0: endbr64 mov %rdi,%rax shr $0x20,%rax shl $0x20,%rax mov %rax,%rcx mov %edi,%eax or %rcx,%rax mov %rdx,%rcx shr $0x20,%rcx shl $0x20,%rcx mov %edx,%edx or %rcx,%rdx retq
func0: endbr64 mov rcx, rdi shr rcx, 20h shl rcx, 20h mov eax, edi or rax, rcx mov rcx, rdx shr rcx, 20h shl rcx, 20h mov edx, edx or rdx, rcx retn
unsigned long long func0(unsigned long long a1) { return (HIDWORD(a1) << 32) | (unsigned int)a1; }
func0: ENDBR64 MOV RCX,RDI SHR RCX,0x20 SHL RCX,0x20 MOV EAX,EDI OR RAX,RCX MOV RCX,RDX SHR RCX,0x20 SHL RCX,0x20 MOV EDX,EDX OR RDX,RCX RET
int1 [16] func0(int8 param_1,int8 param_2,int8 param_3) { int1 auVar1 [16]; auVar1._8_8_ = param_3; auVar1._0_8_ = param_1; return auVar1; }