index
int64
0
66.5k
func_name
stringlengths
2
5.36k
func_dep
stringlengths
16
2.19k
func
stringlengths
8
55.3k
test
stringlengths
0
7.07k
opt
stringclasses
4 values
language
stringclasses
2 values
asm
stringlengths
0
45.4k
ida_asm
stringlengths
0
44.7k
ida_pseudo
stringlengths
0
44.3k
ghidra_asm
stringlengths
0
49.1k
ghidra_pseudo
stringlengths
0
64.7k
3,282
func0
#include <cassert> #include <map> #include <string>
std::map<std::string, std::string> func0(const std::map<std::string, std::string>& dict1, const std::map<std::string, std::string>& dict2) { std::map<std::string, std::string> merged_dict; for (const auto &pair : dict1) { merged_dict.insert(pair)...
int main() { { std::map<std::string, std::string> d1 = { {"R", "Red"}, {"B", "Black"}, {"P", "Pink"} }; std::map<std::string, std::string> d2 = { {"G", "Green"}, {"W", "White"} }; std::map<std::string, std::string> expected = { {"B", "Black"}, {"G", "Green"}, {"P", "Pink"}, {"R", "Red"},...
O2
cpp
func0(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_strin...
_Z5func0RKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEESE_: endbr64 push r15 push r14 push r13 push r12 mov r12, rdx push rbp lea rbp, [rsi+8] push rbx lea rbx, [rdi+8] sub rsp, 28h mov [rdi+18h], rbx mov [rsp+58h+var_48], rbx m...
long long func0(long long a1, long long a2, long long a3) { long long v4; // rbx long long v5; // r14 long long v6; // rbx const void *v7; // r12 size_t v8; // r15 size_t v9; // rbp size_t v10; // rdx int v11; // eax const void *v12; // rsi size_t v13; // rbx size_t v14; // rdx int v15; // eax ...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 MOV R12,RDX PUSH RBP LEA RBP,[RSI + 0x8] PUSH RBX LEA RBX,[RDI + 0x8] SUB RSP,0x28 MOV qword ptr [RDI + 0x18],RBX MOV qword ptr [RSP + 0x10],RBX MOV qword ptr [RDI + 0x20],RBX MOV RBX,qword ptr [RSI + 0x18] MOV qword ptr [RSP + 0x8],RDI MOV dword ptr [RDI + 0x8],0x0 MO...
/* func0(std::map<std::string, std::string, std::less<std::string >, std::allocator<std::pair<std::string const, std::string > > > const&, std::map<std::string, std::string, std::less<std::string >, std::allocator<std::pair<std::string const, std::string > > > const&) */ map * func0(map *param_1,map *param_2)...
3,283
func0
#include <cassert> #include <map> #include <string>
std::map<std::string, std::string> func0(const std::map<std::string, std::string>& dict1, const std::map<std::string, std::string>& dict2) { std::map<std::string, std::string> merged_dict; for (const auto &pair : dict1) { merged_dict.insert(pair)...
int main() { { std::map<std::string, std::string> d1 = { {"R", "Red"}, {"B", "Black"}, {"P", "Pink"} }; std::map<std::string, std::string> d2 = { {"G", "Green"}, {"W", "White"} }; std::map<std::string, std::string> expected = { {"B", "Black"}, {"G", "Green"}, {"P", "Pink"}, {"R", "Red"},...
O3
cpp
func0(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_strin...
_Z5func0RKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEESE_: endbr64 push r15 push r14 push r13 push r12 mov r12, rdx push rbp lea rbp, [rsi+8] push rbx lea rbx, [rdi+8] sub rsp, 28h mov [rdi+18h], rbx mov [rsp+58h+var_48], rbx m...
long long func0(long long a1, long long a2, long long a3) { long long v4; // rbx long long insert_unique_pos; // rax long long v6; // rdx const void *v7; // r12 size_t v8; // r15 long long v9; // r14 long long v10; // rbx size_t v11; // rbp size_t v12; // rdx int v13; // eax const void *v14; // r...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 MOV R12,RDX PUSH RBP LEA RBP,[RSI + 0x8] PUSH RBX LEA RBX,[RDI + 0x8] SUB RSP,0x28 MOV qword ptr [RDI + 0x18],RBX MOV qword ptr [RSP + 0x10],RBX MOV qword ptr [RDI + 0x20],RBX MOV RBX,qword ptr [RSI + 0x18] MOV qword ptr [RSP + 0x8],RDI MOV dword ptr [RDI + 0x8],0x0 MO...
/* func0(std::map<std::string, std::string, std::less<std::string >, std::allocator<std::pair<std::string const, std::string > > > const&, std::map<std::string, std::string, std::less<std::string >, std::allocator<std::pair<std::string const, std::string > > > const&) */ map * func0(map *param_1,map *param_2)...
3,284
func0
#include <iostream> #include <string> #include <regex> #include <assert.h>
bool func0(const std::string& p) { if (p.length() < 6 || p.length() > 12) { return false; } if (!std::regex_search(p, std::regex("[a-z]"))) { return false; } if (!std::regex_search(p, std::regex("[0-9]"))) { return false; } if (!std::regex_search(p, std::reg...
int main() { assert(func0("password") == false); assert(func0("Password@10") == true); assert(func0("password@10") == false); return 0; }
O0
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x48,%rsp mov %rdi,-0x48(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax mov -0x48(%rbp),%rax mov %rax,%rdi callq 5a30 <_ZNKSt7__cxx1112ba...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 48h mov [rbp+var_48], rdi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov rax, [rbp+var_48] mov rdi, rax call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcES...
_BOOL8 func0(long long a1) { int v3; // ebx int v4; // ebx int v5; // ebx int v6; // ebx char v7; // bl _BYTE v8[40]; // [rsp+10h] [rbp-40h] BYREF unsigned long long v9; // [rsp+38h] [rbp-18h] v9 = __readfsqword(0x28u); if ( (unsigned long long)std::string::length(a1) <= 5 || (unsigned long long)std...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x48 MOV qword ptr [RBP + -0x48],RDI 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 0x00104930 CMP RAX,0x5 JBE 0x00104b6d MOV RAX,qword ptr [RBP + -0x48] MOV RDI,RAX CALL 0x00104930 CMP RAX,0xc...
/* func0(std::string const&) */ int8 func0(string *param_1) { bool bVar1; ulong uVar2; int8 uVar3; long in_FS_OFFSET; regex local_48 [40]; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); uVar2 = std::string::length(); if (5 < uVar2) { uVar2 = std::string::length(); if (uVar2 < 0...
3,285
func0
#include <iostream> #include <string> #include <regex> #include <assert.h>
bool func0(const std::string& p) { if (p.length() < 6 || p.length() > 12) { return false; } if (!std::regex_search(p, std::regex("[a-z]"))) { return false; } if (!std::regex_search(p, std::regex("[0-9]"))) { return false; } if (!std::regex_search(p, std::reg...
int main() { assert(func0("password") == false); assert(func0("Password@10") == true); assert(func0("password@10") == false); return 0; }
O1
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r12 push %rbp push %rbx sub $0x1e0,%rsp mov %fs:0x28,%rax mov %rax,0x1d8(%rsp) xor %eax,%eax mov 0x8(%rdi),%rax sub $0x6,%rax mov $0x0,%ebp cmp $0x6,%rax jbe 4883 <_Z5func0RKNSt7...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push r14 push rbx sub rsp, 1E0h mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov rax, [rdi+8] sub rax, 6 mov r14d, 0 cmp rax, 6 jbe short loc_483D loc_481E: mov rax, [...
long long func0(long long *a1) { unsigned int v1; // r14d long long v4; // rdx long long v5; // rax long long v6; // rdi long long v7; // rdi long long v8; // rsi long long v9; // rdi long long v10; // rsi long long v11; // rdi long long v12; // rsi long long v13; // rdi long long v14; // rsi ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x1e0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV RAX,qword ptr [RDI + 0x8] SUB RAX,0x6 MOV R14D,0x0 CMP RAX,0x6 JBE 0x0010483d LAB_0010481e: MOV RAX,qword ptr [RBP + -0x18] SUB RAX,qword ptr FS:[0x28] JNZ 0x00104e7d MOV EAX,R...
/* func0(std::string const&) */ ulong func0(string *param_1) { _Sp_counted_base<(_Lock_policy)2> *this; _Sp_counted_base<(_Lock_policy)2> *p_Var1; bool bVar2; int7 extraout_var; int7 extraout_var_00; int7 extraout_var_01; int7 extraout_var_02; int7 extraout_var_03; ulong uVar3; long in_FS_OFFSET; ...
3,286
func0
#include <iostream> #include <string> #include <regex> #include <assert.h>
bool func0(const std::string& p) { if (p.length() < 6 || p.length() > 12) { return false; } if (!std::regex_search(p, std::regex("[a-z]"))) { return false; } if (!std::regex_search(p, std::regex("[0-9]"))) { return false; } if (!std::regex_search(p, std::reg...
int main() { assert(func0("password") == false); assert(func0("Password@10") == true); assert(func0("password@10") == false); return 0; }
O2
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x218,%rsp mov %fs:0x28,%rax mov %rax,0x208(%rsp) xor %eax,%eax mov 0x8(%rdi),%rax sub $0x6,%rax cmp $0x6,%rax jbe 4...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov rax, fs:28h mov [rbp+var_38], rax mov rax, [rdi+8] sub rax, 6 cmp rax, 6 jbe short loc_4C88 loc_4C60: xor eax,...
long long func0(long long *a1) { long long v3; // rdi long long v4; // rsi char v5; // r13 long long v6; // rdi long long v7; // rsi long long v8; // rsi char v9; // al long long v10; // rdx long long v11; // rcx long long v12; // r8 long long v13; // r9 char v14; // r13 long long v15; // rdi...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RDI + 0x8] SUB RAX,0x6 CMP RAX,0x6 JBE 0x00104c88 LAB_00104c60: XOR EAX,EAX LAB_00104c62: MOV RDX,qword ptr [RBP + -0x38] SUB RDX,qword ptr FS:[0x2...
/* func0(std::string const&) */ uint func0(string *param_1) { _Sp_counted_base<(_Lock_policy)2> *p_Var1; int8 uVar2; bool bVar3; int iVar4; uint uVar5; int7 extraout_var; long in_FS_OFFSET; regex local_88 [8]; int local_80 [8]; int local_78 [16]; int local_68 [16]; int local_58 [16]; long lo...
3,287
func0
#include <iostream> #include <string> #include <regex> #include <assert.h>
bool func0(const std::string& p) { if (p.length() < 6 || p.length() > 12) { return false; } if (!std::regex_search(p, std::regex("[a-z]"))) { return false; } if (!std::regex_search(p, std::regex("[0-9]"))) { return false; } if (!std::regex_search(p, std::reg...
int main() { assert(func0("password") == false); assert(func0("Password@10") == true); assert(func0("password@10") == false); return 0; }
O3
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x208,%rsp mov %fs:0x28,%rax mov %rax,0x1f8(%rsp) xor %eax,%eax mov 0x8(%rdi),%rax sub $0x6,%rax cmp $0x6,%rax jbe 5...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push r13 push r12 push rbp push rbx sub rsp, 1C8h mov rax, fs:28h mov [rsp+1E8h+var_30], rax mov rax, [rdi+8] sub rax, 6 cmp rax, 6 jbe short loc_5C40 loc_5C10: xor eax, eax loc_5C12: mov rdx, [rsp+1E...
long long func0(_QWORD *a1) { long long v3; // rsi __m128i v4; // xmm0 long long v5; // rdi void *v6; // rdi void **v7; // rbx unsigned long long v8; // r12 void *v9; // rdi long long v10; // rbx long long v11; // rdx volatile signed __int32 *v12; // rcx signed __int32 v13; // eax char v14; // ...
func0: ENDBR64 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x1c8 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x1b8],RAX MOV RAX,qword ptr [RDI + 0x8] SUB RAX,0x6 CMP RAX,0x6 JBE 0x00105c40 LAB_00105c10: XOR EAX,EAX LAB_00105c12: MOV RDX,qword ptr [RSP + 0x1b8] SUB RDX,qword ptr FS:[0x28] JNZ 0x00105f0f ADD RSP,0x1...
/* func0(std::string const&) */ uint func0(string *param_1) { _Sp_counted_base<(_Lock_policy)2> *p_Var1; int8 uVar2; int auVar3 [16]; bool bVar4; int iVar5; uint uVar6; int7 extraout_var; int8 *puVar7; long in_FS_OFFSET; int4 local_1e8 [2]; locale local_1e0 [2]; int local_1d8 [16]; _Compiler...
3,288
func0
#include <iostream> #include <string> #include <regex> #include <assert.h>
std::string func0(std::string string, std::string sample) { if (string.find(sample) != std::string::npos) { std::string y = "^" + sample; std::regex pattern(y); if (std::regex_search(string, pattern)) { return "string starts with the given substring"; } else { ...
int main() { assert(func0("dreams for dreams makes life fun", "makes") == "string doesnt start with the given substring"); assert(func0("Hi there how are you Hi alex", "Hi") == "string starts with the given substring"); assert(func0("Its been a long day", "been") == "string doesnt start with the given su...
O0
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x88,%rsp mov %rdi,-0x78(%rbp) mov %rsi,-0x80(%rbp) mov %rdx,-0x88(%rbp) mov %fs:0...
_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 98h mov [rbp+var_88], rdi mov [rbp+var_90], rsi mov [rbp+var_98], rdx mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov rcx, [rbp+var_98] mov rax, [rbp+var_...
long long func0(long long a1, long long a2, long long a3) { char v5; // [rsp+27h] [rbp-79h] BYREF char *v6; // [rsp+28h] [rbp-78h] char *v7; // [rsp+30h] [rbp-70h] _BYTE *v8; // [rsp+38h] [rbp-68h] _BYTE v9[32]; // [rsp+40h] [rbp-60h] BYREF _BYTE v10[40]; // [rsp+60h] [rbp-40h] BYREF unsigned long long v...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x98 MOV qword ptr [RBP + -0x88],RDI MOV qword ptr [RBP + -0x90],RSI MOV qword ptr [RBP + -0x98],RDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV RCX,qword ptr [RBP + -0x98] MOV RAX,qword ptr [RBP + -0x90] MOV EDX,0x0 MOV RSI,RCX MOV RD...
/* func0(std::string, std::string) */ string * func0(string *param_1,string *param_2,ulong param_3) { bool bVar1; long lVar2; long in_FS_OFFSET; allocator local_81; allocator *local_80; allocator *local_78; regex *local_70; regex local_68 [32]; string local_48 [40]; long local_20; local_20 = ...
3,289
func0
#include <iostream> #include <string> #include <regex> #include <assert.h>
std::string func0(std::string string, std::string sample) { if (string.find(sample) != std::string::npos) { std::string y = "^" + sample; std::regex pattern(y); if (std::regex_search(string, pattern)) { return "string starts with the given substring"; } else { ...
int main() { assert(func0("dreams for dreams makes life fun", "makes") == "string doesnt start with the given substring"); assert(func0("Hi there how are you Hi alex", "Hi") == "string starts with the given substring"); assert(func0("Its been a long day", "been") == "string doesnt start with the given su...
O1
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): endbr64 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x200,%rsp mov %rdi,%rbx mov %rsi,%r12 mov %rdx,%rbp mov %fs:0x...
_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_: endbr64 push rbp mov rbp, rsp push r14 push r13 push r12 push rbx sub rsp, 200h mov rbx, rdi mov r12, rsi mov r13, rdx mov rax, fs:28h mov [rbp+var_28], rax xor eax, eax mov rcx, [rdx+8] mov rsi, [rdx...
_QWORD * func0(_QWORD *a1, long long *a2, long long *a3) { long long *v5; // rax unsigned long long v6; // r13 long long v7; // r14 long long v8; // rdx long long v9; // rax long long v10; // rdi long long v11; // rdi long long v12; // rsi char v13; // r14 int v15; // [rsp+0h] [rbp-220h] BYREF _BY...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x200 MOV RBX,RDI MOV R12,RSI MOV R13,RDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX XOR EAX,EAX MOV RCX,qword ptr [RDX + 0x8] MOV RSI,qword ptr [RDX] MOV EDX,0x0 MOV RDI,R12 CALL 0x001046c0 CMP RAX,-0x1 JZ 0x00104bfc MOV R...
/* func0(std::string, std::string) */ long * func0(long *param_1,char *param_2,ulong *param_3) { ulong uVar1; ulong uVar2; _Sp_counted_base<(_Lock_policy)2> *this; _Sp_counted_base<(_Lock_policy)2> *p_Var3; bool bVar4; long lVar5; int8 uVar6; long in_FS_OFFSET; int4 local_228 [2]; locale local_220...
3,290
func0
#include <iostream> #include <string> #include <regex> #include <assert.h>
std::string func0(std::string string, std::string sample) { if (string.find(sample) != std::string::npos) { std::string y = "^" + sample; std::regex pattern(y); if (std::regex_search(string, pattern)) { return "string starts with the given substring"; } else { ...
int main() { assert(func0("dreams for dreams makes life fun", "makes") == "string doesnt start with the given substring"); assert(func0("Hi there how are you Hi alex", "Hi") == "string starts with the given substring"); assert(func0("Its been a long day", "been") == "string doesnt start with the given su...
O2
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): endbr64 push %r15 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp mov %rsi,%rbp push %rbx mov %rdx,%rbx mov %rbp,%rdi sub...
_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_: endbr64 push rbp mov rbp, rsp push r15 push r14 mov r14, rdx push r13 push r12 mov r12, rsi push rbx mov rbx, rdi mov rdi, r12 sub rsp, 218h mov rcx, [rdx+8] mov rsi, [rdx] xor edx, edx mov rax, fs...
long long * func0(long long *a1, long long *a2, long long *a3) { long long v7; // rcx long long v8; // rsi unsigned long long v9; // rax long long v10; // r13 void *v11; // rsi __m128i v12; // xmm0 long long v13; // rax volatile signed __int32 *v14; // rcx signed __int32 v15; // eax volatile signed ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 MOV R14,RDX PUSH R13 PUSH R12 MOV R12,RSI PUSH RBX MOV RBX,RDI MOV RDI,R12 SUB RSP,0x218 MOV RCX,qword ptr [RDX + 0x8] MOV RSI,qword ptr [RDX] XOR EDX,EDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x38],RAX XOR EAX,EAX CALL 0x001046c0 CMP RAX,-0x1 JZ 0x00106...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(std::string, std::string) */ ulong * func0(ulong *param_1,char *param_2,ulong *param_3) { _Sp_counted_base<(_Lock_policy)2> *p_Var1; ulong uVar2; ulong uVar3; int8 uVar4; int8 uVar5; bool bVar6; int iVar7; lo...
3,291
func0
#include <iostream> #include <string> #include <regex> #include <assert.h>
std::string func0(std::string string, std::string sample) { if (string.find(sample) != std::string::npos) { std::string y = "^" + sample; std::regex pattern(y); if (std::regex_search(string, pattern)) { return "string starts with the given substring"; } else { ...
int main() { assert(func0("dreams for dreams makes life fun", "makes") == "string doesnt start with the given substring"); assert(func0("Hi there how are you Hi alex", "Hi") == "string starts with the given substring"); assert(func0("Its been a long day", "been") == "string doesnt start with the given su...
O3
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): endbr64 push %r15 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp mov %rsi,%rbp push %rbx mov %rdx,%rbx mov %rbp,%rdi sub...
_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_: endbr64 push rbp mov rbp, rsp push r15 push r14 push r13 mov r13, rsi push r12 push rbx mov rbx, rdx sub rsp, 218h mov rcx, [rdx+8] mov rsi, [rdx] xor edx, edx mov [rbp+var_238], rdi mov rdi, r13 mov ...
long long * func0(long long *a1, long long *a2, long long *a3) { long long v5; // rcx long long v6; // rsi long long v7; // r12 unsigned long long v8; // rbx __m128i v9; // xmm0 long long v10; // rdi void *v11; // rdi void **v12; // rbx unsigned long long v13; // r12 void *v14; // rdi long long v1...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 MOV R13,RSI PUSH R12 PUSH RBX MOV RBX,RDX SUB RSP,0x218 MOV RCX,qword ptr [RDX + 0x8] MOV RSI,qword ptr [RDX] XOR EDX,EDX MOV qword ptr [RBP + -0x238],RDI MOV RDI,R13 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x38],RAX XOR EAX,EAX CALL 0x00104720 CM...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(std::string, std::string) */ ulong * func0(ulong *param_1,char *param_2,ulong *param_3) { ulong uVar1; ulong uVar2; int8 uVar3; int8 uVar4; int auVar5 [16]; bool bVar6; long lVar7; int8 *puVar8; long in_FS_...
3,292
func0
#include <vector> #include <algorithm> #include <assert.h>
std::vector<int> func0(std::vector<int>& l) { auto it = std::remove_if(l.begin(), l.end(), [](int i){ return i % 2 == 0; }); l.erase(it, l.end()); return l; }
int main() { std::vector<int> v1 = {1, 3, 5, 2}; std::vector<int> r1 = func0(v1); assert((r1 == std::vector<int>{1, 3, 5})); std::vector<int> v2 = {5, 6, 7}; std::vector<int> r2 = func0(v2); assert((r2 == std::vector<int>{5, 7})); std::vector<int> v3 = {1, 2, 3, 4}; std::vect...
O0
cpp
func0(std::vector<int, std::allocator<int> >&)::{lambda(int)#1}::operator()(int) const: push %rbp mov %rsp,%rbp mov %rdi,-0x8(%rbp) mov %esi,-0xc(%rbp) mov -0xc(%rbp),%eax and $0x1,%eax test %eax,%eax sete %al pop %rbp retq
_ZZ5func0RSt6vectorIiSaIiEEENKUliE_clEi: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_C], esi mov eax, [rbp+var_C] and eax, 1 test eax, eax setz al pop rbp retn
bool func0(std::vector<int> &)::{lambda(int)#1}::operator()(long long a1, char a2) { return (a2 & 1) == 0; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x48 MOV qword ptr [RBP + -0x48],RDI MOV qword ptr [RBP + -0x50],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV RAX,qword ptr [RBP + -0x50] MOV RDI,RAX CALL 0x00101d2a MOV RBX,RAX MOV RAX,qword ptr [RBP + -0x50] MOV RDI,RAX CALL 0x001...
/* func0(std::vector<int, std::allocator<int> >&) */ vector * func0(vector *param_1) { int8 uVar1; int8 uVar2; vector<int,std::allocator<int>> *in_RSI; long in_FS_OFFSET; int8 local_40; int8 local_38; __normal_iterator local_30 [2]; __normal_iterator local_28 [2]; long local_20; local_20 = *(lo...
3,293
func0
#include <vector> #include <algorithm> #include <assert.h>
std::vector<int> func0(std::vector<int>& l) { auto it = std::remove_if(l.begin(), l.end(), [](int i){ return i % 2 == 0; }); l.erase(it, l.end()); return l; }
int main() { std::vector<int> v1 = {1, 3, 5, 2}; std::vector<int> r1 = func0(v1); assert((r1 == std::vector<int>{1, 3, 5})); std::vector<int> v2 = {5, 6, 7}; std::vector<int> r2 = func0(v2); assert((r2 == std::vector<int>{5, 7})); std::vector<int> v3 = {1, 2, 3, 4}; std::vect...
O1
cpp
func0(std::vector<int, std::allocator<int> >&): endbr64 push %r13 push %r12 push %rbp push %rbx sub $0x8,%rsp mov %rdi,%rbx mov %rsi,%rbp mov 0x8(%rsi),%rcx mov (%rsi),%rax mov %rcx,%rdx sub %rax,%rdx sar $0x4,%rdx test %rdx,%rdx jle 12ca <_Z5func0RSt6vectorIiSaIiEE+0x61> shl $0x...
_Z5func0RSt6vectorIiSaIiEE: endbr64 push r13 push r12 push rbp push rbx sub rsp, 8 mov rbx, rdi mov rbp, rsi mov rsi, [rsi+8] mov rax, [rbp+0] mov rdx, rsi sub rdx, rax sar rdx, 4 test rdx, rdx jle short loc_12FD shl rdx, 4 add rdx, rax loc_129B: test byte p...
_QWORD * func0(_QWORD *a1, long long a2) { _BYTE *v3; // rsi _BYTE *v4; // rax long long v5; // rdx _BYTE *v6; // rdx long long v7; // rax _DWORD *v8; // rdx unsigned long long v9; // r13 _DWORD *v10; // r12 _DWORD *v11; // rsi signed long long v12; // rbp v3 = *(_BYTE **)(a2 + 8); v4 = *(_BYTE...
func0: ENDBR64 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x8 MOV RBX,RDI MOV RBP,RSI MOV RSI,qword ptr [RSI + 0x8] MOV RAX,qword ptr [RBP] MOV RDX,RSI SUB RDX,RAX SAR RDX,0x4 TEST RDX,RDX JLE 0x001012fd SHL RDX,0x4 ADD RDX,RAX LAB_0010129b: TEST byte ptr [RAX],0x1 JZ 0x001012e1 TEST byte ptr [RAX + 0x4],0x1 JZ 0x0010...
/* func0(std::vector<int, std::allocator<int> >&) */ vector * func0(vector *param_1) { uint *puVar1; int4 *__src; uint *puVar2; int4 *__dest; long lVar3; uint *puVar4; size_t __n; long *in_RSI; ulong uVar5; puVar1 = (uint *)in_RSI[1]; puVar2 = (uint *)*in_RSI; lVar3 = (long)puVar1 - (long)p...
3,294
func0
#include <vector> #include <algorithm> #include <assert.h>
std::vector<int> func0(std::vector<int>& l) { auto it = std::remove_if(l.begin(), l.end(), [](int i){ return i % 2 == 0; }); l.erase(it, l.end()); return l; }
int main() { std::vector<int> v1 = {1, 3, 5, 2}; std::vector<int> r1 = func0(v1); assert((r1 == std::vector<int>{1, 3, 5})); std::vector<int> v2 = {5, 6, 7}; std::vector<int> r2 = func0(v2); assert((r2 == std::vector<int>{5, 7})); std::vector<int> v3 = {1, 2, 3, 4}; std::vect...
O2
cpp
func0(std::vector<int, std::allocator<int> >&): endbr64 push %r12 mov %rdi,%r12 push %rbp mov %rsi,%rbp push %rbx mov 0x8(%rsi),%rcx mov (%rsi),%rsi mov %rcx,%rbx sub %rsi,%rbx mov %rbx,%rax mov %rbx,%rdi sar $0x4,%rax sar $0x2,%rdi test %rax,%rax jle 17d0 <_Z5func0RSt6vectorIiS...
_Z5func0RSt6vectorIiSaIiEE: endbr64 push r12 push rbp mov rbp, rsi push rbx mov rsi, [rsi+8] mov rbx, rdi mov r8, [rbp+0] mov rdi, rsi sub rdi, r8 mov rdx, rdi mov rcx, rdi sar rdx, 4 sar rcx, 2 test rdx, rdx jle loc_17FF shl rdx, 4 mov rax, r8 add rdx...
long long func0(long long a1, _QWORD *a2) { _BYTE *v3; // rsi _BYTE *v5; // r8 signed long long v6; // rdi long long v7; // rcx _BYTE *v8; // rax _DWORD *v9; // rdx signed long long v10; // r12 _DWORD *v11; // rcx _DWORD *v12; // rsi signed long long v13; // rbp long long result; // rax v3 = (...
func0: ENDBR64 PUSH R12 PUSH RBP MOV RBP,RSI PUSH RBX MOV RSI,qword ptr [RSI + 0x8] MOV RBX,RDI MOV R8,qword ptr [RBP] MOV RDI,RSI SUB RDI,R8 MOV RDX,RDI MOV RCX,RDI SAR RDX,0x4 SAR RCX,0x2 TEST RDX,RDX JLE 0x001017ff SHL RDX,0x4 MOV RAX,R8 ADD RDX,R8 JMP 0x0010168b LAB_00101660: TEST byte ptr [RAX + 0x4],0x1 JZ 0x0010...
/* func0(std::vector<int, std::allocator<int> >&) */ vector * func0(vector *param_1) { uint uVar1; int4 *__src; uint *puVar2; int4 *__dest; ulong uVar3; uint *puVar4; size_t __n; int8 *in_RSI; uint *puVar5; ulong uVar6; uint *puVar7; puVar5 = (uint *)in_RSI[1]; puVar7 = (uint *)*in_RSI; ...
3,295
func0
#include <vector> #include <algorithm> #include <assert.h>
std::vector<int> func0(std::vector<int>& l) { auto it = std::remove_if(l.begin(), l.end(), [](int i){ return i % 2 == 0; }); l.erase(it, l.end()); return l; }
int main() { std::vector<int> v1 = {1, 3, 5, 2}; std::vector<int> r1 = func0(v1); assert((r1 == std::vector<int>{1, 3, 5})); std::vector<int> v2 = {5, 6, 7}; std::vector<int> r2 = func0(v2); assert((r2 == std::vector<int>{5, 7})); std::vector<int> v3 = {1, 2, 3, 4}; std::vect...
O3
cpp
func0(std::vector<int, std::allocator<int> >&): endbr64 push %r12 mov %rdi,%r12 push %rbp mov %rsi,%rbp push %rbx mov 0x8(%rsi),%rcx mov (%rsi),%rsi mov %rcx,%rbx sub %rsi,%rbx mov %rbx,%rax mov %rbx,%rdi sar $0x4,%rax sar $0x2,%rdi test %rax,%rax jle 17b0 <_Z5func0RSt6vectorIiS...
_Z5func0RSt6vectorIiSaIiEE: endbr64 push r12 push rbp mov rbp, rsi push rbx mov rsi, [rsi+8] mov rbx, rdi mov r8, [rbp+0] mov rdi, rsi sub rdi, r8 mov rdx, rdi mov rcx, rdi sar rdx, 4 sar rcx, 2 test rdx, rdx jle loc_17FF shl rdx, 4 mov rax, r8 add rdx...
long long func0(long long a1, _QWORD *a2) { _BYTE *v3; // rsi _BYTE *v5; // r8 signed long long v6; // rdi long long v7; // rcx _BYTE *v8; // rax _DWORD *v9; // rdx signed long long v10; // r12 _DWORD *v11; // rcx _DWORD *v12; // rsi signed long long v13; // rbp long long result; // rax v3 = (...
func0: ENDBR64 PUSH R12 PUSH RBP MOV RBP,RSI PUSH RBX MOV RSI,qword ptr [RSI + 0x8] MOV RBX,RDI MOV R8,qword ptr [RBP] MOV RDI,RSI SUB RDI,R8 MOV RDX,RDI MOV RCX,RDI SAR RDX,0x4 SAR RCX,0x2 TEST RDX,RDX JLE 0x001017ff SHL RDX,0x4 MOV RAX,R8 ADD RDX,R8 JMP 0x0010168b LAB_00101660: TEST byte ptr [RAX + 0x4],0x1 JZ 0x0010...
/* func0(std::vector<int, std::allocator<int> >&) */ vector * func0(vector *param_1) { uint uVar1; int4 *__src; uint *puVar2; int4 *__dest; ulong uVar3; uint *puVar4; size_t __n; int8 *in_RSI; uint *puVar5; ulong uVar6; uint *puVar7; puVar5 = (uint *)in_RSI[1]; puVar7 = (uint *)*in_RSI; ...
3,296
func0
#include <vector> #include <assert.h>
std::vector<int> func0(const std::vector<int>& nums, const std::vector<int>& list_index) { std::vector<int> result; for (int i : list_index) { result.push_back(nums[i]); } return result; }
int main() { assert((func0({2,3,8,4,7,9},{0,3,5}) == std::vector<int>{2, 4, 9})); assert((func0({1, 2, 3, 4, 5},{1,2}) == std::vector<int>{2,3})); assert((func0({1,0,2,3},{0,1}) == std::vector<int>{1,0})); 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 $0x58,%rsp mov %rdi,-0x48(%rbp) mov %rsi,-0x50(%rbp) mov %rdx,-0x58(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax mov -0x48(%rbp)...
_Z5func0RKSt6vectorIiSaIiEES3_: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 58h mov [rbp+var_48], rdi mov [rbp+var_50], rsi mov [rbp+var_58], rdx mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov rax, [rbp+var_48] mov rdi, rax call _ZNSt6vectorIiSaIiEEC2Ev; std:...
long long func0(long long a1, long long a2, long long a3) { long long v3; // rax int v6; // [rsp+2Ch] [rbp-34h] long long v7; // [rsp+30h] [rbp-30h] BYREF _QWORD v8[4]; // [rsp+38h] [rbp-28h] BYREF v8[2] = __readfsqword(0x28u); std::vector<int>::vector(a1); v8[1] = a3; v7 = std::vector<int>::begin(a3)...
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 qword ptr [RBP + -0x58],RDX 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 0x00101c58 MOV RAX,qword ptr [RBP + -0x58] MO...
/* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&) */ vector * func0(vector *param_1,vector *param_2) { bool bVar1; int *piVar2; vector<int,std::allocator<int>> *in_RDX; long in_FS_OFFSET; int8 local_38; int8 local_30; vector<int,std::allocator<int>...
3,297
func0
#include <vector> #include <assert.h>
std::vector<int> func0(const std::vector<int>& nums, const std::vector<int>& list_index) { std::vector<int> result; for (int i : list_index) { result.push_back(nums[i]); } return result; }
int main() { assert((func0({2,3,8,4,7,9},{0,3,5}) == std::vector<int>{2, 4, 9})); assert((func0({1, 2, 3, 4, 5},{1,2}) == std::vector<int>{2,3})); assert((func0({1,0,2,3},{0,1}) == std::vector<int>{1,0})); return 0; }
O1
cpp
func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&): endbr64 push %r13 push %r12 push %rbp push %rbx sub $0x8,%rsp mov %rdi,%rbx mov %rsi,%r12 movq $0x0,(%rdi) movq $0x0,0x8(%rdi) movq $0x0,0x10(%rdi) mov (%rdx),%rbp mov 0x8(%rdx),%r13 cmp ...
_Z5func0RKSt6vectorIiSaIiEES3_: endbr64 push r13 push r12 push rbp push rbx sub rsp, 8 mov rbx, rdi mov r12, rsi mov qword ptr [rdi], 0 mov qword ptr [rdi+8], 0 mov qword ptr [rdi+10h], 0 mov rbp, [rdx] mov r13, [rdx+8] cmp r13, rbp jnz short loc_129F loc_1280: mov ...
_QWORD * func0(_QWORD *a1, _QWORD *a2, int **a3) { int *v4; // rbp int *v5; // r13 _DWORD *v7; // rdx _DWORD *v8; // rsi *a1 = 0LL; a1[1] = 0LL; a1[2] = 0LL; v4 = *a3; v5 = a3[1]; if ( v5 != *a3 ) { do { v7 = (_DWORD *)(*a2 + 4LL * *v4); v8 = (_DWORD *)a1[1]; if ( v8 == ...
func0: ENDBR64 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x8 MOV RBX,RDI MOV R12,RSI MOV qword ptr [RDI],0x0 MOV qword ptr [RDI + 0x8],0x0 MOV qword ptr [RDI + 0x10],0x0 MOV RBP,qword ptr [RDX] MOV R13,qword ptr [RDX + 0x8] CMP R13,RBP JNZ 0x0010129f LAB_00101280: MOV RAX,RBX ADD RSP,0x8 POP RBX POP RBP POP R12 POP R...
/* 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; int *piVar2; int *piVar3; int8 *in_RDX; int *piVar4; *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10...
3,298
func0
#include <vector> #include <assert.h>
std::vector<int> func0(const std::vector<int>& nums, const std::vector<int>& list_index) { std::vector<int> result; for (int i : list_index) { result.push_back(nums[i]); } return result; }
int main() { assert((func0({2,3,8,4,7,9},{0,3,5}) == std::vector<int>{2, 4, 9})); assert((func0({1, 2, 3, 4, 5},{1,2}) == std::vector<int>{2,3})); assert((func0({1,0,2,3},{0,1}) == std::vector<int>{1,0})); return 0; }
O2
cpp
func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&): endbr64 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x8,%rsp movq $0x0,(%rdi) movq $0x0,0x8(%rdi) movq $0x0,0x10(%rdi) mov (%rdx),%rbx mov 0x8(%rdx),%r13 cmp %r13,%rbx je ...
_Z5func0RKSt6vectorIiSaIiEES3_: endbr64 push r13 pxor xmm0, xmm0 push r12 push rbp mov rbp, rdi push rbx sub rsp, 8 mov qword ptr [rdi+10h], 0 movups xmmword ptr [rdi], xmm0 mov rbx, [rdx] mov r13, [rdx+8] cmp r13, rbx jz short loc_1767 mov r12, rsi xor ecx, ecx xor ...
long long func0(long long a1, _QWORD *a2, int **a3) { int *v3; // rbx int *v4; // r13 long long v6; // rcx long long v7; // rsi long long v8; // rsi _DWORD *v9; // rdx *(_QWORD *)(a1 + 16) = 0LL; *(_OWORD *)a1 = 0LL; v3 = *a3; v4 = a3[1]; if ( v4 != *a3 ) { v6 = 0LL; v7 = 0LL; whil...
func0: ENDBR64 PUSH R13 PXOR XMM0,XMM0 PUSH R12 PUSH RBP MOV RBP,RDI PUSH RBX SUB RSP,0x8 MOV qword ptr [RDI + 0x10],0x0 MOVUPS xmmword ptr [RDI],XMM0 MOV RBX,qword ptr [RDX] MOV R13,qword ptr [RDX + 0x8] CMP R13,RBX JZ 0x00101767 MOV R12,RSI XOR ECX,ECX XOR ESI,ESI JMP 0x00101746 LAB_00101728: MOV EAX,dword ptr [RDX] ...
/* 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; int *piVar2; int *piVar3; int8 *in_RDX; int *piVar4; int *piVar5; *(int8 *)(param_1 + 0x10) = 0; *(int (*) [16])param_1 = (int ...
3,299
func0
#include <vector> #include <assert.h>
std::vector<int> func0(const std::vector<int>& nums, const std::vector<int>& list_index) { std::vector<int> result; for (int i : list_index) { result.push_back(nums[i]); } return result; }
int main() { assert((func0({2,3,8,4,7,9},{0,3,5}) == std::vector<int>{2, 4, 9})); assert((func0({1, 2, 3, 4, 5},{1,2}) == std::vector<int>{2,3})); assert((func0({1,0,2,3},{0,1}) == std::vector<int>{1,0})); return 0; }
O3
cpp
func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&): endbr64 push %r13 pxor %xmm0,%xmm0 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x8,%rsp movq $0x0,0x10(%rdi) movups %xmm0,(%rdi) mov (%rdx),%rbx mov 0x8(%rdx),%r13 cmp %r13,%rbx je 17...
_Z5func0RKSt6vectorIiSaIiEES3_: endbr64 push r15 pxor xmm0, xmm0 push r14 push r13 push r12 push rbp mov rbp, rdi push rbx sub rsp, 28h mov qword ptr [rdi+10h], 0 movups xmmword ptr [rdi], xmm0 mov r14, [rdx+8] mov rbx, [rdx] cmp r14, rbx jz loc_17E3 mov r13, rsi x...
long long func0(long long a1, _QWORD *a2, int **a3) { int *v4; // r14 int *v5; // rbx char *v7; // r8 long long v8; // rcx _DWORD *v9; // r12 signed long long v10; // r15 unsigned long long v11; // rax unsigned long long v12; // rdx char *v13; // r9 char *v15; // rax unsigned long long v16; // rs...
func0: ENDBR64 PUSH R15 PXOR XMM0,XMM0 PUSH R14 PUSH R13 PUSH R12 PUSH RBP MOV RBP,RDI PUSH RBX SUB RSP,0x28 MOV qword ptr [RDI + 0x10],0x0 MOVUPS xmmword ptr [RDI],XMM0 MOV R14,qword ptr [RDX + 0x8] MOV RBX,qword ptr [RDX] CMP R14,RBX JZ 0x001017e3 MOV R13,RSI XOR R8D,R8D XOR ECX,ECX JMP 0x0010174c LAB_00101730: MOV E...
/* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&) */ vector * func0(vector *param_1,vector *param_2) { int4 *puVar1; int *piVar2; vector *__src; ulong uVar3; void *__dest; vector *pvVar4; int8 *in_RDX; int *piVar5; vector *pvVar6; char *pcVar...
3,300
func0
#include <iostream> #include <cmath> #include <cassert>
std::string func0(int a, int b, int c) { int sqa = pow(a, 2); int sqb = pow(b, 2); int sqc = pow(c, 2); if (sqa == sqb + sqc || sqb == sqa + sqc || sqc == sqa + sqb) { return "Right-angled Triangle"; } else if (sqa > sqb + sqc || sqb > sqa + sqc || sqc > sqa + sqb) { return "O...
int main() { assert(func0(1, 2, 3) == "Obtuse-angled Triangle"); assert(func0(2, 2, 2) == "Acute-angled Triangle"); assert(func0(1, 0, 1) == "Right-angled Triangle"); return 0; }
O0
cpp
func0[abi:cxx11](int, int, int): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x48,%rsp mov %rdi,-0x38(%rbp) mov %esi,-0x3c(%rbp) mov %edx,-0x40(%rbp) mov %ecx,-0x44(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax cvtsi2sdl -0x3c(%rbp),%xmm0 movsd 0xd01(%rip),%xmm1 callq 22...
_Z5func0B5cxx11iii: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 58h mov [rbp+var_48], rdi mov [rbp+var_4C], esi mov [rbp+var_50], edx mov [rbp+var_54], ecx mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax pxor xmm2, xmm2 cvtsi2sd xmm2, [rbp+var_4C] movq rax, xmm2 mo...
long long func0[abi:cxx11](long long a1, int a2, int a3, int a4) { char v7; // [rsp+23h] [rbp-3Dh] BYREF int v8; // [rsp+24h] [rbp-3Ch] int v9; // [rsp+28h] [rbp-38h] int v10; // [rsp+2Ch] [rbp-34h] char *v11; // [rsp+30h] [rbp-30h] char *v12; // [rsp+38h] [rbp-28h] char *v13; // [rsp+40h] [rbp-20h] un...
func0[abi:cxx11]: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x58 MOV qword ptr [RBP + -0x48],RDI MOV dword ptr [RBP + -0x4c],ESI MOV dword ptr [RBP + -0x50],EDX MOV dword ptr [RBP + -0x54],ECX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX PXOR XMM2,XMM2 CVTSI2SD XMM2,dword ptr [RBP + -0x4c...
/* func0[abi:cxx11](int, int, int) */ string * func0_abi_cxx11_(int param_1,int param_2,int param_3) { int in_ECX; int4 in_register_0000003c; string *this; long in_FS_OFFSET; double dVar1; allocator local_45; int local_44; int local_40; int local_3c; allocator *local_38; allocator *local_30; a...
3,301
func0
#include <iostream> #include <cmath> #include <cassert>
std::string func0(int a, int b, int c) { int sqa = pow(a, 2); int sqb = pow(b, 2); int sqc = pow(c, 2); if (sqa == sqb + sqc || sqb == sqa + sqc || sqc == sqa + sqb) { return "Right-angled Triangle"; } else if (sqa > sqb + sqc || sqb > sqa + sqc || sqc > sqa + sqb) { return "O...
int main() { assert(func0(1, 2, 3) == "Obtuse-angled Triangle"); assert(func0(2, 2, 2) == "Acute-angled Triangle"); assert(func0(1, 0, 1) == "Right-angled Triangle"); return 0; }
O1
cpp
func0[abi:cxx11](int, int, int): endbr64 push %rbx mov %rdi,%rbx pxor %xmm0,%xmm0 cvtsi2sd %esi,%xmm0 mulsd %xmm0,%xmm0 cvttsd2si %xmm0,%esi pxor %xmm0,%xmm0 cvtsi2sd %edx,%xmm0 mulsd %xmm0,%xmm0 cvttsd2si %xmm0,%eax pxor %xmm0,%xmm0 cvtsi2sd %ecx,%xmm0 mulsd %xmm0,%xmm0 cvttsd2si %xmm0,%edx lea (%rax,...
_Z5func0B5cxx11iii: endbr64 push rbx mov rbx, rdi mov eax, edx mov edx, ecx pxor xmm0, xmm0 cvtsi2sd xmm0, esi mulsd xmm0, xmm0 cvttsd2si ecx, xmm0 pxor xmm0, xmm0 cvtsi2sd xmm0, eax mulsd xmm0, xmm0 cvttsd2si eax, xmm0 pxor xmm0, xmm0 cvtsi2sd xmm0, edx mulsd xmm0, xmm0 cvttsd2si edx, xmm...
_QWORD * func0[abi:cxx11](_QWORD *a1, int a2, int a3, int a4) { int v6; // ecx int v7; // eax int v8; // edx v6 = (int)((double)a2 * (double)a2); v7 = (int)((double)a3 * (double)a3); v8 = (int)((double)a4 * (double)a4); if ( v7 + v8 == v6 || v6 + v8 == v7 || v6 + v7 == v8 ) { *a1 = a1 + 2; std:...
func0[abi:cxx11]: ENDBR64 PUSH RBX MOV RBX,RDI MOV EAX,EDX MOV EDX,ECX PXOR XMM0,XMM0 CVTSI2SD XMM0,ESI MULSD XMM0,XMM0 CVTTSD2SI ECX,XMM0 PXOR XMM0,XMM0 CVTSI2SD XMM0,EAX MULSD XMM0,XMM0 CVTTSD2SI EAX,XMM0 PXOR XMM0,XMM0 CVTSI2SD XMM0,EDX MULSD XMM0,XMM0 CVTTSD2SI EDX,XMM0 LEA ESI,[RAX + RDX*0x1] CMP ESI,ECX JZ 0x0010...
/* func0[abi:cxx11](int, int, int) */ long * func0_abi_cxx11_(int param_1,int param_2,int param_3) { int iVar1; int in_ECX; int iVar2; int iVar3; int4 in_register_0000003c; long *plVar4; plVar4 = (long *)CONCAT44(in_register_0000003c,param_1); iVar2 = (int)((double)param_2 * (double)param_2); iVa...
3,302
func0
#include <iostream> #include <cmath> #include <cassert>
std::string func0(int a, int b, int c) { int sqa = pow(a, 2); int sqb = pow(b, 2); int sqc = pow(c, 2); if (sqa == sqb + sqc || sqb == sqa + sqc || sqc == sqa + sqb) { return "Right-angled Triangle"; } else if (sqa > sqb + sqc || sqb > sqa + sqc || sqc > sqa + sqb) { return "O...
int main() { assert(func0(1, 2, 3) == "Obtuse-angled Triangle"); assert(func0(2, 2, 2) == "Acute-angled Triangle"); assert(func0(1, 0, 1) == "Right-angled Triangle"); return 0; }
O2
cpp
func0[abi:cxx11](int, int, int): endbr64 pxor %xmm0,%xmm0 mov %ecx,%r8d push %r12 mov %rdi,%r12 cvtsi2sd %esi,%xmm0 add $0x10,%rdi sub $0x10,%rsp mov %fs:0x28,%rax mov %rax,0x8(%rsp) xor %eax,%eax mulsd %xmm0,%xmm0 cvttsd2si %xmm0,%ecx pxor %xmm0,%xmm0 cvtsi2sd %edx,%xmm0 mulsd %xmm0,%xmm0 ...
_Z5func0B5cxx11iii: endbr64 pxor xmm0, xmm0 push rbx mov eax, ecx mov rbx, rdi cvtsi2sd xmm0, esi sub rsp, 10h mov rcx, fs:28h mov [rsp+18h+var_10], rcx xor ecx, ecx mulsd xmm0, xmm0 cvttsd2si ecx, xmm0 pxor xmm0, xmm0 cvtsi2sd xmm0, edx mulsd xmm0, xmm0 cvttsd2si edx, xmm0 pxor ...
long long * func0[abi:cxx11](long long *a1, int a2, int a3, int a4) { int v5; // ecx int v6; // edx int v7; // eax long long v9; // rax long long v10; // rdx __m128i si128; // xmm0 long long v12; // rax _QWORD v13[3]; // [rsp+0h] [rbp-18h] BYREF v13[1] = __readfsqword(0x28u); v5 = (int)((double)a2 ...
func0[abi:cxx11]: ENDBR64 PXOR XMM0,XMM0 PUSH RBX MOV EAX,ECX MOV RBX,RDI CVTSI2SD XMM0,ESI SUB RSP,0x10 MOV RCX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x8],RCX XOR ECX,ECX MULSD XMM0,XMM0 CVTTSD2SI ECX,XMM0 PXOR XMM0,XMM0 CVTSI2SD XMM0,EDX MULSD XMM0,XMM0 CVTTSD2SI EDX,XMM0 PXOR XMM0,XMM0 CVTSI2SD XMM0,EAX MULSD XMM...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0[abi:cxx11](int, int, int) */ ulong * func0_abi_cxx11_(int param_1,int param_2,int param_3) { int8 uVar1; int8 uVar2; int iVar3; int8 *puVar4; int in_ECX; int iVar5; int iVar6; int4 in_register_0000003c; ulo...
3,303
func0
#include <iostream> #include <cmath> #include <cassert>
std::string func0(int a, int b, int c) { int sqa = pow(a, 2); int sqb = pow(b, 2); int sqc = pow(c, 2); if (sqa == sqb + sqc || sqb == sqa + sqc || sqc == sqa + sqb) { return "Right-angled Triangle"; } else if (sqa > sqb + sqc || sqb > sqa + sqc || sqc > sqa + sqb) { return "O...
int main() { assert(func0(1, 2, 3) == "Obtuse-angled Triangle"); assert(func0(2, 2, 2) == "Acute-angled Triangle"); assert(func0(1, 0, 1) == "Right-angled Triangle"); return 0; }
O3
cpp
func0[abi:cxx11](int, int, int): endbr64 pxor %xmm0,%xmm0 mov %ecx,%r8d push %r12 mov %rdi,%r12 cvtsi2sd %esi,%xmm0 add $0x10,%rdi sub $0x10,%rsp mov %fs:0x28,%rax mov %rax,0x8(%rsp) xor %eax,%eax mulsd %xmm0,%xmm0 cvttsd2si %xmm0,%ecx pxor %xmm0,%xmm0 cvtsi2sd %edx,%xmm0 mulsd %xmm0,%xmm0 ...
_Z5func0B5cxx11iii: endbr64 pxor xmm0, xmm0 push rbx mov eax, ecx mov rbx, rdi cvtsi2sd xmm0, esi sub rsp, 10h mov rcx, fs:28h mov [rsp+18h+var_10], rcx xor ecx, ecx mulsd xmm0, xmm0 cvttsd2si ecx, xmm0 pxor xmm0, xmm0 cvtsi2sd xmm0, edx mulsd xmm0, xmm0 cvttsd2si edx, xmm0 pxor ...
long long * func0[abi:cxx11](long long *a1, int a2, int a3, int a4) { int v5; // ecx int v6; // edx int v7; // eax long long v8; // rax long long v9; // rdx __m128i v10; // xmm0 long long v11; // rax long long v12; // rdx long long v13; // rax long long v14; // rdx __m128i si128; // xmm0 long lo...
func0[abi:cxx11]: ENDBR64 PXOR XMM0,XMM0 PUSH RBX MOV EAX,ECX MOV RBX,RDI CVTSI2SD XMM0,ESI SUB RSP,0x10 MOV RCX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x8],RCX XOR ECX,ECX MULSD XMM0,XMM0 CVTTSD2SI ECX,XMM0 PXOR XMM0,XMM0 CVTSI2SD XMM0,EDX MULSD XMM0,XMM0 CVTTSD2SI EDX,XMM0 PXOR XMM0,XMM0 CVTSI2SD XMM0,EAX MULSD XMM...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0[abi:cxx11](int, int, int) */ ulong * func0_abi_cxx11_(int param_1,int param_2,int param_3) { int8 uVar1; int8 uVar2; int iVar3; int8 *puVar4; int in_ECX; int iVar5; int iVar6; int4 in_register_0000003c; ulo...
3,304
func0
#include <iostream> #include <vector> #include <assert.h>
int func0(const std::vector<std::vector<int>>& list1, int C) { int result = 0; for (const auto& row : list1) { result += row[C]; } return result; }
int main() { assert(func0({{1,2,3,2},{4,5,6,2},{7,8,9,5}}, 0) == 12); assert(func0({{1,2,3,2},{4,5,6,2},{7,8,9,5}}, 1) == 15); assert(func0({{1,2,3,2},{4,5,6,2},{7,8,9,5}}, 3) == 9); return 0; }
O0
cpp
func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int): endbr64 push %rbp mov %rsp,%rbp sub $0x40,%rsp mov %rdi,-0x38(%rbp) mov %esi,-0x3c(%rbp) mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax movl $0x0,-0x2c(%rbp) mo...
_Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EEi: endbr64 push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_38], rdi mov [rbp+var_3C], esi 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 r...
long long func0(long long a1, int a2) { unsigned int v3; // [rsp+14h] [rbp-2Ch] long long v4; // [rsp+18h] [rbp-28h] BYREF _QWORD v5[2]; // [rsp+20h] [rbp-20h] BYREF long long v6; // [rsp+30h] [rbp-10h] unsigned long long v7; // [rsp+38h] [rbp-8h] v7 = __readfsqword(0x28u); v3 = 0; v5[1] = a1; v4 = ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x38],RDI MOV dword ptr [RBP + -0x3c],ESI 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,...
/* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int) */ int func0(vector *param_1,int param_2) { bool bVar1; int *piVar2; long in_FS_OFFSET; int local_34; int8 local_30; int8 local_28; vector<std::vector<int,std::allocator...
3,305
func0
#include <iostream> #include <vector> #include <assert.h>
int func0(const std::vector<std::vector<int>>& list1, int C) { int result = 0; for (const auto& row : list1) { result += row[C]; } return result; }
int main() { assert(func0({{1,2,3,2},{4,5,6,2},{7,8,9,5}}, 0) == 12); assert(func0({{1,2,3,2},{4,5,6,2},{7,8,9,5}}, 1) == 15); assert(func0({{1,2,3,2},{4,5,6,2},{7,8,9,5}}, 3) == 9); return 0; }
O1
cpp
func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int): endbr64 mov (%rdi),%rax mov 0x8(%rdi),%rdi cmp %rdi,%rax je 1317 <_Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EEi+0x2e> movslq %esi,%rsi shl $0x2,%rsi mov $0x0,%edx mov (%rax),...
_Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EEi: endbr64 mov rax, [rdi] mov rdi, [rdi+8] cmp rdi, rax jz short loc_12D7 movsxd rsi, esi shl rsi, 2 mov edx, 0 loc_12C5: mov rcx, [rax] add edx, [rcx+rsi] add rax, 18h cmp rdi, rax jnz short loc_12C5 loc_12D4: mov eax, edx retn loc...
long long func0(long long a1, int a2) { _QWORD *v2; // rax _QWORD *v3; // rdi long long v4; // rsi unsigned int v5; // edx v2 = *(_QWORD **)a1; v3 = *(_QWORD **)(a1 + 8); if ( v3 == v2 ) { return 0; } else { v4 = 4LL * a2; v5 = 0; do { v5 += *(_DWORD *)(*v2 + v4); ...
func0: ENDBR64 MOV RAX,qword ptr [RDI] MOV RDI,qword ptr [RDI + 0x8] CMP RDI,RAX JZ 0x001012d7 MOVSXD RSI,ESI SHL RSI,0x2 MOV EDX,0x0 LAB_001012c5: MOV RCX,qword ptr [RAX] ADD EDX,dword ptr [RCX + RSI*0x1] ADD RAX,0x18 CMP RDI,RAX JNZ 0x001012c5 LAB_001012d4: MOV EAX,EDX RET LAB_001012d7: MOV EDX,0x0 JMP 0x001012d4
/* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int) */ int func0(vector *param_1,int param_2) { long *plVar1; int iVar2; plVar1 = *(long **)param_1; if (*(long **)(param_1 + 8) == plVar1) { iVar2 = 0; } else { iV...
3,306
func0
#include <iostream> #include <vector> #include <assert.h>
int func0(const std::vector<std::vector<int>>& list1, int C) { int result = 0; for (const auto& row : list1) { result += row[C]; } return result; }
int main() { assert(func0({{1,2,3,2},{4,5,6,2},{7,8,9,5}}, 0) == 12); assert(func0({{1,2,3,2},{4,5,6,2},{7,8,9,5}}, 1) == 15); assert(func0({{1,2,3,2},{4,5,6,2},{7,8,9,5}}, 3) == 9); return 0; }
O2
cpp
func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int): endbr64 mov (%rdi),%rax mov 0x8(%rdi),%rdi cmp %rdi,%rax je 1858 <_Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EEi+0x38> movslq %esi,%rsi xor %r8d,%r8d lea 0x0(,%rsi,4),%rcx xchg ...
_Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EEi: endbr64 mov rax, [rdi] mov rdi, [rdi+8] cmp rdi, rax jz short loc_1848 movsxd rsi, esi xor edx, edx shl rsi, 2 nop dword ptr [rax+00000000h] loc_1830: mov rcx, [rax] add rax, 18h add edx, [rcx+rsi] cmp rdi, rax jnz short loc_1830...
long long func0(long long **a1, int a2) { long long *v2; // rax long long *v3; // rdi unsigned int v4; // edx long long v5; // rsi long long v6; // rcx v2 = *a1; v3 = a1[1]; if ( v3 == v2 ) return 0LL; v4 = 0; v5 = 4LL * a2; do { v6 = *v2; v2 += 3; v4 += *(_DWORD *)(v6 + v5); ...
func0: ENDBR64 MOV RAX,qword ptr [RDI] MOV RDI,qword ptr [RDI + 0x8] CMP RDI,RAX JZ 0x00101848 MOVSXD RSI,ESI XOR EDX,EDX SHL RSI,0x2 NOP dword ptr [RAX] LAB_00101830: MOV RCX,qword ptr [RAX] ADD RAX,0x18 ADD EDX,dword ptr [RCX + RSI*0x1] CMP RDI,RAX JNZ 0x00101830 MOV EAX,EDX RET LAB_00101848: XOR EDX,EDX MOV EAX,EDX ...
/* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int) */ int func0(vector *param_1,int param_2) { long lVar1; long *plVar2; int iVar3; plVar2 = *(long **)param_1; if (*(long **)(param_1 + 8) != plVar2) { iVar3 = 0; d...
3,307
func0
#include <iostream> #include <vector> #include <assert.h>
int func0(const std::vector<std::vector<int>>& list1, int C) { int result = 0; for (const auto& row : list1) { result += row[C]; } return result; }
int main() { assert(func0({{1,2,3,2},{4,5,6,2},{7,8,9,5}}, 0) == 12); assert(func0({{1,2,3,2},{4,5,6,2},{7,8,9,5}}, 1) == 15); assert(func0({{1,2,3,2},{4,5,6,2},{7,8,9,5}}, 3) == 9); return 0; }
O3
cpp
func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int): endbr64 mov (%rdi),%rax mov 0x8(%rdi),%rdi cmp %rdi,%rax je 1848 <_Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EEi+0x38> movslq %esi,%rsi xor %r8d,%r8d lea 0x0(,%rsi,4),%rcx xchg ...
_Z5func0RKSt6vectorIS_IiSaIiEESaIS1_EEi: endbr64 mov rax, [rdi] mov rdi, [rdi+8] cmp rdi, rax jz short loc_1888 movsxd rsi, esi xor edx, edx shl rsi, 2 nop dword ptr [rax+00000000h] loc_1870: mov rcx, [rax] add rax, 18h add edx, [rcx+rsi] cmp rdi, rax jnz short loc_1870...
long long func0(long long **a1, int a2) { long long *v2; // rax long long *v3; // rdi unsigned int v4; // edx long long v5; // rsi long long v6; // rcx v2 = *a1; v3 = a1[1]; if ( v3 == v2 ) return 0LL; v4 = 0; v5 = 4LL * a2; do { v6 = *v2; v2 += 3; v4 += *(_DWORD *)(v6 + v5); ...
func0: ENDBR64 MOV RAX,qword ptr [RDI] MOV RDI,qword ptr [RDI + 0x8] CMP RDI,RAX JZ 0x00101888 MOVSXD RSI,ESI XOR EDX,EDX SHL RSI,0x2 NOP dword ptr [RAX] LAB_00101870: MOV RCX,qword ptr [RAX] ADD RAX,0x18 ADD EDX,dword ptr [RCX + RSI*0x1] CMP RDI,RAX JNZ 0x00101870 MOV EAX,EDX RET LAB_00101888: XOR EDX,EDX MOV EAX,EDX ...
/* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, int) */ int func0(vector *param_1,int param_2) { long lVar1; long *plVar2; int iVar3; plVar2 = *(long **)param_1; if (*(long **)(param_1 + 8) != plVar2) { iVar3 = 0; d...
3,308
func0
#include <assert.h> #include <cctype> #include <string> #include <tuple>
std::tuple<int, int, int> func0(const std::string& str) { int alphabets = 0, digits = 0, special = 0; for (char ch : str) { if (std::isalpha(ch)) { alphabets++; } else if (std::isdigit(ch)) { digits++; } else { special++; } } ...
int main() { assert(func0("abc!@#123") == std::make_tuple(3, 3, 3)); assert(func0("dgsuy@#$%&1255") == std::make_tuple(5, 4, 5)); assert(func0("fjdsif627348#%$^&") == std::make_tuple(6, 6, 5)); return 0; }
O0
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %rbp mov %rsp,%rbp sub $0x40,%rsp mov %rdi,-0x38(%rbp) mov %rsi,-0x40(%rbp) mov %fs:0x28,%rax mov %rax,-0x8(%rbp) xor %eax,%eax movl $0x0,-0x2c(%rbp) movl $0x0,-0x28(%rbp) movl $0x0,-...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: 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 [rbp+var_2C], 0 mov [rbp+var_28], 0 mov [rbp+var_24], 0 mov rax, [rb...
long long func0(long long a1, long long a2) { char v3; // [rsp+13h] [rbp-2Dh] int v4; // [rsp+14h] [rbp-2Ch] BYREF int v5; // [rsp+18h] [rbp-28h] BYREF int v6; // [rsp+1Ch] [rbp-24h] BYREF long long v7; // [rsp+20h] [rbp-20h] BYREF _QWORD v8[3]; // [rsp+28h] [rbp-18h] BYREF v8[2] = __readfsqword(0x28u);...
func0: 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 dword ptr [RBP + -0x2c],0x0 MOV dword ptr [RBP + -0x28],0x0 MOV dword ptr [RBP + -0x24],0x0 MOV RAX,qword ptr [RBP + -0x40] MOV qwor...
/* func0(std::string const&) */ string * func0(string *param_1) { char cVar1; bool bVar2; int iVar3; char *pcVar4; long in_FS_OFFSET; int local_34; int local_30; int local_2c; int8 local_28; int8 local_20 [2]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_34 = 0; local...
3,309
func0
#include <assert.h> #include <cctype> #include <string> #include <tuple>
std::tuple<int, int, int> func0(const std::string& str) { int alphabets = 0, digits = 0, special = 0; for (char ch : str) { if (std::isalpha(ch)) { alphabets++; } else if (std::isdigit(ch)) { digits++; } else { special++; } } ...
int main() { assert(func0("abc!@#123") == std::make_tuple(3, 3, 3)); assert(func0("dgsuy@#$%&1255") == std::make_tuple(5, 4, 5)); assert(func0("fjdsif627348#%$^&") == std::make_tuple(6, 6, 5)); return 0; }
O1
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x18,%rsp mov %rdi,0x8(%rsp) mov (%rsi),%rbx mov %rbx,%r12 add 0x8(%rsi),%r12 cmp %rbx,%r12 je 1278 <_Z5func0RKNSt7__c...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 18h mov [rsp+48h+var_40], rdi mov rbx, [rsi] mov r12, rbx add r12, [rsi+8] cmp r12, rbx jz short loc_1298 mov r15d, 0 mov r14d, 0 ...
_DWORD * func0(_DWORD *a1, char **a2) { char *v2; // rbx char *v3; // r12 int v4; // r15d int v5; // r14d int v6; // r13d char v7; // bp _DWORD *result; // rax v2 = *a2; v3 = &(*a2)[(_QWORD)a2[1]]; if ( v3 == *a2 ) { v4 = 0; v5 = 0; v6 = 0; } else { v4 = 0; v5 = 0; v...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x18 MOV qword ptr [RSP + 0x8],RDI MOV RBX,qword ptr [RSI] MOV R12,RBX ADD R12,qword ptr [RSI + 0x8] CMP R12,RBX JZ 0x00101298 MOV R15D,0x0 MOV R14D,0x0 MOV R13D,0x0 JMP 0x0010127c LAB_00101263: MOVSX EBP,BPL SUB EBP,0x30 CMP EBP,0x9 JA 0x0010...
/* func0(std::string const&) */ void func0(string *param_1) { char cVar1; int iVar2; char *pcVar3; int8 *in_RSI; char *pcVar4; int iVar5; int iVar6; int iVar7; pcVar3 = (char *)*in_RSI; pcVar4 = pcVar3 + in_RSI[1]; if (pcVar4 == pcVar3) { iVar7 = 0; iVar6 = 0; iVar5 = 0; } els...
3,310
func0
#include <assert.h> #include <cctype> #include <string> #include <tuple>
std::tuple<int, int, int> func0(const std::string& str) { int alphabets = 0, digits = 0, special = 0; for (char ch : str) { if (std::isalpha(ch)) { alphabets++; } else if (std::isdigit(ch)) { digits++; } else { special++; } } ...
int main() { assert(func0("abc!@#123") == std::make_tuple(3, 3, 3)); assert(func0("dgsuy@#$%&1255") == std::make_tuple(5, 4, 5)); assert(func0("fjdsif627348#%$^&") == std::make_tuple(6, 6, 5)); return 0; }
O2
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r15 xor %r15d,%r15d push %r14 push %r13 mov %rdi,%r13 push %r12 xor %r12d,%r12d push %rbp push %rbx sub $0x18,%rsp mov (%rsi),%rbx mov 0x8(%rsi),%rbp movl $0x0,0xc(%rsp) add %r...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push r15 xor r15d, r15d push r14 xor r14d, r14d push r13 push r12 xor r12d, r12d push rbp push rbx sub rsp, 18h mov rbx, [rsi] mov rbp, [rsi+8] mov [rsp+48h+var_40], rdi add rbp, rbx cmp rbp, rb...
_DWORD * func0(_DWORD *a1, char **a2) { int v2; // r15d int v3; // r14d int v4; // r12d char *v5; // rbx char *v6; // rbp int v7; // r13d _DWORD *result; // rax v2 = 0; v3 = 0; v4 = 0; v5 = *a2; v6 = &a2[1][(_QWORD)*a2]; if ( v6 != *a2 ) { do { while ( 1 ) { v7 =...
func0: ENDBR64 PUSH R15 XOR R15D,R15D PUSH R14 XOR R14D,R14D PUSH R13 PUSH R12 XOR R12D,R12D PUSH RBP PUSH RBX SUB RSP,0x18 MOV RBX,qword ptr [RSI] MOV RBP,qword ptr [RSI + 0x8] MOV qword ptr [RSP + 0x8],RDI ADD RBP,RBX CMP RBP,RBX JNZ 0x001013d5 JMP 0x001013fb LAB_001013c8: ADD R12D,0x1 LAB_001013cc: ADD RBX,0x1 CMP R...
/* func0(std::string const&) */ void func0(string *param_1) { char cVar1; int iVar2; char *pcVar3; char *pcVar4; int8 *in_RSI; int iVar5; int iVar6; int iVar7; iVar7 = 0; iVar6 = 0; iVar5 = 0; pcVar3 = (char *)*in_RSI; pcVar4 = pcVar3 + in_RSI[1]; do { while( true ) { if (pcVa...
3,311
func0
#include <assert.h> #include <cctype> #include <string> #include <tuple>
std::tuple<int, int, int> func0(const std::string& str) { int alphabets = 0, digits = 0, special = 0; for (char ch : str) { if (std::isalpha(ch)) { alphabets++; } else if (std::isdigit(ch)) { digits++; } else { special++; } } ...
int main() { assert(func0("abc!@#123") == std::make_tuple(3, 3, 3)); assert(func0("dgsuy@#$%&1255") == std::make_tuple(5, 4, 5)); assert(func0("fjdsif627348#%$^&") == std::make_tuple(6, 6, 5)); return 0; }
O3
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r15 xor %r15d,%r15d push %r14 push %r13 mov %rdi,%r13 push %r12 xor %r12d,%r12d push %rbp push %rbx sub $0x18,%rsp mov (%rsi),%rbx mov 0x8(%rsi),%rbp movl $0x0,0xc(%rsp) add %r...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push r15 xor r15d, r15d push r14 xor r14d, r14d push r13 push r12 xor r12d, r12d push rbp push rbx sub rsp, 18h mov rbx, [rsi] mov rbp, [rsi+8] mov [rsp+48h+var_40], rdi add rbp, rbx cmp rbp, rb...
_DWORD * func0(_DWORD *a1, char **a2) { int v2; // r15d int v3; // r14d int v4; // r12d char *v5; // rbx char *v6; // rbp int v7; // r13d _DWORD *result; // rax v2 = 0; v3 = 0; v4 = 0; v5 = *a2; v6 = &a2[1][(_QWORD)*a2]; if ( v6 != *a2 ) { do { while ( 1 ) { v7 =...
func0: ENDBR64 PUSH R15 XOR R15D,R15D PUSH R14 XOR R14D,R14D PUSH R13 PUSH R12 XOR R12D,R12D PUSH RBP PUSH RBX SUB RSP,0x18 MOV RBX,qword ptr [RSI] MOV RBP,qword ptr [RSI + 0x8] MOV qword ptr [RSP + 0x8],RDI ADD RBP,RBX CMP RBP,RBX JNZ 0x001013d5 JMP 0x001013fb LAB_001013c8: ADD R12D,0x1 LAB_001013cc: ADD RBX,0x1 CMP R...
/* func0(std::string const&) */ void func0(string *param_1) { char cVar1; int iVar2; char *pcVar3; char *pcVar4; int8 *in_RSI; int iVar5; int iVar6; int iVar7; iVar7 = 0; iVar6 = 0; iVar5 = 0; pcVar3 = (char *)*in_RSI; pcVar4 = pcVar3 + in_RSI[1]; do { while( true ) { if (pcVa...
3,312
func0
#include <iostream> #include <map> #include <vector> #include <algorithm> #include <cassert> using namespace std;
string func0(vector<string> input) { map<string, int> dict; for (auto& i : input) { dict[i]++; } vector<int> value; for (auto& it : dict) { value.push_back(it.second); } sort(value.rbegin(), value.rend()); int second_large = value[1]; for (auto& it : dict) ...
int main() { assert(func0({"aaa", "bbb", "ccc", "bbb", "aaa", "aaa"}) == "bbb"); assert(func0({"abc", "bcd", "abc", "bcd", "bcd", "bcd"}) == "abc"); assert(func0({"cdma", "gsm", "hspa", "gsm", "cdma", "cdma"}) == "gsm"); return 0; }
O0
cpp
func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0xc8,%rsp mov %rdi,-0xc8(%rbp) mov %rsi,-0xd0(%rbp) mov ...
_Z5func0St6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 0C8h mov [rbp+var_C8], rdi mov [rbp+var_D0], rsi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax lea rax, [rbp+var_50] mov rdi, rax call _ZNSt3m...
long long func0(long long a1, long long a2) { _DWORD *v2; // rax int v4; // [rsp+14h] [rbp-BCh] long long v5; // [rsp+18h] [rbp-B8h] BYREF _QWORD v6[2]; // [rsp+20h] [rbp-B0h] BYREF _BYTE *v7; // [rsp+30h] [rbp-A0h] _BYTE *v8; // [rsp+38h] [rbp-98h] long long v9; // [rsp+40h] [rbp-90h] long long v10; /...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0xc8 MOV qword ptr [RBP + -0xc8],RDI MOV qword ptr [RBP + -0xd0],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX LEA RAX,[RBP + -0x50] MOV RDI,RAX CALL 0x00102efe MOV RAX,qword ptr [RBP + -0xd0] MOV qword ptr [RBP + -0xa8],RAX MOV RAX,qwor...
/* func0(std::vector<std::string, std::allocator<std::string > >) */ string * func0(vector param_1) { int iVar1; bool bVar2; char cVar3; int *piVar4; vector<std::string,std::allocator<std::string>> *in_RSI; int4 in_register_0000003c; string *this; long in_FS_OFFSET; int8 local_c0; int8 local_b8; ...
3,313
func0
#include <iostream> #include <map> #include <vector> #include <algorithm> #include <cassert> using namespace std;
string func0(vector<string> input) { map<string, int> dict; for (auto& i : input) { dict[i]++; } vector<int> value; for (auto& it : dict) { value.push_back(it.second); } sort(value.rbegin(), value.rend()); int second_large = value[1]; for (auto& it : dict) ...
int main() { assert(func0({"aaa", "bbb", "ccc", "bbb", "aaa", "aaa"}) == "bbb"); assert(func0({"abc", "bcd", "abc", "bcd", "bcd", "bcd"}) == "abc"); assert(func0({"cdma", "gsm", "hspa", "gsm", "cdma", "cdma"}) == "gsm"); return 0; }
O1
cpp
func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x98,%rsp mov %rdi,0x18(%rsp)...
_Z5func0St6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 98h mov [rsp+0C8h+var_B0], rdi mov rax, fs:28h mov [rsp+0C8h+var_40], rax xor eax, eax mov [rsp+0C8h+var_70], 0 mov [rsp+0C...
_QWORD * func0(_QWORD *a1, const void ***a2) { long long v2; // rbx int v3; // edx int *v4; // r13 long long v5; // rbp size_t v6; // rbx size_t v7; // rdx size_t v8; // rbx size_t v9; // rdx int v10; // edx long long v11; // r12 size_t v12; // r12 const void *v13; // r14 int *v14; // rbx ch...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x98 MOV qword ptr [RSP + 0x18],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x88],RAX XOR EAX,EAX MOV dword ptr [RSP + 0x58],0x0 MOV qword ptr [RSP + 0x60],0x0 LEA RAX,[RSP + 0x58] MOV qword ptr [RSP + 0x68],RAX MOV qword ptr [RSP + 0...
/* func0(std::vector<std::string, std::allocator<std::string > >) */ long * func0(vector param_1,int param_2,int param_3,int param_4,int param_5, int param_6,int param_7,int param_8,int8 param_9, int8 param_10,int8 param_11,int8 param_12,int1 param_13, int1 param_14,int8 param_15,in...
3,314
func0
#include <iostream> #include <map> #include <vector> #include <algorithm> #include <cassert> using namespace std;
string func0(vector<string> input) { map<string, int> dict; for (auto& i : input) { dict[i]++; } vector<int> value; for (auto& it : dict) { value.push_back(it.second); } sort(value.rbegin(), value.rend()); int second_large = value[1]; for (auto& it : dict) ...
int main() { assert(func0({"aaa", "bbb", "ccc", "bbb", "aaa", "aaa"}) == "bbb"); assert(func0({"abc", "bcd", "abc", "bcd", "bcd", "bcd"}) == "abc"); assert(func0({"cdma", "gsm", "hspa", "gsm", "cdma", "cdma"}) == "gsm"); return 0; }
O2
cpp
func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0xa8,%rsp mov (%rsi),%rbx mov...
_Z5func0St6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 0A8h mov [rsp+0D8h+var_B8], rdi mov rax, fs:28h mov [rsp+0D8h+var_40], rax xor eax, eax lea rax, [rsp+0D8h+var_70] mov [rsp...
long long func0(long long a1, _QWORD *a2) { _QWORD *v2; // rax _QWORD *v3; // rsi int *v4; // rbx const void *v5; // rbp size_t v6; // r14 void *v7; // r15 size_t v8; // r13 size_t v9; // rdx int v10; // eax size_t v11; // r15 size_t v12; // rdx int v13; // eax int *v14; // r13 long long v1...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0xa8 MOV qword ptr [RSP + 0x20],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x98],RAX XOR EAX,EAX LEA RAX,[RSP + 0x68] MOV dword ptr [RSP + 0x68],0x0 MOV qword ptr [RSP],RAX MOV qword ptr [RSP + 0x78],RAX MOV qword ptr [RSP + 0x80],RA...
/* WARNING: Removing unreachable block (ram,0x00101cc6) */ /* func0(std::vector<std::string, std::allocator<std::string > >) */ long * func0(vector param_1,int param_2,int param_3,int param_4,int param_5, int param_6,int param_7,int param_8,int param_9, int8 param_10,int1 param_11,int8 param_12...
3,315
func0
#include <iostream> #include <map> #include <vector> #include <algorithm> #include <cassert> using namespace std;
string func0(vector<string> input) { map<string, int> dict; for (auto& i : input) { dict[i]++; } vector<int> value; for (auto& it : dict) { value.push_back(it.second); } sort(value.rbegin(), value.rend()); int second_large = value[1]; for (auto& it : dict) ...
int main() { assert(func0({"aaa", "bbb", "ccc", "bbb", "aaa", "aaa"}) == "bbb"); assert(func0({"abc", "bcd", "abc", "bcd", "bcd", "bcd"}) == "abc"); assert(func0({"cdma", "gsm", "hspa", "gsm", "cdma", "cdma"}) == "gsm"); return 0; }
O3
cpp
func0(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x98,%rsp mov (%rsi),%rbx mov...
_Z5func0St6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 0A8h mov rbp, [rsi] mov [rsp+0D8h+var_B0], rdi mov rax, fs:28h mov [rsp+0D8h+var_40], rax xor eax, eax lea rax, [rsp+0D8h+v...
long long func0(long long a1, long long *a2) { long long v2; // rbp long long v3; // rax void *v4; // r14 _BYTE *v5; // r15 int *v6; // rbx size_t v7; // rbp void *v8; // r13 size_t v9; // r14 size_t v10; // rdx int v11; // eax long long v12; // r14 size_t v13; // r13 size_t v14; // r14 siz...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0xa8 MOV RBP,qword ptr [RSI] MOV qword ptr [RSP + 0x28],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x98],RAX XOR EAX,EAX LEA RAX,[RSP + 0x68] MOV dword ptr [RSP + 0x68],0x0 MOV qword ptr [RSP],RAX MOV qword ptr [RSP + 0x78],RAX MOV q...
/* func0(std::vector<std::string, std::allocator<std::string > >) */ ulong * func0(vector param_1,int param_2,int param_3,int param_4,int param_5 ,int param_6,int param_7,int param_8,int param_9, int param_10,int8 param_11,int8 param_12,int8 param_13, int8 param_14,int8 param_15)...
3,316
func0
#include <cmath> #include <cassert>
double func0(double a, int digits) { double n = pow(10, -digits); return round(std::ceil(a / n) * n * pow(10, digits)) / pow(10, digits); }
int main() { assert(func0(123.01247, 0) == 124); assert(func0(123.01247, 1) == 123.1); assert(func0(123.01247, 2) == 123.02); return 0; }
O0
cpp
func0(double, int): endbr64 push %rbp mov %rsp,%rbp sub $0x30,%rsp movsd %xmm0,-0x18(%rbp) mov %edi,-0x1c(%rbp) mov -0x1c(%rbp),%eax neg %eax cvtsi2sd %eax,%xmm0 mov 0xee3(%rip),%rax movapd %xmm0,%xmm1 movq %rax,%xmm0 callq 1090 <pow@plt> movq %xmm0,%rax mov %rax,-0x8(%rbp) movsd -0x18(%rb...
_Z5func0di: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 38h movsd [rbp+var_28], xmm0 mov [rbp+var_2C], edi mov eax, [rbp+var_2C] neg eax pxor xmm0, xmm0 cvtsi2sd xmm0, eax mov rax, cs:x movapd xmm1, xmm0; y movq xmm0, rax; x call _pow movq rax, xmm0 mov [rbp+var_18],...
__int128 __usercall func0@<xmm0>(double a1@<xmm0>, int a2@<edi>) { double v2; // xmm0_8 double v3; // rbx __int128 v4; // xmm1 double v6; // [rsp+8h] [rbp-38h] double v8; // [rsp+28h] [rbp-18h] v8 = pow(10.0, (double)-a2); v6 = ceil(a1 / v8) * v8; v2 = pow(10.0, (double)a2); v3 = round(v2 * v6); v4...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x38 MOVSD qword ptr [RBP + -0x28],XMM0 MOV dword ptr [RBP + -0x2c],EDI MOV EAX,dword ptr [RBP + -0x2c] NEG EAX PXOR XMM0,XMM0 CVTSI2SD XMM0,EAX MOV RAX,qword ptr [0x00102090] MOVAPD XMM1,XMM0 MOVQ XMM0,RAX CALL 0x00101090 MOVQ RAX,XMM0 MOV qword ptr [RBP + -0x18],RA...
/* func0(double, int) */ double func0(double param_1,int param_2) { double dVar1; double dVar2; double dVar3; dVar1 = pow(DAT_00102090,(double)-param_2); dVar2 = ceil(param_1 / dVar1); dVar3 = pow(DAT_00102090,(double)param_2); dVar1 = round(dVar3 * dVar2 * dVar1); dVar2 = pow(DAT_00102090,(double)...
3,317
func0
#include <cmath> #include <cassert>
double func0(double a, int digits) { double n = pow(10, -digits); return round(std::ceil(a / n) * n * pow(10, digits)) / pow(10, digits); }
int main() { assert(func0(123.01247, 0) == 124); assert(func0(123.01247, 1) == 123.1); assert(func0(123.01247, 2) == 123.02); return 0; }
O1
cpp
func0(double, int): endbr64 push %rbx sub $0x20,%rsp movsd %xmm0,0x8(%rsp) mov %edi,%ebx mov %edi,%eax neg %eax pxor %xmm1,%xmm1 cvtsi2sd %eax,%xmm1 movsd 0xf02(%rip),%xmm0 callq 1080 <pow@plt> movsd %xmm0,0x18(%rsp) movsd 0x8(%rsp),%xmm1 divsd %xmm0,%xmm1 movsd %xmm1,0x8(%rsp) movsd 0xf1f(%rip)...
_Z5func0di: endbr64 push rbx sub rsp, 10h movsd [rsp+18h+var_18], xmm0 mov ebx, edi mov eax, edi neg eax pxor xmm1, xmm1 cvtsi2sd xmm1, eax; y movsd xmm0, cs:x; x call _pow movsd [rsp+18h+var_10], xmm0 movsd xmm5, [rsp+18h+var_18] divsd xmm5, xmm0 movsd [rsp+18h+var_18], xmm5 movsd ...
double func0(double a1, int a2) { __m128d v2; // xmm5 __m128d v3; // xmm1 double v4; // xmm0_8 double v7; // [rsp+0h] [rbp-18h] double v8; // [rsp+0h] [rbp-18h] double v9; // [rsp+8h] [rbp-10h] v9 = pow(10.0, (double)-a2); v2 = (__m128d)*(unsigned long long *)&a1; v7 = a1 / v9; v2.m128d_f64[0] = v...
func0: ENDBR64 PUSH RBX SUB RSP,0x10 MOVSD qword ptr [RSP],XMM0 MOV EBX,EDI MOV EAX,EDI NEG EAX PXOR XMM1,XMM1 CVTSI2SD XMM1,EAX MOVSD XMM0,qword ptr [0x00102088] CALL 0x00101080 MOVSD qword ptr [RSP + 0x8],XMM0 MOVSD XMM5,qword ptr [RSP] DIVSD XMM5,XMM0 MOVSD qword ptr [RSP],XMM5 MOVSD XMM2,qword ptr [0x001020a0] MOVA...
/* func0(double, int) */ double func0(double param_1,int param_2) { double dVar1; double dVar2; int8 local_18; dVar1 = pow(DAT_00102088,(double)-param_2); local_18 = param_1 / dVar1; if ((double)((ulong)local_18 & DAT_001020a0) < DAT_00102090) { local_18 = (double)((ulong)((double)(long)local_18 + ...
3,318
func0
#include <cmath> #include <cassert>
double func0(double a, int digits) { double n = pow(10, -digits); return round(std::ceil(a / n) * n * pow(10, digits)) / pow(10, digits); }
int main() { assert(func0(123.01247, 0) == 124); assert(func0(123.01247, 1) == 123.1); assert(func0(123.01247, 2) == 123.02); return 0; }
O2
cpp
func0(double, int): endbr64 push %rbx mov %edi,%eax pxor %xmm1,%xmm1 mov %edi,%ebx neg %eax cvtsi2sd %eax,%xmm1 sub $0x20,%rsp movsd 0xe31(%rip),%xmm4 movsd %xmm0,0x8(%rsp) movapd %xmm4,%xmm0 callq 1080 <pow@plt> movsd 0x8(%rsp),%xmm2 movsd 0xe1c(%rip),%xmm5 movapd %xmm0,%xmm3 mov 0xe09(%rip),%r...
_Z5func0di: endbr64 push rbx mov eax, edi pxor xmm1, xmm1 mov ebx, edi neg eax cvtsi2sd xmm1, eax; y sub rsp, 20h movsd [rsp+28h+var_20], xmm0 movsd xmm0, cs:x; x call _pow movsd xmm2, [rsp+28h+var_20] movsd xmm1, cs:qword_20A0 movsd xmm4, cs:qword_2090 movapd xmm3, xmm0 divsd xmm2...
__int128 __usercall func0@<xmm0>(double a1@<xmm0>, int a2@<edi>) { double v2; // xmm3_8 __m128d v3; // xmm2 __m128d v4; // xmm0 double v5; // xmm0_8 __int128 v6; // xmm2 double v9; // [rsp+0h] [rbp-20h] v3 = (__m128d)*(unsigned long long *)&a1; v2 = pow(10.0, (double)-a2); v3.m128d_f64[0] = a1 / v2; ...
func0: ENDBR64 PUSH RBX MOV EAX,EDI PXOR XMM1,XMM1 MOV EBX,EDI NEG EAX CVTSI2SD XMM1,EAX SUB RSP,0x20 MOVSD qword ptr [RSP + 0x8],XMM0 MOVSD XMM0,qword ptr [0x00102088] CALL 0x00101080 MOVSD XMM2,qword ptr [RSP + 0x8] MOVSD XMM1,qword ptr [0x001020a0] MOVSD XMM4,qword ptr [0x00102090] MOVAPD XMM3,XMM0 DIVSD XMM2,XMM0 M...
/* func0(double, int) */ double func0(double param_1,int param_2) { double dVar1; double dVar2; double dVar3; dVar1 = pow(DAT_00102088,(double)-param_2); dVar3 = param_1 / dVar1; if ((double)((ulong)dVar3 & DAT_001020a0) < DAT_00102090) { dVar3 = (double)((ulong)((double)(long)dVar3 + ...
3,319
func0
#include <cmath> #include <cassert>
double func0(double a, int digits) { double n = pow(10, -digits); return round(std::ceil(a / n) * n * pow(10, digits)) / pow(10, digits); }
int main() { assert(func0(123.01247, 0) == 124); assert(func0(123.01247, 1) == 123.1); assert(func0(123.01247, 2) == 123.02); return 0; }
O3
cpp
func0(double, int): endbr64 push %rbx mov %edi,%eax pxor %xmm1,%xmm1 mov %edi,%ebx neg %eax cvtsi2sd %eax,%xmm1 sub $0x20,%rsp movsd 0xe31(%rip),%xmm4 movsd %xmm0,0x8(%rsp) movapd %xmm4,%xmm0 callq 1080 <pow@plt> movsd 0x8(%rsp),%xmm2 movsd 0xe1c(%rip),%xmm5 movapd %xmm0,%xmm3 mov 0xe09(%rip),%r...
_Z5func0di: endbr64 push rbx mov eax, edi pxor xmm1, xmm1 mov ebx, edi neg eax cvtsi2sd xmm1, eax; y sub rsp, 20h movsd [rsp+28h+var_20], xmm0 movsd xmm0, cs:x; x call _pow movsd xmm2, [rsp+28h+var_20] movsd xmm1, cs:qword_20A8 movsd xmm4, cs:qword_2098 movapd xmm3, xmm0 divsd xmm2...
__int128 __usercall func0@<xmm0>(double a1@<xmm0>, int a2@<edi>) { double v2; // xmm3_8 __m128d v3; // xmm2 __m128d v4; // xmm0 double v5; // xmm0_8 __int128 v6; // xmm2 double v9; // [rsp+0h] [rbp-20h] v3 = (__m128d)*(unsigned long long *)&a1; v2 = pow(10.0, (double)-a2); v3.m128d_f64[0] = a1 / v2; ...
func0: ENDBR64 PUSH RBX MOV EAX,EDI PXOR XMM1,XMM1 MOV EBX,EDI NEG EAX CVTSI2SD XMM1,EAX SUB RSP,0x20 MOVSD qword ptr [RSP + 0x8],XMM0 MOVSD XMM0,qword ptr [0x00102090] CALL 0x00101080 MOVSD XMM2,qword ptr [RSP + 0x8] MOVSD XMM1,qword ptr [0x001020a8] MOVSD XMM4,qword ptr [0x00102098] MOVAPD XMM3,XMM0 DIVSD XMM2,XMM0 M...
/* func0(double, int) */ double func0(double param_1,int param_2) { double dVar1; double dVar2; double dVar3; dVar1 = pow(DAT_00102090,(double)-param_2); dVar3 = param_1 / dVar1; if ((double)((ulong)dVar3 & DAT_001020a8) < DAT_00102098) { dVar3 = (double)((ulong)((double)(long)dVar3 + ...
3,320
func0
#include <iostream> #include <cassert>
int func0(int arr[], int n) { int cnt = 0; for (int i = 0; i < n; i++) { for (int j = i + 1; j < n; j++) { if (arr[i] == arr[j]) { cnt += 1; } } } return cnt; }
int main() { int arr1[] = {1, 1, 1, 1}; assert(func0(arr1, 4) == 6); int arr2[] = {1, 5, 1}; assert(func0(arr2, 3) == 1); int arr3[] = {3, 2, 1, 7, 8, 9}; assert(func0(arr3, 6) == 0); 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_10] == param_1[local_c])...
3,321
func0
#include <iostream> #include <cassert>
int func0(int arr[], int n) { int cnt = 0; for (int i = 0; i < n; i++) { for (int j = i + 1; j < n; j++) { if (arr[i] == arr[j]) { cnt += 1; } } } return cnt; }
int main() { int arr1[] = {1, 1, 1, 1}; assert(func0(arr1, 4) == 6); int arr2[] = {1, 5, 1}; assert(func0(arr2, 3) == 1); int arr3[] = {3, 2, 1, 7, 8, 9}; assert(func0(arr3, 6) == 0); 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 jne 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] jnz 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] JNZ 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 ...
3,322
func0
#include <iostream> #include <cassert>
int func0(int arr[], int n) { int cnt = 0; for (int i = 0; i < n; i++) { for (int j = i + 1; j < n; j++) { if (arr[i] == arr[j]) { cnt += 1; } } } return cnt; }
int main() { int arr1[] = {1, 1, 1, 1}; assert(func0(arr1, 4) == 6); int arr2[] = {1, 5, 1}; assert(func0(arr2, 3) == 1); int arr3[] = {3, 2, 1, 7, 8, 9}; assert(func0(arr3, 6) == 0); return 0; }
O2
cpp
func0(int*, int): endbr64 test %esi,%esi jle 13fe <_Z5func0Pii+0x4e> lea -0x1(%rsi),%r9d mov $0x1,%ecx xor %r8d,%r8d add $0x1,%r9 cmp %r9,%rcx je 13fa <_Z5func0Pii+0x4a> nopl (%rax) mov -0x4(%rdi,%rcx,4),%edx mov %rcx,%rax nopw 0x0(%rax,%rax,1) cmp (%rdi,%rax,4),%edx jne 13e9 <_Z...
_Z5func0Pii: endbr64 test esi, esi jle short loc_12CC mov r9d, esi mov r8d, 1 xor ecx, ecx cmp esi, 1 jz short loc_12C9 nop dword ptr [rax+rax+00000000h] loc_12A0: mov edx, [rdi+r8*4-4] mov rax, r8 nop dword ptr [rax+rax+00000000h] loc_12B0: cmp edx, [rdi+rax*4] jnz s...
long long func0(int *a1, int a2) { long long v2; // r8 unsigned int v3; // ecx long long v4; // rax if ( a2 <= 0 ) return 0LL; v2 = 1LL; v3 = 0; if ( a2 != 1 ) { do { v4 = v2; do { if ( a1[v2 - 1] == a1[v4] ) ++v3; ++v4; } while ( a2 ...
func0: ENDBR64 TEST ESI,ESI JLE 0x001012cc MOV R9D,ESI MOV R8D,0x1 XOR ECX,ECX CMP ESI,0x1 JZ 0x001012c9 NOP dword ptr [RAX + RAX*0x1] LAB_001012a0: MOV EDX,dword ptr [RDI + R8*0x4 + -0x4] MOV RAX,R8 NOP dword ptr [RAX + RAX*0x1] LAB_001012b0: CMP EDX,dword ptr [RDI + RAX*0x4] JNZ 0x001012b8 ADD ECX,0x1 LAB_001012b8: A...
/* func0(int*, int) */ int func0(int *param_1,int param_2) { ulong uVar1; int iVar2; ulong uVar3; if (param_2 < 1) { return 0; } uVar3 = 1; iVar2 = 0; if (param_2 != 1) { do { uVar1 = uVar3; do { if (param_1[uVar3 - 1] == param_1[uVar1]) { iVar2 = iVar2 + 1; ...
3,323
func0
#include <iostream> #include <cassert>
int func0(int arr[], int n) { int cnt = 0; for (int i = 0; i < n; i++) { for (int j = i + 1; j < n; j++) { if (arr[i] == arr[j]) { cnt += 1; } } } return cnt; }
int main() { int arr1[] = {1, 1, 1, 1}; assert(func0(arr1, 4) == 6); int arr2[] = {1, 5, 1}; assert(func0(arr2, 3) == 1); int arr3[] = {3, 2, 1, 7, 8, 9}; assert(func0(arr3, 6) == 0); return 0; }
O3
cpp
func0(int*, int): endbr64 test %esi,%esi jle 14c9 <_Z5func0Pii+0x129> cmp $0x1,%esi je 14c9 <_Z5func0Pii+0x129> push %rbp lea 0x4(%rdi),%r9 xor %r10d,%r10d mov $0x1,%ecx push %rbx lea -0x1(%rsi),%ebp mov $0x1,%ebx nopl 0x0(%rax,%rax,1) mov %esi,%r8d mov %ebp,%eax mov -0x4(%r9),...
_Z5func0Pii: endbr64 test esi, esi jle loc_1244 cmp esi, 1 jz loc_1244 push rbp mov r11, rdi lea r8, [rdi+4] xor r10d, r10d push rbx mov ecx, 1 lea ebp, [rsi-1] mov ebx, 1 xchg ax, ax loc_1170: mov edi, esi mov eax, ebp mov r9d, [r8-4] sub edi, ecx cmp ...
long long func0(int *a1, int a2) { int *v3; // r8 unsigned int v4; // r10d int v5; // ecx unsigned int v6; // r9d unsigned int v7; // edi __m128i v8; // xmm1 const __m128i *v9; // rax __m128i v10; // xmm2 __m128i v11; // xmm0 __m128i v12; // xmm1 int v13; // eax long long v14; // rdi if ( a2...
func0: ENDBR64 TEST ESI,ESI JLE 0x00101244 CMP ESI,0x1 JZ 0x00101244 PUSH RBP MOV R11,RDI LEA R8,[RDI + 0x4] XOR R10D,R10D PUSH RBX MOV ECX,0x1 LEA EBP,[RSI + -0x1] MOV EBX,0x1 NOP LAB_00101170: MOV EDI,ESI MOV EAX,EBP MOV R9D,dword ptr [R8 + -0x4] SUB EDI,ECX CMP ESI,ECX CMOVLE EDI,EBX SUB EAX,ECX CMP EAX,0x2 JBE 0x00...
/* func0(int*, int) */ int func0(int *param_1,int param_2) { int iVar1; uint uVar2; int iVar3; int *piVar4; int *piVar5; int *piVar6; int *piVar7; int iVar8; int *piVar9; int iVar10; int iVar11; int iVar12; int iVar13; int iVar14; if ((param_2 < 1) || (param_2 == 1)) { return 0; ...
3,324
func0
#include <iostream> #include <regex> #include <vector> #include <cassert> #include <limits>
int func0(const std::string &input) { std::regex numbers_pattern("\\d+"); std::sregex_iterator numbers_begin = std::sregex_iterator(input.begin(), input.end(), numbers_pattern); std::sregex_iterator numbers_end = std::sregex_iterator(); int max_number = std::numeric_limits<int>::min(); for (s...
int main() { assert(func0("100klh564abc365bg") == 564); assert(func0("hello300how546mer231") == 546); assert(func0("its233beenalong343journey234") == 343); 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 $0x158,%rsp mov %rdi,-0x158(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax lea -0x140(%rbp),%rax mov $0x10,%edx lea 0x2c34f(%rip),%rsi m...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 158h mov [rbp+var_158], rdi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax lea rax, [rbp+var_140] mov edx, 10h lea rcx, aD; "\\d+" mov rsi, rcx mov rdi, r...
long long func0(long long a1) { long long v1; // rbx long long v2; // rax long long v3; // rax unsigned int v5; // [rsp+18h] [rbp-148h] signed int v6; // [rsp+1Ch] [rbp-144h] _BYTE v7[32]; // [rsp+20h] [rbp-140h] BYREF _BYTE v8[32]; // [rsp+40h] [rbp-120h] BYREF _BYTE v9[64]; // [rsp+60h] [rbp-100h] BY...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x158 MOV qword ptr [RBP + -0x158],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX LEA RAX,[RBP + -0x140] MOV EDX,0x10 LEA RCX,[0x134046] MOV RSI,RCX MOV RDI,RAX LAB_00105be8: CALL 0x00107662 MOV RAX,qword ptr [RBP + -0x158] MOV RDI,RAX CA...
/* func0(std::string const&) */ int func0(string *param_1) { char cVar1; __normal_iterator _Var2; __normal_iterator _Var3; int iVar4; match_results *pmVar5; long in_FS_OFFSET; int local_150; regex local_148 [32]; match_results<__normal_iterator<char_const*,std::string>,std::allocator<std::sub_match<...
3,325
func0
#include <iostream> #include <regex> #include <vector> #include <cassert> #include <limits>
int func0(const std::string &input) { std::regex numbers_pattern("\\d+"); std::sregex_iterator numbers_begin = std::sregex_iterator(input.begin(), input.end(), numbers_pattern); std::sregex_iterator numbers_end = std::sregex_iterator(); int max_number = std::numeric_limits<int>::min(); for (s...
int main() { assert(func0("100klh564abc365bg") == 564); assert(func0("hello300how546mer231") == 546); assert(func0("its233beenalong343journey234") == 343); return 0; }
O1
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x298,%rsp mov %rdi,%rbx mov %fs:0x28,%rax mov %rax,0x288(%rsp) xor %eax,%eax lea 0xb0(%rsp),%r12 mov %r12,%rdi callq ...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 2D8h mov rbx, rdi mov rax, fs:28h mov [rbp+var_38], rax xor eax, eax lea rax, [rbp+var_2C8] mov r14, rax mov rdi, rax;...
long long func0(long long *a1) { long long v2; // rdx long long v3; // rax long long v4; // rdi long long v5; // rsi unsigned long long v6; // rbx char *v7; // rdx struct _Unwind_Exception *v8; // rbx int v9; // r14d unsigned long long v10; // r12 char *v11; // rbx long long v12; // rax char *v...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x2d8 MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x38],RAX XOR EAX,EAX LEA RAX,[RBP + -0x2c8] MOV R14,RAX MOV RDI,RAX CALL 0x00104770 MOV qword ptr [RBP + -0x2c0],0x0 MOV qword ptr [RBP + -0x2b8],0x0 LEA RDI,[RBP...
/* func0(std::string const&) */ int func0(string *param_1) { int iVar1; int *__src; _Sp_counted_base<(_Lock_policy)2> *this; int8 ***pppuVar2; _Sp_counted_base<(_Lock_policy)2> *p_Var3; bool bVar4; char cVar5; ulong uVar6; int *piVar7; long lVar8; int8 ****__n; int8 uVar9; sub_match *psVar10...
3,326
func0
#include <iostream> #include <regex> #include <vector> #include <cassert> #include <limits>
int func0(const std::string &input) { std::regex numbers_pattern("\\d+"); std::sregex_iterator numbers_begin = std::sregex_iterator(input.begin(), input.end(), numbers_pattern); std::sregex_iterator numbers_end = std::sregex_iterator(); int max_number = std::numeric_limits<int>::min(); for (s...
int main() { assert(func0("100klh564abc365bg") == 564); assert(func0("hello300how546mer231") == 546); assert(func0("its233beenalong343journey234") == 343); return 0; }
O2
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx mov %rdi,%rbx sub $0x288,%rsp mov %fs:0x28,%rax mov %rax,0x278(%rsp) xor %eax,%eax lea 0xa0(%rsp),%r14 lea 0x48(%rsp),%r15 m...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push r15 push r14 lea r14, [rbp+var_2C8] push r13 push r12 push rbx mov rbx, rdi mov rdi, r14; this sub rsp, 2F8h mov rax, fs:28h mov [rbp+var_38], rax xor eax, eax mov [rb...
long long func0(unsigned long long *a1) { __m128i v2; // xmm0 long long v3; // rax __m128i v4; // rdi long long v5; // rdx volatile signed __int32 *v6; // rcx signed __int32 v7; // eax long long v8; // rdx volatile signed __int32 *v9; // rcx signed __int32 v10; // eax unsigned long long v11; // rax...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 LEA R14,[RBP + -0x2c8] PUSH R13 PUSH R12 PUSH RBX MOV RBX,RDI MOV RDI,R14 SUB RSP,0x2f8 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x38],RAX XOR EAX,EAX MOV qword ptr [RBP + -0x300],R14 CALL 0x00104750 LEA RDX,[0x11a662] PXOR XMM0,XMM0 LEA RDI,[RBP + -0x1d0] ...
/* func0(std::string const&) */ int func0(string *param_1) { ulong uVar1; int *__src; int auVar2 [16]; int auVar3 [16]; int8 ***pppuVar4; int8 uVar5; bool bVar6; int iVar7; int iVar8; _Sp_counted_base<(_Lock_policy)2> *p_Var9; long *plVar10; _Sp_counted_base<(_Lock_policy)2> *p_Var11; _Sp_co...
3,327
func0
#include <iostream> #include <regex> #include <vector> #include <cassert> #include <limits>
int func0(const std::string &input) { std::regex numbers_pattern("\\d+"); std::sregex_iterator numbers_begin = std::sregex_iterator(input.begin(), input.end(), numbers_pattern); std::sregex_iterator numbers_end = std::sregex_iterator(); int max_number = std::numeric_limits<int>::min(); for (s...
int main() { assert(func0("100klh564abc365bg") == 564); assert(func0("hello300how546mer231") == 546); assert(func0("its233beenalong343journey234") == 343); return 0; }
O3
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): endbr64 push %r15 push %r14 push %r13 push %r12 mov %rdi,%r12 push %rbp push %rbx sub $0x288,%rsp mov %fs:0x28,%rax mov %rax,0x278(%rsp) xor %eax,%eax lea 0xa0(%rsp),%rbx mov %rbx,%rdi mov ...
_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: endbr64 push rbp mov rbp, rsp push r15 push r14 push r13 push r12 mov r12, rdi push rbx lea rbx, [rbp+var_2C8] mov rdi, rbx; this sub rsp, 2F8h mov rax, fs:28h mov [rbp+var_38], rax xor eax, eax mov [rb...
long long func0(unsigned long long *a1) { __m128i v2; // xmm0 long long v3; // rdi void *v4; // rdi void **v5; // rbx unsigned long long v6; // r15 void *v7; // rdi unsigned long long v8; // rax unsigned long long v9; // rdx long long v10; // rdx long long v11; // rcx const __m128i *v12; // rcx ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 MOV R12,RDI PUSH RBX LEA RBX,[RBP + -0x2c8] MOV RDI,RBX SUB RSP,0x2f8 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x38],RAX XOR EAX,EAX MOV qword ptr [RBP + -0x308],RBX CALL 0x00104790 LEA RDX,[0x11b6a7] PXOR XMM0,XMM0 LEA RDI,[RBP + -0x1d0] ...
/* func0(std::string const&) */ int func0(string *param_1) { ulong uVar1; int iVar2; int8 uVar3; int auVar4 [16]; int auVar5 [16]; bool bVar6; int8 *puVar7; int8 *puVar8; int auVar9 [8]; string *psVar10; int8 *puVar11; long lVar12; ulong uVar13; uint uVar14; regex *prVar15; string *psV...
3,328
func0
#include <vector> #include <map> #include <assert.h>
std::vector<int> func0(const std::map<int, std::string>& dict) { std::vector<int> list; for (auto const& key : dict) { list.push_back(key.first); } return list; }
int main() { assert((func0({{1, "python"}, {2, "java"}}) == std::vector<int>{1, 2})); assert((func0({{10, "red"}, {20, "blue"}, {30, "black"}}) == std::vector<int>{10, 20, 30})); assert((func0({{27, "language"}, {39, "java"}, {44, "little"}}) == std::vector<int>{27, 39, 44})); return 0; }
O0
cpp
func0(std::map<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<int>, std::allocator<std::pair<int const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x48,%rsp mov ...
3,329
func0
#include <vector> #include <map> #include <assert.h>
std::vector<int> func0(const std::map<int, std::string>& dict) { std::vector<int> list; for (auto const& key : dict) { list.push_back(key.first); } return list; }
int main() { assert((func0({{1, "python"}, {2, "java"}}) == std::vector<int>{1, 2})); assert((func0({{10, "red"}, {20, "blue"}, {30, "black"}}) == std::vector<int>{10, 20, 30})); assert((func0({{27, "language"}, {39, "java"}, {44, "little"}}) == std::vector<int>{27, 39, 44})); return 0; }
O1
cpp
func0(std::map<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<int>, std::allocator<std::pair<int const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&): endbr64 push %r12 push %rbp push %rbx mov %rdi,%rbp movq $0x0...
3,330
func0
#include <vector> #include <map> #include <assert.h>
std::vector<int> func0(const std::map<int, std::string>& dict) { std::vector<int> list; for (auto const& key : dict) { list.push_back(key.first); } return list; }
int main() { assert((func0({{1, "python"}, {2, "java"}}) == std::vector<int>{1, 2})); assert((func0({{10, "red"}, {20, "blue"}, {30, "black"}}) == std::vector<int>{10, 20, 30})); assert((func0({{27, "language"}, {39, "java"}, {44, "little"}}) == std::vector<int>{27, 39, 44})); return 0; }
O2
cpp
func0(std::map<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<int>, std::allocator<std::pair<int const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&): endbr64 push %r12 mov %rdi,%r12 push %rbp push %rbx mov 0x18...
3,331
func0
#include <vector> #include <map> #include <assert.h>
std::vector<int> func0(const std::map<int, std::string>& dict) { std::vector<int> list; for (auto const& key : dict) { list.push_back(key.first); } return list; }
int main() { assert((func0({{1, "python"}, {2, "java"}}) == std::vector<int>{1, 2})); assert((func0({{10, "red"}, {20, "blue"}, {30, "black"}}) == std::vector<int>{10, 20, 30})); assert((func0({{27, "language"}, {39, "java"}, {44, "little"}}) == std::vector<int>{27, 39, 44})); return 0; }
O3
cpp
func0(std::map<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<int>, std::allocator<std::pair<int const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&): endbr64 push %r12 pxor %xmm0,%xmm0 mov %rdi,%r12 push %rbp push...
3,332
func0
#include <vector> #include <cassert>
std::vector<std::vector<int>> func0(int n) { if (n <= 0) { return {}; } std::vector<std::vector<int>> matrix(n, std::vector<int>(n, 0)); int row_st = 0; int row_ed = n - 1; int col_st = 0; int col_ed = n - 1; int current = 1; while (true) { if (current > n ...
int main() { assert((func0(3) == std::vector<std::vector<int>>{{1, 2, 3}, {8, 9, 4}, {7, 6, 5}})); assert((func0(2) == std::vector<std::vector<int>>{{1, 2}, {4, 3}})); assert((func0(7) == std::vector<std::vector<int>>{{1, 2, 3, 4, 5, 6, 7}, {24, 25, 26, 27, 28, 29, 8}, {23, 40, 41, 42, 43, 30, 9}, {22, 3...
O0
cpp
func0(int): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x88,%rsp mov %rdi,-0x88(%rbp) mov %esi,-0x8c(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax cmpl $0x0,-0x8c(%rbp) jg 1310 <_Z5func0i+0x67> mov -0x88(%rbp),%rax movq $0x0,(%rax) movq $0x0,0x8(%rax) movq $0x0,0...
_Z5func0i: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 98h mov [rbp+var_98], rdi mov [rbp+var_9C], esi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax cmp [rbp+var_9C], 0 jg short loc_1325 mov rax, [rbp+var_98] pxor xmm0, xmm0 movups xmmword ptr [rax], xmm0 movq...
long long func0(long long a1, int a2) { int v2; // ebx long long v3; // rax int v4; // ebx long long v5; // rax int v6; // ebx long long v7; // rax int v8; // ebx long long v9; // rax char v11; // [rsp+16h] [rbp-8Ah] BYREF char v12; // [rsp+17h] [rbp-89h] BYREF int v13; // [rsp+18h] [rbp-88h] BYR...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x98 MOV qword ptr [RBP + -0x98],RDI MOV dword ptr [RBP + -0x9c],ESI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX CMP dword ptr [RBP + -0x9c],0x0 JG 0x00101325 MOV RAX,qword ptr [RBP + -0x98] PXOR XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOV...
/* func0(int) */ vector<std::vector<int,std::allocator<int>>,std::allocator<std::vector<int,std::allocator<int>>>> * func0(int param_1) { int iVar1; vector<int,std::allocator<int>> *pvVar2; int *piVar3; int in_ESI; int4 in_register_0000003c; vector<std::vector<int,std::allocator<int>>,std::allocator<std::...
3,333
func0
#include <vector> #include <cassert>
std::vector<std::vector<int>> func0(int n) { if (n <= 0) { return {}; } std::vector<std::vector<int>> matrix(n, std::vector<int>(n, 0)); int row_st = 0; int row_ed = n - 1; int col_st = 0; int col_ed = n - 1; int current = 1; while (true) { if (current > n ...
int main() { assert((func0(3) == std::vector<std::vector<int>>{{1, 2, 3}, {8, 9, 4}, {7, 6, 5}})); assert((func0(2) == std::vector<std::vector<int>>{{1, 2}, {4, 3}})); assert((func0(7) == std::vector<std::vector<int>>{{1, 2, 3, 4, 5, 6, 7}, {24, 25, 26, 27, 28, 29, 8}, {23, 40, 41, 42, 43, 30, 9}, {22, 3...
O1
cpp
func0(int): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x38,%rsp mov %rdi,0x8(%rsp) mov %esi,0x10(%rsp) test %esi,%esi jg 1313 <_Z5func0i+0x4a> movq $0x0,(%rdi) movq $0x0,0x8(%rdi) movq $0x0,0x10(%rdi) mov 0x8(%rsp),%rax add $0x38,%rsp pop %rbx pop...
_Z5func0i: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 68h mov [rsp+98h+var_90], rdi mov rax, fs:28h mov [rsp+98h+var_40], rax xor eax, eax test esi, esi jg short loc_132B pxor xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov qword ptr [rdi+1...
_QWORD * func0(_QWORD *a1, int a2) { unsigned long long v3; // r15 _DWORD *v4; // rax void *v5; // r13 _DWORD *v6; // rdx int v7; // r9d int v8; // r15d long long v9; // rbp unsigned int v10; // r10d _QWORD *v11; // rdi _QWORD *v12; // rsi long long v13; // r8 int v14; // eax int v15; // r11d ...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x68 MOV qword ptr [RSP + 0x8],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x58],RAX XOR EAX,EAX TEST ESI,ESI JG 0x0010132b PXOR XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x10],0x0 LAB_00101303: MOV RAX,qword ptr [R...
/* func0(int) */ int (*) [16] func0(int param_1) { ulong uVar1; vector *pvVar2; int iVar3; int iVar4; int iVar5; int4 *puVar6; int4 *puVar7; vector *pvVar8; vector *pvVar9; long lVar10; vector *pvVar11; long lVar12; int in_ESI; vector *pvVar13; int4 in_register_0000003c; int (*pauVar14...
3,334
func0
#include <vector> #include <cassert>
std::vector<std::vector<int>> func0(int n) { if (n <= 0) { return {}; } std::vector<std::vector<int>> matrix(n, std::vector<int>(n, 0)); int row_st = 0; int row_ed = n - 1; int col_st = 0; int col_ed = n - 1; int current = 1; while (true) { if (current > n ...
int main() { assert((func0(3) == std::vector<std::vector<int>>{{1, 2, 3}, {8, 9, 4}, {7, 6, 5}})); assert((func0(2) == std::vector<std::vector<int>>{{1, 2}, {4, 3}})); assert((func0(7) == std::vector<std::vector<int>>{{1, 2, 3, 4, 5, 6, 7}, {24, 25, 26, 27, 28, 29, 8}, {23, 40, 41, 42, 43, 30, 9}, {22, 3...
O2
cpp
func0(int): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x38,%rsp mov %rdi,0x10(%rsp) mov %esi,0xc(%rsp) test %esi,%esi jg 1a10 <_Z5func0i+0x50> movq $0x0,(%rdi) movq $0x0,0x8(%rdi) movq $0x0,0x10(%rdi) mov 0x10(%rsp),%rax add $0x38,%rsp pop %rbx po...
_Z5func0i: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 68h mov [rsp+98h+var_90], rdi mov rax, fs:28h mov [rsp+98h+var_40], rax xor eax, eax test esi, esi jg short loc_1B98 mov qword ptr [rdi+10h], 0 pxor xmm0, xmm0 movups xmmword ptr [rdi]...
_QWORD * func0(_QWORD *a1, int a2) { char *v4; // rax char *v5; // r12 void *v6; // r14 long long v7; // r12 int v8; // esi long long v9; // rdi long long v10; // r10 int v11; // r9d int v12; // eax long long *v13; // r11 int v14; // r8d long long v15; // r15 int v16; // r14d long long *v17;...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x68 MOV qword ptr [RSP + 0x8],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x58],RAX XOR EAX,EAX TEST ESI,ESI JG 0x00101b98 MOV qword ptr [RDI + 0x10],0x0 PXOR XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 LAB_00101b6a: MOV RAX,qword ptr [R...
/* func0(int) */ int (*) [16] func0(int param_1) { ulong __n; ulong uVar1; long lVar2; vector *pvVar3; int iVar4; int iVar5; int iVar6; void *__s; vector *pvVar7; vector *pvVar8; vector *pvVar9; int *piVar10; vector *pvVar11; int in_ESI; int iVar12; int iVar13; int4 in_register_00000...
3,335
func0
#include <vector> #include <cassert>
std::vector<std::vector<int>> func0(int n) { if (n <= 0) { return {}; } std::vector<std::vector<int>> matrix(n, std::vector<int>(n, 0)); int row_st = 0; int row_ed = n - 1; int col_st = 0; int col_ed = n - 1; int current = 1; while (true) { if (current > n ...
int main() { assert((func0(3) == std::vector<std::vector<int>>{{1, 2, 3}, {8, 9, 4}, {7, 6, 5}})); assert((func0(2) == std::vector<std::vector<int>>{{1, 2}, {4, 3}})); assert((func0(7) == std::vector<std::vector<int>>{{1, 2, 3, 4, 5, 6, 7}, {24, 25, 26, 27, 28, 29, 8}, {23, 40, 41, 42, 43, 30, 9}, {22, 3...
O3
cpp
func0(int): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x28,%rsp mov %rdi,0x10(%rsp) mov %esi,(%rsp) test %esi,%esi jg 1a20 <_Z5func0i+0x40> pxor %xmm0,%xmm0 movq $0x0,0x10(%rdi) mov %rdi,%rax movups %xmm0,(%rdi) add $0x28,%rsp pop %rbx pop %rbp p...
_Z5func0i: endbr64 push r15 push r14 mov r14, rdi push r13 push r12 push rbp push rbx sub rsp, 58h mov [rsp+88h+var_80], esi mov rax, fs:28h mov [rsp+88h+var_40], rax xor eax, eax test esi, esi jg short loc_1C88 mov qword ptr [rdi+10h], 0 pxor xmm0, xmm0 movups ...
_QWORD * func0(_QWORD *a1, int a2) { _QWORD *v2; // r14 long long v4; // r12 unsigned long long v5; // rbp int *v6; // r13 char *v7; // rbx char *v8; // rax char *v9; // r15 unsigned long long v10; // rdx int v11; // r8d int v12; // esi __m128i si128; // xmm3 __m128i v14; // xmm2 unsigned int ...
func0: ENDBR64 PUSH R15 PUSH R14 MOV R14,RDI PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x58 MOV dword ptr [RSP + 0x8],ESI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x48],RAX XOR EAX,EAX TEST ESI,ESI JG 0x00101c88 MOV qword ptr [RDI + 0x10],0x0 PXOR XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 LAB_00101c5c: MOV RAX,...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(int) */ int (*) [16] func0(int param_1) { int *piVar1; long lVar2; int4 uVar3; long lVar4; long lVar5; int *puVar6; int iVar7; int iVar8; int iVar9; int iVar10; int iVar11; int iVar12; int iVar13; ...
3,336
func0
#include <iostream> #include <cassert>
float func0(int x1, int y1, int x2, int y2) { return static_cast<float>(y2 - y1) / (x2 - x1); }
int main() { assert(func0(4, 2, 2, 5) == -1.5f); assert(func0(2, 4, 4, 6) == 1.0f); assert(func0(1, 2, 4, 2) == 0.0f); return 0; }
O0
cpp
func0(int, int, int, int): endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x4(%rbp) mov %esi,-0x8(%rbp) mov %edx,-0xc(%rbp) mov %ecx,-0x10(%rbp) mov -0x10(%rbp),%eax sub -0x8(%rbp),%eax cvtsi2ss %eax,%xmm0 mov -0xc(%rbp),%eax sub -0x4(%rbp),%eax cvtsi2ss %eax,%xmm1 divss %xmm1,%xmm0 pop %rbp...
_Z5func0iiii: endbr64 push rbp mov rbp, rsp mov [rbp+var_4], edi mov [rbp+var_8], esi mov [rbp+var_C], edx mov [rbp+var_10], ecx mov eax, [rbp+var_10] sub eax, [rbp+var_8] pxor xmm0, xmm0 cvtsi2ss xmm0, eax mov eax, [rbp+var_C] sub eax, [rbp+var_4] pxor xmm1, xmm1 cvtsi2ss x...
float func0(int a1, int a2, int a3, int a4) { return (float)(a4 - a2) / (float)(a3 - a1); }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x4],EDI MOV dword ptr [RBP + -0x8],ESI MOV dword ptr [RBP + -0xc],EDX MOV dword ptr [RBP + -0x10],ECX MOV EAX,dword ptr [RBP + -0x10] SUB EAX,dword ptr [RBP + -0x8] PXOR XMM0,XMM0 CVTSI2SS XMM0,EAX MOV EAX,dword ptr [RBP + -0xc] SUB EAX,dword ptr [RBP + -0x4] P...
/* func0(int, int, int, int) */ int8 func0(int param_1,int param_2,int param_3,int param_4) { int auVar1 [16]; auVar1._4_12_ = SUB1612((int [16])0x0,4); auVar1._0_4_ = (float)(param_4 - param_2) / (float)(param_3 - param_1); return auVar1._0_8_; }
3,337
func0
#include <iostream> #include <cassert>
float func0(int x1, int y1, int x2, int y2) { return static_cast<float>(y2 - y1) / (x2 - x1); }
int main() { assert(func0(4, 2, 2, 5) == -1.5f); assert(func0(2, 4, 4, 6) == 1.0f); assert(func0(1, 2, 4, 2) == 0.0f); return 0; }
O1
cpp
func0(int, int, int, int): endbr64 sub %esi,%ecx pxor %xmm0,%xmm0 cvtsi2ss %ecx,%xmm0 sub %edi,%edx pxor %xmm1,%xmm1 cvtsi2ss %edx,%xmm1 divss %xmm1,%xmm0 retq
_Z5func0iiii: endbr64 sub ecx, esi pxor xmm0, xmm0 cvtsi2ss xmm0, ecx sub edx, edi pxor xmm1, xmm1 cvtsi2ss xmm1, edx divss xmm0, xmm1 retn
float func0(int a1, int a2, int a3, int a4) { return (float)(a4 - a2) / (float)(a3 - a1); }
func0: ENDBR64 SUB ECX,ESI PXOR XMM0,XMM0 CVTSI2SS XMM0,ECX SUB EDX,EDI PXOR XMM1,XMM1 CVTSI2SS XMM1,EDX DIVSS XMM0,XMM1 RET
/* func0(int, int, int, int) */ int8 func0(int param_1,int param_2,int param_3,int param_4) { int auVar1 [16]; auVar1._4_12_ = SUB1612((int [16])0x0,4); auVar1._0_4_ = (float)(param_4 - param_2) / (float)(param_3 - param_1); return auVar1._0_8_; }
3,338
func0
#include <iostream> #include <cassert>
float func0(int x1, int y1, int x2, int y2) { return static_cast<float>(y2 - y1) / (x2 - x1); }
int main() { assert(func0(4, 2, 2, 5) == -1.5f); assert(func0(2, 4, 4, 6) == 1.0f); assert(func0(1, 2, 4, 2) == 0.0f); return 0; }
O2
cpp
func0(int, int, int, int): endbr64 sub %esi,%ecx pxor %xmm0,%xmm0 pxor %xmm1,%xmm1 sub %edi,%edx cvtsi2ss %ecx,%xmm0 cvtsi2ss %edx,%xmm1 divss %xmm1,%xmm0 retq nopl (%rax)
_Z5func0iiii: endbr64 sub ecx, esi pxor xmm0, xmm0 pxor xmm1, xmm1 sub edx, edi cvtsi2ss xmm0, ecx cvtsi2ss xmm1, edx divss xmm0, xmm1 retn
float func0(int a1, int a2, int a3, int a4) { return (float)(a4 - a2) / (float)(a3 - a1); }
func0: ENDBR64 SUB ECX,ESI PXOR XMM0,XMM0 PXOR XMM1,XMM1 SUB EDX,EDI CVTSI2SS XMM0,ECX CVTSI2SS XMM1,EDX DIVSS XMM0,XMM1 RET
/* func0(int, int, int, int) */ int8 func0(int param_1,int param_2,int param_3,int param_4) { int auVar1 [16]; auVar1._4_12_ = SUB1612((int [16])0x0,4); auVar1._0_4_ = (float)(param_4 - param_2) / (float)(param_3 - param_1); return auVar1._0_8_; }
3,339
func0
#include <iostream> #include <cassert>
float func0(int x1, int y1, int x2, int y2) { return static_cast<float>(y2 - y1) / (x2 - x1); }
int main() { assert(func0(4, 2, 2, 5) == -1.5f); assert(func0(2, 4, 4, 6) == 1.0f); assert(func0(1, 2, 4, 2) == 0.0f); return 0; }
O3
cpp
func0(int, int, int, int): endbr64 sub %esi,%ecx pxor %xmm0,%xmm0 pxor %xmm1,%xmm1 sub %edi,%edx cvtsi2ss %ecx,%xmm0 cvtsi2ss %edx,%xmm1 divss %xmm1,%xmm0 retq nopl (%rax)
_Z5func0iiii: endbr64 sub ecx, esi pxor xmm0, xmm0 pxor xmm1, xmm1 sub edx, edi cvtsi2ss xmm0, ecx cvtsi2ss xmm1, edx divss xmm0, xmm1 retn
float func0(int a1, int a2, int a3, int a4) { return (float)(a4 - a2) / (float)(a3 - a1); }
func0: ENDBR64 SUB ECX,ESI PXOR XMM0,XMM0 PXOR XMM1,XMM1 SUB EDX,EDI CVTSI2SS XMM0,ECX CVTSI2SS XMM1,EDX DIVSS XMM0,XMM1 RET
/* func0(int, int, int, int) */ int8 func0(int param_1,int param_2,int param_3,int param_4) { int auVar1 [16]; auVar1._4_12_ = SUB1612((int [16])0x0,4); auVar1._0_4_ = (float)(param_4 - param_2) / (float)(param_3 - param_1); return auVar1._0_8_; }
3,340
func0
#include <climits> #include <cassert>
int func0(int a[], int size) { int max_so_far = INT_MIN; int max_ending_here = 0; int start = 0; int end = 0; int s = 0; for (int i = 0; i < size; i++) { max_ending_here += a[i]; if (max_so_far < max_ending_here) { max_so_far = max_ending_here; ...
int main() { int array1[] = {-2, -3, 4, -1, -2, 1, 5, -3}; int array2[] = {1, -2, 1, 1, -2, 1}; int array3[] = {-1, -2, 3, 4, 5}; assert(func0(array1, 8) == 5); assert(func0(array2, 6) == 2); assert(func0(array3, 5) == 3); return 0; }
O0
cpp
func0(int*, int): endbr64 push %rbp mov %rsp,%rbp mov %rdi,-0x28(%rbp) mov %esi,-0x2c(%rbp) movl $0x80000000,-0x18(%rbp) movl $0x0,-0x14(%rbp) movl $0x0,-0x10(%rbp) movl $0x0,-0xc(%rbp) movl $0x0,-0x8(%rbp) movl $0x0,-0x4(%rbp) mov -0x4(%rbp),%eax cmp -0x2c(%rbp),%eax jge 11f9 <_Z5func0P...
_Z5func0Pii: endbr64 push rbp mov rbp, rsp mov [rbp+var_28], rdi mov [rbp+var_2C], esi mov [rbp+var_18], 80000000h mov [rbp+var_14], 0 mov [rbp+var_10], 0 mov [rbp+var_C], 0 mov [rbp+var_8], 0 mov [rbp+var_4], 0 jmp short loc_11F1 loc_11A4: mov eax, [rbp+var_4] cdqe lea ...
long long func0(int *a1, int a2) { signed int v3; // [rsp+14h] [rbp-18h] int v4; // [rsp+18h] [rbp-14h] int v5; // [rsp+1Ch] [rbp-10h] int v6; // [rsp+20h] [rbp-Ch] int v7; // [rsp+24h] [rbp-8h] int i; // [rsp+28h] [rbp-4h] v3 = 0x80000000; v4 = 0; v5 = 0; v6 = 0; v7 = 0; for ( i = 0; i < a2; ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x28],RDI MOV dword ptr [RBP + -0x2c],ESI MOV dword ptr [RBP + -0x18],0x80000000 MOV dword ptr [RBP + -0x14],0x0 MOV dword ptr [RBP + -0x10],0x0 MOV dword ptr [RBP + -0xc],0x0 MOV dword ptr [RBP + -0x8],0x0 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001011f1 LAB_00101...
/* func0(int*, int) */ int func0(int *param_1,int param_2) { int local_20; int local_1c; int local_18; int local_14; int local_10; int local_c; local_20 = -0x80000000; local_1c = 0; local_18 = 0; local_14 = 0; local_10 = 0; for (local_c = 0; local_c < param_2; local_c = local_c + 1) { l...
3,341
func0
#include <climits> #include <cassert>
int func0(int a[], int size) { int max_so_far = INT_MIN; int max_ending_here = 0; int start = 0; int end = 0; int s = 0; for (int i = 0; i < size; i++) { max_ending_here += a[i]; if (max_so_far < max_ending_here) { max_so_far = max_ending_here; ...
int main() { int array1[] = {-2, -3, 4, -1, -2, 1, 5, -3}; int array2[] = {1, -2, 1, 1, -2, 1}; int array3[] = {-1, -2, 3, 4, 5}; assert(func0(array1, 8) == 5); assert(func0(array2, 6) == 2); assert(func0(array3, 5) == 3); return 0; }
O1
cpp
func0(int*, int): endbr64 push %rbp push %rbx test %esi,%esi jle 11cd <_Z5func0Pii+0x64> lea -0x1(%rsi),%r10d mov $0x0,%edx mov $0x0,%r11d mov $0x0,%eax mov $0x0,%ebx mov $0x0,%esi mov $0x80000000,%r8d mov $0x0,%ebp jmp 11ae <_Z5func0Pii+0x45> test %ecx,%ecx js 11c5 <_Z5func0Pi...
_Z5func0Pii: endbr64 test esi, esi jle short loc_11CC push rbx movsxd rsi, esi mov edx, 0 mov r10d, 0 mov eax, 0 mov r11d, 0 mov r8d, 0 mov r9d, 80000000h mov ebx, 0 jmp short loc_11AB loc_119E: test ecx, ecx js short loc_11C3 loc_11A2: add rdx, 1 cmp rdx, rsi ...
long long func0(int *a1, int a2) { long long v2; // rdx int v3; // r10d int v4; // eax int v5; // r11d int v6; // r8d signed int v7; // r9d int v8; // ecx if ( a2 <= 0 ) return 1LL; v2 = 0LL; v3 = 0; v4 = 0; v5 = 0; v6 = 0; v7 = 0x80000000; do { v8 = a1[v2] + v6; v6 = v8; ...
func0: ENDBR64 TEST ESI,ESI JLE 0x001011cc PUSH RBX MOVSXD RSI,ESI MOV EDX,0x0 MOV R10D,0x0 MOV EAX,0x0 MOV R11D,0x0 MOV R8D,0x0 MOV R9D,0x80000000 MOV EBX,0x0 JMP 0x001011ab LAB_0010119e: TEST ECX,ECX JS 0x001011c3 LAB_001011a2: ADD RDX,0x1 CMP RDX,RSI JZ 0x001011de LAB_001011ab: MOV ECX,R8D ADD ECX,dword ptr [RDI + R...
/* func0(int*, int) */ int func0(int *param_1,int param_2) { ulong uVar1; int iVar2; ulong uVar3; int iVar4; int iVar5; int iVar6; if (0 < param_2) { uVar3 = 0; iVar5 = 0; uVar1 = 0; iVar6 = 0; iVar2 = 0; iVar4 = -0x80000000; do { iVar2 = iVar2 + param_1[uVar3]; ...
3,342
func0
#include <climits> #include <cassert>
int func0(int a[], int size) { int max_so_far = INT_MIN; int max_ending_here = 0; int start = 0; int end = 0; int s = 0; for (int i = 0; i < size; i++) { max_ending_here += a[i]; if (max_so_far < max_ending_here) { max_so_far = max_ending_here; ...
int main() { int array1[] = {-2, -3, 4, -1, -2, 1, 5, -3}; int array2[] = {1, -2, 1, 1, -2, 1}; int array3[] = {-1, -2, 3, 4, 5}; assert(func0(array1, 8) == 5); assert(func0(array2, 6) == 2); assert(func0(array3, 5) == 3); return 0; }
O2
cpp
func0(int*, int): endbr64 test %esi,%esi jle 13c8 <_Z5func0Pii+0x58> push %rbx xor %r8d,%r8d xor %r9d,%r9d xor %eax,%eax xor %ebx,%ebx xor %ecx,%ecx mov $0x80000000,%r10d xor %r11d,%r11d xchg %ax,%ax add (%rdi),%ecx mov %ecx,%edx cmp %r10d,%ecx jle 13a2 <_Z5func0Pii+0x32> mov ...
_Z5func0Pii: endbr64 test esi, esi jle short loc_12E0 xor ecx, ecx xor r8d, r8d xor eax, eax xor r11d, r11d xor edx, edx mov r9d, 80000000h xor r10d, r10d nop dword ptr [rax] loc_12B0: add edx, [rdi] cmp r9d, edx jge short loc_12BF mov eax, ecx mov r11d, r8d mo...
long long func0(int *a1, int a2) { int v2; // ecx int v3; // r8d int v4; // eax int v5; // r11d int v6; // edx signed int v7; // r9d if ( a2 <= 0 ) return 1LL; v2 = 0; v3 = 0; v4 = 0; v5 = 0; v6 = 0; v7 = 0x80000000; do { v6 += *a1; if ( v7 < v6 ) { v4 = v2; v...
func0: ENDBR64 TEST ESI,ESI JLE 0x001012e0 XOR ECX,ECX XOR R8D,R8D XOR EAX,EAX XOR R11D,R11D XOR EDX,EDX MOV R9D,0x80000000 XOR R10D,R10D NOP dword ptr [RAX] LAB_001012b0: ADD EDX,dword ptr [RDI] CMP R9D,EDX JGE 0x001012bf MOV EAX,ECX MOV R11D,R8D MOV R9D,EDX LAB_001012bf: ADD ECX,0x1 TEST EDX,EDX CMOVS R8D,ECX CMOVS E...
/* func0(int*, int) */ int func0(int *param_1,int param_2) { int iVar1; int iVar2; int iVar3; int iVar4; int iVar5; int iVar6; if (param_2 < 1) { return 1; } iVar2 = 0; iVar4 = 0; iVar1 = 0; iVar6 = 0; iVar3 = 0; iVar5 = -0x80000000; do { iVar3 = iVar3 + *param_1; if (iVar...
3,343
func0
#include <climits> #include <cassert>
int func0(int a[], int size) { int max_so_far = INT_MIN; int max_ending_here = 0; int start = 0; int end = 0; int s = 0; for (int i = 0; i < size; i++) { max_ending_here += a[i]; if (max_so_far < max_ending_here) { max_so_far = max_ending_here; ...
int main() { int array1[] = {-2, -3, 4, -1, -2, 1, 5, -3}; int array2[] = {1, -2, 1, 1, -2, 1}; int array3[] = {-1, -2, 3, 4, 5}; assert(func0(array1, 8) == 5); assert(func0(array2, 6) == 2); assert(func0(array3, 5) == 3); return 0; }
O3
cpp
func0(int*, int): endbr64 test %esi,%esi jle 14a8 <_Z5func0Pii+0x58> push %rbx xor %r8d,%r8d xor %r9d,%r9d xor %eax,%eax xor %ebx,%ebx xor %ecx,%ecx mov $0x80000000,%r10d xor %r11d,%r11d xchg %ax,%ax add (%rdi),%ecx mov %ecx,%edx cmp %ecx,%r10d jge 1482 <_Z5func0Pii+0x32> mov ...
_Z5func0Pii: endbr64 test esi, esi jle short loc_1190 xor ecx, ecx xor r8d, r8d xor eax, eax xor r11d, r11d xor edx, edx mov r9d, 80000000h xor r10d, r10d nop dword ptr [rax] loc_1160: add edx, [rdi] cmp r9d, edx jge short loc_116F mov eax, ecx mov r11d, r8d mo...
long long func0(int *a1, int a2) { int v2; // ecx int v3; // r8d int v4; // eax int v5; // r11d int v6; // edx signed int v7; // r9d if ( a2 <= 0 ) return 1LL; v2 = 0; v3 = 0; v4 = 0; v5 = 0; v6 = 0; v7 = 0x80000000; do { v6 += *a1; if ( v7 < v6 ) { v4 = v2; v...
func0: ENDBR64 TEST ESI,ESI JLE 0x00101190 XOR ECX,ECX XOR R8D,R8D XOR EAX,EAX XOR R11D,R11D XOR EDX,EDX MOV R9D,0x80000000 XOR R10D,R10D NOP dword ptr [RAX] LAB_00101160: ADD EDX,dword ptr [RDI] CMP R9D,EDX JGE 0x0010116f MOV EAX,ECX MOV R11D,R8D MOV R9D,EDX LAB_0010116f: ADD ECX,0x1 TEST EDX,EDX CMOVS R8D,ECX CMOVS E...
/* func0(int*, int) */ int func0(int *param_1,int param_2) { int iVar1; int iVar2; int iVar3; int iVar4; int iVar5; int iVar6; if (param_2 < 1) { return 1; } iVar2 = 0; iVar4 = 0; iVar1 = 0; iVar6 = 0; iVar3 = 0; iVar5 = -0x80000000; do { iVar3 = iVar3 + *param_1; if (iVar...
3,344
func0
#include <assert.h>
int func0(int n) { int sum = 0; for (int i = 0; i < n; i++) { sum += (2*i+1)*(2*i+1)*(2*i+1); } return sum; }
int main() { assert(func0(2) == 28); assert(func0(3) == 153); assert(func0(4) == 496); return 0; }
O0
cpp
func0(int): endbr64 push %rbp mov %rsp,%rbp mov %edi,-0x14(%rbp) movl $0x0,-0x8(%rbp) movl $0x0,-0x4(%rbp) mov -0x4(%rbp),%eax cmp -0x14(%rbp),%eax jge 1191 <_Z5func0i+0x48> mov -0x4(%rbp),%eax add %eax,%eax lea 0x1(%rax),%edx mov -0x4(%rbp),%eax add %eax,%eax add $0x1,%eax imul ...
_Z5func0i: endbr64 push rbp mov rbp, rsp mov [rbp+var_14], edi mov [rbp+var_8], 0 mov [rbp+var_4], 0 jmp short loc_1189 loc_1164: mov eax, [rbp+var_4] add eax, eax lea edx, [rax+1] mov eax, [rbp+var_4] add eax, eax add eax, 1 imul eax, edx mov edx, [rbp+var_4] add ...
long long func0(int a1) { unsigned int v2; // [rsp+Ch] [rbp-8h] int i; // [rsp+10h] [rbp-4h] v2 = 0; for ( i = 0; i < a1; ++i ) v2 += (2 * i + 1) * (2 * i + 1) * (2 * i + 1); return v2; }
func0: ENDBR64 PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x14],EDI MOV dword ptr [RBP + -0x8],0x0 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00101189 LAB_00101164: MOV EAX,dword ptr [RBP + -0x4] ADD EAX,EAX LEA EDX,[RAX + 0x1] MOV EAX,dword ptr [RBP + -0x4] ADD EAX,EAX ADD EAX,0x1 IMUL EAX,EDX MOV EDX,dword ptr [RBP + -0x4]...
/* func0(int) */ int func0(int param_1) { int4 local_10; int4 local_c; local_10 = 0; for (local_c = 0; local_c < param_1; local_c = local_c + 1) { local_10 = local_10 + (local_c * 2 + 1) * (local_c * 2 + 1) * (local_c * 2 + 1); } return local_10; }
3,345
func0
#include <assert.h>
int func0(int n) { int sum = 0; for (int i = 0; i < n; i++) { sum += (2*i+1)*(2*i+1)*(2*i+1); } return sum; }
int main() { assert(func0(2) == 28); assert(func0(3) == 153); assert(func0(4) == 496); return 0; }
O1
cpp
func0(int): endbr64 test %edi,%edi jle 1173 <_Z5func0i+0x2a> lea 0x1(%rdi,%rdi,1),%esi mov $0x1,%eax mov $0x0,%ecx mov %eax,%edx imul %eax,%edx imul %eax,%edx add %edx,%ecx add $0x2,%eax cmp %esi,%eax jne 115f <_Z5func0i+0x16> mov %ecx,%eax retq mov $0x0,%ecx jmp 1170 <_Z5func0...
_Z5func0i: endbr64 test edi, edi jle short loc_1173 lea esi, [rdi+rdi+1] mov eax, 1 mov ecx, 0 loc_115F: mov edx, eax imul edx, eax imul edx, eax add ecx, edx add eax, 2 cmp eax, esi jnz short loc_115F loc_1170: mov eax, ecx retn loc_1173: mov ecx, 0 jmp short lo...
long long func0(int a1) { int v1; // eax unsigned int v2; // ecx if ( a1 <= 0 ) { return 0; } else { v1 = 1; v2 = 0; do { v2 += v1 * v1 * v1; v1 += 2; } while ( v1 != 2 * a1 + 1 ); } return v2; }
func0: ENDBR64 TEST EDI,EDI JLE 0x00101173 LEA ESI,[RDI + RDI*0x1 + 0x1] MOV EAX,0x1 MOV ECX,0x0 LAB_0010115f: MOV EDX,EAX IMUL EDX,EAX IMUL EDX,EAX ADD ECX,EDX ADD EAX,0x2 CMP EAX,ESI JNZ 0x0010115f LAB_00101170: MOV EAX,ECX RET LAB_00101173: MOV ECX,0x0 JMP 0x00101170
/* func0(int) */ int func0(int param_1) { int iVar1; int iVar2; if (param_1 < 1) { iVar2 = 0; } else { iVar1 = 1; iVar2 = 0; do { iVar2 = iVar2 + iVar1 * iVar1 * iVar1; iVar1 = iVar1 + 2; } while (iVar1 != param_1 * 2 + 1); } return iVar2; }
3,346
func0
#include <assert.h>
int func0(int n) { int sum = 0; for (int i = 0; i < n; i++) { sum += (2*i+1)*(2*i+1)*(2*i+1); } return sum; }
int main() { assert(func0(2) == 28); assert(func0(3) == 153); assert(func0(4) == 496); return 0; }
O2
cpp
func0(int): endbr64 test %edi,%edi jle 1170 <_Z5func0i+0x30> lea 0x1(%rdi,%rdi,1),%ecx mov $0x1,%eax xor %r8d,%r8d nopl 0x0(%rax) mov %eax,%edx imul %eax,%edx imul %eax,%edx add $0x2,%eax add %edx,%r8d cmp %ecx,%eax jne 1158 <_Z5func0i+0x18> mov %r8d,%eax retq xchg %ax,%ax xor ...
_Z5func0i: endbr64 test edi, edi jle short loc_1170 lea esi, [rdi+rdi+1] mov eax, 1 xor ecx, ecx nop dword ptr [rax+rax+00h] loc_1158: mov edx, eax imul edx, eax imul edx, eax add eax, 2 add ecx, edx cmp eax, esi jnz short loc_1158 mov eax, ecx retn loc_1170: xor ...
long long func0(int a1) { int v1; // eax unsigned int v2; // ecx int v3; // edx if ( a1 <= 0 ) return 0LL; v1 = 1; v2 = 0; do { v3 = v1 * v1 * v1; v1 += 2; v2 += v3; } while ( v1 != 2 * a1 + 1 ); return v2; }
func0: ENDBR64 TEST EDI,EDI JLE 0x00101170 LEA ESI,[RDI + RDI*0x1 + 0x1] MOV EAX,0x1 XOR ECX,ECX NOP dword ptr [RAX + RAX*0x1] LAB_00101158: MOV EDX,EAX IMUL EDX,EAX IMUL EDX,EAX ADD EAX,0x2 ADD ECX,EDX CMP EAX,ESI JNZ 0x00101158 MOV EAX,ECX RET LAB_00101170: XOR ECX,ECX MOV EAX,ECX RET
/* func0(int) */ int func0(int param_1) { int iVar1; int iVar2; int iVar3; if (0 < param_1) { iVar1 = 1; iVar2 = 0; do { iVar3 = iVar1 * iVar1 * iVar1; iVar1 = iVar1 + 2; iVar2 = iVar2 + iVar3; } while (iVar1 != param_1 * 2 + 1); return iVar2; } return 0; }
3,347
func0
#include <assert.h>
int func0(int n) { int sum = 0; for (int i = 0; i < n; i++) { sum += (2*i+1)*(2*i+1)*(2*i+1); } return sum; }
int main() { assert(func0(2) == 28); assert(func0(3) == 153); assert(func0(4) == 496); return 0; }
O3
cpp
func0(int): endbr64 test %edi,%edi jle 1230 <_Z5func0i+0xf0> lea -0x1(%rdi),%eax cmp $0x15,%eax jbe 1237 <_Z5func0i+0xf7> mov %edi,%edx movdqa 0xeae(%rip),%xmm4 xor %eax,%eax pxor %xmm3,%xmm3 movdqa 0xeb0(%rip),%xmm6 movdqa 0xeb8(%rip),%xmm5 shr $0x2,%edx nopl 0x0(%rax,%rax,1) movdqa %xmm4,%x...
_Z5func0i: endbr64 mov edx, edi test edi, edi jle loc_1378 lea eax, [rdi-1] cmp eax, 0Dh jbe loc_1381 mov ecx, edi movdqa xmm3, cs:xmmword_2010 xor eax, eax pxor xmm2, xmm2 movdqa xmm5, cs:xmmword_2020 movdqa xmm4, cs:xmmword_2030 shr ecx, 2 nop dword ptr [rax] loc_1180: mov...
long long func0(int a1) { __m128i si128; // xmm3 int v2; // eax __m128i v3; // xmm2 __m128i v4; // xmm5 __m128i v5; // xmm4 __m128i v6; // xmm0 __m128i v7; // xmm0 __m128i v8; // xmm6 __m128i v9; // xmm1 unsigned int v10; // ecx __m128i v11; // xmm2 long long result; // rax int v13; // esi ...
func0: ENDBR64 MOV EDX,EDI TEST EDI,EDI JLE 0x00101378 LEA EAX,[RDI + -0x1] CMP EAX,0xd JBE 0x00101381 MOV ECX,EDI MOVDQA XMM3,xmmword ptr [0x00102010] XOR EAX,EAX PXOR XMM2,XMM2 MOVDQA XMM5,xmmword ptr [0x00102020] MOVDQA XMM4,xmmword ptr [0x00102030] SHR ECX,0x2 NOP dword ptr [RAX] LAB_00101180: MOVDQA XMM0,XMM3 ADD ...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(int) */ int func0(int param_1) { uint uVar1; int iVar2; int iVar3; int auVar4 [16]; long lVar6; int auVar5 [16]; int iVar7; int iVar8; int iVar9; int iVar10; int iVar11; int iVar12; ulong uVar13; ...
3,348
func0
#include <iostream> #include <string> #include <cassert>
int func0(std::string s1, std::string s2) { int c0 = 0, c1 = 0; for (int i = 0; i < s1.length(); ++i) { if (s1[i] == '0' && s2[i] == '1') { c0++; } else if (s1[i] == '1' && s2[i] == '0') { c1++; } } int result = c0 / 2 + c1 / 2; if...
int main() { assert(func0("0011","1111") == 1); assert(func0("00011","01001") == 2); assert(func0("111","111") == 0); return 0; }
O0
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x28,%rsp mov %rdi,-0x28(%rbp) mov %rsi,-0x30(%rbp) movl $0x0,-0x20(%rbp) movl $0x0,...
_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 28h mov [rbp+var_28], rdi mov [rbp+var_30], rsi mov [rbp+var_20], 0 mov [rbp+var_1C], 0 mov [rbp+var_18], 0 jmp loc_1416 loc_1378: mov eax, [rbp+var_18] movsxd rdx,...
long long func0(long long a1, long long a2) { int v5; // [rsp+10h] [rbp-20h] int v6; // [rsp+14h] [rbp-1Ch] int i; // [rsp+18h] [rbp-18h] unsigned int v8; // [rsp+1Ch] [rbp-14h] v5 = 0; v6 = 0; for ( i = 0; i < (unsigned long long)std::string::length(a1); ++i ) { if ( *(_BYTE *)std::string::operat...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x28 MOV qword ptr [RBP + -0x28],RDI MOV qword ptr [RBP + -0x30],RSI MOV dword ptr [RBP + -0x20],0x0 MOV dword ptr [RBP + -0x1c],0x0 MOV dword ptr [RBP + -0x18],0x0 JMP 0x00101416 LAB_00101378: MOV EAX,dword ptr [RBP + -0x18] MOVSXD RDX,EAX MOV RAX,qword ptr [RBP + -...
/* func0(std::string, std::string) */ int func0(ulong param_1,ulong param_2) { bool bVar1; int iVar2; char *pcVar3; ulong uVar4; uint local_28; uint local_24; int local_20; local_28 = 0; local_24 = 0; for (local_20 = 0; uVar4 = std::string::length(), (ulong)(long)local_20 < uVar4; local_2...
3,349
func0
#include <iostream> #include <string> #include <cassert>
int func0(std::string s1, std::string s2) { int c0 = 0, c1 = 0; for (int i = 0; i < s1.length(); ++i) { if (s1[i] == '0' && s2[i] == '1') { c0++; } else if (s1[i] == '1' && s2[i] == '0') { c1++; } } int result = c0 / 2 + c1 / 2; if...
int main() { assert(func0("0011","1111") == 1); assert(func0("00011","01001") == 2); assert(func0("111","111") == 0); return 0; }
O1
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): endbr64 mov 0x8(%rdi),%r8 test %r8,%r8 je 12cc <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_+0x83> mov (%rdi),%r9 mov ...
_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_: endbr64 mov rcx, [rdi+8] test rcx, rcx jz short loc_12B1 mov rdi, [rdi] mov eax, 0 mov r9d, 0 mov r8d, 0 jmp short loc_125E loc_124C: mov rdx, [rsi] cmp byte ptr [rdx+rax], 31h ; '1' jz short loc_127B loc_1255:...
long long func0(long long *a1, _QWORD *a2) { long long v2; // rcx long long v3; // rdi long long v4; // rax int v5; // r9d int v6; // r8d char v7; // dl long long result; // rax v2 = a1[1]; if ( !v2 ) return 0LL; v3 = *a1; v4 = 0LL; v5 = 0; v6 = 0; do { v7 = *(_BYTE *)(v3 + v4); ...
func0: ENDBR64 MOV RCX,qword ptr [RDI + 0x8] TEST RCX,RCX JZ 0x001012b1 MOV RDI,qword ptr [RDI] MOV EAX,0x0 MOV R9D,0x0 MOV R8D,0x0 JMP 0x0010125e LAB_0010124c: MOV RDX,qword ptr [RSI] CMP byte ptr [RDX + RAX*0x1],0x31 JZ 0x0010127b LAB_00101255: ADD RAX,0x1 CMP RAX,RCX JZ 0x00101281 LAB_0010125e: MOVZX EDX,byte ptr [R...
/* func0(std::string, std::string) */ int func0(long *param_1,long *param_2) { int iVar1; long lVar2; uint uVar3; uint uVar4; if (param_1[1] == 0) { return 0; } lVar2 = 0; uVar4 = 0; uVar3 = 0; do { if (*(char *)(*param_1 + lVar2) == '0') { if (*(char *)(*param_2 + lVar2) == '1') ...
3,350
func0
#include <iostream> #include <string> #include <cassert>
int func0(std::string s1, std::string s2) { int c0 = 0, c1 = 0; for (int i = 0; i < s1.length(); ++i) { if (s1[i] == '0' && s2[i] == '1') { c0++; } else if (s1[i] == '1' && s2[i] == '0') { c1++; } } int result = c0 / 2 + c1 / 2; if...
int main() { assert(func0("0011","1111") == 1); assert(func0("00011","01001") == 2); assert(func0("111","111") == 0); return 0; }
O2
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): endbr64 mov 0x8(%rdi),%r8 test %r8,%r8 je 1560 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_+0x90> mov (%rdi),%rdi xor ...
_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_: endbr64 mov rcx, [rdi+8] test rcx, rcx jz loc_14B0 mov rdi, [rdi] xor eax, eax xor r9d, r9d xor r8d, r8d jmp short loc_1451 loc_1430: cmp dl, 31h ; '1' jnz short loc_1448 mov rdx, [rsi] cmp byte ptr [rdx+rax...
long long func0(long long *a1, _QWORD *a2) { long long v2; // rcx long long v3; // rdi long long v4; // rax int v5; // r9d int v6; // r8d char v7; // dl long long result; // rax v2 = a1[1]; if ( !v2 ) return 0LL; v3 = *a1; v4 = 0LL; v5 = 0; v6 = 0; do { while ( 1 ) { v7...
func0: ENDBR64 MOV RCX,qword ptr [RDI + 0x8] TEST RCX,RCX JZ 0x001014b0 MOV RDI,qword ptr [RDI] XOR EAX,EAX XOR R9D,R9D XOR R8D,R8D JMP 0x00101451 LAB_00101430: CMP DL,0x31 JNZ 0x00101448 MOV RDX,qword ptr [RSI] CMP byte ptr [RDX + RAX*0x1],0x30 JNZ 0x00101448 ADD R9D,0x1 NOP word ptr [RAX + RAX*0x1] LAB_00101448: ADD ...
/* func0(std::string, std::string) */ int func0(long *param_1,long *param_2) { int iVar1; long lVar2; uint uVar3; uint uVar4; if (param_1[1] == 0) { return 0; } lVar2 = 0; uVar4 = 0; uVar3 = 0; do { if (*(char *)(*param_1 + lVar2) == '0') { if (*(char *)(*param_2 + lVar2) == '1') ...
3,351
func0
#include <iostream> #include <string> #include <cassert>
int func0(std::string s1, std::string s2) { int c0 = 0, c1 = 0; for (int i = 0; i < s1.length(); ++i) { if (s1[i] == '0' && s2[i] == '1') { c0++; } else if (s1[i] == '1' && s2[i] == '0') { c1++; } } int result = c0 / 2 + c1 / 2; if...
int main() { assert(func0("0011","1111") == 1); assert(func0("00011","01001") == 2); assert(func0("111","111") == 0); return 0; }
O3
cpp
func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): endbr64 mov 0x8(%rdi),%r8 test %r8,%r8 je 15f0 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_+0x90> mov (%rdi),%rdi xor ...
_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_: endbr64 mov rcx, [rdi+8] test rcx, rcx jz loc_1560 mov rdi, [rdi] xor eax, eax xor r9d, r9d xor r8d, r8d jmp short loc_1501 loc_14E0: cmp dl, 31h ; '1' jnz short loc_14F8 mov rdx, [rsi] cmp byte ptr [rdx+rax...
long long func0(long long *a1, _QWORD *a2) { long long v2; // rcx long long v3; // rdi long long v4; // rax int v5; // r9d int v6; // r8d char v7; // dl long long result; // rax v2 = a1[1]; if ( !v2 ) return 0LL; v3 = *a1; v4 = 0LL; v5 = 0; v6 = 0; do { while ( 1 ) { v7...
func0: ENDBR64 MOV RCX,qword ptr [RDI + 0x8] TEST RCX,RCX JZ 0x00101560 MOV RDI,qword ptr [RDI] XOR EAX,EAX XOR R9D,R9D XOR R8D,R8D JMP 0x00101501 LAB_001014e0: CMP DL,0x31 JNZ 0x001014f8 MOV RDX,qword ptr [RSI] CMP byte ptr [RDX + RAX*0x1],0x30 JNZ 0x001014f8 ADD R9D,0x1 NOP word ptr [RAX + RAX*0x1] LAB_001014f8: ADD ...
/* func0(std::string, std::string) */ int func0(long *param_1,long *param_2) { int iVar1; long lVar2; uint uVar3; uint uVar4; if (param_1[1] == 0) { return 0; } lVar2 = 0; uVar4 = 0; uVar3 = 0; do { if (*(char *)(*param_1 + lVar2) == '0') { if (*(char *)(*param_2 + lVar2) == '1') ...
3,352
func0
#include <vector> #include <tuple> #include <string> #include <assert.h>
std::vector<std::tuple<std::string, int>> func0(std::vector<std::tuple<std::string, int>> tup) { int n = tup.size(); for (int i = 0; i < n; i++) { for (int j = 0; j < n - i - 1; j++) { if (std::get<0>(tup[j]) > std::get<0>(tup[j + 1])) { auto temp = tup[j]; ...
int main() { assert((func0({{"Amana", 28}, {"Zenat", 30}, {"Abhishek", 29}, {"Nikhil", 21}, {"B", 'C'}}) == std::vector<std::tuple<std::string, int>>{{"Abhishek", 29}, {"Amana", 28}, {"B", 'C'}, {"Nikhil", 21}, {"Zenat", 30}})); assert((func0({{"aaaa", 28}, {"aa", 30}, {"bab", 29}, {"bb", 21}, {"csa", 'C'}}) ...
O0
cpp
func0(std::vector<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int>, std::allocator<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > >): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x58,%rsp mov %rdi,-0x58(%...
_Z5func0St6vectorISt5tupleIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEESaIS7_EE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 58h mov [rbp+var_58], rdi mov [rbp+var_60], rsi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax mov rax, [rbp+var_60] mov rdi, rax cal...
long long func0(long long a1, long long a2) { long long v2; // rax long long v3; // rbx long long v4; // rax long long v5; // rax long long v6; // rax long long v7; // rbx long long v8; // rax long long v9; // rax int i; // [rsp+14h] [rbp-4Ch] int j; // [rsp+18h] [rbp-48h] int v13; // [rsp+1Ch] [...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x58 MOV qword ptr [RBP + -0x58],RDI MOV qword ptr [RBP + -0x60],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX MOV RAX,qword ptr [RBP + -0x60] MOV RDI,RAX CALL 0x001044e6 MOV dword ptr [RBP + -0x44],EAX MOV dword ptr [RBP + -0x4c],0x0 JM...
/* func0(std::vector<std::tuple<std::string, int>, std::allocator<std::tuple<std::string, int> > >) */ vector<std::tuple<std::string,int>,std::allocator<std::tuple<std::string,int>>> * func0(vector param_1) { bool bVar1; int iVar2; tuple *ptVar3; type *ptVar4; type *ptVar5; tuple<std::string,int> *ptV...
3,353
func0
#include <vector> #include <tuple> #include <string> #include <assert.h>
std::vector<std::tuple<std::string, int>> func0(std::vector<std::tuple<std::string, int>> tup) { int n = tup.size(); for (int i = 0; i < n; i++) { for (int j = 0; j < n - i - 1; j++) { if (std::get<0>(tup[j]) > std::get<0>(tup[j + 1])) { auto temp = tup[j]; ...
int main() { assert((func0({{"Amana", 28}, {"Zenat", 30}, {"Abhishek", 29}, {"Nikhil", 21}, {"B", 'C'}}) == std::vector<std::tuple<std::string, int>>{{"Abhishek", 29}, {"Amana", 28}, {"B", 'C'}, {"Nikhil", 21}, {"Zenat", 30}})); assert((func0({{"aaaa", 28}, {"aa", 30}, {"bab", 29}, {"bb", 21}, {"csa", 'C'}}) ...
O1
cpp
func0(std::vector<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int>, std::allocator<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > >): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub ...
_Z5func0St6vectorISt5tupleIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEESaIS7_EE: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 68h mov [rsp+98h+var_70], rdi mov r15, rsi mov rax, fs:28h mov [rsp+98h+var_40], rax xor eax, eax mov rax, [rs...
_QWORD * func0(_QWORD *a1, _QWORD *a2) { signed long long v2; // rax long long v3; // rbp long long v4; // rax long long v5; // rbx size_t v6; // r12 size_t v7; // r13 size_t v8; // rdx _DWORD *v9; // rbx _DWORD *v10; // r12 _DWORD *v11; // rbx int i; // [rsp+24h] [rbp-74h] int v14; // [rsp+30h]...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x68 MOV qword ptr [RSP + 0x28],RDI MOV R15,RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x58],RAX XOR EAX,EAX MOV RAX,qword ptr [RSI + 0x8] SUB RAX,qword ptr [RSI] SAR RAX,0x3 MOV RDX,-0x3333333333333333 IMUL RAX,RDX TEST EAX,EAX JLE ...
/* func0(std::vector<std::tuple<std::string, int>, std::allocator<std::tuple<std::string, int> > >) */ long * func0(vector param_1) { long lVar1; int4 uVar2; ulong uVar3; ulong uVar4; uint uVar5; ulong uVar6; int4 *puVar7; long lVar8; long *in_RSI; int4 in_register_0000003c; long *plVar9; ...
3,354
func0
#include <vector> #include <tuple> #include <string> #include <assert.h>
std::vector<std::tuple<std::string, int>> func0(std::vector<std::tuple<std::string, int>> tup) { int n = tup.size(); for (int i = 0; i < n; i++) { for (int j = 0; j < n - i - 1; j++) { if (std::get<0>(tup[j]) > std::get<0>(tup[j + 1])) { auto temp = tup[j]; ...
int main() { assert((func0({{"Amana", 28}, {"Zenat", 30}, {"Abhishek", 29}, {"Nikhil", 21}, {"B", 'C'}}) == std::vector<std::tuple<std::string, int>>{{"Abhishek", 29}, {"Amana", 28}, {"B", 'C'}, {"Nikhil", 21}, {"Zenat", 30}})); assert((func0({{"aaaa", 28}, {"aa", 30}, {"bab", 29}, {"bb", 21}, {"csa", 'C'}}) ...
O2
cpp
func0(std::vector<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int>, std::allocator<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > >): endbr64 movabs $0xcccccccccccccccd,%rcx push %r15 push %r14 push %r13 push %r1...
_Z5func0St6vectorISt5tupleIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEESaIS7_EE: endbr64 mov rdx, 0CCCCCCCCCCCCCCCDh push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 78h movdqu xmm0, xmmword ptr [rsi] mov [rsp+0A8h+var_80], rdi lea rcx, [rsp+0A8h+var_50] mov ...
__m128 * func0(__m128 *a1, long long a2, double a3, __m128 a4) { __m128 v4; // xmm0 unsigned long long v5; // r14 long long v6; // rbx unsigned long long v7; // r13 size_t v8; // r15 char *v9; // rbp size_t v10; // rdx signed long long v11; // rax int v12; // eax _BYTE *v13; // r13 _QWORD *v14; //...
func0: ENDBR64 MOV RDX,-0x3333333333333333 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x78 MOVDQU XMM0,xmmword ptr [RSI] MOV qword ptr [RSP + 0x28],RDI LEA RCX,[RSP + 0x58] MOV qword ptr [RSP + 0x10],RSI MOVHLPS XMM1,XMM0 MOVQ R14,XMM0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x68],RAX XOR EA...
/* func0(std::vector<std::tuple<std::string, int>, std::allocator<std::tuple<std::string, int> > >) */ long * func0(vector param_1) { ulong uVar1; ulong __n; int *__src; int iVar2; uint uVar3; ulong uVar4; long lVar5; int4 *puVar6; int (*in_RSI) [16]; int4 in_register_0000003c; long *plVar7;...
3,355
func0
#include <vector> #include <tuple> #include <string> #include <assert.h>
std::vector<std::tuple<std::string, int>> func0(std::vector<std::tuple<std::string, int>> tup) { int n = tup.size(); for (int i = 0; i < n; i++) { for (int j = 0; j < n - i - 1; j++) { if (std::get<0>(tup[j]) > std::get<0>(tup[j + 1])) { auto temp = tup[j]; ...
int main() { assert((func0({{"Amana", 28}, {"Zenat", 30}, {"Abhishek", 29}, {"Nikhil", 21}, {"B", 'C'}}) == std::vector<std::tuple<std::string, int>>{{"Abhishek", 29}, {"Amana", 28}, {"B", 'C'}, {"Nikhil", 21}, {"Zenat", 30}})); assert((func0({{"aaaa", 28}, {"aa", 30}, {"bab", 29}, {"bb", 21}, {"csa", 'C'}}) ...
O3
cpp
func0(std::vector<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int>, std::allocator<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > >): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub ...
_Z5func0St6vectorISt5tupleIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEESaIS7_EE: endbr64 mov rdx, 0CCCCCCCCCCCCCCCDh push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 78h movdqu xmm0, xmmword ptr [rsi] mov [rsp+0A8h+var_80], rdi lea rcx, [rsp+0A8h+var_50] mov ...
__m128 * func0(__m128 *a1, long long a2, double a3, __m128 a4) { __m128 v4; // xmm0 unsigned long long v5; // r14 long long v6; // rcx long long v7; // rbx unsigned long long v8; // r13 size_t v9; // r15 char *v10; // rbp size_t v11; // rdx signed long long v12; // rax int v13; // eax _BYTE *v14; ...
func0: ENDBR64 MOV RDX,-0x3333333333333333 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x78 MOVDQU XMM0,xmmword ptr [RSI] MOV qword ptr [RSP + 0x28],RDI LEA RCX,[RSP + 0x58] MOV qword ptr [RSP + 0x10],RSI MOVHLPS XMM1,XMM0 MOVQ R14,XMM0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x68],RAX XOR EA...
/* func0(std::vector<std::tuple<std::string, int>, std::allocator<std::tuple<std::string, int> > >) */ long * func0(vector param_1) { ulong uVar1; ulong __n; int *__src; int iVar2; uint uVar3; ulong uVar4; long lVar5; int4 *puVar6; int (*in_RSI) [16]; int4 in_register_0000003c; long *plVar7;...
3,356
func0
#include <iostream> #include <assert.h>
std::string func0(int a, int b, int c) { if (b == 0) { return "Yes"; } else { return "No"; } }
int main() { assert(func0(2, 0, -1) == "Yes"); assert(func0(1, -5, 6) == "No"); assert(func0(2, 0, 2) == "Yes"); return 0; }
O0
cpp
func0[abi:cxx11](int, int, int): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x38,%rsp mov %rdi,-0x28(%rbp) mov %esi,-0x2c(%rbp) mov %edx,-0x30(%rbp) mov %ecx,-0x34(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax cmpl $0x0,-0x30(%rbp) jne 1469 <_Z5func0B5cxx11iii+0x60> ...
_Z5func0B5cxx11iii: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 48h mov [rbp+var_38], rdi mov [rbp+var_3C], esi mov [rbp+var_40], edx mov [rbp+var_44], ecx mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax cmp [rbp+var_40], 0 jnz short loc_13CA lea rax, [rbp+va...
long long func0[abi:cxx11](long long a1, long long a2, int a3) { char v4; // [rsp+27h] [rbp-29h] BYREF char *v5; // [rsp+28h] [rbp-28h] char *v6; // [rsp+30h] [rbp-20h] unsigned long long v7; // [rsp+38h] [rbp-18h] v7 = __readfsqword(0x28u); if ( a3 ) { v6 = &v4; std::string::basic_string<std::a...
func0[abi:cxx11]: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x48 MOV qword ptr [RBP + -0x38],RDI MOV dword ptr [RBP + -0x3c],ESI MOV dword ptr [RBP + -0x40],EDX MOV dword ptr [RBP + -0x44],ECX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX CMP dword ptr [RBP + -0x40],0x0 JNZ 0x001013ca LEA ...
/* func0[abi:cxx11](int, int, int) */ string * func0_abi_cxx11_(int param_1,int param_2,int param_3) { int4 in_register_0000003c; string *this; long in_FS_OFFSET; allocator local_31; allocator *local_30; allocator *local_28; long local_20; this = (string *)CONCAT44(in_register_0000003c,param_1); ...
3,357
func0
#include <iostream> #include <assert.h>
std::string func0(int a, int b, int c) { if (b == 0) { return "Yes"; } else { return "No"; } }
int main() { assert(func0(2, 0, -1) == "Yes"); assert(func0(1, -5, 6) == "No"); assert(func0(2, 0, 2) == "Yes"); return 0; }
O1
cpp
func0[abi:cxx11](int, int, int): endbr64 push %rbx mov %rdi,%rbx test %edx,%edx jne 1271 <_Z5func0B5cxx11iii+0x28> lea 0x10(%rdi),%rax mov %rax,(%rdi) lea 0xdd2(%rip),%rdx lea -0x3(%rdx),%rsi callq 141c <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_it...
_Z5func0B5cxx11iii: endbr64 push rbx mov rbx, rdi test edx, edx jnz short loc_1231 lea rax, [rdi+10h] mov [rdi], rax lea rdx, unk_2007 lea rsi, [rdx-3] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct...
_QWORD * func0[abi:cxx11](_QWORD *a1, long long a2, int a3) { *a1 = a1 + 2; if ( a3 ) std::string::_M_construct<char const*>(a1, (char *)&unk_200A - 2); else std::string::_M_construct<char const*>(a1, (char *)&unk_2007 - 3); return a1; }
func0[abi:cxx11]: ENDBR64 PUSH RBX MOV RBX,RDI TEST EDX,EDX JNZ 0x00101231 LEA RAX,[RDI + 0x10] MOV qword ptr [RDI],RAX LEA RDX,[0x102007] LEA RSI,[RDX + -0x3] CALL 0x001013d0 LAB_0010122c: MOV RAX,RBX POP RBX RET LAB_00101231: LEA RAX,[RDI + 0x10] MOV qword ptr [RDI],RAX LEA RDX,[0x10200a] LEA RSI,[RDX + -0x2] CALL 0x...
/* func0[abi:cxx11](int, int, int) */ int8 func0_abi_cxx11_(int param_1,int param_2,int param_3) { int4 in_register_0000003c; if (param_3 == 0) { *(long *)CONCAT44(in_register_0000003c,param_1) = CONCAT44(in_register_0000003c,param_1) + 0x10; std::string::_M_construct<char_const*> ((char ...
3,358
func0
#include <iostream> #include <assert.h>
std::string func0(int a, int b, int c) { if (b == 0) { return "Yes"; } else { return "No"; } }
int main() { assert(func0(2, 0, -1) == "Yes"); assert(func0(1, -5, 6) == "No"); assert(func0(2, 0, 2) == "Yes"); return 0; }
O2
cpp
func0[abi:cxx11](int, int, int): endbr64 mov %edx,%r8d lea 0x10(%rdi),%rdx mov %rdi,%rax mov %rdx,(%rdi) test %r8d,%r8d jne 1430 <_Z5func0B5cxx11iii+0x30> mov $0x6559,%ecx mov %cx,0x10(%rdi) movb $0x73,0x2(%rdx) movq $0x3,0x8(%rdi) movb $0x0,0x13(%rdi) retq mov $0x6f4e,%edx movq $0x2,0...
_Z5func0B5cxx11iii: endbr64 lea rax, [rdi+10h] push rbx mov rbx, rdi mov [rdi], rax test edx, edx jnz short loc_1440 lea rdx, unk_2007 lea rsi, [rdx-3] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0; std::string::_M_co...
_QWORD * func0[abi:cxx11](_QWORD *a1, long long a2, int a3) { *a1 = a1 + 2; if ( a3 ) std::string::_M_construct<char const*>(a1, (char *)&unk_200A - 2); else std::string::_M_construct<char const*>(a1, (char *)&unk_2007 - 3); return a1; }
func0[abi:cxx11]: ENDBR64 LEA RAX,[RDI + 0x10] PUSH RBX MOV RBX,RDI MOV qword ptr [RDI],RAX TEST EDX,EDX JNZ 0x00101440 LEA RDX,[0x102007] LEA RSI,[RDX + -0x3] CALL 0x00101360 MOV RAX,RBX POP RBX RET LAB_00101440: LEA RDX,[0x10200a] LEA RSI,[RDX + -0x2] CALL 0x00101360 MOV RAX,RBX POP RBX RET
/* func0[abi:cxx11](int, int, int) */ int8 func0_abi_cxx11_(int param_1,int param_2,int param_3) { int4 in_register_0000003c; *(long *)CONCAT44(in_register_0000003c,param_1) = CONCAT44(in_register_0000003c,param_1) + 0x10; if (param_3 == 0) { std::string::_M_construct<char_const*> ((char *)...
3,359
func0
#include <iostream> #include <assert.h>
std::string func0(int a, int b, int c) { if (b == 0) { return "Yes"; } else { return "No"; } }
int main() { assert(func0(2, 0, -1) == "Yes"); assert(func0(1, -5, 6) == "No"); assert(func0(2, 0, 2) == "Yes"); return 0; }
O3
cpp
func0[abi:cxx11](int, int, int): endbr64 mov %edx,%r8d lea 0x10(%rdi),%rdx mov %rdi,%rax mov %rdx,(%rdi) test %r8d,%r8d jne 13c0 <_Z5func0B5cxx11iii+0x30> mov $0x6559,%ecx mov %cx,0x10(%rdi) movb $0x73,0x2(%rdx) movq $0x3,0x8(%rdi) movb $0x0,0x13(%rdi) retq mov $0x6f4e,%edx movq $0x2,0...
_Z5func0B5cxx11iii: endbr64 test edx, edx lea rdx, [rdi+10h] mov rax, rdi mov [rdi], rdx jnz short loc_1350 mov ecx, 6559h mov byte ptr [rdi+12h], 73h ; 's' mov [rdi+10h], cx mov qword ptr [rdi+8], 3 mov byte ptr [rdi+13h], 0 retn loc_1350: mov edx, 6F4Eh mov qword ptr [rd...
long long func0[abi:cxx11](long long a1, long long a2, int a3) { long long result; // rax result = a1; *(_QWORD *)a1 = a1 + 16; if ( a3 ) { *(_QWORD *)(a1 + 8) = 2LL; strcpy((char *)(a1 + 16), "No"); } else { *(_BYTE *)(a1 + 18) = 115; *(_WORD *)(a1 + 16) = 25945; *(_QWORD *)(a1 + ...
func0[abi:cxx11]: ENDBR64 TEST EDX,EDX LEA RDX,[RDI + 0x10] MOV RAX,RDI MOV qword ptr [RDI],RDX JNZ 0x00101350 MOV ECX,0x6559 MOV byte ptr [RDI + 0x12],0x73 MOV word ptr [RDI + 0x10],CX MOV qword ptr [RDI + 0x8],0x3 MOV byte ptr [RDI + 0x13],0x0 RET LAB_00101350: MOV EDX,0x6f4e MOV qword ptr [RDI + 0x8],0x2 MOV word pt...
/* func0[abi:cxx11](int, int, int) */ int8 func0_abi_cxx11_(int param_1,int param_2,int param_3) { int4 in_register_0000003c; *(long *)CONCAT44(in_register_0000003c,param_1) = CONCAT44(in_register_0000003c,param_1) + 0x10; if (param_3 == 0) { *(int *)(CONCAT44(in_register_0000003c,param_1) + 0x12) = 0x73...
3,360
func0
#include <iostream> #include <assert.h>
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++; } } } return inv_count; }
int main() { int arr1[] = {1, 20, 6, 4, 5}; assert(func0(arr1, 5) == 5); int arr2[] = {8, 4, 2, 1}; assert(func0(arr2, 4) == 6); int arr3[] = {3, 1, 2}; assert(func0(arr3, 3) == 2); 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]) ...
3,361
func0
#include <iostream> #include <assert.h>
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++; } } } return inv_count; }
int main() { int arr1[] = {1, 20, 6, 4, 5}; assert(func0(arr1, 5) == 5); int arr2[] = {8, 4, 2, 1}; assert(func0(arr2, 4) == 6); int arr3[] = {3, 1, 2}; assert(func0(arr3, 3) == 2); 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 ...
3,362
func0
#include <iostream> #include <assert.h>
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++; } } } return inv_count; }
int main() { int arr1[] = {1, 20, 6, 4, 5}; assert(func0(arr1, 5) == 5); int arr2[] = {8, 4, 2, 1}; assert(func0(arr2, 4) == 6); int arr3[] = {3, 1, 2}; assert(func0(arr3, 3) == 2); return 0; }
O2
cpp
func0(int*, int): endbr64 test %esi,%esi jle 13fe <_Z5func0Pii+0x4e> lea -0x1(%rsi),%r9d mov $0x1,%ecx xor %r8d,%r8d add $0x1,%r9 cmp %r9,%rcx je 13fa <_Z5func0Pii+0x4a> nopl (%rax) mov -0x4(%rdi,%rcx,4),%edx mov %rcx,%rax nopw 0x0(%rax,%rax,1) cmp (%rdi,%rax,4),%edx jle 13e9 <_Z...
_Z5func0Pii: endbr64 test esi, esi jle short loc_12BC mov r9d, esi mov r8d, 1 xor ecx, ecx cmp esi, 1 jz short loc_12B9 nop dword ptr [rax+rax+00000000h] loc_1290: mov edx, [rdi+r8*4-4] mov rax, r8 nop dword ptr [rax+rax+00000000h] loc_12A0: cmp edx, [rdi+rax*4] jle s...
long long func0(int *a1, int a2) { long long v2; // r8 unsigned int v3; // ecx long long v4; // rax if ( a2 <= 0 ) return 0LL; v2 = 1LL; v3 = 0; if ( a2 != 1 ) { do { v4 = v2; do { if ( a1[v2 - 1] > a1[v4] ) ++v3; ++v4; } while ( a2 >...
func0: ENDBR64 TEST ESI,ESI JLE 0x001012bc MOV R9D,ESI MOV R8D,0x1 XOR ECX,ECX CMP ESI,0x1 JZ 0x001012b9 NOP dword ptr [RAX + RAX*0x1] LAB_00101290: MOV EDX,dword ptr [RDI + R8*0x4 + -0x4] MOV RAX,R8 NOP dword ptr [RAX + RAX*0x1] LAB_001012a0: CMP EDX,dword ptr [RDI + RAX*0x4] JLE 0x001012a8 ADD ECX,0x1 LAB_001012a8: A...
/* func0(int*, int) */ int func0(int *param_1,int param_2) { ulong uVar1; int iVar2; ulong uVar3; if (param_2 < 1) { return 0; } uVar3 = 1; iVar2 = 0; if (param_2 != 1) { do { uVar1 = uVar3; do { if (param_1[uVar1] < param_1[uVar3 - 1]) { iVar2 = iVar2 + 1; ...
3,363
func0
#include <iostream> #include <assert.h>
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++; } } } return inv_count; }
int main() { int arr1[] = {1, 20, 6, 4, 5}; assert(func0(arr1, 5) == 5); int arr2[] = {8, 4, 2, 1}; assert(func0(arr2, 4) == 6); int arr3[] = {3, 1, 2}; assert(func0(arr3, 3) == 2); return 0; }
O3
cpp
func0(int*, int): endbr64 test %esi,%esi jle 14bd <_Z5func0Pii+0x12d> cmp $0x1,%esi je 14bd <_Z5func0Pii+0x12d> push %rbp lea 0x4(%rdi),%r10 xor %r9d,%r9d mov $0x1,%ecx push %rbx lea -0x1(%rsi),%ebp mov $0x1,%ebx nopl 0x0(%rax,%rax,1) mov %esi,%r8d mov %ebp,%eax mov -0x4(%r10),...
_Z5func0Pii: endbr64 test esi, esi jle loc_1248 cmp esi, 1 jz loc_1248 push rbp mov r11, rdi lea r8, [rdi+4] xor r9d, r9d push rbx mov ecx, 1 lea ebp, [rsi-1] mov ebx, 1 xchg ax, ax loc_1170: mov edi, esi mov eax, ebp mov r10d, [r8-4] sub edi, ecx cmp ...
long long func0(int *a1, int a2) { int *v3; // r8 unsigned int v4; // r9d int v5; // ecx signed int v6; // r10d unsigned int v7; // edi __m128i v8; // xmm0 const __m128i *v9; // rax __m128i v10; // xmm2 __m128i v11; // xmm3 __m128i v12; // xmm0 int v13; // eax long long v14; // rdi if ( a2 >...
func0: ENDBR64 TEST ESI,ESI JLE 0x00101248 CMP ESI,0x1 JZ 0x00101248 PUSH RBP MOV R11,RDI LEA R8,[RDI + 0x4] XOR R9D,R9D PUSH RBX MOV ECX,0x1 LEA EBP,[RSI + -0x1] MOV EBX,0x1 NOP LAB_00101170: MOV EDI,ESI MOV EAX,EBP MOV R10D,dword ptr [R8 + -0x4] SUB EDI,ECX CMP ESI,ECX CMOVLE EDI,EBX SUB EAX,ECX CMP EAX,0x2 JBE 0x001...
/* func0(int*, int) */ int func0(int *param_1,int param_2) { int iVar1; uint uVar2; int iVar3; int *piVar4; int *piVar5; int *piVar6; int *piVar7; int iVar8; int *piVar9; int iVar10; int iVar11; int iVar12; int iVar13; int iVar14; if ((param_2 < 1) || (param_2 == 1)) { return 0; ...
3,364
func0
#include <iostream> #include <assert.h>
int func0(int arr[], int arr_size) { for (int i = 0; i < arr_size; i++) { int count = 0; for (int j = 0; j < arr_size; j++) { if (arr[i] == arr[j]) { count++; } } if (count % 2 != 0) { return arr[i]; } } ...
int main() { int arr1[] = {2, 3, 5, 4, 5, 2, 4, 3, 5, 2, 4, 4, 2}; int arr2[] = {1, 2, 3, 2, 3, 1, 3}; int arr3[] = {5, 7, 2, 7, 5, 2, 5}; assert(func0(arr1, 13) == 5); assert(func0(arr2, 7) == 3); assert(func0(arr3, 7) == 5); 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) mov -0xc(%rbp),%eax cmp -0x1c(%rbp),%eax jge 123f <_Z5func0Pii+0x96> movl $0x0,-0x8(%rbp) movl $0x0,-0x4(%rbp) mov -0x4(%rbp),%eax cmp -0x1c(%rbp),%eax jge 1217 <_Z5func0Pi...
_Z5func0Pii: endbr64 push rbp mov rbp, rsp mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_C], 0 jmp short loc_11F7 loc_1181: mov [rbp+var_8], 0 mov [rbp+var_4], 0 jmp short loc_11C9 loc_1191: mov eax, [rbp+var_C] cdqe lea rdx, ds:0[rax*4] mov rax, [rbp+var_18] ad...
long long func0(int *a1, int a2) { int i; // [rsp+10h] [rbp-Ch] char v4; // [rsp+14h] [rbp-8h] int j; // [rsp+18h] [rbp-4h] for ( i = 0; i < a2; ++i ) { v4 = 0; for ( j = 0; j < a2; ++j ) { if ( a1[i] == a1[j] ) ++v4; } if ( (v4 & 1) != 0 ) return (unsigned int)a1[i];...
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 JMP 0x001011f7 LAB_00101181: MOV dword ptr [RBP + -0x8],0x0 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001011c9 LAB_00101191: MOV EAX,dword ptr [RBP + -0xc] CDQE LEA RDX,[RAX*0x4] MOV RAX,qword p...
/* func0(int*, int) */ int func0(int *param_1,int param_2) { byte bVar1; int local_14; int local_c; local_14 = 0; while( true ) { if (param_2 <= local_14) { return -1; } bVar1 = 0; for (local_c = 0; local_c < param_2; local_c = local_c + 1) { if (param_1[local_14] == param_1[l...
3,365
func0
#include <iostream> #include <assert.h>
int func0(int arr[], int arr_size) { for (int i = 0; i < arr_size; i++) { int count = 0; for (int j = 0; j < arr_size; j++) { if (arr[i] == arr[j]) { count++; } } if (count % 2 != 0) { return arr[i]; } } ...
int main() { int arr1[] = {2, 3, 5, 4, 5, 2, 4, 3, 5, 2, 4, 4, 2}; int arr2[] = {1, 2, 3, 2, 3, 1, 3}; int arr3[] = {5, 7, 2, 7, 5, 2, 5}; assert(func0(arr1, 13) == 5); assert(func0(arr2, 7) == 3); assert(func0(arr3, 7) == 5); return 0; }
O1
cpp
func0(int*, int): endbr64 test %esi,%esi jle 120b <_Z5func0Pii+0x62> push %rbx lea -0x1(%rsi),%r11d mov %rdi,%rbx lea 0x4(%rdi,%r11,4),%r8 mov $0x0,%r9d jmp 11d7 <_Z5func0Pii+0x2e> test $0x1,%dl jne 11fb <_Z5func0Pii+0x52> lea 0x1(%r9),%rax cmp %r11,%r9 je 1204 <_Z5func0Pii+0x5b> mo...
_Z5func0Pii: endbr64 test esi, esi jle short loc_11B7 movsxd r10, esi lea r8, [rdi+r10*4] mov r9d, 0 jmp short loc_118E loc_1180: test dl, 1 jnz short loc_11AF add r9, 1 cmp r9, r10 jz short loc_11BD loc_118E: mov esi, [rdi+r9*4] mov rax, rdi mov edx, 0 loc_119A: cmp ...
long long func0(int *a1, int a2) { long long i; // r9 int *v3; // rax char v4; // dl if ( a2 <= 0 ) return 0xFFFFFFFFLL; for ( i = 0LL; i != a2; ++i ) { v3 = a1; v4 = 0; do v4 += a1[i] == *v3++; while ( v3 != &a1[a2] ); if ( (v4 & 1) != 0 ) return (unsigned int)a1[(int)...
func0: ENDBR64 TEST ESI,ESI JLE 0x001011b7 MOVSXD R10,ESI LEA R8,[RDI + R10*0x4] MOV R9D,0x0 JMP 0x0010118e LAB_00101180: TEST DL,0x1 JNZ 0x001011af ADD R9,0x1 CMP R9,R10 JZ 0x001011bd LAB_0010118e: MOV ESI,dword ptr [RDI + R9*0x4] MOV RAX,RDI MOV EDX,0x0 LAB_0010119a: CMP ESI,dword ptr [RAX] SETZ CL MOVZX ECX,CL ADD E...
/* func0(int*, int) */ int func0(int *param_1,int param_2) { int *piVar1; bool bVar2; long lVar3; if (param_2 < 1) { return -1; } lVar3 = 0; while( true ) { bVar2 = false; piVar1 = param_1; do { bVar2 = (bool)(bVar2 ^ param_1[lVar3] == *piVar1); piVar1 = piVar1 + 1; } ...
3,366
func0
#include <iostream> #include <assert.h>
int func0(int arr[], int arr_size) { for (int i = 0; i < arr_size; i++) { int count = 0; for (int j = 0; j < arr_size; j++) { if (arr[i] == arr[j]) { count++; } } if (count % 2 != 0) { return arr[i]; } } ...
int main() { int arr1[] = {2, 3, 5, 4, 5, 2, 4, 3, 5, 2, 4, 4, 2}; int arr2[] = {1, 2, 3, 2, 3, 1, 3}; int arr3[] = {5, 7, 2, 7, 5, 2, 5}; assert(func0(arr1, 13) == 5); assert(func0(arr2, 7) == 3); assert(func0(arr3, 7) == 5); return 0; }
O2
cpp
func0(int*, int): endbr64 test %esi,%esi jle 13c1 <_Z5func0Pii+0x41> lea -0x1(%rsi),%eax mov %rdi,%r9 lea 0x4(%rdi,%rax,4),%rsi nopl 0x0(%rax,%rax,1) mov (%r9),%r8d mov %rdi,%rax xor %edx,%edx xor %ecx,%ecx cmp (%rax),%r8d sete %cl add $0x4,%rax add %ecx,%edx cmp %rsi,%rax jne ...
_Z5func0Pii: endbr64 test esi, esi jle short loc_1300 movsxd rsi, esi mov r9, rdi lea r8, [rdi+rsi*4] nop word ptr [rax+rax+00h] loc_12D8: mov esi, [r9] mov rax, rdi xor edx, edx loc_12E0: xor ecx, ecx cmp esi, [rax] setz cl add rax, 4 add edx, ecx cmp rax, r8 jnz ...
long long func0(int *a1, int a2) { int *v2; // r9 int *v3; // r8 unsigned int v4; // esi int *v5; // rax char v6; // dl char v7; // cl if ( a2 <= 0 ) { return (unsigned int)-1; } else { v2 = a1; v3 = &a1[a2]; while ( 1 ) { v4 = *v2; v5 = a1; v6 = 0; do...
func0: ENDBR64 TEST ESI,ESI JLE 0x00101300 MOVSXD RSI,ESI MOV R9,RDI LEA R8,[RDI + RSI*0x4] NOP word ptr [RAX + RAX*0x1] LAB_001012d8: MOV ESI,dword ptr [R9] MOV RAX,RDI XOR EDX,EDX LAB_001012e0: XOR ECX,ECX CMP ESI,dword ptr [RAX] SETZ CL ADD RAX,0x4 ADD EDX,ECX CMP RAX,R8 JNZ 0x001012e0 AND EDX,0x1 JNZ 0x00101305 ADD...
/* func0(int*, int) */ int func0(int *param_1,int param_2) { int iVar1; int *piVar2; bool bVar3; int *piVar4; if (0 < param_2) { piVar4 = param_1; do { bVar3 = false; piVar2 = param_1; do { iVar1 = *piVar2; piVar2 = piVar2 + 1; bVar3 = (bool)(bVar3 ^ *piV...
3,367
func0
#include <iostream> #include <assert.h>
int func0(int arr[], int arr_size) { for (int i = 0; i < arr_size; i++) { int count = 0; for (int j = 0; j < arr_size; j++) { if (arr[i] == arr[j]) { count++; } } if (count % 2 != 0) { return arr[i]; } } ...
int main() { int arr1[] = {2, 3, 5, 4, 5, 2, 4, 3, 5, 2, 4, 4, 2}; int arr2[] = {1, 2, 3, 2, 3, 1, 3}; int arr3[] = {5, 7, 2, 7, 5, 2, 5}; assert(func0(arr1, 13) == 5); assert(func0(arr2, 7) == 3); assert(func0(arr3, 7) == 5); return 0; }
O3
cpp
func0(int*, int): endbr64 test %esi,%esi jle 1446 <_Z5func0Pii+0x106> mov %esi,%edx push %r12 lea -0x1(%rsi),%eax mov %rdi,%r9 shr $0x2,%edx push %rbp lea 0x4(%rdi,%rax,4),%r12 mov %rax,%rbp push %rbx shl $0x4,%rdx mov %esi,%ebx add %rdi,%rdx and $0xfffffffc,%ebx mov (%r9),%r...
_Z5func0Pii: endbr64 test esi, esi jle loc_13B6 mov edx, esi push r12 movsxd rax, esi mov r12d, esi shr edx, 2 push rbp mov r8, rdi mov r9d, esi shl rdx, 4 push rbx lea r11d, [rsi-1] lea rbx, [rdi+rax*4] add rdx, rdi and r12d, 0FFFFFFFCh nop dword ptr [rax+00...
long long func0(unsigned int *a1, int a2) { unsigned int *v2; // r8 unsigned int v4; // r11d int *v5; // rbx int *v6; // rdx unsigned int v7; // r12d unsigned int v8; // esi const __m128i *v9; // rax __m128i v10; // xmm0 __m128i v11; // xmm2 __m128i v12; // xmm1 signed int v13; // ecx __m128i v...
func0: ENDBR64 TEST ESI,ESI JLE 0x001013b6 MOV EDX,ESI PUSH R12 MOVSXD RAX,ESI MOV R12D,ESI SHR EDX,0x2 PUSH RBP MOV R8,RDI MOV R9D,ESI SHL RDX,0x4 PUSH RBX LEA R11D,[RSI + -0x1] LEA RBX,[RDI + RAX*0x4] ADD RDX,RDI AND R12D,0xfffffffc NOP dword ptr [RAX] LAB_001012f8: MOV ESI,dword ptr [RDI] CMP R11D,0x2 JBE 0x001013b0...
/* func0(int*, int) */ int func0(int *param_1,int param_2) { int iVar1; int iVar2; int *piVar3; int *piVar4; int *piVar5; bool bVar6; int *piVar7; uint uVar8; int *piVar9; byte bVar10; byte bVar11; byte bVar12; byte bVar13; if (param_2 < 1) { return -1; } piVar9 = param_1; do ...
3,368
func0
#include <iostream> #include <vector> #include <set> #include <cassert>
int func0(int n, std::vector<int> primes) { std::vector<int> uglies(1, 1); std::vector<int> idx(primes.size(), 0); std::set<std::pair<int, int>> heap; // Initial population of the heap using each prime with the first element in uglies. for (int i = 0; i < primes.size(); ++i) { heap.i...
int main() { assert(func0(12, {2, 7, 13, 19}) == 32); assert(func0(10, {2, 7, 13, 19}) == 26); assert(func0(100, {2, 7, 13, 19}) == 5408); return 0; }
O0
cpp
func0(int, std::vector<int, std::allocator<int> >): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0xb8,%rsp mov %edi,-0xb4(%rbp) mov %rsi,-0xc0(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax lea -0x70(%rbp),%rax mov %rax,%rdi callq 1ab4 <_ZNSaIiEC1Ev> movl $0x1,-0x50(%rbp)...
_Z5func0iSt6vectorIiSaIiEE: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 0C8h mov [rbp+var_C4], edi mov [rbp+var_D0], rsi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax lea rax, [rbp+var_70] mov [rbp+var_B0], rax nop nop mov [rbp+var_50], 1 lea rcx, [rbp+var_70] ...
long long func0(int a1, long long a2) { long long v2; // rax long long v3; // rax unsigned long long v4; // rbx long long v5; // rax _DWORD *v6; // rax _DWORD *v7; // rax int v8; // ebx unsigned int v9; // ebx long long v11; // [rsp+14h] [rbp-BCh] BYREF int v12; // [rsp+1Ch] [rbp-B4h] BYREF _BYTE...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0xc8 MOV dword ptr [RBP + -0xc4],EDI MOV qword ptr [RBP + -0xd0],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX XOR EAX,EAX LEA RAX,[RBP + -0x70] MOV qword ptr [RBP + -0xb0],RAX NOP NOP MOV dword ptr [RBP + -0x50],0x1 LEA RCX,[RBP + -0x70] LEA RDX,[R...
/* func0(int, std::vector<int, std::allocator<int> >) */ int4 func0(int param_1,vector param_2) { int iVar1; int4 uVar2; _Rb_tree_const_iterator _Var3; pair pVar4; ulong uVar5; int4 extraout_var; long *plVar6; int *piVar7; int4 extraout_var_00; int4 *puVar8; ulong uVar9; int4 in_register_00000...
3,369
func0
#include <iostream> #include <vector> #include <set> #include <cassert>
int func0(int n, std::vector<int> primes) { std::vector<int> uglies(1, 1); std::vector<int> idx(primes.size(), 0); std::set<std::pair<int, int>> heap; // Initial population of the heap using each prime with the first element in uglies. for (int i = 0; i < primes.size(); ++i) { heap.i...
int main() { assert(func0(12, {2, 7, 13, 19}) == 32); assert(func0(10, {2, 7, 13, 19}) == 26); assert(func0(100, {2, 7, 13, 19}) == 5408); return 0; }
O1
cpp
func0(int, std::vector<int, std::allocator<int> >): endbr64 push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx sub $0x78,%rsp mov %edi,%r12d mov %rsi,%rbx mov %fs:0x28,%rax mov %rax,0x68(%rsp) xor %eax,%eax movq $0x0,0x10(%rsp) movq $0x0,0x18(%rsp) movq $0x0,0x20(%rsp) mov ...
_Z5func0iSt6vectorIiSaIiEE: endbr64 push r15 push r14 push r13 push r12 push rbp push rbx sub rsp, 0A8h mov dword ptr [rsp+0D8h+var_D8], edi mov r12, rsi mov rax, fs:28h mov [rsp+0D8h+var_40], rax xor eax, eax mov edi, 4; unsigned __int64 call __Znwm; operator new(ulong)...
long long func0(int a1, long long *a2) { char *v2; // rbp char *v3; // rbx char *v4; // rax char *v5; // r14 char *v6; // rdx long long v7; // rdx unsigned long long v8; // r13 int v9; // ebp int v10; // r13d void *v11; // rax int *v12; // rcx int v13; // eax unsigned int v14; // ebx unsign...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0xa8 MOV dword ptr [RSP],EDI MOV R12,RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0x98],RAX XOR EAX,EAX MOV EDI,0x4 LAB_001012bc: CALL 0x00101140 MOV RBP,RAX MOV qword ptr [RSP + 0x20],RAX LEA RBX,[RAX + 0x4] MOV qword ptr [RSP + 0x30]...
/* func0(int, std::vector<int, std::allocator<int> >) */ int func0(int param_1,vector param_2) { int iVar1; int iVar2; int *piVar3; ulong uVar4; int8 uVar5; int4 *puVar6; void *pvVar7; long lVar8; int *piVar9; int4 in_register_00000034; long *plVar10; ulong uVar11; long in_FS_OFFSET; int l...
3,370
func0
#include <iostream> #include <vector> #include <set> #include <cassert>
int func0(int n, std::vector<int> primes) { std::vector<int> uglies(1, 1); std::vector<int> idx(primes.size(), 0); std::set<std::pair<int, int>> heap; // Initial population of the heap using each prime with the first element in uglies. for (int i = 0; i < primes.size(); ++i) { heap.i...
int main() { assert(func0(12, {2, 7, 13, 19}) == 32); assert(func0(10, {2, 7, 13, 19}) == 26); assert(func0(100, {2, 7, 13, 19}) == 5408); return 0; }
O2
cpp
func0(int, std::vector<int, std::allocator<int> >): endbr64 push %r15 push %r14 push %r13 push %r12 mov %rsi,%r12 push %rbp push %rbx sub $0x88,%rsp mov %edi,(%rsp) mov $0x4,%edi mov %fs:0x28,%rax mov %rax,0x78(%rsp) xor %eax,%eax callq 1180 <_Znwm@plt> mov 0x8(%r12),%rcx mov (%r...
_Z5func0iSt6vectorIiSaIiEE: endbr64 push r15 push r14 push r13 push r12 mov r12, rsi push rbp push rbx sub rsp, 0C8h mov [rsp+0F8h+var_CC], edi mov edi, 4; unsigned __int64 mov rax, fs:28h mov [rsp+0F8h+var_40], rax xor eax, eax call __Znwm; operator new(ulong) mov r...
long long func0(int a1, long long *a2) { char *v2; // rax long long v3; // rcx long long v4; // r14 char *v5; // rbx char *v6; // rbp size_t v7; // rdx char *v8; // rax char *v9; // r13 char *v10; // r15 unsigned long long v11; // r13 int *v12; // rcx int v13; // eax int v14; // ebp signed ...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 MOV R12,RSI PUSH RBP PUSH RBX SUB RSP,0xc8 MOV dword ptr [RSP + 0x2c],EDI MOV EDI,0x4 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0xb8],RAX XOR EAX,EAX LAB_001016b4: CALL 0x00101160 MOV RCX,qword ptr [R12 + 0x8] MOV R14,qword ptr [R12] LEA RBX,[RAX + 0x4] MOV qwor...
/* func0(int, std::vector<int, std::allocator<int> >) */ int func0(int param_1,vector param_2) { int iVar1; void *pvVar2; int iVar3; int4 *puVar4; ulong __n; void *__s; void *pvVar5; long lVar6; int *piVar7; int4 in_register_00000034; long *plVar8; ulong uVar9; long lVar10; long in_FS_OFFS...
3,371
func0
#include <iostream> #include <vector> #include <set> #include <cassert>
int func0(int n, std::vector<int> primes) { std::vector<int> uglies(1, 1); std::vector<int> idx(primes.size(), 0); std::set<std::pair<int, int>> heap; // Initial population of the heap using each prime with the first element in uglies. for (int i = 0; i < primes.size(); ++i) { heap.i...
int main() { assert(func0(12, {2, 7, 13, 19}) == 32); assert(func0(10, {2, 7, 13, 19}) == 26); assert(func0(100, {2, 7, 13, 19}) == 5408); return 0; }
O3
cpp
func0(int, std::vector<int, std::allocator<int> >): endbr64 push %r15 push %r14 push %r13 push %r12 mov %rsi,%r12 push %rbp push %rbx sub $0x88,%rsp mov %edi,(%rsp) mov $0x4,%edi mov %fs:0x28,%rax mov %rax,0x78(%rsp) xor %eax,%eax callq 11a0 <_Znwm@plt> mov 0x8(%r12),%r8 mov (%r1...
_Z5func0iSt6vectorIiSaIiEE: endbr64 push r15 push r14 push r13 push r12 push rbp mov rbp, rsi push rbx sub rsp, 0C8h mov [rsp+0F8h+var_CC], edi mov edi, 4; unsigned __int64 mov rax, fs:28h mov [rsp+0F8h+var_40], rax xor eax, eax call __Znwm; operator new(ulong) mov r...
long long func0(int a1, long long *a2) { char *v2; // rax long long v3; // rcx long long v4; // r14 char *v5; // rbx char *v6; // r12 size_t v7; // rdx unsigned long long v8; // r14 char *v9; // rax char *v10; // r13 char *v11; // r15 unsigned long long v12; // r13 int *v13; // rcx int v14; /...
func0: ENDBR64 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBP MOV RBP,RSI PUSH RBX SUB RSP,0xc8 MOV dword ptr [RSP + 0x2c],EDI MOV EDI,0x4 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + 0xb8],RAX XOR EAX,EAX LAB_001016b4: CALL 0x00101160 MOV RCX,qword ptr [RBP + 0x8] MOV R14,qword ptr [RBP] LEA RBX,[RAX + 0x4] MOV qwor...
/* func0(int, std::vector<int, std::allocator<int> >) */ int func0(int param_1,vector param_2) { int iVar1; void *pvVar2; int iVar3; int4 *puVar4; ulong __n; void *__s; void *pvVar5; long lVar6; int *piVar7; int4 in_register_00000034; long *plVar8; ulong uVar9; long lVar10; long in_FS_OFFS...
3,372
func0
#include <cassert> #include <vector>
int func0(int n, int k) { std::vector<int> arr(n, 0); int i = 0; int odd = 1; while (odd <= n) { arr[i] = odd; i += 1; odd += 2; } int even = 2; while (even <= n) { arr[i] = even; i += 1; even += 2; } return arr[k - 1]; ...
int main() { assert(func0(8, 5) == 2); assert(func0(7, 2) == 3); assert(func0(5, 2) == 3); return 0; }
O0
cpp
func0(int, int): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x58,%rsp mov %edi,-0x54(%rbp) mov %esi,-0x58(%rbp) mov %fs:0x28,%rax mov %rax,-0x18(%rbp) xor %eax,%eax lea -0x41(%rbp),%rax mov %rax,%rdi callq 13dc <_ZNSaIiEC1Ev> movl $0x0,-0x40(%rbp) mov -0x54(%rbp),%eax movslq %ea...
_Z5func0ii: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 58h mov [rbp+var_54], edi mov [rbp+var_58], esi mov rax, fs:28h mov [rbp+var_18], rax xor eax, eax lea rax, [rbp+var_49] mov [rbp+var_38], rax nop nop mov [rbp+var_48], 0 mov eax, [rbp+var_54] movsxd rsi, eax ...
long long func0(int a1, int a2) { int v2; // ebx int v3; // ebx unsigned int v4; // ebx char v6; // [rsp+17h] [rbp-49h] BYREF int v7; // [rsp+18h] [rbp-48h] BYREF int v8; // [rsp+1Ch] [rbp-44h] int i; // [rsp+20h] [rbp-40h] int j; // [rsp+24h] [rbp-3Ch] char *v11; // [rsp+28h] [rbp-38h] _BYTE v12[2...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x58 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 LEA RAX,[RBP + -0x49] MOV qword ptr [RBP + -0x38],RAX NOP NOP MOV dword ptr [RBP + -0x48],0x0 MOV EAX,dword ptr [RBP + -0x54] ...
/* func0(int, int) */ int4 func0(int param_1,int param_2) { int4 uVar1; int iVar2; int *piVar3; int4 *puVar4; long in_FS_OFFSET; allocator local_51; int local_50; int local_4c; int local_48; int local_44; allocator *local_40; vector<int,std::allocator<int>> local_38 [24]; long local_20; ...
3,373
func0
#include <cassert> #include <vector>
int func0(int n, int k) { std::vector<int> arr(n, 0); int i = 0; int odd = 1; while (odd <= n) { arr[i] = odd; i += 1; odd += 2; } int even = 2; while (even <= n) { arr[i] = even; i += 1; even += 2; } return arr[k - 1]; ...
int main() { assert(func0(8, 5) == 2); assert(func0(7, 2) == 3); assert(func0(5, 2) == 3); return 0; }
O1
cpp
func0(int, int): endbr64 push %r12 push %rbp push %rbx movslq %edi,%rcx movabs $0x1fffffffffffffff,%rax cmp %rax,%rcx ja 1255 <_Z5func0ii+0xac> mov %edi,%ebx mov %esi,%ebp test %rcx,%rcx je 1261 <_Z5func0ii+0xb8> lea 0x0(,%rcx,4),%r12 mov %r12,%rdi callq 10b0 <_Znwm@plt> mov %rax,%rdi...
_Z5func0ii: endbr64 push r12 push rbp push rbx movsxd r12, edi mov rax, r12 shr rax, 3Dh jnz loc_1242 mov ebx, edi mov ebp, esi test r12, r12 jz loc_124E shl r12, 2 mov rdi, r12; unsigned __int64 call __Znwm; operator new(ulong) mov rdi, rax; void * lea rdx, [rax...
long long func0(int a1, int a2) { unsigned long long v3; // r12 int *v4; // rax int *v5; // rdi int *v6; // rdx int *v7; // rdx int v8; // eax int *v9; // rdx int v10; // eax unsigned int v11; // ebx if ( (unsigned long long)a1 >> 61 ) std::__throw_length_error("cannot create std::vector large...
func0: ENDBR64 PUSH R12 PUSH RBP PUSH RBX MOVSXD R12,EDI MOV RAX,R12 SHR RAX,0x3d JNZ 0x00101242 MOV EBX,EDI MOV EBP,ESI TEST R12,R12 JZ 0x0010124e SHL R12,0x2 MOV RDI,R12 CALL 0x001010a0 MOV RDI,RAX LEA RDX,[RAX + R12*0x1] LAB_001011e1: MOV dword ptr [RAX],0x0 ADD RAX,0x4 CMP RDX,RAX JNZ 0x001011e1 MOV RDX,RDI MOV EAX...
/* func0(int, int) */ int func0(int param_1,int param_2) { int iVar1; int *piVar2; int *piVar3; int unaff_EBP; ulong uVar4; uVar4 = (ulong)param_1; if (uVar4 >> 0x3d == 0) { unaff_EBP = param_2; if (uVar4 != 0) { piVar2 = (int *)operator_new(uVar4 * 4); piVar3 = piVar2; do {...
3,374
func0
#include <cassert> #include <vector>
int func0(int n, int k) { std::vector<int> arr(n, 0); int i = 0; int odd = 1; while (odd <= n) { arr[i] = odd; i += 1; odd += 2; } int even = 2; while (even <= n) { arr[i] = even; i += 1; even += 2; } return arr[k - 1]; ...
int main() { assert(func0(8, 5) == 2); assert(func0(7, 2) == 3); assert(func0(5, 2) == 3); return 0; }
O2
cpp
func0(int, int): endbr64 movabs $0x1fffffffffffffff,%rax movslq %edi,%rcx push %r12 push %rbp push %rbx cmp %rax,%rcx ja 1337 <_Z5func0ii+0xd7> mov %esi,%r12d test %rcx,%rcx je 1320 <_Z5func0ii+0xc0> lea 0x0(,%rcx,4),%rbp mov %rcx,%rbx mov %rbp,%rdi callq 10b0 <_Znwm@plt> mov %rax,%rd...
_Z5func0ii: endbr64 push r13 push r12 movsxd r12, edi push rbp mov rax, r12 push rbx sub rsp, 8 shr rax, 3Dh jnz loc_134C mov r13d, esi test r12, r12 jz loc_1330 mov rbp, r12 shl r12, 2 mov rdi, r12; unsigned __int64 call __Znwm; operator new(ulong) mov rdx, r...
long long func0(int a1, int a2) { unsigned long long v3; // r12 int *v4; // rbx int *v5; // rdi int v6; // eax int *v7; // rdx int v8; // eax unsigned int v9; // ebx if ( (unsigned long long)a1 >> 61 ) std::__throw_length_error("cannot create std::vector larger than max_size()"); if ( !a1 ) ...
func0: ENDBR64 PUSH R13 PUSH R12 MOVSXD R12,EDI PUSH RBP MOV RAX,R12 PUSH RBX SUB RSP,0x8 SHR RAX,0x3d JNZ 0x0010134c MOV R13D,ESI TEST R12,R12 JZ 0x00101330 MOV RBP,R12 SHL R12,0x2 MOV RDI,R12 CALL 0x001010c0 MOV RDX,R12 XOR ESI,ESI MOV RDI,RAX MOV RBX,RAX CALL 0x001010a0 MOV RDI,RBX MOV EAX,0x1 NOP dword ptr [RAX] LA...
/* func0(int, int) */ ulong func0(int param_1,int param_2) { uint uVar1; int iVar2; int *__s; int *piVar3; ulong uVar4; uVar4 = (ulong)param_1; if (uVar4 >> 0x3d != 0) { uVar4 = std::__throw_length_error("cannot create std::vector larger than max_size()"); return uVar4; } if (uVar4 != 0) ...
3,375
func0
#include <cassert> #include <vector>
int func0(int n, int k) { std::vector<int> arr(n, 0); int i = 0; int odd = 1; while (odd <= n) { arr[i] = odd; i += 1; odd += 2; } int even = 2; while (even <= n) { arr[i] = even; i += 1; even += 2; } return arr[k - 1]; ...
int main() { assert(func0(8, 5) == 2); assert(func0(7, 2) == 3); assert(func0(5, 2) == 3); return 0; }
O3
cpp
func0(int, int): endbr64 movabs $0x1fffffffffffffff,%rax movslq %edi,%rdx push %r12 push %rbp push %rbx cmp %rax,%rdx ja 1442 <_Z5func0ii+0x1c2> mov %esi,%ebx test %rdx,%rdx je 1408 <_Z5func0ii+0x188> lea 0x0(,%rdx,4),%r12 mov %rdx,%rbp mov %r12,%rdi callq 10d0 <_Znwm@plt> mov %r12,%r...
_Z5func0ii: endbr64 push r12 push rbp push rbx movsxd rbx, edi mov rax, rbx shr rax, 3Dh jnz loc_142A mov r12d, esi test rbx, rbx jz loc_13E8 mov rbp, rbx shl rbx, 2 mov rdi, rbx; unsigned __int64 call __Znwm; operator new(ulong) mov rdx, rbx; n xor esi, esi; c m...
long long func0(int a1, int a2) { unsigned long long v4; // rbx void *v5; // rax __m128i *v6; // rax __m128i *v7; // rdi unsigned int v8; // ecx __m128i si128; // xmm0 __m128i v10; // xmm2 char *m128i_i8; // rdx __m128i v12; // xmm1 signed int v13; // edx unsigned int v14; // eax long long v15;...
func0: ENDBR64 PUSH R12 PUSH RBP PUSH RBX MOVSXD RBX,EDI MOV RAX,RBX SHR RAX,0x3d JNZ 0x0010142a MOV R12D,ESI TEST RBX,RBX JZ 0x001013e8 MOV RBP,RBX SHL RBX,0x2 MOV RDI,RBX CALL 0x001010c0 MOV RDX,RBX XOR ESI,ESI MOV RDI,RAX CALL 0x001010a0 LEA ECX,[RBP + -0x1] SHR ECX,0x1 MOV RDI,RAX ADD ECX,0x1 CMP EBP,0x6 JLE 0x0010...
/* WARNING: Control flow encountered bad instruction data */ /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(int, int) */ int func0(int param_1,int param_2) { int iVar1; int iVar2; int iVar3; int iVar4; void *__s; int *piVar5; int *piVar6; int *piVar7; u...
3,376
func0
#include <cmath> #include <cassert> #include <iostream>
int func0(int n) { if (n < 0) { return 0; } if (n <= 1) { return 1; } double x = ((n * log10(n / M_E) + log10(2 * M_PI * n) / 2.0)); return floor(x) + 1; }
int main() { assert(func0(7) == 4); assert(func0(5) == 3); assert(func0(4) == 2); std::cout << "All tests passed!" << std::endl; return 0; }
O0
cpp
func0(int): endbr64 push %rbp mov %rsp,%rbp sub $0x20,%rsp mov %edi,-0x14(%rbp) cmpl $0x0,-0x14(%rbp) jns 1228 <_Z5func0i+0x1f> mov $0x0,%eax jmpq 12a9 <_Z5func0i+0xa0> cmpl $0x1,-0x14(%rbp) jg 1235 <_Z5func0i+0x2c> mov $0x1,%eax jmp 12a9 <_Z5func0i+0xa0> cvtsi2sdl -0x14(%rbp),%xmm3 mov...
_Z5func0i: endbr64 push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_14], edi cmp [rbp+var_14], 0 jns short loc_11E8 mov eax, 0 jmp locret_129A loc_11E8: cmp [rbp+var_14], 1 jg short loc_11F8 mov eax, 1 jmp locret_129A loc_11F8: pxor xmm4, xmm4 cvtsi2sd xmm4, [rbp+var_14...
long long func0(int a1) { double v2; // [rsp+0h] [rbp-20h] double x; // [rsp+18h] [rbp-8h] if ( a1 < 0 ) return 0LL; if ( a1 <= 1 ) return 1LL; v2 = log10((double)a1 / 2.718281828459045) * (double)a1; x = log10((double)a1 * 6.283185307179586) / 2.0 + v2; return (unsigned int)(int)(floor(x) + 1.0...
func0: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x14],EDI CMP dword ptr [RBP + -0x14],0x0 JNS 0x001011e8 MOV EAX,0x0 JMP 0x0010129a LAB_001011e8: CMP dword ptr [RBP + -0x14],0x1 JG 0x001011f8 MOV EAX,0x1 JMP 0x0010129a LAB_001011f8: PXOR XMM4,XMM4 CVTSI2SD XMM4,dword ptr [RBP + -0x14] MOVSD qword...
/* func0(int) */ int func0(int param_1) { int iVar1; double dVar2; double dVar3; if (param_1 < 0) { iVar1 = 0; } else if (param_1 < 2) { iVar1 = 1; } else { dVar2 = log10((double)param_1 / DAT_00102078); dVar3 = log10((double)param_1 * DAT_00102080); dVar2 = floor(dVar3 / DAT_00...
3,377
func0
#include <cmath> #include <cassert> #include <iostream>
int func0(int n) { if (n < 0) { return 0; } if (n <= 1) { return 1; } double x = ((n * log10(n / M_E) + log10(2 * M_PI * n) / 2.0)); return floor(x) + 1; }
int main() { assert(func0(7) == 4); assert(func0(5) == 3); assert(func0(4) == 2); std::cout << "All tests passed!" << std::endl; return 0; }
O1
cpp
func0(int): endbr64 mov $0x0,%eax test %edi,%edi js 12cb <_Z5func0i+0xe2> mov $0x1,%eax cmp $0x1,%edi jle 12cb <_Z5func0i+0xe2> sub $0x18,%rsp pxor %xmm5,%xmm5 cvtsi2sd %edi,%xmm5 movsd %xmm5,(%rsp) movapd %xmm5,%xmm0 divsd 0xe73(%rip),%xmm0 callq 10b0 <log10@plt> movsd %xmm0,0x8(%rsp) movsd ...
_Z5func0i: endbr64 mov eax, 0 test edi, edi js locret_128B mov eax, 1 cmp edi, 1 jle locret_128B sub rsp, 18h pxor xmm5, xmm5 cvtsi2sd xmm5, edi movsd [rsp+18h+var_18], xmm5 movapd xmm0, xmm5 divsd xmm0, cs:qword_2070; x call _log10 movsd [rsp+18h+var_10], xmm0 movsd xmm6, [rs...
long long func0(int a1) { long long result; // rax __m128d v2; // xmm0 double v3; // xmm1_8 __m128d v4; // xmm2 double v5; // [rsp+8h] [rbp-10h] result = 0LL; if ( a1 >= 0 ) { result = 1LL; if ( a1 > 1 ) { v5 = log10((double)a1 / 2.718281828459045); v2.m128d_f64[0] = (double)a1...
func0: ENDBR64 MOV EAX,0x0 TEST EDI,EDI JS 0x0010128b MOV EAX,0x1 CMP EDI,0x1 JLE 0x0010128b SUB RSP,0x18 PXOR XMM5,XMM5 CVTSI2SD XMM5,EDI MOVSD qword ptr [RSP],XMM5 MOVAPD XMM0,XMM5 DIVSD XMM0,qword ptr [0x00102070] CALL 0x00101090 MOVSD qword ptr [RSP + 0x8],XMM0 MOVSD XMM6,qword ptr [RSP] MULSD XMM6,qword ptr [0x001...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(int) */ int func0(int param_1) { int iVar1; double dVar2; double dVar3; double dVar4; iVar1 = 0; if ((-1 < param_1) && (iVar1 = 1, 1 < param_1)) { dVar4 = (double)param_1; dVar2 = log10(dVar4 / _DAT_00...
3,378
func0
#include <cmath> #include <cassert> #include <iostream>
int func0(int n) { if (n < 0) { return 0; } if (n <= 1) { return 1; } double x = ((n * log10(n / M_E) + log10(2 * M_PI * n) / 2.0)); return floor(x) + 1; }
int main() { assert(func0(7) == 4); assert(func0(5) == 3); assert(func0(4) == 2); std::cout << "All tests passed!" << std::endl; return 0; }
O2
cpp
func0(int) [clone .part.0]: pxor %xmm5,%xmm5 sub $0x18,%rsp cvtsi2sd %edi,%xmm5 movapd %xmm5,%xmm0 movsd %xmm5,(%rsp) divsd 0xd8b(%rip),%xmm0 callq 10b0 <log10@plt> movsd (%rsp),%xmm6 mulsd 0xd81(%rip),%xmm6 movsd %xmm0,0x8(%rsp) movapd %xmm6,%xmm0 callq 10b0 <log10@plt> movsd (%rsp),%xmm5 mulsd 0x8(%rsp)...
_Z5func0i_part_0: pxor xmm5, xmm5 sub rsp, 18h cvtsi2sd xmm5, edi movapd xmm0, xmm5 movsd [rsp+18h+var_18], xmm5 divsd xmm0, cs:qword_2070; x call _log10 movsd xmm6, [rsp+18h+var_18] mulsd xmm6, cs:qword_2078 movsd [rsp+18h+var_10], xmm0 movapd xmm0, xmm6; x call _log10 movsd xmm5, [rsp+18h+v...
long long func0(int a1) { __m128d v1; // xmm0 __m128d v2; // xmm1 double v4; // [rsp+8h] [rbp-10h] v4 = log10((double)a1 / 2.718281828459045); v1.m128d_f64[0] = (double)a1 * v4 + log10((double)a1 * 6.283185307179586) * 0.5; if ( fabs(v1.m128d_f64[0]) < 4.503599627370496e15 ) { v2 = 0LL; v2.m128d...
func0: PXOR XMM5,XMM5 SUB RSP,0x18 CVTSI2SD XMM5,EDI MOVAPD XMM0,XMM5 MOVSD qword ptr [RSP],XMM5 DIVSD XMM0,qword ptr [0x00102070] CALL 0x001010c0 MOVSD XMM6,qword ptr [RSP] MULSD XMM6,qword ptr [0x00102078] MOVSD qword ptr [RSP + 0x8],XMM0 MOVAPD XMM0,XMM6 CALL 0x001010c0 MOVSD XMM5,qword ptr [RSP] MULSD XMM5,qword pt...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(int) [clone .part.0] */ int func0(int param_1) { double dVar1; double dVar2; double dVar3; dVar3 = (double)param_1; dVar1 = log10(dVar3 / _DAT_00102070); dVar2 = log10(dVar3 * _DAT_00102078); dVar1 = dVar3 *...
3,379
func0
#include <cmath> #include <cassert> #include <iostream>
int func0(int n) { if (n < 0) { return 0; } if (n <= 1) { return 1; } double x = ((n * log10(n / M_E) + log10(2 * M_PI * n) / 2.0)); return floor(x) + 1; }
int main() { assert(func0(7) == 4); assert(func0(5) == 3); assert(func0(4) == 2); std::cout << "All tests passed!" << std::endl; return 0; }
O3
cpp
func0(int) [clone .part.0]: pxor %xmm5,%xmm5 sub $0x18,%rsp cvtsi2sd %edi,%xmm5 movapd %xmm5,%xmm0 movsd %xmm5,(%rsp) divsd 0xd8b(%rip),%xmm0 callq 10b0 <log10@plt> movsd (%rsp),%xmm6 mulsd 0xd81(%rip),%xmm6 movsd %xmm0,0x8(%rsp) movapd %xmm6,%xmm0 callq 10b0 <log10@plt> movsd (%rsp),%xmm5 mulsd 0x8(%rsp)...
_Z5func0i_part_0: pxor xmm5, xmm5 sub rsp, 18h cvtsi2sd xmm5, edi movapd xmm0, xmm5 movsd [rsp+18h+var_18], xmm5 divsd xmm0, cs:qword_2078; x call _log10 movsd xmm6, [rsp+18h+var_18] mulsd xmm6, cs:qword_2080 movsd [rsp+18h+var_10], xmm0 movapd xmm0, xmm6; x call _log10 movsd xmm5, [rsp+18h+v...
long long func0(int a1) { __m128d v1; // xmm0 __m128d v2; // xmm1 double v4; // [rsp+8h] [rbp-10h] v4 = log10((double)a1 / 2.718281828459045); v1.m128d_f64[0] = (double)a1 * v4 + log10((double)a1 * 6.283185307179586) * 0.5; if ( fabs(v1.m128d_f64[0]) < 4.503599627370496e15 ) { v2 = 0LL; v2.m128d...
func0: PXOR XMM5,XMM5 SUB RSP,0x18 CVTSI2SD XMM5,EDI MOVAPD XMM0,XMM5 MOVSD qword ptr [RSP],XMM5 DIVSD XMM0,qword ptr [0x00102078] CALL 0x001010c0 MOVSD XMM6,qword ptr [RSP] MULSD XMM6,qword ptr [0x00102080] MOVSD qword ptr [RSP + 0x8],XMM0 MOVAPD XMM0,XMM6 CALL 0x001010c0 MOVSD XMM5,qword ptr [RSP] MULSD XMM5,qword pt...
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* func0(int) [clone .part.0] */ int func0(int param_1) { double dVar1; double dVar2; double dVar3; dVar3 = (double)param_1; dVar1 = log10(dVar3 / _DAT_00102078); dVar2 = log10(dVar3 * _DAT_00102080); dVar1 = dVar3 *...
3,380
func0
#include <iostream> #include <vector> #include <algorithm> #include <assert.h>
int func0(std::vector<int> arr, std::vector<int> dep, int n) { std::sort(arr.begin(), arr.end()); std::sort(dep.begin(), dep.end()); int plat_needed = 1; int result = 1; int i = 1; int j = 0; while (i < n && j < n) { if (arr[i] <= dep[j]) { plat_needed++;...
int main() { assert(func0({900, 940, 950, 1100, 1500, 1800}, {910, 1200, 1120, 1130, 1900, 2000}, 6) == 3); assert(func0({100, 200, 300, 400}, {700, 800, 900, 1000}, 4) == 4); assert(func0({5, 6, 7, 8}, {4, 3, 2, 1}, 4) == 1); return 0; }
O0
cpp
func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, int): endbr64 push %rbp mov %rsp,%rbp push %rbx sub $0x38,%rsp mov %rdi,-0x28(%rbp) mov %rsi,-0x30(%rbp) mov %edx,-0x34(%rbp) mov -0x28(%rbp),%rax mov %rax,%rdi callq 1a74 <_ZNSt6vectorIiSaIiEE3endEv> mov ...
_Z5func0St6vectorIiSaIiEES1_i: endbr64 push rbp mov rbp, rsp push rbx sub rsp, 38h mov [rbp+var_28], rdi mov [rbp+var_30], rsi mov [rbp+var_34], edx mov rax, [rbp+var_28] mov rdi, rax call _ZNSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void) mov rbx, rax mov rax, [rbp+var...
long long func0(long long a1, long long a2, int a3) { long long v3; // rbx long long v4; // rax long long v5; // rbx long long v6; // rax int v7; // ebx int v8; // ebx int v11; // [rsp+20h] [rbp-20h] int v12; // [rsp+24h] [rbp-1Ch] int v13; // [rsp+28h] [rbp-18h] int v14; // [rsp+2Ch] [rbp-14h] ...
func0: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x38 MOV qword ptr [RBP + -0x28],RDI MOV qword ptr [RBP + -0x30],RSI MOV dword ptr [RBP + -0x34],EDX MOV RAX,qword ptr [RBP + -0x28] MOV RDI,RAX CALL 0x001019da MOV RBX,RAX MOV RAX,qword ptr [RBP + -0x28] MOV RDI,RAX CALL 0x0010198e MOV RSI,RBX MOV RDI,RAX CALL 0x001...
/* func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, int) */ int func0(vector param_1,vector param_2,int param_3) { int iVar1; __normal_iterator _Var2; __normal_iterator _Var3; int *piVar4; int4 in_register_00000034; vector<int,std::allocator<int>> *this; int4 in_regi...
3,381
func0
#include <iostream> #include <vector> #include <algorithm> #include <assert.h>
int func0(std::vector<int> arr, std::vector<int> dep, int n) { std::sort(arr.begin(), arr.end()); std::sort(dep.begin(), dep.end()); int plat_needed = 1; int result = 1; int i = 1; int j = 0; while (i < n && j < n) { if (arr[i] <= dep[j]) { plat_needed++;...
int main() { assert(func0({900, 940, 950, 1100, 1500, 1800}, {910, 1200, 1120, 1130, 1900, 2000}, 6) == 3); assert(func0({100, 200, 300, 400}, {700, 800, 900, 1000}, 4) == 4); assert(func0({5, 6, 7, 8}, {4, 3, 2, 1}, 4) == 1); return 0; }
O1
cpp
func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, int): endbr64 push %r14 push %r13 push %r12 push %rbp push %rbx mov %rdi,%r12 mov %rsi,%rbp mov %edx,%ebx mov 0x8(%rdi),%r14 mov (%rdi),%r13 cmp %r13,%r14 je 12be <_Z5func0St6vectorIiSaIiEES1_i+0x55> mo...
_Z5func0St6vectorIiSaIiEES1_i: endbr64 push r14 push r13 push r12 push rbp push rbx mov r12, rdi mov rbp, rsi mov ebx, edx mov r14, [rdi+8] mov r13, [rdi] cmp r14, r13 jz short loc_1284 mov rax, r14 sub rax, r13 sar rax, 2 mov ecx, 40h ; '@' jz short loc_...
long long func0(_QWORD *a1, _QWORD *a2, int a3) { long long v6; // r14 long long v7; // r13 int v8; // ecx unsigned long long v9; // rcx long long v10; // r14 long long v11; // r13 int v12; // ecx unsigned long long v13; // rcx int v14; // ecx int v15; // edx int v16; // edi int v17; // eax i...
func0: ENDBR64 PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX MOV R12,RDI MOV RBP,RSI MOV EBX,EDX MOV R14,qword ptr [RDI + 0x8] MOV R13,qword ptr [RDI] CMP R14,R13 JZ 0x00101284 MOV RAX,R14 SUB RAX,R13 SAR RAX,0x2 MOV ECX,0x40 JZ 0x00101261 BSR RCX,RAX XOR ECX,0x3f LAB_00101261: MOV EDX,0x3f SUB EDX,ECX MOVSXD RDX,EDX AD...
/* func0(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, int) */ int func0(vector param_1,vector param_2,int param_3) { long lVar1; long lVar2; long lVar3; int iVar4; ulong uVar5; _Iter_less_iter _Var6; int iVar7; _Iter_less_iter extraout_EDX; _Iter_less_iter extraout...