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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
4,782 | func0 |
#include <stdbool.h>
#include <assert.h>
| bool func0(int* test_array, int size) {
for (int i = 1; i < size; i++) {
if (sizeof(test_array[i]) != sizeof(test_array[0])) {
return false;
}
}
return true;
}
| int main() {
int arr1[] = {5, 6, 7, 3, 5, 6};
int arr2[] = {1, 2}; // Incomplete test, as third element is a string in Python.
int arr3[] = {3, 2, 1, 4, 5};
assert(func0(arr1, sizeof(arr1) / sizeof(arr1[0])) == true);
// assert line for arr2 is omitted as C cannot handle mixed data types ... | O2 | c | func0:
endbr64
mov $0x1,%eax
retq
nopw 0x0(%rax,%rax,1)
| func0:
endbr64
mov eax, 1
retn | long long func0()
{
return 1LL;
} | func0:
ENDBR64
MOV EAX,0x1
RET | int8 func0(void)
{
return 1;
} |
4,783 | func0 |
#include <stdbool.h>
#include <assert.h>
| bool func0(int* test_array, int size) {
for (int i = 1; i < size; i++) {
if (sizeof(test_array[i]) != sizeof(test_array[0])) {
return false;
}
}
return true;
}
| int main() {
int arr1[] = {5, 6, 7, 3, 5, 6};
int arr2[] = {1, 2}; // Incomplete test, as third element is a string in Python.
int arr3[] = {3, 2, 1, 4, 5};
assert(func0(arr1, sizeof(arr1) / sizeof(arr1[0])) == true);
// assert line for arr2 is omitted as C cannot handle mixed data types ... | O3 | c | func0:
endbr64
mov $0x1,%eax
retq
nopw 0x0(%rax,%rax,1)
| func0:
endbr64
mov eax, 1
retn | long long func0()
{
return 1LL;
} | func0:
ENDBR64
MOV EAX,0x1
RET | int8 func0(void)
{
return 1;
} |
4,784 | func0 |
#include <stdbool.h>
#include <assert.h>
int binary_search(int arr[], int low, int high, int x) {
while (high >= low) {
int mid = (low + high) / 2;
if ((mid == 0 || x > arr[mid - 1]) && (arr[mid] == x)) {
return mid;
} else if (x > arr[mid]) {
low = mid + ... | bool func0(int arr[], int n, int x) {
int i = binary_search(arr, 0, n - 1, x);
if (i == -1) {
return false;
}
if ((i + n / 2) <= (n - 1) && arr[i + n / 2] == x) {
return true;
} else {
return false;
}
}
| int main() {
int arr1[] = {1, 2, 3, 3, 3, 3, 10};
assert(func0(arr1, 7, 3) == true);
int arr2[] = {1, 1, 2, 4, 4, 4, 6, 6};
assert(func0(arr2, 8, 4) == false);
int arr3[] = {1, 1, 1, 2, 2};
assert(func0(arr3, 5, 1) == true);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
mov %edx,-0x20(%rbp)
mov -0x1c(%rbp),%eax
lea -0x1(%rax),%esi
mov -0x20(%rbp),%edx
mov -0x18(%rbp),%rax
mov %edx,%ecx
mov %esi,%edx
mov $0x0,%esi
mov %rax,%rdi
callq 1169 <binary_sea... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_20], edx
mov eax, [rbp+var_1C]
lea esi, [rax-1]
mov edx, [rbp+var_20]
mov rax, [rbp+var_18]
mov ecx, edx
mov edx, esi
mov esi, 0
mov rdi, rax
call binary_s... | _BOOL8 func0(long long a1, int a2, unsigned int a3)
{
int v5; // [rsp+1Ch] [rbp-4h]
v5 = binary_search(a1, 0LL, (unsigned int)(a2 - 1), a3);
if ( v5 == -1 )
return 0LL;
return a2 > a2 / 2 + v5 && a3 == *(_DWORD *)(4LL * (a2 / 2 + v5) + a1);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0x20],EDX
MOV EAX,dword ptr [RBP + -0x1c]
LEA ESI,[RAX + -0x1]
MOV EDX,dword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,EDX
MOV EDX,ESI
MOV ESI,0x0
MOV RDI,RAX
CALL 0x001... | int8 func0(long param_1,int param_2,int param_3)
{
int iVar1;
int8 uVar2;
iVar1 = binary_search(param_1,0,param_2 + -1,param_3);
if (iVar1 == -1) {
uVar2 = 0;
}
else if ((iVar1 + param_2 / 2 < param_2) &&
(param_3 == *(int *)(param_1 + (long)(iVar1 + param_2 / 2) * 4))) {
uVar2 = 1;
... |
4,785 | func0 |
#include <stdbool.h>
#include <assert.h>
int binary_search(int arr[], int low, int high, int x) {
while (high >= low) {
int mid = (low + high) / 2;
if ((mid == 0 || x > arr[mid - 1]) && (arr[mid] == x)) {
return mid;
} else if (x > arr[mid]) {
low = mid + ... | bool func0(int arr[], int n, int x) {
int i = binary_search(arr, 0, n - 1, x);
if (i == -1) {
return false;
}
if ((i + n / 2) <= (n - 1) && arr[i + n / 2] == x) {
return true;
} else {
return false;
}
}
| int main() {
int arr1[] = {1, 2, 3, 3, 3, 3, 10};
assert(func0(arr1, 7, 3) == true);
int arr2[] = {1, 1, 2, 4, 4, 4, 6, 6};
assert(func0(arr2, 8, 4) == false);
int arr3[] = {1, 1, 1, 2, 2};
assert(func0(arr3, 5, 1) == true);
return 0;
}
| O1 | c | func0:
endbr64
push %r12
push %rbp
push %rbx
mov %rdi,%r12
mov %esi,%ebx
mov %edx,%ebp
lea -0x1(%rsi),%edx
mov %ebp,%ecx
mov $0x0,%esi
callq 1169 <binary_search>
mov $0x0,%ecx
cmp $0xffffffff,%eax
je 1203 <func0+0x42>
mov %eax,%edx
mov %ebx,%eax
shr $0x1f,%eax
add %ebx,%ea... | func0:
endbr64
push r12
push rbp
push rbx
mov r12, rdi
mov ebx, esi
mov ebp, edx
lea edx, [rsi-1]
mov ecx, ebp
mov esi, 0
call binary_search
mov edx, 0
cmp eax, 0FFFFFFFFh
jz short loc_1208
mov edx, ebx
shr edx, 1Fh
add edx, ebx
sar edx, 1
add eax, ed... | long long func0(long long a1, int a2, unsigned int a3)
{
int v4; // eax
unsigned int v5; // edx
int v6; // eax
v4 = binary_search(a1, 0LL, (unsigned int)(a2 - 1), a3);
v5 = 0;
if ( v4 != -1 )
{
v6 = a2 / 2 + v4;
v5 = 0;
if ( v6 < a2 )
LOBYTE(v5) = *(_DWORD *)(a1 + 4LL * v6) == a3;
}
... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
MOV R12,RDI
MOV EBX,ESI
MOV EBP,EDX
LEA EDX,[RSI + -0x1]
MOV ECX,EBP
MOV ESI,0x0
CALL 0x00101169
MOV EDX,0x0
CMP EAX,-0x1
JZ 0x00101208
MOV EDX,EBX
SHR EDX,0x1f
ADD EDX,EBX
SAR EDX,0x1
ADD EAX,EDX
MOV EDX,0x0
CMP EAX,EBX
JGE 0x00101208
CDQE
CMP dword ptr [R12 + RAX*0x4],EBP
SET... | bool func0(long param_1,int param_2,int param_3)
{
int iVar1;
bool bVar2;
iVar1 = binary_search(param_1,0,param_2 + -1,param_3);
bVar2 = false;
if (iVar1 != -1) {
iVar1 = iVar1 + param_2 / 2;
bVar2 = false;
if (iVar1 < param_2) {
bVar2 = *(int *)(param_1 + (long)iVar1 * 4) == param_3;
... |
4,786 | func0 |
#include <stdbool.h>
#include <assert.h>
int binary_search(int arr[], int low, int high, int x) {
while (high >= low) {
int mid = (low + high) / 2;
if ((mid == 0 || x > arr[mid - 1]) && (arr[mid] == x)) {
return mid;
} else if (x > arr[mid]) {
low = mid + ... | bool func0(int arr[], int n, int x) {
int i = binary_search(arr, 0, n - 1, x);
if (i == -1) {
return false;
}
if ((i + n / 2) <= (n - 1) && arr[i + n / 2] == x) {
return true;
} else {
return false;
}
}
| int main() {
int arr1[] = {1, 2, 3, 3, 3, 3, 10};
assert(func0(arr1, 7, 3) == true);
int arr2[] = {1, 1, 2, 4, 4, 4, 6, 6};
assert(func0(arr2, 8, 4) == false);
int arr3[] = {1, 1, 1, 2, 2};
assert(func0(arr3, 5, 1) == true);
return 0;
}
| O2 | c | func0:
endbr64
mov %esi,%r11d
mov %edx,%ecx
lea -0x1(%rsi),%edx
xor %esi,%esi
callq 12d0 <binary_search>
xor %r8d,%r8d
mov %eax,%edx
cmp $0xffffffff,%eax
je 1368 <func0+0x38>
mov %r11d,%eax
shr $0x1f,%eax
add %r11d,%eax
sar %eax
add %edx,%eax
cmp %r11d,%eax
jge 1368 <func0... | func0:
endbr64
push rbx
mov ecx, edx
mov r11d, esi
lea edx, [rsi-1]
xor esi, esi
mov rbx, rdi
call binary_search
xor r8d, r8d
cmp eax, 0FFFFFFFFh
jz short loc_136A
mov edx, r11d
shr edx, 1Fh
add edx, r11d
sar edx, 1
add eax, edx
cmp eax, r11d
jge short ... | long long func0(long long a1, int a2, unsigned int a3)
{
int v3; // eax
int v4; // ecx
int v5; // r11d
unsigned int v6; // r8d
int v7; // eax
v3 = binary_search(a1, 0LL, (unsigned int)(a2 - 1), a3);
v6 = 0;
if ( v3 != -1 )
{
v7 = v5 / 2 + v3;
if ( v7 < v5 )
LOBYTE(v6) = *(_DWORD *)(a1 ... | func0:
ENDBR64
PUSH RBX
MOV ECX,EDX
MOV R11D,ESI
LEA EDX,[RSI + -0x1]
XOR ESI,ESI
MOV RBX,RDI
CALL 0x001012d0
XOR R8D,R8D
CMP EAX,-0x1
JZ 0x0010136a
MOV EDX,R11D
SHR EDX,0x1f
ADD EDX,R11D
SAR EDX,0x1
ADD EAX,EDX
CMP EAX,R11D
JGE 0x0010136a
CDQE
CMP dword ptr [RBX + RAX*0x4],ECX
SETZ R8B
LAB_0010136a:
MOV EAX,R8D
POP RB... | bool func0(long param_1,uint param_2,int param_3)
{
int iVar1;
ulong uVar2;
bool bVar3;
uVar2 = (ulong)param_2;
iVar1 = binary_search(param_1,0,param_2 - 1,param_3);
bVar3 = false;
if ((iVar1 != -1) &&
(iVar1 = iVar1 + ((int)(((uint)(uVar2 >> 0x1f) & 1) + (int)uVar2) >> 1), iVar1 < (int)uVar2)) {... |
4,787 | func0 |
#include <stdbool.h>
#include <assert.h>
int binary_search(int arr[], int low, int high, int x) {
while (high >= low) {
int mid = (low + high) / 2;
if ((mid == 0 || x > arr[mid - 1]) && (arr[mid] == x)) {
return mid;
} else if (x > arr[mid]) {
low = mid + ... | bool func0(int arr[], int n, int x) {
int i = binary_search(arr, 0, n - 1, x);
if (i == -1) {
return false;
}
if ((i + n / 2) <= (n - 1) && arr[i + n / 2] == x) {
return true;
} else {
return false;
}
}
| int main() {
int arr1[] = {1, 2, 3, 3, 3, 3, 10};
assert(func0(arr1, 7, 3) == true);
int arr2[] = {1, 1, 2, 4, 4, 4, 6, 6};
assert(func0(arr2, 8, 4) == false);
int arr3[] = {1, 1, 1, 2, 2};
assert(func0(arr3, 5, 1) == true);
return 0;
}
| O3 | c | func0:
endbr64
mov %esi,%r8d
sub $0x1,%r8d
js 134f <func0+0x3f>
xor %r9d,%r9d
lea (%r9,%r8,1),%eax
sar %eax
mov %eax,%ecx
cltq
lea 0x0(,%rax,4),%r10
mov (%rdi,%rax,4),%eax
je 133e <func0+0x2e>
cmp -0x4(%rdi,%r10,1),%edx
jle 1342 <func0+0x32>
cmp %eax,%edx
je 1368 <func0+0x58... | func0:
endbr64
mov r8, rdi
mov r10d, esi
mov ecx, edx
sub esi, 1
js short loc_134B
xor edi, edi
nop dword ptr [rax+rax+00h]
loc_1318:
lea edx, [rdi+rsi]
mov eax, edx
shr eax, 1Fh
add eax, edx
sar eax, 1
movsxd rdx, eax
lea r9, ds:0[rdx*4]
mov edx, [r8+rdx*4]
jz ... | long long func0(long long a1, int a2, int a3)
{
int v6; // esi
int v7; // edi
int v8; // eax
long long v9; // r9
int v10; // edx
int v12; // eax
unsigned int v13; // edx
v6 = a2 - 1;
if ( v6 < 0 )
return 0LL;
v7 = 0;
while ( 1 )
{
v8 = (v7 + v6) / 2;
v9 = 4LL * v8;
v10 = *(_DWO... | func0:
ENDBR64
MOV R8,RDI
MOV R10D,ESI
MOV ECX,EDX
SUB ESI,0x1
JS 0x0010134b
XOR EDI,EDI
NOP dword ptr [RAX + RAX*0x1]
LAB_00101318:
LEA EDX,[RDI + RSI*0x1]
MOV EAX,EDX
SHR EAX,0x1f
ADD EAX,EDX
SAR EAX,0x1
MOVSXD RDX,EAX
LEA R9,[RDX*0x4]
MOV EDX,dword ptr [R8 + RDX*0x4]
JZ 0x0010133c
CMP ECX,dword ptr [R8 + R9*0x1 + -0... | bool func0(long param_1,int param_2,int param_3)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
iVar3 = param_2 + -1;
if (-1 < iVar3) {
iVar4 = 0;
do {
while( true ) {
iVar2 = (iVar4 + iVar3) / 2;
iVar1 = *(int *)(param_1 + (long)iVar2 * 4);
if (((iVar2 == 0) || (*(i... |
4,788 | func0 |
#include <assert.h>
| int func0(int n) {
int count = 0;
while (n) {
count += n & 1;
n >>= 1;
}
return count;
}
| int main() {
assert(func0(2) == 1);
assert(func0(4) == 1);
assert(func0(6) == 2);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
movl $0x0,-0x4(%rbp)
jmp 1169 <func0+0x20>
mov -0x14(%rbp),%eax
and $0x1,%eax
add %eax,-0x4(%rbp)
sarl -0x14(%rbp)
cmpl $0x0,-0x14(%rbp)
jne 115d <func0+0x14>
mov -0x4(%rbp),%eax
pop %rbp
retq
| func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_4], 0
jmp short loc_1169
loc_115D:
mov eax, [rbp+var_14]
and eax, 1
add [rbp+var_4], eax
sar [rbp+var_14], 1
loc_1169:
cmp [rbp+var_14], 0
jnz short loc_115D
mov eax, [rbp+var_4]
pop rbp
retn | long long func0(int a1)
{
unsigned int v3; // [rsp+10h] [rbp-4h]
v3 = 0;
while ( a1 )
{
v3 += a1 & 1;
a1 >>= 1;
}
return v3;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00101169
LAB_0010115d:
MOV EAX,dword ptr [RBP + -0x14]
AND EAX,0x1
ADD dword ptr [RBP + -0x4],EAX
SAR dword ptr [RBP + -0x14],0x1
LAB_00101169:
CMP dword ptr [RBP + -0x14],0x0
JNZ 0x0010115d
MOV EAX,dword ptr [RBP +... | int func0(uint param_1)
{
int4 local_1c;
int4 local_c;
local_c = 0;
for (local_1c = param_1; local_1c != 0; local_1c = (int)local_1c >> 1) {
local_c = local_c + (local_1c & 1);
}
return local_c;
} |
4,789 | func0 |
#include <assert.h>
| int func0(int n) {
int count = 0;
while (n) {
count += n & 1;
n >>= 1;
}
return count;
}
| int main() {
assert(func0(2) == 1);
assert(func0(4) == 1);
assert(func0(6) == 2);
return 0;
}
| O1 | c | func0:
endbr64
test %edi,%edi
je 1162 <func0+0x19>
mov $0x0,%eax
mov %edi,%edx
and $0x1,%edx
add %edx,%eax
sar %edi
jne 1156 <func0+0xd>
retq
mov %edi,%eax
retq
| func0:
endbr64
test edi, edi
jz short loc_1162
mov eax, 0
loc_1156:
mov edx, edi
and edx, 1
add eax, edx
sar edi, 1
jnz short loc_1156
retn
loc_1162:
mov eax, edi
retn | long long func0(int a1)
{
long long result; // rax
if ( !a1 )
return 0LL;
LODWORD(result) = 0;
do
{
result = (a1 & 1) + (unsigned int)result;
a1 >>= 1;
}
while ( a1 );
return result;
} | func0:
ENDBR64
TEST EDI,EDI
JZ 0x00101162
MOV EAX,0x0
LAB_00101156:
MOV EDX,EDI
AND EDX,0x1
ADD EAX,EDX
SAR EDI,0x1
JNZ 0x00101156
RET
LAB_00101162:
MOV EAX,EDI
RET | int func0(uint param_1)
{
int iVar1;
if (param_1 != 0) {
iVar1 = 0;
do {
iVar1 = iVar1 + (param_1 & 1);
param_1 = (int)param_1 >> 1;
} while (param_1 != 0);
return iVar1;
}
return 0;
} |
4,790 | func0 |
#include <assert.h>
| int func0(int n) {
int count = 0;
while (n) {
count += n & 1;
n >>= 1;
}
return count;
}
| int main() {
assert(func0(2) == 1);
assert(func0(4) == 1);
assert(func0(6) == 2);
return 0;
}
| O2 | c | func0:
endbr64
xor %eax,%eax
test %edi,%edi
je 1160 <func0+0x20>
nopw 0x0(%rax,%rax,1)
mov %edi,%edx
and $0x1,%edx
add %edx,%eax
sar %edi
jne 1150 <func0+0x10>
retq
nopl 0x0(%rax)
retq
nopw %cs:0x0(%rax,%rax,1)
nopl 0x0(%rax,%rax,1)
| func0:
endbr64
xor eax, eax
test edi, edi
jz short locret_1160
nop word ptr [rax+rax+00h]
loc_1150:
mov edx, edi
and edx, 1
add eax, edx
sar edi, 1
jnz short loc_1150
retn
locret_1160:
retn | long long func0(int a1)
{
long long result; // rax
for ( result = 0LL; a1; a1 >>= 1 )
result = (a1 & 1) + (unsigned int)result;
return result;
} | func0:
ENDBR64
XOR EAX,EAX
TEST EDI,EDI
JZ 0x00101160
NOP word ptr [RAX + RAX*0x1]
LAB_00101150:
MOV EDX,EDI
AND EDX,0x1
ADD EAX,EDX
SAR EDI,0x1
JNZ 0x00101150
RET
LAB_00101160:
RET | int func0(uint param_1)
{
int iVar1;
iVar1 = 0;
if (param_1 == 0) {
return 0;
}
do {
iVar1 = iVar1 + (param_1 & 1);
param_1 = (int)param_1 >> 1;
} while (param_1 != 0);
return iVar1;
} |
4,791 | func0 |
#include <assert.h>
| int func0(int n) {
int count = 0;
while (n) {
count += n & 1;
n >>= 1;
}
return count;
}
| int main() {
assert(func0(2) == 1);
assert(func0(4) == 1);
assert(func0(6) == 2);
return 0;
}
| O3 | c | func0:
endbr64
xor %eax,%eax
test %edi,%edi
je 1160 <func0+0x20>
nopw 0x0(%rax,%rax,1)
mov %edi,%edx
and $0x1,%edx
add %edx,%eax
sar %edi
jne 1150 <func0+0x10>
retq
nopl 0x0(%rax)
retq
nopw %cs:0x0(%rax,%rax,1)
nopl 0x0(%rax,%rax,1)
| func0:
endbr64
xor eax, eax
test edi, edi
jz short locret_1160
nop word ptr [rax+rax+00h]
loc_1150:
mov edx, edi
and edx, 1
add eax, edx
sar edi, 1
jnz short loc_1150
retn
locret_1160:
retn | long long func0(int a1)
{
long long result; // rax
for ( result = 0LL; a1; a1 >>= 1 )
result = (a1 & 1) + (unsigned int)result;
return result;
} | func0:
ENDBR64
XOR EAX,EAX
TEST EDI,EDI
JZ 0x00101160
NOP word ptr [RAX + RAX*0x1]
LAB_00101150:
MOV EDX,EDI
AND EDX,0x1
ADD EAX,EDX
SAR EDI,0x1
JNZ 0x00101150
RET
LAB_00101160:
RET | int func0(uint param_1)
{
int iVar1;
iVar1 = 0;
if (param_1 == 0) {
return 0;
}
do {
iVar1 = iVar1 + (param_1 & 1);
param_1 = (int)param_1 >> 1;
} while (param_1 != 0);
return iVar1;
} |
4,792 | func0 |
#include <assert.h>
| int func0(int arr[], int low, int high) {
while (low < high) {
int mid = low + (high - low) / 2;
if (arr[mid] == arr[high]) {
high -= 1;
} else if (arr[mid] > arr[high]) {
low = mid + 1;
} else {
high = mid;
}
}
return ar... | int main() {
int arr1[] = {1, 2, 3, 4, 5};
int arr2[] = {4, 6, 8};
int arr3[] = {2, 3, 5, 7, 9};
assert(func0(arr1, 0, 4) == 1);
assert(func0(arr2, 0, 2) == 4);
assert(func0(arr3, 0, 4) == 2);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
mov %edx,-0x20(%rbp)
jmpq 1210 <func0+0xa7>
mov -0x20(%rbp),%eax
sub -0x1c(%rbp),%eax
mov %eax,%edx
shr $0x1f,%edx
add %edx,%eax
sar %eax
mov %eax,%edx
mov -0x1c(%rbp),%eax
add %edx,%eax
mov %e... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_20], edx
jmp loc_1210
loc_1180:
mov eax, [rbp+var_20]
sub eax, [rbp+var_1C]
mov edx, eax
shr edx, 1Fh
add eax, edx
sar eax, 1
mov edx, eax
mov eax, [rbp+var_1C]
add ea... | long long func0(long long a1, int a2, int a3)
{
int v6; // [rsp+1Ch] [rbp-4h]
while ( a2 < a3 )
{
v6 = (a3 - a2) / 2 + a2;
if ( *(_DWORD *)(4LL * v6 + a1) == *(_DWORD *)(4LL * a3 + a1) )
{
--a3;
}
else if ( *(_DWORD *)(4LL * v6 + a1) <= *(_DWORD *)(4LL * a3 + a1) )
{
a3 = (a3... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0x20],EDX
JMP 0x00101210
LAB_00101180:
MOV EAX,dword ptr [RBP + -0x20]
SUB EAX,dword ptr [RBP + -0x1c]
MOV EDX,EAX
SHR EDX,0x1f
ADD EAX,EDX
SAR EAX,0x1
MOV EDX,EAX
MOV EAX,dword ptr [RBP + -0x1c]
AD... | int4 func0(long param_1,int param_2,int param_3)
{
int iVar1;
int local_28;
int local_24;
iVar1 = param_3;
local_24 = param_2;
while (local_28 = iVar1, local_24 < local_28) {
iVar1 = local_24 + (local_28 - local_24) / 2;
if (*(int *)(param_1 + (long)iVar1 * 4) == *(int *)(param_1 + (long)local_2... |
4,793 | func0 |
#include <assert.h>
| int func0(int arr[], int low, int high) {
while (low < high) {
int mid = low + (high - low) / 2;
if (arr[mid] == arr[high]) {
high -= 1;
} else if (arr[mid] > arr[high]) {
low = mid + 1;
} else {
high = mid;
}
}
return ar... | int main() {
int arr1[] = {1, 2, 3, 4, 5};
int arr2[] = {4, 6, 8};
int arr3[] = {2, 3, 5, 7, 9};
assert(func0(arr1, 0, 4) == 1);
assert(func0(arr2, 0, 2) == 4);
assert(func0(arr3, 0, 4) == 2);
return 0;
}
| O1 | c | func0:
endbr64
cmp %edx,%esi
jl 117f <func0+0x16>
movslq %edx,%rdx
mov (%rdi,%rdx,4),%eax
retq
sub $0x1,%edx
cmp %edx,%esi
jge 1171 <func0+0x8>
mov %edx,%ecx
sub %esi,%ecx
mov %ecx,%eax
shr $0x1f,%eax
add %ecx,%eax
sar %eax
add %esi,%eax
movslq %eax,%rcx
mov (%rdi,%rcx,4),%r8d... | func0:
endbr64
mov r8, rdi
cmp esi, edx
jl short loc_1183
loc_1174:
movsxd rdx, edx
mov eax, [r8+rdx*4]
retn
loc_117C:
sub edx, 1
loc_117F:
cmp esi, edx
jge short loc_1174
loc_1183:
mov ecx, edx
sub ecx, esi
mov eax, ecx
shr eax, 1Fh
add eax, ecx
sar eax, 1
add ... | long long func0(long long a1, int a2, int a3)
{
int v5; // eax
int v6; // edi
int v7; // ecx
while ( a2 < a3 )
{
v5 = a2 + (a3 - a2) / 2;
v6 = *(_DWORD *)(a1 + 4LL * v5);
v7 = *(_DWORD *)(a1 + 4LL * a3);
if ( v6 == v7 )
{
--a3;
}
else if ( v6 <= v7 )
{
a3 = a2 + (... | func0:
ENDBR64
MOV R8,RDI
CMP ESI,EDX
JL 0x00101183
LAB_00101174:
MOVSXD RDX,EDX
MOV EAX,dword ptr [R8 + RDX*0x4]
RET
LAB_0010117c:
SUB EDX,0x1
LAB_0010117f:
CMP ESI,EDX
JGE 0x00101174
LAB_00101183:
MOV ECX,EDX
SUB ECX,ESI
MOV EAX,ECX
SHR EAX,0x1f
ADD EAX,ECX
SAR EAX,0x1
ADD EAX,ESI
MOVSXD RCX,EAX
MOV EDI,dword ptr [R8... | int4 func0(long param_1,int param_2,int param_3)
{
int iVar1;
int iVar2;
int iVar3;
if (param_2 < param_3) {
do {
iVar3 = (param_3 - param_2) / 2 + param_2;
iVar1 = *(int *)(param_1 + (long)iVar3 * 4);
iVar2 = *(int *)(param_1 + (long)param_3 * 4);
if (iVar1 == iVar2) {
i... |
4,794 | func0 |
#include <assert.h>
| int func0(int arr[], int low, int high) {
while (low < high) {
int mid = low + (high - low) / 2;
if (arr[mid] == arr[high]) {
high -= 1;
} else if (arr[mid] > arr[high]) {
low = mid + 1;
} else {
high = mid;
}
}
return ar... | int main() {
int arr1[] = {1, 2, 3, 4, 5};
int arr2[] = {4, 6, 8};
int arr3[] = {2, 3, 5, 7, 9};
assert(func0(arr1, 0, 4) == 1);
assert(func0(arr2, 0, 2) == 4);
assert(func0(arr3, 0, 4) == 2);
return 0;
}
| O2 | c | func0:
endbr64
movslq %edx,%rax
mov (%rdi,%rax,4),%r8d
cmp %edx,%esi
jl 12d1 <func0+0x21>
jmp 12f2 <func0+0x42>
nopl 0x0(%rax)
jle 1300 <func0+0x50>
lea 0x1(%rax),%esi
cmp %esi,%edx
jle 12f2 <func0+0x42>
mov %edx,%eax
sub %esi,%eax
sar %eax
add %esi,%eax
movslq %eax,%rcx
mov (%... | func0:
endbr64
movsxd rax, edx
mov r8d, [rdi+rax*4]
cmp esi, edx
jl short loc_12D1
jmp short loc_12F2
loc_12C8:
jle short loc_1300
lea esi, [rax+1]
loc_12CD:
cmp edx, esi
jle short loc_12F2
loc_12D1:
mov eax, edx
sub eax, esi
sar eax, 1
add eax, esi
movsxd rcx, eax
mov... | long long func0(long long a1, int a2, int a3)
{
unsigned int v3; // r8d
int v4; // eax
int v5; // ecx
v3 = *(_DWORD *)(a1 + 4LL * a3);
while ( a3 > a2 )
{
while ( 1 )
{
v4 = a2 + ((a3 - a2) >> 1);
v5 = *(_DWORD *)(a1 + 4LL * v4);
if ( v5 != v3 )
break;
v3 = *(_DWORD... | func0:
ENDBR64
MOVSXD RAX,EDX
MOV R8D,dword ptr [RDI + RAX*0x4]
CMP ESI,EDX
JL 0x001012d1
JMP 0x001012f2
LAB_001012c8:
JLE 0x00101300
LEA ESI,[RAX + 0x1]
LAB_001012cd:
CMP EDX,ESI
JLE 0x001012f2
LAB_001012d1:
MOV EAX,EDX
SUB EAX,ESI
SAR EAX,0x1
ADD EAX,ESI
MOVSXD RCX,EAX
MOV ECX,dword ptr [RDI + RCX*0x4]
CMP ECX,R8D
JN... | int func0(long param_1,int param_2,int param_3)
{
int iVar1;
int iVar2;
int iVar3;
iVar3 = *(int *)(param_1 + (long)param_3 * 4);
if (param_2 < param_3) {
do {
while( true ) {
iVar2 = (param_3 - param_2 >> 1) + param_2;
iVar1 = *(int *)(param_1 + (long)iVar2 * 4);
if (iVa... |
4,795 | func0 |
#include <assert.h>
| int func0(int arr[], int low, int high) {
while (low < high) {
int mid = low + (high - low) / 2;
if (arr[mid] == arr[high]) {
high -= 1;
} else if (arr[mid] > arr[high]) {
low = mid + 1;
} else {
high = mid;
}
}
return ar... | int main() {
int arr1[] = {1, 2, 3, 4, 5};
int arr2[] = {4, 6, 8};
int arr3[] = {2, 3, 5, 7, 9};
assert(func0(arr1, 0, 4) == 1);
assert(func0(arr2, 0, 2) == 4);
assert(func0(arr3, 0, 4) == 2);
return 0;
}
| O3 | c | func0:
endbr64
movslq %edx,%rax
mov (%rdi,%rax,4),%r8d
cmp %edx,%esi
jl 12b1 <func0+0x21>
jmp 12d2 <func0+0x42>
nopl 0x0(%rax)
jle 12e0 <func0+0x50>
lea 0x1(%rax),%esi
cmp %esi,%edx
jle 12d2 <func0+0x42>
mov %edx,%eax
sub %esi,%eax
sar %eax
add %esi,%eax
movslq %eax,%rcx
mov (%... | func0:
endbr64
movsxd rax, edx
mov r8d, [rdi+rax*4]
cmp esi, edx
jl short loc_12A1
jmp short loc_12C2
loc_1298:
jle short loc_12D0
lea esi, [rax+1]
loc_129D:
cmp edx, esi
jle short loc_12C2
loc_12A1:
mov eax, edx
sub eax, esi
sar eax, 1
add eax, esi
movsxd rcx, eax
mov... | long long func0(long long a1, int a2, int a3)
{
unsigned int v3; // r8d
int v4; // eax
int v5; // ecx
v3 = *(_DWORD *)(a1 + 4LL * a3);
while ( a3 > a2 )
{
while ( 1 )
{
v4 = a2 + ((a3 - a2) >> 1);
v5 = *(_DWORD *)(a1 + 4LL * v4);
if ( v5 != v3 )
break;
v3 = *(_DWORD... | func0:
ENDBR64
MOVSXD RAX,EDX
MOV R8D,dword ptr [RDI + RAX*0x4]
CMP ESI,EDX
JL 0x001012a1
JMP 0x001012c2
LAB_00101298:
JLE 0x001012d0
LEA ESI,[RAX + 0x1]
LAB_0010129d:
CMP EDX,ESI
JLE 0x001012c2
LAB_001012a1:
MOV EAX,EDX
SUB EAX,ESI
SAR EAX,0x1
ADD EAX,ESI
MOVSXD RCX,EAX
MOV ECX,dword ptr [RDI + RCX*0x4]
CMP ECX,R8D
JN... | int func0(long param_1,int param_2,int param_3)
{
int iVar1;
int iVar2;
int iVar3;
iVar3 = *(int *)(param_1 + (long)param_3 * 4);
if (param_2 < param_3) {
do {
while( true ) {
iVar2 = (param_3 - param_2 >> 1) + param_2;
iVar1 = *(int *)(param_1 + (long)iVar2 * 4);
if (iVa... |
4,796 | func0 |
#include <stdio.h>
#include <assert.h>
#include <string.h>
| char* func0(char* str) {
static char result[100];
int j = 0;
for(int i = 0; i < strlen(str); i++) {
if(i % 2 == 0) {
result[j++] = str[i];
}
}
result[j] = '\0';
return result;
}
| int main() {
assert(strcmp(func0("abcdef"), "ace") == 0);
assert(strcmp(func0("python"), "pto") == 0);
assert(strcmp(func0("data"), "dt") == 0);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x28,%rsp
mov %rdi,-0x28(%rbp)
movl $0x0,-0x18(%rbp)
movl $0x0,-0x14(%rbp)
jmp 11de <func0+0x55>
mov -0x14(%rbp),%eax
and $0x1,%eax
test %eax,%eax
jne 11da <func0+0x51>
mov -0x14(%rbp),%eax
movslq %eax,%rdx
mov -0x28(%rbp),%rax
l... | func0:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 28h
mov [rbp+s], rdi
mov [rbp+var_18], 0
mov [rbp+var_14], 0
jmp short loc_11DE
loc_11AA:
mov eax, [rbp+var_14]
and eax, 1
test eax, eax
jnz short loc_11DA
mov eax, [rbp+var_14]
movsxd rdx, eax
mov rax, [rbp+s]
... | _BYTE * func0(const char *a1)
{
int v1; // eax
int v3; // [rsp+18h] [rbp-18h]
int i; // [rsp+1Ch] [rbp-14h]
v3 = 0;
for ( i = 0; i < strlen(a1); ++i )
{
if ( (i & 1) == 0 )
{
v1 = v3++;
result_1[v1] = a1[i];
}
}
result_1[v3] = 0;
return result_1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x28],RDI
MOV dword ptr [RBP + -0x18],0x0
MOV dword ptr [RBP + -0x14],0x0
JMP 0x001011de
LAB_001011aa:
MOV EAX,dword ptr [RBP + -0x14]
AND EAX,0x1
TEST EAX,EAX
JNZ 0x001011da
MOV EAX,dword ptr [RBP + -0x14]
MOVSXD RDX,EAX
MOV RAX,qword ptr ... | int1 * func0(char *param_1)
{
size_t sVar1;
int local_20;
uint local_1c;
local_20 = 0;
local_1c = 0;
while( true ) {
sVar1 = strlen(param_1);
if (sVar1 <= (ulong)(long)(int)local_1c) break;
if ((local_1c & 1) == 0) {
result_1[local_20] = param_1[(int)local_1c];
local_20 = local_2... |
4,797 | func0 |
#include <stdio.h>
#include <assert.h>
#include <string.h>
| char* func0(char* str) {
static char result[100];
int j = 0;
for(int i = 0; i < strlen(str); i++) {
if(i % 2 == 0) {
result[j++] = str[i];
}
}
result[j] = '\0';
return result;
}
| int main() {
assert(strcmp(func0("abcdef"), "ace") == 0);
assert(strcmp(func0("python"), "pto") == 0);
assert(strcmp(func0("data"), "dt") == 0);
return 0;
}
| O1 | c | func0:
endbr64
mov %rdi,%r8
mov $0x0,%edx
mov $0x0,%esi
mov $0xffffffffffffffff,%r9
mov $0x0,%eax
lea 0x2ed3(%rip),%r10
jmp 1173 <func0+0x2a>
add $0x1,%rdx
mov %r9,%rcx
mov %r8,%rdi
repnz scas %es:(%rdi),%al
not %rcx
sub $0x1,%rcx
cmp %rdx,%rcx
jbe 119d <func0+0x54>
test $0x1... | func0:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov r12, rdi
mov ebx, 0
mov ebp, 0
lea r13, result_1
jmp short loc_11B1
loc_11AD:
add rbx, 1
loc_11B1:
mov rdi, r12
call _strlen
cmp rax, rbx
jbe short loc_11D5
test bl, 1
jnz short loc_11AD
movzx... | _BYTE * func0(long long a1)
{
unsigned long long v1; // rbx
int v2; // ebp
_BYTE *result; // rax
v1 = 0LL;
v2 = 0;
while ( strlen(a1) > v1 )
{
if ( (v1 & 1) == 0 )
result_1[v2++] = *(_BYTE *)(a1 + v1);
++v1;
}
result = result_1;
result_1[v2] = 0;
return result;
} | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV R12,RDI
MOV EBX,0x0
MOV EBP,0x0
LEA R13,[0x104040]
JMP 0x001011b1
LAB_001011ad:
ADD RBX,0x1
LAB_001011b1:
MOV RDI,R12
CALL 0x00101070
CMP RAX,RBX
JBE 0x001011d5
TEST BL,0x1
JNZ 0x001011ad
MOVZX EDX,byte ptr [R12 + RBX*0x1]
MOVSXD RAX,EBP
MOV byte ptr [R... | void func0(char *param_1)
{
size_t sVar1;
ulong uVar2;
int iVar3;
uVar2 = 0;
iVar3 = 0;
while( true ) {
sVar1 = strlen(param_1);
if (sVar1 <= uVar2) break;
if ((uVar2 & 1) == 0) {
(&result_1)[iVar3] = param_1[uVar2];
iVar3 = iVar3 + 1;
}
uVar2 = uVar2 + 1;
}
(&result_... |
4,798 | func0 |
#include <stdio.h>
#include <assert.h>
#include <string.h>
| char* func0(char* str) {
static char result[100];
int j = 0;
for(int i = 0; i < strlen(str); i++) {
if(i % 2 == 0) {
result[j++] = str[i];
}
}
result[j] = '\0';
return result;
}
| int main() {
assert(strcmp(func0("abcdef"), "ace") == 0);
assert(strcmp(func0("python"), "pto") == 0);
assert(strcmp(func0("data"), "dt") == 0);
return 0;
}
| O2 | c | func0:
endbr64
push %r13
mov %rdi,%r13
push %r12
push %rbp
lea 0x2ddd(%rip),%rbp
push %rbx
xor %ebx,%ebx
sub $0x8,%rsp
callq 1060 <strlen@plt>
xor %edx,%edx
jmp 129a <func0+0x4a>
nopl 0x0(%rax,%rax,1)
test $0x1,%bl
jne 1296 <func0+0x46>
movzbl 0x0(%r13,%rbx,1),%eax
lea 0x1(%rdx),%r1... | func0:
endbr64
push r13
lea r13, result_1
push r12
mov r12, rdi
push rbp
xor ebp, ebp
push rbx
xor ebx, ebx
sub rsp, 8
jmp short loc_1299
loc_1280:
test bl, 1
jnz short loc_1295
movzx edx, byte ptr [r12+rbx]
movsxd rax, ebp
add ebp, 1
mov [r13+rax+0], dl
loc_1295:
a... | _BYTE * func0(long long a1)
{
int v1; // ebp
unsigned long long i; // rbx
long long v3; // rax
_BYTE *result; // rax
v1 = 0;
for ( i = 0LL; strlen(a1) > i; ++i )
{
if ( (i & 1) == 0 )
{
v3 = v1++;
result_1[v3] = *(_BYTE *)(a1 + i);
}
}
result = result_1;
result_1[v1] = 0;
... | func0:
ENDBR64
PUSH R13
LEA R13,[0x104040]
PUSH R12
MOV R12,RDI
PUSH RBP
XOR EBP,EBP
PUSH RBX
XOR EBX,EBX
SUB RSP,0x8
JMP 0x00101299
LAB_00101280:
TEST BL,0x1
JNZ 0x00101295
MOVZX EDX,byte ptr [R12 + RBX*0x1]
MOVSXD RAX,EBP
ADD EBP,0x1
MOV byte ptr [R13 + RAX*0x1],DL
LAB_00101295:
ADD RBX,0x1
LAB_00101299:
MOV RDI,R12
... | int1 * func0(char *param_1)
{
long lVar1;
size_t sVar2;
ulong uVar3;
int iVar4;
iVar4 = 0;
uVar3 = 0;
while( true ) {
sVar2 = strlen(param_1);
if (sVar2 <= uVar3) break;
if ((uVar3 & 1) == 0) {
lVar1 = (long)iVar4;
iVar4 = iVar4 + 1;
(&result_1)[lVar1] = param_1[uVar3];
... |
4,799 | func0 |
#include <stdio.h>
#include <assert.h>
#include <string.h>
| char* func0(char* str) {
static char result[100];
int j = 0;
for(int i = 0; i < strlen(str); i++) {
if(i % 2 == 0) {
result[j++] = str[i];
}
}
result[j] = '\0';
return result;
}
| int main() {
assert(strcmp(func0("abcdef"), "ace") == 0);
assert(strcmp(func0("python"), "pto") == 0);
assert(strcmp(func0("data"), "dt") == 0);
return 0;
}
| O3 | c | func0:
endbr64
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x8,%rsp
callq 1060 <strlen@plt>
test %rax,%rax
je 12d8 <func0+0x88>
xor %edx,%edx
xor %ebx,%ebx
lea 0x2dca(%rip),%rbp
nopw %cs:0x0(%rax,%rax,1)
test $0x1,%bl
jne 12ab <func0+0x5b>
movzbl (%r12,%rbx,1),%eax
mo... | func0:
endbr64
push r13
lea r13, result_1
push r12
mov r12, rdi
push rbp
xor ebp, ebp
push rbx
xor ebx, ebx
sub rsp, 8
jmp short loc_1299
loc_1280:
test bl, 1
jnz short loc_1295
movzx edx, byte ptr [r12+rbx]
movsxd rax, ebp
add ebp, 1
mov [r13+rax+0], dl
loc_1295:
a... | _BYTE * func0(char *s)
{
int v1; // ebp
size_t i; // rbx
long long v3; // rax
_BYTE *result; // rax
v1 = 0;
for ( i = 0LL; i < strlen(s); ++i )
{
if ( (i & 1) == 0 )
{
v3 = v1++;
result_1[v3] = s[i];
}
}
result = result_1;
result_1[v1] = 0;
return result;
} | func0:
ENDBR64
PUSH R13
LEA R13,[0x104040]
PUSH R12
MOV R12,RDI
PUSH RBP
XOR EBP,EBP
PUSH RBX
XOR EBX,EBX
SUB RSP,0x8
JMP 0x00101299
LAB_00101280:
TEST BL,0x1
JNZ 0x00101295
MOVZX EDX,byte ptr [R12 + RBX*0x1]
MOVSXD RAX,EBP
ADD EBP,0x1
MOV byte ptr [R13 + RAX*0x1],DL
LAB_00101295:
ADD RBX,0x1
LAB_00101299:
MOV RDI,R12
... | int1 * func0(char *param_1)
{
long lVar1;
size_t sVar2;
ulong uVar3;
int iVar4;
iVar4 = 0;
uVar3 = 0;
while( true ) {
sVar2 = strlen(param_1);
if (sVar2 <= uVar3) break;
if ((uVar3 & 1) == 0) {
lVar1 = (long)iVar4;
iVar4 = iVar4 + 1;
(&result_1)[lVar1] = param_1[uVar3];
... |
4,800 | func0 |
#include <assert.h>
| int func0(int a, int b, int c) {
int smallest;
if (a <= b && a <= c) {
smallest = a;
} else if (b <= a && b <= c) {
smallest = b;
} else {
smallest = c;
}
return smallest;
}
| int main() {
assert(func0(10, 20, 0) == 0);
assert(func0(19, 15, 18) == 15);
assert(func0(-10, -20, -30) == -30);
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
jg 1172 <func0+0x29>
mov -0x14(%rbp),%eax
cmp -0x1c(%rbp),%eax
jg 1172 <func0+0x29>
mov -0x14(%rbp),%eax
mov %eax,-0x4(%rbp)
jmp 1190... | 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]
jg short loc_1172
mov eax, [rbp+var_14]
cmp eax, [rbp+var_1C]
jg 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 || a1 > a3 )
{
if ( a2 > a1 || a2 > a3 )
return (unsigned int)a3;
else
return (unsigned int)a2;
}
else
{
return (unsigned int)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]
CMP EAX,dword ptr [RBP + -0x18]
JG 0x00101172
MOV EAX,dword ptr [RBP + -0x14]
CMP EAX,dword ptr [RBP + -0x1c]
JG 0x00101172
MOV EAX,dword ptr [RBP + -0x14]
... | int func0(int param_1,int param_2,int param_3)
{
int local_c;
if ((((param_2 < param_1) || (local_c = param_1, param_3 < param_1)) &&
(local_c = param_3, param_2 <= param_1)) && (param_2 <= param_3)) {
local_c = param_2;
}
return local_c;
} |
4,801 | func0 |
#include <assert.h>
| int func0(int a, int b, int c) {
int smallest;
if (a <= b && a <= c) {
smallest = a;
} else if (b <= a && b <= c) {
smallest = b;
} else {
smallest = c;
}
return smallest;
}
| int main() {
assert(func0(10, 20, 0) == 0);
assert(func0(19, 15, 18) == 15);
assert(func0(-10, -20, -30) == -30);
return 0;
}
| O1 | c | func0:
endbr64
mov %edi,%eax
cmp %edx,%esi
mov %edx,%ecx
cmovle %esi,%ecx
cmp %ecx,%edi
jle 1146 <func0+0x1d>
cmp %edx,%edi
cmovg %edx,%eax
cmp %eax,%esi
mov %edx,%eax
cmovle %esi,%eax
retq
| func0:
endbr64
mov eax, edi
cmp esi, edx
mov ecx, edx
cmovle ecx, esi
cmp edi, ecx
jle short locret_1146
cmp edi, edx
cmovg eax, edx
cmp esi, eax
mov eax, edx
cmovle eax, esi
locret_1146:
retn | long long func0(int a1, int a2, int a3)
{
long long result; // rax
int v4; // ecx
bool v5; // cc
result = (unsigned int)a1;
v4 = a3;
if ( a2 <= a3 )
v4 = a2;
if ( a1 > v4 )
{
if ( a1 > a3 )
LODWORD(result) = a3;
v5 = a2 <= (int)result;
result = (unsigned int)a3;
if ( v5 )
... | func0:
ENDBR64
MOV EAX,EDI
CMP ESI,EDX
MOV ECX,EDX
CMOVLE ECX,ESI
CMP EDI,ECX
JLE 0x00101146
CMP EDI,EDX
CMOVG EAX,EDX
CMP ESI,EAX
MOV EAX,EDX
CMOVLE EAX,ESI
LAB_00101146:
RET | int func0(int param_1,int param_2,int param_3)
{
int iVar1;
iVar1 = param_3;
if (param_2 <= param_3) {
iVar1 = param_2;
}
if (iVar1 < param_1) {
iVar1 = param_1;
if (param_3 < param_1) {
iVar1 = param_3;
}
param_1 = param_3;
if (param_2 <= iVar1) {
param_1 = param_2;
... |
4,802 | func0 |
#include <assert.h>
| int func0(int a, int b, int c) {
int smallest;
if (a <= b && a <= c) {
smallest = a;
} else if (b <= a && b <= c) {
smallest = b;
} else {
smallest = c;
}
return smallest;
}
| int main() {
assert(func0(10, 20, 0) == 0);
assert(func0(19, 15, 18) == 15);
assert(func0(-10, -20, -30) == -30);
return 0;
}
| O2 | c | func0:
endbr64
cmp %edx,%esi
mov %edx,%ecx
mov %edi,%eax
cmovle %esi,%ecx
cmp %ecx,%edi
jle 115d <func0+0x1d>
cmp %edx,%edi
cmovg %edx,%eax
cmp %eax,%esi
mov %edx,%eax
cmovle %esi,%eax
retq
xchg %ax,%ax
| func0:
endbr64
cmp esi, edx
mov ecx, edx
mov eax, edi
cmovle ecx, esi
cmp edi, ecx
jle short locret_115D
cmp edi, edx
cmovg eax, edx
cmp esi, eax
mov eax, edx
cmovle eax, esi
locret_115D:
retn | long long func0(int a1, int a2, int a3)
{
int v3; // ecx
long long result; // rax
bool v5; // cc
v3 = a3;
result = (unsigned int)a1;
if ( a2 <= a3 )
v3 = a2;
if ( a1 > v3 )
{
if ( a1 > a3 )
LODWORD(result) = a3;
v5 = a2 <= (int)result;
result = (unsigned int)a3;
if ( v5 )
... | func0:
ENDBR64
CMP ESI,EDX
MOV ECX,EDX
MOV EAX,EDI
CMOVLE ECX,ESI
CMP EDI,ECX
JLE 0x0010115d
CMP EDI,EDX
CMOVG EAX,EDX
CMP ESI,EAX
MOV EAX,EDX
CMOVLE EAX,ESI
LAB_0010115d:
RET | int func0(int param_1,int param_2,int param_3)
{
int iVar1;
iVar1 = param_3;
if (param_2 <= param_3) {
iVar1 = param_2;
}
if (iVar1 < param_1) {
iVar1 = param_1;
if (param_3 < param_1) {
iVar1 = param_3;
}
param_1 = param_3;
if (param_2 <= iVar1) {
param_1 = param_2;
... |
4,803 | func0 |
#include <assert.h>
| int func0(int a, int b, int c) {
int smallest;
if (a <= b && a <= c) {
smallest = a;
} else if (b <= a && b <= c) {
smallest = b;
} else {
smallest = c;
}
return smallest;
}
| int main() {
assert(func0(10, 20, 0) == 0);
assert(func0(19, 15, 18) == 15);
assert(func0(-10, -20, -30) == -30);
return 0;
}
| O3 | c | func0:
endbr64
cmp %edx,%esi
mov %edx,%ecx
mov %edi,%eax
cmovle %esi,%ecx
cmp %ecx,%edi
jle 115d <func0+0x1d>
cmp %edx,%edi
cmovg %edx,%eax
cmp %eax,%esi
mov %edx,%eax
cmovle %esi,%eax
retq
xchg %ax,%ax
| func0:
endbr64
cmp esi, edx
mov ecx, edx
mov eax, edi
cmovle ecx, esi
cmp edi, ecx
jle short locret_115D
cmp edi, edx
cmovg eax, edx
cmp esi, eax
mov eax, esi
cmovg eax, edx
locret_115D:
retn | long long func0(int a1, int a2, int a3)
{
int v3; // ecx
long long result; // rax
bool v5; // cc
v3 = a3;
result = (unsigned int)a1;
if ( a2 <= a3 )
v3 = a2;
if ( a1 > v3 )
{
if ( a1 > a3 )
LODWORD(result) = a3;
v5 = a2 <= (int)result;
result = (unsigned int)a2;
if ( !v5 )
... | func0:
ENDBR64
CMP ESI,EDX
MOV ECX,EDX
MOV EAX,EDI
CMOVLE ECX,ESI
CMP EDI,ECX
JLE 0x0010115d
CMP EDI,EDX
CMOVG EAX,EDX
CMP ESI,EAX
MOV EAX,ESI
CMOVG EAX,EDX
LAB_0010115d:
RET | int func0(int param_1,int param_2,int param_3)
{
int iVar1;
iVar1 = param_3;
if (param_2 <= param_3) {
iVar1 = param_2;
}
if (iVar1 < param_1) {
iVar1 = param_1;
if (param_3 < param_1) {
iVar1 = param_3;
}
param_1 = param_2;
if (iVar1 < param_2) {
param_1 = param_3;
... |
4,804 | func0 |
#include <assert.h>
#include <stdbool.h>
| bool func0(int n, int l, int r) {
int num = (((1 << r) - 1) ^ ((1 << (l - 1)) - 1));
int new_num = n & num;
if (new_num == 0) {
return true;
}
return false;
}
| int main() {
assert(func0(4, 1, 2) == true);
assert(func0(17, 2, 4) == true);
assert(func0(39, 4, 6) == false);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
mov %esi,-0x18(%rbp)
mov %edx,-0x1c(%rbp)
mov -0x1c(%rbp),%eax
mov $0x1,%edx
mov %eax,%ecx
shl %cl,%edx
mov %edx,%eax
lea -0x1(%rax),%edx
mov -0x18(%rbp),%eax
sub $0x1,%eax
mov $0x1,%esi
mov %eax,%ecx
shl %cl,%esi... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_18], esi
mov [rbp+var_1C], edx
mov eax, [rbp+var_1C]
mov edx, 1
mov ecx, eax
shl edx, cl
mov eax, edx
lea edx, [rax-1]
mov eax, [rbp+var_18]
sub eax, 1
mov esi, 1
mov ecx, eax
shl esi, ... | _BOOL8 func0(int a1, char a2, char a3)
{
return ((((1 << a3) - 1) ^ ((1 << (a2 - 1)) - 1)) & a1) == 0;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x18],ESI
MOV dword ptr [RBP + -0x1c],EDX
MOV EAX,dword ptr [RBP + -0x1c]
MOV EDX,0x1
MOV ECX,EAX
SHL EDX,CL
MOV EAX,EDX
LEA EDX,[RAX + -0x1]
MOV EAX,dword ptr [RBP + -0x18]
SUB EAX,0x1
MOV ESI,0x1
MOV ECX,EAX
SHL ESI,CL
MOV EAX,E... | bool func0(uint param_1,char param_2,byte param_3)
{
return (param_1 & ((1 << (param_2 - 1U & 0x1f)) - 1U ^ (1 << (param_3 & 0x1f)) - 1U)) == 0;
} |
4,805 | func0 |
#include <assert.h>
#include <stdbool.h>
| bool func0(int n, int l, int r) {
int num = (((1 << r) - 1) ^ ((1 << (l - 1)) - 1));
int new_num = n & num;
if (new_num == 0) {
return true;
}
return false;
}
| int main() {
assert(func0(4, 1, 2) == true);
assert(func0(17, 2, 4) == true);
assert(func0(39, 4, 6) == false);
return 0;
}
| O1 | c | func0:
endbr64
lea -0x1(%rsi),%ecx
mov $0x1,%eax
mov %eax,%esi
shl %cl,%esi
sub $0x1,%esi
mov %edx,%ecx
shl %cl,%eax
sub $0x1,%eax
xor %esi,%eax
test %edi,%eax
sete %al
retq
| func0:
endbr64
lea ecx, [rsi-1]
mov eax, 1
mov esi, eax
shl esi, cl
sub esi, 1
mov ecx, edx
shl eax, cl
sub eax, 1
xor esi, eax
test esi, edi
setz al
retn | bool func0(int a1, char a2, char a3)
{
return (a1 & (((1 << a3) - 1) ^ ((1 << (a2 - 1)) - 1))) == 0;
} | func0:
ENDBR64
LEA ECX,[RSI + -0x1]
MOV EAX,0x1
MOV ESI,EAX
SHL ESI,CL
SUB ESI,0x1
MOV ECX,EDX
SHL EAX,CL
SUB EAX,0x1
XOR ESI,EAX
TEST ESI,EDI
SETZ AL
RET | int4 func0(uint param_1,char param_2,byte param_3)
{
uint uVar1;
uVar1 = (1 << (param_3 & 0x1f)) - 1;
return CONCAT31((int3)(uVar1 >> 8),(((1 << (param_2 - 1U & 0x1f)) - 1U ^ uVar1) & param_1) == 0);
} |
4,806 | func0 |
#include <assert.h>
#include <stdbool.h>
| bool func0(int n, int l, int r) {
int num = (((1 << r) - 1) ^ ((1 << (l - 1)) - 1));
int new_num = n & num;
if (new_num == 0) {
return true;
}
return false;
}
| int main() {
assert(func0(4, 1, 2) == true);
assert(func0(17, 2, 4) == true);
assert(func0(39, 4, 6) == false);
return 0;
}
| O2 | c | func0:
endbr64
mov $0x1,%eax
lea -0x1(%rsi),%ecx
mov %eax,%esi
shl %cl,%esi
mov %edx,%ecx
shl %cl,%eax
sub $0x1,%esi
sub $0x1,%eax
xor %esi,%eax
test %edi,%eax
sete %al
retq
nopw %cs:0x0(%rax,%rax,1)
nopl 0x0(%rax)
| func0:
endbr64
mov eax, 1
lea ecx, [rsi-1]
mov esi, eax
shl esi, cl
mov ecx, edx
shl eax, cl
sub esi, 1
sub eax, 1
xor esi, eax
test esi, edi
setz al
retn | bool func0(int a1, char a2, char a3)
{
return (a1 & (((1 << a3) - 1) ^ ((1 << (a2 - 1)) - 1))) == 0;
} | func0:
ENDBR64
MOV EAX,0x1
LEA ECX,[RSI + -0x1]
MOV ESI,EAX
SHL ESI,CL
MOV ECX,EDX
SHL EAX,CL
SUB ESI,0x1
SUB EAX,0x1
XOR ESI,EAX
TEST ESI,EDI
SETZ AL
RET | int4 func0(uint param_1,char param_2,byte param_3)
{
uint uVar1;
uVar1 = (1 << (param_3 & 0x1f)) - 1;
return CONCAT31((int3)(uVar1 >> 8),(((1 << (param_2 - 1U & 0x1f)) - 1U ^ uVar1) & param_1) == 0);
} |
4,807 | func0 |
#include <assert.h>
#include <stdbool.h>
| bool func0(int n, int l, int r) {
int num = (((1 << r) - 1) ^ ((1 << (l - 1)) - 1));
int new_num = n & num;
if (new_num == 0) {
return true;
}
return false;
}
| int main() {
assert(func0(4, 1, 2) == true);
assert(func0(17, 2, 4) == true);
assert(func0(39, 4, 6) == false);
return 0;
}
| O3 | c | func0:
endbr64
mov $0x1,%eax
lea -0x1(%rsi),%ecx
mov %eax,%esi
shl %cl,%esi
mov %edx,%ecx
shl %cl,%eax
sub $0x1,%esi
sub $0x1,%eax
xor %esi,%eax
test %edi,%eax
sete %al
retq
nopw %cs:0x0(%rax,%rax,1)
nopl 0x0(%rax)
| func0:
endbr64
mov eax, 1
lea ecx, [rsi-1]
mov esi, eax
shl esi, cl
mov ecx, edx
shl eax, cl
sub esi, 1
sub eax, 1
xor esi, eax
test esi, edi
setz al
retn | bool func0(int a1, char a2, char a3)
{
return (a1 & (((1 << a3) - 1) ^ ((1 << (a2 - 1)) - 1))) == 0;
} | func0:
ENDBR64
MOV EAX,0x1
LEA ECX,[RSI + -0x1]
MOV ESI,EAX
SHL ESI,CL
MOV ECX,EDX
SHL EAX,CL
SUB ESI,0x1
SUB EAX,0x1
XOR ESI,EAX
TEST ESI,EDI
SETZ AL
RET | int4 func0(uint param_1,char param_2,byte param_3)
{
uint uVar1;
uVar1 = (1 << (param_3 & 0x1f)) - 1;
return CONCAT31((int3)(uVar1 >> 8),(((1 << (param_2 - 1U & 0x1f)) - 1U ^ uVar1) & param_1) == 0);
} |
4,808 | func0 |
#include <assert.h>
#include <stdbool.h>
void re_arrange_array(int arr[], int n) {
int j = 0;
for (int i = 0; i < n; i++) {
if (arr[i] < 0) {
int temp = arr[i];
arr[i] = arr[j];
arr[j] = temp;
j++;
}
}
}
| bool func0(int arr1[], int arr2[], int n) {
for (int i = 0; i < n; i++) {
if (arr1[i] != arr2[i]) {
return false;
}
}
return true;
}
| int main() {
int arr1[] = {-1, 2, -3, 4, 5, 6, -7, 8, 9};
int n1 = 9;
re_arrange_array(arr1, n1);
int expected1[] = {-1, -3, -7, 4, 5, 6, 2, 8, 9};
assert(func0(arr1, expected1, n1));
int arr2[] = {12, -14, -26, 13, 15};
int n2 = 5;
re_arrange_array(arr2, n2);
int expected... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %rsi,-0x20(%rbp)
mov %edx,-0x24(%rbp)
movl $0x0,-0x4(%rbp)
jmp 1273 <func0+0x57>
mov -0x4(%rbp),%eax
cltq
lea 0x0(,%rax,4),%rdx
mov -0x18(%rbp),%rax
add %rdx,%rax
mov (%rax),%edx
mov -0x4(%rbp),%eax
cltq
lea 0x0(,%ra... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_20], rsi
mov [rbp+var_24], edx
mov [rbp+var_4], 0
jmp short loc_1273
loc_1238:
mov eax, [rbp+var_4]
cdqe
lea rdx, ds:0[rax*4]
mov rax, [rbp+var_18]
add rax, rdx
mov edx, [rax]
mov eax, [rbp+var_4]
... | long long func0(long long a1, long long a2, int a3)
{
int i; // [rsp+20h] [rbp-4h]
for ( i = 0; i < a3; ++i )
{
if ( *(_DWORD *)(4LL * i + a1) != *(_DWORD *)(4LL * i + a2) )
return 0LL;
}
return 1LL;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV qword ptr [RBP + -0x20],RSI
MOV dword ptr [RBP + -0x24],EDX
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00101273
LAB_00101238:
MOV EAX,dword ptr [RBP + -0x4]
CDQE
LEA RDX,[RAX*0x4]
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,RDX
MOV EDX,dword ptr [RAX]
MOV EA... | int8 func0(long param_1,long param_2,int param_3)
{
int local_c;
local_c = 0;
while( true ) {
if (param_3 <= local_c) {
return 1;
}
if (*(int *)(param_1 + (long)local_c * 4) != *(int *)(param_2 + (long)local_c * 4)) break;
local_c = local_c + 1;
}
return 0;
} |
4,809 | func0 |
#include <assert.h>
#include <stdbool.h>
void re_arrange_array(int arr[], int n) {
int j = 0;
for (int i = 0; i < n; i++) {
if (arr[i] < 0) {
int temp = arr[i];
arr[i] = arr[j];
arr[j] = temp;
j++;
}
}
}
| bool func0(int arr1[], int arr2[], int n) {
for (int i = 0; i < n; i++) {
if (arr1[i] != arr2[i]) {
return false;
}
}
return true;
}
| int main() {
int arr1[] = {-1, 2, -3, 4, 5, 6, -7, 8, 9};
int n1 = 9;
re_arrange_array(arr1, n1);
int expected1[] = {-1, -3, -7, 4, 5, 6, 2, 8, 9};
assert(func0(arr1, expected1, n1));
int arr2[] = {12, -14, -26, 13, 15};
int n2 = 5;
re_arrange_array(arr2, n2);
int expected... | O1 | c | func0:
endbr64
test %edx,%edx
jle 11d3 <func0+0x2c>
lea -0x1(%rdx),%ecx
mov $0x0,%eax
jmp 11bc <func0+0x15>
mov %rdx,%rax
mov (%rsi,%rax,4),%edx
cmp %edx,(%rdi,%rax,4)
jne 11d9 <func0+0x32>
lea 0x1(%rax),%rdx
cmp %rcx,%rax
jne 11b9 <func0+0x12>
mov $0x1,%eax
retq
mov $0x1,%eax
r... | func0:
endbr64
test edx, edx
jle short loc_11CD
mov edx, edx
mov eax, 0
loc_11B6:
mov ecx, [rsi+rax*4]
cmp [rdi+rax*4], ecx
jnz short loc_11D3
add rax, 1
cmp rax, rdx
jnz short loc_11B6
mov eax, 1
retn
loc_11CD:
mov eax, 1
retn
loc_11D3:
mov eax, 0
retn | long long func0(long long a1, long long a2, int a3)
{
long long v3; // rax
if ( a3 <= 0 )
return 1LL;
v3 = 0LL;
while ( *(_DWORD *)(a1 + 4 * v3) == *(_DWORD *)(a2 + 4 * v3) )
{
if ( ++v3 == a3 )
return 1LL;
}
return 0LL;
} | func0:
ENDBR64
TEST EDX,EDX
JLE 0x001011cd
MOV EDX,EDX
MOV EAX,0x0
LAB_001011b6:
MOV ECX,dword ptr [RSI + RAX*0x4]
CMP dword ptr [RDI + RAX*0x4],ECX
JNZ 0x001011d3
ADD RAX,0x1
CMP RAX,RDX
JNZ 0x001011b6
MOV EAX,0x1
RET
LAB_001011cd:
MOV EAX,0x1
RET
LAB_001011d3:
MOV EAX,0x0
RET | int8 func0(long param_1,long param_2,uint param_3)
{
ulong uVar1;
if ((int)param_3 < 1) {
return 1;
}
uVar1 = 0;
do {
if (*(int *)(param_1 + uVar1 * 4) != *(int *)(param_2 + uVar1 * 4)) {
return 0;
}
uVar1 = uVar1 + 1;
} while (uVar1 != param_3);
return 1;
} |
4,810 | func0 |
#include <assert.h>
#include <stdbool.h>
void re_arrange_array(int arr[], int n) {
int j = 0;
for (int i = 0; i < n; i++) {
if (arr[i] < 0) {
int temp = arr[i];
arr[i] = arr[j];
arr[j] = temp;
j++;
}
}
}
| bool func0(int arr1[], int arr2[], int n) {
for (int i = 0; i < n; i++) {
if (arr1[i] != arr2[i]) {
return false;
}
}
return true;
}
| int main() {
int arr1[] = {-1, 2, -3, 4, 5, 6, -7, 8, 9};
int n1 = 9;
re_arrange_array(arr1, n1);
int expected1[] = {-1, -3, -7, 4, 5, 6, 2, 8, 9};
assert(func0(arr1, expected1, n1));
int arr2[] = {12, -14, -26, 13, 15};
int n2 = 5;
re_arrange_array(arr2, n2);
int expected... | O2 | c | func0:
endbr64
test %edx,%edx
jle 1510 <func0+0x30>
lea -0x1(%rdx),%ecx
xor %eax,%eax
jmp 14fc <func0+0x1c>
lea 0x1(%rax),%rdx
cmp %rcx,%rax
je 1510 <func0+0x30>
mov %rdx,%rax
mov (%rsi,%rax,4),%edx
cmp %edx,(%rdi,%rax,4)
je 14f0 <func0+0x10>
xor %eax,%eax
retq
nopw 0x0(%rax,%r... | func0:
endbr64
test edx, edx
jle short loc_1468
movsxd rdx, edx
xor eax, eax
jmp short loc_1459
loc_1450:
add rax, 1
cmp rax, rdx
jz short loc_1468
loc_1459:
mov ecx, [rsi+rax*4]
cmp [rdi+rax*4], ecx
jz short loc_1450
xor eax, eax
retn
loc_1468:
mov eax, 1
retn | long long func0(long long a1, long long a2, int a3)
{
long long v3; // rax
if ( a3 <= 0 )
return 1LL;
v3 = 0LL;
while ( *(_DWORD *)(a1 + 4 * v3) == *(_DWORD *)(a2 + 4 * v3) )
{
if ( ++v3 == a3 )
return 1LL;
}
return 0LL;
} | func0:
ENDBR64
TEST EDX,EDX
JLE 0x00101468
MOVSXD RDX,EDX
XOR EAX,EAX
JMP 0x00101459
LAB_00101450:
ADD RAX,0x1
CMP RAX,RDX
JZ 0x00101468
LAB_00101459:
MOV ECX,dword ptr [RSI + RAX*0x4]
CMP dword ptr [RDI + RAX*0x4],ECX
JZ 0x00101450
XOR EAX,EAX
RET
LAB_00101468:
MOV EAX,0x1
RET | int8 func0(long param_1,long param_2,int param_3)
{
long lVar1;
if (0 < param_3) {
lVar1 = 0;
do {
if (*(int *)(param_1 + lVar1 * 4) != *(int *)(param_2 + lVar1 * 4)) {
return 0;
}
lVar1 = lVar1 + 1;
} while (lVar1 != param_3);
}
return 1;
} |
4,811 | func0 |
#include <assert.h>
#include <stdbool.h>
void re_arrange_array(int arr[], int n) {
int j = 0;
for (int i = 0; i < n; i++) {
if (arr[i] < 0) {
int temp = arr[i];
arr[i] = arr[j];
arr[j] = temp;
j++;
}
}
}
| bool func0(int arr1[], int arr2[], int n) {
for (int i = 0; i < n; i++) {
if (arr1[i] != arr2[i]) {
return false;
}
}
return true;
}
| int main() {
int arr1[] = {-1, 2, -3, 4, 5, 6, -7, 8, 9};
int n1 = 9;
re_arrange_array(arr1, n1);
int expected1[] = {-1, -3, -7, 4, 5, 6, 2, 8, 9};
assert(func0(arr1, expected1, n1));
int arr2[] = {12, -14, -26, 13, 15};
int n2 = 5;
re_arrange_array(arr2, n2);
int expected... | O3 | c | func0:
endbr64
test %edx,%edx
jle 1650 <func0+0x30>
lea -0x1(%rdx),%ecx
xor %eax,%eax
jmp 163c <func0+0x1c>
lea 0x1(%rax),%rdx
cmp %rcx,%rax
je 1650 <func0+0x30>
mov %rdx,%rax
mov (%rsi,%rax,4),%edx
cmp %edx,(%rdi,%rax,4)
je 1630 <func0+0x10>
xor %eax,%eax
retq
nopw 0x0(%rax,%r... | func0:
endbr64
test edx, edx
jle short loc_11B0
movsxd rdx, edx
xor eax, eax
shl rdx, 2
jmp short loc_11A1
loc_1198:
add rax, 4
cmp rdx, rax
jz short loc_11B0
loc_11A1:
mov ecx, [rsi+rax]
cmp [rdi+rax], ecx
jz short loc_1198
xor eax, eax
retn
loc_11B0:
mov eax, 1
re... | long long func0(long long a1, long long a2, int a3)
{
long long v3; // rax
long long v4; // rdx
if ( a3 <= 0 )
return 1LL;
v3 = 0LL;
v4 = 4LL * a3;
while ( *(_DWORD *)(a1 + v3) == *(_DWORD *)(a2 + v3) )
{
v3 += 4LL;
if ( v4 == v3 )
return 1LL;
}
return 0LL;
} | func0:
ENDBR64
TEST EDX,EDX
JLE 0x001011b0
MOVSXD RDX,EDX
XOR EAX,EAX
SHL RDX,0x2
JMP 0x001011a1
LAB_00101198:
ADD RAX,0x4
CMP RDX,RAX
JZ 0x001011b0
LAB_001011a1:
MOV ECX,dword ptr [RSI + RAX*0x1]
CMP dword ptr [RDI + RAX*0x1],ECX
JZ 0x00101198
XOR EAX,EAX
RET
LAB_001011b0:
MOV EAX,0x1
RET | int8 func0(long param_1,long param_2,int param_3)
{
long lVar1;
if (0 < param_3) {
lVar1 = 0;
do {
if (*(int *)(param_1 + lVar1) != *(int *)(param_2 + lVar1)) {
return 0;
}
lVar1 = lVar1 + 4;
} while ((long)param_3 * 4 != lVar1);
}
return 1;
} |
4,812 | func0 |
#include <stdio.h>
#include <string.h>
#include <assert.h>
| char* func0(const char* str1, char* char_replacement) {
static char str2[100];
int j = 0;
for (int i = 0; str1[i] != '\0'; i++) {
if (str1[i] == ' ') {
str2[j++] = char_replacement[0];
} else {
str2[j++] = str1[i];
}
}
str2[j] = '\0';
re... | int main() {
assert(strcmp(func0("hello people", "@"), "hello@people") == 0);
assert(strcmp(func0("python program language", "$"), "python$program$language") == 0);
assert(strcmp(func0("blank space", "-"), "blank-space") == 0);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %rsi,-0x20(%rbp)
movl $0x0,-0x8(%rbp)
movl $0x0,-0x4(%rbp)
jmp 11e5 <func0+0x7c>
mov -0x4(%rbp),%eax
movslq %eax,%rdx
mov -0x18(%rbp),%rax
add %rdx,%rax
movzbl (%rax),%eax
cmp $0x20,%al
jne 11bb <func0+0x52>
mov -0x8(%rb... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_20], rsi
mov [rbp+var_8], 0
mov [rbp+var_4], 0
jmp short loc_11E5
loc_1189:
mov eax, [rbp+var_4]
movsxd rdx, eax
mov rax, [rbp+var_18]
add rax, rdx
movzx eax, byte ptr [rax]
cmp al, 20h ; ' '
jnz sh... | _BYTE * func0(long long a1, char *a2)
{
int v2; // eax
char v3; // dl
int v5; // [rsp+18h] [rbp-8h]
int i; // [rsp+1Ch] [rbp-4h]
v5 = 0;
for ( i = 0; *(_BYTE *)(i + a1); ++i )
{
v2 = v5++;
if ( *(_BYTE *)(i + a1) == 32 )
v3 = *a2;
else
v3 = *(_BYTE *)(i + a1);
str2_1[v2] = v3;... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV qword ptr [RBP + -0x20],RSI
MOV dword ptr [RBP + -0x8],0x0
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001011e5
LAB_00101189:
MOV EAX,dword ptr [RBP + -0x4]
MOVSXD RDX,EAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,RDX
MOVZX EAX,byte ptr [RAX]
CMP AL,0x20
JN... | int1 * func0(long param_1,int *param_2)
{
int local_10;
int local_c;
local_10 = 0;
for (local_c = 0; *(char *)(param_1 + local_c) != '\0'; local_c = local_c + 1) {
if (*(char *)(param_1 + local_c) == ' ') {
str2_1[local_10] = *param_2;
}
else {
str2_1[local_10] = *(int *)(local_c + p... |
4,813 | func0 |
#include <stdio.h>
#include <string.h>
#include <assert.h>
| char* func0(const char* str1, char* char_replacement) {
static char str2[100];
int j = 0;
for (int i = 0; str1[i] != '\0'; i++) {
if (str1[i] == ' ') {
str2[j++] = char_replacement[0];
} else {
str2[j++] = str1[i];
}
}
str2[j] = '\0';
re... | int main() {
assert(strcmp(func0("hello people", "@"), "hello@people") == 0);
assert(strcmp(func0("python program language", "$"), "python$program$language") == 0);
assert(strcmp(func0("blank space", "-"), "blank-space") == 0);
return 0;
}
| O1 | c | func0:
endbr64
movzbl (%rdi),%edx
test %dl,%dl
je 117f <func0+0x36>
mov $0x1,%eax
lea 0x2edf(%rip),%r8
jmp 1173 <func0+0x2a>
mov %dl,(%rax,%r8,1)
add $0x1,%rax
movzbl -0x1(%rdi,%rax,1),%edx
test %dl,%dl
je 1184 <func0+0x3b>
mov %eax,%ecx
cmp $0x20,%dl
jne 1162 <func0+0x19>
movzbl (%r... | func0:
endbr64
movzx edx, byte ptr [rdi]
test dl, dl
jz short loc_119F
mov eax, 1
lea r8, unk_403F
jmp short loc_1193
loc_1182:
mov [rax+r8], dl
add rax, 1
movzx edx, byte ptr [rdi+rax-1]
test dl, dl
jz short loc_11A4
loc_1193:
mov ecx, eax
cmp dl, 20h ; ' '
jnz short... | _BYTE * func0(char *a1, char *a2)
{
char v2; // dl
long long v3; // rax
int v4; // ecx
_BYTE *result; // rax
v2 = *a1;
if ( *a1 )
{
v3 = 1LL;
do
{
v4 = v3;
if ( v2 == 32 )
v2 = *a2;
*((_BYTE *)&unk_403F + v3++) = v2;
v2 = a1[v3 - 1];
}
while ( v2 );
}... | func0:
ENDBR64
MOVZX EDX,byte ptr [RDI]
TEST DL,DL
JZ 0x0010119f
MOV EAX,0x1
LEA R8,[0x10403f]
JMP 0x00101193
LAB_00101182:
MOV byte ptr [RAX + R8*0x1],DL
ADD RAX,0x1
MOVZX EDX,byte ptr [RDI + RAX*0x1 + -0x1]
TEST DL,DL
JZ 0x001011a4
LAB_00101193:
MOV ECX,EAX
CMP DL,0x20
JNZ 0x00101182
MOVZX EDX,byte ptr [RSI]
JMP 0x00... | void func0(char *param_1,char *param_2)
{
long lVar1;
int iVar2;
char cVar3;
cVar3 = *param_1;
if (cVar3 == '\0') {
iVar2 = 0;
}
else {
lVar1 = 1;
do {
iVar2 = (int)lVar1;
if (cVar3 == ' ') {
cVar3 = *param_2;
}
(&DAT_0010403f)[lVar1] = cVar3;
cVar3 = ... |
4,814 | func0 |
#include <stdio.h>
#include <string.h>
#include <assert.h>
| char* func0(const char* str1, char* char_replacement) {
static char str2[100];
int j = 0;
for (int i = 0; str1[i] != '\0'; i++) {
if (str1[i] == ' ') {
str2[j++] = char_replacement[0];
} else {
str2[j++] = str1[i];
}
}
str2[j] = '\0';
re... | int main() {
assert(strcmp(func0("hello people", "@"), "hello@people") == 0);
assert(strcmp(func0("python program language", "$"), "python$program$language") == 0);
assert(strcmp(func0("blank space", "-"), "blank-space") == 0);
return 0;
}
| O2 | c | func0:
endbr64
movzbl (%rdi),%edx
test %dl,%dl
je 1350 <func0+0x50>
mov $0x1,%eax
lea 0x2d28(%rip),%r8
nopw 0x0(%rax,%rax,1)
movslq %eax,%rcx
cmp $0x20,%dl
jne 132b <func0+0x2b>
movzbl (%rsi),%edx
mov %dl,(%r8,%rax,1)
add $0x1,%rax
movzbl -0x1(%rdi,%rax,1),%edx
test %dl,%dl
jne 1320 <func... | func0:
endbr64
movzx edx, byte ptr [rdi]
test dl, dl
jz short loc_12A0
mov eax, 1
lea r8, unk_403F
nop word ptr [rax+rax+00000000h]
loc_1270:
movsxd rcx, eax
cmp dl, 20h ; ' '
jnz short loc_127B
movzx edx, byte ptr [rsi]
loc_127B:
mov [r8+rax], dl
add rax, 1
movzx edx, byte pt... | _BYTE * func0(char *a1, char *a2)
{
char v2; // dl
long long v3; // rax
long long v4; // rcx
_BYTE *result; // rax
v2 = *a1;
if ( *a1 )
{
v3 = 1LL;
do
{
v4 = (int)v3;
if ( v2 == 32 )
v2 = *a2;
*((_BYTE *)&unk_403F + v3++) = v2;
v2 = a1[v3 - 1];
}
while ... | func0:
ENDBR64
MOVZX EDX,byte ptr [RDI]
TEST DL,DL
JZ 0x001012a0
MOV EAX,0x1
LEA R8,[0x10403f]
NOP word ptr [RAX + RAX*0x1]
LAB_00101270:
MOVSXD RCX,EAX
CMP DL,0x20
JNZ 0x0010127b
MOVZX EDX,byte ptr [RSI]
LAB_0010127b:
MOV byte ptr [R8 + RAX*0x1],DL
ADD RAX,0x1
MOVZX EDX,byte ptr [RDI + RAX*0x1 + -0x1]
TEST DL,DL
JNZ 0... | void func0(char *param_1,char *param_2)
{
int iVar1;
char cVar3;
long lVar2;
cVar3 = *param_1;
if (cVar3 != '\0') {
lVar2 = 1;
do {
iVar1 = (int)lVar2;
if (cVar3 == ' ') {
cVar3 = *param_2;
}
(&DAT_0010403f)[lVar2] = cVar3;
cVar3 = param_1[lVar2];
lVar2 ... |
4,815 | func0 |
#include <stdio.h>
#include <string.h>
#include <assert.h>
| char* func0(const char* str1, char* char_replacement) {
static char str2[100];
int j = 0;
for (int i = 0; str1[i] != '\0'; i++) {
if (str1[i] == ' ') {
str2[j++] = char_replacement[0];
} else {
str2[j++] = str1[i];
}
}
str2[j] = '\0';
re... | int main() {
assert(strcmp(func0("hello people", "@"), "hello@people") == 0);
assert(strcmp(func0("python program language", "$"), "python$program$language") == 0);
assert(strcmp(func0("blank space", "-"), "blank-space") == 0);
return 0;
}
| O3 | c | func0:
endbr64
movzbl (%rdi),%edx
test %dl,%dl
je 1370 <func0+0x50>
mov $0x1,%eax
lea 0x2d08(%rip),%r8
nopw 0x0(%rax,%rax,1)
movslq %eax,%rcx
cmp $0x20,%dl
jne 134b <func0+0x2b>
movzbl (%rsi),%edx
mov %dl,(%r8,%rax,1)
add $0x1,%rax
movzbl -0x1(%rdi,%rax,1),%edx
test %dl,%dl
jne 1340 <func... | func0:
endbr64
movzx edx, byte ptr [rdi]
test dl, dl
jz short loc_1380
mov eax, 1
lea r8, unk_403F
nop word ptr [rax+rax+00000000h]
loc_1350:
movsxd rcx, eax
cmp dl, 20h ; ' '
jnz short loc_135B
movzx edx, byte ptr [rsi]
loc_135B:
mov [r8+rax], dl
add rax, 1
movzx edx, byte pt... | long long * func0(char *a1, char *a2)
{
char v2; // dl
long long v3; // rax
long long v4; // rcx
long long *result; // rax
v2 = *a1;
if ( *a1 )
{
v3 = 1LL;
do
{
v4 = (int)v3;
if ( v2 == 32 )
v2 = *a2;
*((_BYTE *)&unk_403F + v3++) = v2;
v2 = a1[v3 - 1];
}
... | func0:
ENDBR64
MOVZX EDX,byte ptr [RDI]
TEST DL,DL
JZ 0x00101380
MOV EAX,0x1
LEA R8,[0x10403f]
NOP word ptr [RAX + RAX*0x1]
LAB_00101350:
MOVSXD RCX,EAX
CMP DL,0x20
JNZ 0x0010135b
MOVZX EDX,byte ptr [RSI]
LAB_0010135b:
MOV byte ptr [R8 + RAX*0x1],DL
ADD RAX,0x1
MOVZX EDX,byte ptr [RDI + RAX*0x1 + -0x1]
TEST DL,DL
JNZ 0... | void func0(char *param_1,char *param_2)
{
int iVar1;
char cVar3;
long lVar2;
cVar3 = *param_1;
if (cVar3 != '\0') {
lVar2 = 1;
do {
iVar1 = (int)lVar2;
if (cVar3 == ' ') {
cVar3 = *param_2;
}
(&DAT_0010403f)[lVar2] = cVar3;
cVar3 = param_1[lVar2];
lVar2 ... |
4,816 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int tri[][100], int n) {
if (n > 1) {
tri[1][1] = tri[1][1] + tri[0][0];
tri[1][0] = tri[1][0] + tri[0][0];
}
for (int i = 2; i < n; i++) {
tri[i][0] = tri[i][0] + tri[i-1][0];
tri[i][i] = tri[i][i] + tri[i-1][i-1];
for (int j = 1; j < i; j++) {
... | int main() {
int tri1[3][100] = {{1}, {2, 1}, {3, 3, 2}};
assert(func0(tri1, 3) == 6);
int tri2[3][100] = {{1}, {1, 2}, {4, 1, 12}};
assert(func0(tri2, 3) == 15);
int tri3[3][100] = {{2}, {3, 2}, {13, 23, 12}};
assert(func0(tri3, 3) == 28);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
cmpl $0x1,-0x1c(%rbp)
jle 11c0 <func0+0x57>
mov -0x18(%rbp),%rax
add $0x190,%rax
mov 0x4(%rax),%ecx
mov -0x18(%rbp),%rax
mov (%rax),%edx
mov -0x18(%rbp),%rax
add $0x190,%rax
add %ecx,%edx
mov %edx... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
cmp [rbp+var_1C], 1
jle short loc_11C0
mov rax, [rbp+var_18]
add rax, 190h
mov ecx, [rax+4]
mov rax, [rbp+var_18]
mov edx, [rax]
mov rax, [rbp+var_18]
add rax, 190h
add edx, ecx
mov ... | long long func0(_DWORD *a1, int a2)
{
int v2; // ecx
int i; // [rsp+Ch] [rbp-10h]
int j; // [rsp+10h] [rbp-Ch]
unsigned int v6; // [rsp+14h] [rbp-8h]
int k; // [rsp+18h] [rbp-4h]
if ( a2 > 1 )
{
a1[101] += *a1;
a1[100] += *a1;
}
for ( i = 2; i < a2; ++i )
{
a1[100 * i] += a1[100 * i - ... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
CMP dword ptr [RBP + -0x1c],0x1
JLE 0x001011c0
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x190
MOV ECX,dword ptr [RAX + 0x4]
MOV RAX,qword ptr [RBP + -0x18]
MOV EDX,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0... | int func0(int *param_1,int param_2)
{
int local_18;
int local_14;
int local_10;
int local_c;
if (1 < param_2) {
param_1[0x65] = *param_1 + param_1[0x65];
param_1[100] = *param_1 + param_1[100];
}
for (local_18 = 2; local_18 < param_2; local_18 = local_18 + 1) {
param_1[(long)local_18 * 100... |
4,817 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int tri[][100], int n) {
if (n > 1) {
tri[1][1] = tri[1][1] + tri[0][0];
tri[1][0] = tri[1][0] + tri[0][0];
}
for (int i = 2; i < n; i++) {
tri[i][0] = tri[i][0] + tri[i-1][0];
tri[i][i] = tri[i][i] + tri[i-1][i-1];
for (int j = 1; j < i; j++) {
... | int main() {
int tri1[3][100] = {{1}, {2, 1}, {3, 3, 2}};
assert(func0(tri1, 3) == 6);
int tri2[3][100] = {{1}, {1, 2}, {4, 1, 12}};
assert(func0(tri2, 3) == 15);
int tri3[3][100] = {{2}, {3, 2}, {13, 23, 12}};
assert(func0(tri3, 3) == 28);
return 0;
}
| O1 | c | func0:
endbr64
push %rbp
push %rbx
mov %rdi,%rbp
mov %esi,%edi
cmp $0x1,%esi
jle 1188 <func0+0x1f>
mov 0x0(%rbp),%eax
add %eax,0x194(%rbp)
add %eax,0x190(%rbp)
cmp $0x2,%edi
jle 1214 <func0+0xab>
lea 0x320(%rbp),%r11
lea 0x328(%rbp),%rsi
lea -0x3(%rdi),%ebx
add $0x3,%rbx
mov ... | func0:
endbr64
push rbp
push rbx
mov rbp, rdi
mov r11d, esi
cmp esi, 1
jle short loc_1188
mov eax, [rdi]
add [rdi+194h], eax
add [rdi+190h], eax
loc_1188:
cmp r11d, 2
jle short loc_120A
lea r9, [rbp+320h]
lea r10, [rbp+328h]
mov ebx, r11d
mov r8d, 2
jmp shor... | long long func0(int *a1, int a2)
{
int v4; // eax
_DWORD *v5; // r9
_DWORD *v6; // r10
long long i; // r8
int v8; // edx
long long v9; // rax
int v10; // ecx
int v11; // edx
_DWORD *v12; // rdi
signed int *v13; // rax
signed int v14; // edx
unsigned int v15; // eax
signed int *v16; // rsi
l... | func0:
ENDBR64
PUSH RBP
PUSH RBX
MOV RBP,RDI
MOV R11D,ESI
CMP ESI,0x1
JLE 0x00101188
MOV EAX,dword ptr [RDI]
ADD dword ptr [RDI + 0x194],EAX
ADD dword ptr [RDI + 0x190],EAX
LAB_00101188:
CMP R11D,0x2
JLE 0x0010120a
LEA R9,[RBP + 0x320]
LEA R10,[RBP + 0x328]
MOV EBX,R11D
MOV R8D,0x2
JMP 0x001011df
LAB_001011a7:
ADD EDX,... | int func0(int *param_1,uint param_2)
{
int iVar1;
ulong uVar2;
long lVar3;
int iVar4;
ulong uVar5;
int *piVar6;
int *piVar7;
if (1 < (int)param_2) {
param_1[0x65] = param_1[0x65] + *param_1;
param_1[100] = param_1[100] + *param_1;
}
if ((int)param_2 < 3) {
iVar4 = param_1[(long)(int)... |
4,818 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int tri[][100], int n) {
if (n > 1) {
tri[1][1] = tri[1][1] + tri[0][0];
tri[1][0] = tri[1][0] + tri[0][0];
}
for (int i = 2; i < n; i++) {
tri[i][0] = tri[i][0] + tri[i-1][0];
tri[i][i] = tri[i][i] + tri[i-1][i-1];
for (int j = 1; j < i; j++) {
... | int main() {
int tri1[3][100] = {{1}, {2, 1}, {3, 3, 2}};
assert(func0(tri1, 3) == 6);
int tri2[3][100] = {{1}, {1, 2}, {4, 1, 12}};
assert(func0(tri2, 3) == 15);
int tri3[3][100] = {{2}, {3, 2}, {13, 23, 12}};
assert(func0(tri3, 3) == 28);
return 0;
}
| O2 | c | func0:
endbr64
push %r12
push %rbp
push %rbx
mov %esi,%ebx
cmp $0x1,%esi
jle 142b <func0+0xeb>
mov (%rdi),%eax
add %eax,0x194(%rdi)
add %eax,0x190(%rdi)
movslq %esi,%rax
lea (%rax,%rax,4),%rax
lea (%rax,%rax,4),%rax
shl $0x4,%rax
lea -0x190(%rdi,%rax,1),%rbp
cmp $0x2,%esi
jle 1... | func0:
endbr64
push r12
push rbp
push rbx
mov ebx, esi
cmp esi, 1
jle loc_1423
movsxd r12, esi
mov eax, [rdi]
add [rdi+194h], eax
add [rdi+190h], eax
lea rax, [r12+r12*4]
lea rax, [rax+rax*4]
shl rax, 4
lea rbp, [rdi+rax-190h]
cmp esi, 2
jle loc_143A
lea r8,... | long long func0(int *a1, int a2)
{
long long v3; // r12
int v4; // eax
unsigned int *v5; // rbp
_DWORD *v6; // r8
_DWORD *v7; // r11
long long v8; // r10
_DWORD *v9; // rdi
long long v10; // rax
int v11; // esi
int v12; // ecx
int v13; // edx
int v14; // r9d
int v15; // edx
unsigned int v16... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
MOV EBX,ESI
CMP ESI,0x1
JLE 0x00101423
MOVSXD R12,ESI
MOV EAX,dword ptr [RDI]
ADD dword ptr [RDI + 0x194],EAX
ADD dword ptr [RDI + 0x190],EAX
LEA RAX,[R12 + R12*0x4]
LEA RAX,[RAX + RAX*0x4]
SHL RAX,0x4
LEA RBP,[RDI + RAX*0x1 + -0x190]
CMP ESI,0x2
JLE 0x0010143a
LEA R8,[RDI + 0x... | int func0(int *param_1,int param_2)
{
long lVar1;
int *piVar2;
int iVar3;
int *piVar4;
long lVar5;
if (param_2 < 2) {
piVar2 = param_1 + (long)param_2 * 100 + -100;
}
else {
param_1[0x65] = param_1[0x65] + *param_1;
param_1[100] = param_1[100] + *param_1;
piVar2 = param_1 + (long)par... |
4,819 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int tri[][100], int n) {
if (n > 1) {
tri[1][1] = tri[1][1] + tri[0][0];
tri[1][0] = tri[1][0] + tri[0][0];
}
for (int i = 2; i < n; i++) {
tri[i][0] = tri[i][0] + tri[i-1][0];
tri[i][i] = tri[i][i] + tri[i-1][i-1];
for (int j = 1; j < i; j++) {
... | int main() {
int tri1[3][100] = {{1}, {2, 1}, {3, 3, 2}};
assert(func0(tri1, 3) == 6);
int tri2[3][100] = {{1}, {1, 2}, {4, 1, 12}};
assert(func0(tri2, 3) == 15);
int tri3[3][100] = {{2}, {3, 2}, {13, 23, 12}};
assert(func0(tri3, 3) == 28);
return 0;
}
| O3 | c | func0:
endbr64
push %r15
push %r14
push %r13
mov %esi,%r13d
push %r12
push %rbp
mov %rdi,%rbp
push %rbx
cmp $0x1,%esi
jle 15db <func0+0x29b>
mov (%rdi),%eax
add %eax,0x194(%rdi)
add %eax,0x190(%rdi)
movslq %esi,%rax
lea (%rax,%rax,4),%rax
lea (%rax,%rax,4),%rax
shl $0x4,%rax
mo... | func0:
endbr64
movsxd rax, esi
push r15
mov rdx, rax
lea rax, [rax+rax*4]
push r14
lea r11, [rax+rax*4]
push r13
shl r11, 4
push r12
push rbp
push rbx
lea rbx, [rdi+r11-190h]
cmp edx, 1
jle loc_15D5
mov eax, [rdi]
add [rdi+194h], eax
add [rdi+190h], eax
cmp ... | long long func0(int *a1, int a2)
{
long long v3; // r11
unsigned int *v4; // rbx
int v5; // eax
unsigned int v6; // r10d
_DWORD *v7; // rcx
long long v8; // r9
int v9; // r8d
_DWORD *v10; // rsi
unsigned int v11; // r13d
_DWORD *v12; // rbp
unsigned int v13; // eax
_DWORD *v14; // r15
_DWORD ... | func0:
ENDBR64
MOVSXD RAX,ESI
PUSH R15
MOV RDX,RAX
LEA RAX,[RAX + RAX*0x4]
PUSH R14
LEA R11,[RAX + RAX*0x4]
PUSH R13
SHL R11,0x4
PUSH R12
PUSH RBP
PUSH RBX
LEA RBX,[RDI + R11*0x1 + -0x190]
CMP EDX,0x1
JLE 0x001015d5
MOV EAX,dword ptr [RDI]
ADD dword ptr [RDI + 0x194],EAX
ADD dword ptr [RDI + 0x190],EAX
CMP EDX,0x2
JZ 0... | uint func0(int *param_1,int param_2)
{
int *piVar1;
int *piVar2;
int *piVar3;
int *piVar4;
int *piVar5;
uint *puVar6;
int iVar7;
int iVar8;
int iVar9;
int iVar10;
int iVar11;
int iVar12;
int iVar13;
int iVar14;
uint uVar15;
uint *puVar16;
uint *puVar17;
uint *puVar18;
int iVar19;
... |
4,820 | func0 | #include <stdio.h>
#include <stdlib.h>
#include <assert.h>
| void func0(int *list1, int size, int n, int *result) {
int i, j, max_idx, temp;
// Make a copy of the array
int *copy = (int *)malloc(size * sizeof(int));
for (i = 0; i < size; i++) {
copy[i] = list1[i];
}
// Selection sort to find n largest elements
for (i = 0; i < n; i++) {... | int main() {
int list1[] = {10, 20, 50, 70, 90, 20, 50, 40, 60, 80, 100};
int size = sizeof(list1) / sizeof(list1[0]);
int result[5];
func0(list1, size, 2, result);
assert(result[0] == 100 && result[1] == 90);
func0(list1, size, 5, result);
assert(result[0] == 100 && result[1] == ... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x40,%rsp
mov %rdi,-0x28(%rbp)
mov %esi,-0x2c(%rbp)
mov %edx,-0x30(%rbp)
mov %rcx,-0x38(%rbp)
mov -0x2c(%rbp),%eax
cltq
shl $0x2,%rax
mov %rax,%rdi
callq 10b0 <malloc@plt>
mov %rax,-0x8(%rbp)
movl $0x0,-0x18(%rbp)
jmp 1212 <func0+0x69>
mo... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_28], rdi
mov [rbp+var_2C], esi
mov [rbp+var_30], edx
mov [rbp+var_38], rcx
mov eax, [rbp+var_2C]
cdqe
shl rax, 2
mov rdi, rax; size
call _malloc
mov [rbp+ptr], rax
mov [rbp+var_18], 0
jmp short loc_1212
... | void func0(long long a1, int a2, int a3, long long a4)
{
int i; // [rsp+28h] [rbp-18h]
int j; // [rsp+28h] [rbp-18h]
int k; // [rsp+2Ch] [rbp-14h]
int v9; // [rsp+30h] [rbp-10h]
int v10; // [rsp+34h] [rbp-Ch]
_DWORD *ptr; // [rsp+38h] [rbp-8h]
ptr = malloc(4LL * a2);
for ( i = 0; i < a2; ++i )
ptr... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x28],RDI
MOV dword ptr [RBP + -0x2c],ESI
MOV dword ptr [RBP + -0x30],EDX
MOV qword ptr [RBP + -0x38],RCX
MOV EAX,dword ptr [RBP + -0x2c]
CDQE
SHL RAX,0x2
MOV RDI,RAX
CALL 0x001010b0
MOV qword ptr [RBP + -0x8],RAX
MOV dword ptr [RBP + -0x18],0x0
JMP... | void func0(long param_1,int param_2,int param_3,long param_4)
{
int4 uVar1;
void *__ptr;
int4 local_20;
int4 local_1c;
int4 local_18;
__ptr = malloc((long)param_2 << 2);
for (local_20 = 0; local_20 < param_2; local_20 = local_20 + 1) {
*(int4 *)((long)__ptr + (long)local_20 * 4) =
*(int4 ... |
4,821 | func0 | #include <stdio.h>
#include <stdlib.h>
#include <assert.h>
| void func0(int *list1, int size, int n, int *result) {
int i, j, max_idx, temp;
// Make a copy of the array
int *copy = (int *)malloc(size * sizeof(int));
for (i = 0; i < size; i++) {
copy[i] = list1[i];
}
// Selection sort to find n largest elements
for (i = 0; i < n; i++) {... | int main() {
int list1[] = {10, 20, 50, 70, 90, 20, 50, 40, 60, 80, 100};
int size = sizeof(list1) / sizeof(list1[0]);
int result[5];
func0(list1, size, 2, result);
assert(result[0] == 100 && result[1] == 90);
func0(list1, size, 5, result);
assert(result[0] == 100 && result[1] == ... | O1 | c | func0:
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
mov %rdi,%r12
mov %esi,%ebx
mov %edx,%r13d
mov %rcx,%rbp
movslq %esi,%rdi
shl $0x2,%rdi
callq 10b0 <malloc@plt>
mov %rax,%rdi
test %ebx,%ebx
jle 11f0 <func0+0x47>
lea -0x1(%rbx),%ecx
mov $0x0,%eax
mov (%r12,... | func0:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov r12, rdi
mov ebx, esi
mov r13d, edx
mov rbp, rcx
movsxd rdi, esi
shl rdi, 2
call _malloc
mov rdi, rax
test ebx, ebx
jle short loc_11EC
mov ecx, ebx
mov eax, 0
loc_11DC:
mov edx, [r12+rax*4]
m... | long long func0(long long a1, int a2, int a3, long long a4)
{
long long v8; // rdi
long long i; // rax
long long v10; // rsi
int v11; // edx
long long v12; // rax
int *v13; // rdx
int v14; // eax
v8 = malloc(4LL * a2);
if ( a2 > 0 )
{
for ( i = 0LL; i != a2; ++i )
*(_DWORD *)(v8 + 4 * i)... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV R12,RDI
MOV EBX,ESI
MOV R13D,EDX
MOV RBP,RCX
MOVSXD RDI,ESI
SHL RDI,0x2
CALL 0x001010b0
MOV RDI,RAX
TEST EBX,EBX
JLE 0x001011ec
MOV ECX,EBX
MOV EAX,0x0
LAB_001011dc:
MOV EDX,dword ptr [R12 + RAX*0x4]
MOV dword ptr [RDI + RAX*0x4],EDX
ADD RAX,0x1
CMP RAX... | void func0(long param_1,uint param_2,int param_3,long param_4)
{
int4 *puVar1;
int4 uVar2;
int iVar3;
void *__ptr;
ulong uVar4;
ulong uVar5;
int iVar6;
__ptr = malloc((long)(int)param_2 << 2);
if (0 < (int)param_2) {
uVar4 = 0;
do {
*(int4 *)((long)__ptr + uVar4 * 4) = *(int4 *)(para... |
4,822 | func0 | #include <stdio.h>
#include <stdlib.h>
#include <assert.h>
| void func0(int *list1, int size, int n, int *result) {
int i, j, max_idx, temp;
// Make a copy of the array
int *copy = (int *)malloc(size * sizeof(int));
for (i = 0; i < size; i++) {
copy[i] = list1[i];
}
// Selection sort to find n largest elements
for (i = 0; i < n; i++) {... | int main() {
int list1[] = {10, 20, 50, 70, 90, 20, 50, 40, 60, 80, 100};
int size = sizeof(list1) / sizeof(list1[0]);
int result[5];
func0(list1, size, 2, result);
assert(result[0] == 100 && result[1] == 90);
func0(list1, size, 5, result);
assert(result[0] == 100 && result[1] == ... | O2 | c | func0:
endbr64
push %r14
mov %rdi,%r14
movslq %esi,%rdi
push %r13
mov %rcx,%r13
push %r12
mov %edx,%r12d
push %rbp
push %rbx
mov %rdi,%rbx
shl $0x2,%rdi
callq 10b0 <malloc@plt>
lea -0x1(%rbx),%ecx
mov %rax,%rbp
xor %eax,%eax
test %ebx,%ebx
jle 1374 <func0+0x44>
mov (%r14,%rax,... | func0:
endbr64
push r14
mov r14, rdi
push r13
movsxd r13, esi
push r12
mov r12, rcx
push rbp
mov ebp, edx
push rbx
mov rbx, r13
shl r13, 2
mov rdi, r13
call _malloc
mov r10, rax
test ebx, ebx
jle short loc_138E
mov rdx, r13
mov rsi, r14
mov rdi, rax
call... | long long func0(long long a1, long long a2, int a3, long long a4)
{
int v6; // ebx
long long v7; // rax
long long v8; // rdx
long long v9; // rcx
long long v10; // r8
long long v11; // r10
long long v12; // rdx
unsigned int *v13; // r11
long long v14; // r9
unsigned int v15; // r13d
unsigned int ... | func0:
ENDBR64
PUSH R14
MOV R14,RDI
PUSH R13
MOVSXD R13,ESI
PUSH R12
MOV R12,RCX
PUSH RBP
MOV EBP,EDX
PUSH RBX
MOV RBX,R13
SHL R13,0x2
MOV RDI,R13
CALL 0x001010d0
MOV R10,RAX
TEST EBX,EBX
JLE 0x0010138e
MOV RDX,R13
MOV RSI,R14
MOV RDI,RAX
CALL 0x001010c0
MOV R10,RAX
LAB_0010138e:
MOV R11,R10
XOR R9D,R9D
TEST EBP,EBP
JL... | void func0(void *param_1,int param_2,int param_3,int *param_4)
{
int iVar1;
int *piVar2;
int *__dest;
int iVar3;
int iVar4;
int iVar5;
int iVar6;
int *piVar7;
int iVar8;
int iVar9;
int *piVar10;
__dest = (int *)malloc((long)param_2 << 2);
if (0 < param_2) {
__dest = (int *)memcpy(__des... |
4,823 | func0 | #include <stdio.h>
#include <stdlib.h>
#include <assert.h>
| void func0(int *list1, int size, int n, int *result) {
int i, j, max_idx, temp;
// Make a copy of the array
int *copy = (int *)malloc(size * sizeof(int));
for (i = 0; i < size; i++) {
copy[i] = list1[i];
}
// Selection sort to find n largest elements
for (i = 0; i < n; i++) {... | int main() {
int list1[] = {10, 20, 50, 70, 90, 20, 50, 40, 60, 80, 100};
int size = sizeof(list1) / sizeof(list1[0]);
int result[5];
func0(list1, size, 2, result);
assert(result[0] == 100 && result[1] == 90);
func0(list1, size, 5, result);
assert(result[0] == 100 && result[1] == ... | O3 | c | func0:
endbr64
push %r14
push %r13
mov %rdi,%r13
movslq %esi,%rdi
push %r12
mov %rcx,%r12
push %rbp
mov %edx,%ebp
push %rbx
mov %rdi,%rbx
shl $0x2,%rdi
callq 10d0 <malloc@plt>
mov %rax,%r10
test %ebx,%ebx
jle 1373 <func0+0x43>
lea -0x1(%rbx),%eax
mov %r10,%rdi
mov %r13,%rsi
le... | func0:
endbr64
push r14
push r13
mov r13, rdi
movsxd rdi, esi
push r12
mov r12, rcx
push rbp
mov ebp, edx
push rbx
mov rbx, rdi
shl rdi, 2; size
call _malloc
mov r10, rax
test ebx, ebx
jle short loc_136E
mov edx, ebx
mov rsi, r13; src
mov rdi, rax; dest
shl ... | void func0(void *src, int a2, int a3, long long a4)
{
int *v7; // rax
int *v8; // r10
int *v9; // r11
int v10; // r9d
int v11; // r8d
int *v12; // r14
int v13; // esi
int v14; // edx
int *v15; // rax
int *v16; // rdi
v7 = (int *)malloc(4LL * a2);
v8 = v7;
if ( a2 > 0 )
v8 = (int *)memcpy... | func0:
ENDBR64
PUSH R14
PUSH R13
MOV R13,RDI
MOVSXD RDI,ESI
PUSH R12
MOV R12,RCX
PUSH RBP
MOV EBP,EDX
PUSH RBX
MOV RBX,RDI
SHL RDI,0x2
CALL 0x001010d0
MOV R10,RAX
TEST EBX,EBX
JLE 0x0010136e
MOV EDX,EBX
MOV RSI,R13
MOV RDI,RAX
SHL RDX,0x2
CALL 0x001010c0
MOV R10,RAX
LAB_0010136e:
MOV R11,R10
XOR R9D,R9D
TEST EBP,EBP
JL... | void func0(void *param_1,uint param_2,uint param_3,int *param_4)
{
int iVar1;
int *piVar2;
int *__dest;
uint uVar3;
uint uVar4;
int iVar5;
int iVar6;
int *piVar7;
uint uVar8;
uint uVar9;
int *piVar10;
__dest = (int *)malloc((long)(int)param_2 << 2);
if (0 < (int)param_2) {
__dest = (in... |
4,824 | func0 |
#include <assert.h>
| double func0(double r, double h) {
double lateralsurface = 2 * 3.1415 * r * h;
return lateralsurface;
}
| int main() {
assert(func0(10, 5) == 314.15000000000003);
assert(func0(4, 5) == 125.66000000000001);
assert(func0(4, 10) == 251.32000000000002);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
movsd %xmm0,-0x18(%rbp)
movsd %xmm1,-0x20(%rbp)
movsd -0x18(%rbp),%xmm1
movsd 0xf58(%rip),%xmm0
mulsd %xmm1,%xmm0
movsd -0x20(%rbp),%xmm1
mulsd %xmm1,%xmm0
movsd %xmm0,-0x8(%rbp)
movsd -0x8(%rbp),%xmm0
pop %rbp
retq
| func0:
endbr64
push rbp
mov rbp, rsp
movsd [rbp+var_18], xmm0
movsd [rbp+var_20], xmm1
movsd xmm1, [rbp+var_18]
movsd xmm0, cs:qword_20A0
mulsd xmm0, xmm1
movsd xmm1, [rbp+var_20]
mulsd xmm0, xmm1
movsd [rbp+var_8], xmm0
movsd xmm0, [rbp+var_8]
pop rbp
retn | double func0(double a1, double a2)
{
return 6.283 * a1 * a2;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOVSD qword ptr [RBP + -0x18],XMM0
MOVSD qword ptr [RBP + -0x20],XMM1
MOVSD XMM1,qword ptr [RBP + -0x18]
MOVSD XMM0,qword ptr [0x001020a0]
MULSD XMM0,XMM1
MOVSD XMM1,qword ptr [RBP + -0x20]
MULSD XMM0,XMM1
MOVSD qword ptr [RBP + -0x8],XMM0
MOVSD XMM0,qword ptr [RBP + -0x8]
POP RBP
RE... | double func0(double param_1,double param_2)
{
return DAT_001020a0 * param_1 * param_2;
} |
4,825 | func0 |
#include <assert.h>
| double func0(double r, double h) {
double lateralsurface = 2 * 3.1415 * r * h;
return lateralsurface;
}
| int main() {
assert(func0(10, 5) == 314.15000000000003);
assert(func0(4, 5) == 125.66000000000001);
assert(func0(4, 10) == 251.32000000000002);
return 0;
}
| O1 | c | func0:
endbr64
mulsd 0xed3(%rip),%xmm0
mulsd %xmm1,%xmm0
retq
| func0:
endbr64
mulsd xmm0, cs:qword_2008
mulsd xmm0, xmm1
retn | double func0(double a1, double a2)
{
return a1 * 6.283 * a2;
} | func0:
ENDBR64
MULSD XMM0,qword ptr [0x00102008]
MULSD XMM0,XMM1
RET | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
double func0(double param_1,double param_2)
{
return param_1 * _DAT_00102008 * param_2;
} |
4,826 | func0 |
#include <assert.h>
| double func0(double r, double h) {
double lateralsurface = 2 * 3.1415 * r * h;
return lateralsurface;
}
| int main() {
assert(func0(10, 5) == 314.15000000000003);
assert(func0(4, 5) == 125.66000000000001);
assert(func0(4, 10) == 251.32000000000002);
return 0;
}
| O2 | c | func0:
endbr64
mulsd 0xebc(%rip),%xmm0
mulsd %xmm1,%xmm0
retq
nopw %cs:0x0(%rax,%rax,1)
nopl 0x0(%rax,%rax,1)
| func0:
endbr64
mulsd xmm0, cs:qword_2008
mulsd xmm0, xmm1
retn | double func0(double a1, double a2)
{
return a1 * 6.283 * a2;
} | func0:
ENDBR64
MULSD XMM0,qword ptr [0x00102008]
MULSD XMM0,XMM1
RET | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
double func0(double param_1,double param_2)
{
return param_1 * _DAT_00102008 * param_2;
} |
4,827 | func0 |
#include <assert.h>
| double func0(double r, double h) {
double lateralsurface = 2 * 3.1415 * r * h;
return lateralsurface;
}
| int main() {
assert(func0(10, 5) == 314.15000000000003);
assert(func0(4, 5) == 125.66000000000001);
assert(func0(4, 10) == 251.32000000000002);
return 0;
}
| O3 | c | func0:
endbr64
mulsd 0xebc(%rip),%xmm0
mulsd %xmm1,%xmm0
retq
nopw %cs:0x0(%rax,%rax,1)
nopl 0x0(%rax,%rax,1)
| func0:
endbr64
mulsd xmm0, cs:qword_2008
mulsd xmm0, xmm1
retn | double func0(double a1, double a2)
{
return a1 * 6.283 * a2;
} | func0:
ENDBR64
MULSD XMM0,qword ptr [0x00102008]
MULSD XMM0,XMM1
RET | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
double func0(double param_1,double param_2)
{
return param_1 * _DAT_00102008 * param_2;
} |
4,828 | func0 |
#include <assert.h>
| double func0(double l) {
double volume = l * l * l;
return volume;
}
| int main() {
assert(func0(3) == 27);
assert(func0(2) == 8);
assert(func0(5) == 125);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
movsd %xmm0,-0x18(%rbp)
movsd -0x18(%rbp),%xmm0
mulsd %xmm0,%xmm0
movsd -0x18(%rbp),%xmm1
mulsd %xmm1,%xmm0
movsd %xmm0,-0x8(%rbp)
movsd -0x8(%rbp),%xmm0
pop %rbp
retq
| func0:
endbr64
push rbp
mov rbp, rsp
movsd [rbp+var_18], xmm0
movsd xmm0, [rbp+var_18]
mulsd xmm0, xmm0
movsd xmm1, [rbp+var_18]
mulsd xmm0, xmm1
movsd [rbp+var_8], xmm0
movsd xmm0, [rbp+var_8]
pop rbp
retn | double func0(double a1)
{
return a1 * a1 * a1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOVSD qword ptr [RBP + -0x18],XMM0
MOVSD XMM0,qword ptr [RBP + -0x18]
MULSD XMM0,XMM0
MOVSD XMM1,qword ptr [RBP + -0x18]
MULSD XMM0,XMM1
MOVSD qword ptr [RBP + -0x8],XMM0
MOVSD XMM0,qword ptr [RBP + -0x8]
POP RBP
RET | double func0(double param_1)
{
return param_1 * param_1 * param_1;
} |
4,829 | func0 |
#include <assert.h>
| double func0(double l) {
double volume = l * l * l;
return volume;
}
| int main() {
assert(func0(3) == 27);
assert(func0(2) == 8);
assert(func0(5) == 125);
return 0;
}
| O1 | c | func0:
endbr64
movapd %xmm0,%xmm1
mulsd %xmm0,%xmm0
mulsd %xmm1,%xmm0
retq
| func0:
endbr64
movapd xmm1, xmm0
mulsd xmm0, xmm0
mulsd xmm0, xmm1
retn | double func0(double a1)
{
return a1 * a1 * a1;
} | func0:
ENDBR64
MOVAPD XMM1,XMM0
MULSD XMM0,XMM0
MULSD XMM0,XMM1
RET | double func0(double param_1)
{
return param_1 * param_1 * param_1;
} |
4,830 | func0 |
#include <assert.h>
| double func0(double l) {
double volume = l * l * l;
return volume;
}
| int main() {
assert(func0(3) == 27);
assert(func0(2) == 8);
assert(func0(5) == 125);
return 0;
}
| O2 | c | func0:
endbr64
movapd %xmm0,%xmm1
mulsd %xmm0,%xmm0
mulsd %xmm1,%xmm0
retq
nopw %cs:0x0(%rax,%rax,1)
nopl 0x0(%rax,%rax,1)
| func0:
endbr64
movapd xmm1, xmm0
mulsd xmm0, xmm0
mulsd xmm0, xmm1
retn | double func0(double a1)
{
return a1 * a1 * a1;
} | func0:
ENDBR64
MOVAPD XMM1,XMM0
MULSD XMM0,XMM0
MULSD XMM0,XMM1
RET | double func0(double param_1)
{
return param_1 * param_1 * param_1;
} |
4,831 | func0 |
#include <assert.h>
| double func0(double l) {
double volume = l * l * l;
return volume;
}
| int main() {
assert(func0(3) == 27);
assert(func0(2) == 8);
assert(func0(5) == 125);
return 0;
}
| O3 | c | func0:
endbr64
movapd %xmm0,%xmm1
mulsd %xmm0,%xmm0
mulsd %xmm1,%xmm0
retq
nopw %cs:0x0(%rax,%rax,1)
nopl 0x0(%rax,%rax,1)
| func0:
endbr64
movapd xmm1, xmm0
mulsd xmm0, xmm0
mulsd xmm0, xmm1
retn | double func0(double a1)
{
return a1 * a1 * a1;
} | func0:
ENDBR64
MOVAPD XMM1,XMM0
MULSD XMM0,XMM0
MULSD XMM0,XMM1
RET | double func0(double param_1)
{
return param_1 * param_1 * param_1;
} |
4,832 | func0 |
#include <assert.h>
| int func0(int n) {
int count = 0;
int res = 0;
int temp = n;
while (temp > 0) {
if (count % 2 == 1) {
res |= (1 << count);
}
count++;
temp >>= 1;
}
return (n | res);
}
| int main() {
assert(func0(10) == 10);
assert(func0(20) == 30);
assert(func0(30) == 30);
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 1195 <func0+0x4c>
mov -0xc(%rbp),%eax
cltd
shr $0x1f,%edx
add %edx,%eax
and $0x1,%eax
sub %edx,%eax
cmp $0x1,%eax
jne 118e <func0+0... | 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_119B
loc_116A:
mov edx, [rbp+var_C]
mov eax, edx
sar eax, 1Fh
shr eax, 1Fh
add edx, eax
and edx, 1
sub edx,... | long long func0(int a1)
{
int v2; // [rsp+8h] [rbp-Ch]
int v3; // [rsp+Ch] [rbp-8h]
int i; // [rsp+10h] [rbp-4h]
v2 = 0;
v3 = 0;
for ( i = a1; i > 0; i >>= 1 )
{
if ( v2 % 2 == 1 )
v3 |= 1 << v2;
++v2;
}
return v3 | (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 0x0010119b
LAB_0010116a:
MOV EDX,dword ptr [RBP + -0xc]
MOV EAX,EDX
SAR EAX,0x1f
SHR EAX,0x1f
ADD EDX,EAX
AND EDX,0x1
SUB E... | uint func0(uint param_1)
{
int4 local_14;
int4 local_10;
int4 local_c;
local_14 = 0;
local_10 = 0;
for (local_c = param_1; 0 < (int)local_c; local_c = (int)local_c >> 1) {
if (local_14 % 2 == 1) {
local_10 = local_10 | 1 << ((byte)local_14 & 0x1f);
}
local_14 = local_14 + 1;
}
retu... |
4,833 | func0 |
#include <assert.h>
| int func0(int n) {
int count = 0;
int res = 0;
int temp = n;
while (temp > 0) {
if (count % 2 == 1) {
res |= (1 << count);
}
count++;
temp >>= 1;
}
return (n | res);
}
| int main() {
assert(func0(10) == 10);
assert(func0(20) == 30);
assert(func0(30) == 30);
return 0;
}
| O1 | c | func0:
endbr64
mov %edi,%r10d
mov %edi,%esi
mov $0x0,%ecx
mov $0x0,%eax
mov $0x1,%r9d
test %edi,%edi
jle 1193 <func0+0x4a>
add $0x1,%ecx
sar %esi
test %esi,%esi
jle 1193 <func0+0x4a>
mov %ecx,%r8d
shr $0x1f,%r8d
lea (%rcx,%r8,1),%edx
and $0x1,%edx
sub %r8d,%edx
mov %eax,... | func0:
endbr64
mov eax, edi
mov r8d, edi
mov ecx, 0
mov esi, 0
mov r11d, 1
test edi, edi
jg short loc_118C
jmp short loc_1197
loc_1168:
mov r9d, ecx
shr r9d, 1Fh
lea edx, [rcx+r9]
and edx, 1
sub edx, r9d
mov r9d, esi
mov r10d, r11d
shl r10d, cl
or esi... | long long func0(int a1)
{
int v1; // r8d
int v2; // ecx
int v3; // esi
int v4; // r9d
v1 = a1;
v2 = 0;
v3 = 0;
if ( a1 > 0 )
{
while ( 1 )
{
++v2;
v1 >>= 1;
if ( v1 <= 0 )
break;
v4 = v3;
v3 |= 1 << v2;
if ( v2 % 2 != 1 )
v3 = v4;
}
}... | func0:
ENDBR64
MOV EAX,EDI
MOV R8D,EDI
MOV ECX,0x0
MOV ESI,0x0
MOV R11D,0x1
TEST EDI,EDI
JG 0x0010118c
JMP 0x00101197
LAB_00101168:
MOV R9D,ECX
SHR R9D,0x1f
LEA EDX,[RCX + R9*0x1]
AND EDX,0x1
SUB EDX,R9D
MOV R9D,ESI
MOV R10D,R11D
SHL R10D,CL
OR ESI,R10D
CMP EDX,0x1
CMOVNZ ESI,R9D
LAB_0010118c:
ADD ECX,0x1
SAR R8D,0x1
T... | uint func0(uint param_1)
{
uint uVar1;
int iVar2;
uint uVar3;
uint uVar4;
iVar2 = 0;
uVar3 = 0;
uVar4 = param_1;
uVar1 = uVar3;
if (0 < (int)param_1) {
while( true ) {
uVar3 = uVar1;
iVar2 = iVar2 + 1;
uVar4 = (int)uVar4 >> 1;
if ((int)uVar4 < 1) break;
uVar1 = uV... |
4,834 | func0 |
#include <assert.h>
| int func0(int n) {
int count = 0;
int res = 0;
int temp = n;
while (temp > 0) {
if (count % 2 == 1) {
res |= (1 << count);
}
count++;
temp >>= 1;
}
return (n | res);
}
| int main() {
assert(func0(10) == 10);
assert(func0(20) == 30);
assert(func0(30) == 30);
return 0;
}
| O2 | c | func0:
endbr64
mov %edi,%edx
xor %ecx,%ecx
xor %eax,%eax
mov $0x1,%r8d
test %edi,%edi
jle 1178 <func0+0x38>
add $0x1,%ecx
sar %edx
je 116e <func0+0x2e>
test $0x1,%cl
je 1154 <func0+0x14>
mov %r8d,%esi
shl %cl,%esi
add $0x1,%ecx
or %esi,%eax
sar %edx
jne 115b <func0+0x... | func0:
endbr64
mov edx, edi
xor ecx, ecx
xor eax, eax
mov r8d, 1
test edi, edi
jle short loc_1228
nop dword ptr [rax+00h]
loc_1208:
add ecx, 1
sar edx, 1
jz short loc_1222
loc_120F:
test cl, 1
jz short loc_1208
mov esi, r8d
shl esi, cl
add ecx, 1
or eax, ... | long long func0(int a1)
{
int v1; // edx
int v2; // ecx
unsigned int v3; // eax
int v4; // esi
v1 = a1;
v2 = 0;
v3 = 0;
if ( a1 <= 0 )
return (unsigned int)a1;
while ( 1 )
{
++v2;
v1 >>= 1;
if ( !v1 )
break;
while ( (v2 & 1) != 0 )
{
v4 = 1 << v2++;
v3 |= ... | func0:
ENDBR64
MOV EDX,EDI
XOR ECX,ECX
XOR EAX,EAX
MOV R8D,0x1
TEST EDI,EDI
JLE 0x00101228
NOP dword ptr [RAX]
LAB_00101208:
ADD ECX,0x1
SAR EDX,0x1
JZ 0x00101222
LAB_0010120f:
TEST CL,0x1
JZ 0x00101208
MOV ESI,R8D
SHL ESI,CL
ADD ECX,0x1
OR EAX,ESI
SAR EDX,0x1
JNZ 0x0010120f
LAB_00101222:
OR EAX,EDI
RET
LAB_00101228:
M... | uint func0(uint param_1)
{
bool bVar1;
uint uVar2;
uint uVar3;
bVar1 = false;
uVar2 = 0;
uVar3 = param_1;
if ((int)param_1 < 1) {
return param_1;
}
while (uVar3 = (int)uVar3 >> 1, uVar3 != 0) {
while( true ) {
bVar1 = (bool)(bVar1 ^ 1);
if (!bVar1) break;
uVar2 = uVar2 | ... |
4,835 | func0 |
#include <assert.h>
| int func0(int n) {
int count = 0;
int res = 0;
int temp = n;
while (temp > 0) {
if (count % 2 == 1) {
res |= (1 << count);
}
count++;
temp >>= 1;
}
return (n | res);
}
| int main() {
assert(func0(10) == 10);
assert(func0(20) == 30);
assert(func0(30) == 30);
return 0;
}
| O3 | c | func0:
endbr64
test %edi,%edi
jle 1180 <func0+0x40>
mov %edi,%edx
sar %edx
je 1188 <func0+0x48>
mov $0x1,%ecx
xor %eax,%eax
mov $0x1,%r8d
nopl 0x0(%rax,%rax,1)
test $0x1,%cl
je 116c <func0+0x2c>
mov %r8d,%esi
shl %cl,%esi
or %esi,%eax
add $0x1,%ecx
sar %edx
jne 1160 <f... | func0:
endbr64
test edi, edi
jle short loc_1178
mov edx, edi
xor esi, esi
xor ecx, ecx
mov eax, 1
nop dword ptr [rax+rax+00h]
loc_1158:
test cl, 1
jz 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
int v2; // esi
char v3; // cl
if ( a1 <= 0 )
return (unsigned int)a1;
v1 = a1;
v2 = 0;
v3 = 0;
do
{
if ( (v3 & 1) != 0 )
v2 |= 1 << v3;
++v3;
v1 >>= 1;
}
while ( v1 );
return v2 | (unsigned int)a1;
} | func0:
ENDBR64
TEST EDI,EDI
JLE 0x00101178
MOV EDX,EDI
XOR ESI,ESI
XOR ECX,ECX
MOV EAX,0x1
NOP dword ptr [RAX + RAX*0x1]
LAB_00101158:
TEST CL,0x1
JZ 0x00101166
MOV R8D,EAX
SHL R8D,CL
OR ESI,R8D
LAB_00101166:
ADD ECX,0x1
SAR EDX,0x1
JNZ 0x00101158
MOV EAX,EDI
OR 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) {
uVar3 = 0;
bVar1 = 0;
uVar2 = param_1;
do {
if ((bool)(bVar1 & 1)) {
uVar3 = uVar3 | 1 << (bVar1 & 0x1f);
}
bVar1 = bVar1 + 1;
uVar2 = (int)uVar2 >> 1;
} while (uVar2 !=... |
4,836 | func0 |
#include <assert.h>
| int func0(int N, int K) {
if (N < K) {
return -1;
} else {
int Tri_up = ((N - K + 1) * (N - K + 2)) / 2;
int Tri_down = ((N - 2 * K + 1) * (N - 2 * K + 2)) / 2;
return Tri_up + Tri_down;
}
}
| int main() {
assert(func0(4,2) == 7);
assert(func0(4,3) == 3);
assert(func0(1,3) == -1);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
mov %esi,-0x18(%rbp)
mov -0x14(%rbp),%eax
cmp -0x18(%rbp),%eax
jge 1166 <func0+0x1d>
mov $0xffffffff,%eax
jmp 11ba <func0+0x71>
mov -0x14(%rbp),%eax
sub -0x18(%rbp),%eax
lea 0x1(%rax),%edx
mov -0x14(%rbp),%eax
sub -0x18... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_18], esi
mov eax, [rbp+var_14]
cmp eax, [rbp+var_18]
jge short loc_1166
mov eax, 0FFFFFFFFh
jmp short loc_11B8
loc_1166:
mov eax, [rbp+var_14]
sub eax, [rbp+var_18]
lea edx, [rax+1]
mov eax, [rbp+v... | long long func0(int a1, int a2)
{
if ( a1 >= a2 )
return (unsigned int)((a1 - a2 + 1) * (a1 - a2 + 2) / 2 + (a1 - 2 * a2 + 1) * (a1 - 2 * a2 + 2) / 2);
else
return 0xFFFFFFFFLL;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x18],ESI
MOV EAX,dword ptr [RBP + -0x14]
CMP EAX,dword ptr [RBP + -0x18]
JGE 0x00101166
MOV EAX,0xffffffff
JMP 0x001011b8
LAB_00101166:
MOV EAX,dword ptr [RBP + -0x14]
SUB EAX,dword ptr [RBP + -0x18]
LEA EDX,[RAX + 0x1]
MOV EAX,d... | int func0(int param_1,int param_2)
{
int iVar1;
if (param_1 < param_2) {
iVar1 = -1;
}
else {
iVar1 = ((param_1 + param_2 * -2 + 2) * (param_1 + param_2 * -2 + 1)) / 2 +
(((param_1 - param_2) + 2) * ((param_1 - param_2) + 1)) / 2;
}
return iVar1;
} |
4,837 | func0 |
#include <assert.h>
| int func0(int N, int K) {
if (N < K) {
return -1;
} else {
int Tri_up = ((N - K + 1) * (N - K + 2)) / 2;
int Tri_down = ((N - 2 * K + 1) * (N - 2 * K + 2)) / 2;
return Tri_up + Tri_down;
}
}
| int main() {
assert(func0(4,2) == 7);
assert(func0(4,3) == 3);
assert(func0(1,3) == -1);
return 0;
}
| O1 | c | func0:
endbr64
cmp %esi,%edi
jl 1160 <func0+0x37>
sub %esi,%edi
mov %edi,%edx
sub %esi,%edx
lea 0x1(%rdi),%eax
add $0x2,%edi
imul %eax,%edi
mov %edi,%eax
shr $0x1f,%eax
add %edi,%eax
sar %eax
mov %eax,%edi
lea 0x1(%rdx),%eax
add $0x2,%edx
imul %eax,%edx
mov %edx,%eax
sh... | func0:
endbr64
cmp edi, esi
jl short loc_115E
sub edi, esi
mov edx, edi
sub edx, esi
lea ecx, [rdi+1]
add edi, 2
imul ecx, edi
mov eax, ecx
shr eax, 1Fh
add eax, ecx
sar eax, 1
lea ecx, [rdx+1]
add edx, 2
imul ecx, edx
mov edx, ecx
shr edx, 1Fh
add ... | long long func0(int a1, int a2)
{
if ( a1 < a2 )
return 0xFFFFFFFFLL;
else
return (unsigned int)((a1 - a2 - a2 + 2) * (a1 - a2 - a2 + 1) / 2 + (a1 - a2 + 2) * (a1 - a2 + 1) / 2);
} | func0:
ENDBR64
CMP EDI,ESI
JL 0x0010115e
SUB EDI,ESI
MOV EDX,EDI
SUB EDX,ESI
LEA ECX,[RDI + 0x1]
ADD EDI,0x2
IMUL ECX,EDI
MOV EAX,ECX
SHR EAX,0x1f
ADD EAX,ECX
SAR EAX,0x1
LEA ECX,[RDX + 0x1]
ADD EDX,0x2
IMUL ECX,EDX
MOV EDX,ECX
SHR EDX,0x1f
ADD EDX,ECX
SAR EDX,0x1
ADD EAX,EDX
RET
LAB_0010115e:
MOV EAX,0xffffffff
RET | int func0(int param_1,int param_2)
{
if (param_2 <= param_1) {
param_1 = param_1 - param_2;
return ((param_1 + 1) * (param_1 + 2)) / 2 +
(((param_1 - param_2) + 1) * ((param_1 - param_2) + 2)) / 2;
}
return -1;
} |
4,838 | func0 |
#include <assert.h>
| int func0(int N, int K) {
if (N < K) {
return -1;
} else {
int Tri_up = ((N - K + 1) * (N - K + 2)) / 2;
int Tri_down = ((N - 2 * K + 1) * (N - 2 * K + 2)) / 2;
return Tri_up + Tri_down;
}
}
| int main() {
assert(func0(4,2) == 7);
assert(func0(4,3) == 3);
assert(func0(1,3) == -1);
return 0;
}
| O2 | c | func0:
endbr64
cmp %esi,%edi
jl 1170 <func0+0x30>
sub %esi,%edi
mov %edi,%edx
lea 0x1(%rdi),%eax
add $0x2,%edi
sub %esi,%edx
imul %eax,%edi
lea 0x1(%rdx),%eax
add $0x2,%edx
imul %eax,%edx
sar %edi
mov %edx,%eax
shr $0x1f,%eax
add %edx,%eax
sar %eax
add %edi,%eax
retq
xc... | func0:
endbr64
cmp edi, esi
jl short loc_1170
sub edi, esi
mov edx, edi
lea eax, [rdi+1]
add edi, 2
sub edx, esi
imul eax, edi
lea ecx, [rdx+1]
add edx, 2
imul ecx, edx
sar eax, 1
mov edx, ecx
shr edx, 1Fh
add edx, ecx
sar edx, 1
add eax, edx
retn
loc_1... | long long func0(int a1, int a2)
{
if ( a1 < a2 )
return 0xFFFFFFFFLL;
else
return (unsigned int)((a1 - a2 - a2 + 2) * (a1 - a2 - a2 + 1) / 2 + (((a1 - a2 + 2) * (a1 - a2 + 1)) >> 1));
} | func0:
ENDBR64
CMP EDI,ESI
JL 0x00101170
SUB EDI,ESI
MOV EDX,EDI
LEA EAX,[RDI + 0x1]
ADD EDI,0x2
SUB EDX,ESI
IMUL EAX,EDI
LEA ECX,[RDX + 0x1]
ADD EDX,0x2
IMUL ECX,EDX
SAR EAX,0x1
MOV EDX,ECX
SHR EDX,0x1f
ADD EDX,ECX
SAR EDX,0x1
ADD EAX,EDX
RET
LAB_00101170:
MOV EAX,0xffffffff
RET | int func0(int param_1,int param_2)
{
if (param_2 <= param_1) {
param_1 = param_1 - param_2;
return ((param_1 + 1) * (param_1 + 2) >> 1) +
(((param_1 - param_2) + 1) * ((param_1 - param_2) + 2)) / 2;
}
return -1;
} |
4,839 | func0 |
#include <assert.h>
| int func0(int N, int K) {
if (N < K) {
return -1;
} else {
int Tri_up = ((N - K + 1) * (N - K + 2)) / 2;
int Tri_down = ((N - 2 * K + 1) * (N - 2 * K + 2)) / 2;
return Tri_up + Tri_down;
}
}
| int main() {
assert(func0(4,2) == 7);
assert(func0(4,3) == 3);
assert(func0(1,3) == -1);
return 0;
}
| O3 | c | func0:
endbr64
cmp %esi,%edi
jl 1170 <func0+0x30>
sub %esi,%edi
mov %edi,%edx
lea 0x1(%rdi),%eax
add $0x2,%edi
sub %esi,%edx
imul %eax,%edi
lea 0x1(%rdx),%eax
add $0x2,%edx
imul %eax,%edx
sar %edi
mov %edx,%eax
shr $0x1f,%eax
add %edx,%eax
sar %eax
add %edi,%eax
retq
xc... | func0:
endbr64
cmp edi, esi
jl short loc_1170
sub edi, esi
mov edx, edi
lea eax, [rdi+1]
add edi, 2
sub edx, esi
imul eax, edi
lea ecx, [rdx+1]
add edx, 2
imul ecx, edx
sar eax, 1
mov edx, ecx
shr edx, 1Fh
add edx, ecx
sar edx, 1
add eax, edx
retn
loc_1... | long long func0(int a1, int a2)
{
if ( a1 < a2 )
return 0xFFFFFFFFLL;
else
return (unsigned int)((a1 - a2 - a2 + 2) * (a1 - a2 - a2 + 1) / 2 + (((a1 - a2 + 2) * (a1 - a2 + 1)) >> 1));
} | func0:
ENDBR64
CMP EDI,ESI
JL 0x00101170
SUB EDI,ESI
MOV EDX,EDI
LEA EAX,[RDI + 0x1]
ADD EDI,0x2
SUB EDX,ESI
IMUL EAX,EDI
LEA ECX,[RDX + 0x1]
ADD EDX,0x2
IMUL ECX,EDX
SAR EAX,0x1
MOV EDX,ECX
SHR EDX,0x1f
ADD EDX,ECX
SAR EDX,0x1
ADD EAX,EDX
RET
LAB_00101170:
MOV EAX,0xffffffff
RET | int func0(int param_1,int param_2)
{
if (param_2 <= param_1) {
param_1 = param_1 - param_2;
return ((param_1 + 1) * (param_1 + 2) >> 1) +
(((param_1 - param_2) + 1) * ((param_1 - param_2) + 2)) / 2;
}
return -1;
} |
4,840 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
typedef struct {
int first;
int second;
} pair;
typedef struct {
int first;
int second;
int count;
} pair_count;
// Comparison function for qsort
int compare_pairs(const void* a, const void* b) {
pair* pa = (pair*)a... | int func0(pair_count* a, int size_a, pair_count* b, int size_b) {
if(size_a != size_b)
return 0;
for(int i = 0; i < size_a; i++) {
if(a[i].first != b[i].first || a[i].second != b[i].second || a[i].count != b[i].count)
return 0;
}
return 1;
}
| int main() {
// First test case
pair test1[] = { {3,1}, {1,3}, {2,5}, {5,2}, {6,3} };
int size1 = sizeof(test1)/sizeof(pair);
int out_size1;
pair_count* res1 = check_occurences(test1, size1, &out_size1);
pair_count expected1[] = { {1,3,2}, {2,5,2}, {3,6,1} };
assert(func0(res1, out_si... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
mov %rdx,-0x28(%rbp)
mov %ecx,-0x20(%rbp)
mov -0x1c(%rbp),%eax
cmp -0x20(%rbp),%eax
je 14ba <func0+0x28>
mov $0x0,%eax
jmpq 15b0 <func0+0x11e>
movl $0x0,-0x4(%rbp)
jmpq 159f <func0+0x10d>
mov -0x4(%rb... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_28], rdx
mov [rbp+var_20], ecx
mov eax, [rbp+var_1C]
cmp eax, [rbp+var_20]
jz short loc_14BD
mov eax, 0
jmp loc_15B3
loc_14BD:
mov [rbp+var_4], 0
jmp loc_15A2
loc_14C9:
mov ... | long long func0(long long a1, int a2, long long a3, int a4)
{
int i; // [rsp+24h] [rbp-4h]
if ( a2 != a4 )
return 0LL;
for ( i = 0; i < a2; ++i )
{
if ( *(_DWORD *)(12LL * i + a1) != *(_DWORD *)(12LL * i + a3)
|| *(_DWORD *)(12LL * i + a1 + 4) != *(_DWORD *)(12LL * i + a3 + 4)
|| *(_DWORD ... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV qword ptr [RBP + -0x28],RDX
MOV dword ptr [RBP + -0x20],ECX
MOV EAX,dword ptr [RBP + -0x1c]
CMP EAX,dword ptr [RBP + -0x20]
JZ 0x001014bd
MOV EAX,0x0
JMP 0x001015b3
LAB_001014bd:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x... | int8 func0(long param_1,int param_2,long param_3,int param_4)
{
int8 uVar1;
int local_c;
if (param_2 == param_4) {
for (local_c = 0; local_c < param_2; local_c = local_c + 1) {
if (((*(int *)(param_1 + (long)local_c * 0xc) != *(int *)(param_3 + (long)local_c * 0xc)) ||
(*(int *)(param_1 + ... |
4,841 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
typedef struct {
int first;
int second;
} pair;
typedef struct {
int first;
int second;
int count;
} pair_count;
// Comparison function for qsort
int compare_pairs(const void* a, const void* b) {
pair* pa = (pair*)a... | int func0(pair_count* a, int size_a, pair_count* b, int size_b) {
if(size_a != size_b)
return 0;
for(int i = 0; i < size_a; i++) {
if(a[i].first != b[i].first || a[i].second != b[i].second || a[i].count != b[i].count)
return 0;
}
return 1;
}
| int main() {
// First test case
pair test1[] = { {3,1}, {1,3}, {2,5}, {5,2}, {6,3} };
int size1 = sizeof(test1)/sizeof(pair);
int out_size1;
pair_count* res1 = check_occurences(test1, size1, &out_size1);
pair_count expected1[] = { {1,3,2}, {2,5,2}, {3,6,1} };
assert(func0(res1, out_si... | O1 | c | func0:
endbr64
mov $0x0,%eax
cmp %ecx,%esi
jne 1335 <func0+0x64>
test %esi,%esi
jle 131e <func0+0x4d>
mov %rdi,%rax
lea -0x1(%rsi),%ecx
lea (%rcx,%rcx,2),%rcx
lea 0xc(%rdi,%rcx,4),%rdi
mov (%rdx),%r8d
cmp %r8d,(%rax)
jne 1324 <func0+0x53>
mov 0x4(%rdx),%r9d
cmp %r9d,0x4(%rax)
jn... | func0:
endbr64
mov eax, 0
cmp esi, ecx
jnz short locret_1335
test esi, esi
jle short loc_131E
mov rax, rdi
lea ecx, [rsi-1]
lea rcx, [rcx+rcx*2]
lea rdi, [rdi+rcx*4+0Ch]
loc_12F1:
mov r8d, [rdx]
cmp [rax], r8d
jnz short loc_1324
mov r9d, [rdx+4]
cmp [rax+4], r9d
jn... | long long func0(_DWORD *a1, int a2, _DWORD *a3, int a4)
{
long long result; // rax
_DWORD *v5; // rax
long long v6; // rdi
result = 0LL;
if ( a2 == a4 )
{
if ( a2 <= 0 )
{
return 1LL;
}
else
{
v5 = a1;
v6 = (long long)&a1[3 * (a2 - 1) + 3];
while ( 1 )
{
... | func0:
ENDBR64
MOV EAX,0x0
CMP ESI,ECX
JNZ 0x00101335
TEST ESI,ESI
JLE 0x0010131e
MOV RAX,RDI
LEA ECX,[RSI + -0x1]
LEA RCX,[RCX + RCX*0x2]
LEA RDI,[RDI + RCX*0x4 + 0xc]
LAB_001012f1:
MOV R8D,dword ptr [RDX]
CMP dword ptr [RAX],R8D
JNZ 0x00101324
MOV R9D,dword ptr [RDX + 0x4]
CMP dword ptr [RAX + 0x4],R9D
JNZ 0x0010132a... | int8 func0(int *param_1,int param_2,int *param_3,int param_4)
{
int *piVar1;
if (param_2 == param_4) {
if (param_2 < 1) {
return 1;
}
piVar1 = param_1 + (ulong)(param_2 - 1) * 3 + 3;
while( true ) {
if (*param_1 != *param_3) {
return 0;
}
if (param_1[1] != param_3... |
4,842 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
typedef struct {
int first;
int second;
} pair;
typedef struct {
int first;
int second;
int count;
} pair_count;
// Comparison function for qsort
int compare_pairs(const void* a, const void* b) {
pair* pa = (pair*)a... | int func0(pair_count* a, int size_a, pair_count* b, int size_b) {
if(size_a != size_b)
return 0;
for(int i = 0; i < size_a; i++) {
if(a[i].first != b[i].first || a[i].second != b[i].second || a[i].count != b[i].count)
return 0;
}
return 1;
}
| int main() {
// First test case
pair test1[] = { {3,1}, {1,3}, {2,5}, {5,2}, {6,3} };
int size1 = sizeof(test1)/sizeof(pair);
int out_size1;
pair_count* res1 = check_occurences(test1, size1, &out_size1);
pair_count expected1[] = { {1,3,2}, {2,5,2}, {3,6,1} };
assert(func0(res1, out_si... | O2 | c | func0:
endbr64
cmp %ecx,%esi
jne 1690 <func0+0x10>
jmpq 1520 <func0.part.0>
nopl (%rax)
xor %eax,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
nopl (%rax)
| func0_part_0:
test esi, esi
jle short loc_1560
lea eax, [rsi-1]
lea rax, [rax+rax*2]
lea rax, [rdi+rax*4+0Ch]
jmp short loc_1555
loc_1538:
mov esi, [rdx+4]
cmp [rdi+4], esi
jnz short loc_155B
mov ecx, [rdx+8]
cmp [rdi+8], ecx
jnz short loc_155B
add rdi, 0Ch
add rdx... | long long func0_part_0(_DWORD *a1, int a2, _DWORD *a3)
{
long long v3; // rax
if ( a2 <= 0 )
return 1LL;
v3 = (long long)&a1[3 * (a2 - 1) + 3];
while ( *a1 == *a3 && a1[1] == a3[1] && a1[2] == a3[2] )
{
a1 += 3;
a3 += 3;
if ( a1 == (_DWORD *)v3 )
return 1LL;
}
return 0LL;
} | func0.part.0:
TEST ESI,ESI
JLE 0x00101560
LEA EAX,[RSI + -0x1]
LEA RAX,[RAX + RAX*0x2]
LEA RAX,[RDI + RAX*0x4 + 0xc]
JMP 0x00101555
LAB_00101538:
MOV ESI,dword ptr [RDX + 0x4]
CMP dword ptr [RDI + 0x4],ESI
JNZ 0x0010155b
MOV ECX,dword ptr [RDX + 0x8]
CMP dword ptr [RDI + 0x8],ECX
JNZ 0x0010155b
ADD RDI,0xc
ADD RDX,0xc
... | int8 func0_part_0(int *param_1,int param_2,int *param_3)
{
int *piVar1;
if (0 < param_2) {
piVar1 = param_1 + (ulong)(param_2 - 1) * 3 + 3;
do {
if (((*param_1 != *param_3) || (param_1[1] != param_3[1])) || (param_1[2] != param_3[2])) {
return 0;
}
param_1 = param_1 + 3;
... |
4,843 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
typedef struct {
int first;
int second;
} pair;
typedef struct {
int first;
int second;
int count;
} pair_count;
// Comparison function for qsort
int compare_pairs(const void* a, const void* b) {
pair* pa = (pair*)a... | int func0(pair_count* a, int size_a, pair_count* b, int size_b) {
if(size_a != size_b)
return 0;
for(int i = 0; i < size_a; i++) {
if(a[i].first != b[i].first || a[i].second != b[i].second || a[i].count != b[i].count)
return 0;
}
return 1;
}
| int main() {
// First test case
pair test1[] = { {3,1}, {1,3}, {2,5}, {5,2}, {6,3} };
int size1 = sizeof(test1)/sizeof(pair);
int out_size1;
pair_count* res1 = check_occurences(test1, size1, &out_size1);
pair_count expected1[] = { {1,3,2}, {2,5,2}, {3,6,1} };
assert(func0(res1, out_si... | O3 | c | func0:
endbr64
xor %eax,%eax
cmp %ecx,%esi
jne 1615 <func0+0x45>
test %esi,%esi
jle 1620 <func0+0x50>
lea -0x1(%rsi),%eax
lea (%rax,%rax,2),%rax
lea 0xc(%rdi,%rax,4),%rax
jmp 160d <func0+0x3d>
nopl 0x0(%rax)
mov 0x4(%rdx),%esi
cmp %esi,0x4(%rdi)
jne 1613 <func0+0x43>
mov 0x8(%rdx... | func0_part_0:
test esi, esi
jle short loc_14A0
movsxd rsi, esi
lea rax, [rsi+rsi*2]
lea rax, [rdi+rax*4]
jmp short loc_1495
loc_1478:
mov esi, [rdx+4]
cmp [rdi+4], esi
jnz short loc_149B
mov ecx, [rdx+8]
cmp [rdi+8], ecx
jnz short loc_149B
add rdi, 0Ch
add rdx, 0Ch
cm... | long long func0_part_0(_DWORD *a1, int a2, _DWORD *a3)
{
_DWORD *v3; // rax
if ( a2 <= 0 )
return 1LL;
v3 = &a1[3 * a2];
while ( *a1 == *a3 && a1[1] == a3[1] && a1[2] == a3[2] )
{
a1 += 3;
a3 += 3;
if ( a1 == v3 )
return 1LL;
}
return 0LL;
} | func0.part.0:
TEST ESI,ESI
JLE 0x001014a0
MOVSXD RSI,ESI
LEA RAX,[RSI + RSI*0x2]
LEA RAX,[RDI + RAX*0x4]
JMP 0x00101495
LAB_00101478:
MOV ESI,dword ptr [RDX + 0x4]
CMP dword ptr [RDI + 0x4],ESI
JNZ 0x0010149b
MOV ECX,dword ptr [RDX + 0x8]
CMP dword ptr [RDI + 0x8],ECX
JNZ 0x0010149b
ADD RDI,0xc
ADD RDX,0xc
CMP RDI,RAX
... | int8 func0_part_0(int *param_1,int param_2,int *param_3)
{
int *piVar1;
if (0 < param_2) {
piVar1 = param_1 + (long)param_2 * 3;
do {
if (((*param_1 != *param_3) || (param_1[1] != param_3[1])) || (param_1[2] != param_3[2])) {
return 0;
}
param_1 = param_1 + 3;
param_3 = p... |
4,844 | func0 |
#include <assert.h>
#include <string.h>
| int func0(const char* str) {
int str_len = strlen(str);
return (str_len * (str_len + 1)) / 2;
}
| int main() {
assert(func0("abc") == 6);
assert(func0("abcd") == 10);
assert(func0("abcde") == 15);
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 1060 <strlen@plt>
mov %eax,-0x4(%rbp)
mov -0x4(%rbp),%eax
add $0x1,%eax
imul -0x4(%rbp),%eax
mov %eax,%edx
shr $0x1f,%edx
add %edx,%eax
sar %eax
leaveq
retq
| 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]
add eax, 1
imul eax, [rbp+var_4]
mov edx, eax
shr edx, 1Fh
add eax, edx
sar eax, 1
leave
retn | long long func0(const char *a1)
{
int v2; // [rsp+1Ch] [rbp-4h]
v2 = strlen(a1);
return (unsigned int)(v2 * (v2 + 1) / 2);
} | 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 0x00101060
MOV dword ptr [RBP + -0x4],EAX
MOV EAX,dword ptr [RBP + -0x4]
ADD EAX,0x1
IMUL EAX,dword ptr [RBP + -0x4]
MOV EDX,EAX
SHR EDX,0x1f
ADD EAX,EDX
SAR EAX,0x1
LEAVE
RET | int func0(char *param_1)
{
size_t sVar1;
sVar1 = strlen(param_1);
return (((int)sVar1 + 1) * (int)sVar1) / 2;
} |
4,845 | func0 |
#include <assert.h>
#include <string.h>
| int func0(const char* str) {
int str_len = strlen(str);
return (str_len * (str_len + 1)) / 2;
}
| int main() {
assert(func0("abc") == 6);
assert(func0("abcd") == 10);
assert(func0("abcde") == 15);
return 0;
}
| O1 | c | func0:
endbr64
mov $0xffffffffffffffff,%rcx
mov $0x0,%eax
repnz scas %es:(%rdi),%al
not %rcx
lea -0x1(%rcx),%rax
imul %eax,%ecx
mov %ecx,%eax
shr $0x1f,%eax
add %ecx,%eax
sar %eax
retq
| func0:
endbr64
sub rsp, 8
call _strlen
lea edx, [rax+1]
imul edx, eax
mov eax, edx
shr eax, 1Fh
add eax, edx
sar eax, 1
add rsp, 8
retn | long long func0()
{
int v0; // eax
v0 = strlen();
return (unsigned int)(v0 * (v0 + 1) / 2);
} | func0:
ENDBR64
SUB RSP,0x8
CALL 0x00101060
LEA EDX,[RAX + 0x1]
IMUL EDX,EAX
MOV EAX,EDX
SHR EAX,0x1f
ADD EAX,EDX
SAR EAX,0x1
ADD RSP,0x8
RET | int func0(char *param_1)
{
size_t sVar1;
sVar1 = strlen(param_1);
return (((int)sVar1 + 1) * (int)sVar1) / 2;
} |
4,846 | func0 |
#include <assert.h>
#include <string.h>
| int func0(const char* str) {
int str_len = strlen(str);
return (str_len * (str_len + 1)) / 2;
}
| int main() {
assert(func0("abc") == 6);
assert(func0("abcd") == 10);
assert(func0("abcde") == 15);
return 0;
}
| O2 | c | func0:
endbr64
sub $0x8,%rsp
callq 1050 <strlen@plt>
add $0x8,%rsp
mov %rax,%rdx
lea 0x1(%rax),%eax
imul %eax,%edx
mov %edx,%eax
shr $0x1f,%eax
add %edx,%eax
sar %eax
retq
nopw %cs:0x0(%rax,%rax,1)
xchg %ax,%ax
| func0:
endbr64
sub rsp, 8
call _strlen
add rsp, 8
lea edx, [rax+1]
imul edx, eax
mov eax, edx
shr eax, 1Fh
add eax, edx
sar eax, 1
retn | long long func0()
{
int v0; // eax
v0 = strlen();
return (unsigned int)(v0 * (v0 + 1) / 2);
} | func0:
ENDBR64
SUB RSP,0x8
CALL 0x00101050
ADD RSP,0x8
LEA EDX,[RAX + 0x1]
IMUL EDX,EAX
MOV EAX,EDX
SHR EAX,0x1f
ADD EAX,EDX
SAR EAX,0x1
RET | int func0(char *param_1)
{
size_t sVar1;
sVar1 = strlen(param_1);
return (((int)sVar1 + 1) * (int)sVar1) / 2;
} |
4,847 | func0 |
#include <assert.h>
#include <string.h>
| int func0(const char* str) {
int str_len = strlen(str);
return (str_len * (str_len + 1)) / 2;
}
| int main() {
assert(func0("abc") == 6);
assert(func0("abcd") == 10);
assert(func0("abcde") == 15);
return 0;
}
| O3 | c | func0:
endbr64
sub $0x8,%rsp
callq 1050 <strlen@plt>
add $0x8,%rsp
mov %rax,%rdx
lea 0x1(%rax),%eax
imul %eax,%edx
mov %edx,%eax
shr $0x1f,%eax
add %edx,%eax
sar %eax
retq
nopw %cs:0x0(%rax,%rax,1)
xchg %ax,%ax
| func0:
endbr64
sub rsp, 8
call _strlen
add rsp, 8
lea edx, [rax+1]
imul edx, eax
mov eax, edx
shr eax, 1Fh
add eax, edx
sar eax, 1
retn | long long func0(const char *a1)
{
int v1; // eax
v1 = strlen(a1);
return (unsigned int)(v1 * (v1 + 1) / 2);
} | func0:
ENDBR64
SUB RSP,0x8
CALL 0x00101050
ADD RSP,0x8
LEA EDX,[RAX + 0x1]
IMUL EDX,EAX
MOV EAX,EDX
SHR EAX,0x1f
ADD EAX,EDX
SAR EAX,0x1
RET | int func0(char *param_1)
{
size_t sVar1;
sVar1 = strlen(param_1);
return (((int)sVar1 + 1) * (int)sVar1) / 2;
} |
4,848 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int m, int n) {
int T[m+1][n+1];
for (int i = 0; i <= m; i++) {
for (int j = 0; j <= n; j++) {
if (i == 0 || j == 0) {
T[i][j] = 0;
} else if (i < j) {
T[i][j] = 0;
} else if (j == 1) {
T[i][j] =... | int main() {
assert(func0(10, 4) == 4);
assert(func0(5, 2) == 6);
assert(func0(16, 3) == 84);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %r15
push %r14
push %r13
push %r12
push %rbx
sub $0x58,%rsp
mov %edi,-0x64(%rbp)
mov %esi,-0x68(%rbp)
mov %fs:0x28,%rbx
mov %rbx,-0x38(%rbp)
xor %ebx,%ebx
mov %rsp,%rcx
mov %rcx,%r15
mov -0x68(%rbp),%ecx
lea 0x1(%rcx),%esi
mov -... | func0:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 48h
mov [rbp+var_44], edi
mov [rbp+var_48], esi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, rsp
mov rbx, rax
mov eax, [rbp+var_48]
lea r8d, [rax+1]
mov eax, [rbp+var_44]
lea r9d, [rax+1]
movs... | long long func0(int a1, int a2)
{
unsigned long long v2; // rcx
unsigned long long v3; // rax
void *v4; // rsp
_BYTE v6[8]; // [rsp+8h] [rbp-50h] BYREF
int v7; // [rsp+10h] [rbp-48h]
int v8; // [rsp+14h] [rbp-44h]
int i; // [rsp+20h] [rbp-38h]
int j; // [rsp+24h] [rbp-34h]
long long v11; // [rsp+28h]... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x48
MOV dword ptr [RBP + -0x44],EDI
MOV dword ptr [RBP + -0x48],ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,RSP
MOV RBX,RAX
MOV EAX,dword ptr [RBP + -0x48]
LEA R8D,[RAX + 0x1]
MOV EAX,dword ptr [RBP + -0x44]
LEA R9D,[RAX + 0x1... | int4 func0(int param_1,int param_2)
{
long lVar1;
ulong uVar2;
ulong uVar3;
int *puVar4;
long in_FS_OFFSET;
int auStack_58 [8];
int local_50;
int local_4c;
int local_40;
int local_3c;
long local_38;
long local_30;
int *local_28;
long local_20;
local_4c = param_1;
local_50 = param_2;
... |
4,849 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int m, int n) {
int T[m+1][n+1];
for (int i = 0; i <= m; i++) {
for (int j = 0; j <= n; j++) {
if (i == 0 || j == 0) {
T[i][j] = 0;
} else if (i < j) {
T[i][j] = 0;
} else if (j == 1) {
T[i][j] =... | int main() {
assert(func0(10, 4) == 4);
assert(func0(5, 2) == 6);
assert(func0(16, 3) == 84);
return 0;
}
| O1 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %r15
push %r14
push %r13
push %r12
push %rbx
sub $0x38,%rsp
mov %edi,-0x48(%rbp)
mov %esi,%r13d
mov %fs:0x28,%rax
mov %rax,-0x38(%rbp)
xor %eax,%eax
lea 0x1(%rsi),%eax
movslq %eax,%rcx
lea 0x0(,%rcx,4),%r11
lea 0x1(%rdi),%edx
movslq %... | func0:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov [rbp+var_54], edi
mov r13d, esi
mov rax, fs:28h
mov [rbp+var_38], rax
xor eax, eax
lea edx, [rsi+1]
movsxd rdx, edx
lea r10, ds:0[rdx*4]
lea eax, [rdi+1]
cdqe
imu... | long long func0(int a1, int a2)
{
long long v2; // rdx
unsigned long long v3; // r10
_BYTE *v4; // rdx
signed long long v5; // rax
void *v6; // rsp
_BYTE *v7; // r8
int v8; // r15d
_BYTE *v9; // r11
_BYTE *v10; // rbx
int v11; // edx
long long v12; // rax
_BYTE *v13; // r12
long long v14; // ... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV dword ptr [RBP + -0x54],EDI
MOV R13D,ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
LEA EDX,[RSI + 0x1]
MOVSXD RDX,EDX
LEA R10,[RDX*0x4]
LEA EAX,[RDI + 0x1]
CDQE
IMUL RAX,RDX
LEA RAX,[0xf + RAX... | int4 func0(int param_1,int param_2)
{
int iVar1;
long lVar2;
long lVar3;
long lVar4;
int iVar5;
ulong uVar6;
int iVar7;
ulong uVar8;
int1 *puVar9;
int1 *puVar10;
int1 *puVar11;
long lVar12;
int1 *puVar13;
long in_FS_OFFSET;
int1 auStack_68 [12];
int local_5c;
long local_58;
ulong lo... |
4,850 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int m, int n) {
int T[m+1][n+1];
for (int i = 0; i <= m; i++) {
for (int j = 0; j <= n; j++) {
if (i == 0 || j == 0) {
T[i][j] = 0;
} else if (i < j) {
T[i][j] = 0;
} else if (j == 1) {
T[i][j] =... | int main() {
assert(func0(10, 4) == 4);
assert(func0(5, 2) == 6);
assert(func0(16, 3) == 84);
return 0;
}
| O2 | c | func0:
endbr64
push %rbp
lea 0x1(%rsi),%ecx
lea 0x1(%rdi),%edx
mov %rsp,%rbp
push %r15
push %r14
push %r13
mov %esi,%r13d
movslq %ecx,%rsi
push %r12
push %rbx
sub $0x38,%rsp
mov %fs:0x28,%rax
mov %rax,-0x38(%rbp)
xor %eax,%eax
lea 0x0(,%rsi,4),%rax
mov %rsp,%rbx
mov %rax,-0x... | func0:
endbr64
push rbp
lea ecx, [rsi+1]
mov edx, edi
movsxd rcx, ecx
mov rbp, rsp
push r15
lea r15, ds:0[rcx*4]
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rax, fs:28h
mov [rbp+var_38], rax
xor eax, eax
lea eax, [rdi+1]
mov rdi, rsp
cdqe
imul rax, ... | long long func0(int a1, int a2)
{
long long v3; // rcx
unsigned long long v4; // r15
long long v5; // rcx
_BYTE *v6; // rdi
__int16 v7; // cx
signed long long v8; // rcx
void *v9; // rsp
unsigned long long v10; // r13
_DWORD *v11; // rbx
long long v12; // r8
_DWORD *v13; // rdx
int i; // eax
... | func0:
ENDBR64
PUSH RBP
LEA ECX,[RSI + 0x1]
MOV EDX,EDI
MOVSXD RCX,ECX
MOV RBP,RSP
PUSH R15
LEA R15,[RCX*0x4]
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
LEA EAX,[RDI + 0x1]
MOV RDI,RSP
CDQE
IMUL RAX,RCX
LEA RAX,[0xf + RAX*0x4]
MOV RCX,RAX
AND... | int4 func0(int param_1,int param_2)
{
long lVar1;
int1 **ppuVar2;
int iVar3;
ulong uVar4;
int *piVar5;
int *piVar6;
int1 **ppuVar7;
int iVar9;
ulong uVar11;
long in_FS_OFFSET;
bool bVar12;
int1 *local_58;
long local_50;
long local_40;
int1 **ppuVar8;
long lVar10;
uVar4 = (ulong)(pa... |
4,851 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int m, int n) {
int T[m+1][n+1];
for (int i = 0; i <= m; i++) {
for (int j = 0; j <= n; j++) {
if (i == 0 || j == 0) {
T[i][j] = 0;
} else if (i < j) {
T[i][j] = 0;
} else if (j == 1) {
T[i][j] =... | int main() {
assert(func0(10, 4) == 4);
assert(func0(5, 2) == 6);
assert(func0(16, 3) == 84);
return 0;
}
| O3 | c | func0:
endbr64
push %rbp
lea 0x1(%rsi),%edx
movslq %edx,%rdx
mov %rsp,%rbp
push %r15
push %r14
push %r13
push %r12
push %rbx
sub $0x28,%rsp
mov %fs:0x28,%rax
mov %rax,-0x38(%rbp)
xor %eax,%eax
lea 0x1(%rdi),%eax
mov %rsp,%rbx
cltq
imul %rdx,%rax
lea 0xf(,%rax,4),%rax
mov %rax... | func0:
endbr64
push rbp
lea edx, [rsi+1]
mov ecx, esi
movsxd rdx, edx
mov rbp, rsp
push r15
push r14
lea r14, ds:0[rdx*4]
push r13
push r12
push rbx
movsxd rbx, edi
sub rsp, 28h
mov rax, fs:28h
mov [rbp+var_38], rax
xor eax, eax
lea eax, [rbx+1]
mov rsi, rsp
c... | long long func0(int a1, int a2)
{
long long v3; // rdx
unsigned long long v4; // r14
long long v5; // rbx
long long v6; // rdx
_BYTE *v7; // rsi
__int16 v8; // dx
signed long long v9; // rdx
void *v10; // rsp
unsigned long long v11; // r12
_BYTE *v12; // r10
long long v13; // rdi
int v14; // es... | func0:
ENDBR64
PUSH RBP
LEA EDX,[RSI + 0x1]
MOV ECX,ESI
MOVSXD RDX,EDX
MOV RBP,RSP
PUSH R15
PUSH R14
LEA R14,[RDX*0x4]
PUSH R13
PUSH R12
PUSH RBX
MOVSXD RBX,EDI
SUB RSP,0x28
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
LEA EAX,[RBX + 0x1]
MOV RSI,RSP
CDQE
IMUL RAX,RDX
LEA RAX,[0xf + RAX*0x4]
... | int4 func0(int param_1,int param_2)
{
long lVar1;
int **ppuVar2;
int iVar3;
ulong uVar4;
int *piVar5;
long lVar6;
int **ppuVar7;
int iVar9;
int iVar10;
int *piVar12;
ulong uVar13;
long in_FS_OFFSET;
bool bVar14;
int *local_58;
long local_50;
long local_40;
int **ppuVar8;
long lVar11... |
4,852 | func0 | #include <assert.h>
#include <stdio.h>
#include <string.h>
| void func0(int list1[], int list1_size, int list2[], int list2_size, int result[]) {
for (int i = 0; i < list1_size - 1; i++) {
result[i] = list1[i];
}
for (int j = 0; j < list2_size; j++) {
result[list1_size - 1 + j] = list2[j];
}
}
| int main() {
int list1[] = {1, 3, 5, 7, 9, 10};
int list2[] = {2, 4, 6, 8};
int expected[] = {1, 3, 5, 7, 9, 2, 4, 6, 8};
int result[9];
func0(list1, 6, list2, 4, result);
assert(memcmp(result, expected, sizeof(expected)) == 0);
int list1b[] = {1, 2, 3, 4, 5};
int list2b[] = {5... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
mov %rdx,-0x28(%rbp)
mov %ecx,-0x20(%rbp)
mov %r8,-0x30(%rbp)
movl $0x0,-0x8(%rbp)
jmp 11dd <func0+0x54>
mov -0x8(%rbp),%eax
cltq
lea 0x0(,%rax,4),%rdx
mov -0x18(%rbp),%rax
add %rdx,%rax
mov -0x8(%rb... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_28], rdx
mov [rbp+var_20], ecx
mov [rbp+var_30], r8
mov [rbp+var_8], 0
jmp short loc_11DD
loc_11AC:
mov eax, [rbp+var_8]
cdqe
lea rdx, ds:0[rax*4]
mov rax, [rbp+var_18]
add ra... | long long func0(long long a1, int a2, long long a3, int a4, long long a5)
{
long long result; // rax
int i; // [rsp+28h] [rbp-8h]
unsigned int j; // [rsp+2Ch] [rbp-4h]
for ( i = 0; i < a2 - 1; ++i )
*(_DWORD *)(4LL * i + a5) = *(_DWORD *)(4LL * i + a1);
for ( j = 0; ; ++j )
{
result = j;
if ( ... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV qword ptr [RBP + -0x28],RDX
MOV dword ptr [RBP + -0x20],ECX
MOV qword ptr [RBP + -0x30],R8
MOV dword ptr [RBP + -0x8],0x0
JMP 0x001011dd
LAB_001011ac:
MOV EAX,dword ptr [RBP + -0x8]
CDQE
LEA RDX,[RAX*0x4]
MOV RAX,qwo... | void func0(long param_1,int param_2,long param_3,int param_4,long param_5)
{
int4 local_10;
int4 local_c;
for (local_10 = 0; local_10 < param_2 + -1; local_10 = local_10 + 1) {
*(int4 *)(param_5 + (long)local_10 * 4) = *(int4 *)(param_1 + (long)local_10 * 4);
}
for (local_c = 0; local_c < param_4; loc... |
4,853 | func0 | #include <assert.h>
#include <stdio.h>
#include <string.h>
| void func0(int list1[], int list1_size, int list2[], int list2_size, int result[]) {
for (int i = 0; i < list1_size - 1; i++) {
result[i] = list1[i];
}
for (int j = 0; j < list2_size; j++) {
result[list1_size - 1 + j] = list2[j];
}
}
| int main() {
int list1[] = {1, 3, 5, 7, 9, 10};
int list2[] = {2, 4, 6, 8};
int expected[] = {1, 3, 5, 7, 9, 2, 4, 6, 8};
int result[9];
func0(list1, 6, list2, 4, result);
assert(memcmp(result, expected, sizeof(expected)) == 0);
int list1b[] = {1, 2, 3, 4, 5};
int list2b[] = {5... | O1 | c | func0:
endbr64
cmp $0x1,%esi
jle 11af <func0+0x26>
lea -0x2(%rsi),%r10d
mov $0x0,%eax
mov (%rdi,%rax,4),%r9d
mov %r9d,(%r8,%rax,4)
mov %rax,%r9
add $0x1,%rax
cmp %r10,%r9
jne 119b <func0+0x12>
test %ecx,%ecx
jle 11d5 <func0+0x4c>
lea -0x1(%rcx),%edi
movslq %esi,%rsi
lea (%r8,%rs... | func0:
endbr64
mov r10d, esi
mov rsi, rdx
cmp r10d, 1
jle short loc_11B5
lea r9d, [r10-2]
mov eax, 0
loc_11A2:
mov edx, [rdi+rax*4]
mov [r8+rax*4], edx
mov rdx, rax
add rax, 1
cmp rdx, r9
jnz short loc_11A2
loc_11B5:
test ecx, ecx
jle short locret_11D7
mov ecx,... | void func0(long long a1, int a2, long long a3, int a4, long long a5)
{
long long v7; // rax
long long v8; // rdx
long long i; // rax
if ( a2 > 1 )
{
v7 = 0LL;
do
{
*(_DWORD *)(a5 + 4 * v7) = *(_DWORD *)(a1 + 4 * v7);
v8 = v7++;
}
while ( v8 != a2 - 2 );
}
if ( a4 > 0 )
... | func0:
ENDBR64
MOV R10D,ESI
MOV RSI,RDX
CMP R10D,0x1
JLE 0x001011b5
LEA R9D,[R10 + -0x2]
MOV EAX,0x0
LAB_001011a2:
MOV EDX,dword ptr [RDI + RAX*0x4]
MOV dword ptr [R8 + RAX*0x4],EDX
MOV RDX,RAX
ADD RAX,0x1
CMP RDX,R9
JNZ 0x001011a2
LAB_001011b5:
TEST ECX,ECX
JLE 0x001011d7
MOV ECX,ECX
MOVSXD R10,R10D
LEA RDI,[R8 + R10*... | void func0(long param_1,int param_2,long param_3,uint param_4,long param_5)
{
ulong uVar1;
bool bVar2;
if (1 < param_2) {
uVar1 = 0;
do {
*(int4 *)(param_5 + uVar1 * 4) = *(int4 *)(param_1 + uVar1 * 4);
bVar2 = uVar1 != param_2 - 2;
uVar1 = uVar1 + 1;
} while (bVar2);
}
if (0... |
4,854 | func0 | #include <assert.h>
#include <stdio.h>
#include <string.h>
| void func0(int list1[], int list1_size, int list2[], int list2_size, int result[]) {
for (int i = 0; i < list1_size - 1; i++) {
result[i] = list1[i];
}
for (int j = 0; j < list2_size; j++) {
result[list1_size - 1 + j] = list2[j];
}
}
| int main() {
int list1[] = {1, 3, 5, 7, 9, 10};
int list2[] = {2, 4, 6, 8};
int expected[] = {1, 3, 5, 7, 9, 2, 4, 6, 8};
int result[9];
func0(list1, 6, list2, 4, result);
assert(memcmp(result, expected, sizeof(expected)) == 0);
int list1b[] = {1, 2, 3, 4, 5};
int list2b[] = {5... | O2 | c | func0:
endbr64
cmp $0x1,%esi
jle 1274 <func0+0x24>
lea -0x2(%rsi),%r10d
xor %eax,%eax
mov (%rdi,%rax,4),%r9d
mov %r9d,(%r8,%rax,4)
mov %rax,%r9
add $0x1,%rax
cmp %r10,%r9
jne 1260 <func0+0x10>
test %ecx,%ecx
jle 129b <func0+0x4b>
movslq %esi,%rsi
lea -0x1(%rcx),%edi
xor %eax,%ea... | func0:
endbr64
movsxd r10, esi
mov rsi, rdx
cmp r10d, 1
jle short loc_13E3
lea r9d, [r10-2]
xor eax, eax
nop word ptr [rax+rax+00000000h]
loc_13D0:
mov edx, [rdi+rax*4]
mov [r8+rax*4], edx
mov rdx, rax
add rax, 1
cmp rdx, r9
jnz short loc_13D0
loc_13E3:
test ecx, ecx
... | void func0(long long a1, int a2, long long a3, int a4, long long a5)
{
long long v5; // r10
long long v7; // rax
long long v8; // rdx
long long i; // rax
v5 = a2;
if ( (int)v5 > 1 )
{
v7 = 0LL;
do
{
*(_DWORD *)(a5 + 4 * v7) = *(_DWORD *)(a1 + 4 * v7);
v8 = v7++;
}
while (... | func0:
ENDBR64
MOVSXD R10,ESI
MOV RSI,RDX
CMP R10D,0x1
JLE 0x001013e3
LEA R9D,[R10 + -0x2]
XOR EAX,EAX
NOP word ptr CS:[RAX + RAX*0x1]
LAB_001013d0:
MOV EDX,dword ptr [RDI + RAX*0x4]
MOV dword ptr [R8 + RAX*0x4],EDX
MOV RDX,RAX
ADD RAX,0x1
CMP RDX,R9
JNZ 0x001013d0
LAB_001013e3:
TEST ECX,ECX
JLE 0x00101400
MOVSXD RCX,E... | void func0(long param_1,int param_2,long param_3,int param_4,long param_5)
{
ulong uVar1;
long lVar2;
bool bVar3;
if (1 < param_2) {
uVar1 = 0;
do {
*(int4 *)(param_5 + uVar1 * 4) = *(int4 *)(param_1 + uVar1 * 4);
bVar3 = uVar1 != param_2 - 2;
uVar1 = uVar1 + 1;
} while (bVar3)... |
4,855 | func0 | #include <assert.h>
#include <stdio.h>
#include <string.h>
| void func0(int list1[], int list1_size, int list2[], int list2_size, int result[]) {
for (int i = 0; i < list1_size - 1; i++) {
result[i] = list1[i];
}
for (int j = 0; j < list2_size; j++) {
result[list1_size - 1 + j] = list2[j];
}
}
| int main() {
int list1[] = {1, 3, 5, 7, 9, 10};
int list2[] = {2, 4, 6, 8};
int expected[] = {1, 3, 5, 7, 9, 2, 4, 6, 8};
int result[9];
func0(list1, 6, list2, 4, result);
assert(memcmp(result, expected, sizeof(expected)) == 0);
int list1b[] = {1, 2, 3, 4, 5};
int list2b[] = {5... | O3 | c | func0:
endbr64
lea -0x1(%rsi),%r9d
test %r9d,%r9d
jle 135e <func0+0x8e>
lea 0xf(%r8),%rax
sub $0x2,%esi
sub %rdi,%rax
cmp $0x1e,%rax
jbe 1430 <func0+0x160>
cmp $0x3,%esi
jbe 1430 <func0+0x160>
mov %r9d,%esi
xor %eax,%eax
shr $0x2,%esi
shl $0x4,%rsi
nopw 0x0(%rax,%rax,1)
movdqu... | func0:
endbr64
movsxd r9, esi
push rbx
mov rsi, rdx
movsxd rdx, ecx
lea r10d, [r9-1]
test r10d, r10d
jle short loc_1328
lea eax, [r9-2]
cmp eax, 2
jbe short loc_1310
lea rcx, [rdi+4]
mov rax, r8
sub rax, rcx
cmp rax, 8
ja short loc_1378
loc_1310:
mov r11d, r10d
x... | void func0(long long a1, int a2, long long a3, int a4, long long a5)
{
long long v5; // r9
long long v7; // rdx
signed int v8; // r10d
long long v9; // rax
long long v10; // rdx
long long v11; // rax
long long v12; // rax
unsigned int v13; // eax
long long v14; // rcx
long long v15; // rax
unsign... | func0:
ENDBR64
MOVSXD R9,ESI
PUSH RBX
MOV RSI,RDX
MOVSXD RDX,ECX
LEA R10D,[R9 + -0x1]
TEST R10D,R10D
JLE 0x00101328
LEA EAX,[R9 + -0x2]
CMP EAX,0x2
JBE 0x00101310
LEA RCX,[RDI + 0x4]
MOV RAX,R8
SUB RAX,RCX
CMP RAX,0x8
JA 0x00101378
LAB_00101310:
MOV R11D,R10D
XOR EAX,EAX
NOP dword ptr [RAX]
LAB_00101318:
MOV ECX,dword ... | void func0(long param_1,int param_2,long param_3,uint param_4,long param_5)
{
int8 *puVar1;
int8 uVar2;
uint uVar3;
ulong uVar4;
long lVar5;
long lVar6;
uint uVar7;
uVar7 = param_2 - 1;
if (0 < (int)uVar7) {
if ((param_2 - 2U < 3) || ((ulong)(param_5 - (param_1 + 4)) < 9)) {
uVar4 = 0;
... |
4,856 | func0 |
#include <assert.h>
#include <string.h>
#include <stdlib.h>
| char*** func0(int m, int n, int o) {
char*** result = (char***)malloc(o * sizeof(char**));
for (int i = 0; i < o; i++) {
result[i] = (char**)malloc(n * sizeof(char*));
for (int j = 0; j < n; j++) {
result[i][j] = (char*)malloc(m * sizeof(char));
for (int k = 0; k < ... | int main() {
char*** output;
int m, n, o, i, j, k;
m = 6; n = 4; o = 3;
output = func0(m, n, o);
for (i = 0; i < o; i++) {
for (j = 0; j < n; j++) {
for (k = 0; k < m; k++) {
assert(output[i][j][k] == '*');
}
}
}
m = 5; ... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x38,%rsp
mov %edi,-0x34(%rbp)
mov %esi,-0x38(%rbp)
mov %edx,-0x3c(%rbp)
mov -0x3c(%rbp),%eax
cltq
shl $0x3,%rax
mov %rax,%rdi
callq 1070 <malloc@plt>
mov %rax,-0x18(%rbp)
movl $0x0,-0x24(%rbp)
jmpq 1267 <func0+0xfe>
mov -0x38(... | func0:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 38h
mov [rbp+var_34], edi
mov [rbp+var_38], esi
mov [rbp+var_3C], edx
mov eax, [rbp+var_3C]
cdqe
shl rax, 3
mov rdi, rax; size
call _malloc
mov [rbp+var_18], rax
mov [rbp+var_24], 0
jmp loc_1267
loc_11A0:
mov ... | _QWORD * func0(int a1, int a2, int a3)
{
void **v3; // rbx
int i; // [rsp+1Ch] [rbp-24h]
int j; // [rsp+20h] [rbp-20h]
int k; // [rsp+24h] [rbp-1Ch]
_QWORD *v9; // [rsp+28h] [rbp-18h]
v9 = malloc(8LL * a3);
for ( i = 0; i < a3; ++i )
{
v9[i] = malloc(8LL * a2);
for ( j = 0; j < a2; ++j )
{
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x38
MOV dword ptr [RBP + -0x34],EDI
MOV dword ptr [RBP + -0x38],ESI
MOV dword ptr [RBP + -0x3c],EDX
MOV EAX,dword ptr [RBP + -0x3c]
CDQE
SHL RAX,0x3
MOV RDI,RAX
CALL 0x00101070
MOV qword ptr [RBP + -0x18],RAX
MOV dword ptr [RBP + -0x24],0x0
JMP 0x00101267
LAB_001011... | void * func0(int param_1,int param_2,int param_3)
{
long lVar1;
void *pvVar2;
void *pvVar3;
int4 local_2c;
int4 local_28;
int4 local_24;
pvVar2 = malloc((long)param_3 << 3);
for (local_2c = 0; local_2c < param_3; local_2c = local_2c + 1) {
pvVar3 = malloc((long)param_2 << 3);
*(void **)((lon... |
4,857 | func0 |
#include <assert.h>
#include <string.h>
#include <stdlib.h>
| char*** func0(int m, int n, int o) {
char*** result = (char***)malloc(o * sizeof(char**));
for (int i = 0; i < o; i++) {
result[i] = (char**)malloc(n * sizeof(char*));
for (int j = 0; j < n; j++) {
result[i][j] = (char*)malloc(m * sizeof(char));
for (int k = 0; k < ... | int main() {
char*** output;
int m, n, o, i, j, k;
m = 6; n = 4; o = 3;
output = func0(m, n, o);
for (i = 0; i < o; i++) {
for (j = 0; j < n; j++) {
for (k = 0; k < m; k++) {
assert(output[i][j][k] == '*');
}
}
}
m = 5; ... | O1 | c | func0:
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x38,%rsp
mov %edi,%r13d
mov %esi,%r14d
mov %esi,0x24(%rsp)
mov %edx,%ebx
movslq %edx,%rdi
shl $0x3,%rdi
callq 1070 <malloc@plt>
mov %rax,0x28(%rsp)
test %ebx,%ebx
jle 124b <func0+0xe2>
mov %rax,%rd... | func0:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 28h
mov ebp, edi
mov r15d, esi
mov ebx, edx
movsxd rdi, edx
shl rdi, 3
call _malloc
mov [rsp+58h+var_40], rax
test ebx, ebx
jle loc_121B
mov rsi, rax
movsxd rax, r15d
shl rax, 3
mo... | long long func0(int a1, int a2, int a3)
{
long long v4; // rax
_QWORD *v5; // r14
long long v6; // rax
_QWORD *v7; // rbx
_QWORD *v8; // r13
long long v9; // rax
_BYTE *v10; // rdx
_BYTE *v11; // rax
_QWORD *v13; // [rsp+8h] [rbp-50h]
long long v14; // [rsp+18h] [rbp-40h]
v4 = malloc(8LL * a3);
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x28
MOV EBP,EDI
MOV R15D,ESI
MOV EBX,EDX
MOVSXD RDI,EDX
SHL RDI,0x3
CALL 0x00101070
MOV qword ptr [RSP + 0x18],RAX
TEST EBX,EBX
JLE 0x0010121b
MOV RSI,RAX
MOVSXD RAX,R15D
SHL RAX,0x3
MOV qword ptr [RSP],RAX
MOV R14,RSI
MOV EBX,EBX
LEA RAX,[RS... | int8 * func0(uint param_1,int param_2,uint param_3)
{
int8 *puVar1;
int8 *puVar2;
int8 *puVar3;
int1 *puVar4;
int1 *puVar5;
int8 *puVar6;
puVar2 = (int8 *)malloc((long)(int)param_3 << 3);
if (0 < (int)param_3) {
puVar6 = puVar2;
do {
puVar3 = (int8 *)malloc((long)param_2 << 3);
*... |
4,858 | func0 |
#include <assert.h>
#include <string.h>
#include <stdlib.h>
| char*** func0(int m, int n, int o) {
char*** result = (char***)malloc(o * sizeof(char**));
for (int i = 0; i < o; i++) {
result[i] = (char**)malloc(n * sizeof(char*));
for (int j = 0; j < n; j++) {
result[i][j] = (char*)malloc(m * sizeof(char));
for (int k = 0; k < ... | int main() {
char*** output;
int m, n, o, i, j, k;
m = 6; n = 4; o = 3;
output = func0(m, n, o);
for (i = 0; i < o; i++) {
for (j = 0; j < n; j++) {
for (k = 0; k < m; k++) {
assert(output[i][j][k] == '*');
}
}
}
m = 5; ... | O2 | c | func0:
endbr64
push %r15
push %r14
mov %esi,%r14d
push %r13
push %r12
push %rbp
push %rbx
mov %edi,%ebx
movslq %edx,%rdi
mov %rdi,%rbp
shl $0x3,%rdi
sub $0x28,%rsp
mov %esi,0x14(%rsp)
callq 1070 <malloc@plt>
mov %rax,0x18(%rsp)
test %ebp,%ebp
jle 1393 <func0+0xe3>
movslq %r14d,%r1... | func0:
endbr64
push r15
push r14
mov r14d, esi
push r13
push r12
push rbp
mov ebp, edi
movsxd rdi, edx
push rbx
mov rbx, rdi
shl rdi, 3
sub rsp, 28h
mov [rsp+58h+var_4C], esi
call _malloc
mov [rsp+58h+var_40], rax
test ebx, ebx
jle loc_1377
movsxd r14, r14d
mov ... | long long func0(int a1, int a2, int a3)
{
long long v4; // rax
_QWORD *v5; // r12
long long v6; // rcx
_QWORD *v7; // r13
_QWORD *v8; // rbx
_BYTE *v9; // rax
_BYTE *v10; // rdx
_QWORD *v12; // [rsp+0h] [rbp-58h]
long long v13; // [rsp+18h] [rbp-40h]
v4 = malloc(8LL * a3);
v13 = v4;
if ( a3 > ... | func0:
ENDBR64
PUSH R15
PUSH R14
MOV R14D,ESI
PUSH R13
PUSH R12
PUSH RBP
MOV EBP,EDI
MOVSXD RDI,EDX
PUSH RBX
MOV RBX,RDI
SHL RDI,0x3
SUB RSP,0x28
MOV dword ptr [RSP + 0xc],ESI
CALL 0x00101070
MOV qword ptr [RSP + 0x18],RAX
TEST EBX,EBX
JLE 0x00101377
MOVSXD R14,R14D
MOV EBX,EBX
MOV R12,RAX
MOVSXD R15,EBP
MOV RSI,R14
LE... | int8 * func0(int param_1,int param_2,uint param_3)
{
int8 *puVar1;
int1 *puVar2;
int8 *puVar3;
int8 *puVar4;
int1 *puVar5;
int8 *puVar6;
puVar3 = (int8 *)malloc((long)(int)param_3 << 3);
if (0 < (int)param_3) {
puVar6 = puVar3;
do {
puVar4 = (int8 *)malloc((long)param_2 << 3);
*p... |
4,859 | func0 |
#include <assert.h>
#include <string.h>
#include <stdlib.h>
| char*** func0(int m, int n, int o) {
char*** result = (char***)malloc(o * sizeof(char**));
for (int i = 0; i < o; i++) {
result[i] = (char**)malloc(n * sizeof(char*));
for (int j = 0; j < n; j++) {
result[i][j] = (char*)malloc(m * sizeof(char));
for (int k = 0; k < ... | int main() {
char*** output;
int m, n, o, i, j, k;
m = 6; n = 4; o = 3;
output = func0(m, n, o);
for (i = 0; i < o; i++) {
for (j = 0; j < n; j++) {
for (k = 0; k < m; k++) {
assert(output[i][j][k] == '*');
}
}
}
m = 5; ... | O3 | c | func0:
endbr64
push %r15
push %r14
mov %esi,%r14d
push %r13
push %r12
push %rbp
push %rbx
mov %edi,%ebx
movslq %edx,%rdi
mov %rdi,%rbp
shl $0x3,%rdi
sub $0x28,%rsp
mov %esi,0x14(%rsp)
callq 1070 <malloc@plt>
mov %rax,0x18(%rsp)
test %ebp,%ebp
jle 1517 <func0+0xf7>
movslq %r14d,%r1... | func0:
endbr64
push r15
push r14
mov r14d, esi
push r13
push r12
push rbp
movsxd rbp, edx
push rbx
mov r12, rbp
shl rbp, 3
mov ebx, edi
mov rdi, rbp; size
sub rsp, 28h
mov [rsp+58h+var_44], esi
call _malloc
mov [rsp+58h+var_40], rax
test r12d, r12d
jle short ... | _QWORD * func0(size_t n, int a2, int a3)
{
size_t v4; // rbp
_QWORD *v5; // rax
_QWORD *v6; // r14
_QWORD *v7; // rax
_QWORD *v8; // r15
_QWORD *v9; // rbp
void *v10; // rax
long long size; // [rsp+0h] [rbp-58h]
_QWORD *v13; // [rsp+8h] [rbp-50h]
_QWORD *v14; // [rsp+18h] [rbp-40h]
v4 = a3;
v5 ... | func0:
ENDBR64
PUSH R15
PUSH R14
MOV R14D,ESI
PUSH R13
PUSH R12
PUSH RBP
MOVSXD RBP,EDX
PUSH RBX
MOV R12,RBP
SHL RBP,0x3
MOV EBX,EDI
MOV RDI,RBP
SUB RSP,0x28
MOV dword ptr [RSP + 0x14],ESI
CALL 0x00101090
MOV qword ptr [RSP + 0x18],RAX
TEST R12D,R12D
JLE 0x001014f6
MOVSXD R15,R14D
MOV R14,RAX
ADD RAX,RBP
MOVSXD R12,EBX... | int8 * func0(uint param_1,int param_2,int param_3)
{
int8 *puVar1;
int8 *puVar2;
void *__s;
int8 *puVar3;
int8 *puVar4;
puVar1 = (int8 *)malloc((long)param_3 * 8);
if (0 < param_3) {
puVar4 = puVar1;
do {
puVar2 = (int8 *)malloc((long)param_2 * 8);
*puVar4 = puVar2;
puVar3 = ... |
4,860 | func0 |
#include <assert.h>
#include <string.h>
| int func0(const char *str1) {
int total = 0;
while(*str1) {
total++;
str1++;
}
return total;
}
| int main() {
assert(func0("python programming") == 18);
assert(func0("language") == 8);
assert(func0("words") == 5);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
movl $0x0,-0x4(%rbp)
jmp 1167 <func0+0x1e>
addl $0x1,-0x4(%rbp)
addq $0x1,-0x18(%rbp)
mov -0x18(%rbp),%rax
movzbl (%rax),%eax
test %al,%al
jne 115e <func0+0x15>
mov -0x4(%rbp),%eax
pop %rbp
retq
| func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_4], 0
jmp short loc_1167
loc_115E:
add [rbp+var_4], 1
add [rbp+var_18], 1
loc_1167:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
test al, al
jnz short loc_115E
mov eax, [rbp+var_4]
pop rbp
retn | long long func0(_BYTE *a1)
{
unsigned int v3; // [rsp+14h] [rbp-4h]
v3 = 0;
while ( *a1 )
{
++v3;
++a1;
}
return v3;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00101167
LAB_0010115e:
ADD dword ptr [RBP + -0x4],0x1
ADD qword ptr [RBP + -0x18],0x1
LAB_00101167:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
TEST AL,AL
JNZ 0x0010115e
MOV EAX,dword ptr [RBP + -0x4]
P... | int func0(char *param_1)
{
char *local_20;
int local_c;
local_c = 0;
for (local_20 = param_1; *local_20 != '\0'; local_20 = local_20 + 1) {
local_c = local_c + 1;
}
return local_c;
} |
4,861 | func0 |
#include <assert.h>
#include <string.h>
| int func0(const char *str1) {
int total = 0;
while(*str1) {
total++;
str1++;
}
return total;
}
| int main() {
assert(func0("python programming") == 18);
assert(func0("language") == 8);
assert(func0("words") == 5);
return 0;
}
| O1 | c | func0:
endbr64
cmpb $0x0,(%rdi)
je 116b <func0+0x22>
mov %rdi,%rax
mov $0x1,%edx
sub %edi,%edx
lea (%rdx,%rax,1),%ecx
add $0x1,%rax
cmpb $0x0,(%rax)
jne 115c <func0+0x13>
mov %ecx,%eax
retq
mov $0x0,%ecx
jmp 1168 <func0+0x1f>
| func0:
endbr64
cmp byte ptr [rdi], 0
jz short loc_116B
mov rax, rdi
mov edx, 1
sub edx, edi
loc_115C:
lea ecx, [rdx+rax]
add rax, 1
cmp byte ptr [rax], 0
jnz short loc_115C
loc_1168:
mov eax, ecx
retn
loc_116B:
mov ecx, 0
jmp short loc_1168 | long long func0(_BYTE *a1)
{
_BYTE *v1; // rax
unsigned int v2; // ecx
if ( *a1 )
{
v1 = a1;
do
v2 = 1 - (_DWORD)a1 + (_DWORD)v1++;
while ( *v1 );
}
else
{
return 0;
}
return v2;
} | func0:
ENDBR64
CMP byte ptr [RDI],0x0
JZ 0x0010116b
MOV RAX,RDI
MOV EDX,0x1
SUB EDX,EDI
LAB_0010115c:
LEA ECX,[RDX + RAX*0x1]
ADD RAX,0x1
CMP byte ptr [RAX],0x0
JNZ 0x0010115c
LAB_00101168:
MOV EAX,ECX
RET
LAB_0010116b:
MOV ECX,0x0
JMP 0x00101168 | int func0(char *param_1)
{
int iVar1;
int iVar2;
iVar2 = (int)param_1;
if (*param_1 == '\0') {
iVar1 = 0;
}
else {
do {
iVar1 = (1 - iVar2) + (int)param_1;
param_1 = param_1 + 1;
} while (*param_1 != '\0');
}
return iVar1;
} |
4,862 | func0 |
#include <assert.h>
#include <string.h>
| int func0(const char *str1) {
int total = 0;
while(*str1) {
total++;
str1++;
}
return total;
}
| int main() {
assert(func0("python programming") == 18);
assert(func0("language") == 8);
assert(func0("words") == 5);
return 0;
}
| O2 | c | func0:
endbr64
cmpb $0x0,(%rdi)
je 1278 <func0+0x28>
mov $0x1,%eax
sub %edi,%eax
lea (%rax,%rdi,1),%r8d
add $0x1,%rdi
cmpb $0x0,(%rdi)
jne 1260 <func0+0x10>
mov %r8d,%eax
retq
nopl 0x0(%rax)
xor %r8d,%r8d
mov %r8d,%eax
retq
| func0:
endbr64
cmp byte ptr [rdi], 0
jz short loc_1278
mov eax, 1
sub eax, edi
loc_1260:
lea r8d, [rax+rdi]
add rdi, 1
cmp byte ptr [rdi], 0
jnz short loc_1260
mov eax, r8d
retn
loc_1278:
xor r8d, r8d
mov eax, r8d
retn | long long func0(_BYTE *a1)
{
int v1; // eax
unsigned int v2; // r8d
if ( !*a1 )
return 0LL;
v1 = 1 - (_DWORD)a1;
do
v2 = v1 + (_DWORD)a1++;
while ( *a1 );
return v2;
} | func0:
ENDBR64
CMP byte ptr [RDI],0x0
JZ 0x00101278
MOV EAX,0x1
SUB EAX,EDI
LAB_00101260:
LEA R8D,[RAX + RDI*0x1]
ADD RDI,0x1
CMP byte ptr [RDI],0x0
JNZ 0x00101260
MOV EAX,R8D
RET
LAB_00101278:
XOR R8D,R8D
MOV EAX,R8D
RET | int func0(char *param_1)
{
int iVar1;
int iVar2;
if (*param_1 != '\0') {
iVar2 = (int)param_1;
do {
iVar1 = (int)param_1;
param_1 = param_1 + 1;
} while (*param_1 != '\0');
return (1 - iVar2) + iVar1;
}
return 0;
} |
4,863 | func0 |
#include <assert.h>
#include <string.h>
| int func0(const char *str1) {
int total = 0;
while(*str1) {
total++;
str1++;
}
return total;
}
| int main() {
assert(func0("python programming") == 18);
assert(func0("language") == 8);
assert(func0("words") == 5);
return 0;
}
| O3 | c | func0:
endbr64
cmpb $0x0,(%rdi)
je 1258 <func0+0x28>
mov $0x1,%eax
sub %edi,%eax
lea (%rax,%rdi,1),%r8d
add $0x1,%rdi
cmpb $0x0,(%rdi)
jne 1240 <func0+0x10>
mov %r8d,%eax
retq
nopl 0x0(%rax)
xor %r8d,%r8d
mov %r8d,%eax
retq
| func0:
endbr64
cmp byte ptr [rdi], 0
jz short loc_1180
sub rsp, 8
add rdi, 1; s
call _strlen
add rsp, 8
add eax, 1
retn
loc_1180:
xor eax, eax
retn | long long func0(long long a1)
{
if ( *(_BYTE *)a1 )
return (unsigned int)strlen((const char *)(a1 + 1)) + 1;
else
return 0LL;
} | func0:
ENDBR64
CMP byte ptr [RDI],0x0
JZ 0x00101180
SUB RSP,0x8
ADD RDI,0x1
CALL 0x00101050
ADD RSP,0x8
ADD EAX,0x1
RET
LAB_00101180:
XOR EAX,EAX
RET | int func0(char *param_1)
{
size_t sVar1;
if (*param_1 != '\0') {
sVar1 = strlen(param_1 + 1);
return (int)sVar1 + 1;
}
return 0;
} |
4,864 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
typedef struct {
char *key;
char **values;
int values_size;
int num_values;
} DictItem;
DictItem *find_or_create(DictItem **dict, int *size, char *key) {
for (int i = 0; i < *size; i++) {
if (str... | DictItem **func0(char *lst[], int lst_size) {
DictItem **dict = malloc(sizeof(DictItem*) * 10);
int dict_size = 0;
for (int i = 0; i < lst_size; i += 2) {
char *key = lst[i];
char *value = lst[i+1];
DictItem *item = find_or_create(dict, &dict_size, key);
add_value(item... | int main(void) {
char *test1[] = { "1", "Jake", "2", "Bob", "1", "Cara" };
DictItem **res1 = func0(test1, 6);
assert(res1[0]->num_values == 2);
assert(res1[1]->num_values == 1);
char *test2[] = { "b", "ball", "a", "arm", "b", "b", "a", "ant" };
DictItem **res2 = func0(test2, 8);
... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x40,%rsp
mov %rdi,-0x38(%rbp)
mov %esi,-0x3c(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
mov $0x50,%edi
callq 10f0 <malloc@plt>
mov %rax,-0x28(%rbp)
movl $0x0,-0x30(%rbp)
movl $0x0,-0x2c(%rbp)
jmp 149f <func0+0xac>
mov -0... | 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 edi, 50h ; 'P'; size
call _malloc
mov [rbp+var_28], rax
mov [rbp+var_30], 0
mov [rbp+var_2C], 0
jmp short loc_149E
loc... | void * func0(long long a1, int a2)
{
int v3; // [rsp+10h] [rbp-30h] BYREF
int i; // [rsp+14h] [rbp-2Ch]
void *v5; // [rsp+18h] [rbp-28h]
long long v6; // [rsp+20h] [rbp-20h]
long long v7; // [rsp+28h] [rbp-18h]
long long v8; // [rsp+30h] [rbp-10h]
unsigned long long v9; // [rsp+38h] [rbp-8h]
v9 = __rea... | 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 EDI,0x50
CALL 0x001010f0
MOV qword ptr [RBP + -0x28],RAX
MOV dword ptr [RBP + -0x30],0x0
MOV dword ptr [RBP + -0x2c],0x0
JMP 0x00101... | void * func0(long param_1,int param_2)
{
long in_FS_OFFSET;
int4 local_38;
int local_34;
void *local_30;
int8 local_28;
int8 local_20;
int8 local_18;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_30 = malloc(0x50);
local_38 = 0;
for (local_34 = 0; local_34 < param_2; local_... |
4,865 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
typedef struct {
char *key;
char **values;
int values_size;
int num_values;
} DictItem;
DictItem *find_or_create(DictItem **dict, int *size, char *key) {
for (int i = 0; i < *size; i++) {
if (str... | DictItem **func0(char *lst[], int lst_size) {
DictItem **dict = malloc(sizeof(DictItem*) * 10);
int dict_size = 0;
for (int i = 0; i < lst_size; i += 2) {
char *key = lst[i];
char *value = lst[i+1];
DictItem *item = find_or_create(dict, &dict_size, key);
add_value(item... | int main(void) {
char *test1[] = { "1", "Jake", "2", "Bob", "1", "Cara" };
DictItem **res1 = func0(test1, 6);
assert(res1[0]->num_values == 2);
assert(res1[1]->num_values == 1);
char *test2[] = { "b", "ball", "a", "arm", "b", "b", "a", "ant" };
DictItem **res2 = func0(test2, 8);
... | O1 | c | func0:
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x10,%rsp
mov %rdi,%r13
mov %esi,%ebp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
mov $0x50,%edi
callq 10f0 <malloc@plt>
mov %rax,%r12
movl $0x0,0x4(%rsp)
test %ebp,%ebp
jle 13ad <func0+0x7c>
mov %r... | func0:
endbr64
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 10h
mov r13, rdi
mov ebp, esi
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
mov edi, 50h ; 'P'
call _malloc
mov r12, rax
mov [rsp+38h+var_34], 0
test ebp, ebp
jle short loc_13AD
mov... | long long func0(_QWORD *a1, int a2)
{
long long v2; // r12
_QWORD *v3; // rbx
long long v4; // rbp
long long v5; // rax
int v7; // [rsp+4h] [rbp-34h] BYREF
unsigned long long v8; // [rsp+8h] [rbp-30h]
v8 = __readfsqword(0x28u);
v2 = malloc(80LL);
v7 = 0;
if ( a2 > 0 )
{
v3 = a1;
do
{... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x10
MOV R13,RDI
MOV EBP,ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV EDI,0x50
CALL 0x001010f0
MOV R12,RAX
MOV dword ptr [RSP + 0x4],0x0
TEST EBP,EBP
JLE 0x001013ad
MOV RBX,R13
SUB EBP,0x1
SHR EBP,0x1
MOV EBP,EBP
SHL RB... | void * func0(int8 *param_1,int param_2)
{
int8 *puVar1;
int8 uVar2;
void *pvVar3;
int8 uVar4;
long in_FS_OFFSET;
int4 local_34;
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
pvVar3 = malloc(0x50);
local_34 = 0;
if (0 < param_2) {
puVar1 = param_1 + (ulong)(param_2 - 1U >> 1) * ... |
4,866 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
typedef struct {
char *key;
char **values;
int values_size;
int num_values;
} DictItem;
DictItem *find_or_create(DictItem **dict, int *size, char *key) {
for (int i = 0; i < *size; i++) {
if (str... | DictItem **func0(char *lst[], int lst_size) {
DictItem **dict = malloc(sizeof(DictItem*) * 10);
int dict_size = 0;
for (int i = 0; i < lst_size; i += 2) {
char *key = lst[i];
char *value = lst[i+1];
DictItem *item = find_or_create(dict, &dict_size, key);
add_value(item... | int main(void) {
char *test1[] = { "1", "Jake", "2", "Bob", "1", "Cara" };
DictItem **res1 = func0(test1, 6);
assert(res1[0]->num_values == 2);
assert(res1[1]->num_values == 1);
char *test2[] = { "b", "ball", "a", "arm", "b", "b", "a", "ant" };
DictItem **res2 = func0(test2, 8);
... | O2 | c | func0:
endbr64
push %r14
push %r13
push %r12
push %rbp
mov %esi,%ebp
push %rbx
mov %rdi,%rbx
mov $0x50,%edi
sub $0x10,%rsp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
callq 10f0 <malloc@plt>
movl $0x0,0x4(%rsp)
mov %rax,%r14
test %ebp,%ebp
jle 164e <func0+0x7e>
sub $0... | func0:
endbr64
push r14
push r13
push r12
push rbp
mov ebp, esi
push rbx
mov rbx, rdi
mov edi, 50h ; 'P'
sub rsp, 10h
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
call _malloc
mov [rsp+38h+var_34], 0
mov r14, rax
test ebp, ebp
jle short loc_164E
sub... | long long func0(long long *a1, int a2)
{
long long *v2; // rbx
long long v3; // r14
long long v4; // rdx
long long v5; // rbp
long long v6; // rax
int v8; // [rsp+4h] [rbp-34h] BYREF
unsigned long long v9; // [rsp+8h] [rbp-30h]
v2 = a1;
v9 = __readfsqword(0x28u);
v8 = 0;
v3 = malloc(80LL);
if ... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV EBP,ESI
PUSH RBX
MOV RBX,RDI
MOV EDI,0x50
SUB RSP,0x10
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
CALL 0x001010f0
MOV dword ptr [RSP + 0x4],0x0
MOV R14,RAX
TEST EBP,EBP
JLE 0x0010164e
SUB EBP,0x1
LEA R12,[RSP + 0x4]
SHR EBP,0x1
SHL RBP,0x... | void * func0(int8 *param_1,int param_2)
{
int8 *puVar1;
int8 uVar2;
void *pvVar3;
int8 uVar4;
long in_FS_OFFSET;
int4 local_34;
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
pvVar3 = malloc(0x50);
local_34 = 0;
if (0 < param_2) {
puVar1 = param_1 + (ulong)(param_2 - 1U >> 1) * ... |
4,867 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
typedef struct {
char *key;
char **values;
int values_size;
int num_values;
} DictItem;
DictItem *find_or_create(DictItem **dict, int *size, char *key) {
for (int i = 0; i < *size; i++) {
if (str... | DictItem **func0(char *lst[], int lst_size) {
DictItem **dict = malloc(sizeof(DictItem*) * 10);
int dict_size = 0;
for (int i = 0; i < lst_size; i += 2) {
char *key = lst[i];
char *value = lst[i+1];
DictItem *item = find_or_create(dict, &dict_size, key);
add_value(item... | int main(void) {
char *test1[] = { "1", "Jake", "2", "Bob", "1", "Cara" };
DictItem **res1 = func0(test1, 6);
assert(res1[0]->num_values == 2);
assert(res1[1]->num_values == 1);
char *test2[] = { "b", "ball", "a", "arm", "b", "b", "a", "ant" };
DictItem **res2 = func0(test2, 8);
... | O3 | c | func0:
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
mov %esi,%ebp
push %rbx
mov %rdi,%rbx
mov $0x50,%edi
sub $0x28,%rsp
callq 10f0 <malloc@plt>
mov %rax,0x10(%rsp)
test %ebp,%ebp
jle 170d <func0+0xed>
sub $0x1,%ebp
shr %ebp
shl $0x4,%rbp
lea 0x10(%rbx,%rbp,1),%r... | func0:
endbr64
push r15
push r14
mov r14, rdi
mov edi, 50h ; 'P'; size
push r13
push r12
push rbp
push rbx
mov ebx, esi
sub rsp, 28h
call _malloc
mov [rsp+58h+var_50], rax
test ebx, ebx
jle loc_1773
lea eax, [rbx-1]
mov [rsp+58h+var_48], 0
shr eax, 1
shl r... | const char *** func0(const char **a1, int a2)
{
const char **v2; // r14
const char *v3; // r12
const char *v4; // rbp
const char ***v5; // r15
const char **v6; // rbx
long long v7; // rax
char *v8; // r13
const char **v9; // r15
const char **v10; // r12
const char *v12; // rdi
int v13; // r12d
c... | func0:
ENDBR64
PUSH R15
PUSH R14
MOV R14,RDI
MOV EDI,0x50
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV EBX,ESI
SUB RSP,0x28
CALL 0x001010f0
MOV qword ptr [RSP + 0x8],RAX
TEST EBX,EBX
JLE 0x00101773
LEA EAX,[RBX + -0x1]
MOV dword ptr [RSP + 0x10],0x0
SHR EAX,0x1
SHL RAX,0x4
LEA RAX,[R14 + RAX*0x1 + 0x10]
MOV qword ptr [RSP +... | long * func0(int8 *param_1,int param_2)
{
int8 *puVar1;
char *__s2;
long lVar2;
int iVar3;
int iVar4;
long *plVar5;
int8 *puVar6;
char *pcVar7;
int8 *__ptr;
int iVar8;
long *plVar9;
int8 *puVar10;
long local_58;
int local_48;
plVar5 = (long *)malloc(0x50);
if (param_2 < 1) {
retu... |
4,868 | func0 |
#include <math.h>
#include <assert.h>
| int func0(int N) {
int nextN = (int)floor(sqrt(N)) + 1;
return nextN * nextN;
}
| int main() {
assert(func0(35) == 36);
assert(func0(6) == 9);
assert(func0(9) == 16);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %edi,-0x14(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm0
callq 1090 <sqrt@plt>
callq 1080 <floor@plt>
cvttsd2si %xmm0,%eax
add $0x1,%eax
mov %eax,-0x4(%rbp)
mov -0x4(%rbp),%eax
imul %eax,%eax
leaveq
retq
| func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_14], edi
pxor xmm1, xmm1
cvtsi2sd xmm1, [rbp+var_14]
movq rax, xmm1
movq xmm0, rax; x
call _sqrt
movq rax, xmm0
movq xmm0, rax; x
call _floor
cvttsd2si eax, xmm0
add eax, 1
mov [rbp+var_4], eax
mov eax, [rbp+v... | long long func0(int a1)
{
double v1; // xmm0_8
int v3; // [rsp+1Ch] [rbp-4h]
v1 = sqrt((double)a1);
v3 = (int)floor(v1) + 1;
return (unsigned int)(v3 * v3);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x14],EDI
PXOR XMM1,XMM1
CVTSI2SD XMM1,dword ptr [RBP + -0x14]
MOVQ RAX,XMM1
MOVQ XMM0,RAX
CALL 0x00101090
MOVQ RAX,XMM0
MOVQ XMM0,RAX
CALL 0x00101080
CVTTSD2SI EAX,XMM0
ADD EAX,0x1
MOV dword ptr [RBP + -0x4],EAX
MOV EAX,dword ptr [RBP + -0x4]
IMUL ... | int func0(int param_1)
{
double dVar1;
dVar1 = sqrt((double)param_1);
dVar1 = floor(dVar1);
return ((int)dVar1 + 1) * ((int)dVar1 + 1);
} |
4,869 | func0 |
#include <math.h>
#include <assert.h>
| int func0(int N) {
int nextN = (int)floor(sqrt(N)) + 1;
return nextN * nextN;
}
| int main() {
assert(func0(35) == 36);
assert(func0(6) == 9);
assert(func0(9) == 16);
return 0;
}
| O1 | c | func0:
endbr64
sub $0x18,%rsp
pxor %xmm0,%xmm0
cvtsi2sd %edi,%xmm0
movapd %xmm0,%xmm6
sqrtsd %xmm6,%xmm6
movsd %xmm6,0x8(%rsp)
pxor %xmm1,%xmm1
ucomisd %xmm0,%xmm1
ja 11fb <func0+0x92>
movsd 0x8(%rsp),%xmm5
movapd %xmm5,%xmm0
movsd 0xeed(%rip),%xmm2
movapd %xmm5,%xmm1
andpd %xmm2,%xmm1
movsd 0xec5(%rip)... | func0:
endbr64
sub rsp, 8
pxor xmm0, xmm0
cvtsi2sd xmm0, edi
pxor xmm1, xmm1
ucomisd xmm1, xmm0
ja short loc_11EB
sqrtsd xmm0, xmm0
loc_1187:
movapd xmm3, xmm0
movsd xmm2, cs:qword_2070
movapd xmm1, xmm0
andpd xmm1, xmm2
movsd xmm4, cs:qword_2058
ucomisd xmm4, xmm1
jbe short loc_11DC
cvttsd2... | long long func0(int a1)
{
double v1; // xmm0_8
__m128d v2; // xmm0
double v3; // xmm3_8
__m128d v4; // xmm1
v1 = (double)a1;
if ( (double)a1 < 0.0 )
v2.m128d_f64[0] = sqrt(v1);
else
v2.m128d_f64[0] = sqrt(v1);
v3 = v2.m128d_f64[0];
if ( fabs(v2.m128d_f64[0]) < 4.503599627370496e15 )
{
... | func0:
ENDBR64
SUB RSP,0x8
PXOR XMM0,XMM0
CVTSI2SD XMM0,EDI
PXOR XMM1,XMM1
UCOMISD XMM1,XMM0
JA 0x001011eb
SQRTSD XMM0,XMM0
LAB_00101187:
MOVAPD XMM3,XMM0
MOVSD XMM2,qword ptr [0x00102070]
MOVAPD XMM1,XMM0
ANDPD XMM1,XMM2
MOVSD XMM4,qword ptr [0x00102058]
UCOMISD XMM4,XMM1
JBE 0x001011dc
CVTTSD2SI RAX,XMM0
PXOR XMM1,XM... | int func0(int param_1)
{
double dVar1;
dVar1 = (double)param_1;
if (dVar1 < 0.0) {
dVar1 = sqrt(dVar1);
}
else {
dVar1 = SQRT(dVar1);
}
if ((double)((ulong)dVar1 & DAT_00102070) < DAT_00102058) {
dVar1 = (double)((ulong)((double)(long)dVar1 -
(double)(-(ulong)(d... |
4,870 | func0 |
#include <math.h>
#include <assert.h>
| int func0(int N) {
int nextN = (int)floor(sqrt(N)) + 1;
return nextN * nextN;
}
| int main() {
assert(func0(35) == 36);
assert(func0(6) == 9);
assert(func0(9) == 16);
return 0;
}
| O2 | c | func0:
endbr64
pxor %xmm0,%xmm0
pxor %xmm2,%xmm2
sub $0x18,%rsp
cvtsi2sd %edi,%xmm0
ucomisd %xmm0,%xmm2
movapd %xmm0,%xmm1
sqrtsd %xmm1,%xmm1
ja 1292 <func0+0x82>
movsd 0xe56(%rip),%xmm2
movsd 0xe36(%rip),%xmm3
movapd %xmm1,%xmm0
andpd %xmm2,%xmm1
ucomisd %xmm1,%xmm3
jbe 1283 <func0+0x73>
cvttsd2si %xm... | func0:
endbr64
pxor xmm0, xmm0
pxor xmm1, xmm1
sub rsp, 8
cvtsi2sd xmm0, edi
ucomisd xmm1, xmm0
ja short loc_128E
sqrtsd xmm0, xmm0
loc_122E:
movsd xmm2, cs:qword_2070
movsd xmm3, cs:qword_2058
movapd xmm1, xmm0
andpd xmm1, xmm2
ucomisd xmm3, xmm1
jbe short loc_127F
cvttsd2si rax, xmm0
pxor ... | long long func0(int a1)
{
double v1; // xmm0_8
__m128d v2; // xmm0
__m128d v3; // xmm1
v1 = (double)a1;
if ( (double)a1 < 0.0 )
v2.m128d_f64[0] = sqrt(v1);
else
v2.m128d_f64[0] = sqrt(v1);
if ( fabs(v2.m128d_f64[0]) < 4.503599627370496e15 )
{
v3 = 0LL;
v3.m128d_f64[0] = (double)(int)v2... | func0:
ENDBR64
PXOR XMM0,XMM0
PXOR XMM1,XMM1
SUB RSP,0x8
CVTSI2SD XMM0,EDI
UCOMISD XMM1,XMM0
JA 0x0010128e
SQRTSD XMM0,XMM0
LAB_0010122e:
MOVSD XMM2,qword ptr [0x00102070]
MOVSD XMM3,qword ptr [0x00102058]
MOVAPD XMM1,XMM0
ANDPD XMM1,XMM2
UCOMISD XMM3,XMM1
JBE 0x0010127f
CVTTSD2SI RAX,XMM0
PXOR XMM1,XMM1
MOVSD XMM4,qwo... | int func0(int param_1)
{
double dVar1;
dVar1 = (double)param_1;
if (dVar1 < 0.0) {
dVar1 = sqrt(dVar1);
}
else {
dVar1 = SQRT(dVar1);
}
if ((double)((ulong)dVar1 & DAT_00102070) < DAT_00102058) {
dVar1 = (double)((ulong)((double)(long)dVar1 -
(double)(-(ulong)(d... |
4,871 | func0 |
#include <math.h>
#include <assert.h>
| int func0(int N) {
int nextN = (int)floor(sqrt(N)) + 1;
return nextN * nextN;
}
| int main() {
assert(func0(35) == 36);
assert(func0(6) == 9);
assert(func0(9) == 16);
return 0;
}
| O3 | c | func0:
endbr64
pxor %xmm0,%xmm0
pxor %xmm2,%xmm2
sub $0x18,%rsp
cvtsi2sd %edi,%xmm0
ucomisd %xmm0,%xmm2
movapd %xmm0,%xmm1
sqrtsd %xmm1,%xmm1
ja 1292 <func0+0x82>
movsd 0xe56(%rip),%xmm2
movsd 0xe36(%rip),%xmm3
movapd %xmm1,%xmm0
andpd %xmm2,%xmm1
ucomisd %xmm1,%xmm3
jbe 1283 <func0+0x73>
cvttsd2si %xm... | func0:
endbr64
pxor xmm0, xmm0
pxor xmm1, xmm1
sub rsp, 8
cvtsi2sd xmm0, edi; x
ucomisd xmm1, xmm0
ja short loc_128E
sqrtsd xmm0, xmm0
loc_122E:
movsd xmm2, cs:qword_2068
movsd xmm3, cs:qword_2058
movapd xmm1, xmm0
andpd xmm1, xmm2
ucomisd xmm3, xmm1
jbe short loc_127F
cvttsd2si rax, xmm0
pxo... | long long func0(int a1)
{
double v1; // xmm0_8
__m128d v2; // xmm0
__m128d v3; // xmm1
v1 = (double)a1;
if ( (double)a1 < 0.0 )
v2.m128d_f64[0] = sqrt(v1);
else
v2.m128d_f64[0] = sqrt(v1);
if ( fabs(v2.m128d_f64[0]) < 4.503599627370496e15 )
{
v3 = 0LL;
v3.m128d_f64[0] = (double)(int)v2... | func0:
ENDBR64
PXOR XMM0,XMM0
PXOR XMM1,XMM1
SUB RSP,0x8
CVTSI2SD XMM0,EDI
UCOMISD XMM1,XMM0
JA 0x0010128e
SQRTSD XMM0,XMM0
LAB_0010122e:
MOVSD XMM2,qword ptr [0x00102068]
MOVSD XMM3,qword ptr [0x00102058]
MOVAPD XMM1,XMM0
ANDPD XMM1,XMM2
UCOMISD XMM3,XMM1
JBE 0x0010127f
CVTTSD2SI RAX,XMM0
PXOR XMM1,XMM1
MOVSD XMM4,qwo... | int func0(int param_1)
{
double dVar1;
dVar1 = (double)param_1;
if (dVar1 < 0.0) {
dVar1 = sqrt(dVar1);
}
else {
dVar1 = SQRT(dVar1);
}
if ((double)((ulong)dVar1 & DAT_00102068) < DAT_00102058) {
dVar1 = (double)((ulong)((double)(long)dVar1 -
(double)(-(ulong)(d... |
4,872 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int arr[], int n) {
int MSIBS[n];
for (int i = 0; i < n; i++) {
MSIBS[i] = arr[i];
}
for (int i = 1; i < n; i++) {
for (int j = 0; j < i; j++) {
if (arr[i] > arr[j] && MSIBS[i] < MSIBS[j] + arr[i]) {
MSIBS[i] = MSIBS[j] + arr[i];
... | int main() {
assert(func0((int[]){1, 15, 51, 45, 33, 100, 12, 18, 9}, 9) == 194);
assert(func0((int[]){80, 60, 30, 40, 20, 10}, 6) == 210);
assert(func0((int[]){2, 3, 14, 16, 21, 23, 29, 30}, 8) == 138);
printf("All test cases passed.\n");
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %r13
push %r12
push %rbx
sub $0x68,%rsp
mov %rdi,-0x78(%rbp)
mov %esi,-0x7c(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x28(%rbp)
xor %eax,%eax
mov %rsp,%rax
mov %rax,%rdi
mov -0x7c(%rbp),%eax
movslq %eax,%rdx
sub $0x1,%rdx
mov %rdx,-0x48(%r... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_58], rdi
mov [rbp+var_5C], esi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov rax, rsp
mov rdi, rax
mov eax, [rbp+var_5C]
movsxd rdx, eax
sub rdx, 1
mov [rbp+var_28], rdx
cdqe
lea rdx, ds:0[rax*... | long long func0(long long a1, int a2)
{
unsigned long long v2; // rax
void *v3; // rsp
unsigned long long v4; // rax
void *v5; // rsp
_BYTE v7[4]; // [rsp+8h] [rbp-60h] BYREF
int v8; // [rsp+Ch] [rbp-5Ch]
long long v9; // [rsp+10h] [rbp-58h]
int i; // [rsp+20h] [rbp-48h]
int j; // [rsp+24h] [rbp-44h]... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x58],RDI
MOV dword ptr [RBP + -0x5c],ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOV RAX,RSP
MOV RDI,RAX
MOV EAX,dword ptr [RBP + -0x5c]
MOVSXD RDX,EAX
SUB RDX,0x1
MOV qword ptr [RBP + -0x28],RDX
CDQE
LEA RDX,[RAX*0x4... | int func0(long param_1,int param_2)
{
long lVar1;
ulong uVar2;
int *puVar3;
int *puVar4;
long in_FS_OFFSET;
int auStack_68 [4];
int local_64;
long local_60;
int local_50;
int local_4c;
int local_48;
int local_44;
int local_40;
int local_3c;
int local_38;
int local_34;
long local_30;
... |
4,873 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int arr[], int n) {
int MSIBS[n];
for (int i = 0; i < n; i++) {
MSIBS[i] = arr[i];
}
for (int i = 1; i < n; i++) {
for (int j = 0; j < i; j++) {
if (arr[i] > arr[j] && MSIBS[i] < MSIBS[j] + arr[i]) {
MSIBS[i] = MSIBS[j] + arr[i];
... | int main() {
assert(func0((int[]){1, 15, 51, 45, 33, 100, 12, 18, 9}, 9) == 194);
assert(func0((int[]){80, 60, 30, 40, 20, 10}, 6) == 210);
assert(func0((int[]){2, 3, 14, 16, 21, 23, 29, 30}, 8) == 138);
printf("All test cases passed.\n");
return 0;
}
| O1 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %r14
push %r13
push %r12
push %rbx
sub $0x10,%rsp
mov %fs:0x28,%rax
mov %rax,-0x28(%rbp)
xor %eax,%eax
movslq %esi,%r12
shl $0x2,%r12
lea 0xf(%r12),%rax
mov %rax,%rdx
and $0xfffffffffffffff0,%rdx
and $0xfffffffffffff000,%rax
mov %rsp... | func0:
endbr64
push rbp
mov rbp, rsp
push r14
push r13
push r12
push rbx
sub rsp, 10h
mov r11d, esi
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
movsxd r10, esi
shl r10, 2
lea rax, [r10+0Fh]
mov rcx, rax
and rcx, 0FFFFFFFFFFFFFFF0h
and rax, 0FFFFFFFFFFFF... | long long func0(_DWORD *a1, int a2)
{
long long v3; // r10
signed long long v4; // rax
void *v5; // rsp
long long i; // rax
long long j; // rdx
long long v8; // rax
int v9; // esi
int v10; // ecx
signed long long v11; // rdx
void *v12; // rsp
int v13; // ecx
_DWORD *v14; // rdx
int v15; // ea... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV R11D,ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
MOVSXD R10,ESI
SHL R10,0x2
LEA RAX,[R10 + 0xf]
MOV RCX,RAX
AND RCX,-0x10
AND RAX,-0x1000
MOV RDX,RSP
SUB RDX,RAX
LAB_001011cc:
CMP RSP,RDX
JZ 0x001011... | int func0(int *param_1,uint param_2)
{
long lVar1;
int iVar2;
ulong uVar3;
ulong uVar4;
long lVar5;
int iVar6;
int *piVar7;
int1 *puVar8;
int1 *puVar9;
int1 *puVar10;
int1 *puVar11;
int1 *puVar12;
int iVar13;
int *piVar14;
long lVar15;
int iVar16;
long in_FS_OFFSET;
int1 auStack_38 ... |
4,874 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int arr[], int n) {
int MSIBS[n];
for (int i = 0; i < n; i++) {
MSIBS[i] = arr[i];
}
for (int i = 1; i < n; i++) {
for (int j = 0; j < i; j++) {
if (arr[i] > arr[j] && MSIBS[i] < MSIBS[j] + arr[i]) {
MSIBS[i] = MSIBS[j] + arr[i];
... | int main() {
assert(func0((int[]){1, 15, 51, 45, 33, 100, 12, 18, 9}, 9) == 194);
assert(func0((int[]){80, 60, 30, 40, 20, 10}, 6) == 210);
assert(func0((int[]){2, 3, 14, 16, 21, 23, 29, 30}, 8) == 138);
printf("All test cases passed.\n");
return 0;
}
| O2 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %r15
push %r14
movslq %esi,%r14
push %r13
shl $0x2,%r14
push %r12
push %rbx
lea 0xf(%r14),%rbx
mov %rbx,%rdx
and $0xfffffffffffff000,%rdx
sub $0x18,%rsp
mov %fs:0x28,%rax
mov %rax,-0x38(%rbp)
xor %eax,%eax
mov %rsp,%rcx
mov %rbx,%r... | func0:
endbr64
push rbp
movsxd r8, esi
mov rbp, rsp
push r15
lea r15, ds:0[r8*4]
push r14
lea r14, [r15+0Fh]
push r13
mov rcx, r14
mov r13, r8
push r12
and rcx, 0FFFFFFFFFFFFF000h
mov r12, rdi
push rbx
sub rsp, 28h
mov rax, fs:28h
mov [rbp+var_38], rax
xor ... | long long func0(_DWORD *a1, int a2)
{
long long v2; // r15
long long v3; // r14
unsigned long long *v6; // rdx
signed long long v7; // rax
void *v8; // rsp
long long v9; // r8
long long v10; // rdx
int v11; // ecx
long long v12; // rax
int v13; // esi
_BYTE *v14; // rdx
signed long long v15; //... | func0:
ENDBR64
PUSH RBP
MOVSXD R8,ESI
MOV RBP,RSP
PUSH R15
LEA R15,[R8*0x4]
PUSH R14
LEA R14,[R15 + 0xf]
PUSH R13
MOV RCX,R14
MOV R13,R8
PUSH R12
AND RCX,-0x1000
MOV R12,RDI
PUSH RBX
SUB RSP,0x28
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
MOV RDX,RSP
MOV RAX,R14
SUB RDX,RCX
AND RAX,-0x10
CM... | int func0(int *param_1,int param_2)
{
long lVar1;
ulong *puVar2;
uint uVar3;
long lVar4;
void *pvVar5;
long lVar7;
size_t __n;
int *piVar8;
ulong *puVar9;
int1 *puVar11;
int1 *puVar13;
int1 *puVar14;
int iVar15;
uint uVar16;
int iVar17;
long lVar18;
int *piVar19;
int iVar20;
long ... |
4,875 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int arr[], int n) {
int MSIBS[n];
for (int i = 0; i < n; i++) {
MSIBS[i] = arr[i];
}
for (int i = 1; i < n; i++) {
for (int j = 0; j < i; j++) {
if (arr[i] > arr[j] && MSIBS[i] < MSIBS[j] + arr[i]) {
MSIBS[i] = MSIBS[j] + arr[i];
... | int main() {
assert(func0((int[]){1, 15, 51, 45, 33, 100, 12, 18, 9}, 9) == 194);
assert(func0((int[]){80, 60, 30, 40, 20, 10}, 6) == 210);
assert(func0((int[]){2, 3, 14, 16, 21, 23, 29, 30}, 8) == 138);
printf("All test cases passed.\n");
return 0;
}
| O3 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %r15
push %r14
push %r13
movslq %esi,%r13
push %r12
mov %r13,%r14
shl $0x2,%r13
mov %rdi,%r12
push %rbx
lea 0xf(%r13),%r9
mov %r9,%rdx
and $0xfffffffffffff000,%rdx
sub $0x28,%rsp
mov %fs:0x28,%rax
mov %rax,-0x38(%rbp)
xor %eax,%eax... | func0:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
mov r14, rdi
push r13
movsxd r13, esi
push r12
mov r15, r13
shl r13, 2
push rbx
lea r8, [r13+0Fh]
mov rcx, r8
and rcx, 0FFFFFFFFFFFFF000h
sub rsp, 38h
mov rax, fs:28h
mov [rbp+var_38], rax
xor eax, eax
... | long long func0(char *src, int a2)
{
long long v4; // r13
long long *v5; // rdx
signed long long v6; // rax
void *v7; // rsp
size_t v8; // r9
unsigned int v9; // ecx
int v10; // ebx
long long v11; // rdx
long long v12; // r8
int v13; // esi
long long v14; // rax
int v15; // edi
_BYTE *v16; //... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
MOV R14,RDI
PUSH R13
MOVSXD R13,ESI
PUSH R12
MOV R15,R13
SHL R13,0x2
PUSH RBX
LEA R8,[R13 + 0xf]
MOV RCX,R8
AND RCX,-0x1000
SUB RSP,0x38
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
MOV RDX,RSP
MOV RAX,R8
SUB RDX,RCX
AND RAX,-0x10
CMP RSP,... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
uint func0(int4 *param_1,ulong param_2)
{
int *piVar1;
int iVar2;
long lVar3;
int *puVar4;
uint uVar5;
ulong uVar6;
size_t sVar7;
void *pvVar8;
long lVar9;
uint uVar10;
uint uVar11;
size_t sVar12;
int *piVar... |
4,876 | func0 |
#include <assert.h>
| double func0(double number) {
if (number == 0) {
return 0;
}
double g = number / 2.0;
double g2 = g + 1;
while (g != g2) {
double n = number / g;
g2 = g;
g = (g + n) / 2;
}
return g;
}
| int main() {
assert(func0(10) == 3.162277660168379);
assert(func0(2) == 1.414213562373095);
assert(func0(9) == 3.0);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
movsd %xmm0,-0x28(%rbp)
pxor %xmm0,%xmm0
ucomisd -0x28(%rbp),%xmm0
jp 1172 <func0+0x29>
pxor %xmm0,%xmm0
ucomisd -0x28(%rbp),%xmm0
jne 1172 <func0+0x29>
pxor %xmm0,%xmm0
jmp 11f1 <func0+0xa8>
movsd -0x28(%rbp),%xmm0
movsd 0xf21(%rip),%xmm1
divsd %xmm1,%xmm... | func0:
endbr64
push rbp
mov rbp, rsp
movsd [rbp+var_28], xmm0
pxor xmm0, xmm0
ucomisd xmm0, [rbp+var_28]
jp short loc_1172
pxor xmm0, xmm0
ucomisd xmm0, [rbp+var_28]
jnz short loc_1172
pxor xmm0, xmm0
jmp short loc_11F1
loc_1172:
movsd xmm0, [rbp+var_28]
movsd xmm1, cs:qword_2080
divs... | double func0(double a1)
{
double v2; // [rsp+10h] [rbp-18h]
double v3; // [rsp+18h] [rbp-10h]
if ( a1 == 0.0 )
return 0.0;
v2 = a1 / 2.0;
v3 = a1 / 2.0 + 1.0;
while ( v2 != v3 )
{
v3 = v2;
v2 = (v2 + a1 / v2) / 2.0;
}
return v2;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOVSD qword ptr [RBP + -0x28],XMM0
PXOR XMM0,XMM0
UCOMISD XMM0,qword ptr [RBP + -0x28]
JP 0x00101172
PXOR XMM0,XMM0
UCOMISD XMM0,qword ptr [RBP + -0x28]
JNZ 0x00101172
PXOR XMM0,XMM0
JMP 0x001011f1
LAB_00101172:
MOVSD XMM0,qword ptr [RBP + -0x28]
MOVSD XMM1,qword ptr [0x00102080]
DIV... | double func0(double param_1)
{
int8 local_20;
int8 local_18;
if (param_1 == 0.0) {
local_20 = 0.0;
}
else {
local_20 = param_1 / DAT_00102080;
local_18 = DAT_00102088 + local_20;
for (; local_20 != local_18; local_20 = (local_20 + param_1 / local_20) / DAT_00102080) {
local_18 = loca... |
4,877 | func0 |
#include <assert.h>
| double func0(double number) {
if (number == 0) {
return 0;
}
double g = number / 2.0;
double g2 = g + 1;
while (g != g2) {
double n = number / g;
g2 = g;
g = (g + n) / 2;
}
return g;
}
| int main() {
assert(func0(10) == 3.162277660168379);
assert(func0(2) == 1.414213562373095);
assert(func0(9) == 3.0);
return 0;
}
| O1 | c | func0:
endbr64
movapd %xmm0,%xmm3
ucomisd 0xf47(%rip),%xmm0
jnp 11a4 <func0+0x5b>
movapd %xmm3,%xmm0
mulsd 0xf41(%rip),%xmm0
movapd %xmm0,%xmm1
addsd 0xf3d(%rip),%xmm1
ucomisd %xmm1,%xmm0
jp 117b <func0+0x32>
je 11aa <func0+0x61>
movsd 0xf25(%rip),%xmm4
movapd %xmm3,%xmm1
divsd %xmm0,%xmm1
addsd %xmm0,%... | func0:
endbr64
ucomisd xmm0, cs:qword_2078
jp short loc_115D
pxor xmm1, xmm1
jz short loc_11A5
loc_115D:
movapd xmm1, xmm0
mulsd xmm1, cs:qword_2080
movapd xmm2, xmm1
addsd xmm2, cs:qword_2088
ucomisd xmm1, xmm2
jp short loc_117D
jz short loc_11A5
loc_117D:
movsd xmm4, cs:qword_2080
loc_1... | __int128 __usercall func0@<xmm0>(__m128 a1@<xmm0>)
{
__int128 v1; // xmm1
double v2; // xmm3_8
v1 = 0LL;
if ( *(double *)a1.m128_u64 != 0.0 )
{
*((_QWORD *)&v1 + 1) = a1.m128_u64[1];
*(double *)&v1 = *(double *)a1.m128_u64 * 0.5;
if ( *(double *)a1.m128_u64 * 0.5 != *(double *)a1.m128_u64 * 0.5 +... | func0:
ENDBR64
UCOMISD XMM0,qword ptr [0x00102078]
JP 0x0010115d
PXOR XMM1,XMM1
JZ 0x001011a5
LAB_0010115d:
MOVAPD XMM1,XMM0
MULSD XMM1,qword ptr [0x00102080]
MOVAPD XMM2,XMM1
ADDSD XMM2,qword ptr [0x00102088]
UCOMISD XMM1,XMM2
JP 0x0010117d
JZ 0x001011a5
LAB_0010117d:
MOVSD XMM4,qword ptr [0x00102080]
LAB_00101185:
MO... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
double func0(double param_1)
{
bool bVar1;
double dVar2;
double dVar3;
dVar3 = 0.0;
if ((param_1 != _DAT_00102078) &&
(dVar2 = param_1 * DAT_00102080, dVar3 = dVar2, dVar2 != dVar2 + _DAT_00102088)) {
do {
... |
4,878 | func0 |
#include <assert.h>
| double func0(double number) {
if (number == 0) {
return 0;
}
double g = number / 2.0;
double g2 = g + 1;
while (g != g2) {
double n = number / g;
g2 = g;
g = (g + n) / 2;
}
return g;
}
| int main() {
assert(func0(10) == 3.162277660168379);
assert(func0(2) == 1.414213562373095);
assert(func0(9) == 3.0);
return 0;
}
| O2 | c | func0:
endbr64
pxor %xmm5,%xmm5
movapd %xmm0,%xmm3
ucomisd %xmm5,%xmm0
jnp 12f8 <func0+0x68>
movsd 0xdf6(%rip),%xmm4
movapd %xmm3,%xmm0
movsd 0xdf2(%rip),%xmm1
mulsd %xmm4,%xmm0
addsd %xmm0,%xmm1
ucomisd %xmm1,%xmm0
jp 12d0 <func0+0x40>
je 12fe <func0+0x6e>
nopw %cs:0x0(%rax,%rax,1)
movapd %xmm3,%xmm... | func0:
endbr64
pxor xmm5, xmm5
movapd xmm3, xmm0
ucomisd xmm0, xmm5
jp short loc_12A8
pxor xmm0, xmm0
jz short locret_12F0
loc_12A8:
movsd xmm4, cs:qword_2078
movapd xmm0, xmm3
movsd xmm1, cs:qword_2080
mulsd xmm0, xmm4
addsd xmm1, xmm0
ucomisd xmm0, xmm1
jp short loc_12D0
jz short l... | double func0(double a1)
{
bool v2; // zf
double result; // xmm0_8
double v4; // xmm2_8
v2 = a1 == 0.0;
result = 0.0;
if ( !v2 )
{
result = a1 * 0.5;
if ( a1 * 0.5 != a1 * 0.5 + 1.0 )
{
do
{
v4 = result;
result = (a1 / result + result) * 0.5;
}
while ( ... | func0:
ENDBR64
PXOR XMM5,XMM5
MOVAPD XMM3,XMM0
UCOMISD XMM0,XMM5
JP 0x001012a8
PXOR XMM0,XMM0
JZ 0x001012f0
LAB_001012a8:
MOVSD XMM4,qword ptr [0x00102078]
MOVAPD XMM0,XMM3
MOVSD XMM1,qword ptr [0x00102080]
MULSD XMM0,XMM4
ADDSD XMM1,XMM0
UCOMISD XMM0,XMM1
JP 0x001012d0
JZ 0x001012f0
NOP dword ptr [RAX]
LAB_001012d0:
M... | double func0(double param_1)
{
bool bVar1;
double dVar2;
double dVar3;
dVar2 = 0.0;
if ((param_1 != 0.0) &&
(dVar2 = param_1 * DAT_00102078, dVar3 = dVar2, dVar2 != DAT_00102080 + dVar2)) {
do {
dVar2 = (param_1 / dVar3 + dVar3) * DAT_00102078;
bVar1 = dVar3 != dVar2;
dVar3 = dV... |
4,879 | func0 |
#include <assert.h>
| double func0(double number) {
if (number == 0) {
return 0;
}
double g = number / 2.0;
double g2 = g + 1;
while (g != g2) {
double n = number / g;
g2 = g;
g = (g + n) / 2;
}
return g;
}
| int main() {
assert(func0(10) == 3.162277660168379);
assert(func0(2) == 1.414213562373095);
assert(func0(9) == 3.0);
return 0;
}
| O3 | c | func0:
endbr64
pxor %xmm5,%xmm5
movapd %xmm0,%xmm3
ucomisd %xmm5,%xmm0
jnp 12f8 <func0+0x68>
movsd 0xdf6(%rip),%xmm4
movapd %xmm3,%xmm0
movsd 0xdf2(%rip),%xmm1
mulsd %xmm4,%xmm0
addsd %xmm0,%xmm1
ucomisd %xmm1,%xmm0
jp 12d0 <func0+0x40>
je 12fe <func0+0x6e>
nopw %cs:0x0(%rax,%rax,1)
movapd %xmm3,%xmm... | func0:
endbr64
movapd xmm3, xmm0
pxor xmm0, xmm0
ucomisd xmm3, xmm0
jp short loc_12A4
jz short locret_12F0
loc_12A4:
movsd xmm4, cs:qword_2078
movapd xmm0, xmm3
movsd xmm1, cs:qword_2080
mulsd xmm0, xmm4
addsd xmm1, xmm0
ucomisd xmm0, xmm1
jp short loc_12D0
jz short locret_12F0
nop ... | double func0(double a1)
{
double result; // xmm0_8
double v3; // xmm2_8
result = 0.0;
if ( a1 != 0.0 )
{
result = a1 * 0.5;
if ( a1 * 0.5 != a1 * 0.5 + 1.0 )
{
do
{
v3 = result;
result = (a1 / result + result) * 0.5;
}
while ( v3 != result );
}
}
r... | func0:
ENDBR64
MOVAPD XMM3,XMM0
PXOR XMM0,XMM0
UCOMISD XMM3,XMM0
JP 0x001012a4
JZ 0x001012f0
LAB_001012a4:
MOVSD XMM4,qword ptr [0x00102078]
MOVAPD XMM0,XMM3
MOVSD XMM1,qword ptr [0x00102080]
MULSD XMM0,XMM4
ADDSD XMM1,XMM0
UCOMISD XMM0,XMM1
JP 0x001012d0
JZ 0x001012f0
NOP dword ptr [RAX + RAX*0x1]
LAB_001012d0:
MOVAPD... | void func0(double param_1)
{
bool bVar1;
double dVar2;
double dVar3;
if ((param_1 != 0.0) && (dVar2 = param_1 * DAT_00102078, dVar2 != DAT_00102080 + dVar2)) {
do {
dVar3 = (param_1 / dVar2 + dVar2) * DAT_00102078;
bVar1 = dVar2 != dVar3;
dVar2 = dVar3;
} while (bVar1);
}
retur... |
4,880 | func0 | #include <stdio.h>
#include <string.h>
#include <assert.h>
| int func0(char str[]) {
int n = strlen(str);
int L[n][n];
for (int i = 0; i < n; i++) {
L[i][i] = 1;
}
for (int cl = 2; cl <= n; cl++) {
for (int i = 0; i < n - cl + 1; i++) {
int j = i + cl - 1;
if (str[i] == str[j] && cl == 2) {
L[i][j] = 2;
} else if (str[i] == str[j]) {
L... | int main() {
assert(func0("TENS FOR TENS") == 5);
assert(func0("CARDIO FOR CARDS") == 7);
assert(func0("PART OF THE JOURNEY IS PART") == 9);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %r15
push %r14
push %r13
push %r12
push %rbx
sub $0x88,%rsp
mov %rdi,-0x78(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x38(%rbp)
xor %eax,%eax
mov %rsp,%rax
mov %rax,%rbx
mov -0x78(%rbp),%rax
mov %rax,%rdi
callq 1070 <strlen@plt>
mov %eax,... | func0:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 58h
mov [rbp+s], rdi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, rsp
mov rbx, rax
mov rax, [rbp+s]
mov rdi, rax; s
call _strlen
mov [rbp+var_38], eax
mov r8d, [rbp+var_38]
mov r9d, [rbp+va... | long long func0(char *a1)
{
unsigned long long v1; // rcx
unsigned long long v2; // rax
void *v3; // rsp
int v4; // edx
_BYTE v6[8]; // [rsp+8h] [rbp-60h] BYREF
char *s; // [rsp+10h] [rbp-58h]
int i; // [rsp+24h] [rbp-44h]
int j; // [rsp+28h] [rbp-40h]
int k; // [rsp+2Ch] [rbp-3Ch]
int v11; // [rsp... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RBP + -0x58],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,RSP
MOV RBX,RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,RAX
CALL 0x00101070
MOV dword ptr [RBP + -0x38],EAX
MOV R8D,dword ptr [RBP + -0x38]
MOV R9D,dw... | int4 func0(char *param_1)
{
long lVar1;
int iVar2;
int iVar3;
size_t sVar4;
ulong uVar5;
ulong uVar6;
int *puVar7;
long in_FS_OFFSET;
int auStack_68 [8];
char *local_60;
int local_4c;
int local_48;
int local_44;
int local_40;
int local_3c;
long local_38;
long local_30;
int *local_28... |
4,881 | func0 | #include <stdio.h>
#include <string.h>
#include <assert.h>
| int func0(char str[]) {
int n = strlen(str);
int L[n][n];
for (int i = 0; i < n; i++) {
L[i][i] = 1;
}
for (int cl = 2; cl <= n; cl++) {
for (int i = 0; i < n - cl + 1; i++) {
int j = i + cl - 1;
if (str[i] == str[j] && cl == 2) {
L[i][j] = 2;
} else if (str[i] == str[j]) {
L... | int main() {
assert(func0("TENS FOR TENS") == 5);
assert(func0("CARDIO FOR CARDS") == 7);
assert(func0("PART OF THE JOURNEY IS PART") == 9);
return 0;
}
| O1 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %r15
push %r14
push %r13
push %r12
push %rbx
sub $0x38,%rsp
mov %rdi,%rbx
mov %fs:0x28,%rax
mov %rax,-0x38(%rbp)
xor %eax,%eax
mov $0xffffffffffffffff,%rcx
repnz scas %es:(%rdi),%al
mov %rcx,%rax
not %rax
sub $0x1,%rax
mov %rax,-0x... | func0:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_38], rax
xor eax, eax
call _strlen
mov [rbp+var_50], rax
mov esi, eax
cdqe
lea r10, ds:0[rax*4]
imul rax, rax
lea rax, ... | long long func0(long long a1)
{
int v2; // esi
unsigned long long v3; // r10
long long v4; // rax
__int16 v5; // cx
signed long long v6; // rax
void *v7; // rsp
int v8; // eax
unsigned long long v9; // r10
int v10; // r14d
long long v11; // r13
int v12; // r11d
unsigned long long v13; // rcx
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
CALL 0x00101070
MOV qword ptr [RBP + -0x50],RAX
MOV ESI,EAX
CDQE
LEA R10,[RAX*0x4]
IMUL RAX,RAX
LEA RAX,[0xf + RAX*0x4]
MOV RCX,RAX
AND RCX,-0... | int4 func0(char *param_1)
{
long lVar1;
int iVar2;
int iVar3;
int iVar4;
size_t sVar5;
ulong uVar6;
ulong uVar7;
long lVar8;
int iVar9;
int iVar10;
size_t *psVar11;
int iVar12;
char *pcVar13;
uint uVar14;
long in_FS_OFFSET;
size_t local_58;
int local_4c;
long local_40;
local_40... |
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.