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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
2,182 | func0 |
#include <cassert>
#include <string>
| int func0(std::string string, char char_to_find) {
int flag = -1;
for (int i = 0; i < string.length(); i++) {
if (string[i] == char_to_find) {
flag = i;
}
}
if (flag == -1) {
return -1; // Use -1 to represent None in Python
} else {
return flag... | int main() {
assert(func0("hello world", 'l') == 10);
assert(func0("language", 'g') == 7);
assert(func0("little", 'y') == -1); // -1 represents None in Python
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char):
endbr64
mov 0x8(%rdi),%rdx
test %rdx,%rdx
je 1400 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc+0x40>
mov (%rdi),%rcx
xor %eax,%eax
mov $0xffffffff,%r8d
nopl 0x0(%rax,%rax,1)
cmp %sil,(%... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc:
endbr64
mov rcx, [rdi+8]
test rcx, rcx
jz short loc_1380
mov rdi, [rdi]
xor eax, eax
mov edx, 0FFFFFFFFh
nop word ptr [rax+rax+00000000h]
loc_1360:
cmp [rdi+rax], sil
cmovz edx, eax
add rax, 1
cmp rcx, rax
jnz s... | long long func0(long long *a1, char a2)
{
long long v2; // rcx
long long v3; // rdi
long long v4; // rax
unsigned int v5; // edx
v2 = a1[1];
if ( !v2 )
return 0xFFFFFFFFLL;
v3 = *a1;
v4 = 0LL;
v5 = -1;
do
{
if ( *(_BYTE *)(v3 + v4) == a2 )
v5 = v4;
++v4;
}
while ( v2 != v4 ... | func0:
ENDBR64
MOV RCX,qword ptr [RDI + 0x8]
TEST RCX,RCX
JZ 0x00101380
MOV RDI,qword ptr [RDI]
XOR EAX,EAX
MOV EDX,0xffffffff
NOP word ptr [RAX + RAX*0x1]
LAB_00101360:
CMP byte ptr [RDI + RAX*0x1],SIL
CMOVZ EDX,EAX
ADD RAX,0x1
CMP RCX,RAX
JNZ 0x00101360
CMP EDX,-0x1
JZ 0x00101378
ADD EDX,0x1
LAB_00101378:
MOV EAX,EDX... | /* func0(std::string, char) */
ulong func0(long *param_1,char param_2)
{
ulong uVar1;
ulong uVar2;
if (param_1[1] != 0) {
uVar1 = 0;
uVar2 = 0xffffffff;
do {
if (*(char *)(*param_1 + uVar1) == param_2) {
uVar2 = uVar1 & 0xffffffff;
}
uVar1 = uVar1 + 1;
} while (param... |
2,183 | func0 |
#include <cassert>
#include <string>
| int func0(std::string string, char char_to_find) {
int flag = -1;
for (int i = 0; i < string.length(); i++) {
if (string[i] == char_to_find) {
flag = i;
}
}
if (flag == -1) {
return -1; // Use -1 to represent None in Python
} else {
return flag... | int main() {
assert(func0("hello world", 'l') == 10);
assert(func0("language", 'g') == 7);
assert(func0("little", 'y') == -1); // -1 represents None in Python
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char):
endbr64
mov 0x8(%rdi),%rdx
test %rdx,%rdx
je 1400 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc+0x40>
mov (%rdi),%rcx
xor %eax,%eax
mov $0xffffffff,%r8d
nopl 0x0(%rax,%rax,1)
cmp %sil,(%... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc:
endbr64
mov rcx, [rdi+8]
test rcx, rcx
jz short loc_13E0
mov rdi, [rdi]
xor eax, eax
mov edx, 0FFFFFFFFh
nop word ptr [rax+rax+00000000h]
loc_13C0:
cmp [rdi+rax], sil
cmovz edx, eax
add rax, 1
cmp rcx, rax
jnz s... | long long func0(long long *a1, char a2)
{
long long v2; // rcx
long long v3; // rdi
long long v4; // rax
unsigned int v5; // edx
v2 = a1[1];
if ( !v2 )
return 0xFFFFFFFFLL;
v3 = *a1;
v4 = 0LL;
v5 = -1;
do
{
if ( *(_BYTE *)(v3 + v4) == a2 )
v5 = v4;
++v4;
}
while ( v2 != v4 ... | func0:
ENDBR64
MOV RCX,qword ptr [RDI + 0x8]
TEST RCX,RCX
JZ 0x001013e0
MOV RDI,qword ptr [RDI]
XOR EAX,EAX
MOV EDX,0xffffffff
NOP word ptr [RAX + RAX*0x1]
LAB_001013c0:
CMP byte ptr [RDI + RAX*0x1],SIL
CMOVZ EDX,EAX
ADD RAX,0x1
CMP RCX,RAX
JNZ 0x001013c0
CMP EDX,-0x1
JZ 0x001013d8
ADD EDX,0x1
LAB_001013d8:
MOV EAX,EDX... | /* func0(std::string, char) */
ulong func0(long *param_1,char param_2)
{
ulong uVar1;
ulong uVar2;
if (param_1[1] != 0) {
uVar1 = 0;
uVar2 = 0xffffffff;
do {
if (*(char *)(*param_1 + uVar1) == param_2) {
uVar2 = uVar1 & 0xffffffff;
}
uVar1 = uVar1 + 1;
} while (param... |
2,184 | func0 |
#include <assert.h>
| int func0(int n) {
int i = 1;
int sum = 0;
while (n / i > 0) {
sum = sum + n / i;
i = i * 2;
}
return sum;
}
| int main() {
assert(func0(4) == 7);
assert(func0(2) == 3);
assert(func0(5) == 8);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
movl $0x1,-0x8(%rbp)
movl $0x0,-0x4(%rbp)
mov -0x14(%rbp),%eax
cltd
idivl -0x8(%rbp)
test %eax,%eax
jle 117c <_Z5func0i+0x33>
mov -0x14(%rbp),%eax
cltd
idivl -0x8(%rbp)
add %eax,-0x4(%rbp)
shll -0x8(%rbp)
jmp 1162 <_Z5func... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_8], 1
mov [rbp+var_4], 0
jmp short loc_1171
loc_1164:
mov eax, [rbp+var_14]
cdq
idiv [rbp+var_8]
add [rbp+var_4], eax
shl [rbp+var_8], 1
loc_1171:
mov eax, [rbp+var_14]
cdq
idiv [rbp+var_8]
test e... | long long func0(int a1)
{
int v2; // [rsp+Ch] [rbp-8h]
unsigned int v3; // [rsp+10h] [rbp-4h]
v2 = 1;
v3 = 0;
while ( a1 / v2 > 0 )
{
v3 += a1 / v2;
v2 *= 2;
}
return v3;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x8],0x1
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00101171
LAB_00101164:
MOV EAX,dword ptr [RBP + -0x14]
CDQ
IDIV dword ptr [RBP + -0x8]
ADD dword ptr [RBP + -0x4],EAX
SHL dword ptr [RBP + -0x8],0x1
LAB_00101171:
MOV EAX,dword ptr [RB... | /* func0(int) */
int func0(int param_1)
{
int4 local_10;
int4 local_c;
local_c = 0;
for (local_10 = 1; 0 < param_1 / local_10; local_10 = local_10 << 1) {
local_c = local_c + param_1 / local_10;
}
return local_c;
} |
2,185 | func0 |
#include <assert.h>
| int func0(int n) {
int i = 1;
int sum = 0;
while (n / i > 0) {
sum = sum + n / i;
i = i * 2;
}
return sum;
}
| int main() {
assert(func0(4) == 7);
assert(func0(2) == 3);
assert(func0(5) == 8);
return 0;
}
| O1 | cpp | func0(int):
endbr64
test %edi,%edi
jle 116f <_Z5func0i+0x26>
mov %edi,%edx
mov $0x0,%esi
mov $0x1,%ecx
add %edx,%esi
add %ecx,%ecx
mov %edi,%eax
cltd
idiv %ecx
mov %eax,%edx
test %eax,%eax
jg 115d <_Z5func0i+0x14>
mov %esi,%eax
retq
mov $0x0,%esi
jmp 116c <_Z5func0i+0x23>
| _Z5func0i:
endbr64
test edi, edi
jle short loc_116F
mov edx, edi
mov esi, 0
mov ecx, 1
loc_115D:
add esi, edx
add ecx, ecx
mov eax, edi
cdq
idiv ecx
mov edx, eax
test eax, eax
jg short loc_115D
loc_116C:
mov eax, esi
retn
loc_116F:
mov esi, 0
jmp short loc_116C | long long func0(int a1)
{
int v1; // edx
unsigned int v2; // esi
int v3; // ecx
if ( a1 <= 0 )
{
return 0;
}
else
{
v1 = a1;
v2 = 0;
v3 = 1;
do
{
v2 += v1;
v3 *= 2;
v1 = a1 / v3;
}
while ( a1 / v3 > 0 );
}
return v2;
} | func0:
ENDBR64
TEST EDI,EDI
JLE 0x0010116f
MOV EDX,EDI
MOV ESI,0x0
MOV ECX,0x1
LAB_0010115d:
ADD ESI,EDX
ADD ECX,ECX
MOV EAX,EDI
CDQ
IDIV ECX
MOV EDX,EAX
TEST EAX,EAX
JG 0x0010115d
LAB_0010116c:
MOV EAX,ESI
RET
LAB_0010116f:
MOV ESI,0x0
JMP 0x0010116c | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
if (param_1 < 1) {
iVar3 = 0;
}
else {
iVar3 = 0;
iVar2 = 1;
iVar1 = param_1;
do {
iVar3 = iVar3 + iVar1;
iVar2 = iVar2 * 2;
iVar1 = param_1 / iVar2;
} while (0 < iVar1);
}
return iV... |
2,186 | func0 |
#include <assert.h>
| int func0(int n) {
int i = 1;
int sum = 0;
while (n / i > 0) {
sum = sum + n / i;
i = i * 2;
}
return sum;
}
| int main() {
assert(func0(4) == 7);
assert(func0(2) == 3);
assert(func0(5) == 8);
return 0;
}
| O2 | cpp | func0(int):
endbr64
test %edi,%edi
jle 1170 <_Z5func0i+0x30>
mov %edi,%eax
xor %r8d,%r8d
mov $0x1,%ecx
nopw 0x0(%rax,%rax,1)
add %eax,%r8d
mov %edi,%eax
add %ecx,%ecx
cltd
idiv %ecx
test %eax,%eax
jne 1158 <_Z5func0i+0x18>
mov %r8d,%eax
retq
nopw 0x0(%rax,%rax,1)
xor %r8d,%r8d
mo... | _Z5func0i:
endbr64
test edi, edi
jle short loc_1170
mov eax, edi
xor esi, esi
mov ecx, 1
nop dword ptr [rax+00000000h]
loc_1158:
add esi, eax
mov eax, edi
add ecx, ecx
cdq
idiv ecx
test eax, eax
jg short loc_1158
mov eax, esi
retn
loc_1170:
xor esi, esi
mov eax,... | long long func0(int a1)
{
int v1; // eax
unsigned int v2; // esi
int v3; // ecx
if ( a1 <= 0 )
return 0LL;
v1 = a1;
v2 = 0;
v3 = 1;
do
{
v2 += v1;
v3 *= 2;
v1 = a1 / v3;
}
while ( a1 / v3 > 0 );
return v2;
} | func0:
ENDBR64
TEST EDI,EDI
JLE 0x00101170
MOV EAX,EDI
XOR ESI,ESI
MOV ECX,0x1
NOP dword ptr [RAX]
LAB_00101158:
ADD ESI,EAX
MOV EAX,EDI
ADD ECX,ECX
CDQ
IDIV ECX
TEST EAX,EAX
JG 0x00101158
MOV EAX,ESI
RET
LAB_00101170:
XOR ESI,ESI
MOV EAX,ESI
RET | /* func0(int) */
int [16] func0(int param_1)
{
int auVar1 [16];
int iVar2;
int iVar3;
ulong in_RDX;
uint uVar4;
int auVar5 [16];
if (0 < param_1) {
uVar4 = 0;
iVar3 = 1;
iVar2 = param_1;
do {
uVar4 = uVar4 + iVar2;
iVar3 = iVar3 * 2;
iVar2 = param_1 / iVar3;
a... |
2,187 | func0 |
#include <assert.h>
| int func0(int n) {
int i = 1;
int sum = 0;
while (n / i > 0) {
sum = sum + n / i;
i = i * 2;
}
return sum;
}
| int main() {
assert(func0(4) == 7);
assert(func0(2) == 3);
assert(func0(5) == 8);
return 0;
}
| O3 | cpp | func0(int):
endbr64
test %edi,%edi
jle 1170 <_Z5func0i+0x30>
mov %edi,%eax
xor %r8d,%r8d
mov $0x1,%ecx
nopw 0x0(%rax,%rax,1)
add %eax,%r8d
mov %edi,%eax
add %ecx,%ecx
cltd
idiv %ecx
test %eax,%eax
jne 1158 <_Z5func0i+0x18>
mov %r8d,%eax
retq
nopw 0x0(%rax,%rax,1)
xor %r8d,%r8d
mo... | _Z5func0i:
endbr64
test edi, edi
jle short loc_1170
mov eax, edi
xor esi, esi
mov ecx, 1
nop dword ptr [rax+00000000h]
loc_1158:
add esi, eax
mov eax, edi
add ecx, ecx
cdq
idiv ecx
test eax, eax
jg short loc_1158
mov eax, esi
retn
loc_1170:
xor esi, esi
mov eax,... | long long func0(int a1)
{
int v1; // eax
unsigned int v2; // esi
int v3; // ecx
if ( a1 <= 0 )
return 0LL;
v1 = a1;
v2 = 0;
v3 = 1;
do
{
v2 += v1;
v3 *= 2;
v1 = a1 / v3;
}
while ( a1 / v3 > 0 );
return v2;
} | func0:
ENDBR64
TEST EDI,EDI
JLE 0x00101170
MOV EAX,EDI
XOR ESI,ESI
MOV ECX,0x1
NOP dword ptr [RAX]
LAB_00101158:
ADD ESI,EAX
MOV EAX,EDI
ADD ECX,ECX
CDQ
IDIV ECX
TEST EAX,EAX
JG 0x00101158
MOV EAX,ESI
RET
LAB_00101170:
XOR ESI,ESI
MOV EAX,ESI
RET | /* func0(int) */
int [16] func0(int param_1)
{
int auVar1 [16];
int iVar2;
int iVar3;
ulong in_RDX;
uint uVar4;
int auVar5 [16];
if (0 < param_1) {
uVar4 = 0;
iVar3 = 1;
iVar2 = param_1;
do {
uVar4 = uVar4 + iVar2;
iVar3 = iVar3 * 2;
iVar2 = param_1 / iVar3;
a... |
2,188 | func0 |
#include <vector>
#include <algorithm>
#include <assert.h>
| int func0(const std::vector<int>& arr) {
int n = arr.size();
std::vector<int> lis(n, 1);
for (int i = 1; i < n; ++i) {
for (int j = 0; j < i; ++j) {
if (arr[i] > arr[j] && lis[i] < lis[j] + 1) {
lis[i] = lis[j] + 1;
}
}
}
... | int main() {
assert(func0({10, 22, 9, 33, 21, 50, 41, 60}) == 5);
assert(func0({3, 10, 2, 1, 20}) == 3);
assert(func0({50, 3, 10, 7, 40, 80}) == 4);
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 176c <_ZNKSt6vectorIiSaIiEE4sizeEv>
mov %eax,-0x34(%rbp)
lea ... | _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 _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void)
mov [rbp+var_3C], eax
... | long long func0(long long a1)
{
int v1; // ebx
int v2; // ebx
int v4; // ebx
long long v5; // rax
unsigned int v6; // ebx
char v8; // [rsp+13h] [rbp-4Dh] BYREF
int v9; // [rsp+14h] [rbp-4Ch] BYREF
int i; // [rsp+18h] [rbp-48h]
int j; // [rsp+1Ch] [rbp-44h]
int k; // [rsp+20h] [rbp-40h]
int v13; /... | 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 0x001017c0
MOV dword ptr [RBP + -0x3c],EAX
LEA RAX,[RBP + -0x4d]
MOV qword ptr [RBP + -0x38],RAX
NOP
NOP
MOV ... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
int iVar1;
bool bVar2;
int *piVar3;
long in_FS_OFFSET;
allocator local_55;
int local_54;
int local_50;
int local_4c;
int local_48;
int local_44;
allocator *local_40;
vector<int,std::allocator<int>> local_38... |
2,189 | func0 |
#include <vector>
#include <algorithm>
#include <assert.h>
| int func0(const std::vector<int>& arr) {
int n = arr.size();
std::vector<int> lis(n, 1);
for (int i = 1; i < n; ++i) {
for (int j = 0; j < i; ++j) {
if (arr[i] > arr[j] && lis[i] < lis[j] + 1) {
lis[i] = lis[j] + 1;
}
}
}
... | int main() {
assert(func0({10, 22, 9, 33, 21, 50, 41, 60}) == 5);
assert(func0({3, 10, 2, 1, 20}) == 3);
assert(func0({50, 3, 10, 7, 40, 80}) == 4);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
mov 0x8(%rdi),%r12
sub (%rdi),%r12
sar $0x2,%r12
movslq %r12d,%rax
movabs $0x1fffffffffffffff,%rdx
cmp %rdx,%rax
ja ... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 18h
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
mov rbp, [rdi+8]
sub rbp, [rdi]
sar rbp, 2
movsxd r13, ebp
mov rax, r13
shr rax, 3Dh
jnz short loc_1281
mov rbx, rdi
mov ... | long long func0(long long *a1)
{
long long v1; // rbp
unsigned long long v2; // r13
int *v4; // rax
int *v5; // rdi
int *v6; // rdx
long long v7; // rdx
int v8; // r9d
unsigned long long v9; // rax
int v10; // ecx
long long v11; // rsi
_DWORD *v12; // r8
int *v13; // rax
int *v14; // rdx
un... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV RBP,qword ptr [RDI + 0x8]
SUB RBP,qword ptr [RDI]
SAR RBP,0x2
MOVSXD R13,EBP
MOV RAX,R13
SHR RAX,0x3d
JNZ 0x00101281
MOV RBX,RDI
MOV R12D,EBP
TEST R13,R13
JZ 0x001012e3
SHL R13,0x2
M... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
long lVar1;
int *piVar2;
long lVar3;
int *piVar4;
long lVar5;
int *piVar6;
int iVar7;
int iVar8;
ulong uVar9;
ulong uVar10;
long in_FS_OFFSET;
int local_34;
long local_30;
local_30 = *(long *)(in_FS_... |
2,190 | func0 |
#include <vector>
#include <algorithm>
#include <assert.h>
| int func0(const std::vector<int>& arr) {
int n = arr.size();
std::vector<int> lis(n, 1);
for (int i = 1; i < n; ++i) {
for (int j = 0; j < i; ++j) {
if (arr[i] > arr[j] && lis[i] < lis[j] + 1) {
lis[i] = lis[j] + 1;
}
}
}
... | int main() {
assert(func0({10, 22, 9, 33, 21, 50, 41, 60}) == 5);
assert(func0({3, 10, 2, 1, 20}) == 3);
assert(func0({50, 3, 10, 7, 40, 80}) == 4);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
movabs $0x1fffffffffffffff,%rdx
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov 0x8(%rdi),%rbp
sub (%rdi),%rbp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
sar $0x2,%rbp
movslq %ebp,%rax
cmp %rdx,%rax
ja 1... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov r12, [rdi+8]
sub r12, [rdi]
sar r12, 2
movsxd rbp, r12d
mov rax, rbp
shr rax, 3Dh
jnz loc_150D
xor ebx, ebx
test rbp, rbp
jz loc_1500
shl rbp, 2
mov r13, rdi
mov rdi, ... | long long func0(_QWORD *a1)
{
long long v1; // r12
int v2; // ebx
unsigned long long v3; // rbp
int *v5; // rax
int *v6; // rdi
int *v7; // rdx
long long v8; // r8
long long v9; // rdx
_DWORD *v10; // rsi
unsigned long long v11; // rax
int v12; // ecx
int *v13; // rax
long long v14; // rcx
... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV R12,qword ptr [RDI + 0x8]
SUB R12,qword ptr [RDI]
SAR R12,0x2
MOVSXD RBP,R12D
MOV RAX,RBP
SHR RAX,0x3d
JNZ 0x0010150d
XOR EBX,EBX
TEST RBP,RBP
JZ 0x00101500
SHL RBP,0x2
MOV R13,RDI
MOV RDI,RBP
CALL 0x001010e0
MOV RDI,RAX
LEA RDX,[RAX + RBP*0x1]
TEST BPL... | /* func0(std::vector<int, std::allocator<int> > const&) */
void * func0(vector *param_1)
{
int *piVar1;
void *pvVar2;
uint *puVar3;
long lVar4;
uint *puVar5;
void *extraout_RAX;
long lVar6;
uint uVar7;
ulong uVar8;
ulong uVar9;
int *piVar10;
char *pcVar11;
int iVar12;
iVar12 = (int)(*(l... |
2,191 | func0 |
#include <vector>
#include <algorithm>
#include <assert.h>
| int func0(const std::vector<int>& arr) {
int n = arr.size();
std::vector<int> lis(n, 1);
for (int i = 1; i < n; ++i) {
for (int j = 0; j < i; ++j) {
if (arr[i] > arr[j] && lis[i] < lis[j] + 1) {
lis[i] = lis[j] + 1;
}
}
}
... | int main() {
assert(func0({10, 22, 9, 33, 21, 50, 41, 60}) == 5);
assert(func0({3, 10, 2, 1, 20}) == 3);
assert(func0({50, 3, 10, 7, 40, 80}) == 4);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x10,%rsp
mov 0x8(%rdi),%rbp
sub (%rdi),%rbp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
sar $0x2,%rbp
movabs $0x1fffffffffffffff,%rax
movslq %ebp,%r13
cmp %rax,%... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov rbp, [rdi+8]
sub rbp, [rdi]
sar rbp, 2
movsxd r12, ebp
mov rax, r12
shr rax, 3Dh
jnz loc_15E4
xor ebx, ebx
test r12, r12
jz loc_15D1
shl r12, 2
mov r13, rdi
mov rdi, r... | long long func0(_QWORD *a1)
{
long long v1; // rbp
int v2; // ebx
unsigned long long v3; // r12
__m128i *v5; // rax
__m128i *v6; // rdi
char *v7; // r8
unsigned long long v8; // rdx
__m128i si128; // xmm0
long long v10; // rcx
__m128i *v11; // rsi
long long v12; // r8
long long v13; // rdx
_D... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RBP,qword ptr [RDI + 0x8]
SUB RBP,qword ptr [RDI]
SAR RBP,0x2
MOVSXD R12,EBP
MOV RAX,R12
SHR RAX,0x3d
JNZ 0x001015e4
XOR EBX,EBX
TEST R12,R12
JZ 0x001015d1
SHL R12,0x2
MOV R13,RDI
MOV RDI,R12
CALL 0x001010e0
MOV RDI,RAX
LEA R8,[RAX + R12*0x1]
LEA RAX,[R... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(std::vector<int, std::allocator<int> > const&) */
void * func0(vector *param_1)
{
int *piVar1;
void *pvVar2;
uint uVar3;
uint *puVar4;
uint *puVar5;
uint *puVar6;
int8 uVar7;
int8 uVar8;
uint uVar9;
uint ... |
2,192 | func0 |
#include <assert.h>
| long long func0(int n) {
long long j = 0;
long long sm = 0;
for (int i = 1; i <= n; i++) {
j = (2 * i - 1);
sm += (j * j * j * j * j);
}
return sm;
}
| int main() {
assert(func0(1) == 1);
assert(func0(2) == 244);
assert(func0(3) == 3369);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x24(%rbp)
movq $0x0,-0x8(%rbp)
movq $0x0,-0x10(%rbp)
movl $0x1,-0x14(%rbp)
mov -0x14(%rbp),%eax
cmp -0x24(%rbp),%eax
jg 11a2 <_Z5func0i+0x59>
mov -0x14(%rbp),%eax
add %eax,%eax
sub $0x1,%eax
cltq
mov %rax,-0x8(%rbp)
mov -0x8(%... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_24], edi
mov [rbp+var_8], 0
mov [rbp+var_10], 0
mov [rbp+var_14], 1
jmp short loc_119A
loc_116D:
mov eax, [rbp+var_14]
add eax, eax
sub eax, 1
cdqe
mov [rbp+var_8], rax
mov rax, [rbp+var_8]
imul rax, rax
imul rax,... | long long func0(int a1)
{
int i; // [rsp+10h] [rbp-14h]
long long v3; // [rsp+14h] [rbp-10h]
v3 = 0LL;
for ( i = 1; i <= a1; ++i )
v3 += (2 * i - 1) * (2 * i - 1) * (2 * i - 1) * (2 * i - 1) * (long long)(2 * i - 1);
return v3;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x24],EDI
MOV qword ptr [RBP + -0x8],0x0
MOV qword ptr [RBP + -0x10],0x0
MOV dword ptr [RBP + -0x14],0x1
JMP 0x0010119a
LAB_0010116d:
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,EAX
SUB EAX,0x1
CDQE
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x8]
IMUL ... | /* func0(int) */
long func0(int param_1)
{
long lVar1;
int4 local_1c;
int8 local_18;
local_18 = 0;
for (local_1c = 1; local_1c <= param_1; local_1c = local_1c + 1) {
lVar1 = (long)(local_1c * 2 + -1);
local_18 = local_18 + lVar1 * lVar1 * lVar1 * lVar1 * lVar1;
}
return local_18;
} |
2,193 | func0 |
#include <assert.h>
| long long func0(int n) {
long long j = 0;
long long sm = 0;
for (int i = 1; i <= n; i++) {
j = (2 * i - 1);
sm += (j * j * j * j * j);
}
return sm;
}
| int main() {
assert(func0(1) == 1);
assert(func0(2) == 244);
assert(func0(3) == 3369);
return 0;
}
| O1 | cpp | func0(int):
endbr64
test %edi,%edi
jle 1182 <_Z5func0i+0x39>
lea -0x1(%rdi),%eax
lea 0x3(%rax,%rax,1),%rsi
mov $0x1,%edx
mov $0x0,%ecx
mov %rdx,%rax
imul %rdx,%rax
imul %rax,%rax
imul %rdx,%rax
add %rax,%rcx
add $0x2,%rdx
cmp %rsi,%rdx
jne 1163 <_Z5func0i+0x1a>
mov %rcx,%rax
ret... | _Z5func0i:
endbr64
test edi, edi
jle short loc_1182
lea eax, [rdi-1]
lea rsi, [rax+rax+3]
mov edx, 1
mov ecx, 0
loc_1163:
mov rax, rdx
imul rax, rdx
imul rax, rax
imul rax, rdx
add rcx, rax
add rdx, 2
cmp rdx, rsi
jnz short loc_1163
loc_117E:
mov rax, rcx
retn
loc... | long long func0(int a1)
{
long long v1; // rdx
long long v2; // rcx
if ( a1 <= 0 )
return 0LL;
v1 = 1LL;
v2 = 0LL;
do
{
v2 += v1 * v1 * v1 * v1 * v1;
v1 += 2LL;
}
while ( v1 != 2LL * (unsigned int)(a1 - 1) + 3 );
return v2;
} | func0:
ENDBR64
TEST EDI,EDI
JLE 0x00101182
LEA EAX,[RDI + -0x1]
LEA RSI,[RAX + RAX*0x1 + 0x3]
MOV EDX,0x1
MOV ECX,0x0
LAB_00101163:
MOV RAX,RDX
IMUL RAX,RDX
IMUL RAX,RAX
IMUL RAX,RDX
ADD RCX,RAX
ADD RDX,0x2
CMP RDX,RSI
JNZ 0x00101163
LAB_0010117e:
MOV RAX,RCX
RET
LAB_00101182:
MOV ECX,0x0
JMP 0x0010117e | /* func0(int) */
long func0(int param_1)
{
long lVar1;
long lVar2;
if (param_1 < 1) {
lVar1 = 0;
}
else {
lVar2 = 1;
lVar1 = 0;
do {
lVar1 = lVar1 + lVar2 * lVar2 * lVar2 * lVar2 * lVar2;
lVar2 = lVar2 + 2;
} while (lVar2 != (ulong)(param_1 - 1) * 2 + 3);
}
return lVar... |
2,194 | func0 |
#include <assert.h>
| long long func0(int n) {
long long j = 0;
long long sm = 0;
for (int i = 1; i <= n; i++) {
j = (2 * i - 1);
sm += (j * j * j * j * j);
}
return sm;
}
| int main() {
assert(func0(1) == 1);
assert(func0(2) == 244);
assert(func0(3) == 3369);
return 0;
}
| O2 | cpp | func0(int):
endbr64
test %edi,%edi
jle 1180 <_Z5func0i+0x40>
lea -0x1(%rdi),%eax
mov $0x1,%edx
xor %r8d,%r8d
lea 0x3(%rax,%rax,1),%rcx
nopl 0x0(%rax,%rax,1)
mov %rdx,%rax
imul %rdx,%rax
imul %rax,%rax
imul %rdx,%rax
add $0x2,%rdx
add %rax,%r8
cmp %rcx,%rdx
jne 1160 <_Z5func0i+0x2... | _Z5func0i:
endbr64
test edi, edi
jle short loc_1230
lea eax, [rdi-1]
mov edx, 1
xor ecx, ecx
lea rsi, [rax+rax+3]
nop word ptr [rax+rax+00000000h]
loc_1210:
mov rax, rdx
imul rax, rdx
imul rax, rax
imul rax, rdx
add rdx, 2
add rcx, rax
cmp rdx, rsi
jnz short loc_1... | long long func0(int a1)
{
long long v1; // rdx
long long v2; // rcx
long long v3; // rax
if ( a1 <= 0 )
return 0LL;
v1 = 1LL;
v2 = 0LL;
do
{
v3 = v1 * v1 * v1 * v1 * v1;
v1 += 2LL;
v2 += v3;
}
while ( v1 != 2LL * (unsigned int)(a1 - 1) + 3 );
return v2;
} | func0:
ENDBR64
TEST EDI,EDI
JLE 0x00101230
LEA EAX,[RDI + -0x1]
MOV EDX,0x1
XOR ECX,ECX
LEA RSI,[RAX + RAX*0x1 + 0x3]
NOP word ptr [RAX + RAX*0x1]
LAB_00101210:
MOV RAX,RDX
IMUL RAX,RDX
IMUL RAX,RAX
IMUL RAX,RDX
ADD RDX,0x2
ADD RCX,RAX
CMP RDX,RSI
JNZ 0x00101210
MOV RAX,RCX
RET
LAB_00101230:
XOR ECX,ECX
MOV RAX,RCX
RET | /* func0(int) */
long func0(int param_1)
{
long lVar1;
long lVar2;
long lVar3;
if (0 < param_1) {
lVar3 = 1;
lVar2 = 0;
do {
lVar1 = lVar3 * lVar3 * lVar3 * lVar3 * lVar3;
lVar3 = lVar3 + 2;
lVar2 = lVar2 + lVar1;
} while (lVar3 != (ulong)(param_1 - 1) * 2 + 3);
return... |
2,195 | func0 |
#include <assert.h>
| long long func0(int n) {
long long j = 0;
long long sm = 0;
for (int i = 1; i <= n; i++) {
j = (2 * i - 1);
sm += (j * j * j * j * j);
}
return sm;
}
| int main() {
assert(func0(1) == 1);
assert(func0(2) == 244);
assert(func0(3) == 3369);
return 0;
}
| O3 | cpp | func0(int):
endbr64
test %edi,%edi
jle 1180 <_Z5func0i+0x40>
lea -0x1(%rdi),%eax
mov $0x1,%edx
xor %r8d,%r8d
lea 0x3(%rax,%rax,1),%rcx
nopl 0x0(%rax,%rax,1)
mov %rdx,%rax
imul %rdx,%rax
imul %rax,%rax
imul %rdx,%rax
add $0x2,%rdx
add %rax,%r8
cmp %rdx,%rcx
jne 1160 <_Z5func0i+0x2... | _Z5func0i:
endbr64
test edi, edi
jle short loc_1180
lea eax, [rdi-1]
mov edx, 1
xor ecx, ecx
lea rsi, [rax+rax+3]
nop word ptr [rax+rax+00000000h]
loc_1160:
mov rax, rdx
imul rax, rdx
imul rax, rax
imul rax, rdx
add rdx, 2
add rcx, rax
cmp rsi, rdx
jnz short loc_1... | long long func0(int a1)
{
long long v1; // rdx
long long v2; // rcx
long long v3; // rax
if ( a1 <= 0 )
return 0LL;
v1 = 1LL;
v2 = 0LL;
do
{
v3 = v1 * v1 * v1 * v1 * v1;
v1 += 2LL;
v2 += v3;
}
while ( 2LL * (unsigned int)(a1 - 1) + 3 != v1 );
return v2;
} | func0:
ENDBR64
TEST EDI,EDI
JLE 0x00101180
LEA EAX,[RDI + -0x1]
MOV EDX,0x1
XOR ECX,ECX
LEA RSI,[RAX + RAX*0x1 + 0x3]
NOP word ptr [RAX + RAX*0x1]
LAB_00101160:
MOV RAX,RDX
IMUL RAX,RDX
IMUL RAX,RAX
IMUL RAX,RDX
ADD RDX,0x2
ADD RCX,RAX
CMP RSI,RDX
JNZ 0x00101160
MOV RAX,RCX
RET
LAB_00101180:
XOR ECX,ECX
MOV RAX,RCX
RET | /* func0(int) */
long func0(int param_1)
{
long lVar1;
long lVar2;
long lVar3;
if (0 < param_1) {
lVar3 = 1;
lVar2 = 0;
do {
lVar1 = lVar3 * lVar3 * lVar3 * lVar3 * lVar3;
lVar3 = lVar3 + 2;
lVar2 = lVar2 + lVar1;
} while ((ulong)(param_1 - 1) * 2 + 3 != lVar3);
return... |
2,196 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int arr[], int low, int high) {
if (high < low)
return arr[0];
if (high == low)
return arr[low];
int mid = low + (high - low) / 2;
if (mid < high && arr[mid + 1] < arr[mid])
return arr[mid];
if (mid > low && arr[mid] < arr[mid - 1])
retu... | int main() {
int arr1[] = {2, 3, 5, 6, 9};
int arr2[] = {3, 4, 5, 2, 1};
int arr3[] = {1, 2, 3};
assert(func0(arr1, 0, 4) == 9);
assert(func0(arr2, 0, 4) == 5);
assert(func0(arr3, 0, 2) == 3);
return 0;
}
| O0 | cpp | func0(int*, int, int):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
mov %edx,-0x20(%rbp)
mov -0x20(%rbp),%eax
cmp -0x1c(%rbp),%eax
jge 11d2 <_Z5func0Piii+0x29>
mov -0x18(%rbp),%rax
mov (%rax),%eax
jmpq 1316 <_Z5func0Piii+0x16d>
mov -0x20(%... | _Z5func0Piii:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_20], edx
mov eax, [rbp+var_20]
cmp eax, [rbp+var_1C]
jge short loc_1192
mov rax, [rbp+var_18]
mov eax, [rax]
jmp locret_12D6
loc_1192:
mov eax, [rbp+var_20... | long long func0(int *a1, int a2, int a3)
{
int v4; // [rsp+1Ch] [rbp-4h]
if ( a3 < a2 )
return (unsigned int)*a1;
if ( a3 == a2 )
return (unsigned int)a1[a2];
v4 = (a3 - a2) / 2 + a2;
if ( v4 < a3 && a1[v4 + 1] < a1[v4] )
return (unsigned int)a1[v4];
if ( v4 > a2 && a1[v4] < a1[v4 - 1] )
r... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0x20],EDX
MOV EAX,dword ptr [RBP + -0x20]
CMP EAX,dword ptr [RBP + -0x1c]
JGE 0x00101192
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
JMP 0x001012d6
LAB_00101192:
MOV EAX,dwo... | /* func0(int*, int, int) */
ulong func0(int *param_1,int param_2,int param_3)
{
int iVar1;
ulong uVar2;
if (param_3 < param_2) {
uVar2 = (ulong)(uint)*param_1;
}
else if (param_3 == param_2) {
uVar2 = (ulong)(uint)param_1[param_2];
}
else {
iVar1 = param_2 + (param_3 - param_2) / 2;
i... |
2,197 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int arr[], int low, int high) {
if (high < low)
return arr[0];
if (high == low)
return arr[low];
int mid = low + (high - low) / 2;
if (mid < high && arr[mid + 1] < arr[mid])
return arr[mid];
if (mid > low && arr[mid] < arr[mid - 1])
retu... | int main() {
int arr1[] = {2, 3, 5, 6, 9};
int arr2[] = {3, 4, 5, 2, 1};
int arr3[] = {1, 2, 3};
assert(func0(arr1, 0, 4) == 9);
assert(func0(arr2, 0, 4) == 5);
assert(func0(arr3, 0, 2) == 3);
return 0;
}
| O1 | cpp | func0(int*, int, int):
endbr64
cmp %esi,%edx
jl 120b <_Z5func0Piii+0x62>
je 120e <_Z5func0Piii+0x65>
mov %edx,%eax
sub %esi,%eax
mov %eax,%ecx
shr $0x1f,%ecx
add %eax,%ecx
sar %ecx
add %esi,%ecx
cmp %ecx,%edx
jle 11d8 <_Z5func0Piii+0x2f>
movslq %ecx,%r8
add $0x1,%r8
mov -0x4(... | _Z5func0Piii:
endbr64
cmp edx, esi
jl short loc_11CD
mov ecx, edx
jz short loc_11D0
mov eax, edx
sub eax, esi
mov edx, eax
shr edx, 1Fh
add edx, eax
sar edx, 1
add edx, esi
cmp ecx, edx
jle short loc_119A
movsxd r8, edx
add r8, 1
mov eax, [rdi+r8*4-4]
cmp ... | long long func0(int *a1, int a2, int a3)
{
int v4; // edx
long long v5; // r8
long long result; // rax
if ( a3 < a2 )
return (unsigned int)*a1;
if ( a3 == a2 )
return (unsigned int)a1[a2];
v4 = a2 + (a3 - a2) / 2;
if ( a3 <= v4 || (v5 = v4 + 1LL, result = (unsigned int)a1[v5 - 1], a1[v5] >= (int... | func0:
ENDBR64
CMP EDX,ESI
JL 0x001011cd
MOV ECX,EDX
JZ 0x001011d0
MOV EAX,EDX
SUB EAX,ESI
MOV EDX,EAX
SHR EDX,0x1f
ADD EDX,EAX
SAR EDX,0x1
ADD EDX,ESI
CMP ECX,EDX
JLE 0x0010119a
MOVSXD R8,EDX
ADD R8,0x1
MOV EAX,dword ptr [RDI + R8*0x4 + -0x4]
CMP dword ptr [RDI + R8*0x4],EAX
JL 0x001011e3
LAB_0010119a:
CMP ESI,EDX
JGE... | /* func0(int*, int, int) */
ulong func0(int *param_1,int param_2,int param_3)
{
uint uVar1;
ulong uVar2;
int iVar3;
if (param_3 < param_2) {
return (ulong)(uint)*param_1;
}
if (param_3 != param_2) {
iVar3 = (param_3 - param_2) / 2 + param_2;
if (((param_3 <= iVar3) || (uVar1 = param_1[iVar3... |
2,198 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int arr[], int low, int high) {
if (high < low)
return arr[0];
if (high == low)
return arr[low];
int mid = low + (high - low) / 2;
if (mid < high && arr[mid + 1] < arr[mid])
return arr[mid];
if (mid > low && arr[mid] < arr[mid - 1])
retu... | int main() {
int arr1[] = {2, 3, 5, 6, 9};
int arr2[] = {3, 4, 5, 2, 1};
int arr3[] = {1, 2, 3};
assert(func0(arr1, 0, 4) == 9);
assert(func0(arr2, 0, 4) == 5);
assert(func0(arr3, 0, 2) == 3);
return 0;
}
| O2 | cpp | func0(int*, int, int):
endbr64
cmp %edx,%esi
jg 1372 <_Z5func0Piii+0x52>
nopl 0x0(%rax,%rax,1)
je 1388 <_Z5func0Piii+0x68>
mov %edx,%eax
sub %esi,%eax
sar %eax
add %esi,%eax
movslq %eax,%rcx
mov (%rdi,%rcx,4),%r8d
lea 0x0(,%rcx,4),%r9
cmp %edx,%eax
jge 1354 <_Z5func0Piii+0x34>
cmp ... | _Z5func0Piii:
endbr64
mov rcx, rdi
cmp esi, edx
jg short loc_12D0
nop dword ptr [rax+rax+00h]
loc_1290:
jz short loc_12F0
mov eax, edx
sub eax, esi
sar eax, 1
add eax, esi
movsxd rdi, eax
lea r8, ds:0[rdi*4]
mov edi, [rcx+rdi*4]
cmp eax, edx
jge short loc_12B3
cmp ... | long long func0(unsigned int *a1, int a2, int a3)
{
bool i; // zf
int v5; // eax
long long v6; // r8
int v7; // edi
int v9; // r8d
for ( i = a2 == a3; a3 >= a2; i = a3 == a2 )
{
if ( i )
return a1[a2];
v5 = a2 + ((a3 - a2) >> 1);
v6 = v5;
v7 = a1[v6];
if ( v5 < a3 && (int)a1[v6... | func0:
ENDBR64
MOV RCX,RDI
CMP ESI,EDX
JG 0x001012d0
NOP dword ptr [RAX + RAX*0x1]
LAB_00101290:
JZ 0x001012f0
MOV EAX,EDX
SUB EAX,ESI
SAR EAX,0x1
ADD EAX,ESI
MOVSXD RDI,EAX
LEA R8,[RDI*0x4]
MOV EDI,dword ptr [RCX + RDI*0x4]
CMP EAX,EDX
JGE 0x001012b3
CMP dword ptr [RCX + R8*0x1 + 0x4],EDI
JL 0x001012d2
LAB_001012b3:
C... | /* func0(int*, int, int) */
int func0(int *param_1,int param_2,int param_3)
{
int iVar1;
int iVar2;
bool bVar3;
bVar3 = param_2 == param_3;
if (param_2 <= param_3) {
do {
if (bVar3) {
return param_1[param_2];
}
iVar2 = (param_3 - param_2 >> 1) + param_2;
iVar1 = param_... |
2,199 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int arr[], int low, int high) {
if (high < low)
return arr[0];
if (high == low)
return arr[low];
int mid = low + (high - low) / 2;
if (mid < high && arr[mid + 1] < arr[mid])
return arr[mid];
if (mid > low && arr[mid] < arr[mid - 1])
retu... | int main() {
int arr1[] = {2, 3, 5, 6, 9};
int arr2[] = {3, 4, 5, 2, 1};
int arr3[] = {1, 2, 3};
assert(func0(arr1, 0, 4) == 9);
assert(func0(arr2, 0, 4) == 5);
assert(func0(arr3, 0, 2) == 3);
return 0;
}
| O3 | cpp | func0(int*, int, int):
endbr64
cmp %edx,%esi
jg 1362 <_Z5func0Piii+0x52>
nopl 0x0(%rax,%rax,1)
je 1378 <_Z5func0Piii+0x68>
mov %edx,%eax
sub %esi,%eax
sar %eax
add %esi,%eax
movslq %eax,%rcx
mov (%rdi,%rcx,4),%r8d
lea 0x0(,%rcx,4),%r9
cmp %edx,%eax
jge 1344 <_Z5func0Piii+0x34>
cmp ... | _Z5func0Piii:
endbr64
mov rcx, rdi
cmp esi, edx
jg short loc_12D0
nop dword ptr [rax+rax+00h]
loc_1290:
jz short loc_12F0
mov eax, edx
sub eax, esi
sar eax, 1
add eax, esi
movsxd rdi, eax
lea r8, ds:0[rdi*4]
mov edi, [rcx+rdi*4]
cmp eax, edx
jge short loc_12B3
cmp ... | long long func0(unsigned int *a1, int a2, int a3)
{
bool i; // zf
int v5; // eax
long long v6; // r8
int v7; // edi
int v9; // r8d
for ( i = a2 == a3; a3 >= a2; i = a3 == a2 )
{
if ( i )
return a1[a2];
v5 = a2 + ((a3 - a2) >> 1);
v6 = v5;
v7 = a1[v6];
if ( v5 < a3 && (int)a1[v6... | func0:
ENDBR64
MOV RCX,RDI
CMP ESI,EDX
JG 0x001012d0
NOP dword ptr [RAX + RAX*0x1]
LAB_00101290:
JZ 0x001012f0
MOV EAX,EDX
SUB EAX,ESI
SAR EAX,0x1
ADD EAX,ESI
MOVSXD RDI,EAX
LEA R8,[RDI*0x4]
MOV EDI,dword ptr [RCX + RDI*0x4]
CMP EAX,EDX
JGE 0x001012b3
CMP dword ptr [RCX + R8*0x1 + 0x4],EDI
JL 0x001012d2
LAB_001012b3:
C... | /* func0(int*, int, int) */
int func0(int *param_1,int param_2,int param_3)
{
int iVar1;
int iVar2;
bool bVar3;
bVar3 = param_2 == param_3;
if (param_2 <= param_3) {
do {
if (bVar3) {
return param_1[param_2];
}
iVar2 = (param_3 - param_2 >> 1) + param_2;
iVar1 = param_... |
2,200 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(std::vector<std::vector<int>>& list1, int n) {
std::vector<int> result;
for (auto& i : list1) {
if (n < i.size()) {
result.push_back(i[n]);
i.erase(i.begin() + n);
}
}
return result;
}
| int main() {
std::vector<std::vector<int>> list1 = {{1, 2, 3}, {2, 4, 5}, {1, 1, 1}};
std::vector<std::vector<int>> list2 = {{1, 2, 3}, {-2, 4, -5}, {1, -1, 1}};
std::vector<std::vector<int>> list3 = {{1, 3}, {5, 7}, {1, 3}, {13, 15, 17}, {5, 7}, {9, 11}};
assert((func0(list1, 0) == std::vecto... | O0 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x68,%rsp
mov %rdi,-0x58(%rbp)
mov %rsi,-0x60(%rbp)
mov %edx,-0x64(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,... | _Z5func0RSt6vectorIS_IiSaIiEESaIS1_EEi:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 68h
mov [rbp+var_58], rdi
mov [rbp+var_60], rsi
mov [rbp+var_64], edx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_58]
mov rdi, rax
call _ZNSt6vectorIiSaIiEEC2... | long long func0(long long a1, long long a2, int a3)
{
long long v3; // rax
long long v6; // [rsp+20h] [rbp-50h] BYREF
long long v7; // [rsp+28h] [rbp-48h] BYREF
long long v8; // [rsp+30h] [rbp-40h] BYREF
long long v9; // [rsp+38h] [rbp-38h] BYREF
_QWORD v10[2]; // [rsp+40h] [rbp-30h] BYREF
long long v11;... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x68
MOV qword ptr [RBP + -0x58],RDI
MOV qword ptr [RBP + -0x60],RSI
MOV dword ptr [RBP + -0x64],EDX
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 0x001022be
MOV RAX,qword ptr [RBP + -0x60]
MO... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > >&, int) */
vector * func0(vector *param_1,int param_2)
{
bool bVar1;
ulong uVar2;
int *piVar3;
int in_EDX;
int4 in_register_00000034;
long in_FS_OFFSET;
int8 local_58;
int8 local_50... |
2,201 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(std::vector<std::vector<int>>& list1, int n) {
std::vector<int> result;
for (auto& i : list1) {
if (n < i.size()) {
result.push_back(i[n]);
i.erase(i.begin() + n);
}
}
return result;
}
| int main() {
std::vector<std::vector<int>> list1 = {{1, 2, 3}, {2, 4, 5}, {1, 1, 1}};
std::vector<std::vector<int>> list2 = {{1, 2, 3}, {-2, 4, -5}, {1, -1, 1}};
std::vector<std::vector<int>> list3 = {{1, 3}, {5, 7}, {1, 3}, {13, 15, 17}, {5, 7}, {9, 11}};
assert((func0(list1, 0) == std::vecto... | O1 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<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,%r12
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
mov (%rsi),%rbx... | _Z5func0RSt6vectorIS_IiSaIiEESaIS1_EEi:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov r12, rdi
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
mov rbx, [rsi]
mov r14, [rsi+8]
cmp r14, rbx
jz loc_139D
movsxd ... | _QWORD * func0(_QWORD *a1, long long a2, int a3)
{
_QWORD *v4; // rbx
_QWORD *v5; // r14
unsigned long long v6; // r13
long long v7; // r15
_DWORD *v8; // rdx
_DWORD *v9; // rsi
_DWORD *v10; // rdi
char *v11; // rdx
_BYTE *v12; // rsi
signed long long v13; // rdx
*a1 = 0LL;
a1[1] = 0LL;
a1[2]... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV R12,RDI
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV RBX,qword ptr [RSI]
MOV R14,qword ptr [RSI + 0x8]
CMP R14,RBX
JZ 0x0010139d
MOVSXD R13,EDX
LEA R15,[R13*0x4]
JMP 0x0010132c
LAB_00101312:
... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > >&, int) */
vector * func0(vector *param_1,int param_2)
{
int4 *__src;
long lVar1;
long *plVar2;
int *piVar3;
int in_EDX;
int *piVar4;
size_t __n;
long *plVar5;
int4 in_register_00... |
2,202 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(std::vector<std::vector<int>>& list1, int n) {
std::vector<int> result;
for (auto& i : list1) {
if (n < i.size()) {
result.push_back(i[n]);
i.erase(i.begin() + n);
}
}
return result;
}
| int main() {
std::vector<std::vector<int>> list1 = {{1, 2, 3}, {2, 4, 5}, {1, 1, 1}};
std::vector<std::vector<int>> list2 = {{1, 2, 3}, {-2, 4, -5}, {1, -1, 1}};
std::vector<std::vector<int>> list3 = {{1, 3}, {5, 7}, {1, 3}, {13, 15, 17}, {5, 7}, {9, 11}};
assert((func0(list1, 0) == std::vecto... | O2 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&, int):
endbr64
push %r15
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x28,%rsp
mov 0x8(%rsi),%r14
mov (%rsi),%rbx
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)... | _Z5func0RSt6vectorIS_IiSaIiEESaIS1_EEi:
endbr64
push r14
pxor xmm0, xmm0
push r13
push r12
push rbp
mov rbp, rdi
push rbx
mov r13, [rsi+8]
mov rbx, [rsi]
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
cmp r13, rbx
jz loc_1B9F
movsxd r12, edx
lea r14, ds:0[r12*... | long long func0(long long a1, long long a2, int a3)
{
_QWORD *v4; // r13
_QWORD *v5; // rbx
unsigned long long v6; // r12
long long v7; // r14
long long v8; // rsi
_DWORD *v9; // rdx
long long v10; // rsi
char *v11; // rax
_DWORD *v12; // rdi
_BYTE *v13; // rsi
v4 = *(_QWORD **)(a2 + 8);
v5 = ... | func0:
ENDBR64
PUSH R14
PXOR XMM0,XMM0
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
MOV R13,qword ptr [RSI + 0x8]
MOV RBX,qword ptr [RSI]
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
CMP R13,RBX
JZ 0x00101b9f
MOVSXD R12,EDX
LEA R14,[R12*0x4]
JMP 0x00101b39
LAB_00101b30:
ADD RBX,0x18
CMP R13,RBX
JZ 0x... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > >&, int) */
vector * func0(vector *param_1,int param_2)
{
int4 *__src;
long lVar1;
long *plVar2;
int *piVar3;
int4 *puVar4;
int in_EDX;
int *piVar5;
size_t __n;
long *plVar6;
lon... |
2,203 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(std::vector<std::vector<int>>& list1, int n) {
std::vector<int> result;
for (auto& i : list1) {
if (n < i.size()) {
result.push_back(i[n]);
i.erase(i.begin() + n);
}
}
return result;
}
| int main() {
std::vector<std::vector<int>> list1 = {{1, 2, 3}, {2, 4, 5}, {1, 1, 1}};
std::vector<std::vector<int>> list2 = {{1, 2, 3}, {-2, 4, -5}, {1, -1, 1}};
std::vector<std::vector<int>> list3 = {{1, 3}, {5, 7}, {1, 3}, {13, 15, 17}, {5, 7}, {9, 11}};
assert((func0(list1, 0) == std::vecto... | O3 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<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 $0x28,%rsp
mov 0x8(%rsi),%r14
mov (%rsi),%rbx
movups %xmm0,(%rdi)
m... | _Z5func0RSt6vectorIS_IiSaIiEESaIS1_EEi:
endbr64
push r14
pxor xmm0, xmm0
push r13
push r12
push rbp
mov rbp, rdi
push rbx
mov r13, [rsi+8]
mov rbx, [rsi]
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
cmp r13, rbx
jz loc_1C4F
movsxd r12, edx
lea r14, ds:0[r12*... | long long func0(long long a1, long long a2, int a3)
{
_QWORD *v4; // r13
_QWORD *v5; // rbx
unsigned long long v6; // r12
long long v7; // r14
long long v8; // rsi
_DWORD *v9; // rdx
long long v10; // rsi
char *v11; // rax
_DWORD *v12; // rdi
_BYTE *v13; // rsi
v4 = *(_QWORD **)(a2 + 8);
v5 = ... | func0:
ENDBR64
PUSH R14
PXOR XMM0,XMM0
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
MOV R13,qword ptr [RSI + 0x8]
MOV RBX,qword ptr [RSI]
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
CMP R13,RBX
JZ 0x00101c4f
MOVSXD R12,EDX
LEA R14,[R12*0x4]
JMP 0x00101be9
LAB_00101be0:
ADD RBX,0x18
CMP R13,RBX
JZ 0x... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > >&, int) */
vector * func0(vector *param_1,int param_2)
{
int4 *__src;
long lVar1;
long *plVar2;
int *piVar3;
int4 *puVar4;
int in_EDX;
int *piVar5;
size_t __n;
long *plVar6;
lon... |
2,204 | func0 |
#include <vector>
#include <string>
#include <set>
#include <cassert>
| std::string func0(const std::vector<int>& seq_nums) {
std::vector<int> differences;
for (int x = 1; x < seq_nums.size(); ++x) {
differences.push_back(seq_nums[x] - seq_nums[x - 1]);
}
std::set<int> diff_set(differences.begin(), differences.end());
if (diff_set.size() == 1) {
r... | int main() {
assert(func0({0, 2, 4, 6, 8, 10}) == "Linear Sequence");
assert(func0({1, 2, 3}) == "Linear Sequence");
assert(func0({1, 5, 2}) == "Non Linear Sequence");
return 0;
}
| O0 | cpp | func0[abi:cxx11](std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x88,%rsp
mov %rdi,-0x88(%rbp)
mov %rsi,-0x90(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x70(%rbp),%rax
mov %rax,%rdi
callq 2b76 <_ZNSt6vectorIiSaIiEEC1Ev... | _Z5func0B5cxx11RKSt6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 98h
mov [rbp+var_98], rdi
mov [rbp+var_A0], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_70]
mov rdi, rax
call _ZNSt6vectorIiSaIiEEC2Ev; std::vector<int>::vector(v... | long long func0[abi:cxx11](long long a1, long long a2)
{
int v2; // ebx
long long v3; // rbx
long long v4; // rax
char v6; // [rsp+1Bh] [rbp-85h] BYREF
int i; // [rsp+1Ch] [rbp-84h]
char *v8; // [rsp+20h] [rbp-80h]
char *v9; // [rsp+28h] [rbp-78h]
_BYTE v10[32]; // [rsp+30h] [rbp-70h] BYREF
_DWORD v1... | func0[abi:cxx11]:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x98
MOV qword ptr [RBP + -0x98],RDI
MOV qword ptr [RBP + -0xa0],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x70]
MOV RDI,RAX
CALL 0x00102cdc
MOV dword ptr [RBP + -0x84],0x1
JMP 0x0010252c
LAB_001024ce:
MOV ... | /* func0[abi:cxx11](std::vector<int, std::allocator<int> > const&) */
vector * func0_abi_cxx11_(vector *param_1)
{
int iVar1;
__normal_iterator _Var2;
__normal_iterator _Var3;
int *piVar4;
ulong uVar5;
long lVar6;
ulong uVar7;
vector<int,std::allocator<int>> *in_RSI;
long in_FS_OFFSET;
allocator l... |
2,205 | func0 |
#include <vector>
#include <string>
#include <set>
#include <cassert>
| std::string func0(const std::vector<int>& seq_nums) {
std::vector<int> differences;
for (int x = 1; x < seq_nums.size(); ++x) {
differences.push_back(seq_nums[x] - seq_nums[x - 1]);
}
std::set<int> diff_set(differences.begin(), differences.end());
if (diff_set.size() == 1) {
r... | int main() {
assert(func0({0, 2, 4, 6, 8, 10}) == "Linear Sequence");
assert(func0({1, 2, 3}) == "Linear Sequence");
assert(func0({1, 5, 2}) == "Non Linear Sequence");
return 0;
}
| O1 | cpp | func0[abi:cxx11](std::vector<int, std::allocator<int> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x78,%rsp
mov %rdi,0x8(%rsp)
mov %fs:0x28,%rax
mov %rax,0x68(%rsp)
xor %eax,%eax
movq $0x0,0x10(%rsp)
movq $0x0,0x18(%rsp)
movq $0x0,0x20(%rsp)
mov ... | _Z5func0B5cxx11RKSt6vectorIiSaIiEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 78h
mov [rsp+0A8h+var_A8], rdi
mov rax, fs:28h
mov [rsp+0A8h+var_40], rax
xor eax, eax
mov [rsp+0A8h+var_98], 0
mov [rsp+0A8h+var_90], 0
mov [rsp+0A8h+var_88], 0
m... | _QWORD * func0[abi:cxx11](_QWORD *a1, long long *a2)
{
long long v2; // rdx
unsigned long long v4; // rbx
int v5; // eax
int *v6; // rsi
int *v7; // r14
int *v8; // rbp
long long insert_hint_unique_pos; // rax
int *v10; // rdx
int *v11; // rbx
bool v12; // r12
long long v13; // rax
int *v15; // ... | func0[abi:cxx11]:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x78
MOV qword ptr [RSP],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x68],RAX
XOR EAX,EAX
MOV qword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x0
MOV RDX,qword ptr [RSI]
MOV RAX,qword p... | /* func0[abi:cxx11](std::vector<int, std::allocator<int> > const&) */
vector * func0_abi_cxx11_(vector *param_1)
{
int *piVar1;
_Rb_tree_node_base *p_Var2;
long lVar3;
_Rb_tree_node_base *p_Var4;
ulong uVar5;
int *piVar6;
long *in_RSI;
bool bVar7;
long in_FS_OFFSET;
bool bVar8;
int auVar9 [16];
... |
2,206 | func0 |
#include <vector>
#include <string>
#include <set>
#include <cassert>
| std::string func0(const std::vector<int>& seq_nums) {
std::vector<int> differences;
for (int x = 1; x < seq_nums.size(); ++x) {
differences.push_back(seq_nums[x] - seq_nums[x - 1]);
}
std::set<int> diff_set(differences.begin(), differences.end());
if (diff_set.size() == 1) {
r... | int main() {
assert(func0({0, 2, 4, 6, 8, 10}) == "Linear Sequence");
assert(func0({1, 2, 3}) == "Linear Sequence");
assert(func0({1, 5, 2}) == "Non Linear Sequence");
return 0;
}
| O2 | cpp | func0[abi:cxx11](std::vector<int, std::allocator<int> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
mov %rsi,%r12
push %rbp
push %rbx
sub $0x78,%rsp
mov (%rsi),%rdx
mov 0x8(%rsi),%rsi
mov %rdi,0x8(%rsp)
mov %fs:0x28,%rax
mov %rax,0x68(%rsp)
xor %eax,%eax
mov %rsi,%rax... | _Z5func0B5cxx11RKSt6vectorIiSaIiEE:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 88h
mov rcx, [rsi+8]
mov rdx, [rsi]
mov [rsp+0B8h+var_A8], rdi
mov rax, fs:28h
mov [rsp+0B8h+var_40], rax
xor eax, eax
mov rax, rcx
movaps [rsp... | _QWORD * func0[abi:cxx11](_QWORD *a1, long long *a2)
{
long long v2; // rcx
long long v3; // rdx
long long v5; // rbp
int *v6; // rsi
int *v7; // rbx
int v8; // eax
int *v9; // r12
long long v10; // r13
int v11; // r15d
int *v12; // rbp
long long insert_unique_pos; // rax
int *v14; // rdx
bool... | func0[abi:cxx11]:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x88
MOV RCX,qword ptr [RSI + 0x8]
MOV RDX,qword ptr [RSI]
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x78],RAX
XOR EAX,EAX
MOV RAX,RCX
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOV qwo... | /* func0[abi:cxx11](std::vector<int, std::allocator<int> > const&) */
vector * func0_abi_cxx11_(vector *param_1)
{
uint uVar1;
void *pvVar2;
void *pvVar3;
_Rb_tree_node_base *p_Var4;
long lVar5;
long lVar6;
uint *puVar7;
ulong uVar8;
_Rb_tree_node_base *p_Var9;
long *in_RSI;
uint *puVar10;
lon... |
2,207 | func0 |
#include <vector>
#include <string>
#include <set>
#include <cassert>
| std::string func0(const std::vector<int>& seq_nums) {
std::vector<int> differences;
for (int x = 1; x < seq_nums.size(); ++x) {
differences.push_back(seq_nums[x] - seq_nums[x - 1]);
}
std::set<int> diff_set(differences.begin(), differences.end());
if (diff_set.size() == 1) {
r... | int main() {
assert(func0({0, 2, 4, 6, 8, 10}) == "Linear Sequence");
assert(func0({1, 2, 3}) == "Linear Sequence");
assert(func0({1, 5, 2}) == "Non Linear Sequence");
return 0;
}
| O3 | cpp | func0[abi:cxx11](std::vector<int, std::allocator<int> > const&):
endbr64
push %r15
pxor %xmm0,%xmm0
push %r14
push %r13
mov %rdi,%r13
push %r12
push %rbp
push %rbx
sub $0x78,%rsp
mov 0x8(%rsi),%rcx
mov (%rsi),%rdx
mov %fs:0x28,%rax
mov %rax,0x68(%rsp)
xor %eax,%eax
movaps %xmm0,0x10(%... | _Z5func0B5cxx11RKSt6vectorIiSaIiEE:
endbr64
push r15
pxor xmm0, xmm0
mov r15, rdi
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 88h
mov rcx, [rsi+8]
mov rdx, [rsi]
mov rax, fs:28h
mov [rsp+0B8h+var_40], rax
xor eax, eax
movaps [rsp+0B8h+var_98], xmm0
mov [rs... | char * func0[abi:cxx11](char *a1, long long *a2)
{
long long v3; // rcx
long long v4; // rdx
long long v6; // rbx
int *v7; // rsi
int *v8; // rbp
int v9; // eax
int *v10; // r12
long long v11; // r13
int v12; // ecx
int *v13; // rbx
bool v14; // r13
long long v15; // rax
long long v16; // rax
... | func0[abi:cxx11]:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
MOV R15,RDI
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x88
MOV RCX,qword ptr [RSI + 0x8]
MOV RDX,qword ptr [RSI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x78],RAX
XOR EAX,EAX
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOV qword ptr [RSP + 0x30],0x0
MOV RAX... | /* func0[abi:cxx11](std::vector<int, std::allocator<int> > const&) */
vector * func0_abi_cxx11_(vector *param_1)
{
int iVar1;
int8 uVar2;
int8 uVar3;
_Rb_tree_node_base *p_Var4;
char *pcVar5;
long lVar6;
long lVar7;
int iVar8;
ulong uVar9;
_Rb_tree_node_base *p_Var10;
int *piVar11;
long *in_RS... |
2,208 | func0 |
#include <iostream>
#include <sstream>
#include <string>
#include <assert.h>
| float func0(int a, int b) {
std::ostringstream oss;
oss << a << "." << b;
return std::stof(oss.str());
}
| int main() {
assert(func0(4, 56) == 4.56f);
assert(func0(7, 256) == 7.256f);
assert(func0(8, 123) == 8.123f);
return 0;
}
| O0 | cpp | func0(int, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x1b8,%rsp
mov %edi,-0x1b4(%rbp)
mov %esi,-0x1b8(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x190(%rbp),%rax
mov %rax,%rdi
callq 11d0 <_ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev@plt... | _Z5func0ii:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 1B8h
mov [rbp+var_1B4], edi
mov [rbp+var_1B8], esi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_190]
mov rdi, rax
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::... | unsigned long long func0(unsigned int a1, unsigned int a2)
{
long long v2; // rax
long long v3; // rax
_BYTE v5[32]; // [rsp+10h] [rbp-1B0h] BYREF
_BYTE v6[376]; // [rsp+30h] [rbp-190h] BYREF
unsigned long long v7; // [rsp+1A8h] [rbp-18h]
v7 = __readfsqword(0x28u);
std::ostringstream::basic_ostringstrea... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x1b8
MOV dword ptr [RBP + -0x1b4],EDI
MOV dword ptr [RBP + -0x1b8],ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x190]
MOV RDI,RAX
LAB_001012fe:
CALL 0x001011a0
MOV EDX,dword ptr [RBP + -0x1b4]
LEA RAX,[RBP + -0x190]
MO... | /* func0(int, int) */
void func0(int param_1,int param_2)
{
ostream *poVar1;
long in_FS_OFFSET;
int4 uVar2;
string local_1b8 [32];
ostringstream local_198 [376];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
std::ostringstream::ostringstream(local_198);
/* try { // t... |
2,209 | func0 |
#include <iostream>
#include <sstream>
#include <string>
#include <assert.h>
| float func0(int a, int b) {
std::ostringstream oss;
oss << a << "." << b;
return std::stof(oss.str());
}
| int main() {
assert(func0(4, 56) == 4.56f);
assert(func0(7, 256) == 7.256f);
assert(func0(8, 123) == 8.123f);
return 0;
}
| O1 | cpp | func0(int, int):
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x1c0,%rsp
mov %edi,%ebx
mov %esi,%r12d
mov %fs:0x28,%rax
mov %rax,0x1b8(%rsp)
xor %eax,%eax
lea 0x40(%rsp),%r14
lea 0xb0(%rsp),%rdi
callq 11a0 <_ZNSt8ios_baseC2Ev@plt>
lea 0x279b(%rip),%rax
mov %rax... | _Z5func0ii:
endbr64
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 1C0h
mov ebx, edi
mov r13d, esi
mov rax, fs:28h
mov [rsp+1E8h+var_30], rax
xor eax, eax
lea r14, [rsp+1E8h+var_1A8]
lea rdi, [rsp+1E8h+var_138]; this
call __ZNSt8ios_baseC2Ev; std::ios_base::ios_b... | float func0(unsigned int a1, unsigned int a2)
{
long long v2; // rbx
unsigned long long v3; // r8
const char *v4; // r13
int *v5; // rbx
int v6; // r14d
struct _Unwind_Exception *v8; // rbp
float v9; // [rsp+Ch] [rbp-1DCh]
char *endptr; // [rsp+18h] [rbp-1D0h] BYREF
char *nptr[2]; // [rsp+20h] [rbp-1... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x1c0
MOV EBX,EDI
MOV R13D,ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x1b8],RAX
XOR EAX,EAX
LEA R14,[RSP + 0x40]
LEA RDI,[RSP + 0xb0]
CALL 0x00101190
LEA RAX,[0x103b98]
MOV qword ptr [RSP + 0xb0],RAX
MOV qword ptr [RSP + 0x188],0x0
MOV byte ... | /* func0(int, int) */
float func0(int param_1,int param_2)
{
int iVar1;
int8 uVar2;
char *__nptr;
ostream *this;
int *piVar3;
int8 uVar4;
long in_FS_OFFSET;
float fVar5;
char *local_1d0;
char *local_1c8;
int8 local_1c0;
char local_1b8;
int7 uStack_1b7;
long local_1a8 [8];
locale local_16... |
2,210 | func0 |
#include <iostream>
#include <sstream>
#include <string>
#include <assert.h>
| float func0(int a, int b) {
std::ostringstream oss;
oss << a << "." << b;
return std::stof(oss.str());
}
| int main() {
assert(func0(4, 56) == 4.56f);
assert(func0(7, 256) == 7.256f);
assert(func0(8, 123) == 8.123f);
return 0;
}
| O2 | cpp | func0(int, int):
endbr64
push %r15
mov %esi,%r15d
push %r14
mov %edi,%r14d
push %r13
push %r12
push %rbp
push %rbx
sub $0x1c8,%rsp
mov %fs:0x28,%rax
mov %rax,0x1b8(%rsp)
xor %eax,%eax
lea 0xb0(%rsp),%rbp
lea 0x40(%rsp),%r12
mov %rbp,%rdi
callq 11a0 <_ZNSt8ios_baseC2Ev@plt>
lea ... | _Z5func0ii:
endbr64
push r15
push r14
push r13
push r12
mov r12d, esi
push rbp
lea rbp, unk_3C38
push rbx
movq xmm1, rbp
mov ebx, edi
sub rsp, 1E8h
mov rax, fs:28h
mov [rsp+218h+var_40], rax
xor eax, eax
lea r13, [rsp+218h+var_148]
movhps xmm1, cs:off_3D10
lea r... | float func0(unsigned int a1, unsigned int a2)
{
_QWORD *v3; // rdi
__m128i si128; // xmm1
long long v5; // rbx
long long v6; // r8
int *v7; // rax
const char *v8; // rbp
int *v9; // rbx
__m128i v10; // xmm4
std::locale *v12[2]; // [rsp+0h] [rbp-218h] BYREF
__m128i v13; // [rsp+10h] [rbp-208h] BYREF... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
MOV R12D,ESI
PUSH RBP
LEA RBP,[0x103c38]
PUSH RBX
MOVQ XMM1,RBP
MOV EBX,EDI
SUB RSP,0x1e8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x1d8],RAX
XOR EAX,EAX
LEA R13,[RSP + 0xd0]
MOVHPS XMM1,qword ptr [0x00103d10]
LEA R15,[RSP + 0x60]
MOV RDI,R13
MOV qword ptr [RSP... | /* func0(int, int) */
void func0(int param_1,int param_2)
{
int iVar1;
pointer_____offset_0x10___ puVar2;
char *pcVar3;
ostream *this;
int *piVar4;
streambuf *psVar5;
long in_FS_OFFSET;
char *local_1e0;
char *local_1d8;
int8 local_1d0;
char local_1c8;
int7 uStack_1c7;
pointer_____offset_0x10... |
2,211 | func0 |
#include <iostream>
#include <sstream>
#include <string>
#include <assert.h>
| float func0(int a, int b) {
std::ostringstream oss;
oss << a << "." << b;
return std::stof(oss.str());
}
| int main() {
assert(func0(4, 56) == 4.56f);
assert(func0(7, 256) == 7.256f);
assert(func0(8, 123) == 8.123f);
return 0;
}
| O3 | cpp | func0(int, int):
endbr64
push %r15
mov %esi,%r15d
push %r14
mov %edi,%r14d
push %r13
push %r12
push %rbp
push %rbx
sub $0x1c8,%rsp
mov %fs:0x28,%rax
mov %rax,0x1b8(%rsp)
xor %eax,%eax
lea 0xb0(%rsp),%rbp
lea 0x40(%rsp),%r12
mov %rbp,%rdi
callq 21a0 <_ZNSt8ios_baseC2Ev@plt>
lea ... | _Z5func0ii:
endbr64
push r15
lea r15, unk_3B90
push r14
push r13
mov r13d, esi
push r12
lea r12, unk_3C38
push rbp
movq xmm1, r12
mov ebp, edi
push rbx
sub rsp, 1F8h
mov rax, fs:28h
mov [rsp+228h+var_40], rax
xor eax, eax
lea rax, [rsp+228h+var_148]
movhps xmm1,... | float func0(unsigned int a1, unsigned int a2)
{
_QWORD *v3; // rdi
__m128i si128; // xmm1
long long v5; // rbp
long long v6; // r8
int *v7; // rax
const char *v8; // r12
int *v9; // rbp
__m128i v10; // xmm4
std::locale *v12[2]; // [rsp+10h] [rbp-218h] BYREF
__m128i v13; // [rsp+20h] [rbp-208h] BYRE... | func0:
ENDBR64
PUSH R15
LEA R15,[0x103b90]
PUSH R14
PUSH R13
MOV R13D,ESI
PUSH R12
LEA R12,[0x103c38]
PUSH RBP
MOVQ XMM1,R12
MOV EBP,EDI
PUSH RBX
SUB RSP,0x1f8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x1e8],RAX
XOR EAX,EAX
LEA RAX,[RSP + 0xe0]
MOVHPS XMM1,qword ptr [0x00103d10]
LEA R14,[RSP + 0x70]
MOV RDI,RAX... | /* func0(int, int) */
void func0(int param_1,int param_2)
{
int iVar1;
int8 uVar2;
pointer_____offset_0x10___ puVar3;
char *pcVar4;
ostream *this;
int *piVar5;
streambuf *psVar6;
long in_FS_OFFSET;
char *local_1e0;
char *local_1d8;
int8 local_1d0;
char local_1c8;
int7 uStack_1c7;
pointer__... |
2,212 | func0 | #include <vector>
#include <assert.h>
| std::vector<int> func0(const std::vector<int>& list) {
std::vector<int> od_li;
for (int i : list) {
if (i % 2 != 0) {
od_li.push_back(i);
}
}
return od_li;
}
| int main() {
assert(func0({1,2,3,4,5,6}) == std::vector<int>({1,3,5}));
assert(func0({10,11,12,13}) == std::vector<int>({11,13}));
assert(func0({7,8,9,1}) == std::vector<int>({7,9,1}));
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&):
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 1990 <_ZNSt6vectorIiSaIiEEC1Ev>
mov -0... | _Z5func0RKSt6vectorIiSaIiEE:
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)
mo... | long long func0(long long a1, long long a2)
{
int v3; // [rsp+1Ch] [rbp-34h] BYREF
long long v4; // [rsp+20h] [rbp-30h] BYREF
_QWORD v5[4]; // [rsp+28h] [rbp-28h] BYREF
v5[2] = __readfsqword(0x28u);
std::vector<int>::vector(a1);
v5[1] = a2;
v4 = std::vector<int>::begin(a2);
v5[0] = std::vector<int>::e... | 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 0x00101a14
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x20],RAX
MO... | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
bool bVar1;
uint *puVar2;
vector<int,std::allocator<int>> *in_RSI;
long in_FS_OFFSET;
uint local_3c;
int8 local_38;
int8 local_30;
vector<int,std::allocator<int>> *local_28;
long local_20;
local_20 = *(... |
2,213 | func0 | #include <vector>
#include <assert.h>
| std::vector<int> func0(const std::vector<int>& list) {
std::vector<int> od_li;
for (int i : list) {
if (i % 2 != 0) {
od_li.push_back(i);
}
}
return od_li;
}
| int main() {
assert(func0({1,2,3,4,5,6}) == std::vector<int>({1,3,5}));
assert(func0({10,11,12,13}) == std::vector<int>({11,13}));
assert(func0({7,8,9,1}) == std::vector<int>({7,9,1}));
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %rdi,%rbp
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),%r12
cmp %r1... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r12
push rbp
push rbx
sub rsp, 10h
mov rbp, rdi
mov rax, fs:28h
mov [rsp+28h+var_20], rax
xor eax, eax
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
mov rbx, [rsi]
mov r12, [rsi+8]
cmp r12, rbx
jn... | _QWORD * func0(_QWORD *a1, int **a2)
{
int *v2; // rbx
int *v3; // r12
int v5; // eax
_DWORD *v6; // rsi
int v7; // [rsp+4h] [rbp-24h] BYREF
unsigned long long v8; // [rsp+8h] [rbp-20h]
v8 = __readfsqword(0x28u);
*a1 = 0LL;
a1[1] = 0LL;
a1[2] = 0LL;
v2 = *a2;
v3 = a2[1];
if ( v3 != *a2 )
{
... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x10
MOV RBP,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 RBX,qword ptr [RSI]
MOV R12,qword ptr [RSI + 0x8]
CMP R12,RBX
JNZ 0x001012b7
LAB_0010128b:
MOV... | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
uint *puVar1;
uint *puVar2;
uint *puVar3;
int8 *in_RSI;
long in_FS_OFFSET;
uint local_24;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(... |
2,214 | func0 | #include <vector>
#include <assert.h>
| std::vector<int> func0(const std::vector<int>& list) {
std::vector<int> od_li;
for (int i : list) {
if (i % 2 != 0) {
od_li.push_back(i);
}
}
return od_li;
}
| int main() {
assert(func0({1,2,3,4,5,6}) == std::vector<int>({1,3,5}));
assert(func0({10,11,12,13}) == std::vector<int>({11,13}));
assert(func0({7,8,9,1}) == std::vector<int>({7,9,1}));
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&):
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 %rb... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r12
pxor xmm0, xmm0
push rbp
mov rbp, rdi
push rbx
sub rsp, 10h
mov rax, fs:28h
mov [rsp+28h+var_20], rax
xor eax, eax
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
mov rbx, [rsi]
mov r12, [rsi+8]
cmp r12, rbx
jnz ... | long long func0(long long a1, int **a2)
{
int *v2; // rbx
int *v3; // r12
int v4; // eax
_DWORD *v5; // rsi
int v7; // [rsp+0h] [rbp-24h] BYREF
unsigned long long v8; // [rsp+4h] [rbp-20h]
v8 = __readfsqword(0x28u);
*(_QWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
v2 = *a2;
v3 = a2[1];
if ( v3... | func0:
ENDBR64
PUSH R12
PXOR XMM0,XMM0
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x10
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
JNZ 0x00101639
JMP 0x00101660
LAB_0010163... | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
uint *puVar1;
uint *puVar2;
uint *puVar3;
int8 *in_RSI;
long in_FS_OFFSET;
uint local_24;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
*(int8 *)(param_1 + 0x10) = 0;
*(int (*) [16])param_1 ... |
2,215 | func0 | #include <vector>
#include <assert.h>
| std::vector<int> func0(const std::vector<int>& list) {
std::vector<int> od_li;
for (int i : list) {
if (i % 2 != 0) {
od_li.push_back(i);
}
}
return od_li;
}
| int main() {
assert(func0({1,2,3,4,5,6}) == std::vector<int>({1,3,5}));
assert(func0({10,11,12,13}) == std::vector<int>({11,13}));
assert(func0({7,8,9,1}) == std::vector<int>({7,9,1}));
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&):
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,... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r12
pxor xmm0, xmm0
push rbp
mov rbp, rdi
push rbx
sub rsp, 10h
mov rax, fs:28h
mov [rsp+28h+var_20], rax
xor eax, eax
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
mov rbx, [rsi]
mov r12, [rsi+8]
cmp r12, rbx
jnz ... | long long func0(long long a1, int **a2)
{
int *v2; // rbx
int *v3; // r12
int v4; // eax
_DWORD *v5; // rsi
int v7; // [rsp+0h] [rbp-24h] BYREF
unsigned long long v8; // [rsp+4h] [rbp-20h]
v8 = __readfsqword(0x28u);
*(_QWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
v2 = *a2;
v3 = a2[1];
if ( v3... | func0:
ENDBR64
PUSH R12
PXOR XMM0,XMM0
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x10
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
JNZ 0x00101639
JMP 0x00101660
LAB_0010163... | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
uint *puVar1;
uint *puVar2;
uint *puVar3;
int8 *in_RSI;
long in_FS_OFFSET;
uint local_24;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
*(int8 *)(param_1 + 0x10) = 0;
*(int (*) [16])param_1 ... |
2,216 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
int S = (n * (n + 1)) / 2;
int res = S * (S - 1);
return res;
}
| int main() {
assert(func0(3) == 30);
assert(func0(5) == 210);
assert(func0(2) == 6);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
mov -0x14(%rbp),%eax
add $0x1,%eax
imul -0x14(%rbp),%eax
mov %eax,%edx
shr $0x1f,%edx
add %edx,%eax
sar %eax
mov %eax,-0x8(%rbp)
mov -0x8(%rbp),%eax
lea -0x1(%rax),%edx
mov -0x8(%rbp),%eax
imul %edx,%eax
mov %e... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov eax, [rbp+var_14]
add eax, 1
imul eax, [rbp+var_14]
mov edx, eax
shr edx, 1Fh
add eax, edx
sar eax, 1
mov [rbp+var_8], eax
mov eax, [rbp+var_8]
lea edx, [rax-1]
mov eax, [rbp+var_8]
imul eax, edx
... | long long func0(int a1)
{
return (unsigned int)((a1 * (a1 + 1) / 2 - 1) * (a1 * (a1 + 1) / 2));
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
IMUL EAX,dword ptr [RBP + -0x14]
MOV EDX,EAX
SHR EDX,0x1f
ADD EAX,EDX
SAR EAX,0x1
MOV dword ptr [RBP + -0x8],EAX
MOV EAX,dword ptr [RBP + -0x8]
LEA EDX,[RAX + -0x1]
MOV EAX,dword ptr [RBP + -0x8]
IMUL EAX,EDX... | /* func0(int) */
int func0(int param_1)
{
int iVar1;
iVar1 = ((param_1 + 1) * param_1) / 2;
return iVar1 * (iVar1 + -1);
} |
2,217 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
int S = (n * (n + 1)) / 2;
int res = S * (S - 1);
return res;
}
| int main() {
assert(func0(3) == 30);
assert(func0(5) == 210);
assert(func0(2) == 6);
return 0;
}
| O1 | cpp | func0(int):
endbr64
lea 0x1(%rdi),%eax
imul %eax,%edi
mov %edi,%eax
shr $0x1f,%eax
add %edi,%eax
sar %eax
lea -0x1(%rax),%edi
imul %edi,%eax
retq
| _Z5func0i:
endbr64
lea eax, [rdi+1]
imul eax, edi
mov edx, eax
shr edx, 1Fh
add edx, eax
sar edx, 1
lea eax, [rdx-1]
imul eax, edx
retn | long long func0(int a1)
{
return (unsigned int)(a1 * (a1 + 1) / 2 * (a1 * (a1 + 1) / 2 - 1));
} | func0:
ENDBR64
LEA EAX,[RDI + 0x1]
IMUL EAX,EDI
MOV EDX,EAX
SHR EDX,0x1f
ADD EDX,EAX
SAR EDX,0x1
LEA EAX,[RDX + -0x1]
IMUL EAX,EDX
RET | /* func0(int) */
int func0(int param_1)
{
int iVar1;
iVar1 = ((param_1 + 1) * param_1) / 2;
return (iVar1 + -1) * iVar1;
} |
2,218 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
int S = (n * (n + 1)) / 2;
int res = S * (S - 1);
return res;
}
| int main() {
assert(func0(3) == 30);
assert(func0(5) == 210);
assert(func0(2) == 6);
return 0;
}
| O2 | cpp | func0(int):
endbr64
lea 0x1(%rdi),%eax
imul %eax,%edi
mov %edi,%eax
shr $0x1f,%eax
add %edi,%eax
sar %eax
lea -0x1(%rax),%edi
imul %edi,%eax
retq
nopw 0x0(%rax,%rax,1)
| _Z5func0i:
endbr64
lea eax, [rdi+1]
imul eax, edi
mov edx, eax
shr edx, 1Fh
add edx, eax
sar edx, 1
lea eax, [rdx-1]
imul eax, edx
retn | long long func0(int a1)
{
return (unsigned int)(a1 * (a1 + 1) / 2 * (a1 * (a1 + 1) / 2 - 1));
} | func0:
ENDBR64
LEA EAX,[RDI + 0x1]
IMUL EAX,EDI
MOV EDX,EAX
SHR EDX,0x1f
ADD EDX,EAX
SAR EDX,0x1
LEA EAX,[RDX + -0x1]
IMUL EAX,EDX
RET | /* func0(int) */
int func0(int param_1)
{
int iVar1;
iVar1 = ((param_1 + 1) * param_1) / 2;
return (iVar1 + -1) * iVar1;
} |
2,219 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
int S = (n * (n + 1)) / 2;
int res = S * (S - 1);
return res;
}
| int main() {
assert(func0(3) == 30);
assert(func0(5) == 210);
assert(func0(2) == 6);
return 0;
}
| O3 | cpp | func0(int):
endbr64
lea 0x1(%rdi),%eax
imul %eax,%edi
mov %edi,%eax
shr $0x1f,%eax
add %edi,%eax
sar %eax
lea -0x1(%rax),%edi
imul %edi,%eax
retq
nopw 0x0(%rax,%rax,1)
| _Z5func0i:
endbr64
lea eax, [rdi+1]
imul eax, edi
mov edx, eax
shr edx, 1Fh
add edx, eax
sar edx, 1
lea eax, [rdx-1]
imul eax, edx
retn | long long func0(int a1)
{
return (unsigned int)(a1 * (a1 + 1) / 2 * (a1 * (a1 + 1) / 2 - 1));
} | func0:
ENDBR64
LEA EAX,[RDI + 0x1]
IMUL EAX,EDI
MOV EDX,EAX
SHR EDX,0x1f
ADD EDX,EAX
SAR EDX,0x1
LEA EAX,[RDX + -0x1]
IMUL EAX,EDX
RET | /* func0(int) */
int func0(int param_1)
{
int iVar1;
iVar1 = ((param_1 + 1) * param_1) / 2;
return (iVar1 + -1) * iVar1;
} |
2,220 | func0 |
#include <vector>
#include <assert.h>
| int func0(const std::vector<int>& A, int N) {
int oddPair = 0;
for (int i = 0; i < N; i++) {
for (int j = i + 1; j < N; j++) {
if ((A[i] ^ A[j]) % 2 != 0) {
oddPair++;
}
}
}
return oddPair;
}
| int main() {
assert(func0({5, 4, 7, 2, 1}, 5) == 6);
assert(func0({7, 2, 8, 1, 0, 5, 11}, 7) == 12);
assert(func0({1, 2, 3}, 3) == 2);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x28,%rsp
mov %rdi,-0x28(%rbp)
mov %esi,-0x2c(%rbp)
movl $0x0,-0x1c(%rbp)
movl $0x0,-0x18(%rbp)
mov -0x18(%rbp),%eax
cmp -0x2c(%rbp),%eax
jge 12b0 <_Z5func0RKSt6vectorIiSaIiEEi+0x87>
mo... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 28h
mov [rbp+var_28], rdi
mov [rbp+var_2C], esi
mov [rbp+var_1C], 0
mov [rbp+var_18], 0
jmp short loc_12C8
loc_126D:
mov eax, [rbp+var_18]
add eax, 1
mov [rbp+var_14], eax
jmp short loc_12BC
l... | long long func0(long long a1, int a2)
{
int v2; // ebx
unsigned int v4; // [rsp+14h] [rbp-1Ch]
int i; // [rsp+18h] [rbp-18h]
int j; // [rsp+1Ch] [rbp-14h]
v4 = 0;
for ( i = 0; i < a2; ++i )
{
for ( j = i + 1; j < a2; ++j )
{
v2 = *(_DWORD *)std::vector<int>::operator[](a1, i);
if ( (... | 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 + -0x1c],0x0
MOV dword ptr [RBP + -0x18],0x0
JMP 0x001012c8
LAB_0010126d:
MOV EAX,dword ptr [RBP + -0x18]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x001012bc
LAB_00101278:
... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
int func0(vector *param_1,int param_2)
{
uint uVar1;
uint *puVar2;
int4 local_24;
int4 local_20;
int4 local_1c;
local_24 = 0;
for (local_20 = 0; local_1c = local_20, local_20 < param_2; local_20 = local_20 + 1) {
while (local_1c = lo... |
2,221 | func0 |
#include <vector>
#include <assert.h>
| int func0(const std::vector<int>& A, int N) {
int oddPair = 0;
for (int i = 0; i < N; i++) {
for (int j = i + 1; j < N; j++) {
if ((A[i] ^ A[j]) % 2 != 0) {
oddPair++;
}
}
}
return oddPair;
}
| int main() {
assert(func0({5, 4, 7, 2, 1}, 5) == 6);
assert(func0({7, 2, 8, 1, 0, 5, 11}, 7) == 12);
assert(func0({1, 2, 3}, 3) == 2);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
test %esi,%esi
jle 1252 <_Z5func0RKSt6vectorIiSaIiEEi+0x49>
lea -0x1(%rsi),%r11d
add $0x1,%r11
mov $0x1,%r10d
mov $0x0,%ecx
cmp %r11,%r10
je 1257 <_Z5func0RKSt6vectorIiSaIiEEi+0x4e>
mov (%rdi),%r8
mov -0x4(%r8,%r10,4),%r9d
... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
test esi, esi
jle short loc_1267
push rbp
push rbx
mov ebx, esi
movsxd rbp, esi
mov r11d, 0
mov r10d, 1
mov ecx, 0
jmp short loc_122E
loc_122B:
mov r10, rax
loc_122E:
cmp r10, rbx
jz short loc_1262
mov r8, [rdi]
mov r9d, [r8+r1... | long long func0(_QWORD *a1, int a2)
{
long long v2; // r11
long long v3; // r10
unsigned int v4; // ecx
long long v5; // rax
if ( a2 <= 0 )
return 0LL;
v2 = 0LL;
v3 = 1LL;
v4 = 0;
while ( v3 != a2 )
{
v5 = v3;
do
v4 -= (((*(_DWORD *)(*a1 + 4 * v5++) ^ *(_DWORD *)(*a1 + v2)) & 1) ... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x00101267
PUSH RBP
PUSH RBX
MOV EBX,ESI
MOVSXD RBP,ESI
MOV R11D,0x0
MOV R10D,0x1
MOV ECX,0x0
JMP 0x0010122e
LAB_0010122b:
MOV R10,RAX
LAB_0010122e:
CMP R10,RBX
JZ 0x00101262
MOV R8,qword ptr [RDI]
MOV R9D,dword ptr [R8 + R11*0x1]
MOV RAX,R10
LAB_0010123d:
MOV EDX,R9D
XOR EDX,dword ptr [... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
int func0(vector *param_1,int param_2)
{
ulong uVar1;
int iVar2;
ulong uVar3;
long lVar4;
bool bVar5;
if (param_2 < 1) {
return 0;
}
lVar4 = 0;
iVar2 = 0;
uVar3 = 1;
do {
if (uVar3 == (uint)param_2) {
return iVar2;
... |
2,222 | func0 |
#include <vector>
#include <assert.h>
| int func0(const std::vector<int>& A, int N) {
int oddPair = 0;
for (int i = 0; i < N; i++) {
for (int j = i + 1; j < N; j++) {
if ((A[i] ^ A[j]) % 2 != 0) {
oddPair++;
}
}
}
return oddPair;
}
| int main() {
assert(func0({5, 4, 7, 2, 1}, 5) == 6);
assert(func0({7, 2, 8, 1, 0, 5, 11}, 7) == 12);
assert(func0({1, 2, 3}, 3) == 2);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
test %esi,%esi
jle 14d5 <_Z5func0RKSt6vectorIiSaIiEEi+0x55>
lea -0x1(%rsi),%r11d
mov $0x1,%r10d
xor %r8d,%r8d
add $0x1,%r11
cmp %r11,%r10
je 14d1 <_Z5func0RKSt6vectorIiSaIiEEi+0x51>
xchg %ax,%ax
mov (%rdi),%rcx
mov %r10,%... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
test esi, esi
jle short loc_13F7
cmp esi, 1
jz short loc_13F7
mov rdi, [rdi]
mov r11d, esi
mov r9d, 1
xor r10d, r10d
xor ecx, ecx
xchg ax, ax
loc_13C0:
mov r8d, [rdi+r10]
mov rax, r9
nop word ptr [rax+rax+00000000h]
loc_13D0:
mov ... | long long func0(long long *a1, int a2)
{
long long v2; // rdi
long long v3; // r9
long long v4; // r10
unsigned int v5; // ecx
long long v6; // rax
if ( a2 < 2 )
return 0LL;
v2 = *a1;
v3 = 1LL;
v4 = 0LL;
v5 = 0;
do
{
v6 = v3;
do
v5 -= ((((unsigned __int8)*(_DWORD *)(v2 + v4) ... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x001013f7
CMP ESI,0x1
JZ 0x001013f7
MOV RDI,qword ptr [RDI]
MOV R11D,ESI
MOV R9D,0x1
XOR R10D,R10D
XOR ECX,ECX
NOP
LAB_001013c0:
MOV R8D,dword ptr [RDI + R10*0x1]
MOV RAX,R9
NOP word ptr [RAX + RAX*0x1]
LAB_001013d0:
MOV EDX,dword ptr [RDI + RAX*0x4]
XOR EDX,R8D
AND EDX,0x1
CMP EDX,0x1
... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
int func0(vector *param_1,int param_2)
{
ulong uVar1;
int iVar2;
ulong uVar3;
long lVar4;
if ((0 < param_2) && (param_2 != 1)) {
uVar3 = 1;
lVar4 = 0;
iVar2 = 0;
do {
uVar1 = uVar3;
do {
iVar2 = (iVar2 + 1... |
2,223 | func0 |
#include <vector>
#include <assert.h>
| int func0(const std::vector<int>& A, int N) {
int oddPair = 0;
for (int i = 0; i < N; i++) {
for (int j = i + 1; j < N; j++) {
if ((A[i] ^ A[j]) % 2 != 0) {
oddPair++;
}
}
}
return oddPair;
}
| int main() {
assert(func0({5, 4, 7, 2, 1}, 5) == 6);
assert(func0({7, 2, 8, 1, 0, 5, 11}, 7) == 12);
assert(func0({1, 2, 3}, 3) == 2);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
test %esi,%esi
jle 15b6 <_Z5func0RKSt6vectorIiSaIiEEi+0x156>
cmp $0x1,%esi
je 15b6 <_Z5func0RKSt6vectorIiSaIiEEi+0x156>
push %r14
movdqa 0xc71(%rip),%xmm5
xor %r9d,%r9d
xor %r8d,%r8d
push %rbp
mov $0x1,%ecx
mov $0x1,%r11d
pxo... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
test esi, esi
jle loc_16C6
mov r8d, esi
cmp esi, 1
jz loc_16C6
push r14
xor r9d, r9d
mov ecx, 1
pxor xmm2, xmm2
movdqa xmm4, cs:xmmword_20E0
push rbp
lea ebp, [rsi-1]
push rbx
mov ebx, 1
mov r11, [rdi]
xor edi, edi
nop dw... | long long func0(long long *a1, int a2)
{
long long v3; // r9
int v4; // ecx
__m128i si128; // xmm4
int v6; // ebp
long long v7; // r11
unsigned int v8; // edi
unsigned int v9; // esi
unsigned int v10; // r10d
__m128i v11; // xmm1
const __m128i *v12; // rax
__m128i v13; // xmm3
__m128i v14; // x... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x001016c6
MOV R8D,ESI
CMP ESI,0x1
JZ 0x001016c6
PUSH R14
XOR R9D,R9D
MOV ECX,0x1
PXOR XMM2,XMM2
MOVDQA XMM4,xmmword ptr [0x001020e0]
PUSH RBP
LEA EBP,[RSI + -0x1]
PUSH RBX
MOV EBX,0x1
MOV R11,qword ptr [RDI]
XOR EDI,EDI
NOP dword ptr [RAX]
LAB_001015c0:
MOV R10D,R8D
MOV EAX,EBP
MOV ESI,... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(std::vector<int, std::allocator<int> > const&, int) */
int func0(vector *param_1,int param_2)
{
long lVar1;
uint uVar2;
long lVar3;
uint uVar4;
uint uVar5;
uint *puVar6;
uint *puVar7;
uint *puVar8;
uint *pu... |
2,224 | func0 |
#include <iostream>
#include <string>
#include <cctype>
#include <cassert>
| std::string func0(const std::string& str) {
std::string toggled;
for (char c : str) {
if (std::islower(c)) {
toggled += std::toupper(c);
} else {
toggled += std::tolower(c);
}
}
return toggled;
}
| int main() {
assert(func0("Python") == "pYTHON");
assert(func0("Pangram") == "pANGRAM");
assert(func0("LIttLE") == "liTTle");
return 0;
}
| 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 $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 ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
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 __ZNSt7__cxx1112basic_st... | long long func0(long long a1, long long a2)
{
char v2; // al
char v4; // [rsp+1Fh] [rbp-31h]
long long v5; // [rsp+20h] [rbp-30h] BYREF
_QWORD v6[4]; // [rsp+28h] [rbp-28h] BYREF
v6[2] = __readfsqword(0x28u);
std::string::basic_string(a1);
v6[1] = a2;
v5 = std::string::begin(a2);
v6[0] = std::string... | 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 0x001022f0
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x20],RAX
MO... | /* func0(std::string const&) */
string * func0(string *param_1)
{
char cVar1;
bool bVar2;
int iVar3;
char *pcVar4;
long in_FS_OFFSET;
int8 local_38;
int8 local_30 [2];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
std::string::string(param_1);
local_38 = std::string::begin();
lo... |
2,225 | func0 |
#include <iostream>
#include <string>
#include <cctype>
#include <cassert>
| std::string func0(const std::string& str) {
std::string toggled;
for (char c : str) {
if (std::islower(c)) {
toggled += std::toupper(c);
} else {
toggled += std::tolower(c);
}
}
return toggled;
}
| int main() {
assert(func0("Python") == "pYTHON");
assert(func0("Pangram") == "pANGRAM");
assert(func0("LIttLE") == "liTTle");
return 0;
}
| 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 $0x18,%rsp
mov %rdi,%rbx
lea 0x10(%rdi),%r14
mov %r14,(%rdi)
movq $0x0,0x8(%rdi)
movb $0x0,0x10(%rdi)
mov (%rsi),%rbp
mov ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 18h
mov rbx, rdi
lea r15, [rdi+10h]
mov [rdi], r15
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov rbp, [rsi]
mov r14, rbp
add ... | _QWORD * func0(_QWORD *a1, char **a2)
{
_QWORD *v2; // r15
char *v3; // rbp
char *v4; // r14
unsigned long long v6; // rax
int v7; // r12d
long long v8; // r12
unsigned long long v9; // r13
long long v10; // r12
unsigned long long v11; // r13
unsigned long long v12; // rax
char v13; // [rsp+Ch] [r... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
LEA R15,[RDI + 0x10]
MOV qword ptr [RDI],R15
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
MOV RBP,qword ptr [RSI]
MOV R14,RBP
ADD R14,qword ptr [RSI + 0x8]
CMP R14,RBP
JNZ 0x0010133b
LAB_00101300:
MOV RAX,RBX
AD... | /* func0(std::string const&) */
string * func0(string *param_1)
{
string *psVar1;
ulong uVar2;
int iVar3;
ulong uVar4;
char *pcVar5;
int8 *in_RSI;
int __c;
char *pcVar6;
int local_3c;
psVar1 = param_1 + 0x10;
*(string **)param_1 = psVar1;
*(int8 *)(param_1 + 8) = 0;
param_1[0x10] = (strin... |
2,226 | func0 |
#include <iostream>
#include <string>
#include <cctype>
#include <cassert>
| std::string func0(const std::string& str) {
std::string toggled;
for (char c : str) {
if (std::islower(c)) {
toggled += std::toupper(c);
} else {
toggled += std::tolower(c);
}
}
return toggled;
}
| int main() {
assert(func0("Python") == "pYTHON");
assert(func0("Pangram") == "pANGRAM");
assert(func0("LIttLE") == "liTTle");
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
push %r14
lea 0x10(%rdi),%r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x18,%rsp
movb $0x0,0x10(%rdi)
mov %r14,(%rdi)
mov (%rsi),%rbx
movq $0x0,0x8(%rdi)
mov ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
lea r13, [rdi+10h]
push r12
push rbp
push rbx
mov rbx, rdi
sub rsp, 18h
mov byte ptr [rdi+10h], 0
mov [rdi], r13
mov rbp, [rsi]
mov qword ptr [rdi+8], 0
mov rax, [rsi+8]
m... | _QWORD * func0(_QWORD *a1, char **a2)
{
_QWORD *v2; // r13
char *v4; // rbp
long long v5; // r14
char v6; // r15
unsigned long long v7; // rax
long long v8; // rax
unsigned long long v9; // r12
int v10; // edi
char v11; // r15
unsigned long long v12; // rax
long long v13; // rax
char *v15; // [r... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
LEA R13,[RDI + 0x10]
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
SUB RSP,0x18
MOV byte ptr [RDI + 0x10],0x0
MOV qword ptr [RDI],R13
MOV RBP,qword ptr [RSI]
MOV qword ptr [RDI + 0x8],0x0
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RSP + 0x8],R13
ADD RAX,RBP
MOV qword ptr [RSP],RAX
C... | /* func0(std::string const&) */
string * func0(string *param_1)
{
string *psVar1;
ulong uVar2;
int iVar3;
char *pcVar4;
ulong uVar5;
char *pcVar6;
int8 *in_RSI;
string *psVar7;
ulong uVar8;
int __c;
psVar1 = param_1 + 0x10;
param_1[0x10] = (string)0x0;
*(string **)param_1 = psVar1;
pcVa... |
2,227 | func0 |
#include <iostream>
#include <string>
#include <cctype>
#include <cassert>
| std::string func0(const std::string& str) {
std::string toggled;
for (char c : str) {
if (std::islower(c)) {
toggled += std::toupper(c);
} else {
toggled += std::tolower(c);
}
}
return toggled;
}
| int main() {
assert(func0("Python") == "pYTHON");
assert(func0("Pangram") == "pANGRAM");
assert(func0("LIttLE") == "liTTle");
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r15
push %r14
lea 0x10(%rdi),%r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x18,%rsp
movb $0x0,0x10(%rdi)
mov %r14,(%rdi)
mov (%rsi),%rbx
movq $0x0,0x8(%rdi)
mov ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
lea r13, [rdi+10h]
push r12
push rbp
push rbx
mov rbx, rdi
sub rsp, 18h
mov byte ptr [rdi+10h], 0
mov [rdi], r13
mov rbp, [rsi]
mov qword ptr [rdi+8], 0
mov rax, [rsi+8]
m... | _QWORD * func0(_QWORD *a1, char **a2)
{
_QWORD *v2; // r13
char *v4; // rbp
long long v5; // r14
char v6; // r15
unsigned long long v7; // rax
long long v8; // rax
unsigned long long v9; // r12
int v10; // edi
char v11; // r15
unsigned long long v12; // rax
long long v13; // rax
char *v15; // [r... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
LEA R13,[RDI + 0x10]
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
SUB RSP,0x18
MOV byte ptr [RDI + 0x10],0x0
MOV qword ptr [RDI],R13
MOV RBP,qword ptr [RSI]
MOV qword ptr [RDI + 0x8],0x0
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RSP + 0x8],R13
ADD RAX,RBP
MOV qword ptr [RSP],RAX
C... | /* func0(std::string const&) */
string * func0(string *param_1)
{
string *psVar1;
ulong uVar2;
int iVar3;
char *pcVar4;
ulong uVar5;
char *pcVar6;
int8 *in_RSI;
string *psVar7;
ulong uVar8;
int __c;
psVar1 = param_1 + 0x10;
param_1[0x10] = (string)0x0;
*(string **)param_1 = psVar1;
pcVa... |
2,228 | func0 |
#include <iostream>
#include <string>
#include <cassert>
| int func0(int n1, int n2) {
int diff = abs(n1 - n2);
std::string num_str = std::to_string(diff);
int sum = 0;
for (char c : num_str) {
sum += c - '0';
}
return sum;
}
| int main() {
assert(func0(1, 2) == 1);
assert(func0(23, 56) == 6);
assert(func0(123, 256) == 7);
return 0;
}
| O0 | cpp | func0(int, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x78,%rsp
mov %edi,-0x74(%rbp)
mov %esi,-0x78(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x74(%rbp),%eax
sub -0x78(%rbp),%eax
mov %eax,%edx
mov %edx,%eax
sar $0x1f,%eax
xor %eax,%edx
mov %e... | _Z5func0ii:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 78h
mov [rbp+var_74], edi
mov [rbp+var_78], esi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov eax, [rbp+var_74]
sub eax, [rbp+var_78]
mov edx, eax
neg edx
cmovns eax, edx
mov [rbp+var_5C], eax
lea... | long long func0(int a1, int a2)
{
int v2; // eax
unsigned int v4; // [rsp+20h] [rbp-60h]
long long v5; // [rsp+28h] [rbp-58h] BYREF
_QWORD v6[2]; // [rsp+30h] [rbp-50h] BYREF
_BYTE v7[40]; // [rsp+40h] [rbp-40h] BYREF
unsigned long long v8; // [rsp+68h] [rbp-18h]
v8 = __readfsqword(0x28u);
v2 = a1 - a... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x78
MOV dword ptr [RBP + -0x74],EDI
MOV dword ptr [RBP + -0x78],ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV EAX,dword ptr [RBP + -0x74]
SUB EAX,dword ptr [RBP + -0x78]
MOV EDX,EAX
NEG EDX
CMOVNS EAX,EDX
MOV dword ptr [RBP + -0x5c]... | /* func0(int, int) */
int func0(int param_1,int param_2)
{
bool bVar1;
char *pcVar2;
long in_FS_OFFSET;
int local_68;
int8 local_60;
int8 local_58;
string *local_50;
string local_48 [40];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
std::to_string((int)local_48);
local_68 = 0;
... |
2,229 | func0 |
#include <iostream>
#include <string>
#include <cassert>
| int func0(int n1, int n2) {
int diff = abs(n1 - n2);
std::string num_str = std::to_string(diff);
int sum = 0;
for (char c : num_str) {
sum += c - '0';
}
return sum;
}
| int main() {
assert(func0(1, 2) == 1);
assert(func0(23, 56) == 6);
assert(func0(123, 256) == 7);
return 0;
}
| O1 | cpp | func0(int, int):
endbr64
push %rbx
sub $0x30,%rsp
mov %fs:0x28,%rax
mov %rax,0x28(%rsp)
xor %eax,%eax
mov %rsp,%r9
sub %esi,%edi
mov %edi,%r8d
mov %edi,%eax
sar $0x1f,%eax
xor %eax,%r8d
sub %eax,%r8d
lea 0xdc8(%rip),%rcx
mov $0x10,%edx
mov 0x2d88(%rip),%rsi
mov %r9,%rdi
mo... | _Z5func0ii:
endbr64
push rbp
push rbx
sub rsp, 108h
mov rax, fs:28h
mov [rsp+118h+var_20], rax
xor eax, eax
sub edi, esi
mov ebp, edi
neg ebp
cmovs ebp, edi
cmp ebp, 9
jbe loc_16EE
cmp ebp, 63h ; 'c'
jbe short loc_1241
cmp ebp, 3E7h
jbe loc_149B
cmp ebp, 2... | long long func0(int a1, int a2)
{
int v2; // edi
unsigned int v3; // ebp
unsigned int v4; // eax
unsigned int v5; // ebx
unsigned int v6; // edx
_BYTE *v7; // rcx
int v8; // ebp
char v9; // bp
char *v10; // rax
unsigned int v11; // ebx
unsigned int v13; // eax
unsigned int v14; // esi
void *v... | func0:
ENDBR64
PUSH RBP
PUSH RBX
SUB RSP,0x108
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xf8],RAX
XOR EAX,EAX
SUB EDI,ESI
MOV EBP,EDI
NEG EBP
CMOVS EBP,EDI
CMP EBP,0x9
JBE 0x001016ee
CMP EBP,0x63
JBE 0x00101241
CMP EBP,0x3e7
JBE 0x0010149b
CMP EBP,0x270f
JBE 0x001016c6
MOV EAX,EBP
MOV EBX,0x1
MOV RCX,0x346dc5d6... | /* func0(int, int) */
int func0(int param_1,int param_2)
{
uint uVar1;
long *plVar2;
uint uVar3;
uint uVar4;
ulong uVar5;
int iVar6;
char cVar7;
ulong uVar8;
uint uVar9;
long in_FS_OFFSET;
long *local_118;
long local_110;
long local_108 [2];
char local_f8 [216];
long local_20;
local... |
2,230 | func0 |
#include <iostream>
#include <string>
#include <cassert>
| int func0(int n1, int n2) {
int diff = abs(n1 - n2);
std::string num_str = std::to_string(diff);
int sum = 0;
for (char c : num_str) {
sum += c - '0';
}
return sum;
}
| int main() {
assert(func0(1, 2) == 1);
assert(func0(23, 56) == 6);
assert(func0(123, 256) == 7);
return 0;
}
| O2 | cpp | func0(int, int):
endbr64
push %r12
sub %esi,%edi
lea 0xcf5(%rip),%rcx
mov $0x10,%edx
mov %edi,%r8d
sub $0x30,%rsp
mov 0x2cae(%rip),%rsi
mov %fs:0x28,%rax
mov %rax,0x28(%rsp)
xor %eax,%eax
mov %edi,%eax
mov %rsp,%r9
sar $0x1f,%eax
mov %r9,%rdi
xor %eax,%r8d
sub %eax,%r8d
xo... | _Z5func0ii:
endbr64
push r12
sub edi, esi
push rbp
push rbx
mov ebx, edi
sub rsp, 100h
mov rax, fs:28h
mov [rsp+118h+var_20], rax
xor eax, eax
neg ebx
cmovs ebx, edi
cmp ebx, 9
jle loc_15D7
cmp ebx, 63h ; 'c'
jle loc_1498
cmp ebx, 3E7h
jle loc_1607
cmp ... | long long func0(int a1, int a2)
{
int v2; // edi
int v3; // ebx
unsigned int v4; // ebp
long long v5; // rsi
_BYTE *v6; // rcx
unsigned int v7; // eax
unsigned int v8; // esi
long long v9; // rax
long long v10; // rdi
long long v11; // rdx
__int8 v12; // bl
char *v13; // rax
unsigned int v14;... | func0:
ENDBR64
PUSH R12
SUB EDI,ESI
PUSH RBP
PUSH RBX
MOV EBX,EDI
SUB RSP,0x100
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xf8],RAX
XOR EAX,EAX
NEG EBX
CMOVS EBX,EDI
CMP EBX,0x9
JLE 0x001015d7
CMP EBX,0x63
JLE 0x00101498
CMP EBX,0x3e7
JLE 0x00101607
CMP EBX,0x270f
JLE 0x001015fb
MOV EAX,EBX
CMP EBX,0x1869f
JBE 0... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(int, int) */
int func0(int param_1,int param_2)
{
uint uVar1;
uint uVar2;
long *plVar3;
uint uVar4;
char cVar5;
int iVar6;
ulong uVar7;
uint uVar8;
long in_FS_OFFSET;
long *local_118;
long local_110;
... |
2,231 | func0 |
#include <iostream>
#include <string>
#include <cassert>
| int func0(int n1, int n2) {
int diff = abs(n1 - n2);
std::string num_str = std::to_string(diff);
int sum = 0;
for (char c : num_str) {
sum += c - '0';
}
return sum;
}
| int main() {
assert(func0(1, 2) == 1);
assert(func0(23, 56) == 6);
assert(func0(123, 256) == 7);
return 0;
}
| O3 | cpp | func0(int, int):
endbr64
push %r12
sub %esi,%edi
mov $0x10,%edx
lea 0xb50(%rip),%rcx
mov %edi,%r8d
sub $0x30,%rsp
mov 0x2b0e(%rip),%rsi
mov %fs:0x28,%rax
mov %rax,0x28(%rsp)
xor %eax,%eax
mov %edi,%eax
mov %rsp,%r9
sar $0x1f,%eax
mov %r9,%rdi
xor %eax,%r8d
sub %eax,%r8d
xo... | _Z5func0ii:
endbr64
push r12
sub edi, esi
push rbp
push rbx
mov ebx, edi
sub rsp, 100h
mov rax, fs:28h
mov [rsp+118h+var_20], rax
xor eax, eax
neg ebx
cmovs ebx, edi
cmp ebx, 9
jle loc_17AD
cmp ebx, 63h ; 'c'
jle loc_165A
cmp ebx, 3E7h
jle loc_17D1
cmp ... | long long func0(int a1, int a2)
{
int v2; // edi
int v3; // ebx
unsigned int v4; // ebp
long long v5; // rsi
_BYTE *v6; // rcx
unsigned int v7; // eax
unsigned int v8; // esi
long long v9; // rax
long long v10; // rdi
long long v11; // rdx
__int8 v12; // bl
__int8 *v13; // rcx
const __m128i *... | func0:
ENDBR64
PUSH R12
SUB EDI,ESI
PUSH RBP
PUSH RBX
MOV EBX,EDI
SUB RSP,0x100
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xf8],RAX
XOR EAX,EAX
NEG EBX
CMOVS EBX,EDI
CMP EBX,0x9
JLE 0x001017ad
CMP EBX,0x63
JLE 0x0010165a
CMP EBX,0x3e7
JLE 0x001017d1
CMP EBX,0x270f
JLE 0x001017dd
MOV EAX,EBX
CMP EBX,0x1869f
JBE 0... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(int, int) */
int func0(int param_1,int param_2)
{
uint uVar1;
int (*pauVar2) [16];
int auVar3 [14];
int auVar4 [12];
unkbyte10 Var5;
int auVar6 [12];
int auVar7 [12];
int auVar8 [14];
int auVar9 [12];
int... |
2,232 | func0 |
#include <cassert>
| int func0(int a[], int size){
int max_so_far = 0;
int max_ending_here = 0;
for (int i = 0; i < size; i++) {
max_ending_here = max_ending_here + a[i];
if (max_ending_here < 0) {
max_ending_here = 0;
}
if (max_so_far < max_ending_here) {
max_so_... | int main() {
int arr1[] = {-2, -3, 4, -1, -2, 1, 5, -3};
int arr2[] = {-3, -4, 5, -2, -3, 2, 6, -4};
int arr3[] = {-4, -5, 6, -3, -4, 3, 7, -5};
assert(func0(arr1, 8) == 7);
assert(func0(arr2, 8) == 8);
assert(func0(arr3, 8) == 10);
return 0;
}
| O0 | cpp | func0(int*, int):
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
movl $0x0,-0xc(%rbp)
movl $0x0,-0x8(%rbp)
movl $0x0,-0x4(%rbp)
mov -0x4(%rbp),%eax
cmp -0x1c(%rbp),%eax
jge 11cf <_Z5func0Pii+0x66>
mov -0x4(%rbp),%eax
cltq
lea 0x0(,%rax,4),%rdx
mov -0x18(%rbp... | _Z5func0Pii:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_C], 0
mov [rbp+var_8], 0
mov [rbp+var_4], 0
jmp short loc_11C7
loc_118F:
mov eax, [rbp+var_4]
cdqe
lea rdx, ds:0[rax*4]
mov rax, [rbp+var_18]
add rax, rdx
mov eax, [rax]... | long long func0(int *a1, int a2)
{
int v3; // [rsp+10h] [rbp-Ch]
int v4; // [rsp+14h] [rbp-8h]
int i; // [rsp+18h] [rbp-4h]
v3 = 0;
v4 = 0;
for ( i = 0; i < a2; ++i )
{
v4 += a1[i];
if ( v4 < 0 )
v4 = 0;
if ( v3 < v4 )
v3 = v4;
}
return (unsigned int)v3;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0xc],0x0
MOV dword ptr [RBP + -0x8],0x0
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001011c7
LAB_0010118f:
MOV EAX,dword ptr [RBP + -0x4]
CDQE
LEA RDX,[RAX*0x4]
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,RDX
... | /* func0(int*, int) */
int func0(int *param_1,int param_2)
{
int local_14;
int local_10;
int local_c;
local_14 = 0;
local_10 = 0;
for (local_c = 0; local_c < param_2; local_c = local_c + 1) {
local_10 = local_10 + param_1[local_c];
if (local_10 < 0) {
local_10 = 0;
}
if (local_14 ... |
2,233 | func0 |
#include <cassert>
| int func0(int a[], int size){
int max_so_far = 0;
int max_ending_here = 0;
for (int i = 0; i < size; i++) {
max_ending_here = max_ending_here + a[i];
if (max_ending_here < 0) {
max_ending_here = 0;
}
if (max_so_far < max_ending_here) {
max_so_... | int main() {
int arr1[] = {-2, -3, 4, -1, -2, 1, 5, -3};
int arr2[] = {-3, -4, 5, -2, -3, 2, 6, -4};
int arr3[] = {-4, -5, 6, -3, -4, 3, 7, -5};
assert(func0(arr1, 8) == 7);
assert(func0(arr2, 8) == 8);
assert(func0(arr3, 8) == 10);
return 0;
}
| O1 | cpp | func0(int*, int):
endbr64
test %esi,%esi
jle 11a1 <_Z5func0Pii+0x38>
mov %rdi,%rdx
lea -0x1(%rsi),%eax
lea 0x4(%rdi,%rax,4),%rdi
mov $0x0,%eax
mov $0x0,%ecx
mov $0x0,%esi
add (%rdx),%eax
cmovs %esi,%eax
cmp %eax,%ecx
cmovl %eax,%ecx
add $0x4,%rdx
cmp %rdi,%rdx
jne 118b <_Z5func0P... | _Z5func0Pii:
endbr64
test esi, esi
jle short loc_11A0
mov rdx, rdi
movsxd rsi, esi
lea rdi, [rdi+rsi*4]
mov eax, 0
mov ecx, 0
loc_1185:
add eax, [rdx]
mov esi, 0
cmovs eax, esi
cmp ecx, eax
cmovl ecx, eax
add rdx, 4
cmp rdx, rdi
jnz short loc_1185
loc_119D:
mov ea... | long long func0(int *a1, int a2)
{
int *v2; // rdx
int *v3; // rdi
int v4; // eax
int v5; // ecx
if ( a2 <= 0 )
{
return 0;
}
else
{
v2 = a1;
v3 = &a1[a2];
v4 = 0;
v5 = 0;
do
{
v4 += *v2;
if ( v4 < 0 )
v4 = 0;
if ( v5 < v4 )
v5 = v4;
... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x001011a0
MOV RDX,RDI
MOVSXD RSI,ESI
LEA RDI,[RDI + RSI*0x4]
MOV EAX,0x0
MOV ECX,0x0
LAB_00101185:
ADD EAX,dword ptr [RDX]
MOV ESI,0x0
CMOVS EAX,ESI
CMP ECX,EAX
CMOVL ECX,EAX
ADD RDX,0x4
CMP RDX,RDI
JNZ 0x00101185
LAB_0010119d:
MOV EAX,ECX
RET
LAB_001011a0:
MOV ECX,0x0
JMP 0x0010119d | /* func0(int*, int) */
int func0(int *param_1,int param_2)
{
int *piVar1;
int iVar2;
int iVar3;
if (param_2 < 1) {
iVar3 = 0;
}
else {
piVar1 = param_1 + param_2;
iVar2 = 0;
iVar3 = 0;
do {
iVar2 = iVar2 + *param_1;
if (iVar2 < 0) {
iVar2 = 0;
}
if (i... |
2,234 | func0 |
#include <cassert>
| int func0(int a[], int size){
int max_so_far = 0;
int max_ending_here = 0;
for (int i = 0; i < size; i++) {
max_ending_here = max_ending_here + a[i];
if (max_ending_here < 0) {
max_ending_here = 0;
}
if (max_so_far < max_ending_here) {
max_so_... | int main() {
int arr1[] = {-2, -3, 4, -1, -2, 1, 5, -3};
int arr2[] = {-3, -4, 5, -2, -3, 2, 6, -4};
int arr3[] = {-4, -5, 6, -3, -4, 3, 7, -5};
assert(func0(arr1, 8) == 7);
assert(func0(arr2, 8) == 8);
assert(func0(arr3, 8) == 10);
return 0;
}
| O2 | cpp | func0(int*, int):
endbr64
test %esi,%esi
jle 13a0 <_Z5func0Pii+0x40>
lea -0x1(%rsi),%eax
xor %r8d,%r8d
xor %edx,%edx
lea 0x4(%rdi,%rax,4),%rcx
xor %eax,%eax
nopw 0x0(%rax,%rax,1)
add (%rdi),%eax
cmovs %edx,%eax
cmp %eax,%r8d
cmovl %eax,%r8d
add $0x4,%rdi
cmp %rcx,%rdi
jne 1380 <_Z... | _Z5func0Pii:
endbr64
test esi, esi
jle short loc_1318
movsxd rsi, esi
xor eax, eax
xor edx, edx
lea rsi, [rdi+rsi*4]
nop dword ptr [rax+rax+00h]
loc_12F8:
add eax, [rdi]
mov ecx, 0
cmovs eax, ecx
cmp edx, eax
cmovl edx, eax
add rdi, 4
cmp rdi, rsi
jnz short loc_12F8
m... | long long func0(int *a1, int a2)
{
int v2; // eax
int v3; // edx
int *v4; // rsi
if ( a2 <= 0 )
return 0LL;
v2 = 0;
v3 = 0;
v4 = &a1[a2];
do
{
v2 += *a1;
if ( v2 < 0 )
v2 = 0;
if ( v3 < v2 )
v3 = v2;
++a1;
}
while ( a1 != v4 );
return (unsigned int)v3;
} | func0:
ENDBR64
TEST ESI,ESI
JLE 0x00101318
MOVSXD RSI,ESI
XOR EAX,EAX
XOR EDX,EDX
LEA RSI,[RDI + RSI*0x4]
NOP dword ptr [RAX + RAX*0x1]
LAB_001012f8:
ADD EAX,dword ptr [RDI]
MOV ECX,0x0
CMOVS EAX,ECX
CMP EDX,EAX
CMOVL EDX,EAX
ADD RDI,0x4
CMP RDI,RSI
JNZ 0x001012f8
MOV EAX,EDX
RET
LAB_00101318:
XOR EDX,EDX
MOV EAX,EDX
R... | /* func0(int*, int) */
int func0(int *param_1,int param_2)
{
int *piVar1;
int iVar2;
int iVar3;
if (0 < param_2) {
iVar2 = 0;
iVar3 = 0;
piVar1 = param_1 + param_2;
do {
iVar2 = iVar2 + *param_1;
if (iVar2 < 0) {
iVar2 = 0;
}
if (iVar3 < iVar2) {
iVar... |
2,235 | func0 |
#include <cassert>
| int func0(int a[], int size){
int max_so_far = 0;
int max_ending_here = 0;
for (int i = 0; i < size; i++) {
max_ending_here = max_ending_here + a[i];
if (max_ending_here < 0) {
max_ending_here = 0;
}
if (max_so_far < max_ending_here) {
max_so_... | int main() {
int arr1[] = {-2, -3, 4, -1, -2, 1, 5, -3};
int arr2[] = {-3, -4, 5, -2, -3, 2, 6, -4};
int arr3[] = {-4, -5, 6, -3, -4, 3, 7, -5};
assert(func0(arr1, 8) == 7);
assert(func0(arr2, 8) == 8);
assert(func0(arr3, 8) == 10);
return 0;
}
| O3 | cpp | func0(int*, int):
endbr64
test %esi,%esi
jle 1400 <_Z5func0Pii+0x40>
lea -0x1(%rsi),%eax
xor %r8d,%r8d
xor %edx,%edx
lea 0x4(%rdi,%rax,4),%rcx
xor %eax,%eax
nopw 0x0(%rax,%rax,1)
add (%rdi),%eax
cmovs %edx,%eax
cmp %eax,%r8d
cmovl %eax,%r8d
add $0x4,%rdi
cmp %rdi,%rcx
jne 13e0 <_Z... | _Z5func0Pii:
endbr64
test esi, esi
jle short loc_1178
movsxd rsi, esi
xor eax, eax
xor edx, edx
lea rsi, [rdi+rsi*4]
nop dword ptr [rax+rax+00h]
loc_1158:
add eax, [rdi]
mov ecx, 0
cmovs eax, ecx
cmp edx, eax
cmovl edx, eax
add rdi, 4
cmp rsi, rdi
jnz short loc_1158
m... | long long func0(int *a1, int a2)
{
int v2; // eax
int v3; // edx
int *v4; // rsi
if ( a2 <= 0 )
return 0LL;
v2 = 0;
v3 = 0;
v4 = &a1[a2];
do
{
v2 += *a1;
if ( v2 < 0 )
v2 = 0;
if ( v3 < v2 )
v3 = v2;
++a1;
}
while ( v4 != a1 );
return (unsigned int)v3;
} | func0:
ENDBR64
TEST ESI,ESI
JLE 0x00101178
MOVSXD RSI,ESI
XOR EAX,EAX
XOR EDX,EDX
LEA RSI,[RDI + RSI*0x4]
NOP dword ptr [RAX + RAX*0x1]
LAB_00101158:
ADD EAX,dword ptr [RDI]
MOV ECX,0x0
CMOVS EAX,ECX
CMP EDX,EAX
CMOVL EDX,EAX
ADD RDI,0x4
CMP RSI,RDI
JNZ 0x00101158
MOV EAX,EDX
RET
LAB_00101178:
XOR EDX,EDX
MOV EAX,EDX
R... | /* func0(int*, int) */
int func0(int *param_1,int param_2)
{
int *piVar1;
int iVar2;
int iVar3;
if (0 < param_2) {
iVar2 = 0;
iVar3 = 0;
piVar1 = param_1 + param_2;
do {
iVar2 = iVar2 + *param_1;
if (iVar2 < 0) {
iVar2 = 0;
}
if (iVar3 < iVar2) {
iVar... |
2,236 | func0 | #include <iostream>
#include <set>
#include <vector>
#include <tuple>
#include <cassert>
| std::tuple<std::vector<int>> func0(const std::vector<int>& test_tup1, const std::vector<int>& test_tup2) {
std::set<int> combined_set(test_tup1.begin(), test_tup1.end());
combined_set.insert(test_tup2.begin(), test_tup2.end());
std::vector<int> res(combined_set.begin(), combined_set.end());
return s... | int main() {
std::vector<int> vec1{3, 4, 5, 6}, vec2{5, 7, 4, 10};
assert(func0(vec1, vec2) == std::make_tuple(std::vector<int>{3, 4, 5, 6, 7, 10}));
vec1 = std::vector<int>{1, 2, 3, 4};
vec2 = std::vector<int>{3, 4, 5, 6};
assert(func0(vec1, vec2) == std::make_tuple(std::vector<int>{1, 2, 3,... | 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 $0x98,%rsp
mov %rdi,-0x88(%rbp)
mov %rsi,-0x90(%rbp)
mov %rdx,-0x98(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x90(%rbp)... | _Z5func0RKSt6vectorIiSaIiEES3_:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 98h
mov [rbp+var_88], rdi
mov [rbp+var_90], rsi
mov [rbp+var_98], rdx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_90]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE3endEv; s... | 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
char v11; // [rsp+27h] [rbp-79h] BYREF
char *v12; // [rsp+28h] [rbp-78h]
_BYTE v13[32]; // [rsp+30h] [rbp-70h] BYRE... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x98
MOV qword ptr [RBP + -0x88],RDI
MOV qword ptr [RBP + -0x90],RSI
MOV qword ptr [RBP + -0x98],RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x90]
MOV RDI,RAX
CALL 0x00101f58
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)
{
__normal_iterator _Var1;
__normal_iterator _Var2;
_Rb_tree_const_iterator _Var3;
_Rb_tree_const_iterator _Var4;
vector<int,std::allocator<int>> *in_R... |
2,237 | func0 | #include <iostream>
#include <set>
#include <vector>
#include <tuple>
#include <cassert>
| std::tuple<std::vector<int>> func0(const std::vector<int>& test_tup1, const std::vector<int>& test_tup2) {
std::set<int> combined_set(test_tup1.begin(), test_tup1.end());
combined_set.insert(test_tup2.begin(), test_tup2.end());
std::vector<int> res(combined_set.begin(), combined_set.end());
return s... | int main() {
std::vector<int> vec1{3, 4, 5, 6}, vec2{5, 7, 4, 10};
assert(func0(vec1, vec2) == std::make_tuple(std::vector<int>{3, 4, 5, 6, 7, 10}));
vec1 = std::vector<int>{1, 2, 3, 4};
vec2 = std::vector<int>{3, 4, 5, 6};
assert(func0(vec1, vec2) == std::make_tuple(std::vector<int>{1, 2, 3,... | 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 $0x50,%rsp
mov %rdi,%rbp
mov %rdx,%r14
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
mov 0x8(%rsi),%r12
mov (%rsi),%r... | _Z5func0RKSt6vectorIiSaIiEES3_:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 68h
mov rbp, rdi
mov r14, rdx
mov rax, fs:28h
mov [rsp+98h+var_40], rax
xor eax, eax
mov r12, [rsi+8]
mov rbx, [rsi]
mov [rsp+98h+var_70], 0
mov [rsp+98h+var_6... | _QWORD * func0(_QWORD *a1, long long *a2, long long *a3, long long a4, long long a5, long long a6)
{
long long v8; // r12
long long v9; // rbx
long long v10; // r12
long long v11; // rax
char *v12; // rdx
long long j; // rbx
int *v14; // rbx
int *v15; // rdi
unsigned long long v16; // r12
unsigned l... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x68
MOV RBP,RDI
MOV R14,RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x58],RAX
XOR EAX,EAX
MOV R12,qword ptr [RSI + 0x8]
MOV RBX,qword ptr [RSI]
MOV dword ptr [RSP + 0x28],0x0
MOV qword ptr [RSP + 0x30],0x0
LEA RDX,[RSP + 0x20]
LEA RA... | /* 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_base *p_Var2;
_Rb_tree<int,int,std::_Identity<int>,std::less<int>,std::allocator<int>> *__src;
_Rb_tree_node_base *p... |
2,238 | func0 | #include <iostream>
#include <set>
#include <vector>
#include <tuple>
#include <cassert>
| std::tuple<std::vector<int>> func0(const std::vector<int>& test_tup1, const std::vector<int>& test_tup2) {
std::set<int> combined_set(test_tup1.begin(), test_tup1.end());
combined_set.insert(test_tup2.begin(), test_tup2.end());
std::vector<int> res(combined_set.begin(), combined_set.end());
return s... | int main() {
std::vector<int> vec1{3, 4, 5, 6}, vec2{5, 7, 4, 10};
assert(func0(vec1, vec2) == std::make_tuple(std::vector<int>{3, 4, 5, 6, 7, 10}));
vec1 = std::vector<int>{1, 2, 3, 4};
vec2 = std::vector<int>{3, 4, 5, 6};
assert(func0(vec1, vec2) == std::make_tuple(std::vector<int>{1, 2, 3,... | O2 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %r15
mov %rdx,%r15
push %r14
mov %rdi,%r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x48,%rsp
mov 0x8(%rsi),%r12
mov (%rsi),%rbp
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xo... | _Z5func0RKSt6vectorIiSaIiEES3_:
endbr64
push r15
push r14
push r13
mov r13, rdi
push r12
push rbp
push rbx
mov rbx, rdx
sub rsp, 68h
mov rdx, [rsi+8]
mov rsi, [rsi]
mov rax, fs:28h
mov [rsp+98h+var_40], rax
xor eax, eax
lea rbp, [rsp+98h+var_78]
lea r12, [rsp+98... | long long func0(long long a1, long long *a2, _QWORD *a3)
{
long long v5; // rdx
long long v6; // rsi
long long v7; // rsi
long long v8; // rdx
long long v9; // rcx
long long v10; // r8
long long v11; // r9
int *v12; // rbx
int *v13; // rdi
long long v14; // r14
unsigned long long v15; // r14
lo... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
MOV R13,RDI
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDX
SUB RSP,0x68
MOV RDX,qword ptr [RSI + 0x8]
MOV RSI,qword ptr [RSI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x58],RAX
XOR EAX,EAX
LEA RBP,[RSP + 0x20]
LEA R12,[RSP + 0x28]
MOV dword ptr [RSP + 0x28],0x0
MOV RDI,RBP
MOV ... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&) */
vector * func0(vector *param_1,vector *param_2)
{
void *pvVar1;
void *pvVar2;
_Rb_tree_node_base *p_Var3;
int4 *__src;
_Rb_tree_node_base *p_Var4;
int8 *in_RDX;
int4 *puVar5;
int4 *puVar6;
ul... |
2,239 | func0 | #include <iostream>
#include <set>
#include <vector>
#include <tuple>
#include <cassert>
| std::tuple<std::vector<int>> func0(const std::vector<int>& test_tup1, const std::vector<int>& test_tup2) {
std::set<int> combined_set(test_tup1.begin(), test_tup1.end());
combined_set.insert(test_tup2.begin(), test_tup2.end());
std::vector<int> res(combined_set.begin(), combined_set.end());
return s... | int main() {
std::vector<int> vec1{3, 4, 5, 6}, vec2{5, 7, 4, 10};
assert(func0(vec1, vec2) == std::make_tuple(std::vector<int>{3, 4, 5, 6, 7, 10}));
vec1 = std::vector<int>{1, 2, 3, 4};
vec2 = std::vector<int>{3, 4, 5, 6};
assert(func0(vec1, vec2) == std::make_tuple(std::vector<int>{1, 2, 3,... | O3 | 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 $0x58,%rsp
mov 0x8(%rsi),%r15
mov (%rsi),%rbp
mov %rdi,(%rsp)
lea 0x18(%rsp),%rbx
mov %rdx,0x8(%rsp)
mov %fs:0x28,... | _Z5func0RKSt6vectorIiSaIiEES3_:
endbr64
push r15
push r14
mov r14, rdx
push r13
push r12
mov r12, rdi
push rbp
push rbx
sub rsp, 68h
mov r13, [rsi+8]
mov rbx, [rsi]
mov rax, fs:28h
mov [rsp+98h+var_40], rax
xor eax, eax
lea rbp, [rsp+98h+var_70]
mov [rsp+98h+var... | long long func0(long long a1, long long *a2, long long *a3)
{
long long v5; // r13
long long v6; // rbx
long long v7; // rdx
long long v8; // rcx
long long v9; // r8
long long v10; // r9
long long v11; // r13
long long i; // rbx
int *v13; // rbx
long long v14; // r14
int *v15; // rdi
unsigned l... | func0:
ENDBR64
PUSH R15
PUSH R14
MOV R14,RDX
PUSH R13
PUSH R12
MOV R12,RDI
PUSH RBP
PUSH RBX
SUB RSP,0x68
MOV R13,qword ptr [RSI + 0x8]
MOV RBX,qword ptr [RSI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x58],RAX
XOR EAX,EAX
LEA RBP,[RSP + 0x28]
MOV dword ptr [RSP + 0x28],0x0
MOV qword ptr [RSP + 0x30],0x0
MOV qw... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&) */
vector * func0(vector *param_1,vector *param_2)
{
void *pvVar1;
void *pvVar2;
_Rb_tree_node_base *p_Var3;
int4 *__src;
_Rb_tree_node_base *p_Var4;
long *in_RDX;
_Alloc_node *p_Var5;
_Alloc_node... |
2,240 | func0 | #include <cassert>
#include <vector>
#include <map>
using namespace std;
| map<int, vector<int>> func0(const vector<pair<int, int>>& test_list) {
map<int, vector<int>> res;
for (const auto &p : test_list) {
int key = p.first, val = p.second;
if (res.find(val) == res.end()) {
res[val] = vector<int>(); // ensure entry exists for val with an empty vector
... | int main() {
{
vector<pair<int, int>> test_list = { {5, 3}, {7, 5}, {2, 7}, {3, 8}, {8, 4} };
map<int, vector<int>> expected = {
{3, {8}},
{5, {3}},
{7, {5}},
{2, {7}},
{8, {4}},
{4, {}}
};
assert(func... | O0 | cpp | func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0xa8,%rsp
mov %rdi,-0xa8(%rbp)
mov %rsi,-0xb0(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0xa8(%rbp),%rax
mov %rax,%rdi
callq 2da8 <_Z... | _Z5func0RKSt6vectorISt4pairIiiESaIS1_EE:
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
mov rax, [rbp+var_68]
mov rdi, rax
call _ZNSt3mapIiSt6vectorIiSaIiEESt4lessIiESaISt4pai... | long long func0(long long a1, long long a2)
{
long long v2; // rax
long long v3; // rax
long long v4; // rax
int v6; // [rsp+10h] [rbp-60h] BYREF
int v7; // [rsp+14h] [rbp-5Ch] BYREF
long long v8; // [rsp+18h] [rbp-58h] BYREF
long long v9; // [rsp+20h] [rbp-50h] BYREF
_QWORD v10[2]; // [rsp+28h] [rbp-4... | 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
MOV RAX,qword ptr [RBP + -0x68]
MOV RDI,RAX
CALL 0x00102c18
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x40],RAX
MO... | /* func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&) */
vector * func0(vector *param_1)
{
char cVar1;
bool bVar2;
int8 uVar3;
vector<int,std::allocator<int>> *pvVar4;
vector<std::pair<int,int>,std::allocator<std::pair<int,int>>> *in_RSI;
long in_FS_OFFSET;
int local_6... |
2,241 | func0 | #include <cassert>
#include <vector>
#include <map>
using namespace std;
| map<int, vector<int>> func0(const vector<pair<int, int>>& test_list) {
map<int, vector<int>> res;
for (const auto &p : test_list) {
int key = p.first, val = p.second;
if (res.find(val) == res.end()) {
res[val] = vector<int>(); // ensure entry exists for val with an empty vector
... | int main() {
{
vector<pair<int, int>> test_list = { {5, 3}, {7, 5}, {2, 7}, {3, 8}, {8, 4} };
map<int, vector<int>> expected = {
{3, {8}},
{5, {3}},
{7, {5}},
{2, {7}},
{8, {4}},
{4, {}}
};
assert(func... | O1 | cpp | func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&):
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x20,%rsp
mov %rdi,%r13
mov %fs:0x28,%rax
mov %rax,0x18(%rsp)
xor %eax,%eax
movl $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
lea 0x8(%rdi),%rbx
mo... | _Z5func0RKSt6vectorISt4pairIiiESaIS1_EE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov rbx, rdi
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor eax, eax
mov dword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
lea rbp, [rdi+8]
mov [rdi+18h]... | long long func0(long long a1, int **a2)
{
long long v3; // rbp
int *v4; // r12
int *v5; // r13
long long v6; // rax
_QWORD *v7; // rsi
void *v8; // rdi
long long v9; // rax
long long v10; // rax
_QWORD *v11; // rsi
void *v12; // rdi
long long v13; // rax
_DWORD *v14; // rax
int v15; // r15d
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
MOV dword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
LEA RBP,[RDI + 0x8]
MOV qword ptr [RDI + 0x18],RBP
MOV qword ptr [RDI + 0x20],RBP
MOV qword pt... | /* func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&) */
vector * func0(vector *param_1)
{
_Rb_tree_node_base *p_Var1;
int iVar2;
int *piVar3;
void *pvVar4;
long lVar5;
int *piVar6;
_Rb_tree_iterator _Var7;
int4 extraout_var;
int4 extraout_var_00;
_Rb_tree_node_b... |
2,242 | func0 | #include <cassert>
#include <vector>
#include <map>
using namespace std;
| map<int, vector<int>> func0(const vector<pair<int, int>>& test_list) {
map<int, vector<int>> res;
for (const auto &p : test_list) {
int key = p.first, val = p.second;
if (res.find(val) == res.end()) {
res[val] = vector<int>(); // ensure entry exists for val with an empty vector
... | int main() {
{
vector<pair<int, int>> test_list = { {5, 3}, {7, 5}, {2, 7}, {3, 8}, {8, 4} };
map<int, vector<int>> expected = {
{3, {8}},
{5, {3}},
{7, {5}},
{2, {7}},
{8, {4}},
{4, {}}
};
assert(func... | O2 | cpp | func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&):
endbr64
push %r15
push %r14
mov %rdi,%r14
push %r13
push %r12
push %rbp
push %rbx
lea 0x8(%rdi),%rbx
sub $0x58,%rsp
mov (%rsi),%r13
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
mov 0x8(%rsi)... | _Z5func0RKSt6vectorISt4pairIiiESaIS1_EE:
endbr64
push r13
push r12
mov r12, rdi
push rbp
push rbx
lea rbx, [rdi+8]
sub rsp, 48h
mov rbp, [rsi]
mov r13, [rsi+8]
mov rax, fs:28h
mov [rsp+68h+var_30], rax
xor eax, eax
mov dword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
m... | long long func0(long long a1, int **a2)
{
long long v3; // rbx
int *v4; // rbp
int *v5; // r13
long long i; // rcx
int v7; // edi
int v8; // edx
long long v9; // r9
long long v10; // rax
long long v11; // rsi
long long v12; // r8
long long v13; // rsi
long long v14; // rax
long long v15; // r... | func0:
LEA RDI,[RSP + 0x20]
CALL 0x00102760
LAB_0010128a:
MOV RDI,qword ptr [R12 + 0x10]
CALL 0x001022e0
MOV RAX,qword ptr [RSP + 0x38]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x001012b8
MOV RDI,RBX
LAB_001012a7:
CALL 0x00101270 | /* func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&) [clone
.cold] */
void 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
,long param_11)
{
long unaff_R12;
long in_FS_OFF... |
2,243 | func0 | #include <cassert>
#include <vector>
#include <map>
using namespace std;
| map<int, vector<int>> func0(const vector<pair<int, int>>& test_list) {
map<int, vector<int>> res;
for (const auto &p : test_list) {
int key = p.first, val = p.second;
if (res.find(val) == res.end()) {
res[val] = vector<int>(); // ensure entry exists for val with an empty vector
... | int main() {
{
vector<pair<int, int>> test_list = { {5, 3}, {7, 5}, {2, 7}, {3, 8}, {8, 4} };
map<int, vector<int>> expected = {
{3, {8}},
{5, {3}},
{7, {5}},
{2, {7}},
{8, {4}},
{4, {}}
};
assert(func... | O3 | cpp | func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&):
endbr64
push %r15
push %r14
mov %rdi,%r14
push %r13
push %r12
push %rbp
push %rbx
lea 0x8(%rdi),%rbx
sub $0x58,%rsp
mov (%rsi),%r13
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
mov 0x8(%rsi)... | _Z5func0RKSt6vectorISt4pairIiiESaIS1_EE:
endbr64
push r14
push r13
push r12
mov r12, rdi
push rbp
push rbx
lea rbx, [rdi+8]
sub rsp, 40h
mov rbp, [rsi]
mov r13, [rsi+8]
mov rax, fs:28h
mov [rsp+68h+var_30], rax
xor eax, eax
mov dword ptr [rdi+8], 0
mov qword ptr [r... | long long func0(long long a1, int **a2, long long a3, long long a4, long long a5)
{
long long v6; // rbx
int *v7; // rbp
int *v8; // r13
long long i; // rsi
int v10; // edi
long long j; // rax
long long v12; // rcx
long long v13; // rdx
long long v14; // rdx
long long v15; // rax
void *v16; // rd... | func0:
LEA RDI,[RSP + 0x20]
CALL 0x00102b80
LAB_001012a6:
MOV RDI,qword ptr [R12 + 0x10]
CALL 0x001024c0
MOV RAX,qword ptr [RSP + 0x38]
SUB RAX,qword ptr FS:[0x28]
JNZ 0x001012d4
MOV RDI,RBX
LAB_001012c3:
CALL 0x00101270 | /* func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&) [clone
.cold] */
void 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
,long param_11)
{
long unaff_R12;
long in_FS_OFF... |
2,244 | func0 |
#include <vector>
#include <string>
#include <assert.h>
| int func0(std::vector<std::vector<int>> lst) {
int maxLength = 0;
for (auto& x : lst) {
if (x.size() > maxLength) {
maxLength = x.size();
}
}
return maxLength;
}
| int main() {
assert(func0({{1}, {1, 4}, {5, 6, 7, 8}}) == 4);
assert(func0({{0, 1}, {2, 2}, {3, 2, 1}}) == 3);
assert(func0({{7}, {22, 23}, {13, 14, 15}, {10, 20, 30, 40, 50}}) == 5);
return 0;
}
| O0 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x40,%rsp
mov %rdi,-0x38(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
movl $0x0,-0x2c(%rbp)
mov -0x38(%rbp),%rax
mov %rax,-0... | _Z5func0St6vectorIS_IiSaIiEESaIS1_EE:
endbr64
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_38], rdi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov [rbp+var_2C], 0
mov rax, [rbp+var_38]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov rdi, rax
call _ZNSt6vectorI... | long long func0(long long a1)
{
unsigned int v2; // [rsp+14h] [rbp-2Ch]
long long v3; // [rsp+18h] [rbp-28h] BYREF
_QWORD v4[2]; // [rsp+20h] [rbp-20h] BYREF
long long v5; // [rsp+30h] [rbp-10h]
unsigned long long v6; // [rsp+38h] [rbp-8h]
v6 = __readfsqword(0x28u);
v2 = 0;
v4[1] = a1;
v3 = std::vec... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x38],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOV dword ptr [RBP + -0x2c],0x0
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,RAX
CALL 0x00101d28
MOV qword pt... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > >) */
int func0(vector param_1)
{
bool bVar1;
ulong uVar2;
int4 in_register_0000003c;
long in_FS_OFFSET;
int local_34;
int8 local_30;
int8 local_28;
vector<std::vector<int,std::alloc... |
2,245 | func0 |
#include <vector>
#include <string>
#include <assert.h>
| int func0(std::vector<std::vector<int>> lst) {
int maxLength = 0;
for (auto& x : lst) {
if (x.size() > maxLength) {
maxLength = x.size();
}
}
return maxLength;
}
| int main() {
assert(func0({{1}, {1, 4}, {5, 6, 7, 8}}) == 4);
assert(func0({{0, 1}, {2, 2}, {3, 2, 1}}) == 3);
assert(func0({{7}, {22, 23}, {13, 14, 15}, {10, 20, 30, 40, 50}}) == 5);
return 0;
}
| O1 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >):
endbr64
mov (%rdi),%rdx
mov 0x8(%rdi),%rdi
cmp %rdi,%rdx
je 12de <_Z5func0St6vectorIS_IiSaIiEESaIS1_EE+0x35>
mov $0x0,%ecx
mov 0x8(%rdx),%rax
sub (%rdx),%rax
sar $0x2,%rax
movsl... | _Z5func0St6vectorIS_IiSaIiEESaIS1_EE:
endbr64
mov rdx, [rdi]
mov rdi, [rdi+8]
cmp rdi, rdx
jz short loc_12DE
mov ecx, 0
loc_12BE:
mov rax, [rdx+8]
sub rax, [rdx]
sar rax, 2
movsxd rsi, ecx
cmp rsi, rax
cmovb ecx, eax
add rdx, 18h
cmp rdi, rdx
jnz short loc_12BE
loc_12... | long long func0(long long a1)
{
_QWORD *v1; // rdx
_QWORD *v2; // rdi
unsigned int v3; // ecx
v1 = *(_QWORD **)a1;
v2 = *(_QWORD **)(a1 + 8);
if ( v2 == v1 )
{
return 0;
}
else
{
v3 = 0;
do
{
if ( (int)v3 < (unsigned long long)((long long)(v1[1] - *v1) >> 2) )
v3 = (l... | func0:
ENDBR64
MOV RDX,qword ptr [RDI]
MOV RDI,qword ptr [RDI + 0x8]
CMP RDI,RDX
JZ 0x001012de
MOV ECX,0x0
LAB_001012be:
MOV RAX,qword ptr [RDX + 0x8]
SUB RAX,qword ptr [RDX]
SAR RAX,0x2
MOVSXD RSI,ECX
CMP RSI,RAX
CMOVC ECX,EAX
ADD RDX,0x18
CMP RDI,RDX
JNZ 0x001012be
LAB_001012db:
MOV EAX,ECX
RET
LAB_001012de:
MOV ECX,... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > >) */
int func0(vector param_1)
{
long *plVar1;
ulong uVar2;
int iVar3;
long *plVar4;
int4 in_register_0000003c;
plVar4 = *(long **)CONCAT44(in_register_0000003c,param_1);
plVar1 = ... |
2,246 | func0 |
#include <vector>
#include <string>
#include <assert.h>
| int func0(std::vector<std::vector<int>> lst) {
int maxLength = 0;
for (auto& x : lst) {
if (x.size() > maxLength) {
maxLength = x.size();
}
}
return maxLength;
}
| int main() {
assert(func0({{1}, {1, 4}, {5, 6, 7, 8}}) == 4);
assert(func0({{0, 1}, {2, 2}, {3, 2, 1}}) == 3);
assert(func0({{7}, {22, 23}, {13, 14, 15}, {10, 20, 30, 40, 50}}) == 5);
return 0;
}
| O2 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >):
endbr64
mov (%rdi),%rdx
mov 0x8(%rdi),%rsi
xor %r8d,%r8d
cmp %rsi,%rdx
je 17c6 <_Z5func0St6vectorIS_IiSaIiEESaIS1_EE+0x36>
nopl 0x0(%rax,%rax,1)
mov 0x8(%rdx),%rax
sub (%rdx),%ra... | _Z5func0St6vectorIS_IiSaIiEESaIS1_EE:
endbr64
mov rdx, [rdi]
mov rdi, [rdi+8]
xor ecx, ecx
cmp rdi, rdx
jz short loc_1825
nop word ptr [rax+rax+00h]
loc_1808:
mov rax, [rdx+8]
sub rax, [rdx]
movsxd rsi, ecx
sar rax, 2
cmp rsi, rax
cmovb ecx, eax
add rdx, 18h
cmp rdi, ... | long long func0(long long a1)
{
_QWORD *v1; // rdx
_QWORD *v2; // rdi
unsigned int i; // ecx
v1 = *(_QWORD **)a1;
v2 = *(_QWORD **)(a1 + 8);
for ( i = 0; v2 != v1; v1 += 3 )
{
if ( (int)i < (unsigned long long)((long long)(v1[1] - *v1) >> 2) )
i = (long long)(v1[1] - *v1) >> 2;
}
return i;... | func0:
ENDBR64
MOV RDX,qword ptr [RDI]
MOV RDI,qword ptr [RDI + 0x8]
XOR ECX,ECX
CMP RDI,RDX
JZ 0x00101825
NOP word ptr [RAX + RAX*0x1]
LAB_00101808:
MOV RAX,qword ptr [RDX + 0x8]
SUB RAX,qword ptr [RDX]
MOVSXD RSI,ECX
SAR RAX,0x2
CMP RSI,RAX
CMOVC ECX,EAX
ADD RDX,0x18
CMP RDI,RDX
JNZ 0x00101808
LAB_00101825:
MOV EAX,E... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > >) */
int func0(vector param_1)
{
ulong uVar1;
int iVar2;
long *plVar3;
int4 in_register_0000003c;
iVar2 = 0;
for (plVar3 = *(long **)CONCAT44(in_register_0000003c,param_1);
(lo... |
2,247 | func0 |
#include <vector>
#include <string>
#include <assert.h>
| int func0(std::vector<std::vector<int>> lst) {
int maxLength = 0;
for (auto& x : lst) {
if (x.size() > maxLength) {
maxLength = x.size();
}
}
return maxLength;
}
| int main() {
assert(func0({{1}, {1, 4}, {5, 6, 7, 8}}) == 4);
assert(func0({{0, 1}, {2, 2}, {3, 2, 1}}) == 3);
assert(func0({{7}, {22, 23}, {13, 14, 15}, {10, 20, 30, 40, 50}}) == 5);
return 0;
}
| O3 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >):
endbr64
mov (%rdi),%rdx
mov 0x8(%rdi),%rsi
xor %r8d,%r8d
cmp %rsi,%rdx
je 1816 <_Z5func0St6vectorIS_IiSaIiEESaIS1_EE+0x36>
nopl 0x0(%rax,%rax,1)
mov 0x8(%rdx),%rax
sub (%rdx),%ra... | _Z5func0St6vectorIS_IiSaIiEESaIS1_EE:
endbr64
mov rdx, [rdi]
mov rdi, [rdi+8]
xor ecx, ecx
cmp rdi, rdx
jz short loc_1965
nop word ptr [rax+rax+00h]
loc_1948:
mov rax, [rdx+8]
sub rax, [rdx]
movsxd rsi, ecx
sar rax, 2
cmp rsi, rax
cmovb ecx, eax
add rdx, 18h
cmp rdi, ... | long long func0(long long a1)
{
_QWORD *v1; // rdx
_QWORD *v2; // rdi
unsigned int i; // ecx
v1 = *(_QWORD **)a1;
v2 = *(_QWORD **)(a1 + 8);
for ( i = 0; v2 != v1; v1 += 3 )
{
if ( (int)i < (unsigned long long)((long long)(v1[1] - *v1) >> 2) )
i = (long long)(v1[1] - *v1) >> 2;
}
return i;... | func0:
ENDBR64
MOV RDX,qword ptr [RDI]
MOV RDI,qword ptr [RDI + 0x8]
XOR ECX,ECX
CMP RDI,RDX
JZ 0x00101965
NOP word ptr [RAX + RAX*0x1]
LAB_00101948:
MOV RAX,qword ptr [RDX + 0x8]
SUB RAX,qword ptr [RDX]
MOVSXD RSI,ECX
SAR RAX,0x2
CMP RSI,RAX
CMOVC ECX,EAX
ADD RDX,0x18
CMP RDI,RDX
JNZ 0x00101948
LAB_00101965:
MOV EAX,E... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > >) */
int func0(vector param_1)
{
ulong uVar1;
int iVar2;
long *plVar3;
int4 in_register_0000003c;
iVar2 = 0;
for (plVar3 = *(long **)CONCAT44(in_register_0000003c,param_1);
(lo... |
2,248 | func0 | #include <iostream>
#include <string>
#include <regex>
#include <vector>
#include <cassert>
| std::vector<std::string> func0(const std::string &text) {
std::vector<std::string> results;
std::regex pattern("\"(.*?)\"");
auto begin = std::sregex_iterator(text.begin(), text.end(), pattern);
auto end = std::sregex_iterator();
for (std::sregex_iterator i = begin; i != end; ++i) {
st... | int main() {
{
std::vector<std::string> expected = {"Python", "PHP", "Java"};
std::vector<std::string> actual = func0("\"Python\", \"PHP\", \"Java\"");
assert(actual == expected);
}
{
std::vector<std::string> expected = {"python", "program", "language"};
std::... | 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
mov -0x148(%rbp),%rax
mov %rax,%rdi
cal... | _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
mov rax, [rbp+var_148]
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
long long v5; // rax
_BYTE v7[32]; // [rsp+10h] [rbp-140h] BYREF
_BYTE v8[32]; // [rsp+30h] [rbp-120h] BYREF
_BYTE v9[64]; // [rsp+50h] [rbp-100h] BYREF
_OWORD v10[4]; // [rsp+90h] [rbp-C0h] BYR... | 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
MOV RAX,qword ptr [RBP + -0x148]
MOV RDI,RAX
CALL 0x00106318
LEA RAX,[RBP + -0x140]
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;
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... |
2,249 | func0 | #include <iostream>
#include <string>
#include <regex>
#include <vector>
#include <cassert>
| std::vector<std::string> func0(const std::string &text) {
std::vector<std::string> results;
std::regex pattern("\"(.*?)\"");
auto begin = std::sregex_iterator(text.begin(), text.end(), pattern);
auto end = std::sregex_iterator();
for (std::sregex_iterator i = begin; i != end; ++i) {
st... | int main() {
{
std::vector<std::string> expected = {"Python", "PHP", "Java"};
std::vector<std::string> actual = func0("\"Python\", \"PHP\", \"Java\"");
assert(actual == expected);
}
{
std::vector<std::string> expected = {"python", "program", "language"};
std::... | 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
movq $0x0,(%rdi)
movq $0x0... | _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
mov qword ptr [rdi], 0
mov qword ptr... | _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; // rax
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
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
LEA RAX,[RBP + -0x2c8]
MOV R15,RAX
MOV RDI,R... | /* 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;
sub_match *psVar8;
ulong uVar9;
uint uVar10;
sub_match ... |
2,250 | func0 | #include <iostream>
#include <string>
#include <regex>
#include <vector>
#include <cassert>
| std::vector<std::string> func0(const std::string &text) {
std::vector<std::string> results;
std::regex pattern("\"(.*?)\"");
auto begin = std::sregex_iterator(text.begin(), text.end(), pattern);
auto end = std::sregex_iterator();
for (std::sregex_iterator i = begin; i != end; ++i) {
st... | int main() {
{
std::vector<std::string> expected = {"Python", "PHP", "Java"};
std::vector<std::string> actual = func0("\"Python\", \"PHP\", \"Java\"");
assert(actual == expected);
}
{
std::vector<std::string> expected = {"python", "program", "language"};
std::... | 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
movq $0x0,(%rdi)
lea 0x48... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
pxor xmm0, xmm0
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 rax, fs:28h
mov [rbp+var_38], rax
xor ... | 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
PXOR XMM0,XMM0
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 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)
{
long lVar1;
int *__src;
int auVar2 [16];
int auVar3 [16];
bool bVar4;
int iVar5;
long *plVar6;
long *plVar7;
long *plVar8;
long lVar9;
uint uVar10;
long *plVar11;
regex *prVar12;
uint uVar13;
long *plVar14;
long *in_RSI;... |
2,251 | func0 | #include <iostream>
#include <string>
#include <regex>
#include <vector>
#include <cassert>
| std::vector<std::string> func0(const std::string &text) {
std::vector<std::string> results;
std::regex pattern("\"(.*?)\"");
auto begin = std::sregex_iterator(text.begin(), text.end(), pattern);
auto end = std::sregex_iterator();
for (std::sregex_iterator i = begin; i != end; ++i) {
st... | int main() {
{
std::vector<std::string> expected = {"Python", "PHP", "Java"};
std::vector<std::string> actual = func0("\"Python\", \"PHP\", \"Java\"");
assert(actual == expected);
}
{
std::vector<std::string> expected = {"python", "program", "language"};
std::... | 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 $0x288,%rsp
mov %fs:0x28,%rax
mov %rax,0x278(%rsp)
xor %eax,%eax
movq $0x0... | _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_2C8]
sub rsp, 2E8h
mov [rbp+var_2E8], rdi
mov rax, fs:28h
mov [rbp+var_38], rax
xor ... | 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
PXOR XMM0,XMM0
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 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)
{
vector<std::sub_match<__normal_iterator<char_const*,std::string>>,std::allocator<std::sub_match<__normal_iterator<char_const*,std::string>>>>
*pvVar1;
long lVar2;
int8 uVar3;
int auVar4 [16];
int auVar5 [16];
bool bVar6;
int8 *puVar7;
... |
2,252 | func0 |
#include <assert.h>
| int func0(int arr[], int n) {
int cnt = 0;
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
if (arr[i] != arr[j]) {
cnt += 1;
}
}
}
return cnt;
}
| int main() {
int arr1[] = {1, 2, 1};
int arr2[] = {1, 1, 1, 1};
int arr3[] = {1, 2, 3, 4, 5};
assert(func0(arr1, 3) == 2);
assert(func0(arr2, 4) == 0);
assert(func0(arr3, 5) == 10);
return 0;
}
| O0 | cpp | func0(int*, int):
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
movl $0x0,-0xc(%rbp)
movl $0x0,-0x8(%rbp)
mov -0x8(%rbp),%eax
cmp -0x1c(%rbp),%eax
jge 11df <_Z5func0Pii+0x76>
mov -0x8(%rbp),%eax
add $0x1,%eax
mov %eax,-0x4(%rbp)
mov -0x4(%rbp),%eax
cmp ... | _Z5func0Pii:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_C], 0
mov [rbp+var_8], 0
jmp short loc_11D7
loc_1188:
mov eax, [rbp+var_8]
add eax, 1
mov [rbp+var_4], eax
jmp short loc_11CB
loc_1193:
mov eax, [rbp+var_8]
cdqe
lea rdx... | long long func0(int *a1, int a2)
{
unsigned int v3; // [rsp+10h] [rbp-Ch]
int i; // [rsp+14h] [rbp-8h]
int j; // [rsp+18h] [rbp-4h]
v3 = 0;
for ( i = 0; i < a2; ++i )
{
for ( j = i + 1; j < a2; ++j )
{
if ( a1[i] != a1[j] )
++v3;
}
}
return v3;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0xc],0x0
MOV dword ptr [RBP + -0x8],0x0
JMP 0x001011d7
LAB_00101188:
MOV EAX,dword ptr [RBP + -0x8]
ADD EAX,0x1
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001011cb
LAB_00101193:
MOV EAX,dword ptr [RBP + -... | /* func0(int*, int) */
int func0(int *param_1,int param_2)
{
int local_14;
int local_10;
int local_c;
local_14 = 0;
for (local_10 = 0; local_c = local_10, local_10 < param_2; local_10 = local_10 + 1) {
while (local_c = local_c + 1, local_c < param_2) {
if (param_1[local_10] != param_1[local_c])... |
2,253 | func0 |
#include <assert.h>
| int func0(int arr[], int n) {
int cnt = 0;
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
if (arr[i] != arr[j]) {
cnt += 1;
}
}
}
return cnt;
}
| int main() {
int arr1[] = {1, 2, 1};
int arr2[] = {1, 1, 1, 1};
int arr3[] = {1, 2, 3, 4, 5};
assert(func0(arr1, 3) == 2);
assert(func0(arr2, 4) == 0);
assert(func0(arr3, 5) == 10);
return 0;
}
| O1 | cpp | func0(int*, int):
endbr64
test %esi,%esi
jle 11ab <_Z5func0Pii+0x42>
lea -0x1(%rsi),%r9d
add $0x1,%r9
mov $0x1,%r8d
mov $0x0,%edx
jmp 119c <_Z5func0Pii+0x33>
add $0x1,%edx
add $0x1,%rax
cmp %eax,%esi
jle 1198 <_Z5func0Pii+0x2f>
cmp (%rdi,%rax,4),%ecx
jne 1186 <_Z5func0Pii+0x1d>
jmp... | _Z5func0Pii:
endbr64
test esi, esi
jle short loc_11B1
mov r9d, esi
movsxd r10, esi
mov r8d, 1
mov edx, 0
jmp short loc_11A2
loc_1184:
add edx, 1
loc_1187:
add rax, 1
cmp esi, eax
jle short loc_1196
loc_118F:
cmp ecx, [rdi+rax*4]
jnz short loc_1184
jmp short loc_1187
l... | long long func0(int *a1, int a2)
{
long long v2; // r8
unsigned int v3; // edx
long long v4; // rax
if ( a2 <= 0 )
{
return 0;
}
else
{
v2 = 1LL;
v3 = 0;
while ( v2 != a2 )
{
v4 = v2;
do
{
if ( a1[v2 - 1] != a1[v4] )
++v3;
++v4;
}
... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x001011b1
MOV R9D,ESI
MOVSXD R10,ESI
MOV R8D,0x1
MOV EDX,0x0
JMP 0x001011a2
LAB_00101184:
ADD EDX,0x1
LAB_00101187:
ADD RAX,0x1
CMP ESI,EAX
JLE 0x00101196
LAB_0010118f:
CMP ECX,dword ptr [RDI + RAX*0x4]
JNZ 0x00101184
JMP 0x00101187
LAB_00101196:
LEA RAX,[R8 + 0x1]
CMP R8,R10
JZ 0x00101... | /* func0(int*, int) */
int func0(int *param_1,int param_2)
{
ulong uVar1;
int iVar2;
ulong uVar3;
bool bVar4;
if (param_2 < 1) {
iVar2 = 0;
}
else {
iVar2 = 0;
uVar3 = 1;
do {
if (uVar3 == (uint)param_2) {
return iVar2;
}
uVar1 = uVar3;
do {
if ... |
2,254 | func0 |
#include <assert.h>
| int func0(int arr[], int n) {
int cnt = 0;
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
if (arr[i] != arr[j]) {
cnt += 1;
}
}
}
return cnt;
}
| int main() {
int arr1[] = {1, 2, 1};
int arr2[] = {1, 1, 1, 1};
int arr3[] = {1, 2, 3, 4, 5};
assert(func0(arr1, 3) == 2);
assert(func0(arr2, 4) == 0);
assert(func0(arr3, 5) == 10);
return 0;
}
| O2 | cpp | func0(int*, int):
endbr64
test %esi,%esi
jle 136e <_Z5func0Pii+0x4e>
lea -0x1(%rsi),%r9d
mov $0x1,%ecx
xor %r8d,%r8d
add $0x1,%r9
cmp %r9,%rcx
je 136a <_Z5func0Pii+0x4a>
nopl (%rax)
mov -0x4(%rdi,%rcx,4),%edx
mov %rcx,%rax
nopw 0x0(%rax,%rax,1)
cmp (%rdi,%rax,4),%edx
je 1359 <_Z... | _Z5func0Pii:
endbr64
test esi, esi
jle short loc_12BC
mov r9d, esi
mov r8d, 1
xor edx, edx
cmp esi, 1
jz short loc_12B9
nop dword ptr [rax+rax+00000000h]
loc_1290:
mov ecx, [rdi+r8*4-4]
mov rax, r8
nop dword ptr [rax+rax+00000000h]
loc_12A0:
cmp ecx, [rdi+rax*4]
jz s... | long long func0(int *a1, int a2)
{
long long v2; // r8
unsigned int v3; // edx
long long v4; // rax
if ( a2 <= 0 )
return 0LL;
v2 = 1LL;
v3 = 0;
if ( a2 != 1 )
{
do
{
v4 = v2;
do
{
if ( a1[v2 - 1] != a1[v4] )
++v3;
++v4;
}
while ( a2 ... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x001012bc
MOV R9D,ESI
MOV R8D,0x1
XOR EDX,EDX
CMP ESI,0x1
JZ 0x001012b9
NOP dword ptr [RAX + RAX*0x1]
LAB_00101290:
MOV ECX,dword ptr [RDI + R8*0x4 + -0x4]
MOV RAX,R8
NOP dword ptr [RAX + RAX*0x1]
LAB_001012a0:
CMP ECX,dword ptr [RDI + RAX*0x4]
JZ 0x001012a8
ADD EDX,0x1
LAB_001012a8:
AD... | /* func0(int*, int) */
int func0(int *param_1,int param_2)
{
ulong uVar1;
int iVar2;
ulong uVar3;
if (param_2 < 1) {
return 0;
}
uVar3 = 1;
iVar2 = 0;
if (param_2 != 1) {
do {
uVar1 = uVar3;
do {
if (param_1[uVar3 - 1] != param_1[uVar1]) {
iVar2 = iVar2 + 1;
... |
2,255 | func0 |
#include <assert.h>
| int func0(int arr[], int n) {
int cnt = 0;
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
if (arr[i] != arr[j]) {
cnt += 1;
}
}
}
return cnt;
}
| int main() {
int arr1[] = {1, 2, 1};
int arr2[] = {1, 1, 1, 1};
int arr3[] = {1, 2, 3, 4, 5};
assert(func0(arr1, 3) == 2);
assert(func0(arr2, 4) == 0);
assert(func0(arr3, 5) == 10);
return 0;
}
| O3 | cpp | func0(int*, int):
endbr64
test %esi,%esi
jle 143d <_Z5func0Pii+0x12d>
cmp $0x1,%esi
je 143d <_Z5func0Pii+0x12d>
push %rbp
lea 0x4(%rdi),%r10
xor %r8d,%r8d
mov $0x1,%ecx
push %rbx
lea -0x1(%rsi),%ebp
mov $0x1,%ebx
pcmpeqd %xmm3,%xmm3
mov %esi,%r9d
mov %ebp,%eax
mov -0x4(%r10),%r11... | _Z5func0Pii:
endbr64
test esi, esi
jle loc_1258
cmp esi, 1
jz loc_1258
push rbp
mov r11, rdi
lea r9, [rdi+4]
xor r8d, r8d
push rbx
mov ecx, 1
lea ebp, [rsi-1]
mov ebx, 1
pxor xmm3, xmm3
nop word ptr [rax+rax+00h]
loc_1178:
mov edi, esi
mov eax, ebp
mov r1... | long long func0(int *a1, int a2)
{
int *v3; // r9
unsigned int v4; // r8d
int v5; // ecx
unsigned int v6; // r10d
unsigned int v7; // edi
__m128i v8; // xmm1
const __m128i *v9; // rax
__m128i v10; // xmm2
__m128i v11; // xmm0
__m128i v12; // xmm1
int v13; // eax
long long v14; // rdi
if ( a2... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x00101258
CMP ESI,0x1
JZ 0x00101258
PUSH RBP
MOV R11,RDI
LEA R9,[RDI + 0x4]
XOR R8D,R8D
PUSH RBX
MOV ECX,0x1
LEA EBP,[RSI + -0x1]
MOV EBX,0x1
PXOR XMM3,XMM3
NOP word ptr [RAX + RAX*0x1]
LAB_00101178:
MOV EDI,ESI
MOV EAX,EBP
MOV R10D,dword ptr [R9 + -0x4]
SUB EDI,ECX
CMP ESI,ECX
CMOVLE E... | /* func0(int*, int) */
int func0(int *param_1,int param_2)
{
int iVar1;
uint uVar2;
int iVar3;
int *piVar4;
int *piVar5;
int *piVar6;
int *piVar7;
int iVar8;
int iVar9;
int *piVar10;
int iVar11;
int iVar12;
int iVar13;
int iVar14;
if ((param_2 < 1) || (param_2 == 1)) {
return 0;
... |
2,256 | func0 |
#include <vector>
#include <string>
#include <assert.h>
| std::vector<char> func0(const std::string& word) {
std::vector<char> chars;
for (char c : word) {
chars.push_back(c);
}
return chars;
}
| int main() {
std::vector<char> result1 = {'p','y','t','h','o','n'};
std::vector<char> result2 = {'N','a','m','e'};
std::vector<char> result3 = {'p','r','o','g','r','a','m'};
assert(func0("python") == result1);
assert(func0("Name") == result2);
assert(func0("program") == result3);
retu... | 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 $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 ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
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 _ZNSt6vectorIcSaIcEEC2Ev... | long long func0(long long a1, long long a2)
{
char v3; // [rsp+1Fh] [rbp-31h] BYREF
long long v4; // [rsp+20h] [rbp-30h] BYREF
_QWORD v5[4]; // [rsp+28h] [rbp-28h] BYREF
v5[2] = __readfsqword(0x28u);
std::vector<char>::vector(a1);
v5[1] = a2;
v4 = std::string::begin(a2);
v5[0] = std::string::end(a2);
... | 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 0x00101ac4
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x20],RAX
MO... | /* func0(std::string const&) */
string * func0(string *param_1)
{
bool bVar1;
char *pcVar2;
long in_FS_OFFSET;
char local_39;
int8 local_38;
int8 local_30 [2];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
std::vector<char,std::allocator<char>>::vector((vector<char,std::allocator<char... |
2,257 | func0 |
#include <vector>
#include <string>
#include <assert.h>
| std::vector<char> func0(const std::string& word) {
std::vector<char> chars;
for (char c : word) {
chars.push_back(c);
}
return chars;
}
| int main() {
std::vector<char> result1 = {'p','y','t','h','o','n'};
std::vector<char> result2 = {'N','a','m','e'};
std::vector<char> result3 = {'p','r','o','g','r','a','m'};
assert(func0("python") == result1);
assert(func0("Name") == result2);
assert(func0("program") == result3);
retu... | O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
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 (%r... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
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,... | _QWORD * func0(_QWORD *a1, long long a2)
{
char *v2; // rbp
char *v3; // r12
char v4; // al
_BYTE *v5; // rsi
char v7; // [rsp+7h] [rbp-31h] BYREF
unsigned long long v8; // [rsp+8h] [rbp-30h]
v8 = __readfsqword(0x28u);
*a1 = 0LL;
a1[1] = 0LL;
a1[2] = 0LL;
v2 = *(char **)a2;
v3 = (char *)(*(_QWO... | 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,RBP
ADD R12,qword ptr [RSI + 0x8]
CMP R12,RBP
JZ 0x001013... | /* func0(std::string const&) */
string * func0(string *param_1)
{
char *pcVar1;
char *pcVar2;
int8 *in_RSI;
char *pcVar3;
long in_FS_OFFSET;
char local_31;
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0... |
2,258 | func0 |
#include <vector>
#include <string>
#include <assert.h>
| std::vector<char> func0(const std::string& word) {
std::vector<char> chars;
for (char c : word) {
chars.push_back(c);
}
return chars;
}
| int main() {
std::vector<char> result1 = {'p','y','t','h','o','n'};
std::vector<char> result2 = {'N','a','m','e'};
std::vector<char> result3 = {'p','r','o','g','r','a','m'};
assert(func0("python") == result1);
assert(func0("Name") == result2);
assert(func0("program") == result3);
retu... | O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x18,%rsp
mov 0x8(%rsi),%rbp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r13
pxor xmm0, xmm0
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 18h
mov r12, [rsi+8]
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], x... | long long func0(long long a1, long long a2)
{
long long v2; // r12
char *v3; // rbx
char *v4; // r12
_BYTE *v5; // rdx
_BYTE *v6; // rsi
char v7; // al
char v9; // [rsp+1h] [rbp-31h] BYREF
unsigned long long v10; // [rsp+2h] [rbp-30h]
v2 = *(_QWORD *)(a2 + 8);
v10 = __readfsqword(0x28u);
*(_QWOR... | func0:
ENDBR64
PUSH R13
PXOR XMM0,XMM0
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x18
MOV R12,qword ptr [RSI + 0x8]
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]
ADD R12,RBX
CMP R12,RBX
JZ 0x001016b0
XOR ED... | /* func0(std::string const&) */
string * func0(string *param_1)
{
long lVar1;
char *pcVar2;
char *pcVar3;
int8 *in_RSI;
char *pcVar4;
char *pcVar5;
long in_FS_OFFSET;
char local_31;
long local_30;
lVar1 = in_RSI[1];
local_30 = *(long *)(in_FS_OFFSET + 0x28);
*(int8 *)(param_1 + 0x10) = 0;
... |
2,259 | func0 |
#include <vector>
#include <string>
#include <assert.h>
| std::vector<char> func0(const std::string& word) {
std::vector<char> chars;
for (char c : word) {
chars.push_back(c);
}
return chars;
}
| int main() {
std::vector<char> result1 = {'p','y','t','h','o','n'};
std::vector<char> result2 = {'N','a','m','e'};
std::vector<char> result3 = {'p','r','o','g','r','a','m'};
assert(func0("python") == result1);
assert(func0("Name") == result2);
assert(func0("program") == result3);
retu... | O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r13
pxor %xmm0,%xmm0
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x18,%rsp
mov 0x8(%rsi),%rbp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,0x10(%rdi)
movups %xm... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 28h
mov qword ptr [rdi+10h], 0
mov r13, [rsi+8]
movups xmmword ptr [rdi], xmm0
mov rbx, [rsi]
add r13, rbx
cmp... | long long func0(long long a1, long long a2)
{
long long v2; // r13
char *v3; // rbx
char *v4; // r13
_BYTE *v5; // rax
_BYTE *v6; // rcx
char v7; // r12
void *v8; // r15
unsigned long long v9; // rcx
signed long long v10; // r14
long long v11; // rax
unsigned long long v12; // rdx
_BYTE *v13; /... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RDI + 0x10],0x0
MOV R13,qword ptr [RSI + 0x8]
MOVUPS xmmword ptr [RDI],XMM0
MOV RBX,qword ptr [RSI]
ADD R13,RBX
CMP R13,RBX
JZ 0x00101746
XOR EAX,EAX
XOR ECX,ECX
JMP 0x00101670
LAB_00101650:
MOV b... | /* func0(std::string const&) */
string * func0(string *param_1)
{
int uVar1;
long lVar2;
void *__src;
ulong uVar3;
ulong uVar4;
int *puVar5;
string *psVar6;
int *puVar7;
ulong uVar8;
int *puVar9;
int8 *in_RSI;
char *pcVar10;
int *puVar11;
ulong local_50;
*(int8 *)(param_1 + 0x10) = 0;... |
2,260 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
if (n == 0) {
return 0;
} else {
return n % 10 + func0(n / 10);
}
}
| int main() {
assert(func0(345) == 12);
assert(func0(12) == 3);
assert(func0(97) == 16);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x18,%rsp
mov %edi,-0x14(%rbp)
cmpl $0x0,-0x14(%rbp)
jne 11a6 <_Z5func0i+0x1d>
mov $0x0,%eax
jmp 11f6 <_Z5func0i+0x6d>
mov -0x14(%rbp),%edx
movslq %edx,%rax
imul $0x66666667,%rax,%rax
shr $0x20,%rax
mov %eax,%ecx
sar $0x2,%... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 18h
mov [rbp+var_14], edi
cmp [rbp+var_14], 0
jnz short loc_1166
mov eax, 0
jmp short loc_11B6
loc_1166:
mov edx, [rbp+var_14]
movsxd rax, edx
imul rax, 66666667h
shr rax, 20h
mov ecx, eax
sar ecx, 2
mov ... | long long func0(int a1)
{
if ( a1 )
return a1 % 10 + (unsigned int)func0(a1 / 10);
else
return 0LL;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x18
MOV dword ptr [RBP + -0x14],EDI
CMP dword ptr [RBP + -0x14],0x0
JNZ 0x00101166
MOV EAX,0x0
JMP 0x001011b6
LAB_00101166:
MOV EDX,dword ptr [RBP + -0x14]
MOVSXD RAX,EDX
IMUL RAX,RAX,0x66666667
SHR RAX,0x20
MOV ECX,EAX
SAR ECX,0x2
MOV EAX,EDX
SAR EAX,0x1f
MOV EBX,E... | /* func0(int) */
int func0(int param_1)
{
int iVar1;
if (param_1 == 0) {
iVar1 = 0;
}
else {
iVar1 = func0(param_1 / 10);
iVar1 = iVar1 + param_1 % 10;
}
return iVar1;
} |
2,261 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
if (n == 0) {
return 0;
} else {
return n % 10 + func0(n / 10);
}
}
| int main() {
assert(func0(345) == 12);
assert(func0(12) == 3);
assert(func0(97) == 16);
return 0;
}
| O1 | cpp | func0(int):
endbr64
push %rbp
push %rbx
sub $0x8,%rsp
mov %edi,%ebx
test %edi,%edi
jne 11a2 <_Z5func0i+0x19>
mov %ebx,%eax
add $0x8,%rsp
pop %rbx
pop %rbp
retq
movslq %edi,%rbp
imul $0x66666667,%rbp,%rbp
sar $0x22,%rbp
mov %edi,%eax
sar $0x1f,%eax
sub %eax,%ebp
mov %ebp,%edi
... | _Z5func0i:
endbr64
push rbp
push rbx
sub rsp, 8
mov ebx, edi
test edi, edi
jnz short loc_1162
loc_1159:
mov eax, ebx
add rsp, 8
pop rbx
pop rbp
retn
loc_1162:
movsxd rbp, edi
imul rbp, 66666667h
sar rbp, 22h
mov eax, edi
sar eax, 1Fh
sub ebp, eax
mov edi, ebp... | long long func0(signed int a1)
{
unsigned int v1; // ebx
v1 = a1;
if ( a1 )
return (unsigned int)func0(a1 / 10) + a1 % 10;
return v1;
} | func0:
ENDBR64
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV EBX,EDI
TEST EDI,EDI
JNZ 0x00101162
LAB_00101159:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP RBP
RET
LAB_00101162:
MOVSXD RBP,EDI
IMUL RBP,RBP,0x66666667
SAR RBP,0x22
MOV EAX,EDI
SAR EAX,0x1f
SUB EBP,EAX
MOV EDI,EBP
CALL 0x00101149
MOV EDX,EAX
LEA EAX,[RBP + RBP*0x4]
ADD EAX,EA... | /* func0(int) */
int func0(int param_1)
{
int iVar1;
if (param_1 != 0) {
iVar1 = func0(param_1 / 10);
param_1 = param_1 % 10 + iVar1;
}
return param_1;
} |
2,262 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
if (n == 0) {
return 0;
} else {
return n % 10 + func0(n / 10);
}
}
| int main() {
assert(func0(345) == 12);
assert(func0(12) == 3);
assert(func0(97) == 16);
return 0;
}
| O2 | cpp | func0(int):
endbr64
xor %r8d,%r8d
test %edi,%edi
je 11f9 <_Z5func0i+0x39>
nopl 0x0(%rax,%rax,1)
movslq %edi,%rax
mov %edi,%edx
imul $0x66666667,%rax,%rax
sar $0x1f,%edx
sar $0x22,%rax
sub %edx,%eax
mov %eax,%edx
lea (%rax,%rax,4),%eax
add %eax,%eax
sub %eax,%edi
mov %edi,%eax
mov... | _Z5func0i:
endbr64
xor esi, esi
test edi, edi
jz short loc_1178
nop word ptr [rax+rax+00h]
loc_1150:
movsxd rax, edi
mov edx, edi
imul rax, 66666667h
sar edx, 1Fh
sar rax, 22h
sub eax, edx
lea ecx, [rax+rax*4]
mov edx, eax
mov eax, edi
add ecx, ecx
mov edi, edx
su... | long long func0(int a1)
{
unsigned int i; // esi
int v2; // eax
int v3; // ecx
for ( i = 0; a1; i += v2 - v3 )
{
v2 = a1;
v3 = 10 * (a1 / 10);
a1 /= 10;
}
return i;
} | func0:
ENDBR64
XOR ESI,ESI
TEST EDI,EDI
JZ 0x00101178
NOP word ptr [RAX + RAX*0x1]
LAB_00101150:
MOVSXD RAX,EDI
MOV EDX,EDI
IMUL RAX,RAX,0x66666667
SAR EDX,0x1f
SAR RAX,0x22
SUB EAX,EDX
LEA ECX,[RAX + RAX*0x4]
MOV EDX,EAX
MOV EAX,EDI
ADD ECX,ECX
MOV EDI,EDX
SUB EAX,ECX
ADD ESI,EAX
TEST EDX,EDX
JNZ 0x00101150
LAB_001011... | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
iVar2 = 0;
if (param_1 != 0) {
do {
iVar1 = param_1 / 10;
iVar2 = iVar2 + param_1 % 10;
param_1 = iVar1;
} while (iVar1 != 0);
}
return iVar2;
} |
2,263 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
if (n == 0) {
return 0;
} else {
return n % 10 + func0(n / 10);
}
}
| int main() {
assert(func0(345) == 12);
assert(func0(12) == 3);
assert(func0(97) == 16);
return 0;
}
| O3 | cpp | func0(int):
endbr64
xor %r8d,%r8d
test %edi,%edi
je 11f9 <_Z5func0i+0x39>
nopl 0x0(%rax,%rax,1)
movslq %edi,%rax
mov %edi,%edx
imul $0x66666667,%rax,%rax
sar $0x1f,%edx
sar $0x22,%rax
sub %edx,%eax
mov %eax,%edx
lea (%rax,%rax,4),%eax
add %eax,%eax
sub %eax,%edi
mov %edi,%eax
mov... | _Z5func0i:
endbr64
xor esi, esi
test edi, edi
jz short loc_1178
nop word ptr [rax+rax+00h]
loc_1150:
movsxd rax, edi
mov edx, edi
imul rax, 66666667h
sar edx, 1Fh
sar rax, 22h
sub eax, edx
lea ecx, [rax+rax*4]
mov edx, eax
mov eax, edi
add ecx, ecx
mov edi, edx
su... | long long func0(int a1)
{
unsigned int i; // esi
int v2; // eax
int v3; // ecx
for ( i = 0; a1; i += v2 - v3 )
{
v2 = a1;
v3 = 10 * (a1 / 10);
a1 /= 10;
}
return i;
} | func0:
ENDBR64
XOR ESI,ESI
TEST EDI,EDI
JZ 0x00101178
NOP word ptr [RAX + RAX*0x1]
LAB_00101150:
MOVSXD RAX,EDI
MOV EDX,EDI
IMUL RAX,RAX,0x66666667
SAR EDX,0x1f
SAR RAX,0x22
SUB EAX,EDX
LEA ECX,[RAX + RAX*0x4]
MOV EDX,EAX
MOV EAX,EDI
ADD ECX,ECX
MOV EDI,EDX
SUB EAX,ECX
ADD ESI,EAX
TEST EDX,EDX
JNZ 0x00101150
LAB_001011... | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
iVar2 = 0;
if (param_1 != 0) {
do {
iVar1 = param_1 / 10;
iVar2 = iVar2 + param_1 % 10;
param_1 = iVar1;
} while (iVar1 != 0);
}
return iVar2;
} |
2,264 | func0 |
#include <vector>
#include <assert.h>
| bool func0(const std::vector<int>& list1) {
for (int i = 0; i < list1.size() - 1; ++i) {
if (list1[i] > list1[i + 1]) {
return false;
}
}
return true;
}
| int main() {
assert(func0({1,2,4,6,8,10,12,14,16,17}) == true);
assert(func0({1, 2, 4, 6, 8, 10, 12, 14, 20, 17}) == false);
assert(func0({1, 2, 4, 6, 8, 10, 15, 14, 20}) == false);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x28,%rsp
mov %rdi,-0x28(%rbp)
movl $0x0,-0x14(%rbp)
mov -0x14(%rbp),%eax
movslq %eax,%rbx
mov -0x28(%rbp),%rax
mov %rax,%rdi
callq 15f6 <_ZNKSt6vectorIiSaIiEE4sizeEv>
sub $0x1,%rax
cmp %r... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 28h
mov [rbp+var_28], rdi
mov [rbp+var_14], 0
jmp short loc_12A8
loc_1263:
mov eax, [rbp+var_14]
movsxd rdx, eax
mov rax, [rbp+var_28]
mov rsi, rdx
mov rdi, rax
call _ZNKSt6vectorIiSaIiEEixEm; std:... | long long func0(long long a1)
{
int v1; // ebx
int i; // [rsp+1Ch] [rbp-14h]
for ( i = 0; i < (unsigned long long)(std::vector<int>::size(a1) - 1); ++i )
{
v1 = *(_DWORD *)std::vector<int>::operator[](a1, i);
if ( v1 > *(_DWORD *)std::vector<int>::operator[](a1, i + 1) )
return 0LL;
}
return... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x28],RDI
MOV dword ptr [RBP + -0x14],0x0
JMP 0x001012a8
LAB_00101263:
MOV EAX,dword ptr [RBP + -0x14]
MOVSXD RDX,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x00101682
MOV EBX,dword ptr [RAX]
MOV EAX,dword ptr [RBP + -... | /* func0(std::vector<int, std::allocator<int> > const&) */
int8 func0(vector *param_1)
{
int iVar1;
int *piVar2;
long lVar3;
int local_1c;
local_1c = 0;
while( true ) {
lVar3 = std::vector<int,std::allocator<int>>::size((vector<int,std::allocator<int>> *)param_1);
if (lVar3 - 1U <= (ulong)(long... |
2,265 | func0 |
#include <vector>
#include <assert.h>
| bool func0(const std::vector<int>& list1) {
for (int i = 0; i < list1.size() - 1; ++i) {
if (list1[i] > list1[i + 1]) {
return false;
}
}
return true;
}
| int main() {
assert(func0({1,2,4,6,8,10,12,14,16,17}) == true);
assert(func0({1, 2, 4, 6, 8, 10, 12, 14, 20, 17}) == false);
assert(func0({1, 2, 4, 6, 8, 10, 15, 14, 20}) == false);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rdx
mov 0x8(%rdi),%rsi
sub %rdx,%rsi
sar $0x2,%rsi
sub $0x1,%rsi
mov $0x0,%eax
cmp %rax,%rsi
je 123b <_Z5func0RKSt6vectorIiSaIiEE+0x32>
mov (%rdx,%rax,4),%ecx
add $0x1,%rax
cmp (%rdx,%rax,4),%ecx
jle 1224 <_Z5... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov rdx, [rdi]
mov rsi, [rdi+8]
sub rsi, rdx
sar rsi, 2
sub rsi, 1
mov eax, 0
loc_1224:
cmp rsi, rax
jz short loc_123B
mov ecx, [rdx+rax*4]
add rax, 1
cmp ecx, [rdx+rax*4]
jle short loc_1224
mov eax, 0
retn
loc_123B:
mov eax, ... | long long func0(long long *a1)
{
long long v1; // rdx
long long v2; // rax
int v3; // ecx
v1 = *a1;
v2 = 0LL;
while ( ((a1[1] - *a1) >> 2) - 1 != v2 )
{
v3 = *(_DWORD *)(v1 + 4 * v2++);
if ( v3 > *(_DWORD *)(v1 + 4 * v2) )
return 0LL;
}
return 1LL;
} | func0:
ENDBR64
MOV RDX,qword ptr [RDI]
MOV RSI,qword ptr [RDI + 0x8]
SUB RSI,RDX
SAR RSI,0x2
SUB RSI,0x1
MOV EAX,0x0
LAB_00101224:
CMP RSI,RAX
JZ 0x0010123b
MOV ECX,dword ptr [RDX + RAX*0x4]
ADD RAX,0x1
CMP ECX,dword ptr [RDX + RAX*0x4]
JLE 0x00101224
MOV EAX,0x0
RET
LAB_0010123b:
MOV EAX,0x1
RET | /* func0(std::vector<int, std::allocator<int> > const&) */
int8 func0(vector *param_1)
{
long lVar1;
long lVar2;
long lVar3;
lVar2 = *(long *)param_1;
lVar3 = 0;
do {
if ((*(long *)(param_1 + 8) - lVar2 >> 2) + -1 == lVar3) {
return 1;
}
lVar1 = lVar3 * 4;
lVar3 = lVar3 + 1;
} w... |
2,266 | func0 |
#include <vector>
#include <assert.h>
| bool func0(const std::vector<int>& list1) {
for (int i = 0; i < list1.size() - 1; ++i) {
if (list1[i] > list1[i + 1]) {
return false;
}
}
return true;
}
| int main() {
assert(func0({1,2,4,6,8,10,12,14,16,17}) == true);
assert(func0({1, 2, 4, 6, 8, 10, 12, 14, 20, 17}) == false);
assert(func0({1, 2, 4, 6, 8, 10, 15, 14, 20}) == false);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rdx
mov 0x8(%rdi),%rsi
xor %eax,%eax
sub %rdx,%rsi
sar $0x2,%rsi
sub $0x1,%rsi
jmp 14ac <_Z5func0RKSt6vectorIiSaIiEE+0x2c>
nopw 0x0(%rax,%rax,1)
mov (%rdx,%rax,4),%ecx
add $0x1,%rax
cmp (%rdx,%rax,4),%ecx
jg 14... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov rdx, [rdi]
mov rsi, [rdi+8]
xor eax, eax
sub rsi, rdx
sar rsi, 2
sub rsi, 1
jmp short loc_13CC
loc_13C0:
mov ecx, [rdx+rax*4]
add rax, 1
cmp ecx, [rdx+rax*4]
jg short loc_13E0
loc_13CC:
cmp rsi, rax
jnz short loc_13C0
mov ... | long long func0(long long *a1)
{
long long v1; // rdx
long long v2; // rax
int v3; // ecx
v1 = *a1;
v2 = 0LL;
do
{
if ( ((a1[1] - *a1) >> 2) - 1 == v2 )
return 1LL;
v3 = *(_DWORD *)(v1 + 4 * v2++);
}
while ( v3 <= *(_DWORD *)(v1 + 4 * v2) );
return 0LL;
} | func0:
ENDBR64
MOV RDX,qword ptr [RDI]
MOV RSI,qword ptr [RDI + 0x8]
XOR EAX,EAX
SUB RSI,RDX
SAR RSI,0x2
SUB RSI,0x1
JMP 0x001013cc
LAB_001013c0:
MOV ECX,dword ptr [RDX + RAX*0x4]
ADD RAX,0x1
CMP ECX,dword ptr [RDX + RAX*0x4]
JG 0x001013e0
LAB_001013cc:
CMP RSI,RAX
JNZ 0x001013c0
MOV EAX,0x1
RET
LAB_001013e0:
XOR EAX,E... | /* func0(std::vector<int, std::allocator<int> > const&) */
int8 func0(vector *param_1)
{
long lVar1;
long lVar2;
long lVar3;
lVar2 = *(long *)param_1;
lVar3 = 0;
do {
if ((*(long *)(param_1 + 8) - lVar2 >> 2) + -1 == lVar3) {
return 1;
}
lVar1 = lVar3 * 4;
lVar3 = lVar3 + 1;
} w... |
2,267 | func0 |
#include <vector>
#include <assert.h>
| bool func0(const std::vector<int>& list1) {
for (int i = 0; i < list1.size() - 1; ++i) {
if (list1[i] > list1[i + 1]) {
return false;
}
}
return true;
}
| int main() {
assert(func0({1,2,4,6,8,10,12,14,16,17}) == true);
assert(func0({1, 2, 4, 6, 8, 10, 12, 14, 20, 17}) == false);
assert(func0({1, 2, 4, 6, 8, 10, 15, 14, 20}) == false);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rdx
mov 0x8(%rdi),%rsi
xor %eax,%eax
sub %rdx,%rsi
sar $0x2,%rsi
sub $0x1,%rsi
jmp 144c <_Z5func0RKSt6vectorIiSaIiEE+0x2c>
nopw 0x0(%rax,%rax,1)
mov (%rdx,%rax,4),%ecx
add $0x1,%rax
cmp (%rdx,%rax,4),%ecx
jg 14... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov rdx, [rdi]
mov rsi, [rdi+8]
xor eax, eax
sub rsi, rdx
sar rsi, 2
sub rsi, 1
jmp short loc_143C
loc_1430:
mov ecx, [rdx+rax*4]
add rax, 1
cmp ecx, [rdx+rax*4]
jg short loc_1450
loc_143C:
cmp rsi, rax
jnz short loc_1430
mov ... | long long func0(long long *a1)
{
long long v1; // rdx
long long v2; // rax
int v3; // ecx
v1 = *a1;
v2 = 0LL;
do
{
if ( ((a1[1] - *a1) >> 2) - 1 == v2 )
return 1LL;
v3 = *(_DWORD *)(v1 + 4 * v2++);
}
while ( v3 <= *(_DWORD *)(v1 + 4 * v2) );
return 0LL;
} | func0:
ENDBR64
MOV RDX,qword ptr [RDI]
MOV RSI,qword ptr [RDI + 0x8]
XOR EAX,EAX
SUB RSI,RDX
SAR RSI,0x2
SUB RSI,0x1
JMP 0x0010143c
LAB_00101430:
MOV ECX,dword ptr [RDX + RAX*0x4]
ADD RAX,0x1
CMP ECX,dword ptr [RDX + RAX*0x4]
JG 0x00101450
LAB_0010143c:
CMP RSI,RAX
JNZ 0x00101430
MOV EAX,0x1
RET
LAB_00101450:
XOR EAX,E... | /* func0(std::vector<int, std::allocator<int> > const&) */
int8 func0(vector *param_1)
{
long lVar1;
long lVar2;
long lVar3;
lVar2 = *(long *)param_1;
lVar3 = 0;
do {
if ((*(long *)(param_1 + 8) - lVar2 >> 2) + -1 == lVar3) {
return 1;
}
lVar1 = lVar3 * 4;
lVar3 = lVar3 + 1;
} w... |
2,268 | func0 |
#include <vector>
#include <map>
#include <assert.h>
| std::vector<std::map<int, int>> func0(int length) {
std::vector<std::map<int, int>> result(length);
return result;
}
| int main() {
assert((func0(5) == std::vector<std::map<int, int>>(5)));
assert((func0(6) == std::vector<std::map<int, int>>(6)));
assert((func0(7) == std::vector<std::map<int, int>>(7)));
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x28,%rsp
mov %rdi,-0x28(%rbp)
mov %esi,-0x2c(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x19(%rbp),%rax
mov %rax,%rdi
callq 161e <_ZNSaISt3mapIiiSt4lessIiESaISt4pairIKiiEEEEC1Ev>
mov -0x2c(%rbp),%eax
movs... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 38h
mov [rbp+var_38], rdi
mov [rbp+var_3C], esi
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 eax, [rbp+var_3C]
movsxd rcx, eax
lea rdx, [rbp+var_21]... | long long func0(long long a1, int a2)
{
char v3; // [rsp+1Fh] [rbp-21h] BYREF
char *v4; // [rsp+20h] [rbp-20h]
unsigned long long v5; // [rsp+28h] [rbp-18h]
v5 = __readfsqword(0x28u);
v4 = &v3;
std::vector<std::map<int,int>>::vector(a1, a2, &v3);
std::__new_allocator<std::map<int,int>>::~__new_allocator... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x38],RDI
MOV dword ptr [RBP + -0x3c],ESI
MOV 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 EAX,dword ptr [RBP + -0x3c]
MOVSXD RCX,EAX
LEA RDX,[RBP + -0... | /* func0(int) */
vector<std::map<int,int,std::less<int>,std::allocator<std::pair<int_const,int>>>,std::allocator<std::map<int,int,std::less<int>,std::allocator<std::pair<int_const,int>>>>>
* func0(int param_1)
{
int in_ESI;
int4 in_register_0000003c;
long in_FS_OFFSET;
allocator local_29;
allocator *local_2... |
2,269 | func0 |
#include <vector>
#include <map>
#include <assert.h>
| std::vector<std::map<int, int>> func0(int length) {
std::vector<std::map<int, int>> result(length);
return result;
}
| int main() {
assert((func0(5) == std::vector<std::map<int, int>>(5)));
assert((func0(6) == std::vector<std::map<int, int>>(6)));
assert((func0(7) == std::vector<std::map<int, int>>(7)));
return 0;
}
| O1 | cpp | func0(int):
endbr64
push %rbp
push %rbx
sub $0x8,%rsp
movslq %esi,%rsi
movabs $0x2aaaaaaaaaaaaaa,%rax
cmp %rax,%rsi
ja 129c <_Z5func0i+0x93>
mov %rdi,%rbx
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0,0x10(%rdi)
test %rsi,%rsi
je 12a8 <_Z5func0i+0x9f>
lea (%rsi,%rsi,2),%rdx
shl $0x4,... | _Z5func0i:
endbr64
push r12
push rbp
push rbx
movsxd rbx, esi
mov rax, 2AAAAAAAAAAAAAAh
cmp rax, rbx
jb short loc_129A
mov rbp, rdi
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
test rbx, rbx
jz short loc_12A6
lea rcx, [rbx+rbx*2]
shl r... | _QWORD * func0(_QWORD *a1, int a2)
{
long long v2; // rbx
long long v3; // rax
long long v4; // rcx
v2 = a2;
if ( (unsigned long long)a2 > 0x2AAAAAAAAAAAAAALL )
std::__throw_length_error("cannot create std::vector larger than max_size()");
*a1 = 0LL;
a1[1] = 0LL;
a1[2] = 0LL;
if ( a2 )
{
v3... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
MOVSXD RBX,ESI
MOV RAX,0x2aaaaaaaaaaaaaa
CMP RAX,RBX
JC 0x0010129a
MOV RBP,RDI
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
TEST RBX,RBX
JZ 0x001012a6
LEA RCX,[RBX + RBX*0x2]
SHL RCX,0x4
MOV R12,RCX
MOV RDI,RCX
CALL 0x001010d0
MOV qword p... | /* func0(int) */
char * func0(int param_1)
{
void *pvVar1;
void *pvVar2;
ulong uVar3;
char *unaff_RBP;
int in_ESI;
int4 in_register_0000003c;
char *pcVar4;
pcVar4 = (char *)CONCAT44(in_register_0000003c,param_1);
uVar3 = (ulong)in_ESI;
if (uVar3 < 0x2aaaaaaaaaaaaab) {
pcVar4[0] = '\0';
... |
2,270 | func0 |
#include <vector>
#include <map>
#include <assert.h>
| std::vector<std::map<int, int>> func0(int length) {
std::vector<std::map<int, int>> result(length);
return result;
}
| int main() {
assert((func0(5) == std::vector<std::map<int, int>>(5)));
assert((func0(6) == std::vector<std::map<int, int>>(6)));
assert((func0(7) == std::vector<std::map<int, int>>(7)));
return 0;
}
| O2 | cpp | func0(int):
endbr64
movabs $0x2aaaaaaaaaaaaaa,%rax
push %r12
movslq %esi,%rsi
push %rbx
sub $0x8,%rsp
cmp %rax,%rsi
ja 145c <_Z5func0i+0x9c>
lea (%rsi,%rsi,2),%rbx
movq $0x0,(%rdi)
mov %rdi,%r12
xor %edx,%edx
movq $0x0,0x8(%rdi)
shl $0x4,%rbx
movq $0x0,0x10(%rdi)
test %rsi,%rsi
je ... | _Z5func0i:
endbr64
mov rax, 2AAAAAAAAAAAAAAh
push rbp
movsxd rsi, esi
push rbx
sub rsp, 8
cmp rax, rsi
jb loc_158F
pxor xmm0, xmm0
mov qword ptr [rdi+10h], 0
mov rbp, rdi
movups xmmword ptr [rdi], xmm0
test rsi, rsi
jz short loc_1570
lea rcx, [rsi+rsi*2]
mov rbx, rcx
... | long long func0(long long a1, int a2)
{
long long v2; // rax
long long v3; // rcx
long long v4; // rdx
long long result; // rax
if ( (unsigned long long)a2 > 0x2AAAAAAAAAAAAAALL )
std::__throw_length_error("cannot create std::vector larger than max_size()");
*(_QWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1... | func0:
ENDBR64
MOV RAX,0x2aaaaaaaaaaaaaa
PUSH RBP
MOVSXD RSI,ESI
PUSH RBX
SUB RSP,0x8
CMP RAX,RSI
JC 0x0010158f
PXOR XMM0,XMM0
MOV qword ptr [RDI + 0x10],0x0
MOV RBP,RDI
MOVUPS xmmword ptr [RDI],XMM0
TEST RSI,RSI
JZ 0x00101570
LEA RCX,[RSI + RSI*0x2]
MOV RBX,RCX
SHL RBX,0x4
MOV RDI,RBX
CALL 0x001010d0
LEA RCX,[RAX + RB... | /* func0(int) */
int (*) [16] func0(int param_1)
{
void *pvVar1;
void *pvVar2;
void *pvVar3;
void *pvVar4;
void *pvVar5;
void *pvVar6;
void *pvVar7;
char *pcVar8;
void *pvVar9;
void *pvVar10;
int (*pauVar11) [16];
int (*extraout_RAX) [16];
int in_ESI;
ulong uVar12;
int4 in_register_00000... |
2,271 | func0 |
#include <vector>
#include <map>
#include <assert.h>
| std::vector<std::map<int, int>> func0(int length) {
std::vector<std::map<int, int>> result(length);
return result;
}
| int main() {
assert((func0(5) == std::vector<std::map<int, int>>(5)));
assert((func0(6) == std::vector<std::map<int, int>>(6)));
assert((func0(7) == std::vector<std::map<int, int>>(7)));
return 0;
}
| O3 | cpp | func0(int):
endbr64
movabs $0x2aaaaaaaaaaaaaa,%rax
push %r12
movslq %esi,%rsi
push %rbx
sub $0x8,%rsp
cmp %rax,%rsi
ja 1454 <_Z5func0i+0x94>
pxor %xmm0,%xmm0
lea (%rsi,%rsi,2),%rbx
mov %rdi,%r12
xor %edx,%edx
movq $0x0,0x10(%rdi)
shl $0x4,%rbx
movups %xmm0,(%rdi)
test %rsi,%rsi
je 14... | _Z5func0i:
endbr64
mov rax, 2AAAAAAAAAAAAAAh
push rbp
movsxd rsi, esi
push rbx
sub rsp, 8
cmp rax, rsi
jb loc_158F
pxor xmm0, xmm0
mov qword ptr [rdi+10h], 0
mov rbp, rdi
movups xmmword ptr [rdi], xmm0
test rsi, rsi
jz short loc_1570
lea rcx, [rsi+rsi*2]
mov rbx, rcx
... | long long func0(long long a1, int a2)
{
long long v2; // rax
long long v3; // rcx
long long v4; // rdx
long long result; // rax
if ( (unsigned long long)a2 > 0x2AAAAAAAAAAAAAALL )
std::__throw_length_error("cannot create std::vector larger than max_size()");
*(_QWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1... | func0:
ENDBR64
MOV RAX,0x2aaaaaaaaaaaaaa
PUSH RBP
MOVSXD RSI,ESI
PUSH RBX
SUB RSP,0x8
CMP RAX,RSI
JC 0x0010158f
PXOR XMM0,XMM0
MOV qword ptr [RDI + 0x10],0x0
MOV RBP,RDI
MOVUPS xmmword ptr [RDI],XMM0
TEST RSI,RSI
JZ 0x00101570
LEA RCX,[RSI + RSI*0x2]
MOV RBX,RCX
SHL RBX,0x4
MOV RDI,RBX
CALL 0x001010d0
LEA RCX,[RAX + RB... | /* func0(int) */
int (*) [16] func0(int param_1)
{
void *pvVar1;
void *pvVar2;
void *pvVar3;
void *pvVar4;
void *pvVar5;
void *pvVar6;
void *pvVar7;
char *pcVar8;
void *pvVar9;
void *pvVar10;
int (*pauVar11) [16];
int (*extraout_RAX) [16];
int in_ESI;
ulong uVar12;
int4 in_register_00000... |
2,272 | func0 | #include <vector>
#include <string>
#include <algorithm>
#include <assert.h>
| std::vector<std::vector<std::string>> func0(const std::vector<std::vector<std::string>>& list1) {
std::vector<std::vector<std::string>> result = list1;
for (auto& sublist : result) {
std::sort(sublist.begin(), sublist.end());
}
return result;
}
| int main() {
assert((func0({{"green", "orange"}, {"black", "white"}, {"white", "black", "orange"}}) == std::vector<std::vector<std::string>>{{"green", "orange"}, {"black", "white"}, {"black", "orange", "white"}}));
assert((func0({{"green", "orange"}, {"black"}, {"green", "orange"}, {"white"}}) == std::vector<... | O0 | cpp | func0(std::vector<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> > > >, std::allocator<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, s... | _Z5func0RKSt6vectorIS_INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EESaIS7_EE:
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 rdx, [rbp+var_50]
mov rax, [rbp+va... | long long func0(long long a1, long long a2)
{
long long v2; // rbx
long long v3; // rax
long long v5; // [rsp+18h] [rbp-38h] BYREF
_QWORD v6[2]; // [rsp+20h] [rbp-30h] BYREF
long long v7; // [rsp+30h] [rbp-20h]
unsigned long long v8; // [rsp+38h] [rbp-18h]
v8 = __readfsqword(0x28u);
std::vector<std::v... | 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 RDX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x48]
MOV RSI,RDX
MOV RDI,RAX
LAB_0010253b:
CALL 0x001039a0
MOV RAX,... | /* func0(std::vector<std::vector<std::string, std::allocator<std::string > >,
std::allocator<std::vector<std::string, std::allocator<std::string > > > > const&) */
vector * func0(vector *param_1)
{
bool bVar1;
int8 uVar2;
int8 uVar3;
vector *in_RSI;
long in_FS_OFFSET;
int8 local_40;
int8 local_38;
... |
2,273 | func0 | #include <vector>
#include <string>
#include <algorithm>
#include <assert.h>
| std::vector<std::vector<std::string>> func0(const std::vector<std::vector<std::string>>& list1) {
std::vector<std::vector<std::string>> result = list1;
for (auto& sublist : result) {
std::sort(sublist.begin(), sublist.end());
}
return result;
}
| int main() {
assert((func0({{"green", "orange"}, {"black", "white"}, {"white", "black", "orange"}}) == std::vector<std::vector<std::string>>{{"green", "orange"}, {"black", "white"}, {"black", "orange", "white"}}));
assert((func0({{"green", "orange"}, {"black"}, {"green", "orange"}, {"white"}}) == std::vector<... | O1 | cpp | func0(std::vector<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> > > >, std::allocator<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, s... | _Z5func0RKSt6vectorIS_INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EESaIS7_EE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov r15, rdi
mov rbp, rsi
mov rbx, [rsi+8]
sub rbx, [rsi]
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mo... | _QWORD * func0(_QWORD *a1, _QWORD *a2)
{
unsigned long long v2; // rbx
long long v3; // rdx
long long v4; // rax
_QWORD *v5; // r14
_QWORD *v6; // r12
long long v8; // rbp
long long v9; // r13
int v10; // eax
unsigned long long v11; // rax
long long v12; // rbx
v2 = a2[1] - *a2;
*a1 = 0LL;
a1... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV R15,RDI
MOV RBP,RSI
MOV RBX,qword ptr [RSI + 0x8]
SUB RBX,qword ptr [RSI]
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
JZ 0x001013bd
MOV RAX,0x7ffffffffffffff8
CMP RAX,RBX
JC 0x001013b8
MOV RDI,R... | /* func0(std::vector<std::vector<std::string, std::allocator<std::string > >,
std::allocator<std::vector<std::string, std::allocator<std::string > > > > const&) */
vector * func0(vector *param_1)
{
long lVar1;
uint uVar2;
vector *pvVar3;
vector *pvVar4;
_Iter_less_iter in_ECX;
_Iter_less_iter extraout_... |
2,274 | func0 | #include <vector>
#include <string>
#include <algorithm>
#include <assert.h>
| std::vector<std::vector<std::string>> func0(const std::vector<std::vector<std::string>>& list1) {
std::vector<std::vector<std::string>> result = list1;
for (auto& sublist : result) {
std::sort(sublist.begin(), sublist.end());
}
return result;
}
| int main() {
assert((func0({{"green", "orange"}, {"black", "white"}, {"white", "black", "orange"}}) == std::vector<std::vector<std::string>>{{"green", "orange"}, {"black", "white"}, {"black", "orange", "white"}}));
assert((func0({{"green", "orange"}, {"black"}, {"green", "orange"}, {"white"}}) == std::vector<... | O2 | cpp | func0(std::vector<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> > > >, std::allocator<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, s... | _Z5func0RKSt6vectorIS_INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EESaIS7_EE:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
mov r13, rdi
push r12
push rbp
mov rbp, rsi
push rbx
sub rsp, 18h
mov rbx, [rsi+8]
sub rbx, [rsi]
movups xmmword ptr [rdi], xmm0
mov ... | long long func0(long long a1, _QWORD *a2)
{
unsigned long long v3; // rbx
_QWORD *v4; // r14
_QWORD *v5; // r12
_QWORD *v6; // rbx
unsigned long long v7; // rdx
long long v8; // rax
signed long long v9; // rbp
_QWORD *v10; // r14
long long v11; // r12
long long v12; // r15
long long v13; // rdx
... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
MOV R13,RDI
PUSH R12
PUSH RBP
MOV RBP,RSI
PUSH RBX
SUB RSP,0x18
MOV RBX,qword ptr [RSI + 0x8]
SUB RBX,qword ptr [RSI]
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x10],0x0
JZ 0x00103c30
MOV RAX,0x7ffffffffffffff8
CMP RAX,RBX
JC 0x00103c5a
MOV RDI,RBX
LAB_0... | /* func0(std::vector<std::vector<std::string, std::allocator<std::string > >,
std::allocator<std::vector<std::string, std::allocator<std::string > > > > const&) */
vector * func0(vector *param_1)
{
long *plVar1;
long lVar2;
string *psVar3;
int8 uVar4;
_Iter_less_iter in_ECX;
_Iter_less_iter extraout_ED... |
2,275 | func0 | #include <vector>
#include <string>
#include <algorithm>
#include <assert.h>
| std::vector<std::vector<std::string>> func0(const std::vector<std::vector<std::string>>& list1) {
std::vector<std::vector<std::string>> result = list1;
for (auto& sublist : result) {
std::sort(sublist.begin(), sublist.end());
}
return result;
}
| int main() {
assert((func0({{"green", "orange"}, {"black", "white"}, {"white", "black", "orange"}}) == std::vector<std::vector<std::string>>{{"green", "orange"}, {"black", "white"}, {"black", "orange", "white"}}));
assert((func0({{"green", "orange"}, {"black"}, {"green", "orange"}, {"white"}}) == std::vector<... | O3 | cpp | func0(std::vector<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> > > >, std::allocator<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, s... | _Z5func0RKSt6vectorIS_INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EESaIS7_EE:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
mov rbp, rsi
push rbx
sub rsp, 78h
mov rbx, [rsi+8]
mov [rsp+0A8h+var_80], rdi
mov rax, fs:28h
mov [rsp+0A8h+var_... | long long func0(long long a1, _QWORD *a2)
{
long long v2; // rbx
unsigned long long v3; // rbx
_BYTE *v4; // r14
_QWORD *v5; // r13
_QWORD *v6; // rbp
_BYTE *v7; // r12
unsigned long long v8; // rdx
long long v9; // rax
signed long long v10; // rbx
_QWORD *v11; // rax
_QWORD *v12; // r14
_QWORD... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RSI
PUSH RBX
SUB RSP,0x78
MOV RBX,qword ptr [RSI + 0x8]
MOV qword ptr [RSP + 0x28],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x68],RAX
XOR EAX,EAX
SUB RBX,qword ptr [RSI]
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI]... | /* func0(std::vector<std::vector<std::string, std::allocator<std::string > >,
std::allocator<std::vector<std::string, std::allocator<std::string > > > > const&) */
vector * func0(vector *param_1,int param_2,int param_3,int param_4,
int param_5,int param_6,int8 param_7,int8 param_8,
int8 ... |
2,276 | func0 | #include <cassert>
#include <vector>
#include <string>
#include <sstream>
using namespace std;
| vector<string> func0(const vector<string>& list1, const vector<string>& charlist) {
vector<string> new_list;
for (const auto& line : list1) {
istringstream iss(line);
string word;
string new_words;
bool first = true;
while (iss >> word) {
bool found = ... | int main() {
{
vector<string> input = {"Red color", "Orange#", "Green", "Orange @", "White"};
vector<string> chars = {"#", "color", "@"};
vector<string> expected = {"Red", "", "Green", "Orange", "White"};
assert(func0(input, chars) == expected);
}
{
vector<str... | 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&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::_... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EES9_:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 248h
mov [rbp+var_238], rdi
mov [rbp+var_240], rsi
mov [rbp+var_248], rdx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_23... | long long func0(long long a1, long long a2, long long a3)
{
_QWORD *v3; // rax
char v6; // [rsp+2Eh] [rbp-222h]
char v7; // [rsp+2Fh] [rbp-221h]
long long v8; // [rsp+30h] [rbp-220h] BYREF
long long v9; // [rsp+38h] [rbp-218h] BYREF
long long v10; // [rsp+40h] [rbp-210h] BYREF
_QWORD v11[2]; // [rsp+48h]... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x248
MOV qword ptr [RBP + -0x238],RDI
MOV qword ptr [RBP + -0x240],RSI
MOV qword ptr [RBP + -0x248],RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x238]
MOV RDI,RAX
CALL 0x00103264
MOV RAX,qword ptr [RBP + -0x2... | /* func0(std::vector<std::string, std::allocator<std::string > > const&, std::vector<std::string,
std::allocator<std::string > > const&) */
vector * func0(vector *param_1,vector *param_2)
{
bool bVar1;
bool bVar2;
bool bVar3;
long lVar4;
istream *piVar5;
vector<std::string,std::allocator<std::string>> ... |
2,277 | func0 | #include <cassert>
#include <vector>
#include <string>
#include <sstream>
using namespace std;
| vector<string> func0(const vector<string>& list1, const vector<string>& charlist) {
vector<string> new_list;
for (const auto& line : list1) {
istringstream iss(line);
string word;
string new_words;
bool first = true;
while (iss >> word) {
bool found = ... | int main() {
{
vector<string> input = {"Red color", "Orange#", "Green", "Orange @", "White"};
vector<string> chars = {"#", "color", "@"};
vector<string> expected = {"Red", "", "Green", "Orange", "White"};
assert(func0(input, chars) == expected);
}
{
vector<str... | O1 | 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&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::_... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EES9_:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 1F8h
mov [rsp+228h+var_218], rdi
mov r12, rdx
mov rdx, fs:28h
mov [rsp+228h+var_40], rdx
xor edx, edx
mov qword ptr [r... | _QWORD * func0(_QWORD *a1, long long **a2, _QWORD *a3)
{
long long *v4; // r13
long long v6; // rax
long long v7; // rsi
_QWORD *v8; // rax
_QWORD *v9; // rbx
_QWORD *v10; // r15
_QWORD *v11; // rdi
char v12; // [rsp+Eh] [rbp-21Ah]
long long *v14; // [rsp+18h] [rbp-210h]
void *v15; // [rsp+20h] [rbp... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x1f8
MOV qword ptr [RSP + 0x10],RDI
MOV R12,RDX
MOV RDX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x1e8],RDX
XOR EDX,EDX
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV R13,qword ptr [RSI]
MOV RAX,qword... | /* func0(std::vector<std::string, std::allocator<std::string > > const&, std::vector<std::string,
std::allocator<std::string > > const&) */
vector * func0(vector *param_1,vector *param_2)
{
int8 *puVar1;
char *pcVar2;
ulong *puVar3;
long *plVar4;
bool bVar5;
int8 uVar6;
istream *piVar7;
int8 uVar8;... |
2,278 | func0 | #include <cassert>
#include <vector>
#include <string>
#include <sstream>
using namespace std;
| vector<string> func0(const vector<string>& list1, const vector<string>& charlist) {
vector<string> new_list;
for (const auto& line : list1) {
istringstream iss(line);
string word;
string new_words;
bool first = true;
while (iss >> word) {
bool found = ... | int main() {
{
vector<string> input = {"Red color", "Orange#", "Green", "Orange @", "White"};
vector<string> chars = {"#", "color", "@"};
vector<string> expected = {"Red", "", "Green", "Orange", "White"};
assert(func0(input, chars) == expected);
}
{
vector<str... | O2 | 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&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::_... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EES9_:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
mov rbp, rdx
push rbx
sub rsp, 238h
mov [rsp+268h+var_228], rdi
mov rdx, fs:28h
mov [rsp+268h+var_40], rdx
xor edx, edx
m... | long long func0(long long a1, long long *a2, _QWORD *a3)
{
_BYTE *v4; // r13
char *v5; // rbx
_QWORD *v6; // rax
_QWORD *v7; // rax
_QWORD *v8; // r15
_QWORD *v9; // r13
_QWORD *v10; // rdi
long long v11; // rdx
_QWORD *v13; // rdi
char v14; // [rsp+7h] [rbp-259h]
long long i; // [rsp+8h] [rbp-25... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDX
PUSH RBX
SUB RSP,0x238
MOV qword ptr [RSP + 0x40],RDI
MOV RDX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x228],RDX
XOR EDX,EDX
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
MOV RAX,qword ptr [RSI + 0x8]
MOV RDX,qword pt... | /* func0(std::vector<std::string, std::allocator<std::string > > const&, std::vector<std::string,
std::allocator<std::string > > const&) */
vector * func0(vector *param_1,vector *param_2)
{
int8 *puVar1;
int *__src;
ulong __n;
int8 *puVar2;
long *plVar3;
bool bVar4;
istream *piVar5;
long lVar6;
v... |
2,279 | func0 | #include <cassert>
#include <vector>
#include <string>
#include <sstream>
using namespace std;
| vector<string> func0(const vector<string>& list1, const vector<string>& charlist) {
vector<string> new_list;
for (const auto& line : list1) {
istringstream iss(line);
string word;
string new_words;
bool first = true;
while (iss >> word) {
bool found = ... | int main() {
{
vector<string> input = {"Red color", "Orange#", "Green", "Orange @", "White"};
vector<string> chars = {"#", "color", "@"};
vector<string> expected = {"Red", "", "Green", "Orange", "White"};
assert(func0(input, chars) == expected);
}
{
vector<str... | O3 | 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&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::_... | _Z5func0RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EES9_:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
mov rbp, rdx
push rbx
sub rsp, 238h
mov [rsp+268h+var_248], rdi
mov rdx, fs:28h
mov [rsp+268h+var_40], rdx
xor edx, edx
m... | long long func0(long long a1, long long *a2, _QWORD *a3)
{
_BYTE *v4; // r13
char *v5; // rbx
_QWORD *v6; // rax
char v7; // r14
_QWORD *v8; // rax
_QWORD *v9; // r15
_QWORD *v10; // r13
long long *v11; // r14
void *v12; // rdi
size_t v13; // r15
_QWORD *v15; // rdi
long long v16; // rax
long... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDX
PUSH RBX
SUB RSP,0x238
MOV qword ptr [RSP + 0x20],RDI
MOV RDX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x228],RDX
XOR EDX,EDX
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
MOV RAX,qword ptr [RSI + 0x8]
MOV RDX,qword pt... | /* func0(std::vector<std::string, std::allocator<std::string > > const&, std::vector<std::string,
std::allocator<std::string > > const&) */
vector * func0(vector *param_1,vector *param_2)
{
int8 *puVar1;
int *puVar2;
ulong uVar3;
int8 *puVar4;
ulong *puVar5;
bool bVar6;
istream *piVar7;
long lVar8;... |
2,280 | func0 |
#include <iostream>
#include <vector>
#include <algorithm>
#include <assert.h>
| int func0(std::vector<int> arr, int N, int K) {
std::sort(arr.begin(), arr.end());
std::vector<int> dp(N, 0);
dp[0] = 0;
for (int i = 1; i < N; ++i) {
dp[i] = dp[i-1];
if (arr[i] - arr[i-1] < K) {
if (i >= 2) {
dp[i] = std::max(dp[i], dp[i-2] + arr[i] ... | int main() {
assert(func0({3, 5, 10, 15, 17, 12, 9}, 7, 4) == 62);
assert(func0({5, 15, 10, 300}, 4, 12) == 25);
assert(func0({1, 2, 3, 4, 5, 6}, 6, 6) == 21);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> >, int, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x48,%rsp
mov %rdi,-0x48(%rbp)
mov %esi,-0x4c(%rbp)
mov %edx,-0x50(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x48(%rbp),%rax
mov %rax,%rdi
callq 1980 <_ZNSt6ve... | _Z5func0St6vectorIiSaIiEEii:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 58h
mov [rbp+var_58], rdi
mov [rbp+var_5C], esi
mov [rbp+var_60], edx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_58]
mov rdi, rax
call _ZNSt6vectorIiSaIiEE3endEv; std::... | long long func0(long long a1, int a2, int a3)
{
long long v3; // rbx
long long v4; // rax
int v5; // ebx
int v6; // ebx
int v7; // ebx
int v8; // ebx
long long v9; // rax
int v10; // ebx
unsigned int v11; // ebx
char v14; // [rsp+1Fh] [rbp-41h] BYREF
int v15; // [rsp+20h] [rbp-40h] BYREF
int i;... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RBP + -0x58],RDI
MOV dword ptr [RBP + -0x5c],ESI
MOV dword ptr [RBP + -0x60],EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,RAX
CALL 0x0010190c
MOV RBX,RAX
MOV RAX,qword ptr [RBP... | /* func0(std::vector<int, std::allocator<int> >, int, int) */
int4 func0(vector param_1,int param_2,int param_3)
{
int iVar1;
int iVar2;
int4 uVar3;
__normal_iterator _Var4;
__normal_iterator _Var5;
int4 *puVar6;
int *piVar7;
int4 in_register_0000003c;
vector<int,std::allocator<int>> *this;
long i... |
2,281 | func0 |
#include <iostream>
#include <vector>
#include <algorithm>
#include <assert.h>
| int func0(std::vector<int> arr, int N, int K) {
std::sort(arr.begin(), arr.end());
std::vector<int> dp(N, 0);
dp[0] = 0;
for (int i = 1; i < N; ++i) {
dp[i] = dp[i-1];
if (arr[i] - arr[i-1] < K) {
if (i >= 2) {
dp[i] = std::max(dp[i], dp[i-2] + arr[i] ... | int main() {
assert(func0({3, 5, 10, 15, 17, 12, 9}, 7, 4) == 62);
assert(func0({5, 15, 10, 300}, 4, 12) == 25);
assert(func0({1, 2, 3, 4, 5, 6}, 6, 6) == 21);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> >, int, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %rdi,%rbp
mov %esi,%ebx
mov %edx,%r12d
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
mov 0x8(%rdi),%r13
mov (%rdi),%r15
cmp %r15,... | _Z5func0St6vectorIiSaIiEEii:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 18h
mov r14, rdi
mov r12d, esi
mov ebp, edx
mov rax, fs:28h
mov [rsp+48h+var_40], rax
xor eax, eax
mov r13, [rdi+8]
mov r15, [rdi]
cmp r15, r13
jz loc_12EA
m... | long long func0(char **a1, int a2, int a3)
{
char *v5; // r13
char *v6; // r15
int v7; // eax
unsigned long long v8; // rax
char *v9; // rbx
int v10; // ecx
char *v11; // rax
int v12; // edx
char *v13; // rsi
unsigned long long v14; // rbx
int *v15; // rax
int *v16; // r8
int *v17; // rdx
c... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV R14,RDI
MOV R12D,ESI
MOV EBP,EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV R13,qword ptr [RDI + 0x8]
MOV R15,qword ptr [RDI]
CMP R15,R13
JZ 0x001012ea
MOV RBX,R13
SUB RBX,R15
MOV RDX,RBX
SAR RDX,0x2
MOV... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(std::vector<int, std::allocator<int> >, int, int) */
int func0(vector param_1,int param_2,int param_3,int param_4,int param_5,
int param_6,int8 param_7)
{
int iVar1;
int iVar2;
int iVar3;
long lVar4;
int *... |
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.