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,382 | func0 |
#include <assert.h>
| float func0(int arr1[], int arr2[], int n) {
int i = 0;
int j = 0;
int m1 = -1;
int m2 = -1;
int count = 0;
while (count < n + 1) {
count++;
if (i == n) {
m1 = m2;
m2 = arr2[0];
break;
} else if (j == n) {
m1 = ... | int main() {
int arr1_1[] = {1, 12, 15, 26, 38};
int arr2_1[] = {2, 13, 17, 30, 45};
int arr1_2[] = {2, 4, 8, 9};
int arr2_2[] = {7, 13, 19, 28};
int arr1_3[] = {3, 6, 14, 23, 36, 42};
int arr2_3[] = {2, 18, 27, 39, 49, 55};
assert(func0(arr1_1, arr2_1, 5) == 16.0);
assert(func... | O2 | c | func0:
endbr64
test %edx,%edx
js 140f <func0+0xaf>
je 13d7 <func0+0x77>
mov $0x1,%r9d
mov $0xffffffff,%r11d
xor %r8d,%r8d
xor %ecx,%ecx
jmp 13a0 <func0+0x40>
nopl 0x0(%rax)
add $0x1,%ecx
cmp %r9d,%edx
jl 13bf <func0+0x5f>
add $0x1,%r9d
cmp %edx,%ecx
je 13dc <func0+0x7c>
cm... | func0:
endbr64
test edx, edx
js loc_140F
jz short loc_13D6
mov r9d, 1
mov r11d, 0FFFFFFFFh
xor r8d, r8d
xor ecx, ecx
jmp short loc_13A0
loc_1388:
add ecx, 1
cmp edx, r9d
jl short loc_13BE
loc_1390:
add r9d, 1
cmp ecx, edx
jz short loc_13DB
cmp edx, r8d
jz ... | float func0(_DWORD *a1, _DWORD *a2, int a3)
{
int v3; // r9d
int v4; // r11d
int v5; // r8d
int v6; // ecx
int v7; // eax
int v8; // r10d
if ( a3 < 0 )
return -1.0;
if ( a3 )
{
v3 = 1;
v4 = -1;
v5 = 0;
v6 = 0;
while ( 1 )
{
v7 = a1[v6];
v8 = a2[v5];
if (... | func0:
ENDBR64
TEST EDX,EDX
JS 0x0010140f
JZ 0x001013d6
MOV R9D,0x1
MOV R11D,0xffffffff
XOR R8D,R8D
XOR ECX,ECX
JMP 0x001013a0
LAB_00101388:
ADD ECX,0x1
CMP EDX,R9D
JL 0x001013be
LAB_00101390:
ADD R9D,0x1
CMP ECX,EDX
JZ 0x001013db
CMP EDX,R8D
JZ 0x001013f8
MOV R11D,EAX
LAB_001013a0:
MOVSXD RAX,ECX
MOVSXD R10,R8D
MOV EA... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
ulong func0(int *param_1,int *param_2,int param_3)
{
int iVar1;
long lVar2;
int iVar3;
int iVar4;
int iVar5;
int iVar6;
double dVar7;
if (param_3 < 0) {
return (ulong)DAT_00102098;
}
if (param_3 == 0) {
... |
6,383 | func0 |
#include <assert.h>
| float func0(int arr1[], int arr2[], int n) {
int i = 0;
int j = 0;
int m1 = -1;
int m2 = -1;
int count = 0;
while (count < n + 1) {
count++;
if (i == n) {
m1 = m2;
m2 = arr2[0];
break;
} else if (j == n) {
m1 = ... | int main() {
int arr1_1[] = {1, 12, 15, 26, 38};
int arr2_1[] = {2, 13, 17, 30, 45};
int arr1_2[] = {2, 4, 8, 9};
int arr2_2[] = {7, 13, 19, 28};
int arr1_3[] = {3, 6, 14, 23, 36, 42};
int arr2_3[] = {2, 18, 27, 39, 49, 55};
assert(func0(arr1_1, arr2_1, 5) == 16.0);
assert(func... | O3 | c | func0:
endbr64
test %edx,%edx
js 13af <func0+0xaf>
je 1377 <func0+0x77>
mov $0x1,%r9d
mov $0xffffffff,%r11d
xor %r8d,%r8d
xor %ecx,%ecx
jmp 1340 <func0+0x40>
nopl 0x0(%rax)
add $0x1,%ecx
cmp %r9d,%edx
jl 135f <func0+0x5f>
add $0x1,%r9d
cmp %edx,%ecx
je 137c <func0+0x7c>
cm... | func0:
endbr64
test edx, edx
js loc_139F
jz short loc_1366
mov r9d, 1
mov r11d, 0FFFFFFFFh
xor r8d, r8d
xor ecx, ecx
jmp short loc_1330
loc_1318:
add ecx, 1
cmp edx, r9d
jl short loc_134E
loc_1320:
add r9d, 1
cmp ecx, edx
jz short loc_136B
cmp edx, r8d
jz ... | float func0(_DWORD *a1, _DWORD *a2, int a3)
{
int v3; // r9d
int v4; // r11d
int v5; // r8d
int v6; // ecx
int v7; // eax
int v8; // r10d
if ( a3 < 0 )
return -1.0;
if ( a3 )
{
v3 = 1;
v4 = -1;
v5 = 0;
v6 = 0;
while ( 1 )
{
v7 = a1[v6];
v8 = a2[v5];
if (... | func0:
ENDBR64
TEST EDX,EDX
JS 0x0010139f
JZ 0x00101366
MOV R9D,0x1
MOV R11D,0xffffffff
XOR R8D,R8D
XOR ECX,ECX
JMP 0x00101330
LAB_00101318:
ADD ECX,0x1
CMP EDX,R9D
JL 0x0010134e
LAB_00101320:
ADD R9D,0x1
CMP ECX,EDX
JZ 0x0010136b
CMP EDX,R8D
JZ 0x00101388
MOV R11D,EAX
LAB_00101330:
MOVSXD RAX,ECX
MOVSXD R10,R8D
MOV EA... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
ulong func0(int *param_1,int *param_2,int param_3)
{
int iVar1;
long lVar2;
int iVar3;
int iVar4;
int iVar5;
int iVar6;
double dVar7;
if (param_3 < 0) {
return (ulong)DAT_00102004;
}
if (param_3 == 0) {
... |
6,384 | func0 |
#include <stdio.h>
#include <assert.h>
#include <math.h> // For pow function
| void func0(int nums[], int length, int n, int result[]) {
for(int i = 0; i < length; i++) {
result[i] = pow(nums[i], n);
}
}
| int main() {
int result1[10], result2[3], result3[2];
int arr1[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
int arr2[3] = {10, 20, 30};
int arr3[2] = {12, 15};
func0(arr1, 10, 2, result1);
func0(arr2, 3, 3, result2);
func0(arr3, 2, 5, result3);
assert(result1[0] == 1 && result1[1] ... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x30,%rsp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
mov %edx,-0x20(%rbp)
mov %rcx,-0x28(%rbp)
movl $0x0,-0x4(%rbp)
jmp 11ee <func0+0x65>
cvtsi2sdl -0x20(%rbp),%xmm1
mov -0x4(%rbp),%eax
cltq
lea 0x0(,%rax,4),%rdx
mov -0x18(%rbp),%rax
add %r... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_20], edx
mov [rbp+var_28], rcx
mov [rbp+var_4], 0
jmp short loc_1204
loc_11AC:
pxor xmm0, xmm0
cvtsi2sd xmm0, [rbp+var_20]
mov eax, [rbp+var_4]
cdqe
lea rdx, ds:0[rax*... | long long func0(long long a1, int a2, int a3, long long a4)
{
long long result; // rax
unsigned int i; // [rsp+2Ch] [rbp-4h]
for ( i = 0; ; ++i )
{
result = i;
if ( (int)i >= a2 )
break;
*(_DWORD *)(a4 + 4LL * (int)i) = (int)pow((double)*(int *)(4LL * (int)i + a1), (double)a3);
}
return ... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0x20],EDX
MOV qword ptr [RBP + -0x28],RCX
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00101204
LAB_001011ac:
PXOR XMM0,XMM0
CVTSI2SD XMM0,dword ptr [RBP + -0x20]
MOV EAX,dword ptr [RBP + -0x4]... | void func0(long param_1,int param_2,int param_3,long param_4)
{
double dVar1;
int4 local_c;
for (local_c = 0; local_c < param_2; local_c = local_c + 1) {
dVar1 = pow((double)*(int *)(param_1 + (long)local_c * 4),(double)param_3);
*(int *)((long)local_c * 4 + param_4) = (int)dVar1;
}
return;
} |
6,385 | func0 |
#include <stdio.h>
#include <assert.h>
#include <math.h> // For pow function
| void func0(int nums[], int length, int n, int result[]) {
for(int i = 0; i < length; i++) {
result[i] = pow(nums[i], n);
}
}
| int main() {
int result1[10], result2[3], result3[2];
int arr1[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
int arr2[3] = {10, 20, 30};
int arr3[2] = {12, 15};
func0(arr1, 10, 2, result1);
func0(arr2, 3, 3, result2);
func0(arr3, 2, 5, result3);
assert(result1[0] == 1 && result1[1] ... | O1 | c | func0:
endbr64
test %esi,%esi
jle 11ec <func0+0x63>
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %rdi,%rbp
mov %rcx,%r12
lea -0x1(%rsi),%r13d
mov $0x0,%ebx
pxor %xmm2,%xmm2
cvtsi2sd %edx,%xmm2
movsd %xmm2,0x8(%rsp)
pxor %xmm0,%xmm0
cvtsi2sdl 0x0(%rbp,%rbx,4),%xmm0
movsd 0... | func0:
endbr64
test esi, esi
jle short locret_11E2
push r14
push r13
push r12
push rbp
push rbx
mov r12, rdi
mov r13, rcx
mov ebp, esi
mov ebx, 0
pxor xmm2, xmm2
cvtsi2sd xmm2, edx
movq r14, xmm2
loc_11B3:
pxor xmm0, xmm0
cvtsi2sd xmm0, dword ptr [r12+rbx*4]
movq xmm1, ... | long long func0(long long a1, int a2, int a3, long long a4)
{
long long v5; // rbx
double v6; // r14
long long result; // rax
if ( a2 > 0 )
{
v5 = 0LL;
v6 = (double)a3;
do
{
result = (unsigned int)(int)pow((double)*(int *)(a1 + 4 * v5), v6);
*(_DWORD *)(a4 + 4 * v5++) = result;
... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x001011e2
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV R12,RDI
MOV R13,RCX
MOV EBP,ESI
MOV EBX,0x0
PXOR XMM2,XMM2
CVTSI2SD XMM2,EDX
MOVQ R14,XMM2
LAB_001011b3:
PXOR XMM0,XMM0
CVTSI2SD XMM0,dword ptr [R12 + RBX*0x4]
MOVQ XMM1,R14
CALL 0x00101070
CVTTSD2SI EAX,XMM0
MOV dword ptr [R13 ... | void func0(long param_1,uint param_2,int param_3,long param_4)
{
ulong uVar1;
double dVar2;
if (0 < (int)param_2) {
uVar1 = 0;
do {
dVar2 = pow((double)*(int *)(param_1 + uVar1 * 4),(double)param_3);
*(int *)(param_4 + uVar1 * 4) = (int)dVar2;
uVar1 = uVar1 + 1;
} while (uVar1 !=... |
6,386 | func0 |
#include <stdio.h>
#include <assert.h>
#include <math.h> // For pow function
| void func0(int nums[], int length, int n, int result[]) {
for(int i = 0; i < length; i++) {
result[i] = pow(nums[i], n);
}
}
| int main() {
int result1[10], result2[3], result3[2];
int arr1[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
int arr2[3] = {10, 20, 30};
int arr3[2] = {12, 15};
func0(arr1, 10, 2, result1);
func0(arr2, 3, 3, result2);
func0(arr3, 2, 5, result3);
assert(result1[0] == 1 && result1[1] ... | O2 | c | func0:
endbr64
test %esi,%esi
jle 13e0 <func0+0x70>
pxor %xmm1,%xmm1
push %r13
lea -0x1(%rsi),%r13d
push %r12
cvtsi2sd %edx,%xmm1
mov %rcx,%r12
push %rbp
mov %rdi,%rbp
push %rbx
xor %ebx,%ebx
sub $0x18,%rsp
nopw %cs:0x0(%rax,%rax,1)
pxor %xmm0,%xmm0
movsd %xmm1,0x8(%rsp)
cvtsi2sdl 0x0... | func0:
endbr64
test esi, esi
jle short locret_13D0
pxor xmm1, xmm1
push r13
mov r13, rcx
push r12
cvtsi2sd xmm1, edx
mov r12, rdi
push rbp
movsxd rbp, esi
push rbx
xor ebx, ebx
sub rsp, 18h
nop dword ptr [rax]
loc_1398:
pxor xmm0, xmm0
movsd [rsp+38h+var_30], xmm1
cvtsi2s... | long long func0(long long a1, int a2, int a3, long long a4)
{
double v5; // xmm1_8
long long i; // rbx
long long result; // rax
if ( a2 > 0 )
{
v5 = (double)a3;
for ( i = 0LL; i != a2; *(_DWORD *)(a4 + 4 * i++) = result )
result = (unsigned int)(int)pow((double)*(int *)(a1 + 4 * i), v5);
}
... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x001013d0
PXOR XMM1,XMM1
PUSH R13
MOV R13,RCX
PUSH R12
CVTSI2SD XMM1,EDX
MOV R12,RDI
PUSH RBP
MOVSXD RBP,ESI
PUSH RBX
XOR EBX,EBX
SUB RSP,0x18
NOP dword ptr [RAX]
LAB_00101398:
PXOR XMM0,XMM0
MOVSD qword ptr [RSP + 0x8],XMM1
CVTSI2SD XMM0,dword ptr [R12 + RBX*0x4]
CALL 0x00101070
MOVSD ... | void func0(long param_1,int param_2,int param_3,long param_4)
{
long lVar1;
double dVar2;
if (0 < param_2) {
lVar1 = 0;
do {
dVar2 = pow((double)*(int *)(param_1 + lVar1 * 4),(double)param_3);
*(int *)(param_4 + lVar1 * 4) = (int)dVar2;
lVar1 = lVar1 + 1;
} while (param_2 != lVar... |
6,387 | func0 |
#include <stdio.h>
#include <assert.h>
#include <math.h> // For pow function
| void func0(int nums[], int length, int n, int result[]) {
for(int i = 0; i < length; i++) {
result[i] = pow(nums[i], n);
}
}
| int main() {
int result1[10], result2[3], result3[2];
int arr1[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
int arr2[3] = {10, 20, 30};
int arr3[2] = {12, 15};
func0(arr1, 10, 2, result1);
func0(arr2, 3, 3, result2);
func0(arr3, 2, 5, result3);
assert(result1[0] == 1 && result1[1] ... | O3 | c | func0:
endbr64
test %esi,%esi
jle 13c0 <func0+0x70>
pxor %xmm1,%xmm1
push %r13
lea -0x1(%rsi),%r13d
push %r12
cvtsi2sd %edx,%xmm1
mov %rcx,%r12
push %rbp
mov %rdi,%rbp
push %rbx
xor %ebx,%ebx
sub $0x18,%rsp
nopw %cs:0x0(%rax,%rax,1)
pxor %xmm0,%xmm0
movsd %xmm1,0x8(%rsp)
cvtsi2sdl 0x0... | func0:
endbr64
test esi, esi
jle short locret_13B0
pxor xmm1, xmm1
push r12
movsxd rsi, esi
push rbp
cvtsi2sd xmm1, edx; y
mov rbp, rcx
lea r12, [rdi+rsi*4]
push rbx
mov rbx, rdi
sub rsp, 10h
nop dword ptr [rax]
loc_1378:
pxor xmm0, xmm0
movsd [rsp+28h+var_20], xmm1
add ... | long long func0(long long a1, int a2, int a3, long long a4)
{
double v4; // xmm1_8
long long v6; // rbx
long long result; // rax
if ( a2 > 0 )
{
v4 = (double)a3;
v6 = a1;
do
{
v6 += 4LL;
a4 += 4LL;
result = (unsigned int)(int)pow((double)*(int *)(v6 - 4), v4);
*(_DWOR... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x001013b0
PXOR XMM1,XMM1
PUSH R12
MOVSXD RSI,ESI
PUSH RBP
CVTSI2SD XMM1,EDX
MOV RBP,RCX
LEA R12,[RDI + RSI*0x4]
PUSH RBX
MOV RBX,RDI
SUB RSP,0x10
NOP dword ptr [RAX]
LAB_00101378:
PXOR XMM0,XMM0
MOVSD qword ptr [RSP + 0x8],XMM1
ADD RBX,0x4
ADD RBP,0x4
CVTSI2SD XMM0,dword ptr [RBX + -0x4... | void func0(int *param_1,int param_2,int param_3,int *param_4)
{
int *piVar1;
int *piVar2;
double dVar3;
if (0 < param_2) {
piVar1 = param_1;
do {
piVar2 = piVar1 + 1;
dVar3 = pow((double)*piVar1,(double)param_3);
*param_4 = (int)dVar3;
piVar1 = piVar2;
param_4 = param_4... |
6,388 | func0 | #include <assert.h>
#include <string.h>
#include <ctype.h>
| char* func0(const char* string) {
static char result[100];
int i;
for(i = 0; string[i] != '\0'; i++) {
result[i] = toupper((unsigned char) string[i]);
}
result[i] = '\0';
return result;
}
| int main() {
assert(strcmp(func0("person"), "PERSON") == 0);
assert(strcmp(func0("final"), "FINAL") == 0);
assert(strcmp(func0("Valid"), "VALID") == 0);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %rdi,-0x18(%rbp)
movl $0x0,-0x4(%rbp)
jmp 11d1 <func0+0x48>
mov -0x4(%rbp),%eax
movslq %eax,%rdx
mov -0x18(%rbp),%rax
add %rdx,%rax
movzbl (%rax),%eax
movzbl %al,%eax
mov %eax,%edi
callq 1070 <toupper@plt>
mov %eax,%ecx
mov -0x... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_18], rdi
mov [rbp+var_4], 0
jmp short loc_11D1
loc_11A2:
mov eax, [rbp+var_4]
movsxd rdx, eax
mov rax, [rbp+var_18]
add rax, rdx
movzx eax, byte ptr [rax]
movzx eax, al
mov edi, eax; c
call _toupper
mov ecx... | _BYTE * func0(long long a1)
{
int i; // [rsp+1Ch] [rbp-4h]
for ( i = 0; *(_BYTE *)(i + a1); ++i )
result_1[i] = toupper(*(unsigned __int8 *)(i + a1));
result_1[i] = 0;
return result_1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001011d1
LAB_001011a2:
MOV EAX,dword ptr [RBP + -0x4]
MOVSXD RDX,EAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,RDX
MOVZX EAX,byte ptr [RAX]
MOVZX EAX,AL
MOV EDI,EAX
CALL 0x00101070
MOV ECX,EAX
MOV EAX,dwo... | int1 * func0(long param_1)
{
int iVar1;
int local_c;
for (local_c = 0; *(char *)(param_1 + local_c) != '\0'; local_c = local_c + 1) {
iVar1 = toupper((uint)*(byte *)(param_1 + local_c));
result_1[local_c] = (char)iVar1;
}
result_1[local_c] = 0;
return result_1;
} |
6,389 | func0 | #include <assert.h>
#include <string.h>
#include <ctype.h>
| char* func0(const char* string) {
static char result[100];
int i;
for(i = 0; string[i] != '\0'; i++) {
result[i] = toupper((unsigned char) string[i]);
}
result[i] = '\0';
return result;
}
| int main() {
assert(strcmp(func0("person"), "PERSON") == 0);
assert(strcmp(func0("final"), "FINAL") == 0);
assert(strcmp(func0("Valid"), "VALID") == 0);
return 0;
}
| O1 | c | func0:
endbr64
push %rbp
push %rbx
sub $0x8,%rsp
movzbl (%rdi),%ebx
test %bl,%bl
je 11be <func0+0x55>
mov %rdi,%rbp
callq 1060 <__ctype_toupper_loc@plt>
mov $0x1,%edx
lea 0x2eb1(%rip),%rsi
movzbl %bl,%ebx
mov (%rax),%rcx
mov (%rcx,%rbx,4),%ecx
mov %cl,(%rdx,%rsi,1)
mov %edx,%ecx
add ... | func0:
endbr64
push rbp
push rbx
sub rsp, 8
movzx ebx, byte ptr [rdi]
test bl, bl
jz short loc_11DE
mov rbp, rdi
call ___ctype_toupper_loc
mov edx, 1
lea rsi, unk_403F
loc_11AE:
movzx ebx, bl
mov rcx, [rax]
mov ecx, [rcx+rbx*4]
mov [rdx+rsi], cl
mov ecx, edx
add ... | _BYTE * func0(unsigned __int8 *a1)
{
unsigned __int8 v1; // bl
_QWORD *v2; // rax
long long v3; // rdx
int v4; // ecx
_BYTE *result; // rax
v1 = *a1;
if ( *a1 )
{
v2 = (_QWORD *)__ctype_toupper_loc();
v3 = 1LL;
do
{
*((_BYTE *)&unk_403F + v3) = *(_DWORD *)(*v2 + 4LL * v1);
v... | func0:
ENDBR64
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOVZX EBX,byte ptr [RDI]
TEST BL,BL
JZ 0x001011de
MOV RBP,RDI
CALL 0x00101070
MOV EDX,0x1
LEA RSI,[0x10403f]
LAB_001011ae:
MOVZX EBX,BL
MOV RCX,qword ptr [RAX]
MOV ECX,dword ptr [RCX + RBX*0x4]
MOV byte ptr [RDX + RSI*0x1],CL
MOV ECX,EDX
ADD RDX,0x1
MOVZX EBX,byte ptr [RBP +... | void func0(byte *param_1)
{
__int32_t **pp_Var1;
int iVar2;
long lVar3;
byte bVar4;
bVar4 = *param_1;
if (bVar4 == 0) {
iVar2 = 0;
}
else {
pp_Var1 = __ctype_toupper_loc();
lVar3 = 1;
do {
(&DAT_0010403f)[lVar3] = (char)(*pp_Var1)[bVar4];
iVar2 = (int)lVar3;
bVar4 =... |
6,390 | func0 | #include <assert.h>
#include <string.h>
#include <ctype.h>
| char* func0(const char* string) {
static char result[100];
int i;
for(i = 0; string[i] != '\0'; i++) {
result[i] = toupper((unsigned char) string[i]);
}
result[i] = '\0';
return result;
}
| int main() {
assert(strcmp(func0("person"), "PERSON") == 0);
assert(strcmp(func0("final"), "FINAL") == 0);
assert(strcmp(func0("Valid"), "VALID") == 0);
return 0;
}
| O2 | c | func0:
endbr64
push %rbp
push %rbx
sub $0x8,%rsp
movzbl (%rdi),%ebx
test %bl,%bl
je 12b0 <func0+0x60>
mov %rdi,%rbp
callq 1060 <__ctype_toupper_loc@plt>
mov $0x1,%edx
lea 0x2dca(%rip),%rsi
nopl (%rax)
mov (%rax),%rcx
movzbl %bl,%ebx
mov (%rcx,%rbx,4),%ecx
mov %cl,(%rsi,%rdx,1)
movslq %... | func0:
endbr64
push rbp
push rbx
sub rsp, 8
movzx ebx, byte ptr [rdi]
test bl, bl
jz short loc_12B8
mov rbp, rdi
call ___ctype_toupper_loc
mov edx, 1
lea rsi, unk_403F
nop dword ptr [rax]
loc_1288:
mov rcx, [rax]
mov ecx, [rcx+rbx*4]
mov [rsi+rdx], cl
movsxd rcx, edx
... | _BYTE * func0(unsigned __int8 *a1)
{
long long v1; // rbx
_QWORD *v2; // rax
long long v3; // rdx
long long v4; // rcx
_BYTE *result; // rax
v1 = *a1;
if ( (_BYTE)v1 )
{
v2 = (_QWORD *)__ctype_toupper_loc();
v3 = 1LL;
do
{
*((_BYTE *)&unk_403F + v3) = *(_DWORD *)(*v2 + 4 * v1);
... | func0:
ENDBR64
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOVZX EBX,byte ptr [RDI]
TEST BL,BL
JZ 0x001012b8
MOV RBP,RDI
CALL 0x00101070
MOV EDX,0x1
LEA RSI,[0x10403f]
NOP dword ptr [RAX]
LAB_00101288:
MOV RCX,qword ptr [RAX]
MOV ECX,dword ptr [RCX + RBX*0x4]
MOV byte ptr [RSI + RDX*0x1],CL
MOVSXD RCX,EDX
ADD RDX,0x1
MOVZX EBX,byte ... | void func0(byte *param_1)
{
byte bVar1;
__int32_t **pp_Var2;
long lVar3;
long lVar4;
bVar1 = *param_1;
if (bVar1 == 0) {
lVar3 = 0;
}
else {
pp_Var2 = __ctype_toupper_loc();
lVar4 = 1;
do {
(&DAT_0010403f)[lVar4] = (char)(*pp_Var2)[bVar1];
lVar3 = (long)(int)lVar4;
... |
6,391 | func0 | #include <assert.h>
#include <string.h>
#include <ctype.h>
| char* func0(const char* string) {
static char result[100];
int i;
for(i = 0; string[i] != '\0'; i++) {
result[i] = toupper((unsigned char) string[i]);
}
result[i] = '\0';
return result;
}
| int main() {
assert(strcmp(func0("person"), "PERSON") == 0);
assert(strcmp(func0("final"), "FINAL") == 0);
assert(strcmp(func0("Valid"), "VALID") == 0);
return 0;
}
| O3 | c | func0:
endbr64
push %rbp
push %rbx
sub $0x8,%rsp
movzbl (%rdi),%ebx
test %bl,%bl
je 12b0 <func0+0x60>
mov %rdi,%rbp
callq 1060 <__ctype_toupper_loc@plt>
mov $0x1,%edx
lea 0x2dca(%rip),%rsi
nopl (%rax)
mov (%rax),%rcx
movzbl %bl,%ebx
mov (%rcx,%rbx,4),%ecx
mov %cl,(%rsi,%rdx,1)
movslq %... | func0:
endbr64
push rbp
push rbx
sub rsp, 8
movzx ebx, byte ptr [rdi]
test bl, bl
jz short loc_12C0
mov rbp, rdi
call ___ctype_toupper_loc
mov edx, 1
lea rsi, unk_403F
nop dword ptr [rax]
loc_1288:
mov rcx, [rax]
mov ecx, [rcx+rbx*4]
mov [rsi+rdx], cl
mov rcx, rdx
... | _BYTE * func0(unsigned __int8 *a1)
{
long long v1; // rbx
const __int32_t **v2; // rax
long long v3; // rdx
int v4; // ecx
_BYTE *result; // rax
v1 = *a1;
if ( (_BYTE)v1 )
{
v2 = __ctype_toupper_loc();
v3 = 1LL;
do
{
*((_BYTE *)&unk_403F + v3) = (*v2)[v1];
v4 = v3++;
v... | func0:
ENDBR64
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOVZX EBX,byte ptr [RDI]
TEST BL,BL
JZ 0x001012c0
MOV RBP,RDI
CALL 0x00101070
MOV EDX,0x1
LEA RSI,[0x10403f]
NOP dword ptr [RAX]
LAB_00101288:
MOV RCX,qword ptr [RAX]
MOV ECX,dword ptr [RCX + RBX*0x4]
MOV byte ptr [RSI + RDX*0x1],CL
MOV RCX,RDX
ADD RDX,0x1
MOVZX EBX,byte ptr... | void func0(byte *param_1)
{
byte bVar1;
long lVar2;
__int32_t **pp_Var3;
long lVar4;
bVar1 = *param_1;
if (bVar1 == 0) {
lVar4 = 0;
}
else {
pp_Var3 = __ctype_toupper_loc();
lVar2 = 1;
do {
lVar4 = lVar2;
(&DAT_0010403f)[lVar4] = (char)(*pp_Var3)[bVar1];
bVar1 = par... |
6,392 | func0 |
#include <assert.h>
#include <stdio.h>
| int* func0(int newList[], int size) {
int temp = newList[0];
newList[0] = newList[size - 1];
newList[size - 1] = temp;
return newList;
}
| int main() {
// Test case 1
int array1[] = {1, 2, 3};
int size1 = sizeof(array1) / sizeof(array1[0]);
int* result1 = func0(array1, size1);
assert(result1[0] == 3);
assert(result1[1] == 2);
assert(result1[2] == 1);
// Test case 2
int array2[] = {1, 2, 3, 4, 4};
int siz... | 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,-0x4(%rbp)
mov -0x1c(%rbp),%eax
cltq
shl $0x2,%rax
lea -0x4(%rax),%rdx
mov -0x18(%rbp),%rax
add %rdx,%rax
mov (%rax),%edx
mov -0x18(%rbp),%rax
mov %e... | 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 [rbp+var_4], eax
mov eax, [rbp+var_1C]
cdqe
shl rax, 2
lea rdx, [rax-4]
mov rax, [rbp+var_18]
add rax, rdx
mov edx, [rax]
mov rax, [rbp+var_18]... | int * func0(int *a1, int a2)
{
int v3; // [rsp+18h] [rbp-4h]
v3 = *a1;
*a1 = a1[a2 - 1];
a1[a2 - 1] = v3;
return a1;
} | 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 + -0x4],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 EDX,dword ptr [... | int4 * func0(int4 *param_1,int param_2)
{
int4 uVar1;
uVar1 = *param_1;
*param_1 = param_1[(long)param_2 + -1];
param_1[(long)param_2 + -1] = uVar1;
return param_1;
} |
6,393 | func0 |
#include <assert.h>
#include <stdio.h>
| int* func0(int newList[], int size) {
int temp = newList[0];
newList[0] = newList[size - 1];
newList[size - 1] = temp;
return newList;
}
| int main() {
// Test case 1
int array1[] = {1, 2, 3};
int size1 = sizeof(array1) / sizeof(array1[0]);
int* result1 = func0(array1, size1);
assert(result1[0] == 3);
assert(result1[1] == 2);
assert(result1[2] == 1);
// Test case 2
int array2[] = {1, 2, 3, 4, 4};
int siz... | O1 | c | func0:
endbr64
mov %rdi,%rax
mov (%rdi),%ecx
movslq %esi,%rsi
lea -0x4(%rdi,%rsi,4),%rdx
mov (%rdx),%esi
mov %esi,(%rdi)
mov %ecx,(%rdx)
retq
| func0:
endbr64
mov rax, rdi
mov ecx, [rdi]
movsxd rsi, esi
lea rdx, [rdi+rsi*4-4]
mov esi, [rdx]
mov [rdi], esi
mov [rdx], ecx
retn | _DWORD * func0(_DWORD *a1, int a2)
{
_DWORD *result; // rax
int v3; // ecx
_DWORD *v4; // rdx
result = a1;
v3 = *a1;
v4 = &a1[a2 - 1];
*a1 = *v4;
*v4 = v3;
return result;
} | func0:
ENDBR64
MOV RAX,RDI
MOV ECX,dword ptr [RDI]
MOVSXD RSI,ESI
LEA RDX,[RDI + RSI*0x4 + -0x4]
MOV ESI,dword ptr [RDX]
MOV dword ptr [RDI],ESI
MOV dword ptr [RDX],ECX
RET | int4 * func0(int4 *param_1,int param_2)
{
int4 uVar1;
uVar1 = *param_1;
*param_1 = param_1[(long)param_2 + -1];
param_1[(long)param_2 + -1] = uVar1;
return param_1;
} |
6,394 | func0 |
#include <assert.h>
#include <stdio.h>
| int* func0(int newList[], int size) {
int temp = newList[0];
newList[0] = newList[size - 1];
newList[size - 1] = temp;
return newList;
}
| int main() {
// Test case 1
int array1[] = {1, 2, 3};
int size1 = sizeof(array1) / sizeof(array1[0]);
int* result1 = func0(array1, size1);
assert(result1[0] == 3);
assert(result1[1] == 2);
assert(result1[2] == 1);
// Test case 2
int array2[] = {1, 2, 3, 4, 4};
int siz... | O2 | c | func0:
endbr64
movslq %esi,%rsi
mov (%rdi),%ecx
mov %rdi,%rax
lea -0x4(%rdi,%rsi,4),%rdx
mov (%rdx),%esi
mov %esi,(%rdi)
mov %ecx,(%rdx)
retq
nopl 0x0(%rax,%rax,1)
| func0:
endbr64
movsxd rsi, esi
mov ecx, [rdi]
mov rax, rdi
lea rdx, [rdi+rsi*4-4]
mov esi, [rdx]
mov [rdi], esi
mov [rdx], ecx
retn | _DWORD * func0(_DWORD *a1, int a2)
{
int v2; // ecx
_DWORD *result; // rax
_DWORD *v4; // rdx
v2 = *a1;
result = a1;
v4 = &a1[a2 - 1];
*a1 = *v4;
*v4 = v2;
return result;
} | func0:
ENDBR64
MOVSXD RSI,ESI
MOV ECX,dword ptr [RDI]
MOV RAX,RDI
LEA RDX,[RDI + RSI*0x4 + -0x4]
MOV ESI,dword ptr [RDX]
MOV dword ptr [RDI],ESI
MOV dword ptr [RDX],ECX
RET | int4 * func0(int4 *param_1,int param_2)
{
int4 uVar1;
uVar1 = *param_1;
*param_1 = param_1[(long)param_2 + -1];
param_1[(long)param_2 + -1] = uVar1;
return param_1;
} |
6,395 | func0 |
#include <assert.h>
#include <stdio.h>
| int* func0(int newList[], int size) {
int temp = newList[0];
newList[0] = newList[size - 1];
newList[size - 1] = temp;
return newList;
}
| int main() {
// Test case 1
int array1[] = {1, 2, 3};
int size1 = sizeof(array1) / sizeof(array1[0]);
int* result1 = func0(array1, size1);
assert(result1[0] == 3);
assert(result1[1] == 2);
assert(result1[2] == 1);
// Test case 2
int array2[] = {1, 2, 3, 4, 4};
int siz... | O3 | c | func0:
endbr64
movslq %esi,%rsi
mov (%rdi),%ecx
mov %rdi,%rax
lea -0x4(%rdi,%rsi,4),%rdx
mov (%rdx),%esi
mov %esi,(%rdi)
mov %ecx,(%rdx)
retq
nopl 0x0(%rax,%rax,1)
| func0:
endbr64
movsxd rsi, esi
mov ecx, [rdi]
mov rax, rdi
lea rdx, [rdi+rsi*4-4]
mov esi, [rdx]
mov [rdi], esi
mov [rdx], ecx
retn | _DWORD * func0(_DWORD *a1, int a2)
{
int v2; // ecx
_DWORD *result; // rax
_DWORD *v4; // rdx
v2 = *a1;
result = a1;
v4 = &a1[a2 - 1];
*a1 = *v4;
*v4 = v2;
return result;
} | func0:
ENDBR64
MOVSXD RSI,ESI
MOV ECX,dword ptr [RDI]
MOV RAX,RDI
LEA RDX,[RDI + RSI*0x4 + -0x4]
MOV ESI,dword ptr [RDX]
MOV dword ptr [RDI],ESI
MOV dword ptr [RDX],ECX
RET | int4 * func0(int4 *param_1,int param_2)
{
int4 uVar1;
uVar1 = *param_1;
*param_1 = param_1[(long)param_2 + -1];
param_1[(long)param_2 + -1] = uVar1;
return param_1;
} |
6,396 | func0 |
#include <assert.h>
| int func0(int r) {
if (r < 0) {
return -1;
}
return r * r;
}
| int main() {
assert(func0(0) == 0);
assert(func0(-1) == -1);
assert(func0(2) == 4);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x4(%rbp)
cmpl $0x0,-0x4(%rbp)
jns 1161 <func0+0x18>
mov $0xffffffff,%eax
jmp 1167 <func0+0x1e>
mov -0x4(%rbp),%eax
imul %eax,%eax
pop %rbp
retq
| func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
cmp [rbp+var_4], 0
jns short loc_1161
mov eax, 0FFFFFFFFh
jmp short loc_1167
loc_1161:
mov eax, [rbp+var_4]
imul eax, eax
loc_1167:
pop rbp
retn | long long func0(int a1)
{
if ( a1 >= 0 )
return (unsigned int)(a1 * a1);
else
return 0xFFFFFFFFLL;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
CMP dword ptr [RBP + -0x4],0x0
JNS 0x00101161
MOV EAX,0xffffffff
JMP 0x00101167
LAB_00101161:
MOV EAX,dword ptr [RBP + -0x4]
IMUL EAX,EAX
LAB_00101167:
POP RBP
RET | int func0(int param_1)
{
if (param_1 < 0) {
param_1 = -1;
}
else {
param_1 = param_1 * param_1;
}
return param_1;
} |
6,397 | func0 |
#include <assert.h>
| int func0(int r) {
if (r < 0) {
return -1;
}
return r * r;
}
| int main() {
assert(func0(0) == 0);
assert(func0(-1) == -1);
assert(func0(2) == 4);
return 0;
}
| O1 | c | func0:
endbr64
mov %edi,%eax
test %edi,%edi
js 1137 <func0+0xe>
imul %edi,%eax
retq
mov $0xffffffff,%eax
retq
| func0:
endbr64
mov eax, edi
test edi, edi
js short loc_1137
imul eax, edi
retn
loc_1137:
mov eax, 0FFFFFFFFh
retn | long long func0(int a1)
{
if ( a1 < 0 )
return 0xFFFFFFFFLL;
else
return (unsigned int)(a1 * a1);
} | func0:
ENDBR64
MOV EAX,EDI
TEST EDI,EDI
JS 0x00101137
IMUL EAX,EDI
RET
LAB_00101137:
MOV EAX,0xffffffff
RET | int func0(int param_1)
{
if (-1 < param_1) {
return param_1 * param_1;
}
return -1;
} |
6,398 | func0 |
#include <assert.h>
| int func0(int r) {
if (r < 0) {
return -1;
}
return r * r;
}
| int main() {
assert(func0(0) == 0);
assert(func0(-1) == -1);
assert(func0(2) == 4);
return 0;
}
| O2 | c | func0:
endbr64
mov %edi,%eax
test %edi,%edi
js 114e <func0+0xe>
imul %edi,%eax
retq
mov $0xffffffff,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
xchg %ax,%ax
| func0:
endbr64
mov eax, edi
test edi, edi
js short loc_114E
imul eax, edi
retn
loc_114E:
mov eax, 0FFFFFFFFh
retn | long long func0(int a1)
{
if ( a1 < 0 )
return 0xFFFFFFFFLL;
else
return (unsigned int)(a1 * a1);
} | func0:
ENDBR64
MOV EAX,EDI
TEST EDI,EDI
JS 0x0010114e
IMUL EAX,EDI
RET
LAB_0010114e:
MOV EAX,0xffffffff
RET | int func0(int param_1)
{
if (-1 < param_1) {
return param_1 * param_1;
}
return -1;
} |
6,399 | func0 |
#include <assert.h>
| int func0(int r) {
if (r < 0) {
return -1;
}
return r * r;
}
| int main() {
assert(func0(0) == 0);
assert(func0(-1) == -1);
assert(func0(2) == 4);
return 0;
}
| O3 | c | func0:
endbr64
mov %edi,%eax
test %edi,%edi
js 114e <func0+0xe>
imul %edi,%eax
retq
mov $0xffffffff,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
xchg %ax,%ax
| func0:
endbr64
mov eax, edi
test edi, edi
js short loc_114E
imul eax, edi
retn
loc_114E:
mov eax, 0FFFFFFFFh
retn | long long func0(int a1)
{
if ( a1 < 0 )
return 0xFFFFFFFFLL;
else
return (unsigned int)(a1 * a1);
} | func0:
ENDBR64
MOV EAX,EDI
TEST EDI,EDI
JS 0x0010114e
IMUL EAX,EDI
RET
LAB_0010114e:
MOV EAX,0xffffffff
RET | int func0(int param_1)
{
if (-1 < param_1) {
return param_1 * param_1;
}
return -1;
} |
6,400 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int array[], int start, int end) {
if (start > end) {
return end + 1;
}
if (start != array[start]) {
return start;
}
int mid = (start + end) / 2;
if (array[mid] == mid) {
return func0(array, mid + 1, end);
}
return func0(array, start, mid);
}... | int main() {
int array1[] = {0, 1, 2, 3};
int array2[] = {0, 1, 2, 6, 9};
int array3[] = {2, 3, 5, 8, 9};
assert(func0(array1, 0, 3) == 4);
assert(func0(array2, 0, 4) == 3);
assert(func0(array3, 0, 4) == 0);
printf("All tests passed!\n");
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
mov %edx,-0x20(%rbp)
mov -0x1c(%rbp),%eax
cmp -0x20(%rbp),%eax
jle 11af <func0+0x26>
mov -0x20(%rbp),%eax
add $0x1,%eax
jmp 122b <func0+0xa2>
mov -0x1c(%rbp),%eax
cltq
lea 0x0(,%rax,4... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_20], edx
mov eax, [rbp+var_1C]
cmp eax, [rbp+var_20]
jle short loc_11AF
mov eax, [rbp+var_20]
add eax, 1
jmp short locret_122B
loc_11AF:
mov eax, [rbp+var_1C]
cdq... | long long func0(long long a1, unsigned int a2, unsigned int a3)
{
int v4; // [rsp+1Ch] [rbp-4h]
if ( (int)a2 > (int)a3 )
return a3 + 1;
if ( a2 != *(_DWORD *)(4LL * (int)a2 + a1) )
return a2;
v4 = (int)(a2 + a3) / 2;
if ( v4 == *(_DWORD *)(4LL * v4 + a1) )
return func0(a1, (unsigned int)(v4 + 1)... | 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]
CMP EAX,dword ptr [RBP + -0x20]
JLE 0x001011af
MOV EAX,dword ptr [RBP + -0x20]
ADD EAX,0x1
JMP 0x0010122b
LAB_001011af:
MOV EAX,dword ptr [RBP ... | ulong func0(long param_1,uint param_2,int param_3)
{
int iVar1;
ulong uVar2;
if (param_3 < (int)param_2) {
uVar2 = (ulong)(param_3 + 1);
}
else if (param_2 == *(uint *)(param_1 + (long)(int)param_2 * 4)) {
iVar1 = (int)(param_3 + param_2) / 2;
if (iVar1 == *(int *)(param_1 + (long)iVar1 * 4)) ... |
6,401 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int array[], int start, int end) {
if (start > end) {
return end + 1;
}
if (start != array[start]) {
return start;
}
int mid = (start + end) / 2;
if (array[mid] == mid) {
return func0(array, mid + 1, end);
}
return func0(array, start, mid);
}... | int main() {
int array1[] = {0, 1, 2, 3};
int array2[] = {0, 1, 2, 6, 9};
int array3[] = {2, 3, 5, 8, 9};
assert(func0(array1, 0, 3) == 4);
assert(func0(array2, 0, 4) == 3);
assert(func0(array3, 0, 4) == 0);
printf("All tests passed!\n");
return 0;
}
| O1 | c | func0:
endbr64
cmp %edx,%esi
jg 11bf <func0+0x36>
movslq %esi,%rcx
mov %esi,%eax
cmp %esi,(%rdi,%rcx,4)
jne 11cd <func0+0x44>
sub $0x8,%rsp
lea (%rsi,%rdx,1),%ecx
mov %ecx,%eax
shr $0x1f,%eax
add %ecx,%eax
sar %eax
movslq %eax,%rcx
cmp %eax,(%rdi,%rcx,4)
je 11c3 <func0+0x3a>
mov... | func0:
endbr64
cmp esi, edx
jg short loc_11BF
movsxd rcx, esi
mov eax, esi
cmp [rdi+rcx*4], esi
jnz short locret_11CD
sub rsp, 8
lea ecx, [rsi+rdx]
mov eax, ecx
shr eax, 1Fh
add eax, ecx
sar eax, 1
movsxd rcx, eax
cmp [rdi+rcx*4], eax
jz short loc_11C3
mov edx... | long long func0(long long a1, long long a2, int a3)
{
long long result; // rax
int v4; // eax
if ( (int)a2 > a3 )
return (unsigned int)(a3 + 1);
result = (unsigned int)a2;
if ( *(_DWORD *)(a1 + 4LL * (int)a2) == (_DWORD)a2 )
{
v4 = ((int)a2 + a3) / 2;
if ( *(_DWORD *)(a1 + 4LL * v4) == v4 )
... | func0:
ENDBR64
CMP ESI,EDX
JG 0x001011bf
MOVSXD RCX,ESI
MOV EAX,ESI
CMP dword ptr [RDI + RCX*0x4],ESI
JNZ 0x001011cd
SUB RSP,0x8
LEA ECX,[RSI + RDX*0x1]
MOV EAX,ECX
SHR EAX,0x1f
ADD EAX,ECX
SAR EAX,0x1
MOVSXD RCX,EAX
CMP dword ptr [RDI + RCX*0x4],EAX
JZ 0x001011c3
MOV EDX,EAX
CALL 0x00101189
LAB_001011ba:
ADD RSP,0x8
R... | ulong func0(long param_1,ulong param_2,int param_3)
{
int iVar1;
ulong uVar2;
iVar1 = (int)param_2;
if (param_3 < iVar1) {
return (ulong)(param_3 + 1);
}
if (*(int *)(param_1 + (long)iVar1 * 4) == iVar1) {
iVar1 = (iVar1 + param_3) / 2;
if (*(int *)(param_1 + (long)iVar1 * 4) == iVar1) {
... |
6,402 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int array[], int start, int end) {
if (start > end) {
return end + 1;
}
if (start != array[start]) {
return start;
}
int mid = (start + end) / 2;
if (array[mid] == mid) {
return func0(array, mid + 1, end);
}
return func0(array, start, mid);
}... | int main() {
int array1[] = {0, 1, 2, 3};
int array2[] = {0, 1, 2, 6, 9};
int array3[] = {2, 3, 5, 8, 9};
assert(func0(array1, 0, 3) == 4);
assert(func0(array2, 0, 4) == 3);
assert(func0(array3, 0, 4) == 0);
printf("All tests passed!\n");
return 0;
}
| O2 | c | func0:
endbr64
movslq %esi,%rax
lea (%rdi,%rax,4),%r8
jmp 12fb <func0+0x2b>
nopl (%rax)
cmp %esi,(%r8)
jne 1308 <func0+0x38>
lea (%rdx,%rsi,1),%eax
mov %eax,%ecx
shr $0x1f,%ecx
add %eax,%ecx
sar %ecx
movslq %ecx,%rax
cmp %ecx,(%rdi,%rax,4)
je 1310 <func0+0x40>
mov %ecx,%edx
cmp ... | func0:
endbr64
loc_12D4:
movsxd rax, esi
lea r8, [rdi+rax*4]
jmp short loc_12FB
loc_12E0:
cmp [r8], esi
jnz short loc_1308
lea eax, [rdx+rsi]
mov ecx, eax
shr ecx, 1Fh
add ecx, eax
sar ecx, 1
movsxd rax, ecx
cmp [rdi+rax*4], ecx
jz short loc_1310
mov edx, ecx
loc_12FB:... | long long func0(long long a1, int a2, int a3)
{
int v3; // ecx
while ( 1 )
{
if ( a3 < a2 )
return (unsigned int)(a3 + 1);
if ( *(_DWORD *)(a1 + 4LL * a2) != a2 )
break;
v3 = (a3 + a2) / 2;
if ( *(_DWORD *)(a1 + 4LL * v3) == v3 )
a2 = v3 + 1;
else
a3 = (a3 + a2) / 2;
... | func0:
ENDBR64
LAB_001012d4:
MOVSXD RAX,ESI
LEA R8,[RDI + RAX*0x4]
JMP 0x001012fb
LAB_001012e0:
CMP dword ptr [R8],ESI
JNZ 0x00101308
LEA EAX,[RDX + RSI*0x1]
MOV ECX,EAX
SHR ECX,0x1f
ADD ECX,EAX
SAR ECX,0x1
MOVSXD RAX,ECX
CMP dword ptr [RDI + RAX*0x4],ECX
JZ 0x00101310
MOV EDX,ECX
LAB_001012fb:
CMP EDX,ESI
JGE 0x001012... | int func0(long param_1,int param_2,int param_3)
{
int iVar1;
do {
iVar1 = param_3;
do {
param_3 = iVar1;
if (param_3 < param_2) {
return param_3 + 1;
}
if (*(int *)(param_1 + (long)param_2 * 4) != param_2) {
return param_2;
}
iVar1 = (param_3 + param_2... |
6,403 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int array[], int start, int end) {
if (start > end) {
return end + 1;
}
if (start != array[start]) {
return start;
}
int mid = (start + end) / 2;
if (array[mid] == mid) {
return func0(array, mid + 1, end);
}
return func0(array, start, mid);
}... | int main() {
int array1[] = {0, 1, 2, 3};
int array2[] = {0, 1, 2, 6, 9};
int array3[] = {2, 3, 5, 8, 9};
assert(func0(array1, 0, 3) == 4);
assert(func0(array2, 0, 4) == 3);
assert(func0(array3, 0, 4) == 0);
printf("All tests passed!\n");
return 0;
}
| O3 | c | func0:
endbr64
movslq %esi,%rax
lea (%rdi,%rax,4),%r8
jmp 12eb <func0+0x2b>
nopl (%rax)
cmp %esi,(%r8)
jne 12f8 <func0+0x38>
lea (%rdx,%rsi,1),%eax
mov %eax,%ecx
shr $0x1f,%ecx
add %eax,%ecx
sar %ecx
movslq %ecx,%rax
cmp %ecx,(%rdi,%rax,4)
je 1300 <func0+0x40>
mov %ecx,%edx
cmp ... | func0:
endbr64
loc_12C4:
movsxd rax, esi
lea r8, [rdi+rax*4]
jmp short loc_12EB
loc_12D0:
cmp [r8], esi
jnz short loc_12F8
lea eax, [rdx+rsi]
mov ecx, eax
shr ecx, 1Fh
add ecx, eax
sar ecx, 1
movsxd rax, ecx
cmp [rdi+rax*4], ecx
jz short loc_1300
mov edx, ecx
loc_12EB:... | long long func0(long long a1, int a2, int a3)
{
int v3; // ecx
while ( 1 )
{
if ( a3 < a2 )
return (unsigned int)(a3 + 1);
if ( *(_DWORD *)(a1 + 4LL * a2) != a2 )
break;
v3 = (a3 + a2) / 2;
if ( *(_DWORD *)(a1 + 4LL * v3) == v3 )
a2 = v3 + 1;
else
a3 = (a3 + a2) / 2;
... | func0:
ENDBR64
LAB_001012c4:
MOVSXD RAX,ESI
LEA R8,[RDI + RAX*0x4]
JMP 0x001012eb
LAB_001012d0:
CMP dword ptr [R8],ESI
JNZ 0x001012f8
LEA EAX,[RDX + RSI*0x1]
MOV ECX,EAX
SHR ECX,0x1f
ADD ECX,EAX
SAR ECX,0x1
MOVSXD RAX,ECX
CMP dword ptr [RDI + RAX*0x4],ECX
JZ 0x00101300
MOV EDX,ECX
LAB_001012eb:
CMP EDX,ESI
JGE 0x001012... | int func0(long param_1,int param_2,int param_3)
{
int iVar1;
do {
iVar1 = param_3;
do {
param_3 = iVar1;
if (param_3 < param_2) {
return param_3 + 1;
}
if (*(int *)(param_1 + (long)param_2 * 4) != param_2) {
return param_2;
}
iVar1 = (param_3 + param_2... |
6,404 | func0 |
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <stdlib.h>
#define MAX 1000
| char* func0(char* string) {
char new_string[MAX];
int i, j, space_count = 0, new_length;
char *result;
i = strlen(string);
for (j = 0; j < i; j++) {
if (string[j] == ' ')
space_count++;
}
new_length = i + space_count * 2;
if (new_length > MAX) {
return "";
}
int index = new_length - ... | int main() {
assert(strcmp(func0("My Name is Dawood"), "My%20Name%20is%20Dawood") == 0);
assert(strcmp(func0("I am a Programmer"), "I%20am%20a%20Programmer") == 0);
assert(strcmp(func0("I love Coding"), "I%20love%20Coding") == 0);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x420,%rsp
mov %rdi,-0x418(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
movl $0x0,-0x408(%rbp)
mov -0x418(%rbp),%rax
mov %rax,%rdi
callq 10b0 <strlen@plt>
mov %eax,-0x400(%rbp)
movl $0x0,-0x40c(%rbp)
jmp 1261 <func0+0x78>
mov ... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 420h
mov [rbp+s], rdi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov [rbp+var_408], 0
mov rax, [rbp+s]
mov rdi, rax; s
call _strlen
mov [rbp+var_400], eax
mov [rbp+var_40C], 0
jmp short loc_1261
loc_1239:
mov ... | char * func0(const char *a1)
{
int i; // [rsp+14h] [rbp-40Ch]
int j; // [rsp+14h] [rbp-40Ch]
int v4; // [rsp+18h] [rbp-408h]
int v5; // [rsp+1Ch] [rbp-404h]
int v6; // [rsp+20h] [rbp-400h]
int v7; // [rsp+24h] [rbp-3FCh]
char *dest; // [rsp+28h] [rbp-3F8h]
char src[1000]; // [rsp+30h] [rbp-3F0h] BYREF
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x420
MOV qword ptr [RBP + -0x418],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOV dword ptr [RBP + -0x408],0x0
MOV RAX,qword ptr [RBP + -0x418]
MOV RDI,RAX
CALL 0x001010b0
MOV dword ptr [RBP + -0x400],EAX
MOV dword ptr [RBP + -0x40c],0x0
JMP 0x... | char * func0(char *param_1)
{
int iVar1;
int iVar2;
size_t sVar3;
char *__dest;
long in_FS_OFFSET;
int local_414;
int local_410;
int local_40c;
char local_3f8 [1000];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_410 = 0;
sVar3 = strlen(param_1);
iVar1 = (int)sVar3;
f... |
6,405 | func0 |
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <stdlib.h>
#define MAX 1000
| char* func0(char* string) {
char new_string[MAX];
int i, j, space_count = 0, new_length;
char *result;
i = strlen(string);
for (j = 0; j < i; j++) {
if (string[j] == ' ')
space_count++;
}
new_length = i + space_count * 2;
if (new_length > MAX) {
return "";
}
int index = new_length - ... | int main() {
assert(strcmp(func0("My Name is Dawood"), "My%20Name%20is%20Dawood") == 0);
assert(strcmp(func0("I am a Programmer"), "I%20am%20a%20Programmer") == 0);
assert(strcmp(func0("I love Coding"), "I%20love%20Coding") == 0);
return 0;
}
| O1 | c | func0:
endbr64
push %rbx
sub $0x3f0,%rsp
mov %rdi,%r8
mov %fs:0x28,%rax
mov %rax,0x3e8(%rsp)
xor %eax,%eax
mov $0xffffffffffffffff,%rcx
repnz scas %es:(%rdi),%al
mov %rcx,%rax
not %rax
sub $0x1,%rax
test %eax,%eax
jle 122b <func0+0x82>
mov %r8,%rdx
lea -0x1(%rax),%ecx
lea 0x1(... | func0:
endbr64
push rbp
push rbx
sub rsp, 3F8h
mov rbx, rdi
mov rax, fs:28h
mov [rsp+408h+var_20], rax
xor eax, eax
call _strlen
test eax, eax
jle short loc_125E
mov rdx, rbx
lea ecx, [rax-1]
lea rdi, [rbx+rcx+1]
mov ecx, 0
loc_1225:
cmp byte ptr [rdx], 20h ; ' '
... | char * func0(_BYTE *a1)
{
int v2; // eax
_BYTE *v3; // rdx
long long v4; // rdi
int v5; // ecx
int v6; // edi
char *v7; // rbp
int v8; // edx
long long v9; // rax
char v11; // cl
_BYTE v12[1000]; // [rsp+0h] [rbp-408h] BYREF
unsigned long long v13; // [rsp+3E8h] [rbp-20h]
v13 = __readfsqword(0x... | func0:
ENDBR64
PUSH RBP
PUSH RBX
SUB RSP,0x3f8
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x3e8],RAX
XOR EAX,EAX
CALL 0x001010b0
TEST EAX,EAX
JLE 0x0010125e
MOV RDX,RBX
LEA ECX,[RAX + -0x1]
LEA RDI,[RBX + RCX*0x1 + 0x1]
MOV ECX,0x0
LAB_00101225:
CMP byte ptr [RDX],0x20
SETZ SIL
MOVZX ESI,SIL
ADD ECX,E... | char * func0(char *param_1)
{
int iVar1;
size_t sVar2;
long lVar3;
int iVar4;
int iVar5;
char *pcVar6;
long in_FS_OFFSET;
char acStack_408 [1000];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
sVar2 = strlen(param_1);
iVar1 = (int)sVar2;
if (iVar1 < 1) {
acStack_408[iVar1] ... |
6,406 | func0 |
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <stdlib.h>
#define MAX 1000
| char* func0(char* string) {
char new_string[MAX];
int i, j, space_count = 0, new_length;
char *result;
i = strlen(string);
for (j = 0; j < i; j++) {
if (string[j] == ' ')
space_count++;
}
new_length = i + space_count * 2;
if (new_length > MAX) {
return "";
}
int index = new_length - ... | int main() {
assert(strcmp(func0("My Name is Dawood"), "My%20Name%20is%20Dawood") == 0);
assert(strcmp(func0("I am a Programmer"), "I%20am%20a%20Programmer") == 0);
assert(strcmp(func0("I love Coding"), "I%20love%20Coding") == 0);
return 0;
}
| O2 | c | func0:
endbr64
push %rbx
mov %rdi,%rbx
sub $0x3f0,%rsp
mov %fs:0x28,%rax
mov %rax,0x3e8(%rsp)
xor %eax,%eax
callq 10a0 <strlen@plt>
test %eax,%eax
jle 13b0 <func0+0x100>
lea -0x1(%rax),%esi
mov %rbx,%rdx
mov %rsi,%rcx
lea 0x1(%rbx,%rsi,1),%rdi
xor %esi,%esi
xor %r8d,%r8d
cmpb ... | func0:
endbr64
push rbx
mov rbx, rdi
sub rsp, 3F0h
mov rax, fs:28h
mov [rsp+3F8h+var_10], rax
xor eax, eax
call _strlen
test eax, eax
jle loc_13B8
lea esi, [rax-1]
mov rdx, rbx
mov rcx, rsi
lea r8, [rbx+rsi+1]
xor esi, esi
nop
loc_1300:
xor edi, edi
cmp byte ... | long long func0(_BYTE *a1, long long a2)
{
int v3; // eax
_BYTE *v4; // rdx
long long v5; // rcx
long long v6; // r8
int v7; // esi
int v8; // edi
char *v9; // r8
long long v10; // rdx
char v11; // r8
long long v12; // rax
_BYTE v14[1000]; // [rsp+0h] [rbp-3F8h] BYREF
unsigned long long v15; //... | func0:
ENDBR64
PUSH RBX
MOV RBX,RDI
SUB RSP,0x3f0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x3e8],RAX
XOR EAX,EAX
CALL 0x001010b0
TEST EAX,EAX
JLE 0x001013b8
LEA ESI,[RAX + -0x1]
MOV RDX,RBX
MOV RCX,RSI
LEA R8,[RBX + RSI*0x1 + 0x1]
XOR ESI,ESI
NOP
LAB_00101300:
XOR EDI,EDI
CMP byte ptr [RDX],0x20
SETZ DIL
ADD R... | char * func0(char *param_1)
{
char cVar1;
int iVar2;
size_t sVar3;
long lVar4;
char *pcVar5;
uint uVar6;
int iVar7;
long in_FS_OFFSET;
char acStack_3f8 [1000];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
sVar3 = strlen(param_1);
iVar2 = (int)sVar3;
if (iVar2 < 1) {
acSt... |
6,407 | func0 |
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <stdlib.h>
#define MAX 1000
| char* func0(char* string) {
char new_string[MAX];
int i, j, space_count = 0, new_length;
char *result;
i = strlen(string);
for (j = 0; j < i; j++) {
if (string[j] == ' ')
space_count++;
}
new_length = i + space_count * 2;
if (new_length > MAX) {
return "";
}
int index = new_length - ... | int main() {
assert(strcmp(func0("My Name is Dawood"), "My%20Name%20is%20Dawood") == 0);
assert(strcmp(func0("I am a Programmer"), "I%20am%20a%20Programmer") == 0);
assert(strcmp(func0("I love Coding"), "I%20love%20Coding") == 0);
return 0;
}
| O3 | c | func0:
endbr64
push %rbx
mov %rdi,%rbx
sub $0x3f0,%rsp
mov %fs:0x28,%rax
mov %rax,0x3e8(%rsp)
xor %eax,%eax
callq 10a0 <strlen@plt>
test %eax,%eax
jle 15e8 <func0+0x338>
lea -0x1(%rax),%ecx
cmp $0xe,%ecx
jbe 15d8 <func0+0x328>
mov %eax,%esi
pxor %xmm1,%xmm1
pxor %xmm5,%xmm5
mov ... | func0:
endbr64
push rbp
push rbx
mov rbx, rdi
sub rsp, 3F8h
mov rax, fs:28h
mov [rsp+408h+var_20], rax
xor eax, eax
call _strlen
mov rsi, rax
test eax, eax
jle loc_1578
lea edi, [rax-1]
cmp edi, 0Eh
jbe loc_1620
mov edx, esi
pxor xmm1, xmm1
pxor xmm5, xmm5
m... | long long func0(const char *a1, __m128i a2)
{
int v3; // eax
int v4; // esi
int v5; // edi
__m128i v6; // xmm1
const __m128i *v7; // rax
__m128i si128; // xmm6
__m128i v9; // xmm0
__m128i v10; // xmm0
__m128i v11; // xmm3
__m128i v12; // xmm2
__m128i v13; // xmm0
__m128i v14; // xmm3
__m128i ... | func0:
ENDBR64
PUSH RBP
PUSH RBX
MOV RBX,RDI
SUB RSP,0x3f8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x3e8],RAX
XOR EAX,EAX
CALL 0x001010a0
MOV RSI,RAX
TEST EAX,EAX
JLE 0x00101578
LEA EDI,[RAX + -0x1]
CMP EDI,0xe
JBE 0x00101620
MOV EDX,ESI
PXOR XMM1,XMM1
PXOR XMM5,XMM5
MOV RAX,RBX
SHR EDX,0x4
MOVDQA XMM6,xmmword... | char * func0(char *param_1)
{
bool bVar1;
bool bVar2;
bool bVar3;
bool bVar4;
bool bVar5;
bool bVar6;
bool bVar7;
bool bVar8;
char *pcVar9;
char *pcVar10;
char *pcVar11;
char *pcVar12;
char *pcVar13;
char *pcVar14;
char *pcVar15;
char *pcVar16;
char *pcVar17;
char *pcVar18;
char *... |
6,408 | func0 | #include <assert.h>
#include <stdio.h>
| int* func0(int* list, int size, int* result_size) {
static int ev_li[100];
int j = 0;
for (int i = 0; i < size; i++) {
if (list[i] % 2 == 0) {
ev_li[j++] = list[i];
}
}
*result_size = j;
return ev_li;
}
| int main() {
int size;
int test1[] = {1,2,3,4,5};
int expected1[] = {2,4};
int* result1 = func0(test1, 5, &size);
assert(size == 2);
for (int i = 0; i < size; i++) {
assert(result1[i] == expected1[i]);
}
int test2[] = {4,5,6,7,8,0,1};
int expected2[] = {4,6,... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
mov %rdx,-0x28(%rbp)
movl $0x0,-0x8(%rbp)
movl $0x0,-0x4(%rbp)
jmp 1201 <func0+0x78>
mov -0x4(%rbp),%eax
cltq
lea 0x0(,%rax,4),%rdx
mov -0x18(%rbp),%rax
add %rdx,%rax
mov (%rax),%eax
and $0x1,%eax
tes... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_28], rdx
mov [rbp+var_8], 0
mov [rbp+var_4], 0
jmp short loc_1201
loc_11AC:
mov eax, [rbp+var_4]
cdqe
lea rdx, ds:0[rax*4]
mov rax, [rbp+var_18]
add rax, rdx
mov eax, [rax]
an... | _DWORD * func0(long long a1, int a2, _DWORD *a3)
{
int v3; // eax
int v5; // [rsp+20h] [rbp-8h]
int i; // [rsp+24h] [rbp-4h]
v5 = 0;
for ( i = 0; i < a2; ++i )
{
if ( (*(_DWORD *)(4LL * i + a1) & 1) == 0 )
{
v3 = v5++;
ev_li_1[v3] = *(_DWORD *)(4LL * i + a1);
}
}
*a3 = v5;
ret... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV qword ptr [RBP + -0x28],RDX
MOV dword ptr [RBP + -0x8],0x0
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00101201
LAB_001011ac:
MOV EAX,dword ptr [RBP + -0x4]
CDQE
LEA RDX,[RAX*0x4]
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,RDX... | int1 * func0(long param_1,int param_2,int *param_3)
{
int local_10;
int local_c;
local_10 = 0;
for (local_c = 0; local_c < param_2; local_c = local_c + 1) {
if ((*(uint *)(param_1 + (long)local_c * 4) & 1) == 0) {
*(int4 *)(ev_li_1 + (long)local_10 * 4) = *(int4 *)((long)local_c * 4 + param_1);
... |
6,409 | func0 | #include <assert.h>
#include <stdio.h>
| int* func0(int* list, int size, int* result_size) {
static int ev_li[100];
int j = 0;
for (int i = 0; i < size; i++) {
if (list[i] % 2 == 0) {
ev_li[j++] = list[i];
}
}
*result_size = j;
return ev_li;
}
| int main() {
int size;
int test1[] = {1,2,3,4,5};
int expected1[] = {2,4};
int* result1 = func0(test1, 5, &size);
assert(size == 2);
for (int i = 0; i < size; i++) {
assert(result1[i] == expected1[i]);
}
int test2[] = {4,5,6,7,8,0,1};
int expected2[] = {4,6,... | O1 | c | func0:
endbr64
test %esi,%esi
jle 11c6 <func0+0x3d>
mov %rdi,%rax
lea -0x1(%rsi),%ecx
lea 0x4(%rdi,%rcx,4),%rdi
mov $0x0,%esi
lea 0x2e98(%rip),%r9
jmp 11b3 <func0+0x2a>
add $0x4,%rax
cmp %rdi,%rax
je 11cb <func0+0x42>
mov (%rax),%ecx
test $0x1,%cl
jne 11aa <func0+0x21>
movslq %e... | func0:
endbr64
test esi, esi
jle short loc_11C6
mov rax, rdi
lea ecx, [rsi-1]
lea rdi, [rdi+rcx*4+4]
mov esi, 0
lea r9, ev_li_1
jmp short loc_11B3
loc_11AA:
add rax, 4
cmp rax, rdi
jz short loc_11CB
loc_11B3:
mov ecx, [rax]
test cl, 1
jnz short loc_11AA
movsxd r8,... | _DWORD * func0(_DWORD *a1, int a2, _DWORD *a3)
{
_DWORD *v3; // rax
long long v4; // rdi
int v5; // esi
if ( a2 <= 0 )
{
v5 = 0;
}
else
{
v3 = a1;
v4 = (long long)&a1[a2 - 1 + 1];
v5 = 0;
do
{
if ( (*v3 & 1) == 0 )
ev_li_1[v5++] = *v3;
++v3;
}
while (... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x001011c6
MOV RAX,RDI
LEA ECX,[RSI + -0x1]
LEA RDI,[RDI + RCX*0x4 + 0x4]
MOV ESI,0x0
LEA R9,[0x104040]
JMP 0x001011b3
LAB_001011aa:
ADD RAX,0x4
CMP RAX,RDI
JZ 0x001011cb
LAB_001011b3:
MOV ECX,dword ptr [RAX]
TEST CL,0x1
JNZ 0x001011aa
MOVSXD R8,ESI
MOV dword ptr [R9 + R8*0x4],ECX
LEA ES... | int4 * func0(uint *param_1,int param_2,int *param_3)
{
uint *puVar1;
int iVar2;
if (param_2 < 1) {
iVar2 = 0;
}
else {
puVar1 = param_1 + (ulong)(param_2 - 1) + 1;
iVar2 = 0;
do {
if ((*param_1 & 1) == 0) {
(&ev_li_1)[iVar2] = *param_1;
iVar2 = iVar2 + 1;
}
... |
6,410 | func0 | #include <assert.h>
#include <stdio.h>
| int* func0(int* list, int size, int* result_size) {
static int ev_li[100];
int j = 0;
for (int i = 0; i < size; i++) {
if (list[i] % 2 == 0) {
ev_li[j++] = list[i];
}
}
*result_size = j;
return ev_li;
}
| int main() {
int size;
int test1[] = {1,2,3,4,5};
int expected1[] = {2,4};
int* result1 = func0(test1, 5, &size);
assert(size == 2);
for (int i = 0; i < size; i++) {
assert(result1[i] == expected1[i]);
}
int test2[] = {4,5,6,7,8,0,1};
int expected2[] = {4,6,... | O2 | c | func0:
endbr64
test %esi,%esi
jle 1468 <func0+0x48>
lea -0x1(%rsi),%eax
xor %ecx,%ecx
lea 0x2c0c(%rip),%r9
lea 0x4(%rdi,%rax,4),%rsi
nopl 0x0(%rax)
mov (%rdi),%eax
test $0x1,%al
jne 1450 <func0+0x30>
movslq %ecx,%r8
add $0x1,%ecx
mov %eax,(%r9,%r8,4)
add $0x4,%rdi
cmp %rsi,%rdi
jn... | func0:
endbr64
test esi, esi
jle short loc_13F0
lea eax, [rsi-1]
xor ecx, ecx
lea r9, ev_li_1
lea rsi, [rdi+rax*4+4]
nop dword ptr [rax+00000000h]
loc_13D0:
mov eax, [rdi]
test al, 1
jnz short loc_13E0
movsxd r8, ecx
add ecx, 1
mov [r9+r8*4], eax
loc_13E0:
add rdi, 4
c... | _DWORD * func0(_DWORD *a1, int a2, _DWORD *a3)
{
int v3; // ecx
long long v4; // rsi
long long v5; // r8
if ( a2 <= 0 )
{
*a3 = 0;
return ev_li_1;
}
else
{
v3 = 0;
v4 = (long long)&a1[a2 - 1 + 1];
do
{
if ( (*a1 & 1) == 0 )
{
v5 = v3++;
ev_li_1[v5] = ... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x001013f0
LEA EAX,[RSI + -0x1]
XOR ECX,ECX
LEA R9,[0x104040]
LEA RSI,[RDI + RAX*0x4 + 0x4]
NOP dword ptr [RAX]
LAB_001013d0:
MOV EAX,dword ptr [RDI]
TEST AL,0x1
JNZ 0x001013e0
MOVSXD R8,ECX
ADD ECX,0x1
MOV dword ptr [R9 + R8*0x4],EAX
LAB_001013e0:
ADD RDI,0x4
CMP RDI,RSI
JNZ 0x001013d0
... | int4 * func0(uint *param_1,int param_2,int *param_3)
{
uint *puVar1;
int iVar2;
long lVar3;
if (0 < param_2) {
iVar2 = 0;
puVar1 = param_1 + (ulong)(param_2 - 1) + 1;
do {
if ((*param_1 & 1) == 0) {
lVar3 = (long)iVar2;
iVar2 = iVar2 + 1;
(&ev_li_1)[lVar3] = *param_... |
6,411 | func0 | #include <assert.h>
#include <stdio.h>
| int* func0(int* list, int size, int* result_size) {
static int ev_li[100];
int j = 0;
for (int i = 0; i < size; i++) {
if (list[i] % 2 == 0) {
ev_li[j++] = list[i];
}
}
*result_size = j;
return ev_li;
}
| int main() {
int size;
int test1[] = {1,2,3,4,5};
int expected1[] = {2,4};
int* result1 = func0(test1, 5, &size);
assert(size == 2);
for (int i = 0; i < size; i++) {
assert(result1[i] == expected1[i]);
}
int test2[] = {4,5,6,7,8,0,1};
int expected2[] = {4,6,... | O3 | c | func0:
endbr64
test %esi,%esi
jle 14a8 <func0+0x48>
lea -0x1(%rsi),%eax
xor %ecx,%ecx
lea 0x2bcc(%rip),%r9
lea 0x4(%rdi,%rax,4),%rsi
nopl 0x0(%rax)
mov (%rdi),%eax
test $0x1,%al
jne 1490 <func0+0x30>
movslq %ecx,%r8
add $0x1,%ecx
mov %eax,(%r9,%r8,4)
add $0x4,%rdi
cmp %rsi,%rdi
jn... | func0:
endbr64
test esi, esi
jle short loc_11C0
movsxd rsi, esi
xor ecx, ecx
lea r9, ev_li_1
lea rsi, [rdi+rsi*4]
nop dword ptr [rax+rax+00000000h]
loc_11A0:
mov eax, [rdi]
test al, 1
jnz short loc_11B0
movsxd r8, ecx
add ecx, 1
mov [r9+r8*4], eax
loc_11B0:
add rdi, 4
cmp... | __int128 * func0(_DWORD *a1, int a2, _DWORD *a3)
{
int v3; // ecx
_DWORD *v4; // rsi
long long v5; // r8
if ( a2 <= 0 )
{
*a3 = 0;
return &ev_li_1;
}
else
{
v3 = 0;
v4 = &a1[a2];
do
{
if ( (*a1 & 1) == 0 )
{
v5 = v3++;
*((_DWORD *)&ev_li_1 + v5) = *a1... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x001011c0
MOVSXD RSI,ESI
XOR ECX,ECX
LEA R9,[0x104040]
LEA RSI,[RDI + RSI*0x4]
NOP dword ptr [RAX + RAX*0x1]
LAB_001011a0:
MOV EAX,dword ptr [RDI]
TEST AL,0x1
JNZ 0x001011b0
MOVSXD R8,ECX
ADD ECX,0x1
MOV dword ptr [R9 + R8*0x4],EAX
LAB_001011b0:
ADD RDI,0x4
CMP RDI,RSI
JNZ 0x001011a0
MO... | int4 * func0(uint *param_1,int param_2,int *param_3)
{
uint *puVar1;
int iVar2;
long lVar3;
if (0 < param_2) {
iVar2 = 0;
puVar1 = param_1 + param_2;
do {
if ((*param_1 & 1) == 0) {
lVar3 = (long)iVar2;
iVar2 = iVar2 + 1;
(&ev_li_1)[lVar3] = *param_1;
}
... |
6,412 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
void adjac(int *ele, int ele_size, int *sub, int sub_size, int ***results, int *results_size, int *cap) {
if (ele_size == 0) {
if (*results_size == *cap) {
*cap *= 2;
*results = realloc(*results,... | int **func0(int *test_tup, int size, int *result_size) {
int **results = malloc(10 * sizeof(int *));
int cap = 10;
*result_size = 0;
adjac(test_tup, size, NULL, 0, &results, result_size, &cap);
return results;
}
| int main() {
int size;
int test_tup1[] = {3, 4};
int **res1 = func0(test_tup1, 2, &size);
assert(size == 9);
int test_tup2[] = {4, 5};
int **res2 = func0(test_tup2, 2, &size);
assert(size == 9);
int test_tup3[] = {5, 6};
int **res3 = func0(test_tup3, 2, &size);
asse... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x40,%rsp
mov %rdi,-0x28(%rbp)
mov %esi,-0x2c(%rbp)
mov %rdx,-0x38(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
mov $0x50,%edi
callq 10e0 <malloc@plt>
mov %rax,-0x10(%rbp)
movl $0xa,-0x14(%rbp)
mov -0x38(%rbp),%rax
movl $0x... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_28], rdi
mov [rbp+var_2C], esi
mov [rbp+var_38], rdx
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov edi, 50h ; 'P'; size
call _malloc
mov [rbp+var_10], rax
mov [rbp+var_14], 0Ah
mov rax, [rbp+var_... | long long func0(int a1, int a2, _DWORD *a3)
{
int v5; // [rsp+2Ch] [rbp-14h] BYREF
_QWORD v6[2]; // [rsp+30h] [rbp-10h] BYREF
v6[1] = __readfsqword(0x28u);
v6[0] = malloc(0x50uLL);
v5 = 10;
*a3 = 0;
adjac(a1, a2, 0, 0, (unsigned int)v6, (_DWORD)a3, (long long)&v5);
return v6[0];
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x28],RDI
MOV dword ptr [RBP + -0x2c],ESI
MOV qword ptr [RBP + -0x38],RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOV EDI,0x50
CALL 0x001010e0
MOV qword ptr [RBP + -0x10],RAX
MOV dword ptr [RBP + -0x14],0xa
MOV RAX,qwo... | void * func0(int8 param_1,int4 param_2,int4 *param_3)
{
long in_FS_OFFSET;
int4 local_1c;
void *local_18;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_18 = malloc(0x50);
local_1c = 10;
*param_3 = 0;
adjac(param_1,param_2,0,0,&local_18,param_3,&local_1c);
if (local_10 != *(long... |
6,413 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
void adjac(int *ele, int ele_size, int *sub, int sub_size, int ***results, int *results_size, int *cap) {
if (ele_size == 0) {
if (*results_size == *cap) {
*cap *= 2;
*results = realloc(*results,... | int **func0(int *test_tup, int size, int *result_size) {
int **results = malloc(10 * sizeof(int *));
int cap = 10;
*result_size = 0;
adjac(test_tup, size, NULL, 0, &results, result_size, &cap);
return results;
}
| int main() {
int size;
int test_tup1[] = {3, 4};
int **res1 = func0(test_tup1, 2, &size);
assert(size == 9);
int test_tup2[] = {4, 5};
int **res2 = func0(test_tup2, 2, &size);
assert(size == 9);
int test_tup3[] = {5, 6};
int **res3 = func0(test_tup3, 2, &size);
asse... | O1 | c | func0:
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x28,%rsp
mov %rdi,%rbp
mov %esi,%r12d
mov %rdx,%rbx
mov $0x28,%r13d
mov %fs:0x0(%r13),%rax
mov %rax,0x18(%rsp)
xor %eax,%eax
mov $0x50,%edi
callq 10e0 <malloc@plt>
mov %rax,0x10(%rsp)
movl $0xa,0xc(%rsp)
movl $0x0,(%... | func0:
endbr64
push r12
push rbp
push rbx
sub rsp, 20h
mov rbp, rdi
mov r12d, esi
mov rbx, rdx
mov rax, fs:28h
mov [rsp+38h+var_20], rax
xor eax, eax
mov edi, 50h ; 'P'
call _malloc
mov [rsp+38h+var_28], rax
mov [rsp+38h+var_2C], 0Ah
mov dword ptr [rbx], 0
sub ... | long long func0(int a1, int a2, _DWORD *a3)
{
int v5; // [rsp+Ch] [rbp-2Ch] BYREF
_QWORD v6[5]; // [rsp+10h] [rbp-28h] BYREF
v6[1] = __readfsqword(0x28u);
v6[0] = malloc(80LL);
v5 = 10;
*a3 = 0;
adjac(a1, a2, 0, 0, (unsigned int)v6, (_DWORD)a3, (long long)&v5);
return v6[0];
} | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x20
MOV RBP,RDI
MOV R12D,ESI
MOV RBX,RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x18],RAX
XOR EAX,EAX
MOV EDI,0x50
CALL 0x001010e0
MOV qword ptr [RSP + 0x10],RAX
MOV dword ptr [RSP + 0xc],0xa
MOV dword ptr [RBX],0x0
SUB RSP,0x8
LEA RAX,[RSP + 0x14]
PUSH RAX
M... | void * func0(int8 param_1,int4 param_2,int4 *param_3)
{
long in_FS_OFFSET;
int4 local_2c;
void *local_28;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_28 = malloc(0x50);
local_2c = 10;
*param_3 = 0;
adjac(param_1,param_2,0,0,&local_28,param_3,&local_2c);
if (local_20 == *(long... |
6,414 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
void adjac(int *ele, int ele_size, int *sub, int sub_size, int ***results, int *results_size, int *cap) {
if (ele_size == 0) {
if (*results_size == *cap) {
*cap *= 2;
*results = realloc(*results,... | int **func0(int *test_tup, int size, int *result_size) {
int **results = malloc(10 * sizeof(int *));
int cap = 10;
*result_size = 0;
adjac(test_tup, size, NULL, 0, &results, result_size, &cap);
return results;
}
| int main() {
int size;
int test_tup1[] = {3, 4};
int **res1 = func0(test_tup1, 2, &size);
assert(size == 9);
int test_tup2[] = {4, 5};
int **res2 = func0(test_tup2, 2, &size);
assert(size == 9);
int test_tup3[] = {5, 6};
int **res3 = func0(test_tup3, 2, &size);
asse... | O2 | c | func0:
endbr64
push %r12
mov %esi,%r12d
push %rbp
mov %rdi,%rbp
mov $0x50,%edi
push %rbx
mov %rdx,%rbx
sub $0x20,%rsp
mov %fs:0x28,%rax
mov %rax,0x18(%rsp)
xor %eax,%eax
callq 10e0 <malloc@plt>
sub $0x8,%rsp
xor %ecx,%ecx
xor %edx,%edx
mov %rax,0x18(%rsp)
mov %rbx,%r9
mov ... | func0:
endbr64
push r12
mov r12d, esi
push rbp
mov rbp, rdi
mov edi, 50h ; 'P'
push rbx
mov rbx, rdx
sub rsp, 20h
mov rax, fs:28h
mov [rsp+38h+var_20], rax
xor eax, eax
call _malloc
sub rsp, 8
xor ecx, ecx
xor edx, edx
mov [rsp+40h+var_28], rax
mov r9, rbx... | long long func0(int a1, int a2, _DWORD *a3)
{
int v5; // [rsp+Ch] [rbp-2Ch] BYREF
_QWORD v6[5]; // [rsp+10h] [rbp-28h] BYREF
v6[1] = __readfsqword(0x28u);
v6[0] = malloc(80LL);
v5 = 10;
*a3 = 0;
adjac(a1, a2, 0, 0, (unsigned int)v6, (_DWORD)a3, (long long)&v5);
return v6[0];
} | func0:
ENDBR64
PUSH R12
MOV R12D,ESI
PUSH RBP
MOV RBP,RDI
MOV EDI,0x50
PUSH RBX
MOV RBX,RDX
SUB RSP,0x20
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x18],RAX
XOR EAX,EAX
CALL 0x001010e0
SUB RSP,0x8
XOR ECX,ECX
XOR EDX,EDX
MOV qword ptr [RSP + 0x18],RAX
MOV R9,RBX
MOV ESI,R12D
MOV RDI,RBP
MOV dword ptr [RSP + 0x14... | void * func0(int8 param_1,int4 param_2,int4 *param_3)
{
long in_FS_OFFSET;
int4 local_2c;
void *local_28;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_28 = malloc(0x50);
local_2c = 10;
*param_3 = 0;
adjac(param_1,param_2,0,0,&local_28,param_3,&local_2c);
if (local_20 == *(long... |
6,415 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
void adjac(int *ele, int ele_size, int *sub, int sub_size, int ***results, int *results_size, int *cap) {
if (ele_size == 0) {
if (*results_size == *cap) {
*cap *= 2;
*results = realloc(*results,... | int **func0(int *test_tup, int size, int *result_size) {
int **results = malloc(10 * sizeof(int *));
int cap = 10;
*result_size = 0;
adjac(test_tup, size, NULL, 0, &results, result_size, &cap);
return results;
}
| int main() {
int size;
int test_tup1[] = {3, 4};
int **res1 = func0(test_tup1, 2, &size);
assert(size == 9);
int test_tup2[] = {4, 5};
int **res2 = func0(test_tup2, 2, &size);
assert(size == 9);
int test_tup3[] = {5, 6};
int **res3 = func0(test_tup3, 2, &size);
asse... | O3 | c | func0:
endbr64
push %r15
push %r14
push %r13
mov %esi,%r13d
push %r12
push %rbp
mov %rdi,%rbp
mov $0x50,%edi
push %rbx
mov %rdx,%rbx
sub $0x48,%rsp
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
callq 10e0 <malloc@plt>
movl $0xa,0x2c(%rsp)
mov %rax,0x30(%rsp)
movl $0x0,(... | func0:
endbr64
push r15
mov r15d, esi
push r14
mov r14, rdx
push r13
push r12
push rbp
push rbx
sub rsp, 0A8h
mov [rsp+0D8h+var_B8], rdi
mov edi, 50h ; 'P'; size
mov [rsp+0D8h+var_CC], esi
mov rax, fs:28h
mov [rsp+0D8h+var_40], rax
xor eax, eax
call _malloc
mov ... | _QWORD * func0(int *a1, int a2, int *a3)
{
void *v4; // rax
_QWORD *v5; // rbx
void *v6; // rax
int *v8; // r12
int v9; // r13d
long long v10; // rbx
_QWORD *v11; // r15
void *v12; // rax
int *v13; // rax
int v14; // r14d
int *v15; // r13
_DWORD *v16; // rax
_DWORD *v17; // r15
int v18; // e... | func0:
ENDBR64
PUSH R15
MOV R15D,ESI
PUSH R14
MOV R14,RDX
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0xa8
MOV qword ptr [RSP + 0x20],RDI
MOV EDI,0x50
MOV dword ptr [RSP + 0xc],ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x98],RAX
XOR EAX,EAX
CALL 0x001010e0
MOV dword ptr [R14],0x0
MOV qword ptr [RSP + 0x90],R... | int8 * func0(int *param_1,int param_2,int *param_3)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int4 uVar5;
int iVar6;
int8 uVar7;
int8 uVar8;
bool bVar9;
int8 uVar10;
int8 *puVar11;
void *pvVar12;
int *__ptr;
int *__ptr_00;
int8 *puVar13;
int8 *puVar14;
int8 *puVar15;
int8 *puVar... |
6,416 | func0 |
#include <assert.h>
#include <string.h>
| void func0(char* text) {
for (int i = 0; text[i] != '\0'; ++i) {
if (text[i] == ' ') {
text[i] = '_';
}
}
}
| int main() {
char text1[] = "Jumanji The Jungle";
char text2[] = "The Avengers";
char text3[] = "Fast and Furious";
func0(text1);
func0(text2);
func0(text3);
assert(strcmp(text1, "Jumanji_The_Jungle") == 0);
assert(strcmp(text2, "The_Avengers") == 0);
assert(strcmp(text3... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
movl $0x0,-0x4(%rbp)
jmp 11c6 <func0+0x3d>
mov -0x4(%rbp),%eax
movslq %eax,%rdx
mov -0x18(%rbp),%rax
add %rdx,%rax
movzbl (%rax),%eax
cmp $0x20,%al
jne 11c2 <func0+0x39>
mov -0x4(%rbp),%eax
movslq %eax,%rdx
mov -0x18(%rbp),%ra... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_4], 0
jmp short loc_11C6
loc_119E:
mov eax, [rbp+var_4]
movsxd rdx, eax
mov rax, [rbp+var_18]
add rax, rdx
movzx eax, byte ptr [rax]
cmp al, 20h ; ' '
jnz short loc_11C2
mov eax, [rbp+var_4]
movsxd rdx... | long long func0(long long a1)
{
long long result; // rax
int i; // [rsp+14h] [rbp-4h]
for ( i = 0; ; ++i )
{
result = *(unsigned __int8 *)(i + a1);
if ( !(_BYTE)result )
break;
if ( *(_BYTE *)(i + a1) == 32 )
*(_BYTE *)(i + a1) = 95;
}
return result;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001011c6
LAB_0010119e:
MOV EAX,dword ptr [RBP + -0x4]
MOVSXD RDX,EAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,RDX
MOVZX EAX,byte ptr [RAX]
CMP AL,0x20
JNZ 0x001011c2
MOV EAX,dword ptr [RBP + -0x4]
MOVSXD RDX,EAX
MOV ... | void func0(long param_1)
{
int4 local_c;
for (local_c = 0; *(char *)(param_1 + local_c) != '\0'; local_c = local_c + 1) {
if (*(char *)(param_1 + local_c) == ' ') {
*(int *)(param_1 + local_c) = 0x5f;
}
}
return;
} |
6,417 | func0 |
#include <assert.h>
#include <string.h>
| void func0(char* text) {
for (int i = 0; text[i] != '\0'; ++i) {
if (text[i] == ' ') {
text[i] = '_';
}
}
}
| int main() {
char text1[] = "Jumanji The Jungle";
char text2[] = "The Avengers";
char text3[] = "Fast and Furious";
func0(text1);
func0(text2);
func0(text3);
assert(strcmp(text1, "Jumanji_The_Jungle") == 0);
assert(strcmp(text2, "The_Avengers") == 0);
assert(strcmp(text3... | O1 | c | func0:
endbr64
movzbl (%rdi),%eax
test %al,%al
jne 1180 <func0+0x17>
retq
add $0x1,%rdi
movzbl (%rdi),%eax
test %al,%al
je 1174 <func0+0xb>
cmp $0x20,%al
jne 1175 <func0+0xc>
movb $0x5f,(%rdi)
jmp 1175 <func0+0xc>
| func0:
endbr64
movzx eax, byte ptr [rdi]
test al, al
jnz short loc_11A0
locret_1194:
retn
loc_1195:
add rdi, 1
movzx eax, byte ptr [rdi]
test al, al
jz short locret_1194
loc_11A0:
cmp al, 20h ; ' '
jnz short loc_1195
mov byte ptr [rdi], 5Fh ; '_'
jmp short loc_1195 | long long func0(_BYTE *a1)
{
long long result; // rax
for ( result = (unsigned __int8)*a1; (_BYTE)result; result = (unsigned __int8)*a1 )
{
if ( (_BYTE)result == 32 )
*a1 = 95;
++a1;
}
return result;
} | func0:
ENDBR64
MOVZX EAX,byte ptr [RDI]
TEST AL,AL
JNZ 0x001011a0
LAB_00101194:
RET
LAB_00101195:
ADD RDI,0x1
MOVZX EAX,byte ptr [RDI]
TEST AL,AL
JZ 0x00101194
LAB_001011a0:
CMP AL,0x20
JNZ 0x00101195
MOV byte ptr [RDI],0x5f
JMP 0x00101195 | void func0(char *param_1)
{
char cVar1;
cVar1 = *param_1;
while (cVar1 != '\0') {
if (cVar1 == ' ') {
*param_1 = '_';
}
param_1 = param_1 + 1;
cVar1 = *param_1;
}
return;
} |
6,418 | func0 |
#include <assert.h>
#include <string.h>
| void func0(char* text) {
for (int i = 0; text[i] != '\0'; ++i) {
if (text[i] == ' ') {
text[i] = '_';
}
}
}
| int main() {
char text1[] = "Jumanji The Jungle";
char text2[] = "The Avengers";
char text3[] = "Fast and Furious";
func0(text1);
func0(text2);
func0(text3);
assert(strcmp(text1, "Jumanji_The_Jungle") == 0);
assert(strcmp(text2, "The_Avengers") == 0);
assert(strcmp(text3... | O2 | c | func0:
endbr64
jmp 134b <func0+0x1b>
nopw %cs:0x0(%rax,%rax,1)
cmp $0x20,%al
jne 1347 <func0+0x17>
movb $0x5f,(%rdi)
add $0x1,%rdi
movzbl (%rdi),%eax
test %al,%al
jne 1340 <func0+0x10>
retq
nopw %cs:0x0(%rax,%rax,1)
nopl (%rax)
| func0:
endbr64
jmp short loc_135B
loc_1350:
cmp al, 20h ; ' '
jnz short loc_1357
mov byte ptr [rdi], 5Fh ; '_'
loc_1357:
add rdi, 1
loc_135B:
movzx eax, byte ptr [rdi]
test al, al
jnz short loc_1350
retn | long long func0(_BYTE *a1)
{
long long result; // rax
while ( 1 )
{
result = (unsigned __int8)*a1;
if ( !(_BYTE)result )
break;
if ( (_BYTE)result == 32 )
*a1 = 95;
++a1;
}
return result;
} | func0:
ENDBR64
JMP 0x0010135b
LAB_00101350:
CMP AL,0x20
JNZ 0x00101357
MOV byte ptr [RDI],0x5f
LAB_00101357:
ADD RDI,0x1 | void func0(void)
{
FUN_0010135b();
return;
} |
6,419 | func0 |
#include <assert.h>
#include <string.h>
| void func0(char* text) {
for (int i = 0; text[i] != '\0'; ++i) {
if (text[i] == ' ') {
text[i] = '_';
}
}
}
| int main() {
char text1[] = "Jumanji The Jungle";
char text2[] = "The Avengers";
char text3[] = "Fast and Furious";
func0(text1);
func0(text2);
func0(text3);
assert(strcmp(text1, "Jumanji_The_Jungle") == 0);
assert(strcmp(text2, "The_Avengers") == 0);
assert(strcmp(text3... | O3 | c | func0:
endbr64
jmp 1384 <func0+0x14>
nopw %cs:0x0(%rax,%rax,1)
add $0x1,%rdi
movzbl (%rdi),%eax
test %al,%al
je 13a0 <func0+0x30>
cmp $0x20,%al
jne 1380 <func0+0x10>
movb $0x5f,(%rdi)
movzbl 0x1(%rdi),%eax
add $0x1,%rdi
test %al,%al
jne 138b <func0+0x1b>
retq
retq
nopw %cs:0x0(%rax,%rax,... | func0:
endbr64
jmp short loc_1384
loc_1380:
add rdi, 1
loc_1384:
movzx eax, byte ptr [rdi]
test al, al
jz short locret_13A0
loc_138B:
cmp al, 20h ; ' '
jnz short loc_1380
mov byte ptr [rdi], 5Fh ; '_'
movzx eax, byte ptr [rdi+1]
add rdi, 1
test al, al
jnz short loc_138B
retn
l... | long long func0(_BYTE *a1)
{
long long result; // rax
while ( 1 )
{
result = (unsigned __int8)*a1;
if ( !(_BYTE)result )
break;
while ( (_BYTE)result == 32 )
{
*a1 = 95;
result = (unsigned __int8)*++a1;
if ( !(_BYTE)result )
return result;
}
++a1;
}
re... | func0:
ENDBR64
JMP 0x00101384
LAB_00101380:
ADD RDI,0x1 | void func0(void)
{
FUN_00101384();
return;
} |
6,420 | func0 |
#include <stdio.h>
#include <assert.h>
| void func0(int num_list[], int size, int result[]) {
int zero_count = 0;
int j = 0;
for (int i = 0; i < size; i++) {
if (num_list[i] == 0) {
zero_count++;
} else {
result[j++] = num_list[i];
}
}
for (int i = 0; i < zero_count; i++) {
... | int main() {
int result[6];
int list1[6] = {1, 0, 2, 0, 3, 4};
func0(list1, 6, result);
int expected1[6] = {1, 2, 3, 4, 0, 0};
for (int i = 0; i < 6; i++) {
assert(result[i] == expected1[i]);
}
int result2[9];
int list2[9] = {2, 3, 2, 0, 0, 4, 0, 5, 0};
func0(list... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
mov %rdx,-0x28(%rbp)
movl $0x0,-0x10(%rbp)
movl $0x0,-0xc(%rbp)
movl $0x0,-0x8(%rbp)
jmp 120a <func0+0x81>
mov -0x8(%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_28], rdx
mov [rbp+var_10], 0
mov [rbp+var_C], 0
mov [rbp+var_8], 0
jmp short loc_120A
loc_11B3:
mov eax, [rbp+var_8]
cdqe
lea rdx, ds:0[rax*4]
mov rax, [rbp+var_18]
add rax, r... | long long func0(long long a1, int a2, long long a3)
{
int v3; // eax
int v4; // eax
long long result; // rax
int v6; // [rsp+18h] [rbp-10h]
int v7; // [rsp+1Ch] [rbp-Ch]
int i; // [rsp+20h] [rbp-8h]
unsigned int j; // [rsp+24h] [rbp-4h]
v6 = 0;
v7 = 0;
for ( i = 0; i < a2; ++i )
{
if ( *(_DW... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV qword ptr [RBP + -0x28],RDX
MOV dword ptr [RBP + -0x10],0x0
MOV dword ptr [RBP + -0xc],0x0
MOV dword ptr [RBP + -0x8],0x0
JMP 0x0010120a
LAB_001011b3:
MOV EAX,dword ptr [RBP + -0x8]
CDQE
LEA RDX,[RAX*0x4]
MOV RAX,qwo... | void func0(long param_1,int param_2,long param_3)
{
int4 local_18;
int4 local_14;
int4 local_10;
int4 local_c;
local_18 = 0;
local_14 = 0;
for (local_10 = 0; local_10 < param_2; local_10 = local_10 + 1) {
if (*(int *)(param_1 + (long)local_10 * 4) == 0) {
local_18 = local_18 + 1;
}
e... |
6,421 | func0 |
#include <stdio.h>
#include <assert.h>
| void func0(int num_list[], int size, int result[]) {
int zero_count = 0;
int j = 0;
for (int i = 0; i < size; i++) {
if (num_list[i] == 0) {
zero_count++;
} else {
result[j++] = num_list[i];
}
}
for (int i = 0; i < zero_count; i++) {
... | int main() {
int result[6];
int list1[6] = {1, 0, 2, 0, 3, 4};
func0(list1, 6, result);
int expected1[6] = {1, 2, 3, 4, 0, 0};
for (int i = 0; i < 6; i++) {
assert(result[i] == expected1[i]);
}
int result2[9];
int list2[9] = {2, 3, 2, 0, 0, 4, 0, 5, 0};
func0(list... | O1 | c | func0:
endbr64
test %esi,%esi
jle 11eb <func0+0x62>
mov %rdi,%rax
lea -0x1(%rsi),%ecx
lea 0x4(%rdi,%rcx,4),%r8
mov $0x0,%esi
mov $0x0,%edi
jmp 11bb <func0+0x32>
movslq %esi,%r9
mov %ecx,(%rdx,%r9,4)
lea 0x1(%rsi),%esi
add $0x4,%rax
cmp %r8,%rax
je 11c6 <func0+0x3d>
mov (%rax),%... | func0:
endbr64
test esi, esi
jle short locret_11EB
mov rax, rdi
lea ecx, [rsi-1]
lea r8, [rdi+rcx*4+4]
mov esi, 0
mov edi, 0
jmp short loc_11BB
loc_11A8:
movsxd r9, esi
mov [rdx+r9*4], ecx
lea esi, [rsi+1]
loc_11B2:
add rax, 4
cmp rax, r8
jz short loc_11C6
loc_11BB:
... | void func0(_DWORD *a1, int a2, long long a3)
{
_DWORD *v3; // rax
long long v4; // r8
int v5; // esi
int v6; // edi
_DWORD *v7; // rax
unsigned long long v8; // rdx
if ( a2 > 0 )
{
v3 = a1;
v4 = (long long)&a1[a2 - 1 + 1];
v5 = 0;
v6 = 0;
do
{
if ( *v3 )
*(_DWORD ... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x001011eb
MOV RAX,RDI
LEA ECX,[RSI + -0x1]
LEA R8,[RDI + RCX*0x4 + 0x4]
MOV ESI,0x0
MOV EDI,0x0
JMP 0x001011bb
LAB_001011a8:
MOVSXD R9,ESI
MOV dword ptr [RDX + R9*0x4],ECX
LEA ESI,[RSI + 0x1]
LAB_001011b2:
ADD RAX,0x4
CMP RAX,R8
JZ 0x001011c6
LAB_001011bb:
MOV ECX,dword ptr [RAX]
TEST E... | void func0(int *param_1,int param_2,long param_3)
{
int *piVar1;
int4 *puVar2;
int iVar3;
int iVar4;
if (0 < param_2) {
piVar1 = param_1 + (ulong)(param_2 - 1) + 1;
iVar3 = 0;
iVar4 = 0;
do {
if (*param_1 == 0) {
iVar4 = iVar4 + 1;
}
else {
*(int *)(param_... |
6,422 | func0 |
#include <stdio.h>
#include <assert.h>
| void func0(int num_list[], int size, int result[]) {
int zero_count = 0;
int j = 0;
for (int i = 0; i < size; i++) {
if (num_list[i] == 0) {
zero_count++;
} else {
result[j++] = num_list[i];
}
}
for (int i = 0; i < zero_count; i++) {
... | int main() {
int result[6];
int list1[6] = {1, 0, 2, 0, 3, 4};
func0(list1, 6, result);
int expected1[6] = {1, 2, 3, 4, 0, 0};
for (int i = 0; i < 6; i++) {
assert(result[i] == expected1[i]);
}
int result2[9];
int list2[9] = {2, 3, 2, 0, 0, 4, 0, 5, 0};
func0(list... | O2 | c | func0:
endbr64
test %esi,%esi
jle 147f <func0+0x6f>
lea -0x1(%rsi),%eax
xor %ecx,%ecx
xor %esi,%esi
lea 0x4(%rdi,%rax,4),%r8
jmp 143c <func0+0x2c>
nopw %cs:0x0(%rax,%rax,1)
add $0x4,%rdi
add $0x1,%esi
cmp %r8,%rdi
je 1455 <func0+0x45>
mov (%rdi),%eax
test %eax,%eax
je 1430 <f... | func0:
endbr64
mov r10, rdx
test esi, esi
jle short locret_1498
lea eax, [rsi-1]
xor ecx, ecx
xor esi, esi
lea r8, [rdi+rax*4+4]
jmp short loc_145C
loc_1450:
add rdi, 4
add esi, 1
cmp r8, rdi
jz short loc_1475
loc_145C:
mov eax, [rdi]
test eax, eax
jz short lo... | void func0(int *a1, int a2, long long a3)
{
long long v3; // rax
int v4; // ecx
int v5; // esi
long long v6; // r8
int v7; // eax
long long v8; // r9
if ( a2 > 0 )
{
v3 = (unsigned int)(a2 - 1);
v4 = 0;
v5 = 0;
v6 = (long long)&a1[v3 + 1];
do
{
while ( 1 )
{
... | func0:
ENDBR64
MOV R10,RDX
TEST ESI,ESI
JLE 0x00101498
LEA EAX,[RSI + -0x1]
XOR ECX,ECX
XOR ESI,ESI
LEA R8,[RDI + RAX*0x4 + 0x4]
JMP 0x0010145c
LAB_00101450:
ADD RDI,0x4
ADD ESI,0x1
CMP R8,RDI
JZ 0x00101475
LAB_0010145c:
MOV EAX,dword ptr [RDI]
TEST EAX,EAX
JZ 0x00101450
MOVSXD R9,ECX
ADD RDI,0x4
ADD ECX,0x1
MOV dword ... | void func0(int *param_1,int param_2,long param_3)
{
int *piVar1;
int iVar2;
int iVar3;
int iVar4;
long lVar5;
if (0 < param_2) {
iVar3 = 0;
iVar4 = 0;
piVar1 = param_1 + (ulong)(param_2 - 1) + 1;
do {
while (iVar2 = *param_1, iVar2 != 0) {
lVar5 = (long)iVar3;
param... |
6,423 | func0 |
#include <stdio.h>
#include <assert.h>
| void func0(int num_list[], int size, int result[]) {
int zero_count = 0;
int j = 0;
for (int i = 0; i < size; i++) {
if (num_list[i] == 0) {
zero_count++;
} else {
result[j++] = num_list[i];
}
}
for (int i = 0; i < zero_count; i++) {
... | int main() {
int result[6];
int list1[6] = {1, 0, 2, 0, 3, 4};
func0(list1, 6, result);
int expected1[6] = {1, 2, 3, 4, 0, 0};
for (int i = 0; i < 6; i++) {
assert(result[i] == expected1[i]);
}
int result2[9];
int list2[9] = {2, 3, 2, 0, 0, 4, 0, 5, 0};
func0(list... | O3 | c | func0:
endbr64
test %esi,%esi
jle 14e8 <func0+0x68>
lea -0x1(%rsi),%eax
xor %ecx,%ecx
xor %esi,%esi
lea 0x4(%rdi,%rax,4),%r8
jmp 14ac <func0+0x2c>
nopw %cs:0x0(%rax,%rax,1)
add $0x4,%rdi
add $0x1,%esi
cmp %rdi,%r8
je 14c5 <func0+0x45>
mov (%rdi),%eax
test %eax,%eax
je 14a0 <f... | func0:
endbr64
mov r10, rdx
test esi, esi
jle short locret_1410
movsxd rsi, esi
xor ecx, ecx
lea r8, [rdi+rsi*4]
xor esi, esi
jmp short loc_13DC
loc_13D0:
add rdi, 4
add esi, 1
cmp r8, rdi
jz short loc_13F5
loc_13DC:
mov eax, [rdi]
test eax, eax
jz short loc_13D0... | void func0(int *a1, int a2, long long a3)
{
int v3; // ecx
int *v4; // r8
long long v5; // rsi
int v6; // eax
long long v7; // r9
if ( a2 > 0 )
{
v3 = 0;
v4 = &a1[a2];
v5 = 0LL;
do
{
while ( 1 )
{
v6 = *a1;
if ( *a1 )
break;
++a1;
... | func0:
ENDBR64
MOV R10,RDX
TEST ESI,ESI
JLE 0x00101410
MOVSXD RSI,ESI
XOR ECX,ECX
LEA R8,[RDI + RSI*0x4]
XOR ESI,ESI
JMP 0x001013dc
LAB_001013d0:
ADD RDI,0x4
ADD ESI,0x1
CMP R8,RDI
JZ 0x001013f5
LAB_001013dc:
MOV EAX,dword ptr [RDI]
TEST EAX,EAX
JZ 0x001013d0
MOVSXD R9,ECX
ADD RDI,0x4
ADD ECX,0x1
MOV dword ptr [R10 + R... | void func0(int *param_1,int param_2,long param_3)
{
int *piVar1;
int iVar2;
int iVar3;
ulong uVar4;
long lVar5;
if (0 < param_2) {
iVar3 = 0;
piVar1 = param_1 + param_2;
uVar4 = 0;
do {
while (iVar2 = *param_1, iVar2 != 0) {
lVar5 = (long)iVar3;
param_1 = param_1 + ... |
6,424 | func0 | #include <assert.h>
| int func0(int arr[], int n) {
int ans = 0;
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
ans += (arr[i] ^ arr[j]);
}
}
return ans;
}
| int main() {
int arr1[] = {5, 9, 7, 6};
int arr2[] = {7, 3, 5};
int arr3[] = {7, 3};
assert(func0(arr1, 4) == 47);
assert(func0(arr2, 3) == 12);
assert(func0(arr3, 2) == 4);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
movl $0x0,-0xc(%rbp)
movl $0x0,-0x8(%rbp)
jmp 11d4 <func0+0x6b>
mov -0x8(%rbp),%eax
add $0x1,%eax
mov %eax,-0x4(%rbp)
jmp 11c8 <func0+0x5f>
mov -0x8(%rbp),%eax
cltq
lea 0x0(,%rax,4),%rdx
mov -0x18(%rb... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_C], 0
mov [rbp+var_8], 0
jmp short loc_11D4
loc_1188:
mov eax, [rbp+var_8]
add eax, 1
mov [rbp+var_4], eax
jmp short loc_11C8
loc_1193:
mov eax, [rbp+var_8]
cdqe
lea rdx, ds:0... | long long func0(long long a1, int a2)
{
unsigned int v3; // [rsp+10h] [rbp-Ch]
int i; // [rsp+14h] [rbp-8h]
int j; // [rsp+18h] [rbp-4h]
v3 = 0;
for ( i = 0; i < a2; ++i )
{
for ( j = i + 1; j < a2; ++j )
v3 += *(_DWORD *)(4LL * i + a1) ^ *(_DWORD *)(4LL * j + a1);
}
return v3;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0xc],0x0
MOV dword ptr [RBP + -0x8],0x0
JMP 0x001011d4
LAB_00101188:
MOV EAX,dword ptr [RBP + -0x8]
ADD EAX,0x1
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001011c8
LAB_00101193:
MOV EAX,dword ptr [RBP + -... | int func0(long param_1,int param_2)
{
int4 local_14;
int4 local_10;
int4 local_c;
local_14 = 0;
for (local_10 = 0; local_c = local_10, local_10 < param_2; local_10 = local_10 + 1) {
while (local_c = local_c + 1, local_c < param_2) {
local_14 = local_14 +
(*(uint *)(param_1 + (lo... |
6,425 | func0 | #include <assert.h>
| int func0(int arr[], int n) {
int ans = 0;
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
ans += (arr[i] ^ arr[j]);
}
}
return ans;
}
| int main() {
int arr1[] = {5, 9, 7, 6};
int arr2[] = {7, 3, 5};
int arr3[] = {7, 3};
assert(func0(arr1, 4) == 47);
assert(func0(arr2, 3) == 12);
assert(func0(arr3, 2) == 4);
return 0;
}
| O1 | c | func0:
endbr64
test %esi,%esi
jle 11a7 <func0+0x3e>
lea -0x1(%rsi),%r10d
add $0x1,%r10
mov $0x1,%r9d
mov $0x0,%edx
cmp %r10,%r9
je 11ac <func0+0x43>
mov -0x4(%rdi,%r9,4),%r8d
mov %r9,%rax
mov %r8d,%ecx
xor (%rdi,%rax,4),%ecx
add %ecx,%edx
add $0x1,%rax
cmp %eax,%esi
jg 1... | func0:
endbr64
test esi, esi
jle short loc_11A2
mov r10d, esi
mov r9d, 1
mov edx, 0
loc_117F:
cmp r9, r10
jz short loc_11A7
mov r8d, [rdi+r9*4-4]
mov rax, r9
loc_118C:
mov ecx, r8d
xor ecx, [rdi+rax*4]
add edx, ecx
add rax, 1
cmp esi, eax
jg short loc_118C
ad... | long long func0(long long a1, int a2)
{
long long v2; // r9
unsigned int v3; // edx
long long v4; // rax
if ( a2 <= 0 )
{
return 0;
}
else
{
v2 = 1LL;
v3 = 0;
while ( v2 != a2 )
{
v4 = v2;
do
v3 += *(_DWORD *)(a1 + 4 * v4++) ^ *(_DWORD *)(a1 + 4 * v2 - 4);
... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x001011a2
MOV R10D,ESI
MOV R9D,0x1
MOV EDX,0x0
LAB_0010117f:
CMP R9,R10
JZ 0x001011a7
MOV R8D,dword ptr [RDI + R9*0x4 + -0x4]
MOV RAX,R9
LAB_0010118c:
MOV ECX,R8D
XOR ECX,dword ptr [RDI + RAX*0x4]
ADD EDX,ECX
ADD RAX,0x1
CMP ESI,EAX
JG 0x0010118c
ADD R9,0x1
JMP 0x0010117f
LAB_001011a2:
... | int func0(long param_1,uint param_2)
{
ulong uVar1;
int iVar2;
ulong uVar3;
if ((int)param_2 < 1) {
iVar2 = 0;
}
else {
iVar2 = 0;
for (uVar3 = 1; uVar3 != param_2; uVar3 = uVar3 + 1) {
uVar1 = uVar3;
do {
iVar2 = iVar2 + (*(uint *)(param_1 + -4 + uVar3 * 4) ^ *(uint *)(p... |
6,426 | func0 | #include <assert.h>
| int func0(int arr[], int n) {
int ans = 0;
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
ans += (arr[i] ^ arr[j]);
}
}
return ans;
}
| int main() {
int arr1[] = {5, 9, 7, 6};
int arr2[] = {7, 3, 5};
int arr3[] = {7, 3};
assert(func0(arr1, 4) == 47);
assert(func0(arr2, 3) == 12);
assert(func0(arr3, 2) == 4);
return 0;
}
| O2 | c | func0:
endbr64
test %esi,%esi
jle 12fd <func0+0x4d>
lea -0x1(%rsi),%r10d
mov $0x1,%r9d
xor %r8d,%r8d
add $0x1,%r10
cmp %r10,%r9
je 12f9 <func0+0x49>
xchg %ax,%ax
mov -0x4(%rdi,%r9,4),%ecx
mov %r9,%rax
nopl 0x0(%rax,%rax,1)
mov (%rdi,%rax,4),%edx
add $0x1,%rax
xor %ecx,%edx
add... | func0:
endbr64
test esi, esi
jle short loc_12CD
movsxd r10, esi
mov r9d, 1
xor r8d, r8d
cmp r9, r10
jz short loc_12C9
nop dword ptr [rax+00000000h]
loc_12A0:
mov ecx, [rdi+r9*4-4]
mov rax, r9
nop dword ptr [rax+rax+00000000h]
loc_12B0:
mov edx, [rdi+rax*4]
add rax, 1
xor... | long long func0(long long a1, int a2)
{
long long v2; // r9
unsigned int i; // r8d
long long v4; // rax
int v5; // edx
if ( a2 <= 0 )
return 0LL;
v2 = 1LL;
for ( i = 0; v2 != a2; ++v2 )
{
v4 = v2;
do
{
v5 = *(_DWORD *)(a1 + 4 * v4++);
i += *(_DWORD *)(a1 + 4 * v2 - 4) ^ v5;... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x001012cd
MOVSXD R10,ESI
MOV R9D,0x1
XOR R8D,R8D
CMP R9,R10
JZ 0x001012c9
NOP dword ptr [RAX]
LAB_001012a0:
MOV ECX,dword ptr [RDI + R9*0x4 + -0x4]
MOV RAX,R9
NOP dword ptr [RAX + RAX*0x1]
LAB_001012b0:
MOV EDX,dword ptr [RDI + RAX*0x4]
ADD RAX,0x1
XOR EDX,ECX
ADD R8D,EDX
CMP ESI,EAX
JG... | int func0(long param_1,int param_2)
{
long lVar1;
long lVar2;
int iVar3;
long lVar4;
if (0 < param_2) {
lVar4 = 1;
iVar3 = 0;
if ((long)param_2 != 1) {
do {
lVar2 = lVar4;
do {
lVar1 = lVar2 * 4;
lVar2 = lVar2 + 1;
iVar3 = iVar3 + (*(uint *)(... |
6,427 | func0 | #include <assert.h>
| int func0(int arr[], int n) {
int ans = 0;
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
ans += (arr[i] ^ arr[j]);
}
}
return ans;
}
| int main() {
int arr1[] = {5, 9, 7, 6};
int arr2[] = {7, 3, 5};
int arr3[] = {7, 3};
assert(func0(arr1, 4) == 47);
assert(func0(arr2, 3) == 12);
assert(func0(arr3, 2) == 4);
return 0;
}
| O3 | c | func0:
endbr64
test %esi,%esi
jle 13ad <func0+0x10d>
cmp $0x1,%esi
je 13ad <func0+0x10d>
push %r14
lea 0x4(%rdi),%r11
xor %r8d,%r8d
mov $0x1,%ecx
push %rbp
lea -0x1(%rsi),%ebp
push %rbx
mov $0x1,%ebx
nopl (%rax)
mov %esi,%r9d
mov %ebp,%eax
mov -0x4(%r11),%r10d
sub %ecx,%r9... | func0:
endbr64
test esi, esi
jle loc_1251
mov r8d, esi
cmp esi, 1
jz loc_1251
push r14
mov r11, rdi
lea r10, [rdi+4]
mov esi, 1
push rbp
xor edi, edi
lea ebp, [r8-1]
push rbx
mov ebx, 1
nop dword ptr [rax+rax+00h]
loc_1178:
mov ecx, r8d
mov eax, ebp
mov ... | long long func0(long long a1, int a2)
{
const __m128i *v4; // r10
int v5; // esi
unsigned int v6; // edi
unsigned int v7; // r9d
unsigned int v8; // ecx
__m128i v9; // xmm1
const __m128i *v10; // rax
__m128i v11; // xmm2
__m128i v12; // xmm0
__m128i v13; // xmm1
int v14; // ecx
long long v15; /... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x00101251
MOV R8D,ESI
CMP ESI,0x1
JZ 0x00101251
PUSH R14
MOV R11,RDI
LEA R10,[RDI + 0x4]
MOV ESI,0x1
PUSH RBP
XOR EDI,EDI
LEA EBP,[R8 + -0x1]
PUSH RBX
MOV EBX,0x1
NOP dword ptr [RAX + RAX*0x1]
LAB_00101178:
MOV ECX,R8D
MOV EAX,EBP
MOV R9D,dword ptr [R10 + -0x4]
SUB ECX,ESI
CMP R8D,ESI
C... | int func0(long param_1,int param_2)
{
long lVar1;
uint uVar2;
uint uVar3;
uint *puVar4;
uint *puVar5;
uint *puVar6;
uint *puVar7;
uint uVar8;
int iVar9;
int iVar10;
uint *puVar11;
int iVar12;
int iVar13;
int iVar14;
int iVar15;
if ((param_2 < 1) || (param_2 == 1)) {
return 0;
}... |
6,428 | func0 |
#include <assert.h>
| int func0(int n) {
int sum = 0;
for (int i = 1; i <= n; i++) {
int j = 2 * i;
sum += j * j * j * j;
}
return sum;
}
| int main() {
assert(func0(2) == 272);
assert(func0(3) == 1568);
assert(func0(4) == 5664);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
movl $0x0,-0xc(%rbp)
movl $0x1,-0x8(%rbp)
jmp 1181 <func0+0x38>
mov -0x8(%rbp),%eax
add %eax,%eax
mov %eax,-0x4(%rbp)
mov -0x4(%rbp),%eax
imul %eax,%eax
imul -0x4(%rbp),%eax
imul -0x4(%rbp),%eax
add %eax,-0xc(%rbp)
addl $0... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_C], 0
mov [rbp+var_8], 1
jmp short loc_1181
loc_1164:
mov eax, [rbp+var_8]
add eax, eax
mov [rbp+var_4], eax
mov eax, [rbp+var_4]
imul eax, eax
imul eax, [rbp+var_4]
imul eax, [rbp+var_4]
add [rbp... | long long func0(int a1)
{
unsigned int v2; // [rsp+8h] [rbp-Ch]
int i; // [rsp+Ch] [rbp-8h]
v2 = 0;
for ( i = 1; i <= a1; ++i )
v2 += 2 * i * 2 * i * 2 * i * 2 * i;
return v2;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0xc],0x0
MOV dword ptr [RBP + -0x8],0x1
JMP 0x00101181
LAB_00101164:
MOV EAX,dword ptr [RBP + -0x8]
ADD EAX,EAX
MOV dword ptr [RBP + -0x4],EAX
MOV EAX,dword ptr [RBP + -0x4]
IMUL EAX,EAX
IMUL EAX,dword ptr [RBP + -0x4]
IMUL EAX,dw... | int func0(int param_1)
{
int iVar1;
int4 local_14;
int4 local_10;
local_14 = 0;
for (local_10 = 1; local_10 <= param_1; local_10 = local_10 + 1) {
iVar1 = local_10 * 2;
local_14 = local_14 + iVar1 * iVar1 * iVar1 * iVar1;
}
return local_14;
} |
6,429 | func0 |
#include <assert.h>
| int func0(int n) {
int sum = 0;
for (int i = 1; i <= n; i++) {
int j = 2 * i;
sum += j * j * j * j;
}
return sum;
}
| int main() {
assert(func0(2) == 272);
assert(func0(3) == 1568);
assert(func0(4) == 5664);
return 0;
}
| O1 | c | func0:
endbr64
test %edi,%edi
jle 1173 <func0+0x2a>
lea 0x2(%rdi,%rdi,1),%esi
mov $0x2,%eax
mov $0x0,%ecx
mov %eax,%edx
imul %eax,%edx
imul %edx,%edx
add %edx,%ecx
add $0x2,%eax
cmp %esi,%eax
jne 115f <func0+0x16>
mov %ecx,%eax
retq
mov $0x0,%ecx
jmp 1170 <func0+0x27>
| func0:
endbr64
test edi, edi
jle short loc_1173
lea esi, [rdi+rdi+2]
mov eax, 2
mov ecx, 0
loc_115F:
mov edx, eax
imul edx, eax
imul edx, edx
add ecx, edx
add eax, 2
cmp eax, esi
jnz short loc_115F
loc_1170:
mov eax, ecx
retn
loc_1173:
mov ecx, 0
jmp short loc_11... | long long func0(int a1)
{
int v1; // eax
unsigned int v2; // ecx
if ( a1 <= 0 )
{
return 0;
}
else
{
v1 = 2;
v2 = 0;
do
{
v2 += v1 * v1 * v1 * v1;
v1 += 2;
}
while ( v1 != 2 * a1 + 2 );
}
return v2;
} | func0:
ENDBR64
TEST EDI,EDI
JLE 0x00101173
LEA ESI,[RDI + RDI*0x1 + 0x2]
MOV EAX,0x2
MOV ECX,0x0
LAB_0010115f:
MOV EDX,EAX
IMUL EDX,EAX
IMUL EDX,EDX
ADD ECX,EDX
ADD EAX,0x2
CMP EAX,ESI
JNZ 0x0010115f
LAB_00101170:
MOV EAX,ECX
RET
LAB_00101173:
MOV ECX,0x0
JMP 0x00101170 | int func0(int param_1)
{
int iVar1;
int iVar2;
if (param_1 < 1) {
iVar2 = 0;
}
else {
iVar1 = 2;
iVar2 = 0;
do {
iVar2 = iVar2 + iVar1 * iVar1 * iVar1 * iVar1;
iVar1 = iVar1 + 2;
} while (iVar1 != param_1 * 2 + 2);
}
return iVar2;
} |
6,430 | func0 |
#include <assert.h>
| int func0(int n) {
int sum = 0;
for (int i = 1; i <= n; i++) {
int j = 2 * i;
sum += j * j * j * j;
}
return sum;
}
| int main() {
assert(func0(2) == 272);
assert(func0(3) == 1568);
assert(func0(4) == 5664);
return 0;
}
| O2 | c | func0:
endbr64
test %edi,%edi
jle 1170 <func0+0x30>
lea 0x2(%rdi,%rdi,1),%ecx
mov $0x2,%eax
xor %r8d,%r8d
nopl 0x0(%rax)
mov %eax,%edx
imul %eax,%edx
add $0x2,%eax
imul %edx,%edx
add %edx,%r8d
cmp %ecx,%eax
jne 1158 <func0+0x18>
mov %r8d,%eax
retq
xchg %ax,%ax
xor %r8d,%r8d
mo... | func0:
endbr64
test edi, edi
jle short loc_1170
lea ecx, [rdi+rdi+2]
mov eax, 2
xor r8d, r8d
nop dword ptr [rax+00h]
loc_1158:
mov edx, eax
imul edx, eax
add eax, 2
imul edx, edx
add r8d, edx
cmp eax, ecx
jnz short loc_1158
mov eax, r8d
retn
loc_1170:
xor r8d, r8... | long long func0(int a1)
{
int v1; // eax
unsigned int v2; // r8d
int v3; // edx
if ( a1 <= 0 )
return 0LL;
v1 = 2;
v2 = 0;
do
{
v3 = v1 * v1;
v1 += 2;
v2 += v3 * v3;
}
while ( v1 != 2 * a1 + 2 );
return v2;
} | func0:
ENDBR64
TEST EDI,EDI
JLE 0x00101170
LEA ECX,[RDI + RDI*0x1 + 0x2]
MOV EAX,0x2
XOR R8D,R8D
NOP dword ptr [RAX]
LAB_00101158:
MOV EDX,EAX
IMUL EDX,EAX
ADD EAX,0x2
IMUL EDX,EDX
ADD R8D,EDX
CMP EAX,ECX
JNZ 0x00101158
MOV EAX,R8D
RET
LAB_00101170:
XOR R8D,R8D
MOV EAX,R8D
RET | int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
if (0 < param_1) {
iVar1 = 2;
iVar3 = 0;
do {
iVar2 = iVar1 * iVar1;
iVar1 = iVar1 + 2;
iVar3 = iVar3 + iVar2 * iVar2;
} while (iVar1 != param_1 * 2 + 2);
return iVar3;
}
return 0;
} |
6,431 | func0 |
#include <assert.h>
| int func0(int n) {
int sum = 0;
for (int i = 1; i <= n; i++) {
int j = 2 * i;
sum += j * j * j * j;
}
return sum;
}
| int main() {
assert(func0(2) == 272);
assert(func0(3) == 1568);
assert(func0(4) == 5664);
return 0;
}
| O3 | c | func0:
endbr64
test %edi,%edi
jle 1170 <func0+0x30>
lea 0x2(%rdi,%rdi,1),%ecx
mov $0x2,%eax
xor %r8d,%r8d
nopl 0x0(%rax)
mov %eax,%edx
imul %eax,%edx
add $0x2,%eax
imul %edx,%edx
add %edx,%r8d
cmp %eax,%ecx
jne 1158 <func0+0x18>
mov %r8d,%eax
retq
xchg %ax,%ax
xor %r8d,%r8d
mo... | func0:
endbr64
test edi, edi
jle short loc_1170
lea esi, [rdi+rdi+2]
mov eax, 2
xor ecx, ecx
nop dword ptr [rax+rax+00h]
loc_1158:
mov edx, eax
imul edx, eax
add eax, 2
imul edx, edx
add ecx, edx
cmp esi, eax
jnz short loc_1158
mov eax, ecx
retn
loc_1170:
xor ecx... | long long func0(int a1)
{
int v1; // eax
unsigned int v2; // ecx
int v3; // edx
if ( a1 <= 0 )
return 0LL;
v1 = 2;
v2 = 0;
do
{
v3 = v1 * v1;
v1 += 2;
v2 += v3 * v3;
}
while ( 2 * a1 + 2 != v1 );
return v2;
} | func0:
ENDBR64
TEST EDI,EDI
JLE 0x00101170
LEA ESI,[RDI + RDI*0x1 + 0x2]
MOV EAX,0x2
XOR ECX,ECX
NOP dword ptr [RAX + RAX*0x1]
LAB_00101158:
MOV EDX,EAX
IMUL EDX,EAX
ADD EAX,0x2
IMUL EDX,EDX
ADD ECX,EDX
CMP ESI,EAX
JNZ 0x00101158
MOV EAX,ECX
RET
LAB_00101170:
XOR ECX,ECX
MOV EAX,ECX
RET | int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
if (0 < param_1) {
iVar1 = 2;
iVar2 = 0;
do {
iVar3 = iVar1 * iVar1;
iVar1 = iVar1 + 2;
iVar2 = iVar2 + iVar3 * iVar3;
} while (param_1 * 2 + 2 != iVar1);
return iVar2;
}
return 0;
} |
6,432 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
typedef struct {
int *data;
int size;
int capacity;
} MinHeap;
MinHeap* heap_init(int capacity) {
MinHeap *heap = malloc(sizeof(MinHeap));
heap->data = malloc(sizeof(int) * capacity);
heap->size = 0;
heap->capacity ... | int* func0(int *array, int size) {
MinHeap *heap = heap_init(size > 0 ? size : 1);
for(int i=0;i<size;i++) {
heap_push(heap, array[i]);
}
int *sorted = malloc(sizeof(int)*size);
for(int i=0;i<size;i++) {
sorted[i] = heap_pop(heap);
}
heap_free(heap);
return sort... | int main() {
int input1[] = {1,3,5,7,9,2,4,6,8,0};
int expected1[] = {0,1,2,3,4,5,6,7,8,9};
int size1 = sizeof(input1)/sizeof(input1[0]);
int *sorted1 = func0(input1, size1);
assert(arrays_equal(sorted1, expected1, size1));
free(sorted1);
int input2[] = {25,35,22,85,14,65,75,25,... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x38,%rsp
mov %rdi,-0x38(%rbp)
mov %esi,-0x3c(%rbp)
mov $0x1,%eax
cmpl $0x0,-0x3c(%rbp)
cmovg -0x3c(%rbp),%eax
mov %eax,%edi
callq 11c9 <heap_init>
mov %rax,-0x20(%rbp)
movl $0x0,-0x28(%rbp)
jmp 15df <func0+0x5d>
mov -0x28(%rbp),... | func0:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 38h
mov [rbp+var_38], rdi
mov [rbp+var_3C], esi
mov eax, [rbp+var_3C]
mov edx, 1
test eax, eax
cmovle eax, edx
mov edi, eax
call heap_init
mov [rbp+var_20], rax
mov [rbp+var_28], 0
jmp short loc_15DF
loc_15B7:
mo... | _DWORD * func0(long long a1, int a2)
{
unsigned int v2; // eax
int i; // [rsp+18h] [rbp-28h]
int j; // [rsp+1Ch] [rbp-24h]
long long v6; // [rsp+20h] [rbp-20h]
_DWORD *v7; // [rsp+28h] [rbp-18h]
v2 = a2;
if ( a2 <= 0 )
v2 = 1;
v6 = heap_init(v2);
for ( i = 0; i < a2; ++i )
heap_push(v6, *(uns... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x38],RDI
MOV dword ptr [RBP + -0x3c],ESI
MOV EAX,dword ptr [RBP + -0x3c]
MOV EDX,0x1
TEST EAX,EAX
CMOVLE EAX,EDX
MOV EDI,EAX
CALL 0x001011c9
MOV qword ptr [RBP + -0x20],RAX
MOV dword ptr [RBP + -0x28],0x0
JMP 0x001015df
LAB_001015b7:
MOV E... | void * func0(long param_1,int param_2)
{
int iVar1;
int4 uVar2;
int8 uVar3;
void *pvVar4;
int4 local_30;
int4 local_2c;
iVar1 = param_2;
if (param_2 < 1) {
iVar1 = 1;
}
uVar3 = heap_init(iVar1);
for (local_30 = 0; local_30 < param_2; local_30 = local_30 + 1) {
heap_push(uVar3,*(int4 *)... |
6,433 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
typedef struct {
int *data;
int size;
int capacity;
} MinHeap;
MinHeap* heap_init(int capacity) {
MinHeap *heap = malloc(sizeof(MinHeap));
heap->data = malloc(sizeof(int) * capacity);
heap->size = 0;
heap->capacity ... | int* func0(int *array, int size) {
MinHeap *heap = heap_init(size > 0 ? size : 1);
for(int i=0;i<size;i++) {
heap_push(heap, array[i]);
}
int *sorted = malloc(sizeof(int)*size);
for(int i=0;i<size;i++) {
sorted[i] = heap_pop(heap);
}
heap_free(heap);
return sort... | int main() {
int input1[] = {1,3,5,7,9,2,4,6,8,0};
int expected1[] = {0,1,2,3,4,5,6,7,8,9};
int size1 = sizeof(input1)/sizeof(input1[0]);
int *sorted1 = func0(input1, size1);
assert(arrays_equal(sorted1, expected1, size1));
free(sorted1);
int input2[] = {25,35,22,85,14,65,75,25,... | O1 | c | func0:
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
mov %rdi,%r13
mov %esi,%r12d
test %esi,%esi
mov $0x1,%edi
cmovg %esi,%edi
callq 11c9 <heap_init>
mov %rax,%rbp
test %r12d,%r12d
jle 140d <func0+0x8b>
mov %r13,%rbx
lea -0x1(%r12),%r14d
shl $0x2,%r14
lea 0x4(%r13,... | func0:
endbr64
push r14
push r13
push r12
push rbp
push rbx
mov r13, rdi
mov r12d, esi
test esi, esi
mov edi, 1
cmovg edi, esi
call heap_init
mov rbp, rax
test r12d, r12d
jle short loc_140A
mov rbx, r13
lea r14d, [r12-1]
shl r14, 2
lea r13, [r13+r14+4]
loc_1... | long long func0(unsigned int *a1, int a2)
{
long long v3; // rdi
long long v4; // rbp
unsigned int *v5; // rbx
long long v6; // r14
long long v7; // r13
long long v8; // r13
_DWORD *v9; // rbx
v3 = 1LL;
if ( a2 > 0 )
v3 = (unsigned int)a2;
v4 = heap_init(v3);
if ( a2 <= 0 )
{
v8 = mall... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV R13,RDI
MOV R12D,ESI
TEST ESI,ESI
MOV EDI,0x1
CMOVG EDI,ESI
CALL 0x001011c9
MOV RBP,RAX
TEST R12D,R12D
JLE 0x0010140a
MOV RBX,R13
LEA R14D,[R12 + -0x1]
SHL R14,0x2
LEA R13,[R13 + R14*0x1 + 0x4]
LAB_001013b9:
MOV ESI,dword ptr [RBX]
MOV RDI,RBP
CALL 0x00101... | int4 * func0(int4 *param_1,int param_2)
{
int4 uVar1;
int8 uVar2;
int4 *puVar3;
int4 *puVar4;
int iVar5;
iVar5 = 1;
if (0 < param_2) {
iVar5 = param_2;
}
uVar2 = heap_init(iVar5);
if (param_2 < 1) {
puVar3 = (int4 *)malloc((long)param_2 << 2);
}
else {
puVar3 = param_1 + (ulong)(... |
6,434 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
typedef struct {
int *data;
int size;
int capacity;
} MinHeap;
MinHeap* heap_init(int capacity) {
MinHeap *heap = malloc(sizeof(MinHeap));
heap->data = malloc(sizeof(int) * capacity);
heap->size = 0;
heap->capacity ... | int* func0(int *array, int size) {
MinHeap *heap = heap_init(size > 0 ? size : 1);
for(int i=0;i<size;i++) {
heap_push(heap, array[i]);
}
int *sorted = malloc(sizeof(int)*size);
for(int i=0;i<size;i++) {
sorted[i] = heap_pop(heap);
}
heap_free(heap);
return sort... | int main() {
int input1[] = {1,3,5,7,9,2,4,6,8,0};
int expected1[] = {0,1,2,3,4,5,6,7,8,9};
int size1 = sizeof(input1)/sizeof(input1[0]);
int *sorted1 = func0(input1, size1);
assert(arrays_equal(sorted1, expected1, size1));
free(sorted1);
int input2[] = {25,35,22,85,14,65,75,25,... | O2 | c | func0:
endbr64
push %r14
push %r13
movslq %esi,%r13
push %r12
test %r13d,%r13d
mov %r13,%r12
push %rbp
push %rbx
mov %rdi,%rbx
mov $0x1,%edi
cmovg %r13d,%edi
shl $0x2,%r13
callq 1490 <heap_init>
mov %rax,%rbp
test %r12d,%r12d
jle 1718 <func0+0xa8>
lea -0x1(%r12),%r14d
shl $0x2,%r... | func0:
endbr64
push r14
test esi, esi
push r13
mov r13d, 1
push r12
cmovg r13d, esi
mov r12d, esi
push rbp
push rbx
mov rbx, rdi
mov edi, 10h
call _malloc
movsxd rdi, r13d
mov rbp, rax
shl rdi, 2
call _malloc
mov [rbp+0Ch], r13d
movsxd r13, r12d
mov [rbp+0], r... | long long func0(unsigned int *a1, int a2)
{
int v2; // r13d
unsigned int *v3; // rbx
long long v4; // rbp
long long v5; // rax
long long v6; // r13
long long v7; // r14
long long v8; // rsi
long long v9; // r13
long long v10; // rbx
long long v11; // r14
v2 = 1;
if ( a2 > 0 )
v2 = a2;
v3... | func0:
ENDBR64
PUSH R14
TEST ESI,ESI
PUSH R13
MOV R13D,0x1
PUSH R12
CMOVG R13D,ESI
MOV R12D,ESI
PUSH RBP
PUSH RBX
MOV RBX,RDI
MOV EDI,0x10
CALL 0x001010c0
MOVSXD RDI,R13D
MOV RBP,RAX
SHL RDI,0x2
CALL 0x001010c0
MOV dword ptr [RBP + 0xc],R13D
MOVSXD R13,R12D
MOV qword ptr [RBP],RAX
SHL R13,0x2
MOV dword ptr [RBP + 0x8],... | int4 * func0(int4 *param_1,int param_2)
{
int4 uVar1;
int8 *__ptr;
void *__ptr_00;
int4 *puVar2;
int4 *puVar3;
int4 *puVar4;
int iVar5;
iVar5 = 1;
if (0 < param_2) {
iVar5 = param_2;
}
__ptr = (int8 *)malloc(0x10);
__ptr_00 = malloc((long)iVar5 << 2);
*(int *)((long)__ptr + 0xc) = iVar... |
6,435 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
typedef struct {
int *data;
int size;
int capacity;
} MinHeap;
MinHeap* heap_init(int capacity) {
MinHeap *heap = malloc(sizeof(MinHeap));
heap->data = malloc(sizeof(int) * capacity);
heap->size = 0;
heap->capacity ... | int* func0(int *array, int size) {
MinHeap *heap = heap_init(size > 0 ? size : 1);
for(int i=0;i<size;i++) {
heap_push(heap, array[i]);
}
int *sorted = malloc(sizeof(int)*size);
for(int i=0;i<size;i++) {
sorted[i] = heap_pop(heap);
}
heap_free(heap);
return sort... | int main() {
int input1[] = {1,3,5,7,9,2,4,6,8,0};
int expected1[] = {0,1,2,3,4,5,6,7,8,9};
int size1 = sizeof(input1)/sizeof(input1[0]);
int *sorted1 = func0(input1, size1);
assert(arrays_equal(sorted1, expected1, size1));
free(sorted1);
int input2[] = {25,35,22,85,14,65,75,25,... | O3 | c | func0:
endbr64
push %r15
push %r14
mov %rdi,%r14
mov $0x10,%edi
push %r13
push %r12
mov $0x1,%r12d
push %rbp
push %rbx
mov %esi,%ebx
sub $0x18,%rsp
test %esi,%esi
cmovg %esi,%r12d
callq 10c0 <malloc@plt>
movslq %r12d,%rdi
mov %rax,%rbp
shl $0x2,%rdi
callq 10c0 <malloc@plt>
mov %... | func0:
endbr64
push r15
mov edx, 1
push r14
push r13
push r12
push rbp
push rbx
mov ebx, esi
sub rsp, 28h
test esi, esi
cmovg edx, esi
mov [rsp+58h+var_58], rdi
mov edi, 10h; size
mov ebp, edx
call _malloc
movsxd rdi, ebp
shl rdi, 2; size
mov r15, rax
call _... | void * func0(_DWORD *a1, int a2)
{
int v2; // edx
int v3; // ebp
_DWORD *v4; // r15
_DWORD *v5; // rax
long long v6; // r8
_DWORD *v7; // r13
_DWORD *v8; // rcx
long long v9; // r14
int v10; // r9d
long long v11; // rbx
int v12; // r12d
int v13; // eax
int *v14; // rdx
int v15; // esi
int ... | func0:
ENDBR64
PUSH R15
MOV EDX,0x1
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV EBX,ESI
SUB RSP,0x28
TEST ESI,ESI
CMOVG EDX,ESI
MOV qword ptr [RSP],RDI
MOV EDI,0x10
MOV EBP,EDX
CALL 0x001010c0
MOVSXD RDI,EBP
SHL RDI,0x2
MOV R15,RAX
CALL 0x001010c0
MOVSXD R8,EBX
MOV dword ptr [R15 + 0xc],EBP
MOV qword ptr [R15],RAX... | int4 * func0(int *param_1,int param_2)
{
int *piVar1;
int iVar2;
int4 uVar3;
int8 *__ptr;
void *__ptr_00;
int4 *puVar4;
int iVar5;
long lVar6;
int4 *puVar7;
int4 *puVar8;
ulong uVar9;
ulong uVar10;
int iVar11;
ulong uVar12;
iVar5 = 1;
if (0 < param_2) {
iVar5 = param_2;
}
__p... |
6,436 | func0 |
#include <assert.h>
#include <string.h>
| char* func0(int a, int b, int c) {
if (a == c) {
return "Yes";
} else {
return "No";
}
}
| int main() {
assert(strcmp(func0(2, 0, 2), "Yes") == 0);
assert(strcmp(func0(2, -5, 2), "Yes") == 0);
assert(strcmp(func0(1, 2, 3), "No") == 0);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x4(%rbp)
mov %esi,-0x8(%rbp)
mov %edx,-0xc(%rbp)
mov -0x4(%rbp),%eax
cmp -0xc(%rbp),%eax
jne 118b <func0+0x22>
lea 0xe7f(%rip),%rax
jmp 1192 <func0+0x29>
lea 0xe7a(%rip),%rax
pop %rbp
retq
| func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov [rbp+var_8], esi
mov [rbp+var_C], edx
mov eax, [rbp+var_4]
cmp eax, [rbp+var_C]
jnz short loc_118B
lea rax, s2; "Yes"
jmp short loc_1192
loc_118B:
lea rax, aNo; "No"
loc_1192:
pop rbp
retn | const char * func0(int a1, long long a2, int a3)
{
if ( a1 == a3 )
return "Yes";
else
return "No";
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV dword ptr [RBP + -0x8],ESI
MOV dword ptr [RBP + -0xc],EDX
MOV EAX,dword ptr [RBP + -0x4]
CMP EAX,dword ptr [RBP + -0xc]
JNZ 0x0010118b
LEA RAX,[0x102008]
JMP 0x00101192
LAB_0010118b:
LEA RAX,[0x10200c]
LAB_00101192:
POP RBP
RET | int * func0(int param_1,int8 param_2,int param_3)
{
int *puVar1;
if (param_1 == param_3) {
puVar1 = &DAT_00102008;
}
else {
puVar1 = &DAT_0010200c;
}
return puVar1;
} |
6,437 | func0 |
#include <assert.h>
#include <string.h>
| char* func0(int a, int b, int c) {
if (a == c) {
return "Yes";
} else {
return "No";
}
}
| int main() {
assert(strcmp(func0(2, 0, 2), "Yes") == 0);
assert(strcmp(func0(2, -5, 2), "Yes") == 0);
assert(strcmp(func0(1, 2, 3), "No") == 0);
return 0;
}
| O1 | c | func0:
endbr64
cmp %edx,%edi
lea 0xece(%rip),%rax
lea 0xecb(%rip),%rdx
cmovne %rdx,%rax
retq
| func0:
endbr64
cmp edi, edx
lea rax, unk_2004
lea rdx, unk_2008
cmovnz rax, rdx
retn | void * func0(int a1, long long a2, int a3)
{
void *result; // rax
result = &unk_2004;
if ( a1 != a3 )
return &unk_2008;
return result;
} | func0:
ENDBR64
CMP EDI,EDX
LEA RAX,[0x102004]
LEA RDX,[0x102008]
CMOVNZ RAX,RDX
RET | int * func0(int param_1,int8 param_2,int param_3)
{
int *puVar1;
puVar1 = &DAT_00102004;
if (param_1 != param_3) {
puVar1 = &DAT_00102008;
}
return puVar1;
} |
6,438 | func0 |
#include <assert.h>
#include <string.h>
| char* func0(int a, int b, int c) {
if (a == c) {
return "Yes";
} else {
return "No";
}
}
| int main() {
assert(strcmp(func0(2, 0, 2), "Yes") == 0);
assert(strcmp(func0(2, -5, 2), "Yes") == 0);
assert(strcmp(func0(1, 2, 3), "No") == 0);
return 0;
}
| O2 | c | func0:
endbr64
cmp %edx,%edi
lea 0xeb7(%rip),%rax
lea 0xeb4(%rip),%rdx
cmovne %rdx,%rax
retq
nopl 0x0(%rax)
| func0:
endbr64
cmp edi, edx
lea rax, unk_2004
lea rdx, unk_2008
cmovnz rax, rdx
retn | void * func0(int a1, long long a2, int a3)
{
void *result; // rax
result = &unk_2004;
if ( a1 != a3 )
return &unk_2008;
return result;
} | func0:
ENDBR64
CMP EDI,EDX
LEA RAX,[0x102004]
LEA RDX,[0x102008]
CMOVNZ RAX,RDX
RET | int * func0(int param_1,int8 param_2,int param_3)
{
int *puVar1;
puVar1 = &DAT_00102004;
if (param_1 != param_3) {
puVar1 = &DAT_00102008;
}
return puVar1;
} |
6,439 | func0 |
#include <assert.h>
#include <string.h>
| char* func0(int a, int b, int c) {
if (a == c) {
return "Yes";
} else {
return "No";
}
}
| int main() {
assert(strcmp(func0(2, 0, 2), "Yes") == 0);
assert(strcmp(func0(2, -5, 2), "Yes") == 0);
assert(strcmp(func0(1, 2, 3), "No") == 0);
return 0;
}
| O3 | c | func0:
endbr64
cmp %edx,%edi
lea 0xeb7(%rip),%rax
lea 0xeb4(%rip),%rdx
cmovne %rdx,%rax
retq
nopl 0x0(%rax)
| func0:
endbr64
cmp edi, edx
lea rax, unk_2008
lea rdx, unk_2004
cmovz rax, rdx
retn | void * func0(int a1, long long a2, int a3)
{
void *result; // rax
result = &unk_2008;
if ( a1 == a3 )
return &unk_2004;
return result;
} | func0:
ENDBR64
CMP EDI,EDX
LEA RAX,[0x102008]
LEA RDX,[0x102004]
CMOVZ RAX,RDX
RET | int * func0(int param_1,int8 param_2,int param_3)
{
int *puVar1;
puVar1 = &DAT_00102008;
if (param_1 == param_3) {
puVar1 = &DAT_00102004;
}
return puVar1;
} |
6,440 | func0 |
#include <assert.h>
#include <stdbool.h>
| bool func0(int actual_cost, int sale_amount) {
if(sale_amount == actual_cost){
return true;
} else {
return false;
}
}
| int main() {
assert(func0(1500, 1200) == false);
assert(func0(100, 100) == true);
assert(func0(2000, 5000) == false);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x4(%rbp)
mov %esi,-0x8(%rbp)
mov -0x8(%rbp),%eax
cmp -0x4(%rbp),%eax
jne 1166 <func0+0x1d>
mov $0x1,%eax
jmp 116b <func0+0x22>
mov $0x0,%eax
pop %rbp
retq
| func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov [rbp+var_8], esi
mov eax, [rbp+var_8]
cmp eax, [rbp+var_4]
jnz short loc_1166
mov eax, 1
jmp short loc_116B
loc_1166:
mov eax, 0
loc_116B:
pop rbp
retn | _BOOL8 func0(int a1, int a2)
{
return a2 == a1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV dword ptr [RBP + -0x8],ESI
MOV EAX,dword ptr [RBP + -0x8]
CMP EAX,dword ptr [RBP + -0x4]
JNZ 0x00101166
MOV EAX,0x1
JMP 0x0010116b
LAB_00101166:
MOV EAX,0x0
LAB_0010116b:
POP RBP
RET | bool func0(int param_1,int param_2)
{
return param_2 == param_1;
} |
6,441 | func0 |
#include <assert.h>
#include <stdbool.h>
| bool func0(int actual_cost, int sale_amount) {
if(sale_amount == actual_cost){
return true;
} else {
return false;
}
}
| int main() {
assert(func0(1500, 1200) == false);
assert(func0(100, 100) == true);
assert(func0(2000, 5000) == false);
return 0;
}
| O1 | c | func0:
endbr64
cmp %edi,%esi
sete %al
retq
| func0:
endbr64
cmp esi, edi
setz al
retn | bool func0(int a1, int a2)
{
return a2 == a1;
} | func0:
ENDBR64
CMP ESI,EDI
SETZ AL
RET | bool func0(int param_1,int param_2)
{
return param_2 == param_1;
} |
6,442 | func0 |
#include <assert.h>
#include <stdbool.h>
| bool func0(int actual_cost, int sale_amount) {
if(sale_amount == actual_cost){
return true;
} else {
return false;
}
}
| int main() {
assert(func0(1500, 1200) == false);
assert(func0(100, 100) == true);
assert(func0(2000, 5000) == false);
return 0;
}
| O2 | c | func0:
endbr64
cmp %edi,%esi
sete %al
retq
nopw 0x0(%rax,%rax,1)
| func0:
endbr64
cmp esi, edi
setz al
retn | bool func0(int a1, int a2)
{
return a2 == a1;
} | func0:
ENDBR64
CMP ESI,EDI
SETZ AL
RET | bool func0(int param_1,int param_2)
{
return param_2 == param_1;
} |
6,443 | func0 |
#include <assert.h>
#include <stdbool.h>
| bool func0(int actual_cost, int sale_amount) {
if(sale_amount == actual_cost){
return true;
} else {
return false;
}
}
| int main() {
assert(func0(1500, 1200) == false);
assert(func0(100, 100) == true);
assert(func0(2000, 5000) == false);
return 0;
}
| O3 | c | func0:
endbr64
cmp %edi,%esi
sete %al
retq
nopw 0x0(%rax,%rax,1)
| func0:
endbr64
cmp esi, edi
setz al
retn | bool func0(int a1, int a2)
{
return a2 == a1;
} | func0:
ENDBR64
CMP ESI,EDI
SETZ AL
RET | bool func0(int param_1,int param_2)
{
return param_2 == param_1;
} |
6,444 | func0 |
#include <math.h>
#include <assert.h>
| int func0(int v, int t) {
double windchill = 13.12 + 0.6215*t - 11.37*pow(v, 0.16) + 0.3965*t*pow(v, 0.16);
return (int)(round(windchill));
}
| int main() {
assert(func0(120, 35) == 40);
assert(func0(40, 70) == 86);
assert(func0(10, 100) == 116);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x30,%rsp
mov %edi,-0x14(%rbp)
mov %esi,-0x18(%rbp)
cvtsi2sdl -0x18(%rbp),%xmm1
movsd 0xee0(%rip),%xmm0
mulsd %xmm0,%xmm1
movsd 0xedc(%rip),%xmm0
addsd %xmm0,%xmm1
movsd %xmm1,-0x20(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm0
movsd 0xece(%rip),%xmm1
callq 1080 <pow... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_14], edi
mov [rbp+var_18], esi
pxor xmm1, xmm1
cvtsi2sd xmm1, [rbp+var_18]
movsd xmm0, cs:qword_2070
mulsd xmm1, xmm0
movsd xmm0, cs:qword_2078
addsd xmm1, xmm0
movsd [rbp+var_20], xmm1
pxor xmm3, xmm3
cvtsi2sd xmm3, [rbp+... | long long func0(int a1, int a2)
{
double v3; // [rsp+10h] [rbp-20h]
double x; // [rsp+28h] [rbp-8h]
v3 = (double)a2 * 0.6215000000000001 + 13.12 - pow((double)a1, 0.16) * 11.37;
x = pow((double)a1, 0.16) * ((double)a2 * 0.3965) + v3;
return (unsigned int)(int)round(x);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x18],ESI
PXOR XMM1,XMM1
CVTSI2SD XMM1,dword ptr [RBP + -0x18]
MOVSD XMM0,qword ptr [0x00102070]
MULSD XMM1,XMM0
MOVSD XMM0,qword ptr [0x00102078]
ADDSD XMM1,XMM0
MOVSD qword ptr [RBP + -0x20],XMM1
PXOR XMM3,XMM3
CVTS... | int func0(int param_1,int param_2)
{
double dVar1;
double dVar2;
double dVar3;
double dVar4;
dVar3 = (double)param_2 * DAT_00102070 + DAT_00102078;
dVar1 = pow((double)param_1,DAT_00102080);
dVar1 = dVar1 * DAT_00102088;
dVar4 = (double)param_2 * DAT_00102090;
dVar2 = pow((double)param_1,DAT_00102... |
6,445 | func0 |
#include <math.h>
#include <assert.h>
| int func0(int v, int t) {
double windchill = 13.12 + 0.6215*t - 11.37*pow(v, 0.16) + 0.3965*t*pow(v, 0.16);
return (int)(round(windchill));
}
| int main() {
assert(func0(120, 35) == 40);
assert(func0(40, 70) == 86);
assert(func0(10, 100) == 116);
return 0;
}
| O1 | c | func0:
endbr64
sub $0x28,%rsp
pxor %xmm4,%xmm4
cvtsi2sd %esi,%xmm4
movsd %xmm4,0x8(%rsp)
pxor %xmm6,%xmm6
cvtsi2sd %edi,%xmm6
mov 0xeda(%rip),%rax
movq %rax,%xmm1
movsd %xmm6,0x10(%rsp)
movapd %xmm6,%xmm0
callq 1080 <pow@plt>
movsd %xmm0,0x18(%rsp)
mov 0xeb9(%rip),%rax
movq %rax,%xmm1
movsd 0x10(%... | func0:
endbr64
push r14
push rbx
sub rsp, 18h
pxor xmm3, xmm3
cvtsi2sd xmm3, esi
movsd [rsp+28h+var_20], xmm3
pxor xmm4, xmm4
cvtsi2sd xmm4, edi
movq r14, xmm4
mov rax, cs:qword_2068
movq xmm1, rax
movapd xmm0, xmm4
call _pow
movq rbx, xmm0
mov rax, cs:qword_2068
movq xmm1, rax... | long long func0(int a1, int a2)
{
double v2; // rbx
double v3; // xmm2_8
v2 = pow((double)a1, 0.16);
v3 = pow((double)a1, 0.16);
return (unsigned int)(int)round((double)a2 * 0.6215000000000001 + 13.12 - v2 * 11.37 + (double)a2 * 0.3965 * v3);
} | func0:
ENDBR64
PUSH R14
PUSH RBX
SUB RSP,0x18
PXOR XMM3,XMM3
CVTSI2SD XMM3,ESI
MOVSD qword ptr [RSP + 0x8],XMM3
PXOR XMM4,XMM4
CVTSI2SD XMM4,EDI
MOVQ R14,XMM4
MOV RAX,qword ptr [0x00102068]
MOVQ XMM1,RAX
MOVAPD XMM0,XMM4
CALL 0x00101080
MOVQ RBX,XMM0
MOV RAX,qword ptr [0x00102068]
MOVQ XMM1,RAX
MOVQ XMM0,R14
CALL 0x001... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int func0(int param_1,int param_2)
{
double dVar1;
double dVar2;
dVar1 = pow((double)param_1,DAT_00102068);
dVar2 = pow((double)param_1,DAT_00102068);
dVar1 = round((((double)param_2 * _DAT_00102070 + _DAT_00102078) - dV... |
6,446 | func0 |
#include <math.h>
#include <assert.h>
| int func0(int v, int t) {
double windchill = 13.12 + 0.6215*t - 11.37*pow(v, 0.16) + 0.3965*t*pow(v, 0.16);
return (int)(round(windchill));
}
| int main() {
assert(func0(120, 35) == 40);
assert(func0(40, 70) == 86);
assert(func0(10, 100) == 116);
return 0;
}
| O2 | c | func0:
endbr64
pxor %xmm4,%xmm4
pxor %xmm2,%xmm2
sub $0x28,%rsp
movsd 0xe30(%rip),%xmm1
cvtsi2sd %edi,%xmm4
cvtsi2sd %esi,%xmm2
movapd %xmm4,%xmm0
movsd %xmm4,0x10(%rsp)
movsd %xmm2,0x18(%rsp)
callq 1080 <pow@plt>
mov 0xe0c(%rip),%rax
movsd 0x10(%rsp),%xmm4
movsd %xmm0,0x8(%rsp)
movq %rax,%xmm1
movapd... | func0:
endbr64
pxor xmm4, xmm4
pxor xmm2, xmm2
sub rsp, 28h
movsd xmm1, cs:qword_2068
cvtsi2sd xmm4, edi
cvtsi2sd xmm2, esi
movapd xmm0, xmm4
movsd [rsp+28h+var_18], xmm4
movsd [rsp+28h+var_10], xmm2
call _pow
mov rax, cs:qword_2068
movsd xmm4, [rsp+28h+var_18]
movsd [rsp+28h+var_20], xmm0
m... | long long func0(int a1, int a2)
{
double v2; // xmm4_8
double v4; // [rsp+8h] [rbp-20h]
v4 = pow((double)a1, 0.16);
v2 = pow((double)a1, 0.16);
return (unsigned int)(int)round(0.6215000000000001 * (double)a2 + 13.12 - v4 * 11.37 + (double)a2 * 0.3965 * v2);
} | func0:
ENDBR64
PXOR XMM4,XMM4
PXOR XMM2,XMM2
SUB RSP,0x28
MOVSD XMM1,qword ptr [0x00102068]
CVTSI2SD XMM4,EDI
CVTSI2SD XMM2,ESI
MOVAPD XMM0,XMM4
MOVSD qword ptr [RSP + 0x10],XMM4
MOVSD qword ptr [RSP + 0x18],XMM2
CALL 0x00101080
MOV RAX,qword ptr [0x00102068]
MOVSD XMM4,qword ptr [RSP + 0x10]
MOVSD qword ptr [RSP + 0x8... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int func0(int param_1,int param_2)
{
double dVar1;
double dVar2;
dVar1 = pow((double)param_1,DAT_00102068);
dVar2 = pow((double)param_1,DAT_00102068);
dVar1 = round(((DAT_00102070 * (double)param_2 + _DAT_00102078) - dVa... |
6,447 | func0 |
#include <math.h>
#include <assert.h>
| int func0(int v, int t) {
double windchill = 13.12 + 0.6215*t - 11.37*pow(v, 0.16) + 0.3965*t*pow(v, 0.16);
return (int)(round(windchill));
}
| int main() {
assert(func0(120, 35) == 40);
assert(func0(40, 70) == 86);
assert(func0(10, 100) == 116);
return 0;
}
| O3 | c | func0:
endbr64
pxor %xmm4,%xmm4
pxor %xmm2,%xmm2
sub $0x28,%rsp
movsd 0xe30(%rip),%xmm1
cvtsi2sd %edi,%xmm4
cvtsi2sd %esi,%xmm2
movapd %xmm4,%xmm0
movsd %xmm4,0x10(%rsp)
movsd %xmm2,0x18(%rsp)
callq 1080 <pow@plt>
mov 0xe0c(%rip),%rax
movsd 0x10(%rsp),%xmm4
movsd %xmm0,0x8(%rsp)
movq %rax,%xmm1
movapd... | func0:
endbr64
pxor xmm4, xmm4
pxor xmm2, xmm2
sub rsp, 28h
movsd xmm1, cs:y; y
cvtsi2sd xmm4, edi
cvtsi2sd xmm2, esi
movapd xmm0, xmm4; x
movsd [rsp+28h+x], xmm4
movsd [rsp+28h+var_10], xmm2
call _pow
movsd xmm4, [rsp+28h+x]
movsd xmm1, cs:y; y
movsd [rsp+28h+var_20], xmm0
movapd xmm0, xmm4;... | long long func0(int a1, int a2)
{
double v2; // xmm4_8
double v4; // [rsp+8h] [rbp-20h]
v4 = pow((double)a1, 0.16);
v2 = pow((double)a1, 0.16);
return (unsigned int)(int)round(0.6215000000000001 * (double)a2 + 13.12 - 11.37 * v4 + (double)a2 * 0.3965 * v2);
} | func0:
ENDBR64
PXOR XMM4,XMM4
PXOR XMM2,XMM2
SUB RSP,0x28
MOVSD XMM1,qword ptr [0x00102068]
CVTSI2SD XMM4,EDI
CVTSI2SD XMM2,ESI
MOVAPD XMM0,XMM4
MOVSD qword ptr [RSP + 0x10],XMM4
MOVSD qword ptr [RSP + 0x18],XMM2
CALL 0x00101080
MOVSD XMM4,qword ptr [RSP + 0x10]
MOVSD XMM1,qword ptr [0x00102068]
MOVSD qword ptr [RSP + ... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int func0(int param_1,int param_2)
{
double dVar1;
double dVar2;
dVar1 = pow((double)param_1,DAT_00102068);
dVar2 = pow((double)param_1,DAT_00102068);
dVar1 = round(((DAT_00102070 * (double)param_2 + _DAT_00102078) - DAT... |
6,448 | func0 | #include <assert.h>
#include <string.h>
#include <ctype.h>
| int func0(char *sample_names[], int length) {
int i, j, valid;
int total_length = 0;
for (i = 0; i < length; i++) {
char *name = sample_names[i];
if (isupper(name[0])) {
valid = 1;
for (j = 1; name[j] != '\0'; j++) {
if (!islower(name[j])... | int main() {
char *names1[] = {"sally", "Dylan", "rebecca", "Diana", "Joanne", "keith"};
assert(func0(names1, 6) == 16);
char *names2[] = {"php", "res", "Python", "abcd", "Java", "aaa"};
assert(func0(names2, 6) == 10);
char *names3[] = {"abcd", "Python", "abba", "aba"};
assert(func0(na... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x30,%rsp
mov %rdi,-0x28(%rbp)
mov %esi,-0x2c(%rbp)
movl $0x0,-0xc(%rbp)
movl $0x0,-0x18(%rbp)
jmpq 1294 <func0+0xeb>
mov -0x18(%rbp),%eax
cltq
lea 0x0(,%rax,8),%rdx
mov -0x28(%rbp),%rax
add %rdx,%rax
mov (%rax),%rax
mov %rax,-0x8(%rbp)
c... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_28], rdi
mov [rbp+var_2C], esi
mov [rbp+var_C], 0
mov [rbp+var_18], 0
jmp loc_1294
loc_11CF:
mov eax, [rbp+var_18]
cdqe
lea rdx, ds:0[rax*8]
mov rax, [rbp+var_28]
add rax, rdx
mov rax, [rax]
mov [rbp+s]... | long long func0(long long a1, int a2)
{
int i; // [rsp+18h] [rbp-18h]
int j; // [rsp+1Ch] [rbp-14h]
int v5; // [rsp+20h] [rbp-10h]
unsigned int v6; // [rsp+24h] [rbp-Ch]
char *s; // [rsp+28h] [rbp-8h]
v6 = 0;
for ( i = 0; i < a2; ++i )
{
s = *(char **)(8LL * i + a1);
if ( ((*__ctype_b_loc())[*... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x28],RDI
MOV dword ptr [RBP + -0x2c],ESI
MOV dword ptr [RBP + -0xc],0x0
MOV dword ptr [RBP + -0x18],0x0
JMP 0x00101294
LAB_001011cf:
MOV EAX,dword ptr [RBP + -0x18]
CDQE
LEA RDX,[RAX*0x8]
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,RDX
MOV RAX,qword pt... | int func0(long param_1,int param_2)
{
char *__s;
bool bVar1;
ushort **ppuVar2;
size_t sVar3;
int local_20;
int local_1c;
int local_14;
local_14 = 0;
local_20 = 0;
do {
if (param_2 <= local_20) {
return local_14;
}
__s = *(char **)(param_1 + (long)local_20 * 8);
ppuVar2 = __... |
6,449 | func0 | #include <assert.h>
#include <string.h>
#include <ctype.h>
| int func0(char *sample_names[], int length) {
int i, j, valid;
int total_length = 0;
for (i = 0; i < length; i++) {
char *name = sample_names[i];
if (isupper(name[0])) {
valid = 1;
for (j = 1; name[j] != '\0'; j++) {
if (!islower(name[j])... | int main() {
char *names1[] = {"sally", "Dylan", "rebecca", "Diana", "Joanne", "keith"};
assert(func0(names1, 6) == 16);
char *names2[] = {"php", "res", "Python", "abcd", "Java", "aaa"};
assert(func0(names2, 6) == 10);
char *names3[] = {"abcd", "Python", "abba", "aba"};
assert(func0(na... | O1 | c | func0:
endbr64
test %esi,%esi
jle 11c3 <func0+0x3a>
push %rbp
push %rbx
sub $0x8,%rsp
mov %rdi,%rbp
mov %esi,%ebx
callq 1090 <__ctype_b_loc@plt>
mov (%rax),%r9
mov %rbp,%r8
lea -0x1(%rbx),%eax
lea 0x8(%rbp,%rax,8),%r10
mov $0x0,%r11d
mov $0xffffffffffffffff,%rbx
mov $0x0,%eax
jmp... | func0:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 8
test esi, esi
jle short loc_11DE
mov r13, rdi
mov r12d, esi
call ___ctype_b_loc
mov rbp, [rax]
mov rbx, r13
lea eax, [r12-1]
lea r12, [r13+rax*8+8]
mov r13d, 0
jmp short loc_1203
loc_11DE:
mov r13... | long long func0(char **a1, int a2)
{
long long v2; // rbp
char **v3; // rbx
long long v4; // r12
unsigned int v5; // r13d
char *v7; // rdi
char v8; // al
char *v9; // rdx
if ( a2 <= 0 )
{
return 0;
}
else
{
v2 = *(_QWORD *)__ctype_b_loc();
v3 = a1;
v4 = (long long)&a1[(unsigned... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
TEST ESI,ESI
JLE 0x001011de
MOV R13,RDI
MOV R12D,ESI
CALL 0x001010b0
MOV RBP,qword ptr [RAX]
MOV RBX,R13
LEA EAX,[R12 + -0x1]
LEA R12,[R13 + RAX*0x8 + 0x8]
MOV R13D,0x0
JMP 0x00101203
LAB_001011de:
MOV R13D,0x0
LAB_001011e4:
MOV EAX,R13D
ADD RSP,0x8
POP RBX... | int func0(int8 *param_1,int param_2)
{
int8 *puVar1;
ushort *puVar2;
char *__s;
char cVar3;
ushort **ppuVar4;
size_t sVar5;
char *pcVar6;
int iVar7;
if (param_2 < 1) {
iVar7 = 0;
}
else {
ppuVar4 = __ctype_b_loc();
puVar2 = *ppuVar4;
puVar1 = param_1 + (ulong)(param_2 - 1) + 1;... |
6,450 | func0 | #include <assert.h>
#include <string.h>
#include <ctype.h>
| int func0(char *sample_names[], int length) {
int i, j, valid;
int total_length = 0;
for (i = 0; i < length; i++) {
char *name = sample_names[i];
if (isupper(name[0])) {
valid = 1;
for (j = 1; name[j] != '\0'; j++) {
if (!islower(name[j])... | int main() {
char *names1[] = {"sally", "Dylan", "rebecca", "Diana", "Joanne", "keith"};
assert(func0(names1, 6) == 16);
char *names2[] = {"php", "res", "Python", "abcd", "Java", "aaa"};
assert(func0(names2, 6) == 10);
char *names3[] = {"abcd", "Python", "abba", "aba"};
assert(func0(na... | O2 | c | func0:
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
test %esi,%esi
jle 13da <func0+0x8a>
mov %esi,%r12d
mov %rdi,%rbx
xor %r13d,%r13d
callq 10b0 <__ctype_b_loc@plt>
mov (%rax),%rbp
lea -0x1(%r12),%eax
lea 0x8(%rbx,%rax,8),%r12
jmp 1389 <func0+0x39>
add $0x8,%rbx... | func0:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 8
test esi, esi
jle short loc_13DA
mov r12d, esi
mov rbx, rdi
xor r13d, r13d
call ___ctype_b_loc
mov rbp, [rax]
lea eax, [r12-1]
lea r12, [rbx+rax*8+8]
jmp short loc_1389
loc_1380:
add rbx, 8
cmp r1... | long long func0(char **a1, long long a2)
{
char **v2; // rbx
unsigned int v3; // r13d
char *v4; // rdx
long long v5; // rbp
long long v6; // r12
char *v7; // rdi
long long v8; // rax
if ( (int)a2 > 0 )
{
v2 = a1;
v3 = 0;
v5 = *(_QWORD *)__ctype_b_loc();
v6 = (long long)&a1[(unsigned ... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
TEST ESI,ESI
JLE 0x001013da
MOV R12D,ESI
MOV RBX,RDI
XOR R13D,R13D
CALL 0x001010b0
MOV RBP,qword ptr [RAX]
LEA EAX,[R12 + -0x1]
LEA R12,[RBX + RAX*0x8 + 0x8]
JMP 0x00101389
LAB_00101380:
ADD RBX,0x8
CMP R12,RBX
JZ 0x001013cc
LAB_00101389:
MOV RDI,qword ptr ... | int func0(int8 *param_1,int param_2)
{
int8 *puVar1;
char cVar2;
ushort *puVar3;
char *__s;
ushort **ppuVar4;
size_t sVar5;
char *pcVar6;
int iVar7;
if (param_2 < 1) {
return 0;
}
iVar7 = 0;
ppuVar4 = __ctype_b_loc();
puVar3 = *ppuVar4;
puVar1 = param_1 + (ulong)(param_2 - 1) + 1;
... |
6,451 | func0 | #include <assert.h>
#include <string.h>
#include <ctype.h>
| int func0(char *sample_names[], int length) {
int i, j, valid;
int total_length = 0;
for (i = 0; i < length; i++) {
char *name = sample_names[i];
if (isupper(name[0])) {
valid = 1;
for (j = 1; name[j] != '\0'; j++) {
if (!islower(name[j])... | int main() {
char *names1[] = {"sally", "Dylan", "rebecca", "Diana", "Joanne", "keith"};
assert(func0(names1, 6) == 16);
char *names2[] = {"php", "res", "Python", "abcd", "Java", "aaa"};
assert(func0(names2, 6) == 10);
char *names3[] = {"abcd", "Python", "abba", "aba"};
assert(func0(na... | O3 | c | func0:
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
test %esi,%esi
jle 140a <func0+0x8a>
mov %esi,%r12d
mov %rdi,%rbx
xor %r13d,%r13d
callq 10b0 <__ctype_b_loc@plt>
mov (%rax),%rbp
lea -0x1(%r12),%eax
lea 0x8(%rbx,%rax,8),%r12
jmp 13b9 <func0+0x39>
add $0x8,%rbx... | func0:
endbr64
push r13
push r12
movsxd r12, esi
push rbp
push rbx
sub rsp, 8
test r12d, r12d
jle short loc_143A
mov rbx, rdi
xor r13d, r13d
call ___ctype_b_loc
lea r12, [rbx+r12*8]
mov rbp, [rax]
jmp short loc_13E9
loc_13E0:
add rbx, 8
cmp r12, rbx
jz short l... | long long func0(char **a1, int a2)
{
char **v2; // rbx
unsigned int v3; // r13d
char **v4; // r12
const unsigned __int16 *v5; // rbp
char *v6; // rdi
long long v7; // rax
char *v8; // rdx
if ( a2 > 0 )
{
v2 = a1;
v3 = 0;
v4 = &a1[a2];
v5 = *__ctype_b_loc();
while ( 1 )
{
... | func0:
ENDBR64
PUSH R13
PUSH R12
MOVSXD R12,ESI
PUSH RBP
PUSH RBX
SUB RSP,0x8
TEST R12D,R12D
JLE 0x0010143a
MOV RBX,RDI
XOR R13D,R13D
CALL 0x001010b0
LEA R12,[RBX + R12*0x8]
MOV RBP,qword ptr [RAX]
JMP 0x001013e9
LAB_001013e0:
ADD RBX,0x8
CMP R12,RBX
JZ 0x0010142c
LAB_001013e9:
MOV RDI,qword ptr [RBX]
MOVSX RAX,byte pt... | int func0(int8 *param_1,int param_2)
{
int8 *puVar1;
char cVar2;
ushort *puVar3;
char *__s;
ushort **ppuVar4;
size_t sVar5;
char *pcVar6;
int iVar7;
if (param_2 < 1) {
return 0;
}
iVar7 = 0;
ppuVar4 = __ctype_b_loc();
puVar1 = param_1 + param_2;
puVar3 = *ppuVar4;
do {
while (_... |
6,452 | func0 |
#include <stdio.h>
#include <assert.h>
#include <regex.h>
#include <string.h>
#include <stdlib.h>
| char* func0(char* item) {
regex_t regex;
regmatch_t matches[2];
char *result = (char*)malloc(strlen(item) + 1);
strcpy(result, item);
if (regcomp(®ex, " ?\\([^)]+\\)", REG_EXTENDED) == 0) {
while (regexec(®ex, result, 2, matches, 0) == 0) {
int start = matches[0].r... | int main() {
char result[256];
strcpy(result, func0("python (chrome)"));
assert(strcmp(result, "python") == 0);
strcpy(result, func0("string(.abc)"));
assert(strcmp(result, "string") == 0);
strcpy(result, func0("alpha(num)"));
assert(strcmp(result, "alpha") == 0);
return 0;... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
add $0xffffffffffffff80,%rsp
mov %rdi,-0x78(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
mov -0x78(%rbp),%rax
mov %rax,%rdi
callq 1100 <strlen@plt>
add $0x1,%rax
mov %rax,%rdi
callq 1150 <malloc@plt>
mov %rax,-0x68(%rbp)
mov -0x... | func0:
endbr64
push rbp
mov rbp, rsp
add rsp, 0FFFFFFFFFFFFFF80h
mov [rbp+s], rdi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov rax, [rbp+s]
mov rdi, rax; s
call _strlen
add rax, 1
mov rdi, rax; size
call _malloc
mov [rbp+dest], rax
mov rdx, [rbp+s]
mov ... | char * func0(const char *a1)
{
size_t v1; // rax
size_t v2; // rax
regmatch_t v4; // [rsp+10h] [rbp-70h]
char *dest; // [rsp+18h] [rbp-68h]
regex_t preg; // [rsp+20h] [rbp-60h] BYREF
regmatch_t pmatch; // [rsp+60h] [rbp-20h] BYREF
unsigned long long v8; // [rsp+78h] [rbp-8h]
v8 = __readfsqword(0x28u);
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
ADD RSP,-0x80
MOV qword ptr [RBP + -0x78],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x78]
MOV RDI,RAX
CALL 0x00101100
ADD RAX,0x1
MOV RDI,RAX
CALL 0x00101150
MOV qword ptr [RBP + -0x68],RAX
MOV RDX,qword ptr [RBP + -0x78]
MOV... | char * func0(char *param_1)
{
regoff_t rVar1;
regoff_t rVar2;
int iVar3;
size_t sVar4;
char *__dest;
long in_FS_OFFSET;
regex_t local_68;
regmatch_t local_28 [3];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
sVar4 = strlen(param_1);
__dest = (char *)malloc(sVar4 + 1);
strcpy(_... |
6,453 | func0 |
#include <stdio.h>
#include <assert.h>
#include <regex.h>
#include <string.h>
#include <stdlib.h>
| char* func0(char* item) {
regex_t regex;
regmatch_t matches[2];
char *result = (char*)malloc(strlen(item) + 1);
strcpy(result, item);
if (regcomp(®ex, " ?\\([^)]+\\)", REG_EXTENDED) == 0) {
while (regexec(®ex, result, 2, matches, 0) == 0) {
int start = matches[0].r... | int main() {
char result[256];
strcpy(result, func0("python (chrome)"));
assert(strcmp(result, "python") == 0);
strcpy(result, func0("string(.abc)"));
assert(strcmp(result, "string") == 0);
strcpy(result, func0("alpha(num)"));
assert(strcmp(result, "alpha") == 0);
return 0;... | O1 | c | func0:
endbr64
push %rbp
push %rbx
sub $0x68,%rsp
mov %rdi,%rbp
mov %fs:0x28,%rax
mov %rax,0x58(%rsp)
xor %eax,%eax
mov $0xffffffffffffffff,%rcx
repnz scas %es:(%rdi),%al
not %rcx
mov %rcx,%rdi
callq 1120 <malloc@plt>
mov %rax,%rbx
mov %rbp,%rsi
mov %rax,%rdi
callq 10d0 <strcpy@pl... | func0:
endbr64
push rbp
push rbx
sub rsp, 68h
mov rbp, rdi
mov rax, fs:28h
mov [rsp+78h+var_20], rax
xor eax, eax
call _strlen
lea rdi, [rax+1]
call _malloc
mov rbx, rax
mov rsi, rbp
mov rdi, rax
call _strcpy
mov rdi, rsp
mov edx, 1
lea rsi, asc_2004; " ?\\... | long long func0(long long a1)
{
long long v1; // rax
long long v2; // rbx
long long v4; // rax
_BYTE v5[64]; // [rsp+0h] [rbp-78h] BYREF
int v6; // [rsp+40h] [rbp-38h] BYREF
int v7; // [rsp+44h] [rbp-34h]
unsigned long long v8; // [rsp+58h] [rbp-20h]
v8 = __readfsqword(0x28u);
v1 = ((long long (*)(v... | func0:
ENDBR64
PUSH RBP
PUSH RBX
SUB RSP,0x68
MOV RBP,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x58],RAX
XOR EAX,EAX
CALL 0x00101110
LEA RDI,[RAX + 0x1]
CALL 0x00101160
MOV RBX,RAX
MOV RSI,RBP
MOV RDI,RAX
CALL 0x001010f0
MOV RDI,RSP
MOV EDX,0x1
LEA RSI,[0x102004]
CALL 0x00101140
LEA RBP,[RSP + 0x40]
TEST EA... | char * func0(char *param_1)
{
int iVar1;
size_t sVar2;
char *__dest;
long in_FS_OFFSET;
regex_t rStack_78;
regmatch_t local_38 [3];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
sVar2 = strlen(param_1);
__dest = (char *)malloc(sVar2 + 1);
strcpy(__dest,param_1);
iVar1 = regcomp(&... |
6,454 | func0 |
#include <stdio.h>
#include <assert.h>
#include <regex.h>
#include <string.h>
#include <stdlib.h>
| char* func0(char* item) {
regex_t regex;
regmatch_t matches[2];
char *result = (char*)malloc(strlen(item) + 1);
strcpy(result, item);
if (regcomp(®ex, " ?\\([^)]+\\)", REG_EXTENDED) == 0) {
while (regexec(®ex, result, 2, matches, 0) == 0) {
int start = matches[0].r... | int main() {
char result[256];
strcpy(result, func0("python (chrome)"));
assert(strcmp(result, "python") == 0);
strcpy(result, func0("string(.abc)"));
assert(strcmp(result, "string") == 0);
strcpy(result, func0("alpha(num)"));
assert(strcmp(result, "alpha") == 0);
return 0;... | O2 | c | func0:
endbr64
push %r13
push %r12
push %rbp
mov %rdi,%rbp
push %rbx
sub $0x68,%rsp
mov %fs:0x28,%rax
mov %rax,0x58(%rsp)
xor %eax,%eax
callq 10f0 <strlen@plt>
lea 0x1(%rax),%r13
mov %r13,%rdi
callq 1140 <malloc@plt>
mov %rbp,%rsi
mov %r13,%rdx
mov %rsp,%rbp
mov %rax,%rdi
mov ... | func0:
endbr64
push r13
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 68h
mov rax, fs:28h
mov [rsp+88h+var_30], rax
xor eax, eax
call _strlen
lea r13, [rax+1]
mov rdi, r13
call _malloc
mov rsi, rbp
mov rdx, r13
mov rbp, rsp
mov rdi, rax
mov r12, rax
c... | long long func0(long long a1)
{
long long v1; // r13
long long v2; // r12
long long v3; // rax
_BYTE v5[64]; // [rsp+0h] [rbp-88h] BYREF
int v6; // [rsp+40h] [rbp-48h] BYREF
int v7; // [rsp+44h] [rbp-44h]
unsigned long long v8; // [rsp+58h] [rbp-30h]
v8 = __readfsqword(0x28u);
v1 = ((long long (*)(v... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x68
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x58],RAX
XOR EAX,EAX
CALL 0x00101100
LEA R13,[RAX + 0x1]
MOV RDI,R13
CALL 0x00101160
MOV RSI,RBP
MOV RDX,R13
MOV RBP,RSP
MOV RDI,RAX
MOV R12,RAX
CALL 0x00101150
MOV EDX,0x1
LEA RSI,[0x102004]
MO... | char * func0(char *param_1)
{
int iVar1;
size_t sVar2;
char *__string;
long in_FS_OFFSET;
regex_t rStack_88;
regmatch_t local_48 [3];
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
sVar2 = strlen(param_1);
__string = (char *)malloc(sVar2 + 1);
memcpy(__string,param_1,sVar2 + 1);
i... |
6,455 | func0 |
#include <stdio.h>
#include <assert.h>
#include <regex.h>
#include <string.h>
#include <stdlib.h>
| char* func0(char* item) {
regex_t regex;
regmatch_t matches[2];
char *result = (char*)malloc(strlen(item) + 1);
strcpy(result, item);
if (regcomp(®ex, " ?\\([^)]+\\)", REG_EXTENDED) == 0) {
while (regexec(®ex, result, 2, matches, 0) == 0) {
int start = matches[0].r... | int main() {
char result[256];
strcpy(result, func0("python (chrome)"));
assert(strcmp(result, "python") == 0);
strcpy(result, func0("string(.abc)"));
assert(strcmp(result, "string") == 0);
strcpy(result, func0("alpha(num)"));
assert(strcmp(result, "alpha") == 0);
return 0;... | O3 | c | func0:
endbr64
push %r13
push %r12
push %rbp
mov %rdi,%rbp
push %rbx
sub $0x68,%rsp
mov %fs:0x28,%rax
mov %rax,0x58(%rsp)
xor %eax,%eax
callq 10f0 <strlen@plt>
lea 0x1(%rax),%r13
mov %r13,%rdi
callq 1140 <malloc@plt>
mov %rbp,%rsi
mov %r13,%rdx
mov %rsp,%rbp
mov %rax,%rdi
mov ... | func0:
endbr64
push r14
push r13
push r12
mov r12, rdi
push rbp
push rbx
sub rsp, 60h
mov rax, fs:28h
mov [rsp+88h+var_30], rax
xor eax, eax
call _strlen
lea rbp, [rax+1]
mov rdi, rbp; size
call _malloc
mov rsi, r12
mov rdx, rbp
mov rcx, rbp
mov rdi, rax
... | const char * func0(const char *a1)
{
size_t v1; // rbp
const char *v2; // rbx
size_t v3; // rax
size_t rm_so; // rcx
regex_t v6; // [rsp+0h] [rbp-88h] BYREF
regmatch_t pmatch; // [rsp+40h] [rbp-48h] BYREF
unsigned long long v8; // [rsp+58h] [rbp-30h]
v8 = __readfsqword(0x28u);
v1 = strlen(a1) + 1;
... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
MOV R12,RDI
PUSH RBP
PUSH RBX
SUB RSP,0x60
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x58],RAX
XOR EAX,EAX
CALL 0x00101100
LEA RBP,[RAX + 0x1]
MOV RDI,RBP
CALL 0x00101170
MOV RSI,R12
MOV RDX,RBP
MOV RCX,RBP
MOV RDI,RAX
MOV R12,RSP
MOV RBX,RAX
CALL 0x00101160
MOV EDX,0x1
... | char * func0(char *param_1)
{
int iVar1;
size_t sVar2;
char *__string;
size_t sVar3;
ulong uVar4;
ulong uVar5;
long in_FS_OFFSET;
regex_t rStack_88;
regmatch_t local_48 [3];
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
sVar2 = strlen(param_1);
sVar2 = sVar2 + 1;
__string = (... |
6,456 | func0 | #include <assert.h>
| int func0(int n) {
return (int)(n * (7 * n - 5) / 2);
}
| int main() {
assert(func0(10) == 325);
assert(func0(15) == 750);
assert(func0(18) == 1089);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x4(%rbp)
mov -0x4(%rbp),%edx
mov %edx,%eax
shl $0x3,%eax
sub %edx,%eax
sub $0x5,%eax
imul -0x4(%rbp),%eax
mov %eax,%edx
shr $0x1f,%edx
add %edx,%eax
sar %eax
pop %rbp
retq
| func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov edx, [rbp+var_4]
mov eax, edx
shl eax, 3
sub eax, edx
sub eax, 5
imul eax, [rbp+var_4]
mov edx, eax
shr edx, 1Fh
add eax, edx
sar eax, 1
pop rbp
retn | long long func0(int a1)
{
return (unsigned int)(a1 * (7 * a1 - 5) / 2);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV EDX,dword ptr [RBP + -0x4]
MOV EAX,EDX
SHL EAX,0x3
SUB EAX,EDX
SUB EAX,0x5
IMUL EAX,dword ptr [RBP + -0x4]
MOV EDX,EAX
SHR EDX,0x1f
ADD EAX,EDX
SAR EAX,0x1
POP RBP
RET | int func0(int param_1)
{
return ((param_1 * 7 + -5) * param_1) / 2;
} |
6,457 | func0 | #include <assert.h>
| int func0(int n) {
return (int)(n * (7 * n - 5) / 2);
}
| int main() {
assert(func0(10) == 325);
assert(func0(15) == 750);
assert(func0(18) == 1089);
return 0;
}
| O1 | c | func0:
endbr64
mov %edi,%eax
lea 0x0(,%rdi,8),%edi
mov %edi,%edx
sub %eax,%edx
lea -0x5(%rdx),%edi
imul %eax,%edi
mov %edi,%eax
shr $0x1f,%eax
add %edi,%eax
sar %eax
retq
| func0:
endbr64
mov eax, edi
lea edi, ds:0[rdi*8]
sub edi, eax
sub edi, 5
imul edi, eax
mov eax, edi
shr eax, 1Fh
add eax, edi
sar eax, 1
retn | long long func0(int a1)
{
return (unsigned int)(a1 * (7 * a1 - 5) / 2);
} | func0:
ENDBR64
MOV EAX,EDI
LEA EDI,[RDI*0x8]
SUB EDI,EAX
SUB EDI,0x5
IMUL EDI,EAX
MOV EAX,EDI
SHR EAX,0x1f
ADD EAX,EDI
SAR EAX,0x1
RET | int func0(int param_1)
{
return ((param_1 * 7 + -5) * param_1) / 2;
} |
6,458 | func0 | #include <assert.h>
| int func0(int n) {
return (int)(n * (7 * n - 5) / 2);
}
| int main() {
assert(func0(10) == 325);
assert(func0(15) == 750);
assert(func0(18) == 1089);
return 0;
}
| O2 | c | func0:
endbr64
mov %edi,%eax
lea 0x0(,%rdi,8),%edi
mov %edi,%edx
sub %eax,%edx
lea -0x5(%rdx),%edi
imul %eax,%edi
mov %edi,%eax
shr $0x1f,%eax
add %edi,%eax
sar %eax
retq
nopw %cs:0x0(%rax,%rax,1)
nopl 0x0(%rax,%rax,1)
| func0:
endbr64
mov eax, edi
lea edi, ds:0[rdi*8]
sub edi, eax
sub edi, 5
imul edi, eax
mov eax, edi
shr eax, 1Fh
add eax, edi
sar eax, 1
retn | long long func0(int a1)
{
return (unsigned int)(a1 * (7 * a1 - 5) / 2);
} | func0:
ENDBR64
MOV EAX,EDI
LEA EDI,[RDI*0x8]
SUB EDI,EAX
SUB EDI,0x5
IMUL EDI,EAX
MOV EAX,EDI
SHR EAX,0x1f
ADD EAX,EDI
SAR EAX,0x1
RET | int func0(int param_1)
{
return ((param_1 * 7 + -5) * param_1) / 2;
} |
6,459 | func0 | #include <assert.h>
| int func0(int n) {
return (int)(n * (7 * n - 5) / 2);
}
| int main() {
assert(func0(10) == 325);
assert(func0(15) == 750);
assert(func0(18) == 1089);
return 0;
}
| O3 | c | func0:
endbr64
mov %edi,%eax
lea 0x0(,%rdi,8),%edi
mov %edi,%edx
sub %eax,%edx
lea -0x5(%rdx),%edi
imul %eax,%edi
mov %edi,%eax
shr $0x1f,%eax
add %edi,%eax
sar %eax
retq
nopw %cs:0x0(%rax,%rax,1)
nopl 0x0(%rax,%rax,1)
| func0:
endbr64
mov eax, edi
lea edi, ds:0[rdi*8]
sub edi, eax
sub edi, 5
imul edi, eax
mov eax, edi
shr eax, 1Fh
add eax, edi
sar eax, 1
retn | long long func0(int a1)
{
return (unsigned int)(a1 * (7 * a1 - 5) / 2);
} | func0:
ENDBR64
MOV EAX,EDI
LEA EDI,[RDI*0x8]
SUB EDI,EAX
SUB EDI,0x5
IMUL EDI,EAX
MOV EAX,EDI
SHR EAX,0x1f
ADD EAX,EDI
SAR EAX,0x1
RET | int func0(int param_1)
{
return ((param_1 * 7 + -5) * param_1) / 2;
} |
6,460 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <stdbool.h>
typedef struct {
int first;
int second;
} Pair;
typedef Pair* Sublist;
int compare_pairs(const void *a, const void *b) {
Pair pa = *(Pair*)a;
Pair pb = *(Pair*)b;
if (pa.first != pb.first) return (pa.... | void func0(Sublist *test_list, int num_lists, Sublist *result, int *result_size) {
int added = 0;
for (int i = 0; i < num_lists; i++) {
Sublist current = sorted_sublist(test_list[i], sublist_length(test_list[i]));
bool found = false;
for (int j = 0; j < added; j++) {
if... | int main() {
Pair list1[] = {{4, 5}, {3, 2}, {0, 0}};
Pair list2[] = {{2, 2}, {4, 6}, {0, 0}};
Pair list3[] = {{3, 2}, {4, 5}, {0, 0}};
Sublist test_list1[] = {list1, list2, list3};
Sublist result1[3];
int result1_size = 0;
func0(test_list1, 3, result1, &result1_size);
assert(r... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x40,%rsp
mov %rdi,-0x28(%rbp)
mov %esi,-0x2c(%rbp)
mov %rdx,-0x38(%rbp)
mov %rcx,-0x40(%rbp)
movl $0x0,-0x14(%rbp)
movl $0x0,-0x10(%rbp)
jmpq 144d <func0+0xed>
mov -0x10(%rbp),%eax
cltq
lea 0x0(,%rax,8),%rdx
mov -0x28(%rbp),%rax
add %rdx... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_28], rdi
mov [rbp+var_2C], esi
mov [rbp+var_38], rdx
mov [rbp+var_40], rcx
mov [rbp+var_14], 0
mov [rbp+var_10], 0
jmp loc_1452
loc_1393:
mov eax, [rbp+var_10]
cdqe
lea rdx, ds:0[rax*8]
mov rax, [rbp+var_28... | _DWORD * func0(long long a1, int a2, long long a3, _DWORD *a4)
{
unsigned int v4; // eax
int v5; // eax
_DWORD *result; // rax
char v9; // [rsp+2Bh] [rbp-15h]
int v10; // [rsp+2Ch] [rbp-14h]
int i; // [rsp+30h] [rbp-10h]
int j; // [rsp+34h] [rbp-Ch]
long long v13; // [rsp+38h] [rbp-8h]
v10 = 0;
for... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x28],RDI
MOV dword ptr [RBP + -0x2c],ESI
MOV qword ptr [RBP + -0x38],RDX
MOV qword ptr [RBP + -0x40],RCX
MOV dword ptr [RBP + -0x14],0x0
MOV dword ptr [RBP + -0x10],0x0
JMP 0x00101452
LAB_00101393:
MOV EAX,dword ptr [RBP + -0x10]
CDQE
LEA RDX,[RAX*... | void func0(long param_1,int param_2,long param_3,int *param_4)
{
bool bVar1;
char cVar2;
int4 uVar3;
int8 uVar4;
int4 local_1c;
int4 local_18;
int4 local_14;
local_1c = 0;
local_18 = 0;
do {
if (param_2 <= local_18) {
*param_4 = local_1c;
return;
}
uVar3 = sublist_length(... |
6,461 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <stdbool.h>
typedef struct {
int first;
int second;
} Pair;
typedef Pair* Sublist;
int compare_pairs(const void *a, const void *b) {
Pair pa = *(Pair*)a;
Pair pb = *(Pair*)b;
if (pa.first != pb.first) return (pa.... | void func0(Sublist *test_list, int num_lists, Sublist *result, int *result_size) {
int added = 0;
for (int i = 0; i < num_lists; i++) {
Sublist current = sorted_sublist(test_list[i], sublist_length(test_list[i]));
bool found = false;
for (int j = 0; j < added; j++) {
if... | int main() {
Pair list1[] = {{4, 5}, {3, 2}, {0, 0}};
Pair list2[] = {{2, 2}, {4, 6}, {0, 0}};
Pair list3[] = {{3, 2}, {4, 5}, {0, 0}};
Sublist test_list1[] = {list1, list2, list3};
Sublist result1[3];
int result1_size = 0;
func0(test_list1, 3, result1, &result1_size);
assert(r... | O1 | c | func0:
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x28,%rsp
mov %rcx,0x18(%rsp)
test %esi,%esi
jle 12e0 <func0+0x3f>
mov %rdx,%r15
mov %rdi,%r13
lea -0x1(%rsi),%eax
lea 0x8(%rdi,%rax,8),%rax
mov %rax,0x8(%rsp)
mov $0x0,%r14d
lea 0x8(%rdx),%rax
mo... | func0:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 28h
mov [rsp+58h+var_40], rcx
test esi, esi
jle short loc_12D9
mov r15, rdx
mov r13, rdi
lea eax, [rsi-1]
lea rax, [rdi+rax*8+8]
mov [rsp+58h+var_50], rax
mov r14d, 0
lea rax, [rdx+... | int * func0(_QWORD *a1, int a2, _QWORD *a3, int *a4)
{
_QWORD *v5; // r13
int v6; // r14d
int *result; // rax
long long v8; // rbx
unsigned int v9; // eax
long long v10; // rbp
_QWORD *v11; // rbx
_QWORD *v12; // [rsp+10h] [rbp-48h]
if ( a2 <= 0 )
{
v6 = 0;
}
else
{
v5 = a1;
v6 = ... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RCX
TEST ESI,ESI
JLE 0x001012d9
MOV R15,RDX
MOV R13,RDI
LEA EAX,[RSI + -0x1]
LEA RAX,[RDI + RAX*0x8 + 0x8]
MOV qword ptr [RSP + 0x8],RAX
MOV R14D,0x0
LEA RAX,[RDX + 0x8]
MOV qword ptr [RSP + 0x10],RAX
JMP 0x0010... | void func0(int8 *param_1,int param_2,int8 *param_3,int *param_4)
{
int8 *puVar1;
char cVar2;
int4 uVar3;
int8 uVar4;
int8 *puVar5;
int iVar6;
if (param_2 < 1) {
iVar6 = 0;
}
else {
puVar1 = param_1 + (ulong)(param_2 - 1) + 1;
iVar6 = 0;
do {
uVar4 = *param_1;
uVar3 = su... |
6,462 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <stdbool.h>
typedef struct {
int first;
int second;
} Pair;
typedef Pair* Sublist;
int compare_pairs(const void *a, const void *b) {
Pair pa = *(Pair*)a;
Pair pb = *(Pair*)b;
if (pa.first != pb.first) return (pa.... | void func0(Sublist *test_list, int num_lists, Sublist *result, int *result_size) {
int added = 0;
for (int i = 0; i < num_lists; i++) {
Sublist current = sorted_sublist(test_list[i], sublist_length(test_list[i]));
bool found = false;
for (int j = 0; j < added; j++) {
if... | int main() {
Pair list1[] = {{4, 5}, {3, 2}, {0, 0}};
Pair list2[] = {{2, 2}, {4, 6}, {0, 0}};
Pair list3[] = {{3, 2}, {4, 5}, {0, 0}};
Sublist test_list1[] = {list1, list2, list3};
Sublist result1[3];
int result1_size = 0;
func0(test_list1, 3, result1, &result1_size);
assert(r... | O2 | c | func0:
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x28,%rsp
mov %rcx,0x18(%rsp)
test %esi,%esi
jle 1755 <func0+0xf5>
lea -0x1(%rsi),%eax
mov %rdx,%r13
mov %rdi,%rbp
xor %r12d,%r12d
lea 0x8(%rdi,%rax,8),%rax
mov %rax,0x8(%rsp)
lea 0x8(%rdx),%rax
m... | func0:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 28h
mov [rsp+58h+var_58], rdx
mov [rsp+58h+var_40], rcx
test esi, esi
jle loc_1760
lea eax, [rsi-1]
mov rbp, rdi
lea r14, compare_pairs
xor r12d, r12d
lea rax, [rdi+rax*8+8]
mov [rs... | _DWORD * func0(_QWORD *a1, int a2, _QWORD *a3, _DWORD *a4)
{
_QWORD *v4; // rbp
int v5; // r12d
_DWORD *v6; // r15
long long v7; // rsi
_QWORD *v8; // r13
_DWORD *result; // rax
long long v10; // rax
long long v12; // [rsp+8h] [rbp-50h]
_QWORD *v13; // [rsp+10h] [rbp-48h]
if ( a2 <= 0 )
{
v5 ... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RSP],RDX
MOV qword ptr [RSP + 0x18],RCX
TEST ESI,ESI
JLE 0x00101760
LEA EAX,[RSI + -0x1]
MOV RBP,RDI
LEA R14,[0x1014a0]
XOR R12D,R12D
LEA RAX,[RDI + RAX*0x8 + 0x8]
MOV qword ptr [RSP + 0x8],RAX
LEA RAX,[RDX + 0x8]
MOV qword... | void func0(int8 *param_1,int param_2,int8 *param_3,int *param_4)
{
int8 *puVar1;
int iVar2;
int *__base;
char cVar3;
long lVar4;
size_t __nmemb;
int iVar5;
int8 *puVar6;
if (param_2 < 1) {
iVar5 = 0;
}
else {
iVar5 = 0;
puVar1 = param_1 + (ulong)(param_2 - 1) + 1;
LAB_001016b0:
... |
6,463 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <stdbool.h>
typedef struct {
int first;
int second;
} Pair;
typedef Pair* Sublist;
int compare_pairs(const void *a, const void *b) {
Pair pa = *(Pair*)a;
Pair pb = *(Pair*)b;
if (pa.first != pb.first) return (pa.... | void func0(Sublist *test_list, int num_lists, Sublist *result, int *result_size) {
int added = 0;
for (int i = 0; i < num_lists; i++) {
Sublist current = sorted_sublist(test_list[i], sublist_length(test_list[i]));
bool found = false;
for (int j = 0; j < added; j++) {
if... | int main() {
Pair list1[] = {{4, 5}, {3, 2}, {0, 0}};
Pair list2[] = {{2, 2}, {4, 6}, {0, 0}};
Pair list3[] = {{3, 2}, {4, 5}, {0, 0}};
Sublist test_list1[] = {list1, list2, list3};
Sublist result1[3];
int result1_size = 0;
func0(test_list1, 3, result1, &result1_size);
assert(r... | O3 | c | func0:
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x28,%rsp
mov %rcx,0x18(%rsp)
test %esi,%esi
jle 16f5 <func0+0xf5>
lea -0x1(%rsi),%eax
mov %rdx,%r13
mov %rdi,%rbp
xor %r12d,%r12d
lea 0x8(%rdi,%rax,8),%rax
mov %rax,0x8(%rsp)
lea 0x8(%rdx),%rax
m... | func0:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 28h
mov [rsp+58h+var_50], rdx
mov [rsp+58h+var_40], rcx
test esi, esi
jle loc_1731
movsxd rsi, esi
mov rbp, rdi
xor r12d, r12d
lea rax, [rdi+rsi*8]
mov [rsp+58h+var_48], rax
nop word p... | int * func0(void **a1, int a2, void **a3, int *a4)
{
void **v4; // rbp
int v5; // r12d
_DWORD *v6; // r15
size_t v7; // rsi
long long v8; // r14
void **v9; // r13
int *result; // rax
void **v12; // [rsp+10h] [rbp-48h]
if ( a2 <= 0 )
{
v5 = 0;
}
else
{
v4 = a1;
v5 = 0;
v12 = &a... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RSP + 0x8],RDX
MOV qword ptr [RSP + 0x18],RCX
TEST ESI,ESI
JLE 0x00101731
MOVSXD RSI,ESI
MOV RBP,RDI
XOR R12D,R12D
LEA RAX,[RDI + RSI*0x8]
MOV qword ptr [RSP + 0x10],RAX
NOP word ptr CS:[RAX + RAX*0x1]
LAB_00101670:
MOV R15... | void func0(int8 *param_1,int param_2,int8 *param_3,int *param_4)
{
int8 *puVar1;
int iVar2;
int *__base;
char cVar3;
size_t __nmemb;
int iVar4;
int8 *puVar5;
long lVar6;
if (param_2 < 1) {
iVar4 = 0;
}
else {
iVar4 = 0;
puVar1 = param_1 + param_2;
LAB_00101670:
do {
__bas... |
6,464 | func0 |
#include <stdio.h>
#include <regex.h>
#include <assert.h>
#include <string.h>
| char* func0(const char* text) {
regex_t regex;
char* pattern = "\\Bz\\B";
int reti;
// Compile regular expression
reti = regcomp(®ex, pattern, REG_EXTENDED);
if (reti) {
fprintf(stderr, "Could not compile regex\n");
return "Regex compilation error";
}
... | int main() {
assert(strcmp(func0("pythonzabc."), "Found a match!") == 0);
assert(strcmp(func0("xyzabc."), "Found a match!") == 0);
assert(strcmp(func0(" lang ."), "Not matched!") == 0);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0xd0,%rsp
mov %rdi,-0xc8(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
lea 0xdb3(%rip),%rax
mov %rax,-0xb8(%rbp)
mov -0xb8(%rbp),%rcx
lea -0xb0(%rbp),%rax
mov $0x1,%edx
mov %rcx,%rsi
mov %rax,%rdi
callq 10e0 <regcomp@plt>
... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 0D0h
mov [rbp+string], rdi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
lea rax, aBzB; "\\Bz\\B"
mov [rbp+pattern], rax
mov rcx, [rbp+pattern]
lea rax, [rbp+preg]
mov edx, 1; cflags
mov rsi, rcx; pattern
mov rdi, r... | const char * func0(const char *a1)
{
int errcode; // [rsp+14h] [rbp-BCh]
regex_t preg; // [rsp+20h] [rbp-B0h] BYREF
char errbuf[104]; // [rsp+60h] [rbp-70h] BYREF
unsigned long long v5; // [rsp+C8h] [rbp-8h]
v5 = __readfsqword(0x28u);
if ( regcomp(&preg, "\\Bz\\B", 1) )
{
fwrite("Could not compile re... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0xd0
MOV qword ptr [RBP + -0xc8],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
LEA RAX,[0x102008]
MOV qword ptr [RBP + -0xb8],RAX
MOV RCX,qword ptr [RBP + -0xb8]
LEA RAX,[RBP + -0xb0]
MOV EDX,0x1
MOV RSI,RCX
MOV RDI,RAX
CALL 0x001010e0
MOV dword p... | char * func0(char *param_1)
{
int iVar1;
char *pcVar2;
long in_FS_OFFSET;
regex_t local_b8;
char local_78 [104];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
iVar1 = regcomp(&local_b8,"\\Bz\\B",1);
if (iVar1 == 0) {
iVar1 = regexec(&local_b8,param_1,0,(regmatch_t *)0x0,0);
if ... |
6,465 | func0 |
#include <stdio.h>
#include <regex.h>
#include <assert.h>
#include <string.h>
| char* func0(const char* text) {
regex_t regex;
char* pattern = "\\Bz\\B";
int reti;
// Compile regular expression
reti = regcomp(®ex, pattern, REG_EXTENDED);
if (reti) {
fprintf(stderr, "Could not compile regex\n");
return "Regex compilation error";
}
... | int main() {
assert(strcmp(func0("pythonzabc."), "Found a match!") == 0);
assert(strcmp(func0("xyzabc."), "Found a match!") == 0);
assert(strcmp(func0(" lang ."), "Not matched!") == 0);
return 0;
}
| O1 | c | func0:
endbr64
push %rbx
sub $0xb0,%rsp
mov %rdi,%rbx
mov %fs:0x28,%rax
mov %rax,0xa8(%rsp)
xor %eax,%eax
mov %rsp,%rdi
mov $0x1,%edx
lea 0xe14(%rip),%rsi
callq 10d0 <regcomp@plt>
test %eax,%eax
jne 12b5 <func0+0xac>
mov %rsp,%rdi
mov $0x0,%r8d
mov $0x0,%ecx
mov $0x0,%edx
mov... | func0:
endbr64
push rbx
sub rsp, 0B0h
mov rbx, rdi
mov rax, fs:28h
mov [rsp+0B8h+var_10], rax
xor eax, eax
mov rdi, rsp
mov edx, 1
lea rsi, aBzB; "\\Bz\\B"
call _regcomp
test eax, eax
jnz short loc_12D5
mov rdi, rsp
mov r8d, 0
mov ecx, 0
mov edx, 0
mov rs... | const char * func0(long long a1)
{
long long v1; // rdi
const char *result; // rax
_BYTE v3[64]; // [rsp+0h] [rbp-B8h] BYREF
char v4[104]; // [rsp+40h] [rbp-78h] BYREF
unsigned long long v5; // [rsp+A8h] [rbp-10h]
v5 = __readfsqword(0x28u);
if ( (unsigned int)regcomp(v3, "\\Bz\\B", 1LL) )
{
fwrite(... | func0:
ENDBR64
PUSH RBX
SUB RSP,0xb0
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xa8],RAX
XOR EAX,EAX
MOV RDI,RSP
MOV EDX,0x1
LEA RSI,[0x10204e]
CALL 0x001010e0
TEST EAX,EAX
JNZ 0x001012d5
MOV RDI,RSP
MOV R8D,0x0
MOV ECX,0x0
MOV EDX,0x0
MOV RSI,RBX
CALL 0x00101110
MOV EDI,EAX
LEA RAX,[0x10201c]
TEST E... | char * func0(char *param_1)
{
int iVar1;
char *pcVar2;
long in_FS_OFFSET;
regex_t rStack_b8;
char local_78 [104];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
iVar1 = regcomp(&rStack_b8,"\\Bz\\B",1);
if (iVar1 == 0) {
iVar1 = regexec(&rStack_b8,param_1,0,(regmatch_t *)0x0,0);
... |
6,466 | func0 |
#include <stdio.h>
#include <regex.h>
#include <assert.h>
#include <string.h>
| char* func0(const char* text) {
regex_t regex;
char* pattern = "\\Bz\\B";
int reti;
// Compile regular expression
reti = regcomp(®ex, pattern, REG_EXTENDED);
if (reti) {
fprintf(stderr, "Could not compile regex\n");
return "Regex compilation error";
}
... | int main() {
assert(strcmp(func0("pythonzabc."), "Found a match!") == 0);
assert(strcmp(func0("xyzabc."), "Found a match!") == 0);
assert(strcmp(func0(" lang ."), "Not matched!") == 0);
return 0;
}
| O2 | c | func0:
endbr64
push %r13
mov $0x1,%edx
lea 0xd4c(%rip),%rsi
push %r12
push %rbp
mov %rdi,%rbp
sub $0xb0,%rsp
mov %fs:0x28,%rax
mov %rax,0xa8(%rsp)
xor %eax,%eax
mov %rsp,%r12
mov %r12,%rdi
callq 10d0 <regcomp@plt>
test %eax,%eax
jne 13c0 <func0+0xd0>
mov %r12,%rdi
xor %r8d,%... | func0:
endbr64
push r13
mov edx, 1
lea rsi, aBzB; "\\Bz\\B"
push r12
push rbp
mov rbp, rdi
sub rsp, 0B0h
mov rax, fs:28h
mov [rsp+0C8h+var_20], rax
xor eax, eax
mov r12, rsp
mov rdi, r12
call _regcomp
test eax, eax
jnz loc_13D0
mov rdi, r12
xor r8d, r8d
xor... | const char * func0(long long a1)
{
long long v1; // rdi
const char *result; // rax
_BYTE v3[64]; // [rsp+0h] [rbp-C8h] BYREF
char v4[104]; // [rsp+40h] [rbp-88h] BYREF
unsigned long long v5; // [rsp+A8h] [rbp-20h]
v5 = __readfsqword(0x28u);
if ( (unsigned int)regcomp(v3, "\\Bz\\B", 1LL) )
{
fwrite(... | func0:
ENDBR64
PUSH R13
MOV EDX,0x1
LEA RSI,[0x10204e]
PUSH R12
PUSH RBP
MOV RBP,RDI
SUB RSP,0xb0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xa8],RAX
XOR EAX,EAX
MOV R12,RSP
MOV RDI,R12
CALL 0x001010e0
TEST EAX,EAX
JNZ 0x001013d0
MOV RDI,R12
XOR R8D,R8D
XOR ECX,ECX
XOR EDX,EDX
MOV RSI,RBP
CALL 0x00101110
MOV EDI... | char * func0(char *param_1)
{
int iVar1;
char *pcVar2;
long in_FS_OFFSET;
regex_t rStack_c8;
char local_88 [104];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
iVar1 = regcomp(&rStack_c8,"\\Bz\\B",1);
if (iVar1 == 0) {
iVar1 = regexec(&rStack_c8,param_1,0,(regmatch_t *)0x0,0);
... |
6,467 | func0 |
#include <stdio.h>
#include <regex.h>
#include <assert.h>
#include <string.h>
| char* func0(const char* text) {
regex_t regex;
char* pattern = "\\Bz\\B";
int reti;
// Compile regular expression
reti = regcomp(®ex, pattern, REG_EXTENDED);
if (reti) {
fprintf(stderr, "Could not compile regex\n");
return "Regex compilation error";
}
... | int main() {
assert(strcmp(func0("pythonzabc."), "Found a match!") == 0);
assert(strcmp(func0("xyzabc."), "Found a match!") == 0);
assert(strcmp(func0(" lang ."), "Not matched!") == 0);
return 0;
}
| O3 | c | func0:
endbr64
push %r13
mov $0x1,%edx
lea 0xd4c(%rip),%rsi
push %r12
push %rbp
mov %rdi,%rbp
sub $0xb0,%rsp
mov %fs:0x28,%rax
mov %rax,0xa8(%rsp)
xor %eax,%eax
mov %rsp,%r12
mov %r12,%rdi
callq 10d0 <regcomp@plt>
test %eax,%eax
jne 13c0 <func0+0xd0>
mov %r12,%rdi
xor %r8d,%... | func0:
endbr64
push rbp
mov edx, 1; cflags
lea rsi, pattern; "\\Bz\\B"
push rbx
mov rbx, rdi
sub rsp, 0B8h
mov rax, fs:28h
mov [rsp+var_sA8], rax
xor eax, eax
mov rbp, rsp
mov rdi, rbp; preg
call _regcomp
test eax, eax
jnz loc_13C8
mov rdi, rbp; preg
xor r8d, ... | const char * func0(char *string)
{
int v1; // edi
const char *result; // rax
regex_t vars0; // [rsp+0h] [rbp+0h] BYREF
char errbuf[104]; // [rsp+40h] [rbp+40h] BYREF
unsigned long long varsA8; // [rsp+A8h] [rbp+A8h]
varsA8 = __readfsqword(0x28u);
if ( regcomp(&vars0, "\\Bz\\B", 1) )
{
fwrite("Could... | func0:
ENDBR64
PUSH RBP
MOV EDX,0x1
LEA RSI,[0x10204e]
PUSH RBX
MOV RBX,RDI
SUB RSP,0xb8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xa8],RAX
XOR EAX,EAX
MOV RBP,RSP
MOV RDI,RBP
CALL 0x001010e0
TEST EAX,EAX
JNZ 0x001013c8
MOV RDI,RBP
XOR R8D,R8D
XOR ECX,ECX
XOR EDX,EDX
MOV RSI,RBX
CALL 0x00101110
MOV EDI,EAX
LEA ... | char * func0(char *param_1)
{
int iVar1;
char *pcVar2;
long in_FS_OFFSET;
regex_t rStack_c8;
char local_88 [104];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
iVar1 = regcomp(&rStack_c8,"\\Bz\\B",1);
if (iVar1 == 0) {
iVar1 = regexec(&rStack_c8,param_1,0,(regmatch_t *)0x0,0);
... |
6,468 | func0 |
#include <stdio.h>
#include <assert.h>
| void func0(int input[], int n, int k, int output[]) {
int i, j;
for (i = 0, j = k - 1; i < k; i++, j--) {
output[i] = input[j];
}
for (i = k; i < n; i++) {
output[i] = input[i];
}
}
| int main() {
int output1[6], output2[4], output3[5];
int arr1[] = {1, 2, 3, 4, 5, 6};
int arr2[] = {4, 5, 6, 7};
int arr3[] = {9, 8, 7, 6, 5};
func0(arr1, 6, 4, output1);
assert(output1[0] == 4 && output1[1] == 3 && output1[2] == 2 && output1[3] == 1 && output1[4] == 5 && output1[5] == 6... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
mov %edx,-0x20(%rbp)
mov %rcx,-0x28(%rbp)
movl $0x0,-0x8(%rbp)
mov -0x20(%rbp),%eax
sub $0x1,%eax
mov %eax,-0x4(%rbp)
jmp 11c6 <func0+0x5d>
mov -0x4(%rbp),%eax
cltq
lea 0x0(,%rax,4),%rdx
mov -0x18(%r... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_20], edx
mov [rbp+var_28], rcx
mov [rbp+var_8], 0
mov eax, [rbp+var_20]
sub eax, 1
mov [rbp+var_4], eax
jmp short loc_11C6
loc_1191:
mov eax, [rbp+var_4]
cdqe
lea rdx, ds:0[ra... | long long func0(long long a1, int a2, signed int a3, long long a4)
{
long long result; // rax
int v5; // [rsp+20h] [rbp-8h]
unsigned int i; // [rsp+20h] [rbp-8h]
int v7; // [rsp+24h] [rbp-4h]
v5 = 0;
v7 = a3 - 1;
while ( v5 < a3 )
*(_DWORD *)(4LL * v5++ + a4) = *(_DWORD *)(4LL * v7-- + a1);
for ( ... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0x20],EDX
MOV qword ptr [RBP + -0x28],RCX
MOV dword ptr [RBP + -0x8],0x0
MOV EAX,dword ptr [RBP + -0x20]
SUB EAX,0x1
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001011c6
LAB_00101191:
MOV EAX,dword ptr [RB... | void func0(long param_1,int param_2,int param_3,long param_4)
{
int iVar1;
int4 local_10;
int4 local_c;
local_c = param_3 + -1;
for (local_10 = 0; iVar1 = param_3, local_10 < param_3; local_10 = local_10 + 1) {
*(int4 *)(param_4 + (long)local_10 * 4) = *(int4 *)(param_1 + (long)local_c * 4);
local... |
6,469 | func0 |
#include <stdio.h>
#include <assert.h>
| void func0(int input[], int n, int k, int output[]) {
int i, j;
for (i = 0, j = k - 1; i < k; i++, j--) {
output[i] = input[j];
}
for (i = k; i < n; i++) {
output[i] = input[i];
}
}
| int main() {
int output1[6], output2[4], output3[5];
int arr1[] = {1, 2, 3, 4, 5, 6};
int arr2[] = {4, 5, 6, 7};
int arr3[] = {9, 8, 7, 6, 5};
func0(arr1, 6, 4, output1);
assert(output1[0] == 4 && output1[1] == 3 && output1[2] == 2 && output1[3] == 1 && output1[4] == 5 && output1[5] == 6... | O1 | c | func0:
endbr64
lea -0x1(%rdx),%eax
test %edx,%edx
jle 1199 <func0+0x30>
cltq
lea (%rdi,%rax,4),%r8
mov %rcx,%rax
lea -0x1(%rdx),%r9d
lea 0x4(%rcx,%r9,4),%r10
mov (%r8),%r9d
mov %r9d,(%rax)
sub $0x4,%r8
add $0x4,%rax
cmp %r10,%rax
jne 1186 <func0+0x1d>
cmp %esi,%edx
jge 11ae <... | func0:
endbr64
mov r9, rdi
mov r8d, esi
lea eax, [rdx-1]
test edx, edx
jle short loc_119C
cdqe
lea rsi, [rdi+rax*4]
mov rax, rcx
lea edi, [rdx-1]
lea r10, [rcx+rdi*4+4]
loc_118B:
mov edi, [rsi]
mov [rax], edi
sub rsi, 4
add rax, 4
cmp rax, r10
jnz short loc_118... | unsigned long long func0(long long a1, int a2, long long a3, _DWORD *a4)
{
unsigned long long result; // rax
_DWORD *v6; // rsi
result = (unsigned int)(a3 - 1);
if ( (int)a3 > 0 )
{
v6 = (_DWORD *)(a1 + 4LL * (int)result);
result = (unsigned long long)a4;
do
{
*(_DWORD *)result = *v6--... | func0:
ENDBR64
MOV R9,RDI
MOV R8D,ESI
LEA EAX,[RDX + -0x1]
TEST EDX,EDX
JLE 0x0010119c
CDQE
LEA RSI,[RDI + RAX*0x4]
MOV RAX,RCX
LEA EDI,[RDX + -0x1]
LEA R10,[RCX + RDI*0x4 + 0x4]
LAB_0010118b:
MOV EDI,dword ptr [RSI]
MOV dword ptr [RAX],EDI
SUB RSI,0x4
ADD RAX,0x4
CMP RAX,R10
JNZ 0x0010118b
LAB_0010119c:
CMP EDX,R8D
JG... | void func0(long param_1,int param_2,int param_3,int4 *param_4)
{
int4 *puVar1;
long lVar2;
int4 *puVar3;
if (0 < param_3) {
puVar3 = (int4 *)(param_1 + (long)(param_3 + -1) * 4);
puVar1 = param_4;
do {
*puVar1 = *puVar3;
puVar3 = puVar3 + -1;
puVar1 = puVar1 + 1;
} while (p... |
6,470 | func0 |
#include <stdio.h>
#include <assert.h>
| void func0(int input[], int n, int k, int output[]) {
int i, j;
for (i = 0, j = k - 1; i < k; i++, j--) {
output[i] = input[j];
}
for (i = k; i < n; i++) {
output[i] = input[i];
}
}
| int main() {
int output1[6], output2[4], output3[5];
int arr1[] = {1, 2, 3, 4, 5, 6};
int arr2[] = {4, 5, 6, 7};
int arr3[] = {9, 8, 7, 6, 5};
func0(arr1, 6, 4, output1);
assert(output1[0] == 4 && output1[1] == 3 && output1[2] == 2 && output1[3] == 1 && output1[4] == 5 && output1[5] == 6... | O2 | c | func0:
endbr64
lea -0x1(%rdx),%r9d
test %edx,%edx
jle 1174 <func0+0x34>
movslq %r9d,%rax
mov %r9d,%r9d
lea (%rdi,%rax,4),%r8
lea 0x4(%rcx,%r9,4),%r10
mov %rcx,%rax
xchg %ax,%ax
mov (%r8),%r9d
add $0x4,%rax
sub $0x4,%r8
mov %r9d,-0x4(%rax)
cmp %r10,%rax
jne 1160 <func0+0x20>
cmp ... | func0:
endbr64
mov r9, rdi
mov r8d, esi
lea edi, [rdx-1]
test edx, edx
jle short loc_13AA
movsxd rax, edi
mov edi, edi
lea rsi, [r9+rax*4]
lea r10, [rcx+rdi*4+4]
mov rax, rcx
nop word ptr [rax+rax+00h]
loc_1398:
mov edi, [rsi]
add rax, 4
sub rsi, 4
mov [rax-4], ed... | void func0(long long a1, int a2, long long a3, long long a4)
{
unsigned int v6; // edi
int *v7; // rsi
long long v8; // r10
long long v9; // rax
int v10; // edi
v6 = a3 - 1;
if ( (int)a3 > 0 )
{
v7 = (int *)(a1 + 4LL * (int)v6);
v8 = a4 + 4LL * v6 + 4;
v9 = a4;
do
{
v10 = *v7... | func0:
ENDBR64
MOV R9,RDI
MOV R8D,ESI
LEA EDI,[RDX + -0x1]
TEST EDX,EDX
JLE 0x001013aa
MOVSXD RAX,EDI
MOV EDI,EDI
LEA RSI,[R9 + RAX*0x4]
LEA R10,[RCX + RDI*0x4 + 0x4]
MOV RAX,RCX
NOP word ptr [RAX + RAX*0x1]
LAB_00101398:
MOV EDI,dword ptr [RSI]
ADD RAX,0x4
SUB RSI,0x4
MOV dword ptr [RAX + -0x4],EDI
CMP RAX,R10
JNZ 0x0... | void func0(long param_1,int param_2,int param_3,int4 *param_4)
{
int4 uVar1;
int4 *puVar2;
int4 *puVar3;
long lVar4;
int4 *puVar5;
if (0 < param_3) {
puVar5 = (int4 *)(param_1 + (long)(int)(param_3 - 1U) * 4);
puVar2 = param_4;
do {
uVar1 = *puVar5;
puVar3 = puVar2 + 1;
puV... |
6,471 | func0 |
#include <stdio.h>
#include <assert.h>
| void func0(int input[], int n, int k, int output[]) {
int i, j;
for (i = 0, j = k - 1; i < k; i++, j--) {
output[i] = input[j];
}
for (i = k; i < n; i++) {
output[i] = input[i];
}
}
| int main() {
int output1[6], output2[4], output3[5];
int arr1[] = {1, 2, 3, 4, 5, 6};
int arr2[] = {4, 5, 6, 7};
int arr3[] = {9, 8, 7, 6, 5};
func0(arr1, 6, 4, output1);
assert(output1[0] == 4 && output1[1] == 3 && output1[2] == 2 && output1[3] == 1 && output1[4] == 5 && output1[5] == 6... | O3 | c | func0:
endbr64
lea -0x1(%rdx),%r9d
test %edx,%edx
jle 1222 <func0+0xe2>
movslq %r9d,%rax
movslq %edx,%r8
lea (%rcx,%r8,4),%r11
lea 0x4(,%rax,4),%r10
neg %r8
shl $0x2,%rax
lea 0x4(%rax,%r8,4),%r8
add %rdi,%r8
cmp %r8,%r11
lea (%rdi,%r10,1),%r8
setbe %r11b
cmp %r8,%rcx
setae %r8b
or ... | func0:
endbr64
mov r8d, esi
mov esi, edx
test edx, edx
jle short loc_11A4
sub edx, 1
cmp edx, 2
jbe short loc_1176
movsxd rax, esi
shl rax, 2
lea r9, [rcx+rax]
cmp rdi, r9
jnb loc_1270
lea r9, [rdi+rax]
cmp rcx, r9
jnb loc_1270
loc_1176:
movsxd rdx, edx
mov r... | void func0(unsigned long long a1, int a2, int a3, unsigned long long a4)
{
unsigned int v6; // edx
long long v7; // rax
unsigned long long v8; // rax
long long v9; // r9
int *v10; // rdx
long long v11; // r10
int v12; // r9d
unsigned int v13; // r11d
long long v14; // rax
long long v15; // rdx
un... | func0:
ENDBR64
MOV R8D,ESI
MOV ESI,EDX
TEST EDX,EDX
JLE 0x001011a4
SUB EDX,0x1
CMP EDX,0x2
JBE 0x00101176
MOVSXD RAX,ESI
SHL RAX,0x2
LEA R9,[RCX + RAX*0x1]
CMP RDI,R9
JNC 0x00101270
LEA R9,[RDI + RAX*0x1]
CMP RCX,R9
JNC 0x00101270
LAB_00101176:
MOVSXD RDX,EDX
MOV RAX,RCX
LEA R9,[RDX*0x4]
LEA RDX,[RDI + R9*0x1]
LEA R10,... | void func0(int4 *param_1,int param_2,uint param_3,int4 *param_4)
{
int iVar1;
int8 *puVar2;
int8 *puVar3;
int4 uVar4;
int4 uVar5;
int4 uVar6;
int4 *puVar7;
int8 uVar8;
int iVar9;
uint uVar10;
int4 *puVar11;
int4 *puVar12;
long lVar13;
int4 *puVar14;
long lVar15;
uint uVar16;
if (0 ... |
6,472 | func0 | #include <assert.h>
int get_product(int val[], int n) {
int res = 1;
for (int i = 0; i < n; i++) {
res *= val[i];
}
return res;
}
| int func0(int test_list[][3], int rows, int K) {
int temp[rows];
for (int i = 0; i < rows; i++) {
temp[i] = test_list[i][K];
}
return get_product(temp, rows);
}
| int main() {
int test_list1[3][3] = {{5, 6, 7}, {1, 3, 5}, {8, 9, 19}};
assert(func0(test_list1, 3, 2) == 665);
int test_list2[3][3] = {{6, 7, 8}, {2, 4, 6}, {9, 10, 20}};
assert(func0(test_list2, 3, 1) == 280);
int test_list3[3][3] = {{7, 8, 9}, {3, 5, 7}, {10, 11, 21}};
asser... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x38,%rsp
mov %rdi,-0x38(%rbp)
mov %esi,-0x3c(%rbp)
mov %edx,-0x40(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov %rsp,%rax
mov %rax,%rbx
mov -0x3c(%rbp),%eax
movslq %eax,%rdx
sub $0x1,%rdx
mov %rdx,-0x28(%r... | func0:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 38h
mov [rbp+var_38], rdi
mov [rbp+var_3C], esi
mov [rbp+var_40], edx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, rsp
mov rbx, rax
mov eax, [rbp+var_3C]
movsxd rdx, eax
sub rdx, 1
mov [rbp+v... | long long func0(long long a1, unsigned int a2, int a3)
{
unsigned long long v3; // rax
void *v4; // rsp
int v6; // [rsp+8h] [rbp-40h] BYREF
unsigned int v7; // [rsp+Ch] [rbp-3Ch]
long long v8; // [rsp+10h] [rbp-38h]
int i; // [rsp+1Ch] [rbp-2Ch]
long long v10; // [rsp+20h] [rbp-28h]
int *v11; // [rsp+2... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x38],RDI
MOV dword ptr [RBP + -0x3c],ESI
MOV dword ptr [RBP + -0x40],EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,RSP
MOV RBX,RAX
MOV EAX,dword ptr [RBP + -0x3c]
MOVSXD RDX,EAX
SUB RDX,0x1
MOV qword p... | void func0(long param_1,int param_2,int param_3)
{
long lVar1;
int iVar2;
ulong uVar3;
int *piVar4;
long in_FS_OFFSET;
int local_48;
int local_44;
long local_40;
int local_34;
long local_30;
int *local_28;
long local_20;
local_40 = param_1;
local_44 = param_2;
local_48 = param_3;
loc... |
6,473 | func0 | #include <assert.h>
int get_product(int val[], int n) {
int res = 1;
for (int i = 0; i < n; i++) {
res *= val[i];
}
return res;
}
| int func0(int test_list[][3], int rows, int K) {
int temp[rows];
for (int i = 0; i < rows; i++) {
temp[i] = test_list[i][K];
}
return get_product(temp, rows);
}
| int main() {
int test_list1[3][3] = {{5, 6, 7}, {1, 3, 5}, {8, 9, 19}};
assert(func0(test_list1, 3, 2) == 665);
int test_list2[3][3] = {{6, 7, 8}, {2, 4, 6}, {9, 10, 20}};
assert(func0(test_list2, 3, 1) == 280);
int test_list3[3][3] = {{7, 8, 9}, {3, 5, 7}, {10, 11, 21}};
asser... | O1 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x10,%rsp
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
movslq %esi,%rax
lea 0xf(,%rax,4),%rax
mov %rax,%rcx
and $0xfffffffffffffff0,%rcx
and $0xfffffffffffff000,%rax
mov %rsp,%r9
sub %rax,%r9
mov %r9,%rax
cmp %rax,%rsp
je 11... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 10h
mov r9, rdi
mov edi, esi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
movsxd rax, esi
lea rax, ds:0Fh[rax*4]
mov rsi, rax
and rsi, 0FFFFFFFFFFFFFFF0h
and rax, 0FFFFFFFFFFFFF000h
mov rcx, rsp
sub rcx, rax
loc_1... | long long func0(long long a1, int a2, int a3)
{
long long v5; // rax
__int16 v6; // si
signed long long v7; // rax
void *v8; // rsp
_DWORD *v9; // rdx
_DWORD *v10; // rax
_DWORD v13[2]; // [rsp+8h] [rbp-10h] BYREF
unsigned long long v14; // [rsp+10h] [rbp-8h]
v14 = __readfsqword(0x28u);
v5 = 4LL *... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV R9,RDI
MOV EDI,ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOVSXD RAX,ESI
LEA RAX,[0xf + RAX*0x4]
MOV RSI,RAX
AND RSI,-0x10
AND RAX,-0x1000
MOV RCX,RSP
SUB RCX,RAX
LAB_001011d5:
CMP RSP,RCX
JZ 0x001011ec
SUB RSP,0x1000
OR qword ptr [RSP... | void func0(long param_1,uint param_2,int param_3)
{
long lVar1;
ulong uVar2;
int4 *puVar3;
int4 *puVar4;
int1 *puVar5;
long in_FS_OFFSET;
int1 auStack_18 [8];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
uVar2 = (long)(int)param_2 * 4 + 0xf;
for (puVar5 = auStack_18; puVar5 != auS... |
6,474 | func0 | #include <assert.h>
int get_product(int val[], int n) {
int res = 1;
for (int i = 0; i < n; i++) {
res *= val[i];
}
return res;
}
| int func0(int test_list[][3], int rows, int K) {
int temp[rows];
for (int i = 0; i < rows; i++) {
temp[i] = test_list[i][K];
}
return get_product(temp, rows);
}
| int main() {
int test_list1[3][3] = {{5, 6, 7}, {1, 3, 5}, {8, 9, 19}};
assert(func0(test_list1, 3, 2) == 665);
int test_list2[3][3] = {{6, 7, 8}, {2, 4, 6}, {9, 10, 20}};
assert(func0(test_list2, 3, 1) == 280);
int test_list3[3][3] = {{7, 8, 9}, {3, 5, 7}, {10, 11, 21}};
asser... | O2 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x10,%rsp
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
movslq %esi,%rax
mov %rsp,%r9
lea 0xf(,%rax,4),%rax
mov %rax,%rcx
and $0xfffffffffffff000,%rax
sub %rax,%r9
and $0xfffffffffffffff0,%rcx
mov %r9,%rax
cmp %rax,%rsp
je 11... | func0:
endbr64
push rbp
mov rcx, rdi
mov rbp, rsp
sub rsp, 10h
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
movsxd rax, esi
mov r8, rsp
lea rax, ds:0Fh[rax*4]
mov rdi, rax
and rax, 0FFFFFFFFFFFFF000h
sub r8, rax
and rdi, 0FFFFFFFFFFFFFFF0h
cmp rsp, r8
jz ... | long long func0(long long a1, int a2, int a3)
{
long long v4; // rdi
_DWORD *v5; // r8
__int16 v6; // di
signed long long v7; // rdi
void *v8; // rsp
_DWORD *v9; // rax
int *v10; // rcx
_DWORD *v11; // rsi
_DWORD *v12; // rdx
int v13; // edi
unsigned int v14; // r8d
_DWORD v17[1022]; // [rsp+8h... | func0:
ENDBR64
PUSH RBP
MOV RCX,RDI
MOV RBP,RSP
SUB RSP,0x10
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOVSXD RAX,ESI
MOV R8,RSP
LEA RAX,[0xf + RAX*0x4]
MOV RDI,RAX
AND RAX,-0x1000
SUB R8,RAX
AND RDI,-0x10
CMP RSP,R8
JZ 0x001013b6
LAB_001013a1:
SUB RSP,0x1000
OR qword ptr [RSP + 0xff8],0x0
... | int func0(long param_1,uint param_2,int param_3)
{
long lVar1;
int1 *puVar2;
int *piVar3;
int *piVar4;
int *piVar5;
int *piVar6;
int1 *puVar7;
ulong uVar9;
int iVar10;
long in_FS_OFFSET;
int1 auStack_18 [8];
long local_10;
int1 *puVar8;
puVar7 = auStack_18;
local_10 = *(long *)(in_FS_O... |
6,475 | func0 | #include <assert.h>
int get_product(int val[], int n) {
int res = 1;
for (int i = 0; i < n; i++) {
res *= val[i];
}
return res;
}
| int func0(int test_list[][3], int rows, int K) {
int temp[rows];
for (int i = 0; i < rows; i++) {
temp[i] = test_list[i][K];
}
return get_product(temp, rows);
}
| int main() {
int test_list1[3][3] = {{5, 6, 7}, {1, 3, 5}, {8, 9, 19}};
assert(func0(test_list1, 3, 2) == 665);
int test_list2[3][3] = {{6, 7, 8}, {2, 4, 6}, {9, 10, 20}};
assert(func0(test_list2, 3, 1) == 280);
int test_list3[3][3] = {{7, 8, 9}, {3, 5, 7}, {10, 11, 21}};
asser... | O3 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x10,%rsp
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
movslq %esi,%rax
mov %rsp,%r11
lea 0xf(,%rax,4),%rax
mov %rax,%rcx
and $0xfffffffffffff000,%rax
sub %rax,%r11
and $0xfffffffffffffff0,%rcx
mov %r11,%rax
cmp %rax,%rsp
je ... | func0:
endbr64
push rbp
mov r9, rdi
mov ecx, esi
mov rbp, rsp
sub rsp, 10h
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
movsxd rax, esi
mov rdi, rsp
lea rax, ds:0Fh[rax*4]
mov rsi, rax
and rax, 0FFFFFFFFFFFFF000h
sub rdi, rax
and rsi, 0FFFFFFFFFFFFFFF0h
cmp ... | long long func0(long long a1, int a2, int a3)
{
long long v5; // rsi
_DWORD *v6; // rdi
__int16 v7; // si
signed long long v8; // rsi
void *v9; // rsp
unsigned int v10; // r10d
long long v11; // r8
__m128 *v12; // rdx
const __m128i *v13; // rax
__m128 v14; // xmm3
__m128 v15; // xmm1
__m128 v16... | func0:
ENDBR64
PUSH RBP
MOV R9,RDI
MOV ECX,ESI
MOV RBP,RSP
SUB RSP,0x10
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOVSXD RAX,ESI
MOV RDI,RSP
LEA RAX,[0xf + RAX*0x4]
MOV RSI,RAX
AND RAX,-0x1000
SUB RDI,RAX
AND RSI,-0x10
CMP RSP,RDI
JZ 0x001012c8
LAB_001012b3:
SUB RSP,0x1000
OR qword ptr [RSP... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
ulong func0(long param_1,ulong param_2,int param_3)
{
long lVar1;
int4 uVar2;
ulong *puVar3;
ulong *puVar4;
int *puVar5;
uint uVar6;
int4 *puVar7;
ulong *puVar8;
long lVar9;
long lVar10;
int iVar11;
int4 *puVa... |
6,476 | func0 | #include <assert.h>
#include <math.h>
| int func0(int N, int K) {
int No = 0;
No = (N - K + 1);
No = pow(No, 3);
return No;
}
| int main() {
assert(func0(2, 1) == 8);
assert(func0(5, 2) == 64);
assert(func0(1, 1) == 1);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %edi,-0x14(%rbp)
mov %esi,-0x18(%rbp)
movl $0x0,-0x4(%rbp)
mov -0x14(%rbp),%eax
sub -0x18(%rbp),%eax
add $0x1,%eax
mov %eax,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd 0xee5(%rip),%xmm1
callq 1060 <pow@plt>
cvttsd2si %xmm0,%eax
mov ... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_14], edi
mov [rbp+var_18], esi
mov [rbp+var_4], 0
mov eax, [rbp+var_14]
sub eax, [rbp+var_18]
add eax, 1
mov [rbp+var_4], eax
pxor xmm2, xmm2
cvtsi2sd xmm2, [rbp+var_4]
movq rax, xmm2
movsd xmm0, cs:y
movapd x... | long long func0(int a1, int a2)
{
return (unsigned int)(int)pow((double)(a1 - a2 + 1), 3.0);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x18],ESI
MOV dword ptr [RBP + -0x4],0x0
MOV EAX,dword ptr [RBP + -0x14]
SUB EAX,dword ptr [RBP + -0x18]
ADD EAX,0x1
MOV dword ptr [RBP + -0x4],EAX
PXOR XMM2,XMM2
CVTSI2SD XMM2,dword ptr [RBP + -0x4]
MOVQ RAX,XMM2
MOV... | int func0(int param_1,int param_2)
{
double dVar1;
dVar1 = pow((double)((param_1 - param_2) + 1),DAT_00102060);
return (int)dVar1;
} |
6,477 | func0 | #include <assert.h>
#include <math.h>
| int func0(int N, int K) {
int No = 0;
No = (N - K + 1);
No = pow(No, 3);
return No;
}
| int main() {
assert(func0(2, 1) == 8);
assert(func0(5, 2) == 64);
assert(func0(1, 1) == 1);
return 0;
}
| O1 | c | func0:
endbr64
sub $0x8,%rsp
sub %esi,%edi
add $0x1,%edi
pxor %xmm0,%xmm0
cvtsi2sd %edi,%xmm0
movsd 0xefa(%rip),%xmm1
callq 1060 <pow@plt>
cvttsd2si %xmm0,%eax
add $0x8,%rsp
retq
| func0:
endbr64
sub rsp, 8
sub edi, esi
add edi, 1
pxor xmm0, xmm0
cvtsi2sd xmm0, edi
movsd xmm1, cs:qword_2060
call _pow
cvttsd2si eax, xmm0
add rsp, 8
retn | long long func0(int a1, int a2)
{
return (unsigned int)(int)pow((double)(a1 - a2 + 1), 3.0);
} | func0:
ENDBR64
SUB RSP,0x8
SUB EDI,ESI
ADD EDI,0x1
PXOR XMM0,XMM0
CVTSI2SD XMM0,EDI
MOVSD XMM1,qword ptr [0x00102060]
CALL 0x00101060
CVTTSD2SI EAX,XMM0
ADD RSP,0x8
RET | int func0(int param_1,int param_2)
{
double dVar1;
dVar1 = pow((double)((param_1 - param_2) + 1),DAT_00102060);
return (int)dVar1;
} |
6,478 | func0 | #include <assert.h>
#include <math.h>
| int func0(int N, int K) {
int No = 0;
No = (N - K + 1);
No = pow(No, 3);
return No;
}
| int main() {
assert(func0(2, 1) == 8);
assert(func0(5, 2) == 64);
assert(func0(1, 1) == 1);
return 0;
}
| O2 | c | func0:
endbr64
sub %esi,%edi
pxor %xmm0,%xmm0
sub $0x8,%rsp
movsd 0xe92(%rip),%xmm1
add $0x1,%edi
cvtsi2sd %edi,%xmm0
callq 1050 <pow@plt>
add $0x8,%rsp
cvttsd2si %xmm0,%eax
retq
nopl 0x0(%rax,%rax,1)
| func0:
endbr64
sub edi, esi
pxor xmm0, xmm0
sub rsp, 8
movsd xmm1, cs:qword_2008
add edi, 1
cvtsi2sd xmm0, edi
call _pow
add rsp, 8
cvttsd2si eax, xmm0
retn | long long func0(int a1, int a2)
{
return (unsigned int)(int)pow((double)(a1 - a2 + 1), 3.0);
} | func0:
ENDBR64
SUB EDI,ESI
PXOR XMM0,XMM0
SUB RSP,0x8
MOVSD XMM1,qword ptr [0x00102008]
ADD EDI,0x1
CVTSI2SD XMM0,EDI
CALL 0x00101050
ADD RSP,0x8
CVTTSD2SI EAX,XMM0
RET | int func0(int param_1,int param_2)
{
double dVar1;
dVar1 = pow((double)((param_1 - param_2) + 1),DAT_00102008);
return (int)dVar1;
} |
6,479 | func0 | #include <assert.h>
#include <math.h>
| int func0(int N, int K) {
int No = 0;
No = (N - K + 1);
No = pow(No, 3);
return No;
}
| int main() {
assert(func0(2, 1) == 8);
assert(func0(5, 2) == 64);
assert(func0(1, 1) == 1);
return 0;
}
| O3 | c | func0:
endbr64
sub %esi,%edi
pxor %xmm0,%xmm0
sub $0x8,%rsp
movsd 0xe92(%rip),%xmm1
add $0x1,%edi
cvtsi2sd %edi,%xmm0
callq 1050 <pow@plt>
add $0x8,%rsp
cvttsd2si %xmm0,%eax
retq
nopl 0x0(%rax,%rax,1)
| func0:
endbr64
sub edi, esi
pxor xmm0, xmm0
sub rsp, 8
movsd xmm1, cs:y; y
add edi, 1
cvtsi2sd xmm0, edi; x
call _pow
add rsp, 8
cvttsd2si eax, xmm0
retn | long long func0(int a1, int a2)
{
return (unsigned int)(int)pow((double)(a1 - a2 + 1), 3.0);
} | func0:
ENDBR64
SUB EDI,ESI
PXOR XMM0,XMM0
SUB RSP,0x8
MOVSD XMM1,qword ptr [0x00102008]
ADD EDI,0x1
CVTSI2SD XMM0,EDI
CALL 0x00101050
ADD RSP,0x8
CVTTSD2SI EAX,XMM0
RET | int func0(int param_1,int param_2)
{
double dVar1;
dVar1 = pow((double)((param_1 - param_2) + 1),DAT_00102008);
return (int)dVar1;
} |
6,480 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <ctype.h>
| char** func0(const char* text, int* count) {
int len = strlen(text);
char** result = malloc(len * sizeof(char*));
if (result == NULL) {
perror("Failed to allocate memory");
exit(EXIT_FAILURE);
}
int current_word = 0;
int start = 0;
for (int i = 1; i <= len; i++... | int main() {
int count = 0;
char** result;
result = func0("PythonProgramLanguage", &count);
assert(count == 3);
assert(strcmp(result[0], "Python") == 0);
assert(strcmp(result[1], "Program") == 0);
assert(strcmp(result[2], "Language") == 0);
for (int i = 0; i < count; i++) free(... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x38,%rsp
mov %rdi,-0x38(%rbp)
mov %rsi,-0x40(%rbp)
mov -0x38(%rbp),%rax
mov %rax,%rdi
callq 10f0 <strlen@plt>
mov %eax,-0x20(%rbp)
mov -0x20(%rbp),%eax
cltq
shl $0x3,%rax
mov %rax,%rdi
callq 1140 <malloc@plt>
mov %rax,-0x18(%r... | func0:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 38h
mov [rbp+s], rdi
mov [rbp+var_40], rsi
mov rax, [rbp+s]
mov rdi, rax; s
call _strlen
mov [rbp+var_20], eax
mov eax, [rbp+var_20]
cdqe
shl rax, 3
mov rdi, rax; size
call _malloc
mov [rbp+var_18], rax
cmp ... | _QWORD * func0(const char *a1, _DWORD *a2)
{
int v3; // [rsp+14h] [rbp-2Ch]
int v4; // [rsp+18h] [rbp-28h]
int i; // [rsp+1Ch] [rbp-24h]
int v6; // [rsp+20h] [rbp-20h]
int v7; // [rsp+24h] [rbp-1Ch]
_QWORD *v8; // [rsp+28h] [rbp-18h]
v6 = strlen(a1);
v8 = malloc(8LL * v6);
if ( !v8 )
{
perror("... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x38],RDI
MOV qword ptr [RBP + -0x40],RSI
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,RAX
CALL 0x001010f0
MOV dword ptr [RBP + -0x20],EAX
MOV EAX,dword ptr [RBP + -0x20]
CDQE
SHL RAX,0x3
MOV RDI,RAX
CALL 0x00101140
MOV qword ptr [RBP + -0x18],R... | void * func0(char *param_1,int *param_2)
{
int iVar1;
size_t sVar2;
void *pvVar3;
ushort **ppuVar4;
void *pvVar5;
int local_34;
int local_30;
int local_2c;
sVar2 = strlen(param_1);
pvVar3 = malloc((long)(int)sVar2 << 3);
if (pvVar3 == (void *)0x0) {
perror("Failed to allocate memory");
... |
6,481 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <ctype.h>
| char** func0(const char* text, int* count) {
int len = strlen(text);
char** result = malloc(len * sizeof(char*));
if (result == NULL) {
perror("Failed to allocate memory");
exit(EXIT_FAILURE);
}
int current_word = 0;
int start = 0;
for (int i = 1; i <= len; i++... | int main() {
int count = 0;
char** result;
result = func0("PythonProgramLanguage", &count);
assert(count == 3);
assert(strcmp(result[0], "Python") == 0);
assert(strcmp(result[1], "Program") == 0);
assert(strcmp(result[2], "Language") == 0);
for (int i = 0; i < count; i++) free(... | O1 | c | func0:
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x28,%rsp
mov %rdi,%r14
mov %rsi,0x18(%rsp)
mov $0xffffffffffffffff,%rcx
mov $0x0,%eax
repnz scas %es:(%rdi),%al
not %rcx
lea -0x1(%rcx),%rbx
mov %ebx,0xc(%rsp)
movslq %ebx,%rdi
shl $0x3,%rdi
callq 11... | func0:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 28h
mov [rsp+58h+var_58], rdi
mov [rsp+58h+var_40], rsi
call _strlen
mov rbx, rax
mov [rsp+58h+var_4C], eax
movsxd rdi, eax
shl rdi, 3
call _malloc
mov [rsp+58h+var_48], rax
test rax, ra... | long long func0(long long a1, _DWORD *a2)
{
int v2; // ebx
int v3; // r14d
_QWORD *v4; // r15
long long v5; // rbx
int v6; // r12d
long long v7; // rbp
char v8; // al
int v10; // [rsp+8h] [rbp-50h]
int v11; // [rsp+Ch] [rbp-4Ch]
long long v12; // [rsp+10h] [rbp-48h]
v2 = strlen();
v11 = v2;
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RSP],RDI
MOV qword ptr [RSP + 0x18],RSI
CALL 0x001010f0
MOV RBX,RAX
MOV dword ptr [RSP + 0xc],EAX
MOVSXD RDI,EAX
SHL RDI,0x3
CALL 0x00101140
MOV qword ptr [RSP + 0x10],RAX
TEST RAX,RAX
JZ 0x001012d1
MOV R14D,0x0
TEST EBX,EB... | void * func0(char *param_1,int *param_2)
{
int iVar1;
size_t sVar2;
void *pvVar3;
ushort **ppuVar4;
void *__dest;
long lVar5;
int iVar6;
int iVar7;
int local_50;
sVar2 = strlen(param_1);
iVar1 = (int)sVar2;
pvVar3 = malloc((long)iVar1 << 3);
if (pvVar3 == (void *)0x0) {
perror("Failed ... |
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.