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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
3,982 | func0 |
#include <assert.h>
#include <stdbool.h>
| int func0(int nums[], int length) {
bool exists[1001] = {false}; // Assuming numbers are within 1 to 1000
int no_duplicate = -1;
for (int i = 0; i < length; i++) {
if (exists[nums[i]]) {
return nums[i];
} else {
exists[nums[i]] = true;
}
}
... | int main() {
int arr1[] = {1, 2, 3, 4, 4, 5};
int arr2[] = {1, 2, 3, 4};
int arr3[] = {1, 1, 2, 3, 3, 2, 2};
assert(func0(arr1, 6) == 4);
assert(func0(arr2, 4) == -1);
assert(func0(arr3, 7) == 1);
return 0;
}
| O2 | c | func0:
endbr64
sub $0x408,%rsp
mov %rdi,%rdx
mov $0x7d,%ecx
mov %fs:0x28,%rax
mov %rax,0x3f8(%rsp)
xor %eax,%eax
mov %rsp,%rdi
rep stos %rax,%es:(%rdi)
movb $0x0,(%rdi)
test %esi,%esi
jle 1330 <func0+0x80>
lea -0x1(%rsi),%eax
mov %rdx,%rdi
lea 0x4(%rdx,%rax,4),%rdx
jmp 12fd <func... | func0:
endbr64
sub rsp, 408h
mov rdx, rdi
mov ecx, 7Dh ; '}'
mov rax, fs:28h
mov [rsp+408h+var_10], rax
xor eax, eax
mov rdi, rsp
rep stosq
mov byte ptr [rdi], 0
test esi, esi
jle short loc_1330
lea eax, [rsi-1]
mov rdi, rdx
lea rdx, [rdx+rax*4+4]
jmp short loc_12F... | long long func0(int *a1, int a2)
{
long long v2; // rdx
long long v3; // rax
unsigned int v4; // r8d
_BYTE v6[1016]; // [rsp+0h] [rbp-408h] BYREF
unsigned long long v7; // [rsp+3F8h] [rbp-10h]
v7 = __readfsqword(0x28u);
memset(v6, 0, 1001);
if ( a2 <= 0 )
{
return (unsigned int)-1;
}
else
... | func0:
ENDBR64
SUB RSP,0x408
MOV RDX,RDI
MOV ECX,0x7d
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x3f8],RAX
XOR EAX,EAX
MOV RDI,RSP
STOSQ.REP RDI
MOV byte ptr [RDI],0x0
TEST ESI,ESI
JLE 0x00101330
LEA EAX,[RSI + -0x1]
MOV RDI,RDX
LEA RDX,[RDX + RAX*0x4 + 0x4]
JMP 0x001012fd
LAB_001012f0:
ADD RDI,0x4
MOV byte ptr ... | ulong func0(int *param_1,int param_2)
{
int *piVar1;
ulong uVar2;
long lVar3;
char *pcVar4;
long in_FS_OFFSET;
char local_408 [1016];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
pcVar4 = local_408;
for (lVar3 = 0x7d; lVar3 != 0; lVar3 = lVar3 + -1) {
*(int8 *)pcVar4 = 0;
pc... |
3,983 | func0 |
#include <assert.h>
#include <stdbool.h>
| int func0(int nums[], int length) {
bool exists[1001] = {false}; // Assuming numbers are within 1 to 1000
int no_duplicate = -1;
for (int i = 0; i < length; i++) {
if (exists[nums[i]]) {
return nums[i];
} else {
exists[nums[i]] = true;
}
}
... | int main() {
int arr1[] = {1, 2, 3, 4, 4, 5};
int arr2[] = {1, 2, 3, 4};
int arr3[] = {1, 1, 2, 3, 3, 2, 2};
assert(func0(arr1, 6) == 4);
assert(func0(arr2, 4) == -1);
assert(func0(arr3, 7) == 1);
return 0;
}
| O3 | c | func0:
endbr64
sub $0x408,%rsp
mov %rdi,%rdx
mov $0x7d,%ecx
mov %fs:0x28,%rax
mov %rax,0x3f8(%rsp)
xor %eax,%eax
mov %rsp,%rdi
rep stos %rax,%es:(%rdi)
movb $0x0,(%rdi)
test %esi,%esi
jle 1300 <func0+0x80>
lea -0x1(%rsi),%eax
mov %rdx,%rdi
lea 0x4(%rdx,%rax,4),%rdx
jmp 12cd <func... | func0:
endbr64
sub rsp, 408h
mov rdx, rdi
mov ecx, 7Dh ; '}'
mov rax, fs:28h
mov [rsp+408h+var_10], rax
xor eax, eax
mov rdi, rsp
rep stosq
mov byte ptr [rdi], 0
test esi, esi
jle short loc_1300
movsxd rsi, esi
mov rdi, rdx
lea rcx, [rdx+rsi*4]
jmp short loc_12CD
loc_... | long long func0(int *a1, int a2)
{
int *v2; // rcx
long long v3; // rax
unsigned int v4; // edx
_BYTE v6[1016]; // [rsp+0h] [rbp-408h] BYREF
unsigned long long v7; // [rsp+3F8h] [rbp-10h]
v7 = __readfsqword(0x28u);
memset(v6, 0, 1001);
if ( a2 <= 0 )
{
return (unsigned int)-1;
}
else
{
... | func0:
ENDBR64
SUB RSP,0x408
MOV RDX,RDI
MOV ECX,0x7d
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x3f8],RAX
XOR EAX,EAX
MOV RDI,RSP
STOSQ.REP RDI
MOV byte ptr [RDI],0x0
TEST ESI,ESI
JLE 0x00101300
MOVSXD RSI,ESI
MOV RDI,RDX
LEA RCX,[RDX + RSI*0x4]
JMP 0x001012cd
LAB_001012c0:
ADD RDI,0x4
MOV byte ptr [RSP + RAX*0... | ulong func0(int *param_1,int param_2)
{
int *piVar1;
ulong uVar2;
long lVar3;
char *pcVar4;
long in_FS_OFFSET;
char local_408 [1016];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
pcVar4 = local_408;
for (lVar3 = 0x7d; lVar3 != 0; lVar3 = lVar3 + -1) {
*(int8 *)pcVar4 = 0;
pc... |
3,984 | func0 | #include <assert.h>
#include <stddef.h>
| int func0(int list1[][3], size_t rows) {
int maxi = -100000;
for (size_t i = 0; i < rows; i++) {
int sum = 0;
for (size_t j = 0; j < 3; j++) {
sum += list1[i][j];
}
if (sum > maxi) {
maxi = sum;
}
}
return maxi;
}
| int main() {
int data1[][3] = {{1, 2, 3}, {4, 5, 6}, {10, 11, 12}, {7, 8, 9}};
assert(func0(data1, 4) == 33);
int data2[][3] = {{0, 1, 1}, {1, 1, 2}, {3, 2, 1}};
assert(func0(data2, 3) == 6);
int data3[][3] = {{0, 1, 3}, {1, 2, 1}, {9, 8, 2}, {0, 1, 0}, {6, 4, 8}};
assert(func0(data3, ... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x28(%rbp)
mov %rsi,-0x30(%rbp)
movl $0xfffe7960,-0x18(%rbp)
movq $0x0,-0x10(%rbp)
jmp 11df <func0+0x76>
movl $0x0,-0x14(%rbp)
movq $0x0,-0x8(%rbp)
jmp 11c5 <func0+0x5c>
mov -0x10(%rbp),%rdx
mov %rdx,%rax
add %rax,%rax
add %rdx,%rax
s... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_28], rdi
mov [rbp+var_30], rsi
mov [rbp+var_18], 0FFFE7960h
mov [rbp+var_10], 0
jmp short loc_11DF
loc_118A:
mov [rbp+var_14], 0
mov [rbp+var_8], 0
jmp short loc_11C5
loc_119B:
mov rdx, [rbp+var_10]
mov rax, rdx
add rax... | long long func0(long long a1, unsigned long long a2)
{
int v3; // [rsp+18h] [rbp-18h]
int v4; // [rsp+1Ch] [rbp-14h]
unsigned long long i; // [rsp+20h] [rbp-10h]
unsigned long long j; // [rsp+28h] [rbp-8h]
v3 = -100000;
for ( i = 0LL; i < a2; ++i )
{
v4 = 0;
for ( j = 0LL; j <= 2; ++j )
v4... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x28],RDI
MOV qword ptr [RBP + -0x30],RSI
MOV dword ptr [RBP + -0x18],0xfffe7960
MOV qword ptr [RBP + -0x10],0x0
JMP 0x001011df
LAB_0010118a:
MOV dword ptr [RBP + -0x14],0x0
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001011c5
LAB_0010119b:
MOV RDX,qword ptr [RBP + -0x... | int func0(long param_1,ulong param_2)
{
int4 local_20;
int4 local_1c;
int8 local_18;
int8 local_10;
local_20 = -100000;
for (local_18 = 0; local_18 < param_2; local_18 = local_18 + 1) {
local_1c = 0;
for (local_10 = 0; local_10 < 3; local_10 = local_10 + 1) {
local_1c = local_1c + *(int *)... |
3,985 | func0 | #include <assert.h>
#include <stddef.h>
| int func0(int list1[][3], size_t rows) {
int maxi = -100000;
for (size_t i = 0; i < rows; i++) {
int sum = 0;
for (size_t j = 0; j < 3; j++) {
sum += list1[i][j];
}
if (sum > maxi) {
maxi = sum;
}
}
return maxi;
}
| int main() {
int data1[][3] = {{1, 2, 3}, {4, 5, 6}, {10, 11, 12}, {7, 8, 9}};
assert(func0(data1, 4) == 33);
int data2[][3] = {{0, 1, 1}, {1, 1, 2}, {3, 2, 1}};
assert(func0(data2, 3) == 6);
int data3[][3] = {{0, 1, 3}, {1, 2, 1}, {9, 8, 2}, {0, 1, 0}, {6, 4, 8}};
assert(func0(data3, ... | O1 | c | func0:
endbr64
test %rsi,%rsi
je 119b <func0+0x32>
mov %rdi,%rdx
lea (%rsi,%rsi,2),%rax
lea (%rdi,%rax,4),%rsi
mov $0xfffe7960,%ecx
mov 0x4(%rdx),%eax
add (%rdx),%eax
add 0x8(%rdx),%eax
cmp %eax,%ecx
cmovl %eax,%ecx
add $0xc,%rdx
cmp %rsi,%rdx
jne 1182 <func0+0x19>
mov %ecx,%e... | func0:
endbr64
test rsi, rsi
jz short loc_119B
mov rdx, rdi
lea rax, [rsi+rsi*2]
lea rsi, [rdi+rax*4]
mov ecx, 0FFFE7960h
loc_1182:
mov eax, [rdx+4]
add eax, [rdx]
add eax, [rdx+8]
cmp ecx, eax
cmovl ecx, eax
add rdx, 0Ch
cmp rdx, rsi
jnz short loc_1182
loc_1198:
mo... | long long func0(_DWORD *a1, long long a2)
{
_DWORD *v2; // rdx
_DWORD *v3; // rsi
int v4; // ecx
if ( a2 )
{
v2 = a1;
v3 = &a1[3 * a2];
v4 = -100000;
do
{
if ( v4 < v2[2] + *v2 + v2[1] )
v4 = v2[2] + *v2 + v2[1];
v2 += 3;
}
while ( v2 != v3 );
}
else
{
... | func0:
ENDBR64
TEST RSI,RSI
JZ 0x0010119b
MOV RDX,RDI
LEA RAX,[RSI + RSI*0x2]
LEA RSI,[RDI + RAX*0x4]
MOV ECX,0xfffe7960
LAB_00101182:
MOV EAX,dword ptr [RDX + 0x4]
ADD EAX,dword ptr [RDX]
ADD EAX,dword ptr [RDX + 0x8]
CMP ECX,EAX
CMOVL ECX,EAX
ADD RDX,0xc
CMP RDX,RSI
JNZ 0x00101182
LAB_00101198:
MOV EAX,ECX
RET
LAB_00... | int func0(int *param_1,long param_2)
{
int *piVar1;
int iVar2;
int iVar3;
if (param_2 == 0) {
iVar3 = -100000;
}
else {
piVar1 = param_1 + param_2 * 3;
iVar3 = -100000;
do {
iVar2 = param_1[1] + *param_1 + param_1[2];
if (iVar3 < iVar2) {
iVar3 = iVar2;
}
... |
3,986 | func0 | #include <assert.h>
#include <stddef.h>
| int func0(int list1[][3], size_t rows) {
int maxi = -100000;
for (size_t i = 0; i < rows; i++) {
int sum = 0;
for (size_t j = 0; j < 3; j++) {
sum += list1[i][j];
}
if (sum > maxi) {
maxi = sum;
}
}
return maxi;
}
| int main() {
int data1[][3] = {{1, 2, 3}, {4, 5, 6}, {10, 11, 12}, {7, 8, 9}};
assert(func0(data1, 4) == 33);
int data2[][3] = {{0, 1, 1}, {1, 1, 2}, {3, 2, 1}};
assert(func0(data2, 3) == 6);
int data3[][3] = {{0, 1, 3}, {1, 2, 1}, {9, 8, 2}, {0, 1, 0}, {6, 4, 8}};
assert(func0(data3, ... | O2 | c | func0:
endbr64
test %rsi,%rsi
je 133c <func0+0x3c>
lea (%rsi,%rsi,2),%rax
mov $0xfffe7960,%r8d
lea (%rdi,%rax,4),%rdx
nopw 0x0(%rax,%rax,1)
mov 0x4(%rdi),%eax
add (%rdi),%eax
add 0x8(%rdi),%eax
cmp %eax,%r8d
cmovl %eax,%r8d
add $0xc,%rdi
cmp %rdx,%rdi
jne 1320 <func0+0x20>
mov ... | func0:
endbr64
test rsi, rsi
jz short loc_140C
lea rax, [rsi+rsi*2]
mov r8d, 0FFFE7960h
lea rdx, [rdi+rax*4]
nop word ptr [rax+rax+00000000h]
loc_13F0:
mov eax, [rdi+4]
add eax, [rdi]
add eax, [rdi+8]
cmp r8d, eax
cmovl r8d, eax
add rdi, 0Ch
cmp rdi, rdx
jnz short l... | long long func0(_DWORD *a1, long long a2)
{
int v2; // r8d
_DWORD *v3; // rdx
if ( !a2 )
return 4294867296LL;
v2 = -100000;
v3 = &a1[3 * a2];
do
{
if ( v2 < a1[2] + *a1 + a1[1] )
v2 = a1[2] + *a1 + a1[1];
a1 += 3;
}
while ( a1 != v3 );
return (unsigned int)v2;
} | func0:
ENDBR64
TEST RSI,RSI
JZ 0x0010140c
LEA RAX,[RSI + RSI*0x2]
MOV R8D,0xfffe7960
LEA RDX,[RDI + RAX*0x4]
NOP word ptr [RAX + RAX*0x1]
LAB_001013f0:
MOV EAX,dword ptr [RDI + 0x4]
ADD EAX,dword ptr [RDI]
ADD EAX,dword ptr [RDI + 0x8]
CMP R8D,EAX
CMOVL R8D,EAX
ADD RDI,0xc
CMP RDI,RDX
JNZ 0x001013f0
MOV EAX,R8D
RET
LAB... | int func0(int *param_1,long param_2)
{
int *piVar1;
int iVar2;
int iVar3;
if (param_2 != 0) {
iVar3 = -100000;
piVar1 = param_1 + param_2 * 3;
do {
iVar2 = param_1[1] + *param_1 + param_1[2];
if (iVar3 < iVar2) {
iVar3 = iVar2;
}
param_1 = param_1 + 3;
} while... |
3,987 | func0 | #include <assert.h>
#include <stddef.h>
| int func0(int list1[][3], size_t rows) {
int maxi = -100000;
for (size_t i = 0; i < rows; i++) {
int sum = 0;
for (size_t j = 0; j < 3; j++) {
sum += list1[i][j];
}
if (sum > maxi) {
maxi = sum;
}
}
return maxi;
}
| int main() {
int data1[][3] = {{1, 2, 3}, {4, 5, 6}, {10, 11, 12}, {7, 8, 9}};
assert(func0(data1, 4) == 33);
int data2[][3] = {{0, 1, 1}, {1, 1, 2}, {3, 2, 1}};
assert(func0(data2, 3) == 6);
int data3[][3] = {{0, 1, 3}, {1, 2, 1}, {9, 8, 2}, {0, 1, 0}, {6, 4, 8}};
assert(func0(data3, ... | O3 | c | func0:
endbr64
test %rsi,%rsi
je 131c <func0+0x3c>
lea (%rsi,%rsi,2),%rax
mov $0xfffe7960,%r8d
lea (%rdi,%rax,4),%rdx
nopw 0x0(%rax,%rax,1)
mov 0x4(%rdi),%eax
add (%rdi),%eax
add 0x8(%rdi),%eax
cmp %eax,%r8d
cmovl %eax,%r8d
add $0xc,%rdi
cmp %rdi,%rdx
jne 1300 <func0+0x20>
mov ... | func0:
endbr64
mov rcx, rsi
test rsi, rsi
jz loc_1298
lea rax, [rsi-1]
cmp rax, 2
jbe loc_129F
mov rdx, rsi
movdqa xmm4, cs:xmmword_2010
mov rax, rdi
shr rdx, 2
lea rdx, [rdx+rdx*2]
shl rdx, 4
add rdx, rdi
nop dword ptr [rax+rax+00h]
loc_1180:
movdqu xmm3, xmmword p... | long long func0(const __m128i *a1, unsigned long long a2)
{
__m128i si128; // xmm4
const __m128i *v4; // rax
__m128 v5; // xmm3
__m128 v6; // xmm1
__m128 v7; // xmm5
__m128 v8; // xmm0
__m128 v9; // xmm2
__m128i v10; // xmm0
__m128i v11; // xmm1
__m128i v12; // xmm1
unsigned long long v13; // rsi... | func0:
ENDBR64
MOV RCX,RSI
TEST RSI,RSI
JZ 0x00101298
LEA RAX,[RSI + -0x1]
CMP RAX,0x2
JBE 0x0010129f
MOV RDX,RSI
MOVDQA XMM4,xmmword ptr [0x00102010]
MOV RAX,RDI
SHR RDX,0x2
LEA RDX,[RDX + RDX*0x2]
SHL RDX,0x4
ADD RDX,RDI
NOP dword ptr [RAX + RAX*0x1]
LAB_00101180:
MOVDQU XMM3,xmmword ptr [RAX]
MOVDQU XMM1,xmmword ptr... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
uint func0(int *param_1,ulong param_2)
{
uint uVar1;
int *piVar2;
int *piVar3;
uint uVar4;
ulong uVar5;
uint uVar6;
uint uVar7;
uint uVar8;
uint uVar9;
uint uVar10;
uint uVar11;
uint uVar12;
uint uVar13;
u... |
3,988 | func0 |
#include <stdio.h>
#include <assert.h>
#include <math.h>
| int func0(int binary) {
int binary1 = binary;
int decimal = 0;
int i = 0;
while(binary != 0) {
int dec = binary % 10;
decimal += dec * (int)pow(2, i);
binary /= 10;
i++;
}
return decimal;
}
| int main() {
assert(func0(100) == 4);
assert(func0(1011) == 11);
assert(func0(1101101) == 109);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %edi,-0x14(%rbp)
mov -0x14(%rbp),%eax
mov %eax,-0x8(%rbp)
movl $0x0,-0x10(%rbp)
movl $0x0,-0xc(%rbp)
jmp 1202 <func0+0x99>
mov -0x14(%rbp),%edx
movslq %edx,%rax
imul $0x66666667,%rax,%rax
shr $0x20,%rax
mov %eax,%ecx
sar $0x... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_14], edi
mov eax, [rbp+var_14]
mov [rbp+var_8], eax
mov [rbp+var_10], 0
mov [rbp+var_C], 0
jmp short loc_1204
loc_118E:
mov edx, [rbp+var_14]
movsxd rax, edx
imul rax, 66666667h
shr rax, 20h
mov ecx, eax
sa... | long long func0(int a1)
{
unsigned int v3; // [rsp+10h] [rbp-10h]
int v4; // [rsp+14h] [rbp-Ch]
v3 = 0;
v4 = 0;
while ( a1 )
{
v3 += a1 % 10 * (int)pow(2.0, (double)v4);
a1 /= 10;
++v4;
}
return v3;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x14],EDI
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x8],EAX
MOV dword ptr [RBP + -0x10],0x0
MOV dword ptr [RBP + -0xc],0x0
JMP 0x00101204
LAB_0010118e:
MOV EDX,dword ptr [RBP + -0x14]
MOVSXD RAX,EDX
IMUL RAX,RAX,0x66666667
SHR RAX,0x20
... | int func0(int param_1)
{
double dVar1;
int4 local_1c;
int4 local_18;
int4 local_14;
local_18 = 0;
local_14 = 0;
for (local_1c = param_1; local_1c != 0; local_1c = local_1c / 10) {
dVar1 = pow(DAT_00102068,(double)local_14);
local_18 = local_18 + (int)dVar1 * (local_1c % 10);
local_14 = loc... |
3,989 | func0 |
#include <stdio.h>
#include <assert.h>
#include <math.h>
| int func0(int binary) {
int binary1 = binary;
int decimal = 0;
int i = 0;
while(binary != 0) {
int dec = binary % 10;
decimal += dec * (int)pow(2, i);
binary /= 10;
i++;
}
return decimal;
}
| int main() {
assert(func0(100) == 4);
assert(func0(1011) == 11);
assert(func0(1101101) == 109);
return 0;
}
| O1 | c | func0:
endbr64
push %r12
push %rbp
push %rbx
mov %edi,%ebx
test %edi,%edi
je 11d2 <func0+0x69>
mov $0x0,%ebp
mov $0x0,%r12d
pxor %xmm1,%xmm1
cvtsi2sd %ebp,%xmm1
mov 0xeef(%rip),%rax
movq %rax,%xmm0
callq 1060 <pow@plt>
cvttsd2si %xmm0,%edx
movslq %ebx,%rax
imul $0x66666667,%rax,%rax
sar ... | func0:
endbr64
push r12
push rbp
push rbx
mov ebx, edi
test edi, edi
jz short loc_11D2
mov ebp, 0
mov r12d, 0
loc_1182:
pxor xmm1, xmm1
cvtsi2sd xmm1, ebp
mov rax, cs:qword_2060
movq xmm0, rax
call _pow
cvttsd2si edx, xmm0
movsxd rax, ebx
imul rax, 66666667h
sar rax, 22... | long long func0(int a1)
{
int v1; // ebx
int v2; // ebp
unsigned int v3; // r12d
v1 = a1;
if ( a1 )
{
v2 = 0;
v3 = 0;
do
{
v3 += (int)pow(2.0, (double)v2) * (v1 % 10);
v1 /= 10;
++v2;
}
while ( v1 );
}
else
{
return 0;
}
return v3;
} | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
MOV EBX,EDI
TEST EDI,EDI
JZ 0x001011d2
MOV EBP,0x0
MOV R12D,0x0
LAB_00101182:
PXOR XMM1,XMM1
CVTSI2SD XMM1,EBP
MOV RAX,qword ptr [0x00102060]
MOVQ XMM0,RAX
CALL 0x00101060
CVTTSD2SI EDX,XMM0
MOVSXD RAX,EBX
IMUL RAX,RAX,0x66666667
SAR RAX,0x22
MOV ECX,EBX
SAR ECX,0x1f
SUB EAX,EC... | int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
double dVar4;
if (param_1 == 0) {
iVar3 = 0;
}
else {
iVar2 = 0;
iVar3 = 0;
do {
dVar4 = pow(DAT_00102060,(double)iVar2);
iVar1 = param_1 / 10;
iVar3 = iVar3 + (param_1 % 10) * (int)dVar4;
iVar2 = iVar2 +... |
3,990 | func0 |
#include <stdio.h>
#include <assert.h>
#include <math.h>
| int func0(int binary) {
int binary1 = binary;
int decimal = 0;
int i = 0;
while(binary != 0) {
int dec = binary % 10;
decimal += dec * (int)pow(2, i);
binary /= 10;
i++;
}
return decimal;
}
| int main() {
assert(func0(100) == 4);
assert(func0(1011) == 11);
assert(func0(1101101) == 109);
return 0;
}
| O2 | c | func0:
endbr64
push %r12
push %rbp
push %rbx
test %edi,%edi
je 1280 <func0+0x70>
mov %edi,%ebx
xor %ebp,%ebp
xor %r12d,%r12d
nopl 0x0(%rax,%rax,1)
pxor %xmm1,%xmm1
mov 0xe4d(%rip),%rax
cvtsi2sd %ebp,%xmm1
add $0x1,%ebp
movq %rax,%xmm0
callq 1060 <pow@plt>
movslq %ebx,%rax
mov %ebx,%... | func0:
endbr64
push r12
push rbp
push rbx
test edi, edi
jz short loc_1280
mov ebx, edi
xor ebp, ebp
xor r12d, r12d
nop dword ptr [rax+rax+00h]
loc_1228:
pxor xmm1, xmm1
mov rax, cs:qword_2060
cvtsi2sd xmm1, ebp
add ebp, 1
movq xmm0, rax
call _pow
movsxd rax, ebx
mov ... | long long func0(int a1)
{
int v1; // ebx
int v2; // ebp
unsigned int v3; // r12d
double v4; // xmm1_8
int v5; // edx
if ( !a1 )
return 0LL;
v1 = a1;
v2 = 0;
v3 = 0;
do
{
v4 = (double)v2++;
v5 = v1 % 10 * (int)pow(2.0, v4);
v1 /= 10;
v3 += v5;
}
while ( v1 );
return v3;
... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
TEST EDI,EDI
JZ 0x00101280
MOV EBX,EDI
XOR EBP,EBP
XOR R12D,R12D
NOP dword ptr [RAX + RAX*0x1]
LAB_00101228:
PXOR XMM1,XMM1
MOV RAX,qword ptr [0x00102060]
CVTSI2SD XMM1,EBP
ADD EBP,0x1
MOVQ XMM0,RAX
CALL 0x00101060
MOVSXD RAX,EBX
MOV ECX,EBX
IMUL RAX,RAX,0x66666667
SAR ECX,0x1f... | int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
double dVar4;
if (param_1 != 0) {
iVar2 = 0;
iVar3 = 0;
do {
dVar4 = (double)iVar2;
iVar2 = iVar2 + 1;
dVar4 = pow(DAT_00102060,dVar4);
iVar1 = param_1 / 10;
iVar3 = iVar3 + (int)dVar4 * (param_1 % 10);
... |
3,991 | func0 |
#include <stdio.h>
#include <assert.h>
#include <math.h>
| int func0(int binary) {
int binary1 = binary;
int decimal = 0;
int i = 0;
while(binary != 0) {
int dec = binary % 10;
decimal += dec * (int)pow(2, i);
binary /= 10;
i++;
}
return decimal;
}
| int main() {
assert(func0(100) == 4);
assert(func0(1011) == 11);
assert(func0(1101101) == 109);
return 0;
}
| O3 | c | func0:
endbr64
push %r12
push %rbp
push %rbx
test %edi,%edi
je 1280 <func0+0x70>
mov %edi,%ebx
xor %ebp,%ebp
xor %r12d,%r12d
nopl 0x0(%rax,%rax,1)
pxor %xmm1,%xmm1
mov 0xe4d(%rip),%rax
cvtsi2sd %ebp,%xmm1
add $0x1,%ebp
movq %rax,%xmm0
callq 1060 <pow@plt>
movslq %ebx,%rax
mov %ebx,%... | func0:
endbr64
push r12
push rbp
push rbx
test edi, edi
jz short loc_1278
mov ebx, edi
xor r12d, r12d
xor ebp, ebp
nop dword ptr [rax+rax+00h]
loc_1228:
pxor xmm1, xmm1
movsd xmm0, cs:x; x
cvtsi2sd xmm1, r12d; y
add r12d, 1
call _pow
movsxd rax, ebx
mov ecx, ebx
imul ... | long long func0(int a1)
{
int v1; // ebx
int v2; // r12d
unsigned int v3; // ebp
double v4; // xmm1_8
int v5; // edx
if ( !a1 )
return 0LL;
v1 = a1;
v2 = 0;
v3 = 0;
do
{
v4 = (double)v2++;
v5 = v1 % 10 * (int)pow(2.0, v4);
v1 /= 10;
v3 += v5;
}
while ( v1 );
return v3;
... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
TEST EDI,EDI
JZ 0x00101278
MOV EBX,EDI
XOR R12D,R12D
XOR EBP,EBP
NOP dword ptr [RAX + RAX*0x1]
LAB_00101228:
PXOR XMM1,XMM1
MOVSD XMM0,qword ptr [0x00102060]
CVTSI2SD XMM1,R12D
ADD R12D,0x1
CALL 0x00101060
MOVSXD RAX,EBX
MOV ECX,EBX
IMUL RAX,RAX,0x66666667
SAR ECX,0x1f
CVTTSD2S... | int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
double dVar4;
if (param_1 != 0) {
iVar3 = 0;
iVar2 = 0;
do {
dVar4 = (double)iVar3;
iVar3 = iVar3 + 1;
dVar4 = pow(DAT_00102060,dVar4);
iVar1 = param_1 / 10;
iVar2 = iVar2 + (int)dVar4 * (param_1 % 10);
... |
3,992 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int arr[], int n) {
int i, j, temp, prod = 1;
// Simple insertion sort
for (i = 1; i < n; i++) {
temp = arr[i];
j = i - 1;
while (j >= 0 && arr[j] > temp) {
arr[j + 1] = arr[j];
j--;
}
arr[j + 1] = temp;
}
fo... | int main() {
int arr1[] = {1, 1, 2, 3};
int arr2[] = {1, 2, 3, 1, 1};
int arr3[] = {1, 1, 4, 5, 6};
int arr4[] = {1, 1, 4, 5, 6, 5, 7, 1, 1, 3, 4};
assert(func0(arr1, 4) == 6);
assert(func0(arr2, 5) == 6);
assert(func0(arr3, 5) == 120);
assert(func0(arr4, 11) == 2520);
... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
movl $0x1,-0x8(%rbp)
movl $0x1,-0x10(%rbp)
jmpq 1226 <func0+0xbd>
mov -0x10(%rbp),%eax
cltq
lea 0x0(,%rax,4),%rdx
mov -0x18(%rbp),%rax
add %rdx,%rax
mov (%rax),%eax
mov %eax,-0x4(%rbp)
mov -0x10(%rbp),... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_8], 1
mov [rbp+var_10], 1
jmp loc_1226
loc_118B:
mov eax, [rbp+var_10]
cdqe
lea rdx, ds:0[rax*4]
mov rax, [rbp+var_18]
add rax, rdx
mov eax, [rax]
mov [rbp+var_4], eax
mov ... | long long func0(long long a1, int a2)
{
int i; // [rsp+Ch] [rbp-10h]
int k; // [rsp+Ch] [rbp-10h]
int j; // [rsp+10h] [rbp-Ch]
unsigned int v6; // [rsp+14h] [rbp-8h]
int v7; // [rsp+18h] [rbp-4h]
v6 = 1;
for ( i = 1; i < a2; ++i )
{
v7 = *(_DWORD *)(4LL * i + a1);
for ( j = i - 1; j >= 0 && v7... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0x8],0x1
MOV dword ptr [RBP + -0x10],0x1
JMP 0x00101226
LAB_0010118b:
MOV EAX,dword ptr [RBP + -0x10]
CDQE
LEA RDX,[RAX*0x4]
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,RDX
MOV EAX,dword ptr [RAX]
MOV d... | int func0(long param_1,int param_2)
{
int iVar1;
int4 local_18;
int4 local_14;
int4 local_10;
local_10 = 1;
for (local_18 = 1; local_18 < param_2; local_18 = local_18 + 1) {
iVar1 = *(int *)(param_1 + (long)local_18 * 4);
local_14 = local_18;
while ((local_14 = local_14 + -1, -1 < local_14 &... |
3,993 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int arr[], int n) {
int i, j, temp, prod = 1;
// Simple insertion sort
for (i = 1; i < n; i++) {
temp = arr[i];
j = i - 1;
while (j >= 0 && arr[j] > temp) {
arr[j + 1] = arr[j];
j--;
}
arr[j + 1] = temp;
}
fo... | int main() {
int arr1[] = {1, 1, 2, 3};
int arr2[] = {1, 2, 3, 1, 1};
int arr3[] = {1, 1, 4, 5, 6};
int arr4[] = {1, 1, 4, 5, 6, 5, 7, 1, 1, 3, 4};
assert(func0(arr1, 4) == 6);
assert(func0(arr2, 5) == 6);
assert(func0(arr3, 5) == 120);
assert(func0(arr4, 11) == 2520);
... | O1 | c | func0:
endbr64
cmp $0x1,%esi
jle 11c0 <func0+0x57>
mov %rdi,%r10
lea -0x2(%rsi),%r11d
mov $0x0,%r9d
jmp 1199 <func0+0x30>
movslq %edx,%rdx
mov %r8d,0x4(%rdi,%rdx,4)
lea 0x1(%r9),%rax
add $0x4,%r10
cmp %r11,%r9
je 11ca <func0+0x61>
mov %rax,%r9
mov 0x4(%r10),%r8d
mov %r9d,%edx
... | func0:
endbr64
cmp esi, 1
jle short loc_11BD
mov r10, rdi
lea r11d, [rsi-1]
mov r9d, 0
jmp short loc_1196
loc_1181:
movsxd rdx, edx
mov [rdi+rdx*4+4], r8d
add r9, 1
add r10, 4
cmp r9, r11
jz short loc_11C7
loc_1196:
mov r8d, [r10+4]
mov edx, r9d
mov rax, r10
tes... | long long func0(_DWORD *a1, int a2)
{
_DWORD *v2; // r10
long long v3; // r9
int v4; // r8d
int v5; // edx
_DWORD *v6; // rax
unsigned int v7; // edx
long long v9; // rax
if ( a2 <= 1 )
{
if ( a2 != 1 )
return 1;
}
else
{
v2 = a1;
v3 = 0LL;
do
{
v4 = v2[1];
... | func0:
ENDBR64
CMP ESI,0x1
JLE 0x001011bd
MOV R10,RDI
LEA R11D,[RSI + -0x1]
MOV R9D,0x0
JMP 0x00101196
LAB_00101181:
MOVSXD RDX,EDX
MOV dword ptr [RDI + RDX*0x4 + 0x4],R8D
ADD R9,0x1
ADD R10,0x4
CMP R9,R11
JZ 0x001011c7
LAB_00101196:
MOV R8D,dword ptr [R10 + 0x4]
MOV EDX,R9D
MOV RAX,R10
TEST R9D,R9D
JS 0x00101181
LAB_0... | int func0(int *param_1,int param_2)
{
int *piVar1;
long lVar2;
int iVar3;
ulong uVar4;
int iVar5;
ulong uVar6;
int *piVar7;
if (param_2 < 2) {
if (param_2 != 1) {
return 1;
}
}
else {
uVar6 = 0;
piVar7 = param_1;
do {
iVar3 = piVar7[1];
iVar5 = (int)uVar6;
... |
3,994 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int arr[], int n) {
int i, j, temp, prod = 1;
// Simple insertion sort
for (i = 1; i < n; i++) {
temp = arr[i];
j = i - 1;
while (j >= 0 && arr[j] > temp) {
arr[j + 1] = arr[j];
j--;
}
arr[j + 1] = temp;
}
fo... | int main() {
int arr1[] = {1, 1, 2, 3};
int arr2[] = {1, 2, 3, 1, 1};
int arr3[] = {1, 1, 4, 5, 6};
int arr4[] = {1, 1, 4, 5, 6, 5, 7, 1, 1, 3, 4};
assert(func0(arr1, 4) == 6);
assert(func0(arr2, 5) == 6);
assert(func0(arr3, 5) == 120);
assert(func0(arr4, 11) == 2520);
... | O2 | c | func0:
endbr64
push %rbx
cmp $0x1,%esi
jle 13c0 <func0+0xa0>
lea 0x4(%rdi),%r10
lea -0x2(%rsi),%ebx
xor %r11d,%r11d
nopl 0x0(%rax,%rax,1)
lea 0x0(,%r11,4),%rax
lea -0x4(%r10),%r8
mov (%r10),%r9d
sub %rax,%r8
mov %r10,%rax
nopl (%rax)
mov -0x4(%rax),%edx
mov %rax,%rcx
cmp %r9... | func0:
endbr64
cmp esi, 1
jle short loc_139C
lea r10d, [rsi-1]
xor r9d, r9d
loc_1330:
mov r8d, [rdi+r9*4+4]
mov rax, r9
nop dword ptr [rax+rax+00000000h]
loc_1340:
mov edx, [rdi+rax*4]
mov ecx, eax
cmp edx, r8d
jle short loc_1390
mov [rdi+rax*4+4], edx
sub rax, 1
cmp ... | long long func0(_DWORD *a1, int a2)
{
long long v2; // r9
int v3; // r8d
long long v4; // rax
int v5; // edx
_DWORD *v6; // rax
long long v7; // rax
unsigned int v8; // r8d
if ( a2 <= 1 )
{
if ( a2 != 1 )
return 1LL;
}
else
{
v2 = 0LL;
do
{
v3 = a1[v2 + 1];
v4... | func0:
ENDBR64
CMP ESI,0x1
JLE 0x0010139c
LEA R10D,[RSI + -0x1]
XOR R9D,R9D
LAB_00101330:
MOV R8D,dword ptr [RDI + R9*0x4 + 0x4]
MOV RAX,R9
NOP dword ptr [RAX + RAX*0x1]
LAB_00101340:
MOV EDX,dword ptr [RDI + RAX*0x4]
MOV ECX,EAX
CMP EDX,R8D
JLE 0x00101390
MOV dword ptr [RDI + RAX*0x4 + 0x4],EDX
SUB RAX,0x1
CMP EAX,-0x... | int func0(int *param_1,int param_2)
{
ulong uVar1;
int *piVar2;
long lVar3;
int iVar4;
ulong uVar5;
if (param_2 < 2) {
if (param_2 != 1) {
return 1;
}
}
else {
uVar5 = 0;
do {
iVar4 = param_1[uVar5 + 1];
uVar1 = uVar5;
do {
if (param_1[uVar1] <= iVar4)... |
3,995 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int arr[], int n) {
int i, j, temp, prod = 1;
// Simple insertion sort
for (i = 1; i < n; i++) {
temp = arr[i];
j = i - 1;
while (j >= 0 && arr[j] > temp) {
arr[j + 1] = arr[j];
j--;
}
arr[j + 1] = temp;
}
fo... | int main() {
int arr1[] = {1, 1, 2, 3};
int arr2[] = {1, 2, 3, 1, 1};
int arr3[] = {1, 1, 4, 5, 6};
int arr4[] = {1, 1, 4, 5, 6, 5, 7, 1, 1, 3, 4};
assert(func0(arr1, 4) == 6);
assert(func0(arr2, 5) == 6);
assert(func0(arr3, 5) == 120);
assert(func0(arr4, 11) == 2520);
... | O3 | c | func0:
endbr64
push %rbx
cmp $0x1,%esi
jle 1380 <func0+0xa0>
lea 0x4(%rdi),%r10
lea -0x2(%rsi),%ebx
xor %r11d,%r11d
nopl 0x0(%rax,%rax,1)
lea 0x0(,%r11,4),%rax
lea -0x4(%r10),%r8
mov (%r10),%r9d
sub %rax,%r8
mov %r10,%rax
nopl (%rax)
mov -0x4(%rax),%edx
mov %rax,%rcx
cmp %r9... | func0:
endbr64
lea r9d, [rsi-1]
xor r8d, r8d
cmp esi, 1
jle short loc_1365
loc_12F0:
mov ecx, [rdi+r8*4+4]
mov rax, r8
jmp short loc_130D
loc_1300:
mov [rdi+rax*4+4], edx
sub rax, 1
cmp eax, 0FFFFFFFFh
jz short loc_1360
loc_130D:
mov edx, [rdi+rax*4]
cmp edx, ecx
jg ... | long long func0(_DWORD *a1, int a2)
{
long long v2; // r8
int v3; // ecx
long long v4; // rax
int v5; // edx
_DWORD *v6; // rax
long long v7; // rax
unsigned int v8; // ecx
v2 = 0LL;
if ( a2 <= 1 )
{
if ( a2 != 1 )
return 1LL;
}
else
{
do
{
v3 = a1[v2 + 1];
v4 =... | func0:
ENDBR64
LEA R9D,[RSI + -0x1]
XOR R8D,R8D
CMP ESI,0x1
JLE 0x00101365
LAB_001012f0:
MOV ECX,dword ptr [RDI + R8*0x4 + 0x4]
MOV RAX,R8
JMP 0x0010130d
LAB_00101300:
MOV dword ptr [RDI + RAX*0x4 + 0x4],EDX
SUB RAX,0x1
CMP EAX,-0x1
JZ 0x00101360
LAB_0010130d:
MOV EDX,dword ptr [RDI + RAX*0x4]
CMP EDX,ECX
JG 0x00101300... | int func0(int *param_1,int param_2)
{
ulong uVar1;
int *piVar2;
long lVar3;
int iVar4;
ulong uVar5;
uVar5 = 0;
if (param_2 < 2) {
if (param_2 != 1) {
return 1;
}
}
else {
do {
iVar4 = param_1[uVar5 + 1];
uVar1 = uVar5;
do {
if (param_1[uVar1] <= iVar4) {... |
3,996 | func0 |
#include <assert.h>
#include <stddef.h>
| int func0(int** test_list, size_t* lengths, size_t num_tuples, int K) {
int res = 1;
for (size_t i = 0; i < num_tuples && res; i++) {
for (size_t j = 0; j < lengths[i] && res; j++) {
if (test_list[i][j] != K) {
res = 0;
}
}
}
return res;
... | int main() {
// First test case
int tuple1_1[] = {4, 4};
int tuple1_2[] = {4, 4, 4};
int tuple1_3[] = {4, 4};
int tuple1_4[] = {4, 4, 4, 4};
int tuple1_5[] = {4};
int* test_list1[] = {tuple1_1, tuple1_2, tuple1_3, tuple1_4, tuple1_5};
size_t lengths1[] = {2, 3, 2, 4, 1};
ass... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x28(%rbp)
mov %rsi,-0x30(%rbp)
mov %rdx,-0x38(%rbp)
mov %ecx,-0x3c(%rbp)
movl $0x1,-0x14(%rbp)
movq $0x0,-0x10(%rbp)
jmp 11f6 <func0+0x8d>
movq $0x0,-0x8(%rbp)
jmp 11cf <func0+0x66>
mov -0x10(%rbp),%rax
lea 0x0(,%rax,8),%rdx
mov -0x... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_28], rdi
mov [rbp+var_30], rsi
mov [rbp+var_38], rdx
mov [rbp+var_3C], ecx
mov [rbp+var_14], 1
mov [rbp+var_10], 0
jmp short loc_11F6
loc_1191:
mov [rbp+var_8], 0
jmp short loc_11CF
loc_119B:
mov rax, [rbp+var_10]
lea r... | long long func0(long long a1, long long a2, unsigned long long a3, int a4)
{
unsigned int v5; // [rsp+28h] [rbp-14h]
unsigned long long i; // [rsp+2Ch] [rbp-10h]
unsigned long long j; // [rsp+34h] [rbp-8h]
v5 = 1;
for ( i = 0LL; i < a3 && v5; ++i )
{
for ( j = 0LL; j < *(_QWORD *)(8 * i + a2) && v5; +... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x28],RDI
MOV qword ptr [RBP + -0x30],RSI
MOV qword ptr [RBP + -0x38],RDX
MOV dword ptr [RBP + -0x3c],ECX
MOV dword ptr [RBP + -0x14],0x1
MOV qword ptr [RBP + -0x10],0x0
JMP 0x001011f6
LAB_00101191:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001011cf
LAB_0010119b:
MOV... | int func0(long param_1,long param_2,ulong param_3,int param_4)
{
int4 local_1c;
int8 local_18;
int8 local_10;
local_1c = 1;
local_18 = 0;
while ((local_18 < param_3 && (local_1c != 0))) {
local_10 = 0;
while ((local_10 < *(ulong *)(param_2 + local_18 * 8) && (local_1c != 0))) {
if (param_4... |
3,997 | func0 |
#include <assert.h>
#include <stddef.h>
| int func0(int** test_list, size_t* lengths, size_t num_tuples, int K) {
int res = 1;
for (size_t i = 0; i < num_tuples && res; i++) {
for (size_t j = 0; j < lengths[i] && res; j++) {
if (test_list[i][j] != K) {
res = 0;
}
}
}
return res;
... | int main() {
// First test case
int tuple1_1[] = {4, 4};
int tuple1_2[] = {4, 4, 4};
int tuple1_3[] = {4, 4};
int tuple1_4[] = {4, 4, 4, 4};
int tuple1_5[] = {4};
int* test_list1[] = {tuple1_1, tuple1_2, tuple1_3, tuple1_4, tuple1_5};
size_t lengths1[] = {2, 3, 2, 4, 1};
ass... | O1 | c | func0:
endbr64
mov $0x0,%r10d
test %rdx,%rdx
jne 119c <func0+0x33>
mov $0x1,%eax
retq
add $0x1,%rax
cmp %r8,%rax
jae 1193 <func0+0x2a>
cmp %ecx,(%r9,%rax,4)
je 117e <func0+0x15>
mov $0x0,%eax
retq
add $0x1,%r10
cmp %r10,%rdx
jbe 11b0 <func0+0x47>
mov (%rsi,%r10,8),%r8
test %r... | func0:
endbr64
mov r10d, 0
test rdx, rdx
jnz short loc_119C
mov eax, 1
retn
loc_117E:
add rax, 1
cmp rax, r8
jnb short loc_1193
loc_1187:
cmp [r9+rax*4], ecx
jz short loc_117E
mov eax, 0
retn
loc_1193:
add r10, 1
cmp rdx, r10
jbe short loc_11B0
loc_119C:
mov r8, [... | long long func0(long long a1, long long a2, unsigned long long a3, int a4)
{
long long v4; // r10
long long v6; // rax
unsigned long long v7; // r8
v4 = 0LL;
if ( !a3 )
return 1LL;
while ( 1 )
{
v7 = *(_QWORD *)(a2 + 8 * v4);
if ( v7 )
break;
LABEL_6:
if ( a3 <= ++v4 )
return... | func0:
ENDBR64
MOV R10D,0x0
TEST RDX,RDX
JNZ 0x0010119c
MOV EAX,0x1
RET
LAB_0010117e:
ADD RAX,0x1
CMP RAX,R8
JNC 0x00101193
LAB_00101187:
CMP dword ptr [R9 + RAX*0x4],ECX
JZ 0x0010117e
MOV EAX,0x0
RET
LAB_00101193:
ADD R10,0x1
CMP RDX,R10
JBE 0x001011b0
LAB_0010119c:
MOV R8,qword ptr [RSI + R10*0x8]
TEST R8,R8
JZ 0x001... | int8 func0(long param_1,long param_2,ulong param_3,int param_4)
{
ulong uVar1;
ulong uVar2;
ulong uVar3;
uVar3 = 0;
if (param_3 == 0) {
return 1;
}
do {
uVar1 = *(ulong *)(param_2 + uVar3 * 8);
if (uVar1 != 0) {
uVar2 = 0;
do {
if (*(int *)(*(long *)(param_1 + uVar3 * 8... |
3,998 | func0 |
#include <assert.h>
#include <stddef.h>
| int func0(int** test_list, size_t* lengths, size_t num_tuples, int K) {
int res = 1;
for (size_t i = 0; i < num_tuples && res; i++) {
for (size_t j = 0; j < lengths[i] && res; j++) {
if (test_list[i][j] != K) {
res = 0;
}
}
}
return res;
... | int main() {
// First test case
int tuple1_1[] = {4, 4};
int tuple1_2[] = {4, 4, 4};
int tuple1_3[] = {4, 4};
int tuple1_4[] = {4, 4, 4, 4};
int tuple1_5[] = {4};
int* test_list1[] = {tuple1_1, tuple1_2, tuple1_3, tuple1_4, tuple1_5};
size_t lengths1[] = {2, 3, 2, 4, 1};
ass... | O2 | c | func0:
endbr64
xor %r10d,%r10d
test %rdx,%rdx
je 1512 <func0+0x42>
nopl 0x0(%rax)
mov (%rsi,%r10,8),%r9
test %r9,%r9
je 1509 <func0+0x39>
mov (%rdi,%r10,8),%r8
xor %eax,%eax
cmp %ecx,(%r8,%rax,4)
je 1500 <func0+0x30>
xor %eax,%eax
retq
nopl 0x0(%rax,%rax,1)
add $0x1,%rax
cmp ... | func0:
endbr64
xor r10d, r10d
test rdx, rdx
jz short loc_1512
nop dword ptr [rax+00h]
loc_14E0:
mov r9, [rsi+r10*8]
test r9, r9
jz short loc_1509
mov r8, [rdi+r10*8]
xor eax, eax
loc_14EF:
cmp [r8+rax*4], ecx
jz short loc_1500
xor eax, eax
retn
loc_1500:
add rax, 1
c... | long long func0(long long a1, long long a2, long long a3, int a4)
{
long long v4; // r10
long long v5; // r9
long long v6; // rax
v4 = 0LL;
if ( !a3 )
return 1LL;
while ( 1 )
{
v5 = *(_QWORD *)(a2 + 8 * v4);
if ( v5 )
break;
LABEL_7:
if ( a3 == ++v4 )
return 1LL;
}
v6 = 0... | func0:
ENDBR64
XOR R10D,R10D
TEST RDX,RDX
JZ 0x00101512
NOP dword ptr [RAX]
LAB_001014e0:
MOV R9,qword ptr [RSI + R10*0x8]
TEST R9,R9
JZ 0x00101509
MOV R8,qword ptr [RDI + R10*0x8]
XOR EAX,EAX
LAB_001014ef:
CMP dword ptr [R8 + RAX*0x4],ECX
JZ 0x00101500
XOR EAX,EAX
RET
LAB_00101500:
ADD RAX,0x1
CMP RAX,R9
JNZ 0x001014e... | int8 func0(long param_1,long param_2,long param_3,int param_4)
{
long lVar1;
long lVar2;
long lVar3;
lVar3 = 0;
if (param_3 != 0) {
do {
lVar1 = *(long *)(param_2 + lVar3 * 8);
if (lVar1 != 0) {
lVar2 = 0;
do {
if (*(int *)(*(long *)(param_1 + lVar3 * 8) + lVar2 *... |
3,999 | func0 |
#include <assert.h>
#include <stddef.h>
| int func0(int** test_list, size_t* lengths, size_t num_tuples, int K) {
int res = 1;
for (size_t i = 0; i < num_tuples && res; i++) {
for (size_t j = 0; j < lengths[i] && res; j++) {
if (test_list[i][j] != K) {
res = 0;
}
}
}
return res;
... | int main() {
// First test case
int tuple1_1[] = {4, 4};
int tuple1_2[] = {4, 4, 4};
int tuple1_3[] = {4, 4};
int tuple1_4[] = {4, 4, 4, 4};
int tuple1_5[] = {4};
int* test_list1[] = {tuple1_1, tuple1_2, tuple1_3, tuple1_4, tuple1_5};
size_t lengths1[] = {2, 3, 2, 4, 1};
ass... | O3 | c | func0:
endbr64
xor %r10d,%r10d
test %rdx,%rdx
je 14e2 <func0+0x42>
nopl 0x0(%rax)
mov (%rsi,%r10,8),%r9
test %r9,%r9
je 14d9 <func0+0x39>
mov (%rdi,%r10,8),%r8
xor %eax,%eax
cmp %ecx,(%r8,%rax,4)
je 14d0 <func0+0x30>
xor %eax,%eax
retq
nopl 0x0(%rax,%rax,1)
add $0x1,%rax
cmp ... | func0:
endbr64
mov r11, rdi
xor r10d, r10d
mov edi, 1
test rdx, rdx
jz short loc_153A
nop dword ptr [rax+00h]
loc_14E8:
mov r8, [rsi+r10*8]
mov eax, 1
mov edi, 1
test r8, r8
jz short loc_1526
mov r9, [r11+r10*8]
xor eax, eax
jmp short loc_150C
loc_1508:
cmp ed... | _BOOL8 func0(long long a1, long long a2, unsigned long long a3, int a4)
{
long long v5; // r10
_BOOL4 v6; // edi
long long v7; // r8
bool v8; // al
long long v9; // rax
int v10; // edi
v5 = 0LL;
v6 = 1;
if ( a3 )
{
while ( 1 )
{
v7 = *(_QWORD *)(a2 + 8 * v5);
v8 = 1;
v6 =... | func0:
ENDBR64
MOV R11,RDI
XOR R10D,R10D
MOV EDI,0x1
TEST RDX,RDX
JZ 0x0010153a
NOP dword ptr [RAX]
LAB_001014e8:
MOV R8,qword ptr [RSI + R10*0x8]
MOV EAX,0x1
MOV EDI,0x1
TEST R8,R8
JZ 0x00101526
MOV R9,qword ptr [R11 + R10*0x8]
XOR EAX,EAX
JMP 0x0010150c
LAB_00101508:
CMP EDI,ECX
JNZ 0x00101538
LAB_0010150c:
MOV EDI,d... | bool func0(long param_1,long param_2,ulong param_3,int param_4)
{
int iVar1;
long lVar2;
long lVar3;
ulong uVar4;
bool bVar5;
uVar4 = 0;
bVar5 = true;
if (param_3 != 0) {
do {
lVar2 = *(long *)(param_2 + uVar4 * 8);
bVar5 = true;
if (lVar2 != 0) {
lVar3 = 0;
whi... |
4,000 | func0 |
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <assert.h>
#define MAX_STRINGS 3
#define MAX_LENGTH 100
| void func0(char input[][MAX_LENGTH], char output[][MAX_LENGTH], int n) {
for(int i = 0; i < n; i++) {
int j = 0, k = 0;
while(input[i][j] != '\0') {
if(!isdigit((unsigned char)input[i][j])) {
output[i][k++] = input[i][j];
}
j++;
}
... | int main() {
char input1[MAX_STRINGS][MAX_LENGTH] = {"4words", "3letters", "4digits"};
char expected1[MAX_STRINGS][MAX_LENGTH] = {"words", "letters", "digits"};
char output1[MAX_STRINGS][MAX_LENGTH];
func0(input1, output1, MAX_STRINGS);
for(int i = 0; i < MAX_STRINGS; i++) {
assert(str... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x30,%rsp
mov %rdi,-0x18(%rbp)
mov %rsi,-0x20(%rbp)
mov %edx,-0x24(%rbp)
movl $0x0,-0xc(%rbp)
jmpq 1311 <func0+0x168>
movl $0x0,-0x8(%rbp)
movl $0x0,-0x4(%rbp)
jmpq 12a1 <func0+0xf8>
callq 10b0 <__ctype_b_loc@plt>
mov (%rax),%rcx
mov -0xc(%rb... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_18], rdi
mov [rbp+var_20], rsi
mov [rbp+var_24], edx
mov [rbp+var_C], 0
jmp loc_1311
loc_11CC:
mov [rbp+var_8], 0
mov [rbp+var_4], 0
jmp loc_12A1
loc_11DF:
call ___ctype_b_loc
mov rcx, [rax]
mov eax, [rb... | long long func0(long long a1, long long a2, int a3)
{
int v3; // eax
long long result; // rax
unsigned int i; // [rsp+24h] [rbp-Ch]
int v7; // [rsp+28h] [rbp-8h]
int v8; // [rsp+2Ch] [rbp-4h]
for ( i = 0; ; ++i )
{
result = i;
if ( (int)i >= a3 )
break;
v7 = 0;
v8 = 0;
while ( ... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x18],RDI
MOV qword ptr [RBP + -0x20],RSI
MOV dword ptr [RBP + -0x24],EDX
MOV dword ptr [RBP + -0xc],0x0
JMP 0x00101311
LAB_001011cc:
MOV dword ptr [RBP + -0x8],0x0
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001012a1
LAB_001011df:
CALL 0x001010b0
MOV RCX,... | void func0(long param_1,long param_2,int param_3)
{
ushort **ppuVar1;
int local_14;
int local_10;
int local_c;
for (local_14 = 0; local_14 < param_3; local_14 = local_14 + 1) {
local_c = 0;
for (local_10 = 0; *(char *)((long)local_14 * 100 + param_1 + (long)local_10) != '\0';
local_10 = lo... |
4,001 | func0 |
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <assert.h>
#define MAX_STRINGS 3
#define MAX_LENGTH 100
| void func0(char input[][MAX_LENGTH], char output[][MAX_LENGTH], int n) {
for(int i = 0; i < n; i++) {
int j = 0, k = 0;
while(input[i][j] != '\0') {
if(!isdigit((unsigned char)input[i][j])) {
output[i][k++] = input[i][j];
}
j++;
}
... | int main() {
char input1[MAX_STRINGS][MAX_LENGTH] = {"4words", "3letters", "4digits"};
char expected1[MAX_STRINGS][MAX_LENGTH] = {"words", "letters", "digits"};
char output1[MAX_STRINGS][MAX_LENGTH];
func0(input1, output1, MAX_STRINGS);
for(int i = 0; i < MAX_STRINGS; i++) {
assert(str... | O1 | c | func0:
endbr64
test %edx,%edx
jle 1239 <func0+0x90>
push %r14
push %r13
push %r12
push %rbp
push %rbx
mov %rsi,%rbp
lea 0x1(%rdi),%r12
lea -0x1(%rdx),%eax
lea (%rax,%rax,4),%rax
lea (%rax,%rax,4),%rax
lea 0x64(%rsi,%rax,4),%r13
mov $0x0,%r14d
jmp 1216 <func0+0x6d>
add $0x1,%rcx... | func0:
endbr64
test edx, edx
jle locret_1239
push r14
push r13
push r12
push rbp
push rbx
mov rbp, rsi
lea r12, [rdi+1]
lea eax, [rdx-1]
lea rax, [rax+rax*4]
lea rax, [rax+rax*4]
lea r13, [rsi+rax*4+64h]
mov r14d, 0
jmp short loc_1216
loc_11DC:
add rcx, 1
movzx ... | void func0(long long a1, long long a2, int a3)
{
long long v3; // rbp
unsigned __int8 *v4; // r12
long long v5; // r13
unsigned __int8 *v6; // rcx
unsigned __int8 v7; // bl
int v8; // edi
_QWORD *v9; // rax
if ( a3 > 0 )
{
v3 = a2;
v4 = (unsigned __int8 *)(a1 + 1);
v5 = a2 + 100LL * (uns... | func0:
ENDBR64
TEST EDX,EDX
JLE 0x00101239
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBP,RSI
LEA R12,[RDI + 0x1]
LEA EAX,[RDX + -0x1]
LEA RAX,[RAX + RAX*0x4]
LEA RAX,[RAX + RAX*0x4]
LEA R13,[RSI + RAX*0x4 + 0x64]
MOV R14D,0x0
JMP 0x00101216
LAB_001011dc:
ADD RCX,0x1
MOVZX EBX,byte ptr [RCX + -0x1]
TEST BL,BL
JZ ... | void func0(long param_1,long param_2,int param_3)
{
long lVar1;
ushort **ppuVar2;
byte *pbVar3;
byte bVar4;
byte *pbVar5;
int iVar6;
if (0 < param_3) {
pbVar5 = (byte *)(param_1 + 1);
lVar1 = param_2 + 100;
do {
bVar4 = pbVar5[-1];
iVar6 = 0;
if (bVar4 != 0) {
ppu... |
4,002 | func0 |
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <assert.h>
#define MAX_STRINGS 3
#define MAX_LENGTH 100
| void func0(char input[][MAX_LENGTH], char output[][MAX_LENGTH], int n) {
for(int i = 0; i < n; i++) {
int j = 0, k = 0;
while(input[i][j] != '\0') {
if(!isdigit((unsigned char)input[i][j])) {
output[i][k++] = input[i][j];
}
j++;
}
... | int main() {
char input1[MAX_STRINGS][MAX_LENGTH] = {"4words", "3letters", "4digits"};
char expected1[MAX_STRINGS][MAX_LENGTH] = {"words", "letters", "digits"};
char output1[MAX_STRINGS][MAX_LENGTH];
func0(input1, output1, MAX_STRINGS);
for(int i = 0; i < MAX_STRINGS; i++) {
assert(str... | O2 | c | func0:
endbr64
test %edx,%edx
jle 14bb <func0+0x8b>
push %r13
lea -0x1(%rdx),%eax
lea 0x1(%rdi),%r13
push %r12
lea (%rax,%rax,4),%rax
mov %rsi,%r12
push %rbp
lea (%rax,%rax,4),%rax
push %rbx
lea 0x65(%rdi,%rax,4),%rbp
sub $0x8,%rsp
nopl (%rax)
movzbl -0x1(%r13),%ebx
xor %edi,%edi
... | func0:
endbr64
test edx, edx
jle locret_145B
push r13
lea eax, [rdx-1]
lea r13, [rdi+1]
push r12
lea rax, [rax+rax*4]
mov r12, rsi
push rbp
lea rax, [rax+rax*4]
push rbx
lea rbp, [rdi+rax*4+65h]
sub rsp, 8
nop dword ptr [rax]
loc_1400:
movzx ebx, byte ptr [r13-1]
xor... | void func0(long long a1, long long a2, int a3)
{
unsigned __int8 *v3; // r13
long long v5; // rbp
unsigned __int8 v6; // bl
int v7; // edi
_QWORD *v8; // rax
unsigned __int8 *v9; // rcx
long long v10; // rdx
if ( a3 > 0 )
{
v3 = (unsigned __int8 *)(a1 + 1);
v5 = a1 + 100LL * (unsigned int)(a... | func0:
ENDBR64
TEST EDX,EDX
JLE 0x0010145b
PUSH R13
LEA EAX,[RDX + -0x1]
LEA R13,[RDI + 0x1]
PUSH R12
LEA RAX,[RAX + RAX*0x4]
MOV R12,RSI
PUSH RBP
LEA RAX,[RAX + RAX*0x4]
PUSH RBX
LEA RBP,[RDI + RAX*0x4 + 0x65]
SUB RSP,0x8
NOP dword ptr [RAX]
LAB_00101400:
MOVZX EBX,byte ptr [R13 + -0x1]
XOR EDI,EDI
TEST BL,BL
JZ 0x001... | void func0(long param_1,long param_2,int param_3)
{
ushort **ppuVar1;
byte *pbVar2;
long lVar3;
byte bVar4;
int iVar5;
byte *pbVar6;
if (0 < param_3) {
pbVar6 = (byte *)(param_1 + 1);
do {
bVar4 = pbVar6[-1];
iVar5 = 0;
if (bVar4 != 0) {
ppuVar1 = __ctype_b_loc();
... |
4,003 | func0 |
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <assert.h>
#define MAX_STRINGS 3
#define MAX_LENGTH 100
| void func0(char input[][MAX_LENGTH], char output[][MAX_LENGTH], int n) {
for(int i = 0; i < n; i++) {
int j = 0, k = 0;
while(input[i][j] != '\0') {
if(!isdigit((unsigned char)input[i][j])) {
output[i][k++] = input[i][j];
}
j++;
}
... | int main() {
char input1[MAX_STRINGS][MAX_LENGTH] = {"4words", "3letters", "4digits"};
char expected1[MAX_STRINGS][MAX_LENGTH] = {"words", "letters", "digits"};
char output1[MAX_STRINGS][MAX_LENGTH];
func0(input1, output1, MAX_STRINGS);
for(int i = 0; i < MAX_STRINGS; i++) {
assert(str... | O3 | c | func0:
endbr64
test %edx,%edx
jle 14db <func0+0xab>
push %r13
lea -0x1(%rdx),%eax
lea 0x1(%rdi),%r13
push %r12
lea (%rax,%rax,4),%rax
mov %rsi,%r12
push %rbp
lea (%rax,%rax,4),%rax
push %rbx
lea 0x65(%rdi,%rax,4),%rbp
sub $0x8,%rsp
nopl (%rax)
movzbl -0x1(%r13),%ebx
xor %esi,%esi
... | func0:
endbr64
test edx, edx
jle locret_14CB
push r13
movsxd rdx, edx
lea r13, [rdi+1]
push r12
lea rax, [rdx+rdx*4]
mov r12, rsi
push rbp
lea rax, [rax+rax*4]
push rbx
lea rbp, [rsi+rax*4]
sub rsp, 8
nop dword ptr [rax+00h]
loc_1460:
movzx ebx, byte ptr [r13-1]
xor ... | void func0(long long a1, long long a2, int a3)
{
unsigned __int8 *v3; // r13
long long v4; // r12
long long v5; // rbp
unsigned __int8 v6; // bl
long long v7; // rcx
const unsigned __int16 **v8; // rax
unsigned __int8 *v9; // rdx
if ( a3 > 0 )
{
v3 = (unsigned __int8 *)(a1 + 1);
v4 = a2;
... | func0:
ENDBR64
TEST EDX,EDX
JLE 0x001014cb
PUSH R13
MOVSXD RDX,EDX
LEA R13,[RDI + 0x1]
PUSH R12
LEA RAX,[RDX + RDX*0x4]
MOV R12,RSI
PUSH RBP
LEA RAX,[RAX + RAX*0x4]
PUSH RBX
LEA RBP,[RSI + RAX*0x4]
SUB RSP,0x8
NOP dword ptr [RAX]
LAB_00101460:
MOVZX EBX,byte ptr [R13 + -0x1]
XOR ECX,ECX
TEST BL,BL
JZ 0x001014ae
CALL 0x... | void func0(long param_1,long param_2,int param_3)
{
long lVar1;
ushort **ppuVar2;
long lVar3;
byte *pbVar4;
byte bVar5;
byte *pbVar6;
if (param_3 < 1) {
return;
}
pbVar6 = (byte *)(param_1 + 1);
lVar1 = param_2 + (long)param_3 * 100;
do {
bVar5 = pbVar6[-1];
lVar3 = 0;
if (bVar... |
4,004 | func0 | #include <assert.h>
| int func0(int n, int k) {
if (k > n)
return 0;
if (k == 0 || k == n)
return 1;
return func0(n-1, k-1) + func0(n-1, k);
}
| int main() {
assert(func0(5, 2) == 10);
assert(func0(4, 3) == 4);
assert(func0(3, 2) == 3);
assert(func0(14, 6) == 3003);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x18,%rsp
mov %edi,-0x14(%rbp)
mov %esi,-0x18(%rbp)
mov -0x18(%rbp),%eax
cmp -0x14(%rbp),%eax
jle 116b <func0+0x22>
mov $0x0,%eax
jmp 11ab <func0+0x62>
cmpl $0x0,-0x18(%rbp)
je 1179 <func0+0x30>
mov -0x18(%rbp),%eax
cmp -0x... | func0:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 18h
mov [rbp+var_14], edi
mov [rbp+var_18], esi
mov eax, [rbp+var_18]
cmp eax, [rbp+var_14]
jle short loc_116B
mov eax, 0
jmp short loc_11AB
loc_116B:
cmp [rbp+var_18], 0
jz short loc_1179
mov eax, [rbp+var_18]... | long long func0(int a1, unsigned int a2)
{
int v3; // ebx
if ( (int)a2 > a1 )
return 0LL;
if ( !a2 || a2 == a1 )
return 1LL;
v3 = func0((unsigned int)(a1 - 1), a2 - 1);
return v3 + (unsigned int)func0((unsigned int)(a1 - 1), a2);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x18
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x18],ESI
MOV EAX,dword ptr [RBP + -0x18]
CMP EAX,dword ptr [RBP + -0x14]
JLE 0x0010116b
MOV EAX,0x0
JMP 0x001011ab
LAB_0010116b:
CMP dword ptr [RBP + -0x18],0x0
JZ 0x00101179
MOV EAX,dword ptr [RBP + -0x18]
... | int func0(int param_1,int param_2)
{
int iVar1;
int iVar2;
if (param_1 < param_2) {
iVar2 = 0;
}
else if ((param_2 == 0) || (param_2 == param_1)) {
iVar2 = 1;
}
else {
iVar1 = func0(param_1 + -1,param_2 + -1);
iVar2 = func0(param_1 + -1,param_2);
iVar2 = iVar2 + iVar1;
}
return... |
4,005 | func0 | #include <assert.h>
| int func0(int n, int k) {
if (k > n)
return 0;
if (k == 0 || k == n)
return 1;
return func0(n-1, k-1) + func0(n-1, k);
}
| int main() {
assert(func0(5, 2) == 10);
assert(func0(4, 3) == 4);
assert(func0(3, 2) == 3);
assert(func0(14, 6) == 3003);
return 0;
}
| O1 | c | func0:
endbr64
mov $0x0,%eax
cmp %edi,%esi
jg 118c <func0+0x43>
push %r12
push %rbp
push %rbx
mov %esi,%ebx
test %esi,%esi
je 1182 <func0+0x39>
cmp %edi,%esi
je 1182 <func0+0x39>
lea -0x1(%rdi),%ebp
lea -0x1(%rsi),%esi
mov %ebp,%edi
callq 1149 <func0>
mov %eax,%r12d
mov %... | func0:
endbr64
mov eax, 0
cmp esi, edi
jg short locret_118C
push r12
push rbp
push rbx
mov ebx, esi
test esi, esi
jz short loc_1182
cmp esi, edi
jz short loc_1182
lea ebp, [rdi-1]
lea esi, [rsi-1]
mov edi, ebp
call func0
mov r12d, eax
mov esi, ebx
mov ... | long long func0(int a1, unsigned int a2)
{
long long result; // rax
int v3; // r12d
result = 0LL;
if ( (int)a2 <= a1 )
{
if ( !a2 || a2 == a1 )
{
return 1LL;
}
else
{
v3 = func0((unsigned int)(a1 - 1), a2 - 1);
return v3 + (unsigned int)func0((unsigned int)(a1 - 1), a2)... | func0:
ENDBR64
MOV EAX,0x0
CMP ESI,EDI
JG 0x0010118c
PUSH R12
PUSH RBP
PUSH RBX
MOV EBX,ESI
TEST ESI,ESI
JZ 0x00101182
CMP ESI,EDI
JZ 0x00101182
LEA EBP,[RDI + -0x1]
LEA ESI,[RSI + -0x1]
MOV EDI,EBP
CALL 0x00101149
MOV R12D,EAX
MOV ESI,EBX
MOV EDI,EBP
CALL 0x00101149
ADD EAX,R12D
JMP 0x00101187
LAB_00101182:
MOV EAX,0x... | int func0(int param_1,int param_2)
{
int iVar1;
int iVar2;
if (param_2 <= param_1) {
if ((param_2 == 0) || (param_2 == param_1)) {
iVar2 = 1;
}
else {
iVar1 = func0(param_1 + -1,param_2 + -1);
iVar2 = func0(param_1 + -1,param_2);
iVar2 = iVar2 + iVar1;
}
return iVar... |
4,006 | func0 | #include <assert.h>
| int func0(int n, int k) {
if (k > n)
return 0;
if (k == 0 || k == n)
return 1;
return func0(n-1, k-1) + func0(n-1, k);
}
| int main() {
assert(func0(5, 2) == 10);
assert(func0(4, 3) == 4);
assert(func0(3, 2) == 3);
assert(func0(14, 6) == 3003);
return 0;
}
| O2 | c | func0:
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
cmp %esi,%edi
jl 1290 <func0+0x50>
je 12a8 <func0+0x68>
mov %esi,%ebp
test %esi,%esi
je 12a8 <func0+0x68>
mov %edi,%ebx
lea -0x1(%rsi),%r13d
xor %r12d,%r12d
sub $0x1,%ebx
mov %r13d,%esi
mov %ebx,%edi
ca... | func0:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 68h
mov [rsp+98h+var_84], edi
cmp edi, esi
jl loc_16CC
mov r11d, esi
test esi, esi
jz loc_16D4
cmp edi, esi
jz loc_16D4
xor r10d, r10d
mov r9d, r11d
lea esi, [rsi-9]
mov ... | long long func0(int a1, int a2)
{
int v2; // r9d
unsigned int v3; // r11d
int v4; // eax
int v5; // edx
int v6; // r11d
int v7; // r10d
int v8; // edi
int v9; // r11d
int v10; // r8d
int v11; // r9d
int v12; // r10d
int v13; // r11d
int v14; // r8d
int v15; // r14d
int v16; // r9d
int v... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x68
MOV dword ptr [RSP + 0x14],EDI
CMP EDI,ESI
JL 0x001016cc
MOV R11D,ESI
TEST ESI,ESI
JZ 0x001016d4
CMP EDI,ESI
JZ 0x001016d4
XOR R10D,R10D
MOV R9D,R11D
LEA ESI,[RSI + -0x9]
MOV R11D,R10D
LAB_0010127d:
MOV EDX,dword ptr [RSP + 0x14]
MOV EAX,... | int func0(int param_1,int param_2)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
int iVar6;
int iVar7;
int iVar8;
int iVar9;
int iVar10;
int iVar11;
int iVar12;
int iVar13;
int iVar14;
int iVar15;
int iVar16;
int iVar17;
int iVar18;
int iVar19;
int iVar20;
int iVar2... |
4,007 | func0 | #include <assert.h>
| int func0(int n, int k) {
if (k > n)
return 0;
if (k == 0 || k == n)
return 1;
return func0(n-1, k-1) + func0(n-1, k);
}
| int main() {
assert(func0(5, 2) == 10);
assert(func0(4, 3) == 4);
assert(func0(3, 2) == 3);
assert(func0(14, 6) == 3003);
return 0;
}
| O3 | c | func0:
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
cmp %esi,%edi
jl 1290 <func0+0x50>
je 12a8 <func0+0x68>
mov %esi,%ebp
test %esi,%esi
je 12a8 <func0+0x68>
mov %edi,%ebx
lea -0x1(%rsi),%r13d
xor %r12d,%r12d
sub $0x1,%ebx
mov %r13d,%esi
mov %ebx,%edi
ca... | func0:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 68h
cmp edi, esi
jl loc_16CB
mov r9d, esi
test esi, esi
jz loc_16D2
cmp edi, esi
jz loc_16D2
lea eax, [rsi-9]
xor ebp, ebp
mov ebx, edi
mov [rsp+98h+var_6C], eax
loc_1278:
mo... | long long func0(int a1, int a2)
{
int v2; // r9d
unsigned int v3; // ebp
int v4; // ebx
int v5; // eax
int v6; // r14d
int v7; // r13d
int v8; // ebp
int v9; // ecx
int v10; // r15d
int v11; // r12d
int v12; // r14d
int v13; // ebx
int v14; // eax
int v15; // ebp
int v16; // r15d
int v1... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x68
CMP EDI,ESI
JL 0x001016cb
MOV R9D,ESI
TEST ESI,ESI
JZ 0x001016d2
CMP EDI,ESI
JZ 0x001016d2
LEA EAX,[RSI + -0x9]
XOR EBP,EBP
MOV EBX,EDI
MOV dword ptr [RSP + 0x2c],EAX
LAB_00101278:
MOV EAX,EBX
SUB EBX,0x1
CMP R9D,EAX
JG 0x0010158c
JZ 0x00... | int func0(int param_1,int param_2)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
int iVar6;
int iVar7;
int iVar8;
int iVar9;
int iVar10;
int iVar11;
int iVar12;
int iVar13;
int iVar14;
int iVar15;
int iVar16;
int iVar17;
int iVar18;
int iVar19;
int iVar20;
int iVar2... |
4,008 | func0 |
#include <assert.h>
| int func0(int arr[], int arr_size) {
for (int i = 0; i < arr_size; i++) {
int count = 0;
for (int j = 0; j < arr_size; j++) {
if (arr[i] == arr[j]) {
count++;
}
}
if (count % 2 != 0) {
return arr[i];
}
}
... | int main() {
int array1[] = {1, 2, 3, 1, 2, 3, 1};
assert(func0(array1, 7) == 1);
int array2[] = {1, 2, 3, 2, 3, 1, 3};
assert(func0(array2, 7) == 3);
int array3[] = {2, 3, 5, 4, 5, 2, 4, 3, 5, 2, 4, 4, 2};
assert(func0(array3, 13) == 5);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
movl $0x0,-0xc(%rbp)
jmp 11f7 <func0+0x8e>
movl $0x0,-0x8(%rbp)
movl $0x0,-0x4(%rbp)
jmp 11c9 <func0+0x60>
mov -0xc(%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_C], 0
jmp short loc_11F7
loc_1181:
mov [rbp+var_8], 0
mov [rbp+var_4], 0
jmp short loc_11C9
loc_1191:
mov eax, [rbp+var_C]
cdqe
lea rdx, ds:0[rax*4]
mov rax, [rbp+var_18]
add ... | long long func0(long long a1, int a2)
{
int i; // [rsp+10h] [rbp-Ch]
char v4; // [rsp+14h] [rbp-8h]
int j; // [rsp+18h] [rbp-4h]
for ( i = 0; i < a2; ++i )
{
v4 = 0;
for ( j = 0; j < a2; ++j )
{
if ( *(_DWORD *)(4LL * i + a1) == *(_DWORD *)(4LL * j + a1) )
++v4;
}
if ( (v4 ... | 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
JMP 0x001011f7
LAB_00101181:
MOV dword ptr [RBP + -0x8],0x0
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001011c9
LAB_00101191:
MOV EAX,dword ptr [RBP + -0xc]
CDQE
LEA RDX,[RAX*0x4]
MOV RAX,qword p... | int4 func0(long param_1,int param_2)
{
byte bVar1;
int local_14;
int local_c;
local_14 = 0;
while( true ) {
if (param_2 <= local_14) {
return 0xffffffff;
}
bVar1 = 0;
for (local_c = 0; local_c < param_2; local_c = local_c + 1) {
if (*(int *)(param_1 + (long)local_14 * 4) == *(i... |
4,009 | func0 |
#include <assert.h>
| int func0(int arr[], int arr_size) {
for (int i = 0; i < arr_size; i++) {
int count = 0;
for (int j = 0; j < arr_size; j++) {
if (arr[i] == arr[j]) {
count++;
}
}
if (count % 2 != 0) {
return arr[i];
}
}
... | int main() {
int array1[] = {1, 2, 3, 1, 2, 3, 1};
assert(func0(array1, 7) == 1);
int array2[] = {1, 2, 3, 2, 3, 1, 3};
assert(func0(array2, 7) == 3);
int array3[] = {2, 3, 5, 4, 5, 2, 4, 3, 5, 2, 4, 4, 2};
assert(func0(array3, 13) == 5);
return 0;
}
| O1 | c | func0:
endbr64
test %esi,%esi
jle 11c4 <func0+0x5b>
push %rbx
lea -0x1(%rsi),%r11d
mov %rdi,%rbx
lea 0x4(%rdi,%r11,4),%r8
mov $0x0,%r9d
jmp 1197 <func0+0x2e>
test $0x1,%dl
jne 11bb <func0+0x52>
lea 0x1(%r9),%rax
cmp %r11,%r9
je 11ca <func0+0x61>
mov %rax,%r9
mov %r9d,%r10d
mov... | func0:
endbr64
test esi, esi
jle short loc_11BE
mov r11d, esi
lea eax, [rsi-1]
lea r8, [rdi+rax*4+4]
mov r9d, 0
jmp short loc_1192
loc_1184:
test dl, 1
jnz short loc_11B6
add r9, 1
cmp r9, r11
jz short loc_11C4
loc_1192:
mov r10d, r9d
mov esi, [rdi+r9*4]
mov ra... | long long func0(_DWORD *a1, int a2)
{
long long i; // r9
_DWORD *v3; // rax
char v4; // dl
if ( a2 <= 0 )
return 0xFFFFFFFFLL;
for ( i = 0LL; i != a2; ++i )
{
v3 = a1;
v4 = 0;
do
v4 += a1[i] == *v3++;
while ( v3 != &a1[a2 - 1 + 1] );
if ( (v4 & 1) != 0 )
return (unsigne... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x001011be
MOV R11D,ESI
LEA EAX,[RSI + -0x1]
LEA R8,[RDI + RAX*0x4 + 0x4]
MOV R9D,0x0
JMP 0x00101192
LAB_00101184:
TEST DL,0x1
JNZ 0x001011b6
ADD R9,0x1
CMP R9,R11
JZ 0x001011c4
LAB_00101192:
MOV R10D,R9D
MOV ESI,dword ptr [RDI + R9*0x4]
MOV RAX,RDI
MOV EDX,0x0
LAB_001011a1:
CMP ESI,dwor... | int func0(int *param_1,uint param_2)
{
int *piVar1;
bool bVar2;
ulong uVar3;
if ((int)param_2 < 1) {
return -1;
}
uVar3 = 0;
while( true ) {
bVar2 = false;
piVar1 = param_1;
do {
bVar2 = (bool)(bVar2 ^ param_1[uVar3] == *piVar1);
piVar1 = piVar1 + 1;
} while (piVar1 != ... |
4,010 | func0 |
#include <assert.h>
| int func0(int arr[], int arr_size) {
for (int i = 0; i < arr_size; i++) {
int count = 0;
for (int j = 0; j < arr_size; j++) {
if (arr[i] == arr[j]) {
count++;
}
}
if (count % 2 != 0) {
return arr[i];
}
}
... | int main() {
int array1[] = {1, 2, 3, 1, 2, 3, 1};
assert(func0(array1, 7) == 1);
int array2[] = {1, 2, 3, 2, 3, 1, 3};
assert(func0(array2, 7) == 3);
int array3[] = {2, 3, 5, 4, 5, 2, 4, 3, 5, 2, 4, 4, 2};
assert(func0(array3, 13) == 5);
return 0;
}
| O2 | c | func0:
endbr64
test %esi,%esi
jle 1331 <func0+0x41>
lea -0x1(%rsi),%eax
mov %rdi,%r9
lea 0x4(%rdi,%rax,4),%rsi
nopl 0x0(%rax,%rax,1)
mov (%r9),%r8d
mov %rdi,%rax
xor %edx,%edx
xor %ecx,%ecx
cmp (%rax),%r8d
sete %cl
add $0x4,%rax
add %ecx,%edx
cmp %rsi,%rax
jne 1310 <func0+0x... | func0:
endbr64
test esi, esi
jle short loc_1331
lea eax, [rsi-1]
mov r9, rdi
lea rsi, [rdi+rax*4+4]
nop dword ptr [rax+rax+00h]
loc_1308:
mov r8d, [r9]
mov rax, rdi
xor edx, edx
loc_1310:
xor ecx, ecx
cmp r8d, [rax]
setz cl
add rax, 4
add edx, ecx
cmp rax, rsi
j... | long long func0(unsigned int *a1, int a2)
{
unsigned int *v2; // r9
long long v3; // rsi
unsigned int v4; // r8d
unsigned int *v5; // rax
char v6; // dl
char v7; // cl
if ( a2 <= 0 )
{
return (unsigned int)-1;
}
else
{
v2 = a1;
v3 = (long long)&a1[a2 - 1 + 1];
while ( 1 )
{
... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x00101331
LEA EAX,[RSI + -0x1]
MOV R9,RDI
LEA RSI,[RDI + RAX*0x4 + 0x4]
NOP dword ptr [RAX + RAX*0x1]
LAB_00101308:
MOV R8D,dword ptr [R9]
MOV RAX,RDI
XOR EDX,EDX
LAB_00101310:
XOR ECX,ECX
CMP R8D,dword ptr [RAX]
SETZ CL
ADD RAX,0x4
ADD EDX,ECX
CMP RAX,RSI
JNZ 0x00101310
AND EDX,0x1
JNZ... | int func0(int *param_1,int param_2)
{
int iVar1;
int *piVar2;
bool bVar3;
int *piVar4;
if (0 < param_2) {
piVar4 = param_1;
do {
bVar3 = false;
piVar2 = param_1;
do {
iVar1 = *piVar2;
piVar2 = piVar2 + 1;
bVar3 = (bool)(bVar3 ^ *piVar4 == iVar1);
} w... |
4,011 | func0 |
#include <assert.h>
| int func0(int arr[], int arr_size) {
for (int i = 0; i < arr_size; i++) {
int count = 0;
for (int j = 0; j < arr_size; j++) {
if (arr[i] == arr[j]) {
count++;
}
}
if (count % 2 != 0) {
return arr[i];
}
}
... | int main() {
int array1[] = {1, 2, 3, 1, 2, 3, 1};
assert(func0(array1, 7) == 1);
int array2[] = {1, 2, 3, 2, 3, 1, 3};
assert(func0(array2, 7) == 3);
int array3[] = {2, 3, 5, 4, 5, 2, 4, 3, 5, 2, 4, 4, 2};
assert(func0(array3, 13) == 5);
return 0;
}
| O3 | c | func0:
endbr64
test %esi,%esi
jle 13c6 <func0+0x106>
mov %esi,%edx
push %r12
lea -0x1(%rsi),%eax
mov %rdi,%r9
shr $0x2,%edx
push %rbp
lea 0x4(%rdi,%rax,4),%r12
mov %rax,%rbp
push %rbx
shl $0x4,%rdx
mov %esi,%ebx
add %rdi,%rdx
and $0xfffffffc,%ebx
mov (%r9),%r8d
cmp $0x3,%e... | func0:
endbr64
test esi, esi
jle loc_13B6
mov edx, esi
push r12
movsxd rax, esi
mov r12d, esi
shr edx, 2
push rbp
mov r8, rdi
mov r9d, esi
shl rdx, 4
push rbx
lea r11d, [rsi-1]
lea rbx, [rdi+rax*4]
add rdx, rdi
and r12d, 0FFFFFFFCh
nop dword ptr [rax+00h]
loc... | long long func0(unsigned int *a1, int a2)
{
const __m128i *v2; // r8
unsigned int v4; // r11d
unsigned int *v5; // rbx
const __m128i *v6; // rdx
unsigned int v7; // r12d
unsigned int v8; // esi
const __m128i *v9; // rax
__m128i v10; // xmm0
__m128i v11; // xmm2
__m128i v12; // xmm1
signed int v13... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x001013b6
MOV EDX,ESI
PUSH R12
MOVSXD RAX,ESI
MOV R12D,ESI
SHR EDX,0x2
PUSH RBP
MOV R8,RDI
MOV R9D,ESI
SHL RDX,0x4
PUSH RBX
LEA R11D,[RSI + -0x1]
LEA RBX,[RDI + RAX*0x4]
ADD RDX,RDI
AND R12D,0xfffffffc
NOP dword ptr [RAX]
LAB_001012f8:
MOV ESI,dword ptr [RDI]
CMP R11D,0x2
JBE 0x001013b0... | int func0(int *param_1,uint param_2)
{
int iVar1;
int iVar2;
int *piVar3;
int *piVar4;
int *piVar5;
bool bVar6;
int *piVar7;
uint uVar8;
int *piVar9;
byte bVar10;
byte bVar11;
byte bVar12;
byte bVar13;
if ((int)param_2 < 1) {
return -1;
}
piVar9 = param_1;
do {
iVar1 = *piV... |
4,012 | func0 |
#include <stdio.h>
#include <string.h>
#include <assert.h>
int check_Equality(char *s, int start, int length) {
return (s[start] == s[start + length - 1]);
}
| int func0(char *s) {
int result = 0;
int n = strlen(s);
for (int i = 0; i < n; i++) {
for (int j = 1; j <= n - i; j++) {
if (check_Equality(s, i, j)) {
result++;
}
}
}
return result;
}
| int main() {
assert(func0("abc") == 3);
assert(func0("abcda") == 6);
assert(func0("ab") == 2);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %rdi,-0x18(%rbp)
movl $0x0,-0x10(%rbp)
mov -0x18(%rbp),%rax
mov %rax,%rdi
callq 1060 <strlen@plt>
mov %eax,-0x4(%rbp)
movl $0x0,-0xc(%rbp)
jmp 1214 <func0+0x67>
movl $0x1,-0x8(%rbp)
jmp 1205 <func0+0x58>
mov -0x8(%rbp),%edx
mo... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+s], rdi
mov [rbp+var_10], 0
mov rax, [rbp+s]
mov rdi, rax; s
call _strlen
mov [rbp+var_4], eax
mov [rbp+var_C], 0
jmp short loc_1214
loc_11DC:
mov [rbp+var_8], 1
jmp short loc_1205
loc_11E5:
mov edx, [rbp+va... | long long func0(const char *a1)
{
unsigned int v2; // [rsp+10h] [rbp-10h]
unsigned int i; // [rsp+14h] [rbp-Ch]
int j; // [rsp+18h] [rbp-8h]
int v5; // [rsp+1Ch] [rbp-4h]
v2 = 0;
v5 = strlen(a1);
for ( i = 0; (int)i < v5; ++i )
{
for ( j = 1; j <= (int)(v5 - i); ++j )
{
if ( (unsigned in... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x10],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,RAX
CALL 0x00101060
MOV dword ptr [RBP + -0x4],EAX
MOV dword ptr [RBP + -0xc],0x0
JMP 0x00101214
LAB_001011dc:
MOV dword ptr [RBP + -0x8],0x1
JMP 0x00101205
LAB_001011... | int func0(char *param_1)
{
int iVar1;
size_t sVar2;
int4 local_18;
int4 local_14;
int4 local_10;
local_18 = 0;
sVar2 = strlen(param_1);
for (local_14 = 0; local_14 < (int)sVar2; local_14 = local_14 + 1) {
for (local_10 = 1; local_10 <= (int)sVar2 - local_14; local_10 = local_10 + 1) {
iVar... |
4,013 | func0 |
#include <stdio.h>
#include <string.h>
#include <assert.h>
int check_Equality(char *s, int start, int length) {
return (s[start] == s[start + length - 1]);
}
| int func0(char *s) {
int result = 0;
int n = strlen(s);
for (int i = 0; i < n; i++) {
for (int j = 1; j <= n - i; j++) {
if (check_Equality(s, i, j)) {
result++;
}
}
}
return result;
}
| int main() {
assert(func0("abc") == 3);
assert(func0("abcda") == 6);
assert(func0("ab") == 2);
return 0;
}
| O1 | c | func0:
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
mov %rdi,%r14
mov $0xffffffffffffffff,%rcx
mov $0x0,%eax
repnz scas %es:(%rdi),%al
mov %rcx,%rax
not %rax
lea -0x1(%rax),%r15
test %r15d,%r15d
jle 11db <func0+0x77>
add $0x1,%r15d
mov %r15d,%r12d
mov $... | func0:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov r14, rdi
call _strlen
test eax, eax
jle short loc_11EB
lea r15d, [rax+1]
mov r12d, r15d
mov ebp, 0
jmp short loc_11D5
loc_11B0:
mov edx, ebx
mov esi, r13d
mov rdi, r14
call... | long long func0(long long a1)
{
int v1; // eax
int v2; // r15d
int v3; // r12d
unsigned int v4; // ebp
unsigned int v5; // ebx
v1 = strlen();
if ( v1 <= 0 )
{
return 0;
}
else
{
v2 = v1 + 1;
v3 = v1 + 1;
v4 = 0;
do
{
v5 = 1;
if ( v3 - 1 > 0 )
{
d... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV R14,RDI
CALL 0x00101060
TEST EAX,EAX
JLE 0x001011eb
LEA R15D,[RAX + 0x1]
MOV R12D,R15D
MOV EBP,0x0
JMP 0x001011d5
LAB_001011b0:
MOV EDX,EBX
MOV ESI,R13D
MOV RDI,R14
CALL 0x00101169
CMP EAX,0x1
SBB EBP,-0x1
ADD EBX,0x1
CMP EBX,R12D
JNZ ... | int func0(char *param_1)
{
int iVar1;
size_t sVar2;
int iVar3;
int iVar4;
int iVar5;
int iVar6;
sVar2 = strlen(param_1);
if ((int)sVar2 < 1) {
iVar4 = 0;
}
else {
iVar6 = (int)sVar2 + 1;
iVar4 = 0;
iVar5 = iVar6;
do {
iVar3 = 1;
if (0 < iVar5 + -1) {
do {
... |
4,014 | func0 |
#include <stdio.h>
#include <string.h>
#include <assert.h>
int check_Equality(char *s, int start, int length) {
return (s[start] == s[start + length - 1]);
}
| int func0(char *s) {
int result = 0;
int n = strlen(s);
for (int i = 0; i < n; i++) {
for (int j = 1; j <= n - i; j++) {
if (check_Equality(s, i, j)) {
result++;
}
}
}
return result;
}
| int main() {
assert(func0("abc") == 3);
assert(func0("abcda") == 6);
assert(func0("ab") == 2);
return 0;
}
| O2 | c | func0:
endbr64
push %rbx
mov %rdi,%rbx
callq 1060 <strlen@plt>
test %eax,%eax
jle 1292 <func0+0x62>
mov %eax,%r10d
mov %rbx,%rdi
xor %r9d,%r9d
xor %r8d,%r8d
lea -0x1(%rax),%r11d
nopl 0x0(%rax)
mov %r11d,%ecx
movzbl (%rdi),%esi
mov %rdi,%rax
add $0x1,%rdi
sub %r9d,%ecx
add %rdi... | func0:
endbr64
push rbx
mov rbx, rdi
call _strlen
test eax, eax
jle short loc_1292
mov r10d, eax
mov rdi, rbx
xor r9d, r9d
xor r8d, r8d
lea r11d, [rax-1]
nop dword ptr [rax+00000000h]
loc_1258:
mov ecx, r11d
movzx esi, byte ptr [rdi]
mov rax, rdi
add rdi, 1
sub ... | long long func0(char *a1)
{
int v1; // eax
int v2; // r10d
int v3; // r9d
unsigned int v4; // r8d
int v5; // r11d
char v6; // si
char *v7; // rax
int v8; // edx
v1 = strlen();
if ( v1 <= 0 )
return 0LL;
v2 = v1;
v3 = 0;
v4 = 0;
v5 = v1 - 1;
do
{
v6 = *a1;
v7 = a1++;
do
... | func0:
ENDBR64
PUSH RBX
MOV RBX,RDI
CALL 0x00101060
TEST EAX,EAX
JLE 0x00101292
MOV R10D,EAX
MOV RDI,RBX
XOR R9D,R9D
XOR R8D,R8D
LEA R11D,[RAX + -0x1]
NOP dword ptr [RAX]
LAB_00101258:
MOV ECX,R11D
MOVZX ESI,byte ptr [RDI]
MOV RAX,RDI
ADD RDI,0x1
SUB ECX,R9D
ADD RCX,RDI
NOP dword ptr [RAX + RAX*0x1]
LAB_00101270:
XOR E... | int func0(char *param_1)
{
char cVar1;
char cVar2;
int iVar3;
size_t sVar4;
char *pcVar5;
int iVar6;
int iVar7;
sVar4 = strlen(param_1);
iVar3 = (int)sVar4;
if (0 < iVar3) {
iVar7 = 0;
iVar6 = 0;
do {
cVar2 = *param_1;
pcVar5 = param_1 + 1;
do {
cVar1 = *par... |
4,015 | func0 |
#include <stdio.h>
#include <string.h>
#include <assert.h>
int check_Equality(char *s, int start, int length) {
return (s[start] == s[start + length - 1]);
}
| int func0(char *s) {
int result = 0;
int n = strlen(s);
for (int i = 0; i < n; i++) {
for (int j = 1; j <= n - i; j++) {
if (check_Equality(s, i, j)) {
result++;
}
}
}
return result;
}
| int main() {
assert(func0("abc") == 3);
assert(func0("abcda") == 6);
assert(func0("ab") == 2);
return 0;
}
| O3 | c | func0:
endbr64
push %rbp
push %rbx
mov %rdi,%rbx
sub $0x8,%rsp
callq 1060 <strlen@plt>
test %eax,%eax
jle 14ea <func0+0x2ba>
movdqa 0xe3e(%rip),%xmm5
mov %rax,%rdx
mov %eax,%r11d
mov %eax,%ebp
mov %rbx,%rdi
xor %esi,%esi
pxor %xmm4,%xmm4
xor %r9d,%r9d
pxor %xmm3,%xmm3
nopw 0x0(%r... | func0:
endbr64
push r14
push r13
push r12
push rbp
push rbx
mov rbx, rdi
call _strlen
test eax, eax
jle loc_151D
mov rcx, rax
mov r10, rbx
xor r11d, r11d
xor edi, edi
pxor xmm6, xmm6
pxor xmm5, xmm5
pxor xmm4, xmm4
pxor xmm3, xmm3
nop word ptr [rax+rax+000000... | long long func0(const char *a1)
{
int v2; // eax
int v3; // ecx
const __m128i *v4; // r10
long long v5; // r11
unsigned int v6; // edi
unsigned int v7; // edx
__m128i v8; // xmm8
__m128i v9; // xmm1
const __m128i *v10; // rax
__m128i v11; // xmm8
__m128i v12; // xmm8
__m128i v13; // xmm0
__m1... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
CALL 0x00101060
TEST EAX,EAX
JLE 0x0010151d
MOV RCX,RAX
MOV R10,RBX
XOR R11D,R11D
XOR EDI,EDI
PXOR XMM6,XMM6
PXOR XMM5,XMM5
PXOR XMM4,XMM4
PXOR XMM3,XMM3
NOP word ptr [RAX + RAX*0x1]
LAB_00101270:
LEA R8D,[RCX + -0x1]
MOVZX EDX,byte ptr [R10]
MOV E... | int func0(char *param_1)
{
char cVar1;
bool bVar2;
bool bVar3;
bool bVar4;
bool bVar5;
bool bVar6;
bool bVar7;
bool bVar8;
bool bVar9;
uint uVar10;
char *pcVar11;
char *pcVar12;
char *pcVar13;
char *pcVar14;
char *pcVar15;
char *pcVar16;
char *pcVar17;
char *pcVar18;
char *pcVar19... |
4,016 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
typedef struct {
int key;
int count;
} Element;
int compare(const void* a, const void* b) {
Element* ea = (Element*)a;
Element* eb = (Element*)b;
if (eb->count != ea->count)
return eb->count - ea... | int* func0(int** nums, int numsSize, int* numsColSizes, int k, int* returnSize) {
// Find the maximum possible key to size the frequency array
int max_key = 0;
for(int i = 0; i < numsSize; i++) {
for(int j = 0; j < numsColSizes[i]; j++) {
if(nums[i][j] > max_key)
ma... | int main() {
// First test case
int row0[] = {1, 2, 6};
int row1[] = {1, 3, 4, 5, 7, 8};
int row2[] = {1, 3, 5, 6, 8, 9};
int row3[] = {2, 5, 7, 11};
int row4[] = {1, 4, 7, 8, 12};
int* nums1[] = {row0, row1, row2, row3, row4};
int numsColSizes1[] = {3, 6, 6, 4, 5};
int retu... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x60,%rsp
mov %rdi,-0x48(%rbp)
mov %esi,-0x4c(%rbp)
mov %rdx,-0x58(%rbp)
mov %ecx,-0x50(%rbp)
mov %r8,-0x60(%rbp)
movl $0x0,-0x38(%rbp)
movl $0x0,-0x34(%rbp)
jmpq 12f2 <func0+0xb1>
movl $0x0,-0x30(%rbp)
jmp 12d3 <func0+0x92>
mov -0x34(%rbp... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_48], rdi
mov [rbp+var_4C], esi
mov [rbp+var_58], rdx
mov [rbp+var_50], ecx
mov [rbp+var_60], r8
mov [rbp+var_38], 0
mov [rbp+var_34], 0
jmp loc_12F2
loc_1272:
mov [rbp+var_30], 0
jmp short loc_12D3
loc_127B... | _DWORD * func0(long long a1, int a2, long long a3, int a4, _DWORD *a5)
{
int v9; // [rsp+28h] [rbp-38h]
int i; // [rsp+2Ch] [rbp-34h]
int j; // [rsp+30h] [rbp-30h]
int k; // [rsp+34h] [rbp-2Ch]
int m; // [rsp+38h] [rbp-28h]
int v14; // [rsp+3Ch] [rbp-24h]
int n; // [rsp+40h] [rbp-20h]
int ii; // [rsp+44... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x48],RDI
MOV dword ptr [RBP + -0x4c],ESI
MOV qword ptr [RBP + -0x58],RDX
MOV dword ptr [RBP + -0x50],ECX
MOV qword ptr [RBP + -0x60],R8
MOV dword ptr [RBP + -0x38],0x0
MOV dword ptr [RBP + -0x34],0x0
JMP 0x001012f2
LAB_00101272:
MOV dword ptr [RBP ... | void * func0(long param_1,int param_2,long param_3,int param_4,int *param_5)
{
void *__ptr;
void *__base;
void *pvVar1;
int local_40;
int local_3c;
int local_38;
int local_34;
int local_30;
int local_2c;
int local_28;
int local_24;
local_40 = 0;
for (local_3c = 0; local_3c < param_2; local... |
4,017 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
typedef struct {
int key;
int count;
} Element;
int compare(const void* a, const void* b) {
Element* ea = (Element*)a;
Element* eb = (Element*)b;
if (eb->count != ea->count)
return eb->count - ea... | int* func0(int** nums, int numsSize, int* numsColSizes, int k, int* returnSize) {
// Find the maximum possible key to size the frequency array
int max_key = 0;
for(int i = 0; i < numsSize; i++) {
for(int j = 0; j < numsColSizes[i]; j++) {
if(nums[i][j] > max_key)
ma... | int main() {
// First test case
int row0[] = {1, 2, 6};
int row1[] = {1, 3, 4, 5, 7, 8};
int row2[] = {1, 3, 5, 6, 8, 9};
int row3[] = {2, 5, 7, 11};
int row4[] = {1, 4, 7, 8, 12};
int* nums1[] = {row0, row1, row2, row3, row4};
int numsColSizes1[] = {3, 6, 6, 4, 5};
int retu... | O1 | c | func0:
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %ecx,%r15d
mov %r8,(%rsp)
test %esi,%esi
jle 1382 <func0+0x183>
mov %rdi,%r13
mov %rdx,%r12
lea -0x1(%rsi),%r14d
mov $0x0,%esi
mov $0x0,%ebx
jmp 1263 <func0+0x64>
mov 0x0(%r13,%rs... | func0:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 18h
mov r15d, ecx
mov [rsp+48h+var_48], r8
test esi, esi
jle loc_1375
mov r14, rdi
mov r13, rdx
mov r12d, esi
mov esi, 0
mov ebx, 0
jmp short loc_125E
loc_1235:
mov rax, [r14+rs... | long long func0(long long a1, int a2, long long a3, int a4, int *a5)
{
long long v7; // r12
long long v8; // rsi
int v9; // ebx
int *v10; // rax
long long v11; // rcx
int v12; // edx
int *v13; // rax
long long v14; // rcx
long long i; // rsi
int v16; // edx
long long v17; // r12
long long v18; ... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV R15D,ECX
MOV qword ptr [RSP],R8
TEST ESI,ESI
JLE 0x00101375
MOV R14,RDI
MOV R13,RDX
MOV R12D,ESI
MOV ESI,0x0
MOV EBX,0x0
JMP 0x0010125e
LAB_00101235:
MOV RAX,qword ptr [R14 + RSI*0x8]
LEA EDX,[RDX + -0x1]
LEA RCX,[RAX + RDX*0x4 + 0x4]... | void * func0(long param_1,uint param_2,long param_3,uint param_4,uint *param_5)
{
int4 *puVar1;
int *piVar2;
int *piVar3;
int iVar4;
int *piVar5;
void *__base;
void *pvVar6;
void *__ptr;
int iVar7;
int iVar8;
ulong uVar9;
if ((int)param_2 < 1) {
__ptr = calloc(1,4);
__base = malloc(8... |
4,018 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
typedef struct {
int key;
int count;
} Element;
int compare(const void* a, const void* b) {
Element* ea = (Element*)a;
Element* eb = (Element*)b;
if (eb->count != ea->count)
return eb->count - ea... | int* func0(int** nums, int numsSize, int* numsColSizes, int k, int* returnSize) {
// Find the maximum possible key to size the frequency array
int max_key = 0;
for(int i = 0; i < numsSize; i++) {
for(int j = 0; j < numsColSizes[i]; j++) {
if(nums[i][j] > max_key)
ma... | int main() {
// First test case
int row0[] = {1, 2, 6};
int row1[] = {1, 3, 4, 5, 7, 8};
int row2[] = {1, 3, 5, 6, 8, 9};
int row3[] = {2, 5, 7, 11};
int row4[] = {1, 4, 7, 8, 12};
int* nums1[] = {row0, row1, row2, row3, row4};
int numsColSizes1[] = {3, 6, 6, 4, 5};
int retu... | O2 | c | func0:
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
mov %ecx,%ebp
push %rbx
sub $0x18,%rsp
mov %r8,(%rsp)
test %esi,%esi
jle 163d <func0+0x18d>
mov %rdi,%r13
mov %rdx,%r14
lea -0x1(%rsi),%r15d
xor %edi,%edi
xor %ebx,%ebx
xchg %ax,%ax
mov (%r14,%rdi,4),%eax
test... | func0:
endbr64
push r15
push r14
push r13
push r12
push rbp
mov ebp, ecx
push rbx
sub rsp, 18h
mov [rsp+48h+var_48], r8
test esi, esi
jle loc_1622
movsxd r15, esi
mov r13, rdi
mov r14, rdx
xor esi, esi
xor ebx, ebx
nop dword ptr [rax]
loc_14E0:
mov eax, [r14... | long long func0(long long a1, int a2, long long a3, int a4, int *a5)
{
long long v6; // r15
long long v8; // rsi
long long v9; // rbx
int v10; // eax
int *v11; // rdx
long long v12; // rcx
int *v13; // rax
long long v14; // rcx
long long v15; // rdx
long long v16; // rsi
int *v17; // rdx
long l... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV EBP,ECX
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RSP],R8
TEST ESI,ESI
JLE 0x00101622
MOVSXD R15,ESI
MOV R13,RDI
MOV R14,RDX
XOR ESI,ESI
XOR EBX,EBX
NOP dword ptr [RAX]
LAB_001014e0:
MOV EAX,dword ptr [R14 + RSI*0x4]
TEST EAX,EAX
JLE 0x00101515
MOV RDX,qword pt... | void * func0(long param_1,int param_2,long param_3,int param_4,int *param_5)
{
int *piVar1;
int4 *puVar2;
int iVar3;
int *piVar4;
void *__ptr;
int *piVar5;
void *__base;
void *pvVar6;
int iVar7;
int *piVar8;
long lVar9;
long lVar10;
long lVar11;
size_t sVar12;
bool bVar13;
if (param_... |
4,019 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
typedef struct {
int key;
int count;
} Element;
int compare(const void* a, const void* b) {
Element* ea = (Element*)a;
Element* eb = (Element*)b;
if (eb->count != ea->count)
return eb->count - ea... | int* func0(int** nums, int numsSize, int* numsColSizes, int k, int* returnSize) {
// Find the maximum possible key to size the frequency array
int max_key = 0;
for(int i = 0; i < numsSize; i++) {
for(int j = 0; j < numsColSizes[i]; j++) {
if(nums[i][j] > max_key)
ma... | int main() {
// First test case
int row0[] = {1, 2, 6};
int row1[] = {1, 3, 4, 5, 7, 8};
int row2[] = {1, 3, 5, 6, 8, 9};
int row3[] = {2, 5, 7, 11};
int row4[] = {1, 4, 7, 8, 12};
int* nums1[] = {row0, row1, row2, row3, row4};
int numsColSizes1[] = {3, 6, 6, 4, 5};
int retu... | O3 | c | func0:
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
mov %r8,%rbp
push %rbx
mov %ecx,%ebx
sub $0x18,%rsp
test %esi,%esi
jle 1726 <func0+0x2b6>
lea -0x1(%rsi),%r8d
mov %rdi,%r14
mov %rdx,%r15
xor %esi,%esi
xor %r12d,%r12d
xchg %ax,%ax
mov (%r15,%rsi,4),%ecx
test ... | func0:
endbr64
push r15
push r14
push r13
push r12
mov r12, r8
push rbp
mov ebp, ecx
push rbx
sub rsp, 18h
test esi, esi
jle loc_16FA
mov r14, rdi
mov r15, rdx
movsxd r8, esi
xor ecx, ecx
xor ebx, ebx
nop dword ptr [rax+00h]
loc_1470:
mov esi, [r15+rcx*4]
te... | char * func0(long long a1, int a2, long long a3, int a4, int *a5)
{
long long v9; // r8
long long v10; // rcx
signed int v11; // ebx
int v12; // esi
long long v13; // rdi
const __m128i *v14; // rax
__m128i v15; // xmm2
__m128i v16; // xmm0
__m128i v17; // xmm1
__m128i v18; // xmm1
__m128i v19; // ... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
MOV R12,R8
PUSH RBP
MOV EBP,ECX
PUSH RBX
SUB RSP,0x18
TEST ESI,ESI
JLE 0x001016fa
MOV R14,RDI
MOV R15,RDX
MOVSXD R8,ESI
XOR ECX,ECX
XOR EBX,EBX
NOP dword ptr [RAX]
LAB_00101470:
MOV ESI,dword ptr [R15 + RCX*0x4]
TEST ESI,ESI
JLE 0x0010154b
LEA EAX,[RSI + -0x1]
MOV RDI,... | void * func0(long param_1,int param_2,long param_3,int param_4,int *param_5)
{
int *piVar1;
int4 *puVar2;
int4 *puVar3;
int *piVar4;
uint uVar5;
int iVar6;
uint *puVar7;
uint uVar8;
uint *puVar9;
uint *puVar10;
uint *puVar11;
int4 uVar12;
int4 uVar13;
int4 uVar14;
uint uVar15;
uint *puV... |
4,020 | func0 |
#include <stdio.h>
#include <math.h>
#include <assert.h>
| int func0(int n) {
int maxPrime = -1;
while (n % 2 == 0) {
maxPrime = 2;
n >>= 1;
}
for (int i = 3; i <= sqrt(n); i += 2) {
while (n % i == 0) {
maxPrime = i;
n = n / i;
}
}
if (n > 2) {
maxPrime = n;
}
return... | int main() {
assert(func0(15) == 5);
assert(func0(6) == 3);
assert(func0(2) == 2);
printf("All tests passed!\n");
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %edi,-0x14(%rbp)
movl $0xffffffff,-0x8(%rbp)
jmp 11ab <func0+0x22>
movl $0x2,-0x8(%rbp)
sarl -0x14(%rbp)
mov -0x14(%rbp),%eax
and $0x1,%eax
test %eax,%eax
je 11a1 <func0+0x18>
movl $0x3,-0x4(%rbp)
jmp 11df <func0+0x56>
mov ... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_14], edi
mov [rbp+var_8], 0FFFFFFFFh
jmp short loc_11AB
loc_11A1:
mov [rbp+var_8], 2
sar [rbp+var_14], 1
loc_11AB:
mov eax, [rbp+var_14]
and eax, 1
test eax, eax
jz short loc_11A1
mov [rbp+var_4], 3
jmp ... | long long func0(int a1)
{
unsigned int v3; // [rsp+18h] [rbp-8h]
int i; // [rsp+1Ch] [rbp-4h]
v3 = -1;
while ( (a1 & 1) == 0 )
{
v3 = 2;
a1 >>= 1;
}
for ( i = 3; sqrt((double)a1) >= (double)i; i += 2 )
{
while ( !(a1 % i) )
{
v3 = i;
a1 /= i;
}
}
if ( a1 > 2 )
r... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x8],0xffffffff
JMP 0x001011ab
LAB_001011a1:
MOV dword ptr [RBP + -0x8],0x2
SAR dword ptr [RBP + -0x14],0x1
LAB_001011ab:
MOV EAX,dword ptr [RBP + -0x14]
AND EAX,0x1
TEST EAX,EAX
JZ 0x001011a1
MOV dword ptr [RBP + -0x... | uint func0(uint param_1)
{
double dVar1;
int4 local_1c;
int4 local_10;
int4 local_c;
local_10 = 0xffffffff;
for (local_1c = param_1; (local_1c & 1) == 0; local_1c = (int)local_1c >> 1) {
local_10 = 2;
}
local_c = 3;
while( true ) {
dVar1 = sqrt((double)(int)local_1c);
if (dVar1 < (doub... |
4,021 | func0 |
#include <stdio.h>
#include <math.h>
#include <assert.h>
| int func0(int n) {
int maxPrime = -1;
while (n % 2 == 0) {
maxPrime = 2;
n >>= 1;
}
for (int i = 3; i <= sqrt(n); i += 2) {
while (n % i == 0) {
maxPrime = i;
n = n / i;
}
}
if (n > 2) {
maxPrime = n;
}
return... | int main() {
assert(func0(15) == 5);
assert(func0(6) == 3);
assert(func0(2) == 2);
printf("All tests passed!\n");
return 0;
}
| O1 | c | func0:
endbr64
push %r12
push %rbp
push %rbx
sub $0x10,%rsp
mov %edi,%ebx
test $0x1,%dil
jne 11b1 <func0+0x28>
sar %ebx
test $0x1,%bl
je 119d <func0+0x14>
mov $0x2,%r12d
mov $0x3,%ebp
jmp 11cd <func0+0x44>
mov $0xffffffff,%r12d
jmp 11aa <func0+0x21>
mov %ebx,%eax
cltd
idiv ... | func0:
endbr64
push r12
push rbp
push rbx
sub rsp, 10h
mov ebx, edi
test dil, 1
jnz short loc_11B1
loc_119D:
sar ebx, 1
test bl, 1
jz short loc_119D
mov r12d, 2
loc_11AA:
mov ebp, 3
jmp short loc_11CD
loc_11B1:
mov r12d, 0FFFFFFFFh
jmp short loc_11AA
loc_11B9:
mov... | long long func0(int a1)
{
int v1; // ebx
unsigned int v2; // r12d
int i; // ebp
double v4; // xmm0_8
double v5; // xmm0_8
v1 = a1;
if ( (a1 & 1) != 0 )
{
v2 = -1;
}
else
{
do
v1 >>= 1;
while ( (v1 & 1) == 0 );
v2 = 2;
}
for ( i = 3; ; i += 2 )
{
v4 = (double)v1;
... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x10
MOV EBX,EDI
TEST DIL,0x1
JNZ 0x001011b1
LAB_0010119d:
SAR EBX,0x1
TEST BL,0x1
JZ 0x0010119d
MOV R12D,0x2
LAB_001011aa:
MOV EBP,0x3
JMP 0x001011cd
LAB_001011b1:
MOV R12D,0xffffffff
JMP 0x001011aa
LAB_001011b9:
MOV EAX,EBX
CDQ
IDIV EBP
MOV EBX,EAX
CDQ
IDIV EBP
TEST E... | uint func0(uint param_1)
{
long lVar1;
int iVar2;
uint uVar3;
uint uVar4;
double dVar5;
if ((param_1 & 1) == 0) {
do {
param_1 = (int)param_1 >> 1;
} while ((param_1 & 1) == 0);
uVar4 = 2;
}
else {
uVar4 = 0xffffffff;
}
uVar3 = 3;
while( true ) {
dVar5 = (double)(int)... |
4,022 | func0 |
#include <stdio.h>
#include <math.h>
#include <assert.h>
| int func0(int n) {
int maxPrime = -1;
while (n % 2 == 0) {
maxPrime = 2;
n >>= 1;
}
for (int i = 3; i <= sqrt(n); i += 2) {
while (n % i == 0) {
maxPrime = i;
n = n / i;
}
}
if (n > 2) {
maxPrime = n;
}
return... | int main() {
assert(func0(15) == 5);
assert(func0(6) == 3);
assert(func0(2) == 2);
printf("All tests passed!\n");
return 0;
}
| O2 | c | func0:
endbr64
push %r12
push %rbx
sub $0x28,%rsp
test $0x1,%dil
jne 12e2 <func0+0xa2>
nopl (%rax)
sar %edi
test $0x1,%dil
je 1258 <func0+0x18>
mov $0x2,%r12d
pxor %xmm1,%xmm1
mov $0x3,%ebx
pxor %xmm4,%xmm4
cvtsi2sd %edi,%xmm1
nopw 0x0(%rax,%rax,1)
ucomisd %xmm1,%xmm4
pxor %xmm2,%xm... | func0:
endbr64
push r12
push rbx
sub rsp, 28h
test dil, 1
jnz loc_12E2
nop dword ptr [rax]
loc_1258:
sar edi, 1
test dil, 1
jz short loc_1258
mov r12d, 2
loc_1266:
pxor xmm1, xmm1
mov ebx, 3
pxor xmm3, xmm3
cvtsi2sd xmm1, edi
nop word ptr [rax+rax+00000000h]
loc_1280:
... | long long func0(int a1)
{
unsigned int v1; // r12d
int v2; // ebx
double v3; // xmm1_8
double v4; // xmm2_8
double v5; // xmm0_8
int v6; // edx
if ( (a1 & 1) != 0 )
{
v1 = -1;
}
else
{
do
a1 >>= 1;
while ( (a1 & 1) == 0 );
v1 = 2;
}
v2 = 3;
v3 = (double)a1;
while ( ... | func0:
ENDBR64
PUSH R12
PUSH RBX
SUB RSP,0x28
TEST DIL,0x1
JNZ 0x001012e2
NOP dword ptr [RAX]
LAB_00101258:
SAR EDI,0x1
TEST DIL,0x1
JZ 0x00101258
MOV R12D,0x2
LAB_00101266:
PXOR XMM1,XMM1
MOV EBX,0x3
PXOR XMM3,XMM3
CVTSI2SD XMM1,EDI
NOP word ptr [RAX + RAX*0x1]
LAB_00101280:
UCOMISD XMM3,XMM1
PXOR XMM2,XMM2
CVTSI2SD X... | ulong func0(ulong param_1)
{
ulong uVar1;
uint uVar2;
ulong uVar3;
double dVar4;
double __x;
if ((param_1 & 1) == 0) {
do {
uVar2 = (int)param_1 >> 1;
param_1 = (ulong)uVar2;
} while ((uVar2 & 1) == 0);
uVar3 = 2;
}
else {
uVar3 = 0xffffffff;
}
uVar2 = 3;
__x = (dou... |
4,023 | func0 |
#include <stdio.h>
#include <math.h>
#include <assert.h>
| int func0(int n) {
int maxPrime = -1;
while (n % 2 == 0) {
maxPrime = 2;
n >>= 1;
}
for (int i = 3; i <= sqrt(n); i += 2) {
while (n % i == 0) {
maxPrime = i;
n = n / i;
}
}
if (n > 2) {
maxPrime = n;
}
return... | int main() {
assert(func0(15) == 5);
assert(func0(6) == 3);
assert(func0(2) == 2);
printf("All tests passed!\n");
return 0;
}
| O3 | c | func0:
endbr64
push %r12
push %rbx
sub $0x28,%rsp
test $0x1,%dil
jne 12e2 <func0+0xa2>
nopl (%rax)
sar %edi
test $0x1,%dil
je 1258 <func0+0x18>
mov $0x2,%r12d
pxor %xmm1,%xmm1
mov $0x3,%ebx
pxor %xmm4,%xmm4
cvtsi2sd %edi,%xmm1
nopw 0x0(%rax,%rax,1)
ucomisd %xmm1,%xmm4
pxor %xmm2,%xm... | func0:
endbr64
push rbp
push rbx
sub rsp, 28h
test dil, 1
jnz short loc_12C7
loc_1250:
sar edi, 1
test dil, 1
jz short loc_1250
mov ebp, 2
loc_125D:
pxor xmm1, xmm1
mov ebx, 3
pxor xmm3, xmm3
cvtsi2sd xmm1, edi
xchg ax, ax
loc_1270:
ucomisd xmm3, xmm1
pxor xmm2, xmm2
cvt... | long long func0(int a1)
{
unsigned int v1; // ebp
int v2; // ebx
double v3; // xmm1_8
double v4; // xmm2_8
double v5; // xmm0_8
int v6; // edx
if ( (a1 & 1) != 0 )
{
v1 = -1;
}
else
{
do
a1 >>= 1;
while ( (a1 & 1) == 0 );
v1 = 2;
}
v2 = 3;
v3 = (double)a1;
while ( 1... | func0:
ENDBR64
PUSH RBP
PUSH RBX
SUB RSP,0x28
TEST DIL,0x1
JNZ 0x001012c7
LAB_00101250:
SAR EDI,0x1
TEST DIL,0x1
JZ 0x00101250
MOV EBP,0x2
LAB_0010125d:
PXOR XMM1,XMM1
MOV EBX,0x3
PXOR XMM3,XMM3
CVTSI2SD XMM1,EDI
NOP
LAB_00101270:
UCOMISD XMM3,XMM1
PXOR XMM2,XMM2
CVTSI2SD XMM2,EBX
JA 0x001012ce
MOVAPD XMM0,XMM1
SQRTSD ... | ulong func0(ulong param_1)
{
ulong uVar1;
uint uVar2;
ulong uVar3;
double dVar4;
double __x;
if ((param_1 & 1) == 0) {
do {
uVar2 = (int)param_1 >> 1;
param_1 = (ulong)uVar2;
} while ((uVar2 & 1) == 0);
uVar1 = 2;
}
else {
uVar1 = 0xffffffff;
}
uVar2 = 3;
__x = (dou... |
4,024 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int N) {
int B_Number = 0;
int cnt = 0;
while (N != 0) {
int rem = N % 2;
int c = 1;
for (int i = 0; i < cnt; i++) {
c *= 10;
}
B_Number += rem * c;
N /= 2;
cnt++;
}
return B_Number;
}
| int main() {
assert(func0(10) == 1010);
assert(func0(1) == 1);
assert(func0(20) == 10100);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x24(%rbp)
movl $0x0,-0x14(%rbp)
movl $0x0,-0x10(%rbp)
jmp 11bd <func0+0x74>
mov -0x24(%rbp),%eax
cltd
shr $0x1f,%edx
add %edx,%eax
and $0x1,%eax
sub %edx,%eax
mov %eax,-0x4(%rbp)
movl $0x1,-0xc(%rbp)
movl $0x0,-0x8(%rbp)
jmp 1198 ... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_24], edi
mov [rbp+var_14], 0
mov [rbp+var_10], 0
jmp short loc_11C1
loc_1164:
mov edx, [rbp+var_24]
mov eax, edx
sar eax, 1Fh
shr eax, 1Fh
add edx, eax
and edx, 1
sub edx, eax
mov [rbp+var_4], edx
mov [rbp+var_C... | long long func0(int a1)
{
unsigned int v3; // [rsp+10h] [rbp-14h]
int v4; // [rsp+14h] [rbp-10h]
int v5; // [rsp+18h] [rbp-Ch]
int i; // [rsp+1Ch] [rbp-8h]
v3 = 0;
v4 = 0;
while ( a1 )
{
v5 = 1;
for ( i = 0; i < v4; ++i )
v5 *= 10;
v3 += v5 * (a1 % 2);
a1 /= 2;
++v4;
}
re... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x24],EDI
MOV dword ptr [RBP + -0x14],0x0
MOV dword ptr [RBP + -0x10],0x0
JMP 0x001011c1
LAB_00101164:
MOV EDX,dword ptr [RBP + -0x24]
MOV EAX,EDX
SAR EAX,0x1f
SHR EAX,0x1f
ADD EDX,EAX
AND EDX,0x1
SUB EDX,EAX
MOV dword ptr [RBP + -0x4],EDX
MOV dword ptr [RBP + -... | int func0(int param_1)
{
int4 local_2c;
int4 local_1c;
int4 local_18;
int4 local_14;
int4 local_10;
local_1c = 0;
local_18 = 0;
for (local_2c = param_1; local_2c != 0; local_2c = local_2c / 2) {
local_14 = 1;
for (local_10 = 0; local_10 < local_18; local_10 = local_10 + 1) {
local_14 =... |
4,025 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int N) {
int B_Number = 0;
int cnt = 0;
while (N != 0) {
int rem = N % 2;
int c = 1;
for (int i = 0; i < cnt; i++) {
c *= 10;
}
B_Number += rem * c;
N /= 2;
cnt++;
}
return B_Number;
}
| int main() {
assert(func0(10) == 1010);
assert(func0(1) == 1);
assert(func0(20) == 10100);
return 0;
}
| O1 | c | func0:
endbr64
mov %edi,%r8d
mov %edi,%r9d
test %edi,%edi
je 11ca <func0+0x81>
mov %edi,%edx
shr $0x1f,%edx
lea (%rdi,%rdx,1),%eax
and $0x1,%eax
sub %edx,%eax
mov %eax,%edi
mov $0x0,%esi
mov $0x0,%r9d
mov $0x1,%eax
mov $0x1,%r10d
jmp 1184 <func0+0x3b>
mov %r10d,%eax
mov ... | func0:
endbr64
mov r8d, edi
mov r9d, edi
test edi, edi
jz short loc_11C4
mov edx, edi
shr edx, 1Fh
lea eax, [rdi+rdx]
and eax, 1
sub eax, edx
mov ecx, eax
mov edi, 0
mov r9d, 0
mov eax, 1
mov r10d, 1
jmp short loc_11AA
loc_117E:
mov edx, eax
shr edx, 1... | long long func0(int a1)
{
int v1; // r8d
unsigned int v2; // r9d
int v3; // ecx
int v4; // edi
int v5; // eax
int v6; // edx
int v7; // esi
bool v8; // zf
int v9; // eax
v1 = a1;
v2 = a1;
if ( a1 )
{
v3 = a1 % 2;
v4 = 0;
v2 = 0;
v5 = 1;
while ( 1 )
{
v2 += v3 * ... | func0:
ENDBR64
MOV R8D,EDI
MOV R9D,EDI
TEST EDI,EDI
JZ 0x001011c4
MOV EDX,EDI
SHR EDX,0x1f
LEA EAX,[RDI + RDX*0x1]
AND EAX,0x1
SUB EAX,EDX
MOV ECX,EAX
MOV EDI,0x0
MOV R9D,0x0
MOV EAX,0x1
MOV R10D,0x1
JMP 0x001011aa
LAB_0010117e:
MOV EDX,EAX
SHR EDX,0x1f
ADD EAX,EDX
AND EAX,0x1
SUB EAX,EDX
MOV ECX,EAX
TEST R11D,R11D
JLE... | uint func0(uint param_1)
{
int iVar1;
int iVar2;
uint uVar3;
int iVar4;
int iVar5;
ulong uVar6;
int iVar7;
bool bVar8;
uVar6 = (ulong)param_1;
if (param_1 != 0) {
iVar2 = (int)param_1 % 2;
param_1 = 0;
iVar7 = 1;
iVar1 = 0;
while( true ) {
iVar5 = iVar1;
param_1 =... |
4,026 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int N) {
int B_Number = 0;
int cnt = 0;
while (N != 0) {
int rem = N % 2;
int c = 1;
for (int i = 0; i < cnt; i++) {
c *= 10;
}
B_Number += rem * c;
N /= 2;
cnt++;
}
return B_Number;
}
| int main() {
assert(func0(10) == 1010);
assert(func0(1) == 1);
assert(func0(20) == 10100);
return 0;
}
| O2 | c | func0:
endbr64
xor %r10d,%r10d
test %edi,%edi
je 12f0 <func0+0x70>
mov %edi,%edx
xor %r9d,%r9d
xor %r10d,%r10d
shr $0x1f,%edx
lea (%rdi,%rdx,1),%eax
and $0x1,%eax
sub %edx,%eax
mov %eax,%r8d
mov $0x1,%eax
nopw %cs:0x0(%rax,%rax,1)
imul %r8d,%eax
mov %r9d,%esi
add $0x1,%r9d
... | func0:
endbr64
mov r8d, edi
xor r10d, r10d
test edi, edi
jz short loc_1270
mov edx, edi
xor r9d, r9d
xor r10d, r10d
shr edx, 1Fh
lea eax, [rdi+rdx]
and eax, 1
sub eax, edx
mov edi, eax
mov eax, 1
nop dword ptr [rax+rax+00000000h]
loc_1220:
imul eax, edi
mov ... | long long func0(int a1)
{
unsigned int v1; // r8d
unsigned int v2; // r10d
int v3; // r9d
int v4; // edi
int v5; // eax
int v6; // esi
int v7; // eax
int v8; // edx
int v9; // ecx
v1 = a1;
v2 = 0;
if ( a1 )
{
v3 = 0;
v2 = 0;
v4 = a1 % 2;
v5 = 1;
while ( 1 )
{
v6... | func0:
ENDBR64
MOV R8D,EDI
XOR R10D,R10D
TEST EDI,EDI
JZ 0x00101270
MOV EDX,EDI
XOR R9D,R9D
XOR R10D,R10D
SHR EDX,0x1f
LEA EAX,[RDI + RDX*0x1]
AND EAX,0x1
SUB EAX,EDX
MOV EDI,EAX
MOV EAX,0x1
NOP dword ptr [RAX + RAX*0x1]
LAB_00101220:
IMUL EAX,EDI
MOV ESI,R9D
ADD R9D,0x1
ADD R10D,EAX
MOV EAX,R8D
SHR EAX,0x1f
ADD EAX,R8... | int func0(uint param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
uint uVar5;
ulong uVar6;
int iVar7;
int iVar8;
bool bVar9;
uVar6 = (ulong)param_1;
iVar8 = 0;
if (param_1 != 0) {
iVar8 = 0;
iVar2 = (int)param_1 % 2;
iVar3 = 1;
iVar1 = 0;
while( true ) {
iVar7 =... |
4,027 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int N) {
int B_Number = 0;
int cnt = 0;
while (N != 0) {
int rem = N % 2;
int c = 1;
for (int i = 0; i < cnt; i++) {
c *= 10;
}
B_Number += rem * c;
N /= 2;
cnt++;
}
return B_Number;
}
| int main() {
assert(func0(10) == 1010);
assert(func0(1) == 1);
assert(func0(20) == 10100);
return 0;
}
| O3 | c | func0:
endbr64
xor %r8d,%r8d
test %edi,%edi
je 12d0 <func0+0x70>
mov %edi,%eax
mov $0x1,%ecx
shr $0x1f,%eax
lea (%rdi,%rax,1),%r8d
mov %eax,%esi
and $0x1,%r8d
add %edi,%esi
sub %eax,%r8d
sar %esi
je 12d0 <func0+0x70>
nopl 0x0(%rax,%rax,1)
mov %esi,%edx
shr $0x1f,%edx
lea ... | func0:
endbr64
mov r8d, edi
test edi, edi
jz short loc_12C6
mov edx, edi
xor esi, esi
xor r9d, r9d
shr edx, 1Fh
lea eax, [rdi+rdx]
and eax, 1
sub eax, edx
nop dword ptr [rax]
loc_1280:
add r9d, eax
mov eax, r8d
lea r10d, [rsi+1]
shr eax, 1Fh
add eax, r8d
m... | long long func0(int a1)
{
unsigned int v1; // r8d
int v2; // esi
unsigned int v3; // r9d
int v4; // eax
int v5; // eax
int v6; // edx
int v7; // edi
int v8; // eax
int v9; // ecx
v1 = a1;
if ( a1 )
{
v2 = 0;
v3 = 0;
v4 = a1 % 2;
while ( 1 )
{
v3 += v4;
v5 = v1 +... | func0:
ENDBR64
MOV R8D,EDI
TEST EDI,EDI
JZ 0x001012c6
MOV EDX,EDI
XOR ESI,ESI
XOR R9D,R9D
SHR EDX,0x1f
LEA EAX,[RDI + RDX*0x1]
AND EAX,0x1
SUB EAX,EDX
NOP dword ptr [RAX]
LAB_00101280:
ADD R9D,EAX
MOV EAX,R8D
LEA R10D,[RSI + 0x1]
SHR EAX,0x1f
ADD EAX,R8D
MOV R8D,EAX
SAR R8D,0x1
JZ 0x001012c9
SHR EAX,0x1f
XOR EDX,EDX
LE... | int func0(uint param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
uint uVar5;
ulong uVar6;
int iVar7;
bool bVar8;
uVar6 = (ulong)param_1;
if (param_1 == 0) {
iVar7 = 0;
}
else {
iVar7 = 0;
iVar1 = (int)param_1 % 2;
iVar4 = 0;
while( true ) {
iVar7 = iVar7 + iVar... |
4,028 | func0 | #include <assert.h>
| int func0(int ar[], int N) {
int l = 0;
int r = N - 1;
while (l <= r) {
int mid = (l + r) / 2;
if (ar[mid] != mid + 1 && ar[mid - 1] == mid) {
return mid + 1;
} else if (ar[mid] != mid + 1) {
r = mid - 1;
} else {
l = mid + 1;
... | int main() {
int ar1[] = {1, 2, 3, 5};
assert(func0(ar1, 4) == 4);
int ar2[] = {1, 3, 4, 5};
assert(func0(ar2, 4) == 2);
int ar3[] = {1, 2, 3, 5, 6, 7};
assert(func0(ar3, 6) == 4);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
movl $0x0,-0xc(%rbp)
mov -0x1c(%rbp),%eax
sub $0x1,%eax
mov %eax,-0x8(%rbp)
jmpq 1218 <func0+0xaf>
mov -0xc(%rbp),%edx
mov -0x8(%rbp),%eax
add %edx,%eax
mov %eax,%edx
shr $0x1f,%edx
add %edx,%eax
s... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_C], 0
mov eax, [rbp+var_1C]
sub eax, 1
mov [rbp+var_8], eax
jmp loc_1218
loc_118D:
mov edx, [rbp+var_C]
mov eax, [rbp+var_8]
add eax, edx
mov edx, eax
shr edx, 1Fh
add ... | long long func0(long long a1, int a2)
{
int v3; // [rsp+10h] [rbp-Ch]
int v4; // [rsp+14h] [rbp-8h]
int v5; // [rsp+18h] [rbp-4h]
v3 = 0;
v4 = a2 - 1;
while ( v3 <= v4 )
{
v5 = (v3 + v4) / 2;
if ( *(_DWORD *)(4LL * v5 + a1) != v5 + 1 && v5 == *(_DWORD *)(4LL * v5 - 4 + a1) )
return (unsign... | 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 EAX,dword ptr [RBP + -0x1c]
SUB EAX,0x1
MOV dword ptr [RBP + -0x8],EAX
JMP 0x00101218
LAB_0010118d:
MOV EDX,dword ptr [RBP + -0xc]
MOV EAX,dword ptr [RBP + -0x8]
ADD EAX,EDX
MOV EDX,EAX... | int func0(long param_1,int param_2)
{
int iVar1;
int local_14;
int local_10;
local_14 = 0;
local_10 = param_2 + -1;
while( true ) {
if (local_10 < local_14) {
return -1;
}
iVar1 = (local_10 + local_14) / 2;
if ((*(int *)(param_1 + (long)iVar1 * 4) != iVar1 + 1) &&
(iVar1 == ... |
4,029 | func0 | #include <assert.h>
| int func0(int ar[], int N) {
int l = 0;
int r = N - 1;
while (l <= r) {
int mid = (l + r) / 2;
if (ar[mid] != mid + 1 && ar[mid - 1] == mid) {
return mid + 1;
} else if (ar[mid] != mid + 1) {
r = mid - 1;
} else {
l = mid + 1;
... | int main() {
int ar1[] = {1, 2, 3, 5};
assert(func0(ar1, 4) == 4);
int ar2[] = {1, 3, 4, 5};
assert(func0(ar2, 4) == 2);
int ar3[] = {1, 2, 3, 5, 6, 7};
assert(func0(ar3, 6) == 4);
return 0;
}
| O1 | c | func0:
endbr64
sub $0x1,%esi
mov $0x0,%ecx
jmp 1179 <func0+0x10>
mov %eax,%ecx
cmp %ecx,%esi
jl 11ac <func0+0x43>
lea (%rsi,%rcx,1),%edx
mov %edx,%eax
shr $0x1f,%eax
add %edx,%eax
sar %eax
mov %eax,%r8d
movslq %eax,%rdx
lea 0x0(,%rdx,4),%r9
add $0x1,%eax
cmp %eax,(%rdi,%rdx... | func0:
endbr64
sub esi, 1
mov ecx, 0
jmp short loc_117A
loc_1177:
mov ecx, r8d
loc_117A:
cmp esi, ecx
jl short loc_11AB
lea edx, [rsi+rcx]
mov eax, edx
shr eax, 1Fh
add eax, edx
sar eax, 1
movsxd rdx, eax
lea r9, ds:0[rdx*4]
lea r8d, [rax+1]
cmp [rdi+rdx*4], r8d... | long long func0(long long a1, int a2)
{
int v2; // esi
int v3; // ecx
int v4; // eax
unsigned int v5; // r8d
v2 = a2 - 1;
v3 = 0;
while ( v2 >= v3 )
{
v4 = (v2 + v3) / 2;
v5 = v4 + 1;
if ( *(_DWORD *)(a1 + 4LL * v4) == v4 + 1 )
{
v3 = v4 + 1;
}
else
{
if ( *(_DW... | func0:
ENDBR64
SUB ESI,0x1
MOV ECX,0x0
JMP 0x0010117a
LAB_00101177:
MOV ECX,R8D
LAB_0010117a:
CMP ESI,ECX
JL 0x001011ab
LEA EDX,[RSI + RCX*0x1]
MOV EAX,EDX
SHR EAX,0x1f
ADD EAX,EDX
SAR EAX,0x1
MOVSXD RDX,EAX
LEA R9,[RDX*0x4]
LEA R8D,[RAX + 0x1]
CMP dword ptr [RDI + RDX*0x4],R8D
JZ 0x00101177
CMP dword ptr [RDI + R9*0x1... | int func0(long param_1,int param_2)
{
int iVar1;
int iVar2;
int iVar3;
param_2 = param_2 + -1;
iVar1 = 0;
while( true ) {
do {
iVar3 = iVar1;
if (param_2 < iVar3) {
return -1;
}
iVar2 = (param_2 + iVar3) / 2;
iVar1 = iVar2 + 1;
} while (*(int *)(param_1 + (l... |
4,030 | func0 | #include <assert.h>
| int func0(int ar[], int N) {
int l = 0;
int r = N - 1;
while (l <= r) {
int mid = (l + r) / 2;
if (ar[mid] != mid + 1 && ar[mid - 1] == mid) {
return mid + 1;
} else if (ar[mid] != mid + 1) {
r = mid - 1;
} else {
l = mid + 1;
... | int main() {
int ar1[] = {1, 2, 3, 5};
assert(func0(ar1, 4) == 4);
int ar2[] = {1, 3, 4, 5};
assert(func0(ar2, 4) == 2);
int ar3[] = {1, 2, 3, 5, 6, 7};
assert(func0(ar3, 6) == 4);
return 0;
}
| O2 | c | func0:
endbr64
sub $0x1,%esi
xor %ecx,%ecx
nopl 0x0(%rax)
cmp %ecx,%esi
jl 1318 <func0+0x48>
lea (%rsi,%rcx,1),%edx
mov %edx,%eax
shr $0x1f,%eax
add %edx,%eax
sar %eax
movslq %eax,%rdx
lea 0x1(%rax),%r8d
lea 0x0(,%rdx,4),%r9
cmp %r8d,(%rdi,%rdx,4)
je 1328 <func0+0x58>
cmp %... | func0:
endbr64
sub esi, 1
xor ecx, ecx
nop dword ptr [rax+00000000h]
loc_12B0:
cmp esi, ecx
jl short loc_12E8
loc_12B4:
lea edx, [rsi+rcx]
mov eax, edx
shr eax, 1Fh
add eax, edx
sar eax, 1
movsxd rdx, eax
lea r8d, [rax+1]
lea r9, ds:0[rdx*4]
cmp [rdi+rdx*4], r8d
jz ... | long long func0(long long a1, int a2)
{
int v2; // esi
int i; // ecx
int v4; // eax
unsigned int v5; // r8d
v2 = a2 - 1;
for ( i = 0; v2 >= i; i = v4 + 1 )
{
while ( 1 )
{
v4 = (v2 + i) / 2;
v5 = v4 + 1;
if ( *(_DWORD *)(a1 + 4LL * v4) == v4 + 1 )
break;
if ( *(_D... | func0:
ENDBR64
SUB ESI,0x1
XOR ECX,ECX
NOP dword ptr [RAX]
LAB_001012b0:
CMP ESI,ECX
JL 0x001012e8
LAB_001012b4:
LEA EDX,[RSI + RCX*0x1]
MOV EAX,EDX
SHR EAX,0x1f
ADD EAX,EDX
SAR EAX,0x1
MOVSXD RDX,EAX
LEA R8D,[RAX + 0x1]
LEA R9,[RDX*0x4]
CMP dword ptr [RDI + RDX*0x4],R8D
JZ 0x001012f8
CMP dword ptr [RDI + R9*0x1 + -0x4... | int func0(long param_1,int param_2)
{
int iVar1;
int iVar2;
int iVar3;
param_2 = param_2 + -1;
iVar1 = 0;
do {
iVar3 = iVar1;
if (param_2 < iVar3) {
return -1;
}
while( true ) {
iVar2 = (param_2 + iVar3) / 2;
iVar1 = iVar2 + 1;
if (*(int *)(param_1 + (long)iVar2 *... |
4,031 | func0 | #include <assert.h>
| int func0(int ar[], int N) {
int l = 0;
int r = N - 1;
while (l <= r) {
int mid = (l + r) / 2;
if (ar[mid] != mid + 1 && ar[mid - 1] == mid) {
return mid + 1;
} else if (ar[mid] != mid + 1) {
r = mid - 1;
} else {
l = mid + 1;
... | int main() {
int ar1[] = {1, 2, 3, 5};
assert(func0(ar1, 4) == 4);
int ar2[] = {1, 3, 4, 5};
assert(func0(ar2, 4) == 2);
int ar3[] = {1, 2, 3, 5, 6, 7};
assert(func0(ar3, 6) == 4);
return 0;
}
| O3 | c | func0:
endbr64
sub $0x1,%esi
xor %ecx,%ecx
nopl 0x0(%rax)
cmp %ecx,%esi
jl 12e8 <func0+0x48>
lea (%rsi,%rcx,1),%edx
mov %edx,%eax
shr $0x1f,%eax
add %edx,%eax
sar %eax
movslq %eax,%rdx
lea 0x1(%rax),%r8d
lea 0x0(,%rdx,4),%r9
cmp %r8d,(%rdi,%rdx,4)
je 12f8 <func0+0x58>
cmp %... | func0:
endbr64
sub esi, 1
xor ecx, ecx
nop dword ptr [rax+00000000h]
loc_12B0:
cmp esi, ecx
jl short loc_12E8
loc_12B4:
lea edx, [rsi+rcx]
mov eax, edx
shr eax, 1Fh
add eax, edx
sar eax, 1
movsxd rdx, eax
lea r8d, [rax+1]
lea r9, ds:0[rdx*4]
cmp [rdi+rdx*4], r8d
jz ... | long long func0(long long a1, int a2)
{
int v2; // esi
int i; // ecx
int v4; // eax
unsigned int v5; // r8d
v2 = a2 - 1;
for ( i = 0; v2 >= i; i = v4 + 1 )
{
while ( 1 )
{
v4 = (v2 + i) / 2;
v5 = v4 + 1;
if ( *(_DWORD *)(a1 + 4LL * v4) == v4 + 1 )
break;
if ( *(_D... | func0:
ENDBR64
SUB ESI,0x1
XOR ECX,ECX
NOP dword ptr [RAX]
LAB_001012b0:
CMP ESI,ECX
JL 0x001012e8
LAB_001012b4:
LEA EDX,[RSI + RCX*0x1]
MOV EAX,EDX
SHR EAX,0x1f
ADD EAX,EDX
SAR EAX,0x1
MOVSXD RDX,EAX
LEA R8D,[RAX + 0x1]
LEA R9,[RDX*0x4]
CMP dword ptr [RDI + RDX*0x4],R8D
JZ 0x001012f8
CMP dword ptr [RDI + R9*0x1 + -0x4... | int func0(long param_1,int param_2)
{
int iVar1;
int iVar2;
int iVar3;
param_2 = param_2 + -1;
iVar1 = 0;
do {
iVar3 = iVar1;
if (param_2 < iVar3) {
return -1;
}
while( true ) {
iVar2 = (param_2 + iVar3) / 2;
iVar1 = iVar2 + 1;
if (*(int *)(param_1 + (long)iVar2 *... |
4,032 | func0 |
#include <assert.h>
| int func0(int n) {
return n * (n + 1);
}
| int main() {
assert(func0(4) == 20);
assert(func0(5) == 30);
assert(func0(6) == 42);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x4(%rbp)
mov -0x4(%rbp),%eax
add $0x1,%eax
imul -0x4(%rbp),%eax
pop %rbp
retq
| func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov eax, [rbp+var_4]
add eax, 1
imul eax, [rbp+var_4]
pop rbp
retn | long long func0(int a1)
{
return (unsigned int)(a1 * (a1 + 1));
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV EAX,dword ptr [RBP + -0x4]
ADD EAX,0x1
IMUL EAX,dword ptr [RBP + -0x4]
POP RBP
RET | int func0(int param_1)
{
return (param_1 + 1) * param_1;
} |
4,033 | func0 |
#include <assert.h>
| int func0(int n) {
return n * (n + 1);
}
| int main() {
assert(func0(4) == 20);
assert(func0(5) == 30);
assert(func0(6) == 42);
return 0;
}
| O1 | c | func0:
endbr64
lea 0x1(%rdi),%eax
imul %edi,%eax
retq
| func0:
endbr64
lea eax, [rdi+1]
imul eax, edi
retn | long long func0(int a1)
{
return (unsigned int)(a1 * (a1 + 1));
} | func0:
ENDBR64
LEA EAX,[RDI + 0x1]
IMUL EAX,EDI
RET | int func0(int param_1)
{
return (param_1 + 1) * param_1;
} |
4,034 | func0 |
#include <assert.h>
| int func0(int n) {
return n * (n + 1);
}
| int main() {
assert(func0(4) == 20);
assert(func0(5) == 30);
assert(func0(6) == 42);
return 0;
}
| O2 | c | func0:
endbr64
lea 0x1(%rdi),%eax
imul %edi,%eax
retq
nopl 0x0(%rax,%rax,1)
| func0:
endbr64
lea eax, [rdi+1]
imul eax, edi
retn | long long func0(int a1)
{
return (unsigned int)(a1 * (a1 + 1));
} | func0:
ENDBR64
LEA EAX,[RDI + 0x1]
IMUL EAX,EDI
RET | int func0(int param_1)
{
return (param_1 + 1) * param_1;
} |
4,035 | func0 |
#include <assert.h>
| int func0(int n) {
return n * (n + 1);
}
| int main() {
assert(func0(4) == 20);
assert(func0(5) == 30);
assert(func0(6) == 42);
return 0;
}
| O3 | c | func0:
endbr64
lea 0x1(%rdi),%eax
imul %edi,%eax
retq
nopl 0x0(%rax,%rax,1)
| func0:
endbr64
lea eax, [rdi+1]
imul eax, edi
retn | long long func0(int a1)
{
return (unsigned int)(a1 * (a1 + 1));
} | func0:
ENDBR64
LEA EAX,[RDI + 0x1]
IMUL EAX,EDI
RET | int func0(int param_1)
{
return (param_1 + 1) * param_1;
} |
4,036 | func0 |
#include <assert.h>
| int func0(int p, int q, int N) {
int res;
while (N > 0) {
N--;
p *= 10;
res = p / q;
p = p % q;
}
return res;
}
| int main() {
assert(func0(1, 2, 1) == 5);
assert(func0(3, 5, 1) == 6);
assert(func0(5, 6, 5) == 3);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
mov %esi,-0x18(%rbp)
mov %edx,-0x1c(%rbp)
jmp 1183 <func0+0x3a>
subl $0x1,-0x1c(%rbp)
mov -0x14(%rbp),%edx
mov %edx,%eax
shl $0x2,%eax
add %edx,%eax
add %eax,%eax
mov %eax,-0x14(%rbp)
mov -0x14(%rbp),%eax
cltd
idivl -0x... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_18], esi
mov [rbp+var_1C], edx
jmp short loc_1183
loc_115C:
sub [rbp+var_1C], 1
mov edx, [rbp+var_14]
mov eax, edx
shl eax, 2
add eax, edx
add eax, eax
mov [rbp+var_14], eax
mov eax, [rbp+var_1... | long long func0(int a1, int a2, int a3)
{
int v6; // [rsp+8h] [rbp-14h]
unsigned int v7; // [rsp+18h] [rbp-4h]
while ( a3 > 0 )
{
--a3;
v6 = 10 * a1;
v7 = v6 / a2;
a1 = v6 % a2;
}
return v7;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x18],ESI
MOV dword ptr [RBP + -0x1c],EDX
JMP 0x00101183
LAB_0010115c:
SUB dword ptr [RBP + -0x1c],0x1
MOV EDX,dword ptr [RBP + -0x14]
MOV EAX,EDX
SHL EAX,0x2
ADD EAX,EDX
ADD EAX,EAX
MOV dword ptr [RBP + -0x14],EAX
MOV EAX,dword p... | int func0(int param_1,int param_2,int param_3)
{
int4 local_24;
int4 local_1c;
int4 local_c;
local_1c = param_1;
for (local_24 = param_3; 0 < local_24; local_24 = local_24 + -1) {
local_c = (local_1c * 10) / param_2;
local_1c = (local_1c * 10) % param_2;
}
return local_c;
} |
4,037 | func0 |
#include <assert.h>
| int func0(int p, int q, int N) {
int res;
while (N > 0) {
N--;
p *= 10;
res = p / q;
p = p % q;
}
return res;
}
| int main() {
assert(func0(1, 2, 1) == 5);
assert(func0(3, 5, 1) == 6);
assert(func0(5, 6, 5) == 3);
return 0;
}
| O1 | c | func0:
endbr64
mov %edx,%r8d
test %edx,%edx
jle 116c <func0+0x23>
lea (%rdi,%rdi,4),%ecx
add %ecx,%ecx
mov %ecx,%eax
cltd
idiv %esi
mov %edx,%edi
sub $0x1,%r8d
jne 1154 <func0+0xb>
mov %ecx,%eax
cltd
idiv %esi
retq
mov $0x0,%eax
retq
| func0:
endbr64
mov r8d, edx
test edx, edx
jle short loc_116C
loc_1154:
lea ecx, [rdi+rdi*4]
add ecx, ecx
mov eax, ecx
cdq
idiv esi
mov edi, edx
sub r8d, 1
jnz short loc_1154
mov eax, ecx
cdq
idiv esi
retn
loc_116C:
mov eax, 0
retn | long long func0(int a1, int a2, int a3)
{
int v3; // r8d
int v4; // ecx
v3 = a3;
if ( a3 <= 0 )
return 0LL;
do
{
v4 = 10 * a1;
a1 = 10 * a1 % a2;
--v3;
}
while ( v3 );
return (unsigned int)(v4 / a2);
} | func0:
ENDBR64
MOV R8D,EDX
TEST EDX,EDX
JLE 0x0010116c
LAB_00101154:
LEA ECX,[RDI + RDI*0x4]
ADD ECX,ECX
MOV EAX,ECX
CDQ
IDIV ESI
MOV EDI,EDX
SUB R8D,0x1
JNZ 0x00101154
MOV EAX,ECX
CDQ
IDIV ESI
RET
LAB_0010116c:
MOV EAX,0x0
RET | int1 [16] func0(int param_1,int param_2,ulong param_3)
{
int1 auVar1 [16];
int iVar2;
uint uVar3;
ulong uVar4;
int1 auVar5 [16];
uVar4 = param_3 & 0xffffffff;
if (0 < (int)param_3) {
do {
iVar2 = param_1 * 10;
param_1 = iVar2 % param_2;
uVar3 = (int)uVar4 - 1;
uVar4 = (ulo... |
4,038 | func0 |
#include <assert.h>
| int func0(int p, int q, int N) {
int res;
while (N > 0) {
N--;
p *= 10;
res = p / q;
p = p % q;
}
return res;
}
| int main() {
assert(func0(1, 2, 1) == 5);
assert(func0(3, 5, 1) == 6);
assert(func0(5, 6, 5) == 3);
return 0;
}
| O2 | c | func0:
endbr64
mov %edx,%ecx
test %edx,%edx
jle 1160 <func0+0x20>
nopw 0x0(%rax,%rax,1)
lea (%rdi,%rdi,4),%eax
add %eax,%eax
cltd
idiv %esi
mov %edx,%edi
sub $0x1,%ecx
jne 1150 <func0+0x10>
retq
xor %eax,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
nopl (%rax)
| func0:
endbr64
mov ecx, edx
test edx, edx
jle short loc_1160
nop word ptr [rax+rax+00h]
loc_1150:
lea eax, [rdi+rdi*4]
add eax, eax
cdq
idiv esi
mov edi, edx
sub ecx, 1
jnz short loc_1150
retn
loc_1160:
xor eax, eax
retn | long long func0(int a1, int a2, int a3)
{
int v3; // ecx
long long result; // rax
v3 = a3;
if ( a3 <= 0 )
return 0LL;
do
{
result = (unsigned int)(10 * a1 / a2);
a1 = 10 * a1 % a2;
--v3;
}
while ( v3 );
return result;
} | func0:
ENDBR64
MOV ECX,EDX
TEST EDX,EDX
JLE 0x00101160
NOP word ptr [RAX + RAX*0x1]
LAB_00101150:
LEA EAX,[RDI + RDI*0x4]
ADD EAX,EAX
CDQ
IDIV ESI
MOV EDI,EDX
SUB ECX,0x1
JNZ 0x00101150
RET
LAB_00101160:
XOR EAX,EAX
RET | ulong func0(int param_1,int param_2,int param_3)
{
int iVar1;
if (param_3 < 1) {
return 0;
}
do {
iVar1 = param_1 * 10;
param_1 = iVar1 % param_2;
param_3 = param_3 + -1;
} while (param_3 != 0);
return (long)iVar1 / (long)param_2 & 0xffffffff;
} |
4,039 | func0 |
#include <assert.h>
| int func0(int p, int q, int N) {
int res;
while (N > 0) {
N--;
p *= 10;
res = p / q;
p = p % q;
}
return res;
}
| int main() {
assert(func0(1, 2, 1) == 5);
assert(func0(3, 5, 1) == 6);
assert(func0(5, 6, 5) == 3);
return 0;
}
| O3 | c | func0:
endbr64
mov %edx,%ecx
test %edx,%edx
jle 1160 <func0+0x20>
nopw 0x0(%rax,%rax,1)
lea (%rdi,%rdi,4),%eax
add %eax,%eax
cltd
idiv %esi
mov %edx,%edi
sub $0x1,%ecx
jne 1150 <func0+0x10>
retq
xor %eax,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
nopl (%rax)
| func0:
endbr64
mov ecx, edx
test edx, edx
jle short loc_1160
nop word ptr [rax+rax+00h]
loc_1150:
lea eax, [rdi+rdi*4]
add eax, eax
cdq
idiv esi
mov edi, edx
sub ecx, 1
jnz short loc_1150
retn
loc_1160:
xor eax, eax
retn | long long func0(int a1, int a2, int a3)
{
int v3; // ecx
long long result; // rax
v3 = a3;
if ( a3 <= 0 )
return 0LL;
do
{
result = (unsigned int)(10 * a1 / a2);
a1 = 10 * a1 % a2;
--v3;
}
while ( v3 );
return result;
} | func0:
ENDBR64
MOV ECX,EDX
TEST EDX,EDX
JLE 0x00101160
NOP word ptr [RAX + RAX*0x1]
LAB_00101150:
LEA EAX,[RDI + RDI*0x4]
ADD EAX,EAX
CDQ
IDIV ESI
MOV EDI,EDX
SUB ECX,0x1
JNZ 0x00101150
RET
LAB_00101160:
XOR EAX,EAX
RET | ulong func0(int param_1,int param_2,int param_3)
{
int iVar1;
if (param_3 < 1) {
return 0;
}
do {
iVar1 = param_1 * 10;
param_1 = iVar1 % param_2;
param_3 = param_3 + -1;
} while (param_3 != 0);
return (long)iVar1 / (long)param_2 & 0xffffffff;
} |
4,040 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
typedef enum { INT_TYPE, STRING_TYPE } ElementType;
typedef struct {
ElementType type;
union {
int i;
char* s;
} value;
} Mixed;
int compare_ints(const void* a, const void* b) {
int int_a ... | Mixed* func0(Mixed* mixed_list, size_t size, size_t* sorted_size) {
size_t int_count = 0, str_count = 0;
for(size_t i = 0; i < size; i++) {
if(mixed_list[i].type == INT_TYPE) int_count++;
else str_count++;
}
Mixed* int_part = malloc(int_count * sizeof(Mixed));
Mixed* str_par... | int main() {
Mixed input[] = {
{INT_TYPE, .value.i = 19},
{STRING_TYPE, .value.s = "red"},
{INT_TYPE, .value.i = 12},
{STRING_TYPE, .value.s = "green"},
{STRING_TYPE, .value.s = "blue"},
{INT_TYPE, .value.i = 10},
{STRING_TYPE, .value.s = "white"},
... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
add $0xffffffffffffff80,%rsp
mov %rdi,-0x68(%rbp)
mov %rsi,-0x70(%rbp)
mov %rdx,-0x78(%rbp)
movq $0x0,-0x58(%rbp)
movq $0x0,-0x50(%rbp)
movq $0x0,-0x48(%rbp)
jmp 12c7 <func0+0x5b>
mov -0x48(%rbp),%rax
shl $0x4,%rax
mov %rax,%rdx
mov -0x68(%rbp... | func0:
endbr64
push rbp
mov rbp, rsp
add rsp, 0FFFFFFFFFFFFFF80h
mov [rbp+var_68], rdi
mov [rbp+var_70], rsi
mov [rbp+var_78], rdx
mov [rbp+nmemb], 0
mov [rbp+var_50], 0
mov [rbp+var_48], 0
jmp short loc_12C7
loc_129E:
mov rax, [rbp+var_48]
shl rax, 4
mov rdx, rax
mov ... | char * func0(long long a1, unsigned long long a2, unsigned long long *a3)
{
long long v3; // rsi
long long v4; // rax
char *v5; // rcx
long long v6; // rdx
long long v7; // rax
char *v8; // rax
char *v9; // rcx
long long v10; // rdx
char *v11; // rax
char *v12; // rcx
long long v13; // rdx
size_... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
ADD RSP,-0x80
MOV qword ptr [RBP + -0x68],RDI
MOV qword ptr [RBP + -0x70],RSI
MOV qword ptr [RBP + -0x78],RDX
MOV qword ptr [RBP + -0x58],0x0
MOV qword ptr [RBP + -0x50],0x0
MOV qword ptr [RBP + -0x48],0x0
JMP 0x001012c7
LAB_0010129e:
MOV RAX,qword ptr [RBP + -0x48]
SHL RAX,0x4
MOV R... | void * func0(long param_1,ulong param_2,ulong *param_3)
{
int8 uVar1;
void *__base;
void *__base_00;
void *pvVar2;
int8 *puVar3;
int8 *puVar4;
size_t local_60;
size_t local_58;
ulong local_50;
long local_48;
long local_40;
ulong local_38;
ulong local_30;
ulong local_28;
local_60 = 0;
... |
4,041 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
typedef enum { INT_TYPE, STRING_TYPE } ElementType;
typedef struct {
ElementType type;
union {
int i;
char* s;
} value;
} Mixed;
int compare_ints(const void* a, const void* b) {
int int_a ... | Mixed* func0(Mixed* mixed_list, size_t size, size_t* sorted_size) {
size_t int_count = 0, str_count = 0;
for(size_t i = 0; i < size; i++) {
if(mixed_list[i].type == INT_TYPE) int_count++;
else str_count++;
}
Mixed* int_part = malloc(int_count * sizeof(Mixed));
Mixed* str_par... | int main() {
Mixed input[] = {
{INT_TYPE, .value.i = 19},
{STRING_TYPE, .value.s = "red"},
{INT_TYPE, .value.i = 12},
{STRING_TYPE, .value.s = "green"},
{STRING_TYPE, .value.s = "blue"},
{INT_TYPE, .value.i = 10},
{STRING_TYPE, .value.s = "white"},
... | O1 | c | func0:
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %rsi,(%rsp)
mov %rdx,0x8(%rsp)
test %rsi,%rsi
je 1399 <func0+0x17b>
mov %rsi,%rax
mov %rdi,%rbx
shl $0x4,%rax
mov %rax,%r13
add %rdi,%r13
mov $0x0,%r12d
mov $0x0,%ebp
jmp 1270... | func0:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 18h
mov [rsp+48h+var_48], rsi
mov [rsp+48h+var_40], rdx
test rsi, rsi
jz loc_1397
mov rax, rsi
mov rbx, rdi
shl rax, 4
mov r13, rax
add r13, rdi
mov r12d, 0
mov ebp, 0
jmp ... | long long func0(const __m128i *a1, long long a2, _QWORD *a3)
{
const __m128i *v3; // rbx
const __m128i *v4; // r13
long long v5; // r12
long long v6; // rbp
long long v7; // rdx
long long v8; // rax
long long v9; // rbx
long long v10; // rax
long long v11; // r12
long long v12; // rbp
long long v... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RSP],RSI
MOV qword ptr [RSP + 0x8],RDX
TEST RSI,RSI
JZ 0x00101397
MOV RAX,RSI
MOV RBX,RDI
SHL RAX,0x4
MOV R13,RAX
ADD R13,RDI
MOV R12D,0x0
MOV EBP,0x0
JMP 0x0010126e
LAB_0010125d:
ADD R12,0x1
LAB_00101261:
ADD RDI,0x10
CMP ... | void * func0(int *param_1,long param_2,long *param_3)
{
int8 *puVar1;
int8 uVar2;
void *pvVar3;
void *__base;
void *__base_00;
long lVar4;
long lVar5;
size_t __nmemb;
int *piVar6;
size_t __nmemb_00;
int *piVar7;
if (param_2 == 0) {
__base = malloc(0);
__base_00 = malloc(0);
qsort... |
4,042 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
typedef enum { INT_TYPE, STRING_TYPE } ElementType;
typedef struct {
ElementType type;
union {
int i;
char* s;
} value;
} Mixed;
int compare_ints(const void* a, const void* b) {
int int_a ... | Mixed* func0(Mixed* mixed_list, size_t size, size_t* sorted_size) {
size_t int_count = 0, str_count = 0;
for(size_t i = 0; i < size; i++) {
if(mixed_list[i].type == INT_TYPE) int_count++;
else str_count++;
}
Mixed* int_part = malloc(int_count * sizeof(Mixed));
Mixed* str_par... | int main() {
Mixed input[] = {
{INT_TYPE, .value.i = 19},
{STRING_TYPE, .value.s = "red"},
{INT_TYPE, .value.i = 12},
{STRING_TYPE, .value.s = "green"},
{STRING_TYPE, .value.s = "blue"},
{INT_TYPE, .value.i = 10},
{STRING_TYPE, .value.s = "white"},
... | O2 | c | func0:
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
mov %rsi,%rbp
push %rbx
sub $0x18,%rsp
mov %rdx,(%rsp)
test %rsi,%rsi
je 1860 <func0+0x190>
shl $0x4,%rsi
mov %rdi,%rbx
mov %rdi,%rax
xor %r14d,%r14d
add %rdi,%rsi
xor %r13d,%r13d
jmp 171d <func0+0x4d>
nopw ... | func0:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 18h
mov [rsp+48h+var_48], rsi
mov [rsp+48h+var_40], rdx
test rsi, rsi
jz loc_1860
mov rax, rsi
mov rbx, rdi
xor r15d, r15d
xor r12d, r12d
shl rax, 4
mov rbp, rax
mov rax, rdi
a... | long long func0(const __m128i *a1, long long a2, _QWORD *a3)
{
const __m128i *v3; // rbx
long long v4; // r15
long long v5; // r12
const __m128i *v6; // rax
const __m128i *v7; // rbp
long long v8; // r13
long long v9; // rax
long long v10; // rdx
long long v11; // r14
long long v12; // rax
__m128... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RSP],RSI
MOV qword ptr [RSP + 0x8],RDX
TEST RSI,RSI
JZ 0x00101860
MOV RAX,RSI
MOV RBX,RDI
XOR R15D,R15D
XOR R12D,R12D
SHL RAX,0x4
MOV RBP,RAX
MOV RAX,RDI
ADD RBP,RDI
JMP 0x0010173d
LAB_00101730:
ADD RAX,0x10
ADD R12,0x1
CMP... | void * func0(int *param_1,long param_2,long *param_3)
{
int8 *puVar1;
int8 uVar2;
int8 uVar3;
int *piVar4;
void *__base;
void *__base_00;
long lVar5;
void *__dest;
long lVar6;
int *piVar7;
size_t __nmemb;
size_t __nmemb_00;
if (param_2 == 0) {
__base = malloc(0);
__base_00 = malloc... |
4,043 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
typedef enum { INT_TYPE, STRING_TYPE } ElementType;
typedef struct {
ElementType type;
union {
int i;
char* s;
} value;
} Mixed;
int compare_ints(const void* a, const void* b) {
int int_a ... | Mixed* func0(Mixed* mixed_list, size_t size, size_t* sorted_size) {
size_t int_count = 0, str_count = 0;
for(size_t i = 0; i < size; i++) {
if(mixed_list[i].type == INT_TYPE) int_count++;
else str_count++;
}
Mixed* int_part = malloc(int_count * sizeof(Mixed));
Mixed* str_par... | int main() {
Mixed input[] = {
{INT_TYPE, .value.i = 19},
{STRING_TYPE, .value.s = "red"},
{INT_TYPE, .value.i = 12},
{STRING_TYPE, .value.s = "green"},
{STRING_TYPE, .value.s = "blue"},
{INT_TYPE, .value.i = 10},
{STRING_TYPE, .value.s = "white"},
... | O3 | c | func0:
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
mov %rsi,%rbp
push %rbx
sub $0x18,%rsp
mov %rdx,0x8(%rsp)
test %rsi,%rsi
je 1cf0 <func0+0x290>
lea -0x1(%rsi),%rcx
mov %rdi,%rbx
cmp $0x3,%rcx
jbe 1d3f <func0+0x2df>
mov %rcx,%rdx
pxor %xmm2,%xmm2
pxor %xmm1,%... | func0:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
mov rbx, rsi
sub rsp, 18h
mov [rsp+48h+var_40], rdx
test rsi, rsi
jz loc_1BE0
lea rdx, [rsi-1]
mov r15, rdi
cmp rdx, 9
jbe loc_1C2F
mov rcx, rdx
pxor xmm4, xmm4
pxor xmm5, xmm5
mov ra... | char * func0(const __m128i *a1, unsigned long long a2, unsigned long long *a3)
{
unsigned long long v4; // rdx
__m128i v5; // xmm4
const __m128i *v6; // rax
__m128i si128; // xmm7
__m128i v8; // xmm6
__m128i v9; // xmm3
__m128 v10; // xmm1
__m128 v11; // xmm0
__m128i v12; // xmm0
__m128i v13; // xmm... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RSI
SUB RSP,0x18
MOV qword ptr [RSP + 0x8],RDX
TEST RSI,RSI
JZ 0x00101be0
LEA RDX,[RSI + -0x1]
MOV R15,RDI
CMP RDX,0x9
JBE 0x00101c2f
MOV RCX,RDX
PXOR XMM4,XMM4
PXOR XMM5,XMM5
MOV RAX,RDI
SHR RCX,0x1
MOVDQA XMM7,xmmword ptr [0x00102210]
MOVDQA... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void * func0(int *param_1,ulong param_2,ulong *param_3)
{
int *piVar1;
int8 *puVar2;
uint uVar3;
uint uVar4;
uint uVar5;
uint uVar6;
int8 uVar7;
int8 uVar8;
int *piVar9;
ulong uVar10;
void *__base;
void *__bas... |
4,044 | func0 |
#include <assert.h>
| double func0(int list1[], int size) {
int first_even = -1;
int first_odd = -1;
for (int i = 0; i < size; i++) {
if (list1[i] % 2 == 0) {
first_even = list1[i];
break;
}
}
for (int i = 0; i < size; i++) {
if (list1[i] % 2 != 0) {
... | int main() {
int list1[] = {1, 3, 5, 7, 4, 1, 6, 8};
int size1 = sizeof(list1) / sizeof(list1[0]);
assert(func0(list1, size1) == 4);
int list2[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
int size2 = sizeof(list2) / sizeof(list2[0]);
assert(func0(list2, size2) == 2);
int list3[] = {1, 5, ... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
movl $0xffffffff,-0x10(%rbp)
movl $0xffffffff,-0xc(%rbp)
movl $0x0,-0x8(%rbp)
jmp 11cb <func0+0x62>
mov -0x8(%rbp),%eax
cltq
lea 0x0(,%rax,4),%rdx
mov -0x18(%rbp),%rax
add %rdx,%rax
mov (%rax),%eax
and ... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_10], 0FFFFFFFFh
mov [rbp+var_C], 0FFFFFFFFh
mov [rbp+var_8], 0
jmp short loc_11CB
loc_118F:
mov eax, [rbp+var_8]
cdqe
lea rdx, ds:0[rax*4]
mov rax, [rbp+var_18]
add rax, rdx
mov ... | double func0(long long a1, int a2)
{
int v3; // [rsp+Ch] [rbp-10h]
int v4; // [rsp+10h] [rbp-Ch]
int i; // [rsp+14h] [rbp-8h]
int j; // [rsp+18h] [rbp-4h]
v3 = -1;
v4 = -1;
for ( i = 0; i < a2; ++i )
{
if ( (*(_DWORD *)(4LL * i + a1) & 1) == 0 )
{
v3 = *(_DWORD *)(4LL * i + a1);
br... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0x10],0xffffffff
MOV dword ptr [RBP + -0xc],0xffffffff
MOV dword ptr [RBP + -0x8],0x0
JMP 0x001011cb
LAB_0010118f:
MOV EAX,dword ptr [RBP + -0x8]
CDQE
LEA RDX,[RAX*0x4]
MOV RAX,qword ptr [RBP + -0x1... | double func0(long param_1,int param_2)
{
double dVar1;
int local_18;
int local_14;
int local_10;
int local_c;
local_18 = -1;
local_14 = -1;
for (local_10 = 0; local_10 < param_2; local_10 = local_10 + 1) {
if ((*(uint *)(param_1 + (long)local_10 * 4) & 1) == 0) {
local_18 = *(int *)(param_... |
4,045 | func0 |
#include <assert.h>
| double func0(int list1[], int size) {
int first_even = -1;
int first_odd = -1;
for (int i = 0; i < size; i++) {
if (list1[i] % 2 == 0) {
first_even = list1[i];
break;
}
}
for (int i = 0; i < size; i++) {
if (list1[i] % 2 != 0) {
... | int main() {
int list1[] = {1, 3, 5, 7, 4, 1, 6, 8};
int size1 = sizeof(list1) / sizeof(list1[0]);
assert(func0(list1, size1) == 4);
int list2[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
int size2 = sizeof(list2) / sizeof(list2[0]);
assert(func0(list2, size2) == 2);
int list3[] = {1, 5, ... | O1 | c | func0:
endbr64
test %esi,%esi
jle 11c9 <func0+0x60>
mov %rdi,%rax
lea -0x1(%rsi),%edx
lea 0x4(%rdi,%rdx,4),%rsi
mov (%rdi),%edx
test $0x1,%dl
je 1191 <func0+0x28>
add $0x4,%rdi
cmp %rsi,%rdi
jne 117c <func0+0x13>
mov $0xffffffff,%edx
mov (%rax),%ecx
test $0x1,%cl
jne 11aa <fun... | func0:
endbr64
test esi, esi
jle short loc_11C9
mov rax, rdi
lea edx, [rsi-1]
lea rsi, [rdi+rdx*4+4]
loc_117C:
mov edx, [rdi]
test dl, 1
jz short loc_1191
add rdi, 4
cmp rdi, rsi
jnz short loc_117C
mov edx, 0FFFFFFFFh
loc_1191:
mov ecx, [rax]
test cl, 1
jnz shor... | double func0(int *a1, int a2)
{
int *v2; // rax
long long v3; // rsi
int v4; // edx
int v5; // ecx
if ( a2 <= 0 )
return -1.0;
v2 = a1;
v3 = (long long)&a1[a2 - 1 + 1];
do
{
v4 = *a1;
if ( (*a1 & 1) == 0 )
goto LABEL_6;
++a1;
}
while ( a1 != (int *)v3 );
v4 = -1;
LABEL_6:... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x001011c9
MOV RAX,RDI
LEA EDX,[RSI + -0x1]
LEA RSI,[RDI + RDX*0x4 + 0x4]
LAB_0010117c:
MOV EDX,dword ptr [RDI]
TEST DL,0x1
JZ 0x00101191
ADD RDI,0x4
CMP RDI,RSI
JNZ 0x0010117c
MOV EDX,0xffffffff
LAB_00101191:
MOV ECX,dword ptr [RAX]
TEST CL,0x1
JNZ 0x001011aa
ADD RAX,0x4
CMP RAX,RSI
JNZ... | double func0(uint *param_1,int param_2)
{
uint *puVar1;
uint uVar2;
uint uVar3;
uint *puVar4;
if (param_2 < 1) {
return DAT_00102078;
}
puVar1 = param_1 + (ulong)(param_2 - 1) + 1;
puVar4 = param_1;
do {
uVar3 = *puVar4;
if ((uVar3 & 1) == 0) goto LAB_00101191;
puVar4 = puVar4 + 1;... |
4,046 | func0 |
#include <assert.h>
| double func0(int list1[], int size) {
int first_even = -1;
int first_odd = -1;
for (int i = 0; i < size; i++) {
if (list1[i] % 2 == 0) {
first_even = list1[i];
break;
}
}
for (int i = 0; i < size; i++) {
if (list1[i] % 2 != 0) {
... | int main() {
int list1[] = {1, 3, 5, 7, 4, 1, 6, 8};
int size1 = sizeof(list1) / sizeof(list1[0]);
assert(func0(list1, size1) == 4);
int list2[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
int size2 = sizeof(list2) / sizeof(list2[0]);
assert(func0(list2, size2) == 2);
int list3[] = {1, 5, ... | O2 | c | func0:
endbr64
test %esi,%esi
jle 1370 <func0+0x60>
lea -0x1(%rsi),%eax
lea 0x4(%rdi,%rax,4),%rcx
mov %rdi,%rax
jmp 1331 <func0+0x21>
nopl (%rax)
add $0x4,%rax
cmp %rcx,%rax
je 1380 <func0+0x70>
mov (%rax),%edx
test $0x1,%dl
jne 1328 <func0+0x18>
jmp 1349 <func0+0x39>
nopw 0x0(... | func0:
endbr64
test esi, esi
jle short loc_1370
lea eax, [rsi-1]
lea rcx, [rdi+rax*4+4]
mov rax, rdi
jmp short loc_1331
loc_1328:
add rax, 4
cmp rax, rcx
jz short loc_1380
loc_1331:
mov edx, [rax]
test dl, 1
jnz short loc_1328
jmp short loc_1349
loc_1340:
add rdi, ... | double func0(int *a1, int a2)
{
long long v2; // rcx
int *v3; // rax
int v4; // edx
int v5; // eax
if ( a2 <= 0 )
return -1.0;
v2 = (long long)&a1[a2 - 1 + 1];
v3 = a1;
while ( 1 )
{
v4 = *v3;
if ( (*v3 & 1) == 0 )
break;
if ( ++v3 == (int *)v2 )
{
v4 = -1;
brea... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x00101370
LEA EAX,[RSI + -0x1]
LEA RCX,[RDI + RAX*0x4 + 0x4]
MOV RAX,RDI
JMP 0x00101331
LAB_00101328:
ADD RAX,0x4
CMP RAX,RCX
JZ 0x00101380
LAB_00101331:
MOV EDX,dword ptr [RAX]
TEST DL,0x1
JNZ 0x00101328
JMP 0x00101349
LAB_00101340:
ADD RDI,0x4
CMP RDI,RCX
JZ 0x00101370
LAB_00101349:
M... | double func0(uint *param_1,int param_2)
{
uint *puVar1;
uint uVar2;
uint *puVar3;
uint uVar4;
if (0 < param_2) {
puVar1 = param_1 + (ulong)(param_2 - 1) + 1;
puVar3 = param_1;
do {
uVar4 = *puVar3;
if ((uVar4 & 1) == 0) goto LAB_00101349;
puVar3 = puVar3 + 1;
} while (puV... |
4,047 | func0 |
#include <assert.h>
| double func0(int list1[], int size) {
int first_even = -1;
int first_odd = -1;
for (int i = 0; i < size; i++) {
if (list1[i] % 2 == 0) {
first_even = list1[i];
break;
}
}
for (int i = 0; i < size; i++) {
if (list1[i] % 2 != 0) {
... | int main() {
int list1[] = {1, 3, 5, 7, 4, 1, 6, 8};
int size1 = sizeof(list1) / sizeof(list1[0]);
assert(func0(list1, size1) == 4);
int list2[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
int size2 = sizeof(list2) / sizeof(list2[0]);
assert(func0(list2, size2) == 2);
int list3[] = {1, 5, ... | O3 | c | func0:
endbr64
test %esi,%esi
jle 1320 <func0+0x60>
lea -0x1(%rsi),%eax
lea 0x4(%rdi,%rax,4),%rcx
mov %rdi,%rax
jmp 12e1 <func0+0x21>
nopl (%rax)
add $0x4,%rax
cmp %rcx,%rax
je 1330 <func0+0x70>
mov (%rax),%edx
test $0x1,%dl
jne 12d8 <func0+0x18>
jmp 12f9 <func0+0x39>
nopw 0x0(... | func0:
endbr64
test esi, esi
jle short loc_1320
movsxd rsi, esi
mov rax, rdi
lea rcx, [rdi+rsi*4]
jmp short loc_12E1
loc_12D8:
add rax, 4
cmp rcx, rax
jz short loc_1330
loc_12E1:
mov edx, [rax]
test dl, 1
jnz short loc_12D8
mov esi, 1
jmp short loc_12F9
loc_12F0:
add ... | double func0(int *a1, int a2)
{
int *v2; // rax
int *v3; // rcx
int v4; // edx
char v5; // si
int v6; // eax
if ( a2 <= 0 )
return -1.0;
v2 = a1;
v3 = &a1[a2];
do
{
v4 = *v2;
if ( (*v2 & 1) == 0 )
{
v5 = 1;
goto LABEL_7;
}
++v2;
}
while ( v3 != v2 );
v5 = ... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x00101320
MOVSXD RSI,ESI
MOV RAX,RDI
LEA RCX,[RDI + RSI*0x4]
JMP 0x001012e1
LAB_001012d8:
ADD RAX,0x4
CMP RCX,RAX
JZ 0x00101330
LAB_001012e1:
MOV EDX,dword ptr [RAX]
TEST DL,0x1
JNZ 0x001012d8
MOV ESI,0x1
JMP 0x001012f9
LAB_001012f0:
ADD RDI,0x4
CMP RCX,RDI
JZ 0x00101320
LAB_001012f9:
M... | double func0(uint *param_1,int param_2)
{
uint *puVar1;
uint uVar2;
bool bVar3;
uint *puVar4;
uint uVar5;
if (0 < param_2) {
puVar1 = param_1 + param_2;
puVar4 = param_1;
do {
uVar5 = *puVar4;
if ((uVar5 & 1) == 0) {
bVar3 = true;
goto LAB_001012f9;
}
... |
4,048 | func0 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
typedef struct {
int freq;
char ch;
} HeapNode;
void swap(HeapNode *a, HeapNode *b) {
HeapNode temp = *a;
*a = *b;
*b = temp;
}
int compare(HeapNode a, HeapNode b) {
// Higher frequency has higher ... | char* func0(const char *S) {
int len = strlen(S);
if(len == 0) {
char *empty = malloc(1);
if(empty) empty[0] = '\0';
return empty;
}
int freq[256] = {0};
for(int i = 0; i < len; i++) {
freq[(unsigned char)S[i]]++;
}
// Build heap array. Maximu... | int main() {
char *res1 = func0("aab");
// The expected output is "aba"
assert(strcmp(res1, "aba") == 0);
free(res1);
char *res2 = func0("aabb");
// The expected output is "abab"
assert(strcmp(res2, "abab") == 0);
free(res2);
char *res3 = func0("abccdd");
//... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0xc60,%rsp
mov %rdi,-0xc58(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
mov -0xc58(%rbp),%rax
mov %rax,%rdi
callq 10b0 <strlen@plt>
mov %eax,-0xc3c(%rbp)
cmpl $0x0,-0xc3c(%rbp)
jne 1553 <func0+0x74>
mov $0x1,%edi
callq 10f0 ... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 0C60h
mov [rbp+s], rdi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov rax, [rbp+s]
mov rdi, rax; s
call _strlen
mov [rbp+var_C3C], eax
cmp [rbp+var_C3C], 0
jnz short loc_1561
mov edi, 1; size
call _malloc
mov ... | _BYTE * func0(const char *a1)
{
int v2; // eax
int v3; // eax
int v4; // eax
int v5; // eax
int v6; // [rsp+10h] [rbp-C50h] BYREF
int i; // [rsp+14h] [rbp-C4Ch]
int j; // [rsp+18h] [rbp-C48h]
int k; // [rsp+1Ch] [rbp-C44h]
int v10; // [rsp+20h] [rbp-C40h]
int v11; // [rsp+24h] [rbp-C3Ch]
_BYTE *v1... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0xc60
MOV qword ptr [RBP + -0xc58],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0xc58]
MOV RDI,RAX
CALL 0x001010b0
MOV dword ptr [RBP + -0xc3c],EAX
CMP dword ptr [RBP + -0xc3c],0x0
JNZ 0x00101561
MOV EDI,0x1
CALL 0x00101... | int * func0(char *param_1)
{
int iVar1;
size_t sVar2;
int *puVar3;
int8 uVar4;
long lVar5;
int *piVar6;
long in_FS_OFFSET;
byte bVar7;
int local_c58;
int local_c54;
int local_c50;
int local_c4c;
int local_c48;
int local_c44;
int *local_c40;
int *local_c38;
int *local_c30;
int8 local... |
4,049 | func0 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
typedef struct {
int freq;
char ch;
} HeapNode;
void swap(HeapNode *a, HeapNode *b) {
HeapNode temp = *a;
*a = *b;
*b = temp;
}
int compare(HeapNode a, HeapNode b) {
// Higher frequency has higher ... | char* func0(const char *S) {
int len = strlen(S);
if(len == 0) {
char *empty = malloc(1);
if(empty) empty[0] = '\0';
return empty;
}
int freq[256] = {0};
for(int i = 0; i < len; i++) {
freq[(unsigned char)S[i]]++;
}
// Build heap array. Maximu... | int main() {
char *res1 = func0("aab");
// The expected output is "aba"
assert(strcmp(res1, "aba") == 0);
free(res1);
char *res2 = func0("aabb");
// The expected output is "abab"
assert(strcmp(res2, "abab") == 0);
free(res2);
char *res3 = func0("abccdd");
//... | O1 | c | func0:
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0xc38,%rsp
mov %rdi,%rdx
mov %fs:0x28,%rax
mov %rax,0xc28(%rsp)
xor %eax,%eax
mov $0xffffffffffffffff,%rcx
repnz scas %es:(%rdi),%al
not %rcx
cmp $0x1,%ecx
je 140e <func0+0x98>
lea -0x1(%rcx),%rbx
... | func0:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 0C28h
mov rbp, rdi
mov rax, fs:28h
mov [rsp+0C58h+var_40], rax
xor eax, eax
call _strlen
test eax, eax
jz short loc_143D
mov rbx, rax
lea rdi, [rsp+0C58h+var_C48]
mov ecx, 80h
mov ... | long long func0(unsigned __int8 *a1)
{
int v1; // eax
int v2; // ebx
unsigned __int8 *v3; // rax
long long v4; // rax
char v5; // si
int v6; // ecx
_BYTE *v7; // rax
long long v8; // r14
int v9; // edx
int v10; // r12d
int v11; // ebp
int v12; // eax
long long v13; // r12
_BYTE *v14; // rax... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0xc28
MOV RBP,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xc18],RAX
XOR EAX,EAX
CALL 0x001010b0
TEST EAX,EAX
JZ 0x0010143d
MOV RBX,RAX
LEA RDI,[RSP + 0x10]
MOV ECX,0x80
MOV EAX,0x0
STOSQ.REP RDI
JLE 0x0010141f
MOV RAX,RBP
LEA EDX,[RB... | int1 * func0(byte *param_1)
{
byte *pbVar1;
bool bVar2;
uint uVar3;
int1 extraout_var;
size_t sVar4;
int1 *puVar5;
ulong uVar6;
ulong uVar7;
int iVar8;
long lVar9;
int iVar10;
int *piVar11;
int iVar12;
uint uVar13;
int iVar14;
long in_FS_OFFSET;
byte bVar15;
int local_c4c;
int loc... |
4,050 | func0 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
typedef struct {
int freq;
char ch;
} HeapNode;
void swap(HeapNode *a, HeapNode *b) {
HeapNode temp = *a;
*a = *b;
*b = temp;
}
int compare(HeapNode a, HeapNode b) {
// Higher frequency has higher ... | char* func0(const char *S) {
int len = strlen(S);
if(len == 0) {
char *empty = malloc(1);
if(empty) empty[0] = '\0';
return empty;
}
int freq[256] = {0};
for(int i = 0; i < len; i++) {
freq[(unsigned char)S[i]]++;
}
// Build heap array. Maximu... | int main() {
char *res1 = func0("aab");
// The expected output is "aba"
assert(strcmp(res1, "aba") == 0);
free(res1);
char *res2 = func0("aabb");
// The expected output is "abab"
assert(strcmp(res2, "abab") == 0);
free(res2);
char *res3 = func0("abccdd");
//... | O2 | c | func0:
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
mov %rdi,%rbp
push %rbx
sub $0xc38,%rsp
mov %fs:0x28,%rax
mov %rax,0xc28(%rsp)
xor %eax,%eax
callq 10a0 <strlen@plt>
test %eax,%eax
je 16ea <func0+0x21a>
lea 0x20(%rsp),%r8
mov %rax,%rbx
mov $0x80,%ecx
mov $0x... | func0:
endbr64
push r15
push r14
push r13
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 0C28h
mov rax, fs:28h
mov [rsp+0C58h+var_40], rax
xor eax, eax
call _strlen
test eax, eax
jz loc_1703
lea rsi, [rsp+0C58h+var_C48]
mov rbx, rax
mov ecx, 80h
mov eax... | long long func0(unsigned __int8 *a1)
{
int v1; // eax
int v2; // ebx
long long v3; // rdx
long long v4; // rax
int v5; // edx
long long v6; // rax
int v7; // r14d
long long v8; // rcx
unsigned int v9; // ebp
int v11; // eax
int v12; // ebx
long long v13; // r13
long long v14; // rdx
unsigne... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0xc28
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xc18],RAX
XOR EAX,EAX
CALL 0x001010b0
TEST EAX,EAX
JZ 0x00101703
LEA RSI,[RSP + 0x10]
MOV RBX,RAX
MOV ECX,0x80
MOV EAX,0x0
MOV RDI,RSI
STOSQ.REP RDI
JLE 0x0010175e
LEA EAX,[RB... | int1 * func0(byte *param_1)
{
byte *pbVar1;
int1 uVar2;
int1 uVar3;
int iVar4;
int iVar5;
size_t sVar6;
long lVar7;
long lVar8;
int1 *puVar9;
int iVar10;
int *piVar11;
int iVar12;
int iVar13;
long in_FS_OFFSET;
byte bVar14;
int local_c54;
int1 *local_c50;
int local_c48 [254];
int8... |
4,051 | func0 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
typedef struct {
int freq;
char ch;
} HeapNode;
void swap(HeapNode *a, HeapNode *b) {
HeapNode temp = *a;
*a = *b;
*b = temp;
}
int compare(HeapNode a, HeapNode b) {
// Higher frequency has higher ... | char* func0(const char *S) {
int len = strlen(S);
if(len == 0) {
char *empty = malloc(1);
if(empty) empty[0] = '\0';
return empty;
}
int freq[256] = {0};
for(int i = 0; i < len; i++) {
freq[(unsigned char)S[i]]++;
}
// Build heap array. Maximu... | int main() {
char *res1 = func0("aab");
// The expected output is "aba"
assert(strcmp(res1, "aba") == 0);
free(res1);
char *res2 = func0("aabb");
// The expected output is "abab"
assert(strcmp(res2, "abab") == 0);
free(res2);
char *res3 = func0("abccdd");
//... | O3 | c | func0:
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
mov %rdi,%rbx
sub $0xc38,%rsp
mov %fs:0x28,%rax
mov %rax,0xc28(%rsp)
xor %eax,%eax
callq 10a0 <strlen@plt>
test %eax,%eax
je 1829 <func0+0x2f9>
lea 0x20(%rsp),%rsi
mov %rax,%rbp
mov $0x80,%ecx
mov $0... | func0:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
mov rbx, rdi
sub rsp, 0C38h
mov rax, fs:28h
mov [rsp+0C68h+var_40], rax
xor eax, eax
call _strlen
test eax, eax
jz loc_1798
lea rsi, [rsp+0C68h+var_C48]
mov r12, rax
mov ecx, 80h
mov eax... | _BYTE * func0(const char *a1)
{
int v1; // eax
int v2; // r12d
long long v3; // rdx
long long v4; // rax
long long v5; // rax
int v6; // ebp
int v7; // edx
long long v8; // rcx
int v9; // ebx
int v11; // eax
int v12; // r12d
_BYTE *v13; // rax
_BYTE *v14; // r10
long long v15; // r8
int v1... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
SUB RSP,0xc38
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xc28],RAX
XOR EAX,EAX
CALL 0x001010b0
TEST EAX,EAX
JZ 0x00101798
LEA RSI,[RSP + 0x20]
MOV R12,RAX
MOV ECX,0x80
MOV EAX,0x0
MOV RDI,RSI
STOSQ.REP RDI
JLE 0x001015c1
LEA EAX,[R1... | int * func0(byte *param_1)
{
int iVar1;
byte *pbVar2;
char cVar3;
char cVar4;
int uVar5;
int2 uVar6;
int iVar7;
int iVar8;
size_t sVar9;
int *puVar10;
long lVar11;
long lVar12;
int iVar13;
int iVar14;
int *puVar15;
int *piVar16;
int8 *puVar17;
int iVar18;
long in_FS_OFFSET;
bool... |
4,052 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
typedef struct {
int num;
int count;
} freq_t;
int compare_freq(const void *a, const void *b) {
freq_t *fa = (freq_t *)a;
freq_t *fb = (freq_t *)b;
return fa->num - fb->num;
}
| freq_t* func0(int nums[][4], int num_lists, int list_size, int *unique_count) {
freq_t *freq = malloc(num_lists * list_size * sizeof(freq_t));
int total = 0;
for(int i = 0; i < num_lists; i++) {
for(int j = 0; j < list_size; j++) {
int found = 0;
for(int k = 0; k < tota... | int main() {
int unique_count1, unique_count2, unique_count3;
int test1[][4] = {{1, 2, 3, 2}, {4, 5, 6, 2}, {7, 1, 9, 5}};
freq_t *result1 = func0(test1, 3, 4, &unique_count1);
freq_t expected1[] = {{1,2}, {2,3}, {3,1}, {4,1}, {5,2}, {6,1}, {7,1}, {9,1}};
assert(unique_count1 == 8);
for(... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x40,%rsp
mov %rdi,-0x28(%rbp)
mov %esi,-0x2c(%rbp)
mov %edx,-0x30(%rbp)
mov %rcx,-0x38(%rbp)
mov -0x2c(%rbp),%eax
imul -0x30(%rbp),%eax
cltq
shl $0x3,%rax
mov %rax,%rdi
callq 10d0 <malloc@plt>
mov %rax,-0x8(%rbp)
movl $0x0,-0x1c(%rbp)
mov... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_28], rdi
mov [rbp+var_2C], esi
mov [rbp+var_30], edx
mov [rbp+var_38], rcx
mov eax, [rbp+var_2C]
imul eax, [rbp+var_30]
cdqe
shl rax, 3
mov rdi, rax; size
call _malloc
mov [rbp+base], rax
mov [rbp+var_1C]... | _DWORD * func0(long long a1, int a2, int a3, _DWORD *a4)
{
int v7; // [rsp+24h] [rbp-1Ch]
int i; // [rsp+28h] [rbp-18h]
int j; // [rsp+2Ch] [rbp-14h]
int v10; // [rsp+30h] [rbp-10h]
int k; // [rsp+34h] [rbp-Ch]
_DWORD *base; // [rsp+38h] [rbp-8h]
base = malloc(8LL * a3 * a2);
v7 = 0;
for ( i = 0; i <... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x28],RDI
MOV dword ptr [RBP + -0x2c],ESI
MOV dword ptr [RBP + -0x30],EDX
MOV qword ptr [RBP + -0x38],RCX
MOV EAX,dword ptr [RBP + -0x2c]
IMUL EAX,dword ptr [RBP + -0x30]
CDQE
SHL RAX,0x3
MOV RDI,RAX
CALL 0x001010d0
MOV qword ptr [RBP + -0x8],RAX
MO... | void * func0(long param_1,int param_2,int param_3,int *param_4)
{
bool bVar1;
void *__base;
int local_24;
int local_20;
int local_1c;
int local_14;
__base = malloc((long)(param_2 * param_3) << 3);
local_24 = 0;
local_20 = 0;
do {
if (param_2 <= local_20) {
qsort(__base,(long)local_24,8... |
4,053 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
typedef struct {
int num;
int count;
} freq_t;
int compare_freq(const void *a, const void *b) {
freq_t *fa = (freq_t *)a;
freq_t *fb = (freq_t *)b;
return fa->num - fb->num;
}
| freq_t* func0(int nums[][4], int num_lists, int list_size, int *unique_count) {
freq_t *freq = malloc(num_lists * list_size * sizeof(freq_t));
int total = 0;
for(int i = 0; i < num_lists; i++) {
for(int j = 0; j < list_size; j++) {
int found = 0;
for(int k = 0; k < tota... | int main() {
int unique_count1, unique_count2, unique_count3;
int test1[][4] = {{1, 2, 3, 2}, {4, 5, 6, 2}, {7, 1, 9, 5}};
freq_t *result1 = func0(test1, 3, 4, &unique_count1);
freq_t expected1[] = {{1,2}, {2,3}, {3,1}, {4,1}, {5,2}, {6,1}, {7,1}, {9,1}};
assert(unique_count1 == 8);
for(... | O1 | c | func0:
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
mov %rdi,%r14
mov %esi,%ebx
mov %edx,%r12d
mov %rcx,%r13
mov %esi,%edi
imul %edx,%edi
movslq %edi,%rdi
shl $0x3,%rdi
callq 10d0 <malloc@plt>
mov %rax,%rbp
test %ebx,%ebx
jle 127b <func0+0xa9>
mov %r14,%r10
lea ... | func0:
endbr64
push r14
push r13
push r12
push rbp
push rbx
mov r14, rdi
mov ebx, esi
mov r12d, edx
mov r13, rcx
mov edi, esi
imul edi, edx
movsxd rdi, edi
shl rdi, 3
call _malloc
mov rbp, rax
test ebx, ebx
jle short loc_127B
mov r10, r14
lea eax, [rbx-1]... | long long func0(long long a1, int a2, int a3, int *a4)
{
long long v6; // rbp
long long v7; // r8
long long v8; // r10
long long v9; // r11
int v10; // ebx
_DWORD *v11; // rax
long long v12; // rdi
_DWORD *v13; // rax
v6 = malloc(8LL * a3 * a2);
if ( a2 <= 0 )
{
v10 = 0;
}
else
{
v... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV R14,RDI
MOV EBX,ESI
MOV R12D,EDX
MOV R13,RCX
MOV EDI,ESI
IMUL EDI,EDX
MOVSXD RDI,EDI
SHL RDI,0x3
CALL 0x001010d0
MOV RBP,RAX
TEST EBX,EBX
JLE 0x0010127b
MOV R10,R14
LEA EAX,[RBX + -0x1]
SHL RAX,0x4
LEA R11,[R14 + RAX*0x1 + 0x10]
MOV EBX,0x0
LEA R9,[RBP + 0... | int * func0(long param_1,int param_2,int param_3,int *param_4)
{
long lVar1;
int *__base;
int *piVar2;
int iVar3;
long lVar4;
__base = (int *)malloc((long)(param_2 * param_3) << 3);
if (param_2 < 1) {
iVar3 = 0;
}
else {
lVar1 = param_1 + 0x10;
iVar3 = 0;
do {
if (0 < param_3... |
4,054 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
typedef struct {
int num;
int count;
} freq_t;
int compare_freq(const void *a, const void *b) {
freq_t *fa = (freq_t *)a;
freq_t *fb = (freq_t *)b;
return fa->num - fb->num;
}
| freq_t* func0(int nums[][4], int num_lists, int list_size, int *unique_count) {
freq_t *freq = malloc(num_lists * list_size * sizeof(freq_t));
int total = 0;
for(int i = 0; i < num_lists; i++) {
for(int j = 0; j < list_size; j++) {
int found = 0;
for(int k = 0; k < tota... | int main() {
int unique_count1, unique_count2, unique_count3;
int test1[][4] = {{1, 2, 3, 2}, {4, 5, 6, 2}, {7, 1, 9, 5}};
freq_t *result1 = func0(test1, 3, 4, &unique_count1);
freq_t expected1[] = {{1,2}, {2,3}, {3,1}, {4,1}, {5,2}, {6,1}, {7,1}, {9,1}};
assert(unique_count1 == 8);
for(... | O2 | c | func0:
endbr64
push %r14
mov %rdi,%r14
mov %esi,%edi
imul %edx,%edi
push %r13
mov %edx,%r13d
push %r12
push %rbp
mov %rcx,%rbp
push %rbx
movslq %edi,%rdi
mov %esi,%ebx
shl $0x3,%rdi
callq 10d0 <malloc@plt>
mov %rax,%r12
test %ebx,%ebx
jle 17e5 <func0+0xe5>
lea -0x1(%r13),%r9d
l... | func0:
endbr64
push r14
mov r14, rdi
mov edi, esi
imul edi, edx
push r13
mov r13d, edx
push r12
push rbp
mov rbp, rcx
push rbx
movsxd rdi, edi
mov ebx, esi
shl rdi, 3
call _malloc
mov r12, rax
test ebx, ebx
jle loc_17ED
lea edx, [r13-1]
lea ecx, [rbx-1]
x... | long long func0(long long a1, int a2, int a3, _DWORD *a4)
{
long long v7; // r8
long long v8; // r12
long long v9; // rdx
int v10; // ebx
long long v11; // rdi
long long v12; // r9
long long v13; // r10
int *v14; // rsi
int v15; // edx
_DWORD *v16; // rax
long long v17; // rsi
long long v19; //... | func0:
ENDBR64
PUSH R14
MOV R14,RDI
MOV EDI,ESI
IMUL EDI,EDX
PUSH R13
MOV R13D,EDX
PUSH R12
PUSH RBP
MOV RBP,RCX
PUSH RBX
MOVSXD RDI,EDI
MOV EBX,ESI
SHL RDI,0x3
CALL 0x001010d0
MOV R12,RAX
TEST EBX,EBX
JLE 0x001017ed
LEA EDX,[R13 + -0x1]
LEA ECX,[RBX + -0x1]
XOR EBX,EBX
MOV R10,-0x4
LEA RAX,[RDX*0x4]
LEA RDX,[RDX + RCX... | int * func0(long param_1,int param_2,int param_3,int *param_4)
{
int *__base;
int *piVar1;
long lVar2;
ulong uVar3;
int iVar4;
int *piVar5;
size_t __nmemb;
int *piVar6;
__base = (int *)malloc((long)(param_2 * param_3) << 3);
if (param_2 < 1) {
__nmemb = 0;
iVar4 = 0;
}
else {
uVa... |
4,055 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
typedef struct {
int num;
int count;
} freq_t;
int compare_freq(const void *a, const void *b) {
freq_t *fa = (freq_t *)a;
freq_t *fb = (freq_t *)b;
return fa->num - fb->num;
}
| freq_t* func0(int nums[][4], int num_lists, int list_size, int *unique_count) {
freq_t *freq = malloc(num_lists * list_size * sizeof(freq_t));
int total = 0;
for(int i = 0; i < num_lists; i++) {
for(int j = 0; j < list_size; j++) {
int found = 0;
for(int k = 0; k < tota... | int main() {
int unique_count1, unique_count2, unique_count3;
int test1[][4] = {{1, 2, 3, 2}, {4, 5, 6, 2}, {7, 1, 9, 5}};
freq_t *result1 = func0(test1, 3, 4, &unique_count1);
freq_t expected1[] = {{1,2}, {2,3}, {3,1}, {4,1}, {5,2}, {6,1}, {7,1}, {9,1}};
assert(unique_count1 == 8);
for(... | O3 | c | func0:
endbr64
push %r14
mov %rdi,%r14
mov %esi,%edi
imul %edx,%edi
push %r13
mov %edx,%r13d
push %r12
push %rbp
mov %rcx,%rbp
push %rbx
movslq %edi,%rdi
mov %esi,%ebx
shl $0x3,%rdi
callq 10d0 <malloc@plt>
mov %rax,%r12
test %ebx,%ebx
jle 1985 <func0+0xe5>
lea -0x1(%r13),%r9d
l... | func0:
endbr64
push r14
mov r14, rdi
push r13
mov r13d, edx
push r12
movsxd r12, esi
mov edi, r12d
push rbp
mov rbp, rcx
imul edi, edx
push rbx
movsxd rdi, edi
shl rdi, 3; size
call _malloc
mov rbx, rax
test r12d, r12d
jle loc_1762
movsxd rax, r13d
xor esi, esi... | _DWORD * func0(long long a1, int a2, int a3, int *a4)
{
long long v5; // r12
_DWORD *v7; // rbx
size_t v8; // rsi
long long v9; // r10
long long v10; // rax
int v11; // r12d
int *v12; // r8
int *v13; // r9
int *v14; // rdi
int v15; // edx
_DWORD *v16; // rax
_DWORD *v17; // rax
v5 = a2;
v7 ... | func0:
ENDBR64
PUSH R14
MOV R14,RDI
PUSH R13
MOV R13D,EDX
PUSH R12
MOVSXD R12,ESI
MOV EDI,R12D
PUSH RBP
MOV RBP,RCX
IMUL EDI,EDX
PUSH RBX
MOVSXD RDI,EDI
SHL RDI,0x3
CALL 0x001010d0
MOV RBX,RAX
TEST R12D,R12D
JLE 0x00101762
MOVSXD RAX,R13D
XOR ESI,ESI
LEA R10,[RAX*0x4]
LEA RAX,[RAX + R12*0x4]
XOR R12D,R12D
LEA R8,[R10 +... | int * func0(long param_1,int param_2,int param_3,int *param_4)
{
int *piVar1;
int *__base;
long lVar2;
int *piVar3;
int iVar4;
size_t __nmemb;
int *piVar5;
int *piVar6;
int iVar7;
__base = (int *)malloc((long)(param_2 * param_3) << 3);
if (param_2 < 1) {
__nmemb = 0;
iVar7 = 0;
}
e... |
4,056 | func0 | #include <stdio.h>
#include <stdlib.h>
#include <assert.h>
| int *func0(int *nums, int length, int *output_length) {
int *even_nums = malloc(length * sizeof(int));
int count = 0;
for (int i = 0; i < length; i++) {
if (nums[i] % 2 == 0) {
even_nums[count++] = nums[i];
}
}
*output_length = count;
return even_nums;
}
| int main() {
int output_length;
int nums1[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
int expected1[] = {2, 4, 6, 8, 10};
int *result1 = func0(nums1, 10, &output_length);
assert(output_length == 5);
for (int i = 0; i < output_length; i++) {
assert(result1[i] == expected1[i]);
}
... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x30,%rsp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
mov %rdx,-0x28(%rbp)
mov -0x1c(%rbp),%eax
cltq
shl $0x2,%rax
mov %rax,%rdi
callq 10d0 <malloc@plt>
mov %rax,-0x8(%rbp)
movl $0x0,-0x10(%rbp)
movl $0x0,-0xc(%rbp)
jmp 1259 <func0+0x90>
mov... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_28], rdx
mov eax, [rbp+var_1C]
cdqe
shl rax, 2
mov rdi, rax; size
call _malloc
mov [rbp+var_8], rax
mov [rbp+var_10], 0
mov [rbp+var_C], 0
jmp short loc_1259
l... | _DWORD * func0(long long a1, int a2, _DWORD *a3)
{
int v3; // eax
int v6; // [rsp+20h] [rbp-10h]
int i; // [rsp+24h] [rbp-Ch]
_DWORD *v8; // [rsp+28h] [rbp-8h]
v8 = malloc(4LL * a2);
v6 = 0;
for ( i = 0; i < a2; ++i )
{
if ( (*(_DWORD *)(4LL * i + a1) & 1) == 0 )
{
v3 = v6++;
v8[v3]... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV qword ptr [RBP + -0x28],RDX
MOV EAX,dword ptr [RBP + -0x1c]
CDQE
SHL RAX,0x2
MOV RDI,RAX
CALL 0x001010d0
MOV qword ptr [RBP + -0x8],RAX
MOV dword ptr [RBP + -0x10],0x0
MOV dword ptr [RBP + -0xc],0x0
JMP ... | void * func0(long param_1,int param_2,int *param_3)
{
void *pvVar1;
int4 local_18;
int4 local_14;
pvVar1 = malloc((long)param_2 << 2);
local_18 = 0;
for (local_14 = 0; local_14 < param_2; local_14 = local_14 + 1) {
if ((*(uint *)(param_1 + (long)local_14 * 4) & 1) == 0) {
*(int4 *)((long)local... |
4,057 | func0 | #include <stdio.h>
#include <stdlib.h>
#include <assert.h>
| int *func0(int *nums, int length, int *output_length) {
int *even_nums = malloc(length * sizeof(int));
int count = 0;
for (int i = 0; i < length; i++) {
if (nums[i] % 2 == 0) {
even_nums[count++] = nums[i];
}
}
*output_length = count;
return even_nums;
}
| int main() {
int output_length;
int nums1[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
int expected1[] = {2, 4, 6, 8, 10};
int *result1 = func0(nums1, 10, &output_length);
assert(output_length == 5);
for (int i = 0; i < output_length; i++) {
assert(result1[i] == expected1[i]);
}
... | O1 | c | func0:
endbr64
push %r12
push %rbp
push %rbx
mov %rdi,%r12
mov %esi,%ebp
mov %rdx,%rbx
movslq %esi,%rdi
shl $0x2,%rdi
callq 10d0 <malloc@plt>
test %ebp,%ebp
jle 1217 <func0+0x4e>
mov %r12,%rdx
lea -0x1(%rbp),%ecx
lea 0x4(%r12,%rcx,4),%rdi
mov $0x0,%esi
jmp 1204 <func0+0x3b>
add ... | func0:
endbr64
push r12
push rbp
push rbx
mov r12, rdi
mov ebp, esi
mov rbx, rdx
movsxd rdi, esi
shl rdi, 2
call _malloc
test ebp, ebp
jle short loc_1217
mov rdx, r12
lea ecx, [rbp-1]
lea rdi, [r12+rcx*4+4]
mov esi, 0
jmp short loc_1204
loc_11FB:
add rdx, 4
cm... | long long func0(_DWORD *a1, int a2, _DWORD *a3)
{
long long result; // rax
_DWORD *v6; // rdx
int v7; // esi
result = malloc(4LL * a2);
if ( a2 <= 0 )
{
v7 = 0;
}
else
{
v6 = a1;
v7 = 0;
do
{
if ( (*v6 & 1) == 0 )
*(_DWORD *)(result + 4LL * v7++) = *v6;
++v6;
... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
MOV R12,RDI
MOV EBP,ESI
MOV RBX,RDX
MOVSXD RDI,ESI
SHL RDI,0x2
CALL 0x001010d0
TEST EBP,EBP
JLE 0x00101217
MOV RDX,R12
LEA ECX,[RBP + -0x1]
LEA RDI,[R12 + RCX*0x4 + 0x4]
MOV ESI,0x0
JMP 0x00101204
LAB_001011fb:
ADD RDX,0x4
CMP RDX,RDI
JZ 0x0010121c
LAB_00101204:
MOV ECX,dword p... | void func0(uint *param_1,int param_2,int *param_3)
{
uint *puVar1;
void *pvVar2;
int iVar3;
pvVar2 = malloc((long)param_2 << 2);
if (param_2 < 1) {
iVar3 = 0;
}
else {
puVar1 = param_1 + (ulong)(param_2 - 1) + 1;
iVar3 = 0;
do {
if ((*param_1 & 1) == 0) {
*(uint *)((long)... |
4,058 | func0 | #include <stdio.h>
#include <stdlib.h>
#include <assert.h>
| int *func0(int *nums, int length, int *output_length) {
int *even_nums = malloc(length * sizeof(int));
int count = 0;
for (int i = 0; i < length; i++) {
if (nums[i] % 2 == 0) {
even_nums[count++] = nums[i];
}
}
*output_length = count;
return even_nums;
}
| int main() {
int output_length;
int nums1[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
int expected1[] = {2, 4, 6, 8, 10};
int *result1 = func0(nums1, 10, &output_length);
assert(output_length == 5);
for (int i = 0; i < output_length; i++) {
assert(result1[i] == expected1[i]);
}
... | O2 | c | func0:
endbr64
push %r12
mov %rdx,%r12
push %rbp
push %rbx
mov %rdi,%rbx
movslq %esi,%rdi
mov %rdi,%rbp
shl $0x2,%rdi
callq 10d0 <malloc@plt>
test %ebp,%ebp
jle 14d8 <func0+0x58>
lea -0x1(%rbp),%edx
mov %rbx,%rdi
xor %esi,%esi
lea 0x4(%rbx,%rdx,4),%r8
xchg %ax,%ax
mov (%rdi),%ec... | func0:
endbr64
push r12
mov r12, rdx
push rbp
push rbx
mov rbx, rdi
movsxd rdi, esi
mov rbp, rdi
shl rdi, 2
call _malloc
test ebp, ebp
jle short loc_14D8
lea edx, [rbp-1]
mov rcx, rbx
xor edi, edi
lea r8, [rbx+rdx*4+4]
xchg ax, ax
loc_14B0:
mov esi, [rcx]
test ... | long long func0(_DWORD *a1, int a2, _DWORD *a3)
{
long long result; // rax
_DWORD *v6; // rcx
int v7; // edi
long long v8; // r9
result = malloc(4LL * a2);
if ( a2 <= 0 )
{
*a3 = 0;
}
else
{
v6 = a1;
v7 = 0;
do
{
if ( (*v6 & 1) == 0 )
{
v8 = v7++;
*(... | func0:
ENDBR64
PUSH R12
MOV R12,RDX
PUSH RBP
PUSH RBX
MOV RBX,RDI
MOVSXD RDI,ESI
MOV RBP,RDI
SHL RDI,0x2
CALL 0x001010d0
TEST EBP,EBP
JLE 0x001014d8
LEA EDX,[RBP + -0x1]
MOV RCX,RBX
XOR EDI,EDI
LEA R8,[RBX + RDX*0x4 + 0x4]
NOP
LAB_001014b0:
MOV ESI,dword ptr [RCX]
TEST SIL,0x1
JNZ 0x001014c2
MOVSXD R9,EDI
ADD EDI,0x1
M... | void func0(uint *param_1,int param_2,int *param_3)
{
uint *puVar1;
void *pvVar2;
int iVar3;
long lVar4;
pvVar2 = malloc((long)param_2 << 2);
if (0 < param_2) {
iVar3 = 0;
puVar1 = param_1 + (ulong)(param_2 - 1) + 1;
do {
if ((*param_1 & 1) == 0) {
lVar4 = (long)iVar3;
i... |
4,059 | func0 | #include <stdio.h>
#include <stdlib.h>
#include <assert.h>
| int *func0(int *nums, int length, int *output_length) {
int *even_nums = malloc(length * sizeof(int));
int count = 0;
for (int i = 0; i < length; i++) {
if (nums[i] % 2 == 0) {
even_nums[count++] = nums[i];
}
}
*output_length = count;
return even_nums;
}
| int main() {
int output_length;
int nums1[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
int expected1[] = {2, 4, 6, 8, 10};
int *result1 = func0(nums1, 10, &output_length);
assert(output_length == 5);
for (int i = 0; i < output_length; i++) {
assert(result1[i] == expected1[i]);
}
... | O3 | c | func0:
endbr64
push %r12
mov %rdx,%r12
push %rbp
push %rbx
mov %rdi,%rbx
movslq %esi,%rdi
mov %rdi,%rbp
shl $0x2,%rdi
callq 10d0 <malloc@plt>
test %ebp,%ebp
jle 1498 <func0+0x58>
lea -0x1(%rbp),%edx
mov %rbx,%rdi
xor %esi,%esi
lea 0x4(%rbx,%rdx,4),%r8
xchg %ax,%ax
mov (%rdi),%ec... | func0:
endbr64
push r13
movsxd r8, esi
mov r13, rdx
push r12
mov r12, r8
push rbp
lea rbp, ds:0[r8*4]
push rbx
mov rbx, rdi
mov rdi, rbp; size
sub rsp, 8
call _malloc
test r12d, r12d
jle short loc_1480
mov rcx, rbx
lea r8, [rbx+rbp]
xor edi, edi
nop dword p... | _DWORD * func0(_DWORD *a1, int a2, _DWORD *a3)
{
_DWORD *result; // rax
_DWORD *v6; // rcx
int v7; // edi
long long v8; // r9
result = malloc(4LL * a2);
if ( a2 <= 0 )
{
*a3 = 0;
}
else
{
v6 = a1;
v7 = 0;
do
{
if ( (*v6 & 1) == 0 )
{
v8 = v7++;
result... | func0:
ENDBR64
PUSH R13
MOVSXD R8,ESI
MOV R13,RDX
PUSH R12
MOV R12,R8
PUSH RBP
LEA RBP,[R8*0x4]
PUSH RBX
MOV RBX,RDI
MOV RDI,RBP
SUB RSP,0x8
CALL 0x001010d0
TEST R12D,R12D
JLE 0x00101480
MOV RCX,RBX
LEA R8,[RBX + RBP*0x1]
XOR EDI,EDI
NOP dword ptr [RAX + RAX*0x1]
LAB_00101450:
MOV ESI,dword ptr [RCX]
TEST SIL,0x1
JNZ 0... | void func0(uint *param_1,int param_2,int *param_3)
{
uint *puVar1;
void *pvVar2;
int iVar3;
long lVar4;
pvVar2 = malloc((long)param_2 * 4);
if (0 < param_2) {
puVar1 = param_1 + param_2;
iVar3 = 0;
do {
if ((*param_1 & 1) == 0) {
lVar4 = (long)iVar3;
iVar3 = iVar3 + 1;
... |
4,060 | func0 | #include <assert.h>
#include <stdio.h>
| int func0(int arr[], int n) {
int sum = 0;
for (int i = 0; i < n; i++) {
int count = 1;
for (int j = 0; j < n; j++) {
if (arr[j] == arr[i] && j != i) {
count++;
}
}
if (count > 1) {
sum += arr[i];
}
}
... | int main() {
int arr1[] = {1, 2, 3, 1, 1, 4, 5, 6};
int arr2[] = {1, 2, 3, 1, 1};
int arr3[] = {1, 1, 2};
int arr4[] = {1, 1, 2, 3, 4, 5, 6, 3, 5};
assert(func0(arr1, 8) == 3);
assert(func0(arr2, 5) == 3);
assert(func0(arr3, 3) == 2);
assert(func0(arr4, 9) == 18);
printf... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
movl $0x0,-0x10(%rbp)
movl $0x0,-0xc(%rbp)
jmp 1223 <func0+0x9a>
movl $0x1,-0x8(%rbp)
movl $0x0,-0x4(%rbp)
jmp 11f8 <func0+0x6f>
mov -0x4(%rbp),%eax
cltq
lea 0x0(,%rax,4),%rdx
mov -0x18(%rbp),%rax
add %... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_10], 0
mov [rbp+var_C], 0
jmp short loc_1223
loc_11A8:
mov [rbp+var_8], 1
mov [rbp+var_4], 0
jmp short loc_11F8
loc_11B8:
mov eax, [rbp+var_4]
cdqe
lea rdx, ds:0[rax*4]
mov ra... | long long func0(long long a1, int a2)
{
unsigned int v3; // [rsp+Ch] [rbp-10h]
int i; // [rsp+10h] [rbp-Ch]
int v5; // [rsp+14h] [rbp-8h]
int j; // [rsp+18h] [rbp-4h]
v3 = 0;
for ( i = 0; i < a2; ++i )
{
v5 = 1;
for ( j = 0; j < a2; ++j )
{
if ( *(_DWORD *)(4LL * j + a1) == *(_DWORD *)... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0x10],0x0
MOV dword ptr [RBP + -0xc],0x0
JMP 0x00101223
LAB_001011a8:
MOV dword ptr [RBP + -0x8],0x1
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001011f8
LAB_001011b8:
MOV EAX,dword ptr [RBP + -0x4]
CDQE
L... | int func0(long param_1,int param_2)
{
int4 local_18;
int4 local_14;
int4 local_10;
int4 local_c;
local_18 = 0;
for (local_14 = 0; local_14 < param_2; local_14 = local_14 + 1) {
local_10 = 1;
for (local_c = 0; local_c < param_2; local_c = local_c + 1) {
if ((*(int *)(param_1 + (long)local_c... |
4,061 | func0 | #include <assert.h>
#include <stdio.h>
| int func0(int arr[], int n) {
int sum = 0;
for (int i = 0; i < n; i++) {
int count = 1;
for (int j = 0; j < n; j++) {
if (arr[j] == arr[i] && j != i) {
count++;
}
}
if (count > 1) {
sum += arr[i];
}
}
... | int main() {
int arr1[] = {1, 2, 3, 1, 1, 4, 5, 6};
int arr2[] = {1, 2, 3, 1, 1};
int arr3[] = {1, 1, 2};
int arr4[] = {1, 1, 2, 3, 4, 5, 6, 3, 5};
assert(func0(arr1, 8) == 3);
assert(func0(arr2, 5) == 3);
assert(func0(arr3, 3) == 2);
assert(func0(arr4, 9) == 18);
printf... | O1 | c | func0:
endbr64
test %esi,%esi
jle 11ec <func0+0x63>
lea -0x1(%rsi),%r8d
mov $0x0,%r9d
mov $0x0,%r10d
mov $0x0,%r11d
jmp 11de <func0+0x55>
lea 0x1(%rax),%rdx
cmp %r8,%rax
je 11c8 <func0+0x3f>
mov %rdx,%rax
cmp %esi,(%rdi,%rax,4)
jne 11a9 <func0+0x20>
cmp %r9d,%eax
setne %dl
cmp... | func0:
endbr64
test esi, esi
jle short loc_11E3
mov r8d, esi
mov r9d, 0
mov r10d, 0
jmp short loc_11D3
loc_11A2:
add rax, 1
cmp rax, r8
jz short loc_11C0
loc_11AB:
cmp [rdi+rax*4], ecx
jnz short loc_11A2
cmp eax, r9d
setnz sil
cmp sil, 1
sbb edx, 0FFFFFFFFh
jmp ... | long long func0(long long a1, int a2)
{
long long v2; // r9
unsigned int v3; // r10d
long long v4; // rax
int v5; // edx
unsigned int v6; // ecx
int v7; // ecx
if ( a2 <= 0 )
{
return 0;
}
else
{
v2 = 0LL;
v3 = 0;
do
{
v7 = *(_DWORD *)(a1 + 4 * v2);
v4 = 0LL;
... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x001011e3
MOV R8D,ESI
MOV R9D,0x0
MOV R10D,0x0
JMP 0x001011d3
LAB_001011a2:
ADD RAX,0x1
CMP RAX,R8
JZ 0x001011c0
LAB_001011ab:
CMP dword ptr [RDI + RAX*0x4],ECX
JNZ 0x001011a2
CMP EAX,R9D
SETNZ SIL
CMP SIL,0x1
SBB EDX,-0x1
JMP 0x001011a2
LAB_001011c0:
ADD ECX,R10D
CMP EDX,0x1
CMOVG R10D... | int func0(long param_1,uint param_2)
{
int iVar1;
ulong uVar2;
int iVar3;
ulong uVar4;
int iVar5;
if ((int)param_2 < 1) {
iVar5 = 0;
}
else {
uVar4 = 0;
iVar5 = 0;
do {
iVar1 = *(int *)(param_1 + uVar4 * 4);
uVar2 = 0;
iVar3 = 1;
do {
if (*(int *)(para... |
4,062 | func0 | #include <assert.h>
#include <stdio.h>
| int func0(int arr[], int n) {
int sum = 0;
for (int i = 0; i < n; i++) {
int count = 1;
for (int j = 0; j < n; j++) {
if (arr[j] == arr[i] && j != i) {
count++;
}
}
if (count > 1) {
sum += arr[i];
}
}
... | int main() {
int arr1[] = {1, 2, 3, 1, 1, 4, 5, 6};
int arr2[] = {1, 2, 3, 1, 1};
int arr3[] = {1, 1, 2};
int arr4[] = {1, 1, 2, 3, 4, 5, 6, 3, 5};
assert(func0(arr1, 8) == 3);
assert(func0(arr2, 5) == 3);
assert(func0(arr3, 3) == 2);
assert(func0(arr4, 9) == 18);
printf... | O2 | c | func0:
endbr64
test %esi,%esi
jle 139d <func0+0x5d>
lea -0x1(%rsi),%r8d
xor %r9d,%r9d
xor %r10d,%r10d
nopw 0x0(%rax,%rax,1)
mov (%rdi,%r9,4),%esi
xor %eax,%eax
mov $0x1,%ecx
jmp 136b <func0+0x2b>
nopl (%rax)
mov %rdx,%rax
cmp %esi,(%rdi,%rax,4)
jne 137c <func0+0x3c>
cmp %r9d,%e... | func0:
endbr64
test esi, esi
jle short loc_139B
movsxd r8, esi
xor r9d, r9d
xor r10d, r10d
nop dword ptr [rax+00000000h]
loc_1358:
mov ecx, [rdi+r9*4]
xor eax, eax
mov edx, 1
nop dword ptr [rax+rax+00h]
loc_1368:
cmp [rdi+rax*4], ecx
jnz short loc_137B
cmp eax, r9d
setnz ... | long long func0(long long a1, int a2)
{
long long v2; // r9
unsigned int v3; // r10d
int v4; // ecx
long long v5; // rax
int v6; // edx
unsigned int v7; // ecx
if ( a2 <= 0 )
return 0LL;
v2 = 0LL;
v3 = 0;
do
{
v4 = *(_DWORD *)(a1 + 4 * v2);
v5 = 0LL;
v6 = 1;
do
{
if... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x0010139b
MOVSXD R8,ESI
XOR R9D,R9D
XOR R10D,R10D
NOP dword ptr [RAX]
LAB_00101358:
MOV ECX,dword ptr [RDI + R9*0x4]
XOR EAX,EAX
MOV EDX,0x1
NOP dword ptr [RAX + RAX*0x1]
LAB_00101368:
CMP dword ptr [RDI + RAX*0x4],ECX
JNZ 0x0010137b
CMP EAX,R9D
SETNZ SIL
CMP SIL,0x1
SBB EDX,-0x1
LAB_00... | int func0(long param_1,int param_2)
{
int iVar1;
long lVar2;
int iVar3;
long lVar4;
int iVar5;
if (0 < param_2) {
lVar4 = 0;
iVar5 = 0;
do {
iVar1 = *(int *)(param_1 + lVar4 * 4);
lVar2 = 0;
iVar3 = 1;
do {
if (*(int *)(param_1 + lVar2 * 4) == iVar1) {
... |
4,063 | func0 | #include <assert.h>
#include <stdio.h>
| int func0(int arr[], int n) {
int sum = 0;
for (int i = 0; i < n; i++) {
int count = 1;
for (int j = 0; j < n; j++) {
if (arr[j] == arr[i] && j != i) {
count++;
}
}
if (count > 1) {
sum += arr[i];
}
}
... | int main() {
int arr1[] = {1, 2, 3, 1, 1, 4, 5, 6};
int arr2[] = {1, 2, 3, 1, 1};
int arr3[] = {1, 1, 2};
int arr4[] = {1, 1, 2, 3, 4, 5, 6, 3, 5};
assert(func0(arr1, 8) == 3);
assert(func0(arr2, 5) == 3);
assert(func0(arr3, 3) == 2);
assert(func0(arr4, 9) == 18);
printf... | O3 | c | func0:
endbr64
test %esi,%esi
jle 14ac <func0+0x19c>
mov %esi,%r8d
push %r14
xor %ecx,%ecx
mov %esi,%r10d
push %r13
shr $0x2,%r8d
mov (%rdi,%rcx,4),%r9d
and $0xfffffffc,%r10d
push %r12
shl $0x4,%r8
xor %r11d,%r11d
pxor %xmm6,%xmm6
push %rbp
lea -0x1(%rsi),%ebp
movdqa 0xd83(%rip... | func0:
endbr64
test esi, esi
jle loc_145C
mov ecx, esi
push r14
movdqa xmm7, cs:xmmword_20B0
mov r9d, esi
shr ecx, 2
push r13
mov r8, rdi
xor r10d, r10d
push r12
shl rcx, 4
movsxd r12, esi
pxor xmm6, xmm6
push rbp
add rcx, rdi
lea ebp, [rsi-1]
push rbx
mov ... | long long func0(const __m128i *a1, int a2)
{
__m128i si128; // xmm7
unsigned int v5; // r10d
long long v6; // r12
const __m128i *v7; // rcx
unsigned int v8; // ebp
long long v10; // rsi
unsigned int v11; // ebx
unsigned int v12; // edx
__m128i v13; // xmm3
const __m128i *v14; // rax
__m128i v15; ... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x0010145c
MOV ECX,ESI
PUSH R14
MOVDQA XMM7,xmmword ptr [0x001020b0]
MOV R9D,ESI
SHR ECX,0x2
PUSH R13
MOV R8,RDI
XOR R10D,R10D
PUSH R12
SHL RCX,0x4
MOVSXD R12,ESI
PXOR XMM6,XMM6
PUSH RBP
ADD RCX,RDI
LEA EBP,[RSI + -0x1]
PUSH RBX
MOV EBX,ESI
XOR ESI,ESI
AND EBX,0xfffffffc
NOP word ptr [RA... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int func0(int *param_1,uint param_2)
{
int iVar1;
int iVar2;
int *piVar3;
int *piVar4;
int *piVar5;
int *piVar6;
uint uVar7;
long lVar8;
uint uVar9;
int iVar10;
int iVar11;
int iVar12;
int iVar13;
int iVar... |
4,064 | func0 | #include <string.h>
#include <stdio.h>
#include <assert.h>
#include <regex.h>
| char* func0(const char *text) {
regex_t regex;
int regexInit;
int regexSearch;
char *patterns = "^[a-z]+_[a-z]+$";
regexInit = regcomp(®ex, patterns, REG_EXTENDED);
if (regexInit) {
fprintf(stderr, "Could not compile regex\n");
return ("Compilation error");
}
... | int main() {
assert(strcmp(func0("aab_cbbbc"), "Found a match!") == 0);
assert(strcmp(func0("aab_Abbbc"), "Not matched!") == 0);
assert(strcmp(func0("Aaab_abbbc"), "Not matched!") == 0);
assert(strcmp(func0("aab-cbbbc"), "Not matched!") == 0);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0xd0,%rsp
mov %rdi,-0xc8(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
lea 0xd93(%rip),%rax
mov %rax,-0xb8(%rbp)
mov -0xb8(%rbp),%rcx
lea -0xb0(%rbp),%rax
mov $0x1,%edx
mov %rcx,%rsi
mov %rax,%rdi
callq 1100 <regcomp@plt>
... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 0D0h
mov [rbp+string], rdi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
lea rax, aAZAZ; "^[a-z]+_[a-z]+$"
mov [rbp+pattern], rax
mov rcx, [rbp+pattern]
lea rax, [rbp+preg]
mov edx, 1; cflags
mov rsi, rcx; pattern
mov ... | const char * func0(const char *a1)
{
int errcode; // [rsp+14h] [rbp-BCh]
regex_t preg; // [rsp+20h] [rbp-B0h] BYREF
char errbuf[104]; // [rsp+60h] [rbp-70h] BYREF
unsigned long long v5; // [rsp+C8h] [rbp-8h]
v5 = __readfsqword(0x28u);
if ( regcomp(&preg, "^[a-z]+_[a-z]+$", 1) )
{
fwrite("Could not co... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0xd0
MOV qword ptr [RBP + -0xc8],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
LEA RAX,[0x102008]
MOV qword ptr [RBP + -0xb8],RAX
MOV RCX,qword ptr [RBP + -0xb8]
LEA RAX,[RBP + -0xb0]
MOV EDX,0x1
MOV RSI,RCX
MOV RDI,RAX
CALL 0x00101100
MOV dword p... | char * func0(char *param_1)
{
int iVar1;
char *pcVar2;
long in_FS_OFFSET;
regex_t local_b8;
char local_78 [104];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
iVar1 = regcomp(&local_b8,"^[a-z]+_[a-z]+$",1);
if (iVar1 == 0) {
iVar1 = regexec(&local_b8,param_1,0,(regmatch_t *)0x0,0);... |
4,065 | func0 | #include <string.h>
#include <stdio.h>
#include <assert.h>
#include <regex.h>
| char* func0(const char *text) {
regex_t regex;
int regexInit;
int regexSearch;
char *patterns = "^[a-z]+_[a-z]+$";
regexInit = regcomp(®ex, patterns, REG_EXTENDED);
if (regexInit) {
fprintf(stderr, "Could not compile regex\n");
return ("Compilation error");
}
... | int main() {
assert(strcmp(func0("aab_cbbbc"), "Found a match!") == 0);
assert(strcmp(func0("aab_Abbbc"), "Not matched!") == 0);
assert(strcmp(func0("Aaab_abbbc"), "Not matched!") == 0);
assert(strcmp(func0("aab-cbbbc"), "Not matched!") == 0);
return 0;
}
| O1 | c | func0:
endbr64
push %rbp
push %rbx
sub $0xb8,%rsp
mov %rdi,%rbx
mov %fs:0x28,%rax
mov %rax,0xa8(%rsp)
xor %eax,%eax
mov %rsp,%rdi
mov $0x1,%edx
lea 0xde6(%rip),%rsi
callq 10f0 <regcomp@plt>
test %eax,%eax
jne 12fa <func0+0xd1>
mov %rsp,%rdi
mov $0x0,%r8d
mov $0x0,%ecx
mov $... | func0:
endbr64
push rbp
push rbx
sub rsp, 0B8h
mov rbx, rdi
mov rax, fs:28h
mov [rsp+0C8h+var_20], rax
xor eax, eax
mov rdi, rsp
mov edx, 1
lea rsi, aAZAZ; "^[a-z]+_[a-z]+$"
call _regcomp
test eax, eax
jnz loc_131A
mov rdi, rsp
mov r8d, 0
mov ecx, 0
mov ed... | const char * func0(long long a1)
{
unsigned int v1; // eax
_BYTE v3[64]; // [rsp+0h] [rbp-C8h] BYREF
char v4[104]; // [rsp+40h] [rbp-88h] BYREF
unsigned long long v5; // [rsp+A8h] [rbp-20h]
v5 = __readfsqword(0x28u);
if ( (unsigned int)regcomp(v3, "^[a-z]+_[a-z]+$", 1LL) )
{
fwrite("Could not compile... | func0:
ENDBR64
PUSH RBP
PUSH RBX
SUB RSP,0xb8
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xa8],RAX
XOR EAX,EAX
MOV RDI,RSP
MOV EDX,0x1
LEA RSI,[0x102041]
CALL 0x00101100
TEST EAX,EAX
JNZ 0x0010131a
MOV RDI,RSP
MOV R8D,0x0
MOV ECX,0x0
MOV EDX,0x0
MOV RSI,RBX
CALL 0x00101130
TEST EAX,EAX
JZ 0x00101340
C... | char * func0(char *param_1)
{
int iVar1;
char *pcVar2;
long in_FS_OFFSET;
regex_t rStack_c8;
char local_88 [104];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
iVar1 = regcomp(&rStack_c8,"^[a-z]+_[a-z]+$",1);
if (iVar1 == 0) {
iVar1 = regexec(&rStack_c8,param_1,0,(regmatch_t *)0x0,... |
4,066 | func0 | #include <string.h>
#include <stdio.h>
#include <assert.h>
#include <regex.h>
| char* func0(const char *text) {
regex_t regex;
int regexInit;
int regexSearch;
char *patterns = "^[a-z]+_[a-z]+$";
regexInit = regcomp(®ex, patterns, REG_EXTENDED);
if (regexInit) {
fprintf(stderr, "Could not compile regex\n");
return ("Compilation error");
}
... | int main() {
assert(strcmp(func0("aab_cbbbc"), "Found a match!") == 0);
assert(strcmp(func0("aab_Abbbc"), "Not matched!") == 0);
assert(strcmp(func0("Aaab_abbbc"), "Not matched!") == 0);
assert(strcmp(func0("aab-cbbbc"), "Not matched!") == 0);
return 0;
}
| O2 | c | func0:
endbr64
push %r12
mov $0x1,%edx
mov %rdi,%r12
lea 0xcdc(%rip),%rsi
push %rbp
sub $0xb8,%rsp
mov %fs:0x28,%rax
mov %rax,0xa8(%rsp)
xor %eax,%eax
mov %rsp,%rbp
mov %rbp,%rdi
callq 10f0 <regcomp@plt>
test %eax,%eax
jne 1420 <func0+0xd0>
mov %rbp,%rdi
xor %r8d,%r8d
xor %... | func0:
endbr64
push r12
mov edx, 1
mov r12, rdi
lea rsi, aAZAZ; "^[a-z]+_[a-z]+$"
push rbp
sub rsp, 0B8h
mov rax, fs:28h
mov [rsp+var_sA8], rax
xor eax, eax
mov rbp, rsp
mov rdi, rbp
call _regcomp
test eax, eax
jnz loc_1420
mov rdi, rbp
xor r8d, r8d
xor ec... | const char * func0(long long a1)
{
unsigned int v1; // eax
_BYTE _0[64]; // [rsp+0h] [rbp+0h] BYREF
char vars40[104]; // [rsp+40h] [rbp+40h] BYREF
unsigned long long varsA8; // [rsp+A8h] [rbp+A8h]
varsA8 = __readfsqword(0x28u);
if ( (unsigned int)regcomp(_0, "^[a-z]+_[a-z]+$", 1LL) )
{
fwrite("Could ... | func0:
ENDBR64
PUSH R12
MOV EDX,0x1
MOV R12,RDI
LEA RSI,[0x102041]
PUSH RBP
SUB RSP,0xb8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xa8],RAX
XOR EAX,EAX
MOV RBP,RSP
MOV RDI,RBP
CALL 0x00101100
TEST EAX,EAX
JNZ 0x00101420
MOV RDI,RBP
XOR R8D,R8D
XOR ECX,ECX
XOR EDX,EDX
MOV RSI,R12
CALL 0x00101130
MOV EDI,EAX
TEST... | char * func0(char *param_1)
{
int iVar1;
char *pcVar2;
long in_FS_OFFSET;
regex_t rStack_c8;
char local_88 [104];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
iVar1 = regcomp(&rStack_c8,"^[a-z]+_[a-z]+$",1);
if (iVar1 == 0) {
iVar1 = regexec(&rStack_c8,param_1,0,(regmatch_t *)0x0,... |
4,067 | func0 | #include <string.h>
#include <stdio.h>
#include <assert.h>
#include <regex.h>
| char* func0(const char *text) {
regex_t regex;
int regexInit;
int regexSearch;
char *patterns = "^[a-z]+_[a-z]+$";
regexInit = regcomp(®ex, patterns, REG_EXTENDED);
if (regexInit) {
fprintf(stderr, "Could not compile regex\n");
return ("Compilation error");
}
... | int main() {
assert(strcmp(func0("aab_cbbbc"), "Found a match!") == 0);
assert(strcmp(func0("aab_Abbbc"), "Not matched!") == 0);
assert(strcmp(func0("Aaab_abbbc"), "Not matched!") == 0);
assert(strcmp(func0("aab-cbbbc"), "Not matched!") == 0);
return 0;
}
| O3 | c | func0:
endbr64
push %r12
mov $0x1,%edx
mov %rdi,%r12
lea 0xcdc(%rip),%rsi
push %rbp
sub $0xb8,%rsp
mov %fs:0x28,%rax
mov %rax,0xa8(%rsp)
xor %eax,%eax
mov %rsp,%rbp
mov %rbp,%rdi
callq 10f0 <regcomp@plt>
test %eax,%eax
jne 1420 <func0+0xd0>
mov %rbp,%rdi
xor %r8d,%r8d
xor %... | func0:
endbr64
push rbp
mov edx, 1; cflags
mov rbp, rdi
lea rsi, pattern; "^[a-z]+_[a-z]+$"
push rbx
sub rsp, 0B8h
mov rax, fs:28h
mov [rsp+0C8h+var_20], rax
xor eax, eax
mov rbx, rsp
mov rdi, rbx; preg
call _regcomp
test eax, eax
jnz loc_1418
xor r8d, r8d; eflags... | const char * func0(char *string)
{
int v1; // eax
regex_t v3; // [rsp+0h] [rbp-C8h] BYREF
char errbuf[104]; // [rsp+40h] [rbp-88h] BYREF
unsigned long long v5; // [rsp+A8h] [rbp-20h]
v5 = __readfsqword(0x28u);
if ( regcomp(&v3, "^[a-z]+_[a-z]+$", 1) )
{
fwrite("Could not compile regex\n", 1uLL, 0x18u... | func0:
ENDBR64
PUSH RBP
MOV EDX,0x1
MOV RBP,RDI
LEA RSI,[0x102041]
PUSH RBX
SUB RSP,0xb8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xa8],RAX
XOR EAX,EAX
MOV RBX,RSP
MOV RDI,RBX
CALL 0x00101100
TEST EAX,EAX
JNZ 0x00101418
XOR R8D,R8D
XOR ECX,ECX
XOR EDX,EDX
MOV RSI,RBP
MOV RDI,RBX
CALL 0x00101130
TEST EAX,EAX
JZ ... | char * func0(char *param_1)
{
int iVar1;
char *pcVar2;
long in_FS_OFFSET;
regex_t rStack_c8;
char local_88 [104];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
iVar1 = regcomp(&rStack_c8,"^[a-z]+_[a-z]+$",1);
if (iVar1 == 0) {
iVar1 = regexec(&rStack_c8,param_1,0,(regmatch_t *)0x0,... |
4,068 | func0 | #include <assert.h>
#include <regex.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
| char* func0(const char* text) {
regex_t regex;
int result;
char* pattern = "^[[:alnum:]_]+";
if (regcomp(®ex, pattern, REG_EXTENDED) != 0) {
return "Regex compilation error";
}
result = regexec(®ex, text, 0, NULL, 0);
regfree(®ex);
if (result =... | int main() {
assert(strcmp(func0(" python"), "Not matched!") == 0);
assert(strcmp(func0("python"), "Found a match!") == 0);
assert(strcmp(func0(" lang"), "Not matched!") == 0);
assert(strcmp(func0("foo"), "Found a match!") == 0);
printf("All tests passed.\n");
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x70,%rsp
mov %rdi,-0x68(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
lea 0xdd9(%rip),%rax
mov %rax,-0x58(%rbp)
mov -0x58(%rbp),%rcx
lea -0x50(%rbp),%rax
mov $0x1,%edx
mov %rcx,%rsi
mov %rax,%rdi
callq 10f0 <regcomp@plt>
... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+string], rdi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
lea rax, aAlnum; "^[[:alnum:]_]+"
mov [rbp+pattern], rax
mov rcx, [rbp+pattern]
lea rax, [rbp+preg]
mov edx, 1; cflags
mov rsi, rcx; pattern
mov ... | const char * func0(const char *a1)
{
int v2; // [rsp+14h] [rbp-5Ch]
regex_t preg; // [rsp+20h] [rbp-50h] BYREF
unsigned long long v4; // [rsp+68h] [rbp-8h]
v4 = __readfsqword(0x28u);
if ( regcomp(&preg, "^[[:alnum:]_]+", 1) )
return "Regex compilation error";
v2 = regexec(&preg, a1, 0LL, 0LL, 0);
reg... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x68],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
LEA RAX,[0x102008]
MOV qword ptr [RBP + -0x58],RAX
MOV RCX,qword ptr [RBP + -0x58]
LEA RAX,[RBP + -0x50]
MOV EDX,0x1
MOV RSI,RCX
MOV RDI,RAX
CALL 0x001010f0
TEST EAX,EA... | char * func0(char *param_1)
{
int iVar1;
char *pcVar2;
long in_FS_OFFSET;
regex_t local_58;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
iVar1 = regcomp(&local_58,"^[[:alnum:]_]+",1);
if (iVar1 == 0) {
iVar1 = regexec(&local_58,param_1,0,(regmatch_t *)0x0,0);
regfree(&local_58);... |
4,069 | func0 | #include <assert.h>
#include <regex.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
| char* func0(const char* text) {
regex_t regex;
int result;
char* pattern = "^[[:alnum:]_]+";
if (regcomp(®ex, pattern, REG_EXTENDED) != 0) {
return "Regex compilation error";
}
result = regexec(®ex, text, 0, NULL, 0);
regfree(®ex);
if (result =... | int main() {
assert(strcmp(func0(" python"), "Not matched!") == 0);
assert(strcmp(func0("python"), "Found a match!") == 0);
assert(strcmp(func0(" lang"), "Not matched!") == 0);
assert(strcmp(func0("foo"), "Found a match!") == 0);
printf("All tests passed.\n");
return 0;
}
| O1 | c | func0:
endbr64
push %rbp
push %rbx
sub $0x58,%rsp
mov %rdi,%rbx
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
mov %rsp,%rdi
mov $0x1,%edx
lea 0xe23(%rip),%rsi
callq 10e0 <regcomp@plt>
mov %eax,%edx
lea 0xde1(%rip),%rax
test %edx,%edx
je 123e <func0+0x55>
mov 0x48(%rsp),... | func0:
endbr64
push rbp
push rbx
sub rsp, 58h
mov rbx, rdi
mov rax, fs:28h
mov [rsp+68h+var_20], rax
xor eax, eax
mov rdi, rsp
mov edx, 1
lea rsi, aAlnum; "^[[:alnum:]_]+"
call _regcomp
mov edx, eax
lea rax, aRegexCompilati; "Regex compilation error"
test edx, edx
jz ... | const char * func0(long long a1)
{
int v1; // edx
const char *result; // rax
int v3; // ebx
_QWORD v4[13]; // [rsp+0h] [rbp-68h] BYREF
v4[9] = __readfsqword(0x28u);
v1 = regcomp(v4, "^[[:alnum:]_]+", 1LL);
result = "Regex compilation error";
if ( !v1 )
{
v3 = regexec(v4, a1, 0LL, 0LL, 0LL);
r... | func0:
ENDBR64
PUSH RBP
PUSH RBX
SUB RSP,0x58
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
MOV RDI,RSP
MOV EDX,0x1
LEA RSI,[0x102038]
CALL 0x001010f0
MOV EDX,EAX
LEA RAX,[0x102004]
TEST EDX,EDX
JZ 0x0010125e
LAB_00101247:
MOV RDX,qword ptr [RSP + 0x48]
SUB RDX,qword ptr FS:[0x28]
J... | char * func0(char *param_1)
{
int iVar1;
char *pcVar2;
long in_FS_OFFSET;
regex_t rStack_68;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
iVar1 = regcomp(&rStack_68,"^[[:alnum:]_]+",1);
pcVar2 = "Regex compilation error";
if (iVar1 == 0) {
iVar1 = regexec(&rStack_68,param_1,0,(reg... |
4,070 | func0 | #include <assert.h>
#include <regex.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
| char* func0(const char* text) {
regex_t regex;
int result;
char* pattern = "^[[:alnum:]_]+";
if (regcomp(®ex, pattern, REG_EXTENDED) != 0) {
return "Regex compilation error";
}
result = regexec(®ex, text, 0, NULL, 0);
regfree(®ex);
if (result =... | int main() {
assert(strcmp(func0(" python"), "Not matched!") == 0);
assert(strcmp(func0("python"), "Found a match!") == 0);
assert(strcmp(func0(" lang"), "Not matched!") == 0);
assert(strcmp(func0("foo"), "Found a match!") == 0);
printf("All tests passed.\n");
return 0;
}
| O2 | c | func0:
endbr64
push %r12
mov $0x1,%edx
lea 0xcf6(%rip),%rsi
push %rbp
mov %rdi,%rbp
sub $0x58,%rsp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
mov %rsp,%r12
mov %r12,%rdi
callq 10e0 <regcomp@plt>
mov %eax,%r8d
lea 0xc95(%rip),%rax
test %r8d,%r8d
jne 13a1 <func0+0x71>
x... | func0:
endbr64
push r12
mov edx, 1
lea rsi, aAlnum; "^[[:alnum:]_]+"
push rbp
mov rbp, rdi
sub rsp, 58h
mov rax, fs:28h
mov [rsp+68h+var_20], rax
xor eax, eax
mov r12, rsp
mov rdi, r12
call _regcomp
mov r8d, eax
lea rax, aRegexCompilati; "Regex compilation error"
tes... | const char * func0(long long a1)
{
int v1; // r8d
const char *result; // rax
int v3; // ebp
_QWORD v4[13]; // [rsp+0h] [rbp-68h] BYREF
v4[9] = __readfsqword(0x28u);
v1 = regcomp(v4, "^[[:alnum:]_]+", 1LL);
result = "Regex compilation error";
if ( !v1 )
{
v3 = regexec(v4, a1, 0LL, 0LL);
regfre... | func0:
ENDBR64
PUSH R12
MOV EDX,0x1
LEA RSI,[0x102038]
PUSH RBP
MOV RBP,RDI
SUB RSP,0x58
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
MOV R12,RSP
MOV RDI,R12
CALL 0x001010f0
MOV R8D,EAX
LEA RAX,[0x102004]
TEST R8D,R8D
JNZ 0x001013a1
XOR EDX,EDX
XOR ECX,ECX
MOV RSI,RBP
MOV RDI,R12
CALL 0x001011... | char * func0(char *param_1)
{
int iVar1;
char *pcVar2;
long in_FS_OFFSET;
regex_t rStack_68;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
iVar1 = regcomp(&rStack_68,"^[[:alnum:]_]+",1);
pcVar2 = "Regex compilation error";
if (iVar1 == 0) {
iVar1 = regexec(&rStack_68,param_1,0,(reg... |
4,071 | func0 | #include <assert.h>
#include <regex.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
| char* func0(const char* text) {
regex_t regex;
int result;
char* pattern = "^[[:alnum:]_]+";
if (regcomp(®ex, pattern, REG_EXTENDED) != 0) {
return "Regex compilation error";
}
result = regexec(®ex, text, 0, NULL, 0);
regfree(®ex);
if (result =... | int main() {
assert(strcmp(func0(" python"), "Not matched!") == 0);
assert(strcmp(func0("python"), "Found a match!") == 0);
assert(strcmp(func0(" lang"), "Not matched!") == 0);
assert(strcmp(func0("foo"), "Found a match!") == 0);
printf("All tests passed.\n");
return 0;
}
| O3 | c | func0:
endbr64
push %r12
mov $0x1,%edx
lea 0xcf6(%rip),%rsi
push %rbp
mov %rdi,%rbp
sub $0x58,%rsp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
mov %rsp,%r12
mov %r12,%rdi
callq 10e0 <regcomp@plt>
mov %eax,%r8d
lea 0xc95(%rip),%rax
test %r8d,%r8d
jne 13a1 <func0+0x71>
x... | func0:
endbr64
push rbp
mov edx, 1; cflags
lea rsi, pattern; "^[[:alnum:]_]+"
push rbx
mov rbx, rdi
sub rsp, 58h
mov rax, fs:28h
mov [rsp+var_s48], rax
xor eax, eax
mov rbp, rsp
mov rdi, rbp; preg
call _regcomp
mov edx, eax
lea rax, aRegexCompilati; "Regex compilatio... | const char * func0(char *string)
{
int v1; // edx
const char *result; // rax
int v3; // ebx
regex_t _0; // [rsp+0h] [rbp+0h] BYREF
unsigned long long vars48; // [rsp+48h] [rbp+48h]
vars48 = __readfsqword(0x28u);
v1 = regcomp(&_0, "^[[:alnum:]_]+", 1);
result = "Regex compilation error";
if ( !v1 )
... | func0:
ENDBR64
PUSH RBP
MOV EDX,0x1
LEA RSI,[0x102038]
PUSH RBX
MOV RBX,RDI
SUB RSP,0x58
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
MOV RBP,RSP
MOV RDI,RBP
CALL 0x001010f0
MOV EDX,EAX
LEA RAX,[0x102004]
TEST EDX,EDX
JNZ 0x001013a1
XOR EDX,EDX
XOR R8D,R8D
XOR ECX,ECX
MOV RSI,RBX
MOV RDI,RBP
C... | char * func0(char *param_1)
{
int iVar1;
char *pcVar2;
long in_FS_OFFSET;
regex_t rStack_68;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
iVar1 = regcomp(&rStack_68,"^[[:alnum:]_]+",1);
pcVar2 = "Regex compilation error";
if (iVar1 == 0) {
iVar1 = regexec(&rStack_68,param_1,0,(reg... |
4,072 | func0 |
#include <assert.h>
int find_gcd(int x, int y) {
while (y != 0) {
int temp = y;
y = x % y;
x = temp;
}
return x;
}
| int func0(int *l, int size) {
int num1 = l[0];
int num2 = l[1];
int gcd = find_gcd(num1, num2);
for (int i = 2; i < size; i++) {
gcd = find_gcd(gcd, l[i]);
}
return gcd;
}
| int main() {
int arr1[] = {2, 4, 6, 8, 16};
int arr2[] = {1, 2, 3};
int arr3[] = {2, 4, 6, 8};
assert(func0(arr1, 5) == 2);
assert(func0(arr2, 3) == 1);
assert(func0(arr3, 4) == 2);
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
mov (%rax),%eax
mov %eax,-0x8(%rbp)
mov -0x18(%rbp),%rax
mov 0x4(%rax),%eax
mov %eax,-0x4(%rbp)
mov -0x4(%rbp),%edx
mov -0x8(%rbp),%eax
mov %edx,%esi
mov %eax,... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov rax, [rbp+var_18]
mov eax, [rax]
mov [rbp+var_8], eax
mov rax, [rbp+var_18]
mov eax, [rax+4]
mov [rbp+var_4], eax
mov edx, [rbp+var_4]
mov eax, [rbp+var_8]
mov esi, ed... | long long func0(unsigned int *a1, int a2)
{
unsigned int gcd; // [rsp+10h] [rbp-10h]
int i; // [rsp+14h] [rbp-Ch]
gcd = find_gcd(*a1, a1[1]);
for ( i = 2; i < a2; ++i )
gcd = find_gcd(gcd, a1[i]);
return gcd;
} | 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]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x8],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x4]
MOV dword ptr [RBP + -0x4],EAX
MOV EDX,dword ptr [RBP + -0... | int4 func0(int4 *param_1,int param_2)
{
int4 local_18;
int local_14;
local_18 = find_gcd(*param_1,param_1[1]);
for (local_14 = 2; local_14 < param_2; local_14 = local_14 + 1) {
local_18 = find_gcd(local_18,param_1[local_14]);
}
return local_18;
} |
4,073 | func0 |
#include <assert.h>
int find_gcd(int x, int y) {
while (y != 0) {
int temp = y;
y = x % y;
x = temp;
}
return x;
}
| int func0(int *l, int size) {
int num1 = l[0];
int num2 = l[1];
int gcd = find_gcd(num1, num2);
for (int i = 2; i < size; i++) {
gcd = find_gcd(gcd, l[i]);
}
return gcd;
}
| int main() {
int arr1[] = {2, 4, 6, 8, 16};
int arr2[] = {1, 2, 3};
int arr3[] = {2, 4, 6, 8};
assert(func0(arr1, 5) == 2);
assert(func0(arr2, 3) == 1);
assert(func0(arr3, 4) == 2);
return 0;
}
| O1 | c | func0:
endbr64
mov (%rdi),%eax
mov 0x4(%rdi),%r8d
test %r8d,%r8d
je 11b9 <func0+0x32>
mov %r8d,%ecx
cltd
idiv %r8d
mov %edx,%r8d
mov %ecx,%eax
test %edx,%edx
jne 1196 <func0+0xf>
cmp $0x2,%esi
jle 11de <func0+0x57>
lea 0x8(%rdi),%r8
lea -0x3(%rsi),%eax
lea 0xc(%rdi,%rax,4),%r9... | func0:
endbr64
mov eax, [rdi]
mov r8d, [rdi+4]
test r8d, r8d
jz short loc_11D9
loc_1196:
mov ecx, r8d
cdq
idiv r8d
mov r8d, edx
mov eax, ecx
test edx, edx
jnz short loc_1196
loc_11A6:
cmp esi, 2
jle short loc_11D6
lea r8, [rdi+8]
lea eax, [rsi-3]
lea r9, [rdi+ra... | long long func0(int *a1, int a2)
{
int v2; // eax
int v3; // r8d
int v4; // ecx
int *v5; // r8
long long v6; // r9
int i; // esi
int v8; // edi
v2 = *a1;
v3 = a1[1];
if ( v3 )
{
do
{
v4 = v3;
v3 = v2 % v3;
v2 = v4;
}
while ( v3 );
}
else
{
v4 = *a1;
... | func0:
ENDBR64
MOV EAX,dword ptr [RDI]
MOV R8D,dword ptr [RDI + 0x4]
TEST R8D,R8D
JZ 0x001011d9
LAB_00101196:
MOV ECX,R8D
CDQ
IDIV R8D
MOV R8D,EDX
MOV EAX,ECX
TEST EDX,EDX
JNZ 0x00101196
LAB_001011a6:
CMP ESI,0x2
JLE 0x001011d6
LEA R8,[RDI + 0x8]
LEA EAX,[RSI + -0x3]
LEA R9,[RDI + RAX*0x4 + 0xc]
LAB_001011b7:
MOV ESI,d... | int func0(int *param_1,int param_2)
{
int iVar1;
int iVar2;
int iVar3;
int *piVar4;
iVar2 = *param_1;
iVar1 = param_1[1];
while (iVar1 != 0) {
iVar3 = iVar2 % iVar1;
iVar2 = iVar1;
iVar1 = iVar3;
}
if (2 < param_2) {
piVar4 = param_1 + 2;
do {
iVar1 = *piVar4;
while... |
4,074 | func0 |
#include <assert.h>
int find_gcd(int x, int y) {
while (y != 0) {
int temp = y;
y = x % y;
x = temp;
}
return x;
}
| int func0(int *l, int size) {
int num1 = l[0];
int num2 = l[1];
int gcd = find_gcd(num1, num2);
for (int i = 2; i < size; i++) {
gcd = find_gcd(gcd, l[i]);
}
return gcd;
}
| int main() {
int arr1[] = {2, 4, 6, 8, 16};
int arr2[] = {1, 2, 3};
int arr3[] = {2, 4, 6, 8};
assert(func0(arr1, 5) == 2);
assert(func0(arr2, 3) == 1);
assert(func0(arr3, 4) == 2);
return 0;
}
| O2 | c | func0:
endbr64
mov 0x4(%rdi),%r8d
mov (%rdi),%eax
test %r8d,%r8d
jne 12eb <func0+0x1b>
jmp 133b <func0+0x6b>
nopl 0x0(%rax)
mov %edx,%r8d
cltd
idiv %r8d
mov %r8d,%eax
test %edx,%edx
jne 12e8 <func0+0x18>
cmp $0x2,%esi
jle 1337 <func0+0x67>
lea -0x3(%rsi),%eax
lea 0x8(%rdi),%rcx
... | func0:
endbr64
mov r8d, [rdi+4]
mov eax, [rdi]
test r8d, r8d
jnz short loc_12DB
jmp short loc_132B
loc_12D8:
mov r8d, edx
loc_12DB:
cdq
idiv r8d
mov eax, r8d
test edx, edx
jnz short loc_12D8
loc_12E6:
cmp esi, 2
jle short loc_1327
lea eax, [rsi-3]
lea rcx, [rdi+8]
le... | long long func0(int *a1, int a2)
{
int v2; // r8d
int v3; // eax
int v4; // edx
int *v5; // rcx
long long v6; // rsi
int v7; // edx
int v8; // eax
v2 = a1[1];
v3 = *a1;
if ( v2 )
{
while ( 1 )
{
v4 = v3 % v2;
v3 = v2;
if ( !v4 )
break;
v2 = v4;
}
}
... | func0:
ENDBR64
MOV R8D,dword ptr [RDI + 0x4]
MOV EAX,dword ptr [RDI]
TEST R8D,R8D
JNZ 0x001012db
JMP 0x0010132b
LAB_001012d8:
MOV R8D,EDX
LAB_001012db:
CDQ
IDIV R8D
MOV EAX,R8D
TEST EDX,EDX
JNZ 0x001012d8
LAB_001012e6:
CMP ESI,0x2
JLE 0x00101327
LEA EAX,[RSI + -0x3]
LEA RCX,[RDI + 0x8]
LEA RSI,[RDI + RAX*0x4 + 0xc]
NOP... | int func0(int *param_1,int param_2)
{
int iVar1;
int iVar2;
int *piVar3;
int iVar4;
iVar2 = param_1[1];
iVar4 = *param_1;
while (iVar1 = iVar2, iVar1 != 0) {
iVar2 = iVar4 % iVar1;
iVar4 = iVar1;
}
if (2 < param_2) {
piVar3 = param_1 + 2;
do {
iVar2 = *piVar3;
while (iV... |
4,075 | func0 |
#include <assert.h>
int find_gcd(int x, int y) {
while (y != 0) {
int temp = y;
y = x % y;
x = temp;
}
return x;
}
| int func0(int *l, int size) {
int num1 = l[0];
int num2 = l[1];
int gcd = find_gcd(num1, num2);
for (int i = 2; i < size; i++) {
gcd = find_gcd(gcd, l[i]);
}
return gcd;
}
| int main() {
int arr1[] = {2, 4, 6, 8, 16};
int arr2[] = {1, 2, 3};
int arr3[] = {2, 4, 6, 8};
assert(func0(arr1, 5) == 2);
assert(func0(arr2, 3) == 1);
assert(func0(arr3, 4) == 2);
return 0;
}
| O3 | c | func0:
endbr64
mov 0x4(%rdi),%r8d
mov (%rdi),%eax
test %r8d,%r8d
jne 12eb <func0+0x1b>
jmp 133b <func0+0x6b>
nopl 0x0(%rax)
mov %edx,%r8d
cltd
idiv %r8d
mov %r8d,%eax
test %edx,%edx
jne 12e8 <func0+0x18>
cmp $0x2,%esi
jle 1337 <func0+0x67>
lea -0x3(%rsi),%eax
lea 0x8(%rdi),%rcx
... | func0:
endbr64
mov ecx, [rdi+4]
mov eax, [rdi]
test ecx, ecx
jnz short loc_1332
jmp short loc_1377
loc_1330:
mov ecx, edx
loc_1332:
cdq
idiv ecx
mov eax, ecx
test edx, edx
jnz short loc_1330
loc_133B:
cmp esi, 2
jle short loc_1374
lea eax, [rsi-3]
lea r8, [rdi+8]
lea... | long long func0(int *a1, int a2)
{
int v2; // ecx
int v3; // eax
int v4; // edx
int *v5; // r8
long long v6; // rsi
int v7; // edx
int v8; // eax
v2 = a1[1];
v3 = *a1;
if ( v2 )
{
while ( 1 )
{
v4 = v3 % v2;
v3 = v2;
if ( !v4 )
break;
v2 = v4;
}
}
... | func0:
ENDBR64
MOV ECX,dword ptr [RDI + 0x4]
MOV EAX,dword ptr [RDI]
TEST ECX,ECX
JNZ 0x00101332
JMP 0x00101377
LAB_00101330:
MOV ECX,EDX
LAB_00101332:
CDQ
IDIV ECX
MOV EAX,ECX
TEST EDX,EDX
JNZ 0x00101330
LAB_0010133b:
CMP ESI,0x2
JLE 0x00101374
LEA EAX,[RSI + -0x3]
LEA R8,[RDI + 0x8]
LEA RSI,[RDI + RAX*0x4 + 0xc]
NOP ... | int func0(int *param_1,int param_2)
{
int iVar1;
int iVar2;
int iVar3;
int *piVar4;
iVar2 = param_1[1];
iVar3 = *param_1;
while (iVar1 = iVar2, iVar1 != 0) {
iVar2 = iVar3 % iVar1;
iVar3 = iVar1;
}
if (2 < param_2) {
piVar4 = param_1 + 2;
do {
iVar2 = *piVar4;
while (iV... |
4,076 | func0 |
#include <stdio.h>
#include <stdbool.h>
#include <assert.h>
| bool func0(int data[], int length) {
for (int i = 0; i < length; i++) {
for (int j = i + 1; j < length; j++) {
if (data[i] == data[j]) {
return false;
}
}
}
return true;
}
| int main() {
int data1[] = {1, 5, 7, 9};
int data2[] = {2, 4, 5, 5, 7, 9};
int data3[] = {1, 2, 3};
int length1 = sizeof(data1) / sizeof(data1[0]);
int length2 = sizeof(data2) / sizeof(data2[0]);
int length3 = sizeof(data3) / sizeof(data3[0]);
assert(func0(data1, length1) == true);
... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
movl $0x0,-0x8(%rbp)
jmp 11d3 <func0+0x6a>
mov -0x8(%rbp),%eax
add $0x1,%eax
mov %eax,-0x4(%rbp)
jmp 11c7 <func0+0x5e>
mov -0x8(%rbp),%eax
cltq
lea 0x0(,%rax,4),%rdx
mov -0x18(%rbp),%rax
add %rdx,%ra... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_8], 0
jmp short loc_11D3
loc_1181:
mov eax, [rbp+var_8]
add eax, 1
mov [rbp+var_4], eax
jmp short loc_11C7
loc_118C:
mov eax, [rbp+var_8]
cdqe
lea rdx, ds:0[rax*4]
mov rax, [r... | long long func0(long long a1, int a2)
{
int i; // [rsp+14h] [rbp-8h]
int j; // [rsp+18h] [rbp-4h]
for ( i = 0; i < a2; ++i )
{
for ( j = i + 1; j < a2; ++j )
{
if ( *(_DWORD *)(4LL * i + a1) == *(_DWORD *)(4LL * j + a1) )
return 0LL;
}
}
return 1LL;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0x8],0x0
JMP 0x001011d3
LAB_00101181:
MOV EAX,dword ptr [RBP + -0x8]
ADD EAX,0x1
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001011c7
LAB_0010118c:
MOV EAX,dword ptr [RBP + -0x8]
CDQE
LEA RDX,[RAX*0x4]
MOV... | int8 func0(long param_1,int param_2)
{
int local_10;
int local_c;
local_10 = 0;
do {
local_c = local_10;
if (param_2 <= local_10) {
return 1;
}
while (local_c = local_c + 1, local_c < param_2) {
if (*(int *)(param_1 + (long)local_10 * 4) == *(int *)(param_1 + (long)local_c * 4)) ... |
4,077 | func0 |
#include <stdio.h>
#include <stdbool.h>
#include <assert.h>
| bool func0(int data[], int length) {
for (int i = 0; i < length; i++) {
for (int j = i + 1; j < length; j++) {
if (data[i] == data[j]) {
return false;
}
}
}
return true;
}
| int main() {
int data1[] = {1, 5, 7, 9};
int data2[] = {2, 4, 5, 5, 7, 9};
int data3[] = {1, 2, 3};
int length1 = sizeof(data1) / sizeof(data1[0]);
int length2 = sizeof(data2) / sizeof(data2[0]);
int length3 = sizeof(data3) / sizeof(data3[0]);
assert(func0(data1, length1) == true);
... | O1 | c | func0:
endbr64
test %esi,%esi
jle 119d <func0+0x34>
lea -0x1(%rsi),%r8d
add $0x1,%r8
mov $0x1,%ecx
cmp %r8,%rcx
je 11a3 <func0+0x3a>
mov -0x4(%rdi,%rcx,4),%edx
mov %rcx,%rax
cmp (%rdi,%rax,4),%edx
je 11a9 <func0+0x40>
add $0x1,%rax
cmp %eax,%esi
jg 118a <func0+0x21>
add $0... | func0:
endbr64
test esi, esi
jle short loc_1198
mov r8d, esi
mov ecx, 1
loc_1179:
cmp rcx, r8
jz short loc_119E
mov edx, [rdi+rcx*4-4]
mov rax, rcx
loc_1185:
cmp edx, [rdi+rax*4]
jz short loc_11A4
add rax, 1
cmp esi, eax
jg short loc_1185
add rcx, 1
jmp shor... | long long func0(long long a1, int a2)
{
long long v2; // rcx
long long v3; // rax
if ( a2 <= 0 )
return 1LL;
v2 = 1LL;
LABEL_3:
if ( v2 == a2 )
return 1LL;
v3 = v2;
while ( *(_DWORD *)(a1 + 4 * v2 - 4) != *(_DWORD *)(a1 + 4 * v3) )
{
if ( a2 <= (int)++v3 )
{
++v2;
goto LABE... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x00101198
MOV R8D,ESI
MOV ECX,0x1
LAB_00101179:
CMP RCX,R8
JZ 0x0010119e
MOV EDX,dword ptr [RDI + RCX*0x4 + -0x4]
MOV RAX,RCX
LAB_00101185:
CMP EDX,dword ptr [RDI + RAX*0x4]
JZ 0x001011a4
ADD RAX,0x1
CMP ESI,EAX
JG 0x00101185
ADD RCX,0x1
JMP 0x00101179
LAB_00101198:
MOV EAX,0x1
RET
LAB_... | int8 func0(long param_1,uint param_2)
{
ulong uVar1;
ulong uVar2;
if ((int)param_2 < 1) {
return 1;
}
uVar2 = 1;
do {
if (uVar2 == param_2) {
return 1;
}
uVar1 = uVar2;
do {
if (*(int *)(param_1 + -4 + uVar2 * 4) == *(int *)(param_1 + uVar1 * 4)) {
return 0;
... |
4,078 | func0 |
#include <stdio.h>
#include <stdbool.h>
#include <assert.h>
| bool func0(int data[], int length) {
for (int i = 0; i < length; i++) {
for (int j = i + 1; j < length; j++) {
if (data[i] == data[j]) {
return false;
}
}
}
return true;
}
| int main() {
int data1[] = {1, 5, 7, 9};
int data2[] = {2, 4, 5, 5, 7, 9};
int data3[] = {1, 2, 3};
int length1 = sizeof(data1) / sizeof(data1[0]);
int length2 = sizeof(data2) / sizeof(data2[0]);
int length3 = sizeof(data3) / sizeof(data3[0]);
assert(func0(data1, length1) == true);
... | O2 | c | func0:
endbr64
test %esi,%esi
jle 12f9 <func0+0x49>
lea -0x1(%rsi),%r8d
mov $0x1,%ecx
add $0x1,%r8
cmp %r8,%rcx
je 12f9 <func0+0x49>
mov -0x4(%rdi,%rcx,4),%edx
mov %rcx,%rax
jmp 12e0 <func0+0x30>
nopl 0x0(%rax,%rax,1)
add $0x1,%rax
cmp %eax,%esi
jle 12f0 <func0+0x40>
cmp (%rd... | func0:
endbr64
test esi, esi
jle short loc_12C9
movsxd r8, esi
mov ecx, 1
cmp rcx, r8
jz short loc_12C9
loc_12A5:
mov edx, [rdi+rcx*4-4]
mov rax, rcx
jmp short loc_12B8
loc_12B0:
add rax, 1
cmp esi, eax
jle short loc_12C0
loc_12B8:
cmp edx, [rdi+rax*4]
jnz short loc_... | long long func0(long long a1, int a2)
{
long long i; // rcx
long long v3; // rax
if ( a2 > 0 )
{
for ( i = 1LL; i != a2; ++i )
{
v3 = i;
do
{
if ( *(_DWORD *)(a1 + 4 * i - 4) == *(_DWORD *)(a1 + 4 * v3) )
return 0LL;
++v3;
}
while ( a2 > (int)v3 ... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x001012c9
MOVSXD R8,ESI
MOV ECX,0x1
CMP RCX,R8
JZ 0x001012c9
LAB_001012a5:
MOV EDX,dword ptr [RDI + RCX*0x4 + -0x4]
MOV RAX,RCX
JMP 0x001012b8
LAB_001012b0:
ADD RAX,0x1
CMP ESI,EAX
JLE 0x001012c0
LAB_001012b8:
CMP EDX,dword ptr [RDI + RAX*0x4]
JNZ 0x001012b0
XOR EAX,EAX
RET
LAB_001012c0... | int8 func0(long param_1,int param_2)
{
long lVar1;
long lVar2;
if (0 < param_2) {
lVar2 = 1;
if ((long)param_2 != 1) {
do {
lVar1 = lVar2;
do {
if (*(int *)(param_1 + -4 + lVar2 * 4) == *(int *)(param_1 + lVar1 * 4)) {
return 0;
}
lVar1 =... |
4,079 | func0 |
#include <stdio.h>
#include <stdbool.h>
#include <assert.h>
| bool func0(int data[], int length) {
for (int i = 0; i < length; i++) {
for (int j = i + 1; j < length; j++) {
if (data[i] == data[j]) {
return false;
}
}
}
return true;
}
| int main() {
int data1[] = {1, 5, 7, 9};
int data2[] = {2, 4, 5, 5, 7, 9};
int data3[] = {1, 2, 3};
int length1 = sizeof(data1) / sizeof(data1[0]);
int length2 = sizeof(data2) / sizeof(data2[0]);
int length3 = sizeof(data3) / sizeof(data3[0]);
assert(func0(data1, length1) == true);
... | O3 | c | func0:
endbr64
test %esi,%esi
jle 1309 <func0+0x49>
lea -0x1(%rsi),%r8d
mov $0x1,%ecx
add $0x1,%r8
cmp %r8,%rcx
je 1309 <func0+0x49>
mov -0x4(%rdi,%rcx,4),%edx
mov %rcx,%rax
jmp 12f0 <func0+0x30>
nopl 0x0(%rax,%rax,1)
add $0x1,%rax
cmp %eax,%esi
jle 1300 <func0+0x40>
cmp (%rd... | func0:
endbr64
test esi, esi
jle short loc_1179
mov r8d, esi
mov ecx, 1
cmp rcx, r8
jz short loc_1179
loc_1155:
mov edx, [rdi+rcx*4-4]
mov rax, rcx
jmp short loc_1168
loc_1160:
add rax, 1
cmp esi, eax
jle short loc_1170
loc_1168:
cmp edx, [rdi+rax*4]
jnz short loc... | long long func0(long long a1, int a2)
{
long long i; // rcx
long long v3; // rax
if ( a2 > 0 )
{
for ( i = 1LL; i != a2; ++i )
{
v3 = i;
do
{
if ( *(_DWORD *)(a1 + 4 * i - 4) == *(_DWORD *)(a1 + 4 * v3) )
return 0LL;
++v3;
}
while ( a2 > (int)v3 ... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x00101179
MOV R8D,ESI
MOV ECX,0x1
CMP RCX,R8
JZ 0x00101179
LAB_00101155:
MOV EDX,dword ptr [RDI + RCX*0x4 + -0x4]
MOV RAX,RCX
JMP 0x00101168
LAB_00101160:
ADD RAX,0x1
CMP ESI,EAX
JLE 0x00101170
LAB_00101168:
CMP EDX,dword ptr [RDI + RAX*0x4]
JNZ 0x00101160
XOR EAX,EAX
RET
LAB_00101170:
... | int8 func0(long param_1,uint param_2)
{
ulong uVar1;
ulong uVar2;
if (0 < (int)param_2) {
uVar2 = 1;
if ((ulong)param_2 != 1) {
do {
uVar1 = uVar2;
do {
if (*(int *)(param_1 + -4 + uVar2 * 4) == *(int *)(param_1 + uVar1 * 4)) {
return 0;
}
... |
4,080 | func0 |
#include <assert.h>
| int func0(int A, int B) {
int variable = 1;
if (A == B) {
return 1;
} else if ((B - A) >= 5) {
return 0;
} else {
for (int i = A + 1; i <= B; i++) {
variable = (variable * (i % 10)) % 10;
}
return variable % 10;
}
}
| int main() {
assert(func0(2, 4) == 2);
assert(func0(6, 8) == 6);
assert(func0(1, 2) == 2);
assert(func0(3, 7) == 0);
assert(func0(20, 23) == 6);
assert(func0(1021, 1024) == 4);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
mov %esi,-0x18(%rbp)
movl $0x1,-0x8(%rbp)
mov -0x14(%rbp),%eax
cmp -0x18(%rbp),%eax
jne 1170 <func0+0x27>
mov $0x1,%edx
jmpq 1226 <func0+0xdd>
mov -0x18(%rbp),%eax
sub -0x14(%rbp),%eax
cmp $0x4,%eax
jle 1185 <func0+0x3c>
... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_18], esi
mov [rbp+var_8], 1
mov eax, [rbp+var_14]
cmp eax, [rbp+var_18]
jnz short loc_1170
mov edx, 1
jmp loc_1220
loc_1170:
mov eax, [rbp+var_18]
sub eax, [rbp+var_14]
cmp eax, 4
jle short loc... | long long func0(int a1, int a2)
{
int v4; // [rsp+10h] [rbp-8h]
int i; // [rsp+14h] [rbp-4h]
v4 = 1;
if ( a1 == a2 )
{
return 1;
}
else if ( a2 - a1 <= 4 )
{
for ( i = a1 + 1; i <= a2; ++i )
v4 = v4 * (i % 10) % 10;
return (unsigned int)(v4 % 10);
}
else
{
return 0;
}
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x18],ESI
MOV dword ptr [RBP + -0x8],0x1
MOV EAX,dword ptr [RBP + -0x14]
CMP EAX,dword ptr [RBP + -0x18]
JNZ 0x00101170
MOV EDX,0x1
JMP 0x00101220
LAB_00101170:
MOV EAX,dword ptr [RBP + -0x18]
SUB EAX,dword ptr [RBP + -0x14]
CMP E... | int func0(int param_1,int param_2)
{
int4 local_10;
int4 local_c;
local_10 = 1;
if (param_1 == param_2) {
local_10 = 1;
}
else if (param_2 - param_1 < 5) {
for (local_c = param_1 + 1; local_c <= param_2; local_c = local_c + 1) {
local_10 = ((local_c % 10) * local_10) % 10;
}
local_... |
4,081 | func0 |
#include <assert.h>
| int func0(int A, int B) {
int variable = 1;
if (A == B) {
return 1;
} else if ((B - A) >= 5) {
return 0;
} else {
for (int i = A + 1; i <= B; i++) {
variable = (variable * (i % 10)) % 10;
}
return variable % 10;
}
}
| int main() {
assert(func0(2, 4) == 2);
assert(func0(6, 8) == 6);
assert(func0(1, 2) == 2);
assert(func0(3, 7) == 0);
assert(func0(20, 23) == 6);
assert(func0(1021, 1024) == 4);
return 0;
}
| O1 | c | func0:
endbr64
mov $0x1,%eax
cmp %esi,%edi
je 11dd <func0+0x94>
mov %esi,%edx
sub %edi,%edx
mov $0x0,%eax
cmp $0x4,%edx
jg 11dd <func0+0x94>
add $0x1,%edi
cmp %edi,%esi
jl 11de <func0+0x95>
add $0x1,%esi
mov $0x1,%edx
movslq %edi,%rax
imul $0x66666667,%rax,%rax
sar $0x22,%... | func0:
endbr64
mov eax, 1
cmp edi, esi
jz locret_11DB
mov edx, esi
sub edx, edi
mov eax, 0
cmp edx, 4
jg short locret_11DB
lea ecx, [rdi+1]
cmp esi, ecx
jl short loc_11DC
lea edi, [rsi+1]
mov edx, 1
loc_1177:
movsxd rax, ecx
imul rax, 66666667h
sar rax, 22h... | long long func0(int a1, int a2)
{
long long result; // rax
int v3; // ecx
int v4; // edx
result = 1LL;
if ( a1 != a2 )
{
result = 0LL;
if ( a2 - a1 <= 4 )
{
v3 = a1 + 1;
if ( a2 < a1 + 1 )
{
v4 = 1;
}
else
{
v4 = 1;
do
{
... | func0:
ENDBR64
MOV EAX,0x1
CMP EDI,ESI
JZ 0x001011db
MOV EDX,ESI
SUB EDX,EDI
MOV EAX,0x0
CMP EDX,0x4
JG 0x001011db
LEA ECX,[RDI + 0x1]
CMP ESI,ECX
JL 0x001011dc
LEA EDI,[RSI + 0x1]
MOV EDX,0x1
LAB_00101177:
MOVSXD RAX,ECX
IMUL RAX,RAX,0x66666667
SAR RAX,0x22
MOV ESI,ECX
SAR ESI,0x1f
SUB EAX,ESI
LEA ESI,[RAX + RAX*0x4]
... | int func0(int param_1,int param_2)
{
int iVar1;
iVar1 = 1;
if ((param_1 != param_2) && (iVar1 = 0, param_2 - param_1 < 5)) {
param_1 = param_1 + 1;
if (param_2 < param_1) {
iVar1 = 1;
}
else {
iVar1 = 1;
do {
iVar1 = ((param_1 % 10) * iVar1) % 10;
param_1 = pa... |
Subsets and Splits
C++ Functions With Standard Library Dependencies
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ Standard Library Function Analysis
Filters C++ code examples that use standard library containers and types, providing useful insights into common programming patterns and data structures in the dataset.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.