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,482 | func0 | #include <assert.h>
#include <stdio.h>
| int func0(int tri[3][3], int m, int n) {
for (int i = m-1; i >= 0; i--) {
for (int j = 0; j <= i; j++) {
if (tri[i+1][j] > tri[i+1][j+1]) {
tri[i][j] += tri[i+1][j];
} else {
tri[i][j] += tri[i+1][j+1];
}
}
}
retur... | int main() {
int tri1[3][3] = {{1, 0, 0}, {4, 8, 0}, {1, 5, 3}};
int tri2[3][3] = {{13, 0, 0}, {7, 4, 0}, {2, 4, 6}};
int tri3[3][3] = {{2, 0, 0}, {11, 18, 0}, {21, 25, 33}};
assert(func0(tri1, 2, 2) == 14);
assert(func0(tri2, 2, 2) == 24);
assert(func0(tri3, 2, 2) == 53);
return ... | O2 | c | func0:
endbr64
sub $0x1,%esi
mov %esi,%r9d
js 135a <func0+0x5a>
movslq %esi,%rax
lea (%rax,%rax,2),%rax
lea (%rdi,%rax,4),%rcx
nopw 0x0(%rax,%rax,1)
lea 0xc(%rcx),%r10
xor %eax,%eax
mov (%r10,%rax,4),%r8d
mov 0x4(%r10,%rax,4),%esi
mov (%rcx,%rax,4),%edx
lea (%rsi,%rdx,1),%r11d
add ... | func0:
endbr64
sub esi, 1
js short loc_134F
movsxd rax, esi
lea rax, [rax+rax*2]
lea rcx, [rdi+rax*4]
nop dword ptr [rax+00h]
loc_1318:
lea r10, [rcx+0Ch]
xor eax, eax
loc_131E:
mov r9d, [r10+rax*4]
mov r8d, [r10+rax*4+4]
mov edx, [rcx+rax*4]
lea r11d, [r9+rdx]
add edx,... | long long func0(unsigned int *a1, int a2)
{
int v2; // esi
unsigned int *v3; // rcx
unsigned int *v4; // r10
long long v5; // rax
signed int v6; // r9d
signed int v7; // r8d
unsigned int v8; // edx
unsigned int v9; // r11d
unsigned int v10; // edx
v2 = a2 - 1;
if ( v2 >= 0 )
{
v3 = &a1[3 *... | func0:
ENDBR64
SUB ESI,0x1
JS 0x0010134f
MOVSXD RAX,ESI
LEA RAX,[RAX + RAX*0x2]
LEA RCX,[RDI + RAX*0x4]
NOP dword ptr [RAX]
LAB_00101318:
LEA R10,[RCX + 0xc]
XOR EAX,EAX
LAB_0010131e:
MOV R9D,dword ptr [R10 + RAX*0x4]
MOV R8D,dword ptr [R10 + RAX*0x4 + 0x4]
MOV EDX,dword ptr [RCX + RAX*0x4]
LEA R11D,[R9 + RDX*0x1]
ADD ... | int4 func0(int4 *param_1,int param_2)
{
int iVar1;
long lVar2;
int4 *puVar3;
param_2 = param_2 + -1;
if (-1 < param_2) {
puVar3 = param_1 + (long)param_2 * 3;
do {
lVar2 = 0;
do {
iVar1 = puVar3[lVar2 + 4];
if ((int)puVar3[lVar2 + 4] < (int)puVar3[lVar2 + 3]) {
... |
4,483 | func0 | #include <assert.h>
#include <stdio.h>
| int func0(int tri[3][3], int m, int n) {
for (int i = m-1; i >= 0; i--) {
for (int j = 0; j <= i; j++) {
if (tri[i+1][j] > tri[i+1][j+1]) {
tri[i][j] += tri[i+1][j];
} else {
tri[i][j] += tri[i+1][j+1];
}
}
}
retur... | int main() {
int tri1[3][3] = {{1, 0, 0}, {4, 8, 0}, {1, 5, 3}};
int tri2[3][3] = {{13, 0, 0}, {7, 4, 0}, {2, 4, 6}};
int tri3[3][3] = {{2, 0, 0}, {11, 18, 0}, {21, 25, 33}};
assert(func0(tri1, 2, 2) == 14);
assert(func0(tri2, 2, 2) == 24);
assert(func0(tri3, 2, 2) == 53);
return ... | O3 | c | func0:
endbr64
sub $0x1,%esi
js 1378 <func0+0xb8>
movslq %esi,%rax
lea (%rax,%rax,2),%rax
lea (%rdi,%rax,4),%rax
nopl 0x0(%rax,%rax,1)
mov (%rax),%edx
mov 0xc(%rax),%r8d
lea 0xc(%rax),%r10
mov 0x10(%rax),%ecx
lea (%rcx,%rdx,1),%r9d
add %r8d,%edx
cmp %r8d,%ecx
cmovge %r9d,%edx
mov ... | func0:
endbr64
mov eax, esi
mov rcx, rdi
sub eax, 1
js loc_1561
cdqe
push r12
lea rax, [rax+rax*2]
push rbp
lea rax, [rdi+rax*4]
mov edi, esi
push rbx
lea rdx, [rax+0Ch]
sub edi, 1
jz loc_1514
nop
loc_12F0:
mov r8d, esi
shr r8d, 1
lea r9d, [r8-2]
cmp r8... | long long func0(unsigned int *a1, unsigned int i)
{
unsigned int *v3; // rax
const __m128i *v4; // rdx
unsigned int v5; // edi
unsigned int v6; // r8d
unsigned int v7; // r9d
__m128i v8; // xmm3
unsigned int *v9; // r10
const __m128i *v10; // r11
__m128i v11; // xmm1
__m128i v12; // xmm2
int v13;... | func0:
ENDBR64
MOV EAX,ESI
MOV RCX,RDI
SUB EAX,0x1
JS 0x00101561
CDQE
PUSH R12
LEA RAX,[RAX + RAX*0x2]
PUSH RBP
LEA RAX,[RDI + RAX*0x4]
MOV EDI,ESI
PUSH RBX
LEA RDX,[RAX + 0xc]
SUB EDI,0x1
JZ 0x00101514
NOP
LAB_001012f0:
MOV R8D,ESI
SHR R8D,0x1
LEA R9D,[R8 + -0x2]
CMP R8D,0x3
JBE 0x00101550
MOVQ XMM0,qword ptr [RAX + 0... | int4 func0(int4 *param_1,uint param_2)
{
int iVar1;
ulong *puVar2;
ulong *puVar3;
int *piVar4;
int iVar5;
uint uVar6;
long lVar7;
int *piVar8;
uint uVar9;
uint uVar10;
ulong *puVar11;
ulong *puVar12;
ulong *puVar13;
ulong *puVar14;
int iVar15;
ulong uVar17;
ulong uVar18;
int iVar19;... |
4,484 | func0 |
#include <assert.h>
int sum_digits_single(int x) {
int ans = 0;
while (x) {
ans += x % 10;
x /= 10;
}
return ans;
}
int closest(int x) {
int ans = 0;
while (ans * 10 + 9 <= x) {
ans = ans * 10 + 9;
}
return ans;
}
| int func0(int N) {
int A = closest(N);
return sum_digits_single(A) + sum_digits_single(N - A);
}
| int main() {
assert(func0(35) == 17);
assert(func0(7) == 7);
assert(func0(100) == 19);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x18,%rsp
mov %edi,-0x1c(%rbp)
mov -0x1c(%rbp),%eax
mov %eax,%edi
callq 11b3 <closest>
mov %eax,-0xc(%rbp)
mov -0xc(%rbp),%eax
mov %eax,%edi
callq 1149 <sum_digits_single>
mov %eax,%ebx
mov -0x1c(%rbp),%eax
sub -0xc(%rbp),%eax
... | func0:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 18h
mov [rbp+var_1C], edi
mov eax, [rbp+var_1C]
mov edi, eax
call closest
mov [rbp+var_C], eax
mov eax, [rbp+var_C]
mov edi, eax
call sum_digits_single
mov ebx, eax
mov eax, [rbp+var_1C]
sub eax, [rbp+var_C]
m... | long long func0(unsigned int a1)
{
int v1; // ebx
unsigned int v3; // [rsp+14h] [rbp-Ch]
v3 = closest(a1);
v1 = sum_digits_single(v3);
return v1 + (unsigned int)sum_digits_single(a1 - v3);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x18
MOV dword ptr [RBP + -0x1c],EDI
MOV EAX,dword ptr [RBP + -0x1c]
MOV EDI,EAX
CALL 0x001011b3
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
MOV EDI,EAX
CALL 0x00101149
MOV EBX,EAX
MOV EAX,dword ptr [RBP + -0x1c]
SUB EAX,dword ptr [RBP + -0xc]
MOV E... | int func0(int param_1)
{
int iVar1;
int iVar2;
iVar1 = closest(param_1);
iVar2 = sum_digits_single(iVar1);
iVar1 = sum_digits_single(param_1 - iVar1);
return iVar1 + iVar2;
} |
4,485 | func0 |
#include <assert.h>
int sum_digits_single(int x) {
int ans = 0;
while (x) {
ans += x % 10;
x /= 10;
}
return ans;
}
int closest(int x) {
int ans = 0;
while (ans * 10 + 9 <= x) {
ans = ans * 10 + 9;
}
return ans;
}
| int func0(int N) {
int A = closest(N);
return sum_digits_single(A) + sum_digits_single(N - A);
}
| int main() {
assert(func0(35) == 17);
assert(func0(7) == 7);
assert(func0(100) == 19);
return 0;
}
| O1 | c | func0:
endbr64
push %r12
push %rbp
push %rbx
mov %edi,%ebx
callq 1181 <closest>
mov %eax,%r12d
mov %eax,%edi
callq 1149 <sum_digits_single>
mov %eax,%ebp
sub %r12d,%ebx
mov %ebx,%edi
callq 1149 <sum_digits_single>
add %ebp,%eax
pop %rbx
pop %rbp
pop %r12
retq
| func0:
endbr64
push r12
push rbp
push rbx
mov ebx, edi
call closest
mov r12d, eax
mov edi, eax
call sum_digits_single
mov ebp, eax
sub ebx, r12d
mov edi, ebx
call sum_digits_single
add eax, ebp
pop rbx
pop rbp
pop r12
retn | long long func0(int a1)
{
long long v1; // r12
int v2; // ebp
v1 = (unsigned int)closest();
v2 = sum_digits_single(v1);
return v2 + (unsigned int)sum_digits_single((unsigned int)(a1 - v1));
} | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
MOV EBX,EDI
CALL 0x00101181
MOV R12D,EAX
MOV EDI,EAX
CALL 0x00101149
MOV EBP,EAX
SUB EBX,R12D
MOV EDI,EBX
CALL 0x00101149
ADD EAX,EBP
POP RBX
POP RBP
POP R12
RET | int func0(int param_1)
{
int iVar1;
int iVar2;
iVar1 = closest();
iVar2 = sum_digits_single(iVar1);
iVar1 = sum_digits_single(param_1 - iVar1);
return iVar1 + iVar2;
} |
4,486 | func0 |
#include <assert.h>
int sum_digits_single(int x) {
int ans = 0;
while (x) {
ans += x % 10;
x /= 10;
}
return ans;
}
int closest(int x) {
int ans = 0;
while (ans * 10 + 9 <= x) {
ans = ans * 10 + 9;
}
return ans;
}
| int func0(int N) {
int A = closest(N);
return sum_digits_single(A) + sum_digits_single(N - A);
}
| int main() {
assert(func0(35) == 17);
assert(func0(7) == 7);
assert(func0(100) == 19);
return 0;
}
| O2 | c | func0:
endbr64
cmp $0x8,%edi
jle 12a8 <func0+0x88>
xor %eax,%eax
nopl 0x0(%rax,%rax,1)
lea 0x9(%rax),%esi
lea (%rsi,%rsi,4),%eax
add %eax,%eax
lea 0x8(%rax),%edx
cmp %edx,%edi
jg 1230 <func0+0x10>
mov %esi,%edx
xor %r8d,%r8d
mov $0xcccccccd,%r9d
nopw 0x0(%rax,%rax,1)
mov %edx... | func0:
endbr64
mov edx, edi
cmp edi, 8
jle short loc_12E8
xor eax, eax
nop dword ptr [rax]
loc_1270:
lea edi, [rax+9]
lea eax, [rdi+rdi*4]
add eax, eax
lea ecx, [rax+8]
cmp edx, ecx
jg short loc_1270
mov ecx, edi
xor r8d, r8d
mov r9d, 0CCCCCCCDh
nop word ptr ... | long long func0(int a1)
{
int v1; // edx
int v2; // eax
int v3; // edi
unsigned int v4; // ecx
unsigned int v5; // r8d
int v6; // esi
v1 = a1;
if ( a1 <= 8 )
{
v5 = 0;
}
else
{
v2 = 0;
do
{
v3 = v2 + 9;
v2 = 10 * (v2 + 9);
}
while ( v1 > v2 + 8 );
v4 = v... | func0:
ENDBR64
MOV EDX,EDI
CMP EDI,0x8
JLE 0x001012e8
XOR EAX,EAX
NOP dword ptr [RAX]
LAB_00101270:
LEA EDI,[RAX + 0x9]
LEA EAX,[RDI + RDI*0x4]
ADD EAX,EAX
LEA ECX,[RAX + 0x8]
CMP EDX,ECX
JG 0x00101270
MOV ECX,EDI
XOR R8D,R8D
MOV R9D,0xcccccccd
NOP word ptr [RAX + RAX*0x1]
LAB_00101290:
MOV EAX,ECX
IMUL RAX,R9
SHR RAX,... | int func0(int param_1)
{
int iVar1;
uint uVar2;
int iVar3;
uint uVar4;
int iVar5;
if (param_1 < 9) {
iVar5 = 0;
}
else {
iVar5 = 0;
do {
uVar4 = iVar5 + 9;
iVar5 = uVar4 * 10;
} while (iVar5 + 8 < param_1);
iVar5 = 0;
uVar2 = uVar4;
do {
iVar5 = iVar5 + ... |
4,487 | func0 |
#include <assert.h>
int sum_digits_single(int x) {
int ans = 0;
while (x) {
ans += x % 10;
x /= 10;
}
return ans;
}
int closest(int x) {
int ans = 0;
while (ans * 10 + 9 <= x) {
ans = ans * 10 + 9;
}
return ans;
}
| int func0(int N) {
int A = closest(N);
return sum_digits_single(A) + sum_digits_single(N - A);
}
| int main() {
assert(func0(35) == 17);
assert(func0(7) == 7);
assert(func0(100) == 19);
return 0;
}
| O3 | c | func0:
endbr64
cmp $0x8,%edi
jle 12a8 <func0+0x88>
xor %eax,%eax
nopl 0x0(%rax,%rax,1)
lea 0x9(%rax),%esi
lea (%rsi,%rsi,4),%eax
add %eax,%eax
lea 0x8(%rax),%edx
cmp %edx,%edi
jg 1230 <func0+0x10>
mov %esi,%edx
xor %r8d,%r8d
mov $0xcccccccd,%r9d
nopw 0x0(%rax,%rax,1)
mov %edx... | func0:
endbr64
mov edx, edi
cmp edi, 8
jle loc_12B0
xor eax, eax
nop dword ptr [rax+00000000h]
loc_1238:
lea r8d, [rax+9]
lea eax, [r8+r8*4]
add eax, eax
lea ecx, [rax+8]
cmp edx, ecx
jg short loc_1238
mov ecx, r8d
xor edi, edi
xchg ax, ax
loc_1250:
movsxd rax, e... | long long func0(int a1)
{
int v1; // edx
int v2; // eax
int v3; // r8d
int v4; // ecx
unsigned int v5; // edi
int v6; // esi
v1 = a1;
if ( a1 <= 8 )
{
v5 = 0;
}
else
{
v2 = 0;
do
{
v3 = v2 + 9;
v2 = 10 * (v2 + 9);
}
while ( a1 > v2 + 8 );
v4 = v3;
v5... | func0:
ENDBR64
MOV EDX,EDI
CMP EDI,0x8
JLE 0x001012b0
XOR EAX,EAX
NOP dword ptr [RAX]
LAB_00101238:
LEA R8D,[RAX + 0x9]
LEA EAX,[R8 + R8*0x4]
ADD EAX,EAX
LEA ECX,[RAX + 0x8]
CMP EDX,ECX
JG 0x00101238
MOV ECX,R8D
XOR EDI,EDI
NOP
LAB_00101250:
MOVSXD RAX,ECX
MOV ESI,ECX
IMUL RAX,RAX,0x66666667
SAR ESI,0x1f
SAR RAX,0x22
S... | int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
if (param_1 < 9) {
iVar3 = 0;
}
else {
iVar3 = 0;
do {
iVar4 = iVar3 + 9;
iVar3 = iVar4 * 10;
} while (iVar3 + 8 < param_1);
iVar3 = 0;
iVar2 = iVar4;
do {
iVar1 = iVar2 / 10;
iVar3... |
4,488 | func0 |
#include <assert.h>
#include <stdio.h>
| int func0(int arr[], int n) {
int dp[n];
for (int i = 0; i < n; i++) {
dp[i] = 1;
}
for (int i = 0; i < n; i++) {
for (int j = 0; j < i; j++) {
if (arr[i] == arr[j] + 1 || arr[i] == arr[j] - 1) {
if (dp[i] < dp[j] + 1) {
dp[i... | int main() {
assert(func0((int[]){1, 2, 3, 4, 5, 3, 2}, 7) == 6);
assert(func0((int[]){10, 9, 4, 5, 4, 8, 6}, 7) == 3);
assert(func0((int[]){1, 2, 3, 2, 3, 7, 2, 1}, 8) == 7);
printf("All tests passed!\n");
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x48,%rsp
mov %rdi,-0x48(%rbp)
mov %esi,-0x4c(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov %rsp,%rax
mov %rax,%rsi
mov -0x4c(%rbp),%eax
movslq %eax,%rdx
sub $0x1,%rdx
mov %rdx,-0x28(%rbp)
movslq %eax,%rdx
mov... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_38], rdi
mov [rbp+var_3C], esi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov rax, rsp
mov rsi, rax
mov eax, [rbp+var_3C]
movsxd rdx, eax
sub rdx, 1
mov [rbp+var_18], rdx
cdqe
lea rdx, ds:0[rax*... | long long func0(long long a1, int a2)
{
unsigned long long v2; // rax
void *v3; // rsp
_BYTE v5[4]; // [rsp+8h] [rbp-40h] BYREF
int v6; // [rsp+Ch] [rbp-3Ch]
long long v7; // [rsp+10h] [rbp-38h]
int i; // [rsp+1Ch] [rbp-2Ch]
int j; // [rsp+20h] [rbp-28h]
int k; // [rsp+24h] [rbp-24h]
int v11; // [rsp... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x38],RDI
MOV dword ptr [RBP + -0x3c],ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOV RAX,RSP
MOV RSI,RAX
MOV EAX,dword ptr [RBP + -0x3c]
MOVSXD RDX,EAX
SUB RDX,0x1
MOV qword ptr [RBP + -0x18],RDX
CDQE
LEA RDX,[RAX*0x4... | int func0(long param_1,int param_2)
{
long lVar1;
ulong uVar2;
int *puVar3;
long in_FS_OFFSET;
int auStack_48 [4];
int local_44;
long local_40;
int local_34;
int local_30;
int local_2c;
int local_28;
int local_24;
long local_20;
int *local_18;
long local_10;
local_40 = param_1;
loc... |
4,489 | func0 |
#include <assert.h>
#include <stdio.h>
| int func0(int arr[], int n) {
int dp[n];
for (int i = 0; i < n; i++) {
dp[i] = 1;
}
for (int i = 0; i < n; i++) {
for (int j = 0; j < i; j++) {
if (arr[i] == arr[j] + 1 || arr[i] == arr[j] - 1) {
if (dp[i] < dp[j] + 1) {
dp[i... | int main() {
assert(func0((int[]){1, 2, 3, 4, 5, 3, 2}, 7) == 6);
assert(func0((int[]){10, 9, 4, 5, 4, 8, 6}, 7) == 3);
assert(func0((int[]){1, 2, 3, 2, 3, 7, 2, 1}, 8) == 7);
printf("All tests passed!\n");
return 0;
}
| O1 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %r13
push %r12
push %rbx
sub $0x18,%rsp
mov %fs:0x28,%rax
mov %rax,-0x28(%rbp)
xor %eax,%eax
movslq %esi,%rax
lea 0xf(,%rax,4),%rax
mov %rax,%rdx
and $0xfffffffffffffff0,%rdx
and $0xfffffffffffff000,%rax
mov %rsp,%rbx
sub %rax,%rbx
mov... | func0:
endbr64
push rbp
mov rbp, rsp
push r13
push r12
push rbx
sub rsp, 18h
mov r9, rdi
mov r12d, esi
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
movsxd rax, esi
lea rax, ds:0Fh[rax*4]
mov rcx, rax
and rcx, 0FFFFFFFFFFFFFFF0h
and rax, 0FFFFFFFFFFFFF000h
m... | long long func0(long long a1, int a2)
{
signed long long v4; // rax
void *v5; // rsp
_DWORD *v6; // r11
_DWORD *v7; // rbx
_DWORD *v8; // rax
long long i; // rdi
int v10; // edx
long long j; // rax
int v12; // edx
int v13; // esi
long long result; // rax
_DWORD v16[2]; // [rsp+8h] [rbp-30h] BYR... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R9,RDI
MOV R12D,ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
MOVSXD RAX,ESI
LEA RAX,[0xf + RAX*0x4]
MOV RCX,RAX
AND RCX,-0x10
AND RAX,-0x1000
MOV RDX,RSP
SUB RDX,RAX
LAB_001011cd:
CMP RSP,RDX
JZ 0x001011e4
SUB... | int func0(long param_1,uint param_2)
{
int iVar1;
long lVar2;
int iVar3;
int *piVar4;
ulong uVar5;
int1 *puVar6;
ulong uVar7;
int *piVar8;
long in_FS_OFFSET;
bool bVar9;
int1 auStack_38 [8];
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
uVar7 = (long)(int)param_2 * 4 + 0xf;
... |
4,490 | func0 |
#include <assert.h>
#include <stdio.h>
| int func0(int arr[], int n) {
int dp[n];
for (int i = 0; i < n; i++) {
dp[i] = 1;
}
for (int i = 0; i < n; i++) {
for (int j = 0; j < i; j++) {
if (arr[i] == arr[j] + 1 || arr[i] == arr[j] - 1) {
if (dp[i] < dp[j] + 1) {
dp[i... | int main() {
assert(func0((int[]){1, 2, 3, 4, 5, 3, 2}, 7) == 6);
assert(func0((int[]){10, 9, 4, 5, 4, 8, 6}, 7) == 3);
assert(func0((int[]){1, 2, 3, 2, 3, 7, 2, 1}, 8) == 7);
printf("All tests passed!\n");
return 0;
}
| O2 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %r12
push %rbx
sub $0x10,%rsp
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
movslq %esi,%rax
mov %rsp,%rbx
lea 0xf(,%rax,4),%rax
mov %rax,%rdx
and $0xfffffffffffff000,%rax
sub %rax,%rbx
and $0xfffffffffffffff0,%rdx
mov %rbx,%ra... | func0:
endbr64
push rbp
mov r9, rdi
mov rbp, rsp
push r12
push rbx
sub rsp, 10h
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
movsxd rax, esi
mov rcx, rsp
lea rax, ds:0Fh[rax*4]
mov rdx, rax
and rax, 0FFFFFFFFFFFFF000h
sub rcx, rax
and rdx, 0FFFFFFFFFFFFFFF... | long long func0(long long a1, int a2)
{
long long v3; // rdx
_DWORD *v4; // rcx
__int16 v5; // dx
signed long long v6; // rdx
void *v7; // rsp
long long v8; // r12
_DWORD *v9; // r11
_DWORD *v10; // rax
_DWORD *v11; // rbx
long long i; // rdi
int v13; // esi
long long v14; // r10
long long j;... | func0:
ENDBR64
PUSH RBP
MOV R9,RDI
MOV RBP,RSP
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOVSXD RAX,ESI
MOV RCX,RSP
LEA RAX,[0xf + RAX*0x4]
MOV RDX,RAX
AND RAX,-0x1000
SUB RCX,RAX
AND RDX,-0x10
CMP RSP,RCX
JZ 0x00101369
LAB_00101354:
SUB RSP,0x1000
OR qword p... | int func0(long param_1,uint param_2)
{
int iVar1;
long lVar2;
int1 *puVar3;
int iVar4;
int *piVar5;
ulong uVar6;
int1 *puVar7;
ulong uVar9;
int *piVar10;
long in_FS_OFFSET;
int1 auStack_28 [8];
long local_20;
int1 *puVar8;
puVar7 = auStack_28;
local_20 = *(long *)(in_FS_OFFSET + 0x28);... |
4,491 | func0 |
#include <assert.h>
#include <stdio.h>
| int func0(int arr[], int n) {
int dp[n];
for (int i = 0; i < n; i++) {
dp[i] = 1;
}
for (int i = 0; i < n; i++) {
for (int j = 0; j < i; j++) {
if (arr[i] == arr[j] + 1 || arr[i] == arr[j] - 1) {
if (dp[i] < dp[j] + 1) {
dp[i... | int main() {
assert(func0((int[]){1, 2, 3, 4, 5, 3, 2}, 7) == 6);
assert(func0((int[]){10, 9, 4, 5, 4, 8, 6}, 7) == 3);
assert(func0((int[]){1, 2, 3, 2, 3, 7, 2, 1}, 8) == 7);
printf("All tests passed!\n");
return 0;
}
| O3 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x18,%rsp
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
movslq %esi,%rax
mov %rsp,%rbx
lea 0xf(,%rax,4),%rax
mov %rax,%rdx
and $0xfffffffffffff000,%rax
sub %rax,%rbx
and $0xfffffffffffffff0,%rdx
mov %rbx,%rax
cmp %ra... | func0:
endbr64
push rbp
mov r10, rdi
mov r9d, esi
mov rbp, rsp
push r13
push r12
push rbx
sub rsp, 18h
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
movsxd rax, esi
mov rcx, rsp
lea rax, ds:0Fh[rax*4]
mov rdx, rax
and rax, 0FFFFFFFFFFFFF000h
sub rcx, rax... | long long func0(long long a1, int a2)
{
long long v2; // rdx
__m128i *v3; // rcx
__int16 v4; // dx
signed long long v5; // rdx
void *v6; // rsp
int *v7; // r11
__m128i si128; // xmm0
__m128i *v9; // rax
long long v10; // rdx
__m128i *v11; // rcx
int v12; // eax
__m128i *v13; // rdx
long long ... | func0:
ENDBR64
PUSH RBP
MOV R10,RDI
MOV R9D,ESI
MOV RBP,RSP
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
MOVSXD RAX,ESI
MOV RCX,RSP
LEA RAX,[0xf + RAX*0x4]
MOV RDX,RAX
AND RAX,-0x1000
SUB RCX,RAX
AND RDX,-0x10
CMP RSP,RCX
JZ 0x0010132e
LAB_00101319:
SUB... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
uint func0(long param_1,uint param_2)
{
long lVar1;
int iVar2;
int iVar3;
long lVar4;
uint *puVar5;
uint *puVar6;
int8 uVar7;
int8 uVar8;
int *puVar9;
uint uVar10;
int8 *puVar11;
long lVar12;
uint *puVar13;
... |
4,492 | func0 |
#include <stdbool.h>
#include <assert.h>
| bool func0(int a, int b, int c) {
if (a == b) {
return true;
}
if ((b - a) * c > 0 && (b - a) % c == 0) {
return true;
}
return false;
}
| int main() {
assert(func0(1, 7, 3) == true);
assert(func0(1, -3, 5) == false);
assert(func0(3, 2, 5) == false);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x4(%rbp)
mov %esi,-0x8(%rbp)
mov %edx,-0xc(%rbp)
mov -0x4(%rbp),%eax
cmp -0x8(%rbp),%eax
jne 1169 <func0+0x20>
mov $0x1,%eax
jmp 1193 <func0+0x4a>
mov -0x8(%rbp),%eax
sub -0x4(%rbp),%eax
imul -0xc(%rbp),%eax
test %eax,%eax
jle 1... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov [rbp+var_8], esi
mov [rbp+var_C], edx
mov eax, [rbp+var_4]
cmp eax, [rbp+var_8]
jnz short loc_1169
mov eax, 1
jmp short loc_1193
loc_1169:
mov eax, [rbp+var_8]
sub eax, [rbp+var_4]
imul eax, [rbp+var_C]
test ... | _BOOL8 func0(int a1, int a2, int a3)
{
if ( a1 == a2 )
return 1LL;
return a3 * (a2 - a1) > 0 && !((a2 - a1) % a3);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV dword ptr [RBP + -0x8],ESI
MOV dword ptr [RBP + -0xc],EDX
MOV EAX,dword ptr [RBP + -0x4]
CMP EAX,dword ptr [RBP + -0x8]
JNZ 0x00101169
MOV EAX,0x1
JMP 0x00101193
LAB_00101169:
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,dword ptr [RBP + -0x4]
IMUL EAX,dw... | int8 func0(int param_1,int param_2,int param_3)
{
int8 uVar1;
if (param_1 == param_2) {
uVar1 = 1;
}
else if (((param_2 - param_1) * param_3 < 1) || ((param_2 - param_1) % param_3 != 0)) {
uVar1 = 0;
}
else {
uVar1 = 1;
}
return uVar1;
} |
4,493 | func0 |
#include <stdbool.h>
#include <assert.h>
| bool func0(int a, int b, int c) {
if (a == b) {
return true;
}
if ((b - a) * c > 0 && (b - a) % c == 0) {
return true;
}
return false;
}
| int main() {
assert(func0(1, 7, 3) == true);
assert(func0(1, -3, 5) == false);
assert(func0(3, 2, 5) == false);
return 0;
}
| O1 | c | func0:
endbr64
mov %esi,%eax
mov %edx,%ecx
mov $0x1,%edx
cmp %esi,%edi
je 1152 <func0+0x29>
sub %edi,%eax
mov %eax,%esi
imul %ecx,%esi
mov $0x0,%edx
test %esi,%esi
jle 1152 <func0+0x29>
cltd
idiv %ecx
test %edx,%edx
sete %dl
mov %edx,%eax
retq
| func0:
endbr64
mov eax, esi
mov ecx, edx
mov edx, 1
cmp edi, esi
jz short loc_1152
sub eax, edi
mov esi, eax
imul esi, ecx
mov edx, 0
test esi, esi
jle short loc_1152
cdq
idiv ecx
test edx, edx
setz dl
loc_1152:
mov eax, edx
retn | long long func0(int a1, int a2, int a3)
{
unsigned int v4; // edx
int v5; // eax
v4 = 1;
if ( a1 != a2 )
{
v5 = a2 - a1;
v4 = 0;
if ( a3 * (a2 - a1) > 0 )
{
v4 = v5 % a3;
LOBYTE(v4) = v5 % a3 == 0;
}
}
return v4;
} | func0:
ENDBR64
MOV EAX,ESI
MOV ECX,EDX
MOV EDX,0x1
CMP EDI,ESI
JZ 0x00101152
SUB EAX,EDI
MOV ESI,EAX
IMUL ESI,ECX
MOV EDX,0x0
TEST ESI,ESI
JLE 0x00101152
CDQ
IDIV ECX
TEST EDX,EDX
SETZ DL
LAB_00101152:
MOV EAX,EDX
RET | ulong func0(int param_1,int param_2,int param_3)
{
long lVar1;
ulong uVar2;
uVar2 = 1;
if (param_1 != param_2) {
uVar2 = 0;
if (0 < (param_2 - param_1) * param_3) {
lVar1 = (long)(param_2 - param_1) % (long)param_3;
uVar2 = CONCAT71((int7)((ulong)lVar1 >> 8),(int)lVar1 == 0) & 0xffffffff... |
4,494 | func0 |
#include <stdbool.h>
#include <assert.h>
| bool func0(int a, int b, int c) {
if (a == b) {
return true;
}
if ((b - a) * c > 0 && (b - a) % c == 0) {
return true;
}
return false;
}
| int main() {
assert(func0(1, 7, 3) == true);
assert(func0(1, -3, 5) == false);
assert(func0(3, 2, 5) == false);
return 0;
}
| O2 | c | func0:
endbr64
mov %esi,%eax
mov %edx,%ecx
mov $0x1,%r8d
cmp %esi,%edi
je 1169 <func0+0x29>
sub %edi,%eax
xor %r8d,%r8d
mov %eax,%edx
imul %ecx,%edx
test %edx,%edx
jle 1169 <func0+0x29>
cltd
idiv %ecx
test %edx,%edx
sete %r8b
mov %r8d,%eax
retq
nopl (%rax)
| func0:
endbr64
mov eax, esi
mov ecx, edx
mov r8d, 1
cmp edi, esi
jz short loc_1169
sub eax, edi
xor r8d, r8d
mov edx, eax
imul edx, ecx
test edx, edx
jle short loc_1169
cdq
idiv ecx
test edx, edx
setz r8b
loc_1169:
mov eax, r8d
retn | long long func0(int a1, int a2, int a3)
{
unsigned int v3; // r8d
v3 = 1;
if ( a1 != a2 )
{
v3 = 0;
if ( a3 * (a2 - a1) > 0 )
LOBYTE(v3) = (a2 - a1) % a3 == 0;
}
return v3;
} | func0:
ENDBR64
MOV EAX,ESI
MOV ECX,EDX
MOV R8D,0x1
CMP EDI,ESI
JZ 0x00101169
SUB EAX,EDI
XOR R8D,R8D
MOV EDX,EAX
IMUL EDX,ECX
TEST EDX,EDX
JLE 0x00101169
CDQ
IDIV ECX
TEST EDX,EDX
SETZ R8B
LAB_00101169:
MOV EAX,R8D
RET | bool func0(int param_1,int param_2,int param_3)
{
bool bVar1;
bVar1 = true;
if (param_1 != param_2) {
bVar1 = false;
if (0 < (param_2 - param_1) * param_3) {
bVar1 = (param_2 - param_1) % param_3 == 0;
}
}
return bVar1;
} |
4,495 | func0 |
#include <stdbool.h>
#include <assert.h>
| bool func0(int a, int b, int c) {
if (a == b) {
return true;
}
if ((b - a) * c > 0 && (b - a) % c == 0) {
return true;
}
return false;
}
| int main() {
assert(func0(1, 7, 3) == true);
assert(func0(1, -3, 5) == false);
assert(func0(3, 2, 5) == false);
return 0;
}
| O3 | c | func0:
endbr64
mov %esi,%eax
mov %edx,%ecx
mov $0x1,%r8d
cmp %esi,%edi
je 1169 <func0+0x29>
sub %edi,%eax
xor %r8d,%r8d
mov %eax,%edx
imul %ecx,%edx
test %edx,%edx
jle 1169 <func0+0x29>
cltd
idiv %ecx
test %edx,%edx
sete %r8b
mov %r8d,%eax
retq
nopl (%rax)
| func0:
endbr64
mov ecx, edx
mov eax, esi
mov edx, 1
cmp edi, esi
jz short loc_1166
sub eax, edi
xor edx, edx
mov esi, eax
imul esi, ecx
test esi, esi
jle short loc_1166
cdq
idiv ecx
test edx, edx
setz dl
loc_1166:
mov eax, edx
retn | long long func0(int a1, int a2, int a3)
{
unsigned int v4; // edx
int v5; // eax
v4 = 1;
if ( a1 != a2 )
{
v5 = a2 - a1;
v4 = 0;
if ( a3 * (a2 - a1) > 0 )
{
v4 = v5 % a3;
LOBYTE(v4) = v5 % a3 == 0;
}
}
return v4;
} | func0:
ENDBR64
MOV ECX,EDX
MOV EAX,ESI
MOV EDX,0x1
CMP EDI,ESI
JZ 0x00101166
SUB EAX,EDI
XOR EDX,EDX
MOV ESI,EAX
IMUL ESI,ECX
TEST ESI,ESI
JLE 0x00101166
CDQ
IDIV ECX
TEST EDX,EDX
SETZ DL
LAB_00101166:
MOV EAX,EDX
RET | ulong func0(int param_1,int param_2,int param_3)
{
long lVar1;
ulong uVar2;
uVar2 = 1;
if (param_1 != param_2) {
uVar2 = 0;
if (0 < (param_2 - param_1) * param_3) {
lVar1 = (long)(param_2 - param_1) % (long)param_3;
uVar2 = CONCAT71((int7)((ulong)lVar1 >> 8),(int)lVar1 == 0) & 0xffffffff... |
4,496 | func0 |
#include <assert.h>
int gcd(int p, int q) {
while (q != 0) {
int temp = q;
q = p % q;
p = temp;
}
return p;
}
| int func0(int x, int y) {
return gcd(x, y) == 1;
}
| int main() {
assert(func0(17, 13) == 1);
assert(func0(15, 21) == 0);
assert(func0(25, 45) == 0);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x8,%rsp
mov %edi,-0x4(%rbp)
mov %esi,-0x8(%rbp)
mov -0x8(%rbp),%edx
mov -0x4(%rbp),%eax
mov %edx,%esi
mov %eax,%edi
callq 1149 <gcd>
cmp $0x1,%eax
sete %al
movzbl %al,%eax
leaveq
retq
| func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 8
mov [rbp+var_4], edi
mov [rbp+var_8], esi
mov edx, [rbp+var_8]
mov eax, [rbp+var_4]
mov esi, edx
mov edi, eax
call gcd
cmp eax, 1
setz al
movzx eax, al
leave
retn | _BOOL8 func0(unsigned int a1, unsigned int a2)
{
return (unsigned int)gcd(a1, a2) == 1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x8
MOV dword ptr [RBP + -0x4],EDI
MOV dword ptr [RBP + -0x8],ESI
MOV EDX,dword ptr [RBP + -0x8]
MOV EAX,dword ptr [RBP + -0x4]
MOV ESI,EDX
MOV EDI,EAX
CALL 0x00101149
CMP EAX,0x1
SETZ AL
MOVZX EAX,AL
LEAVE
RET | bool func0(int4 param_1,int4 param_2)
{
int iVar1;
iVar1 = gcd(param_1,param_2);
return iVar1 == 1;
} |
4,497 | func0 |
#include <assert.h>
int gcd(int p, int q) {
while (q != 0) {
int temp = q;
q = p % q;
p = temp;
}
return p;
}
| int func0(int x, int y) {
return gcd(x, y) == 1;
}
| int main() {
assert(func0(17, 13) == 1);
assert(func0(15, 21) == 0);
assert(func0(25, 45) == 0);
return 0;
}
| O1 | c | func0:
endbr64
mov %edi,%eax
test %esi,%esi
je 1188 <func0+0x21>
mov %esi,%ecx
cltd
idiv %esi
mov %edx,%esi
mov %ecx,%eax
test %edx,%edx
jne 1171 <func0+0xa>
cmp $0x1,%ecx
sete %al
movzbl %al,%eax
retq
mov %edi,%ecx
jmp 117e <func0+0x17>
| func0:
endbr64
mov eax, edi
test esi, esi
jz short loc_1188
loc_1171:
mov ecx, esi
cdq
idiv esi
mov esi, edx
mov eax, ecx
test edx, edx
jnz short loc_1171
loc_117E:
cmp ecx, 1
setz al
movzx eax, al
retn
loc_1188:
mov ecx, edi
jmp short loc_117E | _BOOL8 func0(int a1, int a2)
{
int v2; // eax
int v3; // ecx
v2 = a1;
if ( a2 )
{
do
{
v3 = a2;
a2 = v2 % a2;
v2 = v3;
}
while ( a2 );
}
else
{
v3 = a1;
}
return v3 == 1;
} | func0:
ENDBR64
MOV EAX,EDI
TEST ESI,ESI
JZ 0x00101188
LAB_00101171:
MOV ECX,ESI
CDQ
IDIV ESI
MOV ESI,EDX
MOV EAX,ECX
TEST EDX,EDX
JNZ 0x00101171
LAB_0010117e:
CMP ECX,0x1
SETZ AL
MOVZX EAX,AL
RET
LAB_00101188:
MOV ECX,EDI
JMP 0x0010117e | bool func0(int param_1,int param_2)
{
int iVar1;
iVar1 = param_1;
if (param_2 != 0) {
do {
param_1 = param_2;
param_2 = iVar1 % param_1;
iVar1 = param_1;
} while (param_2 != 0);
}
return param_1 == 1;
} |
4,498 | func0 |
#include <assert.h>
int gcd(int p, int q) {
while (q != 0) {
int temp = q;
q = p % q;
p = temp;
}
return p;
}
| int func0(int x, int y) {
return gcd(x, y) == 1;
}
| int main() {
assert(func0(17, 13) == 1);
assert(func0(15, 21) == 0);
assert(func0(25, 45) == 0);
return 0;
}
| O2 | c | func0:
endbr64
mov %edi,%eax
mov %esi,%edx
test %esi,%esi
je 1278 <func0+0x28>
nopl 0x0(%rax)
mov %edx,%ecx
cltd
idiv %ecx
mov %ecx,%eax
test %edx,%edx
jne 1260 <func0+0x10>
xor %eax,%eax
cmp $0x1,%ecx
sete %al
retq
nopl 0x0(%rax)
mov %edi,%ecx
xor %eax,%eax
cmp $0x1,%ecx
s... | func0:
endbr64
mov eax, edi
mov edx, esi
test esi, esi
jz short loc_1278
nop dword ptr [rax+00h]
loc_1260:
mov ecx, edx
cdq
idiv ecx
mov eax, ecx
test edx, edx
jnz short loc_1260
xor eax, eax
cmp ecx, 1
setz al
retn
loc_1278:
mov ecx, edi
xor eax, eax
cmp ecx... | _BOOL8 func0(int a1, int a2)
{
int v2; // eax
int v3; // edx
int v4; // ecx
v2 = a1;
v3 = a2;
if ( !a2 )
return a1 == 1;
do
{
v4 = v3;
v3 = v2 % v3;
v2 = v4;
}
while ( v3 );
return v4 == 1;
} | func0:
ENDBR64
MOV EAX,EDI
MOV EDX,ESI
TEST ESI,ESI
JZ 0x00101278
NOP dword ptr [RAX]
LAB_00101260:
MOV ECX,EDX
CDQ
IDIV ECX
MOV EAX,ECX
TEST EDX,EDX
JNZ 0x00101260
XOR EAX,EAX
CMP ECX,0x1
SETZ AL
RET
LAB_00101278:
MOV ECX,EDI
XOR EAX,EAX
CMP ECX,0x1
SETZ AL
RET | bool func0(int param_1,int param_2)
{
int iVar1;
if (param_2 != 0) {
do {
iVar1 = param_2;
param_2 = param_1 % iVar1;
param_1 = iVar1;
} while (param_2 != 0);
return iVar1 == 1;
}
return param_1 == 1;
} |
4,499 | func0 |
#include <assert.h>
int gcd(int p, int q) {
while (q != 0) {
int temp = q;
q = p % q;
p = temp;
}
return p;
}
| int func0(int x, int y) {
return gcd(x, y) == 1;
}
| int main() {
assert(func0(17, 13) == 1);
assert(func0(15, 21) == 0);
assert(func0(25, 45) == 0);
return 0;
}
| O3 | c | func0:
endbr64
mov %edi,%eax
mov %esi,%edx
test %esi,%esi
je 1278 <func0+0x28>
nopl 0x0(%rax)
mov %edx,%ecx
cltd
idiv %ecx
mov %ecx,%eax
test %edx,%edx
jne 1260 <func0+0x10>
xor %eax,%eax
cmp $0x1,%ecx
sete %al
retq
nopl 0x0(%rax)
mov %edi,%ecx
xor %eax,%eax
cmp $0x1,%ecx
s... | func0:
endbr64
mov eax, edi
mov edx, esi
test esi, esi
jz short loc_1278
nop dword ptr [rax+00h]
loc_1260:
mov ecx, edx
cdq
idiv ecx
mov eax, ecx
test edx, edx
jnz short loc_1260
xor eax, eax
cmp ecx, 1
setz al
retn
loc_1278:
mov ecx, edi
xor eax, eax
cmp ecx... | _BOOL8 func0(int a1, int a2)
{
int v2; // eax
int v3; // edx
int v4; // ecx
v2 = a1;
v3 = a2;
if ( !a2 )
return a1 == 1;
do
{
v4 = v3;
v3 = v2 % v3;
v2 = v4;
}
while ( v3 );
return v4 == 1;
} | func0:
ENDBR64
MOV EAX,EDI
MOV EDX,ESI
TEST ESI,ESI
JZ 0x00101278
NOP dword ptr [RAX]
LAB_00101260:
MOV ECX,EDX
CDQ
IDIV ECX
MOV EAX,ECX
TEST EDX,EDX
JNZ 0x00101260
XOR EAX,EAX
CMP ECX,0x1
SETZ AL
RET
LAB_00101278:
MOV ECX,EDI
XOR EAX,EAX
CMP ECX,0x1
SETZ AL
RET | bool func0(int param_1,int param_2)
{
int iVar1;
if (param_2 != 0) {
do {
iVar1 = param_2;
param_2 = param_1 % iVar1;
param_1 = iVar1;
} while (param_2 != 0);
return iVar1 == 1;
}
return param_1 == 1;
} |
4,500 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
void merge(int a[], int a_len, int b[], int b_len, int c[]) {
int i = 0, j = 0, k = 0;
while (i < a_len && j < b_len) {
if (a[i] < b[j]) {
c[k++] = a[i++];
} else {
c[k++] = b[j++];
}
}
... | void func0(int arr[], int len) {
if (len < 2) {
return;
}
int mid = len / 2;
int *left = (int *)malloc(mid * sizeof(int));
int *right = (int *)malloc((len - mid) * sizeof(int));
for (int i = 0; i < mid; i++) {
left[i] = arr[i];
}
for (int i = mid; i < le... | int main() {
int arr1[] = {3, 4, 2, 6, 5, 7, 1, 9};
func0(arr1, 8);
int sorted1[] = {1, 2, 3, 4, 5, 6, 7, 9};
for (int i = 0; i < 8; i++) {
assert(arr1[i] == sorted1[i]);
}
int arr2[] = {7, 25, 45, 78, 11, 33, 19};
func0(arr2, 7);
int sorted2[] = {7, 11, 19, 25, 33, 45... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x30,%rsp
mov %rdi,-0x28(%rbp)
mov %esi,-0x2c(%rbp)
cmpl $0x1,-0x2c(%rbp)
jle 1461 <func0+0x142>
mov -0x2c(%rbp),%eax
mov %eax,%edx
shr $0x1f,%edx
add %edx,%eax
sar %eax
mov %eax,-0x14(%rbp)
mov -0x14(%rbp),%eax
cltq
shl $0x2,%rax
mo... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_28], rdi
mov [rbp+var_2C], esi
cmp [rbp+var_2C], 1
jle loc_1461
mov eax, [rbp+var_2C]
mov edx, eax
shr edx, 1Fh
add eax, edx
sar eax, 1
mov [rbp+var_14], eax
mov eax, [rbp+var_14]
cdqe
shl rax, 2
mo... | void func0(long long a1, int a2)
{
signed int i; // [rsp+14h] [rbp-1Ch]
int j; // [rsp+18h] [rbp-18h]
unsigned int v4; // [rsp+1Ch] [rbp-14h]
_DWORD *ptr; // [rsp+20h] [rbp-10h]
_DWORD *v6; // [rsp+28h] [rbp-8h]
if ( a2 > 1 )
{
v4 = a2 / 2;
ptr = malloc(4LL * (a2 / 2));
v6 = malloc(4LL * (a2... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x28],RDI
MOV dword ptr [RBP + -0x2c],ESI
CMP dword ptr [RBP + -0x2c],0x1
JLE 0x00101461
MOV EAX,dword ptr [RBP + -0x2c]
MOV EDX,EAX
SHR EDX,0x1f
ADD EAX,EDX
SAR EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
MOV EAX,dword ptr [RBP + -0x14]
CDQE
SHL RAX,0x... | void func0(long param_1,int param_2)
{
int iVar1;
void *__ptr;
void *__ptr_00;
int4 local_24;
int4 local_20;
if (1 < param_2) {
iVar1 = param_2 / 2;
__ptr = malloc((long)iVar1 << 2);
__ptr_00 = malloc((long)(param_2 - iVar1) << 2);
for (local_24 = 0; local_20 = iVar1, local_24 < iVar1; l... |
4,501 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
void merge(int a[], int a_len, int b[], int b_len, int c[]) {
int i = 0, j = 0, k = 0;
while (i < a_len && j < b_len) {
if (a[i] < b[j]) {
c[k++] = a[i++];
} else {
c[k++] = b[j++];
}
}
... | void func0(int arr[], int len) {
if (len < 2) {
return;
}
int mid = len / 2;
int *left = (int *)malloc(mid * sizeof(int));
int *right = (int *)malloc((len - mid) * sizeof(int));
for (int i = 0; i < mid; i++) {
left[i] = arr[i];
}
for (int i = mid; i < le... | int main() {
int arr1[] = {3, 4, 2, 6, 5, 7, 1, 9};
func0(arr1, 8);
int sorted1[] = {1, 2, 3, 4, 5, 6, 7, 9};
for (int i = 0; i < 8; i++) {
assert(arr1[i] == sorted1[i]);
}
int arr2[] = {7, 25, 45, 78, 11, 33, 19};
func0(arr2, 7);
int sorted2[] = {7, 11, 19, 25, 33, 45... | O1 | c | func0:
endbr64
cmp $0x1,%esi
jle 1340 <func0+0xe2>
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %rdi,%rbp
mov %esi,%r12d
mov %esi,%r14d
shr $0x1f,%r14d
add %esi,%r14d
sar %r14d
movslq %r14d,%rbx
lea 0x0(,%rbx,4),%rdi
callq 10b0 <malloc@plt>
mo... | func0:
endbr64
cmp esi, 1
jle locret_134C
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 18h
mov rbp, rdi
mov r12d, esi
mov r14d, esi
shr r14d, 1Fh
add r14d, esi
sar r14d, 1
movsxd rbx, r14d
lea rdi, ds:0[rbx*4]
call _malloc
mov r13, rax
... | void func0(long long a1, int a2)
{
unsigned int v2; // r14d
long long v3; // rbx
long long v4; // r13
long long v5; // r15
long long v6; // rax
long long v7; // rdx
long long v8; // rdx
long long v9; // rcx
unsigned int v10; // [rsp+0h] [rbp-3Ch]
if ( a2 > 1 )
{
v2 = a2 / 2;
v3 = a2 / 2;... | func0:
ENDBR64
CMP ESI,0x1
JLE 0x0010134c
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV RBP,RDI
MOV R12D,ESI
MOV R14D,ESI
SHR R14D,0x1f
ADD R14D,ESI
SAR R14D,0x1
MOVSXD RBX,R14D
LEA RDI,[RBX*0x4]
CALL 0x001010b0
MOV R13,RAX
MOV EAX,R12D
SUB EAX,R14D
MOV dword ptr [RSP + 0xc],EAX
MOVSXD RDI,EAX
... | void func0(long param_1,int param_2)
{
long lVar1;
int iVar2;
void *__ptr;
void *__ptr_00;
ulong uVar3;
long lVar4;
uint uVar5;
if (1 < param_2) {
uVar5 = param_2 / 2;
lVar4 = (long)(int)uVar5;
__ptr = malloc(lVar4 * 4);
iVar2 = param_2 - uVar5;
__ptr_00 = malloc((long)iVar2 << 2... |
4,502 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
void merge(int a[], int a_len, int b[], int b_len, int c[]) {
int i = 0, j = 0, k = 0;
while (i < a_len && j < b_len) {
if (a[i] < b[j]) {
c[k++] = a[i++];
} else {
c[k++] = b[j++];
}
}
... | void func0(int arr[], int len) {
if (len < 2) {
return;
}
int mid = len / 2;
int *left = (int *)malloc(mid * sizeof(int));
int *right = (int *)malloc((len - mid) * sizeof(int));
for (int i = 0; i < mid; i++) {
left[i] = arr[i];
}
for (int i = mid; i < le... | int main() {
int arr1[] = {3, 4, 2, 6, 5, 7, 1, 9};
func0(arr1, 8);
int sorted1[] = {1, 2, 3, 4, 5, 6, 7, 9};
for (int i = 0; i < 8; i++) {
assert(arr1[i] == sorted1[i]);
}
int arr2[] = {7, 25, 45, 78, 11, 33, 19};
func0(arr2, 7);
int sorted2[] = {7, 11, 19, 25, 33, 45... | O2 | c | func0:
endbr64
cmp $0x1,%esi
jle 1510 <func0+0x10>
jmp 1520 <func0.part.0>
nopl 0x0(%rax,%rax,1)
retq
data16 nopw %cs:0x0(%rax,%rax,1)
nopl 0x0(%rax)
| func0_part_0:
push r15
push r14
mov r14, rdi
push r13
push r12
push rbp
mov ebp, esi
push rbx
sar ebp, 1
mov ebx, esi
movsxd rdx, ebp
mov r15d, ebx
shl rdx, 2
sub r15d, ebp
sub rsp, 18h
mov rdi, rdx
mov [rsp+48h+var_40], rdx
call _malloc
movsxd rdi, r15d
sh... | long long func0_part_0(long long a1, int a2)
{
unsigned int v2; // ebp
int v3; // r15d
long long v4; // r12
long long v5; // r13
long long v7; // [rsp+8h] [rbp-40h]
v2 = a2 >> 1;
v3 = a2 - (a2 >> 1);
v7 = 4LL * (a2 >> 1);
v4 = malloc(v7);
v5 = malloc(4LL * v3);
memcpy(v4, a1, v7);
if ( a2 > a2... | func0.part.0:
PUSH R15
PUSH R14
MOV R14,RDI
PUSH R13
PUSH R12
PUSH RBP
MOV EBP,ESI
PUSH RBX
SAR EBP,0x1
MOV EBX,ESI
MOVSXD RDX,EBP
MOV R15D,EBX
SHL RDX,0x2
SUB R15D,EBP
SUB RSP,0x18
MOV RDI,RDX
MOV qword ptr [RSP + 0x8],RDX
CALL 0x001010d0
MOVSXD RDI,R15D
SHL RDI,0x2
MOV R12,RAX
CALL 0x001010d0
MOV RDX,qword ptr [RSP +... | void func0_part_0(void *param_1,int param_2)
{
void *__dest;
void *__dest_00;
size_t __size;
int iVar1;
int iVar2;
iVar1 = param_2 >> 1;
__size = (long)iVar1 * 4;
iVar2 = param_2 - iVar1;
__dest = malloc(__size);
__dest_00 = malloc((long)iVar2 << 2);
memcpy(__dest,param_1,__size);
if (iVar1 ... |
4,503 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
void merge(int a[], int a_len, int b[], int b_len, int c[]) {
int i = 0, j = 0, k = 0;
while (i < a_len && j < b_len) {
if (a[i] < b[j]) {
c[k++] = a[i++];
} else {
c[k++] = b[j++];
}
}
... | void func0(int arr[], int len) {
if (len < 2) {
return;
}
int mid = len / 2;
int *left = (int *)malloc(mid * sizeof(int));
int *right = (int *)malloc((len - mid) * sizeof(int));
for (int i = 0; i < mid; i++) {
left[i] = arr[i];
}
for (int i = mid; i < le... | int main() {
int arr1[] = {3, 4, 2, 6, 5, 7, 1, 9};
func0(arr1, 8);
int sorted1[] = {1, 2, 3, 4, 5, 6, 7, 9};
for (int i = 0; i < 8; i++) {
assert(arr1[i] == sorted1[i]);
}
int arr2[] = {7, 25, 45, 78, 11, 33, 19};
func0(arr2, 7);
int sorted2[] = {7, 11, 19, 25, 33, 45... | O3 | c | func0:
endbr64
cmp $0x1,%esi
jle 17d0 <func0+0x10>
jmpq 16f0 <func0.part.0>
xchg %ax,%ax
retq
nopw %cs:0x0(%rax,%rax,1)
nopl 0x0(%rax,%rax,1)
| func0_part_0:
push r15
push r14
mov r14, rdi
push r13
push r12
push rbp
mov ebp, esi
push rbx
sar ebp, 1
mov ebx, esi
movsxd rcx, ebp
mov r15d, ebx
shl rcx, 2
sub r15d, ebp
sub rsp, 18h
mov rdi, rcx; size
mov [rsp+48h+var_40], rcx
call _malloc
movsxd rdi, r... | void func0_part_0(char *a1, int a2)
{
unsigned int v2; // ebp
int v3; // r15d
void *v4; // r12
void *v5; // r13
long long v6; // rdx
long long v7; // rcx
v2 = a2 >> 1;
v3 = a2 - (a2 >> 1);
v4 = malloc(4LL * (a2 >> 1));
v5 = malloc(4LL * v3);
memcpy(v4, a1, 4LL * (unsigned int)(a2 >> 1));
v7 = ... | func0.part.0:
PUSH R15
PUSH R14
MOV R14,RDI
PUSH R13
PUSH R12
PUSH RBP
MOV EBP,ESI
PUSH RBX
SAR EBP,0x1
MOV EBX,ESI
MOVSXD RCX,EBP
MOV R15D,EBX
SHL RCX,0x2
SUB R15D,EBP
SUB RSP,0x18
MOV RDI,RCX
MOV qword ptr [RSP + 0x8],RCX
CALL 0x001010d0
MOVSXD RDI,R15D
SHL RDI,0x2
MOV R12,RAX
CALL 0x001010d0
MOV EDX,EBP
MOV RSI,R14
... | void func0_part_0(void *param_1,int param_2)
{
void *__dest;
void *__dest_00;
uint uVar1;
int iVar2;
uVar1 = param_2 >> 1;
iVar2 = param_2 - uVar1;
__dest = malloc((long)(int)uVar1 * 4);
__dest_00 = malloc((long)iVar2 << 2);
memcpy(__dest,param_1,(ulong)uVar1 << 2);
if ((int)uVar1 < param_2) {
... |
4,504 | func0 |
#include <assert.h>
| double* func0(double a, double b, double c) {
static double vertex[2];
vertex[0] = -b / (2 * a);
vertex[1] = ((4 * a * c) - (b * b)) / (4 * a);
return vertex;
}
| int main() {
double *result;
result = func0(5, 3, 2);
assert(result[0] == -0.3 && result[1] == 1.55);
result = func0(9, 8, 4);
assert(result[0] == -0.4444444444444444 && result[1] == 2.2222222222222223);
result = func0(2, 4, 6);
assert(result[0] == -1.0 && result[1] == 4.0);
... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
movsd %xmm0,-0x8(%rbp)
movsd %xmm1,-0x10(%rbp)
movsd %xmm2,-0x18(%rbp)
movsd -0x10(%rbp),%xmm0
movq 0xf83(%rip),%xmm1
xorpd %xmm0,%xmm1
movsd -0x8(%rbp),%xmm0
addsd %xmm0,%xmm0
divsd %xmm0,%xmm1
movapd %xmm1,%xmm0
movsd %xmm0,0x2e96(%rip)
movsd -0x8(%rbp),%xmm1
mo... | func0:
endbr64
push rbp
mov rbp, rsp
movsd [rbp+var_8], xmm0
movsd [rbp+var_10], xmm1
movsd [rbp+var_18], xmm2
movsd xmm0, [rbp+var_10]
movq xmm1, cs:qword_20D0
xorpd xmm1, xmm0
movsd xmm0, [rbp+var_8]
movapd xmm2, xmm0
addsd xmm2, xmm0
divsd xmm1, xmm2
movapd xmm0, xmm1
movsd cs:vertex_1,... | long long * func0(double a1, double a2, double a3)
{
*(double *)&vertex_1 = -a2 / (a1 + a1);
*(double *)&qword_4028 = (4.0 * a1 * a3 - a2 * a2) / (4.0 * a1);
return &vertex_1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOVSD qword ptr [RBP + -0x8],XMM0
MOVSD qword ptr [RBP + -0x10],XMM1
MOVSD qword ptr [RBP + -0x18],XMM2
MOVSD XMM0,qword ptr [RBP + -0x10]
MOVQ XMM1,qword ptr [0x001020d0]
XORPD XMM1,XMM0
MOVSD XMM0,qword ptr [RBP + -0x8]
MOVAPD XMM2,XMM0
ADDSD XMM2,XMM0
DIVSD XMM1,XMM2
MOVAPD XMM0,X... | int1 * func0(double param_1,double param_2,double param_3)
{
vertex_1._0_8_ = (double)(DAT_001020d0 ^ (ulong)param_2) / (param_1 + param_1);
vertex_1._8_8_ = (DAT_001020e0 * param_1 * param_3 - param_2 * param_2) / (DAT_001020e0 * param_1)
;
return vertex_1;
} |
4,505 | func0 |
#include <assert.h>
| double* func0(double a, double b, double c) {
static double vertex[2];
vertex[0] = -b / (2 * a);
vertex[1] = ((4 * a * c) - (b * b)) / (4 * a);
return vertex;
}
| int main() {
double *result;
result = func0(5, 3, 2);
assert(result[0] == -0.3 && result[1] == 1.55);
result = func0(9, 8, 4);
assert(result[0] == -0.4444444444444444 && result[1] == 2.2222222222222223);
result = func0(2, 4, 6);
assert(result[0] == -1.0 && result[1] == 4.0);
... | O1 | c | func0:
endbr64
movapd %xmm1,%xmm3
xorpd 0xed7(%rip),%xmm3
movapd %xmm0,%xmm4
addsd %xmm0,%xmm4
divsd %xmm4,%xmm3
movsd %xmm3,0x2ed3(%rip)
mulsd 0xecb(%rip),%xmm0
mulsd %xmm0,%xmm2
mulsd %xmm1,%xmm1
subsd %xmm1,%xmm2
divsd %xmm0,%xmm2
movsd %xmm2,0x2ebb(%rip)
lea 0x2eac(%rip),%rax
retq
| func0:
endbr64
movapd xmm3, xmm1
xorpd xmm3, cs:xmmword_2010
movapd xmm4, xmm0
addsd xmm4, xmm0
divsd xmm3, xmm4
movsd cs:vertex_1, xmm3
mulsd xmm0, cs:qword_2020
mulsd xmm2, xmm0
mulsd xmm1, xmm1
subsd xmm2, xmm1
divsd xmm2, xmm0
movsd cs:qword_4028, xmm2
lea rax, vertex_1
retn | long long * func0(double a1, double a2, double a3)
{
*(double *)&vertex_1 = -a2 / (a1 + a1);
*(double *)&qword_4028 = (a3 * (a1 * 4.0) - a2 * a2) / (a1 * 4.0);
return &vertex_1;
} | func0:
ENDBR64
MOVAPD XMM3,XMM1
XORPD XMM3,xmmword ptr [0x00102010]
MOVAPD XMM4,XMM0
ADDSD XMM4,XMM0
DIVSD XMM3,XMM4
MOVSD qword ptr [0x00104020],XMM3
MULSD XMM0,qword ptr [0x00102020]
MULSD XMM2,XMM0
MULSD XMM1,XMM1
SUBSD XMM2,XMM1
DIVSD XMM2,XMM0
MOVSD qword ptr [0x00104028],XMM2
LEA RAX,[0x104020]
RET | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int1 * func0(double param_1,double param_2,double param_3)
{
vertex_1._0_8_ = (double)((ulong)param_2 ^ _DAT_00102010) / (param_1 + param_1);
vertex_1._8_8_ = (param_3 * param_1 * DAT_00102020 - param_2 * param_2) / (param_1 * DA... |
4,506 | func0 |
#include <assert.h>
| double* func0(double a, double b, double c) {
static double vertex[2];
vertex[0] = -b / (2 * a);
vertex[1] = ((4 * a * c) - (b * b)) / (4 * a);
return vertex;
}
| int main() {
double *result;
result = func0(5, 3, 2);
assert(result[0] == -0.3 && result[1] == 1.55);
result = func0(9, 8, 4);
assert(result[0] == -0.4444444444444444 && result[1] == 2.2222222222222223);
result = func0(2, 4, 6);
assert(result[0] == -1.0 && result[1] == 4.0);
... | O2 | c | func0:
endbr64
movapd %xmm0,%xmm4
movapd %xmm1,%xmm3
xorpd 0xe9c(%rip),%xmm3
addsd %xmm0,%xmm4
mulsd %xmm1,%xmm1
lea 0x2e9d(%rip),%rax
mulsd 0xe95(%rip),%xmm0
divsd %xmm4,%xmm3
mulsd %xmm0,%xmm2
subsd %xmm1,%xmm2
divsd %xmm0,%xmm2
movsd %xmm3,0x2e7d(%rip)
movsd %xmm2,0x2e7d(%rip)
retq
nopl 0x0(%rax)
| func0:
endbr64
movapd xmm4, xmm0
movapd xmm3, xmm1
xorpd xmm3, cs:xmmword_2010
addsd xmm4, xmm0
mulsd xmm1, xmm1
lea rax, vertex_1
mulsd xmm0, cs:qword_2020
divsd xmm3, xmm4
mulsd xmm2, xmm0
subsd xmm2, xmm1
divsd xmm2, xmm0
movsd cs:vertex_1, xmm3
movsd cs:qword_4028, xmm2
retn | long long * func0(double a1, double a2, double a3)
{
long long *result; // rax
result = &vertex_1;
*(double *)&vertex_1 = -a2 / (a1 + a1);
*(double *)&qword_4028 = (a3 * (a1 * 4.0) - a2 * a2) / (a1 * 4.0);
return result;
} | func0:
ENDBR64
MOVAPD XMM4,XMM0
MOVAPD XMM3,XMM1
XORPD XMM3,xmmword ptr [0x00102010]
ADDSD XMM4,XMM0
MULSD XMM1,XMM1
LEA RAX,[0x104020]
MULSD XMM0,qword ptr [0x00102020]
DIVSD XMM3,XMM4
MULSD XMM2,XMM0
SUBSD XMM2,XMM1
DIVSD XMM2,XMM0
MOVSD qword ptr [0x00104020],XMM3
MOVSD qword ptr [0x00104028],XMM2
RET | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int1 * func0(double param_1,double param_2,double param_3)
{
vertex_1._0_8_ = (double)((ulong)param_2 ^ _DAT_00102010) / (param_1 + param_1);
vertex_1._8_8_ = (param_3 * param_1 * DAT_00102020 - param_2 * param_2) / (param_1 * DA... |
4,507 | func0 |
#include <assert.h>
| double* func0(double a, double b, double c) {
static double vertex[2];
vertex[0] = -b / (2 * a);
vertex[1] = ((4 * a * c) - (b * b)) / (4 * a);
return vertex;
}
| int main() {
double *result;
result = func0(5, 3, 2);
assert(result[0] == -0.3 && result[1] == 1.55);
result = func0(9, 8, 4);
assert(result[0] == -0.4444444444444444 && result[1] == 2.2222222222222223);
result = func0(2, 4, 6);
assert(result[0] == -1.0 && result[1] == 4.0);
... | O3 | c | func0:
endbr64
movapd %xmm0,%xmm4
movapd %xmm1,%xmm3
xorpd 0xeac(%rip),%xmm3
addsd %xmm0,%xmm4
mulsd %xmm1,%xmm1
lea 0x2ead(%rip),%rax
mulsd 0xeb5(%rip),%xmm0
divsd %xmm4,%xmm3
mulsd %xmm0,%xmm2
subsd %xmm1,%xmm2
divsd %xmm0,%xmm2
movsd %xmm3,0x2e8d(%rip)
movsd %xmm2,0x2e8d(%rip)
retq
nopl 0x0(%rax)
| func0:
endbr64
unpcklpd xmm0, xmm0
movapd xmm3, xmm1
xorpd xmm3, cs:xmmword_2020
mulpd xmm0, cs:xmmword_2010
lea rax, vertex_1
mulsd xmm1, xmm1
movapd xmm5, xmm0
unpckhpd xmm5, xmm5
movapd xmm4, xmm5
mulsd xmm4, xmm2
subsd xmm4, xmm1
movapd xmm1, xmm3
unpcklpd xmm1, xmm4
divpd xmm1, xmm0
movaps cs:... | __int128 * func0(__m128d a1, __m128d a2, double a3)
{
__m128d v3; // xmm0
__int128 *result; // rax
__m128d v5; // xmm5
__m128d v6; // xmm4
v3 = _mm_mul_pd(_mm_unpacklo_pd(a1, a1), (__m128d)xmmword_2010);
result = &vertex_1;
v5 = _mm_unpackhi_pd(v3, v3);
v6.m128d_f64[1] = v5.m128d_f64[1];
v6.m128d_f64... | func0:
ENDBR64
UNPCKLPD XMM0,XMM0
MOVAPD XMM3,XMM1
XORPD XMM3,xmmword ptr [0x00102020]
MULPD XMM0,xmmword ptr [0x00102010]
LEA RAX,[0x104020]
MULSD XMM1,XMM1
MOVAPD XMM5,XMM0
UNPCKHPD XMM5,XMM5
MOVAPD XMM4,XMM5
MULSD XMM4,XMM2
SUBSD XMM4,XMM1
MOVAPD XMM1,XMM3
UNPCKLPD XMM1,XMM4
DIVPD XMM1,XMM0
MOVAPS xmmword ptr [0x001... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int1 * func0(double param_1,double param_2,double param_3)
{
int auVar1 [16];
int auVar2 [16];
auVar2._8_8_ = param_1 * _UNK_00102018 * param_3 - param_2 * param_2;
auVar2._0_8_ = (ulong)param_2 ^ _DAT_00102020;
auVar1._... |
4,508 | func0 |
#include <stdio.h>
#include <assert.h>
| int* func0(int nums[][4], int rows, int N, int* result) {
for (int i = 0; i < rows; i++) {
result[i] = nums[i][N];
}
return result;
}
| int main() {
int nums[3][4] = {{1, 2, 3, 2}, {4, 5, 6, 2}, {7, 1, 9, 5}};
int result[3];
func0(nums, 3, 0, result);
assert(result[0] == 1 && result[1] == 4 && result[2] == 7);
func0(nums, 3, 2, result);
assert(result[0] == 3 && result[1] == 6 && result[2] == 9);
func0(nums, 3, 3... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
mov %edx,-0x20(%rbp)
mov %rcx,-0x28(%rbp)
movl $0x0,-0x4(%rbp)
jmp 11de <func0+0x55>
mov -0x4(%rbp),%eax
cltq
shl $0x4,%rax
mov %rax,%rdx
mov -0x18(%rbp),%rax
lea (%rdx,%rax,1),%rcx
mov -0x4(%rbp),%e... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_20], edx
mov [rbp+var_28], rcx
mov [rbp+var_4], 0
jmp short loc_11DE
loc_11A8:
mov eax, [rbp+var_4]
cdqe
shl rax, 4
mov rdx, rax
mov rax, [rbp+var_18]
lea rcx, [rdx+rax]
mov ... | long long func0(long long a1, int a2, int a3, long long a4)
{
int i; // [rsp+24h] [rbp-4h]
for ( i = 0; i < a2; ++i )
*(_DWORD *)(a4 + 4LL * i) = *(_DWORD *)(16LL * i + a1 + 4LL * a3);
return a4;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0x20],EDX
MOV qword ptr [RBP + -0x28],RCX
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001011de
LAB_001011a8:
MOV EAX,dword ptr [RBP + -0x4]
CDQE
SHL RAX,0x4
MOV RDX,RAX
MOV RAX,qword ptr [RBP + -0x18]
LEA ... | long func0(long param_1,int param_2,int param_3,long param_4)
{
int4 local_c;
for (local_c = 0; local_c < param_2; local_c = local_c + 1) {
*(int4 *)((long)local_c * 4 + param_4) =
*(int4 *)((long)local_c * 0x10 + param_1 + (long)param_3 * 4);
}
return param_4;
} |
4,509 | func0 |
#include <stdio.h>
#include <assert.h>
| int* func0(int nums[][4], int rows, int N, int* result) {
for (int i = 0; i < rows; i++) {
result[i] = nums[i][N];
}
return result;
}
| int main() {
int nums[3][4] = {{1, 2, 3, 2}, {4, 5, 6, 2}, {7, 1, 9, 5}};
int result[3];
func0(nums, 3, 0, result);
assert(result[0] == 1 && result[1] == 4 && result[2] == 7);
func0(nums, 3, 2, result);
assert(result[0] == 3 && result[1] == 6 && result[2] == 9);
func0(nums, 3, 3... | O1 | c | func0:
endbr64
mov %rcx,%rax
test %esi,%esi
jle 11b7 <func0+0x2e>
movslq %edx,%rdx
lea (%rdi,%rdx,4),%rdi
mov %rcx,%rdx
lea -0x1(%rsi),%ecx
lea 0x4(%rax,%rcx,4),%r8
mov (%rdi),%esi
mov %esi,(%rdx)
add $0x10,%rdi
add $0x4,%rdx
cmp %r8,%rdx
jne 11a6 <func0+0x1d>
retq
| func0:
endbr64
mov rax, rcx
test esi, esi
jle short locret_11B7
movsxd rdx, edx
lea rdi, [rdi+rdx*4]
mov rdx, rcx
lea ecx, [rsi-1]
lea r8, [rax+rcx*4+4]
loc_11A6:
mov esi, [rdi]
mov [rdx], esi
add rdi, 10h
add rdx, 4
cmp rdx, r8
jnz short loc_11A6
locret_11B7:
retn | _DWORD * func0(long long a1, int a2, int a3, _DWORD *a4)
{
_DWORD *result; // rax
_DWORD *v5; // rdi
_DWORD *v6; // rdx
result = a4;
if ( a2 > 0 )
{
v5 = (_DWORD *)(a1 + 4LL * a3);
v6 = a4;
do
{
*v6 = *v5;
v5 += 4;
++v6;
}
while ( v6 != &a4[a2 - 1 + 1] );
}
ret... | func0:
ENDBR64
MOV RAX,RCX
TEST ESI,ESI
JLE 0x001011b7
MOVSXD RDX,EDX
LEA RDI,[RDI + RDX*0x4]
MOV RDX,RCX
LEA ECX,[RSI + -0x1]
LEA R8,[RAX + RCX*0x4 + 0x4]
LAB_001011a6:
MOV ESI,dword ptr [RDI]
MOV dword ptr [RDX],ESI
ADD RDI,0x10
ADD RDX,0x4
CMP RDX,R8
JNZ 0x001011a6
LAB_001011b7:
RET | void func0(long param_1,int param_2,int param_3,int4 *param_4)
{
int4 *puVar1;
int4 *puVar2;
if (0 < param_2) {
puVar2 = (int4 *)(param_1 + (long)param_3 * 4);
puVar1 = param_4 + (ulong)(param_2 - 1) + 1;
do {
*param_4 = *puVar2;
puVar2 = puVar2 + 4;
param_4 = param_4 + 1;
} ... |
4,510 | func0 |
#include <stdio.h>
#include <assert.h>
| int* func0(int nums[][4], int rows, int N, int* result) {
for (int i = 0; i < rows; i++) {
result[i] = nums[i][N];
}
return result;
}
| int main() {
int nums[3][4] = {{1, 2, 3, 2}, {4, 5, 6, 2}, {7, 1, 9, 5}};
int result[3];
func0(nums, 3, 0, result);
assert(result[0] == 1 && result[1] == 4 && result[2] == 7);
func0(nums, 3, 2, result);
assert(result[0] == 3 && result[1] == 6 && result[2] == 9);
func0(nums, 3, 3... | O2 | c | func0:
endbr64
mov %rcx,%rax
test %esi,%esi
jle 11a2 <func0+0x32>
movslq %edx,%rdx
lea (%rdi,%rdx,4),%rdi
mov %rcx,%rdx
lea -0x1(%rsi),%ecx
lea 0x4(%rax,%rcx,4),%r8
nopl (%rax)
mov (%rdi),%esi
add $0x4,%rdx
add $0x10,%rdi
mov %esi,-0x4(%rdx)
cmp %r8,%rdx
jne 1190 <func0+0x20>
ret... | func0:
endbr64
mov rax, rcx
test esi, esi
jle short locret_11A2
movsxd rdx, edx
lea rdi, [rdi+rdx*4]
mov rdx, rcx
lea ecx, [rsi-1]
lea r8, [rax+rcx*4+4]
nop dword ptr [rax]
loc_1190:
mov esi, [rdi]
add rdx, 4
add rdi, 10h
mov [rdx-4], esi
cmp rdx, r8
jnz short loc... | long long func0(long long a1, int a2, int a3, long long a4)
{
long long result; // rax
int *v5; // rdi
long long v6; // rdx
long long v7; // r8
int v8; // esi
result = a4;
if ( a2 > 0 )
{
v5 = (int *)(a1 + 4LL * a3);
v6 = a4;
v7 = a4 + 4LL * (unsigned int)(a2 - 1) + 4;
do
{
v... | func0:
ENDBR64
MOV RAX,RCX
TEST ESI,ESI
JLE 0x001011a2
MOVSXD RDX,EDX
LEA RDI,[RDI + RDX*0x4]
MOV RDX,RCX
LEA ECX,[RSI + -0x1]
LEA R8,[RAX + RCX*0x4 + 0x4]
NOP dword ptr [RAX]
LAB_00101190:
MOV ESI,dword ptr [RDI]
ADD RDX,0x4
ADD RDI,0x10
MOV dword ptr [RDX + -0x4],ESI
CMP RDX,R8
JNZ 0x00101190
LAB_001011a2:
RET | void func0(long param_1,int param_2,int param_3,int4 *param_4)
{
int4 uVar1;
int4 *puVar2;
int4 *puVar3;
int4 *puVar4;
if (0 < param_2) {
puVar4 = (int4 *)(param_1 + (long)param_3 * 4);
puVar2 = param_4;
do {
uVar1 = *puVar4;
puVar3 = puVar2 + 1;
puVar4 = puVar4 + 4;
*p... |
4,511 | func0 |
#include <stdio.h>
#include <assert.h>
| int* func0(int nums[][4], int rows, int N, int* result) {
for (int i = 0; i < rows; i++) {
result[i] = nums[i][N];
}
return result;
}
| int main() {
int nums[3][4] = {{1, 2, 3, 2}, {4, 5, 6, 2}, {7, 1, 9, 5}};
int result[3];
func0(nums, 3, 0, result);
assert(result[0] == 1 && result[1] == 4 && result[2] == 7);
func0(nums, 3, 2, result);
assert(result[0] == 3 && result[1] == 6 && result[2] == 9);
func0(nums, 3, 3... | O3 | c | func0:
endbr64
mov %rcx,%rax
test %esi,%esi
jle 1292 <func0+0x122>
movslq %esi,%r8
movslq %edx,%rcx
lea -0x1(%rsi),%r10d
lea -0x3(%rcx,%r8,4),%r9
lea (%rdi,%rcx,4),%rdx
lea (%rdi,%r9,4),%r9
lea (%rax,%r8,4),%r8
cmp %r9,%rax
setae %r9b
cmp %r8,%rdx
setae %r8b
or %r8b,%r9b
je 1278 <... | func0:
endbr64
mov r8, rdi
mov edi, esi
mov rsi, rcx
test edi, edi
jle loc_12A0
lea r9d, [rdi-1]
push rbx
movsxd r11, edi
cmp r9d, 3
jbe loc_1290
movsxd rdx, edx
lea rcx, ds:0[r11*4]
lea rbx, [rcx+rdx]
lea r10, ds:0[rdx*4]
lea rbx, [r8+rbx*4-0Ch]
lea rax, [r8+r10]... | unsigned long long func0(long long a1, int a2, long long a3, unsigned long long a4)
{
unsigned int v7; // r9d
long long v8; // r10
const __m128i *v9; // rax
int *v10; // rdx
unsigned long long v11; // rax
unsigned long long v12; // rdi
int v13; // ecx
unsigned long long v15; // rdx
const __m128i *v16... | func0:
ENDBR64
MOV R8,RDI
MOV EDI,ESI
MOV RSI,RCX
TEST EDI,EDI
JLE 0x001012a0
LEA R9D,[RDI + -0x1]
PUSH RBX
MOVSXD R11,EDI
CMP R9D,0x3
JBE 0x00101290
MOVSXD RDX,EDX
LEA RCX,[R11*0x4]
LEA RBX,[RCX + RDX*0x1]
LEA R10,[RDX*0x4]
LEA RBX,[R8 + RBX*0x4 + -0xc]
LEA RAX,[R8 + R10*0x1]
CMP RSI,RBX
JNC 0x001011f0
ADD RCX,RSI
CMP... | int4 * func0(long param_1,int param_2,int param_3,int4 *param_4)
{
long lVar1;
int4 uVar2;
int4 uVar3;
int4 uVar4;
int4 *puVar5;
int4 *puVar6;
int4 *puVar7;
int4 *puVar8;
uint uVar9;
long lVar10;
if (param_2 < 1) {
return param_4;
}
uVar9 = param_2 - 1;
lVar10 = (long)param_2;
if (... |
4,512 | func0 |
#include <assert.h>
| int func0(int n) {
int res = 0, count = 0, temp = n;
while (temp > 0) {
if (count % 2 == 1) {
res = res | (1 << count);
}
count++;
temp >>= 1;
}
return n ^ res;
}
| int main() {
assert(func0(10) == 0);
assert(func0(20) == 30);
assert(func0(30) == 20);
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 -0x8(%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_8]
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 ( v3 % 2 == 1 )
v2 |= 1 << v3;
++v3;
}
return v2 ^ (unsigned int)a1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0xc],0x0
MOV dword ptr [RBP + -0x8],0x0
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0010119b
LAB_0010116a:
MOV EDX,dword ptr [RBP + -0x8]
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_10 % 2 == 1) {
local_14 = local_14 | 1 << ((byte)local_10 & 0x1f);
}
local_10 = local_10 + 1;
}
retu... |
4,513 | func0 |
#include <assert.h>
| int func0(int n) {
int res = 0, count = 0, temp = n;
while (temp > 0) {
if (count % 2 == 1) {
res = res | (1 << count);
}
count++;
temp >>= 1;
}
return n ^ res;
}
| int main() {
assert(func0(10) == 0);
assert(func0(20) == 30);
assert(func0(30) == 20);
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,514 | func0 |
#include <assert.h>
| int func0(int n) {
int res = 0, count = 0, temp = n;
while (temp > 0) {
if (count % 2 == 1) {
res = res | (1 << count);
}
count++;
temp >>= 1;
}
return n ^ res;
}
| int main() {
assert(func0(10) == 0);
assert(func0(20) == 30);
assert(func0(30) == 20);
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:
XOR EAX,EDI
RET
LAB_00101228:
... | 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,515 | func0 |
#include <assert.h>
| int func0(int n) {
int res = 0, count = 0, temp = n;
while (temp > 0) {
if (count % 2 == 1) {
res = res | (1 << count);
}
count++;
temp >>= 1;
}
return n ^ res;
}
| int main() {
assert(func0(10) == 0);
assert(func0(20) == 30);
assert(func0(30) == 20);
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 ecx, ecx
xor esi, esi
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
char v2; // cl
int v3; // esi
if ( a1 <= 0 )
return (unsigned int)a1;
v1 = a1;
v2 = 0;
v3 = 0;
do
{
if ( (v2 & 1) != 0 )
v3 |= 1 << v2;
++v2;
v1 >>= 1;
}
while ( v1 );
return v3 ^ (unsigned int)a1;
} | func0:
ENDBR64
TEST EDI,EDI
JLE 0x00101178
MOV EDX,EDI
XOR ECX,ECX
XOR ESI,ESI
MOV EAX,0x1
NOP dword ptr [RAX + RAX*0x1]
LAB_00101158:
TEST CL,0x1
JZ 0x00101166
MOV R8D,EAX
SHL R8D,CL
OR ESI,R8D
LAB_00101166:
ADD ECX,0x1
SAR EDX,0x1
JNZ 0x00101158
MOV EAX,EDI
XOR EAX,ESI
RET
LAB_00101178:
MOV EAX,EDI
RET | uint func0(uint param_1)
{
byte bVar1;
uint uVar2;
uint uVar3;
if (0 < (int)param_1) {
bVar1 = 0;
uVar3 = 0;
uVar2 = param_1;
do {
if ((bool)(bVar1 & 1)) {
uVar3 = uVar3 | 1 << (bVar1 & 0x1f);
}
bVar1 = bVar1 + 1;
uVar2 = (int)uVar2 >> 1;
} while (uVar2 !=... |
4,516 | func0 |
#include <stdio.h>
#include <assert.h>
#include <stdlib.h> // for atoi
typedef struct {
int first;
int second;
} TupleInt;
| void func0(const char *tuple_str[], int size, TupleInt result[]) {
for (int i = 0; i < size; i++) {
result[i].first = atoi(tuple_str[2 * i]);
result[i].second = atoi(tuple_str[2 * i + 1]);
}
}
| int main() {
const char *input1[] = {"333", "33", "1416", "55"};
TupleInt result1[2];
func0(input1, 2, result1);
assert(result1[0].first == 333 && result1[0].second == 33);
assert(result1[1].first == 1416 && result1[1].second == 55);
const char *input2[] = {"999", "99", "1000", "500"};
... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x38,%rsp
mov %rdi,-0x28(%rbp)
mov %esi,-0x2c(%rbp)
mov %rdx,-0x38(%rbp)
movl $0x0,-0x14(%rbp)
jmp 1225 <func0+0x9c>
mov -0x14(%rbp),%eax
add %eax,%eax
cltq
lea 0x0(,%rax,8),%rdx
mov -0x28(%rbp),%rax
add %rdx,%rax
mov (%rax)... | func0:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 38h
mov [rbp+var_28], rdi
mov [rbp+var_2C], esi
mov [rbp+var_38], rdx
mov [rbp+var_14], 0
jmp short loc_1225
loc_11AA:
mov eax, [rbp+var_14]
add eax, eax
cdqe
lea rdx, ds:0[rax*8]
mov rax, [rbp+var_28]
add rax, ... | long long func0(long long a1, int a2, long long a3)
{
long long result; // rax
unsigned int i; // [rsp+2Ch] [rbp-14h]
for ( i = 0; ; ++i )
{
result = i;
if ( (int)i >= a2 )
break;
*(_DWORD *)(8LL * (int)i + a3) = atoi(*(const char **)(8LL * (int)(2 * i) + a1));
*(_DWORD *)(8LL * (int)i +... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x28],RDI
MOV dword ptr [RBP + -0x2c],ESI
MOV qword ptr [RBP + -0x38],RDX
MOV dword ptr [RBP + -0x14],0x0
JMP 0x00101225
LAB_001011aa:
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,EAX
CDQE
LEA RDX,[RAX*0x8]
MOV RAX,qword ptr [RBP + -0x28]
ADD RA... | void func0(long param_1,int param_2,long param_3)
{
int iVar1;
int4 local_1c;
for (local_1c = 0; local_1c < param_2; local_1c = local_1c + 1) {
iVar1 = atoi(*(char **)(param_1 + (long)(local_1c * 2) * 8));
*(int *)((long)local_1c * 8 + param_3) = iVar1;
iVar1 = atoi(*(char **)(param_1 + ((long)(lo... |
4,517 | func0 |
#include <stdio.h>
#include <assert.h>
#include <stdlib.h> // for atoi
typedef struct {
int first;
int second;
} TupleInt;
| void func0(const char *tuple_str[], int size, TupleInt result[]) {
for (int i = 0; i < size; i++) {
result[i].first = atoi(tuple_str[2 * i]);
result[i].second = atoi(tuple_str[2 * i + 1]);
}
}
| int main() {
const char *input1[] = {"333", "33", "1416", "55"};
TupleInt result1[2];
func0(input1, 2, result1);
assert(result1[0].first == 333 && result1[0].second == 33);
assert(result1[1].first == 1416 && result1[1].second == 55);
const char *input2[] = {"999", "99", "1000", "500"};
... | O1 | c | func0:
endbr64
test %esi,%esi
jle 11e6 <func0+0x5d>
push %r12
push %rbp
push %rbx
lea 0x8(%rdi),%rbx
lea 0x4(%rdx),%rbp
lea -0x1(%rsi),%eax
shl $0x4,%rax
lea 0x18(%rdi,%rax,1),%r12
mov -0x8(%rbx),%rdi
mov $0xa,%edx
mov $0x0,%esi
callq 1090 <strtol@plt>
mov %eax,-0x4(%rbp)
mov $... | func0:
endbr64
test esi, esi
jle short locret_11E6
push r12
push rbp
push rbx
lea rbx, [rdi+8]
lea rbp, [rdx+4]
lea eax, [rsi-1]
shl rax, 4
lea r12, [rdi+rax+18h]
loc_11A9:
mov rdi, [rbx-8]
mov edx, 0Ah
mov esi, 0
call _strtol
mov [rbp-4], eax
mov edx, 0Ah
mov ... | void func0(long long a1, int a2, long long a3)
{
_QWORD *v3; // rbx
_DWORD *v4; // rbp
if ( a2 > 0 )
{
v3 = (_QWORD *)(a1 + 8);
v4 = (_DWORD *)(a3 + 4);
do
{
*(v4 - 1) = strtol(*(v3 - 1), 0LL, 10LL);
*v4 = strtol(*v3, 0LL, 10LL);
v3 += 2;
v4 += 2;
}
while ( v3 !... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x001011e6
PUSH R12
PUSH RBP
PUSH RBX
LEA RBX,[RDI + 0x8]
LEA RBP,[RDX + 0x4]
LEA EAX,[RSI + -0x1]
SHL RAX,0x4
LEA R12,[RDI + RAX*0x1 + 0x18]
LAB_001011a9:
MOV RDI,qword ptr [RBX + -0x8]
MOV EDX,0xa
MOV ESI,0x0
CALL 0x00101090
MOV dword ptr [RBP + -0x4],EAX
MOV EDX,0xa
MOV ESI,0x0
MOV RD... | void func0(long param_1,int param_2,long param_3)
{
long lVar1;
int8 *puVar2;
int4 *puVar3;
if (0 < param_2) {
puVar2 = (int8 *)(param_1 + 8);
puVar3 = (int4 *)(param_3 + 4);
do {
lVar1 = strtol((char *)puVar2[-1],(char **)0x0,10);
puVar3[-1] = (int)lVar1;
lVar1 = strtol((char ... |
4,518 | func0 |
#include <stdio.h>
#include <assert.h>
#include <stdlib.h> // for atoi
typedef struct {
int first;
int second;
} TupleInt;
| void func0(const char *tuple_str[], int size, TupleInt result[]) {
for (int i = 0; i < size; i++) {
result[i].first = atoi(tuple_str[2 * i]);
result[i].second = atoi(tuple_str[2 * i + 1]);
}
}
| int main() {
const char *input1[] = {"333", "33", "1416", "55"};
TupleInt result1[2];
func0(input1, 2, result1);
assert(result1[0].first == 333 && result1[0].second == 33);
assert(result1[1].first == 1416 && result1[1].second == 55);
const char *input2[] = {"999", "99", "1000", "500"};
... | O2 | c | func0:
endbr64
test %esi,%esi
jle 1450 <func0+0x60>
lea -0x1(%rsi),%eax
push %r12
shl $0x4,%rax
push %rbp
lea 0x4(%rdx),%rbp
push %rbx
lea 0x18(%rdi,%rax,1),%r12
lea 0x8(%rdi),%rbx
mov -0x8(%rbx),%rdi
mov $0xa,%edx
xor %esi,%esi
add $0x10,%rbx
add $0x8,%rbp
callq 1090 <strtol@p... | func0:
endbr64
test esi, esi
jle short locret_1450
lea eax, [rsi-1]
push r12
shl rax, 4
push rbp
lea rbp, [rdx+4]
push rbx
lea r12, [rdi+rax+18h]
lea rbx, [rdi+8]
loc_1410:
mov rdi, [rbx-8]
mov edx, 0Ah
xor esi, esi
add rbx, 10h
add rbp, 8
call _strtol
mov ... | void func0(long long a1, int a2, long long a3)
{
long long v3; // rbp
long long v4; // r12
long long v5; // rbx
long long v6; // rdi
int v7; // eax
long long v8; // rdi
if ( a2 > 0 )
{
v3 = a3 + 4;
v4 = a1 + 16LL * (unsigned int)(a2 - 1) + 24;
v5 = a1 + 8;
do
{
v6 = *(_QWORD ... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x00101450
LEA EAX,[RSI + -0x1]
PUSH R12
SHL RAX,0x4
PUSH RBP
LEA RBP,[RDX + 0x4]
PUSH RBX
LEA R12,[RDI + RAX*0x1 + 0x18]
LEA RBX,[RDI + 0x8]
LAB_00101410:
MOV RDI,qword ptr [RBX + -0x8]
MOV EDX,0xa
XOR ESI,ESI
ADD RBX,0x10
ADD RBP,0x8
CALL 0x00101090
MOV RDI,qword ptr [RBX + -0x10]
MOV ... | void func0(long param_1,int param_2,long param_3)
{
char *__nptr;
long lVar1;
int8 *puVar2;
int8 *puVar3;
int4 *puVar4;
if (0 < param_2) {
puVar2 = (int8 *)(param_1 + 8);
puVar4 = (int4 *)(param_3 + 4);
do {
puVar3 = puVar2 + 2;
lVar1 = strtol((char *)puVar2[-1],(char **)0x0,10);... |
4,519 | func0 |
#include <stdio.h>
#include <assert.h>
#include <stdlib.h> // for atoi
typedef struct {
int first;
int second;
} TupleInt;
| void func0(const char *tuple_str[], int size, TupleInt result[]) {
for (int i = 0; i < size; i++) {
result[i].first = atoi(tuple_str[2 * i]);
result[i].second = atoi(tuple_str[2 * i + 1]);
}
}
| int main() {
const char *input1[] = {"333", "33", "1416", "55"};
TupleInt result1[2];
func0(input1, 2, result1);
assert(result1[0].first == 333 && result1[0].second == 33);
assert(result1[1].first == 1416 && result1[1].second == 55);
const char *input2[] = {"999", "99", "1000", "500"};
... | O3 | c | func0:
endbr64
test %esi,%esi
jle 1480 <func0+0x60>
lea -0x1(%rsi),%eax
push %r12
shl $0x4,%rax
push %rbp
lea 0x4(%rdx),%rbp
push %rbx
lea 0x18(%rdi,%rax,1),%r12
lea 0x8(%rdi),%rbx
mov -0x8(%rbx),%rdi
mov $0xa,%edx
xor %esi,%esi
add $0x10,%rbx
add $0x8,%rbp
callq 1090 <strtol@p... | func0:
endbr64
test esi, esi
jle short locret_1480
movsxd rsi, esi
push r12
shl rsi, 4
push rbp
lea rbp, [rdx+4]
push rbx
lea r12, [rdi+rsi]
mov rbx, rdi
xchg ax, ax
loc_1440:
mov rdi, [rbx]; nptr
mov edx, 0Ah; base
xor esi, esi; endptr
add rbx, 10h
add rbp, 8
cal... | void func0(const char **a1, int a2, long long a3)
{
long long v3; // rbp
const char **v4; // r12
const char **v5; // rbx
const char *v6; // rdi
int v7; // eax
const char *v8; // rdi
if ( a2 > 0 )
{
v3 = a3 + 4;
v4 = &a1[2 * a2];
v5 = a1;
do
{
v6 = *v5;
v5 += 2;
v3... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x00101480
MOVSXD RSI,ESI
PUSH R12
SHL RSI,0x4
PUSH RBP
LEA RBP,[RDX + 0x4]
PUSH RBX
LEA R12,[RDI + RSI*0x1]
MOV RBX,RDI
NOP
LAB_00101440:
MOV RDI,qword ptr [RBX]
MOV EDX,0xa
XOR ESI,ESI
ADD RBX,0x10
ADD RBP,0x8
CALL 0x00101090
MOV RDI,qword ptr [RBX + -0x8]
MOV EDX,0xa
XOR ESI,ESI
MOV d... | void func0(int8 *param_1,int param_2,long param_3)
{
char *__nptr;
long lVar1;
int8 *puVar2;
int8 *puVar3;
int4 *puVar4;
if (0 < param_2) {
puVar2 = param_1;
puVar4 = (int4 *)(param_3 + 4);
do {
puVar3 = puVar2 + 2;
lVar1 = strtol((char *)*puVar2,(char **)0x0,10);
__nptr = ... |
4,520 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
struct Pair {
int count;
char value;
};
| struct Pair* func0(char *list1, int *returnSize) {
struct Pair *result = (struct Pair *)malloc(sizeof(struct Pair) * strlen(list1));
char current = list1[0];
int count = 1;
int res_idx = 0;
for (int i = 1; list1[i] != '\0'; i++) {
if (list1[i] == current) {
count++;
... | int main() {
int size1, size2, size3;
struct Pair *encoded1 = func0("11234", &size1);
assert(size1 == 4 && encoded1[0].count == 2 && encoded1[0].value == '1' &&
encoded1[1].count == 1 && encoded1[1].value == '2' &&
encoded1[2].count == 1 && encoded1[2].value == '3' &&
... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x30,%rsp
mov %rdi,-0x28(%rbp)
mov %rsi,-0x30(%rbp)
mov -0x28(%rbp),%rax
mov %rax,%rdi
callq 10a0 <strlen@plt>
shl $0x3,%rax
mov %rax,%rdi
callq 10d0 <malloc@plt>
mov %rax,-0x8(%rbp)
mov -0x28(%rbp),%rax
movzbl (%rax),%eax
mov %al,-0x15(%r... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+s], rdi
mov [rbp+var_30], rsi
mov rax, [rbp+s]
mov rdi, rax; s
call _strlen
shl rax, 3
mov rdi, rax; size
call _malloc
mov [rbp+var_8], rax
mov rax, [rbp+s]
movzx eax, byte ptr [rax]
mov [rbp+var_15], al
mo... | _DWORD * func0(const char *a1, _DWORD *a2)
{
size_t v2; // rax
char v4; // [rsp+1Bh] [rbp-15h]
int v5; // [rsp+1Ch] [rbp-14h]
int v6; // [rsp+20h] [rbp-10h]
int i; // [rsp+24h] [rbp-Ch]
_DWORD *v8; // [rsp+28h] [rbp-8h]
v2 = strlen(a1);
v8 = malloc(8 * v2);
v4 = *a1;
v5 = 1;
v6 = 0;
for ( i = 1... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x28],RDI
MOV qword ptr [RBP + -0x30],RSI
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,RAX
CALL 0x001010a0
SHL RAX,0x3
MOV RDI,RAX
CALL 0x001010d0
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOVZX EAX,byte ptr [RAX]
MOV byte ptr [RBP +... | void * func0(char *param_1,int *param_2)
{
size_t sVar1;
void *pvVar2;
char local_1d;
int local_1c;
int local_18;
int local_14;
sVar1 = strlen(param_1);
pvVar2 = malloc(sVar1 << 3);
local_1d = *param_1;
local_1c = 1;
local_18 = 0;
for (local_14 = 1; param_1[local_14] != '\0'; local_14 = loca... |
4,521 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
struct Pair {
int count;
char value;
};
| struct Pair* func0(char *list1, int *returnSize) {
struct Pair *result = (struct Pair *)malloc(sizeof(struct Pair) * strlen(list1));
char current = list1[0];
int count = 1;
int res_idx = 0;
for (int i = 1; list1[i] != '\0'; i++) {
if (list1[i] == current) {
count++;
... | int main() {
int size1, size2, size3;
struct Pair *encoded1 = func0("11234", &size1);
assert(size1 == 4 && encoded1[0].count == 2 && encoded1[0].value == '1' &&
encoded1[1].count == 1 && encoded1[1].value == '2' &&
encoded1[2].count == 1 && encoded1[2].value == '3' &&
... | O1 | c | func0:
endbr64
push %rbp
push %rbx
sub $0x8,%rsp
mov %rdi,%rbx
mov %rsi,%rbp
mov $0xffffffffffffffff,%rcx
mov $0x0,%eax
repnz scas %es:(%rdi),%al
not %rcx
lea -0x8(,%rcx,8),%rdi
callq 10b0 <malloc@plt>
movzbl (%rbx),%esi
movzbl 0x1(%rbx),%edx
test %dl,%dl
je 1223 <func0+0x7a>
lea 0x2(... | func0:
endbr64
push rbp
push rbx
sub rsp, 8
mov rbx, rdi
mov rbp, rsi
call _strlen
lea rdi, ds:0[rax*8]
call _malloc
movzx edi, byte ptr [rbx]
movzx edx, byte ptr [rbx+1]
test dl, dl
jz short loc_1237
lea rcx, [rbx+2]
mov esi, 0
mov r8d, 1
jmp short loc_1217
loc_1... | long long func0(char *a1, _DWORD *a2)
{
long long v4; // rax
long long result; // rax
char v6; // di
char v7; // dl
char *v8; // rcx
int v9; // esi
int v10; // r8d
long long v11; // r9
long long v12; // rdx
v4 = strlen();
result = malloc(8 * v4);
v6 = *a1;
v7 = a1[1];
if ( v7 )
{
v8 ... | func0:
ENDBR64
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RBX,RDI
MOV RBP,RSI
CALL 0x001010a0
LEA RDI,[RAX*0x8]
CALL 0x001010d0
MOVZX EDI,byte ptr [RBX]
MOVZX EDX,byte ptr [RBX + 0x1]
TEST DL,DL
JZ 0x00101237
LEA RCX,[RBX + 0x2]
MOV ESI,0x0
MOV R8D,0x1
JMP 0x00101217
LAB_00101207:
ADD R8D,0x1
LAB_0010120b:
ADD RCX,0x1
MOVZX EDX... | void func0(char *param_1,int *param_2)
{
int *piVar1;
size_t sVar2;
void *pvVar3;
char *pcVar4;
char cVar5;
int iVar6;
char cVar7;
int iVar8;
sVar2 = strlen(param_1);
pvVar3 = malloc(sVar2 * 8);
cVar7 = *param_1;
cVar5 = param_1[1];
if (cVar5 == '\0') {
iVar6 = 0;
iVar8 = 1;
}
... |
4,522 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
struct Pair {
int count;
char value;
};
| struct Pair* func0(char *list1, int *returnSize) {
struct Pair *result = (struct Pair *)malloc(sizeof(struct Pair) * strlen(list1));
char current = list1[0];
int count = 1;
int res_idx = 0;
for (int i = 1; list1[i] != '\0'; i++) {
if (list1[i] == current) {
count++;
... | int main() {
int size1, size2, size3;
struct Pair *encoded1 = func0("11234", &size1);
assert(size1 == 4 && encoded1[0].count == 2 && encoded1[0].value == '1' &&
encoded1[1].count == 1 && encoded1[1].value == '2' &&
encoded1[2].count == 1 && encoded1[2].value == '3' &&
... | O2 | c | func0:
endbr64
push %rbp
mov %rsi,%rbp
push %rbx
mov %rdi,%rbx
sub $0x8,%rsp
callq 10a0 <strlen@plt>
lea 0x0(,%rax,8),%rdi
callq 10d0 <malloc@plt>
movzbl 0x1(%rbx),%ecx
movzbl (%rbx),%r10d
test %cl,%cl
je 13f0 <func0+0xa0>
lea 0x2(%rbx),%rdi
xor %r8d,%r8d
mov $0x1,%r11d
jmp 13b8 <fun... | func0:
endbr64
push rbp
mov rbp, rsi
push rbx
mov rbx, rdi
sub rsp, 8
call _strlen
lea rdi, ds:0[rax*8]
call _malloc
movzx edx, byte ptr [rbx+1]
movzx ecx, byte ptr [rbx]
test dl, dl
jz short loc_13E8
lea rdi, [rbx+2]
xor esi, esi
mov r8d, 1
jmp short loc_13B5
loc... | long long func0(char *a1, _DWORD *a2)
{
long long v3; // rax
long long result; // rax
char v5; // dl
char v6; // cl
char *v7; // rdi
int v8; // esi
int v9; // r8d
long long v10; // r9
long long v11; // r9
long long v12; // rdx
v3 = strlen();
result = malloc(8 * v3);
v5 = a1[1];
v6 = *a1;
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSI
PUSH RBX
MOV RBX,RDI
SUB RSP,0x8
CALL 0x001010a0
LEA RDI,[RAX*0x8]
CALL 0x001010d0
MOVZX EDX,byte ptr [RBX + 0x1]
MOVZX ECX,byte ptr [RBX]
TEST DL,DL
JZ 0x001013e8
LEA RDI,[RBX + 0x2]
XOR ESI,ESI
MOV R8D,0x1
JMP 0x001013b5
LAB_00101390:
MOVSXD R9,ESI
ADD RDI,0x1
ADD ESI,0x1
LEA R9,[R... | void func0(char *param_1,int *param_2)
{
char cVar1;
size_t sVar2;
int4 *puVar3;
char cVar4;
char cVar5;
int iVar6;
char *pcVar7;
int iVar8;
long lVar9;
sVar2 = strlen(param_1);
puVar3 = (int4 *)malloc(sVar2 * 8);
cVar4 = *param_1;
if (param_1[1] == '\0') {
*puVar3 = 1;
*(char *)(p... |
4,523 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
struct Pair {
int count;
char value;
};
| struct Pair* func0(char *list1, int *returnSize) {
struct Pair *result = (struct Pair *)malloc(sizeof(struct Pair) * strlen(list1));
char current = list1[0];
int count = 1;
int res_idx = 0;
for (int i = 1; list1[i] != '\0'; i++) {
if (list1[i] == current) {
count++;
... | int main() {
int size1, size2, size3;
struct Pair *encoded1 = func0("11234", &size1);
assert(size1 == 4 && encoded1[0].count == 2 && encoded1[0].value == '1' &&
encoded1[1].count == 1 && encoded1[1].value == '2' &&
encoded1[2].count == 1 && encoded1[2].value == '3' &&
... | O3 | c | func0:
endbr64
push %rbp
mov %rsi,%rbp
push %rbx
mov %rdi,%rbx
sub $0x8,%rsp
callq 10a0 <strlen@plt>
lea 0x0(,%rax,8),%rdi
callq 10d0 <malloc@plt>
movzbl 0x1(%rbx),%r8d
movzbl (%rbx),%r10d
test %r8b,%r8b
je 1420 <func0+0xd0>
lea 0x2(%rbx),%rdi
mov $0x1,%r11d
xor %ebx,%ebx
xor %esi,%e... | func0:
endbr64
push rbp
mov rbp, rsi
push rbx
mov rbx, rdi
sub rsp, 8
call _strlen
lea rdi, ds:0[rax*8]; size
call _malloc
movzx edx, byte ptr [rbx+1]
movzx esi, byte ptr [rbx]
test dl, dl
jz short loc_13F0
lea rdi, [rbx+2]
xor r8d, r8d
mov r9d, 1
jmp short loc_13... | char * func0(long long a1, int *a2)
{
size_t v3; // rax
char *result; // rax
char v5; // dl
char v6; // si
char *v7; // rdi
int v8; // r8d
int v9; // r9d
long long v10; // rcx
char *v11; // rcx
char v12; // cl
long long v13; // rcx
int v14; // r8d
char *v15; // rcx
v3 = strlen((const char *... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSI
PUSH RBX
MOV RBX,RDI
SUB RSP,0x8
CALL 0x001010a0
LEA RDI,[RAX*0x8]
CALL 0x001010d0
MOVZX EDX,byte ptr [RBX + 0x1]
MOVZX ESI,byte ptr [RBX]
TEST DL,DL
JZ 0x001013f0
LEA RDI,[RBX + 0x2]
XOR R8D,R8D
MOV R9D,0x1
JMP 0x001013b8
LAB_00101390:
MOVSXD RCX,R8D
ADD RDI,0x1
ADD R8D,0x1
LEA RCX,... | void func0(char *param_1,int *param_2)
{
char cVar1;
size_t sVar2;
int *piVar3;
long lVar4;
char cVar5;
char cVar6;
char *pcVar7;
int iVar8;
int iVar9;
int iVar10;
sVar2 = strlen(param_1);
piVar3 = (int *)malloc(sVar2 * 8);
cVar5 = *param_1;
if (param_1[1] == '\0') {
iVar9 = 1;
i... |
4,524 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int arr[], int n, int k) {
int max1 = arr[0];
int res = 0;
for (int i = 1; i < n; i++) {
if (arr[i] > max1) {
max1 = arr[i];
}
}
for (int i = 0; i < n; i++) {
if ((max1 - arr[i]) % k != 0) {
return -1;
} else {
... | int main() {
int arr1[] = {2, 2, 2, 2};
int arr2[] = {4, 2, 6, 8};
int arr3[] = {21, 33, 9, 45, 63};
assert(func0(arr1, 4, 3) == 0);
assert(func0(arr2, 4, 3) == -1);
assert(func0(arr3, 5, 6) == 24);
printf("All test cases passed!\n");
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
mov %edx,-0x20(%rbp)
mov -0x18(%rbp),%rax
mov (%rax),%eax
mov %eax,-0x10(%rbp)
movl $0x0,-0xc(%rbp)
movl $0x1,-0x8(%rbp)
jmp 11ec <func0+0x63>
mov -0x8(%rbp),%eax
cltq
lea 0x0(,%rax,4),%rdx
mov -0x18(... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_20], edx
mov rax, [rbp+var_18]
mov eax, [rax]
mov [rbp+var_10], eax
mov [rbp+var_C], 0
mov [rbp+var_8], 1
jmp short loc_11EC
loc_11B4:
mov eax, [rbp+var_8]
cdqe
lea rdx, ds:0[... | long long func0(int *a1, int a2, int a3)
{
int v4; // [rsp+10h] [rbp-10h]
unsigned int v5; // [rsp+14h] [rbp-Ch]
int i; // [rsp+18h] [rbp-8h]
int j; // [rsp+1Ch] [rbp-4h]
v4 = *a1;
v5 = 0;
for ( i = 1; i < a2; ++i )
{
if ( v4 < a1[i] )
v4 = a1[i];
}
for ( j = 0; j < a2; ++j )
{
if ... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0x20],EDX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x10],EAX
MOV dword ptr [RBP + -0xc],0x0
MOV dword ptr [RBP + -0x8],0x1
JMP 0x001011ec
LAB_001011b4:
MOV EAX,d... | int [16] func0(int *param_1,int param_2,ulong param_3)
{
ulong uVar1;
int iVar2;
int auVar3 [16];
int local_18;
uint local_14;
int local_10;
int local_c;
iVar2 = (int)param_3;
local_18 = *param_1;
local_14 = 0;
for (local_10 = 1; local_10 < param_2; local_10 = local_10 + 1) {
if (local_18... |
4,525 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int arr[], int n, int k) {
int max1 = arr[0];
int res = 0;
for (int i = 1; i < n; i++) {
if (arr[i] > max1) {
max1 = arr[i];
}
}
for (int i = 0; i < n; i++) {
if ((max1 - arr[i]) % k != 0) {
return -1;
} else {
... | int main() {
int arr1[] = {2, 2, 2, 2};
int arr2[] = {4, 2, 6, 8};
int arr3[] = {21, 33, 9, 45, 63};
assert(func0(arr1, 4, 3) == 0);
assert(func0(arr2, 4, 3) == -1);
assert(func0(arr3, 5, 6) == 24);
printf("All test cases passed!\n");
return 0;
}
| O1 | c | func0:
endbr64
mov %edx,%r8d
mov (%rdi),%r10d
cmp $0x1,%esi
jle 11e7 <func0+0x5e>
lea 0x4(%rdi),%rax
lea -0x2(%rsi),%edx
lea 0x8(%rdi,%rdx,4),%rcx
mov (%rax),%edx
cmp %edx,%r10d
cmovl %edx,%r10d
add $0x4,%rax
cmp %rcx,%rax
jne 11a4 <func0+0x1b>
mov $0x0,%r9d
mov $0x0,%r11d
mov... | func0:
endbr64
mov r10, rdi
mov r11d, esi
mov esi, edx
mov r8d, [rdi]
cmp r11d, 1
jle short loc_11EB
lea rax, [rdi+4]
lea edx, [r11-2]
lea rcx, [rdi+rdx*4+8]
loc_11AB:
mov edx, [rax]
cmp r8d, edx
cmovl r8d, edx
add rax, 4
cmp rax, rcx
jnz short loc_11AB
loc_11BD... | long long func0(int *a1, int a2, int a3)
{
int v4; // r8d
int *v5; // rax
long long v6; // rdi
unsigned int v7; // r9d
v4 = *a1;
if ( a2 <= 1 )
{
v7 = 0;
if ( a2 != 1 )
return v7;
}
else
{
v5 = a1 + 1;
do
{
if ( v4 < *v5 )
v4 = *v5;
++v5;
}
whi... | func0:
ENDBR64
MOV R10,RDI
MOV R11D,ESI
MOV ESI,EDX
MOV R8D,dword ptr [RDI]
CMP R11D,0x1
JLE 0x001011eb
LEA RAX,[RDI + 0x4]
LEA EDX,[R11 + -0x2]
LEA RCX,[RDI + RDX*0x4 + 0x8]
LAB_001011ab:
MOV EDX,dword ptr [RAX]
CMP R8D,EDX
CMOVL R8D,EDX
ADD RAX,0x4
CMP RAX,RCX
JNZ 0x001011ab
LAB_001011bd:
MOV EDI,0x0
MOV R9D,0x0
LAB_... | int1 [16] func0(int *param_1,int param_2,ulong param_3)
{
int *piVar1;
int iVar2;
ulong uVar3;
int iVar4;
long lVar5;
int iVar6;
uint uVar7;
int1 auVar8 [16];
iVar6 = *param_1;
if (param_2 < 2) {
uVar7 = 0;
uVar3 = param_3;
if (param_2 != 1) goto LAB_001011fb;
}
else {
piVar... |
4,526 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int arr[], int n, int k) {
int max1 = arr[0];
int res = 0;
for (int i = 1; i < n; i++) {
if (arr[i] > max1) {
max1 = arr[i];
}
}
for (int i = 0; i < n; i++) {
if ((max1 - arr[i]) % k != 0) {
return -1;
} else {
... | int main() {
int arr1[] = {2, 2, 2, 2};
int arr2[] = {4, 2, 6, 8};
int arr3[] = {21, 33, 9, 45, 63};
assert(func0(arr1, 4, 3) == 0);
assert(func0(arr2, 4, 3) == -1);
assert(func0(arr3, 5, 6) == 24);
printf("All test cases passed!\n");
return 0;
}
| O2 | c | func0:
endbr64
mov (%rdi),%r11d
mov %edx,%r9d
cmp $0x1,%esi
jle 1340 <func0+0x70>
lea -0x2(%rsi),%edx
lea 0x4(%rdi),%rax
mov %r11d,%ecx
lea 0x8(%rdi,%rdx,4),%r8
xchg %ax,%ax
mov (%rax),%edx
cmp %edx,%ecx
cmovl %edx,%ecx
add $0x4,%rax
cmp %rax,%r8
jne 12f0 <func0+0x20>
xor %r... | func0:
endbr64
mov r10, rdi
mov r11d, esi
mov edi, edx
mov r9d, [r10]
cmp esi, 1
jle short loc_1340
lea edx, [rsi-2]
lea rax, [r10+4]
mov ecx, r9d
lea rsi, [r10+rdx*4+8]
nop dword ptr [rax+rax+00h]
loc_12F8:
mov edx, [rax]
cmp ecx, edx
cmovl ecx, edx
add rax, 4
... | long long func0(int *a1, int a2, int a3)
{
int v4; // r9d
int *v5; // rax
int v6; // ecx
long long v7; // rsi
long long v8; // rsi
unsigned int v9; // r8d
v4 = *a1;
if ( a2 <= 1 )
{
v9 = 0;
if ( a2 != 1 )
return v9;
v6 = *a1;
}
else
{
v5 = a1 + 1;
v6 = *a1;
v7 = (... | func0:
ENDBR64
MOV R10,RDI
MOV R11D,ESI
MOV EDI,EDX
MOV R9D,dword ptr [R10]
CMP ESI,0x1
JLE 0x00101340
LEA EDX,[RSI + -0x2]
LEA RAX,[R10 + 0x4]
MOV ECX,R9D
LEA RSI,[R10 + RDX*0x4 + 0x8]
NOP dword ptr [RAX + RAX*0x1]
LAB_001012f8:
MOV EDX,dword ptr [RAX]
CMP ECX,EDX
CMOVL ECX,EDX
ADD RAX,0x4
CMP RSI,RAX
JNZ 0x001012f8
L... | int func0(int *param_1,int param_2,int param_3)
{
int *piVar1;
int iVar2;
long lVar3;
int iVar4;
int iVar5;
iVar5 = *param_1;
iVar2 = iVar5;
if (param_2 < 2) {
if (param_2 != 1) {
return 0;
}
}
else {
piVar1 = param_1 + 1;
do {
if (iVar2 < *piVar1) {
iVar2 = *... |
4,527 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int arr[], int n, int k) {
int max1 = arr[0];
int res = 0;
for (int i = 1; i < n; i++) {
if (arr[i] > max1) {
max1 = arr[i];
}
}
for (int i = 0; i < n; i++) {
if ((max1 - arr[i]) % k != 0) {
return -1;
} else {
... | int main() {
int arr1[] = {2, 2, 2, 2};
int arr2[] = {4, 2, 6, 8};
int arr3[] = {21, 33, 9, 45, 63};
assert(func0(arr1, 4, 3) == 0);
assert(func0(arr2, 4, 3) == -1);
assert(func0(arr3, 5, 6) == 24);
printf("All test cases passed!\n");
return 0;
}
| O3 | c | func0:
endbr64
mov (%rdi),%r9d
mov %edx,%r10d
cmp $0x1,%esi
jle 13c8 <func0+0x118>
lea -0x2(%rsi),%eax
lea -0x1(%rsi),%ecx
cmp $0x2,%eax
jbe 13d2 <func0+0x122>
mov %ecx,%edx
movd %r9d,%xmm3
mov %rdi,%rax
shr $0x2,%edx
pshufd $0x0,%xmm3,%xmm2
shl $0x4,%rdx
add %rdi,%rdx
nopl 0x... | func0:
endbr64
movsxd r9, esi
mov rcx, rdi
mov r8d, edx
mov edi, [rdi]
cmp r9d, 1
jle loc_13D0
lea eax, [r9-2]
lea esi, [r9-1]
cmp eax, 2
jbe loc_13D9
mov edx, esi
movd xmm3, edi
mov rax, rcx
shr edx, 2
pshufd xmm2, xmm3, 0
shl rdx, 4
add rdx, rcx
nop wor... | long long func0(signed int *a1, int a2, int a3)
{
long long v3; // r9
signed int *v4; // rcx
signed int v5; // edi
bool v6; // zf
unsigned int v7; // esi
signed int *v8; // rax
__m128i v9; // xmm2
__m128i v10; // xmm0
__m128i v11; // xmm1
__m128i v12; // xmm1
signed int v13; // eax
__m128i v14;... | func0:
ENDBR64
MOVSXD R9,ESI
MOV RCX,RDI
MOV R8D,EDX
MOV EDI,dword ptr [RDI]
CMP R9D,0x1
JLE 0x001013d0
LEA EAX,[R9 + -0x2]
LEA ESI,[R9 + -0x1]
CMP EAX,0x2
JBE 0x001013d9
MOV EDX,ESI
MOVD XMM3,EDI
MOV RAX,RCX
SHR EDX,0x2
PSHUFD XMM2,XMM3,0x0
SHL RDX,0x4
ADD RDX,RCX
NOP word ptr [RAX + RAX*0x1]
LAB_001012f8:
MOVDQU XMM0... | int func0(uint *param_1,int param_2,int param_3)
{
uint *puVar1;
uint *puVar2;
uint *puVar3;
uint *puVar4;
int iVar5;
uint *puVar6;
uint uVar7;
uint uVar8;
uint uVar9;
uint uVar10;
uint uVar11;
uint uVar12;
uint uVar13;
uint uVar14;
uint uVar15;
uVar8 = *param_1;
if (param_2 < 2) {... |
4,528 | func0 |
#include <stdio.h>
#include <string.h>
#include <assert.h>
| const char* func0(const char* month, int days) {
const char* season;
if (strcmp(month, "January") == 0 || strcmp(month, "February") == 0 || strcmp(month, "March") == 0) {
season = "winter";
} else if (strcmp(month, "April") == 0 || strcmp(month, "May") == 0 || strcmp(month, "June") == 0) {
... | int main() {
assert(strcmp(func0("January", 4), "winter") == 0);
assert(strcmp(func0("October", 28), "autumn") == 0);
assert(strcmp(func0("June", 6), "spring") == 0);
printf("All test cases passed.\n");
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
mov -0x18(%rbp),%rax
lea 0xe61(%rip),%rsi
mov %rax,%rdi
callq 1090 <strcmp@plt>
test %eax,%eax
je 11e1 <func0+0x58>
mov -0x18(%rbp),%rax
lea 0xe52(%rip),%rsi
mov %rax,%rdi
callq 1090 <... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+s1], rdi
mov [rbp+var_1C], esi
mov rax, [rbp+s1]
lea rdx, s2; "January"
mov rsi, rdx; s2
mov rdi, rax; s1
call _strcmp
test eax, eax
jz short loc_11EA
mov rax, [rbp+s1]
lea rdx, aFebruary; "February"
mov ... | const char * func0(const char *a1, int a2)
{
const char *v3; // [rsp+18h] [rbp-8h]
if ( !strcmp(a1, "January") || !strcmp(a1, "February") || !strcmp(a1, "March") )
{
v3 = "winter";
}
else if ( !strcmp(a1, "April") || !strcmp(a1, "May") || !strcmp(a1, "June") )
{
v3 = "spring";
}
else if ( !strc... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV RAX,qword ptr [RBP + -0x18]
LEA RDX,[0x102008]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x00101090
TEST EAX,EAX
JZ 0x001011ea
MOV RAX,qword ptr [RBP + -0x18]
LEA RDX,[0x102010]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x0010109... | char * func0(char *param_1,int param_2)
{
int iVar1;
char *local_10;
iVar1 = strcmp(param_1,"January");
if (((iVar1 == 0) || (iVar1 = strcmp(param_1,"February"), iVar1 == 0)) ||
(iVar1 = strcmp(param_1,"March"), iVar1 == 0)) {
local_10 = "winter";
}
else {
iVar1 = strcmp(param_1,"April");
... |
4,529 | func0 |
#include <stdio.h>
#include <string.h>
#include <assert.h>
| const char* func0(const char* month, int days) {
const char* season;
if (strcmp(month, "January") == 0 || strcmp(month, "February") == 0 || strcmp(month, "March") == 0) {
season = "winter";
} else if (strcmp(month, "April") == 0 || strcmp(month, "May") == 0 || strcmp(month, "June") == 0) {
... | int main() {
assert(strcmp(func0("January", 4), "winter") == 0);
assert(strcmp(func0("October", 28), "autumn") == 0);
assert(strcmp(func0("June", 6), "spring") == 0);
printf("All test cases passed.\n");
return 0;
}
| O1 | c | func0:
endbr64
mov %rdi,%rdx
mov %esi,%eax
mov $0x8,%ecx
lea 0xea2(%rip),%rdi
mov %rdx,%rsi
repz cmpsb %es:(%rdi),%ds:(%rsi)
seta %cl
sbb $0x0,%cl
test %cl,%cl
je 1294 <func0+0x12b>
mov $0x9,%ecx
lea 0xe8b(%rip),%rdi
mov %rdx,%rsi
repz cmpsb %es:(%rdi),%ds:(%rsi)
seta %cl
sbb $0x... | func0:
endbr64
push r14
push r13
push r12
push rbp
push rbx
mov rbx, rdi
mov ebp, esi
lea rsi, aJanuary; "January"
call _strcmp
test eax, eax
jz loc_126D
lea rsi, aFebruary; "February"
mov rdi, rbx
call _strcmp
test eax, eax
jz loc_126D
lea rsi, aMarch; "Marc... | const char * func0(long long a1, int a2)
{
const char *v2; // r12
bool v3; // r13
int v4; // eax
int v5; // eax
if ( !(unsigned int)strcmp(a1, "January")
|| !(unsigned int)strcmp(a1, "February")
|| !(unsigned int)strcmp(a1, "March") )
{
v4 = strcmp(a1, "March");
v3 = v4 == 0;
if ( a2 > ... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
MOV EBP,ESI
LEA RSI,[0x102020]
CALL 0x00101090
TEST EAX,EAX
JZ 0x0010126d
LEA RSI,[0x102028]
MOV RDI,RBX
CALL 0x00101090
TEST EAX,EAX
JZ 0x0010126d
LEA RSI,[0x102031]
MOV RDI,RBX
CALL 0x00101090
TEST EAX,EAX
JZ 0x0010126d
LEA RSI,[0x102037]
MOV RDI... | char * func0(char *param_1,int param_2)
{
int iVar1;
char *pcVar2;
bool bVar3;
iVar1 = strcmp(param_1,"January");
if (((iVar1 == 0) || (iVar1 = strcmp(param_1,"February"), iVar1 == 0)) ||
(iVar1 = strcmp(param_1,"March"), iVar1 == 0)) {
iVar1 = strcmp(param_1,"March");
bVar3 = iVar1 == 0;
... |
4,530 | func0 |
#include <stdio.h>
#include <string.h>
#include <assert.h>
| const char* func0(const char* month, int days) {
const char* season;
if (strcmp(month, "January") == 0 || strcmp(month, "February") == 0 || strcmp(month, "March") == 0) {
season = "winter";
} else if (strcmp(month, "April") == 0 || strcmp(month, "May") == 0 || strcmp(month, "June") == 0) {
... | int main() {
assert(strcmp(func0("January", 4), "winter") == 0);
assert(strcmp(func0("October", 28), "autumn") == 0);
assert(strcmp(func0("June", 6), "spring") == 0);
printf("All test cases passed.\n");
return 0;
}
| O2 | c | func0:
endbr64
mov %rdi,%rax
mov $0x8,%ecx
mov %esi,%r10d
lea 0xd9a(%rip),%rdi
mov %rax,%rsi
repz cmpsb %es:(%rdi),%ds:(%rsi)
mov $0x6,%ecx
lea 0xd91(%rip),%rdi
mov %rax,%rsi
seta %r11b
sbb $0x0,%r11b
repz cmpsb %es:(%rdi),%ds:(%rsi)
mov $0x5,%ecx
lea 0xd7e(%rip),%rdi
mov %rax,%rsi... | func0:
endbr64
push r15
push r14
push r13
push r12
push rbp
mov rbp, rdi
push rbx
mov ebx, esi
lea rsi, aJanuary; "January"
sub rsp, 18h
call _strcmp
lea rsi, aMarch; "March"
mov rdi, rbp
mov r12d, eax
call _strcmp
lea rsi, aJune; "June"
mov rdi, rbp
mov r... | const char * func0(long long a1, int a2)
{
int v2; // r12d
int v3; // r14d
int v4; // r13d
int v5; // r15d
bool v6; // dl
const char *v7; // r12
bool v9; // [rsp+Fh] [rbp-39h]
v2 = strcmp(a1, "January");
v3 = strcmp(a1, "March");
v4 = strcmp(a1, "June");
v5 = strcmp(a1, "September");
if ( v2 &&... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
MOV EBX,ESI
LEA RSI,[0x102020]
SUB RSP,0x18
CALL 0x00101090
LEA RSI,[0x102028]
MOV RDI,RBP
MOV R12D,EAX
CALL 0x00101090
LEA RSI,[0x10202e]
MOV RDI,RBP
MOV R14D,EAX
CALL 0x00101090
LEA RSI,[0x102033]
MOV RDI,RBP
MOV R13D,EAX
CALL 0x00101090... | char * func0(char *param_1,int param_2)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
char *pcVar5;
iVar1 = strcmp(param_1,"January");
iVar2 = strcmp(param_1,"March");
iVar3 = strcmp(param_1,"June");
iVar4 = strcmp(param_1,"September");
if ((iVar1 == 0) || (iVar1 = strcmp(param_1,"February"), iV... |
4,531 | func0 |
#include <stdio.h>
#include <string.h>
#include <assert.h>
| const char* func0(const char* month, int days) {
const char* season;
if (strcmp(month, "January") == 0 || strcmp(month, "February") == 0 || strcmp(month, "March") == 0) {
season = "winter";
} else if (strcmp(month, "April") == 0 || strcmp(month, "May") == 0 || strcmp(month, "June") == 0) {
... | int main() {
assert(strcmp(func0("January", 4), "winter") == 0);
assert(strcmp(func0("October", 28), "autumn") == 0);
assert(strcmp(func0("June", 6), "spring") == 0);
printf("All test cases passed.\n");
return 0;
}
| O3 | c | func0:
endbr64
mov %rdi,%rax
mov $0x8,%ecx
mov %esi,%r10d
lea 0xd9a(%rip),%rdi
mov %rax,%rsi
repz cmpsb %es:(%rdi),%ds:(%rsi)
mov $0x6,%ecx
lea 0xd91(%rip),%rdi
mov %rax,%rsi
seta %r11b
sbb $0x0,%r11b
repz cmpsb %es:(%rdi),%ds:(%rsi)
mov $0x5,%ecx
lea 0xd7e(%rip),%rdi
mov %rax,%rsi... | func0:
endbr64
push r14
push r13
push r12
mov r12d, esi
lea rsi, s1; "January"
push rbp
push rbx
mov rbx, rdi
call _strcmp
lea rsi, aMarch; "March"
mov rdi, rbx; s1
mov r13d, eax
call _strcmp
mov ebp, eax
test r13d, r13d
jz short loc_12CA
lea rsi, aFebruary; ... | const char * func0(char *s1, int a2)
{
int v2; // r13d
int v3; // ebp
const char *v4; // rbp
int v5; // r13d
int v7; // ebp
int v8; // eax
bool v9; // zf
const char *v10; // rbp
int v11; // ebp
int v12; // eax
v2 = strcmp(s1, "January");
v3 = strcmp(s1, "March");
if ( v2 && strcmp(s1, "Februa... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
MOV R12D,ESI
LEA RSI,[0x102020]
PUSH RBP
PUSH RBX
MOV RBX,RDI
CALL 0x00101090
LEA RSI,[0x102028]
MOV RDI,RBX
MOV R13D,EAX
CALL 0x00101090
MOV EBP,EAX
TEST R13D,R13D
JZ 0x001012ca
LEA RSI,[0x10202e]
MOV RDI,RBX
CALL 0x00101090
TEST EAX,EAX
JNZ 0x00101330
LAB_001012ca:
TEST EBP,E... | char * func0(char *param_1,int param_2)
{
int iVar1;
int iVar2;
char *pcVar3;
iVar1 = strcmp(param_1,"January");
iVar2 = strcmp(param_1,"March");
if ((iVar1 == 0) || (iVar1 = strcmp(param_1,"February"), iVar1 == 0)) {
if (iVar2 == 0) goto LAB_00101334;
pcVar3 = "winter";
iVar1 = strcmp(param... |
4,532 | func0 |
#include <stdio.h>
#include <assert.h>
#include <string.h>
| char* func0(int a, int b, int n) {
int i = 0;
static char result[50];
while (i * a <= n) {
if ((n - (i * a)) % b == 0) {
sprintf(result, "x = %d, y = %d", i, (n - (i * a)) / b);
return result;
}
i++;
}
return "No solution";
}
| int main() {
assert(strcmp(func0(2, 3, 7), "x = 2, y = 1") == 0);
assert(strcmp(func0(4, 2, 7), "No solution") == 0);
assert(strcmp(func0(1, 13, 17), "x = 4, y = 1") == 0);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %edi,-0x14(%rbp)
mov %esi,-0x18(%rbp)
mov %edx,-0x1c(%rbp)
movl $0x0,-0x4(%rbp)
jmp 11ff <func0+0x76>
mov -0x4(%rbp),%eax
imul -0x14(%rbp),%eax
mov -0x1c(%rbp),%edx
sub %eax,%edx
mov %edx,%eax
cltd
idivl -0x18(%rbp)
mov %e... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_14], edi
mov [rbp+var_18], esi
mov [rbp+var_1C], edx
mov [rbp+var_4], 0
jmp short loc_1205
loc_11A7:
mov eax, [rbp+var_4]
imul eax, [rbp+var_14]
mov edx, [rbp+var_1C]
sub edx, eax
mov eax, edx
cdq
idiv [r... | char * func0(int a1, int a2, int a3)
{
int i; // [rsp+1Ch] [rbp-4h]
for ( i = 0; a3 >= a1 * i; ++i )
{
if ( !((a3 - a1 * i) % a2) )
{
sprintf(result_1, "x = %d, y = %d", i, (a3 - a1 * i) / a2);
return result_1;
}
}
return "No solution";
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x18],ESI
MOV dword ptr [RBP + -0x1c],EDX
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00101205
LAB_001011a7:
MOV EAX,dword ptr [RBP + -0x4]
IMUL EAX,dword ptr [RBP + -0x14]
MOV EDX,dword ptr [RBP + -0x1c]
SUB EDX,EAX
MOV EAX... | char * func0(int param_1,int param_2,int param_3)
{
uint local_c;
local_c = 0;
while( true ) {
if (param_3 < (int)(local_c * param_1)) {
return "No solution";
}
if ((int)(param_3 - local_c * param_1) % param_2 == 0) break;
local_c = local_c + 1;
}
sprintf(result_1,"x = %d, y = %d",(u... |
4,533 | func0 |
#include <stdio.h>
#include <assert.h>
#include <string.h>
| char* func0(int a, int b, int n) {
int i = 0;
static char result[50];
while (i * a <= n) {
if ((n - (i * a)) % b == 0) {
sprintf(result, "x = %d, y = %d", i, (n - (i * a)) / b);
return result;
}
i++;
}
return "No solution";
}
| int main() {
assert(strcmp(func0(2, 3, 7), "x = 2, y = 1") == 0);
assert(strcmp(func0(4, 2, 7), "No solution") == 0);
assert(strcmp(func0(1, 13, 17), "x = 4, y = 1") == 0);
return 0;
}
| O1 | c | func0:
endbr64
lea 0xe90(%rip),%rax
test %edx,%edx
js 11f5 <func0+0x8c>
push %rbx
mov %edx,%r11d
mov %edx,%eax
cltd
idiv %esi
mov %edx,%r8d
test %edx,%edx
je 11e7 <func0+0x7e>
mov %edi,%ebx
mov %r11d,%r10d
sub %edi,%r10d
mov %edi,%ecx
mov $0x0,%r8d
add $0x1,%r8d
cmp %ecx... | func0:
endbr64
lea rax, aNoSolution; "No solution"
test edx, edx
js locret_121C
mov r10d, edi
mov edi, esi
mov r11d, edx
mov eax, edx
cdq
idiv esi
mov r8d, edx
test edx, edx
jz short loc_120F
mov esi, r11d
sub esi, r10d
mov ecx, r10d
mov r8d, 0
loc_11BF:
add ... | const char * func0(int a1, int a2, int a3)
{
const char *result; // rax
int v6; // r8d
int v7; // esi
int v8; // ecx
int v9; // r9d
result = "No solution";
if ( a3 >= 0 )
{
v6 = a3 % a2;
if ( a3 % a2 )
{
v7 = a3 - a1;
v8 = a1;
v6 = 0;
while ( 1 )
{
++v6... | func0:
ENDBR64
LEA RAX,[0x102004]
TEST EDX,EDX
JS 0x0010121c
MOV R10D,EDI
MOV EDI,ESI
MOV R11D,EDX
MOV EAX,EDX
CDQ
IDIV ESI
MOV R8D,EDX
TEST EDX,EDX
JZ 0x0010120f
MOV ESI,R11D
SUB ESI,R10D
MOV ECX,R10D
MOV R8D,0x0
LAB_001011bf:
ADD R8D,0x1
CMP R11D,ECX
JL 0x00101214
MOV R9D,ESI
ADD ECX,R10D
SUB ESI,R10D
MOV EAX,R9D
CDQ... | int1 * func0(int param_1,int param_2,int param_3)
{
int iVar1;
int iVar2;
ulong uVar3;
int iVar4;
if (param_3 < 0) {
return "No solution";
}
uVar3 = (long)param_3 % (long)param_2 & 0xffffffff;
iVar4 = param_3;
if ((int)((long)param_3 % (long)param_2) != 0) {
uVar3 = 0;
iVar1 = param_3 ... |
4,534 | func0 |
#include <stdio.h>
#include <assert.h>
#include <string.h>
| char* func0(int a, int b, int n) {
int i = 0;
static char result[50];
while (i * a <= n) {
if ((n - (i * a)) % b == 0) {
sprintf(result, "x = %d, y = %d", i, (n - (i * a)) / b);
return result;
}
i++;
}
return "No solution";
}
| int main() {
assert(strcmp(func0(2, 3, 7), "x = 2, y = 1") == 0);
assert(strcmp(func0(4, 2, 7), "No solution") == 0);
assert(strcmp(func0(1, 13, 17), "x = 4, y = 1") == 0);
return 0;
}
| O2 | c | func0:
endbr64
lea 0xd89(%rip),%rax
test %edx,%edx
js 12fe <func0+0x8e>
mov %edx,%eax
mov %edx,%r11d
cltd
idiv %esi
mov %edx,%r8d
test %edx,%edx
je 12c3 <func0+0x53>
mov %r11d,%r10d
mov %edi,%ecx
xor %r8d,%r8d
sub %edi,%r10d
jmp 12b2 <func0+0x42>
nopl 0x0(%rax,%rax,1)
mov %... | func0:
endbr64
lea rax, aNoSolution; "No solution"
test edx, edx
js short locret_1308
mov eax, edx
mov r11d, edx
cdq
idiv esi
mov r8d, edx
test edx, edx
jz short loc_12D4
mov r10d, edi
mov edi, r11d
xor r8d, r8d
sub edi, r10d
mov ecx, r10d
jmp short loc_12C3
lo... | const char * func0(int a1, int a2, int a3)
{
const char *result; // rax
int v4; // r8d
int v6; // edi
int v7; // ecx
int v8; // r9d
result = "No solution";
if ( a3 >= 0 )
{
v4 = a3 % a2;
if ( a3 % a2 )
{
v4 = 0;
v6 = a3 - a1;
v7 = a1;
while ( 1 )
{
++v4... | func0:
ENDBR64
LEA RAX,[0x102004]
TEST EDX,EDX
JS 0x00101308
MOV EAX,EDX
MOV R11D,EDX
CDQ
IDIV ESI
MOV R8D,EDX
TEST EDX,EDX
JZ 0x001012d4
MOV R10D,EDI
MOV EDI,R11D
XOR R8D,R8D
SUB EDI,R10D
MOV ECX,R10D
JMP 0x001012c3
LAB_001012b0:
MOV R9D,EDI
ADD ECX,R10D
SUB EDI,R10D
MOV EAX,R9D
CDQ
IDIV ESI
TEST EDX,EDX
JZ 0x001012d7... | char * func0(int param_1,int param_2,int param_3)
{
int iVar1;
int iVar2;
ulong uVar3;
int iVar4;
if (param_3 < 0) {
return "No solution";
}
uVar3 = (long)param_3 % (long)param_2 & 0xffffffff;
iVar4 = param_3;
if ((int)((long)param_3 % (long)param_2) != 0) {
uVar3 = 0;
iVar1 = param_3 ... |
4,535 | func0 |
#include <stdio.h>
#include <assert.h>
#include <string.h>
| char* func0(int a, int b, int n) {
int i = 0;
static char result[50];
while (i * a <= n) {
if ((n - (i * a)) % b == 0) {
sprintf(result, "x = %d, y = %d", i, (n - (i * a)) / b);
return result;
}
i++;
}
return "No solution";
}
| int main() {
assert(strcmp(func0(2, 3, 7), "x = 2, y = 1") == 0);
assert(strcmp(func0(4, 2, 7), "No solution") == 0);
assert(strcmp(func0(1, 13, 17), "x = 4, y = 1") == 0);
return 0;
}
| O3 | c | func0:
endbr64
lea 0xd89(%rip),%rax
test %edx,%edx
js 12fe <func0+0x8e>
mov %edx,%eax
mov %edx,%r11d
cltd
idiv %esi
mov %edx,%r8d
test %edx,%edx
je 12c3 <func0+0x53>
mov %r11d,%r10d
mov %edi,%ecx
xor %r8d,%r8d
sub %edi,%r10d
jmp 12b2 <func0+0x42>
nopl 0x0(%rax,%rax,1)
mov %... | func0:
endbr64
lea rax, aNoSolution; "No solution"
test edx, edx
js short locret_1308
mov eax, edx
mov r11d, edx
cdq
idiv esi
mov r8d, edx
test edx, edx
jz short loc_12D4
mov r10d, edi
mov edi, r11d
xor r8d, r8d
sub edi, r10d
mov ecx, r10d
jmp short loc_12C3
lo... | const char * func0(int a1, int a2, int a3)
{
const char *result; // rax
int v4; // r8d
int v6; // edi
int v7; // ecx
int v8; // r9d
result = "No solution";
if ( a3 >= 0 )
{
v4 = a3 % a2;
if ( a3 % a2 )
{
v4 = 0;
v6 = a3 - a1;
v7 = a1;
while ( 1 )
{
++v4... | func0:
ENDBR64
LEA RAX,[0x102004]
TEST EDX,EDX
JS 0x00101308
MOV EAX,EDX
MOV R11D,EDX
CDQ
IDIV ESI
MOV R8D,EDX
TEST EDX,EDX
JZ 0x001012d4
MOV R10D,EDI
MOV EDI,R11D
XOR R8D,R8D
SUB EDI,R10D
MOV ECX,R10D
JMP 0x001012c3
LAB_001012b0:
MOV R9D,EDI
ADD ECX,R10D
SUB EDI,R10D
MOV EAX,R9D
CDQ
IDIV ESI
TEST EDX,EDX
JZ 0x001012d7... | char * func0(int param_1,int param_2,int param_3)
{
int iVar1;
int iVar2;
ulong uVar3;
int iVar4;
if (param_3 < 0) {
return "No solution";
}
uVar3 = (long)param_3 % (long)param_2 & 0xffffffff;
iVar4 = param_3;
if ((int)((long)param_3 % (long)param_2) != 0) {
uVar3 = 0;
iVar1 = param_3 ... |
4,536 | func0 |
#include <stdio.h>
#include <stdbool.h>
#include <assert.h>
| int* func0(const int* list1, int list1_size, const int* list2, int list2_size, int* result_size) {
static int result[1000]; // Assuming maximum size of resulting array is 1000.
int index = 0;
for (int i = 0; i < list1_size; i++) {
bool found = false;
for (int j = 0; j < list2_size; j++)... | int main() {
int result_size;
const int list1[] = {1,2,3,4,5,6,7,8,9,10};
const int list2[] = {2,4,6,8};
const int list3[] = {1, 3, 5, 7};
const int list4[] = {5, 7};
int expected1[] = {1, 3, 5, 7, 9, 10};
int expected2[] = {2, 4, 6, 8, 9, 10};
int expected3[] = {1, 2, 3, 4, 6, 8... | 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,-0xc(%rbp)
movl $0x0,-0x8(%rbp)
jmpq 1228 <func0+0xbf>
movb $0x0,-0xd(%rbp)
movl $0x0,-0x4(%rbp)
jmp 11dd <func0+0x74>
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_C], 0
mov [rbp+var_8], 0
jmp loc_1228
loc_1196:
mov [rbp+var_D], 0
mov [rbp+var_4], 0
jmp short loc_11DD
loc_1... | _DWORD * func0(long long a1, int a2, long long a3, int a4, _DWORD *a5)
{
int v5; // eax
char v7; // [rsp+23h] [rbp-Dh]
int v8; // [rsp+24h] [rbp-Ch]
int i; // [rsp+28h] [rbp-8h]
int j; // [rsp+2Ch] [rbp-4h]
v8 = 0;
for ( i = 0; i < a2; ++i )
{
v7 = 0;
for ( j = 0; j < a4; ++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 + -0xc],0x0
MOV dword ptr [RBP + -0x8],0x0
JMP 0x00101228
LAB_00101196:
MOV byte ptr [RBP + -0xd],0x0
MOV ... | int1 * func0(long param_1,int param_2,long param_3,int param_4,int *param_5)
{
bool bVar1;
int local_14;
int local_10;
int local_c;
local_14 = 0;
local_10 = 0;
do {
if (param_2 <= local_10) {
*param_5 = local_14;
return result_1;
}
bVar1 = false;
for (local_c = 0; local_c <... |
4,537 | func0 |
#include <stdio.h>
#include <stdbool.h>
#include <assert.h>
| int* func0(const int* list1, int list1_size, const int* list2, int list2_size, int* result_size) {
static int result[1000]; // Assuming maximum size of resulting array is 1000.
int index = 0;
for (int i = 0; i < list1_size; i++) {
bool found = false;
for (int j = 0; j < list2_size; j++)... | int main() {
int result_size;
const int list1[] = {1,2,3,4,5,6,7,8,9,10};
const int list2[] = {2,4,6,8};
const int list3[] = {1, 3, 5, 7};
const int list4[] = {5, 7};
int expected1[] = {1, 3, 5, 7, 9, 10};
int expected2[] = {2, 4, 6, 8, 9, 10};
int expected3[] = {1, 2, 3, 4, 6, 8... | O1 | c | func0:
endbr64
push %rbx
mov %r8,%rbx
test %esi,%esi
jle 1199 <func0+0x30>
mov %rdi,%r9
lea -0x1(%rsi),%eax
lea 0x4(%rdi,%rax,4),%r10
mov %rdx,%r11
lea -0x1(%rcx),%eax
lea 0x4(%rdx,%rax,4),%rsi
mov $0x0,%edi
lea 0x2ea9(%rip),%r8
jmp 11bf <func0+0x56>
mov $0x0,%edi
mov %edi,(%r... | func0:
endbr64
push rbx
mov rbx, r8
test esi, esi
jle short loc_119C
mov r11, rdx
mov r10d, ecx
mov r9, rdi
lea eax, [rsi-1]
lea rdi, [rdi+rax*4+4]
lea eax, [rcx-1]
lea rcx, [rdx+rax*4+4]
mov esi, 0
lea r8, result_1
jmp short loc_11C2
loc_119C:
mov esi, 0
loc_11... | _DWORD * func0(_DWORD *a1, int a2, _DWORD *a3, int a4, _DWORD *a5)
{
_DWORD *v6; // r9
long long v7; // rdi
long long v8; // rcx
int v9; // esi
_DWORD *v11; // rax
if ( a2 <= 0 )
{
v9 = 0;
}
else
{
v6 = a1;
v7 = (long long)&a1[a2 - 1 + 1];
v8 = (long long)&a3[a4 - 1 + 1];
v9 = 0... | func0:
ENDBR64
PUSH RBX
MOV RBX,R8
TEST ESI,ESI
JLE 0x0010119c
MOV R11,RDX
MOV R10D,ECX
MOV R9,RDI
LEA EAX,[RSI + -0x1]
LEA RDI,[RDI + RAX*0x4 + 0x4]
LEA EAX,[RCX + -0x1]
LEA RCX,[RDX + RAX*0x4 + 0x4]
MOV ESI,0x0
LEA R8,[0x104040]
JMP 0x001011c2
LAB_0010119c:
MOV ESI,0x0
LAB_001011a1:
MOV dword ptr [RBX],ESI
LEA RAX,[0... | int4 * func0(int *param_1,int param_2,int *param_3,int param_4,int *param_5)
{
int *piVar1;
int *piVar2;
int iVar3;
if (param_2 < 1) {
iVar3 = 0;
}
else {
piVar1 = param_1 + (ulong)(param_2 - 1) + 1;
iVar3 = 0;
do {
if (0 < param_4) {
piVar2 = param_3;
do {
... |
4,538 | func0 |
#include <stdio.h>
#include <stdbool.h>
#include <assert.h>
| int* func0(const int* list1, int list1_size, const int* list2, int list2_size, int* result_size) {
static int result[1000]; // Assuming maximum size of resulting array is 1000.
int index = 0;
for (int i = 0; i < list1_size; i++) {
bool found = false;
for (int j = 0; j < list2_size; j++)... | int main() {
int result_size;
const int list1[] = {1,2,3,4,5,6,7,8,9,10};
const int list2[] = {2,4,6,8};
const int list3[] = {1, 3, 5, 7};
const int list4[] = {5, 7};
int expected1[] = {1, 3, 5, 7, 9, 10};
int expected2[] = {2, 4, 6, 8, 9, 10};
int expected3[] = {1, 2, 3, 4, 6, 8... | O2 | c | func0:
endbr64
push %rbx
mov %r8,%rbx
test %esi,%esi
jle 14be <func0+0x7e>
lea -0x1(%rsi),%eax
mov %rdi,%r9
lea 0x2be7(%rip),%r8
xor %r10d,%r10d
lea 0x4(%rdi,%rax,4),%r11
lea -0x1(%rcx),%eax
lea 0x4(%rdx,%rax,4),%rdi
nopl 0x0(%rax)
mov (%r9),%esi
mov %rdx,%rax
test %ecx,%ecx
jg ... | func0:
endbr64
push r12
test esi, esi
jle short loc_14A5
lea eax, [rsi-1]
mov r10d, ecx
mov r9, rdx
xor esi, esi
lea r11, [rdi+rax*4+4]
lea eax, [rcx-1]
lea rcx, [rdx+rax*4+4]
lea r12, result_1
nop dword ptr [rax+00000000h]
loc_1460:
mov edx, [rdi]
mov rax, r9
test ... | _DWORD * func0(int *a1, int a2, _DWORD *a3, int a4, _DWORD *a5)
{
long long v5; // rax
int v8; // esi
long long v9; // r11
long long v10; // rcx
int v11; // edx
_DWORD *v12; // rax
_DWORD *result; // rax
long long v14; // rax
if ( a2 <= 0 )
{
result = result_1;
*a5 = 0;
}
else
{
v... | func0:
ENDBR64
PUSH R12
TEST ESI,ESI
JLE 0x001014a5
LEA EAX,[RSI + -0x1]
MOV R10D,ECX
MOV R9,RDX
XOR ESI,ESI
LEA R11,[RDI + RAX*0x4 + 0x4]
LEA EAX,[RCX + -0x1]
LEA RCX,[RDX + RAX*0x4 + 0x4]
LEA R12,[0x104040]
NOP dword ptr [RAX]
LAB_00101460:
MOV EDX,dword ptr [RDI]
MOV RAX,R9
TEST R10D,R10D
JG 0x00101479
JMP 0x0010149... | int4 * func0(int *param_1,int param_2,int *param_3,int param_4,int *param_5)
{
int *piVar1;
int *piVar2;
long lVar3;
int iVar4;
if (param_2 < 1) {
*param_5 = 0;
return &result_1;
}
iVar4 = 0;
piVar1 = param_1 + (ulong)(param_2 - 1) + 1;
do {
piVar2 = param_3;
if (0 < param_4) {
... |
4,539 | func0 |
#include <stdio.h>
#include <stdbool.h>
#include <assert.h>
| int* func0(const int* list1, int list1_size, const int* list2, int list2_size, int* result_size) {
static int result[1000]; // Assuming maximum size of resulting array is 1000.
int index = 0;
for (int i = 0; i < list1_size; i++) {
bool found = false;
for (int j = 0; j < list2_size; j++)... | int main() {
int result_size;
const int list1[] = {1,2,3,4,5,6,7,8,9,10};
const int list2[] = {2,4,6,8};
const int list3[] = {1, 3, 5, 7};
const int list4[] = {5, 7};
int expected1[] = {1, 3, 5, 7, 9, 10};
int expected2[] = {2, 4, 6, 8, 9, 10};
int expected3[] = {1, 2, 3, 4, 6, 8... | O3 | c | func0:
endbr64
push %rbx
mov %r8,%rbx
test %esi,%esi
jle 14ce <func0+0x7e>
lea -0x1(%rsi),%eax
mov %rdi,%r9
lea 0x2bd7(%rip),%r8
xor %r10d,%r10d
lea 0x4(%rdi,%rax,4),%r11
lea -0x1(%rcx),%eax
lea 0x4(%rdx,%rax,4),%rdi
nopl 0x0(%rax)
mov (%r9),%esi
mov %rdx,%rax
test %ecx,%ecx
jg ... | func0:
endbr64
push rbx
mov rbx, r8
test esi, esi
jle short loc_144E
movsxd rsi, esi
movsxd rax, ecx
mov r11d, ecx
mov r9, rdx
lea r10, [rdi+rsi*4]
lea rcx, [rdx+rax*4]
xor esi, esi
lea r8, result_1
nop dword ptr [rax+00000000h]
loc_1400:
mov edx, [rdi]
test r11d, r11d... | _DWORD * func0(int *a1, int a2, _DWORD *a3, int a4, _DWORD *a5)
{
int *v7; // r10
_DWORD *v8; // rcx
long long i; // rsi
int v10; // edx
_DWORD *v11; // rax
int v12; // eax
if ( a2 <= 0 )
{
*a5 = 0;
return result_1;
}
else
{
v7 = &a1[a2];
v8 = &a3[a4];
for ( i = 0LL; ; i = v12... | func0:
ENDBR64
PUSH RBX
MOV RBX,R8
TEST ESI,ESI
JLE 0x0010144e
MOVSXD RSI,ESI
MOVSXD RAX,ECX
MOV R11D,ECX
MOV R9,RDX
LEA R10,[RDI + RSI*0x4]
LEA RCX,[RDX + RAX*0x4]
XOR ESI,ESI
LEA R8,[0x104040]
NOP dword ptr [RAX]
LAB_00101400:
MOV EDX,dword ptr [RDI]
TEST R11D,R11D
JLE 0x00101430
LAB_00101407:
MOV RAX,R9
JMP 0x001014... | int4 * func0(int *param_1,int param_2,int *param_3,int param_4,int *param_5)
{
int *piVar1;
int iVar2;
int *piVar3;
int iVar4;
long lVar5;
if (param_2 < 1) {
*param_5 = 0;
return &result_1;
}
piVar1 = param_1 + param_2;
lVar5 = 0;
while( true ) {
iVar4 = *param_1;
iVar2 = (int)lV... |
4,540 | func0 |
#include <assert.h>
| int func0(int n) {
if (n < 1) {
return 0;
} else {
return n + func0(n - 2);
}
}
| int main() {
assert(func0(6) == 12);
assert(func0(10) == 30);
assert(func0(9) == 25);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x10,%rsp
mov %edi,-0x4(%rbp)
cmpl $0x0,-0x4(%rbp)
jg 1165 <func0+0x1c>
mov $0x0,%eax
jmp 1177 <func0+0x2e>
mov -0x4(%rbp),%eax
sub $0x2,%eax
mov %eax,%edi
callq 1149 <func0>
mov -0x4(%rbp),%edx
add %edx,%eax
leaveq
retq
| func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_4], edi
cmp [rbp+var_4], 0
jg short loc_1165
mov eax, 0
jmp short locret_1177
loc_1165:
mov eax, [rbp+var_4]
sub eax, 2
mov edi, eax
call func0
mov edx, [rbp+var_4]
add eax, edx
locret_1177:
leave
retn | long long func0(int a1)
{
if ( a1 > 0 )
return a1 + (unsigned int)func0((unsigned int)(a1 - 2));
else
return 0LL;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV dword ptr [RBP + -0x4],EDI
CMP dword ptr [RBP + -0x4],0x0
JG 0x00101165
MOV EAX,0x0
JMP 0x00101177
LAB_00101165:
MOV EAX,dword ptr [RBP + -0x4]
SUB EAX,0x2
MOV EDI,EAX
CALL 0x00101149
MOV EDX,dword ptr [RBP + -0x4]
ADD EAX,EDX
LAB_00101177:
LEAVE
RET | int func0(int param_1)
{
int iVar1;
if (param_1 < 1) {
iVar1 = 0;
}
else {
iVar1 = func0(param_1 + -2);
iVar1 = iVar1 + param_1;
}
return iVar1;
} |
4,541 | func0 |
#include <assert.h>
| int func0(int n) {
if (n < 1) {
return 0;
} else {
return n + func0(n - 2);
}
}
| int main() {
assert(func0(6) == 12);
assert(func0(10) == 30);
assert(func0(9) == 25);
return 0;
}
| O1 | c | func0:
endbr64
mov $0x0,%eax
test %edi,%edi
jg 1157 <func0+0xe>
retq
push %rbx
mov %edi,%ebx
lea -0x2(%rdi),%edi
callq 1149 <func0>
add %ebx,%eax
pop %rbx
retq
| func0:
endbr64
mov eax, 0
test edi, edi
jg short loc_1157
retn
loc_1157:
push rbx
mov ebx, edi
lea edi, [rdi-2]
call func0
add eax, ebx
pop rbx
retn | long long func0(int a1)
{
long long result; // rax
result = 0LL;
if ( a1 > 0 )
return a1 + (unsigned int)func0((unsigned int)(a1 - 2));
return result;
} | func0:
ENDBR64
MOV EAX,0x0
TEST EDI,EDI
JG 0x00101157
RET
LAB_00101157:
PUSH RBX
MOV EBX,EDI
LEA EDI,[RDI + -0x2]
CALL 0x00101149
ADD EAX,EBX
POP RBX
RET | int func0(int param_1)
{
int iVar1;
if (param_1 < 1) {
return 0;
}
iVar1 = func0(param_1 + -2);
return iVar1 + param_1;
} |
4,542 | func0 |
#include <assert.h>
| int func0(int n) {
if (n < 1) {
return 0;
} else {
return n + func0(n - 2);
}
}
| int main() {
assert(func0(6) == 12);
assert(func0(10) == 30);
assert(func0(9) == 25);
return 0;
}
| O2 | c | func0:
endbr64
xor %r8d,%r8d
test %edi,%edi
jle 116e <func0+0x2e>
lea -0x2(%rdi),%eax
lea -0x1(%rdi),%edx
xor %r8d,%r8d
and $0xfffffffe,%edx
mov %eax,%ecx
sub %edx,%ecx
jmp 1163 <func0+0x23>
nopl (%rax)
sub $0x2,%eax
mov %edi,%edx
mov %eax,%edi
add %edx,%r8d
cmp %ecx,%eax
j... | func0:
endbr64
xor r8d, r8d
test edi, edi
jle short loc_116E
lea eax, [rdi-2]
lea edx, [rdi-1]
xor r8d, r8d
and edx, 0FFFFFFFEh
mov ecx, eax
sub ecx, edx
jmp short loc_1163
loc_1160:
sub eax, 2
loc_1163:
mov edx, edi
mov edi, eax
add r8d, edx
cmp eax, ecx
jnz ... | long long func0(int a1)
{
unsigned int v1; // r8d
int v2; // eax
unsigned int v3; // ecx
int v4; // edx
v1 = 0;
if ( a1 > 0 )
{
v2 = a1 - 2;
v1 = 0;
v3 = a1 - 2 - ((a1 - 1) & 0xFFFFFFFE);
while ( 1 )
{
v4 = a1;
a1 = v2;
v1 += v4;
if ( v2 == v3 )
break;... | func0:
ENDBR64
XOR R8D,R8D
TEST EDI,EDI
JLE 0x0010116e
LEA EAX,[RDI + -0x2]
LEA EDX,[RDI + -0x1]
XOR R8D,R8D
AND EDX,0xfffffffe
MOV ECX,EAX
SUB ECX,EDX
JMP 0x00101163
LAB_00101160:
SUB EAX,0x2
LAB_00101163:
MOV EDX,EDI
MOV EDI,EAX
ADD R8D,EDX
CMP EAX,ECX
JNZ 0x00101160
LAB_0010116e:
MOV EAX,R8D
RET | int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
iVar3 = 0;
if (0 < param_1) {
iVar3 = 0;
iVar2 = param_1;
for (iVar1 = param_1 + -2; iVar3 = iVar3 + iVar2,
iVar1 != (param_1 + -2) - (param_1 - 1U & 0xfffffffe); iVar1 = iVar1 + -2) {
iVar2 = iVar1;
}
}
return iVa... |
4,543 | func0 |
#include <assert.h>
| int func0(int n) {
if (n < 1) {
return 0;
} else {
return n + func0(n - 2);
}
}
| int main() {
assert(func0(6) == 12);
assert(func0(10) == 30);
assert(func0(9) == 25);
return 0;
}
| O3 | c | func0:
endbr64
test %edi,%edi
jle 11e8 <func0+0xa8>
lea -0x1(%rdi),%eax
mov %eax,%ecx
shr %ecx
add $0x1,%ecx
cmp $0x23,%eax
jbe 11eb <func0+0xab>
movd %edi,%xmm4
mov %ecx,%edx
movdqa 0xeb3(%rip),%xmm3
xor %eax,%eax
pshufd $0x0,%xmm4,%xmm1
paddd 0xe94(%rip),%xmm1
shr $0x2,%edx
pxor %... | func0:
endbr64
mov edx, edi
test edi, edi
jle loc_1220
lea eax, [rdi-1]
mov ecx, eax
shr ecx, 1
add ecx, 1
cmp eax, 13h
jbe loc_1223
movd xmm4, edi
mov esi, ecx
movdqa xmm3, cs:xmmword_2020
xor eax, eax
pshufd xmm1, xmm4, 0
paddd xmm1, cs:xmmword_2010
shr esi, 2
pxo... | long long func0(signed int a1)
{
signed int v1; // edx
unsigned int v2; // ecx
__m128i si128; // xmm3
int v4; // eax
__m128i v5; // xmm1
__m128i v6; // xmm0
__m128i v7; // xmm2
__m128i v8; // xmm0
long long result; // rax
int v10; // edx
v1 = a1;
if ( a1 <= 0 )
return 0LL;
v2 = ((unsigne... | func0:
ENDBR64
MOV EDX,EDI
TEST EDI,EDI
JLE 0x00101220
LEA EAX,[RDI + -0x1]
MOV ECX,EAX
SHR ECX,0x1
ADD ECX,0x1
CMP EAX,0x13
JBE 0x00101223
MOVD XMM4,EDI
MOV ESI,ECX
MOVDQA XMM3,xmmword ptr [0x00102020]
XOR EAX,EAX
PSHUFD XMM1,XMM4,0x0
PADDD XMM1,xmmword ptr [0x00102010]
SHR ESI,0x2
PXOR XMM0,XMM0
NOP dword ptr [RAX]
L... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int func0(int param_1)
{
uint uVar1;
int iVar2;
uint uVar3;
int iVar4;
int iVar5;
int iVar6;
int iVar7;
int iVar8;
int iVar9;
int iVar10;
if (param_1 < 1) {
return 0;
}
uVar3 = (param_1 - 1U >> 1) + 1... |
4,544 | func0 |
#include <math.h>
#include <assert.h>
| double func0(int s, double l) {
double area = s * (l * l) / (4 * tan(M_PI / s));
return area;
}
| int main() {
assert(func0(4, 20) == 400.00000000000006);
assert(func0(10, 15) == 1731.1969896610804);
assert(func0(9, 7) == 302.90938549487214);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x30,%rsp
mov %edi,-0x14(%rbp)
movsd %xmm0,-0x20(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm1
movsd -0x20(%rbp),%xmm0
mulsd %xmm0,%xmm0
mulsd %xmm0,%xmm1
movsd %xmm1,-0x28(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm1
movsd 0xf1f(%rip),%xmm0
divsd %xmm1,%xmm0
callq 1070 <tan@plt>... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_14], edi
movsd [rbp+var_20], xmm0
pxor xmm1, xmm1
cvtsi2sd xmm1, [rbp+var_14]
movsd xmm0, [rbp+var_20]
mulsd xmm0, xmm0
mulsd xmm1, xmm0
movsd [rbp+var_28], xmm1
pxor xmm1, xmm1
cvtsi2sd xmm1, [rbp+var_14]
movsd xmm0, cs:qwo... | double func0(int a1, double a2)
{
return (double)a1 * (a2 * a2) / (4.0 * tan(3.141592653589793 / (double)a1));
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV dword ptr [RBP + -0x14],EDI
MOVSD qword ptr [RBP + -0x20],XMM0
PXOR XMM1,XMM1
CVTSI2SD XMM1,dword ptr [RBP + -0x14]
MOVSD XMM0,qword ptr [RBP + -0x20]
MULSD XMM0,XMM0
MULSD XMM1,XMM0
MOVSD qword ptr [RBP + -0x28],XMM1
PXOR XMM1,XMM1
CVTSI2SD XMM1,dword ptr [RBP + -0x... | double func0(double param_1,int param_2)
{
double dVar1;
dVar1 = tan(DAT_001020a0 / (double)param_2);
return ((double)param_2 * param_1 * param_1) / (DAT_001020a8 * dVar1);
} |
4,545 | func0 |
#include <math.h>
#include <assert.h>
| double func0(int s, double l) {
double area = s * (l * l) / (4 * tan(M_PI / s));
return area;
}
| int main() {
assert(func0(4, 20) == 400.00000000000006);
assert(func0(10, 15) == 1731.1969896610804);
assert(func0(9, 7) == 302.90938549487214);
return 0;
}
| O1 | c | func0:
endbr64
sub $0x18,%rsp
movsd %xmm0,0x8(%rsp)
pxor %xmm2,%xmm2
cvtsi2sd %edi,%xmm2
movsd 0xea1(%rip),%xmm0
movsd %xmm2,(%rsp)
divsd %xmm2,%xmm0
callq 1050 <tan@plt>
movapd %xmm0,%xmm1
movsd 0x8(%rsp),%xmm0
mulsd %xmm0,%xmm0
mulsd (%rsp),%xmm0
mulsd 0xe80(%rip),%xmm1
divsd %xmm1,%xmm0
add $0x18,%... | func0:
endbr64
sub rsp, 18h
movsd [rsp+18h+var_10], xmm0
pxor xmm2, xmm2
cvtsi2sd xmm2, edi
movsd xmm0, cs:qword_2008
movsd [rsp+18h+var_18], xmm2
divsd xmm0, xmm2
call _tan
movapd xmm1, xmm0
movsd xmm0, [rsp+18h+var_10]
mulsd xmm0, xmm0
mulsd xmm0, [rsp+18h+var_18]
mulsd xmm1, cs:qword_2010
... | double func0(int a1, double a2)
{
return a2 * a2 * (double)a1 / (tan(3.141592653589793 / (double)a1) * 4.0);
} | func0:
ENDBR64
SUB RSP,0x18
MOVSD qword ptr [RSP + 0x8],XMM0
PXOR XMM2,XMM2
CVTSI2SD XMM2,EDI
MOVSD XMM0,qword ptr [0x00102008]
MOVSD qword ptr [RSP],XMM2
DIVSD XMM0,XMM2
CALL 0x00101050
MOVAPD XMM1,XMM0
MOVSD XMM0,qword ptr [RSP + 0x8]
MULSD XMM0,XMM0
MULSD XMM0,qword ptr [RSP]
MULSD XMM1,qword ptr [0x00102010]
DIVSD ... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
double func0(double param_1,int param_2)
{
double dVar1;
dVar1 = tan(DAT_00102008 / (double)param_2);
return (param_1 * param_1 * (double)param_2) / (dVar1 * _DAT_00102010);
} |
4,546 | func0 |
#include <math.h>
#include <assert.h>
| double func0(int s, double l) {
double area = s * (l * l) / (4 * tan(M_PI / s));
return area;
}
| int main() {
assert(func0(4, 20) == 400.00000000000006);
assert(func0(10, 15) == 1731.1969896610804);
assert(func0(9, 7) == 302.90938549487214);
return 0;
}
| O2 | c | func0:
endbr64
pxor %xmm2,%xmm2
sub $0x18,%rsp
cvtsi2sd %edi,%xmm2
movsd %xmm0,0x8(%rsp)
movsd 0xe8a(%rip),%xmm0
divsd %xmm2,%xmm0
movsd %xmm2,(%rsp)
callq 1050 <tan@plt>
movsd 0x8(%rsp),%xmm1
movsd (%rsp),%xmm2
mulsd 0xe71(%rip),%xmm0
add $0x18,%rsp
mulsd %xmm1,%xmm1
mulsd %xmm2,%xmm1
divsd %xmm0,%x... | func0:
endbr64
pxor xmm2, xmm2
sub rsp, 18h
cvtsi2sd xmm2, edi
movsd [rsp+18h+var_10], xmm0
movsd xmm0, cs:qword_2008
divsd xmm0, xmm2
movsd [rsp+18h+var_18], xmm2
call _tan
movsd xmm1, [rsp+18h+var_10]
movsd xmm2, [rsp+18h+var_18]
mulsd xmm0, cs:qword_2010
add rsp, 18h
mulsd xmm1, xmm1
mu... | __int128 __usercall func0@<xmm0>(int a1@<edi>, double a2@<xmm0>)
{
__int128 v2; // xmm1
v2 = *(unsigned long long *)&a2;
*(double *)&v2 = *(double *)&v2 * *(double *)&v2 * (double)a1 / (tan(3.141592653589793 / (double)a1) * 4.0);
return v2;
} | func0:
ENDBR64
PXOR XMM2,XMM2
SUB RSP,0x18
CVTSI2SD XMM2,EDI
MOVSD qword ptr [RSP + 0x8],XMM0
MOVSD XMM0,qword ptr [0x00102008]
DIVSD XMM0,XMM2
MOVSD qword ptr [RSP],XMM2
CALL 0x00101050
MOVSD XMM1,qword ptr [RSP + 0x8]
MOVSD XMM2,qword ptr [RSP]
MULSD XMM0,qword ptr [0x00102010]
ADD RSP,0x18
MULSD XMM1,XMM1
MULSD XMM1... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
double func0(double param_1,int param_2)
{
double dVar1;
dVar1 = tan(DAT_00102008 / (double)param_2);
return (param_1 * param_1 * (double)param_2) / (dVar1 * _DAT_00102010);
} |
4,547 | func0 |
#include <math.h>
#include <assert.h>
| double func0(int s, double l) {
double area = s * (l * l) / (4 * tan(M_PI / s));
return area;
}
| int main() {
assert(func0(4, 20) == 400.00000000000006);
assert(func0(10, 15) == 1731.1969896610804);
assert(func0(9, 7) == 302.90938549487214);
return 0;
}
| O3 | c | func0:
endbr64
pxor %xmm2,%xmm2
sub $0x18,%rsp
cvtsi2sd %edi,%xmm2
movsd %xmm0,0x8(%rsp)
movsd 0xe8a(%rip),%xmm0
divsd %xmm2,%xmm0
movsd %xmm2,(%rsp)
callq 1050 <tan@plt>
movsd 0x8(%rsp),%xmm1
movsd (%rsp),%xmm2
mulsd 0xe71(%rip),%xmm0
add $0x18,%rsp
mulsd %xmm1,%xmm1
mulsd %xmm2,%xmm1
divsd %xmm0,%x... | func0:
endbr64
pxor xmm2, xmm2
sub rsp, 18h
cvtsi2sd xmm2, edi
movsd [rsp+18h+var_10], xmm0
movsd xmm0, cs:qword_2008
divsd xmm0, xmm2; x
movsd [rsp+18h+var_18], xmm2
call _tan
movsd xmm1, [rsp+18h+var_10]
movsd xmm2, [rsp+18h+var_18]
mulsd xmm0, cs:qword_2010
add rsp, 18h
mulsd xmm1, xmm1... | __int128 __usercall func0@<xmm0>(int a1@<edi>, double a2@<xmm0>)
{
__int128 v2; // xmm1
v2 = *(unsigned long long *)&a2;
*(double *)&v2 = *(double *)&v2 * *(double *)&v2 * (double)a1 / (tan(3.141592653589793 / (double)a1) * 4.0);
return v2;
} | func0:
ENDBR64
PXOR XMM2,XMM2
SUB RSP,0x18
CVTSI2SD XMM2,EDI
MOVSD qword ptr [RSP + 0x8],XMM0
MOVSD XMM0,qword ptr [0x00102008]
DIVSD XMM0,XMM2
MOVSD qword ptr [RSP],XMM2
CALL 0x00101050
MOVSD XMM1,qword ptr [RSP + 0x8]
MOVSD XMM2,qword ptr [RSP]
MULSD XMM0,qword ptr [0x00102010]
ADD RSP,0x18
MULSD XMM1,XMM1
MULSD XMM1... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
double func0(double param_1,int param_2)
{
double dVar1;
dVar1 = tan(DAT_00102008 / (double)param_2);
return (param_1 * param_1 * (double)param_2) / (dVar1 * _DAT_00102010);
} |
4,548 | func0 |
#include <math.h>
#include <assert.h>
int divSum(int n) {
int sum = 1;
int i = 2;
while (i * i <= n) {
if (n % i == 0) {
sum += i + (int)floor(n / i);
}
i++;
}
return sum;
}
| int func0(int num1, int num2) {
return divSum(num1) == divSum(num2);
}
| int main() {
assert(func0(36, 57) == 0);
assert(func0(2, 4) == 0);
assert(func0(23, 47) == 1);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x8,%rsp
mov %edi,-0xc(%rbp)
mov %esi,-0x10(%rbp)
mov -0xc(%rbp),%eax
mov %eax,%edi
callq 1149 <divSum>
mov %eax,%ebx
mov -0x10(%rbp),%eax
mov %eax,%edi
callq 1149 <divSum>
cmp %eax,%ebx
sete %al
movzbl %al,%eax
add $0x8,%rsp... | func0:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 8
mov [rbp+var_C], edi
mov [rbp+var_10], esi
mov eax, [rbp+var_C]
mov edi, eax
call divSum
mov ebx, eax
mov eax, [rbp+var_10]
mov edi, eax
call divSum
cmp ebx, eax
setz al
movzx eax, al
mov rbx, [rbp+var_... | _BOOL8 func0(unsigned int a1, unsigned int a2)
{
int v2; // ebx
v2 = divSum(a1);
return v2 == (unsigned int)divSum(a2);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x8
MOV dword ptr [RBP + -0xc],EDI
MOV dword ptr [RBP + -0x10],ESI
MOV EAX,dword ptr [RBP + -0xc]
MOV EDI,EAX
CALL 0x00101149
MOV EBX,EAX
MOV EAX,dword ptr [RBP + -0x10]
MOV EDI,EAX
CALL 0x00101149
CMP EBX,EAX
SETZ AL
MOVZX EAX,AL
MOV RBX,qword ptr [RBP + -0x8]
LEAVE... | bool func0(int4 param_1,int4 param_2)
{
int iVar1;
int iVar2;
iVar1 = divSum(param_1);
iVar2 = divSum(param_2);
return iVar1 == iVar2;
} |
4,549 | func0 |
#include <math.h>
#include <assert.h>
int divSum(int n) {
int sum = 1;
int i = 2;
while (i * i <= n) {
if (n % i == 0) {
sum += i + (int)floor(n / i);
}
i++;
}
return sum;
}
| int func0(int num1, int num2) {
return divSum(num1) == divSum(num2);
}
| int main() {
assert(func0(36, 57) == 0);
assert(func0(2, 4) == 0);
assert(func0(23, 47) == 1);
return 0;
}
| O1 | c | func0:
endbr64
push %rbp
push %rbx
mov %esi,%ebp
callq 1149 <divSum>
mov %eax,%ebx
mov %ebp,%edi
callq 1149 <divSum>
cmp %eax,%ebx
sete %al
movzbl %al,%eax
pop %rbx
pop %rbp
retq
| func0:
endbr64
push rbp
push rbx
mov ebp, esi
call divSum
mov ebx, eax
mov edi, ebp
call divSum
cmp ebx, eax
setz al
movzx eax, al
pop rbx
pop rbp
retn | _BOOL8 func0(long long a1, unsigned int a2)
{
int v2; // ebx
v2 = ((long long (*)(void))divSum)();
return v2 == (unsigned int)divSum(a2);
} | func0:
ENDBR64
PUSH RBP
PUSH RBX
MOV EBP,ESI
CALL 0x00101149
MOV EBX,EAX
MOV EDI,EBP
CALL 0x00101149
CMP EBX,EAX
SETZ AL
MOVZX EAX,AL
POP RBX
POP RBP
RET | bool func0(int8 param_1,int4 param_2)
{
int iVar1;
int iVar2;
iVar1 = divSum();
iVar2 = divSum(param_2);
return iVar1 == iVar2;
} |
4,550 | func0 |
#include <math.h>
#include <assert.h>
int divSum(int n) {
int sum = 1;
int i = 2;
while (i * i <= n) {
if (n % i == 0) {
sum += i + (int)floor(n / i);
}
i++;
}
return sum;
}
| int func0(int num1, int num2) {
return divSum(num1) == divSum(num2);
}
| int main() {
assert(func0(36, 57) == 0);
assert(func0(2, 4) == 0);
assert(func0(23, 47) == 1);
return 0;
}
| O2 | c | func0:
endbr64
mov $0x1,%r8d
cmp $0x3,%edi
jle 1284 <func0+0x34>
mov $0x2,%ecx
nopl 0x0(%rax)
mov %edi,%eax
cltd
idiv %ecx
add %ecx,%eax
add %r8d,%eax
test %edx,%edx
cmove %eax,%r8d
add $0x1,%ecx
mov %ecx,%eax
imul %ecx,%eax
cmp %eax,%edi
jge 1268 <func0+0x18>
mov $0x1,%edi
... | func0:
endbr64
mov r8d, 1
cmp edi, 3
jle short loc_1294
mov ecx, 2
nop dword ptr [rax+00h]
loc_1278:
mov eax, edi
cdq
idiv ecx
add eax, ecx
add eax, r8d
test edx, edx
cmovz r8d, eax
add ecx, 1
mov eax, ecx
imul eax, ecx
cmp edi, eax
jge short loc_1278
loc_1294:... | _BOOL8 func0(int a1, int a2)
{
int v2; // r8d
int v3; // ecx
int v4; // edi
int v5; // ecx
v2 = 1;
if ( a1 > 3 )
{
v3 = 2;
do
{
if ( !(a1 % v3) )
v2 += v3 + a1 / v3;
++v3;
}
while ( a1 >= v3 * v3 );
}
v4 = 1;
if ( a2 > 3 )
{
v5 = 2;
do
{
... | func0:
ENDBR64
MOV R8D,0x1
CMP EDI,0x3
JLE 0x00101294
MOV ECX,0x2
NOP dword ptr [RAX]
LAB_00101278:
MOV EAX,EDI
CDQ
IDIV ECX
ADD EAX,ECX
ADD EAX,R8D
TEST EDX,EDX
CMOVZ R8D,EAX
ADD ECX,0x1
MOV EAX,ECX
IMUL EAX,ECX
CMP EDI,EAX
JGE 0x00101278
LAB_00101294:
MOV EDI,0x1
CMP ESI,0x3
JLE 0x001012c2
MOV ECX,0x2
NOP dword ptr [... | bool func0(int param_1,int param_2)
{
int iVar1;
int iVar2;
int iVar3;
iVar3 = 1;
if (3 < param_1) {
iVar1 = 2;
do {
if (param_1 % iVar1 == 0) {
iVar3 = param_1 / iVar1 + iVar1 + iVar3;
}
iVar1 = iVar1 + 1;
} while (iVar1 * iVar1 <= param_1);
}
iVar1 = 1;
if (3 ... |
4,551 | func0 |
#include <math.h>
#include <assert.h>
int divSum(int n) {
int sum = 1;
int i = 2;
while (i * i <= n) {
if (n % i == 0) {
sum += i + (int)floor(n / i);
}
i++;
}
return sum;
}
| int func0(int num1, int num2) {
return divSum(num1) == divSum(num2);
}
| int main() {
assert(func0(36, 57) == 0);
assert(func0(2, 4) == 0);
assert(func0(23, 47) == 1);
return 0;
}
| O3 | c | func0:
endbr64
mov $0x1,%r8d
cmp $0x3,%edi
jle 1284 <func0+0x34>
mov $0x2,%ecx
nopl 0x0(%rax)
mov %edi,%eax
cltd
idiv %ecx
add %ecx,%eax
add %r8d,%eax
test %edx,%edx
cmove %eax,%r8d
add $0x1,%ecx
mov %ecx,%eax
imul %ecx,%eax
cmp %eax,%edi
jge 1268 <func0+0x18>
mov $0x1,%edi
... | func0:
endbr64
mov r8d, 1
cmp edi, 3
jle short loc_1274
mov ecx, 2
nop dword ptr [rax+00h]
loc_1258:
mov eax, edi
cdq
idiv ecx
add eax, ecx
add eax, r8d
test edx, edx
cmovz r8d, eax
add ecx, 1
mov eax, ecx
imul eax, ecx
cmp edi, eax
jge short loc_1258
loc_1274:... | _BOOL8 func0(int a1, int a2)
{
int v2; // r8d
int v3; // ecx
int v4; // edi
int v5; // ecx
v2 = 1;
if ( a1 > 3 )
{
v3 = 2;
do
{
if ( !(a1 % v3) )
v2 += v3 + a1 / v3;
++v3;
}
while ( a1 >= v3 * v3 );
}
v4 = 1;
if ( a2 > 3 )
{
v5 = 2;
do
{
... | func0:
ENDBR64
MOV R8D,0x1
CMP EDI,0x3
JLE 0x00101274
MOV ECX,0x2
NOP dword ptr [RAX]
LAB_00101258:
MOV EAX,EDI
CDQ
IDIV ECX
ADD EAX,ECX
ADD EAX,R8D
TEST EDX,EDX
CMOVZ R8D,EAX
ADD ECX,0x1
MOV EAX,ECX
IMUL EAX,ECX
CMP EDI,EAX
JGE 0x00101258
LAB_00101274:
MOV EDI,0x1
CMP ESI,0x3
JLE 0x001012a2
MOV ECX,0x2
NOP dword ptr [... | bool func0(int param_1,int param_2)
{
int iVar1;
int iVar2;
int iVar3;
iVar3 = 1;
if (3 < param_1) {
iVar1 = 2;
do {
if (param_1 % iVar1 == 0) {
iVar3 = param_1 / iVar1 + iVar1 + iVar3;
}
iVar1 = iVar1 + 1;
} while (iVar1 * iVar1 <= param_1);
}
iVar1 = 1;
if (3 ... |
4,552 | func0 |
#include <assert.h>
#include <string.h>
| int func0(const char *str1) {
int count_chars = 0;
int length = strlen(str1);
for (int i = 0; i < length; i++) {
if ((i == (str1[i] - 'A')) || (i == (str1[i] - 'a'))) {
count_chars += 1;
}
}
return count_chars;
}
| int main() {
assert(func0("xbcefg") == 2);
assert(func0("ABcED") == 3);
assert(func0("AbgdeF") == 5);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %rdi,-0x18(%rbp)
movl $0x0,-0xc(%rbp)
mov -0x18(%rbp),%rax
mov %rax,%rdi
callq 1060 <strlen@plt>
mov %eax,-0x4(%rbp)
movl $0x0,-0x8(%rbp)
jmp 11d6 <func0+0x6d>
mov -0x8(%rbp),%eax
movslq %eax,%rdx
mov -0x18(%rbp),%rax
add %rd... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+s], rdi
mov [rbp+var_C], 0
mov rax, [rbp+s]
mov rdi, rax; s
call _strlen
mov [rbp+var_4], eax
mov [rbp+var_8], 0
jmp short loc_11D6
loc_1198:
mov eax, [rbp+var_8]
movsxd rdx, eax
mov rax, [rbp+s]
add rax, r... | long long func0(const char *a1)
{
unsigned int v2; // [rsp+14h] [rbp-Ch]
int i; // [rsp+18h] [rbp-8h]
int v4; // [rsp+1Ch] [rbp-4h]
v2 = 0;
v4 = strlen(a1);
for ( i = 0; i < v4; ++i )
{
if ( i == a1[i] - 65 || i == a1[i] - 97 )
++v2;
}
return v2;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0xc],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,RAX
CALL 0x00101060
MOV dword ptr [RBP + -0x4],EAX
MOV dword ptr [RBP + -0x8],0x0
JMP 0x001011d6
LAB_00101198:
MOV EAX,dword ptr [RBP + -0x8]
MOVSXD RDX,EAX
MOV RAX,qwo... | int func0(char *param_1)
{
size_t sVar1;
int local_14;
int local_10;
local_14 = 0;
sVar1 = strlen(param_1);
for (local_10 = 0; local_10 < (int)sVar1; local_10 = local_10 + 1) {
if ((local_10 == param_1[local_10] + -0x41) || (local_10 == param_1[local_10] + -0x61)) {
local_14 = local_14 + 1;
... |
4,553 | func0 |
#include <assert.h>
#include <string.h>
| int func0(const char *str1) {
int count_chars = 0;
int length = strlen(str1);
for (int i = 0; i < length; i++) {
if ((i == (str1[i] - 'A')) || (i == (str1[i] - 'a'))) {
count_chars += 1;
}
}
return count_chars;
}
| int main() {
assert(func0("xbcefg") == 2);
assert(func0("ABcED") == 3);
assert(func0("AbgdeF") == 5);
return 0;
}
| O1 | c | func0:
endbr64
mov %rdi,%rsi
mov $0xffffffffffffffff,%rcx
mov $0x0,%eax
repnz scas %es:(%rdi),%al
not %rcx
sub $0x1,%rcx
test %ecx,%ecx
jle 119c <func0+0x53>
lea -0x1(%rcx),%r8d
mov $0x0,%eax
mov $0x0,%edi
jmp 1188 <func0+0x3f>
add $0x1,%edi
lea 0x1(%rax),%rdx
cmp %r8,%rax
je ... | func0:
endbr64
push rbx
mov rbx, rdi
call _strlen
test eax, eax
jle short loc_11AC
lea edi, [rax-1]
mov eax, 0
mov esi, 0
jmp short loc_1198
loc_1189:
add esi, 1
loc_118C:
lea rdx, [rax+1]
cmp rax, rdi
jz short loc_11B1
mov rax, rdx
loc_1198:
movsx edx, byte ptr [... | long long func0(long long a1)
{
int v2; // eax
long long v3; // rdi
long long v4; // rax
unsigned int v5; // esi
int v6; // edx
v2 = strlen();
if ( v2 <= 0 )
{
return 0;
}
else
{
v3 = (unsigned int)(v2 - 1);
v4 = 0LL;
v5 = 0;
while ( 1 )
{
v6 = *(char *)(a1 + v4);
... | func0:
ENDBR64
PUSH RBX
MOV RBX,RDI
CALL 0x00101060
TEST EAX,EAX
JLE 0x001011ac
LEA EDI,[RAX + -0x1]
MOV EAX,0x0
MOV ESI,0x0
JMP 0x00101198
LAB_00101189:
ADD ESI,0x1
LAB_0010118c:
LEA RDX,[RAX + 0x1]
CMP RAX,RDI
JZ 0x001011b1
MOV RAX,RDX
LAB_00101198:
MOVSX EDX,byte ptr [RBX + RAX*0x1]
LEA ECX,[RDX + -0x41]
CMP ECX,EAX... | int func0(char *param_1)
{
size_t sVar1;
ulong uVar2;
int iVar3;
bool bVar4;
sVar1 = strlen(param_1);
if ((int)sVar1 < 1) {
iVar3 = 0;
}
else {
iVar3 = 0;
uVar2 = 0;
do {
if ((param_1[uVar2] + -0x41 == (int)uVar2) || (param_1[uVar2] + -0x61 == (int)uVar2)) {
iVar3 = iVa... |
4,554 | func0 |
#include <assert.h>
#include <string.h>
| int func0(const char *str1) {
int count_chars = 0;
int length = strlen(str1);
for (int i = 0; i < length; i++) {
if ((i == (str1[i] - 'A')) || (i == (str1[i] - 'a'))) {
count_chars += 1;
}
}
return count_chars;
}
| int main() {
assert(func0("xbcefg") == 2);
assert(func0("ABcED") == 3);
assert(func0("AbgdeF") == 5);
return 0;
}
| O2 | c | func0:
endbr64
push %rbx
mov %rdi,%rbx
callq 1060 <strlen@plt>
test %eax,%eax
jle 1260 <func0+0x50>
lea -0x1(%rax),%esi
xor %r8d,%r8d
xor %eax,%eax
jmp 1243 <func0+0x33>
nopl 0x0(%rax,%rax,1)
sub $0x61,%edx
cmp %eax,%edx
je 124e <func0+0x3e>
lea 0x1(%rax),%rdx
cmp %rsi,%rax
je ... | func0:
endbr64
push rbx
mov rbx, rdi
call _strlen
test eax, eax
jle short loc_1260
lea esi, [rax-1]
xor r8d, r8d
xor eax, eax
jmp short loc_1243
loc_1230:
sub edx, 61h ; 'a'
cmp edx, eax
jz short loc_124E
lea rdx, [rax+1]
cmp rax, rsi
jz short loc_125B
loc_1240... | long long func0(long long a1)
{
int v1; // eax
long long v2; // rsi
unsigned int v3; // r8d
long long i; // rax
long long v5; // rdx
int v6; // edx
v1 = strlen();
if ( v1 > 0 )
{
v2 = (unsigned int)(v1 - 1);
v3 = 0;
for ( i = 0LL; ; i = v5 )
{
v6 = *(char *)(a1 + i);
if (... | func0:
ENDBR64
PUSH RBX
MOV RBX,RDI
CALL 0x00101060
TEST EAX,EAX
JLE 0x00101260
LEA ESI,[RAX + -0x1]
XOR R8D,R8D
XOR EAX,EAX
JMP 0x00101243
LAB_00101230:
SUB EDX,0x61
CMP EDX,EAX
JZ 0x0010124e
LEA RDX,[RAX + 0x1]
CMP RAX,RSI
JZ 0x0010125b
LAB_00101240:
MOV RAX,RDX
LAB_00101243:
MOVSX EDX,byte ptr [RBX + RAX*0x1]
LEA EC... | int func0(char *param_1)
{
size_t sVar1;
ulong uVar2;
int iVar3;
sVar1 = strlen(param_1);
if ((int)sVar1 < 1) {
return 0;
}
iVar3 = 0;
uVar2 = 0;
while( true ) {
if ((param_1[uVar2] + -0x41 == (int)uVar2) || (param_1[uVar2] + -0x61 == (int)uVar2)) {
iVar3 = iVar3 + 1;
}
if (u... |
4,555 | func0 |
#include <assert.h>
#include <string.h>
| int func0(const char *str1) {
int count_chars = 0;
int length = strlen(str1);
for (int i = 0; i < length; i++) {
if ((i == (str1[i] - 'A')) || (i == (str1[i] - 'a'))) {
count_chars += 1;
}
}
return count_chars;
}
| int main() {
assert(func0("xbcefg") == 2);
assert(func0("ABcED") == 3);
assert(func0("AbgdeF") == 5);
return 0;
}
| O3 | c | func0:
endbr64
push %rbx
mov %rdi,%rbx
sub $0x10,%rsp
callq 1060 <strlen@plt>
test %eax,%eax
jle 1420 <func0+0x210>
mov %rax,%rdi
mov %eax,%esi
lea -0x1(%rax),%eax
cmp $0xe,%eax
jbe 142c <func0+0x21c>
movdqa 0xe5e(%rip),%xmm2
mov %edi,%ecx
mov %rbx,%rdx
movdqa 0xea0(%rip),%xmm11
movdq... | func0:
endbr64
push rbx
mov rbx, rdi
call _strlen
test eax, eax
jle loc_16F0
mov rcx, rax
lea eax, [rax-1]
cmp eax, 0Eh
jbe loc_16F4
mov edx, ecx
pxor xmm2, xmm2
pxor xmm15, xmm15
mov rax, rbx
shr edx, 4
movdqa xmm5, xmm2
movdqa xmm11, cs:xmmword_2080
movdqa xmm10, ... | long long func0(const char *a1)
{
int v2; // eax
int v3; // ecx
const __m128i *v4; // rax
__m128i si128; // xmm11
__m128i v6; // xmm10
__m128i v7; // xmm4
__m128i v8; // xmm9
__m128i v9; // xmm8
__m128i v10; // xmm0
__m128i v11; // xmm7
__m128i v12; // xmm2
__m128i v13; // xmm3
__m128i v14; /... | func0:
ENDBR64
PUSH RBX
MOV RBX,RDI
CALL 0x00101060
TEST EAX,EAX
JLE 0x001016f0
MOV RCX,RAX
LEA EAX,[RAX + -0x1]
CMP EAX,0xe
JBE 0x001016f4
MOV EDX,ECX
PXOR XMM2,XMM2
PXOR XMM15,XMM15
MOV RAX,RBX
SHR EDX,0x4
MOVDQA XMM5,XMM2
MOVDQA XMM11,xmmword ptr [0x00102080]
MOVDQA XMM10,xmmword ptr [0x001020d0]
SHL RDX,0x4
MOVDQA ... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int func0(int (*param_1) [16])
{
ulong uVar1;
int auVar2 [14];
int auVar3 [12];
unkbyte10 Var4;
int auVar5 [12];
int auVar6 [16];
int auVar7 [16];
int auVar8 [16];
int auVar9 [14];
int auVar10 [12];
int auVar11 ... |
4,556 | func0 |
#include <assert.h>
| int func0(int A[], int N) {
int evenPair = 0;
for (int i = 0; i < N; i++) {
for (int j = i + 1; j < N; j++) {
if ((A[i] ^ A[j]) % 2 == 0) {
evenPair++;
}
}
}
return evenPair;
}
| int main() {
int arr1[] = {5, 4, 7, 2, 1};
assert(func0(arr1, 5) == 4);
int arr2[] = {7, 2, 8, 1, 0, 5, 11};
assert(func0(arr2, 7) == 9);
int arr3[] = {1, 2, 3};
assert(func0(arr3, 3) == 1);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
movl $0x0,-0xc(%rbp)
movl $0x0,-0x8(%rbp)
jmp 11dc <func0+0x73>
mov -0x8(%rbp),%eax
add $0x1,%eax
mov %eax,-0x4(%rbp)
jmp 11d0 <func0+0x67>
mov -0x8(%rbp),%eax
cltq
lea 0x0(,%rax,4),%rdx
mov -0x18(%rb... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_C], 0
mov [rbp+var_8], 0
jmp short loc_11DC
loc_1188:
mov eax, [rbp+var_8]
add eax, 1
mov [rbp+var_4], eax
jmp short loc_11D0
loc_1193:
mov eax, [rbp+var_8]
cdqe
lea rdx, ds:0... | long long func0(long long a1, int a2)
{
unsigned int v3; // [rsp+10h] [rbp-Ch]
int i; // [rsp+14h] [rbp-8h]
int j; // [rsp+18h] [rbp-4h]
v3 = 0;
for ( i = 0; i < a2; ++i )
{
for ( j = i + 1; j < a2; ++j )
{
if ( (((unsigned __int8)*(_DWORD *)(4LL * i + a1) ^ (unsigned __int8)*(_DWORD *)(4LL ... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0xc],0x0
MOV dword ptr [RBP + -0x8],0x0
JMP 0x001011dc
LAB_00101188:
MOV EAX,dword ptr [RBP + -0x8]
ADD EAX,0x1
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001011d0
LAB_00101193:
MOV EAX,dword ptr [RBP + -... | int func0(long param_1,int param_2)
{
int4 local_14;
int4 local_10;
int4 local_c;
local_14 = 0;
for (local_10 = 0; local_c = local_10, local_10 < param_2; local_10 = local_10 + 1) {
while (local_c = local_c + 1, local_c < param_2) {
if (((*(uint *)(param_1 + (long)local_c * 4) ^ *(uint *)(param_... |
4,557 | func0 |
#include <assert.h>
| int func0(int A[], int N) {
int evenPair = 0;
for (int i = 0; i < N; i++) {
for (int j = i + 1; j < N; j++) {
if ((A[i] ^ A[j]) % 2 == 0) {
evenPair++;
}
}
}
return evenPair;
}
| int main() {
int arr1[] = {5, 4, 7, 2, 1};
assert(func0(arr1, 5) == 4);
int arr2[] = {7, 2, 8, 1, 0, 5, 11};
assert(func0(arr2, 7) == 9);
int arr3[] = {1, 2, 3};
assert(func0(arr3, 3) == 1);
return 0;
}
| O1 | c | func0:
endbr64
test %esi,%esi
jle 11ae <func0+0x45>
lea -0x1(%rsi),%r10d
add $0x1,%r10
mov $0x1,%r9d
mov $0x0,%ecx
cmp %r10,%r9
je 11b3 <func0+0x4a>
mov -0x4(%rdi,%r9,4),%r8d
mov %r9,%rax
mov %r8d,%edx
xor (%rdi,%rax,4),%edx
and $0x1,%edx
cmp $0x1,%edx
adc $0x0,%ecx
add $... | func0:
endbr64
test esi, esi
jle short loc_11A9
mov r10d, esi
mov r9d, 1
mov ecx, 0
loc_117F:
cmp r9, r10
jz short loc_11AE
mov r8d, [rdi+r9*4-4]
mov rax, r9
loc_118C:
mov edx, r8d
xor edx, [rdi+rax*4]
and edx, 1
cmp edx, 1
adc ecx, 0
add rax, 1
cmp esi, e... | long long func0(long long a1, int a2)
{
long long v2; // r9
unsigned int v3; // ecx
long long v4; // rax
if ( a2 <= 0 )
{
return 0;
}
else
{
v2 = 1LL;
v3 = 0;
while ( v2 != a2 )
{
v4 = v2;
do
v3 += ((*(_DWORD *)(a1 + 4 * v4++) ^ *(_DWORD *)(a1 + 4 * v2 - 4)) & 1... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x001011a9
MOV R10D,ESI
MOV R9D,0x1
MOV ECX,0x0
LAB_0010117f:
CMP R9,R10
JZ 0x001011ae
MOV R8D,dword ptr [RDI + R9*0x4 + -0x4]
MOV RAX,R9
LAB_0010118c:
MOV EDX,R8D
XOR EDX,dword ptr [RDI + RAX*0x4]
AND EDX,0x1
CMP EDX,0x1
ADC ECX,0x0
ADD RAX,0x1
CMP ESI,EAX
JG 0x0010118c
ADD R9,0x1
JMP 0... | int func0(long param_1,uint param_2)
{
ulong uVar1;
int iVar2;
ulong uVar3;
if ((int)param_2 < 1) {
iVar2 = 0;
}
else {
iVar2 = 0;
for (uVar3 = 1; uVar3 != param_2; uVar3 = uVar3 + 1) {
uVar1 = uVar3;
do {
iVar2 = iVar2 + (uint)(((*(uint *)(param_1 + -4 + uVar3 * 4) ^
... |
4,558 | func0 |
#include <assert.h>
| int func0(int A[], int N) {
int evenPair = 0;
for (int i = 0; i < N; i++) {
for (int j = i + 1; j < N; j++) {
if ((A[i] ^ A[j]) % 2 == 0) {
evenPair++;
}
}
}
return evenPair;
}
| int main() {
int arr1[] = {5, 4, 7, 2, 1};
assert(func0(arr1, 5) == 4);
int arr2[] = {7, 2, 8, 1, 0, 5, 11};
assert(func0(arr2, 7) == 9);
int arr3[] = {1, 2, 3};
assert(func0(arr3, 3) == 1);
return 0;
}
| O2 | c | func0:
endbr64
test %esi,%esi
jle 13b4 <func0+0x54>
lea -0x1(%rsi),%r10d
mov $0x1,%r9d
xor %r8d,%r8d
add $0x1,%r10
cmp %r10,%r9
je 13b0 <func0+0x50>
xchg %ax,%ax
mov -0x4(%rdi,%r9,4),%ecx
mov %r9,%rax
nopl 0x0(%rax,%rax,1)
mov (%rdi,%rax,4),%edx
xor %ecx,%edx
and $0x1,%edx
cmp... | func0:
endbr64
test esi, esi
jle short loc_1304
movsxd r10, esi
mov r9d, 1
xor r8d, r8d
cmp r9, r10
jz short loc_1300
nop dword ptr [rax+00000000h]
loc_12D0:
mov ecx, [rdi+r9*4-4]
mov rax, r9
nop dword ptr [rax+rax+00000000h]
loc_12E0:
mov edx, [rdi+rax*4]
xor edx, ecx
a... | long long func0(long long a1, int a2)
{
long long v2; // r9
unsigned int i; // r8d
long long v4; // rax
if ( a2 <= 0 )
return 0LL;
v2 = 1LL;
for ( i = 0; v2 != a2; ++v2 )
{
v4 = v2;
do
i += (((unsigned __int8)*(_DWORD *)(a1 + 4 * v2 - 4) ^ (unsigned __int8)*(_DWORD *)(a1 + 4 * v4++)) &... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x00101304
MOVSXD R10,ESI
MOV R9D,0x1
XOR R8D,R8D
CMP R9,R10
JZ 0x00101300
NOP dword ptr [RAX]
LAB_001012d0:
MOV ECX,dword ptr [RDI + R9*0x4 + -0x4]
MOV RAX,R9
NOP dword ptr [RAX + RAX*0x1]
LAB_001012e0:
MOV EDX,dword ptr [RDI + RAX*0x4]
XOR EDX,ECX
AND EDX,0x1
CMP EDX,0x1
ADC R8D,0x0
AD... | int func0(long param_1,int param_2)
{
long lVar1;
int iVar2;
long lVar3;
if (0 < param_2) {
lVar3 = 1;
iVar2 = 0;
if ((long)param_2 != 1) {
do {
lVar1 = lVar3;
do {
iVar2 = iVar2 + (uint)(((*(uint *)(param_1 + lVar1 * 4) ^
*(uint ... |
4,559 | func0 |
#include <assert.h>
| int func0(int A[], int N) {
int evenPair = 0;
for (int i = 0; i < N; i++) {
for (int j = i + 1; j < N; j++) {
if ((A[i] ^ A[j]) % 2 == 0) {
evenPair++;
}
}
}
return evenPair;
}
| int main() {
int arr1[] = {5, 4, 7, 2, 1};
assert(func0(arr1, 5) == 4);
int arr2[] = {7, 2, 8, 1, 0, 5, 11};
assert(func0(arr2, 7) == 9);
int arr3[] = {1, 2, 3};
assert(func0(arr3, 3) == 1);
return 0;
}
| O3 | c | func0:
endbr64
test %esi,%esi
jle 148f <func0+0x14f>
cmp $0x1,%esi
je 148f <func0+0x14f>
push %r14
lea 0x4(%rdi),%r10
xor %r8d,%r8d
mov $0x1,%ecx
movdqa 0xd25(%rip),%xmm4
push %rbp
mov $0x1,%r11d
pxor %xmm3,%xmm3
push %rbx
lea -0x1(%rsi),%ebx
nopw 0x0(%rax,%rax,1)
mov %esi,%ebp
m... | func0:
endbr64
test esi, esi
jle loc_127A
mov r8d, esi
cmp esi, 1
jz loc_127A
push r14
mov r11, rdi
lea r10, [rdi+4]
mov ecx, 1
movdqa xmm4, cs:xmmword_2010
push rbp
xor edi, edi
lea ebp, [rsi-1]
push rbx
pxor xmm3, xmm3
mov ebx, 1
xchg ax, ax
loc_1180:
mov ... | long long func0(long long a1, int a2)
{
const __m128i *v4; // r10
int v5; // ecx
__m128i si128; // xmm4
unsigned int v7; // edi
int v8; // ebp
unsigned int v9; // esi
unsigned int v10; // r9d
__m128i v11; // xmm1
const __m128i *v12; // rax
__m128i v13; // xmm2
__m128i v14; // xmm0
__m128i v15; ... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x0010127a
MOV R8D,ESI
CMP ESI,0x1
JZ 0x0010127a
PUSH R14
MOV R11,RDI
LEA R10,[RDI + 0x4]
MOV ECX,0x1
MOVDQA XMM4,xmmword ptr [0x00102010]
PUSH RBP
XOR EDI,EDI
LEA EBP,[RSI + -0x1]
PUSH RBX
PXOR XMM3,XMM3
MOV EBX,0x1
NOP
LAB_00101180:
MOV R9D,R8D
MOV EAX,EBP
MOV ESI,dword ptr [R10 + -0x4... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int func0(long param_1,int param_2)
{
long lVar1;
uint uVar2;
uint uVar3;
uint uVar4;
uint *puVar5;
uint *puVar6;
uint *puVar7;
uint *puVar8;
int iVar9;
int iVar10;
uint *puVar11;
int iVar12;
int iVar13;
i... |
4,560 | func0 |
#include <assert.h>
| int func0(int n) {
int count = 0;
if (n && !(n & (n - 1))) {
return n;
}
while (n != 0) {
n >>= 1;
count += 1;
}
return 1 << count;
}
| int main() {
assert(func0(0) == 1);
assert(func0(5) == 8);
assert(func0(17) == 32);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
movl $0x0,-0x4(%rbp)
cmpl $0x0,-0x14(%rbp)
je 117a <func0+0x31>
mov -0x14(%rbp),%eax
sub $0x1,%eax
and -0x14(%rbp),%eax
test %eax,%eax
jne 117a <func0+0x31>
mov -0x14(%rbp),%eax
jmp 118e <func0+0x45>
sarl -0x14(%rbp)
addl ... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_4], 0
cmp [rbp+var_14], 0
jz short loc_117A
mov eax, [rbp+var_14]
sub eax, 1
and eax, [rbp+var_14]
test eax, eax
jnz short loc_117A
mov eax, [rbp+var_14]
jmp short loc_118E
loc_1173:
sar [rbp+v... | long long func0(unsigned int a1)
{
int v2; // [rsp+0h] [rbp-14h]
char v3; // [rsp+10h] [rbp-4h]
v2 = a1;
v3 = 0;
if ( a1 && (a1 & (a1 - 1)) == 0 )
return a1;
while ( v2 )
{
v2 >>= 1;
++v3;
}
return (unsigned int)(1 << v3);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x4],0x0
CMP dword ptr [RBP + -0x14],0x0
JZ 0x0010117a
MOV EAX,dword ptr [RBP + -0x14]
SUB EAX,0x1
AND EAX,dword ptr [RBP + -0x14]
TEST EAX,EAX
JNZ 0x0010117a
MOV EAX,dword ptr [RBP + -0x14]
JMP 0x0010118e
LAB_00101173:
SAR dword ... | uint func0(uint param_1)
{
byte bVar1;
int4 local_1c;
bVar1 = 0;
local_1c = param_1;
if ((param_1 == 0) || ((param_1 - 1 & param_1) != 0)) {
for (; local_1c != 0; local_1c = (int)local_1c >> 1) {
bVar1 = bVar1 + 1;
}
param_1 = 1 << (bVar1 & 0x1f);
}
return param_1;
} |
4,561 | func0 |
#include <assert.h>
| int func0(int n) {
int count = 0;
if (n && !(n & (n - 1))) {
return n;
}
while (n != 0) {
n >>= 1;
count += 1;
}
return 1 << count;
}
| int main() {
assert(func0(0) == 1);
assert(func0(5) == 8);
assert(func0(17) == 32);
return 0;
}
| O1 | c | func0:
endbr64
test %edi,%edi
je 1166 <func0+0x1d>
lea -0x1(%rdi),%edx
mov %edi,%eax
test %edi,%edx
je 116f <func0+0x26>
mov $0x0,%edi
add $0x1,%edi
sar %eax
jne 115f <func0+0x16>
mov $0x1,%eax
mov %edi,%ecx
shl %cl,%eax
retq
| func0:
endbr64
test edi, edi
jz short loc_1166
lea edx, [rdi-1]
mov eax, edi
test edx, edi
jz short locret_116F
mov edi, 0
loc_115F:
add edi, 1
sar eax, 1
jnz short loc_115F
loc_1166:
mov eax, 1
mov ecx, edi
shl eax, cl
locret_116F:
retn | long long func0(unsigned int a1)
{
long long result; // rax
if ( a1 )
{
result = a1;
if ( (a1 & (a1 - 1)) == 0 )
return result;
LOBYTE(a1) = 0;
do
{
LOBYTE(a1) = a1 + 1;
LODWORD(result) = (int)result >> 1;
}
while ( (_DWORD)result );
}
return (unsigned int)(1 <<... | func0:
ENDBR64
TEST EDI,EDI
JZ 0x00101166
LEA EDX,[RDI + -0x1]
MOV EAX,EDI
TEST EDX,EDI
JZ 0x0010116f
MOV EDI,0x0
LAB_0010115f:
ADD EDI,0x1
SAR EAX,0x1
JNZ 0x0010115f
LAB_00101166:
MOV EAX,0x1
MOV ECX,EDI
SHL EAX,CL
LAB_0010116f:
RET | uint func0(uint param_1)
{
uint uVar1;
uint uVar2;
if (param_1 != 0) {
if ((param_1 - 1 & param_1) == 0) {
return param_1;
}
uVar2 = 0;
uVar1 = param_1;
do {
param_1 = uVar2 + 1;
uVar1 = (int)uVar1 >> 1;
uVar2 = param_1;
} while (uVar1 != 0);
}
return 1 << (... |
4,562 | func0 |
#include <assert.h>
| int func0(int n) {
int count = 0;
if (n && !(n & (n - 1))) {
return n;
}
while (n != 0) {
n >>= 1;
count += 1;
}
return 1 << count;
}
| int main() {
assert(func0(0) == 1);
assert(func0(5) == 8);
assert(func0(17) == 32);
return 0;
}
| O2 | c | func0:
endbr64
mov $0x1,%eax
test %edi,%edi
je 116e <func0+0x2e>
lea -0x1(%rdi),%edx
mov %edi,%eax
test %edi,%edx
je 116e <func0+0x2e>
xor %ecx,%ecx
nopl 0x0(%rax,%rax,1)
add $0x1,%ecx
sar %edi
jne 1160 <func0+0x20>
mov $0x1,%eax
shl %cl,%eax
retq
| func0:
endbr64
mov eax, 1
test edi, edi
jz short locret_116E
lea edx, [rdi-1]
mov eax, edi
test edx, edi
jz short locret_116E
xor ecx, ecx
nop dword ptr [rax+rax+00000000h]
loc_1160:
add ecx, 1
sar edi, 1
jnz short loc_1160
mov eax, 1
shl eax, cl
locret_116E:
retn | long long func0(int a1)
{
long long result; // rax
char v2; // cl
result = 1LL;
if ( a1 )
{
result = (unsigned int)a1;
if ( (a1 & (a1 - 1)) != 0 )
{
v2 = 0;
do
{
++v2;
a1 >>= 1;
}
while ( a1 );
return (unsigned int)(1 << v2);
}
}
return... | func0:
ENDBR64
MOV EAX,0x1
TEST EDI,EDI
JZ 0x0010116e
LEA EDX,[RDI + -0x1]
MOV EAX,EDI
TEST EDX,EDI
JZ 0x0010116e
XOR ECX,ECX
NOP dword ptr [RAX + RAX*0x1]
LAB_00101160:
ADD ECX,0x1
SAR EDI,0x1
JNZ 0x00101160
MOV EAX,0x1
SHL EAX,CL
LAB_0010116e:
RET | uint func0(uint param_1)
{
uint uVar1;
byte bVar2;
uVar1 = 1;
if ((param_1 != 0) && (uVar1 = param_1, (param_1 - 1 & param_1) != 0)) {
bVar2 = 0;
do {
bVar2 = bVar2 + 1;
param_1 = (int)param_1 >> 1;
} while (param_1 != 0);
uVar1 = 1 << (bVar2 & 0x1f);
}
return uVar1;
} |
4,563 | func0 |
#include <assert.h>
| int func0(int n) {
int count = 0;
if (n && !(n & (n - 1))) {
return n;
}
while (n != 0) {
n >>= 1;
count += 1;
}
return 1 << count;
}
| int main() {
assert(func0(0) == 1);
assert(func0(5) == 8);
assert(func0(17) == 32);
return 0;
}
| O3 | c | func0:
endbr64
mov $0x1,%eax
test %edi,%edi
je 116e <func0+0x2e>
lea -0x1(%rdi),%edx
mov %edi,%eax
test %edi,%edx
je 116e <func0+0x2e>
xor %ecx,%ecx
nopl 0x0(%rax,%rax,1)
add $0x1,%ecx
sar %edi
jne 1160 <func0+0x20>
mov $0x1,%eax
shl %cl,%eax
retq
| func0:
endbr64
mov eax, 1
test edi, edi
jz short locret_116E
lea edx, [rdi-1]
mov eax, edi
test edx, edi
jz short locret_116E
xor ecx, ecx
nop dword ptr [rax+rax+00000000h]
loc_1160:
add ecx, 1
sar edi, 1
jnz short loc_1160
mov eax, 1
shl eax, cl
locret_116E:
retn | long long func0(int a1)
{
long long result; // rax
char v2; // cl
result = 1LL;
if ( a1 )
{
result = (unsigned int)a1;
if ( (a1 & (a1 - 1)) != 0 )
{
v2 = 0;
do
{
++v2;
a1 >>= 1;
}
while ( a1 );
return (unsigned int)(1 << v2);
}
}
return... | func0:
ENDBR64
MOV EAX,0x1
TEST EDI,EDI
JZ 0x0010116e
LEA EDX,[RDI + -0x1]
MOV EAX,EDI
TEST EDX,EDI
JZ 0x0010116e
XOR ECX,ECX
NOP dword ptr [RAX + RAX*0x1]
LAB_00101160:
ADD ECX,0x1
SAR EDI,0x1
JNZ 0x00101160
MOV EAX,0x1
SHL EAX,CL
LAB_0010116e:
RET | uint func0(uint param_1)
{
uint uVar1;
byte bVar2;
uVar1 = 1;
if ((param_1 != 0) && (uVar1 = param_1, (param_1 - 1 & param_1) != 0)) {
bVar2 = 0;
do {
bVar2 = bVar2 + 1;
param_1 = (int)param_1 >> 1;
} while (param_1 != 0);
uVar1 = 1 << (bVar2 & 0x1f);
}
return uVar1;
} |
4,564 | func0 |
#include <assert.h>
| int func0(int a[], int n, int x) {
int count = 0;
for (int i = 0; i < n; i++) {
if (a[i] == x) count++;
}
return count;
}
| int main() {
int arr1[] = {1, 2, 3};
assert(func0(arr1, 3, 4) == 0);
int arr2[] = {1, 2, 2, 3, 3, 3, 4};
assert(func0(arr2, 7, 3) == 3);
int arr3[] = {0, 1, 2, 3, 1, 2};
assert(func0(arr3, 6, 1) == 2);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
mov %edx,-0x20(%rbp)
movl $0x0,-0x8(%rbp)
movl $0x0,-0x4(%rbp)
jmp 11ae <func0+0x45>
mov -0x4(%rbp),%eax
cltq
lea 0x0(,%rax,4),%rdx
mov -0x18(%rbp),%rax
add %rdx,%rax
mov (%rax),%eax
cmp %eax,-0x20(%r... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_20], edx
mov [rbp+var_8], 0
mov [rbp+var_4], 0
jmp short loc_11AE
loc_118B:
mov eax, [rbp+var_4]
cdqe
lea rdx, ds:0[rax*4]
mov rax, [rbp+var_18]
add rax, rdx
mov eax, [rax]
cm... | long long func0(long long a1, int a2, int a3)
{
unsigned int v4; // [rsp+18h] [rbp-8h]
int i; // [rsp+1Ch] [rbp-4h]
v4 = 0;
for ( i = 0; i < a2; ++i )
{
if ( a3 == *(_DWORD *)(4LL * i + a1) )
++v4;
}
return v4;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0x20],EDX
MOV dword ptr [RBP + -0x8],0x0
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001011ae
LAB_0010118b:
MOV EAX,dword ptr [RBP + -0x4]
CDQE
LEA RDX,[RAX*0x4]
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,RDX... | int func0(long param_1,int param_2,int param_3)
{
int4 local_10;
int4 local_c;
local_10 = 0;
for (local_c = 0; local_c < param_2; local_c = local_c + 1) {
if (param_3 == *(int *)(param_1 + (long)local_c * 4)) {
local_10 = local_10 + 1;
}
}
return local_10;
} |
4,565 | func0 |
#include <assert.h>
| int func0(int a[], int n, int x) {
int count = 0;
for (int i = 0; i < n; i++) {
if (a[i] == x) count++;
}
return count;
}
| int main() {
int arr1[] = {1, 2, 3};
assert(func0(arr1, 3, 4) == 0);
int arr2[] = {1, 2, 2, 3, 3, 3, 4};
assert(func0(arr2, 7, 3) == 3);
int arr3[] = {0, 1, 2, 3, 1, 2};
assert(func0(arr3, 6, 1) == 2);
return 0;
}
| O1 | c | func0:
endbr64
test %esi,%esi
jle 1199 <func0+0x30>
mov %rdi,%rax
lea -0x1(%rsi),%ecx
lea 0x4(%rdi,%rcx,4),%rdi
mov $0x0,%ecx
cmp %edx,(%rax)
sete %sil
movzbl %sil,%esi
add %esi,%ecx
add $0x4,%rax
cmp %rdi,%rax
jne 1181 <func0+0x18>
mov %ecx,%eax
retq
mov $0x0,%ecx
jmp 1196 <f... | func0:
endbr64
test esi, esi
jle short loc_1199
mov rax, rdi
lea ecx, [rsi-1]
lea rdi, [rdi+rcx*4+4]
mov ecx, 0
loc_1181:
cmp [rax], edx
setz sil
movzx esi, sil
add ecx, esi
add rax, 4
cmp rax, rdi
jnz short loc_1181
loc_1196:
mov eax, ecx
retn
loc_1199:
mov ecx, ... | long long func0(_DWORD *a1, int a2, int a3)
{
_DWORD *v3; // rax
long long v4; // rdi
unsigned int v5; // ecx
if ( a2 <= 0 )
{
return 0;
}
else
{
v3 = a1;
v4 = (long long)&a1[a2 - 1 + 1];
v5 = 0;
do
v5 += *v3++ == a3;
while ( v3 != (_DWORD *)v4 );
}
return v5;
} | func0:
ENDBR64
TEST ESI,ESI
JLE 0x00101199
MOV RAX,RDI
LEA ECX,[RSI + -0x1]
LEA RDI,[RDI + RCX*0x4 + 0x4]
MOV ECX,0x0
LAB_00101181:
CMP dword ptr [RAX],EDX
SETZ SIL
MOVZX ESI,SIL
ADD ECX,ESI
ADD RAX,0x4
CMP RAX,RDI
JNZ 0x00101181
LAB_00101196:
MOV EAX,ECX
RET
LAB_00101199:
MOV ECX,0x0
JMP 0x00101196 | int func0(int *param_1,int param_2,int param_3)
{
int *piVar1;
int iVar2;
if (param_2 < 1) {
iVar2 = 0;
}
else {
piVar1 = param_1 + (ulong)(param_2 - 1) + 1;
iVar2 = 0;
do {
iVar2 = iVar2 + (uint)(*param_1 == param_3);
param_1 = param_1 + 1;
} while (param_1 != piVar1);
}... |
4,566 | func0 |
#include <assert.h>
| int func0(int a[], int n, int x) {
int count = 0;
for (int i = 0; i < n; i++) {
if (a[i] == x) count++;
}
return count;
}
| int main() {
int arr1[] = {1, 2, 3};
assert(func0(arr1, 3, 4) == 0);
int arr2[] = {1, 2, 2, 3, 3, 3, 4};
assert(func0(arr2, 7, 3) == 3);
int arr3[] = {0, 1, 2, 3, 1, 2};
assert(func0(arr3, 6, 1) == 2);
return 0;
}
| O2 | c | func0:
endbr64
test %esi,%esi
jle 12d0 <func0+0x30>
lea -0x1(%rsi),%eax
lea 0x4(%rdi,%rax,4),%rsi
xor %eax,%eax
nopw 0x0(%rax,%rax,1)
xor %ecx,%ecx
cmp %edx,(%rdi)
sete %cl
add $0x4,%rdi
add %ecx,%eax
cmp %rsi,%rdi
jne 12b8 <func0+0x18>
retq
nopl 0x0(%rax,%rax,1)
xor %eax,%eax
r... | func0:
endbr64
test esi, esi
jle short loc_12D0
lea eax, [rsi-1]
lea rsi, [rdi+rax*4+4]
xor eax, eax
nop word ptr [rax+rax+00h]
loc_12B8:
xor ecx, ecx
cmp [rdi], edx
setz cl
add rdi, 4
add eax, ecx
cmp rdi, rsi
jnz short loc_12B8
retn
loc_12D0:
xor eax, eax
retn | long long func0(_DWORD *a1, int a2, int a3)
{
long long v3; // rsi
long long result; // rax
BOOL v5; // ecx
if ( a2 <= 0 )
return 0LL;
v3 = (long long)&a1[a2 - 1 + 1];
LODWORD(result) = 0;
do
{
v5 = *a1++ == a3;
result = (unsigned int)(v5 + result);
}
while ( a1 != (_DWORD *)v3 );
re... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x001012d0
LEA EAX,[RSI + -0x1]
LEA RSI,[RDI + RAX*0x4 + 0x4]
XOR EAX,EAX
NOP word ptr [RAX + RAX*0x1]
LAB_001012b8:
XOR ECX,ECX
CMP dword ptr [RDI],EDX
SETZ CL
ADD RDI,0x4
ADD EAX,ECX
CMP RDI,RSI
JNZ 0x001012b8
RET
LAB_001012d0:
XOR EAX,EAX
RET | int func0(int *param_1,int param_2,int param_3)
{
int *piVar1;
int iVar2;
int iVar3;
if (0 < param_2) {
piVar1 = param_1 + (ulong)(param_2 - 1) + 1;
iVar3 = 0;
do {
iVar2 = *param_1;
param_1 = param_1 + 1;
iVar3 = iVar3 + (uint)(iVar2 == param_3);
} while (param_1 != piVar1... |
4,567 | func0 |
#include <assert.h>
| int func0(int a[], int n, int x) {
int count = 0;
for (int i = 0; i < n; i++) {
if (a[i] == x) count++;
}
return count;
}
| int main() {
int arr1[] = {1, 2, 3};
assert(func0(arr1, 3, 4) == 0);
int arr2[] = {1, 2, 2, 3, 3, 3, 4};
assert(func0(arr2, 7, 3) == 3);
int arr3[] = {0, 1, 2, 3, 1, 2};
assert(func0(arr3, 6, 1) == 2);
return 0;
}
| O3 | c | func0:
endbr64
test %esi,%esi
jle 1378 <func0+0xe8>
lea -0x1(%rsi),%eax
cmp $0x3,%eax
jbe 137b <func0+0xeb>
mov %esi,%ecx
movd %edx,%xmm3
pxor %xmm0,%xmm0
mov %rdi,%rax
shr $0x2,%ecx
pshufd $0x0,%xmm3,%xmm2
shl $0x4,%rcx
add %rdi,%rcx
nopl 0x0(%rax)
movdqu (%rax),%xmm1
add $0x10,%r... | func0:
endbr64
test esi, esi
jle loc_1210
lea eax, [rsi-1]
cmp eax, 2
jbe loc_1213
mov ecx, esi
movd xmm3, edx
pxor xmm0, xmm0
mov rax, rdi
shr ecx, 2
pshufd xmm2, xmm3, 0
shl rcx, 4
add rcx, rdi
nop dword ptr [rax+00h]
loc_1178:
movdqu xmm1, xmmword ptr [rax]
add ... | long long func0(const __m128i *a1, int a2, unsigned int a3)
{
__m128i v3; // xmm0
const __m128i *v4; // rax
__m128i v5; // xmm2
__m128i v6; // xmm1
int v7; // ecx
__m128i v8; // xmm0
long long result; // rax
long long v10; // r9
if ( a2 <= 0 )
return 0LL;
if ( (unsigned int)(a2 - 1) <= 2 )
{... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x00101210
LEA EAX,[RSI + -0x1]
CMP EAX,0x2
JBE 0x00101213
MOV ECX,ESI
MOVD XMM3,EDX
PXOR XMM0,XMM0
MOV RAX,RDI
SHR ECX,0x2
PSHUFD XMM2,XMM3,0x0
SHL RCX,0x4
ADD RCX,RDI
NOP dword ptr [RAX]
LAB_00101178:
MOVDQU XMM1,xmmword ptr [RAX]
ADD RAX,0x10
PCMPEQD XMM1,XMM2
PSUBD XMM0,XMM1
CMP RCX,... | int func0(int *param_1,uint param_2,int param_3)
{
int iVar1;
int *piVar2;
int *piVar3;
int *piVar4;
int *piVar5;
uint uVar6;
int iVar7;
int iVar8;
int iVar9;
int iVar10;
if ((int)param_2 < 1) {
return 0;
}
if (param_2 - 1 < 3) {
uVar6 = 0;
iVar7 = 0;
}
else {
iVar7 = 0... |
4,568 | func0 |
#include <assert.h>
| int func0(int n) {
if (n <= 2) {
return n;
}
int a = 1;
int b = 2;
int c;
for (int i = 3; i <= n; i++) {
c = 2 * b + a;
a = b;
b = c;
}
return b;
}
| int main() {
assert(func0(4) == 12);
assert(func0(7) == 169);
assert(func0(8) == 408);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
cmpl $0x2,-0x14(%rbp)
jg 115f <func0+0x16>
mov -0x14(%rbp),%eax
jmp 119f <func0+0x56>
movl $0x1,-0x10(%rbp)
movl $0x2,-0xc(%rbp)
movl $0x3,-0x8(%rbp)
jmp 1194 <func0+0x4b>
mov -0xc(%rbp),%eax
lea (%rax,%rax,1),%edx
mov -0x... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
cmp [rbp+var_14], 2
jg short loc_115F
mov eax, [rbp+var_14]
jmp short loc_119F
loc_115F:
mov [rbp+var_10], 1
mov [rbp+var_C], 2
mov [rbp+var_8], 3
jmp short loc_1194
loc_1176:
mov eax, [rbp+var_C]
lea edx, [ra... | long long func0(int a1)
{
int v2; // [rsp+4h] [rbp-10h]
unsigned int v3; // [rsp+8h] [rbp-Ch]
int i; // [rsp+Ch] [rbp-8h]
unsigned int v5; // [rsp+10h] [rbp-4h]
if ( a1 <= 2 )
return (unsigned int)a1;
v2 = 1;
v3 = 2;
for ( i = 3; i <= a1; ++i )
{
v5 = 2 * v3 + v2;
v2 = v3;
v3 = v5;
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
CMP dword ptr [RBP + -0x14],0x2
JG 0x0010115f
MOV EAX,dword ptr [RBP + -0x14]
JMP 0x0010119f
LAB_0010115f:
MOV dword ptr [RBP + -0x10],0x1
MOV dword ptr [RBP + -0xc],0x2
MOV dword ptr [RBP + -0x8],0x3
JMP 0x00101194
LAB_00101176:
MOV EAX,dword ptr [RBP... | int func0(int param_1)
{
int iVar1;
int4 local_18;
int4 local_14;
int4 local_10;
local_14 = param_1;
if (2 < param_1) {
local_18 = 1;
local_14 = 2;
for (local_10 = 3; local_10 <= param_1; local_10 = local_10 + 1) {
iVar1 = local_18 + local_14 * 2;
local_18 = local_14;
local... |
4,569 | func0 |
#include <assert.h>
| int func0(int n) {
if (n <= 2) {
return n;
}
int a = 1;
int b = 2;
int c;
for (int i = 3; i <= n; i++) {
c = 2 * b + a;
a = b;
b = c;
}
return b;
}
| int main() {
assert(func0(4) == 12);
assert(func0(7) == 169);
assert(func0(8) == 408);
return 0;
}
| O1 | c | func0:
endbr64
mov %edi,%eax
cmp $0x2,%edi
jle 1174 <func0+0x2b>
add $0x1,%edi
mov $0x3,%edx
mov $0x2,%eax
mov $0x1,%ecx
mov %eax,%esi
lea (%rcx,%rax,2),%eax
add $0x1,%edx
mov %esi,%ecx
cmp %edi,%edx
jne 1166 <func0+0x1d>
retq
| func0:
endbr64
mov eax, edi
cmp edi, 2
jle short locret_1174
add edi, 1
mov edx, 3
mov eax, 2
mov ecx, 1
loc_1166:
mov esi, eax
lea eax, [rcx+rax*2]
add edx, 1
mov ecx, esi
cmp edx, edi
jnz short loc_1166
locret_1174:
retn | long long func0(int a1)
{
long long result; // rax
int v2; // edi
int v3; // edx
int v4; // ecx
int v5; // esi
result = (unsigned int)a1;
if ( a1 > 2 )
{
v2 = a1 + 1;
v3 = 3;
LODWORD(result) = 2;
v4 = 1;
do
{
v5 = result;
result = (unsigned int)(v4 + 2 * result);
... | func0:
ENDBR64
MOV EAX,EDI
CMP EDI,0x2
JLE 0x00101174
ADD EDI,0x1
MOV EDX,0x3
MOV EAX,0x2
MOV ECX,0x1
LAB_00101166:
MOV ESI,EAX
LEA EAX,[RCX + RAX*0x2]
ADD EDX,0x1
MOV ECX,ESI
CMP EDX,EDI
JNZ 0x00101166
LAB_00101174:
RET | int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
if (2 < param_1) {
iVar4 = param_1 + 1;
iVar3 = 3;
iVar2 = 1;
iVar1 = 2;
do {
param_1 = iVar2 + iVar1 * 2;
iVar3 = iVar3 + 1;
iVar2 = iVar1;
iVar1 = param_1;
} while (iVar3 != iVar4);
}
... |
4,570 | func0 |
#include <assert.h>
| int func0(int n) {
if (n <= 2) {
return n;
}
int a = 1;
int b = 2;
int c;
for (int i = 3; i <= n; i++) {
c = 2 * b + a;
a = b;
b = c;
}
return b;
}
| int main() {
assert(func0(4) == 12);
assert(func0(7) == 169);
assert(func0(8) == 408);
return 0;
}
| O2 | c | func0:
endbr64
mov %edi,%r8d
cmp $0x2,%edi
jle 11d0 <func0+0x30>
add $0x1,%edi
mov $0x3,%eax
mov $0x1,%ecx
mov $0x2,%edx
jmp 11c3 <func0+0x23>
mov %r8d,%edx
add $0x1,%eax
lea (%rcx,%rdx,2),%r8d
mov %edx,%ecx
cmp %eax,%edi
jne 11c0 <func0+0x20>
mov %r8d,%eax
retq
nopw %cs:0... | func0:
endbr64
mov r8d, edi
cmp edi, 2
jle short loc_11D0
add edi, 1
mov eax, 3
mov ecx, 1
mov edx, 2
jmp short loc_11C3
loc_11C0:
mov edx, r8d
loc_11C3:
add eax, 1
lea r8d, [rcx+rdx*2]
mov ecx, edx
cmp eax, edi
jnz short loc_11C0
loc_11D0:
mov eax, r8d
retn | long long func0(int a1)
{
unsigned int v1; // r8d
int v2; // edi
int v3; // eax
int v4; // ecx
int i; // edx
v1 = a1;
if ( a1 > 2 )
{
v2 = a1 + 1;
v3 = 3;
v4 = 1;
for ( i = 2; ; i = v1 )
{
++v3;
v1 = v4 + 2 * i;
v4 = i;
if ( v3 == v2 )
break;
}
... | func0:
ENDBR64
MOV R8D,EDI
CMP EDI,0x2
JLE 0x001011d0
ADD EDI,0x1
MOV EAX,0x3
MOV ECX,0x1
MOV EDX,0x2
JMP 0x001011c3
LAB_001011c0:
MOV EDX,R8D
LAB_001011c3:
ADD EAX,0x1
LEA R8D,[RCX + RDX*0x2]
MOV ECX,EDX
CMP EAX,EDI
JNZ 0x001011c0
LAB_001011d0:
MOV EAX,R8D
RET | int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
if (2 < param_1) {
iVar4 = param_1 + 1;
iVar1 = 3;
iVar2 = 1;
iVar3 = 2;
do {
iVar1 = iVar1 + 1;
param_1 = iVar2 + iVar3 * 2;
iVar2 = iVar3;
iVar3 = param_1;
} while (iVar1 != iVar4);
}
... |
4,571 | func0 |
#include <assert.h>
| int func0(int n) {
if (n <= 2) {
return n;
}
int a = 1;
int b = 2;
int c;
for (int i = 3; i <= n; i++) {
c = 2 * b + a;
a = b;
b = c;
}
return b;
}
| int main() {
assert(func0(4) == 12);
assert(func0(7) == 169);
assert(func0(8) == 408);
return 0;
}
| O3 | c | func0:
endbr64
mov %edi,%r8d
cmp $0x2,%edi
jle 1170 <func0+0x30>
add $0x1,%edi
mov $0x3,%eax
mov $0x1,%ecx
mov $0x2,%edx
jmp 1163 <func0+0x23>
mov %r8d,%edx
add $0x1,%eax
lea (%rcx,%rdx,2),%r8d
mov %edx,%ecx
cmp %edi,%eax
jne 1160 <func0+0x20>
mov %r8d,%eax
retq
nopw %cs:0... | func0:
endbr64
mov ecx, edi
cmp edi, 2
jle short loc_116E
add edi, 1
mov eax, 3
mov esi, 1
mov edx, 2
jmp short loc_1162
loc_1160:
mov edx, ecx
loc_1162:
add eax, 1
lea ecx, [rsi+rdx*2]
mov esi, edx
cmp edi, eax
jnz short loc_1160
loc_116E:
mov eax, ecx
retn | long long func0(int a1)
{
unsigned int v1; // ecx
int v2; // edi
int v3; // eax
int v4; // esi
int i; // edx
v1 = a1;
if ( a1 > 2 )
{
v2 = a1 + 1;
v3 = 3;
v4 = 1;
for ( i = 2; ; i = v1 )
{
++v3;
v1 = v4 + 2 * i;
v4 = i;
if ( v2 == v3 )
break;
}
... | func0:
ENDBR64
MOV ECX,EDI
CMP EDI,0x2
JLE 0x0010116e
ADD EDI,0x1
MOV EAX,0x3
MOV ESI,0x1
MOV EDX,0x2
JMP 0x00101162
LAB_00101160:
MOV EDX,ECX
LAB_00101162:
ADD EAX,0x1
LEA ECX,[RSI + RDX*0x2]
MOV ESI,EDX
CMP EDI,EAX
JNZ 0x00101160
LAB_0010116e:
MOV EAX,ECX
RET | int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
if (2 < param_1) {
iVar4 = param_1 + 1;
iVar1 = 3;
iVar3 = 1;
iVar2 = 2;
do {
iVar1 = iVar1 + 1;
param_1 = iVar3 + iVar2 * 2;
iVar3 = iVar2;
iVar2 = param_1;
} while (iVar4 != iVar1);
}
... |
4,572 | func0 | #include <assert.h>
| int func0(int list1[], int m, int n) {
int sum_range = 0;
for (int i = m; i <= n; i++) {
sum_range += list1[i];
}
return sum_range;
}
| int main() {
int list1[] = {2, 1, 5, 6, 8, 3, 4, 9, 10, 11, 8, 12};
assert(func0(list1, 8, 10) == 29);
assert(func0(list1, 5, 7) == 16);
assert(func0(list1, 7, 10) == 38);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
mov %edx,-0x20(%rbp)
movl $0x0,-0x8(%rbp)
mov -0x1c(%rbp),%eax
mov %eax,-0x4(%rbp)
jmp 11a7 <func0+0x3e>
mov -0x4(%rbp),%eax
cltq
lea 0x0(,%rax,4),%rdx
mov -0x18(%rbp),%rax
add %rdx,%rax
mov (%rax),%... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_20], edx
mov [rbp+var_8], 0
mov eax, [rbp+var_1C]
mov [rbp+var_4], eax
jmp short loc_11A7
loc_118A:
mov eax, [rbp+var_4]
cdqe
lea rdx, ds:0[rax*4]
mov rax, [rbp+var_18]
add ra... | long long func0(long long a1, int a2, int a3)
{
unsigned int v4; // [rsp+18h] [rbp-8h]
v4 = 0;
while ( a2 <= a3 )
v4 += *(_DWORD *)(4LL * a2++ + a1);
return v4;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0x20],EDX
MOV dword ptr [RBP + -0x8],0x0
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001011a7
LAB_0010118a:
MOV EAX,dword ptr [RBP + -0x4]
CDQE
LEA RDX,[RAX*0x4]
MOV RAX,qwo... | int func0(long param_1,int param_2,int param_3)
{
int4 local_10;
int4 local_c;
local_10 = 0;
for (local_c = param_2; local_c <= param_3; local_c = local_c + 1) {
local_10 = local_10 + *(int *)(param_1 + (long)local_c * 4);
}
return local_10;
} |
4,573 | func0 | #include <assert.h>
| int func0(int list1[], int m, int n) {
int sum_range = 0;
for (int i = m; i <= n; i++) {
sum_range += list1[i];
}
return sum_range;
}
| int main() {
int list1[] = {2, 1, 5, 6, 8, 3, 4, 9, 10, 11, 8, 12};
assert(func0(list1, 8, 10) == 29);
assert(func0(list1, 5, 7) == 16);
assert(func0(list1, 7, 10) == 38);
return 0;
}
| O1 | c | func0:
endbr64
cmp %edx,%esi
jg 1195 <func0+0x2c>
movslq %esi,%rcx
lea (%rdi,%rcx,4),%rax
sub %esi,%edx
add %rcx,%rdx
lea 0x4(%rdi,%rdx,4),%rcx
mov $0x0,%edx
add (%rax),%edx
add $0x4,%rax
cmp %rcx,%rax
jne 1187 <func0+0x1e>
mov %edx,%eax
retq
mov $0x0,%edx
jmp 1192 <func0+0x29... | func0:
endbr64
cmp esi, edx
jg short loc_1195
movsxd rcx, esi
lea rax, [rdi+rcx*4]
sub edx, esi
add rdx, rcx
lea rcx, [rdi+rdx*4+4]
mov edx, 0
loc_1187:
add edx, [rax]
add rax, 4
cmp rax, rcx
jnz short loc_1187
loc_1192:
mov eax, edx
retn
loc_1195:
mov edx, 0
jmp ... | long long func0(long long a1, int a2, int a3)
{
_DWORD *v3; // rax
unsigned long long v4; // rcx
unsigned int v5; // edx
if ( a2 > a3 )
{
return 0;
}
else
{
v3 = (_DWORD *)(a1 + 4LL * a2);
v4 = a1 + 4 * (a2 + (unsigned long long)(unsigned int)(a3 - a2)) + 4;
v5 = 0;
do
v5 += ... | func0:
ENDBR64
CMP ESI,EDX
JG 0x00101195
MOVSXD RCX,ESI
LEA RAX,[RDI + RCX*0x4]
SUB EDX,ESI
ADD RDX,RCX
LEA RCX,[RDI + RDX*0x4 + 0x4]
MOV EDX,0x0
LAB_00101187:
ADD EDX,dword ptr [RAX]
ADD RAX,0x4
CMP RAX,RCX
JNZ 0x00101187
LAB_00101192:
MOV EAX,EDX
RET
LAB_00101195:
MOV EDX,0x0
JMP 0x00101192 | int func0(long param_1,int param_2,int param_3)
{
int *piVar1;
int iVar2;
if (param_3 < param_2) {
iVar2 = 0;
}
else {
piVar1 = (int *)(param_1 + (long)param_2 * 4);
iVar2 = 0;
do {
iVar2 = iVar2 + *piVar1;
piVar1 = piVar1 + 1;
} while (piVar1 != (int *)(param_1 + 4 + ((ulo... |
4,574 | func0 | #include <assert.h>
| int func0(int list1[], int m, int n) {
int sum_range = 0;
for (int i = m; i <= n; i++) {
sum_range += list1[i];
}
return sum_range;
}
| int main() {
int list1[] = {2, 1, 5, 6, 8, 3, 4, 9, 10, 11, 8, 12};
assert(func0(list1, 8, 10) == 29);
assert(func0(list1, 5, 7) == 16);
assert(func0(list1, 7, 10) == 38);
return 0;
}
| O2 | c | func0:
endbr64
cmp %edx,%esi
jg 1170 <func0+0x30>
movslq %esi,%rcx
sub %esi,%edx
xor %r8d,%r8d
add %rcx,%rdx
lea (%rdi,%rcx,4),%rax
lea 0x4(%rdi,%rdx,4),%rdx
nopl 0x0(%rax)
add (%rax),%r8d
add $0x4,%rax
cmp %rdx,%rax
jne 1160 <func0+0x20>
mov %r8d,%eax
retq
xor %r8d,%r8d
mov ... | func0:
endbr64
cmp esi, edx
jg short loc_1170
movsxd rcx, esi
sub edx, esi
xor r8d, r8d
add rdx, rcx
lea rax, [rdi+rcx*4]
lea rdx, [rdi+rdx*4+4]
nop dword ptr [rax+00h]
loc_1160:
add r8d, [rax]
add rax, 4
cmp rax, rdx
jnz short loc_1160
mov eax, r8d
retn
loc_1170:
x... | long long func0(long long a1, int a2, int a3)
{
unsigned int v3; // r8d
_DWORD *v4; // rax
unsigned long long v5; // rdx
if ( a2 > a3 )
return 0LL;
v3 = 0;
v4 = (_DWORD *)(a1 + 4LL * a2);
v5 = a1 + 4 * (a2 + (unsigned long long)(unsigned int)(a3 - a2)) + 4;
do
v3 += *v4++;
while ( v4 != (_DW... | func0:
ENDBR64
CMP ESI,EDX
JG 0x00101170
MOVSXD RCX,ESI
SUB EDX,ESI
XOR R8D,R8D
ADD RDX,RCX
LEA RAX,[RDI + RCX*0x4]
LEA RDX,[RDI + RDX*0x4 + 0x4]
NOP dword ptr [RAX]
LAB_00101160:
ADD R8D,dword ptr [RAX]
ADD RAX,0x4
CMP RAX,RDX
JNZ 0x00101160
MOV EAX,R8D
RET
LAB_00101170:
XOR R8D,R8D
MOV EAX,R8D
RET | int func0(long param_1,int param_2,int param_3)
{
int *piVar1;
int iVar2;
if (param_2 <= param_3) {
iVar2 = 0;
piVar1 = (int *)(param_1 + (long)param_2 * 4);
do {
iVar2 = iVar2 + *piVar1;
piVar1 = piVar1 + 1;
} while (piVar1 != (int *)(param_1 + 4 + ((ulong)(uint)(param_3 - param_2... |
4,575 | func0 | #include <assert.h>
| int func0(int list1[], int m, int n) {
int sum_range = 0;
for (int i = m; i <= n; i++) {
sum_range += list1[i];
}
return sum_range;
}
| int main() {
int list1[] = {2, 1, 5, 6, 8, 3, 4, 9, 10, 11, 8, 12};
assert(func0(list1, 8, 10) == 29);
assert(func0(list1, 5, 7) == 16);
assert(func0(list1, 7, 10) == 38);
return 0;
}
| O3 | c | func0:
endbr64
cmp %edx,%esi
jg 11f0 <func0+0xb0>
mov %edx,%eax
lea 0x1(%rdx),%r8d
sub %esi,%eax
sub %esi,%r8d
cmp $0x3,%eax
jbe 11f9 <func0+0xb9>
mov %r8d,%ecx
movslq %esi,%rax
pxor %xmm0,%xmm0
shr $0x2,%ecx
lea (%rdi,%rax,4),%rax
shl $0x4,%rcx
add %rax,%rcx
nopl 0x0(%rax,%r... | func0:
endbr64
mov ecx, esi
mov esi, edx
cmp ecx, edx
jg loc_11E0
mov eax, edx
sub eax, ecx
lea r8d, [rax+1]
cmp eax, 2
jbe loc_11E3
mov edx, r8d
movsxd rax, ecx
pxor xmm0, xmm0
shr edx, 2
lea rax, [rdi+rax*4]
shl rdx, 4
add rdx, rax
nop dword ptr [rax+00... | long long func0(long long a1, int a2, int a3)
{
unsigned int v5; // r8d
__m128i v6; // xmm0
const __m128i *v7; // rax
const __m128i *v8; // rdx
__m128i v9; // xmm2
__m128i v10; // xmm0
long long result; // rax
long long v12; // r8
if ( a2 > a3 )
return 0LL;
v5 = a3 - a2 + 1;
if ( (unsigned i... | func0:
ENDBR64
MOV ECX,ESI
MOV ESI,EDX
CMP ECX,EDX
JG 0x001011e0
MOV EAX,EDX
SUB EAX,ECX
LEA R8D,[RAX + 0x1]
CMP EAX,0x2
JBE 0x001011e3
MOV EDX,R8D
MOVSXD RAX,ECX
PXOR XMM0,XMM0
SHR EDX,0x2
LEA RAX,[RDI + RAX*0x4]
SHL RDX,0x4
ADD RDX,RAX
NOP dword ptr [RAX]
LAB_00101180:
MOVDQU XMM2,xmmword ptr [RAX]
ADD RAX,0x10
PADDD... | int func0(long param_1,int param_2,int param_3)
{
uint uVar1;
long lVar2;
int iVar3;
int *piVar4;
int *piVar5;
int *piVar6;
int *piVar7;
int *piVar8;
int iVar9;
int iVar10;
int iVar11;
int iVar12;
if (param_3 < param_2) {
iVar9 = 0;
}
else {
uVar1 = (param_3 - param_2) + 1;
... |
4,576 | func0 |
#include <assert.h>
#include <math.h>
| double func0(double a) {
double perimeter = 5 * a;
return perimeter;
}
| int main() {
assert(func0(5) == 25);
assert(func0(10) == 50);
assert(func0(15) == 75);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
movsd %xmm0,-0x18(%rbp)
movsd -0x18(%rbp),%xmm1
movsd 0xf15(%rip),%xmm0
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 xmm1, [rbp+var_18]
movsd xmm0, cs:qword_2060
mulsd xmm0, xmm1
movsd [rbp+var_8], xmm0
movsd xmm0, [rbp+var_8]
pop rbp
retn | double func0(double a1)
{
return 5.0 * a1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOVSD qword ptr [RBP + -0x18],XMM0
MOVSD XMM1,qword ptr [RBP + -0x18]
MOVSD XMM0,qword ptr [0x00102060]
MULSD XMM0,XMM1
MOVSD qword ptr [RBP + -0x8],XMM0
MOVSD XMM0,qword ptr [RBP + -0x8]
POP RBP
RET | double func0(double param_1)
{
return DAT_00102060 * param_1;
} |
4,577 | func0 |
#include <assert.h>
#include <math.h>
| double func0(double a) {
double perimeter = 5 * a;
return perimeter;
}
| int main() {
assert(func0(5) == 25);
assert(func0(10) == 50);
assert(func0(15) == 75);
return 0;
}
| O1 | c | func0:
endbr64
mulsd 0xed3(%rip),%xmm0
retq
| func0:
endbr64
mulsd xmm0, cs:qword_2008
retn | double func0(double a1)
{
return a1 * 5.0;
} | func0:
ENDBR64
MULSD XMM0,qword ptr [0x00102008]
RET | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
double func0(double param_1)
{
return param_1 * _DAT_00102008;
} |
4,578 | func0 |
#include <assert.h>
#include <math.h>
| double func0(double a) {
double perimeter = 5 * a;
return perimeter;
}
| int main() {
assert(func0(5) == 25);
assert(func0(10) == 50);
assert(func0(15) == 75);
return 0;
}
| O2 | c | func0:
endbr64
mulsd 0xebc(%rip),%xmm0
retq
nopl (%rax)
| func0:
endbr64
mulsd xmm0, cs:qword_2008
retn | double func0(double a1)
{
return a1 * 5.0;
} | func0:
ENDBR64
MULSD XMM0,qword ptr [0x00102008]
RET | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
double func0(double param_1)
{
return param_1 * _DAT_00102008;
} |
4,579 | func0 |
#include <assert.h>
#include <math.h>
| double func0(double a) {
double perimeter = 5 * a;
return perimeter;
}
| int main() {
assert(func0(5) == 25);
assert(func0(10) == 50);
assert(func0(15) == 75);
return 0;
}
| O3 | c | func0:
endbr64
mulsd 0xebc(%rip),%xmm0
retq
nopl (%rax)
| func0:
endbr64
mulsd xmm0, cs:qword_2008
retn | double func0(double a1)
{
return a1 * 5.0;
} | func0:
ENDBR64
MULSD XMM0,qword ptr [0x00102008]
RET | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
double func0(double param_1)
{
return param_1 * _DAT_00102008;
} |
4,580 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(const char* s) {
int count = 0;
int i;
int len = 0;
while(s[len] != '\0') {
len++;
}
for (i = 0; i < len - 2; i++) {
if (s[i] == 's' && s[i + 1] == 't' && s[i + 2] == 'd') {
count++;
}
}
return count;
}
| int main() {
assert(func0("letstdlenstdporstd") == 3);
assert(func0("truststdsolensporsd") == 1);
assert(func0("makestdsostdworthit") == 2);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
movl $0x0,-0xc(%rbp)
movl $0x0,-0x4(%rbp)
jmp 1169 <func0+0x20>
addl $0x1,-0x4(%rbp)
mov -0x4(%rbp),%eax
movslq %eax,%rdx
mov -0x18(%rbp),%rax
add %rdx,%rax
movzbl (%rax),%eax
test %al,%al
jne 1165 <func0+0x1c>
movl $0x0,-0x8(%... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_C], 0
mov [rbp+var_4], 0
jmp short loc_1169
loc_1165:
add [rbp+var_4], 1
loc_1169:
mov eax, [rbp+var_4]
movsxd rdx, eax
mov rax, [rbp+var_18]
add rax, rdx
movzx eax, byte ptr [rax]
test al, al
jnz sh... | long long func0(long long a1)
{
unsigned int v2; // [rsp+Ch] [rbp-Ch]
int j; // [rsp+10h] [rbp-8h]
int i; // [rsp+14h] [rbp-4h]
v2 = 0;
for ( i = 0; *(_BYTE *)(i + a1); ++i )
;
for ( j = 0; j < i - 2; ++j )
{
if ( *(_BYTE *)(j + a1) == 115 && *(_BYTE *)(j + 1LL + a1) == 116 && *(_BYTE *)(j + 2LL... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0xc],0x0
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00101169
LAB_00101165:
ADD dword ptr [RBP + -0x4],0x1
LAB_00101169:
MOV EAX,dword ptr [RBP + -0x4]
MOVSXD RDX,EAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,RDX
MOVZX EAX,byte ptr [RAX]
T... | int func0(long param_1)
{
int4 local_14;
int4 local_10;
int4 local_c;
local_14 = 0;
for (local_c = 0; *(char *)(param_1 + local_c) != '\0'; local_c = local_c + 1) {
}
for (local_10 = 0; local_10 < local_c + -2; local_10 = local_10 + 1) {
if (((*(char *)(param_1 + local_10) == 's') && (*(char *)(pa... |
4,581 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(const char* s) {
int count = 0;
int i;
int len = 0;
while(s[len] != '\0') {
len++;
}
for (i = 0; i < len - 2; i++) {
if (s[i] == 's' && s[i + 1] == 't' && s[i + 2] == 'd') {
count++;
}
}
return count;
}
| int main() {
assert(func0("letstdlenstdporstd") == 3);
assert(func0("truststdsolensporsd") == 1);
assert(func0("makestdsostdworthit") == 2);
return 0;
}
| O1 | c | func0:
endbr64
cmpb $0x0,(%rdi)
je 119c <func0+0x53>
mov $0x0,%eax
mov %eax,%ecx
add $0x1,%rax
cmpb $0x0,(%rdi,%rax,1)
jne 1157 <func0+0xe>
cmp $0x1,%ecx
jle 11a4 <func0+0x5b>
mov %rdi,%rax
lea -0x2(%rcx),%edx
lea 0x1(%rdi,%rdx,1),%rcx
mov $0x0,%esi
jmp 1183 <func0+0x3a>
add ... | func0:
endbr64
cmp byte ptr [rdi], 0
jz short loc_119C
mov eax, 0
loc_1157:
mov ecx, eax
add rax, 1
cmp byte ptr [rdi+rax], 0
jnz short loc_1157
cmp ecx, 1
jle short loc_11A4
mov rax, rdi
lea edx, [rcx-2]
lea rcx, [rdi+rdx+1]
mov esi, 0
jmp short loc_1183
loc_117... | long long func0(_BYTE *a1)
{
long long v1; // rax
int v2; // ecx
_BYTE *v3; // rax
long long v4; // rcx
unsigned int v5; // esi
if ( *a1 )
{
v1 = 0LL;
do
v2 = v1++;
while ( a1[v1] );
if ( v2 <= 1 )
{
return 0;
}
else
{
v3 = a1;
v4 = (long long)&a1[... | func0:
ENDBR64
CMP byte ptr [RDI],0x0
JZ 0x0010119c
MOV EAX,0x0
LAB_00101157:
MOV ECX,EAX
ADD RAX,0x1
CMP byte ptr [RDI + RAX*0x1],0x0
JNZ 0x00101157
CMP ECX,0x1
JLE 0x001011a4
MOV RAX,RDI
LEA EDX,[RCX + -0x2]
LEA RCX,[RDI + RDX*0x1 + 0x1]
MOV ESI,0x0
JMP 0x00101183
LAB_0010117a:
ADD RAX,0x1
CMP RAX,RCX
JZ 0x001011a1
L... | int func0(char *param_1)
{
char *pcVar1;
long lVar2;
long lVar3;
int iVar4;
if (*param_1 == '\0') {
iVar4 = 0;
}
else {
lVar3 = 0;
do {
lVar2 = lVar3;
lVar3 = lVar2 + 1;
} while (param_1[lVar3] != '\0');
iVar4 = (int)lVar2;
if (iVar4 < 2) {
iVar4 = 0;
}
... |
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.