index int64 0 66.5k | func_name stringlengths 2 5.36k | func_dep stringlengths 16 2.19k | func stringlengths 8 55.3k | test stringlengths 0 7.07k | opt stringclasses 4
values | language stringclasses 2
values | asm stringlengths 0 45.4k | ida_asm stringlengths 0 44.7k | ida_pseudo stringlengths 0 44.3k | ghidra_asm stringlengths 0 49.1k | ghidra_pseudo stringlengths 0 64.7k |
|---|---|---|---|---|---|---|---|---|---|---|---|
5,382 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
// Function to maintain the min heap property
void min_heapify(int* heap, int size, int i) {
int smallest = i;
int left = 2*i +1;
int right = 2*i +2;
if(left < size && heap[left] < heap[smallest])
smallest = left;
if(... | int* func0(int* nums, int size) {
// Copy nums to heap array
int* heap = malloc(size * sizeof(int));
for(int i=0; i<size; i++)
heap[i] = nums[i];
// Heapify
for(int i=(size/2)-1; i>=0; i--)
min_heapify(heap, size, i);
// Extract elements
int* sorted = malloc(size... | int main() {
// Test Case 1
int test1[] = {18, 14, 10, 9, 8, 7, 9, 3, 2, 4, 1};
int expected1[] = {1, 2, 3, 4, 7, 8, 9, 9, 10, 14, 18};
int size1 = sizeof(test1)/sizeof(test1[0]);
int* result1 = func0(test1, size1);
for(int i=0; i<size1; i++)
assert(result1[i] == expected1[i]);
... | O2 | c | func0:
endbr64
push %r15
mov %rdi,%r15
push %r14
push %r13
movslq %esi,%r13
push %r12
mov %r13,%r12
shl $0x2,%r13
push %rbp
mov %r13,%rdi
push %rbx
mov %r12d,%ebx
shr $0x1f,%ebx
add %r12d,%ebx
sub $0x8,%rsp
sar %ebx
callq 10b0 <malloc@plt>
sub $0x1,%ebx
mov %rax,%rbp
test ... | func0:
endbr64
push r14
mov r14, rdi
push r13
movsxd r13, esi
push r12
mov r12, r13
shl r13, 2
push rbp
mov rdi, r13
push rbx
mov ebx, r12d
shr ebx, 1Fh
add ebx, r12d
call _malloc
sar ebx, 1
mov rbp, rax
sub ebx, 1
test r12d, r12d
jle loc_1638
mov rd... | long long func0(long long a1, int a2)
{
long long v3; // r13
long long v4; // rax
_DWORD *v5; // rbp
int v6; // ebx
long long v8; // r14
long long v9; // r13
long long v10; // rbx
long long v11; // rsi
int v12; // eax
v3 = 4LL * a2;
v4 = malloc(v3);
v5 = (_DWORD *)v4;
v6 = a2 / 2 - 1;
if (... | func0:
ENDBR64
PUSH R14
MOV R14,RDI
PUSH R13
MOVSXD R13,ESI
PUSH R12
MOV R12,R13
SHL R13,0x2
PUSH RBP
MOV RDI,R13
PUSH RBX
MOV EBX,R12D
SHR EBX,0x1f
ADD EBX,R12D
CALL 0x001010d0
SAR EBX,0x1
MOV RBP,RAX
SUB EBX,0x1
TEST R12D,R12D
JLE 0x00101638
MOV RDX,R13
MOV RSI,R14
MOV RDI,RAX
CALL 0x001010c0
TEST EBX,EBX
JS 0x001016... | void * func0(void *param_1,int param_2)
{
int4 *puVar1;
int4 *__dest;
void *pvVar2;
int iVar3;
ulong uVar4;
ulong uVar5;
size_t __size;
long lVar6;
bool bVar7;
__size = (long)param_2 << 2;
__dest = (int4 *)malloc(__size);
iVar3 = ((int)(((uint)((ulong)(long)param_2 >> 0x1f) & 1) + param_2) >... |
5,383 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
// Function to maintain the min heap property
void min_heapify(int* heap, int size, int i) {
int smallest = i;
int left = 2*i +1;
int right = 2*i +2;
if(left < size && heap[left] < heap[smallest])
smallest = left;
if(... | int* func0(int* nums, int size) {
// Copy nums to heap array
int* heap = malloc(size * sizeof(int));
for(int i=0; i<size; i++)
heap[i] = nums[i];
// Heapify
for(int i=(size/2)-1; i>=0; i--)
min_heapify(heap, size, i);
// Extract elements
int* sorted = malloc(size... | int main() {
// Test Case 1
int test1[] = {18, 14, 10, 9, 8, 7, 9, 3, 2, 4, 1};
int expected1[] = {1, 2, 3, 4, 7, 8, 9, 9, 10, 14, 18};
int size1 = sizeof(test1)/sizeof(test1[0]);
int* result1 = func0(test1, size1);
for(int i=0; i<size1; i++)
assert(result1[i] == expected1[i]);
... | O3 | c | func0:
endbr64
push %r15
mov %rdi,%r15
push %r14
push %r13
movslq %esi,%r13
push %r12
mov %r13,%r12
shl $0x2,%r13
push %rbp
mov %r13,%rdi
push %rbx
mov %r12d,%ebx
shr $0x1f,%ebx
add %r12d,%ebx
sub $0x8,%rsp
sar %ebx
callq 10d0 <malloc@plt>
sub $0x1,%ebx
mov %rax,%rbp
test ... | func0:
endbr64
push r13
movsxd r13, esi
push r12
mov r12, rdi
push rbp
push rbx
mov rbx, r13
shl r13, 2
mov rdi, r13; size
sub rsp, 8
call _malloc
mov rbp, rax
test ebx, ebx
jle loc_1590
mov edx, ebx
mov rsi, r12; src
mov rdi, rax; dest
shl rdx, 2; n
call ... | _DWORD * func0(void *src, int a2)
{
_DWORD *v2; // rax
_DWORD *v3; // rbp
unsigned int v4; // r12d
long long v6; // rbx
_DWORD *v7; // r13
_DWORD *v8; // r12
long long v9; // rsi
int v10; // eax
v2 = malloc(4LL * a2);
v3 = v2;
if ( a2 <= 0 )
{
v7 = malloc(4LL * a2);
}
else
{
memcp... | func0:
ENDBR64
PUSH R13
MOVSXD R13,ESI
PUSH R12
MOV R12,RDI
PUSH RBP
PUSH RBX
MOV RBX,R13
SHL R13,0x2
MOV RDI,R13
SUB RSP,0x8
CALL 0x001010d0
MOV RBP,RAX
TEST EBX,EBX
JLE 0x00101590
MOV EDX,EBX
MOV RSI,R12
MOV RDI,RAX
SHL RDX,0x2
CALL 0x001010c0
MOV EAX,EBX
SAR EAX,0x1
LEA R12D,[RAX + -0x1]
JZ 0x00101533
NOP dword ptr ... | int4 * func0(void *param_1,uint param_2)
{
int4 *puVar1;
int iVar2;
int4 *__dest;
int4 *puVar3;
ulong uVar4;
ulong uVar5;
int4 *puVar6;
size_t __size;
__size = (long)(int)param_2 << 2;
__dest = (int4 *)malloc(__size);
if ((int)param_2 < 1) {
puVar3 = (int4 *)malloc(__size);
}
else {
... |
5,384 | func0 | #include <assert.h>
| int func0(int l, int w, int h) {
int volume = l * w * h;
return volume;
}
| int main() {
assert(func0(1, 2, 3) == 6);
assert(func0(5, 7, 9) == 315);
assert(func0(10, 15, 21) == 3150);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
mov %esi,-0x18(%rbp)
mov %edx,-0x1c(%rbp)
mov -0x14(%rbp),%eax
imul -0x18(%rbp),%eax
mov -0x1c(%rbp),%edx
imul %edx,%eax
mov %eax,-0x4(%rbp)
mov -0x4(%rbp),%eax
pop %rbp
retq
| func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_18], esi
mov [rbp+var_1C], edx
mov eax, [rbp+var_14]
imul eax, [rbp+var_18]
mov edx, [rbp+var_1C]
imul eax, edx
mov [rbp+var_4], eax
mov eax, [rbp+var_4]
pop rbp
retn | long long func0(int a1, int a2, int a3)
{
return (unsigned int)(a3 * a2 * a1);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x18],ESI
MOV dword ptr [RBP + -0x1c],EDX
MOV EAX,dword ptr [RBP + -0x14]
IMUL EAX,dword ptr [RBP + -0x18]
MOV EDX,dword ptr [RBP + -0x1c]
IMUL EAX,EDX
MOV dword ptr [RBP + -0x4],EAX
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET | int func0(int param_1,int param_2,int param_3)
{
return param_1 * param_2 * param_3;
} |
5,385 | func0 | #include <assert.h>
| int func0(int l, int w, int h) {
int volume = l * w * h;
return volume;
}
| int main() {
assert(func0(1, 2, 3) == 6);
assert(func0(5, 7, 9) == 315);
assert(func0(10, 15, 21) == 3150);
return 0;
}
| O1 | c | func0:
endbr64
imul %esi,%edi
mov %edi,%eax
imul %edx,%eax
retq
| func0:
endbr64
imul edi, esi
mov eax, edi
imul eax, edx
retn | long long func0(int a1, int a2, int a3)
{
return (unsigned int)(a3 * a2 * a1);
} | func0:
ENDBR64
IMUL EDI,ESI
MOV EAX,EDI
IMUL EAX,EDX
RET | int func0(int param_1,int param_2,int param_3)
{
return param_1 * param_2 * param_3;
} |
5,386 | func0 | #include <assert.h>
| int func0(int l, int w, int h) {
int volume = l * w * h;
return volume;
}
| int main() {
assert(func0(1, 2, 3) == 6);
assert(func0(5, 7, 9) == 315);
assert(func0(10, 15, 21) == 3150);
return 0;
}
| O2 | c | func0:
endbr64
imul %esi,%edi
mov %edi,%eax
imul %edx,%eax
retq
nopl (%rax)
| func0:
endbr64
imul edi, esi
mov eax, edi
imul eax, edx
retn | long long func0(int a1, int a2, int a3)
{
return (unsigned int)(a3 * a2 * a1);
} | func0:
ENDBR64
IMUL EDI,ESI
MOV EAX,EDI
IMUL EAX,EDX
RET | int func0(int param_1,int param_2,int param_3)
{
return param_1 * param_2 * param_3;
} |
5,387 | func0 | #include <assert.h>
| int func0(int l, int w, int h) {
int volume = l * w * h;
return volume;
}
| int main() {
assert(func0(1, 2, 3) == 6);
assert(func0(5, 7, 9) == 315);
assert(func0(10, 15, 21) == 3150);
return 0;
}
| O3 | c | func0:
endbr64
imul %esi,%edi
mov %edi,%eax
imul %edx,%eax
retq
nopl (%rax)
| func0:
endbr64
imul edi, esi
mov eax, edi
imul eax, edx
retn | long long func0(int a1, int a2, int a3)
{
return (unsigned int)(a3 * a2 * a1);
} | func0:
ENDBR64
IMUL EDI,ESI
MOV EAX,EDI
IMUL EAX,EDX
RET | int func0(int param_1,int param_2,int param_3)
{
return param_1 * param_2 * param_3;
} |
5,388 | func0 |
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <stdlib.h>
| void func0(const char *str, char **result, int *index) {
int len = strlen(str);
if (len == 0) {
result[*index] = strdup("");
(*index)++;
return;
}
char **prev_list = malloc(40320 * sizeof(char *)); // 40320 = 8! maximum permutations for 8 characters
int prev_index =... | int main() {
char *result[100];
int index;
index = 0;
func0("ab", result, &index);
assert(strcmp(result[0], "ab") == 0 && strcmp(result[1], "ba") == 0 && index == 2);
index = 0;
func0("abc", result, &index);
assert(strcmp(result[0], "abc") == 0 && strcmp(result[1], "bac") == ... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x58,%rsp
mov %rdi,-0x48(%rbp)
mov %rsi,-0x50(%rbp)
mov %rdx,-0x58(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x48(%rbp),%rax
mov %rax,%rdi
callq 1100 <strlen@plt>
mov %eax,-0x2c(%rbp)
cmpl $0x0,-0x2c(%rbp... | func0:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 58h
mov [rbp+s], rdi
mov [rbp+var_50], rsi
mov [rbp+var_58], rdx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+s]
mov rdi, rax; s
call _strlen
mov [rbp+var_2C], eax
cmp [rbp+var_2C], 0
jnz ... | unsigned long long func0(const char *a1, long long a2, int *a3)
{
char **v3; // rbx
size_t v4; // rbx
int v7; // [rsp+20h] [rbp-40h] BYREF
int i; // [rsp+24h] [rbp-3Ch]
int j; // [rsp+28h] [rbp-38h]
int k; // [rsp+2Ch] [rbp-34h]
int v11; // [rsp+30h] [rbp-30h]
int v12; // [rsp+34h] [rbp-2Ch]
void *pt... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RBP + -0x48],RDI
MOV qword ptr [RBP + -0x50],RSI
MOV qword ptr [RBP + -0x58],RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x48]
MOV RDI,RAX
CALL 0x00101100
MOV dword ptr [RBP + -0x2c],EAX
CM... | void func0(char *param_1,long param_2,int *param_3)
{
int iVar1;
size_t sVar2;
char *pcVar3;
ulong uVar4;
long in_FS_OFFSET;
int local_48;
int local_44;
int local_40;
int local_3c;
int local_38;
int local_34;
void *local_30;
char *local_28;
long local_20;
local_20 = *(long *)(in_FS_OFF... |
5,389 | func0 |
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <stdlib.h>
| void func0(const char *str, char **result, int *index) {
int len = strlen(str);
if (len == 0) {
result[*index] = strdup("");
(*index)++;
return;
}
char **prev_list = malloc(40320 * sizeof(char *)); // 40320 = 8! maximum permutations for 8 characters
int prev_index =... | int main() {
char *result[100];
int index;
index = 0;
func0("ab", result, &index);
assert(strcmp(result[0], "ab") == 0 && strcmp(result[1], "ba") == 0 && index == 2);
index = 0;
func0("abc", result, &index);
assert(strcmp(result[0], "abc") == 0 && strcmp(result[1], "bac") == ... | O1 | c | func0:
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x58,%rsp
mov %rdi,0x18(%rsp)
mov %rsi,0x10(%rsp)
mov %rdx,0x8(%rsp)
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
mov $0xffffffffffffffff,%rcx
repnz scas %es:(%rdi),%al
mov %rcx,%rax
not %rax... | func0:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 58h
mov [rsp+88h+var_78], rdi
mov r15, rsi
mov [rsp+88h+var_80], rdx
mov rax, fs:28h
mov [rsp+88h+var_40], rax
xor eax, eax
call _strlen
test eax, eax
jz short loc_12E1
mov ebx, eax... | unsigned long long func0(_BYTE *a1, _QWORD *a2, int *a3)
{
int v4; // eax
int v5; // ebx
long long v6; // r14
_QWORD *v7; // rbx
unsigned long long v8; // r13
long long *v9; // rbx
long long v11; // rbp
long long v12; // rsi
int v13; // r14d
_QWORD *v14; // rbx
long long v15; // [rsp+0h] [rbp-88h... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RSP + 0x10],RDI
MOV R15,RSI
MOV qword ptr [RSP + 0x8],RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
CALL 0x00101100
TEST EAX,EAX
JZ 0x001012e1
MOV EBX,EAX
MOV EDI,0x4ec00
CALL 0x00101140
MOV R14... | void func0(char *param_1,int8 *param_2,int *param_3)
{
char *__src;
int iVar1;
int iVar2;
size_t sVar3;
int8 *__ptr;
ulong uVar4;
char *pcVar5;
size_t sVar6;
char *__dest;
int8 *puVar7;
size_t __n;
long in_FS_OFFSET;
int8 *local_68;
uint local_44;
long local_40;
local_40 = *(long *)(... |
5,390 | func0 |
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <stdlib.h>
| void func0(const char *str, char **result, int *index) {
int len = strlen(str);
if (len == 0) {
result[*index] = strdup("");
(*index)++;
return;
}
char **prev_list = malloc(40320 * sizeof(char *)); // 40320 = 8! maximum permutations for 8 characters
int prev_index =... | int main() {
char *result[100];
int index;
index = 0;
func0("ab", result, &index);
assert(strcmp(result[0], "ab") == 0 && strcmp(result[1], "ba") == 0 && index == 2);
index = 0;
func0("abc", result, &index);
assert(strcmp(result[0], "abc") == 0 && strcmp(result[1], "bac") == ... | O2 | c | func0:
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x58,%rsp
mov %rdi,0x18(%rsp)
mov %rsi,0x10(%rsp)
mov %rdx,0x8(%rsp)
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
callq 1100 <strlen@plt>
test %eax,%eax
je 162d <func0+0x1cd>
mov $0x4ec00,%e... | func0:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 68h
mov [rsp+98h+var_80], rdi
mov [rsp+98h+var_88], rsi
mov [rsp+98h+var_90], rdx
mov rax, fs:28h
mov [rsp+98h+var_40], rax
xor eax, eax
call _strlen
test eax, eax
jz loc_1615
mov e... | long long func0(_BYTE *a1, _QWORD *a2, int *a3)
{
int v3; // eax
int v4; // ebx
unsigned long long v5; // rbp
long long v6; // r13
long long v7; // r14
long long v8; // rsi
int v9; // r12d
_QWORD *v10; // r15
long long *v11; // rbx
long long v12; // rdi
_QWORD *v14; // rbx
long long *v17; // [r... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x68
MOV qword ptr [RSP + 0x18],RDI
MOV qword ptr [RSP + 0x10],RSI
MOV qword ptr [RSP + 0x8],RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x58],RAX
XOR EAX,EAX
CALL 0x00101100
TEST EAX,EAX
JZ 0x00101615
MOV EDI,0x4ec00
MOV RBX,RAX
CALL... | void func0(char *param_1,int8 *param_2,int *param_3)
{
char *__src;
int iVar1;
int iVar2;
size_t sVar3;
int8 *__ptr;
ulong uVar4;
char *__dest;
size_t sVar5;
char *pcVar6;
int8 *puVar7;
int8 *puVar8;
size_t __n;
long in_FS_OFFSET;
int8 *local_68;
uint local_44;
long local_40;
local... |
5,391 | func0 |
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <stdlib.h>
| void func0(const char *str, char **result, int *index) {
int len = strlen(str);
if (len == 0) {
result[*index] = strdup("");
(*index)++;
return;
}
char **prev_list = malloc(40320 * sizeof(char *)); // 40320 = 8! maximum permutations for 8 characters
int prev_index =... | int main() {
char *result[100];
int index;
index = 0;
func0("ab", result, &index);
assert(strcmp(result[0], "ab") == 0 && strcmp(result[1], "ba") == 0 && index == 2);
index = 0;
func0("abc", result, &index);
assert(strcmp(result[0], "abc") == 0 && strcmp(result[1], "bac") == ... | O3 | c | func0:
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x58,%rsp
mov %rdi,0x18(%rsp)
mov %rsi,0x10(%rsp)
mov %rdx,0x8(%rsp)
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
callq 1100 <strlen@plt>
test %eax,%eax
je 162d <func0+0x1cd>
mov $0x4ec00,%e... | func0:
endbr64
push r15
push r14
mov r14, rsi
push r13
push r12
push rbp
push rbx
sub rsp, 58h
mov [rsp+88h+var_78], rdi
mov [rsp+88h+var_88], rdx
mov rax, fs:28h
mov [rsp+88h+var_40], rax
xor eax, eax
call _strlen
test eax, eax
jz loc_162B
mov edi, 4EC00h; s... | void func0(const char *a1, const char **a2, int *a3)
{
int v4; // eax
int v5; // ebx
const char **v6; // r13
size_t v7; // rbp
const char *v8; // r13
char *v9; // rbx
const char *v10; // rsi
size_t v11; // rdx
int v12; // edx
long long v13; // rsi
const char **v14; // r12
const char **v15; // r... | func0:
ENDBR64
PUSH R15
PUSH R14
MOV R14,RSI
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP],RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
CALL 0x001010e0
TEST EAX,EAX
JZ 0x0010162b
MOV EDI,0x4ec00
MOV EBX,EAX
CALL 0x00101120
LEA RDX,[RSP ... | void func0(char *param_1,int8 *param_2,int *param_3)
{
char *pcVar1;
int iVar2;
int iVar3;
size_t sVar4;
int8 *__ptr;
long lVar5;
size_t sVar6;
char *__s2;
char *pcVar7;
ulong uVar8;
int8 *puVar9;
int8 *puVar10;
long in_FS_OFFSET;
int8 *local_68;
int local_44;
long local_40;
local_... |
5,392 | func0 |
#include <assert.h>
| int func0(int n, int m) {
int a = (n / m) * m;
int b = a + m;
return (n - a > b - n) ? b : a;
}
| int main() {
assert(func0(4722, 10) == 4720);
assert(func0(1111, 5) == 1110);
assert(func0(219, 2) == 218);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
mov %esi,-0x18(%rbp)
mov -0x14(%rbp),%eax
cltd
idivl -0x18(%rbp)
mov %eax,%edx
mov -0x18(%rbp),%eax
imul %edx,%eax
mov %eax,-0x8(%rbp)
mov -0x8(%rbp),%edx
mov -0x18(%rbp),%eax
add %edx,%eax
mov %eax,-0x4(%rbp)
mov -0x14... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_18], esi
mov eax, [rbp+var_14]
cdq
idiv [rbp+var_18]
mov edx, eax
mov eax, [rbp+var_18]
imul eax, edx
mov [rbp+var_8], eax
mov edx, [rbp+var_8]
mov eax, [rbp+var_18]
add eax, edx
mov [rbp+var_4],... | long long func0(int a1, int a2)
{
if ( a1 % a2 <= a1 / a2 * a2 + a2 - a1 )
return (unsigned int)(a1 / a2 * a2);
else
return (unsigned int)(a1 / a2 * a2 + a2);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x18],ESI
MOV EAX,dword ptr [RBP + -0x14]
CDQ
IDIV dword ptr [RBP + -0x18]
MOV EDX,EAX
MOV EAX,dword ptr [RBP + -0x18]
IMUL EAX,EDX
MOV dword ptr [RBP + -0x8],EAX
MOV EDX,dword ptr [RBP + -0x8]
MOV EAX,dword ptr [RBP + -0x18]
ADD ... | int func0(int param_1,int param_2)
{
int iVar1;
iVar1 = param_2 * (param_1 / param_2);
if ((param_2 + iVar1) - param_1 < param_1 - iVar1) {
iVar1 = param_2 + iVar1;
}
return iVar1;
} |
5,393 | func0 |
#include <assert.h>
| int func0(int n, int m) {
int a = (n / m) * m;
int b = a + m;
return (n - a > b - n) ? b : a;
}
| int main() {
assert(func0(4722, 10) == 4720);
assert(func0(1111, 5) == 1110);
assert(func0(219, 2) == 218);
return 0;
}
| O1 | c | func0:
endbr64
mov %edi,%eax
cltd
idiv %esi
imul %esi,%eax
mov %eax,%ecx
lea (%rsi,%rax,1),%eax
sub %edi,%eax
add %ecx,%esi
cmp %edx,%eax
mov %ecx,%eax
cmovl %esi,%eax
retq
| func0:
endbr64
mov eax, edi
cdq
idiv esi
imul eax, esi
mov ecx, eax
lea eax, [rsi+rax]
sub eax, edi
add esi, ecx
cmp eax, edx
mov eax, ecx
cmovl eax, esi
retn | long long func0(int a1, int a2)
{
int v2; // edx
unsigned int v3; // ecx
int v4; // eax
unsigned int v5; // esi
bool v6; // cc
long long result; // rax
v2 = a1 % a2;
v3 = a2 * (a1 / a2);
v4 = a2 + v3 - a1;
v5 = v3 + a2;
v6 = v4 < v2;
result = v3;
if ( v6 )
return v5;
return result;
} | func0:
ENDBR64
MOV EAX,EDI
CDQ
IDIV ESI
IMUL EAX,ESI
MOV ECX,EAX
LEA EAX,[RSI + RAX*0x1]
SUB EAX,EDI
ADD ESI,ECX
CMP EAX,EDX
MOV EAX,ECX
CMOVL EAX,ESI
RET | int func0(int param_1,int param_2)
{
int iVar1;
iVar1 = (param_1 / param_2) * param_2;
if ((param_2 + iVar1) - param_1 < param_1 % param_2) {
iVar1 = param_2 + iVar1;
}
return iVar1;
} |
5,394 | func0 |
#include <assert.h>
| int func0(int n, int m) {
int a = (n / m) * m;
int b = a + m;
return (n - a > b - n) ? b : a;
}
| int main() {
assert(func0(4722, 10) == 4720);
assert(func0(1111, 5) == 1110);
assert(func0(219, 2) == 218);
return 0;
}
| O2 | c | func0:
endbr64
mov %edi,%eax
cltd
idiv %esi
imul %esi,%eax
mov %eax,%ecx
lea (%rsi,%rax,1),%eax
mov %eax,%esi
sub %edi,%esi
cmp %edx,%esi
cmovge %ecx,%eax
retq
nopl 0x0(%rax,%rax,1)
| func0:
endbr64
mov eax, edi
cdq
idiv esi
imul eax, esi
mov ecx, eax
lea eax, [rsi+rax]
mov esi, eax
sub esi, edi
cmp esi, edx
cmovge eax, ecx
retn | long long func0(int a1, int a2)
{
unsigned int v2; // ecx
long long result; // rax
v2 = a2 * (a1 / a2);
result = a2 + v2;
if ( (int)(a2 + v2 - a1) >= a1 % a2 )
return v2;
return result;
} | func0:
ENDBR64
MOV EAX,EDI
CDQ
IDIV ESI
IMUL EAX,ESI
MOV ECX,EAX
LEA EAX,[RSI + RAX*0x1]
MOV ESI,EAX
SUB ESI,EDI
CMP ESI,EDX
CMOVGE EAX,ECX
RET | int func0(int param_1,int param_2)
{
int iVar1;
int iVar2;
iVar2 = (param_1 / param_2) * param_2;
iVar1 = param_2 + iVar2;
if (param_1 % param_2 <= iVar1 - param_1) {
iVar1 = iVar2;
}
return iVar1;
} |
5,395 | func0 |
#include <assert.h>
| int func0(int n, int m) {
int a = (n / m) * m;
int b = a + m;
return (n - a > b - n) ? b : a;
}
| int main() {
assert(func0(4722, 10) == 4720);
assert(func0(1111, 5) == 1110);
assert(func0(219, 2) == 218);
return 0;
}
| O3 | c | func0:
endbr64
mov %edi,%eax
cltd
idiv %esi
imul %esi,%eax
mov %eax,%ecx
lea (%rsi,%rax,1),%eax
mov %eax,%esi
sub %edi,%esi
cmp %edx,%esi
cmovge %ecx,%eax
retq
nopl 0x0(%rax,%rax,1)
| func0:
endbr64
mov eax, edi
cdq
idiv esi
imul eax, esi
add esi, eax
mov ecx, esi
sub ecx, edi
cmp ecx, edx
cmovl eax, esi
retn | long long func0(int a1, int a2)
{
int v2; // edx
long long result; // rax
unsigned int v4; // esi
v2 = a1 % a2;
result = (unsigned int)(a2 * (a1 / a2));
v4 = result + a2;
if ( (int)(v4 - a1) < v2 )
return v4;
return result;
} | func0:
ENDBR64
MOV EAX,EDI
CDQ
IDIV ESI
IMUL EAX,ESI
ADD ESI,EAX
MOV ECX,ESI
SUB ECX,EDI
CMP ECX,EDX
CMOVL EAX,ESI
RET | int func0(int param_1,int param_2)
{
int iVar1;
int iVar2;
iVar1 = (param_1 / param_2) * param_2;
iVar2 = param_2 + iVar1;
if (iVar2 - param_1 < param_1 % param_2) {
iVar1 = iVar2;
}
return iVar1;
} |
5,396 | func0 |
#include <stdio.h>
#include <stdbool.h>
#include <assert.h>
#include <stdlib.h>
typedef struct {
int *arr;
int length;
} Tuple;
| Tuple func0(Tuple test_tup) {
bool found[256] = {false}; // Assuming numbers in tuple are within 0-255
Tuple res;
res.arr = (int*)malloc(test_tup.length * sizeof(int));
res.length = test_tup.length;
for (int i = 0; i < test_tup.length; i++) {
int ele = test_tup.arr[i];
i... | int main() {
Tuple tuple1 = { (int[]){1, 1, 4, 4, 4, 5, 5, 6, 7, 7}, 10 };
Tuple res1 = func0(tuple1);
int expected1[10] = {1, -1, 4, -1, -1, 5, -1, 6, 7, -1};
for (int i = 0; i < 10; i++) {
assert(res1.arr[i] == expected1[i]);
}
Tuple tuple2 = { (int[]){2, 3, 4, 4, 5, 6, 6, 7, ... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x140,%rsp
mov %rdi,%rax
mov %rsi,%rcx
mov %rcx,%rdx
mov %rax,-0x140(%rbp)
mov %rdx,-0x138(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
lea -0x110(%rbp),%rdx
mov $0x0,%eax
mov $0x20,%ecx
mov %rdx,%rdi
rep stos %rax,%es:... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 140h
mov rax, rdi
mov rcx, rsi
mov rdx, rcx
mov [rbp+var_140], rax
mov [rbp+var_138], rdx
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
lea rdx, [rbp+var_110]
mov eax, 0
mov ecx, 20h ; ' '
mov rdi, rdx
rep stosq... | _DWORD * func0(long long a1, int a2)
{
int i; // [rsp+18h] [rbp-128h]
int v4; // [rsp+1Ch] [rbp-124h]
_DWORD *v5; // [rsp+20h] [rbp-120h]
_BYTE v6[264]; // [rsp+30h] [rbp-110h] BYREF
unsigned long long v7; // [rsp+138h] [rbp-8h]
v7 = __readfsqword(0x28u);
memset(v6, 0, 0x100uLL);
v5 = malloc(4LL * a2);... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x140
MOV RAX,RDI
MOV RCX,RSI
MOV RDX,RCX
MOV qword ptr [RBP + -0x140],RAX
MOV qword ptr [RBP + -0x138],RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
LEA RDX,[RBP + -0x110]
MOV EAX,0x0
MOV ECX,0x20
MOV RDI,RDX
STOSQ.REP RDI
MOV EAX,dword ptr [RBP ... | void * func0(long param_1,int param_2)
{
int iVar1;
void *pvVar2;
long lVar3;
char *pcVar4;
long in_FS_OFFSET;
int local_130;
char local_118 [264];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
pcVar4 = local_118;
for (lVar3 = 0x20; lVar3 != 0; lVar3 = lVar3 + -1) {
pcVar4[0] =... |
5,397 | func0 |
#include <stdio.h>
#include <stdbool.h>
#include <assert.h>
#include <stdlib.h>
typedef struct {
int *arr;
int length;
} Tuple;
| Tuple func0(Tuple test_tup) {
bool found[256] = {false}; // Assuming numbers in tuple are within 0-255
Tuple res;
res.arr = (int*)malloc(test_tup.length * sizeof(int));
res.length = test_tup.length;
for (int i = 0; i < test_tup.length; i++) {
int ele = test_tup.arr[i];
i... | int main() {
Tuple tuple1 = { (int[]){1, 1, 4, 4, 4, 5, 5, 6, 7, 7}, 10 };
Tuple res1 = func0(tuple1);
int expected1[10] = {1, -1, 4, -1, -1, 5, -1, 6, 7, -1};
for (int i = 0; i < 10; i++) {
assert(res1.arr[i] == expected1[i]);
}
Tuple tuple2 = { (int[]){2, 3, 4, 4, 5, 6, 6, 7, ... | O1 | c | func0:
endbr64
push %rbp
push %rbx
sub $0x118,%rsp
mov %rdi,%rbp
mov %rsi,%rbx
mov %fs:0x28,%rax
mov %rax,0x108(%rsp)
xor %eax,%eax
mov %rsp,%rdi
mov $0x20,%ecx
rep stos %rax,%es:(%rdi)
movslq %esi,%rdi
shl $0x2,%rdi
callq 10b0 <malloc@plt>
test %ebx,%ebx
jle 1220 <func0+0x77>
mov ... | func0:
endbr64
push rbp
push rbx
sub rsp, 118h
mov rbx, rdi
mov rbp, rsi
mov rax, fs:28h
mov [rsp+128h+var_20], rax
xor eax, eax
mov rdi, rsp
mov ecx, 20h ; ' '
rep stosq
movsxd rdi, esi
shl rdi, 2
call _malloc
test ebp, ebp
jle short loc_1218
mov edi, ebp
mov ... | long long func0(long long a1, int a2)
{
long long result; // rax
long long i; // rdx
int v4; // ecx
_BYTE v5[264]; // [rsp+0h] [rbp-128h] BYREF
unsigned long long v6; // [rsp+108h] [rbp-20h]
v6 = __readfsqword(0x28u);
memset(v5, 0, 0x100uLL);
result = malloc(4LL * a2);
if ( a2 > 0 )
{
for ( i ... | func0:
ENDBR64
PUSH RBP
PUSH RBX
SUB RSP,0x118
MOV RBX,RDI
MOV RBP,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x108],RAX
XOR EAX,EAX
MOV RDI,RSP
MOV ECX,0x20
STOSQ.REP RDI
MOVSXD RDI,ESI
SHL RDI,0x2
CALL 0x001010b0
TEST EBP,EBP
JLE 0x00101218
MOV EDI,EBP
MOV EDX,0x0
JMP 0x00101203
LAB_001011f3:
MOV dword ptr ... | void func0(long param_1,uint param_2)
{
int iVar1;
void *pvVar2;
long lVar3;
ulong uVar4;
char *pcVar5;
long in_FS_OFFSET;
char acStack_128 [264];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
pcVar5 = acStack_128;
for (lVar3 = 0x20; lVar3 != 0; lVar3 = lVar3 + -1) {
*(int8 *)p... |
5,398 | func0 |
#include <stdio.h>
#include <stdbool.h>
#include <assert.h>
#include <stdlib.h>
typedef struct {
int *arr;
int length;
} Tuple;
| Tuple func0(Tuple test_tup) {
bool found[256] = {false}; // Assuming numbers in tuple are within 0-255
Tuple res;
res.arr = (int*)malloc(test_tup.length * sizeof(int));
res.length = test_tup.length;
for (int i = 0; i < test_tup.length; i++) {
int ele = test_tup.arr[i];
i... | int main() {
Tuple tuple1 = { (int[]){1, 1, 4, 4, 4, 5, 5, 6, 7, 7}, 10 };
Tuple res1 = func0(tuple1);
int expected1[10] = {1, -1, 4, -1, -1, 5, -1, 6, 7, -1};
for (int i = 0; i < 10; i++) {
assert(res1.arr[i] == expected1[i]);
}
Tuple tuple2 = { (int[]){2, 3, 4, 4, 5, 6, 6, 7, ... | O2 | c | func0:
endbr64
push %rbp
mov $0x20,%ecx
mov %rsi,%rbp
push %rbx
mov %rdi,%rbx
sub $0x118,%rsp
mov %fs:0x28,%rax
mov %rax,0x108(%rsp)
xor %eax,%eax
mov %rsp,%rdi
rep stos %rax,%es:(%rdi)
movslq %esi,%rdi
shl $0x2,%rdi
callq 10b0 <malloc@plt>
lea -0x1(%rbp),%r9d
xor %ecx,%ecx
test ... | func0:
endbr64
push r12
mov ecx, 20h ; ' '
mov r12, rsi
push rbp
movsxd rbp, esi
push rbx
mov rbx, rdi
sub rsp, 110h
mov rax, fs:28h
mov [rsp+128h+var_20], rax
xor eax, eax
mov rdi, rsp
rep stosq
lea rdi, ds:0[rbp*4]
call _malloc
xor ecx, ecx
test r12d, r12d
jg ... | long long func0(long long a1, int a2)
{
long long v2; // rbp
long long result; // rax
long long v4; // rcx
long long v5; // rsi
_BYTE v6[264]; // [rsp+0h] [rbp-128h] BYREF
unsigned long long v7; // [rsp+108h] [rbp-20h]
v2 = a2;
v7 = __readfsqword(0x28u);
memset(v6, 0, 0x100uLL);
result = malloc(4L... | func0:
ENDBR64
PUSH R12
MOV ECX,0x20
MOV R12,RSI
PUSH RBP
MOVSXD RBP,ESI
PUSH RBX
MOV RBX,RDI
SUB RSP,0x110
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x108],RAX
XOR EAX,EAX
MOV RDI,RSP
STOSQ.REP RDI
LEA RDI,[RBP*0x4]
CALL 0x001010b0
XOR ECX,ECX
TEST R12D,R12D
JG 0x00101540
JMP 0x0010155a
LAB_00101530:
MOV dword ... | void func0(long param_1,int param_2)
{
int iVar1;
void *pvVar2;
long lVar3;
long lVar4;
char *pcVar5;
long in_FS_OFFSET;
char acStack_128 [264];
long local_20;
lVar4 = (long)param_2;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
pcVar5 = acStack_128;
for (lVar3 = 0x20; lVar3 != 0; lVar3 = lVar3... |
5,399 | func0 |
#include <stdio.h>
#include <stdbool.h>
#include <assert.h>
#include <stdlib.h>
typedef struct {
int *arr;
int length;
} Tuple;
| Tuple func0(Tuple test_tup) {
bool found[256] = {false}; // Assuming numbers in tuple are within 0-255
Tuple res;
res.arr = (int*)malloc(test_tup.length * sizeof(int));
res.length = test_tup.length;
for (int i = 0; i < test_tup.length; i++) {
int ele = test_tup.arr[i];
i... | int main() {
Tuple tuple1 = { (int[]){1, 1, 4, 4, 4, 5, 5, 6, 7, 7}, 10 };
Tuple res1 = func0(tuple1);
int expected1[10] = {1, -1, 4, -1, -1, 5, -1, 6, 7, -1};
for (int i = 0; i < 10; i++) {
assert(res1.arr[i] == expected1[i]);
}
Tuple tuple2 = { (int[]){2, 3, 4, 4, 5, 6, 6, 7, ... | O3 | c | func0:
endbr64
push %rbp
mov $0x20,%ecx
mov %rsi,%rbp
push %rbx
mov %rdi,%rbx
sub $0x118,%rsp
mov %fs:0x28,%rax
mov %rax,0x108(%rsp)
xor %eax,%eax
mov %rsp,%rdi
rep stos %rax,%es:(%rdi)
movslq %esi,%rdi
shl $0x2,%rdi
callq 10b0 <malloc@plt>
lea -0x1(%rbp),%r9d
xor %ecx,%ecx
test ... | func0:
endbr64
push r12
mov ecx, 20h ; ' '
mov r12, rsi
push rbp
mov rbp, rdi
push rbx
movsxd rbx, esi
shl rbx, 2
sub rsp, 110h
mov rax, fs:28h
mov [rsp+128h+var_20], rax
xor eax, eax
mov rdi, rsp
rep stosq
mov rdi, rbx; size
call _malloc
xor ecx, ecx
test r12... | char * func0(long long a1, int a2)
{
size_t v2; // rbx
char *result; // rax
long long v4; // rcx
long long v5; // rsi
_BYTE v6[264]; // [rsp+0h] [rbp-128h] BYREF
unsigned long long v7; // [rsp+108h] [rbp-20h]
v2 = 4LL * a2;
v7 = __readfsqword(0x28u);
memset(v6, 0, 0x100uLL);
result = (char *)malloc... | func0:
ENDBR64
PUSH R12
MOV ECX,0x20
MOV R12,RSI
PUSH RBP
MOV RBP,RDI
PUSH RBX
MOVSXD RBX,ESI
SHL RBX,0x2
SUB RSP,0x110
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x108],RAX
XOR EAX,EAX
MOV RDI,RSP
STOSQ.REP RDI
MOV RDI,RBX
CALL 0x001010b0
XOR ECX,ECX
TEST R12D,R12D
JG 0x00101490
JMP 0x001014ab
LAB_00101480:
MOV ... | void func0(long param_1,int param_2)
{
int iVar1;
void *pvVar2;
long lVar3;
size_t sVar4;
size_t __size;
char *pcVar5;
long in_FS_OFFSET;
char acStack_128 [264];
long local_20;
__size = (long)param_2 * 4;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
pcVar5 = acStack_128;
for (lVar3 = 0x20; l... |
5,400 | func0 |
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <stdlib.h>
| char* func0(char* s, char c) {
int counts = 0;
for(int i = 0; s[i] != '\0'; i++) {
if(s[i] == c) {
counts++;
}
}
char* result = (char*)malloc(strlen(s) - counts + 1);
int j = 0;
for(int i = 0; s[i] != '\0'; i++) {
if(s[i] != c) {
r... | int main() {
assert(strcmp(func0("aba", 'a'), "b") == 0);
assert(strcmp(func0("toggle", 'g'), "tole") == 0);
assert(strcmp(func0("aabbc", 'b'), "aac") == 0);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x30,%rsp
mov %rdi,-0x28(%rbp)
mov %esi,%eax
mov %al,-0x2c(%rbp)
movl $0x0,-0x18(%rbp)
movl $0x0,-0x14(%rbp)
jmp 11eb <func0+0x42>
mov -0x14(%rbp),%eax
movslq %eax,%rdx
mov -0x28(%rbp),%rax
add %rdx,%rax
movzbl (%rax),%eax
cmp %al,-0x2c(%rb... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+s], rdi
mov eax, esi
mov [rbp+var_2C], al
mov [rbp+var_18], 0
mov [rbp+var_14], 0
jmp short loc_11EB
loc_11CE:
mov eax, [rbp+var_14]
movsxd rdx, eax
mov rax, [rbp+s]
add rax, rdx
movzx eax, byte ptr [rax]
cmp ... | _BYTE * func0(const char *a1, char a2)
{
size_t v2; // rax
int v4; // [rsp+18h] [rbp-18h]
int i; // [rsp+1Ch] [rbp-14h]
int v6; // [rsp+20h] [rbp-10h]
int j; // [rsp+24h] [rbp-Ch]
_BYTE *v8; // [rsp+28h] [rbp-8h]
v4 = 0;
for ( i = 0; a1[i]; ++i )
{
if ( a2 == a1[i] )
++v4;
}
v2 = strlen... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x28],RDI
MOV EAX,ESI
MOV byte ptr [RBP + -0x2c],AL
MOV dword ptr [RBP + -0x18],0x0
MOV dword ptr [RBP + -0x14],0x0
JMP 0x001011eb
LAB_001011ce:
MOV EAX,dword ptr [RBP + -0x14]
MOVSXD RDX,EAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,RDX
MOVZX EAX,byt... | void * func0(char *param_1,char param_2)
{
size_t sVar1;
void *pvVar2;
int local_20;
int local_1c;
int local_18;
int local_14;
local_20 = 0;
for (local_1c = 0; param_1[local_1c] != '\0'; local_1c = local_1c + 1) {
if (param_2 == param_1[local_1c]) {
local_20 = local_20 + 1;
}
}
sVa... |
5,401 | func0 |
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <stdlib.h>
| char* func0(char* s, char c) {
int counts = 0;
for(int i = 0; s[i] != '\0'; i++) {
if(s[i] == c) {
counts++;
}
}
char* result = (char*)malloc(strlen(s) - counts + 1);
int j = 0;
for(int i = 0; s[i] != '\0'; i++) {
if(s[i] != c) {
r... | int main() {
assert(strcmp(func0("aba", 'a'), "b") == 0);
assert(strcmp(func0("toggle", 'g'), "tole") == 0);
assert(strcmp(func0("aabbc", 'b'), "aac") == 0);
return 0;
}
| O1 | c | func0:
endbr64
push %r12
push %rbp
push %rbx
movzbl (%rdi),%ebx
test %bl,%bl
je 11e4 <func0+0x7b>
mov %esi,%r12d
lea 0x1(%rdi),%rbp
mov %rbp,%rsi
mov %ebx,%edx
mov $0x0,%r8d
cmp %dl,%r12b
sete %dl
movzbl %dl,%edx
add %edx,%r8d
add $0x1,%rsi
movzbl -0x1(%rsi),%edx
test %dl,%dl
jne... | func0:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 8
movzx ebx, byte ptr [rdi]
test bl, bl
jz short loc_121F
mov r12d, esi
lea rbp, [rdi+1]
mov rdx, rbp
mov eax, ebx
mov r13d, 0
loc_11D0:
cmp r12b, al
setz al
movzx eax, al
add r13d, eax
add rdx, 1
... | long long func0(char *a1, char a2)
{
char v2; // bl
char *v3; // rbp
char *v4; // rdx
char v5; // al
int v6; // r13d
long long v7; // rax
long long result; // rax
int v9; // edx
long long v10; // rax
v2 = *a1;
if ( *a1 )
{
v3 = a1 + 1;
v4 = a1 + 1;
v5 = *a1;
v6 = 0;
do
... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOVZX EBX,byte ptr [RDI]
TEST BL,BL
JZ 0x0010121f
MOV R12D,ESI
LEA RBP,[RDI + 0x1]
MOV RDX,RBP
MOV EAX,EBX
MOV R13D,0x0
LAB_001011d0:
CMP R12B,AL
SETZ AL
MOVZX EAX,AL
ADD R13D,EAX
ADD RDX,0x1
MOVZX EAX,byte ptr [RDX + -0x1]
TEST AL,AL
JNZ 0x001011d0
CALL 0x... | void func0(char *param_1,char param_2)
{
char cVar1;
size_t sVar2;
void *pvVar3;
char *pcVar4;
char cVar5;
int iVar6;
cVar5 = *param_1;
if (cVar5 == '\0') {
sVar2 = strlen(param_1);
pvVar3 = malloc(sVar2 + 1);
iVar6 = 0;
}
else {
iVar6 = 0;
pcVar4 = param_1 + 1;
cVar1 = c... |
5,402 | func0 |
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <stdlib.h>
| char* func0(char* s, char c) {
int counts = 0;
for(int i = 0; s[i] != '\0'; i++) {
if(s[i] == c) {
counts++;
}
}
char* result = (char*)malloc(strlen(s) - counts + 1);
int j = 0;
for(int i = 0; s[i] != '\0'; i++) {
if(s[i] != c) {
r... | int main() {
assert(strcmp(func0("aba", 'a'), "b") == 0);
assert(strcmp(func0("toggle", 'g'), "tole") == 0);
assert(strcmp(func0("aabbc", 'b'), "aac") == 0);
return 0;
}
| O2 | c | func0:
endbr64
push %r12
mov %esi,%r12d
push %rbp
mov %rdi,%rbp
push %rbx
movzbl (%rdi),%ebx
callq 1070 <strlen@plt>
test %bl,%bl
je 1300 <func0+0x90>
add $0x1,%rbp
mov %ebx,%edx
xor %r8d,%r8d
mov %rbp,%rcx
nopw %cs:0x0(%rax,%rax,1)
cmp %dl,%r12b
sete %dl
add $0x1,%rcx
movzbl %d... | func0:
endbr64
push r12
mov r12d, esi
push rbp
mov rbp, rdi
push rbx
movzx ebx, byte ptr [rdi]
call _strlen
test bl, bl
jz short loc_1300
add rbp, 1
mov edx, ebx
xor esi, esi
mov rcx, rbp
nop dword ptr [rax]
loc_12A8:
cmp r12b, dl
setz dl
add rcx, 1
movzx e... | _BYTE * func0(char *a1, char a2)
{
char v3; // bl
long long v4; // rax
char *v5; // rbp
char v6; // dl
int v7; // esi
_BYTE *v8; // rcx
_BYTE *result; // rax
int v10; // edx
long long v11; // rcx
v3 = *a1;
v4 = strlen();
if ( v3 )
{
v5 = a1 + 1;
v6 = v3;
v7 = 0;
v8 = a1 + 1;
... | func0:
ENDBR64
PUSH R12
MOV R12D,ESI
PUSH RBP
MOV RBP,RDI
PUSH RBX
MOVZX EBX,byte ptr [RDI]
CALL 0x00101080
TEST BL,BL
JZ 0x00101300
ADD RBP,0x1
MOV EDX,EBX
XOR ESI,ESI
MOV RCX,RBP
NOP dword ptr [RAX]
LAB_001012a8:
CMP R12B,DL
SETZ DL
ADD RCX,0x1
MOVZX EDX,DL
ADD ESI,EDX
MOVZX EDX,byte ptr [RCX + -0x1]
TEST DL,DL
JNZ 0... | void func0(char *param_1,char param_2)
{
size_t sVar1;
void *pvVar2;
int1 *puVar3;
char *pcVar4;
long lVar5;
char cVar6;
char cVar7;
int iVar8;
cVar7 = *param_1;
sVar1 = strlen(param_1);
if (cVar7 != '\0') {
param_1 = param_1 + 1;
iVar8 = 0;
pcVar4 = param_1;
cVar6 = cVar7;
... |
5,403 | func0 |
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <stdlib.h>
| char* func0(char* s, char c) {
int counts = 0;
for(int i = 0; s[i] != '\0'; i++) {
if(s[i] == c) {
counts++;
}
}
char* result = (char*)malloc(strlen(s) - counts + 1);
int j = 0;
for(int i = 0; s[i] != '\0'; i++) {
if(s[i] != c) {
r... | int main() {
assert(strcmp(func0("aba", 'a'), "b") == 0);
assert(strcmp(func0("toggle", 'g'), "tole") == 0);
assert(strcmp(func0("aabbc", 'b'), "aac") == 0);
return 0;
}
| O3 | c | func0:
endbr64
push %r12
mov %esi,%r12d
push %rbp
mov %rdi,%rbp
push %rbx
movzbl (%rdi),%ebx
callq 1070 <strlen@plt>
test %bl,%bl
je 1318 <func0+0xa8>
add $0x1,%rbp
mov %ebx,%edx
xor %r8d,%r8d
mov %rbp,%rcx
nopw 0x0(%rax,%rax,1)
cmp %dl,%r12b
sete %dl
add $0x1,%rcx
movzbl %dl,%e... | func0:
endbr64
push r12
mov r12d, esi
push rbp
mov rbp, rdi
push rbx
movzx ebx, byte ptr [rdi]
call _strlen
test bl, bl
jz short loc_1310
add rbp, 1
mov edx, ebx
xor esi, esi
mov rcx, rbp
nop dword ptr [rax]
loc_12A8:
cmp r12b, dl
setz dl
add rcx, 1
movzx e... | _BYTE * func0(const char *a1, char a2)
{
char v3; // bl
size_t v4; // rax
char *v5; // rbp
char v6; // dl
int v7; // esi
const char *v8; // rcx
_BYTE *result; // rax
int v10; // edx
long long v11; // rcx
v3 = *a1;
v4 = strlen(a1);
if ( v3 )
{
v5 = (char *)(a1 + 1);
v6 = v3;
v7 = 0... | func0:
ENDBR64
PUSH R12
MOV R12D,ESI
PUSH RBP
MOV RBP,RDI
PUSH RBX
MOVZX EBX,byte ptr [RDI]
CALL 0x00101080
TEST BL,BL
JZ 0x00101310
ADD RBP,0x1
MOV EDX,EBX
XOR ESI,ESI
MOV RCX,RBP
NOP dword ptr [RAX]
LAB_001012a8:
CMP R12B,DL
SETZ DL
ADD RCX,0x1
MOVZX EDX,DL
ADD ESI,EDX
MOVZX EDX,byte ptr [RCX + -0x1]
TEST DL,DL
JNZ 0... | void func0(char *param_1,char param_2)
{
size_t sVar1;
void *pvVar2;
int *puVar3;
long lVar4;
char cVar5;
char cVar6;
char *pcVar7;
int iVar8;
cVar6 = *param_1;
sVar1 = strlen(param_1);
if (cVar6 == '\0') {
puVar3 = (int *)malloc(sVar1 + 1);
*puVar3 = 0;
return;
}
iVar8 = 0;
... |
5,404 | func0 |
#include <assert.h>
#include <stdio.h>
| void func0(int test_list[], int n, int result[]) {
result[0] = test_list[n-1];
for (int i = 1; i < n; i++) {
result[i] = test_list[i-1];
}
}
| int main() {
int test1[] = {1, 2, 3, 4};
int result1[4];
func0(test1, 4, result1);
assert(result1[0] == 4 && result1[1] == 1 && result1[2] == 2 && result1[3] == 3);
int test2[] = {0, 1, 2, 3};
int result2[4];
func0(test2, 4, result2);
assert(result2[0] == 3 && result2[1] == 0 &... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
mov %rdx,-0x28(%rbp)
mov -0x1c(%rbp),%eax
cltq
shl $0x2,%rax
lea -0x4(%rax),%rdx
mov -0x18(%rbp),%rax
add %rdx,%rax
mov (%rax),%edx
mov -0x28(%rbp),%rax
mov %edx,(%rax)
movl $0x1,-0x4(%rbp)
jmp 11... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_28], rdx
mov eax, [rbp+var_1C]
cdqe
shl rax, 2
lea rdx, [rax-4]
mov rax, [rbp+var_18]
add rax, rdx
mov edx, [rax]
mov rax, [rbp+var_28]
mov [rax], edx
mov [rbp+var_4], 1
j... | long long func0(long long a1, int a2, _DWORD *a3)
{
long long result; // rax
int i; // [rsp+24h] [rbp-4h]
*a3 = *(_DWORD *)(4LL * a2 - 4 + a1);
for ( i = 1; ; ++i )
{
result = (unsigned int)i;
if ( i >= a2 )
break;
a3[i] = *(_DWORD *)(4LL * i - 4 + a1);
}
return result;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV qword ptr [RBP + -0x28],RDX
MOV EAX,dword ptr [RBP + -0x1c]
CDQE
SHL RAX,0x2
LEA RDX,[RAX + -0x4]
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,RDX
MOV EDX,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX... | void func0(long param_1,int param_2,int4 *param_3)
{
int local_c;
*param_3 = *(int4 *)(param_1 + (long)param_2 * 4 + -4);
for (local_c = 1; local_c < param_2; local_c = local_c + 1) {
param_3[local_c] = *(int4 *)(param_1 + (long)local_c * 4 + -4);
}
return;
} |
5,405 | func0 |
#include <assert.h>
#include <stdio.h>
| void func0(int test_list[], int n, int result[]) {
result[0] = test_list[n-1];
for (int i = 1; i < n; i++) {
result[i] = test_list[i-1];
}
}
| int main() {
int test1[] = {1, 2, 3, 4};
int result1[4];
func0(test1, 4, result1);
assert(result1[0] == 4 && result1[1] == 1 && result1[2] == 2 && result1[3] == 3);
int test2[] = {0, 1, 2, 3};
int result2[4];
func0(test2, 4, result2);
assert(result2[0] == 3 && result2[1] == 0 &... | O1 | c | func0:
endbr64
movslq %esi,%rax
mov -0x4(%rdi,%rax,4),%eax
mov %eax,(%rdx)
cmp $0x1,%esi
jle 1196 <func0+0x2d>
lea -0x2(%rsi),%esi
mov $0x0,%eax
mov (%rdi,%rax,4),%ecx
mov %ecx,0x4(%rdx,%rax,4)
mov %rax,%rcx
add $0x1,%rax
cmp %rsi,%rcx
jne 1183 <func0+0x1a>
retq
| func0:
endbr64
movsxd rax, esi
mov eax, [rdi+rax*4-4]
mov [rdx], eax
cmp esi, 1
jle short locret_1193
lea esi, [rsi-1]
mov eax, 0
loc_1183:
mov ecx, [rdi+rax*4]
mov [rdx+rax*4+4], ecx
add rax, 1
cmp rax, rsi
jnz short loc_1183
locret_1193:
retn | long long func0(long long a1, int a2, _DWORD *a3)
{
long long result; // rax
long long v4; // rsi
result = *(unsigned int *)(a1 + 4LL * a2 - 4);
*a3 = result;
if ( a2 > 1 )
{
v4 = (unsigned int)(a2 - 1);
result = 0LL;
do
{
a3[result + 1] = *(_DWORD *)(a1 + 4 * result);
++result... | func0:
ENDBR64
MOVSXD RAX,ESI
MOV EAX,dword ptr [RDI + RAX*0x4 + -0x4]
MOV dword ptr [RDX],EAX
CMP ESI,0x1
JLE 0x00101193
LEA ESI,[RSI + -0x1]
MOV EAX,0x0
LAB_00101183:
MOV ECX,dword ptr [RDI + RAX*0x4]
MOV dword ptr [RDX + RAX*0x4 + 0x4],ECX
ADD RAX,0x1
CMP RAX,RSI
JNZ 0x00101183
LAB_00101193:
RET | void func0(long param_1,int param_2,int4 *param_3)
{
ulong uVar1;
*param_3 = *(int4 *)(param_1 + -4 + (long)param_2 * 4);
if (1 < param_2) {
uVar1 = 0;
do {
param_3[uVar1 + 1] = *(int4 *)(param_1 + uVar1 * 4);
uVar1 = uVar1 + 1;
} while (uVar1 != param_2 - 1);
}
return;
} |
5,406 | func0 |
#include <assert.h>
#include <stdio.h>
| void func0(int test_list[], int n, int result[]) {
result[0] = test_list[n-1];
for (int i = 1; i < n; i++) {
result[i] = test_list[i-1];
}
}
| int main() {
int test1[] = {1, 2, 3, 4};
int result1[4];
func0(test1, 4, result1);
assert(result1[0] == 4 && result1[1] == 1 && result1[2] == 2 && result1[3] == 3);
int test2[] = {0, 1, 2, 3};
int result2[4];
func0(test2, 4, result2);
assert(result2[0] == 3 && result2[1] == 0 &... | O2 | c | func0:
endbr64
movslq %esi,%rax
mov -0x4(%rdi,%rax,4),%eax
mov %eax,(%rdx)
cmp $0x1,%esi
jle 1173 <func0+0x33>
sub $0x2,%esi
xor %eax,%eax
nopw 0x0(%rax,%rax,1)
mov (%rdi,%rax,4),%ecx
mov %ecx,0x4(%rdx,%rax,4)
mov %rax,%rcx
add $0x1,%rax
cmp %rcx,%rsi
jne 1160 <func0+0x20>
retq
nop... | func0:
endbr64
movsxd rax, esi
mov eax, [rdi+rax*4-4]
mov [rdx], eax
cmp esi, 1
jle short locret_1340
sub esi, 1
xor eax, eax
nop word ptr [rax+rax+00000000h]
loc_1330:
mov ecx, [rdi+rax*4]
mov [rdx+rax*4+4], ecx
add rax, 1
cmp rax, rsi
jnz short loc_1330
locret_1340:
re... | long long func0(long long a1, int a2, _DWORD *a3)
{
long long result; // rax
long long v4; // rsi
result = *(unsigned int *)(a1 + 4LL * a2 - 4);
*a3 = result;
if ( a2 > 1 )
{
v4 = (unsigned int)(a2 - 1);
result = 0LL;
do
{
a3[result + 1] = *(_DWORD *)(a1 + 4 * result);
++result... | func0:
ENDBR64
MOVSXD RAX,ESI
MOV EAX,dword ptr [RDI + RAX*0x4 + -0x4]
MOV dword ptr [RDX],EAX
CMP ESI,0x1
JLE 0x00101340
SUB ESI,0x1
XOR EAX,EAX
NOP word ptr [RAX + RAX*0x1]
LAB_00101330:
MOV ECX,dword ptr [RDI + RAX*0x4]
MOV dword ptr [RDX + RAX*0x4 + 0x4],ECX
ADD RAX,0x1
CMP RAX,RSI
JNZ 0x00101330
LAB_00101340:
RET | void func0(long param_1,int param_2,int4 *param_3)
{
ulong uVar1;
*param_3 = *(int4 *)(param_1 + -4 + (long)param_2 * 4);
if (1 < param_2) {
uVar1 = 0;
do {
param_3[uVar1 + 1] = *(int4 *)(param_1 + uVar1 * 4);
uVar1 = uVar1 + 1;
} while (uVar1 != param_2 - 1);
}
return;
} |
5,407 | func0 |
#include <assert.h>
#include <stdio.h>
| void func0(int test_list[], int n, int result[]) {
result[0] = test_list[n-1];
for (int i = 1; i < n; i++) {
result[i] = test_list[i-1];
}
}
| int main() {
int test1[] = {1, 2, 3, 4};
int result1[4];
func0(test1, 4, result1);
assert(result1[0] == 4 && result1[1] == 1 && result1[2] == 2 && result1[3] == 3);
int test2[] = {0, 1, 2, 3};
int result2[4];
func0(test2, 4, result2);
assert(result2[0] == 3 && result2[1] == 0 &... | O3 | c | func0:
endbr64
movslq %esi,%rax
mov -0x4(%rdi,%rax,4),%eax
mov %eax,(%rdx)
cmp $0x1,%esi
jle 1203 <func0+0xc3>
lea 0x10(%rdi),%r8
lea 0x4(%rdx),%rcx
cmp %rcx,%r8
lea 0x14(%rdx),%rcx
lea -0x2(%rsi),%eax
setbe %r8b
cmp %rcx,%rdi
setae %cl
or %cl,%r8b
je 11e8 <func0+0xa8>
cmp $0x... | func0:
endbr64
movsxd rax, esi
mov rcx, rdi
mov eax, [rdi+rax*4-4]
mov [rdx], eax
cmp esi, 1
jle short locret_1180
lea eax, [rsi-2]
cmp eax, 2
jbe short loc_1169
mov rax, rdx
sub rax, rdi
cmp rax, 8
ja short loc_1188
loc_1169:
lea edi, [rsi-1]
xor eax, eax
xchg ... | long long func0(long long a1, int a2, _DWORD *a3)
{
long long result; // rax
int v5; // r8d
long long v6; // rax
int v7; // edi
long long v8; // r8
result = *(unsigned int *)(a1 + 4LL * a2 - 4);
*a3 = result;
if ( a2 > 1 )
{
if ( (unsigned int)(a2 - 2) > 2 && (unsigned long long)a3 - a1 > 8 )
... | func0:
ENDBR64
MOVSXD RAX,ESI
MOV RCX,RDI
MOV EAX,dword ptr [RDI + RAX*0x4 + -0x4]
MOV dword ptr [RDX],EAX
CMP ESI,0x1
JLE 0x00101180
LEA EAX,[RSI + -0x2]
CMP EAX,0x2
JBE 0x00101169
MOV RAX,RDX
SUB RAX,RDI
CMP RAX,0x8
JA 0x00101188
LAB_00101169:
LEA EDI,[RSI + -0x1]
XOR EAX,EAX
NOP
LAB_00101170:
MOV ESI,dword ptr [RCX ... | void func0(long param_1,int param_2,int4 *param_3)
{
uint uVar1;
int8 *puVar2;
int8 uVar3;
uint uVar4;
ulong uVar5;
long lVar6;
*param_3 = *(int4 *)(param_1 + -4 + (long)param_2 * 4);
if (1 < param_2) {
if ((param_2 - 2U < 3) || ((ulong)((long)param_3 - param_1) < 9)) {
uVar5 = 0;
do... |
5,408 | func0 | #include <assert.h>
| int func0(int l, int w, int h) {
int SA = 2 * (l * w + l * h + w * h);
return SA;
}
| int main() {
assert(func0(1, 2, 3) == 22);
assert(func0(5, 7, 9) == 286);
assert(func0(10, 15, 21) == 1350);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
mov %esi,-0x18(%rbp)
mov %edx,-0x1c(%rbp)
mov -0x14(%rbp),%eax
imul -0x18(%rbp),%eax
mov %eax,%edx
mov -0x14(%rbp),%eax
imul -0x1c(%rbp),%eax
add %eax,%edx
mov -0x18(%rbp),%eax
imul -0x1c(%rbp),%eax
add %edx,%eax
add %e... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_18], esi
mov [rbp+var_1C], edx
mov eax, [rbp+var_14]
imul eax, [rbp+var_18]
mov edx, eax
mov eax, [rbp+var_14]
imul eax, [rbp+var_1C]
add edx, eax
mov eax, [rbp+var_18]
imul eax, [rbp+var_1C]
add ... | long long func0(int a1, int a2, int a3)
{
return (unsigned int)(2 * (a3 * a1 + a2 * a1 + a3 * a2));
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x18],ESI
MOV dword ptr [RBP + -0x1c],EDX
MOV EAX,dword ptr [RBP + -0x14]
IMUL EAX,dword ptr [RBP + -0x18]
MOV EDX,EAX
MOV EAX,dword ptr [RBP + -0x14]
IMUL EAX,dword ptr [RBP + -0x1c]
ADD EDX,EAX
MOV EAX,dword ptr [RBP + -0x18]
IM... | int func0(int param_1,int param_2,int param_3)
{
return (param_2 * param_3 + param_1 * param_2 + param_1 * param_3) * 2;
} |
5,409 | func0 | #include <assert.h>
| int func0(int l, int w, int h) {
int SA = 2 * (l * w + l * h + w * h);
return SA;
}
| int main() {
assert(func0(1, 2, 3) == 22);
assert(func0(5, 7, 9) == 286);
assert(func0(10, 15, 21) == 1350);
return 0;
}
| O1 | c | func0:
endbr64
mov %edi,%ecx
lea (%rdx,%rsi,1),%edi
imul %ecx,%edi
imul %edx,%esi
lea (%rdi,%rsi,1),%eax
add %eax,%eax
retq
| func0:
endbr64
lea eax, [rdx+rsi]
imul eax, edi
imul esi, edx
add eax, esi
add eax, eax
retn | long long func0(int a1, int a2, int a3)
{
return (unsigned int)(2 * (a3 * a2 + a1 * (a3 + a2)));
} | func0:
ENDBR64
LEA EAX,[RDX + RSI*0x1]
IMUL EAX,EDI
IMUL ESI,EDX
ADD EAX,ESI
ADD EAX,EAX
RET | int func0(int param_1,int param_2,int param_3)
{
return ((param_3 + param_2) * param_1 + param_2 * param_3) * 2;
} |
5,410 | func0 | #include <assert.h>
| int func0(int l, int w, int h) {
int SA = 2 * (l * w + l * h + w * h);
return SA;
}
| int main() {
assert(func0(1, 2, 3) == 22);
assert(func0(5, 7, 9) == 286);
assert(func0(10, 15, 21) == 1350);
return 0;
}
| O2 | c | func0:
endbr64
mov %edi,%r8d
lea (%rdx,%rsi,1),%edi
imul %r8d,%edi
imul %edx,%esi
lea (%rdi,%rsi,1),%eax
add %eax,%eax
retq
nopw 0x0(%rax,%rax,1)
| func0:
endbr64
lea eax, [rdx+rsi]
imul eax, edi
imul esi, edx
add eax, esi
add eax, eax
retn | long long func0(int a1, int a2, int a3)
{
return (unsigned int)(2 * (a3 * a2 + a1 * (a3 + a2)));
} | func0:
ENDBR64
LEA EAX,[RDX + RSI*0x1]
IMUL EAX,EDI
IMUL ESI,EDX
ADD EAX,ESI
ADD EAX,EAX
RET | int func0(int param_1,int param_2,int param_3)
{
return ((param_3 + param_2) * param_1 + param_2 * param_3) * 2;
} |
5,411 | func0 | #include <assert.h>
| int func0(int l, int w, int h) {
int SA = 2 * (l * w + l * h + w * h);
return SA;
}
| int main() {
assert(func0(1, 2, 3) == 22);
assert(func0(5, 7, 9) == 286);
assert(func0(10, 15, 21) == 1350);
return 0;
}
| O3 | c | func0:
endbr64
mov %edi,%r8d
lea (%rdx,%rsi,1),%edi
imul %r8d,%edi
imul %edx,%esi
lea (%rdi,%rsi,1),%eax
add %eax,%eax
retq
nopw 0x0(%rax,%rax,1)
| func0:
endbr64
lea eax, [rdx+rsi]
imul eax, edi
imul esi, edx
add eax, esi
add eax, eax
retn | long long func0(int a1, int a2, int a3)
{
return (unsigned int)(2 * (a3 * a2 + a1 * (a3 + a2)));
} | func0:
ENDBR64
LEA EAX,[RDX + RSI*0x1]
IMUL EAX,EDI
IMUL ESI,EDX
ADD EAX,ESI
ADD EAX,EAX
RET | int func0(int param_1,int param_2,int param_3)
{
return ((param_3 + param_2) * param_1 + param_2 * param_3) * 2;
} |
5,412 | func0 |
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
| int** func0(int rownum, int colnum) {
int **matrix = malloc(rownum * sizeof(int*));
for (int i = 0; i < rownum; i++) {
matrix[i] = malloc(colnum * sizeof(int));
for (int j = 0; j < colnum; j++) {
matrix[i][j] = i * j;
}
}
return matrix;
}
| int main() {
int **result;
int i, j;
result = func0(3, 4);
int expected_3_4[3][4] = {{0, 0, 0, 0}, {0, 1, 2, 3}, {0, 2, 4, 6}};
for (i = 0; i < 3; i++) {
for (j = 0; j < 4; j++) {
assert(result[i][j] == expected_3_4[i][j]);
}
}
result = func0(5, 7);
... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x28,%rsp
mov %edi,-0x24(%rbp)
mov %esi,-0x28(%rbp)
mov -0x24(%rbp),%eax
cltq
shl $0x3,%rax
mov %rax,%rdi
callq 10b0 <malloc@plt>
mov %rax,-0x18(%rbp)
movl $0x0,-0x20(%rbp)
jmp 124a <func0+0xa1>
mov -0x28(%rbp),%eax
cltq
shl $... | func0:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 28h
mov [rbp+var_24], edi
mov [rbp+var_28], esi
mov eax, [rbp+var_24]
cdqe
shl rax, 3
mov rdi, rax; size
call _malloc
mov [rbp+var_18], rax
mov [rbp+var_20], 0
jmp short loc_124A
loc_11DA:
mov eax, [rbp+var_28]
c... | _QWORD * func0(int a1, int a2)
{
int i; // [rsp+10h] [rbp-20h]
int j; // [rsp+14h] [rbp-1Ch]
_QWORD *v5; // [rsp+18h] [rbp-18h]
v5 = malloc(8LL * a1);
for ( i = 0; i < a1; ++i )
{
v5[i] = malloc(4LL * a2);
for ( j = 0; j < a2; ++j )
*(_DWORD *)(v5[i] + 4LL * j) = j * i;
}
return v5;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x28
MOV dword ptr [RBP + -0x24],EDI
MOV dword ptr [RBP + -0x28],ESI
MOV EAX,dword ptr [RBP + -0x24]
CDQE
SHL RAX,0x3
MOV RDI,RAX
CALL 0x001010b0
MOV qword ptr [RBP + -0x18],RAX
MOV dword ptr [RBP + -0x20],0x0
JMP 0x0010124a
LAB_001011da:
MOV EAX,dword ptr [RBP + -0x... | void * func0(int param_1,int param_2)
{
void *pvVar1;
void *pvVar2;
int4 local_28;
int4 local_24;
pvVar1 = malloc((long)param_1 << 3);
for (local_28 = 0; local_28 < param_1; local_28 = local_28 + 1) {
pvVar2 = malloc((long)param_2 << 2);
*(void **)((long)local_28 * 8 + (long)pvVar1) = pvVar2;
... |
5,413 | func0 |
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
| int** func0(int rownum, int colnum) {
int **matrix = malloc(rownum * sizeof(int*));
for (int i = 0; i < rownum; i++) {
matrix[i] = malloc(colnum * sizeof(int));
for (int j = 0; j < colnum; j++) {
matrix[i][j] = i * j;
}
}
return matrix;
}
| int main() {
int **result;
int i, j;
result = func0(3, 4);
int expected_3_4[3][4] = {{0, 0, 0, 0}, {0, 1, 2, 3}, {0, 2, 4, 6}};
for (i = 0; i < 3; i++) {
for (j = 0; j < 4; j++) {
assert(result[i][j] == expected_3_4[i][j]);
}
}
result = func0(5, 7);
... | O1 | c | func0:
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %edi,%r13d
mov %esi,%r14d
movslq %edi,%rdi
shl $0x3,%rdi
callq 10b0 <malloc@plt>
mov %rax,0x8(%rsp)
test %r13d,%r13d
jle 1236 <func0+0x8d>
movslq %r14d,%r15
shl $0x2,%r15
mov %rax,%rbp
le... | func0:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov ebp, edi
mov r12d, esi
movsxd rdi, edi
shl rdi, 3
call _malloc
mov r13, rax
test ebp, ebp
jle short loc_1220
movsxd r15, r12d
shl r15, 2
mov ebp, ebp
lea r14d, [r12-1]
mov ... | long long func0(int a1, int a2)
{
long long v2; // r13
long long i; // rbx
long long v4; // rax
_DWORD *v5; // rdx
_DWORD *v6; // rcx
int v7; // eax
v2 = malloc(8LL * a1);
if ( a1 > 0 )
{
for ( i = 0LL; i != a1; ++i )
{
v4 = malloc(4LL * a2);
*(_QWORD *)(v2 + 8 * i) = v4;
i... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV EBP,EDI
MOV R12D,ESI
MOVSXD RDI,EDI
SHL RDI,0x3
CALL 0x001010b0
MOV R13,RAX
TEST EBP,EBP
JLE 0x00101220
MOVSXD R15,R12D
SHL R15,0x2
MOV EBP,EBP
LEA R14D,[R12 + -0x1]
MOV EBX,0x0
ADD R14,0x1
LAB_001011ea:
MOV RDI,R15
CALL 0x001010b0
MOV... | void * func0(uint param_1,int param_2)
{
int *piVar1;
int iVar2;
void *pvVar3;
int *piVar4;
ulong uVar5;
pvVar3 = malloc((long)(int)param_1 << 3);
if (0 < (int)param_1) {
uVar5 = 0;
do {
piVar4 = (int *)malloc((long)param_2 << 2);
*(int **)((long)pvVar3 + uVar5 * 8) = piVar4;
... |
5,414 | func0 |
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
| int** func0(int rownum, int colnum) {
int **matrix = malloc(rownum * sizeof(int*));
for (int i = 0; i < rownum; i++) {
matrix[i] = malloc(colnum * sizeof(int));
for (int j = 0; j < colnum; j++) {
matrix[i][j] = i * j;
}
}
return matrix;
}
| int main() {
int **result;
int i, j;
result = func0(3, 4);
int expected_3_4[3][4] = {{0, 0, 0, 0}, {0, 1, 2, 3}, {0, 2, 4, 6}};
for (i = 0; i < 3; i++) {
for (j = 0; j < 4; j++) {
assert(result[i][j] == expected_3_4[i][j]);
}
}
result = func0(5, 7);
... | O2 | c | func0:
endbr64
push %r15
movslq %edi,%rdi
push %r14
push %r13
push %r12
push %rbp
mov %rdi,%rbp
shl $0x3,%rdi
push %rbx
mov %esi,%ebx
sub $0x8,%rsp
callq 10b0 <malloc@plt>
mov %rax,%r12
test %ebp,%ebp
jle 1550 <func0+0x80>
movslq %ebx,%r13
lea -0x1(%rbp),%r14d
lea -0x1(%rbx),%ebp
... | func0:
endbr64
push r15
push r14
movsxd r14, edi
push r13
lea rdi, ds:0[r14*8]
push r12
push rbp
push rbx
mov ebx, esi
sub rsp, 8
call _malloc
mov r12, rax
test r14d, r14d
jle short loc_1536
movsxd r13, ebx
lea ebp, [rbx-1]
xor r15d, r15d
shl r13, 2
add rbp,... | long long func0(int a1, int a2)
{
long long v2; // r12
long long i; // r15
_DWORD *v4; // rax
_DWORD *v5; // rcx
int v6; // edx
v2 = malloc(8LL * a1);
if ( a1 > 0 )
{
for ( i = 0LL; i != a1; ++i )
{
v4 = (_DWORD *)malloc(4LL * a2);
*(_QWORD *)(v2 + 8 * i) = v4;
if ( a2 > 0 )
... | func0:
ENDBR64
PUSH R15
PUSH R14
MOVSXD R14,EDI
PUSH R13
LEA RDI,[R14*0x8]
PUSH R12
PUSH RBP
PUSH RBX
MOV EBX,ESI
SUB RSP,0x8
CALL 0x001010b0
MOV R12,RAX
TEST R14D,R14D
JLE 0x00101536
MOVSXD R13,EBX
LEA EBP,[RBX + -0x1]
XOR R15D,R15D
SHL R13,0x2
ADD RBP,0x1
NOP dword ptr [RAX]
LAB_00101500:
MOV RDI,R13
CALL 0x001010b0
... | void * func0(int param_1,int param_2)
{
int *piVar1;
void *pvVar2;
int *piVar3;
int iVar4;
long lVar5;
pvVar2 = malloc((long)param_1 * 8);
if (0 < param_1) {
lVar5 = 0;
do {
piVar3 = (int *)malloc((long)param_2 << 2);
*(int **)((long)pvVar2 + lVar5 * 8) = piVar3;
if (0 < para... |
5,415 | func0 |
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
| int** func0(int rownum, int colnum) {
int **matrix = malloc(rownum * sizeof(int*));
for (int i = 0; i < rownum; i++) {
matrix[i] = malloc(colnum * sizeof(int));
for (int j = 0; j < colnum; j++) {
matrix[i][j] = i * j;
}
}
return matrix;
}
| int main() {
int **result;
int i, j;
result = func0(3, 4);
int expected_3_4[3][4] = {{0, 0, 0, 0}, {0, 1, 2, 3}, {0, 2, 4, 6}};
for (i = 0; i < 3; i++) {
for (j = 0; j < 4; j++) {
assert(result[i][j] == expected_3_4[i][j]);
}
}
result = func0(5, 7);
... | O3 | c | func0:
endbr64
push %r15
movslq %edi,%rdi
push %r14
mov %esi,%r14d
push %r13
push %r12
push %rbp
push %rbx
mov %rdi,%rbx
shl $0x3,%rdi
sub $0x28,%rsp
callq 10b0 <malloc@plt>
mov %rax,%r12
test %ebx,%ebx
jle 1800 <func0+0x140>
mov %r14d,%ebp
lea -0x1(%rbx),%eax
movslq %r14d,%r13
mo... | func0:
endbr64
push r15
mov r15d, esi
push r14
movsxd r14, edi
push r13
lea rdi, ds:0[r14*8]; size
push r12
push rbp
push rbx
sub rsp, 28h
call _malloc
mov rbp, rax
test r14d, r14d
jle loc_16CE
movsxd r13, r15d
mov r12d, r15d
mov ebx, r15d
lea rax, ds:0[r13*4]
s... | _QWORD * func0(int a1, int a2)
{
long long v2; // r14
_QWORD *v3; // rbp
long long i; // r13
__m128i *v5; // rax
__m128i si128; // xmm5
__m128i *v7; // rdx
__m128i v8; // xmm2
__m128i v9; // xmm3
__m128i *v10; // rcx
__m128i v11; // xmm4
__m128i v12; // xmm0
signed int v13; // eax
long long v1... | func0:
ENDBR64
PUSH R15
MOV R15D,ESI
PUSH R14
MOVSXD R14,EDI
PUSH R13
LEA RDI,[R14*0x8]
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x28
CALL 0x001010b0
MOV RBP,RAX
TEST R14D,R14D
JLE 0x001016ce
MOVSXD R13,R15D
MOV R12D,R15D
MOV EBX,R15D
LEA RAX,[R13*0x4]
SHR R12D,0x2
AND EBX,0xfffffffc
XOR R13D,R13D
MOV qword ptr [RSP + 0x8],R... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void * func0(int param_1,uint param_2)
{
long lVar1;
int auVar2 [16];
int iVar3;
int iVar4;
int iVar5;
uint uVar6;
void *pvVar7;
int8 *puVar8;
int8 *puVar9;
int8 *puVar10;
int iVar11;
int iVar12;
ulong uVar1... |
5,416 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
typedef struct {
const char* name;
int score1;
int score2;
} Tuple;
int compare_by_index(const void *a, const void *b, void *index_ptr) {
int index = *(int*)index_ptr;
Tuple *tupleA = (Tuple*)a;
Tupl... | void func0(Tuple *list_data, int size, int index_no) {
qsort_r(list_data, size, sizeof(Tuple), compare_by_index, &index_no);
}
| int main() {
Tuple data[] = {
{"Greyson Fulton", 98, 99},
{"Brady Kent", 97, 96},
{"Wyatt Knott", 91, 94},
{"Beau Turnbull", 94, 98}
};
int num_tuples = sizeof(data) / sizeof(data[0]);
func0(data, num_tuples, 0);
assert(strcmp(data[0].name, "Beau Turnbull")... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x10,%rsp
mov %rdi,-0x8(%rbp)
mov %esi,-0xc(%rbp)
mov %edx,-0x10(%rbp)
lea -0x10(%rbp),%rdx
mov -0xc(%rbp),%esi
mov -0x8(%rbp),%rax
mov %rdx,%r8
lea -0xb8(%rip),%rcx
mov $0x10,%edx
mov %rax,%rdi
mov $0x0,%eax
callq 10b0 <qsort_r@plt>
... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+nmemb+4], rdi
mov dword ptr [rbp+nmemb], esi
mov [rbp+arg], edx
lea rdx, [rbp+arg]
mov esi, dword ptr [rbp+nmemb]; nmemb
mov rax, [rbp+nmemb+4]
mov r8, rdx; arg
lea rdx, compare_by_index
mov rcx, rdx; compar
mov ... | void func0(void *a1, unsigned int a2, int a3)
{
_DWORD arg[2]; // [rsp+0h] [rbp-10h] BYREF
void *nmemb_4; // [rsp+8h] [rbp-8h]
nmemb_4 = a1;
arg[1] = a2;
arg[0] = a3;
qsort_r(a1, a2, 0x10uLL, compare_by_index, arg);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],EDX
LEA RDX,[RBP + -0x10]
MOV ESI,dword ptr [RBP + -0xc]
MOV RAX,qword ptr [RBP + -0x8]
MOV R8,RDX
LEA RDX,[0x1011a9]
MOV RCX,RDX
MOV EDX,0x10
MOV RDI,RAX
MOV EAX,0x0
CALL 0x001010b... | void func0(void *param_1,uint param_2,int4 param_3)
{
int4 local_18;
uint local_14;
void *local_10;
local_18 = param_3;
local_14 = param_2;
local_10 = param_1;
qsort_r(param_1,(ulong)param_2,0x10,compare_by_index,&local_18);
return;
} |
5,417 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
typedef struct {
const char* name;
int score1;
int score2;
} Tuple;
int compare_by_index(const void *a, const void *b, void *index_ptr) {
int index = *(int*)index_ptr;
Tuple *tupleA = (Tuple*)a;
Tupl... | void func0(Tuple *list_data, int size, int index_no) {
qsort_r(list_data, size, sizeof(Tuple), compare_by_index, &index_no);
}
| int main() {
Tuple data[] = {
{"Greyson Fulton", 98, 99},
{"Brady Kent", 97, 96},
{"Wyatt Knott", 91, 94},
{"Beau Turnbull", 94, 98}
};
int num_tuples = sizeof(data) / sizeof(data[0]);
func0(data, num_tuples, 0);
assert(strcmp(data[0].name, "Beau Turnbull")... | O1 | c | func0:
endbr64
sub $0x18,%rsp
mov %edx,0xc(%rsp)
lea 0xc(%rsp),%r8
lea -0x54(%rip),%rcx
mov $0x10,%edx
mov $0x0,%eax
callq 10b0 <qsort_r@plt>
add $0x18,%rsp
retq
| func0:
endbr64
sub rsp, 18h
mov [rsp+18h+var_C], edx
lea r8, [rsp+18h+var_C]
lea rcx, compare_by_index
mov edx, 10h
mov eax, 0
call _qsort_r
add rsp, 18h
retn | long long func0(long long a1, long long a2, int a3)
{
_DWORD v4[3]; // [rsp+Ch] [rbp-Ch] BYREF
v4[0] = a3;
return qsort_r(a1, a2, 16LL, compare_by_index, v4);
} | func0:
ENDBR64
SUB RSP,0x18
MOV dword ptr [RSP + 0xc],EDX
LEA R8,[RSP + 0xc]
LEA RCX,[0x1011a9]
MOV EDX,0x10
MOV EAX,0x0
CALL 0x001010b0
ADD RSP,0x18
RET | void func0(void *param_1,size_t param_2,int4 param_3)
{
int4 local_c [3];
local_c[0] = param_3;
qsort_r(param_1,param_2,0x10,compare_by_index,local_c);
return;
} |
5,418 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
typedef struct {
const char* name;
int score1;
int score2;
} Tuple;
int compare_by_index(const void *a, const void *b, void *index_ptr) {
int index = *(int*)index_ptr;
Tuple *tupleA = (Tuple*)a;
Tupl... | void func0(Tuple *list_data, int size, int index_no) {
qsort_r(list_data, size, sizeof(Tuple), compare_by_index, &index_no);
}
| int main() {
Tuple data[] = {
{"Greyson Fulton", 98, 99},
{"Brady Kent", 97, 96},
{"Wyatt Knott", 91, 94},
{"Beau Turnbull", 94, 98}
};
int num_tuples = sizeof(data) / sizeof(data[0]);
func0(data, num_tuples, 0);
assert(strcmp(data[0].name, "Beau Turnbull")... | O2 | c | func0:
endbr64
sub $0x18,%rsp
lea -0x5f(%rip),%rcx
xor %eax,%eax
mov %edx,0xc(%rsp)
lea 0xc(%rsp),%r8
mov $0x10,%edx
callq 10b0 <qsort_r@plt>
add $0x18,%rsp
retq
nopl 0x0(%rax)
| func0:
endbr64
sub rsp, 18h
lea rcx, compare_by_index
xor eax, eax
mov [rsp+18h+var_C], edx
lea r8, [rsp+18h+var_C]
mov edx, 10h
call _qsort_r
add rsp, 18h
retn | long long func0(long long a1, long long a2, int a3)
{
_DWORD v4[3]; // [rsp+Ch] [rbp-Ch] BYREF
v4[0] = a3;
return qsort_r(a1, a2, 16LL, compare_by_index, v4);
} | func0:
ENDBR64
SUB RSP,0x18
LEA RCX,[0x1013e0]
XOR EAX,EAX
MOV dword ptr [RSP + 0xc],EDX
LEA R8,[RSP + 0xc]
MOV EDX,0x10
CALL 0x001010b0
ADD RSP,0x18
RET | void func0(void *param_1,size_t param_2,int4 param_3)
{
int4 local_c [3];
local_c[0] = param_3;
qsort_r(param_1,param_2,0x10,compare_by_index,local_c);
return;
} |
5,419 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
typedef struct {
const char* name;
int score1;
int score2;
} Tuple;
int compare_by_index(const void *a, const void *b, void *index_ptr) {
int index = *(int*)index_ptr;
Tuple *tupleA = (Tuple*)a;
Tupl... | void func0(Tuple *list_data, int size, int index_no) {
qsort_r(list_data, size, sizeof(Tuple), compare_by_index, &index_no);
}
| int main() {
Tuple data[] = {
{"Greyson Fulton", 98, 99},
{"Brady Kent", 97, 96},
{"Wyatt Knott", 91, 94},
{"Beau Turnbull", 94, 98}
};
int num_tuples = sizeof(data) / sizeof(data[0]);
func0(data, num_tuples, 0);
assert(strcmp(data[0].name, "Beau Turnbull")... | O3 | c | func0:
endbr64
sub $0x18,%rsp
lea -0x5f(%rip),%rcx
xor %eax,%eax
mov %edx,0xc(%rsp)
lea 0xc(%rsp),%r8
mov $0x10,%edx
callq 10b0 <qsort_r@plt>
add $0x18,%rsp
retq
nopl 0x0(%rax)
| func0:
endbr64
sub rsp, 18h
lea rcx, compare_by_index; compar
xor eax, eax
mov [rsp+18h+arg], edx
lea r8, [rsp+18h+arg]; arg
mov edx, 10h; size
call _qsort_r
add rsp, 18h
retn | void func0(void *a1, size_t a2, int a3)
{
_DWORD arg[3]; // [rsp+Ch] [rbp-Ch] BYREF
arg[0] = a3;
qsort_r(a1, a2, 0x10uLL, compare_by_index, arg);
} | func0:
ENDBR64
SUB RSP,0x18
LEA RCX,[0x1013d0]
XOR EAX,EAX
MOV dword ptr [RSP + 0xc],EDX
LEA R8,[RSP + 0xc]
MOV EDX,0x10
CALL 0x001010b0
ADD RSP,0x18
RET | void func0(void *param_1,size_t param_2,int4 param_3)
{
int4 local_c [3];
local_c[0] = param_3;
qsort_r(param_1,param_2,0x10,compare_by_index,local_c);
return;
} |
5,420 | func0 |
#include <assert.h>
| int func0(int A[], int n) {
int left = 0;
int right = n - 1;
while (left <= right) {
if (A[left] <= A[right]) {
return left;
}
int mid = (left + right) / 2;
int next = (mid + 1) % n;
int prev = (mid - 1 + n) % n;
if (A[mid] <= A... | int main() {
int arr1[] = {8, 9, 10, 1, 2, 3, 4, 5, 6, 7};
int n1 = sizeof(arr1) / sizeof(arr1[0]);
assert(func0(arr1, n1) == 3);
int arr2[] = {8, 9, 10, 2, 5, 6};
int n2 = sizeof(arr2) / sizeof(arr2[0]);
assert(func0(arr2, n2) == 3);
int arr3[] = {2, 5, 6, 8, 9, 10};
int n3 ... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x28(%rbp)
mov %esi,-0x2c(%rbp)
movl $0x0,-0x14(%rbp)
mov -0x2c(%rbp),%eax
sub $0x1,%eax
mov %eax,-0x10(%rbp)
jmpq 12d4 <func0+0x16b>
mov -0x14(%rbp),%eax
cltq
lea 0x0(,%rax,4),%rdx
mov -0x28(%rbp),%rax
add %rdx,%rax
mov (%rax),%edx... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_28], rdi
mov [rbp+var_2C], esi
mov [rbp+var_14], 0
mov eax, [rbp+var_2C]
sub eax, 1
mov [rbp+var_10], eax
jmp loc_12D4
loc_118D:
mov eax, [rbp+var_14]
cdqe
lea rdx, ds:0[rax*4]
mov rax, [rbp+var_28]
add rax, rdx
mov ... | long long func0(long long a1, int a2)
{
int v3; // [rsp+18h] [rbp-14h]
int v4; // [rsp+1Ch] [rbp-10h]
int v5; // [rsp+20h] [rbp-Ch]
v3 = 0;
v4 = a2 - 1;
while ( v3 <= v4 )
{
if ( *(_DWORD *)(4LL * v3 + a1) <= *(_DWORD *)(4LL * v4 + a1) )
return (unsigned int)v3;
v5 = (v3 + v4) / 2;
if ... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x28],RDI
MOV dword ptr [RBP + -0x2c],ESI
MOV dword ptr [RBP + -0x14],0x0
MOV EAX,dword ptr [RBP + -0x2c]
SUB EAX,0x1
MOV dword ptr [RBP + -0x10],EAX
JMP 0x001012d4
LAB_0010118d:
MOV EAX,dword ptr [RBP + -0x14]
CDQE
LEA RDX,[RAX*0x4]
MOV RAX,qword ptr [RBP + -0x... | int func0(long param_1,int param_2)
{
int iVar1;
int local_1c;
int local_18;
local_1c = 0;
local_18 = param_2 + -1;
while( true ) {
if (local_18 < local_1c) {
return -1;
}
if (*(int *)(param_1 + (long)local_1c * 4) <= *(int *)(param_1 + (long)local_18 * 4)) break;
iVar1 = (local_18... |
5,421 | func0 |
#include <assert.h>
| int func0(int A[], int n) {
int left = 0;
int right = n - 1;
while (left <= right) {
if (A[left] <= A[right]) {
return left;
}
int mid = (left + right) / 2;
int next = (mid + 1) % n;
int prev = (mid - 1 + n) % n;
if (A[mid] <= A... | int main() {
int arr1[] = {8, 9, 10, 1, 2, 3, 4, 5, 6, 7};
int n1 = sizeof(arr1) / sizeof(arr1[0]);
assert(func0(arr1, n1) == 3);
int arr2[] = {8, 9, 10, 2, 5, 6};
int n2 = sizeof(arr2) / sizeof(arr2[0]);
assert(func0(arr2, n2) == 3);
int arr3[] = {2, 5, 6, 8, 9, 10};
int n3 ... | O1 | c | func0:
endbr64
push %r13
push %r12
push %rbp
push %rbx
lea -0x1(%rsi),%ecx
mov $0x0,%r10d
movslq %r10d,%rax
lea (%rdi,%rax,4),%rbx
jmp 118c <func0+0x23>
cmp %r13d,%r8d
jl 11e1 <func0+0x78>
mov %ebp,%ecx
cmp %ecx,%r10d
jg 11ea <func0+0x81>
mov (%rbx),%r11d
movslq %ecx,%rax
mov ... | func0:
endbr64
push r13
push r12
push rbp
push rbx
mov r8d, esi
lea esi, [rsi-1]
mov r11d, 0
loc_117F:
movsxd rax, r11d
lea rbp, [rdi+rax*4]
jmp short loc_1190
loc_1188:
cmp r10d, r9d
jl short loc_11E7
mov esi, r13d
loc_1190:
cmp r11d, esi
jg short loc_11F0
mov ... | long long func0(long long a1, int a2)
{
int v3; // esi
int v4; // r11d
int v5; // ebx
int v6; // r10d
int v7; // ecx
int v8; // r9d
v3 = a2 - 1;
v4 = 0;
while ( v4 <= v3 )
{
v5 = *(_DWORD *)(a1 + 4LL * v4);
v6 = *(_DWORD *)(a1 + 4LL * v3);
if ( v5 <= v6 )
return (unsigned int)v4;... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV R8D,ESI
LEA ESI,[RSI + -0x1]
MOV R11D,0x0
LAB_0010117f:
MOVSXD RAX,R11D
LEA RBP,[RDI + RAX*0x4]
JMP 0x00101190
LAB_00101188:
CMP R10D,R9D
JL 0x001011e7
MOV ESI,R13D
LAB_00101190:
CMP R11D,ESI
JG 0x001011f0
MOV EBX,dword ptr [RBP]
MOVSXD RAX,ESI
MOV R10D,dword ptr [... | int func0(long param_1,int param_2)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
int iVar6;
int iVar7;
iVar6 = param_2 + -1;
iVar7 = 0;
do {
iVar4 = iVar6;
do {
iVar6 = iVar4;
if (iVar6 < iVar7) {
return -1;
}
iVar1 = *(int *)(param_1 + (long)i... |
5,422 | func0 |
#include <assert.h>
| int func0(int A[], int n) {
int left = 0;
int right = n - 1;
while (left <= right) {
if (A[left] <= A[right]) {
return left;
}
int mid = (left + right) / 2;
int next = (mid + 1) % n;
int prev = (mid - 1 + n) % n;
if (A[mid] <= A... | int main() {
int arr1[] = {8, 9, 10, 1, 2, 3, 4, 5, 6, 7};
int n1 = sizeof(arr1) / sizeof(arr1[0]);
assert(func0(arr1, n1) == 3);
int arr2[] = {8, 9, 10, 2, 5, 6};
int n2 = sizeof(arr2) / sizeof(arr2[0]);
assert(func0(arr2, n2) == 3);
int arr3[] = {2, 5, 6, 8, 9, 10};
int n3 ... | O2 | c | func0:
endbr64
push %r14
lea -0x1(%rsi),%r8d
xor %r14d,%r14d
push %r13
push %r12
xor %r12d,%r12d
push %rbp
push %rbx
lea (%rdi,%r14,4),%r13
jmp 134a <func0+0x6a>
nopl 0x0(%rax)
movslq %r8d,%rax
mov 0x0(%r13),%ebp
mov (%rdi,%rax,4),%r10d
cmp %r10d,%ebp
jle 1355 <func0+0x75>
lea ... | func0:
endbr64
push r14
mov r8d, esi
xor r14d, r14d
sub esi, 1
push r13
push r12
xor r12d, r12d
push rbp
push rbx
loc_12F8:
lea r13, [rdi+r14*4]
jmp short loc_134C
loc_1300:
movsxd rax, esi
mov ebp, [r13+0]
mov r10d, [rdi+rax*4]
cmp ebp, r10d
jle short loc_1357
le... | long long func0(long long a1, int a2)
{
long long v3; // r14
int v4; // esi
int v5; // r12d
int v6; // ebp
int v7; // r10d
int v8; // ecx
int v9; // r9d
v3 = 0LL;
v4 = a2 - 1;
v5 = 0;
while ( 1 )
{
if ( v5 > v4 )
return (unsigned int)-1;
v6 = *(_DWORD *)(a1 + 4 * v3);
v7 = *(... | func0:
ENDBR64
PUSH R14
MOV R8D,ESI
XOR R14D,R14D
SUB ESI,0x1
PUSH R13
PUSH R12
XOR R12D,R12D
PUSH RBP
PUSH RBX
LAB_001012f8:
LEA R13,[RDI + R14*0x4]
JMP 0x0010134c
LAB_00101300:
MOVSXD RAX,ESI
MOV EBP,dword ptr [R13]
MOV R10D,dword ptr [RDI + RAX*0x4]
CMP EBP,R10D
JLE 0x00101357
LEA ECX,[R12 + RSI*0x1]
SAR ECX,0x1
MOV... | ulong func0(long param_1,int param_2)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
uint uVar5;
int iVar6;
ulong uVar7;
ulong uVar8;
iVar6 = param_2 + -1;
uVar7 = 0;
uVar8 = 0;
do {
iVar4 = iVar6;
do {
iVar6 = iVar4;
if (iVar6 < (int)uVar7) {
uVar7 = 0xffffffff;
L... |
5,423 | func0 |
#include <assert.h>
| int func0(int A[], int n) {
int left = 0;
int right = n - 1;
while (left <= right) {
if (A[left] <= A[right]) {
return left;
}
int mid = (left + right) / 2;
int next = (mid + 1) % n;
int prev = (mid - 1 + n) % n;
if (A[mid] <= A... | int main() {
int arr1[] = {8, 9, 10, 1, 2, 3, 4, 5, 6, 7};
int n1 = sizeof(arr1) / sizeof(arr1[0]);
assert(func0(arr1, n1) == 3);
int arr2[] = {8, 9, 10, 2, 5, 6};
int n2 = sizeof(arr2) / sizeof(arr2[0]);
assert(func0(arr2, n2) == 3);
int arr3[] = {2, 5, 6, 8, 9, 10};
int n3 ... | O3 | c | func0:
endbr64
push %r14
lea -0x1(%rsi),%r8d
xor %r14d,%r14d
push %r13
push %r12
xor %r12d,%r12d
push %rbp
push %rbx
lea (%rdi,%r14,4),%r13
jmp 130a <func0+0x6a>
nopl 0x0(%rax)
movslq %r8d,%rax
mov 0x0(%r13),%ebp
mov (%rdi,%rax,4),%r10d
cmp %r10d,%ebp
jle 1315 <func0+0x75>
lea ... | func0:
endbr64
push r14
mov r8d, esi
xor r14d, r14d
sub esi, 1
push r13
push r12
push rbp
xor ebp, ebp
push rbx
loc_12B7:
lea r13, [rdi+r14*4]
jmp short loc_1313
loc_12C0:
movsxd rax, esi
mov r12d, [r13+0]
mov r10d, [rdi+rax*4]
cmp r12d, r10d
jle short loc_131C
le... | long long func0(long long a1, int a2)
{
long long v3; // r14
int v4; // esi
int v5; // ebp
int v6; // r12d
int v7; // r10d
int v8; // ecx
int v9; // r9d
v3 = 0LL;
v4 = a2 - 1;
v5 = 0;
while ( 1 )
{
if ( v5 > v4 )
return (unsigned int)-1;
v6 = *(_DWORD *)(a1 + 4 * v3);
v7 = *(... | func0:
ENDBR64
PUSH R14
MOV R8D,ESI
XOR R14D,R14D
SUB ESI,0x1
PUSH R13
PUSH R12
PUSH RBP
XOR EBP,EBP
PUSH RBX
LAB_001012b7:
LEA R13,[RDI + R14*0x4]
JMP 0x00101313
LAB_001012c0:
MOVSXD RAX,ESI
MOV R12D,dword ptr [R13]
MOV R10D,dword ptr [RDI + RAX*0x4]
CMP R12D,R10D
JLE 0x0010131c
LEA EAX,[RBP + RSI*0x1]
MOV ECX,EAX
SHR... | ulong func0(long param_1,int param_2)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
uint uVar5;
ulong uVar6;
int iVar7;
ulong uVar8;
iVar7 = param_2 + -1;
uVar6 = 0;
uVar8 = 0;
do {
iVar4 = iVar7;
do {
iVar7 = iVar4;
if (iVar7 < (int)uVar6) {
uVar6 = 0xffffffff;
L... |
5,424 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int n) {
int res = 0, count = 0, temp = n;
while(temp > 0) {
if (count % 2 == 0) {
res = res | (1 << count);
}
count = count + 1;
temp >>= 1;
}
return n ^ res;
}
| int main() {
assert(func0(10) == 15);
assert(func0(20) == 1);
assert(func0(30) == 11);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
movl $0x0,-0xc(%rbp)
movl $0x0,-0x8(%rbp)
mov -0x14(%rbp),%eax
mov %eax,-0x4(%rbp)
jmp 118c <func0+0x43>
mov -0x8(%rbp),%eax
and $0x1,%eax
test %eax,%eax
jne 1185 <func0+0x3c>
mov -0x8(%rbp),%eax
mov $0x1,%edx
mov %eax,... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_C], 0
mov [rbp+var_8], 0
mov eax, [rbp+var_14]
mov [rbp+var_4], eax
jmp short loc_118C
loc_116A:
mov eax, [rbp+var_8]
and eax, 1
test eax, eax
jnz short loc_1185
mov eax, [rbp+var_8]
mov edx, 1
... | long long func0(int a1)
{
int v2; // [rsp+8h] [rbp-Ch]
char v3; // [rsp+Ch] [rbp-8h]
int i; // [rsp+10h] [rbp-4h]
v2 = 0;
v3 = 0;
for ( i = a1; i > 0; i >>= 1 )
{
if ( (v3 & 1) == 0 )
v2 |= 1 << v3;
++v3;
}
return v2 ^ (unsigned int)a1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0xc],0x0
MOV dword ptr [RBP + -0x8],0x0
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0010118c
LAB_0010116a:
MOV EAX,dword ptr [RBP + -0x8]
AND EAX,0x1
TEST EAX,EAX
JNZ 0x00101185
MOV EAX,dword ptr [RBP + -0... | uint func0(uint param_1)
{
byte bVar1;
int4 local_14;
int4 local_c;
local_14 = 0;
bVar1 = 0;
for (local_c = param_1; 0 < (int)local_c; local_c = (int)local_c >> 1) {
if (!(bool)(bVar1 & 1)) {
local_14 = local_14 | 1 << (bVar1 & 0x1f);
}
bVar1 = bVar1 + 1;
}
return param_1 ^ local_1... |
5,425 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int n) {
int res = 0, count = 0, temp = n;
while(temp > 0) {
if (count % 2 == 0) {
res = res | (1 << count);
}
count = count + 1;
temp >>= 1;
}
return n ^ res;
}
| int main() {
assert(func0(10) == 15);
assert(func0(20) == 1);
assert(func0(30) == 11);
return 0;
}
| O1 | c | func0:
endbr64
test %edi,%edi
jle 117c <func0+0x33>
mov %edi,%edx
mov $0x0,%ecx
mov $0x0,%eax
mov $0x1,%r8d
jmp 116e <func0+0x25>
add $0x1,%ecx
sar %edx
test %edx,%edx
jle 1181 <func0+0x38>
test $0x1,%cl
jne 1165 <func0+0x1c>
mov %r8d,%esi
shl %cl,%esi
or %esi,%eax
jmp 1... | func0:
endbr64
mov eax, edi
test edi, edi
jle short loc_117F
mov edx, edi
mov ecx, 0
mov esi, 0
mov edi, 1
jmp short loc_116F
loc_1166:
add ecx, 1
sar edx, 1
test edx, edx
jle short loc_1184
loc_116F:
test cl, 1
jnz short loc_1166
mov r8d, edi
shl r8d, cl
or ... | long long func0(int a1)
{
int v1; // edx
char v2; // cl
int v3; // esi
if ( a1 <= 0 )
{
v3 = 0;
}
else
{
v1 = a1;
v2 = 0;
v3 = 0;
do
{
if ( (v2 & 1) == 0 )
v3 |= 1 << v2;
++v2;
v1 >>= 1;
}
while ( v1 > 0 );
}
return v3 ^ (unsigned int)a1;
} | func0:
ENDBR64
MOV EAX,EDI
TEST EDI,EDI
JLE 0x0010117f
MOV EDX,EDI
MOV ECX,0x0
MOV ESI,0x0
MOV EDI,0x1
JMP 0x0010116f
LAB_00101166:
ADD ECX,0x1
SAR EDX,0x1
TEST EDX,EDX
JLE 0x00101184
LAB_0010116f:
TEST CL,0x1
JNZ 0x00101166
MOV R8D,EDI
SHL R8D,CL
OR ESI,R8D
JMP 0x00101166
LAB_0010117f:
MOV ESI,0x0
LAB_00101184:
XOR EA... | uint func0(uint param_1)
{
bool bVar1;
uint uVar2;
uint uVar3;
if ((int)param_1 < 1) {
uVar3 = 0;
}
else {
bVar1 = false;
uVar3 = 0;
uVar2 = param_1;
do {
if (!bVar1) {
uVar3 = uVar3 | 1 << bVar1;
}
bVar1 = (bool)(bVar1 ^ 1);
uVar2 = (int)uVar2 >> 1;
... |
5,426 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int n) {
int res = 0, count = 0, temp = n;
while(temp > 0) {
if (count % 2 == 0) {
res = res | (1 << count);
}
count = count + 1;
temp >>= 1;
}
return n ^ res;
}
| int main() {
assert(func0(10) == 15);
assert(func0(20) == 1);
assert(func0(30) == 11);
return 0;
}
| O2 | c | func0:
endbr64
test %edi,%edi
jle 1170 <func0+0x30>
mov %edi,%edx
xor %ecx,%ecx
xor %eax,%eax
mov $0x1,%r8d
nopl 0x0(%rax)
test $0x1,%cl
jne 1164 <func0+0x24>
mov %r8d,%esi
shl %cl,%esi
or %esi,%eax
add $0x1,%ecx
sar %edx
jne 1158 <func0+0x18>
xor %edi,%eax
retq
xchg %ax,... | func0:
endbr64
test edi, edi
jle short loc_1220
mov edx, edi
xor ecx, ecx
xor eax, eax
mov r8d, 1
nop dword ptr [rax+00h]
loc_1208:
test cl, 1
jnz short loc_1214
mov esi, r8d
shl esi, cl
or eax, esi
loc_1214:
add ecx, 1
sar edx, 1
jnz short loc_1208
xor eax... | long long func0(int a1)
{
int v1; // edx
char v2; // cl
unsigned int v3; // eax
if ( a1 <= 0 )
return (unsigned int)a1;
v1 = a1;
v2 = 0;
v3 = 0;
do
{
if ( (v2 & 1) == 0 )
v3 |= 1 << v2;
++v2;
v1 >>= 1;
}
while ( v1 );
return a1 ^ v3;
} | func0:
ENDBR64
TEST EDI,EDI
JLE 0x00101220
MOV EDX,EDI
XOR ECX,ECX
XOR EAX,EAX
MOV R8D,0x1
NOP dword ptr [RAX]
LAB_00101208:
TEST CL,0x1
JNZ 0x00101214
MOV ESI,R8D
SHL ESI,CL
OR EAX,ESI
LAB_00101214:
ADD ECX,0x1
SAR EDX,0x1
JNZ 0x00101208
XOR EAX,EDI
RET
LAB_00101220:
MOV EAX,EDI
RET | uint func0(uint param_1)
{
byte bVar1;
uint uVar2;
uint uVar3;
if (0 < (int)param_1) {
bVar1 = 0;
uVar2 = 0;
uVar3 = param_1;
do {
if (!(bool)(bVar1 & 1)) {
uVar2 = uVar2 | 1 << (bVar1 & 0x1f);
}
bVar1 = bVar1 + 1;
uVar3 = (int)uVar3 >> 1;
} while (uVar3 !... |
5,427 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int n) {
int res = 0, count = 0, temp = n;
while(temp > 0) {
if (count % 2 == 0) {
res = res | (1 << count);
}
count = count + 1;
temp >>= 1;
}
return n ^ res;
}
| int main() {
assert(func0(10) == 15);
assert(func0(20) == 1);
assert(func0(30) == 11);
return 0;
}
| O3 | c | func0:
endbr64
test %edi,%edi
jle 1170 <func0+0x30>
mov %edi,%edx
xor %ecx,%ecx
xor %eax,%eax
mov $0x1,%r8d
nopl 0x0(%rax)
test $0x1,%cl
jne 1164 <func0+0x24>
mov %r8d,%esi
shl %cl,%esi
or %esi,%eax
add $0x1,%ecx
sar %edx
jne 1158 <func0+0x18>
xor %edi,%eax
retq
xchg %ax,... | func0:
endbr64
test edi, edi
jle short loc_1178
mov edx, edi
xor ecx, ecx
xor esi, esi
mov eax, 1
nop dword ptr [rax+rax+00h]
loc_1158:
test cl, 1
jnz short loc_1166
mov r8d, eax
shl r8d, cl
or esi, r8d
loc_1166:
add ecx, 1
sar edx, 1
jnz short loc_1158
mov ... | long long func0(int a1)
{
int v1; // edx
char v2; // cl
int v3; // esi
if ( a1 <= 0 )
return (unsigned int)a1;
v1 = a1;
v2 = 0;
v3 = 0;
do
{
if ( (v2 & 1) == 0 )
v3 |= 1 << v2;
++v2;
v1 >>= 1;
}
while ( v1 );
return v3 ^ (unsigned int)a1;
} | func0:
ENDBR64
TEST EDI,EDI
JLE 0x00101178
MOV EDX,EDI
XOR ECX,ECX
XOR ESI,ESI
MOV EAX,0x1
NOP dword ptr [RAX + RAX*0x1]
LAB_00101158:
TEST CL,0x1
JNZ 0x00101166
MOV R8D,EAX
SHL R8D,CL
OR ESI,R8D
LAB_00101166:
ADD ECX,0x1
SAR EDX,0x1
JNZ 0x00101158
MOV EAX,EDI
XOR EAX,ESI
RET
LAB_00101178:
MOV EAX,EDI
RET | uint func0(uint param_1)
{
byte bVar1;
uint uVar2;
uint uVar3;
if (0 < (int)param_1) {
bVar1 = 0;
uVar3 = 0;
uVar2 = param_1;
do {
if (!(bool)(bVar1 & 1)) {
uVar3 = uVar3 | 1 << (bVar1 & 0x1f);
}
bVar1 = bVar1 + 1;
uVar2 = (int)uVar2 >> 1;
} while (uVar2 !... |
5,428 | func0 |
#include <assert.h>
| int func0(int n, int arr[]) {
int mn = arr[0];
int freq = 1;
for (int i = 1; i < n; i++) {
if (arr[i] < mn) {
mn = arr[i];
freq = 1;
} else if (arr[i] == mn) {
freq++;
}
}
return freq;
}
| int main() {
int arr1[] = {1, 2, 3, 4, 3};
int arr2[] = {3, 1, 2, 5, 6, 2, 3};
int arr3[] = {3, 3, 6, 3, 7, 4, 9};
assert(func0(5, arr1) == 1);
assert(func0(7, arr2) == 1);
assert(func0(7, arr3) == 3);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
mov %rsi,-0x20(%rbp)
mov -0x20(%rbp),%rax
mov (%rax),%eax
mov %eax,-0xc(%rbp)
movl $0x1,-0x8(%rbp)
movl $0x1,-0x4(%rbp)
jmp 11f1 <func0+0x88>
mov -0x4(%rbp),%eax
cltq
lea 0x0(,%rax,4),%rdx
mov -0x20(%rbp),%rax
add %rdx,%r... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_20], rsi
mov rax, [rbp+var_20]
mov eax, [rax]
mov [rbp+var_C], eax
mov [rbp+var_8], 1
mov [rbp+var_4], 1
jmp short loc_11F1
loc_1191:
mov eax, [rbp+var_4]
cdqe
lea rdx, ds:0[rax*4]
mov rax, [rbp+va... | long long func0(int a1, int *a2)
{
int v3; // [rsp+14h] [rbp-Ch]
unsigned int v4; // [rsp+18h] [rbp-8h]
int i; // [rsp+1Ch] [rbp-4h]
v3 = *a2;
v4 = 1;
for ( i = 1; i < a1; ++i )
{
if ( v3 <= a2[i] )
{
if ( v3 == a2[i] )
++v4;
}
else
{
v3 = a2[i];
v4 = 1;
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV qword ptr [RBP + -0x20],RSI
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0xc],EAX
MOV dword ptr [RBP + -0x8],0x1
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001011f1
LAB_00101191:
MOV EAX,dword ptr [RBP + -0x4]
CDQE
LEA RD... | int func0(int param_1,int *param_2)
{
int local_14;
int local_10;
int local_c;
local_14 = *param_2;
local_10 = 1;
for (local_c = 1; local_c < param_1; local_c = local_c + 1) {
if (param_2[local_c] < local_14) {
local_14 = param_2[local_c];
local_10 = 1;
}
else if (local_14 == par... |
5,429 | func0 |
#include <assert.h>
| int func0(int n, int arr[]) {
int mn = arr[0];
int freq = 1;
for (int i = 1; i < n; i++) {
if (arr[i] < mn) {
mn = arr[i];
freq = 1;
} else if (arr[i] == mn) {
freq++;
}
}
return freq;
}
| int main() {
int arr1[] = {1, 2, 3, 4, 3};
int arr2[] = {3, 1, 2, 5, 6, 2, 3};
int arr3[] = {3, 3, 6, 3, 7, 4, 9};
assert(func0(5, arr1) == 1);
assert(func0(7, arr2) == 1);
assert(func0(7, arr3) == 3);
return 0;
}
| O1 | c | func0:
endbr64
mov (%rsi),%ecx
cmp $0x1,%edi
jle 11a7 <func0+0x3e>
lea 0x4(%rsi),%rax
lea -0x2(%rdi),%edx
lea 0x8(%rsi,%rdx,4),%rdi
mov $0x1,%esi
jmp 1197 <func0+0x2e>
mov %edx,%ecx
mov $0x1,%esi
add $0x4,%rax
cmp %rdi,%rax
je 11ac <func0+0x43>
mov (%rax),%edx
cmp %ecx,%edx... | func0:
endbr64
mov ecx, [rsi]
cmp edi, 1
jle short loc_11A7
lea rax, [rsi+4]
lea edx, [rdi-2]
lea rdi, [rsi+rdx*4+8]
mov esi, 1
jmp short loc_1197
loc_1187:
mov ecx, edx
mov esi, 1
loc_118E:
add rax, 4
cmp rax, rdi
jz short loc_11AC
loc_1197:
mov edx, [rax]
cmp ... | long long func0(int a1, int *a2)
{
int v2; // ecx
int *v3; // rax
long long v4; // rdi
unsigned int v5; // esi
v2 = *a2;
if ( a1 <= 1 )
{
return 1;
}
else
{
v3 = a2 + 1;
v4 = (long long)&a2[a1 - 2 + 2];
v5 = 1;
do
{
if ( *v3 < v2 )
{
v2 = *v3;
v5... | func0:
ENDBR64
MOV ECX,dword ptr [RSI]
CMP EDI,0x1
JLE 0x001011a7
LEA RAX,[RSI + 0x4]
LEA EDX,[RDI + -0x2]
LEA RDI,[RSI + RDX*0x4 + 0x8]
MOV ESI,0x1
JMP 0x00101197
LAB_00101187:
MOV ECX,EDX
MOV ESI,0x1
LAB_0010118e:
ADD RAX,0x4
CMP RAX,RDI
JZ 0x001011ac
LAB_00101197:
MOV EDX,dword ptr [RAX]
CMP EDX,ECX
JL 0x00101187
SE... | int func0(int param_1,int *param_2)
{
int iVar1;
int *piVar2;
int iVar3;
int iVar4;
iVar3 = *param_2;
if (param_1 < 2) {
iVar4 = 1;
}
else {
piVar2 = param_2 + 1;
iVar4 = 1;
do {
iVar1 = *piVar2;
if (iVar1 < iVar3) {
iVar4 = 1;
iVar3 = iVar1;
}
... |
5,430 | func0 |
#include <assert.h>
| int func0(int n, int arr[]) {
int mn = arr[0];
int freq = 1;
for (int i = 1; i < n; i++) {
if (arr[i] < mn) {
mn = arr[i];
freq = 1;
} else if (arr[i] == mn) {
freq++;
}
}
return freq;
}
| int main() {
int arr1[] = {1, 2, 3, 4, 3};
int arr2[] = {3, 1, 2, 5, 6, 2, 3};
int arr3[] = {3, 3, 6, 3, 7, 4, 9};
assert(func0(5, arr1) == 1);
assert(func0(7, arr2) == 1);
assert(func0(7, arr3) == 3);
return 0;
}
| O2 | c | func0:
endbr64
mov (%rsi),%ecx
cmp $0x1,%edi
jle 13c0 <func0+0x50>
lea -0x2(%rdi),%edx
lea 0x4(%rsi),%rax
mov $0x1,%r8d
lea 0x8(%rsi,%rdx,4),%rsi
jmp 13a2 <func0+0x32>
sete %dl
add $0x4,%rax
movzbl %dl,%edx
add %edx,%r8d
cmp %rsi,%rax
je 13b9 <func0+0x49>
mov (%rax),%edx
cmp ... | func0:
endbr64
mov ecx, [rsi]
cmp edi, 1
jle short loc_1320
lea edx, [rdi-2]
lea rax, [rsi+4]
mov r8d, 1
lea rsi, [rsi+rdx*4+8]
jmp short loc_1302
loc_12F0:
setz dl
add rax, 4
movzx edx, dl
add r8d, edx
cmp rax, rsi
jz short loc_1319
loc_1302:
mov edx, [rax]
cmp... | long long func0(int a1, int *a2)
{
int v2; // ecx
int *v3; // rax
unsigned int v4; // r8d
long long v5; // rsi
int v6; // edx
bool v7; // zf
v2 = *a2;
if ( a1 <= 1 )
return 1LL;
v3 = a2 + 1;
v4 = 1;
v5 = (long long)&a2[a1 - 2 + 2];
do
{
while ( 1 )
{
v6 = *v3;
v7 = *v... | func0:
ENDBR64
MOV ECX,dword ptr [RSI]
CMP EDI,0x1
JLE 0x00101320
LEA EDX,[RDI + -0x2]
LEA RAX,[RSI + 0x4]
MOV R8D,0x1
LEA RSI,[RSI + RDX*0x4 + 0x8]
JMP 0x00101302
LAB_001012f0:
SETZ DL
ADD RAX,0x4
MOVZX EDX,DL
ADD R8D,EDX
CMP RAX,RSI
JZ 0x00101319
LAB_00101302:
MOV EDX,dword ptr [RAX]
CMP EDX,ECX
JGE 0x001012f0
ADD RA... | int func0(int param_1,int *param_2)
{
int iVar1;
int *piVar2;
int iVar3;
int iVar4;
if (param_1 < 2) {
return 1;
}
piVar2 = param_2 + 1;
iVar4 = 1;
iVar3 = *param_2;
do {
while( true ) {
iVar1 = *piVar2;
if (iVar1 < iVar3) break;
piVar2 = piVar2 + 1;
iVar4 = iVar4... |
5,431 | func0 |
#include <assert.h>
| int func0(int n, int arr[]) {
int mn = arr[0];
int freq = 1;
for (int i = 1; i < n; i++) {
if (arr[i] < mn) {
mn = arr[i];
freq = 1;
} else if (arr[i] == mn) {
freq++;
}
}
return freq;
}
| int main() {
int arr1[] = {1, 2, 3, 4, 3};
int arr2[] = {3, 1, 2, 5, 6, 2, 3};
int arr3[] = {3, 3, 6, 3, 7, 4, 9};
assert(func0(5, arr1) == 1);
assert(func0(7, arr2) == 1);
assert(func0(7, arr3) == 3);
return 0;
}
| O3 | c | func0:
endbr64
mov (%rsi),%ecx
cmp $0x1,%edi
jle 1450 <func0+0x50>
lea -0x2(%rdi),%edx
lea 0x4(%rsi),%rax
mov $0x1,%r8d
lea 0x8(%rsi,%rdx,4),%rsi
jmp 1432 <func0+0x32>
sete %dl
add $0x4,%rax
movzbl %dl,%edx
add %edx,%r8d
cmp %rax,%rsi
je 1449 <func0+0x49>
mov (%rax),%edx
cmp ... | func0:
endbr64
mov r8d, [rsi]
cmp edi, 1
jle short loc_1190
lea edx, [rdi-2]
lea rax, [rsi+4]
mov ecx, 1
lea rsi, [rsi+rdx*4+8]
jmp short loc_1171
loc_1160:
setz dl
add rax, 4
movzx edx, dl
add ecx, edx
cmp rsi, rax
jz short loc_1189
loc_1171:
mov edx, [rax]
cmp... | long long func0(int a1, int *a2)
{
int v2; // r8d
int *v3; // rax
unsigned int v4; // ecx
long long v5; // rsi
int v6; // edx
bool v7; // zf
v2 = *a2;
if ( a1 <= 1 )
return 1LL;
v3 = a2 + 1;
v4 = 1;
v5 = (long long)&a2[a1 - 2 + 2];
do
{
while ( 1 )
{
v6 = *v3;
v7 = v2... | func0:
ENDBR64
MOV R8D,dword ptr [RSI]
CMP EDI,0x1
JLE 0x00101190
LEA EDX,[RDI + -0x2]
LEA RAX,[RSI + 0x4]
MOV ECX,0x1
LEA RSI,[RSI + RDX*0x4 + 0x8]
JMP 0x00101171
LAB_00101160:
SETZ DL
ADD RAX,0x4
MOVZX EDX,DL
ADD ECX,EDX
CMP RSI,RAX
JZ 0x00101189
LAB_00101171:
MOV EDX,dword ptr [RAX]
CMP R8D,EDX
JLE 0x00101160
ADD RA... | int func0(int param_1,int *param_2)
{
int iVar1;
int *piVar2;
int iVar3;
int iVar4;
if (param_1 < 2) {
return 1;
}
piVar2 = param_2 + 1;
iVar3 = 1;
iVar4 = *param_2;
do {
while( true ) {
iVar1 = *piVar2;
if (iVar1 < iVar4) break;
piVar2 = piVar2 + 1;
iVar3 = iVar3... |
5,432 | func0 | #include <assert.h>
| int func0(int n) {
if (n == 0)
return 3;
if (n == 1)
return 0;
if (n == 2)
return 2;
return func0(n - 2) + func0(n - 3);
}
| int main() {
assert(func0(9) == 12);
assert(func0(4) == 2);
assert(func0(6) == 5);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x18,%rsp
mov %edi,-0x14(%rbp)
cmpl $0x0,-0x14(%rbp)
jne 1166 <func0+0x1d>
mov $0x3,%eax
jmp 119e <func0+0x55>
cmpl $0x1,-0x14(%rbp)
jne 1173 <func0+0x2a>
mov $0x0,%eax
jmp 119e <func0+0x55>
cmpl $0x2,-0x14(%rbp)
jne 1180 <fun... | func0:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 18h
mov [rbp+var_14], edi
cmp [rbp+var_14], 0
jnz short loc_1166
mov eax, 3
jmp short loc_119E
loc_1166:
cmp [rbp+var_14], 1
jnz short loc_1173
mov eax, 0
jmp short loc_119E
loc_1173:
cmp [rbp+var_14], 2
jnz ... | long long func0(int a1)
{
int v2; // ebx
switch ( a1 )
{
case 0:
return 3LL;
case 1:
return 0LL;
case 2:
return 2LL;
}
v2 = func0((unsigned int)(a1 - 2));
return v2 + (unsigned int)func0((unsigned int)(a1 - 3));
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x18
MOV dword ptr [RBP + -0x14],EDI
CMP dword ptr [RBP + -0x14],0x0
JNZ 0x00101166
MOV EAX,0x3
JMP 0x0010119e
LAB_00101166:
CMP dword ptr [RBP + -0x14],0x1
JNZ 0x00101173
MOV EAX,0x0
JMP 0x0010119e
LAB_00101173:
CMP dword ptr [RBP + -0x14],0x2
JNZ 0x00101180
MOV EAX... | int func0(int param_1)
{
int iVar1;
int iVar2;
if (param_1 == 0) {
iVar2 = 3;
}
else if (param_1 == 1) {
iVar2 = 0;
}
else if (param_1 == 2) {
iVar2 = 2;
}
else {
iVar1 = func0(param_1 + -2);
iVar2 = func0(param_1 + -3);
iVar2 = iVar2 + iVar1;
}
return iVar2;
} |
5,433 | func0 | #include <assert.h>
| int func0(int n) {
if (n == 0)
return 3;
if (n == 1)
return 0;
if (n == 2)
return 2;
return func0(n - 2) + func0(n - 3);
}
| int main() {
assert(func0(9) == 12);
assert(func0(4) == 2);
assert(func0(6) == 5);
return 0;
}
| O1 | c | func0:
endbr64
mov $0x3,%eax
test %edi,%edi
je 118a <func0+0x41>
push %rbp
push %rbx
sub $0x8,%rsp
mov %edi,%ebx
mov $0x0,%eax
cmp $0x1,%edi
je 1183 <func0+0x3a>
mov %edi,%eax
cmp $0x2,%edi
je 1183 <func0+0x3a>
lea -0x2(%rdi),%edi
callq 1149 <func0>
mov %eax,%ebp
lea -0x... | func0:
endbr64
mov eax, 3
test edi, edi
jz short locret_118A
push rbp
push rbx
sub rsp, 8
mov ebx, edi
mov eax, 0
cmp edi, 1
jz short loc_1183
mov eax, edi
cmp edi, 2
jz short loc_1183
lea edi, [rdi-2]
call func0
mov ebp, eax
lea edi, [rbx-3]
call fu... | long long func0(unsigned int a1)
{
long long result; // rax
int v2; // ebp
result = 3LL;
if ( a1 )
{
result = 0LL;
if ( a1 != 1 )
{
result = a1;
if ( a1 != 2 )
{
v2 = func0(a1 - 2);
return v2 + (unsigned int)func0(a1 - 3);
}
}
}
return result;
} | func0:
ENDBR64
MOV EAX,0x3
TEST EDI,EDI
JZ 0x0010118a
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV EBX,EDI
MOV EAX,0x0
CMP EDI,0x1
JZ 0x00101183
MOV EAX,EDI
CMP EDI,0x2
JZ 0x00101183
LEA EDI,[RDI + -0x2]
CALL 0x00101149
MOV EBP,EAX
LEA EDI,[RBX + -0x3]
CALL 0x00101149
ADD EAX,EBP
LAB_00101183:
ADD RSP,0x8
POP RBX
POP RBP
RET
LAB_... | int func0(int param_1)
{
int iVar1;
int iVar2;
if (param_1 != 0) {
iVar2 = 0;
if ((param_1 != 1) && (iVar2 = param_1, param_1 != 2)) {
iVar1 = func0(param_1 + -2);
iVar2 = func0(param_1 + -3);
iVar2 = iVar2 + iVar1;
}
return iVar2;
}
return 3;
} |
5,434 | func0 | #include <assert.h>
| int func0(int n) {
if (n == 0)
return 3;
if (n == 1)
return 0;
if (n == 2)
return 2;
return func0(n - 2) + func0(n - 3);
}
| int main() {
assert(func0(9) == 12);
assert(func0(4) == 2);
assert(func0(6) == 5);
return 0;
}
| O2 | c | func0:
endbr64
push %r12
push %rbx
sub $0x8,%rsp
test %edi,%edi
je 1250 <func0+0x60>
cmp $0x1,%edi
je 1260 <func0+0x70>
lea -0x2(%rdi),%ebx
xor %r12d,%r12d
cmp $0x2,%edi
je 1268 <func0+0x78>
mov %ebx,%edi
callq 11f0 <func0>
add %eax,%r12d
cmp $0x1,%ebx
je 1240 <func0+0x50>... | func0:
endbr64
test edi, edi
jz loc_15F8
mov r8d, edi
cmp edi, 1
jz loc_1602
cmp edi, 2
jz loc_15FE
push r15
lea eax, [rdi-3]
xor r8d, r8d
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 38h
mov [rsp+68h+var_60], eax
mov edi, [rsp+68h+var_60]
mov... | long long func0(unsigned int a1)
{
unsigned int v1; // r8d
unsigned int v2; // edi
unsigned int v3; // eax
unsigned int v4; // edi
unsigned int v5; // eax
unsigned int v6; // ecx
int v7; // r11d
int v8; // eax
unsigned int v9; // edx
int v10; // r10d
int v11; // eax
int v12; // r9d
unsigned i... | func0:
ENDBR64
TEST EDI,EDI
JZ 0x001015f8
MOV R8D,EDI
CMP EDI,0x1
JZ 0x00101602
CMP EDI,0x2
JZ 0x001015fe
PUSH R15
LEA EAX,[RDI + -0x3]
XOR R8D,R8D
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOV dword ptr [RSP + 0x8],EAX
MOV EDI,dword ptr [RSP + 0x8]
MOV dword ptr [RSP],R8D
MOV EAX,EDI
ADD EAX,0x1
JZ 0x0... | int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
int iVar6;
int iVar7;
int iVar8;
int iVar9;
int iVar10;
int iVar11;
int iVar12;
int iVar13;
int iVar14;
int iVar15;
int local_68;
int local_64;
int local_60;
int local_5c;
if (param_1 == 0) {
... |
5,435 | func0 | #include <assert.h>
| int func0(int n) {
if (n == 0)
return 3;
if (n == 1)
return 0;
if (n == 2)
return 2;
return func0(n - 2) + func0(n - 3);
}
| int main() {
assert(func0(9) == 12);
assert(func0(4) == 2);
assert(func0(6) == 5);
return 0;
}
| O3 | c | func0:
endbr64
push %r12
push %rbx
sub $0x8,%rsp
test %edi,%edi
je 1250 <func0+0x60>
cmp $0x1,%edi
je 1260 <func0+0x70>
lea -0x2(%rdi),%ebx
xor %r12d,%r12d
cmp $0x2,%edi
je 1268 <func0+0x78>
mov %ebx,%edi
callq 11f0 <func0>
add %eax,%r12d
cmp $0x1,%ebx
je 1240 <func0+0x50>... | func0:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 38h
test edi, edi
jz loc_1537
mov r13d, edi
cmp edi, 1
jz loc_1542
cmp edi, 2
jz loc_1488
lea ebx, [rdi-2]
xor ebp, ebp
loc_1244:
cmp ebx, 1
jz loc_152B
cmp ebx, 2
jz ... | long long func0(unsigned int a1)
{
unsigned int v1; // r13d
unsigned int v2; // ebx
int v3; // ebp
unsigned int v4; // r12d
int v5; // r15d
unsigned int v6; // r13d
unsigned int v7; // r14d
int v8; // r13d
unsigned int v9; // r12d
unsigned int v10; // ebp
unsigned int v11; // eax
int v12; // r1... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x38
TEST EDI,EDI
JZ 0x00101537
MOV R13D,EDI
CMP EDI,0x1
JZ 0x00101542
CMP EDI,0x2
JZ 0x00101488
LEA EBX,[RDI + -0x2]
XOR EBP,EBP
LAB_00101244:
CMP EBX,0x1
JZ 0x0010152b
CMP EBX,0x2
JZ 0x00101481
MOV dword ptr [RSP],EBP
LEA R12D,[RBX + -0x2]
X... | int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
int iVar6;
int iVar7;
int iVar8;
int iVar9;
int iVar10;
int iVar11;
int iVar12;
int iVar13;
int iVar14;
int iVar15;
int iVar16;
int iVar17;
int iVar18;
if (param_1 == 0) {
param_1 = 3;
}
els... |
5,436 | func0 |
#include <assert.h>
#include <string.h>
| int func0(const char *s) {
int count_left = 0;
int count_right = 0;
int swap = 0;
int imbalance = 0;
int i;
for (i = 0; i < strlen(s); i++) {
if (s[i] == '[') {
count_left++;
if (imbalance > 0) {
swap += imbalance;
imbala... | int main() {
assert(func0("[]][][") == 2);
assert(func0("[[][]]") == 0);
assert(func0("[[][]]][") == 1);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x38,%rsp
mov %rdi,-0x38(%rbp)
movl $0x0,-0x24(%rbp)
movl $0x0,-0x20(%rbp)
movl $0x0,-0x1c(%rbp)
movl $0x0,-0x18(%rbp)
movl $0x0,-0x14(%rbp)
jmp 11ee <func0+0x85>
mov -0x14(%rbp),%eax
movslq %eax,%rdx
mov -0x38(%rbp),%rax
add %rdx,... | func0:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 38h
mov [rbp+s], rdi
mov [rbp+var_24], 0
mov [rbp+var_20], 0
mov [rbp+var_1C], 0
mov [rbp+var_18], 0
mov [rbp+var_14], 0
jmp short loc_11EE
loc_119F:
mov eax, [rbp+var_14]
movsxd rdx, eax
mov rax, [rbp+s]
add r... | long long func0(const char *a1)
{
int v2; // [rsp+1Ch] [rbp-24h]
int v3; // [rsp+20h] [rbp-20h]
unsigned int v4; // [rsp+24h] [rbp-1Ch]
int v5; // [rsp+28h] [rbp-18h]
int i; // [rsp+2Ch] [rbp-14h]
v2 = 0;
v3 = 0;
v4 = 0;
v5 = 0;
for ( i = 0; i < strlen(a1); ++i )
{
if ( a1[i] == 91 )
{
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x38],RDI
MOV dword ptr [RBP + -0x24],0x0
MOV dword ptr [RBP + -0x20],0x0
MOV dword ptr [RBP + -0x1c],0x0
MOV dword ptr [RBP + -0x18],0x0
MOV dword ptr [RBP + -0x14],0x0
JMP 0x001011ee
LAB_0010119f:
MOV EAX,dword ptr [RBP + -0x14]
MOVSXD RD... | int func0(char *param_1)
{
size_t sVar1;
int local_2c;
int local_28;
int local_24;
int local_20;
int local_1c;
local_2c = 0;
local_28 = 0;
local_24 = 0;
local_20 = 0;
local_1c = 0;
while( true ) {
sVar1 = strlen(param_1);
if (sVar1 <= (ulong)(long)local_1c) break;
if (param_1[loc... |
5,437 | func0 |
#include <assert.h>
#include <string.h>
| int func0(const char *s) {
int count_left = 0;
int count_right = 0;
int swap = 0;
int imbalance = 0;
int i;
for (i = 0; i < strlen(s); i++) {
if (s[i] == '[') {
count_left++;
if (imbalance > 0) {
swap += imbalance;
imbala... | int main() {
assert(func0("[]][][") == 2);
assert(func0("[[][]]") == 0);
assert(func0("[[][]]][") == 1);
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
mov $0x0,%r9d
mov $0x0,%r8d
mov $0x0,%edi
jmp 1192 <func0+0x49>
add $0x1,%edi
test %ecx,%ecx
jle 118e <func0+0x45>
ad... | func0:
endbr64
push rbx
mov rbx, rdi
call _strlen
mov rdi, rax
mov rax, rbx
add rdi, rbx
mov ecx, 0
mov r9d, 0
mov r8d, 0
mov esi, 0
jmp short loc_11A8
loc_1197:
add esi, 1
test ecx, ecx
jle short loc_11A4
add r9d, ecx
sub ecx, 1
loc_11A4:
add rax, 1
loc_... | long long func0(_BYTE *a1)
{
long long v2; // rdi
_BYTE *v3; // rax
_BYTE *v4; // rdi
int v5; // ecx
unsigned int v6; // r9d
int v7; // r8d
int v8; // esi
v2 = strlen();
v3 = a1;
v4 = &a1[v2];
v5 = 0;
v6 = 0;
v7 = 0;
v8 = 0;
while ( v3 != v4 )
{
if ( *v3 == 91 )
{
++v8;
... | func0:
ENDBR64
PUSH RBX
MOV RBX,RDI
CALL 0x00101060
MOV RDI,RAX
MOV RAX,RBX
ADD RDI,RBX
MOV ECX,0x0
MOV R9D,0x0
MOV R8D,0x0
MOV ESI,0x0
JMP 0x001011a8
LAB_00101197:
ADD ESI,0x1
TEST ECX,ECX
JLE 0x001011a4
ADD R9D,ECX
SUB ECX,0x1
LAB_001011a4:
ADD RAX,0x1
LAB_001011a8:
CMP RAX,RDI
JZ 0x001011c5
MOVZX EDX,byte ptr [RAX]
... | int func0(char *param_1)
{
size_t sVar1;
int iVar2;
int iVar3;
char *pcVar4;
int iVar5;
int iVar6;
sVar1 = strlen(param_1);
pcVar4 = param_1 + sVar1;
iVar2 = 0;
iVar6 = 0;
iVar5 = 0;
iVar3 = 0;
for (; param_1 != pcVar4; param_1 = param_1 + 1) {
if (*param_1 == '[') {
iVar3 = iVar... |
5,438 | func0 |
#include <assert.h>
#include <string.h>
| int func0(const char *s) {
int count_left = 0;
int count_right = 0;
int swap = 0;
int imbalance = 0;
int i;
for (i = 0; i < strlen(s); i++) {
if (s[i] == '[') {
count_left++;
if (imbalance > 0) {
swap += imbalance;
imbala... | int main() {
assert(func0("[]][][") == 2);
assert(func0("[[][]]") == 0);
assert(func0("[[][]]][") == 1);
return 0;
}
| O2 | c | func0:
endbr64
push %rbx
mov %rdi,%rbx
callq 1060 <strlen@plt>
mov %rbx,%rdi
xor %ecx,%ecx
xor %r9d,%r9d
add %rbx,%rax
xor %r8d,%r8d
xor %esi,%esi
jmp 1242 <func0+0x32>
cmp $0x5d,%dl
jne 123e <func0+0x2e>
add $0x1,%r8d
mov %r8d,%ecx
sub %esi,%ecx
add $0x1,%rdi
cmp %rdi,%r... | func0:
endbr64
push rbx
mov rbx, rdi
call _strlen
mov rdi, rbx
xor ecx, ecx
xor r9d, r9d
add rax, rbx
xor r8d, r8d
xor esi, esi
jmp short loc_1242
loc_1230:
cmp dl, 5Dh ; ']'
jnz short loc_123E
add r8d, 1
mov ecx, r8d
sub ecx, esi
loc_123E:
add rdi, 1
loc_12... | long long func0(_BYTE *a1)
{
long long v1; // rax
int v2; // ecx
unsigned int v3; // r9d
_BYTE *v4; // rax
int v5; // r8d
int v6; // esi
v1 = strlen();
v2 = 0;
v3 = 0;
v4 = &a1[v1];
v5 = 0;
v6 = 0;
while ( v4 != a1 )
{
if ( *a1 == 91 )
{
++v6;
if ( v2 > 0 )
v3 +... | func0:
ENDBR64
PUSH RBX
MOV RBX,RDI
CALL 0x00101060
MOV RDI,RBX
XOR ECX,ECX
XOR R9D,R9D
ADD RAX,RBX
XOR R8D,R8D
XOR ESI,ESI
JMP 0x00101242
LAB_00101230:
CMP DL,0x5d
JNZ 0x0010123e
ADD R8D,0x1
MOV ECX,R8D
SUB ECX,ESI
LAB_0010123e:
ADD RDI,0x1
LAB_00101242:
CMP RAX,RDI
JZ 0x00101260
MOVZX EDX,byte ptr [RDI]
CMP DL,0x5b
J... | int func0(char *param_1)
{
size_t sVar1;
char *pcVar2;
int iVar3;
int iVar4;
int iVar5;
int iVar6;
sVar1 = strlen(param_1);
iVar3 = 0;
iVar6 = 0;
pcVar2 = param_1 + sVar1;
iVar5 = 0;
iVar4 = 0;
for (; pcVar2 != param_1; param_1 = param_1 + 1) {
if (*param_1 == '[') {
iVar4 = iVar... |
5,439 | func0 |
#include <assert.h>
#include <string.h>
| int func0(const char *s) {
int count_left = 0;
int count_right = 0;
int swap = 0;
int imbalance = 0;
int i;
for (i = 0; i < strlen(s); i++) {
if (s[i] == '[') {
count_left++;
if (imbalance > 0) {
swap += imbalance;
imbala... | int main() {
assert(func0("[]][][") == 2);
assert(func0("[[][]]") == 0);
assert(func0("[[][]]][") == 1);
return 0;
}
| O3 | c | func0:
endbr64
push %rbx
mov %rdi,%rbx
callq 1060 <strlen@plt>
test %rax,%rax
je 1270 <func0+0x60>
mov %rbx,%rdi
lea (%rbx,%rax,1),%rdx
xor %ecx,%ecx
xor %r9d,%r9d
xor %r8d,%r8d
xor %esi,%esi
jmp 124e <func0+0x3e>
nopl (%rax)
cmp $0x5d,%al
jne 1245 <func0+0x35>
add $0x1,%r8d
... | func0:
endbr64
push rbx
mov rbx, rdi
call _strlen
test rax, rax
jz short loc_1278
mov rdi, rbx
add rax, rbx
xor ecx, ecx
xor r9d, r9d
xor r8d, r8d
xor esi, esi
jmp short loc_124F
loc_1238:
cmp dl, 5Dh ; ']'
jnz short loc_1246
add r8d, 1
mov ecx, r8d
sub ... | long long func0(const char *a1)
{
size_t v1; // rax
const char *v2; // rax
int v3; // ecx
unsigned int v4; // r9d
int v5; // r8d
int v6; // esi
v1 = strlen(a1);
if ( v1 )
{
v2 = &a1[v1];
v3 = 0;
v4 = 0;
v5 = 0;
v6 = 0;
while ( *a1 == 91 )
{
++v6;
if ( v3 <= 0 ... | func0:
ENDBR64
PUSH RBX
MOV RBX,RDI
CALL 0x00101060
TEST RAX,RAX
JZ 0x00101278
MOV RDI,RBX
ADD RAX,RBX
XOR ECX,ECX
XOR R9D,R9D
XOR R8D,R8D
XOR ESI,ESI
JMP 0x0010124f
LAB_00101238:
CMP DL,0x5d
JNZ 0x00101246
ADD R8D,0x1
MOV ECX,R8D
SUB ECX,ESI
LAB_00101246:
ADD RDI,0x1
CMP RAX,RDI
JZ 0x0010126d
LAB_0010124f:
MOVZX EDX,b... | int func0(char *param_1)
{
size_t sVar1;
char *pcVar2;
int iVar3;
int iVar4;
int iVar5;
int iVar6;
sVar1 = strlen(param_1);
if (sVar1 != 0) {
pcVar2 = param_1 + sVar1;
iVar3 = 0;
iVar6 = 0;
iVar5 = 0;
iVar4 = 0;
do {
if (*param_1 == '[') {
iVar4 = iVar4 + 1;
... |
5,440 | func0 |
#include <assert.h>
#include <string.h>
| char* func0(const char* N) {
int l = strlen(N);
if (N[l-1]=='0' || N[l-1]=='2' ||
N[l-1]=='4' || N[l-1]=='6' ||
N[l-1]=='8' || N[l-1]=='A' ||
N[l-1]=='C' || N[l-1]=='E') {
return "Even";
} else {
return "Odd";
}
}
| int main() {
assert(strcmp(func0("AB3454D"), "Odd") == 0);
assert(strcmp(func0("ABC"), "Even") == 0);
assert(strcmp(func0("AAD"), "Odd") == 0);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %rdi,-0x18(%rbp)
mov -0x18(%rbp),%rax
mov %rax,%rdi
callq 1070 <strlen@plt>
mov %eax,-0x4(%rbp)
mov -0x4(%rbp),%eax
cltq
lea -0x1(%rax),%rdx
mov -0x18(%rbp),%rax
add %rdx,%rax
movzbl (%rax),%eax
cmp $0x30,%al
je 1268 <func... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+s], rdi
mov rax, [rbp+s]
mov rdi, rax; s
call _strlen
mov [rbp+var_4], eax
mov eax, [rbp+var_4]
cdqe
lea rdx, [rax-1]
mov rax, [rbp+s]
add rax, rdx
movzx eax, byte ptr [rax]
cmp al, 30h ; '0'
jz loc_1268
... | const char * func0(const char *a1)
{
int v2; // [rsp+1Ch] [rbp-4h]
v2 = strlen(a1);
if ( a1[v2 - 1] == 48
|| a1[v2 - 1] == 50
|| a1[v2 - 1] == 52
|| a1[v2 - 1] == 54
|| a1[v2 - 1] == 56
|| a1[v2 - 1] == 65
|| a1[v2 - 1] == 67
|| a1[v2 - 1] == 69 )
{
return "Even";
}
else
{... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x18],RDI
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,RAX
CALL 0x00101070
MOV dword ptr [RBP + -0x4],EAX
MOV EAX,dword ptr [RBP + -0x4]
CDQE
LEA RDX,[RAX + -0x1]
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,RDX
MOVZX EAX,byte ptr [RAX]
CMP AL,0x30
JZ 0x00101... | int * func0(char *param_1)
{
int iVar1;
size_t sVar2;
int *puVar3;
sVar2 = strlen(param_1);
iVar1 = (int)sVar2;
if (((((param_1[(long)iVar1 + -1] == '0') || (param_1[(long)iVar1 + -1] == '2')) ||
(param_1[(long)iVar1 + -1] == '4')) ||
((param_1[(long)iVar1 + -1] == '6' || (param_1[(long)iVa... |
5,441 | func0 |
#include <assert.h>
#include <string.h>
| char* func0(const char* N) {
int l = strlen(N);
if (N[l-1]=='0' || N[l-1]=='2' ||
N[l-1]=='4' || N[l-1]=='6' ||
N[l-1]=='8' || N[l-1]=='A' ||
N[l-1]=='C' || N[l-1]=='E') {
return "Even";
} else {
return "Odd";
}
}
| int main() {
assert(strcmp(func0("AB3454D"), "Odd") == 0);
assert(strcmp(func0("ABC"), "Even") == 0);
assert(strcmp(func0("AAD"), "Odd") == 0);
return 0;
}
| O1 | c | func0:
endbr64
mov %rdi,%rdx
mov $0xffffffffffffffff,%rcx
mov $0x0,%eax
repnz scas %es:(%rdi),%al
mov %rcx,%rax
not %rax
sub $0x1,%rax
cltq
movzbl -0x1(%rdx,%rax,1),%ecx
sub $0x30,%ecx
lea 0xe8b(%rip),%rax
cmp $0x15,%cl
ja 119a <func0+0x51>
mov $0x2a0155,%eax
shr %cl,%rax
test $0x... | func0:
endbr64
push rbx
mov rbx, rdi
call _strlen
cdqe
movzx ecx, byte ptr [rbx+rax-1]
mov edx, ecx
and edx, 0FFFFFFFDh
lea rax, aEven; "Even"
cmp dl, 30h ; '0'
jz short loc_11D9
sub ecx, 34h ; '4'
lea rax, aOdd; "Odd"
cmp cl, 11h
ja short loc_11D9
mov eax, 2A015h
s... | const char * func0(long long a1)
{
char v1; // cl
const char *result; // rax
unsigned __int8 v3; // cl
v1 = *(_BYTE *)(a1 + (int)strlen() - 1);
result = "Even";
if ( (v1 & 0xFD) != 0x30 )
{
v3 = v1 - 52;
result = "Odd";
if ( v3 <= 0x11u )
{
result = "Odd";
if ( ((0x2A015uLL >>... | func0:
ENDBR64
PUSH RBX
MOV RBX,RDI
CALL 0x00101070
CDQE
MOVZX ECX,byte ptr [RBX + RAX*0x1 + -0x1]
MOV EDX,ECX
AND EDX,0xfffffffd
LEA RAX,[0x102004]
CMP DL,0x30
JZ 0x001011d9
SUB ECX,0x34
LEA RAX,[0x102009]
CMP CL,0x11
JA 0x001011d9
MOV EAX,0x2a015
SHR RAX,CL
TEST AL,0x1
LEA RAX,[0x102009]
LEA RDX,[0x102004]
CMOVNZ RAX... | int * func0(char *param_1)
{
size_t sVar1;
int *puVar2;
byte bVar3;
sVar1 = strlen(param_1);
puVar2 = &DAT_00102004;
if ((param_1[(long)(int)sVar1 + -1] & 0xfdU) != 0x30) {
bVar3 = param_1[(long)(int)sVar1 + -1] - 0x34;
puVar2 = &DAT_00102009;
if ((bVar3 < 0x12) && (puVar2 = &DAT_00102009, (... |
5,442 | func0 |
#include <assert.h>
#include <string.h>
| char* func0(const char* N) {
int l = strlen(N);
if (N[l-1]=='0' || N[l-1]=='2' ||
N[l-1]=='4' || N[l-1]=='6' ||
N[l-1]=='8' || N[l-1]=='A' ||
N[l-1]=='C' || N[l-1]=='E') {
return "Even";
} else {
return "Odd";
}
}
| int main() {
assert(strcmp(func0("AB3454D"), "Odd") == 0);
assert(strcmp(func0("ABC"), "Even") == 0);
assert(strcmp(func0("AAD"), "Odd") == 0);
return 0;
}
| O2 | c | func0:
endbr64
push %rbx
mov %rdi,%rbx
callq 1060 <strlen@plt>
cltq
movzbl -0x1(%rbx,%rax,1),%ecx
lea 0xd99(%rip),%rax
sub $0x30,%ecx
cmp $0x15,%cl
ja 1289 <func0+0x39>
mov $0x2a0155,%edx
shr %cl,%rdx
and $0x1,%edx
lea 0xd83(%rip),%rdx
cmovne %rdx,%rax
pop %rbx
retq
nopl 0x0(%rax,%ra... | func0:
endbr64
push rbx
mov rbx, rdi
call _strlen
cdqe
movzx ecx, byte ptr [rbx+rax-1]
lea rax, aEven; "Even"
mov edx, ecx
and edx, 0FFFFFFFDh
cmp dl, 30h ; '0'
jz short loc_12AA
sub ecx, 34h ; '4'
lea rax, aOdd; "Odd"
cmp cl, 11h
ja short loc_12AA
mov edx, 2A015h
s... | const char * func0(long long a1)
{
char v1; // cl
const char *result; // rax
unsigned __int8 v3; // cl
v1 = *(_BYTE *)(a1 + (int)strlen() - 1);
result = "Even";
if ( (v1 & 0xFD) != 0x30 )
{
v3 = v1 - 52;
result = "Odd";
if ( v3 <= 0x11u && ((0x2A015uLL >> v3) & 1) != 0 )
return "Even";
... | func0:
ENDBR64
PUSH RBX
MOV RBX,RDI
CALL 0x00101070
CDQE
MOVZX ECX,byte ptr [RBX + RAX*0x1 + -0x1]
LEA RAX,[0x102004]
MOV EDX,ECX
AND EDX,0xfffffffd
CMP DL,0x30
JZ 0x001012aa
SUB ECX,0x34
LEA RAX,[0x102009]
CMP CL,0x11
JA 0x001012aa
MOV EDX,0x2a015
SHR RDX,CL
AND EDX,0x1
LEA RDX,[0x102004]
CMOVNZ RAX,RDX
LAB_001012aa:
... | int * func0(char *param_1)
{
size_t sVar1;
int *puVar2;
byte bVar3;
sVar1 = strlen(param_1);
puVar2 = &DAT_00102004;
if ((param_1[(long)(int)sVar1 + -1] & 0xfdU) != 0x30) {
bVar3 = param_1[(long)(int)sVar1 + -1] - 0x34;
puVar2 = &DAT_00102009;
if ((bVar3 < 0x12) && ((0x2a015UL >> (bVar3 & 0x... |
5,443 | func0 |
#include <assert.h>
#include <string.h>
| char* func0(const char* N) {
int l = strlen(N);
if (N[l-1]=='0' || N[l-1]=='2' ||
N[l-1]=='4' || N[l-1]=='6' ||
N[l-1]=='8' || N[l-1]=='A' ||
N[l-1]=='C' || N[l-1]=='E') {
return "Even";
} else {
return "Odd";
}
}
| int main() {
assert(strcmp(func0("AB3454D"), "Odd") == 0);
assert(strcmp(func0("ABC"), "Even") == 0);
assert(strcmp(func0("AAD"), "Odd") == 0);
return 0;
}
| O3 | c | func0:
endbr64
push %rbx
mov %rdi,%rbx
callq 1060 <strlen@plt>
cltq
movzbl -0x1(%rbx,%rax,1),%ecx
lea 0xd99(%rip),%rax
sub $0x30,%ecx
cmp $0x15,%cl
ja 1289 <func0+0x39>
mov $0x2a0155,%edx
shr %cl,%rdx
and $0x1,%edx
lea 0xd83(%rip),%rdx
cmovne %rdx,%rax
pop %rbx
retq
nopl 0x0(%rax,%ra... | func0:
endbr64
push rbx
mov rbx, rdi
call _strlen
lea rdx, s2; "Odd"
cdqe
movzx eax, byte ptr [rbx+rax-1]
sub eax, 30h ; '0'
cmp al, 15h
ja short loc_1296
mov ecx, 2A0155h
bt rcx, rax
lea rax, aEven; "Even"
cmovb rdx, rax
loc_1296:
mov rax, rdx
pop rbx
retn | const char * func0(const char *a1)
{
int v1; // eax
const char *v2; // rdx
unsigned long long v3; // rax
long long v4; // rcx
v1 = strlen(a1);
v2 = "Odd";
v3 = (unsigned int)(unsigned __int8)a1[v1 - 1] - 48;
if ( (unsigned __int8)v3 <= 0x15u )
{
v4 = 2752853LL;
if ( _bittest64(&v4, v3) )
... | func0:
ENDBR64
PUSH RBX
MOV RBX,RDI
CALL 0x00101070
LEA RDX,[0x102009]
CDQE
MOVZX EAX,byte ptr [RBX + RAX*0x1 + -0x1]
SUB EAX,0x30
CMP AL,0x15
JA 0x00101296
MOV ECX,0x2a0155
BT RCX,RAX
LEA RAX,[0x102004]
CMOVC RDX,RAX
LAB_00101296:
MOV RAX,RDX
POP RBX
RET | int * func0(char *param_1)
{
size_t sVar1;
int *puVar2;
sVar1 = strlen(param_1);
puVar2 = &DAT_00102009;
if (((byte)((byte)param_1[(long)(int)sVar1 + -1] - 0x30) < 0x16) &&
((0x2a0155UL >> ((ulong)((byte)param_1[(long)(int)sVar1 + -1] - 0x30) & 0x3f) & 1) != 0)) {
puVar2 = &DAT_00102004;
}
re... |
5,444 | func0 |
#include <assert.h>
| int func0(int n) {
int res = 0;
for (int i = n; i > 0; --i) {
if ((i & (i - 1)) == 0) {
res = i;
break;
}
}
return res;
}
| int main() {
assert(func0(10) == 8);
assert(func0(19) == 16);
assert(func0(32) == 32);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
movl $0x0,-0x8(%rbp)
mov -0x14(%rbp),%eax
mov %eax,-0x4(%rbp)
jmp 117c <func0+0x33>
mov -0x4(%rbp),%eax
sub $0x1,%eax
and -0x4(%rbp),%eax
test %eax,%eax
jne 1178 <func0+0x2f>
mov -0x4(%rbp),%eax
mov %eax,-0x8(%rbp)
jmp ... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_8], 0
mov eax, [rbp+var_14]
mov [rbp+var_4], eax
jmp short loc_117C
loc_1163:
mov eax, [rbp+var_4]
sub eax, 1
and eax, [rbp+var_4]
test eax, eax
jnz short loc_1178
mov eax, [rbp+var_4]
mov [rbp+... | long long func0(int a1)
{
unsigned int v2; // [rsp+Ch] [rbp-8h]
v2 = 0;
while ( a1 > 0 )
{
if ( (a1 & (a1 - 1)) == 0 )
return (unsigned int)a1;
--a1;
}
return v2;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x8],0x0
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0010117c
LAB_00101163:
MOV EAX,dword ptr [RBP + -0x4]
SUB EAX,0x1
AND EAX,dword ptr [RBP + -0x4]
TEST EAX,EAX
JNZ 0x00101178
MOV EAX,dword ptr [RBP + -0... | uint func0(uint param_1)
{
uint local_c;
local_c = param_1;
while( true ) {
if ((int)local_c < 1) {
return 0;
}
if ((local_c - 1 & local_c) == 0) break;
local_c = local_c - 1;
}
return local_c;
} |
5,445 | func0 |
#include <assert.h>
| int func0(int n) {
int res = 0;
for (int i = n; i > 0; --i) {
if ((i & (i - 1)) == 0) {
res = i;
break;
}
}
return res;
}
| int main() {
assert(func0(10) == 8);
assert(func0(19) == 16);
assert(func0(32) == 32);
return 0;
}
| O1 | c | func0:
endbr64
test %edi,%edi
jle 115c <func0+0x13>
lea -0x1(%rdi),%eax
test %edi,%eax
je 1162 <func0+0x19>
mov %eax,%edi
jmp 114d <func0+0x4>
mov $0x0,%eax
retq
mov %edi,%eax
retq
| func0:
endbr64
loc_114D:
test edi, edi
jle short loc_115C
lea eax, [rdi-1]
test eax, edi
jz short loc_1162
mov edi, eax
jmp short loc_114D
loc_115C:
mov eax, 0
retn
loc_1162:
mov eax, edi
retn | long long func0(int a1)
{
while ( 1 )
{
if ( a1 <= 0 )
return 0LL;
if ( (a1 & (a1 - 1)) == 0 )
break;
--a1;
}
return (unsigned int)a1;
} | func0:
ENDBR64
LAB_0010114d:
TEST EDI,EDI
JLE 0x0010115c
LEA EAX,[RDI + -0x1]
TEST EAX,EDI
JZ 0x00101162
MOV EDI,EAX
JMP 0x0010114d
LAB_0010115c:
MOV EAX,0x0
RET
LAB_00101162:
MOV EAX,EDI
RET | uint func0(uint param_1)
{
uint uVar1;
do {
uVar1 = param_1;
if ((int)uVar1 < 1) {
return 0;
}
param_1 = uVar1 - 1;
} while ((uVar1 - 1 & uVar1) != 0);
return uVar1;
} |
5,446 | func0 |
#include <assert.h>
| int func0(int n) {
int res = 0;
for (int i = n; i > 0; --i) {
if ((i & (i - 1)) == 0) {
res = i;
break;
}
}
return res;
}
| int main() {
assert(func0(10) == 8);
assert(func0(19) == 16);
assert(func0(32) == 32);
return 0;
}
| O2 | c | func0:
endbr64
jmp 11e9 <func0+0x19>
nopw %cs:0x0(%rax,%rax,1)
lea -0x1(%rdi),%eax
test %edi,%eax
je 11f0 <func0+0x20>
mov %eax,%edi
test %edi,%edi
jg 11e0 <func0+0x10>
xor %eax,%eax
retq
mov %edi,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
nopl (%rax)
| func0:
endbr64
jmp short loc_11E9
loc_11E0:
lea eax, [rdi-1]
test eax, edi
jz short loc_11F0
mov edi, eax
loc_11E9:
test edi, edi
jg short loc_11E0
xor eax, eax
retn
loc_11F0:
mov eax, edi
retn | long long func0(int a1)
{
while ( 1 )
{
if ( a1 <= 0 )
return 0LL;
if ( (a1 & (a1 - 1)) == 0 )
break;
--a1;
}
return (unsigned int)a1;
} | func0:
ENDBR64
JMP 0x001011e9
LAB_001011e0:
LEA EAX,[RDI + -0x1]
TEST EAX,EDI
JZ 0x001011f0
MOV EDI,EAX | void func0(void)
{
FUN_001011e9();
return;
} |
5,447 | func0 |
#include <assert.h>
| int func0(int n) {
int res = 0;
for (int i = n; i > 0; --i) {
if ((i & (i - 1)) == 0) {
res = i;
break;
}
}
return res;
}
| int main() {
assert(func0(10) == 8);
assert(func0(19) == 16);
assert(func0(32) == 32);
return 0;
}
| O3 | c | func0:
endbr64
jmp 11b9 <func0+0x19>
nopw %cs:0x0(%rax,%rax,1)
lea -0x1(%rdi),%eax
test %edi,%eax
je 11c0 <func0+0x20>
mov %eax,%edi
test %edi,%edi
jg 11b0 <func0+0x10>
xor %eax,%eax
retq
mov %edi,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
nopl (%rax)
| func0:
endbr64
test edi, edi
jle short loc_11C0
nop dword ptr [rax+rax+00000000h]
loc_11B0:
mov eax, edi
sub edi, 1
test edi, eax
jnz short loc_11B0
retn
loc_11C0:
xor eax, eax
retn | long long func0(int a1)
{
long long result; // rax
if ( a1 <= 0 )
return 0LL;
do
result = (unsigned int)a1--;
while ( ((unsigned int)result & a1) != 0 );
return result;
} | func0:
ENDBR64
TEST EDI,EDI
JLE 0x001011c0
NOP dword ptr [RAX + RAX*0x1]
LAB_001011b0:
MOV EAX,EDI
SUB EDI,0x1
TEST EDI,EAX
JNZ 0x001011b0
RET
LAB_001011c0:
XOR EAX,EAX
RET | uint func0(uint param_1)
{
uint uVar1;
uint uVar2;
if ((int)param_1 < 1) {
return 0;
}
do {
uVar2 = param_1;
uVar1 = param_1 - 1 & param_1;
param_1 = param_1 - 1;
} while (uVar1 != 0);
return uVar2;
} |
5,448 | func0 |
#include <assert.h>
| int func0(int n) {
if (n == 0)
return 2;
if (n == 1)
return 1;
return func0(n - 1) + func0(n - 2);
}
| int main() {
assert(func0(9) == 76);
assert(func0(4) == 7);
assert(func0(3) == 4);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x18,%rsp
mov %edi,-0x14(%rbp)
cmpl $0x0,-0x14(%rbp)
jne 1166 <func0+0x1d>
mov $0x2,%eax
jmp 1191 <func0+0x48>
cmpl $0x1,-0x14(%rbp)
jne 1173 <func0+0x2a>
mov $0x1,%eax
jmp 1191 <func0+0x48>
mov -0x14(%rbp),%eax
sub $0x1,%eax... | func0:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 18h
mov [rbp+var_14], edi
cmp [rbp+var_14], 0
jnz short loc_1166
mov eax, 2
jmp short loc_1191
loc_1166:
cmp [rbp+var_14], 1
jnz short loc_1173
mov eax, 1
jmp short loc_1191
loc_1173:
mov eax, [rbp+var_14]
sub ... | long long func0(int a1)
{
int v2; // ebx
if ( !a1 )
return 2LL;
if ( a1 == 1 )
return 1LL;
v2 = func0((unsigned int)(a1 - 1));
return v2 + (unsigned int)func0((unsigned int)(a1 - 2));
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x18
MOV dword ptr [RBP + -0x14],EDI
CMP dword ptr [RBP + -0x14],0x0
JNZ 0x00101166
MOV EAX,0x2
JMP 0x00101191
LAB_00101166:
CMP dword ptr [RBP + -0x14],0x1
JNZ 0x00101173
MOV EAX,0x1
JMP 0x00101191
LAB_00101173:
MOV EAX,dword ptr [RBP + -0x14]
SUB EAX,0x1
MOV EDI,EA... | int func0(int param_1)
{
int iVar1;
int iVar2;
if (param_1 == 0) {
iVar2 = 2;
}
else if (param_1 == 1) {
iVar2 = 1;
}
else {
iVar1 = func0(param_1 + -1);
iVar2 = func0(param_1 + -2);
iVar2 = iVar2 + iVar1;
}
return iVar2;
} |
5,449 | func0 |
#include <assert.h>
| int func0(int n) {
if (n == 0)
return 2;
if (n == 1)
return 1;
return func0(n - 1) + func0(n - 2);
}
| int main() {
assert(func0(9) == 76);
assert(func0(4) == 7);
assert(func0(3) == 4);
return 0;
}
| O1 | c | func0:
endbr64
mov $0x2,%eax
test %edi,%edi
je 1180 <func0+0x37>
push %rbp
push %rbx
sub $0x8,%rsp
mov %edi,%ebx
mov %edi,%eax
cmp $0x1,%edi
je 1179 <func0+0x30>
lea -0x1(%rdi),%edi
callq 1149 <func0>
mov %eax,%ebp
lea -0x2(%rbx),%edi
callq 1149 <func0>
add %ebp,%eax
add $0... | func0:
endbr64
mov eax, 2
test edi, edi
jz short locret_1180
push rbp
push rbx
sub rsp, 8
mov ebx, edi
mov eax, edi
cmp edi, 1
jz short loc_1179
lea edi, [rdi-1]
call func0
mov ebp, eax
lea edi, [rbx-2]
call func0
add eax, ebp
loc_1179:
add rsp, 8
pop ... | long long func0(unsigned int a1)
{
long long result; // rax
int v2; // ebp
result = 2LL;
if ( a1 )
{
result = a1;
if ( a1 != 1 )
{
v2 = func0(a1 - 1);
return v2 + (unsigned int)func0(a1 - 2);
}
}
return result;
} | func0:
ENDBR64
MOV EAX,0x2
TEST EDI,EDI
JZ 0x00101180
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV EBX,EDI
MOV EAX,EDI
CMP EDI,0x1
JZ 0x00101179
LEA EDI,[RDI + -0x1]
CALL 0x00101149
MOV EBP,EAX
LEA EDI,[RBX + -0x2]
CALL 0x00101149
ADD EAX,EBP
LAB_00101179:
ADD RSP,0x8
POP RBX
POP RBP
RET
LAB_00101180:
RET | int func0(int param_1)
{
int iVar1;
if (param_1 != 0) {
if (param_1 != 1) {
iVar1 = func0(param_1 + -1);
param_1 = func0(param_1 + -2);
param_1 = param_1 + iVar1;
}
return param_1;
}
return 2;
} |
5,450 | func0 |
#include <assert.h>
| int func0(int n) {
if (n == 0)
return 2;
if (n == 1)
return 1;
return func0(n - 1) + func0(n - 2);
}
| int main() {
assert(func0(9) == 76);
assert(func0(4) == 7);
assert(func0(3) == 4);
return 0;
}
| O2 | c | func0:
endbr64
test %edi,%edi
je 1238 <func0+0x48>
push %rbp
push %rbx
mov %edi,%ebx
sub $0x8,%rsp
cmp $0x1,%edi
je 1240 <func0+0x50>
xor %ebp,%ebp
lea -0x1(%rbx),%edi
callq 11f0 <func0>
add %eax,%ebp
sub $0x2,%ebx
je 1228 <func0+0x38>
cmp $0x1,%ebx
jne 1207 <func0+0x17>
le... | func0:
endbr64
test edi, edi
jz loc_1691
mov eax, edi
cmp edi, 1
jz locret_1697
push r15
sub eax, 2
xor r8d, r8d
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 38h
mov [rsp+68h+var_60], eax
mov edi, [rsp+68h+var_60]
mov [rsp+68h+var_68], r8d
mov ... | long long func0(unsigned int a1)
{
long long result; // rax
unsigned int v2; // edi
unsigned int v3; // eax
int v4; // edi
int v5; // eax
int v6; // edx
int v7; // edi
int v8; // eax
int v9; // esi
int v10; // r13d
int v11; // eax
int v12; // r14d
int v13; // r13d
int v14; // ebp
int v15;... | func0:
ENDBR64
TEST EDI,EDI
JZ 0x00101691
MOV EAX,EDI
CMP EDI,0x1
JZ 0x00101697
PUSH R15
SUB EAX,0x2
XOR R8D,R8D
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOV dword ptr [RSP + 0x8],EAX
MOV EDI,dword ptr [RSP + 0x8]
MOV dword ptr [RSP],R8D
MOV EAX,EDI
ADD EAX,0x1
JZ 0x00101626
LAB_00101232:
CMP EAX,0x1
J... | int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
int iVar6;
int iVar7;
int iVar8;
int iVar9;
int iVar10;
int iVar11;
int iVar12;
int iVar13;
int iVar14;
int local_68;
int local_64;
int local_60;
int local_5c;
int local_58;
if (param_1 == 0) {
... |
5,451 | func0 |
#include <assert.h>
| int func0(int n) {
if (n == 0)
return 2;
if (n == 1)
return 1;
return func0(n - 1) + func0(n - 2);
}
| int main() {
assert(func0(9) == 76);
assert(func0(4) == 7);
assert(func0(3) == 4);
return 0;
}
| O3 | c | func0:
endbr64
test %edi,%edi
je 1238 <func0+0x48>
push %rbp
push %rbx
mov %edi,%ebx
sub $0x8,%rsp
cmp $0x1,%edi
je 1240 <func0+0x50>
xor %ebp,%ebp
lea -0x1(%rbx),%edi
callq 11f0 <func0>
add %eax,%ebp
sub $0x2,%ebx
je 1228 <func0+0x38>
cmp $0x1,%ebx
jne 1207 <func0+0x17>
le... | func0:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 58h
test edi, edi
jz loc_1528
mov r15d, edi
cmp edi, 1
jz loc_143D
lea r13d, [rdi-1]
xor r15d, r15d
loc_121D:
cmp r13d, 1
jz loc_151F
lea ebx, [r13-1]
mov [rsp+88h+var_6C], r... | long long func0(unsigned int a1)
{
unsigned int v1; // r15d
unsigned int v2; // r13d
int v3; // r15d
unsigned int v4; // ebx
int v5; // ebp
unsigned int v6; // edx
int v7; // r13d
int v8; // ecx
unsigned int v9; // ebx
unsigned int v10; // edi
int v11; // r12d
unsigned int v12; // r15d
unsign... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x58
TEST EDI,EDI
JZ 0x00101528
MOV R15D,EDI
CMP EDI,0x1
JZ 0x0010143d
LEA R13D,[RDI + -0x1]
XOR R15D,R15D
LAB_0010121d:
CMP R13D,0x1
JZ 0x0010151f
LEA EBX,[R13 + -0x1]
MOV dword ptr [RSP + 0x1c],R15D
XOR R12D,R12D
MOV dword ptr [RSP + 0x20],R... | int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
int iVar6;
int iVar7;
int iVar8;
int iVar9;
int iVar10;
int iVar11;
int iVar12;
int iVar13;
int iVar14;
int iVar15;
int iVar16;
int iVar17;
int iVar18;
int iVar19;
int iVar20;
int iVar21;
int iVa... |
5,452 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
| char** func0(char* list[], int size, const char* format) {
char** result = malloc(size * sizeof(char*));
for(int i = 0; i < size; i++) {
result[i] = malloc(100);
sprintf(result[i], format, list[i]);
}
return result;
}
| int main() {
// First test case
char* list1[] = {"1", "2", "3", "4"};
char** res1 = func0(list1, 4, "temp%s");
assert(strcmp(res1[0], "temp1") == 0);
assert(strcmp(res1[1], "temp2") == 0);
assert(strcmp(res1[2], "temp3") == 0);
assert(strcmp(res1[3], "temp4") == 0);
for(int i = 0... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x38,%rsp
mov %rdi,-0x28(%rbp)
mov %esi,-0x2c(%rbp)
mov %rdx,-0x38(%rbp)
mov -0x2c(%rbp),%eax
cltq
shl $0x3,%rax
mov %rax,%rdi
callq 10e0 <malloc@plt>
mov %rax,-0x18(%rbp)
movl $0x0,-0x1c(%rbp)
jmp 1287 <func0+0x9e>
mov -0x1c(... | func0:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 38h
mov [rbp+var_28], rdi
mov [rbp+var_2C], esi
mov [rbp+format], rdx
mov eax, [rbp+var_2C]
cdqe
shl rax, 3
mov rdi, rax; size
call _malloc
mov [rbp+var_18], rax
mov [rbp+var_1C], 0
jmp short loc_1287
loc_121F:
m... | _QWORD * func0(long long a1, int a2, const char *a3)
{
int i; // [rsp+24h] [rbp-1Ch]
_QWORD *v6; // [rsp+28h] [rbp-18h]
v6 = malloc(8LL * a2);
for ( i = 0; i < a2; ++i )
{
v6[i] = malloc(0x64uLL);
sprintf((char *)v6[i], a3, *(_QWORD *)(8LL * i + a1));
}
return v6;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x28],RDI
MOV dword ptr [RBP + -0x2c],ESI
MOV qword ptr [RBP + -0x38],RDX
MOV EAX,dword ptr [RBP + -0x2c]
CDQE
SHL RAX,0x3
MOV RDI,RAX
CALL 0x001010e0
MOV qword ptr [RBP + -0x18],RAX
MOV dword ptr [RBP + -0x1c],0x0
JMP 0x00101287
LAB_001012... | void * func0(long param_1,int param_2,char *param_3)
{
void *pvVar1;
void *pvVar2;
int4 local_24;
pvVar1 = malloc((long)param_2 << 3);
for (local_24 = 0; local_24 < param_2; local_24 = local_24 + 1) {
pvVar2 = malloc(100);
*(void **)((long)local_24 * 8 + (long)pvVar1) = pvVar2;
sprintf(*(char ... |
5,453 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
| char** func0(char* list[], int size, const char* format) {
char** result = malloc(size * sizeof(char*));
for(int i = 0; i < size; i++) {
result[i] = malloc(100);
sprintf(result[i], format, list[i]);
}
return result;
}
| int main() {
// First test case
char* list1[] = {"1", "2", "3", "4"};
char** res1 = func0(list1, 4, "temp%s");
assert(strcmp(res1[0], "temp1") == 0);
assert(strcmp(res1[1], "temp2") == 0);
assert(strcmp(res1[2], "temp3") == 0);
assert(strcmp(res1[3], "temp4") == 0);
for(int i = 0... | O1 | c | func0:
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
mov %rdi,%r12
mov %esi,%ebx
mov %rdx,%r13
movslq %esi,%rdi
shl $0x3,%rdi
callq 10c0 <malloc@plt>
mov %rax,%rbp
test %ebx,%ebx
jle 1232 <func0+0x69>
lea -0x1(%rbx),%r14d
mov $0x0,%ebx
mov $0x64,%edi
callq 10c0 <mall... | func0:
endbr64
push r14
push r13
push r12
push rbp
push rbx
mov r13, rdi
mov ebp, esi
mov r14, rdx
movsxd rdi, esi
shl rdi, 3
call _malloc
mov r12, rax
test ebp, ebp
jle short loc_124D
mov ebp, ebp
mov ebx, 0
loc_1217:
mov edi, 64h ; 'd'
call _malloc
mov ... | long long func0(long long a1, int a2, long long a3)
{
long long v4; // r12
long long i; // rbx
long long v6; // rax
v4 = malloc(8LL * a2);
if ( a2 > 0 )
{
for ( i = 0LL; i != a2; __sprintf_chk(v6, 1LL, 100LL, a3, *(_QWORD *)(a1 + 8 * i++)) )
{
v6 = malloc(100LL);
*(_QWORD *)(v4 + 8 * i... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV R13,RDI
MOV EBP,ESI
MOV R14,RDX
MOVSXD RDI,ESI
SHL RDI,0x3
CALL 0x001010e0
MOV R12,RAX
TEST EBP,EBP
JLE 0x0010124d
MOV EBP,EBP
MOV EBX,0x0
LAB_00101217:
MOV EDI,0x64
CALL 0x001010e0
MOV RDI,RAX
MOV qword ptr [R12 + RBX*0x8],RAX
MOV R8,qword ptr [R13 + RBX*... | void * func0(long param_1,uint param_2,int8 param_3)
{
void *pvVar1;
void *pvVar2;
ulong uVar3;
pvVar1 = malloc((long)(int)param_2 << 3);
if (0 < (int)param_2) {
uVar3 = 0;
do {
pvVar2 = malloc(100);
*(void **)((long)pvVar1 + uVar3 * 8) = pvVar2;
__sprintf_chk(pvVar2,1,100,param_... |
5,454 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
| char** func0(char* list[], int size, const char* format) {
char** result = malloc(size * sizeof(char*));
for(int i = 0; i < size; i++) {
result[i] = malloc(100);
sprintf(result[i], format, list[i]);
}
return result;
}
| int main() {
// First test case
char* list1[] = {"1", "2", "3", "4"};
char** res1 = func0(list1, 4, "temp%s");
assert(strcmp(res1[0], "temp1") == 0);
assert(strcmp(res1[1], "temp2") == 0);
assert(strcmp(res1[2], "temp3") == 0);
assert(strcmp(res1[3], "temp4") == 0);
for(int i = 0... | O2 | c | func0:
endbr64
push %r14
push %r13
mov %rdx,%r13
push %r12
push %rbp
mov %rdi,%rbp
movslq %esi,%rdi
push %rbx
mov %rdi,%rbx
shl $0x3,%rdi
callq 10c0 <malloc@plt>
mov %rax,%r12
test %ebx,%ebx
jle 16b6 <func0+0x66>
lea -0x1(%rbx),%r14d
xor %ebx,%ebx
xchg %ax,%ax
mov $0x64,%edi
ca... | func0:
endbr64
push r14
movsxd r14, esi
push r13
mov r13, rdx
push r12
push rbp
mov rbp, rdi
lea rdi, ds:0[r14*8]
push rbx
call _malloc
mov r12, rax
test r14d, r14d
jle short loc_1683
xor ebx, ebx
nop dword ptr [rax+00h]
loc_1650:
mov edi, 64h ; 'd'
call _malloc
... | long long func0(long long a1, int a2, long long a3)
{
long long v4; // r12
long long i; // rbx
long long v6; // rax
long long v7; // r8
v4 = malloc(8LL * a2);
if ( a2 > 0 )
{
for ( i = 0LL; i != a2; ++i )
{
v6 = malloc(100LL);
v7 = *(_QWORD *)(a1 + 8 * i);
*(_QWORD *)(v4 + 8 * ... | func0:
ENDBR64
PUSH R14
MOVSXD R14,ESI
PUSH R13
MOV R13,RDX
PUSH R12
PUSH RBP
MOV RBP,RDI
LEA RDI,[R14*0x8]
PUSH RBX
CALL 0x001010e0
MOV R12,RAX
TEST R14D,R14D
JLE 0x00101683
XOR EBX,EBX
NOP dword ptr [RAX]
LAB_00101650:
MOV EDI,0x64
CALL 0x001010e0
MOV R8,qword ptr [RBP + RBX*0x8]
MOV RCX,R13
MOV EDX,0x64
MOV qword pt... | void * func0(long param_1,int param_2,int8 param_3)
{
int8 uVar1;
void *pvVar2;
void *pvVar3;
long lVar4;
pvVar2 = malloc((long)param_2 * 8);
if (0 < param_2) {
lVar4 = 0;
do {
pvVar3 = malloc(100);
uVar1 = *(int8 *)(param_1 + lVar4 * 8);
*(void **)((long)pvVar2 + lVar4 * 8) = ... |
5,455 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
| char** func0(char* list[], int size, const char* format) {
char** result = malloc(size * sizeof(char*));
for(int i = 0; i < size; i++) {
result[i] = malloc(100);
sprintf(result[i], format, list[i]);
}
return result;
}
| int main() {
// First test case
char* list1[] = {"1", "2", "3", "4"};
char** res1 = func0(list1, 4, "temp%s");
assert(strcmp(res1[0], "temp1") == 0);
assert(strcmp(res1[1], "temp2") == 0);
assert(strcmp(res1[2], "temp3") == 0);
assert(strcmp(res1[3], "temp4") == 0);
for(int i = 0... | O3 | c | func0:
endbr64
push %r14
push %r13
mov %rdx,%r13
push %r12
push %rbp
mov %rdi,%rbp
movslq %esi,%rdi
push %rbx
mov %rdi,%rbx
shl $0x3,%rdi
callq 10c0 <malloc@plt>
mov %rax,%r12
test %ebx,%ebx
jle 16c6 <func0+0x66>
lea -0x1(%rbx),%r14d
xor %ebx,%ebx
xchg %ax,%ax
mov $0x64,%edi
ca... | func0:
endbr64
push r14
push r13
mov r13, rdx
push r12
movsxd r12, esi
push rbp
mov rbp, rdi
push rbx
mov rbx, r12
shl r12, 3
mov rdi, r12; size
call _malloc
mov r14, rax
test ebx, ebx
jle short loc_169E
mov rbx, rax
add r12, rax
nop dword ptr [rax+00000000h... | char * func0(long long a1, int a2, long long a3)
{
char *v5; // rax
char *v6; // r14
char *v7; // rbx
char *v8; // r12
void *v9; // rax
long long v10; // r8
v5 = (char *)malloc(8LL * a2);
v6 = v5;
if ( a2 > 0 )
{
v7 = v5;
v8 = &v5[8 * a2];
do
{
v7 += 8;
a1 += 8LL;
... | func0:
ENDBR64
PUSH R14
PUSH R13
MOV R13,RDX
PUSH R12
MOVSXD R12,ESI
PUSH RBP
MOV RBP,RDI
PUSH RBX
MOV RBX,R12
SHL R12,0x3
MOV RDI,R12
CALL 0x001010e0
MOV R14,RAX
TEST EBX,EBX
JLE 0x0010169e
MOV RBX,RAX
ADD R12,RAX
NOP dword ptr [RAX]
LAB_00101668:
MOV EDI,0x64
ADD RBX,0x8
ADD RBP,0x8
CALL 0x001010e0
MOV R8,qword ptr [... | int8 * func0(int8 *param_1,int param_2,int8 param_3)
{
int8 uVar1;
int8 *puVar2;
void *pvVar3;
int8 *puVar4;
int8 *puVar5;
puVar2 = (int8 *)malloc((long)param_2 * 8);
if (0 < param_2) {
puVar4 = puVar2;
do {
puVar5 = puVar4 + 1;
pvVar3 = malloc(100);
uVar1 = *param_1;
*... |
5,456 | func0 |
#include <stdio.h>
#include <assert.h>
#include <string.h>
#include <stdlib.h>
typedef struct {
char *key;
int value;
} dictionary;
typedef struct {
char *key;
dictionary dict;
} dict_of_dict;
| dict_of_dict *func0(char *l1[], char *l2[], int l3[], int size){
dict_of_dict *result = (dict_of_dict *)malloc(sizeof(dict_of_dict) * size);
for (int i = 0; i < size; i++) {
result[i].key = l1[i];
result[i].dict.key = l2[i];
result[i].dict.value = l3[i];
}
return result;
... | int main() {
char *keys1[] = {"S001", "S002", "S003", "S004"};
char *values1[] = {"Adina Park", "Leyton Marsh", "Duncan Boyle", "Saim Richards"};
int numbers1[] = {85, 98, 89, 92};
dict_of_dict *result1 = func0(keys1, values1, numbers1, 4);
char *keys2[] = {"abc", "def", "ghi", "jkl"};
... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x30,%rsp
mov %rdi,-0x18(%rbp)
mov %rsi,-0x20(%rbp)
mov %rdx,-0x28(%rbp)
mov %ecx,-0x2c(%rbp)
mov -0x2c(%rbp),%eax
movslq %eax,%rdx
mov %rdx,%rax
add %rax,%rax
add %rdx,%rax
shl $0x3,%rax
mov %rax,%rdi
callq 10d0 <malloc@plt>
mov %rax... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_18], rdi
mov [rbp+var_20], rsi
mov [rbp+var_28], rdx
mov [rbp+var_2C], ecx
mov eax, [rbp+var_2C]
movsxd rdx, eax
mov rax, rdx
add rax, rax
add rax, rdx
shl rax, 3
mov rdi, rax; size
call _malloc
mov ... | _QWORD * func0(long long a1, long long a2, long long a3, int a4)
{
int i; // [rsp+24h] [rbp-Ch]
_QWORD *v8; // [rsp+28h] [rbp-8h]
v8 = malloc(24LL * a4);
for ( i = 0; i < a4; ++i )
{
v8[3 * i] = *(_QWORD *)(8LL * i + a1);
v8[3 * i + 1] = *(_QWORD *)(8LL * i + a2);
LODWORD(v8[3 * i + 2]) = *(_DWOR... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
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 EAX,dword ptr [RBP + -0x2c]
MOVSXD RDX,EAX
MOV RAX,RDX
ADD RAX,RAX
ADD RAX,RDX
SHL RAX,0x3
MOV RDI,RAX
CALL 0x001010d0
MOV qword ptr [RBP +... | void * func0(long param_1,long param_2,long param_3,int param_4)
{
void *pvVar1;
int local_14;
pvVar1 = malloc((long)param_4 * 0x18);
for (local_14 = 0; local_14 < param_4; local_14 = local_14 + 1) {
*(int8 *)((long)local_14 * 0x18 + (long)pvVar1) =
*(int8 *)((long)local_14 * 8 + param_1);
... |
5,457 | func0 |
#include <stdio.h>
#include <assert.h>
#include <string.h>
#include <stdlib.h>
typedef struct {
char *key;
int value;
} dictionary;
typedef struct {
char *key;
dictionary dict;
} dict_of_dict;
| dict_of_dict *func0(char *l1[], char *l2[], int l3[], int size){
dict_of_dict *result = (dict_of_dict *)malloc(sizeof(dict_of_dict) * size);
for (int i = 0; i < size; i++) {
result[i].key = l1[i];
result[i].dict.key = l2[i];
result[i].dict.value = l3[i];
}
return result;
... | int main() {
char *keys1[] = {"S001", "S002", "S003", "S004"};
char *values1[] = {"Adina Park", "Leyton Marsh", "Duncan Boyle", "Saim Richards"};
int numbers1[] = {85, 98, 89, 92};
dict_of_dict *result1 = func0(keys1, values1, numbers1, 4);
char *keys2[] = {"abc", "def", "ghi", "jkl"};
... | O1 | c | func0:
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
mov %rdi,%rbx
mov %rsi,%rbp
mov %rdx,%r12
mov %ecx,%r13d
movslq %ecx,%rax
lea (%rax,%rax,2),%rdi
shl $0x3,%rdi
callq 10b0 <malloc@plt>
test %r13d,%r13d
jle 120b <func0+0x62>
mov %rax,%rcx
lea -0x1(%r13),%edi
mo... | func0:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov rbx, rdi
mov rbp, rsi
mov r12, rdx
mov r13d, ecx
movsxd rax, ecx
lea rdi, [rax+rax*2]
shl rdi, 3
call _malloc
test r13d, r13d
jle short loc_1227
mov rcx, rax
mov edi, r13d
mov edx, 0
loc_1203... | long long func0(long long a1, long long a2, long long a3, int a4)
{
long long result; // rax
long long v7; // rcx
long long v8; // rdx
result = malloc(24LL * a4);
if ( a4 > 0 )
{
v7 = result;
v8 = 0LL;
do
{
*(_QWORD *)v7 = *(_QWORD *)(a1 + 8 * v8);
*(_QWORD *)(v7 + 8) = *(_QWOR... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RBX,RDI
MOV RBP,RSI
MOV R12,RDX
MOV R13D,ECX
MOVSXD RAX,ECX
LEA RDI,[RAX + RAX*0x2]
SHL RDI,0x3
CALL 0x001010d0
TEST R13D,R13D
JLE 0x00101227
MOV RCX,RAX
MOV EDI,R13D
MOV EDX,0x0
LAB_00101203:
MOV RSI,qword ptr [RBX + RDX*0x8]
MOV qword ptr [RCX],RSI
MO... | void func0(long param_1,long param_2,long param_3,uint param_4)
{
int8 *puVar1;
ulong uVar2;
puVar1 = (int8 *)malloc((long)(int)param_4 * 0x18);
if (0 < (int)param_4) {
uVar2 = 0;
do {
*puVar1 = *(int8 *)(param_1 + uVar2 * 8);
puVar1[1] = *(int8 *)(param_2 + uVar2 * 8);
*(int4 *)(p... |
5,458 | func0 |
#include <stdio.h>
#include <assert.h>
#include <string.h>
#include <stdlib.h>
typedef struct {
char *key;
int value;
} dictionary;
typedef struct {
char *key;
dictionary dict;
} dict_of_dict;
| dict_of_dict *func0(char *l1[], char *l2[], int l3[], int size){
dict_of_dict *result = (dict_of_dict *)malloc(sizeof(dict_of_dict) * size);
for (int i = 0; i < size; i++) {
result[i].key = l1[i];
result[i].dict.key = l2[i];
result[i].dict.value = l3[i];
}
return result;
... | int main() {
char *keys1[] = {"S001", "S002", "S003", "S004"};
char *values1[] = {"Adina Park", "Leyton Marsh", "Duncan Boyle", "Saim Richards"};
int numbers1[] = {85, 98, 89, 92};
dict_of_dict *result1 = func0(keys1, values1, numbers1, 4);
char *keys2[] = {"abc", "def", "ghi", "jkl"};
... | O2 | c | func0:
endbr64
push %r13
movslq %ecx,%rax
push %r12
mov %rax,%r13
mov %rdx,%r12
push %rbp
mov %rsi,%rbp
push %rbx
mov %rdi,%rbx
lea (%rax,%rax,2),%rdi
shl $0x3,%rdi
sub $0x8,%rsp
callq 10b0 <malloc@plt>
test %r13d,%r13d
jle 1949 <func0+0x69>
mov %rax,%rdi
lea -0x1(%r13),%edx
xor... | func0:
endbr64
push r14
push r13
movsxd r13, ecx
push r12
mov r12, rdx
push rbp
mov rbp, rsi
push rbx
mov rbx, rdi
lea rdi, [r13+r13*2+0]
shl rdi, 3
call _malloc
test r13d, r13d
jle short loc_18A5
mov rcx, rax
xor edx, edx
loc_1880:
mov rsi, [rbx+rdx*8]
add ... | long long func0(long long a1, long long a2, long long a3, int a4)
{
long long v4; // r13
long long result; // rax
long long v8; // rcx
long long i; // rdx
int v10; // esi
v4 = a4;
result = malloc(24LL * a4);
if ( (int)v4 > 0 )
{
v8 = result;
for ( i = 0LL; i != v4; ++i )
{
v8 += 24... | func0:
ENDBR64
PUSH R14
PUSH R13
MOVSXD R13,ECX
PUSH R12
MOV R12,RDX
PUSH RBP
MOV RBP,RSI
PUSH RBX
MOV RBX,RDI
LEA RDI,[R13 + R13*0x2]
SHL RDI,0x3
CALL 0x001010d0
TEST R13D,R13D
JLE 0x001018a5
MOV RCX,RAX
XOR EDX,EDX
LAB_00101880:
MOV RSI,qword ptr [RBX + RDX*0x8]
ADD RCX,0x18
MOV qword ptr [RCX + -0x18],RSI
MOV RSI,qw... | void func0(long param_1,long param_2,long param_3,int param_4)
{
long lVar1;
int8 *puVar2;
long lVar3;
puVar2 = (int8 *)malloc((long)param_4 * 0x18);
if (0 < param_4) {
lVar3 = 0;
do {
*puVar2 = *(int8 *)(param_1 + lVar3 * 8);
puVar2[1] = *(int8 *)(param_2 + lVar3 * 8);
lVar1 = l... |
5,459 | func0 |
#include <stdio.h>
#include <assert.h>
#include <string.h>
#include <stdlib.h>
typedef struct {
char *key;
int value;
} dictionary;
typedef struct {
char *key;
dictionary dict;
} dict_of_dict;
| dict_of_dict *func0(char *l1[], char *l2[], int l3[], int size){
dict_of_dict *result = (dict_of_dict *)malloc(sizeof(dict_of_dict) * size);
for (int i = 0; i < size; i++) {
result[i].key = l1[i];
result[i].dict.key = l2[i];
result[i].dict.value = l3[i];
}
return result;
... | int main() {
char *keys1[] = {"S001", "S002", "S003", "S004"};
char *values1[] = {"Adina Park", "Leyton Marsh", "Duncan Boyle", "Saim Richards"};
int numbers1[] = {85, 98, 89, 92};
dict_of_dict *result1 = func0(keys1, values1, numbers1, 4);
char *keys2[] = {"abc", "def", "ghi", "jkl"};
... | O3 | c | func0:
endbr64
push %r13
movslq %ecx,%rax
mov %rdx,%r13
push %r12
mov %rax,%r12
push %rbp
mov %rdi,%rbp
lea (%rax,%rax,2),%rdi
push %rbx
shl $0x3,%rdi
mov %rsi,%rbx
sub $0x8,%rsp
callq 10b0 <malloc@plt>
test %r12d,%r12d
jle 1a1e <func0+0x14e>
lea -0x1(%r12),%edx
cmp $0x2,%edx
jb... | func0:
endbr64
push r13
movsxd rax, ecx
push r12
mov r13, rax
mov r12, rdx
push rbp
mov rbp, rdi
lea rdi, [rax+rax*2]
push rbx
shl rdi, 3; size
mov rbx, rsi
sub rsp, 8
call _malloc
mov r8, rax
test r13d, r13d
jle loc_19A6
lea eax, [r13-1]
cmp eax, 2
jbe ... | __m128 * func0(long long a1, long long a2, __int32 *a3, int a4)
{
__m128 *v7; // r8
__m128 *v8; // rax
__int32 *v9; // rcx
long long v10; // rdx
__int32 v11; // r9d
__int32 v12; // r11d
__int32 v13; // esi
__int32 v14; // r10d
__m128 v15; // xmm0
int v16; // edx
long long v17; // rsi
long long v... | func0:
ENDBR64
PUSH R13
MOVSXD RAX,ECX
PUSH R12
MOV R13,RAX
MOV R12,RDX
PUSH RBP
MOV RBP,RDI
LEA RDI,[RAX + RAX*0x2]
PUSH RBX
SHL RDI,0x3
MOV RBX,RSI
SUB RSP,0x8
CALL 0x001010d0
MOV R8,RAX
TEST R13D,R13D
JLE 0x001019a6
LEA EAX,[R13 + -0x1]
CMP EAX,0x2
JBE 0x001019b4
MOV EDI,R13D
MOV RAX,R8
MOV RCX,R12
XOR EDX,EDX
SHR E... | int8 * func0(long param_1,long param_2,int4 *param_3,uint param_4)
{
int8 *puVar1;
int8 uVar2;
int8 uVar3;
int8 uVar4;
int8 uVar5;
int4 uVar6;
int4 uVar7;
int4 uVar8;
int4 uVar9;
ulong uVar10;
int8 *puVar11;
int8 *puVar12;
long lVar13;
int4 *puVar14;
uint uVar15;
long lVar16;
uVar1... |
5,460 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int n) {
int res[n + 1];
res[0] = 0;
res[1] = 1;
int i = 2;
while (i < n + 1) {
res[i] = i;
int temp = res[i / 2] + res[i / 3] + res[i / 4] + res[i / 5];
if (temp > res[i]) res[i] = temp;
i++;
}
return res[n];
}
| int main() {
assert(func0(60) == 106);
assert(func0(10) == 12);
assert(func0(2) == 2);
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+18h] [rbp-20h]
int v7; // [rsp+1Ch] [rbp-1Ch]
long long v8; // [rsp+20h] [rbp-18h]
_DWORD *v9; // [rsp+28h] [rbp-10h]
unsigned long long v10... | 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;
int iVar2;
ulong uVar3;
int *puVar4;
long in_FS_OFFSET;
int auStack_38 [12];
int local_2c;
int local_28;
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)(par... |
5,461 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int n) {
int res[n + 1];
res[0] = 0;
res[1] = 1;
int i = 2;
while (i < n + 1) {
res[i] = i;
int temp = res[i / 2] + res[i / 3] + res[i / 4] + res[i / 5];
if (temp > res[i]) res[i] = temp;
i++;
}
return res[n];
}
| int main() {
assert(func0(60) == 106);
assert(func0(10) == 12);
assert(func0(2) == 2);
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 r9d, edi
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_11A7:
cm... | long long func0(int a1)
{
signed long long v1; // rax
void *v2; // rsp
unsigned long long v3; // rax
long long v4; // rax
int v5; // edx
_BYTE v8[3]; // [rsp+8h] [rbp-10h] BYREF
char v9; // [rsp+Bh] [rbp-Dh] BYREF
unsigned long long v10; // [rsp+10h] [rbp-8h]
v10 = __readfsqword(0x28u);
while ( v8... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV R9D,EDI
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_001011a7:
CMP RSP,RDX
JZ 0x001011be
SUB RSP,0x1000
OR qword ptr [RSP ... | int4 func0(int param_1)
{
long lVar1;
int iVar2;
ulong uVar3;
int iVar4;
int1 *puVar5;
int iVar6;
long in_FS_OFFSET;
int1 auStack_18 [8];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
uVar3 = (long)(param_1 + 1) * 4 + 0xf;
for (puVar5 = auStack_18; puVar5 != auStack_18 + -(uVar3 ... |
5,462 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int n) {
int res[n + 1];
res[0] = 0;
res[1] = 1;
int i = 2;
while (i < n + 1) {
res[i] = i;
int temp = res[i / 2] + res[i / 3] + res[i / 4] + res[i / 5];
if (temp > res[i]) res[i] = temp;
i++;
}
return res[n];
}
| int main() {
assert(func0(60) == 106);
assert(func0(10) == 12);
assert(func0(2) == 2);
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
movsxd r10, edi
lea edi, [r10+1]
mov rbp, rsp
sub rsp, 10h
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
movsxd rax, edi
mov rcx, rsp
lea rax, ds:0Fh[rax*4]
mov rdx, rax
and rax, 0FFFFFFFFFFFFF000h
sub rcx, rax
and rdx, 0FFFFFFFFFFFFFFF0h
... | long long func0(int a1)
{
long long v1; // r10
int v2; // edi
long long v3; // rdx
_QWORD *v4; // rcx
__int16 v5; // dx
signed long long v6; // rdx
void *v7; // rsp
long long v8; // rdx
int v9; // eax
_QWORD v12[511]; // [rsp+8h] [rbp-1010h] BYREF
_QWORD v13[2]; // [rsp+1008h] [rbp-10h] BYREF
... | func0:
ENDBR64
PUSH RBP
MOVSXD R10,EDI
LEA EDI,[R10 + 0x1]
MOV RBP,RSP
SUB RSP,0x10
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOVSXD RAX,EDI
MOV RCX,RSP
LEA RAX,[0xf + RAX*0x4]
MOV RDX,RAX
AND RAX,-0x1000
SUB RCX,RAX
AND RDX,-0x10
CMP RSP,RCX
JZ 0x0010126a
LAB_00101255:
SUB RSP,0x1000
OR qw... | int4 func0(int param_1)
{
long lVar1;
int1 *puVar2;
int iVar3;
int iVar4;
ulong uVar5;
int1 *puVar6;
long in_FS_OFFSET;
int1 auStack_18 [8];
long local_10;
int1 *puVar7;
puVar6 = auStack_18;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
uVar5 = (long)(int)(param_1 + 1U) * 4 + 0xf;
puVar7 = ... |
5,463 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int n) {
int res[n + 1];
res[0] = 0;
res[1] = 1;
int i = 2;
while (i < n + 1) {
res[i] = i;
int temp = res[i / 2] + res[i / 3] + res[i / 4] + res[i / 5];
if (temp > res[i]) res[i] = temp;
i++;
}
return res[n];
}
| int main() {
assert(func0(60) == 106);
assert(func0(10) == 12);
assert(func0(2) == 2);
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 r11, edi
lea r8d, [r11+1]
mov rbp, rsp
sub rsp, 10h
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
movsxd rax, r8d
mov rcx, rsp
lea rax, ds:0Fh[rax*4]
mov rdx, rax
and rax, 0FFFFFFFFFFFFF000h
sub rcx, rax
and rdx, 0FFFFFFFFFFFFFFF0h
... | long long func0(int a1)
{
int v1; // r8d
long long v2; // rdx
_QWORD *v3; // rcx
__int16 v4; // dx
signed long long v5; // rdx
void *v6; // rsp
long long v7; // rax
int v8; // edx
_QWORD v11[511]; // [rsp+8h] [rbp-1010h] BYREF
_QWORD v12[2]; // [rsp+1008h] [rbp-10h] BYREF
v1 = a1 + 1;
v12[1] =... | func0:
ENDBR64
PUSH RBP
MOVSXD R11,EDI
LEA R8D,[R11 + 0x1]
MOV RBP,RSP
SUB RSP,0x10
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOVSXD RAX,R8D
MOV RCX,RSP
LEA RAX,[0xf + RAX*0x4]
MOV RDX,RAX
AND RAX,-0x1000
SUB RCX,RAX
AND RDX,-0x10
CMP RSP,RCX
JZ 0x0010126a
LAB_00101255:
SUB RSP,0x1000
OR qw... | int4 func0(int param_1)
{
long lVar1;
int *puVar2;
int iVar3;
ulong uVar4;
int iVar5;
int *puVar6;
uint uVar8;
long in_FS_OFFSET;
int auStack_18 [8];
long local_10;
int *puVar7;
uVar8 = param_1 + 1;
puVar6 = auStack_18;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
uVar4 = (long)(int)uVar... |
5,464 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
typedef struct {
int length;
int *list;
} MaxLengthListResult;
| MaxLengthListResult func0(int **input_list, int list_size, int *sublist_sizes) {
int max_length = 0;
int *max_list = NULL;
for (int i = 0; i < list_size; i++) {
if (sublist_sizes[i] > max_length) {
max_length = sublist_sizes[i];
max_list = input_list[i];
}
... | int main() {
int list1[] = {0};
int list2[] = {1, 3};
int list3[] = {5, 7};
int list4[] = {9, 11};
int list5[] = {13, 15, 17};
int *input1[] = {list1, list2, list3, list4, list5};
int sizes1[] = {1, 2, 2, 2, 3};
MaxLengthListResult result1 = func0(input1, 5, sizes1);
a... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
mov %rdi,-0x30(%rbp)
mov %esi,-0x34(%rbp)
mov %rdx,-0x40(%rbp)
movl $0x0,-0x28(%rbp)
movq $0x0,-0x20(%rbp)
movl $0x0,-0x24(%rbp)
jmp 11e8 <func0+0x7f>
mov -0x24(%rbp),%eax
cltq
lea 0x0(,%rax,4),%rdx
mov -0x40(%rbp),%rax
add %rdx,%rax
... | func0:
endbr64
push rbp
mov rbp, rsp
push rbx
mov [rbp+var_38], rdi
mov [rbp+var_3C], esi
mov [rbp+var_48], rdx
mov [rbp+var_30], 0
mov [rbp+var_28], 0
mov [rbp+var_2C], 0
jmp short loc_11E8
loc_1195:
mov eax, [rbp+var_2C]
cdqe
lea rdx, ds:0[rax*4]
mov rax, [rbp+var_48]... | long long func0(long long a1, int a2, long long a3)
{
unsigned int v4; // [rsp+18h] [rbp-30h]
int i; // [rsp+1Ch] [rbp-2Ch]
v4 = 0;
for ( i = 0; i < a2; ++i )
{
if ( (signed int)v4 < *(_DWORD *)(4LL * i + a3) )
v4 = *(_DWORD *)(4LL * i + a3);
}
return v4;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
MOV qword ptr [RBP + -0x38],RDI
MOV dword ptr [RBP + -0x3c],ESI
MOV qword ptr [RBP + -0x48],RDX
MOV dword ptr [RBP + -0x30],0x0
MOV qword ptr [RBP + -0x28],0x0
MOV dword ptr [RBP + -0x2c],0x0
JMP 0x001011e8
LAB_00101195:
MOV EAX,dword ptr [RBP + -0x2c]
CDQE
LEA RDX,[RAX*0x4]... | int [16] func0(long param_1,int param_2,long param_3)
{
int auVar1 [16];
int4 local_38;
int4 local_34;
int8 local_30;
local_38 = 0;
local_30 = 0;
for (local_34 = 0; local_34 < param_2; local_34 = local_34 + 1) {
if ((int)local_38 < *(int *)(param_3 + (long)local_34 * 4)) {
local_38 = *(uint... |
5,465 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
typedef struct {
int length;
int *list;
} MaxLengthListResult;
| MaxLengthListResult func0(int **input_list, int list_size, int *sublist_sizes) {
int max_length = 0;
int *max_list = NULL;
for (int i = 0; i < list_size; i++) {
if (sublist_sizes[i] > max_length) {
max_length = sublist_sizes[i];
max_list = input_list[i];
}
... | int main() {
int list1[] = {0};
int list2[] = {1, 3};
int list3[] = {5, 7};
int list4[] = {9, 11};
int list5[] = {13, 15, 17};
int *input1[] = {list1, list2, list3, list4, list5};
int sizes1[] = {1, 2, 2, 2, 3};
MaxLengthListResult result1 = func0(input1, 5, sizes1);
a... | O1 | c | func0:
endbr64
test %esi,%esi
jle 11a2 <func0+0x39>
lea -0x1(%rsi),%r8d
mov $0x0,%ecx
mov $0x0,%r9d
mov $0x0,%eax
jmp 1193 <func0+0x2a>
lea 0x1(%rcx),%rsi
cmp %r8,%rcx
je 11ad <func0+0x44>
mov %rsi,%rcx
mov (%rdx,%rcx,4),%esi
cmp %eax,%esi
jle 1187 <func0+0x1e>
mov (%rdi,%rc... | func0:
endbr64
test esi, esi
jle short loc_11A0
mov esi, esi
mov ecx, 0
mov r9d, 0
mov eax, 0
jmp short loc_118E
loc_1185:
add rcx, 1
cmp rcx, rsi
jz short loc_11AB
loc_118E:
mov r8d, [rdx+rcx*4]
cmp r8d, eax
jle short loc_1185
mov r9, [rdi+rcx*8]
mov eax, r8d... | long long func0(long long a1, int a2, long long a3)
{
long long v3; // rcx
long long result; // rax
int v5; // r8d
if ( a2 <= 0 )
return 0LL;
v3 = 0LL;
result = 0LL;
do
{
v5 = *(_DWORD *)(a3 + 4 * v3);
if ( v5 > (int)result )
result = (unsigned int)v5;
++v3;
}
while ( v3 != a... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x001011a0
MOV ESI,ESI
MOV ECX,0x0
MOV R9D,0x0
MOV EAX,0x0
JMP 0x0010118e
LAB_00101185:
ADD RCX,0x1
CMP RCX,RSI
JZ 0x001011ab
LAB_0010118e:
MOV R8D,dword ptr [RDX + RCX*0x4]
CMP R8D,EAX
JLE 0x00101185
MOV R9,qword ptr [RDI + RCX*0x8]
MOV EAX,R8D
JMP 0x00101185
LAB_001011a0:
MOV R9D,0x0
M... | int1 [16] func0(long param_1,uint param_2,long param_3)
{
uint uVar1;
ulong uVar2;
ulong uVar3;
int8 uVar4;
int1 auVar5 [16];
if ((int)param_2 < 1) {
uVar4 = 0;
uVar2 = 0;
}
else {
uVar3 = 0;
uVar4 = 0;
uVar2 = 0;
do {
uVar1 = *(uint *)(param_3 + uVar3 * 4);
if (... |
5,466 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
typedef struct {
int length;
int *list;
} MaxLengthListResult;
| MaxLengthListResult func0(int **input_list, int list_size, int *sublist_sizes) {
int max_length = 0;
int *max_list = NULL;
for (int i = 0; i < list_size; i++) {
if (sublist_sizes[i] > max_length) {
max_length = sublist_sizes[i];
max_list = input_list[i];
}
... | int main() {
int list1[] = {0};
int list2[] = {1, 3};
int list3[] = {5, 7};
int list4[] = {9, 11};
int list5[] = {13, 15, 17};
int *input1[] = {list1, list2, list3, list4, list5};
int sizes1[] = {1, 2, 2, 2, 3};
MaxLengthListResult result1 = func0(input1, 5, sizes1);
a... | O2 | c | func0:
endbr64
test %esi,%esi
jle 1178 <func0+0x38>
lea -0x1(%rsi),%r8d
xor %ecx,%ecx
xor %r9d,%r9d
xor %eax,%eax
jmp 115b <func0+0x1b>
nopl (%rax)
mov %rsi,%rcx
mov (%rdx,%rcx,4),%esi
cmp %eax,%esi
jle 1168 <func0+0x28>
mov (%rdi,%rcx,8),%r9
mov %esi,%eax
lea 0x1(%rcx),%rsi
c... | func0:
endbr64
test esi, esi
jle short loc_1518
movsxd rsi, esi
xor ecx, ecx
xor r9d, r9d
xor eax, eax
nop word ptr [rax+rax+00h]
loc_14F8:
mov r8d, [rdx+rcx*4]
cmp r8d, eax
jle short loc_1508
mov r9, [rdi+rcx*8]
mov eax, r8d
loc_1508:
add rcx, 1
cmp rcx, rsi
jnz ... | long long func0(long long a1, int a2, long long a3)
{
long long v3; // rcx
long long result; // rax
int v5; // r8d
if ( a2 <= 0 )
return 0LL;
v3 = 0LL;
result = 0LL;
do
{
v5 = *(_DWORD *)(a3 + 4 * v3);
if ( v5 > (int)result )
result = (unsigned int)v5;
++v3;
}
while ( v3 != a... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x00101518
MOVSXD RSI,ESI
XOR ECX,ECX
XOR R9D,R9D
XOR EAX,EAX
NOP word ptr [RAX + RAX*0x1]
LAB_001014f8:
MOV R8D,dword ptr [RDX + RCX*0x4]
CMP R8D,EAX
JLE 0x00101508
MOV R9,qword ptr [RDI + RCX*0x8]
MOV EAX,R8D
LAB_00101508:
ADD RCX,0x1
CMP RCX,RSI
JNZ 0x001014f8
MOV RDX,R9
RET
LAB_00101... | int1 [16] func0(long param_1,int param_2,long param_3)
{
uint uVar1;
ulong uVar2;
long lVar3;
int8 uVar4;
int1 auVar5 [16];
if (0 < param_2) {
lVar3 = 0;
uVar4 = 0;
uVar2 = 0;
do {
uVar1 = *(uint *)(param_3 + lVar3 * 4);
if ((int)uVar2 < (int)uVar1) {
uVar4 = *(int8 ... |
5,467 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
typedef struct {
int length;
int *list;
} MaxLengthListResult;
| MaxLengthListResult func0(int **input_list, int list_size, int *sublist_sizes) {
int max_length = 0;
int *max_list = NULL;
for (int i = 0; i < list_size; i++) {
if (sublist_sizes[i] > max_length) {
max_length = sublist_sizes[i];
max_list = input_list[i];
}
... | int main() {
int list1[] = {0};
int list2[] = {1, 3};
int list3[] = {5, 7};
int list4[] = {9, 11};
int list5[] = {13, 15, 17};
int *input1[] = {list1, list2, list3, list4, list5};
int sizes1[] = {1, 2, 2, 2, 3};
MaxLengthListResult result1 = func0(input1, 5, sizes1);
a... | O3 | c | func0:
endbr64
test %esi,%esi
jle 1468 <func0+0x38>
lea -0x1(%rsi),%r8d
xor %ecx,%ecx
xor %r9d,%r9d
xor %eax,%eax
jmp 144b <func0+0x1b>
nopl (%rax)
mov %rsi,%rcx
mov (%rdx,%rcx,4),%esi
cmp %eax,%esi
jle 1458 <func0+0x28>
mov (%rdi,%rcx,8),%r9
mov %esi,%eax
lea 0x1(%rcx),%rsi
c... | func0:
endbr64
test esi, esi
jle short loc_1178
movsxd rsi, esi
xor ecx, ecx
xor r9d, r9d
xor eax, eax
nop word ptr [rax+rax+00h]
loc_1158:
mov r8d, [rdx+rcx*4]
cmp r8d, eax
jle short loc_1168
mov r9, [rdi+rcx*8]
mov eax, r8d
loc_1168:
add rcx, 1
cmp rsi, rcx
jnz ... | long long func0(long long a1, int a2, long long a3)
{
long long v3; // rcx
long long result; // rax
int v5; // r8d
if ( a2 <= 0 )
return 0LL;
v3 = 0LL;
result = 0LL;
do
{
v5 = *(_DWORD *)(a3 + 4 * v3);
if ( v5 > (int)result )
result = (unsigned int)v5;
++v3;
}
while ( a2 != v... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x00101178
MOVSXD RSI,ESI
XOR ECX,ECX
XOR R9D,R9D
XOR EAX,EAX
NOP word ptr [RAX + RAX*0x1]
LAB_00101158:
MOV R8D,dword ptr [RDX + RCX*0x4]
CMP R8D,EAX
JLE 0x00101168
MOV R9,qword ptr [RDI + RCX*0x8]
MOV EAX,R8D
LAB_00101168:
ADD RCX,0x1
CMP RSI,RCX
JNZ 0x00101158
MOV RDX,R9
RET
LAB_00101... | int [16] func0(long param_1,int param_2,long param_3)
{
uint uVar1;
ulong uVar2;
long lVar3;
int8 uVar4;
int auVar5 [16];
if (0 < param_2) {
lVar3 = 0;
uVar4 = 0;
uVar2 = 0;
do {
uVar1 = *(uint *)(param_3 + lVar3 * 4);
if ((int)uVar2 < (int)uVar1) {
uVar4 = *(int8 *)... |
5,468 | func0 |
#include <stdio.h>
#include <stdbool.h>
#include <assert.h>
| bool func0(int test_tup[], int size) {
bool res = true;
int temp[size];
int temp_size = 0;
for (int i = 0; i < size; i++) {
int ele = test_tup[i];
bool found = false;
for (int j = 0; j < temp_size; j++) {
if (temp[j] == ele) {
... | int main() {
int test1[] = {1, 4, 5, 6, 1, 4};
int test2[] = {1, 4, 5, 6};
int test3[] = {2, 3, 4, 5, 6};
assert(func0(test1, sizeof(test1)/sizeof(test1[0])) == false);
assert(func0(test2, sizeof(test2)/sizeof(test2[0])) == true);
assert(func0(test3, sizeof(test3)/sizeof(test3[0])) =... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x48,%rsp
mov %rdi,-0x48(%rbp)
mov %esi,-0x4c(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov %rsp,%rax
mov %rax,%rsi
movb $0x1,-0x39(%rbp)
mov -0x4c(%rbp),%eax
movslq %eax,%rdx
sub $0x1,%rdx
mov %rdx,-0x28(%r... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_38], rdi
mov [rbp+var_3C], esi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov rax, rsp
mov rsi, rax
mov [rbp+var_2A], 1
mov eax, [rbp+var_3C]
movsxd rdx, eax
sub rdx, 1
mov [rbp+var_18], rdx
cdq... | long long func0(long long a1, int a2)
{
unsigned long long v2; // rax
void *v3; // rsp
int v4; // eax
_BYTE v6[4]; // [rsp+8h] [rbp-40h] BYREF
int v7; // [rsp+Ch] [rbp-3Ch]
long long v8; // [rsp+10h] [rbp-38h]
unsigned __int8 v9; // [rsp+1Eh] [rbp-2Ah]
char v10; // [rsp+1Fh] [rbp-29h]
int v11; // [rs... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x38],RDI
MOV dword ptr [RBP + -0x3c],ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOV RAX,RSP
MOV RSI,RAX
MOV byte ptr [RBP + -0x2a],0x1
MOV EAX,dword ptr [RBP + -0x3c]
MOVSXD RDX,EAX
SUB RDX,0x1
MOV qword ptr [RBP + -... | int func0(long param_1,int param_2)
{
long lVar1;
ulong uVar2;
int *puVar3;
long in_FS_OFFSET;
int auStack_48 [4];
int local_44;
long local_40;
int local_32;
char local_31;
int local_30;
int local_2c;
int local_28;
int local_24;
long local_20;
int *local_18;
long local_10;
local_40... |
5,469 | func0 |
#include <stdio.h>
#include <stdbool.h>
#include <assert.h>
| bool func0(int test_tup[], int size) {
bool res = true;
int temp[size];
int temp_size = 0;
for (int i = 0; i < size; i++) {
int ele = test_tup[i];
bool found = false;
for (int j = 0; j < temp_size; j++) {
if (temp[j] == ele) {
... | int main() {
int test1[] = {1, 4, 5, 6, 1, 4};
int test2[] = {1, 4, 5, 6};
int test3[] = {2, 3, 4, 5, 6};
assert(func0(test1, sizeof(test1)/sizeof(test1[0])) == false);
assert(func0(test2, sizeof(test2)/sizeof(test2[0])) == true);
assert(func0(test3, sizeof(test3)/sizeof(test3[0])) =... | O1 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x10,%rsp
mov %esi,%r8d
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
movslq %esi,%rax
lea 0xf(,%rax,4),%rax
mov %rax,%rdx
and $0xfffffffffffffff0,%rdx
and $0xfffffffffffff000,%rax
mov %rsp,%rsi
sub %rax,%rsi
mov %rsi,%rax
cmp ... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 10h
mov r9d, esi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
movsxd rax, esi
lea rax, ds:0Fh[rax*4]
mov rcx, rax
and rcx, 0FFFFFFFFFFFFFFF0h
and rax, 0FFFFFFFFFFFFF000h
mov rdx, rsp
sub rdx, rax
loc_11A5:
cmp rsp... | long long func0(int *a1, int a2)
{
signed long long v3; // rax
void *v4; // rsp
long long result; // rax
int v6; // edx
_BYTE *v7; // rcx
int *v8; // rdi
int i; // esi
_DWORD *v10; // rax
_BYTE v12[4]; // [rsp+8h] [rbp-10h] BYREF
_BYTE v13[12]; // [rsp+Ch] [rbp-Ch] BYREF
*(_QWORD *)&v13[4] = __r... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV R9D,ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOVSXD RAX,ESI
LEA RAX,[0xf + RAX*0x4]
MOV RCX,RAX
AND RCX,-0x10
AND RAX,-0x1000
MOV RDX,RSP
SUB RDX,RAX
LAB_001011a5:
CMP RSP,RDX
JZ 0x001011bc
SUB RSP,0x1000
OR qword ptr [RSP + 0xff8],0... | int8 func0(int *param_1,int param_2)
{
long lVar1;
int *piVar2;
ulong uVar3;
int8 uVar4;
int *piVar5;
int iVar6;
int1 *puVar7;
int iVar8;
long in_FS_OFFSET;
int1 auStack_18 [8];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
uVar3 = (long)param_2 * 4 + 0xf;
for (puVar7 = auSta... |
5,470 | func0 |
#include <stdio.h>
#include <stdbool.h>
#include <assert.h>
| bool func0(int test_tup[], int size) {
bool res = true;
int temp[size];
int temp_size = 0;
for (int i = 0; i < size; i++) {
int ele = test_tup[i];
bool found = false;
for (int j = 0; j < temp_size; j++) {
if (temp[j] == ele) {
... | int main() {
int test1[] = {1, 4, 5, 6, 1, 4};
int test2[] = {1, 4, 5, 6};
int test3[] = {2, 3, 4, 5, 6};
assert(func0(test1, sizeof(test1)/sizeof(test1[0])) == false);
assert(func0(test2, sizeof(test2)/sizeof(test2[0])) == true);
assert(func0(test3, sizeof(test3)/sizeof(test3[0])) =... | O2 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x10,%rsp
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
movslq %esi,%rax
mov %rsp,%rcx
lea 0xf(,%rax,4),%rax
mov %rax,%rdx
and $0xfffffffffffff000,%rax
sub %rax,%rcx
and $0xfffffffffffffff0,%rdx
mov %rcx,%rax
cmp %rax,%rsp
je ... | func0:
endbr64
push rbp
mov r8d, esi
mov rbp, rsp
sub rsp, 10h
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
movsxd rax, esi
mov rcx, rsp
lea rax, ds:0Fh[rax*4]
mov rdx, rax
and rax, 0FFFFFFFFFFFFF000h
sub rcx, rax
and rdx, 0FFFFFFFFFFFFFFF0h
cmp rsp, rcx
jz ... | long long func0(int *a1, int a2)
{
long long v3; // rdx
int *v4; // rcx
__int16 v5; // dx
signed long long v6; // rdx
void *v7; // rsp
int v8; // edx
int *v9; // rsi
int v10; // edi
int *v11; // rcx
int v12; // edx
int *p_i; // rax
long long v15; // [rsp+0h] [rbp-1018h]
int i; // [rsp+8h] [rb... | func0:
ENDBR64
PUSH RBP
MOV R8D,ESI
MOV RBP,RSP
SUB RSP,0x10
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOVSXD RAX,ESI
MOV RCX,RSP
LEA RAX,[0xf + RAX*0x4]
MOV RDX,RAX
AND RAX,-0x1000
SUB RCX,RAX
AND RDX,-0x10
CMP RSP,RCX
JZ 0x001012e6
LAB_001012d1:
SUB RSP,0x1000
OR qword ptr [RSP + 0xff8],0... | int8 func0(int4 *param_1,int param_2)
{
int iVar1;
long lVar2;
int1 *puVar3;
int *piVar4;
int8 uVar5;
ulong uVar6;
int1 *puVar7;
int *piVar9;
int *piVar10;
int iVar11;
long in_FS_OFFSET;
int1 auStack_18 [8];
long local_10;
int1 *puVar8;
puVar7 = auStack_18;
local_10 = *(long *)(in_FS... |
5,471 | func0 |
#include <stdio.h>
#include <stdbool.h>
#include <assert.h>
| bool func0(int test_tup[], int size) {
bool res = true;
int temp[size];
int temp_size = 0;
for (int i = 0; i < size; i++) {
int ele = test_tup[i];
bool found = false;
for (int j = 0; j < temp_size; j++) {
if (temp[j] == ele) {
... | int main() {
int test1[] = {1, 4, 5, 6, 1, 4};
int test2[] = {1, 4, 5, 6};
int test3[] = {2, 3, 4, 5, 6};
assert(func0(test1, sizeof(test1)/sizeof(test1[0])) == false);
assert(func0(test2, sizeof(test2)/sizeof(test2[0])) == true);
assert(func0(test3, sizeof(test3)/sizeof(test3[0])) =... | O3 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x10,%rsp
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
movslq %esi,%rax
mov %rsp,%rcx
lea 0xf(,%rax,4),%rax
mov %rax,%rdx
and $0xfffffffffffff000,%rax
sub %rax,%rcx
and $0xfffffffffffffff0,%rdx
mov %rcx,%rax
cmp %rax,%rsp
je ... | func0:
endbr64
push rbp
movsxd r8, esi
mov rbp, rsp
sub rsp, 10h
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
lea rax, ds:0Fh[r8*4]
mov rcx, rsp
mov rdx, rax
and rax, 0FFFFFFFFFFFFF000h
sub rcx, rax
and rdx, 0FFFFFFFFFFFFFFF0h
cmp rsp, rcx
jz short loc_11B3
... | long long func0(long long a1, int a2)
{
long long v2; // r8
long long v3; // rdx
_BYTE *v4; // rcx
__int16 v5; // dx
signed long long v6; // rdx
void *v7; // rsp
_DWORD *v8; // rdx
long long v9; // rsi
int v10; // ecx
_DWORD *v11; // rax
_BYTE v14[4088]; // [rsp+8h] [rbp-1010h] BYREF
_QWORD v15... | func0:
ENDBR64
PUSH RBP
MOVSXD R8,ESI
MOV RBP,RSP
SUB RSP,0x10
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
LEA RAX,[0xf + R8*0x4]
MOV RCX,RSP
MOV RDX,RAX
AND RAX,-0x1000
SUB RCX,RAX
AND RDX,-0x10
CMP RSP,RCX
JZ 0x001011b3
LAB_0010119e:
SUB RSP,0x1000
OR qword ptr [RSP + 0xff8],0x0
CMP RSP,RCX... | int8 func0(long param_1,int param_2)
{
int iVar1;
long lVar2;
int *puVar3;
int *piVar4;
int8 uVar5;
ulong uVar6;
int *piVar7;
int *puVar8;
long lVar10;
long in_FS_OFFSET;
int auStack_18 [8];
long local_10;
int *puVar9;
puVar8 = auStack_18;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
u... |
5,472 | func0 |
#include <stdio.h>
#include <assert.h>
#include <string.h>
| char func0(char* str1) {
int ctr[256] = {0};
char char_order[256];
int idx = 0;
int length = strlen(str1);
for (int i = 0; i < length; i++) {
char c = str1[i];
if (ctr[c] == 0) {
char_order[idx++] = c;
}
ctr[c]++;
}
for (int i =... | int main() {
assert(func0("abcabc") == '\0');
assert(func0("abc") == 'a');
assert(func0("ababc") == 'c');
printf("All tests passed!\n");
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x540,%rsp
mov %rdi,-0x538(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
lea -0x510(%rbp),%rdx
mov $0x0,%eax
mov $0x80,%ecx
mov %rdx,%rdi
rep stos %rax,%es:(%rdi)
movl $0x0,-0x520(%rbp)
mov -0x538(%rbp),%rax
mov %rax,%rdi
ca... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 540h
mov [rbp+s], rdi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
lea rdx, [rbp+var_510]
mov eax, 0
mov ecx, 80h
mov rdi, rdx
rep stosq
mov [rbp+var_520], 0
mov rax, [rbp+s]
mov rdi, rax; s
call _strlen
mov ... | long long func0(const char *a1)
{
int v1; // eax
unsigned __int8 v3; // [rsp+1Eh] [rbp-522h]
char v4; // [rsp+1Fh] [rbp-521h]
int v5; // [rsp+20h] [rbp-520h]
int i; // [rsp+24h] [rbp-51Ch]
int j; // [rsp+28h] [rbp-518h]
int v8; // [rsp+2Ch] [rbp-514h]
_DWORD v9[322]; // [rsp+30h] [rbp-510h] BYREF
uns... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x540
MOV qword ptr [RBP + -0x538],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
LEA RDX,[RBP + -0x510]
MOV EAX,0x0
MOV ECX,0x80
MOV RDI,RDX
STOSQ.REP RDI
MOV dword ptr [RBP + -0x520],0x0
MOV RAX,qword ptr [RBP + -0x538]
MOV RDI,RAX
CALL 0x0010109... | char func0(char *param_1)
{
char cVar1;
size_t sVar2;
long lVar3;
int *piVar4;
long in_FS_OFFSET;
int local_528;
int local_524;
int local_520;
int local_518 [256];
char acStack_118 [264];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
piVar4 = local_518;
for (lVar3 = 0x80; lVa... |
5,473 | func0 |
#include <stdio.h>
#include <assert.h>
#include <string.h>
| char func0(char* str1) {
int ctr[256] = {0};
char char_order[256];
int idx = 0;
int length = strlen(str1);
for (int i = 0; i < length; i++) {
char c = str1[i];
if (ctr[c] == 0) {
char_order[idx++] = c;
}
ctr[c]++;
}
for (int i =... | int main() {
assert(func0("abcabc") == '\0');
assert(func0("abc") == 'a');
assert(func0("ababc") == 'c');
printf("All tests passed!\n");
return 0;
}
| O1 | c | func0:
endbr64
sub $0x518,%rsp
mov %rdi,%rsi
mov %fs:0x28,%rax
mov %rax,0x508(%rsp)
xor %eax,%eax
mov %rsp,%rdi
mov $0x80,%ecx
rep stos %rax,%es:(%rdi)
mov $0xffffffffffffffff,%rcx
mov %rsi,%rdi
repnz scas %es:(%rdi),%al
not %rcx
sub $0x1,%rcx
test %ecx,%ecx
jle 1265 <func0+0xdc>
m... | func0:
endbr64
push rbx
sub rsp, 510h
mov rbx, rdi
mov rax, fs:28h
mov [rsp+518h+var_10], rax
xor eax, eax
mov rdi, rsp
mov ecx, 80h
rep stosq
mov rdi, rbx
call _strlen
test eax, eax
jle loc_127C
mov rdx, rbx
lea eax, [rax-1]
lea r8, [rbx+rax+1]
mov edi, 0
jm... | long long func0(char *a1)
{
int v1; // eax
char *v2; // rdx
long long v3; // r8
int v4; // edi
int v5; // ecx
int v6; // eax
unsigned __int8 *v7; // rax
unsigned int v8; // edx
_DWORD v10[256]; // [rsp+0h] [rbp-518h] BYREF
_BYTE v11[264]; // [rsp+400h] [rbp-118h] BYREF
unsigned long long v12; // ... | func0:
ENDBR64
PUSH RBX
SUB RSP,0x510
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x508],RAX
XOR EAX,EAX
MOV RDI,RSP
MOV ECX,0x80
STOSQ.REP RDI
MOV RDI,RBX
CALL 0x00101090
TEST EAX,EAX
JLE 0x0010127c
MOV RDX,RBX
LEA EAX,[RAX + -0x1]
LEA R8,[RBX + RAX*0x1 + 0x1]
MOV EDI,0x0
JMP 0x0010120a
LAB_001011f8:
... | char func0(char *param_1)
{
int iVar1;
size_t sVar2;
char *pcVar3;
long lVar4;
char cVar5;
int iVar6;
int *piVar7;
long in_FS_OFFSET;
int aiStack_518 [256];
char local_118 [264];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
piVar7 = aiStack_518;
for (lVar4 = 0x80; lVar4 != 0... |
5,474 | func0 |
#include <stdio.h>
#include <assert.h>
#include <string.h>
| char func0(char* str1) {
int ctr[256] = {0};
char char_order[256];
int idx = 0;
int length = strlen(str1);
for (int i = 0; i < length; i++) {
char c = str1[i];
if (ctr[c] == 0) {
char_order[idx++] = c;
}
ctr[c]++;
}
for (int i =... | int main() {
assert(func0("abcabc") == '\0');
assert(func0("abc") == 'a');
assert(func0("ababc") == 'c');
printf("All tests passed!\n");
return 0;
}
| O2 | c | func0:
endbr64
push %rbx
mov $0x80,%ecx
mov %rdi,%rbx
sub $0x510,%rsp
mov %fs:0x28,%rax
mov %rax,0x508(%rsp)
xor %eax,%eax
mov %rsp,%rdi
rep stos %rax,%es:(%rdi)
mov %rbx,%rdi
callq 1090 <strlen@plt>
test %eax,%eax
jle 1330 <func0+0xd0>
sub $0x1,%eax
mov %rbx,%rdi
xor %esi,%esi
... | func0:
endbr64
push rbx
mov ecx, 80h
mov rbx, rdi
sub rsp, 510h
mov rax, fs:28h
mov [rsp+518h+var_10], rax
xor eax, eax
mov rdi, rsp
rep stosq
mov rdi, rbx
call _strlen
test eax, eax
jle loc_1330
sub eax, 1
mov rdi, rbx
xor esi, esi
lea r8, [rbx+rax+1]
nop ... | long long func0(char *a1)
{
int v1; // eax
int v2; // esi
long long v3; // r8
long long v4; // rdx
int v5; // eax
long long v6; // r9
char *v7; // rax
unsigned int v8; // r8d
_DWORD v10[256]; // [rsp+0h] [rbp-518h] BYREF
_BYTE v11[264]; // [rsp+400h] [rbp-118h] BYREF
unsigned long long v12; // [r... | func0:
ENDBR64
PUSH RBX
MOV ECX,0x80
MOV RBX,RDI
SUB RSP,0x510
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x508],RAX
XOR EAX,EAX
MOV RDI,RSP
STOSQ.REP RDI
MOV RDI,RBX
CALL 0x00101090
TEST EAX,EAX
JLE 0x00101330
SUB EAX,0x1
MOV RDI,RBX
XOR ESI,ESI
LEA R8,[RBX + RAX*0x1 + 0x1]
NOP word ptr [RAX + RAX*0x1]
LAB_00101... | ulong func0(char *param_1)
{
char cVar1;
int iVar2;
size_t sVar3;
char *pcVar4;
long lVar5;
ulong uVar6;
int iVar7;
int *piVar8;
long in_FS_OFFSET;
int aiStack_518 [256];
char local_118 [264];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
piVar8 = aiStack_518;
for (lVar5 = ... |
5,475 | func0 |
#include <stdio.h>
#include <assert.h>
#include <string.h>
| char func0(char* str1) {
int ctr[256] = {0};
char char_order[256];
int idx = 0;
int length = strlen(str1);
for (int i = 0; i < length; i++) {
char c = str1[i];
if (ctr[c] == 0) {
char_order[idx++] = c;
}
ctr[c]++;
}
for (int i =... | int main() {
assert(func0("abcabc") == '\0');
assert(func0("abc") == 'a');
assert(func0("ababc") == 'c');
printf("All tests passed!\n");
return 0;
}
| O3 | c | func0:
endbr64
push %rbx
mov $0x80,%ecx
mov %rdi,%rbx
sub $0x510,%rsp
mov %fs:0x28,%rax
mov %rax,0x508(%rsp)
xor %eax,%eax
mov %rsp,%rdi
rep stos %rax,%es:(%rdi)
mov %rbx,%rdi
callq 1090 <strlen@plt>
test %eax,%eax
jle 1348 <func0+0xe8>
sub $0x1,%eax
mov %rbx,%rdi
xor %ecx,%ecx
... | func0:
endbr64
push rbx
mov ecx, 80h
mov rbx, rdi
sub rsp, 510h
mov rax, fs:28h
mov [rsp+518h+var_10], rax
xor eax, eax
mov rdi, rsp
rep stosq
mov rdi, rbx; s
call _strlen
test eax, eax
jle loc_1340
sub eax, 1
mov rdi, rbx
xor edx, edx
lea r8, [rbx+rax+1]
nop... | long long func0(char *s)
{
int v1; // eax
long long v2; // rdx
char *v3; // r8
long long v4; // rcx
int v5; // eax
char *v6; // rax
char *v7; // rdx
unsigned int v8; // ecx
_DWORD v10[256]; // [rsp+0h] [rbp-518h] BYREF
_BYTE v11[264]; // [rsp+400h] [rbp-118h] BYREF
unsigned long long v12; // [rsp... | func0:
ENDBR64
PUSH RBX
MOV ECX,0x80
MOV RBX,RDI
SUB RSP,0x510
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x508],RAX
XOR EAX,EAX
MOV RDI,RSP
STOSQ.REP RDI
MOV RDI,RBX
CALL 0x00101090
TEST EAX,EAX
JLE 0x00101340
SUB EAX,0x1
MOV RDI,RBX
XOR EDX,EDX
LEA R8,[RBX + RAX*0x1 + 0x1]
NOP word ptr [RAX + RAX*0x1]
LAB_00101... | ulong func0(char *param_1)
{
char cVar1;
size_t sVar2;
char *pcVar3;
long lVar4;
char *pcVar5;
ulong uVar6;
int *piVar7;
long in_FS_OFFSET;
int aiStack_518 [256];
char local_118 [264];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
piVar7 = aiStack_518;
for (lVar4 = 0x80; lVar... |
5,476 | func0 |
#include <stdio.h>
#include <assert.h>
#include <regex.h>
| char* func0(const char* string) {
regex_t regex;
int reti;
char msgbuf[100];
// Compile regular expression
reti = regcomp(®ex, "^[a-z]$|^([a-z]).*\\1$", REG_EXTENDED);
if (reti) {
fprintf(stderr, "Could not compile regex\n");
return "Invalid";
}
// Execut... | int main() {
assert(func0("abba") == "Valid");
assert(func0("a") == "Valid");
assert(func0("abcd") == "Invalid");
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0xd0,%rsp
mov %rdi,-0xc8(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
lea -0xb0(%rbp),%rax
mov $0x1,%edx
lea 0xda7(%rip),%rsi
mov %rax,%rdi
callq 10f0 <regcomp@plt>
mov %eax,-0xb4(%rbp)
cmpl $0x0,-0xb4(%rbp)
je 12a4 <func... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 0D0h
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; "^[a-z]$|^([a-z]).*\\1$"
mov rsi, rcx; pattern
mov rdi, rax; preg
call _regcomp
mov [r... | const char * func0(const char *a1)
{
int errcode; // [rsp+1Ch] [rbp-B4h]
regex_t preg; // [rsp+20h] [rbp-B0h] BYREF
char errbuf[104]; // [rsp+60h] [rbp-70h] BYREF
unsigned long long v5; // [rsp+C8h] [rbp-8h]
v5 = __readfsqword(0x28u);
if ( regcomp(&preg, "^[a-z]$|^([a-z]).*\\1$", 1) )
{
fwrite("Could... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0xd0
MOV qword ptr [RBP + -0xc8],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0xb0]
MOV EDX,0x1
LEA RCX,[0x102004]
MOV RSI,RCX
MOV RDI,RAX
CALL 0x001010f0
MOV dword ptr [RBP + -0xb4],EAX
CMP dword ptr [RBP + -0xb4],0x0
JZ 0x001012... | char * func0(char *param_1)
{
int iVar1;
char *pcVar2;
long in_FS_OFFSET;
regex_t local_b8;
char local_78 [104];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
iVar1 = regcomp(&local_b8,"^[a-z]$|^([a-z]).*\\1$",1);
if (iVar1 == 0) {
iVar1 = regexec(&local_b8,param_1,0,(regmatch_t *)... |
5,477 | func0 |
#include <stdio.h>
#include <assert.h>
#include <regex.h>
| char* func0(const char* string) {
regex_t regex;
int reti;
char msgbuf[100];
// Compile regular expression
reti = regcomp(®ex, "^[a-z]$|^([a-z]).*\\1$", REG_EXTENDED);
if (reti) {
fprintf(stderr, "Could not compile regex\n");
return "Invalid";
}
// Execut... | int main() {
assert(func0("abba") == "Valid");
assert(func0("a") == "Valid");
assert(func0("abcd") == "Invalid");
return 0;
}
| O1 | c | func0:
endbr64
push %rbp
push %rbx
sub $0xb8,%rsp
mov %rdi,%rbx
mov %fs:0x28,%rax
mov %rax,0xa8(%rsp)
xor %eax,%eax
mov %rsp,%rdi
mov $0x1,%edx
lea 0xdb7(%rip),%rsi
callq 10f0 <regcomp@plt>
test %eax,%eax
jne 12fa <func0+0xd1>
mov %rsp,%rdi
mov $0x0,%r8d
mov $0x0,%ecx
mov $... | func0:
endbr64
push rbp
push rbx
sub rsp, 0B8h
mov rbx, rdi
mov rax, fs:28h
mov [rsp+0C8h+var_20], rax
xor eax, eax
mov rdi, rsp
mov edx, 1
lea rsi, aAZAZ1; "^[a-z]$|^([a-z]).*\\1$"
call _regcomp
test eax, eax
jnz loc_12FA
mov rdi, rsp
mov r8d, 0
mov ecx, 0
mo... | const char * func0(long long a1)
{
unsigned int v1; // eax
_BYTE v3[64]; // [rsp+0h] [rbp-C8h] BYREF
char v4[104]; // [rsp+40h] [rbp-88h] BYREF
unsigned long long v5; // [rsp+A8h] [rbp-20h]
v5 = __readfsqword(0x28u);
if ( (unsigned int)regcomp(v3, "^[a-z]$|^([a-z]).*\\1$", 1LL) )
{
fwrite("Could not ... | func0:
ENDBR64
PUSH RBP
PUSH RBX
SUB RSP,0xb8
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xa8],RAX
XOR EAX,EAX
MOV RDI,RSP
MOV EDX,0x1
LEA RSI,[0x102012]
CALL 0x001010f0
TEST EAX,EAX
JNZ 0x001012fa
MOV RDI,RSP
MOV R8D,0x0
MOV ECX,0x0
MOV EDX,0x0
MOV RSI,RBX
CALL 0x00101110
TEST EAX,EAX
JZ 0x00101320
C... | char * func0(char *param_1)
{
int iVar1;
char *pcVar2;
long in_FS_OFFSET;
regex_t rStack_c8;
char local_88 [104];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
iVar1 = regcomp(&rStack_c8,"^[a-z]$|^([a-z]).*\\1$",1);
if (iVar1 == 0) {
iVar1 = regexec(&rStack_c8,param_1,0,(regmatch_t... |
5,478 | func0 |
#include <stdio.h>
#include <assert.h>
#include <regex.h>
| char* func0(const char* string) {
regex_t regex;
int reti;
char msgbuf[100];
// Compile regular expression
reti = regcomp(®ex, "^[a-z]$|^([a-z]).*\\1$", REG_EXTENDED);
if (reti) {
fprintf(stderr, "Could not compile regex\n");
return "Invalid";
}
// Execut... | int main() {
assert(func0("abba") == "Valid");
assert(func0("a") == "Valid");
assert(func0("abcd") == "Invalid");
return 0;
}
| O2 | c | func0:
endbr64
push %r12
mov $0x1,%edx
mov %rdi,%r12
lea 0xd1d(%rip),%rsi
push %rbp
sub $0xb8,%rsp
mov %fs:0x28,%rax
mov %rax,0xa8(%rsp)
xor %eax,%eax
mov %rsp,%rbp
mov %rbp,%rdi
callq 10f0 <regcomp@plt>
test %eax,%eax
jne 13a8 <func0+0xc8>
mov %rbp,%rdi
xor %r8d,%r8d
xor %... | func0:
endbr64
push r12
mov edx, 1
mov r12, rdi
lea rsi, aAZAZ1; "^[a-z]$|^([a-z]).*\\1$"
push rbp
sub rsp, 0B8h
mov rax, fs:28h
mov [rsp+var_sA8], rax
xor eax, eax
mov rbp, rsp
mov rdi, rbp
call _regcomp
test eax, eax
jnz loc_13A8
mov rdi, rbp
xor r8d, r8d
xo... | const char * func0(long long a1)
{
unsigned int v1; // eax
_BYTE _0[64]; // [rsp+0h] [rbp+0h] BYREF
char vars40[104]; // [rsp+40h] [rbp+40h] BYREF
unsigned long long varsA8; // [rsp+A8h] [rbp+A8h]
varsA8 = __readfsqword(0x28u);
if ( (unsigned int)regcomp(_0, "^[a-z]$|^([a-z]).*\\1$", 1LL) )
{
fwrite(... | func0:
ENDBR64
PUSH R12
MOV EDX,0x1
MOV R12,RDI
LEA RSI,[0x102012]
PUSH RBP
SUB RSP,0xb8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xa8],RAX
XOR EAX,EAX
MOV RBP,RSP
MOV RDI,RBP
CALL 0x001010f0
TEST EAX,EAX
JNZ 0x001013a8
MOV RDI,RBP
XOR R8D,R8D
XOR ECX,ECX
XOR EDX,EDX
MOV RSI,R12
CALL 0x00101110
MOV EDI,EAX
TEST... | char * func0(char *param_1)
{
int iVar1;
char *pcVar2;
long in_FS_OFFSET;
regex_t rStack_c8;
char local_88 [104];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
iVar1 = regcomp(&rStack_c8,"^[a-z]$|^([a-z]).*\\1$",1);
if (iVar1 == 0) {
iVar1 = regexec(&rStack_c8,param_1,0,(regmatch_t... |
5,479 | func0 |
#include <stdio.h>
#include <assert.h>
#include <regex.h>
| char* func0(const char* string) {
regex_t regex;
int reti;
char msgbuf[100];
// Compile regular expression
reti = regcomp(®ex, "^[a-z]$|^([a-z]).*\\1$", REG_EXTENDED);
if (reti) {
fprintf(stderr, "Could not compile regex\n");
return "Invalid";
}
// Execut... | int main() {
assert(func0("abba") == "Valid");
assert(func0("a") == "Valid");
assert(func0("abcd") == "Invalid");
return 0;
}
| O3 | c | func0:
endbr64
push %r12
mov $0x1,%edx
mov %rdi,%r12
lea 0xd1d(%rip),%rsi
push %rbp
sub $0xb8,%rsp
mov %fs:0x28,%rax
mov %rax,0xa8(%rsp)
xor %eax,%eax
mov %rsp,%rbp
mov %rbp,%rdi
callq 10f0 <regcomp@plt>
test %eax,%eax
jne 13a8 <func0+0xc8>
mov %rbp,%rdi
xor %r8d,%r8d
xor %... | func0:
endbr64
push rbp
mov edx, 1; cflags
mov rbp, rdi
lea rsi, pattern; "^[a-z]$|^([a-z]).*\\1$"
push rbx
sub rsp, 0B8h
mov rax, fs:28h
mov [rsp+0C8h+var_20], rax
xor eax, eax
mov rbx, rsp
mov rdi, rbx; preg
call _regcomp
test eax, eax
jnz loc_13A8
xor r8d, r8d;... | const char * func0(char *string)
{
int v1; // eax
regex_t v3; // [rsp+0h] [rbp-C8h] BYREF
char errbuf[104]; // [rsp+40h] [rbp-88h] BYREF
unsigned long long v5; // [rsp+A8h] [rbp-20h]
v5 = __readfsqword(0x28u);
if ( regcomp(&v3, "^[a-z]$|^([a-z]).*\\1$", 1) )
{
fwrite("Could not compile regex\n", 1uLL... | func0:
ENDBR64
PUSH RBP
MOV EDX,0x1
MOV RBP,RDI
LEA RSI,[0x102012]
PUSH RBX
SUB RSP,0xb8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xa8],RAX
XOR EAX,EAX
MOV RBX,RSP
MOV RDI,RBX
CALL 0x001010f0
TEST EAX,EAX
JNZ 0x001013a8
XOR R8D,R8D
XOR ECX,ECX
XOR EDX,EDX
MOV RSI,RBP
MOV RDI,RBX
CALL 0x00101110
TEST EAX,EAX
JZ ... | char * func0(char *param_1)
{
int iVar1;
char *pcVar2;
long in_FS_OFFSET;
regex_t rStack_c8;
char local_88 [104];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
iVar1 = regcomp(&rStack_c8,"^[a-z]$|^([a-z]).*\\1$",1);
if (iVar1 == 0) {
iVar1 = regexec(&rStack_c8,param_1,0,(regmatch_t... |
5,480 | func0 |
#include <assert.h>
| int func0(int a, int b, int c) {
int median;
if (a > b) {
if (a < c) {
median = a;
} else if (b > c) {
median = b;
} else {
median = c;
}
} else {
if (a > c) {
median = a;
} else if (b < c) {
... | int main() {
assert(func0(25, 55, 65) == 55);
assert(func0(20, 10, 30) == 20);
assert(func0(15, 45, 75) == 45);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
mov %esi,-0x18(%rbp)
mov %edx,-0x1c(%rbp)
mov -0x14(%rbp),%eax
cmp -0x18(%rbp),%eax
jle 118a <func0+0x41>
mov -0x14(%rbp),%eax
cmp -0x1c(%rbp),%eax
jge 1172 <func0+0x29>
mov -0x14(%rbp),%eax
mov %eax,-0x4(%rbp)
jmp 11b0... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_18], esi
mov [rbp+var_1C], edx
mov eax, [rbp+var_14]
cmp eax, [rbp+var_18]
jle short loc_118A
mov eax, [rbp+var_14]
cmp eax, [rbp+var_1C]
jge short loc_1172
mov eax, [rbp+var_14]
mov [rbp+var_4], e... | long long func0(signed int a1, signed int a2, signed int a3)
{
if ( a1 <= a2 )
{
if ( a1 <= a3 )
{
if ( a2 >= a3 )
return (unsigned int)a3;
else
return (unsigned int)a2;
}
else
{
return (unsigned int)a1;
}
}
else if ( a1 >= a3 )
{
if ( a2 <= a3 )
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x18],ESI
MOV dword ptr [RBP + -0x1c],EDX
MOV EAX,dword ptr [RBP + -0x14]
CMP EAX,dword ptr [RBP + -0x18]
JLE 0x0010118a
MOV EAX,dword ptr [RBP + -0x14]
CMP EAX,dword ptr [RBP + -0x1c]
JGE 0x00101172
MOV EAX,dword ptr [RBP + -0x14... | int func0(int param_1,int param_2,int param_3)
{
int local_c;
local_c = param_1;
if (param_2 < param_1) {
if ((param_3 <= param_1) && (local_c = param_3, param_3 < param_2)) {
local_c = param_2;
}
}
else if ((param_1 <= param_3) && (local_c = param_3, param_2 < param_3)) {
local_c = para... |
5,481 | func0 |
#include <assert.h>
| int func0(int a, int b, int c) {
int median;
if (a > b) {
if (a < c) {
median = a;
} else if (b > c) {
median = b;
} else {
median = c;
}
} else {
if (a > c) {
median = a;
} else if (b < c) {
... | int main() {
assert(func0(25, 55, 65) == 55);
assert(func0(20, 10, 30) == 20);
assert(func0(15, 45, 75) == 45);
return 0;
}
| O1 | c | func0:
endbr64
mov %edi,%eax
cmp %esi,%edi
jle 113f <func0+0x16>
cmp %edx,%edi
jl 114a <func0+0x21>
cmp %edx,%esi
mov %edx,%eax
cmovge %esi,%eax
retq
cmp %edx,%edi
jg 114a <func0+0x21>
cmp %edx,%esi
mov %edx,%eax
cmovle %esi,%eax
retq
| func0:
endbr64
mov eax, edi
cmp edi, esi
jle short loc_113E
cmp esi, edx
cmovl esi, edx
cmp edi, edx
cmovge eax, esi
retn
loc_113E:
cmp esi, edx
cmovg esi, edx
cmp edi, edx
cmovle eax, esi
retn | long long func0(signed int a1, signed int a2, signed int a3)
{
long long result; // rax
result = (unsigned int)a1;
if ( a1 <= a2 )
{
if ( a2 > a3 )
a2 = a3;
if ( a1 <= a3 )
return (unsigned int)a2;
}
else
{
if ( a2 < a3 )
a2 = a3;
if ( a1 >= a3 )
return (unsigned ... | func0:
ENDBR64
MOV EAX,EDI
CMP EDI,ESI
JLE 0x0010113e
CMP ESI,EDX
CMOVL ESI,EDX
CMP EDI,EDX
CMOVGE EAX,ESI
RET
LAB_0010113e:
CMP ESI,EDX
CMOVG ESI,EDX
CMP EDI,EDX
CMOVLE EAX,ESI
RET | int func0(int param_1,int param_2,int param_3)
{
if (param_2 < param_1) {
if (param_2 < param_3) {
param_2 = param_3;
}
if (param_3 <= param_1) {
param_1 = param_2;
}
return param_1;
}
if (param_3 < param_2) {
param_2 = param_3;
}
if (param_1 <= param_3) {
param_1 = pa... |
Subsets and Splits
C++ Functions With Standard Library Dependencies
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ Standard Library Function Analysis
Filters C++ code examples that use standard library containers and types, providing useful insights into common programming patterns and data structures in the dataset.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.