index int64 0 66.5k | func_name stringlengths 2 5.36k | func_dep stringlengths 16 2.19k | func stringlengths 8 55.3k | test stringlengths 0 7.07k | opt stringclasses 4
values | language stringclasses 2
values | asm stringlengths 0 45.4k | ida_asm stringlengths 0 44.7k | ida_pseudo stringlengths 0 44.3k | ghidra_asm stringlengths 0 49.1k | ghidra_pseudo stringlengths 0 64.7k |
|---|---|---|---|---|---|---|---|---|---|---|---|
1,082 | func0 |
#include <assert.h>
| long long func0(int n) {
long long sum = 0;
for (int i = 1; i <= n; i++) {
int j = 2 * i;
sum += (long long)j * j * j * j * j;
}
return sum;
}
| int main() {
assert(func0(2) == 1056);
assert(func0(3) == 8832);
assert(func0(1) == 32);
return 0;
}
| O2 | cpp | func0(int):
endbr64
test %edi,%edi
jle 1180 <_Z5func0i+0x40>
lea -0x1(%rdi),%eax
mov $0x2,%edx
xor %r8d,%r8d
lea 0x4(%rax,%rax,1),%rcx
nopl 0x0(%rax,%rax,1)
mov %rdx,%rax
imul %rdx,%rax
imul %rax,%rax
imul %rdx,%rax
add $0x2,%rdx
add %rax,%r8
cmp %rcx,%rdx
jne 1160 <_Z5func0i+0x2... | _Z5func0i:
endbr64
test edi, edi
jle short loc_1180
lea esi, [rdi+1]
mov edx, 2
xor ecx, ecx
add rsi, rsi
nop dword ptr [rax]
loc_1158:
mov rax, rdx
imul rax, rdx
imul rax, rax
imul rax, rdx
add rdx, 2
add rcx, rax
cmp rdx, rsi
jnz short loc_1158
mov rax, rcx
... | long long func0(int a1)
{
long long v1; // rdx
long long v2; // rcx
long long v3; // rax
if ( a1 <= 0 )
return 0LL;
v1 = 2LL;
v2 = 0LL;
do
{
v3 = v1 * v1 * v1 * v1 * v1;
v1 += 2LL;
v2 += v3;
}
while ( v1 != 2LL * (unsigned int)(a1 + 1) );
return v2;
} | func0:
ENDBR64
TEST EDI,EDI
JLE 0x00101180
LEA ESI,[RDI + 0x1]
MOV EDX,0x2
XOR ECX,ECX
ADD RSI,RSI
NOP dword ptr [RAX]
LAB_00101158:
MOV RAX,RDX
IMUL RAX,RDX
IMUL RAX,RAX
IMUL RAX,RDX
ADD RDX,0x2
ADD RCX,RAX
CMP RDX,RSI
JNZ 0x00101158
MOV RAX,RCX
RET
LAB_00101180:
XOR ECX,ECX
MOV RAX,RCX
RET | /* func0(int) */
long func0(int param_1)
{
long lVar1;
long lVar2;
long lVar3;
if (0 < param_1) {
lVar3 = 2;
lVar2 = 0;
do {
lVar1 = lVar3 * lVar3 * lVar3 * lVar3 * lVar3;
lVar3 = lVar3 + 2;
lVar2 = lVar2 + lVar1;
} while (lVar3 != (ulong)(param_1 + 1) * 2);
return lVa... |
1,083 | func0 |
#include <assert.h>
| long long func0(int n) {
long long sum = 0;
for (int i = 1; i <= n; i++) {
int j = 2 * i;
sum += (long long)j * j * j * j * j;
}
return sum;
}
| int main() {
assert(func0(2) == 1056);
assert(func0(3) == 8832);
assert(func0(1) == 32);
return 0;
}
| O3 | cpp | func0(int):
endbr64
test %edi,%edi
jle 1180 <_Z5func0i+0x40>
lea -0x1(%rdi),%eax
mov $0x2,%edx
xor %r8d,%r8d
lea 0x4(%rax,%rax,1),%rcx
nopl 0x0(%rax,%rax,1)
mov %rdx,%rax
imul %rdx,%rax
imul %rax,%rax
imul %rdx,%rax
add $0x2,%rdx
add %rax,%r8
cmp %rdx,%rcx
jne 1160 <_Z5func0i+0x2... | _Z5func0i:
endbr64
test edi, edi
jle short loc_1180
lea esi, [rdi+1]
mov edx, 2
xor ecx, ecx
add rsi, rsi
nop dword ptr [rax]
loc_1158:
mov rax, rdx
imul rax, rdx
imul rax, rax
imul rax, rdx
add rdx, 2
add rcx, rax
cmp rsi, rdx
jnz short loc_1158
mov rax, rcx
... | long long func0(int a1)
{
long long v1; // rdx
long long v2; // rcx
long long v3; // rax
if ( a1 <= 0 )
return 0LL;
v1 = 2LL;
v2 = 0LL;
do
{
v3 = v1 * v1 * v1 * v1 * v1;
v1 += 2LL;
v2 += v3;
}
while ( 2LL * (unsigned int)(a1 + 1) != v1 );
return v2;
} | func0:
ENDBR64
TEST EDI,EDI
JLE 0x00101180
LEA ESI,[RDI + 0x1]
MOV EDX,0x2
XOR ECX,ECX
ADD RSI,RSI
NOP dword ptr [RAX]
LAB_00101158:
MOV RAX,RDX
IMUL RAX,RDX
IMUL RAX,RAX
IMUL RAX,RDX
ADD RDX,0x2
ADD RCX,RAX
CMP RSI,RDX
JNZ 0x00101158
MOV RAX,RCX
RET
LAB_00101180:
XOR ECX,ECX
MOV RAX,RCX
RET | /* func0(int) */
long func0(int param_1)
{
long lVar1;
long lVar2;
long lVar3;
if (0 < param_1) {
lVar3 = 2;
lVar2 = 0;
do {
lVar1 = lVar3 * lVar3 * lVar3 * lVar3 * lVar3;
lVar3 = lVar3 + 2;
lVar2 = lVar2 + lVar1;
} while ((ulong)(param_1 + 1) * 2 != lVar3);
return lVa... |
1,084 | func0 |
#include <vector>
#include <tuple>
#include <assert.h>
| std::vector<int> func0(const std::vector<std::tuple<int, std::string, int>>& test_list) {
std::vector<int> res;
for (const auto& lis : test_list) {
res.push_back(std::get<2>(lis));
}
return res;
}
| int main() {
std::vector<std::tuple<int, std::string, int>> input1 = {{1, "Rash", 21}, {2, "Varsha", 20}, {3, "Kil", 19}};
assert(func0(input1) == std::vector<int>({21, 20, 19}));
std::vector<std::tuple<int, std::string, int>> input2 = {{1, "Sai", 36}, {2, "Ayesha", 25}, {3, "Salman", 45}};
assert... | O0 | cpp | func0(std::vector<std::tuple<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int>, std::allocator<std::tuple<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x48,%rsp
mo... | ||||
1,085 | func0 |
#include <vector>
#include <tuple>
#include <assert.h>
| std::vector<int> func0(const std::vector<std::tuple<int, std::string, int>>& test_list) {
std::vector<int> res;
for (const auto& lis : test_list) {
res.push_back(std::get<2>(lis));
}
return res;
}
| int main() {
std::vector<std::tuple<int, std::string, int>> input1 = {{1, "Rash", 21}, {2, "Varsha", 20}, {3, "Kil", 19}};
assert(func0(input1) == std::vector<int>({21, 20, 19}));
std::vector<std::tuple<int, std::string, int>> input2 = {{1, "Sai", 36}, {2, "Ayesha", 25}, {3, "Salman", 45}};
assert... | O1 | cpp | func0(std::vector<std::tuple<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int>, std::allocator<std::tuple<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > const&):
endbr64
push %r12
push %rbp
push %rbx
mov %rdi,%rbx
movq $... | ||||
1,086 | func0 |
#include <vector>
#include <tuple>
#include <assert.h>
| std::vector<int> func0(const std::vector<std::tuple<int, std::string, int>>& test_list) {
std::vector<int> res;
for (const auto& lis : test_list) {
res.push_back(std::get<2>(lis));
}
return res;
}
| int main() {
std::vector<std::tuple<int, std::string, int>> input1 = {{1, "Rash", 21}, {2, "Varsha", 20}, {3, "Kil", 19}};
assert(func0(input1) == std::vector<int>({21, 20, 19}));
std::vector<std::tuple<int, std::string, int>> input2 = {{1, "Sai", 36}, {2, "Ayesha", 25}, {3, "Salman", 45}};
assert... | O2 | cpp | func0(std::vector<std::tuple<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int>, std::allocator<std::tuple<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > const&):
endbr64
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov (... | ||||
1,087 | func0 |
#include <vector>
#include <tuple>
#include <assert.h>
| std::vector<int> func0(const std::vector<std::tuple<int, std::string, int>>& test_list) {
std::vector<int> res;
for (const auto& lis : test_list) {
res.push_back(std::get<2>(lis));
}
return res;
}
| int main() {
std::vector<std::tuple<int, std::string, int>> input1 = {{1, "Rash", 21}, {2, "Varsha", 20}, {3, "Kil", 19}};
assert(func0(input1) == std::vector<int>({21, 20, 19}));
std::vector<std::tuple<int, std::string, int>> input2 = {{1, "Sai", 36}, {2, "Ayesha", 25}, {3, "Salman", 45}};
assert... | O3 | cpp | func0(std::vector<std::tuple<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int>, std::allocator<std::tuple<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > const&):
endbr64
push %r15
pxor %xmm0,%xmm0
push %r14
push %r13
push ... | ||||
1,088 | func0 | #include <iostream>
#include <tuple>
#include <vector>
#include <cassert>
| std::tuple<int, int, int> func0(const std::tuple<int, int, int>& test_tup1, const std::tuple<int, int, int>& test_tup2) {
int first = std::get<0>(test_tup1) - std::get<0>(test_tup2);
int second = std::get<1>(test_tup1) - std::get<1>(test_tup2);
int third = std::get<2>(test_tup1) - std::get<2>(test_tup2);... | int main() {
assert(func0(std::make_tuple(10, 4, 5), std::make_tuple(2, 5, 18)) == std::make_tuple(8, -1, -13));
assert(func0(std::make_tuple(11, 2, 3), std::make_tuple(24, 45, 16)) == std::make_tuple(-13, -43, -13));
assert(func0(std::make_tuple(7, 18, 9), std::make_tuple(10, 11, 12)) == std::make_tuple... | O0 | cpp | func0(std::tuple<int, int, int> const&, std::tuple<int, int, int> const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x48,%rsp
mov %rdi,-0x38(%rbp)
mov %rsi,-0x40(%rbp)
mov %rdx,-0x48(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x40(%rbp),%rax
mov %rax,%rdi
cal... | _Z5func0RKSt5tupleIJiiiEES2_:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 48h
mov [rbp+var_38], rdi
mov [rbp+var_40], rsi
mov [rbp+var_48], rdx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_40]
mov rdi, rax
call _ZSt3getILm0EJiiiEERKNSt13tuple_... | long long func0(long long a1, long long a2, long long a3)
{
int v3; // ebx
int v4; // ebx
int v5; // ebx
int v8; // [rsp+2Ch] [rbp-24h] BYREF
int v9; // [rsp+30h] [rbp-20h] BYREF
int v10; // [rsp+34h] [rbp-1Ch] BYREF
unsigned long long v11; // [rsp+38h] [rbp-18h]
v11 = __readfsqword(0x28u);
v3 = *(_... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x38],RDI
MOV qword ptr [RBP + -0x40],RSI
MOV qword ptr [RBP + -0x48],RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RDI,RAX
CALL 0x001014fd
MOV EBX,dword ptr [RAX]
MOV RAX,qw... | /* func0(std::tuple<int, int, int> const&, std::tuple<int, int, int> const&) */
tuple * func0(tuple *param_1,tuple *param_2)
{
int iVar1;
type *ptVar2;
type *ptVar3;
type *ptVar4;
tuple *in_RDX;
long in_FS_OFFSET;
int local_2c;
int local_28;
int local_24;
long local_20;
local_20 = *(long *)(i... |
1,089 | func0 | #include <iostream>
#include <tuple>
#include <vector>
#include <cassert>
| std::tuple<int, int, int> func0(const std::tuple<int, int, int>& test_tup1, const std::tuple<int, int, int>& test_tup2) {
int first = std::get<0>(test_tup1) - std::get<0>(test_tup2);
int second = std::get<1>(test_tup1) - std::get<1>(test_tup2);
int third = std::get<2>(test_tup1) - std::get<2>(test_tup2);... | int main() {
assert(func0(std::make_tuple(10, 4, 5), std::make_tuple(2, 5, 18)) == std::make_tuple(8, -1, -13));
assert(func0(std::make_tuple(11, 2, 3), std::make_tuple(24, 45, 16)) == std::make_tuple(-13, -43, -13));
assert(func0(std::make_tuple(7, 18, 9), std::make_tuple(10, 11, 12)) == std::make_tuple... | O1 | cpp | func0(std::tuple<int, int, int> const&, std::tuple<int, int, int> const&):
endbr64
mov %rdi,%rax
mov 0x8(%rsi),%ecx
sub 0x8(%rdx),%ecx
mov 0x4(%rsi),%edi
sub 0x4(%rdx),%edi
mov (%rsi),%esi
sub (%rdx),%esi
mov %esi,(%rax)
mov %edi,0x4(%rax)
mov %ecx,0x8(%rax)
retq
| _Z5func0RKSt5tupleIJiiiEES2_:
endbr64
mov rax, rdi
mov ecx, [rsi+8]
sub ecx, [rdx+8]
mov edi, [rsi+4]
sub edi, [rdx+4]
mov esi, [rsi]
sub esi, [rdx]
mov [rax], esi
mov [rax+4], edi
mov [rax+8], ecx
retn | _DWORD * func0(_DWORD *a1, _DWORD *a2, _DWORD *a3)
{
_DWORD *result; // rax
int v4; // ecx
int v5; // edi
result = a1;
v4 = a2[2] - a3[2];
v5 = a2[1] - a3[1];
*result = *a2 - *a3;
result[1] = v5;
result[2] = v4;
return result;
} | func0:
ENDBR64
MOV RAX,RDI
MOV ECX,dword ptr [RSI + 0x8]
SUB ECX,dword ptr [RDX + 0x8]
MOV EDI,dword ptr [RSI + 0x4]
SUB EDI,dword ptr [RDX + 0x4]
MOV ESI,dword ptr [RSI]
SUB ESI,dword ptr [RDX]
MOV dword ptr [RAX],ESI
MOV dword ptr [RAX + 0x4],EDI
MOV dword ptr [RAX + 0x8],ECX
RET | /* func0(std::tuple<int, int, int> const&, std::tuple<int, int, int> const&) */
void func0(tuple *param_1,tuple *param_2)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int *in_RDX;
iVar1 = *(int *)(param_2 + 8);
iVar2 = in_RDX[2];
iVar3 = *(int *)(param_2 + 4);
iVar4 = in_RDX[1];
*(int *)param_... |
1,090 | func0 | #include <iostream>
#include <tuple>
#include <vector>
#include <cassert>
| std::tuple<int, int, int> func0(const std::tuple<int, int, int>& test_tup1, const std::tuple<int, int, int>& test_tup2) {
int first = std::get<0>(test_tup1) - std::get<0>(test_tup2);
int second = std::get<1>(test_tup1) - std::get<1>(test_tup2);
int third = std::get<2>(test_tup1) - std::get<2>(test_tup2);... | int main() {
assert(func0(std::make_tuple(10, 4, 5), std::make_tuple(2, 5, 18)) == std::make_tuple(8, -1, -13));
assert(func0(std::make_tuple(11, 2, 3), std::make_tuple(24, 45, 16)) == std::make_tuple(-13, -43, -13));
assert(func0(std::make_tuple(7, 18, 9), std::make_tuple(10, 11, 12)) == std::make_tuple... | O2 | cpp | func0(std::tuple<int, int, int> const&, std::tuple<int, int, int> const&):
endbr64
mov 0x8(%rsi),%ecx
mov %rdi,%rax
sub 0x8(%rdx),%ecx
mov 0x4(%rsi),%edi
mov (%rsi),%esi
sub 0x4(%rdx),%edi
sub (%rdx),%esi
mov %ecx,0x8(%rax)
mov %esi,(%rax)
mov %edi,0x4(%rax)
retq
| _Z5func0RKSt5tupleIJiiiEES2_:
endbr64
movq xmm0, qword ptr [rsi]
movq xmm1, qword ptr [rdx]
mov rax, rdi
mov ecx, [rsi+8]
sub ecx, [rdx+8]
psubd xmm0, xmm1
mov [rdi+8], ecx
movq qword ptr [rdi], xmm0
retn | long long func0(long long a1, const __m128i *a2, const __m128i *a3)
{
long long result; // rax
unsigned long long v4; // xmm0_8
result = a1;
v4 = _mm_sub_epi32(_mm_loadl_epi64(a2), _mm_loadl_epi64(a3)).m128i_u64[0];
*(_DWORD *)(a1 + 8) = a2->m128i_i32[2] - a3->m128i_i32[2];
*(_QWORD *)a1 = v4;
return re... | func0:
ENDBR64
MOVQ XMM0,qword ptr [RSI]
MOVQ XMM1,qword ptr [RDX]
MOV RAX,RDI
MOV ECX,dword ptr [RSI + 0x8]
SUB ECX,dword ptr [RDX + 0x8]
PSUBD XMM0,XMM1
MOV dword ptr [RDI + 0x8],ECX
MOVQ qword ptr [RDI],XMM0
RET | /* func0(std::tuple<int, int, int> const&, std::tuple<int, int, int> const&) */
tuple * func0(tuple *param_1,tuple *param_2)
{
int8 uVar1;
int8 uVar2;
int8 *in_RDX;
uVar1 = *(int8 *)param_2;
uVar2 = *in_RDX;
*(int *)(param_1 + 8) = *(int *)(param_2 + 8) - *(int *)(in_RDX + 1);
*(ulong *)param_1 =
... |
1,091 | func0 | #include <iostream>
#include <tuple>
#include <vector>
#include <cassert>
| std::tuple<int, int, int> func0(const std::tuple<int, int, int>& test_tup1, const std::tuple<int, int, int>& test_tup2) {
int first = std::get<0>(test_tup1) - std::get<0>(test_tup2);
int second = std::get<1>(test_tup1) - std::get<1>(test_tup2);
int third = std::get<2>(test_tup1) - std::get<2>(test_tup2);... | int main() {
assert(func0(std::make_tuple(10, 4, 5), std::make_tuple(2, 5, 18)) == std::make_tuple(8, -1, -13));
assert(func0(std::make_tuple(11, 2, 3), std::make_tuple(24, 45, 16)) == std::make_tuple(-13, -43, -13));
assert(func0(std::make_tuple(7, 18, 9), std::make_tuple(10, 11, 12)) == std::make_tuple... | O3 | cpp | func0(std::tuple<int, int, int> const&, std::tuple<int, int, int> const&):
endbr64
mov 0x8(%rsi),%ecx
mov %rdi,%rax
sub 0x8(%rdx),%ecx
mov 0x4(%rsi),%edi
mov (%rsi),%esi
sub 0x4(%rdx),%edi
sub (%rdx),%esi
mov %ecx,0x8(%rax)
mov %esi,(%rax)
mov %edi,0x4(%rax)
retq
| _Z5func0RKSt5tupleIJiiiEES2_:
endbr64
movq xmm0, qword ptr [rsi]
movq xmm1, qword ptr [rdx]
mov rax, rdi
mov ecx, [rsi+8]
sub ecx, [rdx+8]
psubd xmm0, xmm1
mov [rdi+8], ecx
movq qword ptr [rdi], xmm0
retn | long long func0(long long a1, const __m128i *a2, const __m128i *a3)
{
long long result; // rax
unsigned long long v4; // xmm0_8
result = a1;
v4 = _mm_sub_epi32(_mm_loadl_epi64(a2), _mm_loadl_epi64(a3)).m128i_u64[0];
*(_DWORD *)(a1 + 8) = a2->m128i_i32[2] - a3->m128i_i32[2];
*(_QWORD *)a1 = v4;
return re... | func0:
ENDBR64
MOVQ XMM0,qword ptr [RSI]
MOVQ XMM1,qword ptr [RDX]
MOV RAX,RDI
MOV ECX,dword ptr [RSI + 0x8]
SUB ECX,dword ptr [RDX + 0x8]
PSUBD XMM0,XMM1
MOV dword ptr [RDI + 0x8],ECX
MOVQ qword ptr [RDI],XMM0
RET | /* func0(std::tuple<int, int, int> const&, std::tuple<int, int, int> const&) */
tuple * func0(tuple *param_1,tuple *param_2)
{
int8 uVar1;
int8 uVar2;
int8 *in_RDX;
uVar1 = *(int8 *)param_2;
uVar2 = *in_RDX;
*(int *)(param_1 + 8) = *(int *)(param_2 + 8) - *(int *)(in_RDX + 1);
*(ulong *)param_1 =
... |
1,092 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
return (1 << (n - 1));
}
| int main() {
assert(func0(4) == 8);
assert(func0(6) == 32);
assert(func0(2) == 2);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x4(%rbp)
mov -0x4(%rbp),%eax
sub $0x1,%eax
mov $0x1,%edx
mov %eax,%ecx
shl %cl,%edx
mov %edx,%eax
pop %rbp
retq
| _Z5func0i:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov eax, [rbp+var_4]
sub eax, 1
mov edx, 1
mov ecx, eax
shl edx, cl
mov eax, edx
pop rbp
retn | long long func0(char a1)
{
return (unsigned int)(1 << (a1 - 1));
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV EAX,dword ptr [RBP + -0x4]
SUB EAX,0x1
MOV EDX,0x1
MOV ECX,EAX
SHL EDX,CL
MOV EAX,EDX
POP RBP
RET | /* func0(int) */
int func0(int param_1)
{
return 1 << ((char)param_1 - 1U & 0x1f);
} |
1,093 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
return (1 << (n - 1));
}
| int main() {
assert(func0(4) == 8);
assert(func0(6) == 32);
assert(func0(2) == 2);
return 0;
}
| O1 | cpp | func0(int):
endbr64
lea -0x1(%rdi),%ecx
mov $0x1,%eax
shl %cl,%eax
retq
| _Z5func0i:
endbr64
lea ecx, [rdi-1]
mov eax, 1
shl eax, cl
retn | long long func0(char a1)
{
return (unsigned int)(1 << (a1 - 1));
} | func0:
ENDBR64
LEA ECX,[RDI + -0x1]
MOV EAX,0x1
SHL EAX,CL
RET | /* func0(int) */
int func0(int param_1)
{
return 1 << ((char)param_1 - 1U & 0x1f);
} |
1,094 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
return (1 << (n - 1));
}
| int main() {
assert(func0(4) == 8);
assert(func0(6) == 32);
assert(func0(2) == 2);
return 0;
}
| O2 | cpp | func0(int):
endbr64
lea -0x1(%rdi),%ecx
mov $0x1,%eax
shl %cl,%eax
retq
| _Z5func0i:
endbr64
lea ecx, [rdi-1]
mov eax, 1
shl eax, cl
retn | long long func0(char a1)
{
return (unsigned int)(1 << (a1 - 1));
} | func0:
ENDBR64
LEA ECX,[RDI + -0x1]
MOV EAX,0x1
SHL EAX,CL
RET | /* func0(int) */
int func0(int param_1)
{
return 1 << ((char)param_1 - 1U & 0x1f);
} |
1,095 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int n) {
return (1 << (n - 1));
}
| int main() {
assert(func0(4) == 8);
assert(func0(6) == 32);
assert(func0(2) == 2);
return 0;
}
| O3 | cpp | func0(int):
endbr64
lea -0x1(%rdi),%ecx
mov $0x1,%eax
shl %cl,%eax
retq
| _Z5func0i:
endbr64
lea ecx, [rdi-1]
mov eax, 1
shl eax, cl
retn | long long func0(char a1)
{
return (unsigned int)(1 << (a1 - 1));
} | func0:
ENDBR64
LEA ECX,[RDI + -0x1]
MOV EAX,0x1
SHL EAX,CL
RET | /* func0(int) */
int func0(int param_1)
{
return 1 << ((char)param_1 - 1U & 0x1f);
} |
1,096 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
| int func0(std::vector<int> a, int n, int m) {
for (int i = 0; i < n; ++i) {
a[i] = a[i] / m + (a[i] % m != 0);
}
int result = -1, maxx = -1;
for (int i = n - 1; i >= 0; --i) {
if (maxx < a[i]) {
maxx = a[i];
result = i;
}
}
return result... | int main() {
assert(func0({2, 5, 4}, 3, 2) == 2);
assert(func0({4, 3}, 2, 2) == 2);
assert(func0({1, 2, 3, 4}, 4, 1) == 4);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> >, int, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x28,%rsp
mov %rdi,-0x28(%rbp)
mov %esi,-0x2c(%rbp)
mov %edx,-0x30(%rbp)
movl $0x0,-0x20(%rbp)
mov -0x20(%rbp),%eax
cmp -0x2c(%rbp),%eax
jge 12f0 <_Z5func0St6vectorIiSaIiEEii+0x87>
mov ... | _Z5func0St6vectorIiSaIiEEii:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 28h
mov [rbp+var_28], rdi
mov [rbp+var_2C], esi
mov [rbp+var_30], edx
mov [rbp+var_20], 0
jmp short loc_12C8
loc_1269:
mov eax, [rbp+var_20]
movsxd rdx, eax
mov rax, [rbp+var_28]
mov rsi, rdx
mov ... | long long func0(long long a1, int a2, int a3)
{
int v3; // ebx
int v4; // ebx
int i; // [rsp+10h] [rbp-20h]
int v8; // [rsp+14h] [rbp-1Ch]
int v9; // [rsp+18h] [rbp-18h]
int j; // [rsp+1Ch] [rbp-14h]
for ( i = 0; i < a2; ++i )
{
v3 = *(_DWORD *)std::vector<int>::operator[](a1, i) / a3;
v4 = (*... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x28],RDI
MOV dword ptr [RBP + -0x2c],ESI
MOV dword ptr [RBP + -0x30],EDX
MOV dword ptr [RBP + -0x20],0x0
JMP 0x001012c8
LAB_00101269:
MOV EAX,dword ptr [RBP + -0x20]
MOVSXD RDX,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,RDX
MOV RDI,RAX
CA... | /* func0(std::vector<int, std::allocator<int> >, int, int) */
int func0(vector param_1,int param_2,int param_3)
{
int iVar1;
int iVar2;
int *piVar3;
int4 in_register_0000003c;
vector<int,std::allocator<int>> *this;
int4 local_28;
int4 local_24;
int4 local_20;
int4 local_1c;
this = (vector<int,s... |
1,097 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
| int func0(std::vector<int> a, int n, int m) {
for (int i = 0; i < n; ++i) {
a[i] = a[i] / m + (a[i] % m != 0);
}
int result = -1, maxx = -1;
for (int i = n - 1; i >= 0; --i) {
if (maxx < a[i]) {
maxx = a[i];
result = i;
}
}
return result... | int main() {
assert(func0({2, 5, 4}, 3, 2) == 2);
assert(func0({4, 3}, 2, 2) == 2);
assert(func0({1, 2, 3, 4}, 4, 1) == 4);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> >, int, int):
endbr64
mov %edx,%r8d
test %esi,%esi
jle 12a4 <_Z5func0St6vectorIiSaIiEEii+0x5b>
mov (%rdi),%rcx
lea -0x1(%rsi),%eax
lea 0x4(%rcx,%rax,4),%r9
mov (%rcx),%eax
cltd
idiv %r8d
test %edx,%edx
setne %dl
movzbl %dl,%edx
add %edx,%eax
mov ... | _Z5func0St6vectorIiSaIiEEii:
endbr64
mov r9d, edx
test esi, esi
jle short loc_1269
movsxd r10, esi
shl r10, 2
mov ecx, 0
loc_1220:
mov r8, rcx
add r8, [rdi]
mov eax, [r8]
cdq
idiv r9d
cmp edx, 1
sbb eax, 0FFFFFFFFh
mov [r8], eax
add rcx, 4
cmp rcx, r10
jnz shor... | long long func0(long long *a1, int a2, int a3)
{
long long v3; // rcx
long long v4; // rdi
long long v5; // rdx
int v6; // ecx
int v7; // eax
if ( a2 <= 0 )
{
v7 = -1;
}
else
{
v3 = 0LL;
do
{
*(_DWORD *)(*a1 + v3) = *(_DWORD *)(*a1 + v3) / a3 - ((*(_DWORD *)(*a1 + v3) % a3 ==... | func0:
ENDBR64
MOV R9D,EDX
TEST ESI,ESI
JLE 0x00101269
MOVSXD R10,ESI
SHL R10,0x2
MOV ECX,0x0
LAB_00101220:
MOV R8,RCX
ADD R8,qword ptr [RDI]
MOV EAX,dword ptr [R8]
CDQ
IDIV R9D
CMP EDX,0x1
SBB EAX,-0x1
MOV dword ptr [R8],EAX
ADD RCX,0x4
CMP RCX,R10
JNZ 0x00101220
MOV RDI,qword ptr [RDI]
SUB ESI,0x1
MOVSXD RDX,ESI
MOV ... | /* func0(std::vector<int, std::allocator<int> >, int, int) */
int func0(vector param_1,int param_2,int param_3)
{
int iVar1;
int iVar2;
ulong uVar3;
int iVar4;
long lVar5;
ulong uVar6;
int4 in_register_0000003c;
int *piVar7;
if (param_2 < 1) {
iVar2 = -1;
}
else {
lVar5 = 0;
do {
... |
1,098 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
| int func0(std::vector<int> a, int n, int m) {
for (int i = 0; i < n; ++i) {
a[i] = a[i] / m + (a[i] % m != 0);
}
int result = -1, maxx = -1;
for (int i = n - 1; i >= 0; --i) {
if (maxx < a[i]) {
maxx = a[i];
result = i;
}
}
return result... | int main() {
assert(func0({2, 5, 4}, 3, 2) == 2);
assert(func0({4, 3}, 2, 2) == 2);
assert(func0({1, 2, 3, 4}, 4, 1) == 4);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> >, int, int):
endbr64
mov %edx,%r9d
lea -0x1(%rsi),%r8d
test %esi,%esi
jle 14b0 <_Z5func0St6vectorIiSaIiEEii+0x70>
mov (%rdi),%rdi
mov %r8d,%eax
mov %rdi,%rcx
lea 0x4(%rdi,%rax,4),%rsi
nopl (%rax)
mov (%rcx),%eax
cltd
idiv %r9d
test %edx,%edx
se... | _Z5func0St6vectorIiSaIiEEii:
endbr64
mov r8d, edx
test esi, esi
jle short loc_1400
mov rdi, [rdi]
movsxd rax, esi
mov rcx, rdi
lea r9, [rdi+rax*4]
nop dword ptr [rax+rax+00000000h]
loc_13B0:
mov eax, [rcx]
cdq
idiv r8d
cmp edx, 1
sbb eax, 0FFFFFFFFh
add rcx, 4
mov [rcx... | long long func0(_QWORD *a1, int a2, int a3)
{
_DWORD *v3; // rdi
_DWORD *v4; // rcx
int v5; // eax
int v6; // ecx
int v7; // eax
long long v8; // rdx
if ( a2 <= 0 )
return 0LL;
v3 = (_DWORD *)*a1;
v4 = v3;
do
{
v5 = *v4 / a3 - ((*v4 % a3 == 0) - 1);
*v4++ = v5;
}
while ( v4 != &v... | func0:
ENDBR64
MOV R8D,EDX
TEST ESI,ESI
JLE 0x00101400
MOV RDI,qword ptr [RDI]
MOVSXD RAX,ESI
MOV RCX,RDI
LEA R9,[RDI + RAX*0x4]
NOP dword ptr [RAX + RAX*0x1]
LAB_001013b0:
MOV EAX,dword ptr [RCX]
CDQ
IDIV R8D
CMP EDX,0x1
SBB EAX,-0x1
ADD RCX,0x4
MOV dword ptr [RCX + -0x4],EAX
CMP RCX,R9
JNZ 0x001013b0
SUB ESI,0x1
MOV ... | /* func0(std::vector<int, std::allocator<int> >, int, int) */
int func0(vector param_1,int param_2,int param_3)
{
int *piVar1;
ulong uVar2;
int iVar3;
int *piVar4;
int *piVar5;
ulong uVar6;
int4 in_register_0000003c;
if (param_2 < 1) {
return 0;
}
piVar1 = *(int **)CONCAT44(in_register_0000... |
1,099 | func0 |
#include <iostream>
#include <vector>
#include <assert.h>
| int func0(std::vector<int> a, int n, int m) {
for (int i = 0; i < n; ++i) {
a[i] = a[i] / m + (a[i] % m != 0);
}
int result = -1, maxx = -1;
for (int i = n - 1; i >= 0; --i) {
if (maxx < a[i]) {
maxx = a[i];
result = i;
}
}
return result... | int main() {
assert(func0({2, 5, 4}, 3, 2) == 2);
assert(func0({4, 3}, 2, 2) == 2);
assert(func0({1, 2, 3, 4}, 4, 1) == 4);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> >, int, int):
endbr64
mov %edx,%r9d
lea -0x1(%rsi),%r8d
test %esi,%esi
jle 1490 <_Z5func0St6vectorIiSaIiEEii+0x70>
mov (%rdi),%rdi
mov %r8d,%eax
mov %rdi,%rcx
lea 0x4(%rdi,%rax,4),%rsi
nopl (%rax)
mov (%rcx),%eax
cltd
idiv %r9d
test %edx,%edx
se... | _Z5func0St6vectorIiSaIiEEii:
endbr64
mov r8d, edx
test esi, esi
jle short loc_1400
mov rdi, [rdi]
movsxd rax, esi
mov rcx, rdi
lea r9, [rdi+rax*4]
nop dword ptr [rax+rax+00000000h]
loc_13B0:
mov eax, [rcx]
cdq
idiv r8d
cmp edx, 1
sbb eax, 0FFFFFFFFh
add rcx, 4
mov [rcx... | long long func0(_QWORD *a1, int a2, int a3)
{
_DWORD *v3; // rdi
_DWORD *v4; // rcx
int v5; // eax
int v6; // ecx
int v7; // eax
long long v8; // rdx
if ( a2 <= 0 )
return 0LL;
v3 = (_DWORD *)*a1;
v4 = v3;
do
{
v5 = *v4 / a3 - ((*v4 % a3 == 0) - 1);
*v4++ = v5;
}
while ( v4 != &v... | func0:
ENDBR64
MOV R8D,EDX
TEST ESI,ESI
JLE 0x00101400
MOV RDI,qword ptr [RDI]
MOVSXD RAX,ESI
MOV RCX,RDI
LEA R9,[RDI + RAX*0x4]
NOP dword ptr [RAX + RAX*0x1]
LAB_001013b0:
MOV EAX,dword ptr [RCX]
CDQ
IDIV R8D
CMP EDX,0x1
SBB EAX,-0x1
ADD RCX,0x4
MOV dword ptr [RCX + -0x4],EAX
CMP RCX,R9
JNZ 0x001013b0
SUB ESI,0x1
MOV ... | /* func0(std::vector<int, std::allocator<int> >, int, int) */
int func0(vector param_1,int param_2,int param_3)
{
int *piVar1;
ulong uVar2;
int iVar3;
int *piVar4;
int *piVar5;
ulong uVar6;
int4 in_register_0000003c;
if (param_2 < 1) {
return 0;
}
piVar1 = *(int **)CONCAT44(in_register_0000... |
1,100 | func0 | #include <iostream>
#include <assert.h>
| double func0(double r, double h) {
double volume = 3.1415 * r * r * h;
return volume;
}
| int main() {
assert(func0(10, 5) == 1570.7500000000002);
assert(func0(4, 5) == 251.32000000000002);
assert(func0(4, 10) == 502.64000000000004);
return 0;
}
| O0 | cpp | func0(double, double):
endbr64
push %rbp
mov %rsp,%rbp
movsd %xmm0,-0x18(%rbp)
movsd %xmm1,-0x20(%rbp)
movsd -0x18(%rbp),%xmm1
movsd 0xf30(%rip),%xmm0
mulsd %xmm1,%xmm0
mulsd -0x18(%rbp),%xmm0
movsd -0x20(%rbp),%xmm1
mulsd %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 xmm1, [rbp+var_18]
movsd xmm0, cs:qword_20B8
mulsd xmm0, xmm1
mulsd xmm0, [rbp+var_18]
movsd xmm1, [rbp+var_20]
mulsd xmm0, xmm1
movsd [rbp+var_8], xmm0
movsd xmm0, [rbp+var_8]
pop rbp
retn | double func0(double a1, double a2)
{
return 3.1415 * a1 * a1 * a2;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOVSD qword ptr [RBP + -0x18],XMM0
MOVSD qword ptr [RBP + -0x20],XMM1
MOVSD XMM1,qword ptr [RBP + -0x18]
MOVSD XMM0,qword ptr [0x001020b8]
MULSD XMM0,XMM1
MULSD XMM0,qword ptr [RBP + -0x18]
MOVSD XMM1,qword ptr [RBP + -0x20]
MULSD XMM0,XMM1
MOVSD qword ptr [RBP + -0x8],XMM0
MOVSD XMM... | /* func0(double, double) */
double func0(double param_1,double param_2)
{
return DAT_001020b8 * param_1 * param_1 * param_2;
} |
1,101 | func0 | #include <iostream>
#include <assert.h>
| double func0(double r, double h) {
double volume = 3.1415 * r * r * h;
return volume;
}
| int main() {
assert(func0(10, 5) == 1570.7500000000002);
assert(func0(4, 5) == 251.32000000000002);
assert(func0(4, 10) == 502.64000000000004);
return 0;
}
| O1 | cpp | func0(double, double):
endbr64
movapd %xmm0,%xmm2
mulsd 0xe8f(%rip),%xmm0
mulsd %xmm2,%xmm0
mulsd %xmm1,%xmm0
retq
| _Z5func0dd:
endbr64
movapd xmm2, xmm0
mulsd xmm0, cs:qword_2008
mulsd xmm0, xmm2
mulsd xmm0, xmm1
retn | double func0(double a1, double a2)
{
return a1 * 3.1415 * a1 * a2;
} | func0:
ENDBR64
MOVAPD XMM2,XMM0
MULSD XMM0,qword ptr [0x00102008]
MULSD XMM0,XMM2
MULSD XMM0,XMM1
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 * _DAT_00102008 * param_1 * param_2;
} |
1,102 | func0 | #include <iostream>
#include <assert.h>
| double func0(double r, double h) {
double volume = 3.1415 * r * r * h;
return volume;
}
| int main() {
assert(func0(10, 5) == 1570.7500000000002);
assert(func0(4, 5) == 251.32000000000002);
assert(func0(4, 10) == 502.64000000000004);
return 0;
}
| O2 | cpp | func0(double, double):
endbr64
movapd %xmm0,%xmm2
movsd 0xe38(%rip),%xmm0
mulsd %xmm2,%xmm0
mulsd %xmm2,%xmm0
mulsd %xmm1,%xmm0
retq
nopl (%rax)
| _Z5func0dd:
endbr64
movapd xmm2, xmm0
movsd xmm0, cs:qword_2008
mulsd xmm0, xmm2
mulsd xmm0, xmm2
mulsd xmm0, xmm1
retn | double func0(double a1, double a2)
{
return 3.1415 * a1 * a1 * a2;
} | func0:
ENDBR64
MOVAPD XMM2,XMM0
MOVSD XMM0,qword ptr [0x00102008]
MULSD XMM0,XMM2
MULSD XMM0,XMM2
MULSD XMM0,XMM1
RET | /* func0(double, double) */
double func0(double param_1,double param_2)
{
return DAT_00102008 * param_1 * param_1 * param_2;
} |
1,103 | func0 | #include <iostream>
#include <assert.h>
| double func0(double r, double h) {
double volume = 3.1415 * r * r * h;
return volume;
}
| int main() {
assert(func0(10, 5) == 1570.7500000000002);
assert(func0(4, 5) == 251.32000000000002);
assert(func0(4, 10) == 502.64000000000004);
return 0;
}
| O3 | cpp | func0(double, double):
endbr64
movapd %xmm0,%xmm2
movsd 0xe38(%rip),%xmm0
mulsd %xmm2,%xmm0
mulsd %xmm2,%xmm0
mulsd %xmm1,%xmm0
retq
nopl (%rax)
| _Z5func0dd:
endbr64
movapd xmm2, xmm0
movsd xmm0, cs:qword_2008
mulsd xmm0, xmm2
mulsd xmm0, xmm2
mulsd xmm0, xmm1
retn | double func0(double a1, double a2)
{
return 3.1415 * a1 * a1 * a2;
} | func0:
ENDBR64
MOVAPD XMM2,XMM0
MOVSD XMM0,qword ptr [0x00102008]
MULSD XMM0,XMM2
MULSD XMM0,XMM2
MULSD XMM0,XMM1
RET | /* func0(double, double) */
double func0(double param_1,double param_2)
{
return DAT_00102008 * param_1 * param_1 * param_2;
} |
1,104 | func0 |
#include <iostream>
#include <map>
#include <cassert>
| std::map<std::string, int> func0(std::map<std::string, int> dict, int n) {
std::map<std::string, int> result;
for (const auto& pair : dict) {
if (pair.second >= n) {
result[pair.first] = pair.second;
}
}
return result;
}
| int main() {
std::map<std::string, int> input = {{"Cierra Vega", 175}, {"Alden Cantrell", 180}, {"Kierra Gentry", 165}, {"Pierre Cox", 190}};
std::map<std::string, int> expected;
expected = {{"Cierra Vega", 175}, {"Alden Cantrell", 180}, {"Pierre Cox", 190}};
assert(func0(input, 170) == expect... | O0 | cpp | func0(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, int> > >, int)... | _Z5func0St3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEEi:
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 rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax... | long long func0(long long a1, long long a2, int a3)
{
int v3; // ebx
long long v6; // [rsp+28h] [rbp-38h] BYREF
_QWORD v7[2]; // [rsp+30h] [rbp-30h] BYREF
long long v8; // [rsp+40h] [rbp-20h]
unsigned long long v9; // [rsp+48h] [rbp-18h]
v9 = __readfsqword(0x28u);
std::map<std::string,int>::map(a1);
v... | 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 RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x48]
MOV RDI,RAX
CALL 0x001031bc
MOV RAX,qword ptr [RBP + -0x50]
MO... | /* func0(std::map<std::string, int, std::less<std::string >, std::allocator<std::pair<std::string
const, int> > >, int) */
map<std::string,int,std::less<std::string>,std::allocator<std::pair<std::string_const,int>>> *
func0(map param_1,int param_2)
{
int4 uVar1;
char cVar2;
int4 *puVar3;
int in_EDX;
int4... |
1,105 | func0 |
#include <iostream>
#include <map>
#include <cassert>
| std::map<std::string, int> func0(std::map<std::string, int> dict, int n) {
std::map<std::string, int> result;
for (const auto& pair : dict) {
if (pair.second >= n) {
result[pair.first] = pair.second;
}
}
return result;
}
| int main() {
std::map<std::string, int> input = {{"Cierra Vega", 175}, {"Alden Cantrell", 180}, {"Kierra Gentry", 165}, {"Pierre Cox", 190}};
std::map<std::string, int> expected;
expected = {{"Cierra Vega", 175}, {"Alden Cantrell", 180}, {"Pierre Cox", 190}};
assert(func0(input, 170) == expect... | O1 | cpp | func0(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, int> > >, int)... | _Z5func0St3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEEi:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 58h
mov [rsp+88h+var_68], rdi
mov [rsp+88h+var_6C], edx
mov rax, fs:28h
mov [rsp+88h+var_40], rax
xor eax... | long long func0(long long a1, _QWORD *a2, size_t a3)
{
long long v3; // r13
long long v5; // rbx
int v6; // edx
long long v7; // rbp
size_t v8; // rbx
size_t v9; // rdx
size_t v10; // rbx
unsigned int v11; // eax
long long v12; // r12
int v13; // r14d
size_t v14; // r12
const void *v15; // r15
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RSP + 0x20],RDI
MOV dword ptr [RSP + 0x1c],EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
MOV dword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
LEA RCX,[RDI + 0x8]
MOV qword ptr [RSP + 0x2... | /* func0(std::map<std::string, int, std::less<std::string >, std::allocator<std::pair<std::string
const, int> > >, int) */
long func0(map param_1,int param_2)
{
piecewise_construct_t *ppVar1;
int iVar2;
ulong uVar3;
ulong uVar4;
void *__s2;
int iVar5;
_Rb_tree_iterator _Var6;
int4 extraout_var;
_... |
1,106 | func0 |
#include <iostream>
#include <map>
#include <cassert>
| std::map<std::string, int> func0(std::map<std::string, int> dict, int n) {
std::map<std::string, int> result;
for (const auto& pair : dict) {
if (pair.second >= n) {
result[pair.first] = pair.second;
}
}
return result;
}
| int main() {
std::map<std::string, int> input = {{"Cierra Vega", 175}, {"Alden Cantrell", 180}, {"Kierra Gentry", 165}, {"Pierre Cox", 190}};
std::map<std::string, int> expected;
expected = {{"Cierra Vega", 175}, {"Alden Cantrell", 180}, {"Pierre Cox", 190}};
assert(func0(input, 170) == expect... | O2 | cpp | func0(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, int> > >, int)... | _Z5func0St3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEEi:
endbr64
push r15
lea rcx, [rdi+8]
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov [rsp+78h+var_60], rdi
mov [rsp+78h+var_74], edx
mov rax, fs:28h
mov [rsp+78h+var... | long long func0(long long a1, long long a2, int a3)
{
long long v3; // rbx
int v4; // r12d
const void *v5; // r13
long long v6; // rbp
size_t v7; // rbx
long long v8; // r15
size_t v9; // r14
size_t v10; // rdx
int v11; // eax
long long v12; // r14
size_t v13; // r15
size_t v14; // rcx
size_t... | func0:
ENDBR64
PUSH R15
LEA RCX,[RDI + 0x8]
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RSP + 0x18],RDI
MOV dword ptr [RSP + 0x4],EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x18],RCX
MOV RBX,qword ptr [RSI + 0x18]
LEA RAX,[RSI + 0x8]
MOV ... | /* func0(std::map<std::string, int, std::less<std::string >, std::allocator<std::pair<std::string
const, int> > >, int) */
_Rb_tree<std::string,std::pair<std::string_const,int>,std::_Select1st<std::pair<std::string_const,int>>,std::less<std::string>,std::allocator<std::pair<std::string_const,int>>>
* func0(map para... |
1,107 | func0 |
#include <iostream>
#include <map>
#include <cassert>
| std::map<std::string, int> func0(std::map<std::string, int> dict, int n) {
std::map<std::string, int> result;
for (const auto& pair : dict) {
if (pair.second >= n) {
result[pair.first] = pair.second;
}
}
return result;
}
| int main() {
std::map<std::string, int> input = {{"Cierra Vega", 175}, {"Alden Cantrell", 180}, {"Kierra Gentry", 165}, {"Pierre Cox", 190}};
std::map<std::string, int> expected;
expected = {{"Cierra Vega", 175}, {"Alden Cantrell", 180}, {"Pierre Cox", 190}};
assert(func0(input, 170) == expect... | O3 | cpp | func0(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, int> > >, int)... | _Z5func0St3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEEi:
endbr64
push r15
lea rcx, [rdi+8]
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 48h
mov [rsp+78h+var_60], rdi
mov [rsp+78h+var_74], edx
mov rax, fs:28h
mov [rsp+78h+var... | long long func0(long long a1, long long a2, int a3)
{
long long v3; // rbx
int v4; // r12d
const void *v5; // r13
long long v6; // rbp
size_t v7; // rbx
long long v8; // r15
size_t v9; // r14
size_t v10; // rdx
int v11; // eax
long long v12; // r14
size_t v13; // r15
size_t v14; // rcx
size_t... | func0:
ENDBR64
PUSH R15
LEA RCX,[RDI + 0x8]
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RSP + 0x18],RDI
MOV dword ptr [RSP + 0x4],EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x18],RCX
MOV RBX,qword ptr [RSI + 0x18]
LEA RAX,[RSI + 0x8]
MOV ... | /* func0(std::map<std::string, int, std::less<std::string >, std::allocator<std::pair<std::string
const, int> > >, int) */
_Rb_tree<std::string,std::pair<std::string_const,int>,std::_Select1st<std::pair<std::string_const,int>>,std::less<std::string>,std::allocator<std::pair<std::string_const,int>>>
* func0(map para... |
1,108 | func0 |
#include <vector>
#include <variant>
#include <cassert>
| int func0(const std::vector<std::variant<int, std::vector<int>>>& test_tup) {
int count = 0;
for (const auto& ele : test_tup) {
if (std::holds_alternative<std::vector<int>>(ele)) {
break;
}
count++;
}
return count;
}
| int main() {
// Test case 1: (1, 5, 7, (4, 6), 10)
std::vector<std::variant<int, std::vector<int>>> test1 = {1, 5, 7, std::vector<int>{4, 6}, 10};
assert(func0(test1) == 3);
// Test case 2: (2, 9, (5, 7), 11)
std::vector<std::variant<int, std::vector<int>>> test2 = {2, 9, std::vector<int>{5, ... | O0 | cpp | func0(std::vector<std::variant<int, std::vector<int, std::allocator<int> > >, std::allocator<std::variant<int, 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,-0x... | _Z5func0RKSt6vectorISt7variantIJiS_IiSaIiEEEESaIS3_EE:
endbr64
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_38], rdi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov [rbp+var_2C], 0
mov rax, [rbp+var_38]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov rdi, rax
call... | long long func0(long long a1)
{
unsigned int v2; // [rsp+14h] [rbp-2Ch]
long long v3; // [rsp+18h] [rbp-28h] BYREF
_QWORD v4[2]; // [rsp+20h] [rbp-20h] BYREF
long long v5; // [rsp+30h] [rbp-10h]
unsigned long long v6; // [rsp+38h] [rbp-8h]
v6 = __readfsqword(0x28u);
v2 = 0;
v4[1] = a1;
v3 = std::vec... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x38],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOV dword ptr [RBP + -0x2c],0x0
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,RAX
CALL 0x00101d36
MOV qword pt... | /* func0(std::vector<std::variant<int, std::vector<int, std::allocator<int> > >,
std::allocator<std::variant<int, std::vector<int, std::allocator<int> > > > > const&) */
int func0(vector *param_1)
{
bool bVar1;
long in_FS_OFFSET;
int local_34;
int8 local_30;
int8 local_28;
vector<std::variant<int,std::... |
1,109 | func0 |
#include <vector>
#include <variant>
#include <cassert>
| int func0(const std::vector<std::variant<int, std::vector<int>>>& test_tup) {
int count = 0;
for (const auto& ele : test_tup) {
if (std::holds_alternative<std::vector<int>>(ele)) {
break;
}
count++;
}
return count;
}
| int main() {
// Test case 1: (1, 5, 7, (4, 6), 10)
std::vector<std::variant<int, std::vector<int>>> test1 = {1, 5, 7, std::vector<int>{4, 6}, 10};
assert(func0(test1) == 3);
// Test case 2: (2, 9, (5, 7), 11)
std::vector<std::variant<int, std::vector<int>>> test2 = {2, 9, std::vector<int>{5, ... | O1 | cpp | func0(std::vector<std::variant<int, std::vector<int, std::allocator<int> > >, std::allocator<std::variant<int, std::vector<int, std::allocator<int> > > > > const&):
endbr64
mov (%rdi),%rax
mov 0x8(%rdi),%rcx
cmp %rcx,%rax
je 12d3 <_Z5func0RKSt6vectorISt7variantIJiS_IiSaIiEEEESaIS3_EE+0x2a>
mov $0x0,%edx... | _Z5func0RKSt6vectorISt7variantIJiS_IiSaIiEEEESaIS3_EE:
endbr64
mov rax, [rdi]
mov rcx, [rdi+8]
cmp rcx, rax
jz short loc_12D3
mov edx, 0
loc_12BE:
cmp byte ptr [rax+18h], 1
jz short loc_12D0
add edx, 1
add rax, 20h ; ' '
cmp rcx, rax
jnz short loc_12BE
loc_12D0:
mov eax... | long long func0(long long *a1)
{
long long v1; // rax
long long v2; // rcx
unsigned int v3; // edx
v1 = *a1;
v2 = a1[1];
if ( v2 == *a1 )
{
return 0;
}
else
{
v3 = 0;
do
{
if ( *(_BYTE *)(v1 + 24) == 1 )
break;
++v3;
v1 += 32LL;
}
while ( v2 != v1 ... | func0:
ENDBR64
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x8]
CMP RCX,RAX
JZ 0x001012d3
MOV EDX,0x0
LAB_001012be:
CMP byte ptr [RAX + 0x18],0x1
JZ 0x001012d0
ADD EDX,0x1
ADD RAX,0x20
CMP RCX,RAX
JNZ 0x001012be
LAB_001012d0:
MOV EAX,EDX
RET
LAB_001012d3:
MOV EDX,0x0
JMP 0x001012d0 | /* func0(std::vector<std::variant<int, std::vector<int, std::allocator<int> > >,
std::allocator<std::variant<int, std::vector<int, std::allocator<int> > > > > const&) */
int func0(vector *param_1)
{
long lVar1;
int iVar2;
lVar1 = *(long *)param_1;
if (*(long *)(param_1 + 8) == lVar1) {
iVar2 = 0;
... |
1,110 | func0 |
#include <vector>
#include <variant>
#include <cassert>
| int func0(const std::vector<std::variant<int, std::vector<int>>>& test_tup) {
int count = 0;
for (const auto& ele : test_tup) {
if (std::holds_alternative<std::vector<int>>(ele)) {
break;
}
count++;
}
return count;
}
| int main() {
// Test case 1: (1, 5, 7, (4, 6), 10)
std::vector<std::variant<int, std::vector<int>>> test1 = {1, 5, 7, std::vector<int>{4, 6}, 10};
assert(func0(test1) == 3);
// Test case 2: (2, 9, (5, 7), 11)
std::vector<std::variant<int, std::vector<int>>> test2 = {2, 9, std::vector<int>{5, ... | O2 | cpp | func0(std::vector<std::variant<int, std::vector<int, std::allocator<int> > >, std::allocator<std::variant<int, std::vector<int, std::allocator<int> > > > > const&):
endbr64
mov (%rdi),%rax
mov 0x8(%rdi),%rdx
xor %r8d,%r8d
cmp %rdx,%rax
je 18cb <_Z5func0RKSt6vectorISt7variantIJiS_IiSaIiEEEESaIS3_EE+0x2b>... | _Z5func0RKSt6vectorISt7variantIJiS_IiSaIiEEEESaIS3_EE:
endbr64
mov rax, [rdi]
mov rcx, [rdi+8]
xor edx, edx
cmp rcx, rax
jnz short loc_1A04
jmp short loc_1A0A
loc_19F8:
add rax, 20h ; ' '
add edx, 1
cmp rcx, rax
jz short loc_1A0A
loc_1A04:
cmp byte ptr [rax+18h], 1
jnz s... | long long func0(long long *a1)
{
long long v1; // rax
long long v2; // rcx
unsigned int v3; // edx
v1 = *a1;
v2 = a1[1];
v3 = 0;
if ( v2 != *a1 )
{
do
{
if ( *(_BYTE *)(v1 + 24) == 1 )
break;
v1 += 32LL;
++v3;
}
while ( v2 != v1 );
}
return v3;
} | func0:
ENDBR64
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x8]
XOR EDX,EDX
CMP RCX,RAX
JNZ 0x00101a04
JMP 0x00101a0a
LAB_001019f8:
ADD RAX,0x20
ADD EDX,0x1
CMP RCX,RAX
JZ 0x00101a0a
LAB_00101a04:
CMP byte ptr [RAX + 0x18],0x1
JNZ 0x001019f8
LAB_00101a0a:
MOV EAX,EDX
RET | /* func0(std::vector<std::variant<int, std::vector<int, std::allocator<int> > >,
std::allocator<std::variant<int, std::vector<int, std::allocator<int> > > > > const&) */
int func0(vector *param_1)
{
long lVar1;
int iVar2;
iVar2 = 0;
for (lVar1 = *(long *)param_1;
(*(long *)(param_1 + 8) != lVar1 &... |
1,111 | func0 |
#include <vector>
#include <variant>
#include <cassert>
| int func0(const std::vector<std::variant<int, std::vector<int>>>& test_tup) {
int count = 0;
for (const auto& ele : test_tup) {
if (std::holds_alternative<std::vector<int>>(ele)) {
break;
}
count++;
}
return count;
}
| int main() {
// Test case 1: (1, 5, 7, (4, 6), 10)
std::vector<std::variant<int, std::vector<int>>> test1 = {1, 5, 7, std::vector<int>{4, 6}, 10};
assert(func0(test1) == 3);
// Test case 2: (2, 9, (5, 7), 11)
std::vector<std::variant<int, std::vector<int>>> test2 = {2, 9, std::vector<int>{5, ... | O3 | cpp | func0(std::vector<std::variant<int, std::vector<int, std::allocator<int> > >, std::allocator<std::variant<int, std::vector<int, std::allocator<int> > > > > const&):
endbr64
mov (%rdi),%rax
mov 0x8(%rdi),%rdx
xor %r8d,%r8d
cmp %rdx,%rax
je 18cb <_Z5func0RKSt6vectorISt7variantIJiS_IiSaIiEEEESaIS3_EE+0x2b>... | _Z5func0RKSt6vectorISt7variantIJiS_IiSaIiEEEESaIS3_EE:
endbr64
mov rax, [rdi]
mov rcx, [rdi+8]
xor edx, edx
cmp rcx, rax
jnz short loc_1BF4
jmp short loc_1BFA
loc_1BE8:
add rax, 20h ; ' '
add edx, 1
cmp rcx, rax
jz short loc_1BFA
loc_1BF4:
cmp byte ptr [rax+18h], 1
jnz s... | long long func0(long long *a1)
{
long long v1; // rax
long long v2; // rcx
unsigned int v3; // edx
v1 = *a1;
v2 = a1[1];
v3 = 0;
if ( v2 != *a1 )
{
do
{
if ( *(_BYTE *)(v1 + 24) == 1 )
break;
v1 += 32LL;
++v3;
}
while ( v2 != v1 );
}
return v3;
} | func0:
ENDBR64
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x8]
XOR EDX,EDX
CMP RCX,RAX
JNZ 0x00101bf4
JMP 0x00101bfa
LAB_00101be8:
ADD RAX,0x20
ADD EDX,0x1
CMP RCX,RAX
JZ 0x00101bfa
LAB_00101bf4:
CMP byte ptr [RAX + 0x18],0x1
JNZ 0x00101be8
LAB_00101bfa:
MOV EAX,EDX
RET | /* func0(std::vector<std::variant<int, std::vector<int, std::allocator<int> > >,
std::allocator<std::variant<int, std::vector<int, std::allocator<int> > > > > const&) */
int func0(vector *param_1)
{
long lVar1;
int iVar2;
iVar2 = 0;
for (lVar1 = *(long *)param_1;
(*(long *)(param_1 + 8) != lVar1 &... |
1,112 | func0 |
#include <assert.h>
| int func0(int n) {
return 4 * n * n - 3 * n;
}
| int main() {
assert(func0(3) == 27);
assert(func0(7) == 175);
assert(func0(10) == 370);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x4(%rbp)
mov -0x4(%rbp),%eax
imul %eax,%eax
lea 0x0(,%rax,4),%edx
mov -0x4(%rbp),%eax
mov %eax,%ecx
shl $0x2,%eax
sub %eax,%ecx
mov %ecx,%eax
add %edx,%eax
pop %rbp
retq
| _Z5func0i:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov eax, [rbp+var_4]
imul eax, eax
lea ecx, ds:0[rax*4]
mov eax, [rbp+var_4]
mov edx, eax
shl eax, 2
sub edx, eax
lea eax, [rcx+rdx]
pop rbp
retn | long long func0(int a1)
{
return (unsigned int)(4 * a1 * a1 - 3 * a1);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV EAX,dword ptr [RBP + -0x4]
IMUL EAX,EAX
LEA ECX,[RAX*0x4]
MOV EAX,dword ptr [RBP + -0x4]
MOV EDX,EAX
SHL EAX,0x2
SUB EDX,EAX
LEA EAX,[RCX + RDX*0x1]
POP RBP
RET | /* func0(int) */
int func0(int param_1)
{
return param_1 * param_1 * 4 + param_1 * -3;
} |
1,113 | func0 |
#include <assert.h>
| int func0(int n) {
return 4 * n * n - 3 * n;
}
| int main() {
assert(func0(3) == 27);
assert(func0(7) == 175);
assert(func0(10) == 370);
return 0;
}
| O1 | cpp | func0(int):
endbr64
mov %edi,%eax
imul %edi,%eax
lea 0x0(,%rdi,4),%edx
sub %edx,%edi
lea (%rdi,%rax,4),%eax
retq
| _Z5func0i:
endbr64
mov eax, edi
imul eax, edi
lea edx, ds:0[rdi*4]
sub edi, edx
lea eax, [rdi+rax*4]
retn | long long func0(int a1)
{
return (unsigned int)(-3 * a1 + 4 * a1 * a1);
} | func0:
ENDBR64
MOV EAX,EDI
IMUL EAX,EDI
LEA EDX,[RDI*0x4]
SUB EDI,EDX
LEA EAX,[RDI + RAX*0x4]
RET | /* func0(int) */
int func0(int param_1)
{
return param_1 * -3 + param_1 * param_1 * 4;
} |
1,114 | func0 |
#include <assert.h>
| int func0(int n) {
return 4 * n * n - 3 * n;
}
| int main() {
assert(func0(3) == 27);
assert(func0(7) == 175);
assert(func0(10) == 370);
return 0;
}
| O2 | cpp | func0(int):
endbr64
mov %edi,%eax
lea 0x0(,%rdi,4),%edx
imul %edi,%eax
sub %edx,%edi
lea (%rdi,%rax,4),%eax
retq
nopw %cs:0x0(%rax,%rax,1)
| _Z5func0i:
endbr64
mov eax, edi
lea edx, ds:0[rdi*4]
imul eax, edi
sub edi, edx
lea eax, [rdi+rax*4]
retn | long long func0(int a1)
{
return (unsigned int)(-3 * a1 + 4 * a1 * a1);
} | func0:
ENDBR64
MOV EAX,EDI
LEA EDX,[RDI*0x4]
IMUL EAX,EDI
SUB EDI,EDX
LEA EAX,[RDI + RAX*0x4]
RET | /* func0(int) */
int func0(int param_1)
{
return param_1 * -3 + param_1 * param_1 * 4;
} |
1,115 | func0 |
#include <assert.h>
| int func0(int n) {
return 4 * n * n - 3 * n;
}
| int main() {
assert(func0(3) == 27);
assert(func0(7) == 175);
assert(func0(10) == 370);
return 0;
}
| O3 | cpp | func0(int):
endbr64
mov %edi,%eax
lea 0x0(,%rdi,4),%edx
imul %edi,%eax
sub %edx,%edi
lea (%rdi,%rax,4),%eax
retq
nopw %cs:0x0(%rax,%rax,1)
| _Z5func0i:
endbr64
mov eax, edi
lea edx, ds:0[rdi*4]
imul eax, edi
sub edi, edx
lea eax, [rdi+rax*4]
retn | long long func0(int a1)
{
return (unsigned int)(-3 * a1 + 4 * a1 * a1);
} | func0:
ENDBR64
MOV EAX,EDI
LEA EDX,[RDI*0x4]
IMUL EAX,EDI
SUB EDI,EDX
LEA EAX,[RDI + RAX*0x4]
RET | /* func0(int) */
int func0(int param_1)
{
return param_1 * -3 + param_1 * param_1 * 4;
} |
1,116 | func0 |
#include <vector>
#include <assert.h>
| std::pair<bool, int> func0(const std::vector<int>& dlist, int item) {
int pos = 0;
bool found = false;
while (pos < dlist.size() && !found) {
if (dlist[pos] == item) {
found = true;
} else {
pos++;
}
}
return {found, pos};
}
| int main() {
assert(func0({11, 23, 58, 31, 56, 77, 43, 12, 65, 19}, 31) == std::make_pair(true, 3));
assert(func0({12, 32, 45, 62, 35, 47, 44, 61}, 61) == std::make_pair(true, 7));
assert(func0({9, 10, 17, 19, 22, 39, 48, 56}, 48) == std::make_pair(true, 6));
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x38,%rsp
mov %rdi,-0x38(%rbp)
mov %esi,-0x3c(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
movl $0x0,-0x24(%rbp)
movb $0x0,-0x25(%rbp)
mov -0x24(%rbp),%eax
movslq %eax,... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 38h
mov [rbp+var_38], rdi
mov [rbp+var_3C], esi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov [rbp+var_24], 0
mov [rbp+var_25], 0
jmp short loc_12A9
loc_1279:
mov eax, [rbp+var_24]
mo... | long long func0(long long a1, int a2)
{
char v4; // [rsp+1Bh] [rbp-25h] BYREF
int v5; // [rsp+1Ch] [rbp-24h] BYREF
_QWORD v6[3]; // [rsp+20h] [rbp-20h] BYREF
v6[1] = __readfsqword(0x28u);
v5 = 0;
v4 = 0;
while ( v5 < (unsigned long long)std::vector<int>::size(a1) && v4 != 1 )
{
if ( a2 == *(_DWORD... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x38],RDI
MOV dword ptr [RBP + -0x3c],ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV dword ptr [RBP + -0x24],0x0
MOV byte ptr [RBP + -0x25],0x0
JMP 0x001012a9
LAB_00101279:
MOV EAX,dword ptr [RBP + -0x24]
MO... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
int8 func0(vector *param_1,int param_2)
{
bool bVar1;
int *piVar2;
ulong uVar3;
ulong uVar4;
long in_FS_OFFSET;
bool local_2d;
int local_2c;
int8 local_28;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_2c = 0;
... |
1,117 | func0 |
#include <vector>
#include <assert.h>
| std::pair<bool, int> func0(const std::vector<int>& dlist, int item) {
int pos = 0;
bool found = false;
while (pos < dlist.size() && !found) {
if (dlist[pos] == item) {
found = true;
} else {
pos++;
}
}
return {found, pos};
}
| int main() {
assert(func0({11, 23, 58, 31, 56, 77, 43, 12, 65, 19}, 31) == std::make_pair(true, 3));
assert(func0({12, 32, 45, 62, 35, 47, 44, 61}, 61) == std::make_pair(true, 7));
assert(func0({9, 10, 17, 19, 22, 39, 48, 56}, 48) == std::make_pair(true, 6));
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
push %rbx
mov (%rdi),%r11
mov 0x8(%rdi),%r9
sub %r11,%r9
sar $0x2,%r9
mov $0x0,%edx
mov $0x0,%ebx
mov $0x1,%r10d
mov %edx,%eax
cmp %rdx,%r9
setbe %dil
lea (%r11,%rdx,4),%r8
mov %ebx,%ecx
test %dil,%dil
jne 1252 <... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
mov r8, [rdi]
mov rdi, [rdi+8]
sub rdi, r8
sar rdi, 2
mov edx, 0
mov r10d, 0
mov r9d, 1
jmp short loc_1232
loc_122E:
add rdx, 1
loc_1232:
cmp rdx, rdi
setnb cl
mov eax, r10d
loc_123B:
test cl, cl
jnz short loc_124E
test al, al... | unsigned long long func0(long long *a1, int a2)
{
long long v2; // r8
unsigned long long v3; // rdi
unsigned long long v4; // rdx
char v5; // al
v2 = *a1;
v3 = (a1[1] - *a1) >> 2;
v4 = 0LL;
LABEL_3:
v5 = 0;
while ( v4 < v3 && !v5 )
{
v5 = 1;
if ( *(_DWORD *)(v2 + 4 * v4) != a2 )
{
... | func0:
ENDBR64
MOV R8,qword ptr [RDI]
MOV RDI,qword ptr [RDI + 0x8]
SUB RDI,R8
SAR RDI,0x2
MOV EDX,0x0
MOV R10D,0x0
MOV R9D,0x1
JMP 0x00101232
LAB_0010122e:
ADD RDX,0x1
LAB_00101232:
CMP RDX,RDI
SETNC CL
MOV EAX,R10D
LAB_0010123b:
TEST CL,CL
JNZ 0x0010124e
TEST AL,AL
JNZ 0x0010124e
MOV EAX,R9D
CMP dword ptr [R8 + RDX*0... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
ulong func0(vector *param_1,int param_2)
{
bool bVar1;
ulong uVar2;
uVar2 = 0;
do {
bVar1 = false;
do {
if (((ulong)(*(long *)(param_1 + 8) - *(long *)param_1 >> 2) <= uVar2) || (bVar1)) {
return (ulong)bVar1 | uVar2 << 0... |
1,118 | func0 |
#include <vector>
#include <assert.h>
| std::pair<bool, int> func0(const std::vector<int>& dlist, int item) {
int pos = 0;
bool found = false;
while (pos < dlist.size() && !found) {
if (dlist[pos] == item) {
found = true;
} else {
pos++;
}
}
return {found, pos};
}
| int main() {
assert(func0({11, 23, 58, 31, 56, 77, 43, 12, 65, 19}, 31) == std::make_pair(true, 3));
assert(func0({12, 32, 45, 62, 35, 47, 44, 61}, 61) == std::make_pair(true, 7));
assert(func0({9, 10, 17, 19, 22, 39, 48, 56}, 48) == std::make_pair(true, 6));
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
mov (%rdi),%rcx
mov 0x8(%rdi),%rdi
sub %rcx,%rdi
sar $0x2,%rdi
je 14a0 <_Z5func0RKSt6vectorIiSaIiEEi+0x50>
xor %edx,%edx
nopw %cs:0x0(%rax,%rax,1)
mov %edx,%eax
cmp %esi,(%rcx,%rdx,4)
je 1490 <_Z5func0RKSt6vectorIiSaIiEEi+... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
mov rax, [rdi]
mov rcx, [rdi+8]
xor edx, edx
sub rcx, rax
sar rcx, 2
cmp rdx, rcx
jz short loc_13EA
loc_13D9:
lea rdi, [rdx+1]
cmp esi, [rax+rdx*4]
jz short loc_13F0
mov rdx, rdi
cmp rdx, rcx
jnz short loc_13D9
loc_13EA:
xor ... | long long func0(long long *a1, int a2)
{
long long v2; // rax
long long v3; // rdx
long long v4; // rcx
long long v5; // rdi
long long v6; // rax
v2 = *a1;
v3 = 0LL;
v4 = (a1[1] - *a1) >> 2;
if ( v4 )
{
while ( 1 )
{
v5 = v3 + 1;
if ( a2 == *(_DWORD *)(v2 + 4 * v3) )
br... | func0:
ENDBR64
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x8]
XOR EDX,EDX
SUB RCX,RAX
SAR RCX,0x2
CMP RDX,RCX
JZ 0x001013ea
LAB_001013d9:
LEA RDI,[RDX + 0x1]
CMP ESI,dword ptr [RAX + RDX*0x4]
JZ 0x001013f0
MOV RDX,RDI
CMP RDX,RCX
JNZ 0x001013d9
LAB_001013ea:
XOR EAX,EAX
JMP 0x001013f5
LAB_001013f0:
MOV EAX,0x1
L... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
ulong func0(vector *param_1,int param_2)
{
ulong uVar1;
long lVar2;
long lVar3;
long lVar4;
lVar3 = 0;
lVar2 = *(long *)(param_1 + 8) - *(long *)param_1 >> 2;
lVar4 = lVar3;
if (lVar2 != 0) {
do {
lVar3 = lVar4 + 1;
if ... |
1,119 | func0 |
#include <vector>
#include <assert.h>
| std::pair<bool, int> func0(const std::vector<int>& dlist, int item) {
int pos = 0;
bool found = false;
while (pos < dlist.size() && !found) {
if (dlist[pos] == item) {
found = true;
} else {
pos++;
}
}
return {found, pos};
}
| int main() {
assert(func0({11, 23, 58, 31, 56, 77, 43, 12, 65, 19}, 31) == std::make_pair(true, 3));
assert(func0({12, 32, 45, 62, 35, 47, 44, 61}, 61) == std::make_pair(true, 7));
assert(func0({9, 10, 17, 19, 22, 39, 48, 56}, 48) == std::make_pair(true, 6));
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&, int):
endbr64
mov (%rdi),%rcx
mov 0x8(%rdi),%rdi
sub %rcx,%rdi
sar $0x2,%rdi
je 1440 <_Z5func0RKSt6vectorIiSaIiEEi+0x50>
xor %edx,%edx
nopw %cs:0x0(%rax,%rax,1)
mov %edx,%eax
cmp %esi,(%rcx,%rdx,4)
je 1430 <_Z5func0RKSt6vectorIiSaIiEEi+... | _Z5func0RKSt6vectorIiSaIiEEi:
endbr64
mov rcx, [rdi]
mov rax, [rdi+8]
xor edx, edx
sub rax, rcx
sar rax, 2
cmp rdx, rax
jz short loc_141A
loc_1409:
lea rdi, [rdx+1]
cmp [rcx+rdx*4], esi
jz short loc_1420
mov rdx, rdi
cmp rdx, rax
jnz short loc_1409
loc_141A:
xor ... | long long func0(long long *a1, int a2)
{
long long v2; // rcx
long long v3; // rdx
long long v4; // rax
long long v5; // rdi
char v6; // al
v2 = *a1;
v3 = 0LL;
v4 = (a1[1] - *a1) >> 2;
if ( v4 )
{
while ( 1 )
{
v5 = v3 + 1;
if ( *(_DWORD *)(v2 + 4 * v3) == a2 )
break;
... | func0:
ENDBR64
MOV RCX,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x8]
XOR EDX,EDX
SUB RAX,RCX
SAR RAX,0x2
CMP RDX,RAX
JZ 0x0010141a
LAB_00101409:
LEA RDI,[RDX + 0x1]
CMP dword ptr [RCX + RDX*0x4],ESI
JZ 0x00101420
MOV RDX,RDI
CMP RDX,RAX
JNZ 0x00101409
LAB_0010141a:
XOR EAX,EAX
JMP 0x00101425
LAB_00101420:
MOV EAX,0x1
L... | /* func0(std::vector<int, std::allocator<int> > const&, int) */
ulong func0(vector *param_1,int param_2)
{
uint uVar1;
long lVar2;
long lVar3;
long lVar4;
lVar3 = 0;
lVar2 = *(long *)(param_1 + 8) - *(long *)param_1 >> 2;
lVar4 = lVar3;
if (lVar2 != 0) {
do {
lVar3 = lVar4 + 1;
if (... |
1,120 | func0 |
#include <iostream>
#include <vector>
#include <set>
#include <assert.h>
| bool func0(std::vector<int> test_list) {
std::set<int> unique_elements(test_list.begin(), test_list.end());
if (test_list.size() > unique_elements.size()) {
return false;
}
return true;
}
| int main() {
assert(func0({1, 2, 3}) == true);
assert(func0({1, 2, 1, 2}) == false);
assert(func0({1, 2, 3, 4, 5}) == true);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x58,%rsp
mov %rdi,-0x58(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x58(%rbp),%rax
mov %rax,%rdi
callq 17b2 <_ZNSt6vectorIiSaIiEE3endEv>
mov %rax,%rbx
mov -0x58(%rbp),%r... | _Z5func0St6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 58h
mov [rbp+var_58], rdi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_58]
mov rdi, rax
call _ZNSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void)
mov rbx, rax
mov rax, [... | long long func0(long long a1)
{
long long v1; // rbx
long long v2; // rax
unsigned long long v3; // rbx
_BYTE v5[56]; // [rsp+10h] [rbp-50h] BYREF
unsigned long long v6; // [rsp+48h] [rbp-18h]
v6 = __readfsqword(0x28u);
v1 = std::vector<int>::end(a1);
v2 = std::vector<int>::begin(a1);
std::set<int>:... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RBP + -0x58],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,RAX
CALL 0x00101788
MOV RBX,RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,RAX
CALL 0x0010173c
MOV RCX,RAX
LEA RAX,[RBP +... | /* func0(std::vector<int, std::allocator<int> >) */
bool func0(vector param_1)
{
__normal_iterator _Var1;
__normal_iterator _Var2;
ulong uVar3;
ulong uVar4;
int4 in_register_0000003c;
vector<int,std::allocator<int>> *this;
long in_FS_OFFSET;
set<int,std::less<int>,std::allocator<int>> local_58 [56];
... |
1,121 | func0 |
#include <iostream>
#include <vector>
#include <set>
#include <assert.h>
| bool func0(std::vector<int> test_list) {
std::set<int> unique_elements(test_list.begin(), test_list.end());
if (test_list.size() > unique_elements.size()) {
return false;
}
return true;
}
| int main() {
assert(func0({1, 2, 3}) == true);
assert(func0({1, 2, 1, 2}) == false);
assert(func0({1, 2, 3, 4, 5}) == true);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x58,%rsp
mov %rdi,%r12
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
mov 0x8(%rdi),%r14
mov (%rdi),%rbx
movl $0x0,0x18(%rsp)
movq $0x0,0x20(%rsp)
lea 0x1... | _Z5func0St6vectorIiSaIiEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 58h
mov [rsp+88h+var_80], rdi
mov rax, fs:28h
mov [rsp+88h+var_40], rax
xor eax, eax
mov r14, [rdi+8]
mov rbx, [rdi]
mov [rsp+88h+var_70], 0
mov [rsp+88h+var_68], 0
lea... | long long func0(long long a1)
{
_DWORD *v1; // r14
_DWORD *v2; // rbx
long long insert_hint_unique_pos; // rax
int *v4; // rdx
int *v5; // rbp
bool v6; // r12
long long v7; // rax
_BYTE v9[8]; // [rsp+10h] [rbp-78h] BYREF
int v10; // [rsp+18h] [rbp-70h] BYREF
long long v11; // [rsp+20h] [rbp-68h]
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RSP + 0x8],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
MOV R14,qword ptr [RDI + 0x8]
MOV RBX,qword ptr [RDI]
MOV dword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x0
LEA RAX,[RSP + 0x18]
... | /* func0(std::vector<int, std::allocator<int> >) */
ulong func0(vector param_1)
{
int *piVar1;
_Rb_tree_node_base *p_Var2;
_Rb_tree_node_base *p_Var3;
int *piVar4;
int4 in_register_0000003c;
long *plVar5;
bool bVar6;
long in_FS_OFFSET;
bool bVar7;
int auVar8 [16];
_Rb_tree<int,int,std::_Identity... |
1,122 | func0 |
#include <iostream>
#include <vector>
#include <set>
#include <assert.h>
| bool func0(std::vector<int> test_list) {
std::set<int> unique_elements(test_list.begin(), test_list.end());
if (test_list.size() > unique_elements.size()) {
return false;
}
return true;
}
| int main() {
assert(func0({1, 2, 3}) == true);
assert(func0({1, 2, 1, 2}) == false);
assert(func0({1, 2, 3, 4, 5}) == true);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x58,%rsp
mov 0x8(%rdi),%r15
mov (%rdi),%rbx
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x18(%rsp),%r13
movl $0x0,0x18(%rsp)
movq $0x0,0x20(%rsp)
mov ... | _Z5func0St6vectorIiSaIiEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 58h
mov r14, [rdi+8]
mov rbp, [rdi]
mov [rsp+88h+var_80], rdi
lea r13, [rsp+88h+var_70]
mov rax, fs:28h
mov [rsp+88h+var_40], rax
xor eax, eax
mov [rsp+88h+var_70], 0
m... | long long func0(signed int **a1)
{
signed int *v1; // r14
signed int *v2; // rbp
unsigned long long v3; // r12
signed int v4; // r15d
int *v5; // rbx
long long insert_unique_pos; // rax
int *v7; // rdx
bool v8; // al
bool v9; // r12
long long v10; // rax
_QWORD *v11; // rbx
void *v12; // rdi
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x58
MOV R14,qword ptr [RDI + 0x8]
MOV RBP,qword ptr [RDI]
MOV qword ptr [RSP + 0x8],RDI
LEA R13,[RSP + 0x18]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
MOV dword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x0
... | /* func0(std::vector<int, std::allocator<int> >) */
ulong func0(vector param_1)
{
uint uVar1;
uint *puVar2;
void *pvVar3;
void *pvVar4;
_Rb_tree_node_base *p_Var5;
_Rb_tree_node_base *p_Var6;
uint *puVar7;
ulong uVar8;
int4 in_register_0000003c;
long *plVar9;
long in_FS_OFFSET;
bool bVar10;
... |
1,123 | func0 |
#include <iostream>
#include <vector>
#include <set>
#include <assert.h>
| bool func0(std::vector<int> test_list) {
std::set<int> unique_elements(test_list.begin(), test_list.end());
if (test_list.size() > unique_elements.size()) {
return false;
}
return true;
}
| int main() {
assert(func0({1, 2, 3}) == true);
assert(func0({1, 2, 1, 2}) == false);
assert(func0({1, 2, 3, 4, 5}) == true);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> >):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x48,%rsp
mov 0x8(%rdi),%r15
mov (%rdi),%rbx
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
lea 0x8(%rsp),%r14
movl $0x0,0x8(%rsp)
movq $0x0,0x10(%rsp)
mov ... | _Z5func0St6vectorIiSaIiEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 58h
mov r13, [rdi+8]
mov rbp, [rdi]
mov rax, fs:28h
mov [rsp+88h+var_40], rax
xor eax, eax
lea r12, [rsp+88h+var_70]
mov [rsp+88h+var_70], 0
mov [rsp+88h+var_68], 0
mov... | long long func0(int **a1)
{
int *v1; // r13
int *v2; // rbp
unsigned long long v3; // r15
int v4; // ecx
int *v5; // rbx
bool v6; // r15
long long v7; // rax
_QWORD *v8; // rbx
void *v9; // rdi
int v11; // edx
int *v12; // rax
long long v13; // rax
int v14; // [rsp+Ch] [rbp-7Ch]
int v15; //... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x58
MOV R13,qword ptr [RDI + 0x8]
MOV RBP,qword ptr [RDI]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x48],RAX
XOR EAX,EAX
LEA R12,[RSP + 0x18]
MOV dword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x0
MOV qword ptr [RSP + 0x28],R12... | /* func0(std::vector<int, std::allocator<int> >) */
ulong func0(vector param_1)
{
int iVar1;
int *piVar2;
_Rb_tree_node_base *p_Var3;
long lVar4;
int iVar5;
_Rb_tree_node_base *p_Var6;
int *piVar7;
ulong uVar8;
int4 in_register_0000003c;
long *plVar9;
bool bVar10;
long in_FS_OFFSET;
int4 loc... |
1,124 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& nums1, const std::vector<int>& nums2) {
std::vector<int> result;
for (size_t i = 0; i < nums1.size(); ++i) {
result.push_back(nums1[i] - nums2[i]);
}
return result;
}
| int main() {
assert((func0({1, 2, 3}, {4, 5, 6}) == std::vector<int>{-3, -3, -3}));
assert((func0({1, 2}, {3, 4}) == std::vector<int>{-2, -2}));
assert((func0({90, 120}, {50, 70}) == std::vector<int>{40, 50}));
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x48,%rsp
mov %rdi,-0x38(%rbp)
mov %rsi,-0x40(%rbp)
mov %rdx,-0x48(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x38(%rbp)... | _Z5func0RKSt6vectorIiSaIiEES3_:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 48h
mov [rbp+var_38], rdi
mov [rbp+var_40], rsi
mov [rbp+var_48], rdx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_38]
mov rdi, rax
call _ZNSt6vectorIiSaIiEEC2Ev; std:... | long long func0(long long a1, long long a2, long long a3)
{
int v3; // ebx
unsigned long long v4; // rax
int v7; // [rsp+2Ch] [rbp-24h] BYREF
unsigned long long i; // [rsp+30h] [rbp-20h]
unsigned long long v9; // [rsp+38h] [rbp-18h]
v9 = __readfsqword(0x28u);
std::vector<int>::vector(a1);
for ( i = 0L... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x38],RDI
MOV qword ptr [RBP + -0x40],RSI
MOV qword ptr [RBP + -0x48],RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,RAX
CALL 0x00101c04
MOV qword ptr [RBP + -0x20],0x0
JM... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&) */
vector * func0(vector *param_1,vector *param_2)
{
int iVar1;
int *piVar2;
ulong uVar3;
vector<int,std::allocator<int>> *in_RDX;
long in_FS_OFFSET;
int local_2c;
ulong local_28;
long local_20;
... |
1,125 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& nums1, const std::vector<int>& nums2) {
std::vector<int> result;
for (size_t i = 0; i < nums1.size(); ++i) {
result.push_back(nums1[i] - nums2[i]);
}
return result;
}
| int main() {
assert((func0({1, 2, 3}, {4, 5, 6}) == std::vector<int>{-3, -3, -3}));
assert((func0({1, 2}, {3, 4}) == std::vector<int>{-2, -2}));
assert((func0({90, 120}, {50, 70}) == std::vector<int>{40, 50}));
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x10,%rsp
mov %rdi,%rbp
mov %rdx,%r13
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi... | _Z5func0RKSt6vectorIiSaIiEES3_:
endbr64
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 10h
mov rbp, rdi
mov r13, rdx
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
mov rdx, [r... | _QWORD * func0(_QWORD *a1, long long *a2, _QWORD *a3)
{
long long v4; // rdx
unsigned long long v6; // rbx
int v7; // eax
int *v8; // rsi
int v10; // [rsp+4h] [rbp-34h] BYREF
unsigned long long v11; // [rsp+8h] [rbp-30h]
v11 = __readfsqword(0x28u);
*a1 = 0LL;
a1[1] = 0LL;
a1[2] = 0LL;
v4 = *a2;
... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x10
MOV RBP,RDI
MOV R13,RDX
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 RDX,qword ptr [RSI]
CMP RDX,qword ptr [RSI + 0x8]
JZ 0x00101313
... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&) */
vector * func0(vector *param_1,vector *param_2)
{
int *piVar1;
long *in_RDX;
long lVar2;
ulong uVar3;
long in_FS_OFFSET;
int local_34;
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28... |
1,126 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& nums1, const std::vector<int>& nums2) {
std::vector<int> result;
for (size_t i = 0; i < nums1.size(); ++i) {
result.push_back(nums1[i] - nums2[i]);
}
return result;
}
| int main() {
assert((func0({1, 2, 3}, {4, 5, 6}) == std::vector<int>{-3, -3, -3}));
assert((func0({1, 2}, {3, 4}) == std::vector<int>{-2, -2}));
assert((func0({90, 120}, {50, 70}) == std::vector<int>{40, 50}));
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %r14
push %r13
mov %rdx,%r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x10,%rsp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi... | _Z5func0RKSt6vectorIiSaIiEES3_:
endbr64
push r14
pxor xmm0, xmm0
push r13
mov r13, rdx
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 10h
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
movups xmmword ptr [rdi], xmm0
mov rdx, [rsi]
mov qword ptr [rdi+10h], 0
c... | long long func0(long long a1, long long *a2, _QWORD *a3)
{
long long v5; // rdx
int *v7; // rdi
int *v8; // rsi
long long v9; // rbx
int v10; // eax
int v12; // [rsp+0h] [rbp-34h] BYREF
unsigned long long v13; // [rsp+4h] [rbp-30h]
v13 = __readfsqword(0x28u);
*(_OWORD *)a1 = 0LL;
v5 = *a2;
*(_QW... | func0:
ENDBR64
PUSH R14
PXOR XMM0,XMM0
PUSH R13
MOV R13,RDX
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x10
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOVUPS xmmword ptr [RDI],XMM0
MOV RDX,qword ptr [RSI]
MOV qword ptr [RDI + 0x10],0x0
CMP qword ptr [RSI + 0x8],RDX
JZ 0x001017a0
MOV R12,R... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&) */
vector * func0(vector *param_1,vector *param_2)
{
long *in_RDX;
long lVar1;
ulong uVar2;
int *piVar3;
int *piVar4;
long in_FS_OFFSET;
int local_34;
long local_30;
local_30 = *(long *)(in_F... |
1,127 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& nums1, const std::vector<int>& nums2) {
std::vector<int> result;
for (size_t i = 0; i < nums1.size(); ++i) {
result.push_back(nums1[i] - nums2[i]);
}
return result;
}
| int main() {
assert((func0({1, 2, 3}, {4, 5, 6}) == std::vector<int>{-3, -3, -3}));
assert((func0({1, 2}, {3, 4}) == std::vector<int>{-2, -2}));
assert((func0({90, 120}, {50, 70}) == std::vector<int>{40, 50}));
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %r14
pxor %xmm0,%xmm0
push %r13
mov %rdx,%r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x10,%rsp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,0x10(%rd... | _Z5func0RKSt6vectorIiSaIiEES3_:
endbr64
push r14
pxor xmm0, xmm0
push r13
mov r13, rdx
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 10h
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
movups xmmword ptr [rdi], xmm0
mov rdx, [rsi]
mov qword ptr [rdi+10h], 0
c... | long long func0(long long a1, long long *a2, _QWORD *a3)
{
long long v5; // rdx
int *v7; // rdi
int *v8; // rsi
long long v9; // rbx
int v10; // eax
int v12; // [rsp+0h] [rbp-34h] BYREF
unsigned long long v13; // [rsp+4h] [rbp-30h]
v13 = __readfsqword(0x28u);
*(_OWORD *)a1 = 0LL;
v5 = *a2;
*(_QW... | func0:
ENDBR64
PUSH R14
PXOR XMM0,XMM0
PUSH R13
MOV R13,RDX
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x10
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOVUPS xmmword ptr [RDI],XMM0
MOV RDX,qword ptr [RSI]
MOV qword ptr [RDI + 0x10],0x0
CMP qword ptr [RSI + 0x8],RDX
JZ 0x001017a0
MOV R12,R... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&) */
vector * func0(vector *param_1,vector *param_2)
{
long *in_RDX;
long lVar1;
ulong uVar2;
int *piVar3;
int *piVar4;
long in_FS_OFFSET;
int local_34;
long local_30;
local_30 = *(long *)(in_F... |
1,128 | func0 |
#include <iostream>
#include <assert.h>
| bool func0(int n) {
for (int i = 0; i < 10; ++i) {
int temp = n;
int count = 0;
while (temp) {
if (temp % 10 == i) {
count++;
}
if (count > i) {
return false;
}
temp /= 10;
}
... | int main() {
assert(func0(1234) == true);
assert(func0(51241) == false);
assert(func0(321) == true);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
movl $0x0,-0xc(%rbp)
cmpl $0x9,-0xc(%rbp)
jg 121f <_Z5func0i+0x96>
mov -0x14(%rbp),%eax
mov %eax,-0x8(%rbp)
movl $0x0,-0x4(%rbp)
cmpl $0x0,-0x8(%rbp)
je 1216 <_Z5func0i+0x8d>
mov -0x8(%rbp),%ecx
movslq %ecx,%rax
imul $0x... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_C], 0
jmp short loc_11D6
loc_115D:
mov eax, [rbp+var_14]
mov [rbp+var_8], eax
mov [rbp+var_4], 0
jmp short loc_11CC
loc_116C:
mov ecx, [rbp+var_8]
movsxd rax, ecx
imul rax, 66666667h
shr rax, 20h
m... | long long func0(int a1)
{
int i; // [rsp+8h] [rbp-Ch]
int v3; // [rsp+Ch] [rbp-8h]
int v4; // [rsp+10h] [rbp-4h]
for ( i = 0; i <= 9; ++i )
{
v3 = a1;
v4 = 0;
while ( v3 )
{
if ( i == v3 % 10 )
++v4;
if ( v4 > i )
return 0LL;
v3 /= 10;
}
}
return 1LL... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0xc],0x0
JMP 0x001011d6
LAB_0010115d:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x8],EAX
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001011cc
LAB_0010116c:
MOV ECX,dword ptr [RBP + -0x8]
MOVSXD RAX,ECX
IMUL RAX,RAX,0x66666667... | /* func0(int) */
int8 func0(int param_1)
{
int local_14;
int local_10;
int local_c;
local_14 = 0;
do {
if (9 < local_14) {
return 1;
}
local_c = 0;
for (local_10 = param_1; local_10 != 0; local_10 = local_10 / 10) {
if (local_14 == local_10 % 10) {
local_c = local_c + ... |
1,129 | func0 |
#include <iostream>
#include <assert.h>
| bool func0(int n) {
for (int i = 0; i < 10; ++i) {
int temp = n;
int count = 0;
while (temp) {
if (temp % 10 == i) {
count++;
}
if (count > i) {
return false;
}
temp /= 10;
}
... | int main() {
assert(func0(1234) == true);
assert(func0(51241) == false);
assert(func0(321) == true);
return 0;
}
| O1 | cpp | func0(int):
endbr64
mov $0x0,%esi
mov %edi,%r8d
test %edi,%edi
je 11e8 <_Z5func0i+0x5f>
mov %r8d,%edx
mov $0x0,%ecx
movslq %edx,%rax
imul $0x66666667,%rax,%rax
sar $0x22,%rax
mov %edx,%r9d
sar $0x1f,%r9d
sub %r9d,%eax
lea (%rax,%rax,4),%eax
add %eax,%eax
mov %edx,%r10d
sub %e... | _Z5func0i:
endbr64
mov esi, 0
loc_1152:
mov edx, edi
mov ecx, 0
test edi, edi
jz short loc_11A6
loc_115D:
movsxd rax, edx
imul rax, 66666667h
sar rax, 22h
mov r8d, edx
sar r8d, 1Fh
sub eax, r8d
lea eax, [rax+rax*4]
add eax, eax
mov r8d, edx
sub r8d, eax
cmp r8... | long long func0(int a1)
{
int v1; // esi
int v2; // edx
int v3; // ecx
v1 = 0;
while ( 1 )
{
v2 = a1;
v3 = 0;
if ( a1 )
break;
LABEL_5:
if ( ++v1 == 10 )
return 1LL;
}
while ( 1 )
{
v3 += v2 % 10 == v1;
if ( v3 > v1 )
return 0LL;
v2 /= 10;
if ( !v2 )... | func0:
ENDBR64
MOV ESI,0x0
LAB_00101152:
MOV EDX,EDI
MOV ECX,0x0
TEST EDI,EDI
JZ 0x001011a6
LAB_0010115d:
MOVSXD RAX,EDX
IMUL RAX,RAX,0x66666667
SAR RAX,0x22
MOV R8D,EDX
SAR R8D,0x1f
SUB EAX,R8D
LEA EAX,[RAX + RAX*0x4]
ADD EAX,EAX
MOV R8D,EDX
SUB R8D,EAX
CMP R8D,ESI
SETZ AL
MOVZX EAX,AL
ADD ECX,EAX
CMP ECX,ESI
JG 0x001... | /* func0(int) */
int8 func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
iVar3 = 0;
do {
iVar1 = 0;
iVar2 = param_1;
if (param_1 != 0) {
do {
iVar1 = iVar1 + (uint)(iVar2 % 10 == iVar3);
if (iVar3 < iVar1) {
return 0;
}
iVar2 = iVar2 / 10;
... |
1,130 | func0 |
#include <iostream>
#include <assert.h>
| bool func0(int n) {
for (int i = 0; i < 10; ++i) {
int temp = n;
int count = 0;
while (temp) {
if (temp % 10 == i) {
count++;
}
if (count > i) {
return false;
}
temp /= 10;
}
... | int main() {
assert(func0(1234) == true);
assert(func0(51241) == false);
assert(func0(321) == true);
return 0;
}
| O2 | cpp | func0(int):
endbr64
xor %r8d,%r8d
test %edi,%edi
je 13a0 <_Z5func0i+0x50>
mov %edi,%edx
xor %esi,%esi
jmp 136e <_Z5func0i+0x1e>
nopl 0x0(%rax)
mov %eax,%edx
test %eax,%eax
je 13a0 <_Z5func0i+0x50>
movslq %edx,%rax
mov %edx,%ecx
imul $0x66666667,%rax,%rax
sar $0x1f,%ecx
sar $0x22,... | _Z5func0i:
endbr64
xor r8d, r8d
test edi, edi
jz short loc_1250
loc_11FB:
mov edx, edi
xor esi, esi
jmp short loc_120E
loc_1208:
mov edx, eax
test eax, eax
jz short loc_1240
loc_120E:
movsxd rax, edx
mov ecx, edx
imul rax, 66666667h
sar ecx, 1Fh
sar rax, 22h
sub e... | long long func0(int a1)
{
int v1; // r8d
int v2; // edx
int v3; // esi
int v4; // eax
v1 = 0;
if ( a1 )
{
do
{
v2 = a1;
v3 = 0;
do
{
v4 = v2 / 10;
v3 += v2 % 10 == v1;
if ( v1 < v3 )
return 0LL;
v2 /= 10;
}
while ( v4 ... | func0:
ENDBR64
XOR R8D,R8D
TEST EDI,EDI
JZ 0x00101250
LAB_001011fb:
MOV EDX,EDI
XOR ESI,ESI
JMP 0x0010120e
LAB_00101208:
MOV EDX,EAX
TEST EAX,EAX
JZ 0x00101240
LAB_0010120e:
MOVSXD RAX,EDX
MOV ECX,EDX
IMUL RAX,RAX,0x66666667
SAR ECX,0x1f
SAR RAX,0x22
SUB EAX,ECX
LEA ECX,[RAX + RAX*0x4]
ADD ECX,ECX
SUB EDX,ECX
CMP EDX,R... | /* func0(int) */
int8 func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
iVar4 = 0;
if (param_1 == 0) {
do {
iVar4 = iVar4 + 1;
} while (iVar4 != 10);
}
else {
do {
iVar3 = 0;
iVar2 = param_1;
do {
iVar1 = iVar2 / 10;
iVar3 = iVar3 +... |
1,131 | func0 |
#include <iostream>
#include <assert.h>
| bool func0(int n) {
for (int i = 0; i < 10; ++i) {
int temp = n;
int count = 0;
while (temp) {
if (temp % 10 == i) {
count++;
}
if (count > i) {
return false;
}
temp /= 10;
}
... | int main() {
assert(func0(1234) == true);
assert(func0(51241) == false);
assert(func0(321) == true);
return 0;
}
| O3 | cpp | func0(int):
endbr64
xor %r8d,%r8d
test %edi,%edi
je 12b0 <_Z5func0i+0x50>
mov %edi,%edx
xor %esi,%esi
jmp 127e <_Z5func0i+0x1e>
nopl 0x0(%rax)
mov %eax,%edx
test %eax,%eax
je 12b0 <_Z5func0i+0x50>
movslq %edx,%rax
mov %edx,%ecx
imul $0x66666667,%rax,%rax
sar $0x1f,%ecx
sar $0x22,... | _Z5func0i:
endbr64
xor r8d, r8d
test edi, edi
jz short loc_1220
loc_11CB:
mov edx, edi
xor esi, esi
jmp short loc_11DE
loc_11D8:
mov edx, eax
test eax, eax
jz short loc_1210
loc_11DE:
movsxd rax, edx
mov ecx, edx
imul rax, 66666667h
sar ecx, 1Fh
sar rax, 22h
sub e... | long long func0(int a1)
{
int v1; // r8d
int v2; // edx
int v3; // esi
int v4; // eax
v1 = 0;
if ( a1 )
{
do
{
v2 = a1;
v3 = 0;
do
{
v4 = v2 / 10;
v3 += v2 % 10 == v1;
if ( v1 < v3 )
return 0LL;
v2 /= 10;
}
while ( v4 ... | func0:
ENDBR64
XOR R8D,R8D
TEST EDI,EDI
JZ 0x00101220
LAB_001011cb:
MOV EDX,EDI
XOR ESI,ESI
JMP 0x001011de
LAB_001011d8:
MOV EDX,EAX
TEST EAX,EAX
JZ 0x00101210
LAB_001011de:
MOVSXD RAX,EDX
MOV ECX,EDX
IMUL RAX,RAX,0x66666667
SAR ECX,0x1f
SAR RAX,0x22
SUB EAX,ECX
LEA ECX,[RAX + RAX*0x4]
ADD ECX,ECX
SUB EDX,ECX
CMP EDX,R... | /* func0(int) */
int8 func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
iVar4 = 0;
if (param_1 == 0) {
do {
iVar4 = iVar4 + 1;
} while (iVar4 != 10);
}
else {
do {
iVar3 = 0;
iVar2 = param_1;
do {
iVar1 = iVar2 / 10;
iVar3 = iVar3 +... |
1,132 | func0 |
#include <vector>
#include <string>
#include <assert.h>
template<typename T>
| bool func0(const std::vector<T>& list, const T& element) {
for (const auto& v : list) {
if (v != element) {
return false;
}
}
return true;
}
| int main() {
assert(func0(std::vector<std::string>{"green", "orange", "black", "white"}, std::string("blue")) == false);
assert(func0(std::vector<int>{1, 2, 3, 4}, 7) == false);
assert(func0(std::vector<std::string>{"green", "green", "green", "green"}, std::string("green")) == true);
return 0;
}
| O0 | cpp | bool func0<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<... | _Z5func0INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEbRKSt6vectorIT_SaIS7_EERKS7_:
endbr64
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_38], rdi
mov [rbp+var_40], rsi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov rax, [rbp+var_38]
mov [rbp+var_18], rax
mov ... | long long func0<std::string>(long long a1, long long a2)
{
long long v3; // [rsp+18h] [rbp-28h] BYREF
_QWORD v4[2]; // [rsp+20h] [rbp-20h] BYREF
long long v5; // [rsp+30h] [rbp-10h]
unsigned long long v6; // [rsp+38h] [rbp-8h]
v6 = __readfsqword(0x28u);
v4[1] = a1;
v3 = std::vector<std::string>::begin(a... | func0<std::string>:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x38],RDI
MOV qword ptr [RBP + -0x40],RSI
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 + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,RAX
CALL 0x0010358a... | /* bool func0<std::string >(std::vector<std::string, std::allocator<std::string > > const&,
std::string const&) */
bool func0<std::string>(vector *param_1,string *param_2)
{
bool bVar1;
long in_FS_OFFSET;
int8 local_30;
int8 local_28;
vector<std::string,std::allocator<std::string>> *local_20;
string *l... |
1,133 | func0 |
#include <vector>
#include <string>
#include <assert.h>
template<typename T>
| bool func0(const std::vector<T>& list, const T& element) {
for (const auto& v : list) {
if (v != element) {
return false;
}
}
return true;
}
| int main() {
assert(func0(std::vector<std::string>{"green", "orange", "black", "white"}, std::string("blue")) == false);
assert(func0(std::vector<int>{1, 2, 3, 4}, 7) == false);
assert(func0(std::vector<std::string>{"green", "green", "green", "green"}, std::string("green")) == true);
return 0;
}
| O1 | cpp | bool func0<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<... | _Z5func0INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEbRKSt6vectorIT_SaIS7_EERKS7_:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov rbx, [rdi]
mov rbp, [rdi+8]
cmp rbp, rbx
jz short loc_1B03
mov r13, rsi
mov r12, [rsi+8]
jmp short loc_1AE3
loc_1AC5:
test ... | long long func0<std::string>(long long *a1, long long a2)
{
long long v2; // rbx
long long v3; // rbp
long long v4; // r12
size_t v5; // rdx
v2 = *a1;
v3 = a1[1];
if ( v3 == *a1 )
return 1LL;
v4 = *(_QWORD *)(a2 + 8);
while ( 1 )
{
v5 = *(_QWORD *)(v2 + 8);
if ( v5 != v4 )
return... | func0<std::string>:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RBX,qword ptr [RDI]
MOV RBP,qword ptr [RDI + 0x8]
CMP RBP,RBX
JZ 0x00101b03
MOV R13,RSI
MOV R12,qword ptr [RSI + 0x8]
JMP 0x00101ae3
LAB_00101ac5:
TEST RDX,RDX
JZ 0x00101ada
MOV RSI,qword ptr [R13]
MOV RDI,qword ptr [RBX]
CALL 0x00101150
TE... | /* bool func0<std::string >(std::vector<std::string, std::allocator<std::string > > const&,
std::string const&) */
bool func0<std::string>(vector *param_1,string *param_2)
{
int8 *puVar1;
size_t sVar2;
size_t __n;
int iVar3;
int8 *puVar4;
puVar4 = *(int8 **)param_1;
puVar1 = *(int8 **)(param_1 + 8... |
1,134 | func0 |
#include <vector>
#include <string>
#include <assert.h>
template<typename T>
| bool func0(const std::vector<T>& list, const T& element) {
for (const auto& v : list) {
if (v != element) {
return false;
}
}
return true;
}
| int main() {
assert(func0(std::vector<std::string>{"green", "orange", "black", "white"}, std::string("blue")) == false);
assert(func0(std::vector<int>{1, 2, 3, 4}, 7) == false);
assert(func0(std::vector<std::string>{"green", "green", "green", "green"}, std::string("green")) == true);
return 0;
}
| O2 | cpp | _Z5func0INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEbRKSt6vectorIT_SaIS7_EERKS7_:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov rbx, [rdi]
mov r12, [rdi+8]
cmp r12, rbx
jz short loc_18A1
mov rbp, [rsi+8]
mov r13, rsi
nop dword ptr [rax+00000000h]
loc_1... | long long func0<std::string>(long long *a1, long long a2)
{
long long v2; // rbx
long long v3; // r12
size_t v4; // rbp
v2 = *a1;
v3 = a1[1];
if ( v3 == *a1 )
return 1LL;
v4 = *(_QWORD *)(a2 + 8);
while ( *(_QWORD *)(v2 + 8) == v4 && (!v4 || !memcmp(*(const void **)v2, *(const void **)a2, v4)) )
... | func0<std::string>:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RBX,qword ptr [RDI]
MOV R12,qword ptr [RDI + 0x8]
CMP R12,RBX
JZ 0x001018a1
MOV RBP,qword ptr [RSI + 0x8]
MOV R13,RSI
NOP dword ptr [RAX]
LAB_00101868:
CMP qword ptr [RBX + 0x8],RBP
JZ 0x00101880
LAB_0010186e:
ADD RSP,0x8
XOR EAX,EAX
POP RB... | /* bool func0<std::string >(std::vector<std::string, std::allocator<std::string > > const&,
std::string const&) */
bool func0<std::string>(vector *param_1,string *param_2)
{
int8 *puVar1;
size_t __n;
int iVar2;
int8 *puVar3;
puVar3 = *(int8 **)param_1;
puVar1 = *(int8 **)(param_1 + 8);
if (puVar1 ... | |
1,135 | func0 |
#include <vector>
#include <string>
#include <assert.h>
template<typename T>
| bool func0(const std::vector<T>& list, const T& element) {
for (const auto& v : list) {
if (v != element) {
return false;
}
}
return true;
}
| int main() {
assert(func0(std::vector<std::string>{"green", "orange", "black", "white"}, std::string("blue")) == false);
assert(func0(std::vector<int>{1, 2, 3, 4}, 7) == false);
assert(func0(std::vector<std::string>{"green", "green", "green", "green"}, std::string("green")) == true);
return 0;
}
| O3 | cpp | |||||
1,136 | func0 |
#include <iostream>
#include <regex>
#include <string>
#include <cassert>
| std::string func0(const std::string &text) {
std::regex pattern("ab{2,3}");
if (std::regex_search(text, pattern)) {
return "Found a match!";
} else {
return "Not matched!";
}
}
| int main() {
assert(func0("ac") == "Not matched!");
assert(func0("dc") == "Not matched!");
assert(func0("abbbba") == "Found a match!");
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 $0x58,%rsp
mov %rdi,-0x58(%rbp)
mov %rsi,-0x60(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x40(%rbp),%rax
mov $0x10,%edx
lea ... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 68h
mov [rbp+var_68], rdi
mov [rbp+var_70], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_40]
mov edx, 10h
lea rcx, aAb23; "ab{2,3}"
mo... | long long func0(long long a1, long long a2)
{
char v3; // [rsp+1Fh] [rbp-51h] BYREF
char *v4; // [rsp+20h] [rbp-50h]
char *v5; // [rsp+28h] [rbp-48h]
_BYTE v6[40]; // [rsp+30h] [rbp-40h] BYREF
unsigned long long v7; // [rsp+58h] [rbp-18h]
v7 = __readfsqword(0x28u);
std::basic_regex<char,std::regex_trait... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x68
MOV qword ptr [RBP + -0x68],RDI
MOV qword ptr [RBP + -0x70],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x40]
MOV EDX,0x10
LEA RCX,[0x132051]
MOV RSI,RCX
MOV RDI,RAX
LAB_00104b43:
CALL 0x001061ba
LEA RCX,[RBP + -0x... | /* func0(std::string const&) */
string * func0(string *param_1)
{
bool bVar1;
string *in_RSI;
long in_FS_OFFSET;
allocator local_59;
allocator *local_58;
allocator *local_50;
regex local_48 [40];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
std::regex::basic_regex(local_48,"ab{2,3}... |
1,137 | func0 |
#include <iostream>
#include <regex>
#include <string>
#include <cassert>
| std::string func0(const std::string &text) {
std::regex pattern("ab{2,3}");
if (std::regex_search(text, pattern)) {
return "Found a match!";
} else {
return "Not matched!";
}
}
| int main() {
assert(func0("ac") == "Not matched!");
assert(func0("dc") == "Not matched!");
assert(func0("abbbba") == "Found a match!");
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 $0x58,%rsp
mov %rdi,%rbx
mov %rsi,%rbp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x20(%rsp),%r13
mov %r13,%rdi
callq 4730 <_ZN... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
push r12
push rbx
sub rsp, 58h
mov rbx, rdi
mov r14, rsi
mov rax, fs:28h
mov [rbp+var_28], rax
xor eax, eax
lea r12, [rbp+var_70]
lea rdi, [rbp+var_68]; this
call __Z... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV RBX,RDI
MOV R14,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
LEA R12,[RBP + -0x70]
LEA RDI,[RBP + -0x68]
CALL 0x001046f0
MOV qword ptr [RBP + -0x60],0x0
MOV qword ptr [RBP + -0x58],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;
bool bVar3;
int iVar4;
int8 *in_RSI;
long in_FS_OFFSET;
regex local_78 [8];
int local_70 [8];
int8 local_68;
_Sp_counted_base<(_Lock_policy)2> *lo... | |
1,138 | func0 |
#include <iostream>
#include <regex>
#include <string>
#include <cassert>
| std::string func0(const std::string &text) {
std::regex pattern("ab{2,3}");
if (std::regex_search(text, pattern)) {
return "Found a match!";
} else {
return "Not matched!";
}
}
| int main() {
assert(func0("ac") == "Not matched!");
assert(func0("dc") == "Not matched!");
assert(func0("abbbba") == "Found a match!");
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 $0x50,%rsp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x20(%rsp),%r13
lea 0x8(%rsp),%rbp... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r14
mov r14, rsi
push r13
lea r13, [rbp+var_70]
push r12
lea r12, [rbp+var_68]
push rbx
mov rbx, rdi
mov rdi, r12; this
sub rsp, 50h
mov rax, fs:28h
mov [rbp+var_28], rax... | long long func0(long long a1, long long *a2)
{
long long v3; // rdi
long long v4; // rsi
long long v5; // rsi
char v6; // r13
long long v7; // rdi
long long v8; // rdx
volatile signed __int32 *v9; // rcx
signed __int32 v10; // eax
long long v12; // rax
_BYTE v13[8]; // [rsp+0h] [rbp-70h] BYREF
_B... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R14
MOV R14,RSI
PUSH R13
LEA R13,[RBP + -0x70]
PUSH R12
LEA R12,[RBP + -0x68]
PUSH RBX
MOV RBX,RDI
MOV RDI,R12
SUB RSP,0x50
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
CALL 0x001036d0
LEA RDX,[0x11860a]
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;
bool bVar3;
int iVar4;
int8 *in_RSI;
long in_FS_OFFSET;
regex local_78 [8];
int local_70 [8];
int local_68 [16];
int local_58 [16];
int local_48 [16];
long local_30;
lo... |
1,139 | func0 |
#include <iostream>
#include <regex>
#include <string>
#include <cassert>
| std::string func0(const std::string &text) {
std::regex pattern("ab{2,3}");
if (std::regex_search(text, pattern)) {
return "Found a match!";
} else {
return "Not matched!";
}
}
| int main() {
assert(func0("ac") == "Not matched!");
assert(func0("dc") == "Not matched!");
assert(func0("abbbba") == "Found a match!");
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 $0x50,%rsp
mov %fs:0x28,%rax
mov %rax,0x48(%rsp)
xor %eax,%eax
lea 0x20(%rsp),%r13
lea 0x8(%rsp),%rbp... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
mov r15, rsi
push r14
push r13
push r12
push rbp
push rbx
mov rbx, rdi
sub rsp, 2B8h
mov rax, fs:28h
mov [rsp+2E8h+var_40], rax
xor eax, eax
lea r14, [rsp+2E8h+var_2A0]
mov rdi, r14; this
c... | long long func0(long long a1, unsigned long long *a2)
{
__m128i v3; // xmm0
long long v4; // rdi
void *v5; // rdi
void **v6; // rbp
unsigned long long v7; // r12
void *v8; // rdi
unsigned long long v9; // r13
unsigned long long v10; // rbp
long long v11; // rax
long long v12; // rcx
unsigned long... | func0:
ENDBR64
PUSH R15
MOV R15,RSI
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
SUB RSP,0x2b8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x2a8],RAX
XOR EAX,EAX
LEA R14,[RSP + 0x48]
MOV RDI,R14
CALL 0x00104730
LEA RDX,[0x11a64f]
PXOR XMM0,XMM0
LEA RDI,[RSP + 0x110]
MOV R8D,0x10
MOV RCX,R14
LEA RSI,[RD... | /* func0(std::string const&) */
string * func0(string *param_1)
{
ulong uVar1;
int8 uVar2;
ulong uVar3;
int auVar4 [16];
bool bVar5;
char cVar6;
long lVar7;
int8 *puVar8;
int8 *puVar9;
ulong uVar10;
ulong *puVar11;
long lVar12;
ulong uVar13;
ulong *in_RSI;
uint *puVar14;
_Match_mode _V... |
1,140 | func0 |
#include <vector>
#include <climits>
#include <assert.h>
| int func0(std::vector<int>& a, int n, int k) {
int max_so_far = INT_MIN;
int max_ending_here = 0;
for (int i = 0; i < n * k; i++) {
max_ending_here = max_ending_here + a[i % n];
if (max_so_far < max_ending_here) {
max_so_far = max_ending_here;
}
if (max_en... | int main() {
std::vector<int> v1 = {10, 20, -30, -1};
std::vector<int> v2 = {-1, 10, 20};
std::vector<int> v3 = {-1, -2, -3};
assert(func0(v1, 4, 3) == 30);
assert(func0(v2, 3, 2) == 59);
assert(func0(v3, 3, 3) == -1);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> >&, int, int):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
mov %edx,-0x20(%rbp)
movl $0x80000000,-0xc(%rbp)
movl $0x0,-0x8(%rbp)
movl $0x0,-0x4(%rbp)
mov -0x1c(%rbp),%eax
imul -0x20(%rbp),%eax
cmp %eax... | _Z5func0RSt6vectorIiSaIiEEii:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_20], edx
mov [rbp+var_C], 80000000h
mov [rbp+var_8], 0
mov [rbp+var_4], 0
jmp short loc_12B5
loc_1276:
mov eax, [rbp+var_4]
cdq
idiv [rbp+var_1C... | long long func0(long long a1, int a2, int a3)
{
unsigned int v5; // [rsp+14h] [rbp-Ch]
int v6; // [rsp+18h] [rbp-8h]
int i; // [rsp+1Ch] [rbp-4h]
v5 = 0x80000000;
v6 = 0;
for ( i = 0; i < a3 * a2; ++i )
{
v6 += *(_DWORD *)std::vector<int>::operator[](a1, i % a2);
if ( (int)v5 < v6 )
v5 = v... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0x20],EDX
MOV dword ptr [RBP + -0xc],0x80000000
MOV dword ptr [RBP + -0x8],0x0
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001012b5
LAB_00101276:
MOV EAX,dword ptr [RBP + -0x4]
CDQ
IDIV dword ... | /* func0(std::vector<int, std::allocator<int> >&, int, int) */
int func0(vector *param_1,int param_2,int param_3)
{
int *piVar1;
int4 local_14;
int4 local_10;
int4 local_c;
local_14 = -0x80000000;
local_10 = 0;
for (local_c = 0; local_c < param_2 * param_3; local_c = local_c + 1) {
piVar1 = (int ... |
1,141 | func0 |
#include <vector>
#include <climits>
#include <assert.h>
| int func0(std::vector<int>& a, int n, int k) {
int max_so_far = INT_MIN;
int max_ending_here = 0;
for (int i = 0; i < n * k; i++) {
max_ending_here = max_ending_here + a[i % n];
if (max_so_far < max_ending_here) {
max_so_far = max_ending_here;
}
if (max_en... | int main() {
std::vector<int> v1 = {10, 20, -30, -1};
std::vector<int> v2 = {-1, 10, 20};
std::vector<int> v3 = {-1, -2, -3};
assert(func0(v1, 4, 3) == 30);
assert(func0(v2, 3, 2) == 59);
assert(func0(v3, 3, 3) == -1);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> >&, int, int):
endbr64
imul %esi,%edx
mov %edx,%r9d
test %edx,%edx
jle 1259 <_Z5func0RSt6vectorIiSaIiEEii+0x50>
mov (%rdi),%r11
mov $0x0,%edi
mov $0x0,%ecx
mov $0x80000000,%r8d
mov $0x0,%r10d
mov %edi,%eax
cltd
idiv %esi
movslq %edx,%rdx
mov %e... | _Z5func0RSt6vectorIiSaIiEEii:
endbr64
imul edx, esi
mov r9d, edx
test edx, edx
jle short loc_1257
mov r10, [rdi]
mov edi, 0
mov ecx, 0
mov r8d, 80000000h
loc_122A:
mov eax, edi
cdq
idiv esi
movsxd rdx, edx
mov eax, ecx
add eax, [r10+rdx*4]
cmp r8d, eax
cmovl r8d, eax
... | long long func0(long long *a1, int a2, int a3)
{
long long v3; // r10
int v4; // edi
int v5; // ecx
unsigned int v6; // r8d
int v7; // eax
if ( a2 * a3 <= 0 )
{
return 0x80000000;
}
else
{
v3 = *a1;
v4 = 0;
v5 = 0;
v6 = 0x80000000;
do
{
v7 = *(_DWORD *)(v3 + 4LL *... | func0:
ENDBR64
IMUL EDX,ESI
MOV R9D,EDX
TEST EDX,EDX
JLE 0x00101257
MOV R10,qword ptr [RDI]
MOV EDI,0x0
MOV ECX,0x0
MOV R8D,0x80000000
LAB_0010122a:
MOV EAX,EDI
CDQ
IDIV ESI
MOVSXD RDX,EDX
MOV EAX,ECX
ADD EAX,dword ptr [R10 + RDX*0x4]
CMP R8D,EAX
CMOVL R8D,EAX
TEST EAX,EAX
MOV EDX,0x0
MOV ECX,EDX
CMOVNS ECX,EAX
ADD EDI... | /* func0(std::vector<int, std::allocator<int> >&, int, int) */
int func0(vector *param_1,int param_2,int param_3)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
if (param_3 * param_2 < 1) {
iVar4 = -0x80000000;
}
else {
iVar3 = 0;
iVar2 = 0;
iVar4 = -0x80000000;
do {
iVar1 = ... |
1,142 | func0 |
#include <vector>
#include <climits>
#include <assert.h>
| int func0(std::vector<int>& a, int n, int k) {
int max_so_far = INT_MIN;
int max_ending_here = 0;
for (int i = 0; i < n * k; i++) {
max_ending_here = max_ending_here + a[i % n];
if (max_so_far < max_ending_here) {
max_so_far = max_ending_here;
}
if (max_en... | int main() {
std::vector<int> v1 = {10, 20, -30, -1};
std::vector<int> v2 = {-1, 10, 20};
std::vector<int> v3 = {-1, -2, -3};
assert(func0(v1, 4, 3) == 30);
assert(func0(v2, 3, 2) == 59);
assert(func0(v3, 3, 3) == -1);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> >&, int, int):
endbr64
imul %esi,%edx
mov %edx,%r9d
test %edx,%edx
jle 14e0 <_Z5func0RSt6vectorIiSaIiEEii+0x50>
mov (%rdi),%r11
xor %ecx,%ecx
xor %edi,%edi
mov $0x80000000,%r8d
xor %r10d,%r10d
xchg %ax,%ax
mov %edi,%eax
cltd
idiv %esi
movslq %ed... | _Z5func0RSt6vectorIiSaIiEEii:
endbr64
imul edx, esi
mov r9d, edx
test edx, edx
jle short loc_14D0
mov r10, [rdi]
xor ecx, ecx
xor edi, edi
mov r8d, 80000000h
nop dword ptr [rax+rax+00h]
loc_14A0:
mov eax, edi
cdq
idiv esi
movsxd rdx, edx
mov eax, [r10+rdx*4]
add eax, ec... | long long func0(long long *a1, int a2, int a3)
{
long long v3; // r10
int v4; // ecx
int v5; // edi
unsigned int v6; // r8d
int v7; // eax
if ( a2 * a3 <= 0 )
return 0x80000000LL;
v3 = *a1;
v4 = 0;
v5 = 0;
v6 = 0x80000000;
do
{
v7 = v4 + *(_DWORD *)(v3 + 4LL * (v5 % a2));
if ( (int... | func0:
ENDBR64
IMUL EDX,ESI
MOV R9D,EDX
TEST EDX,EDX
JLE 0x001014d0
MOV R10,qword ptr [RDI]
XOR ECX,ECX
XOR EDI,EDI
MOV R8D,0x80000000
NOP dword ptr [RAX + RAX*0x1]
LAB_001014a0:
MOV EAX,EDI
CDQ
IDIV ESI
MOVSXD RDX,EDX
MOV EAX,dword ptr [R10 + RDX*0x4]
ADD EAX,ECX
CMP R8D,EAX
CMOVL R8D,EAX
XOR EDX,EDX
TEST EAX,EAX
MOV ... | /* func0(std::vector<int, std::allocator<int> >&, int, int) */
int func0(vector *param_1,int param_2,int param_3)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
if (0 < param_3 * param_2) {
iVar2 = 0;
iVar3 = 0;
iVar4 = -0x80000000;
do {
iVar1 = *(int *)(*(long *)param_1 + (long)(iVa... |
1,143 | func0 |
#include <vector>
#include <climits>
#include <assert.h>
| int func0(std::vector<int>& a, int n, int k) {
int max_so_far = INT_MIN;
int max_ending_here = 0;
for (int i = 0; i < n * k; i++) {
max_ending_here = max_ending_here + a[i % n];
if (max_so_far < max_ending_here) {
max_so_far = max_ending_here;
}
if (max_en... | int main() {
std::vector<int> v1 = {10, 20, -30, -1};
std::vector<int> v2 = {-1, 10, 20};
std::vector<int> v3 = {-1, -2, -3};
assert(func0(v1, 4, 3) == 30);
assert(func0(v2, 3, 2) == 59);
assert(func0(v3, 3, 3) == -1);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> >&, int, int):
endbr64
imul %esi,%edx
mov %edx,%r9d
test %edx,%edx
jle 15a0 <_Z5func0RSt6vectorIiSaIiEEii+0x50>
mov (%rdi),%r11
xor %ecx,%ecx
xor %edi,%edi
mov $0x80000000,%r8d
xor %r10d,%r10d
xchg %ax,%ax
mov %edi,%eax
cltd
idiv %esi
movslq %ed... | _Z5func0RSt6vectorIiSaIiEEii:
endbr64
imul edx, esi
mov r9d, edx
test edx, edx
jle short loc_1620
mov r10, [rdi]
xor ecx, ecx
xor edi, edi
mov r8d, 80000000h
nop dword ptr [rax+rax+00h]
loc_15F0:
mov eax, edi
cdq
idiv esi
movsxd rdx, edx
mov eax, [r10+rdx*4]
add eax, ec... | long long func0(long long *a1, int a2, int a3)
{
long long v3; // r10
int v4; // ecx
int v5; // edi
unsigned int v6; // r8d
int v7; // eax
if ( a2 * a3 <= 0 )
return 0x80000000LL;
v3 = *a1;
v4 = 0;
v5 = 0;
v6 = 0x80000000;
do
{
v7 = v4 + *(_DWORD *)(v3 + 4LL * (v5 % a2));
if ( (int... | func0:
ENDBR64
IMUL EDX,ESI
MOV R9D,EDX
TEST EDX,EDX
JLE 0x00101620
MOV R10,qword ptr [RDI]
XOR ECX,ECX
XOR EDI,EDI
MOV R8D,0x80000000
NOP dword ptr [RAX + RAX*0x1]
LAB_001015f0:
MOV EAX,EDI
CDQ
IDIV ESI
MOVSXD RDX,EDX
MOV EAX,dword ptr [R10 + RDX*0x4]
ADD EAX,ECX
CMP R8D,EAX
CMOVL R8D,EAX
XOR EDX,EDX
TEST EAX,EAX
MOV ... | /* func0(std::vector<int, std::allocator<int> >&, int, int) */
int func0(vector *param_1,int param_2,int param_3)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
if (0 < param_3 * param_2) {
iVar2 = 0;
iVar3 = 0;
iVar4 = -0x80000000;
do {
iVar1 = *(int *)(*(long *)param_1 + (long)(iVa... |
1,144 | func0 |
#include <cassert>
| int func0(int n) {
return static_cast<int>(2*n*(n+1)*(2*n+1)/3);
}
| int main() {
assert(func0(2) == 20);
assert(func0(3) == 56);
assert(func0(4) == 120);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x4(%rbp)
mov -0x4(%rbp),%eax
add $0x1,%eax
imul -0x4(%rbp),%eax
mov -0x4(%rbp),%edx
add %edx,%edx
add $0x1,%edx
imul %edx,%eax
add %eax,%eax
movslq %eax,%rdx
imul $0x55555556,%rdx,%rdx
shr $0x20,%rdx
sar $0x1f,%eax
mov %edx,... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov eax, [rbp+var_4]
add eax, 1
imul eax, [rbp+var_4]
mov edx, [rbp+var_4]
add edx, edx
add edx, 1
imul eax, edx
add eax, eax
movsxd rdx, eax
imul rdx, 55555556h
shr rdx, 20h
sar eax, 1Fh
sub edx, eax
... | long long func0(int a1)
{
return (unsigned int)(2 * (2 * a1 + 1) * a1 * (a1 + 1) / 3);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV EAX,dword ptr [RBP + -0x4]
ADD EAX,0x1
IMUL EAX,dword ptr [RBP + -0x4]
MOV EDX,dword ptr [RBP + -0x4]
ADD EDX,EDX
ADD EDX,0x1
IMUL EAX,EDX
ADD EAX,EAX
MOVSXD RDX,EAX
IMUL RDX,RDX,0x55555556
SHR RDX,0x20
SAR EAX,0x1f
SUB EDX,EAX
MOV EAX,EDX
POP RBP
R... | /* func0(int) */
int func0(int param_1)
{
return ((param_1 + 1) * param_1 * (param_1 * 2 + 1) * 2) / 3;
} |
1,145 | func0 |
#include <cassert>
| int func0(int n) {
return static_cast<int>(2*n*(n+1)*(2*n+1)/3);
}
| int main() {
assert(func0(2) == 20);
assert(func0(3) == 56);
assert(func0(4) == 120);
return 0;
}
| O1 | cpp | func0(int):
endbr64
lea 0x1(%rdi),%edx
imul %edi,%edx
lea 0x1(%rdi,%rdi,1),%eax
imul %eax,%edx
add %edx,%edx
movslq %edx,%rax
imul $0x55555556,%rax,%rax
shr $0x20,%rax
sar $0x1f,%edx
sub %edx,%eax
retq
| _Z5func0i:
endbr64
lea edx, [rdi+1]
imul edx, edi
lea eax, [rdi+rdi+1]
imul edx, eax
add edx, edx
movsxd rax, edx
imul rax, 55555556h
shr rax, 20h
sar edx, 1Fh
sub eax, edx
retn | long long func0(int a1)
{
return (unsigned int)(2 * (2 * a1 + 1) * a1 * (a1 + 1) / 3);
} | func0:
ENDBR64
LEA EDX,[RDI + 0x1]
IMUL EDX,EDI
LEA EAX,[RDI + RDI*0x1 + 0x1]
IMUL EDX,EAX
ADD EDX,EDX
MOVSXD RAX,EDX
IMUL RAX,RAX,0x55555556
SHR RAX,0x20
SAR EDX,0x1f
SUB EAX,EDX
RET | /* func0(int) */
int func0(int param_1)
{
return ((param_1 + 1) * param_1 * (param_1 * 2 + 1) * 2) / 3;
} |
1,146 | func0 |
#include <cassert>
| int func0(int n) {
return static_cast<int>(2*n*(n+1)*(2*n+1)/3);
}
| int main() {
assert(func0(2) == 20);
assert(func0(3) == 56);
assert(func0(4) == 120);
return 0;
}
| O2 | cpp | func0(int):
endbr64
lea 0x1(%rdi),%edx
lea 0x1(%rdi,%rdi,1),%eax
imul %edi,%edx
imul %eax,%edx
add %edx,%edx
movslq %edx,%rax
sar $0x1f,%edx
imul $0x55555556,%rax,%rax
shr $0x20,%rax
sub %edx,%eax
retq
nopw 0x0(%rax,%rax,1)
| _Z5func0i:
endbr64
lea edx, [rdi+1]
lea eax, [rdi+rdi+1]
imul edx, edi
imul edx, eax
add edx, edx
movsxd rax, edx
sar edx, 1Fh
imul rax, 55555556h
shr rax, 20h
sub eax, edx
retn | long long func0(int a1)
{
return (unsigned int)(2 * (2 * a1 + 1) * a1 * (a1 + 1) / 3);
} | func0:
ENDBR64
LEA EDX,[RDI + 0x1]
LEA EAX,[RDI + RDI*0x1 + 0x1]
IMUL EDX,EDI
IMUL EDX,EAX
ADD EDX,EDX
MOVSXD RAX,EDX
SAR EDX,0x1f
IMUL RAX,RAX,0x55555556
SHR RAX,0x20
SUB EAX,EDX
RET | /* func0(int) */
int func0(int param_1)
{
return ((param_1 + 1) * param_1 * (param_1 * 2 + 1) * 2) / 3;
} |
1,147 | func0 |
#include <cassert>
| int func0(int n) {
return static_cast<int>(2*n*(n+1)*(2*n+1)/3);
}
| int main() {
assert(func0(2) == 20);
assert(func0(3) == 56);
assert(func0(4) == 120);
return 0;
}
| O3 | cpp | func0(int):
endbr64
lea 0x1(%rdi),%edx
lea 0x1(%rdi,%rdi,1),%eax
imul %edi,%edx
imul %eax,%edx
add %edx,%edx
movslq %edx,%rax
sar $0x1f,%edx
imul $0x55555556,%rax,%rax
shr $0x20,%rax
sub %edx,%eax
retq
nopw 0x0(%rax,%rax,1)
| _Z5func0i:
endbr64
lea edx, [rdi+1]
lea eax, [rdi+rdi+1]
imul edx, edi
imul edx, eax
add edx, edx
movsxd rax, edx
sar edx, 1Fh
imul rax, 55555556h
shr rax, 20h
sub eax, edx
retn | long long func0(int a1)
{
return (unsigned int)(2 * (2 * a1 + 1) * a1 * (a1 + 1) / 3);
} | func0:
ENDBR64
LEA EDX,[RDI + 0x1]
LEA EAX,[RDI + RDI*0x1 + 0x1]
IMUL EDX,EDI
IMUL EDX,EAX
ADD EDX,EDX
MOVSXD RAX,EDX
SAR EDX,0x1f
IMUL RAX,RAX,0x55555556
SHR RAX,0x20
SUB EAX,EDX
RET | /* func0(int) */
int func0(int param_1)
{
return ((param_1 + 1) * param_1 * (param_1 * 2 + 1) * 2) / 3;
} |
1,148 | func0 |
#include <assert.h>
#include <vector>
| int func0(const std::vector<int>& arr, int N, int P) {
int current_element = 0;
for (int i = 0; i < N; ++i) {
if ((arr[i] * arr[i]) % P == 1) {
current_element += 1;
}
}
return current_element;
}
| int main() {
assert(func0({1, 6, 4, 5}, 4, 7) == 2);
assert(func0({1, 3, 8, 12, 12}, 5, 13) == 3);
assert(func0({2, 3, 4, 5}, 4, 6) == 1);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&, int, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x28,%rsp
mov %rdi,-0x28(%rbp)
mov %esi,-0x2c(%rbp)
mov %edx,-0x30(%rbp)
movl $0x0,-0x18(%rbp)
movl $0x0,-0x14(%rbp)
mov -0x14(%rbp),%eax
cmp -0x2c(%rbp),%eax
jge 12a1 <_Z5func0... | _Z5func0RKSt6vectorIiSaIiEEii:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 28h
mov [rbp+var_28], rdi
mov [rbp+var_2C], esi
mov [rbp+var_30], edx
mov [rbp+var_18], 0
mov [rbp+var_14], 0
jmp short loc_12B9
loc_1270:
mov eax, [rbp+var_14]
movsxd rdx, eax
mov rax, [rbp+var... | long long func0(long long a1, int a2, int a3)
{
int v3; // ebx
unsigned int v6; // [rsp+18h] [rbp-18h]
int i; // [rsp+1Ch] [rbp-14h]
v6 = 0;
for ( i = 0; i < a2; ++i )
{
v3 = *(_DWORD *)std::vector<int>::operator[](a1, i);
if ( v3 * *(_DWORD *)std::vector<int>::operator[](a1, i) % a3 == 1 )
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x28],RDI
MOV dword ptr [RBP + -0x2c],ESI
MOV dword ptr [RBP + -0x30],EDX
MOV dword ptr [RBP + -0x18],0x0
MOV dword ptr [RBP + -0x14],0x0
JMP 0x001012b9
LAB_00101270:
MOV EAX,dword ptr [RBP + -0x14]
MOVSXD RDX,EAX
MOV RAX,qword ptr [RBP + -... | /* func0(std::vector<int, std::allocator<int> > const&, int, int) */
int func0(vector *param_1,int param_2,int param_3)
{
int iVar1;
int *piVar2;
int4 local_20;
int4 local_1c;
local_20 = 0;
for (local_1c = 0; local_1c < param_2; local_1c = local_1c + 1) {
piVar2 = (int *)std::vector<int,std::alloca... |
1,149 | func0 |
#include <assert.h>
#include <vector>
| int func0(const std::vector<int>& arr, int N, int P) {
int current_element = 0;
for (int i = 0; i < N; ++i) {
if ((arr[i] * arr[i]) % P == 1) {
current_element += 1;
}
}
return current_element;
}
| int main() {
assert(func0({1, 6, 4, 5}, 4, 7) == 2);
assert(func0({1, 3, 8, 12, 12}, 5, 13) == 3);
assert(func0({2, 3, 4, 5}, 4, 6) == 1);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&, int, int):
endbr64
mov %edx,%r8d
test %esi,%esi
jle 1244 <_Z5func0RKSt6vectorIiSaIiEEii+0x3b>
mov (%rdi),%rcx
lea -0x1(%rsi),%eax
lea 0x4(%rcx,%rax,4),%rdi
mov $0x0,%esi
mov (%rcx),%eax
imul %eax,%eax
cltd
idiv %r8d
cmp $0x1,%edx
sete ... | _Z5func0RKSt6vectorIiSaIiEEii:
endbr64
mov r8d, edx
test esi, esi
jle short loc_1243
mov rcx, [rdi]
movsxd rsi, esi
lea rdi, [rcx+rsi*4]
mov esi, 0
loc_1223:
mov eax, [rcx]
imul eax, eax
cdq
idiv r8d
cmp edx, 1
setz al
movzx eax, al
add esi, eax
add rcx, 4
cmp rcx,... | long long func0(_DWORD **a1, int a2, int a3)
{
_DWORD *v3; // rcx
long long v4; // rdi
unsigned int v5; // esi
if ( a2 <= 0 )
{
return 0;
}
else
{
v3 = *a1;
v4 = (long long)&(*a1)[a2];
v5 = 0;
do
{
v5 += *v3 * *v3 % a3 == 1;
++v3;
}
while ( v3 != (_DWORD *)v... | func0:
ENDBR64
MOV R8D,EDX
TEST ESI,ESI
JLE 0x00101243
MOV RCX,qword ptr [RDI]
MOVSXD RSI,ESI
LEA RDI,[RCX + RSI*0x4]
MOV ESI,0x0
LAB_00101223:
MOV EAX,dword ptr [RCX]
IMUL EAX,EAX
CDQ
IDIV R8D
CMP EDX,0x1
SETZ AL
MOVZX EAX,AL
ADD ESI,EAX
ADD RCX,0x4
CMP RCX,RDI
JNZ 0x00101223
LAB_00101240:
MOV EAX,ESI
RET
LAB_00101243... | /* func0(std::vector<int, std::allocator<int> > const&, int, int) */
int func0(vector *param_1,int param_2,int param_3)
{
int *piVar1;
int *piVar2;
int iVar3;
if (param_2 < 1) {
iVar3 = 0;
}
else {
piVar2 = *(int **)param_1;
piVar1 = piVar2 + param_2;
iVar3 = 0;
do {
iVar3 = i... |
1,150 | func0 |
#include <assert.h>
#include <vector>
| int func0(const std::vector<int>& arr, int N, int P) {
int current_element = 0;
for (int i = 0; i < N; ++i) {
if ((arr[i] * arr[i]) % P == 1) {
current_element += 1;
}
}
return current_element;
}
| int main() {
assert(func0({1, 6, 4, 5}, 4, 7) == 2);
assert(func0({1, 3, 8, 12, 12}, 5, 13) == 3);
assert(func0({2, 3, 4, 5}, 4, 6) == 1);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&, int, int):
endbr64
mov %edx,%r8d
test %esi,%esi
jle 1478 <_Z5func0RKSt6vectorIiSaIiEEii+0x48>
mov (%rdi),%rax
lea -0x1(%rsi),%edx
xor %r9d,%r9d
lea 0x4(%rax),%rcx
lea (%rcx,%rdx,4),%rsi
jmp 1454 <_Z5func0RKSt6vectorIiSaIiEEii+0x24>
xchg %a... | _Z5func0RKSt6vectorIiSaIiEEii:
endbr64
mov r8d, edx
test esi, esi
jle short loc_13D0
mov rcx, [rdi]
movsxd rsi, esi
lea rdi, [rcx+rsi*4]
xor esi, esi
nop word ptr [rax+rax+00000000h]
loc_13B0:
mov eax, [rcx]
imul eax, eax
cdq
idiv r8d
xor eax, eax
cmp edx, 1
setz al
add ... | long long func0(_DWORD **a1, int a2, int a3)
{
_DWORD *v3; // rcx
long long v4; // rdi
unsigned int v5; // esi
int v6; // eax
if ( a2 <= 0 )
return 0LL;
v3 = *a1;
v4 = (long long)&(*a1)[a2];
v5 = 0;
do
{
v6 = *v3 * *v3 % a3 == 1;
++v3;
v5 += v6;
}
while ( (_DWORD *)v4 != v3 );
... | func0:
ENDBR64
MOV R8D,EDX
TEST ESI,ESI
JLE 0x001013d0
MOV RCX,qword ptr [RDI]
MOVSXD RSI,ESI
LEA RDI,[RCX + RSI*0x4]
XOR ESI,ESI
NOP word ptr [RAX + RAX*0x1]
LAB_001013b0:
MOV EAX,dword ptr [RCX]
IMUL EAX,EAX
CDQ
IDIV R8D
XOR EAX,EAX
CMP EDX,0x1
SETZ AL
ADD RCX,0x4
ADD ESI,EAX
CMP RDI,RCX
JNZ 0x001013b0
MOV EAX,ESI
RE... | /* func0(std::vector<int, std::allocator<int> > const&, int, int) */
int func0(vector *param_1,int param_2,int param_3)
{
int *piVar1;
int iVar2;
int *piVar3;
int iVar4;
if (0 < param_2) {
piVar3 = *(int **)param_1;
piVar1 = piVar3 + param_2;
iVar4 = 0;
do {
iVar2 = *piVar3;
p... |
1,151 | func0 |
#include <assert.h>
#include <vector>
| int func0(const std::vector<int>& arr, int N, int P) {
int current_element = 0;
for (int i = 0; i < N; ++i) {
if ((arr[i] * arr[i]) % P == 1) {
current_element += 1;
}
}
return current_element;
}
| int main() {
assert(func0({1, 6, 4, 5}, 4, 7) == 2);
assert(func0({1, 3, 8, 12, 12}, 5, 13) == 3);
assert(func0({2, 3, 4, 5}, 4, 6) == 1);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&, int, int):
endbr64
mov %edx,%r8d
test %esi,%esi
jle 1658 <_Z5func0RKSt6vectorIiSaIiEEii+0x48>
mov (%rdi),%rax
lea -0x1(%rsi),%edx
xor %r9d,%r9d
lea 0x4(%rax),%rcx
lea (%rcx,%rdx,4),%rsi
jmp 1634 <_Z5func0RKSt6vectorIiSaIiEEii+0x24>
xchg %a... | _Z5func0RKSt6vectorIiSaIiEEii:
endbr64
mov r8d, edx
test esi, esi
jle short loc_1650
mov rcx, [rdi]
movsxd rsi, esi
lea rdi, [rcx+rsi*4]
xor esi, esi
nop word ptr [rax+rax+00000000h]
loc_1630:
mov eax, [rcx]
imul eax, eax
cdq
idiv r8d
xor eax, eax
cmp edx, 1
setz al
add ... | long long func0(_DWORD **a1, int a2, int a3)
{
_DWORD *v3; // rcx
long long v4; // rdi
unsigned int v5; // esi
int v6; // eax
if ( a2 <= 0 )
return 0LL;
v3 = *a1;
v4 = (long long)&(*a1)[a2];
v5 = 0;
do
{
v6 = *v3 * *v3 % a3 == 1;
++v3;
v5 += v6;
}
while ( (_DWORD *)v4 != v3 );
... | func0:
ENDBR64
MOV R8D,EDX
TEST ESI,ESI
JLE 0x00101650
MOV RCX,qword ptr [RDI]
MOVSXD RSI,ESI
LEA RDI,[RCX + RSI*0x4]
XOR ESI,ESI
NOP word ptr [RAX + RAX*0x1]
LAB_00101630:
MOV EAX,dword ptr [RCX]
IMUL EAX,EAX
CDQ
IDIV R8D
XOR EAX,EAX
CMP EDX,0x1
SETZ AL
ADD RCX,0x4
ADD ESI,EAX
CMP RDI,RCX
JNZ 0x00101630
MOV EAX,ESI
RE... | /* func0(std::vector<int, std::allocator<int> > const&, int, int) */
int func0(vector *param_1,int param_2,int param_3)
{
int *piVar1;
int iVar2;
int *piVar3;
int iVar4;
if (0 < param_2) {
piVar3 = *(int **)param_1;
piVar1 = piVar3 + param_2;
iVar4 = 0;
do {
iVar2 = *piVar3;
p... |
1,152 | func0 | #include <assert.h>
| int func0(int N) {
int hund1 = N / 100;
int hund4 = N / 400;
int leap = N >> 2;
int ordd = N - leap;
if (hund1) {
ordd += hund1;
leap -= hund1;
}
if (hund4) {
ordd -= hund4;
leap += hund4;
}
int days = ordd + leap * 2;
int odd = days ... | int main() {
assert(func0(100) == 5);
assert(func0(50) == 6);
assert(func0(75) == 2);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x24(%rbp)
mov -0x24(%rbp),%eax
movslq %eax,%rdx
imul $0x51eb851f,%rdx,%rdx
shr $0x20,%rdx
sar $0x5,%edx
sar $0x1f,%eax
sub %eax,%edx
mov %edx,%eax
mov %eax,-0x10(%rbp)
mov -0x24(%rbp),%eax
movslq %eax,%rdx
imul $0x51eb851f,%rdx,%... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_24], edi
mov eax, [rbp+var_24]
movsxd rdx, eax
imul rdx, 51EB851Fh
shr rdx, 20h
mov ecx, edx
sar ecx, 5
cdq
mov eax, ecx
sub eax, edx
mov [rbp+var_10], eax
mov eax, [rbp+var_24]
movsxd rdx, eax
imul rdx, 51EB851Fh
s... | long long func0(int a1)
{
int v2; // [rsp+Ch] [rbp-18h]
int v3; // [rsp+10h] [rbp-14h]
int v4; // [rsp+14h] [rbp-10h]
int v5; // [rsp+18h] [rbp-Ch]
v4 = a1 / 100;
v5 = a1 / 400;
v2 = a1 >> 2;
v3 = a1 - (a1 >> 2);
if ( a1 / 100 )
{
v3 += v4;
v2 -= v4;
}
if ( v5 )
{
v3 -= v5;
v... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x24],EDI
MOV EAX,dword ptr [RBP + -0x24]
MOVSXD RDX,EAX
IMUL RDX,RDX,0x51eb851f
SHR RDX,0x20
MOV ECX,EDX
SAR ECX,0x5
CDQ
MOV EAX,ECX
SUB EAX,EDX
MOV dword ptr [RBP + -0x10],EAX
MOV EAX,dword ptr [RBP + -0x24]
MOVSXD RDX,EAX
IMUL RDX,RDX,0x51eb851f
SHR RDX,0x20
... | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
int4 local_20;
int4 local_1c;
iVar1 = param_1 / 100;
iVar2 = param_1 / 400;
local_20 = param_1 >> 2;
local_1c = param_1 - local_20;
if (iVar1 != 0) {
local_1c = local_1c + iVar1;
local_20 = local_20 - iVar1;
}
if (iVar2 !... |
1,153 | func0 | #include <assert.h>
| int func0(int N) {
int hund1 = N / 100;
int hund4 = N / 400;
int leap = N >> 2;
int ordd = N - leap;
if (hund1) {
ordd += hund1;
leap -= hund1;
}
if (hund4) {
ordd -= hund4;
leap += hund4;
}
int days = ordd + leap * 2;
int odd = days ... | int main() {
assert(func0(100) == 5);
assert(func0(50) == 6);
assert(func0(75) == 2);
return 0;
}
| O1 | cpp | func0(int):
endbr64
movslq %edi,%rax
imul $0x51eb851f,%rax,%rax
mov %rax,%rsi
sar $0x25,%rsi
mov %rsi,%rcx
mov %edi,%esi
sar $0x1f,%esi
sar $0x27,%rax
sub %esi,%eax
mov %edi,%edx
sar $0x2,%edx
sub %edx,%edi
sub %esi,%ecx
je 115b <_Z5func0i+0x32>
add %ecx,%edi
sub %ecx,%edx
t... | _Z5func0i:
endbr64
movsxd rax, edi
imul rax, 51EB851Fh
mov rsi, rax
sar rsi, 25h
mov rcx, rsi
mov esi, edi
sar esi, 1Fh
sar rax, 27h
sub eax, esi
mov edx, edi
sar edx, 2
sub edi, edx
sub ecx, esi
jz short loc_115B
add edi, ecx
sub edx, ecx
loc_115B:
test e... | long long func0(int a1)
{
int v2; // eax
int v3; // edx
int v4; // edi
int v5; // ecx
v2 = a1 / 400;
v3 = a1 >> 2;
v4 = a1 - (a1 >> 2);
v5 = a1 / 100;
if ( a1 / 100 )
{
v4 += v5;
v3 -= v5;
}
if ( v2 )
{
v4 -= v2;
v3 += v2;
}
return (unsigned int)((v4 + 2 * v3) % 7);
} | func0:
ENDBR64
MOVSXD RAX,EDI
IMUL RAX,RAX,0x51eb851f
MOV RSI,RAX
SAR RSI,0x25
MOV RCX,RSI
MOV ESI,EDI
SAR ESI,0x1f
SAR RAX,0x27
SUB EAX,ESI
MOV EDX,EDI
SAR EDX,0x2
SUB EDI,EDX
SUB ECX,ESI
JZ 0x0010115b
ADD EDI,ECX
SUB EDX,ECX
LAB_0010115b:
TEST EAX,EAX
JZ 0x00101163
SUB EDI,EAX
ADD EDX,EAX
LAB_00101163:
LEA EDX,[RDI +... | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
iVar2 = param_1 / 100;
iVar1 = param_1 / 400;
iVar3 = param_1 >> 2;
iVar4 = param_1 - iVar3;
if (iVar2 != 0) {
iVar4 = iVar4 + iVar2;
iVar3 = iVar3 - iVar2;
}
if (iVar1 != 0) {
iVar4 = iVar4 - iV... |
1,154 | func0 | #include <assert.h>
| int func0(int N) {
int hund1 = N / 100;
int hund4 = N / 400;
int leap = N >> 2;
int ordd = N - leap;
if (hund1) {
ordd += hund1;
leap -= hund1;
}
if (hund4) {
ordd -= hund4;
leap += hund4;
}
int days = ordd + leap * 2;
int odd = days ... | int main() {
assert(func0(100) == 5);
assert(func0(50) == 6);
assert(func0(75) == 2);
return 0;
}
| O2 | cpp | func0(int):
endbr64
movslq %edi,%rax
mov %edi,%edx
imul $0x51eb851f,%rax,%rax
sar $0x2,%edx
mov %rax,%rsi
sar $0x27,%rax
sar $0x25,%rsi
mov %rsi,%rcx
mov %edi,%esi
sub %edx,%edi
sar $0x1f,%esi
sub %esi,%eax
sub %esi,%ecx
je 1172 <_Z5func0i+0x32>
add %ecx,%edi
sub %ecx,%edx
t... | _Z5func0i:
endbr64
movsxd rax, edi
mov edx, edi
imul rax, 51EB851Fh
sar edx, 2
mov rsi, rax
sar rax, 27h
sar rsi, 25h
mov rcx, rsi
mov esi, edi
sub edi, edx
sar esi, 1Fh
sub eax, esi
sub ecx, esi
jz short loc_1172
add edi, ecx
sub edx, ecx
loc_1172:
test e... | long long func0(int a1)
{
int v1; // edx
long long v2; // rax
int v5; // edi
int v6; // eax
int v7; // ecx
v1 = a1 >> 2;
v2 = (1374389535LL * a1) >> 39;
v5 = a1 - (a1 >> 2);
v6 = v2 - (a1 >> 31);
v7 = a1 / 100;
if ( a1 / 100 )
{
v5 += v7;
v1 -= v7;
}
if ( v6 )
{
v5 -= v6;
... | func0:
ENDBR64
MOVSXD RAX,EDI
MOV EDX,EDI
IMUL RAX,RAX,0x51eb851f
SAR EDX,0x2
MOV RSI,RAX
SAR RAX,0x27
SAR RSI,0x25
MOV RCX,RSI
MOV ESI,EDI
SUB EDI,EDX
SAR ESI,0x1f
SUB EAX,ESI
SUB ECX,ESI
JZ 0x00101172
ADD EDI,ECX
SUB EDX,ECX
LAB_00101172:
TEST EAX,EAX
JZ 0x0010117a
SUB EDI,EAX
ADD EDX,EAX
LAB_0010117a:
LEA EDX,[RDI +... | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
iVar3 = param_1 >> 2;
iVar1 = param_1 / 400;
iVar2 = param_1 / 100;
iVar4 = param_1 - iVar3;
if (iVar2 != 0) {
iVar4 = iVar4 + iVar2;
iVar3 = iVar3 - iVar2;
}
if (iVar1 != 0) {
iVar4 = iVar4 - iV... |
1,155 | func0 | #include <assert.h>
| int func0(int N) {
int hund1 = N / 100;
int hund4 = N / 400;
int leap = N >> 2;
int ordd = N - leap;
if (hund1) {
ordd += hund1;
leap -= hund1;
}
if (hund4) {
ordd -= hund4;
leap += hund4;
}
int days = ordd + leap * 2;
int odd = days ... | int main() {
assert(func0(100) == 5);
assert(func0(50) == 6);
assert(func0(75) == 2);
return 0;
}
| O3 | cpp | func0(int):
endbr64
movslq %edi,%rax
mov %edi,%edx
imul $0x51eb851f,%rax,%rax
sar $0x2,%edx
mov %rax,%rsi
sar $0x27,%rax
sar $0x25,%rsi
mov %rsi,%rcx
mov %edi,%esi
sub %edx,%edi
sar $0x1f,%esi
sub %esi,%eax
sub %esi,%ecx
je 1172 <_Z5func0i+0x32>
add %ecx,%edi
sub %ecx,%edx
t... | _Z5func0i:
endbr64
movsxd rax, edi
mov edx, edi
imul rax, 51EB851Fh
sar edx, 2
mov rsi, rax
sar rax, 27h
sar rsi, 25h
mov rcx, rsi
mov esi, edi
sub edi, edx
sar esi, 1Fh
sub eax, esi
sub ecx, esi
jz short loc_1172
add edi, ecx
sub edx, ecx
loc_1172:
test e... | long long func0(int a1)
{
int v1; // edx
long long v2; // rax
int v5; // edi
int v6; // eax
int v7; // ecx
v1 = a1 >> 2;
v2 = (1374389535LL * a1) >> 39;
v5 = a1 - (a1 >> 2);
v6 = v2 - (a1 >> 31);
v7 = a1 / 100;
if ( a1 / 100 )
{
v5 += v7;
v1 -= v7;
}
if ( v6 )
{
v5 -= v6;
... | func0:
ENDBR64
MOVSXD RAX,EDI
MOV EDX,EDI
IMUL RAX,RAX,0x51eb851f
SAR EDX,0x2
MOV RSI,RAX
SAR RAX,0x27
SAR RSI,0x25
MOV RCX,RSI
MOV ESI,EDI
SUB EDI,EDX
SAR ESI,0x1f
SUB EAX,ESI
SUB ECX,ESI
JZ 0x00101172
ADD EDI,ECX
SUB EDX,ECX
LAB_00101172:
TEST EAX,EAX
JZ 0x0010117a
SUB EDI,EAX
ADD EDX,EAX
LAB_0010117a:
LEA EDX,[RDI +... | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
iVar3 = param_1 >> 2;
iVar1 = param_1 / 400;
iVar2 = param_1 / 100;
iVar4 = param_1 - iVar3;
if (iVar2 != 0) {
iVar4 = iVar4 + iVar2;
iVar3 = iVar3 - iVar2;
}
if (iVar1 != 0) {
iVar4 = iVar4 - iV... |
1,156 | func0 |
#include <iostream>
#include <vector>
#include <cassert>
| std::pair<int, std::vector<int>> func0(const std::vector<std::vector<int>>& list1) {
int max_length = 0;
std::vector<int> max_list;
for (const auto& sublist : list1) {
if (sublist.size() > max_length) {
max_length = sublist.size();
max_list = sublist;
}
}
... | int main() {
assert(func0({{0}, {1, 3}, {5, 7}, {9, 11}, {13, 15, 17}}) == std::make_pair(3, std::vector<int>{13, 15, 17}));
assert(func0({{1}, {5, 7}, {10, 12, 14, 15}}) == std::make_pair(4, std::vector<int>{10, 12, 14, 15}));
assert(func0({{5}, {15, 20, 25}}) == std::make_pair(3, std::vector<int>{15, 2... | O0 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<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
movl $0x0,-0x54(... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 68h
mov [rbp+var_68], rdi
mov [rbp+var_70], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov [rbp+var_54], 0
lea rax, [rbp+var_30]
mov rdi, rax
call _ZNSt6vectorIiSaIiEEC2Ev... | long long func0(long long a1, long long a2)
{
int v3; // [rsp+1Ch] [rbp-54h] BYREF
long long v4; // [rsp+20h] [rbp-50h] BYREF
_QWORD v5[2]; // [rsp+28h] [rbp-48h] BYREF
long long v6; // [rsp+38h] [rbp-38h]
_BYTE v7[24]; // [rsp+40h] [rbp-30h] BYREF
unsigned long long v8; // [rsp+58h] [rbp-18h]
v8 = __re... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x68
MOV qword ptr [RBP + -0x68],RDI
MOV qword ptr [RBP + -0x70],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV dword ptr [RBP + -0x54],0x0
LEA RAX,[RBP + -0x30]
MOV RDI,RAX
CALL 0x0010228c
MOV RAX,qword ptr [RBP + -0x70]
MOV 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)
{
bool bVar1;
ulong uVar2;
vector<std::vector<int,std::allocator<int>>,std::allocator<std::vector<int,std::allocator<int>>>>
*in_RSI;
long in_F... |
1,157 | func0 |
#include <iostream>
#include <vector>
#include <cassert>
| std::pair<int, std::vector<int>> func0(const std::vector<std::vector<int>>& list1) {
int max_length = 0;
std::vector<int> max_list;
for (const auto& sublist : list1) {
if (sublist.size() > max_length) {
max_length = sublist.size();
max_list = sublist;
}
}
... | int main() {
assert(func0({{0}, {1, 3}, {5, 7}, {9, 11}, {13, 15, 17}}) == std::make_pair(3, std::vector<int>{13, 15, 17}));
assert(func0({{1}, {5, 7}, {10, 12, 14, 15}}) == std::make_pair(4, std::vector<int>{10, 12, 14, 15}));
assert(func0({{5}, {15, 20, 25}}) == std::make_pair(3, std::vector<int>{15, 2... | O1 | 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
push %rbp
push %rbx
sub $0x20,%rsp
mov %rdi,%r12
mov %fs:0x28,%rax
mov %rax,0x18(%rsp)
xor %eax,%eax
movq $0x0,(%rsp)
movq $0x0,... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE:
endbr64
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 20h
mov r12, rdi
mov rax, fs:28h
mov [rsp+48h+var_30], rax
xor eax, eax
mov [rsp+48h+src], 0
mov [rsp+48h+var_40], 0
mov [rsp+48h+var_38], 0
mov rbx, [rsi]
mov r13... | long long func0(long long a1, long long a2)
{
_QWORD *v2; // rbx
_QWORD *v3; // r13
int v4; // ebp
char *v5; // rbp
signed long long v6; // rbx
_DWORD *v7; // rax
struct _Unwind_Exception *v8; // rbx
char *v9; // r13
unsigned long long v10; // rsi
void *src; // [rsp+0h] [rbp-48h] BYREF
char *v13;... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x20
MOV R12,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x18],RAX
XOR EAX,EAX
MOV qword ptr [RSP],0x0
MOV qword ptr [RSP + 0x8],0x0
MOV qword ptr [RSP + 0x10],0x0
MOV RBX,qword ptr [RSI]
MOV R13,qword ptr [RSI + 0x8]
CMP R13,RBX
JZ 0x00101347... | /* 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;
int iVar2;
ulong uVar3;
int4 *__dest;
int8 uVar4;
vector *pvVar5;
long *in_RSI;
long in_FS_OFFSET;
int... |
1,158 | func0 |
#include <iostream>
#include <vector>
#include <cassert>
| std::pair<int, std::vector<int>> func0(const std::vector<std::vector<int>>& list1) {
int max_length = 0;
std::vector<int> max_list;
for (const auto& sublist : list1) {
if (sublist.size() > max_length) {
max_length = sublist.size();
max_list = sublist;
}
}
... | int main() {
assert(func0({{0}, {1, 3}, {5, 7}, {9, 11}, {13, 15, 17}}) == std::make_pair(3, std::vector<int>{13, 15, 17}));
assert(func0({{1}, {5, 7}, {10, 12, 14, 15}}) == std::make_pair(4, std::vector<int>{10, 12, 14, 15}));
assert(func0({{5}, {15, 20, 25}}) == std::make_pair(3, std::vector<int>{15, 2... | O2 | 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
sub $0x20,%rsp
mov (%rsi),%rbx
mov 0x8(%rsi),%r13
mov %fs:0x28,%rax
mov %rax,0x18(%rsp)
xor ... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE:
endbr64
push r15
pxor xmm0, xmm0
push r14
xor r14d, r14d
push r13
xor r13d, r13d
push r12
push rbp
push rbx
sub rsp, 48h
mov rbx, [rsi]
mov r15, [rsi+8]
mov [rsp+78h+var_70], rdi
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor ... | _DWORD * func0(_DWORD *a1, char ***a2)
{
_DWORD *v2; // r14
int v3; // r13d
char **v4; // rbx
char **v5; // r15
char *v6; // rdx
char *v7; // r12
signed long long v8; // rbp
_DWORD *v9; // r8
long long v10; // rcx
_DWORD *v11; // rax
bool v12; // zf
unsigned long long v13; // rsi
char *v15; //... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
XOR R14D,R14D
PUSH R13
XOR R13D,R13D
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV RBX,qword ptr [RSI]
MOV R15,qword ptr [RSI + 0x8]
MOV qword ptr [RSP + 0x8],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOV... | /* 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;
vector *pvVar2;
long lVar3;
int iVar4;
vector *__dest;
vector *__dest_00;
long lVar5;
size_t __n;
vector *__n_00;
v... |
1,159 | func0 |
#include <iostream>
#include <vector>
#include <cassert>
| std::pair<int, std::vector<int>> func0(const std::vector<std::vector<int>>& list1) {
int max_length = 0;
std::vector<int> max_list;
for (const auto& sublist : list1) {
if (sublist.size() > max_length) {
max_length = sublist.size();
max_list = sublist;
}
}
... | int main() {
assert(func0({{0}, {1, 3}, {5, 7}, {9, 11}, {13, 15, 17}}) == std::make_pair(3, std::vector<int>{13, 15, 17}));
assert(func0({{1}, {5, 7}, {10, 12, 14, 15}}) == std::make_pair(4, std::vector<int>{10, 12, 14, 15}));
assert(func0({{5}, {15, 20, 25}}) == std::make_pair(3, std::vector<int>{15, 2... | O3 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x38,%rsp
mov 0x8(%rsi),%rax
mov (%rsi),%rbx
mov %rdi,0x10(%rsp)
mov %rax,(%rsp)
cmp %rax,%r... | _Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EE:
endbr64
push r15
pxor xmm0, xmm0
push r14
xor r14d, r14d
push r13
xor r13d, r13d
push r12
push rbp
push rbx
sub rsp, 48h
mov rbx, [rsi]
mov r15, [rsi+8]
mov [rsp+78h+var_70], rdi
mov rax, fs:28h
mov [rsp+78h+var_40], rax
xor ... | _DWORD * func0(_DWORD *a1, char ***a2)
{
_DWORD *v2; // r14
int v3; // r13d
char **v4; // rbx
char **v5; // r15
char *v6; // rdx
char *v7; // r12
signed long long v8; // rbp
_DWORD *v9; // r8
long long v10; // rcx
char *v11; // rsi
signed long long v12; // rdx
_DWORD *v13; // rax
bool v14; // ... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
XOR R14D,R14D
PUSH R13
XOR R13D,R13D
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV RBX,qword ptr [RSI]
MOV R15,qword ptr [RSI + 0x8]
MOV qword ptr [RSP + 0x8],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOV... | /* 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;
vector *pvVar2;
long lVar3;
int iVar4;
vector *__dest;
vector *__dest_00;
long lVar5;
size_t __n;
vector *__n_00;
v... |
1,160 | func0 |
#include <vector>
#include <cassert>
| int func0(int n, int k) {
if (n == 0) return 0;
std::vector<int> dp(n + 1, 0);
int mod = 1000000007;
dp[1] = k;
if (n > 1) dp[2] = k * k;
for (int i = 3; i <= n; ++i) {
dp[i] = ((k - 1) * (dp[i - 1] + dp[i - 2])) % mod;
}
return dp[n];
}
| int main() {
assert(func0(2, 4) == 16);
assert(func0(3, 2) == 6);
assert(func0(4, 4) == 228);
return 0;
}
| O0 | cpp | func0(int, int):
endbr64
push %rbp
mov %rsp,%rbp
push %r12
push %rbx
sub $0x40,%rsp
mov %edi,-0x44(%rbp)
mov %esi,-0x48(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
cmpl $0x0,-0x44(%rbp)
jne 123d <_Z5func0ii+0x34>
mov $0x0,%ebx
jmpq 134d <_Z5func0ii+0x144>
lea -0x3d... | _Z5func0ii:
endbr64
push rbp
mov rbp, rsp
push r12
push rbx
sub rsp, 50h
mov [rbp+var_54], edi
mov [rbp+var_58], esi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
cmp [rbp+var_54], 0
jnz short loc_125D
mov ebx, 0
jmp loc_136C
loc_125D:
lea rax, [rbp+var_45]
... | long long func0(int a1, int a2)
{
unsigned int v2; // ebx
int v3; // r12d
_DWORD *v4; // rax
int v5; // ebx
char v7; // [rsp+1Bh] [rbp-45h] BYREF
int v8; // [rsp+1Ch] [rbp-44h] BYREF
int i; // [rsp+20h] [rbp-40h]
int v10; // [rsp+24h] [rbp-3Ch]
char *v11; // [rsp+28h] [rbp-38h]
_BYTE v12[24]; // [r... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R12
PUSH RBX
SUB RSP,0x50
MOV dword ptr [RBP + -0x54],EDI
MOV dword ptr [RBP + -0x58],ESI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
CMP dword ptr [RBP + -0x54],0x0
JNZ 0x0010125d
MOV EBX,0x0
JMP 0x0010136c
LAB_0010125d:
LEA RAX,[RBP + -0x45]
MOV qwo... | /* func0(int, int) */
int4 func0(int param_1,int param_2)
{
int *piVar1;
int4 *puVar2;
int iVar3;
int4 uVar4;
long in_FS_OFFSET;
allocator local_4d;
int local_4c;
int local_48;
int local_44;
allocator *local_40;
vector<int,std::allocator<int>> local_38 [24];
long local_20;
local_20 = *(lo... |
1,161 | func0 |
#include <vector>
#include <cassert>
| int func0(int n, int k) {
if (n == 0) return 0;
std::vector<int> dp(n + 1, 0);
int mod = 1000000007;
dp[1] = k;
if (n > 1) dp[2] = k * k;
for (int i = 3; i <= n; ++i) {
dp[i] = ((k - 1) * (dp[i - 1] + dp[i - 2])) % mod;
}
return dp[n];
}
| int main() {
assert(func0(2, 4) == 16);
assert(func0(3, 2) == 6);
assert(func0(4, 4) == 228);
return 0;
}
| O1 | cpp | func0(int, int):
endbr64
push %r12
push %rbp
push %rbx
mov %edi,%ebx
test %edi,%edi
jne 11be <_Z5func0ii+0x15>
mov %ebx,%eax
pop %rbx
pop %rbp
pop %r12
retq
mov %esi,%ebp
lea 0x1(%rdi),%ecx
movslq %ecx,%rcx
movabs $0x1fffffffffffffff,%rax
cmp %rax,%rcx
ja 1270 <_Z5func0ii+0xc7>
te... | _Z5func0ii:
endbr64
push r12
push rbp
push rbx
mov ebx, edi
test edi, edi
jnz short loc_11BE
loc_11B7:
mov eax, ebx
pop rbx
pop rbp
pop r12
retn
loc_11BE:
mov r12d, esi
lea ebp, [rdi+1]
movsxd rbp, ebp
mov rax, rbp
shr rax, 3Dh
jnz loc_126F
test rbp, rbp
jz ... | // write access to const memory has been detected, the output may be wrong!
long long func0(int a1, int a2)
{
int v2; // ebx
unsigned long long v4; // rbp
_DWORD *v5; // rax
_DWORD *v6; // rdi
_DWORD *v7; // rdx
_DWORD *v8; // rcx
v2 = a1;
if ( a1 )
{
v4 = a1 + 1;
if ( v4 >> 61 )
std::... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
MOV EBX,EDI
TEST EDI,EDI
JNZ 0x001011be
LAB_001011b7:
MOV EAX,EBX
POP RBX
POP RBP
POP R12
RET
LAB_001011be:
MOV R12D,ESI
LEA EBP,[RDI + 0x1]
MOVSXD RBP,EBP
MOV RAX,RBP
SHR RAX,0x3d
JNZ 0x0010126f
TEST RBP,RBP
JZ 0x0010127b
SHL RBP,0x2
MOV RDI,RBP
CALL 0x001010a0
MOV RDI,RAX
LEA... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(int, int) */
int4 func0(int param_1,int param_2)
{
int4 uVar1;
int4 *puVar2;
int4 *puVar3;
int *piVar4;
ulong uVar5;
ulong uVar6;
if (param_1 == 0) {
return 0;
}
uVar5 = (ulong)(param_1 + 1);
if (u... |
1,162 | func0 |
#include <vector>
#include <cassert>
| int func0(int n, int k) {
if (n == 0) return 0;
std::vector<int> dp(n + 1, 0);
int mod = 1000000007;
dp[1] = k;
if (n > 1) dp[2] = k * k;
for (int i = 3; i <= n; ++i) {
dp[i] = ((k - 1) * (dp[i - 1] + dp[i - 2])) % mod;
}
return dp[n];
}
| int main() {
assert(func0(2, 4) == 16);
assert(func0(3, 2) == 6);
assert(func0(4, 4) == 228);
return 0;
}
| O2 | cpp | func0(int, int) [clone .part.0]:
movabs $0x1fffffffffffffff,%rax
push %r12
push %rbp
push %rbx
lea 0x1(%rdi),%ebx
movslq %ebx,%rbx
cmp %rax,%rbx
ja 133d <_Z5func0ii.part.0+0xdd>
test %rbx,%rbx
je 1330 <_Z5func0ii.part.0+0xd0>
shl $0x2,%rbx
mov %edi,%ebp
mov %esi,%r12d
mov %rbx,%rdi
cal... | _Z5func0ii_part_0:
push r12
push rbp
lea ebp, [rdi+1]
movsxd rbp, ebp
push rbx
mov rax, rbp
shr rax, 3Dh
jnz loc_134D
test rbp, rbp
jz loc_1340
shl rbp, 2
mov r12d, edi
mov ebx, esi
mov rdi, rbp; unsigned __int64
call __Znwm; operator new(ulong)
mov rdx, rbp; n
x... | // write access to const memory has been detected, the output may be wrong!
long long func0(int a1, int a2)
{
unsigned long long v2; // rbp
int v4; // ebx
void *v5; // rax
_DWORD *v6; // rax
_DWORD *v7; // rdi
int v8; // eax
_DWORD *v9; // rcx
int v10; // edx
unsigned int v11; // ebx
if ( (unsigne... | func0:
PUSH R12
PUSH RBP
LEA EBP,[RDI + 0x1]
MOVSXD RBP,EBP
PUSH RBX
MOV RAX,RBP
SHR RAX,0x3d
JNZ 0x0010134d
TEST RBP,RBP
JZ 0x00101340
SHL RBP,0x2
MOV R12D,EDI
MOV EBX,ESI
MOV RDI,RBP
CALL 0x001010c0
MOV RDX,RBP
XOR ESI,ESI
MOV RDI,RAX
CALL 0x001010a0
MOV dword ptr [RAX + 0x4],EBX
MOV RDI,RAX
CMP R12D,0x1
JZ 0x0010132... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(int, int) [clone .part.0] */
ulong func0(int param_1,int param_2)
{
uint uVar1;
code *pcVar2;
int iVar3;
int iVar4;
void *pvVar5;
int *piVar6;
int *piVar7;
int iVar8;
ulong uVar9;
uVar9 = (ulong)(param... |
1,163 | func0 |
#include <vector>
#include <cassert>
| int func0(int n, int k) {
if (n == 0) return 0;
std::vector<int> dp(n + 1, 0);
int mod = 1000000007;
dp[1] = k;
if (n > 1) dp[2] = k * k;
for (int i = 3; i <= n; ++i) {
dp[i] = ((k - 1) * (dp[i - 1] + dp[i - 2])) % mod;
}
return dp[n];
}
| int main() {
assert(func0(2, 4) == 16);
assert(func0(3, 2) == 6);
assert(func0(4, 4) == 228);
return 0;
}
| O3 | cpp | func0(int, int) [clone .part.0]:
movabs $0x1fffffffffffffff,%rax
push %r12
push %rbp
lea 0x1(%rdi),%ebp
movslq %ebp,%rbp
push %rbx
cmp %rax,%rbp
ja 13d4 <_Z5func0ii.part.0+0x154>
test %rbp,%rbp
je 13c0 <_Z5func0ii.part.0+0x140>
shl $0x2,%rbp
mov %edi,%ebx
mov %esi,%r12d
mov %rbp,%rdi
c... | _Z5func0ii_part_0:
push r12
push rbp
lea ebp, [rdi+1]
movsxd rbp, ebp
push rbx
mov rax, rbp
shr rax, 3Dh
jnz loc_13D4
test rbp, rbp
jz loc_13C0
shl rbp, 2
mov ebx, edi
mov r12d, esi
mov rdi, rbp; unsigned __int64
call __Znwm; operator new(ulong)
mov rdx, rbp; n
x... | // write access to const memory has been detected, the output may be wrong!
long long func0(int a1, int a2)
{
unsigned long long v2; // rbp
int v4; // r12d
void *v5; // rax
_DWORD *v6; // rax
_DWORD *v7; // rdi
int v8; // eax
int v9; // esi
long long v10; // r8
int v11; // edx
long long v12; // rcx... | func0:
PUSH R12
PUSH RBP
LEA EBP,[RDI + 0x1]
MOVSXD RBP,EBP
PUSH RBX
MOV RAX,RBP
SHR RAX,0x3d
JNZ 0x001013d4
TEST RBP,RBP
JZ 0x001013c0
SHL RBP,0x2
MOV EBX,EDI
MOV R12D,ESI
MOV RDI,RBP
CALL 0x001010c0
MOV RDX,RBP
XOR ESI,ESI
MOV RDI,RAX
CALL 0x001010a0
MOV dword ptr [RAX + 0x4],R12D
MOV RDI,RAX
CMP EBX,0x1
JZ 0x001013a... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(int, int) [clone .part.0] */
ulong func0(int param_1,int param_2)
{
int iVar1;
uint uVar2;
code *pcVar3;
int iVar4;
void *pvVar5;
int iVar6;
ulong uVar7;
long lVar8;
uVar7 = (ulong)(param_1 + 1);
if (u... |
1,164 | func0 |
#include <assert.h>
| int func0(int n, int m) {
int q = n / m;
return q;
}
| int main() {
assert(func0(10, 3) == 3);
assert(func0(4, 2) == 2);
assert(func0(20, 5) == 4);
return 0;
}
| O0 | cpp | func0(int, int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
mov %esi,-0x18(%rbp)
mov -0x14(%rbp),%eax
cltd
idivl -0x18(%rbp)
mov %eax,-0x4(%rbp)
mov -0x4(%rbp),%eax
pop %rbp
retq
| _Z5func0ii:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_18], esi
mov eax, [rbp+var_14]
cdq
idiv [rbp+var_18]
mov [rbp+var_4], eax
mov eax, [rbp+var_4]
pop rbp
retn | long long func0(int a1, int a2)
{
return (unsigned int)(a1 / a2);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x18],ESI
MOV EAX,dword ptr [RBP + -0x14]
CDQ
IDIV dword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x4],EAX
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET | /* func0(int, int) */
int func0(int param_1,int param_2)
{
return param_1 / param_2;
} |
1,165 | func0 |
#include <assert.h>
| int func0(int n, int m) {
int q = n / m;
return q;
}
| int main() {
assert(func0(10, 3) == 3);
assert(func0(4, 2) == 2);
assert(func0(20, 5) == 4);
return 0;
}
| O1 | cpp | func0(int, int):
endbr64
mov %edi,%eax
cltd
idiv %esi
retq
| _Z5func0ii:
endbr64
mov eax, edi
cdq
idiv esi
retn | long long func0(int a1, int a2)
{
return (unsigned int)(a1 / a2);
} | func0:
ENDBR64
MOV EAX,EDI
CDQ
IDIV ESI
RET | /* func0(int, int) */
int [16] func0(int param_1,int param_2)
{
int auVar1 [16];
auVar1._0_8_ = (long)param_1 / (long)param_2 & 0xffffffff;
auVar1._8_8_ = (long)param_1 % (long)param_2 & 0xffffffff;
return auVar1;
} |
1,166 | func0 |
#include <assert.h>
| int func0(int n, int m) {
int q = n / m;
return q;
}
| int main() {
assert(func0(10, 3) == 3);
assert(func0(4, 2) == 2);
assert(func0(20, 5) == 4);
return 0;
}
| O2 | cpp | func0(int, int):
endbr64
mov %edi,%eax
cltd
idiv %esi
retq
nopw 0x0(%rax,%rax,1)
| _Z5func0ii:
endbr64
mov eax, edi
cdq
idiv esi
retn | long long func0(int a1, int a2)
{
return (unsigned int)(a1 / a2);
} | func0:
ENDBR64
MOV EAX,EDI
CDQ
IDIV ESI
RET | /* func0(int, int) */
int [16] func0(int param_1,int param_2)
{
int auVar1 [16];
auVar1._0_8_ = (long)param_1 / (long)param_2 & 0xffffffff;
auVar1._8_8_ = (long)param_1 % (long)param_2 & 0xffffffff;
return auVar1;
} |
1,167 | func0 |
#include <assert.h>
| int func0(int n, int m) {
int q = n / m;
return q;
}
| int main() {
assert(func0(10, 3) == 3);
assert(func0(4, 2) == 2);
assert(func0(20, 5) == 4);
return 0;
}
| O3 | cpp | func0(int, int):
endbr64
mov %edi,%eax
cltd
idiv %esi
retq
nopw 0x0(%rax,%rax,1)
| _Z5func0ii:
endbr64
mov eax, edi
cdq
idiv esi
retn | long long func0(int a1, int a2)
{
return (unsigned int)(a1 / a2);
} | func0:
ENDBR64
MOV EAX,EDI
CDQ
IDIV ESI
RET | /* func0(int, int) */
int [16] func0(int param_1,int param_2)
{
int auVar1 [16];
auVar1._0_8_ = (long)param_1 / (long)param_2 & 0xffffffff;
auVar1._8_8_ = (long)param_1 % (long)param_2 & 0xffffffff;
return auVar1;
} |
1,168 | func0 |
#include <cmath>
#include <cassert>
| double func0(double w, double h) {
double s = sqrt((w * w) + (h * h));
return s;
}
| int main() {
assert(func0(7, 8) == 10.63014581273465);
assert(func0(3, 4) == 5);
assert(func0(7, 15) == 16.55294535724685);
return 0;
}
| O0 | cpp | func0(double, double):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
movsd %xmm0,-0x18(%rbp)
movsd %xmm1,-0x20(%rbp)
movsd -0x18(%rbp),%xmm0
movapd %xmm0,%xmm1
mulsd %xmm0,%xmm1
movsd -0x20(%rbp),%xmm0
mulsd %xmm0,%xmm0
addsd %xmm1,%xmm0
callq 1070 <sqrt@plt>
movq %xmm0,%rax
mov %rax,-0x8(%rbp)
mo... | _Z5func0dd:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
movsd [rbp+var_18], xmm0
movsd [rbp+var_20], xmm1
movsd xmm0, [rbp+var_18]
movapd xmm1, xmm0
mulsd xmm1, xmm0
movsd xmm0, [rbp+var_20]
mulsd xmm0, xmm0
addsd xmm1, xmm0
movq rax, xmm1
movq xmm0, rax; x
call _sqrt
movq rax, xmm0... | long long func0(double a1, double a2)
{
return sqrt(a1 * a1 + a2 * a2);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOVSD qword ptr [RBP + -0x18],XMM0
MOVSD qword ptr [RBP + -0x20],XMM1
MOVSD XMM0,qword ptr [RBP + -0x18]
MOVAPD XMM1,XMM0
MULSD XMM1,XMM0
MOVSD XMM0,qword ptr [RBP + -0x20]
MULSD XMM0,XMM0
ADDSD XMM1,XMM0
MOVQ RAX,XMM1
MOVQ XMM0,RAX
CALL 0x00101070
MOVQ RAX,XMM0
MOV qwor... | /* func0(double, double) */
double func0(double param_1,double param_2)
{
double dVar1;
dVar1 = sqrt(param_1 * param_1 + param_2 * param_2);
return dVar1;
} |
1,169 | func0 |
#include <cmath>
#include <cassert>
| double func0(double w, double h) {
double s = sqrt((w * w) + (h * h));
return s;
}
| int main() {
assert(func0(7, 8) == 10.63014581273465);
assert(func0(3, 4) == 5);
assert(func0(7, 15) == 16.55294535724685);
return 0;
}
| O1 | cpp | func0(double, double):
endbr64
sub $0x18,%rsp
mulsd %xmm0,%xmm0
mulsd %xmm1,%xmm1
addsd %xmm1,%xmm0
movapd %xmm0,%xmm2
sqrtsd %xmm2,%xmm2
movsd %xmm2,0x8(%rsp)
pxor %xmm1,%xmm1
ucomisd %xmm0,%xmm1
ja 1180 <_Z5func0dd+0x37>
movsd 0x8(%rsp),%xmm0
add $0x18,%rsp
retq
callq 1050 <sqrt@plt>
jmp 1175 <_Z... | _Z5func0dd:
endbr64
mulsd xmm0, xmm0
mulsd xmm1, xmm1
addsd xmm0, xmm1
sqrtsd xmm0, xmm0
retn | double func0(double a1, double a2)
{
return sqrt(a1 * a1 + a2 * a2);
} | func0:
ENDBR64
MULSD XMM0,XMM0
MULSD XMM1,XMM1
ADDSD XMM0,XMM1
SQRTSD XMM0,XMM0
RET | /* func0(double, double) */
double func0(double param_1,double param_2)
{
return SQRT(param_1 * param_1 + param_2 * param_2);
} |
1,170 | func0 |
#include <cmath>
#include <cassert>
| double func0(double w, double h) {
double s = sqrt((w * w) + (h * h));
return s;
}
| int main() {
assert(func0(7, 8) == 10.63014581273465);
assert(func0(3, 4) == 5);
assert(func0(7, 15) == 16.55294535724685);
return 0;
}
| O2 | cpp | func0(double, double):
endbr64
mulsd %xmm1,%xmm1
mulsd %xmm0,%xmm0
addsd %xmm1,%xmm0
pxor %xmm1,%xmm1
ucomisd %xmm0,%xmm1
movapd %xmm0,%xmm2
sqrtsd %xmm2,%xmm2
ja 1187 <_Z5func0dd+0x27>
movapd %xmm2,%xmm0
retq
sub $0x18,%rsp
movsd %xmm2,0x8(%rsp)
callq 1050 <sqrt@plt>
movsd 0x8(%rsp),%xmm2
add $0x18,%... | _Z5func0dd:
endbr64
mulsd xmm1, xmm1
mulsd xmm0, xmm0
addsd xmm0, xmm1
sqrtsd xmm0, xmm0
retn | double func0(double a1, double a2)
{
return sqrt(a1 * a1 + a2 * a2);
} | func0:
ENDBR64
MULSD XMM1,XMM1
MULSD XMM0,XMM0
ADDSD XMM0,XMM1
SQRTSD XMM0,XMM0
RET | /* func0(double, double) */
double func0(double param_1,double param_2)
{
return SQRT(param_1 * param_1 + param_2 * param_2);
} |
1,171 | func0 |
#include <cmath>
#include <cassert>
| double func0(double w, double h) {
double s = sqrt((w * w) + (h * h));
return s;
}
| int main() {
assert(func0(7, 8) == 10.63014581273465);
assert(func0(3, 4) == 5);
assert(func0(7, 15) == 16.55294535724685);
return 0;
}
| O3 | cpp | func0(double, double):
endbr64
mulsd %xmm1,%xmm1
mulsd %xmm0,%xmm0
addsd %xmm1,%xmm0
pxor %xmm1,%xmm1
ucomisd %xmm0,%xmm1
movapd %xmm0,%xmm2
sqrtsd %xmm2,%xmm2
ja 1187 <_Z5func0dd+0x27>
movapd %xmm2,%xmm0
retq
sub $0x18,%rsp
movsd %xmm2,0x8(%rsp)
callq 1050 <sqrt@plt>
movsd 0x8(%rsp),%xmm2
add $0x18,%... | _Z5func0dd:
endbr64
mulsd xmm1, xmm1
mulsd xmm0, xmm0
addsd xmm0, xmm1
sqrtsd xmm0, xmm0
retn | double func0(double a1, double a2)
{
return sqrt(a1 * a1 + a2 * a2);
} | func0:
ENDBR64
MULSD XMM1,XMM1
MULSD XMM0,XMM0
ADDSD XMM0,XMM1
SQRTSD XMM0,XMM0
RET | /* func0(double, double) */
double func0(double param_1,double param_2)
{
return SQRT(param_1 * param_1 + param_2 * param_2);
} |
1,172 | func0 |
#include <iostream>
#include <vector>
#include <cassert>
#include <typeinfo>
#include <any>
#include <climits>
| int func0(std::vector<std::any> listval) {
int max_val = INT_MIN;
for (auto& item : listval) {
if (item.type() == typeid(int)) {
int val = std::any_cast<int>(item);
if (val > max_val) {
max_val = val;
}
}
}
return max_val;
}
... | int main() {
assert(func0({ "Python", 3, 2, 4, 5, "version" }) == 5);
assert(func0({ "Python", 15, 20, 25 }) == 25);
assert(func0({ "Python", 30, 20, 40, 50, "version" }) == 50);
return 0;
}
| O0 | cpp | func0(std::vector<std::any, std::allocator<std::any> >):
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 $0x80000000,-0x30(%rbp)
mov -0x38(%rbp),%rax
mov %rax,-0x18(%rbp)
mov -0x18(%rbp),%rax
mov %rax,%rdi
cal... | _Z5func0St6vectorISt3anySaIS0_EE:
endbr64
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_38], rdi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov [rbp+var_30], 80000000h
mov rax, [rbp+var_38]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov rdi, rax
call _ZNSt6vec... | long long func0(long long a1)
{
long long v1; // rax
unsigned int v3; // [rsp+10h] [rbp-30h]
signed int v4; // [rsp+14h] [rbp-2Ch]
long long v5; // [rsp+18h] [rbp-28h] BYREF
_QWORD v6[2]; // [rsp+20h] [rbp-20h] BYREF
std::any *v7; // [rsp+30h] [rbp-10h]
unsigned long long v8; // [rsp+38h] [rbp-8h]
v8 ... | 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 + -0x30],0x80000000
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,RAX
CALL 0x00101eb2
MOV q... | /* func0(std::vector<std::any, std::allocator<std::any> >) */
int func0(vector param_1)
{
char cVar1;
bool bVar2;
int iVar3;
type_info *this;
int4 in_register_0000003c;
long in_FS_OFFSET;
int local_38;
int8 local_30;
int8 local_28;
vector<std::any,std::allocator<std::any>> *local_20;
any *local_... |
1,173 | func0 |
#include <iostream>
#include <vector>
#include <cassert>
#include <typeinfo>
#include <any>
#include <climits>
| int func0(std::vector<std::any> listval) {
int max_val = INT_MIN;
for (auto& item : listval) {
if (item.type() == typeid(int)) {
int val = std::any_cast<int>(item);
if (val > max_val) {
max_val = val;
}
}
}
return max_val;
}
... | int main() {
assert(func0({ "Python", 3, 2, 4, 5, "version" }) == 5);
assert(func0({ "Python", 15, 20, 25 }) == 25);
assert(func0({ "Python", 30, 20, 40, 50, "version" }) == 50);
return 0;
}
| O1 | cpp | func0(std::vector<std::any, std::allocator<std::any> >):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
mov (%rdi),%rbx
mov 0x8(%rdi),%r14
cmp %r14,%rbx
je 1460 <_Z5func0St6vectorISt3anySaIS0_EE+0... | _Z5func0St6vectorISt3anySaIS0_EE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 18h
mov rax, fs:28h
mov [rsp+48h+var_40], rax
xor eax, eax
mov rbx, [rdi]
mov r13, [rdi+8]
cmp r13, rbx
jz loc_13F7
mov r14d, 80000000h
mov r15, rsp
jmp ... | long long func0(long long *a1)
{
long long v1; // rbx
long long v2; // r13
unsigned int v3; // r14d
void *v4; // rax
int *v5; // rdi
void ( *v6)(long long, long long, _QWORD *); // rax
void *v7; // rdx
int *v8; // rdi
_QWORD *exception; // rdi
_QWORD v11[9]; // [rsp+0h] [rbp-48h] BYREF
v11[1] = ... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV RBX,qword ptr [RDI]
MOV R13,qword ptr [RDI + 0x8]
CMP R13,RBX
JZ 0x001013f7
MOV R14D,0x80000000
MOV R15,RSP
JMP 0x0010131f
LAB_00101306:
MOV EAX,dword ptr [R12 + 0x... | /* func0(std::vector<std::any, std::allocator<std::any> >) */
int func0(vector param_1)
{
int8 *puVar1;
char *pcVar2;
code *pcVar3;
int8 uVar4;
int iVar5;
int1 *puVar6;
int8 *puVar7;
int4 in_register_0000003c;
int iVar8;
long in_FS_OFFSET;
int1 *local_48;
long local_40;
local_40 = *(long ... |
1,174 | func0 |
#include <iostream>
#include <vector>
#include <cassert>
#include <typeinfo>
#include <any>
#include <climits>
| int func0(std::vector<std::any> listval) {
int max_val = INT_MIN;
for (auto& item : listval) {
if (item.type() == typeid(int)) {
int val = std::any_cast<int>(item);
if (val > max_val) {
max_val = val;
}
}
}
return max_val;
}
... | int main() {
assert(func0({ "Python", 3, 2, 4, 5, "version" }) == 5);
assert(func0({ "Python", 15, 20, 25 }) == 25);
assert(func0({ "Python", 30, 20, 40, 50, "version" }) == 50);
return 0;
}
| O2 | cpp | func0(std::vector<std::any, std::allocator<std::any> >):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov (%rdi),%rcx
mov 0x8(%rdi),%r14
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
cmp %r14,%rcx
je 1888 <_Z5func0St6vectorISt3anySaIS0_EE+0... | _Z5func0St6vectorISt3anySaIS0_EE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 18h
mov rcx, [rdi]
mov r12, [rdi+8]
mov rax, fs:28h
mov [rsp+48h+var_40], rax
xor eax, eax
cmp r12, rcx
jz loc_17F0
mov rbx, cs:qword_3CE8
mov r15, rcx
mov ... | long long func0(long long *a1)
{
long long v1; // rcx
long long v2; // r12
long long v3; // r15
unsigned int v4; // r13d
void *v5; // rax
int *v6; // rdi
void ( *v7)(long long, long long, _QWORD *); // rax
void *v8; // rdx
int *v9; // rdi
_QWORD *exception; // rdi
_QWORD v12[9]; // [rsp+0h] [rbp-... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV RCX,qword ptr [RDI]
MOV R12,qword ptr [RDI + 0x8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
CMP R12,RCX
JZ 0x001017f0
MOV RBX,qword ptr [0x00103ce8]
MOV R15,RCX
MOV R13D,0x80000000
MOV R14,RSP
LEA RBP,[0x10... | /* func0(std::vector<std::any, std::allocator<std::any> >) */
int func0(vector param_1)
{
int8 *puVar1;
char *pcVar2;
code *pcVar3;
int8 uVar4;
int iVar5;
int1 *puVar6;
int8 *puVar7;
int4 in_register_0000003c;
int iVar8;
long in_FS_OFFSET;
int1 *local_48;
long local_40;
uVar4 = int::typei... |
1,175 | func0 |
#include <iostream>
#include <vector>
#include <cassert>
#include <typeinfo>
#include <any>
#include <climits>
| int func0(std::vector<std::any> listval) {
int max_val = INT_MIN;
for (auto& item : listval) {
if (item.type() == typeid(int)) {
int val = std::any_cast<int>(item);
if (val > max_val) {
max_val = val;
}
}
}
return max_val;
}
... | int main() {
assert(func0({ "Python", 3, 2, 4, 5, "version" }) == 5);
assert(func0({ "Python", 15, 20, 25 }) == 25);
assert(func0({ "Python", 30, 20, 40, 50, "version" }) == 50);
return 0;
}
| O3 | cpp | func0(std::vector<std::any, std::allocator<std::any> >):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x18,%rsp
mov (%rdi),%rcx
mov 0x8(%rdi),%r14
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
cmp %r14,%rcx
je 18d8 <_Z5func0St6vectorISt3anySaIS0_EE+0... | _Z5func0St6vectorISt3anySaIS0_EE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 18h
mov rcx, [rdi]
mov r12, [rdi+8]
mov rax, fs:28h
mov [rsp+48h+var_40], rax
xor eax, eax
cmp r12, rcx
jz loc_1860
mov rbx, cs:qword_3CE8
mov r15, rcx
mov ... | long long func0(long long *a1)
{
long long v1; // rcx
long long v2; // r12
long long v3; // r15
unsigned int v4; // r13d
void *v5; // rax
int *v6; // rdi
void ( *v7)(long long, long long, _QWORD *); // rax
void *v8; // rdx
int *v9; // rdi
_QWORD *exception; // rdi
_QWORD v12[9]; // [rsp+0h] [rbp-... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV RCX,qword ptr [RDI]
MOV R12,qword ptr [RDI + 0x8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
CMP R12,RCX
JZ 0x00101860
MOV RBX,qword ptr [0x00103ce8]
MOV R15,RCX
MOV R13D,0x80000000
MOV R14,RSP
LEA RBP,[0x10... | /* func0(std::vector<std::any, std::allocator<std::any> >) */
int func0(vector param_1)
{
int8 *puVar1;
char *pcVar2;
code *pcVar3;
int8 uVar4;
int iVar5;
int1 *puVar6;
int8 *puVar7;
int4 in_register_0000003c;
int iVar8;
long in_FS_OFFSET;
int1 *local_48;
long local_40;
uVar4 = int::typei... |
1,176 | func0 |
#include <iostream>
#include <vector>
#include <cassert>
| int func0(int number) {
std::vector<int> divisors;
divisors.push_back(1);
for (int i = 2; i < number; i++) {
if (number % i == 0) {
divisors.push_back(i);
}
}
int sum = 0;
for (auto div : divisors) {
sum += div;
}
return sum;
}
| int main() {
assert(func0(8) == 7);
assert(func0(12) == 16);
assert(func0(7) == 1);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x58,%rsp
mov %edi,-0x54(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x30(%rbp),%rax
mov %rax,%rdi
callq 14f6 <_ZNSt6vectorIiSaIiEEC1Ev>
movl $0x1,-0x40(%rbp)
lea -0x40(%rbp),%rdx
lea -0x30(%rbp),%rax
mov... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 58h
mov [rbp+var_54], edi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_30]
mov rdi, rax
call _ZNSt6vectorIiSaIiEEC2Ev; std::vector<int>::vector(void)
mov dword ptr [rbp+var_40], 1
lea rdx,... | long long func0(int a1)
{
unsigned int v2; // [rsp+10h] [rbp-50h]
long long v3; // [rsp+18h] [rbp-48h] BYREF
long long v4; // [rsp+20h] [rbp-40h] BYREF
_BYTE *v5; // [rsp+28h] [rbp-38h]
_BYTE v6[24]; // [rsp+30h] [rbp-30h] BYREF
unsigned long long v7; // [rsp+48h] [rbp-18h]
v7 = __readfsqword(0x28u);
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x58
MOV dword ptr [RBP + -0x54],EDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x30]
MOV RDI,RAX
CALL 0x001014a8
MOV dword ptr [RBP + -0x40],0x1
LEA RDX,[RBP + -0x40]
LEA RAX,[RBP + -0x30]
MOV RSI,RDX
MOV RDI,RAX
LAB_0010... | /* func0(int) */
int func0(int param_1)
{
bool bVar1;
int *piVar2;
long in_FS_OFFSET;
int local_58;
int8 local_50;
int8 local_48;
vector<int,std::allocator<int>> *local_40;
vector<int,std::allocator<int>> local_38 [24];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
std::vector<int... |
1,177 | func0 |
#include <iostream>
#include <vector>
#include <cassert>
| int func0(int number) {
std::vector<int> divisors;
divisors.push_back(1);
for (int i = 2; i < number; i++) {
if (number % i == 0) {
divisors.push_back(i);
}
}
int sum = 0;
for (auto div : divisors) {
sum += div;
}
return sum;
}
| int main() {
assert(func0(8) == 7);
assert(func0(12) == 16);
assert(func0(7) == 1);
return 0;
}
| O1 | cpp | func0(int):
endbr64
push %rbp
push %rbx
sub $0x38,%rsp
mov %edi,%ebx
mov %fs:0x28,%rax
mov %rax,0x28(%rsp)
xor %eax,%eax
movq $0x0,0x10(%rsp)
movq $0x0,0x18(%rsp)
movq $0x0,0x20(%rsp)
mov $0x4,%edi
callq 1130 <_Znwm@plt>
movl $0x1,(%rax)
lea 0x4(%rax),%rdx
mov %rax,0x10(%rsp)
mov ... | _Z5func0i:
endbr64
push rbp
push rbx
sub rsp, 38h
mov ebp, edi
mov rax, fs:28h
mov [rsp+48h+var_20], rax
xor eax, eax
mov [rsp+48h+var_38], 0
mov [rsp+48h+var_30], 0
mov [rsp+48h+var_28], 0
mov edi, 4; unsigned __int64
call __Znwm; operator new(ulong)
mov dword ptr [rax]... | long long func0(int a1)
{
int *v1; // rax
int i; // ebx
int *v3; // rsi
int *v4; // rax
unsigned int v5; // ebx
int v7; // [rsp+Ch] [rbp-3Ch] BYREF
void *v8; // [rsp+10h] [rbp-38h] BYREF
int *v9; // [rsp+18h] [rbp-30h]
int *v10; // [rsp+20h] [rbp-28h]
unsigned long long v11; // [rsp+28h] [rbp-20h]
... | func0:
ENDBR64
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOV EBP,EDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
MOV qword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x0
MOV EDI,0x4
LAB_00101265:
CALL 0x001010f0
MOV dword ptr [RAX],0x1
LEA RDX,[RAX + 0x4]
MOV qword pt... | /* func0(int) */
int func0(int param_1)
{
int *piVar1;
int iVar2;
long in_FS_OFFSET;
int local_3c;
int *local_38;
int *local_30;
int *local_28;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_38 = (int *)0x0;
local_30 = (int *)0x0;
local_28 = (int *)0x0;
... |
1,178 | func0 |
#include <iostream>
#include <vector>
#include <cassert>
| int func0(int number) {
std::vector<int> divisors;
divisors.push_back(1);
for (int i = 2; i < number; i++) {
if (number % i == 0) {
divisors.push_back(i);
}
}
int sum = 0;
for (auto div : divisors) {
sum += div;
}
return sum;
}
| int main() {
assert(func0(8) == 7);
assert(func0(12) == 16);
assert(func0(7) == 1);
return 0;
}
| O2 | cpp | func0(int):
endbr64
push %r15
xor %esi,%esi
push %r14
push %r13
push %r12
push %rbp
mov %edi,%ebp
push %rbx
sub $0x48,%rsp
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
lea 0x1c(%rsp),%rdx
lea 0x20(%rsp),%rdi
movq $0x0,0x20(%rsp)
movq $0x0,0x28(%rsp)
movq $0x0,0x30(%rsp)
... | _Z5func0i:
endbr64
push rbp
pxor xmm0, xmm0
mov ebp, edi
mov edi, 4; unsigned __int64
push rbx
sub rsp, 38h
mov rax, fs:28h
mov [rsp+48h+var_20], rax
xor eax, eax
movaps xmmword ptr [rsp+48h+var_38], xmm0
mov [rsp+48h+var_28], 0
call __Znwm; operator new(ulong)
lea rcx, [rax... | long long func0(int a1)
{
char *v1; // rax
char *v2; // rcx
int v3; // ebx
char *v4; // rsi
char *v5; // rdx
unsigned int v6; // ebx
unsigned long long v8; // rsi
int v9; // [rsp+Ch] [rbp-3Ch] BYREF
void *v10[2]; // [rsp+10h] [rbp-38h] BYREF
char *v11; // [rsp+20h] [rbp-28h]
unsigned long long v1... | func0:
ENDBR64
PUSH RBP
PXOR XMM0,XMM0
MOV EBP,EDI
MOV EDI,0x4
PUSH RBX
SUB RSP,0x38
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOV qword ptr [RSP + 0x20],0x0
LAB_00101343:
CALL 0x001010f0
LEA RCX,[RAX + 0x4]
MOV dword ptr [RAX],0x1
MOV EBX,0x2
MOV qword ... | /* func0(int) */
int func0(int param_1)
{
int *piVar1;
int *piVar2;
int iVar3;
ulong uVar4;
long in_FS_OFFSET;
int local_3c;
int local_38 [16];
int *local_28;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_38 = (int [16])0x0;
local_28 = (int *)0x0;
/* t... |
1,179 | func0 |
#include <iostream>
#include <vector>
#include <cassert>
| int func0(int number) {
std::vector<int> divisors;
divisors.push_back(1);
for (int i = 2; i < number; i++) {
if (number % i == 0) {
divisors.push_back(i);
}
}
int sum = 0;
for (auto div : divisors) {
sum += div;
}
return sum;
}
| int main() {
assert(func0(8) == 7);
assert(func0(12) == 16);
assert(func0(7) == 1);
return 0;
}
| O3 | cpp | func0(int):
endbr64
push %r15
pxor %xmm0,%xmm0
xor %esi,%esi
push %r14
push %r13
push %r12
push %rbp
mov %edi,%ebp
push %rbx
sub $0x48,%rsp
mov %fs:0x28,%rax
mov %rax,0x38(%rsp)
xor %eax,%eax
lea 0x1c(%rsp),%rdx
lea 0x20(%rsp),%rdi
movq $0x0,0x30(%rsp)
movl $0x1,0x1c(%rsp)
mova... | _Z5func0i:
endbr64
push rbp
pxor xmm0, xmm0
mov ebp, edi
mov edi, 4; unsigned __int64
push rbx
sub rsp, 38h
mov rax, fs:28h
mov [rsp+48h+var_20], rax
xor eax, eax
movaps xmmword ptr [rsp+48h+var_38], xmm0
mov [rsp+48h+var_28], 0
call __Znwm; operator new(ulong)
lea rcx, [rax... | long long func0(int a1)
{
_DWORD *v2; // rax
unsigned long long *v3; // rcx
__m128i *v4; // rdi
int v5; // ebx
unsigned long long *v6; // rsi
const __m128i *v7; // rax
unsigned long long v8; // r8
__m128i v9; // xmm0
__m128i v10; // xmm2
__m128i v11; // xmm0
unsigned int v12; // ebx
unsigned lo... | func0:
ENDBR64
PUSH RBP
PXOR XMM0,XMM0
MOV EBP,EDI
MOV EDI,0x4
PUSH RBX
SUB RSP,0x38
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOV qword ptr [RSP + 0x20],0x0
LAB_00101343:
CALL 0x001010f0
LEA RCX,[RAX + 0x4]
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,RAX
MOV... | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int *piVar2;
int *piVar3;
int *piVar4;
int *piVar5;
int *piVar6;
ulong uVar7;
ulong uVar8;
ulong uVar9;
long in_FS_OFFSET;
int iVar10;
int iVar11;
int iVar12;
int iVar13;
int local_3c;
int local_38 [16];
int *local_28;
long local... |
1,180 | func0 |
#include <iostream>
#include <cassert>
| int func0(int arr[], int n) {
int inv_count = 0;
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
if (arr[i] > arr[j]) {
inv_count += 1;
}
}
}
return inv_count;
}
| int main() {
int arr1[] = {1, 20, 6, 4, 5};
assert(func0(arr1, 5) == 5);
int arr2[] = {1, 2, 1};
assert(func0(arr2, 3) == 1);
int arr3[] = {1, 2, 5, 6, 1};
assert(func0(arr3, 5) == 3);
return 0;
}
| O0 | cpp | func0(int*, int):
endbr64
push %rbp
mov %rsp,%rbp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
movl $0x0,-0xc(%rbp)
movl $0x0,-0x8(%rbp)
mov -0x8(%rbp),%eax
cmp -0x1c(%rbp),%eax
jge 121f <_Z5func0Pii+0x76>
mov -0x8(%rbp),%eax
add $0x1,%eax
mov %eax,-0x4(%rbp)
mov -0x4(%rbp),%eax
cmp ... | _Z5func0Pii:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_C], 0
mov [rbp+var_8], 0
jmp short loc_11D7
loc_1188:
mov eax, [rbp+var_8]
add eax, 1
mov [rbp+var_4], eax
jmp short loc_11CB
loc_1193:
mov eax, [rbp+var_8]
cdqe
lea rdx... | long long func0(int *a1, int a2)
{
unsigned int v3; // [rsp+10h] [rbp-Ch]
int i; // [rsp+14h] [rbp-8h]
int j; // [rsp+18h] [rbp-4h]
v3 = 0;
for ( i = 0; i < a2; ++i )
{
for ( j = i + 1; j < a2; ++j )
{
if ( a1[i] > a1[j] )
++v3;
}
}
return v3;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0xc],0x0
MOV dword ptr [RBP + -0x8],0x0
JMP 0x001011d7
LAB_00101188:
MOV EAX,dword ptr [RBP + -0x8]
ADD EAX,0x1
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001011cb
LAB_00101193:
MOV EAX,dword ptr [RBP + -... | /* func0(int*, int) */
int func0(int *param_1,int param_2)
{
int local_14;
int local_10;
int local_c;
local_14 = 0;
for (local_10 = 0; local_c = local_10, local_10 < param_2; local_10 = local_10 + 1) {
while (local_c = local_c + 1, local_c < param_2) {
if (param_1[local_c] < param_1[local_10]) ... |
1,181 | func0 |
#include <iostream>
#include <cassert>
| int func0(int arr[], int n) {
int inv_count = 0;
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
if (arr[i] > arr[j]) {
inv_count += 1;
}
}
}
return inv_count;
}
| int main() {
int arr1[] = {1, 20, 6, 4, 5};
assert(func0(arr1, 5) == 5);
int arr2[] = {1, 2, 1};
assert(func0(arr2, 3) == 1);
int arr3[] = {1, 2, 5, 6, 1};
assert(func0(arr3, 5) == 3);
return 0;
}
| O1 | cpp | func0(int*, int):
endbr64
test %esi,%esi
jle 11eb <_Z5func0Pii+0x42>
lea -0x1(%rsi),%r9d
add $0x1,%r9
mov $0x1,%r8d
mov $0x0,%ecx
jmp 11dc <_Z5func0Pii+0x33>
add $0x1,%rax
cmp %eax,%esi
jle 11d8 <_Z5func0Pii+0x2f>
cmp (%rdi,%rax,4),%edx
jle 11c6 <_Z5func0Pii+0x1d>
add $0x1,%ecx
jmp... | _Z5func0Pii:
endbr64
test esi, esi
jle short loc_11B1
mov r9d, esi
movsxd r10, esi
mov r8d, 1
mov ecx, 0
jmp short loc_11A2
loc_1184:
add rax, 1
cmp esi, eax
jle short loc_1196
loc_118C:
cmp edx, [rdi+rax*4]
jle short loc_1184
add ecx, 1
jmp short loc_1184
loc_1196:
l... | long long func0(int *a1, int a2)
{
long long v2; // r8
unsigned int v3; // ecx
long long v4; // rax
if ( a2 <= 0 )
{
return 0;
}
else
{
v2 = 1LL;
v3 = 0;
while ( v2 != a2 )
{
v4 = v2;
do
{
if ( a1[v2 - 1] > a1[v4] )
++v3;
++v4;
}
... | func0:
ENDBR64
TEST ESI,ESI
JLE 0x001011b1
MOV R9D,ESI
MOVSXD R10,ESI
MOV R8D,0x1
MOV ECX,0x0
JMP 0x001011a2
LAB_00101184:
ADD RAX,0x1
CMP ESI,EAX
JLE 0x00101196
LAB_0010118c:
CMP EDX,dword ptr [RDI + RAX*0x4]
JLE 0x00101184
ADD ECX,0x1
JMP 0x00101184
LAB_00101196:
LEA RAX,[R8 + 0x1]
CMP R8,R10
JZ 0x001011b6
MOV R8,RAX... | /* func0(int*, int) */
int func0(int *param_1,int param_2)
{
ulong uVar1;
int iVar2;
ulong uVar3;
bool bVar4;
if (param_2 < 1) {
iVar2 = 0;
}
else {
iVar2 = 0;
uVar3 = 1;
do {
if (uVar3 == (uint)param_2) {
return iVar2;
}
uVar1 = uVar3;
do {
if ... |
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.