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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
3,182 | func0 |
#include <iostream>
#include <unordered_map>
#include <cassert>
| int func0(std::unordered_map<char, int> dict) {
int sum = 0;
for (auto const& pair : dict) {
sum += pair.second;
}
return sum;
}
| int main() {
assert(func0({{'a', 100}, {'b', 200}, {'c', 300}}) == 600);
assert(func0({{'a', 25}, {'b', 18}, {'c', 45}}) == 88);
assert(func0({{'a', 36}, {'b', 39}, {'c', 49}}) == 124);
return 0;
}
| O2 | cpp | func0(std::unordered_map<char, int, std::hash<char>, std::equal_to<char>, std::allocator<std::pair<char const, int> > >):
endbr64
mov 0x10(%rdi),%rax
xor %r8d,%r8d
test %rax,%rax
je 164c <_Z5func0St13unordered_mapIciSt4hashIcESt8equal_toIcESaISt4pairIKciEEE+0x1c>
add 0xc(%rax),%r8d
mov (%rax),%rax
tes... | _Z5func0St13unordered_mapIciSt4hashIcESt8equal_toIcESaISt4pairIKciEEE:
endbr64
mov rax, [rdi+10h]
xor edx, edx
test rax, rax
jz short loc_14DB
nop
loc_14D0:
add edx, [rax+0Ch]
mov rax, [rax]
test rax, rax
jnz short loc_14D0
loc_14DB:
mov eax, edx
retn | long long func0(long long a1)
{
long long *v1; // rax
unsigned int i; // edx
v1 = *(long long **)(a1 + 16);
for ( i = 0; v1; v1 = (long long *)*v1 )
i += *((_DWORD *)v1 + 3);
return i;
} | func0:
ENDBR64
MOV RAX,qword ptr [RDI + 0x10]
XOR EDX,EDX
TEST RAX,RAX
JZ 0x001014db
NOP
LAB_001014d0:
ADD EDX,dword ptr [RAX + 0xc]
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JNZ 0x001014d0
LAB_001014db:
MOV EAX,EDX
RET | /* func0(std::unordered_map<char, int, std::hash<char>, std::equal_to<char>,
std::allocator<std::pair<char const, int> > >) */
int func0(unordered_map param_1)
{
int8 *puVar1;
int iVar2;
int4 in_register_0000003c;
iVar2 = 0;
for (puVar1 = *(int8 **)(CONCAT44(in_register_0000003c,param_1) + 0x10);
... |
3,183 | func0 |
#include <iostream>
#include <unordered_map>
#include <cassert>
| int func0(std::unordered_map<char, int> dict) {
int sum = 0;
for (auto const& pair : dict) {
sum += pair.second;
}
return sum;
}
| int main() {
assert(func0({{'a', 100}, {'b', 200}, {'c', 300}}) == 600);
assert(func0({{'a', 25}, {'b', 18}, {'c', 45}}) == 88);
assert(func0({{'a', 36}, {'b', 39}, {'c', 49}}) == 124);
return 0;
}
| O3 | cpp | func0(std::unordered_map<char, int, std::hash<char>, std::equal_to<char>, std::allocator<std::pair<char const, int> > >):
endbr64
mov 0x10(%rdi),%rax
xor %r8d,%r8d
test %rax,%rax
je 158c <_Z5func0St13unordered_mapIciSt4hashIcESt8equal_toIcESaISt4pairIKciEEE+0x1c>
add 0xc(%rax),%r8d
mov (%rax),%rax
tes... | _Z5func0St13unordered_mapIciSt4hashIcESt8equal_toIcESaISt4pairIKciEEE:
endbr64
mov rax, [rdi+10h]
xor edx, edx
test rax, rax
jz short loc_153B
nop
loc_1530:
add edx, [rax+0Ch]
mov rax, [rax]
test rax, rax
jnz short loc_1530
loc_153B:
mov eax, edx
retn | long long func0(long long a1)
{
long long *v1; // rax
unsigned int i; // edx
v1 = *(long long **)(a1 + 16);
for ( i = 0; v1; v1 = (long long *)*v1 )
i += *((_DWORD *)v1 + 3);
return i;
} | func0:
ENDBR64
MOV RAX,qword ptr [RDI + 0x10]
XOR EDX,EDX
TEST RAX,RAX
JZ 0x0010153b
NOP
LAB_00101530:
ADD EDX,dword ptr [RAX + 0xc]
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JNZ 0x00101530
LAB_0010153b:
MOV EAX,EDX
RET | /* func0(std::unordered_map<char, int, std::hash<char>, std::equal_to<char>,
std::allocator<std::pair<char const, int> > >) */
int func0(unordered_map param_1)
{
int8 *puVar1;
int iVar2;
int4 in_register_0000003c;
iVar2 = 0;
for (puVar1 = *(int8 **)(CONCAT44(in_register_0000003c,param_1) + 0x10);
... |
3,184 | func0 |
#include <cassert>
| int func0(int l, int r) {
int terms1 = (r + 1) / 2;
int sum1 = terms1 * terms1;
int terms2 = l / 2;
int sum2 = terms2 * terms2;
return sum1 - sum2;
}
| int main() {
assert(func0(2, 5) == 8);
assert(func0(5, 7) == 12);
assert(func0(7, 13) == 40);
return 0;
}
| O0 | cpp | func0(int, int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
mov %esi,-0x18(%rbp)
mov -0x18(%rbp),%eax
add $0x1,%eax
mov %eax,%edx
shr $0x1f,%edx
add %edx,%eax
sar %eax
mov %eax,-0x10(%rbp)
mov -0x10(%rbp),%eax
imul %eax,%eax
mov %eax,-0xc(%rbp)
mov -0x14(%rbp),%eax
m... | _Z5func0ii:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_18], esi
mov eax, [rbp+var_18]
add eax, 1
mov edx, eax
shr edx, 1Fh
add eax, edx
sar eax, 1
mov [rbp+var_10], eax
mov eax, [rbp+var_10]
imul eax, eax
mov [rbp+var_C], eax
mov eax, [rbp+... | long long func0(int a1, int a2)
{
return (unsigned int)((a2 + 1) / 2 * ((a2 + 1) / 2) - a1 / 2 * (a1 / 2));
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x18],ESI
MOV EAX,dword ptr [RBP + -0x18]
ADD EAX,0x1
MOV EDX,EAX
SHR EDX,0x1f
ADD EAX,EDX
SAR EAX,0x1
MOV dword ptr [RBP + -0x10],EAX
MOV EAX,dword ptr [RBP + -0x10]
IMUL EAX,EAX
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [... | /* func0(int, int) */
int func0(int param_1,int param_2)
{
int iVar1;
iVar1 = (param_2 + 1) / 2;
return iVar1 * iVar1 - (param_1 / 2) * (param_1 / 2);
} |
3,185 | func0 |
#include <cassert>
| int func0(int l, int r) {
int terms1 = (r + 1) / 2;
int sum1 = terms1 * terms1;
int terms2 = l / 2;
int sum2 = terms2 * terms2;
return sum1 - sum2;
}
| int main() {
assert(func0(2, 5) == 8);
assert(func0(5, 7) == 12);
assert(func0(7, 13) == 40);
return 0;
}
| O1 | cpp | func0(int, int):
endbr64
add $0x1,%esi
mov %esi,%eax
shr $0x1f,%eax
add %esi,%eax
sar %eax
mov %edi,%edx
shr $0x1f,%edx
lea (%rdx,%rdi,1),%edx
sar %edx
imul %eax,%eax
imul %edx,%edx
sub %edx,%eax
retq
| _Z5func0ii:
endbr64
add esi, 1
mov eax, esi
shr eax, 1Fh
add eax, esi
sar eax, 1
mov edx, edi
shr edx, 1Fh
lea edx, [rdx+rdi]
sar edx, 1
imul eax, eax
imul edx, edx
sub eax, edx
retn | long long func0(int a1, int a2)
{
return (unsigned int)((a2 + 1) / 2 * ((a2 + 1) / 2) - a1 / 2 * (a1 / 2));
} | func0:
ENDBR64
ADD ESI,0x1
MOV EAX,ESI
SHR EAX,0x1f
ADD EAX,ESI
SAR EAX,0x1
MOV EDX,EDI
SHR EDX,0x1f
LEA EDX,[RDX + RDI*0x1]
SAR EDX,0x1
IMUL EAX,EAX
IMUL EDX,EDX
SUB EAX,EDX
RET | /* func0(int, int) */
int func0(int param_1,int param_2)
{
int iVar1;
iVar1 = (param_2 + 1) / 2;
return iVar1 * iVar1 - (param_1 / 2) * (param_1 / 2);
} |
3,186 | func0 |
#include <cassert>
| int func0(int l, int r) {
int terms1 = (r + 1) / 2;
int sum1 = terms1 * terms1;
int terms2 = l / 2;
int sum2 = terms2 * terms2;
return sum1 - sum2;
}
| int main() {
assert(func0(2, 5) == 8);
assert(func0(5, 7) == 12);
assert(func0(7, 13) == 40);
return 0;
}
| O2 | cpp | func0(int, int):
endbr64
add $0x1,%esi
mov %edi,%edx
mov %esi,%eax
shr $0x1f,%edx
shr $0x1f,%eax
add %edi,%edx
add %esi,%eax
sar %edx
sar %eax
imul %edx,%edx
imul %eax,%eax
sub %edx,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
nopl 0x0(%rax)
| _Z5func0ii:
endbr64
add esi, 1
mov edx, edi
mov eax, esi
shr edx, 1Fh
shr eax, 1Fh
add edx, edi
add eax, esi
sar edx, 1
sar eax, 1
imul edx, edx
imul eax, eax
sub eax, edx
retn | long long func0(int a1, int a2)
{
return (unsigned int)((a2 + 1) / 2 * ((a2 + 1) / 2) - a1 / 2 * (a1 / 2));
} | func0:
ENDBR64
ADD ESI,0x1
MOV EDX,EDI
MOV EAX,ESI
SHR EDX,0x1f
SHR EAX,0x1f
ADD EDX,EDI
ADD EAX,ESI
SAR EDX,0x1
SAR EAX,0x1
IMUL EDX,EDX
IMUL EAX,EAX
SUB EAX,EDX
RET | /* func0(int, int) */
int func0(int param_1,int param_2)
{
int iVar1;
iVar1 = (param_2 + 1) / 2;
return iVar1 * iVar1 - (param_1 / 2) * (param_1 / 2);
} |
3,187 | func0 |
#include <cassert>
| int func0(int l, int r) {
int terms1 = (r + 1) / 2;
int sum1 = terms1 * terms1;
int terms2 = l / 2;
int sum2 = terms2 * terms2;
return sum1 - sum2;
}
| int main() {
assert(func0(2, 5) == 8);
assert(func0(5, 7) == 12);
assert(func0(7, 13) == 40);
return 0;
}
| O3 | cpp | func0(int, int):
endbr64
add $0x1,%esi
mov %edi,%edx
mov %esi,%eax
shr $0x1f,%edx
shr $0x1f,%eax
add %edi,%edx
add %esi,%eax
sar %edx
sar %eax
imul %edx,%edx
imul %eax,%eax
sub %edx,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
nopl 0x0(%rax)
| _Z5func0ii:
endbr64
add esi, 1
mov edx, edi
mov eax, esi
shr edx, 1Fh
shr eax, 1Fh
add edx, edi
add eax, esi
sar edx, 1
sar eax, 1
imul edx, edx
imul eax, eax
sub eax, edx
retn | long long func0(int a1, int a2)
{
return (unsigned int)((a2 + 1) / 2 * ((a2 + 1) / 2) - a1 / 2 * (a1 / 2));
} | func0:
ENDBR64
ADD ESI,0x1
MOV EDX,EDI
MOV EAX,ESI
SHR EDX,0x1f
SHR EAX,0x1f
ADD EDX,EDI
ADD EAX,ESI
SAR EDX,0x1
SAR EAX,0x1
IMUL EDX,EDX
IMUL EAX,EAX
SUB EAX,EDX
RET | /* func0(int, int) */
int func0(int param_1,int param_2)
{
int iVar1;
iVar1 = (param_2 + 1) / 2;
return iVar1 * iVar1 - (param_1 / 2) * (param_1 / 2);
} |
3,188 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
| int func0(const std::vector<int>& arr) {
int sum = 0;
for (int i : arr) {
sum += i;
}
return sum;
}
| int main() {
assert(func0({1, 2, 3}) == 6);
assert(func0({15, 12, 13, 10}) == 50);
assert(func0({0, 1, 2}) == 3);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&):
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,-0x28(%rbp)
mov -0x38(%rbp),%rax
mov %rax,-0x10(%rbp)
mov -0x10(%rbp),%rax
mov %rax,%rdi
callq 1604 <... | _Z5func0RKSt6vectorIiSaIiEE:
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_28], 0
mov rax, [rbp+var_38]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE5... | long long func0(long long a1)
{
unsigned int v2; // [rsp+18h] [rbp-28h]
long long v3; // [rsp+20h] [rbp-20h] BYREF
_QWORD v4[3]; // [rsp+28h] [rbp-18h] BYREF
v4[2] = __readfsqword(0x28u);
v2 = 0;
v4[1] = a1;
v3 = std::vector<int>::begin(a1);
v4[0] = std::vector<int>::end(a1);
while ( (unsigned __int... | 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 + -0x28],0x0
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,RAX
CALL 0x001015e2
MOV qword pt... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
bool bVar1;
int *piVar2;
long in_FS_OFFSET;
int local_30;
int8 local_28;
int8 local_20;
vector<int,std::allocator<int>> *local_18;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_30 = 0;
lo... |
3,189 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
| int func0(const std::vector<int>& arr) {
int sum = 0;
for (int i : arr) {
sum += i;
}
return sum;
}
| int main() {
assert(func0({1, 2, 3}) == 6);
assert(func0({15, 12, 13, 10}) == 50);
assert(func0({0, 1, 2}) == 3);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rax
mov 0x8(%rdi),%rcx
cmp %rcx,%rax
je 126c <_Z5func0RKSt6vectorIiSaIiEE+0x23>
mov $0x0,%edx
add (%rax),%edx
add $0x4,%rax
cmp %rax,%rcx
jne 125e <_Z5func0RKSt6vectorIiSaIiEE+0x15>
mov %edx,%eax
retq
mov $0x0,%e... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov rax, [rdi]
mov rcx, [rdi+8]
cmp rcx, rax
jz short loc_122C
mov edx, 0
loc_121E:
add edx, [rax]
add rax, 4
cmp rax, rcx
jnz short loc_121E
loc_1229:
mov eax, edx
retn
loc_122C:
mov edx, 0
jmp short loc_1229 | long long func0(long long a1)
{
_DWORD *v1; // rax
_DWORD *v2; // rcx
unsigned int v3; // edx
v1 = *(_DWORD **)a1;
v2 = *(_DWORD **)(a1 + 8);
if ( v2 == *(_DWORD **)a1 )
{
return 0;
}
else
{
v3 = 0;
do
v3 += *v1++;
while ( v1 != v2 );
}
return v3;
} | func0:
ENDBR64
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x8]
CMP RCX,RAX
JZ 0x0010122c
MOV EDX,0x0
LAB_0010121e:
ADD EDX,dword ptr [RAX]
ADD RAX,0x4
CMP RAX,RCX
JNZ 0x0010121e
LAB_00101229:
MOV EAX,EDX
RET
LAB_0010122c:
MOV EDX,0x0
JMP 0x00101229 | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
int *piVar1;
int iVar2;
piVar1 = *(int **)param_1;
if (*(int **)(param_1 + 8) == piVar1) {
iVar2 = 0;
}
else {
iVar2 = 0;
do {
iVar2 = iVar2 + *piVar1;
piVar1 = piVar1 + 1;
} while (piVar... |
3,190 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
| int func0(const std::vector<int>& arr) {
int sum = 0;
for (int i : arr) {
sum += i;
}
return sum;
}
| int main() {
assert(func0({1, 2, 3}) == 6);
assert(func0({15, 12, 13, 10}) == 50);
assert(func0({0, 1, 2}) == 3);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rax
mov 0x8(%rdi),%rdx
xor %r8d,%r8d
cmp %rdx,%rax
je 1494 <_Z5func0RKSt6vectorIiSaIiEE+0x24>
nopl 0x0(%rax,%rax,1)
add (%rax),%r8d
add $0x4,%rax
cmp %rax,%rdx
jne 1488 <_Z5func0RKSt6vectorIiSaIiEE+0x18>
mov %r8d,... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov rax, [rdi]
mov rcx, [rdi+8]
xor edx, edx
cmp rcx, rax
jz short loc_13F3
nop word ptr [rax+rax+00h]
loc_13E8:
add edx, [rax]
add rax, 4
cmp rax, rcx
jnz short loc_13E8
loc_13F3:
mov eax, edx
retn | long long func0(long long a1)
{
_DWORD *v1; // rax
_DWORD *v2; // rcx
unsigned int v3; // edx
v1 = *(_DWORD **)a1;
v2 = *(_DWORD **)(a1 + 8);
v3 = 0;
if ( v2 != *(_DWORD **)a1 )
{
do
v3 += *v1++;
while ( v1 != v2 );
}
return v3;
} | func0:
ENDBR64
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x8]
XOR EDX,EDX
CMP RCX,RAX
JZ 0x001013f3
NOP word ptr [RAX + RAX*0x1]
LAB_001013e8:
ADD EDX,dword ptr [RAX]
ADD RAX,0x4
CMP RAX,RCX
JNZ 0x001013e8
LAB_001013f3:
MOV EAX,EDX
RET | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
int *piVar1;
int iVar2;
iVar2 = 0;
for (piVar1 = *(int **)param_1; *(int **)(param_1 + 8) != piVar1; piVar1 = piVar1 + 1) {
iVar2 = iVar2 + *piVar1;
}
return iVar2;
} |
3,191 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
| int func0(const std::vector<int>& arr) {
int sum = 0;
for (int i : arr) {
sum += i;
}
return sum;
}
| int main() {
assert(func0({1, 2, 3}) == 6);
assert(func0({15, 12, 13, 10}) == 50);
assert(func0({0, 1, 2}) == 3);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rdx
mov 0x8(%rdi),%rsi
cmp %rsi,%rdx
je 16e0 <_Z5func0RKSt6vectorIiSaIiEE+0xc0>
lea -0x4(%rsi),%rcx
mov %rdx,%rax
movabs $0x3ffffffffffffffc,%r8
sub %rdx,%rcx
shr $0x2,%rcx
lea 0x1(%rcx),%rdi
test %r8,%rcx
je 16e... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov rdx, [rdi]
mov rdi, [rdi+8]
cmp rdi, rdx
jz loc_15F0
lea rcx, [rdi-4]
mov rax, rdx
sub rcx, rdx
mov rsi, rcx
shr rsi, 2
add rsi, 1
cmp rcx, 8
jbe short loc_15F3
mov rcx, rsi
pxor xmm0, xmm0
shr rcx, 2
shl rcx, 4
add... | long long func0(const __m128i **a1)
{
const __m128i *v1; // rdx
const __m128i *v2; // rdi
const __m128i *v3; // rax
unsigned long long v4; // rsi
__m128i v5; // xmm0
__m128i v6; // xmm2
__m128i v7; // xmm0
long long result; // rax
v1 = *a1;
v2 = a1[1];
if ( v2 == v1 )
return 0LL;
v3 = v1;
... | func0:
ENDBR64
MOV RDX,qword ptr [RDI]
MOV RDI,qword ptr [RDI + 0x8]
CMP RDI,RDX
JZ 0x001015f0
LEA RCX,[RDI + -0x4]
MOV RAX,RDX
SUB RCX,RDX
MOV RSI,RCX
SHR RSI,0x2
ADD RSI,0x1
CMP RCX,0x8
JBE 0x001015f3
MOV RCX,RSI
PXOR XMM0,XMM0
SHR RCX,0x2
SHL RCX,0x4
ADD RCX,RDX
NOP dword ptr [RAX]
LAB_00101598:
MOVDQU XMM2,xmmword ... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
int *piVar1;
int iVar2;
int *piVar3;
int *piVar4;
int *piVar5;
int *piVar6;
ulong uVar7;
int *piVar8;
ulong uVar9;
int iVar10;
int iVar11;
int iVar12;
int iVar13;
piVar8 = *(int **)param_1;
piVar1 ... |
3,192 | func0 | #include <iostream>
#include <assert.h>
using namespace std;
const int INT_BITS = 32;
| int func0(int n, int d) {
return (n << d) | (n >> (INT_BITS - d));
}
| int main() {
assert(func0(16, 2) == 64);
assert(func0(10, 2) == 40);
assert(func0(99, 3) == 792);
return 0;
}
| O0 | cpp | func0(int, int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x4(%rbp)
mov %esi,-0x8(%rbp)
mov -0x8(%rbp),%eax
mov -0x4(%rbp),%edx
mov %edx,%esi
mov %eax,%ecx
shl %cl,%esi
mov $0x20,%eax
sub -0x8(%rbp),%eax
mov -0x4(%rbp),%edx
mov %eax,%ecx
sar %cl,%edx
mov %edx,%eax
or %es... | _Z5func0ii:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov [rbp+var_8], esi
mov eax, [rbp+var_8]
mov edx, [rbp+var_4]
mov esi, edx
mov ecx, eax
shl esi, cl
mov eax, 20h ; ' '
sub eax, [rbp+var_8]
mov edx, [rbp+var_4]
mov ecx, eax
sar edx, cl
mov eax, ed... | long long func0(int a1, char a2)
{
return (a1 << a2) | (unsigned int)(a1 >> (32 - a2));
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV dword ptr [RBP + -0x8],ESI
MOV EAX,dword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0x4]
MOV ESI,EDX
MOV ECX,EAX
SHL ESI,CL
MOV EAX,0x20
SUB EAX,dword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0x4]
MOV ECX,EAX
SAR EDX,CL
MOV EAX,EDX
OR EAX,ESI
POP ... | /* func0(int, int) */
uint func0(int param_1,int param_2)
{
return param_1 >> (0x20 - (byte)param_2 & 0x1f) | param_1 << ((byte)param_2 & 0x1f);
} |
3,193 | func0 | #include <iostream>
#include <assert.h>
using namespace std;
const int INT_BITS = 32;
| int func0(int n, int d) {
return (n << d) | (n >> (INT_BITS - d));
}
| int main() {
assert(func0(16, 2) == 64);
assert(func0(10, 2) == 40);
assert(func0(99, 3) == 792);
return 0;
}
| O1 | cpp | func0(int, int):
endbr64
mov $0x20,%ecx
sub %esi,%ecx
mov %edi,%eax
sar %cl,%eax
mov %esi,%ecx
shl %cl,%edi
or %edi,%eax
retq
| _Z5func0ii:
endbr64
mov ecx, 20h ; ' '
sub ecx, esi
mov eax, edi
sar eax, cl
mov ecx, esi
shl edi, cl
or eax, edi
retn | long long func0(int a1, char a2)
{
return (a1 << a2) | (unsigned int)(a1 >> (32 - a2));
} | func0:
ENDBR64
MOV ECX,0x20
SUB ECX,ESI
MOV EAX,EDI
SAR EAX,CL
MOV ECX,ESI
SHL EDI,CL
OR EAX,EDI
RET | /* func0(int, int) */
uint func0(int param_1,int param_2)
{
return param_1 >> (0x20 - (byte)param_2 & 0x1f) | param_1 << ((byte)param_2 & 0x1f);
} |
3,194 | func0 | #include <iostream>
#include <assert.h>
using namespace std;
const int INT_BITS = 32;
| int func0(int n, int d) {
return (n << d) | (n >> (INT_BITS - d));
}
| int main() {
assert(func0(16, 2) == 64);
assert(func0(10, 2) == 40);
assert(func0(99, 3) == 792);
return 0;
}
| O2 | cpp | func0(int, int):
endbr64
mov $0x20,%ecx
mov %edi,%eax
sub %esi,%ecx
sar %cl,%eax
mov %esi,%ecx
shl %cl,%edi
or %edi,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
| _Z5func0ii:
endbr64
mov ecx, 20h ; ' '
mov eax, edi
sub ecx, esi
sar eax, cl
mov ecx, esi
shl edi, cl
or eax, edi
retn | long long func0(int a1, char a2)
{
return (a1 << a2) | (unsigned int)(a1 >> (32 - a2));
} | func0:
ENDBR64
MOV ECX,0x20
MOV EAX,EDI
SUB ECX,ESI
SAR EAX,CL
MOV ECX,ESI
SHL EDI,CL
OR EAX,EDI
RET | /* func0(int, int) */
uint func0(int param_1,int param_2)
{
return param_1 >> (0x20 - (byte)param_2 & 0x1f) | param_1 << ((byte)param_2 & 0x1f);
} |
3,195 | func0 | #include <iostream>
#include <assert.h>
using namespace std;
const int INT_BITS = 32;
| int func0(int n, int d) {
return (n << d) | (n >> (INT_BITS - d));
}
| int main() {
assert(func0(16, 2) == 64);
assert(func0(10, 2) == 40);
assert(func0(99, 3) == 792);
return 0;
}
| O3 | cpp | func0(int, int):
endbr64
mov $0x20,%ecx
mov %edi,%eax
sub %esi,%ecx
sar %cl,%eax
mov %esi,%ecx
shl %cl,%edi
or %edi,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
| _Z5func0ii:
endbr64
mov ecx, 20h ; ' '
mov eax, edi
sub ecx, esi
sar eax, cl
mov ecx, esi
shl edi, cl
or eax, edi
retn | long long func0(int a1, char a2)
{
return (a1 << a2) | (unsigned int)(a1 >> (32 - a2));
} | func0:
ENDBR64
MOV ECX,0x20
MOV EAX,EDI
SUB ECX,ESI
SAR EAX,CL
MOV ECX,ESI
SHL EDI,CL
OR EAX,EDI
RET | /* func0(int, int) */
uint func0(int param_1,int param_2)
{
return param_1 >> (0x20 - (byte)param_2 & 0x1f) | param_1 << ((byte)param_2 & 0x1f);
} |
3,196 | func0 |
#include <iostream>
#include <regex>
#include <assert.h>
| std::string func0(const std::string& text) {
std::regex space_regex("\\s+");
return std::regex_replace(text, space_regex, "");
}
| int main() {
assert(func0("python program") == "pythonprogram");
assert(func0("python programming language") == "pythonprogramminglanguage");
assert(func0("python program") == "pythonprogram");
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
lea -0x40(%rbp),%rax
mov $0x10,%edx
lea ... | _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
lea rax, [rbp+var_40]
mov edx, 10h
lea rcx, aS; "\\s+"
mov ... | long long func0(long long a1, long long a2)
{
_BYTE v3[40]; // [rsp+10h] [rbp-40h] BYREF
unsigned long long v4; // [rsp+38h] [rbp-18h]
v4 = __readfsqword(0x28u);
std::basic_regex<char,std::regex_traits<char>>::basic_regex(v3, "\\s+", 16LL);
std::regex_replace<std::regex_traits<char>,char,std::char_traits<ch... | 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
LEA RAX,[RBP + -0x40]
MOV EDX,0x10
LEA RCX,[0x134051]
MOV RSI,RCX
MOV RDI,RAX
LAB_00104b63:
CALL 0x00106152
MOV RAX,qword ptr ... | /* func0(std::string const&) */
string * func0(string *param_1)
{
int8 in_RSI;
long in_FS_OFFSET;
regex local_48 [40];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
std::regex::basic_regex(local_48,"\\s+",0x10);
/* try { // try from 00104b84 to 00104b88 has its CatchHand... |
3,197 | func0 |
#include <iostream>
#include <regex>
#include <assert.h>
| std::string func0(const std::string& text) {
std::regex space_regex("\\s+");
return std::regex_replace(text, space_regex, "");
}
| int main() {
assert(func0("python program") == "pythonprogram");
assert(func0("python programming language") == "pythonprogramminglanguage");
assert(func0("python program") == "pythonprogram");
return 0;
}
| 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 $0x48,%rsp
mov %rdi,%rbx
mov %rsi,%rbp
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
lea 0x8(%rsp),%r13
mov %r13,%rdi
callq 4730 <_ZNS... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
push r12
push rbx
sub rsp, 38h
mov rbx, rdi
mov r14, rsi
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
lea r12, [rbp+var_50]
lea rdi, [rbp+var_48]; this
call __Z... | long long func0(long long a1, long long *a2)
{
long long v4; // rsi
_DWORD *v5; // rdi
volatile signed __int32 *v6; // rcx
long long v7; // rdx
signed __int32 v8; // eax
_BYTE v10[8]; // [rsp+0h] [rbp-50h] BYREF
_BYTE v11[8]; // [rsp+8h] [rbp-48h] BYREF
long long v12; // [rsp+10h] [rbp-40h]
long long... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,RDI
MOV R14,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
LEA R12,[RBP + -0x50]
LEA RDI,[RBP + -0x48]
CALL 0x00104710
MOV qword ptr [RBP + -0x40],0x0
MOV qword ptr [RBP + -0x38],0x0
MOV ECX,0x10
LEA RDX,[0x... | /* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
_Sp_counted_base<(_Lock_policy)2> *p_Var2;
int iVar3;
int8 *in_RSI;
long in_FS_OFFSET;
regex local_58 [8];
int local_50 [8];
int8 local_48;
_Sp_counted_base<(_Lock_policy)2> *local_40;
long... |
3,198 | func0 |
#include <iostream>
#include <regex>
#include <assert.h>
| std::string func0(const std::string& text) {
std::regex space_regex("\\s+");
return std::regex_replace(text, space_regex, "");
}
| int main() {
assert(func0("python program") == "pythonprogram");
assert(func0("python programming language") == "pythonprogramminglanguage");
assert(func0("python program") == "pythonprogram");
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x40,%rsp
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
lea 0x8(%rsp),%rbp
lea 0x18(%rsp),%r13... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
mov r14, rsi
push r13
lea r13, [rbp+var_50]
push r12
lea r12, [rbp+var_48]
push rbx
mov rbx, rdi
mov rdi, r12; this
sub rsp, 30h
mov rax, fs:28h
mov [rbp+var_28], rax... | long long func0(long long a1, long long *a2)
{
long long v3; // rsi
long long v4; // rdi
long long v5; // rdx
volatile signed __int32 *v6; // rcx
signed __int32 v7; // eax
long long v9; // rax
_BYTE v10[8]; // [rsp+0h] [rbp-50h] BYREF
_BYTE v11[8]; // [rsp+8h] [rbp-48h] BYREF
__int128 v12; // [rsp+10... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
MOV R14,RSI
PUSH R13
LEA R13,[RBP + -0x50]
PUSH R12
LEA R12,[RBP + -0x48]
PUSH RBX
MOV RBX,RDI
MOV RDI,R12
SUB RSP,0x30
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
CALL 0x001046f0
LEA RDX,[0x11a6ea]
PXOR XMM0,XMM0
MOV RDI,R13
MOV ECX,0x10
LEA RSI,... | /* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
int8 uVar2;
int iVar3;
int8 *in_RSI;
long in_FS_OFFSET;
regex local_58 [8];
int local_50 [8];
int local_48 [24];
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
std::locale::... |
3,199 | func0 |
#include <iostream>
#include <regex>
#include <assert.h>
| std::string func0(const std::string& text) {
std::regex space_regex("\\s+");
return std::regex_replace(text, space_regex, "");
}
| int main() {
assert(func0("python program") == "pythonprogram");
assert(func0("python programming language") == "pythonprogramminglanguage");
assert(func0("python program") == "pythonprogram");
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x40,%rsp
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
lea 0x8(%rsp),%rbp
lea 0x18(%rsp),%r13... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
lea r14, [rbp+var_E0]
push r13
push r12
mov r12, rsi
push rbx
mov rbx, rdi
sub rsp, 108h
mov rax, fs:28h
mov [rbp+var_38], rax
xor eax, eax
lea rax, [rbp+... | _QWORD * func0(_QWORD *a1, char **a2)
{
char *v3; // rax
long long v4; // r13
char *v5; // r15
char *v6; // r12
char v7; // al
long long v8; // rdx
long long v9; // rcx
long long v10; // r8
long long v11; // r9
unsigned long long v12; // rsi
long long v13; // rdi
volatile signed __int32 *v14; //... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
LEA R14,[RBP + -0xe0]
PUSH R13
PUSH R12
MOV R12,RSI
PUSH RBX
MOV RBX,RDI
SUB RSP,0x108
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0xd8]
MOV qword ptr [RBP + -0x130],R14
MOV RDI,RAX
MOV qword ptr [RBP + -0x128],RAX
CALL 0x... | /* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
string sVar2;
string *psVar3;
long lVar4;
int8 uVar5;
bool bVar6;
char cVar7;
int iVar8;
int8 *puVar9;
string *psVar10;
long lVar11;
long *plVar12;
ulong uVar13;
ulong uVar14;
lon... |
3,200 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int x, int y, int z) {
int count[3] = {x, y, z};
int unique = 0;
for (int i=0; i<3; i++) {
bool is_unique = true;
for (int j=0; j<i; j++) {
if (count[i] == count[j]) {
is_unique = false;
break;
}
}
i... | int main() {
assert(func0(1, 1, 1) == 3);
assert(func0(-1, -2, -3) == 0);
assert(func0(1, 2, 2) == 2);
std::cout << "All test cases passed." << std::endl;
return 0;
}
| O0 | cpp | func0(int, int, int):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x40,%rsp
mov %edi,-0x34(%rbp)
mov %esi,-0x38(%rbp)
mov %edx,-0x3c(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
mov -0x34(%rbp),%eax
mov %eax,-0x14(%rbp)
mov -0x38(%rbp),%eax
mov %eax,-0x10(%rbp)
mov -0x3c(%... | _Z5func0iii:
endbr64
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_34], edi
mov [rbp+var_38], esi
mov [rbp+var_3C], edx
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov eax, [rbp+var_34]
mov [rbp+var_14], eax
mov eax, [rbp+var_38]
mov [rbp+var_10], eax
mov e... | long long func0(int a1, int a2, int a3)
{
char v4; // [rsp+1Fh] [rbp-21h]
int v5; // [rsp+20h] [rbp-20h]
int i; // [rsp+24h] [rbp-1Ch]
int j; // [rsp+28h] [rbp-18h]
_DWORD v8[3]; // [rsp+2Ch] [rbp-14h]
unsigned long long v9; // [rsp+38h] [rbp-8h]
v9 = __readfsqword(0x28u);
v8[0] = a1;
v8[1] = a2;
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV dword ptr [RBP + -0x34],EDI
MOV dword ptr [RBP + -0x38],ESI
MOV dword ptr [RBP + -0x3c],EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x14],EAX
MOV EAX,dword ptr [RBP + -0x38]
MOV dwor... | /* func0(int, int, int) */
int func0(int param_1,int param_2,int param_3)
{
bool bVar1;
long in_FS_OFFSET;
int local_28;
int local_24;
int local_20;
int local_1c [3];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_1c[0] = param_1;
local_1c[1] = param_2;
local_1c[2] = param_3;... |
3,201 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int x, int y, int z) {
int count[3] = {x, y, z};
int unique = 0;
for (int i=0; i<3; i++) {
bool is_unique = true;
for (int j=0; j<i; j++) {
if (count[i] == count[j]) {
is_unique = false;
break;
}
}
i... | int main() {
assert(func0(1, 1, 1) == 3);
assert(func0(-1, -2, -3) == 0);
assert(func0(1, 2, 2) == 2);
std::cout << "All test cases passed." << std::endl;
return 0;
}
| O1 | cpp | func0(int, int, int):
endbr64
sub $0x28,%rsp
mov %fs:0x28,%rax
mov %rax,0x18(%rsp)
xor %eax,%eax
mov %edi,0xc(%rsp)
mov %esi,0x10(%rsp)
mov %edx,0x14(%rsp)
mov $0x0,%edi
mov $0x0,%r8d
jmp 1251 <_Z5func0iii+0x68>
mov $0x4,%eax
sub %r8d,%eax
cmp $0x3,%r8d
mov $0x0,%edx
cmove %ed... | _Z5func0iii:
endbr64
sub rsp, 28h
mov rax, fs:28h
mov [rsp+28h+var_10], rax
xor eax, eax
mov [rsp+28h+var_1C], edi
mov [rsp+28h+var_18], esi
mov [rsp+28h+var_14], edx
mov ecx, 0
jmp short loc_11DE
loc_11D4:
add rax, 1
cmp rax, 3
jz short loc_11FC
loc_11DE:
mov r8d, e... | long long func0(int a1, int a2, int a3)
{
long long v3; // rax
int v4; // ecx
int v5; // edx
long long result; // rax
_DWORD v7[3]; // [rsp+Ch] [rbp-1Ch]
unsigned long long v8; // [rsp+18h] [rbp-10h]
v8 = __readfsqword(0x28u);
v3 = 0LL;
v7[0] = a1;
v7[1] = a2;
v7[2] = a3;
v4 = 0;
do
{
... | func0:
ENDBR64
SUB RSP,0x28
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x18],RAX
XOR EAX,EAX
MOV dword ptr [RSP + 0xc],EDI
MOV dword ptr [RSP + 0x10],ESI
MOV dword ptr [RSP + 0x14],EDX
MOV ECX,0x0
JMP 0x001011de
LAB_001011d4:
ADD RAX,0x1
CMP RAX,0x3
JZ 0x001011fc
LAB_001011de:
MOV R8D,EAX
TEST EAX,EAX
JLE 0x00101... | /* func0(int, int, int) */
int func0(int param_1,int param_2,int param_3)
{
int iVar1;
long lVar2;
int iVar3;
long in_FS_OFFSET;
int local_1c [3];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
lVar2 = 0;
local_1c[0] = param_1;
local_1c[1] = param_2;
local_1c[2] = param_3;
iVar3 ... |
3,202 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int x, int y, int z) {
int count[3] = {x, y, z};
int unique = 0;
for (int i=0; i<3; i++) {
bool is_unique = true;
for (int j=0; j<i; j++) {
if (count[i] == count[j]) {
is_unique = false;
break;
}
}
i... | int main() {
assert(func0(1, 1, 1) == 3);
assert(func0(-1, -2, -3) == 0);
assert(func0(1, 2, 2) == 2);
std::cout << "All test cases passed." << std::endl;
return 0;
}
| O2 | cpp | func0(int, int, int):
endbr64
sub $0x28,%rsp
xor %r8d,%r8d
xor %r10d,%r10d
mov %fs:0x28,%rax
mov %rax,0x18(%rsp)
xor %eax,%eax
mov %edi,0xc(%rsp)
lea 0xc(%rsp),%r9
mov %esi,0x10(%rsp)
mov %edx,0x14(%rsp)
test %r8,%r8
je 1548 <_Z5func0iii+0x98>
lea -0x1(%r8),%edx
mov (%r9,%r8,4)... | _Z5func0iii:
endbr64
sub rsp, 28h
mov rax, fs:28h
mov [rsp+28h+var_10], rax
xor eax, eax
mov [rsp+28h+var_1C], edi
lea r9, [rsp+28h+var_1C]
mov [rsp+28h+var_18], esi
mov [rsp+28h+var_14], edx
xor edx, edx
loc_137B:
mov r8d, eax
test eax, eax
jz short loc_13AC
loc_1382:
mo... | long long func0(int a1, int a2, int a3)
{
long long v3; // rax
int v4; // edx
int v5; // r8d
int v6; // ecx
long long result; // rax
_DWORD v8[3]; // [rsp+Ch] [rbp-1Ch]
unsigned long long v9; // [rsp+18h] [rbp-10h]
v9 = __readfsqword(0x28u);
v3 = 0LL;
v8[0] = a1;
v8[1] = a2;
v8[2] = a3;
v4 =... | func0:
ENDBR64
SUB RSP,0x28
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x18],RAX
XOR EAX,EAX
MOV dword ptr [RSP + 0xc],EDI
LEA R9,[RSP + 0xc]
MOV dword ptr [RSP + 0x10],ESI
MOV dword ptr [RSP + 0x14],EDX
XOR EDX,EDX
LAB_0010137b:
MOV R8D,EAX
TEST EAX,EAX
JZ 0x001013ac
LAB_00101382:
MOV ECX,dword ptr [R9 + RAX*0x4... | /* func0(int, int, int) */
int func0(int param_1,int param_2,int param_3)
{
int iVar1;
long lVar2;
int iVar3;
long in_FS_OFFSET;
int local_1c [3];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
lVar2 = 0;
local_1c[0] = param_1;
local_1c[1] = param_2;
local_1c[2] = param_3;
iVar3 ... |
3,203 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int x, int y, int z) {
int count[3] = {x, y, z};
int unique = 0;
for (int i=0; i<3; i++) {
bool is_unique = true;
for (int j=0; j<i; j++) {
if (count[i] == count[j]) {
is_unique = false;
break;
}
}
i... | int main() {
assert(func0(1, 1, 1) == 3);
assert(func0(-1, -2, -3) == 0);
assert(func0(1, 2, 2) == 2);
std::cout << "All test cases passed." << std::endl;
return 0;
}
| O3 | cpp | func0(int, int, int):
endbr64
xor %ecx,%ecx
cmp %esi,%edi
setne %cl
add $0x1,%ecx
cmp %edx,%edi
je 1252 <_Z5func0iii+0x22>
cmp %edx,%esi
je 1252 <_Z5func0iii+0x22>
xor %eax,%eax
cmp $0x2,%ecx
je 1260 <_Z5func0iii+0x30>
mov $0x2,%ecx
mov $0x4,%eax
sub %ecx,%eax
retq
nopw 0x0(... | _Z5func0iii:
endbr64
cmp edi, esi
jz short loc_1340
cmp edi, edx
jz short loc_1333
xor eax, eax
cmp esi, edx
jz short loc_1333
retn
loc_1333:
mov edx, 2
loc_1338:
mov eax, 4
sub eax, edx
retn
loc_1340:
cmp edi, edx
setnz dl
movzx edx, dl
add edx, 1
jmp short lo... | long long func0(int a1, int a2, int a3)
{
long long result; // rax
int v4; // edx
if ( a1 == a2 )
{
v4 = (a1 != a3) + 1;
return (unsigned int)(4 - v4);
}
if ( a1 == a3 || (result = 0LL, a2 == a3) )
{
v4 = 2;
return (unsigned int)(4 - v4);
}
return result;
} | func0:
ENDBR64
CMP EDI,ESI
JZ 0x00101340
CMP EDI,EDX
JZ 0x00101333
XOR EAX,EAX
CMP ESI,EDX
JZ 0x00101333
RET
LAB_00101333:
MOV EDX,0x2
LAB_00101338:
MOV EAX,0x4
SUB EAX,EDX
RET
LAB_00101340:
CMP EDI,EDX
SETNZ DL
MOVZX EDX,DL
ADD EDX,0x1
JMP 0x00101338 | /* func0(int, int, int) */
int func0(int param_1,int param_2,int param_3)
{
int iVar1;
if (param_1 == param_2) {
iVar1 = (param_1 != param_3) + 1;
}
else {
if ((param_1 != param_3) && (param_2 != param_3)) {
return 0;
}
iVar1 = 2;
}
return 4 - iVar1;
} |
3,204 | func0 | #include <assert.h>
| int func0(int arr[], int n) {
for (int i = 1; i < n; i++) {
if (arr[i] < arr[i - 1]) {
return i;
}
}
return 0;
}
| int main() {
int arr1[] = {3, 2, 1};
int arr2[] = {4, 5, 1, 2, 3};
int arr3[] = {7, 8, 9, 1, 2, 3};
assert(func0(arr1, 3) == 1);
assert(func0(arr2, 5) == 2);
assert(func0(arr3, 6) == 3);
return 0;
}
| O0 | cpp | func0(int*, int):
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
movl $0x1,-0x4(%rbp)
mov -0x4(%rbp),%eax
cmp -0x1c(%rbp),%eax
jge 11c2 <_Z5func0Pii+0x59>
mov -0x4(%rbp),%eax
cltq
lea 0x0(,%rax,4),%rdx
mov -0x18(%rbp),%rax
add %rdx,%rax
mov (%rax),%edx
mov... | _Z5func0Pii:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_4], 1
jmp short loc_11BA
loc_1181:
mov eax, [rbp+var_4]
cdqe
lea rdx, ds:0[rax*4]
mov rax, [rbp+var_18]
add rax, rdx
mov edx, [rax]
mov eax, [rbp+var_4]
cdqe
shl rax, 2
... | long long func0(int *a1, int a2)
{
int i; // [rsp+18h] [rbp-4h]
for ( i = 1; i < a2; ++i )
{
if ( a1[i] < a1[i - 1] )
return (unsigned int)i;
}
return 0LL;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001011ba
LAB_00101181:
MOV EAX,dword ptr [RBP + -0x4]
CDQE
LEA RDX,[RAX*0x4]
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,RDX
MOV EDX,dword ptr [RAX]
MOV EAX,dword ptr [RBP + -0x4]
CDQE
SH... | /* func0(int*, int) */
int func0(int *param_1,int param_2)
{
int local_c;
local_c = 1;
while( true ) {
if (param_2 <= local_c) {
return 0;
}
if (param_1[local_c] < param_1[(long)local_c + -1]) break;
local_c = local_c + 1;
}
return local_c;
} |
3,205 | func0 | #include <assert.h>
| int func0(int arr[], int n) {
for (int i = 1; i < n; i++) {
if (arr[i] < arr[i - 1]) {
return i;
}
}
return 0;
}
| int main() {
int arr1[] = {3, 2, 1};
int arr2[] = {4, 5, 1, 2, 3};
int arr3[] = {7, 8, 9, 1, 2, 3};
assert(func0(arr1, 3) == 1);
assert(func0(arr2, 5) == 2);
assert(func0(arr3, 6) == 3);
return 0;
}
| O1 | cpp | func0(int*, int):
endbr64
cmp $0x1,%esi
jle 119a <_Z5func0Pii+0x31>
lea -0x2(%rsi),%edx
add $0x2,%rdx
mov $0x1,%eax
mov %eax,%ecx
mov -0x4(%rdi,%rax,4),%esi
cmp %esi,(%rdi,%rax,4)
jl 1197 <_Z5func0Pii+0x2e>
add $0x1,%rax
cmp %rdx,%rax
jne 117e <_Z5func0Pii+0x15>
mov $0x0,%ecx
mov... | _Z5func0Pii:
endbr64
cmp esi, 1
jle short loc_1191
mov esi, esi
mov eax, 1
loc_1179:
mov edx, [rdi+rax*4-4]
cmp [rdi+rax*4], edx
jl short locret_1196
add rax, 1
cmp rax, rsi
jnz short loc_1179
mov eax, 0
retn
loc_1191:
mov eax, 0
locret_1196:
retn | long long func0(int *a1, int a2)
{
long long result; // rax
if ( a2 <= 1 )
return 0LL;
result = 1LL;
while ( a1[result] >= a1[result - 1] )
{
if ( ++result == a2 )
return 0LL;
}
return result;
} | func0:
ENDBR64
CMP ESI,0x1
JLE 0x00101191
MOV ESI,ESI
MOV EAX,0x1
LAB_00101179:
MOV EDX,dword ptr [RDI + RAX*0x4 + -0x4]
CMP dword ptr [RDI + RAX*0x4],EDX
JL 0x00101196
ADD RAX,0x1
CMP RAX,RSI
JNZ 0x00101179
MOV EAX,0x0
RET
LAB_00101191:
MOV EAX,0x0
LAB_00101196:
RET | /* func0(int*, int) */
ulong func0(int *param_1,int param_2)
{
ulong uVar1;
if (param_2 < 2) {
uVar1 = 0;
}
else {
uVar1 = 1;
while (param_1[uVar1 - 1] <= param_1[uVar1]) {
uVar1 = uVar1 + 1;
if (uVar1 == (uint)param_2) {
return 0;
}
}
}
return uVar1;
} |
3,206 | func0 | #include <assert.h>
| int func0(int arr[], int n) {
for (int i = 1; i < n; i++) {
if (arr[i] < arr[i - 1]) {
return i;
}
}
return 0;
}
| int main() {
int arr1[] = {3, 2, 1};
int arr2[] = {4, 5, 1, 2, 3};
int arr3[] = {7, 8, 9, 1, 2, 3};
assert(func0(arr1, 3) == 1);
assert(func0(arr2, 5) == 2);
assert(func0(arr3, 6) == 3);
return 0;
}
| O2 | cpp | func0(int*, int):
endbr64
cmp $0x1,%esi
jle 1180 <_Z5func0Pii+0x40>
lea -0x2(%rsi),%edx
mov $0x1,%eax
add $0x2,%rdx
jmp 1169 <_Z5func0Pii+0x29>
nopw 0x0(%rax,%rax,1)
add $0x1,%rax
cmp %rdx,%rax
je 1180 <_Z5func0Pii+0x40>
mov -0x4(%rdi,%rax,4),%ecx
mov %eax,%r8d
cmp %ecx,(%rdi,%rax... | _Z5func0Pii:
endbr64
cmp esi, 1
jle short loc_12B0
mov edx, [rdi]
mov esi, esi
mov eax, 1
jmp short loc_12A1
loc_1298:
add rax, 1
cmp rax, rsi
jz short loc_12B0
loc_12A1:
mov ecx, edx
mov edx, [rdi+rax*4]
cmp edx, ecx
jge short loc_1298
retn
loc_12B0:
xor eax, ea... | long long func0(int *a1, int a2)
{
int v2; // edx
long long result; // rax
int v4; // ecx
if ( a2 <= 1 )
return 0LL;
v2 = *a1;
result = 1LL;
while ( 1 )
{
v4 = v2;
v2 = a1[result];
if ( v2 < v4 )
break;
if ( ++result == a2 )
return 0LL;
}
return result;
} | func0:
ENDBR64
CMP ESI,0x1
JLE 0x001012b0
MOV EDX,dword ptr [RDI]
MOV ESI,ESI
MOV EAX,0x1
JMP 0x001012a1
LAB_00101298:
ADD RAX,0x1
CMP RAX,RSI
JZ 0x001012b0
LAB_001012a1:
MOV ECX,EDX
MOV EDX,dword ptr [RDI + RAX*0x4]
CMP EDX,ECX
JGE 0x00101298
RET
LAB_001012b0:
XOR EAX,EAX
RET | /* func0(int*, int) */
ulong func0(int *param_1,int param_2)
{
int *piVar1;
ulong uVar2;
int iVar3;
if (1 < param_2) {
uVar2 = 1;
iVar3 = *param_1;
do {
piVar1 = param_1 + uVar2;
if (*piVar1 < iVar3) {
return uVar2;
}
uVar2 = uVar2 + 1;
iVar3 = *piVar1;
... |
3,207 | func0 | #include <assert.h>
| int func0(int arr[], int n) {
for (int i = 1; i < n; i++) {
if (arr[i] < arr[i - 1]) {
return i;
}
}
return 0;
}
| int main() {
int arr1[] = {3, 2, 1};
int arr2[] = {4, 5, 1, 2, 3};
int arr3[] = {7, 8, 9, 1, 2, 3};
assert(func0(arr1, 3) == 1);
assert(func0(arr2, 5) == 2);
assert(func0(arr3, 6) == 3);
return 0;
}
| O3 | cpp | func0(int*, int):
endbr64
cmp $0x1,%esi
jle 1240 <_Z5func0Pii+0x40>
sub $0x2,%esi
mov (%rdi),%edx
mov $0x1,%eax
add $0x2,%rsi
jmp 1229 <_Z5func0Pii+0x29>
nopl 0x0(%rax)
add $0x1,%rax
cmp %rsi,%rax
je 1240 <_Z5func0Pii+0x40>
mov %edx,%ecx
mov (%rdi,%rax,4),%edx
mov %eax,%r8d
cmp... | _Z5func0Pii:
endbr64
cmp esi, 1
jle short loc_1170
mov edx, [rdi]
mov esi, esi
mov eax, 1
jmp short loc_1161
loc_1158:
add rax, 1
cmp rax, rsi
jz short loc_1170
loc_1161:
mov ecx, edx
mov edx, [rdi+rax*4]
cmp edx, ecx
jge short loc_1158
retn
loc_1170:
xor eax, ea... | long long func0(int *a1, int a2)
{
int v2; // edx
long long result; // rax
int v4; // ecx
if ( a2 <= 1 )
return 0LL;
v2 = *a1;
result = 1LL;
while ( 1 )
{
v4 = v2;
v2 = a1[result];
if ( v2 < v4 )
break;
if ( ++result == a2 )
return 0LL;
}
return result;
} | func0:
ENDBR64
CMP ESI,0x1
JLE 0x00101170
MOV EDX,dword ptr [RDI]
MOV ESI,ESI
MOV EAX,0x1
JMP 0x00101161
LAB_00101158:
ADD RAX,0x1
CMP RAX,RSI
JZ 0x00101170
LAB_00101161:
MOV ECX,EDX
MOV EDX,dword ptr [RDI + RAX*0x4]
CMP EDX,ECX
JGE 0x00101158
RET
LAB_00101170:
XOR EAX,EAX
RET | /* func0(int*, int) */
ulong func0(int *param_1,int param_2)
{
int *piVar1;
ulong uVar2;
int iVar3;
if (1 < param_2) {
uVar2 = 1;
iVar3 = *param_1;
do {
piVar1 = param_1 + uVar2;
if (*piVar1 < iVar3) {
return uVar2;
}
uVar2 = uVar2 + 1;
iVar3 = *piVar1;
... |
3,208 | func0 |
#include <iostream>
#include <assert.h>
| bool func0(int n) {
int i = 1;
while (i * i <= n) {
if ((n % i == 0) && (n / i == i)) {
return true;
}
i = i + 1;
}
return false;
}
| int main() {
assert(func0(10) == false);
assert(func0(36) == true);
assert(func0(14) == false);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
movl $0x1,-0x4(%rbp)
mov -0x4(%rbp),%eax
imul %eax,%eax
cmp %eax,-0x14(%rbp)
jl 11cc <_Z5func0i+0x43>
mov -0x14(%rbp),%eax
cltd
idivl -0x4(%rbp)
mov %edx,%eax
test %eax,%eax
jne 11c6 <_Z5func0i+0x3d>
mov -0x14(%rbp),%e... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_4], 1
jmp short loc_1181
loc_115D:
mov eax, [rbp+var_14]
cdq
idiv [rbp+var_4]
mov eax, edx
test eax, eax
jnz short loc_117D
mov eax, [rbp+var_14]
cdq
idiv [rbp+var_4]
cmp [rbp+var_4], eax
jnz ... | long long func0(int a1)
{
int i; // [rsp+10h] [rbp-4h]
for ( i = 1; a1 >= i * i; ++i )
{
if ( !(a1 % i) && i == a1 / i )
return 1LL;
}
return 0LL;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00101181
LAB_0010115d:
MOV EAX,dword ptr [RBP + -0x14]
CDQ
IDIV dword ptr [RBP + -0x4]
MOV EAX,EDX
TEST EAX,EAX
JNZ 0x0010117d
MOV EAX,dword ptr [RBP + -0x14]
CDQ
IDIV dword ptr [RBP + -0x4]
CMP dword ptr [RBP + -0x... | /* func0(int) */
int8 func0(int param_1)
{
int local_c;
local_c = 1;
while( true ) {
if (param_1 < local_c * local_c) {
return 0;
}
if ((param_1 % local_c == 0) && (local_c == param_1 / local_c)) break;
local_c = local_c + 1;
}
return 1;
} |
3,209 | func0 |
#include <iostream>
#include <assert.h>
| bool func0(int n) {
int i = 1;
while (i * i <= n) {
if ((n % i == 0) && (n / i == i)) {
return true;
}
i = i + 1;
}
return false;
}
| int main() {
assert(func0(10) == false);
assert(func0(36) == true);
assert(func0(14) == false);
return 0;
}
| O1 | cpp | func0(int):
endbr64
test %edi,%edi
jle 11c2 <_Z5func0i+0x39>
mov $0x1,%ecx
jmp 11a4 <_Z5func0i+0x1b>
add $0x1,%ecx
mov %ecx,%eax
imul %ecx,%eax
cmp %edi,%eax
jg 11bc <_Z5func0i+0x33>
mov %edi,%eax
cltd
idiv %ecx
test %edx,%edx
jne 1198 <_Z5func0i+0xf>
mov %edi,%eax
cltd
idiv %ec... | _Z5func0i:
endbr64
test edi, edi
jle short loc_1182
mov ecx, 1
jmp short loc_1164
loc_1158:
add ecx, 1
mov eax, ecx
imul eax, ecx
cmp eax, edi
jg short loc_117C
loc_1164:
mov eax, edi
cdq
idiv ecx
test edx, edx
jnz short loc_1158
mov eax, edi
cdq
idiv ecx
cmp ... | long long func0(int a1)
{
int v1; // ecx
if ( a1 <= 0 )
return 0LL;
v1 = 1;
do
{
if ( !(a1 % v1) && a1 / v1 == v1 )
return 1LL;
++v1;
}
while ( v1 * v1 <= a1 );
return 0LL;
} | func0:
ENDBR64
TEST EDI,EDI
JLE 0x00101182
MOV ECX,0x1
JMP 0x00101164
LAB_00101158:
ADD ECX,0x1
MOV EAX,ECX
IMUL EAX,ECX
CMP EAX,EDI
JG 0x0010117c
LAB_00101164:
MOV EAX,EDI
CDQ
IDIV ECX
TEST EDX,EDX
JNZ 0x00101158
MOV EAX,EDI
CDQ
IDIV ECX
CMP EAX,ECX
JNZ 0x00101158
MOV EAX,0x1
RET
LAB_0010117c:
MOV EAX,0x0
RET
LAB_0010... | /* func0(int) */
int [16] func0(int param_1)
{
int auVar1 [16];
int auVar2 [16];
int iVar3;
ulong in_RDX;
int auVar4 [16];
if (param_1 < 1) {
auVar2._8_8_ = 0;
auVar2._0_8_ = in_RDX;
return auVar2 << 0x40;
}
iVar3 = 1;
while ((auVar4._8_8_ = (long)param_1 % (long)iVar3 & 0xffffffff,
... |
3,210 | func0 |
#include <iostream>
#include <assert.h>
| bool func0(int n) {
int i = 1;
while (i * i <= n) {
if ((n % i == 0) && (n / i == i)) {
return true;
}
i = i + 1;
}
return false;
}
| int main() {
assert(func0(10) == false);
assert(func0(36) == true);
assert(func0(14) == false);
return 0;
}
| O2 | cpp | func0(int):
endbr64
test %edi,%edi
jle 12e9 <_Z5func0i+0x29>
mov $0x1,%ecx
nopl (%rax)
mov %edi,%eax
cltd
idiv %ecx
test %edx,%edx
jne 12dd <_Z5func0i+0x1d>
cmp %ecx,%eax
je 12f0 <_Z5func0i+0x30>
add $0x1,%ecx
mov %ecx,%eax
imul %ecx,%eax
cmp %edi,%eax
jle 12d0 <_Z5func0i+0x10>
... | _Z5func0i:
endbr64
test edi, edi
jle short loc_1219
mov ecx, 1
nop dword ptr [rax]
loc_1200:
mov eax, edi
cdq
idiv ecx
test edx, edx
jnz short loc_120D
cmp eax, ecx
jz short loc_1220
loc_120D:
add ecx, 1
mov eax, ecx
imul eax, ecx
cmp eax, edi
jle short loc_1200
... | long long func0(int a1)
{
int v1; // ecx
if ( a1 <= 0 )
return 0LL;
v1 = 1;
while ( a1 % v1 || a1 / v1 != v1 )
{
++v1;
if ( v1 * v1 > a1 )
return 0LL;
}
return 1LL;
} | func0:
ENDBR64
TEST EDI,EDI
JLE 0x00101219
MOV ECX,0x1
NOP dword ptr [RAX]
LAB_00101200:
MOV EAX,EDI
CDQ
IDIV ECX
TEST EDX,EDX
JNZ 0x0010120d
CMP EAX,ECX
JZ 0x00101220
LAB_0010120d:
ADD ECX,0x1
MOV EAX,ECX
IMUL EAX,ECX
CMP EAX,EDI
JLE 0x00101200
LAB_00101219:
XOR EAX,EAX
RET
LAB_00101220:
MOV EAX,0x1
RET | /* func0(int) */
int8 func0(int param_1)
{
int iVar1;
if (0 < param_1) {
iVar1 = 1;
do {
if ((param_1 % iVar1 == 0) && (param_1 / iVar1 == iVar1)) {
return 1;
}
iVar1 = iVar1 + 1;
} while (iVar1 * iVar1 <= param_1);
}
return 0;
} |
3,211 | func0 |
#include <iostream>
#include <assert.h>
| bool func0(int n) {
int i = 1;
while (i * i <= n) {
if ((n % i == 0) && (n / i == i)) {
return true;
}
i = i + 1;
}
return false;
}
| int main() {
assert(func0(10) == false);
assert(func0(36) == true);
assert(func0(14) == false);
return 0;
}
| O3 | cpp | func0(int):
endbr64
test %edi,%edi
jle 12e9 <_Z5func0i+0x29>
mov $0x1,%ecx
nopl (%rax)
mov %edi,%eax
cltd
idiv %ecx
test %edx,%edx
jne 12dd <_Z5func0i+0x1d>
cmp %ecx,%eax
je 12f0 <_Z5func0i+0x30>
add $0x1,%ecx
mov %ecx,%eax
imul %ecx,%eax
cmp %edi,%eax
jle 12d0 <_Z5func0i+0x10>
... | _Z5func0i:
endbr64
test edi, edi
jle short loc_1269
mov ecx, 1
nop dword ptr [rax]
loc_1250:
mov eax, edi
cdq
idiv ecx
test edx, edx
jnz short loc_125D
cmp eax, ecx
jz short loc_1270
loc_125D:
add ecx, 1
mov eax, ecx
imul eax, ecx
cmp eax, edi
jle short loc_1250
... | long long func0(int a1)
{
int v1; // ecx
if ( a1 <= 0 )
return 0LL;
v1 = 1;
while ( a1 % v1 || a1 / v1 != v1 )
{
++v1;
if ( v1 * v1 > a1 )
return 0LL;
}
return 1LL;
} | func0:
ENDBR64
TEST EDI,EDI
JLE 0x00101269
MOV ECX,0x1
NOP dword ptr [RAX]
LAB_00101250:
MOV EAX,EDI
CDQ
IDIV ECX
TEST EDX,EDX
JNZ 0x0010125d
CMP EAX,ECX
JZ 0x00101270
LAB_0010125d:
ADD ECX,0x1
MOV EAX,ECX
IMUL EAX,ECX
CMP EAX,EDI
JLE 0x00101250
LAB_00101269:
XOR EAX,EAX
RET
LAB_00101270:
MOV EAX,0x1
RET | /* func0(int) */
int8 func0(int param_1)
{
int iVar1;
if (0 < param_1) {
iVar1 = 1;
do {
if ((param_1 % iVar1 == 0) && (param_1 / iVar1 == iVar1)) {
return 1;
}
iVar1 = iVar1 + 1;
} while (iVar1 * iVar1 <= param_1);
}
return 0;
} |
3,212 | func0 |
#include <iostream>
#include <assert.h>
#include <vector>
| bool func0(std::vector<int> arr, int n) {
for(int i = 0; i < n; i++) {
if ((arr[i] & 1) == 0) {
return true;
}
}
return false;
}
| int main() {
assert(func0({1, 2, 3}, 3) == true);
assert(func0({1, 2, 1, 4}, 4) == true);
assert(func0({1, 1}, 2) == false);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> >, int):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
movl $0x0,-0x4(%rbp)
mov -0x4(%rbp),%eax
cmp -0x1c(%rbp),%eax
jge 12bb <_Z5func0St6vectorIiSaIiEEi+0x52>
mov -0x4(%rbp),%eax
movslq %eax,%rdx
mov -0... | _Z5func0St6vectorIiSaIiEEi:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_4], 0
jmp short loc_1293
loc_1265:
mov eax, [rbp+var_4]
movsxd rdx, eax
mov rax, [rbp+var_18]
mov rsi, rdx
mov rdi, rax
call _ZNSt6vectorIiSaIiEE... | long long func0(long long a1, int a2)
{
int i; // [rsp+1Ch] [rbp-4h]
for ( i = 0; i < a2; ++i )
{
if ( (*(_DWORD *)std::vector<int>::operator[](a1, i) & 1) == 0 )
return 1LL;
}
return 0LL;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00101293
LAB_00101265:
MOV EAX,dword ptr [RBP + -0x4]
MOVSXD RDX,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x001015a8
MOV EAX,dword ptr [RAX]
AND E... | /* func0(std::vector<int, std::allocator<int> >, int) */
int8 func0(vector param_1,int param_2)
{
uint *puVar1;
int4 in_register_0000003c;
int local_c;
local_c = 0;
while( true ) {
if (param_2 <= local_c) {
return 0;
}
puVar1 = (uint *)std::vector<int,std::allocator<int>>::operator[]
... |
3,213 | func0 |
#include <iostream>
#include <assert.h>
#include <vector>
| bool func0(std::vector<int> arr, int n) {
for(int i = 0; i < n; i++) {
if ((arr[i] & 1) == 0) {
return true;
}
}
return false;
}
| int main() {
assert(func0({1, 2, 3}, 3) == true);
assert(func0({1, 2, 1, 4}, 4) == true);
assert(func0({1, 1}, 2) == false);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> >, int):
endbr64
test %esi,%esi
jle 1270 <_Z5func0St6vectorIiSaIiEEi+0x27>
mov (%rdi),%rax
lea -0x1(%rsi),%edx
lea 0x4(%rax,%rdx,4),%rdx
testb $0x1,(%rax)
je 1276 <_Z5func0St6vectorIiSaIiEEi+0x2d>
add $0x4,%rax
cmp %rdx,%rax
jne 125c <_Z5func0St6vec... | _Z5func0St6vectorIiSaIiEEi:
endbr64
test esi, esi
jle short loc_122F
mov rax, [rdi]
movsxd rsi, esi
lea rdx, [rax+rsi*4]
loc_121B:
test byte ptr [rax], 1
jz short loc_1235
add rax, 4
cmp rax, rdx
jnz short loc_121B
mov eax, 0
retn
loc_122F:
mov eax, 0
retn
loc_1235:
mov e... | long long func0(_BYTE **a1, int a2)
{
_BYTE *v2; // rax
if ( a2 <= 0 )
return 0LL;
v2 = *a1;
while ( (*v2 & 1) != 0 )
{
v2 += 4;
if ( v2 == &(*a1)[4 * a2] )
return 0LL;
}
return 1LL;
} | func0:
ENDBR64
TEST ESI,ESI
JLE 0x0010122f
MOV RAX,qword ptr [RDI]
MOVSXD RSI,ESI
LEA RDX,[RAX + RSI*0x4]
LAB_0010121b:
TEST byte ptr [RAX],0x1
JZ 0x00101235
ADD RAX,0x4
CMP RAX,RDX
JNZ 0x0010121b
MOV EAX,0x0
RET
LAB_0010122f:
MOV EAX,0x0
RET
LAB_00101235:
MOV EAX,0x1
RET | /* func0(std::vector<int, std::allocator<int> >, int) */
int8 func0(vector param_1,int param_2)
{
byte *pbVar1;
byte *pbVar2;
int4 in_register_0000003c;
if (param_2 < 1) {
return 0;
}
pbVar2 = *(byte **)CONCAT44(in_register_0000003c,param_1);
pbVar1 = pbVar2 + (long)param_2 * 4;
do {
if ((*... |
3,214 | func0 |
#include <iostream>
#include <assert.h>
#include <vector>
| bool func0(std::vector<int> arr, int n) {
for(int i = 0; i < n; i++) {
if ((arr[i] & 1) == 0) {
return true;
}
}
return false;
}
| int main() {
assert(func0({1, 2, 3}, 3) == true);
assert(func0({1, 2, 1, 4}, 4) == true);
assert(func0({1, 1}, 2) == false);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> >, int):
endbr64
test %esi,%esi
jle 1450 <_Z5func0St6vectorIiSaIiEEi+0x30>
mov (%rdi),%rax
lea -0x1(%rsi),%edx
lea 0x4(%rax,%rdx,4),%rdx
jmp 1441 <_Z5func0St6vectorIiSaIiEEi+0x21>
nopl (%rax)
add $0x4,%rax
cmp %rdx,%rax
je 1450 <_Z5func0St6vectorIi... | _Z5func0St6vectorIiSaIiEEi:
endbr64
test esi, esi
jle short loc_13C0
mov rax, [rdi]
movsxd rsi, esi
lea rdx, [rax+rsi*4]
jmp short loc_13B1
loc_13A8:
add rax, 4
cmp rax, rdx
jz short loc_13C0
loc_13B1:
test byte ptr [rax], 1
jnz short loc_13A8
mov eax, 1
retn
loc_13C0:
xor ... | long long func0(_BYTE **a1, int a2)
{
_BYTE *v2; // rax
if ( a2 <= 0 )
return 0LL;
v2 = *a1;
while ( (*v2 & 1) != 0 )
{
v2 += 4;
if ( v2 == &(*a1)[4 * a2] )
return 0LL;
}
return 1LL;
} | func0:
ENDBR64
TEST ESI,ESI
JLE 0x001013c0
MOV RAX,qword ptr [RDI]
MOVSXD RSI,ESI
LEA RDX,[RAX + RSI*0x4]
JMP 0x001013b1
LAB_001013a8:
ADD RAX,0x4
CMP RAX,RDX
JZ 0x001013c0
LAB_001013b1:
TEST byte ptr [RAX],0x1
JNZ 0x001013a8
MOV EAX,0x1
RET
LAB_001013c0:
XOR EAX,EAX
RET | /* func0(std::vector<int, std::allocator<int> >, int) */
int8 func0(vector param_1,int param_2)
{
byte *pbVar1;
byte *pbVar2;
int4 in_register_0000003c;
if (0 < param_2) {
pbVar2 = *(byte **)CONCAT44(in_register_0000003c,param_1);
pbVar1 = pbVar2 + (long)param_2 * 4;
do {
if ((*pbVar2 & 1... |
3,215 | func0 |
#include <iostream>
#include <assert.h>
#include <vector>
| bool func0(std::vector<int> arr, int n) {
for(int i = 0; i < n; i++) {
if ((arr[i] & 1) == 0) {
return true;
}
}
return false;
}
| int main() {
assert(func0({1, 2, 3}, 3) == true);
assert(func0({1, 2, 1, 4}, 4) == true);
assert(func0({1, 1}, 2) == false);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> >, int):
endbr64
test %esi,%esi
jle 1430 <_Z5func0St6vectorIiSaIiEEi+0x30>
mov (%rdi),%rax
lea -0x1(%rsi),%edx
lea 0x4(%rax,%rdx,4),%rdx
jmp 1421 <_Z5func0St6vectorIiSaIiEEi+0x21>
nopl (%rax)
add $0x4,%rax
cmp %rdx,%rax
je 1430 <_Z5func0St6vectorIi... | _Z5func0St6vectorIiSaIiEEi:
endbr64
test esi, esi
jle short loc_13C0
mov rax, [rdi]
movsxd rsi, esi
lea rdx, [rax+rsi*4]
jmp short loc_13B1
loc_13A8:
add rax, 4
cmp rax, rdx
jz short loc_13C0
loc_13B1:
test byte ptr [rax], 1
jnz short loc_13A8
mov eax, 1
retn
loc_13C0:
xor ... | long long func0(_BYTE **a1, int a2)
{
_BYTE *v2; // rax
if ( a2 <= 0 )
return 0LL;
v2 = *a1;
while ( (*v2 & 1) != 0 )
{
v2 += 4;
if ( v2 == &(*a1)[4 * a2] )
return 0LL;
}
return 1LL;
} | func0:
ENDBR64
TEST ESI,ESI
JLE 0x001013c0
MOV RAX,qword ptr [RDI]
MOVSXD RSI,ESI
LEA RDX,[RAX + RSI*0x4]
JMP 0x001013b1
LAB_001013a8:
ADD RAX,0x4
CMP RAX,RDX
JZ 0x001013c0
LAB_001013b1:
TEST byte ptr [RAX],0x1
JNZ 0x001013a8
MOV EAX,0x1
RET
LAB_001013c0:
XOR EAX,EAX
RET | /* func0(std::vector<int, std::allocator<int> >, int) */
int8 func0(vector param_1,int param_2)
{
byte *pbVar1;
byte *pbVar2;
int4 in_register_0000003c;
if (0 < param_2) {
pbVar2 = *(byte **)CONCAT44(in_register_0000003c,param_1);
pbVar1 = pbVar2 + (long)param_2 * 4;
do {
if ((*pbVar2 & 1... |
3,216 | func0 |
#include <vector>
#include <algorithm>
#include <assert.h>
#include <numeric>
| std::vector<int> func0(const std::vector<std::vector<int>>& lists) {
return *std::max_element(lists.begin(), lists.end(), [](const std::vector<int>& a, const std::vector<int>& b) {
return std::accumulate(a.begin(), a.end(), 0) < std::accumulate(b.begin(), b.end(), 0);
});
}
| int main() {
assert((func0({{1, 2, 3}, {4, 5, 6}, {10, 11, 12}, {7, 8, 9}}) == std::vector<int>{10, 11, 12}));
assert((func0({{3, 2, 1}, {6, 5, 4}, {12, 11, 10}}) == std::vector<int>{12, 11, 10}));
assert((func0({{2, 3, 1}}) == std::vector<int>{2, 3, 1}));
return 0;
}
| O0 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&)::{lambda(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&)#1}::operator()(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator... | _ZZ5func0RKSt6vectorIS_IiSaIiEESaIS1_EEENKUlRKS1_S7_E_clES7_S7_:
push rbp
mov rbp, rsp
push r12
push rbx
sub rsp, 20h
mov [rbp+var_18], rdi
mov [rbp+var_20], rsi
mov [rbp+var_28], rdx
mov rax, [rbp+var_20]
mov rdi, rax
call _ZNKSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void)... | bool func0(std::vector<std::vector<int>> const&)::{lambda(std::vector<int> const&,std::vector<int> const&)#1}::operator()(
long long a1,
long long a2,
long long a3)
{
long long v3; // rbx
long long v4; // rax
long long v5; // r12
long long v6; // rax
v3 = std::vector<int>::end(a2);
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x28],RDI
MOV qword ptr [RBP + -0x30],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RDI,RAX
CALL 0x00102250
MOV RBX,RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RDI,RAX
CALL 0x001... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&) */
vector * func0(vector *param_1)
{
__normal_iterator _Var1;
__normal_iterator _Var2;
int4 extraout_var;
vector *pvVar3;
_lambda_std__vector<int,std::allocator<int>_>_const__std... |
3,217 | func0 |
#include <vector>
#include <algorithm>
#include <assert.h>
#include <numeric>
| std::vector<int> func0(const std::vector<std::vector<int>>& lists) {
return *std::max_element(lists.begin(), lists.end(), [](const std::vector<int>& a, const std::vector<int>& b) {
return std::accumulate(a.begin(), a.end(), 0) < std::accumulate(b.begin(), b.end(), 0);
});
}
| int main() {
assert((func0({{1, 2, 3}, {4, 5, 6}, {10, 11, 12}, {7, 8, 9}}) == std::vector<int>{10, 11, 12}));
assert((func0({{3, 2, 1}, {6, 5, 4}, {12, 11, 10}}) == std::vector<int>{12, 11, 10}));
assert((func0({{2, 3, 1}}) == std::vector<int>{2, 3, 1}));
return 0;
}
| O1 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
mov %rdi,%rbp
mov 0x8(%rsi),%r8
mov (%rsi),%rbx
cmp %r8,%rbx
je 12fa <_Z5func0RKSt6vectorIS_IiSaIiEESaIS1_... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov rbp, rdi
mov r9, [rsi+8]
mov rbx, [rsi]
cmp rbx, r9
jz short loc_12FA
lea rdi, [rbx+18h]
cmp r9, rdi
jz short loc_12FD
mov r10d, 0
jmp loc_13BE
loc_12FA:
mov r... | _QWORD * func0(_QWORD *a1, long long *a2)
{
long long v3; // r9
long long v4; // rbx
long long v5; // rdi
unsigned long long v6; // r13
_DWORD *v7; // r12
_DWORD *v8; // rsi
signed long long v9; // rbx
_DWORD *v11; // rsi
_DWORD *v12; // rax
int v13; // edx
int v14; // ecx
_DWORD *v15; // rcx
... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RBP,RDI
MOV R9,qword ptr [RSI + 0x8]
MOV RBX,qword ptr [RSI]
CMP RBX,R9
JZ 0x001012fa
LEA RDI,[RBX + 0x18]
CMP R9,RDI
JZ 0x001012fd
MOV R10D,0x0
JMP 0x001013be
LAB_001012fa:
MOV RBX,R9
LAB_001012fd:
MOV R13,qword ptr [RBX + 0x8]
SUB R13,qword ptr [RBX]
... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&) */
vector * func0(vector *param_1)
{
long *plVar1;
long *plVar2;
int4 *__src;
long *plVar3;
int4 *__dest;
int *piVar4;
int *piVar5;
int iVar6;
int iVar7;
long *plVar8;
... |
3,218 | func0 |
#include <vector>
#include <algorithm>
#include <assert.h>
#include <numeric>
| std::vector<int> func0(const std::vector<std::vector<int>>& lists) {
return *std::max_element(lists.begin(), lists.end(), [](const std::vector<int>& a, const std::vector<int>& b) {
return std::accumulate(a.begin(), a.end(), 0) < std::accumulate(b.begin(), b.end(), 0);
});
}
| int main() {
assert((func0({{1, 2, 3}, {4, 5, 6}, {10, 11, 12}, {7, 8, 9}}) == std::vector<int>{10, 11, 12}));
assert((func0({{3, 2, 1}, {6, 5, 4}, {12, 11, 10}}) == std::vector<int>{12, 11, 10}));
assert((func0({{2, 3, 1}}) == std::vector<int>{2, 3, 1}));
return 0;
}
| O2 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&):
endbr64
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov (%rsi),%rbp
mov 0x8(%rsi),%r11
mov 0x0(%rbp),%rdi
mov 0x8(%rbp),%rax
cmp %rbp,%r11
je 195b <_Z5func0RKSt6vector... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE:
endbr64
push r12
push rbp
mov rbp, rdi
push rbx
mov r12, [rsi]
mov r11, [rsi+8]
mov r9, [r12]
mov rsi, [r12+8]
cmp r12, r11
jz short loc_1A1A
lea r8, [r12+18h]
cmp r11, r8
jz short loc_1A1A
nop word ptr [rax+rax+00h]
loc_19C0... | long long func0(long long a1, char ***a2)
{
char **v3; // r12
char **v4; // r11
char *v5; // r9
char *v6; // rsi
char **v7; // r8
char *v8; // rdi
char *v9; // r10
char *v10; // rax
int v11; // edx
char *v12; // rax
int v13; // ecx
unsigned long long v14; // rbx
_DWORD *v15; // rcx
char *v1... | func0:
ENDBR64
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
MOV R12,qword ptr [RSI]
MOV R11,qword ptr [RSI + 0x8]
MOV R9,qword ptr [R12]
MOV RSI,qword ptr [R12 + 0x8]
CMP R12,R11
JZ 0x00101a1a
LEA R8,[R12 + 0x18]
CMP R11,R8
JZ 0x00101a1a
NOP word ptr [RAX + RAX*0x1]
LAB_001019c0:
MOV RDI,qword ptr [R8 + 0x8]
MOV R10,qword pt... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&) */
vector * func0(vector *param_1)
{
vector *pvVar1;
int4 *__src;
int8 *puVar2;
vector *pvVar3;
int4 *__dest;
vector *extraout_RAX;
int iVar4;
int iVar5;
ulong uVar6;
s... |
3,219 | func0 |
#include <vector>
#include <algorithm>
#include <assert.h>
#include <numeric>
| std::vector<int> func0(const std::vector<std::vector<int>>& lists) {
return *std::max_element(lists.begin(), lists.end(), [](const std::vector<int>& a, const std::vector<int>& b) {
return std::accumulate(a.begin(), a.end(), 0) < std::accumulate(b.begin(), b.end(), 0);
});
}
| int main() {
assert((func0({{1, 2, 3}, {4, 5, 6}, {10, 11, 12}, {7, 8, 9}}) == std::vector<int>{10, 11, 12}));
assert((func0({{3, 2, 1}, {6, 5, 4}, {12, 11, 10}}) == std::vector<int>{12, 11, 10}));
assert((func0({{2, 3, 1}}) == std::vector<int>{2, 3, 1}));
return 0;
}
| O3 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov (%rsi),%rbp
mov 0x8(%rsi),%r10
mov 0x0(%rbp),%rcx
mov 0x8(%rbp),%rbx
cmp %rbp,%r10
je 1... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE:
endbr64
push r12
push rbp
push rbx
mov rbp, [rsi]
mov rbx, rdi
mov r11, [rsi+8]
mov rdi, [rbp+8]
mov rsi, [rbp+0]
cmp rbp, r11
jz loc_1BB2
lea r8, [rbp+18h]
cmp r11, r8
jz loc_1BB2
loc_1A60:
mov r10, [r8+8]
mov r9, [r8]
c... | long long func0(long long a1, const __m128i ***a2)
{
const __m128i **v2; // rbp
const __m128i **v4; // r11
const __m128i *v5; // rdi
const __m128i *v6; // rsi
const __m128i **v7; // r8
const __m128i *v8; // r10
const __m128i *v9; // r9
const __m128i *v10; // rax
unsigned long long v11; // rcx
__m12... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
MOV RBP,qword ptr [RSI]
MOV RBX,RDI
MOV R11,qword ptr [RSI + 0x8]
MOV RDI,qword ptr [RBP + 0x8]
MOV RSI,qword ptr [RBP]
CMP RBP,R11
JZ 0x00101bb2
LEA R8,[RBP + 0x18]
CMP R11,R8
JZ 0x00101bb2
LAB_00101a60:
MOV R10,qword ptr [R8 + 0x8]
MOV R9,qword ptr [R8]
CMP RDI,RSI
JZ 0x00101... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > > const&) */
vector * func0(vector *param_1)
{
int *piVar1;
int *piVar2;
int4 *__src;
vector *pvVar3;
int *piVar4;
int *piVar5;
int *piVar6;
int iVar7;
int8 *puVar8;
int *piVar9;... |
3,220 | func0 |
#include <string>
#include <cassert>
| int func0(std::string test_str) {
int cnt = 0;
int res = 0;
for (int idx = 0; idx < test_str.length(); ++idx) {
if (isupper(test_str[idx])) {
cnt += 1;
} else {
if (cnt > res) {
res = cnt;
}
cnt = 0;
}
}
... | int main() {
assert(func0("GeMKSForGERksISBESt") == 5);
assert(func0("PrECIOusMOVemENTSYT") == 6);
assert(func0("GooGLEFluTTER") == 4);
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x28,%rsp
mov %rdi,-0x28(%rbp)
movl $0x0,-0x1c(%rbp)
movl $0x0,-0x18(%rbp)
movl $0x0,-0x14(%rbp)
mov -0x14(%rbp),%eax
movslq %eax,%rbx
mov -0x28(%rbp),%rax
mov ... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 28h
mov [rbp+var_28], rdi
mov [rbp+var_1C], 0
mov [rbp+var_18], 0
mov [rbp+var_14], 0
jmp short loc_13DB
loc_1391:
mov eax, [rbp+var_14]
movsxd rdx, eax
mov rax, [rbp+... | long long func0(long long a1)
{
char *v1; // rax
long long v2; // rax
char *v3; // rax
signed int v5; // [rsp+14h] [rbp-1Ch]
signed int v6; // [rsp+18h] [rbp-18h]
int i; // [rsp+1Ch] [rbp-14h]
v5 = 0;
v6 = 0;
for ( i = 0; i < (unsigned long long)std::string::length(a1); ++i )
{
v1 = (char *)st... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x28],RDI
MOV dword ptr [RBP + -0x1c],0x0
MOV dword ptr [RBP + -0x18],0x0
MOV dword ptr [RBP + -0x14],0x0
JMP 0x001013db
LAB_00101391:
MOV EAX,dword ptr [RBP + -0x14]
MOVSXD RDX,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,RDX
MOV RDI,RAX
CA... | /* func0(std::string) */
int func0(ulong param_1)
{
int iVar1;
ulong uVar2;
char *pcVar3;
int4 local_24;
int4 local_20;
int4 local_1c;
local_24 = 0;
local_20 = 0;
local_1c = 0;
while( true ) {
uVar2 = std::string::length();
if (uVar2 <= (ulong)(long)local_1c) break;
pcVar3 = (char *... |
3,221 | func0 |
#include <string>
#include <cassert>
| int func0(std::string test_str) {
int cnt = 0;
int res = 0;
for (int idx = 0; idx < test_str.length(); ++idx) {
if (isupper(test_str[idx])) {
cnt += 1;
} else {
if (cnt > res) {
res = cnt;
}
cnt = 0;
}
}
... | int main() {
assert(func0("GeMKSForGERksISBESt") == 5);
assert(func0("PrECIOusMOVemENTSYT") == 6);
assert(func0("GooGLEFluTTER") == 4);
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
mov %rdi,%r14
mov 0x8(%rdi),%r15
test %r15,%r15
je 125e <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x55>... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov r14, rdi
mov r15, [rdi+8]
test r15, r15
jz short loc_127E
mov rbx, [rdi]
lea r13, [rbx+r15]
mov r12d, 0
mov ebp, 0
jmp shor... | long long func0(char **a1)
{
char *v1; // r15
char *v2; // rbx
char *v3; // r13
signed int v4; // r12d
signed int v5; // ebp
int v6; // eax
v1 = a1[1];
if ( v1 )
{
v2 = *a1;
v3 = &v1[(_QWORD)*a1];
v4 = 0;
v5 = 0;
do
{
if ( isupper(*v2) )
{
++v5;
}
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV R14,RDI
MOV R15,qword ptr [RDI + 0x8]
TEST R15,R15
JZ 0x0010127e
MOV RBX,qword ptr [RDI]
LEA R13,[RBX + R15*0x1]
MOV R12D,0x0
MOV EBP,0x0
JMP 0x0010126d
LAB_0010125b:
CMP R12D,EBP
CMOVL R12D,EBP
MOV EBP,EAX
LAB_00101264:
ADD RBX,0x1
CM... | /* func0(std::string) */
int func0(long *param_1)
{
char *pcVar1;
long lVar2;
int iVar3;
char *pcVar4;
int iVar5;
int iVar6;
lVar2 = param_1[1];
if (lVar2 == 0) {
iVar6 = 0;
iVar5 = 0;
}
else {
pcVar4 = (char *)*param_1;
pcVar1 = pcVar4 + lVar2;
iVar6 = 0;
iVar5 = 0;
... |
3,222 | func0 |
#include <string>
#include <cassert>
| int func0(std::string test_str) {
int cnt = 0;
int res = 0;
for (int idx = 0; idx < test_str.length(); ++idx) {
if (isupper(test_str[idx])) {
cnt += 1;
} else {
if (cnt > res) {
res = cnt;
}
cnt = 0;
}
}
... | int main() {
assert(func0("GeMKSForGERksISBESt") == 5);
assert(func0("PrECIOusMOVemENTSYT") == 6);
assert(func0("GooGLEFluTTER") == 4);
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
mov 0x8(%rdi),%r14
mov (%rdi),%r15
test %r14,%r14
je 13f8 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x8... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov r14, [rdi+8]
mov r15, [rdi]
test r14, r14
jz short loc_13E0
mov rbx, r15
lea r13, [r15+r14]
xor r12d, r12d
xor ebp, ebp
jmp ... | long long func0(char **a1)
{
char *v1; // r14
char *v2; // r15
char *v3; // rbx
char *v4; // r13
signed int v5; // r12d
signed int v6; // ebp
long long v7; // r14
int v8; // eax
v1 = a1[1];
v2 = *a1;
if ( v1 )
{
v3 = *a1;
v4 = &v1[(_QWORD)v2];
v5 = 0;
v6 = 0;
do
{
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV R14,qword ptr [RDI + 0x8]
MOV R15,qword ptr [RDI]
TEST R14,R14
JZ 0x001013e0
MOV RBX,R15
LEA R13,[R15 + R14*0x1]
XOR R12D,R12D
XOR EBP,EBP
JMP 0x0010138c
LAB_00101380:
ADD RBX,0x1
ADD EBP,0x1
CMP R13,RBX
JZ 0x001013aa
LAB_0010138c:
MOV... | /* func0(std::string) */
int func0(int8 *param_1)
{
char *pcVar1;
int iVar2;
char *pcVar3;
int iVar4;
int iVar5;
long lVar6;
lVar6 = param_1[1];
pcVar1 = (char *)*param_1;
if (lVar6 == 0) {
lVar6 = -1;
iVar5 = 0;
iVar4 = 0;
}
else {
iVar5 = 0;
iVar4 = 0;
pcVar3 = pcVar... |
3,223 | func0 |
#include <string>
#include <cassert>
| int func0(std::string test_str) {
int cnt = 0;
int res = 0;
for (int idx = 0; idx < test_str.length(); ++idx) {
if (isupper(test_str[idx])) {
cnt += 1;
} else {
if (cnt > res) {
res = cnt;
}
cnt = 0;
}
}
... | int main() {
assert(func0("GeMKSForGERksISBESt") == 5);
assert(func0("PrECIOusMOVemENTSYT") == 6);
assert(func0("GooGLEFluTTER") == 4);
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
mov 0x8(%rdi),%r14
mov (%rdi),%r15
test %r14,%r14
je 13f8 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x8... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov r14, [rdi+8]
mov r15, [rdi]
test r14, r14
jz short loc_13E0
mov rbx, r15
lea r13, [r15+r14]
xor r12d, r12d
xor ebp, ebp
jmp ... | long long func0(char **a1)
{
char *v1; // r14
char *v2; // r15
char *v3; // rbx
char *v4; // r13
signed int v5; // r12d
signed int v6; // ebp
long long v7; // r14
int v8; // eax
v1 = a1[1];
v2 = *a1;
if ( v1 )
{
v3 = *a1;
v4 = &v1[(_QWORD)v2];
v5 = 0;
v6 = 0;
do
{
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV R14,qword ptr [RDI + 0x8]
MOV R15,qword ptr [RDI]
TEST R14,R14
JZ 0x001013e0
MOV RBX,R15
LEA R13,[R15 + R14*0x1]
XOR R12D,R12D
XOR EBP,EBP
JMP 0x0010138c
LAB_00101380:
ADD RBX,0x1
ADD EBP,0x1
CMP R13,RBX
JZ 0x001013aa
LAB_0010138c:
MOV... | /* func0(std::string) */
int func0(int8 *param_1)
{
char *pcVar1;
int iVar2;
char *pcVar3;
int iVar4;
int iVar5;
long lVar6;
lVar6 = param_1[1];
pcVar1 = (char *)*param_1;
if (lVar6 == 0) {
lVar6 = -1;
iVar5 = 0;
iVar4 = 0;
}
else {
iVar5 = 0;
iVar4 = 0;
pcVar3 = pcVar... |
3,224 | func0 |
#include <vector>
#include <cassert>
| int func0(std::vector<int> nums) {
for (int el : nums) {
if (el % 2 != 0) {
return el;
}
}
return -1;
}
| int main() {
assert(func0({1, 3, 5}) == 1);
assert(func0({2, 4, 1, 3}) == 1);
assert(func0({8, 9, 1}) == 9);
return 0;
}
| O0 | cpp | func0(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
mov -0x38(%rbp),%rax
mov %rax,-0x10(%rbp)
mov -0x10(%rbp),%rax
mov %rax,%rdi
callq 1562 <_ZNSt6vectorIiSaIiEE5beginEv>
m... | _Z5func0St6vectorIiSaIiEE:
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 rax, [rbp+var_38]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rdi, rax
call _ZNSt6vectorIiSaIiEE5beginEv; std::vector<int>::... | long long func0(long long a1)
{
unsigned int v2; // [rsp+1Ch] [rbp-24h]
long long v3; // [rsp+20h] [rbp-20h] BYREF
_QWORD v4[3]; // [rsp+28h] [rbp-18h] BYREF
v4[2] = __readfsqword(0x28u);
v4[1] = a1;
v3 = std::vector<int>::begin(a1);
v4[0] = std::vector<int>::end(a1);
while ( (unsigned __int8)__gnu_cx... | 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 RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,RAX
CALL 0x001015e6
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qwor... | /* func0(std::vector<int, std::allocator<int> >) */
uint func0(vector param_1)
{
bool bVar1;
uint uVar2;
uint *puVar3;
int4 in_register_0000003c;
long in_FS_OFFSET;
int8 local_28;
int8 local_20;
vector<int,std::allocator<int>> *local_18;
long local_10;
local_18 = (vector<int,std::allocator<int>... |
3,225 | func0 |
#include <vector>
#include <cassert>
| int func0(std::vector<int> nums) {
for (int el : nums) {
if (el % 2 != 0) {
return el;
}
}
return -1;
}
| int main() {
assert(func0({1, 3, 5}) == 1);
assert(func0({2, 4, 1, 3}) == 1);
assert(func0({8, 9, 1}) == 9);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
mov (%rdi),%rax
mov 0x8(%rdi),%rcx
cmp %rcx,%rax
je 1231 <_Z5func0St6vectorIiSaIiEE+0x28>
mov (%rax),%edx
test $0x1,%dl
jne 122e <_Z5func0St6vectorIiSaIiEE+0x25>
add $0x4,%rax
cmp %rax,%rcx
jne 1219 <_Z5func0St6vectorIiSaIiEE+0x10>
mov... | _Z5func0St6vectorIiSaIiEE:
endbr64
mov rax, [rdi]
mov rcx, [rdi+8]
cmp rcx, rax
jz short loc_1231
loc_1219:
mov edx, [rax]
test dl, 1
jnz short loc_122E
add rax, 4
cmp rcx, rax
jnz short loc_1219
mov edx, 0FFFFFFFFh
loc_122E:
mov eax, edx
retn
loc_1231:
mov edx, 0FFFF... | long long func0(unsigned int **a1)
{
unsigned int *v1; // rax
unsigned int *v2; // rcx
unsigned int v3; // edx
v1 = *a1;
v2 = a1[1];
if ( v2 == *a1 )
{
return (unsigned int)-1;
}
else
{
while ( 1 )
{
v3 = *v1;
if ( (*v1 & 1) != 0 )
break;
if ( v2 == ++v1 )
... | func0:
ENDBR64
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x8]
CMP RCX,RAX
JZ 0x00101231
LAB_00101219:
MOV EDX,dword ptr [RAX]
TEST DL,0x1
JNZ 0x0010122e
ADD RAX,0x4
CMP RCX,RAX
JNZ 0x00101219
MOV EDX,0xffffffff
LAB_0010122e:
MOV EAX,EDX
RET
LAB_00101231:
MOV EDX,0xffffffff
JMP 0x0010122e | /* func0(std::vector<int, std::allocator<int> >) */
uint func0(vector param_1)
{
uint *puVar1;
int4 in_register_0000003c;
puVar1 = *(uint **)CONCAT44(in_register_0000003c,param_1);
while( true ) {
if (*(uint **)(CONCAT44(in_register_0000003c,param_1) + 8) == puVar1) {
return 0xffffffff;
}
... |
3,226 | func0 |
#include <vector>
#include <cassert>
| int func0(std::vector<int> nums) {
for (int el : nums) {
if (el % 2 != 0) {
return el;
}
}
return -1;
}
| int main() {
assert(func0({1, 3, 5}) == 1);
assert(func0({2, 4, 1, 3}) == 1);
assert(func0({8, 9, 1}) == 9);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
mov (%rdi),%rax
mov 0x8(%rdi),%rdx
cmp %rdx,%rax
jne 1421 <_Z5func0St6vectorIiSaIiEE+0x21>
jmp 1430 <_Z5func0St6vectorIiSaIiEE+0x30>
nopw 0x0(%rax,%rax,1)
add $0x4,%rax
cmp %rax,%rdx
je 1430 <_Z5func0St6vectorIiSaIiEE+0x30>
mov (%rax),... | _Z5func0St6vectorIiSaIiEE:
endbr64
mov rax, [rdi]
mov rcx, [rdi+8]
cmp rcx, rax
jnz short loc_1401
jmp short loc_1410
loc_13F8:
add rax, 4
cmp rcx, rax
jz short loc_1410
loc_1401:
mov edx, [rax]
test dl, 1
jz short loc_13F8
mov eax, edx
retn
loc_1410:
mov edx, 0FFFFF... | long long func0(unsigned int **a1)
{
unsigned int *v1; // rax
unsigned int *v2; // rcx
v1 = *a1;
v2 = a1[1];
if ( v2 == *a1 )
return 0xFFFFFFFFLL;
while ( (*v1 & 1) == 0 )
{
if ( v2 == ++v1 )
return 0xFFFFFFFFLL;
}
return *v1;
} | func0:
ENDBR64
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x8]
CMP RCX,RAX
JNZ 0x00101401
JMP 0x00101410
LAB_001013f8:
ADD RAX,0x4
CMP RCX,RAX
JZ 0x00101410
LAB_00101401:
MOV EDX,dword ptr [RAX]
TEST DL,0x1
JZ 0x001013f8
MOV EAX,EDX
RET
LAB_00101410:
MOV EDX,0xffffffff
MOV EAX,EDX
RET | /* func0(std::vector<int, std::allocator<int> >) */
uint func0(vector param_1)
{
uint *puVar1;
int4 in_register_0000003c;
puVar1 = *(uint **)CONCAT44(in_register_0000003c,param_1);
while( true ) {
if (*(uint **)(CONCAT44(in_register_0000003c,param_1) + 8) == puVar1) {
return 0xffffffff;
}
... |
3,227 | func0 |
#include <vector>
#include <cassert>
| int func0(std::vector<int> nums) {
for (int el : nums) {
if (el % 2 != 0) {
return el;
}
}
return -1;
}
| int main() {
assert(func0({1, 3, 5}) == 1);
assert(func0({2, 4, 1, 3}) == 1);
assert(func0({8, 9, 1}) == 9);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
mov (%rdi),%rax
mov 0x8(%rdi),%rdx
cmp %rdx,%rax
jne 1411 <_Z5func0St6vectorIiSaIiEE+0x21>
jmp 1420 <_Z5func0St6vectorIiSaIiEE+0x30>
nopw 0x0(%rax,%rax,1)
add $0x4,%rax
cmp %rax,%rdx
je 1420 <_Z5func0St6vectorIiSaIiEE+0x30>
mov (%rax),... | _Z5func0St6vectorIiSaIiEE:
endbr64
mov rax, [rdi]
mov rcx, [rdi+8]
cmp rcx, rax
jnz short loc_1401
jmp short loc_1410
loc_13F8:
add rax, 4
cmp rcx, rax
jz short loc_1410
loc_1401:
mov edx, [rax]
test dl, 1
jz short loc_13F8
mov eax, edx
retn
loc_1410:
mov edx, 0FFFFF... | long long func0(unsigned int **a1)
{
unsigned int *v1; // rax
unsigned int *v2; // rcx
v1 = *a1;
v2 = a1[1];
if ( v2 == *a1 )
return 0xFFFFFFFFLL;
while ( (*v1 & 1) == 0 )
{
if ( v2 == ++v1 )
return 0xFFFFFFFFLL;
}
return *v1;
} | func0:
ENDBR64
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x8]
CMP RCX,RAX
JNZ 0x00101401
JMP 0x00101410
LAB_001013f8:
ADD RAX,0x4
CMP RCX,RAX
JZ 0x00101410
LAB_00101401:
MOV EDX,dword ptr [RAX]
TEST DL,0x1
JZ 0x001013f8
MOV EAX,EDX
RET
LAB_00101410:
MOV EDX,0xffffffff
MOV EAX,EDX
RET | /* func0(std::vector<int, std::allocator<int> >) */
uint func0(vector param_1)
{
uint *puVar1;
int4 in_register_0000003c;
puVar1 = *(uint **)CONCAT44(in_register_0000003c,param_1);
while( true ) {
if (*(uint **)(CONCAT44(in_register_0000003c,param_1) + 8) == puVar1) {
return 0xffffffff;
}
... |
3,228 | func0 |
#include <iostream>
#include <tuple>
#include <cassert>
| bool func0(const std::tuple<int, int, int, int, int, int>& test_tup, int K) {
bool res = false;
auto [x1, x2, x3, x4, x5, x6] = test_tup;
int arr[] = {x1, x2, x3, x4, x5, x6};
for(int ele : arr) {
if(ele == K) {
res = true;
break;
}
}
return re... | int main() {
assert(func0(std::make_tuple(10, 4, 5, 6, 8, 0), 6) == true);
assert(func0(std::make_tuple(1, 2, 3, 4, 5, 6), 7) == false);
assert(func0(std::make_tuple(7, 8, 9, 44, 11, 12), 11) == true);
return 0;
}
| O0 | cpp | func0(std::tuple<int, int, int, int, int, int> const&, int):
endbr64
push %rbp
mov %rsp,%rbp
sub $0xa0,%rsp
mov %rdi,-0x98(%rbp)
mov %esi,-0x9c(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
movb $0x0,-0x8d(%rbp)
mov -0x98(%rbp),%rcx
mov (%rcx),%rax
mov 0x8(%rcx),%rdx
mov ... | _Z5func0RKSt5tupleIJiiiiiiEEi:
endbr64
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov [rbp+var_98], rdi
mov [rbp+var_9C], esi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov [rbp+var_8D], 0
mov rcx, [rbp+var_98]
mov rax, [rcx]
mov rdx, [rcx+8]
mov [rbp+var_40], rax
mov ... | long long func0(_QWORD *a1, int a2)
{
long long v2; // rdx
unsigned __int8 v4; // [rsp+13h] [rbp-8Dh]
unsigned long long *i; // [rsp+18h] [rbp-88h]
_DWORD *v6; // [rsp+20h] [rbp-80h]
_DWORD *v7; // [rsp+28h] [rbp-78h]
_DWORD *v8; // [rsp+30h] [rbp-70h]
_DWORD *v9; // [rsp+38h] [rbp-68h]
_DWORD *v10; //... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV qword ptr [RBP + -0x98],RDI
MOV dword ptr [RBP + -0x9c],ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOV byte ptr [RBP + -0x8d],0x0
MOV RCX,qword ptr [RBP + -0x98]
MOV RAX,qword ptr [RCX]
MOV RDX,qword ptr [RCX + 0x8]
MOV qword ptr [RBP ... | /* func0(std::tuple<int, int, int, int, int, int> const&, int) */
int func0(tuple *param_1,int param_2)
{
type *ptVar1;
type *ptVar2;
type *ptVar3;
type *ptVar4;
type *ptVar5;
type *ptVar6;
long in_FS_OFFSET;
int local_95;
long *local_90;
int8 local_48;
int8 local_40;
int8 local_38;
int4 loc... |
3,229 | func0 |
#include <iostream>
#include <tuple>
#include <cassert>
| bool func0(const std::tuple<int, int, int, int, int, int>& test_tup, int K) {
bool res = false;
auto [x1, x2, x3, x4, x5, x6] = test_tup;
int arr[] = {x1, x2, x3, x4, x5, x6};
for(int ele : arr) {
if(ele == K) {
res = true;
break;
}
}
return re... | int main() {
assert(func0(std::make_tuple(10, 4, 5, 6, 8, 0), 6) == true);
assert(func0(std::make_tuple(1, 2, 3, 4, 5, 6), 7) == false);
assert(func0(std::make_tuple(7, 8, 9, 44, 11, 12), 11) == true);
return 0;
}
| O1 | cpp | func0(std::tuple<int, int, int, int, int, int> const&, int):
endbr64
sub $0x28,%rsp
mov %fs:0x28,%rax
mov %rax,0x18(%rsp)
xor %eax,%eax
mov (%rdi),%eax
mov 0x4(%rdi),%edx
mov 0x8(%rdi),%ecx
mov 0xc(%rdi),%r8d
mov 0x10(%rdi),%r9d
mov 0x14(%rdi),%edi
mov %edi,(%rsp)
mov %r9d,0x4(%rsp)
... | _Z5func0RKSt5tupleIJiiiiiiEEi:
endbr64
sub rsp, 28h
mov rax, fs:28h
mov [rsp+28h+var_10], rax
xor eax, eax
mov eax, [rdi]
mov edx, [rdi+4]
mov ecx, [rdi+8]
mov r8d, [rdi+0Ch]
mov r9d, [rdi+10h]
mov edi, [rdi+14h]
mov [rsp+28h+var_28], edi
mov [rsp+28h+var_24], r9d
mov ... | long long func0(int *a1, int a2)
{
int v2; // eax
int v3; // edx
int v4; // ecx
int v5; // r8d
int v6; // r9d
unsigned long long *v7; // rax
_DWORD v9[6]; // [rsp+0h] [rbp-28h] BYREF
unsigned long long v10; // [rsp+18h] [rbp-10h] BYREF
v10 = __readfsqword(0x28u);
v2 = *a1;
v3 = a1[1];
v4 = a1[... | func0:
ENDBR64
SUB RSP,0x28
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x18],RAX
XOR EAX,EAX
MOV EAX,dword ptr [RDI]
MOV EDX,dword ptr [RDI + 0x4]
MOV ECX,dword ptr [RDI + 0x8]
MOV R8D,dword ptr [RDI + 0xc]
MOV R9D,dword ptr [RDI + 0x10]
MOV EDI,dword ptr [RDI + 0x14]
MOV dword ptr [RSP],EDI
MOV dword ptr [RSP + ... | /* func0(std::tuple<int, int, int, int, int, int> const&, int) */
int8 func0(tuple *param_1,int param_2)
{
long *plVar1;
int8 uVar2;
long in_FS_OFFSET;
int8 local_28;
int4 local_20;
int4 local_1c;
int4 local_18;
int4 local_14;
long local_10 [2];
plVar1 = &local_28;
local_10[0] = *(long *)(in_... |
3,230 | func0 |
#include <iostream>
#include <tuple>
#include <cassert>
| bool func0(const std::tuple<int, int, int, int, int, int>& test_tup, int K) {
bool res = false;
auto [x1, x2, x3, x4, x5, x6] = test_tup;
int arr[] = {x1, x2, x3, x4, x5, x6};
for(int ele : arr) {
if(ele == K) {
res = true;
break;
}
}
return re... | int main() {
assert(func0(std::make_tuple(10, 4, 5, 6, 8, 0), 6) == true);
assert(func0(std::make_tuple(1, 2, 3, 4, 5, 6), 7) == false);
assert(func0(std::make_tuple(7, 8, 9, 44, 11, 12), 11) == true);
return 0;
}
| O2 | cpp | func0(std::tuple<int, int, int, int, int, int> const&, int):
endbr64
sub $0x28,%rsp
mov 0x4(%rdi),%ecx
mov 0x8(%rdi),%r8d
mov %fs:0x28,%rax
mov %rax,0x18(%rsp)
xor %eax,%eax
mov 0xc(%rdi),%r9d
mov (%rdi),%eax
mov 0x10(%rdi),%r10d
mov 0x14(%rdi),%edx
mov %ecx,0x10(%rsp)
lea 0x18(%rsp)... | _Z5func0RKSt5tupleIJiiiiiiEEi:
endbr64
sub rsp, 28h
movd xmm2, dword ptr [rdi+0Ch]
movd xmm3, dword ptr [rdi+8]
movd xmm0, dword ptr [rdi+14h]
movd xmm4, dword ptr [rdi+10h]
lea rdx, [rsp+28h+var_10]
mov rax, fs:28h
mov [rsp+28h+var_10], rax
xor eax, eax
movq xmm1, qword ptr [rdi]
pun... | long long func0(const __m128i *a1, int a2)
{
__m128i v2; // xmm2
__m128i v3; // xmm3
__m128i v4; // xmm0
__m128i v5; // xmm4
__m128i *v6; // rax
unsigned long long v7; // xmm1_8
__m128i v9; // [rsp+0h] [rbp-28h] BYREF
unsigned long long v10; // [rsp+10h] [rbp-18h]
unsigned long long v11; // [rsp+18h]... | func0:
ENDBR64
SUB RSP,0x28
MOVD XMM2,dword ptr [RDI + 0xc]
MOVD XMM3,dword ptr [RDI + 0x8]
MOVD XMM0,dword ptr [RDI + 0x14]
MOVD XMM4,dword ptr [RDI + 0x10]
LEA RDX,[RSP + 0x18]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x18],RAX
XOR EAX,EAX
MOVQ XMM1,qword ptr [RDI]
PUNPCKLDQ XMM2,XMM3
MOV RAX,RSP
PUNPCKLDQ XM... | /* func0(std::tuple<int, int, int, int, int, int> const&, int) */
int8 func0(tuple *param_1,int param_2)
{
long *plVar1;
int8 uVar2;
long in_FS_OFFSET;
long local_28;
int8 uStack_20;
int8 local_18;
long local_10 [2];
plVar1 = &local_28;
local_10[0] = *(long *)(in_FS_OFFSET + 0x28);
local_28 = C... |
3,231 | func0 |
#include <iostream>
#include <tuple>
#include <cassert>
| bool func0(const std::tuple<int, int, int, int, int, int>& test_tup, int K) {
bool res = false;
auto [x1, x2, x3, x4, x5, x6] = test_tup;
int arr[] = {x1, x2, x3, x4, x5, x6};
for(int ele : arr) {
if(ele == K) {
res = true;
break;
}
}
return re... | int main() {
assert(func0(std::make_tuple(10, 4, 5, 6, 8, 0), 6) == true);
assert(func0(std::make_tuple(1, 2, 3, 4, 5, 6), 7) == false);
assert(func0(std::make_tuple(7, 8, 9, 44, 11, 12), 11) == true);
return 0;
}
| O3 | cpp | func0(std::tuple<int, int, int, int, int, int> const&, int):
endbr64
mov (%rdi),%r9d
mov 0x4(%rdi),%r8d
mov 0x8(%rdi),%ecx
mov 0xc(%rdi),%edx
mov 0x10(%rdi),%eax
cmp 0x14(%rdi),%esi
je 12d8 <_Z5func0RKSt5tupleIJiiiiiiEEi+0x38>
cmp %esi,%eax
je 12d8 <_Z5func0RKSt5tupleIJiiiiiiEEi+0x38>
cmp ... | _Z5func0RKSt5tupleIJiiiiiiEEi:
endbr64
mov r9d, [rdi]
mov r8d, [rdi+4]
mov ecx, [rdi+8]
mov edx, [rdi+0Ch]
mov eax, [rdi+10h]
cmp esi, [rdi+14h]
jz short loc_1178
cmp eax, esi
jz short loc_1178
cmp edx, esi
jz short loc_1178
cmp esi, ecx
jz short loc_1178
cmp ... | bool func0(_DWORD *a1, int a2)
{
return a2 == a1[5] || a1[4] == a2 || a1[3] == a2 || a2 == a1[2] || a1[1] == a2 || *a1 == a2;
} | func0:
ENDBR64
MOV R9D,dword ptr [RDI]
MOV R8D,dword ptr [RDI + 0x4]
MOV ECX,dword ptr [RDI + 0x8]
MOV EDX,dword ptr [RDI + 0xc]
MOV EAX,dword ptr [RDI + 0x10]
CMP ESI,dword ptr [RDI + 0x14]
JZ 0x00101178
CMP EAX,ESI
JZ 0x00101178
CMP EDX,ESI
JZ 0x00101178
CMP ESI,ECX
JZ 0x00101178
CMP R8D,ESI
JZ 0x00101178
CMP R9D,ESI... | /* func0(std::tuple<int, int, int, int, int, int> const&, int) */
int4 func0(tuple *param_1,int param_2)
{
if ((((param_2 != *(int *)(param_1 + 0x14)) && (*(int *)(param_1 + 0x10) != param_2)) &&
(*(int *)(param_1 + 0xc) != param_2)) &&
((param_2 != *(int *)(param_1 + 8) && (*(int *)(param_1 + 4) != para... |
3,232 | func0 |
#include <cassert>
#include <tuple>
#include <algorithm>
| bool func0(const std::tuple<int, int, int>& test_tup1, const std::tuple<int, int, int>& test_tup2) {
return std::get<0>(test_tup1) > std::get<0>(test_tup2)
&& std::get<1>(test_tup1) > std::get<1>(test_tup2)
&& std::get<2>(test_tup1) > std::get<2>(test_tup2);
}
| int main() {
assert(func0(std::make_tuple(1, 2, 3), std::make_tuple(2, 3, 4)) == false);
assert(func0(std::make_tuple(4, 5, 6), std::make_tuple(3, 4, 5)) == true);
assert(func0(std::make_tuple(11, 12, 13), std::make_tuple(10, 11, 12)) == true);
return 0;
}
| O0 | cpp | func0(std::tuple<int, int, int> const&, std::tuple<int, int, int> const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x18,%rsp
mov %rdi,-0x18(%rbp)
mov %rsi,-0x20(%rbp)
mov -0x18(%rbp),%rax
mov %rax,%rdi
callq 1428 <_ZSt3getILm0EJiiiEERKNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERKS4_>
m... | _Z5func0RKSt5tupleIJiiiEES2_:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 18h
mov [rbp+var_18], rdi
mov [rbp+var_20], rsi
mov rax, [rbp+var_18]
mov rdi, rax
call _ZSt3getILm0EJiiiEERKNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERKS4_; std::get<0ul,int,int,int>(std::tuple<int,int,i... | _BOOL8 func0(long long a1, long long a2)
{
int v2; // ebx
int v3; // ebx
int v4; // ebx
_BOOL8 result; // rax
v2 = *(_DWORD *)std::get<0ul,int,int,int>(a1);
result = 0;
if ( v2 > *(_DWORD *)std::get<0ul,int,int,int>(a2) )
{
v3 = *(_DWORD *)std::get<1ul,int,int,int>(a1);
if ( v3 > *(_DWORD *)st... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RBP + -0x18],RDI
MOV qword ptr [RBP + -0x20],RSI
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,RAX
CALL 0x001013fc
MOV EBX,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x20]
MOV RDI,RAX
CALL 0x001013fc
MOV EAX,dword ptr [RAX]
CMP EBX,EAX
JLE 0x001011e5
MOV... | /* func0(std::tuple<int, int, int> const&, std::tuple<int, int, int> const&) */
int8 func0(tuple *param_1,tuple *param_2)
{
int iVar1;
type *ptVar2;
type *ptVar3;
type *ptVar4;
ptVar2 = std::get<0ul,int,int,int>(param_1);
iVar1 = *(int *)ptVar2;
ptVar2 = std::get<0ul,int,int,int>(param_2);
if (*(in... |
3,233 | func0 |
#include <cassert>
#include <tuple>
#include <algorithm>
| bool func0(const std::tuple<int, int, int>& test_tup1, const std::tuple<int, int, int>& test_tup2) {
return std::get<0>(test_tup1) > std::get<0>(test_tup2)
&& std::get<1>(test_tup1) > std::get<1>(test_tup2)
&& std::get<2>(test_tup1) > std::get<2>(test_tup2);
}
| int main() {
assert(func0(std::make_tuple(1, 2, 3), std::make_tuple(2, 3, 4)) == false);
assert(func0(std::make_tuple(4, 5, 6), std::make_tuple(3, 4, 5)) == true);
assert(func0(std::make_tuple(11, 12, 13), std::make_tuple(10, 11, 12)) == true);
return 0;
}
| O1 | cpp | func0(std::tuple<int, int, int> const&, std::tuple<int, int, int> const&):
endbr64
mov $0x0,%eax
mov 0x8(%rsi),%edx
cmp %edx,0x8(%rdi)
jle 1189 <_Z5func0RKSt5tupleIJiiiEES2_+0x20>
mov 0x4(%rsi),%ecx
cmp %ecx,0x4(%rdi)
jle 1189 <_Z5func0RKSt5tupleIJiiiEES2_+0x20>
mov (%rsi),%eax
cmp %eax,(%rdi... | _Z5func0RKSt5tupleIJiiiEES2_:
endbr64
mov eax, 0
mov edx, [rsi+8]
cmp [rdi+8], edx
jle short locret_1189
mov ecx, [rsi+4]
cmp [rdi+4], ecx
jle short locret_1189
mov eax, [rsi]
cmp [rdi], eax
setnle al
locret_1189:
retn | bool func0(_DWORD *a1, _DWORD *a2)
{
bool result; // al
result = 0;
if ( a1[2] > a2[2] && a1[1] > a2[1] )
return *a1 > *a2;
return result;
} | func0:
ENDBR64
MOV EAX,0x0
MOV EDX,dword ptr [RSI + 0x8]
CMP dword ptr [RDI + 0x8],EDX
JLE 0x00101189
MOV ECX,dword ptr [RSI + 0x4]
CMP dword ptr [RDI + 0x4],ECX
JLE 0x00101189
MOV EAX,dword ptr [RSI]
CMP dword ptr [RDI],EAX
SETG AL
LAB_00101189:
RET | /* func0(std::tuple<int, int, int> const&, std::tuple<int, int, int> const&) */
int4 func0(tuple *param_1,tuple *param_2)
{
int4 uVar1;
uVar1 = 0;
if ((*(int *)(param_2 + 8) < *(int *)(param_1 + 8)) &&
(*(int *)(param_2 + 4) < *(int *)(param_1 + 4))) {
uVar1 = CONCAT31((int3)((uint)*(int *)param_2 >... |
3,234 | func0 |
#include <cassert>
#include <tuple>
#include <algorithm>
| bool func0(const std::tuple<int, int, int>& test_tup1, const std::tuple<int, int, int>& test_tup2) {
return std::get<0>(test_tup1) > std::get<0>(test_tup2)
&& std::get<1>(test_tup1) > std::get<1>(test_tup2)
&& std::get<2>(test_tup1) > std::get<2>(test_tup2);
}
| int main() {
assert(func0(std::make_tuple(1, 2, 3), std::make_tuple(2, 3, 4)) == false);
assert(func0(std::make_tuple(4, 5, 6), std::make_tuple(3, 4, 5)) == true);
assert(func0(std::make_tuple(11, 12, 13), std::make_tuple(10, 11, 12)) == true);
return 0;
}
| O2 | cpp | func0(std::tuple<int, int, int> const&, std::tuple<int, int, int> const&):
endbr64
mov 0x8(%rsi),%edx
xor %eax,%eax
cmp %edx,0x8(%rdi)
jle 115d <_Z5func0RKSt5tupleIJiiiEES2_+0x1d>
mov 0x4(%rsi),%ecx
cmp %ecx,0x4(%rdi)
jle 115d <_Z5func0RKSt5tupleIJiiiEES2_+0x1d>
mov (%rsi),%eax
cmp %eax,(%rdi... | _Z5func0RKSt5tupleIJiiiEES2_:
endbr64
mov edx, [rsi+8]
xor eax, eax
cmp [rdi+8], edx
jle short locret_115D
mov ecx, [rsi+4]
cmp [rdi+4], ecx
jle short locret_115D
mov eax, [rsi]
cmp [rdi], eax
setnle al
locret_115D:
retn | bool func0(_DWORD *a1, _DWORD *a2)
{
bool result; // al
result = 0;
if ( a1[2] > a2[2] && a1[1] > a2[1] )
return *a1 > *a2;
return result;
} | func0:
ENDBR64
MOV EDX,dword ptr [RSI + 0x8]
XOR EAX,EAX
CMP dword ptr [RDI + 0x8],EDX
JLE 0x0010115d
MOV ECX,dword ptr [RSI + 0x4]
CMP dword ptr [RDI + 0x4],ECX
JLE 0x0010115d
MOV EAX,dword ptr [RSI]
CMP dword ptr [RDI],EAX
SETG AL
LAB_0010115d:
RET | /* func0(std::tuple<int, int, int> const&, std::tuple<int, int, int> const&) */
int4 func0(tuple *param_1,tuple *param_2)
{
int4 uVar1;
uVar1 = 0;
if ((*(int *)(param_2 + 8) < *(int *)(param_1 + 8)) &&
(*(int *)(param_2 + 4) < *(int *)(param_1 + 4))) {
uVar1 = CONCAT31((int3)((uint)*(int *)param_2 >... |
3,235 | func0 |
#include <cassert>
#include <tuple>
#include <algorithm>
| bool func0(const std::tuple<int, int, int>& test_tup1, const std::tuple<int, int, int>& test_tup2) {
return std::get<0>(test_tup1) > std::get<0>(test_tup2)
&& std::get<1>(test_tup1) > std::get<1>(test_tup2)
&& std::get<2>(test_tup1) > std::get<2>(test_tup2);
}
| int main() {
assert(func0(std::make_tuple(1, 2, 3), std::make_tuple(2, 3, 4)) == false);
assert(func0(std::make_tuple(4, 5, 6), std::make_tuple(3, 4, 5)) == true);
assert(func0(std::make_tuple(11, 12, 13), std::make_tuple(10, 11, 12)) == true);
return 0;
}
| O3 | cpp | func0(std::tuple<int, int, int> const&, std::tuple<int, int, int> const&):
endbr64
mov 0x8(%rsi),%edx
xor %eax,%eax
cmp %edx,0x8(%rdi)
jle 115d <_Z5func0RKSt5tupleIJiiiEES2_+0x1d>
mov 0x4(%rsi),%ecx
cmp %ecx,0x4(%rdi)
jle 115d <_Z5func0RKSt5tupleIJiiiEES2_+0x1d>
mov (%rsi),%eax
cmp %eax,(%rdi... | _Z5func0RKSt5tupleIJiiiEES2_:
endbr64
mov edx, [rsi+8]
xor eax, eax
cmp [rdi+8], edx
jle short locret_115D
mov ecx, [rsi+4]
cmp [rdi+4], ecx
jle short locret_115D
mov eax, [rsi]
cmp [rdi], eax
setnle al
locret_115D:
retn | bool func0(_DWORD *a1, _DWORD *a2)
{
bool result; // al
result = 0;
if ( a1[2] > a2[2] && a1[1] > a2[1] )
return *a1 > *a2;
return result;
} | func0:
ENDBR64
MOV EDX,dword ptr [RSI + 0x8]
XOR EAX,EAX
CMP dword ptr [RDI + 0x8],EDX
JLE 0x0010115d
MOV ECX,dword ptr [RSI + 0x4]
CMP dword ptr [RDI + 0x4],ECX
JLE 0x0010115d
MOV EAX,dword ptr [RSI]
CMP dword ptr [RDI],EAX
SETG AL
LAB_0010115d:
RET | /* func0(std::tuple<int, int, int> const&, std::tuple<int, int, int> const&) */
int4 func0(tuple *param_1,tuple *param_2)
{
int4 uVar1;
uVar1 = 0;
if ((*(int *)(param_2 + 8) < *(int *)(param_1 + 8)) &&
(*(int *)(param_2 + 4) < *(int *)(param_1 + 4))) {
uVar1 = CONCAT31((int3)((uint)*(int *)param_2 >... |
3,236 | func0 |
#include <vector>
#include <string>
#include <map>
#include <assert.h>
| std::vector<std::string> func0(int a, int b, int c, int d) {
std::map<std::string, int> counts = {{"p", a}, {"q", b}, {"r", c}, {"s", d}};
std::vector<std::string> result;
for (auto const& elem : counts) {
for (int i = 0; i < elem.second; ++i) {
result.push_back(elem.first);
... | int main() {
assert((func0(4,2,0,-2) == std::vector<std::string>{"p", "p", "p", "p", "q", "q"}));
assert((func0(0,1,2,3) == std::vector<std::string>{"q", "r", "r", "s", "s", "s"}));
assert((func0(11,15,12,23) == std::vector<std::string>{"p", "p", "p", "p", "p", "p", "p", "p", "p", "p", "p", "q", "q", "q"... | O0 | cpp | func0[abi:cxx11](int, int, int, int):
endbr64
push %rbp
mov %rsp,%rbp
push %r13
push %r12
push %rbx
sub $0x138,%rsp
mov %rdi,-0x138(%rbp)
mov %esi,-0x13c(%rbp)
mov %edx,-0x140(%rbp)
mov %ecx,-0x144(%rbp)
mov %r8d,-0x148(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x28(%rbp)
xor %eax,%eax
lea... | _Z5func0B5cxx11iiii:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 138h
mov [rbp+var_148], rdi
mov [rbp+var_14C], esi
mov [rbp+var_150], edx
mov [rbp+var_154], ecx
mov [rbp+var_158], r8d
mov rax, fs:28h
mov [rbp+var_38], rax
xor... | long long func0[abi:cxx11](long long a1, int a2, int a3, int a4, int a5)
{
_BYTE *i; // rbx
int v7; // [rsp+8h] [rbp-158h] BYREF
int v8; // [rsp+Ch] [rbp-154h] BYREF
int v9; // [rsp+10h] [rbp-150h] BYREF
int v10; // [rsp+14h] [rbp-14Ch] BYREF
long long v11; // [rsp+18h] [rbp-148h]
int j; // [rsp+24h] [rb... | func0[abi:cxx11]:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x138
MOV qword ptr [RBP + -0x148],RDI
MOV dword ptr [RBP + -0x14c],ESI
MOV dword ptr [RBP + -0x150],EDX
MOV dword ptr [RBP + -0x154],ECX
MOV dword ptr [RBP + -0x158],R8D
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + ... | /* func0[abi:cxx11](int, int, int, int) */
vector<std::string,std::allocator<std::string>> *
func0_abi_cxx11_(int param_1,int param_2,int param_3,int param_4)
{
char cVar1;
pair<std::string_const,int> *this;
int4 in_register_0000003c;
long in_FS_OFFSET;
int local_160;
int local_15c;
int local_158;
int... |
3,237 | func0 |
#include <vector>
#include <string>
#include <map>
#include <assert.h>
| std::vector<std::string> func0(int a, int b, int c, int d) {
std::map<std::string, int> counts = {{"p", a}, {"q", b}, {"r", c}, {"s", d}};
std::vector<std::string> result;
for (auto const& elem : counts) {
for (int i = 0; i < elem.second; ++i) {
result.push_back(elem.first);
... | int main() {
assert((func0(4,2,0,-2) == std::vector<std::string>{"p", "p", "p", "p", "q", "q"}));
assert((func0(0,1,2,3) == std::vector<std::string>{"q", "r", "r", "s", "s", "s"}));
assert((func0(11,15,12,23) == std::vector<std::string>{"p", "p", "p", "p", "p", "p", "p", "p", "p", "p", "p", "q", "q", "q"... | O1 | cpp | func0[abi:cxx11](int, int, int, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0xf8,%rsp
mov %rdi,%rbx
mov %esi,%r15d
mov %edx,%r14d
mov %ecx,%r13d
mov %r8d,%r12d
mov %fs:0x28,%rax
mov %rax,0xe8(%rsp)
xor %eax,%eax
lea 0x40(%rsp),%rbp
lea 0x50... | _Z5func0B5cxx11iiii:
endbr64
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 0F0h
mov rbx, rdi
mov r14d, esi
mov r13d, edx
mov r12d, ecx
mov ebp, r8d
mov rax, fs:28h
mov [rsp+118h+var_30], rax
xor eax, eax
lea rdi, [rsp+118h+var_D8]
lea rax, [rsp+118h+var... | _QWORD * func0[abi:cxx11](_QWORD *a1, int a2, int a3, int a4, int a5)
{
char *v9; // rbp
long long insert_hint_unique_pos; // rax
long long v11; // rdx
char *v12; // rbp
long long i; // rbp
int j; // r12d
_QWORD *v16; // rdi
_BYTE *v17; // [rsp+8h] [rbp-110h] BYREF
_BYTE v18[8]; // [rsp+10h] [rbp-108h... | func0[abi:cxx11]:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0xf0
MOV RBX,RDI
MOV R14D,ESI
MOV R13D,EDX
MOV R12D,ECX
MOV EBP,R8D
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xe8],RAX
XOR EAX,EAX
LEA RDI,[RSP + 0x40]
LEA RAX,[RSP + 0x50]
MOV qword ptr [RSP + 0x40],RAX
LEA RDX,[0x1042b5]
LEA RSI,[R... | /* func0[abi:cxx11](int, int, int, int) */
vector<std::string,std::allocator<std::string>> *
func0_abi_cxx11_(int param_1,int param_2,int param_3,int param_4)
{
long *plVar1;
_Rb_tree_node_base *p_Var2;
string *psVar3;
string *psVar4;
int4 in_register_0000003c;
vector<std::string,std::allocator<std::strin... |
3,238 | func0 |
#include <vector>
#include <string>
#include <map>
#include <assert.h>
| std::vector<std::string> func0(int a, int b, int c, int d) {
std::map<std::string, int> counts = {{"p", a}, {"q", b}, {"r", c}, {"s", d}};
std::vector<std::string> result;
for (auto const& elem : counts) {
for (int i = 0; i < elem.second; ++i) {
result.push_back(elem.first);
... | int main() {
assert((func0(4,2,0,-2) == std::vector<std::string>{"p", "p", "p", "p", "q", "q"}));
assert((func0(0,1,2,3) == std::vector<std::string>{"q", "r", "r", "s", "s", "s"}));
assert((func0(11,15,12,23) == std::vector<std::string>{"p", "p", "p", "p", "p", "p", "p", "p", "p", "p", "p", "q", "q", "q"... | O2 | cpp | func0[abi:cxx11](int, int, int, int):
endbr64
push %r15
mov $0x71,%r9d
mov $0x72,%r10d
mov $0x73,%r11d
push %r14
push %r13
push %r12
mov %rdi,%r12
mov $0x70,%edi
push %rbp
push %rbx
sub $0x108,%rsp
mov %fs:0x28,%rax
mov %rax,0xf8(%rsp)
xor %eax,%eax
lea 0x60(%rsp),%rax
lea 0... | _Z5func0B5cxx11iiii:
endbr64
push r15
push r14
mov r14d, esi
push r13
mov r13d, edx
lea rdx, aP+1; ""
push r12
lea rsi, [rdx-1]
mov r12d, ecx
push rbp
mov ebp, r8d
push rbx
mov rbx, rdi
sub rsp, 108h
mov rax, fs:28h
mov [rsp+138h+var_40], rax
xor eax, eax
le... | long long func0[abi:cxx11](long long a1, int a2, int a3, int a4, int a5)
{
char *v9; // rbp
long long i; // rax
int *v11; // rdx
long long v12; // r13
char *v13; // rsi
long long v14; // rdx
int *v15; // r12
size_t v16; // r13
size_t v17; // rcx
size_t v18; // rdx
unsigned int v19; // eax
long ... | func0[abi:cxx11]:
ENDBR64
PUSH R15
PUSH R14
MOV R14D,ESI
PUSH R13
MOV R13D,EDX
LEA RDX,[0x1042b4]
PUSH R12
LEA RSI,[RDX + -0x1]
MOV R12D,ECX
PUSH RBP
MOV EBP,R8D
PUSH RBX
MOV RBX,RDI
SUB RSP,0x108
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xf8],RAX
XOR EAX,EAX
LEA RDI,[RSP + 0x50]
LEA RAX,[RSP + 0x60]
MOV qword ... | /* func0[abi:cxx11](int, int, int, int) */
vector<std::string,std::allocator<std::string>> *
func0_abi_cxx11_(int param_1,int param_2,int param_3,int param_4)
{
_Rb_tree_node_base *p_Var1;
char *pcVar2;
int8 uVar3;
ulong uVar4;
ulong uVar5;
long *plVar6;
int iVar7;
_Rb_tree_node_base *p_Var8;
_Rb_tr... |
3,239 | func0 |
#include <vector>
#include <string>
#include <map>
#include <assert.h>
| std::vector<std::string> func0(int a, int b, int c, int d) {
std::map<std::string, int> counts = {{"p", a}, {"q", b}, {"r", c}, {"s", d}};
std::vector<std::string> result;
for (auto const& elem : counts) {
for (int i = 0; i < elem.second; ++i) {
result.push_back(elem.first);
... | int main() {
assert((func0(4,2,0,-2) == std::vector<std::string>{"p", "p", "p", "p", "q", "q"}));
assert((func0(0,1,2,3) == std::vector<std::string>{"q", "r", "r", "s", "s", "s"}));
assert((func0(11,15,12,23) == std::vector<std::string>{"p", "p", "p", "p", "p", "p", "p", "p", "p", "p", "p", "q", "q", "q"... | O3 | cpp | func0[abi:cxx11](int, int, int, int):
endbr64
push %r15
mov $0x71,%r9d
mov %rdi,%r15
mov $0x72,%r10d
push %r14
mov $0x70,%edi
mov $0x73,%r11d
push %r13
push %r12
push %rbp
push %rbx
sub $0x128,%rsp
mov %fs:0x28,%rax
mov %rax,0x118(%rsp)
xor %eax,%eax
lea 0x80(%rsp),%rax
lea ... | _Z5func0B5cxx11iiii:
endbr64
push r15
mov r9d, 71h ; 'q'
mov r10d, 72h ; 'r'
mov r11d, 73h ; 's'
push r14
push r13
push r12
mov r12, rdi
mov edi, 70h ; 'p'
push rbp
push rbx
sub rsp, 128h
mov rax, fs:28h
mov [rsp+158h+var_40], rax
xor eax, eax
lea rax, [rsp+158h... | long long func0[abi:cxx11](long long a1, int a2, int a3, int a4, int a5)
{
char *v6; // rbx
long long insert_hint_unique_pos; // rax
int *v8; // rdx
const void **v9; // r13
long long v10; // rbp
_BYTE *v11; // rcx
size_t v12; // r14
_BYTE *v13; // rdi
long long v14; // rax
long long v15; // r13
i... | func0[abi:cxx11]:
ENDBR64
PUSH R15
MOV R9D,0x71
MOV R10D,0x72
MOV R11D,0x73
PUSH R14
PUSH R13
PUSH R12
MOV R12,RDI
MOV EDI,0x70
PUSH RBP
PUSH RBX
SUB RSP,0x128
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x118],RAX
XOR EAX,EAX
LEA RAX,[RSP + 0x80]
LEA RBX,[RSP + 0x70]
MOV qword ptr [RSP + 0x78],0x1
MOV qword ptr [... | /* func0[abi:cxx11](int, int, int, int) */
vector<std::string,std::allocator<std::string>> *
func0_abi_cxx11_(int param_1,int param_2,int param_3,int param_4)
{
_Rb_tree_node_base *p_Var1;
_Rb_tree_node_base *__src;
ulong uVar2;
int *__src_00;
ulong *puVar3;
void *pvVar4;
ulong uVar5;
void *pvVar6;
... |
3,240 | func0 |
#include <iostream>
#include <vector>
#include <utility>
#include <assert.h>
| bool func0(const std::vector<std::pair<int, int>>& test_list1, const std::vector<std::pair<int, int>>& test_list2) {
return test_list1 == test_list2;
}
| int main() {
assert(func0({{10, 4}, {2, 5}}, {{10, 4}, {2, 5}}) == true);
assert(func0({{1, 2}, {3, 7}}, {{12, 14}, {12, 45}}) == false);
assert(func0({{2, 14}, {12, 25}}, {{2, 14}, {12, 25}}) == true);
return 0;
}
| O0 | cpp | func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x10,%rsp
mov %rdi,-0x8(%rbp)
mov %rsi,-0x10(%rbp)
mov -0x10(%rbp),%rdx
mov -0x8(%rbp),%rax
mov ... | _Z5func0RKSt6vectorISt4pairIiiESaIS1_EES5_:
endbr64
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdx, [rbp+var_10]
mov rax, [rbp+var_8]
mov rsi, rdx
mov rdi, rax
call _ZSteqISt4pairIiiESaIS1_EEbRKSt6vectorIT_T0_ES8_; std::operator==<std::pair<in... | long long func0(long long a1, long long a2)
{
return std::operator==<std::pair<int,int>,std::allocator<std::pair<int,int>>>(a1, a2);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x00101870
LEAVE
RET | /* func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&,
std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&) */
void func0(vector *param_1,vector *param_2)
{
std::operator==(param_1,param_2);
return;
} |
3,241 | func0 |
#include <iostream>
#include <vector>
#include <utility>
#include <assert.h>
| bool func0(const std::vector<std::pair<int, int>>& test_list1, const std::vector<std::pair<int, int>>& test_list2) {
return test_list1 == test_list2;
}
| int main() {
assert(func0({{10, 4}, {2, 5}}, {{10, 4}, {2, 5}}) == true);
assert(func0({{1, 2}, {3, 7}}, {{12, 14}, {12, 45}}) == false);
assert(func0({{2, 14}, {12, 25}}, {{2, 14}, {12, 25}}) == true);
return 0;
}
| O1 | cpp | func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&):
endbr64
mov 0x8(%rdi),%r8
mov (%rdi),%rdx
mov (%rsi),%rcx
mov %r8,%rdi
sub %rdx,%rdi
mov 0x8(%rsi),%rax
sub %rcx,%rax
mov $0x0,%e... | _Z5func0RKSt6vectorISt4pairIiiESaIS1_EES5_:
endbr64
mov r8, [rdi+8]
mov rdx, [rdi]
mov rcx, [rsi]
mov rdi, r8
sub rdi, rdx
mov rax, [rsi+8]
sub rax, rcx
mov esi, 0
cmp rdi, rax
jz short loc_1211
loc_120E:
mov eax, esi
retn
loc_1211:
cmp r8, rdx
jz short loc_1246
loc... | long long func0(long long a1, long long a2)
{
_DWORD *v2; // r8
_DWORD *v3; // rdx
_DWORD *v4; // rcx
_DWORD *v5; // rax
unsigned int v6; // esi
v2 = *(_DWORD **)(a1 + 8);
v3 = *(_DWORD **)a1;
v4 = *(_DWORD **)a2;
v5 = (_DWORD *)(*(_QWORD *)(a2 + 8) - *(_QWORD *)a2);
v6 = 0;
if ( (_DWORD *)((cha... | func0:
ENDBR64
MOV R8,qword ptr [RDI + 0x8]
MOV RDX,qword ptr [RDI]
MOV RCX,qword ptr [RSI]
MOV RDI,R8
SUB RDI,RDX
MOV RAX,qword ptr [RSI + 0x8]
SUB RAX,RCX
MOV ESI,0x0
CMP RDI,RAX
JZ 0x00101211
LAB_0010120e:
MOV EAX,ESI
RET
LAB_00101211:
CMP R8,RDX
JZ 0x00101246
LAB_00101216:
MOV EAX,dword ptr [RCX]
CMP dword ptr [RDX... | /* func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&,
std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&) */
int8 func0(vector *param_1,vector *param_2)
{
int *piVar1;
int *piVar2;
int *piVar3;
int8 uVar4;
piVar1 = *(int **)(param_1 + 8);
... |
3,242 | func0 |
#include <iostream>
#include <vector>
#include <utility>
#include <assert.h>
| bool func0(const std::vector<std::pair<int, int>>& test_list1, const std::vector<std::pair<int, int>>& test_list2) {
return test_list1 == test_list2;
}
| int main() {
assert(func0({{10, 4}, {2, 5}}, {{10, 4}, {2, 5}}) == true);
assert(func0({{1, 2}, {3, 7}}, {{12, 14}, {12, 45}}) == false);
assert(func0({{2, 14}, {12, 25}}, {{2, 14}, {12, 25}}) == true);
return 0;
}
| O2 | cpp | func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&):
endbr64
mov (%rdi),%rdx
mov 0x8(%rdi),%rdi
xor %r8d,%r8d
mov (%rsi),%rcx
mov 0x8(%rsi),%rax
mov %rdi,%r9
sub %rdx,%r9
sub %rcx,%r... | _Z5func0RKSt6vectorISt4pairIiiESaIS1_EES5_:
endbr64
mov rdx, [rdi]
mov rdi, [rdi+8]
mov rcx, [rsi]
mov rax, [rsi+8]
xor esi, esi
mov r8, rdi
sub r8, rdx
sub rax, rcx
cmp r8, rax
jz short loc_14E8
loc_14E2:
mov eax, esi
retn
loc_14E8:
cmp rdx, rdi
jz short loc_1518
l... | long long func0(char **a1, long long a2)
{
char *v2; // rdx
char *v3; // rdi
_DWORD *v4; // rcx
long long v5; // rax
unsigned int v6; // esi
v2 = *a1;
v3 = a1[1];
v4 = *(_DWORD **)a2;
v5 = *(_QWORD *)(a2 + 8);
v6 = 0;
if ( v3 - v2 != v5 - (_QWORD)v4 )
return v6;
if ( v2 == v3 )
return ... | func0:
ENDBR64
MOV RDX,qword ptr [RDI]
MOV RDI,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RSI]
MOV RAX,qword ptr [RSI + 0x8]
XOR ESI,ESI
MOV R8,RDI
SUB R8,RDX
SUB RAX,RCX
CMP R8,RAX
JZ 0x001014e8
LAB_001014e2:
MOV EAX,ESI
RET
LAB_001014e8:
CMP RDX,RDI
JZ 0x00101518
LAB_001014ed:
MOV EAX,dword ptr [RCX]
CMP dword ptr [RDX... | /* func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&,
std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&) */
int8 func0(vector *param_1,vector *param_2)
{
int *piVar1;
int *piVar2;
int8 uVar3;
piVar2 = *(int **)param_1;
piVar1 = *(int **)p... |
3,243 | func0 |
#include <iostream>
#include <vector>
#include <utility>
#include <assert.h>
| bool func0(const std::vector<std::pair<int, int>>& test_list1, const std::vector<std::pair<int, int>>& test_list2) {
return test_list1 == test_list2;
}
| int main() {
assert(func0({{10, 4}, {2, 5}}, {{10, 4}, {2, 5}}) == true);
assert(func0({{1, 2}, {3, 7}}, {{12, 14}, {12, 45}}) == false);
assert(func0({{2, 14}, {12, 25}}, {{2, 14}, {12, 25}}) == true);
return 0;
}
| O3 | cpp | func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&):
endbr64
mov (%rdi),%rdx
mov 0x8(%rdi),%rdi
xor %r8d,%r8d
mov (%rsi),%rcx
mov 0x8(%rsi),%rax
mov %rdi,%r9
sub %rdx,%r9
sub %rcx,%r... | _Z5func0RKSt6vectorISt4pairIiiESaIS1_EES5_:
endbr64
mov r8, [rdi+8]
mov rdx, [rdi]
mov rcx, [rsi]
mov rax, [rsi+8]
xor esi, esi
mov rdi, r8
sub rdi, rdx
sub rax, rcx
cmp rdi, rax
jz short loc_1530
loc_1512:
mov eax, esi
retn
loc_1518:
mov eax, [rcx+4]
cmp [rdx+4], ea... | long long func0(char **a1, long long a2)
{
char *v2; // rdx
_DWORD *v3; // rcx
long long v4; // rax
unsigned int v5; // esi
v2 = *a1;
v3 = *(_DWORD **)a2;
v4 = *(_QWORD *)(a2 + 8);
v5 = 0;
if ( a1[1] - *a1 == v4 - (_QWORD)v3 )
{
while ( a1[1] != v2 )
{
if ( *(_DWORD *)v2 != *v3 || *(... | func0:
ENDBR64
MOV R8,qword ptr [RDI + 0x8]
MOV RDX,qword ptr [RDI]
MOV RCX,qword ptr [RSI]
MOV RAX,qword ptr [RSI + 0x8]
XOR ESI,ESI
MOV RDI,R8
SUB RDI,RDX
SUB RAX,RCX
CMP RDI,RAX
JZ 0x00101530
LAB_00101512:
MOV EAX,ESI
RET
LAB_00101518:
MOV EAX,dword ptr [RCX + 0x4]
CMP dword ptr [RDX + 0x4],EAX
JNZ 0x0010153b
ADD RD... | /* func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&,
std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&) */
int8 func0(vector *param_1,vector *param_2)
{
int *piVar1;
int *piVar2;
int8 uVar3;
piVar2 = *(int **)param_1;
piVar1 = *(int **)p... |
3,244 | func0 |
#include <iostream>
#include <regex>
#include <cassert>
| std::string func0(const std::string& street) {
std::regex pattern("Road$");
std::string new_street = std::regex_replace(street, pattern, "Rd.");
return new_street;
}
| int main() {
assert(func0("ravipadu Road") == "ravipadu Rd.");
assert(func0("palnadu Road") == "palnadu Rd.");
assert(func0("eshwar enclave Road") == "eshwar enclave Rd.");
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
lea -0x40(%rbp),%rax
mov $0x10,%edx
lea ... | _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
lea rax, [rbp+var_40]
mov edx, 10h
lea rcx, aRoad; "Road$"
mov ... | long long func0(long long a1, long long a2)
{
_BYTE v3[40]; // [rsp+10h] [rbp-40h] BYREF
unsigned long long v4; // [rsp+38h] [rbp-18h]
v4 = __readfsqword(0x28u);
std::basic_regex<char,std::regex_traits<char>>::basic_regex(v3, "Road$", 16LL);
std::regex_replace<std::regex_traits<char>,char,std::char_traits<c... | 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
LEA RAX,[RBP + -0x40]
MOV EDX,0x10
LEA RCX,[0x134051]
MOV RSI,RCX
MOV RDI,RAX
LAB_00104b63:
CALL 0x00106152
MOV RAX,qword ptr ... | /* func0(std::string const&) */
string * func0(string *param_1)
{
int8 in_RSI;
long in_FS_OFFSET;
regex local_48 [40];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
std::regex::basic_regex(local_48,"Road$",0x10);
/* try { // try from 00104b84 to 00104b88 has its CatchHan... |
3,245 | func0 |
#include <iostream>
#include <regex>
#include <cassert>
| std::string func0(const std::string& street) {
std::regex pattern("Road$");
std::string new_street = std::regex_replace(street, pattern, "Rd.");
return new_street;
}
| int main() {
assert(func0("ravipadu Road") == "ravipadu Rd.");
assert(func0("palnadu Road") == "palnadu Rd.");
assert(func0("eshwar enclave Road") == "eshwar enclave Rd.");
return 0;
}
| 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 $0x48,%rsp
mov %rdi,%rbx
mov %rsi,%rbp
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
lea 0x8(%rsp),%r13
mov %r13,%rdi
callq 4730 <_ZNS... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
push r12
push rbx
sub rsp, 38h
mov rbx, rdi
mov r14, rsi
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
lea r12, [rbp+var_50]
lea rdi, [rbp+var_48]; this
call __Z... | long long func0(long long a1, long long *a2)
{
long long v4; // rsi
_DWORD *v5; // rdi
volatile signed __int32 *v6; // rcx
long long v7; // rdx
signed __int32 v8; // eax
_BYTE v10[8]; // [rsp+0h] [rbp-50h] BYREF
_BYTE v11[8]; // [rsp+8h] [rbp-48h] BYREF
long long v12; // [rsp+10h] [rbp-40h]
long long... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,RDI
MOV R14,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
LEA R12,[RBP + -0x50]
LEA RDI,[RBP + -0x48]
CALL 0x00104710
MOV qword ptr [RBP + -0x40],0x0
MOV qword ptr [RBP + -0x38],0x0
MOV ECX,0x10
LEA RDX,[0x... | /* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
_Sp_counted_base<(_Lock_policy)2> *p_Var2;
int iVar3;
int8 *in_RSI;
long in_FS_OFFSET;
regex local_58 [8];
int local_50 [8];
int8 local_48;
_Sp_counted_base<(_Lock_policy)2> *local_40;
long... |
3,246 | func0 |
#include <iostream>
#include <regex>
#include <cassert>
| std::string func0(const std::string& street) {
std::regex pattern("Road$");
std::string new_street = std::regex_replace(street, pattern, "Rd.");
return new_street;
}
| int main() {
assert(func0("ravipadu Road") == "ravipadu Rd.");
assert(func0("palnadu Road") == "palnadu Rd.");
assert(func0("eshwar enclave Road") == "eshwar enclave Rd.");
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x40,%rsp
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
lea 0x8(%rsp),%rbp
lea 0x18(%rsp),%r13... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
mov r14, rsi
push r13
lea r13, [rbp+var_50]
push r12
lea r12, [rbp+var_48]
push rbx
mov rbx, rdi
mov rdi, r12; this
sub rsp, 30h
mov rax, fs:28h
mov [rbp+var_28], rax... | long long func0(long long a1, long long *a2)
{
long long v3; // rsi
long long v4; // rdi
long long v5; // rdx
volatile signed __int32 *v6; // rcx
signed __int32 v7; // eax
long long v9; // rax
_BYTE v10[8]; // [rsp+0h] [rbp-50h] BYREF
_BYTE v11[8]; // [rsp+8h] [rbp-48h] BYREF
__int128 v12; // [rsp+10... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
MOV R14,RSI
PUSH R13
LEA R13,[RBP + -0x50]
PUSH R12
LEA R12,[RBP + -0x48]
PUSH RBX
MOV RBX,RDI
MOV RDI,R12
SUB RSP,0x30
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
CALL 0x001046f0
LEA RDX,[0x11a66c]
PXOR XMM0,XMM0
MOV RDI,R13
MOV ECX,0x10
LEA RSI,... | /* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
int8 uVar2;
int iVar3;
int8 *in_RSI;
long in_FS_OFFSET;
regex local_58 [8];
int local_50 [8];
int local_48 [24];
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
std::locale::... |
3,247 | func0 |
#include <iostream>
#include <regex>
#include <cassert>
| std::string func0(const std::string& street) {
std::regex pattern("Road$");
std::string new_street = std::regex_replace(street, pattern, "Rd.");
return new_street;
}
| int main() {
assert(func0("ravipadu Road") == "ravipadu Rd.");
assert(func0("palnadu Road") == "palnadu Rd.");
assert(func0("eshwar enclave Road") == "eshwar enclave Rd.");
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov %rsi,%rbx
sub $0x40,%rsp
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
lea 0x8(%rsp),%rbp
lea 0x18(%rsp),%r13... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
lea r14, [rbp+var_E0]
push r13
push r12
mov r12, rsi
push rbx
mov rbx, rdi
sub rsp, 108h
mov rax, fs:28h
mov [rbp+var_38], rax
xor eax, eax
lea rax, [rbp+... | _QWORD * func0(_QWORD *a1, char **a2)
{
char *v3; // rax
long long v4; // r13
char *v5; // r15
char *v6; // r12
char v7; // al
long long v8; // rdx
long long v9; // rcx
long long v10; // r8
long long v11; // r9
unsigned long long v12; // rsi
long long v13; // rdi
volatile signed __int32 *v14; //... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
LEA R14,[RBP + -0xe0]
PUSH R13
PUSH R12
MOV R12,RSI
PUSH RBX
MOV RBX,RDI
SUB RSP,0x108
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0xd8]
MOV qword ptr [RBP + -0x130],R14
MOV RDI,RAX
MOV qword ptr [RBP + -0x128],RAX
CALL 0x... | /* func0(std::string const&) */
string * func0(string *param_1)
{
_Sp_counted_base<(_Lock_policy)2> *p_Var1;
string sVar2;
string *psVar3;
long lVar4;
int8 uVar5;
bool bVar6;
char cVar7;
int iVar8;
int8 *puVar9;
string *psVar10;
long lVar11;
long *plVar12;
ulong uVar13;
long *in_RSI;
ulo... |
3,248 | func0 |
#include <string>
#include <cassert>
| int func0(std::string str1) {
int count = 0;
for (char ch : str1) {
count += 1;
}
return count;
}
| int main() {
assert(func0("python") == 6);
assert(func0("program") == 7);
assert(func0("language") == 8);
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
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,-0x24(%rbp)
mov -0x38(%rbp),%rax
mov %rax,-0x10(%rbp)
mov -0x10(%rbp),%... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
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_24], 0
mov rax, [rbp+var_38]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rdi, r... | long long func0(long long a1)
{
unsigned int v2; // [rsp+1Ch] [rbp-24h]
long long v3; // [rsp+20h] [rbp-20h] BYREF
_QWORD v4[3]; // [rsp+28h] [rbp-18h] BYREF
v4[2] = __readfsqword(0x28u);
v2 = 0;
v4[1] = a1;
v3 = std::string::begin(a1);
v4[0] = std::string::end(a1);
while ( (unsigned __int8)__gnu_cx... | 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 + -0x24],0x0
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,RAX
CALL 0x001011d0
MOV qword pt... | /* func0(std::string) */
int func0(int8 param_1)
{
bool bVar1;
long in_FS_OFFSET;
int local_2c;
int8 local_28;
int8 local_20;
int8 local_18;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_2c = 0;
local_18 = param_1;
local_28 = std::string::begin();
local_20 = std::string::e... |
3,249 | func0 |
#include <string>
#include <cassert>
| int func0(std::string str1) {
int count = 0;
for (char ch : str1) {
count += 1;
}
return count;
}
| int main() {
assert(func0("python") == 6);
assert(func0("program") == 7);
assert(func0("language") == 8);
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
mov (%rdi),%rdx
mov 0x8(%rdi),%rax
lea (%rdx,%rax,1),%rcx
cmp %rcx,%rdx
je 120c <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x23>
mov %eax,%ecx
mov $0x0,%edx
add $0x1,%edx
cmp %e... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
mov rdx, [rdi]
mov rax, [rdi+8]
lea rcx, [rdx+rax]
cmp rdx, rcx
jz short loc_122C
mov ecx, eax
mov edx, 0
loc_1224:
add edx, 1
cmp edx, ecx
jnz short loc_1224
retn
loc_122C:
mov eax, 0
retn | long long func0(_QWORD *a1)
{
long long result; // rax
int v2; // edx
result = a1[1];
if ( *a1 == *a1 + result )
return 0LL;
v2 = 0;
do
++v2;
while ( v2 != (_DWORD)result );
return result;
} | func0:
ENDBR64
MOV RDX,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x8]
LEA RCX,[RDX + RAX*0x1]
CMP RDX,RCX
JZ 0x0010122c
MOV ECX,EAX
MOV EDX,0x0
LAB_00101224:
ADD EDX,0x1
CMP EDX,ECX
JNZ 0x00101224
RET
LAB_0010122c:
MOV EAX,0x0
RET | /* func0(std::string) */
long func0(long *param_1)
{
long lVar1;
int iVar2;
lVar1 = param_1[1];
if (*param_1 != *param_1 + lVar1) {
iVar2 = 0;
do {
iVar2 = iVar2 + 1;
} while (iVar2 != (int)lVar1);
return lVar1;
}
return 0;
} |
3,250 | func0 |
#include <string>
#include <cassert>
| int func0(std::string str1) {
int count = 0;
for (char ch : str1) {
count += 1;
}
return count;
}
| int main() {
assert(func0("python") == 6);
assert(func0("program") == 7);
assert(func0("language") == 8);
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
mov (%rdi),%rdx
mov 0x8(%rdi),%rax
lea (%rdx,%rax,1),%rcx
cmp %rcx,%rdx
mov $0x0,%edx
cmove %edx,%eax
retq
nopl 0x0(%rax,%rax,1)
| _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
mov rdx, [rdi+8]
test rdx, rdx
mov eax, edx
mov edx, 0
cmovz eax, edx
retn | long long func0(long long a1)
{
long long result; // rax
result = (unsigned int)*(_QWORD *)(a1 + 8);
if ( !*(_QWORD *)(a1 + 8) )
return 0LL;
return result;
} | func0:
ENDBR64
MOV RDX,qword ptr [RDI + 0x8]
TEST RDX,RDX
MOV EAX,EDX
MOV EDX,0x0
CMOVZ EAX,EDX
RET | /* func0(std::string) */
ulong func0(long param_1)
{
ulong uVar1;
uVar1 = *(ulong *)(param_1 + 8) & 0xffffffff;
if (*(ulong *)(param_1 + 8) == 0) {
uVar1 = 0;
}
return uVar1;
} |
3,251 | func0 |
#include <string>
#include <cassert>
| int func0(std::string str1) {
int count = 0;
for (char ch : str1) {
count += 1;
}
return count;
}
| int main() {
assert(func0("python") == 6);
assert(func0("program") == 7);
assert(func0("language") == 8);
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
mov (%rdi),%rdx
mov 0x8(%rdi),%rax
lea (%rdx,%rax,1),%rcx
cmp %rcx,%rdx
mov $0x0,%edx
cmove %edx,%eax
retq
nopl 0x0(%rax,%rax,1)
| _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
mov rdx, [rdi+8]
test rdx, rdx
mov eax, edx
mov edx, 0
cmovz eax, edx
retn | long long func0(long long a1)
{
long long result; // rax
result = (unsigned int)*(_QWORD *)(a1 + 8);
if ( !*(_QWORD *)(a1 + 8) )
return 0LL;
return result;
} | func0:
ENDBR64
MOV RDX,qword ptr [RDI + 0x8]
TEST RDX,RDX
MOV EAX,EDX
MOV EDX,0x0
CMOVZ EAX,EDX
RET | /* func0(std::string) */
ulong func0(long param_1)
{
ulong uVar1;
uVar1 = *(ulong *)(param_1 + 8) & 0xffffffff;
if (*(ulong *)(param_1 + 8) == 0) {
uVar1 = 0;
}
return uVar1;
} |
3,252 | func0 |
#include <cassert>
| double func0(double p, double q) {
double area = (p * q) / 2;
return area;
}
| int main() {
assert(func0(10, 20) == 100);
assert(func0(10, 5) == 25);
assert(func0(4, 2) == 4);
return 0;
}
| O0 | cpp | func0(double, double):
endbr64
push %rbp
mov %rsp,%rbp
movsd %xmm0,-0x18(%rbp)
movsd %xmm1,-0x20(%rbp)
movsd -0x18(%rbp),%xmm0
mulsd -0x20(%rbp),%xmm0
movsd 0xf2b(%rip),%xmm1
divsd %xmm1,%xmm0
movsd %xmm0,-0x8(%rbp)
movsd -0x8(%rbp),%xmm0
pop %rbp
retq
| _Z5func0dd:
endbr64
push rbp
mov rbp, rsp
movsd [rbp+var_18], xmm0
movsd [rbp+var_20], xmm1
movsd xmm0, [rbp+var_18]
mulsd xmm0, [rbp+var_20]
movsd xmm1, cs:dbl_2078
divsd xmm0, xmm1
movsd [rbp+var_8], xmm0
movsd xmm0, [rbp+var_8]
pop rbp
retn | double func0(double a1, double a2)
{
return a1 * a2 / 2.0;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOVSD qword ptr [RBP + -0x18],XMM0
MOVSD qword ptr [RBP + -0x20],XMM1
MOVSD XMM0,qword ptr [RBP + -0x18]
MULSD XMM0,qword ptr [RBP + -0x20]
MOVSD XMM1,qword ptr [0x00102078]
DIVSD XMM0,XMM1
MOVSD qword ptr [RBP + -0x8],XMM0
MOVSD XMM0,qword ptr [RBP + -0x8]
POP RBP
RET | /* func0(double, double) */
double func0(double param_1,double param_2)
{
return (param_1 * param_2) / DAT_00102078;
} |
3,253 | func0 |
#include <cassert>
| double func0(double p, double q) {
double area = (p * q) / 2;
return area;
}
| int main() {
assert(func0(10, 20) == 100);
assert(func0(10, 5) == 25);
assert(func0(4, 2) == 4);
return 0;
}
| O1 | cpp | func0(double, double):
endbr64
mulsd %xmm1,%xmm0
mulsd 0xecf(%rip),%xmm0
retq
| _Z5func0dd:
endbr64
mulsd xmm0, xmm1
mulsd xmm0, cs:qword_2008
retn | double func0(double a1, double a2)
{
return a1 * a2 * 0.5;
} | func0:
ENDBR64
MULSD XMM0,XMM1
MULSD XMM0,qword ptr [0x00102008]
RET | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(double, double) */
double func0(double param_1,double param_2)
{
return param_1 * param_2 * _DAT_00102008;
} |
3,254 | func0 |
#include <cassert>
| double func0(double p, double q) {
double area = (p * q) / 2;
return area;
}
| int main() {
assert(func0(10, 20) == 100);
assert(func0(10, 5) == 25);
assert(func0(4, 2) == 4);
return 0;
}
| O2 | cpp | func0(double, double):
endbr64
mulsd %xmm1,%xmm0
mulsd 0xeb8(%rip),%xmm0
retq
nopw %cs:0x0(%rax,%rax,1)
nopl 0x0(%rax,%rax,1)
| _Z5func0dd:
endbr64
mulsd xmm0, xmm1
mulsd xmm0, cs:qword_2008
retn | double func0(double a1, double a2)
{
return a1 * a2 * 0.5;
} | func0:
ENDBR64
MULSD XMM0,XMM1
MULSD XMM0,qword ptr [0x00102008]
RET | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(double, double) */
double func0(double param_1,double param_2)
{
return param_1 * param_2 * _DAT_00102008;
} |
3,255 | func0 |
#include <cassert>
| double func0(double p, double q) {
double area = (p * q) / 2;
return area;
}
| int main() {
assert(func0(10, 20) == 100);
assert(func0(10, 5) == 25);
assert(func0(4, 2) == 4);
return 0;
}
| O3 | cpp | func0(double, double):
endbr64
mulsd %xmm1,%xmm0
mulsd 0xeb8(%rip),%xmm0
retq
nopw %cs:0x0(%rax,%rax,1)
nopl 0x0(%rax,%rax,1)
| _Z5func0dd:
endbr64
mulsd xmm0, xmm1
mulsd xmm0, cs:qword_2008
retn | double func0(double a1, double a2)
{
return a1 * a2 * 0.5;
} | func0:
ENDBR64
MULSD XMM0,XMM1
MULSD XMM0,qword ptr [0x00102008]
RET | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(double, double) */
double func0(double param_1,double param_2)
{
return param_1 * param_2 * _DAT_00102008;
} |
3,256 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
| std::vector<int> func0(std::vector<int> arr, int n) {
int low = 0;
int mid = 0;
int high = n - 1;
while (mid <= high) {
if (arr[mid] == 0) {
std::swap(arr[low], arr[mid]);
low++;
mid++;
} else if (arr[mid] == 1) {
mid++;
... | int main() {
std::vector<int> result1 = func0({1,2,0,1,0,1,2,1,1}, 9);
std::vector<int> expected1 = {0, 0, 1, 1, 1, 1, 1, 2, 2};
assert(result1 == expected1);
std::vector<int> result2 = func0({1,0,0,1,2,1,2,2,1,0}, 10);
std::vector<int> expected2 = {0, 0, 0, 1, 1, 1, 1, 2, 2, 2};
assert(... | O0 | cpp | func0(std::vector<int, std::allocator<int> >, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x38,%rsp
mov %rdi,-0x28(%rbp)
mov %rsi,-0x30(%rbp)
mov %edx,-0x34(%rbp)
movl $0x0,-0x1c(%rbp)
movl $0x0,-0x18(%rbp)
mov -0x34(%rbp),%eax
sub $0x1,%eax
mov %eax,-0x14(%rbp)
mov -0x18(%rb... | _Z5func0St6vectorIiSaIiEEi:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 38h
mov [rbp+var_28], rdi
mov [rbp+var_30], rsi
mov [rbp+var_34], edx
mov [rbp+var_1C], 0
mov [rbp+var_18], 0
mov eax, [rbp+var_34]
sub eax, 1
mov [rbp+var_14], eax
jmp loc_1362
loc_129D:
mov ... | long long func0(long long a1, long long a2, int a3)
{
long long v3; // rbx
long long v4; // rax
long long v5; // rbx
long long v6; // rax
int v8; // [rsp+24h] [rbp-1Ch]
int v9; // [rsp+28h] [rbp-18h]
int v10; // [rsp+2Ch] [rbp-14h]
v8 = 0;
v9 = 0;
v10 = a3 - 1;
while ( v9 <= v10 )
{
if ( *... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x28],RDI
MOV qword ptr [RBP + -0x30],RSI
MOV dword ptr [RBP + -0x34],EDX
MOV dword ptr [RBP + -0x1c],0x0
MOV dword ptr [RBP + -0x18],0x0
MOV EAX,dword ptr [RBP + -0x34]
SUB EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x00101362
LAB_0010129... | /* func0(std::vector<int, std::allocator<int> >, int) */
vector<int,std::allocator<int>> * func0(vector param_1,int param_2)
{
int *piVar1;
int *piVar2;
int in_EDX;
int4 in_register_00000034;
vector<int,std::allocator<int>> *this;
int4 in_register_0000003c;
int4 local_24;
int4 local_20;
int4 local_1... |
3,257 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
| std::vector<int> func0(std::vector<int> arr, int n) {
int low = 0;
int mid = 0;
int high = n - 1;
while (mid <= high) {
if (arr[mid] == 0) {
std::swap(arr[low], arr[mid]);
low++;
mid++;
} else if (arr[mid] == 1) {
mid++;
... | int main() {
std::vector<int> result1 = func0({1,2,0,1,0,1,2,1,1}, 9);
std::vector<int> expected1 = {0, 0, 1, 1, 1, 1, 1, 2, 2};
assert(result1 == expected1);
std::vector<int> result2 = func0({1,0,0,1,2,1,2,2,1,0}, 10);
std::vector<int> expected2 = {0, 0, 0, 1, 1, 1, 1, 2, 2, 2};
assert(... | O1 | cpp | func0(std::vector<int, std::allocator<int> >, int):
endbr64
push %rbx
sub $0x1,%edx
js 12d0 <_Z5func0St6vectorIiSaIiEEi+0x67>
mov (%rsi),%r10
mov $0x0,%ecx
mov $0x0,%r11d
jmp 129f <_Z5func0St6vectorIiSaIiEEi+0x36>
cmp $0x1,%r8d
je 12cb <_Z5func0St6vectorIiSaIiEEi+0x62>
movslq %edx,%rax
lea ... | _Z5func0St6vectorIiSaIiEEi:
endbr64
mov r10, rdi
mov r8, rsi
sub edx, 1
js short loc_128F
mov eax, 0
mov r9d, 0
jmp short loc_1260
loc_1245:
cmp ecx, 1
jz short loc_128A
movsxd r11, edx
lea rdi, [rdi+r11*4]
mov r11d, [rdi]
mov [rsi], r11d
mov [rdi], ecx
sub edx... | long long * func0(long long *a1, long long *a2, int a3)
{
int v5; // edx
int v6; // eax
int v7; // r9d
int *v8; // rdi
long long v9; // rdi
int *v10; // rsi
int v11; // ecx
int *v12; // rcx
int v13; // edi
v5 = a3 - 1;
if ( v5 >= 0 )
{
v6 = 0;
v7 = 0;
do
{
v9 = *a2;
... | func0:
ENDBR64
MOV R10,RDI
MOV R8,RSI
SUB EDX,0x1
JS 0x0010128f
MOV EAX,0x0
MOV R9D,0x0
JMP 0x00101260
LAB_00101245:
CMP ECX,0x1
JZ 0x0010128a
MOVSXD R11,EDX
LEA RDI,[RDI + R11*0x4]
MOV R11D,dword ptr [RDI]
MOV dword ptr [RSI],R11D
MOV dword ptr [RDI],ECX
SUB EDX,0x1
LAB_0010125c:
CMP EDX,EAX
JL 0x0010128f
LAB_00101260... | /* func0(std::vector<int, std::allocator<int> >, int) */
long * func0(vector param_1,int param_2)
{
int *piVar1;
int *piVar2;
int iVar3;
long lVar4;
int iVar5;
int in_EDX;
int iVar6;
int4 in_register_00000034;
long *plVar7;
int4 in_register_0000003c;
long *plVar8;
int iVar9;
plVar8 = (lon... |
3,258 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
| std::vector<int> func0(std::vector<int> arr, int n) {
int low = 0;
int mid = 0;
int high = n - 1;
while (mid <= high) {
if (arr[mid] == 0) {
std::swap(arr[low], arr[mid]);
low++;
mid++;
} else if (arr[mid] == 1) {
mid++;
... | int main() {
std::vector<int> result1 = func0({1,2,0,1,0,1,2,1,1}, 9);
std::vector<int> expected1 = {0, 0, 1, 1, 1, 1, 1, 2, 2};
assert(result1 == expected1);
std::vector<int> result2 = func0({1,0,0,1,2,1,2,2,1,0}, 10);
std::vector<int> expected2 = {0, 0, 0, 1, 1, 1, 1, 2, 2, 2};
assert(... | O2 | cpp | func0(std::vector<int, std::allocator<int> >, int):
endbr64
push %r12
mov (%rsi),%r10
mov %rdi,%r12
sub $0x1,%edx
js 17ba <_Z5func0St6vectorIiSaIiEEi+0x6a>
xor %ecx,%ecx
xor %r11d,%r11d
jmp 178f <_Z5func0St6vectorIiSaIiEEi+0x3f>
nopl 0x0(%rax,%rax,1)
movslq %r11d,%r8
add $0x1,%ecx
add $0... | _Z5func0St6vectorIiSaIiEEi:
endbr64
push rbx
mov r11, rdi
mov r10, rsi
mov rdi, [rsi]
sub edx, 1
js short loc_16C6
xor eax, eax
xor r8d, r8d
jmp short loc_169E
loc_1680:
movsxd rcx, r8d
add eax, 1
add r8d, 1
lea rcx, [rdi+rcx*4]
mov r9d, [rcx]
mov dword ptr [rcx]... | __m128 * func0(__m128 *a1, const double *a2, int a3)
{
double v5; // rdi
int v6; // edx
int v7; // eax
int v8; // r8d
long long v9; // rcx
int *v10; // rcx
int v11; // r9d
int *v12; // rsi
int v13; // ecx
long long v14; // r9
int *v15; // r9
unsigned long long v16; // rax
__m128 *result; // ra... | func0:
ENDBR64
PUSH RBX
MOV R11,RDI
MOV R10,RSI
MOV RDI,qword ptr [RSI]
SUB EDX,0x1
JS 0x001016c6
XOR EAX,EAX
XOR R8D,R8D
JMP 0x0010169e
LAB_00101680:
MOVSXD RCX,R8D
ADD EAX,0x1
ADD R8D,0x1
LEA RCX,[RDI + RCX*0x4]
MOV R9D,dword ptr [RCX]
MOV dword ptr [RCX],0x0
MOV dword ptr [RSI],R9D
LAB_0010169a:
CMP EAX,EDX
JG 0x001... | /* func0(std::vector<int, std::allocator<int> >, int) */
long * func0(long *param_1,int (*param_2) [16],int param_3)
{
int *piVar1;
int *piVar2;
int iVar3;
long lVar4;
long lVar5;
int iVar6;
int iVar7;
long lVar8;
lVar4 = *(long *)*param_2;
param_3 = param_3 + -1;
if (-1 < param_3) {
iVar... |
3,259 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
| std::vector<int> func0(std::vector<int> arr, int n) {
int low = 0;
int mid = 0;
int high = n - 1;
while (mid <= high) {
if (arr[mid] == 0) {
std::swap(arr[low], arr[mid]);
low++;
mid++;
} else if (arr[mid] == 1) {
mid++;
... | int main() {
std::vector<int> result1 = func0({1,2,0,1,0,1,2,1,1}, 9);
std::vector<int> expected1 = {0, 0, 1, 1, 1, 1, 1, 2, 2};
assert(result1 == expected1);
std::vector<int> result2 = func0({1,0,0,1,2,1,2,2,1,0}, 10);
std::vector<int> expected2 = {0, 0, 0, 1, 1, 1, 1, 2, 2, 2};
assert(... | O3 | cpp | func0(std::vector<int, std::allocator<int> >, int):
endbr64
push %r12
mov (%rsi),%r10
mov %rdi,%r12
sub $0x1,%edx
js 172a <_Z5func0St6vectorIiSaIiEEi+0x6a>
xor %ecx,%ecx
xor %r11d,%r11d
jmp 16ff <_Z5func0St6vectorIiSaIiEEi+0x3f>
nopl 0x0(%rax,%rax,1)
movslq %r11d,%r8
add $0x1,%ecx
add $0... | _Z5func0St6vectorIiSaIiEEi:
endbr64
push rbx
mov r11, rdi
mov r10, rsi
mov rdi, [rsi]
sub edx, 1
js short loc_16C6
xor eax, eax
xor r8d, r8d
jmp short loc_169E
loc_1680:
movsxd rcx, r8d
add eax, 1
add r8d, 1
lea rcx, [rdi+rcx*4]
mov r9d, [rcx]
mov dword ptr [rcx]... | __m128 * func0(__m128 *a1, const double *a2, int a3)
{
double v5; // rdi
int v6; // edx
int v7; // eax
int v8; // r8d
long long v9; // rcx
int *v10; // rcx
int v11; // r9d
int *v12; // rsi
int v13; // ecx
long long v14; // r9
int *v15; // r9
unsigned long long v16; // rax
__m128 *result; // ra... | func0:
ENDBR64
PUSH RBX
MOV R11,RDI
MOV R10,RSI
MOV RDI,qword ptr [RSI]
SUB EDX,0x1
JS 0x001016c6
XOR EAX,EAX
XOR R8D,R8D
JMP 0x0010169e
LAB_00101680:
MOVSXD RCX,R8D
ADD EAX,0x1
ADD R8D,0x1
LEA RCX,[RDI + RCX*0x4]
MOV R9D,dword ptr [RCX]
MOV dword ptr [RCX],0x0
MOV dword ptr [RSI],R9D
LAB_0010169a:
CMP EAX,EDX
JG 0x001... | /* func0(std::vector<int, std::allocator<int> >, int) */
long * func0(long *param_1,int (*param_2) [16],int param_3)
{
int *piVar1;
int *piVar2;
int iVar3;
long lVar4;
long lVar5;
int iVar6;
int iVar7;
long lVar8;
lVar4 = *(long *)*param_2;
param_3 = param_3 + -1;
if (-1 < param_3) {
iVar... |
3,260 | func0 |
#include <tuple>
#include <cassert>
| std::tuple<> func0(std::tuple<int, int, int, int, int> test_tup) {
std::tuple<> empty_tuple;
return empty_tuple;
}
| int main() {
assert(func0(std::make_tuple(1, 5, 3, 6, 8)) == std::make_tuple());
assert(func0(std::make_tuple(2, 1, 4, 5, 6)) == std::make_tuple());
assert(func0(std::make_tuple(3, 2, 5, 6, 8)) == std::make_tuple());
return 0;
}
| O0 | cpp | func0(std::tuple<int, int, int, int, int>):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %rdi,-0x18(%rbp)
mov %fs:0x28,%rdx
mov %rdx,-0x8(%rbp)
xor %edx,%edx
mov -0x8(%rbp),%rcx
xor %fs:0x28,%rcx
je 11bc <_Z5func0St5tupleIJiiiiiEE+0x33>
callq 1080 <__stack_chk_fail@plt>
leaveq
retq
| _Z5func0St5tupleIJiiiiiEE:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_18], rdi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
nop
mov rax, [rbp+var_8]
sub rax, fs:28h
jz short locret_119D
call ___stack_chk_fail
locret_119D:
leave
retn | long long func0()
{
return 0LL;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x18],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
NOP
MOV RAX,qword ptr [RBP + -0x8]
SUB RAX,qword ptr FS:[0x28]
JZ 0x0010119d
CALL 0x00101070
LAB_0010119d:
LEAVE
RET | /* func0(std::tuple<int, int, int, int, int>) */
void func0(tuple param_1)
{
long in_FS_OFFSET;
if (*(long *)(in_FS_OFFSET + 0x28) != *(long *)(in_FS_OFFSET + 0x28)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return;
} |
3,261 | func0 |
#include <tuple>
#include <cassert>
| std::tuple<> func0(std::tuple<int, int, int, int, int> test_tup) {
std::tuple<> empty_tuple;
return empty_tuple;
}
| int main() {
assert(func0(std::make_tuple(1, 5, 3, 6, 8)) == std::make_tuple());
assert(func0(std::make_tuple(2, 1, 4, 5, 6)) == std::make_tuple());
assert(func0(std::make_tuple(3, 2, 5, 6, 8)) == std::make_tuple());
return 0;
}
| O1 | cpp | func0(std::tuple<int, int, int, int, int>):
endbr64
mov $0x0,%eax
retq
| _Z5func0St5tupleIJiiiiiEE:
endbr64
retn | void func0()
{
;
} | func0:
ENDBR64
RET | /* func0(std::tuple<int, int, int, int, int>) */
void func0(tuple param_1)
{
return;
} |
3,262 | func0 |
#include <tuple>
#include <cassert>
| std::tuple<> func0(std::tuple<int, int, int, int, int> test_tup) {
std::tuple<> empty_tuple;
return empty_tuple;
}
| int main() {
assert(func0(std::make_tuple(1, 5, 3, 6, 8)) == std::make_tuple());
assert(func0(std::make_tuple(2, 1, 4, 5, 6)) == std::make_tuple());
assert(func0(std::make_tuple(3, 2, 5, 6, 8)) == std::make_tuple());
return 0;
}
| O2 | cpp | func0(std::tuple<int, int, int, int, int>):
endbr64
xor %eax,%eax
retq
nopw 0x0(%rax,%rax,1)
| _Z5func0St5tupleIJiiiiiEE:
endbr64
retn | void func0()
{
;
} | func0:
ENDBR64
RET | /* func0(std::tuple<int, int, int, int, int>) */
void func0(tuple param_1)
{
return;
} |
3,263 | func0 |
#include <tuple>
#include <cassert>
| std::tuple<> func0(std::tuple<int, int, int, int, int> test_tup) {
std::tuple<> empty_tuple;
return empty_tuple;
}
| int main() {
assert(func0(std::make_tuple(1, 5, 3, 6, 8)) == std::make_tuple());
assert(func0(std::make_tuple(2, 1, 4, 5, 6)) == std::make_tuple());
assert(func0(std::make_tuple(3, 2, 5, 6, 8)) == std::make_tuple());
return 0;
}
| O3 | cpp | func0(std::tuple<int, int, int, int, int>):
endbr64
xor %eax,%eax
retq
nopw 0x0(%rax,%rax,1)
| _Z5func0St5tupleIJiiiiiEE:
endbr64
retn | void func0()
{
;
} | func0:
ENDBR64
RET | /* func0(std::tuple<int, int, int, int, int>) */
void func0(tuple param_1)
{
return;
} |
3,264 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& nums, int m, int n) {
std::vector<int> result;
for (int num : nums) {
if (num % m == 0 || num % n == 0) {
result.push_back(num);
}
}
return result;
}
| int main() {
assert((func0({19, 65, 57, 39, 152, 639, 121, 44, 90, 190}, 19, 13) == std::vector<int>{19, 65, 57, 39, 152, 190}));
assert((func0({1, 2, 3, 5, 7, 8, 10}, 2, 5) == std::vector<int>{2, 5, 8, 10}));
assert((func0({10, 15, 14, 13, 18, 12, 20}, 10, 5) == std::vector<int>{10, 15, 20}));
retu... | O0 | cpp | func0(std::vector<int, std::allocator<int> > const&, int, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x58,%rsp
mov %rdi,-0x48(%rbp)
mov %rsi,-0x50(%rbp)
mov %edx,-0x54(%rbp)
mov %ecx,-0x58(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x48(%rbp),%rax
mov ... | _Z5func0RKSt6vectorIiSaIiEEii:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 58h
mov [rbp+var_48], rdi
mov [rbp+var_50], rsi
mov [rbp+var_54], edx
mov [rbp+var_58], ecx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_48]
mov rdi, rax
call _ZNSt... | long long func0(long long a1, long long a2, int a3, int a4)
{
int v7; // [rsp+2Ch] [rbp-34h] BYREF
long long v8; // [rsp+30h] [rbp-30h] BYREF
_QWORD v9[4]; // [rsp+38h] [rbp-28h] BYREF
v9[2] = __readfsqword(0x28u);
std::vector<int>::vector(a1);
v9[1] = a2;
v8 = std::vector<int>::begin(a2);
v9[0] = std... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RBP + -0x48],RDI
MOV qword ptr [RBP + -0x50],RSI
MOV dword ptr [RBP + -0x54],EDX
MOV dword ptr [RBP + -0x58],ECX
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 0x00101acc
MO... | /* func0(std::vector<int, std::allocator<int> > const&, int, int) */
vector * func0(vector *param_1,int param_2,int param_3)
{
bool bVar1;
int *piVar2;
int in_ECX;
int4 in_register_00000034;
long in_FS_OFFSET;
int local_3c;
int8 local_38;
int8 local_30;
vector<int,std::allocator<int>> *local_28;
l... |
3,265 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& nums, int m, int n) {
std::vector<int> result;
for (int num : nums) {
if (num % m == 0 || num % n == 0) {
result.push_back(num);
}
}
return result;
}
| int main() {
assert((func0({19, 65, 57, 39, 152, 639, 121, 44, 90, 190}, 19, 13) == std::vector<int>{19, 65, 57, 39, 152, 190}));
assert((func0({1, 2, 3, 5, 7, 8, 10}, 2, 5) == std::vector<int>{2, 5, 8, 10}));
assert((func0({10, 15, 14, 13, 18, 12, 20}, 10, 5) == std::vector<int>{10, 15, 20}));
retu... | O1 | cpp | func0(std::vector<int, std::allocator<int> > const&, int, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %rdi,%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),%rb... | _Z5func0RKSt6vectorIiSaIiEEii:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 18h
mov rbp, rdi
mov rax, fs:28h
mov [rsp+48h+var_40], rax
xor eax, eax
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
mov rbx, [rsi]
mo... | _QWORD * func0(_QWORD *a1, int **a2, int a3, int a4)
{
int *v4; // rbx
int *v5; // r14
_DWORD *v8; // rsi
int v9; // ecx
int v11; // [rsp+4h] [rbp-44h] BYREF
unsigned long long v12; // [rsp+8h] [rbp-40h]
v12 = __readfsqword(0x28u);
*a1 = 0LL;
a1[1] = 0LL;
a1[2] = 0LL;
v4 = *a2;
v5 = a2[1];
if... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
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 R14,qword ptr [RSI + 0x8]
CMP R14,RBX
JZ 0x... | /* func0(std::vector<int, std::allocator<int> > const&, int, int) */
vector * func0(vector *param_1,int param_2,int param_3)
{
int *piVar1;
int *piVar2;
int in_ECX;
int *piVar3;
int4 in_register_00000034;
long in_FS_OFFSET;
int local_44;
long local_40;
local_40 = *(long *)(in_FS_OFFSET + 0x28);
... |
3,266 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& nums, int m, int n) {
std::vector<int> result;
for (int num : nums) {
if (num % m == 0 || num % n == 0) {
result.push_back(num);
}
}
return result;
}
| int main() {
assert((func0({19, 65, 57, 39, 152, 639, 121, 44, 90, 190}, 19, 13) == std::vector<int>{19, 65, 57, 39, 152, 190}));
assert((func0({1, 2, 3, 5, 7, 8, 10}, 2, 5) == std::vector<int>{2, 5, 8, 10}));
assert((func0({10, 15, 14, 13, 18, 12, 20}, 10, 5) == std::vector<int>{10, 15, 20}));
retu... | O2 | cpp | func0(std::vector<int, std::allocator<int> > const&, int, int):
endbr64
push %r15
push %r14
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),%rb... | _Z5func0RKSt6vectorIiSaIiEEii:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 18h
mov rax, fs:28h
mov [rsp+48h+var_40], rax
xor eax, eax
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
mov rbx, [rsi]
mov ... | long long func0(long long a1, int **a2, int a3, int a4)
{
int *v4; // rbx
int *v5; // r14
_DWORD *v8; // rsi
int v10; // [rsp+0h] [rbp-44h] BYREF
unsigned long long v11; // [rsp+4h] [rbp-40h]
v11 = __readfsqword(0x28u);
*(_QWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
v4 = *a2;
v5 = a2[1];
if ( ... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x18
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
MOV RBX,qword ptr [RSI]
MOV R14,qword ptr [RSI + 0x8]
CMP R14,RBX
JZ 0x001016f0
... | /* func0(std::vector<int, std::allocator<int> > const&, int, int) */
vector * func0(vector *param_1,int param_2,int param_3)
{
int *piVar1;
int *piVar2;
int in_ECX;
int *piVar3;
int4 in_register_00000034;
long in_FS_OFFSET;
int local_44;
long local_40;
local_40 = *(long *)(in_FS_OFFSET + 0x28);
... |
3,267 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& nums, int m, int n) {
std::vector<int> result;
for (int num : nums) {
if (num % m == 0 || num % n == 0) {
result.push_back(num);
}
}
return result;
}
| int main() {
assert((func0({19, 65, 57, 39, 152, 639, 121, 44, 90, 190}, 19, 13) == std::vector<int>{19, 65, 57, 39, 152, 190}));
assert((func0({1, 2, 3, 5, 7, 8, 10}, 2, 5) == std::vector<int>{2, 5, 8, 10}));
assert((func0({10, 15, 14, 13, 18, 12, 20}, 10, 5) == std::vector<int>{10, 15, 20}));
retu... | O3 | cpp | func0(std::vector<int, std::allocator<int> > const&, int, int):
endbr64
push %r15
pxor %xmm0,%xmm0
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,0x10(%rdi)
movups %xmm0,(%rdi)
mov (%rsi),%rbx
... | _Z5func0RKSt6vectorIiSaIiEEii:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 18h
mov rax, fs:28h
mov [rsp+48h+var_40], rax
xor eax, eax
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
mov rbx, [rsi]
mov ... | long long func0(long long a1, int **a2, int a3, int a4)
{
int *v4; // rbx
int *v5; // r14
_DWORD *v8; // rsi
int v10; // [rsp+0h] [rbp-44h] BYREF
unsigned long long v11; // [rsp+4h] [rbp-40h]
v11 = __readfsqword(0x28u);
*(_QWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
v4 = *a2;
v5 = a2[1];
if ( ... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x18
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
MOV RBX,qword ptr [RSI]
MOV R14,qword ptr [RSI + 0x8]
CMP R14,RBX
JZ 0x001016f0
... | /* func0(std::vector<int, std::allocator<int> > const&, int, int) */
vector * func0(vector *param_1,int param_2,int param_3)
{
int *piVar1;
int *piVar2;
int in_ECX;
int *piVar3;
int4 in_register_00000034;
long in_FS_OFFSET;
int local_44;
long local_40;
local_40 = *(long *)(in_FS_OFFSET + 0x28);
... |
3,268 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| int func0(const std::string& str) {
int lower_ctr = 0;
for (int i = 0; i < str.length(); i++) {
if (str[i] >= 'a' and str[i] <= 'z') {
lower_ctr++;
}
}
return lower_ctr;
}
| int main() {
assert(func0("abc") == 3);
assert(func0("string") == 6);
assert(func0("Python") == 5);
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 $0x28,%rsp
mov %rdi,-0x28(%rbp)
movl $0x0,-0x18(%rbp)
movl $0x0,-0x14(%rbp)
mov -0x14(%rbp),%eax
movslq %eax,%rbx
mov -0x28(%rbp),%rax
mov %rax,%rdi
call... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 28h
mov [rbp+var_28], rdi
mov [rbp+var_18], 0
mov [rbp+var_14], 0
jmp short loc_13BA
loc_136A:
mov eax, [rbp+var_14]
movsxd rdx, eax
mov rax, [rbp+var_28]
mov rsi, r... | long long func0(long long a1)
{
unsigned int v3; // [rsp+18h] [rbp-18h]
int i; // [rsp+1Ch] [rbp-14h]
v3 = 0;
for ( i = 0; i < (unsigned long long)std::string::length(a1); ++i )
{
if ( *(char *)std::string::operator[](a1, i) > 96 && *(char *)std::string::operator[](a1, i) <= 122 )
++v3;
}
retu... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x28],RDI
MOV dword ptr [RBP + -0x18],0x0
MOV dword ptr [RBP + -0x14],0x0
JMP 0x001013ba
LAB_0010136a:
MOV EAX,dword ptr [RBP + -0x14]
MOVSXD RDX,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,RDX
MOV RDI,RAX
CALL 0x001011e0
MOVZX EAX,byte ptr... | /* func0(std::string const&) */
int func0(string *param_1)
{
bool bVar1;
char *pcVar2;
ulong uVar3;
int4 local_20;
int4 local_1c;
local_20 = 0;
local_1c = 0;
do {
uVar3 = std::string::length();
if (uVar3 <= (ulong)(long)local_1c) {
return local_20;
}
pcVar2 = (char *)std::stri... |
3,269 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| int func0(const std::string& str) {
int lower_ctr = 0;
for (int i = 0; i < str.length(); i++) {
if (str[i] >= 'a' and str[i] <= 'z') {
lower_ctr++;
}
}
return lower_ctr;
}
| int main() {
assert(func0("abc") == 3);
assert(func0("string") == 6);
assert(func0("Python") == 5);
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
mov 0x8(%rdi),%rsi
test %rsi,%rsi
je 1259 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x30>
mov (%rdi),%rax
add %rax,%rsi
mov $0x0,%ecx
movzbl (%rax),%edi
lea -0x61(%rdi),%edx
... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
mov rsi, [rdi+8]
test rsi, rsi
jz short loc_1239
mov rax, [rdi]
add rsi, rax
mov ecx, 0
loc_1221:
movzx edi, byte ptr [rax]
lea edx, [rdi-61h]
cmp dl, 1Ah
adc ecx, 0
add rax, 1
cmp rsi, rax
jnz shor... | long long func0(_QWORD *a1)
{
long long v1; // rsi
_BYTE *v2; // rax
_BYTE *v3; // rsi
unsigned int v4; // ecx
v1 = a1[1];
if ( v1 )
{
v2 = (_BYTE *)*a1;
v3 = (_BYTE *)(*a1 + v1);
v4 = 0;
do
v4 += (unsigned __int8)(*v2++ - 97) < 0x1Au;
while ( v3 != v2 );
}
else
{
ret... | func0:
ENDBR64
MOV RSI,qword ptr [RDI + 0x8]
TEST RSI,RSI
JZ 0x00101239
MOV RAX,qword ptr [RDI]
ADD RSI,RAX
MOV ECX,0x0
LAB_00101221:
MOVZX EDI,byte ptr [RAX]
LEA EDX,[RDI + -0x61]
CMP DL,0x1a
ADC ECX,0x0
ADD RAX,0x1
CMP RSI,RAX
JNZ 0x00101221
LAB_00101236:
MOV EAX,ECX
RET
LAB_00101239:
MOV ECX,0x0
JMP 0x00101236 | /* func0(std::string const&) */
int func0(string *param_1)
{
char *pcVar1;
int iVar2;
char *pcVar3;
if (*(long *)(param_1 + 8) == 0) {
iVar2 = 0;
}
else {
pcVar1 = *(char **)param_1;
pcVar3 = pcVar1 + *(long *)(param_1 + 8);
iVar2 = 0;
do {
iVar2 = iVar2 + (uint)((byte)(*pcVar... |
3,270 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| int func0(const std::string& str) {
int lower_ctr = 0;
for (int i = 0; i < str.length(); i++) {
if (str[i] >= 'a' and str[i] <= 'z') {
lower_ctr++;
}
}
return lower_ctr;
}
| int main() {
assert(func0("abc") == 3);
assert(func0("string") == 6);
assert(func0("Python") == 5);
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
mov 0x8(%rdi),%rcx
test %rcx,%rcx
je 1490 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x40>
mov (%rdi),%rax
xor %r8d,%r8d
add %rax,%rcx
nopw %cs:0x0(%rax,%rax,1)
movzbl (%rax),%... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
mov rsi, [rdi+8]
test rsi, rsi
jz short loc_1360
mov rax, [rdi]
xor ecx, ecx
add rsi, rax
nop dword ptr [rax]
loc_1348:
movzx edi, byte ptr [rax]
lea edx, [rdi-61h]
cmp dl, 1Ah
adc ecx, 0
add rax, 1
cmp... | long long func0(_QWORD *a1)
{
long long v1; // rsi
_BYTE *v2; // rax
unsigned int v3; // ecx
_BYTE *v4; // rsi
v1 = a1[1];
if ( !v1 )
return 0LL;
v2 = (_BYTE *)*a1;
v3 = 0;
v4 = (_BYTE *)(*a1 + v1);
do
v3 += (unsigned __int8)(*v2++ - 97) < 0x1Au;
while ( v4 != v2 );
return v3;
} | func0:
ENDBR64
MOV RSI,qword ptr [RDI + 0x8]
TEST RSI,RSI
JZ 0x00101360
MOV RAX,qword ptr [RDI]
XOR ECX,ECX
ADD RSI,RAX
NOP dword ptr [RAX]
LAB_00101348:
MOVZX EDI,byte ptr [RAX]
LEA EDX,[RDI + -0x61]
CMP DL,0x1a
ADC ECX,0x0
ADD RAX,0x1
CMP RSI,RAX
JNZ 0x00101348
MOV EAX,ECX
RET
LAB_00101360:
XOR ECX,ECX
MOV EAX,ECX
RE... | /* func0(std::string const&) */
int func0(string *param_1)
{
char *pcVar1;
int iVar2;
char *pcVar3;
if (*(long *)(param_1 + 8) != 0) {
pcVar1 = *(char **)param_1;
iVar2 = 0;
pcVar3 = pcVar1 + *(long *)(param_1 + 8);
do {
iVar2 = iVar2 + (uint)((byte)(*pcVar1 + 0x9fU) < 0x1a);
pc... |
3,271 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| int func0(const std::string& str) {
int lower_ctr = 0;
for (int i = 0; i < str.length(); i++) {
if (str[i] >= 'a' and str[i] <= 'z') {
lower_ctr++;
}
}
return lower_ctr;
}
| int main() {
assert(func0("abc") == 3);
assert(func0("string") == 6);
assert(func0("Python") == 5);
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
mov 0x8(%rdi),%rdx
test %rdx,%rdx
je 1e10 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x290>
lea -0x1(%rdx),%rax
mov (%rdi),%rcx
cmp $0xe,%rax
jbe 1e13 <_Z5func0RKNSt7__cxx1112... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
mov rcx, [rdi+8]
test rcx, rcx
jz loc_1C80
lea rax, [rcx-1]
mov rsi, [rdi]
cmp rax, 0Eh
jbe loc_1C83
mov rdx, rcx
pxor xmm1, xmm1
pxor xmm3, xmm3
mov rax, rsi
and rdx, 0FFFFFFFFFFFFFFF0h
movdqa xmm6, c... | long long func0(const __m128i **a1)
{
const __m128i *v1; // rcx
const __m128i *v2; // rsi
__m128i v3; // xmm1
const __m128i *v4; // rax
unsigned long long v5; // rdx
__m128i si128; // xmm6
__m128i v7; // xmm5
__m128i v8; // xmm2
__m128i v9; // xmm0
__m128i v10; // xmm7
__m128i v11; // xmm2
__m1... | func0:
ENDBR64
MOV RCX,qword ptr [RDI + 0x8]
TEST RCX,RCX
JZ 0x00101c80
LEA RAX,[RCX + -0x1]
MOV RSI,qword ptr [RDI]
CMP RAX,0xe
JBE 0x00101c83
MOV RDX,RCX
PXOR XMM1,XMM1
PXOR XMM3,XMM3
MOV RAX,RSI
AND RDX,-0x10
MOVDQA XMM6,xmmword ptr [0x001020c0]
MOVDQA XMM5,xmmword ptr [0x001020d0]
PXOR XMM4,XMM4
LEA RDI,[RDX + RSI*... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(std::string const&) */
int func0(string *param_1)
{
ulong uVar1;
char *pcVar2;
bool bVar3;
bool bVar4;
bool bVar5;
bool bVar6;
bool bVar7;
bool bVar8;
bool bVar9;
bool bVar10;
bool bVar11;
bool bVar12... |
3,272 | func0 |
#include <vector>
#include <cassert>
| std::pair<std::vector<int>, std::vector<int>> func0(const std::vector<int>& lists) {
std::vector<int> elements;
std::vector<int> frequencies;
if (lists.empty()) {
return std::make_pair(elements, frequencies);
}
int running_count = 1;
for (size_t i = 0; i < lists.size() - 1; ++i) {... | int main() {
assert((func0({1,2,2,2,4,4,4,5,5,5,5}) == std::make_pair(std::vector<int>{1, 2, 4, 5}, std::vector<int>{1, 3, 3, 4})));
assert((func0({2,2,3,1,2,6,7,9}) == std::make_pair(std::vector<int>{2, 3, 1, 2, 6, 7, 9}, std::vector<int>{2, 1, 1, 1, 1, 1, 1})));
assert((func0({2,1,5,6,8,3,4,9,10,11,8,1... | O0 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x68,%rsp
mov %rdi,-0x68(%rbp)
mov %rsi,-0x70(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x50(%rbp),%rax
mov %rax,%rdi
callq 1f66 <_ZNSt6vectorIiSaIiEEC1Ev>
lea -0... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 68h
mov [rbp+var_68], rdi
mov [rbp+var_70], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_50]
mov rdi, rax
call _ZNSt6vectorIiSaIiEEC2Ev; std::vector<int>::vector(void)
le... | long long func0(long long a1, long long a2)
{
int v2; // ebx
long long v3; // rax
long long v4; // rax
long long v5; // rax
long long v6; // rax
int v8; // [rsp+14h] [rbp-5Ch] BYREF
unsigned long long i; // [rsp+18h] [rbp-58h]
_BYTE v10[32]; // [rsp+20h] [rbp-50h] BYREF
_BYTE v11[24]; // [rsp+40h] [r... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x68
MOV qword ptr [RBP + -0x68],RDI
MOV qword ptr [RBP + -0x70],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x50]
MOV RDI,RAX
CALL 0x00102002
LEA RAX,[RBP + -0x30]
MOV RDI,RAX
CALL 0x00102002
MOV RAX,qword ptr [RBP + -... | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
int iVar1;
char cVar2;
long lVar3;
int *piVar4;
vector<int,std::allocator<int>> *in_RSI;
long in_FS_OFFSET;
int local_64;
ulong local_60;
vector<int,std::allocator<int>> local_58 [32];
vector<int,std::allo... |
3,273 | func0 |
#include <vector>
#include <cassert>
| std::pair<std::vector<int>, std::vector<int>> func0(const std::vector<int>& lists) {
std::vector<int> elements;
std::vector<int> frequencies;
if (lists.empty()) {
return std::make_pair(elements, frequencies);
}
int running_count = 1;
for (size_t i = 0; i < lists.size() - 1; ++i) {... | int main() {
assert((func0({1,2,2,2,4,4,4,5,5,5,5}) == std::make_pair(std::vector<int>{1, 2, 4, 5}, std::vector<int>{1, 3, 3, 4})));
assert((func0({2,2,3,1,2,6,7,9}) == std::make_pair(std::vector<int>{2, 3, 1, 2, 6, 7, 9}, std::vector<int>{2, 1, 1, 1, 1, 1, 1})));
assert((func0({2,1,5,6,8,3,4,9,10,11,8,1... | O1 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x50,%rsp
mov %rdi,%r12
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
movq $0x0,0x10(%rsp)
movq $0x0,0x18(%rsp)
movq $0x0,0x20(%rsp)
movq $0x0,0x30(%rsp)
movq $0x... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 50h
mov r12, rdi
mov rax, fs:28h
mov [rsp+78h+var_30], rax
xor eax, eax
mov [rsp+78h+src], 0
mov [rsp+78h+var_60], 0
mov [rsp+78h+var_58], 0
mov [rsp+78h+var_48], 0
mov [rsp+... | _QWORD * func0(_QWORD *a1, long long *a2)
{
long long v2; // rdx
unsigned long long v4; // rbx
int *v5; // rsi
_DWORD *v6; // r14
char *v7; // rsi
int v8; // ecx
long long v9; // r14
int *v10; // rax
int *v11; // rsi
_DWORD *v12; // rdx
char *v13; // rsi
char *v14; // rbp
signed long long v15;... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x50
MOV R12,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
MOV qword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x0
MOV qword ptr [RSP + 0x30],0x0
MOV qword ptr [RSP + 0x38],0x0
MOV qword... | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
long lVar1;
int4 *puVar2;
int4 *puVar3;
int8 uVar4;
ulong uVar5;
long *in_RSI;
long lVar6;
long in_FS_OFFSET;
int local_6c;
int4 *local_68;
int *local_60;
int *local_58;
int4 *local_48;
int *local_... |
3,274 | func0 |
#include <vector>
#include <cassert>
| std::pair<std::vector<int>, std::vector<int>> func0(const std::vector<int>& lists) {
std::vector<int> elements;
std::vector<int> frequencies;
if (lists.empty()) {
return std::make_pair(elements, frequencies);
}
int running_count = 1;
for (size_t i = 0; i < lists.size() - 1; ++i) {... | int main() {
assert((func0({1,2,2,2,4,4,4,5,5,5,5}) == std::make_pair(std::vector<int>{1, 2, 4, 5}, std::vector<int>{1, 3, 3, 4})));
assert((func0({2,2,3,1,2,6,7,9}) == std::make_pair(std::vector<int>{2, 3, 1, 2, 6, 7, 9}, std::vector<int>{2, 1, 1, 1, 1, 1, 1})));
assert((func0({2,1,5,6,8,3,4,9,10,11,8,1... | O2 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x50,%rsp
mov 0x8(%rsi),%r8
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
mov (%rsi),%rax
movq $0x0,0x10(%rsp)
movq $0x0,0x18(%rsp)
movq $0x0,0x20... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
mov r13, rdi
push r12
push rbp
push rbx
sub rsp, 58h
mov rdx, [rsi+8]
mov rax, fs:28h
mov [rsp+88h+var_40], rax
xor eax, eax
mov rax, [rsi]
movaps xmmword ptr [rsp+88h+src], xmm0
mov [rs... | long long func0(long long a1, long long *a2)
{
long long v3; // rdx
long long v4; // rax
char *v6; // rdi
char *v7; // rsi
unsigned long long v8; // rbp
long long v9; // rdx
long long v10; // rbx
_DWORD *v11; // rsi
_DWORD *v12; // rdx
char *v13; // rsi
_DWORD *v14; // rsi
_DWORD *v15; // rdx
... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
MOV R13,RDI
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x58
MOV RDX,qword ptr [RSI + 0x8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RSI]
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOV qword ptr [RSP + 0x20],0x0
MOV qword ptr [RSP... | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
int8 __src;
int8 __src_00;
long lVar1;
int4 *puVar2;
long lVar3;
ulong uVar4;
long *in_RSI;
int *piVar5;
int *piVar6;
long in_FS_OFFSET;
int local_7c;
int local_78 [16];
int *local_68;
int local_58... |
3,275 | func0 |
#include <vector>
#include <cassert>
| std::pair<std::vector<int>, std::vector<int>> func0(const std::vector<int>& lists) {
std::vector<int> elements;
std::vector<int> frequencies;
if (lists.empty()) {
return std::make_pair(elements, frequencies);
}
int running_count = 1;
for (size_t i = 0; i < lists.size() - 1; ++i) {... | int main() {
assert((func0({1,2,2,2,4,4,4,5,5,5,5}) == std::make_pair(std::vector<int>{1, 2, 4, 5}, std::vector<int>{1, 3, 3, 4})));
assert((func0({2,2,3,1,2,6,7,9}) == std::make_pair(std::vector<int>{2, 3, 1, 2, 6, 7, 9}, std::vector<int>{2, 1, 1, 1, 1, 1, 1})));
assert((func0({2,1,5,6,8,3,4,9,10,11,8,1... | O3 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r14
pxor %xmm0,%xmm0
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x50,%rsp
mov 0x8(%rsi),%r9
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
mov (%rsi),%rax
movaps %xmm0,0x10(%rsp)
movq $0x0,0x20(%r... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
mov r12, rdi
push rbp
push rbx
sub rsp, 58h
mov r8, [rsi+8]
mov rax, fs:28h
mov [rsp+88h+var_40], rax
xor eax, eax
mov rax, [rsi]
movaps xmmword ptr [rsp+88h+src], xmm0
mov [rsp... | long long func0(long long a1, long long *a2, long long a3, long long a4)
{
long long v5; // r8
long long v6; // rax
_DWORD *v8; // r9
_DWORD *v9; // rsi
unsigned long long v10; // rbp
long long v11; // rdi
long long v12; // rbx
_DWORD *v13; // rdx
char *v14; // rsi
_DWORD *v15; // rdx
char *v16; ... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
MOV R12,RDI
PUSH RBP
PUSH RBX
SUB RSP,0x58
MOV R8,qword ptr [RSI + 0x8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RSI]
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOV qword ptr [RSP + 0x20],0x0
MOV qword ptr [RSP ... | /* func0(std::vector<int, std::allocator<int> > const&) */
vector * func0(vector *param_1)
{
int8 __src;
int8 __src_00;
long lVar1;
int4 *puVar2;
ulong uVar3;
long *in_RSI;
int *piVar4;
int *piVar5;
long lVar6;
long lVar7;
long in_FS_OFFSET;
int local_7c;
int local_78 [16];
int *local_68;
... |
3,276 | func0 |
#include <assert.h>
| bool func0(int monthnum1) {
if (monthnum1 == 2) {
return true;
} else {
return false;
}
}
| int main() {
assert(func0(2) == true);
assert(func0(1) == false);
assert(func0(3) == false);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x4(%rbp)
cmpl $0x2,-0x4(%rbp)
jne 1161 <_Z5func0i+0x18>
mov $0x1,%eax
jmp 1166 <_Z5func0i+0x1d>
mov $0x0,%eax
pop %rbp
retq
| _Z5func0i:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
cmp [rbp+var_4], 2
jnz short loc_1161
mov eax, 1
jmp short loc_1166
loc_1161:
mov eax, 0
loc_1166:
pop rbp
retn | _BOOL8 func0(int a1)
{
return a1 == 2;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
CMP dword ptr [RBP + -0x4],0x2
JNZ 0x00101161
MOV EAX,0x1
JMP 0x00101166
LAB_00101161:
MOV EAX,0x0
LAB_00101166:
POP RBP
RET | /* func0(int) */
bool func0(int param_1)
{
return param_1 == 2;
} |
3,277 | func0 |
#include <assert.h>
| bool func0(int monthnum1) {
if (monthnum1 == 2) {
return true;
} else {
return false;
}
}
| int main() {
assert(func0(2) == true);
assert(func0(1) == false);
assert(func0(3) == false);
return 0;
}
| O1 | cpp | func0(int):
endbr64
cmp $0x2,%edi
sete %al
retq
| _Z5func0i:
endbr64
cmp edi, 2
setz al
retn | bool func0(int a1)
{
return a1 == 2;
} | func0:
ENDBR64
CMP EDI,0x2
SETZ AL
RET | /* func0(int) */
bool func0(int param_1)
{
return param_1 == 2;
} |
3,278 | func0 |
#include <assert.h>
| bool func0(int monthnum1) {
if (monthnum1 == 2) {
return true;
} else {
return false;
}
}
| int main() {
assert(func0(2) == true);
assert(func0(1) == false);
assert(func0(3) == false);
return 0;
}
| O2 | cpp | func0(int):
endbr64
cmp $0x2,%edi
sete %al
retq
nopl 0x0(%rax,%rax,1)
| _Z5func0i:
endbr64
cmp edi, 2
setz al
retn | bool func0(int a1)
{
return a1 == 2;
} | func0:
ENDBR64
CMP EDI,0x2
SETZ AL
RET | /* func0(int) */
bool func0(int param_1)
{
return param_1 == 2;
} |
3,279 | func0 |
#include <assert.h>
| bool func0(int monthnum1) {
if (monthnum1 == 2) {
return true;
} else {
return false;
}
}
| int main() {
assert(func0(2) == true);
assert(func0(1) == false);
assert(func0(3) == false);
return 0;
}
| O3 | cpp | func0(int):
endbr64
cmp $0x2,%edi
sete %al
retq
nopl 0x0(%rax,%rax,1)
| _Z5func0i:
endbr64
cmp edi, 2
setz al
retn | bool func0(int a1)
{
return a1 == 2;
} | func0:
ENDBR64
CMP EDI,0x2
SETZ AL
RET | /* func0(int) */
bool func0(int param_1)
{
return param_1 == 2;
} |
3,280 | func0 | #include <cassert>
#include <map>
#include <string>
| std::map<std::string, std::string> func0(const std::map<std::string, std::string>& dict1,
const std::map<std::string, std::string>& dict2) {
std::map<std::string, std::string> merged_dict;
for (const auto &pair : dict1) {
merged_dict.insert(pair)... | int main() {
{
std::map<std::string, std::string> d1 = { {"R", "Red"}, {"B", "Black"}, {"P", "Pink"} };
std::map<std::string, std::string> d2 = { {"G", "Green"}, {"W", "White"} };
std::map<std::string, std::string> expected = { {"B", "Black"}, {"G", "Green"}, {"P", "Pink"}, {"R", "Red"},... | O0 | cpp | func0(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_strin... | _Z5func0RKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEESE_:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 78h
mov [rbp+var_68], rdi
mov [rbp+var_70], rsi
mov [rbp+var_78], rdx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov... | long long func0(long long a1, long long a2, long long a3)
{
long long v5; // [rsp+28h] [rbp-58h] BYREF
long long v6; // [rsp+30h] [rbp-50h] BYREF
long long v7; // [rsp+38h] [rbp-48h] BYREF
_QWORD v8[2]; // [rsp+40h] [rbp-40h] BYREF
long long v9; // [rsp+50h] [rbp-30h]
long long v10; // [rsp+58h] [rbp-28h]
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x78
MOV qword ptr [RBP + -0x68],RDI
MOV qword ptr [RBP + -0x70],RSI
MOV qword ptr [RBP + -0x78],RDX
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 0x00103adc
MOV RAX,qword ptr [RBP + -0x70]
MO... | /* func0(std::map<std::string, std::string, std::less<std::string >,
std::allocator<std::pair<std::string const, std::string > > > const&, std::map<std::string,
std::string, std::less<std::string >, std::allocator<std::pair<std::string const, std::string > >
> const&) */
map * func0(map *param_1,map *param_2)... |
3,281 | func0 | #include <cassert>
#include <map>
#include <string>
| std::map<std::string, std::string> func0(const std::map<std::string, std::string>& dict1,
const std::map<std::string, std::string>& dict2) {
std::map<std::string, std::string> merged_dict;
for (const auto &pair : dict1) {
merged_dict.insert(pair)... | int main() {
{
std::map<std::string, std::string> d1 = { {"R", "Red"}, {"B", "Black"}, {"P", "Pink"} };
std::map<std::string, std::string> d2 = { {"G", "Green"}, {"W", "White"} };
std::map<std::string, std::string> expected = { {"B", "Black"}, {"G", "Green"}, {"P", "Pink"}, {"R", "Red"},... | O1 | cpp | func0(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_strin... | _Z5func0RKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEESE_:
endbr64
push r14
push r13
push r12
push rbp
push rbx
mov r12, rdi
mov r14, rdx
mov dword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
lea r13, [rdi+8]
mov [rdi+18h], r13
mov ... | long long func0(long long a1, long long a2, long long a3)
{
long long i; // rbx
long long v5; // rbx
long long j; // r14
*(_DWORD *)(a1 + 8) = 0;
*(_QWORD *)(a1 + 16) = 0LL;
*(_QWORD *)(a1 + 24) = a1 + 8;
*(_QWORD *)(a1 + 32) = a1 + 8;
*(_QWORD *)(a1 + 40) = 0LL;
for ( i = *(_QWORD *)(a2 + 24); a2 +... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV R12,RDI
MOV R14,RDX
MOV dword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
LEA R13,[RDI + 0x8]
MOV qword ptr [RDI + 0x18],R13
MOV qword ptr [RDI + 0x20],R13
MOV qword ptr [RDI + 0x28],0x0
MOV RBX,qword ptr [RSI + 0x18]
LEA RBP,[RSI + 0x8]
CMP RBP,RBX... | /* func0(std::map<std::string, std::string, std::less<std::string >,
std::allocator<std::pair<std::string const, std::string > > > const&, std::map<std::string,
std::string, std::less<std::string >, std::allocator<std::pair<std::string const, std::string > >
> const&) */
map * func0(map *param_1,map *param_2)... |
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.