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
6,882
func0
#include <stdio.h> #include <assert.h>
int func0(char* X, char* Y, char* Z, int m, int n, int o) { int L[m+1][n+1][o+1]; int i, j, k; for (i = 0; i <= m; i++) { for (j = 0; j <= n; j++) { for (k = 0; k <= o; k++) { if (i == 0 || j == 0 || k == 0) { L[i][j][k] = 0; ...
int main() { // Testing the implementation with assertions assert(func0("AGGT12", "12TXAYB", "12XBA", 6, 7, 5) == 2); assert(func0("Reels", "Reelsfor", "ReelsforReels", 5, 8, 13) == 5); assert(func0("abcd1e2", "bc12ea", "bd1ea", 7, 6, 5) == 3); printf("All tests passed!\n"); return 0; }
O2
c
func0: endbr64 push %rbp mov %rsp,%rbp push %r15 mov %r9d,%r15d push %r14 push %r13 mov %rdi,%r13 push %r12 push %rbx mov %rsi,%rbx sub $0x78,%rsp mov %rdx,-0x60(%rbp) mov %ecx,%edx lea 0x1(%r8),%ecx mov %r8d,-0x7c(%rbp) movslq %ecx,%rcx mov %fs:0x28,%rax mov %rax,-0x38(%rbp...
func0: endbr64 push rbp mov r11, rsi mov rbp, rsp push r15 push r14 mov r14d, r9d push r13 push r12 push rbx mov rbx, rdi sub rsp, 68h mov [rbp+var_60], rdx mov edx, ecx lea ecx, [r9+1] mov [rbp+var_74], r8d movsxd rcx, ecx mov rdi, rsp mov rax, fs:28h mov ...
long long func0(long long a1, long long a2, long long a3, int a4, int a5, int a6) { long long v10; // rcx long long v11; // rax long long v12; // rcx unsigned long long *v13; // rdi __int16 v14; // cx signed long long v15; // rcx void *v16; // rsp _BYTE *v17; // rbx long long v18; // r13 long long ...
func0: ENDBR64 PUSH RBP MOV R11,RSI MOV RBP,RSP PUSH R15 PUSH R14 MOV R14D,R9D PUSH R13 PUSH R12 PUSH RBX MOV RBX,RDI SUB RSP,0x68 MOV qword ptr [RBP + -0x60],RDX MOV EDX,ECX LEA ECX,[R9 + 0x1] MOV dword ptr [RBP + -0x74],R8D MOVSXD RCX,ECX MOV RDI,RSP MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x38],RAX XOR EAX...
int4 func0(long param_1,long param_2,long param_3,int param_4,int param_5,int param_6) { long lVar1; ulong *puVar2; long lVar3; ulong uVar4; ulong uVar5; int *piVar6; int iVar7; char *pcVar8; ulong *puVar9; int *piVar11; long lVar12; int *piVar13; long lVar14; long in_FS_OFFSET; bool bVar...
6,883
func0
#include <stdio.h> #include <assert.h>
int func0(char* X, char* Y, char* Z, int m, int n, int o) { int L[m+1][n+1][o+1]; int i, j, k; for (i = 0; i <= m; i++) { for (j = 0; j <= n; j++) { for (k = 0; k <= o; k++) { if (i == 0 || j == 0 || k == 0) { L[i][j][k] = 0; ...
int main() { // Testing the implementation with assertions assert(func0("AGGT12", "12TXAYB", "12XBA", 6, 7, 5) == 2); assert(func0("Reels", "Reelsfor", "ReelsforReels", 5, 8, 13) == 5); assert(func0("abcd1e2", "bc12ea", "bd1ea", 7, 6, 5) == 3); printf("All tests passed!\n"); return 0; }
O3
c
func0: endbr64 push %rbp movslq %r8d,%rax mov %rsp,%rbp push %r15 push %r14 push %r13 mov %rdi,%r13 movslq %r9d,%rdi push %r12 push %rbx mov %rsi,%rbx sub $0x68,%rsp mov %rdx,-0x58(%rbp) mov %ecx,%edx mov %rsp,%r15 mov %fs:0x28,%rcx mov %rcx,-0x38(%rbp) xor %ecx,%ecx lea 0x1...
func0: endbr64 push rbp mov r10d, ecx lea ecx, [r9+1] mov r11, rsi movsxd rcx, ecx mov eax, r9d mov rbp, rsp push r15 push r14 lea r14, ds:0[rcx*4] push r13 push r12 push rbx mov rbx, rdi sub rsp, 68h mov [rbp+var_58], rdx mov [rbp+var_7C], r8d mov rdi, rsp...
long long func0(long long a1, long long a2, long long a3, unsigned int a4, unsigned int a5, unsigned int a6) { long long v8; // rcx unsigned int v9; // eax unsigned long long v10; // r14 long long v12; // rdx long long v13; // rcx _BYTE *v14; // rdi __int16 v15; // cx signed long long v16; // rcx voi...
func0: ENDBR64 PUSH RBP MOV R10D,ECX LEA ECX,[R9 + 0x1] MOV R11,RSI MOVSXD RCX,ECX MOV EAX,R9D MOV RBP,RSP PUSH R15 PUSH R14 LEA R14,[RCX*0x4] PUSH R13 PUSH R12 PUSH RBX MOV RBX,RDI SUB RSP,0x68 MOV qword ptr [RBP + -0x58],RDX MOV dword ptr [RBP + -0x7c],R8D MOV RDI,RSP MOV RDX,qword ptr FS:[0x28] MOV qword ptr [RBP + ...
int4 func0(long param_1,long param_2,long param_3,uint param_4,uint param_5,uint param_6) { long lVar1; int *puVar2; long lVar3; ulong uVar4; int iVar5; ulong uVar6; ulong uVar7; char *pcVar8; int *puVar9; int *piVar11; int *piVar12; ulong uVar13; ulong uVar14; ulong uVar15; int *piVar16;...
6,884
func0
#include <stdio.h> #include <string.h> #include <assert.h> #include <regex.h>
void func0(const char *str1, char *result) { regex_t regex; regmatch_t matches[3]; // We need 3 groups: the complete match, \1, and \2 char buffer[1024]; regcomp(&regex, "([a-z])([A-Z])", REG_EXTENDED); strcpy(buffer, str1); const char *cursor = buffer; result[0] = '\0'; ...
int main() { char result[1024]; func0("Python", result); assert(strcmp(result, "Python") == 0); func0("PythonProgrammingExamples", result); assert(strcmp(result, "Python Programming Examples") == 0); func0("GetReadyToBeCodingFreak", result); assert(strcmp(result, "Get Ready To B...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x490,%rsp mov %rdi,-0x488(%rbp) mov %rsi,-0x490(%rbp) mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax lea -0x470(%rbp),%rax mov $0x1,%edx lea 0xd80(%rip),%rsi mov %rax,%rdi callq 1120 <regcomp@plt> mov -0x488(%rbp),%rdx lea -0x41...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 490h mov [rbp+src], rdi mov [rbp+s], rsi mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax lea rax, [rbp+preg] mov edx, 1; cflags lea rcx, pattern; "([a-z])([A-Z])" mov rsi, rcx; pattern mov rdi, rax; preg call _regcomp ...
unsigned long long func0(const char *a1, char *a2) { int i; // eax const char *string; // [rsp+18h] [rbp-478h] regex_t preg; // [rsp+20h] [rbp-470h] BYREF regmatch_t pmatch; // [rsp+60h] [rbp-430h] BYREF int v7; // [rsp+6Ch] [rbp-424h] int v8; // [rsp+70h] [rbp-420h] char dest[1032]; // [rsp+80h] [rbp-41...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x490 MOV qword ptr [RBP + -0x488],RDI MOV qword ptr [RBP + -0x490],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX LEA RAX,[RBP + -0x470] MOV EDX,0x1 LEA RCX,[0x102008] MOV RSI,RCX MOV RDI,RAX CALL 0x00101140 MOV RDX,qword ptr [RBP + -0x488] LEA RA...
void func0(char *param_1,char *param_2) { int iVar1; size_t sVar2; long in_FS_OFFSET; char *local_480; regex_t local_478; regmatch_t local_438; int local_42c; int local_428; char local_418 [1032]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); regcomp(&local_478,"([a-z])([A-Z])",1...
6,885
func0
#include <stdio.h> #include <string.h> #include <assert.h> #include <regex.h>
void func0(const char *str1, char *result) { regex_t regex; regmatch_t matches[3]; // We need 3 groups: the complete match, \1, and \2 char buffer[1024]; regcomp(&regex, "([a-z])([A-Z])", REG_EXTENDED); strcpy(buffer, str1); const char *cursor = buffer; result[0] = '\0'; ...
int main() { char result[1024]; func0("Python", result); assert(strcmp(result, "Python") == 0); func0("PythonProgrammingExamples", result); assert(strcmp(result, "Python Programming Examples") == 0); func0("GetReadyToBeCodingFreak", result); assert(strcmp(result, "Get Ready To B...
O1
c
func0: endbr64 push %r12 push %rbp push %rbx sub $0x470,%rsp mov %rdi,%r12 mov %rsi,%rbp mov %fs:0x28,%rax mov %rax,0x468(%rsp) xor %eax,%eax mov %rsp,%rdi mov $0x1,%edx lea 0xda4(%rip),%rsi callq 1100 <regcomp@plt> lea 0x60(%rsp),%rbx mov $0x400,%edx mov %r12,%rsi mov %rbx...
func0: endbr64 push r12 push rbp push rbx sub rsp, 470h mov r12, rdi mov rbp, rsi mov rax, fs:28h mov [rsp+488h+var_20], rax xor eax, eax mov rdi, rsp mov edx, 1 lea rsi, aAZAZ; "([a-z])([A-Z])" call _regcomp lea rbx, [rsp+488h+var_428] mov edx, 400h mov rsi, ...
unsigned long long func0(long long a1, _BYTE *a2) { _BYTE *v2; // rbx _BYTE v4[64]; // [rsp+0h] [rbp-488h] BYREF _BYTE v5[12]; // [rsp+40h] [rbp-448h] BYREF int v6; // [rsp+4Ch] [rbp-43Ch] int v7; // [rsp+50h] [rbp-438h] _BYTE v8[1032]; // [rsp+60h] [rbp-428h] BYREF unsigned long long v9; // [rsp+468h] [...
func0: ENDBR64 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x470 MOV R12,RDI MOV RBP,RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x468],RAX XOR EAX,EAX MOV RDI,RSP MOV EDX,0x1 LEA RSI,[0x102004] CALL 0x00101130 LEA RBX,[RSP + 0x60] MOV EDX,0x400 MOV RSI,R12 MOV RDI,RBX CALL 0x00101160 MOV byte ptr [RBP],0x0 LEA R12,[RS...
void func0(int8 param_1,char *param_2) { int iVar1; size_t sVar2; char *__string; long in_FS_OFFSET; regex_t rStack_488; regmatch_t local_448; int local_43c; int local_438; char local_428 [1032]; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); regcomp(&rStack_488,"([a-z])([A-Z])",1...
6,886
func0
#include <stdio.h> #include <string.h> #include <assert.h> #include <regex.h>
void func0(const char *str1, char *result) { regex_t regex; regmatch_t matches[3]; // We need 3 groups: the complete match, \1, and \2 char buffer[1024]; regcomp(&regex, "([a-z])([A-Z])", REG_EXTENDED); strcpy(buffer, str1); const char *cursor = buffer; result[0] = '\0'; ...
int main() { char result[1024]; func0("Python", result); assert(strcmp(result, "Python") == 0); func0("PythonProgrammingExamples", result); assert(strcmp(result, "Python Programming Examples") == 0); func0("GetReadyToBeCodingFreak", result); assert(strcmp(result, "Get Ready To B...
O2
c
func0: endbr64 push %r14 mov $0x1,%edx mov %rdi,%r14 push %r13 push %r12 mov %rsi,%r12 lea 0xc18(%rip),%rsi push %rbp push %rbx sub $0x470,%rsp mov %fs:0x28,%rax mov %rax,0x468(%rsp) xor %eax,%eax mov %rsp,%r13 lea 0x60(%rsp),%rbp lea 0x40(%rsp),%rbx mov %r13,%rdi callq 11...
func0: endbr64 push r14 mov edx, 1 mov r14, rdi push r13 push r12 mov r12, rsi lea rsi, aAZAZ; "([a-z])([A-Z])" push rbp push rbx sub rsp, 470h mov rax, fs:28h mov [rsp+498h+var_30], rax xor eax, eax mov r13, rsp lea rbp, [rsp+498h+var_438] lea rbx, [rsp+498h+v...
unsigned long long func0(long long a1, _BYTE *a2) { _BYTE *v2; // rbp _BYTE v4[64]; // [rsp+0h] [rbp-498h] BYREF _BYTE v5[12]; // [rsp+40h] [rbp-458h] BYREF int v6; // [rsp+4Ch] [rbp-44Ch] int v7; // [rsp+50h] [rbp-448h] _BYTE v8[1032]; // [rsp+60h] [rbp-438h] BYREF unsigned long long v9; // [rsp+468h] [...
func0: ENDBR64 PUSH R14 MOV EDX,0x1 MOV R14,RDI PUSH R13 PUSH R12 MOV R12,RSI LEA RSI,[0x102004] PUSH RBP PUSH RBX SUB RSP,0x470 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x468],RAX XOR EAX,EAX MOV R13,RSP LEA RBP,[RSP + 0x60] LEA RBX,[RSP + 0x40] MOV RDI,R13 CALL 0x00101120 MOV EDX,0x400 MOV RSI,R14 MOV RDI,RBP...
void func0(int8 param_1,char *param_2) { int iVar1; size_t sVar2; char *__string; long in_FS_OFFSET; regex_t rStack_498; regmatch_t local_458; int local_44c; int local_448; char local_438 [1032]; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); __string = local_438; regcomp(&rStac...
6,887
func0
#include <stdio.h> #include <string.h> #include <assert.h> #include <regex.h>
void func0(const char *str1, char *result) { regex_t regex; regmatch_t matches[3]; // We need 3 groups: the complete match, \1, and \2 char buffer[1024]; regcomp(&regex, "([a-z])([A-Z])", REG_EXTENDED); strcpy(buffer, str1); const char *cursor = buffer; result[0] = '\0'; ...
int main() { char result[1024]; func0("Python", result); assert(strcmp(result, "Python") == 0); func0("PythonProgrammingExamples", result); assert(strcmp(result, "Python Programming Examples") == 0); func0("GetReadyToBeCodingFreak", result); assert(strcmp(result, "Get Ready To B...
O3
c
func0: endbr64 push %r14 mov $0x1,%edx mov %rdi,%r14 push %r13 push %r12 mov %rsi,%r12 lea 0xc18(%rip),%rsi push %rbp push %rbx sub $0x470,%rsp mov %fs:0x28,%rax mov %rax,0x468(%rsp) xor %eax,%eax mov %rsp,%r13 lea 0x60(%rsp),%rbp lea 0x40(%rsp),%rbx mov %r13,%rdi callq 11...
func0: endbr64 push r13 mov edx, 1; cflags mov r13, rdi push r12 push rbp mov rbp, rsi lea rsi, pattern; "([a-z])([A-Z])" push rbx sub rsp, 478h mov rax, fs:28h mov [rsp+498h+var_30], rax xor eax, eax mov r12, rsp lea rbx, [rsp+498h+src] mov rdi, r12; preg call ...
unsigned long long func0(long long a1, char *a2) { char *v2; // rbx regex_t v4; // [rsp+0h] [rbp-498h] BYREF regmatch_t pmatch; // [rsp+40h] [rbp-458h] BYREF int v6; // [rsp+4Ch] [rbp-44Ch] int v7; // [rsp+50h] [rbp-448h] char src[1032]; // [rsp+60h] [rbp-438h] BYREF unsigned long long v9; // [rsp+468h] ...
func0: ENDBR64 PUSH R13 MOV EDX,0x1 MOV R13,RDI PUSH R12 PUSH RBP MOV RBP,RSI LEA RSI,[0x102004] PUSH RBX SUB RSP,0x478 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x468],RAX XOR EAX,EAX MOV R12,RSP LEA RBX,[RSP + 0x60] MOV RDI,R12 CALL 0x00101120 MOV RSI,R13 MOV EDX,0x400 MOV RDI,RBX CALL 0x00101140 LEA R13,[RSP ...
void func0(int8 param_1,char *param_2) { int iVar1; size_t sVar2; char *__string; long in_FS_OFFSET; regex_t rStack_498; regmatch_t local_458; int local_44c; int local_448; char local_438 [1032]; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); __string = local_438; regcomp(&rStac...
6,888
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> int int_cmp(const void* a, const void* b) { int int_a = *((int*)a); int int_b = *((int*)b); return int_a - int_b; }
int* func0(const char* nums_str[], int size) { int *result = malloc(size * sizeof(int)); if (!result) { perror("Malloc failed"); exit(EXIT_FAILURE); } for (int i = 0; i < size; i++) { result[i] = atoi(nums_str[i]); } qsort(result, size, sizeof(int), int_cmp); ...
int main() { const char* test1[] = {"4","12","45","7","0","100","200","-12","-500"}; int expected1[] = {-500, -12, 0, 4, 7, 12, 45, 100, 200}; int *sorted1 = func0(test1, 9); for (int i = 0; i < 9; i++) { assert(sorted1[i] == expected1[i]); } free(sorted1); const char* test...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x28,%rsp mov %rdi,-0x28(%rbp) mov %esi,-0x2c(%rbp) mov -0x2c(%rbp),%eax cltq shl $0x2,%rax mov %rax,%rdi callq 1100 <malloc@plt> mov %rax,-0x18(%rbp) cmpq $0x0,-0x18(%rbp) jne 1299 <func0+0x46> lea 0xd7e(%rip),%rdi callq 1110 <...
func0: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 28h mov [rbp+var_28], rdi mov [rbp+var_2C], esi mov eax, [rbp+var_2C] cdqe shl rax, 2 mov rdi, rax; size call _malloc mov [rbp+base], rax cmp [rbp+base], 0 jnz short loc_129C lea rax, s; "Malloc failed" mov r...
_DWORD * func0(long long a1, int a2) { int i; // [rsp+14h] [rbp-1Ch] _DWORD *base; // [rsp+18h] [rbp-18h] base = malloc(4LL * a2); if ( !base ) { perror("Malloc failed"); exit(1); } for ( i = 0; i < a2; ++i ) base[i] = atoi(*(const char **)(8LL * i + a1)); qsort(base, a2, 4uLL, int_cmp); ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x28 MOV qword ptr [RBP + -0x28],RDI MOV dword ptr [RBP + -0x2c],ESI MOV EAX,dword ptr [RBP + -0x2c] CDQE SHL RAX,0x2 MOV RDI,RAX CALL 0x00101100 MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x18],0x0 JNZ 0x0010129c LEA RAX,[0x102004] MOV RDI,RAX CALL 0x0010...
void * func0(long param_1,int param_2) { int iVar1; void *__base; int local_24; __base = malloc((long)param_2 << 2); if (__base == (void *)0x0) { perror("Malloc failed"); /* WARNING: Subroutine does not return */ exit(1); } for (local_24 = 0; local_24 < param_2; local_24 = ...
6,889
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> int int_cmp(const void* a, const void* b) { int int_a = *((int*)a); int int_b = *((int*)b); return int_a - int_b; }
int* func0(const char* nums_str[], int size) { int *result = malloc(size * sizeof(int)); if (!result) { perror("Malloc failed"); exit(EXIT_FAILURE); } for (int i = 0; i < size; i++) { result[i] = atoi(nums_str[i]); } qsort(result, size, sizeof(int), int_cmp); ...
int main() { const char* test1[] = {"4","12","45","7","0","100","200","-12","-500"}; int expected1[] = {-500, -12, 0, 4, 7, 12, 45, 100, 200}; int *sorted1 = func0(test1, 9); for (int i = 0; i < 9; i++) { assert(sorted1[i] == expected1[i]); } free(sorted1); const char* test...
O1
c
func0: endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x8,%rsp mov %rdi,%r12 mov %esi,%r15d movslq %esi,%r14 lea 0x0(,%r14,4),%rdi callq 1110 <malloc@plt> test %rax,%rax je 12bc <func0+0x8a> mov %rax,%rbp lea -0x1(%r15),%r13d mov $0x0,%ebx test %r15d,%...
func0: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 8 mov r12, rdi mov r15d, esi movsxd r14, esi lea rdi, ds:0[r14*4] call _malloc test rax, rax jz short loc_12B8 mov rbp, rax mov r13d, r15d mov ebx, 0 test r15d, r15d jle short l...
long long func0(long long a1, int a2) { long long v2; // rax long long v3; // rbp long long v4; // rbx v2 = malloc(4LL * a2); if ( !v2 ) { perror("Malloc failed"); exit(1LL); } v3 = v2; v4 = 0LL; if ( a2 > 0 ) { do { *(_DWORD *)(v3 + 4 * v4) = strtol(*(_QWORD *)(a1 + 8 * v4...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x8 MOV R12,RDI MOV R15D,ESI MOVSXD R14,ESI LEA RDI,[R14*0x4] CALL 0x00101110 TEST RAX,RAX JZ 0x001012b8 MOV RBP,RAX MOV R13D,R15D MOV EBX,0x0 TEST R15D,R15D JLE 0x0010128f LAB_0010126f: MOV RDI,qword ptr [R12 + RBX*0x8] MOV EDX,0xa MOV ESI,0x...
void * func0(long param_1,uint param_2) { void *__base; long lVar1; ulong uVar2; __base = malloc((long)(int)param_2 * 4); if (__base != (void *)0x0) { uVar2 = 0; if (0 < (int)param_2) { do { lVar1 = strtol(*(char **)(param_1 + uVar2 * 8),(char **)0x0,10); *(int *)((long)__bas...
6,890
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> int int_cmp(const void* a, const void* b) { int int_a = *((int*)a); int int_b = *((int*)b); return int_a - int_b; }
int* func0(const char* nums_str[], int size) { int *result = malloc(size * sizeof(int)); if (!result) { perror("Malloc failed"); exit(EXIT_FAILURE); } for (int i = 0; i < size; i++) { result[i] = atoi(nums_str[i]); } qsort(result, size, sizeof(int), int_cmp); ...
int main() { const char* test1[] = {"4","12","45","7","0","100","200","-12","-500"}; int expected1[] = {-500, -12, 0, 4, 7, 12, 45, 100, 200}; int *sorted1 = func0(test1, 9); for (int i = 0; i < 9; i++) { assert(sorted1[i] == expected1[i]); } free(sorted1); const char* test...
O2
c
func0: endbr64 push %r15 push %r14 movslq %esi,%r14 push %r13 push %r12 push %rbp mov %rdi,%rbp lea 0x0(,%r14,4),%rdi push %rbx sub $0x8,%rsp callq 1110 <malloc@plt> test %rax,%rax je 175a <func0+0x8a> mov %rax,%r12 lea -0x1(%r14),%r13d xor %ebx,%ebx test %r14d,%r14d jle 1731 <...
func0: endbr64 push r14 push r13 mov r13, rdi push r12 push rbp movsxd rbp, esi push rbx lea rdi, ds:0[rbp*4] call _malloc test rax, rax jz short loc_1741 mov r12, rax xor ebx, ebx test ebp, ebp jle short loc_171E nop dword ptr [rax] loc_1700: mov rdi, [r13+rbx*...
long long func0(long long a1, int a2) { long long v2; // rax long long v3; // r12 long long v4; // rbx v2 = malloc(4LL * a2); if ( !v2 ) { perror("Malloc failed"); exit(1LL); } v3 = v2; v4 = 0LL; if ( a2 > 0 ) { do { *(_DWORD *)(v3 + 4 * v4) = strtol(*(_QWORD *)(a1 + 8 * v4...
func0: ENDBR64 PUSH R14 PUSH R13 MOV R13,RDI PUSH R12 PUSH RBP MOVSXD RBP,ESI PUSH RBX LEA RDI,[RBP*0x4] CALL 0x00101110 TEST RAX,RAX JZ 0x00101741 MOV R12,RAX XOR EBX,EBX TEST EBP,EBP JLE 0x0010171e NOP dword ptr [RAX] LAB_00101700: MOV RDI,qword ptr [R13 + RBX*0x8] MOV EDX,0xa XOR ESI,ESI CALL 0x00101100 MOV dword pt...
void * func0(long param_1,int param_2) { void *__base; long lVar1; size_t sVar2; size_t __nmemb; __nmemb = (size_t)param_2; __base = malloc(__nmemb * 4); if (__base != (void *)0x0) { sVar2 = 0; if (0 < param_2) { do { lVar1 = strtol(*(char **)(param_1 + sVar2 * 8),(char **)0x0,10...
6,891
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> int int_cmp(const void* a, const void* b) { int int_a = *((int*)a); int int_b = *((int*)b); return int_a - int_b; }
int* func0(const char* nums_str[], int size) { int *result = malloc(size * sizeof(int)); if (!result) { perror("Malloc failed"); exit(EXIT_FAILURE); } for (int i = 0; i < size; i++) { result[i] = atoi(nums_str[i]); } qsort(result, size, sizeof(int), int_cmp); ...
int main() { const char* test1[] = {"4","12","45","7","0","100","200","-12","-500"}; int expected1[] = {-500, -12, 0, 4, 7, 12, 45, 100, 200}; int *sorted1 = func0(test1, 9); for (int i = 0; i < 9; i++) { assert(sorted1[i] == expected1[i]); } free(sorted1); const char* test...
O3
c
func0: endbr64 push %r15 push %r14 movslq %esi,%r14 push %r13 push %r12 push %rbp mov %rdi,%rbp lea 0x0(,%r14,4),%rdi push %rbx sub $0x8,%rsp callq 1110 <malloc@plt> test %rax,%rax je 17ca <func0+0x8a> mov %rax,%r12 lea -0x1(%r14),%r13d xor %ebx,%ebx test %r14d,%r14d jle 17a1 <...
func0: endbr64 push r14 push r13 movsxd r13, esi push r12 push rbp push rbx mov rbx, rdi lea rdi, ds:0[r13*4]; size call _malloc test rax, rax jz func0_cold mov r12, rax test r13d, r13d jle short loc_17AF mov rbp, rax lea r14, [rbx+r13*8] nop word ptr [rax+rax+0...
void * func0(const char **a1, int a2) { const char **v2; // rbx void *v3; // rax void *v4; // r12 _DWORD *v5; // rbp const char **v6; // r14 const char *v7; // rdi v2 = a1; v3 = malloc(4LL * a2); if ( !v3 ) func0_cold(); v4 = v3; if ( a2 > 0 ) { v5 = v3; v6 = &a1[a2]; do { ...
func0: ENDBR64 PUSH R14 PUSH R13 MOVSXD R13,ESI PUSH R12 PUSH RBP PUSH RBX MOV RBX,RDI LEA RDI,[R13*0x4] CALL 0x00101110 TEST RAX,RAX JZ 0x00101140 MOV R12,RAX TEST R13D,R13D JLE 0x001017af MOV RBP,RAX LEA R14,[RBX + R13*0x8] NOP word ptr [RAX + RAX*0x1] LAB_00101790: MOV RDI,qword ptr [RBX] MOV EDX,0xa XOR ESI,ESI ADD...
int4 * func0(int8 *param_1,int param_2) { int8 *puVar1; char *__nptr; int4 *__base; long lVar2; int4 *puVar3; size_t __nmemb; __nmemb = (size_t)param_2; __base = (int4 *)malloc(__nmemb * 4); if (__base != (int4 *)0x0) { if (0 < param_2) { puVar1 = param_1 + __nmemb; puVar3 = __base...
6,892
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h>
int* func0(int* test_list, int list_size, int* test_tup, int tup_size, int* new_size) { *new_size = list_size + tup_size; int* result = malloc(*new_size * sizeof(int)); for (int i = 0; i < list_size; i++) { result[i] = test_list[i]; } for (int i = 0; i < tup_size; i++) { res...
int main() { int test_list1[] = {5, 6, 7}; int test_tup1[] = {9, 10}; int new_size1; int* result1 = func0(test_list1, 3, test_tup1, 2, &new_size1); assert(new_size1 == 5 && result1[0] == 5 && result1[1] == 6 && result1[2] == 7 && result1[3] == 9 && result1[4] == 10); free(result1); ...
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 %ecx,-0x20(%rbp) mov %r8,-0x30(%rbp) mov -0x1c(%rbp),%edx mov -0x20(%rbp),%eax add %eax,%edx mov -0x30(%rbp),%rax mov %edx,(%rax) mov -0x30(%rbp),%rax 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 [rbp+var_20], ecx mov [rbp+var_30], r8 mov edx, [rbp+var_1C] mov eax, [rbp+var_20] add edx, eax mov rax, [rbp+var_30] mov [rax], edx mov rax, [rb...
_DWORD * func0(long long a1, int a2, long long a3, int a4, int *a5) { int i; // [rsp+20h] [rbp-10h] int j; // [rsp+24h] [rbp-Ch] _DWORD *v10; // [rsp+28h] [rbp-8h] *a5 = a4 + a2; v10 = malloc(4LL * *a5); for ( i = 0; i < a2; ++i ) v10[i] = *(_DWORD *)(4LL * i + a1); for ( j = 0; j < a4; ++j ) v10...
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 dword ptr [RBP + -0x20],ECX MOV qword ptr [RBP + -0x30],R8 MOV EDX,dword ptr [RBP + -0x1c] MOV EAX,dword ptr [RBP + -0x20] ADD EDX,EAX MOV RAX,qword ptr [RBP + -0x30] MOV ...
void * func0(long param_1,int param_2,long param_3,int param_4,int *param_5) { void *pvVar1; int4 local_18; int4 local_14; *param_5 = param_2 + param_4; pvVar1 = malloc((long)*param_5 << 2); for (local_18 = 0; local_18 < param_2; local_18 = local_18 + 1) { *(int4 *)((long)pvVar1 + (long)local_18 * 4...
6,893
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h>
int* func0(int* test_list, int list_size, int* test_tup, int tup_size, int* new_size) { *new_size = list_size + tup_size; int* result = malloc(*new_size * sizeof(int)); for (int i = 0; i < list_size; i++) { result[i] = test_list[i]; } for (int i = 0; i < tup_size; i++) { res...
int main() { int test_list1[] = {5, 6, 7}; int test_tup1[] = {9, 10}; int new_size1; int* result1 = func0(test_list1, 3, test_tup1, 2, &new_size1); assert(new_size1 == 5 && result1[0] == 5 && result1[1] == 6 && result1[2] == 7 && result1[3] == 9 && result1[4] == 10); free(result1); ...
O1
c
func0: endbr64 push %r13 push %r12 push %rbp push %rbx sub $0x8,%rsp mov %rdi,%rbp mov %esi,%r12d mov %rdx,%rbx mov %ecx,%r13d lea (%rsi,%rcx,1),%edi mov %edi,(%r8) movslq %edi,%rdi shl $0x2,%rdi callq 10b0 <malloc@plt> test %r12d,%r12d jle 11f7 <func0+0x4e> lea -0x1(%r12),%esi ...
func0: endbr64 push r13 push r12 push rbp push rbx sub rsp, 8 mov r12, rdi mov r13d, esi mov rbp, rdx mov ebx, ecx lea edi, [rsi+rcx] mov [r8], edi movsxd rdi, edi shl rdi, 2 call _malloc test r13d, r13d jle short loc_11F1 mov esi, r13d mov edx, 0 loc_11E1:...
long long func0(long long a1, int a2, long long a3, int a4, _DWORD *a5) { long long result; // rax long long i; // rdx long long v9; // rdx *a5 = a2 + a4; result = malloc(4LL * (a2 + a4)); if ( a2 > 0 ) { for ( i = 0LL; i != a2; ++i ) *(_DWORD *)(result + 4 * i) = *(_DWORD *)(a1 + 4 * i); } ...
func0: ENDBR64 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x8 MOV R12,RDI MOV R13D,ESI MOV RBP,RDX MOV EBX,ECX LEA EDI,[RSI + RCX*0x1] MOV dword ptr [R8],EDI MOVSXD RDI,EDI SHL RDI,0x2 CALL 0x001010b0 TEST R13D,R13D JLE 0x001011f1 MOV ESI,R13D MOV EDX,0x0 LAB_001011e1: MOV ECX,dword ptr [R12 + RDX*0x4] MOV dword ptr [...
void func0(long param_1,uint param_2,long param_3,uint param_4,int *param_5) { void *pvVar1; ulong uVar2; *param_5 = param_2 + param_4; pvVar1 = malloc((long)(int)(param_2 + param_4) << 2); if (0 < (int)param_2) { uVar2 = 0; do { *(int4 *)((long)pvVar1 + uVar2 * 4) = *(int4 *)(param_1 + uVar...
6,894
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h>
int* func0(int* test_list, int list_size, int* test_tup, int tup_size, int* new_size) { *new_size = list_size + tup_size; int* result = malloc(*new_size * sizeof(int)); for (int i = 0; i < list_size; i++) { result[i] = test_list[i]; } for (int i = 0; i < tup_size; i++) { res...
int main() { int test_list1[] = {5, 6, 7}; int test_tup1[] = {9, 10}; int new_size1; int* result1 = func0(test_list1, 3, test_tup1, 2, &new_size1); assert(new_size1 == 5 && result1[0] == 5 && result1[1] == 6 && result1[2] == 7 && result1[3] == 9 && result1[4] == 10); free(result1); ...
O2
c
func0: endbr64 push %r13 mov %ecx,%r13d push %r12 movslq %esi,%r12 push %rbp mov %rdi,%rbp lea (%r12,%rcx,1),%edi push %rbx mov %rdx,%rbx sub $0x8,%rsp mov %edi,(%r8) movslq %edi,%rdi shl $0x2,%rdi callq 10b0 <malloc@plt> test %r12d,%r12d jle 1415 <func0+0x55> lea -0x1(%r12),%edx x...
func0: endbr64 push r14 mov r14, rdi push r13 push r12 mov r12, rdx push rbp movsxd rbp, esi lea edi, [rbp+rcx+0] push rbx mov ebx, ecx mov [r8], edi movsxd rdi, edi shl rdi, 2 call _malloc mov r13, rax test ebp, ebp jle short loc_1423 movsxd rdx, ebp mov rsi,...
long long func0(long long a1, int a2, long long a3, int a4, _DWORD *a5) { long long v7; // rax long long v8; // r13 *a5 = a2 + a4; v7 = malloc(4LL * (a2 + a4)); v8 = v7; if ( a2 > 0 ) memcpy(v7, a1, 4LL * a2); if ( a4 > 0 ) memcpy(v8 + 4LL * a2, a3, 4LL * a4); return v8; }
func0: ENDBR64 PUSH R14 MOV R14,RDI PUSH R13 PUSH R12 MOV R12,RDX PUSH RBP MOVSXD RBP,ESI LEA EDI,[RBP + RCX*0x1] PUSH RBX MOV EBX,ECX MOV dword ptr [R8],EDI MOVSXD RDI,EDI SHL RDI,0x2 CALL 0x001010d0 MOV R13,RAX TEST EBP,EBP JLE 0x00101423 MOVSXD RDX,EBP MOV RSI,R14 MOV RDI,RAX SHL RDX,0x2 CALL 0x001010c0 LAB_00101423...
void * func0(void *param_1,int param_2,void *param_3,int param_4,int *param_5) { void *__dest; *param_5 = param_2 + param_4; __dest = malloc((long)(param_2 + param_4) << 2); if (0 < param_2) { memcpy(__dest,param_1,(long)param_2 << 2); } if (0 < param_4) { memcpy((void *)((long)__dest + (long)pa...
6,895
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h>
int* func0(int* test_list, int list_size, int* test_tup, int tup_size, int* new_size) { *new_size = list_size + tup_size; int* result = malloc(*new_size * sizeof(int)); for (int i = 0; i < list_size; i++) { result[i] = test_list[i]; } for (int i = 0; i < tup_size; i++) { res...
int main() { int test_list1[] = {5, 6, 7}; int test_tup1[] = {9, 10}; int new_size1; int* result1 = func0(test_list1, 3, test_tup1, 2, &new_size1); assert(new_size1 == 5 && result1[0] == 5 && result1[1] == 6 && result1[2] == 7 && result1[3] == 9 && result1[4] == 10); free(result1); ...
O3
c
func0: endbr64 push %r14 mov %rdi,%r14 push %r13 push %r12 mov %ecx,%r12d push %rbp mov %rdx,%rbp push %rbx movslq %esi,%rbx lea (%rbx,%rcx,1),%edi mov %edi,(%r8) movslq %edi,%rdi shl $0x2,%rdi callq 10d0 <malloc@plt> mov %rax,%r13 test %ebx,%ebx jle 1427 <func0+0x47> lea -0x1(%r...
func0: endbr64 push r14 mov r14, rdi lea edi, [rsi+rcx] push r13 push r12 mov r12, rdx push rbp mov ebp, esi push rbx mov ebx, ecx mov [r8], edi movsxd rdi, edi shl rdi, 2; size call _malloc mov r13, rax test ebp, ebp jle short loc_1410 mov edx, ebp mov ...
char * func0(void *src, int a2, const void *a3, int a4, _DWORD *a5) { char *v7; // rax char *v8; // r13 *a5 = a2 + a4; v7 = (char *)malloc(4LL * (a2 + a4)); v8 = v7; if ( a2 > 0 ) memcpy(v7, src, 4LL * (unsigned int)a2); if ( a4 > 0 ) memcpy(&v8[4 * a2], a3, 4LL * (unsigned int)a4); return v8; ...
func0: ENDBR64 PUSH R14 MOV R14,RDI LEA EDI,[RSI + RCX*0x1] PUSH R13 PUSH R12 MOV R12,RDX PUSH RBP MOV EBP,ESI PUSH RBX MOV EBX,ECX MOV dword ptr [R8],EDI MOVSXD RDI,EDI SHL RDI,0x2 CALL 0x001010d0 MOV R13,RAX TEST EBP,EBP JLE 0x00101410 MOV EDX,EBP MOV RSI,R14 MOV RDI,RAX SHL RDX,0x2 CALL 0x001010c0 LAB_00101410: TEST...
void * func0(void *param_1,uint param_2,void *param_3,uint param_4,int *param_5) { void *__dest; *param_5 = param_2 + param_4; __dest = malloc((long)(int)(param_2 + param_4) << 2); if (0 < (int)param_2) { memcpy(__dest,param_1,(ulong)param_2 << 2); } if (0 < (int)param_4) { memcpy((void *)((long...
6,896
func0
#include <stdbool.h> #include <assert.h>
bool func0(int arr[], int n, int i) { if (2 * i + 2 > n) { return true; } bool left_child = (arr[i] <= arr[2 * i + 1]) && func0(arr, n, 2 * i + 1); bool right_child = (2 * i + 2 == n) || (arr[i] <= arr[2 * i + 2] && func0(arr, n, 2 * i + 2)); ...
int main() { int arr1[] = {1, 2, 3, 4, 5, 6}; int arr2[] = {2, 3, 4, 5, 10, 15}; int arr3[] = {2, 10, 4, 5, 3, 15}; assert(func0(arr1, 6, 0) == true); assert(func0(arr2, 6, 0) == true); assert(func0(arr3, 6, 0) == false); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x20,%rsp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) mov %edx,-0x20(%rbp) mov -0x20(%rbp),%eax add $0x1,%eax add %eax,%eax cmp %eax,-0x1c(%rbp) jge 1196 <func0+0x2d> mov $0x1,%eax jmpq 128b <func0+0x122> mov -0x20(%rbp),%eax cltq lea ...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_20], edx mov eax, [rbp+var_20] add eax, 1 add eax, eax cmp [rbp+var_1C], eax jge short loc_1196 mov eax, 1 jmp locret_128B loc_1196: mov eax, [rbp+var_20] cdq...
long long func0(long long a1, unsigned int a2, int a3) { bool v4; // al bool v5; // al bool v8; // [rsp+1Eh] [rbp-2h] if ( (int)a2 < 2 * (a3 + 1) ) return 1LL; v4 = *(_DWORD *)(4LL * a3 + a1) <= *(_DWORD *)(4 * (2 * a3 + 1LL) + a1) && (unsigned __int8)func0(a1, a2, (unsigned int)(2 * a3 + 1)); v8 ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV dword ptr [RBP + -0x20],EDX MOV EAX,dword ptr [RBP + -0x20] ADD EAX,0x1 ADD EAX,EAX CMP dword ptr [RBP + -0x1c],EAX JGE 0x00101196 MOV EAX,0x1 JMP 0x0010128b LAB_00101196: MOV EAX,dword ptr [RBP + -0x20]...
int4 func0(long param_1,int param_2,int param_3) { char cVar1; bool bVar2; bool bVar3; int4 uVar4; if (param_2 < (param_3 + 1) * 2) { uVar4 = 1; } else { if ((*(int *)(param_1 + ((long)(param_3 * 2) + 1) * 4) < *(int *)(param_1 + (long)param_3 * 4)) || (cVar1 = func0(param_1,param_2,par...
6,897
func0
#include <stdbool.h> #include <assert.h>
bool func0(int arr[], int n, int i) { if (2 * i + 2 > n) { return true; } bool left_child = (arr[i] <= arr[2 * i + 1]) && func0(arr, n, 2 * i + 1); bool right_child = (2 * i + 2 == n) || (arr[i] <= arr[2 * i + 2] && func0(arr, n, 2 * i + 2)); ...
int main() { int arr1[] = {1, 2, 3, 4, 5, 6}; int arr2[] = {2, 3, 4, 5, 10, 15}; int arr3[] = {2, 10, 4, 5, 3, 15}; assert(func0(arr1, 6, 0) == true); assert(func0(arr2, 6, 0) == true); assert(func0(arr3, 6, 0) == false); return 0; }
O1
c
func0: endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x8,%rsp lea 0x2(%rdx,%rdx,1),%r12d mov $0x1,%eax cmp %esi,%r12d jg 11c7 <func0+0x5e> mov %rdi,%rbx mov %esi,%ebp movslq %edx,%rdx mov (%rdi,%rdx,4),%r15d lea -0x2(%r12),%r14d movslq %r14d,%r14 mov ...
func0: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 8 lea r12d, [rdx+rdx+2] mov eax, 1 cmp r12d, esi jg short loc_11C7 mov rbx, rdi mov ebp, esi movsxd rdx, edx mov r15d, [rdi+rdx*4] lea r14d, [r12-2] movsxd r14, r14d mov r13d, 0 cmp...
long long func0(long long a1, long long a2, int a3) { int v3; // r12d long long result; // rax int v5; // r15d long long v6; // r14 unsigned __int8 v7; // r13 char v8; // al v3 = 2 * a3 + 2; result = 1LL; if ( v3 <= (int)a2 ) { v5 = *(_DWORD *)(a1 + 4LL * a3); v6 = 2 * a3; v7 = 0; ...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x8 LEA R12D,[RDX + RDX*0x1 + 0x2] MOV EAX,0x1 CMP R12D,ESI JG 0x001011c7 MOV RBX,RDI MOV EBP,ESI MOVSXD RDX,EDX MOV R15D,dword ptr [RDI + RDX*0x4] LEA R14D,[R12 + -0x2] MOVSXD R14,R14D MOV R13D,0x0 CMP R15D,dword ptr [RDI + R14*0x4 + 0x4] JLE...
byte func0(long param_1,ulong param_2,int param_3) { int iVar1; int iVar2; int iVar3; byte bVar4; byte bVar5; iVar3 = param_3 * 2; iVar2 = iVar3 + 2; bVar4 = 1; if (iVar2 <= (int)param_2) { iVar1 = *(int *)(param_1 + (long)param_3 * 4); bVar4 = 0; if (iVar1 <= *(int *)(param_1 + 4 + (l...
6,898
func0
#include <stdbool.h> #include <assert.h>
bool func0(int arr[], int n, int i) { if (2 * i + 2 > n) { return true; } bool left_child = (arr[i] <= arr[2 * i + 1]) && func0(arr, n, 2 * i + 1); bool right_child = (2 * i + 2 == n) || (arr[i] <= arr[2 * i + 2] && func0(arr, n, 2 * i + 2)); ...
int main() { int arr1[] = {1, 2, 3, 4, 5, 6}; int arr2[] = {2, 3, 4, 5, 10, 15}; int arr3[] = {2, 10, 4, 5, 3, 15}; assert(func0(arr1, 6, 0) == true); assert(func0(arr2, 6, 0) == true); assert(func0(arr3, 6, 0) == false); return 0; }
O2
c
func0: endbr64 push %r15 mov $0x1,%eax push %r14 push %r13 lea 0x2(%rdx,%rdx,1),%r13d push %r12 push %rbp push %rbx sub $0x8,%rsp cmp %esi,%r13d jg 1313 <func0+0x53> lea -0x2(%r13),%ebx movslq %edx,%rdx mov %rdi,%rbp mov %esi,%r12d movslq %ebx,%rbx mov (%rdi,%rdx,4),%r15d xor ...
func0: endbr64 push r15 mov eax, 1 push r14 push r13 lea r13d, [rdx+rdx+2] push r12 push rbp push rbx sub rsp, 8 cmp r13d, esi jg short loc_130D lea ebx, [r13-2] movsxd rdx, edx mov rbp, rdi mov r12d, esi movsxd rbx, ebx mov r15d, [rdi+rdx*4] xor r14d, r14d c...
long long func0(long long a1, long long a2, int a3) { long long result; // rax int v4; // r13d long long v5; // rbx int v6; // r15d char v7; // r14 result = 1LL; v4 = 2 * a3 + 2; if ( v4 <= (int)a2 ) { v5 = 2 * a3; v6 = *(_DWORD *)(a1 + 4LL * a3); v7 = 0; if ( v6 <= *(_DWORD *)(a1 + ...
func0: ENDBR64 PUSH R15 MOV EAX,0x1 PUSH R14 PUSH R13 LEA R13D,[RDX + RDX*0x1 + 0x2] PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x8 CMP R13D,ESI JG 0x0010130d LEA EBX,[R13 + -0x2] MOVSXD RDX,EDX MOV RBP,RDI MOV R12D,ESI MOVSXD RBX,EBX MOV R15D,dword ptr [RDI + RDX*0x4] XOR R14D,R14D CMP R15D,dword ptr [RDI + RBX*0x4 + 0x4] JLE...
byte func0(long param_1,ulong param_2,int param_3) { int iVar1; int iVar2; int iVar3; byte bVar4; byte bVar5; iVar3 = param_3 * 2; iVar2 = iVar3 + 2; if ((int)param_2 < iVar2) { return 1; } iVar1 = *(int *)(param_1 + (long)param_3 * 4); bVar5 = 0; if (iVar1 <= *(int *)(param_1 + 4 + (lon...
6,899
func0
#include <stdbool.h> #include <assert.h>
bool func0(int arr[], int n, int i) { if (2 * i + 2 > n) { return true; } bool left_child = (arr[i] <= arr[2 * i + 1]) && func0(arr, n, 2 * i + 1); bool right_child = (2 * i + 2 == n) || (arr[i] <= arr[2 * i + 2] && func0(arr, n, 2 * i + 2)); ...
int main() { int arr1[] = {1, 2, 3, 4, 5, 6}; int arr2[] = {2, 3, 4, 5, 10, 15}; int arr3[] = {2, 10, 4, 5, 3, 15}; assert(func0(arr1, 6, 0) == true); assert(func0(arr2, 6, 0) == true); assert(func0(arr3, 6, 0) == false); return 0; }
O3
c
func0: endbr64 push %r15 mov $0x1,%eax push %r14 push %r13 lea 0x2(%rdx,%rdx,1),%r13d push %r12 push %rbp push %rbx sub $0x8,%rsp cmp %esi,%r13d jg 12df <func0+0x4f> lea -0x2(%r13),%ebx movslq %edx,%rdx mov %rdi,%rbp mov %esi,%r12d movslq %ebx,%rbx mov (%rdi,%rdx,4),%r14d xor ...
func0: endbr64 push r14 mov eax, 1 push r13 push r12 lea r12d, [rdx+rdx+2] push rbp push rbx cmp r12d, esi jg short loc_12CB movsxd rdx, edx mov rbx, rdi mov ebp, esi xor eax, eax mov r13d, [rdi+rdx*4] lea edx, [r12-2] xor r14d, r14d movsxd rdx, edx cmp r13d...
long long func0(long long a1, long long a2, int a3) { long long result; // rax int v4; // r12d int v5; // r13d unsigned __int8 v6; // r14 result = 1LL; v4 = 2 * a3 + 2; if ( v4 <= (int)a2 ) { result = 0LL; v5 = *(_DWORD *)(a1 + 4LL * a3); v6 = 0; if ( v5 <= *(_DWORD *)(a1 + 8LL * a3 + ...
func0: ENDBR64 PUSH R14 MOV EAX,0x1 PUSH R13 PUSH R12 LEA R12D,[RDX + RDX*0x1 + 0x2] PUSH RBP PUSH RBX CMP R12D,ESI JG 0x001012cb MOVSXD RDX,EDX MOV RBX,RDI MOV EBP,ESI XOR EAX,EAX MOV R13D,dword ptr [RDI + RDX*0x4] LEA EDX,[R12 + -0x2] XOR R14D,R14D MOVSXD RDX,EDX CMP R13D,dword ptr [RDI + RDX*0x4 + 0x4] JLE 0x001012d...
ulong func0(long param_1,ulong param_2,int param_3) { int iVar1; int iVar2; int iVar3; uint uVar4; ulong uVar5; uint uVar6; uVar5 = 1; iVar3 = param_3 * 2; iVar2 = iVar3 + 2; if (iVar2 <= (int)param_2) { uVar5 = 0; iVar1 = *(int *)(param_1 + (long)param_3 * 4); uVar6 = 0; if (iVa...
6,900
func0
#include <assert.h>
int func0(int n) { int dp[n + 1]; dp[0] = 0; dp[1] = 1; for (int i = 2; i <= n; i++) { dp[i] = dp[i - 1] + 2 * dp[i - 2]; } return dp[n]; }
int main() { assert(func0(5) == 11); assert(func0(2) == 1); assert(func0(4) == 5); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x38,%rsp mov %edi,-0x34(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax mov %rsp,%rax mov %rax,%rsi mov -0x34(%rbp),%eax add $0x1,%eax movslq %eax,%rdx sub $0x1,%rdx mov %rdx,-0x28(%rbp) movslq %eax,%rdx mov %rd...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_24], edi 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, 1 movsxd rdx, eax sub rdx, 1 mov [rbp+var_18], rdx cdqe lea rdx, ds:0[rax*4] mov ...
long long func0(int a1) { unsigned long long v1; // rax void *v2; // rsp _DWORD v4[3]; // [rsp+8h] [rbp-30h] BYREF int v5; // [rsp+14h] [rbp-24h] int i; // [rsp+1Ch] [rbp-1Ch] long long v7; // [rsp+20h] [rbp-18h] _DWORD *v8; // [rsp+28h] [rbp-10h] unsigned long long v9; // [rsp+30h] [rbp-8h] v5 = a1...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV dword ptr [RBP + -0x24],EDI 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,0x1 MOVSXD RDX,EAX SUB RDX,0x1 MOV qword ptr [RBP + -0x18],RDX CDQE LEA RDX,[RAX*0x4] MOV EAX,0x10 SUB R...
int4 func0(int param_1) { long lVar1; ulong uVar2; int *puVar3; long in_FS_OFFSET; int auStack_38 [12]; int local_2c; int local_24; long local_20; int *local_18; long local_10; local_2c = param_1; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_20 = (long)(param_1 + 1) + -1; uVar2 = (((...
6,901
func0
#include <assert.h>
int func0(int n) { int dp[n + 1]; dp[0] = 0; dp[1] = 1; for (int i = 2; i <= n; i++) { dp[i] = dp[i - 1] + 2 * dp[i - 2]; } return dp[n]; }
int main() { assert(func0(5) == 11); assert(func0(2) == 1); assert(func0(4) == 5); return 0; }
O1
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x10,%rsp mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax lea 0x1(%rdi),%eax cltq lea 0xf(,%rax,4),%rax mov %rax,%rdx and $0xfffffffffffffff0,%rdx and $0xfffffffffffff000,%rax mov %rsp,%rsi sub %rax,%rsi mov %rsi,%rax cmp %rax,%...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 10h mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax lea eax, [rdi+1] cdqe lea rax, ds:0Fh[rax*4] mov rcx, rax and rcx, 0FFFFFFFFFFFFFFF0h and rax, 0FFFFFFFFFFFFF000h mov rdx, rsp sub rdx, rax loc_11A4: cmp rsp, rdx jz...
long long func0(int a1) { signed long long v1; // rax void *v2; // rsp unsigned long long v3; // rax _BYTE *v4; // rax _BYTE v7[3]; // [rsp+8h] [rbp-10h] BYREF char v8; // [rsp+Bh] [rbp-Dh] BYREF unsigned long long v9; // [rsp+10h] [rbp-8h] v9 = __readfsqword(0x28u); while ( v7 != &v7[-((4LL * (a1 +...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX LEA EAX,[RDI + 0x1] CDQE LEA RAX,[0xf + RAX*0x4] MOV RCX,RAX AND RCX,-0x10 AND RAX,-0x1000 MOV RDX,RSP SUB RDX,RAX LAB_001011a4: CMP RSP,RDX JZ 0x001011bb SUB RSP,0x1000 OR qword ptr [RSP + 0xff8],0x0...
int4 func0(int param_1) { long lVar1; ulong uVar2; int *piVar3; int1 *puVar4; long in_FS_OFFSET; int1 auStack_18 [8]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); uVar2 = (long)(param_1 + 1) * 4 + 0xf; for (puVar4 = auStack_18; puVar4 != auStack_18 + -(uVar2 & 0xfffffffffffff000); ...
6,902
func0
#include <assert.h>
int func0(int n) { int dp[n + 1]; dp[0] = 0; dp[1] = 1; for (int i = 2; i <= n; i++) { dp[i] = dp[i - 1] + 2 * dp[i - 2]; } return dp[n]; }
int main() { assert(func0(5) == 11); assert(func0(2) == 1); assert(func0(4) == 5); return 0; }
O2
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x10,%rsp mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax lea 0x1(%rdi),%eax mov %rsp,%rsi cltq lea 0xf(,%rax,4),%rax mov %rax,%rdx and $0xfffffffffffff000,%rax sub %rax,%rsi and $0xfffffffffffffff0,%rdx mov %rsi,%rax cmp %rax,%...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 10h mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax lea eax, [rdi+1] mov rcx, rsp cdqe lea rax, ds:0Fh[rax*4] mov rdx, rax and rax, 0FFFFFFFFFFFFF000h sub rcx, rax and rdx, 0FFFFFFFFFFFFFFF0h cmp rsp, rcx jz shor...
long long func0(int a1) { long long v1; // rdx long long *v2; // rcx __int16 v3; // dx signed long long v4; // rdx void *v5; // rsp long long *v6; // rax int v7; // ecx int v8; // edx long long v10; // [rsp+0h] [rbp-1018h] long long v11; // [rsp+8h] [rbp-1010h] BYREF long long v12; // [rsp+10h] [...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX LEA EAX,[RDI + 0x1] MOV RCX,RSP CDQE LEA RAX,[0xf + RAX*0x4] MOV RDX,RAX AND RAX,-0x1000 SUB RCX,RAX AND RDX,-0x10 CMP RSP,RCX JZ 0x00101265 LAB_00101250: SUB RSP,0x1000 OR qword ptr [RSP + 0xff8],0x0...
int4 func0(int param_1) { long lVar1; int1 *puVar2; int *piVar3; int iVar4; int iVar5; ulong uVar6; int1 *puVar7; long in_FS_OFFSET; int1 auStack_18 [8]; long local_10; int1 *puVar8; puVar7 = auStack_18; local_10 = *(long *)(in_FS_OFFSET + 0x28); uVar6 = (long)(param_1 + 1) * 4 + 0xf; ...
6,903
func0
#include <assert.h>
int func0(int n) { int dp[n + 1]; dp[0] = 0; dp[1] = 1; for (int i = 2; i <= n; i++) { dp[i] = dp[i - 1] + 2 * dp[i - 2]; } return dp[n]; }
int main() { assert(func0(5) == 11); assert(func0(2) == 1); assert(func0(4) == 5); return 0; }
O3
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x10,%rsp mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax lea 0x1(%rdi),%eax mov %rsp,%rsi cltq lea 0xf(,%rax,4),%rax mov %rax,%rdx and $0xfffffffffffff000,%rax sub %rax,%rsi and $0xfffffffffffffff0,%rdx mov %rsi,%rax cmp %rax,%...
func0: endbr64 push rbp movsxd rcx, edi mov rbp, rsp sub rsp, 10h mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax lea eax, [rcx+1] mov rsi, rsp cdqe lea rax, ds:0Fh[rax*4] mov rdx, rax and rax, 0FFFFFFFFFFFFF000h sub rsi, rax and rdx, 0FFFFFFFFFFFFFFF0h cmp rsp,...
long long func0(int a1) { long long v1; // rcx long long v2; // rdx _QWORD *v3; // rsi __int16 v4; // dx signed long long v5; // rdx void *v6; // rsp long long v7; // rsi int v8; // r8d int v9; // edi long long v10; // rax _QWORD v13[511]; // [rsp+8h] [rbp-1010h] BYREF _QWORD v14[2]; // [rsp+10...
func0: ENDBR64 PUSH RBP MOVSXD RCX,EDI MOV RBP,RSP SUB RSP,0x10 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX LEA EAX,[RCX + 0x1] MOV RSI,RSP CDQE LEA RAX,[0xf + RAX*0x4] MOV RDX,RAX AND RAX,-0x1000 SUB RSI,RAX AND RDX,-0x10 CMP RSP,RSI JZ 0x001011b8 LAB_001011a3: SUB RSP,0x1000 OR qword ptr [R...
int4 func0(int param_1) { long lVar1; int *puVar2; int iVar3; ulong uVar4; int *puVar5; long lVar7; int iVar8; int iVar9; long in_FS_OFFSET; int auStack_18 [8]; long local_10; int *puVar6; puVar5 = auStack_18; local_10 = *(long *)(in_FS_OFFSET + 0x28); uVar4 = (long)(param_1 + 1) * 4 +...
6,904
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> #include <string.h> typedef struct pair { char* name; int value; } Pair; int compare_pairs(const void *a, const void *b) { Pair *pa = (Pair *)a; Pair *pb = (Pair *)b; return (pa->value - pb->value); }
Pair* func0(Pair arr[], int size, int K) { qsort(arr, size, sizeof(Pair), compare_pairs); Pair *res = malloc(K * sizeof(Pair)); for (int i = 0; i < K; ++i) { res[i] = arr[i]; } return res; }
int main() { Pair list1[] = {{"Manjeet", 10}, {"Akshat", 4}, {"Akash", 2}, {"Nikhil", 8}}; Pair list2[] = {{"Sanjeev", 11}, {"Angat", 5}, {"Akash", 3}, {"Nepin", 9}}; Pair list3[] = {{"tanmay", 14}, {"Amer", 11}, {"Ayesha", 9}, {"SKD", 16}}; Pair* result1 = func0(list1, 4, 2); assert(result1[...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x20,%rsp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) mov %edx,-0x20(%rbp) mov -0x1c(%rbp),%eax movslq %eax,%rsi mov -0x18(%rbp),%rax lea -0x5b(%rip),%rcx mov $0x10,%edx mov %rax,%rdi callq 10b0 <qsort@plt> mov -0x20(%rbp),%eax cltq shl $0...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 20h mov [rbp+base], rdi mov [rbp+var_1C], esi mov [rbp+var_20], edx mov eax, [rbp+var_1C] movsxd rsi, eax; nmemb mov rax, [rbp+base] lea rdx, compare_pairs mov rcx, rdx; compar mov edx, 10h; size mov rdi, rax; base call _qs...
char * func0(char *a1, int a2, int a3) { char *v3; // rax char *v4; // rcx long long v5; // rdx int i; // [rsp+14h] [rbp-Ch] char *v9; // [rsp+18h] [rbp-8h] qsort(a1, a2, 0x10uLL, compare_pairs); v9 = (char *)malloc(16LL * a3); for ( i = 0; i < a3; ++i ) { v3 = &a1[16 * i]; v4 = &v9[16 * i]; ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV dword ptr [RBP + -0x20],EDX MOV EAX,dword ptr [RBP + -0x1c] MOVSXD RSI,EAX MOV RAX,qword ptr [RBP + -0x18] LEA RDX,[0x1011e9] MOV RCX,RDX MOV EDX,0x10 MOV RDI,RAX CALL 0x001010b0 MOV EAX,dword ptr [RBP +...
void * func0(void *param_1,int param_2,int param_3) { int8 uVar1; void *pvVar2; int8 *puVar3; int8 *puVar4; int local_14; qsort(param_1,(long)param_2,0x10,compare_pairs); pvVar2 = malloc((long)param_3 << 4); for (local_14 = 0; local_14 < param_3; local_14 = local_14 + 1) { puVar3 = (int8 *)((lon...
6,905
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> #include <string.h> typedef struct pair { char* name; int value; } Pair; int compare_pairs(const void *a, const void *b) { Pair *pa = (Pair *)a; Pair *pb = (Pair *)b; return (pa->value - pb->value); }
Pair* func0(Pair arr[], int size, int K) { qsort(arr, size, sizeof(Pair), compare_pairs); Pair *res = malloc(K * sizeof(Pair)); for (int i = 0; i < K; ++i) { res[i] = arr[i]; } return res; }
int main() { Pair list1[] = {{"Manjeet", 10}, {"Akshat", 4}, {"Akash", 2}, {"Nikhil", 8}}; Pair list2[] = {{"Sanjeev", 11}, {"Angat", 5}, {"Akash", 3}, {"Nepin", 9}}; Pair list3[] = {{"tanmay", 14}, {"Amer", 11}, {"Ayesha", 9}, {"SKD", 16}}; Pair* result1 = func0(list1, 4, 2); assert(result1[...
O1
c
func0: endbr64 push %rbp push %rbx sub $0x8,%rsp mov %rdi,%rbx mov %edx,%ebp movslq %esi,%rsi lea -0x24(%rip),%rcx mov $0x10,%edx callq 10a0 <qsort@plt> movslq %ebp,%rdi shl $0x4,%rdi callq 10d0 <malloc@plt> test %ebp,%ebp jle 1229 <func0+0x55> lea -0x1(%rbp),%ecx add $0x1,%rcx shl ...
func0: endbr64 push rbp push rbx sub rsp, 8 mov rbp, rdi mov ebx, edx movsxd rsi, esi lea rcx, compare_pairs mov edx, 10h call _qsort movsxd rdi, ebx shl rdi, 4 call _malloc test ebx, ebx jle short loc_1245 mov ecx, ebx shl rcx, 4 mov edx, 0 loc_1232: movdqu xmm...
long long func0(long long a1, int a2, int a3) { long long result; // rax long long v5; // rdx qsort(a1, a2, 16LL, compare_pairs); result = malloc(16LL * a3); if ( a3 > 0 ) { v5 = 0LL; do { *(__m128i *)(result + v5) = _mm_loadu_si128((const __m128i *)(a1 + v5)); v5 += 16LL; } ...
func0: ENDBR64 PUSH RBP PUSH RBX SUB RSP,0x8 MOV RBP,RDI MOV EBX,EDX MOVSXD RSI,ESI LEA RCX,[0x1011e9] MOV EDX,0x10 CALL 0x001010b0 MOVSXD RDI,EBX SHL RDI,0x4 CALL 0x001010f0 TEST EBX,EBX JLE 0x00101245 MOV ECX,EBX SHL RCX,0x4 MOV EDX,0x0 LAB_00101232: MOVDQU XMM0,xmmword ptr [RBP + RDX*0x1] MOVUPS xmmword ptr [RAX + R...
void func0(void *param_1,int param_2,uint param_3) { int8 uVar1; void *pvVar2; long lVar3; qsort(param_1,(long)param_2,0x10,compare_pairs); pvVar2 = malloc((long)(int)param_3 << 4); if (0 < (int)param_3) { lVar3 = 0; do { uVar1 = ((int8 *)((long)param_1 + lVar3))[1]; *(int8 *)((long)...
6,906
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> #include <string.h> typedef struct pair { char* name; int value; } Pair; int compare_pairs(const void *a, const void *b) { Pair *pa = (Pair *)a; Pair *pb = (Pair *)b; return (pa->value - pb->value); }
Pair* func0(Pair arr[], int size, int K) { qsort(arr, size, sizeof(Pair), compare_pairs); Pair *res = malloc(K * sizeof(Pair)); for (int i = 0; i < K; ++i) { res[i] = arr[i]; } return res; }
int main() { Pair list1[] = {{"Manjeet", 10}, {"Akshat", 4}, {"Akash", 2}, {"Nikhil", 8}}; Pair list2[] = {{"Sanjeev", 11}, {"Angat", 5}, {"Akash", 3}, {"Nepin", 9}}; Pair list3[] = {{"tanmay", 14}, {"Amer", 11}, {"Ayesha", 9}, {"SKD", 16}}; Pair* result1 = func0(list1, 4, 2); assert(result1[...
O2
c
func0: endbr64 push %rbp movslq %esi,%rsi mov %edx,%ebp lea -0x21(%rip),%rcx push %rbx mov $0x10,%edx mov %rdi,%rbx sub $0x8,%rsp callq 10a0 <qsort@plt> movslq %ebp,%rdi shl $0x4,%rdi callq 10d0 <malloc@plt> test %ebp,%ebp jle 15e2 <func0+0x52> lea -0x1(%rbp),%ecx xor %edx,%edx add ...
func0: endbr64 push r12 movsxd r12, edx movsxd rsi, esi lea rcx, compare_pairs push rbp mov edx, 10h mov rbp, rdi push rbx mov rbx, r12 shl r12, 4 call _qsort mov rdi, r12 call _malloc mov r8, rax test ebx, ebx jle short loc_15E9 mov rdx, r12 mov rsi, rbp mov ...
long long func0(long long a1, int a2, int a3) { long long v4; // r12 long long v5; // rax long long v6; // rcx long long v7; // r8 v4 = 16LL * a3; qsort(a1, a2, 16LL, compare_pairs); v5 = malloc(v4); v7 = v5; if ( a3 > 0 ) return memcpy(v5, a1, v4, v6, v5); return v7; }
func0: ENDBR64 PUSH R12 MOVSXD R12,EDX MOVSXD RSI,ESI LEA RCX,[0x101590] PUSH RBP MOV EDX,0x10 MOV RBP,RDI PUSH RBX MOV RBX,R12 SHL R12,0x4 CALL 0x001010c0 MOV RDI,R12 CALL 0x00101110 MOV R8,RAX TEST EBX,EBX JLE 0x001015e9 MOV RDX,R12 MOV RSI,RBP MOV RDI,RAX CALL 0x00101100 MOV R8,RAX LAB_001015e9: POP RBX MOV RAX,R8 P...
void * func0(void *param_1,int param_2,int param_3) { void *__dest; qsort(param_1,(long)param_2,0x10,compare_pairs); __dest = malloc((long)param_3 << 4); if (0 < param_3) { __dest = memcpy(__dest,param_1,(long)param_3 << 4); } return __dest; }
6,907
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> #include <string.h> typedef struct pair { char* name; int value; } Pair; int compare_pairs(const void *a, const void *b) { Pair *pa = (Pair *)a; Pair *pb = (Pair *)b; return (pa->value - pb->value); }
Pair* func0(Pair arr[], int size, int K) { qsort(arr, size, sizeof(Pair), compare_pairs); Pair *res = malloc(K * sizeof(Pair)); for (int i = 0; i < K; ++i) { res[i] = arr[i]; } return res; }
int main() { Pair list1[] = {{"Manjeet", 10}, {"Akshat", 4}, {"Akash", 2}, {"Nikhil", 8}}; Pair list2[] = {{"Sanjeev", 11}, {"Angat", 5}, {"Akash", 3}, {"Nepin", 9}}; Pair list3[] = {{"tanmay", 14}, {"Amer", 11}, {"Ayesha", 9}, {"SKD", 16}}; Pair* result1 = func0(list1, 4, 2); assert(result1[...
O3
c
func0: endbr64 push %rbp movslq %esi,%rsi lea -0x1f(%rip),%rcx mov %rdi,%rbp push %rbx mov %edx,%ebx mov $0x10,%edx sub $0x8,%rsp callq 10b0 <qsort@plt> movslq %ebx,%rdi shl $0x4,%rdi callq 10f0 <malloc@plt> mov %rax,%r8 test %ebx,%ebx jle 15ff <func0+0x4f> lea -0x1(%rbx),%edx mov ...
func0: endbr64 push rbp lea rcx, compare_pairs; compar movsxd rsi, esi; nmemb mov rbp, rdi push rbx mov ebx, edx mov edx, 10h; size sub rsp, 8 call _qsort movsxd rdi, ebx shl rdi, 4; size call _malloc mov rcx, rax test ebx, ebx jle short loc_15EA mov edx, ebx mov ...
void * func0(void *src, int a2, int a3) { void *v4; // rax void *v5; // rcx qsort(src, a2, 0x10uLL, compare_pairs); v4 = malloc(16LL * a3); v5 = v4; if ( a3 > 0 ) return memcpy(v4, src, 16LL * (unsigned int)a3); return v5; }
func0: ENDBR64 PUSH RBP LEA RCX,[0x101590] MOVSXD RSI,ESI MOV RBP,RDI PUSH RBX MOV EBX,EDX MOV EDX,0x10 SUB RSP,0x8 CALL 0x001010c0 MOVSXD RDI,EBX SHL RDI,0x4 CALL 0x00101110 MOV RCX,RAX TEST EBX,EBX JLE 0x001015ea MOV EDX,EBX MOV RSI,RBP MOV RDI,RAX SHL RDX,0x4 CALL 0x00101100 MOV RCX,RAX LAB_001015ea: ADD RSP,0x8 MOV...
void * func0(void *param_1,int param_2,uint param_3) { void *__dest; qsort(param_1,(long)param_2,0x10,compare_pairs); __dest = malloc((long)(int)param_3 << 4); if (0 < (int)param_3) { __dest = memcpy(__dest,param_1,(ulong)param_3 << 4); } return __dest; }
6,908
func0
#include <stdio.h> #include <assert.h> #include <stdlib.h>
int* func0(int l1[], int l2[], int l3[], int len, int* resultSize) { int* result = (int*)malloc(len * sizeof(int)); *resultSize = 0; for (int i = 0; i < len; ++i) { if (l1[i] == l2[i] && l2[i] == l3[i]) { result[*resultSize] = l1[i]; (*resultSize)++; } } ...
int main() { int resultSize; // Test Case 1 int l1a[] = {1, 1, 3, 4, 5, 6, 7}; int l2a[] = {0, 1, 2, 3, 4, 5, 7}; int l3a[] = {0, 1, 2, 3, 4, 5, 7}; int* result1 = func0(l1a, l2a, l3a, 7, &resultSize); assert(resultSize == 2 && result1[0] == 1 && result1[1] == 7); free(result1)...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x40,%rsp mov %rdi,-0x18(%rbp) mov %rsi,-0x20(%rbp) mov %rdx,-0x28(%rbp) mov %ecx,-0x2c(%rbp) mov %r8,-0x38(%rbp) mov -0x2c(%rbp),%eax cltq shl $0x2,%rax mov %rax,%rdi callq 10b0 <malloc@plt> mov %rax,-0x8(%rbp) mov -0x38(%rbp),%rax movl...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_18], rdi mov [rbp+var_20], rsi mov [rbp+var_28], rdx mov [rbp+var_2C], ecx mov [rbp+var_38], r8 mov eax, [rbp+var_2C] cdqe shl rax, 2 mov rdi, rax; size call _malloc mov [rbp+var_8], rax mov rax, [rbp+va...
_DWORD * func0(long long a1, long long a2, long long a3, int a4, _DWORD *a5) { int i; // [rsp+34h] [rbp-Ch] _DWORD *v10; // [rsp+38h] [rbp-8h] v10 = malloc(4LL * a4); *a5 = 0; for ( i = 0; i < a4; ++i ) { if ( *(_DWORD *)(4LL * i + a1) == *(_DWORD *)(4LL * i + a2) && *(_DWORD *)(4LL * i + a2) == ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI MOV qword ptr [RBP + -0x28],RDX MOV dword ptr [RBP + -0x2c],ECX MOV qword ptr [RBP + -0x38],R8 MOV EAX,dword ptr [RBP + -0x2c] CDQE SHL RAX,0x2 MOV RDI,RAX CALL 0x001010b0 MOV qword ptr [RBP + -0x8],RAX MOV ...
void * func0(long param_1,long param_2,long param_3,int param_4,int *param_5) { void *pvVar1; int4 local_14; pvVar1 = malloc((long)param_4 << 2); *param_5 = 0; for (local_14 = 0; local_14 < param_4; local_14 = local_14 + 1) { if ((*(int *)(param_1 + (long)local_14 * 4) == *(int *)(param_2 + (long)loca...
6,909
func0
#include <stdio.h> #include <assert.h> #include <stdlib.h>
int* func0(int l1[], int l2[], int l3[], int len, int* resultSize) { int* result = (int*)malloc(len * sizeof(int)); *resultSize = 0; for (int i = 0; i < len; ++i) { if (l1[i] == l2[i] && l2[i] == l3[i]) { result[*resultSize] = l1[i]; (*resultSize)++; } } ...
int main() { int resultSize; // Test Case 1 int l1a[] = {1, 1, 3, 4, 5, 6, 7}; int l2a[] = {0, 1, 2, 3, 4, 5, 7}; int l3a[] = {0, 1, 2, 3, 4, 5, 7}; int* result1 = func0(l1a, l2a, l3a, 7, &resultSize); assert(resultSize == 2 && result1[0] == 1 && result1[1] == 7); free(result1)...
O1
c
func0: endbr64 push %r14 push %r13 push %r12 push %rbp push %rbx mov %rdi,%rbx mov %rsi,%rbp mov %rdx,%r13 mov %ecx,%r14d mov %r8,%r12 movslq %ecx,%rdi shl $0x2,%rdi callq 10b0 <malloc@plt> movl $0x0,(%r12) test %r14d,%r14d jle 121a <func0+0x71> lea -0x1(%r14),%edi mov $0x0,%ed...
func0: endbr64 push r14 push r13 push r12 push rbp push rbx mov rbx, rdi mov rbp, rsi mov r13, rdx mov r14d, ecx mov r12, r8 movsxd rdi, ecx shl rdi, 2 call _malloc mov dword ptr [r12], 0 test r14d, r14d jle short loc_1216 mov edi, r14d mov edx, 0 jmp sh...
long long func0(long long a1, long long a2, long long a3, int a4, int *a5) { long long result; // rax long long v10; // rdx int v11; // esi int v12; // ecx int v13; // ecx result = malloc(4LL * a4); *a5 = 0; if ( a4 > 0 ) { v10 = 0LL; do { v11 = *(_DWORD *)(a1 + 4 * v10); v12...
func0: ENDBR64 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV RBX,RDI MOV RBP,RSI MOV R13,RDX MOV R14D,ECX MOV R12,R8 MOVSXD RDI,ECX SHL RDI,0x2 CALL 0x001010b0 MOV dword ptr [R12],0x0 TEST R14D,R14D JLE 0x00101216 MOV EDI,R14D MOV EDX,0x0 JMP 0x001011f0 LAB_001011e7: ADD RDX,0x1 CMP RDX,RDI JZ 0x00101216 LAB_001011f...
void func0(long param_1,long param_2,long param_3,uint param_4,int *param_5) { int iVar1; int iVar2; void *pvVar3; ulong uVar4; pvVar3 = malloc((long)(int)param_4 << 2); *param_5 = 0; if (0 < (int)param_4) { uVar4 = 0; do { iVar1 = *(int *)(param_1 + uVar4 * 4); iVar2 = *(int *)(pa...
6,910
func0
#include <stdio.h> #include <assert.h> #include <stdlib.h>
int* func0(int l1[], int l2[], int l3[], int len, int* resultSize) { int* result = (int*)malloc(len * sizeof(int)); *resultSize = 0; for (int i = 0; i < len; ++i) { if (l1[i] == l2[i] && l2[i] == l3[i]) { result[*resultSize] = l1[i]; (*resultSize)++; } } ...
int main() { int resultSize; // Test Case 1 int l1a[] = {1, 1, 3, 4, 5, 6, 7}; int l2a[] = {0, 1, 2, 3, 4, 5, 7}; int l3a[] = {0, 1, 2, 3, 4, 5, 7}; int* result1 = func0(l1a, l2a, l3a, 7, &resultSize); assert(resultSize == 2 && result1[0] == 1 && result1[1] == 7); free(result1)...
O2
c
func0: endbr64 push %r14 mov %rdx,%r14 push %r13 mov %r8,%r13 push %r12 push %rbp mov %rsi,%rbp push %rbx mov %rdi,%rbx movslq %ecx,%rdi mov %rdi,%r12 shl $0x2,%rdi callq 10b0 <malloc@plt> movl $0x0,0x0(%r13) test %r12d,%r12d jle 1516 <func0+0x76> lea -0x1(%r12),%esi xor %ecx,%...
func0: endbr64 push r15 push r14 mov r14, rdx push r13 mov r13, r8 push r12 movsxd r12, ecx push rbp mov rbp, rsi push rbx mov rbx, rdi lea rdi, ds:0[r12*4] sub rsp, 8 call _malloc mov dword ptr [r13+0], 0 test r12d, r12d jle short loc_1512 xor edx, edx jmp ...
long long func0(long long a1, long long a2, long long a3, int a4, int *a5) { long long v7; // r12 long long result; // rax long long v10; // rdx int v11; // ecx int v12; // esi v7 = a4; result = malloc(4LL * a4); *a5 = 0; if ( (int)v7 > 0 ) { v10 = 0LL; do { while ( 1 ) { ...
func0: ENDBR64 PUSH R15 PUSH R14 MOV R14,RDX PUSH R13 MOV R13,R8 PUSH R12 MOVSXD R12,ECX PUSH RBP MOV RBP,RSI PUSH RBX MOV RBX,RDI LEA RDI,[R12*0x4] SUB RSP,0x8 CALL 0x001010b0 MOV dword ptr [R13],0x0 TEST R12D,R12D JLE 0x00101512 XOR EDX,EDX JMP 0x001014e9 LAB_001014e0: ADD RDX,0x1 CMP RDX,R12 JZ 0x00101512 LAB_001014...
void func0(long param_1,long param_2,long param_3,int param_4,int *param_5) { int iVar1; int iVar2; void *pvVar3; long lVar4; long lVar5; lVar5 = (long)param_4; pvVar3 = malloc(lVar5 * 4); *param_5 = 0; if (0 < param_4) { lVar4 = 0; do { while ((iVar1 = *(int *)(param_1 + lVar4 * 4),...
6,911
func0
#include <stdio.h> #include <assert.h> #include <stdlib.h>
int* func0(int l1[], int l2[], int l3[], int len, int* resultSize) { int* result = (int*)malloc(len * sizeof(int)); *resultSize = 0; for (int i = 0; i < len; ++i) { if (l1[i] == l2[i] && l2[i] == l3[i]) { result[*resultSize] = l1[i]; (*resultSize)++; } } ...
int main() { int resultSize; // Test Case 1 int l1a[] = {1, 1, 3, 4, 5, 6, 7}; int l2a[] = {0, 1, 2, 3, 4, 5, 7}; int l3a[] = {0, 1, 2, 3, 4, 5, 7}; int* result1 = func0(l1a, l2a, l3a, 7, &resultSize); assert(resultSize == 2 && result1[0] == 1 && result1[1] == 7); free(result1)...
O3
c
func0: endbr64 push %r14 mov %rdx,%r14 push %r13 mov %r8,%r13 push %r12 push %rbp mov %rsi,%rbp push %rbx mov %rdi,%rbx movslq %ecx,%rdi mov %rdi,%r12 shl $0x2,%rdi callq 10b0 <malloc@plt> movl $0x0,0x0(%r13) test %r12d,%r12d jle 14c6 <func0+0x76> lea -0x1(%r12),%esi xor %ecx,%...
func0: endbr64 push r15 push r14 mov r14, rdx push r13 mov r13, r8 push r12 mov r12, rsi push rbp mov rbp, rdi push rbx movsxd rbx, ecx mov r15, rbx shl rbx, 2 mov rdi, rbx; size sub rsp, 8 call _malloc mov dword ptr [r13+0], 0 test r15d, r15d jle short l...
_DWORD * func0(long long a1, long long a2, long long a3, int a4, int *a5) { size_t v9; // rbx _DWORD *result; // rax long long v11; // rdx int v12; // ecx int v13; // esi v9 = 4LL * a4; result = malloc(v9); *a5 = 0; if ( a4 > 0 ) { v11 = 0LL; do { while ( 1 ) { v12 =...
func0: ENDBR64 PUSH R15 PUSH R14 MOV R14,RDX PUSH R13 MOV R13,R8 PUSH R12 MOV R12,RSI PUSH RBP MOV RBP,RDI PUSH RBX MOVSXD RBX,ECX MOV R15,RBX SHL RBX,0x2 MOV RDI,RBX SUB RSP,0x8 CALL 0x001010b0 MOV dword ptr [R13],0x0 TEST R15D,R15D JLE 0x001014cb XOR EDX,EDX JMP 0x001014a1 LAB_00101498: ADD RDX,0x4 CMP RBX,RDX JZ 0x0...
void func0(long param_1,long param_2,long param_3,int param_4,int *param_5) { int iVar1; int iVar2; void *pvVar3; size_t sVar4; size_t __size; __size = (long)param_4 * 4; pvVar3 = malloc(__size); *param_5 = 0; if (0 < param_4) { sVar4 = 0; do { while ((iVar1 = *(int *)(param_1 + sVar...
6,912
func0
#include <stdio.h> #include <assert.h> #include <stdlib.h>
double func0(double* numbers, int length) { if (length < 2) { return -9999999; // representing None } int count = 0; for (int i = 0; i < length; i++) { for (int j = i + 1; j < length; j++) { if (numbers[j] == numbers[i]) { count += 1; ...
int main() { double arr1[] = {1, 2, -8, -2, 0, -2}; double arr2[] = {1, 1, -0.5, 0, 2, -2, -2}; double arr3[] = {2, 2}; assert(func0(arr1, 6) == -2); assert(func0(arr2, 7) == -0.5); assert(func0(arr3, 2) == -9999999); // representing None return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x50,%rsp mov %rdi,-0x48(%rbp) mov %esi,-0x4c(%rbp) cmpl $0x1,-0x4c(%rbp) jg 11cf <func0+0x26> movsd 0xec6(%rip),%xmm0 jmpq 142c <func0+0x283> movl $0x0,-0x3c(%rbp) movl $0x0,-0x38(%rbp) jmp 123c <func0+0x93> mov -0x38(%rbp),%eax add $0x1,%...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_48], rdi mov [rbp+var_4C], esi cmp [rbp+var_4C], 1 jg short loc_11CF movsd xmm0, cs:qword_2078 jmp locret_142C loc_11CF: mov [rbp+var_3C], 0 mov [rbp+var_38], 0 jmp short loc_123C loc_11DF: mov eax, [rbp+var...
double func0(long long a1, int a2) { int v3; // eax int v4; // [rsp+14h] [rbp-3Ch] int i; // [rsp+18h] [rbp-38h] int j; // [rsp+1Ch] [rbp-34h] int v7; // [rsp+20h] [rbp-30h] int k; // [rsp+24h] [rbp-2Ch] int v9; // [rsp+28h] [rbp-28h] int m; // [rsp+2Ch] [rbp-24h] int n; // [rsp+30h] [rbp-20h] int ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x48],RDI MOV dword ptr [RBP + -0x4c],ESI CMP dword ptr [RBP + -0x4c],0x1 JG 0x001011cf MOVSD XMM0,qword ptr [0x00102078] JMP 0x0010142c LAB_001011cf: MOV dword ptr [RBP + -0x3c],0x0 MOV dword ptr [RBP + -0x38],0x0 JMP 0x0010123c LAB_001011df: MOV E...
int8 func0(long param_1,int param_2) { bool bVar1; void *__ptr; int8 uVar2; int local_44; int local_40; int local_3c; int local_38; int local_34; int local_2c; int local_28; int local_24; uVar2 = DAT_00102078; if (1 < param_2) { local_44 = 0; for (local_40 = 0; local_3c = local_40,...
6,913
func0
#include <stdio.h> #include <assert.h> #include <stdlib.h>
double func0(double* numbers, int length) { if (length < 2) { return -9999999; // representing None } int count = 0; for (int i = 0; i < length; i++) { for (int j = i + 1; j < length; j++) { if (numbers[j] == numbers[i]) { count += 1; ...
int main() { double arr1[] = {1, 2, -8, -2, 0, -2}; double arr2[] = {1, 1, -0.5, 0, 2, -2, -2}; double arr3[] = {2, 2}; assert(func0(arr1, 6) == -2); assert(func0(arr2, 7) == -0.5); assert(func0(arr3, 2) == -9999999); // representing None return 0; }
O1
c
func0: endbr64 push %r12 push %rbp push %rbx cmp $0x1,%esi jle 1286 <func0+0xdd> mov %rdi,%rbx mov %esi,%ebp mov $0x0,%esi mov $0x0,%r8d mov $0x1,%edi mov $0x1,%eax jmp 11eb <func0+0x42> jne 11fd <func0+0x54> add $0x1,%r8d lea 0x1(%rdi),%eax cmp %eax,%ebp jle 12d3 <func0+...
func0: endbr64 push r12 push rbp push rbx cmp esi, 1 jle loc_1278 mov rbx, rdi mov ebp, esi mov esi, 0 mov r8d, 0 mov edi, 1 mov eax, 1 jmp short loc_11E9 loc_11D6: add r8d, 1 loc_11DA: lea eax, [rdi+1] cmp ebp, eax jle loc_12C3 mov esi, edi mov edi, ...
double func0(_QWORD *a1, int a2) { long long v4; // rsi long long v5; // r8 unsigned int v6; // edi int v7; // eax long long v8; // rcx _QWORD *v9; // rdx long long i; // rdi _QWORD *v11; // rax double v12; // xmm0_8 double v13; // r12 int v15; // ecx _QWORD *v16; // rsi double *v17; // rax ...
func0: ENDBR64 PUSH R12 PUSH RBP PUSH RBX CMP ESI,0x1 JLE 0x00101278 MOV RBX,RDI MOV EBP,ESI MOV ESI,0x0 MOV R8D,0x0 MOV EDI,0x1 MOV EAX,0x1 JMP 0x001011e9 LAB_001011d6: ADD R8D,0x1 LAB_001011da: LEA EAX,[RDI + 0x1] CMP EBP,EAX JLE 0x001012c3 MOV ESI,EDI MOV EDI,EAX LAB_001011e9: MOVSXD RCX,EAX MOVSXD RDX,ESI MOVSD XMM...
double func0(double *param_1,int param_2) { double *pdVar1; int iVar2; int iVar3; double *pdVar4; double *__ptr; uint uVar5; int iVar6; int iVar7; ulong uVar8; int iVar9; double dVar10; dVar10 = DAT_00102070; if (1 < param_2) { iVar9 = 0; iVar3 = 1; iVar2 = 1; iVar6 = 0; LA...
6,914
func0
#include <stdio.h> #include <assert.h> #include <stdlib.h>
double func0(double* numbers, int length) { if (length < 2) { return -9999999; // representing None } int count = 0; for (int i = 0; i < length; i++) { for (int j = i + 1; j < length; j++) { if (numbers[j] == numbers[i]) { count += 1; ...
int main() { double arr1[] = {1, 2, -8, -2, 0, -2}; double arr2[] = {1, 1, -0.5, 0, 2, -2, -2}; double arr3[] = {2, 2}; assert(func0(arr1, 6) == -2); assert(func0(arr2, 7) == -0.5); assert(func0(arr3, 2) == -9999999); // representing None return 0; }
O2
c
func0: endbr64 cmp $0x1,%esi jle 1491 <func0+0x161> push %rbp mov $0x1,%ecx mov %esi,%ebp mov $0x1,%eax push %rbx xor %esi,%esi mov %rdi,%rbx sub $0x18,%rsp movsd (%rdi),%xmm0 jmp 1367 <func0+0x37> nopw 0x0(%rax,%rax,1) add $0x1,%eax cmp %eax,%ebp jle 1376 <func0+0x46> movslq ...
func0_part_0: push rbp mov ebp, esi push rbx sub rsp, 18h test esi, esi jle loc_149E movsxd rcx, esi mov edx, 1 mov rbx, rdi xor esi, esi cmp rdx, rcx jz short loc_1385 nop word ptr [rax+rax+00h] loc_1358: movsd xmm0, qword ptr [rbx+rdx*8-8] mov rax, rdx jmp shor...
double func0_part_0(double *a1, long long a2) { int v2; // ebp long long v3; // rcx long long v4; // rdx double *v5; // rbx int i; // esi long long v7; // rax double result; // xmm0_8 long long v9; // rcx long long v10; // r8 long long v11; // rdi _QWORD *v12; // rdx double v13; // xmm0_8 dou...
func0.part.0: PUSH RBP MOV EBP,ESI PUSH RBX SUB RSP,0x18 TEST ESI,ESI JLE 0x0010149e MOVSXD RCX,ESI MOV EDX,0x1 MOV RBX,RDI XOR ESI,ESI CMP RDX,RCX JZ 0x00101385 NOP word ptr [RAX + RAX*0x1] LAB_00101358: MOVSD XMM0,qword ptr [RBX + RDX*0x8 + -0x8] MOV RAX,RDX JMP 0x00101370 LAB_00101368: ADD RAX,0x1 CMP EBP,EAX JLE 0x...
double func0_part_0(double *param_1,int param_2) { double dVar1; long lVar2; double *__ptr; double *pdVar3; double *pdVar4; long lVar5; long lVar6; double *pdVar7; int iVar8; ulong uVar9; ulong uVar10; if (param_2 < 1) { __ptr = (double *)malloc((long)param_2 << 3); } else { lVar...
6,915
func0
#include <stdio.h> #include <assert.h> #include <stdlib.h>
double func0(double* numbers, int length) { if (length < 2) { return -9999999; // representing None } int count = 0; for (int i = 0; i < length; i++) { for (int j = i + 1; j < length; j++) { if (numbers[j] == numbers[i]) { count += 1; ...
int main() { double arr1[] = {1, 2, -8, -2, 0, -2}; double arr2[] = {1, 1, -0.5, 0, 2, -2, -2}; double arr3[] = {2, 2}; assert(func0(arr1, 6) == -2); assert(func0(arr2, 7) == -0.5); assert(func0(arr3, 2) == -9999999); // representing None return 0; }
O3
c
func0: endbr64 cmp $0x1,%esi jle 1448 <func0+0x148> push %rbp mov $0x1,%ecx mov %esi,%ebp mov $0x1,%eax push %rbx xor %esi,%esi mov %rdi,%rbx sub $0x18,%rsp movsd (%rdi),%xmm0 jmp 1337 <func0+0x37> nopw 0x0(%rax,%rax,1) add $0x1,%eax cmp %eax,%ebp jle 1346 <func0+0x46> movslq ...
func0: endbr64 cmp esi, 1 jle loc_1452 push rbp mov edx, 1 xor ecx, ecx push rbx mov rbx, rdi mov edi, esi sub rsp, 18h nop loc_1330: movsd xmm0, qword ptr [rbx+rdx*8-8] mov rax, rdx jmp short loc_1348 loc_1340: add rax, 1 cmp esi, eax jle short loc_1354 loc_1348:...
double func0(double *a1, int a2) { long long v2; // rdx int v3; // ecx double *v4; // rbx long long v5; // rax double result; // xmm0_8 double *v7; // rax double *v8; // rdx int v9; // ecx double *v10; // rdi long long v11; // r8 double v12; // xmm0_8 double *v13; // rax double *v14; // rdx ...
func0: ENDBR64 CMP ESI,0x1 JLE 0x00101452 PUSH RBP MOV EDX,0x1 XOR ECX,ECX PUSH RBX MOV RBX,RDI MOV EDI,ESI SUB RSP,0x18 NOP LAB_00101330: MOVSD XMM0,qword ptr [RBX + RDX*0x8 + -0x8] MOV RAX,RDX JMP 0x00101348 LAB_00101340: ADD RAX,0x1 CMP ESI,EAX JLE 0x00101354 LAB_00101348: UCOMISD XMM0,qword ptr [RBX + RAX*0x8] JP 0...
double func0(double *param_1,uint param_2) { double *__ptr; double *pdVar1; int iVar2; uint uVar3; uint uVar4; ulong uVar5; double *pdVar6; ulong uVar7; double dVar8; if ((int)param_2 < 2) { return DAT_00102070; } uVar5 = 1; iVar2 = 0; do { uVar7 = uVar5; do { if (param...
6,916
func0
#include <stdio.h> #include <string.h> #include <regex.h> #include <assert.h>
const char* func0(const char* text) { regex_t regex; int ret; const char* result; ret = regcomp(&regex, "ab?", REG_EXTENDED); if (ret) { return "Not matched!"; } ret = regexec(&regex, text, 0, NULL, 0); if (!ret) { result = "Found a match!"; } else...
int main() { assert(strcmp(func0("ac"), "Found a match!") == 0); assert(strcmp(func0("dc"), "Not matched!") == 0); assert(strcmp(func0("abbbba"), "Found a match!") == 0); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x70,%rsp mov %rdi,-0x68(%rbp) mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax lea -0x50(%rbp),%rax mov $0x1,%edx lea 0xdf0(%rip),%rsi mov %rax,%rdi callq 10d0 <regcomp@plt> mov %eax,-0x5c(%rbp) cmpl $0x0,-0x5c(%rbp) je 1232 <func...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 70h mov [rbp+string], rdi mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax lea rax, [rbp+preg] mov edx, 1; cflags lea rcx, pattern; "ab?" mov rsi, rcx; pattern mov rdi, rax; preg call _regcomp mov [rbp+var_5C], eax cmp ...
const char * func0(const char *a1) { const char *v2; // [rsp+18h] [rbp-58h] regex_t preg; // [rsp+20h] [rbp-50h] BYREF unsigned long long v4; // [rsp+68h] [rbp-8h] v4 = __readfsqword(0x28u); if ( regcomp(&preg, "ab?", 1) ) return "Not matched!"; if ( regexec(&preg, a1, 0LL, 0LL, 0) ) v2 = "Not matc...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x68],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX LEA RAX,[RBP + -0x50] MOV EDX,0x1 LEA RCX,[0x102008] MOV RSI,RCX MOV RDI,RAX CALL 0x001010d0 MOV dword ptr [RBP + -0x5c],EAX CMP dword ptr [RBP + -0x5c],0x0 JZ 0x001012...
char * func0(char *param_1) { int iVar1; long in_FS_OFFSET; char *local_60; regex_t local_58; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); iVar1 = regcomp(&local_58,"ab?",1); if (iVar1 == 0) { iVar1 = regexec(&local_58,param_1,0,(regmatch_t *)0x0,0); if (iVar1 == 0) { loca...
6,917
func0
#include <stdio.h> #include <string.h> #include <regex.h> #include <assert.h>
const char* func0(const char* text) { regex_t regex; int ret; const char* result; ret = regcomp(&regex, "ab?", REG_EXTENDED); if (ret) { return "Not matched!"; } ret = regexec(&regex, text, 0, NULL, 0); if (!ret) { result = "Found a match!"; } else...
int main() { assert(strcmp(func0("ac"), "Found a match!") == 0); assert(strcmp(func0("dc"), "Not matched!") == 0); assert(strcmp(func0("abbbba"), "Found a match!") == 0); return 0; }
O1
c
func0: endbr64 push %rbp push %rbx sub $0x58,%rsp mov %rdi,%rbx mov %fs:0x28,%rax mov %rax,0x48(%rsp) xor %eax,%eax mov %rsp,%rdi mov $0x1,%edx lea 0xe2b(%rip),%rsi callq 10c0 <regcomp@plt> lea 0xe12(%rip),%rbp test %eax,%eax je 121f <func0+0x56> mov 0x48(%rsp),%rax xor %fs:0...
func0: endbr64 push rbp push rbx sub rsp, 58h mov rbp, rdi mov rax, fs:28h mov [rsp+68h+var_20], rax xor eax, eax mov rdi, rsp mov edx, 1 lea rsi, aAb; "ab?" call _regcomp lea rbx, aNotMatched; "Not matched!" test eax, eax jz short loc_123F loc_1225: mov rax, [rs...
const char * func0(long long a1) { const char *v1; // rbx _QWORD v3[13]; // [rsp+0h] [rbp-68h] BYREF v3[9] = __readfsqword(0x28u); v1 = "Not matched!"; if ( !(unsigned int)regcomp(v3, "ab?", 1LL) ) { v1 = "Found a match!"; if ( (unsigned int)regexec(v3, a1, 0LL, 0LL, 0LL) ) v1 = "Not matched!...
func0: ENDBR64 PUSH RBP PUSH RBX SUB RSP,0x58 MOV RBP,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x48],RAX XOR EAX,EAX MOV RDI,RSP MOV EDX,0x1 LEA RSI,[0x102020] CALL 0x001010d0 LEA RBX,[0x102013] TEST EAX,EAX JZ 0x0010123f LAB_00101225: MOV RAX,qword ptr [RSP + 0x48] SUB RAX,qword ptr FS:[0x28] JNZ 0x0010127...
char * func0(char *param_1) { int iVar1; char *pcVar2; long in_FS_OFFSET; regex_t rStack_68; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); iVar1 = regcomp(&rStack_68,"ab?",1); pcVar2 = "Not matched!"; if (iVar1 == 0) { iVar1 = regexec(&rStack_68,param_1,0,(regmatch_t *)0x0,0); ...
6,918
func0
#include <stdio.h> #include <string.h> #include <regex.h> #include <assert.h>
const char* func0(const char* text) { regex_t regex; int ret; const char* result; ret = regcomp(&regex, "ab?", REG_EXTENDED); if (ret) { return "Not matched!"; } ret = regexec(&regex, text, 0, NULL, 0); if (!ret) { result = "Found a match!"; } else...
int main() { assert(strcmp(func0("ac"), "Found a match!") == 0); assert(strcmp(func0("dc"), "Not matched!") == 0); assert(strcmp(func0("abbbba"), "Found a match!") == 0); return 0; }
O2
c
func0: endbr64 push %r13 mov $0x1,%edx lea 0xd5e(%rip),%rsi lea 0xd4a(%rip),%r13 push %r12 push %rbp mov %rdi,%rbp sub $0x50,%rsp mov %fs:0x28,%rax mov %rax,0x48(%rsp) xor %eax,%eax mov %rsp,%r12 mov %r12,%rdi callq 10c0 <regcomp@plt> test %eax,%eax jne 1319 <func0+0x69> xor ...
func0: endbr64 push r13 mov edx, 1 lea rsi, aAb; "ab?" lea r13, aNotMatched; "Not matched!" push r12 push rbp mov rbp, rdi sub rsp, 50h mov rax, fs:28h mov [rsp+68h+var_20], rax xor eax, eax mov r12, rsp mov rdi, r12 call _regcomp test eax, eax jnz short loc_13...
const char * func0(long long a1) { const char *v1; // r13 _QWORD v3[13]; // [rsp+0h] [rbp-68h] BYREF v1 = "Not matched!"; v3[9] = __readfsqword(0x28u); if ( !(unsigned int)regcomp(v3, "ab?", 1LL) ) { if ( !(unsigned int)regexec(v3, a1, 0LL, 0LL, 0LL) ) v1 = "Found a match!"; regfree(v3); } ...
func0: ENDBR64 PUSH R13 MOV EDX,0x1 LEA RSI,[0x102020] LEA R13,[0x102013] PUSH R12 PUSH RBP MOV RBP,RDI SUB RSP,0x50 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x48],RAX XOR EAX,EAX MOV R12,RSP MOV RDI,R12 CALL 0x001010d0 TEST EAX,EAX JNZ 0x00101329 XOR R8D,R8D XOR ECX,ECX XOR EDX,EDX MOV RDI,R12 MOV RSI,RBP CALL...
char * func0(char *param_1) { int iVar1; char *pcVar2; long in_FS_OFFSET; regex_t rStack_68; long local_20; pcVar2 = "Not matched!"; local_20 = *(long *)(in_FS_OFFSET + 0x28); iVar1 = regcomp(&rStack_68,"ab?",1); if (iVar1 == 0) { iVar1 = regexec(&rStack_68,param_1,0,(regmatch_t *)0x0,0); ...
6,919
func0
#include <stdio.h> #include <string.h> #include <regex.h> #include <assert.h>
const char* func0(const char* text) { regex_t regex; int ret; const char* result; ret = regcomp(&regex, "ab?", REG_EXTENDED); if (ret) { return "Not matched!"; } ret = regexec(&regex, text, 0, NULL, 0); if (!ret) { result = "Found a match!"; } else...
int main() { assert(strcmp(func0("ac"), "Found a match!") == 0); assert(strcmp(func0("dc"), "Not matched!") == 0); assert(strcmp(func0("abbbba"), "Found a match!") == 0); return 0; }
O3
c
func0: endbr64 push %r13 mov $0x1,%edx lea 0xd5e(%rip),%rsi lea 0xd4a(%rip),%r13 push %r12 push %rbp mov %rdi,%rbp sub $0x50,%rsp mov %fs:0x28,%rax mov %rax,0x48(%rsp) xor %eax,%eax mov %rsp,%r12 mov %r12,%rdi callq 10c0 <regcomp@plt> test %eax,%eax jne 1319 <func0+0x69> xor ...
func0: endbr64 push r12 mov edx, 1; cflags lea rsi, pattern; "ab?" lea r12, aNotMatched; "Not matched!" push rbp push rbx mov rbx, rdi sub rsp, 50h mov rax, fs:28h mov [rsp+var_s48], rax xor eax, eax mov rbp, rsp mov rdi, rbp; preg call _regcomp test eax, eax jnz ...
const char * func0(char *string) { const char *v1; // r12 regex_t _0; // [rsp+0h] [rbp+0h] BYREF unsigned long long vars48; // [rsp+48h] [rbp+48h] v1 = "Not matched!"; vars48 = __readfsqword(0x28u); if ( !regcomp(&_0, "ab?", 1) ) { if ( !regexec(&_0, string, 0LL, 0LL, 0) ) v1 = "Found a match!"...
func0: ENDBR64 PUSH R12 MOV EDX,0x1 LEA RSI,[0x102020] LEA R12,[0x102013] PUSH RBP PUSH RBX MOV RBX,RDI SUB RSP,0x50 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x48],RAX XOR EAX,EAX MOV RBP,RSP MOV RDI,RBP CALL 0x001010d0 TEST EAX,EAX JNZ 0x00101328 XOR R8D,R8D XOR ECX,ECX XOR EDX,EDX MOV RDI,RBP MOV RSI,RBX CALL...
char * func0(char *param_1) { int iVar1; char *pcVar2; long in_FS_OFFSET; regex_t rStack_68; long local_20; pcVar2 = "Not matched!"; local_20 = *(long *)(in_FS_OFFSET + 0x28); iVar1 = regcomp(&rStack_68,"ab?",1); if (iVar1 == 0) { iVar1 = regexec(&rStack_68,param_1,0,(regmatch_t *)0x0,0); ...
6,920
func0
#include <stdio.h> #include <string.h> #include <assert.h>
char* func0(char* test_list[], int size) { int count = 0; for (int idx = 0; idx < size; idx++) { for (int idxn = idx; idxn < size; idxn++) { char reversed[100]; int len = strlen(test_list[idx]); for (int i = 0; i < len; i++) { reversed[i] = test...
int main() { char* test1[] = {"julia", "best", "tseb", "for", "ailuj"}; char* test2[] = {"geeks", "best", "for", "skeeg"}; char* test3[] = {"makes", "best", "sekam", "for", "rof"}; assert(strcmp(func0(test1, 5), "2") == 0); assert(strcmp(func0(test2, 4), "1") == 0); assert(strcmp(func0(tes...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0xa0,%rsp mov %rdi,-0x98(%rbp) mov %esi,-0x9c(%rbp) mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax movl $0x0,-0x84(%rbp) movl $0x0,-0x80(%rbp) jmpq 12d8 <func0+0x10f> mov -0x80(%rbp),%eax mov %eax,-0x7c(%rbp) jmpq 12c5 <func0+0xfc> mo...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 0A0h mov [rbp+var_98], rdi mov [rbp+var_9C], esi mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax mov [rbp+var_84], 0 mov [rbp+var_80], 0 jmp loc_12D8 loc_120A: mov eax, [rbp+var_80] mov [rbp+var_7C], eax jmp loc_12C5 ...
char * func0(long long a1, int a2) { int v3; // [rsp+1Ch] [rbp-84h] int i; // [rsp+20h] [rbp-80h] int j; // [rsp+24h] [rbp-7Ch] int k; // [rsp+28h] [rbp-78h] int v7; // [rsp+2Ch] [rbp-74h] char s2[104]; // [rsp+30h] [rbp-70h] BYREF unsigned long long v9; // [rsp+98h] [rbp-8h] v9 = __readfsqword(0x28u);...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV qword ptr [RBP + -0x98],RDI MOV dword ptr [RBP + -0x9c],ESI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX MOV dword ptr [RBP + -0x84],0x0 MOV dword ptr [RBP + -0x80],0x0 JMP 0x001012d8 LAB_0010120a: MOV EAX,dword ptr [RBP + -0x80] MOV dword p...
int1 * func0(long param_1,int param_2) { int iVar1; size_t sVar2; long in_FS_OFFSET; uint local_8c; int local_88; int local_84; int local_80; char local_78 [104]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_8c = 0; for (local_88 = 0; local_88 < param_2; local_88 = local_8...
6,921
func0
#include <stdio.h> #include <string.h> #include <assert.h>
char* func0(char* test_list[], int size) { int count = 0; for (int idx = 0; idx < size; idx++) { for (int idxn = idx; idxn < size; idxn++) { char reversed[100]; int len = strlen(test_list[idx]); for (int i = 0; i < len; i++) { reversed[i] = test...
int main() { char* test1[] = {"julia", "best", "tseb", "for", "ailuj"}; char* test2[] = {"geeks", "best", "for", "skeeg"}; char* test3[] = {"makes", "best", "sekam", "for", "rof"}; assert(strcmp(func0(test1, 5), "2") == 0); assert(strcmp(func0(test2, 4), "1") == 0); assert(strcmp(func0(tes...
O1
c
func0: endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x98,%rsp mov %esi,%ebx mov %esi,0x10(%rsp) mov %fs:0x28,%rsi mov %rsi,0x88(%rsp) xor %esi,%esi test %ebx,%ebx jle 12c2 <func0+0x119> mov %rdi,%rax sub $0x1,%ebx mov %ebx,0x14(%rsp) mov %ebx,%e...
func0: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 98h mov [rsp+0C8h+var_B8], esi mov rdx, fs:28h mov [rsp+0C8h+var_40], rdx xor edx, edx test esi, esi jle loc_12CB mov rax, rdi lea edi, [rsi-1] mov [rsp+0C8h+var_B4], edi mov ebx, e...
void * func0(_QWORD *a1, int a2) { _QWORD *v2; // r13 unsigned int v3; // r12d _QWORD *v4; // rbx long long v5; // rbp int v6; // eax _BYTE *v7; // rdx _BYTE *v8; // rcx long long v10; // [rsp+0h] [rbp-C8h] _BYTE v11[104]; // [rsp+20h] [rbp-A8h] BYREF unsigned long long v12; // [rsp+88h] [rbp-40h] ...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x98 MOV dword ptr [RSP + 0x10],ESI MOV RDX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x88],RDX XOR EDX,EDX TEST ESI,ESI JLE 0x001012cb MOV RAX,RDI LEA EDI,[RSI + -0x1] MOV dword ptr [RSP + 0x14],EDI MOV EBX,ESI MOV qword ptr [RSP + 0x8],RBX MO...
int1 * func0(int8 *param_1,uint param_2) { char *__s; int iVar1; size_t sVar2; char *pcVar3; char *pcVar4; int8 *puVar5; int iVar6; int8 *puVar7; long in_FS_OFFSET; ulong local_c8; char local_a8 [104]; long local_40; local_40 = *(long *)(in_FS_OFFSET + 0x28); if ((int)param_2 < 1) { ...
6,922
func0
#include <stdio.h> #include <string.h> #include <assert.h>
char* func0(char* test_list[], int size) { int count = 0; for (int idx = 0; idx < size; idx++) { for (int idxn = idx; idxn < size; idxn++) { char reversed[100]; int len = strlen(test_list[idx]); for (int i = 0; i < len; i++) { reversed[i] = test...
int main() { char* test1[] = {"julia", "best", "tseb", "for", "ailuj"}; char* test2[] = {"geeks", "best", "for", "skeeg"}; char* test3[] = {"makes", "best", "sekam", "for", "rof"}; assert(strcmp(func0(test1, 5), "2") == 0); assert(strcmp(func0(test2, 4), "1") == 0); assert(strcmp(func0(tes...
O2
c
func0: endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0xa8,%rsp mov %esi,0xc(%rsp) mov %fs:0x28,%rbx mov %rbx,0x98(%rsp) xor %ebx,%ebx test %esi,%esi jle 149e <func0+0x15e> mov %esi,%eax mov %rdi,%r15 lea 0x30(%rsp),%r13 xor %r12d,%r12d movq $0x0,0...
func0: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 98h mov [rsp+0C8h+var_BC], esi mov rax, fs:28h mov [rsp+0C8h+var_40], rax xor eax, eax movsxd rax, esi test eax, eax jle loc_1477 mov [rsp+0C8h+var_B0], rax mov r13, rdi xor ebp, ebp l...
void * func0(long long a1, int a2) { unsigned int v3; // ebp long long v4; // r14 long long v5; // rbx long long v6; // rax _BYTE *v7; // rcx char *v8; // rdx char v9; // si long long v10; // rdi long long i; // [rsp+10h] [rbp-B8h] long long v14; // [rsp+18h] [rbp-B0h] _BYTE v15[104]; // [rsp+20h]...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x98 MOV dword ptr [RSP + 0xc],ESI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x88],RAX XOR EAX,EAX MOVSXD RAX,ESI TEST EAX,EAX JLE 0x00101477 MOV qword ptr [RSP + 0x18],RAX MOV R13,RDI XOR EBP,EBP LEA R12,[RSP + 0x20] MOV qword ptr [RSP...
int1 * func0(long param_1,int param_2) { char cVar1; char *__s; int iVar2; size_t sVar3; char *pcVar4; char *pcVar5; int iVar6; long lVar7; long in_FS_OFFSET; long local_b8; char local_a8 [104]; long local_40; local_40 = *(long *)(in_FS_OFFSET + 0x28); if (param_2 < 1) { iVar6 = 0; ...
6,923
func0
#include <stdio.h> #include <string.h> #include <assert.h>
char* func0(char* test_list[], int size) { int count = 0; for (int idx = 0; idx < size; idx++) { for (int idxn = idx; idxn < size; idxn++) { char reversed[100]; int len = strlen(test_list[idx]); for (int i = 0; i < len; i++) { reversed[i] = test...
int main() { char* test1[] = {"julia", "best", "tseb", "for", "ailuj"}; char* test2[] = {"geeks", "best", "for", "skeeg"}; char* test3[] = {"makes", "best", "sekam", "for", "rof"}; assert(strcmp(func0(test1, 5), "2") == 0); assert(strcmp(func0(test2, 4), "1") == 0); assert(strcmp(func0(tes...
O3
c
func0: endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x98,%rsp mov %esi,0xc(%rsp) mov %fs:0x28,%rbx mov %rbx,0x88(%rsp) xor %ebx,%ebx test %esi,%esi jle 146d <func0+0xfd> mov %esi,%eax mov %rdi,%r13 lea 0x20(%rsp),%r12 xor %ebp,%ebp movq $0x0,0x10...
func0: endbr64 push r15 push r14 push r13 push r12 push rbp xor ebp, ebp push rbx sub rsp, 98h mov [rsp+0C8h+var_BC], esi mov rax, fs:28h mov [rsp+0C8h+var_40], rax xor eax, eax test esi, esi jle loc_145D movsxd rax, [rsp+0C8h+var_BC] mov r13, rdi xor ebp, ebp l...
void * func0(long long a1, int a2) { unsigned int v2; // ebp long long v4; // r14 const char *v5; // rbx long long v6; // rax char *v7; // rcx const char *v8; // rdx char v9; // si const char *v10; // rdi long long i; // [rsp+10h] [rbp-B8h] char s2[104]; // [rsp+20h] [rbp-A8h] BYREF unsigned long ...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP XOR EBP,EBP PUSH RBX SUB RSP,0x98 MOV dword ptr [RSP + 0xc],ESI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x88],RAX XOR EAX,EAX TEST ESI,ESI JLE 0x0010145d MOVSXD RAX,dword ptr [RSP + 0xc] MOV R13,RDI XOR EBP,EBP LEA R12,[RSP + 0x20] MOV qword ptr [RSP ...
int1 * func0(long param_1,int param_2) { char cVar1; char *__s; int iVar2; size_t sVar3; char *pcVar4; char *pcVar5; int iVar6; long lVar7; long in_FS_OFFSET; long local_b8; char local_a8 [104]; long local_40; iVar6 = 0; local_40 = *(long *)(in_FS_OFFSET + 0x28); if (0 < param_2) { ...
6,924
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> #include <string.h> typedef struct hash{ void* key; int value; size_t key_size; struct hash* next; } HashItem; int hash_function(void* key, size_t key_size, int buckets) { unsigned char* p = (unsigned char*) key; unsign...
HashItem** func0(int list1[][50], int lengths[], int list1_size) { const int buckets = 10; HashItem** hashtable = calloc(buckets, sizeof(HashItem*)); for (int i = 0; i < list1_size; i++) { insert_or_increment(hashtable, buckets, list1[i], lengths[i] * sizeof(int)); } return hashtable; ...
int main() { int list1[][50] = {{1, 3}, {5, 7}, {1, 3}, {13, 15, 17}, {5, 7}, {9, 11}}; int lengths1[] = {2, 2, 2, 3, 2, 2}; int list1_size = 6; HashItem** result1 = func0(list1, lengths1, list1_size); assert(result1[hash_function((int[]){1, 3}, sizeof(int)*2, 10)]->value == 2); assert(res...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x30,%rsp mov %rdi,-0x18(%rbp) mov %rsi,-0x20(%rbp) mov %edx,-0x24(%rbp) movl $0xa,-0xc(%rbp) mov -0xc(%rbp),%eax cltq mov $0x8,%esi mov %rax,%rdi callq 10f0 <calloc@plt> mov %rax,-0x8(%rbp) movl $0x0,-0x10(%rbp) jmp 14e1 <func0+0x99> mov ...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_18], rdi mov [rbp+var_20], rsi mov [rbp+var_24], edx mov [rbp+var_C], 0Ah mov eax, [rbp+var_C] cdqe mov esi, 8; size mov rdi, rax; nmemb call _calloc mov [rbp+var_8], rax mov [rbp+var_10], 0 jmp short lo...
void * func0(long long a1, long long a2, int a3) { int i; // [rsp+20h] [rbp-10h] void *v6; // [rsp+28h] [rbp-8h] v6 = calloc(0xAuLL, 8uLL); for ( i = 0; i < a3; ++i ) insert_or_increment(v6, 10LL, a1 + 200LL * i, 4LL * *(int *)(4LL * i + a2)); return v6; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI MOV dword ptr [RBP + -0x24],EDX MOV dword ptr [RBP + -0xc],0xa MOV EAX,dword ptr [RBP + -0xc] CDQE MOV ESI,0x8 MOV RDI,RAX CALL 0x001010f0 MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0x10],0x0 JMP 0...
void * func0(long param_1,long param_2,int param_3) { void *pvVar1; int4 local_18; pvVar1 = calloc(10,8); for (local_18 = 0; local_18 < param_3; local_18 = local_18 + 1) { insert_or_increment(pvVar1,10,(long)local_18 * 200 + param_1, (long)*(int *)(param_2 + (long)local_18 * 4) *...
6,925
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> #include <string.h> typedef struct hash{ void* key; int value; size_t key_size; struct hash* next; } HashItem; int hash_function(void* key, size_t key_size, int buckets) { unsigned char* p = (unsigned char*) key; unsign...
HashItem** func0(int list1[][50], int lengths[], int list1_size) { const int buckets = 10; HashItem** hashtable = calloc(buckets, sizeof(HashItem*)); for (int i = 0; i < list1_size; i++) { insert_or_increment(hashtable, buckets, list1[i], lengths[i] * sizeof(int)); } return hashtable; ...
int main() { int list1[][50] = {{1, 3}, {5, 7}, {1, 3}, {13, 15, 17}, {5, 7}, {9, 11}}; int lengths1[] = {2, 2, 2, 3, 2, 2}; int list1_size = 6; HashItem** result1 = func0(list1, lengths1, list1_size); assert(result1[hash_function((int[]){1, 3}, sizeof(int)*2, 10)]->value == 2); assert(res...
O1
c
func0: endbr64 push %r14 push %r13 push %r12 push %rbp push %rbx mov %rdi,%rbp mov %rsi,%r14 mov %edx,%r13d mov $0x8,%esi mov $0xa,%edi callq 10f0 <calloc@plt> mov %rax,%r12 test %r13d,%r13d jle 13aa <func0+0x5f> mov %r14,%rbx lea -0x1(%r13),%eax lea 0x4(%r14,%rax,4),%r13 movs...
func0: endbr64 push r14 push r13 push r12 push rbp push rbx mov rbp, rdi mov r14, rsi mov r13d, edx mov esi, 8 mov edi, 0Ah call _calloc mov r12, rax test r13d, r13d jle short loc_13A5 mov rbx, r14 lea eax, [r13-1] lea r13, [r14+rax*4+4] loc_137E: movsxd rcx...
long long func0(long long a1, int *a2, int a3) { long long v5; // r12 int *v6; // rbx long long v7; // r13 v5 = calloc(10LL, 8LL); if ( a3 > 0 ) { v6 = a2; v7 = (long long)&a2[a3 - 1 + 1]; do { insert_or_increment(v5, 10LL, a1, 4LL * *v6++); a1 += 200LL; } while ( v6 !=...
func0: ENDBR64 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV RBP,RDI MOV R14,RSI MOV R13D,EDX MOV ESI,0x8 MOV EDI,0xa CALL 0x001010f0 MOV R12,RAX TEST R13D,R13D JLE 0x001013a5 MOV RBX,R14 LEA EAX,[R13 + -0x1] LEA R13,[R14 + RAX*0x4 + 0x4] LAB_0010137e: MOVSXD RCX,dword ptr [RBX] SHL RCX,0x2 MOV RDX,RBP MOV ESI,0xa M...
void * func0(long param_1,int *param_2,int param_3) { int *piVar1; void *pvVar2; pvVar2 = calloc(10,8); if (0 < param_3) { piVar1 = param_2 + (ulong)(param_3 - 1) + 1; do { insert_or_increment(pvVar2,10,param_1,(long)*param_2 << 2); param_2 = param_2 + 1; param_1 = param_1 + 200; ...
6,926
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> #include <string.h> typedef struct hash{ void* key; int value; size_t key_size; struct hash* next; } HashItem; int hash_function(void* key, size_t key_size, int buckets) { unsigned char* p = (unsigned char*) key; unsign...
HashItem** func0(int list1[][50], int lengths[], int list1_size) { const int buckets = 10; HashItem** hashtable = calloc(buckets, sizeof(HashItem*)); for (int i = 0; i < list1_size; i++) { insert_or_increment(hashtable, buckets, list1[i], lengths[i] * sizeof(int)); } return hashtable; ...
int main() { int list1[][50] = {{1, 3}, {5, 7}, {1, 3}, {13, 15, 17}, {5, 7}, {9, 11}}; int lengths1[] = {2, 2, 2, 3, 2, 2}; int list1_size = 6; HashItem** result1 = func0(list1, lengths1, list1_size); assert(result1[hash_function((int[]){1, 3}, sizeof(int)*2, 10)]->value == 2); assert(res...
O2
c
func0: endbr64 push %r13 mov %edx,%r13d push %r12 push %rbp mov %rdi,%rbp mov $0xa,%edi push %rbx mov %rsi,%rbx mov $0x8,%esi sub $0x8,%rsp callq 10f0 <calloc@plt> mov %rax,%r12 test %r13d,%r13d jle 1747 <func0+0x67> lea -0x1(%r13),%eax lea 0x4(%rbx,%rax,4),%r13 nopw 0x0(%rax,...
func0: endbr64 push r13 mov r13d, edx push r12 push rbp mov rbp, rdi mov edi, 0Ah push rbx mov rbx, rsi mov esi, 8 sub rsp, 8 call _calloc mov r12, rax test r13d, r13d jle short loc_1757 lea eax, [r13-1] lea r13, [rbx+rax*4+4] nop word ptr [rax+rax+00000000h...
long long func0(long long a1, int *a2, int a3) { int *v5; // rbx long long v6; // r12 long long v7; // r13 long long v8; // rcx long long v9; // rdx v5 = a2; v6 = calloc(10LL, 8LL); if ( a3 > 0 ) { v7 = (long long)&a2[a3 - 1 + 1]; do { v8 = *v5; v9 = a1; ++v5; a1 ...
func0: ENDBR64 PUSH R13 MOV R13D,EDX PUSH R12 PUSH RBP MOV RBP,RDI MOV EDI,0xa PUSH RBX MOV RBX,RSI MOV ESI,0x8 SUB RSP,0x8 CALL 0x001010f0 MOV R12,RAX TEST R13D,R13D JLE 0x00101757 LEA EAX,[R13 + -0x1] LEA R13,[RBX + RAX*0x4 + 0x4] NOP word ptr [RAX + RAX*0x1] LAB_00101730: MOVSXD RCX,dword ptr [RBX] MOV RDX,RBP MOV E...
void * func0(long param_1,int *param_2,int param_3) { int *piVar1; int iVar2; void *pvVar3; pvVar3 = calloc(10,8); if (0 < param_3) { piVar1 = param_2 + (ulong)(param_3 - 1) + 1; do { iVar2 = *param_2; param_2 = param_2 + 1; insert_or_increment(pvVar3,10,param_1,(long)iVar2 << 2)...
6,927
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> #include <string.h> typedef struct hash{ void* key; int value; size_t key_size; struct hash* next; } HashItem; int hash_function(void* key, size_t key_size, int buckets) { unsigned char* p = (unsigned char*) key; unsign...
HashItem** func0(int list1[][50], int lengths[], int list1_size) { const int buckets = 10; HashItem** hashtable = calloc(buckets, sizeof(HashItem*)); for (int i = 0; i < list1_size; i++) { insert_or_increment(hashtable, buckets, list1[i], lengths[i] * sizeof(int)); } return hashtable; ...
int main() { int list1[][50] = {{1, 3}, {5, 7}, {1, 3}, {13, 15, 17}, {5, 7}, {9, 11}}; int lengths1[] = {2, 2, 2, 3, 2, 2}; int list1_size = 6; HashItem** result1 = func0(list1, lengths1, list1_size); assert(result1[hash_function((int[]){1, 3}, sizeof(int)*2, 10)]->value == 2); assert(res...
O3
c
func0: endbr64 push %r13 mov %edx,%r13d push %r12 push %rbp mov %rdi,%rbp mov $0xa,%edi push %rbx mov %rsi,%rbx mov $0x8,%esi sub $0x8,%rsp callq 10f0 <calloc@plt> mov %rax,%r12 test %r13d,%r13d jle 17d7 <func0+0x67> lea -0x1(%r13),%eax lea 0x4(%rbx,%rax,4),%r13 nopw 0x0(%rax,...
func0: endbr64 push r13 movsxd r13, edx push r12 push rbp mov rbp, rdi mov edi, 0Ah; nmemb push rbx mov rbx, rsi mov esi, 8; size sub rsp, 8 call _calloc mov r12, rax test r13d, r13d jle short loc_159F lea r13, [rbx+r13*4] nop word ptr [rax+rax+00h] loc_1578: movsx...
void * func0(long long a1, int *a2, int a3) { long long v3; // r13 int *v5; // rbx void *v6; // r12 int *v7; // r13 long long v8; // rcx long long v9; // rdx v3 = a3; v5 = a2; v6 = calloc(0xAuLL, 8uLL); if ( (int)v3 > 0 ) { v7 = &a2[v3]; do { v8 = *v5; v9 = a1; ++v5;...
func0: ENDBR64 PUSH R13 MOVSXD R13,EDX PUSH R12 PUSH RBP MOV RBP,RDI MOV EDI,0xa PUSH RBX MOV RBX,RSI MOV ESI,0x8 SUB RSP,0x8 CALL 0x001010f0 MOV R12,RAX TEST R13D,R13D JLE 0x0010159f LEA R13,[RBX + R13*0x4] NOP word ptr [RAX + RAX*0x1] LAB_00101578: MOVSXD RCX,dword ptr [RBX] MOV RDX,RBP MOV ESI,0xa MOV RDI,R12 ADD RB...
void * func0(long param_1,int *param_2,int param_3) { int *piVar1; int iVar2; void *pvVar3; pvVar3 = calloc(10,8); if (0 < param_3) { piVar1 = param_2 + param_3; do { iVar2 = *param_2; param_2 = param_2 + 1; insert_or_increment(pvVar3,10,param_1,(long)iVar2 << 2); param_1 =...
6,928
func0
#include <stdio.h> #include <assert.h> #include <regex.h> #include <stdbool.h>
bool func0(const char *num) { regex_t regex; int result; char *pattern = "^[0-9]+(\\.[0-9]{1,2})?$"; if (regcomp(&regex, pattern, REG_EXTENDED) != 0) { return false; // Compilation failed } result = regexec(&regex, num, 0, NULL, 0); regfree(&regex); ret...
int main() { assert(func0("123.11") == true); assert(func0("e666.86") == false); assert(func0("3.124587") == false); printf("All tests passed successfully.\n"); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x70,%rsp mov %rdi,-0x68(%rbp) mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax lea 0xdf9(%rip),%rax mov %rax,-0x58(%rbp) mov -0x58(%rbp),%rcx lea -0x50(%rbp),%rax mov $0x1,%edx mov %rcx,%rsi mov %rax,%rdi callq 10e0 <regcomp@plt> ...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 70h mov [rbp+string], rdi mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax lea rax, a090912; "^[0-9]+(\\.[0-9]{1,2})?$" mov [rbp+pattern], rax mov rcx, [rbp+pattern] lea rax, [rbp+preg] mov edx, 1; cflags mov rsi, rcx; pat...
bool func0(const char *a1) { int v2; // [rsp+14h] [rbp-5Ch] regex_t preg; // [rsp+20h] [rbp-50h] BYREF unsigned long long v4; // [rsp+68h] [rbp-8h] v4 = __readfsqword(0x28u); if ( regcomp(&preg, "^[0-9]+(\\.[0-9]{1,2})?$", 1) ) return 0; v2 = regexec(&preg, a1, 0LL, 0LL, 0); regfree(&preg); return...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x68],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX LEA RAX,[0x102008] MOV qword ptr [RBP + -0x58],RAX MOV RCX,qword ptr [RBP + -0x58] LEA RAX,[RBP + -0x50] MOV EDX,0x1 MOV RSI,RCX MOV RDI,RAX CALL 0x001010e0 TEST EAX,EA...
bool func0(char *param_1) { int iVar1; long in_FS_OFFSET; bool bVar2; regex_t local_58; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); iVar1 = regcomp(&local_58,"^[0-9]+(\\.[0-9]{1,2})?$",1); if (iVar1 == 0) { iVar1 = regexec(&local_58,param_1,0,(regmatch_t *)0x0,0); regfree(&loca...
6,929
func0
#include <stdio.h> #include <assert.h> #include <regex.h> #include <stdbool.h>
bool func0(const char *num) { regex_t regex; int result; char *pattern = "^[0-9]+(\\.[0-9]{1,2})?$"; if (regcomp(&regex, pattern, REG_EXTENDED) != 0) { return false; // Compilation failed } result = regexec(&regex, num, 0, NULL, 0); regfree(&regex); ret...
int main() { assert(func0("123.11") == true); assert(func0("e666.86") == false); assert(func0("3.124587") == false); printf("All tests passed successfully.\n"); return 0; }
O1
c
func0: endbr64 push %rbp push %rbx sub $0x58,%rsp mov %rdi,%rbx mov %fs:0x28,%rax mov %rax,0x48(%rsp) xor %eax,%eax mov %rsp,%rdi mov $0x1,%edx lea 0xdef(%rip),%rsi callq 10e0 <regcomp@plt> mov %eax,%edx mov $0x0,%eax test %edx,%edx je 123c <func0+0x53> mov 0x48(%rsp),%rcx xo...
func0: endbr64 push rbp push rbx sub rsp, 58h mov rbx, rdi mov rax, fs:28h mov [rsp+68h+var_20], rax xor eax, eax mov rdi, rsp mov edx, 1 lea rsi, a090912; "^[0-9]+(\\.[0-9]{1,2})?$" call _regcomp mov edx, eax mov eax, 0 test edx, edx jz short loc_123C loc_1225: ...
bool func0(long long a1) { int v1; // edx bool result; // al int v3; // ebx _QWORD v4[13]; // [rsp+0h] [rbp-68h] BYREF v4[9] = __readfsqword(0x28u); v1 = regcomp(v4, "^[0-9]+(\\.[0-9]{1,2})?$", 1LL); result = 0; if ( !v1 ) { v3 = regexec(v4, a1, 0LL, 0LL, 0LL); regfree(v4); return v3 == ...
func0: ENDBR64 PUSH RBP PUSH RBX SUB RSP,0x58 MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x48],RAX XOR EAX,EAX MOV RDI,RSP MOV EDX,0x1 LEA RSI,[0x102004] CALL 0x001010e0 MOV EDX,EAX MOV EAX,0x0 TEST EDX,EDX JZ 0x0010123c LAB_00101225: MOV RDX,qword ptr [RSP + 0x48] SUB RDX,qword ptr FS:[0x28] JNZ 0x00...
bool func0(char *param_1) { int iVar1; long in_FS_OFFSET; bool bVar2; regex_t rStack_68; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); iVar1 = regcomp(&rStack_68,"^[0-9]+(\\.[0-9]{1,2})?$",1); bVar2 = false; if (iVar1 == 0) { iVar1 = regexec(&rStack_68,param_1,0,(regmatch_t *)0x0,0...
6,930
func0
#include <stdio.h> #include <assert.h> #include <regex.h> #include <stdbool.h>
bool func0(const char *num) { regex_t regex; int result; char *pattern = "^[0-9]+(\\.[0-9]{1,2})?$"; if (regcomp(&regex, pattern, REG_EXTENDED) != 0) { return false; // Compilation failed } result = regexec(&regex, num, 0, NULL, 0); regfree(&regex); ret...
int main() { assert(func0("123.11") == true); assert(func0("e666.86") == false); assert(func0("3.124587") == false); printf("All tests passed successfully.\n"); return 0; }
O2
c
func0: endbr64 push %r12 mov $0x1,%edx lea 0xd52(%rip),%rsi push %rbp mov %rdi,%rbp sub $0x58,%rsp mov %fs:0x28,%rax mov %rax,0x48(%rsp) xor %eax,%eax mov %rsp,%r12 mov %r12,%rdi callq 10e0 <regcomp@plt> mov %eax,%r8d xor %eax,%eax test %r8d,%r8d jne 12fd <func0+0x5d> xor %...
func0: endbr64 push r12 mov edx, 1 lea rsi, a090912; "^[0-9]+(\\.[0-9]{1,2})?$" push rbp mov rbp, rdi sub rsp, 58h mov rax, fs:28h mov [rsp+68h+var_20], rax xor eax, eax mov r12, rsp mov rdi, r12 call _regcomp mov r8d, eax xor eax, eax test r8d, r8d jnz short ...
bool func0(long long a1) { int v1; // r8d bool result; // al int v3; // ebp _QWORD v4[13]; // [rsp+0h] [rbp-68h] BYREF v4[9] = __readfsqword(0x28u); v1 = regcomp(v4, "^[0-9]+(\\.[0-9]{1,2})?$", 1LL); result = 0; if ( !v1 ) { v3 = regexec(v4, a1, 0LL, 0LL); regfree(v4); return v3 == 0; ...
func0: ENDBR64 PUSH R12 MOV EDX,0x1 LEA RSI,[0x102004] PUSH RBP MOV RBP,RDI SUB RSP,0x58 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x48],RAX XOR EAX,EAX MOV R12,RSP MOV RDI,R12 CALL 0x001010e0 MOV R8D,EAX XOR EAX,EAX TEST R8D,R8D JNZ 0x001012fd XOR ECX,ECX XOR EDX,EDX MOV RSI,RBP MOV RDI,R12 CALL 0x001010f0 MOV ...
bool func0(char *param_1) { int iVar1; long in_FS_OFFSET; bool bVar2; regex_t rStack_68; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); iVar1 = regcomp(&rStack_68,"^[0-9]+(\\.[0-9]{1,2})?$",1); bVar2 = false; if (iVar1 == 0) { iVar1 = regexec(&rStack_68,param_1,0,(regmatch_t *)0x0,0...
6,931
func0
#include <stdio.h> #include <assert.h> #include <regex.h> #include <stdbool.h>
bool func0(const char *num) { regex_t regex; int result; char *pattern = "^[0-9]+(\\.[0-9]{1,2})?$"; if (regcomp(&regex, pattern, REG_EXTENDED) != 0) { return false; // Compilation failed } result = regexec(&regex, num, 0, NULL, 0); regfree(&regex); ret...
int main() { assert(func0("123.11") == true); assert(func0("e666.86") == false); assert(func0("3.124587") == false); printf("All tests passed successfully.\n"); return 0; }
O3
c
func0: endbr64 push %r12 mov $0x1,%edx lea 0xd52(%rip),%rsi push %rbp mov %rdi,%rbp sub $0x58,%rsp mov %fs:0x28,%rax mov %rax,0x48(%rsp) xor %eax,%eax mov %rsp,%r12 mov %r12,%rdi callq 10e0 <regcomp@plt> mov %eax,%r8d xor %eax,%eax test %r8d,%r8d jne 12fd <func0+0x5d> xor %...
func0: endbr64 push rbp mov edx, 1; cflags lea rsi, pattern; "^[0-9]+(\\.[0-9]{1,2})?$" push rbx mov rbx, rdi sub rsp, 58h mov rax, fs:28h mov [rsp+var_s48], rax xor eax, eax mov rbp, rsp mov rdi, rbp; preg call _regcomp mov edx, eax xor eax, eax test edx, edx jnz...
bool func0(char *string) { int v1; // edx bool result; // al int v3; // ebx regex_t _0; // [rsp+0h] [rbp+0h] BYREF unsigned long long vars48; // [rsp+48h] [rbp+48h] vars48 = __readfsqword(0x28u); v1 = regcomp(&_0, "^[0-9]+(\\.[0-9]{1,2})?$", 1); result = 0; if ( !v1 ) { v3 = regexec(&_0, strin...
func0: ENDBR64 PUSH RBP MOV EDX,0x1 LEA RSI,[0x102004] PUSH RBX MOV RBX,RDI SUB RSP,0x58 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x48],RAX XOR EAX,EAX MOV RBP,RSP MOV RDI,RBP CALL 0x001010e0 MOV EDX,EAX XOR EAX,EAX TEST EDX,EDX JNZ 0x001012fd XOR R8D,R8D XOR ECX,ECX XOR EDX,EDX MOV RSI,RBX MOV RDI,RBP CALL 0x0...
bool func0(char *param_1) { int iVar1; long in_FS_OFFSET; bool bVar2; regex_t rStack_68; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); iVar1 = regcomp(&rStack_68,"^[0-9]+(\\.[0-9]{1,2})?$",1); bVar2 = false; if (iVar1 == 0) { iVar1 = regexec(&rStack_68,param_1,0,(regmatch_t *)0x0,0...
6,932
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h>
const char* func0(int arr[], int n) { for(int i = 1; i < n; i++) { if(arr[i] != arr[0]) { return "NO"; } } return "YES"; }
int main() { int arr1[] = {1, 1, 1}; assert(strcmp(func0(arr1, 3), "YES") == 0); int arr2[] = {1, 2, 1, 2}; assert(strcmp(func0(arr2, 4), "NO") == 0); int arr3[] = {1, 2, 3, 4, 5}; assert(strcmp(func0(arr3, 5), "NO") == 0); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) movl $0x1,-0x4(%rbp) jmp 11ce <func0+0x45> mov -0x4(%rbp),%eax cltq lea 0x0(,%rax,4),%rdx mov -0x18(%rbp),%rax add %rdx,%rax mov (%rax),%edx mov -0x18(%rbp),%rax mov (%rax),%eax cmp %eax,%edx je ...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_4], 1 jmp short loc_11CE loc_11A1: mov eax, [rbp+var_4] cdqe lea rdx, ds:0[rax*4] mov rax, [rbp+var_18] add rax, rdx mov edx, [rax] mov rax, [rbp+var_18] mov eax, [rax] cmp ...
const char * func0(_DWORD *a1, int a2) { int i; // [rsp+18h] [rbp-4h] for ( i = 1; i < a2; ++i ) { if ( a1[i] != *a1 ) return "NO"; } return "YES"; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV dword ptr [RBP + -0x4],0x1 JMP 0x001011ce LAB_001011a1: MOV EAX,dword ptr [RBP + -0x4] CDQE LEA RDX,[RAX*0x4] MOV RAX,qword ptr [RBP + -0x18] ADD RAX,RDX MOV EDX,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x18] MOV EA...
int * func0(int *param_1,int param_2) { int local_c; local_c = 1; while( true ) { if (param_2 <= local_c) { return &DAT_0010200b; } if (param_1[local_c] != *param_1) break; local_c = local_c + 1; } return &DAT_00102008; }
6,933
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h>
const char* func0(int arr[], int n) { for(int i = 1; i < n; i++) { if(arr[i] != arr[0]) { return "NO"; } } return "YES"; }
int main() { int arr1[] = {1, 1, 1}; assert(strcmp(func0(arr1, 3), "YES") == 0); int arr2[] = {1, 2, 1, 2}; assert(strcmp(func0(arr2, 4), "NO") == 0); int arr3[] = {1, 2, 3, 4, 5}; assert(strcmp(func0(arr3, 5), "NO") == 0); return 0; }
O1
c
func0: endbr64 lea 0xe93(%rip),%rax cmp $0x1,%esi jle 11a3 <func0+0x3a> mov (%rdi),%edx lea 0x4(%rdi),%rax lea -0x2(%rsi),%ecx lea 0x8(%rdi,%rcx,4),%rcx cmp %edx,(%rax) jne 119c <func0+0x33> add $0x4,%rax cmp %rcx,%rax jne 1187 <func0+0x1e> lea 0xe6c(%rip),%rax retq lea 0xe61(%...
func0: endbr64 lea rax, unk_2007 cmp esi, 1 jle short locret_11C3 mov edx, [rdi] lea rax, [rdi+4] lea ecx, [rsi-2] lea rcx, [rdi+rcx*4+8] loc_11A7: cmp [rax], edx jnz short loc_11BC add rax, 4 cmp rax, rcx jnz short loc_11A7 lea rax, unk_2007 retn loc_11BC: lea ra...
void * func0(_DWORD *a1, int a2) { void *result; // rax _DWORD *v3; // rax result = &unk_2007; if ( a2 > 1 ) { v3 = a1 + 1; while ( *v3 == *a1 ) { if ( ++v3 == &a1[a2 - 2 + 2] ) return &unk_2007; } return &unk_2004; } return result; }
func0: ENDBR64 LEA RAX,[0x102007] CMP ESI,0x1 JLE 0x001011c3 MOV EDX,dword ptr [RDI] LEA RAX,[RDI + 0x4] LEA ECX,[RSI + -0x2] LEA RCX,[RDI + RCX*0x4 + 0x8] LAB_001011a7: CMP dword ptr [RAX],EDX JNZ 0x001011bc ADD RAX,0x4 CMP RAX,RCX JNZ 0x001011a7 LEA RAX,[0x102007] RET LAB_001011bc: LEA RAX,[0x102004] LAB_001011c3: RE...
int * func0(int *param_1,int param_2) { int *puVar1; int *piVar2; puVar1 = &DAT_00102007; if (1 < param_2) { piVar2 = param_1 + 1; while (*piVar2 == *param_1) { piVar2 = piVar2 + 1; if (piVar2 == param_1 + (ulong)(param_2 - 2) + 2) { return &DAT_00102007; } } puVar1...
6,934
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h>
const char* func0(int arr[], int n) { for(int i = 1; i < n; i++) { if(arr[i] != arr[0]) { return "NO"; } } return "YES"; }
int main() { int arr1[] = {1, 1, 1}; assert(strcmp(func0(arr1, 3), "YES") == 0); int arr2[] = {1, 2, 1, 2}; assert(strcmp(func0(arr2, 4), "NO") == 0); int arr3[] = {1, 2, 3, 4, 5}; assert(strcmp(func0(arr3, 5), "NO") == 0); return 0; }
O2
c
func0: endbr64 lea 0xebc(%rip),%rax cmp $0x1,%esi jle 1174 <func0+0x34> lea -0x2(%rsi),%ecx mov (%rdi),%edx lea 0x4(%rdi),%rax lea 0x8(%rdi,%rcx,4),%rcx jmp 1169 <func0+0x29> add $0x4,%rax cmp %rcx,%rax je 1178 <func0+0x38> cmp %edx,(%rax) je 1160 <func0+0x20> lea 0xe90(%rip)...
func0: endbr64 lea rax, unk_2007 cmp esi, 1 jle short locret_1174 lea ecx, [rsi-2] mov edx, [rdi] lea rax, [rdi+4] lea rcx, [rdi+rcx*4+8] jmp short loc_1169 loc_1160: add rax, 4 cmp rax, rcx jz short loc_1178 loc_1169: cmp [rax], edx jz short loc_1160 lea rax, u...
void * func0(_DWORD *a1, int a2) { void *result; // rax _DWORD *v3; // rax result = &unk_2007; if ( a2 > 1 ) { v3 = a1 + 1; do { if ( *v3 != *a1 ) return &unk_2004; ++v3; } while ( v3 != &a1[a2 - 2 + 2] ); return &unk_2007; } return result; }
func0: ENDBR64 LEA RAX,[0x102007] CMP ESI,0x1 JLE 0x00101174 LEA ECX,[RSI + -0x2] MOV EDX,dword ptr [RDI] LEA RAX,[RDI + 0x4] LEA RCX,[RDI + RCX*0x4 + 0x8] JMP 0x00101169 LAB_00101160: ADD RAX,0x4 CMP RAX,RCX JZ 0x00101178 LAB_00101169: CMP dword ptr [RAX],EDX JZ 0x00101160 LEA RAX,[0x102004] LAB_00101174: RET LAB_0010...
int * func0(int *param_1,int param_2) { int *puVar1; int *piVar2; puVar1 = &DAT_00102007; if (1 < param_2) { piVar2 = param_1 + 1; while (*piVar2 == *param_1) { piVar2 = piVar2 + 1; if (piVar2 == param_1 + (ulong)(param_2 - 2) + 2) { return &DAT_00102007; } } puVar1...
6,935
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h>
const char* func0(int arr[], int n) { for(int i = 1; i < n; i++) { if(arr[i] != arr[0]) { return "NO"; } } return "YES"; }
int main() { int arr1[] = {1, 1, 1}; assert(strcmp(func0(arr1, 3), "YES") == 0); int arr2[] = {1, 2, 1, 2}; assert(strcmp(func0(arr2, 4), "NO") == 0); int arr3[] = {1, 2, 3, 4, 5}; assert(strcmp(func0(arr3, 5), "NO") == 0); return 0; }
O3
c
func0: endbr64 lea 0xebc(%rip),%rax cmp $0x1,%esi jle 1174 <func0+0x34> lea -0x2(%rsi),%ecx mov (%rdi),%edx lea 0x4(%rdi),%rax lea 0x8(%rdi,%rcx,4),%rcx jmp 1169 <func0+0x29> add $0x4,%rax cmp %rcx,%rax je 1178 <func0+0x38> cmp %edx,(%rax) je 1160 <func0+0x20> lea 0xe90(%rip)...
func0: endbr64 lea rax, unk_2007 cmp esi, 1 jle short locret_1174 lea ecx, [rsi-2] mov edx, [rdi] lea rax, [rdi+4] lea rcx, [rdi+rcx*4+8] jmp short loc_1169 loc_1160: add rax, 4 cmp rax, rcx jz short loc_1178 loc_1169: cmp [rax], edx jz short loc_1160 lea rax, u...
void * func0(_DWORD *a1, int a2) { void *result; // rax _DWORD *v3; // rax result = &unk_2007; if ( a2 > 1 ) { v3 = a1 + 1; do { if ( *v3 != *a1 ) return &unk_2004; ++v3; } while ( v3 != &a1[a2 - 2 + 2] ); return &unk_2007; } return result; }
func0: ENDBR64 LEA RAX,[0x102007] CMP ESI,0x1 JLE 0x00101174 LEA ECX,[RSI + -0x2] MOV EDX,dword ptr [RDI] LEA RAX,[RDI + 0x4] LEA RCX,[RDI + RCX*0x4 + 0x8] JMP 0x00101169 LAB_00101160: ADD RAX,0x4 CMP RAX,RCX JZ 0x00101178 LAB_00101169: CMP dword ptr [RAX],EDX JZ 0x00101160 LEA RAX,[0x102004] LAB_00101174: RET LAB_0010...
int * func0(int *param_1,int param_2) { int *puVar1; int *piVar2; puVar1 = &DAT_00102007; if (1 < param_2) { piVar2 = param_1 + 1; while (*piVar2 == *param_1) { piVar2 = piVar2 + 1; if (piVar2 == param_1 + (ulong)(param_2 - 2) + 2) { return &DAT_00102007; } } puVar1...
6,936
func0
#include <assert.h> #include <stdio.h>
double func0(double d, double a){ double pi = 22.0/7.0; if (a >= 360){ return -1; // Use -1 to represent None since C does not have a None type } double arclength = (pi * d) * (a / 360); return arclength; }
int main() { assert(func0(9, 45) - 3.5357142857142856 < 0.0001); assert(func0(9, 480) == -1); // Using -1 to represent None assert(func0(5, 270) - 11.785714285714285 < 0.0001); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp movsd %xmm0,-0x18(%rbp) movsd %xmm1,-0x20(%rbp) movsd 0xf5d(%rip),%xmm0 movsd %xmm0,-0x10(%rbp) movsd -0x20(%rbp),%xmm0 comisd 0xf53(%rip),%xmm0 jb 1181 <func0+0x38> movsd 0xf51(%rip),%xmm0 jmp 11ae <func0+0x65> movsd -0x10(%rbp),%xmm0 movapd %xmm0,%xmm1 mulsd ...
func0: endbr64 push rbp mov rbp, rsp movsd [rbp+var_18], xmm0 movsd [rbp+var_20], xmm1 movsd xmm0, cs:qword_20A0 movsd [rbp+var_10], xmm0 movsd xmm0, [rbp+var_20] comisd xmm0, cs:qword_20A8 jb short loc_1181 movsd xmm0, cs:qword_20B0 jmp short loc_11AE loc_1181: movsd xmm0, [rbp+var_10] m...
double func0(double a1, double a2) { if ( a2 < 360.0 ) return a2 / 360.0 * (3.142857142857143 * a1); else return -1.0; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOVSD qword ptr [RBP + -0x18],XMM0 MOVSD qword ptr [RBP + -0x20],XMM1 MOVSD XMM0,qword ptr [0x001020a0] MOVSD qword ptr [RBP + -0x10],XMM0 MOVSD XMM0,qword ptr [RBP + -0x20] COMISD XMM0,qword ptr [0x001020a8] JC 0x00101181 MOVSD XMM0,qword ptr [0x001020b0] JMP 0x001011ae LAB_00101181...
double func0(double param_1,double param_2) { double dVar1; dVar1 = DAT_001020b0; if (param_2 < DAT_001020a8) { dVar1 = (param_2 / DAT_001020a8) * DAT_001020a0 * param_1; } return dVar1; }
6,937
func0
#include <assert.h> #include <stdio.h>
double func0(double d, double a){ double pi = 22.0/7.0; if (a >= 360){ return -1; // Use -1 to represent None since C does not have a None type } double arclength = (pi * d) * (a / 360); return arclength; }
int main() { assert(func0(9, 45) - 3.5357142857142856 < 0.0001); assert(func0(9, 480) == -1); // Using -1 to represent None assert(func0(5, 270) - 11.785714285714285 < 0.0001); return 0; }
O1
c
func0: endbr64 comisd 0xedb(%rip),%xmm1 jae 114c <func0+0x23> mulsd 0xed9(%rip),%xmm0 divsd 0xec9(%rip),%xmm1 mulsd %xmm1,%xmm0 retq movsd 0xeb4(%rip),%xmm0 retq
func0: endbr64 comisd xmm1, cs:qword_2010 jnb short loc_114C mulsd xmm0, cs:qword_2018 divsd xmm1, cs:qword_2010 mulsd xmm0, xmm1 retn loc_114C: movsd xmm0, cs:qword_2008 retn
double func0(double a1, double a2) { if ( a2 >= 360.0 ) return -1.0; else return a1 * 3.142857142857143 * (a2 / 360.0); }
func0: ENDBR64 COMISD XMM1,qword ptr [0x00102010] JNC 0x0010114c MULSD XMM0,qword ptr [0x00102018] DIVSD XMM1,qword ptr [0x00102010] MULSD XMM0,XMM1 RET LAB_0010114c: MOVSD XMM0,qword ptr [0x00102008] RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ double func0(double param_1,double param_2) { if (param_2 < _DAT_00102010) { return param_1 * _DAT_00102018 * (param_2 / _DAT_00102010); } return DAT_00102008; }
6,938
func0
#include <assert.h> #include <stdio.h>
double func0(double d, double a){ double pi = 22.0/7.0; if (a >= 360){ return -1; // Use -1 to represent None since C does not have a None type } double arclength = (pi * d) * (a / 360); return arclength; }
int main() { assert(func0(9, 45) - 3.5357142857142856 < 0.0001); assert(func0(9, 480) == -1); // Using -1 to represent None assert(func0(5, 270) - 11.785714285714285 < 0.0001); return 0; }
O2
c
func0: endbr64 movsd 0xec4(%rip),%xmm2 comisd %xmm2,%xmm1 jae 1168 <func0+0x28> divsd %xmm2,%xmm1 mulsd 0xeba(%rip),%xmm0 mulsd %xmm1,%xmm0 retq nopl 0x0(%rax,%rax,1) movsd 0xe98(%rip),%xmm0 retq nopw %cs:0x0(%rax,%rax,1) nopl 0x0(%rax,%rax,1)
func0: endbr64 movsd xmm2, cs:qword_2010 comisd xmm1, xmm2 jnb short loc_1168 divsd xmm1, xmm2 mulsd xmm0, cs:qword_2018 mulsd xmm0, xmm1 retn loc_1168: movsd xmm0, cs:qword_2008 retn
double func0(double a1, double a2) { if ( a2 >= 360.0 ) return -1.0; else return a1 * 3.142857142857143 * (a2 / 360.0); }
func0: ENDBR64 MOVSD XMM2,qword ptr [0x00102010] COMISD XMM1,XMM2 JNC 0x00101168 DIVSD XMM1,XMM2 MULSD XMM0,qword ptr [0x00102018] MULSD XMM0,XMM1 RET LAB_00101168: MOVSD XMM0,qword ptr [0x00102008] RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ double func0(double param_1,double param_2) { if (param_2 < DAT_00102010) { return param_1 * _DAT_00102018 * (param_2 / DAT_00102010); } return DAT_00102008; }
6,939
func0
#include <assert.h> #include <stdio.h>
double func0(double d, double a){ double pi = 22.0/7.0; if (a >= 360){ return -1; // Use -1 to represent None since C does not have a None type } double arclength = (pi * d) * (a / 360); return arclength; }
int main() { assert(func0(9, 45) - 3.5357142857142856 < 0.0001); assert(func0(9, 480) == -1); // Using -1 to represent None assert(func0(5, 270) - 11.785714285714285 < 0.0001); return 0; }
O3
c
func0: endbr64 movsd 0xec4(%rip),%xmm2 comisd %xmm2,%xmm1 jae 1168 <func0+0x28> divsd %xmm2,%xmm1 mulsd 0xeba(%rip),%xmm0 mulsd %xmm1,%xmm0 retq nopl 0x0(%rax,%rax,1) movsd 0xe98(%rip),%xmm0 retq nopw %cs:0x0(%rax,%rax,1) nopl 0x0(%rax,%rax,1)
func0: endbr64 movsd xmm2, cs:qword_2010 comisd xmm1, xmm2 jnb short loc_1168 divsd xmm1, xmm2 mulsd xmm0, cs:qword_2018 mulsd xmm0, xmm1 retn loc_1168: movsd xmm0, cs:qword_2008 retn
double func0(double a1, double a2) { if ( a2 >= 360.0 ) return -1.0; else return a1 * 3.142857142857143 * (a2 / 360.0); }
func0: ENDBR64 MOVSD XMM2,qword ptr [0x00102010] COMISD XMM1,XMM2 JNC 0x00101168 DIVSD XMM1,XMM2 MULSD XMM0,qword ptr [0x00102018] MULSD XMM0,XMM1 RET LAB_00101168: MOVSD XMM0,qword ptr [0x00102008] RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ double func0(double param_1,double param_2) { if (param_2 < DAT_00102010) { return param_1 * _DAT_00102018 * (param_2 / DAT_00102010); } return DAT_00102008; }
6,940
func0
#include <assert.h>
int func0(int monthnum3) { if (monthnum3 == 4 || monthnum3 == 6 || monthnum3 == 9 || monthnum3 == 11) { return 1; // True in C } else { return 0; // False in C } }
int main() { assert(func0(6) == 1); assert(func0(2) == 0); assert(func0(12) == 0); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x4(%rbp) cmpl $0x4,-0x4(%rbp) je 116c <func0+0x23> cmpl $0x6,-0x4(%rbp) je 116c <func0+0x23> cmpl $0x9,-0x4(%rbp) je 116c <func0+0x23> cmpl $0xb,-0x4(%rbp) jne 1173 <func0+0x2a> mov $0x1,%eax jmp 1178 <func0+0x2f> mov $0x0,%eax po...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_4], edi cmp [rbp+var_4], 4 jz short loc_116C cmp [rbp+var_4], 6 jz short loc_116C cmp [rbp+var_4], 9 jz short loc_116C cmp [rbp+var_4], 0Bh jnz short loc_1173 loc_116C: mov eax, 1 jmp short loc_1178 loc_1173: mov ...
_BOOL8 func0(int a1) { return a1 == 4 || a1 == 6 || a1 == 9 || a1 == 11; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x4],EDI CMP dword ptr [RBP + -0x4],0x4 JZ 0x0010116c CMP dword ptr [RBP + -0x4],0x6 JZ 0x0010116c CMP dword ptr [RBP + -0x4],0x9 JZ 0x0010116c CMP dword ptr [RBP + -0x4],0xb JNZ 0x00101173 LAB_0010116c: MOV EAX,0x1 JMP 0x00101178 LAB_00101173: MOV EAX,0x0 LAB_0...
int8 func0(int param_1) { int8 uVar1; if ((((param_1 == 4) || (param_1 == 6)) || (param_1 == 9)) || (param_1 == 0xb)) { uVar1 = 1; } else { uVar1 = 0; } return uVar1; }
6,941
func0
#include <assert.h>
int func0(int monthnum3) { if (monthnum3 == 4 || monthnum3 == 6 || monthnum3 == 9 || monthnum3 == 11) { return 1; // True in C } else { return 0; // False in C } }
int main() { assert(func0(6) == 1); assert(func0(2) == 0); assert(func0(12) == 0); return 0; }
O1
c
func0: endbr64 and $0xfffffffd,%edi mov $0x1,%eax cmp $0x4,%edi je 1143 <func0+0x1a> cmp $0x9,%edi sete %al movzbl %al,%eax retq
func0: endbr64 cmp edi, 0Bh ja short loc_1140 mov eax, 0A50h mov ecx, edi shr rax, cl and eax, 1 retn loc_1140: mov eax, 0 retn
unsigned long long func0(unsigned int a1) { if ( a1 > 0xB ) return 0LL; else return (0xA50uLL >> a1) & 1; }
func0: ENDBR64 CMP EDI,0xb JA 0x00101140 MOV EAX,0xa50 MOV ECX,EDI SHR RAX,CL AND EAX,0x1 RET LAB_00101140: MOV EAX,0x0 RET
uint func0(uint param_1) { if (param_1 < 0xc) { return (uint)(0xa50L >> ((byte)param_1 & 0x3f)) & 1; } return 0; }
6,942
func0
#include <assert.h>
int func0(int monthnum3) { if (monthnum3 == 4 || monthnum3 == 6 || monthnum3 == 9 || monthnum3 == 11) { return 1; // True in C } else { return 0; // False in C } }
int main() { assert(func0(6) == 1); assert(func0(2) == 0); assert(func0(12) == 0); return 0; }
O2
c
func0: endbr64 and $0xfffffffd,%edi mov $0x1,%eax cmp $0x4,%edi je 1159 <func0+0x19> xor %eax,%eax cmp $0x9,%edi sete %al retq nopw 0x0(%rax,%rax,1)
func0: endbr64 cmp edi, 0Bh ja short loc_1160 mov ecx, edi mov eax, 0A50h shr rax, cl and eax, 1 retn loc_1160: xor eax, eax retn
unsigned long long func0(unsigned int a1) { if ( a1 > 0xB ) return 0LL; else return (0xA50uLL >> a1) & 1; }
func0: ENDBR64 CMP EDI,0xb JA 0x00101160 MOV ECX,EDI MOV EAX,0xa50 SHR RAX,CL AND EAX,0x1 RET LAB_00101160: XOR EAX,EAX RET
uint func0(uint param_1) { if (param_1 < 0xc) { return (uint)(0xa50L >> ((byte)param_1 & 0x3f)) & 1; } return 0; }
6,943
func0
#include <assert.h>
int func0(int monthnum3) { if (monthnum3 == 4 || monthnum3 == 6 || monthnum3 == 9 || monthnum3 == 11) { return 1; // True in C } else { return 0; // False in C } }
int main() { assert(func0(6) == 1); assert(func0(2) == 0); assert(func0(12) == 0); return 0; }
O3
c
func0: endbr64 and $0xfffffffd,%edi mov $0x1,%eax cmp $0x4,%edi je 1159 <func0+0x19> xor %eax,%eax cmp $0x9,%edi sete %al retq nopw 0x0(%rax,%rax,1)
func0: endbr64 xor eax, eax cmp edi, 0Bh ja short locret_115A mov eax, 0A50h bt rax, rdi setb al movzx eax, al locret_115A: retn
long long func0(unsigned long long a1) { long long result; // rax long long v2; // rax result = 0LL; if ( (unsigned int)a1 <= 0xB ) { v2 = 2640LL; return _bittest64(&v2, a1); } return result; }
func0: ENDBR64 XOR EAX,EAX CMP EDI,0xb JA 0x0010115a MOV EAX,0xa50 BT RAX,RDI SETC AL MOVZX EAX,AL LAB_0010115a: RET
bool func0(uint param_1) { bool bVar1; bVar1 = false; if (param_1 < 0xc) { bVar1 = (0xa50UL >> ((ulong)param_1 & 0x3f) & 1) != 0; } return bVar1; }
6,944
func0
#include <assert.h> #include <stdlib.h>
int func0(int arr[], int n) { int i, j, temp; // Sorting the array for (i = 0; i < n-1; i++) { for (j = 0; j < n-i-1; j++) { if (arr[j] > arr[j+1]) { temp = arr[j]; arr[j] = arr[j+1]; arr[j+1] = temp; } } ...
int main() { int arr1[] = {1, 5, 3, 19, 18, 25}; int arr2[] = {4, 3, 2, 6}; int arr3[] = {30, 5, 20, 9}; assert(func0(arr1, 6) == 1); assert(func0(arr2, 4) == 1); assert(func0(arr3, 4) == 4); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) movl $0x0,-0x10(%rbp) jmpq 1245 <func0+0xdc> movl $0x0,-0xc(%rbp) jmpq 122f <func0+0xc6> mov -0xc(%rbp),%eax cltq lea 0x0(,%rax,4),%rdx mov -0x18(%rbp),%rax add %rdx,%rax mov (%rax),%edx mov -0xc(%rbp),...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_10], 0 jmp loc_1245 loc_1184: mov [rbp+var_C], 0 jmp loc_122F loc_1190: mov eax, [rbp+var_C] cdqe lea rdx, ds:0[rax*4] mov rax, [rbp+var_18] add rax, rdx mov edx, [rax] mov ...
long long func0(long long a1, int a2) { int i; // [rsp+Ch] [rbp-10h] int k; // [rsp+Ch] [rbp-10h] int j; // [rsp+10h] [rbp-Ch] int v6; // [rsp+14h] [rbp-8h] int v7; // [rsp+18h] [rbp-4h] for ( i = 0; i < a2 - 1; ++i ) { for ( j = 0; j < a2 - i - 1; ++j ) { if ( *(_DWORD *)(4LL * j + a1) > ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV dword ptr [RBP + -0x10],0x0 JMP 0x00101245 LAB_00101184: MOV dword ptr [RBP + -0xc],0x0 JMP 0x0010122f LAB_00101190: MOV EAX,dword ptr [RBP + -0xc] CDQE LEA RDX,[RAX*0x4] MOV RAX,qword ptr [RBP + -0x18] ADD RAX,RDX M...
int func0(long param_1,int param_2) { int4 uVar1; int4 local_18; int4 local_14; int4 local_10; for (local_18 = 0; local_18 < param_2 + -1; local_18 = local_18 + 1) { for (local_14 = 0; local_14 < (param_2 - local_18) + -1; local_14 = local_14 + 1) { if (*(int *)(param_1 + ((long)local_14 + 1) * ...
6,945
func0
#include <assert.h> #include <stdlib.h>
int func0(int arr[], int n) { int i, j, temp; // Sorting the array for (i = 0; i < n-1; i++) { for (j = 0; j < n-i-1; j++) { if (arr[j] > arr[j+1]) { temp = arr[j]; arr[j] = arr[j+1]; arr[j+1] = temp; } } ...
int main() { int arr1[] = {1, 5, 3, 19, 18, 25}; int arr2[] = {4, 3, 2, 6}; int arr3[] = {30, 5, 20, 9}; assert(func0(arr1, 6) == 1); assert(func0(arr2, 4) == 1); assert(func0(arr3, 4) == 4); return 0; }
O1
c
func0: endbr64 lea -0x1(%rsi),%r9d test %r9d,%r9d jle 11d3 <func0+0x6a> lea 0x4(%rdi),%r10 jmp 119b <func0+0x32> add $0x4,%rax cmp %r8,%rax je 1195 <func0+0x2c> mov (%rax),%edx mov 0x4(%rax),%ecx cmp %ecx,%edx jle 117c <func0+0x13> mov %ecx,(%rax) mov %edx,0x4(%rax) jmp 117c...
func0: endbr64 lea r9d, [rsi-1] test r9d, r9d jle short loc_11D3 lea r10, [rdi+4] jmp short loc_119B loc_117C: add rax, 4 cmp rax, r8 jz short loc_1195 loc_1185: mov edx, [rax] mov ecx, [rax+4] cmp edx, ecx jle short loc_117C mov [rax], ecx mov [rax+4], edx jmp ...
long long func0(int *a1, int a2) { int v2; // r9d int *v3; // rax int v4; // edx int v5; // ecx int *v6; // rax long long v7; // rsi int v8; // ecx v2 = a2 - 1; if ( a2 - 1 <= 0 ) { return 0x7FFFFFFF; } else { do { if ( v2 > 0 ) { v3 = a1; do {...
func0: ENDBR64 LEA R9D,[RSI + -0x1] TEST R9D,R9D JLE 0x001011d3 LEA R10,[RDI + 0x4] JMP 0x0010119b LAB_0010117c: ADD RAX,0x4 CMP RAX,R8 JZ 0x00101195 LAB_00101185: MOV EDX,dword ptr [RAX] MOV ECX,dword ptr [RAX + 0x4] CMP EDX,ECX JLE 0x0010117c MOV dword ptr [RAX],ECX MOV dword ptr [RAX + 0x4],EDX JMP 0x0010117c LAB_00...
int func0(int *param_1,int param_2) { int iVar1; int *piVar2; int iVar3; iVar3 = param_2 + -1; if (iVar3 < 1) { iVar3 = 0x7fffffff; } else { do { if (0 < iVar3) { piVar2 = param_1; do { iVar1 = *piVar2; if (piVar2[1] < iVar1) { *piVar2 = pi...
6,946
func0
#include <assert.h> #include <stdlib.h>
int func0(int arr[], int n) { int i, j, temp; // Sorting the array for (i = 0; i < n-1; i++) { for (j = 0; j < n-i-1; j++) { if (arr[j] > arr[j+1]) { temp = arr[j]; arr[j] = arr[j+1]; arr[j+1] = temp; } } ...
int main() { int arr1[] = {1, 5, 3, 19, 18, 25}; int arr2[] = {4, 3, 2, 6}; int arr3[] = {30, 5, 20, 9}; assert(func0(arr1, 6) == 1); assert(func0(arr2, 4) == 1); assert(func0(arr3, 4) == 4); return 0; }
O2
c
func0: endbr64 lea -0x1(%rsi),%edx test %edx,%edx jle 1319 <func0+0x69> 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 12de <func0+0x2e> mov %ecx,(%rax) mov %edx,0x4(%rax) add ...
func0: endbr64 lea edx, [rsi-1] test edx, edx jle short loc_1319 lea r10, [rdi+4] nop loc_12C0: sub edx, 1 mov rax, rdi mov r9, rdx lea r8, [r10+rdx*4] nop dword ptr [rax] loc_12D0: mov edx, [rax] mov ecx, [rax+4] cmp edx, ecx jle short loc_12DE mov [rax], ecx mov ...
long long func0(int *a1, int a2) { int v2; // edx _DWORD *v3; // r10 int *v4; // rax int v5; // r9d int *v6; // r8 int v7; // edx int v8; // ecx int v9; // r8d v2 = a2 - 1; if ( a2 - 1 <= 0 ) return 0x7FFFFFFFLL; v3 = a1 + 1; do { v4 = a1; v5 = v2 - 1; v6 = &v3[v2 - 1]; d...
func0: ENDBR64 LEA EDX,[RSI + -0x1] TEST EDX,EDX JLE 0x00101319 LEA R10,[RDI + 0x4] NOP LAB_001012c0: SUB EDX,0x1 MOV RAX,RDI MOV R9,RDX LEA R8,[R10 + RDX*0x4] NOP dword ptr [RAX] LAB_001012d0: MOV EDX,dword ptr [RAX] MOV ECX,dword ptr [RAX + 0x4] CMP EDX,ECX JLE 0x001012de MOV dword ptr [RAX],ECX MOV dword ptr [RAX + ...
int func0(int *param_1,int param_2) { int *piVar1; uint uVar2; int iVar3; uVar2 = param_2 - 1; if ((int)uVar2 < 1) { return 0x7fffffff; } do { uVar2 = uVar2 - 1; piVar1 = param_1; do { iVar3 = *piVar1; if (piVar1[1] < iVar3) { *piVar1 = piVar1[1]; piVar1[1] ...
6,947
func0
#include <assert.h> #include <stdlib.h>
int func0(int arr[], int n) { int i, j, temp; // Sorting the array for (i = 0; i < n-1; i++) { for (j = 0; j < n-i-1; j++) { if (arr[j] > arr[j+1]) { temp = arr[j]; arr[j] = arr[j+1]; arr[j+1] = temp; } } ...
int main() { int arr1[] = {1, 5, 3, 19, 18, 25}; int arr2[] = {4, 3, 2, 6}; int arr3[] = {30, 5, 20, 9}; assert(func0(arr1, 6) == 1); assert(func0(arr2, 4) == 1); assert(func0(arr3, 4) == 4); return 0; }
O3
c
func0: endbr64 lea -0x1(%rsi),%r10d test %r10d,%r10d jle 1448 <func0+0x1d8> mov %r10d,%edx lea 0x4(%rdi),%r11 nopl 0x0(%rax,%rax,1) sub $0x1,%edx mov %rdi,%rax mov %rdx,%r9 lea (%r11,%rdx,4),%r8 nopl (%rax) mov (%rax),%edx mov 0x4(%rax),%ecx cmp %ecx,%edx jle 12ae <func0+0x3e> ...
func0: endbr64 lea r11d, [rsi-1] test r11d, r11d jle loc_146D push rbp mov r8d, esi mov r10, rdi push rbx mov ebx, esi lea rsi, [rdi+4] nop loc_1290: cmp r8d, 1 jle loc_1410 lea eax, [r8-2] mov r9, r10 lea rdi, [rsi+rax*4] mov rax, r10 nop dword ptr [rax+rax+...
long long func0(__m128i *a1, int a2) { int v2; // r11d int v3; // r8d __m128i *v4; // r9 __m128i *v5; // rax __m128i v6; // xmm0 int v7; // ebx __m128i si128; // xmm0 __m128i v9; // xmm2 __m128i v10; // xmm4 __m128i v11; // xmm2 __m128i v12; // xmm1 __m128i v13; // xmm2 signed int v14; // edx...
func0: ENDBR64 LEA R11D,[RSI + -0x1] TEST R11D,R11D JLE 0x0010146d PUSH RBP MOV R8D,ESI MOV R10,RDI PUSH RBX MOV EBX,ESI LEA RSI,[RDI + 0x4] NOP LAB_00101290: CMP R8D,0x1 JLE 0x00101410 LEA EAX,[R8 + -0x2] MOV R9,R10 LEA RDI,[RSI + RAX*0x4] MOV RAX,R10 NOP dword ptr [RAX + RAX*0x1] LAB_001012b0: MOVQ XMM0,qword ptr [RA...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ uint func0(int *param_1,int param_2) { int *piVar1; int *piVar2; int *piVar3; int *piVar4; int *piVar5; int *piVar6; int *piVar7; uint uVar8; int *piVar9; uint uVar10; uint uVar11; int iVar12; uint uVar13; ...
6,948
func0
#include <stdio.h> #include <string.h> #include <assert.h>
int func0(char str[]) { int number_ctr = 0; for (int i = 0; i < strlen(str); i++) { if (str[i] >= '0' && str[i] <= '9') { number_ctr += 1; } } return number_ctr; }
int main() { assert(func0("program2bedone") == 1); assert(func0("3wonders") == 1); assert(func0("123") == 3); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x28,%rsp mov %rdi,-0x28(%rbp) movl $0x0,-0x18(%rbp) movl $0x0,-0x14(%rbp) jmp 11ba <func0+0x51> mov -0x14(%rbp),%eax movslq %eax,%rdx mov -0x28(%rbp),%rax add %rdx,%rax movzbl (%rax),%eax cmp $0x2f,%al jle 11b6 <func0+0x4d> mov ...
func0: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 28h mov [rbp+s], rdi mov [rbp+var_18], 0 mov [rbp+var_14], 0 jmp short loc_11BA loc_118A: mov eax, [rbp+var_14] movsxd rdx, eax mov rax, [rbp+s] add rax, rdx movzx eax, byte ptr [rax] cmp al, 2Fh ; '/' jle short ...
long long func0(const char *a1) { unsigned int v2; // [rsp+18h] [rbp-18h] int i; // [rsp+1Ch] [rbp-14h] v2 = 0; for ( i = 0; i < strlen(a1); ++i ) { if ( a1[i] > 47 && a1[i] <= 57 ) ++v2; } return v2; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x28 MOV qword ptr [RBP + -0x28],RDI MOV dword ptr [RBP + -0x18],0x0 MOV dword ptr [RBP + -0x14],0x0 JMP 0x001011ba LAB_0010118a: MOV EAX,dword ptr [RBP + -0x14] MOVSXD RDX,EAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,RDX MOVZX EAX,byte ptr [RAX] CMP AL,0x2f JLE 0x001...
int func0(char *param_1) { size_t sVar1; int local_20; int local_1c; local_20 = 0; local_1c = 0; while( true ) { sVar1 = strlen(param_1); if (sVar1 <= (ulong)(long)local_1c) break; if (('/' < param_1[local_1c]) && (param_1[local_1c] < ':')) { local_20 = local_20 + 1; } local_1c...
6,949
func0
#include <stdio.h> #include <string.h> #include <assert.h>
int func0(char str[]) { int number_ctr = 0; for (int i = 0; i < strlen(str); i++) { if (str[i] >= '0' && str[i] <= '9') { number_ctr += 1; } } return number_ctr; }
int main() { assert(func0("program2bedone") == 1); assert(func0("3wonders") == 1); assert(func0("123") == 3); return 0; }
O1
c
func0: endbr64 mov %rdi,%rsi mov $0xffffffffffffffff,%rcx mov $0x0,%eax repnz scas %es:(%rdi),%al not %rcx mov %rsi,%rdx lea -0x1(%rsi,%rcx,1),%rsi mov $0x0,%ecx cmp %rsi,%rdx je 1184 <func0+0x3b> movzbl (%rdx),%eax sub $0x30,%eax cmp $0xa,%al adc $0x0,%ecx add $0x1,%rdx jmp 1...
func0: endbr64 push rbx mov rbx, rdi call _strlen mov rdi, rax mov rax, rbx add rdi, rbx mov ecx, 0 jmp short loc_1196 loc_1186: movzx esi, byte ptr [rax] lea edx, [rsi-30h] cmp dl, 0Ah adc ecx, 0 add rax, 1 loc_1196: cmp rax, rdi jnz short loc_1186 mov eax, e...
long long func0(_BYTE *a1) { long long v2; // rdi _BYTE *v3; // rax _BYTE *v4; // rdi unsigned int v5; // ecx v2 = strlen(); v3 = a1; v4 = &a1[v2]; v5 = 0; while ( v3 != v4 ) v5 += (unsigned __int8)(*v3++ - 48) < 0xAu; return v5; }
func0: ENDBR64 PUSH RBX MOV RBX,RDI CALL 0x00101060 MOV RDI,RAX MOV RAX,RBX ADD RDI,RBX MOV ECX,0x0 JMP 0x00101196 LAB_00101186: MOVZX ESI,byte ptr [RAX] LEA EDX,[RSI + -0x30] CMP DL,0xa ADC ECX,0x0 ADD RAX,0x1 LAB_00101196: CMP RAX,RDI JNZ 0x00101186 MOV EAX,ECX POP RBX RET
int func0(char *param_1) { size_t sVar1; int iVar2; char *pcVar3; sVar1 = strlen(param_1); pcVar3 = param_1 + sVar1; iVar2 = 0; for (; param_1 != pcVar3; param_1 = param_1 + 1) { iVar2 = iVar2 + (uint)((byte)(*param_1 - 0x30U) < 10); } return iVar2; }
6,950
func0
#include <stdio.h> #include <string.h> #include <assert.h>
int func0(char str[]) { int number_ctr = 0; for (int i = 0; i < strlen(str); i++) { if (str[i] >= '0' && str[i] <= '9') { number_ctr += 1; } } return number_ctr; }
int main() { assert(func0("program2bedone") == 1); assert(func0("3wonders") == 1); assert(func0("123") == 3); return 0; }
O2
c
func0: endbr64 push %rbx mov %rdi,%rbx callq 1060 <strlen@plt> mov %rbx,%rdi lea (%rbx,%rax,1),%rcx xor %eax,%eax jmp 1240 <func0+0x30> nopl 0x0(%rax,%rax,1) movzbl (%rdi),%esi lea -0x30(%rsi),%edx cmp $0xa,%dl adc $0x0,%eax add $0x1,%rdi cmp %rcx,%rdi jne 1230 <func0+0x20> pop ...
func0: endbr64 push rbx mov rbx, rdi call _strlen mov rdi, rbx lea rcx, [rbx+rax] xor eax, eax jmp short loc_1240 loc_1230: movzx esi, byte ptr [rdi] lea edx, [rsi-30h] cmp dl, 0Ah adc eax, 0 add rdi, 1 loc_1240: cmp rdi, rcx jnz short loc_1230 pop rbx retn
long long func0(_BYTE *a1) { _BYTE *v1; // rcx long long result; // rax v1 = &a1[strlen()]; result = 0LL; while ( a1 != v1 ) result = ((unsigned __int8)(*a1++ - 48) < 0xAu) + (unsigned int)result; return result; }
func0: ENDBR64 PUSH RBX MOV RBX,RDI CALL 0x00101060 MOV RDI,RBX LEA RCX,[RBX + RAX*0x1] XOR EAX,EAX JMP 0x00101240 LAB_00101230: MOVZX ESI,byte ptr [RDI] LEA EDX,[RSI + -0x30] CMP DL,0xa ADC EAX,0x0 ADD RDI,0x1 LAB_00101240: CMP RDI,RCX JNZ 0x00101230 POP RBX RET
int func0(char *param_1) { char *pcVar1; int iVar2; size_t sVar3; sVar3 = strlen(param_1); pcVar1 = param_1 + sVar3; iVar2 = 0; for (; param_1 != pcVar1; param_1 = param_1 + 1) { iVar2 = iVar2 + (uint)((byte)(*param_1 - 0x30U) < 10); } return iVar2; }
6,951
func0
#include <stdio.h> #include <string.h> #include <assert.h>
int func0(char str[]) { int number_ctr = 0; for (int i = 0; i < strlen(str); i++) { if (str[i] >= '0' && str[i] <= '9') { number_ctr += 1; } } return number_ctr; }
int main() { assert(func0("program2bedone") == 1); assert(func0("3wonders") == 1); assert(func0("123") == 3); return 0; }
O3
c
func0: endbr64 push %rbx mov %rdi,%rbx callq 1060 <strlen@plt> test %rax,%rax je 14b0 <func0+0x2a0> mov %rax,%rcx lea -0x1(%rax),%rax cmp $0xe,%rax jbe 14b4 <func0+0x2a4> mov %rcx,%rax mov %rbx,%rdx pxor %xmm1,%xmm1 movdqa 0xe67(%rip),%xmm7 and $0xfffffffffffffff0,%rax movdqa 0xe6b(%r...
func0: endbr64 push rbx mov rbx, rdi call _strlen test rax, rax jz loc_1470 mov rdx, rax lea rax, [rax-1] cmp rax, 0Eh jbe loc_1474 mov rcx, rdx pxor xmm1, xmm1 pxor xmm3, xmm3 mov rax, rbx and rcx, 0FFFFFFFFFFFFFFF0h movdqa xmm6, cs:xmmword_2090 movdqa xmm5, cs:xmm...
long long func0(const char *a1) { size_t v2; // rax size_t v3; // rdx __m128i v4; // xmm1 const __m128i *v5; // rax unsigned long long v6; // rcx __m128i si128; // xmm6 __m128i v8; // xmm5 __m128i v9; // xmm2 __m128i v10; // xmm0 __m128i v11; // xmm7 __m128i v12; // xmm2 __m128i v13; // xmm0 ...
func0: ENDBR64 PUSH RBX MOV RBX,RDI CALL 0x00101060 TEST RAX,RAX JZ 0x00101470 MOV RDX,RAX LEA RAX,[RAX + -0x1] CMP RAX,0xe JBE 0x00101474 MOV RCX,RDX PXOR XMM1,XMM1 PXOR XMM3,XMM3 MOV RAX,RBX AND RCX,-0x10 MOVDQA XMM6,xmmword ptr [0x00102090] MOVDQA XMM5,xmmword ptr [0x001020a0] PXOR XMM4,XMM4 LEA RSI,[RCX + RBX*0x1] ...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int func0(char *param_1) { bool bVar1; bool bVar2; bool bVar3; bool bVar4; bool bVar5; bool bVar6; bool bVar7; bool bVar8; bool bVar9; bool bVar10; bool bVar11; bool bVar12; bool bVar13; bool bVar14; boo...
6,952
func0
#include <stdio.h> #include <math.h> #include <assert.h>
int func0(int n) { n = n + 1; return n + (int)(log2(n + log2(n))); }
int main() { assert(func0(7) == 11); assert(func0(4) == 7); assert(func0(9) == 13); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x10,%rsp mov %edi,-0x4(%rbp) addl $0x1,-0x4(%rbp) cvtsi2sdl -0x4(%rbp),%xmm1 movsd %xmm1,-0x10(%rbp) cvtsi2sdl -0x4(%rbp),%xmm0 callq 1060 <log2@plt> addsd -0x10(%rbp),%xmm0 callq 1060 <log2@plt> cvttsd2si %xmm0,%edx mov -0x4(%rbp),%eax add %edx,%eax l...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_4], edi add [rbp+var_4], 1 pxor xmm1, xmm1 cvtsi2sd xmm1, [rbp+var_4] movsd [rbp+var_10], xmm1 pxor xmm2, xmm2 cvtsi2sd xmm2, [rbp+var_4] movq rax, xmm2 movq xmm0, rax; x call _log2 addsd xmm0, [rbp+var_10] movq rax,...
long long func0(int a1) { double v1; // xmm0_8 v1 = log2((double)(a1 + 1)); return (unsigned int)((int)log2(v1 + (double)(a1 + 1)) + a1 + 1); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV dword ptr [RBP + -0x4],EDI ADD dword ptr [RBP + -0x4],0x1 PXOR XMM1,XMM1 CVTSI2SD XMM1,dword ptr [RBP + -0x4] MOVSD qword ptr [RBP + -0x10],XMM1 PXOR XMM2,XMM2 CVTSI2SD XMM2,dword ptr [RBP + -0x4] MOVQ RAX,XMM2 MOVQ XMM0,RAX CALL 0x00101060 ADDSD XMM0,qword ptr [RBP ...
int func0(int param_1) { double dVar1; param_1 = param_1 + 1; dVar1 = log2((double)param_1); dVar1 = log2(dVar1 + (double)param_1); return param_1 + (int)dVar1; }
6,953
func0
#include <stdio.h> #include <math.h> #include <assert.h>
int func0(int n) { n = n + 1; return n + (int)(log2(n + log2(n))); }
int main() { assert(func0(7) == 11); assert(func0(4) == 7); assert(func0(9) == 13); return 0; }
O1
c
func0: endbr64 push %rbx sub $0x10,%rsp lea 0x1(%rdi),%ebx pxor %xmm1,%xmm1 cvtsi2sd %ebx,%xmm1 movsd %xmm1,0x8(%rsp) movapd %xmm1,%xmm0 callq 1060 <log2@plt> addsd 0x8(%rsp),%xmm0 callq 1060 <log2@plt> cvttsd2si %xmm0,%eax add %ebx,%eax add $0x10,%rsp pop %rbx retq
func0: endbr64 push rbx sub rsp, 10h lea ebx, [rdi+1] pxor xmm1, xmm1 cvtsi2sd xmm1, ebx movsd [rsp+18h+var_10], xmm1 movapd xmm0, xmm1 call _log2 addsd xmm0, [rsp+18h+var_10] call _log2 cvttsd2si eax, xmm0 add eax, ebx add rsp, 10h pop rbx retn
long long func0(int a1) { double v1; // xmm0_8 v1 = log2((double)(a1 + 1)); return (unsigned int)(a1 + 1 + (int)log2(v1 + (double)(a1 + 1))); }
func0: ENDBR64 PUSH RBX SUB RSP,0x10 LEA EBX,[RDI + 0x1] PXOR XMM1,XMM1 CVTSI2SD XMM1,EBX MOVSD qword ptr [RSP + 0x8],XMM1 MOVAPD XMM0,XMM1 CALL 0x00101060 ADDSD XMM0,qword ptr [RSP + 0x8] CALL 0x00101060 CVTTSD2SI EAX,XMM0 ADD EAX,EBX ADD RSP,0x10 POP RBX RET
int func0(int param_1) { double dVar1; double __x; __x = (double)(param_1 + 1); dVar1 = log2(__x); dVar1 = log2(dVar1 + __x); return (int)dVar1 + param_1 + 1; }
6,954
func0
#include <stdio.h> #include <math.h> #include <assert.h>
int func0(int n) { n = n + 1; return n + (int)(log2(n + log2(n))); }
int main() { assert(func0(7) == 11); assert(func0(4) == 7); assert(func0(9) == 13); return 0; }
O2
c
func0: endbr64 push %rbx pxor %xmm1,%xmm1 lea 0x1(%rdi),%ebx cvtsi2sd %ebx,%xmm1 sub $0x10,%rsp movapd %xmm1,%xmm0 movsd %xmm1,0x8(%rsp) callq 1060 <log2@plt> movsd 0x8(%rsp),%xmm1 addsd %xmm1,%xmm0 callq 1060 <log2@plt> add $0x10,%rsp cvttsd2si %xmm0,%eax add %ebx,%eax pop %rbx retq xchg %ax,...
func0: endbr64 push rbx pxor xmm1, xmm1 lea ebx, [rdi+1] cvtsi2sd xmm1, ebx sub rsp, 10h movapd xmm0, xmm1 movsd [rsp+18h+var_10], xmm1 call _log2 movsd xmm1, [rsp+18h+var_10] addsd xmm0, xmm1 call _log2 add rsp, 10h cvttsd2si eax, xmm0 add eax, ebx pop rbx retn
long long func0(int a1) { double v1; // xmm0_8 v1 = log2((double)(a1 + 1)); return (unsigned int)(a1 + 1 + (int)log2(v1 + (double)(a1 + 1))); }
func0: ENDBR64 PUSH RBX PXOR XMM1,XMM1 LEA EBX,[RDI + 0x1] CVTSI2SD XMM1,EBX SUB RSP,0x10 MOVAPD XMM0,XMM1 MOVSD qword ptr [RSP + 0x8],XMM1 CALL 0x00101060 MOVSD XMM1,qword ptr [RSP + 0x8] ADDSD XMM0,XMM1 CALL 0x00101060 ADD RSP,0x10 CVTTSD2SI EAX,XMM0 ADD EAX,EBX POP RBX RET
int func0(int param_1) { double dVar1; double __x; __x = (double)(param_1 + 1); dVar1 = log2(__x); dVar1 = log2(dVar1 + __x); return (int)dVar1 + param_1 + 1; }
6,955
func0
#include <stdio.h> #include <math.h> #include <assert.h>
int func0(int n) { n = n + 1; return n + (int)(log2(n + log2(n))); }
int main() { assert(func0(7) == 11); assert(func0(4) == 7); assert(func0(9) == 13); return 0; }
O3
c
func0: endbr64 push %rbx pxor %xmm1,%xmm1 lea 0x1(%rdi),%ebx cvtsi2sd %ebx,%xmm1 sub $0x10,%rsp movapd %xmm1,%xmm0 movsd %xmm1,0x8(%rsp) callq 1060 <log2@plt> movsd 0x8(%rsp),%xmm1 addsd %xmm1,%xmm0 callq 1060 <log2@plt> add $0x10,%rsp cvttsd2si %xmm0,%eax add %ebx,%eax pop %rbx retq xchg %ax,...
func0: endbr64 push rbx pxor xmm1, xmm1 lea ebx, [rdi+1] cvtsi2sd xmm1, ebx sub rsp, 10h movapd xmm0, xmm1; x movsd [rsp+18h+var_10], xmm1 call _log2 movsd xmm1, [rsp+18h+var_10] addsd xmm0, xmm1; x call _log2 add rsp, 10h cvttsd2si eax, xmm0 add eax, ebx pop rbx retn
long long func0(int a1) { double v1; // xmm0_8 v1 = log2((double)(a1 + 1)); return (unsigned int)(a1 + 1 + (int)log2(v1 + (double)(a1 + 1))); }
func0: ENDBR64 PUSH RBX PXOR XMM1,XMM1 LEA EBX,[RDI + 0x1] CVTSI2SD XMM1,EBX SUB RSP,0x10 MOVAPD XMM0,XMM1 MOVSD qword ptr [RSP + 0x8],XMM1 CALL 0x00101060 MOVSD XMM1,qword ptr [RSP + 0x8] ADDSD XMM0,XMM1 CALL 0x00101060 ADD RSP,0x10 CVTTSD2SI EAX,XMM0 ADD EAX,EBX POP RBX RET
int func0(int param_1) { double dVar1; double __x; __x = (double)(param_1 + 1); dVar1 = log2(__x); dVar1 = log2(dVar1 + __x); return (int)dVar1 + param_1 + 1; }
6,956
func0
#include <stdio.h> #include <assert.h> #include <stdlib.h> typedef struct { int first; int second; } Pair;
Pair* func0(int* arr, int size, int* out_size) { *out_size = size - 1; Pair* pairs = (Pair*)malloc(sizeof(Pair) * (*out_size)); for (int i = 0; i < *out_size; i++) { pairs[i].first = arr[i]; pairs[i].second = arr[i + 1]; } return pairs; }
int main() { int out_size; int arr1[] = {1, 1, 2, 3, 3, 4, 4, 5}; Pair* result1 = func0(arr1, sizeof(arr1) / sizeof(arr1[0]), &out_size); Pair expected1[] = {{1, 1}, {1, 2}, {2, 3}, {3, 3}, {3, 4}, {4, 4}, {4, 5}}; for (int i = 0; i < out_size; i++) { assert(result1[i].first == expec...
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 lea -0x1(%rax),%edx mov -0x28(%rbp),%rax mov %edx,(%rax) mov -0x28(%rbp),%rax mov (%rax),%eax cltq shl $0x3,%rax mov %rax,%rdi callq 10b0 <m...
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] lea edx, [rax-1] mov rax, [rbp+var_28] mov [rax], edx mov rax, [rbp+var_28] mov eax, [rax] cdqe shl rax, 3 mov rdi, rax; size c...
_DWORD * func0(long long a1, int a2, int *a3) { int i; // [rsp+24h] [rbp-Ch] _DWORD *v6; // [rsp+28h] [rbp-8h] *a3 = a2 - 1; v6 = malloc(8LL * *a3); for ( i = 0; i < *a3; ++i ) { v6[2 * i] = *(_DWORD *)(4LL * i + a1); v6[2 * i + 1] = *(_DWORD *)(4 * (i + 1LL) + a1); } return v6; }
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] LEA EDX,[RAX + -0x1] MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX],EDX MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX] CDQE SHL R...
void * func0(long param_1,int param_2,int *param_3) { void *pvVar1; int local_14; *param_3 = param_2 + -1; pvVar1 = malloc((long)*param_3 << 3); for (local_14 = 0; local_14 < *param_3; local_14 = local_14 + 1) { *(int4 *)((long)pvVar1 + (long)local_14 * 8) = *(int4 *)(param_1 + (long)local_14...
6,957
func0
#include <stdio.h> #include <assert.h> #include <stdlib.h> typedef struct { int first; int second; } Pair;
Pair* func0(int* arr, int size, int* out_size) { *out_size = size - 1; Pair* pairs = (Pair*)malloc(sizeof(Pair) * (*out_size)); for (int i = 0; i < *out_size; i++) { pairs[i].first = arr[i]; pairs[i].second = arr[i + 1]; } return pairs; }
int main() { int out_size; int arr1[] = {1, 1, 2, 3, 3, 4, 4, 5}; Pair* result1 = func0(arr1, sizeof(arr1) / sizeof(arr1[0]), &out_size); Pair expected1[] = {{1, 1}, {1, 2}, {2, 3}, {3, 3}, {3, 4}, {4, 4}, {4, 5}}; for (int i = 0; i < out_size; i++) { assert(result1[i].first == expec...
O1
c
func0: endbr64 push %rbp push %rbx sub $0x8,%rsp mov %rdi,%rbx mov %rdx,%rbp sub $0x1,%esi mov %esi,(%rdx) movslq %esi,%rsi lea 0x0(,%rsi,8),%rdi callq 10b0 <malloc@plt> mov 0x0(%rbp),%edx test %edx,%edx jle 11f7 <func0+0x4e> lea -0x1(%rdx),%esi mov $0x0,%edx mov (%rbx,%rdx,4),%e...
func0: endbr64 push rbp push rbx sub rsp, 8 mov rbx, rdi mov rbp, rdx sub esi, 1 mov [rdx], esi movsxd rsi, esi lea rdi, ds:0[rsi*8] call _malloc mov esi, [rbp+0] test esi, esi jle short loc_11F3 mov esi, esi mov edx, 0 loc_11DC: mov ecx, [rbx+rdx*4] mov [rax...
long long func0(long long a1, int a2, int *a3) { int v4; // esi long long result; // rax int v6; // esi long long v7; // rdx v4 = a2 - 1; *a3 = v4; result = malloc(8LL * v4); v6 = *a3; if ( *a3 > 0 ) { v7 = 0LL; do { *(_DWORD *)(result + 8 * v7) = *(_DWORD *)(a1 + 4 * v7); ...
func0: ENDBR64 PUSH RBP PUSH RBX SUB RSP,0x8 MOV RBX,RDI MOV RBP,RDX SUB ESI,0x1 MOV dword ptr [RDX],ESI MOVSXD RSI,ESI LEA RDI,[RSI*0x8] CALL 0x001010b0 MOV ESI,dword ptr [RBP] TEST ESI,ESI JLE 0x001011f3 MOV ESI,ESI MOV EDX,0x0 LAB_001011dc: MOV ECX,dword ptr [RBX + RDX*0x4] MOV dword ptr [RAX + RDX*0x8],ECX MOV ECX,...
void func0(long param_1,int param_2,uint *param_3) { uint uVar1; void *pvVar2; ulong uVar3; *param_3 = param_2 - 1U; pvVar2 = malloc((long)(int)(param_2 - 1U) * 8); uVar1 = *param_3; if (0 < (int)uVar1) { uVar3 = 0; do { *(int4 *)((long)pvVar2 + uVar3 * 8) = *(int4 *)(param_1 + uVar3 * 4...
6,958
func0
#include <stdio.h> #include <assert.h> #include <stdlib.h> typedef struct { int first; int second; } Pair;
Pair* func0(int* arr, int size, int* out_size) { *out_size = size - 1; Pair* pairs = (Pair*)malloc(sizeof(Pair) * (*out_size)); for (int i = 0; i < *out_size; i++) { pairs[i].first = arr[i]; pairs[i].second = arr[i + 1]; } return pairs; }
int main() { int out_size; int arr1[] = {1, 1, 2, 3, 3, 4, 4, 5}; Pair* result1 = func0(arr1, sizeof(arr1) / sizeof(arr1[0]), &out_size); Pair expected1[] = {{1, 1}, {1, 2}, {2, 3}, {3, 3}, {3, 4}, {4, 4}, {4, 5}}; for (int i = 0; i < out_size; i++) { assert(result1[i].first == expec...
O2
c
func0: endbr64 push %rbp sub $0x1,%esi mov %rdx,%rbp push %rbx mov %rdi,%rbx sub $0x8,%rsp mov %esi,(%rdx) movslq %esi,%rsi lea 0x0(,%rsi,8),%rdi callq 10b0 <malloc@plt> mov 0x0(%rbp),%edx test %edx,%edx jle 1562 <func0+0x52> lea -0x1(%rdx),%esi xor %edx,%edx nopl 0x0(%rax) mov ...
func0: endbr64 push rbp sub esi, 1 mov rbp, rdx push rbx mov rbx, rdi sub rsp, 8 mov [rdx], esi movsxd rsi, esi lea rdi, ds:0[rsi*8] call _malloc movsxd rsi, dword ptr [rbp+0] test esi, esi jle short loc_1557 xor edx, edx nop loc_1540: mov ecx, [rbx+rdx*4] mov [rax+...
long long func0(long long a1, int a2, int *a3) { int v3; // esi long long result; // rax long long v6; // rsi long long i; // rdx v3 = a2 - 1; *a3 = v3; result = malloc(8LL * v3); v6 = *a3; if ( (int)v6 > 0 ) { for ( i = 0LL; i != v6; ++i ) { *(_DWORD *)(result + 8 * i) = *(_DWORD *)...
func0: ENDBR64 PUSH RBP SUB ESI,0x1 MOV RBP,RDX PUSH RBX MOV RBX,RDI SUB RSP,0x8 MOV dword ptr [RDX],ESI MOVSXD RSI,ESI LEA RDI,[RSI*0x8] CALL 0x001010b0 MOVSXD RSI,dword ptr [RBP] TEST ESI,ESI JLE 0x00101557 XOR EDX,EDX NOP LAB_00101540: MOV ECX,dword ptr [RBX + RDX*0x4] MOV dword ptr [RAX + RDX*0x8],ECX MOV ECX,dword...
void func0(long param_1,int param_2,int *param_3) { int iVar1; void *pvVar2; long lVar3; *param_3 = param_2 + -1; pvVar2 = malloc((long)(param_2 + -1) * 8); iVar1 = *param_3; if (0 < iVar1) { lVar3 = 0; do { *(int4 *)((long)pvVar2 + lVar3 * 8) = *(int4 *)(param_1 + lVar3 * 4); *(in...
6,959
func0
#include <stdio.h> #include <assert.h> #include <stdlib.h> typedef struct { int first; int second; } Pair;
Pair* func0(int* arr, int size, int* out_size) { *out_size = size - 1; Pair* pairs = (Pair*)malloc(sizeof(Pair) * (*out_size)); for (int i = 0; i < *out_size; i++) { pairs[i].first = arr[i]; pairs[i].second = arr[i + 1]; } return pairs; }
int main() { int out_size; int arr1[] = {1, 1, 2, 3, 3, 4, 4, 5}; Pair* result1 = func0(arr1, sizeof(arr1) / sizeof(arr1[0]), &out_size); Pair expected1[] = {{1, 1}, {1, 2}, {2, 3}, {3, 3}, {3, 4}, {4, 4}, {4, 5}}; for (int i = 0; i < out_size; i++) { assert(result1[i].first == expec...
O3
c
func0: endbr64 push %rbp sub $0x1,%esi mov %rdx,%rbp push %rbx mov %rdi,%rbx sub $0x8,%rsp mov %esi,(%rdx) movslq %esi,%rsi lea 0x0(,%rsi,8),%rdi callq 10b0 <malloc@plt> mov 0x0(%rbp),%esi test %esi,%esi jle 174a <func0+0xca> lea -0x1(%rsi),%edx cmp $0x2,%edx jbe 1751 <func0+0xd1...
func0: endbr64 push rbp sub esi, 1 mov rbp, rdx push rbx mov rbx, rdi sub rsp, 8 mov [rdx], esi movsxd rsi, esi lea rdi, ds:0[rsi*8]; size call _malloc mov edx, [rbp+0] mov rcx, rax test edx, edx jle loc_15B8 lea eax, [rdx-1] cmp eax, 2 jbe loc_15C2 mov e...
_QWORD * func0(long long a1, int a2, unsigned int *a3) { unsigned int v3; // esi _QWORD *v6; // rax unsigned int v7; // edx _QWORD *v8; // rcx long long v9; // rax __m128i v10; // xmm3 __m128i v11; // xmm1 signed int v12; // eax long long v13; // rsi int v14; // edx _QWORD *v15; // rdi __m128i v...
func0: ENDBR64 PUSH RBP SUB ESI,0x1 MOV RBP,RDX PUSH RBX MOV RBX,RDI SUB RSP,0x8 MOV dword ptr [RDX],ESI MOVSXD RSI,ESI LEA RDI,[RSI*0x8] CALL 0x001010b0 MOV EDX,dword ptr [RBP] MOV RCX,RAX TEST EDX,EDX JLE 0x001015b8 LEA EAX,[RDX + -0x1] CMP EAX,0x2 JBE 0x001015c2 MOV ESI,EDX XOR EAX,EAX SHR ESI,0x2 SHL RSI,0x4 NOP wo...
void * func0(long param_1,int param_2,uint *param_3) { int4 *puVar1; int8 *puVar2; int4 *puVar3; int8 uVar4; int8 uVar5; int4 uVar6; int4 uVar7; int4 uVar8; int4 uVar9; int4 uVar10; int4 uVar11; int4 uVar12; uint uVar13; void *pvVar14; long lVar15; uint uVar16; ulong uVar17; *par...
6,960
func0
#include <assert.h>
int func0(int arr[], int n, int sum) { int count = 0; for (int i = 0; i < n; i++) { for (int j = i + 1; j < n; j++) { if (arr[i] + arr[j] == sum) { count += 1; } } } return count; }
int main() { int arr1[] = {1, 1, 1, 1}; int arr2[] = {1, 5, 7, -1, 5}; int arr3[] = {1, -2, 3}; assert(func0(arr1, 4, 2) == 6); assert(func0(arr2, 5, 6) == 3); assert(func0(arr3, 3, 1) == 1); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x18(%rbp) mov %esi,-0x1c(%rbp) mov %edx,-0x20(%rbp) movl $0x0,-0xc(%rbp) movl $0x0,-0x8(%rbp) jmp 11dd <func0+0x74> mov -0x8(%rbp),%eax add $0x1,%eax mov %eax,-0x4(%rbp) jmp 11d1 <func0+0x68> mov -0x8(%rbp),%eax cltq lea 0x0(,%rax,...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_20], edx mov [rbp+var_C], 0 mov [rbp+var_8], 0 jmp short loc_11DD loc_118B: mov eax, [rbp+var_8] add eax, 1 mov [rbp+var_4], eax jmp short loc_11D1 loc_1196: mov eax, [rbp+var...
long long func0(long long a1, int a2, int a3) { unsigned int v4; // [rsp+14h] [rbp-Ch] int i; // [rsp+18h] [rbp-8h] int j; // [rsp+1Ch] [rbp-4h] v4 = 0; for ( i = 0; i < a2; ++i ) { for ( j = i + 1; j < a2; ++j ) { if ( a3 == *(_DWORD *)(4LL * i + a1) + *(_DWORD *)(4LL * j + a1) ) ++...
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV dword ptr [RBP + -0x20],EDX MOV dword ptr [RBP + -0xc],0x0 MOV dword ptr [RBP + -0x8],0x0 JMP 0x001011dd LAB_0010118b: MOV EAX,dword ptr [RBP + -0x8] ADD EAX,0x1 MOV dword ptr [RBP + -0x4],EAX JMP 0x001011d1 LAB_0010...
int func0(long param_1,int param_2,int param_3) { int4 local_14; int4 local_10; int4 local_c; local_14 = 0; for (local_10 = 0; local_c = local_10, local_10 < param_2; local_10 = local_10 + 1) { while (local_c = local_c + 1, local_c < param_2) { if (param_3 == *(int *)(param_1 + (long)local_c * 4...
6,961
func0
#include <assert.h>
int func0(int arr[], int n, int sum) { int count = 0; for (int i = 0; i < n; i++) { for (int j = i + 1; j < n; j++) { if (arr[i] + arr[j] == sum) { count += 1; } } } return count; }
int main() { int arr1[] = {1, 1, 1, 1}; int arr2[] = {1, 5, 7, -1, 5}; int arr3[] = {1, -2, 3}; assert(func0(arr1, 4, 2) == 6); assert(func0(arr2, 5, 6) == 3); assert(func0(arr3, 3, 1) == 1); return 0; }
O1
c
func0: endbr64 test %esi,%esi jle 11b4 <func0+0x4b> lea -0x1(%rsi),%r11d add $0x1,%r11 mov $0x1,%r10d mov $0x0,%ecx cmp %r11,%r10 je 11b9 <func0+0x50> mov -0x4(%rdi,%r10,4),%r9d mov %r10,%rax mov %r9d,%r8d add (%rdi,%rax,4),%r8d cmp %edx,%r8d sete %r8b movzbl %r8b,%r8d add %r...
func0: endbr64 test esi, esi jle short loc_11AF mov r11d, esi mov r10d, 1 mov ecx, 0 loc_117F: cmp r10, r11 jz short loc_11B4 mov r9d, [rdi+r10*4-4] mov rax, r10 loc_118C: mov r8d, r9d add r8d, [rdi+rax*4] cmp r8d, edx setz r8b movzx r8d, r8b add ecx, r8d add ...
long long func0(long long a1, int a2, int a3) { long long v3; // r10 unsigned int v4; // ecx long long v5; // rax if ( a2 <= 0 ) { return 0; } else { v3 = 1LL; v4 = 0; while ( v3 != a2 ) { v5 = v3; do v4 += *(_DWORD *)(a1 + 4 * v5++) + *(_DWORD *)(a1 + 4 * v3 - ...
func0: ENDBR64 TEST ESI,ESI JLE 0x001011af MOV R11D,ESI MOV R10D,0x1 MOV ECX,0x0 LAB_0010117f: CMP R10,R11 JZ 0x001011b4 MOV R9D,dword ptr [RDI + R10*0x4 + -0x4] MOV RAX,R10 LAB_0010118c: MOV R8D,R9D ADD R8D,dword ptr [RDI + RAX*0x4] CMP R8D,EDX SETZ R8B MOVZX R8D,R8B ADD ECX,R8D ADD RAX,0x1 CMP ESI,EAX JG 0x0010118c A...
int func0(long param_1,uint param_2,int param_3) { ulong uVar1; int iVar2; ulong uVar3; if ((int)param_2 < 1) { iVar2 = 0; } else { iVar2 = 0; for (uVar3 = 1; uVar3 != param_2; uVar3 = uVar3 + 1) { uVar1 = uVar3; do { iVar2 = iVar2 + (uint)(*(int *)(param_1 + -4 + uVar3 *...
6,962
func0
#include <assert.h>
int func0(int arr[], int n, int sum) { int count = 0; for (int i = 0; i < n; i++) { for (int j = i + 1; j < n; j++) { if (arr[i] + arr[j] == sum) { count += 1; } } } return count; }
int main() { int arr1[] = {1, 1, 1, 1}; int arr2[] = {1, 5, 7, -1, 5}; int arr3[] = {1, -2, 3}; assert(func0(arr1, 4, 2) == 6); assert(func0(arr2, 5, 6) == 3); assert(func0(arr3, 3, 1) == 1); return 0; }
O2
c
func0: endbr64 test %esi,%esi jle 13a6 <func0+0x56> lea -0x1(%rsi),%r11d mov $0x1,%r10d xor %r8d,%r8d add $0x1,%r11 cmp %r11,%r10 je 13a2 <func0+0x52> xchg %ax,%ax mov -0x4(%rdi,%r10,4),%r9d mov %r10,%rax nopl 0x0(%rax,%rax,1) mov (%rdi,%rax,4),%ecx add %r9d,%ecx cmp %edx,%ecx...
func0: endbr64 test esi, esi jle short loc_12F6 movsxd r11, esi mov r10d, 1 xor r8d, r8d cmp r10, r11 jz short loc_12F2 nop dword ptr [rax+00000000h] loc_12C0: mov r9d, [rdi+r10*4-4] mov rax, r10 nop dword ptr [rax+rax+00000000h] loc_12D0: mov ecx, [rdi+rax*4] add ecx, r...
long long func0(long long a1, int a2, int a3) { long long v3; // r10 unsigned int i; // r8d long long v5; // rax bool v6; // cl if ( a2 <= 0 ) return 0LL; v3 = 1LL; for ( i = 0; v3 != a2; ++v3 ) { v5 = v3; do { v6 = *(_DWORD *)(a1 + 4 * v3 - 4) + *(_DWORD *)(a1 + 4 * v5++) == a3;...
func0: ENDBR64 TEST ESI,ESI JLE 0x001012f6 MOVSXD R11,ESI MOV R10D,0x1 XOR R8D,R8D CMP R10,R11 JZ 0x001012f2 NOP dword ptr [RAX] LAB_001012c0: MOV R9D,dword ptr [RDI + R10*0x4 + -0x4] MOV RAX,R10 NOP dword ptr [RAX + RAX*0x1] LAB_001012d0: MOV ECX,dword ptr [RDI + RAX*0x4] ADD ECX,R9D CMP ECX,EDX SETZ CL ADD RAX,0x1 MO...
int func0(long param_1,int param_2,int param_3) { long lVar1; long lVar2; int iVar3; long lVar4; if (0 < param_2) { lVar4 = 1; iVar3 = 0; if ((long)param_2 != 1) { do { lVar2 = lVar4; do { lVar1 = lVar2 * 4; lVar2 = lVar2 + 1; iVar3 = iVar3 +...
6,963
func0
#include <assert.h>
int func0(int arr[], int n, int sum) { int count = 0; for (int i = 0; i < n; i++) { for (int j = i + 1; j < n; j++) { if (arr[i] + arr[j] == sum) { count += 1; } } } return count; }
int main() { int arr1[] = {1, 1, 1, 1}; int arr2[] = {1, 5, 7, -1, 5}; int arr3[] = {1, -2, 3}; assert(func0(arr1, 4, 2) == 6); assert(func0(arr2, 5, 6) == 3); assert(func0(arr3, 3, 1) == 1); return 0; }
O3
c
func0: endbr64 test %esi,%esi jle 14b1 <func0+0x171> cmp $0x1,%esi je 14b1 <func0+0x171> push %r14 xor %r9d,%r9d mov $0x1,%r8d push %r12 lea -0x1(%rsi),%r12d push %rbp mov $0x1,%ebp push %rbx mov %rdi,%rbx mov %edx,%edi movd %edi,%xmm5 lea 0x4(%rbx),%rdx pshufd $0x0,%xmm5,%xmm...
func0: endbr64 test esi, esi jle loc_1280 push r14 push r12 push rbp push rbx mov rbx, rdi mov edi, esi xor esi, esi cmp edi, 1 jz loc_1273 movd xmm5, edx mov r11d, edx lea r10, [rbx+4] xor esi, esi mov ecx, 1 lea r12d, [rdi-1] mov ebp, 1 pshufd xmm3, ...
long long func0(long long a1, int a2, unsigned int a3) { unsigned int v5; // esi const __m128i *v6; // r10 int v7; // ecx __m128i v8; // xmm3 unsigned int v9; // r9d unsigned int v10; // r8d __m128i v11; // xmm1 const __m128i *v12; // rax __m128i v13; // xmm2 __m128i v14; // xmm0 __m128i v15; // ...
func0: ENDBR64 TEST ESI,ESI JLE 0x00101280 PUSH R14 PUSH R12 PUSH RBP PUSH RBX MOV RBX,RDI MOV EDI,ESI XOR ESI,ESI CMP EDI,0x1 JZ 0x00101273 MOVD XMM5,EDX MOV R11D,EDX LEA R10,[RBX + 0x4] XOR ESI,ESI MOV ECX,0x1 LEA R12D,[RDI + -0x1] MOV EBP,0x1 PSHUFD XMM3,XMM5,0x0 NOP word ptr [RAX + RAX*0x1] LAB_00101188: MOV R8D,ED...
int func0(long param_1,int param_2,int param_3) { long lVar1; int iVar2; uint uVar3; int iVar4; int *piVar5; int *piVar6; int *piVar7; int *piVar8; int iVar9; int iVar10; int *piVar11; int iVar12; int iVar13; int iVar14; int iVar15; if (param_2 < 1) { return 0; } iVar10 = 0; ...
6,964
func0
#include <assert.h>
int func0(int x) { int parity = 0; while (x != 0) { x = x & (x - 1); parity++; } return (parity % 2 == 1); }
int main() { assert(func0(13) == 1); assert(func0(21) == 1); assert(func0(18) == 0); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x14(%rbp) movl $0x0,-0x4(%rbp) jmp 116a <func0+0x21> mov -0x14(%rbp),%eax sub $0x1,%eax and %eax,-0x14(%rbp) addl $0x1,-0x4(%rbp) cmpl $0x0,-0x14(%rbp) jne 115d <func0+0x14> mov -0x4(%rbp),%eax cltd shr $0x1f,%edx add %edx,%eax and ...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_14], edi mov [rbp+var_4], 0 jmp short loc_116A loc_115D: mov eax, [rbp+var_14] sub eax, 1 and [rbp+var_14], eax add [rbp+var_4], 1 loc_116A: cmp [rbp+var_14], 0 jnz short loc_115D mov edx, [rbp+var_4] mov eax, edx sar ...
_BOOL8 func0(int a1) { int v3; // [rsp+10h] [rbp-4h] v3 = 0; while ( a1 ) { a1 &= a1 - 1; ++v3; } return v3 % 2 == 1; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x14],EDI MOV dword ptr [RBP + -0x4],0x0 JMP 0x0010116a LAB_0010115d: MOV EAX,dword ptr [RBP + -0x14] SUB EAX,0x1 AND dword ptr [RBP + -0x14],EAX ADD dword ptr [RBP + -0x4],0x1 LAB_0010116a: CMP dword ptr [RBP + -0x14],0x0 JNZ 0x0010115d MOV EDX,dword ptr [RBP +...
bool func0(uint param_1) { int4 local_1c; int4 local_c; local_c = 0; for (local_1c = param_1; local_1c != 0; local_1c = local_1c & local_1c - 1) { local_c = local_c + 1; } return local_c % 2 == 1; }
6,965
func0
#include <assert.h>
int func0(int x) { int parity = 0; while (x != 0) { x = x & (x - 1); parity++; } return (parity % 2 == 1); }
int main() { assert(func0(13) == 1); assert(func0(21) == 1); assert(func0(18) == 0); return 0; }
O1
c
func0: endbr64 test %edi,%edi je 1176 <func0+0x2d> mov $0x0,%eax lea -0x1(%rdi),%edx add $0x1,%eax and %edx,%edi jne 1156 <func0+0xd> mov %eax,%edx shr $0x1f,%edx add %edx,%eax and $0x1,%eax sub %edx,%eax cmp $0x1,%eax sete %al movzbl %al,%eax retq mov %edi,%eax jmp 1160 <...
func0: endbr64 test edi, edi jz short loc_1176 mov eax, 0 loc_1156: lea edx, [rdi-1] add eax, 1 and edi, edx jnz short loc_1156 loc_1160: mov edx, eax shr edx, 1Fh add eax, edx and eax, 1 sub eax, edx cmp eax, 1 setz al movzx eax, al retn loc_1176: mov eax, e...
_BOOL8 func0(int a1) { int v1; // eax if ( a1 ) { v1 = 0; do { ++v1; a1 &= a1 - 1; } while ( a1 ); } else { v1 = 0; } return v1 % 2 == 1; }
func0: ENDBR64 TEST EDI,EDI JZ 0x00101176 MOV EAX,0x0 LAB_00101156: LEA EDX,[RDI + -0x1] ADD EAX,0x1 AND EDI,EDX JNZ 0x00101156 LAB_00101160: MOV EDX,EAX SHR EDX,0x1f ADD EAX,EDX AND EAX,0x1 SUB EAX,EDX CMP EAX,0x1 SETZ AL MOVZX EAX,AL RET LAB_00101176: MOV EAX,EDI JMP 0x00101160
bool func0(uint param_1) { int iVar1; if (param_1 == 0) { iVar1 = 0; } else { iVar1 = 0; do { iVar1 = iVar1 + 1; param_1 = param_1 & param_1 - 1; } while (param_1 != 0); } return iVar1 % 2 == 1; }
6,966
func0
#include <assert.h>
int func0(int x) { int parity = 0; while (x != 0) { x = x & (x - 1); parity++; } return (parity % 2 == 1); }
int main() { assert(func0(13) == 1); assert(func0(21) == 1); assert(func0(18) == 0); return 0; }
O2
c
func0: endbr64 xor %eax,%eax test %edi,%edi je 1160 <func0+0x20> nopw 0x0(%rax,%rax,1) lea -0x1(%rdi),%edx add $0x1,%eax and %edx,%edi jne 1150 <func0+0x10> and $0x1,%eax retq xchg %ax,%ax retq nopw %cs:0x0(%rax,%rax,1) nopl 0x0(%rax,%rax,1)
func0: endbr64 xor eax, eax test edi, edi jz short locret_1160 nop word ptr [rax+rax+00h] loc_1150: lea edx, [rdi-1] add eax, 1 and edi, edx jnz short loc_1150 and eax, 1 retn locret_1160: retn
long long func0(int a1) { long long result; // rax result = 0LL; if ( a1 ) { do { LOBYTE(result) = result + 1; a1 &= a1 - 1; } while ( a1 ); return result & 1; } return result; }
func0: ENDBR64 XOR EAX,EAX TEST EDI,EDI JZ 0x00101160 NOP word ptr [RAX + RAX*0x1] LAB_00101150: LEA EDX,[RDI + -0x1] ADD EAX,0x1 AND EDI,EDX JNZ 0x00101150 AND EAX,0x1 RET LAB_00101160: RET
uint func0(uint param_1) { uint uVar1; uVar1 = 0; if (param_1 == 0) { return 0; } do { uVar1 = uVar1 + 1; param_1 = param_1 & param_1 - 1; } while (param_1 != 0); return uVar1 & 1; }
6,967
func0
#include <assert.h>
int func0(int x) { int parity = 0; while (x != 0) { x = x & (x - 1); parity++; } return (parity % 2 == 1); }
int main() { assert(func0(13) == 1); assert(func0(21) == 1); assert(func0(18) == 0); return 0; }
O3
c
func0: endbr64 xor %eax,%eax test %edi,%edi je 1160 <func0+0x20> nopw 0x0(%rax,%rax,1) lea -0x1(%rdi),%edx add $0x1,%eax and %edx,%edi jne 1150 <func0+0x10> and $0x1,%eax retq xchg %ax,%ax retq nopw %cs:0x0(%rax,%rax,1) nopl 0x0(%rax,%rax,1)
func0: endbr64 xor eax, eax test edi, edi jz short locret_1160 nop word ptr [rax+rax+00h] loc_1150: lea edx, [rdi-1] add eax, 1 and edi, edx jnz short loc_1150 and eax, 1 retn locret_1160: retn
long long func0(int a1) { long long result; // rax result = 0LL; if ( a1 ) { do { LOBYTE(result) = result + 1; a1 &= a1 - 1; } while ( a1 ); return result & 1; } return result; }
func0: ENDBR64 XOR EAX,EAX TEST EDI,EDI JZ 0x00101160 NOP word ptr [RAX + RAX*0x1] LAB_00101150: LEA EDX,[RDI + -0x1] ADD EAX,0x1 AND EDI,EDX JNZ 0x00101150 AND EAX,0x1 RET LAB_00101160: RET
uint func0(uint param_1) { uint uVar1; uVar1 = 0; if (param_1 == 0) { return 0; } do { uVar1 = uVar1 + 1; param_1 = param_1 & param_1 - 1; } while (param_1 != 0); return uVar1 & 1; }
6,968
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> #include <string.h> int compare(const void *a, const void *b) { return (*(int*)a - *(int*)b); }
int* func0(int *li1, int li1Size, int *li2, int li2Size, int *resultSize) { int *result = malloc((li1Size + li2Size) * sizeof(int)); int i, j; int index = 0; int found; // elements in li1 but not in li2 for (i = 0; i < li1Size; i++) { found = 0; for (j = 0; j < li2Size;...
int main() { int resultSize; int *result; int li1[] = {10, 15, 20, 25, 30, 35, 40}; int li2[] = {25, 40, 35}; result = func0(li1, 7, li2, 3, &resultSize); qsort(result, resultSize, sizeof(int), compare); int expected1[] = {10, 15, 20, 30}; assert(resultSize == 4 && memcmp(resul...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x40,%rsp mov %rdi,-0x28(%rbp) mov %esi,-0x2c(%rbp) mov %rdx,-0x38(%rbp) mov %ecx,-0x30(%rbp) mov %r8,-0x40(%rbp) mov -0x2c(%rbp),%edx mov -0x30(%rbp),%eax add %edx,%eax cltq shl $0x2,%rax mov %rax,%rdi callq 10f0 <malloc@plt> mov %ra...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_28], rdi mov [rbp+var_2C], esi mov [rbp+var_38], rdx mov [rbp+var_30], ecx mov [rbp+var_40], r8 mov edx, [rbp+var_2C] mov eax, [rbp+var_30] add eax, edx cdqe shl rax, 2 mov rdi, rax; size call _malloc mo...
_DWORD * func0(long long a1, int a2, long long a3, int a4, _DWORD *a5) { int v5; // eax int v6; // eax int i; // [rsp+28h] [rbp-18h] int k; // [rsp+28h] [rbp-18h] int j; // [rsp+2Ch] [rbp-14h] int m; // [rsp+2Ch] [rbp-14h] int v15; // [rsp+30h] [rbp-10h] int v16; // [rsp+34h] [rbp-Ch] int v17; // [rsp...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x28],RDI MOV dword ptr [RBP + -0x2c],ESI MOV qword ptr [RBP + -0x38],RDX MOV dword ptr [RBP + -0x30],ECX MOV qword ptr [RBP + -0x40],R8 MOV EDX,dword ptr [RBP + -0x2c] MOV EAX,dword ptr [RBP + -0x30] ADD EAX,EDX CDQE SHL RAX,0x2 MOV RDI,RAX CALL 0x...
void * func0(long param_1,int param_2,long param_3,int param_4,int *param_5) { bool bVar1; void *pvVar2; int4 local_20; int4 local_1c; int4 local_18; pvVar2 = malloc((long)(param_4 + param_2) << 2); local_18 = 0; for (local_20 = 0; local_20 < param_2; local_20 = local_20 + 1) { bVar1 = false; ...
6,969
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> #include <string.h> int compare(const void *a, const void *b) { return (*(int*)a - *(int*)b); }
int* func0(int *li1, int li1Size, int *li2, int li2Size, int *resultSize) { int *result = malloc((li1Size + li2Size) * sizeof(int)); int i, j; int index = 0; int found; // elements in li1 but not in li2 for (i = 0; i < li1Size; i++) { found = 0; for (j = 0; j < li2Size;...
int main() { int resultSize; int *result; int li1[] = {10, 15, 20, 25, 30, 35, 40}; int li2[] = {25, 40, 35}; result = func0(li1, 7, li2, 3, &resultSize); qsort(result, resultSize, sizeof(int), compare); int expected1[] = {10, 15, 20, 30}; assert(resultSize == 4 && memcmp(resul...
O1
c
func0: endbr64 push %r14 push %r13 push %r12 push %rbp push %rbx mov %rdi,%r13 mov %esi,%ebx mov %rdx,%r14 mov %ecx,%ebp mov %r8,%r12 lea (%rsi,%rcx,1),%edi movslq %edi,%rdi shl $0x2,%rdi callq 10f0 <malloc@plt> test %ebx,%ebx jle 123c <func0+0x4a> mov %r13,%rdi lea -0x1(%rbx)...
func0: endbr64 push r14 push r13 push r12 push rbp push rbx mov rbp, rdi mov ebx, esi mov r14, rdx mov r13d, ecx mov r12, r8 lea edi, [rsi+rcx] movsxd rdi, edi shl rdi, 2 call _malloc mov r8, rax test ebx, ebx jle short loc_123D mov rsi, rbp lea eax, [rb...
long long func0(_DWORD *a1, int a2, _DWORD *a3, int a4, _DWORD *a5) { long long v10; // r8 _DWORD *v11; // rsi int v12; // edi _DWORD *v13; // rsi _DWORD *v14; // rax _DWORD *v15; // rax v10 = malloc(4LL * (a2 + a4)); if ( a2 <= 0 ) { v12 = 0; } else { v11 = a1; v12 = 0; do ...
func0: ENDBR64 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV RBP,RDI MOV EBX,ESI MOV R14,RDX MOV R13D,ECX MOV R12,R8 LEA EDI,[RSI + RCX*0x1] MOVSXD RDI,EDI SHL RDI,0x2 CALL 0x001010f0 MOV R8,RAX TEST EBX,EBX JLE 0x0010123d MOV RSI,RBP LEA EAX,[RBX + -0x1] LEA R9,[RBP + RAX*0x4 + 0x4] LEA EAX,[R13 + -0x1] LEA RCX,[R1...
void * func0(int *param_1,int param_2,int *param_3,int param_4,int *param_5) { void *pvVar1; int *piVar2; int *piVar3; int iVar4; pvVar1 = malloc((long)(param_2 + param_4) << 2); if (param_2 < 1) { iVar4 = 0; } else { iVar4 = 0; piVar3 = param_1; do { if (0 < param_4) { ...
6,970
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> #include <string.h> int compare(const void *a, const void *b) { return (*(int*)a - *(int*)b); }
int* func0(int *li1, int li1Size, int *li2, int li2Size, int *resultSize) { int *result = malloc((li1Size + li2Size) * sizeof(int)); int i, j; int index = 0; int found; // elements in li1 but not in li2 for (i = 0; i < li1Size; i++) { found = 0; for (j = 0; j < li2Size;...
int main() { int resultSize; int *result; int li1[] = {10, 15, 20, 25, 30, 35, 40}; int li2[] = {25, 40, 35}; result = func0(li1, 7, li2, 3, &resultSize); qsort(result, resultSize, sizeof(int), compare); int expected1[] = {10, 15, 20, 30}; assert(resultSize == 4 && memcmp(resul...
O2
c
func0: endbr64 push %r14 mov %ecx,%r14d push %r13 mov %r8,%r13 push %r12 mov %esi,%r12d push %rbp mov %rdi,%rbp lea (%rsi,%rcx,1),%edi push %rbx movslq %edi,%rdi mov %rdx,%rbx shl $0x2,%rdi callq 10d0 <malloc@plt> test %r12d,%r12d jle 15d4 <func0+0x104> lea -0x1(%r14),%esi lea ...
func0: endbr64 push r14 mov r14d, ecx push r13 mov r13, r8 push r12 mov r12d, esi push rbp mov rbp, rdi lea edi, [rsi+rcx] push rbx movsxd rdi, edi mov rbx, rdx shl rdi, 2 call _malloc mov r8, rax test r12d, r12d jle loc_15D5 lea eax, [r12-1] mov rsi, rb...
long long func0(int *a1, int a2, _DWORD *a3, int a4, _DWORD *a5) { long long v10; // r8 int *v11; // rsi int v12; // edi long long v13; // r9 int v14; // edx _DWORD *v15; // rax int *v16; // rsi long long v17; // r9 int v18; // edx int *v19; // rax long long result; // rax long long v21; // rax...
func0: ENDBR64 PUSH R14 MOV R14D,ECX PUSH R13 MOV R13,R8 PUSH R12 MOV R12D,ESI PUSH RBP MOV RBP,RDI LEA EDI,[RSI + RCX*0x1] PUSH RBX MOVSXD RDI,EDI MOV RBX,RDX SHL RDI,0x2 CALL 0x001010d0 MOV R8,RAX TEST R12D,R12D JLE 0x001015d5 LEA EAX,[R12 + -0x1] MOV RSI,RBP XOR EDI,EDI LEA R9,[RBP + RAX*0x4 + 0x4] LEA EAX,[R14 + -0...
void * func0(int *param_1,int param_2,int *param_3,int param_4,int *param_5) { void *pvVar1; int *piVar2; long lVar3; int *piVar4; int iVar5; pvVar1 = malloc((long)(param_2 + param_4) << 2); if (param_2 < 1) { iVar5 = 0; } else { iVar5 = 0; piVar4 = param_1; do { piVar2 = par...
6,971
func0
#include <stdio.h> #include <stdlib.h> #include <assert.h> #include <string.h> int compare(const void *a, const void *b) { return (*(int*)a - *(int*)b); }
int* func0(int *li1, int li1Size, int *li2, int li2Size, int *resultSize) { int *result = malloc((li1Size + li2Size) * sizeof(int)); int i, j; int index = 0; int found; // elements in li1 but not in li2 for (i = 0; i < li1Size; i++) { found = 0; for (j = 0; j < li2Size;...
int main() { int resultSize; int *result; int li1[] = {10, 15, 20, 25, 30, 35, 40}; int li2[] = {25, 40, 35}; result = func0(li1, 7, li2, 3, &resultSize); qsort(result, resultSize, sizeof(int), compare); int expected1[] = {10, 15, 20, 30}; assert(resultSize == 4 && memcmp(resul...
O3
c
func0: endbr64 push %r14 mov %ecx,%r14d push %r13 mov %r8,%r13 push %r12 mov %esi,%r12d push %rbp mov %rdi,%rbp lea (%rsi,%rcx,1),%edi push %rbx movslq %edi,%rdi mov %rdx,%rbx shl $0x2,%rdi callq 10d0 <malloc@plt> test %r12d,%r12d jle 1594 <func0+0x104> lea -0x1(%r14),%esi lea ...
func0: endbr64 push r14 movsxd r14, ecx push r13 mov r13, r8 push r12 mov r12d, esi push rbp mov rbp, rdi lea edi, [rsi+r14] push rbx movsxd rdi, edi mov rbx, rdx shl rdi, 2; size call _malloc mov r8, rax test r12d, r12d jle loc_1580 movsxd rax, r12d mov rsi, ...
_DWORD * func0(int *a1, int a2, _DWORD *a3, int a4, _DWORD *a5) { long long v5; // r14 _DWORD *v10; // r8 int *v11; // rsi long long v12; // r9 int *v13; // r10 int v14; // edx _DWORD *v15; // rax int v16; // edi int *v17; // rsi int *v18; // r10 int v19; // edx int *v20; // rax v5 = a4; v1...
func0: ENDBR64 PUSH R14 MOVSXD R14,ECX PUSH R13 MOV R13,R8 PUSH R12 MOV R12D,ESI PUSH RBP MOV RBP,RDI LEA EDI,[RSI + R14*0x1] PUSH RBX MOVSXD RDI,EDI MOV RBX,RDX SHL RDI,0x2 CALL 0x001010d0 MOV R8,RAX TEST R12D,R12D JLE 0x00101580 MOVSXD RAX,R12D MOV RSI,RBP XOR R9D,R9D LEA R10,[RBP + RAX*0x4] MOVSXD RAX,R14D LEA RCX,[...
void * func0(int *param_1,int param_2,int *param_3,int param_4,int *param_5) { void *pvVar1; int *piVar2; int iVar3; int *piVar4; int iVar5; long lVar6; pvVar1 = malloc((long)(param_2 + param_4) << 2); if (param_2 < 1) { iVar5 = 0; } else { lVar6 = 0; piVar4 = param_1; while( tru...
6,972
func0
#include <assert.h>
int func0(int n) { int j = 0; int sm = 0; for (int i = 1; i <= n; ++i) { j = (2 * i - 1); sm += (j * j * j * j); } return sm; }
int main() { assert(func0(2) == 82); assert(func0(3) == 707); assert(func0(4) == 3108); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x14(%rbp) movl $0x0,-0x4(%rbp) movl $0x0,-0xc(%rbp) movl $0x1,-0x8(%rbp) jmp 118b <func0+0x42> mov -0x8(%rbp),%eax add %eax,%eax sub $0x1,%eax mov %eax,-0x4(%rbp) mov -0x4(%rbp),%eax imul %eax,%eax imul -0x4(%rbp),%eax imul -0x4(%rb...
func0: endbr64 push rbp mov rbp, rsp mov [rbp+var_14], edi mov [rbp+var_4], 0 mov [rbp+var_C], 0 mov [rbp+var_8], 1 jmp short loc_118B loc_116B: mov eax, [rbp+var_8] add eax, eax sub eax, 1 mov [rbp+var_4], eax mov eax, [rbp+var_4] imul eax, eax imul eax, [rbp+var_4]...
long long func0(int a1) { unsigned int v2; // [rsp+8h] [rbp-Ch] int i; // [rsp+Ch] [rbp-8h] v2 = 0; for ( i = 1; i <= a1; ++i ) v2 += (2 * i - 1) * (2 * i - 1) * (2 * i - 1) * (2 * i - 1); return v2; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x14],EDI MOV dword ptr [RBP + -0x4],0x0 MOV dword ptr [RBP + -0xc],0x0 MOV dword ptr [RBP + -0x8],0x1 JMP 0x0010118b LAB_0010116b: MOV EAX,dword ptr [RBP + -0x8] ADD EAX,EAX SUB EAX,0x1 MOV dword ptr [RBP + -0x4],EAX MOV EAX,dword ptr [RBP + -0x4] IMUL EAX,EAX ...
int func0(int param_1) { int iVar1; int4 local_14; int4 local_10; local_14 = 0; for (local_10 = 1; local_10 <= param_1; local_10 = local_10 + 1) { iVar1 = local_10 * 2 + -1; local_14 = local_14 + iVar1 * iVar1 * iVar1 * iVar1; } return local_14; }
6,973
func0
#include <assert.h>
int func0(int n) { int j = 0; int sm = 0; for (int i = 1; i <= n; ++i) { j = (2 * i - 1); sm += (j * j * j * j); } return sm; }
int main() { assert(func0(2) == 82); assert(func0(3) == 707); assert(func0(4) == 3108); return 0; }
O1
c
func0: endbr64 test %edi,%edi jle 1173 <func0+0x2a> lea 0x1(%rdi,%rdi,1),%esi mov $0x1,%eax mov $0x0,%ecx mov %eax,%edx imul %eax,%edx imul %edx,%edx add %edx,%ecx add $0x2,%eax cmp %esi,%eax jne 115f <func0+0x16> mov %ecx,%eax retq mov $0x0,%ecx jmp 1170 <func0+0x27>
func0: endbr64 test edi, edi jle short loc_1173 lea esi, [rdi+rdi+1] mov eax, 1 mov ecx, 0 loc_115F: mov edx, eax imul edx, eax imul edx, edx add ecx, edx add eax, 2 cmp eax, esi jnz short loc_115F loc_1170: mov eax, ecx retn loc_1173: mov ecx, 0 jmp short loc_11...
long long func0(int a1) { int v1; // eax unsigned int v2; // ecx if ( a1 <= 0 ) { return 0; } else { v1 = 1; v2 = 0; do { v2 += v1 * v1 * v1 * v1; v1 += 2; } while ( v1 != 2 * a1 + 1 ); } return v2; }
func0: ENDBR64 TEST EDI,EDI JLE 0x00101173 LEA ESI,[RDI + RDI*0x1 + 0x1] MOV EAX,0x1 MOV ECX,0x0 LAB_0010115f: MOV EDX,EAX IMUL EDX,EAX IMUL EDX,EDX ADD ECX,EDX ADD EAX,0x2 CMP EAX,ESI JNZ 0x0010115f LAB_00101170: MOV EAX,ECX RET LAB_00101173: MOV ECX,0x0 JMP 0x00101170
int func0(int param_1) { int iVar1; int iVar2; if (param_1 < 1) { iVar2 = 0; } else { iVar1 = 1; iVar2 = 0; do { iVar2 = iVar2 + iVar1 * iVar1 * iVar1 * iVar1; iVar1 = iVar1 + 2; } while (iVar1 != param_1 * 2 + 1); } return iVar2; }
6,974
func0
#include <assert.h>
int func0(int n) { int j = 0; int sm = 0; for (int i = 1; i <= n; ++i) { j = (2 * i - 1); sm += (j * j * j * j); } return sm; }
int main() { assert(func0(2) == 82); assert(func0(3) == 707); assert(func0(4) == 3108); return 0; }
O2
c
func0: endbr64 test %edi,%edi jle 1170 <func0+0x30> lea 0x1(%rdi,%rdi,1),%ecx mov $0x1,%eax xor %r8d,%r8d nopl 0x0(%rax) mov %eax,%edx imul %eax,%edx add $0x2,%eax imul %edx,%edx add %edx,%r8d cmp %ecx,%eax jne 1158 <func0+0x18> mov %r8d,%eax retq xchg %ax,%ax xor %r8d,%r8d mo...
func0: endbr64 test edi, edi jle short loc_1170 lea ecx, [rdi+rdi+1] mov eax, 1 xor r8d, r8d nop dword ptr [rax+00h] loc_1158: mov edx, eax imul edx, eax add eax, 2 imul edx, edx add r8d, edx cmp eax, ecx jnz short loc_1158 mov eax, r8d retn loc_1170: xor r8d, r8...
long long func0(int a1) { int v1; // eax unsigned int v2; // r8d int v3; // edx if ( a1 <= 0 ) return 0LL; v1 = 1; v2 = 0; do { v3 = v1 * v1; v1 += 2; v2 += v3 * v3; } while ( v1 != 2 * a1 + 1 ); return v2; }
func0: ENDBR64 TEST EDI,EDI JLE 0x00101170 LEA ECX,[RDI + RDI*0x1 + 0x1] MOV EAX,0x1 XOR R8D,R8D NOP dword ptr [RAX] LAB_00101158: MOV EDX,EAX IMUL EDX,EAX ADD EAX,0x2 IMUL EDX,EDX ADD R8D,EDX CMP EAX,ECX JNZ 0x00101158 MOV EAX,R8D RET LAB_00101170: XOR R8D,R8D MOV EAX,R8D RET
int func0(int param_1) { int iVar1; int iVar2; int iVar3; if (0 < param_1) { iVar1 = 1; iVar3 = 0; do { iVar2 = iVar1 * iVar1; iVar1 = iVar1 + 2; iVar3 = iVar3 + iVar2 * iVar2; } while (iVar1 != param_1 * 2 + 1); return iVar3; } return 0; }
6,975
func0
#include <assert.h>
int func0(int n) { int j = 0; int sm = 0; for (int i = 1; i <= n; ++i) { j = (2 * i - 1); sm += (j * j * j * j); } return sm; }
int main() { assert(func0(2) == 82); assert(func0(3) == 707); assert(func0(4) == 3108); return 0; }
O3
c
func0: endbr64 test %edi,%edi jle 1260 <func0+0x120> lea -0x1(%rdi),%eax cmp $0x29,%eax jbe 1267 <func0+0x127> mov %edi,%edx movdqa 0xeae(%rip),%xmm5 xor %eax,%eax pxor %xmm4,%xmm4 movdqa 0xeb0(%rip),%xmm7 shr $0x2,%edx pcmpeqd %xmm6,%xmm6 nopw 0x0(%rax,%rax,1) movdqa %xmm5,%xmm0 add $0x1,...
func0: endbr64 test edi, edi jle loc_1250 lea eax, [rdi-1] cmp eax, 19h jbe loc_1255 mov edx, edi movdqa xmm4, cs:xmmword_2010 xor eax, eax pxor xmm3, xmm3 movdqa xmm6, cs:xmmword_2020 shr edx, 2 pcmpeqd xmm5, xmm5 nop word ptr [rax+rax+00000000h] loc_1180: movdqa xmm0, xmm4 add...
long long func0(int a1) { __m128i si128; // xmm4 int v2; // eax __m128i v3; // xmm3 __m128i v4; // xmm6 __m128i v5; // xmm0 __m128i v6; // xmm0 __m128i v7; // xmm7 __m128i v8; // xmm1 __m128i v9; // xmm1 __m128i v10; // xmm3 signed int v11; // esi unsigned int v12; // edx int v13; // ecx in...
func0: ENDBR64 TEST EDI,EDI JLE 0x00101250 LEA EAX,[RDI + -0x1] CMP EAX,0x19 JBE 0x00101255 MOV EDX,EDI MOVDQA XMM4,xmmword ptr [0x00102010] XOR EAX,EAX PXOR XMM3,XMM3 MOVDQA XMM6,xmmword ptr [0x00102020] SHR EDX,0x2 PCMPEQD XMM5,XMM5 NOP word ptr [RAX + RAX*0x1] LAB_00101180: MOVDQA XMM0,XMM4 ADD EAX,0x1 PADDD XMM4,XM...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int func0(uint param_1) { uint uVar1; int iVar2; int iVar3; int iVar4; int auVar5 [16]; int auVar6 [16]; long lVar8; int auVar7 [16]; int iVar9; int iVar10; int iVar11; int iVar12; int iVar13; ulong uVar14...
6,976
func0
#include <stdio.h> #include <stdbool.h> #include <assert.h> #include <string.h>
bool func0(const char *exp) { int len = strlen(exp); if (len % 2 != 0) { return false; } char stack[100]; int top = -1; for (int i = 0; i < len; i++) { char ch = exp[i]; if (ch == '(' || ch == '{' || ch == '[') { stack[++top] = ch; } els...
int main() { assert(func0("{()}[{}]") == true); assert(func0("{()}[{]") == false); assert(func0("{()}[{}][]({})") == true); return 0; }
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x90,%rsp mov %rdi,-0x88(%rbp) mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax mov -0x88(%rbp),%rax mov %rax,%rdi callq 1070 <strlen@plt> mov %eax,-0x74(%rbp) mov -0x74(%rbp),%eax and $0x1,%eax test %eax,%eax je 11d4 <func0+0x4b> ...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 90h mov [rbp+s], rdi mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax mov rax, [rbp+s] mov rdi, rax; s call _strlen mov [rbp+var_74], eax mov eax, [rbp+var_74] and eax, 1 test eax, eax jz short loc_11D4 mov eax,...
bool func0(const char *a1) { int v2; // eax char v3; // [rsp+12h] [rbp-7Eh] char v4; // [rsp+13h] [rbp-7Dh] int v5; // [rsp+14h] [rbp-7Ch] int i; // [rsp+18h] [rbp-78h] int v7; // [rsp+1Ch] [rbp-74h] _BYTE v8[104]; // [rsp+20h] [rbp-70h] unsigned long long v9; // [rsp+88h] [rbp-8h] v9 = __readfsqwor...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV qword ptr [RBP + -0x88],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX MOV RAX,qword ptr [RBP + -0x88] MOV RDI,RAX CALL 0x00101070 MOV dword ptr [RBP + -0x74],EAX MOV EAX,dword ptr [RBP + -0x74] AND EAX,0x1 TEST EAX,EAX JZ 0x001011d4 MOV E...
int4 func0(char *param_1) { int iVar1; char cVar2; char cVar3; int4 uVar4; size_t sVar5; long in_FS_OFFSET; int local_84; int local_80; char acStack_78 [104]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); sVar5 = strlen(param_1); if ((sVar5 & 1) == 0) { local_84 = -1; f...
6,977
func0
#include <stdio.h> #include <stdbool.h> #include <assert.h> #include <string.h>
bool func0(const char *exp) { int len = strlen(exp); if (len % 2 != 0) { return false; } char stack[100]; int top = -1; for (int i = 0; i < len; i++) { char ch = exp[i]; if (ch == '(' || ch == '{' || ch == '[') { stack[++top] = ch; } els...
int main() { assert(func0("{()}[{}]") == true); assert(func0("{()}[{]") == false); assert(func0("{()}[{}][]({})") == true); return 0; }
O1
c
func0: endbr64 sub $0x78,%rsp mov %rdi,%rdx mov %fs:0x28,%rax mov %rax,0x68(%rsp) xor %eax,%eax mov $0xffffffffffffffff,%rcx repnz scas %es:(%rdi),%al not %rcx test $0x1,%cl je 1243 <func0+0xda> lea -0x1(%rcx),%rsi test %esi,%esi jle 1238 <func0+0xcf> mov %rdx,%rcx lea -0x1(%rsi...
func0: endbr64 push rbx sub rsp, 70h mov rbx, rdi mov rax, fs:28h mov [rsp+78h+var_10], rax xor eax, eax call _strlen mov rdx, rax mov eax, 0 test dl, 1 jnz loc_1261 test edx, edx jle loc_1256 mov rcx, rbx lea eax, [rdx-1] lea r9, [rbx+rax+1] mov esi, 0FFF...
bool func0(char *a1) { int v1; // edx bool result; // al char *v3; // rcx long long v4; // r9 int v5; // esi char v6; // dl char v7; // di _BYTE v8[104]; // [rsp+0h] [rbp-78h] unsigned long long v9; // [rsp+68h] [rbp-10h] v9 = __readfsqword(0x28u); v1 = strlen(); result = 0; if ( (v1 & 1) ==...
func0: ENDBR64 PUSH RBX SUB RSP,0x70 MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x68],RAX XOR EAX,EAX CALL 0x00101070 MOV RDX,RAX MOV EAX,0x0 TEST DL,0x1 JNZ 0x00101261 TEST EDX,EDX JLE 0x00101256 MOV RCX,RBX LEA EAX,[RDX + -0x1] LEA R9,[RBX + RAX*0x1 + 0x1] MOV ESI,0xffffffff JMP 0x001011e7 LAB_00101...
ulong func0(byte *param_1) { byte *pbVar1; byte bVar2; byte bVar3; bool bVar4; bool bVar5; size_t sVar6; ulong uVar7; int7 uVar8; int iVar9; int iVar10; long in_FS_OFFSET; byte local_78 [104]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); sVar6 = strlen((char *)param_1); ...
6,978
func0
#include <stdio.h> #include <stdbool.h> #include <assert.h> #include <string.h>
bool func0(const char *exp) { int len = strlen(exp); if (len % 2 != 0) { return false; } char stack[100]; int top = -1; for (int i = 0; i < len; i++) { char ch = exp[i]; if (ch == '(' || ch == '{' || ch == '[') { stack[++top] = ch; } els...
int main() { assert(func0("{()}[{}]") == true); assert(func0("{()}[{]") == false); assert(func0("{()}[{}][]({})") == true); return 0; }
O2
c
func0: endbr64 push %rbx mov %rdi,%rbx sub $0x70,%rsp mov %fs:0x28,%rax mov %rax,0x68(%rsp) xor %eax,%eax callq 1070 <strlen@plt> test $0x1,%al jne 12d0 <func0+0xa0> test %eax,%eax jle 12fb <func0+0xcb> sub $0x1,%eax mov %rbx,%rdi mov $0xffffffff,%edx lea 0x1(%rbx,%rax,1),%rsi no...
func0: endbr64 push rbx mov rbx, rdi sub rsp, 70h mov rax, fs:28h mov [rsp+78h+var_10], rax xor eax, eax call _strlen test al, 1 jnz short loc_12D0 test eax, eax jle loc_12FB sub eax, 1 mov rdi, rbx mov edx, 0FFFFFFFFh lea rsi, [rbx+rax+1] nop dword ptr [rax] ...
bool func0(char *a1) { int v1; // eax int v2; // edx long long v3; // rsi char v4; // al char v5; // cl int v6; // ecx char v7; // dl _BYTE v9[104]; // [rsp+0h] [rbp-78h] unsigned long long v10; // [rsp+68h] [rbp-10h] v10 = __readfsqword(0x28u); v1 = strlen(); if ( (v1 & 1) != 0 ) return 0...
func0: ENDBR64 PUSH RBX MOV RBX,RDI SUB RSP,0x70 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x68],RAX XOR EAX,EAX CALL 0x00101070 TEST AL,0x1 JNZ 0x001012d0 TEST EAX,EAX JLE 0x001012fb SUB EAX,0x1 MOV RDI,RBX MOV EDX,0xffffffff LEA RSI,[RBX + RAX*0x1 + 0x1] NOP dword ptr [RAX] LAB_00101270: MOVZX EAX,byte ptr [RD...
bool func0(byte *param_1) { int iVar1; byte *pbVar2; byte bVar3; byte bVar4; size_t sVar5; int iVar6; long in_FS_OFFSET; bool bVar7; byte local_78 [104]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); sVar5 = strlen((char *)param_1); if ((sVar5 & 1) == 0) { if ((int)sVar5 < ...
6,979
func0
#include <stdio.h> #include <stdbool.h> #include <assert.h> #include <string.h>
bool func0(const char *exp) { int len = strlen(exp); if (len % 2 != 0) { return false; } char stack[100]; int top = -1; for (int i = 0; i < len; i++) { char ch = exp[i]; if (ch == '(' || ch == '{' || ch == '[') { stack[++top] = ch; } els...
int main() { assert(func0("{()}[{}]") == true); assert(func0("{()}[{]") == false); assert(func0("{()}[{}][]({})") == true); return 0; }
O3
c
func0: endbr64 push %rbx mov %rdi,%rbx sub $0x70,%rsp mov %fs:0x28,%rax mov %rax,0x68(%rsp) xor %eax,%eax callq 1070 <strlen@plt> test $0x1,%al jne 12d0 <func0+0xa0> test %eax,%eax jle 12fb <func0+0xcb> sub $0x1,%eax mov %rbx,%rdi mov $0xffffffff,%edx lea 0x1(%rbx,%rax,1),%rsi no...
func0: endbr64 push rbx mov rbx, rdi sub rsp, 70h mov rax, fs:28h mov [rsp+78h+var_10], rax xor eax, eax call _strlen test al, 1 jnz short loc_12C8 test eax, eax jle loc_1311 sub eax, 1 mov rdi, rbx mov edx, 0FFFFFFFFh lea rsi, [rbx+rax+1] jmp short loc_1289 l...
char func0(const char *a1) { int v1; // eax int v2; // edx long long v3; // rsi char v4; // al char v5; // cl long long v7; // rcx _BYTE v8[104]; // [rsp+0h] [rbp-78h] unsigned long long v9; // [rsp+68h] [rbp-10h] v9 = __readfsqword(0x28u); v1 = strlen(a1); if ( (v1 & 1) != 0 ) return 0; i...
func0: ENDBR64 PUSH RBX MOV RBX,RDI SUB RSP,0x70 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x68],RAX XOR EAX,EAX CALL 0x00101070 TEST AL,0x1 JNZ 0x001012c8 TEST EAX,EAX JLE 0x00101311 SUB EAX,0x1 MOV RDI,RBX MOV EDX,0xffffffff LEA RSI,[RBX + RAX*0x1 + 0x1] JMP 0x00101289 LAB_00101270: CMP AL,0x29 JZ 0x00101300 C...
bool func0(char *param_1) { char *pcVar1; char cVar2; size_t sVar3; char cVar4; int iVar5; long in_FS_OFFSET; bool bVar6; char local_78 [104]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); sVar3 = strlen(param_1); if ((sVar3 & 1) == 0) { if ((int)sVar3 < 1) { bVar6 = tr...
6,980
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h>
char* func0(const char* test_str, int K) { // Make a copy of the input string to tokenize char temp_copy[1000]; strncpy(temp_copy, test_str, sizeof(temp_copy)); temp_copy[sizeof(temp_copy) - 1] = '\0'; // Allocate memory for the result char* res = malloc(strlen(test_str) + 1); if (!...
int main() { char* result1 = func0("The person is most value tet", 3); assert(strcmp(result1, "person is most value") == 0); free(result1); char* result2 = func0("If you told me about this ok", 4); assert(strcmp(result2, "If you me about ok") == 0); free(result2); char* result3 = ...
O0
c
func0: endbr64 push %rbp mov %rsp,%rbp sub $0x420,%rsp mov %rdi,-0x418(%rbp) mov %esi,-0x41c(%rbp) mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax mov -0x418(%rbp),%rcx lea -0x3f0(%rbp),%rax mov $0x3e8,%edx mov %rcx,%rsi mov %rax,%rdi callq 1100 <strncpy@plt> movb $0x0,-0x9(...
func0: endbr64 push rbp mov rbp, rsp sub rsp, 420h mov [rbp+src], rdi mov [rbp+var_41C], esi mov rax, fs:28h mov [rbp+var_8], rax xor eax, eax mov rcx, [rbp+src] lea rax, [rbp+dest] mov edx, 3E8h; n mov rsi, rcx; src mov rdi, rax; dest call _strncpy mov [rbp+var...
char * func0(const char *a1, int a2) { size_t v2; // rax const char *s; // [rsp+18h] [rbp-408h] char *v5; // [rsp+20h] [rbp-400h] size_t v6; // [rsp+28h] [rbp-3F8h] char dest[1000]; // [rsp+30h] [rbp-3F0h] BYREF unsigned long long v8; // [rsp+418h] [rbp-8h] v8 = __readfsqword(0x28u); strncpy(dest, a1, ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x420 MOV qword ptr [RBP + -0x418],RDI MOV dword ptr [RBP + -0x41c],ESI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX MOV RCX,qword ptr [RBP + -0x418] LEA RAX,[RBP + -0x3f0] MOV EDX,0x3e8 MOV RSI,RCX MOV RDI,RAX CALL 0x00101100 MOV byte ptr [RBP + -0x...
char * func0(char *param_1,int param_2) { size_t sVar1; char *__dest; long in_FS_OFFSET; char *local_410; char local_3f8 [999]; int local_11; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); strncpy(local_3f8,param_1,1000); local_11 = 0; sVar1 = strlen(param_1); __dest = (char *)mal...
6,981
func0
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h>
char* func0(const char* test_str, int K) { // Make a copy of the input string to tokenize char temp_copy[1000]; strncpy(temp_copy, test_str, sizeof(temp_copy)); temp_copy[sizeof(temp_copy) - 1] = '\0'; // Allocate memory for the result char* res = malloc(strlen(test_str) + 1); if (!...
int main() { char* result1 = func0("The person is most value tet", 3); assert(strcmp(result1, "person is most value") == 0); free(result1); char* result2 = func0("If you told me about this ok", 4); assert(strcmp(result2, "If you me about ok") == 0); free(result2); char* result3 = ...
O1
c
func0: endbr64 push %r12 push %rbp push %rbx sub $0x3f0,%rsp mov %rdi,%rbx mov %esi,%r12d mov %fs:0x28,%rax mov %rax,0x3e8(%rsp) xor %eax,%eax mov %rsp,%rdi mov $0x3e8,%edx mov %rbx,%rsi callq 10e0 <strncpy@plt> movb $0x0,0x3e7(%rsp) mov $0xffffffffffffffff,%rcx mov $0x0,%eax m...
func0: endbr64 push r13 push r12 push rbp push rbx sub rsp, 3F8h mov rbx, rdi mov r12d, esi mov rax, fs:28h mov [rsp+418h+var_30], rax xor eax, eax mov rdi, rsp mov edx, 3E8h mov rsi, rbx call _strncpy mov [rsp+418h+var_31], 0 mov rdi, rbx call _strlen lea ...
_BYTE * func0(long long a1, int a2) { long long v2; // rax _BYTE *v3; // rax _BYTE *v4; // rbp long long i; // rbx long long v6; // rax _BYTE *v7; // rax _BYTE v9[1000]; // [rsp+0h] [rbp-418h] BYREF unsigned long long v10; // [rsp+3E8h] [rbp-30h] v10 = __readfsqword(0x28u); strncpy(v9, a1, 1000LL);...
func0: ENDBR64 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x3f8 MOV RBX,RDI MOV R12D,ESI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x3e8],RAX XOR EAX,EAX MOV RDI,RSP MOV EDX,0x3e8 MOV RSI,RBX CALL 0x00101100 MOV byte ptr [RSP + 0x3e7],0x0 MOV RDI,RBX CALL 0x00101110 LEA RDI,[RAX + 0x1] CALL 0x00101150 TEST RAX,...
char * func0(char *param_1,int param_2) { size_t sVar1; char *__dest; char *__s; long in_FS_OFFSET; char acStack_418 [999]; int1 local_31; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); strncpy(acStack_418,param_1,1000); local_31 = 0; sVar1 = strlen(param_1); __dest = (char *)mall...