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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
1,294 | func0 | #include <stdio.h>
| void func0(int number, int need, int remaining, int result[2]) {
if (need > remaining) {
result[0] = number + remaining;
result[1] = 0;
} else {
result[0] = number + need;
result[1] = remaining - need;
}
} | #include <assert.h>
int issame(int a[2], int b[2]) {
return a[0] == b[0] && a[1] == b[1];
}
int main() {
int result[2];
func0(5, 6, 10, result);
assert(issame(result, (const int[]){11, 4}));
func0(4, 8, 9, result);
assert(issame(result, (const int[]){12, 1}));
func0(1, 10, 10, result);
... | O2 | c | func0:
endbr64
cmp %edx,%esi
jle 1158 <func0+0x18>
add %edi,%edx
movl $0x0,0x4(%rcx)
mov %edx,(%rcx)
retq
nopl 0x0(%rax)
add %esi,%edi
sub %esi,%edx
mov %edi,(%rcx)
mov %edx,0x4(%rcx)
retq
data16 nopw %cs:0x0(%rax,%rax,1)
nopl (%rax)
| func0:
endbr64
cmp esi, edx
jle short loc_1158
add edi, edx
xor edx, edx
mov [rcx+4], edx
mov [rcx], edi
retn
loc_1158:
add edi, esi
sub edx, esi
mov [rcx+4], edx
mov [rcx], edi
retn | void func0(int a1, int a2, int a3, _DWORD *a4)
{
if ( a2 <= a3 )
{
a4[1] = a3 - a2;
*a4 = a2 + a1;
}
else
{
*(_QWORD *)a4 = (unsigned int)(a3 + a1);
}
} | func0:
ENDBR64
CMP ESI,EDX
JLE 0x00101158
ADD EDI,EDX
XOR EDX,EDX
MOV dword ptr [RCX + 0x4],EDX
MOV dword ptr [RCX],EDI
RET
LAB_00101158:
ADD EDI,ESI
SUB EDX,ESI
MOV dword ptr [RCX + 0x4],EDX
MOV dword ptr [RCX],EDI
RET | void func0(int param_1,int param_2,int param_3,int *param_4)
{
if (param_3 < param_2) {
param_4[1] = 0;
*param_4 = param_1 + param_3;
return;
}
param_4[1] = param_3 - param_2;
*param_4 = param_1 + param_2;
return;
} |
1,295 | func0 | #include <stdio.h>
| void func0(int number, int need, int remaining, int result[2]) {
if (need > remaining) {
result[0] = number + remaining;
result[1] = 0;
} else {
result[0] = number + need;
result[1] = remaining - need;
}
} | #include <assert.h>
int issame(int a[2], int b[2]) {
return a[0] == b[0] && a[1] == b[1];
}
int main() {
int result[2];
func0(5, 6, 10, result);
assert(issame(result, (const int[]){11, 4}));
func0(4, 8, 9, result);
assert(issame(result, (const int[]){12, 1}));
func0(1, 10, 10, result);
... | O3 | c | func0:
endbr64
cmp %edx,%esi
jle 1158 <func0+0x18>
add %edx,%edi
xor %edx,%edx
mov %edx,0x4(%rcx)
mov %edi,(%rcx)
retq
nopw 0x0(%rax,%rax,1)
add %esi,%edi
sub %esi,%edx
mov %edx,0x4(%rcx)
mov %edi,(%rcx)
retq
data16 nopw %cs:0x0(%rax,%rax,1)
nopl (%rax)
| func0:
endbr64
cmp esi, edx
jle short loc_1158
add edi, edx
xor edx, edx
mov [rcx+4], edx
mov [rcx], edi
retn
loc_1158:
add edi, esi
sub edx, esi
mov [rcx+4], edx
mov [rcx], edi
retn | void func0(int a1, int a2, int a3, _DWORD *a4)
{
if ( a2 <= a3 )
{
a4[1] = a3 - a2;
*a4 = a2 + a1;
}
else
{
*(_QWORD *)a4 = (unsigned int)(a3 + a1);
}
} | func0:
ENDBR64
CMP ESI,EDX
JLE 0x00101158
ADD EDI,EDX
XOR EDX,EDX
MOV dword ptr [RCX + 0x4],EDX
MOV dword ptr [RCX],EDI
RET
LAB_00101158:
ADD EDI,ESI
SUB EDX,ESI
MOV dword ptr [RCX + 0x4],EDX
MOV dword ptr [RCX],EDI
RET | void func0(int param_1,int param_2,int param_3,int *param_4)
{
if (param_3 < param_2) {
param_4[1] = 0;
*param_4 = param_1 + param_3;
return;
}
param_4[1] = param_3 - param_2;
*param_4 = param_1 + param_2;
return;
} |
1,296 | func0 | #include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
| int func0(const char **operato, const int *operand, int operato_size, int operand_size) {
int *num = (int*)malloc(operand_size * sizeof(int));
int *posto = (int*)malloc(operand_size * sizeof(int));
for (int i = 0; i < operand_size; i++) {
num[i] = operand[i];
posto[i] = i;
}
for (int... | #include <assert.h>
int main() {
const char *operators1[] = {"**", "*", "+"};
int operands1[] = {2, 3, 4, 5};
assert(func0(operators1, operands1, 3, 4) == 37);
const char *operators2[] = {"+", "*", "-"};
int operands2[] = {2, 3, 4, 5};
assert(func0(operators2, operands2, 3, 4) == 9);
cons... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x50,%rsp
mov %rdi,-0x38(%rbp)
mov %rsi,-0x40(%rbp)
mov %edx,-0x44(%rbp)
mov %ecx,-0x48(%rbp)
mov -0x48(%rbp),%eax
cltq
shl $0x2,%rax
mov %rax,%rdi
callq 10f0 <malloc@plt>
mov %rax,-0x10(%rbp)
mov -0x48(%rbp),%eax
cltq
shl $0x2,%rax
mov ... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_38], rdi
mov [rbp+var_40], rsi
mov [rbp+var_44], edx
mov [rbp+var_48], ecx
mov eax, [rbp+var_48]
cdqe
shl rax, 2
mov rdi, rax; size
call _malloc
mov [rbp+ptr], rax
mov eax, [rbp+var_48]
cdqe
shl rax, 2
m... | long long func0(long long a1, long long a2, int a3, int a4)
{
long long v4; // rsi
int v5; // eax
int i; // [rsp+2Ch] [rbp-24h]
int j; // [rsp+30h] [rbp-20h]
int k; // [rsp+34h] [rbp-1Ch]
int m; // [rsp+38h] [rbp-18h]
unsigned int v13; // [rsp+3Ch] [rbp-14h]
unsigned int *ptr; // [rsp+40h] [rbp-10h]
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x38],RDI
MOV qword ptr [RBP + -0x40],RSI
MOV dword ptr [RBP + -0x44],EDX
MOV dword ptr [RBP + -0x48],ECX
MOV EAX,dword ptr [RBP + -0x48]
CDQE
SHL RAX,0x2
MOV RDI,RAX
CALL 0x001010f0
MOV qword ptr [RBP + -0x10],RAX
MOV EAX,dword ptr [RBP + -0x48]
CD... | int4 func0(long param_1,long param_2,int param_3,int param_4)
{
int4 uVar1;
int iVar2;
int4 *__ptr;
void *__ptr_00;
double dVar3;
int local_2c;
int local_28;
int local_24;
int local_20;
__ptr = (int4 *)malloc((long)param_4 << 2);
__ptr_00 = malloc((long)param_4 << 2);
for (local_2c = 0; loca... |
1,297 | func0 | #include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
| int func0(const char **operato, const int *operand, int operato_size, int operand_size) {
int *num = (int*)malloc(operand_size * sizeof(int));
int *posto = (int*)malloc(operand_size * sizeof(int));
for (int i = 0; i < operand_size; i++) {
num[i] = operand[i];
posto[i] = i;
}
for (int... | #include <assert.h>
int main() {
const char *operators1[] = {"**", "*", "+"};
int operands1[] = {2, 3, 4, 5};
assert(func0(operators1, operands1, 3, 4) == 37);
const char *operators2[] = {"+", "*", "-"};
int operands2[] = {2, 3, 4, 5};
assert(func0(operators2, operands2, 3, 4) == 9);
cons... | O1 | c | func0:
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x38,%rsp
mov %rdi,0x20(%rsp)
mov %rsi,%r13
mov %edx,%ebp
mov %ecx,%r14d
movslq %ecx,%rbx
shl $0x2,%rbx
mov %rbx,%rdi
callq 10d0 <malloc@plt>
mov %rax,%r12
mov %rbx,%rdi
callq 10d0 <malloc@plt>
mov ... | func0:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 38h
mov [rsp+68h+var_40], rdi
mov rbp, rsi
mov r12d, edx
mov r15d, ecx
movsxd r14, ecx
lea rbx, ds:0[r14*4]
mov rdi, rbx; size
call _malloc
mov r13, rax
mov rdi, rbx; size
call _mal... | long long func0(const char **a1, long long a2, int a3, int a4)
{
long long v6; // r14
size_t v7; // rbx
unsigned int *v8; // r13
int *v9; // rbx
long long v10; // rax
const char **v11; // r15
int *v12; // r14
int *v13; // r12
int *v14; // rdi
int v15; // eax
int v16; // edx
int v17; // edx
lo... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RDI
MOV RBP,RSI
MOV R12D,EDX
MOV R15D,ECX
MOVSXD R14,ECX
LEA RBX,[R14*0x4]
MOV RDI,RBX
CALL 0x001010f0
MOV R13,RAX
MOV RDI,RBX
CALL 0x001010f0
MOV RBX,RAX
TEST R15D,R15D
JLE 0x00101249
MOV EAX,0x0
LAB_00101234:
... | int4 func0(int8 *param_1,long param_2,int param_3,int param_4)
{
int *piVar1;
size_t __size;
int4 uVar2;
char *pcVar3;
int iVar4;
int4 *__ptr;
int *__ptr_00;
long lVar5;
int *piVar6;
int8 *puVar7;
int *piVar8;
bool bVar9;
double dVar10;
int8 *local_50;
int8 *local_48;
__size = (long)... |
1,298 | func0 | #include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
| int func0(const char **operato, const int *operand, int operato_size, int operand_size) {
int *num = (int*)malloc(operand_size * sizeof(int));
int *posto = (int*)malloc(operand_size * sizeof(int));
for (int i = 0; i < operand_size; i++) {
num[i] = operand[i];
posto[i] = i;
}
for (int... | #include <assert.h>
int main() {
const char *operators1[] = {"**", "*", "+"};
int operands1[] = {2, 3, 4, 5};
assert(func0(operators1, operands1, 3, 4) == 37);
const char *operators2[] = {"+", "*", "-"};
int operands2[] = {2, 3, 4, 5};
assert(func0(operators2, operands2, 3, 4) == 9);
cons... | O2 | c | func0:
endbr64
push %r15
push %r14
mov %rdi,%r14
push %r13
push %r12
push %rbp
movslq %ecx,%rbp
push %rbx
mov %rbp,%r13
shl $0x2,%rbp
mov %rsi,%rbx
mov %rbp,%rdi
sub $0x18,%rsp
mov %edx,0x8(%rsp)
callq 10d0 <malloc@plt>
mov %rbp,%rdi
mov %rax,%r12
callq 10d0 <malloc@plt>
mov ... | func0:
endbr64
push r15
movsxd r15, ecx
push r14
mov r14d, edx
push r13
push r12
push rbp
mov rbp, rsi
push rbx
lea rbx, ds:0[r15*4]
sub rsp, 28h
mov [rsp+58h+var_48], rdi
mov rdi, rbx; size
call _malloc
mov rdi, rbx; size
mov r12, rax
call _malloc
mov rbx, r... | long long func0(unsigned __int8 **a1, const void *a2, int a3, int a4)
{
long long v4; // r15
size_t v6; // rbx
_DWORD *v7; // r12
int *v8; // rbx
long long v9; // rax
long long v10; // rdx
int *v11; // rdx
unsigned __int8 **v12; // r13
unsigned __int8 **v13; // r14
unsigned __int8 *v14; // rax
lo... | func0:
ENDBR64
PUSH R15
MOVSXD R15,ECX
PUSH R14
MOV R14D,EDX
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RSI
PUSH RBX
LEA RBX,[R15*0x4]
SUB RSP,0x28
MOV qword ptr [RSP + 0x10],RDI
MOV RDI,RBX
CALL 0x001010f0
MOV RDI,RBX
MOV R12,RAX
CALL 0x001010f0
MOV RBX,RAX
TEST R15D,R15D
JLE 0x00101423
MOV EDX,R15D
MOV RSI,RBP
MOV RDI,R12
SH... | int4 func0(int8 *param_1,void *param_2,int param_3,uint param_4)
{
byte bVar1;
char cVar2;
int4 uVar3;
char *pcVar4;
byte *pbVar5;
int iVar6;
int iVar7;
int4 *__dest;
int *__ptr;
ulong uVar8;
long lVar9;
int8 *puVar10;
int *piVar11;
int *piVar12;
uint uVar13;
int iVar14;
ulong uVar15;... |
1,299 | func0 | #include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
| int func0(const char **operato, const int *operand, int operato_size, int operand_size) {
int *num = (int*)malloc(operand_size * sizeof(int));
int *posto = (int*)malloc(operand_size * sizeof(int));
for (int i = 0; i < operand_size; i++) {
num[i] = operand[i];
posto[i] = i;
}
for (int... | #include <assert.h>
int main() {
const char *operators1[] = {"**", "*", "+"};
int operands1[] = {2, 3, 4, 5};
assert(func0(operators1, operands1, 3, 4) == 37);
const char *operators2[] = {"+", "*", "-"};
int operands2[] = {2, 3, 4, 5};
assert(func0(operators2, operands2, 3, 4) == 9);
cons... | O3 | c | func0:
endbr64
push %r15
mov %rsi,%r15
push %r14
mov %rdi,%r14
push %r13
mov %edx,%r13d
push %r12
push %rbp
movslq %ecx,%rbp
push %rbx
mov %rbp,%rbx
shl $0x2,%rbp
mov %rbp,%rdi
sub $0x18,%rsp
callq 10f0 <malloc@plt>
mov %rbp,%rdi
mov %rax,%r12
callq 10f0 <malloc@plt>
mov %rax... | func0:
endbr64
push r15
mov r15, rsi
push r14
push r13
mov r13d, edx
push r12
push rbp
push rbx
movsxd rbx, ecx
mov r14, rbx
shl rbx, 2
sub rsp, 28h
mov [rsp+58h+var_48], rdi
mov rdi, rbx; size
call _malloc
mov rdi, rbx; size
mov r12, rax
call _malloc
mov ... | long long func0(unsigned __int8 **a1, const void *a2, int a3, int a4)
{
size_t v6; // rbx
_DWORD *v7; // r12
int *v8; // rbx
__m128i si128; // xmm0
__m128i v10; // xmm2
__m128i *v11; // rax
__m128i v12; // xmm1
int v13; // eax
long long v14; // rcx
int v15; // edx
int v16; // eax
int *v17; // r... | func0:
ENDBR64
PUSH R15
MOV R15,RSI
PUSH R14
PUSH R13
MOV R13D,EDX
PUSH R12
PUSH RBP
PUSH RBX
MOVSXD RBX,ECX
MOV R14,RBX
SHL RBX,0x2
SUB RSP,0x28
MOV qword ptr [RSP + 0x10],RDI
MOV RDI,RBX
CALL 0x001010f0
MOV RDI,RBX
MOV R12,RAX
CALL 0x001010f0
MOV RBX,RAX
TEST R14D,R14D
JLE 0x0010146f
MOV EDX,R14D
MOV RSI,R15
MOV RDI,... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int4 func0(int8 *param_1,void *param_2,int param_3,uint param_4)
{
byte bVar1;
char cVar2;
int4 uVar3;
char *pcVar4;
byte *pbVar5;
int iVar6;
uint uVar7;
int iVar8;
int iVar9;
int4 *__dest;
int (*__ptr) [16];
... |
1,300 | func0 | #include <stdio.h>
#include <string.h>
#include <ctype.h>
| char* func0(char *s){
int nletter = 0;
int length = strlen(s);
for (int i = 0; i < length; i++) {
if (isalpha((unsigned char)s[i])) {
if (isupper((unsigned char)s[i])) s[i] = tolower((unsigned char)s[i]);
else if (islower((unsigned char)s[i])) s[i] = toupper((unsigned char)s[... | #include <assert.h>
#include <string.h>
int main(){
char test1[] = "AsDf";
assert(strcmp(func0(test1), "aSdF") == 0);
char test2[] = "1234";
assert(strcmp(func0(test2), "4321") == 0);
char test3[] = "ab";
assert(strcmp(func0(test3), "AB") == 0);
char test4[] = "#a@C";
assert(strcmp(f... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x30,%rsp
mov %rdi,-0x28(%rbp)
movl $0x0,-0x10(%rbp)
mov -0x28(%rbp),%rax
mov %rax,%rdi
callq 10c0 <strlen@plt>
mov %eax,-0x4(%rbp)
movl $0x0,-0xc(%rbp)
jmpq 1335 <func0+0x12c>
callq 1110 <__ctype_b_loc@plt>
mov (%rax),%rax
mov -0xc(%rbp),%ed... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+s], rdi
mov [rbp+var_10], 0
mov rax, [rbp+s]
mov rdi, rax; s
call _strlen
mov [rbp+var_4], eax
mov [rbp+var_C], 0
jmp loc_1335
loc_123B:
call ___ctype_b_loc
mov rax, [rax]
mov edx, [rbp+var_C]
movsxd rcx, ed... | const char * func0(const char *a1)
{
char v2; // [rsp+1Fh] [rbp-11h]
int v3; // [rsp+20h] [rbp-10h]
int i; // [rsp+24h] [rbp-Ch]
int j; // [rsp+28h] [rbp-8h]
int v6; // [rsp+2Ch] [rbp-4h]
v3 = 0;
v6 = strlen(a1);
for ( i = 0; i < v6; ++i )
{
if ( ((*__ctype_b_loc())[(unsigned __int8)a1[i]] & 0x40... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x28],RDI
MOV dword ptr [RBP + -0x10],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,RAX
CALL 0x001010c0
MOV dword ptr [RBP + -0x4],EAX
MOV dword ptr [RBP + -0xc],0x0
JMP 0x00101335
LAB_0010123b:
CALL 0x00101110
MOV RAX,qword ptr [RAX]
MOV EDX,dword pt... | char * func0(char *param_1)
{
char cVar1;
int iVar2;
int iVar3;
size_t sVar4;
ushort **ppuVar5;
int local_18;
int local_14;
int local_10;
local_18 = 0;
sVar4 = strlen(param_1);
iVar2 = (int)sVar4;
for (local_14 = 0; local_14 < iVar2; local_14 = local_14 + 1) {
ppuVar5 = __ctype_b_loc();
... |
1,301 | func0 | #include <stdio.h>
#include <string.h>
#include <ctype.h>
| char* func0(char *s){
int nletter = 0;
int length = strlen(s);
for (int i = 0; i < length; i++) {
if (isalpha((unsigned char)s[i])) {
if (isupper((unsigned char)s[i])) s[i] = tolower((unsigned char)s[i]);
else if (islower((unsigned char)s[i])) s[i] = toupper((unsigned char)s[... | #include <assert.h>
#include <string.h>
int main(){
char test1[] = "AsDf";
assert(strcmp(func0(test1), "aSdF") == 0);
char test2[] = "1234";
assert(strcmp(func0(test2), "4321") == 0);
char test3[] = "ab";
assert(strcmp(func0(test3), "AB") == 0);
char test4[] = "#a@C";
assert(strcmp(f... | O1 | c | func0:
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %rdi,%r12
mov $0xffffffffffffffff,%rcx
mov $0x0,%eax
repnz scas %es:(%rdi),%al
not %rcx
lea -0x1(%rcx),%r14
mov %r14,0x8(%rsp)
test %r14d,%r14d
jle 126a <func0+0xa1>
callq 10d0 <__ctype_b... | func0:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 18h
mov r12, rdi
call _strlen
mov [rsp+48h+var_40], rax
test eax, eax
jle short loc_129F
mov r14, rax
call ___ctype_b_loc
mov r13, rax
mov rbx, r12
lea eax, [r14-1]
lea r15, [r12+... | const char * func0(const char *a1)
{
int v1; // eax
int v2; // r14d
const unsigned __int16 **v3; // r13
char *v4; // rbx
long long v5; // r15
int v6; // r14d
long long v7; // rbp
unsigned __int16 v8; // ax
char *v10; // rdx
long long v11; // rax
char v12; // cl
int v13; // [rsp+8h] [rbp-40h]
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV R12,RDI
CALL 0x001010c0
MOV qword ptr [RSP + 0x8],RAX
TEST EAX,EAX
JLE 0x0010129f
MOV R14,RAX
CALL 0x00101110
MOV R13,RAX
MOV RBX,R12
LEA EAX,[R14 + -0x1]
LEA R15,[R12 + RAX*0x1 + 0x1]
MOV R14D,0x0
JMP 0x00101270
LAB_0010124b:
TEST AH... | byte * func0(byte *param_1)
{
byte bVar1;
ushort uVar2;
int iVar3;
size_t sVar4;
ushort **ppuVar5;
__int32_t **pp_Var6;
long lVar7;
byte *pbVar8;
int iVar9;
sVar4 = strlen((char *)param_1);
iVar3 = (int)sVar4;
if (0 < iVar3) {
ppuVar5 = __ctype_b_loc();
iVar9 = 0;
pbVar8 = param_... |
1,302 | func0 | #include <stdio.h>
#include <string.h>
#include <ctype.h>
| char* func0(char *s){
int nletter = 0;
int length = strlen(s);
for (int i = 0; i < length; i++) {
if (isalpha((unsigned char)s[i])) {
if (isupper((unsigned char)s[i])) s[i] = tolower((unsigned char)s[i]);
else if (islower((unsigned char)s[i])) s[i] = toupper((unsigned char)s[... | #include <assert.h>
#include <string.h>
int main(){
char test1[] = "AsDf";
assert(strcmp(func0(test1), "aSdF") == 0);
char test2[] = "1234";
assert(strcmp(func0(test2), "4321") == 0);
char test3[] = "ab";
assert(strcmp(func0(test3), "AB") == 0);
char test4[] = "#a@C";
assert(strcmp(f... | O2 | c | func0:
endbr64
push %r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x18,%rsp
callq 10b0 <strlen@plt>
mov %rax,0x8(%rsp)
test %eax,%eax
jle 15d0 <func0+0x100>
mov %rax,%r15
mov %r12,%rbx
callq 10f0 <__ctype_b_loc@plt>
mov %rax,%r14
lea -0x1(%r15),%eax
xo... | func0:
endbr64
push r15
push r14
push r13
push r12
mov r12, rdi
push rbp
push rbx
sub rsp, 18h
call _strlen
mov [rsp+48h+var_40], rax
test eax, eax
jle short loc_153E
mov r15, rax
mov rbx, r12
call ___ctype_b_loc
mov r14, rax
lea eax, [r15-1]
xor r15d, r15d... | const char * func0(const char *a1)
{
int v1; // eax
int v2; // r15d
char *v3; // rbx
const unsigned __int16 **v4; // r14
long long v5; // rax
int v6; // r15d
long long v7; // r13
long long v8; // rbp
unsigned __int16 v9; // ax
long long v11; // rax
const char *v12; // rdx
char v13; // si
char ... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
MOV R12,RDI
PUSH RBP
PUSH RBX
SUB RSP,0x18
CALL 0x001010c0
MOV qword ptr [RSP + 0x8],RAX
TEST EAX,EAX
JLE 0x0010153e
MOV R15,RAX
MOV RBX,R12
CALL 0x00101110
MOV R14,RAX
LEA EAX,[R15 + -0x1]
XOR R15D,R15D
LEA R13,[R12 + RAX*0x1 + 0x1]
JMP 0x0010151b
LAB_00101500:
TEST A... | byte * func0(byte *param_1)
{
byte bVar1;
ushort uVar2;
int iVar3;
size_t sVar4;
ushort **ppuVar5;
__int32_t **pp_Var6;
long lVar7;
byte *pbVar8;
int iVar9;
sVar4 = strlen((char *)param_1);
iVar3 = (int)sVar4;
if (0 < iVar3) {
ppuVar5 = __ctype_b_loc();
iVar9 = 0;
pbVar8 = param_... |
1,303 | func0 | #include <stdio.h>
#include <string.h>
#include <ctype.h>
| char* func0(char *s){
int nletter = 0;
int length = strlen(s);
for (int i = 0; i < length; i++) {
if (isalpha((unsigned char)s[i])) {
if (isupper((unsigned char)s[i])) s[i] = tolower((unsigned char)s[i]);
else if (islower((unsigned char)s[i])) s[i] = toupper((unsigned char)s[... | #include <assert.h>
#include <string.h>
int main(){
char test1[] = "AsDf";
assert(strcmp(func0(test1), "aSdF") == 0);
char test2[] = "1234";
assert(strcmp(func0(test2), "4321") == 0);
char test3[] = "ab";
assert(strcmp(func0(test3), "AB") == 0);
char test4[] = "#a@C";
assert(strcmp(f... | O3 | c | func0:
endbr64
push %r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x18,%rsp
callq 10b0 <strlen@plt>
mov %rax,0x8(%rsp)
test %eax,%eax
jle 15d0 <func0+0x100>
mov %rax,%r15
mov %r12,%rbx
callq 10f0 <__ctype_b_loc@plt>
mov %rax,%r14
lea -0x1(%r15),%eax
xo... | func0:
endbr64
push r15
push r14
push r13
push r12
mov r12, rdi
push rbp
push rbx
sub rsp, 18h
call _strlen
mov [rsp+48h+var_40], rax
test eax, eax
jle short loc_153E
mov r15, rax
mov rbx, r12
call ___ctype_b_loc
mov r14, rax
lea eax, [r15-1]
xor r15d, r15d... | const char * func0(const char *a1)
{
int v1; // eax
int v2; // r15d
char *v3; // rbx
const unsigned __int16 **v4; // r14
long long v5; // rax
int v6; // r15d
long long v7; // r13
long long v8; // rbp
unsigned __int16 v9; // ax
long long v11; // rax
const char *v12; // rdx
char v13; // si
char ... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
MOV R12,RDI
PUSH RBP
PUSH RBX
SUB RSP,0x18
CALL 0x001010c0
MOV qword ptr [RSP + 0x8],RAX
TEST EAX,EAX
JLE 0x0010153e
MOV R15,RAX
MOV RBX,R12
CALL 0x00101110
MOV R14,RAX
LEA EAX,[R15 + -0x1]
XOR R15D,R15D
LEA R13,[R12 + RAX*0x1 + 0x1]
JMP 0x0010151b
LAB_00101500:
TEST A... | byte * func0(byte *param_1)
{
byte bVar1;
ushort uVar2;
int iVar3;
size_t sVar4;
ushort **ppuVar5;
__int32_t **pp_Var6;
long lVar7;
byte *pbVar8;
int iVar9;
sVar4 = strlen((char *)param_1);
iVar3 = (int)sVar4;
if (0 < iVar3) {
ppuVar5 = __ctype_b_loc();
iVar9 = 0;
pbVar8 = param_... |
1,304 | func0 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
| // CRC32 function
char* func0(const char* text) {
if(strlen(text) == 0) {
return strdup("None");
}
unsigned int crc = 0xFFFFFFFF;
unsigned int i, j;
unsigned char byte;
for(i = 0; text[i] != '\0'; i++) {
byte = text[i];
crc = crc ^ byte;
for(j = 0; j < 8; j++) ... | #include <stdio.h>
#include <assert.h>
#include <string.h>
int main() {
char* result;
// Test 1
result = func0("Hello world");
assert(strcmp(result, "8BD69E52") == 0);
free(result); // Free the allocated memory
// Test 2
result = func0("");
assert(strcmp(result, "None") == 0);
free(result); // Free... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
sub $0x30,%rsp
mov %rdi,-0x28(%rbp)
mov -0x28(%rbp),%rax
movzbl (%rax),%eax
test %al,%al
jne 1215 <func0+0x2c>
lea 0xdfd(%rip),%rdi
callq 10f0 <strdup@plt>
jmpq 12b7 <func0+0xce>
movl $0xffffffff,-0x14(%rbp)
movl $0x0,-0x10(%rbp)
jmp 126f <func0+0x8... | func0:
endbr64
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_28], rdi
mov rax, [rbp+var_28]
movzx eax, byte ptr [rax]
test al, al
jnz short loc_1218
lea rax, s; "None"
mov rdi, rax; s
call _strdup
jmp locret_12BD
loc_1218:
mov [rbp+var_14], 0FFFFFFFFh
mov [rbp+var_10... | char * func0(_BYTE *a1)
{
unsigned int v2; // [rsp+1Ch] [rbp-14h]
int v3; // [rsp+1Ch] [rbp-14h]
int i; // [rsp+20h] [rbp-10h]
unsigned int j; // [rsp+24h] [rbp-Ch]
char *s; // [rsp+28h] [rbp-8h]
if ( !*a1 )
return strdup("None");
v2 = -1;
for ( i = 0; a1[i]; ++i )
{
v2 ^= (unsigned __int8)a1... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x28],RDI
MOV RAX,qword ptr [RBP + -0x28]
MOVZX EAX,byte ptr [RAX]
TEST AL,AL
JNZ 0x00101218
LEA RAX,[0x102008]
MOV RDI,RAX
CALL 0x001010f0
JMP 0x001012bd
LAB_00101218:
MOV dword ptr [RBP + -0x14],0xffffffff
MOV dword ptr [RBP + -0x10],0x0
JMP 0x001... | char * func0(char *param_1)
{
char *__s;
uint local_1c;
uint local_18;
uint local_14;
if (*param_1 == '\0') {
__s = strdup("None");
}
else {
local_1c = 0xffffffff;
for (local_18 = 0; param_1[local_18] != '\0'; local_18 = local_18 + 1) {
local_1c = local_1c ^ (byte)param_1[local_18];
... |
1,305 | func0 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
| // CRC32 function
char* func0(const char* text) {
if(strlen(text) == 0) {
return strdup("None");
}
unsigned int crc = 0xFFFFFFFF;
unsigned int i, j;
unsigned char byte;
for(i = 0; text[i] != '\0'; i++) {
byte = text[i];
crc = crc ^ byte;
for(j = 0; j < 8; j++) ... | #include <stdio.h>
#include <assert.h>
#include <string.h>
int main() {
char* result;
// Test 1
result = func0("Hello world");
assert(strcmp(result, "8BD69E52") == 0);
free(result); // Free the allocated memory
// Test 2
result = func0("");
assert(strcmp(result, "None") == 0);
free(result); // Free... | O1 | c | func0:
endbr64
push %rbp
push %rbx
sub $0x8,%rsp
movzbl (%rdi),%eax
mov $0x0,%esi
mov $0xffffffff,%r8d
test %al,%al
jne 1203 <func0+0x3a>
lea 0xe18(%rip),%rdi
callq 10c0 <strdup@plt>
mov %rax,%rbp
jmp 1266 <func0+0x9d>
add $0x1,%esi
mov %esi,%eax
movzbl (%rdi,%rax,1),%eax
test %al,%a... | func0:
endbr64
push rbp
push rbx
sub rsp, 8
movzx eax, byte ptr [rdi]
mov esi, 0
mov r8d, 0FFFFFFFFh
test al, al
jnz short loc_1223
lea rdi, s; "None"
call _strdup
mov rbp, rax
jmp short loc_1286
loc_1216:
add esi, 1
mov eax, esi
movzx eax, byte ptr [rdi+rax]
test ... | char * func0(unsigned __int8 *a1)
{
unsigned __int8 v1; // al
int v2; // esi
unsigned int v3; // r8d
void *v4; // rbp
int v5; // edx
unsigned int v6; // eax
int v7; // ebx
void *v8; // rax
v1 = *a1;
v2 = 0;
v3 = -1;
if ( !*a1 )
return strdup("None");
do
{
v3 ^= v1;
v5 = 8;
d... | func0:
ENDBR64
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOVZX EAX,byte ptr [RDI]
MOV ESI,0x0
MOV R8D,0xffffffff
TEST AL,AL
JNZ 0x00101223
LEA RDI,[0x102004]
CALL 0x001010e0
MOV RBP,RAX
JMP 0x00101286
LAB_00101216:
ADD ESI,0x1
MOV EAX,ESI
MOVZX EAX,byte ptr [RDI + RAX*0x1]
TEST AL,AL
JZ 0x0010124e
LAB_00101223:
MOVZX EAX,AL
XOR R8... | char * func0(byte *param_1)
{
uint uVar1;
byte bVar2;
char *pcVar3;
uint uVar4;
int iVar5;
uint uVar6;
uint uVar7;
bVar2 = *param_1;
uVar6 = 0;
uVar7 = 0xffffffff;
if (bVar2 == 0) {
pcVar3 = strdup("None");
}
else {
do {
uVar7 = uVar7 ^ bVar2;
iVar5 = 8;
do {
... |
1,306 | func0 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
| // CRC32 function
char* func0(const char* text) {
if(strlen(text) == 0) {
return strdup("None");
}
unsigned int crc = 0xFFFFFFFF;
unsigned int i, j;
unsigned char byte;
for(i = 0; text[i] != '\0'; i++) {
byte = text[i];
crc = crc ^ byte;
for(j = 0; j < 8; j++) ... | #include <stdio.h>
#include <assert.h>
#include <string.h>
int main() {
char* result;
// Test 1
result = func0("Hello world");
assert(strcmp(result, "8BD69E52") == 0);
free(result); // Free the allocated memory
// Test 2
result = func0("");
assert(strcmp(result, "None") == 0);
free(result); // Free... | O2 | c | func0:
endbr64
movzbl (%rdi),%eax
test %al,%al
je 141b <func0+0x9b>
push %r12
xor %esi,%esi
mov $0xffffffff,%r8d
push %rbx
sub $0x8,%rsp
xchg %ax,%ax
xor %eax,%r8d
mov $0x8,%eax
nopl 0x0(%rax,%rax,1)
mov %r8d,%ecx
shr %r8d
mov %r8d,%edx
and $0x1,%ecx
xor $0xedb88320,%edx
test... | func0:
endbr64
movzx eax, byte ptr [rdi]
test al, al
jz loc_1415
push rbp
xor ecx, ecx
mov r8d, 0FFFFFFFFh
push rbx
sub rsp, 8
nop dword ptr [rax]
loc_13A0:
xor r8d, eax
mov edx, 8
nop dword ptr [rax+rax+00000000h]
loc_13B0:
mov eax, r8d
shr r8d, 1
and eax, 1
neg ... | char * func0(unsigned __int8 *a1)
{
int v1; // eax
long long v2; // rcx
unsigned int v3; // r8d
int v4; // edx
unsigned int v5; // ebx
void *v6; // rax
int v7; // ebx
void *v8; // rbp
v1 = *a1;
if ( !(_BYTE)v1 )
return strdup("None");
LODWORD(v2) = 0;
v3 = -1;
do
{
v3 ^= v1;
v4 ... | func0:
ENDBR64
MOVZX EAX,byte ptr [RDI]
TEST AL,AL
JZ 0x00101415
PUSH RBP
XOR ECX,ECX
MOV R8D,0xffffffff
PUSH RBX
SUB RSP,0x8
NOP dword ptr [RAX]
LAB_001013a0:
XOR R8D,EAX
MOV EDX,0x8
NOP dword ptr [RAX + RAX*0x1]
LAB_001013b0:
MOV EAX,R8D
SHR R8D,0x1
AND EAX,0x1
NEG EAX
AND EAX,0xedb88320
XOR R8D,EAX
SUB EDX,0x1
JNZ 0... | char * func0(byte *param_1)
{
byte bVar1;
ulong uVar2;
char *pcVar3;
int iVar4;
uint uVar5;
bVar1 = *param_1;
if (bVar1 != 0) {
uVar2 = 0;
uVar5 = 0xffffffff;
do {
uVar5 = uVar5 ^ bVar1;
iVar4 = 8;
do {
uVar5 = uVar5 >> 1 ^ -(uVar5 & 1) & 0xedb88320;
iVar4... |
1,307 | func0 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
| // CRC32 function
char* func0(const char* text) {
if(strlen(text) == 0) {
return strdup("None");
}
unsigned int crc = 0xFFFFFFFF;
unsigned int i, j;
unsigned char byte;
for(i = 0; text[i] != '\0'; i++) {
byte = text[i];
crc = crc ^ byte;
for(j = 0; j < 8; j++) ... | #include <stdio.h>
#include <assert.h>
#include <string.h>
int main() {
char* result;
// Test 1
result = func0("Hello world");
assert(strcmp(result, "8BD69E52") == 0);
free(result); // Free the allocated memory
// Test 2
result = func0("");
assert(strcmp(result, "None") == 0);
free(result); // Free... | O3 | c | func0:
endbr64
movzbl (%rdi),%eax
test %al,%al
je 1487 <func0+0x107>
push %r12
xor %ecx,%ecx
mov $0xffffffff,%r8d
push %rbx
sub $0x8,%rsp
xchg %ax,%ax
movzbl %al,%eax
xor %r8d,%eax
mov %eax,%edx
shr %edx
mov %edx,%esi
xor $0xedb88320,%esi
test $0x1,%al
cmovne %esi,%edx
mov %edx,... | func0:
endbr64
movzx eax, byte ptr [rdi]
test al, al
jz loc_1475
push rbp
mov rcx, rdi
xor edx, edx
mov r8d, 0FFFFFFFFh
push rbx
sub rsp, 8
loc_13A0:
movzx eax, al
xor eax, r8d
mov esi, eax
shr eax, 1
and esi, 1
neg esi
and esi, 0EDB88320h
xor esi, eax
and ... | char * func0(unsigned __int8 *a1)
{
unsigned __int8 v1; // al
long long v2; // rdx
unsigned int v3; // r8d
unsigned int v4; // eax
char v5; // si
unsigned int v6; // esi
unsigned int v7; // eax
unsigned int v8; // esi
unsigned int v9; // eax
unsigned int v10; // esi
unsigned int v11; // ebx
void... | func0:
ENDBR64
MOVZX EAX,byte ptr [RDI]
TEST AL,AL
JZ 0x00101475
PUSH RBP
MOV RCX,RDI
XOR EDX,EDX
MOV R8D,0xffffffff
PUSH RBX
SUB RSP,0x8
LAB_001013a0:
MOVZX EAX,AL
XOR EAX,R8D
MOV ESI,EAX
SHR EAX,0x1
AND ESI,0x1
NEG ESI
AND ESI,0xedb88320
XOR ESI,EAX
AND EAX,0x1
NEG EAX
SHR ESI,0x1
AND EAX,0xedb88320
XOR EAX,ESI
AND E... | char * func0(byte *param_1)
{
byte bVar1;
uint uVar2;
uint uVar3;
ulong uVar4;
char *pcVar5;
uint uVar6;
bVar1 = *param_1;
if (bVar1 != 0) {
uVar4 = 0;
uVar3 = 0xffffffff;
do {
uVar2 = (bVar1 ^ uVar3) >> 1;
uVar6 = (-((bVar1 ^ uVar3) & 1) & 0xedb88320 ^ uVar2) >> 1;
uVa... |
1,308 | func0 | #include <stdio.h>
| void func0(int a, int b, int *out, int *size) {
int m;
*size = 0;
if (b < a) {
m = a;
a = b;
b = m;
}
for (int i = a; i <= b; i++) {
if (i < 10 && i % 2 == 0) {
out[(*size)++] = i;
}
}
} | #include <stdio.h>
#include <assert.h>
int issame(const int *a, int a_size, const int *b, int b_size) {
if (a_size != b_size) return 0;
for (int i = 0; i < a_size; i++) {
if (a[i] != b[i]) return 0;
}
return 1;
}
int main() {
int result[10], size;
int expected1[] = {2, 4, 6, 8};
f... | O0 | c | func0:
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
mov %esi,-0x18(%rbp)
mov %rdx,-0x20(%rbp)
mov %rcx,-0x28(%rbp)
mov -0x28(%rbp),%rax
movl $0x0,(%rax)
mov -0x18(%rbp),%eax
cmp -0x14(%rbp),%eax
jge 11c3 <func0+0x3a>
mov -0x14(%rbp),%eax
mov %eax,-0x4(%rbp)
mov -0x18(%rbp... | func0:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_18], esi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_28]
mov dword ptr [rax], 0
mov eax, [rbp+var_18]
cmp eax, [rbp+var_14]
jge short loc_11C3
mov eax, [rbp+var_14]
mov [rbp+var_4... | long long func0(int a1, int a2, long long a3, _DWORD *a4)
{
int v4; // eax
long long result; // rax
int v6; // [rsp+10h] [rbp-18h]
int v7; // [rsp+14h] [rbp-14h]
int i; // [rsp+20h] [rbp-8h]
v7 = a1;
v6 = a2;
*a4 = 0;
if ( a2 < a1 )
{
v7 = a2;
v6 = a1;
}
for ( i = v7; ; ++i )
{
r... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x18],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX],0x0
MOV EAX,dword ptr [RBP + -0x18]
CMP EAX,dword ptr [RBP + -0x14]
JGE 0x001011c3
MOV EAX,dword ptr [RB... | void func0(uint param_1,uint param_2,long param_3,int *param_4)
{
int iVar1;
int4 local_20;
int4 local_1c;
int4 local_10;
*param_4 = 0;
local_20 = param_2;
local_1c = param_1;
if ((int)param_2 < (int)param_1) {
local_20 = param_1;
local_1c = param_2;
}
for (local_10 = local_1c; (int)loca... |
1,309 | func0 | #include <stdio.h>
| void func0(int a, int b, int *out, int *size) {
int m;
*size = 0;
if (b < a) {
m = a;
a = b;
b = m;
}
for (int i = a; i <= b; i++) {
if (i < 10 && i % 2 == 0) {
out[(*size)++] = i;
}
}
} | #include <stdio.h>
#include <assert.h>
int issame(const int *a, int a_size, const int *b, int b_size) {
if (a_size != b_size) return 0;
for (int i = 0; i < a_size; i++) {
if (a[i] != b[i]) return 0;
}
return 1;
}
int main() {
int result[10], size;
int expected1[] = {2, 4, 6, 8};
f... | O1 | c | func0:
endbr64
movl $0x0,(%rcx)
cmp %edi,%esi
jge 11a6 <func0+0x1d>
mov %edi,%eax
mov %esi,%edi
mov %eax,%esi
jmp 11a6 <func0+0x1d>
add $0x1,%edi
cmp %edi,%esi
jl 11c1 <func0+0x38>
cmp $0x9,%edi
jg 119f <func0+0x16>
test $0x1,%dil
jne 119f <func0+0x16>
mov (%rcx),%eax
lea ... | func0:
endbr64
mov dword ptr [rcx], 0
cmp esi, edi
jl short loc_119D
mov eax, esi
mov esi, edi
mov edi, eax
loc_119D:
add edi, 1
jmp short loc_11A9
loc_11A2:
add esi, 1
cmp esi, edi
jz short locret_11C4
loc_11A9:
cmp esi, 9
jg short loc_11A2
test sil, 1
jnz ... | long long func0(int a1, int a2, long long a3, _DWORD *a4)
{
long long result; // rax
int v5; // edi
*a4 = 0;
if ( a2 >= a1 )
{
result = (unsigned int)a2;
a2 = a1;
a1 = result;
}
v5 = a1 + 1;
do
{
if ( a2 <= 9 && (a2 & 1) == 0 )
{
LODWORD(result) = (*a4)++;
result = (i... | func0:
ENDBR64
MOV dword ptr [RCX],0x0
CMP ESI,EDI
JL 0x0010119d
MOV EAX,ESI
MOV ESI,EDI
MOV EDI,EAX
LAB_0010119d:
ADD EDI,0x1
JMP 0x001011a9
LAB_001011a2:
ADD ESI,0x1
CMP ESI,EDI
JZ 0x001011c4
LAB_001011a9:
CMP ESI,0x9
JG 0x001011a2
TEST SIL,0x1
JNZ 0x001011a2
MOV EAX,dword ptr [RCX]
LEA R8D,[RAX + 0x1]
MOV dword ptr ... | void func0(uint param_1,uint param_2,long param_3,int *param_4)
{
int iVar1;
uint uVar2;
*param_4 = 0;
uVar2 = param_2;
if ((int)param_1 <= (int)param_2) {
uVar2 = param_1;
param_1 = param_2;
}
do {
if (((int)uVar2 < 10) && ((uVar2 & 1) == 0)) {
iVar1 = *param_4;
*param_4 = iVa... |
1,310 | func0 | #include <stdio.h>
| void func0(int a, int b, int *out, int *size) {
int m;
*size = 0;
if (b < a) {
m = a;
a = b;
b = m;
}
for (int i = a; i <= b; i++) {
if (i < 10 && i % 2 == 0) {
out[(*size)++] = i;
}
}
} | #include <stdio.h>
#include <assert.h>
int issame(const int *a, int a_size, const int *b, int b_size) {
if (a_size != b_size) return 0;
for (int i = 0; i < a_size; i++) {
if (a[i] != b[i]) return 0;
}
return 1;
}
int main() {
int result[10], size;
int expected1[] = {2, 4, 6, 8};
f... | O2 | c | func0:
endbr64
movl $0x0,(%rcx)
cmp %edi,%esi
jge 13e8 <func0+0x18>
mov %edi,%eax
mov %esi,%edi
mov %eax,%esi
nopl 0x0(%rax)
cmp $0x9,%edi
jg 1400 <func0+0x30>
test $0x1,%dil
jne 1400 <func0+0x30>
movslq (%rcx),%rax
lea 0x1(%rax),%r8d
mov %r8d,(%rcx)
mov %edi,(%rdx,%rax,4)
add ... | func0:
endbr64
mov dword ptr [rcx], 0
cmp esi, edi
jl short loc_13B4
mov eax, esi
mov esi, edi
mov edi, eax
loc_13B4:
add edi, 1
nop word ptr [rax+rax+00000000h]
loc_13C0:
cmp esi, 9
jg short loc_13D8
test sil, 1
jnz short loc_13D8
movsxd rax, dword ptr [rcx]
lea r8... | long long func0(int a1, int a2, long long a3, int *a4)
{
long long result; // rax
int v5; // edi
*a4 = 0;
if ( a2 >= a1 )
{
result = (unsigned int)a2;
a2 = a1;
a1 = result;
}
v5 = a1 + 1;
do
{
if ( a2 <= 9 && (a2 & 1) == 0 )
{
result = *a4;
*a4 = result + 1;
*(_... | func0:
ENDBR64
MOV dword ptr [RCX],0x0
CMP ESI,EDI
JL 0x001013b4
MOV EAX,ESI
MOV ESI,EDI
MOV EDI,EAX
LAB_001013b4:
ADD EDI,0x1
NOP word ptr [RAX + RAX*0x1]
LAB_001013c0:
CMP ESI,0x9
JG 0x001013d8
TEST SIL,0x1
JNZ 0x001013d8
MOVSXD RAX,dword ptr [RCX]
LEA R8D,[RAX + 0x1]
MOV dword ptr [RCX],R8D
MOV dword ptr [RDX + RAX*... | void func0(uint param_1,uint param_2,long param_3,int *param_4)
{
int iVar1;
uint uVar2;
*param_4 = 0;
uVar2 = param_2;
if ((int)param_1 <= (int)param_2) {
uVar2 = param_1;
param_1 = param_2;
}
do {
if (((int)uVar2 < 10) && ((uVar2 & 1) == 0)) {
iVar1 = *param_4;
*param_4 = iVa... |
1,311 | func0 | #include <stdio.h>
| void func0(int a, int b, int *out, int *size) {
int m;
*size = 0;
if (b < a) {
m = a;
a = b;
b = m;
}
for (int i = a; i <= b; i++) {
if (i < 10 && i % 2 == 0) {
out[(*size)++] = i;
}
}
} | #include <stdio.h>
#include <assert.h>
int issame(const int *a, int a_size, const int *b, int b_size) {
if (a_size != b_size) return 0;
for (int i = 0; i < a_size; i++) {
if (a[i] != b[i]) return 0;
}
return 1;
}
int main() {
int result[10], size;
int expected1[] = {2, 4, 6, 8};
f... | O3 | c | func0:
endbr64
movl $0x0,(%rcx)
cmp %edi,%esi
jge 1374 <func0+0x14>
mov %edi,%eax
mov %esi,%edi
mov %eax,%esi
cmp $0x9,%edi
jg 13a8 <func0+0x48>
cmp $0x9,%esi
mov $0x9,%eax
cmovg %eax,%esi
nopl 0x0(%rax)
test $0x1,%dil
jne 139b <func0+0x3b>
movslq (%rcx),%rax
lea 0x1(%rax),%r8d
... | func0:
endbr64
mov dword ptr [rcx], 0
cmp esi, edi
jl short loc_1364
mov eax, esi
mov esi, edi
mov edi, eax
loc_1364:
cmp esi, 9
jg short locret_1392
mov eax, 9
cmp edi, eax
cmovle eax, edi
nop dword ptr [rax+rax+00h]
loc_1378:
test sil, 1
jnz short loc_138B
movsxd ... | void func0(int a1, int a2, long long a3, int *a4)
{
int v4; // eax
int v5; // eax
long long v6; // rdi
*a4 = 0;
if ( a2 >= a1 )
{
v4 = a2;
a2 = a1;
a1 = v4;
}
if ( a2 <= 9 )
{
v5 = 9;
if ( a1 <= 9 )
v5 = a1;
do
{
if ( (a2 & 1) == 0 )
{
v6 = *a4;
... | func0:
ENDBR64
MOV dword ptr [RCX],0x0
CMP ESI,EDI
JL 0x00101364
MOV EAX,ESI
MOV ESI,EDI
MOV EDI,EAX
LAB_00101364:
CMP ESI,0x9
JG 0x00101392
MOV EAX,0x9
CMP EDI,EAX
CMOVLE EAX,EDI
NOP dword ptr [RAX + RAX*0x1]
LAB_00101378:
TEST SIL,0x1
JNZ 0x0010138b
MOVSXD RDI,dword ptr [RCX]
LEA R8D,[RDI + 0x1]
MOV dword ptr [RCX],R... | void func0(uint param_1,uint param_2,long param_3,int *param_4)
{
int iVar1;
uint uVar2;
uint uVar3;
*param_4 = 0;
uVar3 = param_2;
if ((int)param_1 <= (int)param_2) {
uVar3 = param_1;
param_1 = param_2;
}
if ((int)uVar3 < 10) {
uVar2 = 9;
if ((int)param_1 < 10) {
uVar2 = param... |
0 | func0 |
#include <iostream>
#include <vector>
#include <climits>
#include <cassert>
| int func0(const std::vector<std::vector<int>>& cost, int m, int n) {
int R = 3;
int C = 3;
std::vector<std::vector<int>> tc(R, std::vector<int>(C, 0));
tc[0][0] = cost[0][0];
for (int i = 1; i <= m; i++) {
tc[i][0] = tc[i-1][0] + cost[i][0];
}
for (int j = 1; j ... | int main() {
assert(func0({{1, 2, 3}, {4, 8, 2}, {1, 5, 3}}, 2, 2) == 8);
assert(func0({{2, 3, 4}, {5, 9, 3}, {2, 6, 4}}, 2, 2) == 12);
assert(func0({{3, 4, 5}, {6, 10, 4}, {3, 7, 5}}, 2, 2) == 16);
std::cout << "All test cases passed." << std::endl;
return 0;
}
| O0 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int, int):
endbr64
push %rbp
mov %rsp,%rbp
push %r12
push %rbx
sub $0x70,%rsp
mov %rdi,-0x78(%rbp)
mov %esi,-0x7c(%rbp)
mov %edx,-0x80(%rbp)
mov %fs:0x28,%rax
mov %rax,-... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EEii:
endbr64
push rbp
mov rbp, rsp
push r12
push rbx
add rsp, 0FFFFFFFFFFFFFF80h
mov [rbp+var_88], rdi
mov [rbp+var_8C], esi
mov [rbp+var_90], edx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov [rbp+var_68], 3
mov [rbp+var_64]... | long long func0(long long a1, int a2, int a3)
{
long long v3; // rax
int v4; // ebx
long long v5; // rax
long long v6; // rax
int v7; // ebx
long long v8; // rax
int v9; // ebx
long long v10; // rax
long long v11; // rax
int v12; // ebx
long long v13; // rax
int v14; // ebx
long long v15; // ... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R12
PUSH RBX
ADD RSP,-0x80
MOV qword ptr [RBP + -0x88],RDI
MOV dword ptr [RBP + -0x8c],ESI
MOV dword ptr [RBP + -0x90],EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV dword ptr [RBP + -0x68],0x3
MOV dword ptr [RBP + -0x64],0x3
LEA RAX,[RBP + -0x7d... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&, int, int) */
int4 func0(vector *param_1,int param_2,int param_3)
{
int4 uVar1;
int iVar2;
int iVar3;
vector<int,std::allocator<int>> *pvVar4;
int4 *puVar5;
int *piVar6;
int *... |
1 | func0 |
#include <iostream>
#include <vector>
#include <climits>
#include <cassert>
| int func0(const std::vector<std::vector<int>>& cost, int m, int n) {
int R = 3;
int C = 3;
std::vector<std::vector<int>> tc(R, std::vector<int>(C, 0));
tc[0][0] = cost[0][0];
for (int i = 1; i <= m; i++) {
tc[i][0] = tc[i-1][0] + cost[i][0];
}
for (int j = 1; j ... | int main() {
assert(func0({{1, 2, 3}, {4, 8, 2}, {1, 5, 3}}, 2, 2) == 8);
assert(func0({{2, 3, 4}, {5, 9, 3}, {2, 6, 4}}, 2, 2) == 12);
assert(func0({{3, 4, 5}, {6, 10, 4}, {3, 7, 5}}, 2, 2) == 16);
std::cout << "All test cases passed." << std::endl;
return 0;
}
| O1 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %rdi,%rbx
mov %esi,0xc(%rsp)
mov %edx,%r13d
mov $0xc,%edi
callq 11c0 <... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EEii:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 58h
mov rbx, rdi
mov r14d, esi
mov r12d, edx
mov rax, fs:28h
mov [rsp+88h+var_40], rax
xor eax, eax
mov edi, 0Ch; unsigned __int64
call __Znwm; operator n... | long long func0(_DWORD ***a1, int a2, int a3)
{
_DWORD *v4; // r15
_DWORD **v5; // rbp
long long v6; // r13
long long v7; // rax
long long v8; // rax
int v9; // edx
_QWORD *v10; // r8
long long v11; // r10
_DWORD *v12; // r9
long long v13; // r13
long long v14; // rax
_DWORD *v15; // rcx
unsi... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x58
MOV RBX,RDI
MOV R14D,ESI
MOV R12D,EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
MOV EDI,0xc
LAB_00101319:
CALL 0x00101190
MOV R15,RAX
MOV qword ptr [RSP + 0x30],RAX
LEA RAX,[RAX + 0xc]
MOV qword ptr [RSP + 0x4... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&, int, int) */
int4 func0(vector *param_1,int param_2,int param_3)
{
int4 uVar1;
void *pvVar2;
int4 *puVar3;
vector *pvVar4;
vector *pvVar5;
long lVar6;
long lVar7;
int *piVa... |
2 | func0 |
#include <iostream>
#include <vector>
#include <climits>
#include <cassert>
| int func0(const std::vector<std::vector<int>>& cost, int m, int n) {
int R = 3;
int C = 3;
std::vector<std::vector<int>> tc(R, std::vector<int>(C, 0));
tc[0][0] = cost[0][0];
for (int i = 1; i <= m; i++) {
tc[i][0] = tc[i-1][0] + cost[i][0];
}
for (int j = 1; j ... | int main() {
assert(func0({{1, 2, 3}, {4, 8, 2}, {1, 5, 3}}, 2, 2) == 8);
assert(func0({{2, 3, 4}, {5, 9, 3}, {2, 6, 4}}, 2, 2) == 12);
assert(func0({{3, 4, 5}, {6, 10, 4}, {3, 7, 5}}, 2, 2) == 16);
std::cout << "All test cases passed." << std::endl;
return 0;
}
| O2 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int, int):
endbr64
push %r15
push %r14
movslq %edx,%r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x28,%rsp
mov %rdi,0x18(%rsp)
mov $0xc,%edi
mov %esi,0x14(%rsp)
callq ... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EEii:
endbr64
push r15
mov r15, rdi
mov edi, 0Ch; unsigned __int64
push r14
push r13
movsxd r13, esi
push r12
push rbp
movsxd rbp, edx
push rbx
sub rsp, 48h
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
call __Znwm; operator new... | long long func0(int ***a1, int a2, int a3)
{
long long v4; // r13
long long v5; // rbp
_DWORD *v6; // r14
void **v7; // rbx
__m128i v8; // xmm0
long long v9; // rcx
long long v10; // r8
long long v11; // r9
long long v12; // r12
int **v13; // r10
int *v14; // rdi
int *v15; // r8
int v16; // e... | func0:
ENDBR64
PUSH R15
MOV R15,RDI
MOV EDI,0xc
PUSH R14
PUSH R13
MOVSXD R13,ESI
PUSH R12
PUSH RBP
MOVSXD RBP,EDX
PUSH RBX
SUB RSP,0x48
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
LAB_001019e0:
CALL 0x001011f0
PXOR XMM0,XMM0
MOV EDI,0x48
MOV R14,RAX
MOV qword ptr [RSP + 0x20],RAX
LEA RAX,[RAX... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&, int, int) */
int4 func0(vector *param_1,int param_2,int param_3)
{
int8 *puVar1;
int iVar2;
int4 uVar3;
int *piVar4;
int *piVar5;
long lVar6;
long lVar7;
void *pvVar8;
in... |
3 | func0 |
#include <iostream>
#include <vector>
#include <climits>
#include <cassert>
| int func0(const std::vector<std::vector<int>>& cost, int m, int n) {
int R = 3;
int C = 3;
std::vector<std::vector<int>> tc(R, std::vector<int>(C, 0));
tc[0][0] = cost[0][0];
for (int i = 1; i <= m; i++) {
tc[i][0] = tc[i-1][0] + cost[i][0];
}
for (int j = 1; j ... | int main() {
assert(func0({{1, 2, 3}, {4, 8, 2}, {1, 5, 3}}, 2, 2) == 8);
assert(func0({{2, 3, 4}, {5, 9, 3}, {2, 6, 4}}, 2, 2) == 12);
assert(func0({{3, 4, 5}, {6, 10, 4}, {3, 7, 5}}, 2, 2) == 16);
std::cout << "All test cases passed." << std::endl;
return 0;
}
| O3 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int, int):
endbr64
push %r15
push %r14
push %r13
movslq %esi,%r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %rdi,0x8(%rsp)
mov $0xc,%edi
mov %edx,0x4(%rsp)
callq 11... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EEii:
endbr64
push r15
push r14
movsxd r14, esi
push r13
movsxd r13, edx
push r12
push rbp
push rbx
sub rsp, 38h
mov [rsp+68h+var_60], rdi
mov edi, 0Ch; unsigned __int64
mov rax, fs:28h
mov [rsp+68h+var_40], rax
xor eax, eax
call __Znwm;... | long long func0(int ***a1, int a2, int a3)
{
long long v3; // r14
long long v4; // r13
_DWORD *v5; // r12
void **v6; // rbp
void **v7; // rbx
_DWORD *v8; // rax
long long v9; // rcx
int *v10; // rdi
int **v11; // r10
int *v12; // r8
int v13; // eax
long long v14; // rax
int *v15; // rsi
_DW... | func0:
ENDBR64
PUSH R15
PUSH R14
MOVSXD R14,ESI
PUSH R13
MOVSXD R13,EDX
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RSP + 0x8],RDI
MOV EDI,0xc
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
LAB_00101a62:
CALL 0x001011e0
MOV EDI,0x48
MOV R12,RAX
MOV qword ptr [RSP + 0x10],RAX
LEA RAX,[... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&, int, int) */
int4 func0(vector *param_1,int param_2,int param_3)
{
int8 *puVar1;
int4 uVar2;
int iVar3;
long lVar4;
int8 uVar5;
int *piVar6;
int *piVar7;
long lVar8;
long... |
4 | func0 |
#include <iostream>
#include <tuple>
#include <set>
#include <vector>
#include <assert.h>
| std::tuple<int, int> func0(const std::vector<int>& test_vec1, const std::vector<int>& test_vec2) {
std::set<int> set1(test_vec1.begin(), test_vec1.end());
std::set<int> set2(test_vec2.begin(), test_vec2.end());
std::vector<int> intersection;
for (int elem : set1) {
if (set2.find(elem) != se... | int main() {
assert(func0({3, 4, 5, 6}, {5, 7, 4, 10}) == std::make_tuple(4, 5));
assert(func0({1, 2, 3, 4}, {5, 4, 3, 7}) == std::make_tuple(3, 4));
assert(func0({11, 12, 14, 13}, {17, 15, 14, 13}) == std::make_tuple(13, 14));
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0xe8,%rsp
mov %rdi,-0xd8(%rbp)
mov %rsi,-0xe0(%rbp)
mov %rdx,-0xe8(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0xe0(%rbp)... | _Z5func0RKSt6vectorIiSaIiEES3_:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 0E8h
mov [rbp+var_D8], rdi
mov [rbp+var_E0], rsi
mov [rbp+var_E8], rdx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_E0]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE3endEv; ... | long long func0(long long a1, long long a2, long long a3)
{
long long v3; // rbx
long long v4; // rax
long long v5; // rbx
long long v6; // rax
long long v7; // rbx
long long v8; // rax
int v11; // [rsp+24h] [rbp-CCh] BYREF
long long v12; // [rsp+28h] [rbp-C8h] BYREF
long long v13; // [rsp+30h] [rbp-... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0xe8
MOV qword ptr [RBP + -0xd8],RDI
MOV qword ptr [RBP + -0xe0],RSI
MOV qword ptr [RBP + -0xe8],RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0xe0]
MOV RDI,RAX
CALL 0x00101d54
MOV RBX,RAX
MOV RAX,qword ptr [RBP... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&) */
vector * func0(vector *param_1,vector *param_2)
{
char cVar1;
__normal_iterator _Var2;
__normal_iterator _Var3;
int *piVar4;
vector<int,std::allocator<int>> *in_RDX;
long in_FS_OFFSET;
int local_... |
5 | func0 |
#include <iostream>
#include <tuple>
#include <set>
#include <vector>
#include <assert.h>
| std::tuple<int, int> func0(const std::vector<int>& test_vec1, const std::vector<int>& test_vec2) {
std::set<int> set1(test_vec1.begin(), test_vec1.end());
std::set<int> set2(test_vec2.begin(), test_vec2.end());
std::vector<int> intersection;
for (int elem : set1) {
if (set2.find(elem) != se... | int main() {
assert(func0({3, 4, 5, 6}, {5, 7, 4, 10}) == std::make_tuple(4, 5));
assert(func0({1, 2, 3, 4}, {5, 4, 3, 7}) == std::make_tuple(3, 4));
assert(func0({11, 12, 14, 13}, {17, 15, 14, 13}) == std::make_tuple(13, 14));
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0xa0,%rsp
mov %rdi,%rbp
mov %rdx,%r14
mov %fs:0x28,%rax
mov %rax,0x98(%rsp)
xor %eax,%eax
mov 0x8(%rsi),%r12
mov (%rsi),%r... | _Z5func0RKSt6vectorIiSaIiEES3_:
endbr64
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 0A0h
mov rbp, rdi
mov r14, rdx
mov rax, fs:28h
mov [rsp+0C8h+var_30], rax
xor eax, eax
mov r12, [rsi+8]
mov rbx, [rsi]
mov [rsp+0C8h+var_90], 0
mov [rsp+0C8h+var_88], 0
le... | _DWORD * func0(_DWORD *a1, long long *a2, long long *a3)
{
long long v5; // r12
long long v6; // rbx
long long v7; // r12
long long v8; // rax
long long j; // rbx
int *v10; // rbx
unsigned long long v11; // rsi
_DWORD *v12; // rdi
long long v13; // rax
int *v14; // rcx
char *v15; // rsi
int v16;... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0xa0
MOV RBP,RDI
MOV R14,RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x98],RAX
XOR EAX,EAX
MOV R12,qword ptr [RSI + 0x8]
MOV RBX,qword ptr [RSI]
MOV dword ptr [RSP + 0x38],0x0
MOV qword ptr [RSP + 0x40],0x0
LEA RDX,[RSP + 0x30]
LEA RAX,[RSP + ... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&) */
vector * func0(vector *param_1,vector *param_2)
{
_Alloc_node *p_Var1;
_Rb_tree_node *p_Var2;
_Rb_tree_node *p_Var3;
... |
6 | func0 |
#include <iostream>
#include <tuple>
#include <set>
#include <vector>
#include <assert.h>
| std::tuple<int, int> func0(const std::vector<int>& test_vec1, const std::vector<int>& test_vec2) {
std::set<int> set1(test_vec1.begin(), test_vec1.end());
std::set<int> set2(test_vec2.begin(), test_vec2.end());
std::vector<int> intersection;
for (int elem : set1) {
if (set2.find(elem) != se... | int main() {
assert(func0({3, 4, 5, 6}, {5, 7, 4, 10}) == std::make_tuple(4, 5));
assert(func0({1, 2, 3, 4}, {5, 4, 3, 7}) == std::make_tuple(3, 4));
assert(func0({11, 12, 14, 13}, {17, 15, 14, 13}) == std::make_tuple(13, 14));
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0xc8,%rsp
mov 0x8(%rsi),%r15
mov (%rsi),%rbx
mov %rdi,0x18(%rsp)
lea 0x58(%rsp),%r13
lea 0x50(%rsp),%r14
mov %rdx... | _Z5func0RKSt6vectorIiSaIiEES3_:
endbr64
push r15
push r14
mov r14, rdi
push r13
push r12
push rbp
push rbx
mov rbx, rdx
sub rsp, 0A8h
mov rdx, [rsi+8]
mov rsi, [rsi]
mov rax, fs:28h
mov [rsp+0D8h+var_40], rax
xor eax, eax
lea rdi, [rsp+0D8h+var_A8]
call _ZNSt3set... | _DWORD * func0(_DWORD *a1, long long *a2, _QWORD *a3)
{
long long v5; // rdx
long long v6; // rsi
long long v7; // rbx
_BYTE *v8; // r13
int v9; // esi
_QWORD *v10; // rax
char *v11; // rdi
long long v12; // rdx
long long v13; // rcx
char *v14; // rax
_DWORD *v15; // rdi
unsigned long long v16; ... | func0:
ENDBR64
PUSH R15
PUSH R14
MOV R14,RDI
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDX
SUB RSP,0xa8
MOV RDX,qword ptr [RSI + 0x8]
MOV RSI,qword ptr [RSI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x98],RAX
XOR EAX,EAX
LEA RDI,[RSP + 0x30]
LAB_0010178a:
CALL 0x001019d0
MOV RDX,qword ptr [RBX + 0x8]
MOV RSI,... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&) */
vector * func0(vector *param_1,vector *param_2)
{
int *puVar1;
void *pvVar2;
void *pvVar3;
int *puVar4;
int8 *in_RDX;
ulong uVar5;
int *puVar6;
int *piVar7;
long in_FS_OFFSET;
int local_cc;... |
7 | func0 |
#include <iostream>
#include <tuple>
#include <set>
#include <vector>
#include <assert.h>
| std::tuple<int, int> func0(const std::vector<int>& test_vec1, const std::vector<int>& test_vec2) {
std::set<int> set1(test_vec1.begin(), test_vec1.end());
std::set<int> set2(test_vec2.begin(), test_vec2.end());
std::vector<int> intersection;
for (int elem : set1) {
if (set2.find(elem) != se... | int main() {
assert(func0({3, 4, 5, 6}, {5, 7, 4, 10}) == std::make_tuple(4, 5));
assert(func0({1, 2, 3, 4}, {5, 4, 3, 7}) == std::make_tuple(3, 4));
assert(func0({11, 12, 14, 13}, {17, 15, 14, 13}) == std::make_tuple(13, 14));
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %r15
mov %rdx,%r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0xb8,%rsp
mov 0x8(%rsi),%r14
mov (%rsi),%rbx
mov %rdi,0x8(%rsp)
lea 0x48(%rsp),%r13
mov %fs:0x28,%r... | _Z5func0RKSt6vectorIiSaIiEES3_:
endbr64
push r15
push r14
mov r14, rdx
push r13
xor r13d, r13d
push r12
push rbp
push rbx
sub rsp, 0B8h
mov r15, [rsi+8]
mov rbp, [rsi]
mov [rsp+0E8h+var_E8], rdi
lea r12, [rsp+0E8h+var_A0]
mov rax, fs:28h
mov [rsp+0E8h+var_40], rax
x... | _DWORD * func0(_DWORD *a1, int **a2, int **a3)
{
long long v4; // r13
int *v5; // r15
int *v6; // rbp
int v7; // ecx
int *v8; // rbx
bool v9; // r13
long long v10; // rax
int *v11; // r15
int *v12; // rbp
long long v13; // r14
int v14; // ecx
int *v15; // rbx
bool v16; // r14
long long v17; ... | func0:
ENDBR64
PUSH R15
PUSH R14
MOV R14,RDX
PUSH R13
XOR R13D,R13D
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0xb8
MOV R15,qword ptr [RSI + 0x8]
MOV RBP,qword ptr [RSI]
MOV qword ptr [RSP],RDI
LEA R12,[RSP + 0x48]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xa8],RAX
XOR EAX,EAX
MOV dword ptr [RSP + 0x48],0x0
MOV qword p... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&) */
vector * func0(vector *param_1,vector *param_2)
{
int iVar1;
_Rb_tree_node_base *p_Var2;
_Rb_tree_node_base *p_Var3;
_Rb_tree_node_base *p_Var4;
_Rb_tree_node_base *p_Var5;
_Rb_tree_node_base *p_Va... |
8 | func0 |
#include <cmath>
#include <cassert>
| bool func0(int n) {
bool result = false;
for (int i = 2; i < static_cast<int>(sqrt(n)) + 1; ++i) {
if (n % i == 0) {
result = true;
}
}
return result;
}
| int main() {
assert(func0(2) == false);
assert(func0(10) == true);
assert(func0(35) == true);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %edi,-0x14(%rbp)
movb $0x0,-0x5(%rbp)
movl $0x2,-0x4(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm0
callq 1070 <sqrt@plt>
cvttsd2si %xmm0,%eax
cmp %eax,-0x4(%rbp)
setle %al
test %al,%al
je 11b2 <_Z5func0i+0x49>
mov -0x14(%rbp),%eax
cltd
idiv... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_14], edi
mov [rbp+var_5], 0
mov [rbp+var_4], 2
jmp short loc_119A
loc_1185:
mov eax, [rbp+var_14]
cdq
idiv [rbp+var_4]
mov eax, edx
test eax, eax
jnz short loc_1196
mov [rbp+var_5], 1
loc_1196:
add [r... | long long func0(int a1)
{
unsigned __int8 v2; // [rsp+1Bh] [rbp-5h]
int i; // [rsp+1Ch] [rbp-4h]
v2 = 0;
for ( i = 2; i <= (int)sqrt((double)a1); ++i )
{
if ( !(a1 % i) )
v2 = 1;
}
return v2;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x14],EDI
MOV byte ptr [RBP + -0x5],0x0
MOV dword ptr [RBP + -0x4],0x2
JMP 0x0010119a
LAB_00101185:
MOV EAX,dword ptr [RBP + -0x14]
CDQ
IDIV dword ptr [RBP + -0x4]
MOV EAX,EDX
TEST EAX,EAX
JNZ 0x00101196
MOV byte ptr [RBP + -0x5],0x1
LAB_00101196:
A... | /* func0(int) */
int func0(int param_1)
{
double dVar1;
int local_d;
int4 local_c;
local_d = 0;
local_c = 2;
while( true ) {
dVar1 = sqrt((double)param_1);
if ((int)dVar1 < local_c) break;
if (param_1 % local_c == 0) {
local_d = 1;
}
local_c = local_c + 1;
}
return local_d... |
9 | func0 |
#include <cmath>
#include <cassert>
| bool func0(int n) {
bool result = false;
for (int i = 2; i < static_cast<int>(sqrt(n)) + 1; ++i) {
if (n % i == 0) {
result = true;
}
}
return result;
}
| int main() {
assert(func0(2) == false);
assert(func0(10) == true);
assert(func0(35) == true);
return 0;
}
| O1 | cpp | func0(int):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %edi,%ebp
pxor %xmm3,%xmm3
cvtsi2sd %edi,%xmm3
movsd %xmm3,0x8(%rsp)
movapd %xmm3,%xmm0
sqrtsd %xmm0,%xmm0
cvttsd2si %xmm0,%r13d
mov $0x2,%ebx
mov $0x0,%r12d
pxor %xmm1,%xmm1
ucomisd 0x8(%rsp),%xmm1
ja 11c5 <_Z5f... | _Z5func0i:
endbr64
push r12
push rbp
push rbx
sub rsp, 10h
mov ebp, edi
mov ebx, 2
mov r12d, 0
pxor xmm2, xmm2
cvtsi2sd xmm2, edi
movsd [rsp+28h+x], xmm2
jmp short loc_11A5
loc_1192:
mov eax, ebp
cdq
idiv ebx
test edx, edx
mov eax, 1
cmovz r12d, eax
add ebx, 1
loc_1... | long long func0(int a1)
{
int v1; // ebx
unsigned int v2; // r12d
double v3; // xmm0_8
double x; // [rsp+8h] [rbp-20h]
v1 = 2;
v2 = 0;
x = (double)a1;
while ( 1 )
{
v3 = x < 0.0 ? sqrt(x) : sqrt(x);
if ( (int)v3 < v1 )
break;
if ( !(a1 % v1) )
v2 = 1;
++v1;
}
return v... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x10
MOV EBP,EDI
MOV EBX,0x2
MOV R12D,0x0
PXOR XMM2,XMM2
CVTSI2SD XMM2,EDI
MOVSD qword ptr [RSP + 0x8],XMM2
JMP 0x001011a5
LAB_00101192:
MOV EAX,EBP
CDQ
IDIV EBX
TEST EDX,EDX
MOV EAX,0x1
CMOVZ R12D,EAX
ADD EBX,0x1
LAB_001011a5:
PXOR XMM0,XMM0
MOVSD XMM1,qword ptr [RSP +... | /* func0(int) */
int4 func0(int param_1)
{
int iVar1;
int4 uVar2;
double dVar3;
double __x;
iVar1 = 2;
uVar2 = 0;
__x = (double)param_1;
while( true ) {
if (__x < 0.0) {
dVar3 = sqrt(__x);
}
else {
dVar3 = SQRT(__x);
}
if ((int)dVar3 < iVar1) break;
if (param_1 %... |
10 | func0 |
#include <cmath>
#include <cassert>
| bool func0(int n) {
bool result = false;
for (int i = 2; i < static_cast<int>(sqrt(n)) + 1; ++i) {
if (n % i == 0) {
result = true;
}
}
return result;
}
| int main() {
assert(func0(2) == false);
assert(func0(10) == true);
assert(func0(35) == true);
return 0;
}
| O2 | cpp | func0(int):
endbr64
pxor %xmm1,%xmm1
push %r13
pxor %xmm2,%xmm2
mov $0x1,%r13d
cvtsi2sd %edi,%xmm1
push %r12
xor %r12d,%r12d
push %rbp
push %rbx
mov $0x2,%ebx
movapd %xmm1,%xmm0
sqrtsd %xmm0,%xmm0
sub $0x18,%rsp
cvttsd2si %xmm0,%ebp
jmp 11ae <_Z5func0i+0x4e>
nopw %cs:0x0(%rax,%rax,1)
mov ... | _Z5func0i:
endbr64
push rbp
pxor xmm1, xmm1
xor ebp, ebp
pxor xmm2, xmm2
push rbx
cvtsi2sd xmm1, edi
mov ebx, 2
sub rsp, 18h
jmp short loc_1242
loc_1230:
mov eax, edi
cdq
idiv ebx
mov eax, 1
test edx, edx
cmovz ebp, eax
add ebx, 1
loc_1242:
ucomisd xmm2, xmm1
ja shor... | long long func0(int a1)
{
unsigned int v1; // ebp
double v2; // xmm1_8
int i; // ebx
double v4; // xmm0_8
v1 = 0;
v2 = (double)a1;
for ( i = 2; ; ++i )
{
v4 = v2 < 0.0 ? sqrt(v2) : sqrt(v2);
if ( (int)v4 < i )
break;
if ( !(a1 % i) )
v1 = 1;
}
return v1;
} | func0:
ENDBR64
PUSH RBP
PXOR XMM1,XMM1
XOR EBP,EBP
PXOR XMM2,XMM2
PUSH RBX
CVTSI2SD XMM1,EDI
MOV EBX,0x2
SUB RSP,0x18
JMP 0x00101242
LAB_00101230:
MOV EAX,EDI
CDQ
IDIV EBX
MOV EAX,0x1
TEST EDX,EDX
CMOVZ EBP,EAX
ADD EBX,0x1
LAB_00101242:
UCOMISD XMM2,XMM1
JA 0x00101261
MOVAPD XMM0,XMM1
SQRTSD XMM0,XMM0
LAB_00101250:
CVT... | /* func0(int) */
int4 func0(int param_1)
{
int iVar1;
int4 uVar2;
double dVar3;
double __x;
uVar2 = 0;
__x = (double)param_1;
iVar1 = 2;
while( true ) {
if (__x < 0.0) {
dVar3 = sqrt(__x);
}
else {
dVar3 = SQRT(__x);
}
if ((int)dVar3 < iVar1) break;
if (param_1 %... |
11 | func0 |
#include <cmath>
#include <cassert>
| bool func0(int n) {
bool result = false;
for (int i = 2; i < static_cast<int>(sqrt(n)) + 1; ++i) {
if (n % i == 0) {
result = true;
}
}
return result;
}
| int main() {
assert(func0(2) == false);
assert(func0(10) == true);
assert(func0(35) == true);
return 0;
}
| O3 | cpp | func0(int):
endbr64
pxor %xmm1,%xmm1
push %r13
cvtsi2sd %edi,%xmm1
push %r12
push %rbp
push %rbx
movapd %xmm1,%xmm0
sqrtsd %xmm0,%xmm0
sub $0x18,%rsp
cvttsd2si %xmm0,%ebx
pxor %xmm0,%xmm0
ucomisd %xmm1,%xmm0
ja 11c9 <_Z5func0i+0x69>
lea 0x1(%rbx),%r8d
mov $0x2,%ecx
xor %r12d,%r12d
mov $0x... | _Z5func0i:
endbr64
pxor xmm1, xmm1
push r13
pxor xmm0, xmm0
cvtsi2sd xmm1, edi
push r12
push rbp
push rbx
mov ebx, edi
sub rsp, 18h
ucomisd xmm0, xmm1
ja short loc_11BE
sqrtsd xmm1, xmm1
mov ecx, 2
xor ebp, ebp
mov edi, 1
cvttsd2si esi, xmm1
cmp esi, 1
jle short loc_1... | long long func0(int a1)
{
double v1; // xmm1_8
int v2; // ecx
unsigned int v3; // ebp
int v4; // esi
int v6; // r12d
v1 = (double)a1;
if ( (double)a1 < 0.0 )
{
v6 = 2;
v3 = 0;
while ( v6 <= (int)sqrt(v1) )
{
if ( !(a1 % v6) )
v3 = 1;
++v6;
}
}
else
{
v... | func0:
ENDBR64
PXOR XMM1,XMM1
PUSH R13
PXOR XMM0,XMM0
CVTSI2SD XMM1,EDI
PUSH R12
PUSH RBP
PUSH RBX
MOV EBX,EDI
SUB RSP,0x18
UCOMISD XMM0,XMM1
JA 0x001011be
SQRTSD XMM1,XMM1
MOV ECX,0x2
XOR EBP,EBP
MOV EDI,0x1
CVTTSD2SI ESI,XMM1
CMP ESI,0x1
JLE 0x001011b1
NOP dword ptr [RAX + RAX*0x1]
LAB_001011a0:
MOV EAX,EBX
CDQ
IDIV ... | /* func0(int) */
int8 func0(int param_1)
{
int iVar1;
int8 uVar2;
double dVar3;
double __x;
__x = (double)param_1;
if (__x < 0.0) {
uVar2 = 0;
for (iVar1 = 2; dVar3 = sqrt(__x), iVar1 <= (int)dVar3; iVar1 = iVar1 + 1) {
if (param_1 % iVar1 == 0) {
uVar2 = 1;
}
}
}
el... |
12 | func0 |
#include <vector>
#include <algorithm>
#include <assert.h>
| std::vector<int> func0(std::vector<int>& nums, int n) {
std::vector<int> largest_nums(nums.begin(), nums.end());
std::sort(largest_nums.begin(), largest_nums.end(), std::greater<int>());
largest_nums.resize(n);
return largest_nums;
}
| int main() {
std::vector<int> test_vec1 = {25, 35, 22, 85, 14, 65, 75, 22, 58};
std::vector<int> result1 = {85, 75, 65};
assert(func0(test_vec1, 3) == result1);
std::vector<int> test_vec2 = {25, 35, 22, 85, 14, 65, 75, 22, 58};
std::vector<int> result2 = {85, 75};
assert(func0(test_vec2,... | O0 | cpp | func0(std::vector<int, std::allocator<int> >&, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x38,%rsp
mov %rdi,-0x28(%rbp)
mov %rsi,-0x30(%rbp)
mov %edx,-0x34(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x19(%rbp),%rax
mov %rax,%rdi
callq 1b2e <_ZNSaIiEC1Ev... | _Z5func0RSt6vectorIiSaIiEEi:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 48h
mov [rbp+var_38], rdi
mov [rbp+var_40], rsi
mov [rbp+var_44], edx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_21]
mov [rbp+var_20], rax
nop
nop
mov rax, [rbp+var_40... | long long func0(long long a1, long long a2, int a3)
{
long long v3; // rbx
long long v4; // rax
long long v5; // rbx
long long v6; // rax
char v9; // [rsp+2Fh] [rbp-21h] BYREF
char *v10; // [rsp+30h] [rbp-20h]
unsigned long long v11; // [rsp+38h] [rbp-18h]
v11 = __readfsqword(0x28u);
v10 = &v9;
v3... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x38],RDI
MOV qword ptr [RBP + -0x40],RSI
MOV dword ptr [RBP + -0x44],EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x21]
MOV qword ptr [RBP + -0x20],RAX
NOP
NOP
MOV RAX,qword ptr [RBP + -0x40]
... | /* func0(std::vector<int, std::allocator<int> >&, int) */
vector * func0(vector *param_1,int param_2)
{
__normal_iterator _Var1;
__normal_iterator _Var2;
int in_EDX;
greater extraout_EDX;
int4 in_register_00000034;
long in_FS_OFFSET;
allocator local_29;
allocator *local_28;
long local_20;
local... |
13 | func0 |
#include <vector>
#include <algorithm>
#include <assert.h>
| std::vector<int> func0(std::vector<int>& nums, int n) {
std::vector<int> largest_nums(nums.begin(), nums.end());
std::sort(largest_nums.begin(), largest_nums.end(), std::greater<int>());
largest_nums.resize(n);
return largest_nums;
}
| int main() {
std::vector<int> test_vec1 = {25, 35, 22, 85, 14, 65, 75, 22, 58};
std::vector<int> result1 = {85, 75, 65};
assert(func0(test_vec1, 3) == result1);
std::vector<int> test_vec2 = {25, 35, 22, 85, 14, 65, 75, 22, 58};
std::vector<int> result2 = {85, 75};
assert(func0(test_vec2,... | O1 | cpp | func0(std::vector<int, std::allocator<int> >&, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %rdi,%rbx
mov %edx,0xc(%rsp)
mov 0x8(%rsi),%r15
mov (%rsi),%r14
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
mov %r15,%r13
sub %... | _Z5func0RSt6vectorIiSaIiEEi:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 18h
mov rbx, rdi
mov r12d, edx
mov rbp, [rsi+8]
mov r15, [rsi]
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
sub rbp, r15
mov rax, rb... | int ** func0(int **a1, long long a2, int a3)
{
long long v5; // rbp
int *v6; // r15
signed long long v7; // rbp
int *v8; // rax
int *v9; // r14
int *v10; // r13
unsigned long long v11; // rax
int *v12; // rdi
int *v13; // rbp
int v14; // ecx
int *v15; // rax
int v16; // edx
int *v17; // rsi
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
MOV R12D,EDX
MOV RBP,qword ptr [RSI + 0x8]
MOV R15,qword ptr [RSI]
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
SUB RBP,R15
MOV RAX,RBP
SAR RAX,0x2
MOV qword ptr [RSP + 0x8],RAX
MOV RDX,... | /* func0(std::vector<int, std::allocator<int> >&, int) */
vector * func0(vector *param_1,int param_2)
{
int *piVar1;
int iVar2;
int iVar3;
long lVar4;
int *piVar5;
int *piVar6;
int *piVar7;
ulong uVar8;
int *piVar9;
int8 uVar10;
_Iter_comp_iter in_ECX;
int in_EDX;
_Iter_comp_iter extraout_ED... |
14 | func0 |
#include <vector>
#include <algorithm>
#include <assert.h>
| std::vector<int> func0(std::vector<int>& nums, int n) {
std::vector<int> largest_nums(nums.begin(), nums.end());
std::sort(largest_nums.begin(), largest_nums.end(), std::greater<int>());
largest_nums.resize(n);
return largest_nums;
}
| int main() {
std::vector<int> test_vec1 = {25, 35, 22, 85, 14, 65, 75, 22, 58};
std::vector<int> result1 = {85, 75, 65};
assert(func0(test_vec1, 3) == result1);
std::vector<int> test_vec2 = {25, 35, 22, 85, 14, 65, 75, 22, 58};
std::vector<int> result2 = {85, 75};
assert(func0(test_vec2,... | O2 | cpp | func0(std::vector<int, std::allocator<int> >&, int):
endbr64
push %r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x18,%rsp
mov 0x8(%rsi),%rax
mov (%rsi),%r14
movq $0x0,(%rdi)
mov %edx,0xc(%rsp)
mov %rax,(%rsp)
sub %r14,%rax
mov %rax,%rbx
mov %rax,%rbp
... | _Z5func0RSt6vectorIiSaIiEEi:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
push rbx
mov rbx, rdi
sub rsp, 18h
mov r12, [rsi+8]
mov r15, [rsi]
movups xmmword ptr [rdi], xmm0
mov [rsp+48h+var_44], edx
sub r12, r15
mov qword ptr [rdi+10h], 0
mov ... | long long func0(long long a1, long long a2, int a3)
{
long long v3; // r12
int *v4; // r15
signed long long v5; // r12
unsigned long long v6; // r14
int *v7; // rax
int *v8; // r13
int *v9; // rbp
int *v10; // rax
unsigned long long v11; // rdx
int *v12; // r12
int v13; // ecx
int v14; // edx
... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
SUB RSP,0x18
MOV R12,qword ptr [RSI + 0x8]
MOV R15,qword ptr [RSI]
MOVUPS xmmword ptr [RDI],XMM0
MOV dword ptr [RSP + 0x4],EDX
SUB R12,R15
MOV qword ptr [RDI + 0x10],0x0
MOV RAX,R12
SAR RAX,0x2
MOV qword ptr [RSP + 0x8],RAX
... | /* func0(std::vector<int, std::allocator<int> >&, int) */
vector * func0(vector *param_1,int param_2)
{
int iVar1;
long lVar2;
int *piVar3;
ulong uVar4;
int *piVar5;
int *piVar6;
vector *pvVar7;
_Iter_comp_iter in_ECX;
int in_EDX;
_Iter_comp_iter extraout_EDX;
int iVar8;
_Iter_comp_iter extrao... |
15 | func0 |
#include <vector>
#include <algorithm>
#include <assert.h>
| std::vector<int> func0(std::vector<int>& nums, int n) {
std::vector<int> largest_nums(nums.begin(), nums.end());
std::sort(largest_nums.begin(), largest_nums.end(), std::greater<int>());
largest_nums.resize(n);
return largest_nums;
}
| int main() {
std::vector<int> test_vec1 = {25, 35, 22, 85, 14, 65, 75, 22, 58};
std::vector<int> result1 = {85, 75, 65};
assert(func0(test_vec1, 3) == result1);
std::vector<int> test_vec2 = {25, 35, 22, 85, 14, 65, 75, 22, 58};
std::vector<int> result2 = {85, 75};
assert(func0(test_vec2,... | O3 | cpp | func0(std::vector<int, std::allocator<int> >&, int):
endbr64
push %r15
pxor %xmm0,%xmm0
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x18,%rsp
mov 0x8(%rsi),%rax
mov (%rsi),%r14
movups %xmm0,(%rdi)
mov %edx,0xc(%rsp)
mov %rax,(%rsp)
sub %r14,%rax
mov %rax,%r... | _Z5func0RSt6vectorIiSaIiEEi:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
push rbx
mov rbx, rdi
sub rsp, 18h
mov r14, [rsi+8]
mov r15, [rsi]
movups xmmword ptr [rdi], xmm0
mov [rsp+48h+var_3C], edx
sub r14, r15
mov qword ptr [rdi+10h], 0
mov ... | long long func0(long long a1, long long a2, int a3)
{
long long v4; // r14
int *v5; // r15
signed long long v6; // r14
_DWORD *v7; // rax
_DWORD *v8; // r12
_DWORD *v9; // r13
unsigned long long v10; // rdx
_DWORD *v11; // r15
_DWORD *v12; // r14
int v13; // ebp
_DWORD *v14; // rsi
int v15; // ... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
SUB RSP,0x18
MOV R14,qword ptr [RSI + 0x8]
MOV R15,qword ptr [RSI]
MOVUPS xmmword ptr [RDI],XMM0
MOV dword ptr [RSP + 0xc],EDX
SUB R14,R15
MOV qword ptr [RDI + 0x10],0x0
MOV RAX,R14
SAR RAX,0x2
MOV qword ptr [RSP],RAX
MOV RA... | /* func0(std::vector<int, std::allocator<int> >&, int) */
vector * func0(vector *param_1,int param_2,int param_3,int param_4,int param_5,
int param_6,int param_7,int param_8,int param_9,
int param_10,int4 param_11)
{
int *piVar1;
int iVar2;
int iVar3;
long lVar4;
int *piVar5;
u... |
16 | func0 |
#include <vector>
#include <assert.h>
| int func0(int n) {
std::vector<int> A(n + 1, 0);
std::vector<int> B(n + 1, 0);
A[0] = 1;
A[1] = 0;
B[0] = 0;
B[1] = 1;
for (int i = 2; i <= n; i++) {
A[i] = A[i - 2] + 2 * B[i - 1];
B[i] = A[i - 1] + B[i - 2];
}
return A[n];
}
| int main() {
assert(func0(2) == 3);
assert(func0(8) == 153);
assert(func0(12) == 2131);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x68,%rsp
mov %edi,-0x64(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x58(%rbp),%rax
mov %rax,%rdi
callq 14e8 <_ZNSaIiEC1Ev>
movl $0x0,-0x30(%rbp)
mov -0x64(%rbp),%eax
add $0x1,%eax
movslq %eax,%rsi
lea ... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 78h
mov [rbp+var_74], edi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_68]
mov [rbp+var_60], rax
nop
nop
mov [rbp+var_30], 0
mov eax, [rbp+var_74]
add eax, 1
movsxd rsi, eax
lea rcx,... | long long func0(int a1)
{
int v1; // ebx
int v2; // ebx
int v3; // ebx
int v4; // ebx
unsigned int v5; // ebx
char v7; // [rsp+17h] [rbp-69h] BYREF
int v8; // [rsp+18h] [rbp-68h] BYREF
int i; // [rsp+1Ch] [rbp-64h]
int *v10; // [rsp+20h] [rbp-60h]
char *v11; // [rsp+28h] [rbp-58h]
_BYTE v12[32]; ... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x78
MOV dword ptr [RBP + -0x74],EDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x68]
MOV qword ptr [RBP + -0x60],RAX
NOP
NOP
MOV dword ptr [RBP + -0x30],0x0
MOV EAX,dword ptr [RBP + -0x74]
ADD EAX,0x1
MOVSXD RSI,EAX
LEA R... | /* func0(int) */
int4 func0(int param_1)
{
int iVar1;
int iVar2;
int4 uVar3;
int4 *puVar4;
int *piVar5;
long in_FS_OFFSET;
allocator local_71;
int local_70;
int local_6c;
int *local_68;
allocator *local_60;
vector<int,std::allocator<int>> local_58 [32];
int local_38 [6];
long local_20;
... |
17 | func0 |
#include <vector>
#include <assert.h>
| int func0(int n) {
std::vector<int> A(n + 1, 0);
std::vector<int> B(n + 1, 0);
A[0] = 1;
A[1] = 0;
B[0] = 0;
B[1] = 1;
for (int i = 2; i <= n; i++) {
A[i] = A[i - 2] + 2 * B[i - 1];
B[i] = A[i - 1] + B[i - 2];
}
return A[n];
}
| int main() {
assert(func0(2) == 3);
assert(func0(8) == 153);
assert(func0(12) == 2131);
return 0;
}
| O1 | cpp | func0(int):
endbr64
push %r12
push %rbp
push %rbx
lea 0x1(%rdi),%ecx
movslq %ecx,%rcx
movabs $0x1fffffffffffffff,%rax
cmp %rax,%rcx
ja 121d <_Z5func0i+0x54>
mov %edi,%ebp
test %rcx,%rcx
je 1240 <_Z5func0i+0x77>
lea 0x0(,%rcx,4),%r12
mov %r12,%rdi
callq 10c0 <_Znwm@plt>
mov %rax,%rbx
l... | _Z5func0i:
endbr64
push r12
push rbp
push rbx
lea ebx, [rdi+1]
movsxd rbx, ebx
mov rax, rbx
shr rax, 3Dh
jnz short loc_1218
mov r12d, edi
test rbx, rbx
jz loc_12CD
shl rbx, 2
mov rdi, rbx; unsigned __int64
call __Znwm; operator new(ulong)
mov rbp, rax
lea rdx, [r... | // write access to const memory has been detected, the output may be wrong!
long long func0(int a1)
{
unsigned long long v1; // rbx
_DWORD *v3; // rax
_DWORD *v4; // rbp
_DWORD *v5; // rdx
_DWORD *v6; // rax
_DWORD *v7; // r8
_DWORD *v8; // rdx
_DWORD *v9; // rax
_DWORD *v10; // rdx
_DWORD *v11; //... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
LEA EBX,[RDI + 0x1]
MOVSXD RBX,EBX
MOV RAX,RBX
SHR RAX,0x3d
JNZ 0x00101218
MOV R12D,EDI
TEST RBX,RBX
JZ 0x001012cd
SHL RBX,0x2
MOV RDI,RBX
LAB_001011f3:
CALL 0x001010b0
MOV RBP,RAX
LEA RDX,[RAX + RBX*0x1]
LAB_001011ff:
MOV dword ptr [RAX],0x0
ADD RAX,0x4
CMP RAX,RDX
JNZ 0x00101... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(int) */
int func0(int param_1)
{
int iVar1;
int *piVar2;
int *piVar3;
int *piVar4;
ulong uVar5;
ulong uVar6;
int *unaff_RBP;
int unaff_R12D;
uVar5 = (ulong)(param_1 + 1);
if (uVar5 >> 0x3d == 0) {
... |
18 | func0 |
#include <vector>
#include <assert.h>
| int func0(int n) {
std::vector<int> A(n + 1, 0);
std::vector<int> B(n + 1, 0);
A[0] = 1;
A[1] = 0;
B[0] = 0;
B[1] = 1;
for (int i = 2; i <= n; i++) {
A[i] = A[i - 2] + 2 * B[i - 1];
B[i] = A[i - 1] + B[i - 2];
}
return A[n];
}
| int main() {
assert(func0(2) == 3);
assert(func0(8) == 153);
assert(func0(12) == 2131);
return 0;
}
| O2 | cpp | func0(int):
endbr64
movabs $0x1fffffffffffffff,%rax
push %r12
push %rbp
push %rbx
lea 0x1(%rdi),%ebx
movslq %ebx,%rbx
cmp %rax,%rbx
ja 137e <_Z5func0i+0xee>
test %rbx,%rbx
je 10e0 <_Z5func0i.cold>
shl $0x2,%rbx
mov %edi,%r12d
mov %rbx,%rdi
callq 10c0 <_Znwm@plt>
mov %rax,%rbp
lea (... | _Z5func0i:
endbr64
push r12
push rbp
push rbx
lea ebx, [rdi+1]
movsxd rbx, ebx
mov rax, rbx
shr rax, 3Dh
jnz loc_1399
test rbx, rbx
jz _Z5func0i_cold; func0(int) [clone]
shl rbx, 2
mov r12d, edi
mov rdi, rbx; unsigned __int64
call __Znwm; operator new(ulong)
mov rdx,... | long long func0(int a1)
{
unsigned long long v1; // rbx
_QWORD *v2; // rbp
void *v3; // rax
_QWORD *v4; // rax
void *v5; // r11
_QWORD *v6; // rdx
int v7; // esi
int v8; // r8d
long long v9; // r10
_QWORD *v10; // rcx
int v11; // r9d
int v12; // eax
int v13; // edi
int v14; // r9d
unsigne... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
LEA EBX,[RDI + 0x1]
MOVSXD RBX,EBX
MOV RAX,RBX
SHR RAX,0x3d
JNZ 0x00101399
TEST RBX,RBX
JZ 0x00101100
SHL RBX,0x2
MOV R12D,EDI
MOV RDI,RBX
LAB_001012de:
CALL 0x001010d0
MOV RDX,RBX
XOR ESI,ESI
MOV RDI,RAX
MOV RBP,RAX
CALL 0x001010b0
MOV RDI,RBX
LAB_001012f6:
CALL 0x001010d0
MOV... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(int) */
ulong func0(int param_1)
{
int iVar1;
uint uVar2;
code *pcVar3;
int iVar4;
int8 *__s;
void *__s_00;
int8 *puVar5;
int *piVar6;
int *piVar7;
int *piVar8;
ulong uVar9;
int iVar10;
int iVar11;
... |
19 | func0 |
#include <vector>
#include <assert.h>
| int func0(int n) {
std::vector<int> A(n + 1, 0);
std::vector<int> B(n + 1, 0);
A[0] = 1;
A[1] = 0;
B[0] = 0;
B[1] = 1;
for (int i = 2; i <= n; i++) {
A[i] = A[i - 2] + 2 * B[i - 1];
B[i] = A[i - 1] + B[i - 2];
}
return A[n];
}
| int main() {
assert(func0(2) == 3);
assert(func0(8) == 153);
assert(func0(12) == 2131);
return 0;
}
| O3 | cpp | func0(int):
endbr64
movabs $0x1fffffffffffffff,%rax
push %r12
lea 0x1(%rdi),%r12d
movslq %r12d,%r12
push %rbp
push %rbx
cmp %rax,%r12
ja 13c3 <_Z5func0i+0x113>
test %r12,%r12
je 1100 <_Z5func0i.cold>
shl $0x2,%r12
mov %edi,%ebx
mov %r12,%rdi
callq 10e0 <_Znwm@plt>
mov %r12,%rdx
xor ... | _Z5func0i:
endbr64
push r12
lea r12d, [rdi+1]
movsxd r12, r12d
push rbp
mov rax, r12
push rbx
shr rax, 3Dh
jnz loc_13B7
test r12, r12
jz _Z5func0i_cold; func0(int) [clone]
shl r12, 2
mov ebp, edi
mov rdi, r12; unsigned __int64
call __Znwm; operator new(ulong)
mov rdx... | long long func0(int a1)
{
unsigned long long v1; // r12
_QWORD *v3; // rbx
void *v4; // rax
_QWORD *v5; // rax
_DWORD *v6; // rdi
long long v7; // rdx
unsigned int v8; // esi
int v9; // ecx
long long v10; // rax
unsigned int v11; // ebp
if ( (unsigned long long)(a1 + 1) >> 61 )
std::__throw_... | func0:
ENDBR64
PUSH R12
LEA R12D,[RDI + 0x1]
MOVSXD R12,R12D
PUSH RBP
MOV RAX,R12
PUSH RBX
SHR RAX,0x3d
JNZ 0x001013b7
TEST R12,R12
JZ 0x00101100
SHL R12,0x2
MOV EBP,EDI
MOV RDI,R12
LAB_001012de:
CALL 0x001010d0
MOV RDX,R12
XOR ESI,ESI
MOV RDI,RAX
MOV RBX,RAX
CALL 0x001010b0
MOV RDI,R12
LAB_001012f6:
CALL 0x001010d0
MO... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(int) */
ulong func0(int param_1)
{
uint uVar1;
code *pcVar2;
int iVar3;
int8 *__s;
void *__s_00;
int8 *puVar4;
int iVar5;
long lVar6;
int iVar7;
ulong uVar8;
uVar8 = (ulong)(param_1 + 1);
if (uVar8... |
20 | func0 |
#include <assert.h>
| bool func0(int a, int b) {
return (a ^ b) && !((a ^ b) & ((a ^ b) - 1));
}
| int main() {
assert(func0(13, 9) == true);
assert(func0(15, 8) == false);
assert(func0(2, 4) == false);
return 0;
}
| O0 | cpp | func0(int, int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x4(%rbp)
mov %esi,-0x8(%rbp)
mov -0x4(%rbp),%eax
cmp -0x8(%rbp),%eax
je 117d <_Z5func0ii+0x34>
mov -0x4(%rbp),%eax
xor -0x8(%rbp),%eax
mov %eax,%edx
mov -0x4(%rbp),%eax
xor -0x8(%rbp),%eax
sub $0x1,%eax
and %edx,%eax
t... | _Z5func0ii:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov [rbp+var_8], esi
mov eax, [rbp+var_4]
cmp eax, [rbp+var_8]
jz short loc_117D
mov eax, [rbp+var_4]
xor eax, [rbp+var_8]
mov edx, eax
mov eax, [rbp+var_4]
xor eax, [rbp+var_8]
sub eax, 1
and eax, edx... | _BOOL8 func0(int a1, int a2)
{
return a1 != a2 && ((a2 ^ a1) & ((a2 ^ a1) - 1)) == 0;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV dword ptr [RBP + -0x8],ESI
MOV EAX,dword ptr [RBP + -0x4]
CMP EAX,dword ptr [RBP + -0x8]
JZ 0x0010117d
MOV EAX,dword ptr [RBP + -0x4]
XOR EAX,dword ptr [RBP + -0x8]
MOV EDX,EAX
MOV EAX,dword ptr [RBP + -0x4]
XOR EAX,dword ptr [RBP + -0x8]
SUB EAX,0x... | /* func0(int, int) */
int8 func0(int param_1,int param_2)
{
int8 uVar1;
if ((param_1 == param_2) || (((param_1 ^ param_2) - 1U & (param_1 ^ param_2)) != 0)) {
uVar1 = 0;
}
else {
uVar1 = 1;
}
return uVar1;
} |
21 | func0 |
#include <assert.h>
| bool func0(int a, int b) {
return (a ^ b) && !((a ^ b) & ((a ^ b) - 1));
}
| int main() {
assert(func0(13, 9) == true);
assert(func0(15, 8) == false);
assert(func0(2, 4) == false);
return 0;
}
| O1 | cpp | func0(int, int):
endbr64
mov $0x0,%eax
cmp %esi,%edi
je 1140 <_Z5func0ii+0x17>
xor %esi,%edi
lea -0x1(%rdi),%eax
test %edi,%eax
sete %al
retq
| _Z5func0ii:
endbr64
mov eax, 0
cmp edi, esi
jz short locret_1140
xor edi, esi
lea eax, [rdi-1]
test eax, edi
setz al
locret_1140:
retn | bool func0(int a1, int a2)
{
bool result; // al
result = 0;
if ( a1 != a2 )
return ((a2 ^ a1) & ((a2 ^ a1) - 1)) == 0;
return result;
} | func0:
ENDBR64
MOV EAX,0x0
CMP EDI,ESI
JZ 0x00101140
XOR EDI,ESI
LEA EAX,[RDI + -0x1]
TEST EAX,EDI
SETZ AL
LAB_00101140:
RET | /* func0(int, int) */
int4 func0(int param_1,int param_2)
{
uint uVar1;
int4 uVar2;
uVar2 = 0;
if (param_1 != param_2) {
uVar1 = (param_1 ^ param_2) - 1;
uVar2 = CONCAT31((int3)(uVar1 >> 8),(uVar1 & (param_1 ^ param_2)) == 0);
}
return uVar2;
} |
22 | func0 |
#include <assert.h>
| bool func0(int a, int b) {
return (a ^ b) && !((a ^ b) & ((a ^ b) - 1));
}
| int main() {
assert(func0(13, 9) == true);
assert(func0(15, 8) == false);
assert(func0(2, 4) == false);
return 0;
}
| O2 | cpp | func0(int, int):
endbr64
xor %eax,%eax
cmp %esi,%edi
je 1154 <_Z5func0ii+0x14>
xor %esi,%edi
lea -0x1(%rdi),%eax
test %edi,%eax
sete %al
retq
nopw %cs:0x0(%rax,%rax,1)
| _Z5func0ii:
endbr64
xor eax, eax
cmp edi, esi
jz short locret_1154
xor edi, esi
lea eax, [rdi-1]
test eax, edi
setz al
locret_1154:
retn | bool func0(int a1, int a2)
{
bool result; // al
result = 0;
if ( a1 != a2 )
return ((a2 ^ a1) & ((a2 ^ a1) - 1)) == 0;
return result;
} | func0:
ENDBR64
XOR EAX,EAX
CMP EDI,ESI
JZ 0x00101154
XOR EDI,ESI
LEA EAX,[RDI + -0x1]
TEST EAX,EDI
SETZ AL
LAB_00101154:
RET | /* func0(int, int) */
int4 func0(int param_1,int param_2)
{
uint uVar1;
int4 uVar2;
uVar2 = 0;
if (param_1 != param_2) {
uVar1 = (param_1 ^ param_2) - 1;
uVar2 = CONCAT31((int3)(uVar1 >> 8),(uVar1 & (param_1 ^ param_2)) == 0);
}
return uVar2;
} |
23 | func0 |
#include <assert.h>
| bool func0(int a, int b) {
return (a ^ b) && !((a ^ b) & ((a ^ b) - 1));
}
| int main() {
assert(func0(13, 9) == true);
assert(func0(15, 8) == false);
assert(func0(2, 4) == false);
return 0;
}
| O3 | cpp | func0(int, int):
endbr64
xor %eax,%eax
cmp %esi,%edi
je 1154 <_Z5func0ii+0x14>
xor %esi,%edi
lea -0x1(%rdi),%eax
test %edi,%eax
sete %al
retq
nopw %cs:0x0(%rax,%rax,1)
| _Z5func0ii:
endbr64
xor eax, eax
cmp edi, esi
jz short locret_1154
xor edi, esi
lea eax, [rdi-1]
test eax, edi
setz al
locret_1154:
retn | bool func0(int a1, int a2)
{
bool result; // al
result = 0;
if ( a1 != a2 )
return ((a2 ^ a1) & ((a2 ^ a1) - 1)) == 0;
return result;
} | func0:
ENDBR64
XOR EAX,EAX
CMP EDI,ESI
JZ 0x00101154
XOR EDI,ESI
LEA EAX,[RDI + -0x1]
TEST EAX,EDI
SETZ AL
LAB_00101154:
RET | /* func0(int, int) */
int4 func0(int param_1,int param_2)
{
uint uVar1;
int4 uVar2;
uVar2 = 0;
if (param_1 != param_2) {
uVar1 = (param_1 ^ param_2) - 1;
uVar2 = CONCAT31((int3)(uVar1 >> 8),(uVar1 & (param_1 ^ param_2)) == 0);
}
return uVar2;
} |
24 | func0 |
#include <iostream>
#include <vector>
#include <regex>
#include <assert.h>
| std::vector<std::string> func0(const std::string &text) {
std::regex word_regex(R"(\b\w{4,}\b)");
std::sregex_iterator words_begin = std::sregex_iterator(text.begin(), text.end(), word_regex);
std::sregex_iterator words_end = std::sregex_iterator();
std::vector<std::string> results;
for (std:... | int main() {
std::vector<std::string> res;
res = func0("Please move back to stream");
assert((res == std::vector<std::string>{"Please", "move", "back", "stream"}));
res = func0("Jing Eco and Tech");
assert((res == std::vector<std::string>{"Jing", "Tech"}));
res = func0("Jhingai wulu ... | O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x148,%rsp
mov %rdi,-0x148(%rbp)
mov %rsi,-0x150(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x140(%rbp),%rax
mov $0x10,%edx
le... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 148h
mov [rbp+var_148], rdi
mov [rbp+var_150], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_140]
mov edx, 10h
lea rcx, aBW4B; "\\b\\w{... | long long func0(long long a1, long long a2)
{
long long v2; // rbx
long long v3; // rax
long long v4; // rax
_BYTE v6[32]; // [rsp+10h] [rbp-140h] BYREF
_BYTE v7[32]; // [rsp+30h] [rbp-120h] BYREF
_BYTE v8[64]; // [rsp+50h] [rbp-100h] BYREF
_OWORD v9[4]; // [rsp+90h] [rbp-C0h] BYREF
_BYTE v10[64]; // [... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x148
MOV qword ptr [RBP + -0x148],RDI
MOV qword ptr [RBP + -0x150],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x140]
MOV EDX,0x10
LEA RCX,[0x134051]
MOV RSI,RCX
MOV RDI,RAX
LAB_00104b6f:
CALL 0x00106b54
MOV RAX,qword ... | /* func0(std::string const&) */
string * func0(string *param_1)
{
char cVar1;
__normal_iterator _Var2;
__normal_iterator _Var3;
match_results *pmVar4;
long in_FS_OFFSET;
regex local_148 [32];
match_results<__normal_iterator<char_const*,std::string>,std::allocator<std::sub_match<__normal_iterator<char_co... |
25 | func0 |
#include <iostream>
#include <vector>
#include <regex>
#include <assert.h>
| std::vector<std::string> func0(const std::string &text) {
std::regex word_regex(R"(\b\w{4,}\b)");
std::sregex_iterator words_begin = std::sregex_iterator(text.begin(), text.end(), word_regex);
std::sregex_iterator words_end = std::sregex_iterator();
std::vector<std::string> results;
for (std:... | int main() {
std::vector<std::string> res;
res = func0("Please move back to stream");
assert((res == std::vector<std::string>{"Please", "move", "back", "stream"}));
res = func0("Jing Eco and Tech");
assert((res == std::vector<std::string>{"Jing", "Tech"}));
res = func0("Jhingai wulu ... | O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x298,%rsp
mov %rdi,%rbp
mov %rsi,%rbx
mov %fs:0x28,%rax
mov %rax,0x288(%rsp)
xor %eax,%eax
lea 0xb0(%rsp),%r13
mov ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 2C8h
mov r12, rdi
mov rbx, rsi
mov rax, fs:28h
mov [rbp+var_38], rax
xor eax, eax
lea rax, [rbp+var_2C8]
mov r14, rax
... | _QWORD * func0(_QWORD *a1, long long *a2)
{
long long v4; // rdx
long long v5; // rax
long long v6; // rdi
long long v7; // rsi
unsigned long long v8; // rbx
char *v9; // rdx
struct _Unwind_Exception *v10; // rbx
char *v11; // rbx
long long v12; // rax
char *v13; // rdx
void **v14; // rsi
_QWORD... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x2c8
MOV R12,RDI
MOV RBX,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x2c8]
MOV R14,RAX
MOV RDI,RAX
CALL 0x001046f0
MOV qword ptr [RBP + -0x2c0],0x0
MOV qword ptr [RBP + -0x2b8],0x0
... | /* func0(std::string const&) */
string * func0(string *param_1)
{
long *plVar1;
int *__src;
_Sp_counted_base<(_Lock_policy)2> *this;
_Sp_counted_base<(_Lock_policy)2> *p_Var2;
bool bVar3;
char cVar4;
uint uVar5;
ulong uVar6;
int8 uVar7;
ulong uVar8;
uint uVar9;
sub_match *psVar10;
sub_match ... |
26 | func0 |
#include <iostream>
#include <vector>
#include <regex>
#include <assert.h>
| std::vector<std::string> func0(const std::string &text) {
std::regex word_regex(R"(\b\w{4,}\b)");
std::sregex_iterator words_begin = std::sregex_iterator(text.begin(), text.end(), word_regex);
std::sregex_iterator words_end = std::sregex_iterator();
std::vector<std::string> results;
for (std:... | int main() {
std::vector<std::string> res;
res = func0("Please move back to stream");
assert((res == std::vector<std::string>{"Please", "move", "back", "stream"}));
res = func0("Jing Eco and Tech");
assert((res == std::vector<std::string>{"Jing", "Tech"}));
res = func0("Jhingai wulu ... | O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x288,%rsp
mov %fs:0x28,%rax
mov %rax,0x278(%rsp)
xor %eax,%eax
lea 0xa0(%rsp),%r14
lea ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
lea r15, [rbp+var_2C8]
push r13
push r12
push rbx
mov rbx, rsi
sub rsp, 2E8h
mov [rbp+var_2E8], rdi
mov rdi, r15; this
mov rax, fs:28h
mov [rbp+var_38], rax
x... | long long func0(long long a1, unsigned long long *a2)
{
__m128i v3; // rdi
__m128i v4; // xmm0
volatile signed __int32 *v5; // r12
long long v6; // rdx
volatile signed __int32 *v7; // rcx
signed __int32 v8; // eax
long long v9; // r12
long long v10; // rdx
volatile signed __int32 *v11; // rcx
signe... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
LEA R15,[RBP + -0x2c8]
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,RSI
SUB RSP,0x2e8
MOV qword ptr [RBP + -0x2e8],RDI
MOV RDI,R15
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
MOV qword ptr [RBP + -0x300],R15
CALL 0x001036d0
LEA RDX,[0x1196b1]
PXOR ... | /* func0(std::string const&) */
string * func0(string *param_1)
{
int *__src;
int auVar1 [16];
int auVar2 [16];
bool bVar3;
int iVar4;
long *plVar5;
long *plVar6;
long *plVar7;
uint uVar8;
regex *prVar9;
uint uVar10;
long *plVar11;
long *plVar12;
long lVar13;
long *in_RSI;
_Sp_counted_... |
27 | func0 |
#include <iostream>
#include <vector>
#include <regex>
#include <assert.h>
| std::vector<std::string> func0(const std::string &text) {
std::regex word_regex(R"(\b\w{4,}\b)");
std::sregex_iterator words_begin = std::sregex_iterator(text.begin(), text.end(), word_regex);
std::sregex_iterator words_end = std::sregex_iterator();
std::vector<std::string> results;
for (std:... | int main() {
std::vector<std::string> res;
res = func0("Please move back to stream");
assert((res == std::vector<std::string>{"Please", "move", "back", "stream"}));
res = func0("Jing Eco and Tech");
assert((res == std::vector<std::string>{"Jing", "Tech"}));
res = func0("Jhingai wulu ... | O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
mov %rsi,%rbp
push %rbx
sub $0x288,%rsp
mov %fs:0x28,%rax
mov %rax,0x278(%rsp)
xor %eax,%eax
lea 0xa0(%rsp),%r14
lea ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
push r13
mov r13, rsi
push r12
push rbx
lea rbx, [rbp+var_2C8]
sub rsp, 2E8h
mov [rbp+var_2E8], rdi
mov rdi, rbx; this
mov rax, fs:28h
mov [rbp+var_38], rax
x... | long long func0(long long a1, unsigned long long *a2)
{
void **v2; // r12
long long v3; // r15
signed long long v4; // r13
__m128i v5; // xmm0
long long v6; // rdi
void *v7; // rdi
void **v8; // rbx
void *v9; // rdi
unsigned long long v10; // rax
unsigned long long v11; // rdx
__m128i v12; // rdi... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
MOV R13,RSI
PUSH R12
PUSH RBX
LEA RBX,[RBP + -0x2c8]
SUB RSP,0x2e8
MOV qword ptr [RBP + -0x2e8],RDI
MOV RDI,RBX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
MOV qword ptr [RBP + -0x308],RBX
CALL 0x00104710
LEA RDX,[0x11b6ea]
PXOR ... | /* func0(std::string const&) */
string * func0(string *param_1)
{
int8 uVar1;
int auVar2 [16];
int auVar3 [16];
bool bVar4;
int8 *puVar5;
ulong uVar6;
int auVar7 [8];
vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::stri... |
28 | func0 |
#include <vector>
#include <assert.h>
| std::vector<int> func0(std::vector<int> nums) {
std::vector<int> square_nums;
for (int num : nums) {
square_nums.push_back(num * num);
}
return square_nums;
}
| int main() {
assert(func0({1, 2, 3, 4, 5, 6, 7, 8, 9, 10}) == std::vector<int>({1, 4, 9, 16, 25, 36, 49, 64, 81, 100}));
assert(func0({10, 20, 30}) == std::vector<int>({100, 400, 900}));
assert(func0({12, 15}) == std::vector<int>({144, 225}));
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x48,%rsp
mov %rdi,-0x48(%rbp)
mov %rsi,-0x50(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x48(%rbp),%rax
mov %rax,%rdi
callq 1a0e <_ZNSt6vectorIiSaIiEEC1Ev>
mov -0x50(%rb... | _Z5func0St6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 48h
mov [rbp+var_48], rdi
mov [rbp+var_50], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_48]
mov rdi, rax
call _ZNSt6vectorIiSaIiEEC2Ev; std::vector<int>::vector(void)
mov ... | long long func0(long long a1, long long a2)
{
int v3; // [rsp+18h] [rbp-38h] BYREF
int v4; // [rsp+1Ch] [rbp-34h]
long long v5; // [rsp+20h] [rbp-30h] BYREF
_QWORD v6[4]; // [rsp+28h] [rbp-28h] BYREF
v6[2] = __readfsqword(0x28u);
std::vector<int>::vector(a1);
v6[1] = a2;
v5 = std::vector<int>::begin(a... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x48],RDI
MOV qword ptr [RBP + -0x50],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x48]
MOV RDI,RAX
CALL 0x00101a92
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x20],RAX
MO... | /* func0(std::vector<int, std::allocator<int> >) */
vector<int,std::allocator<int>> * func0(vector param_1)
{
bool bVar1;
int *piVar2;
vector<int,std::allocator<int>> *in_RSI;
int4 in_register_0000003c;
vector<int,std::allocator<int>> *this;
long in_FS_OFFSET;
int local_40;
int local_3c;
int8 local_... |
29 | func0 |
#include <vector>
#include <assert.h>
| std::vector<int> func0(std::vector<int> nums) {
std::vector<int> square_nums;
for (int num : nums) {
square_nums.push_back(num * num);
}
return square_nums;
}
| int main() {
assert(func0({1, 2, 3, 4, 5, 6, 7, 8, 9, 10}) == std::vector<int>({1, 4, 9, 16, 25, 36, 49, 64, 81, 100}));
assert(func0({10, 20, 30}) == std::vector<int>({100, 400, 900}));
assert(func0({12, 15}) == std::vector<int>({144, 225}));
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %rdi,%rbx
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
mov (%rsi),%rbp
mov 0x8(%rsi),%r12
cmp %r12,%rbp
... | _Z5func0St6vectorIiSaIiEE:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 18h
mov rbx, rdi
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
mov rbp, [rsi]
mov r12, [rsi+8]
cmp r... | _QWORD * func0(_QWORD *a1, long long a2)
{
_DWORD *v2; // rbp
_DWORD *v3; // r12
int v4; // eax
int *v5; // rsi
int v7; // [rsp+4h] [rbp-34h] BYREF
unsigned long long v8; // [rsp+8h] [rbp-30h]
v8 = __readfsqword(0x28u);
*a1 = 0LL;
a1[1] = 0LL;
a1[2] = 0LL;
v2 = *(_DWORD **)a2;
v3 = *(_DWORD **)... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV RBP,qword ptr [RSI]
MOV R12,qword ptr [RSI + 0x8]
CMP R12,RBP
JZ 0x001012f1
LEA R13,[... | /* func0(std::vector<int, std::allocator<int> >) */
vector<int,std::allocator<int>> * func0(vector param_1)
{
int *piVar1;
int *piVar2;
int *piVar3;
int8 *in_RSI;
int4 in_register_0000003c;
vector<int,std::allocator<int>> *this;
long in_FS_OFFSET;
int local_34;
long local_30;
this = (vector<int... |
30 | func0 |
#include <vector>
#include <assert.h>
| std::vector<int> func0(std::vector<int> nums) {
std::vector<int> square_nums;
for (int num : nums) {
square_nums.push_back(num * num);
}
return square_nums;
}
| int main() {
assert(func0({1, 2, 3, 4, 5, 6, 7, 8, 9, 10}) == std::vector<int>({1, 4, 9, 16, 25, 36, 49, 64, 81, 100}));
assert(func0({10, 20, 30}) == std::vector<int>({100, 400, 900}));
assert(func0({12, 15}) == std::vector<int>({144, 225}));
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
mov (%rsi),%rbx
mov 0x8(%rsi),%rbp
cmp %rbp,%rbx
... | _Z5func0St6vectorIiSaIiEE:
endbr64
push r13
pxor xmm0, xmm0
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 18h
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
mov rbx, [rsi]
mov r12, [rsi+8]
cmp r12, r... | long long func0(long long a1, long long a2)
{
_DWORD *v2; // rbx
_DWORD *v3; // r12
int *v4; // rdx
int *v5; // rsi
int v6; // eax
int v8; // [rsp+0h] [rbp-34h] BYREF
unsigned long long v9; // [rsp+4h] [rbp-30h]
v9 = __readfsqword(0x28u);
*(_QWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
v2 = *(_... | func0:
ENDBR64
PUSH R13
PXOR XMM0,XMM0
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x18
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
MOV RBX,qword ptr [RSI]
MOV R12,qword ptr [RSI + 0x8]
CMP R12,RBX
JZ 0x001016b0
XOR EDX,EDX
XOR ES... | /* func0(std::vector<int, std::allocator<int> >) */
vector<int,std::allocator<int>> * func0(vector param_1)
{
int *piVar1;
int *piVar2;
int *piVar3;
int8 *in_RSI;
int *piVar4;
int4 in_register_0000003c;
vector<int,std::allocator<int>> *this;
long in_FS_OFFSET;
int local_34;
long local_30;
thi... |
31 | func0 |
#include <vector>
#include <assert.h>
| std::vector<int> func0(std::vector<int> nums) {
std::vector<int> square_nums;
for (int num : nums) {
square_nums.push_back(num * num);
}
return square_nums;
}
| int main() {
assert(func0({1, 2, 3, 4, 5, 6, 7, 8, 9, 10}) == std::vector<int>({1, 4, 9, 16, 25, 36, 49, 64, 81, 100}));
assert(func0({10, 20, 30}) == std::vector<int>({100, 400, 900}));
assert(func0({12, 15}) == std::vector<int>({144, 225}));
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
push %r13
pxor %xmm0,%xmm0
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,0x10(%rdi)
movups %xmm0,(%rdi)
mov (%rsi),%rbx
mov 0x8(%rsi),%rbp
cmp %rbp,%rbx
je... | _Z5func0St6vectorIiSaIiEE:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
mov r12, rdi
push rbp
push rbx
sub rsp, 28h
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
mov r13, [rsi+8]
mov rbp, [rsi]
cmp r13, rbp
jz loc_16EE
xor r8d, r8d
xor ... | long long func0(long long a1, long long a2)
{
_DWORD *v3; // r13
_DWORD *v4; // rbp
char *v5; // r8
char *v6; // rcx
int v7; // ebx
char *v8; // r15
signed long long v9; // r14
unsigned long long v10; // rax
unsigned long long v11; // rdx
char *v12; // r9
char *v14; // rax
unsigned long long v1... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
MOV R12,RDI
PUSH RBP
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
MOV R13,qword ptr [RSI + 0x8]
MOV RBP,qword ptr [RSI]
CMP R13,RBP
JZ 0x001016ee
XOR R8D,R8D
XOR ECX,ECX
JMP 0x00101668
LAB_00101650:
MOV dword ptr [RC... | /* func0(std::vector<int, std::allocator<int> >) */
int (*) [16] func0(vector param_1)
{
int *piVar1;
int *__src;
ulong uVar2;
void *__dest;
int (*pauVar3) [16];
int *piVar4;
int iVar5;
int *piVar6;
int8 *in_RSI;
vector vVar7;
int4 in_register_0000003c;
int *piVar8;
size_t __n;
ulong local... |
32 | func0 |
#include <string>
#include <cassert>
| int func0(std::string str) {
std::string tmp = str + str;
int n = str.length();
for (int i = 1; i <= n; i++) {
std::string substring = tmp.substr(i, n);
if (str == substring) {
return i;
}
}
return n;
}
| int main() {
assert(func0("aaaa") == 1);
assert(func0("ab") == 2);
assert(func0("abc") == 3);
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %rbp
mov %rsp,%rbp
push %r12
push %rbx
sub $0x70,%rsp
mov %rdi,-0x78(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x60(%rbp),%rax
mov -0x78(%rbp),%rdx
mov -0x78(%rbp),... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r12
push rbx
sub rsp, 70h
mov [rbp+var_78], rdi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_60]
mov rdx, [rbp+var_78]
mov rcx, [rbp+var_78]
mov rsi, ... | long long func0(long long a1)
{
unsigned int v1; // ebx
int v2; // r12d
int i; // [rsp+18h] [rbp-68h]
int v5; // [rsp+1Ch] [rbp-64h]
_BYTE v6[32]; // [rsp+20h] [rbp-60h] BYREF
_BYTE v7[40]; // [rsp+40h] [rbp-40h] BYREF
unsigned long long v8; // [rsp+68h] [rbp-18h]
v8 = __readfsqword(0x28u);
std::ope... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R12
PUSH RBX
SUB RSP,0x70
MOV qword ptr [RBP + -0x78],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x60]
MOV RDX,qword ptr [RBP + -0x78]
MOV RCX,qword ptr [RBP + -0x78]
MOV RSI,RCX
MOV RDI,RAX
LAB_0010247d:
CALL 0x001029a2
MOV RAX,q... | /* func0(std::string) */
int func0(string *param_1)
{
bool bVar1;
int iVar2;
int unaff_EBX;
int iVar3;
long in_FS_OFFSET;
int local_70;
string local_68 [32];
string local_48 [40];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
std::operator+(local_68,param_1,param_1);
iVar2 = std... |
33 | func0 |
#include <string>
#include <cassert>
| int func0(std::string str) {
std::string tmp = str + str;
int n = str.length();
for (int i = 1; i <= n; i++) {
std::string substring = tmp.substr(i, n);
if (str == substring) {
return i;
}
}
return n;
}
| int main() {
assert(func0("aaaa") == 1);
assert(func0("ab") == 2);
assert(func0("abc") == 3);
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x68,%rsp
mov %rdi,%rbp
mov %fs:0x28,%rax
mov %rax,0x58(%rsp)
xor %eax,%eax
lea 0x20(%rsp),%rax
mov %rax,0x10(%rsp)
mov (%r... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 50h
mov r12, rdi
mov rax, fs:28h
mov [rsp+78h+var_30], rax
xor eax, eax
mov rbx, [rdi+8]
mov rbp, [rdi]
mov rdi, rsp
lea rax, [rsp+78h+var_68]
mo... | long long func0(long long a1)
{
size_t v1; // rbx
const void *v2; // rbp
long long v3; // rax
int v4; // r13d
size_t v5; // rbx
size_t v6; // rbp
void *v7; // rdx
size_t v8; // rcx
_QWORD *v9; // r14
void *v11; // [rsp+0h] [rbp-78h] BYREF
size_t v12; // [rsp+8h] [rbp-70h]
_QWORD v13[2]; // [rsp... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x50
MOV R12,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
MOV RBX,qword ptr [RDI + 0x8]
MOV RBP,qword ptr [RDI]
MOV RDI,RSP
LEA RAX,[RSP + 0x10]
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],0x0
MOV byte ptr [RSP + 0x1... | /* func0(std::string) */
ulong func0(ulong *param_1)
{
size_t __n;
long *plVar1;
int iVar2;
int iVar3;
int8 uVar4;
ulong uVar5;
ulong uVar6;
ulong uVar7;
long in_FS_OFFSET;
int *local_78;
ulong local_70;
int local_68;
int7 uStack_67;
long *local_58;
size_t local_50;
long local_48 [3];
... |
34 | func0 |
#include <string>
#include <cassert>
| int func0(std::string str) {
std::string tmp = str + str;
int n = str.length();
for (int i = 1; i <= n; i++) {
std::string substring = tmp.substr(i, n);
if (str == substring) {
return i;
}
}
return n;
}
| int main() {
assert(func0("aaaa") == 1);
assert(func0("ab") == 2);
assert(func0("abc") == 3);
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r15
push %r14
push %r13
mov %rdi,%r13
push %r12
push %rbp
push %rbx
sub $0x88,%rsp
mov (%rdi),%rbp
mov 0x8(%rdi),%r12
mov %fs:0x28,%rax
mov %rax,0x78(%rsp)
xor %eax,%eax
lea 0x40(%rs... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
mov r14, rdi
push r13
push r12
push rbp
push rbx
sub rsp, 88h
mov rbx, [rdi+8]
mov rbp, [rdi]
mov rax, fs:28h
mov [rsp+0B8h+var_40], rax
xor eax, eax
lea rdi, [rsp+0B8h+var_88]
lea ... | long long func0(long long a1)
{
size_t v2; // rbx
const void *v3; // rbp
long long v4; // r13
size_t v5; // rbp
size_t v6; // rbx
_BYTE *v7; // r15
_QWORD *v8; // rax
size_t v9; // rdx
_QWORD *v10; // rbx
_QWORD *v12; // rdi
unsigned int v13; // [rsp+4h] [rbp-B4h]
size_t v14; // [rsp+28h] [rbp-... | func0:
ENDBR64
PUSH R15
PUSH R14
MOV R14,RDI
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x88
MOV RBX,qword ptr [RDI + 0x8]
MOV RBP,qword ptr [RDI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x78],RAX
XOR EAX,EAX
LEA RDI,[RSP + 0x30]
LEA RAX,[RSP + 0x40]
MOV qword ptr [RSP + 0x38],0x0
LEA RSI,[RBX + RBX*0x1]
MOV ... | /* func0(std::string) */
int func0(ulong *param_1)
{
size_t __n;
size_t *psVar1;
int iVar2;
ulong uVar3;
ulong uVar4;
int *__src;
long in_FS_OFFSET;
int local_b4;
size_t local_90;
int *local_88;
ulong local_80;
int local_78;
int7 uStack_77;
size_t *local_68;
size_t local_60;
size_t loc... |
35 | func0 |
#include <string>
#include <cassert>
| int func0(std::string str) {
std::string tmp = str + str;
int n = str.length();
for (int i = 1; i <= n; i++) {
std::string substring = tmp.substr(i, n);
if (str == substring) {
return i;
}
}
return n;
}
| int main() {
assert(func0("aaaa") == 1);
assert(func0("ab") == 2);
assert(func0("abc") == 3);
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r15
push %r14
mov %rdi,%r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x88,%rsp
mov (%rdi),%rbp
mov 0x8(%rdi),%r12
mov %fs:0x28,%rax
mov %rax,0x78(%rsp)
xor %eax,%eax
lea 0x40(%rs... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
mov r14, rdi
push r13
push r12
push rbp
push rbx
sub rsp, 88h
mov rbx, [rdi+8]
mov rbp, [rdi]
mov rax, fs:28h
mov [rsp+0B8h+var_40], rax
xor eax, eax
lea rdi, [rsp+0B8h+var_88]
lea ... | long long func0(long long a1)
{
size_t v2; // rbx
const void *v3; // rbp
long long v4; // r13
size_t v5; // rbp
size_t v6; // rbx
_BYTE *v7; // r15
_QWORD *v8; // rax
size_t v9; // rdx
_QWORD *v10; // rbx
_QWORD *v12; // rdi
unsigned int v13; // [rsp+4h] [rbp-B4h]
size_t v14; // [rsp+28h] [rbp-... | func0:
ENDBR64
PUSH R15
PUSH R14
MOV R14,RDI
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x88
MOV RBX,qword ptr [RDI + 0x8]
MOV RBP,qword ptr [RDI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x78],RAX
XOR EAX,EAX
LEA RDI,[RSP + 0x30]
LEA RAX,[RSP + 0x40]
MOV qword ptr [RSP + 0x38],0x0
LEA RSI,[RBX + RBX*0x1]
MOV ... | /* func0(std::string) */
ulong func0(ulong *param_1)
{
size_t __n;
size_t *psVar1;
int iVar2;
ulong uVar3;
ulong uVar4;
int *__src;
long in_FS_OFFSET;
uint local_b4;
size_t local_90;
int *local_88;
ulong local_80;
int local_78;
int7 uStack_77;
size_t *local_68;
size_t local_60;
size_t ... |
36 | func0 |
#include <vector>
#include <algorithm>
#include <cassert>
| std::vector<int> func0(std::vector<int> list1, int n) {
std::vector<int> smallest;
std::sort(list1.begin(), list1.end());
for (int i = 0; i < n; i++) {
smallest.push_back(list1[i]);
}
return smallest;
}
| int main() {
assert((func0({10, 20, 50, 70, 90, 20, 50, 40, 60, 80, 100}, 2) == std::vector<int>{10, 20}));
assert((func0({10, 20, 50, 70, 90, 20, 50, 40, 60, 80, 100}, 5) == std::vector<int>{10, 20, 20, 40, 50}));
assert((func0({10, 20, 50, 70, 90, 20, 50, 40, 60, 80, 100}, 3) == std::vector<int>{10, 20... | O0 | cpp | func0(std::vector<int, std::allocator<int> >, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x38,%rsp
mov %rdi,-0x28(%rbp)
mov %rsi,-0x30(%rbp)
mov %edx,-0x34(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x28(%rbp),%rax
mov %rax,%rdi
callq 1adc <_ZNSt6vectorI... | _Z5func0St6vectorIiSaIiEEi:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 38h
mov [rbp+var_28], rdi
mov [rbp+var_30], rsi
mov [rbp+var_34], edx
mov rax, [rbp+var_28]
mov rdi, rax
call _ZNSt6vectorIiSaIiEEC2Ev; std::vector<int>::vector(void)
mov rax, [rbp+var_30]
mov rdi, r... | long long func0(long long a1, long long a2, int a3)
{
long long v3; // rbx
long long v4; // rax
long long v5; // rax
int i; // [rsp+2Ch] [rbp-14h]
std::vector<int>::vector(a1);
v3 = std::vector<int>::end(a2);
v4 = std::vector<int>::begin(a2);
std::sort<__gnu_cxx::__normal_iterator<int *,std::vector<in... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x28],RDI
MOV qword ptr [RBP + -0x30],RSI
MOV dword ptr [RBP + -0x34],EDX
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,RAX
CALL 0x00101ad6
MOV RAX,qword ptr [RBP + -0x30]
MOV RDI,RAX
CALL 0x00101c20
MOV RBX,RAX
MOV RAX,qword ptr [RBP + -0x30]
MO... | /* func0(std::vector<int, std::allocator<int> >, int) */
vector<int,std::allocator<int>> * func0(vector param_1,int param_2)
{
__normal_iterator _Var1;
__normal_iterator _Var2;
int *piVar3;
int in_EDX;
int4 in_register_00000034;
vector<int,std::allocator<int>> *this;
int4 in_register_0000003c;
vector<... |
37 | func0 |
#include <vector>
#include <algorithm>
#include <cassert>
| std::vector<int> func0(std::vector<int> list1, int n) {
std::vector<int> smallest;
std::sort(list1.begin(), list1.end());
for (int i = 0; i < n; i++) {
smallest.push_back(list1[i]);
}
return smallest;
}
| int main() {
assert((func0({10, 20, 50, 70, 90, 20, 50, 40, 60, 80, 100}, 2) == std::vector<int>{10, 20}));
assert((func0({10, 20, 50, 70, 90, 20, 50, 40, 60, 80, 100}, 5) == std::vector<int>{10, 20, 20, 40, 50}));
assert((func0({10, 20, 50, 70, 90, 20, 50, 40, 60, 80, 100}, 3) == std::vector<int>{10, 20... | O1 | cpp | func0(std::vector<int, std::allocator<int> >, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
mov %rdi,%rbx
mov %rsi,%r12
mov %edx,%r13d
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
mov 0x8(%rsi),%rbp
mov (%rsi),%r15
cmp %rbp,%r... | _Z5func0St6vectorIiSaIiEEi:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov rbx, rdi
mov r13, rsi
mov r12d, edx
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
mov r14, [rsi+8]
mov r15, [rsi]
cmp r15, r14
j... | _QWORD * func0(_QWORD *a1, char **a2, int a3)
{
char *v5; // r14
char *v6; // r15
int v7; // eax
unsigned long long v8; // rax
char *v9; // rbp
int v10; // ecx
char *v11; // rax
int v12; // edx
char *v13; // rsi
long long v14; // r12
long long v15; // rbp
char *v16; // rdx
_DWORD *v17; // rsi
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RBX,RDI
MOV R13,RSI
MOV R12D,EDX
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV R14,qword ptr [RSI + 0x8]
MOV R15,qword ptr [RSI]
CMP R15,R14
JZ 0x00101313
MOV RBP,R14
SUB RBP,R15
MOV RDX,RBP
S... | /* func0(std::vector<int, std::allocator<int> >, int) */
vector<int,std::allocator<int>> * func0(vector param_1,int param_2)
{
int iVar1;
int iVar2;
int *piVar3;
int *piVar4;
int *piVar5;
int *piVar6;
uint uVar7;
_Iter_less_iter in_ECX;
int in_EDX;
_Iter_less_iter extraout_EDX;
ulong uVar8;
in... |
38 | func0 |
#include <vector>
#include <algorithm>
#include <cassert>
| std::vector<int> func0(std::vector<int> list1, int n) {
std::vector<int> smallest;
std::sort(list1.begin(), list1.end());
for (int i = 0; i < n; i++) {
smallest.push_back(list1[i]);
}
return smallest;
}
| int main() {
assert((func0({10, 20, 50, 70, 90, 20, 50, 40, 60, 80, 100}, 2) == std::vector<int>{10, 20}));
assert((func0({10, 20, 50, 70, 90, 20, 50, 40, 60, 80, 100}, 5) == std::vector<int>{10, 20, 20, 40, 50}));
assert((func0({10, 20, 50, 70, 90, 20, 50, 40, 60, 80, 100}, 3) == std::vector<int>{10, 20... | O2 | cpp | func0(std::vector<int, std::allocator<int> >, int):
endbr64
push %r15
push %r14
mov %edx,%r14d
push %r13
push %r12
mov %rdi,%r12
push %rbp
mov %rsi,%rbp
push %rbx
sub $0x8,%rsp
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
mov 0x8(%rsi),%r13
mov (%rsi),%r15
cmp %r13,%r... | _Z5func0St6vectorIiSaIiEEi:
endbr64
push r15
pxor xmm0, xmm0
push r14
mov r14d, edx
push r13
push r12
push rbp
mov rbp, rsi
push rbx
mov rbx, rdi
sub rsp, 8
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
mov r13, [rsi+8]
mov r15, [rsi]
cmp r15, r13
jz ... | long long func0(long long a1, char **a2, int a3)
{
char *v5; // r13
char *v6; // r15
long long v7; // rdx
unsigned long long v8; // rax
char *v9; // r12
int v10; // ecx
int v11; // edx
char *v12; // rax
char *v13; // rsi
long long v14; // r12
long long v15; // r13
long long v16; // rsi
long l... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
MOV R14D,EDX
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RSI
PUSH RBX
MOV RBX,RDI
SUB RSP,0x8
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
MOV R13,qword ptr [RSI + 0x8]
MOV R15,qword ptr [RSI]
CMP R15,R13
JZ 0x00101aac
MOV R12,R13
MOV RDX,-0x2
SUB R12,R15
MOV RAX,R... | /* func0(std::vector<int, std::allocator<int> >, int) */
vector<int,std::allocator<int>> * func0(vector param_1,int param_2)
{
int iVar1;
int *piVar2;
ulong uVar3;
int *piVar4;
_Iter_less_iter in_ECX;
int in_EDX;
_Iter_less_iter extraout_EDX;
int iVar5;
long lVar6;
int *piVar7;
int4 in_register_... |
39 | func0 |
#include <vector>
#include <algorithm>
#include <cassert>
| std::vector<int> func0(std::vector<int> list1, int n) {
std::vector<int> smallest;
std::sort(list1.begin(), list1.end());
for (int i = 0; i < n; i++) {
smallest.push_back(list1[i]);
}
return smallest;
}
| int main() {
assert((func0({10, 20, 50, 70, 90, 20, 50, 40, 60, 80, 100}, 2) == std::vector<int>{10, 20}));
assert((func0({10, 20, 50, 70, 90, 20, 50, 40, 60, 80, 100}, 5) == std::vector<int>{10, 20, 20, 40, 50}));
assert((func0({10, 20, 50, 70, 90, 20, 50, 40, 60, 80, 100}, 3) == std::vector<int>{10, 20... | O3 | cpp | func0(std::vector<int, std::allocator<int> >, int):
endbr64
push %r15
pxor %xmm0,%xmm0
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
mov %rsi,%rbp
push %rbx
sub $0x18,%rsp
movq $0x0,0x10(%rdi)
movups %xmm0,(%rdi)
mov 0x8(%rsi),%r15
mov (%rsi),%r13
mov %edx,0x8(%rsp)
cmp %r15... | _Z5func0St6vectorIiSaIiEEi:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
mov r12, rsi
push rbp
mov rbp, rdi
push rbx
sub rsp, 18h
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
mov r15, [rsi+8]
mov r13, [rsi]
mov [rsp+48h+var_3C], edx
cmp r... | long long func0(long long a1, char **a2, int a3)
{
char *v5; // r15
char *v6; // r13
char *v7; // rbx
unsigned long long v8; // rdx
char *v9; // r14
int v10; // r9d
char *v11; // rsi
int v12; // edx
char *j; // rax
char *v14; // rcx
int v15; // esi
int v16; // edx
char *v17; // rdi
char *v1... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
MOV R12,RSI
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
MOV R15,qword ptr [RSI + 0x8]
MOV R13,qword ptr [RSI]
MOV dword ptr [RSP + 0xc],EDX
CMP R13,R15
JZ 0x00101a3c
MOV R14,R15
LEA RBX,[R13 + 0... | /* func0(std::vector<int, std::allocator<int> >, int) */
vector<int,std::allocator<int>> *
func0(vector param_1,int param_2,int param_3,int param_4,int param_5,
int param_6,int4 param_7,int param_8,int param_9,int param_10,
int4 param_11)
{
int iVar1;
int iVar2;
int *piVar3;
ulong uVar4;
_Iter_les... |
40 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| std::string func0(std::string s, char ch) {
for (size_t i = 0; i < s.length(); ++i) {
if (s[i] == ch) {
s = s.substr(0, i) + s.substr(i + 1);
break;
}
}
for (int i = s.length() - 1; i >= 0; --i) {
if (s[i] == ch) {
s = s.substr(0, i) + s.s... | int main() {
assert(func0("hello", 'l') == "heo");
assert(func0("abcda", 'a') == "bcd");
assert(func0("PHP", 'P') == "H");
assert(func0("hellolloll", 'l') == "helollol");
assert(func0("", 'l') == "");
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0xa8,%rsp
mov %rdi,-0x98(%rbp)
mov %rsi,-0xa0(%rbp)
mov %edx,%eax
mov %al,-0xa4(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
movq $0... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 0A8h
mov [rbp+var_98], rdi
mov [rbp+var_A0], rsi
mov eax, edx
mov [rbp+var_A4], al
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov [rbp+var_88], 0
jmp l... | long long func0(long long a1, long long a2, char a3)
{
unsigned long long i; // rax
int j; // [rsp+24h] [rbp-8Ch]
unsigned long long v7; // [rsp+28h] [rbp-88h]
_BYTE v8[32]; // [rsp+30h] [rbp-80h] BYREF
_BYTE v9[32]; // [rsp+50h] [rbp-60h] BYREF
_BYTE v10[40]; // [rsp+70h] [rbp-40h] BYREF
unsigned long l... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0xa8
MOV qword ptr [RBP + -0x98],RDI
MOV qword ptr [RBP + -0xa0],RSI
MOV EAX,EDX
MOV byte ptr [RBP + -0xa4],AL
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV qword ptr [RBP + -0x88],0x0
JMP 0x0010257d
LAB_001024ae:
MOV RDX,qword ptr [RBP ... | /* func0(std::string, char) */
string * func0(string *param_1,string *param_2,char param_3)
{
ulong uVar1;
char *pcVar2;
long in_FS_OFFSET;
int local_94;
ulong local_90;
string local_88 [32];
string local_68 [32];
string local_48 [40];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
... |
41 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| std::string func0(std::string s, char ch) {
for (size_t i = 0; i < s.length(); ++i) {
if (s[i] == ch) {
s = s.substr(0, i) + s.substr(i + 1);
break;
}
}
for (int i = s.length() - 1; i >= 0; --i) {
if (s[i] == ch) {
s = s.substr(0, i) + s.s... | int main() {
assert(func0("hello", 'l') == "heo");
assert(func0("abcda", 'a') == "bcd");
assert(func0("PHP", 'P') == "H");
assert(func0("hellolloll", 'l') == "helollol");
assert(func0("", 'l') == "");
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x78,%rsp
mov %rdi,%r13
mov %rsi,%r12
mov %edx,%ebp
mov %fs:0x28,%rax
mov %rax,0x68(%rsp)
xor %eax,%eax
mov 0x8(%rsi),%rdx
test %rdx,%rdx
j... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 78h
mov r12, rdi
mov rbp, rsi
mov r13d, edx
mov rax, fs:28h
mov [rsp+98h+var_30], rax
xor eax, eax
mov rdx, [rsi+8]
test rdx, rdx
jz loc_195F
mov rs... | _QWORD * func0(_QWORD *a1, void **a2, char a3)
{
unsigned long long v6; // rdx
void *v7; // rsi
char *v8; // rbx
char *v9; // rcx
unsigned long long v10; // rbx
void *v11; // rsi
_QWORD *v12; // rcx
void *v13; // rdx
char *v14; // rax
char *v16; // rax
_BYTE *v17; // rax
void *v18; // rcx
char... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x78
MOV R12,RDI
MOV RBP,RSI
MOV R13D,EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x68],RAX
XOR EAX,EAX
MOV RDX,qword ptr [RSI + 0x8]
TEST RDX,RDX
JZ 0x0010195f
MOV RSI,qword ptr [RSI]
MOV EBX,0x0
LAB_00101325:
CMP byte ptr [RSI + RBX*0x1],R13B
JZ 0x00... | /* func0(std::string, char) */
int8 * func0(int8 *param_1,long *param_2,char param_3)
{
ulong uVar1;
long *plVar2;
uint uVar3;
long lVar4;
uint uVar5;
long *plVar6;
int iVar7;
ulong uVar9;
ulong uVar10;
long in_FS_OFFSET;
long *local_98 [2];
long local_88 [2];
long *local_78 [2];
long loca... |
42 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| std::string func0(std::string s, char ch) {
for (size_t i = 0; i < s.length(); ++i) {
if (s[i] == ch) {
s = s.substr(0, i) + s.substr(i + 1);
break;
}
}
for (int i = s.length() - 1; i >= 0; --i) {
if (s[i] == ch) {
s = s.substr(0, i) + s.s... | int main() {
assert(func0("hello", 'l') == "heo");
assert(func0("abcda", 'a') == "bcd");
assert(func0("PHP", 'P') == "H");
assert(func0("hellolloll", 'l') == "helollol");
assert(func0("", 'l') == "");
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char):
endbr64
push %r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
mov %rsi,%rbp
push %rbx
sub $0x88,%rsp
mov 0x8(%rsi),%r9
mov %fs:0x28,%rax
mov %rax,0x78(%rsp)
xor %eax,%eax
test %r9,%... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc:
endbr64
push r15
push r14
push r13
push r12
mov r12, rdi
push rbp
mov rbp, rsi
push rbx
sub rsp, 88h
mov rcx, [rsi+8]
mov rax, fs:28h
mov [rsp+0B8h+var_40], rax
xor eax, eax
test rcx, rcx
jz loc_1AD6
mov... | double ** func0(double **a1, void **a2, char a3)
{
double *v5; // rcx
double *v7; // rsi
unsigned long long v8; // rdx
char v9; // al
char *v10; // r8
char *v11; // rax
void *v12; // rsi
unsigned long long v13; // rax
unsigned long long v14; // rdi
long long v15; // rdx
long long v16; // rdi
dou... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
MOV R12,RDI
PUSH RBP
MOV RBP,RSI
PUSH RBX
SUB RSP,0x88
MOV RCX,qword ptr [RSI + 0x8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x78],RAX
XOR EAX,EAX
TEST RCX,RCX
JZ 0x00101ad6
MOV EBX,EDX
MOV RSI,qword ptr [RSI]
XOR EDX,EDX
JMP 0x001016e1
LAB_001016d8:
CMP RDX,R... | /* func0(std::string, char) */
int8 * func0(int8 *param_1,long *param_2,char param_3)
{
uint uVar1;
uint uVar2;
int8 *puVar3;
ulong uVar4;
long *plVar5;
ulong uVar6;
ulong uVar7;
long lVar8;
long *plVar9;
long *plVar10;
long in_FS_OFFSET;
ulong *local_a8;
long local_a0;
ulong local_98 [2];... |
43 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| std::string func0(std::string s, char ch) {
for (size_t i = 0; i < s.length(); ++i) {
if (s[i] == ch) {
s = s.substr(0, i) + s.substr(i + 1);
break;
}
}
for (int i = s.length() - 1; i >= 0; --i) {
if (s[i] == ch) {
s = s.substr(0, i) + s.s... | int main() {
assert(func0("hello", 'l') == "heo");
assert(func0("abcda", 'a') == "bcd");
assert(func0("PHP", 'P') == "H");
assert(func0("hellolloll", 'l') == "helollol");
assert(func0("", 'l') == "");
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char):
endbr64
push %r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
mov %rsi,%rbp
push %rbx
sub $0x98,%rsp
mov 0x8(%rsi),%rcx
mov %fs:0x28,%rax
mov %rax,0x88(%rsp)
xor %eax,%eax
test %rcx... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc:
endbr64
push r15
push r14
push r13
mov r13, rdi
push r12
push rbp
mov rbp, rsi
push rbx
sub rsp, 0A8h
mov rax, fs:28h
mov [rsp+0D8h+var_40], rax
mov rax, [rsi+8]
test rax, rax
jz loc_1AF1
mov ebx, edx
mo... | double ** func0(double **a1, void **a2, char a3)
{
double *v5; // rax
double *v7; // rsi
size_t v8; // rdx
char v9; // cl
size_t v10; // r12
unsigned long long v11; // rax
_BYTE *v12; // r14
size_t v13; // rcx
_QWORD *v14; // rax
_BYTE *v15; // rax
_QWORD *v16; // rax
unsigned long long v17; // ... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
MOV R13,RDI
PUSH R12
PUSH RBP
MOV RBP,RSI
PUSH RBX
SUB RSP,0xa8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x98],RAX
MOV RAX,qword ptr [RSI + 0x8]
TEST RAX,RAX
JZ 0x00101af1
MOV EBX,EDX
MOV RSI,qword ptr [RSI]
XOR EDX,EDX
JMP 0x00101641
LAB_00101638:
CMP RAX,RDX
JZ 0x0010... | /* func0(std::string, char) */
int8 * func0(int8 *param_1,long *param_2,char param_3)
{
int *puVar1;
ulong uVar2;
int8 *puVar3;
uint uVar4;
ulong uVar5;
long lVar6;
uint uVar7;
ulong uVar8;
long *plVar9;
long *plVar10;
long *plVar11;
long in_FS_OFFSET;
ulong local_b0;
ulong *local_a8;
ul... |
44 | func0 |
#include <vector>
#include <algorithm>
#include <numeric>
#include <assert.h>
| std::vector<std::vector<int>> func0(std::vector<std::vector<int>> M) {
std::sort(M.begin(), M.end(), [](const std::vector<int>& a, const std::vector<int>& b) {
return std::accumulate(a.begin(), a.end(), 0) < std::accumulate(b.begin(), b.end(), 0);
});
return M;
}
| int main() {
assert(func0({{1, 2, 3}, {2, 4, 5}, {1, 1, 1}}) == std::vector<std::vector<int>>({{1, 1, 1}, {1, 2, 3}, {2, 4, 5}}));
assert(func0({{1, 2, 3}, {-2, 4, -5}, {1, -1, 1}}) == std::vector<std::vector<int>>({{-2, 4, -5}, {1, -1, 1}, {1, 2, 3}}));
assert(func0({{5, 8, 9}, {6, 4, 3}, {2, 1, 4}}) ==... | O0 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >)::{lambda(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&)#1}::operator()(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >... | _ZZ5func0St6vectorIS_IiSaIiEESaIS1_EEENKUlRKS1_S5_E_clES5_S5_:
push rbp
mov rbp, rsp
push r12
push rbx
sub rsp, 20h
mov [rbp+var_18], rdi
mov [rbp+var_20], rsi
mov [rbp+var_28], rdx
mov rax, [rbp+var_20]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void)
m... | bool func0(std::vector<std::vector<int>>)::{lambda(std::vector<int> const&,std::vector<int> const&)#1}::operator()(
long long a1,
long long a2,
long long a3)
{
long long v3; // rbx
long long v4; // rax
long long v5; // r12
long long v6; // rax
v3 = std::vector<int>::end(a2);
v4 = s... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RBP + -0x18],RDI
MOV qword ptr [RBP + -0x20],RSI
MOV RAX,qword ptr [RBP + -0x20]
MOV RDI,RAX
CALL 0x00103904
MOV RBX,RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RDI,RAX
CALL 0x001038b8
MOV RSI,RBX
MOV RDI,RAX
CALL 0x0010266d
MOV RDX,qword ptr [RBP + -... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > >) */
vector<std::vector<int,std::allocator<int>>,std::allocator<std::vector<int,std::allocator<int>>>> *
func0(vector<std::vector<int,std::allocator<int>>,std::allocator<std::vector<int,std::allocat... |
45 | func0 |
#include <vector>
#include <algorithm>
#include <numeric>
#include <assert.h>
| std::vector<std::vector<int>> func0(std::vector<std::vector<int>> M) {
std::sort(M.begin(), M.end(), [](const std::vector<int>& a, const std::vector<int>& b) {
return std::accumulate(a.begin(), a.end(), 0) < std::accumulate(b.begin(), b.end(), 0);
});
return M;
}
| int main() {
assert(func0({{1, 2, 3}, {2, 4, 5}, {1, 1, 1}}) == std::vector<std::vector<int>>({{1, 1, 1}, {1, 2, 3}, {2, 4, 5}}));
assert(func0({{1, 2, 3}, {-2, 4, -5}, {1, -1, 1}}) == std::vector<std::vector<int>>({{-2, 4, -5}, {1, -1, 1}, {1, 2, 3}}));
assert(func0({{5, 8, 9}, {6, 4, 3}, {2, 1, 4}}) ==... | O1 | cpp | void std::__adjust_heap<__gnu_cxx::__normal_iterator<std::vector<int, std::allocator<int> >*, std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > >, long, std::vector<int, std::allocator<int> >, __gnu_cxx::__ops::_Iter_comp_iter<func0(std::vector<std::vector<int... | _ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIPSt6vectorIiSaIiEES2_IS4_SaIS4_EEEENS0_5__ops14_Val_comp_iterIZ5func0S7_EUlRKS4_SC_E_EEEvT_T0_:
push r14
push r13
push r12
push rbp
push rbx
mov rbp, rdi
mov r12, [rdi]
mov rbx, [rdi+8]
mov r14, [rdi+10h]
mov qword ptr [rd... | void std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<std::vector<int> *,std::vector<std::vector<int>>>,__gnu_cxx::__ops::_Val_comp_iter<func0(std::vector<std::vector<int>>)::{lambda(std::vector<int> const&,std::vector<int> const&)#1}>>(
void **a1)
{
void **v1; // rbp
_DWORD *v2; // r12
_DWORD... | __unguarded_linear_insert<__normal_iterator<std::vector<int,std::allocator<int>>*,std::vector<std::vector<int,std::allocator<int>>,std::allocator<std::vector<int,std::allocator<int>>>>>,__ops::_Val_comp_iter<func0(std::vector<std::vector<int,std::allocator<int>>,std::allocator<std::vector<int,std::allocator<int>>>>)::{... | /* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* void std::__unguarded_linear_insert<__normal_iterator<std::vector<int, std::allocator<int> >*,
std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > >, __ops::_Val_comp_iter<func... |
46 | func0 |
#include <vector>
#include <algorithm>
#include <numeric>
#include <assert.h>
| std::vector<std::vector<int>> func0(std::vector<std::vector<int>> M) {
std::sort(M.begin(), M.end(), [](const std::vector<int>& a, const std::vector<int>& b) {
return std::accumulate(a.begin(), a.end(), 0) < std::accumulate(b.begin(), b.end(), 0);
});
return M;
}
| int main() {
assert(func0({{1, 2, 3}, {2, 4, 5}, {1, 1, 1}}) == std::vector<std::vector<int>>({{1, 1, 1}, {1, 2, 3}, {2, 4, 5}}));
assert(func0({{1, 2, 3}, {-2, 4, -5}, {1, -1, 1}}) == std::vector<std::vector<int>>({{-2, 4, -5}, {1, -1, 1}, {1, 2, 3}}));
assert(func0({{5, 8, 9}, {6, 4, 3}, {2, 1, 4}}) ==... | O2 | cpp | void std::__adjust_heap<__gnu_cxx::__normal_iterator<std::vector<int, std::allocator<int> >*, std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > >, long, std::vector<int, std::allocator<int> >, __gnu_cxx::__ops::_Iter_comp_iter<func0(std::vector<std::vector<int... | _ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIPSt6vectorIiSaIiEES2_IS4_SaIS4_EEEENS0_5__ops14_Val_comp_iterIZ5func0S7_EUlRKS4_SC_E_EEEvT_T0_:
movdqu xmm1, xmmword ptr [rdi]
pxor xmm0, xmm0
mov r11, [rdi+10h]
mov r10, rdi
mov rsi, [rdi-10h]
mov rax, [rdi-18h]
mov qword ptr [rdi+1... | _DWORD * std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<std::vector<int> *,std::vector<std::vector<int>>>,__gnu_cxx::__ops::_Val_comp_iter<func0(std::vector<std::vector<int>>)::{lambda(std::vector<int> const&,std::vector<int> const&)#1}>>(
long long a1,
double a2,
double a3,
... | __unguarded_linear_insert<__normal_iterator<std::vector<int,std::allocator<int>>*,std::vector<std::vector<int,std::allocator<int>>,std::allocator<std::vector<int,std::allocator<int>>>>>,__ops::_Val_comp_iter<func0(std::vector<std::vector<int,std::allocator<int>>,std::allocator<std::vector<int,std::allocator<int>>>>)::{... | /* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* void std::__unguarded_linear_insert<__normal_iterator<std::vector<int, std::allocator<int> >*,
std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > >, __ops::_Val_comp_iter<func... |
47 | func0 |
#include <vector>
#include <algorithm>
#include <numeric>
#include <assert.h>
| std::vector<std::vector<int>> func0(std::vector<std::vector<int>> M) {
std::sort(M.begin(), M.end(), [](const std::vector<int>& a, const std::vector<int>& b) {
return std::accumulate(a.begin(), a.end(), 0) < std::accumulate(b.begin(), b.end(), 0);
});
return M;
}
| int main() {
assert(func0({{1, 2, 3}, {2, 4, 5}, {1, 1, 1}}) == std::vector<std::vector<int>>({{1, 1, 1}, {1, 2, 3}, {2, 4, 5}}));
assert(func0({{1, 2, 3}, {-2, 4, -5}, {1, -1, 1}}) == std::vector<std::vector<int>>({{-2, 4, -5}, {1, -1, 1}, {1, 2, 3}}));
assert(func0({{5, 8, 9}, {6, 4, 3}, {2, 1, 4}}) ==... | O3 | cpp | void std::__adjust_heap<__gnu_cxx::__normal_iterator<std::vector<int, std::allocator<int> >*, std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > >, long, std::vector<int, std::allocator<int> >, __gnu_cxx::__ops::_Iter_comp_iter<func0(std::vector<std::vector<int... | _ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIPSt6vectorIiSaIiEES2_IS4_SaIS4_EEEENS0_5__ops14_Val_comp_iterIZ5func0S7_EUlRKS4_SC_E_EEEvT_T0__isra_0:
push r15
pxor xmm0, xmm0
mov rcx, rdi
push r14
movdqa xmm3, xmm0
push r13
push r12
push rbp
push rbx
movdqu xmm1, xmmword ptr [... | unsigned long long std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<std::vector<int> *,std::vector<std::vector<int>>>,__gnu_cxx::__ops::_Val_comp_iter<func0(std::vector<std::vector<int>>)::{lambda(std::vector<int> const&,std::vector<int> const&)#1}>>(
const __m128i *a1,
double a2,
do... | __unguarded_linear_insert<__normal_iterator<std::vector<int,std::allocator<int>>*,std::vector<std::vector<int,std::allocator<int>>,std::allocator<std::vector<int,std::allocator<int>>>>>,__ops::_Val_comp_iter<func0(std::vector<std::vector<int,std::allocator<int>>,std::allocator<std::vector<int,std::allocator<int>>>>)::{... | /* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* void std::__unguarded_linear_insert<__normal_iterator<std::vector<int, std::allocator<int> >*,
std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > >, __ops::_Val_comp_iter<func... |
48 | func0 | #include <cassert>
#include <string>
#include <vector>
#include <unordered_map>
#include <algorithm>
#include <tuple>
using namespace std;
| vector<pair<string, int>> func0(const vector<string>& words) {
unordered_map<string, pair<int, int>> freq;
for (size_t i = 0; i < words.size(); i++) {
const string &word = words[i];
if (freq.find(word) == freq.end()) {
freq[word] = {1, (int)i};
} else {
fre... | int main(){
{
vector<string> words = {"red","green","black","pink","black","white","black","eyes","white","black",
"orange","pink","pink","red","red","white","orange","white","black","pink",
"green","green","pink","green","pink","white"... | O0 | cpp | func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)::{lambda(std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int> con... | _ZZ5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEENKUlRKSt5tupleIJS5_iiEESD_E_clESD_SD_:
push rbp
mov rbp, rsp
push rbx
sub rsp, 28h
mov [rbp+var_18], rdi
mov [rbp+var_20], rsi
mov [rbp+var_28], rdx
mov rax, [rbp+var_20]
mov rdi, rax
call _ZSt3getILm1... | bool func0(std::vector<std::string> const&)::{lambda(std::tuple<std::string,int,int> const&,std::tuple<std::string,int,int> const&)#1}::operator()(
long long a1,
long long a2,
long long a3)
{
int v3; // ebx
int v4; // ebx
int v6; // ebx
v3 = *(_DWORD *)std::get<1ul,std::string,int,int>... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0xe8
MOV qword ptr [RBP + -0xe8],RDI
MOV qword ptr [RBP + -0xf0],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x80]
MOV RDI,RAX
CALL 0x00104bd2
MOV qword ptr [RBP + -0xc8],0x0
JMP 0x0010272d
LAB_00102637:
MOV RDX,qword p... | /* func0(std::vector<std::string, std::allocator<std::string > > const&) */
vector * func0(vector *param_1)
{
bool bVar1;
char cVar2;
__normal_iterator _Var3;
__normal_iterator _Var4;
pair<int,int> *this;
int *piVar5;
ulong uVar6;
tuple *ptVar7;
type *ptVar8;
type *ptVar9;
_lambda_std__tuple<std... |
49 | func0 | #include <cassert>
#include <string>
#include <vector>
#include <unordered_map>
#include <algorithm>
#include <tuple>
using namespace std;
| vector<pair<string, int>> func0(const vector<string>& words) {
unordered_map<string, pair<int, int>> freq;
for (size_t i = 0; i < words.size(); i++) {
const string &word = words[i];
if (freq.find(word) == freq.end()) {
freq[word] = {1, (int)i};
} else {
fre... | int main(){
{
vector<string> words = {"red","green","black","pink","black","white","black","eyes","white","black",
"orange","pink","pink","red","red","white","orange","white","black","pink",
"green","green","pink","green","pink","white"... | O1 | cpp | void std::__adjust_heap<__gnu_cxx::__normal_iterator<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int>*, std::vector<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int>, std::allocator<std::tuple<std::__cxx11::basic_st... | _ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIPSt5tupleIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiiEESt6vectorIS9_SaIS9_EEEElS9_NS0_5__ops15_Iter_comp_iterIZ5func0RKSB_IS8_SaIS8_EEEUlRKS9_SM_E_EEEvT_T0_SQ_T1_T2_:
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 38h
m... | unsigned long long std::__adjust_heap<__gnu_cxx::__normal_iterator<std::tuple<std::string,int,int> *,std::vector<std::tuple<std::string,int,int>>>,long,std::tuple<std::string,int,int>,__gnu_cxx::__ops::_Iter_comp_iter<func0(std::vector const&<std::string,std::allocator<std::string>>)::{lambda(std::tuple<std::string,in... | __adjust_heap<__normal_iterator<std::tuple<std::string,int,int>*,std::vector<std::tuple<std::string,int,int>,std::allocator<std::tuple<std::string,int,int>>>>,long,std::tuple<std::string,int,int>,__ops::_Iter_comp_iter<func0(std::vector<std::string,std::allocator<std::string>>const&)::{lambda(std::tuple<std::string,int... | /* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* void std::__adjust_heap<__normal_iterator<std::tuple<std::string, int, int>*,
std::vector<std::tuple<std::string, int, int>, std::allocator<std::tuple<std::string, int, int> >
> >, long, std::tuple<std::string, int, int>,
__ops::_I... |
50 | func0 | #include <cassert>
#include <string>
#include <vector>
#include <unordered_map>
#include <algorithm>
#include <tuple>
using namespace std;
| vector<pair<string, int>> func0(const vector<string>& words) {
unordered_map<string, pair<int, int>> freq;
for (size_t i = 0; i < words.size(); i++) {
const string &word = words[i];
if (freq.find(word) == freq.end()) {
freq[word] = {1, (int)i};
} else {
fre... | int main(){
{
vector<string> words = {"red","green","black","pink","black","white","black","eyes","white","black",
"orange","pink","pink","red","red","white","orange","white","black","pink",
"green","green","pink","green","pink","white"... | O2 | cpp | void std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int>*, std::vector<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int>, std::allocator<std::tuple<std::__cxx... | _ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIPSt5tupleIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiiEESt6vectorIS9_SaIS9_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKSB_IS8_SaIS8_EEEUlRKS9_SM_E_EEEvT_T0__isra_0:
push r12
push rbp
push rbx
mov rbx, rdi
add rdi, 18h
sub rsp, 30... | unsigned long long std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<std::tuple<std::string,int,int> *,std::vector<std::tuple<std::string,int,int>>>,__gnu_cxx::__ops::_Val_comp_iter<func0(std::vector const&<std::string,std::allocator<std::string>>)::{lambda(std::tuple<std::string,int,int> const&,std::tuple<s... | __unguarded_linear_insert<__normal_iterator<std::tuple<std::string,int,int>*,std::vector<std::tuple<std::string,int,int>,std::allocator<std::tuple<std::string,int,int>>>>,__ops::_Val_comp_iter<func0(std::vector<std::string,std::allocator<std::string>>const&)::{lambda(std::tuple<std::string,int,int>const&,std::tuple<std... | /* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* void std::__unguarded_linear_insert<__normal_iterator<std::tuple<std::string, int, int>*,
std::vector<std::tuple<std::string, int, int>, std::allocator<std::tuple<std::string, int, int> >
> >, __ops::_Val_comp_iter<func0(std::vector<s... |
51 | func0 | #include <cassert>
#include <string>
#include <vector>
#include <unordered_map>
#include <algorithm>
#include <tuple>
using namespace std;
| vector<pair<string, int>> func0(const vector<string>& words) {
unordered_map<string, pair<int, int>> freq;
for (size_t i = 0; i < words.size(); i++) {
const string &word = words[i];
if (freq.find(word) == freq.end()) {
freq[word] = {1, (int)i};
} else {
fre... | int main(){
{
vector<string> words = {"red","green","black","pink","black","white","black","eyes","white","black",
"orange","pink","pink","red","red","white","orange","white","black","pink",
"green","green","pink","green","pink","white"... | O3 | cpp | void std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int>*, std::vector<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int>, std::allocator<std::tuple<std::__cxx... | _ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIPSt5tupleIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiiEESt6vectorIS9_SaIS9_EEEENS0_5__ops14_Val_comp_iterIZ5func0RKSB_IS8_SaIS8_EEEUlRKS9_SM_E_EEEvT_T0__isra_0:
push r12
push rbp
push rbx
mov rbx, rdi
add rdi, 18h
sub rsp, 30... | unsigned long long std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<std::tuple<std::string,int,int> *,std::vector<std::tuple<std::string,int,int>>>,__gnu_cxx::__ops::_Val_comp_iter<func0(std::vector const&<std::string,std::allocator<std::string>>)::{lambda(std::tuple<std::string,int,int> const&,std::tuple<s... | __unguarded_linear_insert<__normal_iterator<std::tuple<std::string,int,int>*,std::vector<std::tuple<std::string,int,int>,std::allocator<std::tuple<std::string,int,int>>>>,__ops::_Val_comp_iter<func0(std::vector<std::string,std::allocator<std::string>>const&)::{lambda(std::tuple<std::string,int,int>const&,std::tuple<std... | /* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* void std::__unguarded_linear_insert<__normal_iterator<std::tuple<std::string, int, int>*,
std::vector<std::tuple<std::string, int, int>, std::allocator<std::tuple<std::string, int, int> >
> >, __ops::_Val_comp_iter<func0(std::vector<s... |
52 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int l, int b, int h) {
return ((l * b * h) / 2);
}
| int main() {
assert(func0(10, 8, 6) == 240);
assert(func0(3, 2, 2) == 6);
assert(func0(1, 2, 1) == 1);
return 0;
}
| O0 | cpp | func0(int, int, int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x4(%rbp)
mov %esi,-0x8(%rbp)
mov %edx,-0xc(%rbp)
mov -0x4(%rbp),%eax
imul -0x8(%rbp),%eax
imul -0xc(%rbp),%eax
mov %eax,%edx
shr $0x1f,%edx
add %edx,%eax
sar %eax
pop %rbp
retq
| _Z5func0iii:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov [rbp+var_8], esi
mov [rbp+var_C], edx
mov eax, [rbp+var_4]
imul eax, [rbp+var_8]
imul eax, [rbp+var_C]
mov edx, eax
shr edx, 1Fh
add eax, edx
sar eax, 1
pop rbp
retn | long long func0(int a1, int a2, int a3)
{
return (unsigned int)(a3 * a2 * a1 / 2);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV dword ptr [RBP + -0x8],ESI
MOV dword ptr [RBP + -0xc],EDX
MOV EAX,dword ptr [RBP + -0x4]
IMUL EAX,dword ptr [RBP + -0x8]
IMUL EAX,dword ptr [RBP + -0xc]
MOV EDX,EAX
SHR EDX,0x1f
ADD EAX,EDX
SAR EAX,0x1
POP RBP
RET | /* func0(int, int, int) */
int func0(int param_1,int param_2,int param_3)
{
return (param_1 * param_2 * param_3) / 2;
} |
53 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int l, int b, int h) {
return ((l * b * h) / 2);
}
| int main() {
assert(func0(10, 8, 6) == 240);
assert(func0(3, 2, 2) == 6);
assert(func0(1, 2, 1) == 1);
return 0;
}
| O1 | cpp | func0(int, int, int):
endbr64
imul %esi,%edi
imul %edi,%edx
mov %edx,%eax
shr $0x1f,%eax
add %edx,%eax
sar %eax
retq
| _Z5func0iii:
endbr64
imul edi, esi
imul edi, edx
mov eax, edi
shr eax, 1Fh
add eax, edi
sar eax, 1
retn | long long func0(int a1, int a2, int a3)
{
return (unsigned int)(a3 * a2 * a1 / 2);
} | func0:
ENDBR64
IMUL EDI,ESI
IMUL EDI,EDX
MOV EAX,EDI
SHR EAX,0x1f
ADD EAX,EDI
SAR EAX,0x1
RET | /* func0(int, int, int) */
int func0(int param_1,int param_2,int param_3)
{
return (param_1 * param_2 * param_3) / 2;
} |
54 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int l, int b, int h) {
return ((l * b * h) / 2);
}
| int main() {
assert(func0(10, 8, 6) == 240);
assert(func0(3, 2, 2) == 6);
assert(func0(1, 2, 1) == 1);
return 0;
}
| O2 | cpp | func0(int, int, int):
endbr64
imul %esi,%edi
imul %edi,%edx
mov %edx,%eax
shr $0x1f,%eax
add %edx,%eax
sar %eax
retq
nopw %cs:0x0(%rax,%rax,1)
xchg %ax,%ax
| _Z5func0iii:
endbr64
imul edi, esi
imul edi, edx
mov eax, edi
shr eax, 1Fh
add eax, edi
sar eax, 1
retn | long long func0(int a1, int a2, int a3)
{
return (unsigned int)(a3 * a2 * a1 / 2);
} | func0:
ENDBR64
IMUL EDI,ESI
IMUL EDI,EDX
MOV EAX,EDI
SHR EAX,0x1f
ADD EAX,EDI
SAR EAX,0x1
RET | /* func0(int, int, int) */
int func0(int param_1,int param_2,int param_3)
{
return (param_1 * param_2 * param_3) / 2;
} |
55 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int l, int b, int h) {
return ((l * b * h) / 2);
}
| int main() {
assert(func0(10, 8, 6) == 240);
assert(func0(3, 2, 2) == 6);
assert(func0(1, 2, 1) == 1);
return 0;
}
| O3 | cpp | func0(int, int, int):
endbr64
imul %esi,%edi
imul %edi,%edx
mov %edx,%eax
shr $0x1f,%eax
add %edx,%eax
sar %eax
retq
nopw %cs:0x0(%rax,%rax,1)
xchg %ax,%ax
| _Z5func0iii:
endbr64
imul edi, esi
imul edi, edx
mov eax, edi
shr eax, 1Fh
add eax, edi
sar eax, 1
retn | long long func0(int a1, int a2, int a3)
{
return (unsigned int)(a3 * a2 * a1 / 2);
} | func0:
ENDBR64
IMUL EDI,ESI
IMUL EDI,EDX
MOV EAX,EDI
SHR EAX,0x1f
ADD EAX,EDI
SAR EAX,0x1
RET | /* func0(int, int, int) */
int func0(int param_1,int param_2,int param_3)
{
return (param_1 * param_2 * param_3) / 2;
} |
56 | func0 |
#include <iostream>
#include <string>
#include <vector>
#include <regex>
#include <assert.h>
| std::vector<std::string> func0(const std::string& text) {
std::vector<std::string> result;
std::regex re("[a-z][^a-z]*");
std::sregex_iterator begin(text.begin(), text.end(), re), end;
while (begin != end) {
result.push_back(begin->str());
begin++;
}
return result;
}
| int main() {
std::vector<std::string> result;
result = func0("AbCd");
assert((result.size() == 2) && (result[0] == "bC") && (result[1] == "d"));
result = func0("Python");
assert((result.size() == 5) && (result[0] == "y") && (result[1] == "t")
&& (result[2] == "h") && (result[3]... | O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x128,%rsp
mov %rdi,-0x128(%rbp)
mov %rsi,-0x130(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x128(%rbp),%rax
mov %rax,%rdi
cal... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 128h
mov [rbp+var_128], rdi
mov [rbp+var_130], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_128]
mov rdi, rax
call _ZNSt6vectorINSt7__c... | long long func0(long long a1, long long a2)
{
long long v2; // rbx
long long v3; // rax
long long v4; // rax
_BYTE v6[32]; // [rsp+10h] [rbp-120h] BYREF
_BYTE v7[64]; // [rsp+30h] [rbp-100h] BYREF
_BYTE v8[64]; // [rsp+70h] [rbp-C0h] BYREF
_BYTE v9[64]; // [rsp+B0h] [rbp-80h] BYREF
_BYTE v10[40]; // [r... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x128
MOV qword ptr [RBP + -0x128],RDI
MOV qword ptr [RBP + -0x130],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x128]
MOV RDI,RAX
CALL 0x00106368
LEA RAX,[RBP + -0x120]
MOV EDX,0x10
LEA RCX,[0x134051]
MOV RSI... | /* func0(std::string const&) */
string * func0(string *param_1)
{
char cVar1;
__normal_iterator _Var2;
__normal_iterator _Var3;
long in_FS_OFFSET;
regex local_128 [32];
regex_iterator<__normal_iterator<char_const*,std::string>,char,std::regex_traits<char>>
local_108 [64];
regex_iterator<__normal_itera... |
57 | func0 |
#include <iostream>
#include <string>
#include <vector>
#include <regex>
#include <assert.h>
| std::vector<std::string> func0(const std::string& text) {
std::vector<std::string> result;
std::regex re("[a-z][^a-z]*");
std::sregex_iterator begin(text.begin(), text.end(), re), end;
while (begin != end) {
result.push_back(begin->str());
begin++;
}
return result;
}
| int main() {
std::vector<std::string> result;
result = func0("AbCd");
assert((result.size() == 2) && (result[0] == "bC") && (result[1] == "d"));
result = func0("Python");
assert((result.size() == 5) && (result[0] == "y") && (result[1] == "t")
&& (result[2] == "h") && (result[3]... | O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x258,%rsp
mov %rdi,%rbx
mov %rsi,%rbp
mov %fs:0x28,%rax
mov %rax,0x248(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
push r13
push r12
push rbx
sub rsp, 280h
mov r12, rdi
mov rbx, rsi
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
... | _QWORD * func0(_QWORD *a1, size_t *a2)
{
long long v4; // rdx
long long v5; // rax
long long v6; // rdi
size_t v7; // rsi
_BYTE *v8; // rcx
const void *v9; // r14
long long v10; // rbx
size_t v11; // rbx
_QWORD *v12; // rdi
unsigned int v13; // eax
unsigned long long v14; // r8
char *v15; // rdx... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x280
MOV R12,RDI
MOV RBX,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
LEA RAX,[RBP + -0x298]
MOV R13,RAX
MOV RDI,RAX
CALL 0... | /* func0(std::string const&) */
string * func0(string *param_1)
{
int *__src;
long *plVar1;
_Sp_counted_base<(_Lock_policy)2> *this;
_Sp_counted_base<(_Lock_policy)2> *p_Var2;
bool bVar3;
char cVar4;
uint uVar5;
sub_match *psVar6;
int8 uVar7;
int8 *puVar8;
uint uVar9;
long lVar10;
ulong uVar... |
58 | func0 |
#include <iostream>
#include <string>
#include <vector>
#include <regex>
#include <assert.h>
| std::vector<std::string> func0(const std::string& text) {
std::vector<std::string> result;
std::regex re("[a-z][^a-z]*");
std::sregex_iterator begin(text.begin(), text.end(), re), end;
while (begin != end) {
result.push_back(begin->str());
begin++;
}
return result;
}
| int main() {
std::vector<std::string> result;
result = func0("AbCd");
assert((result.size() == 2) && (result[0] == "bC") && (result[1] == "d"));
result = func0("Python");
assert((result.size() == 5) && (result[0] == "y") && (result[1] == "t")
&& (result[2] == "h") && (result[3]... | O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x278,%rsp
mov %fs:0x28,%rax
mov %rax,0x268(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
lea 0x90... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
pxor xmm0, xmm0
mov rbp, rsp
push r15
push r14
lea r15, [rbp+var_2A8]
push r13
push r12
push rbx
mov rbx, rsi
sub rsp, 2B8h
mov [rbp+var_2B8], rdi
mov rax, fs:28h
mov [rbp+var_38], rax
xor ... | long long func0(long long a1, unsigned long long *a2)
{
char *v3; // rsi
__m128i v4; // xmm0
volatile signed __int32 *v5; // r12
long long v6; // rdx
volatile signed __int32 *v7; // rcx
signed __int32 v8; // eax
long long v9; // r12
long long v10; // rdx
volatile signed __int32 *v11; // rcx
signed ... | func0:
ENDBR64
PUSH RBP
PXOR XMM0,XMM0
MOV RBP,RSP
PUSH R15
PUSH R14
LEA R15,[RBP + -0x2a8]
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,RSI
SUB RSP,0x2b8
MOV qword ptr [RBP + -0x2b8],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
MOV RDI,R... | /* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
long lVar2;
int *__src;
int auVar3 [16];
int8 uVar4;
bool bVar5;
int iVar6;
int8 *puVar7;
long *plVar8;
long *plVar9;
uint uVar10;
uint uVar11;
string *psVar12;
string *in_RSI;
lo... |
59 | func0 |
#include <iostream>
#include <string>
#include <vector>
#include <regex>
#include <assert.h>
| std::vector<std::string> func0(const std::string& text) {
std::vector<std::string> result;
std::regex re("[a-z][^a-z]*");
std::sregex_iterator begin(text.begin(), text.end(), re), end;
while (begin != end) {
result.push_back(begin->str());
begin++;
}
return result;
}
| int main() {
std::vector<std::string> result;
result = func0("AbCd");
assert((result.size() == 2) && (result[0] == "bC") && (result[1] == "d"));
result = func0("Python");
assert((result.size() == 5) && (result[0] == "y") && (result[1] == "t")
&& (result[2] == "h") && (result[3]... | O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
pxor %xmm0,%xmm0
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
mov %rsi,%rbp
push %rbx
sub $0x278,%rsp
mov %fs:0x28,%rax
mov %rax,0x268(%rsp)
xor %eax,%eax
lea 0x90... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
pxor xmm0, xmm0
mov rbp, rsp
push r15
push r14
push r13
mov r13, rsi
push r12
push rbx
lea rbx, [rbp+var_2A8]
sub rsp, 2B8h
mov [rbp+var_2B8], rdi
mov rax, fs:28h
mov [rbp+var_38], rax
xor ... | long long func0(long long a1, unsigned long long *a2)
{
__m128i v2; // xmm0
long long v3; // rdi
void *v4; // rdi
void **v5; // rbx
unsigned long long v6; // r12
void *v7; // rdi
unsigned long long v8; // rax
unsigned long long v9; // rdx
char v10; // al
long long v11; // rdx
long long v12; // rc... | func0:
ENDBR64
PUSH RBP
PXOR XMM0,XMM0
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
MOV R13,RSI
PUSH R12
PUSH RBX
LEA RBX,[RBP + -0x2a8]
SUB RSP,0x2b8
MOV qword ptr [RBP + -0x2b8],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
MOV RDI,R... | /* func0(std::string const&) */
string * func0(string *param_1)
{
int *__src;
int auVar1 [16];
int8 this;
bool bVar2;
long *plVar3;
long *plVar4;
long *plVar5;
uint uVar6;
long lVar7;
uint uVar8;
long *plVar9;
long lVar10;
int8 *puVar11;
long *in_RSI;
ulong uVar12;
ulong uVar13;
long... |
60 | func0 |
#include <iostream>
#include <string>
#include <regex>
#include <assert.h>
| std::string func0(std::string text) {
std::regex patterns("^[a-z]+_[a-z]+$");
if (std::regex_search(text, patterns)) {
return "Found a match!";
} else {
return "Not matched!";
}
}
| int main() {
assert(func0("aab_cbbbc") == "Found a match!");
assert(func0("aab_Abbbc") == "Not matched!");
assert(func0("Aaab_abbbc") == "Not matched!");
assert(func0("aab-cbbbc") == "Not matched!");
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x58,%rsp
mov %rdi,-0x58(%rbp)
mov %rsi,-0x60(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x40(%rbp),%rax
mov $0x10,%edx
lea 0x2b3e... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 68h
mov [rbp+var_68], rdi
mov [rbp+var_70], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_40]
mov edx, 10h
lea rcx, aAZAZ; "^[a-z]+_[a-z]... | long long func0(long long a1, long long a2)
{
char v3; // [rsp+1Fh] [rbp-51h] BYREF
char *v4; // [rsp+20h] [rbp-50h]
char *v5; // [rsp+28h] [rbp-48h]
_BYTE v6[40]; // [rsp+30h] [rbp-40h] BYREF
unsigned long long v7; // [rsp+58h] [rbp-18h]
v7 = __readfsqword(0x28u);
std::basic_regex<char,std::regex_trait... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x68
MOV qword ptr [RBP + -0x68],RDI
MOV qword ptr [RBP + -0x70],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x40]
MOV EDX,0x10
LEA RCX,[0x132051]
MOV RSI,RCX
MOV RDI,RAX
LAB_00104b43:
CALL 0x001062e8
LEA RCX,[RBP + -0x... | /* func0(std::string) */
string * func0(string *param_1,string *param_2)
{
bool bVar1;
long in_FS_OFFSET;
allocator local_59;
allocator *local_58;
allocator *local_50;
regex local_48 [40];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
std::regex::basic_regex(local_48,"^[a-z]+_[a-z]+$"... |
61 | func0 |
#include <iostream>
#include <string>
#include <regex>
#include <assert.h>
| std::string func0(std::string text) {
std::regex patterns("^[a-z]+_[a-z]+$");
if (std::regex_search(text, patterns)) {
return "Found a match!";
} else {
return "Not matched!";
}
}
| int main() {
assert(func0("aab_cbbbc") == "Found a match!");
assert(func0("aab_Abbbc") == "Not matched!");
assert(func0("Aaab_abbbc") == "Not matched!");
assert(func0("aab-cbbbc") == "Not matched!");
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x58,%rsp
mov %rdi,%rbx
mov %rsi,%rbp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x20(%rsp),%r13
mov %r13,%rdi
callq 4730 <_ZNSt6loca... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
push r12
push rbx
sub rsp, 58h
mov rbx, rdi
mov r14, rsi
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
lea r12, [rbp+var_70]
lea rdi, [rbp+var_68]; this
call __ZNS... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV RBX,RDI
MOV R14,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
LEA R12,[RBP + -0x70]
LEA RDI,[RBP + -0x68]
CALL 0x001046d0
MOV qword ptr [RBP + -0x60],0x0
MOV qword ptr [RBP + -0x58],0x0
MOV ECX,0x10
LEA RDX,[0x... | /* func0(std::string) */
long * func0(long *param_1,int8 *param_2)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
_Sp_counted_base<(_Lock_policy)2> *p_Var2;
bool bVar3;
int iVar4;
long in_FS_OFFSET;
regex local_78 [8];
int local_70 [8];
int8 local_68;
_Sp_counted_base<(_Lock_policy)2> *local_60;
voi... | |
62 | func0 |
#include <iostream>
#include <string>
#include <regex>
#include <assert.h>
| std::string func0(std::string text) {
std::regex patterns("^[a-z]+_[a-z]+$");
if (std::regex_search(text, patterns)) {
return "Found a match!";
} else {
return "Not matched!";
}
}
| int main() {
assert(func0("aab_cbbbc") == "Found a match!");
assert(func0("aab_Abbbc") == "Not matched!");
assert(func0("Aaab_abbbc") == "Not matched!");
assert(func0("aab-cbbbc") == "Not matched!");
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x50,%rsp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x20(%rsp),%r13
lea 0x8(%rsp),%rbp
mov ... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
mov r14, rsi
push r13
lea r13, [rbp+var_70]
push r12
lea r12, [rbp+var_68]
push rbx
mov rbx, rdi
mov rdi, r12; this
sub rsp, 50h
mov rax, fs:28h
mov [rbp+var_28], rax
x... | long long func0(long long a1, long long *a2)
{
long long v3; // rdi
long long v4; // rsi
long long v5; // rsi
char v6; // r13
long long v7; // rdi
long long v8; // rdx
volatile signed __int32 *v9; // rcx
signed __int32 v10; // eax
long long v12; // rax
_BYTE v13[8]; // [rsp+0h] [rbp-70h] BYREF
_B... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
MOV R14,RSI
PUSH R13
LEA R13,[RBP + -0x70]
PUSH R12
LEA R12,[RBP + -0x68]
PUSH RBX
MOV RBX,RDI
MOV RDI,R12
SUB RSP,0x50
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
CALL 0x001036d0
LEA RDX,[0x118686]
PXOR XMM0,XMM0
MOV RDI,R13
MOV ECX,0x10
LEA RSI,... | /* func0(std::string) */
long * func0(long *param_1,int8 *param_2)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
int8 uVar2;
bool bVar3;
int iVar4;
long in_FS_OFFSET;
regex local_78 [8];
int local_70 [8];
int local_68 [16];
int local_58 [16];
int local_48 [16];
long local_30;
local_30 = *(lo... |
63 | func0 |
#include <iostream>
#include <string>
#include <regex>
#include <assert.h>
| std::string func0(std::string text) {
std::regex patterns("^[a-z]+_[a-z]+$");
if (std::regex_search(text, patterns)) {
return "Found a match!";
} else {
return "Not matched!";
}
}
| int main() {
assert(func0("aab_cbbbc") == "Found a match!");
assert(func0("aab_Abbbc") == "Not matched!");
assert(func0("Aaab_abbbc") == "Not matched!");
assert(func0("aab-cbbbc") == "Not matched!");
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x50,%rsp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x20(%rsp),%r13
lea 0x8(%rsp),%rbp
mov ... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
mov r15, rsi
push r14
push r13
push r12
push rbp
push rbx
mov rbx, rdi
sub rsp, 2B8h
mov rax, fs:28h
mov [rsp+2E8h+var_40], rax
xor eax, eax
lea r14, [rsp+2E8h+var_2A0]
mov rdi, r14; this
cal... | long long func0(long long a1, unsigned long long *a2)
{
__m128i v3; // xmm0
long long v4; // rdi
void *v5; // rdi
void **v6; // rbp
unsigned long long v7; // r12
void *v8; // rdi
unsigned long long v9; // r13
unsigned long long v10; // rbp
long long v11; // rax
long long v12; // rcx
unsigned long... | func0:
ENDBR64
PUSH R15
MOV R15,RSI
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
SUB RSP,0x2b8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x2a8],RAX
XOR EAX,EAX
LEA R14,[RSP + 0x48]
MOV RDI,R14
CALL 0x00104730
LEA RDX,[0x11a6cb]
PXOR XMM0,XMM0
LEA RDI,[RSP + 0x110]
MOV R8D,0x10
MOV RCX,R14
LEA RSI,[RD... | /* func0(std::string) */
long * func0(long *param_1,ulong *param_2)
{
ulong uVar1;
int8 uVar2;
ulong uVar3;
int auVar4 [16];
bool bVar5;
char cVar6;
long lVar7;
int8 *puVar8;
int8 *puVar9;
ulong uVar10;
ulong *puVar11;
long lVar12;
ulong uVar13;
uint *puVar14;
_Match_mode _Var15;
long ... |
64 | func0 |
#include <assert.h>
| int func0(int a) {
int perimeter = 4 * a;
return perimeter;
}
| int main() {
assert(func0(10) == 40);
assert(func0(5) == 20);
assert(func0(4) == 16);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
mov -0x14(%rbp),%eax
shl $0x2,%eax
mov %eax,-0x4(%rbp)
mov -0x4(%rbp),%eax
pop %rbp
retq
| _Z5func0i:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov eax, [rbp+var_14]
shl eax, 2
mov [rbp+var_4], eax
mov eax, [rbp+var_4]
pop rbp
retn | long long func0(int a1)
{
return (unsigned int)(4 * a1);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV EAX,dword ptr [RBP + -0x14]
SHL EAX,0x2
MOV dword ptr [RBP + -0x4],EAX
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET | /* func0(int) */
int func0(int param_1)
{
return param_1 << 2;
} |
65 | func0 |
#include <assert.h>
| int func0(int a) {
int perimeter = 4 * a;
return perimeter;
}
| int main() {
assert(func0(10) == 40);
assert(func0(5) == 20);
assert(func0(4) == 16);
return 0;
}
| O1 | cpp | func0(int):
endbr64
lea 0x0(,%rdi,4),%eax
retq
| _Z5func0i:
endbr64
lea eax, ds:0[rdi*4]
retn | long long func0(int a1)
{
return (unsigned int)(4 * a1);
} | func0:
ENDBR64
LEA EAX,[RDI*0x4]
RET | /* func0(int) */
int func0(int param_1)
{
return param_1 * 4;
} |
66 | func0 |
#include <assert.h>
| int func0(int a) {
int perimeter = 4 * a;
return perimeter;
}
| int main() {
assert(func0(10) == 40);
assert(func0(5) == 20);
assert(func0(4) == 16);
return 0;
}
| O2 | cpp | func0(int):
endbr64
lea 0x0(,%rdi,4),%eax
retq
nopl 0x0(%rax)
| _Z5func0i:
endbr64
lea eax, ds:0[rdi*4]
retn | long long func0(int a1)
{
return (unsigned int)(4 * a1);
} | func0:
ENDBR64
LEA EAX,[RDI*0x4]
RET | /* func0(int) */
int func0(int param_1)
{
return param_1 * 4;
} |
67 | func0 |
#include <assert.h>
| int func0(int a) {
int perimeter = 4 * a;
return perimeter;
}
| int main() {
assert(func0(10) == 40);
assert(func0(5) == 20);
assert(func0(4) == 16);
return 0;
}
| O3 | cpp | func0(int):
endbr64
lea 0x0(,%rdi,4),%eax
retq
nopl 0x0(%rax)
| _Z5func0i:
endbr64
lea eax, ds:0[rdi*4]
retn | long long func0(int a1)
{
return (unsigned int)(4 * a1);
} | func0:
ENDBR64
LEA EAX,[RDI*0x4]
RET | /* func0(int) */
int func0(int param_1)
{
return param_1 * 4;
} |
68 | func0 |
#include <iostream>
#include <string>
#include <array>
#include <cassert>
const int NO_OF_CHARS = 256;
std::array<int, NO_OF_CHARS> get_char_count_array(const std::string& string) {
std::array<int, NO_OF_CHARS> count{};
for (char c : string) {
count[static_cast<unsigned char>(c)]++;
}... | std::string func0(const std::string& string, const std::string& second_string) {
auto count = get_char_count_array(second_string);
std::string result;
for (char c : string) {
if (count[static_cast<unsigned char>(c)] == 0) {
result.push_back(c);
}
}
return result;
... | int main() {
assert(func0("probasscurve", "pros") == "bacuve");
assert(func0("digitalindia", "talent") == "digiidi");
assert(func0("exoticmiles", "toxic") == "emles");
std::cout << "All tests passed." << std::endl;
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x458,%rsp
mov %rdi,-0x448(%rbp)
mov %rsi,-0x450(%rbp)
mov %rdx,-0x458(... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 458h
mov [rbp+var_448], rdi
mov [rbp+var_450], rsi
mov [rbp+var_458], rdx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_420]
mov rdx, [r... | long long func0(long long a1, long long a2, long long a3)
{
unsigned __int8 v4; // [rsp+27h] [rbp-439h]
long long v5; // [rsp+28h] [rbp-438h] BYREF
_QWORD v6[2]; // [rsp+30h] [rbp-430h] BYREF
_BYTE v7[1032]; // [rsp+40h] [rbp-420h] BYREF
unsigned long long v8; // [rsp+448h] [rbp-18h]
v8 = __readfsqword(0x... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x458
MOV qword ptr [RBP + -0x448],RDI
MOV qword ptr [RBP + -0x450],RSI
MOV qword ptr [RBP + -0x458],RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x420]
MOV RDX,qword ptr [RBP + -0x458]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x001... | /* func0(std::string const&, std::string const&) */
string * func0(string *param_1,string *param_2)
{
bool bVar1;
byte *pbVar2;
int *piVar3;
long in_FS_OFFSET;
int8 local_440;
int8 local_438;
string *local_430;
string local_428 [1032];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
... |
69 | func0 |
#include <iostream>
#include <string>
#include <array>
#include <cassert>
const int NO_OF_CHARS = 256;
std::array<int, NO_OF_CHARS> get_char_count_array(const std::string& string) {
std::array<int, NO_OF_CHARS> count{};
for (char c : string) {
count[static_cast<unsigned char>(c)]++;
}... | std::string func0(const std::string& string, const std::string& second_string) {
auto count = get_char_count_array(second_string);
std::string result;
for (char c : string) {
if (count[static_cast<unsigned char>(c)] == 0) {
result.push_back(c);
}
}
return result;
... | int main() {
assert(func0("probasscurve", "pros") == "bacuve");
assert(func0("digitalindia", "talent") == "digiidi");
assert(func0("exoticmiles", "toxic") == "emles");
std::cout << "All tests passed." << std::endl;
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x428,%rsp
mov %rdi,%rbp
mov %rsi,%r12
mov ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 428h
mov rbp, rdi
mov r12, rsi
mov rsi, rdx
mov rax, fs:28h
mov [rsp+458h+var_40], rax
xor eax, eax
lea rdi, [rsp+458h+var_448]
call... | _QWORD * func0(_QWORD *a1, unsigned __int8 **a2, long long a3)
{
unsigned __int8 *v3; // rbx
unsigned __int8 *v4; // r14
unsigned long long v6; // rax
unsigned __int8 v7; // r12
long long v8; // r13
unsigned long long v9; // r15
_DWORD v10[258]; // [rsp+10h] [rbp-448h] BYREF
unsigned long long v11; // [... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x428
MOV RBP,RDI
MOV R12,RSI
MOV RSI,RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x418],RAX
XOR EAX,EAX
LEA RDI,[RSP + 0x10]
CALL 0x001012a9
LEA RAX,[RBP + 0x10]
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RBP],RAX
MOV qword ptr [RB... | /* func0(std::string const&, std::string const&) */
string * func0(string *param_1,string *param_2)
{
byte bVar1;
ulong uVar2;
ulong uVar3;
byte *pbVar4;
byte *pbVar5;
long in_FS_OFFSET;
string local_448 [1032];
long local_40;
local_40 = *(long *)(in_FS_OFFSET + 0x28);
get_char_count_array(loca... |
70 | func0 |
#include <iostream>
#include <string>
#include <array>
#include <cassert>
const int NO_OF_CHARS = 256;
std::array<int, NO_OF_CHARS> get_char_count_array(const std::string& string) {
std::array<int, NO_OF_CHARS> count{};
for (char c : string) {
count[static_cast<unsigned char>(c)]++;
}... | std::string func0(const std::string& string, const std::string& second_string) {
auto count = get_char_count_array(second_string);
std::string result;
for (char c : string) {
if (count[static_cast<unsigned char>(c)] == 0) {
result.push_back(c);
}
}
return result;
... | int main() {
assert(func0("probasscurve", "pros") == "bacuve");
assert(func0("digitalindia", "talent") == "digiidi");
assert(func0("exoticmiles", "toxic") == "emles");
std::cout << "All tests passed." << std::endl;
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
mov $0x80,%ecx
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x428,%rsp
mov... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_:
endbr64
push r15
mov ecx, 80h
push r14
push r13
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 428h
mov rax, fs:28h
mov [rsp+458h+var_40], rax
xor eax, eax
lea rdi, [rsp+458h+var_448]
rep stosq
mov rax... | _QWORD * func0(_QWORD *a1, unsigned __int8 **a2, unsigned __int8 **a3)
{
unsigned __int8 *v3; // rax
unsigned __int8 *v4; // rcx
long long v5; // rdx
unsigned __int8 *v6; // rbx
unsigned __int8 *i; // r14
long long v8; // r12
long long v9; // r13
long long v10; // rax
unsigned long long v11; // r15
... | func0:
ENDBR64
PUSH R15
MOV ECX,0x80
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x428
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x418],RAX
XOR EAX,EAX
LEA RDI,[RSP + 0x10]
STOSQ.REP RDI
MOV RAX,qword ptr [RDX]
MOV RCX,qword ptr [RDX + 0x8]
ADD RCX,RAX
CMP RAX,RCX
JZ 0x001016f1
NOP word ptr ... | /* func0(std::string const&, std::string const&) */
string * func0(string *param_1,string *param_2)
{
string sVar1;
ulong uVar2;
byte *pbVar3;
string *psVar4;
long lVar5;
byte *pbVar6;
int8 *in_RDX;
ulong uVar7;
string *psVar8;
int *piVar9;
string *psVar10;
long in_FS_OFFSET;
int local_448 [... |
71 | func0 |
#include <iostream>
#include <string>
#include <array>
#include <cassert>
const int NO_OF_CHARS = 256;
std::array<int, NO_OF_CHARS> get_char_count_array(const std::string& string) {
std::array<int, NO_OF_CHARS> count{};
for (char c : string) {
count[static_cast<unsigned char>(c)]++;
}... | std::string func0(const std::string& string, const std::string& second_string) {
auto count = get_char_count_array(second_string);
std::string result;
for (char c : string) {
if (count[static_cast<unsigned char>(c)] == 0) {
result.push_back(c);
}
}
return result;
... | int main() {
assert(func0("probasscurve", "pros") == "bacuve");
assert(func0("digitalindia", "talent") == "digiidi");
assert(func0("exoticmiles", "toxic") == "emles");
std::cout << "All tests passed." << std::endl;
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
mov $0x80,%ecx
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x428,%rsp
mov... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_:
endbr64
push r15
mov ecx, 80h
push r14
push r13
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 428h
mov rax, fs:28h
mov [rsp+458h+var_40], rax
xor eax, eax
lea rdi, [rsp+458h+var_448]
rep stosq
mov rax... | _QWORD * func0(_QWORD *a1, unsigned __int8 **a2, unsigned __int8 **a3)
{
unsigned __int8 *v3; // rax
unsigned __int8 *v4; // rcx
long long v5; // rdx
unsigned __int8 *v6; // rbx
unsigned __int8 *i; // r14
long long v8; // r12
long long v9; // r13
long long v10; // rax
unsigned long long v11; // r15
... | func0:
ENDBR64
PUSH R15
MOV ECX,0x80
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x428
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x418],RAX
XOR EAX,EAX
LEA RDI,[RSP + 0x10]
STOSQ.REP RDI
MOV RAX,qword ptr [RDX]
MOV RCX,qword ptr [RDX + 0x8]
ADD RCX,RAX
CMP RAX,RCX
JZ 0x00101791
NOP word ptr ... | /* func0(std::string const&, std::string const&) */
string * func0(string *param_1,string *param_2)
{
string sVar1;
ulong uVar2;
byte *pbVar3;
string *psVar4;
long lVar5;
byte *pbVar6;
int8 *in_RDX;
ulong uVar7;
string *psVar8;
int *piVar9;
string *psVar10;
long in_FS_OFFSET;
int local_448 [... |
72 | func0 |
#include <iostream>
#include <vector>
#include <set>
#include <assert.h>
| bool func0(const std::vector<int>& arraynums) {
std::set<int> nums_set(arraynums.begin(), arraynums.end());
return arraynums.size() != nums_set.size();
}
| int main() {
assert(func0({1,2,3,4,5}) == false);
assert(func0({1,2,3,4,4}) == true);
assert(func0({1,1,2,2,3,3,4,4,5}) == true);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x58,%rsp
mov %rdi,-0x58(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x58(%rbp),%rax
mov %rax,%rdi
callq 1804 <_ZNKSt6vectorIiSaIiEE3endEv>
mov %rax,%rbx
mov -0x58(... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 58h
mov [rbp+var_58], rdi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_58]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void)
mov rbx, rax
mov rax... | long long func0(long long a1)
{
long long v1; // rbx
long long v2; // rax
long long v3; // rbx
_BYTE v5[56]; // [rsp+10h] [rbp-50h] BYREF
unsigned long long v6; // [rsp+48h] [rbp-18h]
v6 = __readfsqword(0x28u);
v1 = std::vector<int>::end(a1);
v2 = std::vector<int>::begin(a1);
std::set<int>::set<__gn... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RBP + -0x58],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,RAX
CALL 0x001017b0
MOV RBX,RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,RAX
CALL 0x00101764
MOV RCX,RAX
LEA RAX,[RBP +... | /* func0(std::vector<int, std::allocator<int> > const&) */
ulong func0(vector *param_1)
{
__normal_iterator _Var1;
__normal_iterator _Var2;
long lVar3;
long lVar4;
long in_FS_OFFSET;
set<int,std::less<int>,std::allocator<int>> local_58 [56];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);... |
73 | func0 |
#include <iostream>
#include <vector>
#include <set>
#include <assert.h>
| bool func0(const std::vector<int>& arraynums) {
std::set<int> nums_set(arraynums.begin(), arraynums.end());
return arraynums.size() != nums_set.size();
}
| int main() {
assert(func0({1,2,3,4,5}) == false);
assert(func0({1,2,3,4,4}) == true);
assert(func0({1,1,2,2,3,3,4,4,5}) == true);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x58,%rsp
mov %rdi,%r12
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
mov 0x8(%rdi),%r14
mov (%rdi),%rbx
movl $0x0,0x18(%rsp)
movq $0x0,0x20(%rsp)
lea... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 58h
mov [rsp+88h+var_80], rdi
mov rax, fs:28h
mov [rsp+88h+var_40], rax
xor eax, eax
mov r14, [rdi+8]
mov rbx, [rdi]
mov [rsp+88h+var_70], 0
mov [rsp+88h+var_68], 0
l... | long long func0(long long a1)
{
_DWORD *v1; // r14
_DWORD *v2; // rbx
long long insert_hint_unique_pos; // rax
int *v4; // rdx
int *v5; // rbp
bool v6; // r12
long long v7; // rax
_BYTE v9[8]; // [rsp+10h] [rbp-78h] BYREF
int v10; // [rsp+18h] [rbp-70h] BYREF
long long v11; // [rsp+20h] [rbp-68h]
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RSP + 0x8],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
MOV R14,qword ptr [RDI + 0x8]
MOV RBX,qword ptr [RDI]
MOV dword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x0
LEA RAX,[RSP + 0x18]
... | /* func0(std::vector<int, std::allocator<int> > const&) */
ulong func0(vector *param_1)
{
int *piVar1;
_Rb_tree_node_base *p_Var2;
_Rb_tree_node_base *p_Var3;
int *piVar4;
bool bVar5;
long in_FS_OFFSET;
bool bVar6;
int auVar7 [16];
_Rb_tree<int,int,std::_Identity<int>,std::less<int>,std::allocator<i... |
74 | func0 |
#include <iostream>
#include <vector>
#include <set>
#include <assert.h>
| bool func0(const std::vector<int>& arraynums) {
std::set<int> nums_set(arraynums.begin(), arraynums.end());
return arraynums.size() != nums_set.size();
}
| int main() {
assert(func0({1,2,3,4,5}) == false);
assert(func0({1,2,3,4,4}) == true);
assert(func0({1,1,2,2,3,3,4,4,5}) == true);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x58,%rsp
mov 0x8(%rdi),%r15
mov (%rdi),%rbx
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x18(%rsp),%r13
movl $0x0,0x18(%rsp)
movq $0x0,0x20(%rs... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 58h
mov r14, [rdi+8]
mov rbp, [rdi]
mov [rsp+88h+var_80], rdi
lea r13, [rsp+88h+var_70]
mov rax, fs:28h
mov [rsp+88h+var_40], rax
xor eax, eax
mov [rsp+88h+var_70], 0... | long long func0(signed int **a1)
{
signed int *v1; // r14
signed int *v2; // rbp
long long v3; // r12
signed int v4; // r15d
int *v5; // rbx
long long insert_unique_pos; // rax
int *v7; // rdx
bool v8; // al
bool v9; // r12
long long v10; // rax
_QWORD *v11; // rbx
void *v12; // rdi
_BYTE v14... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x58
MOV R14,qword ptr [RDI + 0x8]
MOV RBP,qword ptr [RDI]
MOV qword ptr [RSP + 0x8],RDI
LEA R13,[RSP + 0x18]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
MOV dword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x0
... | /* func0(std::vector<int, std::allocator<int> > const&) */
ulong func0(vector *param_1)
{
uint uVar1;
uint *puVar2;
void *pvVar3;
void *pvVar4;
_Rb_tree_node_base *p_Var5;
_Rb_tree_node_base *p_Var6;
uint *puVar7;
ulong uVar8;
long lVar9;
long in_FS_OFFSET;
bool bVar10;
int auVar11 [16];
_Rb... |
75 | func0 |
#include <iostream>
#include <vector>
#include <set>
#include <assert.h>
| bool func0(const std::vector<int>& arraynums) {
std::set<int> nums_set(arraynums.begin(), arraynums.end());
return arraynums.size() != nums_set.size();
}
| int main() {
assert(func0({1,2,3,4,5}) == false);
assert(func0({1,2,3,4,4}) == true);
assert(func0({1,1,2,2,3,3,4,4,5}) == true);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x48,%rsp
mov 0x8(%rdi),%r15
mov (%rdi),%rbx
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
lea 0x8(%rsp),%r14
movl $0x0,0x8(%rsp)
movq $0x0,0x10(%rsp)... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 58h
mov r13, [rdi+8]
mov rbp, [rdi]
mov rax, fs:28h
mov [rsp+88h+var_40], rax
xor eax, eax
lea r12, [rsp+88h+var_70]
mov [rsp+88h+var_70], 0
mov [rsp+88h+var_68], 0
m... | long long func0(int **a1)
{
int *v1; // r13
int *v2; // rbp
long long v3; // r15
int v4; // ecx
int *v5; // rbx
bool v6; // r15
long long v7; // rax
_QWORD *v8; // rbx
void *v9; // rdi
int v11; // edx
int *v12; // rax
long long v13; // rax
int v14; // [rsp+Ch] [rbp-7Ch]
int v15; // [rsp+18h... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x58
MOV R13,qword ptr [RDI + 0x8]
MOV RBP,qword ptr [RDI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
LEA R12,[RSP + 0x18]
MOV dword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x0
MOV qword ptr [RSP + 0x28],R12... | /* func0(std::vector<int, std::allocator<int> > const&) */
ulong func0(vector *param_1)
{
int iVar1;
int *piVar2;
_Rb_tree_node_base *p_Var3;
long lVar4;
int iVar5;
_Rb_tree_node_base *p_Var6;
int *piVar7;
ulong uVar8;
bool bVar9;
long lVar10;
long in_FS_OFFSET;
int4 local_70 [2];
_Rb_tree_n... |
76 | func0 |
#include <cassert>
| bool func0(long long x) {
if (x % 2 == 0)
return false;
if (x == 1)
return true;
x = x + 1;
long long p = 0;
while (x % 2 == 0) {
x = x / 2;
p = p + 1;
if (p == x)
return true;
}
return false;
}
| int main() {
assert(func0(383) == true);
assert(func0(254) == false);
assert(func0(200) == false);
assert(func0(32212254719) == true);
assert(func0(32212254718) == false);
assert(func0(159) == true);
}
| O0 | cpp | func0(long long):
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov -0x18(%rbp),%rax
and $0x1,%eax
test %rax,%rax
jne 1168 <_Z5func0x+0x1f>
mov $0x0,%eax
jmp 11bf <_Z5func0x+0x76>
cmpq $0x1,-0x18(%rbp)
jne 1176 <_Z5func0x+0x2d>
mov $0x1,%eax
jmp 11bf <_Z5func0x+0x76>
addq $0... | _Z5func0x:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov rax, [rbp+var_18]
and eax, 1
test rax, rax
jnz short loc_1168
mov eax, 0
jmp short loc_11C1
loc_1168:
cmp [rbp+var_18], 1
jnz short loc_1176
mov eax, 1
jmp short loc_11C1
loc_1176:
add [rbp+var_18], ... | long long func0(long long a1)
{
long long v2; // [rsp+0h] [rbp-18h]
long long v3; // [rsp+10h] [rbp-8h]
if ( (a1 & 1) == 0 )
return 0LL;
if ( a1 == 1 )
return 1LL;
v2 = a1 + 1;
v3 = 0LL;
while ( (v2 & 1) == 0 )
{
v2 /= 2LL;
if ( ++v3 == v2 )
return 1LL;
}
return 0LL;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV RAX,qword ptr [RBP + -0x18]
AND EAX,0x1
TEST RAX,RAX
JNZ 0x00101168
MOV EAX,0x0
JMP 0x001011c1
LAB_00101168:
CMP qword ptr [RBP + -0x18],0x1
JNZ 0x00101176
MOV EAX,0x1
JMP 0x001011c1
LAB_00101176:
ADD qword ptr [RBP + -0x18],0x1
MOV qword ptr [RBP ... | /* func0(long long) */
int8 func0(longlong param_1)
{
int8 uVar1;
ulong local_20;
ulong local_10;
if ((param_1 & 1U) == 0) {
uVar1 = 0;
}
else if (param_1 == 1) {
uVar1 = 1;
}
else {
local_20 = param_1 + 1;
local_10 = 0;
do {
if ((local_20 & 1) != 0) {
return 0;
... |
77 | func0 |
#include <cassert>
| bool func0(long long x) {
if (x % 2 == 0)
return false;
if (x == 1)
return true;
x = x + 1;
long long p = 0;
while (x % 2 == 0) {
x = x / 2;
p = p + 1;
if (p == x)
return true;
}
return false;
}
| int main() {
assert(func0(383) == true);
assert(func0(254) == false);
assert(func0(200) == false);
assert(func0(32212254719) == true);
assert(func0(32212254718) == false);
assert(func0(159) == true);
}
| O1 | cpp | func0(long long):
endbr64
mov $0x0,%eax
test $0x1,%dil
je 1194 <_Z5func0x+0x4b>
mov $0x1,%eax
cmp $0x1,%rdi
je 1194 <_Z5func0x+0x4b>
lea 0x1(%rdi),%rax
mov $0x0,%edx
test $0x1,%al
jne 118f <_Z5func0x+0x46>
mov %rax,%rdi
shr $0x3f,%rdi
add %rax,%rdi
sar %rdi
mov %rdi,%rax
add... | _Z5func0x:
endbr64
mov eax, 0
test dil, 1
jz short locret_1190
mov eax, 1
cmp rdi, 1
jz short locret_1190
add rdi, 1
mov edx, 0
loc_116C:
test dil, 1
jnz short loc_1191
mov rax, rdi
shr rax, 3Fh
add rax, rdi
sar rax, 1
mov rdi, rax
add rdx, 1
cmp rax, ... | long long func0(long long a1)
{
long long result; // rax
long long v2; // rdi
long long v3; // rdx
result = 0LL;
if ( (a1 & 1) != 0 )
{
result = 1LL;
if ( a1 != 1 )
{
v2 = a1 + 1;
v3 = 0LL;
while ( (v2 & 1) == 0 )
{
v2 /= 2LL;
if ( v2 == ++v3 )
... | func0:
ENDBR64
MOV EAX,0x0
TEST DIL,0x1
JZ 0x00101190
MOV EAX,0x1
CMP RDI,0x1
JZ 0x00101190
ADD RDI,0x1
MOV EDX,0x0
LAB_0010116c:
TEST DIL,0x1
JNZ 0x00101191
MOV RAX,RDI
SHR RAX,0x3f
ADD RAX,RDI
SAR RAX,0x1
MOV RDI,RAX
ADD RDX,0x1
CMP RAX,RDX
JNZ 0x0010116c
MOV EAX,0x1
LAB_00101190:
RET
LAB_00101191:
MOV EAX,0x0
RET | /* func0(long long) */
int8 func0(longlong param_1)
{
int8 uVar1;
ulong uVar2;
ulong uVar3;
uVar1 = 0;
if (((param_1 & 1U) != 0) && (uVar1 = 1, param_1 != 1)) {
uVar3 = param_1 + 1;
uVar2 = 0;
do {
if ((uVar3 & 1) != 0) {
return 0;
}
uVar3 = (long)uVar3 / 2;
uV... |
78 | func0 |
#include <cassert>
| bool func0(long long x) {
if (x % 2 == 0)
return false;
if (x == 1)
return true;
x = x + 1;
long long p = 0;
while (x % 2 == 0) {
x = x / 2;
p = p + 1;
if (p == x)
return true;
}
return false;
}
| int main() {
assert(func0(383) == true);
assert(func0(254) == false);
assert(func0(200) == false);
assert(func0(32212254719) == true);
assert(func0(32212254718) == false);
assert(func0(159) == true);
}
| O2 | cpp | func0(long long) [clone .part.0]:
add $0x1,%rdi
xor %eax,%eax
jmp 1216 <_Z5func0x.part.0+0x26>
nopl 0x0(%rax,%rax,1)
mov %rdi,%rdx
add $0x1,%rax
shr $0x3f,%rdx
add %rdx,%rdi
sar %rdi
cmp %rax,%rdi
je 1220 <_Z5func0x.part.0+0x30>
test $0x1,%dil
je 1200 <_Z5func0x.part.0+0x10>
xor ... | _Z5func0x_part_0:
add rdi, 1
xor eax, eax
jmp short loc_1216
loc_1200:
mov rdx, rdi
add rax, 1
shr rdx, 3Fh
add rdi, rdx
sar rdi, 1
cmp rdi, rax
jz short loc_1220
loc_1216:
test dil, 1
jz short loc_1200
xor eax, eax
retn
loc_1220:
mov eax, 1
retn | long long func0(long long a1)
{
long long v1; // rdi
long long v2; // rax
v1 = a1 + 1;
v2 = 0LL;
do
{
if ( (v1 & 1) != 0 )
return 0LL;
++v2;
v1 /= 2LL;
}
while ( v1 != v2 );
return 1LL;
} | func0:
ADD RDI,0x1
XOR EAX,EAX
JMP 0x00101216
LAB_00101200:
MOV RDX,RDI
ADD RAX,0x1
SHR RDX,0x3f
ADD RDI,RDX
SAR RDI,0x1
CMP RDI,RAX
JZ 0x00101220
LAB_00101216:
TEST DIL,0x1
JZ 0x00101200
XOR EAX,EAX
RET
LAB_00101220:
MOV EAX,0x1
RET | /* func0(long long) [clone .part.0] */
int8 func0(longlong param_1)
{
ulong uVar1;
ulong uVar2;
uVar2 = param_1 + 1;
uVar1 = 0;
do {
if ((uVar2 & 1) != 0) {
return 0;
}
uVar1 = uVar1 + 1;
uVar2 = (long)uVar2 / 2;
} while (uVar2 != uVar1);
return 1;
} |
79 | func0 |
#include <cassert>
| bool func0(long long x) {
if (x % 2 == 0)
return false;
if (x == 1)
return true;
x = x + 1;
long long p = 0;
while (x % 2 == 0) {
x = x / 2;
p = p + 1;
if (p == x)
return true;
}
return false;
}
| int main() {
assert(func0(383) == true);
assert(func0(254) == false);
assert(func0(200) == false);
assert(func0(32212254719) == true);
assert(func0(32212254718) == false);
assert(func0(159) == true);
}
| O3 | cpp | func0(long long) [clone .part.0]:
add $0x1,%rdi
xor %eax,%eax
jmp 1216 <_Z5func0x.part.0+0x26>
nopl 0x0(%rax,%rax,1)
mov %rdi,%rdx
add $0x1,%rax
shr $0x3f,%rdx
add %rdx,%rdi
sar %rdi
cmp %rax,%rdi
je 1220 <_Z5func0x.part.0+0x30>
test $0x1,%dil
je 1200 <_Z5func0x.part.0+0x10>
xor ... | _Z5func0x_part_0:
add rdi, 1
xor eax, eax
jmp short loc_1216
loc_1200:
mov rdx, rdi
add rax, 1
shr rdx, 3Fh
add rdi, rdx
sar rdi, 1
cmp rdi, rax
jz short loc_1220
loc_1216:
test dil, 1
jz short loc_1200
xor eax, eax
retn
loc_1220:
mov eax, 1
retn | long long func0(long long a1)
{
long long v1; // rdi
long long v2; // rax
v1 = a1 + 1;
v2 = 0LL;
do
{
if ( (v1 & 1) != 0 )
return 0LL;
++v2;
v1 /= 2LL;
}
while ( v1 != v2 );
return 1LL;
} | func0:
ADD RDI,0x1
XOR EAX,EAX
JMP 0x00101216
LAB_00101200:
MOV RDX,RDI
ADD RAX,0x1
SHR RDX,0x3f
ADD RDI,RDX
SAR RDI,0x1
CMP RDI,RAX
JZ 0x00101220
LAB_00101216:
TEST DIL,0x1
JZ 0x00101200
XOR EAX,EAX
RET
LAB_00101220:
MOV EAX,0x1
RET | /* func0(long long) [clone .part.0] */
int8 func0(longlong param_1)
{
ulong uVar1;
ulong uVar2;
uVar2 = param_1 + 1;
uVar1 = 0;
do {
if ((uVar2 & 1) != 0) {
return 0;
}
uVar1 = uVar1 + 1;
uVar2 = (long)uVar2 / 2;
} while (uVar2 != uVar1);
return 1;
} |
80 | func0 |
#include <vector>
#include <assert.h>
| std::vector<int> func0(int m, int n) {
std::vector<int> multiples;
for (int i = 1; i <= m; i++) {
multiples.push_back(i * n);
}
return multiples;
}
| int main() {
std::vector<int> result;
result = func0(4, 3);
assert((result == std::vector<int>{3, 6, 9, 12}));
result = func0(2, 5);
assert((result == std::vector<int>{5, 10}));
result = func0(9, 2);
assert((result == std::vector<int>{2, 4, 6, 8, 10, 12, 14, 16, 18}));
... | O0 | cpp | func0(int, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x28,%rsp
mov %rdi,-0x28(%rbp)
mov %esi,-0x2c(%rbp)
mov %edx,-0x30(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x28(%rbp),%rax
mov %rax,%rdi
callq 1760 <_ZNSt6vectorIiSaIiEEC1Ev>
movl $0x1,-0x1c(%rbp... | _Z5func0ii:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 28h
mov [rbp+var_28], rdi
mov [rbp+var_2C], esi
mov [rbp+var_30], edx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_28]
mov rdi, rax
call _ZNSt6vectorIiSaIiEEC2Ev; std::vector<int>::vector... | long long func0(long long a1, int a2, int a3)
{
int v5; // [rsp+10h] [rbp-20h] BYREF
int i; // [rsp+14h] [rbp-1Ch]
unsigned long long v7; // [rsp+18h] [rbp-18h]
v7 = __readfsqword(0x28u);
std::vector<int>::vector(a1);
for ( i = 1; i <= a2; ++i )
{
v5 = a3 * i;
std::vector<int>::push_back(a1, &v5... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x28],RDI
MOV dword ptr [RBP + -0x2c],ESI
MOV dword ptr [RBP + -0x30],EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,RAX
CALL 0x001017c2
MOV dword ptr [RBP + -0x1c],0x1
JM... | /* func0(int, int) */
vector<int,std::allocator<int>> * func0(int param_1,int param_2)
{
int in_EDX;
int4 in_register_0000003c;
vector<int,std::allocator<int>> *this;
long in_FS_OFFSET;
int local_28;
int local_24;
long local_20;
this = (vector<int,std::allocator<int>> *)CONCAT44(in_register_0000003... |
81 | func0 |
#include <vector>
#include <assert.h>
| std::vector<int> func0(int m, int n) {
std::vector<int> multiples;
for (int i = 1; i <= m; i++) {
multiples.push_back(i * n);
}
return multiples;
}
| int main() {
std::vector<int> result;
result = func0(4, 3);
assert((result == std::vector<int>{3, 6, 9, 12}));
result = func0(2, 5);
assert((result == std::vector<int>{5, 10}));
result = func0(9, 2);
assert((result == std::vector<int>{2, 4, 6, 8, 10, 12, 14, 16, 18}));
... | O1 | cpp | func0(int, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %rdi,%rbx
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
test %esi,%esi
jle 12e8 <_Z5func0ii+0x9f>
mov %esi,%r13d... | _Z5func0ii:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 18h
mov rbx, rdi
mov rax, fs:28h
mov [rsp+48h+var_40], rax
xor eax, eax
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
test esi, esi
jle short loc_12F8
... | _QWORD * func0(_QWORD *a1, int a2, int a3)
{
int v5; // ebp
int i; // r12d
_DWORD *v7; // rsi
int v9; // [rsp+4h] [rbp-44h] BYREF
unsigned long long v10; // [rsp+8h] [rbp-40h]
v10 = __readfsqword(0x28u);
*a1 = 0LL;
a1[1] = 0LL;
a1[2] = 0LL;
if ( a2 > 0 )
{
v5 = a3;
for ( i = 1; i <= a2; +... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
TEST ESI,ESI
JLE 0x001012f8
MOV R13D,ESI
MOV R14D,EDX
MOV EBP,EDX
MOV R... | /* func0(int, int) */
vector<int,std::allocator<int>> * func0(int param_1,int param_2)
{
int *piVar1;
int in_EDX;
int iVar2;
int4 in_register_0000003c;
vector<int,std::allocator<int>> *this;
int iVar3;
long in_FS_OFFSET;
int local_44;
long local_40;
this = (vector<int,std::allocator<int>> *)CON... |
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.