index int64 0 66.5k | func_name stringlengths 2 5.36k | func_dep stringlengths 16 2.19k | func stringlengths 8 55.3k | test stringlengths 0 7.07k | opt stringclasses 4
values | language stringclasses 2
values | asm stringlengths 0 45.4k | ida_asm stringlengths 0 44.7k | ida_pseudo stringlengths 0 44.3k | ghidra_asm stringlengths 0 49.1k | ghidra_pseudo stringlengths 0 64.7k |
|---|---|---|---|---|---|---|---|---|---|---|---|
6,682 | func0 |
#include <assert.h>
| int func0(int array_nums[], int size) {
int count_even = 0;
for (int i = 0; i < size; i++) {
if (array_nums[i] % 2 == 0) {
count_even++;
}
}
return count_even;
}
| int main() {
int array1[] = {1, 2, 3, 5, 7, 8, 9, 10};
int size1 = sizeof(array1) / sizeof(array1[0]);
assert(func0(array1, size1) == 3);
int array2[] = {10, 15, 14, 13, -18, 12, -20};
int size2 = sizeof(array2) / sizeof(array2[0]);
assert(func0(array2, size2) == 5);
int a... | O2 | c | func0:
endbr64
test %esi,%esi
jle 1368 <func0+0x38>
lea -0x1(%rsi),%eax
xor %r8d,%r8d
lea 0x4(%rdi,%rax,4),%rdx
nopl 0x0(%rax,%rax,1)
mov (%rdi),%eax
and $0x1,%eax
cmp $0x1,%eax
adc $0x0,%r8d
add $0x4,%rdi
cmp %rdx,%rdi
jne 1348 <func0+0x18>
mov %r8d,%eax
retq
nopl 0x0(%rax)
xo... | func0:
endbr64
test esi, esi
jle short loc_1358
lea eax, [rsi-1]
xor r8d, r8d
lea rdx, [rdi+rax*4+4]
nop dword ptr [rax+rax+00h]
loc_1338:
mov eax, [rdi]
and eax, 1
cmp eax, 1
adc r8d, 0
add rdi, 4
cmp rdi, rdx
jnz short loc_1338
mov eax, r8d
retn
loc_1358:
xor ... | long long func0(_DWORD *a1, int a2)
{
unsigned int v2; // r8d
long long v3; // rdx
if ( a2 <= 0 )
return 0LL;
v2 = 0;
v3 = (long long)&a1[a2 - 1 + 1];
do
v2 += (*a1++ & 1) == 0;
while ( a1 != (_DWORD *)v3 );
return v2;
} | func0:
ENDBR64
TEST ESI,ESI
JLE 0x00101358
LEA EAX,[RSI + -0x1]
XOR R8D,R8D
LEA RDX,[RDI + RAX*0x4 + 0x4]
NOP dword ptr [RAX + RAX*0x1]
LAB_00101338:
MOV EAX,dword ptr [RDI]
AND EAX,0x1
CMP EAX,0x1
ADC R8D,0x0
ADD RDI,0x4
CMP RDI,RDX
JNZ 0x00101338
MOV EAX,R8D
RET
LAB_00101358:
XOR R8D,R8D
MOV EAX,R8D
RET | int func0(uint *param_1,int param_2)
{
uint *puVar1;
int iVar2;
if (0 < param_2) {
iVar2 = 0;
puVar1 = param_1 + (ulong)(param_2 - 1) + 1;
do {
iVar2 = iVar2 + (uint)((*param_1 & 1) == 0);
param_1 = param_1 + 1;
} while (param_1 != puVar1);
return iVar2;
}
return 0;
} |
6,683 | func0 |
#include <assert.h>
| int func0(int array_nums[], int size) {
int count_even = 0;
for (int i = 0; i < size; i++) {
if (array_nums[i] % 2 == 0) {
count_even++;
}
}
return count_even;
}
| int main() {
int array1[] = {1, 2, 3, 5, 7, 8, 9, 10};
int size1 = sizeof(array1) / sizeof(array1[0]);
assert(func0(array1, size1) == 3);
int array2[] = {10, 15, 14, 13, -18, 12, -20};
int size2 = sizeof(array2) / sizeof(array2[0]);
assert(func0(array2, size2) == 5);
int a... | O3 | c | func0:
endbr64
test %esi,%esi
jle 13b8 <func0+0xd8>
lea -0x1(%rsi),%eax
cmp $0x3,%eax
jbe 13c1 <func0+0xe1>
mov %esi,%edx
pxor %xmm1,%xmm1
movdqa 0xd7a(%rip),%xmm3
mov %rdi,%rax
shr $0x2,%edx
movdqa %xmm1,%xmm2
shl $0x4,%rdx
add %rdi,%rdx
nopw 0x0(%rax,%rax,1)
movdqu (%rax),%xmm0
add ... | func0:
endbr64
mov ecx, esi
test esi, esi
jle loc_1208
lea eax, [rsi-1]
cmp eax, 2
jbe loc_1211
mov edx, esi
pxor xmm1, xmm1
movdqa xmm3, cs:xmmword_2010
mov rax, rdi
shr edx, 2
movdqa xmm2, xmm1
shl rdx, 4
add rdx, rdi
nop dword ptr [rax+00000000h]
loc_1180:
movdqu ... | long long func0(const __m128i *a1, int a2)
{
__m128i v2; // xmm1
__m128i si128; // xmm3
const __m128i *v4; // rax
__m128i v5; // xmm0
signed int v6; // edx
__m128i v7; // xmm1
long long result; // rax
long long v9; // r8
if ( a2 <= 0 )
return 0LL;
if ( (unsigned int)(a2 - 1) <= 2 )
{
v6 ... | func0:
ENDBR64
MOV ECX,ESI
TEST ESI,ESI
JLE 0x00101208
LEA EAX,[RSI + -0x1]
CMP EAX,0x2
JBE 0x00101211
MOV EDX,ESI
PXOR XMM1,XMM1
MOVDQA XMM3,xmmword ptr [0x00102010]
MOV RAX,RDI
SHR EDX,0x2
MOVDQA XMM2,XMM1
SHL RDX,0x4
ADD RDX,RDI
NOP dword ptr [RAX]
LAB_00101180:
MOVDQU XMM0,xmmword ptr [RAX]
ADD RAX,0x10
PAND XMM0,X... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int func0(uint *param_1,uint param_2)
{
uint *puVar1;
uint *puVar2;
uint *puVar3;
uint *puVar4;
uint uVar5;
int iVar6;
int iVar7;
int iVar8;
int iVar9;
if ((int)param_2 < 1) {
iVar6 = 0;
}
else {
if... |
6,684 | func0 | #include <stdio.h>
#include <assert.h>
#include <stdlib.h>
typedef struct {
int key1;
int key2;
int value;
} dictItem;
int compare(const void *a, const void *b) {
dictItem *itemA = (dictItem *)a;
dictItem *itemB = (dictItem *)b;
int mulA = itemA->key1 * itemA->key2;
int mulB ... | dictItem* func0(dictItem arr[], int size) {
qsort(arr, size, sizeof(dictItem), compare);
return arr;
}
| int main() {
dictItem arr1[] = {{5, 6, 3}, {2, 3, 9}, {8, 4, 10}, {6, 4, 12}};
dictItem sorted1[] = {{2, 3, 9}, {6, 4, 12}, {5, 6, 3}, {8, 4, 10}};
func0(arr1, 4);
for (int i = 0; i < 4; i++) {
assert(arr1[i].key1 == sorted1[i].key1 && arr1[i].key2 == sorted1[i].key2 && arr1[i].value == sor... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x10,%rsp
mov %rdi,-0x8(%rbp)
mov %esi,-0xc(%rbp)
mov -0xc(%rbp),%eax
movslq %eax,%rsi
mov -0x8(%rbp),%rax
lea -0x72(%rip),%rcx
mov $0xc,%edx
mov %rax,%rdi
callq 1070 <qsort@plt>
mov -0x8(%rbp),%rax
leaveq
retq
| func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+base], rdi
mov [rbp+var_C], esi
mov eax, [rbp+var_C]
movsxd rsi, eax; nmemb
mov rax, [rbp+base]
lea rdx, compare
mov rcx, rdx; compar
mov edx, 0Ch; size
mov rdi, rax; base
call _qsort
mov rax, [rbp+base]
leave
... | void * func0(void *a1, int a2)
{
qsort(a1, a2, 0xCuLL, compare);
return a1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV EAX,dword ptr [RBP + -0xc]
MOVSXD RSI,EAX
MOV RAX,qword ptr [RBP + -0x8]
LEA RDX,[0x101189]
MOV RCX,RDX
MOV EDX,0xc
MOV RDI,RAX
CALL 0x00101070
MOV RAX,qword ptr [RBP + -0x8]
LEAVE
RET | void * func0(void *param_1,int param_2)
{
qsort(param_1,(long)param_2,0xc,compare);
return param_1;
} |
6,685 | func0 | #include <stdio.h>
#include <assert.h>
#include <stdlib.h>
typedef struct {
int key1;
int key2;
int value;
} dictItem;
int compare(const void *a, const void *b) {
dictItem *itemA = (dictItem *)a;
dictItem *itemB = (dictItem *)b;
int mulA = itemA->key1 * itemA->key2;
int mulB ... | dictItem* func0(dictItem arr[], int size) {
qsort(arr, size, sizeof(dictItem), compare);
return arr;
}
| int main() {
dictItem arr1[] = {{5, 6, 3}, {2, 3, 9}, {8, 4, 10}, {6, 4, 12}};
dictItem sorted1[] = {{2, 3, 9}, {6, 4, 12}, {5, 6, 3}, {8, 4, 10}};
func0(arr1, 4);
for (int i = 0; i < 4; i++) {
assert(arr1[i].key1 == sorted1[i].key1 && arr1[i].key2 == sorted1[i].key2 && arr1[i].value == sor... | O1 | c | func0:
endbr64
push %rbx
mov %rdi,%rbx
movslq %esi,%rsi
lea -0x25(%rip),%rcx
mov $0xc,%edx
callq 1070 <qsort@plt>
mov %rbx,%rax
pop %rbx
retq
| func0:
endbr64
push rbx
mov rbx, rdi
movsxd rsi, esi
lea rcx, compare
mov edx, 0Ch
call _qsort
mov rax, rbx
pop rbx
retn | long long func0(long long a1, int a2)
{
qsort(a1, a2, 12LL, compare);
return a1;
} | func0:
ENDBR64
PUSH RBX
MOV RBX,RDI
MOVSXD RSI,ESI
LEA RCX,[0x101189]
MOV EDX,0xc
CALL 0x00101070
MOV RAX,RBX
POP RBX
RET | void * func0(void *param_1,int param_2)
{
qsort(param_1,(long)param_2,0xc,compare);
return param_1;
} |
6,686 | func0 | #include <stdio.h>
#include <assert.h>
#include <stdlib.h>
typedef struct {
int key1;
int key2;
int value;
} dictItem;
int compare(const void *a, const void *b) {
dictItem *itemA = (dictItem *)a;
dictItem *itemB = (dictItem *)b;
int mulA = itemA->key1 * itemA->key2;
int mulB ... | dictItem* func0(dictItem arr[], int size) {
qsort(arr, size, sizeof(dictItem), compare);
return arr;
}
| int main() {
dictItem arr1[] = {{5, 6, 3}, {2, 3, 9}, {8, 4, 10}, {6, 4, 12}};
dictItem sorted1[] = {{2, 3, 9}, {6, 4, 12}, {5, 6, 3}, {8, 4, 10}};
func0(arr1, 4);
for (int i = 0; i < 4; i++) {
assert(arr1[i].key1 == sorted1[i].key1 && arr1[i].key2 == sorted1[i].key2 && arr1[i].value == sor... | O2 | c | func0:
endbr64
push %r12
movslq %esi,%rsi
mov %rdi,%r12
mov $0xc,%edx
lea -0x38(%rip),%rcx
callq 1070 <qsort@plt>
mov %r12,%rax
pop %r12
retq
nopw %cs:0x0(%rax,%rax,1)
nopl (%rax)
| func0:
endbr64
push r12
movsxd rsi, esi
mov r12, rdi
mov edx, 0Ch
lea rcx, compare
call _qsort
mov rax, r12
pop r12
retn | long long func0(long long a1, int a2)
{
qsort(a1, a2, 12LL, compare);
return a1;
} | func0:
ENDBR64
PUSH R12
MOVSXD RSI,ESI
MOV R12,RDI
MOV EDX,0xc
LEA RCX,[0x101550]
CALL 0x00101070
MOV RAX,R12
POP R12
RET | void * func0(void *param_1,int param_2)
{
qsort(param_1,(long)param_2,0xc,compare);
return param_1;
} |
6,687 | func0 | #include <stdio.h>
#include <assert.h>
#include <stdlib.h>
typedef struct {
int key1;
int key2;
int value;
} dictItem;
int compare(const void *a, const void *b) {
dictItem *itemA = (dictItem *)a;
dictItem *itemB = (dictItem *)b;
int mulA = itemA->key1 * itemA->key2;
int mulB ... | dictItem* func0(dictItem arr[], int size) {
qsort(arr, size, sizeof(dictItem), compare);
return arr;
}
| int main() {
dictItem arr1[] = {{5, 6, 3}, {2, 3, 9}, {8, 4, 10}, {6, 4, 12}};
dictItem sorted1[] = {{2, 3, 9}, {6, 4, 12}, {5, 6, 3}, {8, 4, 10}};
func0(arr1, 4);
for (int i = 0; i < 4; i++) {
assert(arr1[i].key1 == sorted1[i].key1 && arr1[i].key2 == sorted1[i].key2 && arr1[i].value == sor... | O3 | c | func0:
endbr64
push %r12
movslq %esi,%rsi
mov %rdi,%r12
mov $0xc,%edx
lea -0x38(%rip),%rcx
callq 1070 <qsort@plt>
mov %r12,%rax
pop %r12
retq
nopw %cs:0x0(%rax,%rax,1)
nopl (%rax)
| func0:
endbr64
push rbx
movsxd rsi, esi; nmemb
mov rbx, rdi
lea rcx, compare; compar
mov edx, 0Ch; size
call _qsort
mov rax, rbx
pop rbx
retn | void * func0(void *a1, int a2)
{
qsort(a1, a2, 0xCuLL, compare);
return a1;
} | func0:
ENDBR64
PUSH RBX
MOVSXD RSI,ESI
MOV RBX,RDI
LEA RCX,[0x101470]
MOV EDX,0xc
CALL 0x00101070
MOV RAX,RBX
POP RBX
RET | void * func0(void *param_1,int param_2)
{
qsort(param_1,(long)param_2,0xc,compare);
return param_1;
} |
6,688 | func0 | #include <assert.h>
#include <string.h>
| int func0(const char* str1, const char* str2) {
int count = 0;
int length = strlen(str1);
for (int i = 0; i < length; i++) {
if (str1[i] != str2[i]) {
count++;
}
}
if (count % 2 == 0) {
return (count / 2);
} else {
return -1; // Used -1 to i... | int main() {
assert(func0("1101", "1110") == 1);
assert(func0("1111", "0100") == -1);
assert(func0("1110000", "0001101") == 3);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %rdi,-0x18(%rbp)
mov %rsi,-0x20(%rbp)
movl $0x0,-0xc(%rbp)
mov -0x18(%rbp),%rax
mov %rax,%rdi
callq 1060 <strlen@plt>
mov %eax,-0x4(%rbp)
movl $0x0,-0x8(%rbp)
jmp 11c8 <func0+0x5f>
mov -0x8(%rbp),%eax
movslq %eax,%rdx
mov -0x... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+s], rdi
mov [rbp+var_20], rsi
mov [rbp+var_C], 0
mov rax, [rbp+s]
mov rdi, rax; s
call _strlen
mov [rbp+var_4], eax
mov [rbp+var_8], 0
jmp short loc_11C8
loc_119C:
mov eax, [rbp+var_8]
movsxd rdx, eax
mov r... | long long func0(const char *a1, long long a2)
{
int v3; // [rsp+14h] [rbp-Ch]
int i; // [rsp+18h] [rbp-8h]
int v5; // [rsp+1Ch] [rbp-4h]
v3 = 0;
v5 = strlen(a1);
for ( i = 0; i < v5; ++i )
{
if ( a1[i] != *(_BYTE *)(i + a2) )
++v3;
}
if ( (v3 & 1) != 0 )
return 0xFFFFFFFFLL;
else
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x18],RDI
MOV qword ptr [RBP + -0x20],RSI
MOV dword ptr [RBP + -0xc],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,RAX
CALL 0x00101060
MOV dword ptr [RBP + -0x4],EAX
MOV dword ptr [RBP + -0x8],0x0
JMP 0x001011c8
LAB_0010119c:
MOV EAX,dword ptr [RBP + ... | int func0(char *param_1,long param_2)
{
int iVar1;
size_t sVar2;
uint local_14;
int local_10;
local_14 = 0;
sVar2 = strlen(param_1);
for (local_10 = 0; local_10 < (int)sVar2; local_10 = local_10 + 1) {
if (param_1[local_10] != *(char *)(param_2 + local_10)) {
local_14 = local_14 + 1;
}
... |
6,689 | func0 | #include <assert.h>
#include <string.h>
| int func0(const char* str1, const char* str2) {
int count = 0;
int length = strlen(str1);
for (int i = 0; i < length; i++) {
if (str1[i] != str2[i]) {
count++;
}
}
if (count % 2 == 0) {
return (count / 2);
} else {
return -1; // Used -1 to i... | int main() {
assert(func0("1101", "1110") == 1);
assert(func0("1111", "0100") == -1);
assert(func0("1110000", "0001101") == 3);
return 0;
}
| O1 | c | func0:
endbr64
mov %rdi,%r8
mov $0xffffffffffffffff,%rcx
mov $0x0,%eax
repnz scas %es:(%rdi),%al
not %rcx
sub $0x1,%rcx
test %ecx,%ecx
jle 11a3 <func0+0x5a>
lea -0x1(%rcx),%edi
mov $0x0,%eax
mov $0x0,%edx
jmp 117b <func0+0x32>
mov %rcx,%rax
movzbl (%rsi,%rax,1),%ecx
cmp %cl,(%r8,%r... | func0:
endbr64
push rbp
push rbx
sub rsp, 8
mov rbx, rdi
mov rbp, rsi
call _strlen
test eax, eax
jle short loc_11C3
lea esi, [rax-1]
mov eax, 0
mov edx, 0
jmp short loc_1194
loc_1191:
mov rax, rcx
loc_1194:
movzx edi, byte ptr [rbp+rax+0]
cmp [rbx+rax], dil
setnz ... | long long func0(long long a1, long long a2)
{
int v3; // eax
long long v4; // rsi
long long v5; // rax
int v6; // edx
v3 = strlen();
if ( v3 <= 0 )
{
v6 = 0;
return (unsigned int)(v6 / 2);
}
v4 = (unsigned int)(v3 - 1);
v5 = 0LL;
v6 = 0;
while ( 1 )
{
v6 += *(_BYTE *)(a1 + v5) !=... | func0:
ENDBR64
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RBX,RDI
MOV RBP,RSI
CALL 0x00101060
TEST EAX,EAX
JLE 0x001011c3
LEA ESI,[RAX + -0x1]
MOV EAX,0x0
MOV EDX,0x0
JMP 0x00101194
LAB_00101191:
MOV RAX,RCX
LAB_00101194:
MOVZX EDI,byte ptr [RBP + RAX*0x1]
CMP byte ptr [RBX + RAX*0x1],DIL
SETNZ CL
MOVZX ECX,CL
ADD EDX,ECX
LEA R... | int func0(char *param_1,long param_2)
{
size_t sVar1;
ulong uVar2;
uint uVar3;
bool bVar4;
sVar1 = strlen(param_1);
if ((int)sVar1 < 1) {
uVar3 = 0;
}
else {
uVar3 = 0;
uVar2 = 0;
do {
uVar3 = uVar3 + (param_1[uVar2] != *(char *)(param_2 + uVar2));
bVar4 = uVar2 != (int)s... |
6,690 | func0 | #include <assert.h>
#include <string.h>
| int func0(const char* str1, const char* str2) {
int count = 0;
int length = strlen(str1);
for (int i = 0; i < length; i++) {
if (str1[i] != str2[i]) {
count++;
}
}
if (count % 2 == 0) {
return (count / 2);
} else {
return -1; // Used -1 to i... | int main() {
assert(func0("1101", "1110") == 1);
assert(func0("1111", "0100") == -1);
assert(func0("1110000", "0001101") == 3);
return 0;
}
| O2 | c | func0:
endbr64
push %rbp
mov %rsi,%rbp
push %rbx
mov %rdi,%rbx
sub $0x8,%rsp
callq 1060 <strlen@plt>
test %eax,%eax
jle 1290 <func0+0x60>
lea -0x1(%rax),%esi
xor %edx,%edx
xor %eax,%eax
jmp 125b <func0+0x2b>
nopw 0x0(%rax,%rax,1)
mov %rcx,%rax
xor %ecx,%ecx
movzbl 0x0(%rbp,%rax,1)... | func0:
endbr64
push rbp
mov rbp, rsi
push rbx
mov rbx, rdi
sub rsp, 8
call _strlen
test eax, eax
jle short loc_1290
lea esi, [rax-1]
xor edx, edx
xor eax, eax
jmp short loc_125B
loc_1258:
mov rax, rcx
loc_125B:
xor ecx, ecx
movzx edi, byte ptr [rbp+rax+0]
cmp [r... | long long func0(long long a1, long long a2)
{
int v3; // eax
long long v4; // rsi
int v5; // edx
long long i; // rax
long long result; // rax
v3 = strlen();
if ( v3 <= 0 )
return 0LL;
v4 = (unsigned int)(v3 - 1);
v5 = 0;
for ( i = 0LL; ; ++i )
{
v5 += *(_BYTE *)(a1 + i) != *(_BYTE *)(a2 ... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSI
PUSH RBX
MOV RBX,RDI
SUB RSP,0x8
CALL 0x00101060
TEST EAX,EAX
JLE 0x00101290
LEA ESI,[RAX + -0x1]
XOR EDX,EDX
XOR EAX,EAX
JMP 0x0010125b
LAB_00101258:
MOV RAX,RCX
LAB_0010125b:
XOR ECX,ECX
MOVZX EDI,byte ptr [RBP + RAX*0x1]
CMP byte ptr [RBX + RAX*0x1],DIL
SETNZ CL
ADD EDX,ECX
LEA RC... | int func0(char *param_1,long param_2)
{
int iVar1;
size_t sVar2;
ulong uVar3;
uint uVar4;
bool bVar5;
sVar2 = strlen(param_1);
if ((int)sVar2 < 1) {
return 0;
}
uVar4 = 0;
uVar3 = 0;
do {
uVar4 = uVar4 + (param_1[uVar3] != *(char *)(param_2 + uVar3));
bVar5 = (int)sVar2 - 1 != uVar... |
6,691 | func0 | #include <assert.h>
#include <string.h>
| int func0(const char* str1, const char* str2) {
int count = 0;
int length = strlen(str1);
for (int i = 0; i < length; i++) {
if (str1[i] != str2[i]) {
count++;
}
}
if (count % 2 == 0) {
return (count / 2);
} else {
return -1; // Used -1 to i... | int main() {
assert(func0("1101", "1110") == 1);
assert(func0("1111", "0100") == -1);
assert(func0("1110000", "0001101") == 3);
return 0;
}
| O3 | c | func0:
endbr64
push %rbp
mov %rsi,%rbp
push %rbx
mov %rdi,%rbx
sub $0x8,%rsp
callq 1060 <strlen@plt>
test %eax,%eax
jle 1500 <func0+0x2d0>
lea -0x1(%rax),%edx
cmp $0xe,%edx
jbe 1509 <func0+0x2d9>
mov %eax,%ecx
movdqa 0xe6d(%rip),%xmm6
xor %edx,%edx
pxor %xmm1,%xmm1
shr $0x4,%ecx
p... | func0:
endbr64
push rbp
mov rbp, rsi
push rbx
mov rbx, rdi
sub rsp, 8
call _strlen
test eax, eax
jle loc_1470
mov rdx, rax
lea eax, [rax-1]
cmp eax, 0Eh
jbe loc_1479
mov ecx, edx
pxor xmm1, xmm1
pxor xmm5, xmm5
xor eax, eax
shr ecx, 4
pxor xmm4, xmm4
shl ... | long long func0(const char *a1, long long a2)
{
int v4; // eax
int v5; // edx
__m128i v6; // xmm1
long long v7; // rax
__m128i v8; // xmm0
__m128i v9; // xmm7
__m128i v10; // xmm0
__m128i v11; // xmm3
__m128i v12; // xmm2
__m128i v13; // xmm0
__m128i v14; // xmm3
__m128i v15; // xmm1
__m128i ... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSI
PUSH RBX
MOV RBX,RDI
SUB RSP,0x8
CALL 0x00101060
TEST EAX,EAX
JLE 0x00101470
MOV RDX,RAX
LEA EAX,[RAX + -0x1]
CMP EAX,0xe
JBE 0x00101479
MOV ECX,EDX
PXOR XMM1,XMM1
PXOR XMM5,XMM5
XOR EAX,EAX
SHR ECX,0x4
PXOR XMM4,XMM4
SHL RCX,0x4
NOP dword ptr [RAX + RAX*0x1]
LAB_00101278:
MOVDQU XMM... | int func0(char *param_1,long param_2)
{
char *pcVar1;
char *pcVar2;
int8 uVar3;
bool bVar4;
bool bVar5;
bool bVar6;
bool bVar7;
bool bVar8;
bool bVar9;
bool bVar10;
bool bVar11;
int auVar12 [14];
int auVar13 [12];
unkbyte10 Var14;
int auVar15 [12];
int auVar16 [14];
int auVar17 [12];
... |
6,692 | func0 | #include <assert.h>
| int func0(int li[], int size, int min, int max) {
int ctr = 0;
for (int i = 0; i < size; i++) {
if (li[i] >= min && li[i] <= max) {
ctr++;
}
}
return ctr;
}
| int main() {
int list1[] = {10, 20, 30, 40, 40, 40, 70, 80, 99};
int list1_size = sizeof(list1) / sizeof(list1[0]);
assert(func0(list1, list1_size, 40, 100) == 6);
int list3[] = {7, 8, 9, 15, 17, 19, 45};
int list3_size = sizeof(list3) / sizeof(list3[0]);
assert(func0(list3, list3_si... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
mov %edx,-0x20(%rbp)
mov %ecx,-0x24(%rbp)
movl $0x0,-0x8(%rbp)
movl $0x0,-0x4(%rbp)
jmp 11cc <func0+0x63>
mov -0x4(%rbp),%eax
cltq
lea 0x0(,%rax,4),%rdx
mov -0x18(%rbp),%rax
add %rdx,%rax
mov (%rax),%... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_20], edx
mov [rbp+var_24], ecx
mov [rbp+var_8], 0
mov [rbp+var_4], 0
jmp short loc_11CC
loc_118E:
mov eax, [rbp+var_4]
cdqe
lea rdx, ds:0[rax*4]
mov rax, [rbp+var_18]
add rax,... | long long func0(long long a1, int a2, int a3, int a4)
{
unsigned int v5; // [rsp+1Ch] [rbp-8h]
int i; // [rsp+20h] [rbp-4h]
v5 = 0;
for ( i = 0; i < a2; ++i )
{
if ( a3 <= *(_DWORD *)(4LL * i + a1) && a4 >= *(_DWORD *)(4LL * i + a1) )
++v5;
}
return v5;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0x20],EDX
MOV dword ptr [RBP + -0x24],ECX
MOV dword ptr [RBP + -0x8],0x0
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001011cc
LAB_0010118e:
MOV EAX,dword ptr [RBP + -0x4]
CDQE
LEA RDX,[RAX*0x4]
MOV RAX,qwo... | int func0(long param_1,int param_2,int param_3,int param_4)
{
int4 local_10;
int4 local_c;
local_10 = 0;
for (local_c = 0; local_c < param_2; local_c = local_c + 1) {
if ((param_3 <= *(int *)(param_1 + (long)local_c * 4)) &&
(*(int *)(param_1 + (long)local_c * 4) <= param_4)) {
local_10 = l... |
6,693 | func0 | #include <assert.h>
| int func0(int li[], int size, int min, int max) {
int ctr = 0;
for (int i = 0; i < size; i++) {
if (li[i] >= min && li[i] <= max) {
ctr++;
}
}
return ctr;
}
| int main() {
int list1[] = {10, 20, 30, 40, 40, 40, 70, 80, 99};
int list1_size = sizeof(list1) / sizeof(list1[0]);
assert(func0(list1, list1_size, 40, 100) == 6);
int list3[] = {7, 8, 9, 15, 17, 19, 45};
int list3_size = sizeof(list3) / sizeof(list3[0]);
assert(func0(list3, list3_si... | O1 | c | func0:
endbr64
test %esi,%esi
jle 11a1 <func0+0x38>
mov %rdi,%rax
lea -0x1(%rsi),%esi
lea 0x4(%rdi,%rsi,4),%r8
mov $0x0,%edi
jmp 118c <func0+0x23>
add $0x4,%rax
cmp %r8,%rax
je 11a6 <func0+0x3d>
mov (%rax),%esi
cmp %ecx,%esi
jg 1183 <func0+0x1a>
cmp %edx,%esi
setge %sil
cmp ... | func0:
endbr64
test esi, esi
jle short loc_11A1
mov rax, rdi
lea esi, [rsi-1]
lea r8, [rdi+rsi*4+4]
mov edi, 0
jmp short loc_118C
loc_1183:
add rax, 4
cmp rax, r8
jz short loc_11A6
loc_118C:
mov esi, [rax]
cmp esi, ecx
jg short loc_1183
cmp esi, edx
setnl sil
c... | long long func0(_DWORD *a1, int a2, int a3, int a4)
{
_DWORD *v4; // rax
long long v5; // r8
unsigned int v6; // edi
if ( a2 <= 0 )
{
return 0;
}
else
{
v4 = a1;
v5 = (long long)&a1[a2 - 1 + 1];
v6 = 0;
do
{
if ( *v4 <= a4 )
v6 -= (*v4 < a3) - 1;
++v4;
}... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x001011a1
MOV RAX,RDI
LEA ESI,[RSI + -0x1]
LEA R8,[RDI + RSI*0x4 + 0x4]
MOV EDI,0x0
JMP 0x0010118c
LAB_00101183:
ADD RAX,0x4
CMP RAX,R8
JZ 0x001011a6
LAB_0010118c:
MOV ESI,dword ptr [RAX]
CMP ESI,ECX
JG 0x00101183
CMP ESI,EDX
SETGE SIL
CMP SIL,0x1
SBB EDI,-0x1
JMP 0x00101183
LAB_001011a... | int func0(int *param_1,int param_2,int param_3,int param_4)
{
int *piVar1;
int iVar2;
if (param_2 < 1) {
iVar2 = 0;
}
else {
piVar1 = param_1 + (ulong)(param_2 - 1) + 1;
iVar2 = 0;
do {
if (*param_1 <= param_4) {
iVar2 = (iVar2 + 1) - (uint)(*param_1 < param_3);
}
... |
6,694 | func0 | #include <assert.h>
| int func0(int li[], int size, int min, int max) {
int ctr = 0;
for (int i = 0; i < size; i++) {
if (li[i] >= min && li[i] <= max) {
ctr++;
}
}
return ctr;
}
| int main() {
int list1[] = {10, 20, 30, 40, 40, 40, 70, 80, 99};
int list1_size = sizeof(list1) / sizeof(list1[0]);
assert(func0(list1, list1_size, 40, 100) == 6);
int list3[] = {7, 8, 9, 15, 17, 19, 45};
int list3_size = sizeof(list3) / sizeof(list3[0]);
assert(func0(list3, list3_si... | O2 | c | func0:
endbr64
test %esi,%esi
jle 12f0 <func0+0x40>
lea -0x1(%rsi),%eax
xor %r8d,%r8d
lea 0x4(%rdi,%rax,4),%rsi
nopl 0x0(%rax,%rax,1)
mov (%rdi),%eax
cmp %ecx,%eax
jg 12d9 <func0+0x29>
cmp %edx,%eax
setge %al
cmp $0x1,%al
sbb $0xffffffff,%r8d
add $0x4,%rdi
cmp %rsi,%rdi
jne ... | func0:
endbr64
test esi, esi
jle short loc_12F0
lea eax, [rsi-1]
xor r8d, r8d
lea rsi, [rdi+rax*4+4]
nop dword ptr [rax+rax+00h]
loc_12C8:
mov eax, [rdi]
cmp eax, ecx
jg short loc_12D9
cmp eax, edx
setnl al
cmp al, 1
sbb r8d, 0FFFFFFFFh
loc_12D9:
add rdi, 4
cmp ... | long long func0(_DWORD *a1, int a2, int a3, int a4)
{
unsigned int v4; // r8d
long long v5; // rsi
if ( a2 <= 0 )
return 0LL;
v4 = 0;
v5 = (long long)&a1[a2 - 1 + 1];
do
{
if ( *a1 <= a4 )
v4 -= (*a1 < a3) - 1;
++a1;
}
while ( a1 != (_DWORD *)v5 );
return v4;
} | func0:
ENDBR64
TEST ESI,ESI
JLE 0x001012f0
LEA EAX,[RSI + -0x1]
XOR R8D,R8D
LEA RSI,[RDI + RAX*0x4 + 0x4]
NOP dword ptr [RAX + RAX*0x1]
LAB_001012c8:
MOV EAX,dword ptr [RDI]
CMP EAX,ECX
JG 0x001012d9
CMP EAX,EDX
SETGE AL
CMP AL,0x1
SBB R8D,-0x1
LAB_001012d9:
ADD RDI,0x4
CMP RDI,RSI
JNZ 0x001012c8
MOV EAX,R8D
RET
LAB_00... | int func0(int *param_1,int param_2,int param_3,int param_4)
{
int *piVar1;
int iVar2;
if (0 < param_2) {
iVar2 = 0;
piVar1 = param_1 + (ulong)(param_2 - 1) + 1;
do {
if (*param_1 <= param_4) {
iVar2 = (iVar2 + 1) - (uint)(*param_1 < param_3);
}
param_1 = param_1 + 1;
... |
6,695 | func0 | #include <assert.h>
| int func0(int li[], int size, int min, int max) {
int ctr = 0;
for (int i = 0; i < size; i++) {
if (li[i] >= min && li[i] <= max) {
ctr++;
}
}
return ctr;
}
| int main() {
int list1[] = {10, 20, 30, 40, 40, 40, 70, 80, 99};
int list1_size = sizeof(list1) / sizeof(list1[0]);
assert(func0(list1, list1_size, 40, 100) == 6);
int list3[] = {7, 8, 9, 15, 17, 19, 45};
int list3_size = sizeof(list3) / sizeof(list3[0]);
assert(func0(list3, list3_si... | O3 | c | func0:
endbr64
test %esi,%esi
jle 13f0 <func0+0x100>
lea -0x1(%rsi),%eax
cmp $0x2,%eax
jbe 13f9 <func0+0x109>
mov %esi,%r8d
movd %ecx,%xmm7
pxor %xmm2,%xmm2
mov %rdi,%rax
shr $0x2,%r8d
pshufd $0x0,%xmm7,%xmm5
movd %edx,%xmm7
shl $0x4,%r8
pshufd $0x0,%xmm7,%xmm4
movdqa %xmm2,%xmm3
add ... | func0:
endbr64
mov r9d, edx
test esi, esi
jle loc_1240
lea eax, [rsi-1]
cmp eax, 2
jbe loc_1249
movd xmm7, ecx
pxor xmm2, xmm2
mov rax, rdi
pshufd xmm5, xmm7, 0
movd xmm7, edx
movdqa xmm3, xmm2
mov edx, esi
shr edx, 2
pshufd xmm4, xmm7, 0
shl rdx, 4
add rdx, rdi
no... | long long func0(const __m128i *a1, int a2, signed int a3, signed int a4)
{
__m128i v5; // xmm2
const __m128i *v6; // rax
__m128i v7; // xmm5
__m128i v8; // xmm4
__m128i v9; // xmm0
int v10; // edx
__m128i v11; // xmm2
long long result; // rax
long long v13; // r10
signed int v14; // r8d
signed in... | func0:
ENDBR64
MOV R9D,EDX
TEST ESI,ESI
JLE 0x00101240
LEA EAX,[RSI + -0x1]
CMP EAX,0x2
JBE 0x00101249
MOVD XMM7,ECX
PXOR XMM2,XMM2
MOV RAX,RDI
PSHUFD XMM5,XMM7,0x0
MOVD XMM7,EDX
MOVDQA XMM3,XMM2
MOV EDX,ESI
SHR EDX,0x2
PSHUFD XMM4,XMM7,0x0
SHL RDX,0x4
ADD RDX,RDI
NOP dword ptr [RAX]
LAB_00101188:
MOVDQU XMM0,xmmword p... | int func0(int *param_1,uint param_2,int param_3,int param_4)
{
int iVar1;
int *piVar2;
int *piVar3;
int *piVar4;
int iVar5;
int *piVar6;
int *piVar7;
int *piVar8;
int *piVar9;
uint uVar10;
int iVar11;
int iVar12;
int iVar13;
int iVar14;
if ((int)param_2 < 1) {
iVar11 = 0;
}
els... |
6,696 | func0 |
#include <assert.h>
| int func0(int arr[], int n) {
int total_sum = 0;
for (int i = 0; i < n; i++) {
total_sum += arr[i];
}
int left_sum = 0;
for (int i = 0; i < n; i++) {
total_sum -= arr[i];
if (left_sum == total_sum) {
return i;
}
left_sum += arr[i];... | int main() {
int arr1[] = {1, 2, 3, 4, 1, 2, 3};
int arr2[] = {-7, 1, 5, 2, -4, 3, 0};
int arr3[] = {1, 2, 3};
assert(func0(arr1, 7) == 3);
assert(func0(arr2, 7) == 3);
assert(func0(arr3, 3) == -1);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
movl $0x0,-0x10(%rbp)
movl $0x0,-0xc(%rbp)
jmp 11a5 <func0+0x3c>
mov -0xc(%rbp),%eax
cltq
lea 0x0(,%rax,4),%rdx
mov -0x18(%rbp),%rax
add %rdx,%rax
mov (%rax),%eax
add %eax,-0x10(%rbp)
addl $0x1,-0xc(%r... | 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_11A5
loc_1188:
mov eax, [rbp+var_C]
cdqe
lea rdx, ds:0[rax*4]
mov rax, [rbp+var_18]
add rax, rdx
mov eax, [rax]
add [rbp+var_10], eax
a... | long long func0(long long a1, int a2)
{
int v3; // [rsp+Ch] [rbp-10h]
int i; // [rsp+10h] [rbp-Ch]
int v5; // [rsp+14h] [rbp-8h]
unsigned int j; // [rsp+18h] [rbp-4h]
v3 = 0;
for ( i = 0; i < a2; ++i )
v3 += *(_DWORD *)(4LL * i + a1);
v5 = 0;
for ( j = 0; (int)j < a2; ++j )
{
v3 -= *(_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 0x001011a5
LAB_00101188:
MOV EAX,dword ptr [RBP + -0xc]
CDQE
LEA RDX,[RAX*0x4]
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,RDX
MOV EAX,dword ptr [RAX]
ADD dw... | int func0(long param_1,int param_2)
{
int local_18;
int local_14;
int local_10;
int local_c;
local_18 = 0;
for (local_14 = 0; local_14 < param_2; local_14 = local_14 + 1) {
local_18 = local_18 + *(int *)(param_1 + (long)local_14 * 4);
}
local_10 = 0;
local_c = 0;
while( true ) {
if (para... |
6,697 | func0 |
#include <assert.h>
| int func0(int arr[], int n) {
int total_sum = 0;
for (int i = 0; i < n; i++) {
total_sum += arr[i];
}
int left_sum = 0;
for (int i = 0; i < n; i++) {
total_sum -= arr[i];
if (left_sum == total_sum) {
return i;
}
left_sum += arr[i];... | int main() {
int arr1[] = {1, 2, 3, 4, 1, 2, 3};
int arr2[] = {-7, 1, 5, 2, -4, 3, 0};
int arr3[] = {1, 2, 3};
assert(func0(arr1, 7) == 3);
assert(func0(arr2, 7) == 3);
assert(func0(arr3, 3) == -1);
return 0;
}
| O1 | c | func0:
endbr64
test %esi,%esi
jle 11c4 <func0+0x5b>
mov %rdi,%rdx
lea -0x1(%rsi),%r8d
lea 0x4(%rdi,%r8,4),%rcx
mov $0x0,%eax
add (%rdx),%eax
add $0x4,%rdx
cmp %rcx,%rdx
jne 1182 <func0+0x19>
mov (%rdi),%ecx
sub %ecx,%eax
je 11cc <func0+0x63>
add $0x1,%r8
mov $0x1,%edx
mov ... | func0:
endbr64
test esi, esi
jle short loc_11C4
mov rdx, rdi
lea eax, [rsi-1]
lea rcx, [rdi+rax*4+4]
mov eax, 0
loc_1181:
add eax, [rdx]
add rdx, 4
cmp rdx, rcx
jnz short loc_1181
mov ecx, [rdi]
sub eax, ecx
jz short loc_11CC
mov esi, esi
mov edx, 1
mov r8... | long long func0(_DWORD *a1, int a2)
{
_DWORD *v2; // rdx
int v3; // eax
int v4; // ecx
int v5; // eax
long long v6; // rdx
int v7; // r8d
unsigned int v8; // r9d
if ( a2 <= 0 )
{
return (unsigned int)-1;
}
else
{
v2 = a1;
v3 = 0;
do
v3 += *v2++;
while ( v2 != &a1[a2 -... | ||
6,698 | func0 |
#include <assert.h>
| int func0(int arr[], int n) {
int total_sum = 0;
for (int i = 0; i < n; i++) {
total_sum += arr[i];
}
int left_sum = 0;
for (int i = 0; i < n; i++) {
total_sum -= arr[i];
if (left_sum == total_sum) {
return i;
}
left_sum += arr[i];... | int main() {
int arr1[] = {1, 2, 3, 4, 1, 2, 3};
int arr2[] = {-7, 1, 5, 2, -4, 3, 0};
int arr3[] = {1, 2, 3};
assert(func0(arr1, 7) == 3);
assert(func0(arr2, 7) == 3);
assert(func0(arr3, 3) == -1);
return 0;
}
| O2 | c | func0:
endbr64
test %esi,%esi
jle 12f7 <func0+0x57>
lea -0x1(%rsi),%r8d
mov %rdi,%rdx
xor %eax,%eax
lea 0x4(%rdi,%r8,4),%rcx
nopw %cs:0x0(%rax,%rax,1)
add (%rdx),%eax
add $0x4,%rdx
cmp %rcx,%rdx
jne 12c0 <func0+0x20>
mov (%rdi),%ecx
sub %ecx,%eax
je 1301 <func0+0x61>
add $0x1... | func0:
endbr64
test esi, esi
jle short loc_1301
lea eax, [rsi-1]
mov rdx, rdi
lea rcx, [rdi+rax*4+4]
xor eax, eax
nop dword ptr [rax]
loc_12C8:
add eax, [rdx]
add rdx, 4
cmp rdx, rcx
jnz short loc_12C8
mov ecx, [rdi]
sub eax, ecx
jz short loc_130B
mov esi, esi... | long long func0(_DWORD *a1, int a2)
{
_DWORD *v2; // rdx
int v3; // eax
int v4; // ecx
int v5; // eax
long long v6; // rdx
int v7; // r8d
unsigned int v8; // r9d
if ( a2 > 0 )
{
v2 = a1;
v3 = 0;
do
v3 += *v2++;
while ( v2 != &a1[a2 - 1 + 1] );
v4 = *a1;
v5 = v3 - *a1;
... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x00101301
LEA EAX,[RSI + -0x1]
MOV RDX,RDI
LEA RCX,[RDI + RAX*0x4 + 0x4]
XOR EAX,EAX
NOP dword ptr [RAX]
LAB_001012c8:
ADD EAX,dword ptr [RDX]
ADD RDX,0x4
CMP RDX,RCX
JNZ 0x001012c8
MOV ECX,dword ptr [RDI]
SUB EAX,ECX
JZ 0x0010130b
MOV ESI,ESI
MOV EDX,0x1
XOR R8D,R8D
JMP 0x001012f6
LAB_... | ulong func0(int *param_1,uint param_2)
{
int iVar1;
int iVar2;
int *piVar3;
ulong uVar4;
int iVar5;
ulong uVar6;
if ((int)param_2 < 1) {
LAB_00101301:
uVar6 = 0xffffffff;
}
else {
iVar1 = 0;
piVar3 = param_1;
do {
iVar1 = iVar1 + *piVar3;
piVar3 = piVar3 + 1;
} whil... |
6,699 | func0 |
#include <assert.h>
| int func0(int arr[], int n) {
int total_sum = 0;
for (int i = 0; i < n; i++) {
total_sum += arr[i];
}
int left_sum = 0;
for (int i = 0; i < n; i++) {
total_sum -= arr[i];
if (left_sum == total_sum) {
return i;
}
left_sum += arr[i];... | int main() {
int arr1[] = {1, 2, 3, 4, 1, 2, 3};
int arr2[] = {-7, 1, 5, 2, -4, 3, 0};
int arr3[] = {1, 2, 3};
assert(func0(arr1, 7) == 3);
assert(func0(arr2, 7) == 3);
assert(func0(arr3, 3) == -1);
return 0;
}
| O3 | c | func0:
endbr64
test %esi,%esi
jle 1357 <func0+0xc7>
lea -0x1(%rsi),%r8d
cmp $0x3,%r8d
jbe 1361 <func0+0xd1>
mov %esi,%edx
mov %rdi,%rax
pxor %xmm0,%xmm0
shr $0x2,%edx
shl $0x4,%rdx
add %rdi,%rdx
nopl (%rax)
movdqu (%rax),%xmm2
add $0x10,%rax
paddd %xmm2,%xmm0
cmp %rdx,%rax
jne ... | func0:
endbr64
mov r9, rdi
mov edi, esi
test edi, edi
jle loc_1200
lea eax, [rdi-1]
cmp eax, 2
jbe loc_1213
mov edx, edi
mov rax, r9
pxor xmm0, xmm0
shr edx, 2
shl rdx, 4
add rdx, r9
loc_1170:
movdqu xmm2, xmmword ptr [rax]
add rax, 10h
paddd xmm0, xmm2
cmp r... | long long func0(const __m128i *a1, int a2)
{
long long v3; // rdi
const __m128i *v4; // rax
__m128i v5; // xmm0
__m128i v6; // xmm2
int v7; // edx
__m128i v8; // xmm0
int v9; // eax
long long v10; // rsi
__int32 v11; // ecx
long long result; // rax
long long v13; // rdx
int v14; // esi
v3 = ... | func0:
ENDBR64
MOV R9,RDI
MOV EDI,ESI
TEST EDI,EDI
JLE 0x00101200
LEA EAX,[RDI + -0x1]
CMP EAX,0x2
JBE 0x00101213
MOV EDX,EDI
MOV RAX,R9
PXOR XMM0,XMM0
SHR EDX,0x2
SHL RDX,0x4
ADD RDX,R9
LAB_00101170:
MOVDQU XMM2,xmmword ptr [RAX]
ADD RAX,0x10
PADDD XMM0,XMM2
CMP RAX,RDX
JNZ 0x00101170
MOVDQA XMM1,XMM0
MOV EDX,EDI
PSRL... | ulong func0(int *param_1,uint param_2)
{
int iVar1;
int *piVar2;
int *piVar3;
int *piVar4;
ulong uVar5;
uint uVar6;
int *piVar7;
ulong uVar8;
uint uVar9;
ulong uVar10;
int iVar11;
int iVar12;
int iVar13;
int iVar14;
if ((int)param_2 < 1) {
return 0xffffffff;
}
if (param_2 - 1 <... |
6,700 | func0 | #include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <string.h>
int find_ind(int key, int i, int n, int k, int arr[]) {
int ind = -1;
int start = i + 1;
int end = n - 1;
while (start < end) {
int mid = start + (end - start) / 2;
if (arr[mid] - key <= k) {
... | int func0(int arr[], int n, int k) {
int ans = n - 1;
qsort(arr, n, sizeof(int), (int (*)(const void *, const void *))strcmp);
for (int i = 0; i < n; i++) {
int j = find_ind(arr[i], i, n, k, arr);
if (j != -1) {
ans = (ans < n - (j - i + 1) ? ans : n - (j - i + 1));
... | int main() {
int arr1[] = {1, 3, 4, 9, 10, 11, 12, 17, 20};
assert(func0(arr1, 9, 4) == 5);
int arr2[] = {1, 5, 6, 2, 8};
assert(func0(arr2, 5, 2) == 3);
int arr3[] = {1, 2, 3, 4, 5, 6};
assert(func0(arr3, 6, 3) == 2);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
mov %edx,-0x20(%rbp)
mov -0x1c(%rbp),%eax
sub $0x1,%eax
mov %eax,-0xc(%rbp)
mov -0x1c(%rbp),%eax
movslq %eax,%rsi
mov -0x18(%rbp),%rax
mov 0x2d99(%rip),%rdx
mov %rdx,%rcx
mov $0x4,%ed... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+base], rdi
mov [rbp+var_1C], esi
mov [rbp+var_20], edx
mov eax, [rbp+var_1C]
sub eax, 1
mov [rbp+var_C], eax
mov eax, [rbp+var_1C]
movsxd rsi, eax; nmemb
mov rax, [rbp+base]
mov rdx, cs:compar
mov rcx, rdx; co... | long long func0(unsigned int *a1, unsigned int a2, unsigned int a3)
{
int v3; // eax
unsigned int v6; // [rsp+14h] [rbp-Ch]
unsigned int i; // [rsp+18h] [rbp-8h]
int ind; // [rsp+1Ch] [rbp-4h]
v6 = a2 - 1;
qsort(a1, (int)a2, 4uLL, (__compar_fn_t)&strcmp);
for ( i = 0; (int)i < (int)a2; ++i )
{
ind... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0x20],EDX
MOV EAX,dword ptr [RBP + -0x1c]
SUB EAX,0x1
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0x1c]
MOVSXD RSI,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [0x... | int func0(void *param_1,int param_2,int4 param_3)
{
int iVar1;
int iVar2;
int local_14;
int local_10;
local_14 = param_2 + -1;
qsort(param_1,(long)param_2,4,(__compar_fn_t)PTR_strcmp_00103fe0);
for (local_10 = 0; local_10 < param_2; local_10 = local_10 + 1) {
iVar1 = find_ind(*(int4 *)((long)param... |
6,701 | func0 | #include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <string.h>
int find_ind(int key, int i, int n, int k, int arr[]) {
int ind = -1;
int start = i + 1;
int end = n - 1;
while (start < end) {
int mid = start + (end - start) / 2;
if (arr[mid] - key <= k) {
... | int func0(int arr[], int n, int k) {
int ans = n - 1;
qsort(arr, n, sizeof(int), (int (*)(const void *, const void *))strcmp);
for (int i = 0; i < n; i++) {
int j = find_ind(arr[i], i, n, k, arr);
if (j != -1) {
ans = (ans < n - (j - i + 1) ? ans : n - (j - i + 1));
... | int main() {
int arr1[] = {1, 3, 4, 9, 10, 11, 12, 17, 20};
assert(func0(arr1, 9, 4) == 5);
int arr2[] = {1, 5, 6, 2, 8};
assert(func0(arr2, 5, 2) == 3);
int arr3[] = {1, 2, 3, 4, 5, 6};
assert(func0(arr3, 6, 3) == 2);
return 0;
}
| O1 | c | func0:
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
mov %rdi,%r12
mov %esi,%ebp
mov %edx,%r14d
lea -0x1(%rsi),%r13d
movslq %esi,%rsi
mov 0x2deb(%rip),%rcx
mov $0x4,%edx
callq 1070 <qsort@plt>
test %ebp,%ebp
jle 1244 <func0+0x77>
lea -0x1(%rb... | func0:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov r12, rdi
mov ebp, esi
mov r14d, edx
lea r13d, [rsi-1]
movsxd rsi, esi
mov rcx, cs:strcmp_ptr
mov edx, 4
call _qsort
test ebp, ebp
jle short loc_1240
mov r15d, ebp
mov ebx,... | long long func0(long long a1, int a2, unsigned int a3)
{
int v4; // r13d
long long i; // rbx
int ind; // eax
v4 = a2 - 1;
qsort(a1, a2, 4LL, &strcmp);
if ( a2 > 0 )
{
for ( i = 0LL; i != a2; ++i )
{
ind = find_ind(*(unsigned int *)(a1 + 4 * i), (unsigned int)i, (unsigned int)a2, a3, a1);
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV R12,RDI
MOV EBP,ESI
MOV R14D,EDX
LEA R13D,[RSI + -0x1]
MOVSXD RSI,ESI
MOV RCX,qword ptr [0x00103fe0]
MOV EDX,0x4
CALL 0x00101070
TEST EBP,EBP
JLE 0x00101240
MOV R15D,EBP
MOV EBX,0x0
JMP 0x00101216
LAB_0010120d:
ADD RBX,0x1
CMP RBX,R15
... | int func0(void *param_1,uint param_2,int4 param_3)
{
int iVar1;
ulong uVar2;
int iVar3;
iVar3 = param_2 - 1;
qsort(param_1,(long)(int)param_2,4,(__compar_fn_t)PTR_strcmp_00103fe0);
if (0 < (int)param_2) {
uVar2 = 0;
do {
iVar1 = find_ind(*(int4 *)((long)param_1 + uVar2 * 4),uVar2 & 0xfffff... |
6,702 | func0 | #include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <string.h>
int find_ind(int key, int i, int n, int k, int arr[]) {
int ind = -1;
int start = i + 1;
int end = n - 1;
while (start < end) {
int mid = start + (end - start) / 2;
if (arr[mid] - key <= k) {
... | int func0(int arr[], int n, int k) {
int ans = n - 1;
qsort(arr, n, sizeof(int), (int (*)(const void *, const void *))strcmp);
for (int i = 0; i < n; i++) {
int j = find_ind(arr[i], i, n, k, arr);
if (j != -1) {
ans = (ans < n - (j - i + 1) ? ans : n - (j - i + 1));
... | int main() {
int arr1[] = {1, 3, 4, 9, 10, 11, 12, 17, 20};
assert(func0(arr1, 9, 4) == 5);
int arr2[] = {1, 5, 6, 2, 8};
assert(func0(arr2, 5, 2) == 3);
int arr3[] = {1, 2, 3, 4, 5, 6};
assert(func0(arr3, 6, 3) == 2);
return 0;
}
| O2 | c | func0:
endbr64
push %r14
movslq %esi,%rsi
mov 0x2c70(%rip),%rcx
push %r13
mov %rsi,%r13
push %r12
lea -0x1(%rsi),%r12d
push %rbp
mov %edx,%ebp
mov $0x4,%edx
push %rbx
mov %rdi,%rbx
callq 1070 <qsort@plt>
test %r13d,%r13d
jle 1410 <func0+0xb0>
mov %r12d,%r14d
mov %r12d,%r10d
xor ... | func0:
endbr64
push r14
mov rcx, cs:strcmp_ptr
movsxd r14, esi
push r13
mov rsi, r14
lea r13d, [r14-1]
push r12
push rbp
mov ebp, edx
mov edx, 4
push rbx
mov rbx, rdi
call _qsort
test r14d, r14d
jle loc_1418
mov r12, r14
mov r10d, r13d
xor r9d, r9d
xchg a... | long long func0(long long a1, int a2, int a3)
{
long long v3; // r14
unsigned int v4; // r13d
int v6; // r10d
long long v7; // r9
int v8; // ecx
signed int v9; // esi
int v10; // r8d
int v11; // eax
v3 = a2;
v4 = a2 - 1;
qsort(a1, a2, 4LL, &strcmp);
if ( a2 <= 0 )
return v4;
v6 = a2 - 1;... | func0:
ENDBR64
PUSH R14
MOV RCX,qword ptr [0x00103fe0]
MOVSXD R14,ESI
PUSH R13
MOV RSI,R14
LEA R13D,[R14 + -0x1]
PUSH R12
PUSH RBP
MOV EBP,EDX
MOV EDX,0x4
PUSH RBX
MOV RBX,RDI
CALL 0x00101070
TEST R14D,R14D
JLE 0x00101418
MOV R12,R14
MOV R10D,R13D
XOR R9D,R9D
NOP
LAB_001013a0:
MOV EDI,dword ptr [RBX + R9*0x4]
MOV R11D,... | int func0(void *param_1,int param_2,int param_3)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
size_t sVar6;
int iVar7;
int iVar8;
iVar8 = param_2 + -1;
qsort(param_1,(long)param_2,4,(__compar_fn_t)PTR_strcmp_00103fe0);
if (param_2 < 1) {
return iVar8;
}
sVar6 = 0;
iVar7 =... |
6,703 | func0 | #include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <string.h>
int find_ind(int key, int i, int n, int k, int arr[]) {
int ind = -1;
int start = i + 1;
int end = n - 1;
while (start < end) {
int mid = start + (end - start) / 2;
if (arr[mid] - key <= k) {
... | int func0(int arr[], int n, int k) {
int ans = n - 1;
qsort(arr, n, sizeof(int), (int (*)(const void *, const void *))strcmp);
for (int i = 0; i < n; i++) {
int j = find_ind(arr[i], i, n, k, arr);
if (j != -1) {
ans = (ans < n - (j - i + 1) ? ans : n - (j - i + 1));
... | int main() {
int arr1[] = {1, 3, 4, 9, 10, 11, 12, 17, 20};
assert(func0(arr1, 9, 4) == 5);
int arr2[] = {1, 5, 6, 2, 8};
assert(func0(arr2, 5, 2) == 3);
int arr3[] = {1, 2, 3, 4, 5, 6};
assert(func0(arr3, 6, 3) == 2);
return 0;
}
| O3 | c | func0:
endbr64
push %r14
movslq %esi,%rsi
mov 0x2cc0(%rip),%rcx
push %r13
mov %rsi,%r13
push %r12
lea -0x1(%rsi),%r12d
push %rbp
mov %edx,%ebp
mov $0x4,%edx
push %rbx
mov %rdi,%rbx
callq 1070 <qsort@plt>
test %r13d,%r13d
jle 13c0 <func0+0xb0>
mov %r12d,%r14d
mov %r12d,%r10d
xor ... | func0:
endbr64
push r14
mov rcx, cs:compar; compar
movsxd r14, esi
push r13
mov rsi, r14; nmemb
lea r13d, [r14-1]
push r12
push rbp
mov ebp, edx
mov edx, 4; size
push rbx
mov rbx, rdi
call _qsort
test r14d, r14d
jle short loc_13C0
mov r12, r14
mov r10d, r13d
xor... | long long func0(void *a1, int a2, int a3)
{
long long v3; // r14
unsigned int v4; // r13d
int v6; // r10d
long long v7; // r9
int v8; // ecx
signed int v9; // esi
int v10; // r8d
int v11; // eax
v3 = a2;
v4 = a2 - 1;
qsort(a1, a2, 4uLL, (__compar_fn_t)&strcmp);
if ( a2 <= 0 )
return v4;
... | func0:
ENDBR64
PUSH R14
MOV RCX,qword ptr [0x00103fe0]
MOVSXD R14,ESI
PUSH R13
MOV RSI,R14
LEA R13D,[R14 + -0x1]
PUSH R12
PUSH RBP
MOV EBP,EDX
MOV EDX,0x4
PUSH RBX
MOV RBX,RDI
CALL 0x00101070
TEST R14D,R14D
JLE 0x001013c0
MOV R12,R14
MOV R10D,R13D
XOR R9D,R9D
NOP word ptr [RAX + RAX*0x1]
LAB_00101350:
MOV EDI,dword ptr... | int func0(void *param_1,int param_2,int param_3)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
size_t sVar6;
int iVar7;
int iVar8;
iVar8 = param_2 + -1;
qsort(param_1,(long)param_2,4,(__compar_fn_t)PTR_strcmp_00103fe0);
if (param_2 < 1) {
return iVar8;
}
sVar6 = 0;
iVar7 =... |
6,704 | func0 | #include <stdio.h>
#include <stdbool.h>
#include <assert.h>
| bool func0(int *keys, int *values, int size, int x) {
for (int i = 0; i < size; i++) {
if (keys[i] == x) {
return true;
}
}
return false;
}
| int main() {
int keys[] = {1, 2, 3, 4, 5, 6};
int values[] = {10, 20, 30, 40, 50, 60};
int size = 6;
assert(func0(keys, values, size, 5) == true);
assert(func0(keys, values, size, 6) == true);
assert(func0(keys, values, size, 10) == false);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %rsi,-0x20(%rbp)
mov %edx,-0x24(%rbp)
mov %ecx,-0x28(%rbp)
movl $0x0,-0x4(%rbp)
jmp 11ae <func0+0x45>
mov -0x4(%rbp),%eax
cltq
lea 0x0(,%rax,4),%rdx
mov -0x18(%rbp),%rax
add %rdx,%rax
mov (%rax),%eax
cmp %eax,-0x28(%... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_20], rsi
mov [rbp+var_24], edx
mov [rbp+var_28], ecx
mov [rbp+var_4], 0
jmp short loc_11AE
loc_1188:
mov eax, [rbp+var_4]
cdqe
lea rdx, ds:0[rax*4]
mov rax, [rbp+var_18]
add rax, rdx
mov eax, [rax]... | long long func0(long long a1, long long a2, int a3, int a4)
{
int i; // [rsp+24h] [rbp-4h]
for ( i = 0; i < a3; ++i )
{
if ( a4 == *(_DWORD *)(4LL * i + a1) )
return 1LL;
}
return 0LL;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV qword ptr [RBP + -0x20],RSI
MOV dword ptr [RBP + -0x24],EDX
MOV dword ptr [RBP + -0x28],ECX
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001011ae
LAB_00101188:
MOV EAX,dword ptr [RBP + -0x4]
CDQE
LEA RDX,[RAX*0x4]
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,RD... | int8 func0(long param_1,int8 param_2,int param_3,int param_4)
{
int local_c;
local_c = 0;
while( true ) {
if (param_3 <= local_c) {
return 0;
}
if (param_4 == *(int *)(param_1 + (long)local_c * 4)) break;
local_c = local_c + 1;
}
return 1;
} |
6,705 | func0 | #include <stdio.h>
#include <stdbool.h>
#include <assert.h>
| bool func0(int *keys, int *values, int size, int x) {
for (int i = 0; i < size; i++) {
if (keys[i] == x) {
return true;
}
}
return false;
}
| int main() {
int keys[] = {1, 2, 3, 4, 5, 6};
int values[] = {10, 20, 30, 40, 50, 60};
int size = 6;
assert(func0(keys, values, size, 5) == true);
assert(func0(keys, values, size, 6) == true);
assert(func0(keys, values, size, 10) == false);
return 0;
}
| O1 | c | func0:
endbr64
test %edx,%edx
jle 118f <func0+0x26>
mov %rdi,%rax
lea -0x1(%rdx),%edx
lea 0x4(%rdi,%rdx,4),%rdx
cmp %ecx,(%rax)
je 1195 <func0+0x2c>
add $0x4,%rax
cmp %rdx,%rax
jne 117c <func0+0x13>
mov $0x0,%eax
retq
mov $0x0,%eax
retq
mov $0x1,%eax
retq
| func0:
endbr64
test edx, edx
jle short loc_118F
mov rax, rdi
lea edx, [rdx-1]
lea rdx, [rdi+rdx*4+4]
loc_117C:
cmp [rax], ecx
jz short loc_1195
add rax, 4
cmp rax, rdx
jnz short loc_117C
mov eax, 0
retn
loc_118F:
mov eax, 0
retn
loc_1195:
mov eax, 1
retn | long long func0(_DWORD *a1, long long a2, int a3, int a4)
{
_DWORD *v4; // rax
long long v5; // rdx
if ( a3 <= 0 )
return 0LL;
v4 = a1;
v5 = (long long)&a1[a3 - 1 + 1];
while ( *v4 != a4 )
{
if ( ++v4 == (_DWORD *)v5 )
return 0LL;
}
return 1LL;
} | func0:
ENDBR64
TEST EDX,EDX
JLE 0x0010118f
MOV RAX,RDI
LEA EDX,[RDX + -0x1]
LEA RDX,[RDI + RDX*0x4 + 0x4]
LAB_0010117c:
CMP dword ptr [RAX],ECX
JZ 0x00101195
ADD RAX,0x4
CMP RAX,RDX
JNZ 0x0010117c
MOV EAX,0x0
RET
LAB_0010118f:
MOV EAX,0x0
RET
LAB_00101195:
MOV EAX,0x1
RET | int8 func0(int *param_1,int8 param_2,int param_3,int param_4)
{
int *piVar1;
if (param_3 < 1) {
return 0;
}
piVar1 = param_1 + (ulong)(param_3 - 1) + 1;
do {
if (*param_1 == param_4) {
return 1;
}
param_1 = param_1 + 1;
} while (param_1 != piVar1);
return 0;
} |
6,706 | func0 | #include <stdio.h>
#include <stdbool.h>
#include <assert.h>
| bool func0(int *keys, int *values, int size, int x) {
for (int i = 0; i < size; i++) {
if (keys[i] == x) {
return true;
}
}
return false;
}
| int main() {
int keys[] = {1, 2, 3, 4, 5, 6};
int values[] = {10, 20, 30, 40, 50, 60};
int size = 6;
assert(func0(keys, values, size, 5) == true);
assert(func0(keys, values, size, 6) == true);
assert(func0(keys, values, size, 10) == false);
return 0;
}
| O2 | c | func0:
endbr64
test %edx,%edx
jle 1170 <func0+0x30>
lea -0x1(%rdx),%eax
lea 0x4(%rdi,%rax,4),%rax
jmp 1161 <func0+0x21>
nopw 0x0(%rax,%rax,1)
add $0x4,%rdi
cmp %rax,%rdi
je 1170 <func0+0x30>
cmp %ecx,(%rdi)
jne 1158 <func0+0x18>
mov $0x1,%eax
retq
nopl 0x0(%rax,%rax,1)
xor %eax,%... | func0:
endbr64
test edx, edx
jle short loc_12B0
lea eax, [rdx-1]
lea rax, [rdi+rax*4+4]
jmp short loc_12A1
loc_1298:
add rdi, 4
cmp rdi, rax
jz short loc_12B0
loc_12A1:
cmp [rdi], ecx
jnz short loc_1298
mov eax, 1
retn
loc_12B0:
xor eax, eax
retn | long long func0(_DWORD *a1, long long a2, int a3, int a4)
{
long long v4; // rax
if ( a3 <= 0 )
return 0LL;
v4 = (long long)&a1[a3 - 1 + 1];
while ( *a1 != a4 )
{
if ( ++a1 == (_DWORD *)v4 )
return 0LL;
}
return 1LL;
} | func0:
ENDBR64
TEST EDX,EDX
JLE 0x001012b0
LEA EAX,[RDX + -0x1]
LEA RAX,[RDI + RAX*0x4 + 0x4]
JMP 0x001012a1
LAB_00101298:
ADD RDI,0x4
CMP RDI,RAX
JZ 0x001012b0
LAB_001012a1:
CMP dword ptr [RDI],ECX
JNZ 0x00101298
MOV EAX,0x1
RET
LAB_001012b0:
XOR EAX,EAX
RET | int8 func0(int *param_1,int8 param_2,int param_3,int param_4)
{
int *piVar1;
if (0 < param_3) {
piVar1 = param_1 + (ulong)(param_3 - 1) + 1;
do {
if (*param_1 == param_4) {
return 1;
}
param_1 = param_1 + 1;
} while (param_1 != piVar1);
}
return 0;
} |
6,707 | func0 | #include <stdio.h>
#include <stdbool.h>
#include <assert.h>
| bool func0(int *keys, int *values, int size, int x) {
for (int i = 0; i < size; i++) {
if (keys[i] == x) {
return true;
}
}
return false;
}
| int main() {
int keys[] = {1, 2, 3, 4, 5, 6};
int values[] = {10, 20, 30, 40, 50, 60};
int size = 6;
assert(func0(keys, values, size, 5) == true);
assert(func0(keys, values, size, 6) == true);
assert(func0(keys, values, size, 10) == false);
return 0;
}
| O3 | c | func0:
endbr64
test %edx,%edx
jle 1210 <func0+0x30>
lea -0x1(%rdx),%eax
lea 0x4(%rdi,%rax,4),%rax
jmp 1201 <func0+0x21>
nopw 0x0(%rax,%rax,1)
add $0x4,%rdi
cmp %rax,%rdi
je 1210 <func0+0x30>
cmp %ecx,(%rdi)
jne 11f8 <func0+0x18>
mov $0x1,%eax
retq
nopl 0x0(%rax,%rax,1)
xor %eax,%... | func0:
endbr64
test edx, edx
jle short loc_1170
movsxd rdx, edx
lea rax, [rdi+rdx*4]
jmp short loc_1161
loc_1158:
add rdi, 4
cmp rdi, rax
jz short loc_1170
loc_1161:
cmp [rdi], ecx
jnz short loc_1158
mov eax, 1
retn
loc_1170:
xor eax, eax
retn | long long func0(_DWORD *a1, long long a2, int a3, int a4)
{
_DWORD *v4; // rax
if ( a3 <= 0 )
return 0LL;
v4 = &a1[a3];
while ( *a1 != a4 )
{
if ( ++a1 == v4 )
return 0LL;
}
return 1LL;
} | func0:
ENDBR64
TEST EDX,EDX
JLE 0x00101170
MOVSXD RDX,EDX
LEA RAX,[RDI + RDX*0x4]
JMP 0x00101161
LAB_00101158:
ADD RDI,0x4
CMP RDI,RAX
JZ 0x00101170
LAB_00101161:
CMP dword ptr [RDI],ECX
JNZ 0x00101158
MOV EAX,0x1
RET
LAB_00101170:
XOR EAX,EAX
RET | int8 func0(int *param_1,int8 param_2,int param_3,int param_4)
{
int *piVar1;
if (0 < param_3) {
piVar1 = param_1 + param_3;
do {
if (*param_1 == param_4) {
return 1;
}
param_1 = param_1 + 1;
} while (param_1 != piVar1);
}
return 0;
} |
6,708 | func0 |
#include <assert.h>
#include <stdio.h>
| double func0(int n) {
if (n < 2)
return 1.0;
else
return 1.0 / n + func0(n - 1);
}
| int main() {
assert(func0(10) - 2.9289682539682538 < 1e-9);
assert(func0(4) - 2.083333333333333 < 1e-9);
assert(func0(7) - 2.5928571428571425 < 1e-9);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x10,%rsp
mov %edi,-0x4(%rbp)
cmpl $0x1,-0x4(%rbp)
jg 1168 <func0+0x1f>
movsd 0xf62(%rip),%xmm0
jmp 1190 <func0+0x47>
cvtsi2sdl -0x4(%rbp),%xmm1
movsd 0xf53(%rip),%xmm0
divsd %xmm1,%xmm0
movsd %xmm0,-0x10(%rbp)
mov -0x4(%rbp),%eax
sub $0x1,%eax
m... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_4], edi
cmp [rbp+var_4], 1
jg short loc_1168
movsd xmm0, cs:qword_20A8
jmp short locret_1194
loc_1168:
pxor xmm1, xmm1
cvtsi2sd xmm1, [rbp+var_4]
movsd xmm0, cs:qword_20A8
divsd xmm0, xmm1
movsd [rbp+var_10], xmm0
mov ... | double func0(int a1)
{
if ( a1 > 1 )
return func0((unsigned int)(a1 - 1)) + 1.0 / (double)a1;
else
return 1.0;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV dword ptr [RBP + -0x4],EDI
CMP dword ptr [RBP + -0x4],0x1
JG 0x00101168
MOVSD XMM0,qword ptr [0x001020a8]
JMP 0x00101194
LAB_00101168:
PXOR XMM1,XMM1
CVTSI2SD XMM1,dword ptr [RBP + -0x4]
MOVSD XMM0,qword ptr [0x001020a8]
DIVSD XMM0,XMM1
MOVSD qword ptr [RBP + -0x10],... | double func0(int param_1)
{
double dVar1;
double dVar2;
dVar1 = DAT_001020a8;
if (1 < param_1) {
dVar1 = DAT_001020a8 / (double)param_1;
dVar2 = (double)func0(param_1 + -1);
dVar1 = dVar2 + dVar1;
}
return dVar1;
} |
6,709 | func0 |
#include <assert.h>
#include <stdio.h>
| double func0(int n) {
if (n < 2)
return 1.0;
else
return 1.0 / n + func0(n - 1);
}
| int main() {
assert(func0(10) - 2.9289682539682538 < 1e-9);
assert(func0(4) - 2.083333333333333 < 1e-9);
assert(func0(7) - 2.5928571428571425 < 1e-9);
return 0;
}
| O1 | c | func0:
endbr64
movsd 0xf73(%rip),%xmm0
cmp $0x1,%edi
jg 115b <func0+0x12>
retq
push %rbx
mov %edi,%ebx
lea -0x1(%rdi),%edi
callq 1149 <func0>
movapd %xmm0,%xmm2
pxor %xmm1,%xmm1
cvtsi2sd %ebx,%xmm1
movsd 0xf4e(%rip),%xmm0
divsd %xmm1,%xmm0
addsd %xmm2,%xmm0
pop %rbx
retq
| func0:
endbr64
movsd xmm0, cs:qword_20A8
cmp edi, 1
jg short loc_115B
retn
loc_115B:
push rbx
mov ebx, edi
lea edi, [rdi-1]
call func0
movapd xmm1, xmm0
pxor xmm2, xmm2
cvtsi2sd xmm2, ebx
movsd xmm0, cs:qword_20A8
divsd xmm0, xmm2
addsd xmm0, xmm1
pop rbx
retn | double func0(int a1)
{
double result; // xmm0_8
result = 1.0;
if ( a1 > 1 )
return 1.0 / (double)a1 + func0((unsigned int)(a1 - 1), 1.0);
return result;
} | func0:
ENDBR64
MOVSD XMM0,qword ptr [0x001020a8]
CMP EDI,0x1
JG 0x0010115b
RET
LAB_0010115b:
PUSH RBX
MOV EBX,EDI
LEA EDI,[RDI + -0x1]
CALL 0x00101149
MOVAPD XMM1,XMM0
PXOR XMM2,XMM2
CVTSI2SD XMM2,EBX
MOVSD XMM0,qword ptr [0x001020a8]
DIVSD XMM0,XMM2
ADDSD XMM0,XMM1
POP RBX
RET | double func0(int param_1)
{
double dVar1;
if (param_1 < 2) {
return DAT_001020a8;
}
dVar1 = (double)func0(DAT_001020a8,param_1 + -1);
return DAT_001020a8 / (double)param_1 + dVar1;
} |
6,710 | func0 |
#include <assert.h>
#include <stdio.h>
| double func0(int n) {
if (n < 2)
return 1.0;
else
return 1.0 / n + func0(n - 1);
}
| int main() {
assert(func0(10) - 2.9289682539682538 < 1e-9);
assert(func0(4) - 2.083333333333333 < 1e-9);
assert(func0(7) - 2.5928571428571425 < 1e-9);
return 0;
}
| O2 | c | func0:
endbr64
cmp $0x1,%edi
jg 1258 <func0+0x18>
movsd 0xe77(%rip),%xmm0
retq
nopw 0x0(%rax,%rax,1)
jmp 1260 <func0.part.0>
nopw 0x0(%rax,%rax,1)
| func0:
endbr64
movsd xmm0, cs:qword_20A8
cmp edi, 1
jg short loc_1248
retn
loc_1248:
pxor xmm1, xmm1
movapd xmm3, xmm0
lea eax, [rdi-1]
cvtsi2sd xmm1, edi
divsd xmm3, xmm1
cmp edi, 2
jnz short loc_1270
addsd xmm3, xmm0
movapd xmm0, xmm3
retn
loc_1270:
pxor xmm1, xmm1
push rbx
movap... | __int128 __usercall func0@<xmm0>(int a1@<edi>)
{
__int128 result; // xmm0
int v2; // eax
__int128 v3; // xmm3
double v4; // xmm2_8
double v5; // xmm1_8
result = 0x3FF0000000000000uLL;
if ( a1 > 1 )
{
*((_QWORD *)&v3 + 1) = 0LL;
v2 = a1 - 1;
*(double *)&v3 = 1.0 / (double)a1;
if ( a1 == ... | func0:
ENDBR64
MOVSD XMM0,qword ptr [0x001020a8]
CMP EDI,0x1
JG 0x00101248
RET
LAB_00101248:
PXOR XMM1,XMM1
MOVAPD XMM3,XMM0
LEA EAX,[RDI + -0x1]
CVTSI2SD XMM1,EDI
DIVSD XMM3,XMM1
CMP EDI,0x2
JNZ 0x00101270
ADDSD XMM3,XMM0
MOVAPD XMM0,XMM3
RET
LAB_00101270:
PXOR XMM1,XMM1
PUSH RBX
MOVAPD XMM2,XMM0
LEA EBX,[RDI + -0x2]
... | double func0(int param_1)
{
double dVar1;
double dVar2;
double dVar3;
double dVar4;
dVar1 = DAT_001020a8;
if (param_1 < 2) {
return DAT_001020a8;
}
dVar4 = DAT_001020a8 / (double)param_1;
if (param_1 == 2) {
return dVar4 + DAT_001020a8;
}
dVar3 = DAT_001020a8 / (double)(param_1 + -1);
... |
6,711 | func0 |
#include <assert.h>
#include <stdio.h>
| double func0(int n) {
if (n < 2)
return 1.0;
else
return 1.0 / n + func0(n - 1);
}
| int main() {
assert(func0(10) - 2.9289682539682538 < 1e-9);
assert(func0(4) - 2.083333333333333 < 1e-9);
assert(func0(7) - 2.5928571428571425 < 1e-9);
return 0;
}
| O3 | c | func0:
endbr64
movsd 0xe8c(%rip),%xmm1
cmp $0x1,%edi
jg 1250 <func0+0x20>
movapd %xmm1,%xmm0
retq
nopw %cs:0x0(%rax,%rax,1)
push %rbx
mov %edi,%ebx
lea -0x1(%rdi),%edi
sub $0x10,%rsp
movsd %xmm1,0x8(%rsp)
callq 1230 <func0>
movsd 0x8(%rsp),%xmm1
add $0x10,%rsp
movapd %xmm0,%xmm2
pxor %xmm0,... | func0:
endbr64
movsd xmm0, cs:qword_20B0
cmp edi, 1
jg short loc_1248
retn
loc_1248:
pxor xmm1, xmm1
movapd xmm2, xmm0
lea eax, [rdi-1]
cvtsi2sd xmm1, edi
divsd xmm2, xmm1
movapd xmm1, xmm0
cmp edi, 2
jnz short loc_1270
addsd xmm2, xmm1
movapd xmm0, xmm2
retn
loc_1270:
pxor xmm3, xmm... | __int128 __usercall func0@<xmm0>(int a1@<edi>)
{
__int128 result; // xmm0
__int128 v2; // xmm2
int v3; // eax
double v4; // xmm1_8
result = 0x3FF0000000000000uLL;
if ( a1 > 1 )
{
*((_QWORD *)&v2 + 1) = 0LL;
*(double *)&v2 = 1.0 / (double)a1;
if ( a1 == 2 )
{
*(double *)&v2 = *(doubl... | func0:
ENDBR64
MOVSD XMM0,qword ptr [0x001020b0]
CMP EDI,0x1
JG 0x00101248
RET
LAB_00101248:
PXOR XMM1,XMM1
MOVAPD XMM2,XMM0
LEA EAX,[RDI + -0x1]
CVTSI2SD XMM1,EDI
DIVSD XMM2,XMM1
MOVAPD XMM1,XMM0
CMP EDI,0x2
JNZ 0x00101270
ADDSD XMM2,XMM1
MOVAPD XMM0,XMM2
RET
LAB_00101270:
PXOR XMM3,XMM3
CVTSI2SD XMM3,EAX
LEA EAX,[RDI... | double func0(int param_1)
{
double dVar1;
double dVar2;
double dVar3;
double dVar4;
if (param_1 < 2) {
return DAT_001020b0;
}
dVar4 = DAT_001020b0 / (double)param_1;
if (param_1 == 2) {
return dVar4 + DAT_001020b0;
}
dVar3 = DAT_001020b0 / (double)(param_1 + -1);
if (param_1 == 3) {
... |
6,712 | func0 |
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct {
int *array;
size_t length;
} IntList;
typedef struct {
char **array;
size_t length;
} StrList;
// Comparison function for integers
int compare_ints(const void *a, const void *b) {
In... | void func0(IntList list[], size_t n) {
qsort(list, n, sizeof(IntList), compare_ints_only);
qsort(list, n, sizeof(IntList), compare_ints);
}
| int main() {
// First assert
IntList list1[] = {
{ (int[]){2}, 1 },
{ (int[]){0}, 1 },
{ (int[]){1, 3}, 2 },
{ (int[]){0, 7}, 2 },
{ (int[]){9, 11}, 2 },
{ (int[]){13, 15, 17}, 3 }
};
size_t n1 = sizeof(list1) / sizeof(list1[0]);
func0(list1... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x10,%rsp
mov %rdi,-0x8(%rbp)
mov %rsi,-0x10(%rbp)
mov -0x10(%rbp),%rsi
mov -0x8(%rbp),%rax
lea -0x15e(%rip),%rcx
mov $0x10,%edx
mov %rax,%rdi
callq 10a0 <qsort@plt>
mov -0x10(%rbp),%rsi
mov -0x8(%rbp),%rax
lea -0x37f(%rip),%rcx
mov $... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+base], rdi
mov [rbp+nmemb], rsi
mov rsi, [rbp+nmemb]; nmemb
mov rax, [rbp+base]
lea rdx, compare_ints_only
mov rcx, rdx; compar
mov edx, 10h; size
mov rdi, rax; base
call _qsort
mov rsi, [rbp+nmemb]; nmemb
mov ... | void func0(void *a1, size_t a2)
{
qsort(a1, a2, 0x10uLL, compare_ints_only);
qsort(a1, a2, 0x10uLL, compare_ints);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RSI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
LEA RDX,[0x1013ce]
MOV RCX,RDX
MOV EDX,0x10
MOV RDI,RAX
CALL 0x001010a0
MOV RSI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
LEA RDX,[0... | void func0(void *param_1,size_t param_2)
{
qsort(param_1,param_2,0x10,compare_ints_only);
qsort(param_1,param_2,0x10,compare_ints);
return;
} |
6,713 | func0 |
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct {
int *array;
size_t length;
} IntList;
typedef struct {
char **array;
size_t length;
} StrList;
// Comparison function for integers
int compare_ints(const void *a, const void *b) {
In... | void func0(IntList list[], size_t n) {
qsort(list, n, sizeof(IntList), compare_ints_only);
qsort(list, n, sizeof(IntList), compare_ints);
}
| int main() {
// First assert
IntList list1[] = {
{ (int[]){2}, 1 },
{ (int[]){0}, 1 },
{ (int[]){1, 3}, 2 },
{ (int[]){0, 7}, 2 },
{ (int[]){9, 11}, 2 },
{ (int[]){13, 15, 17}, 3 }
};
size_t n1 = sizeof(list1) / sizeof(list1[0]);
func0(list1... | O1 | c | func0:
endbr64
push %rbp
push %rbx
sub $0x8,%rsp
mov %rdi,%rbx
mov %rsi,%rbp
lea -0x106(%rip),%rcx
mov $0x10,%edx
callq 10a0 <qsort@plt>
lea -0x170(%rip),%rcx
mov $0x10,%edx
mov %rbp,%rsi
mov %rbx,%rdi
callq 10a0 <qsort@plt>
add $0x8,%rsp
pop %rbx
pop %rbp
retq
| func0:
endbr64
push rbp
push rbx
sub rsp, 8
mov rbx, rdi
mov rbp, rsi
lea rcx, compare_ints_only
mov edx, 10h
call _qsort
lea rcx, compare_ints
mov edx, 10h
mov rsi, rbp
mov rdi, rbx
call _qsort
add rsp, 8
pop rbx
pop rbp
retn | long long func0(long long a1, long long a2)
{
qsort(a1, a2, 16LL, compare_ints_only);
return qsort(a1, a2, 16LL, compare_ints);
} | func0:
ENDBR64
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RBX,RDI
MOV RBP,RSI
LEA RCX,[0x101222]
MOV EDX,0x10
CALL 0x001010a0
LEA RCX,[0x1011c9]
MOV EDX,0x10
MOV RSI,RBP
MOV RDI,RBX
CALL 0x001010a0
ADD RSP,0x8
POP RBX
POP RBP
RET | void func0(void *param_1,size_t param_2)
{
qsort(param_1,param_2,0x10,compare_ints_only);
qsort(param_1,param_2,0x10,compare_ints);
return;
} |
6,714 | func0 |
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct {
int *array;
size_t length;
} IntList;
typedef struct {
char **array;
size_t length;
} StrList;
// Comparison function for integers
int compare_ints(const void *a, const void *b) {
In... | void func0(IntList list[], size_t n) {
qsort(list, n, sizeof(IntList), compare_ints_only);
qsort(list, n, sizeof(IntList), compare_ints);
}
| int main() {
// First assert
IntList list1[] = {
{ (int[]){2}, 1 },
{ (int[]){0}, 1 },
{ (int[]){1, 3}, 2 },
{ (int[]){0, 7}, 2 },
{ (int[]){9, 11}, 2 },
{ (int[]){13, 15, 17}, 3 }
};
size_t n1 = sizeof(list1) / sizeof(list1[0]);
func0(list1... | O2 | c | func0:
endbr64
push %r12
lea -0x11d(%rip),%rcx
mov $0x10,%edx
mov %rsi,%r12
push %rbp
mov %rdi,%rbp
sub $0x8,%rsp
callq 10a0 <qsort@plt>
add $0x8,%rsp
mov %r12,%rsi
mov %rbp,%rdi
lea -0x1a3(%rip),%rcx
pop %rbp
mov $0x10,%edx
pop %r12
jmpq 10a0 <qsort@plt>
| func0:
endbr64
push r12
lea rcx, compare_ints_only
mov edx, 10h
mov r12, rsi
push rbp
mov rbp, rdi
sub rsp, 8
call _qsort
add rsp, 8
mov rsi, r12
mov rdi, rbp
lea rcx, compare_ints
pop rbp
mov edx, 10h
pop r12
jmp _qsort | long long func0(long long a1, long long a2)
{
qsort(a1, a2, 16LL, compare_ints_only);
return qsort(a1, a2, 16LL, compare_ints);
} | func0:
ENDBR64
PUSH R12
LEA RCX,[0x101970]
MOV EDX,0x10
MOV R12,RSI
PUSH RBP
MOV RBP,RDI
SUB RSP,0x8
CALL 0x001010a0
ADD RSP,0x8
MOV RSI,R12
MOV RDI,RBP
LEA RCX,[0x101910]
POP RBP
MOV EDX,0x10
POP R12
JMP 0x001010a0 | void func0(void *param_1,size_t param_2)
{
qsort(param_1,param_2,0x10,compare_ints_only);
qsort(param_1,param_2,0x10,compare_ints);
return;
} |
6,715 | func0 |
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct {
int *array;
size_t length;
} IntList;
typedef struct {
char **array;
size_t length;
} StrList;
// Comparison function for integers
int compare_ints(const void *a, const void *b) {
In... | void func0(IntList list[], size_t n) {
qsort(list, n, sizeof(IntList), compare_ints_only);
qsort(list, n, sizeof(IntList), compare_ints);
}
| int main() {
// First assert
IntList list1[] = {
{ (int[]){2}, 1 },
{ (int[]){0}, 1 },
{ (int[]){1, 3}, 2 },
{ (int[]){0, 7}, 2 },
{ (int[]){9, 11}, 2 },
{ (int[]){13, 15, 17}, 3 }
};
size_t n1 = sizeof(list1) / sizeof(list1[0]);
func0(list1... | O3 | c | func0:
endbr64
push %r12
lea -0x11d(%rip),%rcx
mov $0x10,%edx
mov %rsi,%r12
push %rbp
mov %rdi,%rbp
sub $0x8,%rsp
callq 10a0 <qsort@plt>
add $0x8,%rsp
mov %r12,%rsi
mov %rbp,%rdi
lea -0x1a3(%rip),%rcx
pop %rbp
mov $0x10,%edx
pop %r12
jmpq 10a0 <qsort@plt>
| func0:
endbr64
push rbp
lea rcx, compare_ints_only; compar
mov edx, 10h; size
mov rbp, rsi
push rbx
mov rbx, rdi
sub rsp, 8
call _qsort
add rsp, 8
mov rsi, rbp; nmemb
mov rdi, rbx; base
lea rcx, compare_ints; compar
pop rbx
mov edx, 10h; size
pop rbp
jmp _qso... | void func0(void *base, size_t nmemb)
{
qsort(base, nmemb, 0x10uLL, compare_ints_only);
qsort(base, nmemb, 0x10uLL, compare_ints);
} | func0:
ENDBR64
PUSH RBP
LEA RCX,[0x101960]
MOV EDX,0x10
MOV RBP,RSI
PUSH RBX
MOV RBX,RDI
SUB RSP,0x8
CALL 0x001010a0
ADD RSP,0x8
MOV RSI,RBP
MOV RDI,RBX
LEA RCX,[0x101900]
POP RBX
MOV EDX,0x10
POP RBP
JMP 0x001010a0 | void func0(void *param_1,size_t param_2)
{
qsort(param_1,param_2,0x10,compare_ints_only);
qsort(param_1,param_2,0x10,compare_ints);
return;
} |
6,716 | func0 |
#include <stdbool.h>
#include <assert.h>
| bool func0(int arr1[], int m, int arr2[], int n) {
bool hashset[1000] = {false};
for (int i = 0; i < m; i++) {
hashset[arr1[i]] = true;
}
for (int i = 0; i < n; i++) {
if (hashset[arr2[i]]) {
continue;
} else {
return false;
}
}
... | int main() {
int arr1[] = {11, 1, 13, 21, 3, 7};
int arr2[] = {11, 3, 7, 1};
assert(func0(arr1, 6, arr2, 4) == true);
int arr3[] = {1, 2, 3, 4, 5, 6};
int arr4[] = {1, 2, 4};
assert(func0(arr3, 6, arr4, 3) == true);
int arr5[] = {10, 5, 2, 23, 19};
int arr6[] = {19, 5, 3};
... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x420,%rsp
mov %rdi,-0x408(%rbp)
mov %esi,-0x40c(%rbp)
mov %rdx,-0x418(%rbp)
mov %ecx,-0x410(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
lea -0x3f0(%rbp),%rdx
mov $0x0,%eax
mov $0x7d,%ecx
mov %rdx,%rdi
rep stos %rax,%es:(... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 420h
mov [rbp+var_408], rdi
mov [rbp+var_40C], esi
mov [rbp+var_418], rdx
mov [rbp+var_410], ecx
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
lea rdx, [rbp+var_3F0]
mov eax, 0
mov ecx, 7Dh ; '}'
mov rdi, rdx
rep st... | long long func0(long long a1, int a2, long long a3, int a4)
{
int i; // [rsp+28h] [rbp-3F8h]
int j; // [rsp+2Ch] [rbp-3F4h]
_BYTE v7[1000]; // [rsp+30h] [rbp-3F0h] BYREF
unsigned long long v8; // [rsp+418h] [rbp-8h]
v8 = __readfsqword(0x28u);
memset(v7, 0, sizeof(v7));
for ( i = 0; i < a2; ++i )
v7[... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x420
MOV qword ptr [RBP + -0x408],RDI
MOV dword ptr [RBP + -0x40c],ESI
MOV qword ptr [RBP + -0x418],RDX
MOV dword ptr [RBP + -0x410],ECX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
LEA RDX,[RBP + -0x3f0]
MOV EAX,0x0
MOV ECX,0x7d
MOV RDI,RDX
STOSQ.R... | int8 func0(long param_1,int param_2,long param_3,int param_4)
{
int8 uVar1;
long lVar2;
char *pcVar3;
long in_FS_OFFSET;
int local_400;
int local_3fc;
char local_3f8 [1000];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
pcVar3 = local_3f8;
for (lVar2 = 0x7d; lVar2 != 0; lVar2 = lVa... |
6,717 | func0 |
#include <stdbool.h>
#include <assert.h>
| bool func0(int arr1[], int m, int arr2[], int n) {
bool hashset[1000] = {false};
for (int i = 0; i < m; i++) {
hashset[arr1[i]] = true;
}
for (int i = 0; i < n; i++) {
if (hashset[arr2[i]]) {
continue;
} else {
return false;
}
}
... | int main() {
int arr1[] = {11, 1, 13, 21, 3, 7};
int arr2[] = {11, 3, 7, 1};
assert(func0(arr1, 6, arr2, 4) == true);
int arr3[] = {1, 2, 3, 4, 5, 6};
int arr4[] = {1, 2, 4};
assert(func0(arr3, 6, arr4, 3) == true);
int arr5[] = {10, 5, 2, 23, 19};
int arr6[] = {19, 5, 3};
... | O1 | c | func0:
endbr64
sub $0x3f8,%rsp
mov %rdi,%r9
mov %ecx,%r8d
mov %fs:0x28,%rax
mov %rax,0x3e8(%rsp)
xor %eax,%eax
mov %rsp,%rdi
mov $0x7d,%ecx
rep stos %rax,%es:(%rdi)
test %esi,%esi
jle 11b7 <func0+0x4e>
mov %r9,%rax
lea -0x1(%rsi),%ecx
lea 0x4(%r9,%rcx,4),%rsi
movslq (%rax),%rcx
mov... | func0:
endbr64
sub rsp, 3F8h
mov r10, rdi
mov r9, rdx
mov r8d, ecx
mov rax, fs:28h
mov [rsp+3F8h+var_10], rax
xor eax, eax
mov rdi, rsp
mov ecx, 7Dh ; '}'
rep stosq
test esi, esi
jle short loc_11BA
mov rax, r10
lea edx, [rsi-1]
lea rcx, [r10+rdx*4+4]
loc_11AA:
movs... | long long func0(int *a1, int a2, int *a3, int a4)
{
int *v5; // rax
int *v6; // rax
unsigned int v7; // edx
_BYTE v9[1000]; // [rsp+0h] [rbp-3F8h] BYREF
unsigned long long v10; // [rsp+3E8h] [rbp-10h]
v10 = __readfsqword(0x28u);
memset(v9, 0, sizeof(v9));
if ( a2 > 0 )
{
v5 = a1;
do
v9... | func0:
ENDBR64
SUB RSP,0x3f8
MOV R10,RDI
MOV R9,RDX
MOV R8D,ECX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x3e8],RAX
XOR EAX,EAX
MOV RDI,RSP
MOV ECX,0x7d
STOSQ.REP RDI
TEST ESI,ESI
JLE 0x001011ba
MOV RAX,R10
LEA EDX,[RSI + -0x1]
LEA RCX,[R10 + RDX*0x4 + 0x4]
LAB_001011aa:
MOVSXD RDX,dword ptr [RAX]
MOV byte ptr ... | char func0(int *param_1,int param_2,int *param_3,int param_4)
{
int *piVar1;
long lVar2;
char cVar3;
char *pcVar4;
long in_FS_OFFSET;
char acStack_3f8 [1000];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
pcVar4 = acStack_3f8;
for (lVar2 = 0x7d; lVar2 != 0; lVar2 = lVar2 + -1) {
... |
6,718 | func0 |
#include <stdbool.h>
#include <assert.h>
| bool func0(int arr1[], int m, int arr2[], int n) {
bool hashset[1000] = {false};
for (int i = 0; i < m; i++) {
hashset[arr1[i]] = true;
}
for (int i = 0; i < n; i++) {
if (hashset[arr2[i]]) {
continue;
} else {
return false;
}
}
... | int main() {
int arr1[] = {11, 1, 13, 21, 3, 7};
int arr2[] = {11, 3, 7, 1};
assert(func0(arr1, 6, arr2, 4) == true);
int arr3[] = {1, 2, 3, 4, 5, 6};
int arr4[] = {1, 2, 4};
assert(func0(arr3, 6, arr4, 3) == true);
int arr5[] = {10, 5, 2, 23, 19};
int arr6[] = {19, 5, 3};
... | O2 | c | func0:
endbr64
sub $0x3f8,%rsp
mov %rdi,%r8
mov %ecx,%r9d
mov $0x7d,%ecx
mov %fs:0x28,%rax
mov %rax,0x3e8(%rsp)
xor %eax,%eax
mov %rsp,%rdi
rep stos %rax,%es:(%rdi)
test %esi,%esi
jle 11b0 <func0+0x50>
lea -0x1(%rsi),%eax
mov %r8,%rdi
lea 0x4(%r8,%rax,4),%rcx
xchg %ax,%ax
movslq ... | func0:
endbr64
sub rsp, 3F8h
mov r10, rdi
mov r8d, ecx
mov r9, rdx
mov rax, fs:28h
mov [rsp+3F8h+var_10], rax
xor eax, eax
mov rdi, rsp
mov ecx, 7Dh ; '}'
rep stosq
test esi, esi
jle short loc_1388
lea edx, [rsi-1]
mov rax, r10
lea rcx, [r10+rdx*4+4]
nop dword ... | long long func0(int *a1, int a2, int *a3, int a4)
{
int *v5; // rax
long long v6; // rdx
int *v7; // rax
long long v8; // rcx
unsigned int v9; // r8d
_BYTE v11[1000]; // [rsp+0h] [rbp-3F8h] BYREF
unsigned long long v12; // [rsp+3E8h] [rbp-10h]
v12 = __readfsqword(0x28u);
memset(v11, 0, sizeof(v11));... | func0:
ENDBR64
SUB RSP,0x3f8
MOV R10,RDI
MOV R8D,ECX
MOV R9,RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x3e8],RAX
XOR EAX,EAX
MOV RDI,RSP
MOV ECX,0x7d
STOSQ.REP RDI
TEST ESI,ESI
JLE 0x00101388
LEA EDX,[RSI + -0x1]
MOV RAX,R10
LEA RCX,[R10 + RDX*0x4 + 0x4]
NOP dword ptr [RAX]
LAB_00101378:
MOVSXD RDX,dword ptr... | char func0(int *param_1,int param_2,int *param_3,int param_4)
{
int *piVar1;
int iVar2;
long lVar3;
char *pcVar4;
char cVar5;
long in_FS_OFFSET;
char acStack_3f8 [1000];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
pcVar4 = acStack_3f8;
for (lVar3 = 0x7d; lVar3 != 0; lVar3 = lVar3... |
6,719 | func0 |
#include <stdbool.h>
#include <assert.h>
| bool func0(int arr1[], int m, int arr2[], int n) {
bool hashset[1000] = {false};
for (int i = 0; i < m; i++) {
hashset[arr1[i]] = true;
}
for (int i = 0; i < n; i++) {
if (hashset[arr2[i]]) {
continue;
} else {
return false;
}
}
... | int main() {
int arr1[] = {11, 1, 13, 21, 3, 7};
int arr2[] = {11, 3, 7, 1};
assert(func0(arr1, 6, arr2, 4) == true);
int arr3[] = {1, 2, 3, 4, 5, 6};
int arr4[] = {1, 2, 4};
assert(func0(arr3, 6, arr4, 3) == true);
int arr5[] = {10, 5, 2, 23, 19};
int arr6[] = {19, 5, 3};
... | O3 | c | func0:
endbr64
sub $0x3f8,%rsp
mov %rdi,%r8
mov %ecx,%r9d
mov $0x7d,%ecx
mov %fs:0x28,%rax
mov %rax,0x3e8(%rsp)
xor %eax,%eax
mov %rsp,%rdi
rep stos %rax,%es:(%rdi)
test %esi,%esi
jle 11b0 <func0+0x50>
lea -0x1(%rsi),%eax
mov %r8,%rdi
lea 0x4(%r8,%rax,4),%rcx
xchg %ax,%ax
movslq ... | func0:
endbr64
sub rsp, 3F8h
mov r10, rdi
movsxd r8, ecx
mov r9, rdx
mov rax, fs:28h
mov [rsp+3F8h+var_10], rax
xor eax, eax
mov rdi, rsp
mov ecx, 7Dh ; '}'
rep stosq
test esi, esi
jle short loc_1340
movsxd rsi, esi
mov rax, r10
lea rcx, [r10+rsi*4]
loc_1330:
movsxd rdx... | long long func0(int *a1, int a2, int *a3, int a4)
{
int *v5; // rax
long long v6; // rdx
int *v7; // rax
unsigned int v8; // edx
_BYTE v10[1000]; // [rsp+0h] [rbp-3F8h] BYREF
unsigned long long v11; // [rsp+3E8h] [rbp-10h]
v11 = __readfsqword(0x28u);
memset(v10, 0, sizeof(v10));
if ( a2 > 0 )
{
... | func0:
ENDBR64
SUB RSP,0x3f8
MOV R10,RDI
MOVSXD R8,ECX
MOV R9,RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x3e8],RAX
XOR EAX,EAX
MOV RDI,RSP
MOV ECX,0x7d
STOSQ.REP RDI
TEST ESI,ESI
JLE 0x00101340
MOVSXD RSI,ESI
MOV RAX,R10
LEA RCX,[R10 + RSI*0x4]
LAB_00101330:
MOVSXD RDX,dword ptr [RAX]
ADD RAX,0x4
MOV byte pt... | char func0(int *param_1,int param_2,int *param_3,int param_4)
{
int *piVar1;
int iVar2;
long lVar3;
char cVar4;
char *pcVar5;
long in_FS_OFFSET;
char acStack_3f8 [1000];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
pcVar5 = acStack_3f8;
for (lVar3 = 0x7d; lVar3 != 0; lVar3 = lVar3... |
6,720 | func0 |
#include <assert.h>
| int func0(int n) {
n += 1;
int powerOf2 = 2;
int cnt = n / 2;
while (powerOf2 <= n) {
int totalPairs = n / powerOf2;
cnt += (totalPairs / 2) * powerOf2;
if (totalPairs & 1) {
cnt += (n % powerOf2);
}
powerOf2 <<= 1;
}
return cnt;
}... | int main() {
assert(func0(16) == 33);
assert(func0(2) == 2);
assert(func0(14) == 28);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
addl $0x1,-0x14(%rbp)
movl $0x2,-0xc(%rbp)
mov -0x14(%rbp),%eax
mov %eax,%edx
shr $0x1f,%edx
add %edx,%eax
sar %eax
mov %eax,-0x8(%rbp)
jmp 11a6 <func0+0x5d>
mov -0x14(%rbp),%eax
cltd
idivl -0xc(%rbp)
mov %eax,-0x4(%rbp)... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
add [rbp+var_14], 1
mov [rbp+var_C], 2
mov eax, [rbp+var_14]
mov edx, eax
shr edx, 1Fh
add eax, edx
sar eax, 1
mov [rbp+var_8], eax
jmp short loc_11A6
loc_1170:
mov eax, [rbp+var_14]
cdq
idiv [rbp+var_C]
mov... | long long func0(int a1)
{
int v2; // [rsp+0h] [rbp-14h]
int v3; // [rsp+8h] [rbp-Ch]
unsigned int v4; // [rsp+Ch] [rbp-8h]
v2 = a1 + 1;
v3 = 2;
v4 = (a1 + 1) / 2;
while ( v3 <= v2 )
{
v4 += v3 * (v2 / v3 / 2);
if ( ((v2 / v3) & 1) != 0 )
v4 += v2 % v3;
v3 *= 2;
}
return v4;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
ADD dword ptr [RBP + -0x14],0x1
MOV dword ptr [RBP + -0xc],0x2
MOV EAX,dword ptr [RBP + -0x14]
MOV EDX,EAX
SHR EDX,0x1f
ADD EAX,EDX
SAR EAX,0x1
MOV dword ptr [RBP + -0x8],EAX
JMP 0x001011a6
LAB_00101170:
MOV EAX,dword ptr [RBP + -0x14]
CDQ
IDIV dword p... | int func0(int param_1)
{
int4 local_14;
int4 local_10;
param_1 = param_1 + 1;
local_10 = param_1 / 2;
for (local_14 = 2; local_14 <= param_1; local_14 = local_14 << 1) {
local_10 = local_10 + ((param_1 / local_14) / 2) * local_14;
if ((param_1 / local_14 & 1U) != 0) {
local_10 = local_10 + p... |
6,721 | func0 |
#include <assert.h>
| int func0(int n) {
n += 1;
int powerOf2 = 2;
int cnt = n / 2;
while (powerOf2 <= n) {
int totalPairs = n / powerOf2;
cnt += (totalPairs / 2) * powerOf2;
if (totalPairs & 1) {
cnt += (n % powerOf2);
}
powerOf2 <<= 1;
}
return cnt;
}... | int main() {
assert(func0(16) == 33);
assert(func0(2) == 2);
assert(func0(14) == 28);
return 0;
}
| O1 | c | func0:
endbr64
add $0x1,%edi
mov %edi,%esi
shr $0x1f,%esi
add %edi,%esi
sar %esi
cmp $0x1,%edi
jle 118b <func0+0x42>
mov $0x2,%ecx
jmp 116b <func0+0x22>
add %ecx,%ecx
cmp %ecx,%edi
jl 118b <func0+0x42>
mov %edi,%eax
cltd
idiv %ecx
mov %eax,%edx
shr $0x1f,%edx
add %eax,... | func0:
endbr64
add edi, 1
mov esi, edi
shr esi, 1Fh
add esi, edi
sar esi, 1
cmp edi, 1
jle short loc_118B
mov ecx, 2
jmp short loc_116B
loc_1165:
add ecx, ecx
cmp edi, ecx
jl short loc_118B
loc_116B:
mov eax, edi
cdq
idiv ecx
mov edx, eax
shr edx, 1Fh
add ... | long long func0(int a1)
{
int v1; // edi
unsigned int v2; // esi
int i; // ecx
v1 = a1 + 1;
v2 = v1 / 2;
if ( v1 > 1 )
{
for ( i = 2; i <= v1; i *= 2 )
{
v2 += i * (v1 / i / 2);
if ( ((v1 / i) & 1) != 0 )
v2 += v1 % i;
}
}
return v2;
} | func0:
ENDBR64
ADD EDI,0x1
MOV ESI,EDI
SHR ESI,0x1f
ADD ESI,EDI
SAR ESI,0x1
CMP EDI,0x1
JLE 0x0010118b
MOV ECX,0x2
JMP 0x0010116b
LAB_00101165:
ADD ECX,ECX
CMP EDI,ECX
JL 0x0010118b
LAB_0010116b:
MOV EAX,EDI
CDQ
IDIV ECX
MOV EDX,EAX
SHR EDX,0x1f
ADD EDX,EAX
SAR EDX,0x1
IMUL EDX,ECX
ADD ESI,EDX
TEST AL,0x1
JZ 0x00101165... | int func0(int param_1)
{
ulong uVar1;
int iVar2;
int iVar3;
param_1 = param_1 + 1;
iVar3 = param_1 / 2;
if (1 < param_1) {
iVar2 = 2;
do {
uVar1 = (long)param_1 / (long)iVar2;
iVar3 = iVar3 + ((int)(((uint)(uVar1 >> 0x1f) & 1) + (int)uVar1) >> 1) * iVar2;
if ((uVar1 & 1) != 0) ... |
6,722 | func0 |
#include <assert.h>
| int func0(int n) {
n += 1;
int powerOf2 = 2;
int cnt = n / 2;
while (powerOf2 <= n) {
int totalPairs = n / powerOf2;
cnt += (totalPairs / 2) * powerOf2;
if (totalPairs & 1) {
cnt += (n % powerOf2);
}
powerOf2 <<= 1;
}
return cnt;
}... | int main() {
assert(func0(16) == 33);
assert(func0(2) == 2);
assert(func0(14) == 28);
return 0;
}
| O2 | c | func0:
endbr64
add $0x1,%edi
mov %edi,%r8d
shr $0x1f,%r8d
add %edi,%r8d
sar %r8d
cmp $0x1,%edi
jle 1263 <func0+0x43>
mov $0x2,%esi
xchg %ax,%ax
mov %edi,%eax
cltd
idiv %esi
mov %eax,%ecx
shr $0x1f,%ecx
add %eax,%ecx
sar %ecx
imul %esi,%ecx
add %ecx,%r8d
add %r8d,%edx
t... | func0:
endbr64
add edi, 1
mov r8d, edi
shr r8d, 1Fh
add r8d, edi
sar r8d, 1
cmp edi, 1
jle short loc_1233
mov esi, 2
xchg ax, ax
loc_1210:
mov eax, edi
cdq
idiv esi
mov ecx, eax
shr ecx, 1Fh
add ecx, eax
sar ecx, 1
imul ecx, esi
add r8d, ecx
add edx, ... | long long func0(int a1)
{
int v1; // edi
unsigned int v2; // r8d
int i; // esi
v1 = a1 + 1;
v2 = v1 / 2;
if ( v1 > 1 )
{
for ( i = 2; i <= v1; i *= 2 )
{
v2 += i * (v1 / i / 2);
if ( ((v1 / i) & 1) != 0 )
v2 += v1 % i;
}
}
return v2;
} | func0:
ENDBR64
ADD EDI,0x1
MOV R8D,EDI
SHR R8D,0x1f
ADD R8D,EDI
SAR R8D,0x1
CMP EDI,0x1
JLE 0x00101233
MOV ESI,0x2
NOP
LAB_00101210:
MOV EAX,EDI
CDQ
IDIV ESI
MOV ECX,EAX
SHR ECX,0x1f
ADD ECX,EAX
SAR ECX,0x1
IMUL ECX,ESI
ADD R8D,ECX
ADD EDX,R8D
TEST AL,0x1
CMOVNZ R8D,EDX
ADD ESI,ESI
CMP EDI,ESI
JGE 0x00101210
LAB_001012... | int func0(int param_1)
{
ulong uVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
param_1 = param_1 + 1;
iVar5 = param_1 / 2;
if (1 < param_1) {
iVar4 = 2;
do {
uVar1 = (long)param_1 / (long)iVar4;
iVar5 = iVar5 + ((int)(((uint)(uVar1 >> 0x1f) & 1) + (int)uVar1) >> 1) * iVar4;
... |
6,723 | func0 |
#include <assert.h>
| int func0(int n) {
n += 1;
int powerOf2 = 2;
int cnt = n / 2;
while (powerOf2 <= n) {
int totalPairs = n / powerOf2;
cnt += (totalPairs / 2) * powerOf2;
if (totalPairs & 1) {
cnt += (n % powerOf2);
}
powerOf2 <<= 1;
}
return cnt;
}... | int main() {
assert(func0(16) == 33);
assert(func0(2) == 2);
assert(func0(14) == 28);
return 0;
}
| O3 | c | func0:
endbr64
add $0x1,%edi
mov %edi,%r8d
shr $0x1f,%r8d
add %edi,%r8d
sar %r8d
cmp $0x1,%edi
jle 1183 <func0+0x43>
mov $0x2,%esi
xchg %ax,%ax
mov %edi,%eax
cltd
idiv %esi
mov %eax,%ecx
shr $0x1f,%ecx
add %eax,%ecx
sar %ecx
imul %esi,%ecx
add %ecx,%r8d
add %r8d,%edx
t... | func0:
endbr64
add edi, 1
mov r8d, edi
shr r8d, 1Fh
add r8d, edi
sar r8d, 1
cmp edi, 1
jle short loc_1183
mov esi, 2
xchg ax, ax
loc_1160:
mov eax, edi
cdq
idiv esi
mov ecx, eax
shr ecx, 1Fh
add ecx, eax
sar ecx, 1
imul ecx, esi
add r8d, ecx
add edx, ... | long long func0(int a1)
{
int v1; // edi
unsigned int v2; // r8d
int i; // esi
v1 = a1 + 1;
v2 = v1 / 2;
if ( v1 > 1 )
{
for ( i = 2; i <= v1; i *= 2 )
{
v2 += i * (v1 / i / 2);
if ( ((v1 / i) & 1) != 0 )
v2 += v1 % i;
}
}
return v2;
} | func0:
ENDBR64
ADD EDI,0x1
MOV R8D,EDI
SHR R8D,0x1f
ADD R8D,EDI
SAR R8D,0x1
CMP EDI,0x1
JLE 0x00101183
MOV ESI,0x2
NOP
LAB_00101160:
MOV EAX,EDI
CDQ
IDIV ESI
MOV ECX,EAX
SHR ECX,0x1f
ADD ECX,EAX
SAR ECX,0x1
IMUL ECX,ESI
ADD R8D,ECX
ADD EDX,R8D
TEST AL,0x1
CMOVNZ R8D,EDX
ADD ESI,ESI
CMP EDI,ESI
JGE 0x00101160
LAB_001011... | int func0(int param_1)
{
ulong uVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
param_1 = param_1 + 1;
iVar5 = param_1 / 2;
if (1 < param_1) {
iVar4 = 2;
do {
uVar1 = (long)param_1 / (long)iVar4;
iVar5 = iVar5 + ((int)(((uint)(uVar1 >> 0x1f) & 1) + (int)uVar1) >> 1) * iVar4;
... |
6,724 | func0 |
#include <assert.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
| char** func0(const char* string){
int count = 1;
for(int i = 0; string[i] != '\0'; i++) {
if(string[i] == ' ') count++;
}
char** list = malloc(count * sizeof(char*));
int start = 0, idx = 0;
for(int i = 0; string[i] != '\0'; i++) {
if(string[i] == ' ') {
int ... | int main(){
char** res1 = func0("python program");
assert(strcmp(res1[0], "python") == 0);
assert(strcmp(res1[1], "program") == 0);
char** res2 = func0("Data Analysis");
assert(strcmp(res2[0], "Data") == 0);
assert(strcmp(res2[1], "Analysis") == 0);
char** res3 = func0("Ha... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x48,%rsp
mov %rdi,-0x48(%rbp)
movl $0x1,-0x34(%rbp)
movl $0x0,-0x30(%rbp)
jmp 1226 <func0+0x3d>
mov -0x30(%rbp),%eax
movslq %eax,%rdx
mov -0x48(%rbp),%rax
add %rdx,%rax
movzbl (%rax),%eax
cmp $0x20,%al
jne 1222 <func0+0x39>
addl ... | func0:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 48h
mov [rbp+s], rdi
mov [rbp+var_34], 1
mov [rbp+var_30], 0
jmp short loc_1226
loc_120A:
mov eax, [rbp+var_30]
movsxd rdx, eax
mov rax, [rbp+s]
add rax, rdx
movzx eax, byte ptr [rax]
cmp al, 20h ; ' '
jnz short ... | _QWORD * func0(const char *a1)
{
int v2; // [rsp+1Ch] [rbp-34h]
int i; // [rsp+20h] [rbp-30h]
int v4; // [rsp+24h] [rbp-2Ch]
int v5; // [rsp+28h] [rbp-28h]
int j; // [rsp+2Ch] [rbp-24h]
int v7; // [rsp+30h] [rbp-20h]
_QWORD *v8; // [rsp+38h] [rbp-18h]
v2 = 1;
for ( i = 0; a1[i]; ++i )
{
if ( a1... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x48],RDI
MOV dword ptr [RBP + -0x34],0x1
MOV dword ptr [RBP + -0x30],0x0
JMP 0x00101226
LAB_0010120a:
MOV EAX,dword ptr [RBP + -0x30]
MOVSXD RDX,EAX
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,RDX
MOVZX EAX,byte ptr [RAX]
CMP AL,0x20
JNZ 0x001... | void * func0(char *param_1)
{
void *pvVar1;
size_t sVar2;
void *pvVar3;
int iVar4;
int local_3c;
int local_38;
int local_34;
int local_30;
int local_2c;
local_3c = 1;
for (local_38 = 0; param_1[local_38] != '\0'; local_38 = local_38 + 1) {
if (param_1[local_38] == ' ') {
local_3c = l... |
6,725 | func0 |
#include <assert.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
| char** func0(const char* string){
int count = 1;
for(int i = 0; string[i] != '\0'; i++) {
if(string[i] == ' ') count++;
}
char** list = malloc(count * sizeof(char*));
int start = 0, idx = 0;
for(int i = 0; string[i] != '\0'; i++) {
if(string[i] == ' ') {
int ... | int main(){
char** res1 = func0("python program");
assert(strcmp(res1[0], "python") == 0);
assert(strcmp(res1[1], "program") == 0);
char** res2 = func0("Data Analysis");
assert(strcmp(res2[0], "Data") == 0);
assert(strcmp(res2[1], "Analysis") == 0);
char** res3 = func0("Ha... | O1 | c | func0:
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %rdi,%r12
movzbl (%rdi),%r13d
test %r13b,%r13b
je 1267 <func0+0xbe>
lea 0x1(%rdi),%rdx
mov %r13d,%eax
mov $0x1,%edi
cmp $0x20,%al
sete %al
movzbl %al,%eax
add %eax,%edi
add $0x1,%rdx... | func0:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 18h
mov r12, rdi
movzx r13d, byte ptr [rdi]
test r13b, r13b
jz loc_12A8
lea rdx, [rdi+1]
mov eax, r13d
mov edi, 1
loc_1217:
cmp al, 20h ; ' '
setz al
movzx eax, al
add edi, eax
add ... | long long func0(char *a1)
{
char v2; // r13
char *v3; // rdx
char v4; // al
int v5; // edi
long long v6; // r15
long long v7; // rbx
int v8; // r14d
int v9; // ebp
long long v10; // r13
int v11; // ebx
long long v12; // rbp
int v14; // [rsp+Ch] [rbp-3Ch]
v2 = *a1;
if ( *a1 )
{
v3 = a... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV R12,RDI
MOVZX R13D,byte ptr [RDI]
TEST R13B,R13B
JZ 0x001012a8
LEA RDX,[RDI + 0x1]
MOV EAX,R13D
MOV EDI,0x1
LAB_00101217:
CMP AL,0x20
SETZ AL
MOVZX EAX,AL
ADD EDI,EAX
ADD RDX,0x1
MOVZX EAX,byte ptr [RDX + -0x1]
TEST AL,AL
JNZ 0x001012... | void * func0(char *param_1)
{
char cVar1;
void *pvVar2;
char *pcVar3;
size_t sVar4;
long lVar5;
int iVar6;
int iVar7;
char cVar8;
int local_3c;
cVar8 = *param_1;
if (cVar8 == '\0') {
pvVar2 = malloc(8);
iVar7 = 0;
local_3c = 0;
}
else {
iVar7 = 1;
pcVar3 = param_1 + 1;
... |
6,726 | func0 |
#include <assert.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
| char** func0(const char* string){
int count = 1;
for(int i = 0; string[i] != '\0'; i++) {
if(string[i] == ' ') count++;
}
char** list = malloc(count * sizeof(char*));
int start = 0, idx = 0;
for(int i = 0; string[i] != '\0'; i++) {
if(string[i] == ' ') {
int ... | int main(){
char** res1 = func0("python program");
assert(strcmp(res1[0], "python") == 0);
assert(strcmp(res1[1], "program") == 0);
char** res2 = func0("Data Analysis");
assert(strcmp(res2[0], "Data") == 0);
assert(strcmp(res2[1], "Analysis") == 0);
char** res3 = func0("Ha... | O2 | c | func0:
endbr64
push %r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x28,%rsp
movzbl (%rdi),%r13d
test %r13b,%r13b
je 1510 <func0+0x140>
lea 0x1(%rdi),%rdx
mov %r13d,%eax
mov $0x1,%edi
xchg %ax,%ax
cmp $0x20,%al
sete %al
add $0x1,%rdx
movzbl %al,%eax
... | func0:
endbr64
push r15
push r14
push r13
push r12
mov r12, rdi
push rbp
push rbx
sub rsp, 8
movzx ebp, byte ptr [rdi]
test bpl, bpl
jz loc_14F0
lea rdx, [rdi+1]
mov eax, ebp
mov edi, 1
nop dword ptr [rax+00h]
loc_1400:
cmp al, 20h ; ' '
setz al
add rdx, 1
... | long long func0(_BYTE *a1)
{
char v2; // bp
_BYTE *v3; // rdx
char v4; // al
int v5; // edi
long long v6; // rbx
int v7; // r13d
int v8; // r15d
long long v9; // r14
long long v10; // rbp
long long v11; // rax
long long v12; // rsi
_QWORD *v13; // rbp
_BYTE *v14; // r13
int v15; // eax
lo... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
MOV R12,RDI
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOVZX EBP,byte ptr [RDI]
TEST BPL,BPL
JZ 0x001014f0
LEA RDX,[RDI + 0x1]
MOV EAX,EBP
MOV EDI,0x1
NOP dword ptr [RAX]
LAB_00101400:
CMP AL,0x20
SETZ AL
ADD RDX,0x1
MOVZX EAX,AL
ADD EDI,EAX
MOVZX EAX,byte ptr [RDX + -0x1]
TEST AL,... | int8 * func0(char *param_1)
{
int iVar1;
char cVar2;
int iVar3;
int8 *puVar4;
char *pcVar5;
size_t sVar6;
char *__dest;
int8 *puVar7;
long lVar8;
char cVar9;
int iVar10;
int iVar11;
cVar9 = *param_1;
if (cVar9 == '\0') {
iVar10 = 0;
puVar7 = (int8 *)malloc(8);
pcVar5 = param_... |
6,727 | func0 |
#include <assert.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
| char** func0(const char* string){
int count = 1;
for(int i = 0; string[i] != '\0'; i++) {
if(string[i] == ' ') count++;
}
char** list = malloc(count * sizeof(char*));
int start = 0, idx = 0;
for(int i = 0; string[i] != '\0'; i++) {
if(string[i] == ' ') {
int ... | int main(){
char** res1 = func0("python program");
assert(strcmp(res1[0], "python") == 0);
assert(strcmp(res1[1], "program") == 0);
char** res2 = func0("Data Analysis");
assert(strcmp(res2[0], "Data") == 0);
assert(strcmp(res2[1], "Analysis") == 0);
char** res3 = func0("Ha... | O3 | c | func0:
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
mov %rdi,%rbp
push %rbx
sub $0x28,%rsp
movzbl (%rdi),%r12d
test %r12b,%r12b
je 1548 <func0+0x178>
lea 0x1(%rdi),%rdx
mov %r12d,%eax
mov $0x1,%edi
xchg %ax,%ax
cmp $0x20,%al
sete %al
add $0x1,%rdx
movzbl %al,%eax
... | func0:
endbr64
push r15
push r14
push r13
push r12
mov r12, rdi
push rbp
push rbx
sub rsp, 18h
movzx ebp, byte ptr [rdi]
test bpl, bpl
jz loc_14F8
lea rdx, [rdi+1]
mov eax, ebp
mov edi, 1
nop dword ptr [rax+00h]
loc_13F0:
cmp al, 20h ; ' '
setz al
add rdx, ... | _QWORD * func0(char *s)
{
char v2; // bp
char *v3; // rdx
char v4; // al
int v5; // edi
long long v6; // rbx
int v7; // r13d
int v8; // r15d
_QWORD *v9; // r14
int v10; // ebx
_QWORD *v11; // r15
char *v12; // r13
int v13; // eax
long long v14; // rbp
size_t v15; // r12
void *v16; // rax
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
MOV R12,RDI
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOVZX EBP,byte ptr [RDI]
TEST BPL,BPL
JZ 0x001014f8
LEA RDX,[RDI + 0x1]
MOV EAX,EBP
MOV EDI,0x1
NOP dword ptr [RAX]
LAB_001013f0:
CMP AL,0x20
SETZ AL
ADD RDX,0x1
MOVZX EAX,AL
ADD EDI,EAX
MOVZX EAX,byte ptr [RDX + -0x1]
TEST AL... | int8 * func0(char *param_1)
{
char cVar1;
int8 *puVar2;
size_t sVar3;
void *pvVar4;
long lVar5;
long lVar6;
char *pcVar7;
char cVar8;
int iVar9;
int iVar10;
int iVar11;
int iVar12;
int8 *puVar13;
cVar8 = *param_1;
if (cVar8 == '\0') {
iVar10 = 0;
puVar2 = (int8 *)malloc(8);
... |
6,728 | func0 |
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <stdlib.h>
typedef struct {
int key;
int *values;
int size;
int capacity;
} MapEntry;
typedef struct {
MapEntry *entries;
int size;
int capacity;
} Map;
void init_map(Map *map) {
map->entries = ma... | char *func0(int arr[][2], int len) {
Map map;
init_map(&map);
for (int i = 0; i < len; i++) {
add_to_map(&map, arr[i][1], arr[i][0]);
}
char *result = malloc(1024);
strcpy(result, "{");
for (int i = 0; i < map.size; i++) {
char entry[32];
sprintf(entry... | int main() {
int test1[][2] = {{3, 4}, {1, 2}, {2, 4}, {8, 2}, {7, 2}, {8, 1}, {9, 1}, {8, 4}, {10, 4}};
int test2[][2] = {{4, 5}, {2, 3}, {3, 5}, {9, 3}, {8, 3}, {9, 2}, {10, 2}, {9, 5}, {11, 5}};
int test3[][2] = {{6, 5}, {3, 4}, {2, 6}, {11, 1}, {8, 22}, {8, 11}, {4, 3}, {14, 3}, {11, 6}};
... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x70,%rsp
mov %rdi,-0x68(%rbp)
mov %esi,-0x6c(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
lea -0x40(%rbp),%rax
mov %rax,%rdi
callq 1249 <init_map>
movl $0x0,-0x58(%rbp)
jmp 1664 <func0+0x76>
mov -0x58(%rbp),%eax
cltq
lea ... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_68], rdi
mov [rbp+var_6C], esi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
lea rax, [rbp+ptr]
mov rdi, rax
call init_map
mov [rbp+var_58], 0
jmp short loc_1663
loc_1624:
mov eax, [rbp+var_58]
cdqe
... | char * func0(long long a1, int a2)
{
int i; // [rsp+18h] [rbp-58h]
int j; // [rsp+1Ch] [rbp-54h]
int k; // [rsp+20h] [rbp-50h]
int v6; // [rsp+24h] [rbp-4Ch]
char *dest; // [rsp+28h] [rbp-48h]
void *ptr; // [rsp+30h] [rbp-40h] BYREF
int v9; // [rsp+38h] [rbp-38h]
char s[40]; // [rsp+40h] [rbp-30h] BYREF... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x68],RDI
MOV dword ptr [RBP + -0x6c],ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x40]
MOV RDI,RAX
CALL 0x00101249
MOV dword ptr [RBP + -0x58],0x0
JMP 0x00101663
LAB_00101624:
MOV EAX,dword ptr [RBP + ... | char * func0(long param_1,int param_2)
{
int iVar1;
char *__dest;
size_t sVar2;
long in_FS_OFFSET;
int local_60;
int local_5c;
int local_58;
void *local_48;
int local_40;
char local_38 [40];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
init_map(&local_48);
for (local_60 = 0;... |
6,729 | func0 |
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <stdlib.h>
typedef struct {
int key;
int *values;
int size;
int capacity;
} MapEntry;
typedef struct {
MapEntry *entries;
int size;
int capacity;
} Map;
void init_map(Map *map) {
map->entries = ma... | char *func0(int arr[][2], int len) {
Map map;
init_map(&map);
for (int i = 0; i < len; i++) {
add_to_map(&map, arr[i][1], arr[i][0]);
}
char *result = malloc(1024);
strcpy(result, "{");
for (int i = 0; i < map.size; i++) {
char entry[32];
sprintf(entry... | int main() {
int test1[][2] = {{3, 4}, {1, 2}, {2, 4}, {8, 2}, {7, 2}, {8, 1}, {9, 1}, {8, 4}, {10, 4}};
int test2[][2] = {{4, 5}, {2, 3}, {3, 5}, {9, 3}, {8, 3}, {9, 2}, {10, 2}, {9, 5}, {11, 5}};
int test3[][2] = {{6, 5}, {3, 4}, {2, 6}, {11, 1}, {8, 22}, {8, 11}, {4, 3}, {14, 3}, {11, 6}};
... | O1 | c | func0:
endbr64
push %r12
push %rbp
push %rbx
sub $0x40,%rsp
mov %rdi,%r12
mov %esi,%ebp
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
mov %rsp,%rdi
callq 1209 <init_map>
test %ebp,%ebp
jle 13dd <func0+0x51>
mov %r12,%rbx
lea -0x1(%rbp),%eax
lea 0x8(%r12,%rax,8),%r12
mov ... | func0:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov r12, rdi
mov ebp, esi
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
mov rdi, rsp
call init_map
test ebp, ebp
jle short loc_1421
mov rbx, r12
lea eax, [rbp-1]
lea... | _WORD * func0(unsigned int *a1, int a2)
{
unsigned int *v2; // rbx
_WORD *v3; // r14
long long v4; // r13
long long v5; // rbx
long long v6; // rbp
int v7; // eax
long long v8; // rbx
int v10; // eax
long long v11; // [rsp+0h] [rbp-78h] BYREF
int v12; // [rsp+8h] [rbp-70h]
_BYTE v13[40]; // [rsp+1... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV R12,RDI
MOV EBP,ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
MOV RDI,RSP
CALL 0x00101249
TEST EBP,EBP
JLE 0x00101421
MOV RBX,R12
LEA EAX,[RBP + -0x1]
LEA R12,[R12 + RAX*0x8 + 0x8]
MOV RBP,RSP
LAB_0010140b... | char * func0(int4 *param_1,int param_2)
{
int4 *puVar1;
void *pvVar2;
char *__s;
size_t sVar3;
long lVar4;
long in_FS_OFFSET;
void *local_78;
uint local_70;
int1 local_68 [40];
long local_40;
local_40 = *(long *)(in_FS_OFFSET + 0x28);
init_map(&local_78);
if (0 < param_2) {
puVar1 = pa... |
6,730 | func0 |
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <stdlib.h>
typedef struct {
int key;
int *values;
int size;
int capacity;
} MapEntry;
typedef struct {
MapEntry *entries;
int size;
int capacity;
} Map;
void init_map(Map *map) {
map->entries = ma... | char *func0(int arr[][2], int len) {
Map map;
init_map(&map);
for (int i = 0; i < len; i++) {
add_to_map(&map, arr[i][1], arr[i][0]);
}
char *result = malloc(1024);
strcpy(result, "{");
for (int i = 0; i < map.size; i++) {
char entry[32];
sprintf(entry... | int main() {
int test1[][2] = {{3, 4}, {1, 2}, {2, 4}, {8, 2}, {7, 2}, {8, 1}, {9, 1}, {8, 4}, {10, 4}};
int test2[][2] = {{4, 5}, {2, 3}, {3, 5}, {9, 3}, {8, 3}, {9, 2}, {10, 2}, {9, 5}, {11, 5}};
int test3[][2] = {{6, 5}, {3, 4}, {2, 6}, {11, 1}, {8, 22}, {8, 11}, {4, 3}, {14, 3}, {11, 6}};
... | O2 | c | func0:
endbr64
push %r14
push %r13
push %r12
push %rbp
mov %esi,%ebp
push %rbx
mov %rdi,%rbx
mov $0xf0,%edi
sub $0x40,%rsp
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
callq 10f0 <malloc@plt>
mov %rax,(%rsp)
mov %rax,%r14
movabs $0xa00000000,%rax
mov %rax,0x8(%rsp)
test ... | func0:
endbr64
push r15
push r14
push r13
push r12
mov r12d, esi
push rbp
push rbx
mov rbx, rdi
mov edi, 0F0h
sub rsp, 58h
mov rax, fs:28h
mov [rsp+88h+var_40], rax
xor eax, eax
call _malloc
mov [rsp+88h+var_78], rax
mov rbp, rax
mov rax, 0A00000000h
mov ... | _WORD * func0(unsigned int *a1, int a2)
{
unsigned int *v2; // rbx
long long v3; // rbp
long long v4; // r12
long long v5; // rsi
long long v6; // rdx
int v7; // ebx
_WORD *v8; // rax
_WORD *v9; // r12
int *v10; // r15
int v11; // r9d
int v12; // r8d
long long v13; // rax
int v14; // eax
lon... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
MOV R12D,ESI
PUSH RBP
PUSH RBX
MOV RBX,RDI
MOV EDI,0xf0
SUB RSP,0x58
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
CALL 0x00101130
MOV qword ptr [RSP + 0x10],RAX
MOV RBP,RAX
MOV RAX,0xa00000000
MOV qword ptr [RSP + 0x18],RAX
TEST R12D,R12D
JLE ... | char * func0(int4 *param_1,int param_2)
{
int4 *puVar1;
int4 uVar2;
void *__ptr;
int iVar3;
int4 *puVar4;
char *__s;
ulong uVar5;
size_t sVar6;
long lVar7;
int8 *puVar8;
int4 *puVar9;
long in_FS_OFFSET;
int4 *local_78;
int8 local_70;
int1 local_68 [40];
long local_40;
local_40 = *(... |
6,731 | func0 |
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <stdlib.h>
typedef struct {
int key;
int *values;
int size;
int capacity;
} MapEntry;
typedef struct {
MapEntry *entries;
int size;
int capacity;
} Map;
void init_map(Map *map) {
map->entries = ma... | char *func0(int arr[][2], int len) {
Map map;
init_map(&map);
for (int i = 0; i < len; i++) {
add_to_map(&map, arr[i][1], arr[i][0]);
}
char *result = malloc(1024);
strcpy(result, "{");
for (int i = 0; i < map.size; i++) {
char entry[32];
sprintf(entry... | int main() {
int test1[][2] = {{3, 4}, {1, 2}, {2, 4}, {8, 2}, {7, 2}, {8, 1}, {9, 1}, {8, 4}, {10, 4}};
int test2[][2] = {{4, 5}, {2, 3}, {3, 5}, {9, 3}, {8, 3}, {9, 2}, {10, 2}, {9, 5}, {11, 5}};
int test3[][2] = {{6, 5}, {3, 4}, {2, 6}, {11, 1}, {8, 22}, {8, 11}, {4, 3}, {14, 3}, {11, 6}};
... | O3 | c | func0:
endbr64
push %r14
push %r13
push %r12
push %rbp
mov %esi,%ebp
push %rbx
mov %rdi,%rbx
mov $0xf0,%edi
sub $0x40,%rsp
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
callq 10f0 <malloc@plt>
mov %rax,(%rsp)
mov %rax,%r14
movabs $0xa00000000,%rax
mov %rax,0x8(%rsp)
test ... | func0:
endbr64
push r15
push r14
push r13
push r12
push rbp
movsxd rbp, esi
push rbx
mov rbx, rdi
mov edi, 0F0h; size
sub rsp, 58h
mov rax, fs:28h
mov [rsp+88h+var_40], rax
xor eax, eax
call _malloc
mov [rsp+88h+ptr], rax
mov r15, rax
mov rax, cs:qword_2150
mov ... | char * func0(unsigned int *a1, int a2)
{
unsigned int *v2; // rbx
char *v3; // r15
unsigned int *v4; // r12
long long v5; // rdx
long long v6; // rsi
long long v7; // rbp
char *v8; // rax
char *v9; // rbx
char *v10; // r12
int v11; // r9d
int v12; // r8d
size_t v13; // rax
int v14; // eax
vo... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOVSXD RBP,ESI
PUSH RBX
MOV RBX,RDI
MOV EDI,0xf0
SUB RSP,0x58
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
CALL 0x00101130
MOV qword ptr [RSP + 0x10],RAX
MOV R15,RAX
MOV RAX,qword ptr [0x00102150]
MOV qword ptr [RSP + 0x18],RAX
TEST E... | char * func0(int4 *param_1,int param_2)
{
int4 *puVar1;
int4 uVar2;
void *__ptr;
int iVar3;
int4 *puVar4;
char *__s;
size_t sVar5;
long lVar6;
int8 *puVar7;
int4 *puVar8;
int8 *puVar9;
long in_FS_OFFSET;
int4 *local_78;
int8 local_70;
int local_68 [40];
long local_40;
local_40 = *(... |
6,732 | func0 |
#include <assert.h>
typedef struct tuple {
int first;
int last;
} tuple;
| tuple func0(int arr[], int n) {
tuple res;
res.first = arr[0];
res.last = arr[n - 1];
return res;
}
| int main() {
int arr1[] = {10, 4, 5, 6, 7};
tuple result1 = func0(arr1, 5);
assert(result1.first == 10 && result1.last == 7);
int arr2[] = {1, 2, 3, 4, 5};
tuple result2 = func0(arr2, 5);
assert(result2.first == 1 && result2.last == 5);
int arr3[] = {6, 7, 8, 9, 10};
tupl... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
mov -0x18(%rbp),%rax
mov (%rax),%eax
mov %eax,-0x8(%rbp)
mov -0x1c(%rbp),%eax
cltq
shl $0x2,%rax
lea -0x4(%rax),%rdx
mov -0x18(%rbp),%rax
add %rdx,%rax
mov (%rax),%eax
mov %eax,-0x4(%rbp)
mov -0x... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov rax, [rbp+var_18]
mov eax, [rax]
mov dword ptr [rbp+var_8], eax
mov eax, [rbp+var_1C]
cdqe
shl rax, 2
lea rdx, [rax-4]
mov rax, [rbp+var_18]
add rax, rdx
mov eax, [rax]
mov dword p... | long long func0(_DWORD *a1, int a2)
{
long long v3; // [rsp+14h] [rbp-8h]
LODWORD(v3) = *a1;
HIDWORD(v3) = a1[a2 - 1];
return v3;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
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 EAX,dword ptr [RBP + -0x1c]
CDQE
SHL RAX,0x2
LEA RDX,[RAX + -0x4]
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,RDX
MOV EAX,dword ptr [... | int8 func0(int4 *param_1,int param_2)
{
return CONCAT44(param_1[(long)param_2 + -1],*param_1);
} |
6,733 | func0 |
#include <assert.h>
typedef struct tuple {
int first;
int last;
} tuple;
| tuple func0(int arr[], int n) {
tuple res;
res.first = arr[0];
res.last = arr[n - 1];
return res;
}
| int main() {
int arr1[] = {10, 4, 5, 6, 7};
tuple result1 = func0(arr1, 5);
assert(result1.first == 10 && result1.last == 7);
int arr2[] = {1, 2, 3, 4, 5};
tuple result2 = func0(arr2, 5);
assert(result2.first == 1 && result2.last == 5);
int arr3[] = {6, 7, 8, 9, 10};
tupl... | O1 | c | func0:
endbr64
movslq %esi,%rsi
mov -0x4(%rdi,%rsi,4),%eax
shl $0x20,%rax
mov %rax,%rdx
mov (%rdi),%eax
or %rdx,%rax
retq
| func0:
endbr64
movsxd rsi, esi
mov edx, [rdi+rsi*4-4]
shl rdx, 20h
mov eax, [rdi]
or rax, rdx
retn | unsigned long long func0(unsigned int *a1, int a2)
{
return ((unsigned long long)a1[a2 - 1] << 32) | *a1;
} | func0:
ENDBR64
MOVSXD RSI,ESI
MOV EDX,dword ptr [RDI + RSI*0x4 + -0x4]
SHL RDX,0x20
MOV EAX,dword ptr [RDI]
OR RAX,RDX
RET | int8 func0(int4 *param_1,int param_2)
{
return CONCAT44(param_1[(long)param_2 + -1],*param_1);
} |
6,734 | func0 |
#include <assert.h>
typedef struct tuple {
int first;
int last;
} tuple;
| tuple func0(int arr[], int n) {
tuple res;
res.first = arr[0];
res.last = arr[n - 1];
return res;
}
| int main() {
int arr1[] = {10, 4, 5, 6, 7};
tuple result1 = func0(arr1, 5);
assert(result1.first == 10 && result1.last == 7);
int arr2[] = {1, 2, 3, 4, 5};
tuple result2 = func0(arr2, 5);
assert(result2.first == 1 && result2.last == 5);
int arr3[] = {6, 7, 8, 9, 10};
tupl... | O2 | c | func0:
endbr64
movslq %esi,%rsi
mov -0x4(%rdi,%rsi,4),%eax
shl $0x20,%rax
mov %rax,%rdx
mov (%rdi),%eax
or %rdx,%rax
retq
nopl 0x0(%rax,%rax,1)
| func0:
endbr64
movsxd rsi, esi
mov eax, [rdi]
mov edx, [rdi+rsi*4-4]
shl rdx, 20h
or rax, rdx
retn | unsigned long long func0(unsigned int *a1, int a2)
{
return ((unsigned long long)a1[a2 - 1] << 32) | *a1;
} | func0:
ENDBR64
MOVSXD RSI,ESI
MOV EAX,dword ptr [RDI]
MOV EDX,dword ptr [RDI + RSI*0x4 + -0x4]
SHL RDX,0x20
OR RAX,RDX
RET | int8 func0(int4 *param_1,int param_2)
{
return CONCAT44(param_1[(long)param_2 + -1],*param_1);
} |
6,735 | func0 |
#include <assert.h>
typedef struct tuple {
int first;
int last;
} tuple;
| tuple func0(int arr[], int n) {
tuple res;
res.first = arr[0];
res.last = arr[n - 1];
return res;
}
| int main() {
int arr1[] = {10, 4, 5, 6, 7};
tuple result1 = func0(arr1, 5);
assert(result1.first == 10 && result1.last == 7);
int arr2[] = {1, 2, 3, 4, 5};
tuple result2 = func0(arr2, 5);
assert(result2.first == 1 && result2.last == 5);
int arr3[] = {6, 7, 8, 9, 10};
tupl... | O3 | c | func0:
endbr64
movslq %esi,%rsi
mov -0x4(%rdi,%rsi,4),%eax
shl $0x20,%rax
mov %rax,%rdx
mov (%rdi),%eax
or %rdx,%rax
retq
nopl 0x0(%rax,%rax,1)
| func0:
endbr64
movsxd rsi, esi
movd xmm1, dword ptr [rdi]
movd xmm0, dword ptr [rdi+rsi*4-4]
punpckldq xmm1, xmm0
movq rax, xmm1
retn | unsigned long long func0(unsigned int *a1, int a2)
{
return _mm_unpacklo_epi32(_mm_cvtsi32_si128(*a1), _mm_cvtsi32_si128(a1[a2 - 1])).m128i_u64[0];
} | func0:
ENDBR64
MOVSXD RSI,ESI
MOVD XMM1,dword ptr [RDI]
MOVD XMM0,dword ptr [RDI + RSI*0x4 + -0x4]
PUNPCKLDQ XMM1,XMM0
MOVQ RAX,XMM1
RET | int8 func0(int4 *param_1,int param_2)
{
return CONCAT44(param_1[(long)param_2 + -1],*param_1);
} |
6,736 | func0 |
#include <stdbool.h>
#include <assert.h>
| bool func0(int n) {
if (n < 10) {
return false;
}
int prodOdd = 1, prodEven = 1;
while (n > 0) {
int digit = n % 10;
prodOdd *= digit;
n = n / 10;
if (n == 0) {
break;
}
digit = n % 10;
prodEven *= digit;
n... | int main() {
assert(func0(2841) == true);
assert(func0(1234) == false);
assert(func0(1212) == false);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
cmpl $0x9,-0x14(%rbp)
jg 1164 <func0+0x1b>
mov $0x0,%eax
jmpq 1248 <func0+0xff>
movl $0x1,-0xc(%rbp)
movl $0x1,-0x8(%rbp)
jmpq 1227 <func0+0xde>
mov -0x14(%rbp),%edx
movslq %edx,%rax
imul $0x66666667,%rax,%rax
shr $0x20,%rax
mo... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
cmp [rbp+var_14], 9
jg short loc_1164
mov eax, 0
jmp loc_1244
loc_1164:
mov [rbp+var_C], 1
mov [rbp+var_8], 1
jmp loc_1223
loc_1177:
mov edx, [rbp+var_14]
movsxd rax, edx
imul rax, 66666667h
shr rax, 20h
mov ... | _BOOL8 func0(int a1)
{
int v2; // [rsp+0h] [rbp-14h]
int v3; // [rsp+0h] [rbp-14h]
int v4; // [rsp+8h] [rbp-Ch]
int v5; // [rsp+Ch] [rbp-8h]
v2 = a1;
if ( a1 <= 9 )
return 0LL;
v4 = 1;
v5 = 1;
while ( v2 > 0 )
{
v4 *= v2 % 10;
v3 = v2 / 10;
if ( !v3 )
break;
v5 *= v3 % 10... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
CMP dword ptr [RBP + -0x14],0x9
JG 0x00101164
MOV EAX,0x0
JMP 0x00101244
LAB_00101164:
MOV dword ptr [RBP + -0xc],0x1
MOV dword ptr [RBP + -0x8],0x1
JMP 0x00101223
LAB_00101177:
MOV EDX,dword ptr [RBP + -0x14]
MOVSXD RAX,EDX
IMUL RAX,RAX,0x66666667
SHR... | int8 func0(int param_1)
{
int8 uVar1;
int4 local_1c;
int4 local_14;
int4 local_10;
if (param_1 < 10) {
uVar1 = 0;
}
else {
local_14 = 1;
local_10 = 1;
for (local_1c = param_1; 0 < local_1c; local_1c = local_1c / 10) {
local_14 = local_14 * (local_1c % 10);
local_1c = local_... |
6,737 | func0 |
#include <stdbool.h>
#include <assert.h>
| bool func0(int n) {
if (n < 10) {
return false;
}
int prodOdd = 1, prodEven = 1;
while (n > 0) {
int digit = n % 10;
prodOdd *= digit;
n = n / 10;
if (n == 0) {
break;
}
digit = n % 10;
prodEven *= digit;
n... | int main() {
assert(func0(2841) == true);
assert(func0(1234) == false);
assert(func0(1212) == false);
return 0;
}
| O1 | c | func0:
endbr64
mov $0x0,%eax
cmp $0x9,%edi
jle 11cf <func0+0x86>
movslq %edi,%rsi
imul $0x66666667,%rsi,%rsi
sar $0x22,%rsi
mov %edi,%eax
sar $0x1f,%eax
sub %eax,%esi
mov %esi,%ecx
lea (%rsi,%rsi,4),%eax
add %eax,%eax
mov %edi,%esi
sub %eax,%esi
mov $0x1,%edi
movslq %ecx,%rax
im... | func0:
endbr64
mov eax, 0
cmp edi, 9
jle short locret_11CF
movsxd rsi, edi
imul rsi, 66666667h
sar rsi, 22h
mov eax, edi
sar eax, 1Fh
sub esi, eax
mov ecx, esi
lea eax, [rsi+rsi*4]
add eax, eax
mov esi, edi
sub esi, eax
mov edi, 1
loc_117C:
movsxd rax, ecx
imul ... | bool func0(int a1)
{
bool result; // al
int v2; // ecx
int v3; // esi
int v4; // edi
int v5; // eax
result = 0;
if ( a1 > 9 )
{
v2 = a1 / 10;
v3 = a1 % 10;
v4 = 1;
do
{
v5 = v2 / 10;
v4 *= v2 % 10;
if ( v2 <= 9 )
break;
v3 *= v5 % 10;
v2 = v5 /... | func0:
ENDBR64
MOV EAX,0x0
CMP EDI,0x9
JLE 0x001011cf
MOVSXD RSI,EDI
IMUL RSI,RSI,0x66666667
SAR RSI,0x22
MOV EAX,EDI
SAR EAX,0x1f
SUB ESI,EAX
MOV ECX,ESI
LEA EAX,[RSI + RSI*0x4]
ADD EAX,EAX
MOV ESI,EDI
SUB ESI,EAX
MOV EDI,0x1
LAB_0010117c:
MOVSXD RAX,ECX
IMUL RAX,RAX,0x66666667
SAR RAX,0x22
MOV EDX,ECX
SAR EDX,0x1f
SU... | int4 func0(int param_1)
{
int iVar1;
int4 uVar2;
int iVar3;
int iVar4;
uVar2 = 0;
if (9 < param_1) {
iVar3 = param_1 / 10;
param_1 = param_1 % 10;
iVar4 = 1;
do {
iVar1 = iVar3 / 10;
iVar4 = iVar4 * (iVar3 % 10);
if (iVar3 < 10) break;
iVar3 = iVar1 / 10;
iV... |
6,738 | func0 |
#include <stdbool.h>
#include <assert.h>
| bool func0(int n) {
if (n < 10) {
return false;
}
int prodOdd = 1, prodEven = 1;
while (n > 0) {
int digit = n % 10;
prodOdd *= digit;
n = n / 10;
if (n == 0) {
break;
}
digit = n % 10;
prodEven *= digit;
n... | int main() {
assert(func0(2841) == true);
assert(func0(1234) == false);
assert(func0(1212) == false);
return 0;
}
| O2 | c | func0:
endbr64
cmp $0x9,%edi
jle 1290 <func0+0x10>
jmpq 11f0 <func0.part.0>
xchg %ax,%ax
xor %eax,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
nopl (%rax)
| func0_part_0:
test edi, edi
jz loc_127E
movsxd rsi, edi
mov eax, edi
imul rsi, 66666667h
sar eax, 1Fh
sar rsi, 22h
sub esi, eax
lea edx, [rsi+rsi*4]
mov eax, esi
mov esi, edi
mov edi, 1
add edx, edx
sub esi, edx
test eax, eax
jnz short loc_124B
jmp short lo... | bool func0_part_0(int a1)
{
int v1; // edx
int v2; // eax
int v4; // edi
int v5; // esi
int v6; // edx
int v7; // eax
if ( a1 )
{
v1 = 5 * (a1 / 10);
v2 = a1 / 10;
v4 = 1;
v5 = a1 - 2 * v1;
if ( v2 )
{
do
{
v6 = v2 / 10;
v4 *= v2 % 10;
if ( !... | func0.part.0:
TEST EDI,EDI
JZ 0x0010127e
MOVSXD RSI,EDI
MOV EAX,EDI
IMUL RSI,RSI,0x66666667
SAR EAX,0x1f
SAR RSI,0x22
SUB ESI,EAX
LEA EDX,[RSI + RSI*0x4]
MOV EAX,ESI
MOV ESI,EDI
MOV EDI,0x1
ADD EDX,EDX
SUB ESI,EDX
TEST EAX,EAX
JNZ 0x0010124b
JMP 0x00101284
LAB_00101228:
MOVSXD RAX,EDX
MOV ECX,EDX
IMUL RAX,RAX,0x6666666... | uint func0_part_0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
if (param_1 == 0) {
return 1;
}
iVar1 = param_1 / 10;
iVar3 = 1;
param_1 = param_1 % 10;
if (iVar1 == 0) {
return (uint)(param_1 == 1);
}
do {
iVar2 = iVar1 / 10;
iVar3 = iVar3 * (iVar1 % 10);
if (iVar2 == 0)... |
6,739 | func0 |
#include <stdbool.h>
#include <assert.h>
| bool func0(int n) {
if (n < 10) {
return false;
}
int prodOdd = 1, prodEven = 1;
while (n > 0) {
int digit = n % 10;
prodOdd *= digit;
n = n / 10;
if (n == 0) {
break;
}
digit = n % 10;
prodEven *= digit;
n... | int main() {
assert(func0(2841) == true);
assert(func0(1234) == false);
assert(func0(1212) == false);
return 0;
}
| O3 | c | func0:
endbr64
xor %eax,%eax
cmp $0x9,%edi
jle 1300 <func0+0x80>
movslq %edi,%rsi
mov %edi,%eax
mov $0xcccccccd,%r8d
imul $0x66666667,%rsi,%rsi
sar $0x1f,%eax
sar $0x22,%rsi
sub %eax,%esi
lea (%rsi,%rsi,4),%edx
mov %esi,%eax
mov %edi,%esi
mov $0x1,%edi
add %edx,%edx
sub %edx,... | func0_part_0:
test edi, edi
jz short loc_1266
movsxd rsi, edi
mov eax, edi
mov r8d, 0CCCCCCCDh
imul rsi, 66666667h
sar eax, 1Fh
sar rsi, 22h
sub esi, eax
lea edx, [rsi+rsi*4]
mov eax, esi
mov esi, edi
mov edi, 1
add edx, edx
sub esi, edx
test eax, eax
jnz s... | bool func0_part_0(int a1)
{
int v1; // edx
unsigned int v2; // eax
int v4; // edi
int v5; // esi
unsigned int v6; // edx
int v7; // eax
if ( a1 )
{
v1 = 5 * (a1 / 10);
v2 = a1 / 10;
v4 = 1;
v5 = a1 - 2 * v1;
if ( v2 )
{
do
{
v6 = v2 / 0xA;
v4 *= v2 %... | func0.part.0:
TEST EDI,EDI
JZ 0x00101266
MOVSXD RSI,EDI
MOV EAX,EDI
MOV R8D,0xcccccccd
IMUL RSI,RSI,0x66666667
SAR EAX,0x1f
SAR RSI,0x22
SUB ESI,EAX
LEA EDX,[RSI + RSI*0x4]
MOV EAX,ESI
MOV ESI,EDI
MOV EDI,0x1
ADD EDX,EDX
SUB ESI,EDX
TEST EAX,EAX
JNZ 0x00101240
JMP 0x0010126c
LAB_00101228:
MOV EAX,EDX
IMUL RAX,R8
SHR RA... | ulong func0_part_0(int param_1)
{
int iVar1;
ulong uVar2;
int iVar3;
ulong uVar4;
int iVar5;
int iVar6;
if (param_1 == 0) {
return 1;
}
uVar2 = (ulong)(uint)(param_1 / 10);
iVar6 = 1;
iVar5 = param_1 % 10;
if (param_1 / 10 == 0) {
return (ulong)(iVar5 == 1);
}
do {
uVar4 = uV... |
6,740 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
// Function to compare integer arrays
int compare_int_arrays(const void *a, const void *b) {
int *arr1 = *(int **)a;
int *arr2 = *(int **)b;
size_t len1 = arr1[0];
size_t len2 = arr2[0];
if (len1 != len2) re... | int* func0(int *list, size_t *new_size) {
qsort(list, *new_size, sizeof(int), compare_ints);
size_t unique = 0;
for (size_t i = 1; i < *new_size; i++) {
if (list[unique] != list[i]) {
unique++;
list[unique] = list[i];
}
}
*new_size = unique + 1;
... | int main() {
// Test case 1: List of integer arrays
int list1_item1[] = {2, 10, 20};
int list1_item2[] = {1, 40};
int list1_item3[] = {3, 25, 30, 56};
int list1_item4[] = {2, 10, 20};
int list1_item5[] = {1, 33};
int list1_item6[] = {1, 40};
int* list1[] = {list1_item1, list1_ite... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %rdi,-0x18(%rbp)
mov %rsi,-0x20(%rbp)
mov -0x20(%rbp),%rax
mov (%rax),%rsi
mov -0x18(%rbp),%rax
lea -0x50(%rip),%rcx
mov $0x4,%edx
mov %rax,%rdi
callq 1080 <qsort@plt>
movq $0x0,-0x10(%rbp)
movq $0x1,-0x8(%rbp)
jmp 1539 <f... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+base], rdi
mov [rbp+var_20], rsi
mov rax, [rbp+var_20]
mov rsi, [rax]; nmemb
mov rax, [rbp+base]
lea rdx, compare_ints
mov rcx, rdx; compar
mov edx, 4; size
mov rdi, rax; base
call _qsort
mov [rbp+var_10], 0... | void * func0(void *a1, size_t *a2)
{
long long v3; // [rsp+10h] [rbp-10h]
unsigned long long i; // [rsp+18h] [rbp-8h]
qsort(a1, *a2, 4uLL, compare_ints);
v3 = 0LL;
for ( i = 1LL; i < *a2; ++i )
{
if ( *((_DWORD *)a1 + v3) != *((_DWORD *)a1 + i) )
{
++v3;
*((_DWORD *)a1 + v3) = *((_DWORD... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x18],RDI
MOV qword ptr [RBP + -0x20],RSI
MOV RAX,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
LEA RDX,[0x10146e]
MOV RCX,RDX
MOV EDX,0x4
MOV RDI,RAX
CALL 0x00101080
MOV qword ptr [RBP + -0x10],0x0
MOV qword ptr [R... | void * func0(void *param_1,size_t *param_2)
{
long local_18;
ulong local_10;
qsort(param_1,*param_2,4,compare_ints);
local_18 = 0;
for (local_10 = 1; local_10 < *param_2; local_10 = local_10 + 1) {
if (*(int *)((long)param_1 + local_18 * 4) != *(int *)((long)param_1 + local_10 * 4)) {
local_18 =... |
6,741 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
// Function to compare integer arrays
int compare_int_arrays(const void *a, const void *b) {
int *arr1 = *(int **)a;
int *arr2 = *(int **)b;
size_t len1 = arr1[0];
size_t len2 = arr2[0];
if (len1 != len2) re... | int* func0(int *list, size_t *new_size) {
qsort(list, *new_size, sizeof(int), compare_ints);
size_t unique = 0;
for (size_t i = 1; i < *new_size; i++) {
if (list[unique] != list[i]) {
unique++;
list[unique] = list[i];
}
}
*new_size = unique + 1;
... | int main() {
// Test case 1: List of integer arrays
int list1_item1[] = {2, 10, 20};
int list1_item2[] = {1, 40};
int list1_item3[] = {3, 25, 30, 56};
int list1_item4[] = {2, 10, 20};
int list1_item5[] = {1, 33};
int list1_item6[] = {1, 40};
int* list1[] = {list1_item1, list1_ite... | O1 | c | func0:
endbr64
push %rbp
push %rbx
sub $0x8,%rsp
mov %rdi,%rbx
mov %rsi,%rbp
lea -0x14a(%rip),%rcx
mov $0x4,%edx
mov (%rsi),%rsi
callq 1080 <qsort@plt>
cmpq $0x1,0x0(%rbp)
jbe 1380 <func0+0x5b>
mov $0x1,%eax
mov $0x0,%edx
jmp 136e <func0+0x49>
add $0x1,%rdx
mov %ecx,0x4(%rbx,%... | func0:
endbr64
push rbp
push rbx
sub rsp, 8
mov rbx, rdi
mov rbp, rsi
lea rcx, compare_ints
mov edx, 4
mov rsi, [rsi]
call _qsort
cmp qword ptr [rbp+0], 1
jbe short loc_1380
mov eax, 1
mov edx, 0
jmp short loc_1366
loc_135C:
add rax, 1
cmp [rbp+0], rax
jbe ... | long long func0(long long a1, unsigned long long *a2)
{
unsigned long long v3; // rax
long long v4; // rdx
long long v5; // rsi
int v6; // ecx
qsort(a1, *a2, 4LL, compare_ints);
if ( *a2 <= 1 )
{
v4 = 0LL;
}
else
{
v3 = 1LL;
v4 = 0LL;
do
{
v5 = 4 * v4;
v6 = *(_DWORD... | func0:
ENDBR64
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RBX,RDI
MOV RBP,RSI
LEA RCX,[0x1011f2]
MOV EDX,0x4
MOV RSI,qword ptr [RSI]
CALL 0x00101080
CMP qword ptr [RBP],0x1
JBE 0x00101380
MOV EAX,0x1
MOV EDX,0x0
JMP 0x00101366
LAB_0010135c:
ADD RAX,0x1
CMP qword ptr [RBP],RAX
JBE 0x00101385
LAB_00101366:
LEA RSI,[RDX*0x4]
MOV E... | void * func0(void *param_1,size_t *param_2)
{
long lVar1;
int iVar2;
ulong uVar3;
long lVar4;
qsort(param_1,*param_2,4,compare_ints);
if (*param_2 < 2) {
lVar4 = 0;
}
else {
uVar3 = 1;
lVar4 = 0;
do {
lVar1 = lVar4 * 4;
iVar2 = *(int *)((long)param_1 + uVar3 * 4);
i... |
6,742 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
// Function to compare integer arrays
int compare_int_arrays(const void *a, const void *b) {
int *arr1 = *(int **)a;
int *arr2 = *(int **)b;
size_t len1 = arr1[0];
size_t len2 = arr2[0];
if (len1 != len2) re... | int* func0(int *list, size_t *new_size) {
qsort(list, *new_size, sizeof(int), compare_ints);
size_t unique = 0;
for (size_t i = 1; i < *new_size; i++) {
if (list[unique] != list[i]) {
unique++;
list[unique] = list[i];
}
}
*new_size = unique + 1;
... | int main() {
// Test case 1: List of integer arrays
int list1_item1[] = {2, 10, 20};
int list1_item2[] = {1, 40};
int list1_item3[] = {3, 25, 30, 56};
int list1_item4[] = {2, 10, 20};
int list1_item5[] = {1, 33};
int list1_item6[] = {1, 40};
int* list1[] = {list1_item1, list1_ite... | O2 | c | func0:
endbr64
push %r12
lea -0x1ad(%rip),%rcx
mov $0x4,%edx
mov %rdi,%r12
push %rbx
mov %rsi,%rbx
sub $0x8,%rsp
mov (%rsi),%rsi
callq 1080 <qsort@plt>
mov (%rbx),%rax
cmp $0x1,%rax
jbe 17b0 <func0+0x80>
lea 0x4(%r12),%rcx
lea (%r12,%rax,4),%r8
xor %edx,%edx
nopl 0x0(%rax)
mov... | func0:
endbr64
push r12
lea rcx, compare_ints
mov edx, 4
mov r12, rdi
push rbx
mov rbx, rsi
sub rsp, 8
mov rsi, [rsi]
call _qsort
mov rax, [rbx]
cmp rax, 1
jbe short loc_1798
lea rdx, [r12+4]
lea rdi, [r12+rax*4]
xor ecx, ecx
nop dword ptr [rax+00000000h]
loc... | long long func0(long long a1, _QWORD *a2)
{
_DWORD *v3; // rdx
_DWORD *v4; // rdi
long long v5; // rcx
long long result; // rax
qsort(a1, *a2, 4LL, compare_ints);
if ( *a2 <= 1uLL )
{
result = a1;
*a2 = 1LL;
}
else
{
v3 = (_DWORD *)(a1 + 4);
v4 = (_DWORD *)(a1 + 4LL * *a2);
v5 ... | func0:
ENDBR64
PUSH R12
LEA RCX,[0x101590]
MOV EDX,0x4
MOV R12,RDI
PUSH RBX
MOV RBX,RSI
SUB RSP,0x8
MOV RSI,qword ptr [RSI]
CALL 0x00101080
MOV RAX,qword ptr [RBX]
CMP RAX,0x1
JBE 0x00101798
LEA RDX,[R12 + 0x4]
LEA RDI,[R12 + RAX*0x4]
XOR ECX,ECX
NOP dword ptr [RAX]
LAB_00101760:
MOV ESI,dword ptr [RDX]
LEA RAX,[RCX*0x... | void * func0(void *param_1,size_t *param_2)
{
ulong uVar1;
long lVar2;
int *piVar3;
qsort(param_1,*param_2,4,compare_ints);
uVar1 = *param_2;
if (1 < uVar1) {
piVar3 = (int *)((long)param_1 + 4);
lVar2 = 0;
do {
if (*(int *)((long)param_1 + lVar2 * 4) != *piVar3) {
*(int *)((lo... |
6,743 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
// Function to compare integer arrays
int compare_int_arrays(const void *a, const void *b) {
int *arr1 = *(int **)a;
int *arr2 = *(int **)b;
size_t len1 = arr1[0];
size_t len2 = arr2[0];
if (len1 != len2) re... | int* func0(int *list, size_t *new_size) {
qsort(list, *new_size, sizeof(int), compare_ints);
size_t unique = 0;
for (size_t i = 1; i < *new_size; i++) {
if (list[unique] != list[i]) {
unique++;
list[unique] = list[i];
}
}
*new_size = unique + 1;
... | int main() {
// Test case 1: List of integer arrays
int list1_item1[] = {2, 10, 20};
int list1_item2[] = {1, 40};
int list1_item3[] = {3, 25, 30, 56};
int list1_item4[] = {2, 10, 20};
int list1_item5[] = {1, 33};
int list1_item6[] = {1, 40};
int* list1[] = {list1_item1, list1_ite... | O3 | c | func0:
endbr64
push %r12
lea -0x1ad(%rip),%rcx
mov $0x4,%edx
mov %rdi,%r12
push %rbx
mov %rsi,%rbx
sub $0x8,%rsp
mov (%rsi),%rsi
callq 1080 <qsort@plt>
mov (%rbx),%rax
cmp $0x1,%rax
jbe 17a0 <func0+0x90>
mov (%r12),%r9d
lea 0x4(%r12),%rdx
lea (%r12,%rax,4),%rax
xor %r8d,%r8d
... | func0:
endbr64
push rbp
mov rbp, rsi
lea rcx, compare_ints; compar
mov edx, 4; size
push rbx
mov rbx, rdi
sub rsp, 8
mov rsi, [rsi]; nmemb
call _qsort
mov rax, [rbp+0]
cmp rax, 1
jbe short loc_1798
mov r8d, [rbx]
lea rdx, [rbx+4]
lea rax, [rbx+rax*4]
xor esi,... | int * func0(int *a1, size_t *a2)
{
int v3; // r8d
int *v4; // rdx
int *v5; // rax
long long v6; // rsi
int v7; // ecx
int *result; // rax
qsort(a1, *a2, 4uLL, compare_ints);
if ( *a2 > 1 )
{
v3 = *a1;
v4 = a1 + 1;
v5 = &a1[*a2];
v6 = 0LL;
while ( 1 )
{
v7 = *v4;
if... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSI
LEA RCX,[0x101590]
MOV EDX,0x4
PUSH RBX
MOV RBX,RDI
SUB RSP,0x8
MOV RSI,qword ptr [RSI]
CALL 0x00101080
MOV RAX,qword ptr [RBP]
CMP RAX,0x1
JBE 0x00101798
MOV R8D,dword ptr [RBX]
LEA RDX,[RBX + 0x4]
LEA RAX,[RBX + RAX*0x4]
XOR ESI,ESI
JMP 0x00101773
LAB_00101760:
ADD RSI,0x1
ADD RDX,... | int * func0(int *param_1,size_t *param_2)
{
int iVar1;
ulong uVar2;
int *piVar3;
long lVar4;
int iVar5;
qsort(param_1,*param_2,4,compare_ints);
uVar2 = *param_2;
if (uVar2 < 2) {
*param_2 = 1;
return param_1;
}
piVar3 = param_1 + 1;
lVar4 = 0;
iVar5 = *param_1;
while( true ) {
... |
6,744 | func0 |
#include <stdbool.h>
#include <assert.h>
| bool func0(bool test_tup[], int size) {
for (int i = 0; i < size; i++) {
if (!test_tup[i]) return false;
}
return true;
}
| int main() {
bool arr1[] = {true, true, true, true};
bool arr2[] = {true, false, true, true};
bool arr3[] = {true, true, true, true};
assert(func0(arr1, 4) == true);
assert(func0(arr2, 4) == false);
assert(func0(arr3, 4) == true);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
movl $0x0,-0x4(%rbp)
jmp 11a3 <func0+0x3a>
mov -0x4(%rbp),%eax
movslq %eax,%rdx
mov -0x18(%rbp),%rax
add %rdx,%rax
movzbl (%rax),%eax
xor $0x1,%eax
test %al,%al
je 119f <func0+0x36>
mov $0x0,%eax
jmp ... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_4], 0
jmp short loc_11A3
loc_1181:
mov eax, [rbp+var_4]
movsxd rdx, eax
mov rax, [rbp+var_18]
add rax, rdx
movzx eax, byte ptr [rax]
xor eax, 1
test al, al
jz short loc_119F
mo... | long long func0(long long a1, int a2)
{
int i; // [rsp+18h] [rbp-4h]
for ( i = 0; i < a2; ++i )
{
if ( *(_BYTE *)(i + a1) != 1 )
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 + -0x4],0x0
JMP 0x001011a3
LAB_00101181:
MOV EAX,dword ptr [RBP + -0x4]
MOVSXD RDX,EAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,RDX
MOVZX EAX,byte ptr [RAX]
XOR EAX,0x1
TEST AL,AL
JZ 0x0010119f
MOV EAX,... | int8 func0(long param_1,int param_2)
{
int local_c;
local_c = 0;
while( true ) {
if (param_2 <= local_c) {
return 1;
}
if (*(char *)(param_1 + local_c) != '\x01') break;
local_c = local_c + 1;
}
return 0;
} |
6,745 | func0 |
#include <stdbool.h>
#include <assert.h>
| bool func0(bool test_tup[], int size) {
for (int i = 0; i < size; i++) {
if (!test_tup[i]) return false;
}
return true;
}
| int main() {
bool arr1[] = {true, true, true, true};
bool arr2[] = {true, false, true, true};
bool arr3[] = {true, true, true, true};
assert(func0(arr1, 4) == true);
assert(func0(arr2, 4) == false);
assert(func0(arr3, 4) == true);
return 0;
}
| O1 | c | func0:
endbr64
test %esi,%esi
jle 118f <func0+0x26>
mov %rdi,%rax
lea -0x1(%rsi),%edx
lea 0x1(%rdi,%rdx,1),%rcx
movzbl (%rax),%edx
test %dl,%dl
je 118c <func0+0x23>
add $0x1,%rax
cmp %rcx,%rax
jne 117c <func0+0x13>
mov %edx,%eax
retq
mov $0x1,%edx
jmp 118c <func0+0x23>
| func0:
endbr64
test esi, esi
jle short loc_118F
mov rax, rdi
lea edx, [rsi-1]
lea rcx, [rdi+rdx+1]
loc_117C:
movzx edx, byte ptr [rax]
test dl, dl
jz short loc_118C
add rax, 1
cmp rax, rcx
jnz short loc_117C
loc_118C:
mov eax, edx
retn
loc_118F:
mov edx, 1
jmp short ... | long long func0(unsigned __int8 *a1, int a2)
{
unsigned __int8 *v2; // rax
unsigned int v3; // edx
if ( a2 <= 0 )
{
return 1;
}
else
{
v2 = a1;
do
{
v3 = *v2;
if ( !(_BYTE)v3 )
break;
++v2;
}
while ( v2 != &a1[a2 - 1 + 1] );
}
return v3;
} | func0:
ENDBR64
TEST ESI,ESI
JLE 0x0010118f
MOV RAX,RDI
LEA EDX,[RSI + -0x1]
LEA RCX,[RDI + RDX*0x1 + 0x1]
LAB_0010117c:
MOVZX EDX,byte ptr [RAX]
TEST DL,DL
JZ 0x0010118c
ADD RAX,0x1
CMP RAX,RCX
JNZ 0x0010117c
LAB_0010118c:
MOV EAX,EDX
RET
LAB_0010118f:
MOV EDX,0x1
JMP 0x0010118c | char func0(char *param_1,int param_2)
{
char *pcVar1;
char cVar2;
if (param_2 < 1) {
cVar2 = '\x01';
}
else {
pcVar1 = param_1 + (ulong)(param_2 - 1) + 1;
do {
cVar2 = *param_1;
if (cVar2 == '\0') {
return '\0';
}
param_1 = param_1 + 1;
} while (param_1 != p... |
6,746 | func0 |
#include <stdbool.h>
#include <assert.h>
| bool func0(bool test_tup[], int size) {
for (int i = 0; i < size; i++) {
if (!test_tup[i]) return false;
}
return true;
}
| int main() {
bool arr1[] = {true, true, true, true};
bool arr2[] = {true, false, true, true};
bool arr3[] = {true, true, true, true};
assert(func0(arr1, 4) == true);
assert(func0(arr2, 4) == false);
assert(func0(arr3, 4) == true);
return 0;
}
| O2 | c | func0:
endbr64
test %esi,%esi
jle 1171 <func0+0x31>
lea -0x1(%rsi),%eax
lea 0x1(%rdi,%rax,1),%rdx
jmp 1161 <func0+0x21>
nopw 0x0(%rax,%rax,1)
add $0x1,%rdi
cmp %rdx,%rdi
je 1170 <func0+0x30>
movzbl (%rdi),%eax
test %al,%al
jne 1158 <func0+0x18>
retq
nopl 0x0(%rax)
retq
mov $0x1,%eax
... | func0:
endbr64
test esi, esi
jle short loc_1171
lea eax, [rsi-1]
lea rdx, [rdi+rax+1]
jmp short loc_1161
loc_1158:
add rdi, 1
cmp rdi, rdx
jz short locret_1170
loc_1161:
movzx eax, byte ptr [rdi]
test al, al
jnz short loc_1158
retn
locret_1170:
retn
loc_1171:
mov eax, 1
retn | long long func0(unsigned __int8 *a1, int a2)
{
long long v2; // rdx
long long result; // rax
if ( a2 <= 0 )
return 1LL;
v2 = (long long)&a1[a2 - 1 + 1];
do
{
result = *a1;
if ( !(_BYTE)result )
break;
++a1;
}
while ( a1 != (unsigned __int8 *)v2 );
return result;
} | func0:
ENDBR64
TEST ESI,ESI
JLE 0x00101171
LEA EAX,[RSI + -0x1]
LEA RDX,[RDI + RAX*0x1 + 0x1]
JMP 0x00101161
LAB_00101158:
ADD RDI,0x1
CMP RDI,RDX
JZ 0x00101170
LAB_00101161:
MOVZX EAX,byte ptr [RDI]
TEST AL,AL
JNZ 0x00101158
RET
LAB_00101170:
RET
LAB_00101171:
MOV EAX,0x1
RET | char func0(char *param_1,int param_2)
{
char *pcVar1;
char cVar2;
if (param_2 < 1) {
return '\x01';
}
pcVar1 = param_1 + (ulong)(param_2 - 1) + 1;
do {
cVar2 = *param_1;
if (*param_1 == '\0') {
return cVar2;
}
param_1 = param_1 + 1;
} while (param_1 != pcVar1);
return cVar2... |
6,747 | func0 |
#include <stdbool.h>
#include <assert.h>
| bool func0(bool test_tup[], int size) {
for (int i = 0; i < size; i++) {
if (!test_tup[i]) return false;
}
return true;
}
| int main() {
bool arr1[] = {true, true, true, true};
bool arr2[] = {true, false, true, true};
bool arr3[] = {true, true, true, true};
assert(func0(arr1, 4) == true);
assert(func0(arr2, 4) == false);
assert(func0(arr3, 4) == true);
return 0;
}
| O3 | c | func0:
endbr64
test %esi,%esi
jle 1171 <func0+0x31>
lea -0x1(%rsi),%eax
lea 0x1(%rdi,%rax,1),%rdx
jmp 1161 <func0+0x21>
nopw 0x0(%rax,%rax,1)
add $0x1,%rdi
cmp %rdx,%rdi
je 1170 <func0+0x30>
movzbl (%rdi),%eax
test %al,%al
jne 1158 <func0+0x18>
retq
nopl 0x0(%rax)
retq
mov $0x1,%eax
... | func0:
endbr64
test esi, esi
jle short loc_1171
movsxd rsi, esi
lea rdx, [rdi+rsi]
jmp short loc_1161
loc_1158:
add rdi, 1
cmp rdi, rdx
jz short locret_1170
loc_1161:
movzx eax, byte ptr [rdi]
test al, al
jnz short loc_1158
retn
locret_1170:
retn
loc_1171:
mov eax, 1
retn | long long func0(unsigned __int8 *a1, int a2)
{
unsigned __int8 *v2; // rdx
long long result; // rax
if ( a2 <= 0 )
return 1LL;
v2 = &a1[a2];
do
{
result = *a1;
if ( !(_BYTE)result )
break;
++a1;
}
while ( a1 != v2 );
return result;
} | func0:
ENDBR64
TEST ESI,ESI
JLE 0x00101171
MOVSXD RSI,ESI
LEA RDX,[RDI + RSI*0x1]
JMP 0x00101161
LAB_00101158:
ADD RDI,0x1
CMP RDI,RDX
JZ 0x00101170
LAB_00101161:
MOVZX EAX,byte ptr [RDI]
TEST AL,AL
JNZ 0x00101158
RET
LAB_00101170:
RET
LAB_00101171:
MOV EAX,0x1
RET | char func0(char *param_1,int param_2)
{
char *pcVar1;
char cVar2;
if (param_2 < 1) {
return '\x01';
}
pcVar1 = param_1 + param_2;
do {
cVar2 = *param_1;
if (*param_1 == '\0') {
return cVar2;
}
param_1 = param_1 + 1;
} while (param_1 != pcVar1);
return cVar2;
} |
6,748 | func0 |
#include <assert.h>
| int func0(int n) {
int m = n;
int count = 0;
int i = 2;
while((i * i) <= m) {
int total = 0;
while (n % i == 0) {
n /= i;
total += 1;
}
int temp = 0;
int j = 1;
while((temp + j) <= total) {
temp += j;
... | int main() {
assert(func0(24) == 3);
assert(func0(12) == 2);
assert(func0(4) == 1);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x24(%rbp)
mov -0x24(%rbp),%eax
mov %eax,-0x4(%rbp)
movl $0x0,-0x18(%rbp)
movl $0x2,-0x14(%rbp)
jmp 11bd <func0+0x74>
movl $0x0,-0x10(%rbp)
jmp 1181 <func0+0x38>
mov -0x24(%rbp),%eax
cltd
idivl -0x14(%rbp)
mov %eax,-0x24(%rbp)
addl $0x1... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_24], edi
mov eax, [rbp+var_24]
mov [rbp+var_4], eax
mov [rbp+var_18], 0
mov [rbp+var_14], 2
jmp short loc_11BD
loc_116A:
mov [rbp+var_10], 0
jmp short loc_1181
loc_1173:
mov eax, [rbp+var_24]
cdq
idiv [rbp+var_14]
mov [r... | long long func0(int a1)
{
int v2; // [rsp+0h] [rbp-24h]
unsigned int v3; // [rsp+Ch] [rbp-18h]
int i; // [rsp+10h] [rbp-14h]
int v5; // [rsp+14h] [rbp-10h]
int v6; // [rsp+18h] [rbp-Ch]
int j; // [rsp+1Ch] [rbp-8h]
v2 = a1;
v3 = 0;
for ( i = 2; a1 >= i * i; ++i )
{
v5 = 0;
while ( !(v2 % i... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x24],EDI
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
MOV dword ptr [RBP + -0x18],0x0
MOV dword ptr [RBP + -0x14],0x2
JMP 0x001011bd
LAB_0010116a:
MOV dword ptr [RBP + -0x10],0x0
JMP 0x00101181
LAB_00101173:
MOV EAX,dword ptr [RBP + -0x24]
CDQ... | int func0(int param_1)
{
int4 local_2c;
int4 local_20;
int4 local_1c;
int4 local_18;
int4 local_14;
int4 local_10;
local_20 = 0;
local_2c = param_1;
for (local_1c = 2; local_1c * local_1c <= param_1; local_1c = local_1c + 1) {
local_18 = 0;
for (; local_2c % local_1c == 0; local_2c = local... |
6,749 | func0 |
#include <assert.h>
| int func0(int n) {
int m = n;
int count = 0;
int i = 2;
while((i * i) <= m) {
int total = 0;
while (n % i == 0) {
n /= i;
total += 1;
}
int temp = 0;
int j = 1;
while((temp + j) <= total) {
temp += j;
... | int main() {
assert(func0(24) == 3);
assert(func0(12) == 2);
assert(func0(4) == 1);
return 0;
}
| O1 | c | func0:
endbr64
mov %edi,%ecx
mov $0x2,%esi
mov $0x0,%r10d
cmp $0x3,%edi
jg 11b1 <func0+0x68>
cmp $0x1,%ecx
setne %al
movzbl %al,%eax
add %eax,%r10d
mov %r10d,%eax
retq
mov %ecx,%eax
cltd
idiv %esi
mov %eax,%ecx
add $0x1,%r8d
cltd
idiv %esi
test %edx,%edx
je 116f <func0+0x26>... | func0:
endbr64
mov r10d, edi
mov ecx, edi
mov esi, 2
mov r9d, 0
cmp edi, 3
jg short loc_11B3
loc_1162:
cmp ecx, 1
setnz al
movzx eax, al
add r9d, eax
mov eax, r9d
retn
loc_1172:
mov eax, ecx
cdq
idiv esi
mov ecx, eax
add edi, 1
cdq
idiv esi
test edx, edx
jz ... | long long func0(int a1)
{
int v2; // ecx
int v3; // esi
int v4; // r9d
int v6; // edi
int v7; // edx
int i; // r8d
int v9; // eax
v2 = a1;
v3 = 2;
v4 = 0;
if ( a1 > 3 )
{
do
{
v6 = v2 % v3;
if ( !(v2 % v3) )
{
do
{
v2 /= v3;
++v6;
... | func0:
ENDBR64
MOV R10D,EDI
MOV ECX,EDI
MOV ESI,0x2
MOV R9D,0x0
CMP EDI,0x3
JG 0x001011b3
LAB_00101162:
CMP ECX,0x1
SETNZ AL
MOVZX EAX,AL
ADD R9D,EAX
MOV EAX,R9D
RET
LAB_00101172:
MOV EAX,ECX
CDQ
IDIV ESI
MOV ECX,EAX
ADD EDI,0x1
CDQ
IDIV ESI
TEST EDX,EDX
JZ 0x00101172
TEST EDI,EDI
JLE 0x001011a6
MOV EDX,R9D
MOV R8D,0x1... | int func0(uint param_1)
{
ulong uVar1;
uint uVar2;
ulong uVar3;
int iVar4;
int iVar5;
int iVar6;
int iVar7;
int iVar8;
int iVar9;
uVar3 = (ulong)param_1;
iVar7 = 2;
iVar5 = 0;
uVar2 = param_1;
iVar9 = 0;
if (3 < (int)param_1) {
do {
iVar6 = (int)uVar3 % iVar7;
iVar5 = i... |
6,750 | func0 |
#include <assert.h>
| int func0(int n) {
int m = n;
int count = 0;
int i = 2;
while((i * i) <= m) {
int total = 0;
while (n % i == 0) {
n /= i;
total += 1;
}
int temp = 0;
int j = 1;
while((temp + j) <= total) {
temp += j;
... | int main() {
assert(func0(24) == 3);
assert(func0(12) == 2);
assert(func0(4) == 1);
return 0;
}
| O2 | c | func0:
endbr64
mov %edi,%r10d
mov $0x2,%ecx
xor %r9d,%r9d
cmp $0x3,%edi
jle 12fb <func0+0x6b>
nopl 0x0(%rax)
mov %edi,%eax
cltd
idiv %ecx
mov %edx,%esi
test %edx,%edx
jne 12ee <func0+0x5e>
nopl 0x0(%rax,%rax,1)
mov %edi,%eax
add $0x1,%esi
cltd
idiv %ecx
cltd
mov %eax,%edi
idiv... | func0:
endbr64
mov ecx, edi
mov r10d, edi
mov esi, 2
xor r9d, r9d
cmp edi, 3
jle short loc_1263
nop word ptr [rax+rax+00000000h]
loc_1210:
mov eax, ecx
cdq
idiv esi
mov edi, edx
test edx, edx
jnz short loc_1256
nop dword ptr [rax+rax+00h]
loc_1220:
mov eax, ecx
add ... | long long func0(int a1)
{
int v1; // ecx
int v3; // esi
int v4; // r9d
int v5; // edi
int v6; // edx
int v7; // eax
int v8; // r8d
int v9; // edx
v1 = a1;
v3 = 2;
v4 = 0;
if ( a1 > 3 )
{
do
{
v5 = v1 % v3;
if ( !(v1 % v3) )
{
do
{
++v5;
... | func0:
ENDBR64
MOV ECX,EDI
MOV R10D,EDI
MOV ESI,0x2
XOR R9D,R9D
CMP EDI,0x3
JLE 0x00101263
NOP word ptr CS:[RAX + RAX*0x1]
LAB_00101210:
MOV EAX,ECX
CDQ
IDIV ESI
MOV EDI,EDX
TEST EDX,EDX
JNZ 0x00101256
NOP dword ptr [RAX + RAX*0x1]
LAB_00101220:
MOV EAX,ECX
ADD EDI,0x1
CDQ
IDIV ESI
CDQ
MOV ECX,EAX
IDIV ESI
TEST EDX,EDX... | int func0(int param_1)
{
long lVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
uint uVar6;
ulong uVar7;
int iVar8;
int iVar9;
iVar5 = 2;
iVar9 = 0;
iVar2 = param_1;
if (3 < param_1) {
do {
uVar7 = (long)iVar2 % (long)iVar5 & 0xffffffff;
iVar4 = iVar9;
if ((int)((lon... |
6,751 | func0 |
#include <assert.h>
| int func0(int n) {
int m = n;
int count = 0;
int i = 2;
while((i * i) <= m) {
int total = 0;
while (n % i == 0) {
n /= i;
total += 1;
}
int temp = 0;
int j = 1;
while((temp + j) <= total) {
temp += j;
... | int main() {
assert(func0(24) == 3);
assert(func0(12) == 2);
assert(func0(4) == 1);
return 0;
}
| O3 | c | func0:
endbr64
mov %edi,%r10d
mov $0x2,%ecx
xor %r9d,%r9d
cmp $0x3,%edi
jle 12fb <func0+0x6b>
nopl 0x0(%rax)
mov %edi,%eax
cltd
idiv %ecx
mov %edx,%esi
test %edx,%edx
jne 12ee <func0+0x5e>
nopl 0x0(%rax,%rax,1)
mov %edi,%eax
add $0x1,%esi
cltd
idiv %ecx
cltd
mov %eax,%edi
idiv... | func0:
endbr64
mov ecx, edi
mov r10d, edi
mov esi, 2
xor edi, edi
mov r11d, 1
cmp ecx, 3
jle short loc_12FD
nop dword ptr [rax+rax+00h]
loc_12B0:
mov eax, ecx
cdq
idiv esi
mov r8d, edx
test edx, edx
jnz short loc_12F0
nop dword ptr [rax+00h]
loc_12C0:
mov eax, e... | long long func0(int a1)
{
int v1; // ecx
int v3; // esi
int v4; // edi
int v5; // r8d
int v6; // edx
int v7; // eax
int v8; // edx
v1 = a1;
v3 = 2;
v4 = 0;
if ( v1 > 3 )
{
do
{
v5 = v1 % v3;
if ( !(v1 % v3) )
{
do
{
++v5;
v6 = (v1 /... | func0:
ENDBR64
MOV ECX,EDI
MOV R10D,EDI
MOV ESI,0x2
XOR EDI,EDI
MOV R11D,0x1
CMP ECX,0x3
JLE 0x001012fd
NOP dword ptr [RAX + RAX*0x1]
LAB_001012b0:
MOV EAX,ECX
CDQ
IDIV ESI
MOV R8D,EDX
TEST EDX,EDX
JNZ 0x001012f0
NOP dword ptr [RAX]
LAB_001012c0:
MOV EAX,ECX
ADD R8D,0x1
CDQ
IDIV ESI
CDQ
MOV ECX,EAX
IDIV ESI
TEST EDX,ED... | int func0(int param_1)
{
long lVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
uint uVar6;
ulong uVar7;
int iVar8;
iVar4 = 2;
iVar5 = 0;
iVar2 = param_1;
if (3 < param_1) {
do {
uVar7 = (long)iVar2 % (long)iVar4 & 0xffffffff;
if ((int)((long)iVar2 % (long)iVar4) == 0) {
... |
6,752 | func0 |
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct {
int *data;
int size;
} str_to_tuple_result;
| str_to_tuple_result func0(const char *test_str) {
str_to_tuple_result result;
// Count the number of integers
int count = 1;
for (const char *p = test_str; *p; p++) {
if (*p == ',') count++;
}
result.size = count;
result.data = malloc(count * sizeof(int));
if (!result.da... | int main() {
// Test case 1
str_to_tuple_result t1 = func0("1, -5, 4, 6, 7");
int expected1[] = {1, -5, 4, 6, 7};
assert(t1.size == 5);
for(int i = 0; i < 5; i++) {
assert(t1.data[i] == expected1[i]);
}
free(t1.data);
// Test case 2
str_to_tuple_result t2 = func0(... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x48,%rsp
mov %rdi,-0x48(%rbp)
movl $0x1,-0x40(%rbp)
mov -0x48(%rbp),%rax
mov %rax,-0x38(%rbp)
jmp 127f <func0+0x36>
mov -0x38(%rbp),%rax
movzbl (%rax),%eax
cmp $0x2c,%al
jne 127a <func0+0x31>
addl $0x1,-0x40(%rbp)
addq $0x1,-0x3... | func0:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 48h
mov [rbp+s], rdi
mov [rbp+var_40], 1
mov rax, [rbp+s]
mov [rbp+var_38], rax
jmp short loc_127F
loc_126B:
mov rax, [rbp+var_38]
movzx eax, byte ptr [rax]
cmp al, 2Ch ; ','
jnz short loc_127A
add [rbp+var_40], 1... | _DWORD * func0(const char *a1)
{
int v1; // eax
int v3; // [rsp+10h] [rbp-40h]
int j; // [rsp+14h] [rbp-3Ch]
const char *i; // [rsp+18h] [rbp-38h]
const char *nptr; // [rsp+20h] [rbp-30h]
char *v7; // [rsp+28h] [rbp-28h]
_DWORD *v8; // [rsp+30h] [rbp-20h]
v3 = 1;
for ( i = a1; *i; ++i )
{
if ( ... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x48],RDI
MOV dword ptr [RBP + -0x40],0x1
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0010127f
LAB_0010126b:
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EAX,byte ptr [RAX]
CMP AL,0x2c
JNZ 0x0010127a
ADD dword ptr [RBP + ... | int [16] func0(char *param_1)
{
int auVar1 [16];
int iVar2;
void *pvVar3;
char *__s;
int local_48;
int local_44;
char *local_40;
char *local_38;
int4 uStack_1c;
local_48 = 1;
for (local_40 = param_1; *local_40 != '\0'; local_40 = local_40 + 1) {
if (*local_40 == ',') {
local_48 = lo... |
6,753 | func0 |
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct {
int *data;
int size;
} str_to_tuple_result;
| str_to_tuple_result func0(const char *test_str) {
str_to_tuple_result result;
// Count the number of integers
int count = 1;
for (const char *p = test_str; *p; p++) {
if (*p == ',') count++;
}
result.size = count;
result.data = malloc(count * sizeof(int));
if (!result.da... | int main() {
// Test case 1
str_to_tuple_result t1 = func0("1, -5, 4, 6, 7");
int expected1[] = {1, -5, 4, 6, 7};
assert(t1.size == 5);
for(int i = 0; i < 5; i++) {
assert(t1.data[i] == expected1[i]);
}
free(t1.data);
// Test case 2
str_to_tuple_result t2 = func0(... | O1 | c | func0:
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
mov %rdi,%rbx
movzbl (%rdi),%eax
test %al,%al
je 1317 <func0+0xce>
mov %rdi,%rdx
mov $0x1,%ebp
cmp $0x2c,%al
sete %al
movzbl %al,%eax
add %eax,%ebp
add $0x1,%rdx
movzbl (%rdx),%eax
test %al,%al
jne 126b <func0+0x22... | func0:
endbr64
push r14
push r13
push r12
push rbp
push rbx
mov rbx, rdi
movzx eax, byte ptr [rdi]
test al, al
jz loc_1317
mov rdx, rdi
mov ebp, 1
loc_126B:
cmp al, 2Ch ; ','
setz al
movzx eax, al
add ebp, eax
add rdx, 1
movzx eax, byte ptr [rdx]
test al, al
jn... | long long func0(_BYTE *a1)
{
char v1; // al
_BYTE *v2; // rdx
int v3; // ebp
long long v4; // r12
long long v5; // r14
long long v6; // rdi
long long v7; // rbx
bool v8; // al
v1 = *a1;
if ( *a1 )
{
v2 = a1;
v3 = 1;
do
{
v3 += v1 == 44;
v1 = *++v2;
}
while ( *... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
MOVZX EAX,byte ptr [RDI]
TEST AL,AL
JZ 0x00101317
MOV RDX,RDI
MOV EBP,0x1
LAB_0010126b:
CMP AL,0x2c
SETZ AL
MOVZX EAX,AL
ADD EBP,EAX
ADD RDX,0x1
MOVZX EAX,byte ptr [RDX]
TEST AL,AL
JNZ 0x0010126b
LAB_00101280:
MOVSXD RDI,EBP
SHL RDI,0x2
CALL 0x0010... | int1 [16] func0(char *param_1)
{
char cVar1;
char *__nptr;
long lVar2;
char *pcVar3;
int iVar4;
long lVar5;
int iVar6;
int1 auVar7 [16];
cVar1 = *param_1;
if (cVar1 == '\0') {
iVar6 = 1;
}
else {
iVar6 = 1;
pcVar3 = param_1;
do {
iVar6 = iVar6 + (uint)(cVar1 == ',');
... |
6,754 | func0 |
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct {
int *data;
int size;
} str_to_tuple_result;
| str_to_tuple_result func0(const char *test_str) {
str_to_tuple_result result;
// Count the number of integers
int count = 1;
for (const char *p = test_str; *p; p++) {
if (*p == ',') count++;
}
result.size = count;
result.data = malloc(count * sizeof(int));
if (!result.da... | int main() {
// Test case 1
str_to_tuple_result t1 = func0("1, -5, 4, 6, 7");
int expected1[] = {1, -5, 4, 6, 7};
assert(t1.size == 5);
for(int i = 0; i < 5; i++) {
assert(t1.data[i] == expected1[i]);
}
free(t1.data);
// Test case 2
str_to_tuple_result t2 = func0(... | O2 | c | func0:
endbr64
push %r14
push %r13
push %r12
push %rbp
mov %rdi,%rbp
push %rbx
movzbl (%rdi),%eax
test %al,%al
je 1548 <func0+0xd8>
mov %rdi,%rdx
mov $0x1,%r14d
nopl 0x0(%rax,%rax,1)
cmp $0x2c,%al
sete %al
add $0x1,%rdx
movzbl %al,%eax
add %eax,%r14d
movzbl (%rdx),%eax
test %al,%... | func0:
endbr64
push r14
push r13
push r12
push rbp
mov rbp, rdi
push rbx
movzx eax, byte ptr [rdi]
test al, al
jz loc_1548
mov rdx, rdi
mov r14d, 1
nop dword ptr [rax+rax+00h]
loc_1498:
cmp al, 2Ch ; ','
setz al
add rdx, 1
movzx eax, al
add r14d, eax
movzx eax... | long long func0(char *a1)
{
char v2; // al
char *v3; // rdx
int v4; // r14d
long long v5; // rdi
long long v6; // r12
long long v7; // r13
long long v8; // rbp
long long v9; // rdi
bool v10; // al
v2 = *a1;
if ( *a1 )
{
v3 = a1;
v4 = 1;
do
{
++v3;
v4 += v2 == 44;
... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
MOVZX EAX,byte ptr [RDI]
TEST AL,AL
JZ 0x00101548
MOV RDX,RDI
MOV R14D,0x1
NOP dword ptr [RAX + RAX*0x1]
LAB_00101498:
CMP AL,0x2c
SETZ AL
ADD RDX,0x1
MOVZX EAX,AL
ADD R14D,EAX
MOVZX EAX,byte ptr [RDX]
TEST AL,AL
JNZ 0x00101498
MOVSXD RDI,R14D
SHL ... | int1 [16] func0(char *param_1)
{
char cVar1;
char *__nptr;
long lVar2;
char *pcVar3;
size_t __size;
int iVar4;
long lVar5;
int iVar6;
int1 auVar7 [16];
cVar1 = *param_1;
if (cVar1 == '\0') {
__size = 4;
iVar6 = 1;
}
else {
iVar6 = 1;
pcVar3 = param_1;
do {
pcVar3... |
6,755 | func0 |
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct {
int *data;
int size;
} str_to_tuple_result;
| str_to_tuple_result func0(const char *test_str) {
str_to_tuple_result result;
// Count the number of integers
int count = 1;
for (const char *p = test_str; *p; p++) {
if (*p == ',') count++;
}
result.size = count;
result.data = malloc(count * sizeof(int));
if (!result.da... | int main() {
// Test case 1
str_to_tuple_result t1 = func0("1, -5, 4, 6, 7");
int expected1[] = {1, -5, 4, 6, 7};
assert(t1.size == 5);
for(int i = 0; i < 5; i++) {
assert(t1.data[i] == expected1[i]);
}
free(t1.data);
// Test case 2
str_to_tuple_result t2 = func0(... | O3 | c | func0:
endbr64
push %r14
push %r13
push %r12
push %rbp
mov %rdi,%rbp
push %rbx
movzbl (%rdi),%eax
test %al,%al
je 1548 <func0+0xd8>
mov %rdi,%rdx
mov $0x1,%r14d
nopl 0x0(%rax,%rax,1)
cmp $0x2c,%al
sete %al
add $0x1,%rdx
movzbl %al,%eax
add %eax,%r14d
movzbl (%rdx),%eax
test %al,%... | func0:
endbr64
push r14
push r13
push r12
push rbp
mov rbp, rdi
push rbx
movzx eax, byte ptr [rdi]
test al, al
jz loc_14E0
mov rdx, rdi
mov r14d, 1
nop dword ptr [rax+rax+00h]
loc_1428:
cmp al, 2Ch ; ','
setz al
add rdx, 1
movzx eax, al
add r14d, eax
movzx eax... | _DWORD * func0(char *s)
{
char v2; // al
char *v3; // rdx
int v4; // r14d
size_t v5; // rdi
_DWORD *v6; // rbx
char *v7; // r12
char *v8; // rdi
long long v9; // r13
bool v10; // al
v2 = *s;
if ( *s )
{
v3 = s;
v4 = 1;
do
{
++v3;
v4 += v2 == 44;
v2 = *v3;
}... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
MOVZX EAX,byte ptr [RDI]
TEST AL,AL
JZ 0x001014e0
MOV RDX,RDI
MOV R14D,0x1
NOP dword ptr [RAX + RAX*0x1]
LAB_00101428:
CMP AL,0x2c
SETZ AL
ADD RDX,0x1
MOVZX EAX,AL
ADD R14D,EAX
MOVZX EAX,byte ptr [RDX]
TEST AL,AL
JNZ 0x00101428
MOVSXD RDI,R14D
SHL ... | int [16] func0(char *param_1)
{
char cVar1;
char *__nptr;
long lVar2;
char *pcVar3;
size_t __size;
int iVar4;
long lVar5;
int iVar6;
int auVar7 [16];
cVar1 = *param_1;
if (cVar1 == '\0') {
__size = 4;
iVar6 = 1;
}
else {
iVar6 = 1;
pcVar3 = param_1;
do {
pcVar3 =... |
6,756 | func0 | #include <assert.h>
| int func0(int a) {
int perimeter = 4 * a;
return perimeter;
}
| int main() {
assert(func0(10) == 40);
assert(func0(5) == 20);
assert(func0(4) == 16);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
mov -0x14(%rbp),%eax
shl $0x2,%eax
mov %eax,-0x4(%rbp)
mov -0x4(%rbp),%eax
pop %rbp
retq
| func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov eax, [rbp+var_14]
shl eax, 2
mov [rbp+var_4], eax
mov eax, [rbp+var_4]
pop rbp
retn | long long func0(int a1)
{
return (unsigned int)(4 * a1);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV EAX,dword ptr [RBP + -0x14]
SHL EAX,0x2
MOV dword ptr [RBP + -0x4],EAX
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET | int func0(int param_1)
{
return param_1 << 2;
} |
6,757 | func0 | #include <assert.h>
| int func0(int a) {
int perimeter = 4 * a;
return perimeter;
}
| int main() {
assert(func0(10) == 40);
assert(func0(5) == 20);
assert(func0(4) == 16);
return 0;
}
| O1 | c | func0:
endbr64
lea 0x0(,%rdi,4),%eax
retq
| func0:
endbr64
lea eax, ds:0[rdi*4]
retn | long long func0(int a1)
{
return (unsigned int)(4 * a1);
} | func0:
ENDBR64
LEA EAX,[RDI*0x4]
RET | int func0(int param_1)
{
return param_1 * 4;
} |
6,758 | func0 | #include <assert.h>
| int func0(int a) {
int perimeter = 4 * a;
return perimeter;
}
| int main() {
assert(func0(10) == 40);
assert(func0(5) == 20);
assert(func0(4) == 16);
return 0;
}
| O2 | c | func0:
endbr64
lea 0x0(,%rdi,4),%eax
retq
nopl 0x0(%rax)
| func0:
endbr64
lea eax, ds:0[rdi*4]
retn | long long func0(int a1)
{
return (unsigned int)(4 * a1);
} | func0:
ENDBR64
LEA EAX,[RDI*0x4]
RET | int func0(int param_1)
{
return param_1 * 4;
} |
6,759 | func0 | #include <assert.h>
| int func0(int a) {
int perimeter = 4 * a;
return perimeter;
}
| int main() {
assert(func0(10) == 40);
assert(func0(5) == 20);
assert(func0(4) == 16);
return 0;
}
| O3 | c | func0:
endbr64
lea 0x0(,%rdi,4),%eax
retq
nopl 0x0(%rax)
| func0:
endbr64
lea eax, ds:0[rdi*4]
retn | long long func0(int a1)
{
return (unsigned int)(4 * a1);
} | func0:
ENDBR64
LEA EAX,[RDI*0x4]
RET | int func0(int param_1)
{
return param_1 * 4;
} |
6,760 | func0 | #include <stdio.h>
#include <math.h>
#include <assert.h>
double avg_calc(double *ls, int len) {
double mean = 0.0;
if (len <= 1) {
return ls[0];
}
for (int i = 0; i < len; i++) {
mean += ls[i];
}
mean /= len;
return mean;
}
| double func0(double *data, int len) {
if (len <= 1) {
return 0.0;
}
double mean = avg_calc(data, len);
double sd = 0.0;
for (int i = 0; i < len; i++) {
sd += (data[i] - mean) * (data[i] - mean);
}
sd = sqrt(sd / (len - 1));
return sd;
}
| int main() {
double data1[] = {4, 2, 5, 8, 6};
double data2[] = {1, 2, 3, 4, 5, 6, 7};
double data3[] = {5, 9, 10, 15, 6, 4};
assert(fabs(func0(data1, 5) - 2.23606797749979) < 1e-9);
assert(fabs(func0(data2, 7) - 2.160246899469287) < 1e-9);
assert(fabs(func0(data3, 6) - 4.070217029430577... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x30,%rsp
mov %rdi,-0x28(%rbp)
mov %esi,-0x2c(%rbp)
cmpl $0x1,-0x2c(%rbp)
jg 1228 <func0+0x22>
pxor %xmm0,%xmm0
jmpq 12d6 <func0+0xd0>
mov -0x2c(%rbp),%edx
mov -0x28(%rbp),%rax
mov %edx,%esi
mov %rax,%rdi
callq 1189 <avg_calc>
movq %xmm0... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_28], rdi
mov [rbp+var_2C], esi
cmp [rbp+var_2C], 1
jg short loc_122C
pxor xmm0, xmm0
jmp locret_12E8
loc_122C:
mov edx, [rbp+var_2C]
mov rax, [rbp+var_28]
mov esi, edx
mov rdi, rax
call avg_calc
movq ... | long long func0(long long a1, int a2)
{
long long result; // rax
int i; // [rsp+1Ch] [rbp-14h]
double v4; // [rsp+20h] [rbp-10h]
double v5; // [rsp+28h] [rbp-8h]
if ( a2 > 1 )
{
v5 = avg_calc(a1, (unsigned int)a2);
v4 = 0.0;
for ( i = 0; i < a2; ++i )
v4 = (*(double *)(8LL * i + a1) - v5... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x28],RDI
MOV dword ptr [RBP + -0x2c],ESI
CMP dword ptr [RBP + -0x2c],0x1
JG 0x0010122c
PXOR XMM0,XMM0
JMP 0x001012e8
LAB_0010122c:
MOV EDX,dword ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x28]
MOV ESI,EDX
MOV RDI,RAX
CALL 0x00101189
MOVQ RAX,XMM0... | double func0(long param_1,int param_2)
{
double dVar1;
int4 local_1c;
int8 local_18;
if (param_2 < 2) {
dVar1 = 0.0;
}
else {
dVar1 = (double)avg_calc(param_1,param_2);
local_18 = 0.0;
for (local_1c = 0; local_1c < param_2; local_1c = local_1c + 1) {
local_18 = (*(double *)(param_1... |
6,761 | func0 | #include <stdio.h>
#include <math.h>
#include <assert.h>
double avg_calc(double *ls, int len) {
double mean = 0.0;
if (len <= 1) {
return ls[0];
}
for (int i = 0; i < len; i++) {
mean += ls[i];
}
mean /= len;
return mean;
}
| double func0(double *data, int len) {
if (len <= 1) {
return 0.0;
}
double mean = avg_calc(data, len);
double sd = 0.0;
for (int i = 0; i < len; i++) {
sd += (data[i] - mean) * (data[i] - mean);
}
sd = sqrt(sd / (len - 1));
return sd;
}
| int main() {
double data1[] = {4, 2, 5, 8, 6};
double data2[] = {1, 2, 3, 4, 5, 6, 7};
double data3[] = {5, 9, 10, 15, 6, 4};
assert(fabs(func0(data1, 5) - 2.23606797749979) < 1e-9);
assert(fabs(func0(data2, 7) - 2.160246899469287) < 1e-9);
assert(fabs(func0(data3, 6) - 4.070217029430577... | O1 | c | func0:
endbr64
push %rbp
push %rbx
sub $0x18,%rsp
cmp $0x1,%esi
jle 1240 <func0+0x80>
mov %rdi,%rbp
mov %esi,%ebx
callq 1189 <avg_calc>
movapd %xmm0,%xmm2
mov %rbp,%rax
lea -0x1(%rbx),%edx
lea 0x8(%rbp,%rdx,8),%rdx
pxor %xmm0,%xmm0
movsd (%rax),%xmm1
subsd %xmm2,%xmm1
mulsd %xmm1,%xmm1... | func0:
endbr64
cmp esi, 1
jle short loc_1230
push rbp
push rbx
sub rsp, 8
mov rbp, rdi
mov ebx, esi
call avg_calc
movapd xmm2, xmm0
mov rax, rbp
lea edx, [rbx-1]
lea rdx, [rbp+rdx*8+8]
pxor xmm0, xmm0
loc_11EC:
movsd xmm1, qword ptr [rax]
subsd xmm1, xmm2
mulsd xmm1, x... | double func0(double *a1, int a2)
{
double v2; // xmm2_8
double *v3; // rax
double v4; // xmm0_8
double v5; // xmm0_8
if ( a2 <= 1 )
return 0.0;
v2 = avg_calc();
v3 = a1;
v4 = 0.0;
do
{
v4 = v4 + (*v3 - v2) * (*v3 - v2);
++v3;
}
while ( v3 != &a1[(unsigned int)(a2 - 1) + 1] );
v5 ... | func0:
ENDBR64
CMP ESI,0x1
JLE 0x00101230
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RBP,RDI
MOV EBX,ESI
CALL 0x00101189
MOVAPD XMM2,XMM0
MOV RAX,RBP
LEA EDX,[RBX + -0x1]
LEA RDX,[RBP + RDX*0x8 + 0x8]
PXOR XMM0,XMM0
LAB_001011ec:
MOVSD XMM1,qword ptr [RAX]
SUBSD XMM1,XMM2
MULSD XMM1,XMM1
ADDSD XMM0,XMM1
ADD RAX,0x8
CMP RAX,RDX
... | double func0(double *param_1,int param_2)
{
double *pdVar1;
double dVar2;
double dVar3;
if (1 < param_2) {
dVar2 = (double)avg_calc();
pdVar1 = param_1 + (ulong)(param_2 - 1) + 1;
dVar3 = 0.0;
do {
dVar3 = dVar3 + (*param_1 - dVar2) * (*param_1 - dVar2);
param_1 = param_1 + 1;
... |
6,762 | func0 | #include <stdio.h>
#include <math.h>
#include <assert.h>
double avg_calc(double *ls, int len) {
double mean = 0.0;
if (len <= 1) {
return ls[0];
}
for (int i = 0; i < len; i++) {
mean += ls[i];
}
mean /= len;
return mean;
}
| double func0(double *data, int len) {
if (len <= 1) {
return 0.0;
}
double mean = avg_calc(data, len);
double sd = 0.0;
for (int i = 0; i < len; i++) {
sd += (data[i] - mean) * (data[i] - mean);
}
sd = sqrt(sd / (len - 1));
return sd;
}
| int main() {
double data1[] = {4, 2, 5, 8, 6};
double data2[] = {1, 2, 3, 4, 5, 6, 7};
double data3[] = {5, 9, 10, 15, 6, 4};
assert(fabs(func0(data1, 5) - 2.23606797749979) < 1e-9);
assert(fabs(func0(data2, 7) - 2.160246899469287) < 1e-9);
assert(fabs(func0(data3, 6) - 4.070217029430577... | O2 | c | func0:
endbr64
cmp $0x1,%esi
jle 1450 <func0+0x80>
lea -0x1(%rsi),%eax
pxor %xmm3,%xmm3
mov %rax,%rcx
lea 0x8(%rdi,%rax,8),%rdx
movapd %xmm3,%xmm0
mov %rdi,%rax
addsd (%rax),%xmm0
add $0x8,%rax
cmp %rax,%rdx
jne 13f0 <func0+0x20>
pxor %xmm1,%xmm1
movapd %xmm3,%xmm2
cvtsi2sd %esi,%xmm1
di... | func0:
endbr64
cmp esi, 1
jle short loc_1438
lea eax, [rsi-1]
pxor xmm3, xmm3
mov rcx, rax
lea rdx, [rdi+rax*8+8]
movapd xmm0, xmm3
mov rax, rdi
nop
loc_13E0:
addsd xmm0, qword ptr [rax]
add rax, 8
cmp rdx, rax
jnz short loc_13E0
pxor xmm1, xmm1
movapd xmm2, xmm3
cvtsi2sd x... | double func0(double *a1, int a2)
{
long long v2; // rcx
long long v3; // rdx
double v4; // xmm0_8
double *v5; // rax
double v6; // xmm2_8
double v7; // xmm0_8
double v8; // xmm1_8
double v9; // xmm2_8
if ( a2 <= 1 )
return 0.0;
v2 = (unsigned int)(a2 - 1);
v3 = (long long)&a1[v2 + 1];
v4 =... | func0:
ENDBR64
CMP ESI,0x1
JLE 0x00101438
LEA EAX,[RSI + -0x1]
PXOR XMM3,XMM3
MOV RCX,RAX
LEA RDX,[RDI + RAX*0x8 + 0x8]
MOVAPD XMM0,XMM3
MOV RAX,RDI
NOP
LAB_001013e0:
ADDSD XMM0,qword ptr [RAX]
ADD RAX,0x8
CMP RDX,RAX
JNZ 0x001013e0
PXOR XMM1,XMM1
MOVAPD XMM2,XMM3
CVTSI2SD XMM1,ESI
DIVSD XMM0,XMM1
NOP dword ptr [RAX]
L... | double func0(double *param_1,int param_2)
{
double *pdVar1;
double *pdVar2;
double dVar3;
double dVar4;
double dVar5;
if (param_2 < 2) {
return 0.0;
}
pdVar1 = param_1 + (ulong)(param_2 - 1U) + 1;
dVar5 = 0.0;
pdVar2 = param_1;
dVar3 = dVar5;
do {
dVar3 = dVar3 + *pdVar2;
pdVar2 ... |
6,763 | func0 | #include <stdio.h>
#include <math.h>
#include <assert.h>
double avg_calc(double *ls, int len) {
double mean = 0.0;
if (len <= 1) {
return ls[0];
}
for (int i = 0; i < len; i++) {
mean += ls[i];
}
mean /= len;
return mean;
}
| double func0(double *data, int len) {
if (len <= 1) {
return 0.0;
}
double mean = avg_calc(data, len);
double sd = 0.0;
for (int i = 0; i < len; i++) {
sd += (data[i] - mean) * (data[i] - mean);
}
sd = sqrt(sd / (len - 1));
return sd;
}
| int main() {
double data1[] = {4, 2, 5, 8, 6};
double data2[] = {1, 2, 3, 4, 5, 6, 7};
double data3[] = {5, 9, 10, 15, 6, 4};
assert(fabs(func0(data1, 5) - 2.23606797749979) < 1e-9);
assert(fabs(func0(data2, 7) - 2.160246899469287) < 1e-9);
assert(fabs(func0(data3, 6) - 4.070217029430577... | O3 | c | func0:
endbr64
cmp $0x1,%esi
jle 1490 <func0+0xf0>
mov %esi,%edx
pxor %xmm4,%xmm4
mov %rdi,%rax
shr %edx
movapd %xmm4,%xmm0
shl $0x4,%rdx
add %rdi,%rdx
nopl 0x0(%rax,%rax,1)
movsd (%rax),%xmm1
add $0x10,%rax
addsd %xmm1,%xmm0
movsd -0x8(%rax),%xmm1
addsd %xmm1,%xmm0
cmp %rax,%rdx
jne ... | func0:
endbr64
cmp esi, 1
jle loc_1468
mov ecx, esi
mov rdx, rdi
pxor xmm0, xmm0
mov rax, rdi
shr ecx, 1
shl rcx, 4
add rcx, rdi
nop word ptr [rax+rax+00h]
loc_13C8:
addsd xmm0, qword ptr [rax]
add rax, 10h
addsd xmm0, qword ptr [rax-8]
cmp rcx, rax
jnz short loc_1... | double func0(__m128d *a1, int a2)
{
__m128d *v2; // rdx
__m128d v3; // xmm0
double *v4; // rax
double *m128d_f64; // rcx
double v6; // xmm0_8
long long v7; // rax
double v8; // xmm0_8
__m128d v9; // xmm2
__m128d v10; // xmm4
__m128d v11; // xmm1
__m128d v12; // xmm1
__m128d v13; // xmm1
doubl... | func0:
ENDBR64
CMP ESI,0x1
JLE 0x00101468
MOV ECX,ESI
MOV RDX,RDI
PXOR XMM0,XMM0
MOV RAX,RDI
SHR ECX,0x1
SHL RCX,0x4
ADD RCX,RDI
NOP word ptr [RAX + RAX*0x1]
LAB_001013c8:
ADDSD XMM0,qword ptr [RAX]
ADD RAX,0x10
ADDSD XMM0,qword ptr [RAX + -0x8]
CMP RCX,RAX
JNZ 0x001013c8
MOV EAX,ESI
AND EAX,0xfffffffe
TEST SIL,0x1
JZ ... | double func0(double *param_1,uint param_2)
{
double dVar1;
uint uVar2;
double *pdVar3;
double *pdVar4;
double dVar5;
double dVar6;
if ((int)param_2 < 2) {
return 0.0;
}
dVar5 = 0.0;
pdVar3 = param_1;
do {
pdVar4 = pdVar3 + 2;
dVar5 = dVar5 + *pdVar3 + pdVar3[1];
pdVar3 = pdVar4... |
6,764 | func0 | #include <stdio.h>
#include <assert.h>
#include <stdlib.h>
| int* func0(int* list1, int length, int* result_size) {
*result_size = (length + 1) / 2; // calculate size of the result array
int* result = (int *)malloc(*result_size * sizeof(int));
// Iterate taking every second element
int j = 0;
for (int i = 0; i < length; i += 2) {
result[j++] ... | int main() {
int list1[] = {2, 0, 3, 4, 0, 2, 8, 3, 4, 2};
int list1_size = 10;
int* result1;
int result1_size;
result1 = func0(list1, list1_size, &result1_size);
int expected_result1[] = {2, 3, 0, 8, 4};
assert(result1_size == 5);
for (int i = 0; i < result1_size; 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
add $0x1,%eax
mov %eax,%edx
shr $0x1f,%edx
add %edx,%eax
sar %eax
mov %eax,%edx
mov -0x28(%rbp),%rax
mov %edx,(%rax)
mov -0x28(%rbp),%r... | 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]
add eax, 1
mov edx, eax
shr edx, 1Fh
add eax, edx
sar eax, 1
mov edx, eax
mov rax, [rbp+var_28]
mov [rax], edx
mov rax,... | _DWORD * func0(long long a1, int a2, int *a3)
{
int v3; // eax
int v5; // [rsp+20h] [rbp-10h]
int i; // [rsp+24h] [rbp-Ch]
_DWORD *v7; // [rsp+28h] [rbp-8h]
*a3 = (a2 + 1) / 2;
v7 = malloc(4LL * *a3);
v5 = 0;
for ( i = 0; i < a2; i += 2 )
{
v3 = v5++;
v7[v3] = *(_DWORD *)(4LL * i + a1);
}
... | 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]
ADD EAX,0x1
MOV EDX,EAX
SHR EDX,0x1f
ADD EAX,EDX
SAR EAX,0x1
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX],EDX
MOV RAX,qword ... | void * func0(long param_1,int param_2,int *param_3)
{
void *pvVar1;
int4 local_18;
int4 local_14;
*param_3 = (param_2 + 1) / 2;
pvVar1 = malloc((long)*param_3 << 2);
local_18 = 0;
for (local_14 = 0; local_14 < param_2; local_14 = local_14 + 2) {
*(int4 *)((long)local_18 * 4 + (long)pvVar1) =
... |
6,765 | func0 | #include <stdio.h>
#include <assert.h>
#include <stdlib.h>
| int* func0(int* list1, int length, int* result_size) {
*result_size = (length + 1) / 2; // calculate size of the result array
int* result = (int *)malloc(*result_size * sizeof(int));
// Iterate taking every second element
int j = 0;
for (int i = 0; i < length; i += 2) {
result[j++] ... | int main() {
int list1[] = {2, 0, 3, 4, 0, 2, 8, 3, 4, 2};
int list1_size = 10;
int* result1;
int result1_size;
result1 = func0(list1, list1_size, &result1_size);
int expected_result1[] = {2, 3, 0, 8, 4};
assert(result1_size == 5);
for (int i = 0; i < result1_size; i+... | O1 | c | func0:
endbr64
push %rbp
push %rbx
sub $0x8,%rsp
mov %rdi,%rbp
mov %esi,%ebx
lea 0x1(%rsi),%eax
mov %eax,%edi
shr $0x1f,%edi
add %eax,%edi
sar %edi
mov %edi,(%rdx)
movslq %edi,%rdi
shl $0x2,%rdi
callq 10b0 <malloc@plt>
test %ebx,%ebx
jle 11ea <func0+0x41>
mov $0x0,%edx
mov ... | func0:
endbr64
push rbp
push rbx
sub rsp, 8
mov rbp, rdi
mov ebx, esi
lea eax, [rsi+1]
mov edi, eax
shr edi, 1Fh
add edi, eax
sar edi, 1
mov [rdx], edi
movsxd rdi, edi
shl rdi, 2
call _malloc
test ebx, ebx
jle short loc_11EA
mov edx, 0
loc_11DB:
mov ecx, ... | long long func0(long long a1, int a2, int *a3)
{
int v4; // edi
long long result; // rax
long long v6; // rdx
v4 = (a2 + 1) / 2;
*a3 = v4;
result = malloc(4LL * v4);
if ( a2 > 0 )
{
v6 = 0LL;
do
{
*(_DWORD *)(result + 2 * v6) = *(_DWORD *)(a1 + 4 * v6);
v6 += 2LL;
}
whi... | func0:
ENDBR64
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RBP,RDI
MOV EBX,ESI
LEA EAX,[RSI + 0x1]
MOV EDI,EAX
SHR EDI,0x1f
ADD EDI,EAX
SAR EDI,0x1
MOV dword ptr [RDX],EDI
MOVSXD RDI,EDI
SHL RDI,0x2
CALL 0x001010b0
TEST EBX,EBX
JLE 0x001011ea
MOV EDX,0x0
LAB_001011db:
MOV ECX,dword ptr [RBP + RDX*0x4]
MOV dword ptr [RAX + RDX*0x... | void func0(long param_1,int param_2,int *param_3)
{
void *pvVar1;
long lVar2;
int iVar3;
iVar3 = (param_2 + 1) / 2;
*param_3 = iVar3;
pvVar1 = malloc((long)iVar3 << 2);
if (0 < param_2) {
lVar2 = 0;
do {
*(int4 *)((long)pvVar1 + lVar2 * 2) = *(int4 *)(param_1 + lVar2 * 4);
lVar2 = ... |
6,766 | func0 | #include <stdio.h>
#include <assert.h>
#include <stdlib.h>
| int* func0(int* list1, int length, int* result_size) {
*result_size = (length + 1) / 2; // calculate size of the result array
int* result = (int *)malloc(*result_size * sizeof(int));
// Iterate taking every second element
int j = 0;
for (int i = 0; i < length; i += 2) {
result[j++] ... | int main() {
int list1[] = {2, 0, 3, 4, 0, 2, 8, 3, 4, 2};
int list1_size = 10;
int* result1;
int result1_size;
result1 = func0(list1, list1_size, &result1_size);
int expected_result1[] = {2, 3, 0, 8, 4};
assert(result1_size == 5);
for (int i = 0; i < result1_size; i+... | O2 | c | func0:
endbr64
lea 0x1(%rsi),%eax
push %rbp
mov %rdi,%rbp
mov %eax,%edi
push %rbx
mov %esi,%ebx
shr $0x1f,%edi
add %eax,%edi
sar %edi
sub $0x8,%rsp
mov %edi,(%rdx)
movslq %edi,%rdi
shl $0x2,%rdi
callq 10b0 <malloc@plt>
test %ebx,%ebx
jle 142f <func0+0x3f>
xor %edx,%edx
mov ... | func0:
endbr64
lea eax, [rsi+1]
push rbp
mov rbp, rdi
mov edi, eax
push rbx
mov ebx, esi
shr edi, 1Fh
add edi, eax
sar edi, 1
sub rsp, 8
mov [rdx], edi
movsxd rdi, edi
shl rdi, 2
call _malloc
test ebx, ebx
jle short loc_142F
xor edx, edx
nop
loc_1420:
mov ... | long long func0(long long a1, int a2, int *a3)
{
int v4; // edi
long long result; // rax
long long v6; // rdx
v4 = (a2 + 1) / 2;
*a3 = v4;
result = malloc(4LL * v4);
if ( a2 > 0 )
{
v6 = 0LL;
do
{
*(_DWORD *)(result + 2 * v6) = *(_DWORD *)(a1 + 4 * v6);
v6 += 2LL;
}
whi... | func0:
ENDBR64
LEA EAX,[RSI + 0x1]
PUSH RBP
MOV RBP,RDI
MOV EDI,EAX
PUSH RBX
MOV EBX,ESI
SHR EDI,0x1f
ADD EDI,EAX
SAR EDI,0x1
SUB RSP,0x8
MOV dword ptr [RDX],EDI
MOVSXD RDI,EDI
SHL RDI,0x2
CALL 0x001010b0
TEST EBX,EBX
JLE 0x0010142f
XOR EDX,EDX
NOP
LAB_00101420:
MOV ECX,dword ptr [RBP + RDX*0x4]
MOV dword ptr [RAX + RD... | void func0(long param_1,int param_2,int *param_3)
{
void *pvVar1;
long lVar2;
int iVar3;
iVar3 = (param_2 + 1) / 2;
*param_3 = iVar3;
pvVar1 = malloc((long)iVar3 << 2);
if (0 < param_2) {
lVar2 = 0;
do {
*(int4 *)((long)pvVar1 + lVar2 * 2) = *(int4 *)(param_1 + lVar2 * 4);
lVar2 = ... |
6,767 | func0 | #include <stdio.h>
#include <assert.h>
#include <stdlib.h>
| int* func0(int* list1, int length, int* result_size) {
*result_size = (length + 1) / 2; // calculate size of the result array
int* result = (int *)malloc(*result_size * sizeof(int));
// Iterate taking every second element
int j = 0;
for (int i = 0; i < length; i += 2) {
result[j++] ... | int main() {
int list1[] = {2, 0, 3, 4, 0, 2, 8, 3, 4, 2};
int list1_size = 10;
int* result1;
int result1_size;
result1 = func0(list1, list1_size, &result1_size);
int expected_result1[] = {2, 3, 0, 8, 4};
assert(result1_size == 5);
for (int i = 0; i < result1_size; i+... | O3 | c | func0:
endbr64
lea 0x1(%rsi),%eax
push %rbp
mov %esi,%ebp
push %rbx
mov %rdi,%rbx
mov %eax,%edi
shr $0x1f,%edi
add %eax,%edi
sar %edi
sub $0x8,%rsp
mov %edi,(%rdx)
movslq %edi,%rdi
shl $0x2,%rdi
callq 10b0 <malloc@plt>
test %ebp,%ebp
jle 148d <func0+0xcd>
lea -0x1(%rbp),%edx
c... | func0:
endbr64
lea eax, [rsi+1]
push rbp
mov ebp, esi
push rbx
mov rbx, rdi
mov edi, eax
shr edi, 1Fh
add edi, eax
sar edi, 1
sub rsp, 8
mov [rdx], edi
movsxd rdi, edi
shl rdi, 2; size
call _malloc
mov rdx, rax
test ebp, ebp
jle loc_1425
lea eax, [rbp-1]
... | char * func0(long long a1, int a2, int *a3)
{
int v5; // edi
char *v6; // rdx
long long v7; // rax
unsigned int v8; // ecx
int v9; // esi
int v10; // eax
long long v11; // rdi
long long v12; // rsi
v5 = (a2 + 1) / 2;
*a3 = v5;
v6 = (char *)malloc(4LL * v5);
if ( a2 > 0 )
{
if ( (unsigned ... | func0:
ENDBR64
LEA EAX,[RSI + 0x1]
PUSH RBP
MOV EBP,ESI
PUSH RBX
MOV RBX,RDI
MOV EDI,EAX
SHR EDI,0x1f
ADD EDI,EAX
SAR EDI,0x1
SUB RSP,0x8
MOV dword ptr [RDX],EDI
MOVSXD RDI,EDI
SHL RDI,0x2
CALL 0x001010b0
MOV RDX,RAX
TEST EBP,EBP
JLE 0x00101425
LEA EAX,[RBP + -0x1]
CMP EAX,0x7
JBE 0x0010142f
SHR EAX,0x3
MOV ESI,EAX
XOR... | void * func0(long param_1,int param_2,int *param_3)
{
int4 *puVar1;
long lVar2;
int4 *puVar3;
int4 uVar4;
int4 uVar5;
int4 uVar6;
uint uVar7;
void *pvVar8;
long lVar9;
int iVar10;
int iVar11;
iVar11 = (param_2 + 1) / 2;
*param_3 = iVar11;
pvVar8 = malloc((long)iVar11 << 2);
if (0 < par... |
6,768 | func0 |
#include <stdio.h>
#include <string.h>
#include <regex.h>
#include <assert.h>
| const char* func0(const char* text) {
regex_t regex;
int ret;
const char* patterns = "ab*?";
ret = regcomp(®ex, patterns, REG_EXTENDED);
if (ret) {
return "Regex compilation failed";
}
ret = regexec(®ex, text, 0, NULL, 0);
regfree(®ex);
if... | int main() {
assert(strcmp(func0("ac"), "Found a match!") == 0);
assert(strcmp(func0("dc"), "Not matched!") == 0);
assert(strcmp(func0("abba"), "Found a match!") == 0);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x70,%rsp
mov %rdi,-0x68(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
lea 0xdf9(%rip),%rax
mov %rax,-0x58(%rbp)
mov -0x58(%rbp),%rcx
lea -0x50(%rbp),%rax
mov $0x1,%edx
mov %rcx,%rsi
mov %rax,%rdi
callq 10d0 <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, aAb; "ab*?"
mov [rbp+pattern], rax
mov rcx, [rbp+pattern]
lea rax, [rbp+preg]
mov edx, 1; cflags
mov rsi, rcx; pattern
mov rdi, rax; p... | 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, "ab*?", 1) )
return "Regex compilation failed";
v2 = regexec(&preg, a1, 0LL, 0LL, 0);
regfree(&pre... | 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 0x001010d0
MOV dword p... | 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,"ab*?",1);
if (iVar1 == 0) {
iVar1 = regexec(&local_58,param_1,0,(regmatch_t *)0x0,0);
regfree(&local_58);
if (i... |
6,769 | func0 |
#include <stdio.h>
#include <string.h>
#include <regex.h>
#include <assert.h>
| const char* func0(const char* text) {
regex_t regex;
int ret;
const char* patterns = "ab*?";
ret = regcomp(®ex, patterns, REG_EXTENDED);
if (ret) {
return "Regex compilation failed";
}
ret = regexec(®ex, text, 0, NULL, 0);
regfree(®ex);
if... | int main() {
assert(strcmp(func0("ac"), "Found a match!") == 0);
assert(strcmp(func0("dc"), "Not matched!") == 0);
assert(strcmp(func0("abba"), "Found a match!") == 0);
return 0;
}
| O1 | c | func0:
endbr64
push %rbp
push %rbx
sub $0x58,%rsp
mov %rdi,%rbx
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
mov %rsp,%rdi
mov $0x1,%edx
lea 0xe44(%rip),%rsi
callq 10c0 <regcomp@plt>
mov %eax,%edx
lea 0xe01(%rip),%rax
test %edx,%edx
je 121e <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, aAb; "ab*?"
call _regcomp
mov edx, eax
lea rax, aRegexCompilati; "Regex compilation failed"
test edx, edx
jz short l... | 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, "ab*?", 1LL);
result = "Regex compilation failed";
if ( !v1 )
{
v3 = regexec(v4, a1, 0LL, 0LL, 0LL);
regfree(v4... | 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,[0x102039]
CALL 0x001010d0
MOV EDX,EAX
LEA RAX,[0x102004]
TEST EDX,EDX
JZ 0x0010123e
LAB_00101227:
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,"ab*?",1);
pcVar2 = "Regex compilation failed";
if (iVar1 == 0) {
iVar1 = regexec(&rStack_68,param_1,0,(regmatch_t *... |
6,770 | func0 |
#include <stdio.h>
#include <string.h>
#include <regex.h>
#include <assert.h>
| const char* func0(const char* text) {
regex_t regex;
int ret;
const char* patterns = "ab*?";
ret = regcomp(®ex, patterns, REG_EXTENDED);
if (ret) {
return "Regex compilation failed";
}
ret = regexec(®ex, text, 0, NULL, 0);
regfree(®ex);
if... | int main() {
assert(strcmp(func0("ac"), "Found a match!") == 0);
assert(strcmp(func0("dc"), "Not matched!") == 0);
assert(strcmp(func0("abba"), "Found a match!") == 0);
return 0;
}
| O2 | c | func0:
endbr64
push %r12
mov $0x1,%edx
lea 0xd77(%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 10c0 <regcomp@plt>
mov %eax,%r8d
lea 0xd15(%rip),%rax
test %r8d,%r8d
jne 1321 <func0+0x71>
x... | func0:
endbr64
push r12
mov edx, 1
lea rsi, aAb; "ab*?"
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 failed"
test r8d, r8... | 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, "ab*?", 1LL);
result = "Regex compilation failed";
if ( !v1 )
{
v3 = regexec(v4, a1, 0LL, 0LL);
regfree(v4);
... | func0:
ENDBR64
PUSH R12
MOV EDX,0x1
LEA RSI,[0x102039]
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 0x001010d0
MOV R8D,EAX
LEA RAX,[0x102004]
TEST R8D,R8D
JNZ 0x00101331
XOR EDX,EDX
XOR ECX,ECX
MOV RSI,RBP
MOV RDI,R12
CALL 0x001010... | char * func0(char *param_1)
{
int iVar1;
char *pcVar2;
long in_FS_OFFSET;
regex_t rStack_68;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
iVar1 = regcomp(&rStack_68,"ab*?",1);
pcVar2 = "Regex compilation failed";
if (iVar1 == 0) {
iVar1 = regexec(&rStack_68,param_1,0,(regmatch_t *... |
6,771 | func0 |
#include <stdio.h>
#include <string.h>
#include <regex.h>
#include <assert.h>
| const char* func0(const char* text) {
regex_t regex;
int ret;
const char* patterns = "ab*?";
ret = regcomp(®ex, patterns, REG_EXTENDED);
if (ret) {
return "Regex compilation failed";
}
ret = regexec(®ex, text, 0, NULL, 0);
regfree(®ex);
if... | int main() {
assert(strcmp(func0("ac"), "Found a match!") == 0);
assert(strcmp(func0("dc"), "Not matched!") == 0);
assert(strcmp(func0("abba"), "Found a match!") == 0);
return 0;
}
| O3 | c | func0:
endbr64
push %r12
mov $0x1,%edx
lea 0xd77(%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 10c0 <regcomp@plt>
mov %eax,%r8d
lea 0xd15(%rip),%rax
test %r8d,%r8d
jne 1321 <func0+0x71>
x... | func0:
endbr64
push rbp
mov edx, 1; cflags
lea rsi, pattern; "ab*?"
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 compilation failed"
... | 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, "ab*?", 1);
result = "Regex compilation failed";
if ( !v1 )
{
v3 ... | func0:
ENDBR64
PUSH RBP
MOV EDX,0x1
LEA RSI,[0x102039]
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 0x001010d0
MOV EDX,EAX
LEA RAX,[0x102004]
TEST EDX,EDX
JNZ 0x00101331
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,"ab*?",1);
pcVar2 = "Regex compilation failed";
if (iVar1 == 0) {
iVar1 = regexec(&rStack_68,param_1,0,(regmatch_t *... |
6,772 | func0 | #include <stdio.h>
#include <assert.h>
#include <stdlib.h>
typedef struct {
const char* key;
int value;
} KeyValuePair;
typedef struct {
KeyValuePair* pairs;
int size;
} Dictionary;
typedef struct {
int* elements;
int size;
Dictionary* dict;
} Tuple;
| Tuple* func0(Tuple* test_tup, Dictionary* test_dict) {
int new_size = test_tup->size + 1;
Tuple* new_tuple = malloc(sizeof(Tuple));
new_tuple->elements = malloc(new_size * sizeof(int));
for (int i = 0; i < test_tup->size; i++) {
new_tuple->elements[i] = test_tup->elements[i];
}
ne... | int main() {
int arr1[3] = {4, 5, 6};
KeyValuePair pairs1[3] = {{"MSAM", 1}, {"is", 2}, {"best", 3}};
Dictionary dict1 = {pairs1, 3};
Tuple tup1 = {arr1, 3, NULL};
Tuple* res_tup1 = func0(&tup1, &dict1);
assert(res_tup1->size == 4);
assert(res_tup1->elements[0] == 4);
assert(re... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %rdi,-0x18(%rbp)
mov %rsi,-0x20(%rbp)
mov -0x18(%rbp),%rax
mov 0x8(%rax),%eax
add $0x1,%eax
mov %eax,-0xc(%rbp)
mov $0x18,%edi
callq 10d0 <malloc@plt>
mov %rax,-0x8(%rbp)
mov -0xc(%rbp),%eax
cltq
shl $0x2,%rax
mov %rax,%... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_18], rdi
mov [rbp+var_20], rsi
mov rax, [rbp+var_18]
mov eax, [rax+8]
add eax, 1
mov [rbp+var_C], eax
mov edi, 18h; size
call _malloc
mov [rbp+var_8], rax
mov eax, [rbp+var_C]
cdqe
shl rax, 2
mov rdi... | _DWORD * func0(long long a1, long long a2)
{
int i; // [rsp+10h] [rbp-10h]
int v4; // [rsp+14h] [rbp-Ch]
_DWORD *v5; // [rsp+18h] [rbp-8h]
v4 = *(_DWORD *)(a1 + 8) + 1;
v5 = malloc(0x18uLL);
*(_QWORD *)v5 = malloc(4LL * v4);
for ( i = 0; i < *(_DWORD *)(a1 + 8); ++i )
*(_DWORD *)(*(_QWORD *)v5 + 4LL ... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x18],RDI
MOV qword ptr [RBP + -0x20],RSI
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x8]
ADD EAX,0x1
MOV dword ptr [RBP + -0xc],EAX
MOV EDI,0x18
CALL 0x001010d0
MOV qword ptr [RBP + -0x8],RAX
MOV EAX,dword ptr [RBP + -0xc]
CDQE
SHL RA... | long * func0(long *param_1,long param_2)
{
int iVar1;
long *plVar2;
void *pvVar3;
int local_18;
iVar1 = *(int *)(param_1 + 1);
plVar2 = (long *)malloc(0x18);
pvVar3 = malloc((long)(iVar1 + 1) << 2);
*plVar2 = (long)pvVar3;
for (local_18 = 0; local_18 < *(int *)(param_1 + 1); local_18 = local_18 + ... |
6,773 | func0 | #include <stdio.h>
#include <assert.h>
#include <stdlib.h>
typedef struct {
const char* key;
int value;
} KeyValuePair;
typedef struct {
KeyValuePair* pairs;
int size;
} Dictionary;
typedef struct {
int* elements;
int size;
Dictionary* dict;
} Tuple;
| Tuple* func0(Tuple* test_tup, Dictionary* test_dict) {
int new_size = test_tup->size + 1;
Tuple* new_tuple = malloc(sizeof(Tuple));
new_tuple->elements = malloc(new_size * sizeof(int));
for (int i = 0; i < test_tup->size; i++) {
new_tuple->elements[i] = test_tup->elements[i];
}
ne... | int main() {
int arr1[3] = {4, 5, 6};
KeyValuePair pairs1[3] = {{"MSAM", 1}, {"is", 2}, {"best", 3}};
Dictionary dict1 = {pairs1, 3};
Tuple tup1 = {arr1, 3, NULL};
Tuple* res_tup1 = func0(&tup1, &dict1);
assert(res_tup1->size == 4);
assert(res_tup1->elements[0] == 4);
assert(re... | O1 | c | func0:
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
mov %rdi,%r14
mov %rsi,%r12
mov 0x8(%rdi),%ebx
lea 0x1(%rbx),%r13d
mov $0x18,%edi
callq 10d0 <malloc@plt>
mov %rax,%rbp
movslq %r13d,%rdi
shl $0x2,%rdi
callq 10d0 <malloc@plt>
mov %rax,0x0(%rbp)
test %ebx,%ebx
jle ... | func0:
endbr64
push r14
push r13
push r12
push rbp
push rbx
mov r14, rdi
mov r12, rsi
mov ebx, [rdi+8]
lea r13d, [rbx+1]
mov edi, 18h
call _malloc
mov rbp, rax
movsxd rdi, r13d
shl rdi, 2
call _malloc
mov [rbp+0], rax
test ebx, ebx
jle short loc_1221
mov ... | long long func0(long long a1, long long a2)
{
int v2; // ebx
int v3; // r13d
long long v4; // rbp
long long v5; // rax
v2 = *(_DWORD *)(a1 + 8);
v3 = v2 + 1;
v4 = malloc(24LL);
*(_QWORD *)v4 = malloc(4LL * (v2 + 1));
if ( v2 > 0 )
{
v5 = 0LL;
do
{
*(_DWORD *)(*(_QWORD *)v4 + 4 * ... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV R14,RDI
MOV R12,RSI
MOV EBX,dword ptr [RDI + 0x8]
LEA R13D,[RBX + 0x1]
MOV EDI,0x18
CALL 0x001010d0
MOV RBP,RAX
MOVSXD RDI,R13D
SHL RDI,0x2
CALL 0x001010d0
MOV qword ptr [RBP],RAX
TEST EBX,EBX
JLE 0x00101221
MOV EAX,0x0
LAB_00101208:
MOV RDX,qword ptr [R14... | long * func0(long *param_1,long param_2)
{
int iVar1;
long *plVar2;
void *pvVar3;
long lVar4;
int iVar5;
iVar5 = (int)param_1[1];
iVar1 = iVar5 + 1;
plVar2 = (long *)malloc(0x18);
pvVar3 = malloc((long)iVar1 << 2);
*plVar2 = (long)pvVar3;
if (0 < iVar5) {
lVar4 = 0;
do {
*(int4 *... |
6,774 | func0 | #include <stdio.h>
#include <assert.h>
#include <stdlib.h>
typedef struct {
const char* key;
int value;
} KeyValuePair;
typedef struct {
KeyValuePair* pairs;
int size;
} Dictionary;
typedef struct {
int* elements;
int size;
Dictionary* dict;
} Tuple;
| Tuple* func0(Tuple* test_tup, Dictionary* test_dict) {
int new_size = test_tup->size + 1;
Tuple* new_tuple = malloc(sizeof(Tuple));
new_tuple->elements = malloc(new_size * sizeof(int));
for (int i = 0; i < test_tup->size; i++) {
new_tuple->elements[i] = test_tup->elements[i];
}
ne... | int main() {
int arr1[3] = {4, 5, 6};
KeyValuePair pairs1[3] = {{"MSAM", 1}, {"is", 2}, {"best", 3}};
Dictionary dict1 = {pairs1, 3};
Tuple tup1 = {arr1, 3, NULL};
Tuple* res_tup1 = func0(&tup1, &dict1);
assert(res_tup1->size == 4);
assert(res_tup1->elements[0] == 4);
assert(re... | O2 | c | func0:
endbr64
push %r15
push %r14
mov %rsi,%r14
push %r13
mov %rdi,%r13
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
mov 0x8(%rdi),%r15d
mov $0x18,%edi
callq 10d0 <malloc@plt>
lea 0x1(%r15),%ebx
mov %rax,%r12
movslq %ebx,%rbp
shl $0x2,%rbp
mov %rbp,%rdi
callq 10d0 <malloc@plt>
m... | func0:
endbr64
push r15
mov r15, rdi
push r14
mov r14, rsi
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov ebp, [rdi+8]
mov edi, 18h
call _malloc
lea ebx, [rbp+1]
mov r12, rax
movsxd r13, ebx
shl r13, 2
mov rdi, r13
call _malloc
mov [r12], rax
test ... | long long func0(long long *a1, long long a2)
{
int v2; // ebp
int v3; // ebx
long long v4; // r12
long long v5; // rax
long long v6; // rdi
long long i; // rdx
long long result; // rax
v2 = *((_DWORD *)a1 + 2);
v3 = v2 + 1;
v4 = malloc(24LL);
v5 = malloc(4LL * (v2 + 1));
*(_QWORD *)v4 = v5;
... | func0:
ENDBR64
PUSH R15
MOV R15,RDI
PUSH R14
MOV R14,RSI
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV EBP,dword ptr [RDI + 0x8]
MOV EDI,0x18
CALL 0x001010d0
LEA EBX,[RBP + 0x1]
MOV R12,RAX
MOVSXD R13,EBX
SHL R13,0x2
MOV RDI,R13
CALL 0x001010d0
MOV qword ptr [R12],RAX
TEST EBP,EBP
JLE 0x001017af
MOV RDI,qword ptr... | int8 * func0(long *param_1,int8 param_2)
{
int iVar1;
long lVar2;
int8 *puVar3;
void *pvVar4;
long lVar5;
size_t __size;
iVar1 = (int)param_1[1];
puVar3 = (int8 *)malloc(0x18);
__size = (long)(iVar1 + 1) * 4;
pvVar4 = malloc(__size);
*puVar3 = pvVar4;
if (0 < iVar1) {
lVar2 = *param_1;
... |
6,775 | func0 | #include <stdio.h>
#include <assert.h>
#include <stdlib.h>
typedef struct {
const char* key;
int value;
} KeyValuePair;
typedef struct {
KeyValuePair* pairs;
int size;
} Dictionary;
typedef struct {
int* elements;
int size;
Dictionary* dict;
} Tuple;
| Tuple* func0(Tuple* test_tup, Dictionary* test_dict) {
int new_size = test_tup->size + 1;
Tuple* new_tuple = malloc(sizeof(Tuple));
new_tuple->elements = malloc(new_size * sizeof(int));
for (int i = 0; i < test_tup->size; i++) {
new_tuple->elements[i] = test_tup->elements[i];
}
ne... | int main() {
int arr1[3] = {4, 5, 6};
KeyValuePair pairs1[3] = {{"MSAM", 1}, {"is", 2}, {"best", 3}};
Dictionary dict1 = {pairs1, 3};
Tuple tup1 = {arr1, 3, NULL};
Tuple* res_tup1 = func0(&tup1, &dict1);
assert(res_tup1->size == 4);
assert(res_tup1->elements[0] == 4);
assert(re... | O3 | c | func0:
endbr64
push %r15
mov %rsi,%r15
push %r14
mov %rdi,%r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
mov 0x8(%rdi),%ebp
mov $0x18,%edi
callq 10d0 <malloc@plt>
lea 0x1(%rbp),%ebx
mov %rax,%r12
movslq %ebx,%r13
shl $0x2,%r13
mov %r13,%rdi
callq 10d0 <malloc@plt>
mo... | func0:
endbr64
push r15
push r14
mov r14, rsi
push r13
mov r13, rdi
push r12
push rbp
push rbx
sub rsp, 8
mov r15d, [rdi+8]
mov edi, 18h; size
call _malloc
lea ebx, [r15+1]
mov rbp, rax
movsxd r12, ebx
shl r12, 2
mov rdi, r12; size
call _malloc
mov [rbp+0... | _DWORD * func0(long long *a1, long long a2)
{
int v3; // r15d
_DWORD *v4; // rbp
size_t v5; // r12
char *v6; // rax
char *v7; // rdx
long long v8; // rcx
long long v9; // rax
_DWORD *result; // rax
long long v11; // rax
unsigned int v12; // eax
long long v13; // rsi
v3 = *((_DWORD *)a1 + 2);
... | func0:
ENDBR64
PUSH R15
PUSH R14
MOV R14,RSI
PUSH R13
MOV R13,RDI
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV R15D,dword ptr [RDI + 0x8]
MOV EDI,0x18
CALL 0x001010d0
LEA EBX,[R15 + 0x1]
MOV RBP,RAX
MOVSXD R12,EBX
SHL R12,0x2
MOV RDI,R12
CALL 0x001010d0
MOV qword ptr [RBP],RAX
MOV RDX,RAX
TEST R15D,R15D
JLE 0x001017af
LE... | int8 * func0(long *param_1,int8 param_2)
{
uint uVar1;
long lVar2;
int8 uVar3;
uint uVar4;
int8 *puVar5;
void *pvVar6;
long lVar7;
ulong uVar8;
size_t __size;
uVar1 = *(uint *)(param_1 + 1);
puVar5 = (int8 *)malloc(0x18);
__size = (long)(int)(uVar1 + 1) * 4;
pvVar6 = malloc(__size);
*puV... |
6,776 | func0 |
#include <assert.h>
#include <stdio.h>
| double func0(int cost[][100], int N) {
int dp[100][100] = {0};
dp[0][0] = cost[0][0];
for(int i = 1; i < N; i++) {
dp[i][0] = dp[i-1][0] + cost[i][0];
}
for(int j = 1; j < N; j++) {
dp[0][j] = dp[0][j-1] + cost[0][j];
}
for(int i = 1; i < N; i++) {
for(int j... | int main() {
int cost1[3][100] = { {1, 2, 3}, {6, 5, 4}, {7, 3, 9} };
assert(func0(cost1, 3) == 5.2);
int cost2[3][100] = { {2, 3, 4}, {7, 6, 5}, {8, 4, 10} };
assert(func0(cost2, 3) == 6.2);
int cost3[3][100] = { {3, 4, 5}, {8, 7, 6}, {9, 5, 11} };
assert(func0(cost3, 3) == 7.... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
lea -0x9000(%rsp),%r11
sub $0x1000,%rsp
orq $0x0,(%rsp)
cmp %r11,%rsp
jne 1199 <func0+0x10>
sub $0xc70,%rsp
mov %rdi,-0x9c68(%rbp)
mov %esi,-0x9c6c(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
lea -0x9c50(%rbp),%rax
mov $0x9... | func0:
endbr64
push rbp
mov rbp, rsp
lea r11, [rsp+var_9000]
loc_1199:
sub rsp, 1000h
or [rsp+1000h+var_1000], 0
cmp rsp, r11
jnz short loc_1199
sub rsp, 0C70h
mov [rbp+var_9C68], rdi
mov [rbp+var_9C6C], esi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
lea ra... | // bad sp value at call has been detected, the output may be wrong!
unsigned long long func0(_DWORD *a1, int a2)
{
int v2; // eax
int i; // [rsp+Ch] [rbp-9C60h]
int j; // [rsp+10h] [rbp-9C5Ch]
int k; // [rsp+14h] [rbp-9C58h]
int m; // [rsp+18h] [rbp-9C54h]
_DWORD s[788]; // [rsp+1Ch] [rbp-9C50h] BYREF
ch... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
LEA R11,[RSP + -0x9000]
LAB_00101199:
SUB RSP,0x1000
OR qword ptr [RSP],0x0
CMP RSP,R11
JNZ 0x00101199
SUB RSP,0xc70
MOV qword ptr [RBP + -0x9c68],RDI
MOV dword ptr [RBP + -0x9c6c],ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x9c50]
MOV ... | double func0(int *param_1,int param_2)
{
int *puVar1;
int iVar2;
int *puVar3;
long in_FS_OFFSET;
int local_9c68;
int local_9c64;
int local_9c60;
int local_9c5c;
int local_9c58 [788];
int local_9008 [36856];
long local_10;
puVar1 = &stack0xfffffffffffffff8;
do {
puVar3 = puVar1;
*(i... |
6,777 | func0 |
#include <assert.h>
#include <stdio.h>
| double func0(int cost[][100], int N) {
int dp[100][100] = {0};
dp[0][0] = cost[0][0];
for(int i = 1; i < N; i++) {
dp[i][0] = dp[i-1][0] + cost[i][0];
}
for(int j = 1; j < N; j++) {
dp[0][j] = dp[0][j-1] + cost[0][j];
}
for(int i = 1; i < N; i++) {
for(int j... | int main() {
int cost1[3][100] = { {1, 2, 3}, {6, 5, 4}, {7, 3, 9} };
assert(func0(cost1, 3) == 5.2);
int cost2[3][100] = { {2, 3, 4}, {7, 6, 5}, {8, 4, 10} };
assert(func0(cost2, 3) == 6.2);
int cost3[3][100] = { {3, 4, 5}, {8, 7, 6}, {9, 5, 11} };
assert(func0(cost3, 3) == 7.... | O1 | c | func0:
endbr64
push %rbp
push %rbx
lea -0x9000(%rsp),%r11
sub $0x1000,%rsp
orq $0x0,(%rsp)
cmp %r11,%rsp
jne 1197 <func0+0xe>
sub $0xc58,%rsp
mov %rdi,%rbp
mov %esi,%ebx
mov %fs:0x28,%rax
mov %rax,0x9c48(%rsp)
xor %eax,%eax
mov %rsp,%rdi
mov $0x9c40,%edx
mov $0x0,%esi
callq... | func0:
endbr64
push rbp
push rbx
lea r11, [rsp+10h+var_9010]
loc_1197:
sub rsp, 1000h
or [rsp+1010h+var_1010], 0
cmp rsp, r11
jnz short loc_1197
sub rsp, 0C58h
mov rbp, rdi
mov ebx, esi
mov rax, fs:28h
mov [rsp+1C68h+arg_7FD8], rax
xor eax, eax
mov rdi, rsp
mov ... | // positive sp value has been detected, the output may be wrong!
unsigned long long func0(int *a1, int a2)
{
int *v2; // rdx
int *v3; // r8
long long v4; // r9
_DWORD *v5; // rax
int *v6; // rdx
int *v7; // rax
long long v8; // rdi
int *v9; // r10
long long v10; // r9
_DWORD *v11; // rcx
int *v12... | func0:
ENDBR64
PUSH RBP
PUSH RBX
LEA R11,[RSP + -0x9000]
LAB_00101197:
SUB RSP,0x1000
OR qword ptr [RSP],0x0
CMP RSP,R11
JNZ 0x00101197
SUB RSP,0xc58
MOV RBP,RDI
MOV EBX,ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x9c48],RAX
XOR EAX,EAX
MOV RDI,RSP
MOV EDX,0x9c40
MOV ESI,0x0
CALL 0x00101090
MOV EAX,dword ptr ... | double func0(int4 *param_1,int param_2)
{
int1 *puVar1;
int iVar2;
int *piVar3;
int *piVar4;
int *piVar5;
int1 *puVar6;
int *piVar7;
ulong uVar8;
long in_FS_OFFSET;
int1 local_9010 [36864];
puVar1 = &stack0xfffffffffffffff0;
do {
puVar6 = puVar1;
*(int8 *)(puVar6 + -0x1000) = *(int8 ... |
6,778 | func0 |
#include <assert.h>
#include <stdio.h>
| double func0(int cost[][100], int N) {
int dp[100][100] = {0};
dp[0][0] = cost[0][0];
for(int i = 1; i < N; i++) {
dp[i][0] = dp[i-1][0] + cost[i][0];
}
for(int j = 1; j < N; j++) {
dp[0][j] = dp[0][j-1] + cost[0][j];
}
for(int i = 1; i < N; i++) {
for(int j... | int main() {
int cost1[3][100] = { {1, 2, 3}, {6, 5, 4}, {7, 3, 9} };
assert(func0(cost1, 3) == 5.2);
int cost2[3][100] = { {2, 3, 4}, {7, 6, 5}, {8, 4, 10} };
assert(func0(cost2, 3) == 6.2);
int cost3[3][100] = { {3, 4, 5}, {8, 7, 6}, {9, 5, 11} };
assert(func0(cost3, 3) == 7.... | O2 | c | func0:
endbr64
push %rbp
push %rbx
lea -0x9000(%rsp),%r11
sub $0x1000,%rsp
orq $0x0,(%rsp)
cmp %r11,%rsp
jne 13de <func0+0xe>
sub $0xc58,%rsp
mov $0x9c40,%edx
mov %fs:0x28,%rax
mov %rax,0x9c48(%rsp)
xor %eax,%eax
mov %rdi,%rbp
mov %esi,%ebx
mov %rsp,%rdi
xor %esi,%esi
callq... | func0:
endbr64
push rbp
push rbx
lea r11, [rsp+10h+var_9010]
loc_13DE:
sub rsp, 1000h
or [rsp+1010h+var_1010], 0
cmp rsp, r11
jnz short loc_13DE
sub rsp, 0C58h
mov edx, 9C40h
mov rax, fs:28h
mov [rsp+1C68h+arg_7FD8], rax
xor eax, eax
mov rbp, rdi
mov ebx, esi
mov ... | // positive sp value has been detected, the output may be wrong!
unsigned long long func0(int *a1, int a2)
{
int v3; // edx
long long v4; // r9
int *v5; // rax
long long *v6; // rsi
int v7; // ecx
long long v8; // rdi
_DWORD *v9; // r10
long long v10; // r9
int *v11; // rax
_DWORD *i; // rcx
long... | func0:
ENDBR64
PUSH RBP
PUSH RBX
LEA R11,[RSP + -0x9000]
LAB_001013de:
SUB RSP,0x1000
OR qword ptr [RSP],0x0
CMP RSP,R11
JNZ 0x001013de
SUB RSP,0xc58
MOV EDX,0x9c40
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x9c48],RAX
XOR EAX,EAX
MOV RBP,RDI
MOV EBX,ESI
MOV RDI,RSP
XOR ESI,ESI
CALL 0x00101090
MOV EDX,dword ptr ... | double func0(int *param_1,int param_2)
{
int1 *puVar1;
int *piVar2;
int *piVar3;
int iVar4;
int *piVar5;
int iVar6;
int *piVar7;
int1 *puVar8;
long lVar9;
long lVar10;
ulong uVar11;
long in_FS_OFFSET;
int1 local_9010 [36864];
puVar1 = &stack0xfffffffffffffff0;
do {
puVar8 = puVar1;... |
6,779 | func0 |
#include <assert.h>
#include <stdio.h>
| double func0(int cost[][100], int N) {
int dp[100][100] = {0};
dp[0][0] = cost[0][0];
for(int i = 1; i < N; i++) {
dp[i][0] = dp[i-1][0] + cost[i][0];
}
for(int j = 1; j < N; j++) {
dp[0][j] = dp[0][j-1] + cost[0][j];
}
for(int i = 1; i < N; i++) {
for(int j... | int main() {
int cost1[3][100] = { {1, 2, 3}, {6, 5, 4}, {7, 3, 9} };
assert(func0(cost1, 3) == 5.2);
int cost2[3][100] = { {2, 3, 4}, {7, 6, 5}, {8, 4, 10} };
assert(func0(cost2, 3) == 6.2);
int cost3[3][100] = { {3, 4, 5}, {8, 7, 6}, {9, 5, 11} };
assert(func0(cost3, 3) == 7.... | O3 | c | func0:
endbr64
push %rbp
push %rbx
lea -0x9000(%rsp),%r11
sub $0x1000,%rsp
orq $0x0,(%rsp)
cmp %r11,%rsp
jne 13de <func0+0xe>
sub $0xc58,%rsp
mov $0x9c40,%edx
mov %fs:0x28,%rax
mov %rax,0x9c48(%rsp)
xor %eax,%eax
mov %rsp,%rcx
mov %rdi,%rbx
mov %esi,%ebp
mov %rcx,%rdi
xor ... | func0:
endbr64
push rbp
push rbx
lea r11, [rsp+10h+var_9010]
loc_13BE:
sub rsp, 1000h
or [rsp+1010h+var_1010], 0
cmp rsp, r11
jnz short loc_13BE
sub rsp, 0C58h
mov edx, 9C40h; n
mov rax, fs:28h
mov [rsp+1C68h+arg_7FD8], rax
xor eax, eax
mov rbx, rdi
mov ebp, esi
mo... | // positive sp value has been detected, the output may be wrong!
unsigned long long func0(int *a1, int a2)
{
_DWORD *v4; // rax
int v5; // edx
_DWORD *v6; // rdi
long long v7; // rax
long long v8; // r10
int v9; // edx
long long i; // rax
int *v11; // r8
_DWORD *v12; // rsi
int *v13; // r10
int v... | func0:
ENDBR64
PUSH RBP
PUSH RBX
LEA R11,[RSP + -0x9000]
LAB_001013be:
SUB RSP,0x1000
OR qword ptr [RSP],0x0
CMP RSP,R11
JNZ 0x001013be
SUB RSP,0xc58
MOV EDX,0x9c40
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x9c48],RAX
XOR EAX,EAX
MOV RBX,RDI
MOV EBP,ESI
MOV RDI,RSP
XOR ESI,ESI
CALL 0x00101090
MOV EDX,dword ptr ... | double func0(int *param_1,uint param_2)
{
int iVar1;
int *puVar2;
void *pvVar3;
long lVar4;
ulong uVar5;
int iVar6;
int *puVar7;
int *piVar8;
long lVar9;
long in_FS_OFFSET;
int local_9010 [36864];
puVar2 = &stack0xfffffffffffffff0;
do {
puVar7 = puVar2;
*(int8 *)(puVar7 + -0x1000) ... |
6,780 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
typedef struct {
double height;
double weight;
} StudentDetails;
typedef struct {
char name[50];
StudentDetails details;
} Student;
| int func0(Student students[], int count, double h, double w, Student result[]) {
int index = 0;
for (int i = 0; i < count; i++) {
if (students[i].details.height >= h && students[i].details.weight >= w) {
result[index++] = students[i];
}
}
return index;
}
| int main() {
Student students[] = {
{"Cierra Vega", {6.2, 70}},
{"Alden Cantrell", {5.9, 65}},
{"Kierra Gentry", {6.0, 68}},
{"Pierre Cox", {5.8, 66}}
};
Student result[4];
int count;
count = func0(students, 4, 6.0, 70, result);
assert(count == 1 && ... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
mov %rdi,-0x20(%rbp)
mov %esi,-0x24(%rbp)
movsd %xmm0,-0x30(%rbp)
movsd %xmm1,-0x38(%rbp)
mov %rdx,-0x40(%rbp)
movl $0x0,-0x10(%rbp)
movl $0x0,-0xc(%rbp)
jmpq 12a2 <func0+0x119>
mov -0xc(%rbp),%eax
movslq %eax,%rdx
mov %rdx,%rax
shl $0x3,... | func0:
endbr64
push rbp
mov rbp, rsp
push rbx
mov [rbp+var_20], rdi
mov [rbp+var_24], esi
movsd [rbp+var_30], xmm0
movsd [rbp+var_38], xmm1
mov [rbp+var_40], rdx
mov [rbp+var_10], 0
mov [rbp+var_C], 0
jmp loc_12A2
loc_11BA:
mov eax, [rbp+var_C]
movsxd rdx, eax
mov rax, rdx... | long long func0(long long a1, int a2, long long a3, double a4, double a5)
{
_QWORD *v5; // rdx
int v6; // eax
_QWORD *v7; // rax
long long v8; // rbx
long long v9; // rbx
long long v10; // rbx
long long v11; // rbx
unsigned int v14; // [rsp+30h] [rbp-10h]
int i; // [rsp+34h] [rbp-Ch]
v14 = 0;
fo... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
MOV qword ptr [RBP + -0x20],RDI
MOV dword ptr [RBP + -0x24],ESI
MOVSD qword ptr [RBP + -0x30],XMM0
MOVSD qword ptr [RBP + -0x38],XMM1
MOV qword ptr [RBP + -0x40],RDX
MOV dword ptr [RBP + -0x10],0x0
MOV dword ptr [RBP + -0xc],0x0
JMP 0x001012a2
LAB_001011ba:
MOV EAX,dword ptr... | int func0(double param_1,double param_2,long param_3,int param_4,long param_5)
{
int8 uVar1;
int8 *puVar2;
int8 *puVar3;
int local_18;
int local_14;
local_18 = 0;
for (local_14 = 0; local_14 < param_4; local_14 = local_14 + 1) {
if ((param_1 <= *(double *)(param_3 + (long)local_14 * 0x48 + 0x38)) ... |
6,781 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
typedef struct {
double height;
double weight;
} StudentDetails;
typedef struct {
char name[50];
StudentDetails details;
} Student;
| int func0(Student students[], int count, double h, double w, Student result[]) {
int index = 0;
for (int i = 0; i < count; i++) {
if (students[i].details.height >= h && students[i].details.weight >= w) {
result[index++] = students[i];
}
}
return index;
}
| int main() {
Student students[] = {
{"Cierra Vega", {6.2, 70}},
{"Alden Cantrell", {5.9, 65}},
{"Kierra Gentry", {6.0, 68}},
{"Pierre Cox", {5.8, 66}}
};
Student result[4];
int count;
count = func0(students, 4, 6.0, 70, result);
assert(count == 1 && ... | O1 | c | func0:
endbr64
test %esi,%esi
jle 11e2 <func0+0x79>
mov %rdi,%rax
lea -0x1(%rsi),%ecx
lea (%rcx,%rcx,8),%rcx
lea 0x48(%rdi,%rcx,8),%rdi
mov $0x0,%r8d
jmp 1191 <func0+0x28>
add $0x48,%rax
cmp %rdi,%rax
je 11e8 <func0+0x7f>
movsd 0x38(%rax),%xmm2
comisd %xmm0,%xmm2
jb 1188 <func0+0x1... | func0:
endbr64
test esi, esi
jle short loc_1202
mov rax, rdi
lea ecx, [rsi-1]
lea rcx, [rcx+rcx*8]
lea rdi, [rdi+rcx*8+48h]
mov r8d, 0
jmp short loc_11B1
loc_11A8:
add rax, 48h ; 'H'
cmp rax, rdi
jz short loc_1208
loc_11B1:
movsd xmm2, qword ptr [rax+38h]
comisd xmm2, xmm0... | long long func0(long long a1, int a2, long long a3, double a4, double a5)
{
long long v5; // rax
long long v6; // rdi
unsigned int v7; // r8d
__m128i *v8; // rsi
if ( a2 <= 0 )
{
return 0;
}
else
{
v5 = a1;
v6 = a1 + 72LL * (unsigned int)(a2 - 1) + 72;
v7 = 0;
do
{
if (... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x00101202
MOV RAX,RDI
LEA ECX,[RSI + -0x1]
LEA RCX,[RCX + RCX*0x8]
LEA RDI,[RDI + RCX*0x8 + 0x48]
MOV R8D,0x0
JMP 0x001011b1
LAB_001011a8:
ADD RAX,0x48
CMP RAX,RDI
JZ 0x00101208
LAB_001011b1:
MOVSD XMM2,qword ptr [RAX + 0x38]
COMISD XMM2,XMM0
JC 0x001011a8
MOVSD XMM2,qword ptr [RAX + 0x... | int func0(double param_1,double param_2,int8 *param_3,int param_4,long param_5)
{
int8 *puVar1;
int8 *puVar2;
int8 uVar3;
int iVar4;
if (param_4 < 1) {
iVar4 = 0;
}
else {
puVar2 = param_3 + (ulong)(param_4 - 1) * 9 + 9;
iVar4 = 0;
do {
if ((param_1 <= (double)param_3[7]) && (par... |
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.