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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
7,482 | func0 |
#include <assert.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
| bool func0(const char* sentence, const char* word) {
char* token;
char* toFree;
char* sentenceCopy = strdup(sentence);
if (!sentenceCopy) return false;
toFree = sentenceCopy;
token = strtok(sentenceCopy, " ");
while (token != NULL) {
if (strcmp(token, word) == 0) {
... | int main() {
assert(func0("machine learning", "machine") == true);
assert(func0("easy", "fun") == false);
assert(func0("python language", "code") == false);
return 0;
}
| O2 | c | func0:
endbr64
push %r12
push %rbp
push %rbx
mov %rsi,%rbx
callq 10d0 <strdup@plt>
test %rax,%rax
je 130f <func0+0x7f>
mov %rax,%rdi
lea 0xd55(%rip),%rsi
mov %rax,%rbp
callq 10c0 <strtok@plt>
mov %rax,%rdi
test %rax,%rax
je 1300 <func0+0x70>
lea 0xd3e(%rip),%r12
jmp 12e2 <func0+... | func0:
endbr64
push r12
push rbp
push rbx
mov rbx, rsi
call _strdup
test rax, rax
jz short loc_130F
lea rbp, unk_2004
mov rdi, rax
mov r12, rax
mov rsi, rbp
call _strtok
mov rdi, rax
test rax, rax
jnz short loc_12DA
jmp short loc_1300
loc_12C8:
xor edi, edi
... | long long func0(long long a1, long long a2)
{
long long v2; // rax
long long v3; // r12
long long v4; // rdi
v2 = strdup();
if ( !v2 )
return 0LL;
v3 = v2;
v4 = strtok(v2, &unk_2004);
if ( v4 )
{
while ( (unsigned int)strcmp(v4, a2) )
{
v4 = strtok(0LL, &unk_2004);
if ( !v4 )... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RSI
CALL 0x001010d0
TEST RAX,RAX
JZ 0x0010130f
LEA RBP,[0x102004]
MOV RDI,RAX
MOV R12,RAX
MOV RSI,RBP
CALL 0x001010c0
MOV RDI,RAX
TEST RAX,RAX
JNZ 0x001012da
JMP 0x00101300
LAB_001012c8:
XOR EDI,EDI
MOV RSI,RBP
CALL 0x001010c0
MOV RDI,RAX
TEST RAX,RAX
JZ 0x00101300
LAB_... | int8 func0(char *param_1,char *param_2)
{
int iVar1;
char *__s;
char *__s1;
__s = strdup(param_1);
if (__s != (char *)0x0) {
__s1 = strtok(__s," ");
while (__s1 != (char *)0x0) {
iVar1 = strcmp(__s1,param_2);
if (iVar1 == 0) {
free(__s);
return 1;
}
__s1 = s... |
7,483 | func0 |
#include <assert.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
| bool func0(const char* sentence, const char* word) {
char* token;
char* toFree;
char* sentenceCopy = strdup(sentence);
if (!sentenceCopy) return false;
toFree = sentenceCopy;
token = strtok(sentenceCopy, " ");
while (token != NULL) {
if (strcmp(token, word) == 0) {
... | int main() {
assert(func0("machine learning", "machine") == true);
assert(func0("easy", "fun") == false);
assert(func0("python language", "code") == false);
return 0;
}
| O3 | c | func0:
endbr64
push %r12
push %rbp
push %rbx
mov %rsi,%rbx
callq 10d0 <strdup@plt>
test %rax,%rax
je 130f <func0+0x7f>
mov %rax,%rdi
lea 0xd55(%rip),%rsi
mov %rax,%rbp
callq 10c0 <strtok@plt>
mov %rax,%rdi
test %rax,%rax
je 1300 <func0+0x70>
lea 0xd3e(%rip),%r12
jmp 12e2 <func0+... | func0:
endbr64
push r12
push rbp
push rbx
mov rbx, rsi
call _strdup
test rax, rax
jz short loc_1308
lea rbp, delim; " "
mov rdi, rax; s
mov r12, rax
mov rsi, rbp; delim
call _strtok
mov rdi, rax
test rax, rax
jnz short loc_12DA
jmp short loc_1300
loc_12C8:
xor ... | long long func0(const char *a1, const char *a2)
{
char *v2; // rax
char *v3; // r12
char *v4; // rdi
v2 = strdup(a1);
if ( !v2 )
return 0LL;
v3 = v2;
v4 = strtok(v2, " ");
if ( !v4 )
{
LABEL_7:
free(v3);
return 0LL;
}
while ( strcmp(v4, a2) )
{
v4 = strtok(0LL, " ");
if ( !... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RSI
CALL 0x001010d0
TEST RAX,RAX
JZ 0x00101308
LEA RBP,[0x102004]
MOV RDI,RAX
MOV R12,RAX
MOV RSI,RBP
CALL 0x001010c0
MOV RDI,RAX
TEST RAX,RAX
JNZ 0x001012da
JMP 0x00101300
LAB_001012c8:
XOR EDI,EDI
MOV RSI,RBP
CALL 0x001010c0
MOV RDI,RAX
TEST RAX,RAX
JZ 0x00101300
LAB_... | int8 func0(char *param_1,char *param_2)
{
int iVar1;
char *__s;
char *__s1;
__s = strdup(param_1);
if (__s != (char *)0x0) {
__s1 = strtok(__s," ");
while (__s1 != (char *)0x0) {
iVar1 = strcmp(__s1,param_2);
if (iVar1 == 0) {
free(__s);
return 1;
}
__s1 = s... |
7,484 | func0 | #include <stdio.h>
#include <assert.h>
#include <stdlib.h>
| int* func0(const int numbers[], int length, int n, int* result_size) {
int* result = malloc(length * sizeof(int));
*result_size = 0;
int count = 1;
int current = numbers[0];
for (int i = 1; i < length; i++) {
if (numbers[i] == current) {
count++;
} else {
... | int main() {
// Test Case 1
int numbers1[] = {1, 1, 3, 4, 4, 5, 6, 7};
int result1_size = 0;
int* result1 = func0(numbers1, 8, 2, &result1_size);
int expected1[] = {1, 4};
assert(result1_size == 2 && result1[0] == expected1[0] && result1[1] == expected1[1]);
// Test Case 2
in... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x40,%rsp
mov %rdi,-0x28(%rbp)
mov %esi,-0x2c(%rbp)
mov %edx,-0x30(%rbp)
mov %rcx,-0x38(%rbp)
mov -0x2c(%rbp),%eax
cltq
shl $0x2,%rax
mov %rax,%rdi
callq 10d0 <malloc@plt>
mov %rax,-0x8(%rbp)
mov -0x38(%rbp),%rax
movl $0x0,(%rax)
movl $... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_28], rdi
mov [rbp+var_2C], esi
mov [rbp+var_30], edx
mov [rbp+var_38], rcx
mov eax, [rbp+var_2C]
cdqe
shl rax, 2
mov rdi, rax; size
call _malloc
mov [rbp+var_8], rax
mov rax, [rbp+var_38]
mov dword ptr [... | _DWORD * func0(int *a1, int a2, int a3, _DWORD *a4)
{
int v7; // [rsp+2Ch] [rbp-14h]
int v8; // [rsp+30h] [rbp-10h]
int i; // [rsp+34h] [rbp-Ch]
_DWORD *v10; // [rsp+38h] [rbp-8h]
v10 = malloc(4LL * a2);
*a4 = 0;
v7 = 1;
v8 = *a1;
for ( i = 1; i < a2; ++i )
{
if ( v8 == a1[i] )
{
++v7... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x28],RDI
MOV dword ptr [RBP + -0x2c],ESI
MOV dword ptr [RBP + -0x30],EDX
MOV qword ptr [RBP + -0x38],RCX
MOV EAX,dword ptr [RBP + -0x2c]
CDQE
SHL RAX,0x2
MOV RDI,RAX
CALL 0x001010d0
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV... | void * func0(int *param_1,int param_2,int param_3,int *param_4)
{
void *pvVar1;
int local_1c;
int local_18;
int local_14;
pvVar1 = malloc((long)param_2 << 2);
*param_4 = 0;
local_1c = 1;
local_18 = *param_1;
for (local_14 = 1; local_14 < param_2; local_14 = local_14 + 1) {
if (local_18 == para... |
7,485 | func0 | #include <stdio.h>
#include <assert.h>
#include <stdlib.h>
| int* func0(const int numbers[], int length, int n, int* result_size) {
int* result = malloc(length * sizeof(int));
*result_size = 0;
int count = 1;
int current = numbers[0];
for (int i = 1; i < length; i++) {
if (numbers[i] == current) {
count++;
} else {
... | int main() {
// Test Case 1
int numbers1[] = {1, 1, 3, 4, 4, 5, 6, 7};
int result1_size = 0;
int* result1 = func0(numbers1, 8, 2, &result1_size);
int expected1[] = {1, 4};
assert(result1_size == 2 && result1[0] == expected1[0] && result1[1] == expected1[1]);
// Test Case 2
in... | O1 | c | func0:
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
mov %rdi,%r13
mov %esi,%r12d
mov %edx,%ebx
mov %rcx,%rbp
movslq %esi,%rdi
shl $0x2,%rdi
callq 10d0 <malloc@plt>
movl $0x0,0x0(%rbp)
mov 0x0(%r13),%esi
cmp $0x1,%r12d
jle 1246 <func0+0x7d>
lea 0x4(%r13),%rdx
lea... | func0:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov r13, rdi
mov r12d, esi
mov ebx, edx
mov rbp, rcx
movsxd rdi, esi
shl rdi, 2
call _malloc
mov r8, rax
mov dword ptr [rbp+0], 0
mov ecx, [r13+0]
cmp r12d, 1
jle short loc_1249
lea rax, [r13+4]... | long long func0(int *a1, int a2, int a3, int *a4)
{
long long v6; // r8
int v7; // ecx
int *v8; // rax
int v9; // edx
int v10; // edx
int v12; // eax
v6 = malloc(4LL * a2);
*a4 = 0;
v7 = *a1;
if ( a2 <= 1 )
{
v9 = 1;
}
else
{
v8 = a1 + 1;
v9 = 1;
do
{
if ( *v8 == ... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV R13,RDI
MOV R12D,ESI
MOV EBX,EDX
MOV RBP,RCX
MOVSXD RDI,ESI
SHL RDI,0x2
CALL 0x001010d0
MOV R8,RAX
MOV dword ptr [RBP],0x0
MOV ECX,dword ptr [R13]
CMP R12D,0x1
JLE 0x00101249
LEA RAX,[R13 + 0x4]
LEA EDX,[R12 + -0x2]
LEA RDI,[R13 + RDX*0x4 + 0x8]
MOV EDX... | void * func0(int *param_1,int param_2,int param_3,int *param_4)
{
void *pvVar1;
int *piVar2;
int iVar3;
int iVar4;
pvVar1 = malloc((long)param_2 << 2);
*param_4 = 0;
iVar3 = *param_1;
if (param_2 < 2) {
iVar4 = 1;
}
else {
piVar2 = param_1 + 1;
iVar4 = 1;
do {
if (*piVar2 =... |
7,486 | func0 | #include <stdio.h>
#include <assert.h>
#include <stdlib.h>
| int* func0(const int numbers[], int length, int n, int* result_size) {
int* result = malloc(length * sizeof(int));
*result_size = 0;
int count = 1;
int current = numbers[0];
for (int i = 1; i < length; i++) {
if (numbers[i] == current) {
count++;
} else {
... | int main() {
// Test Case 1
int numbers1[] = {1, 1, 3, 4, 4, 5, 6, 7};
int result1_size = 0;
int* result1 = func0(numbers1, 8, 2, &result1_size);
int expected1[] = {1, 4};
assert(result1_size == 2 && result1[0] == expected1[0] && result1[1] == expected1[1]);
// Test Case 2
in... | O2 | c | func0:
endbr64
push %r13
mov %rdi,%r13
movslq %esi,%rdi
push %r12
mov %rdi,%r12
shl $0x2,%rdi
push %rbp
mov %rcx,%rbp
push %rbx
mov %edx,%ebx
sub $0x8,%rsp
callq 10d0 <malloc@plt>
movl $0x0,0x0(%rbp)
mov 0x0(%r13),%r9d
cmp $0x1,%r12d
jle 1490 <func0+0xb0>
lea -0x2(%r12),%edx
lea... | func0:
endbr64
push r13
mov r13, rdi
movsxd rdi, esi
push r12
mov r12, rdi
shl rdi, 2
push rbp
mov rbp, rcx
push rbx
mov ebx, edx
sub rsp, 8
call _malloc
mov dword ptr [rbp+0], 0
mov esi, [r13+0]
mov r8, rax
cmp r12d, 1
jle short loc_1480
lea edx, [r12-2]
... | long long func0(int *a1, int a2, int a3, int *a4)
{
long long v7; // rax
int v8; // esi
long long v9; // r8
int *v10; // rax
int v11; // ecx
long long v12; // rdi
int v13; // edx
int v14; // edx
int v15; // eax
v7 = malloc(4LL * a2);
*a4 = 0;
v8 = *a1;
v9 = v7;
if ( a2 <= 1 )
{
v11 =... | func0:
ENDBR64
PUSH R13
MOV R13,RDI
MOVSXD RDI,ESI
PUSH R12
MOV R12,RDI
SHL RDI,0x2
PUSH RBP
MOV RBP,RCX
PUSH RBX
MOV EBX,EDX
SUB RSP,0x8
CALL 0x001010d0
MOV dword ptr [RBP],0x0
MOV ESI,dword ptr [R13]
MOV R8,RAX
CMP R12D,0x1
JLE 0x00101480
LEA EDX,[R12 + -0x2]
LEA RAX,[R13 + 0x4]
MOV ECX,0x1
LEA RDI,[R13 + RDX*0x4 + 0... | void * func0(int *param_1,int param_2,int param_3,int *param_4)
{
int iVar1;
void *pvVar2;
int *piVar3;
int iVar4;
int iVar5;
pvVar2 = malloc((long)param_2 << 2);
*param_4 = 0;
iVar5 = *param_1;
if (param_2 < 2) {
iVar4 = 1;
}
else {
piVar3 = param_1 + 1;
iVar4 = 1;
do {
... |
7,487 | func0 | #include <stdio.h>
#include <assert.h>
#include <stdlib.h>
| int* func0(const int numbers[], int length, int n, int* result_size) {
int* result = malloc(length * sizeof(int));
*result_size = 0;
int count = 1;
int current = numbers[0];
for (int i = 1; i < length; i++) {
if (numbers[i] == current) {
count++;
} else {
... | int main() {
// Test Case 1
int numbers1[] = {1, 1, 3, 4, 4, 5, 6, 7};
int result1_size = 0;
int* result1 = func0(numbers1, 8, 2, &result1_size);
int expected1[] = {1, 4};
assert(result1_size == 2 && result1[0] == expected1[0] && result1[1] == expected1[1]);
// Test Case 2
in... | O3 | c | func0:
endbr64
push %r13
mov %rdi,%r13
movslq %esi,%rdi
push %r12
mov %rdi,%r12
shl $0x2,%rdi
push %rbp
mov %rcx,%rbp
push %rbx
mov %edx,%ebx
sub $0x8,%rsp
callq 10d0 <malloc@plt>
movl $0x0,0x0(%rbp)
mov 0x0(%r13),%r9d
cmp $0x1,%r12d
jle 1440 <func0+0xb0>
lea -0x2(%r12),%edx
lea... | func0:
endbr64
push r13
mov r13, rdi
movsxd rdi, esi
push r12
mov r12, rdi
shl rdi, 2; size
push rbp
mov rbp, rcx
push rbx
mov ebx, edx
sub rsp, 8
call _malloc
mov dword ptr [rbp+0], 0
mov esi, [r13+0]
mov r8, rax
cmp r12d, 1
jle short loc_1440
lea edx, [r... | _DWORD * func0(int *a1, int a2, int a3, int *a4)
{
_DWORD *v7; // rax
int v8; // esi
_DWORD *v9; // r8
int *v10; // rax
int v11; // ecx
long long v12; // rdi
int v13; // edx
int v14; // edx
int v15; // eax
v7 = malloc(4LL * a2);
*a4 = 0;
v8 = *a1;
v9 = v7;
if ( a2 <= 1 )
{
v11 = 1;
... | func0:
ENDBR64
PUSH R13
MOV R13,RDI
MOVSXD RDI,ESI
PUSH R12
MOV R12,RDI
SHL RDI,0x2
PUSH RBP
MOV RBP,RCX
PUSH RBX
MOV EBX,EDX
SUB RSP,0x8
CALL 0x001010d0
MOV dword ptr [RBP],0x0
MOV ESI,dword ptr [R13]
MOV R8,RAX
CMP R12D,0x1
JLE 0x00101440
LEA EDX,[R12 + -0x2]
LEA RAX,[R13 + 0x4]
MOV ECX,0x1
LEA RDI,[R13 + RDX*0x4 + 0... | void * func0(int *param_1,int param_2,int param_3,int *param_4)
{
int iVar1;
void *pvVar2;
int *piVar3;
int iVar4;
int iVar5;
pvVar2 = malloc((long)param_2 << 2);
*param_4 = 0;
iVar5 = *param_1;
if (param_2 < 2) {
iVar4 = 1;
}
else {
piVar3 = param_1 + 1;
iVar4 = 1;
do {
... |
7,488 | func0 |
#include <assert.h>
#include <stdbool.h>
| bool func0(int arr[], int n) {
int g = 0;
for(int i = 1; i < n; i++) {
if((arr[i] - arr[i - 1] > 0) && (g == 1)) {
return false;
}
if((arr[i] - arr[i] < 0)) {
g = 1;
}
}
return true;
}
| int main() {
assert(func0((int[]){3,2,1,2,3,4}, 6) == true);
assert(func0((int[]){2,1,4,5,1}, 5) == true);
assert(func0((int[]){1,2,2,1,2,3}, 6) == true);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
movl $0x0,-0x4(%rbp)
movl $0x1,-0x8(%rbp)
jmp 11cd <func0+0x64>
mov -0x8(%rbp),%eax
cltq
lea 0x0(,%rax,4),%rdx
mov -0x18(%rbp),%rax
add %rdx,%rax
mov (%rax),%edx
mov -0x8(%rbp),%eax
cltq
shl $0x2,%rax... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_4], 0
mov [rbp+var_8], 1
jmp short loc_11CB
loc_1188:
mov eax, [rbp+var_8]
cdqe
lea rdx, ds:0[rax*4]
mov rax, [rbp+var_18]
add rax, rdx
mov edx, [rax]
mov eax, [rbp+var_8]
cdq... | long long func0(long long a1, int a2)
{
int i; // [rsp+14h] [rbp-8h]
for ( i = 1; i < a2; ++i )
;
return 1LL;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0x4],0x0
MOV dword ptr [RBP + -0x8],0x1
JMP 0x001011cb
LAB_00101188:
MOV EAX,dword ptr [RBP + -0x8]
CDQE
LEA RDX,[RAX*0x4]
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,RDX
MOV EDX,dword ptr [RAX]
MOV EAX... | /* WARNING: Removing unreachable block (ram,0x001011c0) */
int8 func0(int8 param_1,int param_2)
{
int local_10;
for (local_10 = 1; local_10 < param_2; local_10 = local_10 + 1) {
}
return 1;
} |
7,489 | func0 |
#include <assert.h>
#include <stdbool.h>
| bool func0(int arr[], int n) {
int g = 0;
for(int i = 1; i < n; i++) {
if((arr[i] - arr[i - 1] > 0) && (g == 1)) {
return false;
}
if((arr[i] - arr[i] < 0)) {
g = 1;
}
}
return true;
}
| int main() {
assert(func0((int[]){3,2,1,2,3,4}, 6) == true);
assert(func0((int[]){2,1,4,5,1}, 5) == true);
assert(func0((int[]){1,2,2,1,2,3}, 6) == true);
return 0;
}
| O1 | c | func0:
endbr64
cmp $0x1,%esi
jle 113e <func0+0x15>
mov $0x1,%eax
add $0x1,%eax
cmp %eax,%esi
jne 1137 <func0+0xe>
mov $0x1,%eax
retq
| func0:
endbr64
cmp esi, 1
jle short loc_113E
mov eax, 1
loc_1137:
add eax, 1
cmp esi, eax
jnz short loc_1137
loc_113E:
mov eax, 1
retn | long long func0(long long a1, int a2)
{
int i; // eax
if ( a2 > 1 )
{
for ( i = 1; i != a2; ++i )
;
}
return 1LL;
} | func0:
ENDBR64
CMP ESI,0x1
JLE 0x0010113e
MOV EAX,0x1
LAB_00101137:
ADD EAX,0x1
CMP ESI,EAX
JNZ 0x00101137
LAB_0010113e:
MOV EAX,0x1
RET | int8 func0(int8 param_1,int param_2)
{
int iVar1;
if (1 < param_2) {
iVar1 = 1;
do {
iVar1 = iVar1 + 1;
} while (param_2 != iVar1);
}
return 1;
} |
7,490 | func0 |
#include <assert.h>
#include <stdbool.h>
| bool func0(int arr[], int n) {
int g = 0;
for(int i = 1; i < n; i++) {
if((arr[i] - arr[i - 1] > 0) && (g == 1)) {
return false;
}
if((arr[i] - arr[i] < 0)) {
g = 1;
}
}
return true;
}
| int main() {
assert(func0((int[]){3,2,1,2,3,4}, 6) == true);
assert(func0((int[]){2,1,4,5,1}, 5) == true);
assert(func0((int[]){1,2,2,1,2,3}, 6) == true);
return 0;
}
| O2 | c | func0:
endbr64
mov $0x1,%eax
retq
nopw 0x0(%rax,%rax,1)
| func0:
endbr64
mov eax, 1
retn | long long func0()
{
return 1LL;
} | func0:
ENDBR64
MOV EAX,0x1
RET | int8 func0(void)
{
return 1;
} |
7,491 | func0 |
#include <assert.h>
#include <stdbool.h>
| bool func0(int arr[], int n) {
int g = 0;
for(int i = 1; i < n; i++) {
if((arr[i] - arr[i - 1] > 0) && (g == 1)) {
return false;
}
if((arr[i] - arr[i] < 0)) {
g = 1;
}
}
return true;
}
| int main() {
assert(func0((int[]){3,2,1,2,3,4}, 6) == true);
assert(func0((int[]){2,1,4,5,1}, 5) == true);
assert(func0((int[]){1,2,2,1,2,3}, 6) == true);
return 0;
}
| O3 | c | func0:
endbr64
mov $0x1,%eax
retq
nopw 0x0(%rax,%rax,1)
| func0:
endbr64
mov eax, 1
retn | long long func0()
{
return 1LL;
} | func0:
ENDBR64
MOV EAX,0x1
RET | int8 func0(void)
{
return 1;
} |
7,492 | func0 |
#include <stdio.h>
#include <stdbool.h>
#include <assert.h>
#include <regex.h>
| bool func0(const char *string) {
regex_t regex;
int result;
result = regcomp(®ex, "^5", 0);
if (result) {
fprintf(stderr, "Could not compile regex\n");
return false;
}
result = regexec(®ex, string, 0, NULL, 0);
regfree(®ex);
if (result == 0) {
... | int main() {
assert(func0("5-2345861") == true);
assert(func0("6-2345861") == false);
assert(func0("78910") == false);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x70,%rsp
mov %rdi,-0x68(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
lea -0x50(%rbp),%rax
mov $0x0,%edx
lea 0xdf0(%rip),%rsi
mov %rax,%rdi
callq 10d0 <regcomp@plt>
mov %eax,-0x54(%rbp)
cmpl $0x0,-0x54(%rbp)
je 1250 <func... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+string], rdi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
lea rax, [rbp+preg]
mov edx, 0; cflags
lea rcx, pattern; "^5"
mov rsi, rcx; pattern
mov rdi, rax; preg
call _regcomp
mov [rbp+var_54], eax
cmp ... | _BOOL8 func0(const char *a1)
{
int v2; // [rsp+1Ch] [rbp-54h]
regex_t preg; // [rsp+20h] [rbp-50h] BYREF
unsigned long long v4; // [rsp+68h] [rbp-8h]
v4 = __readfsqword(0x28u);
if ( regcomp(&preg, "^5", 0) )
{
fwrite("Could not compile regex\n", 1uLL, 0x18uLL, _bss_start);
return 0LL;
}
else
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x68],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x50]
MOV EDX,0x0
LEA RCX,[0x102004]
MOV RSI,RCX
MOV RDI,RAX
CALL 0x001010d0
MOV dword ptr [RBP + -0x54],EAX
CMP dword ptr [RBP + -0x54],0x0
JZ 0x001012... | int8 func0(char *param_1)
{
int iVar1;
int8 uVar2;
long in_FS_OFFSET;
regex_t local_58;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
iVar1 = regcomp(&local_58,"^5",0);
if (iVar1 == 0) {
iVar1 = regexec(&local_58,param_1,0,(regmatch_t *)0x0,0);
regfree(&local_58);
if (iVar1 =... |
7,493 | func0 |
#include <stdio.h>
#include <stdbool.h>
#include <assert.h>
#include <regex.h>
| bool func0(const char *string) {
regex_t regex;
int result;
result = regcomp(®ex, "^5", 0);
if (result) {
fprintf(stderr, "Could not compile regex\n");
return false;
}
result = regexec(®ex, string, 0, NULL, 0);
regfree(®ex);
if (result == 0) {
... | int main() {
assert(func0("5-2345861") == true);
assert(func0("6-2345861") == false);
assert(func0("78910") == false);
return 0;
}
| O1 | c | func0:
endbr64
push %rbp
push %rbx
sub $0x58,%rsp
mov %rdi,%rbx
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
mov %rsp,%rdi
mov $0x0,%edx
lea 0xdef(%rip),%rsi
callq 10d0 <regcomp@plt>
test %eax,%eax
jne 1262 <func0+0x79>
mov %rsp,%rbp
mov $0x0,%r8d
mov $0x0,%ecx
mov $... | func0:
endbr64
push rbp
push rbx
sub rsp, 58h
mov rbx, rdi
mov rax, fs:28h
mov [rsp+68h+var_20], rax
xor eax, eax
mov rdi, rsp
mov edx, 0
lea rsi, unk_2004
call _regcomp
test eax, eax
jnz short loc_1262
mov rbp, rsp
mov r8d, 0
mov ecx, 0
mov edx, 0
mov ... | bool func0(long long a1)
{
int v1; // ebx
_QWORD v3[13]; // [rsp+0h] [rbp-68h] BYREF
v3[9] = __readfsqword(0x28u);
if ( (unsigned int)regcomp(v3, &unk_2004, 0LL) )
{
fwrite("Could not compile regex\n", 1LL, 24LL, stderr);
return 0;
}
else
{
v1 = regexec(v3, a1, 0LL, 0LL, 0LL);
regfree(... | func0:
ENDBR64
PUSH RBP
PUSH RBX
SUB RSP,0x58
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
MOV RDI,RSP
MOV EDX,0x0
LEA RSI,[0x102004]
CALL 0x001010d0
TEST EAX,EAX
JNZ 0x00101262
MOV RBP,RSP
MOV R8D,0x0
MOV ECX,0x0
MOV EDX,0x0
MOV RSI,RBX
MOV RDI,RBP
CALL 0x001010e0
MOV EBX,EAX
MOV ... | bool func0(char *param_1)
{
int iVar1;
long in_FS_OFFSET;
bool bVar2;
regex_t rStack_68;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
iVar1 = regcomp(&rStack_68,"^5",0);
if (iVar1 == 0) {
iVar1 = regexec(&rStack_68,param_1,0,(regmatch_t *)0x0,0);
regfree(&rStack_68);
bVar2 =... |
7,494 | func0 |
#include <stdio.h>
#include <stdbool.h>
#include <assert.h>
#include <regex.h>
| bool func0(const char *string) {
regex_t regex;
int result;
result = regcomp(®ex, "^5", 0);
if (result) {
fprintf(stderr, "Could not compile regex\n");
return false;
}
result = regexec(®ex, string, 0, NULL, 0);
regfree(®ex);
if (result == 0) {
... | int main() {
assert(func0("5-2345861") == true);
assert(func0("6-2345861") == false);
assert(func0("78910") == false);
return 0;
}
| O2 | c | func0:
endbr64
push %r12
xor %edx,%edx
lea 0xd65(%rip),%rsi
push %rbp
mov %rdi,%rbp
sub $0x58,%rsp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
mov %rsp,%r12
mov %r12,%rdi
callq 10d0 <regcomp@plt>
test %eax,%eax
jne 1300 <func0+0x70>
xor %r8d,%r8d
xor %ecx,%ecx
xor %... | func0:
endbr64
push r12
xor edx, edx
lea rsi, unk_2004
push rbp
mov rbp, rdi
sub rsp, 58h
mov rax, fs:28h
mov [rsp+68h+var_20], rax
xor eax, eax
mov r12, rsp
mov rdi, r12
call _regcomp
test eax, eax
jnz short loc_1300
xor r8d, r8d
xor ecx, ecx
xor edx, edx... | bool func0(long long a1)
{
int v1; // ebp
_QWORD v3[13]; // [rsp+0h] [rbp-68h] BYREF
v3[9] = __readfsqword(0x28u);
if ( (unsigned int)regcomp(v3, &unk_2004, 0LL) )
{
fwrite("Could not compile regex\n", 1LL, 24LL, stderr);
return 0;
}
else
{
v1 = regexec(v3, a1, 0LL, 0LL, 0LL);
regfree(... | func0:
ENDBR64
PUSH R12
XOR EDX,EDX
LEA RSI,[0x102004]
PUSH RBP
MOV RBP,RDI
SUB RSP,0x58
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
MOV R12,RSP
MOV RDI,R12
CALL 0x001010d0
TEST EAX,EAX
JNZ 0x00101300
XOR R8D,R8D
XOR ECX,ECX
XOR EDX,EDX
MOV RSI,RBP
MOV RDI,R12
CALL 0x001010e0
MOV RDI,R12
MOV ... | bool func0(char *param_1)
{
int iVar1;
long in_FS_OFFSET;
bool bVar2;
regex_t rStack_68;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
iVar1 = regcomp(&rStack_68,"^5",0);
if (iVar1 == 0) {
iVar1 = regexec(&rStack_68,param_1,0,(regmatch_t *)0x0,0);
regfree(&rStack_68);
bVar2 =... |
7,495 | func0 |
#include <stdio.h>
#include <stdbool.h>
#include <assert.h>
#include <regex.h>
| bool func0(const char *string) {
regex_t regex;
int result;
result = regcomp(®ex, "^5", 0);
if (result) {
fprintf(stderr, "Could not compile regex\n");
return false;
}
result = regexec(®ex, string, 0, NULL, 0);
regfree(®ex);
if (result == 0) {
... | int main() {
assert(func0("5-2345861") == true);
assert(func0("6-2345861") == false);
assert(func0("78910") == false);
return 0;
}
| O3 | c | func0:
endbr64
push %r12
xor %edx,%edx
lea 0xd65(%rip),%rsi
push %rbp
mov %rdi,%rbp
sub $0x58,%rsp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
mov %rsp,%r12
mov %r12,%rdi
callq 10d0 <regcomp@plt>
test %eax,%eax
jne 1300 <func0+0x70>
xor %r8d,%r8d
xor %ecx,%ecx
xor %... | func0:
endbr64
push rbp
xor edx, edx; cflags
lea rsi, pattern; "^5"
push rbx
mov rbx, rdi
sub rsp, 58h
mov rax, fs:28h
mov [rsp+var_s48], rax
xor eax, eax
mov rbp, rsp
mov rdi, rbp; preg
call _regcomp
test eax, eax
jnz short loc_1300
xor r8d, r8d; eflags
xor e... | bool func0(char *string)
{
int v1; // ebx
regex_t _0; // [rsp+0h] [rbp+0h] BYREF
unsigned long long vars48; // [rsp+48h] [rbp+48h]
vars48 = __readfsqword(0x28u);
if ( regcomp(&_0, "^5", 0) )
{
fwrite("Could not compile regex\n", 1uLL, 0x18uLL, _bss_start);
return 0;
}
else
{
v1 = regexec... | func0:
ENDBR64
PUSH RBP
XOR EDX,EDX
LEA RSI,[0x102004]
PUSH RBX
MOV RBX,RDI
SUB RSP,0x58
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
MOV RBP,RSP
MOV RDI,RBP
CALL 0x001010d0
TEST EAX,EAX
JNZ 0x00101300
XOR R8D,R8D
XOR ECX,ECX
XOR EDX,EDX
MOV RSI,RBX
MOV RDI,RBP
CALL 0x001010e0
MOV RDI,RBP
MOV ... | bool func0(char *param_1)
{
int iVar1;
long in_FS_OFFSET;
bool bVar2;
regex_t rStack_68;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
iVar1 = regcomp(&rStack_68,"^5",0);
if (iVar1 == 0) {
iVar1 = regexec(&rStack_68,param_1,0,(regmatch_t *)0x0,0);
regfree(&rStack_68);
bVar2 =... |
7,496 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int n) {
if (n <= 2) {
return n;
}
int i = n * 2;
int factors[100];
int factor_count = 0;
for (int number = n; number > 1; number--) {
if (number * 2 > n) {
factors[factor_count++] = number;
}
}
while (1) {
for (int j = 0... | int main() {
assert(func0(13) == 360360);
assert(func0(2) == 2);
assert(func0(1) == 1);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x1c0,%rsp
mov %edi,-0x1b4(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
cmpl $0x2,-0x1b4(%rbp)
jg 11a1 <func0+0x38>
mov -0x1b4(%rbp),%eax
jmpq 128e <func0+0x125>
mov -0x1b4(%rbp),%eax
add %eax,%eax
mov %eax,-0x1b0(%rbp)
mov... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 1C0h
mov [rbp+var_1B4], edi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
cmp [rbp+var_1B4], 2
jg short loc_11A1
mov eax, [rbp+var_1B4]
jmp loc_1292
loc_11A1:
mov eax, [rbp+var_1B4]
add eax, eax
mov [rbp+var_1B0], ... | long long func0(int a1)
{
int v2; // eax
int v3; // [rsp+10h] [rbp-1B0h]
int v4; // [rsp+14h] [rbp-1ACh]
int i; // [rsp+18h] [rbp-1A8h]
int j; // [rsp+1Ch] [rbp-1A4h]
_DWORD v7[102]; // [rsp+20h] [rbp-1A0h]
unsigned long long v8; // [rsp+1B8h] [rbp-8h]
v8 = __readfsqword(0x28u);
if ( a1 <= 2 )
r... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x1c0
MOV dword ptr [RBP + -0x1b4],EDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
CMP dword ptr [RBP + -0x1b4],0x2
JG 0x001011a1
MOV EAX,dword ptr [RBP + -0x1b4]
JMP 0x00101292
LAB_001011a1:
MOV EAX,dword ptr [RBP + -0x1b4]
ADD EAX,EAX
MOV dword pt... | int func0(int param_1)
{
long in_FS_OFFSET;
int local_1b8;
int local_1b4;
int local_1b0;
int local_1ac;
int aiStack_1a8 [102];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_1b8 = param_1;
if (param_1 < 3) {
LAB_00101292:
if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {
... |
7,497 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int n) {
if (n <= 2) {
return n;
}
int i = n * 2;
int factors[100];
int factor_count = 0;
for (int number = n; number > 1; number--) {
if (number * 2 > n) {
factors[factor_count++] = number;
}
}
while (1) {
for (int j = 0... | int main() {
assert(func0(13) == 360360);
assert(func0(2) == 2);
assert(func0(1) == 1);
return 0;
}
| O1 | c | func0:
endbr64
sub $0x1a8,%rsp
mov %fs:0x28,%rax
mov %rax,0x198(%rsp)
xor %eax,%eax
cmp $0x2,%edi
jle 11ee <func0+0x85>
lea (%rdi,%rdi,1),%esi
mov %edi,%eax
mov $0x0,%r10d
jmp 11a1 <func0+0x38>
sub $0x1,%eax
cmp $0x1,%eax
je 11b4 <func0+0x4b>
lea (%rax,%rax,1),%edx
cmp %edx... | func0:
endbr64
sub rsp, 1A8h
mov r9d, edi
mov rax, fs:28h
mov [rsp+1A8h+var_10], rax
xor eax, eax
cmp edi, 2
jle short loc_11F4
lea esi, [rdi+rdi]
mov eax, edi
mov r10d, 0
jmp short loc_11A4
loc_119C:
sub eax, 1
cmp eax, 1
jz short loc_11B8
loc_11A4:
lea edx,... | long long func0(int a1)
{
unsigned int v1; // r9d
int v2; // esi
int v3; // eax
int v4; // r10d
long long v5; // rdi
_DWORD *v6; // r8
_DWORD *v7; // rdi
_DWORD *v8; // rcx
_DWORD v10[102]; // [rsp+0h] [rbp-1A8h] BYREF
unsigned long long v11; // [rsp+198h] [rbp-10h]
v1 = a1;
v11 = __readfsqwor... | func0:
ENDBR64
SUB RSP,0x1a8
MOV R9D,EDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x198],RAX
XOR EAX,EAX
CMP EDI,0x2
JLE 0x001011f4
LEA ESI,[RDI + RDI*0x1]
MOV EAX,EDI
MOV R10D,0x0
JMP 0x001011a4
LAB_0010119c:
SUB EAX,0x1
CMP EAX,0x1
JZ 0x001011b8
LAB_001011a4:
LEA EDX,[RAX + RAX*0x1]
CMP R9D,EDX
JGE 0x0010119c... | int func0(int param_1)
{
int iVar1;
int *piVar2;
int iVar3;
int iVar4;
long in_FS_OFFSET;
int local_1a8 [102];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
iVar3 = param_1;
if (param_1 < 3) {
LAB_001011f4:
if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) {
/* ... |
7,498 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int n) {
if (n <= 2) {
return n;
}
int i = n * 2;
int factors[100];
int factor_count = 0;
for (int number = n; number > 1; number--) {
if (number * 2 > n) {
factors[factor_count++] = number;
}
}
while (1) {
for (int j = 0... | int main() {
assert(func0(13) == 360360);
assert(func0(2) == 2);
assert(func0(1) == 1);
return 0;
}
| O2 | c | func0:
endbr64
cmp $0x2,%edi
jle 1290 <func0+0x10>
jmpq 11b0 <func0.part.0>
xchg %ax,%ax
mov %edi,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
nopl (%rax)
| func0_part_0:
sub rsp, 1A8h
mov r9d, edi
lea r8d, [rdi+rdi]
mov rax, fs:28h
mov [rsp+1A8h+var_10], rax
xor eax, eax
cmp edi, 1
jz loc_1266
mov eax, edi
xor r10d, r10d
nop
loc_11E0:
lea edx, [rax+rax]
cmp r9d, edx
jge short loc_11F2
movsxd rdx, r10d
add r10d, 1
m... | long long func0_part_0(int a1)
{
int v1; // r8d
int v2; // eax
int v3; // r10d
long long v4; // rdx
long long v5; // rax
int v6; // edx
_DWORD *v7; // rcx
_DWORD v9[102]; // [rsp+0h] [rbp-1A8h] BYREF
unsigned long long v10; // [rsp+198h] [rbp-10h]
v1 = 2 * a1;
v10 = __readfsqword(0x28u);
if ( ... | func0.part.0:
SUB RSP,0x1a8
MOV R9D,EDI
LEA R8D,[RDI + RDI*0x1]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x198],RAX
XOR EAX,EAX
CMP EDI,0x1
JZ 0x00101266
MOV EAX,EDI
XOR R10D,R10D
NOP
LAB_001011e0:
LEA EDX,[RAX + RAX*0x1]
CMP R9D,EDX
JGE 0x001011f2
MOVSXD RDX,R10D
ADD R10D,0x1
MOV dword ptr [RSP + RDX*0x4],EAX
... | int func0_part_0(int param_1)
{
int iVar1;
ulong uVar2;
int *piVar3;
long lVar4;
ulong uVar5;
int iVar6;
int iVar7;
long in_FS_OFFSET;
int local_1a8 [102];
long local_10;
iVar6 = param_1 * 2;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
if (param_1 == 1) {
uVar5 = 0xffffffff;
iVar7 =... |
7,499 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int n) {
if (n <= 2) {
return n;
}
int i = n * 2;
int factors[100];
int factor_count = 0;
for (int number = n; number > 1; number--) {
if (number * 2 > n) {
factors[factor_count++] = number;
}
}
while (1) {
for (int j = 0... | int main() {
assert(func0(13) == 360360);
assert(func0(2) == 2);
assert(func0(1) == 1);
return 0;
}
| O3 | c | func0:
endbr64
cmp $0x2,%edi
jle 1290 <func0+0x10>
jmpq 11b0 <func0.part.0>
xchg %ax,%ax
mov %edi,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
nopl (%rax)
| func0_part_0:
sub rsp, 1A8h
mov r9d, edi
lea esi, [rdi+rdi]
mov rax, fs:28h
mov [rsp+1A8h+var_10], rax
xor eax, eax
cmp edi, 1
jz loc_1265
mov eax, edi
xor r10d, r10d
xchg ax, ax
loc_11E0:
lea edx, [rax+rax]
cmp r9d, edx
jge short loc_11F2
movsxd rdx, r10d
add ... | long long func0_part_0(int a1)
{
int v1; // esi
int v2; // eax
int v3; // r10d
long long v4; // rdx
long long v5; // rax
_DWORD *v6; // rcx
_DWORD v8[102]; // [rsp+0h] [rbp-1A8h] BYREF
unsigned long long v9; // [rsp+198h] [rbp-10h]
v1 = 2 * a1;
v9 = __readfsqword(0x28u);
if ( a1 == 1 )
{
v... | func0.part.0:
SUB RSP,0x1a8
MOV R9D,EDI
LEA ESI,[RDI + RDI*0x1]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x198],RAX
XOR EAX,EAX
CMP EDI,0x1
JZ 0x00101265
MOV EAX,EDI
XOR R10D,R10D
NOP
LAB_001011e0:
LEA EDX,[RAX + RAX*0x1]
CMP R9D,EDX
JGE 0x001011f2
MOVSXD RDX,R10D
ADD R10D,0x1
MOV dword ptr [RSP + RDX*0x4],EAX
... | int func0_part_0(int param_1)
{
int iVar1;
ulong uVar2;
int *piVar3;
long lVar4;
int iVar5;
int iVar6;
long in_FS_OFFSET;
int local_1a8 [102];
long local_10;
iVar5 = param_1 * 2;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
if (param_1 == 1) {
uVar2 = 0xffffffff;
iVar6 = 0;
}
else ... |
7,500 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
typedef struct {
char key;
int value;
} KeyValue;
| KeyValue *func0(KeyValue d1[], int size1, KeyValue d2[], int size2) {
KeyValue *result = malloc((size1 + size2) * sizeof(KeyValue));
int sizeResult = 0;
for (int i = 0; i < size1; i++) {
int found = 0;
for (int j = 0; j < sizeResult; j++) {
if (result[j].key == d1[i].key) {... | int main() {
KeyValue d1[] = { {'a', 100}, {'b', 200}, {'c', 300} };
KeyValue d2[] = { {'a', 300}, {'b', 200}, {'d', 400} };
KeyValue *result1 = func0(d1, 3, d2, 3);
assert(result1[0].value == 400 && result1[1].value == 400 && result1[2].value == 300 && result1[3].value == 400); // Since order may v... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x50,%rsp
mov %rdi,-0x38(%rbp)
mov %esi,-0x3c(%rbp)
mov %rdx,-0x48(%rbp)
mov %ecx,-0x40(%rbp)
mov -0x3c(%rbp),%edx
mov -0x40(%rbp),%eax
add %edx,%eax
cltq
shl $0x3,%rax
mov %rax,%rdi
callq 10b0 <malloc@plt>
mov %rax,-0x8(%rbp)
movl $0x... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_38], rdi
mov [rbp+var_3C], esi
mov [rbp+var_48], rdx
mov [rbp+var_40], ecx
mov edx, [rbp+var_3C]
mov eax, [rbp+var_40]
add eax, edx
cdqe
shl rax, 3
mov rdi, rax; size
call _malloc
mov [rbp+var_8], rax
mo... | _DWORD * func0(long long a1, int a2, long long a3, int a4)
{
int v7; // [rsp+2Ch] [rbp-24h]
int i; // [rsp+30h] [rbp-20h]
int v9; // [rsp+34h] [rbp-1Ch]
int j; // [rsp+38h] [rbp-18h]
int k; // [rsp+3Ch] [rbp-14h]
int v12; // [rsp+40h] [rbp-10h]
int m; // [rsp+44h] [rbp-Ch]
_DWORD *v14; // [rsp+48h] [rbp... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x38],RDI
MOV dword ptr [RBP + -0x3c],ESI
MOV qword ptr [RBP + -0x48],RDX
MOV dword ptr [RBP + -0x40],ECX
MOV EDX,dword ptr [RBP + -0x3c]
MOV EAX,dword ptr [RBP + -0x40]
ADD EAX,EDX
CDQE
SHL RAX,0x3
MOV RDI,RAX
CALL 0x001010b0
MOV qword ptr [RBP + -... | void * func0(long param_1,int param_2,long param_3,int param_4)
{
bool bVar1;
void *pvVar2;
int local_2c;
int local_28;
int local_20;
int local_1c;
int local_14;
pvVar2 = malloc((long)(param_4 + param_2) << 3);
local_2c = 0;
for (local_28 = 0; local_28 < param_2; local_28 = local_28 + 1) {
b... |
7,501 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
typedef struct {
char key;
int value;
} KeyValue;
| KeyValue *func0(KeyValue d1[], int size1, KeyValue d2[], int size2) {
KeyValue *result = malloc((size1 + size2) * sizeof(KeyValue));
int sizeResult = 0;
for (int i = 0; i < size1; i++) {
int found = 0;
for (int j = 0; j < sizeResult; j++) {
if (result[j].key == d1[i].key) {... | int main() {
KeyValue d1[] = { {'a', 100}, {'b', 200}, {'c', 300} };
KeyValue d2[] = { {'a', 300}, {'b', 200}, {'d', 400} };
KeyValue *result1 = func0(d1, 3, d2, 3);
assert(result1[0].value == 400 && result1[1].value == 400 && result1[2].value == 300 && result1[3].value == 400); // Since order may v... | O1 | c | func0:
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
mov %rdi,%r13
mov %esi,%r12d
mov %rdx,%rbp
mov %ecx,%ebx
lea (%rsi,%rcx,1),%edi
movslq %edi,%rdi
shl $0x3,%rdi
callq 10b0 <malloc@plt>
test %r12d,%r12d
jle 1243 <func0+0x9a>
mov %r13,%r9
lea -0x1(%r12),%edx
lea... | func0:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov r13, rdi
mov r12d, esi
mov rbp, rdx
mov ebx, ecx
lea edi, [rsi+rcx]
movsxd rdi, edi
shl rdi, 3
call _malloc
mov r9, rax
test r12d, r12d
jle short loc_1241
mov r8, r13
lea eax, [r12-1]
lea ... | long long func0(long long a1, int a2, long long a3, int a4)
{
long long v7; // r9
long long v8; // r8
int v9; // edi
long long v10; // rax
long long v11; // rax
long long v12; // r8
long long v13; // rax
long long v14; // rax
v7 = malloc(8LL * (a2 + a4));
if ( a2 <= 0 )
{
v9 = 0;
}
else
... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV R13,RDI
MOV R12D,ESI
MOV RBP,RDX
MOV EBX,ECX
LEA EDI,[RSI + RCX*0x1]
MOVSXD RDI,EDI
SHL RDI,0x3
CALL 0x001010b0
MOV R9,RAX
TEST R12D,R12D
JLE 0x00101241
MOV R8,R13
LEA EAX,[R12 + -0x1]
LEA R11,[R13 + RAX*0x8 + 0x8]
MOV EDI,0x0
LEA R12,[R9 + 0x8]
JMP 0x0... | char * func0(char *param_1,int param_2,char *param_3,int param_4)
{
char *pcVar1;
char *pcVar2;
char *pcVar3;
int iVar4;
pcVar2 = (char *)malloc((long)(param_2 + param_4) << 3);
if (param_2 < 1) {
iVar4 = 0;
}
else {
pcVar1 = param_1 + (ulong)(param_2 - 1) * 8 + 8;
iVar4 = 0;
do {
... |
7,502 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
typedef struct {
char key;
int value;
} KeyValue;
| KeyValue *func0(KeyValue d1[], int size1, KeyValue d2[], int size2) {
KeyValue *result = malloc((size1 + size2) * sizeof(KeyValue));
int sizeResult = 0;
for (int i = 0; i < size1; i++) {
int found = 0;
for (int j = 0; j < sizeResult; j++) {
if (result[j].key == d1[i].key) {... | int main() {
KeyValue d1[] = { {'a', 100}, {'b', 200}, {'c', 300} };
KeyValue d2[] = { {'a', 300}, {'b', 200}, {'d', 400} };
KeyValue *result1 = func0(d1, 3, d2, 3);
assert(result1[0].value == 400 && result1[1].value == 400 && result1[2].value == 300 && result1[3].value == 400); // Since order may v... | O2 | c | func0:
endbr64
push %r13
mov %esi,%r13d
push %r12
mov %ecx,%r12d
push %rbp
mov %rdx,%rbp
push %rbx
mov %rdi,%rbx
lea (%rsi,%rcx,1),%edi
movslq %edi,%rdi
shl $0x3,%rdi
sub $0x8,%rsp
callq 10b0 <malloc@plt>
test %r13d,%r13d
jle 1584 <func0+0x124>
lea -0x1(%r13),%edx
mov %rbx,%r10
... | func0:
endbr64
push r13
mov r13d, esi
push r12
mov r12d, ecx
push rbp
mov rbp, rdx
push rbx
mov rbx, rdi
lea edi, [rsi+rcx]
movsxd rdi, edi
shl rdi, 3
sub rsp, 8
call _malloc
mov r8, rax
test r13d, r13d
jle loc_1583
lea eax, [r13-1]
mov rdi, rbx
lea r10... | long long func0(char *a1, int a2, long long a3, int a4)
{
char *v7; // rbx
long long v8; // r8
int v9; // esi
char v10; // dl
long long v11; // rax
_DWORD *v12; // rdi
char v13; // dl
long long v14; // rax
long long v16; // rax
long long v17; // rax
long long v18; // rax
long long v19; // rax
... | func0:
ENDBR64
PUSH R13
MOV R13D,ESI
PUSH R12
MOV R12D,ECX
PUSH RBP
MOV RBP,RDX
PUSH RBX
MOV RBX,RDI
LEA EDI,[RSI + RCX*0x1]
MOVSXD RDI,EDI
SHL RDI,0x3
SUB RSP,0x8
CALL 0x001010b0
MOV R8,RAX
TEST R13D,R13D
JLE 0x00101583
LEA EAX,[R13 + -0x1]
MOV RDI,RBX
LEA R10,[R8 + 0x8]
XOR ESI,ESI
LEA R9,[RBX + RAX*0x8 + 0x8]
NOP wo... | char * func0(char *param_1,int param_2,long param_3,int param_4)
{
char *pcVar1;
char *pcVar2;
char *pcVar3;
long lVar4;
int iVar5;
int *piVar6;
pcVar1 = (char *)malloc((long)(param_2 + param_4) << 3);
if (param_2 < 1) {
iVar5 = 0;
}
else {
iVar5 = 0;
pcVar3 = param_1 + (ulong)(param... |
7,503 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
typedef struct {
char key;
int value;
} KeyValue;
| KeyValue *func0(KeyValue d1[], int size1, KeyValue d2[], int size2) {
KeyValue *result = malloc((size1 + size2) * sizeof(KeyValue));
int sizeResult = 0;
for (int i = 0; i < size1; i++) {
int found = 0;
for (int j = 0; j < sizeResult; j++) {
if (result[j].key == d1[i].key) {... | int main() {
KeyValue d1[] = { {'a', 100}, {'b', 200}, {'c', 300} };
KeyValue d2[] = { {'a', 300}, {'b', 200}, {'d', 400} };
KeyValue *result1 = func0(d1, 3, d2, 3);
assert(result1[0].value == 400 && result1[1].value == 400 && result1[2].value == 300 && result1[3].value == 400); // Since order may v... | O3 | c | func0:
endbr64
push %r13
mov %esi,%r13d
push %r12
mov %ecx,%r12d
push %rbp
mov %rdx,%rbp
push %rbx
mov %rdi,%rbx
lea (%rsi,%rcx,1),%edi
movslq %edi,%rdi
shl $0x3,%rdi
sub $0x8,%rsp
callq 10b0 <malloc@plt>
test %r13d,%r13d
jle 1584 <func0+0x124>
lea -0x1(%r13),%edx
mov %rbx,%r10
... | func0:
endbr64
push r13
movsxd r13, esi
push r12
movsxd r12, ecx
push rbp
mov rbp, rdi
lea edi, [r13+r12+0]
push rbx
movsxd rdi, edi
mov rbx, rdx
shl rdi, 3; size
sub rsp, 8
call _malloc
mov rdi, rax
test r13d, r13d
jle loc_1577
mov rsi, rbp
lea r10, [rbp+r13*8+0... | char * func0(char *a1, int a2, char *a3, int a4)
{
long long v4; // r13
long long v5; // r12
char *v8; // rdi
char *v9; // rsi
char *v10; // r10
int v11; // r8d
char v12; // dl
char *v13; // rax
int v14; // edx
char *v15; // rax
char *v16; // rsi
char *v17; // r10
char v18; // dl
char *v19; ... | func0:
ENDBR64
PUSH R13
MOVSXD R13,ESI
PUSH R12
MOVSXD R12,ECX
PUSH RBP
MOV RBP,RDI
LEA EDI,[R13 + R12*0x1]
PUSH RBX
MOVSXD RDI,EDI
MOV RBX,RDX
SHL RDI,0x3
SUB RSP,0x8
CALL 0x001010b0
MOV RDI,RAX
TEST R13D,R13D
JLE 0x00101577
MOV RSI,RBP
LEA R10,[RBP + R13*0x8]
XOR R8D,R8D
NOP word ptr [RAX + RAX*0x1]
LAB_001014a8:
MOV... | char * func0(char *param_1,int param_2,char *param_3,int param_4)
{
int *piVar1;
char *pcVar2;
char *pcVar3;
char cVar4;
char *pcVar5;
int iVar6;
long lVar7;
pcVar2 = (char *)malloc((long)(param_2 + param_4) << 3);
if (param_2 < 1) {
iVar6 = 0;
}
else {
iVar6 = 0;
pcVar5 = param_1;... |
7,504 | func0 |
#include <assert.h>
| int func0(int n) {
int cnt = 0;
for (int i = 1; i <= n; i++) {
int temp = i;
while (temp) {
if (temp % 2 == 0) {
cnt++;
}
temp = temp / 2;
}
}
return cnt;
}
| int main() {
assert(func0(2) == 1);
assert(func0(5) == 4);
assert(func0(14) == 17);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
movl $0x0,-0xc(%rbp)
movl $0x1,-0x8(%rbp)
jmp 1193 <func0+0x4a>
mov -0x8(%rbp),%eax
mov %eax,-0x4(%rbp)
jmp 1189 <func0+0x40>
mov -0x4(%rbp),%eax
and $0x1,%eax
test %eax,%eax
jne 117a <func0+0x31>
addl $0x1,-0xc(%rbp)
mov ... | 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_1193
loc_1164:
mov eax, [rbp+var_8]
mov [rbp+var_4], eax
jmp short loc_1189
loc_116C:
mov eax, [rbp+var_4]
and eax, 1
test eax, eax
jnz short loc_117A
add ... | long long func0(int a1)
{
unsigned int v2; // [rsp+8h] [rbp-Ch]
int i; // [rsp+Ch] [rbp-8h]
int j; // [rsp+10h] [rbp-4h]
v2 = 0;
for ( i = 1; i <= a1; ++i )
{
for ( j = i; j; j /= 2 )
{
if ( (j & 1) == 0 )
++v2;
}
}
return v2;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0xc],0x0
MOV dword ptr [RBP + -0x8],0x1
JMP 0x00101193
LAB_00101164:
MOV EAX,dword ptr [RBP + -0x8]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00101189
LAB_0010116c:
MOV EAX,dword ptr [RBP + -0x4]
AND EAX,0x1
TEST EAX,EAX
JNZ 0x0010117a... | int func0(int param_1)
{
int4 local_14;
int4 local_10;
int4 local_c;
local_14 = 0;
for (local_10 = 1; (int)local_10 <= param_1; local_10 = local_10 + 1) {
for (local_c = local_10; local_c != 0; local_c = (int)local_c / 2) {
if ((local_c & 1) == 0) {
local_14 = local_14 + 1;
}
}... |
7,505 | func0 |
#include <assert.h>
| int func0(int n) {
int cnt = 0;
for (int i = 1; i <= n; i++) {
int temp = i;
while (temp) {
if (temp % 2 == 0) {
cnt++;
}
temp = temp / 2;
}
}
return cnt;
}
| int main() {
assert(func0(2) == 1);
assert(func0(5) == 4);
assert(func0(14) == 17);
return 0;
}
| O1 | c | func0:
endbr64
mov $0x1,%esi
mov $0x0,%ecx
test %edi,%edi
jg 1160 <func0+0x17>
jmp 1185 <func0+0x3c>
add $0x1,%esi
mov %esi,%edx
test %esi,%esi
je 115d <func0+0x14>
mov %edx,%eax
and $0x1,%eax
cmp $0x1,%eax
adc $0x0,%ecx
mov %edx,%eax
shr $0x1f,%eax
add %edx,%eax
sar %... | func0:
endbr64
mov r8d, 2
mov esi, 1
mov ecx, 0
test edi, edi
jg short loc_116A
jmp short loc_118D
loc_1163:
add esi, 1
add r8d, 1
loc_116A:
mov edx, esi
test esi, esi
jz short loc_1163
loc_1170:
mov eax, edx
and eax, 1
cmp eax, 1
adc ecx, 0
mov eax, edx
s... | long long func0(int a1)
{
int v1; // r8d
int v2; // esi
unsigned int v3; // ecx
int v4; // edx
v1 = 2;
v2 = 1;
v3 = 0;
if ( a1 > 0 )
{
while ( 1 )
{
v4 = v2;
if ( v2 )
{
do
{
v3 += (v4 & 1) == 0;
v4 /= 2;
}
while ( v4 );
... | func0:
ENDBR64
MOV R8D,0x2
MOV ESI,0x1
MOV ECX,0x0
TEST EDI,EDI
JG 0x0010116a
JMP 0x0010118d
LAB_00101163:
ADD ESI,0x1
ADD R8D,0x1
LAB_0010116a:
MOV EDX,ESI
TEST ESI,ESI
JZ 0x00101163
LAB_00101170:
MOV EAX,EDX
AND EAX,0x1
CMP EAX,0x1
ADC ECX,0x0
MOV EAX,EDX
SHR EAX,0x1f
ADD EAX,EDX
SAR EAX,0x1
MOV EDX,EAX
JNZ 0x0010117... | int func0(int param_1)
{
uint uVar1;
int iVar2;
uint uVar3;
int iVar4;
iVar4 = 2;
uVar3 = 1;
iVar2 = 0;
if (param_1 < 1) {
return 0;
}
do {
uVar1 = uVar3;
if (uVar3 != 0) {
do {
iVar2 = iVar2 + (uint)((uVar1 & 1) == 0);
uVar1 = (int)uVar1 / 2;
} while (uVa... |
7,506 | func0 |
#include <assert.h>
| int func0(int n) {
int cnt = 0;
for (int i = 1; i <= n; i++) {
int temp = i;
while (temp) {
if (temp % 2 == 0) {
cnt++;
}
temp = temp / 2;
}
}
return cnt;
}
| int main() {
assert(func0(2) == 1);
assert(func0(5) == 4);
assert(func0(14) == 17);
return 0;
}
| O2 | c | func0:
endbr64
test %edi,%edi
jle 123b <func0+0x3b>
lea 0x1(%rdi),%esi
mov $0x1,%ecx
xor %r8d,%r8d
nopl 0x0(%rax,%rax,1)
mov %ecx,%eax
nopw 0x0(%rax,%rax,1)
mov %eax,%edx
and $0x1,%edx
cmp $0x1,%edx
adc $0x0,%r8d
sar %eax
jne 1220 <func0+0x20>
add $0x1,%ecx
cmp %esi,%ecx
jne... | func0:
endbr64
test edi, edi
jle short loc_122B
lea esi, [rdi+1]
mov ecx, 1
xor r8d, r8d
nop dword ptr [rax+rax+00h]
loc_1208:
mov eax, ecx
nop word ptr [rax+rax+00h]
loc_1210:
mov edx, eax
and edx, 1
cmp edx, 1
adc r8d, 0
sar eax, 1
jnz short loc_1210
add ecx,... | long long func0(int a1)
{
int v1; // ecx
unsigned int v2; // r8d
int v3; // eax
if ( a1 <= 0 )
return 0LL;
v1 = 1;
v2 = 0;
do
{
v3 = v1;
do
{
v2 += (v3 & 1) == 0;
v3 >>= 1;
}
while ( v3 );
++v1;
}
while ( a1 + 1 != v1 );
return v2;
} | func0:
ENDBR64
TEST EDI,EDI
JLE 0x0010122b
LEA ESI,[RDI + 0x1]
MOV ECX,0x1
XOR R8D,R8D
NOP dword ptr [RAX + RAX*0x1]
LAB_00101208:
MOV EAX,ECX
NOP word ptr [RAX + RAX*0x1]
LAB_00101210:
MOV EDX,EAX
AND EDX,0x1
CMP EDX,0x1
ADC R8D,0x0
SAR EAX,0x1
JNZ 0x00101210
ADD ECX,0x1
CMP ESI,ECX
JNZ 0x00101208
MOV EAX,R8D
RET
LAB_... | int func0(int param_1)
{
uint uVar1;
uint uVar2;
int iVar3;
if (param_1 < 1) {
return 0;
}
uVar1 = 1;
iVar3 = 0;
uVar2 = uVar1;
do {
do {
iVar3 = iVar3 + (uint)((uVar1 & 1) == 0);
uVar1 = (int)uVar1 >> 1;
} while (uVar1 != 0);
uVar1 = uVar2 + 1;
uVar2 = uVar1;
} w... |
7,507 | func0 |
#include <assert.h>
| int func0(int n) {
int cnt = 0;
for (int i = 1; i <= n; i++) {
int temp = i;
while (temp) {
if (temp % 2 == 0) {
cnt++;
}
temp = temp / 2;
}
}
return cnt;
}
| int main() {
assert(func0(2) == 1);
assert(func0(5) == 4);
assert(func0(14) == 17);
return 0;
}
| O3 | c | func0:
endbr64
test %edi,%edi
jle 123b <func0+0x3b>
lea 0x1(%rdi),%esi
mov $0x1,%ecx
xor %r8d,%r8d
nopl 0x0(%rax,%rax,1)
mov %ecx,%eax
nopw 0x0(%rax,%rax,1)
mov %eax,%edx
and $0x1,%edx
cmp $0x1,%edx
adc $0x0,%r8d
sar %eax
jne 1220 <func0+0x20>
add $0x1,%ecx
cmp %ecx,%esi
jne... | func0:
endbr64
test edi, edi
jle short loc_1260
add edi, 1
mov esi, 1
xor edx, edx
nop word ptr [rax+rax+00h]
loc_1238:
mov eax, esi
nop word ptr [rax+rax+00h]
loc_1240:
mov ecx, eax
and ecx, 1
cmp ecx, 1
mov ecx, eax
adc edx, 0
shr ecx, 1Fh
add eax, ecx
sar ... | long long func0(int a1)
{
int v1; // edi
int v2; // esi
unsigned int v3; // edx
int v4; // eax
if ( a1 <= 0 )
return 0LL;
v1 = a1 + 1;
v2 = 1;
v3 = 0;
do
{
v4 = v2;
do
{
v3 += (v4 & 1) == 0;
v4 /= 2;
}
while ( v4 );
++v2;
}
while ( v1 != v2 );
return v... | func0:
ENDBR64
TEST EDI,EDI
JLE 0x00101260
ADD EDI,0x1
MOV ESI,0x1
XOR EDX,EDX
NOP word ptr [RAX + RAX*0x1]
LAB_00101238:
MOV EAX,ESI
NOP word ptr [RAX + RAX*0x1]
LAB_00101240:
MOV ECX,EAX
AND ECX,0x1
CMP ECX,0x1
MOV ECX,EAX
ADC EDX,0x0
SHR ECX,0x1f
ADD EAX,ECX
SAR EAX,0x1
JNZ 0x00101240
ADD ESI,0x1
CMP EDI,ESI
JNZ 0x0... | int func0(int param_1)
{
uint uVar1;
int iVar2;
uint uVar3;
if (param_1 < 1) {
return 0;
}
uVar1 = 1;
iVar2 = 0;
uVar3 = uVar1;
do {
do {
iVar2 = iVar2 + (uint)((uVar1 & 1) == 0);
uVar1 = (int)uVar1 / 2;
} while (uVar1 != 0);
uVar1 = uVar3 + 1;
uVar3 = uVar1;
} wh... |
7,508 | func0 |
#include <assert.h>
#include <stdbool.h>
| bool func0(int x) {
if (x % 2 == 0)
return true;
else
return false;
}
| int main() {
assert(func0(13) == false);
assert(func0(0) == true);
assert(func0(-9) == false);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x4(%rbp)
mov -0x4(%rbp),%eax
and $0x1,%eax
test %eax,%eax
jne 1165 <func0+0x1c>
mov $0x1,%eax
jmp 116a <func0+0x21>
mov $0x0,%eax
pop %rbp
retq
| func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov eax, [rbp+var_4]
and eax, 1
test eax, eax
jnz short loc_1165
mov eax, 1
jmp short loc_116A
loc_1165:
mov eax, 0
loc_116A:
pop rbp
retn | _BOOL8 func0(char a1)
{
return (a1 & 1) == 0;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV EAX,dword ptr [RBP + -0x4]
AND EAX,0x1
TEST EAX,EAX
JNZ 0x00101165
MOV EAX,0x1
JMP 0x0010116a
LAB_00101165:
MOV EAX,0x0
LAB_0010116a:
POP RBP
RET | bool func0(uint param_1)
{
return (param_1 & 1) == 0;
} |
7,509 | func0 |
#include <assert.h>
#include <stdbool.h>
| bool func0(int x) {
if (x % 2 == 0)
return true;
else
return false;
}
| int main() {
assert(func0(13) == false);
assert(func0(0) == true);
assert(func0(-9) == false);
return 0;
}
| O1 | c | func0:
endbr64
mov %edi,%eax
xor $0x1,%eax
and $0x1,%eax
retq
| func0:
endbr64
mov eax, edi
xor eax, 1
and eax, 1
retn | long long func0(unsigned __int8 a1)
{
return (a1 ^ 1) & 1;
} | func0:
ENDBR64
MOV EAX,EDI
XOR EAX,0x1
AND EAX,0x1
RET | uint func0(uint param_1)
{
return (param_1 ^ 1) & 1;
} |
7,510 | func0 |
#include <assert.h>
#include <stdbool.h>
| bool func0(int x) {
if (x % 2 == 0)
return true;
else
return false;
}
| int main() {
assert(func0(13) == false);
assert(func0(0) == true);
assert(func0(-9) == false);
return 0;
}
| O2 | c | func0:
endbr64
mov %edi,%eax
not %eax
and $0x1,%eax
retq
nopl 0x0(%rax)
| func0:
endbr64
mov eax, edi
not eax
and eax, 1
retn | _BOOL8 func0(char a1)
{
return (a1 & 1) == 0;
} | func0:
ENDBR64
MOV EAX,EDI
NOT EAX
AND EAX,0x1
RET | uint func0(uint param_1)
{
return ~param_1 & 1;
} |
7,511 | func0 |
#include <assert.h>
#include <stdbool.h>
| bool func0(int x) {
if (x % 2 == 0)
return true;
else
return false;
}
| int main() {
assert(func0(13) == false);
assert(func0(0) == true);
assert(func0(-9) == false);
return 0;
}
| O3 | c | func0:
endbr64
mov %edi,%eax
not %eax
and $0x1,%eax
retq
nopl 0x0(%rax)
| func0:
endbr64
mov eax, edi
not eax
and eax, 1
retn | _BOOL8 func0(char a1)
{
return (a1 & 1) == 0;
} | func0:
ENDBR64
MOV EAX,EDI
NOT EAX
AND EAX,0x1
RET | uint func0(uint param_1)
{
return ~param_1 & 1;
} |
7,512 | func0 |
#include <assert.h>
int factorial(int start, int end) {
int res = 1;
for (int i = start; i <= end; i++) {
res *= i;
}
return res;
}
| int func0(int n) {
return factorial(n + 1, 2 * n) / factorial(1, n);
}
| int main() {
assert(func0(4) == 70);
assert(func0(5) == 252);
assert(func0(2) == 6);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x8,%rsp
mov %edi,-0xc(%rbp)
mov -0xc(%rbp),%eax
lea (%rax,%rax,1),%edx
mov -0xc(%rbp),%eax
add $0x1,%eax
mov %edx,%esi
mov %eax,%edi
callq 1149 <factorial>
mov %eax,%ebx
mov -0xc(%rbp),%eax
mov %eax,%esi
mov $0x1,%edi
cal... | func0:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 8
mov [rbp+var_C], edi
mov eax, [rbp+var_C]
lea edx, [rax+rax]
mov eax, [rbp+var_C]
add eax, 1
mov esi, edx
mov edi, eax
call factorial
mov ebx, eax
mov eax, [rbp+var_C]
mov esi, eax
mov edi, 1
call fa... | long long func0(unsigned int a1)
{
int v1; // ebx
v1 = factorial(a1 + 1, 2 * a1);
return (unsigned int)(v1 / (int)factorial(1LL, a1));
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x8
MOV dword ptr [RBP + -0xc],EDI
MOV EAX,dword ptr [RBP + -0xc]
LEA EDX,[RAX + RAX*0x1]
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0x1
MOV ESI,EDX
MOV EDI,EAX
CALL 0x00101149
MOV EBX,EAX
MOV EAX,dword ptr [RBP + -0xc]
MOV ESI,EAX
MOV EDI,0x1
CALL 0x00101149
MOV ECX,EAX... | int [16] func0(int param_1)
{
int iVar1;
int iVar2;
int auVar3 [16];
iVar1 = factorial(param_1 + 1,param_1 * 2);
iVar2 = factorial(1,param_1);
auVar3._0_8_ = (long)iVar1 / (long)iVar2 & 0xffffffff;
auVar3._8_8_ = (long)iVar1 % (long)iVar2 & 0xffffffff;
return auVar3;
} |
7,513 | func0 |
#include <assert.h>
int factorial(int start, int end) {
int res = 1;
for (int i = start; i <= end; i++) {
res *= i;
}
return res;
}
| int func0(int n) {
return factorial(n + 1, 2 * n) / factorial(1, n);
}
| int main() {
assert(func0(4) == 70);
assert(func0(5) == 252);
assert(func0(2) == 6);
return 0;
}
| O1 | c | func0:
endbr64
lea (%rdi,%rdi,1),%eax
lea 0x1(%rdi),%edx
cmp %edx,%eax
jl 11a9 <func0+0x3f>
lea 0x1(%rax),%ecx
mov $0x1,%eax
imul %edx,%eax
add $0x1,%edx
cmp %edx,%ecx
jne 1180 <func0+0x16>
test %edi,%edi
jle 11b0 <func0+0x46>
add $0x1,%edi
mov $0x1,%edx
mov $0x1,%ecx
imul ... | func0:
endbr64
lea ecx, [rdi+rdi]
lea edx, [rdi+1]
cmp ecx, edx
jl short loc_11A9
add ecx, 1
mov eax, 1
loc_1180:
imul eax, edx
add edx, 1
cmp ecx, edx
jnz short loc_1180
loc_118A:
test edi, edi
jle short loc_11B0
add edi, 1
mov edx, 1
mov ecx, 1
loc_119B:
imul... | long long func0(int a1)
{
int v1; // edx
int v2; // eax
int v3; // edi
int v4; // edx
int v5; // ecx
v1 = a1 + 1;
if ( 2 * a1 < a1 + 1 )
{
v2 = 1;
}
else
{
v2 = 1;
do
v2 *= v1++;
while ( 2 * a1 + 1 != v1 );
}
if ( a1 <= 0 )
{
v5 = 1;
}
else
{
v3 = a1 + 1... | func0:
ENDBR64
LEA ECX,[RDI + RDI*0x1]
LEA EDX,[RDI + 0x1]
CMP ECX,EDX
JL 0x001011a9
ADD ECX,0x1
MOV EAX,0x1
LAB_00101180:
IMUL EAX,EDX
ADD EDX,0x1
CMP ECX,EDX
JNZ 0x00101180
LAB_0010118a:
TEST EDI,EDI
JLE 0x001011b0
ADD EDI,0x1
MOV EDX,0x1
MOV ECX,0x1
LAB_0010119b:
IMUL ECX,EDX
ADD EDX,0x1
CMP EDI,EDX
JNZ 0x0010119b
L... | int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
iVar2 = param_1 + 1;
if (param_1 * 2 < iVar2) {
iVar1 = 1;
}
else {
iVar1 = 1;
do {
iVar1 = iVar1 * iVar2;
iVar2 = iVar2 + 1;
} while (param_1 * 2 + 1 != iVar2);
}
if (param_1 < 1) {
iVar2 = 1;
}
else {
... |
7,514 | func0 |
#include <assert.h>
int factorial(int start, int end) {
int res = 1;
for (int i = start; i <= end; i++) {
res *= i;
}
return res;
}
| int func0(int n) {
return factorial(n + 1, 2 * n) / factorial(1, n);
}
| int main() {
assert(func0(4) == 70);
assert(func0(5) == 252);
assert(func0(2) == 6);
return 0;
}
| O2 | c | func0:
endbr64
lea 0x1(%rdi),%esi
lea (%rdi,%rdi,1),%ecx
mov %esi,%edx
cmp %esi,%ecx
jl 11c0 <func0+0x50>
add $0x1,%ecx
mov $0x1,%eax
nopl 0x0(%rax,%rax,1)
imul %edx,%eax
add $0x1,%edx
cmp %ecx,%edx
jne 1190 <func0+0x20>
test %edi,%edi
jle 11bd <func0+0x4d>
mov $0x1,%ecx
mov ... | func0:
endbr64
lea ecx, [rdi+rdi]
lea edx, [rdi+1]
cmp ecx, edx
jl short loc_11C0
add ecx, 1
mov eax, 1
nop word ptr [rax+rax+00000000h]
loc_1190:
imul eax, edx
add edx, 1
cmp edx, ecx
jnz short loc_1190
loc_119A:
test edi, edi
jle short locret_11BF
mov ecx, 1
mov ... | long long func0(int a1)
{
int v1; // edx
long long result; // rax
int v3; // ecx
int v4; // edx
int v5; // esi
v1 = a1 + 1;
if ( 2 * a1 < a1 + 1 )
{
result = 1LL;
}
else
{
LODWORD(result) = 1;
do
{
result = (unsigned int)(v1 * result);
++v1;
}
while ( v1 != 2 ... | func0:
ENDBR64
LEA ECX,[RDI + RDI*0x1]
LEA EDX,[RDI + 0x1]
CMP ECX,EDX
JL 0x001011c0
ADD ECX,0x1
MOV EAX,0x1
NOP word ptr CS:[RAX + RAX*0x1]
LAB_00101190:
IMUL EAX,EDX
ADD EDX,0x1
CMP EDX,ECX
JNZ 0x00101190
LAB_0010119a:
TEST EDI,EDI
JLE 0x001011bf
MOV ECX,0x1
MOV EDX,0x1
NOP dword ptr [RAX + RAX*0x1]
LAB_001011b0:
MOV... | int1 [16] func0(int param_1)
{
int iVar1;
ulong uVar2;
int iVar3;
uint uVar4;
ulong uVar5;
bool bVar6;
int1 auVar7 [16];
uVar5 = (ulong)(param_1 + 1U);
if (param_1 * 2 < (int)(param_1 + 1U)) {
uVar2 = 1;
}
else {
uVar2 = 1;
do {
uVar2 = (ulong)(uint)((int)uVar2 * (int)uVar5)... |
7,515 | func0 |
#include <assert.h>
int factorial(int start, int end) {
int res = 1;
for (int i = start; i <= end; i++) {
res *= i;
}
return res;
}
| int func0(int n) {
return factorial(n + 1, 2 * n) / factorial(1, n);
}
| int main() {
assert(func0(4) == 70);
assert(func0(5) == 252);
assert(func0(2) == 6);
return 0;
}
| O3 | c | func0:
endbr64
lea 0x1(%rdi),%esi
lea (%rdi,%rdi,1),%ecx
mov %esi,%edx
cmp %esi,%ecx
jl 11c0 <func0+0x50>
add $0x1,%ecx
mov $0x1,%eax
nopl 0x0(%rax,%rax,1)
imul %edx,%eax
add $0x1,%edx
cmp %ecx,%edx
jne 1190 <func0+0x20>
test %edi,%edi
jle 11bd <func0+0x4d>
mov $0x1,%ecx
mov ... | func0:
endbr64
lea edx, [rdi+1]
lea ecx, [rdi+rdi]
mov eax, 1
cmp ecx, edx
jl short loc_11B8
lea esi, [rcx+1]
test dl, 1
jnz short loc_11A8
mov eax, edx
lea edx, [rdi+2]
cmp edx, esi
jz short loc_11B8
nop dword ptr [rax+00h]
loc_11A8:
imul eax, edx
lea ecx, [r... | long long func0(int a1)
{
unsigned int v1; // edx
long long result; // rax
int v3; // esi
int v4; // eax
unsigned int v5; // ecx
int v6; // ecx
int v7; // edx
int v8; // esi
v1 = a1 + 1;
result = 1LL;
if ( 2 * a1 >= a1 + 1 )
{
v3 = 2 * a1 + 1;
if ( (v1 & 1) != 0 || (result = v1, v1 = a... | func0:
ENDBR64
LEA EDX,[RDI + 0x1]
LEA ECX,[RDI + RDI*0x1]
MOV EAX,0x1
CMP ECX,EDX
JL 0x001011b8
LEA ESI,[RCX + 0x1]
TEST DL,0x1
JNZ 0x001011a8
MOV EAX,EDX
LEA EDX,[RDI + 0x2]
CMP EDX,ESI
JZ 0x001011b8
NOP dword ptr [RAX]
LAB_001011a8:
IMUL EAX,EDX
LEA ECX,[RDX + 0x1]
ADD EDX,0x2
IMUL EAX,ECX
CMP EDX,ESI
JNZ 0x001011a8... | int [16] func0(int param_1)
{
int iVar1;
ulong uVar2;
int iVar3;
uint uVar4;
bool bVar6;
int auVar7 [16];
ulong uVar5;
uVar4 = param_1 + 1;
uVar5 = (ulong)uVar4;
uVar2 = 1;
iVar1 = 1;
if ((int)uVar4 <= param_1 * 2) {
if ((uVar4 & 1) != 0) goto LAB_001011a8;
uVar4 = param_1 + 2;
... |
7,516 | func0 |
#include <stdio.h>
#include <string.h>
#include <regex.h>
#include <assert.h>
typedef struct {
char year[5];
char month[3];
char day[3];
} Date;
| Date func0(const char* url) {
regex_t regex;
regmatch_t matches[4];
Date date = {"", "", ""};
const char* pattern = "/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/";
if (regcomp(®ex, pattern, REG_EXTENDED)) {
return date;
}
if (!regexec(®ex, url, 4, matches, 0)) {
... | int main() {
Date d1 = func0("https://www.washingtonpost.com/news/football-insider/wp/2016/09/02/odell-beckhams-fame-rests-on-one-stupid-little-ball-josh-norman-tells-author/");
assert(strcmp(d1.year, "2016") == 0 && strcmp(d1.month, "09") == 0 && strcmp(d1.day, "02") == 0);
Date d2 = func0("https://ww... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0xc0,%rsp
mov %rdi,-0xa8(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
movl $0x0,-0x46(%rbp)
movb $0x0,-0x42(%rbp)
movw $0x0,-0x41(%rbp)
movb $0x0,-0x3f(%rbp)
movw $0x0,-0x3e(%rbp)
movb $0x0,-0x3c(%rbp)
lea 0xdb4(%rip),%rax
mov ... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 0C0h
mov [rbp+string], rdi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov dword ptr [rbp+s], 0
mov [rbp+s+4], 0
mov word ptr [rbp+s+5], 0
mov [rbp+s+7], 0
mov [rbp+var_3E], 0
mov [rbp+var_3C], 0
lea rax, a0940912... | long long func0(const char *a1)
{
regex_t preg; // [rsp+30h] [rbp-90h] BYREF
char s[11]; // [rsp+7Ah] [rbp-46h] BYREF
_BYTE v4[11]; // [rsp+85h] [rbp-3Bh]
regmatch_t pmatch; // [rsp+90h] [rbp-30h] BYREF
int v6; // [rsp+98h] [rbp-28h]
int v7; // [rsp+9Ch] [rbp-24h]
int v8; // [rsp+A0h] [rbp-20h]
int v9;... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0xc0
MOV qword ptr [RBP + -0xa8],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOV dword ptr [RBP + -0x46],0x0
MOV byte ptr [RBP + -0x42],0x0
MOV word ptr [RBP + -0x41],0x0
MOV byte ptr [RBP + -0x3f],0x0
MOV word ptr [RBP + -0x3e],0x0
MOV byte ptr... | int8 func0(char *param_1)
{
int iVar1;
long in_FS_OFFSET;
regex_t local_98;
int4 local_4e;
int uStack_4a;
int2 uStack_49;
int uStack_47;
int2 uStack_46;
int uStack_44;
int7 local_43;
int uStack_3c;
int2 uStack_3b;
int uStack_39;
regmatch_t local_38;
int local_30;
int local_2c;
int loc... |
7,517 | func0 |
#include <stdio.h>
#include <string.h>
#include <regex.h>
#include <assert.h>
typedef struct {
char year[5];
char month[3];
char day[3];
} Date;
| Date func0(const char* url) {
regex_t regex;
regmatch_t matches[4];
Date date = {"", "", ""};
const char* pattern = "/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/";
if (regcomp(®ex, pattern, REG_EXTENDED)) {
return date;
}
if (!regexec(®ex, url, 4, matches, 0)) {
... | int main() {
Date d1 = func0("https://www.washingtonpost.com/news/football-insider/wp/2016/09/02/odell-beckhams-fame-rests-on-one-stupid-little-ball-josh-norman-tells-author/");
assert(strcmp(d1.year, "2016") == 0 && strcmp(d1.month, "09") == 0 && strcmp(d1.day, "02") == 0);
Date d2 = func0("https://ww... | O1 | c | func0:
endbr64
push %rbx
sub $0xa0,%rsp
mov %rdi,%rbx
mov %fs:0x28,%rax
mov %rax,0x98(%rsp)
xor %eax,%eax
movl $0x0,0x5a(%rsp)
movb $0x0,0x5e(%rsp)
movw $0x0,0x5f(%rsp)
movb $0x0,0x61(%rsp)
movw $0x0,0x62(%rsp)
movb $0x0,0x64(%rsp)
lea 0x10(%rsp),%rdi
mov $0x1,%edx
lea 0xdc7(%rip),... | func0:
endbr64
push rbx
sub rsp, 0A0h
mov rbx, rdi
mov rax, fs:28h
mov [rsp+0A8h+var_10], rax
xor eax, eax
mov dword ptr [rsp+0A8h+var_4E], 0
mov byte ptr [rsp+0A8h+var_4E+4], 0
mov word ptr [rsp+0A8h+var_4E+5], 0
mov byte ptr [rsp+0A8h+var_4E+7], 0
mov [rsp+0A8h+var_46], 0
mo... | long long func0(long long a1)
{
_BYTE v2[74]; // [rsp+20h] [rbp-98h] BYREF
long long v3; // [rsp+6Ah] [rbp-4Eh] BYREF
__int16 v4; // [rsp+72h] [rbp-46h] BYREF
char v5; // [rsp+74h] [rbp-44h]
_BYTE v6[8]; // [rsp+80h] [rbp-38h] BYREF
int v7; // [rsp+88h] [rbp-30h]
int v8; // [rsp+8Ch] [rbp-2Ch]
int v9; ... | func0:
ENDBR64
PUSH RBX
SUB RSP,0xa0
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x98],RAX
XOR EAX,EAX
MOV dword ptr [RSP + 0x5a],0x0
MOV byte ptr [RSP + 0x5e],0x0
MOV word ptr [RSP + 0x5f],0x0
MOV byte ptr [RSP + 0x61],0x0
MOV word ptr [RSP + 0x62],0x0
MOV byte ptr [RSP + 0x64],0x0
LEA RDI,[RSP + 0x10... | int8 func0(char *param_1)
{
int iVar1;
long in_FS_OFFSET;
regex_t local_98;
int4 local_4e;
int1 uStack_4a;
int2 uStack_49;
int1 uStack_47;
int3 local_46 [3];
regmatch_t local_38;
int local_30;
int local_2c;
int local_28;
int local_24;
int local_20;
int local_1c;
long local_10;
loca... |
7,518 | func0 |
#include <stdio.h>
#include <string.h>
#include <regex.h>
#include <assert.h>
typedef struct {
char year[5];
char month[3];
char day[3];
} Date;
| Date func0(const char* url) {
regex_t regex;
regmatch_t matches[4];
Date date = {"", "", ""};
const char* pattern = "/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/";
if (regcomp(®ex, pattern, REG_EXTENDED)) {
return date;
}
if (!regexec(®ex, url, 4, matches, 0)) {
... | int main() {
Date d1 = func0("https://www.washingtonpost.com/news/football-insider/wp/2016/09/02/odell-beckhams-fame-rests-on-one-stupid-little-ball-josh-norman-tells-author/");
assert(strcmp(d1.year, "2016") == 0 && strcmp(d1.month, "09") == 0 && strcmp(d1.day, "02") == 0);
Date d2 = func0("https://ww... | O2 | c | func0:
endbr64
push %rbp
xor %esi,%esi
xor %ecx,%ecx
mov $0x1,%edx
push %rbx
mov %rdi,%rbx
sub $0xa8,%rsp
mov %fs:0x28,%rax
mov %rax,0x98(%rsp)
xor %eax,%eax
lea 0x10(%rsp),%rbp
mov %si,0x62(%rsp)
lea 0xc4b(%rip),%rsi
mov %rbp,%rdi
movl $0x0,0x5a(%rsp)
movb $0x0,0x5e(%rsp)
mo... | func0:
endbr64
push rbp
xor ecx, ecx
mov edx, 1
lea rsi, a09409120912; "/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/"
push rbx
mov rbx, rdi
sub rsp, 0A8h
mov rax, fs:28h
mov [rsp+0B8h+var_20], rax
xor eax, eax
lea rbp, [rsp+0B8h+var_A8]
mov [rsp+0B8h+var_56], cx
mov rdi, rbp
... | long long func0(long long a1)
{
_BYTE v2[74]; // [rsp+20h] [rbp-A8h] BYREF
long long v3; // [rsp+6Ah] [rbp-5Eh] BYREF
__int16 v4; // [rsp+72h] [rbp-56h] BYREF
char v5; // [rsp+74h] [rbp-54h]
_BYTE v6[8]; // [rsp+80h] [rbp-48h] BYREF
int v7; // [rsp+88h] [rbp-40h]
int v8; // [rsp+8Ch] [rbp-3Ch]
int v9; ... | func0:
ENDBR64
PUSH RBP
XOR ECX,ECX
MOV EDX,0x1
LEA RSI,[0x102008]
PUSH RBX
MOV RBX,RDI
SUB RSP,0xa8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x98],RAX
XOR EAX,EAX
LEA RBP,[RSP + 0x10]
MOV word ptr [RSP + 0x62],CX
MOV RDI,RBP
MOV byte ptr [RSP + 0x64],0x0
MOV qword ptr [RSP + 0x5a],0x0
CALL 0x001010f0
TEST EAX,... | int8 func0(char *param_1)
{
int iVar1;
long in_FS_OFFSET;
regex_t local_a8;
int8 local_5e;
int3 local_56 [3];
regmatch_t local_48;
int local_40;
int local_3c;
int local_38;
int local_34;
int local_30;
int local_2c;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_56[0] =... |
7,519 | func0 |
#include <stdio.h>
#include <string.h>
#include <regex.h>
#include <assert.h>
typedef struct {
char year[5];
char month[3];
char day[3];
} Date;
| Date func0(const char* url) {
regex_t regex;
regmatch_t matches[4];
Date date = {"", "", ""};
const char* pattern = "/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/";
if (regcomp(®ex, pattern, REG_EXTENDED)) {
return date;
}
if (!regexec(®ex, url, 4, matches, 0)) {
... | int main() {
Date d1 = func0("https://www.washingtonpost.com/news/football-insider/wp/2016/09/02/odell-beckhams-fame-rests-on-one-stupid-little-ball-josh-norman-tells-author/");
assert(strcmp(d1.year, "2016") == 0 && strcmp(d1.month, "09") == 0 && strcmp(d1.day, "02") == 0);
Date d2 = func0("https://ww... | O3 | c | func0:
endbr64
push %rbp
xor %esi,%esi
xor %ecx,%ecx
mov $0x1,%edx
push %rbx
mov %rdi,%rbx
sub $0xa8,%rsp
mov %fs:0x28,%rax
mov %rax,0x98(%rsp)
xor %eax,%eax
lea 0x10(%rsp),%rbp
mov %si,0x62(%rsp)
lea 0xc4b(%rip),%rsi
mov %rbp,%rdi
movl $0x0,0x5a(%rsp)
movb $0x0,0x5e(%rsp)
mo... | func0:
endbr64
push rbp
xor ecx, ecx
mov rbp, rdi
mov edx, 1; cflags
push rbx
lea rsi, pattern; "/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/"
sub rsp, 0A8h
mov rax, fs:28h
mov [rsp+0B8h+var_20], rax
xor eax, eax
lea rbx, [rsp+0B8h+preg]
mov [rsp+0B8h+var_56], cx
mov rdi, rbx... | long long func0(char *string)
{
regex_t preg; // [rsp+20h] [rbp-A8h] BYREF
_BYTE v3[11]; // [rsp+6Ah] [rbp-5Eh] BYREF
_BYTE v4[11]; // [rsp+75h] [rbp-53h]
regmatch_t pmatch; // [rsp+80h] [rbp-48h] BYREF
int v6; // [rsp+88h] [rbp-40h]
int v7; // [rsp+8Ch] [rbp-3Ch]
int v8; // [rsp+90h] [rbp-38h]
int v9;... | func0:
ENDBR64
PUSH RBP
XOR ECX,ECX
MOV RBP,RDI
MOV EDX,0x1
PUSH RBX
LEA RSI,[0x102008]
SUB RSP,0xa8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x98],RAX
XOR EAX,EAX
LEA RBX,[RSP + 0x10]
MOV word ptr [RSP + 0x62],CX
MOV RDI,RBX
MOV byte ptr [RSP + 0x64],0x0
MOV qword ptr [RSP + 0x5a],0x0
CALL 0x001010f0
TEST EAX,... | int8 func0(char *param_1)
{
int iVar1;
long in_FS_OFFSET;
regex_t local_a8;
int local_5e [7];
int uStack_57;
int2 uStack_56;
int uStack_54;
int7 local_53;
int4 uStack_4c;
regmatch_t local_48;
int local_40;
int local_3c;
int local_38;
int local_34;
int local_30;
int local_2c;
long loca... |
7,520 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
| int* func0(int n) {
int size = n * n + 9;
int capacity = (size + 1) / 2;
int* list = malloc(capacity * sizeof(int));
if (!list) return NULL;
int index = 0;
for(int num = -1; num < size; num += 2){
list[index++] = num;
}
int current_size = index;
int i = 2;
whil... | int main() {
int expected1[10] = {1, 3, 7, 9, 13, 15, 21, 25, 31, 33};
int expected2[5] = {1, 3, 7, 9, 13};
int expected3[8] = {1, 3, 7, 9, 13, 15, 21, 25};
int* result1 = func0(10);
for(int i = 0; i < 10; i++) {
assert(result1[i] == expected1[i]);
}
free(result1);
i... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x50,%rsp
mov %edi,-0x44(%rbp)
mov -0x44(%rbp),%eax
imul %eax,%eax
add $0x9,%eax
mov %eax,-0x24(%rbp)
mov -0x24(%rbp),%eax
add $0x1,%eax
mov %eax,%edx
shr $0x1f,%edx
add %edx,%eax
sar %eax
mov %eax,-0x20(%rbp)
mov -0x20(%rbp),%eax... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_44], edi
mov eax, [rbp+var_44]
imul eax, eax
add eax, 9
mov [rbp+var_24], eax
mov eax, [rbp+var_24]
add eax, 1
mov edx, eax
shr edx, 1Fh
add eax, edx
sar eax, 1
mov [rbp+var_20], eax
mov eax, [rb... | _DWORD * func0(int a1)
{
int v2; // eax
int v3; // eax
int v4; // [rsp+10h] [rbp-40h]
int i; // [rsp+14h] [rbp-3Ch]
int v6; // [rsp+18h] [rbp-38h]
int j; // [rsp+1Ch] [rbp-34h]
int v8; // [rsp+20h] [rbp-30h]
int k; // [rsp+24h] [rbp-2Ch]
int m; // [rsp+28h] [rbp-28h]
int v11; // [rsp+34h] [rbp-1Ch]
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV dword ptr [RBP + -0x44],EDI
MOV EAX,dword ptr [RBP + -0x44]
IMUL EAX,EAX
ADD EAX,0x9
MOV dword ptr [RBP + -0x24],EAX
MOV EAX,dword ptr [RBP + -0x24]
ADD EAX,0x1
MOV EDX,EAX
SHR EDX,0x1f
ADD EAX,EDX
SAR EAX,0x1
MOV dword ptr [RBP + -0x20],EAX
MOV EAX,dword ptr [RBP + ... | void * func0(int param_1)
{
int iVar1;
void *pvVar2;
int local_48;
int local_44;
int local_40;
int local_3c;
int local_38;
int local_34;
int local_30;
void *local_20;
local_20 = malloc((long)((param_1 * param_1 + 10) / 2) << 2);
if (local_20 == (void *)0x0) {
pvVar2 = (void *)0x0;
}
... |
7,521 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
| int* func0(int n) {
int size = n * n + 9;
int capacity = (size + 1) / 2;
int* list = malloc(capacity * sizeof(int));
if (!list) return NULL;
int index = 0;
for(int num = -1; num < size; num += 2){
list[index++] = num;
}
int current_size = index;
int i = 2;
whil... | int main() {
int expected1[10] = {1, 3, 7, 9, 13, 15, 21, 25, 31, 33};
int expected2[5] = {1, 3, 7, 9, 13};
int expected3[8] = {1, 3, 7, 9, 13, 15, 21, 25};
int* result1 = func0(10);
for(int i = 0; i < 10; i++) {
assert(result1[i] == expected1[i]);
}
free(result1);
i... | O1 | c | func0:
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %edi,0xc(%rsp)
mov %edi,%ebp
imul %edi,%ebp
lea 0xa(%rbp),%eax
mov %eax,%edi
shr $0x1f,%edi
add %eax,%edi
sar %edi
movslq %edi,%rdi
shl $0x2,%rdi
callq 10b0 <malloc@plt>
mov %rax,%r... | func0:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 18h
mov [rsp+48h+var_3C], edi
mov ebp, edi
imul ebp, edi
lea eax, [rbp+0Ah]
mov edi, eax
shr edi, 1Fh
add edi, eax
sar edi, 1
movsxd rdi, edi
shl rdi, 2
call _malloc
mov r12, ra... | long long func0(int a1, long long a2)
{
int v2; // ebp
long long v3; // rax
long long v4; // r12
_DWORD *v5; // rdx
int v6; // eax
signed int v7; // ebx
long long v8; // r14
int v9; // r15d
int v10; // ecx
int v11; // ebp
long long v12; // r13
int v13; // edi
long long v14; // rbp
long long... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV dword ptr [RSP + 0xc],EDI
MOV EBP,EDI
IMUL EBP,EDI
LEA EAX,[RBP + 0xa]
MOV EDI,EAX
SHR EDI,0x1f
ADD EDI,EAX
SAR EDI,0x1
MOVSXD RDI,EDI
SHL RDI,0x2
CALL 0x001010b0
MOV R12,RAX
TEST RAX,RAX
JZ 0x001012eb
LEA EBX,[RBP + 0x9]
MOV RDX,RAX
... | void * func0(int param_1)
{
int iVar1;
int iVar2;
int *__ptr;
int *piVar3;
void *pvVar4;
ulong uVar5;
int iVar6;
int iVar7;
long lVar8;
int iVar9;
long lVar10;
iVar7 = param_1 * param_1;
__ptr = (int *)malloc((long)((iVar7 + 10) / 2) << 2);
if (__ptr == (int *)0x0) {
pvVar4 = (void *... |
7,522 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
| int* func0(int n) {
int size = n * n + 9;
int capacity = (size + 1) / 2;
int* list = malloc(capacity * sizeof(int));
if (!list) return NULL;
int index = 0;
for(int num = -1; num < size; num += 2){
list[index++] = num;
}
int current_size = index;
int i = 2;
whil... | int main() {
int expected1[10] = {1, 3, 7, 9, 13, 15, 21, 25, 31, 33};
int expected2[5] = {1, 3, 7, 9, 13};
int expected3[8] = {1, 3, 7, 9, 13, 15, 21, 25};
int* result1 = func0(10);
for(int i = 0; i < 10; i++) {
assert(result1[i] == expected1[i]);
}
free(result1);
i... | O2 | c | func0:
endbr64
push %r15
mov %edi,%eax
push %r14
imul %edi,%eax
push %r13
push %r12
push %rbp
lea 0x9(%rax),%r15d
push %rbx
sub $0x18,%rsp
mov %edi,0xc(%rsp)
lea 0xa(%rax),%edi
mov %edi,%eax
sar %eax
movslq %eax,%rdi
shl $0x2,%rdi
callq 10b0 <malloc@plt>
test %rax,%rax
je 14... | func0:
endbr64
push r15
mov eax, edi
push r14
imul eax, edi
push r13
push r12
push rbp
lea r15d, [rax+9]
push rbx
sub rsp, 18h
mov [rsp+48h+var_3C], edi
lea edi, [rax+0Ah]
mov eax, edi
sar eax, 1
movsxd rdi, eax
shl rdi, 2
call _malloc
test rax, rax
jz lo... | long long func0(int a1, long long a2)
{
int v2; // r15d
long long v3; // rax
long long v4; // r13
_DWORD *v5; // rdx
int v6; // eax
long long v7; // rbp
int v8; // r12d
int v9; // r15d
int v10; // r14d
int v11; // ebx
long long v12; // rax
long long v13; // rcx
long long v14; // r9
long lon... | func0:
ENDBR64
PUSH R15
MOV EAX,EDI
PUSH R14
IMUL EAX,EDI
PUSH R13
PUSH R12
PUSH RBP
LEA R15D,[RAX + 0x9]
PUSH RBX
SUB RSP,0x18
MOV dword ptr [RSP + 0xc],EDI
LEA EDI,[RAX + 0xa]
MOV EAX,EDI
SAR EAX,0x1
MOVSXD RDI,EAX
SHL RDI,0x2
CALL 0x001010b0
TEST RAX,RAX
JZ 0x001014ac
MOV R13,RAX
MOV RDX,RAX
MOV EAX,0xffffffff
NOP w... | void * func0(int param_1)
{
uint uVar1;
int iVar2;
int iVar3;
int *__ptr;
int *piVar4;
long lVar5;
void *pvVar6;
long lVar7;
ulong uVar8;
int iVar9;
long lVar10;
int iVar11;
int iVar12;
uVar1 = param_1 * param_1 + 9;
__ptr = (int *)malloc((long)(param_1 * param_1 + 10 >> 1) << 2);
if... |
7,523 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
| int* func0(int n) {
int size = n * n + 9;
int capacity = (size + 1) / 2;
int* list = malloc(capacity * sizeof(int));
if (!list) return NULL;
int index = 0;
for(int num = -1; num < size; num += 2){
list[index++] = num;
}
int current_size = index;
int i = 2;
whil... | int main() {
int expected1[10] = {1, 3, 7, 9, 13, 15, 21, 25, 31, 33};
int expected2[5] = {1, 3, 7, 9, 13};
int expected3[8] = {1, 3, 7, 9, 13, 15, 21, 25};
int* result1 = func0(10);
for(int i = 0; i < 10; i++) {
assert(result1[i] == expected1[i]);
}
free(result1);
i... | O3 | c | func0:
endbr64
push %r15
mov %edi,%eax
push %r14
imul %edi,%eax
push %r13
push %r12
push %rbp
lea 0x9(%rax),%ebp
push %rbx
sub $0x18,%rsp
mov %edi,0xc(%rsp)
lea 0xa(%rax),%edi
mov %edi,%eax
sar %eax
movslq %eax,%rdi
shl $0x2,%rdi
callq 10b0 <malloc@plt>
test %rax,%rax
je 168... | func0:
endbr64
push r15
mov eax, edi
push r14
imul eax, edi
push r13
push r12
push rbp
push rbx
lea ebx, [rax+9]
sub rsp, 18h
mov [rsp+48h+var_3C], edi
lea edi, [rax+0Ah]
mov eax, edi
sar eax, 1
movsxd rdi, eax
shl rdi, 2; size
call _malloc
test rax, rax
jz ... | _DWORD * func0(int a1)
{
int v1; // ebx
__m128i *v2; // rax
__m128i si128; // xmm0
__m128i v4; // xmm2
__m128i *v5; // r12
int v6; // r13d
char *m128i_i8; // rdx
__m128i v8; // xmm1
long long v9; // rdx
int v10; // eax
long long v11; // rcx
int v12; // edx
int v13; // eax
long long v14; // r... | func0:
ENDBR64
PUSH R15
MOV EAX,EDI
PUSH R14
IMUL EAX,EDI
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
LEA EBX,[RAX + 0x9]
SUB RSP,0x18
MOV dword ptr [RSP + 0xc],EDI
LEA EDI,[RAX + 0xa]
MOV EAX,EDI
SAR EAX,0x1
MOVSXD RDI,EAX
SHL RDI,0x2
CALL 0x00101090
TEST RAX,RAX
JZ 0x001015e7
MOV R13D,EBX
MOVDQA XMM0,xmmword ptr [0x00102080]... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void * func0(int param_1)
{
uint uVar1;
int8 uVar2;
ulong uVar3;
int *__ptr;
int *piVar4;
ulong uVar5;
long lVar6;
void *pvVar7;
int iVar8;
uint uVar9;
long lVar10;
int iVar11;
uint uVar12;
int *piVar13;
... |
7,524 | func0 |
#include <assert.h>
| int func0(int arr[], int n) {
for (int i = 0; i < n; i++) {
if (arr[i] == i) {
return i;
}
}
return -1;
}
| int main() {
int arr1[] = {-10, -1, 0, 3, 10, 11, 30, 50, 100};
int arr2[] = {1, 2, 3, 4, 5, 6, 7, 8};
int arr3[] = {0, 2, 5, 8, 17};
assert(func0(arr1, 9) == 3);
assert(func0(arr2, 8) == -1);
assert(func0(arr3, 5) == 0);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
movl $0x0,-0x4(%rbp)
jmp 11a5 <func0+0x3c>
mov -0x4(%rbp),%eax
cltq
lea 0x0(,%rax,4),%rdx
mov -0x18(%rbp),%rax
add %rdx,%rax
mov (%rax),%eax
cmp %eax,-0x4(%rbp)
jne 11a1 <func0+0x38>
mov -0x4(%rbp),%... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_4], 0
jmp short loc_11A5
loc_1181:
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_4], eax
jnz short loc_11A1
mov... | long long func0(long long a1, int a2)
{
unsigned int i; // [rsp+18h] [rbp-4h]
for ( i = 0; (int)i < a2; ++i )
{
if ( i == *(_DWORD *)(4LL * (int)i + a1) )
return i;
}
return 0xFFFFFFFFLL;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001011a5
LAB_00101181:
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 dword ptr [RBP + -0x4],EAX
JNZ 0x0... | int func0(long param_1,int param_2)
{
int local_c;
local_c = 0;
while( true ) {
if (param_2 <= local_c) {
return -1;
}
if (local_c == *(int *)(param_1 + (long)local_c * 4)) break;
local_c = local_c + 1;
}
return local_c;
} |
7,525 | func0 |
#include <assert.h>
| int func0(int arr[], int n) {
for (int i = 0; i < n; i++) {
if (arr[i] == i) {
return i;
}
}
return -1;
}
| int main() {
int arr1[] = {-10, -1, 0, 3, 10, 11, 30, 50, 100};
int arr2[] = {1, 2, 3, 4, 5, 6, 7, 8};
int arr3[] = {0, 2, 5, 8, 17};
assert(func0(arr1, 9) == 3);
assert(func0(arr2, 8) == -1);
assert(func0(arr3, 5) == 0);
return 0;
}
| O1 | c | func0:
endbr64
test %esi,%esi
jle 1196 <func0+0x2d>
lea -0x1(%rsi),%ecx
mov $0x0,%eax
jmp 117e <func0+0x15>
mov %rdx,%rax
mov %eax,%edx
cmp %eax,(%rdi,%rax,4)
je 1193 <func0+0x2a>
lea 0x1(%rax),%rdx
cmp %rcx,%rax
jne 117b <func0+0x12>
mov $0xffffffff,%edx
mov %edx,%eax
retq
mov... | func0:
endbr64
test esi, esi
jle short loc_1190
mov esi, esi
mov eax, 0
loc_1178:
mov edx, eax
cmp [rdi+rax*4], eax
jz short loc_118D
add rax, 1
cmp rax, rsi
jnz short loc_1178
mov edx, 0FFFFFFFFh
loc_118D:
mov eax, edx
retn
loc_1190:
mov edx, 0FFFFFFFFh
jmp short... | long long func0(long long a1, int a2)
{
long long v2; // rax
unsigned int v3; // edx
if ( a2 <= 0 )
{
return (unsigned int)-1;
}
else
{
v2 = 0LL;
while ( 1 )
{
v3 = v2;
if ( *(_DWORD *)(a1 + 4 * v2) == (_DWORD)v2 )
break;
if ( ++v2 == a2 )
return (unsign... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x00101190
MOV ESI,ESI
MOV EAX,0x0
LAB_00101178:
MOV EDX,EAX
CMP dword ptr [RDI + RAX*0x4],EAX
JZ 0x0010118d
ADD RAX,0x1
CMP RAX,RSI
JNZ 0x00101178
MOV EDX,0xffffffff
LAB_0010118d:
MOV EAX,EDX
RET
LAB_00101190:
MOV EDX,0xffffffff
JMP 0x0010118d | ulong func0(long param_1,uint param_2)
{
ulong uVar1;
if (0 < (int)param_2) {
uVar1 = 0;
do {
if (*(int *)(param_1 + uVar1 * 4) == (int)uVar1) {
return uVar1 & 0xffffffff;
}
uVar1 = uVar1 + 1;
} while (uVar1 != param_2);
}
return 0xffffffff;
} |
7,526 | func0 |
#include <assert.h>
| int func0(int arr[], int n) {
for (int i = 0; i < n; i++) {
if (arr[i] == i) {
return i;
}
}
return -1;
}
| int main() {
int arr1[] = {-10, -1, 0, 3, 10, 11, 30, 50, 100};
int arr2[] = {1, 2, 3, 4, 5, 6, 7, 8};
int arr3[] = {0, 2, 5, 8, 17};
assert(func0(arr1, 9) == 3);
assert(func0(arr2, 8) == -1);
assert(func0(arr3, 5) == 0);
return 0;
}
| O2 | c | func0:
endbr64
test %esi,%esi
jle 12d0 <func0+0x30>
lea -0x1(%rsi),%ecx
xor %eax,%eax
jmp 12bc <func0+0x1c>
lea 0x1(%rax),%rdx
cmp %rcx,%rax
je 12d0 <func0+0x30>
mov %rdx,%rax
mov %eax,%r8d
cmp %eax,(%rdi,%rax,4)
jne 12b0 <func0+0x10>
mov %r8d,%eax
retq
nopl 0x0(%rax,%rax,1)
mov... | func0:
endbr64
test esi, esi
jle short loc_12C8
movsxd rsi, esi
xor eax, eax
jmp short loc_12B9
loc_12B0:
add rax, 1
cmp rax, rsi
jz short loc_12C8
loc_12B9:
mov r8d, eax
cmp [rdi+rax*4], eax
jnz short loc_12B0
mov eax, r8d
retn
loc_12C8:
mov r8d, 0FFFFFFFFh
mov eax,... | long long func0(long long a1, int a2)
{
long long result; // rax
if ( a2 <= 0 )
return 0xFFFFFFFFLL;
result = 0LL;
while ( *(_DWORD *)(a1 + 4 * result) != (_DWORD)result )
{
if ( ++result == a2 )
return 0xFFFFFFFFLL;
}
return (unsigned int)result;
} | func0:
ENDBR64
TEST ESI,ESI
JLE 0x001012c8
MOVSXD RSI,ESI
XOR EAX,EAX
JMP 0x001012b9
LAB_001012b0:
ADD RAX,0x1
CMP RAX,RSI
JZ 0x001012c8
LAB_001012b9:
MOV R8D,EAX
CMP dword ptr [RDI + RAX*0x4],EAX
JNZ 0x001012b0
MOV EAX,R8D
RET
LAB_001012c8:
MOV R8D,0xffffffff
MOV EAX,R8D
RET | ulong func0(long param_1,int param_2)
{
ulong uVar1;
if (0 < param_2) {
uVar1 = 0;
do {
if (*(int *)(param_1 + uVar1 * 4) == (int)uVar1) {
return uVar1 & 0xffffffff;
}
uVar1 = uVar1 + 1;
} while (uVar1 != (long)param_2);
}
return 0xffffffff;
} |
7,527 | func0 |
#include <assert.h>
| int func0(int arr[], int n) {
for (int i = 0; i < n; i++) {
if (arr[i] == i) {
return i;
}
}
return -1;
}
| int main() {
int arr1[] = {-10, -1, 0, 3, 10, 11, 30, 50, 100};
int arr2[] = {1, 2, 3, 4, 5, 6, 7, 8};
int arr3[] = {0, 2, 5, 8, 17};
assert(func0(arr1, 9) == 3);
assert(func0(arr2, 8) == -1);
assert(func0(arr3, 5) == 0);
return 0;
}
| O3 | c | func0:
endbr64
test %esi,%esi
jle 1290 <func0+0x30>
lea -0x1(%rsi),%ecx
xor %eax,%eax
jmp 127c <func0+0x1c>
lea 0x1(%rax),%rdx
cmp %rcx,%rax
je 1290 <func0+0x30>
mov %rdx,%rax
mov %eax,%r8d
cmp %eax,(%rdi,%rax,4)
jne 1270 <func0+0x10>
mov %r8d,%eax
retq
nopl 0x0(%rax,%rax,1)
mov... | func0:
endbr64
test esi, esi
jle short loc_1160
movsxd rsi, esi
xor eax, eax
jmp short loc_1159
loc_1150:
add rax, 1
cmp rax, rsi
jz short loc_1160
loc_1159:
cmp [rdi+rax*4], eax
jnz short loc_1150
retn
loc_1160:
mov eax, 0FFFFFFFFh
retn | long long func0(long long a1, int a2)
{
long long result; // rax
if ( a2 <= 0 )
return 0xFFFFFFFFLL;
result = 0LL;
while ( *(_DWORD *)(a1 + 4 * result) != (_DWORD)result )
{
if ( ++result == a2 )
return 0xFFFFFFFFLL;
}
return result;
} | func0:
ENDBR64
TEST ESI,ESI
JLE 0x00101160
MOVSXD RSI,ESI
XOR EAX,EAX
JMP 0x00101159
LAB_00101150:
ADD RAX,0x1
CMP RAX,RSI
JZ 0x00101160
LAB_00101159:
CMP dword ptr [RDI + RAX*0x4],EAX
JNZ 0x00101150
RET
LAB_00101160:
MOV EAX,0xffffffff
RET | long func0(long param_1,int param_2)
{
long lVar1;
if (0 < param_2) {
lVar1 = 0;
do {
if (*(int *)(param_1 + lVar1 * 4) == (int)lVar1) {
return lVar1;
}
lVar1 = lVar1 + 1;
} while (lVar1 != param_2);
}
return 0xffffffff;
} |
7,528 | func0 |
#include <stdio.h>
#include <string.h>
#include <assert.h>
| int func0(int num) {
char num_str[12], rev_str[12];
for (int x = num-1; x > 0; x--) {
sprintf(num_str, "%d", x);
strcpy(rev_str, num_str);
int len = strlen(rev_str);
char temp;
for(int i = 0;i<len/2;i++){
temp = rev_str[i];
rev_str[i] = re... | int main() {
assert(func0(99) == 88);
assert(func0(1221) == 1111);
assert(func0(120) == 111);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x40,%rsp
mov %edi,-0x34(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
mov -0x34(%rbp),%eax
sub $0x1,%eax
mov %eax,-0x2c(%rbp)
jmpq 12c9 <func0+0xe0>
mov -0x2c(%rbp),%edx
lea -0x20(%rbp),%rax
lea 0xde5(%rip),%rsi
mov %rax... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_34], edi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov eax, [rbp+var_34]
sub eax, 1
mov [rbp+var_2C], eax
jmp loc_12CC
loc_1215:
mov edx, [rbp+var_2C]
lea rax, [rbp+s]
lea rcx, format; "%d"
mov ... | long long func0(int a1)
{
char v2; // [rsp+13h] [rbp-2Dh]
int i; // [rsp+14h] [rbp-2Ch]
int j; // [rsp+18h] [rbp-28h]
int v5; // [rsp+1Ch] [rbp-24h]
char s[12]; // [rsp+20h] [rbp-20h] BYREF
char dest[12]; // [rsp+2Ch] [rbp-14h] BYREF
unsigned long long v8; // [rsp+38h] [rbp-8h]
v8 = __readfsqword(0x28... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV dword ptr [RBP + -0x34],EDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOV EAX,dword ptr [RBP + -0x34]
SUB EAX,0x1
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x001012cc
LAB_00101215:
MOV EDX,dword ptr [RBP + -0x2c]
LEA RAX,[RBP + -0x20]
LEA RCX,[... | uint func0(int param_1)
{
char cVar1;
int iVar2;
size_t sVar3;
long in_FS_OFFSET;
uint local_34;
int local_30;
char local_28 [12];
char local_1c [12];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
for (local_34 = param_1 - 1; 0 < (int)local_34; local_34 = local_34 - 1) {
sprint... |
7,529 | func0 |
#include <stdio.h>
#include <string.h>
#include <assert.h>
| int func0(int num) {
char num_str[12], rev_str[12];
for (int x = num-1; x > 0; x--) {
sprintf(num_str, "%d", x);
strcpy(rev_str, num_str);
int len = strlen(rev_str);
char temp;
for(int i = 0;i<len/2;i++){
temp = rev_str[i];
rev_str[i] = re... | int main() {
assert(func0(99) == 88);
assert(func0(1221) == 1111);
assert(func0(120) == 111);
return 0;
}
| O1 | c | func0:
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x28,%rsp
mov %fs:0x28,%rax
mov %rax,0x18(%rsp)
xor %eax,%eax
lea -0x1(%rdi),%ebx
test %ebx,%ebx
jle 12ab <func0+0xe2>
mov %rsp,%r12
lea 0xc(%rsp),%rbp
mov $0xffffffffffffffff,%r13
jmp 121f <func0+0x56>
mov %rbp,%rsi
... | func0:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 28h
mov rax, fs:28h
mov [rsp+48h+var_30], rax
xor eax, eax
lea ebx, [rdi-1]
test ebx, ebx
jle loc_12B4
mov r12, rsp
lea r13, unk_2004
lea rbp, [rsp+48h+var_3C]
jmp short loc_123B
loc_1223:
mov rsi, rbp... | long long func0(int a1)
{
unsigned int v1; // ebx
int v2; // eax
int v3; // r8d
char *v4; // rdx
_BYTE *v5; // rax
int v6; // ecx
char v7; // si
_BYTE v9[12]; // [rsp+0h] [rbp-48h] BYREF
_BYTE v10[12]; // [rsp+Ch] [rbp-3Ch] BYREF
unsigned long long v11; // [rsp+18h] [rbp-30h]
v11 = __readfsqword... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x28
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x18],RAX
XOR EAX,EAX
LEA EBX,[RDI + -0x1]
TEST EBX,EBX
JLE 0x001012b4
MOV R12,RSP
LEA R13,[0x102004]
LEA RBP,[RSP + 0xc]
JMP 0x0010123b
LAB_00101223:
MOV RSI,RBP
MOV RDI,R12
CALL 0x001010d0
TEST EAX,EAX
JZ ... | int func0(int param_1)
{
char cVar1;
int iVar2;
size_t sVar3;
char *pcVar4;
int iVar5;
char *pcVar6;
long in_FS_OFFSET;
char acStack_48 [12];
char local_3c [12];
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
param_1 = param_1 + -1;
if (param_1 < 1) {
param_1 = 0;
}
else... |
7,530 | func0 |
#include <stdio.h>
#include <string.h>
#include <assert.h>
| int func0(int num) {
char num_str[12], rev_str[12];
for (int x = num-1; x > 0; x--) {
sprintf(num_str, "%d", x);
strcpy(rev_str, num_str);
int len = strlen(rev_str);
char temp;
for(int i = 0;i<len/2;i++){
temp = rev_str[i];
rev_str[i] = re... | int main() {
assert(func0(99) == 88);
assert(func0(1221) == 1111);
assert(func0(120) == 111);
return 0;
}
| O2 | c | func0:
endbr64
push %r13
lea -0x1(%rdi),%r13d
push %r12
push %rbp
push %rbx
sub $0x28,%rsp
mov %fs:0x28,%rax
mov %rax,0x18(%rsp)
xor %eax,%eax
mov %rsp,%rbp
lea 0xc(%rsp),%rbx
lea 0xd(%rsp),%r12
test %r13d,%r13d
jle 131f <func0+0xaf>
nopl 0x0(%rax)
lea 0xd55(%rip),%rcx
mov %... | func0:
endbr64
push r14
lea r14d, [rdi-1]
push r13
push r12
push rbp
push rbx
sub rsp, 20h
mov rax, fs:28h
mov [rsp+48h+var_30], rax
xor eax, eax
test r14d, r14d
jle loc_132F
mov rbp, rsp
lea rbx, [rsp+48h+var_3C]
lea r13, [rsp+48h+var_3B]
lea r12, unk_2004
nop ... | long long func0(int a1)
{
unsigned int v1; // r14d
long long v2; // rax
unsigned __int8 *v3; // rdx
long long v4; // rcx
unsigned __int8 *v5; // rax
unsigned __int8 *v6; // rdi
unsigned __int8 v7; // si
_BYTE v9[12]; // [rsp+0h] [rbp-48h] BYREF
_BYTE v10[12]; // [rsp+Ch] [rbp-3Ch] BYREF
unsigned lo... | func0:
ENDBR64
PUSH R14
LEA R14D,[RDI + -0x1]
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x20
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x18],RAX
XOR EAX,EAX
TEST R14D,R14D
JLE 0x0010132f
MOV RBP,RSP
LEA RBX,[RSP + 0xc]
LEA R13,[RSP + 0xd]
LEA R12,[0x102004]
NOP dword ptr [RAX]
LAB_001012b8:
MOV RCX,R12
MOV R8D... | int func0(int param_1)
{
char *__s2;
char cVar1;
int iVar2;
char *pcVar3;
int iVar4;
char *pcVar5;
char *pcVar6;
long in_FS_OFFSET;
char acStack_48 [11];
char acStack_3d [13];
long local_30;
param_1 = param_1 + -1;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
if (0 < param_1) {
__s2 = ... |
7,531 | func0 |
#include <stdio.h>
#include <string.h>
#include <assert.h>
| int func0(int num) {
char num_str[12], rev_str[12];
for (int x = num-1; x > 0; x--) {
sprintf(num_str, "%d", x);
strcpy(rev_str, num_str);
int len = strlen(rev_str);
char temp;
for(int i = 0;i<len/2;i++){
temp = rev_str[i];
rev_str[i] = re... | int main() {
assert(func0(99) == 88);
assert(func0(1221) == 1111);
assert(func0(120) == 111);
return 0;
}
| O3 | c | func0:
endbr64
push %r13
lea -0x1(%rdi),%r13d
push %r12
lea 0xd81(%rip),%r12
push %rbp
push %rbx
sub $0x28,%rsp
mov %fs:0x28,%rax
mov %rax,0x18(%rsp)
xor %eax,%eax
mov %rsp,%rbp
lea 0xc(%rsp),%rbx
test %r13d,%r13d
jg 12ba <func0+0x4a>
jmpq 13b5 <func0+0x145>
nopl 0x0(%rax,%rax,... | func0:
endbr64
push r13
lea r13, unk_2004
push r12
push rbp
push rbx
lea ebx, [rdi-1]
sub rsp, 28h
mov rax, fs:28h
mov [rsp+48h+var_30], rax
xor eax, eax
mov r12, rsp
lea rbp, [rsp+48h+s2]
test ebx, ebx
jg short loc_12B9
jmp loc_13B3
loc_12B0:
sub ebx, 1
jz ... | long long func0(int a1)
{
unsigned int v1; // ebx
long long v2; // rax
int v3; // ecx
char v4; // di
char v5; // di
char v6; // di
char v7; // di
int v8; // eax
char v9; // cl
char v11[12]; // [rsp+0h] [rbp-48h] BYREF
char s2; // [rsp+Ch] [rbp-3Ch] BYREF
char v13; // [rsp+Dh] [rbp-3Bh]
char v... | func0:
ENDBR64
PUSH R13
LEA R13,[0x102004]
PUSH R12
PUSH RBP
PUSH RBX
LEA EBX,[RDI + -0x1]
SUB RSP,0x28
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x18],RAX
XOR EAX,EAX
MOV R12,RSP
LEA RBP,[RSP + 0xc]
TEST EBX,EBX
JG 0x001012b9
JMP 0x001013b3
LAB_001012b0:
SUB EBX,0x1
JZ 0x001013b3
LAB_001012b9:
MOV RCX,R13
MOV R... | int func0(int param_1)
{
char cVar1;
int iVar2;
int iVar3;
long in_FS_OFFSET;
char acStack_48 [12];
char local_3c [4];
char local_38;
long local_30;
param_1 = param_1 + -1;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
if (0 < param_1) {
do {
__sprintf_chk(acStack_48,2,0xc,&DAT_00102004... |
7,532 | func0 |
#include <stdbool.h>
#include <assert.h>
#include <time.h>
| bool func0(int m, int d, int y) {
struct tm time;
time.tm_year = y - 1900; // Year since 1900
time.tm_mon = m - 1; // Month since January, [0, 11]
time.tm_mday = d; // Day of the month, [1, 31]
time.tm_hour = 0;
time.tm_min = 0;
time.tm_sec = 0;
time.tm_isdst =... | int main() {
assert(func0(11,11,2002) == true);
assert(func0(13,11,2002) == false);
assert(func0(11,11,2002) == true);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x50,%rsp
mov %edi,-0x44(%rbp)
mov %esi,-0x48(%rbp)
mov %edx,-0x4c(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
mov -0x4c(%rbp),%eax
sub $0x76c,%eax
mov %eax,-0x2c(%rbp)
mov -0x44(%rbp),%eax
sub $0x1,%eax
mov %eax,-0x30... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_44], edi
mov [rbp+var_48], esi
mov [rbp+var_4C], edx
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov eax, [rbp+var_4C]
sub eax, 76Ch
mov [rbp+tp.tm_year], eax
mov eax, [rbp+var_44]
sub eax, 1
mov ... | _BOOL8 func0(int a1, int a2, int a3)
{
tm tp; // [rsp+10h] [rbp-40h] BYREF
unsigned long long v6; // [rsp+48h] [rbp-8h]
v6 = __readfsqword(0x28u);
tp.tm_year = a3 - 1900;
tp.tm_mon = a1 - 1;
tp.tm_mday = a2;
tp.tm_hour = 0;
tp.tm_min = 0;
tp.tm_sec = 0;
tp.tm_isdst = -1;
if ( mktime(&tp) == -1 )... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV dword ptr [RBP + -0x44],EDI
MOV dword ptr [RBP + -0x48],ESI
MOV dword ptr [RBP + -0x4c],EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOV EAX,dword ptr [RBP + -0x4c]
SUB EAX,0x76c
MOV dword ptr [RBP + -0x2c],EAX
MOV EAX,dword ptr [RBP + -... | int8 func0(int param_1,int param_2,int param_3)
{
time_t tVar1;
int8 uVar2;
long in_FS_OFFSET;
tm local_48;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_48.tm_year = param_3 + -0x76c;
local_48.tm_mon = param_1 + -1;
local_48.tm_hour = 0;
local_48.tm_min = 0;
local_48.tm_sec ... |
7,533 | func0 |
#include <stdbool.h>
#include <assert.h>
#include <time.h>
| bool func0(int m, int d, int y) {
struct tm time;
time.tm_year = y - 1900; // Year since 1900
time.tm_mon = m - 1; // Month since January, [0, 11]
time.tm_mday = d; // Day of the month, [1, 31]
time.tm_hour = 0;
time.tm_min = 0;
time.tm_sec = 0;
time.tm_isdst =... | int main() {
assert(func0(11,11,2002) == true);
assert(func0(13,11,2002) == false);
assert(func0(11,11,2002) == true);
return 0;
}
| O1 | c | func0:
endbr64
push %r12
push %rbp
push %rbx
sub $0x40,%rsp
mov %edi,%ebp
mov %esi,%r12d
mov %edx,%ebx
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
lea -0x76c(%rdx),%eax
mov %eax,0x14(%rsp)
lea -0x1(%rdi),%eax
mov %eax,0x10(%rsp)
mov %esi,0xc(%rsp)
movl $0x0,0x8(%rsp)
... | func0:
endbr64
push r12
push rbp
push rbx
sub rsp, 40h
mov ebp, edi
mov r12d, esi
mov ebx, edx
mov rax, fs:28h
mov [rsp+58h+var_20], rax
xor eax, eax
lea eax, [rdx-76Ch]
mov [rsp+58h+var_44], eax
lea eax, [rdi-1]
mov [rsp+58h+var_48], eax
mov [rsp+58h+var_4C], es... | bool func0(int a1, int a2, int a3)
{
long long v4; // rdx
bool result; // al
_DWORD v6[3]; // [rsp+0h] [rbp-58h] BYREF
int v7; // [rsp+Ch] [rbp-4Ch]
int v8; // [rsp+10h] [rbp-48h]
int v9; // [rsp+14h] [rbp-44h]
int v10; // [rsp+20h] [rbp-38h]
unsigned long long v11; // [rsp+38h] [rbp-20h]
v11 = __re... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x40
MOV EBP,EDI
MOV R12D,ESI
MOV EBX,EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
LEA EAX,[RDX + -0x76c]
MOV dword ptr [RSP + 0x14],EAX
LEA EAX,[RDI + -0x1]
MOV dword ptr [RSP + 0x10],EAX
MOV dword ptr [RSP + 0xc],ESI
MOV dword ptr [RSP + ... | bool func0(int param_1,int param_2,int param_3)
{
time_t tVar1;
long in_FS_OFFSET;
bool bVar2;
tm local_58;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_58.tm_year = param_3 + -0x76c;
local_58.tm_mon = param_1 + -1;
local_58.tm_hour = 0;
local_58.tm_min = 0;
local_58.tm_sec ... |
7,534 | func0 |
#include <stdbool.h>
#include <assert.h>
#include <time.h>
| bool func0(int m, int d, int y) {
struct tm time;
time.tm_year = y - 1900; // Year since 1900
time.tm_mon = m - 1; // Month since January, [0, 11]
time.tm_mday = d; // Day of the month, [1, 31]
time.tm_hour = 0;
time.tm_min = 0;
time.tm_sec = 0;
time.tm_isdst =... | int main() {
assert(func0(11,11,2002) == true);
assert(func0(13,11,2002) == false);
assert(func0(11,11,2002) == true);
return 0;
}
| O2 | c | func0:
endbr64
push %r12
mov %esi,%r12d
push %rbp
mov %edi,%ebp
push %rbx
mov %edx,%ebx
sub $0x40,%rsp
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
lea -0x76c(%rdx),%eax
mov %esi,0xc(%rsp)
mov %eax,0x14(%rsp)
lea -0x1(%rdi),%eax
mov %rsp,%rdi
mov %eax,0x10(%rsp)
movq ... | func0:
endbr64
push r12
mov r12d, esi
push rbp
mov ebp, edi
push rbx
mov ebx, edx
sub rsp, 40h
mov rax, fs:28h
mov [rsp+58h+var_20], rax
xor eax, eax
lea eax, [rdx-76Ch]
mov [rsp+58h+var_4C], esi
mov [rsp+58h+var_44], eax
lea eax, [rdi-1]
mov rdi, rsp
mov [rs... | long long func0(int a1, int a2, int a3)
{
long long v4; // rax
unsigned int v5; // r8d
long long v7; // [rsp+0h] [rbp-58h] BYREF
int v8; // [rsp+8h] [rbp-50h]
int v9; // [rsp+Ch] [rbp-4Ch]
int v10; // [rsp+10h] [rbp-48h]
int v11; // [rsp+14h] [rbp-44h]
int v12; // [rsp+20h] [rbp-38h]
unsigned long lo... | func0:
ENDBR64
PUSH R12
MOV R12D,ESI
PUSH RBP
MOV EBP,EDI
PUSH RBX
MOV EBX,EDX
SUB RSP,0x40
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
LEA EAX,[RDX + -0x76c]
MOV dword ptr [RSP + 0xc],ESI
MOV dword ptr [RSP + 0x14],EAX
LEA EAX,[RDI + -0x1]
MOV RDI,RSP
MOV dword ptr [RSP + 0x10],EAX
MOV qword... | bool func0(int param_1,int param_2,int param_3)
{
time_t tVar1;
long in_FS_OFFSET;
bool bVar2;
tm local_58;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_58.tm_year = param_3 + -0x76c;
local_58.tm_mon = param_1 + -1;
local_58.tm_sec = 0;
local_58.tm_min = 0;
local_58.tm_hour ... |
7,535 | func0 |
#include <stdbool.h>
#include <assert.h>
#include <time.h>
| bool func0(int m, int d, int y) {
struct tm time;
time.tm_year = y - 1900; // Year since 1900
time.tm_mon = m - 1; // Month since January, [0, 11]
time.tm_mday = d; // Day of the month, [1, 31]
time.tm_hour = 0;
time.tm_min = 0;
time.tm_sec = 0;
time.tm_isdst =... | int main() {
assert(func0(11,11,2002) == true);
assert(func0(13,11,2002) == false);
assert(func0(11,11,2002) == true);
return 0;
}
| O3 | c | func0:
endbr64
push %r12
mov %esi,%r12d
push %rbp
mov %edi,%ebp
push %rbx
mov %edx,%ebx
sub $0x40,%rsp
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
lea -0x76c(%rdx),%eax
mov %esi,0xc(%rsp)
mov %eax,0x14(%rsp)
lea -0x1(%rdi),%eax
mov %rsp,%rdi
mov %eax,0x10(%rsp)
movq ... | func0:
endbr64
push r12
mov r12d, esi
push rbp
mov ebp, edi
push rbx
mov ebx, edx
sub rsp, 40h
mov rax, fs:28h
mov [rsp+58h+var_20], rax
xor eax, eax
lea eax, [rdx-76Ch]
mov [rsp+58h+var_4C], esi
mov [rsp+58h+var_44], eax
lea eax, [rdi-1]
mov rdi, rsp; tp
mov ... | long long func0(int a1, int a2, int a3)
{
time_t v4; // rax
unsigned int v5; // edx
struct tm v7; // [rsp+0h] [rbp-58h] BYREF
unsigned long long v8; // [rsp+38h] [rbp-20h]
v8 = __readfsqword(0x28u);
v7.tm_mday = a2;
v7.tm_year = a3 - 1900;
v7.tm_mon = a1 - 1;
v7.tm_hour = 0;
*(_QWORD *)&v7.tm_sec ... | func0:
ENDBR64
PUSH R12
MOV R12D,ESI
PUSH RBP
MOV EBP,EDI
PUSH RBX
MOV EBX,EDX
SUB RSP,0x40
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
LEA EAX,[RDX + -0x76c]
MOV dword ptr [RSP + 0xc],ESI
MOV dword ptr [RSP + 0x14],EAX
LEA EAX,[RDI + -0x1]
MOV RDI,RSP
MOV dword ptr [RSP + 0x10],EAX
MOV dword... | bool func0(int param_1,int param_2,int param_3)
{
time_t tVar1;
long in_FS_OFFSET;
bool bVar2;
tm local_58;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_58.tm_year = param_3 + -0x76c;
local_58.tm_mon = param_1 + -1;
local_58.tm_hour = 0;
local_58.tm_sec = 0;
local_58.tm_min ... |
7,536 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int nums[], int size) {
int i, j, temp;
if (size < 3) { return -1; }
// Sorting nums array descending
for (i = 0; i < size - 1; i++) {
for (j = i + 1; j < size; j++) {
if (nums[i] < nums[j]) {
temp = nums[i];
nums[i] = nums[j];
... | int main() {
int arr1[] = {12, 74, 9, 50, 61, 41};
int size1 = sizeof(arr1) / sizeof(arr1[0]);
assert(func0(arr1, size1) == 225700);
int arr2[] = {25, 35, 22, 85, 14, 65, 75, 25, 58};
int size2 = sizeof(arr2) / sizeof(arr2[0]);
assert(func0(arr2, size2) == 414375);
int arr3[] = {1... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x38(%rbp)
mov %esi,-0x3c(%rbp)
cmpl $0x2,-0x3c(%rbp)
jg 1188 <func0+0x1f>
mov $0xffffffff,%eax
jmpq 12cd <func0+0x164>
movl $0x0,-0x28(%rbp)
jmpq 1245 <func0+0xdc>
mov -0x28(%rbp),%eax
add $0x1,%eax
mov %eax,-0x24(%rbp)
jmpq 1235 <fu... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_38], rdi
mov [rbp+var_3C], esi
cmp [rbp+var_3C], 2
jg short loc_1188
mov eax, 0FFFFFFFFh
jmp loc_12CE
loc_1188:
mov [rbp+var_28], 0
jmp loc_1245
loc_1194:
mov eax, [rbp+var_28]
add eax, 1
mov [rbp+var_24], eax
jmp ... | long long func0(_DWORD *a1, int a2)
{
long long result; // rax
int v3; // edx
int i; // [rsp+14h] [rbp-28h]
int j; // [rsp+18h] [rbp-24h]
int v6; // [rsp+38h] [rbp-4h]
if ( a2 <= 2 )
return 0xFFFFFFFFLL;
for ( i = 0; i < a2 - 1; ++i )
{
for ( j = i + 1; j < a2; ++j )
{
if ( a1[i] < a... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x38],RDI
MOV dword ptr [RBP + -0x3c],ESI
CMP dword ptr [RBP + -0x3c],0x2
JG 0x00101188
MOV EAX,0xffffffff
JMP 0x001012ce
LAB_00101188:
MOV dword ptr [RBP + -0x28],0x0
JMP 0x00101245
LAB_00101194:
MOV EAX,dword ptr [RBP + -0x28]
ADD EAX,0x1
MOV dword ptr [RBP + ... | int func0(int *param_1,int param_2)
{
int iVar1;
int iVar2;
int local_30;
int local_2c;
if (param_2 < 3) {
iVar1 = -1;
}
else {
for (local_30 = 0; local_2c = local_30, local_30 < param_2 + -1; local_30 = local_30 + 1) {
while (local_2c = local_2c + 1, local_2c < param_2) {
if (pa... |
7,537 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int nums[], int size) {
int i, j, temp;
if (size < 3) { return -1; }
// Sorting nums array descending
for (i = 0; i < size - 1; i++) {
for (j = i + 1; j < size; j++) {
if (nums[i] < nums[j]) {
temp = nums[i];
nums[i] = nums[j];
... | int main() {
int arr1[] = {12, 74, 9, 50, 61, 41};
int size1 = sizeof(arr1) / sizeof(arr1[0]);
assert(func0(arr1, size1) == 225700);
int arr2[] = {25, 35, 22, 85, 14, 65, 75, 25, 58};
int size2 = sizeof(arr2) / sizeof(arr2[0]);
assert(func0(arr2, size2) == 414375);
int arr3[] = {1... | O1 | c | func0:
endbr64
cmp $0x2,%esi
jle 11d5 <func0+0x6c>
mov %rdi,%r8
lea -0x2(%rsi),%r10d
add $0x2,%r10
mov $0x1,%r9d
jmp 11ac <func0+0x43>
add $0x1,%rax
cmp %eax,%esi
jle 119f <func0+0x36>
mov (%r8),%edx
mov (%rdi,%rax,4),%ecx
cmp %ecx,%edx
jge 1185 <func0+0x1c>
mov %ecx,(%r8)
m... | func0:
endbr64
cmp esi, 2
jle short loc_11F1
push rbp
push rbx
mov r10, rdi
lea rdi, [rdi+4]
mov r11d, esi
mov r9d, 1
lea ebp, [rsi-1]
lea rbx, [r10+8]
jmp short loc_11B3
loc_118D:
add rax, 4
cmp rax, r8
jz short loc_11A6
loc_1196:
mov edx, [rdi-4]
mov ecx,... | long long func0(_DWORD *a1, int a2)
{
_DWORD *v3; // rdi
long long i; // r9
_DWORD *v5; // rax
int v6; // edx
int v7; // edx
long long result; // rax
if ( a2 <= 2 )
return 0xFFFFFFFFLL;
v3 = a1 + 1;
for ( i = 1LL; i != a2; ++i )
{
if ( a2 > (int)i )
{
v5 = v3;
do
{
... | func0:
ENDBR64
CMP ESI,0x2
JLE 0x001011f1
PUSH RBP
PUSH RBX
MOV R10,RDI
LEA RDI,[RDI + 0x4]
MOV R11D,ESI
MOV R9D,0x1
LEA EBP,[RSI + -0x1]
LEA RBX,[R10 + 0x8]
JMP 0x001011b3
LAB_0010118d:
ADD RAX,0x4
CMP RAX,R8
JZ 0x001011a6
LAB_00101196:
MOV EDX,dword ptr [RDI + -0x4]
MOV ECX,dword ptr [RAX]
CMP EDX,ECX
JGE 0x0010118d
... | int func0(int *param_1,uint param_2)
{
int iVar1;
int *piVar2;
int iVar3;
int *piVar4;
ulong uVar5;
if (2 < (int)param_2) {
piVar4 = param_1 + 1;
uVar5 = 1;
do {
if ((int)uVar5 < (int)param_2) {
piVar2 = piVar4;
do {
iVar1 = piVar4[-1];
if (iVar1 < *... |
7,538 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int nums[], int size) {
int i, j, temp;
if (size < 3) { return -1; }
// Sorting nums array descending
for (i = 0; i < size - 1; i++) {
for (j = i + 1; j < size; j++) {
if (nums[i] < nums[j]) {
temp = nums[i];
nums[i] = nums[j];
... | int main() {
int arr1[] = {12, 74, 9, 50, 61, 41};
int size1 = sizeof(arr1) / sizeof(arr1[0]);
assert(func0(arr1, size1) == 225700);
int arr2[] = {25, 35, 22, 85, 14, 65, 75, 25, 58};
int size2 = sizeof(arr2) / sizeof(arr2[0]);
assert(func0(arr2, size2) == 414375);
int arr3[] = {1... | O2 | c | func0:
endbr64
cmp $0x2,%esi
jle 13a0 <func0+0x10>
jmp 1320 <func0.part.0>
nopl 0x0(%rax,%rax,1)
mov $0xffffffff,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
| func0_part_0:
push rbp
lea r11d, [rsi-1]
xor r10d, r10d
xor r9d, r9d
push rbx
mov rbx, rdi
lea rdi, [rdi+4]
lea rbp, [rbx+8]
nop word ptr [rax+rax+00000000h]
loc_1340:
add r9d, 1
cmp r9d, esi
jge short loc_1377
mov eax, r11d
sub eax, r9d
add rax, r10
lea r8,... | long long func0_part_0(_DWORD *a1, int a2)
{
int v2; // r11d
long long v3; // r10
int v4; // r9d
_DWORD *v6; // rdi
_DWORD *v7; // rax
int v8; // edx
int v9; // edx
long long result; // rax
v2 = a2 - 1;
v3 = 0LL;
v4 = 0;
v6 = a1 + 1;
do
{
if ( ++v4 < a2 )
{
v7 = v6;
do
... | func0.part.0:
PUSH RBP
LEA R11D,[RSI + -0x1]
XOR R10D,R10D
XOR R9D,R9D
PUSH RBX
MOV RBX,RDI
LEA RDI,[RDI + 0x4]
LEA RBP,[RBX + 0x8]
NOP word ptr [RAX + RAX*0x1]
LAB_00101340:
ADD R9D,0x1
CMP R9D,ESI
JGE 0x00101377
MOV EAX,R11D
SUB EAX,R9D
ADD RAX,R10
LEA R8,[RBP + RAX*0x4]
MOV RAX,RDI
NOP word ptr [RAX + RAX*0x1]
LAB_0... | int func0_part_0(int *param_1,int param_2)
{
int *piVar1;
int iVar2;
int *piVar3;
int iVar4;
long lVar5;
lVar5 = 0;
iVar4 = 0;
piVar3 = param_1 + 1;
do {
iVar4 = iVar4 + 1;
if (iVar4 < param_2) {
piVar1 = piVar3;
do {
iVar2 = piVar3[-1];
if (iVar2 < *piVar1) {
... |
7,539 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int nums[], int size) {
int i, j, temp;
if (size < 3) { return -1; }
// Sorting nums array descending
for (i = 0; i < size - 1; i++) {
for (j = i + 1; j < size; j++) {
if (nums[i] < nums[j]) {
temp = nums[i];
nums[i] = nums[j];
... | int main() {
int arr1[] = {12, 74, 9, 50, 61, 41};
int size1 = sizeof(arr1) / sizeof(arr1[0]);
assert(func0(arr1, size1) == 225700);
int arr2[] = {25, 35, 22, 85, 14, 65, 75, 25, 58};
int size2 = sizeof(arr2) / sizeof(arr2[0]);
assert(func0(arr2, size2) == 414375);
int arr3[] = {1... | O3 | c | func0:
endbr64
cmp $0x2,%esi
jle 13b4 <func0+0x74>
lea -0x2(%rsi),%r10d
mov %rdi,%r8
mov $0x1,%r9d
add $0x2,%r10
nopw 0x0(%rax,%rax,1)
cmp %r9d,%esi
jle 1388 <func0+0x48>
mov %r9,%rax
nopl 0x0(%rax,%rax,1)
mov (%r8),%edx
mov (%rdi,%rax,4),%ecx
cmp %ecx,%edx
jge 1380 <func0+0x4... | func0_part_0:
push rbp
mov r10, rdi
push rbx
cmp esi, 1
jle short loc_1324
lea rdi, [rdi+4]
mov r11d, esi
lea ebp, [rsi-1]
mov r9d, 1
lea rbx, [r10+8]
xchg ax, ax
loc_12E0:
cmp esi, r9d
jle short loc_1317
mov eax, ebp
sub eax, r9d
lea rax, [r9+rax-1]
lea ... | long long func0_part_0(_DWORD *a1, int a2)
{
_DWORD *v3; // rdi
long long i; // r9
_DWORD *v5; // rax
int v6; // edx
int v7; // edx
long long result; // rax
if ( a2 > 1 )
{
v3 = a1 + 1;
for ( i = 1LL; i != a2; ++i )
{
if ( a2 > (int)i )
{
v5 = v3;
do
{
... | func0.part.0:
PUSH RBP
MOV R10,RDI
PUSH RBX
CMP ESI,0x1
JLE 0x00101324
LEA RDI,[RDI + 0x4]
MOV R11D,ESI
LEA EBP,[RSI + -0x1]
MOV R9D,0x1
LEA RBX,[R10 + 0x8]
NOP
LAB_001012e0:
CMP ESI,R9D
JLE 0x00101317
MOV EAX,EBP
SUB EAX,R9D
LEA RAX,[R9 + RAX*0x1 + -0x1]
LEA R8,[RBX + RAX*0x4]
MOV RAX,RDI
NOP word ptr CS:[RAX + RAX*0x... | int func0_part_0(int *param_1,uint param_2)
{
int iVar1;
int *piVar2;
int iVar3;
int *piVar4;
ulong uVar5;
if (1 < (int)param_2) {
piVar4 = param_1 + 1;
uVar5 = 1;
do {
if ((int)uVar5 < (int)param_2) {
piVar2 = piVar4;
do {
iVar1 = piVar4[-1];
if (iV... |
7,540 | func0 |
#include <stdio.h>
#include <assert.h>
int binomial_coeff(int n, int k) {
int C[n + 1][k + 1];
for (int i = 0; i <= n; i++) {
for (int j = 0; j <= (i < k ? i : k); j++) {
if (j == 0 || j == i) {
C[i][j] = 1;
} else {
C[i][j] = C[i - 1]... | int func0(int n, int m) {
int numerator = (2 * m + 1) * binomial_coeff(2 * n, m + n);
int denominator = m + n + 1;
return numerator / denominator;
}
| int main() {
assert(func0(5, 3) == 35);
assert(func0(3, 2) == 5);
assert(func0(4, 2) == 20);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x28,%rsp
mov %edi,-0x24(%rbp)
mov %esi,-0x28(%rbp)
mov -0x28(%rbp),%eax
add %eax,%eax
lea 0x1(%rax),%ebx
mov -0x28(%rbp),%edx
mov -0x24(%rbp),%eax
add %eax,%edx
mov -0x24(%rbp),%eax
add %eax,%eax
mov %edx,%esi
mov %eax,... | func0:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 28h
mov [rbp+var_24], edi
mov [rbp+var_28], esi
mov eax, [rbp+var_28]
add eax, eax
lea ebx, [rax+1]
mov edx, [rbp+var_28]
mov eax, [rbp+var_24]
add edx, eax
mov eax, [rbp+var_24]
add eax, eax
mov esi, edx
mo... | long long func0(int a1, int a2)
{
return (unsigned int)((int)((2 * a2 + 1) * binomial_coeff((unsigned int)(2 * a1), (unsigned int)(a1 + a2)))
/ (a2 + a1 + 1));
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x28
MOV dword ptr [RBP + -0x24],EDI
MOV dword ptr [RBP + -0x28],ESI
MOV EAX,dword ptr [RBP + -0x28]
ADD EAX,EAX
LEA EBX,[RAX + 0x1]
MOV EDX,dword ptr [RBP + -0x28]
MOV EAX,dword ptr [RBP + -0x24]
ADD EDX,EAX
MOV EAX,dword ptr [RBP + -0x24]
ADD EAX,EAX
MOV ESI,EDX
MO... | int [16] func0(int param_1,int param_2)
{
long lVar1;
long lVar2;
int iVar3;
int auVar4 [16];
iVar3 = binomial_coeff(param_1 * 2,param_2 + param_1);
lVar1 = (long)(param_1 + param_2 + 1);
lVar2 = (long)(iVar3 * (param_2 * 2 + 1));
auVar4._0_8_ = lVar2 / lVar1 & 0xffffffff;
auVar4._8_8_ = lVar2 % ... |
7,541 | func0 |
#include <stdio.h>
#include <assert.h>
int binomial_coeff(int n, int k) {
int C[n + 1][k + 1];
for (int i = 0; i <= n; i++) {
for (int j = 0; j <= (i < k ? i : k); j++) {
if (j == 0 || j == i) {
C[i][j] = 1;
} else {
C[i][j] = C[i - 1]... | int func0(int n, int m) {
int numerator = (2 * m + 1) * binomial_coeff(2 * n, m + n);
int denominator = m + n + 1;
return numerator / denominator;
}
| int main() {
assert(func0(5, 3) == 35);
assert(func0(3, 2) == 5);
assert(func0(4, 2) == 20);
return 0;
}
| O1 | c | func0:
endbr64
push %rbp
push %rbx
sub $0x8,%rsp
mov %esi,%ebp
lea (%rsi,%rdi,1),%ebx
add %edi,%edi
mov %ebx,%esi
callq 1169 <binomial_coeff>
mov %eax,%edx
lea 0x1(%rbp,%rbp,1),%eax
imul %edx,%eax
add $0x1,%ebx
cltd
idiv %ebx
add $0x8,%rsp
pop %rbx
pop %rbp
retq
| func0:
endbr64
push rbp
push rbx
sub rsp, 8
mov ebp, esi
lea ebx, [rsi+rdi]
add edi, edi
mov esi, ebx
call binomial_coeff
mov edx, eax
lea eax, [rbp+rbp+1]
imul eax, edx
add ebx, 1
cdq
idiv ebx
add rsp, 8
pop rbx
pop rbp
retn | long long func0(int a1, int a2)
{
return (unsigned int)((int)(binomial_coeff((unsigned int)(2 * a1), (unsigned int)(a2 + a1)) * (2 * a2 + 1))
/ (a2 + a1 + 1));
} | func0:
ENDBR64
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV EBP,ESI
LEA EBX,[RSI + RDI*0x1]
ADD EDI,EDI
MOV ESI,EBX
CALL 0x00101169
MOV EDX,EAX
LEA EAX,[RBP + RBP*0x1 + 0x1]
IMUL EAX,EDX
ADD EBX,0x1
CDQ
IDIV EBX
ADD RSP,0x8
POP RBX
POP RBP
RET | int1 [16] func0(int param_1,int param_2)
{
long lVar1;
long lVar2;
int iVar3;
int1 auVar4 [16];
iVar3 = binomial_coeff(param_1 * 2,param_2 + param_1);
lVar1 = (long)(param_2 + param_1 + 1);
lVar2 = (long)((param_2 * 2 + 1) * iVar3);
auVar4._0_8_ = lVar2 / lVar1 & 0xffffffff;
auVar4._8_8_ = lVar2 ... |
7,542 | func0 |
#include <stdio.h>
#include <assert.h>
int binomial_coeff(int n, int k) {
int C[n + 1][k + 1];
for (int i = 0; i <= n; i++) {
for (int j = 0; j <= (i < k ? i : k); j++) {
if (j == 0 || j == i) {
C[i][j] = 1;
} else {
C[i][j] = C[i - 1]... | int func0(int n, int m) {
int numerator = (2 * m + 1) * binomial_coeff(2 * n, m + n);
int denominator = m + n + 1;
return numerator / denominator;
}
| int main() {
assert(func0(5, 3) == 35);
assert(func0(3, 2) == 5);
assert(func0(4, 2) == 20);
return 0;
}
| O2 | c | func0:
endbr64
push %rbp
mov %esi,%ebp
push %rbx
lea (%rsi,%rdi,1),%ebx
add %edi,%edi
mov %ebx,%esi
add $0x1,%ebx
sub $0x8,%rsp
callq 1240 <binomial_coeff>
add $0x8,%rsp
mov %eax,%r8d
lea 0x1(%rbp,%rbp,1),%eax
imul %r8d,%eax
cltd
idiv %ebx
pop %rbx
pop %rbp
retq
| func0:
endbr64
push rbp
mov ebp, esi
push rbx
lea ebx, [rsi+rdi]
add edi, edi
mov esi, ebx
add ebx, 1
sub rsp, 8
call binomial_coeff
add rsp, 8
mov r8d, eax
lea eax, [rbp+rbp+1]
imul eax, r8d
cdq
idiv ebx
pop rbx
pop rbp
retn | long long func0(int a1, int a2)
{
return (unsigned int)((int)(binomial_coeff((unsigned int)(2 * a1), (unsigned int)(a2 + a1)) * (2 * a2 + 1))
/ (a2 + a1 + 1));
} | func0:
ENDBR64
PUSH RBP
MOV EBP,ESI
PUSH RBX
LEA EBX,[RSI + RDI*0x1]
ADD EDI,EDI
MOV ESI,EBX
ADD EBX,0x1
SUB RSP,0x8
CALL 0x00101240
ADD RSP,0x8
MOV R8D,EAX
LEA EAX,[RBP + RBP*0x1 + 0x1]
IMUL EAX,R8D
CDQ
IDIV EBX
POP RBX
POP RBP
RET | int1 [16] func0(int param_1,int param_2)
{
long lVar1;
long lVar2;
int iVar3;
int1 auVar4 [16];
iVar3 = binomial_coeff(param_1 * 2,param_2 + param_1);
lVar1 = (long)(param_2 + param_1 + 1);
lVar2 = (long)((param_2 * 2 + 1) * iVar3);
auVar4._0_8_ = lVar2 / lVar1 & 0xffffffff;
auVar4._8_8_ = lVar2 ... |
7,543 | func0 |
#include <stdio.h>
#include <assert.h>
int binomial_coeff(int n, int k) {
int C[n + 1][k + 1];
for (int i = 0; i <= n; i++) {
for (int j = 0; j <= (i < k ? i : k); j++) {
if (j == 0 || j == i) {
C[i][j] = 1;
} else {
C[i][j] = C[i - 1]... | int func0(int n, int m) {
int numerator = (2 * m + 1) * binomial_coeff(2 * n, m + n);
int denominator = m + n + 1;
return numerator / denominator;
}
| int main() {
assert(func0(5, 3) == 35);
assert(func0(3, 2) == 5);
assert(func0(4, 2) == 20);
return 0;
}
| O3 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %r15
push %r14
push %r13
push %r12
push %rbx
sub $0x28,%rsp
mov %fs:0x28,%rax
mov %rax,-0x38(%rbp)
xor %eax,%eax
lea 0x1(%rsi,%rsi,1),%eax
add %edi,%esi
add %edi,%edi
lea 0x1(%rsi),%r10d
lea 0x1(%rdi),%edx
mov %rsp,%rbx
movslq %r10... | func0:
endbr64
push rbp
mov ebp, esi
push rbx
lea ebx, [rsi+rdi]
add edi, edi
mov esi, ebx
add ebx, 1
sub rsp, 8
call binomial_coeff
add rsp, 8
mov edx, eax
lea eax, [rbp+rbp+1]
imul eax, edx
cdq
idiv ebx
pop rbx
pop rbp
retn | long long func0(int a1, int a2)
{
return (unsigned int)((int)(binomial_coeff((unsigned int)(2 * a1), (unsigned int)(a2 + a1)) * (2 * a2 + 1))
/ (a2 + a1 + 1));
} | func0:
ENDBR64
PUSH RBP
MOV EBP,ESI
PUSH RBX
LEA EBX,[RSI + RDI*0x1]
ADD EDI,EDI
MOV ESI,EBX
ADD EBX,0x1
SUB RSP,0x8
CALL 0x00101240
ADD RSP,0x8
MOV EDX,EAX
LEA EAX,[RBP + RBP*0x1 + 0x1]
IMUL EAX,EDX
CDQ
IDIV EBX
POP RBX
POP RBP
RET | int [16] func0(int param_1,int param_2)
{
long lVar1;
long lVar2;
int iVar3;
int auVar4 [16];
iVar3 = binomial_coeff(param_1 * 2,param_2 + param_1);
lVar1 = (long)(param_2 + param_1 + 1);
lVar2 = (long)((param_2 * 2 + 1) * iVar3);
auVar4._0_8_ = lVar2 / lVar1 & 0xffffffff;
auVar4._8_8_ = lVar2 % ... |
7,544 | func0 |
#include <stdbool.h>
#include <regex.h>
#include <assert.h>
#include <stdio.h>
| bool func0(const char *string) {
regex_t regex;
int result;
bool match_found;
regcomp(®ex, ".*[0-9]$", 0);
result = regexec(®ex, string, 0, NULL, 0);
match_found = (result == 0);
regfree(®ex);
return match_found;
}
| int main() {
assert(func0("abcdef") == false);
assert(func0("abcdef7") == true);
assert(func0("abc") == false);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x70,%rsp
mov %rdi,-0x68(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
lea -0x50(%rbp),%rax
mov $0x0,%edx
lea 0xe10(%rip),%rsi
mov %rax,%rdi
callq 10c0 <regcomp@plt>
mov -0x68(%rbp),%rsi
lea -0x50(%rbp),%rax
mov $0x0,%r8d
... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+string], rdi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
lea rax, [rbp+preg]
mov edx, 0; cflags
lea rcx, pattern; ".*[0-9]$"
mov rsi, rcx; pattern
mov rdi, rax; preg
call _regcomp
mov rsi, [rbp+string]... | _BOOL8 func0(const char *a1)
{
bool v2; // [rsp+1Bh] [rbp-55h]
regex_t preg; // [rsp+20h] [rbp-50h] BYREF
unsigned long long v4; // [rsp+68h] [rbp-8h]
v4 = __readfsqword(0x28u);
regcomp(&preg, ".*[0-9]$", 0);
v2 = regexec(&preg, a1, 0LL, 0LL, 0) == 0;
regfree(&preg);
return v2;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x68],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x50]
MOV EDX,0x0
LEA RCX,[0x102004]
MOV RSI,RCX
MOV RDI,RAX
CALL 0x001010c0
MOV RSI,qword ptr [RBP + -0x68]
LEA RAX,[RBP + -0x50]
MOV R8D,0x0
MOV ECX,0... | bool func0(char *param_1)
{
int iVar1;
long in_FS_OFFSET;
regex_t local_58;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
regcomp(&local_58,".*[0-9]$",0);
iVar1 = regexec(&local_58,param_1,0,(regmatch_t *)0x0,0);
regfree(&local_58);
if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) {
... |
7,545 | func0 |
#include <stdbool.h>
#include <regex.h>
#include <assert.h>
#include <stdio.h>
| bool func0(const char *string) {
regex_t regex;
int result;
bool match_found;
regcomp(®ex, ".*[0-9]$", 0);
result = regexec(®ex, string, 0, NULL, 0);
match_found = (result == 0);
regfree(®ex);
return match_found;
}
| int main() {
assert(func0("abcdef") == false);
assert(func0("abcdef7") == true);
assert(func0("abc") == false);
return 0;
}
| O1 | c | func0:
endbr64
push %r12
push %rbp
push %rbx
sub $0x50,%rsp
mov %rdi,%rbx
mov $0x28,%r12d
mov %fs:(%r12),%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
mov %rsp,%rbp
mov $0x0,%edx
lea 0xe0b(%rip),%rsi
mov %rbp,%rdi
callq 10c0 <regcomp@plt>
mov $0x0,%r8d
mov $0x0,%ecx
mov $0x0,%edx
... | func0:
endbr64
push rbp
push rbx
sub rsp, 58h
mov rbx, rdi
mov rax, fs:28h
mov [rsp+var_s48], rax
xor eax, eax
mov rbp, rsp
mov edx, 0
lea rsi, a09; ".*[0-9]$"
mov rdi, rbp
call _regcomp
mov r8d, 0
mov ecx, 0
mov edx, 0
mov rsi, rbx
mov rdi, rbp
call _... | bool func0(long long a1)
{
int v1; // ebx
_QWORD _0[13]; // [rsp+0h] [rbp+0h] BYREF
_0[9] = __readfsqword(0x28u);
regcomp(_0, ".*[0-9]$", 0LL);
v1 = regexec(_0, a1, 0LL, 0LL, 0LL);
regfree(_0);
return v1 == 0;
} | ||
7,546 | func0 |
#include <stdbool.h>
#include <regex.h>
#include <assert.h>
#include <stdio.h>
| bool func0(const char *string) {
regex_t regex;
int result;
bool match_found;
regcomp(®ex, ".*[0-9]$", 0);
result = regexec(®ex, string, 0, NULL, 0);
match_found = (result == 0);
regfree(®ex);
return match_found;
}
| int main() {
assert(func0("abcdef") == false);
assert(func0("abcdef7") == true);
assert(func0("abc") == false);
return 0;
}
| O2 | c | func0:
endbr64
push %r12
xor %edx,%edx
mov %rdi,%r12
lea 0xd82(%rip),%rsi
push %rbp
push %rbx
sub $0x50,%rsp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
mov %rsp,%rbp
mov %rbp,%rdi
callq 10c0 <regcomp@plt>
xor %ecx,%ecx
xor %r8d,%r8d
xor %edx,%edx
mov %r12,%rsi
mov ... | func0:
endbr64
push r12
xor edx, edx
mov r12, rdi
lea rsi, a09; ".*[0-9]$"
push rbp
push rbx
sub rsp, 50h
mov rax, fs:28h
mov [rsp+var_s48], rax
xor eax, eax
mov rbp, rsp
mov rdi, rbp
call _regcomp
xor r8d, r8d
xor ecx, ecx
xor edx, edx
mov rsi, r12
mov ... | bool func0(long long a1)
{
int v1; // ebx
_QWORD _0[13]; // [rsp+0h] [rbp+0h] BYREF
_0[9] = __readfsqword(0x28u);
regcomp(_0, ".*[0-9]$", 0LL);
v1 = regexec(_0, a1, 0LL, 0LL, 0LL);
regfree(_0);
return v1 == 0;
} | func0:
ENDBR64
PUSH R12
XOR EDX,EDX
MOV R12,RDI
LEA RSI,[0x102004]
PUSH RBP
PUSH RBX
SUB RSP,0x50
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
MOV RBP,RSP
MOV RDI,RBP
CALL 0x001010c0
XOR R8D,R8D
XOR ECX,ECX
XOR EDX,EDX
MOV RSI,R12
MOV RDI,RBP
CALL 0x001010d0
MOV RDI,RBP
MOV EBX,EAX
CALL 0x0010... | bool func0(char *param_1)
{
int iVar1;
long in_FS_OFFSET;
regex_t rStack_68;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
regcomp(&rStack_68,".*[0-9]$",0);
iVar1 = regexec(&rStack_68,param_1,0,(regmatch_t *)0x0,0);
regfree(&rStack_68);
if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {... |
7,547 | func0 |
#include <stdbool.h>
#include <regex.h>
#include <assert.h>
#include <stdio.h>
| bool func0(const char *string) {
regex_t regex;
int result;
bool match_found;
regcomp(®ex, ".*[0-9]$", 0);
result = regexec(®ex, string, 0, NULL, 0);
match_found = (result == 0);
regfree(®ex);
return match_found;
}
| int main() {
assert(func0("abcdef") == false);
assert(func0("abcdef7") == true);
assert(func0("abc") == false);
return 0;
}
| O3 | c | func0:
endbr64
push %r12
xor %edx,%edx
mov %rdi,%r12
lea 0xd82(%rip),%rsi
push %rbp
push %rbx
sub $0x50,%rsp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
mov %rsp,%rbp
mov %rbp,%rdi
callq 10c0 <regcomp@plt>
xor %ecx,%ecx
xor %r8d,%r8d
xor %edx,%edx
mov %r12,%rsi
mov ... | func0:
endbr64
push rbp
xor edx, edx; cflags
lea rsi, pattern; ".*[0-9]$"
push rbx
mov rbx, rdi
sub rsp, 58h
mov rax, fs:28h
mov [rsp+var_s48], rax
xor eax, eax
mov rbp, rsp
mov rdi, rbp; preg
call _regcomp
xor r8d, r8d; eflags
xor ecx, ecx; pmatch
xor edx, edx; ... | bool func0(char *string)
{
int v1; // ebx
regex_t _0; // [rsp+0h] [rbp+0h] BYREF
unsigned long long vars48; // [rsp+48h] [rbp+48h]
vars48 = __readfsqword(0x28u);
regcomp(&_0, ".*[0-9]$", 0);
v1 = regexec(&_0, string, 0LL, 0LL, 0);
regfree(&_0);
return v1 == 0;
} | func0:
ENDBR64
PUSH RBP
XOR EDX,EDX
LEA RSI,[0x102004]
PUSH RBX
MOV RBX,RDI
SUB RSP,0x58
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
MOV RBP,RSP
MOV RDI,RBP
CALL 0x001010c0
XOR R8D,R8D
XOR ECX,ECX
XOR EDX,EDX
MOV RSI,RBX
MOV RDI,RBP
CALL 0x001010d0
MOV RDI,RBP
MOV EBX,EAX
CALL 0x00101090
TEST... | bool func0(char *param_1)
{
int iVar1;
long in_FS_OFFSET;
regex_t rStack_68;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
regcomp(&rStack_68,".*[0-9]$",0);
iVar1 = regexec(&rStack_68,param_1,0,(regmatch_t *)0x0,0);
regfree(&rStack_68);
if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {... |
7,548 | func0 |
#include <assert.h>
#include <stdbool.h>
#include <string.h>
| bool func0(const char* s) {
int length = strlen(s);
for (int i = 0; i < length - 2; i++) {
if (s[i] != s[i + 2]) {
return false;
}
}
if (s[0] == s[1]) {
return false;
}
return true;
}
| int main() {
assert(func0("abab") == true);
assert(func0("aaaa") == false);
assert(func0("xyz") == false);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %rdi,-0x18(%rbp)
mov -0x18(%rbp),%rax
mov %rax,%rdi
callq 1060 <strlen@plt>
mov %eax,-0x4(%rbp)
movl $0x0,-0x8(%rbp)
jmp 11c3 <func0+0x5a>
mov -0x8(%rbp),%eax
movslq %eax,%rdx
mov -0x18(%rbp),%rax
add %rdx,%rax
movzbl (%rax),%e... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+s], rdi
mov rax, [rbp+s]
mov rdi, rax; s
call _strlen
mov [rbp+var_4], eax
mov [rbp+var_8], 0
jmp short loc_11C3
loc_1191:
mov eax, [rbp+var_8]
movsxd rdx, eax
mov rax, [rbp+s]
add rax, rdx
movzx edx, byte pt... | _BOOL8 func0(long long a1)
{
int i; // [rsp+18h] [rbp-8h]
int v3; // [rsp+1Ch] [rbp-4h]
v3 = strlen((const char *)a1);
for ( i = 0; i < v3 - 2; ++i )
{
if ( *(_BYTE *)(i + a1) != *(_BYTE *)(i + 2LL + a1) )
return 0LL;
}
return *(_BYTE *)a1 != *(_BYTE *)(a1 + 1);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x18],RDI
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,RAX
CALL 0x00101060
MOV dword ptr [RBP + -0x4],EAX
MOV dword ptr [RBP + -0x8],0x0
JMP 0x001011c3
LAB_00101191:
MOV EAX,dword ptr [RBP + -0x8]
MOVSXD RDX,EAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,RD... | bool func0(char *param_1)
{
size_t sVar1;
int local_10;
sVar1 = strlen(param_1);
local_10 = 0;
while( true ) {
if ((int)sVar1 + -2 <= local_10) {
return *param_1 != param_1[1];
}
if (param_1[local_10] != param_1[(long)local_10 + 2]) break;
local_10 = local_10 + 1;
}
return false;... |
7,549 | func0 |
#include <assert.h>
#include <stdbool.h>
#include <string.h>
| bool func0(const char* s) {
int length = strlen(s);
for (int i = 0; i < length - 2; i++) {
if (s[i] != s[i + 2]) {
return false;
}
}
if (s[0] == s[1]) {
return false;
}
return true;
}
| int main() {
assert(func0("abab") == true);
assert(func0("aaaa") == false);
assert(func0("xyz") == false);
return 0;
}
| O1 | c | func0:
endbr64
mov %rdi,%rsi
mov $0xffffffffffffffff,%rcx
mov $0x0,%eax
repnz scas %es:(%rdi),%al
not %rcx
sub $0x1,%rcx
cmp $0x2,%ecx
jle 1187 <func0+0x3e>
mov %rsi,%rax
lea -0x3(%rcx),%edx
lea 0x1(%rsi,%rdx,1),%rdx
movzbl 0x2(%rax),%edi
cmp %dil,(%rax)
jne 1191 <func0+0x48>
add ... | func0:
endbr64
push rbx
mov rbx, rdi
call _strlen
cmp eax, 2
jle short loc_1197
mov rdx, rbx
lea eax, [rax-3]
lea rax, [rbx+rax+1]
loc_1186:
movzx ecx, byte ptr [rdx+2]
cmp [rdx], cl
jnz short loc_11A2
add rdx, 1
cmp rdx, rax
jnz short loc_1186
loc_1197:
movzx eax, ... | bool func0(_BYTE *a1)
{
int v1; // eax
_BYTE *v2; // rdx
long long v3; // rax
v1 = strlen();
if ( v1 <= 2 )
return *a1 != a1[1];
v2 = a1;
v3 = (long long)&a1[v1 - 3 + 1];
while ( *v2 == v2[2] )
{
if ( ++v2 == (_BYTE *)v3 )
return *a1 != a1[1];
}
return 0;
} | func0:
ENDBR64
PUSH RBX
MOV RBX,RDI
CALL 0x00101060
CMP EAX,0x2
JLE 0x00101197
MOV RDX,RBX
LEA EAX,[RAX + -0x3]
LEA RAX,[RBX + RAX*0x1 + 0x1]
LAB_00101186:
MOVZX ECX,byte ptr [RDX + 0x2]
CMP byte ptr [RDX],CL
JNZ 0x001011a2
ADD RDX,0x1
CMP RDX,RAX
JNZ 0x00101186
LAB_00101197:
MOVZX EAX,byte ptr [RBX + 0x1]
CMP byte ptr... | bool func0(char *param_1)
{
size_t sVar1;
char *pcVar2;
sVar1 = strlen(param_1);
if (2 < (int)sVar1) {
pcVar2 = param_1;
do {
if (*pcVar2 != pcVar2[2]) {
return false;
}
pcVar2 = pcVar2 + 1;
} while (pcVar2 != param_1 + (ulong)((int)sVar1 - 3) + 1);
}
return *param_... |
7,550 | func0 |
#include <assert.h>
#include <stdbool.h>
#include <string.h>
| bool func0(const char* s) {
int length = strlen(s);
for (int i = 0; i < length - 2; i++) {
if (s[i] != s[i + 2]) {
return false;
}
}
if (s[0] == s[1]) {
return false;
}
return true;
}
| int main() {
assert(func0("abab") == true);
assert(func0("aaaa") == false);
assert(func0("xyz") == false);
return 0;
}
| O2 | c | func0:
endbr64
push %rbx
mov %rdi,%rbx
callq 1060 <strlen@plt>
cmp $0x2,%eax
jle 1248 <func0+0x38>
sub $0x3,%eax
mov %rbx,%rdx
lea 0x1(%rbx,%rax,1),%rax
jmp 1239 <func0+0x29>
add $0x1,%rdx
cmp %rax,%rdx
je 1248 <func0+0x38>
movzbl 0x2(%rdx),%ecx
cmp %cl,(%rdx)
je 1230 <func0+0x2... | func0:
endbr64
push rbx
mov rbx, rdi
call _strlen
cmp eax, 2
jle short loc_1248
sub eax, 3
mov rdx, rbx
lea rax, [rbx+rax+1]
jmp short loc_1239
loc_1230:
add rdx, 1
cmp rdx, rax
jz short loc_1248
loc_1239:
movzx ecx, byte ptr [rdx+2]
cmp [rdx], cl
jz short loc_1... | bool func0(_BYTE *a1)
{
int v1; // eax
_BYTE *v2; // rdx
long long v3; // rax
v1 = strlen();
if ( v1 <= 2 )
return *a1 != a1[1];
v2 = a1;
v3 = (long long)&a1[v1 - 3 + 1];
while ( *v2 == v2[2] )
{
if ( ++v2 == (_BYTE *)v3 )
return *a1 != a1[1];
}
return 0;
} | func0:
ENDBR64
PUSH RBX
MOV RBX,RDI
CALL 0x00101060
CMP EAX,0x2
JLE 0x00101248
SUB EAX,0x3
MOV RDX,RBX
LEA RAX,[RBX + RAX*0x1 + 0x1]
JMP 0x00101239
LAB_00101230:
ADD RDX,0x1
CMP RDX,RAX
JZ 0x00101248
LAB_00101239:
MOVZX ECX,byte ptr [RDX + 0x2]
CMP byte ptr [RDX],CL
JZ 0x00101230
XOR EAX,EAX
POP RBX
RET
LAB_00101248:
M... | bool func0(char *param_1)
{
size_t sVar1;
char *pcVar2;
sVar1 = strlen(param_1);
if (2 < (int)sVar1) {
pcVar2 = param_1;
do {
if (*pcVar2 != pcVar2[2]) {
return false;
}
pcVar2 = pcVar2 + 1;
} while (pcVar2 != param_1 + (ulong)((int)sVar1 - 3) + 1);
}
return *param_... |
7,551 | func0 |
#include <assert.h>
#include <stdbool.h>
#include <string.h>
| bool func0(const char* s) {
int length = strlen(s);
for (int i = 0; i < length - 2; i++) {
if (s[i] != s[i + 2]) {
return false;
}
}
if (s[0] == s[1]) {
return false;
}
return true;
}
| int main() {
assert(func0("abab") == true);
assert(func0("aaaa") == false);
assert(func0("xyz") == false);
return 0;
}
| O3 | c | func0:
endbr64
push %rbx
mov %rdi,%rbx
callq 1060 <strlen@plt>
movzbl (%rbx),%edi
cmp $0x2,%eax
jle 1260 <func0+0x50>
sub $0x3,%eax
movzbl 0x1(%rbx),%esi
mov %edi,%ecx
lea 0x2(%rbx),%rdx
lea 0x3(%rbx,%rax,1),%r8
jmp 124f <func0+0x3f>
nopl 0x0(%rax)
add $0x1,%rdx
mov %esi,%eax
mov %... | func0:
endbr64
push rbx
mov rbx, rdi
call _strlen
movzx edi, byte ptr [rbx]
cmp eax, 2
jle short loc_1260
sub eax, 3
movzx ecx, byte ptr [rbx+1]
mov esi, edi
lea rdx, [rbx+2]
lea r8, [rbx+rax+3]
jmp short loc_124B
loc_1240:
add rdx, 1
mov esi, eax
cmp rdx, r8
jz ... | bool func0(long long a1)
{
int v2; // eax
char v3; // di
char v4; // cl
char v5; // si
char *v6; // rdx
long long v7; // r8
char v8; // al
v2 = strlen((const char *)a1);
v3 = *(_BYTE *)a1;
if ( v2 <= 2 )
return v3 != *(_BYTE *)(a1 + 1);
v4 = *(_BYTE *)(a1 + 1);
v5 = v3;
v6 = (char *)(a1 ... | func0:
ENDBR64
PUSH RBX
MOV RBX,RDI
CALL 0x00101060
MOVZX EDI,byte ptr [RBX]
CMP EAX,0x2
JLE 0x00101260
SUB EAX,0x3
MOVZX ECX,byte ptr [RBX + 0x1]
MOV ESI,EDI
LEA RDX,[RBX + 0x2]
LEA R8,[RBX + RAX*0x1 + 0x3]
JMP 0x0010124b
LAB_00101240:
ADD RDX,0x1
MOV ESI,EAX
CMP RDX,R8
JZ 0x00101260
LAB_0010124b:
MOV EAX,ECX
MOVZX EC... | bool func0(char *param_1)
{
char cVar1;
char cVar2;
size_t sVar3;
char *pcVar4;
char cVar5;
sVar3 = strlen(param_1);
if (2 < (int)sVar3) {
pcVar4 = param_1 + 2;
cVar2 = param_1[1];
cVar5 = *param_1;
do {
cVar1 = cVar2;
cVar2 = *pcVar4;
if (cVar2 != cVar5) {
re... |
7,552 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
// Function to rearrange numbers based on the specified key
int comparator(const void* a, const void* b) {
int ia = *(int*)a;
int ib = *(int*)b;
double key_a = (ia == 0) ? 0.0 : (-1.0 / ia);
double key_b = (ib == 0) ? 0.0 : (-1.0 /... | int* func0(int array_nums[], int size) {
// Comparator function for qsort
qsort(array_nums, size, sizeof(int), comparator);
return array_nums;
}
| int main() {
// Test case 1
int array1[] = {-1, 2, -3, 5, 7, 8, 9, -10};
int expected1[] = {2, 5, 7, 8, 9, -10, -3, -1};
int size1 = sizeof(array1) / sizeof(array1[0]);
func0(array1, size1);
for(int i = 0; i < size1; i++) {
assert(array1[i] == expected1[i]);
}
// Test ... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x10,%rsp
mov %rdi,-0x8(%rbp)
mov %esi,-0xc(%rbp)
mov -0xc(%rbp),%eax
movslq %eax,%rsi
mov -0x8(%rbp),%rax
lea -0xb7(%rip),%rcx
mov $0x4,%edx
mov %rax,%rdi
callq 1070 <qsort@plt>
mov -0x8(%rbp),%rax
leaveq
retq
| func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+base], rdi
mov [rbp+var_C], esi
mov eax, [rbp+var_C]
movsxd rsi, eax; nmemb
mov rax, [rbp+base]
lea rdx, comparator
mov rcx, rdx; compar
mov edx, 4; size
mov rdi, rax; base
call _qsort
mov rax, [rbp+base]
leave... | void * func0(void *a1, int a2)
{
qsort(a1, a2, 4uLL, comparator);
return a1;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV EAX,dword ptr [RBP + -0xc]
MOVSXD RSI,EAX
MOV RAX,qword ptr [RBP + -0x8]
LEA RDX,[0x101189]
MOV RCX,RDX
MOV EDX,0x4
MOV RDI,RAX
CALL 0x00101070
MOV RAX,qword ptr [RBP + -0x8]
LEAVE
RET | void * func0(void *param_1,int param_2)
{
qsort(param_1,(long)param_2,4,comparator);
return param_1;
} |
7,553 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
// Function to rearrange numbers based on the specified key
int comparator(const void* a, const void* b) {
int ia = *(int*)a;
int ib = *(int*)b;
double key_a = (ia == 0) ? 0.0 : (-1.0 / ia);
double key_b = (ib == 0) ? 0.0 : (-1.0 /... | int* func0(int array_nums[], int size) {
// Comparator function for qsort
qsort(array_nums, size, sizeof(int), comparator);
return array_nums;
}
| int main() {
// Test case 1
int array1[] = {-1, 2, -3, 5, 7, 8, 9, -10};
int expected1[] = {2, 5, 7, 8, 9, -10, -3, -1};
int size1 = sizeof(array1) / sizeof(array1[0]);
func0(array1, size1);
for(int i = 0; i < size1; i++) {
assert(array1[i] == expected1[i]);
}
// Test ... | O1 | c | func0:
endbr64
push %rbx
mov %rdi,%rbx
movslq %esi,%rsi
lea -0x79(%rip),%rcx
mov $0x4,%edx
callq 1070 <qsort@plt>
mov %rbx,%rax
pop %rbx
retq
| func0:
endbr64
push rbx
mov rbx, rdi
movsxd rsi, esi
lea rcx, comparator
mov edx, 4
call _qsort
mov rax, rbx
pop rbx
retn | long long func0(long long a1, int a2)
{
qsort(a1, a2, 4LL, comparator);
return a1;
} | func0:
ENDBR64
PUSH RBX
MOV RBX,RDI
MOVSXD RSI,ESI
LEA RCX,[0x101189]
MOV EDX,0x4
CALL 0x00101070
MOV RAX,RBX
POP RBX
RET | void * func0(void *param_1,int param_2)
{
qsort(param_1,(long)param_2,4,comparator);
return param_1;
} |
7,554 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
// Function to rearrange numbers based on the specified key
int comparator(const void* a, const void* b) {
int ia = *(int*)a;
int ib = *(int*)b;
double key_a = (ia == 0) ? 0.0 : (-1.0 / ia);
double key_b = (ib == 0) ? 0.0 : (-1.0 /... | int* func0(int array_nums[], int size) {
// Comparator function for qsort
qsort(array_nums, size, sizeof(int), comparator);
return array_nums;
}
| int main() {
// Test case 1
int array1[] = {-1, 2, -3, 5, 7, 8, 9, -10};
int expected1[] = {2, 5, 7, 8, 9, -10, -3, -1};
int size1 = sizeof(array1) / sizeof(array1[0]);
func0(array1, size1);
for(int i = 0; i < size1; i++) {
assert(array1[i] == expected1[i]);
}
// Test ... | O2 | c | func0:
endbr64
push %r12
movslq %esi,%rsi
mov %rdi,%r12
mov $0x4,%edx
lea -0x98(%rip),%rcx
callq 1070 <qsort@plt>
mov %r12,%rax
pop %r12
retq
nopw %cs:0x0(%rax,%rax,1)
nopl (%rax)
| func0:
endbr64
push r12
movsxd rsi, esi
mov r12, rdi
mov edx, 4
lea rcx, comparator
call _qsort
mov rax, r12
pop r12
retn | long long func0(long long a1, int a2)
{
qsort(a1, a2, 4LL, comparator);
return a1;
} | func0:
ENDBR64
PUSH R12
MOVSXD RSI,ESI
MOV R12,RDI
MOV EDX,0x4
LEA RCX,[0x101410]
CALL 0x00101070
MOV RAX,R12
POP R12
RET | void * func0(void *param_1,int param_2)
{
qsort(param_1,(long)param_2,4,comparator);
return param_1;
} |
7,555 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
// Function to rearrange numbers based on the specified key
int comparator(const void* a, const void* b) {
int ia = *(int*)a;
int ib = *(int*)b;
double key_a = (ia == 0) ? 0.0 : (-1.0 / ia);
double key_b = (ib == 0) ? 0.0 : (-1.0 /... | int* func0(int array_nums[], int size) {
// Comparator function for qsort
qsort(array_nums, size, sizeof(int), comparator);
return array_nums;
}
| int main() {
// Test case 1
int array1[] = {-1, 2, -3, 5, 7, 8, 9, -10};
int expected1[] = {2, 5, 7, 8, 9, -10, -3, -1};
int size1 = sizeof(array1) / sizeof(array1[0]);
func0(array1, size1);
for(int i = 0; i < size1; i++) {
assert(array1[i] == expected1[i]);
}
// Test ... | O3 | c | func0:
endbr64
push %r12
movslq %esi,%rsi
mov %rdi,%r12
mov $0x4,%edx
lea -0x98(%rip),%rcx
callq 1070 <qsort@plt>
mov %r12,%rax
pop %r12
retq
nopw %cs:0x0(%rax,%rax,1)
nopl (%rax)
| func0:
endbr64
push rbx
movsxd rsi, esi; nmemb
mov rbx, rdi
lea rcx, comparator; compar
mov edx, 4; size
call _qsort
mov rax, rbx
pop rbx
retn | void * func0(void *a1, int a2)
{
qsort(a1, a2, 4uLL, comparator);
return a1;
} | func0:
ENDBR64
PUSH RBX
MOVSXD RSI,ESI
MOV RBX,RDI
LEA RCX,[0x101390]
MOV EDX,0x4
CALL 0x00101070
MOV RAX,RBX
POP RBX
RET | void * func0(void *param_1,int param_2)
{
qsort(param_1,(long)param_2,4,comparator);
return param_1;
} |
7,556 | func0 | #include <assert.h>
#include <stdbool.h>
| bool func0(int A[], int arr_size, int sum, int * triplet) {
for (int i = 0; i < arr_size - 2; i++) {
for (int j = i + 1; j < arr_size - 1; j++) {
for (int k = j + 1; k < arr_size; k++) {
if (A[i] + A[j] + A[k] == sum) {
triplet[0] = A[i];
... | int main() {
int triplet[3];
assert(func0((int[]){1, 4, 45, 6, 10, 8}, 6, 22, triplet) && triplet[0] == 4 && triplet[1] == 10 && triplet[2] == 8);
assert(func0((int[]){12, 3, 5, 2, 6, 9}, 6, 24, triplet) && triplet[0] == 12 && triplet[1] == 3 && triplet[2] == 9);
assert(func0((int[]){1, 2, 3, 4, 5... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
mov %edx,-0x20(%rbp)
mov %rcx,-0x28(%rbp)
movl $0x0,-0xc(%rbp)
jmpq 127c <func0+0x113>
mov -0xc(%rbp),%eax
add $0x1,%eax
mov %eax,-0x8(%rbp)
jmpq 1269 <func0+0x100>
mov -0x8(%rbp),%eax
add $0x1,%eax
mo... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_20], edx
mov [rbp+var_28], rcx
mov [rbp+var_C], 0
jmp loc_127C
loc_118B:
mov eax, [rbp+var_C]
add eax, 1
mov [rbp+var_8], eax
jmp loc_1269
loc_1199:
mov eax, [rbp+var_8]
add ... | long long func0(long long a1, int a2, int a3, _DWORD *a4)
{
int i; // [rsp+1Ch] [rbp-Ch]
int j; // [rsp+20h] [rbp-8h]
int k; // [rsp+24h] [rbp-4h]
for ( i = 0; i < a2 - 2; ++i )
{
for ( j = i + 1; j < a2 - 1; ++j )
{
for ( k = j + 1; k < a2; ++k )
{
if ( a3 == *(_DWORD *)(4LL * j... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0x20],EDX
MOV qword ptr [RBP + -0x28],RCX
MOV dword ptr [RBP + -0xc],0x0
JMP 0x0010127c
LAB_0010118b:
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0x1
MOV dword ptr [RBP + -0x8],EAX
JMP 0x00101269
LAB_001... | int8 func0(long param_1,int param_2,int param_3,int4 *param_4)
{
int local_14;
int local_10;
int local_c;
local_14 = 0;
do {
local_10 = local_14;
if (param_2 + -2 <= local_14) {
return 0;
}
while (local_10 = local_10 + 1, local_c = local_10, local_10 < param_2 + -1) {
while (lo... |
7,557 | func0 | #include <assert.h>
#include <stdbool.h>
| bool func0(int A[], int arr_size, int sum, int * triplet) {
for (int i = 0; i < arr_size - 2; i++) {
for (int j = i + 1; j < arr_size - 1; j++) {
for (int k = j + 1; k < arr_size; k++) {
if (A[i] + A[j] + A[k] == sum) {
triplet[0] = A[i];
... | int main() {
int triplet[3];
assert(func0((int[]){1, 4, 45, 6, 10, 8}, 6, 22, triplet) && triplet[0] == 4 && triplet[1] == 10 && triplet[2] == 8);
assert(func0((int[]){12, 3, 5, 2, 6, 9}, 6, 24, triplet) && triplet[0] == 12 && triplet[1] == 3 && triplet[2] == 9);
assert(func0((int[]){1, 2, 3, 4, 5... | O1 | c | func0:
endbr64
cmp $0x2,%esi
jle 125d <func0+0xf4>
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
mov %rcx,%rbp
lea 0x4(%rdi),%r14
mov %esi,%eax
lea -0x3(%rsi),%ecx
lea 0x2(%rcx),%rbx
mov %rbx,-0x8(%rsp)
mov $0x1,%r12d
lea -0x1(%rsi),%ebx
mov %ebx,-0x10(%rsp)
le... | func0:
endbr64
mov r10d, esi
cmp esi, 2
jle loc_1250
push r15
push r14
push r13
push r12
push rbp
push rbx
mov r11, rdi
mov esi, edx
mov r12, rcx
lea r15, [rdi+4]
lea eax, [r10-3]
add rax, 2
mov [rsp+30h+var_38], rax
mov r14d, 1
lea ebp, [r10-1]
lea ... | long long func0(long long a1, int a2, int a3, _DWORD *a4)
{
_DWORD *v4; // r15
long long v5; // r14
int v6; // ebp
int v7; // r9d
_DWORD *v8; // rbx
int v9; // r13d
_DWORD *v10; // rax
long long v12; // [rsp+0h] [rbp-50h]
if ( a2 <= 2 )
return 0LL;
v4 = (_DWORD *)(a1 + 4);
v5 = 1LL;
v6 = a... | func0:
ENDBR64
MOV R10D,ESI
CMP ESI,0x2
JLE 0x00101250
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV R11,RDI
MOV ESI,EDX
MOV R12,RCX
LEA R15,[RDI + 0x4]
LEA EAX,[R10 + -0x3]
ADD RAX,0x2
MOV qword ptr [RSP + -0x8],RAX
MOV R14D,0x1
LEA EBP,[R10 + -0x1]
LEA RAX,[RDI + 0x8]
MOV qword ptr [RSP + -0x10],RAX
LAB_0... | int8 func0(long param_1,int param_2,int param_3,int *param_4)
{
int *piVar1;
int *piVar2;
uint uVar3;
uint uVar4;
ulong uVar5;
ulong uVar6;
int *piVar7;
ulong local_50;
if (param_2 < 3) {
return 0;
}
piVar7 = (int *)(param_1 + 4);
uVar6 = 1;
uVar3 = param_2 - 1;
do {
uVar5 = uVar... |
7,558 | func0 | #include <assert.h>
#include <stdbool.h>
| bool func0(int A[], int arr_size, int sum, int * triplet) {
for (int i = 0; i < arr_size - 2; i++) {
for (int j = i + 1; j < arr_size - 1; j++) {
for (int k = j + 1; k < arr_size; k++) {
if (A[i] + A[j] + A[k] == sum) {
triplet[0] = A[i];
... | int main() {
int triplet[3];
assert(func0((int[]){1, 4, 45, 6, 10, 8}, 6, 22, triplet) && triplet[0] == 4 && triplet[1] == 10 && triplet[2] == 8);
assert(func0((int[]){12, 3, 5, 2, 6, 9}, 6, 24, triplet) && triplet[0] == 12 && triplet[1] == 3 && triplet[2] == 9);
assert(func0((int[]){1, 2, 3, 4, 5... | O2 | c | func0:
endbr64
cmp $0x2,%esi
jle 1415 <func0+0xe5>
push %r15
lea -0x3(%rsi),%eax
lea 0x8(%rdi),%r15
push %r14
add $0x2,%rax
push %r13
lea -0x1(%rsi),%r13d
push %r12
lea 0x4(%rdi),%r12
push %rbp
push %rbx
lea -0x2(%rsi),%ebx
mov %ebx,-0xc(%rsp)
mov %rax,-0x8(%rsp)
mov $0x1,%e... | func0:
endbr64
mov r9d, esi
cmp esi, 2
jle loc_1414
push r15
lea eax, [r9-3]
mov r10, rdi
mov esi, edx
push r14
add rax, 2
mov r11, rcx
lea r15, [rdi+4]
push r13
mov r14d, 1
push r12
push rbp
lea ebp, [r9-1]
push rbx
mov [rsp+30h+var_38], rax
lea rax... | long long func0(long long a1, int a2, int a3, _DWORD *a4)
{
_DWORD *v4; // r15
long long v5; // r14
int v6; // ebp
int v7; // r8d
_DWORD *v8; // rbx
long long v9; // r12
int v10; // r13d
_DWORD *v11; // rax
if ( a2 <= 2 )
return 0LL;
v4 = (_DWORD *)(a1 + 4);
v5 = 1LL;
v6 = a2 - 1;
while ... | func0:
ENDBR64
MOV R9D,ESI
CMP ESI,0x2
JLE 0x00101414
PUSH R15
LEA EAX,[R9 + -0x3]
MOV R10,RDI
MOV ESI,EDX
PUSH R14
ADD RAX,0x2
MOV R11,RCX
LEA R15,[RDI + 0x4]
PUSH R13
MOV R14D,0x1
PUSH R12
PUSH RBP
LEA EBP,[R9 + -0x1]
PUSH RBX
MOV qword ptr [RSP + -0x8],RAX
LEA RAX,[RDI + 0x8]
MOV qword ptr [RSP + -0x10],RAX
LAB_0010... | int8 func0(long param_1,int param_2,int param_3,int *param_4)
{
int *piVar1;
int *piVar2;
uint uVar3;
uint uVar4;
ulong uVar5;
ulong uVar6;
ulong uVar7;
int *piVar8;
if (param_2 < 3) {
return 0;
}
piVar8 = (int *)(param_1 + 4);
uVar7 = 1;
uVar3 = param_2 - 1;
do {
uVar5 = uVar7 &... |
7,559 | func0 | #include <assert.h>
#include <stdbool.h>
| bool func0(int A[], int arr_size, int sum, int * triplet) {
for (int i = 0; i < arr_size - 2; i++) {
for (int j = i + 1; j < arr_size - 1; j++) {
for (int k = j + 1; k < arr_size; k++) {
if (A[i] + A[j] + A[k] == sum) {
triplet[0] = A[i];
... | int main() {
int triplet[3];
assert(func0((int[]){1, 4, 45, 6, 10, 8}, 6, 22, triplet) && triplet[0] == 4 && triplet[1] == 10 && triplet[2] == 8);
assert(func0((int[]){12, 3, 5, 2, 6, 9}, 6, 24, triplet) && triplet[0] == 12 && triplet[1] == 3 && triplet[2] == 9);
assert(func0((int[]){1, 2, 3, 4, 5... | O3 | c | func0:
endbr64
cmp $0x2,%esi
jle 13d5 <func0+0xe5>
push %r15
lea -0x3(%rsi),%eax
lea 0x8(%rdi),%r15
push %r14
add $0x2,%rax
push %r13
lea -0x1(%rsi),%r13d
push %r12
lea 0x4(%rdi),%r12
push %rbp
push %rbx
lea -0x2(%rsi),%ebx
mov %ebx,-0xc(%rsp)
mov %rax,-0x8(%rsp)
mov $0x1,%e... | func0:
endbr64
mov r9d, esi
cmp esi, 2
jle loc_13E3
push r15
lea r15d, [r9-1]
mov esi, edx
mov rdx, rcx
push r14
mov ecx, 1
mov r10, rdi
lea r14, [rdi+8]
push r13
mov r8, rcx
lea r13, [rdi+4]
mov rcx, rdx
push r12
mov edx, r9d
push rbp
push rbx
mov ... | long long func0(long long a1, int a2, int a3, _DWORD *a4)
{
long long v4; // r8
_DWORD *v5; // r13
int v6; // ebx
int v7; // ebp
_DWORD *v8; // r11
long long v9; // r15
int v10; // r12d
_DWORD *v11; // rax
if ( a2 <= 2 )
return 0LL;
v4 = 1LL;
v5 = (_DWORD *)(a1 + 4);
v6 = a2 - 1;
while (... | func0:
ENDBR64
MOV R9D,ESI
CMP ESI,0x2
JLE 0x001013e3
PUSH R15
LEA R15D,[R9 + -0x1]
MOV ESI,EDX
MOV RDX,RCX
PUSH R14
MOV ECX,0x1
MOV R10,RDI
LEA R14,[RDI + 0x8]
PUSH R13
MOV R8,RCX
LEA R13,[RDI + 0x4]
MOV RCX,RDX
PUSH R12
MOV EDX,R9D
PUSH RBP
PUSH RBX
MOV RBX,R15
MOV qword ptr [RSP + -0x10],R15
LAB_00101344:
MOV EBP,R8... | int8 func0(long param_1,int param_2,int param_3,int *param_4)
{
int *piVar1;
uint uVar2;
ulong uVar3;
ulong uVar4;
int *piVar5;
int *piVar6;
uint uVar7;
ulong uVar8;
if (param_2 < 3) {
return 0;
}
uVar7 = param_2 - 1;
uVar4 = 1;
piVar6 = (int *)(param_1 + 4);
do {
uVar3 = uVar4 &... |
7,560 | func0 |
#include <stdio.h>
#include <assert.h>
#include <regex.h>
#include <string.h>
| char* func0(char* text) {
regex_t regex;
int reti;
char* patterns = "[A-Z]+[a-z]+$";
regcomp(®ex, patterns, REG_EXTENDED);
reti = regexec(®ex, text, 0, NULL, 0);
if (!reti) {
return "Found a match!";
} else {
return "Not matched!";
}
}
| int main() {
assert(strcmp(func0("AaBbGg"), "Found a match!") == 0);
assert(strcmp(func0("aA"), "Not matched!") == 0);
assert(strcmp(func0("PYTHON"), "Not matched!") == 0);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x70,%rsp
mov %rdi,-0x68(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
lea 0xe19(%rip),%rax
mov %rax,-0x58(%rbp)
mov -0x58(%rbp),%rcx
lea -0x50(%rbp),%rax
mov $0x1,%edx
mov %rcx,%rsi
mov %rax,%rdi
callq 10b0 <regcomp@plt>
... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+string], rdi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
lea rax, aAZAZ; "[A-Z]+[a-z]+$"
mov [rbp+pattern], rax
mov rcx, [rbp+pattern]
lea rax, [rbp+preg]
mov edx, 1; cflags
mov rsi, rcx; pattern
mov ... | const char * func0(const char *a1)
{
regex_t preg; // [rsp+20h] [rbp-50h] BYREF
unsigned long long v3; // [rsp+68h] [rbp-8h]
v3 = __readfsqword(0x28u);
regcomp(&preg, "[A-Z]+[a-z]+$", 1);
if ( regexec(&preg, a1, 0LL, 0LL, 0) )
return "Not matched!";
else
return "Found a match!";
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x68],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
LEA RAX,[0x102008]
MOV qword ptr [RBP + -0x58],RAX
MOV RCX,qword ptr [RBP + -0x58]
LEA RAX,[RBP + -0x50]
MOV EDX,0x1
MOV RSI,RCX
MOV RDI,RAX
CALL 0x001010b0
MOV RSI,qwo... | char * func0(char *param_1)
{
int iVar1;
char *pcVar2;
long in_FS_OFFSET;
regex_t local_58;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
regcomp(&local_58,"[A-Z]+[a-z]+$",1);
iVar1 = regexec(&local_58,param_1,0,(regmatch_t *)0x0,0);
if (iVar1 == 0) {
pcVar2 = "Found a match!";
}... |
7,561 | func0 |
#include <stdio.h>
#include <assert.h>
#include <regex.h>
#include <string.h>
| char* func0(char* text) {
regex_t regex;
int reti;
char* patterns = "[A-Z]+[a-z]+$";
regcomp(®ex, patterns, REG_EXTENDED);
reti = regexec(®ex, text, 0, NULL, 0);
if (!reti) {
return "Found a match!";
} else {
return "Not matched!";
}
}
| int main() {
assert(strcmp(func0("AaBbGg"), "Found a match!") == 0);
assert(strcmp(func0("aA"), "Not matched!") == 0);
assert(strcmp(func0("PYTHON"), "Not matched!") == 0);
return 0;
}
| O1 | c | func0:
endbr64
push %rbp
push %rbx
sub $0x58,%rsp
mov %rdi,%rbx
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
mov %rsp,%rbp
mov $0x1,%edx
lea 0xe4b(%rip),%rsi
mov %rbp,%rdi
callq 10a0 <regcomp@plt>
mov $0x0,%r8d
mov $0x0,%ecx
mov $0x0,%edx
mov %rbx,%rsi
mov %rbp,%rdi... | func0:
endbr64
push rbp
push rbx
sub rsp, 58h
mov rbx, rdi
mov rax, fs:28h
mov [rsp+var_s48], rax
xor eax, eax
mov rbp, rsp
mov edx, 1
lea rsi, aAZAZ; "[A-Z]+[a-z]+$"
mov rdi, rbp
call _regcomp
mov r8d, 0
mov ecx, 0
mov edx, 0
mov rsi, rbx
mov rdi, rbp
ca... | const char * func0(long long a1)
{
bool v1; // zf
const char *result; // rax
_QWORD _0[13]; // [rsp+0h] [rbp+0h] BYREF
_0[9] = __readfsqword(0x28u);
regcomp(_0, "[A-Z]+[a-z]+$", 1LL);
v1 = (unsigned int)regexec(_0, a1, 0LL, 0LL, 0LL) == 0;
result = "Found a match!";
if ( !v1 )
return "Not matched!"... | func0:
ENDBR64
PUSH RBP
PUSH RBX
SUB RSP,0x58
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
MOV RBP,RSP
MOV EDX,0x1
LEA RSI,[0x102020]
MOV RDI,RBP
CALL 0x001010b0
MOV R8D,0x0
MOV ECX,0x0
MOV EDX,0x0
MOV RSI,RBX
MOV RDI,RBP
CALL 0x001010d0
TEST EAX,EAX
LEA RAX,[0x102004]
LEA RDX,[0x1... | char * func0(char *param_1)
{
int iVar1;
char *pcVar2;
long in_FS_OFFSET;
regex_t rStack_68;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
regcomp(&rStack_68,"[A-Z]+[a-z]+$",1);
iVar1 = regexec(&rStack_68,param_1,0,(regmatch_t *)0x0,0);
pcVar2 = "Found a match!";
if (iVar1 != 0) {
... |
7,562 | func0 |
#include <stdio.h>
#include <assert.h>
#include <regex.h>
#include <string.h>
| char* func0(char* text) {
regex_t regex;
int reti;
char* patterns = "[A-Z]+[a-z]+$";
regcomp(®ex, patterns, REG_EXTENDED);
reti = regexec(®ex, text, 0, NULL, 0);
if (!reti) {
return "Found a match!";
} else {
return "Not matched!";
}
}
| int main() {
assert(strcmp(func0("AaBbGg"), "Found a match!") == 0);
assert(strcmp(func0("aA"), "Not matched!") == 0);
assert(strcmp(func0("PYTHON"), "Not matched!") == 0);
return 0;
}
| O2 | c | func0:
endbr64
push %r12
mov $0x1,%edx
lea 0xd7e(%rip),%rsi
push %rbp
mov %rdi,%rbp
sub $0x58,%rsp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
mov %rsp,%r12
mov %r12,%rdi
callq 10a0 <regcomp@plt>
xor %ecx,%ecx
xor %edx,%edx
xor %r8d,%r8d
mov %rbp,%rsi
mov %r12,%rdi... | func0:
endbr64
push r12
mov edx, 1
lea rsi, aAZAZ; "[A-Z]+[a-z]+$"
push rbp
mov rbp, rdi
sub rsp, 58h
mov rax, fs:28h
mov [rsp+68h+var_20], rax
xor eax, eax
mov r12, rsp
mov rdi, r12
call _regcomp
xor edx, edx
xor r8d, r8d
xor ecx, ecx
mov rsi, rbp
mov rd... | const char * func0(long long a1)
{
bool v1; // zf
const char *result; // rax
_QWORD v3[13]; // [rsp+0h] [rbp-68h] BYREF
v3[9] = __readfsqword(0x28u);
regcomp(v3, "[A-Z]+[a-z]+$", 1LL);
v1 = (unsigned int)regexec(v3, a1, 0LL, 0LL, 0LL) == 0;
result = "Found a match!";
if ( !v1 )
return "Not matched!... | func0:
ENDBR64
PUSH R12
MOV EDX,0x1
LEA RSI,[0x102020]
PUSH RBP
MOV RBP,RDI
SUB RSP,0x58
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
MOV R12,RSP
MOV RDI,R12
CALL 0x001010b0
XOR EDX,EDX
XOR R8D,R8D
XOR ECX,ECX
MOV RSI,RBP
MOV RDI,R12
CALL 0x001010d0
LEA RDX,[0x102013]
TEST EAX,EAX
LEA RAX,[0x1... | char * func0(char *param_1)
{
int iVar1;
char *pcVar2;
long in_FS_OFFSET;
regex_t rStack_68;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
regcomp(&rStack_68,"[A-Z]+[a-z]+$",1);
iVar1 = regexec(&rStack_68,param_1,0,(regmatch_t *)0x0,0);
pcVar2 = "Found a match!";
if (iVar1 != 0) {
... |
7,563 | func0 |
#include <stdio.h>
#include <assert.h>
#include <regex.h>
#include <string.h>
| char* func0(char* text) {
regex_t regex;
int reti;
char* patterns = "[A-Z]+[a-z]+$";
regcomp(®ex, patterns, REG_EXTENDED);
reti = regexec(®ex, text, 0, NULL, 0);
if (!reti) {
return "Found a match!";
} else {
return "Not matched!";
}
}
| int main() {
assert(strcmp(func0("AaBbGg"), "Found a match!") == 0);
assert(strcmp(func0("aA"), "Not matched!") == 0);
assert(strcmp(func0("PYTHON"), "Not matched!") == 0);
return 0;
}
| O3 | c | func0:
endbr64
push %r12
mov $0x1,%edx
lea 0xd7e(%rip),%rsi
push %rbp
mov %rdi,%rbp
sub $0x58,%rsp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
mov %rsp,%r12
mov %r12,%rdi
callq 10a0 <regcomp@plt>
xor %ecx,%ecx
xor %edx,%edx
xor %r8d,%r8d
mov %rbp,%rsi
mov %r12,%rdi... | func0:
endbr64
push rbp
mov edx, 1; cflags
lea rsi, pattern; "[A-Z]+[a-z]+$"
push rbx
mov rbx, rdi
sub rsp, 58h
mov rax, fs:28h
mov [rsp+var_s48], rax
xor eax, eax
mov rbp, rsp
mov rdi, rbp; preg
call _regcomp
xor edx, edx; nmatch
xor r8d, r8d; eflags
xor ecx, ec... | const char * func0(char *string)
{
bool v1; // zf
const char *result; // rax
regex_t _0; // [rsp+0h] [rbp+0h] BYREF
unsigned long long vars48; // [rsp+48h] [rbp+48h]
vars48 = __readfsqword(0x28u);
regcomp(&_0, "[A-Z]+[a-z]+$", 1);
v1 = regexec(&_0, string, 0LL, 0LL, 0) == 0;
result = "Not matched!";
... | func0:
ENDBR64
PUSH RBP
MOV EDX,0x1
LEA RSI,[0x102020]
PUSH RBX
MOV RBX,RDI
SUB RSP,0x58
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
MOV RBP,RSP
MOV RDI,RBP
CALL 0x001010b0
XOR EDX,EDX
XOR R8D,R8D
XOR ECX,ECX
MOV RSI,RBX
MOV RDI,RBP
CALL 0x001010d0
LEA RDX,[0x102004]
TEST EAX,EAX
LEA RAX,[0x1... | char * func0(char *param_1)
{
int iVar1;
char *pcVar2;
long in_FS_OFFSET;
regex_t rStack_68;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
regcomp(&rStack_68,"[A-Z]+[a-z]+$",1);
iVar1 = regexec(&rStack_68,param_1,0,(regmatch_t *)0x0,0);
pcVar2 = "Not matched!";
if (iVar1 == 0) {
... |
7,564 | func0 |
#include <assert.h>
#include <stdio.h>
| int func0(int S[], int m, int n) {
int table[n + 1][m];
for (int i = 0; i < m; i++) {
table[0][i] = 1;
}
for (int i = 1; i <= n; i++) {
for (int j = 0; j < m; j++) {
int x = (i - S[j] >= 0) ? table[i - S[j]][j] : 0;
int y = (j >= 1) ? table[i][j-1] : 0;
... | int main() {
int S1[] = {1, 2, 3};
int m1 = 3;
int n1 = 4;
assert(func0(S1, m1, n1) == 4);
int S2[] = {4, 5, 6, 7, 8, 9};
int m2 = 6;
int n2 = 9;
assert(func0(S2, m2, n2) == 2);
int S3[] = {4, 5, 6, 7, 8, 9};
int m3 = 6;
int n3 = 4;
assert(func0(S3, m3, n3... | 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; // eax
int v7; // eax
int v9; // [rsp+8h] [rbp-60h] BYREF
int v10; // [rsp+Ch] [rbp-5Ch]
long long v11; // [rsp+10h] [rbp-58h]
int i; // [rsp+24h] [rbp-44h]
int j; //... | 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;
ulong uVar2;
ulong uVar3;
int *piVar4;
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_28;
long l... |
7,565 | func0 |
#include <assert.h>
#include <stdio.h>
| int func0(int S[], int m, int n) {
int table[n + 1][m];
for (int i = 0; i < m; i++) {
table[0][i] = 1;
}
for (int i = 1; i <= n; i++) {
for (int j = 0; j < m; j++) {
int x = (i - S[j] >= 0) ? table[i - S[j]][j] : 0;
int y = (j >= 1) ? table[i][j-1] : 0;
... | int main() {
int S1[] = {1, 2, 3};
int m1 = 3;
int n1 = 4;
assert(func0(S1, m1, n1) == 4);
int S2[] = {4, 5, 6, 7, 8, 9};
int m2 = 6;
int n2 = 9;
assert(func0(S2, m2, n2) == 2);
int S3[] = {4, 5, 6, 7, 8, 9};
int m3 = 6;
int n3 = 4;
assert(func0(S3, m3, n3... | 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,-0x44(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x38(%rbp)
xor %eax,%eax
movslq %esi,%rcx
lea 0x0(,%rcx,4),%r13
add $0x1,%edx
movslq %edx,%rax
imul %rcx,%rax
l... | func0:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r14d, esi
mov ebx, edx
mov [rbp+var_44], edx
mov rax, fs:28h
mov [rbp+var_38], rax
xor eax, eax
movsxd rdx, esi
lea r13, ds:0[rdx*4]
lea eax, [rbx+1]
cdqe
imul ... | long long func0(long long a1, int a2, int a3)
{
unsigned long long v4; // r13
__int16 v5; // cx
_BYTE *v6; // rdx
signed long long v7; // rax
void *v8; // rsp
_BYTE *v9; // rax
_BYTE *v10; // r9
int v11; // r15d
_BYTE *v12; // r11
int v13; // esi
int v14; // ecx
long long v15; // rax
int v16;... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14D,ESI
MOV EBX,EDX
MOV dword ptr [RBP + -0x44],EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
MOVSXD RDX,ESI
LEA R13,[RDX*0x4]
LEA EAX,[RBX + 0x1]
CDQE
IMUL RAX,RDX
LEA RAX,[0xf + RAX*0x4]
MO... | int4 func0(long param_1,uint param_2,int param_3)
{
int iVar1;
long lVar2;
long lVar3;
int4 *puVar4;
ulong uVar5;
int iVar6;
ulong uVar7;
int1 *puVar8;
int iVar9;
int iVar10;
int1 *puVar11;
int1 *puVar12;
long in_FS_OFFSET;
int1 auStack_58 [12];
int local_4c;
long local_40;
local_4... |
7,566 | func0 |
#include <assert.h>
#include <stdio.h>
| int func0(int S[], int m, int n) {
int table[n + 1][m];
for (int i = 0; i < m; i++) {
table[0][i] = 1;
}
for (int i = 1; i <= n; i++) {
for (int j = 0; j < m; j++) {
int x = (i - S[j] >= 0) ? table[i - S[j]][j] : 0;
int y = (j >= 1) ? table[i][j-1] : 0;
... | int main() {
int S1[] = {1, 2, 3};
int m1 = 3;
int n1 = 4;
assert(func0(S1, m1, n1) == 4);
int S2[] = {4, 5, 6, 7, 8, 9};
int m2 = 6;
int n2 = 9;
assert(func0(S2, m2, n2) == 2);
int S3[] = {4, 5, 6, 7, 8, 9};
int m3 = 6;
int n3 = 4;
assert(func0(S3, m3, n3... | O2 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %r15
push %r14
movslq %edx,%r14
movslq %esi,%rdx
push %r13
lea 0x1(%r14),%r13d
push %r12
lea 0x0(,%rdx,4),%r12
push %rbx
mov %esi,%ebx
sub $0x18,%rsp
mov %fs:0x28,%rax
mov %rax,-0x38(%rbp)
xor %eax,%eax
movslq %r13d,%rax
mov %rsp,%rsi
im... | func0:
endbr64
push rbp
movsxd r9, esi
mov rbp, rsp
push r13
lea r13, ds:0[r9*4]
push r12
movsxd r12, edx
push rbx
mov rbx, r9
sub rsp, 18h
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
lea eax, [r12+1]
mov rcx, rsp
cdqe
imul rax, r9
lea rax, ds:0Fh[rax*4]
m... | long long func0(long long a1, int a2, int a3)
{
long long v3; // r9
unsigned long long v4; // r13
long long v5; // r12
long long v7; // rdx
_BYTE *v8; // rcx
__int16 v9; // dx
signed long long v10; // rdx
void *v11; // rsp
unsigned long long v12; // r11
_BYTE *v13; // rax
_BYTE *v14; // r8
int ... | func0:
ENDBR64
PUSH RBP
MOVSXD R9,ESI
MOV RBP,RSP
PUSH R13
LEA R13,[R9*0x4]
PUSH R12
MOVSXD R12,EDX
PUSH RBX
MOV RBX,R9
SUB RSP,0x18
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
LEA EAX,[R12 + 0x1]
MOV RCX,RSP
CDQE
IMUL RAX,R9
LEA RAX,[0xf + RAX*0x4]
MOV RDX,RAX
AND RAX,-0x1000
SUB RCX,RAX
AN... | int4 func0(long param_1,uint param_2,int param_3)
{
long lVar1;
int4 *puVar2;
ulong uVar3;
int iVar4;
int iVar5;
int1 *puVar6;
int iVar8;
int1 *puVar9;
ulong uVar10;
long in_FS_OFFSET;
bool bVar11;
int1 auStack_38 [8];
long local_30;
int1 *puVar7;
uVar10 = (ulong)(int)param_2;
puVar6... |
7,567 | func0 |
#include <assert.h>
#include <stdio.h>
| int func0(int S[], int m, int n) {
int table[n + 1][m];
for (int i = 0; i < m; i++) {
table[0][i] = 1;
}
for (int i = 1; i <= n; i++) {
for (int j = 0; j < m; j++) {
int x = (i - S[j] >= 0) ? table[i - S[j]][j] : 0;
int y = (j >= 1) ? table[i][j-1] : 0;
... | int main() {
int S1[] = {1, 2, 3};
int m1 = 3;
int n1 = 4;
assert(func0(S1, m1, n1) == 4);
int S2[] = {4, 5, 6, 7, 8, 9};
int m2 = 6;
int n2 = 9;
assert(func0(S2, m2, n2) == 2);
int S3[] = {4, 5, 6, 7, 8, 9};
int m3 = 6;
int n3 = 4;
assert(func0(S3, m3, n3... | O3 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %r14
push %r13
push %r12
push %rbx
movslq %edx,%rbx
movslq %esi,%rdx
lea 0x1(%rbx),%r13d
lea 0x0(,%rdx,4),%r12
sub $0x10,%rsp
mov %fs:0x28,%rax
mov %rax,-0x28(%rbp)
xor %eax,%eax
movslq %r13d,%rax
mov %rsp,%rcx
imul %rdx,%rax
lea 0xf(,%r... | func0:
endbr64
push rbp
movsxd r9, esi
mov rcx, r9
mov rbp, rsp
push r13
push r12
lea r12, ds:0[r9*4]
push rbx
movsxd rbx, edx
sub rsp, 18h
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
lea eax, [rbx+1]
mov rsi, rsp
cdqe
imul rax, r9
lea rax, ds:0Fh[rax*4]
m... | long long func0(long long a1, int a2, int a3)
{
long long v3; // r9
unsigned long long v5; // r12
long long v6; // rbx
long long v7; // rdx
__m128i *v8; // rsi
__int16 v9; // dx
signed long long v10; // rdx
void *v11; // rsp
unsigned int v12; // r13d
unsigned long long v13; // r11
__m128i si128; ... | func0:
ENDBR64
PUSH RBP
MOVSXD R9,ESI
MOV RCX,R9
MOV RBP,RSP
PUSH R13
PUSH R12
LEA R12,[R9*0x4]
PUSH RBX
MOVSXD RBX,EDX
SUB RSP,0x18
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
LEA EAX,[RBX + 0x1]
MOV RSI,RSP
CDQE
IMUL RAX,R9
LEA RAX,[0xf + RAX*0x4]
MOV RDX,RAX
AND RAX,-0x1000
SUB RSI,RAX
AN... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int4 func0(long param_1,uint param_2,int param_3)
{
int4 *puVar1;
long lVar2;
int *puVar3;
uint uVar4;
int8 *puVar5;
int iVar6;
int iVar7;
ulong uVar8;
int *puVar9;
int *piVar11;
int iVar12;
ulong uVar13;
lo... |
7,568 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int items[], int length) {
int tot = 1;
for (int i = 0; i < length; i++) {
tot *= items[i];
}
return tot;
}
| int main() {
int list1[] = {1, -2, 3};
int list2[] = {1, 2, 3, 4};
int list3[] = {3, 1, 2, 3};
assert(func0(list1, 3) == -6);
assert(func0(list2, 4) == 24);
assert(func0(list3, 4) == 18);
return 0;
}
| O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
movl $0x1,-0x8(%rbp)
movl $0x0,-0x4(%rbp)
jmp 11ab <func0+0x42>
mov -0x4(%rbp),%eax
cltq
lea 0x0(,%rax,4),%rdx
mov -0x18(%rbp),%rax
add %rdx,%rax
mov (%rax),%eax
mov -0x8(%rbp),%edx
imul %edx,%eax
mov ... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_8], 1
mov [rbp+var_4], 0
jmp short loc_11AB
loc_1188:
mov eax, [rbp+var_4]
cdqe
lea rdx, ds:0[rax*4]
mov rax, [rbp+var_18]
add rax, rdx
mov eax, [rax]
mov edx, [rbp+var_8]
imu... | long long func0(long long a1, int a2)
{
unsigned int v3; // [rsp+14h] [rbp-8h]
int i; // [rsp+18h] [rbp-4h]
v3 = 1;
for ( i = 0; i < a2; ++i )
v3 *= *(_DWORD *)(4LL * i + a1);
return v3;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0x8],0x1
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001011ab
LAB_00101188:
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]
MOV EDX... | int func0(long param_1,int param_2)
{
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) * local_10;
}
return local_10;
} |
7,569 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int items[], int length) {
int tot = 1;
for (int i = 0; i < length; i++) {
tot *= items[i];
}
return tot;
}
| int main() {
int list1[] = {1, -2, 3};
int list2[] = {1, 2, 3, 4};
int list3[] = {3, 1, 2, 3};
assert(func0(list1, 3) == -6);
assert(func0(list2, 4) == 24);
assert(func0(list3, 4) == 18);
return 0;
}
| O1 | c | func0:
endbr64
test %esi,%esi
jle 1190 <func0+0x27>
mov %rdi,%rax
lea -0x1(%rsi),%edx
lea 0x4(%rdi,%rdx,4),%rcx
mov $0x1,%edx
imul (%rax),%edx
add $0x4,%rax
cmp %rcx,%rax
jne 1181 <func0+0x18>
mov %edx,%eax
retq
mov $0x1,%edx
jmp 118d <func0+0x24>
| func0:
endbr64
test esi, esi
jle short loc_1190
mov rax, rdi
lea edx, [rsi-1]
lea rcx, [rdi+rdx*4+4]
mov edx, 1
loc_1181:
imul edx, [rax]
add rax, 4
cmp rax, rcx
jnz short loc_1181
loc_118D:
mov eax, edx
retn
loc_1190:
mov edx, 1
jmp short loc_118D | long long func0(_DWORD *a1, int a2)
{
_DWORD *v2; // rax
unsigned int v3; // edx
if ( a2 <= 0 )
{
return 1;
}
else
{
v2 = a1;
v3 = 1;
do
v3 *= *v2++;
while ( v2 != &a1[a2 - 1 + 1] );
}
return v3;
} | func0:
ENDBR64
TEST ESI,ESI
JLE 0x00101190
MOV RAX,RDI
LEA EDX,[RSI + -0x1]
LEA RCX,[RDI + RDX*0x4 + 0x4]
MOV EDX,0x1
LAB_00101181:
IMUL EDX,dword ptr [RAX]
ADD RAX,0x4
CMP RAX,RCX
JNZ 0x00101181
LAB_0010118d:
MOV EAX,EDX
RET
LAB_00101190:
MOV EDX,0x1
JMP 0x0010118d | int func0(int *param_1,int param_2)
{
int *piVar1;
int iVar2;
if (param_2 < 1) {
iVar2 = 1;
}
else {
piVar1 = param_1 + (ulong)(param_2 - 1) + 1;
iVar2 = 1;
do {
iVar2 = iVar2 * *param_1;
param_1 = param_1 + 1;
} while (param_1 != piVar1);
}
return iVar2;
} |
7,570 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int items[], int length) {
int tot = 1;
for (int i = 0; i < length; i++) {
tot *= items[i];
}
return tot;
}
| int main() {
int list1[] = {1, -2, 3};
int list2[] = {1, 2, 3, 4};
int list3[] = {3, 1, 2, 3};
assert(func0(list1, 3) == -6);
assert(func0(list2, 4) == 24);
assert(func0(list3, 4) == 18);
return 0;
}
| O2 | c | func0:
endbr64
test %esi,%esi
jle 1168 <func0+0x28>
lea -0x1(%rsi),%eax
lea 0x4(%rdi,%rax,4),%rdx
mov $0x1,%eax
nopl (%rax)
imul (%rdi),%eax
add $0x4,%rdi
cmp %rdx,%rdi
jne 1158 <func0+0x18>
retq
nopl (%rax)
mov $0x1,%eax
retq
xchg %ax,%ax
| func0:
endbr64
test esi, esi
jle short loc_1168
lea eax, [rsi-1]
lea rdx, [rdi+rax*4+4]
mov eax, 1
nop dword ptr [rax]
loc_1158:
imul eax, [rdi]
add rdi, 4
cmp rdi, rdx
jnz short loc_1158
retn
loc_1168:
mov eax, 1
retn | long long func0(_DWORD *a1, int a2)
{
long long v2; // rdx
long long result; // rax
if ( a2 <= 0 )
return 1LL;
v2 = (long long)&a1[a2 - 1 + 1];
LODWORD(result) = 1;
do
result = (unsigned int)(*a1++ * result);
while ( a1 != (_DWORD *)v2 );
return result;
} | func0:
ENDBR64
TEST ESI,ESI
JLE 0x00101168
LEA EAX,[RSI + -0x1]
LEA RDX,[RDI + RAX*0x4 + 0x4]
MOV EAX,0x1
NOP dword ptr [RAX]
LAB_00101158:
IMUL EAX,dword ptr [RDI]
ADD RDI,0x4
CMP RDI,RDX
JNZ 0x00101158
RET
LAB_00101168:
MOV EAX,0x1
RET | int func0(int *param_1,int param_2)
{
int *piVar1;
int iVar2;
if (0 < param_2) {
piVar1 = param_1 + (ulong)(param_2 - 1) + 1;
iVar2 = 1;
do {
iVar2 = iVar2 * *param_1;
param_1 = param_1 + 1;
} while (param_1 != piVar1);
return iVar2;
}
return 1;
} |
7,571 | func0 |
#include <stdio.h>
#include <assert.h>
| int func0(int items[], int length) {
int tot = 1;
for (int i = 0; i < length; i++) {
tot *= items[i];
}
return tot;
}
| int main() {
int list1[] = {1, -2, 3};
int list2[] = {1, 2, 3, 4};
int list3[] = {3, 1, 2, 3};
assert(func0(list1, 3) == -6);
assert(func0(list2, 4) == 24);
assert(func0(list3, 4) == 18);
return 0;
}
| O3 | c | func0:
endbr64
test %esi,%esi
jle 1208 <func0+0xc8>
lea -0x1(%rsi),%eax
cmp $0x1c,%eax
jbe 1212 <func0+0xd2>
mov %esi,%edx
movdqa 0xeae(%rip),%xmm1
mov %rdi,%rax
shr $0x2,%edx
shl $0x4,%rdx
add %rdi,%rdx
movdqu (%rax),%xmm2
movdqu (%rax),%xmm0
add $0x10,%rax
pmuludq %xmm1,%xmm2
psrlq $0... | func0:
endbr64
mov rcx, rdi
test esi, esi
jle loc_1238
lea eax, [rsi-1]
cmp eax, 1Ah
jbe loc_1240
mov edx, esi
movdqa xmm1, cs:xmmword_2010
mov rax, rdi
shr edx, 2
shl rdx, 4
add rdx, rdi
nop word ptr [rax+rax+00h]
loc_1178:
movdqu xmm2, xmmword ptr [rax]
movdqu xmm0, x... | long long func0(const __m128i *a1, int a2)
{
__m128i si128; // xmm1
const __m128i *v4; // rax
__m128i v5; // xmm2
int v6; // eax
__m128i v7; // xmm2
__m128i v8; // xmm1
unsigned int v9; // edx
char v10; // di
long long v11; // rax
int v12; // edi
if ( a2 > 0 )
{
if ( (unsigned int)(a2 - 1)... | func0:
ENDBR64
MOV RCX,RDI
TEST ESI,ESI
JLE 0x00101238
LEA EAX,[RSI + -0x1]
CMP EAX,0x1a
JBE 0x00101240
MOV EDX,ESI
MOVDQA XMM1,xmmword ptr [0x00102010]
MOV RAX,RDI
SHR EDX,0x2
SHL RDX,0x4
ADD RDX,RDI
NOP word ptr [RAX + RAX*0x1]
LAB_00101178:
MOVDQU XMM2,xmmword ptr [RAX]
MOVDQU XMM0,xmmword ptr [RAX]
ADD RAX,0x10
PMU... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
ulong func0(ulong *param_1,uint param_2)
{
ulong *puVar1;
ulong *puVar2;
uint uVar3;
ulong *puVar4;
long lVar5;
long lVar6;
int iVar7;
uint uVar8;
ulong uVar9;
ulong uVar10;
int auVar11 [16];
int4 uVar13;
ul... |
7,572 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
typedef struct {
int has_first;
int first;
int has_second;
int second;
} tuple_t;
| char* func0(tuple_t* test_list, int size) {
// Allocate sufficient memory for the result
char* res = malloc(1024);
if (!res) return NULL;
strcpy(res, "[");
int first = 1;
for(int i = 0; i < size; i++) {
int all_null = 1;
if (test_list[i].has_first) all_null = 0;
... | int main() {
// First test case
tuple_t test1[] = {
{0, 0, 1, 2},
{0, 0, 0, 0},
{1, 3, 1, 4},
{1, 12, 1, 3},
{0, 0, 0, 0}
};
char* result1 = func0(test1, 5);
assert(strcmp(result1, "[(None, 2), (3, 4), (12, 3)]") == 0);
free(result1);
// ... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x50,%rsp
mov %rdi,-0x48(%rbp)
mov %esi,-0x4c(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
mov $0x400,%edi
callq 10f0 <malloc@plt>
mov %rax,-0x28(%rbp)
cmpq $0x0,-0x28(%rbp)
jne 124a <func0+0x41>
mov $0x0,%eax
jmpq 14e6 <fu... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_48], rdi
mov [rbp+var_4C], esi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov edi, 400h; size
call _malloc
mov [rbp+s], rax
cmp [rbp+s], 0
jnz short loc_126A
mov eax, 0
jmp loc_1487
loc_126A:
... | char * func0(long long a1, int a2)
{
int v3; // [rsp+1Ch] [rbp-34h]
int i; // [rsp+20h] [rbp-30h]
_BOOL4 v5; // [rsp+24h] [rbp-2Ch]
char *s; // [rsp+28h] [rbp-28h]
char src[24]; // [rsp+30h] [rbp-20h] BYREF
unsigned long long v8; // [rsp+48h] [rbp-8h]
v8 = __readfsqword(0x28u);
s = (char *)malloc(0x400... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x48],RDI
MOV dword ptr [RBP + -0x4c],ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOV EDI,0x400
CALL 0x00101110
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x28],0x0
JNZ 0x0010126a
MOV EAX,0x0
JMP 0x00101487
... | char * func0(long param_1,int param_2)
{
bool bVar1;
char *__s;
char *pcVar2;
size_t sVar3;
long in_FS_OFFSET;
int local_38;
char local_28 [24];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
__s = (char *)malloc(0x400);
if (__s == (char *)0x0) {
__s = (char *)0x0;
}
else {
... |
7,573 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
typedef struct {
int has_first;
int first;
int has_second;
int second;
} tuple_t;
| char* func0(tuple_t* test_list, int size) {
// Allocate sufficient memory for the result
char* res = malloc(1024);
if (!res) return NULL;
strcpy(res, "[");
int first = 1;
for(int i = 0; i < size; i++) {
int all_null = 1;
if (test_list[i].has_first) all_null = 0;
... | int main() {
// First test case
tuple_t test1[] = {
{0, 0, 1, 2},
{0, 0, 0, 0},
{1, 3, 1, 4},
{1, 12, 1, 3},
{0, 0, 0, 0}
};
char* result1 = func0(test1, 5);
assert(strcmp(result1, "[(None, 2), (3, 4), (12, 3)]") == 0);
free(result1);
// ... | O1 | c | func0:
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x28,%rsp
mov %rdi,%r13
mov %esi,%r12d
mov %fs:0x28,%rax
mov %rax,0x18(%rsp)
xor %eax,%eax
mov $0x400,%edi
callq 10e0 <malloc@plt>
mov %rax,%rbp
test %rax,%rax
je 1387 <func0+0x19e>
movw $0x5b,(%... | func0:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 28h
mov r13, rdi
mov r12d, esi
mov rax, fs:28h
mov [rsp+58h+var_40], rax
xor eax, eax
mov edi, 400h
call _malloc
mov rbp, rax
test rax, rax
jz loc_13A2
mov word ptr [rax], 5Bh ;... | _WORD * func0(int *a1, int a2)
{
_WORD *v2; // rax
_WORD *v3; // rbp
int *v4; // rbx
int v5; // eax
int v6; // r12d
_QWORD v8[11]; // [rsp+0h] [rbp-58h] BYREF
v8[3] = __readfsqword(0x28u);
v2 = (_WORD *)malloc(1024LL);
v3 = v2;
if ( v2 )
{
*v2 = 91;
if ( a2 > 0 )
{
v4 = a1;
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x28
MOV R13,RDI
MOV R12D,ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x18],RAX
XOR EAX,EAX
MOV EDI,0x400
CALL 0x00101100
MOV RBP,RAX
TEST RAX,RAX
JZ 0x001013a2
MOV word ptr [RAX],0x5b
TEST R12D,R12D
JLE 0x0010138e
MOV RBX,R13
LEA EAX... | int2 * func0(int *param_1,int param_2)
{
int *piVar1;
int iVar2;
bool bVar3;
int2 *puVar4;
long in_FS_OFFSET;
int1 auStack_58 [24];
long local_40;
local_40 = *(long *)(in_FS_OFFSET + 0x28);
puVar4 = (int2 *)malloc(0x400);
if (puVar4 != (int2 *)0x0) {
*puVar4 = 0x5b;
if (0 < param_2) {
... |
7,574 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
typedef struct {
int has_first;
int first;
int has_second;
int second;
} tuple_t;
| char* func0(tuple_t* test_list, int size) {
// Allocate sufficient memory for the result
char* res = malloc(1024);
if (!res) return NULL;
strcpy(res, "[");
int first = 1;
for(int i = 0; i < size; i++) {
int all_null = 1;
if (test_list[i].has_first) all_null = 0;
... | int main() {
// First test case
tuple_t test1[] = {
{0, 0, 1, 2},
{0, 0, 0, 0},
{1, 3, 1, 4},
{1, 12, 1, 3},
{0, 0, 0, 0}
};
char* result1 = func0(test1, 5);
assert(strcmp(result1, "[(None, 2), (3, 4), (12, 3)]") == 0);
free(result1);
// ... | O2 | c | func0:
endbr64
push %r14
push %r13
push %r12
push %rbp
mov %esi,%ebp
push %rbx
mov %rdi,%rbx
mov $0x400,%edi
sub $0x20,%rsp
mov %fs:0x28,%rax
mov %rax,0x18(%rsp)
xor %eax,%eax
callq 1100 <malloc@plt>
mov %rax,%r12
test %rax,%rax
je 1771 <func0+0x2c1>
mov $0x5b,%r11d
mov %r... | func0:
endbr64
push r15
push r14
push r13
push r12
push rbp
mov ebp, esi
push rbx
mov rbx, rdi
mov edi, 400h
sub rsp, 38h
mov rax, fs:28h
mov [rsp+68h+var_40], rax
xor eax, eax
call _malloc
mov r12, rax
test rax, rax
jz loc_171A
mov r13d, 5Bh ; '['
mov ... | char * func0(_DWORD *a1, int a2)
{
_DWORD *v2; // rbx
char *v3; // rax
char *v4; // r12
int v5; // eax
char *v6; // rax
char *v7; // rax
char *v8; // rax
long long v10; // [rsp+0h] [rbp-68h]
_BYTE v11[24]; // [rsp+10h] [rbp-58h] BYREF
unsigned long long v12; // [rsp+28h] [rbp-40h]
v2 = a1;
v12 ... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV EBP,ESI
PUSH RBX
MOV RBX,RDI
MOV EDI,0x400
SUB RSP,0x38
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
CALL 0x00101140
MOV R12,RAX
TEST RAX,RAX
JZ 0x0010171a
MOV R13D,0x5b
MOV word ptr [RAX],R13W
TEST EBP,EBP
JLE 0x00101706
LEA EAX,... | char * func0(int *param_1,int param_2)
{
int *piVar1;
int iVar2;
char *__s;
size_t sVar3;
char *pcVar4;
int *piVar5;
long in_FS_OFFSET;
int1 local_58 [24];
long local_40;
local_40 = *(long *)(in_FS_OFFSET + 0x28);
__s = (char *)malloc(0x400);
if (__s != (char *)0x0) {
__s[0] = '[';
_... |
7,575 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
typedef struct {
int has_first;
int first;
int has_second;
int second;
} tuple_t;
| char* func0(tuple_t* test_list, int size) {
// Allocate sufficient memory for the result
char* res = malloc(1024);
if (!res) return NULL;
strcpy(res, "[");
int first = 1;
for(int i = 0; i < size; i++) {
int all_null = 1;
if (test_list[i].has_first) all_null = 0;
... | int main() {
// First test case
tuple_t test1[] = {
{0, 0, 1, 2},
{0, 0, 0, 0},
{1, 3, 1, 4},
{1, 12, 1, 3},
{0, 0, 0, 0}
};
char* result1 = func0(test1, 5);
assert(strcmp(result1, "[(None, 2), (3, 4), (12, 3)]") == 0);
free(result1);
// ... | O3 | c | func0:
endbr64
push %r14
push %r13
push %r12
push %rbp
mov %esi,%ebp
push %rbx
mov %rdi,%rbx
mov $0x400,%edi
sub $0x20,%rsp
mov %fs:0x28,%rax
mov %rax,0x18(%rsp)
xor %eax,%eax
callq 1100 <malloc@plt>
mov %rax,%r12
test %rax,%rax
je 16d1 <func0+0x2c1>
mov $0x5b,%r11d
mov %r... | func0:
endbr64
push r15
push r14
mov r14, rdi
mov edi, 400h; size
push r13
push r12
push rbp
push rbx
movsxd rbx, esi
sub rsp, 38h
mov rax, fs:28h
mov [rsp+68h+var_40], rax
xor eax, eax
call _malloc
mov r13, rax
test rax, rax
jz loc_164D
mov r10d, 5Bh ; '['
... | const char * func0(int *a1, int a2)
{
int *v2; // r14
char *v3; // rax
const char *v4; // r13
int v5; // eax
int *v6; // rbx
char *v7; // rax
int v8; // r8d
char *v9; // rax
char *v11; // rax
int v12; // [rsp+Ch] [rbp-5Ch]
_BYTE v13[24]; // [rsp+10h] [rbp-58h] BYREF
unsigned long long v14; // [r... | func0:
ENDBR64
PUSH R15
PUSH R14
MOV R14,RDI
MOV EDI,0x400
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOVSXD RBX,ESI
SUB RSP,0x38
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
CALL 0x00101140
MOV R13,RAX
TEST RAX,RAX
JZ 0x0010164d
MOV R10D,0x5b
MOV word ptr [RAX],R10W
TEST EBX,EBX
JLE 0x00101639
SHL R... | char * func0(int *param_1,int param_2)
{
int iVar1;
char *__s;
size_t sVar2;
char *pcVar3;
int *piVar4;
int iVar5;
int *piVar6;
long in_FS_OFFSET;
int local_58 [24];
long local_40;
local_40 = *(long *)(in_FS_OFFSET + 0x28);
__s = (char *)malloc(0x400);
if (__s != (char *)0x0) {
__s[0] ... |
7,576 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
typedef struct
{
int *elements;
int size;
} tuple;
| tuple *func0(const int *test_tup, int tup_size, int N, int *num_chunks)
{
*num_chunks = (tup_size + N - 1) / N;
tuple *res = malloc(*num_chunks * sizeof(tuple));
for (int i = 0; i < *num_chunks; i++)
{
int start = i * N;
int end = start + N < tup_size ? start + N : tup_size;
... | int main()
{
int test1[] = {10, 4, 5, 6, 7, 6, 8, 3, 4};
int num_chunks1;
tuple *chunks1 = func0(test1, sizeof(test1) / sizeof(test1[0]), 3, &num_chunks1);
assert(num_chunks1 == 3 && chunks1[0].size == 3 && chunks1[1].size == 3 && chunks1[2].size == 3);
free(chunks1);
int test2[] = {1, ... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x48,%rsp
mov %rdi,-0x38(%rbp)
mov %esi,-0x3c(%rbp)
mov %edx,-0x40(%rbp)
mov %rcx,-0x48(%rbp)
mov -0x3c(%rbp),%edx
mov -0x40(%rbp),%eax
add %edx,%eax
sub $0x1,%eax
cltd
idivl -0x40(%rbp)
mov %eax,%edx
mov -0x48(%rbp),%rax
mov... | func0:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 48h
mov [rbp+var_38], rdi
mov [rbp+var_3C], esi
mov [rbp+var_40], edx
mov [rbp+var_48], rcx
mov edx, [rbp+var_3C]
mov eax, [rbp+var_40]
add eax, edx
sub eax, 1
cdq
idiv [rbp+var_40]
mov edx, eax
mov rax, [rbp... | _QWORD * func0(long long a1, int a2, int a3, int *a4)
{
int v4; // eax
int i; // [rsp+24h] [rbp-2Ch]
int j; // [rsp+28h] [rbp-28h]
int v10; // [rsp+2Ch] [rbp-24h]
int v11; // [rsp+30h] [rbp-20h]
int v12; // [rsp+34h] [rbp-1Ch]
_QWORD *v13; // [rsp+38h] [rbp-18h]
*a4 = (a2 + a3 - 1) / a3;
v13 = malloc... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x38],RDI
MOV dword ptr [RBP + -0x3c],ESI
MOV dword ptr [RBP + -0x40],EDX
MOV qword ptr [RBP + -0x48],RCX
MOV EDX,dword ptr [RBP + -0x3c]
MOV EAX,dword ptr [RBP + -0x40]
ADD EAX,EDX
SUB EAX,0x1
CDQ
IDIV dword ptr [RBP + -0x40]
MOV EDX,EAX
M... | void * func0(long param_1,int param_2,int param_3,int *param_4)
{
int iVar1;
int iVar2;
void *pvVar3;
void *pvVar4;
int local_34;
int local_30;
*param_4 = (param_3 + param_2 + -1) / param_3;
pvVar3 = malloc((long)*param_4 << 4);
for (local_34 = 0; local_34 < *param_4; local_34 = local_34 + 1) {
... |
7,577 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
typedef struct
{
int *elements;
int size;
} tuple;
| tuple *func0(const int *test_tup, int tup_size, int N, int *num_chunks)
{
*num_chunks = (tup_size + N - 1) / N;
tuple *res = malloc(*num_chunks * sizeof(tuple));
for (int i = 0; i < *num_chunks; i++)
{
int start = i * N;
int end = start + N < tup_size ? start + N : tup_size;
... | int main()
{
int test1[] = {10, 4, 5, 6, 7, 6, 8, 3, 4};
int num_chunks1;
tuple *chunks1 = func0(test1, sizeof(test1) / sizeof(test1[0]), 3, &num_chunks1);
assert(num_chunks1 == 3 && chunks1[0].size == 3 && chunks1[1].size == 3 && chunks1[2].size == 3);
free(chunks1);
int test2[] = {1, ... | O1 | c | func0:
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x38,%rsp
mov %rdi,%rbp
mov %esi,0x18(%rsp)
mov %edx,%ebx
mov %rcx,%r14
mov %rcx,0x10(%rsp)
lea -0x1(%rsi,%rdx,1),%eax
cltd
idiv %ebx
mov %eax,(%rcx)
movslq %eax,%rdi
shl $0x4,%rdi
callq 10b0 <mallo... | func0:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov rbp, rdi
mov [rsp+78h+var_60], esi
mov ebx, edx
mov [rsp+78h+var_5C], edx
mov r14, rcx
mov [rsp+78h+var_58], rcx
lea eax, [rsi+rdx-1]
cdq
idiv ebx
mov [rcx], eax
movsxd rdi, ea... | long long func0(long long a1, long long a2, int a3, int *a4)
{
long long v6; // rdx
int v7; // kr00_4
long long v8; // rax
long long v9; // rdx
long long v10; // r13
int v11; // r12d
int v12; // r14d
long long v13; // rsi
int v14; // ebx
long long v15; // rax
long long v16; // rax
long long v18... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV RBP,RDI
MOV dword ptr [RSP + 0x18],ESI
MOV EBX,EDX
MOV dword ptr [RSP + 0x1c],EDX
MOV R14,RCX
MOV qword ptr [RSP + 0x20],RCX
LEA EAX,[RSI + RDX*0x1 + -0x1]
CDQ
IDIV EBX
MOV dword ptr [RCX],EAX
MOVSXD RDI,EAX
SHL RDI,0x4
CALL 0x001010b... | int8 * func0(long param_1,int param_2,int param_3,int *param_4)
{
int iVar1;
int8 *puVar2;
void *pvVar3;
long lVar4;
int iVar5;
int iVar6;
int8 *puVar7;
int iVar8;
long local_70;
long local_68;
iVar1 = (param_2 + -1 + param_3) / param_3;
*param_4 = iVar1;
puVar2 = (int8 *)malloc((long)iVar... |
7,578 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
typedef struct
{
int *elements;
int size;
} tuple;
| tuple *func0(const int *test_tup, int tup_size, int N, int *num_chunks)
{
*num_chunks = (tup_size + N - 1) / N;
tuple *res = malloc(*num_chunks * sizeof(tuple));
for (int i = 0; i < *num_chunks; i++)
{
int start = i * N;
int end = start + N < tup_size ? start + N : tup_size;
... | int main()
{
int test1[] = {10, 4, 5, 6, 7, 6, 8, 3, 4};
int num_chunks1;
tuple *chunks1 = func0(test1, sizeof(test1) / sizeof(test1[0]), 3, &num_chunks1);
assert(num_chunks1 == 3 && chunks1[0].size == 3 && chunks1[1].size == 3 && chunks1[2].size == 3);
free(chunks1);
int test2[] = {1, ... | O2 | c | func0:
endbr64
push %r15
lea -0x1(%rsi,%rdx,1),%eax
push %r14
mov %rcx,%r14
push %r13
push %r12
push %rbp
mov %rdi,%rbp
push %rbx
mov %edx,%ebx
sub $0x48,%rsp
mov %edx,0x1c(%rsp)
cltd
idiv %ebx
mov %esi,0x18(%rsp)
mov %rcx,0x20(%rsp)
mov %eax,(%rcx)
movslq %eax,%rdi
shl $0x4,... | func0:
endbr64
push r15
movsxd r15, edx
push r14
lea eax, [rsi+r15-1]
push r13
push r12
push rbp
mov rbp, rcx
push rbx
mov rbx, rdi
sub rsp, 38h
mov [rsp+68h+var_54], edx
cdq
idiv r15d
mov [rsp+68h+var_58], esi
mov [rsp+68h+var_50], rcx
mov [rcx], eax
movsxd rdi, e... | long long func0(long long a1, long long a2, int a3, int *a4)
{
long long v4; // r15
long long v7; // rdx
int v8; // kr00_4
long long v9; // rax
long long v10; // rdx
long long v11; // r14
long long v12; // rax
int v13; // ebp
int v14; // r15d
int v15; // r9d
int v16; // r12d
int v17; // r13d
... | func0:
ENDBR64
PUSH R15
MOVSXD R15,EDX
PUSH R14
LEA EAX,[RSI + R15*0x1 + -0x1]
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RCX
PUSH RBX
MOV RBX,RDI
SUB RSP,0x38
MOV dword ptr [RSP + 0x14],EDX
CDQ
IDIV R15D
MOV dword ptr [RSP + 0x10],ESI
MOV qword ptr [RSP + 0x18],RCX
MOV dword ptr [RCX],EAX
MOVSXD RDI,EAX
SHL RDI,0x4
CALL 0x001... | int8 * func0(void *param_1,int param_2,int param_3,int *param_4)
{
int iVar1;
int8 *puVar2;
void *__dest;
int iVar3;
int iVar4;
int iVar5;
int8 *puVar6;
int iVar7;
iVar1 = (param_2 + -1 + param_3) / param_3;
*param_4 = iVar1;
puVar2 = (int8 *)malloc((long)iVar1 << 4);
if (0 < *param_4) {
... |
7,579 | func0 |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
typedef struct
{
int *elements;
int size;
} tuple;
| tuple *func0(const int *test_tup, int tup_size, int N, int *num_chunks)
{
*num_chunks = (tup_size + N - 1) / N;
tuple *res = malloc(*num_chunks * sizeof(tuple));
for (int i = 0; i < *num_chunks; i++)
{
int start = i * N;
int end = start + N < tup_size ? start + N : tup_size;
... | int main()
{
int test1[] = {10, 4, 5, 6, 7, 6, 8, 3, 4};
int num_chunks1;
tuple *chunks1 = func0(test1, sizeof(test1) / sizeof(test1[0]), 3, &num_chunks1);
assert(num_chunks1 == 3 && chunks1[0].size == 3 && chunks1[1].size == 3 && chunks1[2].size == 3);
free(chunks1);
int test2[] = {1, ... | O3 | c | func0:
endbr64
push %r15
lea -0x1(%rsi,%rdx,1),%eax
mov %edx,%r15d
push %r14
push %r13
push %r12
mov %rcx,%r12
push %rbp
push %rbx
mov %rdi,%rbx
sub $0x28,%rsp
mov %edx,0x14(%rsp)
cltd
idiv %r15d
mov %esi,0x10(%rsp)
mov %eax,(%rcx)
movslq %eax,%rdi
shl $0x4,%rdi
callq 10d0 <mal... | func0:
endbr64
push r15
lea eax, [rsi+rdx-1]
mov r15d, edx
push r14
mov r14d, esi
push r13
push r12
mov r12, rdi
push rbp
mov rbp, rcx
push rbx
sub rsp, 38h
mov [rsp+68h+var_54], edx
cdq
idiv r15d
mov [rsp+68h+var_50], rcx
mov [rcx], eax
movsxd rdi, eax
shl ... | void * func0(char *src, int a2, int a3, int *a4)
{
int v8; // eax
void *v9; // rax
_DWORD *v10; // rbx
long long v11; // rax
int v12; // r13d
int v13; // r15d
int v14; // esi
void *v15; // rax
long long v19; // [rsp+20h] [rbp-48h]
void *v20; // [rsp+28h] [rbp-40h]
v8 = (a2 + a3 - 1) / a3;
*a4 =... | func0:
ENDBR64
PUSH R15
LEA EAX,[RSI + RDX*0x1 + -0x1]
MOV R15D,EDX
PUSH R14
MOV R14D,ESI
PUSH R13
PUSH R12
MOV R12,RDI
PUSH RBP
MOV RBP,RCX
PUSH RBX
SUB RSP,0x38
MOV dword ptr [RSP + 0x14],EDX
CDQ
IDIV R15D
MOV qword ptr [RSP + 0x18],RCX
MOV dword ptr [RCX],EAX
MOVSXD RDI,EAX
SHL RDI,0x4
CALL 0x001010d0
MOV EDX,dword ... | int8 * func0(void *param_1,int param_2,int param_3,int *param_4)
{
int iVar1;
int iVar2;
int8 *puVar3;
void *__dest;
int iVar4;
int8 *puVar5;
int iVar6;
int iVar7;
iVar2 = (param_2 + -1 + param_3) / param_3;
*param_4 = iVar2;
puVar3 = (int8 *)malloc((long)iVar2 << 4);
if (*param_4 < 1) {
... |
7,580 | func0 | #include <assert.h>
// Function to find max product pairs in an array
| void func0(int arr[], int arr_len, int *x, int *y) {
if (arr_len < 2) {
*x = 0;
*y = 0;
return;
}
*x = arr[0];
*y = arr[1];
for (int i = 0; i < arr_len; i++) {
for (int j = i + 1; j < arr_len; j++) {
if (arr[i] * arr[j] > (*x) * (*y))... | int main() {
int x, y;
// Test Case 1
int arr1[] = {1, 2, 3, 4, 7, 0, 8, 4};
func0(arr1, 8, &x, &y);
assert(x == 7 && y == 8);
// Test Case 2
int arr2[] = {0, -1, -2, -4, 5, 0, -6};
func0(arr2, 7, &x, &y);
assert(x == -4 && y == -6);
// Test Case 3
int arr3[]... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
mov %rdx,-0x28(%rbp)
mov %rcx,-0x30(%rbp)
cmpl $0x1,-0x1c(%rbp)
jg 119f <func0+0x36>
mov -0x28(%rbp),%rax
movl $0x0,(%rax)
mov -0x30(%rbp),%rax
movl $0x0,(%rax)
jmpq 1269 <func0+0x100>
mov -0x18(%rbp),... | 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_30], rcx
cmp [rbp+var_1C], 1
jg short loc_119F
mov rax, [rbp+var_28]
mov dword ptr [rax], 0
mov rax, [rbp+var_30]
mov dword ptr [rax], 0
jmp loc_126E
lo... | unsigned long long func0(_DWORD *a1, int a2, _DWORD *a3, _DWORD *a4)
{
unsigned long long result; // rax
int i; // [rsp+28h] [rbp-8h]
int j; // [rsp+2Ch] [rbp-4h]
if ( a2 > 1 )
{
*a3 = *a1;
*a4 = a1[1];
for ( i = 0; ; ++i )
{
result = (unsigned int)i;
if ( i >= a2 )
break... | 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 qword ptr [RBP + -0x30],RCX
CMP dword ptr [RBP + -0x1c],0x1
JG 0x0010119f
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX],0x... | void func0(int *param_1,int param_2,int *param_3,int *param_4)
{
int local_10;
int local_c;
if (param_2 < 2) {
*param_3 = 0;
*param_4 = 0;
}
else {
*param_3 = *param_1;
*param_4 = param_1[1];
for (local_10 = 0; local_c = local_10, local_10 < param_2; local_10 = local_10 + 1) {
wh... |
7,581 | func0 | #include <assert.h>
// Function to find max product pairs in an array
| void func0(int arr[], int arr_len, int *x, int *y) {
if (arr_len < 2) {
*x = 0;
*y = 0;
return;
}
*x = arr[0];
*y = arr[1];
for (int i = 0; i < arr_len; i++) {
for (int j = i + 1; j < arr_len; j++) {
if (arr[i] * arr[j] > (*x) * (*y))... | int main() {
int x, y;
// Test Case 1
int arr1[] = {1, 2, 3, 4, 7, 0, 8, 4};
func0(arr1, 8, &x, &y);
assert(x == 7 && y == 8);
// Test Case 2
int arr2[] = {0, -1, -2, -4, 5, 0, -6};
func0(arr2, 7, &x, &y);
assert(x == -4 && y == -6);
// Test Case 3
int arr3[]... | O1 | c | func0:
endbr64
cmp $0x1,%esi
jle 118e <func0+0x25>
push %rbp
push %rbx
mov (%rdi),%eax
mov %eax,(%rdx)
mov 0x4(%rdi),%eax
mov %eax,(%rcx)
mov $0x0,%ebx
mov $0x1,%ebp
mov $0x1,%eax
jmp 11a2 <func0+0x39>
movl $0x0,(%rdx)
movl $0x0,(%rcx)
retq
add $0x1,%eax
cmp %eax,%esi
jle ... | func0:
endbr64
mov r10, rdx
mov r9, rcx
cmp esi, 1
jle short loc_1197
push rbp
push rbx
mov r11d, esi
mov eax, [rdi]
mov [rdx], eax
mov eax, [rdi+4]
mov [rcx], eax
mov ebx, 0
mov ebp, 1
mov eax, 1
jmp short loc_11AC
loc_1197:
mov dword ptr [rdx], 0
mov d... | void func0(_DWORD *a1, int a2, _DWORD *a3, _DWORD *a4)
{
int v5; // ebx
int v6; // ebp
int v7; // eax
_DWORD *v8; // rcx
if ( a2 <= 1 )
{
*a3 = 0;
*a4 = 0;
}
else
{
*a3 = *a1;
*a4 = a1[1];
v5 = 0;
v6 = 1;
v7 = 1;
while ( 1 )
{
do
{
v8 = &a1[v7]... | func0:
ENDBR64
MOV R10,RDX
MOV R9,RCX
CMP ESI,0x1
JLE 0x00101197
PUSH RBP
PUSH RBX
MOV R11D,ESI
MOV EAX,dword ptr [RDI]
MOV dword ptr [RDX],EAX
MOV EAX,dword ptr [RDI + 0x4]
MOV dword ptr [RCX],EAX
MOV EBX,0x0
MOV EBP,0x1
MOV EAX,0x1
JMP 0x001011ac
LAB_00101197:
MOV dword ptr [RDX],0x0
MOV dword ptr [RCX],0x0
RET
LAB_0... | void func0(int *param_1,int param_2,int *param_3,int *param_4)
{
int iVar1;
int iVar2;
int iVar3;
if (param_2 < 2) {
*param_3 = 0;
*param_4 = 0;
return;
}
*param_3 = *param_1;
*param_4 = param_1[1];
iVar1 = 1;
iVar2 = 0;
iVar3 = 1;
do {
if (*param_3 * *param_4 < param_1[iVar2] ... |
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.