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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
5,682 | func0 | #include <assert.h>
#include <stdio.h>
| int* func0(int nums[], int size) {
static int cubes[100];
for (int i = 0; i < size; i++) {
cubes[i] = nums[i] * nums[i] * nums[i];
}
return cubes;
}
| int main() {
int arr1[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
int expected1[] = {1, 8, 27, 64, 125, 216, 343, 512, 729, 1000};
int* result1 = func0(arr1, 10);
for (int i = 0; i < 10; i++) {
assert(result1[i] == expected1[i]);
}
int arr2[] = {10, 20, 30};
int expected2[] = ... | O2 | c | func0:
endbr64
test %esi,%esi
jle 1322 <func0+0x32>
lea -0x1(%rsi),%r8d
xor %eax,%eax
lea 0x2d3b(%rip),%rsi
nopl (%rax)
mov (%rdi,%rax,4),%ecx
mov %ecx,%edx
imul %ecx,%edx
imul %ecx,%edx
mov %edx,(%rsi,%rax,4)
mov %rax,%rdx
add $0x1,%rax
cmp %rdx,%r8
jne 1308 <func0+0x18>
lea ... | func0:
endbr64
lea r8, cubes_1
test esi, esi
jle short loc_1320
movsxd rsi, esi
xor eax, eax
nop dword ptr [rax+00h]
loc_1308:
mov ecx, [rdi+rax*4]
mov edx, ecx
imul edx, ecx
imul edx, ecx
mov [r8+rax*4], edx
add rax, 1
cmp rsi, rax
jnz short loc_1308
loc_1320:
mov ... | _DWORD * func0(long long a1, int a2)
{
long long i; // rax
if ( a2 > 0 )
{
for ( i = 0LL; i != a2; ++i )
cubes_1[i] = *(_DWORD *)(a1 + 4 * i) * *(_DWORD *)(a1 + 4 * i) * *(_DWORD *)(a1 + 4 * i);
}
return cubes_1;
} | func0:
ENDBR64
LEA R8,[0x104040]
TEST ESI,ESI
JLE 0x00101320
MOVSXD RSI,ESI
XOR EAX,EAX
NOP dword ptr [RAX]
LAB_00101308:
MOV ECX,dword ptr [RDI + RAX*0x4]
MOV EDX,ECX
IMUL EDX,ECX
IMUL EDX,ECX
MOV dword ptr [R8 + RAX*0x4],EDX
ADD RAX,0x1
CMP RSI,RAX
JNZ 0x00101308
LAB_00101320:
MOV RAX,R8
RET | int4 * func0(long param_1,int param_2)
{
int iVar1;
long lVar2;
if (0 < param_2) {
lVar2 = 0;
do {
iVar1 = *(int *)(param_1 + lVar2 * 4);
(&cubes_1)[lVar2] = iVar1 * iVar1 * iVar1;
lVar2 = lVar2 + 1;
} while (param_2 != lVar2);
}
return &cubes_1;
} |
5,683 | func0 | #include <assert.h>
#include <stdio.h>
| int* func0(int nums[], int size) {
static int cubes[100];
for (int i = 0; i < size; i++) {
cubes[i] = nums[i] * nums[i] * nums[i];
}
return cubes;
}
| int main() {
int arr1[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
int expected1[] = {1, 8, 27, 64, 125, 216, 343, 512, 729, 1000};
int* result1 = func0(arr1, 10);
for (int i = 0; i < 10; i++) {
assert(result1[i] == expected1[i]);
}
int arr2[] = {10, 20, 30};
int expected2[] = ... | O3 | c | func0:
endbr64
test %esi,%esi
jle 13bb <func0+0xeb>
lea 0xf(%rdi),%rcx
lea 0x2d59(%rip),%rdx
sub %rdx,%rcx
lea -0x1(%rsi),%eax
cmp $0x1e,%rcx
jbe 13c8 <func0+0xf8>
cmp $0x3,%eax
jbe 13c8 <func0+0xf8>
mov %esi,%ecx
xor %eax,%eax
shr $0x2,%ecx
shl $0x4,%rcx
nopl 0x0(%rax,%rax,1)... | func0:
endbr64
movsxd rax, esi
lea r8, cubes_1
test eax, eax
jle short loc_1200
lea edx, [rax-1]
cmp edx, 2
jbe short loc_11DA
lea rcx, [rdi+4]
mov rdx, r8
sub rdx, rcx
cmp rdx, 8
ja short loc_1208
loc_11DA:
lea rsi, ds:0[rax*4]
xor eax, eax
nop dword ptr [rax+00... | long long * func0(long long a1, int a2)
{
long long v2; // rsi
long long v3; // rax
long long v5; // rdx
__m128i v6; // xmm1
__m128i v7; // xmm2
__m128i v8; // xmm0
unsigned int v9; // edx
long long v10; // r10
signed int v11; // ecx
int v12; // edx
if ( a2 <= 0 )
return cubes_1;
if ( (unsi... | func0:
ENDBR64
MOVSXD RAX,ESI
LEA R8,[0x104040]
TEST EAX,EAX
JLE 0x00101200
LEA EDX,[RAX + -0x1]
CMP EDX,0x2
JBE 0x001011da
LEA RCX,[RDI + 0x4]
MOV RDX,R8
SUB RDX,RCX
CMP RDX,0x8
JA 0x00101208
LAB_001011da:
LEA RSI,[RAX*0x4]
XOR EAX,EAX
NOP dword ptr [RAX]
LAB_001011e8:
MOV ECX,dword ptr [RDI + RAX*0x1]
MOV EDX,ECX
IMU... | int4 * func0(long param_1,uint param_2)
{
int auVar1 [16];
long lVar2;
uint uVar3;
int iVar4;
long lVar6;
int auVar5 [16];
ulong uVar7;
if (0 < (int)param_2) {
if ((param_2 - 1 < 3) || ((ulong)((long)&cubes_1 - (param_1 + 4)) < 9)) {
lVar2 = 0;
do {
iVar4 = *(int *)(param_1 +... |
5,684 | func0 | #include <assert.h>
| int func0(int n) {
int a = 3, b = 0, c = 2;
if (n == 0) return 3;
if (n == 1) return 3;
if (n == 2) return 5;
int sum = 5;
while (n > 2) {
int d = a + b;
sum += d;
a = b;
b = c;
c = d;
n--;
}
return sum;
}
| int main() {
assert(func0(9) == 49);
assert(func0(10) == 66);
assert(func0(11) == 88);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x24(%rbp)
movl $0x3,-0x14(%rbp)
movl $0x0,-0x10(%rbp)
movl $0x2,-0xc(%rbp)
cmpl $0x0,-0x24(%rbp)
jne 1176 <func0+0x2d>
mov $0x3,%eax
jmp 11c9 <func0+0x80>
cmpl $0x1,-0x24(%rbp)
jne 1183 <func0+0x3a>
mov $0x3,%eax
jmp 11c9 <func0+0x80>... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_24], edi
mov [rbp+var_14], 3
mov [rbp+var_10], 0
mov [rbp+var_C], 2
cmp [rbp+var_24], 0
jnz short loc_1176
mov eax, 3
jmp short loc_11C9
loc_1176:
cmp [rbp+var_24], 1
jnz short loc_1183
mov eax, 3
jmp short loc_11C9... | long long func0(int a1)
{
int v2; // [rsp+0h] [rbp-24h]
int v3; // [rsp+10h] [rbp-14h]
int v4; // [rsp+14h] [rbp-10h]
int v5; // [rsp+18h] [rbp-Ch]
unsigned int v6; // [rsp+1Ch] [rbp-8h]
int v7; // [rsp+20h] [rbp-4h]
v2 = a1;
v3 = 3;
v4 = 0;
v5 = 2;
switch ( a1 )
{
case 0:
return 3LL... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x24],EDI
MOV dword ptr [RBP + -0x14],0x3
MOV dword ptr [RBP + -0x10],0x0
MOV dword ptr [RBP + -0xc],0x2
CMP dword ptr [RBP + -0x24],0x0
JNZ 0x00101176
MOV EAX,0x3
JMP 0x001011c9
LAB_00101176:
CMP dword ptr [RBP + -0x24],0x1
JNZ 0x00101183
MOV EAX,0x3
JMP 0x0010... | int func0(int param_1)
{
int iVar1;
int4 local_2c;
int4 local_1c;
int4 local_18;
int4 local_14;
int4 local_10;
local_1c = 3;
local_18 = 0;
local_14 = 2;
if (param_1 == 0) {
local_10 = 3;
}
else if (param_1 == 1) {
local_10 = 3;
}
else if (param_1 == 2) {
local_10 = 5;
}
e... |
5,685 | func0 | #include <assert.h>
| int func0(int n) {
int a = 3, b = 0, c = 2;
if (n == 0) return 3;
if (n == 1) return 3;
if (n == 2) return 5;
int sum = 5;
while (n > 2) {
int d = a + b;
sum += d;
a = b;
b = c;
c = d;
n--;
}
return sum;
}
| int main() {
assert(func0(9) == 49);
assert(func0(10) == 66);
assert(func0(11) == 88);
return 0;
}
| O1 | c | func0:
endbr64
mov $0x3,%ecx
cmp $0x1,%edi
jbe 1188 <func0+0x3f>
cmp $0x2,%edi
jle 118b <func0+0x42>
mov $0x5,%ecx
mov $0x2,%r8d
mov $0x0,%eax
mov $0x3,%esi
jmp 1176 <func0+0x2d>
mov %edx,%r8d
lea (%rsi,%rax,1),%edx
add %edx,%ecx
sub $0x1,%edi
mov %eax,%esi
mov %r8d,%eax
... | func0:
endbr64
mov ecx, 3
cmp edi, 1
jbe short loc_1188
cmp edi, 2
jle short loc_118B
mov ecx, 5
mov r8d, 2
mov eax, 0
mov esi, 3
jmp short loc_1176
loc_1173:
mov r8d, edx
loc_1176:
lea edx, [rsi+rax]
add ecx, edx
sub edi, 1
mov esi, eax
mov eax, r8d
cmp ... | long long func0(int a1)
{
unsigned int v1; // ecx
int v2; // r8d
int v3; // eax
int v4; // esi
int v5; // edx
v1 = 3;
if ( (unsigned int)a1 > 1 )
{
if ( a1 <= 2 )
{
return 5;
}
else
{
v1 = 5;
v2 = 2;
v3 = 0;
v4 = 3;
while ( 1 )
{
v5... | func0:
ENDBR64
MOV ECX,0x3
CMP EDI,0x1
JBE 0x00101188
CMP EDI,0x2
JLE 0x0010118b
MOV ECX,0x5
MOV R8D,0x2
MOV EAX,0x0
MOV ESI,0x3
JMP 0x00101176
LAB_00101173:
MOV R8D,EDX
LAB_00101176:
LEA EDX,[RSI + RAX*0x1]
ADD ECX,EDX
SUB EDI,0x1
MOV ESI,EAX
MOV EAX,R8D
CMP EDI,0x2
JNZ 0x00101173
LAB_00101188:
MOV EAX,ECX
RET
LAB_001... | int func0(uint param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
iVar3 = 3;
if (1 < param_1) {
if ((int)param_1 < 3) {
iVar3 = 5;
}
else {
iVar3 = 5;
iVar1 = 2;
iVar4 = 3;
iVar2 = 0;
do {
iVar5 = iVar1;
iVar3 = iVar3 + iVa... |
5,686 | func0 | #include <assert.h>
| int func0(int n) {
int a = 3, b = 0, c = 2;
if (n == 0) return 3;
if (n == 1) return 3;
if (n == 2) return 5;
int sum = 5;
while (n > 2) {
int d = a + b;
sum += d;
a = b;
b = c;
c = d;
n--;
}
return sum;
}
| int main() {
assert(func0(9) == 49);
assert(func0(10) == 66);
assert(func0(11) == 88);
return 0;
}
| O2 | c | func0:
endbr64
mov $0x3,%r8d
cmp $0x1,%edi
jbe 1294 <func0+0x44>
cmp $0x2,%edi
jle 12a0 <func0+0x50>
mov $0x2,%edx
mov $0x5,%r8d
xor %eax,%eax
mov $0x3,%ecx
nopw %cs:0x0(%rax,%rax,1)
mov %edx,%esi
sub $0x1,%edi
lea (%rcx,%rax,1),%edx
mov %eax,%ecx
add %edx,%r8d
mov %esi,%e... | func0:
endbr64
mov r8d, 3
cmp edi, 1
jbe short loc_1294
cmp edi, 2
jle short loc_12A0
mov edx, 2
mov r8d, 5
xor eax, eax
mov ecx, 3
nop word ptr [rax+rax+00000000h]
loc_1280:
mov esi, edx
sub edi, 1
lea edx, [rcx+rax]
mov ecx, eax
add r8d, edx
mov eax, esi... | long long func0(int a1)
{
unsigned int v1; // r8d
int v2; // edx
int v3; // eax
int v4; // ecx
int v5; // esi
v1 = 3;
if ( (unsigned int)a1 > 1 )
{
if ( a1 <= 2 )
{
return 5;
}
else
{
v2 = 2;
v1 = 5;
v3 = 0;
v4 = 3;
do
{
v5 = v2;
... | func0:
ENDBR64
MOV R8D,0x3
CMP EDI,0x1
JBE 0x00101294
CMP EDI,0x2
JLE 0x001012a0
MOV EDX,0x2
MOV R8D,0x5
XOR EAX,EAX
MOV ECX,0x3
NOP word ptr CS:[RAX + RAX*0x1]
LAB_00101280:
MOV ESI,EDX
SUB EDI,0x1
LEA EDX,[RCX + RAX*0x1]
MOV ECX,EAX
ADD R8D,EDX
MOV EAX,ESI
CMP EDI,0x2
JNZ 0x00101280
LAB_00101294:
MOV EAX,R8D
RET
LAB_... | int func0(uint param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
iVar5 = 3;
if (1 < param_1) {
if ((int)param_1 < 3) {
iVar5 = 5;
}
else {
iVar5 = 5;
iVar1 = 2;
iVar3 = 3;
iVar2 = 0;
do {
iVar4 = iVar1;
param_1 = param_1 -... |
5,687 | func0 | #include <assert.h>
| int func0(int n) {
int a = 3, b = 0, c = 2;
if (n == 0) return 3;
if (n == 1) return 3;
if (n == 2) return 5;
int sum = 5;
while (n > 2) {
int d = a + b;
sum += d;
a = b;
b = c;
c = d;
n--;
}
return sum;
}
| int main() {
assert(func0(9) == 49);
assert(func0(10) == 66);
assert(func0(11) == 88);
return 0;
}
| O3 | c | func0:
endbr64
mov $0x3,%r8d
cmp $0x1,%edi
jbe 1184 <func0+0x44>
cmp $0x2,%edi
jle 1190 <func0+0x50>
mov $0x2,%edx
mov $0x5,%r8d
xor %eax,%eax
mov $0x3,%ecx
nopw %cs:0x0(%rax,%rax,1)
mov %edx,%esi
sub $0x1,%edi
lea (%rcx,%rax,1),%edx
mov %eax,%ecx
add %edx,%r8d
mov %esi,%e... | func0:
endbr64
mov ecx, 3
cmp edi, 1
jbe short loc_117D
cmp edi, 2
jle short loc_1180
mov edx, 2
mov ecx, 5
xor eax, eax
mov esi, 3
nop dword ptr [rax+00h]
loc_1168:
mov r8d, edx
sub edi, 1
lea edx, [rax+rsi]
mov esi, eax
add ecx, edx
mov eax, r8d
cmp ... | long long func0(int a1)
{
unsigned int v1; // ecx
int v2; // edx
int v3; // eax
int v4; // esi
int v5; // r8d
v1 = 3;
if ( (unsigned int)a1 > 1 )
{
if ( a1 <= 2 )
{
return 5;
}
else
{
v2 = 2;
v1 = 5;
v3 = 0;
v4 = 3;
do
{
v5 = v2;
... | func0:
ENDBR64
MOV ECX,0x3
CMP EDI,0x1
JBE 0x0010117d
CMP EDI,0x2
JLE 0x00101180
MOV EDX,0x2
MOV ECX,0x5
XOR EAX,EAX
MOV ESI,0x3
NOP dword ptr [RAX]
LAB_00101168:
MOV R8D,EDX
SUB EDI,0x1
LEA EDX,[RAX + RSI*0x1]
MOV ESI,EAX
ADD ECX,EDX
MOV EAX,R8D
CMP EDI,0x2
JNZ 0x00101168
LAB_0010117d:
MOV EAX,ECX
RET
LAB_00101180:
MO... | int func0(uint param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
iVar2 = 3;
if (1 < param_1) {
if ((int)param_1 < 3) {
iVar2 = 5;
}
else {
iVar2 = 5;
iVar4 = 2;
iVar3 = 0;
iVar5 = 3;
do {
iVar1 = iVar3;
iVar3 = iVar4;
... |
5,688 | func0 | #include <assert.h>
#include <stdio.h>
| char* func0(int x1, int y1, int x2, int y2, int x3, int y3) {
int a = (x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2));
if (a == 0) {
return "No";
} else {
return "Yes";
}
}
| int main() {
assert(func0(1, 5, 2, 5, 4, 6) == "Yes");
assert(func0(1, 1, 1, 4, 1, 5) == "No");
assert(func0(1, 1, 1, 1, 1, 1) == "No");
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
mov %esi,-0x18(%rbp)
mov %edx,-0x1c(%rbp)
mov %ecx,-0x20(%rbp)
mov %r8d,-0x24(%rbp)
mov %r9d,-0x28(%rbp)
mov -0x20(%rbp),%eax
sub -0x28(%rbp),%eax
imul -0x14(%rbp),%eax
mov %eax,%edx
mov -0x28(%rbp),%eax
sub -0x18(%rbp),... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_18], esi
mov [rbp+var_1C], edx
mov [rbp+var_20], ecx
mov [rbp+var_24], r8d
mov [rbp+var_28], r9d
mov eax, [rbp+var_20]
sub eax, [rbp+var_28]
imul eax, [rbp+var_14]
mov edx, eax
mov eax, [rbp+var_28]... | void * func0(int a1, int a2, int a3, int a4, int a5, int a6)
{
if ( a3 * (a6 - a2) + a1 * (a4 - a6) + a5 * (a2 - a4) )
return &unk_200B;
else
return &unk_2008;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x18],ESI
MOV dword ptr [RBP + -0x1c],EDX
MOV dword ptr [RBP + -0x20],ECX
MOV dword ptr [RBP + -0x24],R8D
MOV dword ptr [RBP + -0x28],R9D
MOV EAX,dword ptr [RBP + -0x20]
SUB EAX,dword ptr [RBP + -0x28]
IMUL EAX,dword ptr [RBP + -0... | int * func0(int param_1,int param_2,int param_3,int param_4,int param_5,int param_6)
{
int *puVar1;
if ((param_2 - param_4) * param_5 + (param_4 - param_6) * param_1 + (param_6 - param_2) * param_3
== 0) {
puVar1 = &DAT_00102008;
}
else {
puVar1 = &DAT_0010200b;
}
return puVar1;
} |
5,689 | func0 | #include <assert.h>
#include <stdio.h>
| char* func0(int x1, int y1, int x2, int y2, int x3, int y3) {
int a = (x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2));
if (a == 0) {
return "No";
} else {
return "Yes";
}
}
| int main() {
assert(func0(1, 5, 2, 5, 4, 6) == "Yes");
assert(func0(1, 1, 1, 4, 1, 5) == "No");
assert(func0(1, 1, 1, 1, 1, 1) == "No");
return 0;
}
| O1 | c | func0:
endbr64
mov %edi,%eax
mov %ecx,%edi
sub %r9d,%edi
imul %eax,%edi
sub %esi,%r9d
imul %edx,%r9d
add %edi,%r9d
sub %ecx,%esi
imul %r8d,%esi
add %esi,%r9d
lea 0xeb3(%rip),%rax
lea 0xeaf(%rip),%rdx
cmovne %rdx,%rax
retq
| func0:
endbr64
mov eax, esi
mov esi, edx
mov edx, ecx
sub edx, r9d
imul edx, edi
sub r9d, eax
imul r9d, esi
add edx, r9d
sub eax, ecx
imul eax, r8d
add edx, eax
lea rax, unk_2004
lea rdx, unk_2007
cmovnz rax, rdx
retn | void * func0(int a1, int a2, int a3, int a4, int a5, int a6)
{
void *result; // rax
result = &unk_2004;
if ( a5 * (a2 - a4) + a3 * (a6 - a2) + a1 * (a4 - a6) )
return &unk_2007;
return result;
} | func0:
ENDBR64
MOV EAX,ESI
MOV ESI,EDX
MOV EDX,ECX
SUB EDX,R9D
IMUL EDX,EDI
SUB R9D,EAX
IMUL R9D,ESI
ADD EDX,R9D
SUB EAX,ECX
IMUL EAX,R8D
ADD EDX,EAX
LEA RAX,[0x102004]
LEA RDX,[0x102007]
CMOVNZ RAX,RDX
RET | int * func0(int param_1,int param_2,int param_3,int param_4,int param_5,int param_6)
{
int *puVar1;
puVar1 = &DAT_00102004;
if ((param_4 - param_6) * param_1 + (param_6 - param_2) * param_3 + (param_2 - param_4) * param_5
!= 0) {
puVar1 = &DAT_00102007;
}
return puVar1;
} |
5,690 | func0 | #include <assert.h>
#include <stdio.h>
| char* func0(int x1, int y1, int x2, int y2, int x3, int y3) {
int a = (x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2));
if (a == 0) {
return "No";
} else {
return "Yes";
}
}
| int main() {
assert(func0(1, 5, 2, 5, 4, 6) == "Yes");
assert(func0(1, 1, 1, 4, 1, 5) == "No");
assert(func0(1, 1, 1, 1, 1, 1) == "No");
return 0;
}
| O2 | c | func0:
endbr64
mov %edi,%r10d
mov %ecx,%edi
lea 0xeb4(%rip),%rax
sub %r9d,%edi
sub %esi,%r9d
sub %ecx,%esi
imul %r10d,%edi
imul %edx,%r9d
lea 0xea0(%rip),%rdx
imul %r8d,%esi
add %edi,%r9d
add %esi,%r9d
cmovne %rdx,%rax
retq
nopw %cs:0x0(%rax,%rax,1)
| func0:
endbr64
mov r10d, edx
mov edx, ecx
mov eax, esi
sub edx, r9d
sub r9d, esi
sub eax, ecx
imul edx, edi
imul r9d, r10d
imul eax, r8d
add edx, r9d
add edx, eax
lea rdx, unk_2007
lea rax, unk_2004
cmovnz rax, rdx
retn | void * func0(int a1, int a2, int a3, int a4, int a5, int a6)
{
void *result; // rax
result = &unk_2004;
if ( a5 * (a2 - a4) + a3 * (a6 - a2) + a1 * (a4 - a6) )
return &unk_2007;
return result;
} | func0:
ENDBR64
MOV R10D,EDX
MOV EDX,ECX
MOV EAX,ESI
SUB EDX,R9D
SUB R9D,ESI
SUB EAX,ECX
IMUL EDX,EDI
IMUL R9D,R10D
IMUL EAX,R8D
ADD EDX,R9D
ADD EDX,EAX
LEA RDX,[0x102007]
LEA RAX,[0x102004]
CMOVNZ RAX,RDX
RET | int * func0(int param_1,int param_2,int param_3,int param_4,int param_5,int param_6)
{
int *puVar1;
puVar1 = &DAT_00102004;
if ((param_4 - param_6) * param_1 + (param_6 - param_2) * param_3 + (param_2 - param_4) * param_5
!= 0) {
puVar1 = &DAT_00102007;
}
return puVar1;
} |
5,691 | func0 | #include <assert.h>
#include <stdio.h>
| char* func0(int x1, int y1, int x2, int y2, int x3, int y3) {
int a = (x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2));
if (a == 0) {
return "No";
} else {
return "Yes";
}
}
| int main() {
assert(func0(1, 5, 2, 5, 4, 6) == "Yes");
assert(func0(1, 1, 1, 4, 1, 5) == "No");
assert(func0(1, 1, 1, 1, 1, 1) == "No");
return 0;
}
| O3 | c | func0:
endbr64
mov %edi,%r10d
mov %ecx,%edi
lea 0xeb4(%rip),%rax
sub %r9d,%edi
sub %esi,%r9d
sub %ecx,%esi
imul %r10d,%edi
imul %edx,%r9d
lea 0xea0(%rip),%rdx
imul %r8d,%esi
add %edi,%r9d
add %esi,%r9d
cmovne %rdx,%rax
retq
nopw %cs:0x0(%rax,%rax,1)
| func0:
endbr64
mov eax, esi
mov esi, edx
mov edx, ecx
sub edx, r9d
sub r9d, eax
sub eax, ecx
imul edx, edi
imul r9d, esi
imul eax, r8d
add edx, r9d
add edx, eax
lea rdx, unk_2004
lea rax, unk_2007
cmovz rax, rdx
retn | void * func0(int a1, int a2, int a3, int a4, int a5, int a6)
{
void *result; // rax
result = &unk_2007;
if ( !(a5 * (a2 - a4) + a3 * (a6 - a2) + a1 * (a4 - a6)) )
return &unk_2004;
return result;
} | func0:
ENDBR64
MOV EAX,ESI
MOV ESI,EDX
MOV EDX,ECX
SUB EDX,R9D
SUB R9D,EAX
SUB EAX,ECX
IMUL EDX,EDI
IMUL R9D,ESI
IMUL EAX,R8D
ADD EDX,R9D
ADD EDX,EAX
LEA RDX,[0x102004]
LEA RAX,[0x102007]
CMOVZ RAX,RDX
RET | int * func0(int param_1,int param_2,int param_3,int param_4,int param_5,int param_6)
{
int *puVar1;
puVar1 = &DAT_00102007;
if ((param_4 - param_6) * param_1 + (param_6 - param_2) * param_3 + (param_2 - param_4) * param_5
== 0) {
puVar1 = &DAT_00102004;
}
return puVar1;
} |
5,692 | func0 |
#include <stdio.h>
#include <string.h>
#include <assert.h>
| char** func0(char *str[], int n, int l, int *size) {
static char *result[100];
int count = 0;
for (int i = 0; i < n; ++i) {
if (strlen(str[i]) == l) {
result[count++] = str[i];
}
}
*size = count;
return result;
}
| int main() {
char *testData1[] = {"Python", "list", "exercises", "practice", "solution"};
int size;
char **result = func0(testData1, 5, 8, &size);
assert(size == 2);
assert(strcmp(result[0], "practice") == 0);
assert(strcmp(result[1], "solution") == 0);
result = func0(testData1, 5... | 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,-0x8(%rbp)
movl $0x0,-0x4(%rbp)
jmp 1237 <func0+0x8e>
mov -0x4(%rbp),%eax
cltq
lea 0x0(,%rax,8),%rdx
mov -0x18(%rbp),%rax
add %rdx,%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_8], 0
mov [rbp+var_4], 0
jmp short loc_1239
loc_11D3:
mov eax, [rbp+var_4]
cdqe
lea rdx, ds:0[rax*8]
mov rax, [rbp+var... | _QWORD * func0(long long a1, int a2, int a3, _DWORD *a4)
{
int v4; // eax
int v8; // [rsp+28h] [rbp-8h]
int i; // [rsp+2Ch] [rbp-4h]
v8 = 0;
for ( i = 0; i < a2; ++i )
{
if ( strlen(*(const char **)(8LL * i + a1)) == a3 )
{
v4 = v8++;
result_1[v4] = *(_QWORD *)(8LL * i + a1);
}
}
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0x20],EDX
MOV qword ptr [RBP + -0x28],RCX
MOV dword ptr [RBP + -0x8],0x0
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00101239
LAB_001011d3:
MOV EAX,dword ptr [RBP + -0x4]
CDQE
LEA RDX,[RAX*0x8... | int1 * func0(long param_1,int param_2,int param_3,int *param_4)
{
size_t sVar1;
int local_10;
int local_c;
local_10 = 0;
for (local_c = 0; local_c < param_2; local_c = local_c + 1) {
sVar1 = strlen(*(char **)(param_1 + (long)local_c * 8));
if (sVar1 == (long)param_3) {
*(int8 *)(result_1 + (... |
5,693 | func0 |
#include <stdio.h>
#include <string.h>
#include <assert.h>
| char** func0(char *str[], int n, int l, int *size) {
static char *result[100];
int count = 0;
for (int i = 0; i < n; ++i) {
if (strlen(str[i]) == l) {
result[count++] = str[i];
}
}
*size = count;
return result;
}
| int main() {
char *testData1[] = {"Python", "list", "exercises", "practice", "solution"};
int size;
char **result = func0(testData1, 5, 8, &size);
assert(size == 2);
assert(strcmp(result[0], "practice") == 0);
assert(strcmp(result[1], "solution") == 0);
result = func0(testData1, 5... | O1 | c | func0:
endbr64
push %rbp
push %rbx
mov %rcx,%rbx
test %esi,%esi
jle 11cd <func0+0x64>
mov %rdi,%r8
lea -0x1(%rsi),%eax
lea 0x8(%rdi,%rax,8),%r11
mov $0x0,%r9d
mov $0xffffffffffffffff,%r10
mov $0x0,%eax
movslq %edx,%rsi
lea 0x2ea3(%rip),%rbp
jmp 11a8 <func0+0x3f>
add $0x8,%r8
cmp ... | func0:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 18h
mov [rsp+48h+var_40], rcx
test esi, esi
jle short loc_1207
mov rbx, rdi
lea eax, [rsi-1]
lea r14, [rdi+rax*8+8]
mov r13d, 0
movsxd r12, edx
lea r15, result_1
jmp short loc_11EA
loc... | _QWORD * func0(_QWORD *a1, int a2, int a3, _DWORD *a4)
{
_QWORD *v4; // rbx
int v5; // r13d
long long v6; // r12
long long v7; // rbp
if ( a2 <= 0 )
{
v5 = 0;
}
else
{
v4 = a1;
v5 = 0;
v6 = a3;
do
{
v7 = *v4;
if ( strlen(*v4) == v6 )
result_1[v5++] = v7;
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RSP + 0x8],RCX
TEST ESI,ESI
JLE 0x00101207
MOV RBX,RDI
LEA EAX,[RSI + -0x1]
LEA R14,[RDI + RAX*0x8 + 0x8]
MOV R13D,0x0
MOVSXD R12,EDX
LEA R15,[0x104040]
JMP 0x001011ea
LAB_001011e1:
ADD RBX,0x8
CMP RBX,R14
JZ 0x0010120d
LAB... | int8 * func0(int8 *param_1,int param_2,int param_3,int *param_4)
{
int8 *puVar1;
char *__s;
size_t sVar2;
int iVar3;
if (param_2 < 1) {
iVar3 = 0;
}
else {
puVar1 = param_1 + (ulong)(param_2 - 1) + 1;
iVar3 = 0;
do {
__s = (char *)*param_1;
sVar2 = strlen(__s);
if (sV... |
5,694 | func0 |
#include <stdio.h>
#include <string.h>
#include <assert.h>
| char** func0(char *str[], int n, int l, int *size) {
static char *result[100];
int count = 0;
for (int i = 0; i < n; ++i) {
if (strlen(str[i]) == l) {
result[count++] = str[i];
}
}
*size = count;
return result;
}
| int main() {
char *testData1[] = {"Python", "list", "exercises", "practice", "solution"};
int size;
char **result = func0(testData1, 5, 8, &size);
assert(size == 2);
assert(strcmp(result[0], "practice") == 0);
assert(strcmp(result[1], "solution") == 0);
result = func0(testData1, 5... | O2 | c | func0:
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %rcx,0x8(%rsp)
test %esi,%esi
jle 1440 <func0+0x80>
lea -0x1(%rsi),%eax
movslq %edx,%rbp
mov %rdi,%rbx
xor %r12d,%r12d
lea 0x8(%rdi,%rax,8),%r13
lea 0x2c4d(%rip),%r15
nopl 0x0(%rax,%rax,... | func0:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 18h
mov [rsp+48h+var_40], rcx
test esi, esi
jle short loc_1450
lea eax, [rsi-1]
movsxd rbp, edx
mov rbx, rdi
xor r12d, r12d
lea r13, [rdi+rax*8+8]
lea r15, result_1
nop dword ptr [rax+... | _QWORD * func0(_QWORD *a1, int a2, int a3, _DWORD *a4)
{
long long v4; // rbp
_QWORD *v5; // rbx
int v6; // r12d
long long v7; // r14
long long v8; // rax
if ( a2 <= 0 )
{
v6 = 0;
}
else
{
v4 = a3;
v5 = a1;
v6 = 0;
do
{
v7 = *v5;
if ( strlen(*v5) == v4 )
{
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RSP + 0x8],RCX
TEST ESI,ESI
JLE 0x00101450
LEA EAX,[RSI + -0x1]
MOVSXD RBP,EDX
MOV RBX,RDI
XOR R12D,R12D
LEA R13,[RDI + RAX*0x8 + 0x8]
LEA R15,[0x104040]
NOP dword ptr [RAX + RAX*0x1]
LAB_00101408:
MOV R14,qword ptr [RBX]
M... | int8 * func0(int8 *param_1,int param_2,int param_3,int *param_4)
{
int8 *puVar1;
char *__s;
size_t sVar2;
long lVar3;
int iVar4;
if (param_2 < 1) {
iVar4 = 0;
}
else {
iVar4 = 0;
puVar1 = param_1 + (ulong)(param_2 - 1) + 1;
do {
__s = (char *)*param_1;
sVar2 = strlen(__s)... |
5,695 | func0 |
#include <stdio.h>
#include <string.h>
#include <assert.h>
| char** func0(char *str[], int n, int l, int *size) {
static char *result[100];
int count = 0;
for (int i = 0; i < n; ++i) {
if (strlen(str[i]) == l) {
result[count++] = str[i];
}
}
*size = count;
return result;
}
| int main() {
char *testData1[] = {"Python", "list", "exercises", "practice", "solution"};
int size;
char **result = func0(testData1, 5, 8, &size);
assert(size == 2);
assert(strcmp(result[0], "practice") == 0);
assert(strcmp(result[1], "solution") == 0);
result = func0(testData1, 5... | O3 | c | func0:
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %rcx,0x8(%rsp)
test %esi,%esi
jle 1450 <func0+0x80>
lea -0x1(%rsi),%eax
movslq %edx,%rbp
mov %rdi,%rbx
xor %r12d,%r12d
lea 0x8(%rdi,%rax,8),%r13
lea 0x2c3d(%rip),%r15
nopl 0x0(%rax,%rax,... | func0:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 18h
mov [rsp+48h+var_40], rcx
test esi, esi
jle short loc_1450
movsxd rsi, esi
movsxd rbp, edx
mov rbx, rdi
xor r12d, r12d
lea r13, [rdi+rsi*8]
lea r15, result_1
nop word ptr [rax+rax+00h... | _QWORD * func0(const char **a1, int a2, int a3, _DWORD *a4)
{
long long v4; // rbp
const char **v5; // rbx
int v6; // r12d
const char *v7; // r14
long long v8; // rax
if ( a2 <= 0 )
{
v6 = 0;
}
else
{
v4 = a3;
v5 = a1;
v6 = 0;
do
{
v7 = *v5;
if ( strlen(*v5) == v... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RSP + 0x8],RCX
TEST ESI,ESI
JLE 0x00101450
MOVSXD RSI,ESI
MOVSXD RBP,EDX
MOV RBX,RDI
XOR R12D,R12D
LEA R13,[RDI + RSI*0x8]
LEA R15,[0x104040]
NOP word ptr [RAX + RAX*0x1]
LAB_00101408:
MOV R14,qword ptr [RBX]
MOV RDI,R14
CA... | int8 * func0(int8 *param_1,int param_2,int param_3,int *param_4)
{
int8 *puVar1;
char *__s;
size_t sVar2;
long lVar3;
int iVar4;
if (param_2 < 1) {
iVar4 = 0;
}
else {
iVar4 = 0;
puVar1 = param_1 + param_2;
do {
__s = (char *)*param_1;
sVar2 = strlen(__s);
if (sVar2... |
5,696 | func0 |
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <ctype.h>
| char* func0(char* text1) {
int i = 0, j = 0;
while (text1[i]) {
if (!isspace((unsigned char)text1[i])) {
text1[j++] = text1[i];
}
i++;
}
text1[j] = '\0';
return text1;
}
| int main() {
char text1[] = " Google Flutter ";
char text2[] = " Google Dart ";
char text3[] = " iOS Swift ";
assert(strcmp(func0(text1), "GoogleFlutter") == 0);
assert(strcmp(func0(text2), "GoogleDart") == 0);
assert(strcmp(func0(text3), "iOSSwift") == 0);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %rdi,-0x18(%rbp)
movl $0x0,-0x8(%rbp)
movl $0x0,-0x4(%rbp)
jmp 1223 <func0+0x7a>
callq 10b0 <__ctype_b_loc@plt>
mov (%rax),%rax
mov -0x8(%rbp),%edx
movslq %edx,%rcx
mov -0x18(%rbp),%rdx
add %rcx,%rdx
movzbl (%rdx),%edx
movzbl %dl,%... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_18], rdi
mov [rbp+var_8], 0
mov [rbp+var_4], 0
jmp short loc_1223
loc_11C9:
call ___ctype_b_loc
mov rax, [rax]
mov edx, [rbp+var_8]
movsxd rcx, edx
mov rdx, [rbp+var_18]
add rdx, rcx
movzx edx, byte ptr [rdx]... | long long func0(long long a1)
{
int v1; // eax
int v3; // [rsp+18h] [rbp-8h]
int v4; // [rsp+1Ch] [rbp-4h]
v3 = 0;
v4 = 0;
while ( *(_BYTE *)(v3 + a1) )
{
if ( ((*__ctype_b_loc())[*(unsigned __int8 *)(v3 + a1)] & 0x2000) == 0 )
{
v1 = v4++;
*(_BYTE *)(a1 + v1) = *(_BYTE *)(v3 + a1);
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x8],0x0
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00101223
LAB_001011c9:
CALL 0x001010b0
MOV RAX,qword ptr [RAX]
MOV EDX,dword ptr [RBP + -0x8]
MOVSXD RCX,EDX
MOV RDX,qword ptr [RBP + -0x18]
ADD RDX,RCX
MOVZX EDX,byte ptr... | long func0(long param_1)
{
ushort **ppuVar1;
int local_10;
int local_c;
local_c = 0;
for (local_10 = 0; *(char *)(param_1 + local_10) != '\0'; local_10 = local_10 + 1) {
ppuVar1 = __ctype_b_loc();
if (((*ppuVar1)[*(byte *)(param_1 + local_10)] & 0x2000) == 0) {
*(int *)(local_c + param_1) = ... |
5,697 | func0 |
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <ctype.h>
| char* func0(char* text1) {
int i = 0, j = 0;
while (text1[i]) {
if (!isspace((unsigned char)text1[i])) {
text1[j++] = text1[i];
}
i++;
}
text1[j] = '\0';
return text1;
}
| int main() {
char text1[] = " Google Flutter ";
char text2[] = " Google Dart ";
char text3[] = " iOS Swift ";
assert(strcmp(func0(text1), "GoogleFlutter") == 0);
assert(strcmp(func0(text2), "GoogleDart") == 0);
assert(strcmp(func0(text3), "iOSSwift") == 0);
return 0;
}
| O1 | c | func0:
endbr64
push %rbp
push %rbx
sub $0x8,%rsp
mov %rdi,%rbp
movzbl (%rdi),%ebx
test %bl,%bl
je 11d2 <func0+0x49>
callq 1090 <__ctype_b_loc@plt>
lea 0x1(%rbp),%rcx
mov $0x0,%edi
jmp 11b9 <func0+0x30>
add $0x1,%rcx
movzbl -0x1(%rcx),%ebx
test %bl,%bl
je 11d7 <func0+0x4e>
movzbl %bl,%... | func0:
endbr64
push rbp
push rbx
sub rsp, 8
mov rbp, rdi
movzx ebx, byte ptr [rdi]
test bl, bl
jz short loc_11F2
call ___ctype_b_loc
lea rcx, [rbp+1]
mov edi, 0
jmp short loc_11D9
loc_11CD:
add rcx, 1
movzx ebx, byte ptr [rcx-1]
test bl, bl
jz short loc_11F7
loc_11D9... | unsigned __int8 * func0(unsigned __int8 *a1)
{
unsigned __int8 v2; // bl
_QWORD *v3; // rax
unsigned __int8 *v4; // rcx
int v5; // edi
v2 = *a1;
if ( *a1 )
{
v3 = (_QWORD *)__ctype_b_loc();
v4 = a1 + 1;
v5 = 0;
do
{
if ( (*(_BYTE *)(*v3 + 2LL * v2 + 1) & 0x20) == 0 )
a1[... | func0:
ENDBR64
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RBP,RDI
MOVZX EBX,byte ptr [RDI]
TEST BL,BL
JZ 0x001011f2
CALL 0x001010b0
LEA RCX,[RBP + 0x1]
MOV EDI,0x0
JMP 0x001011d9
LAB_001011cd:
ADD RCX,0x1
MOVZX EBX,byte ptr [RCX + -0x1]
TEST BL,BL
JZ 0x001011f7
LAB_001011d9:
MOVZX EDX,BL
MOV RSI,qword ptr [RAX]
TEST byte ptr [R... | byte * func0(byte *param_1)
{
ushort **ppuVar1;
byte *pbVar2;
byte bVar3;
int iVar4;
bVar3 = *param_1;
if (bVar3 == 0) {
iVar4 = 0;
}
else {
ppuVar1 = __ctype_b_loc();
iVar4 = 0;
pbVar2 = param_1 + 1;
do {
if ((*(byte *)((long)*ppuVar1 + (ulong)bVar3 * 2 + 1) & 0x20) == 0) ... |
5,698 | func0 |
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <ctype.h>
| char* func0(char* text1) {
int i = 0, j = 0;
while (text1[i]) {
if (!isspace((unsigned char)text1[i])) {
text1[j++] = text1[i];
}
i++;
}
text1[j] = '\0';
return text1;
}
| int main() {
char text1[] = " Google Flutter ";
char text2[] = " Google Dart ";
char text3[] = " iOS Swift ";
assert(strcmp(func0(text1), "GoogleFlutter") == 0);
assert(strcmp(func0(text2), "GoogleDart") == 0);
assert(strcmp(func0(text3), "iOSSwift") == 0);
return 0;
}
| O2 | c | func0:
endbr64
push %r12
mov %rdi,%r12
push %rbx
sub $0x8,%rsp
movzbl (%rdi),%ebx
test %bl,%bl
je 1340 <func0+0x60>
callq 1090 <__ctype_b_loc@plt>
lea 0x1(%r12),%rcx
xor %r9d,%r9d
xor %edi,%edi
nopl 0x0(%rax)
mov (%rax),%r8
movzbl %bl,%edx
lea (%r12,%rdi,1),%rsi
testb $0x20,0x1(%r8,%r... | func0:
endbr64
push r12
mov r12, rdi
push rbx
sub rsp, 8
movzx ebx, byte ptr [rdi]
test bl, bl
jz short loc_1350
call ___ctype_b_loc
lea rcx, [r12+1]
xor esi, esi
nop dword ptr [rax+00000000h]
loc_1318:
mov r8, [rax]
movzx edx, bl
test byte ptr [r8+rdx*2+1], 20h
jnz s... | unsigned __int8 * func0(unsigned __int8 *a1)
{
unsigned __int8 v1; // bl
_QWORD *v2; // rax
unsigned __int8 *v3; // rcx
int v4; // esi
long long v5; // rdx
unsigned __int8 *result; // rax
v1 = *a1;
if ( *a1 )
{
v2 = (_QWORD *)__ctype_b_loc();
v3 = a1 + 1;
v4 = 0;
do
{
if ( (... | func0:
ENDBR64
PUSH R12
MOV R12,RDI
PUSH RBX
SUB RSP,0x8
MOVZX EBX,byte ptr [RDI]
TEST BL,BL
JZ 0x00101350
CALL 0x001010b0
LEA RCX,[R12 + 0x1]
XOR ESI,ESI
NOP dword ptr [RAX]
LAB_00101318:
MOV R8,qword ptr [RAX]
MOVZX EDX,BL
TEST byte ptr [R8 + RDX*0x2 + 0x1],0x20
JNZ 0x00101330
MOVSXD RDX,ESI
ADD ESI,0x1
MOV byte ptr ... | byte * func0(byte *param_1)
{
ushort **ppuVar1;
byte *pbVar2;
long lVar3;
byte bVar4;
int iVar5;
bVar4 = *param_1;
if (bVar4 != 0) {
ppuVar1 = __ctype_b_loc();
pbVar2 = param_1 + 1;
iVar5 = 0;
do {
if ((*(byte *)((long)*ppuVar1 + (ulong)bVar4 * 2 + 1) & 0x20) == 0) {
lVar... |
5,699 | func0 |
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <ctype.h>
| char* func0(char* text1) {
int i = 0, j = 0;
while (text1[i]) {
if (!isspace((unsigned char)text1[i])) {
text1[j++] = text1[i];
}
i++;
}
text1[j] = '\0';
return text1;
}
| int main() {
char text1[] = " Google Flutter ";
char text2[] = " Google Dart ";
char text3[] = " iOS Swift ";
assert(strcmp(func0(text1), "GoogleFlutter") == 0);
assert(strcmp(func0(text2), "GoogleDart") == 0);
assert(strcmp(func0(text3), "iOSSwift") == 0);
return 0;
}
| O3 | c | func0:
endbr64
push %r12
mov %rdi,%r12
push %rbx
sub $0x8,%rsp
movzbl (%rdi),%ebx
test %bl,%bl
je 1358 <func0+0x78>
callq 1090 <__ctype_b_loc@plt>
lea 0x1(%r12),%rdx
xor %r8d,%r8d
xor %esi,%esi
jmp 1329 <func0+0x49>
nopw %cs:0x0(%rax,%rax,1)
add $0x1,%rdx
mov %bl,(%rcx)
add $0x1,... | func0:
endbr64
push rbp
mov rbp, rdi
push rbx
sub rsp, 8
movzx ebx, byte ptr [rdi]
test bl, bl
jz short loc_1350
call ___ctype_b_loc
lea rcx, [rbp+1]
xor edx, edx
jmp short loc_131E
loc_1308:
add rcx, 1
mov [rbp+rdx+0], bl
lea esi, [rdx+1]
movzx ebx, byte ptr [rcx-1]... | unsigned __int8 * func0(unsigned __int8 *a1)
{
unsigned __int8 v1; // bl
const unsigned __int16 **v2; // rax
unsigned __int8 *v3; // rcx
long long v4; // rdx
unsigned __int8 *result; // rax
v1 = *a1;
if ( *a1 )
{
v2 = __ctype_b_loc();
v3 = a1 + 1;
v4 = 0LL;
do
{
while ( ((*v2)... | func0:
ENDBR64
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x8
MOVZX EBX,byte ptr [RDI]
TEST BL,BL
JZ 0x00101350
CALL 0x001010b0
LEA RCX,[RBP + 0x1]
XOR EDX,EDX
JMP 0x0010131e
LAB_00101308:
ADD RCX,0x1
MOV byte ptr [RBP + RDX*0x1],BL
LEA ESI,[RDX + 0x1]
MOVZX EBX,byte ptr [RCX + -0x1]
MOVSXD RDX,ESI
TEST BL,BL
JZ 0x00101337
... | byte * func0(byte *param_1)
{
ushort **ppuVar1;
byte *pbVar2;
long lVar3;
byte bVar4;
bVar4 = *param_1;
if (bVar4 == 0) {
*param_1 = 0;
return param_1;
}
ppuVar1 = __ctype_b_loc();
lVar3 = 0;
pbVar2 = param_1 + 1;
do {
while ((*(byte *)((long)*ppuVar1 + (ulong)bVar4 * 2 + 1) & 0x20... |
5,700 | func0 |
#include <assert.h>
| int func0(int actual_cost, int sale_amount) {
if (sale_amount > actual_cost) {
int amount = sale_amount - actual_cost;
return amount;
} else {
return 0; // C doesn't support None, returns 0 to represent no loss.
}
}
| int main() {
assert(func0(1500, 1200) == 0);
assert(func0(100, 200) == 100);
assert(func0(2000, 5000) == 3000);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
mov %esi,-0x18(%rbp)
mov -0x18(%rbp),%eax
cmp -0x14(%rbp),%eax
jle 116d <func0+0x24>
mov -0x18(%rbp),%eax
sub -0x14(%rbp),%eax
mov %eax,-0x4(%rbp)
mov -0x4(%rbp),%eax
jmp 1172 <func0+0x29>
mov $0x0,%eax
pop %rbp
retq
| func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_18], esi
mov eax, [rbp+var_18]
cmp eax, [rbp+var_14]
jle short loc_116D
mov eax, [rbp+var_18]
sub eax, [rbp+var_14]
mov [rbp+var_4], eax
mov eax, [rbp+var_4]
jmp short loc_1172
loc_116D:
mov eax, 0... | long long func0(int a1, int a2)
{
if ( a2 <= a1 )
return 0LL;
else
return (unsigned int)(a2 - a1);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x18],ESI
MOV EAX,dword ptr [RBP + -0x18]
CMP EAX,dword ptr [RBP + -0x14]
JLE 0x0010116d
MOV EAX,dword ptr [RBP + -0x18]
SUB EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x4],EAX
MOV EAX,dword ptr [RBP + -0x4]
JMP 0x00101172
... | int func0(int param_1,int param_2)
{
if (param_1 < param_2) {
param_2 = param_2 - param_1;
}
else {
param_2 = 0;
}
return param_2;
} |
5,701 | func0 |
#include <assert.h>
| int func0(int actual_cost, int sale_amount) {
if (sale_amount > actual_cost) {
int amount = sale_amount - actual_cost;
return amount;
} else {
return 0; // C doesn't support None, returns 0 to represent no loss.
}
}
| int main() {
assert(func0(1500, 1200) == 0);
assert(func0(100, 200) == 100);
assert(func0(2000, 5000) == 3000);
return 0;
}
| O1 | c | func0:
endbr64
mov %esi,%eax
sub %edi,%eax
cmp %edi,%esi
mov $0x0,%edx
cmovle %edx,%eax
retq
| func0:
endbr64
mov eax, esi
sub eax, edi
cmp esi, edi
mov edx, 0
cmovle eax, edx
retn | long long func0(int a1, int a2)
{
long long result; // rax
result = (unsigned int)(a2 - a1);
if ( a2 <= a1 )
return 0LL;
return result;
} | func0:
ENDBR64
MOV EAX,ESI
SUB EAX,EDI
CMP ESI,EDI
MOV EDX,0x0
CMOVLE EAX,EDX
RET | int func0(int param_1,int param_2)
{
int iVar1;
iVar1 = param_2 - param_1;
if (param_2 <= param_1) {
iVar1 = 0;
}
return iVar1;
} |
5,702 | func0 |
#include <assert.h>
| int func0(int actual_cost, int sale_amount) {
if (sale_amount > actual_cost) {
int amount = sale_amount - actual_cost;
return amount;
} else {
return 0; // C doesn't support None, returns 0 to represent no loss.
}
}
| int main() {
assert(func0(1500, 1200) == 0);
assert(func0(100, 200) == 100);
assert(func0(2000, 5000) == 3000);
return 0;
}
| O2 | c | func0:
endbr64
mov %esi,%eax
mov $0x0,%edx
sub %edi,%eax
cmp %edi,%esi
cmovle %edx,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
nopl (%rax)
| func0:
endbr64
mov eax, esi
xor edx, edx
sub eax, edi
cmp esi, edi
cmovle eax, edx
retn | long long func0(int a1, int a2)
{
long long result; // rax
result = (unsigned int)(a2 - a1);
if ( a2 <= a1 )
return 0LL;
return result;
} | func0:
ENDBR64
MOV EAX,ESI
XOR EDX,EDX
SUB EAX,EDI
CMP ESI,EDI
CMOVLE EAX,EDX
RET | int func0(int param_1,int param_2)
{
int iVar1;
iVar1 = param_2 - param_1;
if (param_2 <= param_1) {
iVar1 = 0;
}
return iVar1;
} |
5,703 | func0 |
#include <assert.h>
| int func0(int actual_cost, int sale_amount) {
if (sale_amount > actual_cost) {
int amount = sale_amount - actual_cost;
return amount;
} else {
return 0; // C doesn't support None, returns 0 to represent no loss.
}
}
| int main() {
assert(func0(1500, 1200) == 0);
assert(func0(100, 200) == 100);
assert(func0(2000, 5000) == 3000);
return 0;
}
| O3 | c | func0:
endbr64
mov %esi,%eax
mov $0x0,%edx
sub %edi,%eax
cmp %edi,%esi
cmovle %edx,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
nopl (%rax)
| func0:
endbr64
mov eax, esi
xor edx, edx
sub eax, edi
cmp esi, edi
cmovle eax, edx
retn | long long func0(int a1, int a2)
{
long long result; // rax
result = (unsigned int)(a2 - a1);
if ( a2 <= a1 )
return 0LL;
return result;
} | func0:
ENDBR64
MOV EAX,ESI
XOR EDX,EDX
SUB EAX,EDI
CMP ESI,EDI
CMOVLE EAX,EDX
RET | int func0(int param_1,int param_2)
{
int iVar1;
iVar1 = param_2 - param_1;
if (param_2 <= param_1) {
iVar1 = 0;
}
return iVar1;
} |
5,704 | func0 |
#include <stdio.h>
#include <math.h>
#include <assert.h>
| int func0(int n) {
if (n % 2 != 0) {
return 0;
}
int res = 1;
for (int i = 2; i <= (int)(sqrt(n)) + 1; i++) {
int count = 0;
int curr_sum = 1;
int curr_term = 1;
while (n % i == 0) {
count += 1;
n = n / i;
if (i == 2... | int main() {
assert(func0(18) == 26);
assert(func0(30) == 48);
assert(func0(6) == 8);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x30,%rsp
mov %edi,-0x24(%rbp)
mov -0x24(%rbp),%eax
and $0x1,%eax
test %eax,%eax
je 118c <func0+0x23>
mov $0x0,%eax
jmpq 122d <func0+0xc4>
movl $0x1,-0x14(%rbp)
movl $0x2,-0x10(%rbp)
jmp 11ff <func0+0x96>
movl $0x0,-0xc(%rbp)
movl $0x1,-... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_24], edi
mov eax, [rbp+var_24]
and eax, 1
test eax, eax
jz short loc_118C
mov eax, 0
jmp locret_123F
loc_118C:
mov [rbp+var_14], 1
mov [rbp+var_10], 2
jmp short loc_11FF
loc_119C:
mov [rbp+var_C], 0
mov... | long long func0(int a1)
{
int v2; // [rsp+Ch] [rbp-24h]
unsigned int v3; // [rsp+1Ch] [rbp-14h]
int i; // [rsp+20h] [rbp-10h]
int v5; // [rsp+24h] [rbp-Ch]
int v6; // [rsp+28h] [rbp-8h]
int v7; // [rsp+2Ch] [rbp-4h]
v2 = a1;
if ( (a1 & 1) != 0 )
return 0LL;
v3 = 1;
for ( i = 2; i <= (int)sqrt(... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV dword ptr [RBP + -0x24],EDI
MOV EAX,dword ptr [RBP + -0x24]
AND EAX,0x1
TEST EAX,EAX
JZ 0x0010118c
MOV EAX,0x0
JMP 0x0010123f
LAB_0010118c:
MOV dword ptr [RBP + -0x14],0x1
MOV dword ptr [RBP + -0x10],0x2
JMP 0x001011ff
LAB_0010119c:
MOV dword ptr [RBP + -0xc],0x0
MOV... | int func0(uint param_1)
{
double dVar1;
uint local_2c;
int local_1c;
int local_18;
int local_14;
int local_10;
int local_c;
if ((param_1 & 1) == 0) {
local_1c = 1;
local_2c = param_1;
for (local_18 = 2; dVar1 = sqrt((double)(int)local_2c), local_18 <= (int)dVar1 + 1;
local_18 = l... |
5,705 | func0 |
#include <stdio.h>
#include <math.h>
#include <assert.h>
| int func0(int n) {
if (n % 2 != 0) {
return 0;
}
int res = 1;
for (int i = 2; i <= (int)(sqrt(n)) + 1; i++) {
int count = 0;
int curr_sum = 1;
int curr_term = 1;
while (n % i == 0) {
count += 1;
n = n / i;
if (i == 2... | int main() {
assert(func0(18) == 26);
assert(func0(30) == 48);
assert(func0(6) == 8);
return 0;
}
| O1 | c | func0:
endbr64
push %r12
push %rbp
push %rbx
sub $0x10,%rsp
mov $0x0,%r12d
test $0x1,%dil
jne 121b <func0+0xb2>
mov %edi,%ebp
mov $0x2,%ebx
mov $0x1,%r12d
jmp 11c1 <func0+0x58>
imul %ebx,%esi
add %esi,%ecx
mov %ebp,%eax
cltd
idiv %ebx
test %edx,%edx
jne 11ba <func0+0x51>
add ... | func0:
endbr64
push r12
push rbp
push rbx
mov r12d, 0
test dil, 1
jnz loc_120B
mov ebp, edi
mov ebx, 2
mov r12d, 1
jmp short loc_11BD
loc_1190:
imul esi, ebx
add ecx, esi
mov eax, ebp
cdq
idiv ebx
test edx, edx
jnz short loc_11B6
loc_119E:
add edi, 1
mov ... | long long func0(int a1)
{
unsigned int v1; // r12d
int v2; // ebp
int v3; // ebx
int v4; // esi
int i; // ecx
int v6; // edi
double v7; // xmm0_8
double v8; // xmm0_8
int v9; // r8d
v1 = 0;
if ( (a1 & 1) == 0 )
{
v2 = a1;
v3 = 2;
v1 = 1;
while ( 1 )
{
v7 = (double)v2;... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
MOV R12D,0x0
TEST DIL,0x1
JNZ 0x0010120b
MOV EBP,EDI
MOV EBX,0x2
MOV R12D,0x1
JMP 0x001011bd
LAB_00101190:
IMUL ESI,EBX
ADD ECX,ESI
MOV EAX,EBP
CDQ
IDIV EBX
TEST EDX,EDX
JNZ 0x001011b6
LAB_0010119e:
ADD EDI,0x1
MOV EAX,EBP
CDQ
IDIV EBX
MOV EBP,EAX
CMP EBX,0x2
JNZ 0x00101190
CMP... | int func0(ulong param_1)
{
ulong uVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
int iVar6;
int iVar7;
double dVar8;
iVar7 = 0;
if ((param_1 & 1) == 0) {
param_1 = param_1 & 0xffffffff;
iVar5 = 2;
iVar7 = 1;
while( true ) {
iVar4 = (int)param_1;
dVar8 = (double)iVa... |
5,706 | func0 |
#include <stdio.h>
#include <math.h>
#include <assert.h>
| int func0(int n) {
if (n % 2 != 0) {
return 0;
}
int res = 1;
for (int i = 2; i <= (int)(sqrt(n)) + 1; i++) {
int count = 0;
int curr_sum = 1;
int curr_term = 1;
while (n % i == 0) {
count += 1;
n = n / i;
if (i == 2... | int main() {
assert(func0(18) == 26);
assert(func0(30) == 48);
assert(func0(6) == 8);
return 0;
}
| O2 | c | func0:
endbr64
test $0x1,%dil
jne 1320 <func0+0x10>
jmpq 1210 <func0.part.0>
xor %eax,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
nopl (%rax)
| func0_part_0:
pxor xmm1, xmm1
push r13
pxor xmm2, xmm2
mov r13d, 1
push r12
cvtsi2sd xmm1, edi
xor r12d, r12d
push rbp
mov ebp, edi
push rbx
mov ebx, 2
sub rsp, 18h
nop word ptr [rax+rax+00000000h]
loc_1240:
ucomisd xmm2, xmm1
movapd xmm0, xmm1
ja loc_12DA
sqrtsd xmm0, x... | long long func0_part_0(int a1)
{
unsigned int v1; // r13d
double v2; // xmm1_8
int v3; // ebp
int i; // ebx
double v5; // xmm0_8
int v6; // esi
int v7; // edi
int v8; // r8d
int v9; // ecx
v1 = 1;
v2 = (double)a1;
v3 = a1;
for ( i = 2; ; ++i )
{
v5 = v2 < 0.0 ? sqrt(v2) : sqrt(v2);
... | func0.part.0:
PXOR XMM1,XMM1
PUSH R13
PXOR XMM2,XMM2
MOV R13D,0x1
PUSH R12
CVTSI2SD XMM1,EDI
XOR R12D,R12D
PUSH RBP
MOV EBP,EDI
PUSH RBX
MOV EBX,0x2
SUB RSP,0x18
NOP word ptr CS:[RAX + RAX*0x1]
LAB_00101240:
UCOMISD XMM2,XMM1
MOVAPD XMM0,XMM1
JA 0x001012da
SQRTSD XMM0,XMM0
LAB_00101252:
CVTTSD2SI EAX,XMM0
ADD EAX,0x1
C... | int func0_part_0(uint param_1)
{
ulong uVar1;
int iVar2;
ulong uVar3;
int iVar4;
int iVar5;
int iVar6;
int iVar7;
double dVar8;
double __x;
iVar7 = 1;
__x = (double)(int)param_1;
uVar3 = (ulong)param_1;
iVar2 = 2;
while( true ) {
if (__x < 0.0) {
dVar8 = sqrt(__x);
}
el... |
5,707 | func0 |
#include <stdio.h>
#include <math.h>
#include <assert.h>
| int func0(int n) {
if (n % 2 != 0) {
return 0;
}
int res = 1;
for (int i = 2; i <= (int)(sqrt(n)) + 1; i++) {
int count = 0;
int curr_sum = 1;
int curr_term = 1;
while (n % i == 0) {
count += 1;
n = n / i;
if (i == 2... | int main() {
assert(func0(18) == 26);
assert(func0(30) == 48);
assert(func0(6) == 8);
return 0;
}
| O3 | c | func0:
endbr64
push %r12
xor %r12d,%r12d
push %rbx
sub $0x28,%rsp
test $0x1,%dil
jne 13dc <func0+0xcc>
pxor %xmm1,%xmm1
mov $0x2,%ebx
mov $0x1,%r12d
cvtsi2sd %edi,%xmm1
pxor %xmm3,%xmm3
ucomisd %xmm1,%xmm3
movapd %xmm1,%xmm2
sqrtsd %xmm2,%xmm2
ja 13e7 <func0+0xd7>
cvttsd2si %xmm2,%eax
add ... | func0_part_0:
pxor xmm1, xmm1
push r12
pxor xmm2, xmm2
mov r12d, 1
push rbp
cvtsi2sd xmm1, edi
mov ebp, edi
push rbx
mov ebx, 2
sub rsp, 10h
nop dword ptr [rax+00000000h]
loc_1238:
ucomisd xmm2, xmm1
movapd xmm0, xmm1; x
ja loc_12E0
sqrtsd xmm0, xmm0
loc_124A:
cvttsd2si eax, xm... | long long func0_part_0(int a1)
{
unsigned int v1; // r12d
double v2; // xmm1_8
int v3; // ebp
int i; // ebx
double v5; // xmm0_8
int v6; // ecx
int v7; // r8d
int v8; // edi
int v9; // eax
int v10; // esi
v1 = 1;
v2 = (double)a1;
v3 = a1;
for ( i = 2; ; ++i )
{
v5 = v2 < 0.0 ? sqrt(v... | func0.part.0:
PXOR XMM1,XMM1
PUSH R12
PXOR XMM2,XMM2
MOV R12D,0x1
PUSH RBP
CVTSI2SD XMM1,EDI
MOV EBP,EDI
PUSH RBX
MOV EBX,0x2
SUB RSP,0x10
NOP dword ptr [RAX]
LAB_00101238:
UCOMISD XMM2,XMM1
MOVAPD XMM0,XMM1
JA 0x001012e0
SQRTSD XMM0,XMM0
LAB_0010124a:
CVTTSD2SI EAX,XMM0
ADD EAX,0x1
CMP EBX,EAX
JG 0x001012c8
MOV EAX,EB... | int func0_part_0(uint param_1)
{
ulong uVar1;
uint uVar2;
int iVar4;
ulong uVar5;
int iVar6;
int iVar7;
int iVar8;
double dVar9;
double __x;
ulong uVar3;
iVar8 = 1;
__x = (double)(int)param_1;
uVar5 = (ulong)param_1;
iVar4 = 2;
do {
if (__x < 0.0) {
dVar9 = sqrt(__x);
}
... |
5,708 | func0 |
#include <stdio.h>
#include <regex.h>
#include <assert.h>
| const char* func0(const char* text) {
regex_t regex;
int reti;
char* pattern = "\\w*z.\\w*";
// Compile the regular expression
reti = regcomp(®ex, pattern, REG_EXTENDED);
if (reti) {
fprintf(stderr, "Could not compile regex\n");
return "Regex compile error";
}
... | int main() {
// Assert statements
assert(func0("pythonz.") == "Found a match!");
assert(func0("xyz.") == "Found a match!");
assert(func0(" lang .") == "Not matched!");
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 10f0 <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, aWZW; "\\w*z.\\w*"
mov [rbp+pattern], rax
mov rcx, [rbp+pattern]
lea rax, [rbp+preg]
mov edx, 1; cflags
mov rsi, rcx; pattern
mov rdi... | 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, "\\w*z.\\w*", 1) )
{
fwrite("Could not compile... | 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 0x001010f0
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,"\\w*z.\\w*",1);
if (iVar1 == 0) {
iVar1 = regexec(&local_b8,param_1,0,(regmatch_t *)0x0,0);
... |
5,709 | func0 |
#include <stdio.h>
#include <regex.h>
#include <assert.h>
| const char* func0(const char* text) {
regex_t regex;
int reti;
char* pattern = "\\w*z.\\w*";
// Compile the regular expression
reti = regcomp(®ex, pattern, REG_EXTENDED);
if (reti) {
fprintf(stderr, "Could not compile regex\n");
return "Regex compile error";
}
... | int main() {
// Assert statements
assert(func0("pythonz.") == "Found a match!");
assert(func0("xyz.") == "Found a match!");
assert(func0(" lang .") == "Not matched!");
return 0;
}
| O1 | c | func0:
endbr64
push %rbp
push %rbx
sub $0xb8,%rsp
mov %rdi,%rbx
mov %fs:0x28,%rax
mov %rax,0xa8(%rsp)
xor %eax,%eax
mov %rsp,%rdi
mov $0x1,%edx
lea 0xdeb(%rip),%rsi
callq 10f0 <regcomp@plt>
test %eax,%eax
jne 12e3 <func0+0xba>
mov %rsp,%rbp
mov $0x0,%r8d
mov $0x0,%ecx
mov $... | func0:
endbr64
push rbp
push rbx
sub rsp, 0B8h
mov rbx, rdi
mov rax, fs:28h
mov [rsp+0C8h+var_20], rax
xor eax, eax
mov rdi, rsp
mov edx, 1
lea rsi, aWZW; "\\w*z.\\w*"
call _regcomp
test eax, eax
jnz short loc_12E3
mov rbp, rsp
mov r8d, 0
mov ecx, 0
mov ed... | const char * func0(long long a1)
{
unsigned int v1; // ebx
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, "\\w*z.\\w*", 1LL) )
{
f... | func0:
ENDBR64
PUSH RBP
PUSH RBX
SUB RSP,0xb8
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xa8],RAX
XOR EAX,EAX
MOV RDI,RSP
MOV EDX,0x1
LEA RSI,[0x102046]
CALL 0x001010f0
TEST EAX,EAX
JNZ 0x001012e3
MOV RBP,RSP
MOV R8D,0x0
MOV ECX,0x0
MOV EDX,0x0
MOV RSI,RBX
MOV RDI,RBP
CALL 0x00101110
MOV EBX,EAX
MOV ... | 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,"\\w*z.\\w*",1);
if (iVar1 == 0) {
iVar1 = regexec(&rStack_c8,param_1,0,(regmatch_t *)0x0,0);
... |
5,710 | func0 |
#include <stdio.h>
#include <regex.h>
#include <assert.h>
| const char* func0(const char* text) {
regex_t regex;
int reti;
char* pattern = "\\w*z.\\w*";
// Compile the regular expression
reti = regcomp(®ex, pattern, REG_EXTENDED);
if (reti) {
fprintf(stderr, "Could not compile regex\n");
return "Regex compile error";
}
... | int main() {
// Assert statements
assert(func0("pythonz.") == "Found a match!");
assert(func0("xyz.") == "Found a match!");
assert(func0(" lang .") == "Not matched!");
return 0;
}
| O2 | c | func0:
endbr64
push %r13
mov $0x1,%edx
lea 0xd54(%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 10f0 <regcomp@plt>
test %eax,%eax
jne 13b8 <func0+0xd8>
mov %rbp,%rsi
xor %r8d,%... | func0:
endbr64
push r13
mov edx, 1
lea rsi, aWZW; "\\w*z.\\w*"
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_13B8
mov rsi, rbp
xor r8d, r8d
... | const char * func0(long long a1)
{
unsigned int v1; // ebp
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, "\\w*z.\\w*", 1LL) )
{
f... | func0:
ENDBR64
PUSH R13
MOV EDX,0x1
LEA RSI,[0x102046]
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 0x001010f0
TEST EAX,EAX
JNZ 0x001013b8
MOV RSI,RBP
XOR R8D,R8D
XOR ECX,ECX
XOR EDX,EDX
MOV RDI,R12
CALL 0x00101110
MOV RDI... | 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,"\\w*z.\\w*",1);
if (iVar1 == 0) {
iVar1 = regexec(&rStack_c8,param_1,0,(regmatch_t *)0x0,0);
... |
5,711 | func0 |
#include <stdio.h>
#include <regex.h>
#include <assert.h>
| const char* func0(const char* text) {
regex_t regex;
int reti;
char* pattern = "\\w*z.\\w*";
// Compile the regular expression
reti = regcomp(®ex, pattern, REG_EXTENDED);
if (reti) {
fprintf(stderr, "Could not compile regex\n");
return "Regex compile error";
}
... | int main() {
// Assert statements
assert(func0("pythonz.") == "Found a match!");
assert(func0("xyz.") == "Found a match!");
assert(func0(" lang .") == "Not matched!");
return 0;
}
| O3 | c | func0:
endbr64
push %r13
mov $0x1,%edx
lea 0xd54(%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 10f0 <regcomp@plt>
test %eax,%eax
jne 13b8 <func0+0xd8>
mov %rbp,%rsi
xor %r8d,%... | func0:
endbr64
push r12
mov edx, 1; cflags
lea rsi, pattern; "\\w*z.\\w*"
push rbp
push rbx
mov rbx, rdi
sub rsp, 0B0h
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_13B8
mov rsi, rbx; str... | const char * func0(char *string)
{
int v1; // ebx
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, "\\w*z.\\w*", 1) )
{
fwrite("Co... | func0:
ENDBR64
PUSH R12
MOV EDX,0x1
LEA RSI,[0x102046]
PUSH RBP
PUSH RBX
MOV RBX,RDI
SUB RSP,0xb0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xa8],RAX
XOR EAX,EAX
MOV RBP,RSP
MOV RDI,RBP
CALL 0x001010f0
TEST EAX,EAX
JNZ 0x001013b8
MOV RSI,RBX
XOR R8D,R8D
XOR ECX,ECX
XOR EDX,EDX
MOV RDI,RBP
CALL 0x00101110
MOV RDI... | 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,"\\w*z.\\w*",1);
if (iVar1 == 0) {
iVar1 = regexec(&rStack_c8,param_1,0,(regmatch_t *)0x0,0);
... |
5,712 | func0 |
#include <stdbool.h>
#include <assert.h>
| bool func0(int monthnum2) {
if (monthnum2 == 1 || monthnum2 == 3 || monthnum2 == 5 || monthnum2 == 7 || monthnum2 == 8 || monthnum2 == 10 || monthnum2 == 12) {
return true;
} else {
return false;
}
}
| int main() {
assert(func0(5) == true);
assert(func0(2) == false);
assert(func0(6) == false);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x4(%rbp)
cmpl $0x1,-0x4(%rbp)
je 117e <func0+0x35>
cmpl $0x3,-0x4(%rbp)
je 117e <func0+0x35>
cmpl $0x5,-0x4(%rbp)
je 117e <func0+0x35>
cmpl $0x7,-0x4(%rbp)
je 117e <func0+0x35>
cmpl $0x8,-0x4(%rbp)
je 117e <func0+0x35>
cmpl $0xa,-... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
cmp [rbp+var_4], 1
jz short loc_117E
cmp [rbp+var_4], 3
jz short loc_117E
cmp [rbp+var_4], 5
jz short loc_117E
cmp [rbp+var_4], 7
jz short loc_117E
cmp [rbp+var_4], 8
jz short loc_117E
cmp [rbp+var_4], ... | _BOOL8 func0(int a1)
{
return a1 == 1 || a1 == 3 || a1 == 5 || a1 == 7 || a1 == 8 || a1 == 10 || a1 == 12;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
CMP dword ptr [RBP + -0x4],0x1
JZ 0x0010117e
CMP dword ptr [RBP + -0x4],0x3
JZ 0x0010117e
CMP dword ptr [RBP + -0x4],0x5
JZ 0x0010117e
CMP dword ptr [RBP + -0x4],0x7
JZ 0x0010117e
CMP dword ptr [RBP + -0x4],0x8
JZ 0x0010117e
CMP dword ptr [RBP + -0x4],0... | int8 func0(int param_1)
{
int8 uVar1;
if ((((param_1 == 1) || (param_1 == 3)) || (param_1 == 5)) ||
(((param_1 == 7 || (param_1 == 8)) || ((param_1 == 10 || (param_1 == 0xc)))))) {
uVar1 = 1;
}
else {
uVar1 = 0;
}
return uVar1;
} |
5,713 | func0 |
#include <stdbool.h>
#include <assert.h>
| bool func0(int monthnum2) {
if (monthnum2 == 1 || monthnum2 == 3 || monthnum2 == 5 || monthnum2 == 7 || monthnum2 == 8 || monthnum2 == 10 || monthnum2 == 12) {
return true;
} else {
return false;
}
}
| int main() {
assert(func0(5) == true);
assert(func0(2) == false);
assert(func0(6) == false);
return 0;
}
| O1 | c | func0:
endbr64
mov %edi,%edx
and $0xfffffffd,%edx
mov $0x1,%eax
cmp $0x1,%edx
je 114f <func0+0x26>
cmp $0x5,%edx
je 114f <func0+0x26>
cmp $0xc,%edi
sete %al
cmp $0x8,%edx
sete %dl
or %edx,%eax
retq
| func0:
endbr64
cmp edi, 0Ch
ja short loc_1140
mov eax, 15AAh
mov ecx, edi
shr rax, cl
and eax, 1
retn
loc_1140:
mov eax, 0
retn | unsigned long long func0(unsigned int a1)
{
if ( a1 > 0xC )
return 0LL;
else
return (0x15AAuLL >> a1) & 1;
} | func0:
ENDBR64
CMP EDI,0xc
JA 0x00101140
MOV EAX,0x15aa
MOV ECX,EDI
SHR RAX,CL
AND EAX,0x1
RET
LAB_00101140:
MOV EAX,0x0
RET | uint func0(uint param_1)
{
if (param_1 < 0xd) {
return (uint)(0x15aaL >> ((byte)param_1 & 0x3f)) & 1;
}
return 0;
} |
5,714 | func0 |
#include <stdbool.h>
#include <assert.h>
| bool func0(int monthnum2) {
if (monthnum2 == 1 || monthnum2 == 3 || monthnum2 == 5 || monthnum2 == 7 || monthnum2 == 8 || monthnum2 == 10 || monthnum2 == 12) {
return true;
} else {
return false;
}
}
| int main() {
assert(func0(5) == true);
assert(func0(2) == false);
assert(func0(6) == false);
return 0;
}
| O2 | c | func0:
endbr64
mov %edi,%edx
mov %edi,%ecx
mov $0x1,%eax
and $0xfffffff9,%edx
and $0xfffffffd,%ecx
cmp $0x1,%edx
je 1166 <func0+0x26>
cmp $0x8,%ecx
sete %al
cmp $0xc,%edi
sete %dl
or %edx,%eax
retq
nopw 0x0(%rax,%rax,1)
| func0:
endbr64
cmp edi, 0Ch
ja short loc_1160
mov ecx, edi
mov eax, 15AAh
shr rax, cl
and eax, 1
retn
loc_1160:
xor eax, eax
retn | unsigned long long func0(unsigned int a1)
{
if ( a1 > 0xC )
return 0LL;
else
return (0x15AAuLL >> a1) & 1;
} | func0:
ENDBR64
CMP EDI,0xc
JA 0x00101160
MOV ECX,EDI
MOV EAX,0x15aa
SHR RAX,CL
AND EAX,0x1
RET
LAB_00101160:
XOR EAX,EAX
RET | uint func0(uint param_1)
{
if (param_1 < 0xd) {
return (uint)(0x15aaL >> ((byte)param_1 & 0x3f)) & 1;
}
return 0;
} |
5,715 | func0 |
#include <stdbool.h>
#include <assert.h>
| bool func0(int monthnum2) {
if (monthnum2 == 1 || monthnum2 == 3 || monthnum2 == 5 || monthnum2 == 7 || monthnum2 == 8 || monthnum2 == 10 || monthnum2 == 12) {
return true;
} else {
return false;
}
}
| int main() {
assert(func0(5) == true);
assert(func0(2) == false);
assert(func0(6) == false);
return 0;
}
| O3 | c | func0:
endbr64
mov %edi,%edx
mov %edi,%ecx
mov $0x1,%eax
and $0xfffffff9,%edx
and $0xfffffffd,%ecx
cmp $0x1,%edx
je 1166 <func0+0x26>
cmp $0x8,%ecx
sete %al
cmp $0xc,%edi
sete %dl
or %edx,%eax
retq
nopw 0x0(%rax,%rax,1)
| func0:
endbr64
xor eax, eax
cmp edi, 0Ch
ja short locret_1157
mov eax, 15AAh
bt rax, rdi
setb al
locret_1157:
retn | unsigned __int8 func0(unsigned long long a1)
{
unsigned __int8 result; // al
long long v2; // rax
result = 0;
if ( (unsigned int)a1 <= 0xC )
{
v2 = 5546LL;
return _bittest64(&v2, a1);
}
return result;
} | func0:
ENDBR64
XOR EAX,EAX
CMP EDI,0xc
JA 0x00101157
MOV EAX,0x15aa
BT RAX,RDI
SETC AL
LAB_00101157:
RET | int8 func0(uint param_1)
{
int8 uVar1;
uVar1 = 0;
if (param_1 < 0xd) {
uVar1 = CONCAT71(0x15,(0x15aaUL >> ((ulong)param_1 & 0x3f) & 1) != 0);
}
return uVar1;
} |
5,716 | func0 |
#include <assert.h>
#include <string.h>
void reverse_string(char* str) {
int n = strlen(str);
for (int i = 0; i < n / 2; i++) {
char temp = str[i];
str[i] = str[n - i - 1];
str[n - i - 1] = temp;
}
}
| void func0(char stringlist[][50], int size) {
for (int i = 0; i < size; i++) {
reverse_string(stringlist[i]);
}
}
| int main() {
char list1[][50] = {"Red", "Green", "Blue", "White", "Black"};
char list2[][50] = {"john", "amal", "joel", "george"};
char list3[][50] = {"jack", "john", "mary"};
func0(list1, 5);
assert(strcmp(list1[0], "deR") == 0);
assert(strcmp(list1[1], "neerG") == 0);
assert(strcm... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
movl $0x0,-0x4(%rbp)
jmp 128b <func0+0x50>
mov -0x4(%rbp),%eax
movslq %eax,%rdx
mov %rdx,%rax
shl $0x2,%rax
add %rdx,%rax
lea 0x0(,%rax,4),%rdx
add %rdx,%rax
add %rax,%rax
mov %rax,... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_4], 0
jmp short loc_128B
loc_1257:
mov eax, [rbp+var_4]
movsxd rdx, eax
mov rax, rdx
shl rax, 2
add rax, rdx
lea rdx, ds:0[rax*4]
add rax, rdx
add rax, rax
m... | long long func0(long long a1, int a2)
{
long long result; // rax
unsigned int i; // [rsp+1Ch] [rbp-4h]
for ( i = 0; ; ++i )
{
result = i;
if ( (int)i >= a2 )
break;
reverse_string(50LL * (int)i + a1);
}
return result;
} | 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 + -0x4],0x0
JMP 0x0010128b
LAB_00101257:
MOV EAX,dword ptr [RBP + -0x4]
MOVSXD RDX,EAX
MOV RAX,RDX
SHL RAX,0x2
ADD RAX,RDX
LEA RDX,[RAX*0x4]
ADD RAX,RDX
ADD RAX,RAX
MOV RDX,RAX
MOV RAX,qwo... | void func0(long param_1,int param_2)
{
int4 local_c;
for (local_c = 0; local_c < param_2; local_c = local_c + 1) {
reverse_string(param_1 + (long)local_c * 0x32);
}
return;
} |
5,717 | func0 |
#include <assert.h>
#include <string.h>
void reverse_string(char* str) {
int n = strlen(str);
for (int i = 0; i < n / 2; i++) {
char temp = str[i];
str[i] = str[n - i - 1];
str[n - i - 1] = temp;
}
}
| void func0(char stringlist[][50], int size) {
for (int i = 0; i < size; i++) {
reverse_string(stringlist[i]);
}
}
| int main() {
char list1[][50] = {"Red", "Green", "Blue", "White", "Black"};
char list2[][50] = {"john", "amal", "joel", "george"};
char list3[][50] = {"jack", "john", "mary"};
func0(list1, 5);
assert(strcmp(list1[0], "deR") == 0);
assert(strcmp(list1[1], "neerG") == 0);
assert(strcm... | O1 | c | func0:
endbr64
test %esi,%esi
jle 11f0 <func0+0x31>
push %rbp
push %rbx
mov %rdi,%rbx
lea -0x1(%rsi),%eax
lea (%rax,%rax,4),%rax
lea (%rax,%rax,4),%rax
lea 0x32(%rdi,%rax,2),%rbp
mov %rbx,%rdi
callq 1169 <reverse_string>
add $0x32,%rbx
cmp %rbp,%rbx
jne 11dc <func0+0x1d>
pop %rbx... | func0:
endbr64
test esi, esi
jle short locret_1224
push rbp
push rbx
sub rsp, 8
mov rbx, rdi
lea eax, [rsi-1]
lea rax, [rax+rax*4]
lea rax, [rax+rax*4]
lea rbp, [rdi+rax*2+32h]
loc_120C:
mov rdi, rbx
call reverse_string
add rbx, 32h ; '2'
cmp rbx, rbp
jnz short lo... | long long func0(long long a1, int a2)
{
long long v2; // rbx
long long result; // rax
if ( a2 > 0 )
{
v2 = a1;
do
{
result = reverse_string(v2);
v2 += 50LL;
}
while ( v2 != a1 + 50LL * (unsigned int)(a2 - 1) + 50 );
}
return result;
} | func0:
ENDBR64
TEST ESI,ESI
JLE 0x00101224
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RBX,RDI
LEA EAX,[RSI + -0x1]
LEA RAX,[RAX + RAX*0x4]
LEA RAX,[RAX + RAX*0x4]
LEA RBP,[RDI + RAX*0x2 + 0x32]
LAB_0010120c:
MOV RDI,RBX
CALL 0x001011a9
ADD RBX,0x32
CMP RBX,RBP
JNZ 0x0010120c
ADD RSP,0x8
POP RBX
POP RBP
RET
LAB_00101224:
RET | void func0(long param_1,int param_2)
{
long lVar1;
if (0 < param_2) {
lVar1 = param_1 + 0x32;
do {
reverse_string(param_1);
param_1 = param_1 + 0x32;
} while (param_1 != lVar1 + (ulong)(param_2 - 1) * 0x32);
return;
}
return;
} |
5,718 | func0 |
#include <assert.h>
#include <string.h>
void reverse_string(char* str) {
int n = strlen(str);
for (int i = 0; i < n / 2; i++) {
char temp = str[i];
str[i] = str[n - i - 1];
str[n - i - 1] = temp;
}
}
| void func0(char stringlist[][50], int size) {
for (int i = 0; i < size; i++) {
reverse_string(stringlist[i]);
}
}
| int main() {
char list1[][50] = {"Red", "Green", "Blue", "White", "Black"};
char list2[][50] = {"john", "amal", "joel", "george"};
char list3[][50] = {"jack", "john", "mary"};
func0(list1, 5);
assert(strcmp(list1[0], "deR") == 0);
assert(strcmp(list1[1], "neerG") == 0);
assert(strcm... | O2 | c | func0:
endbr64
test %esi,%esi
jle 1730 <func0+0x40>
push %rbp
lea -0x1(%rsi),%eax
push %rbx
lea (%rax,%rax,4),%rax
mov %rdi,%rbx
lea (%rax,%rax,4),%rax
lea 0x32(%rdi,%rax,2),%rbp
sub $0x8,%rsp
nopl 0x0(%rax)
mov %rbx,%rdi
add $0x32,%rbx
callq 16a0 <reverse_string>
cmp %rbp,%rbx
jn... | func0:
endbr64
test esi, esi
jle short locret_16EA
push rbp
lea eax, [rsi-1]
push rbx
lea rax, [rax+rax*4]
mov rbx, rdi
lea rax, [rax+rax*4]
lea rbp, [rdi+rax*2+32h]
sub rsp, 8
nop dword ptr [rax+00000000h]
loc_1698:
mov rdi, rbx
call _strlen
mov edi, eax
shr edi,... | void func0(long long a1, int a2)
{
long long v2; // rbx
long long v3; // rbp
int v4; // eax
int v5; // edi
char *v6; // rdx
long long v7; // rax
char v8; // si
char v9; // cl
if ( a2 > 0 )
{
v2 = a1;
v3 = a1 + 50LL * (unsigned int)(a2 - 1) + 50;
do
{
v4 = strlen(v2);
v5... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x001016ea
PUSH RBP
LEA EAX,[RSI + -0x1]
PUSH RBX
LEA RAX,[RAX + RAX*0x4]
MOV RBX,RDI
LEA RAX,[RAX + RAX*0x4]
LEA RBP,[RDI + RAX*0x2 + 0x32]
SUB RSP,0x8
NOP dword ptr [RAX]
LAB_00101698:
MOV RDI,RBX
CALL 0x00101080
MOV EDI,EAX
SHR EDI,0x1f
ADD EDI,EAX
SAR EDI,0x1
CMP EAX,0x1
JLE 0x001016... | void func0(char *param_1,int param_2)
{
char *pcVar1;
char cVar2;
int iVar3;
size_t sVar4;
long lVar5;
char *pcVar6;
if (0 < param_2) {
pcVar1 = param_1 + (ulong)(param_2 - 1) * 0x32 + 0x32;
do {
sVar4 = strlen(param_1);
iVar3 = (int)sVar4;
if (1 < iVar3) {
lVar5 = 0;... |
5,719 | func0 |
#include <assert.h>
#include <string.h>
void reverse_string(char* str) {
int n = strlen(str);
for (int i = 0; i < n / 2; i++) {
char temp = str[i];
str[i] = str[n - i - 1];
str[n - i - 1] = temp;
}
}
| void func0(char stringlist[][50], int size) {
for (int i = 0; i < size; i++) {
reverse_string(stringlist[i]);
}
}
| int main() {
char list1[][50] = {"Red", "Green", "Blue", "White", "Black"};
char list2[][50] = {"john", "amal", "joel", "george"};
char list3[][50] = {"jack", "john", "mary"};
func0(list1, 5);
assert(strcmp(list1[0], "deR") == 0);
assert(strcmp(list1[1], "neerG") == 0);
assert(strcm... | O3 | c | func0:
endbr64
test %esi,%esi
jle 17e0 <func0+0x80>
push %rbp
lea -0x1(%rsi),%eax
push %rbx
lea (%rax,%rax,4),%rax
mov %rdi,%rbx
lea (%rax,%rax,4),%rax
lea 0x32(%rdi,%rax,2),%rbp
sub $0x8,%rsp
nopl 0x0(%rax)
mov %rbx,%rdi
callq 1070 <strlen@plt>
mov %eax,%edx
shr $0x1f,%edx
add ... | func0:
endbr64
test esi, esi
jle short locret_184A
push rbp
movsxd rsi, esi
push rbx
lea rax, [rsi+rsi*4]
mov rbx, rdi
lea rax, [rax+rax*4]
lea rbp, [rdi+rax*2]
sub rsp, 8
loc_1800:
mov rdi, rbx; s
call _strlen
mov edi, eax
shr edi, 1Fh
add edi, eax
sar edi, 1
cm... | void func0(char *s, int a2)
{
const char *v2; // rbx
char *v3; // rbp
int v4; // eax
int v5; // edi
const char *v6; // rdx
long long v7; // rax
char v8; // si
char v9; // cl
if ( a2 > 0 )
{
v2 = s;
v3 = &s[50 * a2];
do
{
v4 = strlen(v2);
v5 = v4 / 2;
if ( v4 > 1 )... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x0010184a
PUSH RBP
MOVSXD RSI,ESI
PUSH RBX
LEA RAX,[RSI + RSI*0x4]
MOV RBX,RDI
LEA RAX,[RAX + RAX*0x4]
LEA RBP,[RDI + RAX*0x2]
SUB RSP,0x8
LAB_00101800:
MOV RDI,RBX
CALL 0x00101080
MOV EDI,EAX
SHR EDI,0x1f
ADD EDI,EAX
SAR EDI,0x1
CMP EAX,0x1
JLE 0x0010183a
CDQE
LEA RDX,[RBX + RAX*0x1 + ... | void func0(char *param_1,int param_2)
{
char *pcVar1;
char cVar2;
int iVar3;
size_t sVar4;
long lVar5;
char *pcVar6;
if (0 < param_2) {
pcVar1 = param_1 + (long)param_2 * 0x32;
do {
sVar4 = strlen(param_1);
iVar3 = (int)sVar4;
if (1 < iVar3) {
lVar5 = 0;
pcVar... |
5,720 | func0 |
#include <assert.h>
#include <string.h>
// Define a struct to deal with list of strings
typedef struct {
char **elems;
int size;
} StringList;
| StringList func0(StringList lst) {
int minIndex = 0;
for (int i = 1; i < lst.size; i++) {
if (strcmp(lst.elems[i], lst.elems[minIndex]) < 0) {
minIndex = i;
}
}
StringList result = { .elems = &lst.elems[minIndex], .size = 1 };
return result;
}
| int main() {
// Test 1
char *list1[] = {"1", "1,2", "1,2,3"};
StringList lst1 = { list1, 3 };
StringList result1 = func0(lst1);
assert(strcmp(result1.elems[0], "1") == 0);
// Test 2
char *list2[] = {"1,1", "1,1,1", "1,2,7,8"};
StringList lst2 = { list2, 3 };
StringList res... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x30,%rsp
mov %rdi,%rax
mov %rsi,%rcx
mov %rcx,%rdx
mov %rax,-0x30(%rbp)
mov %rdx,-0x28(%rbp)
movl $0x0,-0x18(%rbp)
movl $0x1,-0x14(%rbp)
jmp 11f7 <func0+0x6e>
mov -0x30(%rbp),%rax
mov -0x18(%rbp),%edx
movslq %edx,%rdx
shl $0x3,%rdx
add ... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 30h
mov rax, rdi
mov rcx, rsi
mov rdx, rcx
mov [rbp+var_30], rax
mov [rbp+var_28], rdx
mov [rbp+var_18], 0
mov [rbp+var_14], 1
jmp short loc_11F7
loc_11B6:
mov rax, [rbp+var_30]
mov edx, [rbp+var_18]
movsxd rdx, edx
shl ... | long long func0(long long a1, int a2)
{
int v3; // [rsp+18h] [rbp-18h]
int i; // [rsp+1Ch] [rbp-14h]
v3 = 0;
for ( i = 1; i < a2; ++i )
{
if ( strcmp(*(const char **)(8LL * i + a1), *(const char **)(8LL * v3 + a1)) < 0 )
v3 = i;
}
return 8LL * v3 + a1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV RAX,RDI
MOV RCX,RSI
MOV RDX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV qword ptr [RBP + -0x28],RDX
MOV dword ptr [RBP + -0x18],0x0
MOV dword ptr [RBP + -0x14],0x1
JMP 0x001011f7
LAB_001011b6:
MOV RAX,qword ptr [RBP + -0x30]
MOV EDX,dword ptr [RBP + -0x18]
MOVSXD RDX,EDX... | int [16] func0(long param_1,int param_2)
{
int auVar1 [16];
int iVar2;
int4 local_20;
int4 local_1c;
int4 uStack_c;
local_20 = 0;
for (local_1c = 1; local_1c < param_2; local_1c = local_1c + 1) {
iVar2 = strcmp(*(char **)(param_1 + (long)local_1c * 8),*(char **)(param_1 + (long)local_20 * 8)
... |
5,721 | func0 |
#include <assert.h>
#include <string.h>
// Define a struct to deal with list of strings
typedef struct {
char **elems;
int size;
} StringList;
| StringList func0(StringList lst) {
int minIndex = 0;
for (int i = 1; i < lst.size; i++) {
if (strcmp(lst.elems[i], lst.elems[minIndex]) < 0) {
minIndex = i;
}
}
StringList result = { .elems = &lst.elems[minIndex], .size = 1 };
return result;
}
| int main() {
// Test 1
char *list1[] = {"1", "1,2", "1,2,3"};
StringList lst1 = { list1, 3 };
StringList result1 = func0(lst1);
assert(strcmp(result1.elems[0], "1") == 0);
// Test 2
char *list2[] = {"1,1", "1,1,1", "1,2,7,8"};
StringList lst2 = { list2, 3 };
StringList res... | O1 | c | func0:
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
mov %rdi,%r13
cmp $0x1,%esi
jle 11e6 <func0+0x5d>
mov %rdi,%r12
lea -0x2(%rsi),%r14d
add $0x2,%r14
mov $0x1,%ebx
mov $0x0,%ebp
movslq %ebp,%rax
mov (%r12,%rax,8),%rsi
mov (%r12,%rbx,8),%rdi
callq 1090 <strcmp@plt>
... | func0:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov r12, rdi
cmp esi, 1
jle short loc_11E1
mov r13d, esi
mov ebx, 1
mov ebp, 0
loc_11AC:
movsxd rax, ebp
mov rsi, [r12+rax*8]
mov rdi, [r12+rbx*8]
call _strcmp
test eax, eax
cmovs ebp, ebx
add rbx,... | long long func0(long long a1, int a2)
{
long long v2; // rbx
int v3; // ebp
if ( a2 <= 1 )
{
v3 = 0;
}
else
{
v2 = 1LL;
v3 = 0;
do
{
if ( (int)strcmp(*(_QWORD *)(a1 + 8 * v2), *(_QWORD *)(a1 + 8LL * v3)) < 0 )
v3 = v2;
++v2;
}
while ( v2 != a2 );
}
ret... | ||
5,722 | func0 |
#include <assert.h>
#include <string.h>
// Define a struct to deal with list of strings
typedef struct {
char **elems;
int size;
} StringList;
| StringList func0(StringList lst) {
int minIndex = 0;
for (int i = 1; i < lst.size; i++) {
if (strcmp(lst.elems[i], lst.elems[minIndex]) < 0) {
minIndex = i;
}
}
StringList result = { .elems = &lst.elems[minIndex], .size = 1 };
return result;
}
| int main() {
// Test 1
char *list1[] = {"1", "1,2", "1,2,3"};
StringList lst1 = { list1, 3 };
StringList result1 = func0(lst1);
assert(strcmp(result1.elems[0], "1") == 0);
// Test 2
char *list2[] = {"1,1", "1,1,1", "1,2,7,8"};
StringList lst2 = { list2, 3 };
StringList res... | O2 | c | func0:
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
mov %rdi,%rbp
push %rbx
sub $0x8,%rsp
cmp $0x1,%esi
jle 1368 <func0+0x78>
mov %esi,%r13d
lea 0x8(%rdi),%r14
mov $0x1,%ebx
xor %r15d,%r15d
nopl 0x0(%rax)
movslq %r15d,%rax
mov (%r14),%rdi
lea 0x0(%rbp,%rax,8),%r1... | func0:
endbr64
push r15
push r14
mov r14, rdi
push r13
push r12
push rbp
push rbx
sub rsp, 8
cmp esi, 1
jle short loc_1368
mov r15d, esi
lea rbp, [rdi+8]
mov ebx, 1
xor r13d, r13d
nop dword ptr [rax+00000000h]
loc_1320:
movsxd rax, r13d
mov rdi, [rbp+0]
lea ... | _QWORD * func0(long long a1, int a2)
{
_QWORD *v2; // rbp
int v3; // ebx
int v4; // r13d
_QWORD *v5; // r12
if ( a2 <= 1 )
return (_QWORD *)a1;
v2 = (_QWORD *)(a1 + 8);
v3 = 1;
v4 = 0;
do
{
v5 = (_QWORD *)(a1 + 8LL * v4);
if ( (int)strcmp(*v2, *v5) < 0 )
{
v5 = v2;
v4 = ... | func0:
ENDBR64
PUSH R15
PUSH R14
MOV R14,RDI
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
CMP ESI,0x1
JLE 0x00101368
MOV R15D,ESI
LEA RBP,[RDI + 0x8]
MOV EBX,0x1
XOR R13D,R13D
NOP dword ptr [RAX]
LAB_00101320:
MOVSXD RAX,R13D
MOV RDI,qword ptr [RBP]
LEA R12,[R14 + RAX*0x8]
MOV RSI,qword ptr [R12]
CALL 0x00101090
TES... | int1 [16] func0(int8 *param_1,int param_2)
{
int iVar1;
int iVar2;
int8 *puVar3;
int8 *puVar4;
int iVar5;
int1 auVar6 [16];
puVar4 = param_1;
if (1 < param_2) {
puVar3 = param_1 + 1;
iVar2 = 1;
iVar5 = 0;
do {
iVar1 = strcmp((char *)*puVar3,(char *)param_1[iVar5]);
puVar... |
5,723 | func0 |
#include <assert.h>
#include <string.h>
// Define a struct to deal with list of strings
typedef struct {
char **elems;
int size;
} StringList;
| StringList func0(StringList lst) {
int minIndex = 0;
for (int i = 1; i < lst.size; i++) {
if (strcmp(lst.elems[i], lst.elems[minIndex]) < 0) {
minIndex = i;
}
}
StringList result = { .elems = &lst.elems[minIndex], .size = 1 };
return result;
}
| int main() {
// Test 1
char *list1[] = {"1", "1,2", "1,2,3"};
StringList lst1 = { list1, 3 };
StringList result1 = func0(lst1);
assert(strcmp(result1.elems[0], "1") == 0);
// Test 2
char *list2[] = {"1,1", "1,1,1", "1,2,7,8"};
StringList lst2 = { list2, 3 };
StringList res... | O3 | c | func0:
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
mov %rdi,%rbp
push %rbx
sub $0x18,%rsp
cmp $0x1,%esi
jle 13a0 <func0+0x90>
lea -0x2(%rsi),%r14d
movl $0x0,0xc(%rsp)
mov (%rdi),%r15
mov $0x1,%ebx
add $0x2,%r14
jmp 135b <func0+0x4b>
nopl 0x0(%rax)
movslq 0xc(%rsp... | func0:
endbr64
push r15
push r14
push r13
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 8
cmp esi, 1
jle short loc_1390
mov r14, [rdi]
mov r13d, esi
mov ebx, 1
xor r15d, r15d
jmp short loc_1351
loc_1340:
movsxd rax, r15d
add rbx, 1
lea rax, [rbp+rax*8+0]... | const char ** func0(const char **a1, int a2)
{
const char *v2; // r14
long long v3; // rbx
int v4; // r15d
const char **result; // rax
const char *v6; // r12
if ( a2 <= 1 )
return a1;
v2 = *a1;
v3 = 1LL;
v4 = 0;
do
{
while ( 1 )
{
v6 = a1[v3];
if ( strcmp(v6, v2) < 0 )
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x8
CMP ESI,0x1
JLE 0x00101390
MOV R14,qword ptr [RDI]
MOV R13D,ESI
MOV EBX,0x1
XOR R15D,R15D
JMP 0x00101351
LAB_00101340:
MOVSXD RAX,R15D
ADD RBX,0x1
LEA RAX,[RBP + RAX*0x8]
CMP R13,RBX
JZ 0x00101379
LAB_00101351:
MOV R12,qword pt... | int [16] func0(int8 *param_1,uint param_2)
{
char *__s1;
int iVar1;
int8 *puVar2;
int iVar3;
ulong uVar4;
char *__s2;
int auVar5 [16];
puVar2 = param_1;
if (1 < (int)param_2) {
uVar4 = 1;
iVar3 = 0;
__s2 = (char *)*param_1;
do {
while( true ) {
__s1 = (char *)param_1... |
5,724 | func0 | #include <assert.h>
| int func0(int l, int b) {
int area = l * b;
return area;
}
| int main() {
assert(func0(10, 20) == 200);
assert(func0(10, 5) == 50);
assert(func0(4, 2) == 8);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
mov %esi,-0x18(%rbp)
mov -0x14(%rbp),%eax
imul -0x18(%rbp),%eax
mov %eax,-0x4(%rbp)
mov -0x4(%rbp),%eax
pop %rbp
retq
| func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_18], esi
mov eax, [rbp+var_14]
imul eax, [rbp+var_18]
mov [rbp+var_4], eax
mov eax, [rbp+var_4]
pop rbp
retn | long long func0(int a1, int a2)
{
return (unsigned int)(a2 * a1);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x18],ESI
MOV EAX,dword ptr [RBP + -0x14]
IMUL EAX,dword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x4],EAX
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET | int func0(int param_1,int param_2)
{
return param_1 * param_2;
} |
5,725 | func0 | #include <assert.h>
| int func0(int l, int b) {
int area = l * b;
return area;
}
| int main() {
assert(func0(10, 20) == 200);
assert(func0(10, 5) == 50);
assert(func0(4, 2) == 8);
return 0;
}
| O1 | c | func0:
endbr64
mov %edi,%eax
imul %esi,%eax
retq
| func0:
endbr64
mov eax, edi
imul eax, esi
retn | long long func0(int a1, int a2)
{
return (unsigned int)(a2 * a1);
} | func0:
ENDBR64
MOV EAX,EDI
IMUL EAX,ESI
RET | int func0(int param_1,int param_2)
{
return param_1 * param_2;
} |
5,726 | func0 | #include <assert.h>
| int func0(int l, int b) {
int area = l * b;
return area;
}
| int main() {
assert(func0(10, 20) == 200);
assert(func0(10, 5) == 50);
assert(func0(4, 2) == 8);
return 0;
}
| O2 | c | func0:
endbr64
mov %edi,%eax
imul %esi,%eax
retq
nopw 0x0(%rax,%rax,1)
| func0:
endbr64
mov eax, edi
imul eax, esi
retn | long long func0(int a1, int a2)
{
return (unsigned int)(a2 * a1);
} | func0:
ENDBR64
MOV EAX,EDI
IMUL EAX,ESI
RET | int func0(int param_1,int param_2)
{
return param_1 * param_2;
} |
5,727 | func0 | #include <assert.h>
| int func0(int l, int b) {
int area = l * b;
return area;
}
| int main() {
assert(func0(10, 20) == 200);
assert(func0(10, 5) == 50);
assert(func0(4, 2) == 8);
return 0;
}
| O3 | c | func0:
endbr64
mov %edi,%eax
imul %esi,%eax
retq
nopw 0x0(%rax,%rax,1)
| func0:
endbr64
mov eax, edi
imul eax, esi
retn | long long func0(int a1, int a2)
{
return (unsigned int)(a2 * a1);
} | func0:
ENDBR64
MOV EAX,EDI
IMUL EAX,ESI
RET | int func0(int param_1,int param_2)
{
return param_1 * param_2;
} |
5,728 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <assert.h>
| char* func0(const char* str1) {
size_t len = strlen(str1);
char* result = malloc(len + 1);
if (!result) return NULL;
size_t j = 0;
for(size_t i = 0; i < len; i++) {
if (!isupper((unsigned char)str1[i])) {
result[j++] = str1[i];
}
}
result[j] = '\0';
... | int main() {
char* res1 = func0("cAstyoUrFavoRitETVshoWs");
assert(strcmp(res1, "cstyoravoitshos") == 0);
free(res1);
char* res2 = func0("wAtchTheinTernEtrAdIo");
assert(strcmp(res2, "wtchheinerntrdo") == 0);
free(res2);
char* res3 = func0("VoicESeaRchAndreComMendaTionS");
as... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x30,%rsp
mov %rdi,-0x28(%rbp)
mov -0x28(%rbp),%rax
mov %rax,%rdi
callq 10b0 <strlen@plt>
mov %rax,-0x10(%rbp)
mov -0x10(%rbp),%rax
add $0x1,%rax
mov %rax,%rdi
callq 10e0 <malloc@plt>
mov %rax,-0x8(%rbp)
cmpq $0x0,-0x8(%rbp)
jne 122e <fu... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+s], rdi
mov rax, [rbp+s]
mov rdi, rax; s
call _strlen
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
add rax, 1
mov rdi, rax; size
call _malloc
mov [rbp+var_8], rax
cmp [rbp+var_8], 0
jnz short loc_122E
mov ... | _BYTE * func0(const char *a1)
{
long long v2; // rax
long long v3; // [rsp+10h] [rbp-20h]
size_t i; // [rsp+18h] [rbp-18h]
size_t v5; // [rsp+20h] [rbp-10h]
_BYTE *v6; // [rsp+28h] [rbp-8h]
v5 = strlen(a1);
v6 = malloc(v5 + 1);
if ( !v6 )
return 0LL;
v3 = 0LL;
for ( i = 0LL; i < v5; ++i )
{
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x28],RDI
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,RAX
CALL 0x001010b0
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV RDI,RAX
CALL 0x001010e0
MOV qword ptr [RBP + -0x8],RAX
CMP qword ptr [RBP + -0x8],0x0
JNZ 0x0010122... | void * func0(char *param_1)
{
size_t sVar1;
void *pvVar2;
ushort **ppuVar3;
long local_28;
ulong local_20;
sVar1 = strlen(param_1);
pvVar2 = malloc(sVar1 + 1);
if (pvVar2 == (void *)0x0) {
pvVar2 = (void *)0x0;
}
else {
local_28 = 0;
for (local_20 = 0; local_20 < sVar1; local_20 = lo... |
5,729 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <assert.h>
| char* func0(const char* str1) {
size_t len = strlen(str1);
char* result = malloc(len + 1);
if (!result) return NULL;
size_t j = 0;
for(size_t i = 0; i < len; i++) {
if (!isupper((unsigned char)str1[i])) {
result[j++] = str1[i];
}
}
result[j] = '\0';
... | int main() {
char* res1 = func0("cAstyoUrFavoRitETVshoWs");
assert(strcmp(res1, "cstyoravoitshos") == 0);
free(res1);
char* res2 = func0("wAtchTheinTernEtrAdIo");
assert(strcmp(res2, "wtchheinerntrdo") == 0);
free(res2);
char* res3 = func0("VoicESeaRchAndreComMendaTionS");
as... | O1 | c | func0:
endbr64
push %r12
push %rbp
push %rbx
mov %rdi,%r12
mov $0xffffffffffffffff,%rcx
mov $0x0,%eax
repnz scas %es:(%rdi),%al
mov %rcx,%rdi
not %rdi
lea -0x1(%rdi),%rbx
callq 10a0 <malloc@plt>
mov %rax,%rbp
test %rax,%rax
je 1219 <func0+0x70>
test %rbx,%rbx
je 1214 <func0+0x6b>... | func0:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov r12, rdi
call _strlen
mov r13, rax
mov rbx, rax
lea rdi, [rax+1]
call _malloc
mov rbp, rax
test rax, rax
jz short loc_1256
test r13, r13
jz short loc_1251
call ___ctype_b_loc
mov rdi, [rax]... | long long func0(_BYTE *a1)
{
long long v2; // r13
long long v3; // rbx
long long v4; // rbp
long long v5; // rdi
_BYTE *v6; // rax
v2 = strlen();
v3 = v2;
v4 = malloc(v2 + 1);
if ( v4 )
{
if ( v2 )
{
v5 = *(_QWORD *)__ctype_b_loc();
v6 = a1;
v3 = 0LL;
do
{
... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV R12,RDI
CALL 0x001010b0
MOV R13,RAX
MOV RBX,RAX
LEA RDI,[RAX + 0x1]
CALL 0x001010e0
MOV RBP,RAX
TEST RAX,RAX
JZ 0x00101256
TEST R13,R13
JZ 0x00101251
CALL 0x001010f0
MOV RDI,qword ptr [RAX]
MOV RAX,R12
LEA RSI,[R12 + R13*0x1]
MOV EBX,0x0
JMP 0x0010123a
... | void * func0(byte *param_1)
{
byte *pbVar1;
ushort *puVar2;
size_t sVar3;
void *pvVar4;
ushort **ppuVar5;
sVar3 = strlen((char *)param_1);
pvVar4 = malloc(sVar3 + 1);
if (pvVar4 != (void *)0x0) {
if (sVar3 != 0) {
ppuVar5 = __ctype_b_loc();
puVar2 = *ppuVar5;
pbVar1 = param_1 +... |
5,730 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <assert.h>
| char* func0(const char* str1) {
size_t len = strlen(str1);
char* result = malloc(len + 1);
if (!result) return NULL;
size_t j = 0;
for(size_t i = 0; i < len; i++) {
if (!isupper((unsigned char)str1[i])) {
result[j++] = str1[i];
}
}
result[j] = '\0';
... | int main() {
char* res1 = func0("cAstyoUrFavoRitETVshoWs");
assert(strcmp(res1, "cstyoravoitshos") == 0);
free(res1);
char* res2 = func0("wAtchTheinTernEtrAdIo");
assert(strcmp(res2, "wtchheinerntrdo") == 0);
free(res2);
char* res3 = func0("VoicESeaRchAndreComMendaTionS");
as... | O2 | c | func0:
endbr64
push %r12
push %rbp
push %rbx
mov %rdi,%rbx
callq 10a0 <strlen@plt>
lea 0x1(%rax),%rdi
mov %rax,%rbp
callq 10c0 <malloc@plt>
mov %rax,%r12
test %rax,%rax
je 1337 <func0+0x67>
test %rbp,%rbp
je 1340 <func0+0x70>
callq 10d0 <__ctype_b_loc@plt>
mov %rbx,%rdi
lea (%rbx,... | func0:
endbr64
push r12
push rbp
push rbx
mov rbx, rdi
call _strlen
lea rdi, [rax+1]
mov rbp, rax
call _malloc
mov r12, rax
test rax, rax
jz short loc_1342
test rbp, rbp
jz short loc_1350
call ___ctype_b_loc
lea rdi, [rbx+rbp]
xor esi, esi
mov r8, [rax]
mov ... | long long func0(unsigned __int8 *a1)
{
long long v2; // rbp
long long v3; // rax
long long v4; // r12
unsigned __int8 *v5; // rdi
long long v6; // rsi
long long v7; // r8
unsigned __int8 *v8; // rax
long long v9; // rcx
_BYTE *v10; // rsi
v2 = strlen();
v3 = malloc(v2 + 1);
v4 = v3;
if ( v3 ... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
CALL 0x001010b0
LEA RDI,[RAX + 0x1]
MOV RBP,RAX
CALL 0x001010e0
MOV R12,RAX
TEST RAX,RAX
JZ 0x00101342
TEST RBP,RBP
JZ 0x00101350
CALL 0x001010f0
LEA RDI,[RBX + RBP*0x1]
XOR ESI,ESI
MOV R8,qword ptr [RAX]
MOV RAX,RBX
NOP word ptr [RAX + RAX*0x1]
LAB_00101320:
MOVZX ... | int1 * func0(byte *param_1)
{
byte *pbVar1;
ushort *puVar2;
size_t sVar3;
int1 *puVar4;
ushort **ppuVar5;
long lVar6;
int1 *puVar7;
sVar3 = strlen((char *)param_1);
puVar4 = (int1 *)malloc(sVar3 + 1);
if (puVar4 != (int1 *)0x0) {
puVar7 = puVar4;
if (sVar3 != 0) {
ppuVar5 = __ctype... |
5,731 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <assert.h>
| char* func0(const char* str1) {
size_t len = strlen(str1);
char* result = malloc(len + 1);
if (!result) return NULL;
size_t j = 0;
for(size_t i = 0; i < len; i++) {
if (!isupper((unsigned char)str1[i])) {
result[j++] = str1[i];
}
}
result[j] = '\0';
... | int main() {
char* res1 = func0("cAstyoUrFavoRitETVshoWs");
assert(strcmp(res1, "cstyoravoitshos") == 0);
free(res1);
char* res2 = func0("wAtchTheinTernEtrAdIo");
assert(strcmp(res2, "wtchheinerntrdo") == 0);
free(res2);
char* res3 = func0("VoicESeaRchAndreComMendaTionS");
as... | O3 | c | func0:
endbr64
push %r12
push %rbp
push %rbx
mov %rdi,%rbx
callq 10a0 <strlen@plt>
lea 0x1(%rax),%rdi
mov %rax,%rbp
callq 10c0 <malloc@plt>
mov %rax,%r12
test %rax,%rax
je 1337 <func0+0x67>
test %rbp,%rbp
je 1340 <func0+0x70>
callq 10d0 <__ctype_b_loc@plt>
mov %rbx,%rdi
lea (%rbx,... | func0:
endbr64
push r12
push rbp
push rbx
mov rbx, rdi
call _strlen
lea rdi, [rax+1]; size
mov rbp, rax
call _malloc
mov r12, rax
test rax, rax
jz short loc_1342
test rbp, rbp
jz short loc_1350
call ___ctype_b_loc
lea rdi, [rbx+rbp]
xor esi, esi
mov r8, [rax... | _BYTE * func0(const char *a1)
{
size_t v2; // rbp
_BYTE *v3; // rax
_BYTE *v4; // r12
unsigned __int8 *v5; // rdi
long long v6; // rsi
const unsigned __int16 *v7; // r8
const char *v8; // rax
long long v9; // rcx
_BYTE *v10; // rsi
v2 = strlen(a1);
v3 = malloc(v2 + 1);
v4 = v3;
if ( v3 )
{
... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
CALL 0x001010b0
LEA RDI,[RAX + 0x1]
MOV RBP,RAX
CALL 0x001010e0
MOV R12,RAX
TEST RAX,RAX
JZ 0x00101342
TEST RBP,RBP
JZ 0x00101350
CALL 0x001010f0
LEA RDI,[RBX + RBP*0x1]
XOR ESI,ESI
MOV R8,qword ptr [RAX]
MOV RAX,RBX
NOP word ptr [RAX + RAX*0x1]
LAB_00101320:
MOVZX ... | int * func0(byte *param_1)
{
byte *pbVar1;
ushort *puVar2;
size_t sVar3;
int *puVar4;
ushort **ppuVar5;
long lVar6;
int *puVar7;
sVar3 = strlen((char *)param_1);
puVar4 = (int *)malloc(sVar3 + 1);
if (puVar4 != (int *)0x0) {
puVar7 = puVar4;
if (sVar3 != 0) {
ppuVar5 = __ctype_b_lo... |
5,732 | func0 |
#include <assert.h>
#include <stdlib.h>
#include <string.h>
| int* func0(int** lst, int* sizes, int count) {
int* result = malloc(count * sizeof(int));
for(int i = 0; i < count; i++) {
result[i] = lst[i][0];
}
return result;
}
| int main() {
// First test case
int arr1_0[] = {1, 2};
int arr1_1[] = {3, 4, 5};
int arr1_2[] = {6, 7, 8, 9};
int* lst1[] = {arr1_0, arr1_1, arr1_2};
int sizes1[] = {2, 3, 4};
int expected1[] = {1, 3, 6};
int* res1 = func0(lst1, sizes1, 3);
assert(memcmp(res1, expected1, 3 *... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x30,%rsp
mov %rdi,-0x18(%rbp)
mov %rsi,-0x20(%rbp)
mov %edx,-0x24(%rbp)
mov -0x24(%rbp),%eax
cltq
shl $0x2,%rax
mov %rax,%rdi
callq 10d0 <malloc@plt>
mov %rax,-0x8(%rbp)
movl $0x0,-0xc(%rbp)
jmp 1232 <func0+0x69>
mov -0xc(%rbp),%eax
cltq... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_18], rdi
mov [rbp+var_20], rsi
mov [rbp+var_24], edx
mov eax, [rbp+var_24]
cdqe
shl rax, 2
mov rdi, rax; size
call _malloc
mov [rbp+var_8], rax
mov [rbp+var_C], 0
jmp short loc_1232
loc_11FE:
mov eax, [r... | _DWORD * func0(long long a1, long long a2, int a3)
{
int i; // [rsp+24h] [rbp-Ch]
_DWORD *v6; // [rsp+28h] [rbp-8h]
v6 = malloc(4LL * a3);
for ( i = 0; i < a3; ++i )
v6[i] = **(_DWORD **)(8LL * i + a1);
return v6;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x18],RDI
MOV qword ptr [RBP + -0x20],RSI
MOV dword ptr [RBP + -0x24],EDX
MOV EAX,dword ptr [RBP + -0x24]
CDQE
SHL RAX,0x2
MOV RDI,RAX
CALL 0x001010d0
MOV qword ptr [RBP + -0x8],RAX
MOV dword ptr [RBP + -0xc],0x0
JMP 0x00101232
LAB_001011fe:
MOV EAX... | void * func0(long param_1,int8 param_2,int param_3)
{
void *pvVar1;
int4 local_14;
pvVar1 = malloc((long)param_3 << 2);
for (local_14 = 0; local_14 < param_3; local_14 = local_14 + 1) {
*(int4 *)((long)pvVar1 + (long)local_14 * 4) =
**(int4 **)(param_1 + (long)local_14 * 8);
}
return pvVar1... |
5,733 | func0 |
#include <assert.h>
#include <stdlib.h>
#include <string.h>
| int* func0(int** lst, int* sizes, int count) {
int* result = malloc(count * sizeof(int));
for(int i = 0; i < count; i++) {
result[i] = lst[i][0];
}
return result;
}
| int main() {
// First test case
int arr1_0[] = {1, 2};
int arr1_1[] = {3, 4, 5};
int arr1_2[] = {6, 7, 8, 9};
int* lst1[] = {arr1_0, arr1_1, arr1_2};
int sizes1[] = {2, 3, 4};
int expected1[] = {1, 3, 6};
int* res1 = func0(lst1, sizes1, 3);
assert(memcmp(res1, expected1, 3 *... | O1 | c | func0:
endbr64
push %rbp
push %rbx
sub $0x8,%rsp
mov %rdi,%rbx
mov %edx,%ebp
movslq %edx,%rdi
shl $0x2,%rdi
callq 10d0 <malloc@plt>
test %ebp,%ebp
jle 1205 <func0+0x3c>
lea -0x1(%rbp),%esi
mov $0x0,%edx
mov (%rbx,%rdx,8),%rcx
mov (%rcx),%ecx
mov %ecx,(%rax,%rdx,4)
mov %rdx,%rcx
a... | func0:
endbr64
push rbp
push rbx
sub rsp, 8
mov rbp, rdi
mov ebx, edx
movsxd rdi, edx
shl rdi, 2
call _malloc
test ebx, ebx
jle short loc_1202
mov edx, ebx
mov ecx, 0
loc_11EF:
mov rsi, [rbp+rcx*8+0]
mov esi, [rsi]
mov [rax+rcx*4], esi
add rcx, 1
cmp rcx, rdx... | long long func0(long long a1, long long a2, int a3)
{
long long result; // rax
long long v5; // rcx
result = malloc(4LL * a3);
if ( a3 > 0 )
{
v5 = 0LL;
do
{
*(_DWORD *)(result + 4 * v5) = **(_DWORD **)(a1 + 8 * v5);
++v5;
}
while ( v5 != a3 );
}
return result;
} | func0:
ENDBR64
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RBP,RDI
MOV EBX,EDX
MOVSXD RDI,EDX
SHL RDI,0x2
CALL 0x001010d0
TEST EBX,EBX
JLE 0x00101202
MOV EDX,EBX
MOV ECX,0x0
LAB_001011ef:
MOV RSI,qword ptr [RBP + RCX*0x8]
MOV ESI,dword ptr [RSI]
MOV dword ptr [RAX + RCX*0x4],ESI
ADD RCX,0x1
CMP RCX,RDX
JNZ 0x001011ef
LAB_0010120... | void func0(long param_1,int8 param_2,uint param_3)
{
void *pvVar1;
ulong uVar2;
pvVar1 = malloc((long)(int)param_3 << 2);
if (0 < (int)param_3) {
uVar2 = 0;
do {
*(int4 *)((long)pvVar1 + uVar2 * 4) = **(int4 **)(param_1 + uVar2 * 8);
uVar2 = uVar2 + 1;
} while (uVar2 != param_3);
}... |
5,734 | func0 |
#include <assert.h>
#include <stdlib.h>
#include <string.h>
| int* func0(int** lst, int* sizes, int count) {
int* result = malloc(count * sizeof(int));
for(int i = 0; i < count; i++) {
result[i] = lst[i][0];
}
return result;
}
| int main() {
// First test case
int arr1_0[] = {1, 2};
int arr1_1[] = {3, 4, 5};
int arr1_2[] = {6, 7, 8, 9};
int* lst1[] = {arr1_0, arr1_1, arr1_2};
int sizes1[] = {2, 3, 4};
int expected1[] = {1, 3, 6};
int* res1 = func0(lst1, sizes1, 3);
assert(memcmp(res1, expected1, 3 *... | O2 | c | func0:
endbr64
push %rbp
push %rbx
mov %rdi,%rbx
movslq %edx,%rdi
mov %rdi,%rbp
shl $0x2,%rdi
sub $0x8,%rsp
callq 10b0 <malloc@plt>
test %ebp,%ebp
jle 145d <func0+0x3d>
lea -0x1(%rbp),%esi
xor %edx,%edx
nopl (%rax)
mov (%rbx,%rdx,8),%rcx
mov (%rcx),%ecx
mov %ecx,(%rax,%rdx,4)
mov ... | func0:
endbr64
push r12
push rbp
movsxd rbp, edx
push rbx
mov rbx, rdi
lea rdi, ds:0[rbp*4]
call _malloc
test ebp, ebp
jle short loc_140A
xor edx, edx
nop dword ptr [rax+00000000h]
loc_13F8:
mov rcx, [rbx+rdx*8]
mov ecx, [rcx]
mov [rax+rdx*4], ecx
add rdx, 1
cmp r... | long long func0(long long a1, long long a2, int a3)
{
long long v3; // rbp
long long result; // rax
long long i; // rdx
v3 = a3;
result = malloc(4LL * a3);
if ( (int)v3 > 0 )
{
for ( i = 0LL; i != v3; ++i )
*(_DWORD *)(result + 4 * i) = **(_DWORD **)(a1 + 8 * i);
}
return result;
} | func0:
ENDBR64
PUSH R12
PUSH RBP
MOVSXD RBP,EDX
PUSH RBX
MOV RBX,RDI
LEA RDI,[RBP*0x4]
CALL 0x001010b0
TEST EBP,EBP
JLE 0x0010140a
XOR EDX,EDX
NOP dword ptr [RAX]
LAB_001013f8:
MOV RCX,qword ptr [RBX + RDX*0x8]
MOV ECX,dword ptr [RCX]
MOV dword ptr [RAX + RDX*0x4],ECX
ADD RDX,0x1
CMP RBP,RDX
JNZ 0x001013f8
LAB_0010140a... | void func0(long param_1,int8 param_2,int param_3)
{
void *pvVar1;
long lVar2;
pvVar1 = malloc((long)param_3 * 4);
if (0 < param_3) {
lVar2 = 0;
do {
*(int4 *)((long)pvVar1 + lVar2 * 4) = **(int4 **)(param_1 + lVar2 * 8);
lVar2 = lVar2 + 1;
} while (param_3 != lVar2);
}
return;
} |
5,735 | func0 |
#include <assert.h>
#include <stdlib.h>
#include <string.h>
| int* func0(int** lst, int* sizes, int count) {
int* result = malloc(count * sizeof(int));
for(int i = 0; i < count; i++) {
result[i] = lst[i][0];
}
return result;
}
| int main() {
// First test case
int arr1_0[] = {1, 2};
int arr1_1[] = {3, 4, 5};
int arr1_2[] = {6, 7, 8, 9};
int* lst1[] = {arr1_0, arr1_1, arr1_2};
int sizes1[] = {2, 3, 4};
int expected1[] = {1, 3, 6};
int* res1 = func0(lst1, sizes1, 3);
assert(memcmp(res1, expected1, 3 *... | O3 | c | func0:
endbr64
push %rbp
push %rbx
mov %rdi,%rbx
movslq %edx,%rdi
mov %rdi,%rbp
shl $0x2,%rdi
sub $0x8,%rsp
callq 10b0 <malloc@plt>
test %ebp,%ebp
jle 145d <func0+0x3d>
lea -0x1(%rbp),%esi
xor %edx,%edx
nopl (%rax)
mov (%rbx,%rdx,8),%rcx
mov (%rcx),%ecx
mov %ecx,(%rax,%rdx,4)
mov ... | func0:
endbr64
push r12
push rbp
movsxd rbp, edx
push rbx
mov rbx, rdi
lea rdi, ds:0[rbp*4]; size
call _malloc
test ebp, ebp
jle short loc_141A
xor edx, edx
nop dword ptr [rax+00000000h]
loc_1408:
mov rcx, [rbx+rdx*8]
mov ecx, [rcx]
mov [rax+rdx*4], ecx
add rdx, 1
cmp... | _DWORD * func0(long long a1, long long a2, int a3)
{
long long v3; // rbp
_DWORD *result; // rax
long long i; // rdx
v3 = a3;
result = malloc(4LL * a3);
if ( (int)v3 > 0 )
{
for ( i = 0LL; i != v3; ++i )
result[i] = **(_DWORD **)(a1 + 8 * i);
}
return result;
} | func0:
ENDBR64
PUSH R12
PUSH RBP
MOVSXD RBP,EDX
PUSH RBX
MOV RBX,RDI
LEA RDI,[RBP*0x4]
CALL 0x001010b0
TEST EBP,EBP
JLE 0x0010141a
XOR EDX,EDX
NOP dword ptr [RAX]
LAB_00101408:
MOV RCX,qword ptr [RBX + RDX*0x8]
MOV ECX,dword ptr [RCX]
MOV dword ptr [RAX + RDX*0x4],ECX
ADD RDX,0x1
CMP RBP,RDX
JNZ 0x00101408
LAB_0010141a... | void func0(long param_1,int8 param_2,int param_3)
{
void *pvVar1;
long lVar2;
pvVar1 = malloc((long)param_3 * 4);
if (0 < param_3) {
lVar2 = 0;
do {
*(int4 *)((long)pvVar1 + lVar2 * 4) = **(int4 **)(param_1 + lVar2 * 8);
lVar2 = lVar2 + 1;
} while (param_3 != lVar2);
}
return;
} |
5,736 | func0 | #include <assert.h>
#include <string.h>
#include <stdio.h>
| int func0(const char *str) {
int upper_ctr = 0;
for (int i = 0; i < strlen(str); i++) {
if (str[i] >= 'A' && str[i] <= 'Z') upper_ctr += 1;
return upper_ctr;
}
}
| int main() {
assert(func0("PYthon") == 1);
assert(func0("BigData") == 1);
assert(func0("program") == 0);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x28,%rsp
mov %rdi,-0x28(%rbp)
movl $0x0,-0x18(%rbp)
movl $0x0,-0x14(%rbp)
mov -0x14(%rbp),%eax
movslq %eax,%rbx
mov -0x28(%rbp),%rax
mov %rax,%rdi
callq 1060 <strlen@plt>
cmp %rax,%rbx
jae 11d1 <func0+0x68>
mov -0x14(%rbp),%eax
m... | func0:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 28h
mov [rbp+s], rdi
mov [rbp+var_18], 0
mov [rbp+var_14], 0
nop
mov eax, [rbp+var_14]
movsxd rbx, eax
mov rax, [rbp+s]
mov rdi, rax; s
call _strlen
cmp rbx, rax
jnb short loc_11D1
mov eax, [rbp+var_14]
movsxd ... | size_t func0(const char *a1)
{
size_t result; // rax
unsigned int v2; // [rsp+18h] [rbp-18h]
v2 = 0;
result = strlen(a1);
if ( result )
{
if ( *a1 > 64 )
return *a1 <= 90;
return v2;
}
return result;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x28],RDI
MOV dword ptr [RBP + -0x18],0x0
MOV dword ptr [RBP + -0x14],0x0
NOP
MOV EAX,dword ptr [RBP + -0x14]
MOVSXD RBX,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,RAX
CALL 0x00101060
CMP RBX,RAX
JNC 0x001011d1
MOV EAX,dword ptr [RBP + -0x... | size_t func0(char *param_1)
{
size_t sVar1;
int4 local_20;
local_20 = 0;
sVar1 = strlen(param_1);
if (sVar1 != 0) {
if (('@' < *param_1) && (*param_1 < '[')) {
local_20 = 1;
}
sVar1 = (size_t)local_20;
}
return sVar1;
} |
5,737 | func0 | #include <assert.h>
#include <string.h>
#include <stdio.h>
| int func0(const char *str) {
int upper_ctr = 0;
for (int i = 0; i < strlen(str); i++) {
if (str[i] >= 'A' && str[i] <= 'Z') upper_ctr += 1;
return upper_ctr;
}
}
| int main() {
assert(func0("PYthon") == 1);
assert(func0("BigData") == 1);
assert(func0("program") == 0);
return 0;
}
| O1 | c | func0:
endbr64
mov %rdi,%rdx
mov $0xffffffffffffffff,%rcx
mov $0x0,%eax
repnz scas %es:(%rdi),%al
cmp $0xfffffffffffffffe,%rcx
je 1173 <func0+0x2a>
movzbl (%rdx),%eax
sub $0x41,%eax
cmp $0x19,%al
setbe %al
movzbl %al,%eax
retq
retq
| func0:
endbr64
push rbx
mov rbx, rdi
call _strlen
test rax, rax
jz short loc_1189
movzx eax, byte ptr [rbx]
sub eax, 41h ; 'A'
cmp al, 19h
setbe al
movzx eax, al
loc_1189:
pop rbx
retn | long long func0(_BYTE *a1)
{
long long result; // rax
result = strlen();
if ( result )
return (unsigned __int8)(*a1 - 65) <= 0x19u;
return result;
} | func0:
ENDBR64
PUSH RBX
MOV RBX,RDI
CALL 0x00101060
TEST RAX,RAX
JZ 0x00101189
MOVZX EAX,byte ptr [RBX]
SUB EAX,0x41
CMP AL,0x19
SETBE AL
MOVZX EAX,AL
LAB_00101189:
POP RBX
RET | size_t func0(char *param_1)
{
size_t sVar1;
sVar1 = strlen(param_1);
if (sVar1 != 0) {
sVar1 = (size_t)((byte)(*param_1 + 0xbfU) < 0x1a);
}
return sVar1;
} |
5,738 | func0 | #include <assert.h>
#include <string.h>
#include <stdio.h>
| int func0(const char *str) {
int upper_ctr = 0;
for (int i = 0; i < strlen(str); i++) {
if (str[i] >= 'A' && str[i] <= 'Z') upper_ctr += 1;
return upper_ctr;
}
}
| int main() {
assert(func0("PYthon") == 1);
assert(func0("BigData") == 1);
assert(func0("program") == 0);
return 0;
}
| O2 | c | func0:
endbr64
push %rbx
mov %rdi,%rbx
callq 1060 <strlen@plt>
test %rax,%rax
je 1230 <func0+0x20>
movzbl (%rbx),%eax
sub $0x41,%eax
cmp $0x19,%al
setbe %al
movzbl %al,%eax
pop %rbx
retq
nopw %cs:0x0(%rax,%rax,1)
nopl 0x0(%rax)
| func0:
endbr64
push rbx
mov rbx, rdi
call _strlen
test rax, rax
jz short loc_1230
movzx eax, byte ptr [rbx]
sub eax, 41h ; 'A'
cmp al, 19h
setbe al
movzx eax, al
loc_1230:
pop rbx
retn | long long func0(_BYTE *a1)
{
long long result; // rax
result = strlen();
if ( result )
return (unsigned __int8)(*a1 - 65) <= 0x19u;
return result;
} | func0:
ENDBR64
PUSH RBX
MOV RBX,RDI
CALL 0x00101060
TEST RAX,RAX
JZ 0x00101230
MOVZX EAX,byte ptr [RBX]
SUB EAX,0x41
CMP AL,0x19
SETBE AL
MOVZX EAX,AL
LAB_00101230:
POP RBX
RET | size_t func0(char *param_1)
{
size_t sVar1;
sVar1 = strlen(param_1);
if (sVar1 != 0) {
sVar1 = (size_t)((byte)(*param_1 + 0xbfU) < 0x1a);
}
return sVar1;
} |
5,739 | func0 | #include <assert.h>
#include <string.h>
#include <stdio.h>
| int func0(const char *str) {
int upper_ctr = 0;
for (int i = 0; i < strlen(str); i++) {
if (str[i] >= 'A' && str[i] <= 'Z') upper_ctr += 1;
return upper_ctr;
}
}
| int main() {
assert(func0("PYthon") == 1);
assert(func0("BigData") == 1);
assert(func0("program") == 0);
return 0;
}
| O3 | c | func0:
endbr64
push %rbx
mov %rdi,%rbx
callq 1060 <strlen@plt>
test %rax,%rax
je 1230 <func0+0x20>
movzbl (%rbx),%eax
sub $0x41,%eax
cmp $0x19,%al
setbe %al
movzbl %al,%eax
pop %rbx
retq
nopw %cs:0x0(%rax,%rax,1)
nopl 0x0(%rax)
| func0:
endbr64
push rbx
mov rbx, rdi
call _strlen
test rax, rax
jz short loc_1230
movzx eax, byte ptr [rbx]
sub eax, 41h ; 'A'
cmp al, 19h
setbe al
movzx eax, al
loc_1230:
pop rbx
retn | size_t func0(const char *a1)
{
size_t result; // rax
result = strlen(a1);
if ( result )
return (unsigned __int8)(*a1 - 65) <= 0x19u;
return result;
} | func0:
ENDBR64
PUSH RBX
MOV RBX,RDI
CALL 0x00101060
TEST RAX,RAX
JZ 0x00101230
MOVZX EAX,byte ptr [RBX]
SUB EAX,0x41
CMP AL,0x19
SETBE AL
MOVZX EAX,AL
LAB_00101230:
POP RBX
RET | size_t func0(char *param_1)
{
size_t sVar1;
sVar1 = strlen(param_1);
if (sVar1 != 0) {
sVar1 = (size_t)((byte)(*param_1 + 0xbfU) < 0x1a);
}
return sVar1;
} |
5,740 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#define MAX_COMBINATIONS 64
#define MAX_ELEMENTS 6
#define MAX_STRING_LENGTH 10
typedef struct {
char elements[MAX_ELEMENTS][MAX_STRING_LENGTH];
int size;
} Combination;
typedef struct {
Combination combinatio... | int func0(CombinationList a, CombinationList b) {
if(a.count != b.count) return 0;
for(int i = 0; i < a.count; i++) {
if(a.combinations[i].size != b.combinations[i].size) return 0;
for(int j = 0; j < a.combinations[i].size; j++) {
if(strcmp(a.combinations[i].elements[j], b.combi... | int main() {
// First assert
char *list1[] = {"orange", "red", "green", "blue"};
CombinationList result1 = combinations_list(list1, 4);
CombinationList expected1;
expected1.count = 16;
// []
expected1.combinations[0].size = 0;
// ['orange']
strcpy(expected1.combinations[1].e... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x10,%rsp
mov 0x1010(%rbp),%edx
mov 0x2018(%rbp),%eax
cmp %eax,%edx
je 13da <func0+0x26>
mov $0x0,%eax
jmpq 14cd <func0+0x119>
movl $0x0,-0x8(%rbp)
jmpq 14b9 <func0+0x105>
mov -0x8(%rbp),%eax
cltq
shl $0x6,%rax
lea 0x10(%rbp),%rsi
add ... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 10h
mov edx, [rbp+arg_1000]
mov eax, [rbp+arg_2008]
cmp edx, eax
jz short loc_13D6
mov eax, 0
jmp locret_14C9
loc_13D6:
mov [rbp+var_8], 0
jmp loc_14B5
loc_13E2:
mov eax, [rbp+var_8]
cdqe
shl rax, 6
lea rax, [rax+10h]
... | long long func0(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
long long a7,
long long a8,
long long a9,
long long a10,
long long a11,
long long a12)
{
int i; // [rsp+8h] [rbp-8h]
i... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV EDX,dword ptr [RBP + 0x1010]
MOV EAX,dword ptr [RBP + 0x2018]
CMP EDX,EAX
JZ 0x001013d6
MOV EAX,0x0
JMP 0x001014c9
LAB_001013d6:
MOV dword ptr [RBP + -0x8],0x0
JMP 0x001014b5
LAB_001013e2:
MOV EAX,dword ptr [RBP + -0x8]
CDQE
SHL RAX,0x6
LEA RAX,[RAX + 0x10]
ADD RAX,R... | int8 func0(void)
{
int iVar1;
int8 uVar2;
int in_stack_00001008;
int in_stack_00002010;
int local_10;
int local_c;
if (in_stack_00001008 == in_stack_00002010) {
for (local_10 = 0; local_10 < in_stack_00001008; local_10 = local_10 + 1) {
if (*(int *)(&stack0x00000044 + (long)local_10 * 0x40) ... |
5,741 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#define MAX_COMBINATIONS 64
#define MAX_ELEMENTS 6
#define MAX_STRING_LENGTH 10
typedef struct {
char elements[MAX_ELEMENTS][MAX_STRING_LENGTH];
int size;
} Combination;
typedef struct {
Combination combinatio... | int func0(CombinationList a, CombinationList b) {
if(a.count != b.count) return 0;
for(int i = 0; i < a.count; i++) {
if(a.combinations[i].size != b.combinations[i].size) return 0;
for(int j = 0; j < a.combinations[i].size; j++) {
if(strcmp(a.combinations[i].elements[j], b.combi... | int main() {
// First assert
char *list1[] = {"orange", "red", "green", "blue"};
CombinationList result1 = combinations_list(list1, 4);
CombinationList expected1;
expected1.count = 16;
// []
expected1.combinations[0].size = 0;
// ['orange']
strcpy(expected1.combinations[1].e... | O1 | c | func0:
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov 0x1050(%rsp),%eax
mov $0x0,%edx
cmp 0x2058(%rsp),%eax
jne 13ff <func0+0xd1>
test %eax,%eax
jle 13ec <func0+0xbe>
lea -0x1(%rax),%eax
add $0x1,%rax
shl $0x6,%rax
mov %rax,0x8(%rsp)
mo... | func0:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 18h
mov eax, [rsp+48h+arg_1000]
mov edx, 0
cmp eax, [rsp+48h+arg_2008]
jnz loc_13F2
test eax, eax
jle loc_13DF
lea eax, [rax-1]
add rax, 1
shl rax, 6
mov [rsp+48h+var_40], rax
mov ... | long long func0(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
long long a7,
long long a8,
long long a9,
long long a10,
long long a11,
long long a12,
long long a13,
long... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV EAX,dword ptr [RSP + 0x1050]
MOV EDX,0x0
CMP EAX,dword ptr [RSP + 0x2058]
JNZ 0x001013f2
TEST EAX,EAX
JLE 0x001013df
LEA EAX,[RAX + -0x1]
ADD RAX,0x1
SHL RAX,0x6
MOV qword ptr [RSP + 0x8],RAX
MOV R13D,0x0
LEA R15,[RSP + 0x8c]
LEA R14,... | int8 func0(void)
{
int iVar1;
int iVar2;
int8 uVar3;
char *__s1;
char *__s2;
long lVar4;
int in_stack_00001008;
int in_stack_00002010;
uVar3 = 0;
if (in_stack_00001008 == in_stack_00002010) {
if (in_stack_00001008 < 1) {
uVar3 = 1;
}
else {
lVar4 = 0;
do {
i... |
5,742 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#define MAX_COMBINATIONS 64
#define MAX_ELEMENTS 6
#define MAX_STRING_LENGTH 10
typedef struct {
char elements[MAX_ELEMENTS][MAX_STRING_LENGTH];
int size;
} Combination;
typedef struct {
Combination combinatio... | int func0(CombinationList a, CombinationList b) {
if(a.count != b.count) return 0;
for(int i = 0; i < a.count; i++) {
if(a.combinations[i].size != b.combinations[i].size) return 0;
for(int j = 0; j < a.combinations[i].size; j++) {
if(strcmp(a.combinations[i].elements[j], b.combi... | int main() {
// First assert
char *list1[] = {"orange", "red", "green", "blue"};
CombinationList result1 = combinations_list(list1, 4);
CombinationList expected1;
expected1.count = 16;
// []
expected1.combinations[0].size = 0;
// ['orange']
strcpy(expected1.combinations[1].e... | O2 | c | func0:
endbr64
push %r15
xor %r8d,%r8d
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov 0x1050(%rsp),%eax
cmp 0x2058(%rsp),%eax
jne 1d52 <func0+0xa2>
test %eax,%eax
jle 1d73 <func0+0xc3>
lea -0x1(%rax),%r13d
xor %r12d,%r12d
lea 0x8c(%rsp),%r15
add $0x1,%r1... | func0:
endbr64
push r15
xor eax, eax
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 18h
movsxd r13, [rsp+48h+arg_1000]
cmp r13d, [rsp+48h+arg_2008]
jnz short loc_1CF8
test r13d, r13d
jle loc_1D1B
shl r13, 6
xor r12d, r12d
lea r15, [rsp+48h+arg_3C]
mov [rs... | long long func0(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
long long a7,
long long a8,
long long a9,
long long a10,
long long a11,
long long a12,
long long a13,
long... | func0:
ENDBR64
PUSH R15
XOR EAX,EAX
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOVSXD R13,dword ptr [RSP + 0x1050]
CMP R13D,dword ptr [RSP + 0x2058]
JNZ 0x00101cf8
TEST R13D,R13D
JLE 0x00101d1b
SHL R13,0x6
XOR R12D,R12D
LEA R15,[RSP + 0x8c]
MOV qword ptr [RSP + 0x8],R13
LEA R14,[RSP + 0x1094]
LEA RBX,[RS... | int8 func0(void)
{
int iVar1;
int iVar2;
int8 uVar3;
long lVar4;
long lVar5;
int in_stack_00001008;
int in_stack_00002010;
uVar3 = 0;
if (in_stack_00001008 == in_stack_00002010) {
if (0 < in_stack_00001008) {
lVar4 = 0;
do {
iVar1 = *(int *)(&stack0x00000044 + lVar4);
... |
5,743 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#define MAX_COMBINATIONS 64
#define MAX_ELEMENTS 6
#define MAX_STRING_LENGTH 10
typedef struct {
char elements[MAX_ELEMENTS][MAX_STRING_LENGTH];
int size;
} Combination;
typedef struct {
Combination combinatio... | int func0(CombinationList a, CombinationList b) {
if(a.count != b.count) return 0;
for(int i = 0; i < a.count; i++) {
if(a.combinations[i].size != b.combinations[i].size) return 0;
for(int j = 0; j < a.combinations[i].size; j++) {
if(strcmp(a.combinations[i].elements[j], b.combi... | int main() {
// First assert
char *list1[] = {"orange", "red", "green", "blue"};
CombinationList result1 = combinations_list(list1, 4);
CombinationList expected1;
expected1.count = 16;
// []
expected1.combinations[0].size = 0;
// ['orange']
strcpy(expected1.combinations[1].e... | O3 | c | func0:
endbr64
push %r15
xor %r8d,%r8d
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov 0x1050(%rsp),%eax
cmp 0x2058(%rsp),%eax
jne 1d62 <func0+0xa2>
test %eax,%eax
jle 1d83 <func0+0xc3>
lea -0x1(%rax),%r13d
xor %r12d,%r12d
lea 0x8c(%rsp),%r15
add $0x1,%r1... | func0:
endbr64
push r15
xor eax, eax
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 18h
movsxd r13, [rsp+48h+arg_1000]
cmp r13d, [rsp+48h+arg_2008]
jnz short loc_1CA0
test r13d, r13d
jle loc_1CBB
shl r13, 6
xor r12d, r12d
lea r15, [rsp+48h+arg_3C]
mov [rs... | long long func0(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
long long a7,
long long a8,
long long a9,
long long a10,
long long a11,
long long a12,
long long a13,
long... | func0:
ENDBR64
PUSH R15
XOR EAX,EAX
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOVSXD R13,dword ptr [RSP + 0x1050]
CMP R13D,dword ptr [RSP + 0x2058]
JNZ 0x00101ca0
TEST R13D,R13D
JLE 0x00101cbb
SHL R13,0x6
XOR R12D,R12D
LEA R15,[RSP + 0x8c]
MOV qword ptr [RSP + 0x8],R13
LEA R14,[RSP + 0x1094]
LEA RBX,[RS... | int8 func0(void)
{
int iVar1;
int iVar2;
int8 uVar3;
long lVar4;
long lVar5;
int in_stack_00001008;
int in_stack_00002010;
uVar3 = 0;
if (in_stack_00001008 == in_stack_00002010) {
if (0 < in_stack_00001008) {
lVar4 = 0;
do {
iVar1 = *(int *)(&stack0x00000044 + lVar4);
... |
5,744 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int arr[], int n) {
int max_ending_here = 1;
int min_ending_here = 1;
int max_so_far = 0;
int flag = 0;
for (int i = 0; i < n; i++) {
if (arr[i] > 0) {
max_ending_here = max_ending_here * arr[i];
min_ending_here = (min_ending_here * arr[i] < 1) ? m... | int main() {
int arr1[] = {1, -2, -3, 0, 7, -8, -2};
int n1 = sizeof(arr1) / sizeof(arr1[0]);
assert(func0(arr1, n1) == 112);
int arr2[] = {6, -3, -10, 0, 2};
int n2 = sizeof(arr2) / sizeof(arr2[0]);
assert(func0(arr2, n2) == 180);
int arr3[] = {-2, -40, 0, -2, -3};
int n3 = ... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x28(%rbp)
mov %esi,-0x2c(%rbp)
movl $0x1,-0x18(%rbp)
movl $0x1,-0x14(%rbp)
movl $0x0,-0x10(%rbp)
movl $0x0,-0xc(%rbp)
movl $0x0,-0x8(%rbp)
jmpq 1291 <func0+0x128>
mov -0x8(%rbp),%eax
cltq
lea 0x0(,%rax,4),%rdx
mov -0x28(%rbp),%rax
add ... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_28], rdi
mov [rbp+var_2C], esi
mov [rbp+var_18], 1
mov [rbp+var_14], 1
mov [rbp+var_10], 0
mov [rbp+var_C], 0
mov [rbp+var_8], 0
jmp loc_1291
loc_11A0:
mov eax, [rbp+var_8]
cdqe
lea rdx, ds:0[rax*4]
mov rax, [rbp+var_28... | long long func0(long long a1, int a2)
{
int v2; // eax
int v3; // eax
int v5; // [rsp+14h] [rbp-18h]
int v6; // [rsp+18h] [rbp-14h]
int v7; // [rsp+1Ch] [rbp-10h]
int v8; // [rsp+20h] [rbp-Ch]
int i; // [rsp+24h] [rbp-8h]
int v10; // [rsp+28h] [rbp-4h]
v5 = 1;
v6 = 1;
v7 = 0;
v8 = 0;
for ( i... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x28],RDI
MOV dword ptr [RBP + -0x2c],ESI
MOV dword ptr [RBP + -0x18],0x1
MOV dword ptr [RBP + -0x14],0x1
MOV dword ptr [RBP + -0x10],0x0
MOV dword ptr [RBP + -0xc],0x0
MOV dword ptr [RBP + -0x8],0x0
JMP 0x00101291
LAB_001011a0:
MOV EAX,dword ptr [RBP + -0x8]
CD... | int func0(long param_1,int param_2)
{
bool bVar1;
int iVar2;
int local_20;
int local_1c;
int local_18;
int local_10;
local_20 = 1;
local_1c = 1;
local_18 = 0;
bVar1 = false;
for (local_10 = 0; local_10 < param_2; local_10 = local_10 + 1) {
if (*(int *)(param_1 + (long)local_10 * 4) < 1) {
... |
5,745 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int arr[], int n) {
int max_ending_here = 1;
int min_ending_here = 1;
int max_so_far = 0;
int flag = 0;
for (int i = 0; i < n; i++) {
if (arr[i] > 0) {
max_ending_here = max_ending_here * arr[i];
min_ending_here = (min_ending_here * arr[i] < 1) ? m... | int main() {
int arr1[] = {1, -2, -3, 0, 7, -8, -2};
int n1 = sizeof(arr1) / sizeof(arr1[0]);
assert(func0(arr1, n1) == 112);
int arr2[] = {6, -3, -10, 0, 2};
int n2 = sizeof(arr2) / sizeof(arr2[0]);
assert(func0(arr2, n2) == 180);
int arr3[] = {-2, -40, 0, -2, -3};
int n3 = ... | O1 | c | func0:
endbr64
test %esi,%esi
jle 11ea <func0+0x81>
mov %rdi,%rax
lea -0x1(%rsi),%edx
lea 0x4(%rdi,%rdx,4),%r10
mov $0x0,%r9d
mov $0x0,%esi
mov $0x1,%edi
mov $0x1,%ecx
mov $0x1,%r8d
jmp 11bd <func0+0x54>
je 11d6 <func0+0x6d>
imul %edx,%edi
mov %edi,%r11d
test %edi,%edi
cmovle ... | func0:
endbr64
test esi, esi
jle short loc_11EF
mov rdx, rdi
lea eax, [rsi-1]
lea r9, [rdi+rax*4+4]
mov r8d, 0
mov esi, 0
mov edi, 1
mov eax, 1
mov r10d, 1
jmp short loc_11BA
loc_1199:
imul eax, ecx
imul edi, ecx
test edi, edi
mov ecx, 1
cmovg edi, ecx
mov r... | long long func0(int *a1, int a2)
{
int *v2; // rdx
long long v3; // r9
int v4; // r8d
int v5; // esi
int v6; // edi
int v7; // eax
int v8; // ecx
int v9; // r11d
if ( a2 <= 0 )
{
return 0;
}
else
{
v2 = a1;
v3 = (long long)&a1[a2 - 1 + 1];
v4 = 0;
v5 = 0;
v6 = 1;
... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x001011ef
MOV RDX,RDI
LEA EAX,[RSI + -0x1]
LEA R9,[RDI + RAX*0x4 + 0x4]
MOV R8D,0x0
MOV ESI,0x0
MOV EDI,0x1
MOV EAX,0x1
MOV R10D,0x1
JMP 0x001011ba
LAB_00101199:
IMUL EAX,ECX
IMUL EDI,ECX
TEST EDI,EDI
MOV ECX,0x1
CMOVG EDI,ECX
MOV R8D,R10D
LAB_001011ac:
CMP ESI,EAX
CMOVL ESI,EAX
ADD RDX... | int func0(int *param_1,int param_2)
{
int *piVar1;
int iVar2;
bool bVar3;
int iVar4;
int iVar5;
int iVar6;
int iVar7;
if (param_2 < 1) {
iVar5 = 0;
}
else {
piVar1 = param_1 + (ulong)(param_2 - 1) + 1;
bVar3 = false;
iVar5 = 0;
iVar7 = 1;
iVar4 = 1;
do {
iVar2 =... |
5,746 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int arr[], int n) {
int max_ending_here = 1;
int min_ending_here = 1;
int max_so_far = 0;
int flag = 0;
for (int i = 0; i < n; i++) {
if (arr[i] > 0) {
max_ending_here = max_ending_here * arr[i];
min_ending_here = (min_ending_here * arr[i] < 1) ? m... | int main() {
int arr1[] = {1, -2, -3, 0, 7, -8, -2};
int n1 = sizeof(arr1) / sizeof(arr1[0]);
assert(func0(arr1, n1) == 112);
int arr2[] = {6, -3, -10, 0, 2};
int n2 = sizeof(arr2) / sizeof(arr2[0]);
assert(func0(arr2, n2) == 180);
int arr3[] = {-2, -40, 0, -2, -3};
int n3 = ... | O2 | c | func0:
endbr64
test %esi,%esi
jle 1350 <func0+0x90>
lea -0x1(%rsi),%eax
xor %r8d,%r8d
mov $0x1,%edx
mov $0x1,%r10d
lea 0x4(%rdi,%rax,4),%rsi
mov $0x1,%eax
jmp 130c <func0+0x4c>
nopl 0x0(%rax)
imul %ecx,%edx
imul %ecx,%eax
test %edx,%edx
cmovg %r10d,%edx
cmp %eax,%r8d
cmovl %eax,%r... | func0:
endbr64
test esi, esi
jle loc_1350
lea eax, [rsi-1]
xor r8d, r8d
mov edx, 1
lea rsi, [rdi+rax*4+4]
mov eax, 1
jmp short loc_1308
loc_12E8:
imul edx, ecx
imul eax, ecx
mov ecx, 1
test edx, edx
cmovg edx, ecx
loc_12F8:
cmp r8d, eax
cmovl r8d, eax
add rdi, 4
c... | long long func0(int *a1, int a2)
{
int v2; // r8d
int v3; // edx
long long v4; // rsi
int v5; // eax
int v6; // ecx
int v7; // r9d
if ( a2 > 0 )
{
v2 = 0;
v3 = 1;
v4 = (long long)&a1[a2 - 1 + 1];
v5 = 1;
while ( 1 )
{
v6 = *a1;
if ( *a1 > 0 )
break;
if... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x00101350
LEA EAX,[RSI + -0x1]
XOR R8D,R8D
MOV EDX,0x1
LEA RSI,[RDI + RAX*0x4 + 0x4]
MOV EAX,0x1
JMP 0x00101308
LAB_001012e8:
IMUL EDX,ECX
IMUL EAX,ECX
MOV ECX,0x1
TEST EDX,EDX
CMOVG EDX,ECX
LAB_001012f8:
CMP R8D,EAX
CMOVL R8D,EAX
ADD RDI,0x4
CMP RDI,RSI
JZ 0x00101337
LAB_00101308:
MOV ... | int func0(int *param_1,int param_2)
{
int *piVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
int iVar6;
if (param_2 < 1) {
return 0;
}
iVar6 = 0;
iVar5 = 1;
piVar1 = param_1 + (ulong)(param_2 - 1) + 1;
iVar3 = 1;
do {
iVar2 = *param_1;
if (iVar2 < 1) {
if (iVar2 == 0) {... |
5,747 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int arr[], int n) {
int max_ending_here = 1;
int min_ending_here = 1;
int max_so_far = 0;
int flag = 0;
for (int i = 0; i < n; i++) {
if (arr[i] > 0) {
max_ending_here = max_ending_here * arr[i];
min_ending_here = (min_ending_here * arr[i] < 1) ? m... | int main() {
int arr1[] = {1, -2, -3, 0, 7, -8, -2};
int n1 = sizeof(arr1) / sizeof(arr1[0]);
assert(func0(arr1, n1) == 112);
int arr2[] = {6, -3, -10, 0, 2};
int n2 = sizeof(arr2) / sizeof(arr2[0]);
assert(func0(arr2, n2) == 180);
int arr3[] = {-2, -40, 0, -2, -3};
int n3 = ... | O3 | c | func0:
endbr64
test %esi,%esi
jle 1320 <func0+0x90>
lea -0x1(%rsi),%eax
xor %r8d,%r8d
mov $0x1,%edx
mov $0x1,%r10d
lea 0x4(%rdi,%rax,4),%rsi
mov $0x1,%eax
jmp 12dc <func0+0x4c>
nopl 0x0(%rax)
imul %ecx,%edx
imul %ecx,%eax
test %edx,%edx
cmovg %r10d,%edx
cmp %eax,%r8d
cmovl %eax,%r... | func0:
endbr64
test esi, esi
jle loc_1330
movsxd rsi, esi
xor r9d, r9d
mov edx, 1
mov eax, 1
lea r8, [rdi+rsi*4]
xor esi, esi
jmp short loc_12DC
loc_12B8:
imul edx, ecx
mov r9d, 1
imul eax, ecx
mov ecx, 1
test edx, edx
cmovg edx, ecx
loc_12CE:
cmp esi, eax
cmovl ... | long long func0(int *a1, int a2)
{
int v2; // r9d
int v3; // edx
int v4; // eax
int *v5; // r8
int v6; // esi
int v7; // ecx
int v8; // r10d
if ( a2 <= 0 )
return 0LL;
v2 = 0;
v3 = 1;
v4 = 1;
v5 = &a1[a2];
v6 = 0;
do
{
while ( 1 )
{
v7 = *a1;
if ( *a1 > 0 )
... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x00101330
MOVSXD RSI,ESI
XOR R9D,R9D
MOV EDX,0x1
MOV EAX,0x1
LEA R8,[RDI + RSI*0x4]
XOR ESI,ESI
JMP 0x001012dc
LAB_001012b8:
IMUL EDX,ECX
MOV R9D,0x1
IMUL EAX,ECX
MOV ECX,0x1
TEST EDX,EDX
CMOVG EDX,ECX
LAB_001012ce:
CMP ESI,EAX
CMOVL ESI,EAX
ADD RDI,0x4
CMP R8,RDI
JZ 0x00101309
LAB_0010... | int func0(int *param_1,int param_2)
{
int *piVar1;
int iVar2;
bool bVar3;
int iVar4;
int iVar5;
int iVar6;
int iVar7;
if (param_2 < 1) {
return 0;
}
bVar3 = false;
iVar5 = 1;
iVar4 = 1;
piVar1 = param_1 + param_2;
iVar7 = 0;
do {
iVar2 = *param_1;
if (iVar2 < 1) {
if ... |
5,748 | func0 |
#include <stdio.h>
#include <stdbool.h>
#include <assert.h>
| bool func0(int dict[], int size, int n) {
for (int i = 0; i < size; i++) {
if (dict[i] != n) {
return false;
}
}
return true;
}
| int main() {
int dict1[] = {12, 12, 12, 12};
int dictSize1 = sizeof(dict1) / sizeof(dict1[0]);
assert(func0(dict1, dictSize1, 10) == false);
assert(func0(dict1, dictSize1, 12) == true);
assert(func0(dict1, dictSize1, 5) == false);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
mov %edx,-0x20(%rbp)
movl $0x0,-0x4(%rbp)
jmp 11aa <func0+0x41>
mov -0x4(%rbp),%eax
cltq
lea 0x0(,%rax,4),%rdx
mov -0x18(%rbp),%rax
add %rdx,%rax
mov (%rax),%eax
cmp %eax,-0x20(%rbp)
je 11a6 <func0+... | 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_4], 0
jmp short loc_11AA
loc_1184:
mov eax, [rbp+var_4]
cdqe
lea rdx, ds:0[rax*4]
mov rax, [rbp+var_18]
add rax, rdx
mov eax, [rax]
cmp [rbp+var_20], eax... | long long func0(long long a1, int a2, int a3)
{
int i; // [rsp+1Ch] [rbp-4h]
for ( i = 0; i < a2; ++i )
{
if ( a3 != *(_DWORD *)(4LL * i + a1) )
return 0LL;
}
return 1LL;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0x20],EDX
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001011aa
LAB_00101184:
MOV EAX,dword ptr [RBP + -0x4]
CDQE
LEA RDX,[RAX*0x4]
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,RDX
MOV EAX,dword ptr [RAX]
CMP dw... | int8 func0(long param_1,int param_2,int param_3)
{
int local_c;
local_c = 0;
while( true ) {
if (param_2 <= local_c) {
return 1;
}
if (param_3 != *(int *)(param_1 + (long)local_c * 4)) break;
local_c = local_c + 1;
}
return 0;
} |
5,749 | func0 |
#include <stdio.h>
#include <stdbool.h>
#include <assert.h>
| bool func0(int dict[], int size, int n) {
for (int i = 0; i < size; i++) {
if (dict[i] != n) {
return false;
}
}
return true;
}
| int main() {
int dict1[] = {12, 12, 12, 12};
int dictSize1 = sizeof(dict1) / sizeof(dict1[0]);
assert(func0(dict1, dictSize1, 10) == false);
assert(func0(dict1, dictSize1, 12) == true);
assert(func0(dict1, dictSize1, 5) == false);
return 0;
}
| O1 | c | func0:
endbr64
test %esi,%esi
jle 118f <func0+0x26>
mov %rdi,%rax
lea -0x1(%rsi),%ecx
lea 0x4(%rdi,%rcx,4),%rcx
cmp %edx,(%rax)
jne 1195 <func0+0x2c>
add $0x4,%rax
cmp %rcx,%rax
jne 117c <func0+0x13>
mov $0x1,%eax
retq
mov $0x1,%eax
retq
mov $0x0,%eax
retq
| func0:
endbr64
test esi, esi
jle short loc_118F
mov rax, rdi
lea ecx, [rsi-1]
lea rcx, [rdi+rcx*4+4]
loc_117C:
cmp [rax], edx
jnz short loc_1195
add rax, 4
cmp rax, rcx
jnz short loc_117C
mov eax, 1
retn
loc_118F:
mov eax, 1
retn
loc_1195:
mov eax, 0
retn | long long func0(_DWORD *a1, int a2, int a3)
{
_DWORD *v3; // rax
if ( a2 <= 0 )
return 1LL;
v3 = a1;
while ( *v3 == a3 )
{
if ( ++v3 == &a1[a2 - 1 + 1] )
return 1LL;
}
return 0LL;
} | func0:
ENDBR64
TEST ESI,ESI
JLE 0x0010118f
MOV RAX,RDI
LEA ECX,[RSI + -0x1]
LEA RCX,[RDI + RCX*0x4 + 0x4]
LAB_0010117c:
CMP dword ptr [RAX],EDX
JNZ 0x00101195
ADD RAX,0x4
CMP RAX,RCX
JNZ 0x0010117c
MOV EAX,0x1
RET
LAB_0010118f:
MOV EAX,0x1
RET
LAB_00101195:
MOV EAX,0x0
RET | int8 func0(int *param_1,int param_2,int param_3)
{
int *piVar1;
if (param_2 < 1) {
return 1;
}
piVar1 = param_1 + (ulong)(param_2 - 1) + 1;
do {
if (*param_1 != param_3) {
return 0;
}
param_1 = param_1 + 1;
} while (param_1 != piVar1);
return 1;
} |
5,750 | func0 |
#include <stdio.h>
#include <stdbool.h>
#include <assert.h>
| bool func0(int dict[], int size, int n) {
for (int i = 0; i < size; i++) {
if (dict[i] != n) {
return false;
}
}
return true;
}
| int main() {
int dict1[] = {12, 12, 12, 12};
int dictSize1 = sizeof(dict1) / sizeof(dict1[0]);
assert(func0(dict1, dictSize1, 10) == false);
assert(func0(dict1, dictSize1, 12) == true);
assert(func0(dict1, dictSize1, 5) == false);
return 0;
}
| O2 | c | func0:
endbr64
test %esi,%esi
jle 1170 <func0+0x30>
lea -0x1(%rsi),%eax
lea 0x4(%rdi,%rax,4),%rax
jmp 1161 <func0+0x21>
nopw 0x0(%rax,%rax,1)
add $0x4,%rdi
cmp %rax,%rdi
je 1170 <func0+0x30>
cmp %edx,(%rdi)
je 1158 <func0+0x18>
xor %eax,%eax
retq
nopl 0x0(%rax,%rax,1)
mov $0x1,%... | func0:
endbr64
test esi, esi
jle short loc_1170
lea eax, [rsi-1]
lea rax, [rdi+rax*4+4]
jmp short loc_1161
loc_1158:
add rdi, 4
cmp rdi, rax
jz short loc_1170
loc_1161:
cmp [rdi], edx
jz short loc_1158
xor eax, eax
retn
loc_1170:
mov eax, 1
retn | long long func0(_DWORD *a1, int a2, int a3)
{
long long v3; // rax
if ( a2 <= 0 )
return 1LL;
v3 = (long long)&a1[a2 - 1 + 1];
while ( *a1 == a3 )
{
if ( ++a1 == (_DWORD *)v3 )
return 1LL;
}
return 0LL;
} | func0:
ENDBR64
TEST ESI,ESI
JLE 0x00101170
LEA EAX,[RSI + -0x1]
LEA RAX,[RDI + RAX*0x4 + 0x4]
JMP 0x00101161
LAB_00101158:
ADD RDI,0x4
CMP RDI,RAX
JZ 0x00101170
LAB_00101161:
CMP dword ptr [RDI],EDX
JZ 0x00101158
XOR EAX,EAX
RET
LAB_00101170:
MOV EAX,0x1
RET | int8 func0(int *param_1,int param_2,int param_3)
{
int *piVar1;
if (0 < param_2) {
piVar1 = param_1 + (ulong)(param_2 - 1) + 1;
do {
if (*param_1 != param_3) {
return 0;
}
param_1 = param_1 + 1;
} while (param_1 != piVar1);
}
return 1;
} |
5,751 | func0 |
#include <stdio.h>
#include <stdbool.h>
#include <assert.h>
| bool func0(int dict[], int size, int n) {
for (int i = 0; i < size; i++) {
if (dict[i] != n) {
return false;
}
}
return true;
}
| int main() {
int dict1[] = {12, 12, 12, 12};
int dictSize1 = sizeof(dict1) / sizeof(dict1[0]);
assert(func0(dict1, dictSize1, 10) == false);
assert(func0(dict1, dictSize1, 12) == true);
assert(func0(dict1, dictSize1, 5) == false);
return 0;
}
| O3 | c | func0:
endbr64
test %esi,%esi
jle 1170 <func0+0x30>
lea -0x1(%rsi),%eax
lea 0x4(%rdi,%rax,4),%rax
jmp 1161 <func0+0x21>
nopw 0x0(%rax,%rax,1)
add $0x4,%rdi
cmp %rax,%rdi
je 1170 <func0+0x30>
cmp %edx,(%rdi)
je 1158 <func0+0x18>
xor %eax,%eax
retq
nopl 0x0(%rax,%rax,1)
mov $0x1,%... | func0:
endbr64
test esi, esi
jle short loc_1170
movsxd rsi, esi
lea rax, [rdi+rsi*4]
jmp short loc_1161
loc_1158:
add rdi, 4
cmp rdi, rax
jz short loc_1170
loc_1161:
cmp [rdi], edx
jz short loc_1158
xor eax, eax
retn
loc_1170:
mov eax, 1
retn | long long func0(_DWORD *a1, int a2, int a3)
{
_DWORD *v3; // rax
if ( a2 <= 0 )
return 1LL;
v3 = &a1[a2];
while ( *a1 == a3 )
{
if ( ++a1 == v3 )
return 1LL;
}
return 0LL;
} | func0:
ENDBR64
TEST ESI,ESI
JLE 0x00101170
MOVSXD RSI,ESI
LEA RAX,[RDI + RSI*0x4]
JMP 0x00101161
LAB_00101158:
ADD RDI,0x4
CMP RDI,RAX
JZ 0x00101170
LAB_00101161:
CMP dword ptr [RDI],EDX
JZ 0x00101158
XOR EAX,EAX
RET
LAB_00101170:
MOV EAX,0x1
RET | int8 func0(int *param_1,int param_2,int param_3)
{
int *piVar1;
if (0 < param_2) {
piVar1 = param_1 + param_2;
do {
if (*param_1 != param_3) {
return 0;
}
param_1 = param_1 + 1;
} while (param_1 != piVar1);
}
return 1;
} |
5,752 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
typedef struct {
char *key;
char *value;
} Entry;
typedef struct {
Entry *entries;
int size;
} Dictionary;
Dictionary drop_empty(Dictionary dict1) {
Dictionary result;
result.entries = (Entry *)malloc(sizeof(Entry) *... | int func0(Dictionary dict1, Dictionary dict2) {
if (dict1.size != dict2.size) return 0;
for (int i = 0; i < dict1.size; i++) {
int found = 0;
for (int j = 0; j < dict2.size; j++) {
if (dict1.entries[i].key == dict2.entries[j].key && dict1.entries[i].value == dict2.entries[j].val... | int main() {
Dictionary dict1, result, expected;
dict1.size = 3;
dict1.entries = (Entry[]){{"c1", "Red"}, {"c2", "Green"}, {"c3", NULL}};
expected.size = 2;
expected.entries = (Entry[]){{"c1", "Red"}, {"c2", "Green"}};
result = drop_empty(dict1);
assert(func0(result, expected));
... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rsi,%rax
mov %rdi,%r8
mov %r8,%rsi
mov %r9,%rdi
mov %rax,%rdi
mov %rsi,-0x20(%rbp)
mov %rdi,-0x18(%rbp)
mov %rdx,-0x30(%rbp)
mov %rcx,-0x28(%rbp)
mov -0x18(%rbp),%edx
mov -0x28(%rbp),%eax
cmp %eax,%edx
je 1295 <func0+0x3b>
mov $... | func0:
endbr64
push rbp
mov rbp, rsp
mov rax, rdi
mov r8, rsi
mov rsi, rax
mov rdi, rdx
mov rdi, r8
mov [rbp+var_20], rsi
mov [rbp+var_18], rdi
mov [rbp+var_30], rdx
mov [rbp+var_28], rcx
mov edx, dword ptr [rbp+var_18]
mov eax, dword ptr [rbp+var_28]
cmp edx, eax
... | long long func0(long long a1, int a2, long long a3, int a4)
{
int i; // [rsp+24h] [rbp-Ch]
int v6; // [rsp+28h] [rbp-8h]
int j; // [rsp+2Ch] [rbp-4h]
if ( a2 != a4 )
return 0LL;
for ( i = 0; i < a2; ++i )
{
v6 = 0;
for ( j = 0; j < a4; ++j )
{
if ( *(_QWORD *)(16LL * i + a1) == *(_QW... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV RAX,RDI
MOV R8,RSI
MOV RSI,RAX
MOV RDI,RDX
MOV RDI,R8
MOV qword ptr [RBP + -0x20],RSI
MOV qword ptr [RBP + -0x18],RDI
MOV qword ptr [RBP + -0x30],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV EDX,dword ptr [RBP + -0x18]
MOV EAX,dword ptr [RBP + -0x28]
CMP EDX,EAX
JZ 0x00101295
MOV EAX,... | int8 func0(long param_1,int param_2,long param_3,int param_4)
{
bool bVar1;
int8 uVar2;
int local_14;
int local_c;
if (param_2 == param_4) {
for (local_14 = 0; local_14 < param_2; local_14 = local_14 + 1) {
bVar1 = false;
for (local_c = 0; local_c < param_4; local_c = local_c + 1) {
... |
5,753 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
typedef struct {
char *key;
char *value;
} Entry;
typedef struct {
Entry *entries;
int size;
} Dictionary;
Dictionary drop_empty(Dictionary dict1) {
Dictionary result;
result.entries = (Entry *)malloc(sizeof(Entry) *... | int func0(Dictionary dict1, Dictionary dict2) {
if (dict1.size != dict2.size) return 0;
for (int i = 0; i < dict1.size; i++) {
int found = 0;
for (int j = 0; j < dict2.size; j++) {
if (dict1.entries[i].key == dict2.entries[j].key && dict1.entries[i].value == dict2.entries[j].val... | int main() {
Dictionary dict1, result, expected;
dict1.size = 3;
dict1.entries = (Entry[]){{"c1", "Red"}, {"c2", "Green"}, {"c3", NULL}};
expected.size = 2;
expected.entries = (Entry[]){{"c1", "Red"}, {"c2", "Green"}};
result = drop_empty(dict1);
assert(func0(result, expected));
... | O1 | c | func0:
endbr64
mov %ecx,%r9d
mov $0x0,%eax
cmp %ecx,%esi
jne 1274 <func0+0x7c>
test %esi,%esi
jle 122c <func0+0x34>
mov %rdi,%r8
lea -0x1(%rsi),%eax
shl $0x4,%rax
lea 0x10(%rdi,%rax,1),%r10
mov %rdx,%rdi
lea -0x1(%rcx),%eax
shl $0x4,%rax
lea 0x10(%rax,%rdx,1),%rcx
jmp 1253 <f... | func0:
endbr64
mov r9, rdx
mov r10d, ecx
mov eax, 0
cmp esi, ecx
jnz short locret_1274
test esi, esi
jle short loc_122C
mov r8, rdi
lea eax, [rsi-1]
shl rax, 4
lea rdi, [rdi+rax+10h]
lea eax, [rcx-1]
shl rax, 4
lea rcx, [rax+rdx+10h]
jmp short loc_1253
loc_122C... | long long func0(_QWORD *a1, int a2, _QWORD *a3, int a4)
{
long long result; // rax
_QWORD *v6; // r8
long long v7; // rdi
long long v8; // rcx
_QWORD *v9; // rax
result = 0LL;
if ( a2 == a4 )
{
if ( a2 <= 0 )
{
return 1LL;
}
else
{
v6 = a1;
v7 = (long long)&a1[2 *... | func0:
ENDBR64
MOV R9,RDX
MOV R10D,ECX
MOV EAX,0x0
CMP ESI,ECX
JNZ 0x00101274
TEST ESI,ESI
JLE 0x0010122c
MOV R8,RDI
LEA EAX,[RSI + -0x1]
SHL RAX,0x4
LEA RDI,[RDI + RAX*0x1 + 0x10]
LEA EAX,[RCX + -0x1]
SHL RAX,0x4
LEA RCX,[RAX + RDX*0x1 + 0x10]
JMP 0x00101253
LAB_0010122c:
MOV EAX,0x1
RET
LAB_00101232:
ADD RAX,0x10
CMP... | int8 func0(long *param_1,int param_2,long *param_3,int param_4)
{
long *plVar1;
int8 uVar2;
long *plVar3;
uVar2 = 0;
if (param_2 == param_4) {
if (param_2 < 1) {
return 1;
}
plVar1 = param_1 + (ulong)(param_2 - 1) * 2 + 2;
do {
if (param_4 < 1) {
return 0;
}
... |
5,754 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
typedef struct {
char *key;
char *value;
} Entry;
typedef struct {
Entry *entries;
int size;
} Dictionary;
Dictionary drop_empty(Dictionary dict1) {
Dictionary result;
result.entries = (Entry *)malloc(sizeof(Entry) *... | int func0(Dictionary dict1, Dictionary dict2) {
if (dict1.size != dict2.size) return 0;
for (int i = 0; i < dict1.size; i++) {
int found = 0;
for (int j = 0; j < dict2.size; j++) {
if (dict1.entries[i].key == dict2.entries[j].key && dict1.entries[i].value == dict2.entries[j].val... | int main() {
Dictionary dict1, result, expected;
dict1.size = 3;
dict1.entries = (Entry[]){{"c1", "Red"}, {"c2", "Green"}, {"c3", NULL}};
expected.size = 2;
expected.entries = (Entry[]){{"c1", "Red"}, {"c2", "Green"}};
result = drop_empty(dict1);
assert(func0(result, expected));
... | O2 | c | func0:
endbr64
mov %ecx,%r8d
xor %eax,%eax
cmp %ecx,%esi
jne 149e <func0+0x5e>
test %ecx,%ecx
jle 1499 <func0+0x59>
lea -0x1(%rcx),%eax
shl $0x4,%rax
lea 0x10(%rdi,%rax,1),%r9
lea 0x10(%rax,%rdx,1),%rsi
nopw 0x0(%rax,%rax,1)
test %r8d,%r8d
jle 14a0 <func0+0x60>
mov (%rdi),%rcx
mov... | func0:
endbr64
mov r8d, ecx
xor eax, eax
cmp esi, ecx
jnz short locret_149E
test ecx, ecx
jle short loc_1499
lea eax, [rcx-1]
shl rax, 4
lea r9, [rdi+rax+10h]
lea rsi, [rax+rdx+10h]
nop word ptr [rax+rax+00h]
loc_1468:
test r8d, r8d
jle short loc_14A0
mov rcx, [rdi]... | long long func0(_QWORD *a1, int a2, _QWORD *a3, int a4)
{
long long result; // rax
long long v5; // rax
long long v6; // r9
long long v7; // rsi
_QWORD *v8; // rax
result = 0LL;
if ( a2 == a4 )
{
if ( a4 > 0 )
{
v5 = 2LL * (unsigned int)(a4 - 1);
v6 = (long long)&a1[v5 + 2];
... | func0:
ENDBR64
MOV R8D,ECX
XOR EAX,EAX
CMP ESI,ECX
JNZ 0x0010149e
TEST ECX,ECX
JLE 0x00101499
LEA EAX,[RCX + -0x1]
SHL RAX,0x4
LEA R9,[RDI + RAX*0x1 + 0x10]
LEA RSI,[RAX + RDX*0x1 + 0x10]
NOP word ptr [RAX + RAX*0x1]
LAB_00101468:
TEST R8D,R8D
JLE 0x001014a0
MOV RCX,qword ptr [RDI]
MOV RAX,RDX
JMP 0x00101481
LAB_001014... | int8 func0(long *param_1,int param_2,long *param_3,int param_4)
{
long *plVar1;
long *plVar2;
int8 uVar3;
uVar3 = 0;
if (param_2 == param_4) {
if (0 < param_4) {
plVar1 = param_1 + (ulong)(param_4 - 1) * 2 + 2;
do {
if (param_4 < 1) {
return 0;
}
plVar2 = ... |
5,755 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
typedef struct {
char *key;
char *value;
} Entry;
typedef struct {
Entry *entries;
int size;
} Dictionary;
Dictionary drop_empty(Dictionary dict1) {
Dictionary result;
result.entries = (Entry *)malloc(sizeof(Entry) *... | int func0(Dictionary dict1, Dictionary dict2) {
if (dict1.size != dict2.size) return 0;
for (int i = 0; i < dict1.size; i++) {
int found = 0;
for (int j = 0; j < dict2.size; j++) {
if (dict1.entries[i].key == dict2.entries[j].key && dict1.entries[i].value == dict2.entries[j].val... | int main() {
Dictionary dict1, result, expected;
dict1.size = 3;
dict1.entries = (Entry[]){{"c1", "Red"}, {"c2", "Green"}, {"c3", NULL}};
expected.size = 2;
expected.entries = (Entry[]){{"c1", "Red"}, {"c2", "Green"}};
result = drop_empty(dict1);
assert(func0(result, expected));
... | O3 | c | func0:
endbr64
mov %ecx,%r8d
xor %eax,%eax
cmp %ecx,%esi
jne 14ae <func0+0x5e>
test %ecx,%ecx
jle 14a9 <func0+0x59>
lea -0x1(%rcx),%eax
shl $0x4,%rax
lea 0x10(%rdi,%rax,1),%r9
lea 0x10(%rax,%rdx,1),%rsi
nopw 0x0(%rax,%rax,1)
test %r8d,%r8d
jle 14b0 <func0+0x60>
mov (%rdi),%rcx
mov... | func0:
endbr64
mov r8d, ecx
xor eax, eax
cmp esi, ecx
jnz short locret_14A9
test ecx, ecx
jle short loc_14A4
movsxd rcx, ecx
shl rcx, 4
lea r9, [rcx+rdi]
nop dword ptr [rax+00h]
loc_1470:
mov rsi, [rdi]
mov rax, rdx
xor ecx, ecx
jmp short loc_148C
loc_1480:
add ec... | long long func0(_QWORD *a1, int a2, _QWORD *a3, int a4)
{
long long result; // rax
_QWORD *v6; // r9
_QWORD *v7; // rax
int v8; // ecx
result = 0LL;
if ( a2 == a4 )
{
if ( a4 > 0 )
{
v6 = &a1[2 * a4];
while ( 2 )
{
v7 = a3;
v8 = 0;
while ( *a1 != *v7 || ... | func0:
ENDBR64
MOV R8D,ECX
XOR EAX,EAX
CMP ESI,ECX
JNZ 0x001014a9
TEST ECX,ECX
JLE 0x001014a4
MOVSXD RCX,ECX
SHL RCX,0x4
LEA R9,[RCX + RDI*0x1]
NOP dword ptr [RAX]
LAB_00101470:
MOV RSI,qword ptr [RDI]
MOV RAX,RDX
XOR ECX,ECX
JMP 0x0010148c
LAB_00101480:
ADD ECX,0x1
ADD RAX,0x10
CMP R8D,ECX
JLE 0x001014b0
LAB_0010148c:... | int8 func0(long *param_1,int param_2,long *param_3,int param_4)
{
long *plVar1;
long *plVar2;
int8 uVar3;
int iVar4;
uVar3 = 0;
if (param_2 == param_4) {
if (0 < param_4) {
plVar1 = param_1 + (long)param_4 * 2;
do {
iVar4 = 0;
plVar2 = param_3;
while ((*param_1 !=... |
5,756 | func0 | #include <assert.h>
int find_peak_util(int arr[], int low, int high, int n) {
int mid = low + (high - low) / 2;
if ((mid == 0 || arr[mid - 1] <= arr[mid]) &&
(mid == n - 1 || arr[mid + 1] <= arr[mid])) {
return mid;
} else if (mid > 0 && arr[mid - 1] > arr[mid]) {
return fin... | int func0(int arr[], int n) {
return find_peak_util(arr, 0, n - 1, n);
}
| int main() {
int arr1[6] = {1, 3, 20, 4, 1, 0};
int arr2[5] = {2, 3, 4, 5, 6};
int arr3[6] = {8, 9, 11, 12, 14, 15};
assert(func0(arr1, 6) == 2);
assert(func0(arr2, 5) == 4);
assert(func0(arr3, 6) == 5);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x10,%rsp
mov %rdi,-0x8(%rbp)
mov %esi,-0xc(%rbp)
mov -0xc(%rbp),%eax
lea -0x1(%rax),%esi
mov -0xc(%rbp),%edx
mov -0x8(%rbp),%rax
mov %edx,%ecx
mov %esi,%edx
mov $0x0,%esi
mov %rax,%rdi
callq 1169 <find_peak_util>
leaveq
retq
| func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov eax, [rbp+var_C]
lea esi, [rax-1]
mov edx, [rbp+var_C]
mov rax, [rbp+var_8]
mov ecx, edx
mov edx, esi
mov esi, 0
mov rdi, rax
call find_peak_util
leave
retn | long long func0(long long a1, unsigned int a2)
{
return find_peak_util(a1, 0LL, a2 - 1, a2);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV EAX,dword ptr [RBP + -0xc]
LEA ESI,[RAX + -0x1]
MOV EDX,dword ptr [RBP + -0xc]
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,EDX
MOV EDX,ESI
MOV ESI,0x0
MOV RDI,RAX
CALL 0x00101169
LEAVE
RET | void func0(int8 param_1,int param_2)
{
find_peak_util(param_1,0,param_2 + -1,param_2);
return;
} |
5,757 | func0 | #include <assert.h>
int find_peak_util(int arr[], int low, int high, int n) {
int mid = low + (high - low) / 2;
if ((mid == 0 || arr[mid - 1] <= arr[mid]) &&
(mid == n - 1 || arr[mid + 1] <= arr[mid])) {
return mid;
} else if (mid > 0 && arr[mid - 1] > arr[mid]) {
return fin... | int func0(int arr[], int n) {
return find_peak_util(arr, 0, n - 1, n);
}
| int main() {
int arr1[6] = {1, 3, 20, 4, 1, 0};
int arr2[5] = {2, 3, 4, 5, 6};
int arr3[6] = {8, 9, 11, 12, 14, 15};
assert(func0(arr1, 6) == 2);
assert(func0(arr2, 5) == 4);
assert(func0(arr3, 6) == 5);
return 0;
}
| O1 | c | func0:
endbr64
sub $0x8,%rsp
mov %esi,%ecx
lea -0x1(%rsi),%edx
mov $0x0,%esi
callq 1169 <find_peak_util>
add $0x8,%rsp
retq
| func0:
endbr64
sub rsp, 8
mov ecx, esi
lea edx, [rsi-1]
mov esi, 0
call find_peak_util
add rsp, 8
retn | long long func0(long long a1, unsigned int a2)
{
return find_peak_util(a1, 0LL, a2 - 1, a2);
} | func0:
ENDBR64
SUB RSP,0x8
MOV ECX,ESI
LEA EDX,[RSI + -0x1]
MOV ESI,0x0
CALL 0x00101169
ADD RSP,0x8
RET | void func0(int8 param_1,int param_2)
{
find_peak_util(param_1,0,param_2 + -1,param_2);
return;
} |
5,758 | func0 | #include <assert.h>
int find_peak_util(int arr[], int low, int high, int n) {
int mid = low + (high - low) / 2;
if ((mid == 0 || arr[mid - 1] <= arr[mid]) &&
(mid == n - 1 || arr[mid + 1] <= arr[mid])) {
return mid;
} else if (mid > 0 && arr[mid - 1] > arr[mid]) {
return fin... | int func0(int arr[], int n) {
return find_peak_util(arr, 0, n - 1, n);
}
| int main() {
int arr1[6] = {1, 3, 20, 4, 1, 0};
int arr2[5] = {2, 3, 4, 5, 6};
int arr3[6] = {8, 9, 11, 12, 14, 15};
assert(func0(arr1, 6) == 2);
assert(func0(arr2, 5) == 4);
assert(func0(arr3, 6) == 5);
return 0;
}
| O2 | c | func0:
endbr64
mov %esi,%ecx
lea -0x1(%rsi),%edx
xor %esi,%esi
jmpq 12d0 <find_peak_util>
| func0:
endbr64
mov ecx, esi
lea edx, [rsi-1]
xor esi, esi
jmp find_peak_util | long long func0(long long a1, unsigned int a2)
{
return find_peak_util(a1, 0LL, a2 - 1, a2);
} | func0:
ENDBR64
MOV ECX,ESI
LEA EDX,[RSI + -0x1]
XOR ESI,ESI
JMP 0x001012d0 | void func0(int8 param_1,int param_2)
{
find_peak_util(param_1,0,param_2 + -1,param_2);
return;
} |
5,759 | func0 | #include <assert.h>
int find_peak_util(int arr[], int low, int high, int n) {
int mid = low + (high - low) / 2;
if ((mid == 0 || arr[mid - 1] <= arr[mid]) &&
(mid == n - 1 || arr[mid + 1] <= arr[mid])) {
return mid;
} else if (mid > 0 && arr[mid - 1] > arr[mid]) {
return fin... | int func0(int arr[], int n) {
return find_peak_util(arr, 0, n - 1, n);
}
| int main() {
int arr1[6] = {1, 3, 20, 4, 1, 0};
int arr2[5] = {2, 3, 4, 5, 6};
int arr3[6] = {8, 9, 11, 12, 14, 15};
assert(func0(arr1, 6) == 2);
assert(func0(arr2, 5) == 4);
assert(func0(arr3, 6) == 5);
return 0;
}
| O3 | c | func0:
endbr64
mov %esi,%ecx
lea -0x1(%rsi),%edx
xor %esi,%esi
jmpq 12a0 <find_peak_util>
| func0:
endbr64
mov ecx, esi
lea edx, [rsi-1]
xor esi, esi
jmp find_peak_util | long long func0(long long a1, unsigned int a2)
{
return find_peak_util(a1, 0LL, a2 - 1, a2);
} | func0:
ENDBR64
MOV ECX,ESI
LEA EDX,[RSI + -0x1]
XOR ESI,ESI
JMP 0x001012a0 | void func0(int8 param_1,int param_2)
{
find_peak_util(param_1,0,param_2 + -1,param_2);
return;
} |
5,760 | func0 |
#include <assert.h>
#include <stdio.h>
| int func0(int deciNum) {
int octalNum = 0;
int countval = 1;
int remainder;
while (deciNum != 0) {
remainder = deciNum % 8;
octalNum += remainder * countval;
countval *= 10;
deciNum /= 8;
}
return octalNum;
}
| int main() {
assert(func0(10) == 12);
assert(func0(2) == 2);
assert(func0(33) == 41);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
movl $0x0,-0xc(%rbp)
movl $0x1,-0x8(%rbp)
jmp 119f <func0+0x56>
mov -0x14(%rbp),%eax
cltd
shr $0x1d,%edx
add %edx,%eax
and $0x7,%eax
sub %edx,%eax
mov %eax,-0x4(%rbp)
mov -0x4(%rbp),%eax
imul -0x8(%rbp),%eax
add %eax,-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_11A3
loc_1164:
mov edx, [rbp+var_14]
mov eax, edx
sar eax, 1Fh
shr eax, 1Dh
add edx, eax
and edx, 7
sub edx, eax
mov [rbp+var_4], edx
mov eax, [rbp+va... | long long func0(int a1)
{
unsigned int v3; // [rsp+8h] [rbp-Ch]
int v4; // [rsp+Ch] [rbp-8h]
v3 = 0;
v4 = 1;
while ( a1 )
{
v3 += v4 * (a1 % 8);
v4 *= 10;
a1 /= 8;
}
return v3;
} | 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 0x001011a3
LAB_00101164:
MOV EDX,dword ptr [RBP + -0x14]
MOV EAX,EDX
SAR EAX,0x1f
SHR EAX,0x1d
ADD EDX,EAX
AND EDX,0x7
SUB EDX,EAX
MOV dword ptr [RBP + -0x4],EDX
MOV EAX,dword ptr [RBP +... | int func0(int param_1)
{
int4 local_1c;
int4 local_14;
int4 local_10;
local_14 = 0;
local_10 = 1;
for (local_1c = param_1; local_1c != 0; local_1c = local_1c >> 3) {
local_14 = local_14 + (local_1c % 8) * local_10;
local_10 = local_10 * 10;
if (local_1c < 0) {
local_1c = local_1c + 7;
... |
5,761 | func0 |
#include <assert.h>
#include <stdio.h>
| int func0(int deciNum) {
int octalNum = 0;
int countval = 1;
int remainder;
while (deciNum != 0) {
remainder = deciNum % 8;
octalNum += remainder * countval;
countval *= 10;
deciNum /= 8;
}
return octalNum;
}
| int main() {
assert(func0(10) == 12);
assert(func0(2) == 2);
assert(func0(33) == 41);
return 0;
}
| O1 | c | func0:
endbr64
mov %edi,%edx
test %edi,%edi
je 118c <func0+0x43>
mov $0x1,%ecx
mov $0x0,%r8d
mov %edx,%esi
sar $0x1f,%esi
shr $0x1d,%esi
lea (%rdx,%rsi,1),%eax
and $0x7,%eax
sub %esi,%eax
imul %ecx,%eax
add %eax,%r8d
lea (%rcx,%rcx,4),%ecx
add %ecx,%ecx
lea 0x7(%rdx),%edi
... | func0:
endbr64
test edi, edi
jz short loc_1187
mov edx, 1
mov esi, 0
loc_115B:
mov ecx, edi
sar ecx, 1Fh
shr ecx, 1Dh
lea eax, [rdi+rcx]
and eax, 7
sub eax, ecx
imul eax, edx
add esi, eax
lea edx, [rdx+rdx*4]
add edx, edx
lea eax, [rdi+7]
test edi, edi
cmovn... | long long func0(int a1)
{
int v1; // eax
int v2; // edx
unsigned int v3; // esi
if ( a1 )
{
v2 = 1;
v3 = 0;
do
{
v3 += v2 * (a1 % 8);
v2 *= 10;
a1 /= 8;
}
while ( v1 >> 3 );
}
else
{
return 0;
}
return v3;
} | func0:
ENDBR64
TEST EDI,EDI
JZ 0x00101187
MOV EDX,0x1
MOV ESI,0x0
LAB_0010115b:
MOV ECX,EDI
SAR ECX,0x1f
SHR ECX,0x1d
LEA EAX,[RDI + RCX*0x1]
AND EAX,0x7
SUB EAX,ECX
IMUL EAX,EDX
ADD ESI,EAX
LEA EDX,[RDX + RDX*0x4]
ADD EDX,EDX
LEA EAX,[RDI + 0x7]
TEST EDI,EDI
CMOVNS EAX,EDI
SAR EAX,0x3
MOV EDI,EAX
JNZ 0x0010115b
LAB_00... | int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
if (param_1 == 0) {
iVar3 = 0;
}
else {
iVar2 = 1;
iVar3 = 0;
do {
iVar3 = iVar3 + (param_1 % 8) * iVar2;
iVar2 = iVar2 * 10;
iVar1 = param_1 + 7;
if (-1 < param_1) {
iVar1 = param_1;
}
... |
5,762 | func0 |
#include <assert.h>
#include <stdio.h>
| int func0(int deciNum) {
int octalNum = 0;
int countval = 1;
int remainder;
while (deciNum != 0) {
remainder = deciNum % 8;
octalNum += remainder * countval;
countval *= 10;
deciNum /= 8;
}
return octalNum;
}
| int main() {
assert(func0(10) == 12);
assert(func0(2) == 2);
assert(func0(33) == 41);
return 0;
}
| O2 | c | func0:
endbr64
test %edi,%edi
je 1180 <func0+0x40>
mov $0x1,%edx
xor %r8d,%r8d
mov %edi,%ecx
sar $0x1f,%ecx
shr $0x1d,%ecx
lea (%rdi,%rcx,1),%eax
and $0x7,%eax
sub %ecx,%eax
imul %edx,%eax
lea (%rdx,%rdx,4),%edx
add %edx,%edx
add %eax,%r8d
test %edi,%edi
lea 0x7(%rdi),%eax
... | func0:
endbr64
test edi, edi
jz short loc_1180
mov edx, 1
xor r8d, r8d
loc_1150:
mov ecx, edi
sar ecx, 1Fh
shr ecx, 1Dh
lea eax, [rdi+rcx]
and eax, 7
sub eax, ecx
imul eax, edx
lea edx, [rdx+rdx*4]
add edx, edx
add r8d, eax
test edi, edi
lea eax, [rdi+7]
cmo... | long long func0(int a1)
{
int v1; // edx
unsigned int v2; // r8d
int v3; // eax
if ( !a1 )
return 0LL;
v1 = 1;
v2 = 0;
do
{
v3 = v1 * (a1 % 8);
v1 *= 10;
v2 += v3;
a1 /= 8;
}
while ( a1 );
return v2;
} | func0:
ENDBR64
TEST EDI,EDI
JZ 0x00101180
MOV EDX,0x1
XOR R8D,R8D
LAB_00101150:
MOV ECX,EDI
SAR ECX,0x1f
SHR ECX,0x1d
LEA EAX,[RDI + RCX*0x1]
AND EAX,0x7
SUB EAX,ECX
IMUL EAX,EDX
LEA EDX,[RDX + RDX*0x4]
ADD EDX,EDX
ADD R8D,EAX
TEST EDI,EDI
LEA EAX,[RDI + 0x7]
CMOVS EDI,EAX
SAR EDI,0x3
JNZ 0x00101150
MOV EAX,R8D
RET
LAB... | int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
if (param_1 != 0) {
iVar2 = 1;
iVar3 = 0;
do {
iVar1 = (param_1 % 8) * iVar2;
iVar2 = iVar2 * 10;
iVar3 = iVar3 + iVar1;
if (param_1 < 0) {
param_1 = param_1 + 7;
}
param_1 = param_1 >> 3;
}... |
5,763 | func0 |
#include <assert.h>
#include <stdio.h>
| int func0(int deciNum) {
int octalNum = 0;
int countval = 1;
int remainder;
while (deciNum != 0) {
remainder = deciNum % 8;
octalNum += remainder * countval;
countval *= 10;
deciNum /= 8;
}
return octalNum;
}
| int main() {
assert(func0(10) == 12);
assert(func0(2) == 2);
assert(func0(33) == 41);
return 0;
}
| O3 | c | func0:
endbr64
test %edi,%edi
je 1180 <func0+0x40>
mov $0x1,%edx
xor %r8d,%r8d
mov %edi,%ecx
sar $0x1f,%ecx
shr $0x1d,%ecx
lea (%rdi,%rcx,1),%eax
and $0x7,%eax
sub %ecx,%eax
imul %edx,%eax
lea (%rdx,%rdx,4),%edx
add %edx,%edx
add %eax,%r8d
test %edi,%edi
lea 0x7(%rdi),%eax
... | func0:
endbr64
test edi, edi
jz short loc_1180
mov edx, 1
xor esi, esi
nop
loc_1150:
mov ecx, edi
sar ecx, 1Fh
shr ecx, 1Dh
lea eax, [rdi+rcx]
and eax, 7
sub eax, ecx
imul eax, edx
lea edx, [rdx+rdx*4]
add edx, edx
add esi, eax
test edi, edi
lea eax, [rdi+7]... | long long func0(int a1)
{
int v1; // edx
unsigned int v2; // esi
int v3; // eax
if ( !a1 )
return 0LL;
v1 = 1;
v2 = 0;
do
{
v3 = v1 * (a1 % 8);
v1 *= 10;
v2 += v3;
a1 /= 8;
}
while ( a1 );
return v2;
} | func0:
ENDBR64
TEST EDI,EDI
JZ 0x00101180
MOV EDX,0x1
XOR ESI,ESI
NOP
LAB_00101150:
MOV ECX,EDI
SAR ECX,0x1f
SHR ECX,0x1d
LEA EAX,[RDI + RCX*0x1]
AND EAX,0x7
SUB EAX,ECX
IMUL EAX,EDX
LEA EDX,[RDX + RDX*0x4]
ADD EDX,EDX
ADD ESI,EAX
TEST EDI,EDI
LEA EAX,[RDI + 0x7]
CMOVS EDI,EAX
SAR EDI,0x3
JNZ 0x00101150
MOV EAX,ESI
RET... | int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
if (param_1 != 0) {
iVar2 = 1;
iVar3 = 0;
do {
iVar1 = (param_1 % 8) * iVar2;
iVar2 = iVar2 * 10;
iVar3 = iVar3 + iVar1;
if (param_1 < 0) {
param_1 = param_1 + 7;
}
param_1 = param_1 >> 3;
}... |
5,764 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int arr[], int n) {
int mpis[n];
for (int i = 0; i < n; i++) {
mpis[i] = arr[i];
}
for (int i = 1; i < n; i++) {
for (int j = 0; j < i; j++) {
if (arr[i] > arr[j] && mpis[i] < (mpis[j] * arr[i])) {
mpis[i] = mpis[j] * arr[i];
}
... | int main() {
int arr1[] = {3, 100, 4, 5, 150, 6};
int arr2[] = {4, 42, 55, 68, 80};
int arr3[] = {10, 22, 9, 33, 21, 50, 41, 60};
assert(func0(arr1, 6) == 45000);
assert(func0(arr2, 5) == 50265600);
assert(func0(arr3, 8) == 21780000);
printf("All tests passed!\n");
return 0... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x48,%rsp
mov %rdi,-0x48(%rbp)
mov %esi,-0x4c(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov %rsp,%rax
mov %rax,%rdi
mov -0x4c(%rbp),%eax
movslq %eax,%rdx
sub $0x1,%rdx
mov %rdx,-0x28(%rbp)
movslq %eax,%rdx
mov... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_38], rdi
mov [rbp+var_3C], esi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov rax, rsp
mov rdi, rax
mov eax, [rbp+var_3C]
movsxd rdx, eax
sub rdx, 1
mov [rbp+var_18], rdx
cdqe
lea rdx, ds:0[rax*... | long long func0(long long a1, int a2)
{
unsigned long long v2; // rax
void *v3; // rsp
_BYTE v5[4]; // [rsp+8h] [rbp-40h] BYREF
int v6; // [rsp+Ch] [rbp-3Ch]
long long v7; // [rsp+10h] [rbp-38h]
int i; // [rsp+1Ch] [rbp-2Ch]
int j; // [rsp+20h] [rbp-28h]
int k; // [rsp+24h] [rbp-24h]
unsigned int v11... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x38],RDI
MOV dword ptr [RBP + -0x3c],ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOV RAX,RSP
MOV RDI,RAX
MOV EAX,dword ptr [RBP + -0x3c]
MOVSXD RDX,EAX
SUB RDX,0x1
MOV qword ptr [RBP + -0x18],RDX
CDQE
LEA RDX,[RAX*0x4... | int func0(long param_1,int param_2)
{
long lVar1;
ulong uVar2;
int *puVar3;
long in_FS_OFFSET;
int auStack_48 [4];
int local_44;
long local_40;
int local_34;
int local_30;
int local_2c;
int local_28;
int local_24;
long local_20;
int *local_18;
long local_10;
local_40 = param_1;
loc... |
5,765 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int arr[], int n) {
int mpis[n];
for (int i = 0; i < n; i++) {
mpis[i] = arr[i];
}
for (int i = 1; i < n; i++) {
for (int j = 0; j < i; j++) {
if (arr[i] > arr[j] && mpis[i] < (mpis[j] * arr[i])) {
mpis[i] = mpis[j] * arr[i];
}
... | int main() {
int arr1[] = {3, 100, 4, 5, 150, 6};
int arr2[] = {4, 42, 55, 68, 80};
int arr3[] = {10, 22, 9, 33, 21, 50, 41, 60};
assert(func0(arr1, 6) == 45000);
assert(func0(arr2, 5) == 50265600);
assert(func0(arr3, 8) == 21780000);
printf("All tests passed!\n");
return 0... | O1 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x18,%rsp
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
movslq %esi,%rax
lea 0xf(,%rax,4),%rax
mov %rax,%rdx
and $0xfffffffffffffff0,%rdx
and $0xfffffffffffff000,%rax
mov %rsp,%rbx
sub %rax,%rbx
mov %rbx,%rax
cmp %ra... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 10h
mov r9d, esi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
movsxd rax, esi
lea rax, ds:0Fh[rax*4]
mov rcx, rax
and rcx, 0FFFFFFFFFFFFFFF0h
and rax, 0FFFFFFFFFFFFF000h
mov rdx, rsp
sub rdx, rax
loc_11C5:
cmp rsp... | long long func0(long long a1, int a2)
{
signed long long v2; // rax
void *v3; // rsp
long long i; // rax
long long j; // rdx
long long v6; // rax
int v7; // r8d
int v8; // ecx
unsigned int v9; // edx
int *v10; // rax
long long v12; // [rsp+0h] [rbp-18h]
unsigned int v13; // [rsp+8h] [rbp-10h] BYR... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV R9D,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 RCX,RAX
AND RCX,-0x10
AND RAX,-0x1000
MOV RDX,RSP
SUB RDX,RAX
LAB_001011c5:
CMP RSP,RDX
JZ 0x001011dc
SUB RSP,0x1000
OR qword ptr [RSP + 0xff8],0... | int func0(long param_1,uint param_2)
{
long lVar1;
ulong uVar2;
ulong uVar3;
int *piVar4;
int iVar5;
int1 *puVar6;
int iVar7;
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 (puVar6 = auStack_18; pu... |
5,766 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int arr[], int n) {
int mpis[n];
for (int i = 0; i < n; i++) {
mpis[i] = arr[i];
}
for (int i = 1; i < n; i++) {
for (int j = 0; j < i; j++) {
if (arr[i] > arr[j] && mpis[i] < (mpis[j] * arr[i])) {
mpis[i] = mpis[j] * arr[i];
}
... | int main() {
int arr1[] = {3, 100, 4, 5, 150, 6};
int arr2[] = {4, 42, 55, 68, 80};
int arr3[] = {10, 22, 9, 33, 21, 50, 41, 60};
assert(func0(arr1, 6) == 45000);
assert(func0(arr2, 5) == 50265600);
assert(func0(arr3, 8) == 21780000);
printf("All tests passed!\n");
return 0... | 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,%rcx
lea 0xf(,%rax,4),%rax
mov %rax,%rdx
and $0xfffffffffffff000,%rax
sub %rax,%rcx
and $0xfffffffffffffff0,%rdx
mov %rcx,%rax
cmp %rax,%rsp
je ... | func0:
endbr64
push rbp
movsxd rdx, esi
mov rbp, rsp
push r13
push r12
mov r12, rdx
push rbx
mov rbx, rdi
sub rsp, 18h
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
lea rax, ds:0Fh[rdx*4]
mov rsi, rsp
mov rcx, rax
and rax, 0FFFFFFFFFFFFF000h
sub rsi, rax... | long long func0(long long a1, int a2)
{
long long v2; // rdx
long long v5; // rcx
unsigned long long v6; // rax
_DWORD *v7; // rsi
__int16 v8; // cx
signed long long v9; // rcx
void *v10; // rsp
long long v11; // rax
unsigned int v12; // r8d
long long v13; // rdi
long long v14; // rdx
int v15; ... | func0:
ENDBR64
PUSH RBP
MOVSXD RDX,ESI
MOV RBP,RSP
PUSH R13
PUSH R12
MOV R12,RDX
PUSH RBX
MOV RBX,RDI
SUB RSP,0x18
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
LEA RAX,[0xf + RDX*0x4]
MOV RSI,RSP
MOV RCX,RAX
AND RAX,-0x1000
SUB RSI,RAX
AND RCX,-0x10
CMP RSP,RSI
JZ 0x0010137e
LAB_00101369:
SUB... | int func0(void *param_1,uint param_2)
{
int iVar1;
long lVar2;
int1 *puVar3;
ulong uVar4;
void *pvVar5;
ulong uVar6;
int *piVar7;
ulong uVar8;
int1 *puVar9;
int iVar11;
int iVar12;
long in_FS_OFFSET;
int1 auStack_38 [8];
long local_30;
int1 *puVar10;
puVar9 = auStack_38;
local_30 =... |
5,767 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int arr[], int n) {
int mpis[n];
for (int i = 0; i < n; i++) {
mpis[i] = arr[i];
}
for (int i = 1; i < n; i++) {
for (int j = 0; j < i; j++) {
if (arr[i] > arr[j] && mpis[i] < (mpis[j] * arr[i])) {
mpis[i] = mpis[j] * arr[i];
}
... | int main() {
int arr1[] = {3, 100, 4, 5, 150, 6};
int arr2[] = {4, 42, 55, 68, 80};
int arr3[] = {10, 22, 9, 33, 21, 50, 41, 60};
assert(func0(arr1, 6) == 45000);
assert(func0(arr2, 5) == 50265600);
assert(func0(arr3, 8) == 21780000);
printf("All tests passed!\n");
return 0... | O3 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %r14
push %r13
push %r12
mov %esi,%r12d
push %rbx
mov %rdi,%rbx
sub $0x10,%rsp
mov %fs:0x28,%rax
mov %rax,-0x28(%rbp)
xor %eax,%eax
movslq %esi,%rax
mov %rsp,%rdi
lea 0xf(,%rax,4),%rax
mov %rax,%rdx
and $0xfffffffffffff000,%rax
sub ... | func0:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
mov r12d, esi
push rbx
mov rbx, rdi
sub rsp, 18h
mov rax, fs:28h
mov [rbp+var_38], rax
xor eax, eax
movsxd rax, esi
mov rcx, rsp
lea rax, ds:0Fh[rax*4]
mov rdx, rax
and rax, 0FFFFFFFFF... | long long func0(char *src, int a2)
{
long long v4; // rdx
_DWORD *v5; // rcx
__int16 v6; // dx
signed long long v7; // rdx
void *v8; // rsp
unsigned int v9; // r13d
char *v10; // rax
signed int v11; // r8d
char *v12; // rdi
long long v13; // rdx
int v14; // ecx
long long v15; // rax
int v16; ... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
MOV R12D,ESI
PUSH RBX
MOV RBX,RDI
SUB RSP,0x18
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
MOVSXD RAX,ESI
MOV RCX,RSP
LEA RAX,[0xf + RAX*0x4]
MOV RDX,RAX
AND RAX,-0x1000
SUB RCX,RAX
AND RDX,-0x10
CMP RSP,RCX
JZ 0x0010134... | uint func0(void *param_1,uint param_2)
{
uint *puVar1;
long lVar2;
uint *puVar3;
uint *puVar4;
uint *puVar5;
int *puVar6;
size_t sVar7;
int iVar8;
void *pvVar9;
size_t sVar10;
void *pvVar11;
ulong uVar12;
size_t sVar13;
int *puVar14;
int iVar16;
uint uVar17;
uint uVar18;
long in_FS_... |
5,768 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int price[], int n, int k) {
int final_profit[k + 1][n];
for (int i = 0; i <= k; i++) {
for (int j = 0; j < n; j++) {
if (i == 0 || j == 0) {
final_profit[i][j] = 0;
} else {
int max_so_far = 0;
for (int x = ... | int main() {
int prices1[] = {1, 5, 2, 3, 7, 6, 4, 5};
int n1 = sizeof(prices1) / sizeof(prices1[0]);
assert(func0(prices1, n1, 3) == 10);
int prices2[] = {2, 4, 7, 5, 4, 3, 5};
int n2 = sizeof(prices2) / sizeof(prices2[0]);
assert(func0(prices2, n2, 2) == 7);
int prices3[] = {10,... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %r15
push %r14
push %r13
push %r12
push %rbx
sub $0x78,%rsp
mov %rdi,-0x78(%rbp)
mov %esi,-0x7c(%rbp)
mov %edx,-0x80(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x38(%rbp)
xor %eax,%eax
mov %rsp,%rax
mov %rax,-0x98(%rbp)
mov -0x7c(%rbp),%ecx... | func0:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 58h
mov [rbp+var_58], rdi
mov [rbp+var_5C], esi
mov [rbp+var_60], edx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, rsp
mov r11, rax
mov esi, [rbp+var_5C]
mov eax, [rbp+var_60]
lea r8d, [rax+1]... | long long func0(long long a1, int a2, int a3)
{
unsigned long long v3; // rdi
unsigned long long v4; // rax
void *v5; // rsp
int v6; // edx
int v8; // [rsp+8h] [rbp-60h] BYREF
int v9; // [rsp+Ch] [rbp-5Ch]
long long v10; // [rsp+10h] [rbp-58h]
int i; // [rsp+24h] [rbp-44h]
int j; // [rsp+28h] [rbp-40... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RBP + -0x58],RDI
MOV dword ptr [RBP + -0x5c],ESI
MOV dword ptr [RBP + -0x60],EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,RSP
MOV R11,RAX
MOV ESI,dword ptr [RBP + -0x5c]
MOV EAX,dword ptr [RBP + -0x60]
LEA R8... | int4 func0(long param_1,int param_2,int param_3)
{
long lVar1;
int iVar2;
ulong uVar3;
ulong uVar4;
int *piVar5;
long in_FS_OFFSET;
int local_68;
int local_64;
long local_60;
int local_4c;
int local_48;
int local_44;
int local_40;
int local_3c;
long local_38;
long local_30;
int *local... |
5,769 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int price[], int n, int k) {
int final_profit[k + 1][n];
for (int i = 0; i <= k; i++) {
for (int j = 0; j < n; j++) {
if (i == 0 || j == 0) {
final_profit[i][j] = 0;
} else {
int max_so_far = 0;
for (int x = ... | int main() {
int prices1[] = {1, 5, 2, 3, 7, 6, 4, 5};
int n1 = sizeof(prices1) / sizeof(prices1[0]);
assert(func0(prices1, n1, 3) == 10);
int prices2[] = {2, 4, 7, 5, 4, 3, 5};
int n2 = sizeof(prices2) / sizeof(prices2[0]);
assert(func0(prices2, n2, 2) == 7);
int prices3[] = {10,... | O1 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %r15
push %r14
push %r13
push %r12
push %rbx
sub $0x28,%rsp
mov %esi,%r14d
mov %edx,%eax
mov %edx,-0x48(%rbp)
mov %fs:0x28,%rbx
mov %rbx,-0x38(%rbp)
xor %ebx,%ebx
movslq %esi,%rdx
lea 0x0(,%rdx,4),%r15
add $0x1,%eax
cltq
imul %rdx,%... | func0:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r14d, esi
mov ebx, edx
mov [rbp+var_4C], edx
mov rax, fs:28h
mov [rbp+var_38], rax
xor eax, eax
movsxd rdx, esi
lea rax, ds:0[rdx*4]
mov [rbp+var_48], rax
lea ... | long long func0(long long a1, int a2, int a3)
{
__int16 v4; // cx
long long *v5; // rdx
signed long long v6; // rax
void *v7; // rsp
long long *v8; // r13
long long *v9; // r12
char *v10; // r8
int v11; // r15d
int v12; // r11d
long long v13; // rsi
int v14; // ecx
int v15; // r10d
long long ... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R14D,ESI
MOV EBX,EDX
MOV dword ptr [RBP + -0x4c],EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
MOVSXD RDX,ESI
LEA RAX,[RDX*0x4]
MOV qword ptr [RBP + -0x48],RAX
LEA EAX,[RBX + 0x1]
CDQE
IMUL RA... | int4 func0(long param_1,uint param_2,int param_3)
{
int iVar1;
long lVar2;
ulong uVar3;
int iVar4;
int iVar5;
int1 *puVar6;
int iVar7;
ulong uVar8;
int1 *puVar9;
int iVar10;
int1 *puVar11;
int1 *puVar12;
long in_FS_OFFSET;
bool bVar13;
int1 auStack_68 [8];
int1 *local_60;
int local_54... |
5,770 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int price[], int n, int k) {
int final_profit[k + 1][n];
for (int i = 0; i <= k; i++) {
for (int j = 0; j < n; j++) {
if (i == 0 || j == 0) {
final_profit[i][j] = 0;
} else {
int max_so_far = 0;
for (int x = ... | int main() {
int prices1[] = {1, 5, 2, 3, 7, 6, 4, 5};
int n1 = sizeof(prices1) / sizeof(prices1[0]);
assert(func0(prices1, n1, 3) == 10);
int prices2[] = {2, 4, 7, 5, 4, 3, 5};
int n2 = sizeof(prices2) / sizeof(prices2[0]);
assert(func0(prices2, n2, 2) == 7);
int prices3[] = {10,... | O2 | c | func0:
endbr64
push %rbp
mov %edx,%eax
mov %rdi,%r9
add $0x1,%eax
mov %rsp,%rbp
push %r15
push %r14
mov %esi,%r14d
push %r13
push %r12
push %rbx
sub $0x48,%rsp
mov %edx,-0x50(%rbp)
movslq %esi,%rdx
mov %fs:0x28,%rbx
mov %rbx,-0x38(%rbp)
xor %ebx,%ebx
mov %eax,-0x4c(%rbp)
clt... | func0:
endbr64
push rbp
mov r8, rdi
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
movsxd rbx, esi
mov r14, rbx
lea r15, ds:0[rbx*4]
sub rsp, 38h
mov [rbp+var_44], edx
mov rax, fs:28h
mov [rbp+var_38], rax
xor eax, eax
lea eax, [rdx+1]
mov rdx, r... | long long func0(long long a1, int a2, int a3)
{
long long v3; // rbx
unsigned long long v5; // r15
long long v6; // rcx
long long *v7; // rdx
__int16 v8; // cx
signed long long v9; // rcx
void *v10; // rsp
_BYTE *v11; // r11
int v12; // r13d
_BYTE *v13; // r10
long long v14; // rsi
int v15; // ... | func0:
ENDBR64
PUSH RBP
MOV R8,RDI
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOVSXD RBX,ESI
MOV R14,RBX
LEA R15,[RBX*0x4]
SUB RSP,0x38
MOV dword ptr [RBP + -0x44],EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
LEA EAX,[RDX + 0x1]
MOV RDX,RSP
CDQE
IMUL RAX,RBX
LEA RAX,[0xf + R... | int4 func0(long param_1,int param_2,int param_3)
{
long lVar1;
long lVar2;
int iVar3;
int iVar4;
ulong uVar5;
int1 *puVar6;
ulong uVar8;
int1 *puVar9;
int1 *puVar10;
int iVar11;
long in_FS_OFFSET;
bool bVar12;
int1 auStack_68 [8];
int1 *local_60;
ulong local_58;
int local_4c;
long loc... |
5,771 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int price[], int n, int k) {
int final_profit[k + 1][n];
for (int i = 0; i <= k; i++) {
for (int j = 0; j < n; j++) {
if (i == 0 || j == 0) {
final_profit[i][j] = 0;
} else {
int max_so_far = 0;
for (int x = ... | int main() {
int prices1[] = {1, 5, 2, 3, 7, 6, 4, 5};
int n1 = sizeof(prices1) / sizeof(prices1[0]);
assert(func0(prices1, n1, 3) == 10);
int prices2[] = {2, 4, 7, 5, 4, 3, 5};
int n2 = sizeof(prices2) / sizeof(prices2[0]);
assert(func0(prices2, n2, 2) == 7);
int prices3[] = {10,... | O3 | c | func0:
endbr64
push %rbp
mov %edx,%eax
add $0x1,%eax
cltq
mov %rsp,%rbp
push %r15
push %r14
push %r13
push %r12
push %rbx
sub $0x58,%rsp
mov %edx,-0x58(%rbp)
movslq %esi,%rdx
imul %rdx,%rax
mov %fs:0x28,%rbx
mov %rbx,-0x38(%rbp)
xor %ebx,%ebx
lea 0x0(,%rdx,4),%rbx
lea 0xf(,%r... | func0:
endbr64
push rbp
mov rcx, rdi
mov rbp, rsp
push r15
push r14
push r13
movsxd r13, edx
push r12
movsxd r12, esi
push rbx
mov rax, r12
lea r11, ds:0[r12*4]
sub rsp, 48h
mov rdx, fs:28h
mov [rbp+var_38], rdx
xor edx, edx
lea edx, [r13+1]
mov rsi, rsp
movsx... | long long func0(long long a1, int a2, int a3)
{
long long v4; // r13
long long v5; // r12
int v6; // eax
unsigned long long v7; // r11
long long v8; // rdi
_BYTE *v9; // rsi
__int16 v10; // di
signed long long v11; // rdi
void *v12; // rsp
_BYTE *v13; // r15
unsigned long long v14; // rsi
_BYTE... | func0:
ENDBR64
PUSH RBP
MOV RCX,RDI
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
MOVSXD R13,EDX
PUSH R12
MOVSXD R12,ESI
PUSH RBX
MOV RAX,R12
LEA R11,[R12*0x4]
SUB RSP,0x48
MOV RDX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RDX
XOR EDX,EDX
LEA EDX,[R13 + 0x1]
MOV RSI,RSP
MOVSXD RDX,EDX
IMUL RDX,R12
LEA RDX,[0xf + RDX*0x4... | int4 func0(long param_1,int param_2,int param_3)
{
int *piVar1;
int *piVar2;
long lVar3;
int iVar4;
long lVar5;
int *puVar6;
ulong uVar7;
uint uVar8;
long lVar9;
long lVar10;
int *puVar11;
ulong uVar13;
uint uVar14;
int *puVar15;
ulong uVar16;
uint uVar17;
long in_FS_OFFSET;
uint uV... |
5,772 | func0 |
#include <assert.h>
#include <stdio.h>
| void func0(const int test_tup[], int size, int result[]) {
for (int i = 0; i < size - 1; i++) {
result[i] = test_tup[i] + test_tup[i + 1];
}
}
| int main() {
int result[4];
int test1[] = {1, 5, 7, 8, 10};
func0(test1, 5, result);
assert(result[0] == 6 && result[1] == 12 && result[2] == 15 && result[3] == 18);
int test2[] = {2, 6, 8, 9, 11};
func0(test2, 5, result);
assert(result[0] == 8 && result[1] == 14 && result[2] == 1... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
mov %rdx,-0x28(%rbp)
movl $0x0,-0x4(%rbp)
jmp 11d1 <func0+0x68>
mov -0x4(%rbp),%eax
cltq
lea 0x0(,%rax,4),%rdx
mov -0x18(%rbp),%rax
add %rdx,%rax
mov (%rax),%ecx
mov -0x4(%rbp),%eax
cltq
add $0x1,%ra... | 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_4], 0
jmp short loc_11D1
loc_1185:
mov eax, [rbp+var_4]
cdqe
lea rdx, ds:0[rax*4]
mov rax, [rbp+var_18]
add rax, rdx
mov ecx, [rax]
mov eax, [rbp+var_4]
... | long long func0(long long a1, int a2, long long a3)
{
long long result; // rax
int i; // [rsp+24h] [rbp-4h]
for ( i = 0; ; ++i )
{
result = (unsigned int)(a2 - 1);
if ( i >= (int)result )
break;
*(_DWORD *)(4LL * i + a3) = *(_DWORD *)(4LL * i + a1) + *(_DWORD *)(4 * (i + 1LL) + a1);
}
re... | 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 + -0x4],0x0
JMP 0x001011d1
LAB_00101185:
MOV EAX,dword ptr [RBP + -0x4]
CDQE
LEA RDX,[RAX*0x4]
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,RDX
MOV ECX,dword ptr [RAX]
MOV EA... | void func0(long param_1,int param_2,long param_3)
{
int4 local_c;
for (local_c = 0; local_c < param_2 + -1; local_c = local_c + 1) {
*(int *)(param_3 + (long)local_c * 4) =
*(int *)(param_1 + ((long)local_c + 1) * 4) + *(int *)(param_1 + (long)local_c * 4);
}
return;
} |
5,773 | func0 |
#include <assert.h>
#include <stdio.h>
| void func0(const int test_tup[], int size, int result[]) {
for (int i = 0; i < size - 1; i++) {
result[i] = test_tup[i] + test_tup[i + 1];
}
}
| int main() {
int result[4];
int test1[] = {1, 5, 7, 8, 10};
func0(test1, 5, result);
assert(result[0] == 6 && result[1] == 12 && result[2] == 15 && result[3] == 18);
int test2[] = {2, 6, 8, 9, 11};
func0(test2, 5, result);
assert(result[0] == 8 && result[1] == 14 && result[2] == 1... | O1 | c | func0:
endbr64
cmp $0x1,%esi
jle 1190 <func0+0x27>
lea -0x2(%rsi),%esi
mov $0x0,%eax
mov 0x4(%rdi,%rax,4),%ecx
add (%rdi,%rax,4),%ecx
mov %ecx,(%rdx,%rax,4)
mov %rax,%rcx
add $0x1,%rax
cmp %rsi,%rcx
jne 117a <func0+0x11>
retq
| func0:
endbr64
cmp esi, 1
jle short locret_1190
lea esi, [rsi-2]
mov eax, 0
loc_117A:
mov ecx, [rdi+rax*4+4]
add ecx, [rdi+rax*4]
mov [rdx+rax*4], ecx
mov rcx, rax
add rax, 1
cmp rcx, rsi
jnz short loc_117A
locret_1190:
retn | void func0(long long a1, int a2, long long a3)
{
long long v3; // rsi
long long v4; // rax
long long v5; // rcx
if ( a2 > 1 )
{
v3 = (unsigned int)(a2 - 2);
v4 = 0LL;
do
{
*(_DWORD *)(a3 + 4 * v4) = *(_DWORD *)(a1 + 4 * v4) + *(_DWORD *)(a1 + 4 * v4 + 4);
v5 = v4++;
}
whi... | func0:
ENDBR64
CMP ESI,0x1
JLE 0x00101190
LEA ESI,[RSI + -0x2]
MOV EAX,0x0
LAB_0010117a:
MOV ECX,dword ptr [RDI + RAX*0x4 + 0x4]
ADD ECX,dword ptr [RDI + RAX*0x4]
MOV dword ptr [RDX + RAX*0x4],ECX
MOV RCX,RAX
ADD RAX,0x1
CMP RCX,RSI
JNZ 0x0010117a
LAB_00101190:
RET | void func0(long param_1,int param_2,long param_3)
{
ulong uVar1;
bool bVar2;
if (1 < param_2) {
uVar1 = 0;
do {
*(int *)(param_3 + uVar1 * 4) =
*(int *)(param_1 + 4 + uVar1 * 4) + *(int *)(param_1 + uVar1 * 4);
bVar2 = uVar1 != param_2 - 2;
uVar1 = uVar1 + 1;
} while (... |
5,774 | func0 |
#include <assert.h>
#include <stdio.h>
| void func0(const int test_tup[], int size, int result[]) {
for (int i = 0; i < size - 1; i++) {
result[i] = test_tup[i] + test_tup[i + 1];
}
}
| int main() {
int result[4];
int test1[] = {1, 5, 7, 8, 10};
func0(test1, 5, result);
assert(result[0] == 6 && result[1] == 12 && result[2] == 15 && result[3] == 18);
int test2[] = {2, 6, 8, 9, 11};
func0(test2, 5, result);
assert(result[0] == 8 && result[1] == 14 && result[2] == 1... | O2 | c | func0:
endbr64
cmp $0x1,%esi
jle 1166 <func0+0x26>
sub $0x2,%esi
xor %eax,%eax
xchg %ax,%ax
mov 0x4(%rdi,%rax,4),%ecx
add (%rdi,%rax,4),%ecx
mov %ecx,(%rdx,%rax,4)
mov %rax,%rcx
add $0x1,%rax
cmp %rsi,%rcx
jne 1150 <func0+0x10>
retq
nopw 0x0(%rax,%rax,1)
| func0:
endbr64
cmp esi, 1
jle short locret_1346
sub esi, 2
xor eax, eax
xchg ax, ax
loc_1330:
mov ecx, [rdi+rax*4+4]
add ecx, [rdi+rax*4]
mov [rdx+rax*4], ecx
mov rcx, rax
add rax, 1
cmp rcx, rsi
jnz short loc_1330
locret_1346:
retn | void func0(long long a1, int a2, long long a3)
{
long long v3; // rsi
long long v4; // rax
long long v5; // rcx
if ( a2 > 1 )
{
v3 = (unsigned int)(a2 - 2);
v4 = 0LL;
do
{
*(_DWORD *)(a3 + 4 * v4) = *(_DWORD *)(a1 + 4 * v4) + *(_DWORD *)(a1 + 4 * v4 + 4);
v5 = v4++;
}
whi... | func0:
ENDBR64
CMP ESI,0x1
JLE 0x00101346
SUB ESI,0x2
XOR EAX,EAX
NOP
LAB_00101330:
MOV ECX,dword ptr [RDI + RAX*0x4 + 0x4]
ADD ECX,dword ptr [RDI + RAX*0x4]
MOV dword ptr [RDX + RAX*0x4],ECX
MOV RCX,RAX
ADD RAX,0x1
CMP RCX,RSI
JNZ 0x00101330
LAB_00101346:
RET | void func0(long param_1,int param_2,long param_3)
{
ulong uVar1;
bool bVar2;
if (1 < param_2) {
uVar1 = 0;
do {
*(int *)(param_3 + uVar1 * 4) =
*(int *)(param_1 + 4 + uVar1 * 4) + *(int *)(param_1 + uVar1 * 4);
bVar2 = uVar1 != param_2 - 2;
uVar1 = uVar1 + 1;
} while (... |
5,775 | func0 |
#include <assert.h>
#include <stdio.h>
| void func0(const int test_tup[], int size, int result[]) {
for (int i = 0; i < size - 1; i++) {
result[i] = test_tup[i] + test_tup[i + 1];
}
}
| int main() {
int result[4];
int test1[] = {1, 5, 7, 8, 10};
func0(test1, 5, result);
assert(result[0] == 6 && result[1] == 12 && result[2] == 15 && result[3] == 18);
int test2[] = {2, 6, 8, 9, 11};
func0(test2, 5, result);
assert(result[0] == 8 && result[1] == 14 && result[2] == 1... | O3 | c | func0:
endbr64
lea -0x1(%rsi),%r8d
test %r8d,%r8d
jle 11fe <func0+0xbe>
lea 0x10(%rdx),%rax
sub $0x2,%esi
cmp %rax,%rdi
lea 0x14(%rdi),%rax
setae %cl
cmp %rax,%rdx
setae %al
or %al,%cl
je 11e0 <func0+0xa0>
cmp $0x2,%esi
jbe 11e0 <func0+0xa0>
mov %r8d,%ecx
xor %eax,%eax
shr ... | func0:
endbr64
mov rcx, rdi
mov rdi, rdx
cmp esi, 1
jle short locret_1188
cmp esi, 2
jz short loc_1164
lea rdx, [rcx+4]
mov rax, rdi
sub rax, rdx
cmp rax, 0Ch
ja short loc_1190
loc_1164:
sub esi, 1
xor eax, eax
nop dword ptr [rax+00000000h]
loc_1170:
mov edx... | void func0(long long a1, int a2, long long a3)
{
long long v5; // rsi
long long v6; // rax
int v7; // edx
unsigned int v8; // r8d
long long v9; // rax
long long v10; // r8
long long v11; // rdx
int v12; // esi
int v13; // eax
if ( a2 > 1 )
{
if ( a2 == 2 || (unsigned long long)(a3 - (a1 + 4)... | func0:
ENDBR64
MOV RCX,RDI
MOV RDI,RDX
CMP ESI,0x1
JLE 0x00101188
CMP ESI,0x2
JZ 0x00101164
LEA RDX,[RCX + 0x4]
MOV RAX,RDI
SUB RAX,RDX
CMP RAX,0xc
JA 0x00101190
LAB_00101164:
SUB ESI,0x1
XOR EAX,EAX
NOP dword ptr [RAX]
LAB_00101170:
MOV EDX,dword ptr [RCX + RAX*0x4 + 0x4]
ADD EDX,dword ptr [RCX + RAX*0x4]
MOV dword pt... | void func0(long param_1,int param_2,long param_3)
{
uint uVar1;
int *piVar2;
int *piVar3;
int *piVar4;
int8 uVar5;
int8 uVar6;
int iVar7;
int iVar8;
int iVar9;
int iVar10;
int iVar11;
int iVar12;
ulong uVar13;
long lVar14;
uint uVar15;
if (1 < param_2) {
if ((param_2 == 2) || ((u... |
5,776 | func0 |
#include <assert.h>
| int func0(int arr[], int lens, int n) {
int mul = 1;
for (int i = 0; i < lens; i++) {
mul = (mul * (arr[i] % n)) % n;
}
return mul % n;
}
| int main() {
int arr1[] = {100, 10, 5, 25, 35, 14};
assert(func0(arr1, 6, 11) == 9);
int arr2[] = {1, 1, 1};
assert(func0(arr2, 3, 1) == 0);
int arr3[] = {1, 2, 1};
assert(func0(arr3, 3, 2) == 0);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
mov %edx,-0x20(%rbp)
movl $0x1,-0x8(%rbp)
movl $0x0,-0x4(%rbp)
jmp 11b6 <func0+0x4d>
mov -0x4(%rbp),%eax
cltq
lea 0x0(,%rax,4),%rdx
mov -0x18(%rbp),%rax
add %rdx,%rax
mov (%rax),%eax
cltd
idivl -0x20(%r... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_20], edx
mov [rbp+var_8], 1
mov [rbp+var_4], 0
jmp short loc_11B6
loc_118B:
mov eax, [rbp+var_4]
cdqe
lea rdx, ds:0[rax*4]
mov rax, [rbp+var_18]
add rax, rdx
mov eax, [rax]
cd... | long long func0(long long a1, int a2, int a3)
{
int v4; // [rsp+18h] [rbp-8h]
int i; // [rsp+1Ch] [rbp-4h]
v4 = 1;
for ( i = 0; i < a2; ++i )
v4 = v4 * (*(_DWORD *)(4LL * i + a1) % a3) % a3;
return (unsigned int)(v4 % a3);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0x20],EDX
MOV dword ptr [RBP + -0x8],0x1
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001011b6
LAB_0010118b:
MOV EAX,dword ptr [RBP + -0x4]
CDQE
LEA RDX,[RAX*0x4]
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,RDX... | ulong func0(long param_1,int param_2,int param_3)
{
int4 local_10;
int4 local_c;
local_10 = 1;
for (local_c = 0; local_c < param_2; local_c = local_c + 1) {
local_10 = ((*(int *)(param_1 + (long)local_c * 4) % param_3) * local_10) % param_3;
}
return (long)local_10 % (long)param_3 & 0xffffffff;
} |
5,777 | func0 |
#include <assert.h>
| int func0(int arr[], int lens, int n) {
int mul = 1;
for (int i = 0; i < lens; i++) {
mul = (mul * (arr[i] % n)) % n;
}
return mul % n;
}
| int main() {
int arr1[] = {100, 10, 5, 25, 35, 14};
assert(func0(arr1, 6, 11) == 9);
int arr2[] = {1, 1, 1};
assert(func0(arr2, 3, 1) == 0);
int arr3[] = {1, 2, 1};
assert(func0(arr3, 3, 2) == 0);
return 0;
}
| O1 | c | func0:
endbr64
mov %edx,%r8d
test %esi,%esi
jle 11a8 <func0+0x3f>
mov %rdi,%r9
lea -0x1(%rsi),%eax
lea 0x4(%rdi,%rax,4),%rsi
mov $0x1,%ecx
mov (%r9),%eax
cltd
idiv %r8d
mov %edx,%eax
imul %ecx,%eax
cltd
idiv %r8d
mov %edx,%ecx
add $0x4,%r9
cmp %rsi,%r9
jne 1184 <func0+0x1b>
m... | func0:
endbr64
mov ecx, edx
test esi, esi
jle short loc_11A4
mov r8, rdi
lea eax, [rsi-1]
lea rdi, [rdi+rax*4+4]
mov esi, 1
loc_1183:
mov eax, [r8]
cdq
idiv ecx
mov eax, edx
imul eax, esi
cdq
idiv ecx
mov esi, edx
add r8, 4
cmp r8, rdi
jnz short loc_1183
loc_1... | long long func0(_DWORD *a1, int a2, int a3)
{
_DWORD *v3; // r8
long long v4; // rdi
int v5; // esi
if ( a2 <= 0 )
{
v5 = 1;
}
else
{
v3 = a1;
v4 = (long long)&a1[a2 - 1 + 1];
v5 = 1;
do
v5 = v5 * (*v3++ % a3) % a3;
while ( v3 != (_DWORD *)v4 );
}
return (unsigned int... | func0:
ENDBR64
MOV ECX,EDX
TEST ESI,ESI
JLE 0x001011a4
MOV R8,RDI
LEA EAX,[RSI + -0x1]
LEA RDI,[RDI + RAX*0x4 + 0x4]
MOV ESI,0x1
LAB_00101183:
MOV EAX,dword ptr [R8]
CDQ
IDIV ECX
MOV EAX,EDX
IMUL EAX,ESI
CDQ
IDIV ECX
MOV ESI,EDX
ADD R8,0x4
CMP R8,RDI
JNZ 0x00101183
LAB_0010119c:
MOV EAX,ESI
CDQ
IDIV ECX
MOV EAX,EDX
RET... | ulong func0(int *param_1,int param_2,int param_3)
{
int *piVar1;
int iVar2;
if (param_2 < 1) {
iVar2 = 1;
}
else {
piVar1 = param_1 + (ulong)(param_2 - 1) + 1;
iVar2 = 1;
do {
iVar2 = ((*param_1 % param_3) * iVar2) % param_3;
param_1 = param_1 + 1;
} while (param_1 != piVar... |
5,778 | func0 |
#include <assert.h>
| int func0(int arr[], int lens, int n) {
int mul = 1;
for (int i = 0; i < lens; i++) {
mul = (mul * (arr[i] % n)) % n;
}
return mul % n;
}
| int main() {
int arr1[] = {100, 10, 5, 25, 35, 14};
assert(func0(arr1, 6, 11) == 9);
int arr2[] = {1, 1, 1};
assert(func0(arr2, 3, 1) == 0);
int arr3[] = {1, 2, 1};
assert(func0(arr3, 3, 2) == 0);
return 0;
}
| O2 | c | func0:
endbr64
mov %edx,%ecx
test %esi,%esi
jle 12a0 <func0+0x40>
lea -0x1(%rsi),%eax
mov $0x1,%r8d
lea 0x4(%rdi,%rax,4),%rsi
nopl 0x0(%rax,%rax,1)
mov (%rdi),%eax
add $0x4,%rdi
cltd
idiv %ecx
mov %edx,%eax
imul %r8d,%eax
cltd
idiv %ecx
mov %edx,%r8d
cmp %rsi,%rdi
jne 1280 <fu... | func0:
endbr64
mov ecx, edx
test esi, esi
jle short loc_12A0
lea eax, [rsi-1]
mov r8d, 1
lea rsi, [rdi+rax*4+4]
nop dword ptr [rax+rax+00000000h]
loc_1280:
mov eax, [rdi]
add rdi, 4
cdq
idiv ecx
mov eax, edx
imul eax, r8d
cdq
idiv ecx
mov r8d, edx
cmp rdi, rsi
jnz... | long long func0(int *a1, int a2, int a3)
{
unsigned int v3; // r8d
long long v4; // rsi
int v5; // eax
if ( a2 <= 0 )
return (unsigned int)(1 % a3);
v3 = 1;
v4 = (long long)&a1[a2 - 1 + 1];
do
{
v5 = *a1++;
v3 = (int)(v3 * (v5 % a3)) % a3;
}
while ( a1 != (int *)v4 );
return v3;
} | func0:
ENDBR64
MOV ECX,EDX
TEST ESI,ESI
JLE 0x001012a0
LEA EAX,[RSI + -0x1]
MOV R8D,0x1
LEA RSI,[RDI + RAX*0x4 + 0x4]
NOP dword ptr [RAX + RAX*0x1]
LAB_00101280:
MOV EAX,dword ptr [RDI]
ADD RDI,0x4
CDQ
IDIV ECX
MOV EAX,EDX
IMUL EAX,R8D
CDQ
IDIV ECX
MOV R8D,EDX
CMP RDI,RSI
JNZ 0x00101280
MOV EAX,R8D
RET
LAB_001012a0:
MO... | ulong func0(int *param_1,int param_2,int param_3)
{
int *piVar1;
int iVar2;
ulong uVar3;
int iVar4;
if (0 < param_2) {
iVar4 = 1;
piVar1 = param_1 + (ulong)(param_2 - 1) + 1;
do {
iVar2 = *param_1;
param_1 = param_1 + 1;
uVar3 = (long)((iVar2 % param_3) * iVar4) % (long)param... |
5,779 | func0 |
#include <assert.h>
| int func0(int arr[], int lens, int n) {
int mul = 1;
for (int i = 0; i < lens; i++) {
mul = (mul * (arr[i] % n)) % n;
}
return mul % n;
}
| int main() {
int arr1[] = {100, 10, 5, 25, 35, 14};
assert(func0(arr1, 6, 11) == 9);
int arr2[] = {1, 1, 1};
assert(func0(arr2, 3, 1) == 0);
int arr3[] = {1, 2, 1};
assert(func0(arr3, 3, 2) == 0);
return 0;
}
| O3 | c | func0:
endbr64
mov %edx,%ecx
test %esi,%esi
jle 12e0 <func0+0x40>
lea -0x1(%rsi),%eax
mov $0x1,%r8d
lea 0x4(%rdi,%rax,4),%rsi
nopl 0x0(%rax,%rax,1)
mov (%rdi),%eax
add $0x4,%rdi
cltd
idiv %ecx
mov %edx,%eax
imul %r8d,%eax
cltd
idiv %ecx
mov %edx,%r8d
cmp %rdi,%rsi
jne 12c0 <fu... | func0:
endbr64
mov ecx, edx
test esi, esi
jle short loc_1180
movsxd rsi, esi
lea r8, [rdi+rsi*4]
mov esi, 1
nop word ptr [rax+rax+00000000h]
loc_1160:
mov eax, [rdi]
add rdi, 4
cdq
idiv ecx
mov eax, edx
imul eax, esi
cdq
idiv ecx
mov esi, edx
cmp r8, rdi
jnz shor... | long long func0(int *a1, int a2, int a3)
{
int *v3; // r8
unsigned int v4; // esi
int v5; // eax
if ( a2 <= 0 )
return (unsigned int)(1 % a3);
v3 = &a1[a2];
v4 = 1;
do
{
v5 = *a1++;
v4 = (int)(v4 * (v5 % a3)) % a3;
}
while ( v3 != a1 );
return v4;
} | func0:
ENDBR64
MOV ECX,EDX
TEST ESI,ESI
JLE 0x00101180
MOVSXD RSI,ESI
LEA R8,[RDI + RSI*0x4]
MOV ESI,0x1
NOP word ptr CS:[RAX + RAX*0x1]
LAB_00101160:
MOV EAX,dword ptr [RDI]
ADD RDI,0x4
CDQ
IDIV ECX
MOV EAX,EDX
IMUL EAX,ESI
CDQ
IDIV ECX
MOV ESI,EDX
CMP R8,RDI
JNZ 0x00101160
MOV EAX,ESI
RET
LAB_00101180:
XOR EDX,EDX
MO... | ulong func0(int *param_1,int param_2,int param_3)
{
int *piVar1;
int iVar2;
ulong uVar3;
int iVar4;
if (0 < param_2) {
piVar1 = param_1 + param_2;
iVar4 = 1;
do {
iVar2 = *param_1;
param_1 = param_1 + 1;
uVar3 = (long)((iVar2 % param_3) * iVar4) % (long)param_3;
iVar4 =... |
5,780 | func0 |
#include <stdbool.h>
#include <assert.h>
#include <stdlib.h>
| bool func0(int *l, int size) {
int *sorted = malloc(size * sizeof(int));
for (int i = 0; i < size; i++) {
sorted[i] = l[i];
}
for (int i = 0; i < size; i++) {
for (int j = i + 1; j < size; j++) {
if (sorted[i] > sorted[j]) {
int temp = sorted[i];
... | int main() {
int arr1[] = {1, 2, 3, 4, 5};
int arr2[] = {1, 2, 3, 5, 6};
int arr3[] = {1, 2, 1};
assert(func0(arr1, sizeof(arr1) / sizeof(arr1[0])) == true);
assert(func0(arr2, sizeof(arr2) / sizeof(arr2[0])) == false);
assert(func0(arr3, sizeof(arr3) / sizeof(arr3[0])) == false);
... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x30,%rsp
mov %rdi,-0x28(%rbp)
mov %esi,-0x2c(%rbp)
mov -0x2c(%rbp),%eax
cltq
shl $0x2,%rax
mov %rax,%rdi
callq 10b0 <malloc@plt>
mov %rax,-0x8(%rbp)
movl $0x0,-0x1c(%rbp)
jmp 120b <func0+0x62>
mov -0x1c(%rbp),%eax
cltq
lea 0x0(,%rax,4),%... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_28], rdi
mov [rbp+var_2C], esi
mov eax, [rbp+var_2C]
cdqe
shl rax, 2
mov rdi, rax; size
call _malloc
mov [rbp+ptr], rax
mov [rbp+var_1C], 0
jmp short loc_120B
loc_11DA:
mov eax, [rbp+var_1C]
cdqe
lea rdx... | long long func0(long long a1, int a2)
{
unsigned __int8 v3; // [rsp+13h] [rbp-1Dh]
int i; // [rsp+14h] [rbp-1Ch]
int j; // [rsp+18h] [rbp-18h]
int k; // [rsp+1Ch] [rbp-14h]
int m; // [rsp+20h] [rbp-10h]
int v8; // [rsp+24h] [rbp-Ch]
_DWORD *ptr; // [rsp+28h] [rbp-8h]
ptr = malloc(4LL * a2);
for ( i ... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x28],RDI
MOV dword ptr [RBP + -0x2c],ESI
MOV EAX,dword ptr [RBP + -0x2c]
CDQE
SHL RAX,0x2
MOV RDI,RAX
CALL 0x001010b0
MOV qword ptr [RBP + -0x8],RAX
MOV dword ptr [RBP + -0x1c],0x0
JMP 0x0010120b
LAB_001011da:
MOV EAX,dword ptr [RBP + -0x1c]
CDQE
L... | int func0(long param_1,int param_2)
{
int4 uVar1;
void *__ptr;
int local_25;
int4 local_24;
int4 local_20;
int4 local_1c;
int4 local_18;
__ptr = malloc((long)param_2 << 2);
for (local_24 = 0; local_24 < param_2; local_24 = local_24 + 1) {
*(int4 *)((long)__ptr + (long)local_24 * 4) =
... |
5,781 | func0 |
#include <stdbool.h>
#include <assert.h>
#include <stdlib.h>
| bool func0(int *l, int size) {
int *sorted = malloc(size * sizeof(int));
for (int i = 0; i < size; i++) {
sorted[i] = l[i];
}
for (int i = 0; i < size; i++) {
for (int j = i + 1; j < size; j++) {
if (sorted[i] > sorted[j]) {
int temp = sorted[i];
... | int main() {
int arr1[] = {1, 2, 3, 4, 5};
int arr2[] = {1, 2, 3, 5, 6};
int arr3[] = {1, 2, 1};
assert(func0(arr1, sizeof(arr1) / sizeof(arr1[0])) == true);
assert(func0(arr2, sizeof(arr2) / sizeof(arr2[0])) == false);
assert(func0(arr3, sizeof(arr3) / sizeof(arr3[0])) == false);
... | O1 | c | func0:
endbr64
push %rbp
push %rbx
sub $0x8,%rsp
mov %rdi,%rbp
mov %esi,%ebx
movslq %esi,%rdi
shl $0x2,%rdi
callq 10b0 <malloc@plt>
test %ebx,%ebx
jle 121c <func0+0x73>
lea -0x1(%rbx),%esi
lea 0x1(%rsi),%r9
mov $0x0,%edx
mov 0x0(%rbp,%rdx,4),%ecx
mov %ecx,(%rax,%rdx,4)
mov %rdx,%... | func0:
endbr64
push rbp
push rbx
sub rsp, 8
mov rbp, rdi
mov ebx, esi
movsxd rdi, esi
shl rdi, 2
call _malloc
mov r10, rax
test ebx, ebx
jle short loc_1233
lea r11d, [rbx-1]
mov r9d, ebx
mov eax, 0
loc_11D7:
mov edx, [rbp+rax*4+0]
mov [r10+rax*4], edx
add rax... | long long func0(long long a1, int a2)
{
long long v3; // r10
long long i; // rax
_DWORD *v5; // rsi
long long j; // r8
_DWORD *v7; // rax
int v8; // edx
_DWORD *v9; // rax
unsigned int v10; // ebx
v3 = malloc(4LL * a2);
if ( a2 > 0 )
{
for ( i = 0LL; i != a2; ++i )
*(_DWORD *)(v3 + 4 *... | func0:
ENDBR64
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RBP,RDI
MOV EBX,ESI
MOVSXD RDI,ESI
SHL RDI,0x2
CALL 0x001010b0
MOV R10,RAX
TEST EBX,EBX
JLE 0x00101233
LEA R11D,[RBX + -0x1]
MOV R9D,EBX
MOV EAX,0x0
LAB_001011d7:
MOV EDX,dword ptr [RBP + RAX*0x4]
MOV dword ptr [R10 + RAX*0x4],EDX
ADD RAX,0x1
CMP RAX,R9
JNZ 0x001011d7
LE... | int8 func0(long param_1,uint param_2)
{
int iVar1;
int *__ptr;
ulong uVar2;
int *piVar3;
int *piVar4;
int8 uVar5;
__ptr = (int *)malloc((long)(int)param_2 << 2);
if (0 < (int)param_2) {
uVar2 = 0;
do {
__ptr[uVar2] = *(int *)(param_1 + uVar2 * 4);
uVar2 = uVar2 + 1;
} while (... |
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.